Merge pull request #9137 from nickberry17/master
authorMichael Heimpold <mhei@heimpold.de>
Mon, 7 Oct 2019 10:50:13 +0000 (12:50 +0200)
committerGitHub <noreply@github.com>
Mon, 7 Oct 2019 10:50:13 +0000 (12:50 +0200)
modemmanager: add ModemManager to packages

This also includes related libraries libmbim and libqmi and the command line tools.

1354 files changed:
.circleci/Dockerfile
.circleci/config.yml
.github/issue_template
admin/backuppc/Makefile [new file with mode: 0644]
admin/backuppc/files/backuppc.init [new file with mode: 0644]
admin/backuppc/files/backuppc.upgrade [new file with mode: 0644]
admin/backuppc/files/fixup-config-pl.patch [new file with mode: 0644]
admin/backuppc/files/setuidwrapper.c [new file with mode: 0644]
admin/backuppc/patches/001-debian-fixes.patch [new file with mode: 0644]
admin/gkrellmd/Makefile
admin/monit/Makefile
admin/monit/patches/001-fix-default-piddir.patch
admin/monit/patches/010-openssl-thread-api.patch [deleted file]
admin/muninlite/Makefile
admin/netdata/Makefile
admin/netdata/files/netdata.init
admin/netdata/patches/002-force-python3.patch [deleted file]
admin/openwisp-config/Makefile
admin/syslog-ng/Makefile
admin/syslog-ng/files/syslog-ng.conf
admin/syslog-ng/files/syslog-ng.init
admin/zabbix/Makefile
admin/zabbix/patches/003-change-user-and-foreground.patch [deleted file]
devel/autoconf/Makefile
devel/automake/Makefile
devel/diffutils/Makefile
devel/gcc/Config.in [new file with mode: 0644]
devel/gcc/Makefile
devel/gcc/README
devel/gcc/patches/001-revert_register_mode_search.patch
devel/gcc/patches/002-case_insensitive.patch
devel/gcc/patches/003-mpfr-longlong-mips.patch [deleted file]
devel/gcc/patches/010-documentation.patch
devel/gcc/patches/020-no-plt-backport.patch [deleted file]
devel/gcc/patches/040-fix-mips-ICE-PR-68400.patch [deleted file]
devel/gcc/patches/100-uclibc-conf.patch [deleted file]
devel/gcc/patches/110-Fix-MIPS-PR-84790.patch [new file with mode: 0644]
devel/gcc/patches/200-musl_config.patch [deleted file]
devel/gcc/patches/201-musl_arm.patch [deleted file]
devel/gcc/patches/202-musl_mips.patch [deleted file]
devel/gcc/patches/203-musl_powerpc.patch [deleted file]
devel/gcc/patches/204-musl_sh.patch [deleted file]
devel/gcc/patches/205-musl_x86.patch [deleted file]
devel/gcc/patches/206-musl_aarch64.patch [deleted file]
devel/gcc/patches/207-musl_fixincludes.patch [deleted file]
devel/gcc/patches/209-musl_libstdc++.patch [deleted file]
devel/gcc/patches/230-musl_libssp.patch
devel/gcc/patches/240-musl-libitm-fixes.patch [deleted file]
devel/gcc/patches/250-add-musl.patch [deleted file]
devel/gcc/patches/270-musl-add-powerpc-softfloat-fix.patch [deleted file]
devel/gcc/patches/300-mips_Os_cpu_rtx_cost_model.patch
devel/gcc/patches/800-arm_v5te_no_ldrd_strd.patch
devel/gcc/patches/810-arm-softfloat-libgcc.patch
devel/gcc/patches/820-libgcc_pic.patch
devel/gcc/patches/830-arm_unbreak_armv4t.patch [deleted file]
devel/gcc/patches/840-armv4_pass_fix-v4bx_to_ld.patch
devel/gcc/patches/850-use_shared_libgcc.patch
devel/gcc/patches/851-libgcc_no_compat.patch
devel/gcc/patches/870-ppc_no_crtsavres.patch
devel/gcc/patches/880-no_java_section.patch [deleted file]
devel/gcc/patches/881-no_tm_section.patch [new file with mode: 0644]
devel/gcc/patches/900-bad-mips16-crt.patch
devel/gcc/patches/910-mbsd_multi.patch
devel/gcc/patches/920-specs_nonfatal_getenv.patch
devel/gcc/patches/930-fix-mips-noexecstack.patch
devel/gcc/patches/930-osdefines.patch [deleted file]
devel/gcc/patches/931-libffi-fix-MIPS-softfloat-build-issue.patch [new file with mode: 0644]
devel/gcc/patches/940-no-clobber-stamp-bits.patch
devel/gcc/patches/950-cpp_file_path_translation.patch
devel/gcc/patches/960-go_libm.patch [deleted file]
devel/gcc/patches/960-gotools-fix-compilation-when-making-cross-compiler.patch [new file with mode: 0644]
devel/gcc/patches/970-warn_bug.patch [deleted file]
devel/libtool-bin/Makefile
devel/lpc21isp/Makefile
devel/m4/Makefile
devel/make/Makefile
devel/patch/Makefile
devel/patch/patches/050-CVE-2019-13636.patch [new file with mode: 0644]
devel/patch/patches/060-CVE-2018-20969-CVE-2019-13638.patch [new file with mode: 0644]
devel/pkg-config/Makefile
devel/scons/Makefile [new file with mode: 0644]
devel/scons/files/pywrap.sh [new file with mode: 0755]
devel/scons/patches/001-platform_env.patch [new file with mode: 0644]
devel/scons/scons.mk [new file with mode: 0644]
kernel/cifsd/Makefile [new file with mode: 0644]
kernel/cifsd/patches/001-mips-vfree_vmalloc-fix.patch [new file with mode: 0644]
kernel/cifsd/patches/002-fix-xattr_list.patch [new file with mode: 0644]
kernel/exfat-nofuse/Makefile
kernel/pfring/Makefile
lang/chicken-scheme/Makefile
lang/erlang/Makefile
lang/golang/golang-package.mk
lang/golang/golang-values.mk
lang/golang/golang-version.mk
lang/golang/golang/Makefile
lang/jamvm/Makefile
lang/jamvm/patches/010-musl.patch [new file with mode: 0644]
lang/ldbus/Makefile
lang/lua-bit32/Makefile [new file with mode: 0644]
lang/lua-openssl/Makefile
lang/lua-openssl/patches/0001-Revise-Makefile.patch
lang/lua-openssl/patches/0010-Fix-Linkage.patch [deleted file]
lang/lua-openssl/patches/0020-use-X509_REQ_to_X509-in-openssl-1.1.patch [deleted file]
lang/luaexpat/Makefile
lang/luajit/Makefile
lang/luaposix/Makefile
lang/luaposix/patches/100-eglibc-compat.patch [deleted file]
lang/luaposix/patches/101-disable-curses.patch [deleted file]
lang/luaposix/patches/102-disable-compat-deprecated.diff
lang/luarocks/Makefile
lang/luarocks/patches/01_dont_modify_bin_shebang.diff
lang/luasocket/Makefile
lang/luasocket/patches/0001-Add-interface-support.patch
lang/luasocket/patches/0301-Fix-mpc85xx-build.patch
lang/luasocket/patches/040-remove-fpic-and-warnings.patch
lang/node-hid/Makefile
lang/node-homebridge/Makefile
lang/node-mozilla-iot-gateway/Config.in [deleted file]
lang/node-mozilla-iot-gateway/Makefile [deleted file]
lang/node-mozilla-iot-gateway/README.md [deleted file]
lang/node-mozilla-iot-gateway/files/mozilla-iot-gateway.init [deleted file]
lang/node/Makefile
lang/node/patches/007-fix_host_build_on_macos.patch [new file with mode: 0644]
lang/perl-authen-sasl-xs/Makefile
lang/perl-authen-sasl/Makefile
lang/perl-compress-bzip2/Makefile
lang/perl-dbi/Makefile
lang/perl-device-serialport/Makefile
lang/perl-device-usb/Makefile
lang/perl-device-usb/patches/140-avoid-libusb-name-conflicts.patch
lang/perl-encode-locale/Makefile
lang/perl-file-listing/Makefile
lang/perl-file-rsyncp/Makefile [new file with mode: 0644]
lang/perl-file-rsyncp/patches/001-no-subdirs.patch [new file with mode: 0644]
lang/perl-file-sharedir-install/Makefile
lang/perl-html-form/Makefile
lang/perl-html-parser/Makefile
lang/perl-html-tagset/Makefile
lang/perl-html-tree/Makefile
lang/perl-http-cookies/Makefile
lang/perl-http-daemon/Makefile
lang/perl-http-date/Makefile
lang/perl-http-message/Makefile
lang/perl-http-negotiate/Makefile
lang/perl-http-server-simple/Makefile
lang/perl-inline-c/Makefile
lang/perl-inline-c/patches/100-inline_c-no_compile_hack.patch
lang/perl-inline-c/patches/110-inline_c-make_system_typemap_overridable.patch
lang/perl-inline/Makefile
lang/perl-io-html/Makefile
lang/perl-lockfile-simple/Makefile
lang/perl-lwp-mediatypes/Makefile
lang/perl-net-http/Makefile
lang/perl-net-telnet/Makefile
lang/perl-parse-recdescent/Makefile
lang/perl-sub-uplevel/Makefile
lang/perl-test-harness/Makefile
lang/perl-test-warn/Makefile
lang/perl-text-csv_xs/Makefile
lang/perl-uri/Makefile
lang/perl-www-curl/Makefile
lang/perl-www-curl/patches/210-curl_7.66_compat.patch [new file with mode: 0644]
lang/perl-www-mechanize/Makefile
lang/perl-www-robotrules/Makefile
lang/perl-www/Makefile
lang/perl-xml-parser/Makefile
lang/perl/Makefile
lang/php7-pecl-dio/Makefile
lang/php7-pecl-http/Makefile
lang/php7-pecl-krb5/Makefile
lang/php7-pecl-libevent/Makefile
lang/php7-pecl-mcrypt/Makefile
lang/php7-pecl-redis/Makefile
lang/php7/Makefile
lang/python/Flask/Makefile
lang/python/Jinja2/Makefile
lang/python/MarkupSafe/Makefile
lang/python/README.md
lang/python/Werkzeug/Makefile
lang/python/bcrypt/Makefile
lang/python/click/Makefile
lang/python/django-appconf/Makefile
lang/python/django-compressor/Makefile
lang/python/django-constance/Makefile
lang/python/django-formtools/Makefile
lang/python/django-jsonfield/Makefile
lang/python/django-picklefield/Makefile
lang/python/django-postoffice/Makefile
lang/python/django-ranged-response/Makefile
lang/python/django-restframework/Makefile
lang/python/django-simple-captcha/Makefile
lang/python/django-statici18n/Makefile
lang/python/django-webpack-loader/Makefile
lang/python/django/Makefile
lang/python/flup/Makefile
lang/python/gunicorn/Makefile
lang/python/itsdangerous/Makefile
lang/python/pillow/Makefile
lang/python/pillow/patches/010-fix-paths.patch [deleted file]
lang/python/python-aiohttp-cors/Makefile [new file with mode: 0644]
lang/python/python-asn1crypto/Makefile
lang/python/python-cachelib/Makefile [new file with mode: 0644]
lang/python/python-cachetools/Makefile [new file with mode: 0644]
lang/python/python-certifi/Makefile
lang/python/python-cryptodome/Makefile
lang/python/python-cryptodomex/Makefile
lang/python/python-cryptography/Makefile
lang/python/python-cryptography/patches/010-remove-npn.patch [new file with mode: 0644]
lang/python/python-cryptography/patches/020-disable-npn.patch [new file with mode: 0644]
lang/python/python-cryptography/patches/030-remove-npn.patch [new file with mode: 0644]
lang/python/python-curl/Makefile
lang/python/python-curl/patches/0001-Add-locking-support-to-wolfSSL.patch [new file with mode: 0644]
lang/python/python-curl/patches/0001-support-for-mbedTLS.patch [deleted file]
lang/python/python-dateutil/Makefile
lang/python/python-decorator/Makefile
lang/python/python-dns/Makefile
lang/python/python-egenix-mx-base/Makefile
lang/python/python-enum34/Makefile
lang/python/python-evdev/Makefile
lang/python/python-gmpy2/Makefile
lang/python/python-gnupg/Makefile
lang/python/python-intelhex/Makefile [new file with mode: 0644]
lang/python/python-lxml/Makefile
lang/python/python-markdown/Makefile [new file with mode: 0644]
lang/python/python-mysql/Makefile [deleted file]
lang/python/python-mysqlclient/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-psycopg2/Makefile
lang/python/python-pyasn1-modules/Makefile
lang/python/python-pyasn1/Makefile
lang/python/python-pyopenssl/Makefile
lang/python/python-pyrsistent/Makefile [new file with mode: 0644]
lang/python/python-pytz/Makefile
lang/python/python-qrcode/Makefile
lang/python/python-requests/Makefile
lang/python/python-schedule/Makefile [new file with mode: 0644]
lang/python/python-schema/Makefile
lang/python/python-sentry-sdk/Makefile [new file with mode: 0644]
lang/python/python-simplejson/Makefile
lang/python/python-slugify/Makefile
lang/python/python-sqlalchemy/Makefile [new file with mode: 0644]
lang/python/python-twisted/Makefile
lang/python/python-twisted/patches/001-omit-tkconch.patch
lang/python/python-twisted/patches/002-omit-tests.patch
lang/python/python-urllib3/Makefile
lang/python/python-voluptuous-serialize/Makefile
lang/python/python-voluptuous/Makefile
lang/python/python-yaml/Makefile
lang/python/python-zeroconf/Makefile
lang/python/python/Makefile
lang/python/python/files/python-config.in
lang/python/python/files/python-package-pkg-resources.mk [new file with mode: 0644]
lang/python/python/files/python-package-setuptools.mk
lang/python/python/patches/021-2.7-bpo-35121-prefix-dot-in-domain-for-proper-subdom.patch [new file with mode: 0644]
lang/python/python/patches/023-bpo-35907-Avoid-file-reading-as-disallowing-the-unnecessary-URL-scheme-in-urllib-GH-11842.patch [new file with mode: 0644]
lang/python/python/patches/024-musl-find_library.patch [new file with mode: 0644]
lang/python/python/patches/025-utime.patch [new file with mode: 0644]
lang/python/python/patches/027-bpo-38243-Escape-the-server-title-of-DocXMLRPCServer.patch [new file with mode: 0644]
lang/python/python/patches/028-bpo-34155-Dont-parse-domains-containing-GH-13079.patch [new file with mode: 0644]
lang/python/python3-bottle/Makefile
lang/python/python3-flask-login/Makefile [new file with mode: 0644]
lang/python/python3-maxminddb/Makefile [new file with mode: 0644]
lang/python/python3-package.mk
lang/python/python3-pyroute2/Makefile
lang/python/python3-unidecode/Makefile
lang/python/python3-version.mk
lang/python/python3/Makefile
lang/python/python3/files/python3-package-pkg-resources.mk [new file with mode: 0644]
lang/python/python3/files/python3-package-setuptools.mk
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/008-distutils-use-python-sysroot.patch [new file with mode: 0644]
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/017_lib2to3_fix_pyc_search.patch
lang/python/python3/patches/018-bpo-35746-Fix-segfault-in-ssl-s-cert-parser-GH-11569.patch [deleted file]
lang/python/python3/patches/019-bpo-36216-Add-check-for-characters-in-netloc-that-normalize-to-separators-GH-12213.patch [deleted file]
lang/python/python3/patches/022-bpo-30458-Disallow-control-chars-in-http-URLs-GH-13154.patch [deleted file]
lang/python/python3/patches/024-musl-find_library.patch [new file with mode: 0644]
lang/python/python3/patches/025-bpo-37461-Fix-infinite-loop-in-parsing-of-specially-.patch [new file with mode: 0644]
lang/python/python3/patches/026-3.7-bpo-37764-Fix-infinite-loop-when-parsing-unstruc.patch [new file with mode: 0644]
lang/python/python3/patches/027-bpo-38243-xmlrpc.server-Escape-the-server_title-GH-1.patch [new file with mode: 0644]
lang/python/python3/patches/028-bpo-34155-Dont-parse-domains-containing-GH-13079.patch [new file with mode: 0644]
lang/python/ruamel-yaml/Makefile
lang/tcl/Makefile
lang/vala/Makefile
libs/alsa-lib/Makefile
libs/alsa-lib/patches/100-link_fix.patch
libs/apr-util/Makefile
libs/avahi/Makefile
libs/avro/Makefile
libs/avro/patches/010-pkgconfig.patch [new file with mode: 0644]
libs/boost/Makefile
libs/boost/patches/001-uclibc-asio.patch [new file with mode: 0644]
libs/boost/patches/002-utime-filesystem.patch [new file with mode: 0644]
libs/boost/patches/010-uclibc-ng.patch [deleted file]
libs/boost/patches/100-fix-apply_visitor-on-lvalue-variant.patch [deleted file]
libs/boost/patches/101-uclibc-ng-math.patch [new file with mode: 0644]
libs/boost/patches/uclibc-ng-2.patch [deleted file]
libs/check/Makefile
libs/classpath/Makefile
libs/confuse/Makefile
libs/dtc/Makefile
libs/dtc/patches/0001-use-cflags-from-build-system.patch [deleted file]
libs/elektra/Makefile
libs/elektra/patches/010-openssl-deprecated.patch [new file with mode: 0644]
libs/expat/Makefile
libs/faad2/Makefile
libs/fbthrift/Makefile
libs/fbthrift/patches/010-boost.patch [new file with mode: 0644]
libs/fbzmq/Makefile [new file with mode: 0644]
libs/fbzmq/patches/010-move.patch [new file with mode: 0644]
libs/fftw3/Makefile
libs/file/Makefile
libs/flac/Makefile
libs/flac/patches/001-no-docs-and-examples.patch
libs/flac/patches/005-gcc_debug_options.patch [deleted file]
libs/flac/patches/010-automake-compat.patch [deleted file]
libs/flac/patches/010-utime.patch [new file with mode: 0644]
libs/flac/patches/100-CVE-2017-6888.patch [deleted file]
libs/freetype/Makefile
libs/gdbm/Makefile
libs/getdns/Makefile
libs/giflib/Makefile
libs/giflib/patches/100-no-docs.patch [deleted file]
libs/glib2/Makefile
libs/gnutls/Makefile
libs/google-authenticator-libpam/Makefile
libs/hwloc/Makefile
libs/ibrcommon/Makefile
libs/ibrdtn/Makefile
libs/ibrdtn/patches/010-Add-operator-to-Bundle-block_elem.patch [new file with mode: 0644]
libs/ibrdtn/patches/020-Use-const-iterator-in-const-function-of-MemoryBundle.patch [new file with mode: 0644]
libs/ibrdtn/patches/030-Use-std-streamoff-instead-of-std-streampos.patch [new file with mode: 0644]
libs/ibrdtn/patches/040-Add-operator-to-BundleID-and-MetaBundle.patch [new file with mode: 0644]
libs/icu/Makefile
libs/intltool/Makefile
libs/jsoncpp/Makefile
libs/jsoncpp/patches/010-pkgconnfig.patch [new file with mode: 0644]
libs/keyutils/Makefile
libs/ldns/Makefile
libs/leptonica/Makefile [new file with mode: 0644]
libs/libaio/Makefile
libs/libaio/patches/001_arches.patch
libs/libaio/patches/002_arches_sh.patch
libs/libaio/patches/003_arches_mips_fix_padding.patch
libs/libarchive/Makefile
libs/libarchive/patches/100-CVE-2018-1000880.patch [deleted file]
libs/libarchive/patches/101-CVE-2018-1000879.patch [deleted file]
libs/libarchive/patches/102-CVE-2018-1000878.patch [deleted file]
libs/libarchive/patches/103-CVE-2018-1000877.patch [deleted file]
libs/libarchive/patches/104-CVE-2019-1000019.patch [deleted file]
libs/libarchive/patches/105-CVE-2019-1000020.patch [deleted file]
libs/libaudiofile/Makefile
libs/libavl/Makefile
libs/libcanfestival/Makefile
libs/libcap/Makefile
libs/libcoap/Makefile
libs/libcups/Makefile
libs/libdouble-conversion/Makefile
libs/libdouble-conversion/patches/010-armeb.patch [deleted file]
libs/libesmtp/Makefile
libs/libestr/Makefile
libs/libev/Makefile
libs/libexif/Makefile
libs/libextractor/Makefile
libs/libextractor/patches/010-musl.patch [new file with mode: 0644]
libs/libfizz/Makefile
libs/libfmt/Makefile
libs/libfolly/Makefile
libs/libfolly/patches/100-cmake-fix-regex-match-path.patch
libs/libfolly/patches/101-remove-undefined-dcheck.patch
libs/libfolly/patches/102-uclibc-patches.patch [new file with mode: 0644]
libs/libfolly/patches/103-arm-yield.patch [new file with mode: 0644]
libs/libfstrm/Makefile
libs/libftdi/Makefile
libs/libftdi1/Makefile
libs/libgabe/Makefile
libs/libgabe/patches/010-shared-library.patch [new file with mode: 0644]
libs/libgcrypt/Makefile
libs/libgd/Makefile
libs/libgd/patches/100-no-cxx.patch [new file with mode: 0644]
libs/libgd/patches/101-gdlib-config.patch [deleted file]
libs/libgd/patches/102-gdlib-pc-in.patch [deleted file]
libs/libgd/patches/200-cmake-add-soname-info-to-libgd.so.patch [new file with mode: 0644]
libs/libgd/patches/200-uclibc-ceill.patch [deleted file]
libs/libgd/patches/210-generate-install-gdlib.pc-for-cmake-builds-too-164.patch [new file with mode: 0644]
libs/libgd/patches/220-exclude_host_headers.patch [new file with mode: 0644]
libs/libgee/Makefile
libs/libgee/patches/libgee-0.18.0-no-introspection.patch [deleted file]
libs/libgflags/Makefile
libs/libglog/Makefile
libs/libglog/patches/110-nanosleep.patch [new file with mode: 0644]
libs/libgpg-error/Makefile
libs/libgpg-error/patches/020-gawk5-support.patch [new file with mode: 0644]
libs/libgphoto2/Makefile
libs/libgpiod/Makefile
libs/libhttp-parser/Makefile
libs/libhttp-parser/patches/000-fix_darwin_error.patch [new file with mode: 0644]
libs/libid3tag/Makefile
libs/libidn/Makefile
libs/libidn2/Makefile
libs/libiio/Makefile
libs/libimobiledevice/Makefile
libs/liblo/Makefile
libs/liblo/patches/001-fix-musl-include.patch [deleted file]
libs/liblo/patches/010-index.patch [new file with mode: 0644]
libs/liblo/patches/020-usleep.patch [new file with mode: 0644]
libs/liblz4/Config.in [new file with mode: 0644]
libs/liblz4/Makefile
libs/liblz4/patches/010-utime.patch [new file with mode: 0644]
libs/libmcrypt/Makefile
libs/libmms/Makefile
libs/libmodbus/Makefile
libs/libmodbus/patches/0001-Fixed-MODBUS_GET_-macros-in-case-of-negative-values.patch [new file with mode: 0644]
libs/libmodbus/patches/0001-Only-set-SER_RS485_ENABLED-bit-of-existing-RS485-set.patch [deleted file]
libs/libmodbus/patches/0002-Oops-fix-OR-on-RS485-settings-1c5d969.patch [deleted file]
libs/libmstch/Makefile
libs/libnatpmp/Makefile
libs/libnatpmp/patches/001-install_declspec.patch [deleted file]
libs/libnatpmp/patches/010-cmake.patch [new file with mode: 0644]
libs/libnetconf2/Makefile
libs/libnetconf2/patches/020-openssl-deprecated.patch [new file with mode: 0644]
libs/libnetfilter-acct/Makefile
libs/libogg/Makefile
libs/liboping/Makefile
libs/libp11/Makefile
libs/libpbc/Makefile
libs/libpbc/patches/010-pass-cflags.patch [new file with mode: 0644]
libs/libplist/Makefile
libs/libpng/Makefile
libs/libradiotap/Makefile [new file with mode: 0644]
libs/libre2/Makefile
libs/libredblack/Makefile
libs/librouteros/Makefile [new file with mode: 0644]
libs/librsocket-cpp/Makefile
libs/librsocket-cpp/patches/100-fix-momit-leaf-frame-pointer-error.patch [deleted file]
libs/librsocket-cpp/patches/101-do-not-use-gold.patch
libs/librsocket-cpp/patches/102-gcc9.patch [new file with mode: 0644]
libs/librsocket-cpp/patches/103-boost.patch [new file with mode: 0644]
libs/libseccomp/Makefile
libs/libshout/Makefile
libs/libshout/patches/120-vorbis-c.patch
libs/libshout/patches/140-no_example_doc_win32.patch [deleted file]
libs/libshout/patches/150-openssl-1.1.patch [deleted file]
libs/libsigar/Makefile
libs/libsigar/patches/010-rindex.patch [new file with mode: 0644]
libs/libsigar/patches/020-sysmacros.patch [new file with mode: 0644]
libs/libsigc++/Makefile [deleted file]
libs/libsndfile/Makefile
libs/libsodium/Makefile
libs/libsoxr/Makefile
libs/libsoxr/patches/020-pkgconfig.patch [new file with mode: 0644]
libs/libssh/Makefile
libs/libssh2/Makefile
libs/libssh2/patches/01-fix-acinclude-m4.patch [deleted file]
libs/libssh2/patches/02-openssl-deprecated.patch [deleted file]
libs/libtalloc/Makefile
libs/libtasn1/Makefile
libs/libtins/Makefile
libs/libtirpc/Makefile
libs/libtirpc/patches/010-b-functions.patch [new file with mode: 0644]
libs/libtorrent/Makefile
libs/libtorrent/patches/010-usleep.patch [new file with mode: 0644]
libs/libtorrent/patches/100-fix_cross_compile.patch [deleted file]
libs/libtorrent/patches/110-openssl-1.1.patch [deleted file]
libs/libudev-fbsd/Makefile
libs/libuecc/Makefile
libs/libugpio/Makefile
libs/libuhttpd/Makefile
libs/libuhttpd/patches/001-fix-find-lua.patch [deleted file]
libs/libupm/Makefile
libs/libupm/patches/001-version.patch
libs/libupm/patches/004-uint8_t.patch [new file with mode: 0644]
libs/libupnp/Makefile
libs/libupnpp/Makefile
libs/liburcu/Makefile
libs/libusbmuxd/Makefile
libs/libuv/Makefile
libs/libuwifi/Makefile [new file with mode: 0644]
libs/libuwifi/patches/500-ccan-includes.patch [new file with mode: 0644]
libs/libuwsc/Makefile
libs/libv4l/Makefile
libs/libv4l/patches/020-add-missing-includes.patch
libs/libv4l/patches/030-getsubopt.patch
libs/libvorbis/Makefile
libs/libvpx/Makefile
libs/libwangle/Makefile
libs/libwangle/patches/010-c++14.patch [new file with mode: 0644]
libs/libwebp/Makefile [new file with mode: 0644]
libs/libxml2/Makefile
libs/libxslt/Makefile
libs/libxslt/patches/101-fix-cve-2019-13117.patch [new file with mode: 0644]
libs/libxslt/patches/102-fix-cve-2019-13118.patch [new file with mode: 0644]
libs/libyang/Makefile
libs/lmdb/Makefile [new file with mode: 0644]
libs/lmdb/patches/010-fix-makefile.patch [new file with mode: 0644]
libs/lmdb/src/liblmdb.pc [new file with mode: 0644]
libs/log4cplus/Makefile
libs/lttng-ust/Makefile
libs/measurement-kit/Makefile
libs/measurement-kit/patches/003-fix-openssl-depredecated-api.patch [deleted file]
libs/measurement-kit/patches/010-nextafter.patch [new file with mode: 0644]
libs/mxml/Makefile
libs/neon/Makefile
libs/newt/Makefile
libs/nspr/Makefile
libs/nspr/patches/001-Makefile.in_rm_BUILD_STRING_and_BUILD_TIME.patch
libs/nspr/patches/002-Add-ARC-support.patch [deleted file]
libs/nspr/patches/002-native_and_musl_fix.patch [new file with mode: 0644]
libs/nspr/patches/003-native_and_musl_fix.patch [deleted file]
libs/nss/Makefile
libs/nss/patches/010-nanosleep.patch [new file with mode: 0644]
libs/oniguruma/Makefile
libs/opencv/Makefile
libs/opencv/patches/010-fix-url.patch [deleted file]
libs/opencv/patches/010-uclibc-ng.patch [new file with mode: 0644]
libs/opencv/patches/020-l_tmpnam.patch [new file with mode: 0644]
libs/openldap/Makefile
libs/openldap/patches/800-implicit.patch [new file with mode: 0644]
libs/opus/Makefile
libs/p11-kit/Makefile
libs/pcre/Makefile
libs/pcre2/Makefile
libs/poco/Makefile
libs/postgresql/Makefile
libs/postgresql/patches/001-configure_fixes.patch
libs/protobuf-c/Makefile
libs/protobuf-c/patches/001-t-generated-code2-cxx-generate-packed-data-fix.patch [deleted file]
libs/protobuf-c/patches/010-pkgconfig.patch [new file with mode: 0644]
libs/protobuf/Makefile
libs/protobuf/patches/010-rpath.patch [new file with mode: 0644]
libs/psqlodbc/Makefile
libs/pthsem/Makefile
libs/qrencode/Makefile
libs/redis/Makefile [new file with mode: 0644]
libs/redis/files/redis.init [new file with mode: 0755]
libs/redis/patches/020-fix-atomicvar.patch [new file with mode: 0644]
libs/redis/patches/030-fix-uclibc-compilation.patch [new file with mode: 0644]
libs/rxtx/Makefile
libs/sbc/Makefile
libs/serdisplib/Makefile [new file with mode: 0644]
libs/serdisplib/patches/001-fix-static-libary-build.patch [new file with mode: 0644]
libs/serdisplib/patches/002-allow-1bpp-framebuffer.patch [new file with mode: 0644]
libs/slang2/Makefile
libs/speex/Makefile
libs/speexdsp/Makefile
libs/sqlite3/Makefile
libs/sqlite3/patches/01-sqlite-arm-endian.patch [deleted file]
libs/tdb/Makefile
libs/unixodbc/Makefile
libs/vips/Makefile
libs/xmlrpc-c/Makefile
libs/xmlrpc-c/patches/001-config.mk.in.patch [deleted file]
libs/xmlrpc-c/patches/002-automake-compat.patch [deleted file]
libs/xmlrpc-c/patches/010-nanosleep.patch [new file with mode: 0644]
libs/yajl/Makefile
libs/yaml/Makefile
libs/zmq/Makefile
libs/zmq/patches/010-disable_pedantic_on_linux_with_ulibc++.patch [deleted file]
libs/zmq/patches/020-map_with_const_string_with_ublic++.patch
libs/zmq/patches/050-nanosleep.patch [new file with mode: 0644]
mail/bogofilter/Makefile
mail/dovecot/Config.in [new file with mode: 0644]
mail/dovecot/Makefile
mail/dovecot/patches/001-configure_in.patch
mail/dovecot/patches/050-fix-dovecot-config-for-cross-compile.patch
mail/dovecot/patches/100-openssl-deprecated.patch
mail/dovecot/patches/110-openssl-engine.patch
mail/mailman/Makefile
mail/msmtp-scripts/Makefile
mail/msmtp-scripts/files/msmtpq-ng-mta.init
mail/msmtp-scripts/files/msmtpq-ng-mta.rc [new file with mode: 0644]
mail/msmtp-scripts/files/msmtpq-ng.rc
mail/msmtp/Makefile
mail/mutt/Makefile
mail/opendkim/Makefile
mail/opendkim/patches/020-uclibc.patch [new file with mode: 0644]
mail/pigeonhole/Makefile
mail/postfix/Makefile
mail/sendmail/Makefile
mail/ssmtp/Makefile
multimedia/crtmpserver/Makefile
multimedia/ffmpeg/Makefile
multimedia/ffmpeg/patches/010-pkgconfig.patch [new file with mode: 0644]
multimedia/ffmpeg/patches/020-ffmpeg-fix-build-with-fdk-aac-2.0.patch [new file with mode: 0644]
multimedia/ffmpeg/patches/ffmpeg-fix-build-with-fdk-aac-2.0.patch [deleted file]
multimedia/gphoto2/Makefile
multimedia/graphicsmagick/Makefile
multimedia/grilo-plugins/Makefile
multimedia/gst1-plugins-base/Makefile
multimedia/gst1-plugins-good/Makefile
multimedia/gstreamer1/Makefile
multimedia/imagemagick/Makefile [new file with mode: 0644]
multimedia/lcdgrilo/Makefile
multimedia/lcdgrilo/patches/020-vala.patch [new file with mode: 0644]
multimedia/minisatip/Makefile [new file with mode: 0644]
multimedia/minisatip/files/minisatip.init [new file with mode: 0644]
multimedia/mjpg-streamer/Config.in [deleted file]
multimedia/mjpg-streamer/Makefile
multimedia/motion/Makefile
multimedia/v4l2rtspserver/Makefile
multimedia/youtube-dl/Makefile
net/Netopeer2/Makefile
net/Netopeer2/patches/010-openssl-deprecated.patch [new file with mode: 0644]
net/acme/Makefile
net/adblock/Makefile
net/adblock/files/README.md
net/adblock/files/adblock.conf
net/adblock/files/adblock.init
net/adblock/files/adblock.mail [new file with mode: 0755]
net/adblock/files/adblock.notify [deleted file]
net/adblock/files/adblock.service [new file with mode: 0755]
net/adblock/files/adblock.sh
net/aircrack-ng/Makefile
net/apcupsd/Makefile
net/apfree-wifidog/Makefile
net/apfree-wifidog/files/wifidogx.conf
net/apfree-wifidog/files/wifidogx.init
net/apfree-wifidog/patches/010-openssl-deprecated.patch [new file with mode: 0644]
net/apinger/Makefile
net/apinger/patches/001-autoreconf.patch [deleted file]
net/apinger/patches/002-run_as_user.patch
net/apinger/patches/003-no_docs.patch
net/apinger/patches/010-poll.patch [new file with mode: 0644]
net/aria2/Makefile
net/ariang/Makefile
net/atftp/Makefile
net/banip/Makefile
net/banip/files/README.md
net/banip/files/banip.conf
net/banip/files/banip.hotplug
net/banip/files/banip.init
net/banip/files/banip.service [new file with mode: 0755]
net/banip/files/banip.sh
net/bcp38/Makefile
net/beanstalkd/Makefile
net/bfdd/Makefile [new file with mode: 0644]
net/bfdd/files/bfdd.init [new file with mode: 0644]
net/bfdd/files/bfdd.template.json [new file with mode: 0644]
net/bfdd/patches/002-ipv6_musl_fix.patch [new file with mode: 0644]
net/bind/Makefile
net/bind/patches/002-continue-if-yield-instruction-is-missing.patch [deleted file]
net/bitlbee/Makefile
net/bitlbee/patches/010-openssl-1.1-compatibility.patch [deleted file]
net/bridge-utils/Makefile
net/cgi-io/Makefile
net/cgi-io/src/main.c
net/chrony/Makefile
net/cifs-utils/Makefile
net/cifsd-tools/Makefile [new file with mode: 0644]
net/cifsd-tools/files/cifsd.config [new file with mode: 0644]
net/cifsd-tools/files/cifsd.config.example [new file with mode: 0644]
net/cifsd-tools/files/cifsd.init [new file with mode: 0644]
net/cifsd-tools/files/smb.conf.help [new file with mode: 0644]
net/cifsd-tools/files/smb.conf.template [new file with mode: 0644]
net/clamav/Makefile
net/clamav/patches/002-Avoid-libxml-checks-if-disable-xml-is-used.patch [new file with mode: 0644]
net/coova-chilli/Config.in
net/coova-chilli/Makefile
net/coova-chilli/files/chilli.config
net/coova-chilli/files/chilli.init
net/coova-chilli/patches/300-openssl-deprecated.patch [new file with mode: 0644]
net/coova-chilli/patches/400-wolfssl.patch [new file with mode: 0644]
net/coova-chilli/patches/500-redir.patch [new file with mode: 0644]
net/cshark/Makefile
net/davfs2/Makefile
net/dcwifi/README.md [new file with mode: 0644]
net/dcwifi/dcstad/Makefile [new file with mode: 0644]
net/dcwifi/dcstad/patches/01_replace_bzero.patch [new file with mode: 0644]
net/dcwifi/dcwapd/Makefile [new file with mode: 0644]
net/dcwifi/dcwapd/files/dcwapd.inc [new file with mode: 0644]
net/dcwifi/dcwapd/files/dcwapd.init.d [new file with mode: 0755]
net/dcwifi/dcwapd/files/dcwapd.uci [new file with mode: 0644]
net/dcwifi/dcwapd/files/start_dcwapd.sh [new file with mode: 0755]
net/dcwifi/dcwapd/files/stop_dcwapd.sh [new file with mode: 0755]
net/dcwifi/dcwapd/patches/01_add_uci_config_provider.patch [new file with mode: 0644]
net/dcwifi/dcwapd/patches/02_use_uci_config_provider.patch [new file with mode: 0644]
net/dcwifi/dcwapd/patches/03_add_uci_config_provider_to_Makefile.patch [new file with mode: 0644]
net/dcwifi/dcwapd/patches/04_uclibc++_fixes.patch [new file with mode: 0644]
net/dcwifi/dcwapd/patches/05_replace_bzero.patch [new file with mode: 0644]
net/dcwifi/libdcwproto/Makefile [new file with mode: 0644]
net/dcwifi/libdcwproto/patches/01_replace_bzero.patch [new file with mode: 0644]
net/dcwifi/libdcwsocket/Makefile [new file with mode: 0644]
net/dcwifi/libdcwsocket/patches/01_replace_bzero.patch [new file with mode: 0644]
net/dcwifi/libdcwsocket/patches/02_fix_storage_size_error.patch [new file with mode: 0644]
net/dcwifi/macremapper/Makefile [new file with mode: 0644]
net/dcwifi/macremapper/patches/01_fix_nf_hooks.patch [new file with mode: 0644]
net/dcwifi/mrmctl/Makefile [new file with mode: 0644]
net/dcwifi/mrmctl/patches/01_replace_bzero.patch [new file with mode: 0644]
net/ddns-scripts/Makefile
net/ddns-scripts/files/dynamic_dns_functions.sh
net/ddns-scripts/files/services
net/ddns-scripts/files/services_ipv6
net/ddns-scripts/files/update_cloudflare_com_v4.sh
net/dhcpcd/Makefile
net/dnscrypt-proxy/Makefile
net/dnscrypt-proxy/files/dnscrypt-proxy.init
net/dnscrypt-proxy/files/dnscrypt-resolvers.csv
net/dnscrypt-proxy/patches/010-internal.patch [new file with mode: 0644]
net/dnscrypt-proxy2/Makefile [new file with mode: 0644]
net/dnscrypt-proxy2/files/blacklist.txt [new file with mode: 0644]
net/dnscrypt-proxy2/files/dnscrypt-proxy.init [new file with mode: 0644]
net/dnsdist/Makefile
net/dnstop/Makefile [new file with mode: 0644]
net/dnstop/patches/100-fix_udphdr_error.patch [new file with mode: 0644]
net/dynapoint/Makefile
net/etherwake-nfqueue/Makefile [new file with mode: 0644]
net/etherwake-nfqueue/README.md [new file with mode: 0644]
net/etherwake-nfqueue/files/etherwake-nfqueue.config [new file with mode: 0644]
net/etherwake-nfqueue/files/etherwake-nfqueue.init [new file with mode: 0644]
net/etherwake/Makefile
net/etherwake/patches/100-no_ether_hostton.patch [deleted file]
net/fakeidentd/Makefile
net/fastd/Makefile
net/fastd/patches/0001-resolve-fix-segmentation-fault-with-musl-1.1.20.patch [new file with mode: 0644]
net/fastd/patches/0002-doc-examples-openwrt-fix-init-script-wasn-t-working-.patch [new file with mode: 0644]
net/fossil/Makefile [deleted file]
net/fossil/files/fossil.config [deleted file]
net/fossil/files/fossil.init [deleted file]
net/fossil/patches/001-no_https.patch [deleted file]
net/freeradius3/Makefile
net/frp/Makefile [new file with mode: 0644]
net/frp/files/frpc.config [new file with mode: 0644]
net/frp/files/frpc.init [new file with mode: 0644]
net/frp/files/frps.config [new file with mode: 0644]
net/frp/files/frps.init [new file with mode: 0644]
net/frr/Makefile [new file with mode: 0644]
net/frr/files/daemons [new file with mode: 0644]
net/frr/files/frr [new file with mode: 0644]
net/frr/files/frr.conf [new file with mode: 0644]
net/frr/files/frrcommon.sh [new file with mode: 0644]
net/frr/files/watchfrr.sh [new file with mode: 0644]
net/frr/patches/099-redefine_ethhdr.patch [new file with mode: 0644]
net/fwknop/Makefile
net/geth/Makefile
net/geth/patches/010-crypto-bn256-cloudflare-pull-in-upstream-fix-for-Go-.patch [deleted file]
net/git/Makefile
net/gitolite/Makefile
net/gnunet-secushare/Makefile
net/gnunet/Makefile
net/gnunet/files/gnunet-gns-flat.defaults
net/gnurl/Makefile
net/haproxy/Makefile
net/haproxy/files/haproxy.cfg
net/haproxy/files/haproxy.hotplug
net/haproxy/files/haproxy.init
net/haproxy/get-latest-patches.sh
net/haproxy/patches/000-BUG-MINOR-http-Call-stream_inc_be_http_req_ctr-only-one-time-per-request.patch [deleted file]
net/haproxy/patches/000-BUG-MINOR-stats-Add-a-missing-break-in-a-switch-statement.patch [new file with mode: 0644]
net/haproxy/patches/001-BUG-MEDIUM-spoe-arg-len-encoded-in-previous-frag-frame-but-len-changed.patch [deleted file]
net/haproxy/patches/001-OPENWRT-add-uclibc-support.patch [new file with mode: 0644]
net/haproxy/patches/002-MINOR-spoe-Use-the-sample-context-to-pass-frag_ctx-info-during-encoding.patch [deleted file]
net/haproxy/patches/002-OPENWRT-openssl-deprecated.patch [new file with mode: 0644]
net/haproxy/patches/003-DOC-contrib-modsecurity-Typos-and-fix-the-reject-example.patch [deleted file]
net/haproxy/patches/004-BUG-MEDIUM-contrib-modsecurity-If-host-header-is-NULL-dont-try-to-strdup-it.patch [deleted file]
net/haproxy/patches/005-MINOR-examples-Use-right-locale-for-the-last-changelog-date-in-haproxy-spec.patch [deleted file]
net/haproxy/patches/006-BUG-MAJOR-map-acl-real-fix-segfault-during-show-map-acl-on-CLI.patch [deleted file]
net/haproxy/patches/007-BUG-MEDIUM-listener-Fix-how-unlimited-number-of-consecutive-accepts-is-handled.patch [deleted file]
net/haproxy/patches/008-MINOR-config-Test-validity-of-tune-maxaccept-during-the-config-parsing.patch [deleted file]
net/haproxy/patches/009-CLEANUP-config-Dont-alter-listener--maxaccept-when-nbproc-is-set-to-1.patch [deleted file]
net/haproxy/patches/010-MINOR-threads-Implement-HA_ATOMIC_LOAD.patch [deleted file]
net/haproxy/patches/011-BUG-MEDIUM-port_range-Make-the-ring-buffer-lock-free.patch [deleted file]
net/haproxy/patches/012-deprecated-openssl.patch [deleted file]
net/hcxdumptool/Makefile [new file with mode: 0644]
net/hcxtools/Makefile [new file with mode: 0644]
net/horst/Makefile
net/htpdate/Makefile
net/https-dns-proxy/Makefile
net/i2pd/Makefile
net/i2pd/files/i2pd.config
net/i2pd/files/i2pd.init
net/i2pd/patches/config.patch [new file with mode: 0644]
net/ibrdtn-tools/Makefile
net/ibrdtnd/Makefile
net/ibrdtnd/patches/030-openssl-deprecated.patch [new file with mode: 0644]
net/inadyn/Makefile
net/inadyn/patches/010-openssl-deprecated.patch [deleted file]
net/iodine/Makefile
net/iotivity/Makefile
net/ipsec-tools/Makefile [deleted file]
net/ipsec-tools/files/functions.sh [deleted file]
net/ipsec-tools/files/p1client-down [deleted file]
net/ipsec-tools/files/p1client-up [deleted file]
net/ipsec-tools/files/racoon [deleted file]
net/ipsec-tools/files/racoon.init [deleted file]
net/ipsec-tools/files/vpnctl [deleted file]
net/ipsec-tools/patches/001-ipsec-tools-def-psk.patch [deleted file]
net/ipsec-tools/patches/001-no_libfl.patch [deleted file]
net/ipsec-tools/patches/002-patch8-utmp.patch [deleted file]
net/ipsec-tools/patches/003-microsoft-fqdn-in-main.patch [deleted file]
net/ipsec-tools/patches/005-isakmp-fix.patch [deleted file]
net/ipsec-tools/patches/006-linux-3.7-compat.patch [deleted file]
net/ipsec-tools/patches/007-force_have_policy_fwd.patch [deleted file]
net/ipsec-tools/patches/008-racoon-fix_dereference_crash.patch [deleted file]
net/ipsec-tools/patches/009-musl-compat.patch [deleted file]
net/ipsec-tools/patches/010-CVE-2016-10396.patch [deleted file]
net/ipsec-tools/patches/012-fix-implicit-int.patch [deleted file]
net/ipsec-tools/patches/015-openssl-1.1.patch [deleted file]
net/ipsec-tools/patches/020-openssl-deprecated.patch [deleted file]
net/ipvsadm/Makefile
net/irssi/Makefile
net/isc-dhcp/Makefile
net/jool/Makefile
net/jool/patches/010-Add-support-for-kernel-4.17.patch [deleted file]
net/jool/patches/010-musl.patch [new file with mode: 0644]
net/jool/patches/020-packet-rename-offset_to_ptr-to-skb_offset_to_ptr-to-.patch [deleted file]
net/kcptun/Makefile [new file with mode: 0644]
net/kcptun/files/kcptun-c.conf [new file with mode: 0644]
net/kcptun/files/kcptun-c.init [new file with mode: 0644]
net/kcptun/files/kcptun-s.conf [new file with mode: 0644]
net/kcptun/files/kcptun-s.init [new file with mode: 0644]
net/kea/Makefile
net/kea/patches/010-openssl-deprecated.patch [new file with mode: 0644]
net/keepalived/Makefile
net/keepalived/files/keepalived.init
net/kismet/Makefile
net/knot/Makefile
net/knxd/Makefile
net/kplex/Makefile
net/krb5/Makefile
net/lcdringer/Makefile
net/lftp/Makefile
net/libndp/Makefile
net/libreswan/Makefile
net/libreswan/patches/000-dh31-auto-detect.patch [new file with mode: 0644]
net/libreswan/patches/001-move_kernel_klips_to_mk_kernel.mk.patch [deleted file]
net/libreswan/patches/002-cripple_klips_klips_kernel_rules.patch [deleted file]
net/libreswan/patches/010-nanosleep.patch [new file with mode: 0644]
net/lighttpd/Makefile
net/linknx/Makefile
net/linknx/patches/010-iconv.patch [new file with mode: 0644]
net/lksctp-tools/Makefile
net/lksctp-tools/patches/010-build-fix-netinet-sctp.h-not-to-be-installed.patch [new file with mode: 0644]
net/lora-gateway-hal/Makefile
net/lynx/Makefile
net/mac-telnet/Makefile
net/mdnsresponder/Makefile
net/mdnsresponder/patches/001-cross_compile.patch [deleted file]
net/mdnsresponder/patches/010-uclibc.patch [new file with mode: 0644]
net/mdnsresponder/patches/100-linux_fixes.patch [deleted file]
net/mdnsresponder/patches/120-reproducible-builds.patch [deleted file]
net/memcached/Makefile
net/mini_snmpd/Makefile
net/mini_snmpd/files/mini_snmpd.init
net/miniupnpc/Makefile
net/miniupnpc/patches/100-no-fPIC.patch
net/miniupnpc/patches/300-add-listdevices-to-cmake.patch [deleted file]
net/miniupnpd/Makefile
net/mosh/Makefile [new file with mode: 0644]
net/mosh/patches/010-ffs.patch [new file with mode: 0644]
net/mosquitto/Makefile
net/mosquitto/patches/901-fix-openssl-ui.patch [deleted file]
net/mosquitto/patches/902-fix-engine-guards.patch [deleted file]
net/mstpd/Config.in [new file with mode: 0644]
net/mstpd/Makefile [new file with mode: 0644]
net/mstpd/files/etc/init.d/mstpd.init [new file with mode: 0644]
net/mstpd/files/sbin/bridge-stp [new file with mode: 0644]
net/mtr/Makefile
net/mwan3/Makefile
net/mwan3/files/etc/config/mwan3
net/mwan3/files/etc/hotplug.d/iface/15-mwan3
net/mwan3/files/etc/hotplug.d/iface/16-mwan3
net/mwan3/files/etc/uci-defaults/mwan3-migrate-flush_conntrack [new file with mode: 0644]
net/mwan3/files/lib/mwan3/mwan3.sh
net/mwan3/files/usr/libexec/rpcd/mwan3
net/mwan3/files/usr/sbin/mwan3track
net/nbd/Makefile
net/net-snmp/Makefile
net/net-snmp/files/snmpd.init
net/netatalk/Makefile
net/netcat/Makefile
net/netifyd/Makefile
net/netifyd/README.md
net/netperf/Makefile
net/nfs-kernel-server/Makefile
net/nfs-kernel-server/patches/102-uclibc-ns-maxmsg.patch [new file with mode: 0644]
net/nginx/Makefile
net/nginx/files-luci-support/luci_nginx.conf
net/nginx/files-luci-support/luci_nginx_ssl.conf
net/ngircd/Makefile
net/nlbwmon/Makefile
net/nmap/Makefile
net/noddos/Makefile
net/noddos/patches/040-openssl-deprecated.patch [new file with mode: 0644]
net/nsd/Makefile
net/nsd/patches/010-musl.patch [new file with mode: 0644]
net/nsd/patches/020-openssl.patch [new file with mode: 0644]
net/ntpd/Makefile
net/ntpd/files/ntpdate.init
net/ntripcaster/Makefile
net/ntripclient/Makefile
net/ntripserver/Makefile
net/nut/Makefile
net/nut/patches/010-libgd-pkgconfig.patch [new file with mode: 0644]
net/obfs4proxy/Makefile
net/ocserv/Makefile
net/ola/Makefile
net/openconnect/Makefile
net/openconnect/README
net/openconnect/files/openconnect.sh
net/openconnect/patches/0001-Fix-compilation-with-libp11-version-0.4.7.patch [deleted file]
net/openfortivpn/Makefile [new file with mode: 0644]
net/openfortivpn/files/openfortivpn.config [new file with mode: 0644]
net/openfortivpn/files/openfortivpn.init [new file with mode: 0644]
net/opennhrp/Makefile [deleted file]
net/opennhrp/files/opennhrp.init [deleted file]
net/opennhrp/patches/100-musl-compat.patch [deleted file]
net/openssh/Makefile
net/openssh/patches/010-musl-stdio.patch [new file with mode: 0644]
net/openvswitch/Makefile
net/openvswitch/patches/0001-netdev-linux-Let-interface-flag-survive-internal-por.patch
net/openvswitch/patches/0002-python-separate-host-target-python-for-cross-compile.patch
net/openvswitch/patches/0003-ovs-lib-fix-install_dir.patch
net/openvswitch/patches/0004-build-disable-building-tests.patch
net/openvswitch/patches/0005-datapath-conntrack-fix-include-for-IP6_DEFRAG_CONNTR.patch [deleted file]
net/ostiary/Makefile [new file with mode: 0644]
net/ostiary/files/ostiaryd.init [new file with mode: 0755]
net/p910nd/Makefile
net/p910nd/files/p910nd.config
net/p910nd/files/p910nd.hotplug [new file with mode: 0644]
net/p910nd/files/p910nd.init
net/pagekitec/Makefile
net/pdns-recursor/Makefile [new file with mode: 0644]
net/pdns-recursor/files/pdns-recursor.init [new file with mode: 0644]
net/pdns-recursor/files/recursor.conf-dist [new file with mode: 0644]
net/pdns-recursor/patches/100-disable-recursor.conf-dist.patch [new file with mode: 0644]
net/pdns/Makefile [new file with mode: 0644]
net/pdns/files/pdns.conf-dist [new file with mode: 0644]
net/pdns/files/pdns.init [new file with mode: 0644]
net/pdns/patches/100-pdns-disable-pdns.conf-dist.patch [new file with mode: 0644]
net/pen/Makefile
net/phantap/Makefile [new file with mode: 0644]
net/pingcheck/Makefile
net/pixiewps/Makefile
net/polipo/Makefile
net/pptpd/Makefile
net/privoxy/Makefile
net/prosody/Makefile
net/proxychains-ng/Makefile [new file with mode: 0644]
net/quassel-irssi/Makefile
net/quassel-irssi/patches/002-use-cc-var.patch
net/quassel-irssi/patches/003-use-pkgconfig-ldflags-quasselc.patch
net/quassel-irssi/patches/010-Get-compatible-with-potential-irssi-abi-8-and-drop-p.patch
net/radicale/Makefile
net/radicale/files/radicale.upgrade [deleted file]
net/radicale2/Makefile
net/radsecproxy/Makefile
net/ratechecker/Makefile
net/reaver/Makefile
net/remserial/Makefile
net/rp-pppoe/Makefile
net/rsync/Makefile
net/rsyslog/Makefile
net/rtorrent/Makefile
net/rtorrent/patches/100-fix-cross_compile.patch [deleted file]
net/rtorrent/patches/130-usleep.patch [new file with mode: 0644]
net/samba4/Makefile
net/samba4/files/samba.init
net/samba4/patches/100-do-not-import-target-module-while-cross-compile.patch [deleted file]
net/samba4/patches/102-samba-4.8.2-unbundle-libreadline.patch [deleted file]
net/samba4/patches/102-samba-4.8.5-unbundle-libbsd.patch [new file with mode: 0644]
net/samba4/patches/103-samba-4.8.5-unbundle-libbsd.patch [deleted file]
net/samba4/patches/103-tmsize-overflow-fix.patch [new file with mode: 0644]
net/samba4/patches/104-tmsize-overflow-check.patch [deleted file]
net/scapy/Makefile
net/seafile-seahub/Makefile
net/seafile-seahub/patches/020-Makefile-fixes.patch
net/seafile-server/Makefile
net/ser2net/Makefile
net/shadowsocks-libev/Makefile
net/shorewall-core/Makefile
net/shorewall-lite/Makefile
net/shorewall/Makefile
net/shorewall6-lite/Makefile
net/shorewall6/Makefile
net/siit/Makefile
net/simple-adblock/Makefile
net/simple-adblock/files/README.md
net/simple-adblock/files/simple-adblock.conf
net/simple-adblock/files/simple-adblock.hotplug
net/simple-adblock/files/simple-adblock.init
net/smartsnmpd/Makefile
net/smartsnmpd/files/smartsnmpd.init
net/smartsnmpd/patches/010-2to3.patch [new file with mode: 0644]
net/smartsnmpd/patches/020-flags.patch [new file with mode: 0644]
net/snort/Makefile
net/snort3/Makefile
net/socat/Makefile
net/socat/patches/100-musl-compat.patch [deleted file]
net/socat/patches/100-usleep.patch [new file with mode: 0644]
net/softethervpn/Makefile
net/softethervpn/patches/001-Encrypt_set_default_RSA.patch [deleted file]
net/softethervpn/patches/103-noeucjp.patch
net/softethervpn/patches/105-nossl3.patch [deleted file]
net/softethervpn/patches/110-no-m64.patch
net/softethervpn/patches/120-openssl-deprecated.patch
net/softethervpn/patches/130-iconv.patch [new file with mode: 0644]
net/softethervpn/patches/140-openssl-header.patch [new file with mode: 0644]
net/softethervpn5/Makefile
net/softethervpn5/patches/001-musl-poll-fix.patch [new file with mode: 0644]
net/softethervpn5/patches/002-iconv-defines-fix.patch [new file with mode: 0644]
net/softethervpn5/patches/003-iconv-cmake-fix.patch [new file with mode: 0644]
net/softflowd/Makefile
net/softflowd/files/softflowd.init
net/softflowd/patches/010-bzero.patch [new file with mode: 0644]
net/spoofer/Makefile
net/sqm-scripts/Makefile
net/squid/Makefile
net/sshtunnel/Makefile
net/sslh/Makefile
net/sstp-client/Makefile
net/sstp-client/files/lib/netifd/proto/sstp.sh [new file with mode: 0755]
net/strongswan/Makefile
net/strongswan/patches/305-minimal_dh_plugin.patch
net/stubby/files/README.md
net/stunnel/Makefile
net/stunnel/files/stunnel.init
net/subversion/Makefile
net/switchdev-poller/Makefile [new file with mode: 0644]
net/switchdev-poller/files/switchdev-poller [new file with mode: 0755]
net/switchdev-poller/files/switchdev-poller.init [new file with mode: 0755]
net/sysrepo/Makefile
net/sysrepo/patches/001-add-generated-protobufc-files
net/sysrepo/patches/002-remove-buildtime-module-install
net/sysrepo/patches/004-disable-sysrepod-autostart
net/sysrepo/patches/005-fix-struct-ucred-define
net/sysrepo/patches/006-update-generated-protobufc-files
net/tcpproxy/Makefile
net/tcpreplay/Makefile
net/tgt/Makefile
net/tgt/files/tgt.config
net/tgt/files/tgt.init
net/tinc/Makefile
net/tinyproxy/Makefile
net/tor/Makefile
net/trafficshaper/Makefile
net/trafficshaper/files/etc/config/trafficshaper [deleted file]
net/trafficshaper/files/etc/init.d/trafficshaper [deleted file]
net/trafficshaper/files/trafficshaper.conf [new file with mode: 0644]
net/trafficshaper/files/trafficshaper.init [new file with mode: 0755]
net/transmission-web-control/Makefile
net/transmission/Makefile
net/transmission/files/transmission.init
net/transmission/files/transmission.sysctl
net/transmission/patches/050-https-portcheck.patch [deleted file]
net/transmission/patches/060-fix-tls-verify.patch [deleted file]
net/travelmate/Makefile
net/travelmate/files/README.md
net/travelmate/files/generic-user-pass.login [new file with mode: 0755]
net/travelmate/files/travelmate.conf
net/travelmate/files/travelmate.sh
net/travelmate/files/wifionice.login [new file with mode: 0755]
net/uanytun/Makefile
net/ulogd/Makefile
net/ulogd/patches/010-json-remote.patch [new file with mode: 0644]
net/ulogd/patches/020-fix-musl.patch [new file with mode: 0644]
net/ulogd/patches/030-ipfix-add.patch [new file with mode: 0644]
net/ulogd/patches/040-ipfix-template.patch [new file with mode: 0644]
net/umurmur/Makefile
net/unbound/Makefile
net/unbound/files/README.md
net/unbound/files/unbound.init
net/unbound/files/unbound.sh
net/unbound/files/unbound.uci
net/usbip/Makefile
net/uwsgi-cgi/Makefile
net/uwsgi-cgi/patches/020-uwsgiconfig-system-python3.patch [new file with mode: 0644]
net/vpnbypass/Makefile
net/wavemon/Makefile
net/wget/Makefile
net/wifidog-ng/Makefile
net/wifidog-ng/src/main.c
net/wifidog/Makefile
net/wifidog/patches/020-Modify-get-ip-from-iface-method.patch [new file with mode: 0644]
net/wifischedule/Makefile
net/xinetd/Makefile
net/xl2tpd/Makefile
net/xtables-addons/Makefile
net/xtables-addons/patches/002-build-support-for-Linux-4.15.patch [deleted file]
net/xtables-addons/patches/002-restore-support-for-Linux-4.14.patch [new file with mode: 0644]
net/xtables-addons/patches/003-build-add-support-for-Linux-4.18.patch [deleted file]
net/xtables-addons/patches/003-restore-support-for-Linux-4.9.patch [new file with mode: 0644]
net/xtables-addons/patches/100-add-rtsp-conntrack.patch
net/xtables-addons/patches/200-add-lua-packetscript.patch
net/xtables-addons/patches/300-geoip-endian-detection.patch [deleted file]
net/yaaw/Makefile [deleted file]
net/yggdrasil/Makefile
net/yggdrasil/files/yggdrasil.init
net/zerotier/Makefile
net/zerotier/files/etc/config/zerotier
net/zerotier/files/etc/init.d/zerotier
net/zerotier/patches/0001-find-miniupnpc.h-in-staging-directory.patch
net/zerotier/patches/0002-remove-pie.patch
net/zerotier/patches/0003-remove-arm32-conservative-CFLAGS.patch [new file with mode: 0644]
net/zerotier/patches/0004-accept-external-linker-flags.patch
net/zerotier/patches/0005-link-natpmp.patch [new file with mode: 0644]
net/znc/Makefile
sound/alsa-utils/Makefile
sound/alsa-utils/patches/100-uClibc-compat.patch
sound/alsa-utils/patches/101-disable-libsamplerate.patch
sound/forked-daapd/Makefile
sound/forked-daapd/patches/010-alsa.patch [new file with mode: 0644]
sound/madplay/Makefile
sound/mocp/Makefile
sound/mpc/Makefile
sound/mpd/Makefile
sound/mpg123/Makefile
sound/pulseaudio/Makefile
sound/pulseaudio/patches/010-also-include.patch [new file with mode: 0644]
sound/squeezelite/Makefile
sound/squeezelite/files/squeezelite.conf
sound/squeezelite/files/squeezelite.init
sound/upmpdcli/Makefile
sound/upmpdcli/files/upmpdcli.init
sound/upmpdcli/patches/100-Use-uint64_t-instead-of-u_int64_t.patch [deleted file]
utils/acpid/Makefile
utils/ap51-flash/Makefile
utils/at/Makefile
utils/attr/Makefile
utils/attr/patches/110-Replace-bzero-with-memset.patch [new file with mode: 0644]
utils/avrdude/Makefile
utils/avrdude/patches/110-ud-to-u.patch [new file with mode: 0644]
utils/bash/Makefile
utils/bigclown/bigclown-firmware-tool/Makefile [new file with mode: 0644]
utils/bigclown/bigclown-mqtt2influxdb/Makefile
utils/bigclown/bigclown-mqtt2influxdb/files/init
utils/bluez/Makefile
utils/bonnie++/Makefile
utils/btrfs-progs/Makefile
utils/btrfs-progs/files/btrfs-scan.init
utils/byobu/Makefile
utils/byobu/patches/002-fix-missing-tty-arm-serial-autolaunch.patch [deleted file]
utils/byobu/patches/002-fix-missing-tty.patch [new file with mode: 0644]
utils/byobu/patches/003-fix-missing-install.patch [deleted file]
utils/byobu/patches/005-monitor-overlay.patch
utils/byobu/patches/006-only-pgrep-services.patch [new file with mode: 0644]
utils/byobu/patches/006-pgrep-services.patch [deleted file]
utils/byobu/patches/007-count-dropbear-users.patch
utils/byobu/patches/008-no-gettext.patch [deleted file]
utils/byobu/patches/100-check-if-bashrc-exists.patch [deleted file]
utils/byobu/patches/101-fix-tmux-2.8-new-window.patch [deleted file]
utils/byobu/patches/102-ensure-disk-exists.patch [deleted file]
utils/byobu/patches/103-add-hostname-fallback.patch [deleted file]
utils/byobu/patches/104-add-custom-logo.patch [deleted file]
utils/byobu/patches/105-handle-processes-stderr.patch [deleted file]
utils/byobu/patches/106-fix-release-typo.patch [deleted file]
utils/byobu/patches/107-fix-SERVICES.patch [deleted file]
utils/byobu/patches/108-custom-updates-available.patch [deleted file]
utils/byobu/patches/109-add-whoami-fallback.patch [deleted file]
utils/byobu/patches/110-wifi-quality.patch [deleted file]
utils/byobu/patches/111-ensure-proc-mdstat-exists.patch [deleted file]
utils/byobu/patches/112-fix-session-regex.patch [deleted file]
utils/canutils/Makefile
utils/ccid/Makefile
utils/ccrypt/Makefile
utils/cgroupfs-mount/Makefile [new file with mode: 0644]
utils/cgroupfs-mount/files/cgroupfs-mount.init [new file with mode: 0644]
utils/cmdpad/Makefile
utils/cmdpad/patches/150-header.patch [new file with mode: 0644]
utils/collectd/Makefile
utils/collectd/files/collectd.init
utils/collectd/files/collectd.uci
utils/collectd/files/usr/share/collectd/plugin/apcups.json [new file with mode: 0644]
utils/collectd/files/usr/share/collectd/plugin/cpu.json
utils/collectd/files/usr/share/collectd/plugin/curl.json [new file with mode: 0644]
utils/collectd/files/usr/share/collectd/plugin/iptables.json [new file with mode: 0644]
utils/collectd/files/usr/share/collectd/plugin/logfile.json [new file with mode: 0644]
utils/collectd/files/usr/share/collectd/plugin/memory.json
utils/collectd/files/usr/share/collectd/plugin/network.json [new file with mode: 0644]
utils/collectd/patches/000-01-backport-upstream-remove-sensors-version-limit.patch [deleted file]
utils/collectd/patches/050-backport-modbus-little-endian.patch [deleted file]
utils/collectd/patches/051-Add-scale-and-shift-to-modbus-plugin.patch [deleted file]
utils/collectd/patches/052-correcting-all-the-wrongs.patch [deleted file]
utils/collectd/patches/053-Add-support-for-RS485-to-modbus-plugin.patch [deleted file]
utils/collectd/patches/100-rrdtool-add-rrasingle-option.patch
utils/collectd/patches/300-delay-first-read-cycle.patch
utils/collectd/patches/400-fix-olsrd-get-all.patch
utils/collectd/patches/600-fix-libmodbus-detection.patch
utils/collectd/patches/700-disable-sys-capability-check.patch
utils/collectd/patches/900-add-iwinfo-plugin.patch
utils/collectd/patches/920-fix-ping-droprate.patch [deleted file]
utils/collectd/patches/930-fix-lua-callback-registration.patch [deleted file]
utils/containerd/Makefile [new file with mode: 0644]
utils/coreutils/Makefile
utils/crconf/Makefile
utils/cryptsetup/Makefile
utils/dbus/Makefile
utils/device-observatory/Makefile
utils/dfu-util/Makefile
utils/digitemp/Makefile
utils/docker-ce/Config.in [new file with mode: 0644]
utils/docker-ce/Makefile [new file with mode: 0644]
utils/docker-ce/files/daemon.json [new file with mode: 0644]
utils/docker-ce/files/dockerd.init [new file with mode: 0644]
utils/docker-ce/patches/001-libdevmapper_name_fix.patch [new file with mode: 0644]
utils/domoticz/Makefile
utils/domoticz/patches/010-boost-170-fix.patch [deleted file]
utils/domoticz/patches/020-openssl-deprecated.patch [new file with mode: 0644]
utils/dosfstools/Makefile
utils/dosfstools/patches/0002-Switch-to-AC_CHECK_LIB-for-iconv-library-linking.patch [deleted file]
utils/dosfstools/patches/010-iconv.patch [new file with mode: 0644]
utils/dump1090/Makefile
utils/dump1090/files/dump1090.init
utils/ecdsautils/Makefile
utils/evtest/Makefile
utils/findutils/Makefile
utils/findutils/patches/010-sysmacros.patch [new file with mode: 0644]
utils/fio/Makefile
utils/fio/patches/010-mpcore.patch [deleted file]
utils/fish/Makefile
utils/flashrom/Makefile
utils/flashrom/patches/0002-fix-io-h-include.patch [deleted file]
utils/flashrom/patches/0003-ch341a_spi-avoid-deprecated-libusb-functions.patch
utils/flashrom/patches/010-add-arc.patch [new file with mode: 0644]
utils/fontconfig/Makefile
utils/gammu/Makefile
utils/gammu/patches/001-iconv-disabling-option.patch
utils/gammu/patches/002-no-fstack-protector.patch [deleted file]
utils/gammu/patches/003-cmake-cross-toolchain.patch
utils/gammu/patches/004-cmake_libdbi_optional.patch
utils/gammu/patches/020-select.patch [new file with mode: 0644]
utils/gddrescue/Makefile
utils/gddrescue/patches/010-fix-uclibcxx.patch [new file with mode: 0644]
utils/gkermit/Makefile
utils/gkermit/patches/010-musl.patch [new file with mode: 0644]
utils/gpsd/Makefile
utils/grep/Makefile
utils/gzip/Makefile
utils/haveged/Makefile
utils/haveged/files/haveged.init
utils/hfsprogs/Makefile
utils/hplip/Makefile
utils/hub-ctrl/Makefile
utils/i2c-tools/Makefile
utils/io/Makefile
utils/io/src/io.c
utils/joe/Makefile
utils/kmod/Makefile
utils/lcdproc/Makefile
utils/lcdproc/patches/110-in-outb.patch [new file with mode: 0644]
utils/less/Makefile
utils/libnetwork/Makefile [new file with mode: 0644]
utils/lm-sensors/Makefile
utils/logrotate/Makefile
utils/lrzsz/Makefile
utils/lvm2/Makefile
utils/lxc/Config.in
utils/lxc/Makefile
utils/macchanger/Makefile
utils/mariadb/Makefile
utils/mariadb/patches/100-fix_hostname.patch
utils/mariadb/patches/130-c11_atomics.patch
utils/mariadb/patches/140-mips-connect-unaligned.patch
utils/mariadb/patches/170-ppc-remove-glibc-dep.patch
utils/mariadb/patches/180-libedit.patch
utils/mc/Config.in
utils/mc/Makefile
utils/mg/Makefile
utils/mg/patches/001-cross_compile_openwrt.patch
utils/minicom/Makefile
utils/mmc-utils/Makefile
utils/mt-st/Makefile
utils/mt-st/patches/010-sysmacros.patch [new file with mode: 0644]
utils/nano/Makefile
utils/ntfs-3g/Makefile
utils/oath-toolkit/Makefile
utils/open2300/Makefile
utils/open2300/patches/001-crosscompile.patch [deleted file]
utils/openobex/Makefile
utils/opensc/Makefile
utils/owfs/Makefile
utils/pciutils/Makefile
utils/pcsc-lite/Makefile
utils/picocom/Makefile
utils/pigz/Makefile [new file with mode: 0644]
utils/pigz/patches/001.patch [new file with mode: 0644]
utils/powertop/Makefile
utils/powertop/patches/001-musl-fix-headers.patch [deleted file]
utils/procps-ng/Makefile
utils/prometheus-node-exporter-lua/Makefile
utils/prometheus-node-exporter-lua/files/usr/lib/lua/prometheus-collectors/ltq-dsl.lua
utils/prometheus-node-exporter-lua/files/usr/lib/lua/prometheus-collectors/openwrt.lua
utils/prometheus/Makefile
utils/prometheus/patches/001-update-fsnotify.patch [new file with mode: 0644]
utils/pservice/Makefile [new file with mode: 0644]
utils/pservice/README.md [new file with mode: 0644]
utils/pservice/files/pservice.config [new file with mode: 0644]
utils/pservice/files/pservice.init [new file with mode: 0755]
utils/qemu/Makefile
utils/qemu/patches/0005-slirp-ipreass-fix-use-after-free.patch [new file with mode: 0644]
utils/rng-tools/Makefile
utils/rrdtool1/Makefile
utils/rtklib/Makefile
utils/rtklib/patches/010-musl.patch [new file with mode: 0644]
utils/rtklib/patches/020-no-gfortran.patch [new file with mode: 0644]
utils/rtl-ais/Makefile
utils/rtl-ais/patches/010-musl.patch [new file with mode: 0644]
utils/runc/Makefile [new file with mode: 0644]
utils/sane-backends/Makefile
utils/screen/Makefile
utils/setserial/Makefile
utils/setserial/patches/020-musl.patch [new file with mode: 0644]
utils/shadow/Makefile
utils/sispmctl/Makefile
utils/slide-switch/Makefile
utils/smartmontools/Makefile
utils/squashfs-tools/Makefile
utils/squashfs-tools/patches/0005-mksquashfs-unsquashfs-fix-compilation-with-glibc-2.2.patch [new file with mode: 0644]
utils/stm32flash/Makefile
utils/swig/Makefile
utils/syncthing/Makefile [new file with mode: 0644]
utils/syncthing/files/etc/config/syncthing [new file with mode: 0644]
utils/syncthing/files/etc/init.d/syncthing [new file with mode: 0755]
utils/syncthing/files/etc/syncthing/index-v0.14.0.db [new symlink]
utils/sysstat/Makefile
utils/sysstat/patches/100-musl-compat.patch
utils/tang/Makefile
utils/tang/patches/010-makefile.patch [new file with mode: 0644]
utils/tang/patches/020-no-systemd.patch [new file with mode: 0644]
utils/tang/patches/030-readlink.patch [new file with mode: 0644]
utils/tang/patches/Makefile_am.patch [deleted file]
utils/tang/patches/rm-systemd-from-configure.patch [deleted file]
utils/tang/patches/use-readlink-in-tangd-update.patch [deleted file]
utils/tar/Makefile
utils/tcsh/Makefile
utils/tessdata/Makefile [new file with mode: 0644]
utils/tesseract/Makefile [new file with mode: 0644]
utils/tini/Makefile [new file with mode: 0644]
utils/tio/Makefile
utils/tmux/Makefile
utils/ttyd/Makefile
utils/unrar/Makefile
utils/usbmuxd/Makefile
utils/uvcdynctrl/Makefile
utils/uvcdynctrl/patches/010-iconv.patch [new file with mode: 0644]
utils/vim/Makefile
utils/vim/patches/003-CVE-2019-12735.patch [new file with mode: 0644]
utils/watchcat/files/watchcat.sh
utils/wifitoggle/Makefile
utils/wipe/Makefile [new file with mode: 0644]
utils/wipe/patches/001-ignore_git_version_hash_and_fix_release_version.patch [new file with mode: 0644]
utils/xz/Makefile
utils/ykpers/Makefile
utils/zile/Makefile
utils/zoneinfo/Makefile
utils/zstd/Makefile
utils/zstd/patches/010-uClibc-ng.patch [deleted file]
utils/zstd/patches/010-utime.patch [new file with mode: 0644]

index b3575b2066f2bed74272f55f56c293562ef555a5..274edb8e43df3a61bf16ded0b443ddd5b5e18074 100644 (file)
@@ -5,9 +5,12 @@ FROM debian:9
 # v1.0   - Initial version by Etienne Champetier
 # v1.0.1 - Run as non-root, add unzip, xz-utils
 # v1.0.2 - Add bzr
+# v1.0.3 - Verify usign signatures
+# v1.0.4 - Add support for Python3
 
 RUN apt update && apt install -y \
 build-essential \
+bzr \
 curl \
 jq \
 gawk \
@@ -16,13 +19,14 @@ git \
 libncurses5-dev \
 libssl-dev \
 python \
+python3 \
+signify-openbsd \
 subversion \
-bzr \
 time \
-wget \
-zlib1g-dev \
 unzip \
+wget \
 xz-utils \
+zlib1g-dev \
 && rm -rf /var/lib/apt/lists/*
 
 RUN useradd -c "OpenWrt Builder" -m -d /home/build -s /bin/bash build
@@ -40,3 +44,7 @@ RUN curl 'https://git.openwrt.org/?p=keyring.git;a=blob_plain;f=gpg/D52BBB6B.asc
 # OpenWrt Release Builder (18.06 Signing Key)
 RUN curl 'https://git.openwrt.org/?p=keyring.git;a=blob_plain;f=gpg/17E1CE16.asc' | gpg --import \
  && echo '6768C55E79B032D77A28DA5F0F20257417E1CE16:6:' | gpg --import-ownertrust
+
+# LEDE Build System (LEDE usign key for unattended build jobs)
+RUN curl 'https://git.openwrt.org/?p=keyring.git;a=blob_plain;f=usign/b5043e70f9a75cde' --create-dirs \
+ -o /home/build/usign/b5043e70f9a75cde
index 02a87146d91f19638bfbfc1fbc46913256cf358d..1114407976f0c13339bf7b95c8aabd30f9942b63 100644 (file)
@@ -2,7 +2,7 @@ version: 2.0
 jobs:
   build:
     docker:
-      - image: docker.io/openwrtorg/packages-cci:v1.0.2
+      - image: docker.io/openwrtorg/packages-cci:v1.0.4
     environment:
       - SDK_HOST: "downloads.openwrt.org"
       - SDK_PATH: "snapshots/targets/ath79/generic"
@@ -64,8 +64,28 @@ jobs:
           working_directory: ~/sdk
           command: |
              curl "https://$SDK_HOST/$SDK_PATH/sha256sums" -sS -o sha256sums
-             curl "https://$SDK_HOST/$SDK_PATH/sha256sums.asc" -sS -o sha256sums.asc
-             gpg --with-fingerprint --verify sha256sums.asc sha256sums
+             curl "https://$SDK_HOST/$SDK_PATH/sha256sums.asc" -fs -o sha256sums.asc || true
+             curl "https://$SDK_HOST/$SDK_PATH/sha256sums.sig" -fs -o sha256sums.sig || true
+             if [ ! -f sha256sums.asc ] && [ ! -f sha256sums.sig ]; then
+                 echo_red "Missing sha256sums signature files"
+                 exit 1
+             fi
+             [ ! -f sha256sums.asc ] || gpg --with-fingerprint --verify sha256sums.asc sha256sums
+             if [ -f sha256sums.sig ]; then
+                 VERIFIED=
+                 for KEY in ~/usign/*; do
+                     echo "Trying $KEY..."
+                     if signify-openbsd -V -q -p "$KEY" -x sha256sums.sig -m sha256sums; then
+                         echo "...verified"
+                         VERIFIED=1
+                         break
+                     fi
+                 done
+                 if [ -z "$VERIFIED" ]; then
+                     echo_red "Could not verify usign signature"
+                     exit 1
+                 fi
+             fi
              rsync -av "$SDK_HOST::downloads/$SDK_PATH/$SDK_FILE" .
              sha256sum -c --ignore-missing sha256sums
 
@@ -74,6 +94,11 @@ jobs:
           working_directory: ~/build_dir
           command: |
              tar Jxf ~/sdk/$SDK_FILE --strip=1
+             touch .config
+             make prepare-tmpinfo scripts/config/conf
+             ./scripts/config/conf --defconfig=.config Config.in
+             make prereq
+             rm .config
              cat > feeds.conf <<EOF
              src-git base https://github.com/openwrt/openwrt.git;$BRANCH
              src-link packages $HOME/openwrt_packages
@@ -81,13 +106,12 @@ jobs:
              EOF
              cat feeds.conf
              ./scripts/feeds update -a > /dev/null
-             ./scripts/feeds install -a > /dev/null
              make defconfig > /dev/null
              # enable BUILD_LOG
              sed -i 's/# CONFIG_BUILD_LOG is not set/CONFIG_BUILD_LOG=y/' .config
 
       - run:
-          name: Download source, check package, compile
+          name: Install & download source, check package, compile
           working_directory: ~/build_dir
           command: |
              set +o pipefail
@@ -99,6 +123,9 @@ jobs:
 
              echo_blue "=== Found new/modified packages: $PKGS"
              for PKG in $PKGS ; do
+                 echo_blue "===+ Install: $PKG"
+                 ./scripts/feeds install "$PKG"
+
                  echo_blue "===+ Download: $PKG"
                  make "package/$PKG/download" V=s
 
@@ -123,7 +150,11 @@ jobs:
 
              for PKG in $PKGS ; do
                  echo_blue "===+ Building: $PKG"
-                 make "package/$PKG/compile" -j3 V=s
+                 make "package/$PKG/compile" -j3 V=s || {
+                        RET=$?
+                        echo_red "===+ Building: $PKG failed, rebuilding with -j1 for human readable error log"
+                        make "package/$PKG/compile" -j1 V=s; exit $RET
+                 }
              done
 
       - store_artifacts:
index 73602ae64aea2f19d15c58e4f132fabb2c34345e..232baad1914fbc8376ca2501e4b8741c976f827b 100644 (file)
@@ -1,9 +1,8 @@
 Please make sure that the issue subject starts with `<package-name>: `
 
-This repo here is only for packages maintained in this repo.  For base packages residing in the same repo as the build system and maintained by core devs, please consider opening tickets there for more timely responses
+Also make sure that the package is maintained in this repository and not in base which should be submitted at https://bugs.openwrt.org or in the LuCI repository which should be submitted at https://github.com/openwrt/luci/issues.
 
- - OpenWrt base system: https://bugs.openwrt.org
- - Most LuCI packages: https://github.com/openwrt/luci/issues
+Issues related to releases below 18.06 and forks are not supported or maintained and will be closed.
 
 # Issue template (remove lines from top till here)
 
diff --git a/admin/backuppc/Makefile b/admin/backuppc/Makefile
new file mode 100644 (file)
index 0000000..56b62ec
--- /dev/null
@@ -0,0 +1,68 @@
+# Copyright (C) 2018 OpenWrt
+#
+# Ideas used from the backuppc packaging in Debian GNU/Linux
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=backuppc
+PKG_VERSION:=3.3.2
+PKG_RELEASE:=1
+
+PKG_SOURCE:=BackupPC-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=@SF/backuppc
+PKG_HASH:=fbade2c8d8039297e826a75d2c39d5ac9a6f66e0c84c0cf8c4cef0bcf64d2152
+PKG_BUILD_DIR:=$(BUILD_DIR)/BackupPC-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Carsten Wolff <carsten@wolffcarsten.de>
+PKG_LICENSE:=GPL-2.0-or-later
+PKG_LICENSE_FILES:=LICENSE
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/backuppc
+  SECTION:=admin
+  CATEGORY:=Administration
+  TITLE:=high-performance, enterprise-grade system for backing up PCs
+  URL:=https://sourceforge.net/projects/backuppc/
+  DEPENDS:=+perl +perl-www +perl-cgi +perlbase-digest +perlbase-compress +perlbase-archive +perlbase-data +perlbase-storable +perlbase-getopt +perl-file-rsyncp +openssh-client +tar +bzip2 +samba36-client +rsync +iputils-ping
+endef
+
+define Package/backuppc/description
+  BackupPC is a disk based backup system featuring a clever pooling scheme and
+  compression to minimize disk storage and disk I/O. It can use SMB, rsync or tar
+  to access the clients without any additional client software and offers a
+  powerful http/cgi user interface.
+endef
+
+define Build/Configure
+       true
+endef
+
+define Build/Compile
+       $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(TARGET_LDFLAGS) -Wall -o $(PKG_BUILD_DIR)/BackupPC_Admin ./files/setuidwrapper.c
+endef
+
+define Package/backuppc/install
+       $(INSTALL_DIR) $(strip $(1))/etc/init.d
+       $(INSTALL_BIN) ./files/backuppc.init $(strip $(1))/etc/init.d/backuppc
+       cd $(PKG_BUILD_DIR) && ./configure.pl --batch --html-dir-url=/backuppc/ \
+           --html-dir=/www/backuppc/ --cgi-dir=/www/cgi-bin/ --no-fhs --uid-ignore \
+           --dest-dir=$(strip $(1)) --install-dir /usr/share/backuppc \
+           --hostname=XXXXXX --data-dir=/data/backuppc --log-dir=/data/backuppc/log \
+           --bin-path perl=/usr/bin/perl --bin-path tar=/bin/tar \
+           --bin-path smbclient=/usr/sbin/smbclient --bin-path nmblookup=/usr/sbin/nmblookup \
+           --bin-path rsync=/usr/bin/rsync --bin-path ping=/usr/bin/ping --bin-path df=/bin/df \
+           --bin-path ssh=/usr/bin/ssh --bin-path gzip=/bin/gzip \
+           --bin-path sendmail=/usr/sbin/sendmail --bin-path bzip2=/usr/bin/bzip2
+       $(INSTALL_DIR) $(strip $(1))/usr/share/backuppc/conf
+       chmod 755 $(strip $(1))/data
+       mv $(strip $(1))/data/backuppc/conf/config.pl $(strip $(1))/usr/share/backuppc/conf/config.pl
+       patch --no-backup-if-mismatch $(strip $(1))/usr/share/backuppc/conf/config.pl ./files/fixup-config-pl.patch
+       mv $(strip $(1))/www/cgi-bin/BackupPC_Admin $(strip $(1))/usr/share/backuppc/bin/BackupPC_Admin_real
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/BackupPC_Admin $(strip $(1))/www/cgi-bin/BackupPC_Admin
+       $(INSTALL_DIR) $(strip $(1))/lib/upgrade/keep.d
+       $(INSTALL_DATA) files/backuppc.upgrade  $(strip $(1))/lib/upgrade/keep.d/backuppc
+endef
+
+$(eval $(call BuildPackage,backuppc))
diff --git a/admin/backuppc/files/backuppc.init b/admin/backuppc/files/backuppc.init
new file mode 100644 (file)
index 0000000..7f5253d
--- /dev/null
@@ -0,0 +1,66 @@
+#!/bin/sh /etc/rc.common
+
+. /lib/functions.sh
+
+START=95
+STOP=10
+
+USE_PROCD=1
+BACKUPPC_BIN="/usr/share/backuppc/bin/BackupPC"
+BACKUPPC_USER=backuppc
+
+# it would be better if it was possible to do this at install time, but we
+# can't, because in case of an openwrt image bundled with backuppc, all
+# ownerships other than root are lost.
+preconfigure() {
+    # create backuppc group and user if needed
+    if ! group_exists backuppc; then
+        group_add backuppc 864
+    fi
+    if ! user_exists backuppc; then
+        user_add backuppc 864 864 "BackupPC user" /data/backuppc /bin/sh
+    fi
+    # install default config if none exists, yet
+    if [ ! -e /data/backuppc/conf/config.pl ]; then
+        cp /usr/share/backuppc/conf/config.pl /data/backuppc/conf/config.pl
+    fi
+    # ensure proper ownerships and rights
+    chown backuppc:backuppc /data/backuppc /data/backuppc/* \
+                            /www/cgi-bin/BackupPC_Admin
+    chmod 750 /data/backuppc /data/backuppc/*
+    chmod 755 /usr/share/backuppc/bin/BackupPC_Admin_real
+    # The CGI needs to be world-executable, because uhttpd-cgi.c:386 checks
+    # for exactly that. We don't want that, but can't avoid it, currently.
+    chmod 6751 /www/cgi-bin/BackupPC_Admin
+    chown -R :backuppc /data/backuppc/conf
+    chmod 2770 /data/backuppc/conf
+    # protect webinterface with a random password by default
+    if [ -x /usr/sbin/uhttpd ] && ! grep -q backuppc /etc/httpd.conf >/dev/null 2>&1; then
+        PASS=$(perl -e 'print map{("a".."z","A".."Z",0..9)[int(rand(62))]}(1..8)')
+        PASSHASH=$(/usr/sbin/uhttpd -m "${PASS}")
+        echo "/cgi-bin/BackupPC_Admin:backuppc:${PASSHASH}" >> /etc/httpd.conf
+        uci set uhttpd.main.config=/etc/httpd.conf
+        /etc/init.d/uhttpd restart
+        # inform user
+        echo
+        echo "To protect access to the backuppc web interface, HTTP basic authentication in"
+        echo "uhttpd for http://$(/sbin/uci get "system.@system[0].hostname")/cgi-bin/BackupPC_Admin has been configured:"
+        echo "user: backuppc"
+        echo "pass: ${PASS}"
+        echo
+        echo "It is also recommended to follow the steps in"
+        echo "https://wiki.openwrt.org/doc/uci/uhttpd#securing_uhttpd"
+        echo "to secure access to uhttpd."
+    fi
+}
+
+start_service() {
+    # don't run preconfigure steps if called during image build
+    if [ -z "${IPKG_INSTROOT}" ]; then
+        preconfigure
+    fi
+    procd_open_instance
+    procd_set_param user $BACKUPPC_USER
+    procd_set_param reload_signal 1
+    procd_set_param command $BACKUPPC_BIN
+}
diff --git a/admin/backuppc/files/backuppc.upgrade b/admin/backuppc/files/backuppc.upgrade
new file mode 100644 (file)
index 0000000..aaf016f
--- /dev/null
@@ -0,0 +1,2 @@
+/etc/httpd.conf
+/data/backuppc/conf/
diff --git a/admin/backuppc/files/fixup-config-pl.patch b/admin/backuppc/files/fixup-config-pl.patch
new file mode 100644 (file)
index 0000000..2fa567c
--- /dev/null
@@ -0,0 +1,67 @@
+--- config.pl  2018-03-11 09:30:28.000000000 +0100
++++ config.pl.new      2018-04-05 08:40:29.180000000 +0200
+@@ -41,7 +41,10 @@
+ #
+ # Host name on which the BackupPC server is running.
+ #
+-$Conf{ServerHost} = 'XXXXXX';
++$ENV{'PATH'} = '/bin:/usr/bin';
++delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'};
++$Conf{ServerHost} = $ENV{'HOSTNAME'};
++chomp($Conf{ServerHost});
+ #
+ # TCP port number on which the BackupPC server listens for and accepts
+@@ -223,7 +226,7 @@
+ #
+ # Full path to various commands for archiving
+ #
+-$Conf{SplitPath} = '/usr/bin/split';
++$Conf{SplitPath} = '/usr/bin/split' if ( -x '/usr/bin/split' );
+ $Conf{ParPath}   = '';
+ $Conf{CatPath}   = '/bin/cat';
+ $Conf{GzipPath}  = '/bin/gzip';
+@@ -1572,7 +1575,7 @@
+ # Full path for ssh. Security caution: normal users should not
+ # allowed to write to this file or directory.
+ #
+-$Conf{SshPath} = '/usr/bin/ssh';
++$Conf{SshPath} = '/usr/bin/ssh' if ( -x '/usr/bin/ssh' );
+ #
+ # Full path for nmblookup. Security caution: normal users should not
+@@ -1874,7 +1877,7 @@
+ # Full path to the sendmail command.  Security caution: normal users
+ # should not allowed to write to this file or directory.
+ #
+-$Conf{SendmailPath} = '/usr/sbin/sendmail';
++$Conf{SendmailPath} = '/usr/sbin/sendmail' if ( -x '/usr/sbin/sendmail' );
+ #
+ # Minimum period between consecutive emails to a single user.
+@@ -2028,13 +2031,13 @@
+ #    $Conf{CgiAdminUsers}     = 'craig celia';
+ #    --> administrative users are only craig and celia'.
+ #
+-$Conf{CgiAdminUserGroup} = '';
+-$Conf{CgiAdminUsers}     = '';
++$Conf{CgiAdminUserGroup} = 'backuppc';
++$Conf{CgiAdminUsers}     = 'backuppc';
+ #
+ # URL of the BackupPC_Admin CGI script.  Used for email messages.
+ #
+-$Conf{CgiURL} = 'http://XXXXXX/cgi-bin//BackupPC_Admin';
++$Conf{CgiURL} = 'http://' . $Conf{ServerHost} . '/cgi-bin//BackupPC_Admin';
+ #   
+ # Language to use.  See lib/BackupPC/Lang for the list of supported
+@@ -2076,7 +2079,7 @@
+ # dates (MM/DD), a value of 2 uses full YYYY-MM-DD format, and zero
+ # for international dates (DD/MM).
+ #
+-$Conf{CgiDateFormatMMDD} = 1;
++$Conf{CgiDateFormatMMDD} = 2;
+ #
+ # If set, the complete list of hosts appears in the left navigation
diff --git a/admin/backuppc/files/setuidwrapper.c b/admin/backuppc/files/setuidwrapper.c
new file mode 100644 (file)
index 0000000..b4496ff
--- /dev/null
@@ -0,0 +1,8 @@
+#include <unistd.h>
+
+int main(int argc, char* argv[])
+{
+    execv("/usr/share/backuppc/bin/BackupPC_Admin_real", argv);
+    return 0;
+}
+
diff --git a/admin/backuppc/patches/001-debian-fixes.patch b/admin/backuppc/patches/001-debian-fixes.patch
new file mode 100644 (file)
index 0000000..3701755
--- /dev/null
@@ -0,0 +1,99 @@
+--- a/bin/BackupPC_archive     2017-01-26 02:31:24.000000000 +0100
++++ b/bin/BackupPC_archive     2018-04-05 21:11:14.428000000 +0200
+@@ -299,7 +299,7 @@
+     if ( $NeedPostCmd ) {
+         UserCommandRun("ArchivePostUserCmd");
+         if ( $? && $Conf{UserCmdCheckStatus} ) {
+-            $stat{hostError} = "RestorePreUserCmd returned error status $?";
++            $stat{hostError} = "ArchivePostUserCmd returned error status $?";
+             $stat{xferOK} = 0;
+         }
+     }
+--- a/bin/BackupPC_dump        2017-01-26 02:31:24.000000000 +0100
++++ b/bin/BackupPC_dump        2018-04-05 21:12:23.640000000 +0200
+@@ -1067,7 +1067,7 @@
+           # Send ALRMs to BackupPC_tarExtract if we are using it
+           #
+           if ( $tarPid > 0 ) {
+-              kill($bpc->sigName2num("ARLM"), $tarPid);
++              kill($bpc->sigName2num("ALRM"), $tarPid);
+           }
+           #
+--- a/configure.pl     2017-01-26 02:31:24.000000000 +0100
++++ b/configure.pl     2018-04-05 21:39:24.668000000 +0200
+@@ -333,7 +333,10 @@
+                                  $Conf{BackupPCUser} || "backuppc",
+                                  "backuppc-user");
+     if ( $opts{"set-perms"} ) {
+-        ($name, $passwd, $Uid, $Gid) = getpwnam($Conf{BackupPCUser});
++        #($name, $passwd, $Uid, $Gid) = getpwnam($Conf{BackupPCUser});
++        $name = 'backuppc';
++        $Uid=`id -u`;
++        $Gid=`id -g`;
+         last if ( $name ne "" );
+         print <<EOF;
+@@ -800,6 +803,7 @@
+ #
+ # Figure out sensible arguments for the ping command
+ #
++$Conf{PingArgs} = '-c 1 $host';
+ if ( defined($Conf{PingArgs}) ) {
+     $Conf{PingCmd} = '$pingPath ' . $Conf{PingArgs};
+ } elsif ( !defined($Conf{PingCmd}) ) {
+--- a/lib/BackupPC/CGI/View.pm 2017-01-26 02:31:24.000000000 +0100
++++ b/lib/BackupPC/CGI/View.pm 2018-04-05 21:46:22.664000000 +0200
+@@ -46,7 +46,7 @@
+     my $compress = 0;
+     my $fh;
+     my $host = $In{host};
+-    my $num  = $In{num};
++    my $num  = ${EscHTML($In{num})};
+     my $type = $In{type};
+     my $linkHosts = 0;
+     my($file, $comment);
+@@ -136,6 +136,10 @@
+                   }
+                   $s =~ s/[\n\r]+//g;
+                   if ( $s =~ /smb: \\>/
++                          || $s =~ /^tar:\d+\s/
++                          || $s =~ /^  NTLMSSP_/
++                          || $s =~ /^GENSEC backend /
++                          || $s =~ /^doing parameter /
+                           || $s =~ /^\s*(\d+) \(\s*\d+\.\d kb\/s\) (.*)$/
+                           || $s =~ /^tar: dumped \d+ files/
+                           || $s =~ /^\s*added interface/i
+--- a/lib/BackupPC/Lib.pm      2017-01-26 02:31:24.000000000 +0100
++++ b/lib/BackupPC/Lib.pm      2018-04-05 21:48:38.048000000 +0200
+@@ -512,7 +512,8 @@
+     }
+     if ( $IODirentOk ) {
+         @entries = sort({ $a->{inode} <=> $b->{inode} } readdirent($fh));
+-        map { $_->{type} = 0 + $_->{type} } @entries;   # make type numeric
++        #map { $_->{type} = 0 + $_->{type} } @entries;   # make type numeric
++        map { $_->{type} = 0 + $_->{type}; $_->{type} = undef if ($_->{type} eq BPC_DT_UNKNOWN); } @entries;   # make type numeric, unset unknown types
+     } else {
+         @entries = map { { name => $_} } readdir($fh);
+     }
+--- a/lib/BackupPC/Xfer/Smb.pm 2017-01-26 02:31:24.000000000 +0100
++++ b/lib/BackupPC/Xfer/Smb.pm 2018-04-05 21:57:16.616000000 +0200
+@@ -219,7 +219,7 @@
+         #
+         # MAKSYM 14082016: The next regex will never match on Samba-4.3, as
+         # smbclient doesn't produce output required; keeping it for older Sambas
+-        if ( /^\s*(-?\d+) \(\s*\d+[.,]\d kb\/s\) (.*)$/ ) {
++        if ( /^\s*(-?\d+) \(\s*\d+[.,]\d kb\/s\) (.*)$/ || /^tar:(\d+)\s+\+\+\+ (.*)$/ ) {
+             my $sambaFileSize = $1;
+             my $pcFileName    = $2;
+             (my $fileName = $pcFileName) =~ s/\\/\//g;
+@@ -281,6 +281,9 @@
+         } elsif ( /smb: \\>/
+                 || /^\s*tar:\d+/ # MAKSYM 14082016: ignoring 2 more Samba-4.3 specific lines
+                 || /^\s*WARNING:/i
++                || /^  NTLMSSP_/
++                || /^GENSEC backend /
++                || /^doing parameter /
+                 || /^\s*added interface/i
+                 || /^\s*tarmode is now/i
+                 || /^\s*Total bytes written/i
index a89d838d6ffaf49d03a6d6463fd008f20385462e..073a616c91a321a44319bb8b3e0cdc9d07807c0e 100644 (file)
@@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gkrellmd
 PKG_VERSION:=2.3.10
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=gkrellm-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://gkrellm.srcbox.net/releases
 PKG_HASH:=8b9ec8baadcd5830c6aff04ba86dc9ed317a15c1c3787440bd1e680fb2fcd766
 PKG_MAINTAINER:=Peter Denison <openwrt@marshadder.org>
-PKG_LICENSE:=GPL-2.0+
+PKG_LICENSE:=GPL-2.0-or-later
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/gkrellm-$(PKG_VERSION)
 
index 0a28fbaf1a71cdbad96038e1de18de7b178aa9b4..76cf8e5a0c6fb501a43838d60defceee9713510b 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=monit
-PKG_VERSION:=5.25.2
-PKG_RELEASE:=2
+PKG_VERSION:=5.26.0
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://mmonit.com/monit/dist
-PKG_HASH:=aa0ce6361d1155e43e30a86dcff00b2003d434f221c360981ced830275abc64a
+PKG_HASH:=87fc4568a3af9a2be89040efb169e3a2e47b262f99e78d5ddde99dd89f02f3c2
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
 
 PKG_LICENSE:=AGPL-3.0
@@ -63,6 +63,7 @@ endef
 
 CONFIGURE_ARGS += \
        --without-pam \
+       ac_cv_ipv6=$(if $(CONFIG_IPV6),yes,no) \
        libmonit_cv_setjmp_available=yes \
        libmonit_cv_vsnprintf_c99_conformant=yes
 
index f379b777079e7e0631657548f76551bf555e9a7a..571c432bbda70d6ec73e69a8a63634eb5268eb04 100644 (file)
@@ -1,6 +1,6 @@
 --- a/configure
 +++ b/configure
-@@ -14390,14 +14390,7 @@ fi
+@@ -14436,14 +14436,7 @@ fi
  # Find the right directory to put the root-mode PID file in
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking pid file location" >&5
  $as_echo_n "checking pid file location... " >&6; }
  
  
  cat >>confdefs.h <<_ACEOF
+--- a/configure.ac
++++ b/configure.ac
+@@ -501,14 +501,7 @@ fi
+ # Find the right directory to put the root-mode PID file in
+ AC_MSG_CHECKING([pid file location])
+-if test -d "/run"
+-then
+-      piddir="/run"
+-elif test -d "/var/run"; then
+-        piddir="/var/run"
+-elif test -d "/etc"; then
+-        piddir="/etc"
+-fi
++piddir="/var/run"
+ AC_DEFINE_UNQUOTED([PIDDIR], "$piddir",
+         [Define to the pid storage directory.])
diff --git a/admin/monit/patches/010-openssl-thread-api.patch b/admin/monit/patches/010-openssl-thread-api.patch
deleted file mode 100644 (file)
index ea5e9d3..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-diff --git a/src/ssl/Ssl.c b/src/ssl/Ssl.c
-index 6501f25..9c24ad5 100644
---- a/src/ssl/Ssl.c
-+++ b/src/ssl/Ssl.c
-@@ -302,8 +302,8 @@ static boolean_t _retry(int socket, int *timeout, int (*callback)(int socket, ti
- #if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER)
--static unsigned long _threadID() {
--        return (unsigned long)Thread_self();
-+static void _threadID(CRYPTO_THREADID *id) {
-+        CRYPTO_THREADID_set_numeric(id, (unsigned long)Thread_self());
- }
-@@ -482,7 +482,7 @@ void Ssl_start() {
-         instanceMutexTable = CALLOC(locks, sizeof(Mutex_T));
-         for (int i = 0; i < locks; i++)
-                 Mutex_init(instanceMutexTable[i]);
--        CRYPTO_set_id_callback(_threadID);
-+        CRYPTO_THREADID_set_callback(_threadID);
-         CRYPTO_set_locking_callback(_mutexLock);
- #endif
-         if (File_exist(URANDOM_DEVICE))
-@@ -496,7 +496,7 @@ void Ssl_start() {
- void Ssl_stop() {
- #if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER)
--        CRYPTO_set_id_callback(NULL);
-+        CRYPTO_THREADID_set_callback(NULL);
-         CRYPTO_set_locking_callback(NULL);
-         for (int i = 0; i < CRYPTO_num_locks(); i++)
-                 Mutex_destroy(instanceMutexTable[i]);
-@@ -510,7 +510,7 @@ void Ssl_stop() {
- void Ssl_threadCleanup() {
- #if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER)
--        ERR_remove_state(0);
-+        ERR_remove_thread_state(NULL);
- #endif
- }
index 2d98cf34e8f96cfd04a9e67f12dcd06f93c2382b..522f534ed50e32044f45a54093caaa8f542030c9 100644 (file)
@@ -9,12 +9,12 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=muninlite
 PKG_VERSION:=1.0.4
-PKG_RELEASE:=9
+PKG_RELEASE:=10
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/$(PKG_NAME)
 PKG_HASH:=736482dd6d6849d014d975b1f5794f20dda6e123dbba2d8c2f169c8e787e6f7e
-PKG_LICENSE:=GPL-2.0+
+PKG_LICENSE:=GPL-2.0-or-later
 PKG_LICENSE_FILES:=LICENSE
 
 include $(INCLUDE_DIR)/package.mk
index 0212ad813b0a3bef3101bfd110f0130f633ecfc5..eb07c20e11b0eb0b946c0f7e244a2a4b17a3106d 100644 (file)
@@ -8,18 +8,17 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=netdata
-PKG_VERSION:=1.14.0
+PKG_VERSION:=1.17.1
 PKG_RELEASE:=1
 
 PKG_MAINTAINER:=Josef Schlehofer <pepe.schlehofer@gmail.com>, Daniel Engberg <daniel.engberg.lists@pyret.net>
-PKG_LICENSE:=GPL-3.0+
+PKG_LICENSE:=GPL-3.0-or-later
 PKG_LICENSE_FILES:=COPYING
 PKG_CPE_ID:=cpe:/a:my-netdata:netdata
 
 PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://github.com/netdata/netdata/releases/download/v$(PKG_VERSION)
-PKG_HASH:=f3768f6927e3712dce73794c6943a12f4454410c872eb3dfd19af4f52296187a
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-v$(PKG_VERSION)
+PKG_SOURCE_URL:=https://codeload.github.com/netdata/netdata/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=032f9001e2b7f774989a200519feeafa3a4d9b7c9e8fb0cfa43e68a8da6ad1bf
 
 PKG_INSTALL:=1
 PKG_FIXUP:=autoreconf
@@ -30,9 +29,9 @@ include $(INCLUDE_DIR)/package.mk
 define Package/netdata
   SECTION:=admin
   CATEGORY:=Administration
-  DEPENDS:=+zlib +libuuid +libmnl
+  DEPENDS:=+zlib +libuuid +libmnl +libjson-c
   TITLE:=Real-time performance monitoring tool
-  URL:=https://my-netdata.io/
+  URL:=https://www.netdata.cloud/
 endef
 
 define Package/netdata/description
@@ -53,7 +52,14 @@ CONFIGURE_ARGS += \
        --disable-x86-sse \
        --enable-lto \
        --without-libcap \
-       --disable-plugin-nfacct
+       --disable-https \
+       --disable-dbengine \
+       --disable-plugin-nfacct \
+       --disable-plugin-freeipmi \
+       --disable-plugin-cups \
+       --disable-plugin-xenstat \
+       --disable-backend-prometheus-remote-write \
+       --enable-jsonc
 
 define Package/netdata/conffiles
 /etc/netdata/
@@ -63,6 +69,7 @@ define Package/netdata/install
        $(INSTALL_DIR) $(1)/etc/netdata/custom-plugins.d
        $(CP) $(PKG_INSTALL_DIR)/etc/netdata $(1)/etc
        $(CP) ./files/netdata.conf $(1)/etc/netdata
+       touch $(1)/etc/netdata/.opt-out-from-anonymous-statistics
        $(INSTALL_DIR) $(1)/usr/lib
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/netdata $(1)/usr/lib
        $(CP) $(1)/usr/lib/netdata/conf.d/fping.conf $(1)/etc
index d4be0a7c25d12f5b108a4af25c4567566707f95e..0c0d4d42c1b8430ab75dfcca3973fe27fc59f0a3 100644 (file)
@@ -6,7 +6,7 @@ USE_PROCD=1
 APPBINARY=/usr/sbin/netdata
 CONFIGFILE=/etc/netdata/netdata.conf
 
-       start_service() {
+start_service() {
        mkdir -m 0755 -p /var/cache/netdata
        chown nobody /var/cache/netdata
        mkdir -m 0755 -p /var/lib/netdata
@@ -18,4 +18,4 @@ CONFIGFILE=/etc/netdata/netdata.conf
        procd_set_param file $CONFIGFILE
        procd_set_param respawn
        procd_close_instance
-       }
+}
diff --git a/admin/netdata/patches/002-force-python3.patch b/admin/netdata/patches/002-force-python3.patch
deleted file mode 100644 (file)
index 84d1925..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
---- a/collectors/python.d.plugin/python.d.plugin.in
-+++ b/collectors/python.d.plugin/python.d.plugin.in
-@@ -1,10 +1,4 @@
--#!/usr/bin/env bash
--'''':;
--if [[ "$OSTYPE" == "darwin"* ]]; then
--    export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
--fi
--exec "$(command -v python || command -v python3 || command -v python2 ||
--echo "ERROR python IS NOT AVAILABLE IN THIS SYSTEM")" "$0" "$@" # '''
-+#!/usr/bin/python3
-
- # -*- coding: utf-8 -*-
- # Description:
index c2237e321cf8ab4eef83b0f725f2c88175bb12a1..a109de17958a48101d44002af7ff145b9d14bf1c 100644 (file)
@@ -24,7 +24,7 @@ define Package/openwisp-config/default
        TITLE:=Remote configuration management agent ($(2) variant)
        CATEGORY:=Administration
        SECTION:=admin
-       SUBMENU:=openwisp
+       SUBMENU:=OpenWISP
        DEPENDS:=+curl +lua +libuci-lua +luafilesystem $(3)
        VARIANT:=$(1)
        MAINTAINER:=Federico Capoano <f.capoano@cineca.it>
index d1a1664e5c020c23abbd1546fb8667ed84eec669..57d3123de6a882de4e2b42f5a04ff1bdf3392614 100644 (file)
@@ -1,17 +1,17 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=syslog-ng
-PKG_VERSION:=3.21.1
+PKG_VERSION:=3.23.1
 PKG_RELEASE:=1
 
 PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>
-PKG_LICENSE:=LGPL-2.1+
-PKG_LICENSE_FILES:=COPYING
+PKG_LICENSE:=LGPL-2.1-or-later GPL-2.0-or-later
+PKG_LICENSE_FILES:=COPYING LGPL.txt GPL.txt
 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:=8d163da5ad79cf3a5f043b2ed0fe18a4888d0d740542703bf2508f0b9996cd25
+PKG_HASH:=fb36cfc1982831f74143b77a924ee79714745b5e2b3ff59d086d09a77d0acd38
 
 PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
@@ -25,9 +25,9 @@ include $(INCLUDE_DIR)/nls.mk
 define Package/syslog-ng
   SECTION:=admin
   CATEGORY:=Administration
-  DEPENDS:=+libpcre +glib2 +libopenssl +libpthread +librt +zlib +libdbi +libjson-c +libcurl +libuuid
   TITLE:=A powerful syslog daemon
   URL:=https://www.syslog-ng.com/products/open-source-log-management/
+  DEPENDS:=+libpcre +glib2 +libopenssl +libpthread +librt +zlib +libdbi +libjson-c +libcurl +libuuid
 endef
 
 define Package/syslog-ng/description
@@ -48,6 +48,7 @@ define Build/Configure
 endef
 
 CONFIGURE_ARGS +=  \
+       --disable-snmp-dest \
        $(call autoconf_bool,CONFIG_IPV6,ipv6) \
        --disable-tcp-wrapper \
        --disable-spoof-source \
index 2f3a98b864cb9c7da38caa29c6288236a97f2b51..36a2ce57604552e79438d5806b4739f8b53f0067 100644 (file)
@@ -2,9 +2,9 @@
 # OpenWrt syslog-ng.conf specific file
 # which collects all local logs into a single file called /var/log/messages.
 # More details about these settings can be found here:
-# https://www.syslog-ng.com/technical-documents/doc/syslog-ng-open-source-edition/3.16/release-notes/global-options
+# https://www.syslog-ng.com/technical-documents/list/syslog-ng-open-source-edition
 
-@version: 3.21
+@version: 3.23
 @include "scl.conf"
 @include "/etc/syslog-ng.d/" # Put any customization files in this directory
 
index 7b9488b2806dc78ee149d98a4d3835db5c7402cd..b68c6574f5bf9e6530f5d0623ed9a7ce040b4ff0 100644 (file)
@@ -1,5 +1,5 @@
 #!/bin/sh /etc/rc.common
-# Copyright (C) 2006-2016 OpenWrt.org
+# Copyright (C) 2006-2019 OpenWrt.org
 
 START=50
 
@@ -8,11 +8,6 @@ USE_PROCD=1
 start_service() {
        [ -f /etc/syslog-ng.conf ] || return 1
        procd_open_instance
-       procd_set_param command /usr/sbin/syslog-ng
+       procd_set_param command /usr/sbin/syslog-ng --foreground
        procd_close_instance
 }
-
-reload_service() {
-        stop
-        start
-}
index 8dadb21a674502de0e04004a179927f44e177ad4..d2ceae3c1c8d9982cbad959fd0e6cdda52946c31 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=zabbix
-PKG_VERSION:=4.0.6
-PKG_RELEASE:=2
+PKG_VERSION:=4.0.11
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/zabbix
-PKG_HASH:=2890851b3a4b0f70f69ef754aa0d07070b42440f56d280113a9474bc4ed75e5b
+PKG_HASH:=b0af25c31c622d14cb7780db5941d76579b9f9a6ee449613d847b0b505628409
 
 PKG_MAINTAINER:=Etienne CHAMPETIER <champetier.etienne@gmail.com>
 PKG_LICENSE:=GPL-2.0
@@ -71,7 +71,7 @@ endef
 define Package/zabbix/Default
   SECTION:=admin
   CATEGORY:=Administration
-  SUBMENU:=zabbix
+  SUBMENU:=Zabbix
   TITLE:=Zabbix
   URL:=https://www.zabbix.com/
   USERID:=zabbix=53:zabbix=53
diff --git a/admin/zabbix/patches/003-change-user-and-foreground.patch b/admin/zabbix/patches/003-change-user-and-foreground.patch
deleted file mode 100644 (file)
index 6779e47..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
---- a/src/libs/zbxnix/daemon.c
-+++ b/src/libs/zbxnix/daemon.c
-@@ -300,11 +300,14 @@ int      daemon_start(int allow_root, const c
-       if (0 == allow_root && 0 == getuid())   /* running as root? */
-       {
-+#if 0
-+/* allow changing user and foreground */
-               if (0 != (flags & ZBX_TASK_FLAG_FOREGROUND))
-               {
-                       zbx_error("cannot run as root!");
-                       exit(EXIT_FAILURE);
-               }
-+#endif
-               if (NULL == user)
-                       user = "zabbix";
index 48d71b7dacad3bb094e0b80ab87a88a9d4fe9f28..911b4d0358ec4f5354e1859e1044a291160ee391 100644 (file)
@@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=autoconf
 PKG_VERSION:=2.69
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE_URL:=@GNU/autoconf
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_HASH:=64ebcec9f8ac5b2487125a86a7760d2591ac9e1d3dbd59489633f9de62a57684
 PKG_MAINTAINER:=Heinrich Schuchardt <xypron.glpk@gmx.de>
-PKG_LICENSE:=GPL-3.0+
+PKG_LICENSE:=GPL-3.0-or-later
 
 PKG_INSTALL:=1
 
index b864f6eebcce4003cd4a9d348c179c025271e775..b7539ad2022d9279c62f17eb9a0723d78489adb4 100644 (file)
@@ -9,13 +9,14 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=automake
 PKG_VERSION:=1.15.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_URL:=@GNU/automake
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_HASH:=af6ba39142220687c500f79b4aa2f181d9b24e4f8d8ec497cea4ba26c64bedaf
 PKG_MAINTAINER:=Heinrich Schuchardt <xypron.glpk@gmx.de>
-PKG_LICENSE:=GPL-3.0+
+PKG_LICENSE:=GPL-3.0-or-later
+PKG_CPE_ID:=cpe:/a:gnu:automake
 
 PKG_INSTALL:=1
 
index 3f93ef67eb14aaa303bbb69acc071ba15d6a6790..65a41f8ebb775c0ffe61b20ab347714e3dab42de 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=diffutils
 PKG_VERSION:=3.7
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@GNU/diffutils
@@ -30,6 +30,10 @@ define Package/diffutils
   DEPENDS:=+USE_GLIBC:librt
   TITLE:=diffutils
   URL:=http://www.gnu.org/software/diffutils/
+  ALTERNATIVES:=\
+    200:/usr/bin/cmp:/usr/bin/gnu-cmp \
+    200:/usr/bin/diff:/usr/bin/gnu-diff \
+
 endef
 
 define Package/diffutils/description
@@ -43,23 +47,9 @@ CONFIGURE_VARS += \
 
 define Package/diffutils/install
        $(INSTALL_DIR) $(1)/usr/bin
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{sdiff,diff3,diff,cmp} $(1)/usr/bin/
-endef
-
-define Package/diffutils/preinst
-#!/bin/sh
-for x in sdiff diff3 diff cmp; do
-  [ -L "$${IPKG_INSTROOT}/usr/bin/$$x" ] && rm -f "$${IPKG_INSTROOT}/usr/bin/$$x"
-done
-exit 0
-endef
-
-define Package/diffutils/postrm
-#!/bin/sh
-for x in sdiff diff3 diff cmp; do
-  /bin/busybox $$x -h 2>&1 | grep -q BusyBox && ln -sf ../../bin/busybox /usr/bin/$$x
-done
-exit 0
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{sdiff,diff3} $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/diff $(1)/usr/bin/gnu-diff
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/cmp $(1)/usr/bin/gnu-cmp
 endef
 
 $(eval $(call BuildPackage,diffutils))
diff --git a/devel/gcc/Config.in b/devel/gcc/Config.in
new file mode 100644 (file)
index 0000000..f435b45
--- /dev/null
@@ -0,0 +1,34 @@
+# gcc library configuration
+menu "Libraries"
+       depends on PACKAGE_gcc
+       config INCLUDE_STATIC_LIBC
+               bool "Include static libc on target"
+               help
+                       Copies libc.a to target device
+                       Increases the size of an already
+                       very large package
+               default n
+       config INCLUDE_STATIC_LIBPTHREAD
+               bool "Include static libptread on target"
+               help
+                       Copies libpthread.a to target device
+                       Increases the size of an already
+                       very large package
+               default n
+       config INCLUDE_STATIC_LIBSTDC
+               bool "Include static libstdc++ on target"
+               help
+                       Copies libstdc++.a to target device
+                       Increases the size of an already
+                       very large package
+               default n
+       config INCLUDE_STATIC_LINK_SPEC
+               depends on INCLUDE_STATIC_LIBSTDC
+               bool "Generate spec file for easy static c++ linking on target"
+               help
+                       Creates a spec file for gcc to eliminate the need for
+                       -lstdc++, libgcc_pic and -static-libstdc flags when
+                       statically linking c++ programs
+               default n
+endmenu
+
index 716f593d4d067d1b7fdd41775826fe570a2b41d5..00f8e190de4564dd0f8b5e199c1c63ad4f2e5a9b 100644 (file)
@@ -6,19 +6,63 @@
 #
 
 include $(TOPDIR)/rules.mk
+define Package/gcc/description
+       Build a native toolchain for compiling on target
+       device.
+endef
+
+
+define Package/gcc
+  SECTION:=devel
+  CATEGORY:=Development
+  TITLE:=gcc
+  MAINTAINER:=Noble Pepper <gccmaintain@noblepepper.com>
+  DEPENDS:= +binutils +libstdcpp @!arc
+  MENU:=1
+endef
 
 PKG_NAME:=gcc
-PKG_VERSION:=5.4.0
-PKG_RELEASE:=3
+# PKG_VERSION=7.3.0
+PKG_VERSION=7.4.0
+PKG_RELEASE:=5
 PKG_SOURCE_URL:=@GNU/gcc/gcc-$(PKG_VERSION)
-PKG_HASH:=608df76dec2d34de6558249d8af4cbee21eceddbcb580d666f7a5a583ca3303a
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_INSTALL:=1
 PKG_FIXUP:=libtool
 PKG_BUILD_PARALLEL:=1
 
-include $(INCLUDE_DIR)/package.mk
+PKG_CPE_ID:=cpe:/a:gnu:gcc
+
+ifeq ($(PKG_VERSION),7.3.0)
+       PKG_HASH:=832ca6ae04636adbb430e865a1451adf6979ab44ca1c8374f61fba65645ce15c
+endif
+ifeq ($(PKG_VERSION),7.4.0)
+       PKG_HASH:=eddde28d04f334aec1604456e536416549e9b1aa137fc69204e65eb0c009fe51
+endif
+
+
+define Package/gcc/config
+  source "$(SOURCE)/Config.in"
+endef
+
+ifeq ($(CONFIG_INCLUDE_STATIC_LIBC),y)
+       COPY_STATIC_LIBC=cp -a $(TOOLCHAIN_DIR)/lib/libc.a $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION)
+endif
+
+ifeq ($(CONFIG_INCLUDE_STATIC_LIBPTHREAD),y)
+       COPY_STATIC_LIBPTHREAD=cp -a $(TOOLCHAIN_DIR)/lib/libpthread.a $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION)
+endif
 
+ifeq ($(CONFIG_INCLUDE_STATIC_LIBSTDC),y)
+       COPY_STATIC_LIBSTDC=cp -a $(TOOLCHAIN_DIR)/lib/libstdc++.a $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION)
+endif
+
+ifeq ($(CONFIG_INCLUDE_STATIC_LINK_SPEC),y)
+       INSTALL_STATIC_SPEC=g++ -dumpspecs |sed s/--start-group}\ %G\ %L\ /--start-group}\ %G\ %L\ -lstdc++\ -lgcc_pic\ / >/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION)/specs
+       REMOVE_STATIC_SPEC=rm /usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION)/specs
+endif
+
+include $(INCLUDE_DIR)/package.mk
 TARGET_LANGUAGES:="c,c++"
 BUGURL=https://dev.openwrt.org/
 PKGVERSION=OpenWrt GCC $(PKG_VERSION)
@@ -37,43 +81,30 @@ ifneq ($(CONFIG_SOFT_FLOAT),y)
                ARM_FLOAT_OPTION:= --with-float=hard
        endif
 endif
-
-define Package/gcc
-  SECTION:=devel
-  CATEGORY:=Development
-  TITLE:=gcc
-  MAINTAINER:=Noble Pepper <gccmaintain@noblepepper.com>
-  DEPENDS:= +binutils +libstdcpp
-endef
-
-define Package/gcc/description
-       build a native toolchain for compiling on target
-endef
-
-GMPSRC=gmp-4.3.2
+GMPSRC=gmp-6.1.0
 
 define Download/gmp
   URL:=ftp://gcc.gnu.org/pub/gcc/infrastructure/
   FILE:=$(GMPSRC).tar.bz2
-  HASH:=936162c0312886c21581002b79932829aa048cfaf9937c6265aeaa14f1cd1775
+  HASH:=498449a994efeba527885c10405993427995d3f86b8768d8cdf8d9dd7c6b73e8
 endef
 $(eval $(call Download,gmp))
 
-MPCSRC=mpc-0.8.1
+MPCSRC=mpc-1.0.3
 
 define Download/mpc
   URL:=ftp://gcc.gnu.org/pub/gcc/infrastructure/
   FILE:=$(MPCSRC).tar.gz
-  HASH:=e664603757251fd8a352848276497a4c79b7f8b21fd8aedd5cc0598a38fee3e4
+  HASH:=617decc6ea09889fb08ede330917a00b16809b8db88c29c31bfbb49cbf88ecc3
 endef
 $(eval $(call Download,mpc))
 
-MPFRSRC=mpfr-2.4.2
+MPFRSRC=mpfr-3.1.4
 
 define Download/mpfr
   URL:=ftp://gcc.gnu.org/pub/gcc/infrastructure/
   FILE:=$(MPFRSRC).tar.bz2
-  HASH:=c7e75a08a8d49d2082e4caee1591a05d11b9d5627514e678f02d66a124bcf2ba
+  HASH:=d3103a80cdad2407ed581f3618c4bed04e0c92d1cf771a65ead662cc397f7775
 endef
 $(eval $(call Download,mpfr))
 
@@ -90,11 +121,11 @@ define Build/Prepare
 #      poor man's fix for `none-openwrt-linux' not recognized when building with musl
        cp $(PKG_BUILD_DIR)/config.sub $(PKG_BUILD_DIR)/mpfr/
        cp $(PKG_BUILD_DIR)/config.sub $(PKG_BUILD_DIR)/gmp/
+       chmod u+w $(PKG_BUILD_DIR)/mpc/config.sub
        cp $(PKG_BUILD_DIR)/config.sub $(PKG_BUILD_DIR)/mpc/
 endef
 
-TARGET_CXX += -std=gnu++03
-CONFIGURE_ARGS += CXX_FOR_TARGET="$(TARGET_CXX)" CXXFLAGS_FOR_TARGET="-g -O2 -D_GLIBCXX_INCLUDE_NEXT_C_HEADERS"
+CONFIGURE_ARGS +=  CXXFLAGS_FOR_TARGET="-g -O2 -D_GLIBCXX_INCLUDE_NEXT_C_HEADERS"
 
 define Build/Configure
        (cd $(PKG_BUILD_DIR); rm -f config.cache; \
@@ -118,6 +149,7 @@ define Build/Configure
                        --disable-libvtv \
                        --disable-libcilkrts \
                        --disable-libmudflap \
+                       --disable-libmpx \
                        --disable-multilib \
                        --disable-libgomp \
                        --disable-libquadmath \
@@ -128,6 +160,7 @@ define Build/Configure
                        --prefix=/usr \
                        --libexecdir=/usr/lib \
                        --with-local-prefix=/usr \
+                       --with-stage1-ldflags=-lstdc++ \
                        $(ARM_FLOAT_OPTION) \
                        $(SOFT_FLOAT_CONFIG_OPTION) \
                        $(call qstrip,$(CONFIG_EXTRA_GCC_CONFIG_OPTIONS)) \
@@ -149,7 +182,7 @@ ifeq ($(CONFIG_SOFT_FLOAT),y)
 endif
 ENVCFLAGS+="
 
-ENVLDFLAGS:="-Wl,-rpath=/usr/lib -Wl,--dynamic-linker=/usr/lib/$(DYNLINKER) -L/usr/lib"
+ENVLDFLAGS:="-Wl,-rpath=/usr/lib -Wl,--dynamic-linker=/usr/lib/$(DYNLINKER) -L/usr/lib, -lstdc++"
 
 define Package/gcc/install
        $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION)
@@ -165,6 +198,9 @@ define Package/gcc/install
        cp -a $(TOOLCHAIN_DIR)/lib/*.{o,so*} $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION)
        cp -a $(TOOLCHAIN_DIR)/lib/*nonshared*.a  $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION)
        cp -a $(TOOLCHAIN_DIR)/lib/libm.a  $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION)
+       $(COPY_STATIC_LIBC)
+       $(COPY_STATIC_LIBPTHREAD)
+       $(COPY_STATIC_LIBSTDC)
        rm -f $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION)/libgo*
        rm -f $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION)/libcc1*
        echo '#!/bin/sh' > $(1)/usr/bin/gcc_env.sh
@@ -173,4 +209,14 @@ define Package/gcc/install
        chmod +x $(1)/usr/bin/gcc_env.sh
 endef
 
+define Package/gcc/postinst
+       #!/bin/sh
+       $(INSTALL_STATIC_SPEC)
+endef
+
+define Package/gcc/postrm
+       #!/bin/sh
+       $(REMOVE_STATIC_SPEC)
+endef
+
 $(eval $(call BuildPackage,gcc))
index 58db4740ca2989d30d50dadf959f5bbeb287b758..06ace1a85af5f78f4fc19d5ff5a2e3aa2e6aa8bb 100644 (file)
@@ -1,8 +1,8 @@
 Native GCC that runs on target.
 
-To save disk space, this GCC only supports dynamic linking on the target box,
-there are no static libraries shipped except libgcc.a on those architectures
-that need it.
+To save disk space, this GCC uses dynamic linking on the target box. There
+are configuration options to include libstdc++.a, libc.a and libpthread.a
+if staticly linked binaries are needed.
 
 For now, this was only tested on arm (EABI) and mips targets. Others to be
 done...
index 06373eb6a0d026249c706e9e10a7d2369ee0db75..63e3fee0031783639926c1c4c065694649a13047 100644 (file)
@@ -1,3 +1,15 @@
+commit 31285a20390a5e53a74a2a71d1b5c82f366ddd5a
+Author: Felix Fietkau <nbd@openwrt.org>
+Date:   Tue May 6 11:49:05 2014 +0000
+
+    gcc: revert an upstream patch that is causing a regression on powerpc
+    
+    https://forum.openwrt.org/viewtopic.php?pid=232494#p232494
+    
+    Signed-off-by: Felix Fietkau <nbd@openwrt.org>
+    
+    SVN-Revision: 40709
+
 Revert of:
 
 commit 275035b56823b26d5fb7e90fad945b998648edf2
@@ -14,7 +26,7 @@ Date:   Thu Sep 5 14:09:07 2013 +0000
 
 --- a/gcc/reginfo.c
 +++ b/gcc/reginfo.c
-@@ -665,35 +665,40 @@ choose_hard_reg_mode (unsigned int regno
+@@ -637,35 +637,40 @@ choose_hard_reg_mode (unsigned int regno
         mode = GET_MODE_WIDER_MODE (mode))
      if ((unsigned) hard_regno_nregs[regno][mode] == nregs
        && HARD_REGNO_MODE_OK (regno, mode)
index b3d2dbe291f5a5f2737930c07f12ad28c7a7136b..3442076d7db631389e7b4263a2bb2110b7e4cfb4 100644 (file)
@@ -1,3 +1,13 @@
+commit 81cc26c706b2bc8c8c1eb1a322e5c5157900836e
+Author: Felix Fietkau <nbd@openwrt.org>
+Date:   Sun Oct 19 21:45:51 2014 +0000
+
+    gcc: do not assume that the Mac OS X filesystem is case insensitive
+    
+    Signed-off-by: Felix Fietkau <nbd@openwrt.org>
+    
+    SVN-Revision: 42973
+
 --- a/include/filenames.h
 +++ b/include/filenames.h
 @@ -43,11 +43,6 @@ extern "C" {
diff --git a/devel/gcc/patches/003-mpfr-longlong-mips.patch b/devel/gcc/patches/003-mpfr-longlong-mips.patch
deleted file mode 100644 (file)
index 0ab9fe5..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-diff -Naurd mpfr-2.4.2-a/mpfr-longlong.h mpfr-2.4.2-b/mpfr-longlong.h
---- -a/mpfr-2.4.2/mpfr-longlong.h      2009-11-30 02:43:08.000000000 +0000
-+++ -b/mpfr-2.4.2/mpfr-longlong.h      2009-12-18 12:04:29.000000000 +0000
-@@ -1011,7 +1011,15 @@
- #endif /* __m88000__ */
- #if defined (__mips) && W_TYPE_SIZE == 32
--#if __GNUC__ > 2 || __GNUC_MINOR__ >= 7
-+#if (__GNUC__ >= 5) || (__GNUC__ >= 4 && __GNUC_MINOR__ >= 4)
-+#define umul_ppmm(w1, w0, u, v) \
-+  do {                                                                        \
-+    UDItype _r;                                                       \
-+    _r = (UDItype) u * v;                                             \
-+    (w1) = _r >> 32;                                                  \
-+    (w0) = (USItype) _r;                                              \
-+  } while (0)
-+#elif __GNUC__ > 2 || __GNUC_MINOR__ >= 7
- #define umul_ppmm(w1, w0, u, v) \
-   __asm__ ("multu %2,%3" : "=l" (w0), "=h" (w1) : "d" (u), "d" (v))
- #else
-@@ -1024,7 +1032,16 @@
- #endif /* __mips */
- #if (defined (__mips) && __mips >= 3) && W_TYPE_SIZE == 64
--#if __GNUC__ > 2 || __GNUC_MINOR__ >= 7
-+#if (__GNUC__ >= 5) || (__GNUC__ >= 4 && __GNUC_MINOR__ >= 4)
-+typedef unsigned int UTItype __attribute__ ((mode (TI)));
-+#define umul_ppmm(w1, w0, u, v) \
-+  do {                                                                        \
-+    UTItype _r;                                                       \
-+    _r = (UTItype) u * v;                                             \
-+    (w1) = _r >> 64;                                                  \
-+    (w0) = (UDItype) _r;                                              \
-+  } while (0)
-+#elif __GNUC__ > 2 || __GNUC_MINOR__ >= 7
- #define umul_ppmm(w1, w0, u, v) \
-   __asm__ ("dmultu %2,%3" : "=l" (w0), "=h" (w1) : "d" (u), "d" (v))
- #else
index 07064a97bc1c47446c459416ef4481e88be8e76e..0106814f41885eb358b2aae9e8696c2136b31ce2 100644 (file)
@@ -1,6 +1,18 @@
+commit 098bd91f5eae625c7d2ee621e10930fc4434e5e2
+Author: Luka Perkov <luka@openwrt.org>
+Date:   Tue Feb 26 16:16:33 2013 +0000
+
+    gcc: don't build documentation
+    
+    This closes #13039.
+    
+    Signed-off-by: Luka Perkov <luka@openwrt.org>
+    
+    SVN-Revision: 35807
+
 --- a/gcc/Makefile.in
 +++ b/gcc/Makefile.in
-@@ -2941,18 +2941,10 @@ doc/gcc.info: $(TEXI_GCC_FILES)
+@@ -3121,18 +3121,10 @@ doc/gcc.info: $(TEXI_GCC_FILES)
  doc/gccint.info: $(TEXI_GCCINT_FILES)
  doc/cppinternals.info: $(TEXI_CPPINT_FILES)
  
diff --git a/devel/gcc/patches/020-no-plt-backport.patch b/devel/gcc/patches/020-no-plt-backport.patch
deleted file mode 100644 (file)
index b9702c9..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
---- a/gcc/calls.c
-+++ b/gcc/calls.c
-@@ -225,6 +225,12 @@ prepare_call_address (tree fndecl_or_typ
-              && targetm.small_register_classes_for_mode_p (FUNCTION_MODE))
-             ? force_not_mem (memory_address (FUNCTION_MODE, funexp))
-             : memory_address (FUNCTION_MODE, funexp));
-+  else if (flag_pic && !flag_plt && fndecl_or_type
-+         && TREE_CODE (fndecl_or_type) == FUNCTION_DECL
-+         && !targetm.binds_local_p (fndecl_or_type))
-+    {
-+      funexp = force_reg (Pmode, funexp);
-+    }
-   else if (! sibcallp)
-     {
- #ifndef NO_FUNCTION_CSE
---- a/gcc/common.opt
-+++ b/gcc/common.opt
-@@ -1779,6 +1779,10 @@ fpie
- Common Report Var(flag_pie,1) Negative(fPIC)
- Generate position-independent code for executables if possible (small mode)
-+fplt
-+Common Report Var(flag_plt) Init(1)
-+Use PLT for PIC calls (-fno-plt: load the address from GOT at call site)
-+
- fplugin=
- Common Joined RejectNegative Var(common_deferred_options) Defer
- Specify a plugin to load
diff --git a/devel/gcc/patches/040-fix-mips-ICE-PR-68400.patch b/devel/gcc/patches/040-fix-mips-ICE-PR-68400.patch
deleted file mode 100644 (file)
index e88af34..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
---- a/gcc/config/mips/mips.c
-+++ b/gcc/config/mips/mips.c
-@@ -8001,9 +8001,17 @@ mask_low_and_shift_p (machine_mode mode,
- bool
- and_operands_ok (machine_mode mode, rtx op1, rtx op2)
- {
--  return (memory_operand (op1, mode)
--        ? and_load_operand (op2, mode)
--        : and_reg_operand (op2, mode));
-+  if (!memory_operand (op1, mode))
-+    return and_reg_operand (op2, mode);
-+
-+  if (!and_load_operand (op2, mode))
-+    return false;
-+
-+  if (!TARGET_MIPS16 || si_mask_operand(op2, mode))
-+    return true;
-+
-+  op1 = XEXP (op1, 0);
-+  return !(REG_P (op1) && REGNO (op1) == STACK_POINTER_REGNUM);
- }
- /* The canonical form of a mask-low-and-shift-left operation is
diff --git a/devel/gcc/patches/100-uclibc-conf.patch b/devel/gcc/patches/100-uclibc-conf.patch
deleted file mode 100644 (file)
index ff9ad94..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
---- a/contrib/regression/objs-gcc.sh
-+++ b/contrib/regression/objs-gcc.sh
-@@ -106,6 +106,10 @@ if [ $H_REAL_TARGET = $H_REAL_HOST -a $H
-  then
-   make all-gdb all-dejagnu all-ld || exit 1
-   make install-gdb install-dejagnu install-ld || exit 1
-+elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ]
-+ then
-+  make all-gdb all-dejagnu all-ld || exit 1
-+  make install-gdb install-dejagnu install-ld || exit 1
- elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then
-   make bootstrap || exit 1
-   make install || exit 1
---- a/libjava/classpath/ltconfig
-+++ b/libjava/classpath/ltconfig
-@@ -603,7 +603,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-
- # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
- case $host_os in
--linux-gnu*) ;;
-+linux-gnu*|linux-uclibc*) ;;
- linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
- esac
-@@ -1247,7 +1247,7 @@ linux-gnuoldld* | linux-gnuaout* | linux
-   ;;
- # This must be Linux ELF.
--linux-gnu*)
-+linux*)
-   version_type=linux
-   need_lib_prefix=no
-   need_version=no
diff --git a/devel/gcc/patches/110-Fix-MIPS-PR-84790.patch b/devel/gcc/patches/110-Fix-MIPS-PR-84790.patch
new file mode 100644 (file)
index 0000000..643c5e6
--- /dev/null
@@ -0,0 +1,20 @@
+Fix https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84790.
+MIPS16 functions have a static assembler prologue which clobbers
+registers v0 and v1. Add these register clobbers to function call
+instructions.
+
+--- a/gcc/config/mips/mips.c
++++ b/gcc/config/mips/mips.c
+@@ -3098,6 +3098,12 @@ mips_emit_call_insn (rtx pattern, rtx or
+       emit_insn (gen_update_got_version ());
+     }
++  if (TARGET_MIPS16 && TARGET_USE_GOT)
++    {
++      clobber_reg (&CALL_INSN_FUNCTION_USAGE (insn), MIPS16_PIC_TEMP);
++      clobber_reg (&CALL_INSN_FUNCTION_USAGE (insn), MIPS_PROLOGUE_TEMP (word_mode));
++    }
++
+   if (TARGET_MIPS16
+       && TARGET_EXPLICIT_RELOCS
+       && TARGET_CALL_CLOBBERED_GP)
diff --git a/devel/gcc/patches/200-musl_config.patch b/devel/gcc/patches/200-musl_config.patch
deleted file mode 100644 (file)
index b9a5b28..0000000
+++ /dev/null
@@ -1,309 +0,0 @@
-From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Fri, 8 May 2015 08:25:47 +0000 (+0000)
-Subject: [PATCH 2/13] musl libc config
-X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=a9173ceabaf29c16f8ef226fbf98af373a4b2ceb
-
-[PATCH 2/13] musl libc config
-
-2015-05-08  Gregor Richards  <gregor.richards@uwaterloo.ca>
-           Szabolcs Nagy  <szabolcs.nagy@arm.com>
-
-       * config.gcc (LIBC_MUSL): New tm_defines macro.
-       * config/linux.h (OPTION_MUSL): Define.
-       (MUSL_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER32,)
-       (MUSL_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKERX32,)
-       (INCLUDE_DEFAULTS_MUSL_GPP, INCLUDE_DEFAULTS_MUSL_LOCAL,)
-       (INCLUDE_DEFAULTS_MUSL_PREFIX, INCLUDE_DEFAULTS_MUSL_CROSS,)
-       (INCLUDE_DEFAULTS_MUSL_TOOL, INCLUDE_DEFAULTS_MUSL_NATIVE): Define.
-       * config/linux.opt (mmusl): New option.
-       * doc/invoke.texi (GNU/Linux Options): Document -mmusl.
-       * configure.ac (gcc_cv_libc_provides_ssp): Add *-*-musl*.
-       (gcc_cv_target_dl_iterate_phdr): Add *-linux-musl*.
-       * configure: Regenerate.
-
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222904 138bc75d-0d04-0410-961f-82ee72b054a4
----
-
---- a/gcc/config.gcc
-+++ b/gcc/config.gcc
-@@ -575,7 +575,7 @@ case ${target} in
- esac
- # Common C libraries.
--tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3"
-+tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3 LIBC_MUSL=4"
- # 32-bit x86 processors supported by --with-arch=.  Each processor
- # MUST be separated by exactly one space.
-@@ -720,6 +720,9 @@ case ${target} in
-     *-*-*uclibc*)
-       tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC"
-       ;;
-+    *-*-*musl*)
-+      tm_defines="$tm_defines DEFAULT_LIBC=LIBC_MUSL"
-+      ;;
-     *)
-       tm_defines="$tm_defines DEFAULT_LIBC=LIBC_GLIBC"
-       ;;
---- a/gcc/config/linux.h
-+++ b/gcc/config/linux.h
-@@ -32,10 +32,12 @@ see the files COPYING3 and COPYING.RUNTI
- #define OPTION_GLIBC  (DEFAULT_LIBC == LIBC_GLIBC)
- #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC)
- #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC)
-+#define OPTION_MUSL   (DEFAULT_LIBC == LIBC_MUSL)
- #else
- #define OPTION_GLIBC  (linux_libc == LIBC_GLIBC)
- #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC)
- #define OPTION_BIONIC (linux_libc == LIBC_BIONIC)
-+#define OPTION_MUSL   (linux_libc == LIBC_MUSL)
- #endif
- #define GNU_USER_TARGET_OS_CPP_BUILTINS()                     \
-@@ -50,21 +52,25 @@ see the files COPYING3 and COPYING.RUNTI
-     } while (0)
- /* Determine which dynamic linker to use depending on whether GLIBC or
--   uClibc or Bionic is the default C library and whether
--   -muclibc or -mglibc or -mbionic has been passed to change the default.  */
-+   uClibc or Bionic or musl is the default C library and whether
-+   -muclibc or -mglibc or -mbionic or -mmusl has been passed to change
-+   the default.  */
--#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LD1, LD2, LD3)    \
--  "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:" LD1 "}}"
-+#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LIBC4, LD1, LD2, LD3, LD4)        \
-+  "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:%{" LIBC4 ":" LD4 ";:" LD1 "}}}"
- #if DEFAULT_LIBC == LIBC_GLIBC
--#define CHOOSE_DYNAMIC_LINKER(G, U, B) \
--  CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", G, U, B)
-+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
-+  CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", "mmusl", G, U, B, M)
- #elif DEFAULT_LIBC == LIBC_UCLIBC
--#define CHOOSE_DYNAMIC_LINKER(G, U, B) \
--  CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", U, G, B)
-+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
-+  CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", "mmusl", U, G, B, M)
- #elif DEFAULT_LIBC == LIBC_BIONIC
--#define CHOOSE_DYNAMIC_LINKER(G, U, B) \
--  CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", B, G, U)
-+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
-+  CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", "mmusl", B, G, U, M)
-+#elif DEFAULT_LIBC == LIBC_MUSL
-+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
-+  CHOOSE_DYNAMIC_LINKER1 ("mmusl", "mglibc", "muclibc", "mbionic", M, G, U, B)
- #else
- #error "Unsupported DEFAULT_LIBC"
- #endif /* DEFAULT_LIBC */
-@@ -81,24 +87,100 @@ see the files COPYING3 and COPYING.RUNTI
- #define BIONIC_DYNAMIC_LINKER32 "/system/bin/linker"
- #define BIONIC_DYNAMIC_LINKER64 "/system/bin/linker64"
- #define BIONIC_DYNAMIC_LINKERX32 "/system/bin/linkerx32"
-+/* Should be redefined for each target that supports musl.  */
-+#define MUSL_DYNAMIC_LINKER "/dev/null"
-+#define MUSL_DYNAMIC_LINKER32 "/dev/null"
-+#define MUSL_DYNAMIC_LINKER64 "/dev/null"
-+#define MUSL_DYNAMIC_LINKERX32 "/dev/null"
- #define GNU_USER_DYNAMIC_LINKER                                               \
-   CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, \
--                       BIONIC_DYNAMIC_LINKER)
-+                       BIONIC_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER)
- #define GNU_USER_DYNAMIC_LINKER32                                     \
-   CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32, \
--                       BIONIC_DYNAMIC_LINKER32)
-+                       BIONIC_DYNAMIC_LINKER32, MUSL_DYNAMIC_LINKER32)
- #define GNU_USER_DYNAMIC_LINKER64                                     \
-   CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64, \
--                       BIONIC_DYNAMIC_LINKER64)
-+                       BIONIC_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKER64)
- #define GNU_USER_DYNAMIC_LINKERX32                                    \
-   CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERX32, UCLIBC_DYNAMIC_LINKERX32, \
--                       BIONIC_DYNAMIC_LINKERX32)
-+                       BIONIC_DYNAMIC_LINKERX32, MUSL_DYNAMIC_LINKERX32)
- /* Whether we have Bionic libc runtime */
- #undef TARGET_HAS_BIONIC
- #define TARGET_HAS_BIONIC (OPTION_BIONIC)
-+/* musl avoids problematic includes by rearranging the include directories.
-+ * Unfortunately, this is mostly duplicated from cppdefault.c */
-+#if DEFAULT_LIBC == LIBC_MUSL
-+#define INCLUDE_DEFAULTS_MUSL_GPP                     \
-+    { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1,             \
-+      GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 },         \
-+    { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1,                \
-+      GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 },         \
-+    { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1,    \
-+      GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 },
-+
-+#ifdef LOCAL_INCLUDE_DIR
-+#define INCLUDE_DEFAULTS_MUSL_LOCAL                   \
-+    { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 },             \
-+    { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 },
-+#else
-+#define INCLUDE_DEFAULTS_MUSL_LOCAL
-+#endif
-+
-+#ifdef PREFIX_INCLUDE_DIR
-+#define INCLUDE_DEFAULTS_MUSL_PREFIX                  \
-+    { PREFIX_INCLUDE_DIR, 0, 0, 1, 0, 0},
-+#else
-+#define INCLUDE_DEFAULTS_MUSL_PREFIX
-+#endif
-+
-+#ifdef CROSS_INCLUDE_DIR
-+#define INCLUDE_DEFAULTS_MUSL_CROSS                   \
-+    { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0, 0},
-+#else
-+#define INCLUDE_DEFAULTS_MUSL_CROSS
-+#endif
-+
-+#ifdef TOOL_INCLUDE_DIR
-+#define INCLUDE_DEFAULTS_MUSL_TOOL                    \
-+    { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0},
-+#else
-+#define INCLUDE_DEFAULTS_MUSL_TOOL
-+#endif
-+
-+#ifdef NATIVE_SYSTEM_HEADER_DIR
-+#define INCLUDE_DEFAULTS_MUSL_NATIVE                  \
-+    { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 },      \
-+    { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 0 },
-+#else
-+#define INCLUDE_DEFAULTS_MUSL_NATIVE
-+#endif
-+
-+#if defined (CROSS_DIRECTORY_STRUCTURE) && !defined (TARGET_SYSTEM_ROOT)
-+# undef INCLUDE_DEFAULTS_MUSL_LOCAL
-+# define INCLUDE_DEFAULTS_MUSL_LOCAL
-+# undef INCLUDE_DEFAULTS_MUSL_NATIVE
-+# define INCLUDE_DEFAULTS_MUSL_NATIVE
-+#else
-+# undef INCLUDE_DEFAULTS_MUSL_CROSS
-+# define INCLUDE_DEFAULTS_MUSL_CROSS
-+#endif
-+
-+#undef INCLUDE_DEFAULTS
-+#define INCLUDE_DEFAULTS                              \
-+  {                                                   \
-+    INCLUDE_DEFAULTS_MUSL_GPP                         \
-+    INCLUDE_DEFAULTS_MUSL_PREFIX                      \
-+    INCLUDE_DEFAULTS_MUSL_CROSS                               \
-+    INCLUDE_DEFAULTS_MUSL_TOOL                                \
-+    INCLUDE_DEFAULTS_MUSL_NATIVE                      \
-+    { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 },           \
-+    { 0, 0, 0, 0, 0, 0 }                              \
-+  }
-+#endif
-+
- #if (DEFAULT_LIBC == LIBC_UCLIBC) && defined (SINGLE_LIBC) /* uClinux */
- /* This is a *uclinux* target.  We don't define below macros to normal linux
-    versions, because doing so would require *uclinux* targets to include
---- a/gcc/config/linux.opt
-+++ b/gcc/config/linux.opt
-@@ -28,5 +28,9 @@ Target Report RejectNegative Var(linux_l
- Use GNU C library
- muclibc
--Target Report RejectNegative Var(linux_libc,LIBC_UCLIBC) Negative(mbionic)
-+Target Report RejectNegative Var(linux_libc,LIBC_UCLIBC) Negative(mmusl)
- Use uClibc C library
-+
-+mmusl
-+Target Report RejectNegative Var(linux_libc,LIBC_MUSL) Negative(mbionic)
-+Use musl C library
---- a/gcc/configure
-+++ b/gcc/configure
-@@ -27833,6 +27833,9 @@ if test "${gcc_cv_libc_provides_ssp+set}
- else
-   gcc_cv_libc_provides_ssp=no
-     case "$target" in
-+       *-*-musl*)
-+       # All versions of musl provide stack protector
-+       gcc_cv_libc_provides_ssp=yes;;
-        *-*-linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu)
-       # glibc 2.4 and later provides __stack_chk_fail and
-       # either __stack_chk_guard, or TLS access to stack guard canary.
-@@ -27865,6 +27868,7 @@ fi
-        # <http://gcc.gnu.org/ml/gcc/2008-10/msg00130.html>) and for now
-        # simply assert that glibc does provide this, which is true for all
-        # realistically usable GNU/Hurd configurations.
-+       # All supported versions of musl provide it as well
-        gcc_cv_libc_provides_ssp=yes;;
-        *-*-darwin* | *-*-freebsd*)
-        ac_fn_c_check_func "$LINENO" "__stack_chk_fail" "ac_cv_func___stack_chk_fail"
-@@ -27961,6 +27965,9 @@ case "$target" in
-       gcc_cv_target_dl_iterate_phdr=no
-     fi
-     ;;
-+  *-linux-musl*)
-+    gcc_cv_target_dl_iterate_phdr=yes
-+    ;;
- esac
- if test x$gcc_cv_target_dl_iterate_phdr = xyes; then
---- a/gcc/configure.ac
-+++ b/gcc/configure.ac
-@@ -5287,6 +5287,9 @@ AC_CACHE_CHECK(__stack_chk_fail in targe
-       gcc_cv_libc_provides_ssp,
-       [gcc_cv_libc_provides_ssp=no
-     case "$target" in
-+       *-*-musl*)
-+       # All versions of musl provide stack protector
-+       gcc_cv_libc_provides_ssp=yes;;
-        *-*-linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu)
-       # glibc 2.4 and later provides __stack_chk_fail and
-       # either __stack_chk_guard, or TLS access to stack guard canary.
-@@ -5313,6 +5316,7 @@ AC_CACHE_CHECK(__stack_chk_fail in targe
-        # <http://gcc.gnu.org/ml/gcc/2008-10/msg00130.html>) and for now
-        # simply assert that glibc does provide this, which is true for all
-        # realistically usable GNU/Hurd configurations.
-+       # All supported versions of musl provide it as well
-        gcc_cv_libc_provides_ssp=yes;;
-        *-*-darwin* | *-*-freebsd*)
-        AC_CHECK_FUNC(__stack_chk_fail,[gcc_cv_libc_provides_ssp=yes],
-@@ -5386,6 +5390,9 @@ case "$target" in
-       gcc_cv_target_dl_iterate_phdr=no
-     fi
-     ;;
-+  *-linux-musl*)
-+    gcc_cv_target_dl_iterate_phdr=yes
-+    ;;
- esac
- GCC_TARGET_TEMPLATE([TARGET_DL_ITERATE_PHDR])
- if test x$gcc_cv_target_dl_iterate_phdr = xyes; then
---- a/gcc/doc/invoke.texi
-+++ b/gcc/doc/invoke.texi
-@@ -667,7 +667,7 @@ Objective-C and Objective-C++ Dialects}.
- -mcpu=@var{cpu}}
- @emph{GNU/Linux Options}
--@gccoptlist{-mglibc -muclibc -mbionic -mandroid @gol
-+@gccoptlist{-mglibc -muclibc -mmusl -mbionic -mandroid @gol
- -tno-android-cc -tno-android-ld}
- @emph{H8/300 Options}
-@@ -15340,13 +15340,19 @@ These @samp{-m} options are defined for
- @item -mglibc
- @opindex mglibc
- Use the GNU C library.  This is the default except
--on @samp{*-*-linux-*uclibc*} and @samp{*-*-linux-*android*} targets.
-+on @samp{*-*-linux-*uclibc*}, @samp{*-*-linux-*musl*} and
-+@samp{*-*-linux-*android*} targets.
- @item -muclibc
- @opindex muclibc
- Use uClibc C library.  This is the default on
- @samp{*-*-linux-*uclibc*} targets.
-+@item -mmusl
-+@opindex mmusl
-+Use the musl C library.  This is the default on
-+@samp{*-*-linux-*musl*} targets.
-+
- @item -mbionic
- @opindex mbionic
- Use Bionic C library.  This is the default on
diff --git a/devel/gcc/patches/201-musl_arm.patch b/devel/gcc/patches/201-musl_arm.patch
deleted file mode 100644 (file)
index 27a26af..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Wed, 27 May 2015 13:17:11 +0000 (+0000)
-Subject: [PATCH 4/13] arm musl support
-X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=de799bd087ab9a179768fea75bd195a31d3432a4
-
-[PATCH 4/13] arm musl support
-
-On behalf of szabolcs.nagy@arm.com
-
-2015-05-27  Gregor Richards  <gregor.richards@uwaterloo.ca>
-
-       * config/arm/linux-eabi.h (MUSL_DYNAMIC_LINKER): Define.
-
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223749 138bc75d-0d04-0410-961f-82ee72b054a4
----
-
---- a/gcc/config/arm/linux-eabi.h
-+++ b/gcc/config/arm/linux-eabi.h
-@@ -77,6 +77,23 @@
-     %{mfloat-abi=soft*:" GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "} \
-     %{!mfloat-abi=*:" GLIBC_DYNAMIC_LINKER_DEFAULT "}"
-+/* For ARM musl currently supports four dynamic linkers:
-+   - ld-musl-arm.so.1 - for the EABI-derived soft-float ABI
-+   - ld-musl-armhf.so.1 - for the EABI-derived hard-float ABI
-+   - ld-musl-armeb.so.1 - for the EABI-derived soft-float ABI, EB
-+   - ld-musl-armebhf.so.1 - for the EABI-derived hard-float ABI, EB
-+   musl does not support the legacy OABI mode.
-+   All the dynamic linkers live in /lib.
-+   We default to soft-float, EL. */
-+#undef  MUSL_DYNAMIC_LINKER
-+#if TARGET_BIG_ENDIAN_DEFAULT
-+#define MUSL_DYNAMIC_LINKER_E "%{mlittle-endian:;:eb}"
-+#else
-+#define MUSL_DYNAMIC_LINKER_E "%{mbig-endian:eb}"
-+#endif
-+#define MUSL_DYNAMIC_LINKER \
-+  "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}.so.1"
-+
- /* At this point, bpabi.h will have clobbered LINK_SPEC.  We want to
-    use the GNU/Linux version, not the generic BPABI version.  */
- #undef  LINK_SPEC
diff --git a/devel/gcc/patches/202-musl_mips.patch b/devel/gcc/patches/202-musl_mips.patch
deleted file mode 100644 (file)
index 816dd8d..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Fri, 8 May 2015 15:16:50 +0000 (+0000)
-Subject: [PATCH 6/13] mips musl support
-X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=2550b6a866c887472b587bef87d433c51cf1ebc8
-
-[PATCH 6/13] mips musl support
-
-2015-05-08  Gregor Richards  <gregor.richards@uwaterloo.ca>
-           Szabolcs Nagy  <szabolcs.nagy@arm.com>
-
-       * config/mips/linux.h (MUSL_DYNAMIC_LINKER32): Define.
-       (MUSL_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKERN32): Define.
-       (GNU_USER_DYNAMIC_LINKERN32): Update.
-
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222915 138bc75d-0d04-0410-961f-82ee72b054a4
----
-
---- a/gcc/config/mips/linux.h
-+++ b/gcc/config/mips/linux.h
-@@ -37,7 +37,13 @@ along with GCC; see the file COPYING3.
- #define UCLIBC_DYNAMIC_LINKERN32 \
-   "%{mnan=2008:/lib32/ld-uClibc-mipsn8.so.0;:/lib32/ld-uClibc.so.0}"
-+#undef MUSL_DYNAMIC_LINKER32
-+#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-mips%{EL:el}%{msoft-float:-sf}.so.1"
-+#undef MUSL_DYNAMIC_LINKER64
-+#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-mips64%{EL:el}%{msoft-float:-sf}.so.1"
-+#define MUSL_DYNAMIC_LINKERN32 "/lib/ld-musl-mipsn32%{EL:el}%{msoft-float:-sf}.so.1"
-+
- #define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32"
- #define GNU_USER_DYNAMIC_LINKERN32 \
-   CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32, \
--                         BIONIC_DYNAMIC_LINKERN32)
-+                         BIONIC_DYNAMIC_LINKERN32, MUSL_DYNAMIC_LINKERN32)
diff --git a/devel/gcc/patches/203-musl_powerpc.patch b/devel/gcc/patches/203-musl_powerpc.patch
deleted file mode 100644 (file)
index b4f34e8..0000000
+++ /dev/null
@@ -1,209 +0,0 @@
-
-gcc/Changelog:
-
-2015-04-24  Gregor Richards  <gregor.richards@uwaterloo.ca>
-           Szabolcs Nagy  <szabolcs.nagy@arm.com>
-
-       * config.gcc (secure_plt): Add *-linux*-musl*.
-       * config/rs6000/linux64.h (MUSL_DYNAMIC_LINKER32): Define.
-       (MUSL_DYNAMIC_LINKER64): Define.
-       (GNU_USER_DYNAMIC_LINKER32): Update.
-       (GNU_USER_DYNAMIC_LINKER64): Update.
-       (CHOOSE_DYNAMIC_LINKER): Update.
-
-       * config/rs6000/secureplt.h (LINK_SECURE_PLT_DEFAULT_SPEC): Define.
-       * config/rs6000/sysv4.h (GNU_USER_DYNAMIC_LINKER): Update.
-       (MUSL_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER_E,)
-       (INCLUDE_DEFAULTS_MUSL_GPP, INCLUDE_DEFAULTS_MUSL_LOCAL,)
-       (INCLUDE_DEFAULTS_MUSL_PREFIX, INCLUDE_DEFAULTS_MUSL_CROSS,)
-       (INCLUDE_DEFAULTS_MUSL_TOOL, INCLUDE_DEFAULTS_MUSL_NATIVE): Define.
-       (LINK_SECURE_PLT_DEFAULT_SPEC): Define.
-       (CHOOSE_DYNAMIC_LINKER, LINK_TARGET_SPEC, LINK_OS_LINUX_SPEC): Update.
-
-       * config/rs6000/sysv4le.h (MUSL_DYNAMIC_LINKER_E): Define.
-
---- a/gcc/config/rs6000/linux64.h
-+++ b/gcc/config/rs6000/linux64.h
-@@ -365,17 +365,21 @@ extern int dot_symbols;
- #endif
- #define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
- #define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
-+#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E ".so.1"
-+#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-powerpc64" MUSL_DYNAMIC_LINKER_E ".so.1"
- #if DEFAULT_LIBC == LIBC_UCLIBC
--#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
-+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}"
- #elif DEFAULT_LIBC == LIBC_GLIBC
--#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}"
-+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{muclibc:" U ";:%{mmusl:" M ";:" G "}}"
-+#elif DEFAULT_LIBC == LIBC_MUSL
-+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{muclibc:" U ";:" M "}}"
- #else
- #error "Unsupported DEFAULT_LIBC"
- #endif
- #define GNU_USER_DYNAMIC_LINKER32 \
--  CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32)
-+  CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32, MUSL_DYNAMIC_LINKER32)
- #define GNU_USER_DYNAMIC_LINKER64 \
--  CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64)
-+  CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKER64)
- #undef  DEFAULT_ASM_ENDIAN
- #if (TARGET_DEFAULT & MASK_LITTLE_ENDIAN)
---- a/gcc/config/rs6000/secureplt.h
-+++ b/gcc/config/rs6000/secureplt.h
-@@ -18,3 +18,4 @@ along with GCC; see the file COPYING3.
- <http://www.gnu.org/licenses/>.  */
- #define CC1_SECURE_PLT_DEFAULT_SPEC "-msecure-plt"
-+#define LINK_SECURE_PLT_DEFAULT_SPEC "--secure-plt"
---- a/gcc/config/rs6000/sysv4.h
-+++ b/gcc/config/rs6000/sysv4.h
-@@ -537,6 +537,9 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEF
- #ifndef CC1_SECURE_PLT_DEFAULT_SPEC
- #define CC1_SECURE_PLT_DEFAULT_SPEC ""
- #endif
-+#ifndef LINK_SECURE_PLT_DEFAULT_SPEC
-+#define LINK_SECURE_PLT_DEFAULT_SPEC ""
-+#endif
- /* Pass -G xxx to the compiler.  */
- #undef CC1_SPEC
-@@ -574,7 +577,8 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEF
- %{R*} \
- %(link_shlib) \
- %{!T*: %(link_start) } \
--%(link_os)"
-+%(link_os)" \
-+"%{!mbss-plt: %{!msecure-plt: %(link_secure_plt_default)}}"
- /* Shared libraries are not default.  */
- #define LINK_SHLIB_SPEC "\
-@@ -757,17 +761,22 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEF
- #define LINK_START_LINUX_SPEC ""
-+#define MUSL_DYNAMIC_LINKER_E ENDIAN_SELECT("","le","")
-+
- #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
- #define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
-+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E ".so.1"
- #if DEFAULT_LIBC == LIBC_UCLIBC
--#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
-+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}"
-+#elif DEFAULT_LIBC == LIBC_MUSL
-+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{muclibc:" U ";:" M "}}"
- #elif !defined (DEFAULT_LIBC) || DEFAULT_LIBC == LIBC_GLIBC
--#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}"
-+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{muclibc:" U ";:%{mmusl:" M ";:" G "}}"
- #else
- #error "Unsupported DEFAULT_LIBC"
- #endif
- #define GNU_USER_DYNAMIC_LINKER \
--  CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER)
-+  CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER)
- #define LINK_OS_LINUX_SPEC "-m elf32ppclinux %{!shared: %{!static: \
-   %{rdynamic:-export-dynamic} \
-@@ -889,6 +898,7 @@ ncrtn.o%s"
-   { "link_os_openbsd",                LINK_OS_OPENBSD_SPEC },                 \
-   { "link_os_default",                LINK_OS_DEFAULT_SPEC },                 \
-   { "cc1_secure_plt_default", CC1_SECURE_PLT_DEFAULT_SPEC },          \
-+  { "link_secure_plt_default",        LINK_SECURE_PLT_DEFAULT_SPEC },         \
-   { "cpp_os_ads",             CPP_OS_ADS_SPEC },                      \
-   { "cpp_os_yellowknife",     CPP_OS_YELLOWKNIFE_SPEC },              \
-   { "cpp_os_mvme",            CPP_OS_MVME_SPEC },                     \
-@@ -943,3 +953,72 @@ ncrtn.o%s"
- /* This target uses the sysv4.opt file.  */
- #define TARGET_USES_SYSV4_OPT 1
-+/* Include order changes for musl, same as in generic linux.h.  */
-+#if DEFAULT_LIBC == LIBC_MUSL
-+#define INCLUDE_DEFAULTS_MUSL_GPP                     \
-+    { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1,             \
-+      GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 },         \
-+    { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1,                \
-+      GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 },         \
-+    { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1,    \
-+      GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 },
-+
-+#ifdef LOCAL_INCLUDE_DIR
-+#define INCLUDE_DEFAULTS_MUSL_LOCAL                   \
-+    { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 },             \
-+    { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 },
-+#else
-+#define INCLUDE_DEFAULTS_MUSL_LOCAL
-+#endif
-+
-+#ifdef PREFIX_INCLUDE_DIR
-+#define INCLUDE_DEFAULTS_MUSL_PREFIX                  \
-+    { PREFIX_INCLUDE_DIR, 0, 0, 1, 0, 0},
-+#else
-+#define INCLUDE_DEFAULTS_MUSL_PREFIX
-+#endif
-+
-+#ifdef CROSS_INCLUDE_DIR
-+#define INCLUDE_DEFAULTS_MUSL_CROSS                   \
-+    { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0, 0},
-+#else
-+#define INCLUDE_DEFAULTS_MUSL_CROSS
-+#endif
-+
-+#ifdef TOOL_INCLUDE_DIR
-+#define INCLUDE_DEFAULTS_MUSL_TOOL                    \
-+    { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0},
-+#else
-+#define INCLUDE_DEFAULTS_MUSL_TOOL
-+#endif
-+
-+#ifdef NATIVE_SYSTEM_HEADER_DIR
-+#define INCLUDE_DEFAULTS_MUSL_NATIVE                  \
-+    { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 },      \
-+    { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 0 },
-+#else
-+#define INCLUDE_DEFAULTS_MUSL_NATIVE
-+#endif
-+
-+#if defined (CROSS_DIRECTORY_STRUCTURE) && !defined (TARGET_SYSTEM_ROOT)
-+# undef INCLUDE_DEFAULTS_MUSL_LOCAL
-+# define INCLUDE_DEFAULTS_MUSL_LOCAL
-+# undef INCLUDE_DEFAULTS_MUSL_NATIVE
-+# define INCLUDE_DEFAULTS_MUSL_NATIVE
-+#else
-+# undef INCLUDE_DEFAULTS_MUSL_CROSS
-+# define INCLUDE_DEFAULTS_MUSL_CROSS
-+#endif
-+
-+#undef INCLUDE_DEFAULTS
-+#define INCLUDE_DEFAULTS                              \
-+  {                                                   \
-+    INCLUDE_DEFAULTS_MUSL_GPP                         \
-+    INCLUDE_DEFAULTS_MUSL_PREFIX                      \
-+    INCLUDE_DEFAULTS_MUSL_CROSS                               \
-+    INCLUDE_DEFAULTS_MUSL_TOOL                                \
-+    INCLUDE_DEFAULTS_MUSL_NATIVE                      \
-+    { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 },           \
-+    { 0, 0, 0, 0, 0, 0 }                              \
-+  }
-+#endif
---- a/gcc/config/rs6000/sysv4le.h
-+++ b/gcc/config/rs6000/sysv4le.h
-@@ -31,3 +31,5 @@
- /* Little-endian PowerPC64 Linux uses the ELF v2 ABI by default.  */
- #define LINUX64_DEFAULT_ABI_ELFv2
-+#undef MUSL_DYNAMIC_LINKER_E
-+#define MUSL_DYNAMIC_LINKER_E ENDIAN_SELECT("","le","le")
---- a/gcc/config.gcc
-+++ b/gcc/config.gcc
-@@ -2416,6 +2416,10 @@ powerpc*-*-linux*)
-           powerpc*-*-linux*paired*)
-               tm_file="${tm_file} rs6000/750cl.h" ;;
-       esac
-+      case ${target} in
-+              *-linux*-musl*)
-+                      enable_secureplt=yes ;;
-+      esac
-       if test x${enable_secureplt} = xyes; then
-               tm_file="rs6000/secureplt.h ${tm_file}"
-       fi
diff --git a/devel/gcc/patches/204-musl_sh.patch b/devel/gcc/patches/204-musl_sh.patch
deleted file mode 100644 (file)
index 8c3753d..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-gcc/Changelog:
-
-2015-04-27  Gregor Richards  <gregor.richards@uwaterloo.ca>
-           Szabolcs Nagy  <szabolcs.nagy@arm.com>
-
-       * config/sh/linux.h (MUSL_DYNAMIC_LINKER): Define.
-       (MUSL_DYNAMIC_LINKER_E, MUSL_DYNAMIC_LINKER_FP): Define.
-
---- a/gcc/config/sh/linux.h
-+++ b/gcc/config/sh/linux.h
-@@ -43,6 +43,28 @@ along with GCC; see the file COPYING3.
- #define TARGET_ASM_FILE_END file_end_indicate_exec_stack
-+#if TARGET_ENDIAN_DEFAULT == MASK_LITTLE_ENDIAN
-+#define MUSL_DYNAMIC_LINKER_E "%{mb:eb}"
-+#else
-+#define MUSL_DYNAMIC_LINKER_E "%{!ml:eb}"
-+#endif
-+
-+#if TARGET_CPU_DEFAULT & ( MASK_HARD_SH2A_DOUBLE | MASK_SH4 )
-+/* "-nofpu" if any nofpu option is specified */
-+#define MUSL_DYNAMIC_LINKER_FP \
-+  "%{m1|m2|m2a-nofpu|m3|m4-nofpu|m4-100-nofpu|m4-200-nofpu|m4-300-nofpu|" \
-+  "m4-340|m4-400|m4-500|m4al|m5-32media-nofpu|m5-64media-nofpu|" \
-+  "m5-compact-nofpu:-nofpu}"
-+#else
-+/* "-nofpu" if none of the hard fpu options are specified */
-+#define MUSL_DYNAMIC_LINKER_FP \
-+  "%{m2a|m4|m4-100|m4-200|m4-300|m4a|m5-32media|m5-64media|m5-compact:;:-nofpu}"
-+#endif
-+
-+#undef MUSL_DYNAMIC_LINKER
-+#define MUSL_DYNAMIC_LINKER \
-+  "/lib/ld-musl-sh" MUSL_DYNAMIC_LINKER_E MUSL_DYNAMIC_LINKER_FP ".so.1"
-+
- #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
- #undef SUBTARGET_LINK_EMUL_SUFFIX
diff --git a/devel/gcc/patches/205-musl_x86.patch b/devel/gcc/patches/205-musl_x86.patch
deleted file mode 100644 (file)
index 8772328..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Fri, 15 May 2015 13:20:01 +0000 (+0000)
-Subject: [PATCH 9/13] x86 musl support
-X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=5551c8d927c17f60837f15f8dfe46f945ba3fa9c
-
-[PATCH 9/13] x86 musl support
-
-On behalf of Szabolcs Nagy.
-
-2015-05-15  Gregor Richards  <gregor.richards@uwaterloo.ca>
-
-       * config/i386/linux.h (MUSL_DYNAMIC_LINKER): Define.
-       * config/i386/linux64.h (MUSL_DYNAMIC_LINKER32): Define.
-       (MUSL_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKERX32): Define.
-
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223218 138bc75d-0d04-0410-961f-82ee72b054a4
----
-
---- a/gcc/config/i386/linux.h
-+++ b/gcc/config/i386/linux.h
-@@ -21,3 +21,6 @@ along with GCC; see the file COPYING3.
- #define GNU_USER_LINK_EMULATION "elf_i386"
- #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
-+
-+#undef MUSL_DYNAMIC_LINKER
-+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-i386.so.1"
---- a/gcc/config/i386/linux64.h
-+++ b/gcc/config/i386/linux64.h
-@@ -30,3 +30,10 @@ see the files COPYING3 and COPYING.RUNTI
- #define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
- #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2"
- #define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2"
-+
-+#undef MUSL_DYNAMIC_LINKER32
-+#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-i386.so.1"
-+#undef MUSL_DYNAMIC_LINKER64
-+#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-x86_64.so.1"
-+#undef MUSL_DYNAMIC_LINKERX32
-+#define MUSL_DYNAMIC_LINKERX32 "/lib/ld-musl-x32.so.1"
diff --git a/devel/gcc/patches/206-musl_aarch64.patch b/devel/gcc/patches/206-musl_aarch64.patch
deleted file mode 100644 (file)
index 6925a02..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-From: jgreenhalgh <jgreenhalgh@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Wed, 27 May 2015 16:46:39 +0000 (+0000)
-Subject: [PATCH 3/13] aarch64 musl support
-X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=b3ff21cf0531be91bc3fb8200296a7633090ec78
-
-[PATCH 3/13] aarch64 musl support
-
-gcc/Changelog:
-
-2015-05-27  Gregor Richards  <gregor.richards@uwaterloo.ca>
-           Szabolcs Nagy  <szabolcs.nagy@arm.com>
-
-       * config/aarch64/aarch64-linux.h (MUSL_DYNAMIC_LINKER): Define.
-
-
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223766 138bc75d-0d04-0410-961f-82ee72b054a4
----
-
---- a/gcc/config/aarch64/aarch64-linux.h
-+++ b/gcc/config/aarch64/aarch64-linux.h
-@@ -23,6 +23,9 @@
- #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
-+#undef MUSL_DYNAMIC_LINKER
-+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
-+
- #undef  ASAN_CC1_SPEC
- #define ASAN_CC1_SPEC "%{%:sanitize(address):-funwind-tables}"
diff --git a/devel/gcc/patches/207-musl_fixincludes.patch b/devel/gcc/patches/207-musl_fixincludes.patch
deleted file mode 100644 (file)
index 0ff33d3..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Wed, 22 Apr 2015 14:18:16 +0000 (+0000)
-Subject: fixincludes update for musl support
-X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=2dc727de2e87c2756a514cbb43cea23c99deaa3d
-
-fixincludes update for musl support
-
-On behalf of Szabolcs.Nagy@arm.com
-
-2015-04-22  Gregor Richards  <gregor.richards@uwaterloo.ca>
-
-       * mkfixinc.sh: Add *-musl* with no fixes.
-
-
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222327 138bc75d-0d04-0410-961f-82ee72b054a4
----
-
---- a/fixincludes/mkfixinc.sh
-+++ b/fixincludes/mkfixinc.sh
-@@ -19,7 +19,8 @@ case $machine in
-     powerpc-*-eabi*    | \
-     powerpc-*-rtems*   | \
-     powerpcle-*-eabisim* | \
--    powerpcle-*-eabi* )
-+    powerpcle-*-eabi* | \
-+    *-musl* )
-       #  IF there is no include fixing,
-       #  THEN create a no-op fixer and exit
-       (echo "#! /bin/sh" ; echo "exit 0" ) > ${target}
diff --git a/devel/gcc/patches/209-musl_libstdc++.patch b/devel/gcc/patches/209-musl_libstdc++.patch
deleted file mode 100644 (file)
index d2414d0..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Wed, 22 Apr 2015 14:24:11 +0000 (+0000)
-Subject: libstdc++, libgfortran gthr workaround for musl
-X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=1e5f711c11cb80ce609db9e9c1d8b2da0f7b5b61
-
-libstdc++, libgfortran gthr workaround for musl
-
-On behalf of szabolcs.nagy@arm.com
-
-[libstdc++-v3/]
-2015-04-22  Szabolcs Nagy  <szabolcs.nagy@arm.com>
-
-       * config/os/generic/os_defines.h (_GLIBCXX_GTHREAD_USE_WEAK): Define.
-       * configure.host (os_include_dir): Set to "os/generic" for linux-musl*.
-
-[libgfortran/]
-2015-04-22  Szabolcs Nagy  <szabolcs.nagy@arm.com>
-
-       * acinclude.m4 (GTHREAD_USE_WEAK): Define as 0 for *-*-musl*.
-       * configure: Regenerate.
-
-
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222329 138bc75d-0d04-0410-961f-82ee72b054a4
----
-
---- a/libgfortran/acinclude.m4
-+++ b/libgfortran/acinclude.m4
-@@ -100,7 +100,7 @@ void foo (void);
-             [Define to 1 if the target supports #pragma weak])
-   fi
-   case "$host" in
--    *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* )
-+    *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* | *-*-musl* )
-       AC_DEFINE(GTHREAD_USE_WEAK, 0,
-               [Define to 0 if the target shouldn't use #pragma weak])
-       ;;
---- a/libgfortran/configure
-+++ b/libgfortran/configure
-@@ -26456,7 +26456,7 @@ $as_echo "#define SUPPORTS_WEAK 1" >>con
-   fi
-   case "$host" in
--    *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* )
-+    *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* | *-*-musl* )
- $as_echo "#define GTHREAD_USE_WEAK 0" >>confdefs.h
---- a/libstdc++-v3/config/os/generic/os_defines.h
-+++ b/libstdc++-v3/config/os/generic/os_defines.h
-@@ -33,4 +33,9 @@
- // System-specific #define, typedefs, corrections, etc, go here.  This
- // file will come before all others.
-+// Disable the weak reference logic in gthr.h for os/generic because it
-+// is broken on every platform unless there is implementation specific
-+// workaround in gthr-posix.h and at link-time for static linking.
-+#define _GLIBCXX_GTHREAD_USE_WEAK 0
-+
- #endif
---- a/libstdc++-v3/configure.host
-+++ b/libstdc++-v3/configure.host
-@@ -273,6 +273,9 @@ case "${host_os}" in
-   freebsd*)
-     os_include_dir="os/bsd/freebsd"
-     ;;
-+  linux-musl*)
-+    os_include_dir="os/generic"
-+    ;;
-   gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu)
-     if [ "$uclibc" = "yes" ]; then
-       os_include_dir="os/uclibc"
index 30f42e9f7c7feb56108887bf3458d5a7e24e13a4..eebee9175cd0cebe5afea6d231cc0cbb93c4b6ae 100644 (file)
@@ -1,6 +1,21 @@
+commit 1877bc9d8f2be143fbe530347a945850d0ecd234
+Author: Steven Barth <cyrus@openwrt.org>
+Date:   Mon Jun 22 10:31:07 2015 +0000
+
+    gcc/musl: rework SSP-support
+    
+    Make musl provide libssp_nonshared.a and make GCC link it unconditionally
+    if musl is used. This should be a no-op if SSP is disabled and seems to be
+    the only reliable way of dealing with SSP over all packages due to the mess
+    that is linkerflags handling in packages.
+    
+    Signed-off-by: Steven Barth <steven@midlink.org>
+    
+    SVN-Revision: 46108
+
 --- a/gcc/gcc.c
 +++ b/gcc/gcc.c
-@@ -727,7 +727,9 @@ proper position among the other output f
+@@ -861,7 +861,9 @@ proper position among the other output f
  #endif
  
  #ifndef LINK_SSP_SPEC
diff --git a/devel/gcc/patches/240-musl-libitm-fixes.patch b/devel/gcc/patches/240-musl-libitm-fixes.patch
deleted file mode 100644 (file)
index 533cb68..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Wed, 22 Apr 2015 14:11:25 +0000 (+0000)
-Subject: libitm fixes for musl support
-X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=e53a4d49c3d03ab8eaddb073cf972c1c46d75338
-
-libitm fixes for musl support
-
-On behalf of Szabolcs.Nagy@arm.com
-
-2015-04-22  Gregor Richards  <gregor.richards@uwaterloo.ca>
-
-       * config/arm/hwcap.cc: Use fcntl.h instead of sys/fcntl.h.
-       * config/linux/x86/tls.h: Only use __GLIBC_PREREQ if defined.
-
-
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222325 138bc75d-0d04-0410-961f-82ee72b054a4
----
-
---- a/libitm/config/arm/hwcap.cc
-+++ b/libitm/config/arm/hwcap.cc
-@@ -40,7 +40,7 @@ int GTM_hwcap HIDDEN = 0
- #ifdef __linux__
- #include <unistd.h>
--#include <sys/fcntl.h>
-+#include <fcntl.h>
- #include <elf.h>
- static void __attribute__((constructor))
---- a/libitm/config/linux/x86/tls.h
-+++ b/libitm/config/linux/x86/tls.h
-@@ -25,16 +25,19 @@
- #ifndef LIBITM_X86_TLS_H
- #define LIBITM_X86_TLS_H 1
--#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10)
-+#if defined(__GLIBC_PREREQ)
-+#if __GLIBC_PREREQ(2, 10)
- /* Use slots in the TCB head rather than __thread lookups.
-    GLIBC has reserved words 10 through 13 for TM.  */
- #define HAVE_ARCH_GTM_THREAD 1
- #define HAVE_ARCH_GTM_THREAD_DISP 1
- #endif
-+#endif
- #include "config/generic/tls.h"
--#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10)
-+#if defined(__GLIBC_PREREQ)
-+#if __GLIBC_PREREQ(2, 10)
- namespace GTM HIDDEN {
- #ifdef __x86_64__
-@@ -101,5 +104,6 @@ static inline void set_abi_disp(struct a
- } // namespace GTM
- #endif /* >= GLIBC 2.10 */
-+#endif
- #endif // LIBITM_X86_TLS_H
diff --git a/devel/gcc/patches/250-add-musl.patch b/devel/gcc/patches/250-add-musl.patch
deleted file mode 100644 (file)
index 8cbedde..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Fri, 8 May 2015 08:30:40 +0000 (+0000)
-Subject: [PATCH 0/13] Add musl support to GCC
-X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=f2d678afa5b8385d763b93772d73d6bf80a9739e
-
-[PATCH 0/13] Add musl support to GCC
-
-2015-05-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
-
-       * config/glibc-stdint.h (OPTION_MUSL): Define.
-       (INT_FAST16_TYPE, INT_FAST32_TYPE, UINT_FAST16_TYPE, UINT_FAST32_TYPE):
-       Change the definition based on OPTION_MUSL for 64 bit targets.
-       * config/linux.h (OPTION_MUSL): Redefine.
-       * config/alpha/linux.h (OPTION_MUSL): Redefine.
-       * config/rs6000/linux.h (OPTION_MUSL): Redefine.
-       * config/rs6000/linux64.h (OPTION_MUSL): Redefine.
-
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222905 138bc75d-0d04-0410-961f-82ee72b054a4
----
-
---- a/gcc/config/alpha/linux.h
-+++ b/gcc/config/alpha/linux.h
-@@ -61,10 +61,14 @@ along with GCC; see the file COPYING3.
- #define OPTION_GLIBC  (DEFAULT_LIBC == LIBC_GLIBC)
- #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC)
- #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC)
-+#undef OPTION_MUSL
-+#define OPTION_MUSL   (DEFAULT_LIBC == LIBC_MUSL)
- #else
- #define OPTION_GLIBC  (linux_libc == LIBC_GLIBC)
- #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC)
- #define OPTION_BIONIC (linux_libc == LIBC_BIONIC)
-+#undef OPTION_MUSL
-+#define OPTION_MUSL   (linux_libc == LIBC_MUSL)
- #endif
- /* Determine what functions are present at the runtime;
---- a/gcc/config/glibc-stdint.h
-+++ b/gcc/config/glibc-stdint.h
-@@ -22,6 +22,12 @@ a copy of the GCC Runtime Library Except
- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
- <http://www.gnu.org/licenses/>.  */
-+/* Systems using musl libc should use this header and make sure
-+   OPTION_MUSL is defined correctly before using the TYPE macros. */
-+#ifndef OPTION_MUSL
-+#define OPTION_MUSL 0
-+#endif
-+
- #define SIG_ATOMIC_TYPE "int"
- #define INT8_TYPE "signed char"
-@@ -43,12 +49,12 @@ see the files COPYING3 and COPYING.RUNTI
- #define UINT_LEAST64_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "long long unsigned int")
- #define INT_FAST8_TYPE "signed char"
--#define INT_FAST16_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "int")
--#define INT_FAST32_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "int")
-+#define INT_FAST16_TYPE (LONG_TYPE_SIZE == 64 && !OPTION_MUSL ? "long int" : "int")
-+#define INT_FAST32_TYPE (LONG_TYPE_SIZE == 64 && !OPTION_MUSL ? "long int" : "int")
- #define INT_FAST64_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "long long int")
- #define UINT_FAST8_TYPE "unsigned char"
--#define UINT_FAST16_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "unsigned int")
--#define UINT_FAST32_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "unsigned int")
-+#define UINT_FAST16_TYPE (LONG_TYPE_SIZE == 64 && !OPTION_MUSL ? "long unsigned int" : "unsigned int")
-+#define UINT_FAST32_TYPE (LONG_TYPE_SIZE == 64 && !OPTION_MUSL ? "long unsigned int" : "unsigned int")
- #define UINT_FAST64_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "long long unsigned int")
- #define INTPTR_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "int")
---- a/gcc/config/linux.h
-+++ b/gcc/config/linux.h
-@@ -32,11 +32,13 @@ see the files COPYING3 and COPYING.RUNTI
- #define OPTION_GLIBC  (DEFAULT_LIBC == LIBC_GLIBC)
- #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC)
- #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC)
-+#undef OPTION_MUSL
- #define OPTION_MUSL   (DEFAULT_LIBC == LIBC_MUSL)
- #else
- #define OPTION_GLIBC  (linux_libc == LIBC_GLIBC)
- #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC)
- #define OPTION_BIONIC (linux_libc == LIBC_BIONIC)
-+#undef OPTION_MUSL
- #define OPTION_MUSL   (linux_libc == LIBC_MUSL)
- #endif
---- a/gcc/config/rs6000/linux.h
-+++ b/gcc/config/rs6000/linux.h
-@@ -30,10 +30,14 @@
- #define OPTION_GLIBC  (DEFAULT_LIBC == LIBC_GLIBC)
- #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC)
- #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC)
-+#undef OPTION_MUSL
-+#define OPTION_MUSL   (DEFAULT_LIBC == LIBC_MUSL)
- #else
- #define OPTION_GLIBC  (linux_libc == LIBC_GLIBC)
- #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC)
- #define OPTION_BIONIC (linux_libc == LIBC_BIONIC)
-+#undef OPTION_MUSL
-+#define OPTION_MUSL   (linux_libc == LIBC_MUSL)
- #endif
- /* Determine what functions are present at the runtime;
---- a/gcc/config/rs6000/linux64.h
-+++ b/gcc/config/rs6000/linux64.h
-@@ -299,10 +299,14 @@ extern int dot_symbols;
- #define OPTION_GLIBC  (DEFAULT_LIBC == LIBC_GLIBC)
- #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC)
- #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC)
-+#undef OPTION_MUSL
-+#define OPTION_MUSL   (DEFAULT_LIBC == LIBC_MUSL)
- #else
- #define OPTION_GLIBC  (linux_libc == LIBC_GLIBC)
- #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC)
- #define OPTION_BIONIC (linux_libc == LIBC_BIONIC)
-+#undef OPTION_MUSL
-+#define OPTION_MUSL   (linux_libc == LIBC_MUSL)
- #endif
- /* Determine what functions are present at the runtime;
diff --git a/devel/gcc/patches/270-musl-add-powerpc-softfloat-fix.patch b/devel/gcc/patches/270-musl-add-powerpc-softfloat-fix.patch
deleted file mode 100644 (file)
index bdebf6c..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
---- a/gcc/config/rs6000/linux64.h
-+++ b/gcc/config/rs6000/linux64.h
-@@ -369,8 +369,8 @@ extern int dot_symbols;
- #endif
- #define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
- #define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
--#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E ".so.1"
--#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-powerpc64" MUSL_DYNAMIC_LINKER_E ".so.1"
-+#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1"
-+#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-powerpc64" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1"
- #if DEFAULT_LIBC == LIBC_UCLIBC
- #define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}"
- #elif DEFAULT_LIBC == LIBC_GLIBC
---- a/gcc/config/rs6000/sysv4.h
-+++ b/gcc/config/rs6000/sysv4.h
-@@ -765,7 +765,7 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEF
- #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
- #define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
--#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E ".so.1"
-+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1"
- #if DEFAULT_LIBC == LIBC_UCLIBC
- #define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}"
- #elif DEFAULT_LIBC == LIBC_MUSL
index 1743658ac6ca3a29a1e7d228bb7bb15189595986..2d0ae461381cba884708a092a44814468a850962 100644 (file)
@@ -1,9 +1,16 @@
-Use the proper rtx cost model for the selected CPU, even when optimizing
-for size. This generates better code.
+commit ecf7671b769fe96f7b5134be442089f8bdba55d2
+Author: Felix Fietkau <nbd@nbd.name>
+Date:   Thu Aug 4 20:29:45 2016 +0200
+
+gcc: add a patch to generate better code with Os on mips
+
+Also happens to reduce compressed code size a bit
+
+Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 --- a/gcc/config/mips/mips.c
 +++ b/gcc/config/mips/mips.c
-@@ -17483,7 +17483,7 @@ mips_option_override (void)
+@@ -19790,7 +19790,7 @@ mips_option_override (void)
      flag_pcc_struct_return = 0;
  
    /* Decide which rtx_costs structure to use.  */
index 0edeb13c7517ab16b7de8a7293a3a0f21bbb0ac5..76200a16614d93e7d3e02b8b65237e07ed0519d4 100644 (file)
@@ -1,6 +1,27 @@
+commit b050f87d13b5dc7ed82feb9a90f4529de58bdf25
+Author: Felix Fietkau <nbd@openwrt.org>
+Date:   Wed Feb 19 19:20:10 2014 +0000
+
+    gcc: prevent the use of LDRD/STRD on ARMv5TE
+    
+    These instructions are for 64-bit load/store. On ARMv5TE, the CPU
+    requires addresses to be aligned to 64-bit. When misaligned, behavior is
+    undefined (effectively either loads the same word twice on LDRD, or
+    corrupts surrounding memory on STRD).
+    
+    On ARMv6 and newer, unaligned access is safe.
+    
+    Removing these instructions for ARMv5TE is necessary, because GCC
+    ignores alignment information in pointers and does unsafe optimizations
+    that have shown up as bugs in various places.
+    
+    Signed-off-by: Felix Fietkau <nbd@openwrt.org>
+    
+    SVN-Revision: 39638
+
 --- a/gcc/config/arm/arm.h
 +++ b/gcc/config/arm/arm.h
-@@ -285,7 +285,7 @@ extern void (*arm_lang_output_object_att
+@@ -150,7 +150,7 @@ extern tree arm_fp16_type_node;
  /* Thumb-1 only.  */
  #define TARGET_THUMB1_ONLY            (TARGET_THUMB1 && !arm_arch_notm)
  
index 1d06f5b2ec03a00e6ec52ad1d0682ba296d6aad3..5c9d86aead7325ab29de9dbf4dc19ef46b9c229b 100644 (file)
@@ -1,3 +1,11 @@
+commit 8570c4be394cff7282f332f97da2ff569a927ddb
+Author: Imre Kaloz <kaloz@openwrt.org>
+Date:   Wed Feb 2 20:06:12 2011 +0000
+
+    fixup arm soft-float symbols
+    
+    SVN-Revision: 25325
+
 --- a/libgcc/config/arm/t-linux
 +++ b/libgcc/config/arm/t-linux
 @@ -1,6 +1,10 @@
@@ -14,7 +22,7 @@
  # difference.
 --- a/gcc/config/arm/linux-elf.h
 +++ b/gcc/config/arm/linux-elf.h
-@@ -60,8 +60,6 @@
+@@ -58,8 +58,6 @@
     %{shared:-lc} \
     %{!shared:%{profile:-lc_p}%{!profile:-lc}}"
  
index 42bf0c8cccf13e8179693219ee5d8d715d7a923f..0cc1e07e2ba92de5b29c6add712c35c621ea639d 100644 (file)
@@ -1,6 +1,14 @@
+commit c96312958c0621e72c9b32da5bc224ffe2161384
+Author: Felix Fietkau <nbd@openwrt.org>
+Date:   Mon Oct 19 23:26:09 2009 +0000
+
+    gcc: create a proper libgcc_pic.a static library for relinking (4.3.3+ for now, backport will follow)
+    
+    SVN-Revision: 18086
+
 --- a/libgcc/Makefile.in
 +++ b/libgcc/Makefile.in
-@@ -887,11 +887,12 @@ $(libgcov-driver-objects): %$(objext): $
+@@ -920,11 +920,12 @@ $(libgcov-driver-objects): %$(objext): $
  
  # Static libraries.
  libgcc.a: $(libgcc-objects)
@@ -14,7 +22,7 @@
        -rm -f $@
  
        objects="$(objects)";                                   \
-@@ -913,7 +914,7 @@ libgcc_s$(SHLIB_EXT): libunwind$(SHLIB_E
+@@ -945,7 +946,7 @@ all: libunwind.a
  endif
  
  ifeq ($(enable_shared),yes)
@@ -22,8 +30,8 @@
 +all: libgcc_eh.a libgcc_pic.a libgcc_s$(SHLIB_EXT)
  ifneq ($(LIBUNWIND),)
  all: libunwind$(SHLIB_EXT)
- endif
-@@ -1108,6 +1109,10 @@ install-shared:
+ libgcc_s$(SHLIB_EXT): libunwind$(SHLIB_EXT)
+@@ -1151,6 +1152,10 @@ install-shared:
        chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_eh.a
        $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_eh.a
  
diff --git a/devel/gcc/patches/830-arm_unbreak_armv4t.patch b/devel/gcc/patches/830-arm_unbreak_armv4t.patch
deleted file mode 100644 (file)
index 37f8f2a..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-http://sourceware.org/ml/crossgcc/2008-05/msg00009.html
-
---- a/gcc/config/arm/linux-eabi.h
-+++ b/gcc/config/arm/linux-eabi.h
-@@ -45,7 +45,7 @@
-    The ARM10TDMI core is the default for armv5t, so set
-    SUBTARGET_CPU_DEFAULT to achieve this.  */
- #undef  SUBTARGET_CPU_DEFAULT
--#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi
-+#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi
- /* TARGET_BIG_ENDIAN_DEFAULT is set in
-    config.gcc for big endian configurations.  */
index cb1fb982356a1b716adfa89742fd13fb8b46f24a..b9c9b161adeff87c6acb67c9df234ba8111917b7 100644 (file)
@@ -1,6 +1,15 @@
+commit 7edc8ca5456d9743dd0075eb3cc5b04f4f24c8cc
+Author: Imre Kaloz <kaloz@openwrt.org>
+Date:   Wed Feb 2 19:34:36 2011 +0000
+
+    add armv4 fixup patches
+    
+    SVN-Revision: 25322
+
+
 --- a/gcc/config/arm/linux-eabi.h
 +++ b/gcc/config/arm/linux-eabi.h
-@@ -94,10 +94,15 @@
+@@ -88,10 +88,15 @@
  #define MUSL_DYNAMIC_LINKER \
    "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}.so.1"
  
index 5818cf4da0ab8334501944a4b6b679011f81567f..1d07efed800f9d8a865de5f04b66cfb589529574 100644 (file)
@@ -1,7 +1,14 @@
+commit dcfc40358b5a3cae7320c17f8d1cebd5ad5540cd
+Author: Felix Fietkau <nbd@openwrt.org>
+Date:   Sun Feb 12 20:25:47 2012 +0000
+
+    gcc 4.6: port over the missing patch 850-use_shared_libgcc.patch to prevent libgcc crap from leaking into every single binary
+    
+    SVN-Revision: 30486
 --- a/gcc/config/arm/linux-eabi.h
 +++ b/gcc/config/arm/linux-eabi.h
-@@ -131,10 +131,6 @@
#define ENDFILE_SPEC \
+@@ -126,10 +126,6 @@
  "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} "   \
    LINUX_OR_ANDROID_LD (GNU_USER_TARGET_ENDFILE_SPEC, ANDROID_ENDFILE_SPEC)
  
 -/* Use the default LIBGCC_SPEC, not the version in linux-elf.h, as we
@@ -26,7 +33,7 @@
     -muclibc or -mglibc or -mbionic or -mmusl has been passed to change
 --- a/libgcc/mkmap-symver.awk
 +++ b/libgcc/mkmap-symver.awk
-@@ -132,5 +132,5 @@ function output(lib) {
+@@ -136,5 +136,5 @@ function output(lib) {
    else if (inherit[lib])
      printf("} %s;\n", inherit[lib]);
    else
index 80c3476841465339cc3de8d0802fed65a0833c28..d710e4071747178b0cb1e7ccd58d2f66d81db9c5 100644 (file)
@@ -1,3 +1,13 @@
+commit 64661de100da1ec1061ef3e5e400285dce115e6b
+Author: Felix Fietkau <nbd@openwrt.org>
+Date:   Sun May 10 13:16:35 2015 +0000
+
+    gcc: add some size optimization patches
+    
+    Signed-off-by: Felix Fietkau <nbd@openwrt.org>
+    
+    SVN-Revision: 45664
+
 --- a/libgcc/config/t-libunwind
 +++ b/libgcc/config/t-libunwind
 @@ -2,8 +2,7 @@
index 0e64a4164b6f0ada88fc0e3443d8689b8ad08206..1b448eb5b219994c733d79d3065878a25fcd591a 100644 (file)
@@ -1,6 +1,13 @@
+commit d8c570a1531035c3e26bcd94741e5f5b9c36b5d9
+Author: Felix Fietkau <nbd@openwrt.org>
+Date:   Mon Mar 5 00:51:01 2012 +0000
+
+    gcc: do not emit references to _savegpr_* and _restgpr_* on powerpc, as they are tricky to deal with wrt. libgcc. they cannot be linked dynamically
+    
+    SVN-Revision: 30814
 --- a/gcc/config/rs6000/rs6000.c
 +++ b/gcc/config/rs6000/rs6000.c
-@@ -21500,7 +21500,7 @@ rs6000_savres_strategy (rs6000_stack_t *
+@@ -26981,7 +26981,7 @@ rs6000_savres_strategy (rs6000_stack_t *
    /* Define cutoff for using out-of-line functions to save registers.  */
    if (DEFAULT_ABI == ABI_V4 || TARGET_ELF)
      {
diff --git a/devel/gcc/patches/880-no_java_section.patch b/devel/gcc/patches/880-no_java_section.patch
deleted file mode 100644 (file)
index def6c9f..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/gcc/defaults.h
-+++ b/gcc/defaults.h
-@@ -380,7 +380,7 @@ see the files COPYING3 and COPYING.RUNTI
- /* If we have named section and we support weak symbols, then use the
-    .jcr section for recording java classes which need to be registered
-    at program start-up time.  */
--#if defined (TARGET_ASM_NAMED_SECTION) && SUPPORTS_WEAK
-+#if 0 && defined (TARGET_ASM_NAMED_SECTION) && SUPPORTS_WEAK
- #ifndef JCR_SECTION_NAME
- #define JCR_SECTION_NAME ".jcr"
- #endif
diff --git a/devel/gcc/patches/881-no_tm_section.patch b/devel/gcc/patches/881-no_tm_section.patch
new file mode 100644 (file)
index 0000000..a58dc27
--- /dev/null
@@ -0,0 +1,22 @@
+commit 565988ab47bd9b96b50608564aee2104aeb4b7ae
+Author: Felix Fietkau <nbd@nbd.name>
+Date:   Tue Dec 13 14:20:49 2016 +0100
+
+    gcc: rip out transactional memory related bloat from crtbegin
+    
+    Slightly improves compression for each executable, saving about 4k from
+    the default ar71xx rootfs
+    
+    Signed-off-by: Felix Fietkau <nbd@nbd.name>
+
+--- a/libgcc/crtstuff.c
++++ b/libgcc/crtstuff.c
+@@ -152,7 +152,7 @@ call_ ## FUNC (void)                                       \
+ #endif
+ #if !defined(USE_TM_CLONE_REGISTRY) && defined(OBJECT_FORMAT_ELF)
+-# define USE_TM_CLONE_REGISTRY 1
++# define USE_TM_CLONE_REGISTRY 0
+ #endif
+ /* We do not want to add the weak attribute to the declarations of these
index dd6e9dc889ad0714507851b4f99d9c6883cf007c..f5cc0a74ee345bda249250612d2b0fdb56cfdba4 100644 (file)
@@ -1,3 +1,24 @@
+commit 9dc38e48f7a6f88b7ac7bfaced91f53660204e46
+Author: Florian Fainelli <florian@openwrt.org>
+Date:   Fri Apr 5 12:36:06 2013 +0000
+
+    toolchain/gcc: .init and .fini need to pick one ISA
+    
+    The .init and .fini sections are built by concatenating code
+    fragments. Putting mips16 code in the middle of a mips32 code block
+    doesn't work. Make gcc built the magic crt stuff in no-mips16 mode.
+    
+    This is specific to 4.6-linaro but is probably portable to other gcc
+    flavors. Adding this to the t-libgcc-mips16 makefile fragment is a
+    hack not suitable for pushing upstream, but there is no mips/t-linux
+    or mips/t-uclibc and I am not going to touch gcc/configure for two
+    lines.
+    
+    Signed-off-by: Jay Carlson <nop@nop.com>
+    Signed-off-by: Florian Fainelli <florian@openwrt.org>
+    
+    SVN-Revision: 36200
+
 --- a/libgcc/config/mips/t-mips16
 +++ b/libgcc/config/mips/t-mips16
 @@ -43,3 +43,6 @@ SYNC_CFLAGS = -mno-mips16
index 32fc9da9627bdc4b7a48f4d68066a8844b56a291..f19007ea30d7f75da27553051f84c6130b5fe90d 100644 (file)
@@ -1,22 +1,23 @@
+commit 99368862e44740ff4fd33760893f04e14f9dbdf1
+Author: Felix Fietkau <nbd@openwrt.org>
+Date:   Tue Jul 31 00:52:27 2007 +0000
 
-       This patch brings over a few features from MirBSD:
+    Port the mbsd_multi patch from freewrt, which adds -fhonour-copts. This will emit warnings in packages that don't use our target cflags properly
+    
+    SVN-Revision: 8256
+
+       This patch brings over a feature from MirBSD:
        * -fhonour-copts
          If this option is not given, it's warned (depending
          on environment variables). This is to catch errors
          of misbuilt packages which override CFLAGS themselves.
-       * -Werror-maybe-reset
-         Has the effect of -Wno-error if GCC_NO_WERROR is
-         set and not '0', a no-operation otherwise. This is
-         to be able to use -Werror in "make" but prevent
-         GNU autoconf generated configure scripts from
-         freaking out.
 
        This patch was authored by Thorsten Glaser <tg at mirbsd.de>
        with copyright assignment to the FSF in effect.
 
 --- a/gcc/c-family/c-opts.c
 +++ b/gcc/c-family/c-opts.c
-@@ -122,6 +122,9 @@ static int class_dump_flags;
+@@ -108,6 +108,9 @@ static int class_dump_flags;
  /* Whether any standard preincluded header has been preincluded.  */
  static bool done_preinclude;
  
@@ -26,7 +27,7 @@
  static void handle_OPT_d (const char *);
  static void set_std_cxx98 (int);
  static void set_std_cxx11 (int);
-@@ -449,6 +452,12 @@ c_common_handle_option (size_t scode, co
+@@ -456,6 +459,12 @@ c_common_handle_option (size_t scode, co
        flag_no_builtin = !value;
        break;
  
@@ -39,7 +40,7 @@
      case OPT_fconstant_string_class_:
        constant_string_class_name = arg;
        break;
-@@ -1034,6 +1043,47 @@ c_common_init (void)
+@@ -1084,6 +1093,47 @@ c_common_init (void)
        return false;
      }
  
  
 --- a/gcc/c-family/c.opt
 +++ b/gcc/c-family/c.opt
-@@ -431,6 +431,10 @@ Wfloat-conversion
- C ObjC C++ ObjC++ Var(warn_float_conversion) LangEnabledBy(C ObjC C++ ObjC++,Wconversion)
- Warn for implicit type conversions that cause loss of floating point precision
-+Werror-maybe-reset
-+C ObjC C++ ObjC++
-+; Documented in common.opt
-+
- Wfloat-equal
- C ObjC C++ ObjC++ Var(warn_float_equal) Warning
- Warn if testing floating point numbers for equality
-@@ -1161,6 +1165,9 @@ C++ ObjC++ Optimization Alias(fexception
+@@ -1412,6 +1412,9 @@ C++ ObjC++ Optimization Alias(fexception
  fhonor-std
  C++ ObjC++ Ignore Warn(switch %qs is no longer supported)
  
 +
  fhosted
  C ObjC
- Assume normal C execution environment
+ Assume normal C execution environment.
 --- a/gcc/common.opt
 +++ b/gcc/common.opt
-@@ -561,6 +561,10 @@ Werror=
- Common Joined
- Treat specified warning as error
-+Werror-maybe-reset
-+Common
-+If environment variable GCC_NO_WERROR is set, act as -Wno-error
-+
- Wextra
- Common Var(extra_warnings) Warning
- Print extra (possibly unwanted) warnings
-@@ -1360,6 +1364,9 @@ fguess-branch-probability
+@@ -1510,6 +1510,9 @@ fguess-branch-probability
  Common Report Var(flag_guess_branch_prob) Optimization
- Enable guessing of branch probabilities
+ Enable guessing of branch probabilities.
  
 +fhonour-copts
 +Common RejectNegative
  ; On SVR4 targets, it also controls whether or not to emit a
 --- a/gcc/opts.c
 +++ b/gcc/opts.c
-@@ -1699,6 +1699,17 @@ common_handle_option (struct gcc_options
+@@ -1954,6 +1954,9 @@ common_handle_option (struct gcc_options
                               opts, opts_set, loc, dc);
        break;
  
-+    case OPT_Werror_maybe_reset:
-+      {
-+        char *ev = getenv ("GCC_NO_WERROR");
-+        if ((ev != NULL) && (*ev != '0'))
-+          warnings_are_errors = 0;
-+      }
-+      break;
-+
 +    case OPT_fhonour_copts:
 +      break;
 +
      case OPT_Wlarger_than_:
        opts->x_larger_than_size = value;
        opts->x_warn_larger_than = value != -1;
---- a/gcc/doc/cppopts.texi
-+++ b/gcc/doc/cppopts.texi
-@@ -163,6 +163,11 @@ in older programs.  This warning is on b
- Make all warnings into hard errors.  Source code which triggers warnings
- will be rejected.
-+ at item -Werror-maybe-reset
-+ at opindex Werror-maybe-reset
-+Act like @samp{-Wno-error} if the @env{GCC_NO_WERROR} environment
-+variable is set to anything other than 0 or empty.
-+
- @item -Wsystem-headers
- @opindex Wsystem-headers
- Issue warnings for code in system headers.  These are normally unhelpful
 --- a/gcc/doc/invoke.texi
 +++ b/gcc/doc/invoke.texi
-@@ -251,7 +251,7 @@ Objective-C and Objective-C++ Dialects}.
- -Wdisabled-optimization @gol
- -Wno-discarded-qualifiers -Wno-discarded-array-qualifiers @gol
- -Wno-div-by-zero -Wdouble-promotion -Wempty-body  -Wenum-compare @gol
---Wno-endif-labels -Werror  -Werror=* @gol
-+-Wno-endif-labels -Werror  -Werror=* -Werror-maybe-reset @gol
- -Wfatal-errors  -Wfloat-equal  -Wformat  -Wformat=2 @gol
- -Wno-format-contains-nul -Wno-format-extra-args -Wformat-nonliteral @gol
- -Wformat-security  -Wformat-signedness  -Wformat-y2k @gol
-@@ -5382,6 +5382,22 @@ This option is only supported for C and
+@@ -6572,6 +6572,17 @@ This option is only supported for C and
  @option{-Wall} and by @option{-Wpedantic}, which can be disabled with
  @option{-Wno-pointer-sign}.
  
-+ at item -Werror-maybe-reset
-+ at opindex Werror-maybe-reset
-+Act like @samp{-Wno-error} if the @env{GCC_NO_WERROR} environment
-+variable is set to anything other than 0 or empty.
-+
-+ at item -fhonour-copts
-+ at opindex fhonour-copts
++@item -fhonour-copts
++@opindex fhonour-copts
 +If @env{GCC_HONOUR_COPTS} is set to 1, abort if this option is not
 +given at least once, and warn if it is given more than once.
 +If @env{GCC_HONOUR_COPTS} is set to 2, abort if this option is not
  @item -Wstack-protector
  @opindex Wstack-protector
  @opindex Wno-stack-protector
-@@ -7860,7 +7876,7 @@ so, the first branch is redirected to ei
- second branch or a point immediately following it, depending on whether
- the condition is known to be true or false.
--Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}.
-+Enabled at levels @option{-O3}.
- @item -fsplit-wide-types
- @opindex fsplit-wide-types
---- a/gcc/java/jvspec.c
-+++ b/gcc/java/jvspec.c
-@@ -629,6 +629,7 @@ lang_specific_pre_link (void)
-      class name.  Append dummy `.c' that can be stripped by set_input so %b
-      is correct.  */ 
-   set_input (concat (main_class_name, "main.c", NULL));
-+  putenv ("GCC_HONOUR_COPTS=s"); /* XXX hack!  */
-   err = do_spec (jvgenmain_spec);
-   if (err == 0)
-     {
index 3d708f24c31c36edbb29404fb2b82eb886ed881e..a0fdc5f1654315e3dc6cc116b2deb0fb3820536f 100644 (file)
@@ -1,13 +1,20 @@
+Author: Jo-Philipp Wich <jow@openwrt.org>
+Date:   Sat Apr 21 03:02:39 2012 +0000
+
+    gcc: add patch to make the getenv() spec function nonfatal if requested environment variable is unset
+    
+    SVN-Revision: 31390
+
 --- a/gcc/gcc.c
 +++ b/gcc/gcc.c
-@@ -8807,8 +8807,10 @@ getenv_spec_function (int argc, const ch
+@@ -9281,8 +9281,10 @@ getenv_spec_function (int argc, const ch
+     value = varname;
  
-   value = getenv (argv[0]);
    if (!value)
 -    fatal_error (input_location,
--               "environment variable %qs not defined", argv[0]);
+-               "environment variable %qs not defined", varname);
 +    {
-+      warning (input_location, "environment variable %qs not defined", argv[0]);
++      warning (input_location, "environment variable %qs not defined", varname);
 +      value = "";
 +    }
  
index c05844d2e461e66b0705d63b8390375d241f52b6..5affd6f92d661aa38b0cd24ec7c3fd0f625ce7be 100644 (file)
@@ -48,9 +48,9 @@ sellcey@mips.com
 
 --- a/gcc/config/mips/mips.c
 +++ b/gcc/config/mips/mips.c
-@@ -19629,6 +19629,9 @@ mips_lra_p (void)
- #undef TARGET_LRA_P
- #define TARGET_LRA_P mips_lra_p
+@@ -22567,6 +22567,9 @@ mips_promote_function_mode (const_tree t
+ #undef TARGET_CUSTOM_FUNCTION_DESCRIPTORS
+ #define TARGET_CUSTOM_FUNCTION_DESCRIPTORS 2
  
 +#undef TARGET_ASM_FILE_END
 +#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
diff --git a/devel/gcc/patches/930-osdefines.patch b/devel/gcc/patches/930-osdefines.patch
deleted file mode 100644 (file)
index a1b6120..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/libstdc++-v3/config/os/gnu-linux/os_defines.h    2015-01-05 06:33:28.000000000 -0600
-+++ b/libstdc++-v3/config/os/gnu-linux/os_defines.h    2016-04-15 12:32:49.374356001 -0500
-@@ -41,8 +41,8 @@
- // Provide a declaration for the possibly deprecated gets function, as
- // glibc 2.15 and later does not declare gets for ISO C11 when
- // __GNU_SOURCE is defined.
--#if __GLIBC_PREREQ(2,15) && defined(_GNU_SOURCE)
-+//#if __GLIBC_PREREQ(2,15) && defined(_GNU_SOURCE)
- # undef _GLIBCXX_HAVE_GETS
--#endif
-+//#endif
- #endif
diff --git a/devel/gcc/patches/931-libffi-fix-MIPS-softfloat-build-issue.patch b/devel/gcc/patches/931-libffi-fix-MIPS-softfloat-build-issue.patch
new file mode 100644 (file)
index 0000000..9d436ef
--- /dev/null
@@ -0,0 +1,175 @@
+From c0c62fa4256f805389f16ebfc4a60cf789129b50 Mon Sep 17 00:00:00 2001
+From: BangLang Huang <banglang.huang@foxmail.com>
+Date: Wed, 9 Nov 2016 10:36:49 +0800
+Subject: [PATCH] libffi: fix MIPS softfloat build issue
+
+Backported from github.com/libffi/libffi#272
+
+Signed-off-by: BangLang Huang <banglang.huang@foxmail.com>
+Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
+---
+ libffi/src/mips/n32.S | 17 +++++++++++++++++
+ libffi/src/mips/o32.S | 17 +++++++++++++++++
+ 2 files changed, 34 insertions(+)
+
+diff --git a/libffi/src/mips/n32.S b/libffi/src/mips/n32.S
+index c6985d30a6f..8f25994773c 100644
+--- a/libffi/src/mips/n32.S
++++ b/libffi/src/mips/n32.S
+@@ -107,6 +107,16 @@ loadregs:
+       REG_L   t6, 3*FFI_SIZEOF_ARG($fp)  # load the flags word into t6.
++#ifdef __mips_soft_float
++      REG_L   a0, 0*FFI_SIZEOF_ARG(t9)
++      REG_L   a1, 1*FFI_SIZEOF_ARG(t9)
++      REG_L   a2, 2*FFI_SIZEOF_ARG(t9)
++      REG_L   a3, 3*FFI_SIZEOF_ARG(t9)
++      REG_L   a4, 4*FFI_SIZEOF_ARG(t9)
++      REG_L   a5, 5*FFI_SIZEOF_ARG(t9)
++      REG_L   a6, 6*FFI_SIZEOF_ARG(t9)
++      REG_L   a7, 7*FFI_SIZEOF_ARG(t9)
++#else
+       and     t4, t6, ((1<<FFI_FLAG_BITS)-1)
+       REG_L   a0, 0*FFI_SIZEOF_ARG(t9)
+       beqz    t4, arg1_next
+@@ -193,6 +203,7 @@ arg7_next:
+ arg8_doublep: 
+       l.d     $f19, 7*FFI_SIZEOF_ARG(t9)      
+ arg8_next:    
++#endif
+ callit:               
+       # Load the function pointer
+@@ -214,6 +225,7 @@ retint:
+       b       epilogue
+ retfloat:
++#ifndef __mips_soft_float
+       bne     t6, FFI_TYPE_FLOAT, retdouble
+       jal     t9
+       REG_L   t4, 4*FFI_SIZEOF_ARG($fp)
+@@ -272,6 +284,7 @@ retstruct_f_d:
+       s.s     $f0, 0(t4)
+       s.d     $f2, 8(t4)
+       b       epilogue
++#endif
+ retstruct_d_soft:
+       bne     t6, FFI_TYPE_STRUCT_D_SOFT, retstruct_f_soft
+@@ -429,6 +442,7 @@ ffi_closure_N32:
+       REG_S   a6, A6_OFF2($sp)
+       REG_S   a7, A7_OFF2($sp)
++#ifndef __mips_soft_float
+       # Store all possible float/double registers.
+       s.d     $f12, F12_OFF2($sp)
+       s.d     $f13, F13_OFF2($sp)
+@@ -438,6 +452,7 @@ ffi_closure_N32:
+       s.d     $f17, F17_OFF2($sp)
+       s.d     $f18, F18_OFF2($sp)
+       s.d     $f19, F19_OFF2($sp)
++#endif
+       # Call ffi_closure_mips_inner_N32 to do the real work.
+       LA      t9, ffi_closure_mips_inner_N32
+@@ -458,6 +473,7 @@ cls_retint:
+       b       cls_epilogue
+ cls_retfloat:
++#ifndef __mips_soft_float
+       bne     v0, FFI_TYPE_FLOAT, cls_retdouble
+       l.s     $f0, V0_OFF2($sp)
+       b       cls_epilogue
+@@ -500,6 +516,7 @@ cls_retstruct_f_d:
+       l.s     $f0, V0_OFF2($sp)
+       l.d     $f2, V1_OFF2($sp)
+       b       cls_epilogue
++#endif
+       
+ cls_retstruct_small2: 
+       REG_L   v0, V0_OFF2($sp)
+diff --git a/libffi/src/mips/o32.S b/libffi/src/mips/o32.S
+index eb279813a76..1aff4b14814 100644
+--- a/libffi/src/mips/o32.S
++++ b/libffi/src/mips/o32.S
+@@ -82,13 +82,16 @@ sixteen:
+               
+       ADDU    $sp, 4 * FFI_SIZEOF_ARG         # adjust $sp to new args
++#ifndef __mips_soft_float
+       bnez    t0, pass_d                      # make it quick for int
++#endif
+       REG_L   a0, 0*FFI_SIZEOF_ARG($sp)       # just go ahead and load the
+       REG_L   a1, 1*FFI_SIZEOF_ARG($sp)       # four regs.
+       REG_L   a2, 2*FFI_SIZEOF_ARG($sp)
+       REG_L   a3, 3*FFI_SIZEOF_ARG($sp)
+       b       call_it
++#ifndef __mips_soft_float
+ pass_d:
+       bne     t0, FFI_ARGS_D, pass_f
+       l.d     $f12, 0*FFI_SIZEOF_ARG($sp)     # load $fp regs from args
+@@ -130,6 +133,7 @@ pass_f_d:
+  #    bne     t0, FFI_ARGS_F_D, call_it
+       l.s     $f12, 0*FFI_SIZEOF_ARG($sp)     # load $fp regs from args
+       l.d     $f14, 2*FFI_SIZEOF_ARG($sp)     # passing double and float
++#endif
+ call_it:      
+       # Load the function pointer
+@@ -158,14 +162,23 @@ retfloat:
+       bne     t2, FFI_TYPE_FLOAT, retdouble
+       jalr    t9
+       REG_L   t0, SIZEOF_FRAME + 4*FFI_SIZEOF_ARG($fp)
++#ifndef __mips_soft_float
+       s.s     $f0, 0(t0)
++#else
++      REG_S v0, 0(t0)
++#endif
+       b       epilogue
+ retdouble:    
+       bne     t2, FFI_TYPE_DOUBLE, noretval
+       jalr    t9
+       REG_L   t0, SIZEOF_FRAME + 4*FFI_SIZEOF_ARG($fp)
++#ifndef __mips_soft_float
+       s.d     $f0, 0(t0)
++#else
++      REG_S v1, 4(t0)
++      REG_S v0, 0(t0)
++#endif
+       b       epilogue
+       
+ noretval:     
+@@ -261,9 +274,11 @@ $LCFI7:
+       li      $13, 1          # FFI_O32
+       bne     $16, $13, 1f    # Skip fp save if FFI_O32_SOFT_FLOAT
+       
++#ifndef __mips_soft_float
+       # Store all possible float/double registers.
+       s.d     $f12, FA_0_0_OFF2($fp)
+       s.d     $f14, FA_1_0_OFF2($fp)
++#endif
+ 1:    
+       # Call ffi_closure_mips_inner_O32 to do the work.
+       la      t9, ffi_closure_mips_inner_O32
+@@ -281,6 +296,7 @@ $LCFI7:
+       li      $13, 1          # FFI_O32
+       bne     $16, $13, 1f    # Skip fp restore if FFI_O32_SOFT_FLOAT
++#ifndef __mips_soft_float
+       li      $9, FFI_TYPE_FLOAT
+       l.s     $f0, V0_OFF2($fp)
+       beq     $8, $9, closure_done
+@@ -288,6 +304,7 @@ $LCFI7:
+       li      $9, FFI_TYPE_DOUBLE
+       l.d     $f0, V0_OFF2($fp)
+       beq     $8, $9, closure_done
++#endif
+ 1:    
+       REG_L   $3, V1_OFF2($fp)
+       REG_L   $2, V0_OFF2($fp)
+-- 
+2.16.3
+
index 0b21ffaf0944778b482de0d69d9876bbd50cc821..6a4d54aaa28b3db06b43e0c05948aa279527cdae 100644 (file)
@@ -1,6 +1,28 @@
+commit 548d9a008ff265e9eaa3c7e0e6e301c6bd5645e6
+Author: Felix Fietkau <nbd@openwrt.org>
+Date:   Fri Dec 12 17:01:57 2014 +0000
+
+    gcc: don't clobber stamp-bits with a symlink to itself
+    
+    Several versions of gcc have an issue in libstdc++v3 where the build may
+    clobber stamp-bits with a link to itself.  This doesn't manifest itself
+    on all systems.  On several Ubuntu systems, this doesn't appear to be a
+    problem, but it is an issue on Fedora 16 systems.
+    
+    To fix the issue, we'll simply filter out stamp-bits from the symlinks
+    to be generated.
+    
+    Note: gcc 4.4.7 is unaffected by this issue, so no fix is necessary
+    there.
+    
+    Signed-off-by: John Szakmeister <john@szakmeister.net>
+    
+    SVN-Revision: 43669
+
+
 --- a/libstdc++-v3/include/Makefile.in
 +++ b/libstdc++-v3/include/Makefile.in
-@@ -1421,7 +1421,7 @@ stamp-bits: ${bits_headers}
+@@ -1474,7 +1474,7 @@ stamp-bits: ${bits_headers}
        @$(STAMP) stamp-bits
  
  stamp-bits-sup: stamp-bits ${bits_sup_headers}
index dc0938ab63417d499e8cacc01f70e6772a04453c..cd30cb20141aa1efa670da68fdbcdca5730979f5 100644 (file)
@@ -1,8 +1,18 @@
+commit 331735a357a73c7b8adc205241ac3cc6543d985e
+Author: Felix Fietkau <nbd@openwrt.org>
+Date:   Tue Nov 17 12:38:22 2015 +0000
+
+    gcc: add a patch to 5.x that supports translation of __FILE__ paths
+    
+    Signed-off-by: Felix Fietkau <nbd@openwrt.org>
+    
+    SVN-Revision: 47490
+
 Forward ported from attachment to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47047
 
 --- a/gcc/c-family/c-opts.c
 +++ b/gcc/c-family/c-opts.c
-@@ -581,6 +581,10 @@ c_common_handle_option (size_t scode, co
+@@ -588,6 +588,10 @@ c_common_handle_option (size_t scode, co
        add_path (xstrdup (arg), SYSTEM, 0, true);
        break;
  
@@ -15,9 +25,9 @@ Forward ported from attachment to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=4
        break;
 --- a/gcc/c-family/c.opt
 +++ b/gcc/c-family/c.opt
-@@ -1528,6 +1528,10 @@ iquote
+@@ -1825,6 +1825,10 @@ iquote
  C ObjC C++ ObjC++ Joined Separate MissingArgError(missing path after %qs)
- -iquote <dir> Add <dir> to the end of the quote include path
+ -iquote <dir> Add <dir> to the end of the quote include path.
  
 +iremap
 +C ObjC C++ ObjC++ Joined Separate
@@ -25,22 +35,22 @@ Forward ported from attachment to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=4
 +
  iwithprefix
  C ObjC C++ ObjC++ Joined Separate
- -iwithprefix <dir>    Add <dir> to the end of the system include path
+ -iwithprefix <dir>    Add <dir> to the end of the system include path.
 --- a/gcc/doc/cpp.texi
 +++ b/gcc/doc/cpp.texi
-@@ -4441,6 +4441,7 @@ without notice.
+@@ -4272,6 +4272,7 @@ Refer to the GCC manual for full documen
  @c man begin SYNOPSIS
  cpp [@option{-D}@var{macro}[=@var{defn}]@dots{}] [@option{-U}@var{macro}]
      [@option{-I}@var{dir}@dots{}] [@option{-iquote}@var{dir}@dots{}]
 +    [@option{-iremap}@var{src}:@var{dst}]
-     [@option{-W}@var{warn}@dots{}]
      [@option{-M}|@option{-MM}] [@option{-MG}] [@option{-MF} @var{filename}]
      [@option{-MP}] [@option{-MQ} @var{target}@dots{}]
+     [@option{-MT} @var{target}@dots{}]
 --- a/gcc/doc/cppopts.texi
 +++ b/gcc/doc/cppopts.texi
-@@ -532,6 +532,12 @@ Search @var{dir} only for header files r
- If @var{dir} begins with @code{=}, then the @code{=} will be replaced
by the sysroot prefix; see @option{--sysroot} and @option{-isysroot}.
+@@ -220,6 +220,12 @@ extensions @samp{.i}, @samp{.ii} or @sam
+ extensions that GCC uses for preprocessed files created by
@option{-save-temps}.
  
 +@item -iremap @var{src}:@var{dst}
 +@opindex iremap
@@ -53,20 +63,9 @@ Forward ported from attachment to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=4
  When preprocessing, handle directives, but do not expand macros.
 --- a/gcc/doc/invoke.texi
 +++ b/gcc/doc/invoke.texi
-@@ -494,8 +494,8 @@ Objective-C and Objective-C++ Dialects}.
- @item Directory Options
- @xref{Directory Options,,Options for Directory Search}.
- @gccoptlist{-B@var{prefix} -I@var{dir} -iplugindir=@var{dir} @gol
---iquote@var{dir} -L@var{dir} -specs=@var{file} -I- @gol
----sysroot=@var{dir} --no-sysroot-suffix}
-+-iquote@var{dir} -iremap@var{src}:@var{dst} -L@var{dir} -specs=@var{file} @gol
-+-I- --sysroot=@var{dir} --no-sysroot-suffix}
- @item Machine Dependent Options
- @xref{Submodel Options,,Hardware Models and Configurations}.
-@@ -11479,6 +11479,12 @@ be searched for header files only for th
- "@var{file}"}; they are not searched for @code{#include <@var{file}>},
- otherwise just like @option{-I}.
+@@ -11871,6 +11871,12 @@ by @option{-fplugin=@var{name}} instead
+ @option{-fplugin=@var{path}/@var{name}.so}.  This option is not meant
+ to be used by the user, but only passed by the driver.
  
 +@item -iremap @var{src}:@var{dst}
 +@opindex iremap
@@ -79,7 +78,7 @@ Forward ported from attachment to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=4
  Add directory @var{dir} to the list of directories to be searched
 --- a/libcpp/include/cpplib.h
 +++ b/libcpp/include/cpplib.h
-@@ -751,6 +751,9 @@ extern void cpp_set_lang (cpp_reader *,
+@@ -820,6 +820,9 @@ extern void cpp_set_lang (cpp_reader *,
  /* Set the include paths.  */
  extern void cpp_set_include_chains (cpp_reader *, cpp_dir *, cpp_dir *, int);
  
@@ -91,7 +90,7 @@ Forward ported from attachment to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=4
     call cpp_finish on that reader.  You can either edit the callbacks
 --- a/libcpp/macro.c
 +++ b/libcpp/macro.c
-@@ -224,6 +224,64 @@ static const char * const monthnames[] =
+@@ -227,6 +227,64 @@ static const char * const monthnames[] =
    "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
  };
  
@@ -156,7 +155,7 @@ Forward ported from attachment to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=4
  /* Helper function for builtin_macro.  Returns the text generated by
     a builtin macro. */
  const uchar *
-@@ -286,6 +344,7 @@ _cpp_builtin_macro_text (cpp_reader *pfi
+@@ -290,6 +348,7 @@ _cpp_builtin_macro_text (cpp_reader *pfi
        {
        unsigned int len;
        const char *name;
@@ -164,7 +163,7 @@ Forward ported from attachment to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=4
        uchar *buf;
        
        if (node->value.builtin == BT_FILE)
-@@ -297,6 +356,7 @@ _cpp_builtin_macro_text (cpp_reader *pfi
+@@ -301,6 +360,7 @@ _cpp_builtin_macro_text (cpp_reader *pfi
            if (!name)
              abort ();
          }
@@ -172,7 +171,7 @@ Forward ported from attachment to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=4
        len = strlen (name);
        buf = _cpp_unaligned_alloc (pfile, len * 2 + 3);
        result = buf;
-@@ -304,6 +364,7 @@ _cpp_builtin_macro_text (cpp_reader *pfi
+@@ -308,6 +368,7 @@ _cpp_builtin_macro_text (cpp_reader *pfi
        buf = cpp_quote_string (buf + 1, (const unsigned char *) name, len);
        *buf++ = '"';
        *buf = '\0';
diff --git a/devel/gcc/patches/960-go_libm.patch b/devel/gcc/patches/960-go_libm.patch
deleted file mode 100644 (file)
index d16b020..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/gcc/go/Make-lang.in
-+++ b/gcc/go/Make-lang.in
-@@ -74,7 +74,7 @@ go_OBJS = $(GO_OBJS) go/gospec.o
- go1$(exeext): $(GO_OBJS) attribs.o $(BACKEND) $(LIBDEPS)
-       +$(LLINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \
--            $(GO_OBJS) attribs.o $(BACKEND) $(LIBS) $(BACKENDLIBS)
-+            $(GO_OBJS) attribs.o $(BACKEND) $(LIBS) $(BACKENDLIBS) -lm
- # Documentation.
diff --git a/devel/gcc/patches/960-gotools-fix-compilation-when-making-cross-compiler.patch b/devel/gcc/patches/960-gotools-fix-compilation-when-making-cross-compiler.patch
new file mode 100644 (file)
index 0000000..556fa16
--- /dev/null
@@ -0,0 +1,73 @@
+From dda6b050cd74a352670787a294596a9c56c21327 Mon Sep 17 00:00:00 2001
+From: Yousong Zhou <yszhou4tech@gmail.com>
+Date: Fri, 4 May 2018 18:20:53 +0800
+Subject: [PATCH] gotools: fix compilation when making cross compiler
+
+libgo is "the runtime support library for the Go programming language.
+This library is intended for use with the Go frontend."
+
+gccgo will link target files with libgo.so which depends on libgcc_s.so.1, but
+the linker will complain that it cannot find it.  That's because shared libgcc
+is not present in the install directory yet.  libgo.so was made without problem
+because gcc will emit -lgcc_s when compiled with -shared option.  When gotools
+were being made, it was supplied with -static-libgcc thus no link option was
+provided.  Check LIBGO in gcc/go/gcc-spec.c for how gccgo make a builtin spec
+for linking with libgo.so
+
+- GccgoCrossCompilation, https://github.com/golang/go/wiki/GccgoCrossCompilation
+- Cross-building instructions, http://www.eglibc.org/archives/patches/msg00078.html
+
+When 3-pass GCC compilation is used, shared libgcc runtime libraries will be
+available after gcc pass2 completed and will meet the gotools link requirement
+at gcc pass3
+---
+ gotools/Makefile.am | 4 +++-
+ gotools/Makefile.in | 4 +++-
+ 2 files changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/gotools/Makefile.am b/gotools/Makefile.am
+index 5f3940a278b..9c22f5df103 100644
+--- a/gotools/Makefile.am
++++ b/gotools/Makefile.am
+@@ -26,6 +26,7 @@ PWD_COMMAND = $${PWDCMD-pwd}
+ STAMP = echo timestamp >
+ libgodir = ../$(target_noncanonical)/libgo
++libgccdir = ../$(target_noncanonical)/libgcc
+ LIBGODEP = $(libgodir)/libgo.la
+ if NATIVE
+@@ -38,7 +39,8 @@ endif
+ GOCFLAGS = $(CFLAGS_FOR_TARGET)
+ GOCOMPILE = $(GOCOMPILER) $(GOCFLAGS)
+-AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs
++AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs \
++      -L $(libgccdir) -L $(libgccdir)/.libs -lgcc_s
+ GOLINK = $(GOCOMPILER) $(GOCFLAGS) $(AM_GOCFLAGS) $(LDFLAGS) $(AM_LDFLAGS) -o $@
+ cmdsrcdir = $(srcdir)/../libgo/go/cmd
+diff --git a/gotools/Makefile.in b/gotools/Makefile.in
+index 4386576b011..0bdd9290e01 100644
+--- a/gotools/Makefile.in
++++ b/gotools/Makefile.in
+@@ -252,13 +252,15 @@ mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
+ PWD_COMMAND = $${PWDCMD-pwd}
+ STAMP = echo timestamp >
+ libgodir = ../$(target_noncanonical)/libgo
++libgccdir = ../$(target_noncanonical)/libgcc
+ LIBGODEP = $(libgodir)/libgo.la
+ @NATIVE_FALSE@GOCOMPILER = $(GOC)
+ # Use the compiler we just built.
+ @NATIVE_TRUE@GOCOMPILER = $(GOC_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET)
+ GOCOMPILE = $(GOCOMPILER) $(GOCFLAGS)
+-AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs
++AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs \
++      -L $(libgccdir) -L $(libgccdir)/.libs -lgcc_s
+ GOLINK = $(GOCOMPILER) $(GOCFLAGS) $(AM_GOCFLAGS) $(LDFLAGS) $(AM_LDFLAGS) -o $@
+ cmdsrcdir = $(srcdir)/../libgo/go/cmd
+ go_cmd_go_files = \
+-- 
+2.16.3
+
diff --git a/devel/gcc/patches/970-warn_bug.patch b/devel/gcc/patches/970-warn_bug.patch
deleted file mode 100644 (file)
index 2c5cf9b..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/libgo/runtime/mprof.goc
-+++ b/libgo/runtime/mprof.goc
-@@ -403,7 +403,7 @@ func ThreadCreateProfile(p Slice) (n int
- func Stack(b Slice, all bool) (n int) {
-       byte *pc, *sp;
--      bool enablegc;
-+      bool enablegc = false; /* workaround GCC bug #36550 */
-       
-       sp = runtime_getcallersp(&b);
-       pc = (byte*)(uintptr)runtime_getcallerpc(&b);
index efcee5c66e6cd96acaf420652c11c8716c349211..c63fd951c6c5a425eccb8e484e5bc3c00dce5fe4 100644 (file)
@@ -9,13 +9,15 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libtool
 PKG_VERSION:=2.4.6
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@GNU/libtool
 PKG_HASH:=7c87a8c2c8c0fc9cd5019e402bed4292462d00a718a7cd5f11218153bf28b26f
 PKG_MAINTAINER:=Heinrich Schuchardt <xypron.glpk@gmx.de>
-PKG_LICENSE:=GPL-2.0+
+PKG_LICENSE:=GPL-2.0-or-later
+PKG_CPE_ID:=cpe:/a:gnu:libtool
+
 PKG_BUILD_DIR = $(BUILD_DIR)/libtool-bin/$(PKG_NAME)-$(PKG_VERSION)
 
 PKG_INSTALL:=1
index daaf05ff4b59f28b12fdc82c677bfdb599bfe910..63ea54cd02f955c1b72a38295a31233d78ad73c7 100644 (file)
@@ -9,8 +9,8 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=lpc21isp
 PKG_VERSION:=197
-PKG_RELEASE:=2
-PKG_LICENSE:=LGPL-3.0+
+PKG_RELEASE:=3
+PKG_LICENSE:=LGPL-3.0-or-later
 PKG_LICENSE_FILES:=README gpl.txt lgpl-3.0.txt
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/lpc21isp_$(PKG_VERSION)
index 1a42f4b171710840097973ed676d274f31596cff..69ca0fd55b555b91e4bbaf8a6067b3597059768d 100644 (file)
@@ -9,13 +9,14 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=m4
 PKG_VERSION:=1.4.18
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_URL:=@GNU/m4
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_HASH:=f2c1e86ca0a404ff281631bdc8377638992744b175afb806e25871a24a934e07
 PKG_MAINTAINER:=Heinrich Schuchardt <xypron.glpk@gmx.de>
-PKG_LICENSE:=GPL-3.0+
+PKG_LICENSE:=GPL-3.0-or-later
+PKG_CPE_ID:=cpe:/a:gnu:m4
 
 PKG_INSTALL:=1
 
index c3dde4def6d3aaeca4702c4305378aa6b64cda59..946a2bcbfa85fff3b097d4825be9dbb6a61041f2 100644 (file)
@@ -9,13 +9,14 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=make
 PKG_VERSION:=4.2.1
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_SOURCE_URL:=@GNU/make
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_HASH:=d6e262bf3601b42d2b1e4ef8310029e1dcf20083c5446b4b7aa67081fdffc589
 PKG_MAINTAINER:=Heinrich Schuchardt <xypron.glpk@gmx.de>
-PKG_LICENSE:=GPL-3.0+
+PKG_LICENSE:=GPL-3.0-or-later
+PKG_CPE_ID:=cpe:/a:gnu:make
 
 PKG_INSTALL:=1
 
index 43049def1b519195773cb980aa0a2d477b516063..5ea67c7a8d03be6fcb9368263c3027f62915bae4 100644 (file)
@@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=patch
 PKG_VERSION:=2.7.6
-PKG_RELEASE:=3
+PKG_RELEASE:=6
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@GNU/patch
 PKG_HASH:=ac610bda97abe0d9f6b7c963255a11dcb196c25e337c61f94e4778d632f1d8fd
 
-PKG_LICENSE:=GPL-3.0+
+PKG_LICENSE:=GPL-3.0-or-later
 PKG_LICENSE_FILES:=COPYING
 PKG_CPE_ID:=cpe:/a:gnu:patch
 
diff --git a/devel/patch/patches/050-CVE-2019-13636.patch b/devel/patch/patches/050-CVE-2019-13636.patch
new file mode 100644 (file)
index 0000000..e62c3d4
--- /dev/null
@@ -0,0 +1,108 @@
+From dce4683cbbe107a95f1f0d45fabc304acfb5d71a Mon Sep 17 00:00:00 2001
+From: Andreas Gruenbacher <agruen@gnu.org>
+Date: Mon, 15 Jul 2019 16:21:48 +0200
+Subject: Don't follow symlinks unless --follow-symlinks is given
+
+* src/inp.c (plan_a, plan_b), src/util.c (copy_to_fd, copy_file,
+append_to_file): Unless the --follow-symlinks option is given, open files with
+the O_NOFOLLOW flag to avoid following symlinks.  So far, we were only doing
+that consistently for input files.
+* src/util.c (create_backup): When creating empty backup files, (re)create them
+with O_CREAT | O_EXCL to avoid following symlinks in that case as well.
+---
+ src/inp.c  | 12 ++++++++++--
+ src/util.c | 14 +++++++++++---
+ 2 files changed, 21 insertions(+), 5 deletions(-)
+
+diff --git a/src/inp.c b/src/inp.c
+index 32d0919..22d7473 100644
+--- a/src/inp.c
++++ b/src/inp.c
+@@ -238,8 +238,13 @@ plan_a (char const *filename)
+     {
+       if (S_ISREG (instat.st_mode))
+         {
+-        int ifd = safe_open (filename, O_RDONLY|binary_transput, 0);
++        int flags = O_RDONLY | binary_transput;
+         size_t buffered = 0, n;
++        int ifd;
++
++        if (! follow_symlinks)
++          flags |= O_NOFOLLOW;
++        ifd = safe_open (filename, flags, 0);
+         if (ifd < 0)
+           pfatal ("can't open file %s", quotearg (filename));
+@@ -340,6 +345,7 @@ plan_a (char const *filename)
+ static void
+ plan_b (char const *filename)
+ {
++  int flags = O_RDONLY | binary_transput;
+   int ifd;
+   FILE *ifp;
+   int c;
+@@ -353,7 +359,9 @@ plan_b (char const *filename)
+   if (instat.st_size == 0)
+     filename = NULL_DEVICE;
+-  if ((ifd = safe_open (filename, O_RDONLY | binary_transput, 0)) < 0
++  if (! follow_symlinks)
++    flags |= O_NOFOLLOW;
++  if ((ifd = safe_open (filename, flags, 0)) < 0
+       || ! (ifp = fdopen (ifd, binary_transput ? "rb" : "r")))
+     pfatal ("Can't open file %s", quotearg (filename));
+   if (TMPINNAME_needs_removal)
+diff --git a/src/util.c b/src/util.c
+index 1cc08ba..fb38307 100644
+--- a/src/util.c
++++ b/src/util.c
+@@ -388,7 +388,7 @@ create_backup (char const *to, const struct stat *to_st, bool leave_original)
+         try_makedirs_errno = ENOENT;
+         safe_unlink (bakname);
+-        while ((fd = safe_open (bakname, O_CREAT | O_WRONLY | O_TRUNC, 0666)) < 0)
++        while ((fd = safe_open (bakname, O_CREAT | O_EXCL | O_WRONLY | O_TRUNC, 0666)) < 0)
+           {
+             if (errno != try_makedirs_errno)
+               pfatal ("Can't create file %s", quotearg (bakname));
+@@ -579,10 +579,13 @@ create_file (char const *file, int open_flags, mode_t mode,
+ static void
+ copy_to_fd (const char *from, int tofd)
+ {
++  int from_flags = O_RDONLY | O_BINARY;
+   int fromfd;
+   ssize_t i;
+-  if ((fromfd = safe_open (from, O_RDONLY | O_BINARY, 0)) < 0)
++  if (! follow_symlinks)
++    from_flags |= O_NOFOLLOW;
++  if ((fromfd = safe_open (from, from_flags, 0)) < 0)
+     pfatal ("Can't reopen file %s", quotearg (from));
+   while ((i = read (fromfd, buf, bufsize)) != 0)
+     {
+@@ -625,6 +628,8 @@ copy_file (char const *from, char const *to, struct stat *tost,
+   else
+     {
+       assert (S_ISREG (mode));
++      if (! follow_symlinks)
++      to_flags |= O_NOFOLLOW;
+       tofd = create_file (to, O_WRONLY | O_BINARY | to_flags, mode,
+                         to_dir_known_to_exist);
+       copy_to_fd (from, tofd);
+@@ -640,9 +645,12 @@ copy_file (char const *from, char const *to, struct stat *tost,
+ void
+ append_to_file (char const *from, char const *to)
+ {
++  int to_flags = O_WRONLY | O_APPEND | O_BINARY;
+   int tofd;
+-  if ((tofd = safe_open (to, O_WRONLY | O_BINARY | O_APPEND, 0)) < 0)
++  if (! follow_symlinks)
++    to_flags |= O_NOFOLLOW;
++  if ((tofd = safe_open (to, to_flags, 0)) < 0)
+     pfatal ("Can't reopen file %s", quotearg (to));
+   copy_to_fd (from, tofd);
+   if (close (tofd) != 0)
+-- 
+cgit v1.0-41-gc330
+
diff --git a/devel/patch/patches/060-CVE-2018-20969-CVE-2019-13638.patch b/devel/patch/patches/060-CVE-2018-20969-CVE-2019-13638.patch
new file mode 100644 (file)
index 0000000..38caff6
--- /dev/null
@@ -0,0 +1,38 @@
+From 3fcd042d26d70856e826a42b5f93dc4854d80bf0 Mon Sep 17 00:00:00 2001
+From: Andreas Gruenbacher <agruen@gnu.org>
+Date: Fri, 6 Apr 2018 19:36:15 +0200
+Subject: Invoke ed directly instead of using the shell
+
+* src/pch.c (do_ed_script): Invoke ed directly instead of using a shell
+command to avoid quoting vulnerabilities.
+---
+ src/pch.c | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/src/pch.c b/src/pch.c
+index 4fd5a05..16e001a 100644
+--- a/src/pch.c
++++ b/src/pch.c
+@@ -2459,9 +2459,6 @@ do_ed_script (char const *inname, char const *outname,
+           *outname_needs_removal = true;
+           copy_file (inname, outname, 0, exclusive, instat.st_mode, true);
+         }
+-      sprintf (buf, "%s %s%s", editor_program,
+-               verbosity == VERBOSE ? "" : "- ",
+-               outname);
+       fflush (stdout);
+       pid = fork();
+@@ -2470,7 +2467,8 @@ do_ed_script (char const *inname, char const *outname,
+       else if (pid == 0)
+         {
+           dup2 (tmpfd, 0);
+-          execl ("/bin/sh", "sh", "-c", buf, (char *) 0);
++          assert (outname[0] != '!' && outname[0] != '-');
++          execlp (editor_program, editor_program, "-", outname, (char  *) NULL);
+           _exit (2);
+         }
+       else
+-- 
+cgit v1.0-41-gc330
+
index 70d2d7ca4dfb4d95f5b4f28a3419c6ab3bd55763..5bfebd28eba42a3f64108359f6dd8891d7064bdf 100644 (file)
@@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=pkg-config
 PKG_VERSION:=0.29.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_URL:=https://pkg-config.freedesktop.org/releases/
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_HASH:=6fc69c01688c9458a57eb9a1664c9aba372ccda420a02bf4429fe610e7e7d591
 PKG_MAINTAINER:=Heinrich Schuchardt <xypron.glpk@gmx.de>
-PKG_LICENSE:=GPL-2+
+PKG_LICENSE:=GPL-2.0-or-later
 
 PKG_ASLR_PIE:=1
 PKG_INSTALL:=1
diff --git a/devel/scons/Makefile b/devel/scons/Makefile
new file mode 100644 (file)
index 0000000..fa18487
--- /dev/null
@@ -0,0 +1,56 @@
+#
+# Copyright (C) 2011-2015 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:=scons
+PKG_VERSION:=3.1.1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=@SF/scons \
+               https://fossies.org/linux/misc/
+PKG_HASH:=4cea417fdd7499a36f407923d03b4b7000b0f9e8fd7b31b316b9ce7eba9143a5
+
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+PKG_MAINTAINER:=
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
+
+define Package/scons
+  SECTION:=devel
+  CATEGORY:=Development
+  TITLE:=scons
+  HIDDEN:=1
+endef
+
+define Package/scons/description
+  SCons is an Open Source software construction tool—that is, a
+  next-generation build tool. Think of SCons as an improved, cross-platform
+  substitute for the classic Make utility with integrated functionality
+  similar to autoconf/automake and compiler caches such as ccache. In short,
+  SCons is an easier, more reliable and faster way to build software.
+endef
+
+define Host/Configure
+endef
+
+define Host/Compile
+endef
+
+define Host/Install
+       ./files/pywrap.sh $(HOST_BUILD_DIR)/setup.py install --prefix=$(STAGING_DIR_HOST)
+       rm -f $(STAGING_DIR_HOST)/bin/scons*.py
+       for bin in $(STAGING_DIR_HOST)/bin/scons*; do \
+               mv "$$$$bin" "$$$$bin.py";                \
+               cp ./files/pywrap.sh "$$$$bin";           \
+       done
+endef
+
+$(eval $(call BuildPackage,scons))
+$(eval $(call HostBuild))
diff --git a/devel/scons/files/pywrap.sh b/devel/scons/files/pywrap.sh
new file mode 100755 (executable)
index 0000000..bb99029
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+case "${0##*/}" in
+       pywrap.sh) arg1="";;
+       *) arg1="$0.py" ;;
+esac
+
+for bin in python python3; do
+    case "$($bin -V 2>&1)" in
+        "Python 3"*) exec $bin $arg1 "$@" ;;
+    esac
+done
+
+echo "Unable to find a Python 3.x interpreter for executing ${arg1:+$arg1 }$* !" >&2
+exit 1
diff --git a/devel/scons/patches/001-platform_env.patch b/devel/scons/patches/001-platform_env.patch
new file mode 100644 (file)
index 0000000..2be3147
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/engine/SCons/Platform/__init__.py
++++ b/engine/SCons/Platform/__init__.py
+@@ -65,6 +65,8 @@ def platform_default():
+     care about the machine architecture.
+     """
+     osname = os.name
++    if 'PLATFORM' in os.environ:
++        return os.environ['PLATFORM']
+     if osname == 'java':
+         osname = os._osType
+     if osname == 'posix':
diff --git a/devel/scons/scons.mk b/devel/scons/scons.mk
new file mode 100644 (file)
index 0000000..2b76710
--- /dev/null
@@ -0,0 +1,23 @@
+export PLATFORM=posix
+
+SCONS_VARS = \
+       CC="$(TARGET_CC_NOCACHE)" \
+       CXX="$(TARGET_CXX_NOCACHE)" \
+       CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
+       CXXFLAGS="$(TARGET_CXXFLAGS) $(EXTRA_CXXFLAGS)" \
+       CPPFLAGS="$(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" \
+       LDFLAGS="$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS)" \
+       DESTDIR="$(PKG_INSTALL_DIR)"
+
+define Build/Configure/Default
+       (cd $(PKG_BUILD_DIR); \
+               $(SCONS_VARS) \
+               scons \
+                       prefix=/usr \
+                       $(SCONS_OPTIONS) \
+               install \
+       )
+endef
+
+define Build/Compile
+endef
diff --git a/kernel/cifsd/Makefile b/kernel/cifsd/Makefile
new file mode 100644 (file)
index 0000000..b0eeca7
--- /dev/null
@@ -0,0 +1,53 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=cifsd
+PKG_RELEASE:=1
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/cifsd-team/cifsd.git
+PKG_SOURCE_DATE:=2019-08-19
+PKG_SOURCE_VERSION:=b919acf32027cd5d7616726336305b47e24f02ab
+PKG_MIRROR_HASH:=fd64b2cb78b8847f11ff79cbe06c3416bb0e67ca7433215d20c810fbfff6ee8f
+
+PKG_MAINTAINER:=Andy Walsh <andy.walsh44+github@gmail.com>
+PKG_LICENSE:=GPL-2.0-or-later
+PKG_LICENSE_FILES:=COPYING
+
+include $(INCLUDE_DIR)/kernel.mk
+include $(INCLUDE_DIR)/package.mk
+
+define KernelPackage/fs-cifsd
+       SUBMENU:=Filesystems
+       TITLE:=CIFS/SMB kernel server support
+       URL:=https://github.com/cifsd-team/cifsd
+       FILES:=$(PKG_BUILD_DIR)/cifsd.ko
+       DEPENDS:= \
+               +kmod-nls-base \
+               +kmod-nls-utf8 \
+               +kmod-crypto-md4 \
+               +kmod-crypto-md5 \
+               +kmod-crypto-hmac \
+               +kmod-crypto-ecb \
+               +kmod-crypto-des \
+               +kmod-crypto-sha256 \
+               +kmod-crypto-cmac \
+               +kmod-crypto-sha512 \
+               +kmod-crypto-aead \
+               +kmod-crypto-ccm
+endef
+
+define KernelPackage/fs-cifsd/description
+       Kernel module for a CIFS/SMBv2,3 fileserver.
+endef
+
+# broken atm (needs CONFIG_KEYS=y)
+#EXTRA_CFLAGS+=-DCONFIG_CIFSD_ACL
+
+define Build/Compile
+       $(KERNEL_MAKE) SUBDIRS="$(PKG_BUILD_DIR)" \
+       EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
+       CONFIG_CIFS_SERVER=m \
+       modules
+endef
+
+$(eval $(call KernelPackage,fs-cifsd))
diff --git a/kernel/cifsd/patches/001-mips-vfree_vmalloc-fix.patch b/kernel/cifsd/patches/001-mips-vfree_vmalloc-fix.patch
new file mode 100644 (file)
index 0000000..6d00df0
--- /dev/null
@@ -0,0 +1,33 @@
+--- a/vfs_cache.c
++++ b/vfs_cache.c
+@@ -232,7 +232,7 @@ int __init cifsd_inode_hash_init(void)
+       size = bucketsize << inode_hash_shift;
+       /* init master fp hash table */
+-      inode_hashtable = __vmalloc(size, GFP_ATOMIC, PAGE_KERNEL);
++      inode_hashtable = vmalloc(size);
+       if (!inode_hashtable)
+               return -ENOMEM;
+--- b/vfs.c
++++ b/vfs.c
+@@ -17,6 +17,8 @@
+ #include <linux/fsnotify.h>
+ #include <linux/dcache.h>
+ #include <linux/fiemap.h>
++#include <linux/slab.h>
++#include <linux/vmalloc.h>
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
+ #include <linux/sched/xacct.h>
+--- b/vfs_cache.c
++++ b/vfs_cache.c
+@@ -5,6 +5,8 @@
+  */
+ #include <linux/fs.h>
++#include <linux/slab.h>
++#include <linux/vmalloc.h>
+ /* @FIXME */
+ #include "glob.h"
diff --git a/kernel/cifsd/patches/002-fix-xattr_list.patch b/kernel/cifsd/patches/002-fix-xattr_list.patch
new file mode 100644 (file)
index 0000000..af3680d
--- /dev/null
@@ -0,0 +1,89 @@
+===
+
+SMB1/SMB2 don't know exactly how vfs layer allocates xattr list,
+via kmalloc() or vmalloc(). Introduce cifsd_vfs_xattr_free() and
+keep both xattr allocation and de-allocation in one place.
+
+Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
+---
+ smb1pdu.c | 4 ++--
+ smb2pdu.c | 6 ++----
+ vfs.c     | 6 ++++++
+ vfs.h     | 1 +
+ 4 files changed, 11 insertions(+), 6 deletions(-)
+
+diff --git a/smb1pdu.c b/smb1pdu.c
+index 35599ef..8cb92cf 100644
+--- a/smb1pdu.c
++++ b/smb1pdu.c
+@@ -8,6 +8,7 @@
+ #include <linux/posix_acl_xattr.h>
+ #include <linux/namei.h>
+ #include <linux/statfs.h>
++#include <linux/vmalloc.h>
+
+ #include "glob.h"
+ #include "smb1pdu.h"
+@@ -3844,8 +3845,7 @@ done:
+       rsp->ByteCount = cpu_to_le16(rsp_data_cnt + 5);
+       inc_rfc1001_len(&rsp->hdr, (10 * 2 + rsp->ByteCount));
+ out:
+-      if (xattr_list)
+-              vfree(xattr_list);
++      cifsd_vfs_xattr_free(xattr_list);
+       return rc;
+ }
+
+diff --git a/smb2pdu.c b/smb2pdu.c
+index 754258f..2727622 100644
+--- a/smb2pdu.c
++++ b/smb2pdu.c
+@@ -3867,8 +3867,7 @@ done:
+       rsp->OutputBufferLength = cpu_to_le32(rsp_data_cnt);
+       inc_rfc1001_len(rsp_org, rsp_data_cnt);
+ out:
+-      if (xattr_list)
+-              vfree(xattr_list);
++      cifsd_vfs_xattr_free(xattr_list);
+       return rc;
+ }
+
+@@ -4151,8 +4150,7 @@ static void get_file_stream_info(struct cifsd_work *work,
+       /* last entry offset should be 0 */
+       file_info->NextEntryOffset = 0;
+ out:
+-      if (xattr_list)
+-              vfree(xattr_list);
++      cifsd_vfs_xattr_free(xattr_list);
+
+       rsp->OutputBufferLength = cpu_to_le32(nbytes);
+       inc_rfc1001_len(rsp_org, nbytes);
+diff --git a/vfs.c b/vfs.c
+index 556b1a5..6da6f8e 100644
+--- a/vfs.c
++++ b/vfs.c
+@@ -1550,6 +1550,12 @@ int cifsd_vfs_remove_xattr(struct dentry *dentry, char *attr_name)
+       return vfs_removexattr(dentry, attr_name);
+ }
+
++void cifsd_vfs_xattr_free(char *xattr)
++{
++      if (xattr)
++              vfree(xattr);
++}
++
+ int cifsd_vfs_unlink(struct dentry *dir, struct dentry *dentry)
+ {
+       int err = 0;
+diff --git a/vfs.h b/vfs.h
+index ee54daf..16b4f9e 100644
+--- a/vfs.h
++++ b/vfs.h
+@@ -186,6 +186,7 @@ int cifsd_vfs_xattr_stream_name(char *stream_name,
+
+ int cifsd_vfs_truncate_xattr(struct dentry *dentry, int wo_streams);
+ int cifsd_vfs_remove_xattr(struct dentry *dentry, char *attr_name);
++void cifsd_vfs_xattr_free(char *xattr);
+
+ int cifsd_vfs_kern_path(char *name, unsigned int flags, struct path *path,
+               bool caseless);
index e2392100bfa685c74501bc6cbedfb220ff2d405b..8354f56214623c7d55654f51ff35d585f0f66db3 100644 (file)
@@ -29,7 +29,7 @@ define KernelPackage/fs-exfat
        TITLE:=ExFAT Kernel driver
        FILES:=$(PKG_BUILD_DIR)/exfat.ko
        AUTOLOAD:=$(call AutoLoad,30,exfat,1)
-       DEPENDS:=+kmod-nls-base @BUILD_PATENTED
+       DEPENDS:=+kmod-nls-base
 endef
 
 define KernelPackage/fs-exfat/description
index f175475ed08765a5e70ad6480a0985db2307339c..7eae390f8d2d71d11bf6c901852a92f979a920bd 100644 (file)
@@ -9,18 +9,18 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=pf-ring
-PKG_VERSION:=7.2.0
+PKG_VERSION:=7.4.0
 PKG_RELEASE:=1
-PKG_MAINTAINER:=Banglang Huang <banglang.huang@foxmail.com>
 
-PKG_LICENSE:=GPL-2.0
+PKG_MAINTAINER:=Banglang Huang <banglang.huang@foxmail.com>
+PKG_LICENSE:=GPL-2.0-only
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/ntop/PF_RING/tar.gz/$(PKG_VERSION)?
-PKG_HASH:=5d349ac37a6ece5966bf606a6f131d628b98d88654c2f502d3c4b8bbf6ef9796
-
+PKG_HASH:=e1c9cb44d8072854220f493c56fa5cba99a6b8336883939dc18b3e30c2954b68
 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/PF_RING-$(PKG_VERSION)
 
+PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
index 4fd60cd2e17ce4e87b701ad705cea272b2a5eb2e..bd9f1c9b7b394867859d3cb8ee6e436368036495 100644 (file)
@@ -1,32 +1,34 @@
 #
 # Copyright (C) 2019 Jerônimo Cordoni Pellegrini <j_p@aleph0.info>
 #
-# This file is free software, licensed under the GNU General Public License v2.
+# This file is free software, licensed under the GNU General Public License v3
+# or later.
 # See /LICENSE for details
 #
 
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=chicken-scheme-interpreter
-PKG_VERSION=5.0.0
+PKG_VERSION=5.1.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_SOURCE_URL:=https://code.call-cc.org/releases/$(PKG_VERSION)/
+PKG_HASH:=5c1101a8d8faabfd500ad69101e0c7c8bd826c68970f89c270640470e7b84b4b
+PKG_BUILD_DIR:=$(BUILD_DIR)/chicken-$(PKG_VERSION)
 
+PKG_MAINTAINER:=Jeronimo Pellegrini <j_p@aleph0.info>
 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>
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=Chicken Scheme
+  URL:=https://call-cc.org
+  ABI_VERSION:=11
 endef
 
 define Package/chicken-scheme-interpreter/description
@@ -49,12 +51,12 @@ MAKE_FLAGS += PLATFORM=linux C_COMPILER=$(TARGET_CC) LINKER=$(TARGET_CC) PREFIX=
 # - 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/
+       $(INSTALL_DIR)  $(1)/usr/lib/chicken/$(ABI_VERSION)
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/csi                 $(1)/usr/bin/
+       $(CP) $(PKG_BUILD_DIR)/libchicken.so.$(ABI_VERSION) $(1)/usr/lib/
+       $(CP) $(PKG_BUILD_DIR)/libchicken.so                $(1)/usr/lib/
+       $(CP) $(PKG_BUILD_DIR)/*.import.so                  $(1)/usr/lib/chicken/$(ABI_VERSION)/
+       $(CP) $(PKG_BUILD_DIR)/types.db                     $(1)/usr/lib/chicken/$(ABI_VERSION)/
 endef
 
 $(eval $(call BuildPackage,chicken-scheme-interpreter))
index bc922f081a75aef76c30790f2aa6f4eb5a0a4eff..83c7a7091b2953e58ba6ced713c1030d3ecb5668 100644 (file)
@@ -18,6 +18,7 @@ PKG_HASH:=c7d247c0cad2d2e718eaca2e2dff051136a1347a92097abf19ebf65ea2870131
 PKG_LICENSE:=Apache-2.0
 PKG_LICENSE_FILES:=LICENSE.txt
 PKG_MAINTAINER:=Arnaud Sautaux <arnaud.sautaux@infoteam.ch>
+PKG_CPE_ID:=cpe:/a:erlang:erlang
 
 PKG_BUILD_DEPENDS:=erlang/host openssl
 PKG_USE_MIPS16:=0
index 7522a9f4fa6f85e86cb99631d6f22246ff8b2915..172b7789710375d138e7fe8943be396738aca147 100644 (file)
@@ -147,7 +147,7 @@ define GoPackage/GoSubMenu
   CATEGORY:=Languages
 endef
 
-define GoPackage/Environment
+define GoPackage/Environment/Default
        GOOS=$(GO_OS) \
        GOARCH=$(GO_ARCH) \
        GO386=$(GO_386) \
@@ -160,6 +160,8 @@ define GoPackage/Environment
        CGO_CXXFLAGS="$(filter-out $(GO_CFLAGS_TO_REMOVE),$(TARGET_CXXFLAGS))"
 endef
 
+GoPackage/Environment=$(call GoPackage/Environment/Default,)
+
 # false if directory does not exist
 GoPackage/is_dir_not_empty=$$$$($(FIND) $(1) -maxdepth 0 -type d \! -empty 2>/dev/null)
 
@@ -273,7 +275,6 @@ define GoPackage/Build/Compile
                        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)" ; \
@@ -282,8 +283,7 @@ define GoPackage/Build/Compile
                        done ; \
                        go install \
                                $$$${installsuffix:+-installsuffix $$$$installsuffix} \
-                               -gcflags "$$$$trimpath" \
-                               -asmflags "$$$$trimpath" \
+                               -trimpath \
                                -ldflags "$$$$ldflags" \
                                -v \
                                $$$${pkg_gcflags:+-gcflags "$$$$pkg_gcflags"} \
index 78ad1b3de6d540e0e068b16e29b0952aff114679..a52dcc92de35862a3a8684d3741098d6615934dc 100644 (file)
@@ -27,6 +27,7 @@ unexport \
   CC_FOR_TARGET CXX_FOR_TARGET GO_DISTFLAGS GO_GCFLAGS GO_LDFLAGS GOBUILDTIMELOGFILE GOROOT_BOOTSTRAP \
   BOOT_GO_GCFLAGS GOEXPERIMENT GOBOOTSTRAP_TOOLEXEC
   # there are more magic environment variables to track down, but ain't nobody got time for that
+  # deliberately left untouched: GOPROXY GONOPROXY GOSUMDB GONOSUMDB GOPRIVATE
 
 go_arch=$(subst \
   aarch64,arm64,$(subst \
index 5c6ce3b4d00e75dd7d8bdc160485a9e3632759bb..196ea7ccc7d5b697a0edf7ec19154a2a5a0ed54f 100644 (file)
@@ -10,5 +10,5 @@ ifeq ($(origin GO_INCLUDE_DIR),undefined)
 endif
 
 
-GO_VERSION_MAJOR_MINOR:=1.12
-GO_VERSION_PATCH:=5
+GO_VERSION_MAJOR_MINOR:=1.13
+GO_VERSION_PATCH:=1
index 484abd51978b780f20960433505190b29a5fe90a..41837ac4d44588bd9f412ef48bc0fc6616445295 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:=2aa5f088cbb332e73fc3def546800616b38d3bfe6b8713b8a6404060f22503e8
+PKG_HASH:=81f154e69544b9fa92b1475ff5f11e64270260d46e7e36c34aafc8bc96209358
 
 PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=LICENSE
index 616bd66c7dfcf773a8bd6cbf94e41320d59eab95..0db18b385b364022356024d9a418e38fa841bc88 100644 (file)
@@ -9,29 +9,30 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=jamvm
 PKG_VERSION:=2.0.0
-PKG_RELEASE:=2
-PKG_LICENSE:=GPL-2.0+
-PKG_MAINTAINER:=Dana H. Myers <k6jq@comcast.net>
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/$(PKG_NAME)
 PKG_HASH:=76428e96df0ae9dd964c7a7c74c1e9a837e2f312c39e9a357fa8178f7eff80da
 
-PKG_USE_MIPS16:=0
+PKG_MAINTAINER:=Dana H. Myers <k6jq@comcast.net>
+PKG_LICENSE:=GPL-2.0-or-later
+PKG_LICENSE_FILES:=COPYING
 
 PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
+PKG_USE_MIPS16:=0
 
 include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
 
 define Package/jamvm
   SUBMENU:=Java
   SECTION:=lang
   CATEGORY:=Languages
   TITLE:=A compact Java Virtual Machine
-  URL:=http://sourceforge.net/projects/jamvm
-  DEPENDS:=+zlib +libpthread +librt +classpath \
-         @(i386||i686||x86_64||arm||armeb||mips||mipsel||powerpc||powerpc64) +CONFIG_powerpc64:libffi
+  URL:=http://jamvm.sourceforge.net/
+  DEPENDS:=+zlib +libpthread +librt +CONFIG_powerpc64:libffi @!arc @!aarch64
 endef
 
 define Package/jamvm/description
@@ -66,3 +67,4 @@ define Build/InstallDev
 endef
 
 $(eval $(call BuildPackage,jamvm))
+$(eval $(call HostBuild))
diff --git a/lang/jamvm/patches/010-musl.patch b/lang/jamvm/patches/010-musl.patch
new file mode 100644 (file)
index 0000000..337012f
--- /dev/null
@@ -0,0 +1,12 @@
+--- a/src/os/linux/os.c
++++ b/src/os/linux/os.c
+@@ -26,6 +26,9 @@
+ #include <sys/sysinfo.h>
+ #define __USE_GNU
++#ifndef _GNU_SOURCE
++#define _GNU_SOURCE
++#endif
+ #include <dlfcn.h>
+ #include <pthread.h>
index a0500a64fa75b4ed8e211769e121edf6d0e0f961..5576991397b1e055fd17ef91c36362b08683ebb1 100644 (file)
@@ -7,17 +7,20 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ldbus
-PKG_RELEASE:=2
-PKG_MIRROR_HASH:=0e39a80e126a77a937226e49ae0246e1fd4600a03dee6bdee5ac822963a234e1
+PKG_SOURCE_DATE:=2019-08-15
+PKG_SOURCE_VERSION:=9e176fe851006037a643610e6d8f3a8e597d4073
+PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_VERSION:=f4a1464e915a2313c80fb40c5c40b0bee7583677
-PKG_SOURCE_DATE:=2017-10-03
 PKG_SOURCE_URL=https://github.com/daurnimator/ldbus
+PKG_MIRROR_HASH:=65fc7c975a17cfd3929b54973558205354fc285b6bd88a732c045e8444000d44
+
 PKG_MAINTAINER:=Enrico Mioso <mrkiko.rs@gmail.com>
 PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
 
 PKG_BUILD_DEPENDS:=luarocks/host
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -26,6 +29,7 @@ define Package/ldbus
   SECTION:=lang
   CATEGORY:=Languages
   TITLE:=ldbus Lua DBus bindings
+  URL:=https://github.com/daurnimator/ldbus
   DEPENDS:=+dbus +lua
 endef
 
@@ -36,26 +40,22 @@ define Package/ldbus/description
   for details.
 endef
 
-TARGET_CFLAGS += \
-       -I$(STAGING_DIR)/usr/include
-
-MAKE_FLAGS += \
-       FPIC="$(FPIC)" \
-       CFLAGS="$(TARGET_CFLAGS)" \
-       LDFLAGS="$(TARGET_LDFLAGS)"
-
-define Package/ldbus/install
-       $(INSTALL_DIR) $(1)/usr/lib/lua
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/ldbus.so $(1)/usr/lib/lua
-endef
-
 define Build/Compile
   cd $(PKG_BUILD_DIR) && \
   luarocks make --pack-binary-rock ldbus-scm-0.rockspec \
+    LUA_LIBDIR=$(STAGING_DIR)/usr/lib/lua \
+    LUA_PKGNAME=lua5.1 \
     DBUS_INCDIR=$(STAGING_DIR)/usr/include/dbus-1.0/ \
     DBUS_ARCH_INCDIR=$(STAGING_DIR)/usr/lib/dbus-1.0/include \
     DBUS_LIBDIR=$(STAGING_DIR)/usr/lib \
-    CC="$(TARGET_CC)" LD="$(TARGET_CC)"
+    CC="$(TARGET_CC)" LD="$(TARGET_CC)" \
+    CFLAGS="$(TARGET_CFLAGS) $(FPIC)" \
+    LDFLAGS="$(TARGET_LDFLAGS)"
+endef
+
+define Package/ldbus/install
+       $(INSTALL_DIR) $(1)/usr/lib/lua
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/ldbus.so $(1)/usr/lib/lua
 endef
 
 $(eval $(call BuildPackage,ldbus))
diff --git a/lang/lua-bit32/Makefile b/lang/lua-bit32/Makefile
new file mode 100644 (file)
index 0000000..da4ae87
--- /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:=lua-bit32
+PKG_VERSION:=5.3.0
+PKG_RELEASE:=1
+
+
+PKG_SRC_NAME:=lua-compat-5.2
+PKG_SRC_VERSION:=0.3
+PKG_SOURCE_URL=https://codeload.github.com/keplerproject/$(PKG_SRC_NAME)/tar.gz/v$(PKG_SRC_VERSION)?
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_HASH:=627e842c488c1afece4383da9f9a839a7ddbc2f7fedfc456f76e3a590d4ca67f
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SRC_NAME)-$(PKG_SRC_VERSION)
+
+PKG_MAINTAINER:=Maxim Storchak <m.storchak@gmail.com>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_BUILD_DEPENDS:=luarocks/host
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/lua-bit32
+  SUBMENU:=Lua
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=Lua 5.2 bit manipulation library
+  DEPENDS:=+lua
+endef
+
+define Package/lua-bit32/description
+  lua-bit32 is the native Lua 5.2 bit manipulation library,
+  backported to Lua 5.1
+endef
+
+TARGET_CFLAGS += \
+       -I$(STAGING_DIR)/usr/include
+
+define Build/Compile
+  cd $(PKG_BUILD_DIR) && \
+  luarocks make --pack-binary-rock bit32-scm-1.rockspec \
+    LUA_LIBDIR=$(STAGING_DIR)/usr/lib/lua \
+    LUA_PKGNAME=lua5.1 \
+       CFLAGS="$(TARGET_CFLAGS) $(FPIC)" \
+       LDFLAGS="$(TARGET_LDFLAGS)" \
+    CC="$(TARGET_CC)" LD="$(TARGET_CC)"
+endef
+
+define Package/$(PKG_NAME)/install
+       $(INSTALL_DIR) $(1)/usr/lib/lua
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/bit32.so $(1)/usr/lib/lua
+endef
+
+$(eval $(call BuildPackage,lua-bit32))
index 1fcd57065cb453527538a49b950ebcd355a3cd79..aa7341fbd364e28a5737083149cad989f1321748 100644 (file)
@@ -8,16 +8,16 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=lua-openssl
-PKG_VERSION:=0.7.1
+PKG_VERSION:=0.7.4
 PKG_RELEASE:=1
 PKG_MAINTAINER:=Amnon Paz <pazamnon@gmail.com>
 PKG_LICENSE:=MIT
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_MIRROR_HASH:=225e3fe09226ff72968a7f36a33e207d27332107456a754abbaa59f99a3038f3
+PKG_MIRROR_HASH:=c27cedee438de95877823b1ae0607556564d82c8692be40f43743ca9cc5a029a
 PKG_SOURCE_URL:=https://github.com/zhaozg/lua-openssl.git
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_VERSION:=b104bbe914d279276560f188854036075b99f724
+PKG_SOURCE_VERSION:=96effbaf477ca205f1787aaf1cce643bd208066b
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
 
 include $(INCLUDE_DIR)/package.mk
index 1a1ef9d038830dafcc8ada04ddceac3157f844be..44f4656347958adf2430ad07c5242ba7ac19cfe4 100644 (file)
+diff --git a/Makefile b/Makefile
+index 10c1142..2a94df4 100644
 --- a/Makefile
 +++ b/Makefile
-@@ -1,58 +1,36 @@
- T=openssl\r
-+.PHONY: install clean\r
\r
--PREFIX                ?=/usr/local\r
--LIB_OPTION    ?= -shared \r
-+PKGC ?= pkg-config\r
\r
--#Lua auto detect\r
--LUA_VERSION ?= $(shell pkg-config luajit --print-provides)\r
--ifeq ($(LUA_VERSION),)                         ############ Not use luajit\r
--LUAV          ?= $(shell lua -e "_,_,v=string.find(_VERSION,'Lua (.+)');print(v)")\r
--LUA_CFLAGS    ?= -I$(PREFIX)/include/lua$(LUAV)\r
--LUA_LIBS      ?= -L$(PREFIX)/lib \r
--LUA_LIBDIR    ?= $(PREFIX)/lib/lua/$(LUAV)\r
--else\r
--LUAV          ?= $(shell lua -e "_,_,v=string.find(_VERSION,'Lua (.+)');print(v)")\r
--LUA_CFLAGS    ?= $(shell pkg-config luajit --cflags)\r
--LUA_LIBS      ?= $(shell pkg-config luajit --libs)\r
--LUA_LIBDIR    ?= $(PREFIX)/lib/lua/$(LUAV)\r
--endif\r
-+LIB_OPTION    = -shared \r
\r
--#OS auto detect\r
--SYS := $(shell gcc -dumpmachine)\r
-+# lua's package config can be under various names\r
-+LUAPKGC := $(shell for pc in lua lua5.1 lua5.2 lua5.3; do \\r
-+              $(PKGC) --exists $$pc && echo $$pc && break; \\r
-+      done)\r
\r
--ifneq (, $(findstring linux, $(SYS)))\r
--# Do linux things\r
--LDFLAGS                   = -fPIC -lrt -ldl\r
--OPENSSL_LIBS  ?= $(shell pkg-config openssl --libs) \r
--OPENSSL_CFLAGS        ?= $(shell pkg-config openssl --cflags)\r
--CFLAGS                    = -fPIC $(OPENSSL_CFLAGS) $(LUA_CFLAGS) \r
--endif\r
--ifneq (, $(findstring apple, $(SYS)))\r
--# Do darwin things\r
--LDFLAGS                   = -fPIC -lrt -ldl\r
-+BUILD_DIR = $(shell pwd)\r
-+\r
-+# LUA include/libraries build flags\r
-+#LUAV         ?= $(shell lua -e "_,_,v=string.find(_VERSION,'Lua (.+)');print(v)")\r
-+LUA_LIBDIR := $(shell $(PKGC) --variable=libdir $(LUAPKGC))\r
-+LUA_CFLAGS := $(shell $(PKGC) --cflags $(LUAPKGC))\r
-+LUA_LIBS := $(shell $(PKGC) --libs-only-L $(LUAPKGC))\r
-+#LUA_LIBDIR   ?= $(PREFIX)/lib/lua/$(LUAV)\r
-+\r
-+# openssl include/libraries build flags\r
-+LDFLAGS                  += -lrt -ldl $(OPENSSL_LIBS) $(LUA_LIBS)\r
- OPENSSL_LIBS  ?= $(shell pkg-config openssl --libs) \r
- OPENSSL_CFLAGS        ?= $(shell pkg-config openssl --cflags)\r
--CFLAGS                    = -fPIC $(OPENSSL_CFLAGS) $(LUA_CFLAGS)\r
--endif\r
--ifneq (, $(findstring mingw, $(SYS)))\r
--# Do mingw things\r
--V                     = $(shell lua -e "v=string.gsub('$(LUAV)','%.','');print(v)")\r
--LDFLAGS               = -mwindows -lcrypt32 -lssl -lcrypto -lws2_32 $(PREFIX)/bin/lua$(V).dll \r
--LUA_CFLAGS    = -DLUA_LIB -DLUA_BUILD_AS_DLL -I$(PREFIX)/include/\r
--CFLAGS                = $(OPENSSL_CFLAGS) $(LUA_CFLAGS)\r
--endif\r
--ifneq (, $(findstring cygwin, $(SYS)))\r
--# Do cygwin things\r
--OPENSSL_LIBS  ?= $(shell pkg-config openssl --libs) \r
--OPENSSL_CFLAGS  ?= $(shell pkg-config openssl --cflags)\r
--CFLAGS                = -fPIC $(OPENSSL_CFLAGS) $(LUA_CFLAGS)\r
--endif\r
--#custome config\r
-+# openssl include/libraries build flags\r
-+LOCAL_INCLUDE = -I$(BUILD_DIR)/deps\r
-+CFLAGS                   += -fPIC -DPTHREADS $(LOCAL_INCLUDE) $(OPENSSL_CFLAGS) $(LUA_CFLAGS) \r
- ifeq (.config, $(wildcard .config))\r
- include .config\r
- endif\r
\r
--LIBNAME= $T.so.$V\r
-+LIBNAME= $T.so\r
\r
- #LIB_OPTION= -bundle -undefined dynamic_lookup #for MacOS X\r
\r
-@@ -68,11 +46,12 @@ OBJS=src/asn1.o src/auxiliar.o src/bio.o
- src/ec.o src/engine.o src/hmac.o src/lbn.o src/lhash.o src/misc.o src/ocsp.o src/openssl.o src/ots.o src/pkcs12.o src/pkcs7.o    \\r
- src/pkey.o src/rsa.o src/ssl.o src/th-lock.o src/util.o src/x509.o src/xattrs.o src/xexts.o src/xname.o src/xstore.o src/xalgor.o src/callback.o \r
\r
--.c.o:\r
--      $(CC) -c -o $@ $?\r
-+%.o: %.c\r
-+      $(CC) $(CFLAGS) -c $< -o $@\r
\r
- all: $T.so\r
-       echo $(SYS)\r
-+      $(CC) $(LDFLAGS) $(LIB_OPTION) $(OBJS) -o $@\r
\r
- $T.so: $(OBJS)\r
-       MACOSX_DEPLOYMENT_TARGET="10.3"; export MACOSX_DEPLOYMENT_TARGET; $(CC) $(CFLAGS) $(LIB_OPTION) -o $T.so $(OBJS) $(OPENSSL_LIBS) $(LUA_LIBS) $(LDFLAGS)\r
+@@ -1,121 +1,52 @@
+ T=openssl
++.PHONY: install clean
+-PREFIX                ?=/usr/local
+-CC            := $(CROSS)$(CC)
+-AR            := $(CROSS)$(AR)
+-LD            := $(CROSS)$(LD)
++PKGC ?= pkg-config
+-#OS auto detect
+-ifneq (,$(TARGET_SYS))
+-  SYS         := $(TARGET_SYS)
+-else
+-  SYS         := $(shell gcc -dumpmachine)
+-endif
+-
+-#Lua auto detect
+-LUA_VERSION   := $(shell pkg-config luajit --print-provides)
+-ifeq ($(LUA_VERSION),)
+-  # Not found luajit package, try lua
+-  LUA_VERSION := $(shell pkg-config lua --print-provides)
+-  ifeq ($(LUA_VERSION),)
+-    # Not found lua package, try from prefix
+-    LUA_VERSION := $(shell lua -e "_,_,v=string.find(_VERSION,'Lua (.+)');print(v)")
+-    LUA_CFLAGS        ?= -I$(PREFIX)/include/lua$(LUA_VERSION)
+-    LUA_LIBS  ?= -L$(PREFIX)/lib -llua
+-    LUA_LIBDIR        ?= $(PREFIX)/lib/lua/$(LUA_VERSION)
+-  else
+-    # Found lua package
+-    LUA_VERSION       := $(shell lua -e "_,_,v=string.find(_VERSION,'Lua (.+)');print(v)")
+-    LUA_CFLAGS        ?= $(shell pkg-config lua --cflags)
+-    LUA_LIBS  ?= $(shell pkg-config lua --libs)
+-    LUA_LIBDIR        ?= $(PREFIX)/lib/lua/$(LUA_VERSION)
+-  endif
+-else
+-  # Found luajit package
+-  LUA_VERSION := $(shell luajit -e "_,_,v=string.find(_VERSION,'Lua (.+)');print(v)")
+-  LUA_CFLAGS  ?= $(shell pkg-config luajit --cflags)
+-  LUA_LIBS    ?= $(shell pkg-config luajit --libs)
+-  LUA_LIBDIR  ?= $(PREFIX)/lib/lua/$(LUA_VERSION)
+-endif
+-
+-#OpenSSL auto detect
+-OPENSSL_CFLAGS        ?= $(shell pkg-config openssl --cflags)
+-OPENSSL_LIBS  ?= $(shell pkg-config openssl --static --libs)
+-
+-ifneq (, $(findstring linux, $(SYS)))
+-  # Do linux things
+-  CFLAGS       = -fpic
+-  LDFLAGS      = -Wl,--no-undefined -fpic -lrt -ldl -lm
+-endif
+-
+-ifneq (, $(findstring apple, $(SYS)))
+-  # Do darwin things
+-  CFLAGS       = -fPIC
+-  LDFLAGS      = -fPIC -undefined dynamic_lookup -ldl
+-  #MACOSX_DEPLOYMENT_TARGET="10.3"
+-  CC          := MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} $(CC)
+-endif
++LIB_OPTION    = -shared
++LUAPKGC = lua
+-ifneq (, $(findstring mingw, $(SYS)))
+-  # Do mingw things
+-  CFLAGS       = -DLUA_LIB -DLUA_BUILD_AS_DLL -DWIN32_LEAN_AND_MEAN
+-endif
+-
+-ifneq (, $(findstring cygwin, $(SYS)))
+-  # Do cygwin things
+-  CFLAGS       = -fPIC
+-endif
++# LUA include/libraries build flags
++LUA_CFLAGS  := $(shell $(PKGC) --cflags $(LUAPKGC))
++LUA_LIBS_DIR := $(shell $(PKGC) --libs $(LUAPKGC))
+-ifneq (, $(findstring iOS, $(SYS)))
+-  # Do iOS things
+-  CFLAGS       = -fPIC
+-  LDFLAGS      = -fPIC -ldl
+-endif
++# openssl include/libraries build flags
++OPENSSL_CFLAGS      ?= $(shell $(PKGC) openssl --cflags)
++OPENSSL_LIBS_DIR    ?= $(shell $(PKGC) openssl --libs)
+-#custom config
++LDFLAGS               = -Wl,--no-undefined -fpic -lrt -ldl -lm $(OPENSSL_LIBS_DIR) $(LUA_LIBS_DIR)
++CFLAGS          += -fPIC -DPTHREADS $(OPENSSL_CFLAGS) $(LUA_CFLAGS)
+ ifeq (.config, $(wildcard .config))
+-  include .config
++include .config
+ endif
+-LIBNAME= $T.so.$V
++LIBNAME= $T.so
+-CFLAGS                += $(OPENSSL_CFLAGS) $(LUA_CFLAGS) $(TARGET_FLAGS)
+-LDFLAGS               += -shared $(OPENSSL_LIBS) $(LUA_LIBS)
+ # Compilation directives
+ WARN_MIN       = -Wall -Wno-unused-value
+ WARN           = -Wall
+ WARN_MOST      = $(WARN) -W -Waggregate-return -Wcast-align -Wmissing-prototypes -Wnested-externs -Wshadow -Wwrite-strings -pedantic
+ CFLAGS                += -g $(WARN_MIN) -DPTHREADS -Ideps -Ideps/lua-compat -Ideps/auxiliar
+-
+ OBJS=src/asn1.o deps/auxiliar/auxiliar.o src/bio.o src/cipher.o src/cms.o src/compat.o src/crl.o src/csr.o src/dh.o src/digest.o src/dsa.o \
+ src/ec.o src/engine.o src/hmac.o src/lbn.o src/lhash.o src/misc.o src/ocsp.o src/openssl.o src/ots.o src/pkcs12.o src/pkcs7.o    \
+ src/pkey.o src/rsa.o src/ssl.o src/th-lock.o src/util.o src/x509.o src/xattrs.o src/xexts.o src/xname.o src/xstore.o \
+ src/xalgor.o src/callback.o src/srp.o deps/auxiliar/subsidiar.o
+-.c.o:
+-      $(CC) $(CFLAGS) -c -o $@ $?
++%.o: %.c
++      $(CC) $(CFLAGS) -c $< -o $@
+ all: $T.so
+-      @echo "Target system: "$(SYS)
+-
+-$T.so: lib$T.a
+-      $(CC) -o $@ src/openssl.o -L. -l$T $(LDFLAGS)
++      echo $(SYS)
++      $(CC) $(LDFLAGS) $(LIB_OPTION) $(OBJS) -o $@
+-lib$T.a: $(OBJS)
+-      $(AR) rcs $@ $?
++$T.so: $(OBJS)
++      echo "LUA LIBS_DIR: " $(LUA_LIBS_DIR)
++      $(CC) $(CFLAGS) $(LIB_OPTION) -o $T.so $(OBJS) $(LDFLAGS)
+ install: all
+       mkdir -p $(LUA_LIBDIR)
+       cp $T.so $(LUA_LIBDIR)
+-info:
+-      @echo "Target system: "$(SYS)
+-      @echo "CC:" $(CC)
+-      @echo "AR:" $(AR)
+-      @echo "PREFIX:" $(PREFIX)
+-
+ clean:
+-      rm -f $T.so lib$T.a $(OBJS)
+-
+-# vim: ts=8 sw=8 noet
++      rm -f $T.so $(OBJS)
diff --git a/lang/lua-openssl/patches/0010-Fix-Linkage.patch b/lang/lua-openssl/patches/0010-Fix-Linkage.patch
deleted file mode 100644 (file)
index 52bcf1a..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-diff --git a/deps/lua-compat/c-api/compat-5.3.c b/deps/lua-compat/c-api/compat-5.3.c
-index 4395bbc..4a8877c 100644
---- a/deps/lua-compat/c-api/compat-5.3.c
-+++ b/deps/lua-compat/c-api/compat-5.3.c
-@@ -491,17 +491,6 @@ COMPAT53_API int lua_geti (lua_State *L, int index, lua_Integer i) {
- }
-
-
--COMPAT53_API int lua_isinteger (lua_State *L, int index) {
--  if (lua_type(L, index) == LUA_TNUMBER) {
--    lua_Number n = lua_tonumber(L, index);
--    lua_Integer i = lua_tointeger(L, index);
--    if (i == n)
--      return 1;
--  }
--  return 0;
--}
--
--
- static void compat53_reverse (lua_State *L, int a, int b) {
-   for (; a < b; ++a, --b) {
-     lua_pushvalue(L, a);
-diff --git a/deps/lua-compat/c-api/compat-5.3.h b/deps/lua-compat/c-api/compat-5.3.h
-index 2309294..8e67bae 100644
---- a/deps/lua-compat/c-api/compat-5.3.h
-+++ b/deps/lua-compat/c-api/compat-5.3.h
-@@ -244,9 +244,6 @@ typedef int (*lua_KFunction)(lua_State *L, int status, lua_KContext ctx);
- #define lua_geti COMPAT53_CONCAT(COMPAT53_PREFIX, _geti)
- COMPAT53_API int lua_geti (lua_State *L, int index, lua_Integer i);
-
--#define lua_isinteger COMPAT53_CONCAT(COMPAT53_PREFIX, _isinteger)
--COMPAT53_API int lua_isinteger (lua_State *L, int index);
--
- #define lua_numbertointeger(n, p) \
-   ((*(p) = (lua_Integer)(n)), 1)
-
diff --git a/lang/lua-openssl/patches/0020-use-X509_REQ_to_X509-in-openssl-1.1.patch b/lang/lua-openssl/patches/0020-use-X509_REQ_to_X509-in-openssl-1.1.patch
deleted file mode 100644 (file)
index 930b37e..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
---- a/src/csr.c
-+++ b/src/csr.c
-@@ -38,7 +38,7 @@ static LUA_FUNCTION(openssl_csr_read)
-   return openssl_pushresult(L, 0);
- }
\r
--\r
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L\r
- static X509 *X509_REQ_to_X509_ex(X509_REQ *r, int days, EVP_PKEY *pkey, const EVP_MD* md)\r
- {\r
-   X509 *ret = NULL;\r
-@@ -91,14 +91,19 @@ static X509 *X509_REQ_to_X509_ex(X509_RE
-   }\r
-   return (ret);\r
- }\r
-+#endif\r
- static LUA_FUNCTION(openssl_csr_to_x509)
- {
-   X509_REQ * csr  = CHECK_OBJECT(1, X509_REQ, "openssl.x509_req");
-   EVP_PKEY * pkey = CHECK_OBJECT(2, EVP_PKEY, "openssl.evp_pkey");
-   int days = luaL_optint(L, 3, 365);
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
-   const EVP_MD* md = get_digest(L, 4, "sha256");
-   X509* cert = X509_REQ_to_X509_ex(csr, days, pkey, md);
-+#else
-+  X509* cert = X509_REQ_to_X509(csr, days, pkey);
-+#endif
-   if (cert)
-   {
-     PUSH_OBJECT(cert, "openssl.x509");
index f4ebef8e416e49b20eb6215644011f76bb61ef5d..b5d7699d5a925bda2fb304f63a9694598beec327 100644 (file)
@@ -15,6 +15,8 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://matthewwild.co.uk/projects/luaexpat
 PKG_HASH:=d060397960d87b2c89cf490f330508b7def1a0677bdc120531c571609fc57dc3
 
+PKG_CPE_ID:=cpe:/a:matthewwild:luaexpat
+
 include $(INCLUDE_DIR)/package.mk
 
 define Package/luaexpat
index 72073dd7ad001464438a5547b58ed41dc69355fe..296a3ebb61d19c088bb82b90e0ea60930afbdc42 100644 (file)
@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=luajit
 PKG_VERSION:=2.1.0-beta3
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=LuaJIT-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://luajit.org/download
@@ -24,7 +24,7 @@ define Package/luajit
  CATEGORY:=Languages
  TITLE:=LuaJIT
  URL:=https://www.luajit.org
- DEPENDS:=@(i386||x86_64||arm||armeb||powerpc||mips||mipsel)
+ DEPENDS:=@(i386||x86_64||arm||armeb||aarch64||powerpc||mips||mipsel)
 endef
 
 define Package/luajit/description
@@ -32,7 +32,7 @@ define Package/luajit/description
 endef
 
 ifeq ($(HOST_ARCH),x86_64)
-  ifeq ($(CONFIG_x86_64),)
+  ifeq ($(CONFIG_ARCH_64BIT),)
     HOST_BITS := -m32
   endif
 endif
index 92ff86d0e5528951428e152bdfe0301ee910f92d..7aa9a5528f856de8a1c97aa05978ce86bc3d3560 100644 (file)
@@ -1,6 +1,4 @@
 #
-# Copyright (C) 2011 OpenWrt.org
-#
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
 #
@@ -8,20 +6,17 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=luaposix
-PKG_VERSION:=v33.2.1
-PKG_RELEASE:=5
+PKG_VERSION:=34.1.1
+PKG_RELEASE:=1
 
-PKG_SOURCE:=release-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://github.com/luaposix/luaposix/archive/
-PKG_HASH:=4fb34dfea67f4cf3194cdecc6614c9aea67edc3c4093d34137669ea869c358e1
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-release-$(PKG_VERSION)
-PKG_REMOVE_FILES:=aclocal.m4
-PKG_FIXUP:=autoreconf
+PKG_SOURCE_URL:=https://codeload.github.com/$(PKG_NAME)/$(PKG_NAME)/tar.gz/v$(PKG_VERSION)?
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_HASH:=7948f4ac8b953172e928753632e37ad97cc3014df74b524fe7839f71216a7e90
 PKG_MAINTAINER:=Maxim Storchak <m.storchak@gmail.com>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=COPYING
 
-PKG_BUILD_DEPENDS:=lua/host
+PKG_BUILD_DEPENDS:=luarocks/host
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -29,9 +24,9 @@ define Package/luaposix
   SUBMENU:=Lua
   SECTION:=lang
   CATEGORY:=Languages
-  TITLE:=luaposix
-  URL:=http://luaforge.net/projects/luaposix/
-  DEPENDS:=+lua +librt
+  TITLE:=POSIX binding for LuaJIT, Lua 5.1, 5.2 and 5.3
+  URL:=https://github.com/luaposix/luaposix
+  DEPENDS:=+lua +lua-bit32
 endef
 
 define Package/luaposix/description
@@ -39,27 +34,30 @@ define Package/luaposix/description
   to various low level libc functions.
 endef
 
-CONFIGURE_VARS += ac_cv_path_LDOC="true"
-
-TARGET_CFLAGS += -DLUA_USE_LINUX $(FPIC) -std=gnu99
-ifeq ($(CONFIG_USE_MUSL),y)
-  TARGET_CFLAGS += -D_POSIX_PRIORITY_SCHEDULING
-  # Musl doesn't do all of XOPEN_REALTIME, but it does for luaposix.
-  # see https://github.com/luaposix/luaposix/issues/295
-  TARGET_CFLAGS += -D_XOPEN_REALTIME=1
-endif
-
-ifneq ($(CONFIG_USE_GLIBC),)
-  ifeq ($(CONFIG_EGLIBC_OPTION_EGLIBC_UTMP),)
-    TARGET_CFLAGS += -DNO_GETLOGIN
-  endif
-endif
-
+TARGET_CFLAGS += \
+       -I$(STAGING_DIR)/usr/include
+
+define Build/Compile
+  cd $(PKG_BUILD_DIR) && \
+       LDFLAGS="$(TARGET_LDFLAGS) $(FPIC)" \
+       CFLAGS="$(TARGET_CFLAGS) $(FPIC)" \
+    CC="$(TARGET_CC)" LD="$(TARGET_CC)" \
+    LUA_PKGNAME=lua5.1 \
+    LUA_LIBDIR=$(STAGING_DIR)/usr/lib/lua \
+    luarocks make --force --deps-mode=none --pack-binary-rock luaposix-$(PKG_VERSION)-1.rockspec \
+    LUA_LIBDIR=$(STAGING_DIR)/usr/lib/lua \
+    LUA_PKGNAME=lua5.1 \
+    CC="$(TARGET_CC)" LD="$(TARGET_CC)" \
+       CFLAGS="$(TARGET_CFLAGS) $(FPIC)" \
+       LDFLAGS="$(TARGET_LDFLAGS)"
+endef
 
 define Package/luaposix/install
-       $(INSTALL_DIR) $(1)/usr/lib/lua/posix
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/ext/posix/.libs/posix.so $(1)/usr/lib/lua
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/posix.lua $(1)/usr/lib/lua
+       $(INSTALL_DIR) $(1)/usr/lib/lua/posix/sys
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/linux/posix/*.so $(1)/usr/lib/lua/posix/
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/linux/posix/sys/*.so $(1)/usr/lib/lua/posix/sys/
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/posix/*.lua $(1)/usr/lib/lua/posix/
+       rm -f $(1)/usr/lib/lua/posix/{deprecated,compat}.lua
 endef
 
 $(eval $(call BuildPackage,luaposix))
diff --git a/lang/luaposix/patches/100-eglibc-compat.patch b/lang/luaposix/patches/100-eglibc-compat.patch
deleted file mode 100644 (file)
index e4df63b..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-diff --git a/ext/posix/unistd.c b/ext/posix/unistd.c
-index 9276640..69c8cef 100644
---- a/ext/posix/unistd.c
-+++ b/ext/posix/unistd.c
-@@ -525,6 +525,7 @@ Pgetgroups(lua_State *L)
- #endif
-+#ifndef NO_GETLOGIN
- /***
- Current logged-in user.
- @treturn[1] string username, if successful
-@@ -537,6 +538,7 @@ Pgetlogin(lua_State *L)
-       checknargs(L, 0);
-       return pushstringresult(getlogin());
- }
-+#endif
- /***
-@@ -1044,7 +1046,9 @@ static const luaL_Reg posix_unistd_fns[] =
-       LPOSIX_FUNC( Pgetegid           ),
-       LPOSIX_FUNC( Pgeteuid           ),
-       LPOSIX_FUNC( Pgetgid            ),
-+#ifndef NO_GETLOGIN
-       LPOSIX_FUNC( Pgetlogin          ),
-+#endif
-       LPOSIX_FUNC( Pgetpgrp           ),
-       LPOSIX_FUNC( Pgetpid            ),
-       LPOSIX_FUNC( Pgetppid           ),
diff --git a/lang/luaposix/patches/101-disable-curses.patch b/lang/luaposix/patches/101-disable-curses.patch
deleted file mode 100644 (file)
index 6412799..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-diff --git a/configure.ac b/configure.ac
-index dfd4199..19924d0 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -153,15 +153,6 @@ AC_CHECK_LIB([rt], [clock_gettime])
- AC_SUBST([LIBRT], [$LIBS])
- LIBS=$save_LIBS
--## Curses
--AX_WITH_CURSES
--AC_ARG_VAR(CURSES_LIB, [linker flags for curses library])
--
--save_LIBS=$LIBS
--LIBS="$CURSES_LIB $LIBS"
--AC_CHECK_FUNCS([resizeterm])
--LIBS=$save_LIBS
--
- ## Use system implementation, or bundled replacement?
- AC_CHECK_FUNCS([strlcpy])
-diff --git a/ext/posix/posix.c b/ext/posix/posix.c
-index 6019df0..2d75487 100644
---- a/ext/posix/posix.c
-+++ b/ext/posix/posix.c
-@@ -12,7 +12,6 @@
- #include "bit32.c"
- #include "ctype.c"
--#include "curses.c"
- #include "dirent.c"
- #include "errno.c"
- #include "fcntl.c"
index 7c58be48113f07277fe4c0000f66d0910fa67de2..eef60f8a072c543dc4b85d369983e624d540a54d 100644 (file)
@@ -1,20 +1,19 @@
-diff --git a/lib/posix.lua.in b/lib/posix.lua.in
-index 17ef39a..a248d9b 100644
---- a/lib/posix.lua.in
-+++ b/lib/posix.lua.in
-@@ -35,15 +35,6 @@ for _, sub in ipairs {
-   end
- end
+diff --git i/lib/posix/init.lua w/lib/posix/init.lua
+index c17693a..d4db923 100644
+--- i/lib/posix/init.lua
++++ w/lib/posix/init.lua
+@@ -325,14 +325,6 @@ do
+          end
      end
+    end
 -
---- Inject deprecated APIs (overwriting submodules) for backwards compatibility.
--for k, v in pairs (require "posix.deprecated") do
--  M[k] = v
--end
--for k, v in pairs (require "posix.compat") do
--  M[k] = v
--end
--
- M.version = "posix for " .. _VERSION .. " / @PACKAGE_STRING@"
+-   -- Inject deprecated APIs (overwriting submodules) for backwards compatibility.
+-   for k, v in next, require 'posix.deprecated' do
+-      M[k] = v
+-   end
+-   for k, v in next, require 'posix.compat' do
+-      M[k] = v
+-   end
+ end
  
  
index 3428ef8381860951fe21e096261d9fee5a6ae1b4..25db0325f0966f45399da175f2db2646b2301752 100644 (file)
@@ -3,27 +3,28 @@
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
-# 
+#
 
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=luarocks
 PKG_VERSION:=2.2.2
-PKG_RELEASE:=2
+PKG_RELEASE:=4
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_MIRROR_HASH:=e4cf874c9bce34a5accd41daaf51a3213763b8b6f7f658ca4d13a70a7ddb1c0c
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_URL:=https://github.com/keplerproject/luarocks.git
+PKG_SOURCE_URL:=https://github.com/keplerproject/luarocks
 PKG_SOURCE_VERSION:=v$(PKG_VERSION)
+PKG_MIRROR_HASH:=e4cf874c9bce34a5accd41daaf51a3213763b8b6f7f658ca4d13a70a7ddb1c0c
 
 PKG_MAINTAINER:=Amr Hassan <amr.hassan@gmail.com>
-PKG_INSTALL=1
-PKG_BUILD_DEPENDS:=lua/host
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=COPYING
+
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
+PKG_BUILD_DEPENDS:=lua/host zip/host
 HOST_BUILD_DEPENDS:=$(PKG_BUILD_DEPENDS)
-PKG_LICENSE=GPL
-HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)-$(PKG_VERSION)
+HOST_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/host-build.mk
 include $(INCLUDE_DIR)/package.mk
index a1bad21515b2ddd5738b89e21ca9da819325a61d..69ab5c593c08958eb2aff836b0523f6f9b31d4bc 100644 (file)
@@ -6,7 +6,7 @@ diff -rupN luarocks/Makefile luarocks.new/Makefile
        do \
           sed "1d" src/bin/$$f > src/bin/$$f.bak ;\
 -         echo "#!$(LUA_BINDIR)/lua$(LUA_SUFFIX)" > src/bin/$$f ;\
-+         echo "#!/usr/bin/env lua" > src/bin/$$f ;\
++         echo "#!/usr/bin/env lua5.1" > src/bin/$$f ;\
           echo "package.path = [[$(LUADIR)/?.lua;]]..package.path" | sed "s,//,/,g" >> src/bin/$$f ;\
           cat src/bin/$$f.bak >> src/bin/$$f ;\
           chmod +x src/bin/$$f ;\
index 9264788f35427c2ef66e3d9a1f1451cd05f5c0a3..b44636e47b9d9b81aff71e59b3dd9af25042c894 100644 (file)
@@ -8,33 +8,58 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=luasocket
-PKG_SOURCE_VERSION:=6d5e40c324c84d9c1453ae88e0ad5bdd0a631448
-PKG_VERSION:=3.0-rc1-20130909
-PKG_RELEASE:=5
+PKG_SOURCE_DATE:=2019-04-21
+PKG_SOURCE_VERSION:=733af884f1aa18ff469bf3c4d18810e815853211
+PKG_RELEASE:=1
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_MIRROR_HASH:=d2fa075d8bd026c41e0eb1a634ac2ad8115dee8abb070720e8e91fab51f86ee4
-PKG_SOURCE_URL:=https://github.com/diegonehab/luasocket.git
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE_URL:=https://github.com/diegonehab/luasocket
+PKG_MIRROR_HASH:=60aef7544426cae3e6c7560a6e4ad556a04b879ca0ad0311645b2c513c872128
+
+PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
 
 include $(INCLUDE_DIR)/package.mk
 
-define Package/luasocket
+define Package/luasocket/default
   SUBMENU:=Lua
   SECTION:=lang
   CATEGORY:=Languages
+  URL:=http://w3.impa.br/~diego/software/luasocket
+endef
+
+define Package/luasocket
+  $(Package/luasocket/default)
   TITLE:=LuaSocket
-  URL:=http://luasocket.luaforge.net/
-  MAINTAINER:=W. Michael Petullo <mike@flyn.org>
   DEPENDS:=+lua
+  VARIANT:=lua-51
+  DEFAULT_VARIANT:=1
+endef
+
+define Package/luasocket5.3
+  $(Package/luasocket/default)
+  TITLE:=LuaSocket 5.3
+  DEPENDS:=+liblua5.3
+  VARIANT:=lua-53
 endef
 
-define Package/luasocket/description
+ifeq ($(BUILD_VARIANT),lua-51)
+  LUA_VERSION=5.1
+endif
+
+ifeq ($(BUILD_VARIANT),lua-53)
+  LUA_VERSION=5.3
+endif
+
+
+define Package/luasocket/default/description
   LuaSocket is the most comprehensive networking support
   library for the Lua language. It provides easy access to
   TCP, UDP, DNS, SMTP, FTP, HTTP, MIME and much more.
 endef
+Package/luasocket/description     = $(Package/luasocket/default/description)
+Package/luasocket5.3/description = $(Package/luasocket/default/description)
 
 define Build/Configure
 endef
@@ -44,21 +69,31 @@ define Build/Compile
                LIBDIR="$(TARGET_LDFLAGS)" \
                CC="$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(FPIC)" \
                LD="$(TARGET_CROSS)ld -shared" \
+               LUAV=$(LUA_VERSION) LUAINC_linux_base=$(STAGING_DIR)/usr/include \
                all
 endef
 
-
 define Package/luasocket/install
        $(INSTALL_DIR) $(1)/usr/lib/lua
        $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/{ltn12,mime,socket}.lua $(1)/usr/lib/lua
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/mime.so.1.0.3 $(1)/usr/lib/lua
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/socket.so.3.0-rc1 $(1)/usr/lib/lua
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/mime-1.0.3.so $(1)/usr/lib/lua
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/socket-3.0-rc1.so $(1)/usr/lib/lua
        $(INSTALL_DIR) $(1)/usr/lib/lua/mime
-       ln -sf ../mime.so.1.0.3 $(1)/usr/lib/lua/mime/core.so
+       ln -sf ../mime-1.0.3.so $(1)/usr/lib/lua/mime/core.so
        $(INSTALL_DIR) $(1)/usr/lib/lua/socket
        $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/{ftp,http,smtp,tp,url,headers}.lua $(1)/usr/lib/lua/socket
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/unix.so $(1)/usr/lib/lua/socket
-       ln -sf ../socket.so.3.0-rc1 $(1)/usr/lib/lua/socket/core.so
+       ln -sf ../socket-3.0-rc1.so $(1)/usr/lib/lua/socket/core.so
 endef
 
+
+define Package/luasocket5.3/install
+       $(MAKE) -C $(PKG_BUILD_DIR)/src \
+               DESTDIR="$(1)" \
+               LUAV=$(LUA_VERSION) \
+               install
+endef
+
+
 $(eval $(call BuildPackage,luasocket))
+$(eval $(call BuildPackage,luasocket5.3))
index 3be42ed56d19320833f12839606bd8cc7b669315..00c279969ee404c2e1265239f1f15681dfd6bf72 100644 (file)
@@ -18,7 +18,7 @@ new file mode 100644
 index 0000000..db231aa
 --- /dev/null
 +++ b/src/if.c
-@@ -0,0 +1,113 @@
+@@ -0,0 +1,117 @@
 +/*
 + * $Id: if.c $
 + *
@@ -55,7 +55,11 @@ index 0000000..db231aa
 +{
 +    lua_pushstring(L, "iface");
 +    lua_newtable(L);
++#if LUA_VERSION_NUM < 503
 +    luaL_openlib(L, NULL, func, 0);
++#else
++    luaL_setfuncs(L, func, 0);
++#endif
 +    lua_settable(L, -3);
 +    return 0;
 +}
@@ -169,7 +173,7 @@ diff --git a/src/luasocket.c b/src/luasocket.c
 index e6ee747..85d41a6 100644
 --- a/src/luasocket.c
 +++ b/src/luasocket.c
-@@ -31,6 +31,7 @@
+@@ -21,6 +21,7 @@
  #include "tcp.h"
  #include "udp.h"
  #include "select.h"
@@ -177,7 +181,7 @@ index e6ee747..85d41a6 100644
  
  /*-------------------------------------------------------------------------*\
  * Internal function prototypes
-@@ -51,6 +52,7 @@ static const luaL_Reg mod[] = {
+@@ -41,6 +42,7 @@ static const luaL_Reg mod[] = {
      {"tcp", tcp_open},
      {"udp", udp_open},
      {"select", select_open},
@@ -189,15 +193,16 @@ diff --git a/src/makefile b/src/makefile
 index 8d3521e..09d4882 100644
 --- a/src/makefile
 +++ b/src/makefile
-@@ -262,6 +262,7 @@ SOCKET_OBJS= \
-       auxiliar.$(O) \
+
+@@ -303,6 +303,7 @@ SOCKET_OBJS= \
+       compat.$(O) \
        options.$(O) \
        inet.$(O) \
 +      if.$(O) \
        $(SOCKET) \
        except.$(O) \
        select.$(O) \
-@@ -387,6 +388,7 @@ auxiliar.$(O): auxiliar.c auxiliar.h
+@@ -440,6 +441,7 @@ auxiliar.$(O): auxiliar.c auxiliar.h
  buffer.$(O): buffer.c buffer.h io.h timeout.h
  except.$(O): except.c except.h
  inet.$(O): inet.c inet.h socket.h io.h timeout.h usocket.h
@@ -209,17 +214,19 @@ diff --git a/src/options.c b/src/options.c
 index 8ac2a14..1c73e6f 100644
 --- a/src/options.c
 +++ b/src/options.c
-@@ -3,6 +3,9 @@
- * LuaSocket toolkit
- \*=========================================================================*/
- #include <string.h> 
+@@ -7,7 +7,10 @@
+ #include "options.h"
+ #include "inet.h"
+ #include <string.h>
+-
 +#include <sys/types.h>
 +#include <sys/socket.h>
 +#include <net/if.h>
- #include "lauxlib.h"
-@@ -285,6 +288,12 @@ static int opt_ip6_setmembership(lua_State *L, p_socket ps, int level, int name)
++ 
+ /*=========================================================================*\
+ * Internal functions prototypes
+ \*=========================================================================*/
+@@ -388,6 +391,12 @@ static int opt_ip6_setmembership(lua_Sta
      if (!lua_isnil(L, -1)) {
          if (lua_isnumber(L, -1)) {
              val.ipv6mr_interface = (unsigned int) lua_tonumber(L, -1);
@@ -232,6 +239,5 @@ index 8ac2a14..1c73e6f 100644
          } else
            luaL_argerror(L, -1, "number 'interface' field expected");
      }
--- 
+--
 1.8.4.rc3
-
index c3bf949c58d52f5b754e14e966196342ae663b39..c759da100bb3e9b13c6fa100b459550ae79c8591 100644 (file)
@@ -1,6 +1,6 @@
 --- a/src/makefile
 +++ b/src/makefile
-@@ -345,18 +345,18 @@ none:
+@@ -397,18 +398,18 @@ none:
  all: $(SOCKET_SO) $(MIME_SO)
  
  $(SOCKET_SO): $(SOCKET_OBJS)
@@ -21,5 +21,5 @@
 -      $(LD) $(SERIAL_OBJS) $(LDFLAGS)$@
 +      $(CC) $(SERIAL_OBJS) $(LDFLAGS)$@
  
- install: 
+ install:
        $(INSTALL_DIR) $(INSTALL_TOP_LDIR)
index 95c17b143235a299ac4df76156f1472174e64fa8..647997aabc9ec93fc29bf81f118d2586161a57d8 100644 (file)
@@ -1,14 +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
+@@ -174,9 +174,8 @@ SO_linux=so
+ O_linux=o
+ CC_linux=gcc
+ DEF_linux=-DLUASOCKET_$(DEBUG)
+-CFLAGS_linux=$(LUAINC:%=-I%) $(DEF) -Wall -Wshadow -Wextra \
+-      -Wimplicit -O2 -ggdb3 -fpic
 -LDFLAGS_linux=-O -shared -fpic -o 
-+CFLAGS_linux= -I$(LUAINC) $(DEF) -fvisibility=hidden
-+LDFLAGS_linux=-shared -o
++CFLAGS_linux=$(LUAINC:%=-I%) $(DEF) -O2
++LDFLAGS_linux=-O -shared -o
  LD_linux=gcc
  SOCKET_linux=usocket.o
  
index a13d291fd48d7720b602a822b6a16ea669a2b8ba..72881b72c6b748e2e3cf48683cef608ce3a0acd7 100644 (file)
@@ -9,12 +9,12 @@ include $(TOPDIR)/rules.mk
 
 PKG_NPM_NAME:=node-hid
 PKG_NAME:=$(PKG_NPM_NAME)
-PKG_VERSION:=0.7.8
+PKG_VERSION:=0.7.9
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NPM_NAME)-$(PKG_VERSION).tgz
 PKG_SOURCE_URL:=https://registry.npmjs.org/$(PKG_NPM_NAME)/-/
-PKG_HASH:=a1ebbfd33139f7a7cd8c6a617b57229f45bf9ea9fa81563b7806738951d1d581
+PKG_HASH:=a13710ebff0a2d0e60e08442db192a4e891db89d535306d461b8a95ede7dbd90
 
 PKG_BUILD_DEPENDS:=node/host
 PKG_USE_MIPS16:=0
index b6c7b89a9c9b198c1134749571f8a65e72f7b00f..683556b98bb94bf89cd7fed5ee7dbaf44a938fad 100644 (file)
@@ -6,12 +6,12 @@ include $(TOPDIR)/rules.mk
 
 PKG_NPM_NAME:=homebridge
 PKG_NAME:=node-$(PKG_NPM_NAME)
-PKG_VERSION:=0.4.49
+PKG_VERSION:=0.4.50
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NPM_NAME)-$(PKG_VERSION).tgz
 PKG_SOURCE_URL:=http://registry.npmjs.org/$(PKG_NPM_NAME)/-/
-PKG_HASH:=1507c2ec513e6c8871d59537b502a1ed24c93e4cb59f1eca8c7fa35d77877cb3
+PKG_HASH:=85541254b44c0b70e38ed5e49a9c6a68a20467b99fe0ff3703ca9fc422ce879c
 
 PKG_BUILD_DEPENDS:=node/host
 PKG_USE_MIPS16:=0
diff --git a/lang/node-mozilla-iot-gateway/Config.in b/lang/node-mozilla-iot-gateway/Config.in
deleted file mode 100644 (file)
index b7cf497..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-if PACKAGE_node-mozilla-iot-gateway
-
-       comment "Optional features"
-
-       config MOIT_enable-plugin-support
-               bool "Enable packages needed for some plugins"
-               default y
-
-endif
diff --git a/lang/node-mozilla-iot-gateway/Makefile b/lang/node-mozilla-iot-gateway/Makefile
deleted file mode 100644 (file)
index 3289a05..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-#
-# Copyright (C) 2018 Sartura Ltd.
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NPM_NAME:=mozilla-iot-gateway
-PKG_NAME:=node-$(PKG_NPM_NAME)
-PKG_VERSION:=0.8.1
-PKG_RELEASE:=1
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://codeload.github.com/mozilla-iot/gateway/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=f407732b9c1d020aa79e9d0b12f1b97e82691d6f58def2df067f790f4f640e30
-
-PKG_BUILD_DEPENDS:=node/host openzwave
-
-PKG_MAINTAINER:=Marko Ratkaj <marko.ratkaj@sartura.hr>
-PKG_LICENSE:=MPL-2.0
-PKG_LICENSE_FILES:=LICENSE
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/node-mozilla-iot-gateway
-  SUBMENU:=Node.js
-  SECTION:=lang
-  CATEGORY:=Languages
-  TITLE:=WebThings Gateway by Mozilla
-  URL:=https://iot.mozilla.org/gateway/
-  DEPENDS:= +libpthread +node +node-npm +libopenzwave +openzwave-config +python +python3-light +python3-pip +openssl-util
-  DEPENDS+= +MOIT_enable-plugin-support:git-http
-  MENU:=1
-endef
-
-define Package/node-mozilla-iot-gateway/description
-  Build Your Own Web of Things Gateway. The "Web of Things" (WoT) is the
-  idea of taking the lessons learned from the World Wide Web and applying
-  them to IoT. It's about creating a decentralized Internet of Things by
-  giving Things URLs on the web to make them linkable and discoverable,
-  and defining a standard data model and APIs to make them interoperable.
-endef
-
-define Package/node-mozilla-iot-gateway/config
-  source "$(SOURCE)/Config.in"
-endef
-
-CPU:=$(subst powerpc,ppc,$(subst aarch64,arm64,$(subst x86_64,x64,$(subst i386,ia32,$(ARCH)))))
-
-TARGET_CFLAGS+=$(FPIC)
-
-define Build/Compile
-       $(MAKE_VARS) \
-       $(MAKE_FLAGS) \
-       npm_config_arch=$(CONFIG_ARCH) \
-       npm_config_nodedir=$(STAGING_DIR)/usr/ \
-       npm_config_cache=$(TMP_DIR)/npm-cache \
-       npm_config_tmp=$(TMP_DIR)/npm-tmp \
-       PREFIX="$(PKG_INSTALL_DIR)/usr/" \
-       $(STAGING_DIR_HOSTPKG)/bin/npm install --build-from-source --target_arch=$(CPU) -g $(DL_DIR)/$(PKG_SOURCE)
-endef
-
-define Package/node-mozilla-iot-gateway/install
-       $(INSTALL_DIR) $(1)/opt/mozilla-iot/gateway/
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/webthings-gateway/* $(1)/opt/mozilla-iot/gateway
-       $(STAGING_DIR_HOSTPKG)/bin/npm --prefix=$(1)/opt/mozilla-iot/gateway install $(1)/opt/mozilla-iot/gateway
-
-       # Clean up of old build files that confuse OpenWrt's dependency checker
-       $(RM) -r $(1)/opt/mozilla-iot/gateway/node_modules/sqlite3/lib/binding/node-v57-linux-x64
-       $(RM) -r $(1)/opt/mozilla-iot/gateway/node_modules/ursa/build/Release/ursaNative.node
-       $(RM) -r $(1)/opt/mozilla-iot/gateway/node_modules/ursa/build/Release/obj.target/ursaNative.node
-
-       $(INSTALL_DIR) $(1)/opt/mozilla-iot/gateway/node_modules/sqlite3/lib/binding/node-v57-linux-$(CPU)/
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/webthings-gateway/node_modules/sqlite3/lib/binding/node-v57-linux-$(CPU)/node_sqlite3.node \
-               $(1)/opt/mozilla-iot/gateway/node_modules/sqlite3/lib/binding/node-v57-linux-$(CPU)/
-
-       $(INSTALL_DIR) $(1)/etc/init.d
-       $(INSTALL_BIN) ./files/mozilla-iot-gateway.init $(1)/etc/init.d/mozilla-iot-gateway
-endef
-
-$(eval $(call BuildPackage,node-mozilla-iot-gateway))
diff --git a/lang/node-mozilla-iot-gateway/README.md b/lang/node-mozilla-iot-gateway/README.md
deleted file mode 100644 (file)
index b1d1afd..0000000
+++ /dev/null
@@ -1,150 +0,0 @@
-# Things Gateway by Mozilla
-
-Build Your Own Web of Things Gateway. The "Web of Things" (WoT) is the idea of
-taking the lessons learned from the World Wide Web and applying them to IoT.
-It's about creating a decentralized Internet of Things by giving Things URLs on
-the web to make them linkable and discoverable, and defining a standard data
-model and APIs to make them interoperable.
-
-### Getting Started
-
-These instructions will get you a copy of OpenWrt's build system on your local
-machine for development and testing purposes. To check the prerequisites for
-your system check out this
-[link](https://openwrt.org/docs/guide-developer/build-system/install-buildsystem).
-
-```
-git clone https://github.com/openwrt/openwrt
-cd openwrt
-```
-
-### Configure the build system
-
-We need to configure the build system and select the Things Gateway package.
-This process is no different from selecting other OpenWrt packages. For this
-example we will be using build configuration for Raspberry Pi 2/3.
-
-Update feeds and open menuconfig interface:
-
-```
-make package/symlinks
-make menuconfig
-```
-
-Select your target:
-
-```
-Target System (Broadcom BCM27xx)  --->
-Subtarget (BCM2709/BCM2710 32 bit based boards)  --->
-Target Profile (Raspberry Pi 2B/3B/3B+/3CM)  --->
-```
-
-Things Gateway package is a bit beefy. In order to fit the image, extend the
-filesystem size from 256 to 1024 MB:
-
-```
-Target Images  --->
-       (1024) Root filesystem partition size (in MB)
-```
-
-Select Things Gateway package:
-
-```
-Languages  --->
-       Node.js  --->
-               <*> node-mozilla-iot-gateway
-```
-
-Save and exit.
-
-
-### Building the image
-
-Run the build process and substitute <N> with the number of your CPU cores:
-
-```
-make -j<N>
-```
-
-
-### Flashing on the SD card
-
-Process of flashing the image will depend on which device you have.
-Instructions below are for Raspberry Pi 2/3. For other devices consult OpenWrt
-wiki pages. Be careful to replace the X in the third command with the drive
-letter of your SD card.
-
-```
-cd bin/targets/brcm2708/bcm2709
-gunzip openwrt-brcm2708-bcm2709-rpi-2-ext4-factory.img.gz
-sudo dd if=openwrt-brcm2708-bcm2709-rpi-2-ext4-factory.img  of=/dev/sdX conv=fsync
-```
-
-## Running Things Gateway from USB flash drive
-
-In case the device doesn't have enough internal storage space, it is possible
-to run Things Gateway of a USB flash drive. This requires USB flash drive with
-ext4 filesystem plugged in the device.
-
-### Configuration
-
-Do all steps from "Configure the build system" above, and after that change
-node-mozilla-iot-gateway selection from "\*" to "M". This will build the
-package and all of it's dependencies but it will not install Things Gateway.
-
-```
-Languages  --->
-       Node.js  --->
-               <M> node-mozilla-iot-gateway
-```
-
-### Prepare the device
-
-We need to auto mount the USB flash drive in order for the gateway to start at
-boot. To do so, open a console on your embedded device and create a /etc/fstab
-file with the following contents. This assumes your USB flash drive is
-/dev/sda1:
-
-```
-/dev/sda1      /opt    ext4    rw,relatime,data=ordered        0 1
-/opt/root      /root   none    defaults,bind                   0 0
-```
-
-Add "mount -a" to the end of the "boot" function in /etc/init.d/boot
-
-```
-boot() {
-       .
-       .
-       .
-       /bin/config_generate
-       uci_apply_defaults
-
-       # temporary hack until configd exists
-       /sbin/reload_config
-
-       # Added by us
-       mount -a
-}
-```
-
-### Install Things Gateway package
-
-After successfully mounting the USB drive, transfer the .ipk file from your
-local machine to the device and install it. Note that your package version
-might defer. Also note that location of .ipk file depends on the selected
-target, but it will be within ./bin/packages directory. We need to use
-"--force-space" or else opkg might complain about insufficient space.
-
-On your local machine:
-```
-cd bin/packages/arm_cortex-a9_vfpv3/packages/
-scp node-mozilla-iot-gateway_0.6.0-1_arm_cortex-a9_vfpv3.ipk root@192.168.1.1:/tmp
-```
-
-On the device:
-```
-opkg --force-space install /tmp/node-mozilla-iot-gateway_0.6.0-1_arm_cortex-a9_vfpv3.ipk
-```
-
-Things Gateway should now start at every boot.
diff --git a/lang/node-mozilla-iot-gateway/files/mozilla-iot-gateway.init b/lang/node-mozilla-iot-gateway/files/mozilla-iot-gateway.init
deleted file mode 100644 (file)
index 8ed67fc..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh /etc/rc.common
-
-START=99
-
-USE_PROCD=1
-
-HOME=/root
-MOZIOT_HOME="${HOME}/.mozilla-iot"
-export PATH="/opt/mozilla-iot/gateway/tools:${PATH}"
-
-start_service()
-{
-       mkdir -p /usr/etc/
-       ln -sf /etc/openzwave /usr/etc/openzwave
-
-       procd_open_instance mozilla-iot-gateway
-       procd_set_param command /usr/bin/npm start --prefix /opt/mozilla-iot/gateway
-       procd_set_param stdout 1
-       procd_set_param stderr 1
-       procd_close_instance
-}
index 71b023bd0ad124b177e8c1e034f3bc20f0dc296e..e10913fe497aeb5196118b638f305ade6b41b4b2 100644 (file)
@@ -8,11 +8,11 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=node
-PKG_VERSION:=v8.16.0
-PKG_RELEASE:=2
+PKG_VERSION:=v8.16.1
+PKG_RELEASE:=1
 PKG_SOURCE:=node-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://nodejs.org/dist/${PKG_VERSION}
-PKG_HASH:=3515e8e01568a5dc4dff3d91a76ebc6724f5fa2fbb58b4b0c5da7b178a2f7340
+PKG_HASH:=d8c190acdf2d967faf49c22df883d31a8d4e249d67852dae3c2d8a0f756b0512
 
 HOST_BUILD_DEPENDS:=python/host
 PKG_BUILD_DEPENDS:=python/host
@@ -103,7 +103,7 @@ CONFIGURE_ARGS:= \
 HOST_CONFIGURE_VARS:=
 
 HOST_CONFIGURE_ARGS:= \
-       --dest-os=linux \
+       --dest-os=$(if $(findstring Darwin,$(HOST_OS)),mac,linux) \
        --without-snapshot \
        --prefix=$(STAGING_DIR_HOSTPKG)
 
diff --git a/lang/node/patches/007-fix_host_build_on_macos.patch b/lang/node/patches/007-fix_host_build_on_macos.patch
new file mode 100644 (file)
index 0000000..34f6ec8
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/tools/gyp/pylib/gyp/generator/make.py
++++ b/tools/gyp/pylib/gyp/generator/make.py
+@@ -174,7 +174,7 @@
+ LINK_COMMANDS_MAC = """\
+ quiet_cmd_alink = LIBTOOL-STATIC $@
+-cmd_alink = rm -f $@ && ./gyp-mac-tool filter-libtool libtool $(GYP_LIBTOOLFLAGS) -static -o $@ $(filter %.o,$^)
++cmd_alink = rm -f $@ && ./gyp-mac-tool filter-libtool /usr/bin/libtool $(GYP_LIBTOOLFLAGS) -static -o $@ $(filter %.o,$^)
+ quiet_cmd_link = LINK($(TOOLSET)) $@
+ cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o "$@" $(LD_INPUTS) $(LIBS)
index e7e0083fdadd761a6413fc3d01f2c5569cf53cab..1201299bfac671af10cdb76519e7d67c316a711b 100644 (file)
@@ -9,14 +9,14 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=perl-authen-sasl-xs
 PKG_VERSION:=1.00
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_NAME:=Authen-SASL-XS
 PKG_SOURCE_URL:=http://www.cpan.org/authors/id/G/GB/GBARR/
 PKG_SOURCE:=$(PKG_SOURCE_NAME)-$(PKG_VERSION).tar.gz
 PKG_HASH:=1b0eaa0e7ac3a45857147d837e3d34c80c6eca1d9fdcb826a213c2a105454234
 
-PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
+PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl
 PKG_MAINTAINER:=Philip Prindeville <philipp@redfish-solutions.com>
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/perl/$(PKG_SOURCE_NAME)-$(PKG_VERSION)
index 434ec088b89b1338d32cc2bcb1bd0560decf294c..ed1fae123846c6319d8a3a3cb015b81015a8bcc5 100644 (file)
@@ -9,14 +9,14 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=perl-authen-sasl
 PKG_VERSION:=2.16
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_NAME:=Authen-SASL
 PKG_SOURCE_URL:=http://www.cpan.org/authors/id/G/GB/GBARR/
 PKG_SOURCE:=$(PKG_SOURCE_NAME)-$(PKG_VERSION).tar.gz
 PKG_HASH:=6614fa7518f094f853741b63c73f3627168c5d3aca89b1d02b1016dc32854e09
 
-PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
+PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl
 PKG_MAINTAINER:=Philip Prindeville <philipp@redfish-solutions.com>
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/perl/$(PKG_SOURCE_NAME)-$(PKG_VERSION)
index 1d9342d03dc87716af7958d207afda9448a98d9f..5f3b52cf1f35b943f47b25f2801a2f7c2ce7c9f9 100644 (file)
@@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=perl-compress-bzip2
 PKG_VERSION:=2.24
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_URL:=http://www.cpan.org/authors/id/R/RU/RURBAN/
 PKG_SOURCE:=Compress-Bzip2-$(PKG_VERSION).tar.gz
 PKG_HASH:=7956ac627fb373fae6effede3d21b3157122800224491b124afdd7bb426c8c3f
 
-PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
+PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl
 PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/perl/Compress-Bzip2-$(PKG_VERSION)
index eef2b3454528212908fc68af48ea9e0f69b7aef5..07af61035a5cb524280602d97432b76423e8470b 100644 (file)
@@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=perl-dbi
 PKG_VERSION:=1.634
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_URL:=http://www.cpan.org/authors/id/T/TI/TIMB/
 PKG_SOURCE:=DBI-$(PKG_VERSION).tar.gz
 PKG_HASH:=250712f385864818abfba409420d16d9ee61f1cc73ac85159d054a5ee86d1450
 
-PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
+PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl
 PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/perl/DBI-$(PKG_VERSION)
index 97b46e8509017bbc4666be4bd2af9b804bb53d78..505d356cd2855f4967fae3475931353bf7d2d305 100644 (file)
@@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=perl-device-serialport
 PKG_VERSION:=1.04
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_SOURCE_URL:=http://www.cpan.org/authors/id/C/CO/COOK/
 PKG_SOURCE:=Device-SerialPort-$(PKG_VERSION).tar.gz
 PKG_HASH:=d392567cb39b4ea606c0e0acafd8ed72320311b995336ece5fcefcf9b150e9d7
 
-PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
+PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl
 PKG_MAINTAINER:=Paul Oranje <por@xs4all.nl>
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/perl/Device-SerialPort-$(PKG_VERSION)
index ac936ba128cfed7ae6c9986073f733f4cbb312b8..fdee5cc8b63ba0f81f09fb76590827cfb0979cea 100644 (file)
@@ -8,15 +8,15 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=perl-device-usb
-PKG_VERSION:=0.37
+PKG_VERSION:=0.38
 PKG_RELEASE:=1
 
 PKG_SOURCE_URL:=https://www.cpan.org/authors/id/G/GW/GWADEJ/
 PKG_SOURCE:=Device-USB-$(PKG_VERSION).tar.gz
-PKG_HASH:=0dd58d9c627b3c539d07263a7b96e1de2adea3a4ddb118cdd45aa638f8702e49
+PKG_HASH:=f0c36379db4913406dc9bd546a6cfd4da20d58f7c2cc085893a2fe67a43465dc
 
-PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
 PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
+PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/perl/Device-USB-$(PKG_VERSION)
 PKG_BUILD_DEPENDS:=perl-inline-c/host
index 552306ec47a85c4ccb52bee80a08453f9b237ce3..9ce0ba32058c353e849902108e715d9965b81409 100644 (file)
@@ -3,12 +3,12 @@
 @@ -15,6 +15,7 @@ use Inline (
          ($ENV{LIBUSB_INCDIR} ? ( INC => "-I\"$ENV{LIBUSB_INCDIR}\"" ) : () ),
          NAME => 'Device::USB',
-         VERSION => '0.37',
+         VERSION => '0.38',
 +        PREFIX => 'deviceusb_',
     );
  
  Inline->init();
-@@ -540,74 +541,74 @@ unsigned DeviceUSBDebugLevel()
+@@ -657,74 +658,74 @@ unsigned DeviceUSBDebugLevel()
      return debugLevel;
  }
  
@@ -98,7 +98,7 @@
      }
  #if LIBUSB_HAS_GET_DRIVER_NP
      ret = usb_get_driver_np((usb_dev_handle *)dev, interface, name, namelen);
-@@ -618,11 +619,11 @@ int libusb_get_driver_np(void *dev, int
+@@ -735,11 +736,11 @@ int libusb_get_driver_np(void *dev, int interface, char *name, unsigned int name
  #endif
  }
  
      }
  #if LIBUSB_HAS_DETACH_KERNEL_DRIVER_NP
      return usb_detach_kernel_driver_np((usb_dev_handle *)dev, interface);
-@@ -631,25 +632,25 @@ int libusb_detach_kernel_driver_np(void
+@@ -748,25 +749,25 @@ int libusb_detach_kernel_driver_np(void *dev, int interface)
  #endif
  }
  
  {
      int i = 0;
      int retval = 0;
-@@ -658,7 +659,7 @@ void libusb_control_msg(void *dev, int r
+@@ -775,7 +776,7 @@ void libusb_control_msg(void *dev, int requesttype, int request, int value, int
  
      if(DeviceUSBDebugLevel())
      {
              requesttype, request, value, index, bytes, size, timeout
          );
          /* maybe need to add support for printing the bytes string. */
-@@ -691,54 +692,54 @@ void libusb_control_msg(void *dev, int r
+@@ -808,54 +809,54 @@ void libusb_control_msg(void *dev, int requesttype, int request, int value, int
      Inline_Stack_Done;
  }
  
index 48eafa81fbc0e965e73303ad32a470aeda4f1546..2f173f9146d2c5930aa02f5899564c1329e70c04 100644 (file)
@@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=perl-encode-locale
 PKG_VERSION:=1.05
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_URL:=http://www.cpan.org/authors/id/G/GA/GAAS
 PKG_SOURCE:=Encode-Locale-$(PKG_VERSION).tar.gz
 PKG_HASH:=176fa02771f542a4efb1dbc2a4c928e8f4391bf4078473bd6040d8f11adb0ec1
 
-PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
+PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl
 PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/perl/Encode-Locale-$(PKG_VERSION)
index 2725cedb623aaec944014c63734377b83c5ca06a..63a6a7f3a7525a3cff2662a5bcb1014bddebd5d0 100644 (file)
@@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=perl-file-listing
 PKG_VERSION:=6.04
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_URL:=http://www.cpan.org/authors/id/G/GA/GAAS
 PKG_SOURCE:=File-Listing-$(PKG_VERSION).tar.gz
 PKG_HASH:=1e0050fcd6789a2179ec0db282bf1e90fb92be35d1171588bd9c47d52d959cf5
 
-PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
+PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl
 PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/perl/File-Listing-$(PKG_VERSION)
diff --git a/lang/perl-file-rsyncp/Makefile b/lang/perl-file-rsyncp/Makefile
new file mode 100644 (file)
index 0000000..05c418b
--- /dev/null
@@ -0,0 +1,57 @@
+# Copyright (C) 2018 OpenWrt
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=perl-file-rsyncp
+PKG_VERSION:=0.74
+PKG_RELEASE:=1
+
+PKG_SOURCE:=File-RsyncP-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://search.cpan.org/CPAN/authors/id/C/CB/CBARRATT/
+PKG_HASH:=ba4df5f9b0db6c9d86a6c5cf9861cf00d17b18e77cfa028e7a9157c0015a5aa3
+PKG_BUILD_DIR:=$(BUILD_DIR)/perl/File-RsyncP-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Carsten Wolff <carsten@wolffcarsten.de>
+PKG_LICENSE:=GPL-2.0-or-later
+PKG_LICENSE_FILES:=LICENSE README
+
+include $(INCLUDE_DIR)/package.mk
+include ../perl/perlmod.mk
+
+define Package/perl-file-rsyncp
+  SUBMENU:=Perl
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=Perl Rsync client
+  URL:=http://search.cpan.org/~cbarratt/File-RsyncP/
+  DEPENDS:=perl +perlbase-autoloader +perlbase-socket +perlbase-getopt +perlbase-data +perlbase-config +perlbase-encode +perlbase-fcntl +perlbase-file
+endef
+
+define Build/Configure
+       $(call perlmod/Configure,,)
+       $(call perlmod/Configure,,,$(PKG_BUILD_DIR)/Digest)
+       $(call perlmod/Configure,,,$(PKG_BUILD_DIR)/FileList)
+       $(call Build/Configure/Default,,rsync_cv_HAVE_LONGLONG=yes,FileList)
+endef
+
+define Build/Compile
+       PERL5LIB=$(PERL_LIB) $(MAKE) -C $(PKG_BUILD_DIR)/Digest
+       PERL5LIB=$(PERL_LIB) $(MAKE) -C $(PKG_BUILD_DIR)/FileList
+       PERL5LIB=$(PERL_LIB) $(MAKE) -C $(PKG_BUILD_DIR)
+endef
+
+define Package/perl-file-rsyncp/install
+       $(INSTALL_DIR) $(strip $(1))$(PERL_SITELIB)/File/RsyncP
+       $(INSTALL_DIR) $(strip $(1))$(PERL_SITELIB)/auto/File/RsyncP/Digest
+       $(INSTALL_DIR) $(strip $(1))$(PERL_SITELIB)/auto/File/RsyncP/FileList
+       $(INSTALL_DATA) $(PKG_BUILD_DIR)/lib/File/RsyncP.pm $(strip $(1))$(PERL_SITELIB)/File
+       $(INSTALL_DATA) $(PKG_BUILD_DIR)/lib/File/RsyncP/FileIO.pm $(strip $(1))$(PERL_SITELIB)/File/RsyncP
+       $(INSTALL_DATA) $(PKG_BUILD_DIR)/Digest/Digest.pm $(strip $(1))$(PERL_SITELIB)/File/RsyncP
+       $(INSTALL_DATA) $(PKG_BUILD_DIR)/FileList/FileList.pm $(strip $(1))$(PERL_SITELIB)/File/RsyncP
+       $(INSTALL_DATA) $(PKG_BUILD_DIR)/Digest/blib/lib/auto/File/RsyncP/Digest/autosplit.ix $(strip $(1))$(PERL_SITELIB)/auto/File/RsyncP/Digest
+       $(INSTALL_DATA) $(PKG_BUILD_DIR)/Digest/blib/arch/auto/File/RsyncP/Digest/Digest.so $(strip $(1))$(PERL_SITELIB)/auto/File/RsyncP/Digest
+       $(INSTALL_DATA) $(PKG_BUILD_DIR)/FileList/blib/lib/auto/File/RsyncP/FileList/autosplit.ix $(strip $(1))$(PERL_SITELIB)/auto/File/RsyncP/FileList
+       $(INSTALL_DATA) $(PKG_BUILD_DIR)/FileList/blib/arch/auto/File/RsyncP/FileList/FileList.so $(strip $(1))$(PERL_SITELIB)/auto/File/RsyncP/FileList
+endef
+
+$(eval $(call BuildPackage,perl-file-rsyncp))
diff --git a/lang/perl-file-rsyncp/patches/001-no-subdirs.patch b/lang/perl-file-rsyncp/patches/001-no-subdirs.patch
new file mode 100644 (file)
index 0000000..65bb427
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/Makefile.PL      2010-07-25 22:50:02.000000000 +0200
++++ b/Makefile.PL      2018-03-27 15:46:16.724000000 +0200
+@@ -8,7 +8,7 @@
+                             Getopt::Long => 2.24,     # need OO interface
+                          },
+     'PMLIBDIRS'       => ['lib'],
+-    'DIR'             => ['Digest', 'FileList'],
++    'DIR'             => [],
+     ($] >= 5.005 ?    ## Add these new keywords supported since 5.005
+       (ABSTRACT_FROM  => 'lib/File/RsyncP.pm', # retrieve abstract from module
+        AUTHOR         => 'Craig Barratt <cbarratt@users.sourceforge.net>')
index f37d41afba1f215a802438e50273f09d2bd6a52d..d04be3de690b2d3dfc58f443697251780ac66ac6 100644 (file)
@@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=perl-file-sharedir-install
 PKG_VERSION:=0.10
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_URL:=http://www.cpan.org/authors/id/G/GW/GWYN
 PKG_SOURCE:=File-ShareDir-Install-$(PKG_VERSION).tar.gz
 PKG_HASH:=708af71dec4dfb5a8cf9a5e863b566714c3f65f0a76722302de5a07ee202e6f7
 
-PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
+PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl
 PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
 
 HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/perl/File-ShareDir-Install-$(PKG_VERSION)
index 022c3b7c1e7d9d4017fbce9af54f51c0ea338859..286d14d2a02209cb60ae3ec19297ec3a420fd5a6 100644 (file)
@@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=perl-html-form
 PKG_VERSION:=6.03
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_URL:=http://www.cpan.org/authors/id/G/GA/GAAS
 PKG_SOURCE:=HTML-Form-$(PKG_VERSION).tar.gz
 PKG_HASH:=68c01d94f005d5ca9c4d55ad2a1bf3a8d034a5fc6db187d91a4c42f3fdc9fc36
 
-PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
+PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl
 PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/perl/HTML-Form-$(PKG_VERSION)
index c769ccc9bd7df344ed78528d520bd796bd4d284f..b000bea7251b0c79257fac51ad1cffe9d7afe2f1 100644 (file)
@@ -9,14 +9,15 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=perl-html-parser
 PKG_VERSION:=3.72
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_URL:=http://www.cpan.org/authors/id/G/GA/GAAS/
 PKG_SOURCE:=HTML-Parser-$(PKG_VERSION).tar.gz
 PKG_HASH:=ec28c7e1d9e67c45eca197077f7cdc41ead1bb4c538c7f02a3296a4bb92f608b
 
-PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
+PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl
 PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
+PKG_CPE_ID:=cpe:/a:derrick_oswald:html-parser
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/perl/HTML-Parser-$(PKG_VERSION)
 
index 01410585ad31a8ed38bf31c1b17a7c6d2f43cc71..a2b6dcf512016e12cf527b8a7725edf6d5f71045 100644 (file)
@@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=perl-html-tagset
 PKG_VERSION:=3.20
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_SOURCE_URL:=http://www.cpan.org/authors/id/P/PE/PETDANCE/
 PKG_SOURCE:=HTML-Tagset-$(PKG_VERSION).tar.gz
 PKG_HASH:=adb17dac9e36cd011f5243881c9739417fd102fce760f8de4e9be4c7131108e2
 
-PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
+PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl
 PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/perl/HTML-Tagset-$(PKG_VERSION)
index 20839e62ce389488cb8988ab7b787f87db2cc4bc..eff72d92080fe14a87721900443629bdf9585174 100644 (file)
@@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=perl-html-tree
 PKG_VERSION:=3.23
-PKG_RELEASE:=4
+PKG_RELEASE:=5
 
 PKG_SOURCE_URL:=http://www.cpan.org/authors/id/P/PE/PETEK/
 PKG_SOURCE:=HTML-Tree-$(PKG_VERSION).tar.gz
 PKG_HASH:=f5175acf262f3710dce899796ea3e353049939400b100706d03df2f08803c8de
 
-PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
+PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl
 PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/perl/HTML-Tree-$(PKG_VERSION)
index 712cfbd21694addad9ba6533c2acc9132d08597d..31dfa3d5ed2a3bc77b938eeb2b00edb27c7ef2dd 100644 (file)
@@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=perl-http-cookies
 PKG_VERSION:=6.01
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_URL:=http://www.cpan.org/authors/id/G/GA/GAAS
 PKG_SOURCE:=HTTP-Cookies-$(PKG_VERSION).tar.gz
 PKG_HASH:=f5d3ade383ce6389d80cb0d0356b643af80435bb036afd8edce335215ec5eb20
 
-PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
+PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl
 PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/perl/HTTP-Cookies-$(PKG_VERSION)
index ed9d292541c23ede8c3fd36248a759a9a59fb398..e64e41e2a21a04825f867a50ef014dc4ee2425fb 100644 (file)
@@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=perl-http-daemon
 PKG_VERSION:=6.01
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_URL:=http://www.cpan.org/authors/id/G/GA/GAAS
 PKG_SOURCE:=HTTP-Daemon-$(PKG_VERSION).tar.gz
 PKG_HASH:=43fd867742701a3f9fcc7bd59838ab72c6490c0ebaf66901068ec6997514adc2
 
-PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
+PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl
 PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/perl/HTTP-Daemon-$(PKG_VERSION)
index 4801ac1f297d3d9d057a6207b1d250dabcb09fb4..e0acdef86bfe639e72a89c0cf4ae5f1d4c88d975 100644 (file)
@@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=perl-http-date
 PKG_VERSION:=6.02
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_URL:=http://www.cpan.org/authors/id/G/GA/GAAS
 PKG_SOURCE:=HTTP-Date-$(PKG_VERSION).tar.gz
 PKG_HASH:=e8b9941da0f9f0c9c01068401a5e81341f0e3707d1c754f8e11f42a7e629e333
 
-PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
+PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl
 PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/perl/HTTP-Date-$(PKG_VERSION)
index c6a2469d38c3383c262b0d63ba9f6977e6658b6a..7293a1a2093c244ad1e6fa3c9c25a6e28623fa99 100644 (file)
@@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=perl-http-message
 PKG_VERSION:=6.11
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_URL:=http://www.cpan.org/authors/id/E/ET/ETHER
 PKG_SOURCE:=HTTP-Message-$(PKG_VERSION).tar.gz
 PKG_HASH:=e7b368077ae6a188d99920411d8f52a8e5acfb39574d4f5c24f46fd22533d81b
 
-PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
+PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl
 PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/perl/HTTP-Message-$(PKG_VERSION)
index 6503e394659ae5c6fae4985da82a42ebb07fccce..dbb5e185bde15d71d244fdc0979630eb290cafdc 100644 (file)
@@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=perl-http-negotiate
 PKG_VERSION:=6.01
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_URL:=http://www.cpan.org/authors/id/G/GA/GAAS
 PKG_SOURCE:=HTTP-Negotiate-$(PKG_VERSION).tar.gz
 PKG_HASH:=1c729c1ea63100e878405cda7d66f9adfd3ed4f1d6cacaca0ee9152df728e016
 
-PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
+PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl
 PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/perl/HTTP-Negotiate-$(PKG_VERSION)
index aab1dfd6a722c4596973072de87160df947f25b1..e4997609a1fcf0f96fe292bfbfb64be83a1df648 100644 (file)
@@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=perl-http-server-simple
 PKG_VERSION:=0.51
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_URL:=http://www.cpan.org/authors/id/B/BP/BPS
 PKG_SOURCE:=HTTP-Server-Simple-$(PKG_VERSION).tar.gz
 PKG_HASH:=b9dc5c9f12c16ca39a96f0ede1e27a18a5594274ff8f583000788a7fca136dfb
 
-PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
+PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl
 PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/perl/HTTP-Server-Simple-$(PKG_VERSION)
index bc5913da718d7ed2d0dc1f2944eef3dc8437533a..9de7a9087cb25a347ec84c147eaeac3404c75fe2 100644 (file)
@@ -8,15 +8,16 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=perl-inline-c
-PKG_VERSION:=0.78
+PKG_VERSION:=0.81
 PKG_RELEASE:=1
 
-PKG_SOURCE_URL:=http://www.cpan.org/authors/id/T/TI/TINITA
 PKG_SOURCE:=Inline-C-$(PKG_VERSION).tar.gz
-PKG_HASH:=9a7804d85c01a386073d2176582b0262b6374c5c0341049da3ef84c6f53efbc7
+PKG_SOURCE_URL:=https://www.cpan.org/authors/id/T/TI/TINITA
+PKG_HASH:=f185258d9050d7f79b4f00f12625cc469c2f700ff62d3e831cb18d80d2c87aac
 
-PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
 PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
+PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl
+PKG_LICENSE_FILES:=LICENSE
 
 HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/perl/Inline-C-$(PKG_VERSION)
 HOST_BUILD_DEPENDS:=perl/host perl-inline/host perl-parse-recdescent/host perl-file-sharedir-install/host
@@ -32,7 +33,7 @@ define Package/perl-inline-c
   SECTION:=lang
   CATEGORY:=Languages
   TITLE:=C Language Support for Inline
-  URL:=http://search.cpan.org/dist/Inline-C/
+  URL:=https://search.cpan.org/dist/Inline-C/
   DEPENDS:=perl +perl-inline +perl-parse-recdescent +perlbase-config +perlbase-cwd +perlbase-data +perlbase-essential +perlbase-file +perlbase-if
 endef
 
index dcfe2bb58d69184de16b877da041e6a460047acf..b001c206f701837c7cd7504bc672afe7a83f317a 100644 (file)
@@ -1,6 +1,6 @@
 --- a/lib/Inline/C.pm
 +++ b/lib/Inline/C.pm
-@@ -361,7 +361,7 @@ sub build {
+@@ -380,7 +380,7 @@ sub build {
      $o->call('write_XS', 'Build Glue 1');
      $o->call('write_Inline_headers', 'Build Glue 2');
      $o->call('write_Makefile_PL', 'Build Glue 3');
index b2ae09e6b111fde6bc7ec2b809b73829571621b9..d26318ab4641ed8a272423dceb29b4160a27adf8 100644 (file)
@@ -1,6 +1,6 @@
 --- a/lib/Inline/C.pm
 +++ b/lib/Inline/C.pm
-@@ -438,22 +438,28 @@ sub get_maps {
+@@ -457,22 +457,28 @@ sub get_maps {
      print STDERR "get_maps Stage\n" if $o->{CONFIG}{BUILD_NOISY};
      my $typemap = '';
      my $file;
index d4189b766ee079c0a960be7db74f6e8a2e114455..427a72d26d91583732d1cd78e7b3e3eed5ea7aee 100644 (file)
@@ -8,15 +8,15 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=perl-inline
-PKG_VERSION:=0.82
+PKG_VERSION:=0.83
 PKG_RELEASE:=1
 
 PKG_SOURCE:=Inline-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://cpan.metacpan.org/authors/id/T/TI/TINITA
-PKG_HASH:=1af94a8e95e4ba4545592341c47d8d1dc45b01822b877f7d3095a438566e874b
+PKG_HASH:=171a8e5f66faf88fe5ef4de7126267cd8fb2503483432eabc3b88ac7d5be4239
 
 PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
-PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
+PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl
 PKG_LICENSE_FILES:=LICENSE
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/perl/Inline-$(PKG_VERSION)
index 1e280d84c187846e985f21ae40083b67d2d1c57f..34e9a3a16f49188597883fc953bb42ae353d21f6 100644 (file)
@@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=perl-io-html
 PKG_VERSION:=1.001
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_URL:=http://www.cpan.org/authors/id/C/CJ/CJM
 PKG_SOURCE:=IO-HTML-$(PKG_VERSION).tar.gz
 PKG_HASH:=ea78d2d743794adc028bc9589538eb867174b4e165d7d8b5f63486e6b828e7e0
 
-PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
+PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl
 PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/perl/IO-HTML-$(PKG_VERSION)
index 1bd5aca19bd913f046e02f7d6092c8830b33274b..ca55b2cfde3b62afee4da1e08fdde6fcd0d80859 100644 (file)
@@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=perl-lockfile-simple
 PKG_VERSION:=0.208
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_SOURCE_URL:=http://www.cpan.org/authors/id/S/SC/SCHWIGON/lockfile-simple/
 PKG_SOURCE:=LockFile-Simple-$(PKG_VERSION).tar.gz
 PKG_HASH:=45c77896b2a5a0a45f6202a6f813f437ff8b283f84a1c60d0c4f3730802af3a2
 
-PKG_LICENSE:=GPL-2.0+ Artistic-1.0-Perl
+PKG_LICENSE:=GPL-2.0-or-later Artistic-1.0-Perl
 PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/perl/LockFile-Simple-$(PKG_VERSION)
index 375b3a4e802d2eaa3233cc86339377f7c7a84343..634864c8790a8bc1fe8ca5eaedd0dd029992c5cc 100644 (file)
@@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=perl-lwp-mediatypes
 PKG_VERSION:=6.02
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_URL:=http://www.cpan.org/authors/id/G/GA/GAAS
 PKG_SOURCE:=LWP-MediaTypes-$(PKG_VERSION).tar.gz
 PKG_HASH:=18790b0cc5f0a51468495c3847b16738f785a2d460403595001e0b932e5db676
 
-PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
+PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl
 PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/perl/LWP-MediaTypes-$(PKG_VERSION)
index 8bd32e7d0ccbf38cd5a612ce72cc80602852ec1d..359838dfab94c9cf09be0215b68cd7cc7ca5f146 100644 (file)
@@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=perl-net-http
 PKG_VERSION:=6.09
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_URL:=http://www.cpan.org/authors/id/E/ET/ETHER
 PKG_SOURCE:=Net-HTTP-$(PKG_VERSION).tar.gz
 PKG_HASH:=52762b939d84806908ba544581c5708375f7938c3c0e496c128ca3fbc425e58d
 
-PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
+PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl
 PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/perl/Net-HTTP-$(PKG_VERSION)
index d3b4cfa37acca43f3d9156a9e2090f7aa6372718..f94297a56403b1d3ea5f1f8afe33e5ec8bfc4f0b 100644 (file)
@@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=perl-net-telnet
 PKG_VERSION:=3.04
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_SOURCE_URL:=http://www.cpan.org/authors/id/J/JR/JROGERS/
 PKG_SOURCE:=Net-Telnet-$(PKG_VERSION).tar.gz
 PKG_HASH:=e64d567a4e16295ecba949368e7a6b8b5ae2a16b3ad682121d9b007dc5d2a37a
 
-PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
+PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl
 PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/perl/Net-Telnet-$(PKG_VERSION)
index a9eb3dc9a8ffc950bc367c5da938b6670a131379..d041a6afd81ef62785a6a5b4769598b5bc99625b 100644 (file)
@@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=perl-parse-recdescent
 PKG_VERSION:=1.967015
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_URL:=https://www.cpan.org/authors/id/J/JT/JTBRAUN
 PKG_SOURCE:=Parse-RecDescent-$(PKG_VERSION).tar.gz
 PKG_HASH:=1943336a4cb54f1788a733f0827c0c55db4310d5eae15e542639c9dd85656e37
 
-PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
+PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl
 PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
 
 HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/perl/Parse-RecDescent-$(PKG_VERSION)
index f078f77ed68f88cbc69ab3a164aa09b85b5bf358..3eed290cac57d4fbef3925219730d4f6436f3419 100644 (file)
@@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=perl-sub-uplevel
 PKG_VERSION:=0.25
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_URL:=http://www.cpan.org/authors/id/D/DA/DAGOLDEN
 PKG_SOURCE:=Sub-Uplevel-$(PKG_VERSION).tar.gz
 PKG_HASH:=2dcca582a7ea5bada576eb27c4be1d1b064fb22175bdbd6d696c45d083560505
 
-PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
+PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl
 PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/perl/Sub-Uplevel-$(PKG_VERSION)
index 36a00545e06c7bb4843e27a2dd69e0eb4030eb94..449d501758b6675baf6c9522509707c1f5d37be6 100644 (file)
@@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=perl-test-harness
 PKG_VERSION:=3.36
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_URL:=http://www.cpan.org/authors/id/L/LE/LEONT/
 PKG_SOURCE:=Test-Harness-$(PKG_VERSION).tar.gz
 PKG_HASH:=e7566f13b041d028b56f184b77ec2545ec6f0bb5a0f8f5368f7e4a08b496b63e
 
-PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
+PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl
 PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/perl/Test-Harness-$(PKG_VERSION)
index 94409e1f824b0b71dd843a6c0c416d9557757a0d..79da1aad57f8e4a8babb0130180c9c5dcf3e5593 100644 (file)
@@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=perl-test-warn
 PKG_VERSION:=0.30
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_URL:=http://www.cpan.org/authors/id/C/CH/CHORNY
 PKG_SOURCE:=Test-Warn-$(PKG_VERSION).tar.gz
 PKG_HASH:=8197555b94189d919349a03f7058f83861f145af9bee59f505bfe47562144e41
 
-PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
+PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl
 PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/perl/Test-Warn-$(PKG_VERSION)
index 9b7d046d0bca79093002c9d696170062f460c800..fa3ad61cbafc9ad4326cf2cf4d3eceae45e606c0 100644 (file)
@@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=perl-text-csv_xs
 PKG_VERSION:=1.39
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_URL:=https://www.cpan.org/authors/id/H/HM/HMBRAND/
 PKG_SOURCE:=Text-CSV_XS-$(PKG_VERSION).tgz
 PKG_HASH:=aa4e424eaf68bea0d0e8c16b961c942b64926e6183ce1dbbc6c799eafb0a9ebd
 
-PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
+PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl
 PKG_MAINTAINER:=Philip Prindeville <philipp@redfish-solutions.com>
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/perl/Text-CSV_XS-$(PKG_VERSION)
index 3f043e4ffbe596c0a4c991dc16048441d721d412..299b09554dd2fdcf88c5921b213ef04f28b01b67 100644 (file)
@@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=perl-uri
 PKG_VERSION:=1.72
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_URL:=http://www.cpan.org/authors/id/E/ET/ETHER/
 PKG_SOURCE:=URI-$(PKG_VERSION).tar.gz
 PKG_HASH:=35f14431d4b300de4be1163b0b5332de2d7fbda4f05ff1ed198a8e9330d40a32
 
-PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
+PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl
 PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/perl/URI-$(PKG_VERSION)
index 9a7ad5fa5ddf3857247bb8d4476adaffe0de15a6..2a4e8ccaad96db3f2e4afdea1f0b3b4fbfd3f1b5 100644 (file)
@@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=perl-www-curl
 PKG_VERSION:=4.17
-PKG_RELEASE:=4
+PKG_RELEASE:=6
 
 PKG_SOURCE_URL:=http://www.cpan.org/authors/id/S/SZ/SZBALINT/
 PKG_SOURCE:=WWW-Curl-$(PKG_VERSION).tar.gz
 PKG_HASH:=52ffab110e32348d775f241c973eb56f96b08eedbc110d77d257cdb0a24ab7ba
 
-PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
+PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl
 PKG_LICENSE_FILES:=LICENSE
 PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
 
diff --git a/lang/perl-www-curl/patches/210-curl_7.66_compat.patch b/lang/perl-www-curl/patches/210-curl_7.66_compat.patch
new file mode 100644 (file)
index 0000000..e26d953
--- /dev/null
@@ -0,0 +1,56 @@
+--- a/Curl.xs
++++ b/Curl.xs
+@@ -70,7 +70,7 @@
+ typedef struct {
+-#ifdef __CURL_MULTI_H
++#ifdef CURLINC_MULTI_H
+     struct CURLM *curlm;
+ #else
+     struct void *curlm;
+@@ -234,7 +234,7 @@
+ {
+     perl_curl_multi *self;
+     Newz(1, self, 1, perl_curl_multi);
+-#ifdef __CURL_MULTI_H
++#ifdef CURLINC_MULTI_H
+     self->curlm=curl_multi_init();
+ #else
+     croak("curl version too old to support curl_multi_init()");
+@@ -245,7 +245,7 @@
+ /* delete the multi */
+ static void perl_curl_multi_delete(perl_curl_multi *self)
+ {
+-#ifdef __CURL_MULTI_H
++#ifdef CURLINC_MULTI_H
+     if (self->curlm) 
+         curl_multi_cleanup(self->curlm);
+     Safefree(self);
+@@ -1065,7 +1065,7 @@
+     WWW::Curl::Multi curlm
+     WWW::Curl::Easy curl
+     CODE:
+-#ifdef __CURL_MULTI_H
++#ifdef CURLINC_MULTI_H
+         curl_multi_add_handle(curlm->curlm, curl->curl);
+ #endif
+@@ -1074,7 +1074,7 @@
+     WWW::Curl::Multi curlm
+     WWW::Curl::Easy curl
+     CODE:
+-#ifdef __CURL_MULTI_H
++#ifdef CURLINC_MULTI_H
+         curl_multi_remove_handle(curlm->curlm, curl->curl);
+ #endif
+@@ -1149,7 +1149,7 @@
+     PREINIT:
+         int remaining;
+     CODE:
+-#ifdef __CURL_MULTI_H
++#ifdef CURLINC_MULTI_H
+         while(CURLM_CALL_MULTI_PERFORM ==
+             curl_multi_perform(self->curlm, &remaining));
+           RETVAL = remaining;
index a193a6b90a00054b9e220343d93b852b16f1af20..a52f3be493ccd1903269fef713e1f6c20e2d68fc 100644 (file)
@@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=perl-www-mechanize
 PKG_VERSION:=1.75
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=WWW-Mechanize-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.cpan.org/authors/id/E/ET/ETHER/
 PKG_HASH:=5310051feb66c6ef9f7a4c070c66ec6092932129fc9cd18bba009ce999b7930b
 
-PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
+PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl
 PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/perl/WWW-Mechanize-$(PKG_VERSION)
index ccbb7fa67cfb1b6ba8c788c50965d2991da3b01a..bccf44ca66b5eca5b6e6dd5d9daa02e27698143d 100644 (file)
@@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=perl-www-robotrules
 PKG_VERSION:=6.02
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_URL:=http://www.cpan.org/authors/id/G/GA/GAAS
 PKG_SOURCE:=WWW-RobotRules-$(PKG_VERSION).tar.gz
 PKG_HASH:=46b502e7a288d559429891eeb5d979461dd3ecc6a5c491ead85d165b6e03a51e
 
-PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
+PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl
 PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/perl/WWW-RobotRules-$(PKG_VERSION)
index 563e51c895488693edffd49d51f4305b9aae8221..51b4682808ec34b6cdd876f3d95e111005078538 100644 (file)
@@ -9,14 +9,15 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=perl-www
 PKG_VERSION:=6.15
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_URL:=http://www.cpan.org/authors/id/E/ET/ETHER/
 PKG_SOURCE:=libwww-perl-$(PKG_VERSION).tar.gz
 PKG_HASH:=6f349d45c21b1ec0501c4437dfcb70570940e6c3d5bff783bd91d4cddead8322
 
-PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
+PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl
 PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
+PKG_CPE_ID:=cpe:/a:search.cpan:libwww-perl
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/perl/libwww-perl-$(PKG_VERSION)
 
index 3a6ebcae8bea15f6a5377ea7c74f771f6f7580ed..1c65358c23f66409a2bef9bc770f7da90c432423 100644 (file)
@@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=perl-xml-parser
 PKG_VERSION:=2.44
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_URL:=http://www.cpan.org/authors/id/T/TO/TODDR/
 PKG_SOURCE:=XML-Parser-$(PKG_VERSION).tar.gz
 PKG_HASH:=1ae9d07ee9c35326b3d9aad56eae71a6730a73a116b9fe9e8a4758b7cc033216
 
-PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
+PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl
 PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/perl/XML-Parser-$(PKG_VERSION)
index aef2c66557c243189707c8c0946fe0d33d5c4c23..7c7dde21c51bd33ed9f8adf343ef2c67d85febb8 100644 (file)
@@ -11,7 +11,7 @@ include perlver.mk
 
 PKG_NAME:=perl
 PKG_VERSION:=$(PERL_VERSION)
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_URL:=\
                https://cpan.metacpan.org/src/5.0 \
@@ -23,10 +23,11 @@ PKG_SOURCE_URL:=\
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_HASH:=fea7162d4cca940a387f0587b93f6737d884bf74d8a9d7cfd978bc12cd0b202d
 
-PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
+PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl
 PKG_LICENSE_FILES:=Copying Artistic README
 PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>, \
                Philip Prindeville <philipp@redfish-solutions.com>
+PKG_CPE_ID:=cpe:/a:perl:perl
 
 # Build settings
 PKG_BUILD_DIR:=$(BUILD_DIR)/perl/$(PKG_NAME)-$(PKG_VERSION)
@@ -63,7 +64,7 @@ define Package/perl
   CATEGORY:=Languages
   TITLE:=The Perl intepreter
   URL:=http://www.perl.com/
-  DEPENDS:=+USE_GLIBC:libbsd +PERL_THREADS:libpthread
+  DEPENDS:=+USE_GLIBC:libbsd +PERL_THREADS:libpthread @!arc
 endef
 
 define Package/perl/description
index ae29b2841388f0d322b227019144987fa0419ffc..21b77146dd3d83dcb8fd9786c0f3b202d80e7cbc 100644 (file)
@@ -9,7 +9,7 @@ PECL_NAME:=dio
 PECL_LONGNAME:=Direct I/O functions
 
 PKG_VERSION:=0.1.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_HASH:=aab985e374604379d99c9c93207f2c2959ff141740d1a648c0fbd07e0e08a73e
 
 PKG_NAME:=php7-pecl-$(PECL_NAME)
@@ -21,8 +21,8 @@ PKG_BUILD_PARALLEL:=1
 
 PKG_MAINTAINER:=Michael Heimpold <mhei@heimpold.de>
 
-PKG_LICENSE:=PHPv3.01
-PKG_LICENSE_FILES:=
+PKG_LICENSE:=PHP-3.01
+PKG_LICENSE_FILES:=LICENSE
 
 PKG_FIXUP:=autoreconf
 
index 68079048ba2e3162d9ef785ec5b1845334e5d63f..e9c87dd6f74b4ec57a64ddaae547087401fb7b7d 100644 (file)
@@ -8,9 +8,9 @@ include $(TOPDIR)/rules.mk
 PECL_NAME:=pecl_http
 PECL_LONGNAME:=Extended HTTP Support
 
-PKG_VERSION:=3.2.0
-PKG_RELEASE:=2
-PKG_HASH:=6fb7f038365fb1f3302f1b7e7d6b55d5c422bdea36057b1efe02bbe6ad3cc01b
+PKG_VERSION:=3.2.1
+PKG_RELEASE:=1
+PKG_HASH:=9c5ab5ace7f232699bf4d8997dd9135c92bb630357c51d968d1baca698fadc92
 
 PKG_NAME:=php7-pecl-http
 PKG_SOURCE:=$(PECL_NAME)-$(PKG_VERSION).tgz
@@ -41,7 +41,7 @@ CONFIGURE_VARS+= \
        PECL_cv_HAVE_LIBCURL_SecureTransport=no \
        PECL_cv_HAVE_LIBCURL_GSKit=no \
        PECL_cv_HAVE_LIBCURL_PolarSSL=no \
-       PECL_cv_HAVE_LIBCURL_WolfSSL=$(if $(CONFIG_LIBCURL_CYASSL),yes,no) \
+       PECL_cv_HAVE_LIBCURL_WolfSSL=$(if $(CONFIG_LIBCURL_WOLFSSL),yes,no) \
        PECL_cv_HAVE_LIBCURL_mbedTLS=$(if $(CONFIG_LIBCURL_MBEDTLS),yes,no) \
        PECL_cv_HAVE_LIBCURL_axTLS=no \
        PECL_cv_LIBCURL_TLSAUTH_SRP=$(if $(CONFIG_LIBCURL_TLS_SRP),yes,no) \
index daf2bd9f7c9bb0947b933e0947efe766460de2a3..d70c24d1d82a46f0ba1aabf4397ae451eefe3d3b 100644 (file)
@@ -9,7 +9,7 @@ PECL_NAME:=krb5
 PECL_LONGNAME:=Bindings for the Kerberos library
 
 PKG_VERSION:=1.1.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_HASH:=3301e047fc7dc3574da19b2a4b18e15feca5ad39db9335c3353a8e16b855c35b
 
 PKG_NAME:=php7-pecl-krb5
@@ -18,7 +18,7 @@ PKG_SOURCE_URL:=http://pecl.php.net/get/
 
 PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
 
-PKG_LICENSE:=BSD
+PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
 
 PKG_BUILD_DEPENDS:=php7
index c57bddad2bfa1274aad20d8b4a4962fe49b686ef..ee0705ee09a7f516e9ee996fb95a151a80ef4233 100644 (file)
@@ -9,19 +9,19 @@ PECL_NAME:=libevent
 PECL_LONGNAME:=Libevent - event notification
 
 PKG_NAME:=php7-pecl-$(PECL_NAME)
-PKG_VERSION=2017-03-24-$(PKG_SOURCE_VERSION)
+PKG_VERSION=2019-05-30-$(PKG_SOURCE_VERSION)
 PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/expressif/pecl-event-libevent.git
-PKG_SOURCE_VERSION:=5a726cee95ef9760fe81a60e595e87655f324594
+PKG_SOURCE_VERSION:=ce255e7e1e293030951fd68d5df06b2a4c077a89
 PKG_SOURCE_SUBDIR:=$(PECL_NAME)-$(PKG_SOURCE_VERSION)
 PKG_SOURCE:=$(PECL_NAME)-$(PKG_SOURCE_VERSION).tar.gz
-PKG_MIRROR_HASH:=8d6ef4e5f496cfe6aa927d4a8c886041c1aec04220f1a3670c084faa2cc01fe1
+PKG_MIRROR_HASH:=9bb1665e020c2254bb347adc0779bea75876b8c21f2612eca723c99280a780dd
 
 PKG_MAINTAINER:=Michael Heimpold <mhei@heimpold.de>
 
-PKG_LICENSE:=PHPv3.01
+PKG_LICENSE:=PHP-3.01
 PKG_LICENSE_FILES:=
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/pecl-php7/$(PECL_NAME)-$(PKG_SOURCE_VERSION)
index 09e8f3a430b751b547e4b474ea77dd628c673c1b..aa2ee2506fb941fd7f090d6d2bcab35b2359984c 100644 (file)
@@ -9,7 +9,7 @@ PECL_NAME:=mcrypt
 PECL_LONGNAME:=Bindings for the libmcrypt library
 
 PKG_VERSION:=1.0.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_HASH:=4d21dd20bfdc3cf4d43c967abdd137224f9c56258ca28ee0bc66ce130e01cae4
 
 PKG_NAME:=php7-pecl-mcrypt
@@ -18,7 +18,7 @@ PKG_SOURCE_URL:=http://pecl.php.net/get/
 
 PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
 
-PKG_LICENSE:=PHPv3.01
+PKG_LICENSE:=PHP-3.01
 PKG_LICENSE_FILES:=LICENSE
 
 PKG_BUILD_DEPENDS:=php7
index 71f9ee9a6faddb36d7c1cca2e20a51d09beb5f72..16c15f853719daf02c83a9621987d21a6ae60a08 100644 (file)
@@ -8,9 +8,9 @@ include $(TOPDIR)/rules.mk
 PECL_NAME:=redis
 PECL_LONGNAME:=PHP extension for interfacing with Redis
 
-PKG_VERSION:=4.3.0
+PKG_VERSION:=5.0.2
 PKG_RELEASE:=1
-PKG_HASH:=c0f04cec349960a842b60920fb8a433656e2e494eaed6e663397d67102a51ba2
+PKG_HASH:=4e18d7ebe032a562c358d79f94efa5f187ea90db7a56ef648476e24f4fe0b72c
 
 PKG_NAME:=php7-pecl-redis
 PKG_SOURCE:=$(PECL_NAME)-$(PKG_VERSION).tgz
@@ -18,7 +18,7 @@ PKG_SOURCE_URL:=http://pecl.php.net/get/
 
 PKG_MAINTAINER:=Michael Heimpold <mhei@heimpold.de>
 
-PKG_LICENSE:=PHPv3.01
+PKG_LICENSE:=PHP-3.01
 PKG_LICENSE_FILES:=COPYING
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/pecl-php7/$(PECL_NAME)-$(PKG_VERSION)
index 8f60e17cad862eca118c9f76b9ede0112d34a199..c5f11c527cc0a4077659deb980b6877ec209e4b5 100644 (file)
@@ -6,18 +6,18 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=php
-PKG_VERSION:=7.2.18
+PKG_VERSION:=7.2.23
 PKG_RELEASE:=1
 
 PKG_MAINTAINER:=Michael Heimpold <mhei@heimpold.de>
 
-PKG_LICENSE:=PHPv3.01
+PKG_LICENSE:=PHP-3.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:=9970dbb3ab1298c9e6aac54bebfa841c8ad14b18eead65594a68fa841364cb8d
+PKG_HASH:=74e045ec8ff26290db6a3688826dcdf43b87bc509e508e9cb76dab742804ca14
 
 PKG_FIXUP:=libtool autoreconf
 PKG_BUILD_PARALLEL:=1
@@ -250,6 +250,7 @@ ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-gd),)
        --with-gd=shared \
        --with-jpeg-dir="$(STAGING_DIR)/usr" \
        --with-png-dir="$(STAGING_DIR)/usr" \
+       --with-webp-dir="$(STAGING_DIR)/usr" \
        --without-xpm-dir \
        --enable-gd-native-ttf \
        --disable-gd-jis-conv
@@ -623,7 +624,7 @@ $(eval $(call BuildModule,dom,DOM,+@PHP7_LIBXML +PACKAGE_php7-mod-dom:libxml2))
 $(eval $(call BuildModule,exif,EXIF))
 $(eval $(call BuildModule,fileinfo,Fileinfo))
 $(eval $(call BuildModule,ftp,FTP,+PACKAGE_php7-mod-ftp:libopenssl))
-$(eval $(call BuildModule,gd,GD graphics,+PACKAGE_php7-mod-gd:libjpeg +PACKAGE_php7-mod-gd:libpng +PHP7_LIBFREETYPE:libfreetype))
+$(eval $(call BuildModule,gd,GD graphics,+PACKAGE_php7-mod-gd:libjpeg +PACKAGE_php7-mod-gd:libpng +PACKAGE_php7-mod-gd:libwebp +PHP7_LIBFREETYPE:libfreetype))
 $(eval $(call BuildModule,gettext,Gettext,+PACKAGE_php7-mod-gettext:libintl-full))
 $(eval $(call BuildModule,gmp,GMP,+PACKAGE_php7-mod-gmp:libgmp))
 $(eval $(call BuildModule,hash,Hash))
index 650005ad8b2560e2c573087279225960580f671b..63aa47c3369184448fc84786afd786d111e37312 100644 (file)
@@ -5,19 +5,17 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=Flask
-PKG_VERSION:=1.0.2
+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/F/Flask
-PKG_HASH:=2271c0070dbcb5275fad4a82e29f23ab92682dc45f9dfbc22c02ba9b9322ce48
-PKG_BUILD_DEPENDS:=python python3
-PKG_LICENSE:=BSD-3-Clause
-PKG_LICENSE_FILES:=LICENSE
-PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
+PKG_HASH:=13f9f196f330c7c2c5d7a5cf91af894110ca0215ac051b5844701f2bfd934d52
 
-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_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=LICENSE.rst
+PKG_CPE_ID:=cpe:/a:palletsprojects:flask
 
 include $(INCLUDE_DIR)/package.mk
 include ../python3-package.mk
@@ -26,8 +24,8 @@ define Package/python3-flask
   SECTION:=lang
   CATEGORY:=Languages
   SUBMENU:=Python
-  URL:=http://github.com/pallets/flask/
-  TITLE:=python3-flask
+  TITLE:=Flask
+  URL:=https://palletsprojects.com/p/flask/
   DEPENDS:=+python3-asyncio +python3-click +python3-codecs +python3-decimal \
            +python3-itsdangerous +python3-jinja2 +python3 +python3-logging \
            +python3-markupsafe +python3-multiprocessing +python3-setuptools \
@@ -36,9 +34,10 @@ define Package/python3-flask
 endef
 
 define Package/python3-flask/description
-Flask is a microframework for Python based on Werkzeug, Jinja 2 and good
-intentions. And before you ask: It.s BSD licensed!
+  Flask is a microframework for Python based on Werkzeug, Jinja 2 and good
+  intentions. And before you ask: It.s BSD licensed!
 endef
 
 $(eval $(call Py3Package,python3-flask))
 $(eval $(call BuildPackage,python3-flask))
+$(eval $(call BuildPackage,python3-flask-src))
index 4151c2b24ad4ac7029b33550bc5e7467755bec07..e7f458da0aa18b8deed7f10e6a9ceea7ead78cf7 100644 (file)
@@ -15,6 +15,7 @@ PKG_HASH:=065c4f02ebe7f7cf559e49ee5a95fb800a9e4528727aec6f24402a5374c65013
 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
 PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=LICENSE
+PKG_CPE_ID:=cpe:/a:pocoo:jinja2
 
 include $(INCLUDE_DIR)/package.mk
 include ../python3-package.mk
index d3e119a03a3879e5896073151f93c594c4b81c1c..77cba24d0f4db515c4f31b5779a943a3365a3bf4 100644 (file)
@@ -6,18 +6,17 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=MarkupSafe
 PKG_VERSION:=1.1.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/M/MarkupSafe
 PKG_HASH:=29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b
-PKG_BUILD_DEPENDS:=python python3
-PKG_LICENSE:=BSD-3-Clause
-PKG_LICENSE_FILES:=LICENSE
+
 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=LICENSE.rst
 
-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_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
 
 include $(INCLUDE_DIR)/package.mk
 include ../python3-package.mk
@@ -26,15 +25,16 @@ define Package/python3-markupsafe
   SECTION:=lang
   CATEGORY:=Languages
   SUBMENU:=Python
-  URL:=https://github.com/pallets/markupsafe/
-  TITLE:=python3-markupsafe
+  TITLE:=MarkupSafe
+  URL:=https://palletsprojects.com/p/markupsafe/
   DEPENDS:=+python3-light
   VARIANT:=python3
 endef
 
 define Package/python3-markupsafe/description
-MarkupSafe implements a XML/HTML/XHTML Markup safe string for Python
+  MarkupSafe implements a text object that escapes characters so it is safe to use in HTML and XML.
 endef
 
 $(eval $(call Py3Package,python3-markupsafe))
 $(eval $(call BuildPackage,python3-markupsafe))
+$(eval $(call BuildPackage,python3-markupsafe-src))
index 9c43fd105131cf09e130441ae0b20f023a6e2d8f..61325b7d51def0ba2a939434e8ae061f0252d9d2 100644 (file)
@@ -52,7 +52,7 @@ Leading up to "The Snap":
   * If a replacement cannot be found, the program will be removed during "The Snap"
 
 * Python 2 libraries will remain in the feed until "The Snap"
-  * A Python 2-only library will be transitioned to Python 3 (or a suitable replacement found), if its Python 3 version is a dependency of another package in the feed
+  * For any Python 2-only libraries, a Python 3 version will be added (or a suitable replacement found), if its Python 3 version is a dependency of another package in the feed
   * Python 2 libraries will receive normal updates until 31 October 2019
   * From 31 October 2019 onward:
     * Python 2-only libraries will receive security updates only
index 9c5c6618170a26245097ecdbfab51faa87a1790d..6aa1622cadb49c76350e9acc4474ff6dfc51156a 100644 (file)
@@ -5,20 +5,16 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=Werkzeug
-PKG_VERSION:=0.15.2
+PKG_VERSION:=0.16.0
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/W/Werkzeug
-PKG_HASH:=0a73e8bb2ff2feecfc5d56e6f458f5b99290ef34f565ffb2665801ff7de6af7a
+PKG_HASH:=7280924747b5733b246fe23972186c6b348f9ae29724135a6dfc1e53cea433e7
 
 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
 PKG_LICENSE:=BSD-3-Clause
-PKG_LICENSE_FILES:=LICENSE
-
-PKG_BUILD_DEPENDS:=python python3
-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_LICENSE_FILES:=LICENSE.rst
 
 include $(INCLUDE_DIR)/package.mk
 include ../python3-package.mk
@@ -27,17 +23,16 @@ define Package/python3-werkzeug
   SECTION:=lang
   CATEGORY:=Languages
   SUBMENU:=Python
+  TITLE:=Werkzeug
   URL:=https://palletsprojects.com/p/werkzeug/
-  TITLE:=python3-werkzeug
   DEPENDS:=+python3-light +python3-email
   VARIANT:=python3
 endef
 
 define Package/python3-werkzeug/description
-Werkzeug
-
-The Python WSGI Utility Library
+ The comprehensive WSGI web application library.
 endef
 
 $(eval $(call Py3Package,python3-werkzeug))
 $(eval $(call BuildPackage,python3-werkzeug))
+$(eval $(call BuildPackage,python3-werkzeug-src))
index 0912aa2cb422e42b4fc31daeec42557408d857b8..d8ba6d1161dab59be71e396f30908a0a21493e67 100644 (file)
@@ -6,21 +6,23 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=bcrypt
-PKG_VERSION:=3.1.6
+PKG_VERSION:=3.1.7
 PKG_RELEASE:=1
 
 PKG_SOURCE:=bcrypt-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:= https://files.pythonhosted.org/packages/source/b/$(PKG_NAME)
-PKG_HASH:=44636759d222baa62806bbceb20e96f75a015a6381690d1bc2eda91c01ec02ea
+PKG_HASH:=0b0069c752ec14172c5f78208f1863d7ad6755a6fae6fe76ec2c80d13be41e42
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-bcrypt-$(PKG_VERSION)
 
+PKG_MAINTAINER:=Daniel Dickinson <cshored@thecshore.com>
 PKG_LICENSE:=Apache-2.0
 PKG_LICENSE_FILES:=LICENSE
-PKG_MAINTAINER:=Daniel Dickinson <cshored@thecshore.com>
 
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-bcrypt-$(PKG_VERSION)
+PKG_BUILD_DEPENDS:=libffi/host
+HOST_PYTHON_PACKAGE_BUILD_DEPENDS:="cffi>=1.1"
+HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:="cffi>=1.1"
 
 include $(INCLUDE_DIR)/package.mk
-
 include ../python-package.mk
 include ../python3-package.mk
 
@@ -30,27 +32,30 @@ define Package/bcrypt/Default
   SECTION:=lang
   CATEGORY:=Languages
   SUBMENU:=Python
+  TITLE:=Modern password hashing
   URL:=https://github.com/pyca/bcrypt/
 endef
 
 define Package/python-bcrypt
 $(call Package/bcrypt/Default)
-  TITLE:=BCrypt
-  DEPENDS+=+PACKAGE_python-bcrypt:python +PACKAGE_python-bcrypt:python-cffi \
-          +PACKAGE_python-bcrypt:python-six
+  DEPENDS:= \
+       +PACKAGE_python-bcrypt:python \
+       +PACKAGE_python-bcrypt:python-cffi \
+       +PACKAGE_python-bcrypt:python-six
   VARIANT:=python
 endef
 
 define Package/python3-bcrypt
 $(call Package/bcrypt/Default)
-  TITLE:=BCrypt
-  DEPENDS+=+PACKAGE_python3-bcrypt:python3 +PACKAGE_python3-bcrypt:python3-cffi \
-          +PACKAGE_python3-bcrypt:python3-six
+  DEPENDS:= \
+       +PACKAGE_python3-bcrypt:python3 \
+       +PACKAGE_python3-bcrypt:python3-cffi \
+       +PACKAGE_python3-bcrypt:python3-six
   VARIANT:=python3
 endef
 
 define Package/python-bcrypt/description
-Good password hashing for your software and your servers
+  Good password hashing for your software and your servers.
 endef
 
 define Package/python3-bcrypt/description
@@ -60,9 +65,9 @@ $(call Package/python-bcrypt/description)
 endef
 
 $(eval $(call PyPackage,python-bcrypt))
-$(eval $(call Py3Package,python3-bcrypt))
-
 $(eval $(call BuildPackage,python-bcrypt))
 $(eval $(call BuildPackage,python-bcrypt-src))
+
+$(eval $(call Py3Package,python3-bcrypt))
 $(eval $(call BuildPackage,python3-bcrypt))
 $(eval $(call BuildPackage,python3-bcrypt-src))
index 021357895d9833da675629ea7bcdb516b031226d..c6c469178321f40cf7ec1efc79b1c4473aa055c4 100644 (file)
@@ -5,19 +5,18 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=click
-PKG_VERSION:=6.7
+PKG_VERSION:=7.0
 PKG_RELEASE:=1
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/95/d9/c3336b6b5711c3ab9d1d3a80f1a3e2afeb9d8c02a7166462f6cc96570897/
-PKG_HASH:=f15516df478d5a56180fbf80e68f206010e6d160fc39fa508b65e035fd75130b
-PKG_BUILD_DEPENDS:=python python3
+PKG_SOURCE:=Click-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/c/click
+PKG_HASH:=5b94b49521f6456670fdb30cd82a4eca9412788a93fa6dd6df72c94d5a8ff2d7
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/Click-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
 PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=LICENSE
-PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
-
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-$(PKG_NAME)-$(PKG_VERSION)
-PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
 
 include $(INCLUDE_DIR)/package.mk
 include ../python3-package.mk
@@ -26,15 +25,16 @@ define Package/python3-click
   SECTION:=lang
   CATEGORY:=Languages
   SUBMENU:=Python
-  URL:=http://github.com/mitsuhiko/click
-  TITLE:=python3-click
+  TITLE:=Click
+  URL:=https://palletsprojects.com/p/click/
   DEPENDS:=+python3-light
   VARIANT:=python3
 endef
 
 define Package/python3-click/description
-A simple wrapper around optparse for powerful command line utilities.
+  Composable command line interface toolkit
 endef
 
 $(eval $(call Py3Package,python3-click))
 $(eval $(call BuildPackage,python3-click))
+$(eval $(call BuildPackage,python3-click-src))
index 0f61551f9ce3c59faab86edf6f530bbbd6645bfc..8e81051e1cc7100a242998d296c7484072e1b802 100644 (file)
@@ -9,39 +9,64 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=django-appconf
 PKG_VERSION:=1.0.2
-PKG_RELEASE:=2
-PKG_LICENSE:=BSD-3-Clause
+PKG_RELEASE:=4
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/34/b9/d07195652ab494b026f7cb0341dd6e5f2e6e39be177abe05e2cec8bd46e4/
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/d/$(PKG_NAME)/
 PKG_HASH:=6a4d9aea683b4c224d97ab8ee11ad2d29a37072c0c6c509896dd9857466fb261
+
 PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-$(PKG_NAME)-$(PKG_VERSION)
 
 include $(INCLUDE_DIR)/package.mk
 include ../python-package.mk
+include ../python3-package.mk
 
-define Package/django-appconf
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+define Package/$(PKG_NAME)/Default
   SUBMENU:=Python
   SECTION:=lang
   CATEGORY:=Languages
-  TITLE:=A helper class for handling configuration defaults of packaged apps gracefully.
-  URL:=http://django-appconf.readthedocs.org/
-  DEPENDS:=+python +django
+  TITLE:=Helper class for handling config defaults
+  URL:=https://$(PKG_NAME).readthedocs.io
+endef
+
+define Package/python-$(PKG_NAME)
+$(call Package/$(PKG_NAME)/Default)
+  DEPENDS:= \
+       +PACKAGE_python-$(PKG_NAME):python \
+       python-django
+  VARIANT:=python
+  MDEPENDS:=python-django
 endef
 
-define Package/django-appconf/description
-  A helper class for handling configuration defaults of packaged apps gracefully.
+define Package/python-$(PKG_NAME)/description
+  A helper class for handling configuration defaults of packaged apps gracefully
 endef
 
-define Build/Compile
-       $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
+define Package/python3-$(PKG_NAME)
+$(call Package/$(PKG_NAME)/Default)
+  DEPENDS:= \
+       +PACKAGE_python3-$(PKG_NAME):python3 \
+       python3-django
+  VARIANT:=python3
+  MDEPENDS:=python3-django
 endef
 
-define Package/django-appconf/install
-       $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
-       $(CP) \
-           $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
-           $(1)$(PYTHON_PKG_DIR)
+define Package/python3-$(PKG_NAME)/description
+$(call define Package/python-$(PKG_NAME)/description)
+.
+(Variant for Python3)
 endef
 
-$(eval $(call BuildPackage,django-appconf))
+$(eval $(call PyPackage,python-$(PKG_NAME)))
+$(eval $(call BuildPackage,python-$(PKG_NAME)))
+$(eval $(call BuildPackage,python-$(PKG_NAME)-src))
+
+$(eval $(call Py3Package,python3-$(PKG_NAME)))
+$(eval $(call BuildPackage,python3-$(PKG_NAME)))
+$(eval $(call BuildPackage,python3-$(PKG_NAME)-src))
index 52018abd75a368ca749ed404770956e4324da6ac..6638bae69a59160a54e7c0de490678b7842570c2 100644 (file)
@@ -9,38 +9,71 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=django-compressor
 PKG_VERSION:=2.2
-PKG_RELEASE:=3
+PKG_RELEASE:=5
+
+PKG_SOURCE:=django_compressor-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/d/$(PKG_NAME)/
+PKG_HASH:=9616570e5b08e92fa9eadc7a1b1b49639cce07ef392fc27c74230ab08075b30f
 
 PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
 
-PKG_SOURCE:=django_compressor-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/82/76/1355459f90714517c52f264aa7245b52e59a273ec16e8f8d505fa6c342f8/
-PKG_HASH:=9616570e5b08e92fa9eadc7a1b1b49639cce07ef392fc27c74230ab08075b30f
-
-PKG_BUILD_DIR:=$(BUILD_DIR)/django_compressor-$(PKG_VERSION)/
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-$(PKG_NAME)-$(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/django-compressor
+define Package/$(PKG_NAME)/Default
   SUBMENU:=Python
   SECTION:=lang
   CATEGORY:=Languages
   TITLE:=Compress CSS/JS into single cached files
-  URL:=http://django-compressor.readthedocs.org/
-  DEPENDS:=+python +django +django-appconf +python-rcssmin
+  URL:=https://$(PKG_NAME).readthedocs.io
+endef
+
+define Package/python-$(PKG_NAME)
+$(call Package/$(PKG_NAME)/Default)
+  DEPENDS:= \
+       +PACKAGE_python-$(PKG_NAME):python \
+       python-django \
+       +PACKAGE_python-$(PKG_NAME):python-django-appconf \
+       +PACKAGE_python-$(PKG_NAME):python-rcssmin
   VARIANT:=python
+  MDEPENDS:=python-django
 endef
 
-define Package/django-compressor/description
+define Package/python-$(PKG_NAME)/description
   Compresses linked and inline JavaScript or CSS into single cached files.
   Note that the JavaScript filter is not being installed as a dependency.
   You'll need to build the rjsmin module (it is not par of the openwrt standard
   feeds) to use JavaScript functionality.
 endef
 
-$(eval $(call PyPackage,django-compressor))
-$(eval $(call BuildPackage,django-compressor))
-$(eval $(call BuildPackage,django-compressor-src))
+define Package/python3-$(PKG_NAME)
+$(call Package/$(PKG_NAME)/Default)
+  DEPENDS:= \
+       +PACKAGE_python3-$(PKG_NAME):python3 \
+       python3-django \
+       +PACKAGE_python3-$(PKG_NAME):python3-django-appconf \
+       +PACKAGE_python3-$(PKG_NAME):python3-rcssmin
+  VARIANT:=python3
+  MDEPENDS:=python3-django
+endef
+
+define Package/python3-$(PKG_NAME)/description
+$(call define Package/python-$(PKG_NAME)/description)
+.
+(Variant for Python3)
+endef
+
+$(eval $(call PyPackage,python-$(PKG_NAME)))
+$(eval $(call BuildPackage,python-$(PKG_NAME)))
+$(eval $(call BuildPackage,python-$(PKG_NAME)-src))
+
+$(eval $(call Py3Package,python3-$(PKG_NAME)))
+$(eval $(call BuildPackage,python3-$(PKG_NAME)))
+$(eval $(call BuildPackage,python3-$(PKG_NAME)-src))
index cefb9167e40ff90beac472bd33a6265da4edc4eb..749c0aae1b2d6d15df0129dd060ffdf47e481752 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=django-constance
 PKG_VERSION:=2.3.1
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 PKG_LICENSE:=BSD-3-Clause
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
@@ -17,31 +17,51 @@ PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/d/django-constanc
 PKG_HASH:=a49735063b2c30015d2e52a90609ea9798da722ed070f091de51714758a5d018
 PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
 
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-django-constance-$(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/django-constance
+define Package/python-django-constance/Default
   SUBMENU:=Python
   SECTION:=lang
   CATEGORY:=Languages
   TITLE:=Django live settings with pluggable backends, including Redis.
   URL:=https://github.com/jazzband/django-constance
-  DEPENDS:=+python +django
 endef
 
-define Package/django-constance/description
+define Package/python-django-constance
+$(call Package/python-django-constance/Default)
+  DEPENDS:= \
+       +PACKAGE_python-django-constance:python \
+       python-django
+  VARIANT:=python
+  MDEPENDS:=python-django
+endef
+
+define Package/python-django-constance/description
   Django live settings with pluggable backends, including Redis.
 endef
 
-define Build/Compile
-       $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
+define Package/python3-django-constance
+$(call Package/python-django-constance/Default)
+  DEPENDS:= \
+       +PACKAGE_python3-django-constance:python3 \
+       python3-django
+  VARIANT:=python3
+  MDEPENDS:=python3-django
 endef
 
-define Package/django-constance/install
-       $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
-       $(CP) \
-           $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
-           $(1)$(PYTHON_PKG_DIR)
+define Package/python3-django-constance/description
+$(call define Package/python-django-constance/description)
+.
+(Variant for Python3)
 endef
 
-$(eval $(call BuildPackage,django-constance))
+$(eval $(call PyPackage,python-django-constance))
+$(eval $(call BuildPackage,python-django-constance))
+$(eval $(call Py3Package,python3-django-constance))
+$(eval $(call BuildPackage,python3-django-constance))
index e6c4db533ef2a01d9ece68ada9306fe9d2d883bd..445cd344623ae274832d54e66bc1449d47c0eba8 100644 (file)
@@ -7,34 +7,65 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=django-formtools
 PKG_VERSION:=2.1
-PKG_RELEASE:=3
+PKG_RELEASE:=5
 
-PKG_MAINTAINER:=Eneas U de Queiroz <cote2004-github@yahoo.com>
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/d/$(PKG_NAME)/
+PKG_HASH:=7703793f1675aa6e871f9fed147e8563816d7a5b9affdc5e3459899596217f7c
+
+PKG_MAINTAINER:=Eneas U de Queiroz <cotequeiroz@gmail.com>
 PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=LICENSE
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/d/${PKG_NAME}
-PKG_HASH:=7703793f1675aa6e871f9fed147e8563816d7a5b9affdc5e3459899596217f7c
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-$(PKG_NAME)-$(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/django-formtools
+define Package/$(PKG_NAME)/Default
   SUBMENU:=Python
   SECTION:=lang
   CATEGORY:=Languages
   TITLE:=High-level abstractions for Django forms
-  URL:=https://django-formtools.readthedocs.io/en/latest/
-  DEPENDS:=+python +django
+  URL:=https://$(PKG_NAME).readthedocs.io
+endef
+
+define Package/python-$(PKG_NAME)
+$(call Package/$(PKG_NAME)/Default)
+  DEPENDS:= \
+       +PACKAGE_python-$(PKG_NAME):python \
+       python-django
   VARIANT:=python
+  MDEPENDS:=python-django
 endef
 
-define Package/django-formtools/description
+define Package/python-$(PKG_NAME)/description
   Django "formtools" is a set of high-level abstractions for Django forms.
   Currently for form previews and multi-step forms.
 endef
 
-$(eval $(call PyPackage,django-formtools))
-$(eval $(call BuildPackage,django-formtools))
-$(eval $(call BuildPackage,django-formtools-src))
+define Package/python3-$(PKG_NAME)
+$(call Package/$(PKG_NAME)/Default)
+  DEPENDS:= \
+       +PACKAGE_python3-$(PKG_NAME):python3 \
+       python3-django
+  VARIANT:=python3
+  MDEPENDS:=python3-django
+endef
+
+define Package/python3-$(PKG_NAME)/description
+$(call define Package/python-$(PKG_NAME)/description)
+.
+(Variant for Python3)
+endef
+
+$(eval $(call PyPackage,python-$(PKG_NAME)))
+$(eval $(call BuildPackage,python-$(PKG_NAME)))
+$(eval $(call BuildPackage,python-$(PKG_NAME)-src))
+
+$(eval $(call Py3Package,python3-$(PKG_NAME)))
+$(eval $(call BuildPackage,python3-$(PKG_NAME)))
+$(eval $(call BuildPackage,python3-$(PKG_NAME)-src))
index cd0117adfcf566a6859840372f2c6f1e3ad1806d..9e95d3a98cae9915a275bdb0d832580b70169e71 100644 (file)
@@ -9,39 +9,64 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=django-jsonfield
 PKG_VERSION:=1.0.1
-PKG_RELEASE:=2
-PKG_LICENSE:=BSD-3-Clause
+PKG_RELEASE:=4
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/e4/b2/a079f0a2218e0eb7892edbf404e0bbfbb281a6bbf06966b775f5142ed159/
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/d/$(PKG_NAME)/
 PKG_HASH:=6c0afd5554739365b55d86e285cf966cc3a45682fff963463364ea1f6511ca3e
+
 PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-$(PKG_NAME)-$(PKG_VERSION)
 
 include $(INCLUDE_DIR)/package.mk
 include ../python-package.mk
+include ../python3-package.mk
 
-define Package/django-jsonfield
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+define Package/$(PKG_NAME)/Default
   SUBMENU:=Python
   SECTION:=lang
   CATEGORY:=Languages
   TITLE:=JSONField for django models
-  URL:=https://github.com/bradjasper/django-jsonfield
-  DEPENDS:=+python +django
+  URL:=https://github.com/adamchainz/django-jsonfield
+endef
+
+define Package/python-$(PKG_NAME)
+$(call Package/$(PKG_NAME)/Default)
+  DEPENDS:= \
+       +PACKAGE_python-$(PKG_NAME):python \
+       python-django
+  VARIANT:=python
+  MDEPENDS:=python-django
 endef
 
-define Package/django-jsonfield/description
+define Package/python-$(PKG_NAME)/description
   JSONField for django models
 endef
 
-define Build/Compile
-       $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
+define Package/python3-$(PKG_NAME)
+$(call Package/$(PKG_NAME)/Default)
+  DEPENDS:= \
+       +PACKAGE_python3-$(PKG_NAME):python3 \
+       python3-django
+  VARIANT:=python3
+  MDEPENDS:=python3-django
 endef
 
-define Package/django-jsonfield/install
-       $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
-       $(CP) \
-           $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
-           $(1)$(PYTHON_PKG_DIR)
+define Package/python3-$(PKG_NAME)/description
+$(call define Package/python-$(PKG_NAME)/description)
+.
+(Variant for Python3)
 endef
 
-$(eval $(call BuildPackage,django-jsonfield))
+$(eval $(call PyPackage,python-$(PKG_NAME)))
+$(eval $(call BuildPackage,python-$(PKG_NAME)))
+$(eval $(call BuildPackage,python-$(PKG_NAME)-src))
+
+$(eval $(call Py3Package,python3-$(PKG_NAME)))
+$(eval $(call BuildPackage,python3-$(PKG_NAME)))
+$(eval $(call BuildPackage,python3-$(PKG_NAME)-src))
index c9517201fabf9503256ecf49d029a2dcbac34301..9a7331fc494b48da8336a7d851539069ef74a977 100644 (file)
@@ -9,39 +9,64 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=django-picklefield
 PKG_VERSION:=1.1.0
-PKG_RELEASE:=2
-PKG_LICENSE:=MIT
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/d/django-picklefield
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/d/$(PKG_NAME)/
 PKG_HASH:=ce7fee5c6558fe5dc8924993d994ccde75bb75b91cd82787cbd4c92b95a69f9c
+
 PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-$(PKG_NAME)-$(PKG_VERSION)
 
 include $(INCLUDE_DIR)/package.mk
 include ../python-package.mk
+include ../python3-package.mk
 
-define Package/django-picklefield
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+define Package/$(PKG_NAME)/Default
   SUBMENU:=Python
   SECTION:=lang
   CATEGORY:=Languages
   TITLE:=Pickled object field for Django
-  URL:=https://github.com/gintas/django-picklefield
-  DEPENDS:=+python +django
+  URL:=https://github.com/gintas/django-picklefield/
+endef
+
+define Package/python-$(PKG_NAME)
+$(call Package/$(PKG_NAME)/Default)
+  DEPENDS:= \
+       +PACKAGE_python-$(PKG_NAME):python \
+       python-django
+  VARIANT:=python
+  MDEPENDS:=python-django
 endef
 
-define Package/django-picklefield/description
+define Package/python-$(PKG_NAME)/description
   Pickled object field for Django
 endef
 
-define Build/Compile
-       $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
+define Package/python3-$(PKG_NAME)
+$(call Package/$(PKG_NAME)/Default)
+  DEPENDS:= \
+       +PACKAGE_python3-$(PKG_NAME):python3 \
+       python3-django
+  VARIANT:=python3
+  MDEPENDS:=python3-django
 endef
 
-define Package/django-picklefield/install
-       $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
-       $(CP) \
-           $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
-           $(1)$(PYTHON_PKG_DIR)
+define Package/python3-$(PKG_NAME)/description
+$(call define Package/python-$(PKG_NAME)/description)
+.
+(Variant for Python3)
 endef
 
-$(eval $(call BuildPackage,django-picklefield))
+$(eval $(call PyPackage,python-$(PKG_NAME)))
+$(eval $(call BuildPackage,python-$(PKG_NAME)))
+$(eval $(call BuildPackage,python-$(PKG_NAME)-src))
+
+$(eval $(call Py3Package,python3-$(PKG_NAME)))
+$(eval $(call BuildPackage,python3-$(PKG_NAME)))
+$(eval $(call BuildPackage,python3-$(PKG_NAME)-src))
index 8d94e9e977826f4a4ba1f662ed1473b75debdc09..cd8ea3dbec9bbf130f95521f2d9feb71b5b253ba 100644 (file)
@@ -9,40 +9,67 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=django-postoffice
 PKG_VERSION:=3.1.0
-PKG_RELEASE:=2
-PKG_LICENSE:=MIT
+PKG_RELEASE:=4
 
 PKG_SOURCE:=django-post_office-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/d/django-post_office
 PKG_HASH:=827937a944fe47cea393853069cd9315d080298c8ddb0faf787955d6aa51a030
-PKG_BUILD_DIR:=$(BUILD_DIR)/django-post_office-$(PKG_VERSION)
+
 PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE.txt
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-$(PKG_NAME)-$(PKG_VERSION)
 
 include $(INCLUDE_DIR)/package.mk
 include ../python-package.mk
+include ../python3-package.mk
 
-define Package/django-postoffice
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+define Package/$(PKG_NAME)/Default
   SUBMENU:=Python
   SECTION:=lang
   CATEGORY:=Languages
-  TITLE:=A Django app to monitor and send mail asynchronously, complete with template support.
-  URL:=https://github.com/ui/django-postoffice
-  DEPENDS:=+python +django +django-jsonfield
+  TITLE:=A Django app to monitor and send mail asynchronously
+  URL:=https://github.com/ui/django-post_office
+endef
+
+define Package/python-$(PKG_NAME)
+$(call Package/$(PKG_NAME)/Default)
+  DEPENDS:= \
+       +PACKAGE_python-$(PKG_NAME):python \
+       python-django \
+       +PACKAGE_python-$(PKG_NAME):python-django-jsonfield
+  VARIANT:=python
+  MDEPENDS:=python-django
 endef
 
-define Package/django-postoffice/description
-  A Django app to monitor and send mail asynchronously, complete with template support.
+define Package/python-$(PKG_NAME)/description
+  A Django app to monitor and send mail asynchronously, complete with template
+  support
 endef
 
-define Build/Compile
-       $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
+define Package/python3-$(PKG_NAME)
+$(call Package/$(PKG_NAME)/Default)
+  DEPENDS:= \
+       +PACKAGE_python3-$(PKG_NAME):python3 \
+       python3-django \
+       +PACKAGE_python3-$(PKG_NAME):python3-django-jsonfield
+  VARIANT:=python3
+  MDEPENDS:=python3-django
 endef
 
-define Package/django-postoffice/install
-       $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
-       $(CP) \
-           $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
-           $(1)$(PYTHON_PKG_DIR)
+define Package/python3-$(PKG_NAME)/description
+$(call define Package/python-$(PKG_NAME)/description)
+.
+(Variant for Python3)
 endef
 
-$(eval $(call BuildPackage,django-postoffice))
+$(eval $(call PyPackage,python-$(PKG_NAME)))
+$(eval $(call BuildPackage,python-$(PKG_NAME)))
+$(eval $(call BuildPackage,python-$(PKG_NAME)-src))
+
+$(eval $(call Py3Package,python3-$(PKG_NAME)))
+$(eval $(call BuildPackage,python3-$(PKG_NAME)))
+$(eval $(call BuildPackage,python3-$(PKG_NAME)-src))
index 5733d311b95d804d566b299b23dfbf4250b9178b..923f5c75b2d4ee6edfac1b69d003d34db7be1dea 100644 (file)
@@ -7,32 +7,64 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=django-ranged-response
 PKG_VERSION:=0.2.0
-PKG_RELEASE:=3
-
-PKG_MAINTAINER:=Eneas U de Queiroz <cote2004-github@yahoo.com>
-PKG_LICENSE:=MIT
+PKG_RELEASE:=5
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/d/${PKG_NAME}
 PKG_HASH:=f71fff352a37316b9bead717fc76e4ddd6c9b99c4680cdf4783b9755af1cf985
 
+PKG_MAINTAINER:=Eneas U de Queiroz <cotequeiroz@gmail.com>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-$(PKG_NAME)-$(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/django-ranged-response
+define Package/$(PKG_NAME)/Default
   SUBMENU:=Python
   SECTION:=lang
   CATEGORY:=Languages
   TITLE:=Add Content-Range: to FileResponse
   URL:=https://github.com/wearespindle/django-ranged-fileresponse
-  DEPENDS:=+python +django
+endef
+
+define Package/python-$(PKG_NAME)
+$(call Package/$(PKG_NAME)/Default)
+  DEPENDS:= \
+       +PACKAGE_python-$(PKG_NAME):python \
+       python-django
   VARIANT:=python
+  MDEPENDS:=python-django
 endef
 
-define Package/django-ranged-response/description
+define Package/python-$(PKG_NAME)/description
   Modified Django FileResponse that adds Content-Range headers.
 endef
 
-$(eval $(call PyPackage,django-ranged-response))
-$(eval $(call BuildPackage,django-ranged-response))
-$(eval $(call BuildPackage,django-ranged-response-src))
+define Package/python3-$(PKG_NAME)
+$(call Package/$(PKG_NAME)/Default)
+  DEPENDS:= \
+       +PACKAGE_python3-$(PKG_NAME):python3 \
+       python3-django
+  VARIANT:=python3
+  MDEPENDS:=python3-django
+endef
+
+define Package/python3-$(PKG_NAME)/description
+$(call define Package/python-$(PKG_NAME)/description)
+.
+(Variant for Python3)
+endef
+
+$(eval $(call PyPackage,python-$(PKG_NAME)))
+$(eval $(call BuildPackage,python-$(PKG_NAME)))
+$(eval $(call BuildPackage,python-$(PKG_NAME)-src))
+
+$(eval $(call Py3Package,python3-$(PKG_NAME)))
+$(eval $(call BuildPackage,python3-$(PKG_NAME)))
+$(eval $(call BuildPackage,python3-$(PKG_NAME)-src))
index 1fd3281a01b19c97ce2a3ea12a30cb8c51f9c401..45c8d7e1ffe2f8d488f0ed9861cddf063ac260bf 100644 (file)
@@ -9,40 +9,64 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=django-restframework
 PKG_VERSION:=3.9.0
-PKG_RELEASE:=2
-PKG_LICENSE:=BSD-3-Clause
+PKG_RELEASE:=4
 
 PKG_SOURCE:=djangorestframework-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/d/djangorestframework
 PKG_HASH:=607865b0bb1598b153793892101d881466bd5a991de12bd6229abb18b1c86136
-PKG_BUILD_DIR:=$(BUILD_DIR)/djangorestframework-$(PKG_VERSION)
+
 PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=LICENSE.md
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-$(PKG_NAME)-$(PKG_VERSION)
 
 include $(INCLUDE_DIR)/package.mk
 include ../python-package.mk
+include ../python3-package.mk
 
-define Package/django-restframework
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+define Package/$(PKG_NAME)/Default
   SUBMENU:=Python
   SECTION:=lang
   CATEGORY:=Languages
   TITLE:=Web APIs for Django, made easy.
   URL:=https://www.django-rest-framework.org
-  DEPENDS:=+python +django
 endef
 
-define Package/django-restframework/description
+define Package/python-$(PKG_NAME)
+$(call Package/$(PKG_NAME)/Default)
+  DEPENDS:= \
+       +PACKAGE_python-$(PKG_NAME):python \
+       python-django
+  VARIANT:=python
+  MDEPENDS:=python-django
+endef
+
+define Package/python-$(PKG_NAME)/description
   Web APIs for Django, made easy.
 endef
 
-define Build/Compile
-       $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
+define Package/python3-$(PKG_NAME)
+$(call Package/$(PKG_NAME)/Default)
+  DEPENDS:= \
+       +PACKAGE_python3-$(PKG_NAME):python3 \
+       python3-django
+  VARIANT:=python3
+  MDEPENDS:=python3-django
 endef
 
-define Package/django-restframework/install
-       $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
-       $(CP) \
-           $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
-           $(1)$(PYTHON_PKG_DIR)
+define Package/python3-$(PKG_NAME)/description
+$(call define Package/python-$(PKG_NAME)/description)
+.
+(Variant for Python3)
 endef
 
-$(eval $(call BuildPackage,django-restframework))
+$(eval $(call PyPackage,python-$(PKG_NAME)))
+$(eval $(call BuildPackage,python-$(PKG_NAME)))
+$(eval $(call BuildPackage,python-$(PKG_NAME)-src))
+
+$(eval $(call Py3Package,python3-$(PKG_NAME)))
+$(eval $(call BuildPackage,python3-$(PKG_NAME)))
+$(eval $(call BuildPackage,python3-$(PKG_NAME)-src))
index 449ad8749fc9580a839db1b872bd6e634cab230e..21f81594d246c03c9ae0217b3550f4b829b8cfd6 100644 (file)
@@ -8,35 +8,72 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=django-simple-captcha
-PKG_VERSION:=0.5.11
-PKG_RELEASE:=2
+PKG_VERSION:=0.5.12
+PKG_RELEASE:=1
 
-PKG_MAINTAINER:=Eneas U de Queiroz <cote2004-github@yahoo.com>
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/mbi/django-simple-captcha/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=89db73a3883573ad5e22c511948a5500491f9848363174d835a2364750c81a77
+
+PKG_MAINTAINER:=Eneas U de Queiroz <cotequeiroz@gmail.com>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).zip
-PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/d/$(PKG_NAME)
-PKG_HASH:=e14e5c4b207be3dffb200309e7ac7a48de1a2b3293f09eefedd9ab317c4d9a7f
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-$(PKG_NAME)-$(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/django-simple-captcha
+define Package/$(PKG_NAME)/Default
   SUBMENU:=Python
   SECTION:=lang
   CATEGORY:=Languages
   TITLE:=Simple Django captcha application
   URL:=https://github.com/mbi/django-simple-captcha
-  DEPENDS:=+python +python-six +django +pillow +django-ranged-response
+endef
+
+define Package/python-$(PKG_NAME)
+$(call Package/$(PKG_NAME)/Default)
+  DEPENDS:= \
+       +PACKAGE_python-$(PKG_NAME):python \
+       +PACKAGE_python-$(PKG_NAME):python-six \
+       python-django \
+       +PACKAGE_python-$(PKG_NAME):python-pillow \
+       +PACKAGE_python-$(PKG_NAME):python-django-ranged-response
   VARIANT:=python
+  MDEPENDS:=python-django
 endef
 
-define Package/django-simple-captcha/description
+define Package/python-$(PKG_NAME)/description
   Django Simple Captcha is an extremely simple, yet highly customizable Django
   application to add captcha images to any Django form.
 endef
 
-$(eval $(call PyPackage,django-simple-captcha))
-$(eval $(call BuildPackage,django-simple-captcha))
-$(eval $(call BuildPackage,django-simple-captcha-src))
+define Package/python3-$(PKG_NAME)
+$(call Package/$(PKG_NAME)/Default)
+  DEPENDS:= \
+       +PACKAGE_python3-$(PKG_NAME):python3 \
+       +PACKAGE_python3-$(PKG_NAME):python3-six \
+       python3-django \
+       +PACKAGE_python3-$(PKG_NAME):python3-pillow \
+       +PACKAGE_python3-$(PKG_NAME):python3-django-ranged-response
+  VARIANT:=python3
+  MDEPENDS:=python3-django
+endef
+
+define Package/python3-$(PKG_NAME)/description
+$(call define Package/python-$(PKG_NAME)/description)
+.
+(Variant for Python3)
+endef
+
+$(eval $(call PyPackage,python-$(PKG_NAME)))
+$(eval $(call BuildPackage,python-$(PKG_NAME)))
+$(eval $(call BuildPackage,python-$(PKG_NAME)-src))
+
+$(eval $(call Py3Package,python3-$(PKG_NAME)))
+$(eval $(call BuildPackage,python3-$(PKG_NAME)))
+$(eval $(call BuildPackage,python3-$(PKG_NAME)-src))
index 1c4c918916f6cc8bd8be85748014e2d3d7242c4d..37f0735348146b36b6f9b407bf67496d7b44e0fa 100644 (file)
@@ -9,39 +9,64 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=django-statici18n
 PKG_VERSION:=1.8.2
-PKG_RELEASE:=2
-PKG_LICENSE:=BSD-3-Clause
+PKG_RELEASE:=4
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/d/django-statici18n
 PKG_HASH:=ba9eeb3c4517027922645999359f8335fbb9fea04c457123cfbd6b4a36cbeda4
+
 PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-$(PKG_NAME)-$(PKG_VERSION)
 
 include $(INCLUDE_DIR)/package.mk
 include ../python-package.mk
+include ../python3-package.mk
 
-define Package/django-statici18n
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+define Package/$(PKG_NAME)/Default
   SUBMENU:=Python
   SECTION:=lang
   CATEGORY:=Languages
-  TITLE:=A Django app that provides helper for generating JavaScript catalog to static files.
-  URL:=https://django-statici18n.readthedocs.org/
-  DEPENDS:=+python +django
+  TITLE:=Helper for generating JavaScript catalog to static files
+  URL:=https://$(PKG_NAME).readthedocs.io
+endef
+
+define Package/python-$(PKG_NAME)
+$(call Package/$(PKG_NAME)/Default)
+  DEPENDS:= \
+       +PACKAGE_python-$(PKG_NAME):python \
+       python-django
+  VARIANT:=python
+  MDEPENDS:=python-django
 endef
 
-define Package/django-statici18n/description
+define Package/python-$(PKG_NAME)/description
   A Django app that provides helper for generating JavaScript catalog to static files.
 endef
 
-define Build/Compile
-       $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
+define Package/python3-$(PKG_NAME)
+$(call Package/$(PKG_NAME)/Default)
+  DEPENDS:= \
+       +PACKAGE_python3-$(PKG_NAME):python3 \
+       python3-django
+  VARIANT:=python3
+  MDEPENDS:=python3-django
 endef
 
-define Package/django-statici18n/install
-       $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
-       $(CP) \
-           $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
-           $(1)$(PYTHON_PKG_DIR)
+define Package/python3-$(PKG_NAME)/description
+$(call define Package/python-$(PKG_NAME)/description)
+.
+(Variant for Python3)
 endef
 
-$(eval $(call BuildPackage,django-statici18n))
+$(eval $(call PyPackage,python-$(PKG_NAME)))
+$(eval $(call BuildPackage,python-$(PKG_NAME)))
+$(eval $(call BuildPackage,python-$(PKG_NAME)-src))
+
+$(eval $(call Py3Package,python3-$(PKG_NAME)))
+$(eval $(call BuildPackage,python3-$(PKG_NAME)))
+$(eval $(call BuildPackage,python3-$(PKG_NAME)-src))
index 6b7df37a4e0438719a3e745577dc0ee4caa44622..72ed867999f478dec4694a9dfdb7cce06e0cd53d 100644 (file)
@@ -7,33 +7,64 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=django-webpack-loader
 PKG_VERSION:=0.6.0
-PKG_RELEASE:=3
-
-PKG_MAINTAINER:=Eneas U de Queiroz <cote2004-github@yahoo.com>
-PKG_LICENSE:=MIT
-PKG_LICENSE_FILES:=LICENSE
+PKG_RELEASE:=5
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/d/${PKG_NAME}
 PKG_HASH:=60bab6b9a037a5346fad12d2a70a6bc046afb33154cf75ed640b93d3ebd5f520
 
+PKG_MAINTAINER:=Eneas U de Queiroz <cotequeiroz@gmail.com>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-$(PKG_NAME)-$(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/django-webpack-loader
+define Package/$(PKG_NAME)/Default
   SUBMENU:=Python
   SECTION:=lang
   CATEGORY:=Languages
   TITLE:=Transparently use webpack in django
   URL:=https://github.com/owais/django-webpack-loader
-  DEPENDS:=+python +django
+endef
+
+define Package/python-$(PKG_NAME)
+$(call Package/$(PKG_NAME)/Default)
+  DEPENDS:= \
+       +PACKAGE_python-$(PKG_NAME):python \
+       python-django
   VARIANT:=python
+  MDEPENDS:=python-django
 endef
 
-define Package/django-webpack-loader/description
+define Package/python-$(PKG_NAME)/description
   Use webpack to generate your static bundles without django’s staticfiles or opaque wrappers.
 endef
 
-$(eval $(call PyPackage,django-webpack-loader))
-$(eval $(call BuildPackage,django-webpack-loader))
-$(eval $(call BuildPackage,django-webpack-loader-src))
+define Package/python3-$(PKG_NAME)
+$(call Package/$(PKG_NAME)/Default)
+  DEPENDS:= \
+       +PACKAGE_python3-$(PKG_NAME):python3 \
+       python3-django
+  VARIANT:=python3
+  MDEPENDS:=python3-django
+endef
+
+define Package/python3-$(PKG_NAME)/description
+$(call define Package/python-$(PKG_NAME)/description)
+.
+(Variant for Python3)
+endef
+
+$(eval $(call PyPackage,python-$(PKG_NAME)))
+$(eval $(call BuildPackage,python-$(PKG_NAME)))
+$(eval $(call BuildPackage,python-$(PKG_NAME)-src))
+
+$(eval $(call Py3Package,python3-$(PKG_NAME)))
+$(eval $(call BuildPackage,python3-$(PKG_NAME)))
+$(eval $(call BuildPackage,python3-$(PKG_NAME)-src))
index 23a07585ab568cfe1b5766020c70495576a1eeef..175a3a5fa0c424895e0a91a30744273090c8276d 100644 (file)
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=django
-PKG_VERSION:=1.11.17
-PKG_RELEASE=3
+PKG_VERSION:=1.11.24
+PKG_RELEASE:=1
 
 PKG_SOURCE:=Django-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/D/Django
-PKG_HASH:=a787ee66f4b4cf8ed753661cabcec603989677fa3a107fcb7f15511a44bdb483
-PKG_BUILD_DIR=$(BUILD_DIR)/Django-$(PKG_VERSION)
+PKG_HASH:=215c27453f775b6b1add83a185f76c2e2ab711d17786a6704bd62eabd93f89e3
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-django-$(PKG_VERSION)
 
 PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
 PKG_LICENSE:=BSD-3-Clause
@@ -23,44 +23,47 @@ PKG_CPE_ID:=cpe:/a:djangoproject:django
 
 include $(INCLUDE_DIR)/package.mk
 include ../python-package.mk
+include ../python3-package.mk
 
-define Package/django
-    SUBMENU:=Python
-    SECTION:=lang
-    CATEGORY:=Languages
-    TITLE:=The web framework for perfectionists with deadlines.
-    URL:=https://www.djangoproject.com/
-    DEPENDS:=+python +python-pytz
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+define Package/django/Default
+  SUBMENU:=Python
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=The web framework for perfectionists with deadlines.
+  URL:=https://www.djangoproject.com/
+  MENU:=1
 endef
 
-define Package/django/description
-    The web framework for perfectionists with deadlines.
+define Package/python-django
+$(call Package/django/Default)
+  DEPENDS:= \
+       +PACKAGE_python-django:python \
+       +PACKAGE_python-django:python-pytz
+  VARIANT:=python
 endef
 
-define Build/Compile
-       $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
+define Package/python-django/description
+    The web framework for perfectionists with deadlines.
 endef
 
-define Build/InstallDev
-       $(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/django-admin.py \
-           $(1)/usr/bin
+define Package/python3-django
+$(call Package/django/Default)
+  DEPENDS:= \
+       +PACKAGE_python3-django:python3 \
+       +PACKAGE_python3-django:python3-pytz
+  VARIANT:=python3
 endef
 
-define Package/django/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/django-admin.py \
-           $(1)/usr/bin
-       # fix python exec path
-       sed -i 's/#!.*/#!\/usr\/bin\/python/g' $(1)/usr/bin/django-admin.py
+define Package/python3-django/description
+$(call Package/python-django/description)
+.
+(Variant for Python3)
 endef
 
-$(eval $(call BuildPackage,django))
+$(eval $(call PyPackage,python-django))
+$(eval $(call BuildPackage,python-django))
+
+$(eval $(call Py3Package,python3-django))
+$(eval $(call BuildPackage,python3-django))
index 099828dc3ed68e32a222df25271bbbc008e2da76..77ed6aadf6787665fe1e3b82e03f1c0ff9bd0f13 100644 (file)
@@ -9,39 +9,62 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=flup
 PKG_VERSION:=1.0.3
-PKG_RELEASE:=2
-PKG_LICENSE:=BSD-3-Clause
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/f/flup
 PKG_HASH:=5eb09f26eb0751f8380d8ac43d1dfb20e1d42eca0fa45ea9289fa532a79cd159
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-flup-$(PKG_VERSION)
+
 PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=PKG-INFO
 
 include $(INCLUDE_DIR)/package.mk
 include ../python-package.mk
+include ../python3-package.mk
 
-define Package/flup
-  SUBMENU:=Python
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+define Package/flup/Default
   SECTION:=lang
   CATEGORY:=Languages
+  SUBMENU:=Python
   TITLE:=Random assortment of WSGI servers
   URL:=https://www.saddi.com/software/flup/
-  DEPENDS:=+python
 endef
 
-define Package/flup/description
-  Random assortment of WSGI servers
+define Package/python-flup
+$(call Package/flup/Default)
+  DEPENDS+= \
+      +PACKAGE_python-flup:python-light \
+      +PACKAGE_python-flup:python-logging
+  VARIANT:=python
 endef
 
-define Build/Compile
-       $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
+define Package/python3-flup
+$(call Package/flup/Default)
+  DEPENDS+= \
+      +PACKAGE_python3-flup:python3-light \
+      +PACKAGE_python3-flup:python3-logging
+  VARIANT:=python3
 endef
 
-define Package/flup/install
-       $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
-       $(CP) \
-           $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
-           $(1)$(PYTHON_PKG_DIR)
+define Package/python-flup/description
+  Random assortment of WSGI servers.
 endef
 
-$(eval $(call BuildPackage,flup))
+define Package/python3-flup/description
+$(call Package/python-flup/description)
+.
+(Variant for Python3)
+endef
+
+$(eval $(call PyPackage,python-flup))
+$(eval $(call BuildPackage,python-flup))
+$(eval $(call BuildPackage,python-flup-src))
+
+$(eval $(call Py3Package,python3-flup))
+$(eval $(call BuildPackage,python3-flup))
+$(eval $(call BuildPackage,python3-flup-src))
index 2aa87f4785942861589d7cea345b776912e6e97e..4ba9f2195960c487d1a283c3e6000bf11b609ecf 100644 (file)
@@ -10,43 +10,111 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=gunicorn
 PKG_VERSION:=19.9.0
 PKG_RELEASE=2
-PKG_LICENSE:=MIT
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/g/gunicorn
 PKG_HASH:=fa2662097c66f920f53f70621c6c58ca4a3c4d3434205e608e121b5b3b71f4f3
+
 PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-$(PKG_NAME)-$(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/gunicorn/Default
+  SUBMENU:=Python
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=WSGI HTTP Server for UNIX
+  URL:=https://gunicorn.org
+endef
+
+define Package/python-gunicorn
+$(call Package/gunicorn/Default)
+  DEPENDS:=+python
+  VARIANT:=python
+endef
+
+define Package/python-gunicorn/description
+    WSGI HTTP Server for UNIX (libraries)
+endef
+
+define PyPackage/python-gunicorn/filespec
++|$(PYTHON_PKG_DIR)
+-|$(PYTHON_PKG_DIR)/gunicorn/workers/_gaiohttp.py
+endef
+
+define Package/python3-gunicorn
+$(call Package/gunicorn/Default)
+  DEPENDS:=+python3
+  VARIANT:=python3
+endef
+
+define Package/python3-gunicorn/description
+$(call define Package/python-gunicorn/description)
+.
+(Variant for Python3)
+endef
+
+# Make sure that the binaries are not installed with the libraries
+# That means adding some empty Py[3]Package/gunicorn[3]/install rules
+define PyPackage/python-gunicorn/install
+       :
+endef
+
+define Py3Package/python3-gunicorn/install
+       :
+endef
 
 define Package/gunicorn
-    SUBMENU:=Python
-    SECTION:=lang
-    CATEGORY:=Languages
-    TITLE:=WSGI HTTP Server for UNIX
-    URL:=https://gunicorn.org
-    DEPENDS:=+python +python-setuptools
+$(call Package/gunicorn/Default)
+  DEPENDS:=+python +python-pkg-resources +python-gunicorn
 endef
 
 define Package/gunicorn/description
-    WSGI HTTP Server for UNIX
+    WSGI HTTP Server for UNIX (daemon)
+endef
+
+define Package/gunicorn/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
+       $(call PyShebang,$(1)/usr/bin/*)
 endef
 
-define Build/Compile
-       $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
+define Package/gunicorn3
+$(call Package/gunicorn/Default)
+  DEPENDS:=+python3 +python3-pkg-resources +python3-gunicorn
 endef
 
-define Package/gunicorn/install
-       $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
+define Package/gunicorn3/description
+$(call define Package/gunicorn/description)
+.
+(Variant for Python3)
+endef
+
+define Package/gunicorn3/install
        $(INSTALL_DIR) $(1)/usr/bin
-       $(CP) \
-           $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
-           $(1)$(PYTHON_PKG_DIR)
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gunicorn* \
-           $(1)/usr/bin
-       # fix python exec path in scripts
-       $(SED) 's/#!.*/#!\/usr\/bin\/python/g' $(1)/usr/bin/gunicorn*
+       $(INSTALL_BIN) \
+               $(PKG_INSTALL_DIR)/usr/bin/gunicorn \
+               $(1)/usr/bin/gunicorn3
+       $(INSTALL_BIN) \
+               $(PKG_INSTALL_DIR)/usr/bin/gunicorn_paster \
+               $(1)/usr/bin/gunicorn3_paster
+       $(call Py3Shebang,$(1)/usr/bin/*)
 endef
 
+$(eval $(call PyPackage,python-gunicorn))
+$(eval $(call BuildPackage,python-gunicorn))
+$(eval $(call BuildPackage,python-gunicorn-src))
 $(eval $(call BuildPackage,gunicorn))
+
+$(eval $(call Py3Package,python3-gunicorn))
+$(eval $(call BuildPackage,python3-gunicorn))
+$(eval $(call BuildPackage,python3-gunicorn-src))
+$(eval $(call BuildPackage,gunicorn3))
index 56c1a208572406e262417202b38c4edf6e452414..de36ced6e1cb0ba55052fbc38791c86a60609c7a 100644 (file)
@@ -6,18 +6,15 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=itsdangerous
 PKG_VERSION:=1.1.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/i/itsdangerous
 PKG_HASH:=321b033d07f2a4136d3ec762eac9f16a10ccd60f53c0c91af90217ace7ba1f19
-PKG_BUILD_DEPENDS:=python python3
+
+PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
 PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=LICENSE
-PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
-
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-$(PKG_NAME)-$(PKG_VERSION)
-PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
 
 include $(INCLUDE_DIR)/package.mk
 include ../python3-package.mk
@@ -26,15 +23,17 @@ define Package/python3-itsdangerous
   SECTION:=lang
   CATEGORY:=Languages
   SUBMENU:=Python
-  URL:=http://github.com/mitsuhiko/itsdangerous
-  TITLE:=python3-itsdangerous
+  TITLE:=ItsDangerous
+  URL:=https://palletsprojects.com/p/itsdangerous/
   DEPENDS:=+python3-light
   VARIANT:=python3
 endef
 
 define Package/python3-itsdangerous/description
-Various helpers to pass trusted data to untrusted environments and back.
+  Various helpers to pass trusted data to untrusted environments and back.
 endef
 
 $(eval $(call Py3Package,python3-itsdangerous))
 $(eval $(call BuildPackage,python3-itsdangerous))
+$(eval $(call BuildPackage,python3-itsdangerous-src))
+
index 0495579a2b28ee01ba9d5b84d4bc0365e36aa953..e4ffa9864120e44223a03f5490202f144e22521c 100644 (file)
@@ -7,43 +7,74 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=pillow
-PKG_VERSION:=5.3.0
-PKG_RELEASE:=2
+PKG_VERSION:=6.1.0
+PKG_RELEASE:=1
 
 PKG_SOURCE:=Pillow-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/P/Pillow
-PKG_HASH:=2ea3517cd5779843de8a759c2349a3cd8d3893e03ab47053b66d5ec6f8bc4f93
-PKG_BUILD_DIR:=$(BUILD_DIR)/Pillow-$(PKG_VERSION)
-PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
+PKG_HASH:=0804f77cb1e9b6dbd37601cee11283bba39a8d44b9ddb053400c58e0c0d7d9de
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-Pillow-$(PKG_VERSION)
 
-PKG_LICENSE:=CUSTOM
+PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
+PKG_LICENSE:=HPND
 PKG_LICENSE_FILES:=LICENSE
+PKG_CPE_ID:=cpe:/a:python:pillow
 
 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-pillow/Default
+  SUBMENU:=Python
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=The friendly PIL fork
+  URL:=https://python-pillow.org/
+  DEPENDS:=+libfreetype +libjpeg +libtiff +zlib
+endef
 
-define Package/pillow
-    SUBMENU:=Python
-    SECTION:=lang
-    CATEGORY:=Languages
-    TITLE:=The friendly PIL fork
-    URL:=https://python-pillow.org/
-    DEPENDS:=+python +libfreetype +libjpeg +zlib +libtiff
+define Package/python-pillow
+$(call Package/python-pillow/Default)
+  DEPENDS+=+PACKAGE_python-pillow:python
+  VARIANT:=python
 endef
 
-define Package/pillow/description
-    The friendly PIL fork
+define Package/python-pillow/description
+  The friendly PIL fork
 endef
 
-define Build/Compile
-       $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
+define Package/python3-pillow
+$(call Package/python-pillow/Default)
+  DEPENDS+=+PACKAGE_python3-pillow:python3
+  VARIANT:=python3
 endef
 
-define Package/pillow/install
-       $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
-       $(CP) \
-               $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
-               $(1)$(PYTHON_PKG_DIR)/
+define Package/python3-pillow/description
+$(call Package/python-pillow/description)
+.
+(Variant for Python3)
 endef
 
-$(eval $(call BuildPackage,pillow))
+PYTHON3_PKG_SETUP_GLOBAL_ARGS += build_ext \
+       --enable-zlib \
+       --enable-jpeg \
+       --enable-tiff \
+       --enable-freetype \
+       --disable-lcms \
+       --disable-webp \
+       --disable-webpmux \
+       --disable-jpeg2000 \
+       --disable-imagequant \
+       --disable-platform-guessing
+
+PYTHON_PKG_SETUP_GLOBAL_ARGS:=$(PYTHON3_PKG_SETUP_GLOBAL_ARGS)
+
+$(eval $(call PyPackage,python-pillow))
+$(eval $(call BuildPackage,python-pillow))
+$(eval $(call BuildPackage,python-pillow-src))
+
+$(eval $(call Py3Package,python3-pillow))
+$(eval $(call BuildPackage,python3-pillow))
+$(eval $(call BuildPackage,python3-pillow-src))
diff --git a/lang/python/pillow/patches/010-fix-paths.patch b/lang/python/pillow/patches/010-fix-paths.patch
deleted file mode 100644 (file)
index ca5b2e5..0000000
+++ /dev/null
@@ -1,181 +0,0 @@
-diff --git a/setup.py b/setup.py
-index 15d81e4..ee6dba6 100755
---- a/setup.py
-+++ b/setup.py
-@@ -136,12 +136,12 @@ except (ImportError, OSError):
- NAME = 'Pillow'
- PILLOW_VERSION = get_version()
--JPEG_ROOT = None
-+JPEG_ROOT = os.path.join(os.environ['STAGING_DIR'], "/usr/lib")
- JPEG2K_ROOT = None
--ZLIB_ROOT = None
-+ZLIB_ROOT = os.path.join(os.environ['STAGING_DIR'], "/usr/lib")
- IMAGEQUANT_ROOT = None
--TIFF_ROOT = None
--FREETYPE_ROOT = None
-+TIFF_ROOT = os.path.join(os.environ['STAGING_DIR'], "/usr/lib")
-+FREETYPE_ROOT = os.path.join(os.environ['STAGING_DIR'], "/usr/lib")
- LCMS_ROOT = None
-@@ -289,159 +289,6 @@ class pil_build_ext(build_ext):
-             _add_directory(library_dirs, os.path.join(prefix, "lib"))
-             _add_directory(include_dirs, os.path.join(prefix, "include"))
--        #
--        # add platform directories
--
--        if self.disable_platform_guessing:
--            pass
--
--        elif sys.platform == "cygwin":
--            # pythonX.Y.dll.a is in the /usr/lib/pythonX.Y/config directory
--            _add_directory(library_dirs,
--                           os.path.join("/usr/lib", "python%s" %
--                                        sys.version[:3], "config"))
--
--        elif sys.platform == "darwin":
--            # attempt to make sure we pick freetype2 over other versions
--            _add_directory(include_dirs, "/sw/include/freetype2")
--            _add_directory(include_dirs, "/sw/lib/freetype2/include")
--            # fink installation directories
--            _add_directory(library_dirs, "/sw/lib")
--            _add_directory(include_dirs, "/sw/include")
--            # darwin ports installation directories
--            _add_directory(library_dirs, "/opt/local/lib")
--            _add_directory(include_dirs, "/opt/local/include")
--
--            # if Homebrew is installed, use its lib and include directories
--            try:
--                prefix = subprocess.check_output(['brew', '--prefix']).strip(
--                ).decode('latin1')
--            except Exception:
--                # Homebrew not installed
--                prefix = None
--
--            ft_prefix = None
--
--            if prefix:
--                # add Homebrew's include and lib directories
--                _add_directory(library_dirs, os.path.join(prefix, 'lib'))
--                _add_directory(include_dirs, os.path.join(prefix, 'include'))
--                ft_prefix = os.path.join(prefix, 'opt', 'freetype')
--
--            if ft_prefix and os.path.isdir(ft_prefix):
--                # freetype might not be linked into Homebrew's prefix
--                _add_directory(library_dirs, os.path.join(ft_prefix, 'lib'))
--                _add_directory(include_dirs,
--                               os.path.join(ft_prefix, 'include'))
--            else:
--                # fall back to freetype from XQuartz if
--                # Homebrew's freetype is missing
--                _add_directory(library_dirs, "/usr/X11/lib")
--                _add_directory(include_dirs, "/usr/X11/include")
--
--        elif sys.platform.startswith("linux"):
--            arch_tp = (plat.processor(), plat.architecture()[0])
--            # This should be correct on debian derivatives.
--            if os.path.exists('/etc/debian_version'):
--                # If this doesn't work, don't just silently patch
--                # downstream because it's going to break when people
--                # try to build pillow from source instead of
--                # installing from the system packages.
--                self.add_multiarch_paths()
--
--            elif arch_tp == ("x86_64", "32bit"):
--                # Special Case: 32-bit build on 64-bit machine.
--                _add_directory(library_dirs, "/usr/lib/i386-linux-gnu")
--            else:
--                libdirs = {
--                    'x86_64':  ["/lib64", "/usr/lib64",
--                                "/usr/lib/x86_64-linux-gnu"],
--                    '64bit':   ["/lib64", "/usr/lib64",
--                                "/usr/lib/x86_64-linux-gnu"],
--                    'i386':    ["/usr/lib/i386-linux-gnu"],
--                    'i686':    ["/usr/lib/i386-linux-gnu"],
--                    '32bit':   ["/usr/lib/i386-linux-gnu"],
--                    'aarch64': ["/usr/lib64", "/usr/lib/aarch64-linux-gnu"],
--                    'arm':     ["/usr/lib/arm-linux-gnueabi"],
--                    'armv71':  ["/usr/lib/arm-linux-gnueabi"],
--                    'armv7l':  ["/usr/lib"],
--                    'ppc64':   ["/usr/lib64", "/usr/lib/ppc64-linux-gnu",
--                                "/usr/lib/powerpc64-linux-gnu"],
--                    'ppc64le':   ["/usr/lib64"],
--                    'ppc':     ["/usr/lib/ppc-linux-gnu",
--                                "/usr/lib/powerpc-linux-gnu"],
--                    's390x':   ["/usr/lib64", "/usr/lib/s390x-linux-gnu"],
--                    's390':    ["/usr/lib/s390-linux-gnu"],
--                    }
--
--                for platform_ in arch_tp:
--                    dirs = libdirs.get(platform_, None)
--                    if not dirs:
--                        continue
--                    for path in dirs:
--                        _add_directory(library_dirs, path)
--                    break
--
--                else:
--                    raise ValueError(
--                        "Unable to identify Linux platform: `%s`" % platform_)
--
--                # termux support for android.
--                # system libraries (zlib) are installed in /system/lib
--                # headers are at $PREFIX/include
--                # user libs are at $PREFIX/lib
--                if os.environ.get('ANDROID_ROOT', None):
--                    _add_directory(library_dirs,
--                                   os.path.join(os.environ['ANDROID_ROOT'],
--                                                'lib'))
--
--        elif sys.platform.startswith("gnu"):
--            self.add_multiarch_paths()
--
--        elif sys.platform.startswith("freebsd"):
--            _add_directory(library_dirs, "/usr/local/lib")
--            _add_directory(include_dirs, "/usr/local/include")
--
--        elif sys.platform.startswith("netbsd"):
--            _add_directory(library_dirs, "/usr/pkg/lib")
--            _add_directory(include_dirs, "/usr/pkg/include")
--
--        elif sys.platform.startswith("sunos5"):
--            _add_directory(library_dirs, "/opt/local/lib")
--            _add_directory(include_dirs, "/opt/local/include")
--
--        # FIXME: check /opt/stuff directories here?
--
--        # standard locations
--        if not self.disable_platform_guessing:
--            _add_directory(library_dirs, "/usr/local/lib")
--            _add_directory(include_dirs, "/usr/local/include")
--
--            _add_directory(library_dirs, "/usr/lib")
--            _add_directory(include_dirs, "/usr/include")
--            # alpine, at least
--            _add_directory(library_dirs, "/lib")
--
--        # on Windows, look for the OpenJPEG libraries in the location that
--        # the official installer puts them
--        if sys.platform == "win32":
--            program_files = os.environ.get('ProgramFiles', '')
--            best_version = (0, 0)
--            best_path = None
--            for name in os.listdir(program_files):
--                if name.startswith('OpenJPEG '):
--                    version = tuple(int(x) for x in
--                                    name[9:].strip().split('.'))
--                    if version > best_version:
--                        best_version = version
--                        best_path = os.path.join(program_files, name)
--
--            if best_path:
--                _dbg('Adding %s to search list', best_path)
--                _add_directory(library_dirs, os.path.join(best_path, 'lib'))
--                _add_directory(include_dirs,
--                               os.path.join(best_path, 'include'))
--
-         #
-         # insert new dirs *before* default libs, to avoid conflicts
-         # between Python PYD stub libs and real libraries
diff --git a/lang/python/python-aiohttp-cors/Makefile b/lang/python/python-aiohttp-cors/Makefile
new file mode 100644 (file)
index 0000000..4f6e641
--- /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:=aiohttp-cors
+PKG_VERSION:=0.7.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=aiohttp-cors-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/a/aiohttp_cors/
+PKG_HASH:=4d39c6d7100fd9764ed1caf8cebf0eb01bf5e3f24e2e073fda6234bc48b19f5d
+
+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-aiohttp-cors
+  SECTION:=lang
+  CATEGORY:=Languages
+  SUBMENU:=Python
+  TITLE:=CORS support for aiohttp
+  URL:=https://github.com/aio-libs/aiohttp-cors
+  DEPENDS:= \
+       +python3-aiohttp \
+       +python3-light
+  VARIANT:=python3
+endef
+
+define Package/python3-aiohttp-cors/description
+  Implements Cross Origin Resource Sharing (CORS) support for aiohttp asyncio-powered asynchronous HTTP server.
+endef
+
+$(eval $(call Py3Package,python3-aiohttp-cors))
+$(eval $(call BuildPackage,python3-aiohttp-cors))
+$(eval $(call BuildPackage,python3-aiohttp-cors-src))
index 21d443e931b04460440607defeb956c35c6f96be..8f0993fc79b6e508d3c84486046fe9f85fbef35f 100644 (file)
@@ -61,5 +61,8 @@ endef
 
 $(eval $(call PyPackage,python-asn1crypto))
 $(eval $(call BuildPackage,python-asn1crypto))
+$(eval $(call BuildPackage,python-asn1crypto-src))
+
 $(eval $(call Py3Package,python3-asn1crypto))
 $(eval $(call BuildPackage,python3-asn1crypto))
+$(eval $(call BuildPackage,python3-asn1crypto-src))
diff --git a/lang/python/python-cachelib/Makefile b/lang/python/python-cachelib/Makefile
new file mode 100644 (file)
index 0000000..3f59aca
--- /dev/null
@@ -0,0 +1,40 @@
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-cachelib
+PKG_VERSION:=0.1
+PKG_RELEASE:=1
+
+PKG_SOURCE:=cachelib-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/c/cachelib
+PKG_HASH:=8b889b509d372095357b8705966e1282d40835c4126d7c2b07fd414514d8ae8d
+PKG_BUILD_DIR:=$(BUILD_DIR)/cachelib-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Stepan Henek <stepan.henek@nic.cz>
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=LICENSE
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-cachelib
+  SECTION:=lang
+  CATEGORY:=Languages
+  SUBMENU:=Python
+  TITLE:=cachelib
+  URL:=https://github.com/pallets/cachelib
+  DEPENDS:=+python3-light
+  VARIANT:=python3
+endef
+
+define Package/python3-cachelib/description
+  A collection of cache libraries in the same API interface.
+  Extracted from werkzeug.
+endef
+
+$(eval $(call Py3Package,python3-cachelib))
+$(eval $(call BuildPackage,python3-cachelib))
+$(eval $(call BuildPackage,python3-cachelib-src))
diff --git a/lang/python/python-cachetools/Makefile b/lang/python/python-cachetools/Makefile
new file mode 100644 (file)
index 0000000..e2bb396
--- /dev/null
@@ -0,0 +1,42 @@
+#
+# 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-cachetools
+PKG_VERSION:=3.1.1
+PKG_RELEASE:=1
+
+PKG_SOURCE:=cachetools-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/c/cachetools/
+PKG_HASH:=8ea2d3ce97850f31e4a08b0e2b5e6c34997d7216a9d2c98e0f3978630d4da69a
+PKG_BUILD_DIR:=$(BUILD_DIR)/cachetools-$(PKG_VERSION)
+
+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-cachetools
+  SUBMENU:=Python
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=Extensible memoizing collections and decorators
+  URL:=https://github.com/tkem/cachetools
+  DEPENDS:=+python3-light
+  VARIANT:=python3
+endef
+
+define Package/python3-cachetools/description
+  This module provides various memoizing collections and decorators, including variants of the Python 3 Standard Library lru_cache function decorator.
+endef
+
+$(eval $(call Py3Package,python3-cachetools))
+$(eval $(call BuildPackage,python3-cachetools))
+$(eval $(call BuildPackage,python3-cachetools-src))
index d9d9d64a7166f1103ecd67e2c98eab92a73a5a60..acece86bb76f7b72fd017a47c36fd73abb5fd8ab 100644 (file)
@@ -6,8 +6,8 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-certifi
-PKG_VERSION:=2019.3.9
-PKG_RELEASE:=2
+PKG_VERSION:=2019.9.11
+PKG_RELEASE:=1
 
 PKG_MAINTAINER:=Eneas U de Queiroz <cote2004-github@yahoo.com>
 PKG_LICENSE:=MPL-2.0
@@ -15,7 +15,7 @@ PKG_LICENSE_FILES:=LICENSE
 
 PKG_SOURCE:=certifi-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/c/certifi
-PKG_HASH:=b26104d6835d1f5e49452a26eb2ff87fe7090b89dfcaee5ea2212697e1e1d7ae
+PKG_HASH:=e4f3620cfea4f83eedc95b24abd9cd56f3c4b146dd0177e83a21b4eb49e21e50
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-certifi-$(PKG_VERSION)
 
index 02e8966623b2bb1fa71a7cceeeb7156d550b1c37..24705b61b6842e5e74fdc1c7e294eefa5822bc91 100644 (file)
@@ -5,18 +5,19 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-cryptodome
-PKG_VERSION:=3.8.1
+PKG_VERSION:=3.9.0
 PKG_RELEASE:=1
 
 PKG_SOURCE:=pycryptodome-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/pycryptodome
-PKG_HASH:=68ad0ce4a374577a26bb7f458575abe3c2a342818b5280de6e5738870b7761b3
+PKG_HASH:=dbeb08ad850056747aa7d5f33273b7ce0b9a77910604a1be7b7a6f2ef076213f
 
 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>
+PKG_CPE_ID:=cpe:/a:pycryptodome:pycryptodome
 
 include $(INCLUDE_DIR)/package.mk
 include ../python-package.mk
index ec748204347850897cfcc12ecbd1c262608633ad..ed6ea64bade7ced22cce00122c341dad5e68a672 100644 (file)
@@ -5,12 +5,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-cryptodomex
-PKG_VERSION:=3.8.1
+PKG_VERSION:=3.9.0
 PKG_RELEASE:=1
 
 PKG_SOURCE:=pycryptodomex-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/pycryptodomex
-PKG_HASH:=9251b3f6254d4274caa21b79bd432bf07afa3567c6f02f11861659fb6245139a
+PKG_HASH:=8b604f4fa1de456d6d19771b01c2823675a75a2c60e51a6b738f71fdfe865370
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-cryptodomex-$(PKG_VERSION)
 
index a39c1ed59affb48b26b9779b7aecace58acff8a2..1c0882738ac885e73bc6337b33b57e33aa5fb9ba 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-cryptography
 PKG_VERSION:=2.7
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=cryptography-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/c/cryptography
diff --git a/lang/python/python-cryptography/patches/010-remove-npn.patch b/lang/python/python-cryptography/patches/010-remove-npn.patch
new file mode 100644 (file)
index 0000000..00104b2
--- /dev/null
@@ -0,0 +1,41 @@
+From eec1f066476eccf7135af0a4cfef9e1c883795b3 Mon Sep 17 00:00:00 2001
+From: Paul Kehrer <paul.l.kehrer@gmail.com>
+Date: Mon, 25 Feb 2019 10:55:16 +0800
+Subject: [PATCH] remove NPN bindings -- you should be using ALPN!
+
+pyOpenSSL consumed these, but we've marked it as deprecated and it
+already handles the case where the bindings are not available.
+---
+ src/_cffi_src/openssl/ssl.py | 16 ----------------
+ 1 file changed, 16 deletions(-)
+
+diff --git a/src/_cffi_src/openssl/ssl.py b/src/_cffi_src/openssl/ssl.py
+index da21f3ce90..0e8610f988 100644
+--- a/src/_cffi_src/openssl/ssl.py
++++ b/src/_cffi_src/openssl/ssl.py
+@@ -431,25 +431,9 @@
+ long SSL_session_reused(SSL *);
+-void SSL_CTX_set_next_protos_advertised_cb(SSL_CTX *,
+-                                           int (*)(SSL *,
+-                                                   const unsigned char **,
+-                                                   unsigned int *,
+-                                                   void *),
+-                                           void *);
+-void SSL_CTX_set_next_proto_select_cb(SSL_CTX *,
+-                                      int (*)(SSL *,
+-                                              unsigned char **,
+-                                              unsigned char *,
+-                                              const unsigned char *,
+-                                              unsigned int,
+-                                              void *),
+-                                      void *);
+ int SSL_select_next_proto(unsigned char **, unsigned char *,
+                           const unsigned char *, unsigned int,
+                           const unsigned char *, unsigned int);
+-void SSL_get0_next_proto_negotiated(const SSL *,
+-                                    const unsigned char **, unsigned *);
+ int sk_SSL_CIPHER_num(Cryptography_STACK_OF_SSL_CIPHER *);
+ const SSL_CIPHER *sk_SSL_CIPHER_value(Cryptography_STACK_OF_SSL_CIPHER *, int);
diff --git a/lang/python/python-cryptography/patches/020-disable-npn.patch b/lang/python/python-cryptography/patches/020-disable-npn.patch
new file mode 100644 (file)
index 0000000..1e12922
--- /dev/null
@@ -0,0 +1,23 @@
+From d7293d64d503fcbde442d69a3e11c55bf6f1374a Mon Sep 17 00:00:00 2001
+From: Paul Kehrer <paul.l.kehrer@gmail.com>
+Date: Mon, 25 Feb 2019 11:05:46 +0800
+Subject: [PATCH] set Cryptography_HAS_NEXTPROTONEG to 0 for pyOpenSSL
+
+we can remove this symbol in like...5 years.
+---
+ 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 0e8610f988..e3a7790ee1 100644
+--- a/src/_cffi_src/openssl/ssl.py
++++ b/src/_cffi_src/openssl/ssl.py
+@@ -623,7 +623,7 @@
+ static const long Cryptography_HAS_SSL_OP_MSIE_SSLV2_RSA_PADDING = 1;
+ static const long Cryptography_HAS_SSL_OP_NO_TICKET = 1;
+ static const long Cryptography_HAS_SSL_SET_SSL_CTX = 1;
+-static const long Cryptography_HAS_NEXTPROTONEG = 1;
++static const long Cryptography_HAS_NEXTPROTONEG = 0;
+ /* SSL_get0_param was added in OpenSSL 1.0.2. */
+ #if CRYPTOGRAPHY_OPENSSL_LESS_THAN_102 && !CRYPTOGRAPHY_LIBRESSL_27_OR_GREATER
diff --git a/lang/python/python-cryptography/patches/030-remove-npn.patch b/lang/python/python-cryptography/patches/030-remove-npn.patch
new file mode 100644 (file)
index 0000000..69aeb43
--- /dev/null
@@ -0,0 +1,22 @@
+From b0b50b6bbbdf3abadc70b64c56e25b872721a7f3 Mon Sep 17 00:00:00 2001
+From: Paul Kehrer <paul.l.kehrer@gmail.com>
+Date: Mon, 25 Feb 2019 11:12:10 +0800
+Subject: [PATCH] remove another NPN related definition
+
+---
+ src/_cffi_src/openssl/ssl.py | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/src/_cffi_src/openssl/ssl.py b/src/_cffi_src/openssl/ssl.py
+index e3a7790ee1..f98f576838 100644
+--- a/src/_cffi_src/openssl/ssl.py
++++ b/src/_cffi_src/openssl/ssl.py
+@@ -139,8 +139,6 @@
+ static const long TLS_ST_BEFORE;
+ static const long TLS_ST_OK;
+-static const long OPENSSL_NPN_NEGOTIATED;
+-
+ typedef ... SSL_METHOD;
+ typedef ... SSL_CTX;
index ec364aa8820c59a06d9d76d3c79751681f970ed4..c6aba22c69f74169d772ffe0d89a3de5cd873a68 100644 (file)
@@ -5,12 +5,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=pycurl
-PKG_VERSION:=7.43.0.2
-PKG_RELEASE:=2
+PKG_VERSION:=7.43.0.3
+PKG_RELEASE:=1
 
 PKG_SOURCE:=pycurl-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/pycurl
-PKG_HASH:=0f0cdfc7a92d4f2a5c44226162434e34f7d6967d3af416a6f1448649c09a25a4
+PKG_HASH:=6f08330c5cf79fa8ef68b9912b9901db7ffd34b63e225dce74db56bb21deda8e
 
 PKG_MAINTAINER:=Waldemar Konik <informatyk74@interia.pl>
 PKG_LICENSE:=LGPL-2.1
@@ -55,19 +55,27 @@ $(call Package/python-curl/description)
 (Variant for Python3)
 endef
 
+PYTHON_PKG_SETUP_ARGS:=
+PYTHON3_PKG_SETUP_ARGS:=
+
 ifdef CONFIG_LIBCURL_OPENSSL
-  PYTHON_PKG_SETUP_ARGS:=--with-openssl
-  PYTHON3_PKG_SETUP_ARGS:=--with-openssl
+  PYTHON_PKG_SETUP_ARGS+=--with-openssl
+  PYTHON3_PKG_SETUP_ARGS+=--with-openssl
 endif
 
 ifdef CONFIG_LIBCURL_GNUTLS
-  PYTHON_PKG_SETUP_ARGS:=--with-gnutls
-  PYTHON3_PKG_SETUP_ARGS:=--with-gnutls
+  PYTHON_PKG_SETUP_ARGS+=--with-gnutls
+  PYTHON3_PKG_SETUP_ARGS+=--with-gnutls
 endif
 
 ifdef CONFIG_LIBCURL_MBEDTLS
-  PYTHON_PKG_SETUP_ARGS:=--with-mbedtls
-  PYTHON3_PKG_SETUP_ARGS:=--with-mbedtls
+  PYTHON_PKG_SETUP_ARGS+=--with-mbedtls
+  PYTHON3_PKG_SETUP_ARGS+=--with-mbedtls
+endif
+
+ifdef CONFIG_LIBCURL_WOLFSSL
+  PYTHON_PKG_SETUP_ARGS+=--with-wolfssl
+  PYTHON3_PKG_SETUP_ARGS+=--with-wolfssl
 endif
 
 $(eval $(call PyPackage,python-curl))
diff --git a/lang/python/python-curl/patches/0001-Add-locking-support-to-wolfSSL.patch b/lang/python/python-curl/patches/0001-Add-locking-support-to-wolfSSL.patch
new file mode 100644 (file)
index 0000000..585139e
--- /dev/null
@@ -0,0 +1,128 @@
+From 9b400b32eb3673ab525f12f41a2ff3e4e3bfcccb Mon Sep 17 00:00:00 2001
+From: Eneas U de Queiroz <cotequeiroz@gmail.com>
+Date: Fri, 28 Jun 2019 11:05:20 -0300
+Subject: [PATCH] Add locking support to wolfSSL
+
+This takes advantage of wolfSSL openssl compatibility layer, so all
+that that's needed are library detection, and inclusion of specific
+headers.
+WolfSSL must be built with --enable-opensslextra to enable the required
+API, and that's being checked at build time, with a warning if disabled.
+
+Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
+
+diff --git a/setup.py b/setup.py
+index 3be0fcb..d4303b0 100644
+--- a/setup.py
++++ b/setup.py
+@@ -143,6 +143,7 @@ class ExtensionConfiguration(object):
+         return {
+             '--with-openssl': self.using_openssl,
+             '--with-ssl': self.using_openssl,
++            '--with-wolfssl': self.using_wolfssl,
+             '--with-gnutls': self.using_gnutls,
+             '--with-nss': self.using_nss,
+             '--with-mbedtls': self.using_mbedtls,
+@@ -163,7 +164,7 @@ class ExtensionConfiguration(object):
+         if 'PYCURL_SSL_LIBRARY' in os.environ:
+             ssl_lib = os.environ['PYCURL_SSL_LIBRARY']
+-            if ssl_lib in ['openssl', 'gnutls', 'nss', 'mbedtls']:
++            if ssl_lib in ['openssl', 'wolfssl', 'gnutls', 'nss', 'mbedtls']:
+                 ssl_lib_detected = ssl_lib
+                 getattr(self, 'using_%s' % ssl_lib)()
+             else:
+@@ -188,6 +189,10 @@ class ExtensionConfiguration(object):
+                         self.using_openssl()
+                         ssl_lib_detected = 'openssl'
+                         break
++                    if arg[2:] == 'wolfssl':
++                        self.using_wolfssl()
++                        ssl_lib_detected = 'wolfssl'
++                        break
+                     if arg[2:] == 'gnutls':
+                         self.using_gnutls()
+                         ssl_lib_detected = 'gnutls'
+@@ -506,6 +511,11 @@ manually. For other SSL backends please ignore this message.''')
+             self.libraries.append('ssl')
+         self.define_macros.append(('HAVE_CURL_SSL', 1))
++    def using_wolfssl(self):
++        self.define_macros.append(('HAVE_CURL_WOLFSSL', 1))
++        self.libraries.append('wolfssl')
++        self.define_macros.append(('HAVE_CURL_SSL', 1))
++
+     def using_gnutls(self):
+         self.define_macros.append(('HAVE_CURL_GNUTLS', 1))
+         self.libraries.append('gnutls')
+@@ -572,6 +582,7 @@ def strip_pycurl_options(argv):
+ PRETTY_SSL_LIBS = {
+     # setup.py may be detecting BoringSSL properly, need to test
+     'openssl': 'OpenSSL/LibreSSL/BoringSSL',
++    'wolfssl': 'wolfSSL',
+     'gnutls': 'GnuTLS',
+     'nss': 'NSS',
+     'mbedtls': 'mbedTLS',
+@@ -902,6 +913,7 @@ PycURL Unix options:
+  --with-gnutls                       libcurl is linked against GnuTLS
+  --with-nss                          libcurl is linked against NSS
+  --with-mbedtls                      libcurl is linked against mbedTLS
++ --with-wolfssl                      libcurl is linked against wolfSSL
+ '''
+ windows_help = '''\
+diff --git a/src/module.c b/src/module.c
+index 909cdfe..23387ec 100644
+--- a/src/module.c
++++ b/src/module.c
+@@ -351,6 +351,8 @@ initpycurl(void)
+     } else if (!strncmp(vi->ssl_version, "OpenSSL/", 8) || !strncmp(vi->ssl_version, "LibreSSL/", 9) ||
+                !strncmp(vi->ssl_version, "BoringSSL", 9)) {
+         runtime_ssl_lib = "openssl";
++    } else if (!strncmp(vi->ssl_version, "wolfSSL/", 8)) {
++        runtime_ssl_lib = "wolfssl";
+     } else if (!strncmp(vi->ssl_version, "GnuTLS/", 7)) {
+         runtime_ssl_lib = "gnutls";
+     } else if (!strncmp(vi->ssl_version, "NSS/", 4)) {
+diff --git a/src/pycurl.h b/src/pycurl.h
+index 2294cb8..092387f 100644
+--- a/src/pycurl.h
++++ b/src/pycurl.h
+@@ -164,6 +164,28 @@ pycurl_inet_ntop (int family, void *addr, char *string, size_t string_size);
+ #   include <openssl/ssl.h>
+ #   include <openssl/err.h>
+ #   define COMPILE_SSL_LIB "openssl"
++# elif defined(HAVE_CURL_WOLFSSL)
++#   include <wolfssl/options.h>
++#   if defined(OPENSSL_EXTRA)
++#     define HAVE_CURL_OPENSSL
++#     define PYCURL_NEED_SSL_TSL
++#     define PYCURL_NEED_OPENSSL_TSL
++#     include <wolfssl/openssl/ssl.h>
++#     include <wolfssl/openssl/err.h>
++#   else
++#    ifdef _MSC_VER
++#     pragma message(\
++       "libcurl was compiled with wolfSSL, but the library was built without " \
++       "--enable-opensslextra; thus no SSL crypto locking callbacks will be set, " \
++       "which may cause random crashes on SSL requests")
++#    else
++#     warning \
++       "libcurl was compiled with wolfSSL, but the library was built without " \
++       "--enable-opensslextra; thus no SSL crypto locking callbacks will be set, " \
++       "which may cause random crashes on SSL requests"
++#    endif
++#   endif
++#   define COMPILE_SSL_LIB "wolfssl"
+ # elif defined(HAVE_CURL_GNUTLS)
+ #   include <gnutls/gnutls.h>
+ #   if GNUTLS_VERSION_NUMBER <= 0x020b00
+@@ -195,7 +217,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 || HAVE_CURL_MBEDTLS */
++# endif /* HAVE_CURL_OPENSSL || HAVE_CURL_WOLFSSL || HAVE_CURL_GNUTLS || HAVE_CURL_NSS || HAVE_CURL_MBEDTLS */
+ #else
+ # define COMPILE_SSL_LIB "none/other"
+ #endif /* HAVE_CURL_SSL */
diff --git a/lang/python/python-curl/patches/0001-support-for-mbedTLS.patch b/lang/python/python-curl/patches/0001-support-for-mbedTLS.patch
deleted file mode 100644 (file)
index 58112ee..0000000
+++ /dev/null
@@ -1,263 +0,0 @@
-From bb7d7a803665005cc72ad68a388e9e937ff3d2f6 Mon Sep 17 00:00:00 2001
-From: Josef Schlehofer <pepe.schlehofer@gmail.com>
-Date: Sat, 23 Mar 2019 21:02:17 +0100
-Subject: [PATCH] support for mbedTLS
-
----
- INSTALL.rst           |  4 ++--
- doc/thread-safety.rst |  2 +-
- setup.py              | 28 +++++++++++++++++++++-------
- src/module.c          |  6 ++++--
- src/pycurl.h          |  7 ++++++-
- src/threadsupport.c   | 39 +++++++++++++++++++++++++++++++++++++++
- 6 files changed, 73 insertions(+), 13 deletions(-)
-
-diff --git a/INSTALL.rst b/INSTALL.rst
-index 8ad8b4f..da70d25 100644
---- a/INSTALL.rst
-+++ b/INSTALL.rst
-@@ -53,7 +53,7 @@ It will then fail at runtime as follows::
- To fix this, you need to tell ``setup.py`` what SSL backend is used::
--    python setup.py --with-[openssl|gnutls|nss] install
-+    python setup.py --with-[openssl|gnutls|nss|mbedtls] install
- Note: as of PycURL 7.21.5, setup.py accepts ``--with-openssl`` option to
- indicate that libcurl is built against OpenSSL. ``--with-ssl`` is an alias
-@@ -85,7 +85,7 @@ environment variable::
- The same applies to the SSL backend, if you need to specify it (see the SSL
- note above)::
--    export PYCURL_SSL_LIBRARY=[openssl|gnutls|nss]
-+    export PYCURL_SSL_LIBRARY=[openssl|gnutls|nss|mbedtls]
-     easy_install pycurl
-diff --git a/doc/thread-safety.rst b/doc/thread-safety.rst
-index 5ba3f3e..ae2b9e5 100644
---- a/doc/thread-safety.rst
-+++ b/doc/thread-safety.rst
-@@ -21,7 +21,7 @@ For Python programs using PycURL, this means:
-   Python code *outside of a libcurl callback for the PycURL object in question*
-   is unsafe.
--PycURL handles the necessary SSL locks for OpenSSL/LibreSSL, GnuTLS and NSS.
-+PycURL handles the necessary SSL locks for OpenSSL/LibreSSL, GnuTLS, NSS and mbedTLS.
- A special situation exists when libcurl uses the standard C library
- name resolver (i.e., not threaded nor c-ares resolver). By default libcurl
-diff --git a/setup.py b/setup.py
-index e1e6925..5ab437f 100644
---- a/setup.py
-+++ b/setup.py
-@@ -143,6 +143,7 @@ class ExtensionConfiguration(object):
-             '--with-ssl': self.using_openssl,
-             '--with-gnutls': self.using_gnutls,
-             '--with-nss': self.using_nss,
-+            '--with-mbedtls': self.using_mbedtls,
-         }
-     def detect_ssl_option(self):
-@@ -152,20 +153,20 @@ class ExtensionConfiguration(object):
-                     if option != other_option:
-                         if scan_argv(self.argv, other_option) is not None:
-                             raise ConfigurationError('Cannot give both %s and %s' % (option, other_option))
--                
-+
-                 return option
-     def detect_ssl_backend(self):
-         ssl_lib_detected = False
--        
-+
-         if 'PYCURL_SSL_LIBRARY' in os.environ:
-             ssl_lib = os.environ['PYCURL_SSL_LIBRARY']
--            if ssl_lib in ['openssl', 'gnutls', 'nss']:
-+            if ssl_lib in ['openssl', 'gnutls', 'nss', 'mbedtls']:
-                 ssl_lib_detected = True
-                 getattr(self, 'using_%s' % ssl_lib)()
-             else:
-                 raise ConfigurationError('Invalid value "%s" for PYCURL_SSL_LIBRARY' % ssl_lib)
--        
-+
-         option = self.detect_ssl_option()
-         if option:
-             ssl_lib_detected = True
-@@ -194,6 +195,10 @@ class ExtensionConfiguration(object):
-                         self.using_nss()
-                         ssl_lib_detected = True
-                         break
-+                    if arg[2:] == 'mbedtls':
-+                        self.using_nss()
-+                        ssl_lib_detected = True
-+                        break
-         if not ssl_lib_detected and len(self.argv) == len(self.original_argv) \
-                 and not os.environ.get('PYCURL_CURL_CONFIG') \
-@@ -201,7 +206,7 @@ class ExtensionConfiguration(object):
-             # this path should only be taken when no options or
-             # configuration environment variables are given to setup.py
-             ssl_lib_detected = self.detect_ssl_lib_on_centos6()
--            
-+
-         self.ssl_lib_detected = ssl_lib_detected
-     def curl_config(self):
-@@ -301,7 +306,7 @@ class ExtensionConfiguration(object):
-             if errtext:
-                 msg += ":\n" + errtext
-             raise ConfigurationError(msg)
--            
-+
-         # hack
-         self.sslhintbuf = sslhintbuf
-@@ -327,7 +332,7 @@ specify the SSL backend manually.''')
-                 self.library_dirs.append(arg[2:])
-             else:
-                 self.extra_link_args.append(arg)
--            
-+
-         if not self.libraries:
-             self.libraries.append("curl")
-@@ -354,6 +359,9 @@ specify the SSL backend manually.''')
-         elif ssl_version.startswith('NSS/'):
-             self.using_nss()
-             ssl_lib_detected = True
-+        elif ssl_version.startswith('mbedTLS/'):
-+            self.using_mbedtls()
-+            ssl_lib_detected = 'mbedtls'
-         return ssl_lib_detected
-     def detect_ssl_lib_on_centos6(self):
-@@ -505,6 +513,11 @@ specify the SSL backend manually.''')
-         self.libraries.append('ssl3')
-         self.define_macros.append(('HAVE_CURL_SSL', 1))
-+    def using_mbedtls(self):
-+        self.define_macros.append(('HAVE_CURL_MBEDTLS', 1))
-+        self.libraries.append('mbedtls')
-+        self.define_macros.append(('HAVE_CURL_SSL', 1))
-+
- def get_bdist_msi_version_hack():
-     # workaround for distutils/msi version requirement per
-     # epydoc.sourceforge.net/stdlib/distutils.version.StrictVersion-class.html -
-@@ -871,6 +884,7 @@ PycURL Unix options:
-  --with-ssl                          legacy alias for --with-openssl
-  --with-gnutls                       libcurl is linked against GnuTLS
-  --with-nss                          libcurl is linked against NSS
-+ --with-mbedtls                      libcurl is linked against mbedTLS
- '''
- windows_help = '''\
-diff --git a/src/module.c b/src/module.c
-index 2331ae8..7fdb25a 100644
---- a/src/module.c
-+++ b/src/module.c
-@@ -328,7 +328,7 @@ initpycurl(void)
-     PyObject *collections_module = NULL;
-     PyObject *named_tuple = NULL;
-     PyObject *arglist = NULL;
--    
-+
-     assert(Curl_Type.tp_weaklistoffset > 0);
-     assert(CurlMulti_Type.tp_weaklistoffset > 0);
-     assert(CurlShare_Type.tp_weaklistoffset > 0);
-@@ -355,6 +355,8 @@ initpycurl(void)
-         runtime_ssl_lib = "gnutls";
-     } else if (!strncmp(vi->ssl_version, "NSS/", 4)) {
-         runtime_ssl_lib = "nss";
-+    } else if (!strncmp(vi->ssl_version, "mbedTLS/", 2)) {
-+        runtime_ssl_lib = "mbedtls";
-     } else {
-         runtime_ssl_lib = "none/other";
-     }
-@@ -461,7 +463,7 @@ initpycurl(void)
-     /* constants for ioctl callback argument values */
-     insint_c(d, "IOCMD_NOP", CURLIOCMD_NOP);
-     insint_c(d, "IOCMD_RESTARTREAD", CURLIOCMD_RESTARTREAD);
--    
-+
-     /* opensocketfunction return value */
-     insint_c(d, "SOCKET_BAD", CURL_SOCKET_BAD);
-diff --git a/src/pycurl.h b/src/pycurl.h
-index 65290f7..2294cb8 100644
---- a/src/pycurl.h
-+++ b/src/pycurl.h
-@@ -174,6 +174,11 @@ pycurl_inet_ntop (int family, void *addr, char *string, size_t string_size);
- #   define COMPILE_SSL_LIB "gnutls"
- # elif defined(HAVE_CURL_NSS)
- #   define COMPILE_SSL_LIB "nss"
-+# elif defined(HAVE_CURL_MBEDTLS)
-+#   include <mbedtls/ssl.h>
-+#   define PYCURL_NEED_SSL_TSL
-+#   define PYCURL_NEED_MBEDTLS_TSL
-+#   define COMPILE_SSL_LIB "mbedtls"
- # else
- #  ifdef _MSC_VER
-     /* sigh */
-@@ -190,7 +195,7 @@ pycurl_inet_ntop (int family, void *addr, char *string, size_t string_size);
-    /* since we have no crypto callbacks for other ssl backends,
-     * no reason to require users match those */
- #  define COMPILE_SSL_LIB "none/other"
--# endif /* HAVE_CURL_OPENSSL || HAVE_CURL_GNUTLS || HAVE_CURL_NSS */
-+# endif /* HAVE_CURL_OPENSSL || HAVE_CURL_GNUTLS || HAVE_CURL_NSS || HAVE_CURL_MBEDTLS */
- #else
- # define COMPILE_SSL_LIB "none/other"
- #endif /* HAVE_CURL_SSL */
-diff --git a/src/threadsupport.c b/src/threadsupport.c
-index 6ca07f5..51abffd 100644
---- a/src/threadsupport.c
-+++ b/src/threadsupport.c
-@@ -232,6 +232,45 @@ pycurl_ssl_cleanup(void)
- }
- #endif
-+/* mbedTLS */
-+
-+#ifdef PYCURL_NEED_MBEDTLS_TSL
-+static int
-+pycurl_ssl_mutex_create(void **m)
-+{
-+    if ((*((PyThread_type_lock *) m) = PyThread_allocate_lock()) == NULL) {
-+        return -1;
-+    } else {
-+        return 0;
-+    }
-+}
-+
-+static int
-+pycurl_ssl_mutex_destroy(void **m)
-+{
-+    PyThread_free_lock(*((PyThread_type_lock *) m));
-+    return 0;
-+}
-+
-+static int
-+pycurl_ssl_mutex_lock(void **m)
-+{
-+    return !PyThread_acquire_lock(*((PyThread_type_lock *) m), 1);
-+}
-+
-+PYCURL_INTERNAL int
-+pycurl_ssl_init(void)
-+{
-+    return 0;
-+}
-+
-+PYCURL_INTERNAL void
-+pycurl_ssl_cleanup(void)
-+{
-+    return;
-+}
-+#endif
-+
- /*************************************************************************
- // CurlShareObject
- **************************************************************************/
--- 
-2.17.0.windows.1
-
index 7a211e5b0cfcdb3d3a0527fec987473d1c23fff8..c90291c8737eef82397b3754814509e55fecef6f 100644 (file)
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-dateutil
-PKG_VERSION:=2.7.5
-PKG_RELEASE:=3
+PKG_VERSION:=2.8.0
+PKG_RELEASE:=1
 PKG_LICENSE:=BSD-2-Clause
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/python-dateutil
-PKG_HASH:=88f9287c0174266bb0d8cedd395cfba9c58e87e5ad86b2ce58859bc11be3cf02
+PKG_HASH:=c89805f6f4d64db21ed966fda138f8a5ed7a4fdbc1a8ee329ce1b74e3c74da9e
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-dateutil-$(PKG_VERSION)
 PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
 
index 2d4416e72b184752cb793e922939c6f38f216cda..b8fdc4563ee340ea950f4015fddab51fd94aacb1 100644 (file)
@@ -8,6 +8,7 @@ PKG_NAME:=python-decorator
 PKG_VERSION:=4.3.2
 PKG_RELEASE:=1
 PKG_MAINTAINER:=Karel Kočí <cynerd@email.cz>
+PKG_CPE_ID:=cpe:/a:python:decorator
 
 PKG_SOURCE_URL:=https://codeload.github.com/micheles/decorator/tar.gz/$(PKG_VERSION)?
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
index 659f0d62dbc9cd637c84a298ddb88ed71e38f239..bb93b85e5ef214ca85bce2f35665eff4cc489282 100644 (file)
@@ -18,6 +18,7 @@ PKG_HASH:=4bf5c5c12a4478ee7860ab176659cf64c4899ee76752d826b082f8af723c5cf9
 PKG_LICENSE:=ISC
 PKG_LICENSE_FILES:=LICENSE
 PKG_MAINTAINER:=Josef Schlehofer <pepe.schlehofer@gmail.com>
+PKG_CPE_ID:=cpe:/a:debian:python-dns
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-dnspython-$(PKG_VERSION)
 
index d93035a0151b29680bc822842c0c994cba678c8e..dfb669b38ad0e9031249e73846903af0b7d8cec2 100644 (file)
@@ -9,28 +9,28 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-egenix-mx-base
 PKG_VERSION:=3.2.9
-PKG_RELEASE:=2
-PKG_MAINTAINER:=Dmitry Trefilov <the-alien@live.ru>
-PKG_LICENSE:=eGenix.com Public License 1.1.0
-PKG_LICENSE_FILES:=LICENSE COPYRIGHT
+PKG_RELEASE:=4
 
 PKG_SOURCE:=egenix-mx-base-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://downloads.egenix.com/python
 PKG_HASH:=1c6b67688e7a231c6c1da09b7a6a2210745c3f2507bdda70e2639faedbf68977
-
 PKG_BUILD_DIR:=$(BUILD_DIR)/egenix-mx-base-$(PKG_VERSION)
-PKG_BUILD_DEPENDS:=python
+
+PKG_MAINTAINER:=Dmitry Trefilov <the-alien@live.ru>
+PKG_LICENSE:=eGenix
+PKG_LICENSE_FILES:=LICENSE COPYRIGHT
 
 include $(INCLUDE_DIR)/package.mk
 include ../python-package.mk
 
 define Package/python-egenix-mx-base
-  SUBMENU:=Python
   SECTION:=lang
   CATEGORY:=Languages
-  DEPENDS:=+USE_EGLIBC:librt +USE_UCLIBC:librt +python
   TITLE:=Egenix mxBase
+  SUBMENU:=Python
   URL:=https://www.egenix.com/products/python/mxBase/
+  DEPENDS:=+python-light
+  VARIANT:=python
 endef
 
 define Package/python-egenix-mx-base/description
@@ -40,16 +40,8 @@ define Package/python-egenix-mx-base/description
  date/time processing and high speed data types.
 endef
 
-define Build/Compile
-       $(call Build/Compile/PyMod,,install --prefix="$(PKG_INSTALL_DIR)/usr")
-endef
-
-define PyPackage/python-egenix-mx-base/install
-       $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
-       $(CP) \
-           $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
-           $(1)$(PYTHON_PKG_DIR)
-endef
+PYTHON_PKG_SETUP_ARGS:=
 
 $(eval $(call PyPackage,python-egenix-mx-base))
 $(eval $(call BuildPackage,python-egenix-mx-base))
+$(eval $(call BuildPackage,python-egenix-mx-base-src))
index 16e55fc1ac45ae31b2d6a2e61b45c21832931411..8f4cd71caf748834dae92a274e6e6b0f6fbd7585 100644 (file)
@@ -20,6 +20,7 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-enum34-$(PKG_VERSION)
 PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=enum/LICENSE
 PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
+PKG_CPE_ID:=cpe:/a:python:enum34
 
 include $(INCLUDE_DIR)/package.mk
 include ../python-package.mk
index 6f062d1c55ee28c7020e0ca97cc75924890684d3..d72dd22a7637fdf6ba841b918e978bd2dd48ab2e 100644 (file)
@@ -74,5 +74,8 @@ PYTHON_PKG_SETUP_GLOBAL_ARGS:=$(PYTHON3_PKG_SETUP_GLOBAL_ARGS)
 
 $(eval $(call PyPackage,python-evdev))
 $(eval $(call BuildPackage,python-evdev))
+$(eval $(call BuildPackage,python-evdev-src))
+
 $(eval $(call Py3Package,python3-evdev))
 $(eval $(call BuildPackage,python3-evdev))
+$(eval $(call BuildPackage,python3-evdev-src))
index df6a30fca36258b35a2f8b6f9f23e76e0e5a5c3a..4d730f87a40669597d81e514fe366e5828e30af7 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-gmpy2
 PKG_VERSION:=2.0.8
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_SOURCE:=gmpy2-$(PKG_VERSION).zip
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/g/gmpy2
@@ -17,7 +17,7 @@ PKG_HASH:=dd233e3288b90f21b0bb384bcc7a7e73557bb112ccf0032ad52aa614eb373d3f
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-gmpy2-$(PKG_VERSION)
 
-PKG_LICENSE:=LGPL-3.0+
+PKG_LICENSE:=LGPL-3.0-or-later
 PKG_LICENSE_FILES:=COPYING.LESSER
 PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
 
index 4aa835a239ef5838c3790c1da8f7b37e1a707301..8511b394eae6143135907c798a56f6463d68d46e 100644 (file)
@@ -6,15 +6,16 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-gnupg
 PKG_VERSION:=0.4.4
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/python-gnupg
 PKG_HASH:=45daf020b370bda13a1429c859fcdff0b766c0576844211446f9266cae97fb0e
 
-PKG_LICENSE:=GPL-3.0+
+PKG_LICENSE:=GPL-3.0-or-later
 PKG_LICENSE_FILES:=LICENSE
 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
+PKG_CPE_ID:=cpe:/a:python-gnupg_project:python-gnupg
 
 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)
diff --git a/lang/python/python-intelhex/Makefile b/lang/python/python-intelhex/Makefile
new file mode 100644 (file)
index 0000000..4f9619b
--- /dev/null
@@ -0,0 +1,42 @@
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-intelhex
+PKG_VERSION:=2.2.1
+PKG_RELEASE:=1
+
+PKG_SOURCE:=intelhex-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/i/intelhex/
+PKG_HASH:=009d8511e0d50639230c39af9607deee771cf026f67ef7507a8c3fd4fa927832
+PKG_BUILD_DIR:=$(BUILD_DIR)/intelhex-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Karel Kočí <cynerd@email.cz>
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=LICENSE.txt
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-intelhex
+  SECTION:=lang
+  CATEGORY:=Languages
+  SUBMENU:=Python
+  TITLE:=python3-intelhex
+  URL:=https://github.com/bialix/intelhex
+  DEPENDS:=+python3-light
+  VARIANT:=python3
+endef
+
+define Package/python3-intelhex/description
+  This work implements an intelhex Python library to read, write, create from
+  scratch and manipulate data from Intel HEX file format.
+endef
+
+PYTHON3_PKG_SETUP_ARGS:=
+
+$(eval $(call Py3Package,python3-intelhex))
+$(eval $(call BuildPackage,python3-intelhex))
+$(eval $(call BuildPackage,python3-intelhex-src))
index 1d8b54c7ec326eba75d066c5361286ebf334f43b..ac95a1cefa773a85706ca17b1c4b0f4e2f8923ce 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-lxml
-PKG_VERSION:=4.3.1
+PKG_VERSION:=4.4.1
 PKG_RELEASE:=1
 
 PKG_SOURCE:=lxml-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/l/lxml
-PKG_HASH:=da5e7e941d6e71c9c9a717c93725cda0708c2474f532e3680ac5e39ec57d224d
+PKG_HASH:=c81cb40bff373ab7a7446d6bbca0190bccc5be3448b47b51d729e37799bb5692
 
 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)
@@ -21,6 +21,7 @@ PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$
 PKG_LICENSE:=BSD
 PKG_LICENSE_FILES:=LICENSES.txt
 PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
+PKG_CPE_ID:=cpe:/a:lxml:lxml
 
 include $(INCLUDE_DIR)/package.mk
 include ../python-package.mk
@@ -89,6 +90,8 @@ endef
 
 $(eval $(call PyPackage,python-lxml))
 $(eval $(call BuildPackage,python-lxml))
+$(eval $(call BuildPackage,python-lxml-src))
 
 $(eval $(call Py3Package,python3-lxml))
 $(eval $(call BuildPackage,python3-lxml))
+$(eval $(call BuildPackage,python3-lxml-src))
diff --git a/lang/python/python-markdown/Makefile b/lang/python/python-markdown/Makefile
new file mode 100644 (file)
index 0000000..06baa3a
--- /dev/null
@@ -0,0 +1,46 @@
+#
+# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/)
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-markdown
+PKG_VERSION:=3.1.1
+PKG_RELEASE:=1
+
+PKG_SOURCE:=Markdown-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/m/markdown/
+PKG_HASH:=2e50876bcdd74517e7b71f3e7a76102050edec255b3983403f1a63e7c8a41e7a
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/Markdown-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=LICENSE.md
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-markdown
+  SECTION:=lang
+  CATEGORY:=Languages
+  SUBMENU:=Python
+  TITLE:=Markdown implementation in Python
+  URL:=https://python-markdown.github.io/
+  DEPENDS:= \
+       +python3-light \
+       +python3-setuptools \
+       +python3-logging
+  VARIANT:=python3
+endef
+
+define Package/python3-markdown/description
+  A fast and complete Python implementation of Markdown.
+endef
+
+$(eval $(call Py3Package,python3-markdown))
+$(eval $(call BuildPackage,python3-markdown))
+$(eval $(call BuildPackage,python3-markdown-src))
diff --git a/lang/python/python-mysql/Makefile b/lang/python/python-mysql/Makefile
deleted file mode 100644 (file)
index 3ad9816..0000000
+++ /dev/null
@@ -1,65 +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:=python-mysql
-PKG_VERSION:=1.3.14
-PKG_RELEASE:=2
-PKG_LICENSE:=GPL-2.0
-
-PKG_SOURCE:=mysqlclient-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/m/mysqlclient
-PKG_HASH:=3981ae9ce545901a36a8b7aed76ed02960a429f75dc53b7ad77fb2f9ab7cd56b
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-mysql-$(PKG_VERSION)
-PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
-
-include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
-include ../python3-package.mk
-# python-mysql needs iconv
-include $(INCLUDE_DIR)/nls.mk
-
-PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
-
-define Package/python-mysql/Default
-  SUBMENU:=Python
-  SECTION:=lang
-  CATEGORY:=Languages
-  URL:=https://pypi.python.org/project/mysqlclient
-endef
-
-define Package/python-mysql
-  $(call Package/python-mysql/Default)
-  TITLE:=MySQL database adapter for Python
-  DEPENDS:=+PACKAGE_python-mysql:python +libmysqlclient
-  VARIANT:=python
-endef
-
-define Package/python3-mysql
-  $(call Package/python-mysql/Default)
-  TITLE:=MySQL database adapter for Python3
-  DEPENDS:=+PACKAGE_python3-mysql:python3 +libmysqlclient
-  VARIANT:=python3
-endef
-
-define Package/python-mysql/description
- MySQLdb is an thread-compatible interface to the popular MySQL database
- server that provides the Python database API.
-endef
-
-define Package/python3-mysql/description
-$(call Package/python-mysql/description)
-.
-(Variant for Python3)
-endef
-
-$(eval $(call PyPackage,python-mysql))
-$(eval $(call BuildPackage,python-mysql))
-
-$(eval $(call Py3Package,python3-mysql))
-$(eval $(call BuildPackage,python3-mysql))
diff --git a/lang/python/python-mysqlclient/Makefile b/lang/python/python-mysqlclient/Makefile
new file mode 100644 (file)
index 0000000..626c696
--- /dev/null
@@ -0,0 +1,67 @@
+#
+# 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:=python-mysqlclient
+PKG_VERSION:=1.4.4
+PKG_RELEASE:=1
+PKG_LICENSE:=GPL-2.0
+
+PKG_SOURCE:=mysqlclient-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/m/mysqlclient
+PKG_HASH:=9c737cc55a5dc8dd3583a942d5a9b21be58d16f00f5fefca4e575e7d9682e98c
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-mysqlclient-$(PKG_VERSION)
+PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
+
+include $(INCLUDE_DIR)/package.mk
+include ../python-package.mk
+include ../python3-package.mk
+# python-mysqlclient needs iconv
+include $(INCLUDE_DIR)/nls.mk
+
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+define Package/python-mysqlclient/Default
+  SUBMENU:=Python
+  SECTION:=lang
+  CATEGORY:=Languages
+  URL:=https://mysqlclient.readthedocs.io/
+endef
+
+define Package/python-mysqlclient
+  $(call Package/python-mysqlclient/Default)
+  TITLE:=MySQL database adapter for Python
+  DEPENDS:=+PACKAGE_python-mysqlclient:python +libmysqlclient
+  VARIANT:=python
+endef
+
+define Package/python3-mysqlclient
+  $(call Package/python-mysqlclient/Default)
+  TITLE:=MySQL database adapter for Python3
+  DEPENDS:=+PACKAGE_python3-mysqlclient:python3 +libmysqlclient
+  VARIANT:=python3
+endef
+
+define Package/python-mysqlclient/description
+ MySQLdb is an thread-compatible interface to the popular MySQL database
+ server that provides the Python database API.
+endef
+
+define Package/python3-mysqlclient/description
+$(call Package/python-mysqlclient/description)
+.
+(Variant for Python3)
+endef
+
+$(eval $(call PyPackage,python-mysqlclient))
+$(eval $(call BuildPackage,python-mysqlclient))
+$(eval $(call BuildPackage,python-mysqlclient-src))
+
+$(eval $(call Py3Package,python3-mysqlclient))
+$(eval $(call BuildPackage,python3-mysqlclient))
+$(eval $(call BuildPackage,python3-mysqlclient-src))
index af94b950374ae97c3dd393de48492a2f52453f56..6376cdf5acca1abbef130a7f71b2d1624ca3e45f 100644 (file)
@@ -6,17 +6,16 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-oauthlib
-PKG_VERSION:=3.0.1
-PKG_RELEASE:=2
+PKG_VERSION:=3.1.0
+PKG_RELEASE:=1
 
-PKG_MAINTAINER:=Eneas U de Queiroz <cote2004-github@yahoo.com>
+PKG_MAINTAINER:=Eneas U de Queiroz <cotequeiroz@gmail.com>
 PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=LICENSE
 
 PKG_SOURCE:=oauthlib-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/o/oauthlib
-PKG_HASH:=0ce32c5d989a1827e3f1148f98b9085ed2370fc939bf524c9c851d8714797298
-
+PKG_HASH:=bee41cc35fcca6e988463cacc3bcb8a96224f470ca547e697b604cc697b2f889
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-oauthlib-$(PKG_VERSION)
 
 include $(INCLUDE_DIR)/package.mk
index 2ca2abc16e13e77daf5b9848d2e493084a90d688..337727af1f9294389067bf4582a477fc5d53d588 100644 (file)
@@ -54,8 +54,6 @@ python="$4"
 mode="$5"
 filespec="$6"
 
-SED="${SED:-sed -e}"
-
 find "$src_dir" -name "*.exe" -delete
 
 process_filespec "$src_dir" "$dst_dir" "$filespec" || {
@@ -63,12 +61,6 @@ process_filespec "$src_dir" "$dst_dir" "$filespec" || {
        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" -delete
@@ -77,8 +69,9 @@ if [ "$mode" == "sources" ] ; then
        exit 0
 fi
 
-legacy=
-[ "$ver" == "3" ] && legacy="-b"
+if [ "$ver" == "3" ] ; then
+       legacy="-b"
+fi
 # default max recursion is 10
 max_recursion_level=20
 
index 272aae44fc6949372a98ec03a26c9403cfa5fc45..019f4f028880b103d8d64532e45a030f285b6a6c 100644 (file)
@@ -35,6 +35,10 @@ ifdef CONFIG_USE_MIPS16
   TARGET_CFLAGS += -mno-mips16 -mno-interlink-mips16
 endif
 
+define PyShebang
+$(SED) "1"'!'"b;s,^#"'!'".*python.*,#"'!'"/usr/bin/python2," -i --follow-symlinks $(1)
+endef
+
 define PyPackage
 
   define Package/$(1)-src
@@ -45,6 +49,7 @@ define PyPackage
     EXTRA_DEPENDS:=
     TITLE+= (sources)
     USERID:=
+    MENU:=
   endef
 
   define Package/$(1)-src/description
@@ -73,11 +78,13 @@ define PyPackage
 
   define Package/$(1)/install
        $$(call PyPackage/$(1)/install,$$(1))
-       SED="$(SED)" \
        $(SHELL) $(python_mk_path)python-package-install.sh "2" \
                "$(PKG_INSTALL_DIR)" "$$(1)" \
                "$(HOST_PYTHON_BIN)" "$$(2)" \
-               "$$$$$$$$$$(call shvar,PyPackage/$(1)/filespec)"
+               "$$$$$$$$$$(call shvar,PyPackage/$(1)/filespec)" && \
+       if [ -d "$$(1)/usr/bin" ]; then \
+               $(call PyShebang,$$(1)/usr/bin/*) ; \
+       fi
   endef
 
   define Package/$(1)-src/install
index 5a16e08abf4a694bd31f5e738ad09e9025eb9af0..1aa02469078789484469dc82171b235f7ac705da 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-psycopg2
 PKG_VERSION:=2.7.6.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=psycopg2-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/psycopg2
@@ -17,7 +17,7 @@ PKG_HASH:=27959abe64ca1fc6d8cd11a71a1f421d8287831a3262bd4cacd43bbf43cc3c82
 PKG_BUILD_DIR:=$(BUILD_DIR)/psycopg2-$(PKG_VERSION)
 
 PKG_MAINTAINER:=Dmitry Trefilov <the-alien@live.ru>
-PKG_LICENSE:=LGPL-3.0+
+PKG_LICENSE:=LGPL-3.0-or-later
 PKG_LICENSE_FILES:=LICENSE
 
 PKG_BUILD_DEPENDS:=python/host
index 8456a55aa27caf70ad0eb473887fa2e693ccdf95..10b1160ef2ed6b3f87ebfd24021d3a85a3d37b6c 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-pyasn1-modules
-PKG_VERSION:=0.2.5
+PKG_VERSION:=0.2.6
 PKG_RELEASE:=1
 
 PKG_SOURCE:=pyasn1-modules-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/pyasn1-modules
-PKG_HASH:=ef721f68f7951fab9b0404d42590f479e30d9005daccb1699b0a51bb4177db96
+PKG_HASH:=43c17a83c155229839cc5c6b868e8d0c6041dba149789b6d6e28801c64821722
 
 PKG_LICENSE:=BSD-2-Clause
 PKG_LICENSE_FILES:=LICENSE.txt
index 4a7c5451c176709ae0a1a866580e9e700bc8bfdc..6222d929a8642967dca4611ebd9118af1d8a4bda 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-pyasn1
-PKG_VERSION:=0.4.5
+PKG_VERSION:=0.4.7
 PKG_RELEASE:=1
 
 PKG_SOURCE:=pyasn1-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/pyasn1
-PKG_HASH:=da2420fe13a9452d8ae97a0e478adde1dee153b11ba832a95b223a2ba01c10f7
+PKG_HASH:=a9495356ca1d66ed197a0f72b41eb1823cf7ea8b5bd07191673e8147aecf8604
 
 PKG_LICENSE:=BSD-2-Clause
 PKG_LICENSE_FILES:=LICENSE.txt
index fcd1f2f40726bb3744ad5d84f2a04d363cae826e..5bfc8cc8aa1b8224e88bd270ee9291f374b98c00 100644 (file)
@@ -18,6 +18,7 @@ PKG_HASH:=aeca66338f6de19d1aa46ed634c3b9ae519a64b458f8468aec688e7e3c20f200
 PKG_LICENSE:=Apache-2.0
 PKG_LICENSE_FILES:=LICENSE
 PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>, Alexandru Ardelean <ardeleanalex@gmail.com>
+PKG_CPE_ID:=cpe:/a:pyopenssl_project:pyopenssl
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-pyopenssl-$(PKG_VERSION)
 
diff --git a/lang/python/python-pyrsistent/Makefile b/lang/python/python-pyrsistent/Makefile
new file mode 100644 (file)
index 0000000..270276c
--- /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-pyrsistent
+PKG_VERSION:=0.15.4
+PKG_RELEASE:=1
+
+PKG_SOURCE:=pyrsistent-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/pyrsistent/
+PKG_HASH:=34b47fa169d6006b32e99d4b3c4031f155e6e68ebcc107d6454852e8e0ee6533
+PKG_BUILD_DIR:=$(BUILD_DIR)/pyrsistent-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE.mit
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-pyrsistent
+  SUBMENU:=Python
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=Persistent/Functional/Immutable data structures
+  URL:=https://github.com/tobgu/pyrsistent
+  DEPENDS:=+python3-light +python3-six
+  VARIANT:=python3
+endef
+
+define Package/python3-pyrsistent/description
+  Pyrsistent is a number of persistent collections (by some referred to as functional data structures).
+  Persistent in the sense that they are immutable.
+endef
+
+$(eval $(call Py3Package,python3-pyrsistent))
+$(eval $(call BuildPackage,python3-pyrsistent))
+$(eval $(call BuildPackage,python3-pyrsistent-src))
index 1fec0d5492984729018ce8999bfc4c11dc70380b..841855f65a4338011090e614e0202fddf2941c3a 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-pytz
-PKG_VERSION:=2019.1
+PKG_VERSION:=2019.2
 PKG_RELEASE:=1
 
 PKG_SOURCE:=pytz-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/pytz
-PKG_HASH:=d747dd3d23d77ef44c6a3526e274af6efeb0a6f1afd5a69ba4d5be4098c8e141
+PKG_HASH:=26c0b32e437e54a18161324a2fca3c4b9846b74a8dccddd843113109e1116b32
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-pytz-$(PKG_VERSION)
 
@@ -21,15 +21,11 @@ PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE.txt
 
-HOST_BUILD_DEPENDS:=python/host
-
-include $(INCLUDE_DIR)/host-build.mk
 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
@@ -62,14 +58,6 @@ $(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))
index 54d333ce14900a6876f36e2e883335cb7f882a70..b67fdf62761c4ed1e0d8a2e7abd8e6672671fb4e 100644 (file)
@@ -7,30 +7,39 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-qrcode
 PKG_VERSION:=6.1
-PKG_RELEASE:=1
-
-PKG_MAINTAINER:=Eneas U de Queiroz <cote2004-github@yahoo.com>
-PKG_LICENSE:=BSD-3-Clause
-PKG_LICENSE_FILES:=LICENSE
+PKG_RELEASE:=2
 
 PKG_SOURCE:=qrcode-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/q/qrcode/
 PKG_HASH:=505253854f607f2abf4d16092c61d4e9d511a3b4392e60bff957a68592b04369
 
+PKG_MAINTAINER:=Eneas U de Queiroz <cotequeiroz@gmail.com>
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=LICENSE
+
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-qrcode-$(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-qrcode
-  SUBMENU:=Python
+define Package/python-qrcode/Default
   SECTION:=lang
   CATEGORY:=Languages
+  SUBMENU:=Python
   TITLE:=QR Code image generator
   URL:=https://github.com/lincolnloop/python-qrcode
-  DEPENDS:=+python +python-six +python-setuptools +pillow
+endef
+
+define Package/python-qrcode
+$(call Package/python-qrcode/Default)
+  DEPENDS:= \
+       +PACKAGE_python-qrcode:python \
+       +PACKAGE_python-qrcode:python-setuptools \
+       +PACKAGE_python-qrcode:python-six \
+       +PACKAGE_python-qrcode:python-pillow
   VARIANT:=python
 endef
 
@@ -38,6 +47,26 @@ define Package/python-qrcode/description
   Pure python QR Code generator
 endef
 
+define Package/python3-qrcode
+$(call Package/python-qrcode/Default)
+  DEPENDS:= \
+       +PACKAGE_python3-qrcode:python3 \
+       +PACKAGE_python3-qrcode:python3-setuptools \
+       +PACKAGE_python3-qrcode:python3-six \
+       +PACKAGE_python3-qrcode:python3-pillow
+  VARIANT:=python3
+endef
+
+define Package/python3-qrcode/description
+$(call Package/python-qrcode/description)
+.
+(Variant for Python3)
+endef
+
 $(eval $(call PyPackage,python-qrcode))
 $(eval $(call BuildPackage,python-qrcode))
 $(eval $(call BuildPackage,python-qrcode-src))
+
+$(eval $(call Py3Package,python3-qrcode))
+$(eval $(call BuildPackage,python3-qrcode))
+$(eval $(call BuildPackage,python3-qrcode-src))
index dd6df4fb1122388f89b3fede7eab79902a08a25d..a34fd162f42b89ac30b8b4f7f77f40b34a6ea4d3 100644 (file)
@@ -22,8 +22,6 @@ PKG_HASH:=11e007a8a2aa0323f5a921e9e6a2d7e4e67d9877e85773fba9ba6419025cbeb4
 
 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
diff --git a/lang/python/python-schedule/Makefile b/lang/python/python-schedule/Makefile
new file mode 100644 (file)
index 0000000..5bfe88f
--- /dev/null
@@ -0,0 +1,44 @@
+#
+# 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-schedule
+PKG_VERSION:=0.6.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=schedule-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/s/schedule/
+PKG_HASH:=f9fb5181283de4db6e701d476dd01b6a3dd81c38462a54991ddbb9d26db857c9
+PKG_BUILD_DIR:=$(BUILD_DIR)/schedule-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE.txt
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-schedule
+  SECTION:=lang
+  CATEGORY:=Languages
+  SUBMENU:=Python
+  TITLE:=Job scheduling for humans
+  URL:=https://github.com/dbader/schedule
+  DEPENDS:=+python3-light +python3-logging
+  VARIANT:=python3
+endef
+
+define Package/python3-schedule/description
+  An in-process scheduler for periodic jobs that uses the builder pattern for configuration.
+  The Schedule lets you run Python functions (or any other callable)
+  periodically at predetermined intervals using a simple, human-friendly syntax.
+endef
+
+$(eval $(call Py3Package,python3-schedule))
+$(eval $(call BuildPackage,python3-schedule))
+$(eval $(call BuildPackage,python3-schedule-src))
index 65ba4fd08ba185bb03d3aeff5e3ca8ea09a0838c..4c96f39cd8df6cc12b33ce73e9611d38eefb8a42 100644 (file)
@@ -5,13 +5,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-schema
-PKG_VERSION:=0.7.0
+PKG_VERSION:=0.7.1
 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_HASH:=0edc47b343450c116dd67267b6951b43916b2e6893e896da1eefb7a69ef7c83d
 PKG_BUILD_DIR:=$(BUILD_DIR)/schema-$(PKG_VERSION)
 
 include $(INCLUDE_DIR)/package.mk
diff --git a/lang/python/python-sentry-sdk/Makefile b/lang/python/python-sentry-sdk/Makefile
new file mode 100644 (file)
index 0000000..2100b78
--- /dev/null
@@ -0,0 +1,46 @@
+#
+# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/)
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-sentry-sdk
+PKG_VERSION:=0.12.2
+PKG_RELEASE:=1
+
+PKG_SOURCE:=sentry-sdk-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/s/sentry-sdk/
+PKG_HASH:=2529ab6f93914d01bcd80b1b16c15a025902350ab19af2033aa5ff797c1600ad
+PKG_BUILD_DIR:=$(BUILD_DIR)/sentry-sdk-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>
+PKG_LICENSE:=BSD-2-Clause
+PKG_LICENSE_FILES:=LICENSE
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-sentry-sdk
+  SECTION:=lang
+  CATEGORY:=Languages
+  SUBMENU:=Python
+  TITLE:=Python Client for Sentry
+  URL:=https://github.com/getsentry/sentry-python
+  DEPENDS:= \
+       +python3-certifi \
+       +python3-light \
+       +python3-logging \
+       +python3-urllib3
+  VARIANT:=python3
+endef
+
+define Package/python3-sentry-sdk/description
+  Python Sentry-Python is an SDK for Sentry.
+endef
+
+$(eval $(call Py3Package,python3-sentry-sdk))
+$(eval $(call BuildPackage,python3-sentry-sdk))
+$(eval $(call BuildPackage,python3-sentry-sdk-src))
index 3ba4a6764cf6fcfac9bbdfd0cd6536764e90be6b..a975200204a21440a9e2c65ed4013f5a46106e4c 100644 (file)
@@ -9,8 +9,9 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-simplejson
 PKG_VERSION:=3.16.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_LICENSE:=MIT
+PKG_CPE_ID:=cpe:/a:simplejson_project:simplejson
 
 PKG_SOURCE:=simplejson-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/s/simplejson
@@ -34,14 +35,14 @@ endef
 define Package/python-simplejson
 $(call Package/python-simplejson/Default)
   TITLE:=Simple, fast, extensible JSON encoder/decoder for Python 2
-  DEPENDS:=+PACKAGE_python-simplejson:python-light
+  DEPENDS:=+PACKAGE_python-simplejson:python-light +PACKAGE_python-simplejson:python-decimal
   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
+  DEPENDS:=+PACKAGE_python3-simplejson:python3-light +PACKAGE_python3-simplejson:python3-decimal
   VARIANT:=python3
 endef
 
index 4ec4baeb7441d2387344df4529d1abe9f6f96d3a..64c806c2842cf103d37ecf57449f2c6085c54f99 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-slugify
-PKG_VERSION:=3.0.2
+PKG_VERSION:=3.0.3
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/python-slugify/
-PKG_HASH:=57163ffb345c7e26063435a27add1feae67fa821f1ef4b2f292c25847575d758
+PKG_HASH:=a9f468227cb11e20e251670d78e1b5f6b0b15dd37bbd5c9814a25a904e44ff66
 
 PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>
 PKG_LICENSE:=MIT
@@ -28,16 +28,16 @@ define Package/python3-slugify
   SUBMENU:=Python
   TITLE:=Slugify application that handles Unicode
   URL:=https://github.com/un33k/python-slugify
-  DEPENDS+= \
-      +python3-light \
-      +python3-codecs \
-      +python3-setuptools \
-      +python3-text-unidecode
+  DEPENDS:= \
+    +python3-light \
+    +python3-codecs \
+    +python3-setuptools \
+    +python3-text-unidecode
   VARIANT:=python3
 endef
 
 define Package/python3-slugify/description
-A Python slugify application that handles unicode.
+  A Python slugify application that handles unicode.
 endef
 
 $(eval $(call Py3Package,python3-slugify))
diff --git a/lang/python/python-sqlalchemy/Makefile b/lang/python/python-sqlalchemy/Makefile
new file mode 100644 (file)
index 0000000..451e8db
--- /dev/null
@@ -0,0 +1,51 @@
+#
+# 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-sqlalchemy
+PKG_VERSION:=1.3.7
+PKG_RELEASE:=1
+
+PKG_SOURCE:=SQLAlchemy-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/S/SQLAlchemy/
+PKG_HASH:=0459bf0ea6478f3e904de074d65769a11d74cdc34438ab3159250c96d089aef0
+PKG_BUILD_DIR:=$(BUILD_DIR)/SQLAlchemy-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+PKG_CPE_ID:=cpe:/a:sqlalchemy:sqlalchemy
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-sqlalchemy
+  SECTION:=lang
+  CATEGORY:=Languages
+  SUBMENU:=Python
+  TITLE:=Database Abstraction Library
+  URL:=https://www.sqlalchemy.org
+  DEPENDS:= \
+       +python3-light \
+       +python3-urllib \
+       +python3-decimal \
+       +python3-logging
+  VARIANT:=python3
+endef
+
+define Package/python3-sqlalchemy/description
+  SQLAlchemy is the Python SQL toolkit and Object Relational Mapper
+  that gives application developers the full power and flexibility of SQL.
+  SQLAlchemy provides a full suite of well known enterprise-level persistence patterns,
+  designed for efficient and high-performing database access,
+  adapted into a simple and Pythonic domain language.
+endef
+
+$(eval $(call Py3Package,python3-sqlalchemy))
+$(eval $(call BuildPackage,python3-sqlalchemy))
+$(eval $(call BuildPackage,python3-sqlalchemy-src))
index d9f81091ca7c49b492eeec6d81c4ffd6a75d4e95..ebff973f0ad87024a4e8d34e2fe9db92271d3285 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-twisted
-PKG_VERSION:=19.2.0
+PKG_VERSION:=19.7.0
 PKG_RELEASE:=1
 
 PKG_SOURCE:=Twisted-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/T/Twisted
-PKG_HASH:=1708e1928ae84ec9d3ebab0d427e20e1e38ff721b15bbced476d047d4a43abbe
+PKG_HASH:=d5db93026568f60cacdc0615fcd21d46f694a6bfad0ef3ff53cde2b4bb85a39d
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-twisted-$(PKG_VERSION)
 PKG_BUILD_DEPENDS:=libtirpc
@@ -21,6 +21,7 @@ PKG_BUILD_DEPENDS:=libtirpc
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
 PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
+PKG_CPE_ID:=cpe:/a:twistedmatrix:twisted
 
 include $(INCLUDE_DIR)/package.mk
 include ../python-package.mk
index a5bddaaec81d897437857930a60faf4fe41a8e8f..67a37bc1cf2befc38d5390585585b04797c4a539 100644 (file)
@@ -1,6 +1,6 @@
 --- a/src/twisted/python/_setup.py
 +++ b/src/twisted/python/_setup.py
-@@ -147,7 +147,6 @@ _CONSOLE_SCRIPTS = [
+@@ -149,7 +149,6 @@ _CONSOLE_SCRIPTS = [
      "conch = twisted.conch.scripts.conch:run",
      "mailmail = twisted.mail.scripts.mailmail:run",
      "pyhtmlizer = twisted.scripts.htmlizer:run",
index 83ca2cd76b5c156496b07d79e882fee97d6afa3f..51adbbdf801384eb36d7dc453b5ede92974d2994 100644 (file)
@@ -1,6 +1,6 @@
 --- a/src/twisted/python/_setup.py
 +++ b/src/twisted/python/_setup.py
-@@ -173,11 +173,6 @@ class ConditionalExtension(Extension, ob
+@@ -175,11 +175,6 @@ class ConditionalExtension(Extension, ob
  # The C extensions used for Twisted.
  _EXTENSIONS = [
      ConditionalExtension(
@@ -12,7 +12,7 @@
          "twisted.internet.iocpreactor.iocpsupport",
          sources=[
              "src/twisted/internet/iocpreactor/iocpsupport/iocpsupport.c",
-@@ -241,12 +236,11 @@ def getSetupArgs(extensions=_EXTENSIONS)
+@@ -284,12 +279,11 @@ def getSetupArgs(extensions=_EXTENSIONS,
          "incremental >= 16.10.1",
          "Automat >= 0.3.0",
          "hyperlink >= 17.1.1",
@@ -26,7 +26,7 @@
          use_incremental=True,
          setup_requires=["incremental >= 16.10.1"],
          install_requires=requirements,
-@@ -256,7 +250,7 @@ def getSetupArgs(extensions=_EXTENSIONS)
+@@ -299,7 +293,7 @@ def getSetupArgs(extensions=_EXTENSIONS,
          cmdclass=command_classes,
          include_package_data=True,
          exclude_package_data={
index 747501ba21016bce525c6907ebd7da80820d785d..9d1c60f754f904a8f84e41a2c41cc7b00d34213c 100644 (file)
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-urllib3
-PKG_VERSION:=1.25.3
+PKG_VERSION:=1.25.6
 PKG_RELEASE:=1
 
 PKG_MAINTAINER:=Josef Schlehofer <pepe.schlehofer@gmail.com>
@@ -18,7 +18,7 @@ PKG_CPE_ID:=cpe:/a:urllib3_project:urllib3
 
 PKG_SOURCE:=urllib3-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/u/urllib3
-PKG_HASH:=dbe59173209418ae49d485b87d1681aefa36252ee85884c31346debd19463232
+PKG_HASH:=9a107b99a5393caf59c7aa3c1249c16e6879447533d0887f4336dde834c7be86
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-urllib3-$(PKG_VERSION)
 
index d29db7e671c27ee7d5e705aea76fabd050342a8f..e955868d96bf0fd577918c0149997e4c1d9e50da 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=voluptuous-serialize
-PKG_VERSION:=2.1.0
-PKG_RELEASE:=2
+PKG_VERSION:=2.2.0
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/v/voluptuous-serialize/
-PKG_HASH:=d30fef4f1aba251414ec0b315df81a06da7bf35201dcfb1f6db5253d738a154f
+PKG_HASH:=8b31660c7efdba0eb97ba65390b63cc62cc99ae3cd25d00e1873b183b38ef13d
 
 PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>
 PKG_LICENSE:=Apache-2.0
index c5ccca145003a973225c1e2df723406ddcb17014..3485d8bd48944a7cacafcca497d42c41a53afdd0 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-voluptuous
-PKG_VERSION:=0.11.5
+PKG_VERSION:=0.11.7
 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_HASH:=2abc341dbc740c5e2302c7f9b8e2e243194fb4772585b991931cb5b22e9bf456
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-voluptuous-$(PKG_VERSION)
 
@@ -66,4 +66,3 @@ $(eval $(call BuildPackage,python-voluptuous-src))
 $(eval $(call Py3Package,python3-voluptuous))
 $(eval $(call BuildPackage,python3-voluptuous))
 $(eval $(call BuildPackage,python3-voluptuous-src))
-
index ed568ca96ab22311c5ba7172ee2a564ede55fcbb..3a78d955814fefcc1f894c9ff4bb24e6f1f2ff59 100644 (file)
@@ -7,20 +7,20 @@
 
 include $(TOPDIR)/rules.mk
 
-PKG_NAME:=PyYAML
-PKG_VERSION:=5.1
+PKG_NAME:=python-yaml
+PKG_VERSION:=5.1.2
 PKG_RELEASE:=1
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE:=PyYAML-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/P/PyYAML
-PKG_HASH:=436bc774ecf7c103814098159fbb84c2715d25980175292c648f2da143909f95
+PKG_HASH:=01adf0b6c6f61bd11af6e10ca52b7d4057dd0be0343eb9283c878cf3af56aee4
 
 PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
 PKG_CPE_ID:=cpe:/a:pyyaml_project:pyyaml
 
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-$(PKG_NAME)-$(PKG_VERSION)
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-PyYAML-$(PKG_VERSION)
 
 include $(INCLUDE_DIR)/package.mk
 include ../python-package.mk
@@ -30,8 +30,8 @@ PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$
 
 define Package/python-yaml/Default
   SECTION:=lang
-  SUBMENU:=Python
   CATEGORY:=Languages
+  SUBMENU:=Python
   TITLE:=YAML parser and emitter for Python
   URL:=https://github.com/yaml/pyyaml
   DEPENDS:=+libyaml
@@ -52,7 +52,7 @@ $(call Package/python-yaml/Default)
 endef
 
 define Package/python-yaml/description
-PyYAML is a YAML parser and emitter for the Python programming language.
+  PyYAML is a YAML parser and emitter for the Python programming language.
 endef
 
 define Package/python3-yaml/description
index 8c127ae476328e2e601aba030a641cd2de2dac83..20e3aeaca6f5ac6c14c972313904856930f19e60 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-zeroconf
-PKG_VERSION:=0.22.0
+PKG_VERSION:=0.23.0
 PKG_RELEASE:=1
 
 PKG_SOURCE:=zeroconf-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://pypi.python.org/packages/source/z/zeroconf/
-PKG_HASH:=fe66582c7b3ecc229ea4555b6d9da9bc26fc70134811e980b4fbd033e472b825
+PKG_HASH:=e0c333b967c48f8b2e5cc94a1d4d28893023fb06dfd797ee384a94cdd1d0eef5
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/zeroconf-$(PKG_VERSION)
 
index 3fdbc47136dbe30e4464e59ff3289b5e4d8c856e..3a0ff994f394ca907453f021576b6b942b6fbcaa 100644 (file)
@@ -12,7 +12,7 @@ include ../python-version.mk
 
 PKG_NAME:=python
 PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO)
-PKG_RELEASE:=6
+PKG_RELEASE:=11
 
 PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://www.python.org/ftp/python/$(PKG_VERSION)
@@ -39,6 +39,7 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/Python-$(PKG_VERSION)
 HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/Python-$(PKG_VERSION)
 
 PKG_CONFIG_DEPENDS:= \
+       CONFIG_PACKAGE_python-pkg-resources \
        CONFIG_PACKAGE_python-setuptools CONFIG_PACKAGE_python-pip \
        CONFIG_PYTHON_BLUETOOTH_SUPPORT
 
@@ -169,6 +170,14 @@ define Build/Prepare
 endef
 
 ifdef CONFIG_PACKAGE_python-setuptools
+PYTHON_SETUPTOOLS_BUILD:=1
+endif
+
+ifdef CONFIG_PACKAGE_python-pkg-resources
+PYTHON_SETUPTOOLS_BUILD:=1
+endif
+
+ifeq ($(PYTHON_SETUPTOOLS_BUILD),1)
 define Build/Compile/python-setuptools
        $(HOST_PYTHON_PIP) \
                --disable-pip-version-check \
@@ -205,7 +214,7 @@ endef
 
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib $(1)/usr/lib/pkgconfig
-       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_DIR) $(2)/bin
        $(INSTALL_DIR) $(1)/usr/lib/python$(PYTHON_VERSION)-openwrt
        $(CP) \
                $(PKG_INSTALL_DIR)/usr/include/python$(PYTHON_VERSION) \
@@ -219,10 +228,11 @@ define Build/InstallDev
                $(1)/usr/lib/pkgconfig
        $(INSTALL_BIN) \
                ./files/python-config.in \
-               $(1)/usr/bin/python$(PYTHON_VERSION)-config
+               $(2)/bin/python$(PYTHON_VERSION)-config
        $(SED) \
                's|@EXENAME@|$(HOST_PYTHON_DIR)/bin/python$(PYTHON_VERSION)|' \
-               $(1)/usr/bin/python$(PYTHON_VERSION)-config
+               -e 's|@TARGET_PREFIX@|$(PYTHON_DIR)|' \
+               $(2)/bin/python$(PYTHON_VERSION)-config
        $(CP) \
                $(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON_VERSION)/_sysconfigdata.py \
                $(1)/usr/lib/python$(PYTHON_VERSION)-openwrt/_sysconfigdatatarget.py
@@ -289,13 +299,18 @@ define PyPackage/python/filespec
 endef
 
 HOST_LDFLAGS += \
-       $$$$(pkg-config --static --libs libcrypto libssl) -Wl$(comma)-rpath=$(STAGING_DIR_HOSTPKG)/lib
+       -Wl$(comma)-rpath$(comma)$(STAGING_DIR_HOSTPKG)/lib
 
 ifeq ($(HOST_OS),Linux)
 HOST_LDFLAGS += \
        -Wl,--no-as-needed -lrt
 endif
 
+ifeq ($(HOST_OS),Darwin)
+HOST_CONFIGURE_VARS += \
+       ac_cv_header_libintl_h=no
+endif
+
 HOST_CONFIGURE_ARGS+= \
        --without-cxx-main \
        --without-pymalloc \
index 46f6c9cd4aefff9b6de0a0f66d854a0a99930d14..c4a9c27adfcb2c480159972a6a4acc4bb8ab7b8b 100644 (file)
@@ -8,8 +8,7 @@ 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_prefix = '@TARGET_PREFIX@'
 
 target_data_dir = os.path.join(target_prefix, 'lib', 'python' + sysconfig.get_config_var('VERSION') + '-openwrt')
 sys.path.append(target_data_dir)
diff --git a/lang/python/python/files/python-package-pkg-resources.mk b/lang/python/python/files/python-package-pkg-resources.mk
new file mode 100644 (file)
index 0000000..f0e819b
--- /dev/null
@@ -0,0 +1,28 @@
+#
+# 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/python-pkg-resources
+$(call Package/python/Default)
+  TITLE:=Python $(PYTHON_VERSION) pkg_resources module (part of etuptools)
+  VERSION:=$(PYTHON_SETUPTOOLS_VERSION)-$(PYTHON_SETUPTOOLS_PKG_RELEASE)
+  LICENSE:=MIT
+  LICENSE_FILES:=LICENSE
+#  CPE_ID:=cpe:/a:python:setuptools # not currently handled this way by uscan
+  DEPENDS:=+python
+endef
+
+define PyPackage/python-pkg-resources/install
+       $(INSTALL_DIR) $(1)/usr/lib/python$(PYTHON_VERSION)/site-packages
+       $(CP) \
+               $(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON_VERSION)/site-packages/pkg_resources \
+               $(1)/usr/lib/python$(PYTHON_VERSION)/site-packages
+endef
+
+$(eval $(call PyBasePackage,python-pkg-resources, \
+       , \
+       DO_NOT_ADD_TO_PACKAGE_DEPENDS \
+))
index 95951ececbb0effdb0c4df2ccd9fab2ce131c78a..305a515b7466cabcbf69576c662c2ca5bd5d2ea3 100644 (file)
@@ -12,14 +12,13 @@ $(call Package/python/Default)
   LICENSE:=MIT
   LICENSE_FILES:=LICENSE
 #  CPE_ID:=cpe:/a:python:setuptools # not currently handled this way by uscan
-  DEPENDS:=+python
+  DEPENDS:=+python +python-pkg-resources
 endef
 
 define PyPackage/python-setuptools/install
        $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib/python$(PYTHON_VERSION)/site-packages
        $(CP) $(PKG_BUILD_DIR)/install-setuptools/usr/bin/* $(1)/usr/bin
        $(CP) \
-               $(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON_VERSION)/site-packages/pkg_resources \
                $(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON_VERSION)/site-packages/setuptools \
                $(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON_VERSION)/site-packages/setuptools-$(PYTHON_SETUPTOOLS_VERSION).dist-info \
                $(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON_VERSION)/site-packages/easy_install.py \
diff --git a/lang/python/python/patches/021-2.7-bpo-35121-prefix-dot-in-domain-for-proper-subdom.patch b/lang/python/python/patches/021-2.7-bpo-35121-prefix-dot-in-domain-for-proper-subdom.patch
new file mode 100644 (file)
index 0000000..deaed28
--- /dev/null
@@ -0,0 +1,123 @@
+From 979daae300916adb399ab5b51410b6ebd0888f13 Mon Sep 17 00:00:00 2001
+From: Xtreak <tir.karthi@gmail.com>
+Date: Sat, 15 Jun 2019 20:59:43 +0530
+Subject: [PATCH] [2.7] bpo-35121: prefix dot in domain for proper subdomain
+ validation (GH-10258) (GH-13426)
+
+This is a manual backport of ca7fe5063593958e5efdf90f068582837f07bd14 since 2.7 has `http.cookiejar` in `cookielib`
+
+
+https://bugs.python.org/issue35121
+---
+ Lib/cookielib.py                              | 13 ++++++--
+ Lib/test/test_cookielib.py                    | 30 +++++++++++++++++++
+ .../2019-05-20-00-35-12.bpo-35121.RRi-HU.rst  |  4 +++
+ 3 files changed, 45 insertions(+), 2 deletions(-)
+ create mode 100644 Misc/NEWS.d/next/Security/2019-05-20-00-35-12.bpo-35121.RRi-HU.rst
+
+diff --git a/Lib/cookielib.py b/Lib/cookielib.py
+index 2dd7c48728..0b471a42f2 100644
+--- a/Lib/cookielib.py
++++ b/Lib/cookielib.py
+@@ -1139,6 +1139,11 @@ class DefaultCookiePolicy(CookiePolicy):
+         req_host, erhn = eff_request_host(request)
+         domain = cookie.domain
++        if domain and not domain.startswith("."):
++            dotdomain = "." + domain
++        else:
++            dotdomain = domain
++
+         # strict check of non-domain cookies: Mozilla does this, MSIE5 doesn't
+         if (cookie.version == 0 and
+             (self.strict_ns_domain & self.DomainStrictNonDomain) and
+@@ -1151,7 +1156,7 @@ class DefaultCookiePolicy(CookiePolicy):
+             _debug("   effective request-host name %s does not domain-match "
+                    "RFC 2965 cookie domain %s", erhn, domain)
+             return False
+-        if cookie.version == 0 and not ("."+erhn).endswith(domain):
++        if cookie.version == 0 and not ("."+erhn).endswith(dotdomain):
+             _debug("   request-host %s does not match Netscape cookie domain "
+                    "%s", req_host, domain)
+             return False
+@@ -1165,7 +1170,11 @@ class DefaultCookiePolicy(CookiePolicy):
+             req_host = "."+req_host
+         if not erhn.startswith("."):
+             erhn = "."+erhn
+-        if not (req_host.endswith(domain) or erhn.endswith(domain)):
++        if domain and not domain.startswith("."):
++            dotdomain = "." + domain
++        else:
++            dotdomain = domain
++        if not (req_host.endswith(dotdomain) or erhn.endswith(dotdomain)):
+             #_debug("   request domain %s does not match cookie domain %s",
+             #       req_host, domain)
+             return False
+diff --git a/Lib/test/test_cookielib.py b/Lib/test/test_cookielib.py
+index f2dd9727d1..7f7ff614d6 100644
+--- a/Lib/test/test_cookielib.py
++++ b/Lib/test/test_cookielib.py
+@@ -368,6 +368,7 @@ class CookieTests(TestCase):
+             ("http://foo.bar.com/", ".foo.bar.com", True),
+             ("http://foo.bar.com/", "foo.bar.com", True),
+             ("http://foo.bar.com/", ".bar.com", True),
++            ("http://foo.bar.com/", "bar.com", True),
+             ("http://foo.bar.com/", "com", True),
+             ("http://foo.com/", "rhubarb.foo.com", False),
+             ("http://foo.com/", ".foo.com", True),
+@@ -378,6 +379,8 @@ class CookieTests(TestCase):
+             ("http://foo/", "foo", True),
+             ("http://foo/", "foo.local", True),
+             ("http://foo/", ".local", True),
++            ("http://barfoo.com", ".foo.com", False),
++            ("http://barfoo.com", "foo.com", False),
+             ]:
+             request = urllib2.Request(url)
+             r = pol.domain_return_ok(domain, request)
+@@ -938,6 +941,33 @@ class CookieTests(TestCase):
+         c.add_cookie_header(req)
+         self.assertFalse(req.has_header("Cookie"))
++        c.clear()
++
++        pol.set_blocked_domains([])
++        req = Request("http://acme.com/")
++        res = FakeResponse(headers, "http://acme.com/")
++        cookies = c.make_cookies(res, req)
++        c.extract_cookies(res, req)
++        self.assertEqual(len(c), 1)
++
++        req = Request("http://acme.com/")
++        c.add_cookie_header(req)
++        self.assertTrue(req.has_header("Cookie"))
++
++        req = Request("http://badacme.com/")
++        c.add_cookie_header(req)
++        self.assertFalse(pol.return_ok(cookies[0], req))
++        self.assertFalse(req.has_header("Cookie"))
++
++        p = pol.set_blocked_domains(["acme.com"])
++        req = Request("http://acme.com/")
++        c.add_cookie_header(req)
++        self.assertFalse(req.has_header("Cookie"))
++
++        req = Request("http://badacme.com/")
++        c.add_cookie_header(req)
++        self.assertFalse(req.has_header("Cookie"))
++
+     def test_secure(self):
+         from cookielib import CookieJar, DefaultCookiePolicy
+diff --git a/Misc/NEWS.d/next/Security/2019-05-20-00-35-12.bpo-35121.RRi-HU.rst b/Misc/NEWS.d/next/Security/2019-05-20-00-35-12.bpo-35121.RRi-HU.rst
+new file mode 100644
+index 0000000000..7725180616
+--- /dev/null
++++ b/Misc/NEWS.d/next/Security/2019-05-20-00-35-12.bpo-35121.RRi-HU.rst
+@@ -0,0 +1,4 @@
++Don't send cookies of domain A without Domain attribute to domain B when
++domain A is a suffix match of domain B while using a cookiejar with
++:class:`cookielib.DefaultCookiePolicy` policy. Patch by Karthikeyan
++Singaravelan.
+-- 
+2.20.1
+
diff --git a/lang/python/python/patches/023-bpo-35907-Avoid-file-reading-as-disallowing-the-unnecessary-URL-scheme-in-urllib-GH-11842.patch b/lang/python/python/patches/023-bpo-35907-Avoid-file-reading-as-disallowing-the-unnecessary-URL-scheme-in-urllib-GH-11842.patch
new file mode 100644 (file)
index 0000000..341201f
--- /dev/null
@@ -0,0 +1,192 @@
+From 8f99cc799e4393bf1112b9395b2342f81b3f45ef Mon Sep 17 00:00:00 2001
+From: push0ebp <push0ebp@shl-MacBook-Pro.local>
+Date: Thu, 14 Feb 2019 02:05:46 +0900
+Subject: [PATCH 1/6] bpo-35907: Avoid file reading as disallowing the
+ unnecessary URL scheme in urllib
+
+---
+ Lib/test/test_urllib.py | 12 ++++++++++++
+ Lib/urllib.py           |  5 ++++-
+ 2 files changed, 16 insertions(+), 1 deletion(-)
+
+diff --git a/Lib/test/test_urllib.py b/Lib/test/test_urllib.py
+index 1ce9201c0693..e5f210e62a18 100644
+--- a/Lib/test/test_urllib.py
++++ b/Lib/test/test_urllib.py
+@@ -1023,6 +1023,18 @@ def open_spam(self, url):
+             "spam://c:|windows%/:=&?~#+!$,;'@()*[]|/path/"),
+             "//c:|windows%/:=&?~#+!$,;'@()*[]|/path/")
++    def test_local_file_open(self):
++        class DummyURLopener(urllib.URLopener):
++            def open_local_file(self, url):
++                return url
++        self.assertEqual(DummyURLopener().open(
++            'local-file://example'), '//example')
++        self.assertEqual(DummyURLopener().open(
++            'local_file://example'), '//example')
++        self.assertRaises(IOError, urllib.urlopen,
++            'local-file://example')
++        self.assertRaises(IOError, urllib.urlopen,
++            'local_file://example')
+ # Just commented them out.
+ # Can't really tell why keep failing in windows and sparc.
+diff --git a/Lib/urllib.py b/Lib/urllib.py
+index d85504a5cb7e..a24e9a5c68fb 100644
+--- a/Lib/urllib.py
++++ b/Lib/urllib.py
+@@ -203,7 +203,10 @@ def open(self, fullurl, data=None):
+         name = 'open_' + urltype
+         self.type = urltype
+         name = name.replace('-', '_')
+-        if not hasattr(self, name):
++        
++        # bpo-35907: # disallow the file reading with the type not allowed
++        if not hasattr(self, name) or \
++            (self == _urlopener and name == 'open_local_file'):
+             if proxy:
+                 return self.open_unknown_proxy(proxy, fullurl, data)
+             else:
+
+From b86392511acd4cd30dc68711fa22f9f93228715a Mon Sep 17 00:00:00 2001
+From: "blurb-it[bot]" <blurb-it[bot]@users.noreply.github.com>
+Date: Wed, 13 Feb 2019 17:21:11 +0000
+Subject: [PATCH 2/6] =?UTF-8?q?=F0=9F=93=9C=F0=9F=A4=96=20Added=20by=20blu?=
+ =?UTF-8?q?rb=5Fit.?=
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+---
+ .../NEWS.d/next/Library/2019-02-13-17-21-10.bpo-35907.ckk2zg.rst | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 Misc/NEWS.d/next/Library/2019-02-13-17-21-10.bpo-35907.ckk2zg.rst
+
+diff --git a/Misc/NEWS.d/next/Library/2019-02-13-17-21-10.bpo-35907.ckk2zg.rst b/Misc/NEWS.d/next/Library/2019-02-13-17-21-10.bpo-35907.ckk2zg.rst
+new file mode 100644
+index 000000000000..8118a5f40583
+--- /dev/null
++++ b/Misc/NEWS.d/next/Library/2019-02-13-17-21-10.bpo-35907.ckk2zg.rst
+@@ -0,0 +1 @@
++Avoid file reading as disallowing the unnecessary URL scheme in urllib.urlopen
+\ No newline at end of file
+
+From f20a31c7364fecdd3197e0180a5857e23aa15065 Mon Sep 17 00:00:00 2001
+From: SH <push0ebp@gmail.com>
+Date: Fri, 17 May 2019 02:31:18 +0900
+Subject: [PATCH 3/6] Update 2019-02-13-17-21-10.bpo-35907.ckk2zg.rst
+
+Add prefix "CVE-2019-9948: "
+---
+ .../next/Library/2019-02-13-17-21-10.bpo-35907.ckk2zg.rst       | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Misc/NEWS.d/next/Library/2019-02-13-17-21-10.bpo-35907.ckk2zg.rst b/Misc/NEWS.d/next/Library/2019-02-13-17-21-10.bpo-35907.ckk2zg.rst
+index 8118a5f40583..bb187d8d65a5 100644
+--- a/Misc/NEWS.d/next/Library/2019-02-13-17-21-10.bpo-35907.ckk2zg.rst
++++ b/Misc/NEWS.d/next/Library/2019-02-13-17-21-10.bpo-35907.ckk2zg.rst
+@@ -1 +1 @@
+-Avoid file reading as disallowing the unnecessary URL scheme in urllib.urlopen
+\ No newline at end of file
++CVE-2019-9948: Avoid file reading as disallowing the unnecessary URL scheme in urllib.urlopen
+
+From 179a5f75f1121dab271fe8f90eb35145f9dcbbda Mon Sep 17 00:00:00 2001
+From: Sihoon Lee <push0ebp@gmail.com>
+Date: Fri, 17 May 2019 02:41:06 +0900
+Subject: [PATCH 4/6] Update test_urllib.py and urllib.py\nchange assertEqual
+ into assertRasies in DummyURLopener test, and simplify mitigation
+
+---
+ Lib/test/test_urllib.py | 11 +++--------
+ Lib/urllib.py           |  4 ++--
+ 2 files changed, 5 insertions(+), 10 deletions(-)
+
+diff --git a/Lib/test/test_urllib.py b/Lib/test/test_urllib.py
+index e5f210e62a18..1e23dfb0bb16 100644
+--- a/Lib/test/test_urllib.py
++++ b/Lib/test/test_urllib.py
+@@ -1027,14 +1027,9 @@ def test_local_file_open(self):
+         class DummyURLopener(urllib.URLopener):
+             def open_local_file(self, url):
+                 return url
+-        self.assertEqual(DummyURLopener().open(
+-            'local-file://example'), '//example')
+-        self.assertEqual(DummyURLopener().open(
+-            'local_file://example'), '//example')
+-        self.assertRaises(IOError, urllib.urlopen,
+-            'local-file://example')
+-        self.assertRaises(IOError, urllib.urlopen,
+-            'local_file://example')
++        for url in ('local_file://example', 'local-file://example'):
++            self.assertRaises(IOError, DummyURLopener().open, url)
++            self.assertRaises(IOError, urllib.urlopen, url)
+ # Just commented them out.
+ # Can't really tell why keep failing in windows and sparc.
+diff --git a/Lib/urllib.py b/Lib/urllib.py
+index a24e9a5c68fb..39b834054e9e 100644
+--- a/Lib/urllib.py
++++ b/Lib/urllib.py
+@@ -203,10 +203,10 @@ def open(self, fullurl, data=None):
+         name = 'open_' + urltype
+         self.type = urltype
+         name = name.replace('-', '_')
+-        
++
+         # bpo-35907: # disallow the file reading with the type not allowed
+         if not hasattr(self, name) or \
+-            (self == _urlopener and name == 'open_local_file'):
++            getattr(self, name) == self.open_local_file:
+             if proxy:
+                 return self.open_unknown_proxy(proxy, fullurl, data)
+             else:
+
+From 3cda03c00109f9c1ae0df1760ecd60915cef105e Mon Sep 17 00:00:00 2001
+From: SH <push0ebp@gmail.com>
+Date: Tue, 21 May 2019 22:21:15 +0900
+Subject: [PATCH 5/6] Update urllib.py
+
+Modify the object to string in check method name.
+---
+ Lib/urllib.py | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/Lib/urllib.py b/Lib/urllib.py
+index 39b834054e9e..0bf5f4d5a21b 100644
+--- a/Lib/urllib.py
++++ b/Lib/urllib.py
+@@ -205,8 +205,7 @@ def open(self, fullurl, data=None):
+         name = name.replace('-', '_')
+         # bpo-35907: # disallow the file reading with the type not allowed
+-        if not hasattr(self, name) or \
+-            getattr(self, name) == self.open_local_file:
++        if not hasattr(self, name) or name == 'open_local_file':
+             if proxy:
+                 return self.open_unknown_proxy(proxy, fullurl, data)
+             else:
+
+From 8b7d7abff8c633e29a8f10bbf9cc7d9e656b0eec Mon Sep 17 00:00:00 2001
+From: SH <push0ebp@gmail.com>
+Date: Wed, 22 May 2019 03:48:56 +0900
+Subject: [PATCH 6/6] Update urllib.py
+
+Fix typo
+---
+ Lib/urllib.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Lib/urllib.py b/Lib/urllib.py
+index 0bf5f4d5a21b..156879dd0a14 100644
+--- a/Lib/urllib.py
++++ b/Lib/urllib.py
+@@ -204,7 +204,7 @@ def open(self, fullurl, data=None):
+         self.type = urltype
+         name = name.replace('-', '_')
+-        # bpo-35907: # disallow the file reading with the type not allowed
++        # bpo-35907: disallow the file reading with the type not allowed
+         if not hasattr(self, name) or name == 'open_local_file':
+             if proxy:
+                 return self.open_unknown_proxy(proxy, fullurl, data)
diff --git a/lang/python/python/patches/024-musl-find_library.patch b/lang/python/python/patches/024-musl-find_library.patch
new file mode 100644 (file)
index 0000000..70b5159
--- /dev/null
@@ -0,0 +1,74 @@
+https://bugs.python.org/issue21622
+
+Based on the patch from Alpine Linux
+https://git.alpinelinux.org/aports/tree/main/python2/musl-find_library.patch
+
+--- a/Lib/ctypes/util.py
++++ b/Lib/ctypes/util.py
+@@ -86,6 +86,8 @@ if os.name == "posix" and sys.platform =
+ elif os.name == "posix":
+     # Andreas Degert's find functions, using gcc, /sbin/ldconfig, objdump
+     import re, tempfile, errno
++    from glob import glob
++    musl_ldso = glob('/lib/ld-musl-*.so.1')
+     def _findLib_gcc(name):
+         # Run GCC's linker with the -t (aka --trace) option and examine the
+@@ -232,6 +234,57 @@ elif os.name == "posix":
+         def find_library(name, is64 = False):
+             return _get_soname(_findLib_crle(name, is64) or _findLib_gcc(name))
++    elif musl_ldso and os.path.isfile(musl_ldso[0]):
++
++        def _is_elf(filepath):
++            try:
++                with open(filepath, 'rb') as fh:
++                    return fh.read(4) == b'\x7fELF'
++            except:
++                return False
++
++        def find_library(name):
++            # absolute name?
++            if os.path.isabs(name):
++                if _is_elf(name):
++                    return name
++                else:
++                    return None
++
++            # special case for unified standard libs
++            stdlibs = ['libcrypt.so', 'libdl.so', 'libm.so', 'libpthread.so', 'libresolv.so', 'librt.so', 'libutil.so', 'libxnet.so']
++            if name in stdlibs:
++                name = 'libc.so'
++            elif ('lib' + name + '.so') in stdlibs:
++                name = 'c'
++
++            paths = []
++            # read path list from /etc/ld-musl-$(ARCH).path
++            path_list = musl_ldso[0].replace('/lib/', '/etc/').replace('.so.1', '.path')
++            try:
++                with open(path_list, 'r') as fh:
++                    paths = [path for line in fh for path in line.rstrip('\n').split(':') if path]
++            except:
++                paths = []
++            # default path list if /etc/ld-musl-$(ARCH).path is empty or does not exist
++            if not paths:
++                paths = ['/lib', '/usr/local/lib', '/usr/lib']
++
++            # prepend paths from LD_LIBRARY_PATH
++            if 'LD_LIBRARY_PATH' in os.environ:
++                paths = os.environ['LD_LIBRARY_PATH'].split(':') + paths
++
++            for d in paths:
++                f = os.path.join(d, name)
++                if _is_elf(f):
++                    return os.path.basename(f)
++
++                prefix = os.path.join(d, 'lib'+name)
++                for suffix in ['.so', '.so.*']:
++                    for f in glob('{0}{1}'.format(prefix, suffix)):
++                        if _is_elf(f):
++                            return os.path.basename(f)
++
+     else:
+         def _findSoname_ldconfig(name):
diff --git a/lang/python/python/patches/025-utime.patch b/lang/python/python/patches/025-utime.patch
new file mode 100644 (file)
index 0000000..20d0310
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/Modules/posixmodule.c
++++ b/Modules/posixmodule.c
+@@ -3070,7 +3070,7 @@ done:
+     if (arg == Py_None) {
+         /* optional time values not given */
+         Py_BEGIN_ALLOW_THREADS
+-        res = utime(path, NULL);
++        res = utimes(path, NULL);
+         Py_END_ALLOW_THREADS
+     }
+     else if (!PyTuple_Check(arg) || PyTuple_Size(arg) != 2) {
diff --git a/lang/python/python/patches/027-bpo-38243-Escape-the-server-title-of-DocXMLRPCServer.patch b/lang/python/python/patches/027-bpo-38243-Escape-the-server-title-of-DocXMLRPCServer.patch
new file mode 100644 (file)
index 0000000..5b90eb9
--- /dev/null
@@ -0,0 +1,159 @@
+From b41cde823d026f2adc21ef14b1c2e92b1006de06 Mon Sep 17 00:00:00 2001
+From: Dong-hee Na <donghee.na92@gmail.com>
+Date: Sat, 28 Sep 2019 10:17:25 +0900
+Subject: [PATCH 1/3] [2.7] bpo-38243: Escape the server title of
+ DocXMLRPCServer when rendering
+
+---
+ Lib/DocXMLRPCServer.py                        | 10 +++++++++-
+ Lib/test/test_docxmlrpc.py                    | 20 +++++++++++++++++++
+ .../2019-09-25-13-21-09.bpo-38243.1pfz24.rst  |  3 +++
+ 3 files changed, 32 insertions(+), 1 deletion(-)
+ create mode 100644 Misc/NEWS.d/next/Security/2019-09-25-13-21-09.bpo-38243.1pfz24.rst
+
+diff --git a/Lib/DocXMLRPCServer.py b/Lib/DocXMLRPCServer.py
+index 4064ec2e48d4d..a0e407b6318ad 100644
+--- a/Lib/DocXMLRPCServer.py
++++ b/Lib/DocXMLRPCServer.py
+@@ -210,7 +210,15 @@ def generate_html_documentation(self):
+                                 methods
+                             )
+-        return documenter.page(self.server_title, documentation)
++        escape_table = {
++            "&": "&amp;",
++            '"': "&quot;",
++            "'": "&#x27;",
++            ">": "&gt;",
++            "<": "&lt;",
++        }
++        title = ''.join(escape_table.get(c, c) for c in self.server_title)
++        return documenter.page(title, documentation)
+ class DocXMLRPCRequestHandler(SimpleXMLRPCRequestHandler):
+     """XML-RPC and documentation request handler class.
+diff --git a/Lib/test/test_docxmlrpc.py b/Lib/test/test_docxmlrpc.py
+index 4dff4159e2466..c45b892b8b3e7 100644
+--- a/Lib/test/test_docxmlrpc.py
++++ b/Lib/test/test_docxmlrpc.py
+@@ -1,5 +1,6 @@
+ from DocXMLRPCServer import DocXMLRPCServer
+ import httplib
++import re
+ import sys
+ from test import test_support
+ threading = test_support.import_module('threading')
+@@ -176,6 +177,25 @@ def test_autolink_dotted_methods(self):
+         self.assertIn("""Try&nbsp;self.<strong>add</strong>,&nbsp;too.""",
+                       response.read())
++    def test_server_title_escape(self):
++        """Test that the server title and documentation
++        are escaped for HTML.
++        """
++        self.serv.set_server_title('test_title<script>')
++        self.serv.set_server_documentation('test_documentation<script>')
++        self.assertEqual('test_title<script>', self.serv.server_title)
++        self.assertEqual('test_documentation<script>',
++                self.serv.server_documentation)
++
++        generated = self.serv.generate_html_documentation()
++        title = re.search(r'<title>(.+?)</title>', generated).group()
++        documentation = re.search(r'<p><tt>(.+?)</tt></p>', generated).group()
++        self.assertEqual('<title>Python: test_title&lt;script&gt;</title>',
++                title)
++        self.assertEqual('<p><tt>test_documentation&lt;script&gt;</tt></p>',
++                documentation)
++
++
+ def test_main():
+     test_support.run_unittest(DocXMLRPCHTTPGETServer)
+diff --git a/Misc/NEWS.d/next/Security/2019-09-25-13-21-09.bpo-38243.1pfz24.rst b/Misc/NEWS.d/next/Security/2019-09-25-13-21-09.bpo-38243.1pfz24.rst
+new file mode 100644
+index 0000000000000..8f02baed9ebe5
+--- /dev/null
++++ b/Misc/NEWS.d/next/Security/2019-09-25-13-21-09.bpo-38243.1pfz24.rst
+@@ -0,0 +1,3 @@
++Escape the server title of :class:`DocXMLRPCServer.DocXMLRPCServer`
++when rendering the document page as HTML.
++(Contributed by Dong-hee Na in :issue:`38243`.)
+
+From 00251ae0244cfae1f5a77d15f3d0415c12b65ada Mon Sep 17 00:00:00 2001
+From: Dong-hee Na <donghee.na92@gmail.com>
+Date: Tue, 1 Oct 2019 09:31:33 +0900
+Subject: [PATCH 2/3] bpo-38243:Refect victor's review
+
+---
+ Lib/DocXMLRPCServer.py | 20 ++++++++++++--------
+ 1 file changed, 12 insertions(+), 8 deletions(-)
+
+diff --git a/Lib/DocXMLRPCServer.py b/Lib/DocXMLRPCServer.py
+index a0e407b6318ad..6ab41c31b403e 100644
+--- a/Lib/DocXMLRPCServer.py
++++ b/Lib/DocXMLRPCServer.py
+@@ -20,6 +20,17 @@
+             CGIXMLRPCRequestHandler,
+             resolve_dotted_attribute)
++
++def _html_escape_quote(s, quote=True):
++    s = s.replace("&", "&amp;") # Must be done first!
++    s = s.replace("<", "&lt;")
++    s = s.replace(">", "&gt;")
++    if quote:
++        s = s.replace('"', "&quot;")
++        s = s.replace('\'', "&#x27;")
++    return s
++
++
+ class ServerHTMLDoc(pydoc.HTMLDoc):
+     """Class used to generate pydoc HTML document for a server"""
+@@ -210,14 +221,7 @@ def generate_html_documentation(self):
+                                 methods
+                             )
+-        escape_table = {
+-            "&": "&amp;",
+-            '"': "&quot;",
+-            "'": "&#x27;",
+-            ">": "&gt;",
+-            "<": "&lt;",
+-        }
+-        title = ''.join(escape_table.get(c, c) for c in self.server_title)
++        title = _html_escape_quote(self.server_title)
+         return documenter.page(title, documentation)
+ class DocXMLRPCRequestHandler(SimpleXMLRPCRequestHandler):
+
+From 09b17d8230a24586e417d52c332058f541d47999 Mon Sep 17 00:00:00 2001
+From: Dong-hee Na <donghee.na92@gmail.com>
+Date: Tue, 1 Oct 2019 19:35:34 +0900
+Subject: [PATCH 3/3] bpo-38243: Update
+
+---
+ Lib/DocXMLRPCServer.py | 7 +++----
+ 1 file changed, 3 insertions(+), 4 deletions(-)
+
+diff --git a/Lib/DocXMLRPCServer.py b/Lib/DocXMLRPCServer.py
+index 6ab41c31b403e..90b037dd35d6b 100644
+--- a/Lib/DocXMLRPCServer.py
++++ b/Lib/DocXMLRPCServer.py
+@@ -21,13 +21,12 @@
+             resolve_dotted_attribute)
+-def _html_escape_quote(s, quote=True):
++def _html_escape_quote(s):
+     s = s.replace("&", "&amp;") # Must be done first!
+     s = s.replace("<", "&lt;")
+     s = s.replace(">", "&gt;")
+-    if quote:
+-        s = s.replace('"', "&quot;")
+-        s = s.replace('\'', "&#x27;")
++    s = s.replace('"', "&quot;")
++    s = s.replace('\'', "&#x27;")
+     return s
diff --git a/lang/python/python/patches/028-bpo-34155-Dont-parse-domains-containing-GH-13079.patch b/lang/python/python/patches/028-bpo-34155-Dont-parse-domains-containing-GH-13079.patch
new file mode 100644 (file)
index 0000000..0be3e4e
--- /dev/null
@@ -0,0 +1,80 @@
+From c2828900ec85e1e2957016e1e078de3a9677a963 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Roberto=20C=2E=20S=C3=A1nchez?= <roberto@connexer.com>
+Date: Tue, 10 Sep 2019 21:48:34 -0400
+Subject: [PATCH] [2.7] bpo-34155: Dont parse domains containing @ (GH-13079)
+
+https://bugs.python.org/issue34155
+(cherry picked from commit 8cb65d1381b027f0b09ee36bfed7f35bb4dec9a9)
+
+Excludes changes to Lib/email/_header_value_parser.py, which did not
+exist in 2.7.
+
+Co-authored-by: jpic <jpic@users.noreply.github.com>
+---
+ Lib/email/_parseaddr.py                            | 11 ++++++++++-
+ Lib/email/test/test_email.py                       | 14 ++++++++++++++
+ .../2019-05-04-13-33-37.bpo-34155.MJll68.rst       |  1 +
+ 3 files changed, 25 insertions(+), 1 deletion(-)
+ create mode 100644 Misc/NEWS.d/next/Security/2019-05-04-13-33-37.bpo-34155.MJll68.rst
+
+diff --git a/Lib/email/_parseaddr.py b/Lib/email/_parseaddr.py
+index 690db2c22d34d..dc49d2e45a5eb 100644
+--- a/Lib/email/_parseaddr.py
++++ b/Lib/email/_parseaddr.py
+@@ -336,7 +336,12 @@ def getaddrspec(self):
+         aslist.append('@')
+         self.pos += 1
+         self.gotonext()
+-        return EMPTYSTRING.join(aslist) + self.getdomain()
++        domain = self.getdomain()
++        if not domain:
++            # Invalid domain, return an empty address instead of returning a
++            # local part to denote failed parsing.
++            return EMPTYSTRING
++        return EMPTYSTRING.join(aslist) + domain
+     def getdomain(self):
+         """Get the complete domain name from an address."""
+@@ -351,6 +356,10 @@ def getdomain(self):
+             elif self.field[self.pos] == '.':
+                 self.pos += 1
+                 sdlist.append('.')
++            elif self.field[self.pos] == '@':
++                # bpo-34155: Don't parse domains with two `@` like
++                # `a@malicious.org@important.com`.
++                return EMPTYSTRING
+             elif self.field[self.pos] in self.atomends:
+                 break
+             else:
+diff --git a/Lib/email/test/test_email.py b/Lib/email/test/test_email.py
+index 4b4dee3d34644..2efe44ac5a73f 100644
+--- a/Lib/email/test/test_email.py
++++ b/Lib/email/test/test_email.py
+@@ -2306,6 +2306,20 @@ def test_parseaddr_empty(self):
+         self.assertEqual(Utils.parseaddr('<>'), ('', ''))
+         self.assertEqual(Utils.formataddr(Utils.parseaddr('<>')), '')
++    def test_parseaddr_multiple_domains(self):
++        self.assertEqual(
++            Utils.parseaddr('a@b@c'),
++            ('', '')
++        )
++        self.assertEqual(
++            Utils.parseaddr('a@b.c@c'),
++            ('', '')
++        )
++        self.assertEqual(
++            Utils.parseaddr('a@172.17.0.1@c'),
++            ('', '')
++        )
++
+     def test_noquote_dump(self):
+         self.assertEqual(
+             Utils.formataddr(('A Silly Person', 'person@dom.ain')),
+diff --git a/Misc/NEWS.d/next/Security/2019-05-04-13-33-37.bpo-34155.MJll68.rst b/Misc/NEWS.d/next/Security/2019-05-04-13-33-37.bpo-34155.MJll68.rst
+new file mode 100644
+index 0000000000000..50292e29ed1d2
+--- /dev/null
++++ b/Misc/NEWS.d/next/Security/2019-05-04-13-33-37.bpo-34155.MJll68.rst
+@@ -0,0 +1 @@
++Fix parsing of invalid email addresses with more than one ``@`` (e.g. a@b@c.com.) to not return the part before 2nd ``@`` as valid email address. Patch by maxking & jpic.
index 09cd6ee5691b1e070cb87bb083c064c5ac8135ff..a6c099e28ca85165361b0e7f826bb28d93253a24 100644 (file)
@@ -8,30 +8,27 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python3-bottle
-PKG_VERSION:=0.12.16
+PKG_VERSION:=0.12.17
 PKG_RELEASE:=1
 
+PKG_SOURCE:=bottle-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/b/bottle
+PKG_HASH:=e9eaa412a60cc3d42ceb42f58d15864d9ed1b92e9d630b8130c871c5bb16107c
+PKG_BUILD_DIR:=$(BUILD_DIR)/bottle-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>
 PKG_LICENSE:=MIT
 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:=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
        SUBMENU:=Python
-       TITLE:=Bottle is a fast, simple and lightweight WSGI micro web-framework for Python
+       TITLE:=Fast and simple WSGI-framework for small web-applications
        URL:=https://bottlepy.org
        DEPENDS:=+python3
        VARIANT:=python3
diff --git a/lang/python/python3-flask-login/Makefile b/lang/python/python3-flask-login/Makefile
new file mode 100644 (file)
index 0000000..67df225
--- /dev/null
@@ -0,0 +1,44 @@
+#
+# 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:=Flask-Login
+PKG_VERSION:=0.4.1
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/f/flask-login/
+PKG_HASH:=c815c1ac7b3e35e2081685e389a665f2c74d7e077cb93cecabaea352da4752ec
+
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-flask-login
+  SECTION:=lang
+  CATEGORY:=Languages
+  SUBMENU:=Python
+  TITLE:=User session management plugin for Flask
+  URL:=https://github.com/maxcountryman/flask-login
+  DEPENDS:=+python3-light +python3-flask
+  VARIANT:=python3
+endef
+
+define Package/python3-flask-login/description
+  Flask-Login provides user session management for Flask.
+  It handles the common tasks of logging in, logging out,
+  and remembering your users’ sessions over extended periods of time.
+endef
+
+$(eval $(call Py3Package,python3-flask-login))
+$(eval $(call BuildPackage,python3-flask-login))
+$(eval $(call BuildPackage,python3-flask-login-src))
diff --git a/lang/python/python3-maxminddb/Makefile b/lang/python/python3-maxminddb/Makefile
new file mode 100644 (file)
index 0000000..25315b9
--- /dev/null
@@ -0,0 +1,42 @@
+#
+# 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:=maxminddb
+PKG_VERSION:=1.5.1
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/m/maxminddb/
+PKG_HASH:=449a1713d37320d777d0db286286ab22890f0a176492ecf3ad8d9319108f2f79
+
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=LICENSE
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-maxminddb
+  SECTION:=lang
+  CATEGORY:=Languages
+  SUBMENU:=Python
+  TITLE:=Reader for the MaxMind DB format
+  URL:=https://dev.maxmind.com/
+  DEPENDS:=+python3-light +libmaxminddb
+  VARIANT:=python3
+endef
+
+define Package/python3-maxminddb/description
+  Module for reading MaxMind DB files
+endef
+
+$(eval $(call Py3Package,python3-maxminddb))
+$(eval $(call BuildPackage,python3-maxminddb))
+$(eval $(call BuildPackage,python3-maxminddb-src))
index 6e163e099d907fcf6918d49c8aba6878eff1a008..d20d19801a0497d13209c329ba197c78d3d50095 100644 (file)
@@ -34,6 +34,10 @@ ifdef CONFIG_USE_MIPS16
   TARGET_CFLAGS += -mno-mips16 -mno-interlink-mips16
 endif
 
+define Py3Shebang
+$(SED) "1"'!'"b;s,^#"'!'".*python.*,#"'!'"/usr/bin/python3," -i --follow-symlinks $(1)
+endef
+
 define Py3Package
 
   define Package/$(1)-src
@@ -44,6 +48,7 @@ define Py3Package
     EXTRA_DEPENDS:=
     TITLE+= (sources)
     USERID:=
+    MENU:=
   endef
 
   define Package/$(1)-src/description
@@ -72,12 +77,14 @@ define Py3Package
 
   define Package/$(1)/install
        $$(call Py3Package/$(1)/install,$$(1))
-       SED="$(SED)" \
        $(SHELL) $(python3_mk_path)python-package-install.sh "3" \
                "$(PKG_INSTALL_DIR)" "$$(1)" \
                "$(HOST_PYTHON3_BIN)" "$$(2)" \
-               "$$$$$$$$$$(call shvar,Py3Package/$(1)/filespec)"
-  endef
+               "$$$$$$$$$$(call shvar,Py3Package/$(1)/filespec)" && \
+       if [ -d "$$(1)/usr/bin" ]; then \
+               $(call Py3Shebang,$$(1)/usr/bin/*) ; \
+       fi
+ endef
 
   define Package/$(1)-src/install
        $$(call Package/$(1)/install,$$(1),sources)
index 83c28b00545032d87c6cd8f75424904fe0437c8e..1488e6dc28f85214ac529535d21b1811da49d74e 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python3-pyroute2
-PKG_VERSION:=0.5.5
+PKG_VERSION:=0.5.6
 PKG_RELEASE:=1
 
 PKG_SOURCE:=pyroute2-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/pyroute2
-PKG_HASH:=ad679a91d453fe8426c4076d0da3a67265e5ccfe641879d75c9bc7660d075dfa
+PKG_HASH:=deae0e6191a04c3ee213c6fae6ed779602ef5da5ca5e2fa533f27bc04326bfbe
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/pyroute2-$(PKG_VERSION)
 
@@ -29,7 +29,7 @@ define Package/python3-pyroute2
   SECTION:=lang
   CATEGORY:=Languages
   TITLE:=Python netlink library
-  URL:=http://github.com/svinota/pyroute2
+  URL:=https://github.com/svinota/pyroute2
   DEPENDS:= \
          +python3-light \
          +python3-distutils \
index caac016506fae63f16efebbe3e309130e6d7d072..f3d505f29e81efb43b75e7cdb6a1f0c7b9b80a0f 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python3-unidecode
-PKG_VERSION:=1.0.23
+PKG_VERSION:=1.1.1
 PKG_RELEASE:=1
 
 PKG_SOURCE:=Unidecode-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/u/unidecode/
-PKG_HASH:=8b85354be8fd0c0e10adbf0675f6dc2310e56fda43fa8fe049123b6c475e52fb
+PKG_HASH:=2b6aab710c2a1647e928e36d69c21e76b453cd455f4e2621000e54b2a9b8cce8
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/Unidecode-$(PKG_VERSION)
 
@@ -35,7 +35,7 @@ define Package/python3-unidecode
 endef
 
 define Package/python-unidecode/description
-Unidecode, lossy ASCII transliterations of Unicode text
+  Unidecode, lossy ASCII transliterations of Unicode text
 endef
 
 $(eval $(call Py3Package,$(PKG_NAME)))
index 784ec1778d89dc8d46ca2f520c7f3bd7f0011bf6..93c01e9908ea1c06945e4ed4a10ab9decf045e71 100644 (file)
@@ -8,12 +8,12 @@
 # Note: keep in sync with setuptools & pip
 PYTHON3_VERSION_MAJOR:=3
 PYTHON3_VERSION_MINOR:=7
-PYTHON3_VERSION_MICRO:=2
+PYTHON3_VERSION_MICRO:=4
 
 PYTHON3_VERSION:=$(PYTHON3_VERSION_MAJOR).$(PYTHON3_VERSION_MINOR)
 
-PYTHON3_SETUPTOOLS_PKG_RELEASE:=3
-PYTHON3_PIP_PKG_RELEASE:=2
+PYTHON3_SETUPTOOLS_PKG_RELEASE:=1
+PYTHON3_PIP_PKG_RELEASE:=1
 
-PYTHON3_SETUPTOOLS_VERSION:=40.6.2
-PYTHON3_PIP_VERSION:=18.1
+PYTHON3_SETUPTOOLS_VERSION:=40.8.0
+PYTHON3_PIP_VERSION:=19.0.3
index 2ade6df9c6bca9561529197708ce5b9033dc00a6..10842f12c1fe78832f329eca72739a2e8e84a716 100644 (file)
@@ -14,19 +14,18 @@ PYTHON_VERSION:=$(PYTHON3_VERSION)
 PYTHON_VERSION_MICRO:=$(PYTHON3_VERSION_MICRO)
 
 PKG_NAME:=python3
-PKG_RELEASE:=12
+PKG_RELEASE:=5
 PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO)
 
 PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://www.python.org/ftp/python/$(PKG_VERSION)
-PKG_HASH:=d83fe8ce51b1bb48bbcf0550fd265b9a75cdfdfa93f916f9e700aef8444bf1bb
+PKG_HASH:=fb799134b868199930b75f26678f18932214042639cd52b16da7fd134cd9b13f
 
+PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>, Jeffery To <jeffery.to@gmail.com>
 PKG_LICENSE:=Python/2.0
 PKG_LICENSE_FILES:=LICENSE Doc/copyright.rst Doc/license.rst Modules/_ctypes/darwin/LICENSE Modules/_ctypes/libffi_osx/LICENSE Modules/expat/COPYING
 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
 
@@ -42,6 +41,7 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/Python-$(PKG_VERSION)
 HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/Python-$(PKG_VERSION)
 
 PKG_CONFIG_DEPENDS:= \
+       CONFIG_PACKAGE_python3-pkg-resources \
        CONFIG_PACKAGE_python3-setuptools CONFIG_PACKAGE_python3-pip \
        CONFIG_PYTHON3_BLUETOOTH_SUPPORT
 
@@ -173,6 +173,14 @@ define Build/Prepare
 endef
 
 ifdef CONFIG_PACKAGE_python3-setuptools
+PYTHON3_SETUPTOOLS_BUILD:=1
+endif
+
+ifdef CONFIG_PACKAGE_python3-pkg-resources
+PYTHON3_SETUPTOOLS_BUILD:=1
+endif
+
+ifeq ($(PYTHON3_SETUPTOOLS_BUILD),1)
 define Build/Compile/python3-setuptools
        $(HOST_PYTHON3_PIP) \
                --disable-pip-version-check \
@@ -209,7 +217,7 @@ endef
 
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib $(1)/usr/lib/pkgconfig
-       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_DIR) $(2)/bin
        $(CP) \
                $(PKG_INSTALL_DIR)/usr/include/python$(PYTHON_VERSION) \
                $(1)/usr/include/
@@ -222,7 +230,10 @@ define Build/InstallDev
                $(1)/usr/lib/pkgconfig
        $(INSTALL_BIN) \
                $(PKG_INSTALL_DIR)/usr/bin/python$(PYTHON_VERSION)-config \
-               $(1)/usr/bin/
+               $(2)/bin/
+       $(SED) \
+               's|^prefix_real=.*$$$$|prefix_real="$(PYTHON3_DIR)"|' \
+               $(2)/bin/python$(PYTHON_VERSION)-config
 endef
 
 PYTHON3_BASE_LIB_FILES:= \
@@ -283,13 +294,18 @@ define Py3Package/python3/filespec
 endef
 
 HOST_LDFLAGS += \
-       $$$$(pkg-config --static --libs libcrypto libssl) -Wl$(comma)-rpath=$(STAGING_DIR_HOSTPKG)/lib
+       -Wl$(comma)-rpath$(comma)$(STAGING_DIR_HOSTPKG)/lib
 
 ifeq ($(HOST_OS),Linux)
 HOST_LDFLAGS += \
        -Wl,--no-as-needed -lrt
 endif
 
+ifeq ($(HOST_OS),Darwin)
+HOST_CONFIGURE_VARS += \
+       ac_cv_header_libintl_h=no
+endif
+
 HOST_CONFIGURE_ARGS+= \
        --without-cxx-main \
        --without-pymalloc \
diff --git a/lang/python/python3/files/python3-package-pkg-resources.mk b/lang/python/python3/files/python3-package-pkg-resources.mk
new file mode 100644 (file)
index 0000000..592fe2c
--- /dev/null
@@ -0,0 +1,30 @@
+#
+# 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-pkg-resources
+$(call Package/python3/Default)
+  TITLE:=Python $(PYTHON3_VERSION) pkg_resources module (part of setuptools)
+  VERSION:=$(PYTHON3_SETUPTOOLS_VERSION)-$(PYTHON3_SETUPTOOLS_PKG_RELEASE)
+  LICENSE:=MIT
+  LICENSE_FILES:=LICENSE
+#  CPE_ID:=cpe:/a:python:setuptools # not currently handled this way by uscan
+  DEPENDS:=+python3
+endef
+
+define Py3Package/python3-pkg-resources/install
+       $(INSTALL_DIR) $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages
+       $(CP) \
+               $(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON3_VERSION)/site-packages/pkg_resources \
+               $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages
+       find $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/ -path '*/__pycache__/*' -delete
+       find $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/ -type d -name __pycache__ -delete
+endef
+
+$(eval $(call Py3BasePackage,python3-pkg-resources, \
+       , \
+       DO_NOT_ADD_TO_PACKAGE_DEPENDS \
+))
index b3ccce895c4df483b7c410b6c354e24c9b45f98a..64a86b81d621c9bf1b881063129babf70f56c42f 100644 (file)
@@ -12,7 +12,7 @@ $(call Package/python3/Default)
   LICENSE:=MIT
   LICENSE_FILES:=LICENSE
 #  CPE_ID:=cpe:/a:python:setuptools # not currently handled this way by uscan
-  DEPENDS:=+python3
+  DEPENDS:=+python3 +python3-pkg-resources
 endef
 
 define Py3Package/python3-setuptools/install
@@ -20,7 +20,6 @@ define Py3Package/python3-setuptools/install
        $(CP) $(PKG_BUILD_DIR)/install-setuptools/usr/bin/easy_install-* $(1)/usr/bin
        $(LN) easy_install-$(PYTHON3_VERSION) $(1)/usr/bin/easy_install-3
        $(CP) \
-               $(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON3_VERSION)/site-packages/pkg_resources \
                $(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON3_VERSION)/site-packages/setuptools \
                $(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON3_VERSION)/site-packages/setuptools-$(PYTHON3_SETUPTOOLS_VERSION).dist-info \
                $(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON3_VERSION)/site-packages/easy_install.py \
index e4fabd43e5596452def8b5a7a144ec740f05dade..bfd415d773013d9e131d3438cc7ba904155dbcbe 100644 (file)
@@ -1,6 +1,6 @@
 --- a/Makefile.pre.in
 +++ b/Makefile.pre.in
-@@ -1389,6 +1389,7 @@ libinstall:      build_all $(srcdir)/Modules/
+@@ -1391,6 +1391,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 ; \
-@@ -1424,6 +1425,7 @@ libinstall:      build_all $(srcdir)/Modules/
+@@ -1426,6 +1427,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 72d31be9ad3b7e9d4630fdebb3b02e3f0fb3655f..c4914f27875167567383ce8d5c27a66c774cf7cb 100644 (file)
@@ -1,6 +1,6 @@
 --- a/setup.py
 +++ b/setup.py
-@@ -542,16 +542,9 @@ class PyBuildExt(build_ext):
+@@ -581,16 +581,9 @@ class PyBuildExt(build_ext):
              os.unlink(tmpfile)
  
      def detect_modules(self):
diff --git a/lang/python/python3/patches/008-distutils-use-python-sysroot.patch b/lang/python/python3/patches/008-distutils-use-python-sysroot.patch
new file mode 100644 (file)
index 0000000..f218c46
--- /dev/null
@@ -0,0 +1,60 @@
+From e359a7a3c4f9e70360a068bef19c95938fdacede Mon Sep 17 00:00:00 2001
+From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+Date: Wed, 23 Dec 2015 11:33:14 +0100
+Subject: [PATCH] Adjust library/header paths for cross-compilation
+
+When cross-compiling third-party extensions, the get_python_inc() or
+get_python_lib() can be called, to return the path to headers or
+libraries. However, they use the sys.prefix of the host Python, which
+returns incorrect paths when cross-compiling (paths pointing to host
+headers and libraries).
+
+In order to fix this, we introduce the _python_sysroot, _python_prefix
+and _python_exec_prefix variables, that allow to override these
+values, and get correct header/library paths when cross-compiling
+third-party Python modules.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+---
+ Lib/distutils/command/build_ext.py |  5 ++++-
+ Lib/distutils/sysconfig.py         | 15 +++++++++++----
+ 2 files changed, 15 insertions(+), 5 deletions(-)
+
+--- a/Lib/distutils/command/build_ext.py
++++ b/Lib/distutils/command/build_ext.py
+@@ -234,7 +234,10 @@ class build_ext(Command):
+         if (sysconfig.get_config_var('Py_ENABLE_SHARED')):
+             if not sysconfig.python_build:
+                 # building third party extensions
+-                self.library_dirs.append(sysconfig.get_config_var('LIBDIR'))
++                libdir = sysconfig.get_config_var('LIBDIR')
++                if "_python_sysroot" in os.environ:
++                    libdir = os.environ.get("_python_sysroot") + libdir
++                self.library_dirs.append(libdir)
+             else:
+                 # building python standard extensions
+                 self.library_dirs.append('.')
+--- a/Lib/distutils/sysconfig.py
++++ b/Lib/distutils/sysconfig.py
+@@ -17,10 +17,17 @@ import sys
+ from .errors import DistutilsPlatformError
+ # These are needed in a couple of spots, so just compute them once.
+-PREFIX = os.path.normpath(sys.prefix)
+-EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
+-BASE_PREFIX = os.path.normpath(sys.base_prefix)
+-BASE_EXEC_PREFIX = os.path.normpath(sys.base_exec_prefix)
++if "_python_sysroot" in os.environ:
++    _sysroot=os.environ.get('_python_sysroot')
++    PREFIX = os.path.normpath(_sysroot + os.environ.get('_python_prefix'))
++    EXEC_PREFIX = os.path.normpath(_sysroot + os.environ.get('_python_exec_prefix'))
++    BASE_PREFIX = PREFIX
++    BASE_EXEC_PREFIX = EXEC_PREFIX
++else:
++    PREFIX = os.path.normpath(sys.prefix)
++    EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
++    BASE_PREFIX = os.path.normpath(sys.base_prefix)
++    BASE_EXEC_PREFIX = os.path.normpath(sys.base_exec_prefix)
+ # Path to the base directory of the project. On Windows the binary may
+ # live in project/PCbuild/win32 or project/PCbuild/amd64.
index c5d11d232b5008fe1a32e76eb9b09d568c206e34..12544b2d67e3053f4dac2900543e7b5e453a49ba 100644 (file)
@@ -1,6 +1,6 @@
 --- a/setup.py
 +++ b/setup.py
-@@ -552,8 +552,9 @@ class PyBuildExt(build_ext):
+@@ -591,8 +591,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 a31f4c7d26fa7ad71caac2f52a82da3458e2f4ee..d37ed8aa5d034a67f9bd236717798b95b2f05c65 100644 (file)
@@ -1,6 +1,6 @@
 --- a/Makefile.pre.in
 +++ b/Makefile.pre.in
-@@ -751,6 +751,16 @@ regen-all: regen-opcode regen-opcode-tar
+@@ -753,6 +753,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) \
-@@ -758,6 +768,8 @@ Modules/getbuildinfo.o: $(PARSER_OBJS) \
+@@ -760,6 +770,8 @@ Modules/getbuildinfo.o: $(PARSER_OBJS) \
                $(MODOBJS) \
                $(srcdir)/Modules/getbuildinfo.c
        $(CC) -c $(PY_CORE_CFLAGS) \
index b9d3cd1653b1de216a2a2decca16e2de73f1d796..c87086b8f0b741e5ff21784b2696e7f1a450769d 100644 (file)
@@ -1,6 +1,6 @@
 --- a/configure
 +++ b/configure
-@@ -15129,7 +15129,7 @@ $as_echo_n "checking ABIFLAGS... " >&6;
+@@ -15273,7 +15273,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
-@@ -4719,7 +4719,7 @@ AC_SUBST(SOABI)
+@@ -4736,7 +4736,7 @@ AC_SUBST(SOABI)
  AC_MSG_CHECKING(ABIFLAGS)
  AC_MSG_RESULT($ABIFLAGS)
  AC_MSG_CHECKING(SOABI)
index 5150b77e882ac3a906b7e24a3e34e9764a6b8fb7..effa0b1d31f86a1da08040a6a00a7709ea370c38 100644 (file)
@@ -1,6 +1,6 @@
 --- a/setup.py
 +++ b/setup.py
-@@ -359,6 +359,7 @@ class PyBuildExt(build_ext):
+@@ -398,6 +398,7 @@ class PyBuildExt(build_ext):
              print("Failed to build these modules:")
              print_three_column(failed)
              print()
index 3749a1590b24e3da36dab5ff3bba0266c7f13715..c9e1599dc402f82bf0c3df3e9ab805bcd5251229 100644 (file)
@@ -1,6 +1,6 @@
 --- a/Lib/distutils/sysconfig.py
 +++ b/Lib/distutils/sysconfig.py
-@@ -421,6 +421,7 @@ def _init_posix():
+@@ -446,6 +446,7 @@ def _init_posix():
          platform=sys.platform,
          multiarch=getattr(sys.implementation, '_multiarch', ''),
      ))
@@ -10,7 +10,7 @@
      global _config_vars
 --- a/Lib/sysconfig.py
 +++ b/Lib/sysconfig.py
-@@ -337,6 +337,7 @@ def get_makefile_filename():
+@@ -344,6 +344,7 @@ def get_makefile_filename():
  
  
  def _get_sysconfigdata_name():
@@ -20,7 +20,7 @@
          abi=sys.abiflags,
 --- a/Makefile.pre.in
 +++ b/Makefile.pre.in
-@@ -1398,7 +1398,7 @@ libinstall:      build_all $(srcdir)/Modules/
+@@ -1400,7 +1400,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)
-@@ -1543,7 +1543,7 @@ sharedinstall: sharedmods
+@@ -1545,7 +1545,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
-@@ -15148,7 +15148,7 @@ LDVERSION='$(VERSION)$(ABIFLAGS)'
+@@ -15292,7 +15292,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
-@@ -4736,7 +4736,7 @@ AC_MSG_RESULT($LDVERSION)
+@@ -4753,7 +4753,7 @@ AC_MSG_RESULT($LDVERSION)
  
  dnl define LIBPL after ABIFLAGS and LDVERSION is defined.
  AC_SUBST(PY_ENABLE_SHARED)
index 5972914bdb9f5914440471414022d3921f41efa2..ab55f39660aa50f32dfe6ac3138840ac3ca6053e 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):
+@@ -37,6 +37,12 @@ def get_all_fix_names(fixer_pkg, remove_
              if remove_prefix:
                  name = name[4:]
              fix_names.append(name[:-3])
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
deleted file mode 100644 (file)
index f2cc065..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-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
deleted file mode 100644 (file)
index 828c17f..0000000
+++ /dev/null
@@ -1,150 +0,0 @@
-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/python3/patches/022-bpo-30458-Disallow-control-chars-in-http-URLs-GH-13154.patch b/lang/python/python3/patches/022-bpo-30458-Disallow-control-chars-in-http-URLs-GH-13154.patch
deleted file mode 100644 (file)
index 09c201f..0000000
+++ /dev/null
@@ -1,146 +0,0 @@
-From 233e3211cfdcca7310e25529e9115fbaddf47cca Mon Sep 17 00:00:00 2001
-From: "Gregory P. Smith" <greg@krypto.org>
-Date: Tue, 30 Apr 2019 19:12:21 -0700
-Subject: [PATCH] bpo-30458: Disallow control chars in http URLs. (GH-12755)
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Disallow control chars in http URLs in urllib.urlopen.  This addresses a potential security problem for applications that do not sanity check their URLs where http request headers could be injected.
-
-Disable https related urllib tests on a build without ssl (GH-13032)
-These tests require an SSL enabled build. Skip these tests when python is built without SSL to fix test failures.
-
-Use http.client.InvalidURL instead of ValueError as the new error case's exception. (GH-13044)
-
-Co-Authored-By: Miro Hrončok <miro@hroncok.cz>
----
- Lib/http/client.py                            | 15 ++++++
- Lib/test/test_urllib.py                       | 53 +++++++++++++++++++
- Lib/test/test_xmlrpc.py                       |  7 ++-
- .../2019-04-10-08-53-30.bpo-30458.51E-DA.rst  |  1 +
- 4 files changed, 75 insertions(+), 1 deletion(-)
- create mode 100644 Misc/NEWS.d/next/Security/2019-04-10-08-53-30.bpo-30458.51E-DA.rst
-
-diff --git a/Lib/http/client.py b/Lib/http/client.py
-index 1de151c38e92..2afd452fe30f 100644
---- a/Lib/http/client.py
-+++ b/Lib/http/client.py
-@@ -140,6 +140,16 @@
- _is_legal_header_name = re.compile(rb'[^:\s][^:\r\n]*').fullmatch
- _is_illegal_header_value = re.compile(rb'\n(?![ \t])|\r(?![ \t\n])').search
-+# These characters are not allowed within HTTP URL paths.
-+#  See https://tools.ietf.org/html/rfc3986#section-3.3 and the
-+#  https://tools.ietf.org/html/rfc3986#appendix-A pchar definition.
-+# Prevents CVE-2019-9740.  Includes control characters such as \r\n.
-+# We don't restrict chars above \x7f as putrequest() limits us to ASCII.
-+_contains_disallowed_url_pchar_re = re.compile('[\x00-\x20\x7f]')
-+# Arguably only these _should_ allowed:
-+#  _is_allowed_url_pchars_re = re.compile(r"^[/!$&'()*+,;=:@%a-zA-Z0-9._~-]+$")
-+# We are more lenient for assumed real world compatibility purposes.
-+
- # We always set the Content-Length header for these methods because some
- # servers will otherwise respond with a 411
- _METHODS_EXPECTING_BODY = {'PATCH', 'POST', 'PUT'}
-@@ -1101,6 +1111,11 @@ def putrequest(self, method, url, skip_host=False,
-         self._method = method
-         if not url:
-             url = '/'
-+        # Prevent CVE-2019-9740.
-+        match = _contains_disallowed_url_pchar_re.search(url)
-+        if match:
-+            raise InvalidURL(f"URL can't contain control characters. {url!r} "
-+                             f"(found at least {match.group()!r})")
-         request = '%s %s %s' % (method, url, self._http_vsn_str)
-         # Non-ASCII characters should have been eliminated earlier
-diff --git a/Lib/test/test_urllib.py b/Lib/test/test_urllib.py
-index 2ac73b58d832..7214492eca9d 100644
---- a/Lib/test/test_urllib.py
-+++ b/Lib/test/test_urllib.py
-@@ -329,6 +329,59 @@ def test_willclose(self):
-         finally:
-             self.unfakehttp()
-+    @unittest.skipUnless(ssl, "ssl module required")
-+    def test_url_with_control_char_rejected(self):
-+        for char_no in list(range(0, 0x21)) + [0x7f]:
-+            char = chr(char_no)
-+            schemeless_url = f"//localhost:7777/test{char}/"
-+            self.fakehttp(b"HTTP/1.1 200 OK\r\n\r\nHello.")
-+            try:
-+                # We explicitly test urllib.request.urlopen() instead of the top
-+                # level 'def urlopen()' function defined in this... (quite ugly)
-+                # test suite.  They use different url opening codepaths.  Plain
-+                # urlopen uses FancyURLOpener which goes via a codepath that
-+                # calls urllib.parse.quote() on the URL which makes all of the
-+                # above attempts at injection within the url _path_ safe.
-+                escaped_char_repr = repr(char).replace('\\', r'\\')
-+                InvalidURL = http.client.InvalidURL
-+                with self.assertRaisesRegex(
-+                    InvalidURL, f"contain control.*{escaped_char_repr}"):
-+                    urllib.request.urlopen(f"http:{schemeless_url}")
-+                with self.assertRaisesRegex(
-+                    InvalidURL, f"contain control.*{escaped_char_repr}"):
-+                    urllib.request.urlopen(f"https:{schemeless_url}")
-+                # This code path quotes the URL so there is no injection.
-+                resp = urlopen(f"http:{schemeless_url}")
-+                self.assertNotIn(char, resp.geturl())
-+            finally:
-+                self.unfakehttp()
-+
-+    @unittest.skipUnless(ssl, "ssl module required")
-+    def test_url_with_newline_header_injection_rejected(self):
-+        self.fakehttp(b"HTTP/1.1 200 OK\r\n\r\nHello.")
-+        host = "localhost:7777?a=1 HTTP/1.1\r\nX-injected: header\r\nTEST: 123"
-+        schemeless_url = "//" + host + ":8080/test/?test=a"
-+        try:
-+            # We explicitly test urllib.request.urlopen() instead of the top
-+            # level 'def urlopen()' function defined in this... (quite ugly)
-+            # test suite.  They use different url opening codepaths.  Plain
-+            # urlopen uses FancyURLOpener which goes via a codepath that
-+            # calls urllib.parse.quote() on the URL which makes all of the
-+            # above attempts at injection within the url _path_ safe.
-+            InvalidURL = http.client.InvalidURL
-+            with self.assertRaisesRegex(
-+                InvalidURL, r"contain control.*\\r.*(found at least . .)"):
-+                urllib.request.urlopen(f"http:{schemeless_url}")
-+            with self.assertRaisesRegex(InvalidURL, r"contain control.*\\n"):
-+                urllib.request.urlopen(f"https:{schemeless_url}")
-+            # This code path quotes the URL so there is no injection.
-+            resp = urlopen(f"http:{schemeless_url}")
-+            self.assertNotIn(' ', resp.geturl())
-+            self.assertNotIn('\r', resp.geturl())
-+            self.assertNotIn('\n', resp.geturl())
-+        finally:
-+            self.unfakehttp()
-+
-     def test_read_0_9(self):
-         # "0.9" response accepted (but not "simple responses" without
-         # a status line)
-diff --git a/Lib/test/test_xmlrpc.py b/Lib/test/test_xmlrpc.py
-index 32263f7f0b3b..0e002ec4ef9f 100644
---- a/Lib/test/test_xmlrpc.py
-+++ b/Lib/test/test_xmlrpc.py
-@@ -945,7 +945,12 @@ def test_unicode_host(self):
-     def test_partial_post(self):
-         # Check that a partial POST doesn't make the server loop: issue #14001.
-         conn = http.client.HTTPConnection(ADDR, PORT)
--        conn.request('POST', '/RPC2 HTTP/1.0\r\nContent-Length: 100\r\n\r\nbye')
-+        conn.send('POST /RPC2 HTTP/1.0\r\n'
-+                  'Content-Length: 100\r\n\r\n'
-+                  'bye HTTP/1.1\r\n'
-+                  f'Host: {ADDR}:{PORT}\r\n'
-+                  'Accept-Encoding: identity\r\n'
-+                  'Content-Length: 0\r\n\r\n'.encode('ascii'))
-         conn.close()
-     def test_context_manager(self):
-diff --git a/Misc/NEWS.d/next/Security/2019-04-10-08-53-30.bpo-30458.51E-DA.rst b/Misc/NEWS.d/next/Security/2019-04-10-08-53-30.bpo-30458.51E-DA.rst
-new file mode 100644
-index 000000000000..ed8027fb4d64
---- /dev/null
-+++ b/Misc/NEWS.d/next/Security/2019-04-10-08-53-30.bpo-30458.51E-DA.rst
-@@ -0,0 +1 @@
-+Address CVE-2019-9740 by disallowing URL paths with embedded whitespace or control characters through into the underlying http client request.  Such potentially malicious header injection URLs now cause an http.client.InvalidURL exception to be raised.
diff --git a/lang/python/python3/patches/024-musl-find_library.patch b/lang/python/python3/patches/024-musl-find_library.patch
new file mode 100644 (file)
index 0000000..9ad33c0
--- /dev/null
@@ -0,0 +1,74 @@
+https://bugs.python.org/issue21622
+
+Based on the patch from Alpine Linux
+https://git.alpinelinux.org/aports/tree/main/python2/musl-find_library.patch
+
+--- a/Lib/ctypes/util.py
++++ b/Lib/ctypes/util.py
+@@ -92,6 +92,8 @@ elif sys.platform.startswith("aix"):
+ elif os.name == "posix":
+     # Andreas Degert's find functions, using gcc, /sbin/ldconfig, objdump
+     import re, tempfile
++    from glob import glob
++    musl_ldso = glob('/lib/ld-musl-*.so.1')
+     def _findLib_gcc(name):
+         # Run GCC's linker with the -t (aka --trace) option and examine the
+@@ -252,6 +254,57 @@ elif os.name == "posix":
+         def find_library(name, is64 = False):
+             return _get_soname(_findLib_crle(name, is64) or _findLib_gcc(name))
++    elif musl_ldso and os.path.isfile(musl_ldso[0]):
++
++        def _is_elf(filepath):
++            try:
++                with open(filepath, 'rb') as fh:
++                    return fh.read(4) == b'\x7fELF'
++            except:
++                return False
++
++        def find_library(name):
++            # absolute name?
++            if os.path.isabs(name):
++                if _is_elf(name):
++                    return name
++                else:
++                    return None
++
++            # special case for unified standard libs
++            stdlibs = ['libcrypt.so', 'libdl.so', 'libm.so', 'libpthread.so', 'libresolv.so', 'librt.so', 'libutil.so', 'libxnet.so']
++            if name in stdlibs:
++                name = 'libc.so'
++            elif ('lib' + name + '.so') in stdlibs:
++                name = 'c'
++
++            paths = []
++            # read path list from /etc/ld-musl-$(ARCH).path
++            path_list = musl_ldso[0].replace('/lib/', '/etc/').replace('.so.1', '.path')
++            try:
++                with open(path_list, 'r') as fh:
++                    paths = [path for line in fh for path in line.rstrip('\n').split(':') if path]
++            except:
++                paths = []
++            # default path list if /etc/ld-musl-$(ARCH).path is empty or does not exist
++            if not paths:
++                paths = ['/lib', '/usr/local/lib', '/usr/lib']
++
++            # prepend paths from LD_LIBRARY_PATH
++            if 'LD_LIBRARY_PATH' in os.environ:
++                paths = os.environ['LD_LIBRARY_PATH'].split(':') + paths
++
++            for d in paths:
++                f = os.path.join(d, name)
++                if _is_elf(f):
++                    return os.path.basename(f)
++
++                prefix = os.path.join(d, 'lib'+name)
++                for suffix in ['.so', '.so.*']:
++                    for f in glob('{0}{1}'.format(prefix, suffix)):
++                        if _is_elf(f):
++                            return os.path.basename(f)
++
+     else:
+         def _findSoname_ldconfig(name):
diff --git a/lang/python/python3/patches/025-bpo-37461-Fix-infinite-loop-in-parsing-of-specially-.patch b/lang/python/python3/patches/025-bpo-37461-Fix-infinite-loop-in-parsing-of-specially-.patch
new file mode 100644 (file)
index 0000000..c61ba8b
--- /dev/null
@@ -0,0 +1,56 @@
+From 391511ccaaf0050970dfbe95bf2df1bcf6c33440 Mon Sep 17 00:00:00 2001
+From: "Miss Islington (bot)"
+ <31488909+miss-islington@users.noreply.github.com>
+Date: Wed, 17 Jul 2019 10:02:05 -0700
+Subject: [PATCH] bpo-37461: Fix infinite loop in parsing of specially crafted
+ email headers (GH-14794)
+
+* bpo-37461: Fix infinite loop in parsing of specially crafted email headers.
+
+Some crafted email header would cause the get_parameter method to run in an
+infinite loop causing a DoS attack surface when parsing those headers. This
+patch fixes that by making sure the DQUOTE character is handled to prevent
+going into an infinite loop.
+(cherry picked from commit a4a994bd3e619cbaff97610a1cee8ffa87c672f5)
+
+Co-authored-by: Abhilash Raj <maxking@users.noreply.github.com>
+---
+ Lib/email/_header_value_parser.py                          | 3 +++
+ Lib/test/test_email/test__header_value_parser.py           | 7 +++++++
+ .../next/Security/2019-07-16-08-11-00.bpo-37461.1Ahz7O.rst | 2 ++
+ 3 files changed, 12 insertions(+)
+ create mode 100644 Misc/NEWS.d/next/Security/2019-07-16-08-11-00.bpo-37461.1Ahz7O.rst
+
+--- a/Lib/email/_header_value_parser.py
++++ b/Lib/email/_header_value_parser.py
+@@ -2387,6 +2387,9 @@ def get_parameter(value):
+         while value:
+             if value[0] in WSP:
+                 token, value = get_fws(value)
++            elif value[0] == '"':
++                token = ValueTerminal('"', 'DQUOTE')
++                value = value[1:]
+             else:
+                 token, value = get_qcontent(value)
+             v.append(token)
+--- a/Lib/test/test_email/test__header_value_parser.py
++++ b/Lib/test/test_email/test__header_value_parser.py
+@@ -2621,6 +2621,13 @@ class Test_parse_mime_parameters(TestPar
+             # Defects are apparent missing *0*, and two 'out of sequence'.
+             [errors.InvalidHeaderDefect]*3),
++        # bpo-37461: Check that we don't go into an infinite loop.
++        'extra_dquote': (
++            'r*="\'a\'\\"',
++            ' r="\\""',
++            'r*=\'a\'"',
++            [('r', '"')],
++            [errors.InvalidHeaderDefect]*2),
+     }
+ @parameterize
+--- /dev/null
++++ b/Misc/NEWS.d/next/Security/2019-07-16-08-11-00.bpo-37461.1Ahz7O.rst
+@@ -0,0 +1,2 @@
++Fix an inifite loop when parsing specially crafted email headers. Patch by
++Abhilash Raj.
diff --git a/lang/python/python3/patches/026-3.7-bpo-37764-Fix-infinite-loop-when-parsing-unstruc.patch b/lang/python/python3/patches/026-3.7-bpo-37764-Fix-infinite-loop-when-parsing-unstruc.patch
new file mode 100644 (file)
index 0000000..6903ac4
--- /dev/null
@@ -0,0 +1,167 @@
+From ea21389dda401457198fb214aa2c981a45ed9528 Mon Sep 17 00:00:00 2001
+From: Ashwin Ramaswami <aramaswamis@gmail.com>
+Date: Tue, 3 Sep 2019 09:42:53 -0700
+Subject: [PATCH] [3.7] bpo-37764: Fix infinite loop when parsing unstructured
+ email headers. (GH-15239) (GH-15654)
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+…aders. (GH-15239)
+
+Fixes a case in which email._header_value_parser.get_unstructured hangs the system for some invalid headers. This covers the cases in which the header contains either:
+- a case without trailing whitespace
+- an invalid encoded word
+
+https://bugs.python.org/issue37764
+
+This fix should also be backported to 3.7 and 3.8
+
+https://bugs.python.org/issue37764
+(cherry picked from commit c5b242f87f31286ad38991bc3868cf4cfbf2b681)
+
+Co-authored-by: Ashwin Ramaswami <aramaswamis@gmail.com>
+
+
+
+
+
+https://bugs.python.org/issue37764
+---
+ Lib/email/_header_value_parser.py             | 19 ++++++++++++++---
+ .../test_email/test__header_value_parser.py   | 16 ++++++++++++++
+ Lib/test/test_email/test_email.py             | 21 +++++++++++++++++++
+ Misc/ACKS                                     |  1 +
+ .../2019-08-27-01-13-05.bpo-37764.qv67PQ.rst  |  1 +
+ 5 files changed, 55 insertions(+), 3 deletions(-)
+ create mode 100644 Misc/NEWS.d/next/Security/2019-08-27-01-13-05.bpo-37764.qv67PQ.rst
+
+--- a/Lib/email/_header_value_parser.py
++++ b/Lib/email/_header_value_parser.py
+@@ -931,6 +931,10 @@ class EWWhiteSpaceTerminal(WhiteSpaceTer
+         return ''
++class _InvalidEwError(errors.HeaderParseError):
++    """Invalid encoded word found while parsing headers."""
++
++
+ # XXX these need to become classes and used as instances so
+ # that a program can't change them in a parse tree and screw
+ # up other parse trees.  Maybe should have  tests for that, too.
+@@ -1035,7 +1039,10 @@ def get_encoded_word(value):
+         raise errors.HeaderParseError(
+             "expected encoded word but found {}".format(value))
+     remstr = ''.join(remainder)
+-    if len(remstr) > 1 and remstr[0] in hexdigits and remstr[1] in hexdigits:
++    if (len(remstr) > 1 and
++        remstr[0] in hexdigits and
++        remstr[1] in hexdigits and
++        tok.count('?') < 2):
+         # The ? after the CTE was followed by an encoded word escape (=XX).
+         rest, *remainder = remstr.split('?=', 1)
+         tok = tok + '?=' + rest
+@@ -1047,7 +1054,7 @@ def get_encoded_word(value):
+     try:
+         text, charset, lang, defects = _ew.decode('=?' + tok + '?=')
+     except ValueError:
+-        raise errors.HeaderParseError(
++        raise _InvalidEwError(
+             "encoded word format invalid: '{}'".format(ew.cte))
+     ew.charset = charset
+     ew.lang = lang
+@@ -1097,9 +1104,12 @@ def get_unstructured(value):
+             token, value = get_fws(value)
+             unstructured.append(token)
+             continue
++        valid_ew = True
+         if value.startswith('=?'):
+             try:
+                 token, value = get_encoded_word(value)
++            except _InvalidEwError:
++                valid_ew = False
+             except errors.HeaderParseError:
+                 # XXX: Need to figure out how to register defects when
+                 # appropriate here.
+@@ -1121,7 +1131,10 @@ def get_unstructured(value):
+         # Split in the middle of an atom if there is a rfc2047 encoded word
+         # which does not have WSP on both sides. The defect will be registered
+         # the next time through the loop.
+-        if rfc2047_matcher.search(tok):
++        # This needs to only be performed when the encoded word is valid;
++        # otherwise, performing it on an invalid encoded word can cause
++        # the parser to go in an infinite loop.
++        if valid_ew and rfc2047_matcher.search(tok):
+             tok, *remainder = value.partition('=?')
+         vtext = ValueTerminal(tok, 'vtext')
+         _validate_xtext(vtext)
+--- a/Lib/test/test_email/test__header_value_parser.py
++++ b/Lib/test/test_email/test__header_value_parser.py
+@@ -383,6 +383,22 @@ class TestParser(TestParserMixin, TestEm
+             [errors.InvalidHeaderDefect],
+             '')
++    def test_get_unstructured_without_trailing_whitespace_hang_case(self):
++        self._test_get_x(self._get_unst,
++            '=?utf-8?q?somevalue?=aa',
++            'somevalueaa',
++            'somevalueaa',
++            [errors.InvalidHeaderDefect],
++            '')
++
++    def test_get_unstructured_invalid_ew(self):
++        self._test_get_x(self._get_unst,
++            '=?utf-8?q?=somevalue?=',
++            '=?utf-8?q?=somevalue?=',
++            '=?utf-8?q?=somevalue?=',
++            [],
++            '')
++
+     # get_qp_ctext
+     def test_get_qp_ctext_only(self):
+--- a/Lib/test/test_email/test_email.py
++++ b/Lib/test/test_email/test_email.py
+@@ -5367,6 +5367,27 @@ Content-Type: application/x-foo;
+         eq(language, 'en-us')
+         eq(s, 'My Document For You')
++    def test_should_not_hang_on_invalid_ew_messages(self):
++        messages = ["""From: user@host.com
++To: user@host.com
++Bad-Header:
++ =?us-ascii?Q?LCSwrV11+IB0rSbSker+M9vWR7wEDSuGqmHD89Gt=ea0nJFSaiz4vX3XMJPT4vrE?=
++ =?us-ascii?Q?xGUZeOnp0o22pLBB7CYLH74Js=wOlK6Tfru2U47qR?=
++ =?us-ascii?Q?72OfyEY2p2=2FrA9xNFyvH+fBTCmazxwzF8nGkK6D?=
++
++Hello!
++""", """From: ï¿½ï¿½ï¿½ï¿½ï¿½ ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ <xxx@xxx>
++To: "xxx" <xxx@xxx>
++Subject:   ï¿½ï¿½ï¿½ ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ ï¿½ï¿½ï¿½ï¿½ï¿½ ï¿½ï¿½ï¿½ï¿½ï¿½ ï¿½ ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ ï¿½ï¿½ ï¿½ï¿½ï¿½ï¿½
++MIME-Version: 1.0
++Content-Type: text/plain; charset="windows-1251";
++Content-Transfer-Encoding: 8bit
++
++�� ï¿½ï¿½ï¿½ï¿½ï¿½ ï¿½ ï¿½ï¿½ï¿½ï¿½ ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ ï¿½ï¿½ï¿½ ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½
++"""]
++        for m in messages:
++            with self.subTest(m=m):
++                msg = email.message_from_string(m)
+ # Tests to ensure that signed parts of an email are completely preserved, as
+--- a/Misc/ACKS
++++ b/Misc/ACKS
+@@ -1305,6 +1305,7 @@ Burton Radons
+ Abhilash Raj
+ Shorya Raj
+ Dhushyanth Ramasamy
++Ashwin Ramaswami
+ Jeff Ramnani
+ Bayard Randel
+ Varpu Rantala
+--- /dev/null
++++ b/Misc/NEWS.d/next/Security/2019-08-27-01-13-05.bpo-37764.qv67PQ.rst
+@@ -0,0 +1 @@
++Fixes email._header_value_parser.get_unstructured going into an infinite loop for a specific case in which the email header does not have trailing whitespace, and the case in which it contains an invalid encoded word. Patch by Ashwin Ramaswami.
+\ No newline at end of file
diff --git a/lang/python/python3/patches/027-bpo-38243-xmlrpc.server-Escape-the-server_title-GH-1.patch b/lang/python/python3/patches/027-bpo-38243-xmlrpc.server-Escape-the-server_title-GH-1.patch
new file mode 100644 (file)
index 0000000..5259846
--- /dev/null
@@ -0,0 +1,74 @@
+From 39a0c7555530e31c6941a78da19b6a5b61170687 Mon Sep 17 00:00:00 2001
+From: "Miss Islington (bot)"
+ <31488909+miss-islington@users.noreply.github.com>
+Date: Fri, 27 Sep 2019 13:18:14 -0700
+Subject: [PATCH] bpo-38243, xmlrpc.server: Escape the server_title (GH-16373)
+
+Escape the server title of xmlrpc.server.DocXMLRPCServer
+when rendering the document page as HTML.
+(cherry picked from commit e8650a4f8c7fb76f570d4ca9c1fbe44e91c8dfaa)
+
+Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
+---
+ Lib/test/test_docxmlrpc.py                       | 16 ++++++++++++++++
+ Lib/xmlrpc/server.py                             |  3 ++-
+ .../2019-09-25-13-21-09.bpo-38243.1pfz24.rst     |  3 +++
+ 3 files changed, 21 insertions(+), 1 deletion(-)
+ create mode 100644 Misc/NEWS.d/next/Security/2019-09-25-13-21-09.bpo-38243.1pfz24.rst
+
+--- a/Lib/test/test_docxmlrpc.py
++++ b/Lib/test/test_docxmlrpc.py
+@@ -1,5 +1,6 @@
+ from xmlrpc.server import DocXMLRPCServer
+ import http.client
++import re
+ import sys
+ import threading
+ from test import support
+@@ -193,6 +194,21 @@ class DocXMLRPCHTTPGETServer(unittest.Te
+              b'method_annotation</strong></a>(x: bytes)</dt></dl>'),
+             response.read())
++    def test_server_title_escape(self):
++        # bpo-38243: Ensure that the server title and documentation
++        # are escaped for HTML.
++        self.serv.set_server_title('test_title<script>')
++        self.serv.set_server_documentation('test_documentation<script>')
++        self.assertEqual('test_title<script>', self.serv.server_title)
++        self.assertEqual('test_documentation<script>',
++                self.serv.server_documentation)
++
++        generated = self.serv.generate_html_documentation()
++        title = re.search(r'<title>(.+?)</title>', generated).group()
++        documentation = re.search(r'<p><tt>(.+?)</tt></p>', generated).group()
++        self.assertEqual('<title>Python: test_title&lt;script&gt;</title>', title)
++        self.assertEqual('<p><tt>test_documentation&lt;script&gt;</tt></p>', documentation)
++
+ if __name__ == '__main__':
+     unittest.main()
+--- a/Lib/xmlrpc/server.py
++++ b/Lib/xmlrpc/server.py
+@@ -108,6 +108,7 @@ from xmlrpc.client import Fault, dumps,
+ from http.server import BaseHTTPRequestHandler
+ from functools import partial
+ from inspect import signature
++import html
+ import http.server
+ import socketserver
+ import sys
+@@ -894,7 +895,7 @@ class XMLRPCDocGenerator:
+                                 methods
+                             )
+-        return documenter.page(self.server_title, documentation)
++        return documenter.page(html.escape(self.server_title), documentation)
+ class DocXMLRPCRequestHandler(SimpleXMLRPCRequestHandler):
+     """XML-RPC and documentation request handler class.
+--- /dev/null
++++ b/Misc/NEWS.d/next/Security/2019-09-25-13-21-09.bpo-38243.1pfz24.rst
+@@ -0,0 +1,3 @@
++Escape the server title of :class:`xmlrpc.server.DocXMLRPCServer`
++when rendering the document page as HTML.
++(Contributed by Dong-hee Na in :issue:`38243`.)
diff --git a/lang/python/python3/patches/028-bpo-34155-Dont-parse-domains-containing-GH-13079.patch b/lang/python/python3/patches/028-bpo-34155-Dont-parse-domains-containing-GH-13079.patch
new file mode 100644 (file)
index 0000000..917c74f
--- /dev/null
@@ -0,0 +1,129 @@
+From 77bb21f6e06aabc81d672dbdd6f8834c40544351 Mon Sep 17 00:00:00 2001
+From: jpic <jpic@users.noreply.github.com>
+Date: Wed, 17 Jul 2019 23:54:25 +0200
+Subject: [PATCH] bpo-34155: Dont parse domains containing @ (GH-13079)
+
+Before:
+
+        >>> email.message_from_string('From: a@malicious.org@important.com', policy=email.policy.default)['from'].addresses
+        (Address(display_name='', username='a', domain='malicious.org'),)
+
+        >>> parseaddr('a@malicious.org@important.com')
+        ('', 'a@malicious.org')
+
+    After:
+
+        >>> email.message_from_string('From: a@malicious.org@important.com', policy=email.policy.default)['from'].addresses
+        (Address(display_name='', username='', domain=''),)
+
+        >>> parseaddr('a@malicious.org@important.com')
+        ('', 'a@')
+
+https://bugs.python.org/issue34155
+(cherry picked from commit 8cb65d1381b027f0b09ee36bfed7f35bb4dec9a9)
+
+Co-authored-by: jpic <jpic@users.noreply.github.com>
+---
+ Lib/email/_header_value_parser.py                  |  2 ++
+ Lib/email/_parseaddr.py                            | 11 ++++++++++-
+ Lib/test/test_email/test__header_value_parser.py   | 10 ++++++++++
+ Lib/test/test_email/test_email.py                  | 14 ++++++++++++++
+ .../2019-05-04-13-33-37.bpo-34155.MJll68.rst       |  1 +
+ 5 files changed, 37 insertions(+), 1 deletion(-)
+ create mode 100644 Misc/NEWS.d/next/Security/2019-05-04-13-33-37.bpo-34155.MJll68.rst
+
+diff --git a/Lib/email/_header_value_parser.py b/Lib/email/_header_value_parser.py
+index 801ae728dd136..c09f4f121ffb6 100644
+--- a/Lib/email/_header_value_parser.py
++++ b/Lib/email/_header_value_parser.py
+@@ -1585,6 +1585,8 @@ def get_domain(value):
+         token, value = get_dot_atom(value)
+     except errors.HeaderParseError:
+         token, value = get_atom(value)
++    if value and value[0] == '@':
++        raise errors.HeaderParseError('Invalid Domain')
+     if leader is not None:
+         token[:0] = [leader]
+     domain.append(token)
+diff --git a/Lib/email/_parseaddr.py b/Lib/email/_parseaddr.py
+index cdfa3729adc79..41ff6f8c000d5 100644
+--- a/Lib/email/_parseaddr.py
++++ b/Lib/email/_parseaddr.py
+@@ -379,7 +379,12 @@ def getaddrspec(self):
+         aslist.append('@')
+         self.pos += 1
+         self.gotonext()
+-        return EMPTYSTRING.join(aslist) + self.getdomain()
++        domain = self.getdomain()
++        if not domain:
++            # Invalid domain, return an empty address instead of returning a
++            # local part to denote failed parsing.
++            return EMPTYSTRING
++        return EMPTYSTRING.join(aslist) + domain
+     def getdomain(self):
+         """Get the complete domain name from an address."""
+@@ -394,6 +399,10 @@ def getdomain(self):
+             elif self.field[self.pos] == '.':
+                 self.pos += 1
+                 sdlist.append('.')
++            elif self.field[self.pos] == '@':
++                # bpo-34155: Don't parse domains with two `@` like
++                # `a@malicious.org@important.com`.
++                return EMPTYSTRING
+             elif self.field[self.pos] in self.atomends:
+                 break
+             else:
+diff --git a/Lib/test/test_email/test__header_value_parser.py b/Lib/test/test_email/test__header_value_parser.py
+index 9e862feab10c9..0f19f8bcc2e0f 100644
+--- a/Lib/test/test_email/test__header_value_parser.py
++++ b/Lib/test/test_email/test__header_value_parser.py
+@@ -1448,6 +1448,16 @@ def test_get_addr_spec_dot_atom(self):
+         self.assertEqual(addr_spec.domain, 'example.com')
+         self.assertEqual(addr_spec.addr_spec, 'star.a.star@example.com')
++    def test_get_addr_spec_multiple_domains(self):
++        with self.assertRaises(errors.HeaderParseError):
++            parser.get_addr_spec('star@a.star@example.com')
++
++        with self.assertRaises(errors.HeaderParseError):
++            parser.get_addr_spec('star@a@example.com')
++
++        with self.assertRaises(errors.HeaderParseError):
++            parser.get_addr_spec('star@172.17.0.1@example.com')
++
+     # get_obs_route
+     def test_get_obs_route_simple(self):
+diff --git a/Lib/test/test_email/test_email.py b/Lib/test/test_email/test_email.py
+index c29cc56203b1f..aa775881c5521 100644
+--- a/Lib/test/test_email/test_email.py
++++ b/Lib/test/test_email/test_email.py
+@@ -3041,6 +3041,20 @@ def test_parseaddr_empty(self):
+         self.assertEqual(utils.parseaddr('<>'), ('', ''))
+         self.assertEqual(utils.formataddr(utils.parseaddr('<>')), '')
++    def test_parseaddr_multiple_domains(self):
++        self.assertEqual(
++            utils.parseaddr('a@b@c'),
++            ('', '')
++        )
++        self.assertEqual(
++            utils.parseaddr('a@b.c@c'),
++            ('', '')
++        )
++        self.assertEqual(
++            utils.parseaddr('a@172.17.0.1@c'),
++            ('', '')
++        )
++
+     def test_noquote_dump(self):
+         self.assertEqual(
+             utils.formataddr(('A Silly Person', 'person@dom.ain')),
+diff --git a/Misc/NEWS.d/next/Security/2019-05-04-13-33-37.bpo-34155.MJll68.rst b/Misc/NEWS.d/next/Security/2019-05-04-13-33-37.bpo-34155.MJll68.rst
+new file mode 100644
+index 0000000000000..50292e29ed1d2
+--- /dev/null
++++ b/Misc/NEWS.d/next/Security/2019-05-04-13-33-37.bpo-34155.MJll68.rst
+@@ -0,0 +1 @@
++Fix parsing of invalid email addresses with more than one ``@`` (e.g. a@b@c.com.) to not return the part before 2nd ``@`` as valid email address. Patch by maxking & jpic.
index a5f40854188bdf0cdf4a0aa87253c9d079a123bd..1368a5dcd2744044dc52fef6f28146b2a3fdf1bc 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ruamel-yaml
-PKG_VERSION:=0.15.94
+PKG_VERSION:=0.15.100
 PKG_RELEASE:=1
 
 PKG_SOURCE:=ruamel.yaml-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/r/ruamel.yaml/
-PKG_HASH:=0939bcb399ad037ef903d74ccf2f8a074f06683bc89133ad19305067d34487c8
+PKG_HASH:=8e42f3067a59e819935a2926e247170ed93c8f0b2ab64526f888e026854db2e4
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-ruamel.yaml-$(PKG_VERSION)
 
index 2f75f493dea9bc538c374aace5bf6be1b6785398..a4f310a42d0366c9f34f49d744e4a34f21667e6e 100644 (file)
@@ -18,6 +18,7 @@ PKG_HASH:=ad0cd2de2c87b9ba8086b43957a0de3eb2eb565c7159d5f53ccbba3feb915f4e
 PKG_LICENSE:=TCL
 PKG_LICENSE_FILES:=license.terms
 PKG_MAINTAINER:=Joe Mistachkin <joe@mistachkin.com>
+PKG_CPE_ID:=cpe:/a:tcl_tk:tcl_tk
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)$(PKG_VERSION)
 HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)$(PKG_VERSION)
index bce9f27ec5668b21997a35e7708cf58b5cdaaffe..3b40a5b36a59a1c6c1046569784ffd429314b350 100644 (file)
@@ -8,86 +8,40 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=vala
-PKG_VERSION:=0.34.18
+PKG_VERSION:=0.46.2
 PKG_RELEASE:=1
-PKG_LICENSE:=LGPL-2.1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_SOURCE_URL:=@GNOME/vala/0.34
-PKG_HASH:=b89044c6eb70556ca2486812a42983944b4f6ef18db66b5af1a9006de11b1cd2
+PKG_SOURCE_URL:=@GNOME/vala/0.46
+PKG_HASH:=92070393e8102da29e07b29fcb808d021600a25f8a2a69c852470ec8d97740bc
+
+PKG_MAINTAINER:=
+PKG_LICENSE:=LGPL-2.1-or-later
+PKG_LICENSE_FILES:=COPYING
 
-PKG_BUILD_DEPENDS:=glib2 glib2/host vala/host
 HOST_BUILD_DEPENDS:=glib2/host
+HOST_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
-include $(INCLUDE_DIR)/nls.mk
 include $(INCLUDE_DIR)/host-build.mk
 
-TARGET_LDFLAGS+=\
-        -Wl,-rpath-link=$(STAGING_DIR)/usr/lib
-
 define Package/vala
   SECTION:=lang
   CATEGORY:=Languages
   TITLE:=C-sharp like language for the GObject system
   URL:=https://wiki.gnome.org/Projects/Vala
-  MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
-  DEPENDS:=+glib2 +libpthread
 endef
 
 define Package/vala/description
-Vala is a C-sharp like language for the GObject system. This package contains
-the Vala-to-C compiler.
-endef
-
-define Build/Compile
-       $(MAKE) -C $(PKG_BUILD_DIR) \
-               DESTDIR="$(PKG_INSTALL_DIR)" \
-               all install
-endef
-
-define Build/InstallDev
-       $(INSTALL_DIR) \
-               $(1)/usr/share/vala-0.34/vapi \
-               $(1)/usr/lib \
-               $(1)/usr/lib/pkgconfig
-
-       $(INSTALL_DATA) \
-               $(PKG_INSTALL_DIR)/usr/share/vala-0.34/vapi/* \
-               $(1)/usr/share/vala-0.34/vapi
-
-       $(INSTALL_DATA) \
-               $(PKG_INSTALL_DIR)/usr/lib/libvala-0.34.{so*,la} \
-               $(1)/usr/lib
-
-       $(INSTALL_DATA) \
-               $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc \
-               $(1)/usr/lib/pkgconfig
+  Vala is a C-sharp like language for the GObject system. This package contains
+  the Vala-to-C compiler for host.
 endef
 
-define Package/vala/install
-       $(INSTALL_DIR) \
-               $(1)/usr/share/vala-0.34/vapi \
-               $(1)/usr/lib \
-               $(1)/usr/lib/pkgconfig \
-               $(1)/usr/bin
-
-       $(INSTALL_DATA) \
-               $(PKG_INSTALL_DIR)/usr/share/vala-0.34/vapi/* \
-               $(1)/usr/share/vala-0.34/vapi
-
-       $(INSTALL_DATA) \
-               $(PKG_INSTALL_DIR)/usr/lib/libvala-0.34.{so*,la} \
-               $(1)/usr/lib
-
-       $(INSTALL_BIN) \
-               $(PKG_INSTALL_DIR)/usr/bin/{vala,vala-0.34,valac,valac-0.34,vapicheck,vapicheck-0.34,vapigen,vapigen-0.34,vala-gen-introspect,vala-gen-introspect-0.34} \
-               $(1)/usr/bin
-
-       $(INSTALL_DATA) \
-               $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc \
-               $(1)/usr/lib/pkgconfig
-endef
+HOST_CONFIGURE_ARGS += \
+       --disable-coverage \
+       --disable-debug \
+       --disable-valadoc \
+       --without-cgraph
 
 $(eval $(call HostBuild))
 $(eval $(call BuildPackage,vala))
index 2184ec6db43edcf62a01e3a0bfc8b0259d33e82a..4af984ec46e1a9f17d3c1becf027159712525a14 100644 (file)
@@ -8,24 +8,21 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=alsa-lib
-PKG_VERSION:=1.1.8
+PKG_VERSION:=1.1.9
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=ftp://ftp.alsa-project.org/pub/lib/ \
                http://distfiles.gentoo.org/distfiles/
+PKG_HASH:=488373aef5396682f3a411a6d064ae0ad196b9c96269d0bb912fbdeec94b994b
 
-PKG_HASH:=3cdc3a93a6427a26d8efab4ada2152e64dd89140d981f6ffa003e85be707aedf
 PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>, \
                Peter Wagner <tripolar@gmx.at>
 
-PKG_LICENSE:=LGPLv2.1 GPLv2
-PKG_LICENSE_FILES:=COPYING aserver/COPYING
-
 PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
 PKG_USE_MIPS16:=0
-PKG_CHECK_FORMAT_SECURITY:=0
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -35,6 +32,8 @@ define Package/alsa-lib
   TITLE:=ALSA (Advanced Linux Sound Architecture) library
   URL:=http://www.alsa-project.org/
   DEPENDS:=@AUDIO_SUPPORT +kmod-sound-core +libpthread +librt
+  LICENSE:=LGPLv2.1-or-later
+  LICENSE_FILES:=COPYING
 endef
 
 define Package/alsa-lib/description
index 2869dbf63432cf8d7693c737acd7df25d002d981..5d1117811fb20729a02ef97633d12e51ac4a2bd6 100644 (file)
@@ -1,8 +1,8 @@
 --- a/src/Makefile.in
 +++ b/src/Makefile.in
-@@ -421,7 +421,7 @@ clean-libLTLIBRARIES:
-         rm -f $${locs}; \
+@@ -493,7 +493,7 @@ clean-libLTLIBRARIES:
        }
  libasound.la: $(libasound_la_OBJECTS) $(libasound_la_DEPENDENCIES) $(EXTRA_libasound_la_DEPENDENCIES) 
 -      $(AM_V_CCLD)$(libasound_la_LINK) -rpath $(libdir) $(libasound_la_OBJECTS) $(libasound_la_LIBADD) $(LIBS)
 +      $(AM_V_CCLD)$(libasound_la_LINK) -rpath $(DESTDIR)$(libdir) $(libasound_la_OBJECTS) $(libasound_la_LIBADD) $(LIBS)
@@ -11,9 +11,9 @@
        -rm -f *.$(OBJEXT)
 --- a/src/pcm/scopes/Makefile.in
 +++ b/src/pcm/scopes/Makefile.in
-@@ -348,7 +348,7 @@ clean-pkglibLTLIBRARIES:
-         rm -f $${locs}; \
+@@ -410,7 +410,7 @@ clean-pkglibLTLIBRARIES:
        }
  scope-level.la: $(scope_level_la_OBJECTS) $(scope_level_la_DEPENDENCIES) $(EXTRA_scope_level_la_DEPENDENCIES) 
 -      $(AM_V_CCLD)$(scope_level_la_LINK) -rpath $(pkglibdir) $(scope_level_la_OBJECTS) $(scope_level_la_LIBADD) $(LIBS)
 +      $(AM_V_CCLD)$(scope_level_la_LINK) -rpath $(DESTDIR)$(pkglibdir) $(scope_level_la_OBJECTS) $(scope_level_la_LIBADD) $(LIBS)
index 2a4cd2a05ce9384e659a850b80133b9839e0ba70..b067359f8c7062be060538bfa868dbafa2948e7b 100644 (file)
@@ -16,6 +16,7 @@ PKG_SOURCE_URL:=@APACHE/apr/
 PKG_HASH:=d3e12f7b6ad12687572a3a39475545a072608f4ba03a6ce8a3778f607dd0035b
 PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>
 PKG_LICENSE:=Apache License
+PKG_CPE_ID:=cpe:/a:apache:apr-util
 
 PKG_FIXUP:=autoreconf
 PKG_REMOVE_FILES:=aclocal.m4 build/ltmain.sh
index df9b0f5699534a5dc960829474c3cddb7bc2b910..922b8b6f4a2ec01a4672338c92e0e35fb224d571 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=avahi
 PKG_VERSION:=0.7
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/lathiat/avahi/releases/download/v$(PKG_VERSION) \
@@ -327,7 +327,14 @@ ifeq ($(BUILD_VARIANT),dbus)
 endif
 endif
        $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/
+       $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/avahi-core.pc
+ifneq ($(CONFIG_PACKAGE_libavahi-compat-libdnssd),)
+ifeq ($(BUILD_VARIANT),dbus)
+       $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/avahi-client.pc
+       $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/avahi-compat-libdns_sd.pc
+endif
+endif
 endef
 
 define Package/libavahi/install
index d2aa760534b44138496169f302b72f4197136bcf..272e806a4110dc8931d57e4d27d16322b292ee4b 100644 (file)
@@ -9,20 +9,19 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=avro-c
 PKG_VERSION:=1.8.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@APACHE/avro/avro-$(PKG_VERSION)/c
 PKG_HASH:=4639982b2b8fbd91fc7128fef672207129c959bb7900dd64b077ce4206edf10e
 
 PKG_MAINTAINER:=John Clark <inindev@gmail.com>
-
-PKG_INSTALL:=1
-PKG_BUILD_PARALLEL:=1
-
 PKG_LICENSE:=Apache-2.0
 PKG_LICENSE_FILES:=LICENSE
 
+CMAKE_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
+
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/cmake.mk
 
@@ -38,15 +37,6 @@ define Package/avro-c/description
   This package contains the Apache Avro C library.
 endef
 
-CMAKE_OPTIONS += \
-        -DCMAKE_BUILD_TYPE:STRING=MINSIZEREL
-
-define Build/InstallDev
-       $(INSTALL_DIR) $(1)/usr/{lib,include}
-       $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libavro.{a,so*} $(1)/usr/lib/
-endef
-
 define Package/avro-c/install
        $(INSTALL_DIR) $(1)/usr/lib
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libavro.so* $(1)/usr/lib/
diff --git a/libs/avro/patches/010-pkgconfig.patch b/libs/avro/patches/010-pkgconfig.patch
new file mode 100644 (file)
index 0000000..155dee8
--- /dev/null
@@ -0,0 +1,30 @@
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -121,9 +121,8 @@ endif(WIN32)
+ # Install pkg-config file
+-set(prefix ${CMAKE_INSTALL_PREFIX})
+ set(VERSION ${AVRO_VERSION})
+-configure_file(avro-c.pc.in avro-c.pc)
++configure_file(avro-c.pc.in avro-c.pc @ONLY)
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/avro-c.pc
+         DESTINATION lib/pkgconfig)
+--- a/src/avro-c.pc.in
++++ b/src/avro-c.pc.in
+@@ -1,7 +1,12 @@
++prefix=@CMAKE_INSTALL_PREFIX@
++exec_prefix=@CMAKE_INSTALL_PREFIX@
++libdir=${exec_prefix}/lib
++includedir=${prefix}/include
++
+ Name: avro-c
+ Description: C library for parsing Avro data
+ Version: @VERSION@
+ URL: http://avro.apache.org/
+-Libs: -L@prefix@/lib -lavro
+-Cflags: -I@prefix@/include
++Libs: -L${libdir} -lavro
++Cflags: -I${includedir}
+ Requires: @CODEC_PKG@
index ed1b3ebc4a58d7342dd68d097c303bab99164775..0d52e70cd089fd6b19306c4d0793ddcf9c573de2 100644 (file)
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=boost
-PKG_VERSION:=1.70.0
-PKG_SOURCE_VERSION:=1_70_0
-PKG_RELEASE:=5
+PKG_VERSION:=1.71.0
+PKG_SOURCE_VERSION:=1_71_0
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)_$(PKG_SOURCE_VERSION).tar.bz2
 PKG_SOURCE_URL:=@SF/$(PKG_NAME)/$(PKG_NAME)/$(PKG_VERSION) https://dl.bintray.com/boostorg/release/$(PKG_VERSION)/source/
+PKG_HASH:=d73a8da01e8bf8c7eda40b4c84915071a8c8a0df4a6734537ddde4a8580524ee
+
+PKG_MAINTAINER:=Carlos M. Ferreira <carlosmf.pt@gmail.com>
+PKG_LICENSE:=BSL-1.0
+PKG_LICENSE_FILES:=LICENSE_1_0.txt
+PKG_CPE_ID:=cpe:/a:boost:boost
+
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)_$(PKG_SOURCE_VERSION)
 HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)_$(PKG_SOURCE_VERSION)
-PKG_HASH:=430ae8354789de4fd19ee52f3b1f739e1fba576f0aded0897c3c2bc00fb38778
-PKG_LICENSE:=Boost Software License <http://www.boost.org/users/license.html>
-PKG_MAINTAINER:=Carlos M. Ferreira <carlosmf.pt@gmail.com>
 
+HOST_BUILD_PARALLEL:=1
 PKG_BUILD_PARALLEL:=1
 PKG_USE_MIPS16:=0
 
@@ -33,37 +38,25 @@ define Package/boost/Default
   SECTION:=libs
   CATEGORY:=Libraries
   TITLE:=Boost C++ source library
-  URL:=http://www.boost.org
+  URL:=https://www.boost.org
   DEPENDS:=+libstdcpp +libpthread +librt
 endef
 
 define Package/boost/description
-This package provides the Boost v1.70.0 libraries.
+This package provides the Boost v1.71.0 libraries.
 Boost is a set of free, peer-reviewed, portable C++ source libraries.
 
------------------------------------------------------------------------------
-|                                Warning                                    |
-| In order to build all of the Boost Libraries, it is necessary             |
-| to use, at least, GCC version 5 (C++14 support) and, it is necessary to   |
-| compile the kernel with Full Language Support.                            |
-| Without these requirerements, the following libs will not be available:   |
-| - Boost.Locale                                                            |
-| - Boost.Coroutine2 (header-only library - requires C++11)                 |
-| - Boost.Fiber (requires C++14)                                            |
------------------------------------------------------------------------------
-
 This package provides the following run-time libraries:
  - atomic
  - chrono
  - container
  - context
  - contract
- - coroutine (Deprecated - use Coroutine2)
- - - coroutine2 (Requires GCC v5 and up)
+ - coroutine and coroutine2 (Coroutine is deprecated - use Coroutine2)
  - date_time
  - exception
  - filesystem
- - fiber (Requires GCC v5 and up)
+ - fiber
  - graph
  - - graph-parallel
  - iostreams
@@ -84,7 +77,7 @@ This package provides the following run-time libraries:
  - wave
 
 There are many more header-only libraries supported by Boost.
-See more at http://www.boost.org/doc/libs/1_70_0/
+See more at http://www.boost.org/doc/libs/1_71_0/
 endef
 
 PKG_BUILD_DEPENDS:=boost/host PACKAGE_python:python PACKAGE_python3:python3
@@ -124,6 +117,22 @@ define Package/boost
 endef
 
 define Package/boost/config
+       # Invisible config dependency
+       config boost-context-exclude
+               bool
+               default y if (TARGET_arc700 || TARGET_archs38 || TARGET_octeon || TARGET_octeontx)
+               default n
+
+       config boost-coroutine-exclude
+               bool
+               default y if boost-context-exclude
+               default n
+
+       config boost-fiber-exclude
+               bool
+               default y if (TARGET_ar7 || TARGET_brcm47xx_generic || TARGET_brcm47xx_legacy || TARGET_lantiq_ase || TARGET_rb532 || mips32 || mips64 || boost-coroutine-exclude)
+               default n
+
        menu "Select Boost Options"
                depends on PACKAGE_boost
                comment "Boost compilation options."
@@ -196,11 +205,11 @@ define Package/boost/config
                                bool "Shared"
 
                        config boost-runtime-static
-                               depends on @(!boost-shared-libs&&!boost-static-and-shared-libs)
+                               depends on (!boost-shared-libs && !boost-static-and-shared-libs)
                                bool "Static"
 
                        config boost-runtime-static-and-shared
-                               depends on @(boost-use-name-tags&&!boost-shared-libs&&!boost-static-and-shared-libs)
+                               depends on (boost-use-name-tags && !boost-shared-libs && !boost-static-and-shared-libs)
                                bool "Both"
                endchoice
 
@@ -237,14 +246,14 @@ define Package/boost/config
                        default n
 
                config boost-single-thread
-                       depends on @boost-use-name-tags
+                       depends on boost-use-name-tags
                        bool "Single thread Support."
                        help
                                Compile Boost libraries in single-thread mode.
                        default n
 
                config boost-build-type-complete
-                       depends on @boost-use-name-tags
+                       depends on boost-use-name-tags
                        bool "Complete Boost Build."
                        help
                                Builds both release and debug libs. It will take much longer to compile.
@@ -260,29 +269,17 @@ define Package/boost/config
                        default m if ALL
                        select PACKAGE_boost-libs
                        select boost-test-pkg
-                       select boost-coroutine2
                        select boost-graph-parallel
 
-               # Invisible config dependency
-               config boost-fiber-exclude
-                       bool
-                       default y if (CPU_TYPE=mips32 || CPU_TYPE=mips64)
-
                config boost-test-pkg
                        bool "Boost test package."
                        default m if ALL
                        select PACKAGE_boost-test
 
-               config boost-coroutine2
-                       depends on !@GCC_VERSION_4_8
-                       bool "Boost couroutine2 support."
-                       select PACKAGE_boost-coroutine
-                       default n
-
                config boost-graph-parallel
                        bool "Boost parallel graph support."
                        select PACKAGE_boost-graph
-                       default n
+                       default m if ALL
 
                $(foreach lib,$(BOOST_LIBS), \
                        config PACKAGE_boost-$(lib)
@@ -290,20 +287,11 @@ define Package/boost/config
                        default m if ALL
                        $(if $(findstring locale,$(lib)),depends on BUILD_NLS,)\
                        $(if $(findstring python,$(lib)),depends on PACKAGE_$(lib),)\
-                       $(if $(findstring fiber,$(lib)),depends on (CPU_TYPE!=mips32 && CPU_TYPE!=mips64),)
+                       $(if $(findstring fiber,$(lib)),depends on !boost-fiber-exclude,)\
+                       $(if $(findstring context,$(lib)),depends on !boost-context-exclude,)
+                       $(if $(findstring coroutine,$(lib)),depends on !boost-coroutine-exclude,)
                )
        endmenu
-
-       menu "Select Boost libraries for Host build"
-               comment  "Libraries for Host build"
-
-               $(foreach lib,$(BOOST_LIBS), \
-               config boost-host-build-$(lib)
-                       bool "Boost $(lib) $(if $(findstring python,$(lib)),$(paren_left)v$(if $(findstring 3,$(lib)),$(BOOST_PYTHON3_VER),$(BOOST_PYTHON_VER))$(paren_right) ,)library."
-                       default n
-               )
-       endmenu
-
 endef
 
 PKG_CONFIG_DEPENDS:= CONFIG_PACKAGE_boost-test
@@ -326,7 +314,6 @@ define DefineBoostLibrary
 
   BOOST_DEPENDS+= +$(if $(4),$(4):boost-$(1),boost-$(1))
   PKG_CONFIG_DEPENDS+= CONFIG_PACKAGE_boost-$(1)
-  HOST_CONFIG_DEPENDS+= CONFIG_boost-host-build-$(1)
 
   BOOST_LIBS+= $(1)
 
@@ -342,35 +329,35 @@ define DefineBoostLibrary
   endef
 endef
 
-$(eval $(call DefineBoostLibrary,atomic,system,))
-$(eval $(call DefineBoostLibrary,chrono,system,))
-$(eval $(call DefineBoostLibrary,container,,))
-$(eval $(call DefineBoostLibrary,context,chrono system thread,))
-$(eval $(call DefineBoostLibrary,contract,system,))
-$(eval $(call DefineBoostLibrary,coroutine,system chrono context thread,))
-$(eval $(call DefineBoostLibrary,date_time,,))
+$(eval $(call DefineBoostLibrary,atomic,system))
+$(eval $(call DefineBoostLibrary,chrono,system))
+$(eval $(call DefineBoostLibrary,container))
+$(eval $(call DefineBoostLibrary,context,chrono system thread,,!boost-context-exclude))
+$(eval $(call DefineBoostLibrary,contract,system))
+$(eval $(call DefineBoostLibrary,coroutine,system chrono context thread,,!boost-coroutine-exclude))
+$(eval $(call DefineBoostLibrary,date_time))
 #$(eval $(call DefineBoostLibrary,exception,,))
 $(eval $(call DefineBoostLibrary,fiber,coroutine filesystem,,!boost-fiber-exclude))
-$(eval $(call DefineBoostLibrary,filesystem,system,))
-$(eval $(call DefineBoostLibrary,graph,regex,))
+$(eval $(call DefineBoostLibrary,filesystem,system))
+$(eval $(call DefineBoostLibrary,graph,regex))
 $(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,,))
+$(eval $(call DefineBoostLibrary,log,system chrono date_time thread filesystem regex))
+$(eval $(call DefineBoostLibrary,math))
 #$(eval $(call DefineBoostLibrary,mpi,,)) # OpenMPI does no exist in OpenWRT at this time.
-$(eval $(call DefineBoostLibrary,program_options,,))
+$(eval $(call DefineBoostLibrary,program_options))
 $(eval $(call DefineBoostLibrary,python,,,PACKAGE_python))
 $(eval $(call DefineBoostLibrary,python3,,,PACKAGE_python3))
-$(eval $(call DefineBoostLibrary,random,system,))
-$(eval $(call DefineBoostLibrary,regex,,))
-$(eval $(call DefineBoostLibrary,serialization,,))
-$(eval $(call DefineBoostLibrary,wserialization,serialization,))
-$(eval $(call DefineBoostLibrary,stacktrace,,))
-$(eval $(call DefineBoostLibrary,system,,))
-$(eval $(call DefineBoostLibrary,thread,system chrono atomic,))
+$(eval $(call DefineBoostLibrary,random,system))
+$(eval $(call DefineBoostLibrary,regex))
+$(eval $(call DefineBoostLibrary,serialization))
+$(eval $(call DefineBoostLibrary,wserialization,serialization))
+$(eval $(call DefineBoostLibrary,stacktrace))
+$(eval $(call DefineBoostLibrary,system))
+$(eval $(call DefineBoostLibrary,thread,system chrono atomic))
 $(eval $(call DefineBoostLibrary,timer,chrono))
-$(eval $(call DefineBoostLibrary,type_erasure,chrono system thread,))
-$(eval $(call DefineBoostLibrary,wave,date_time thread filesystem,))
+$(eval $(call DefineBoostLibrary,type_erasure,chrono system thread))
+$(eval $(call DefineBoostLibrary,wave,date_time thread filesystem))
 
 include $(INCLUDE_DIR)/host-build.mk
 
@@ -379,12 +366,9 @@ define Host/Compile
        ( cd $(HOST_BUILD_DIR)/tools/build/src/engine ; ./build.sh gcc )
 
        ( cd $(HOST_BUILD_DIR) ; \
-               ./bootstrap.sh --prefix=$(STAGING_DIR_HOST) \
-                       --with-libraries=$(subst $() $(),$(comma),$(strip \
-                               headers \
-                               $(foreach lib,$(BOOST_LIBS), \
-                                       $(if $(findstring python,$(lib)),,$(if $(CONFIG_boost-host-build-$(lib)),$(lib)))))) ; \
-               ./b2 install )
+               ./bootstrap.sh --prefix=$(STAGING_DIR_HOSTPKG) \
+                       --with-libraries=atomic,context,date_time,filesystem,headers,program_options,regex,system,thread ;\
+               ./b2 --ignore-site-config install )
 endef
 
 CONFIGURE_PREFIX:=$(PKG_INSTALL_DIR)
@@ -524,7 +508,7 @@ endef
 
 define Host/Install
        $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/bin
-       $(CP) $(HOST_BUILD_DIR)/tools/build/src/engine/bin.*/b2 $(STAGING_DIR_HOSTPKG)/bin/
+       $(CP) $(HOST_BUILD_DIR)/tools/build/src/engine/b2 $(STAGING_DIR_HOSTPKG)/bin/
 endef
 
 define Package/boost/Default/install
diff --git a/libs/boost/patches/001-uclibc-asio.patch b/libs/boost/patches/001-uclibc-asio.patch
new file mode 100644 (file)
index 0000000..b7732d0
--- /dev/null
@@ -0,0 +1,43 @@
+--- a/boost/asio/detail/impl/eventfd_select_interrupter.ipp
++++ b/boost/asio/detail/impl/eventfd_select_interrupter.ipp
+@@ -23,11 +23,11 @@
+ #include <sys/stat.h>
+ #include <sys/types.h>
+ #include <fcntl.h>
+-#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
++#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 2
+ # include <asm/unistd.h>
+-#else // __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
++#else // __GLIBC__ == 2 && __GLIBC_MINOR__ < 2
+ # include <sys/eventfd.h>
+-#endif // __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
++#endif // __GLIBC__ == 2 && __GLIBC_MINOR__ < 2
+ #include <boost/asio/detail/cstdint.hpp>
+ #include <boost/asio/detail/eventfd_select_interrupter.hpp>
+ #include <boost/asio/detail/throw_error.hpp>
+@@ -46,14 +46,14 @@ eventfd_select_interrupter::eventfd_sele
+ void eventfd_select_interrupter::open_descriptors()
+ {
+-#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
++#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 2
+   write_descriptor_ = read_descriptor_ = syscall(__NR_eventfd, 0);
+   if (read_descriptor_ != -1)
+   {
+     ::fcntl(read_descriptor_, F_SETFL, O_NONBLOCK);
+     ::fcntl(read_descriptor_, F_SETFD, FD_CLOEXEC);
+   }
+-#else // __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
++#else // __GLIBC__ == 2 && __GLIBC_MINOR__ < 2
+ # if defined(EFD_CLOEXEC) && defined(EFD_NONBLOCK)
+   write_descriptor_ = read_descriptor_ =
+     ::eventfd(0, EFD_CLOEXEC | EFD_NONBLOCK);
+@@ -70,7 +70,7 @@ void eventfd_select_interrupter::open_de
+       ::fcntl(read_descriptor_, F_SETFD, FD_CLOEXEC);
+     }
+   }
+-#endif // __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
++#endif // __GLIBC__ == 2 && __GLIBC_MINOR__ < 2
+   if (read_descriptor_ == -1)
+   {
diff --git a/libs/boost/patches/002-utime-filesystem.patch b/libs/boost/patches/002-utime-filesystem.patch
new file mode 100644 (file)
index 0000000..2a778af
--- /dev/null
@@ -0,0 +1,71 @@
+From 83b989ecee478be083db8dc0cc7a5387615bd3cb Mon Sep 17 00:00:00 2001
+From: Andrey Semashev <andrey.semashev@gmail.com>
+Date: Wed, 31 Jul 2019 16:28:05 +0300
+Subject: [PATCH] Added support for utimensat for better POSIX.1-2008
+ compliance.
+
+POSIX.1-2008 marks utime as obsolete and replaces it with utimensat.
+uClibc-ng has an option for removing utime, including the corresponding
+header.
+
+Closes https://github.com/boostorg/filesystem/pull/115.
+---
+ libs/filesystem/src/operations.cpp | 24 ++++++++++++++++++++++--
+ 1 file changed, 22 insertions(+), 2 deletions(-)
+
+diff --git a/src/operations.cpp b/src/operations.cpp
+index 9bba1cf7a..038109d35 100644
+--- a/libs/filesystem/src/operations.cpp
++++ b/libs/filesystem/src/operations.cpp
+@@ -62,7 +62,7 @@
+ #endif
+ #ifndef _POSIX_PTHREAD_SEMANTICS
+-# define _POSIX_PTHREAD_SEMANTICS  // Sun readdir_r()needs this
++# define _POSIX_PTHREAD_SEMANTICS  // Sun readdir_r() needs this
+ #endif
+ #include <boost/filesystem/operations.hpp>
+@@ -119,7 +119,9 @@ using std::wstring;
+ #   include <dirent.h>
+ #   include <unistd.h>
+ #   include <fcntl.h>
+-#   include <utime.h>
++#   if _POSIX_C_SOURCE < 200809L
++#     include <utime.h>
++#   endif
+ #   include "limits.h"
+ # else // BOOST_WINDOW_API
+@@ -1451,6 +1453,22 @@ namespace detail
+                         system::error_code* ec)
+   {
+ #   ifdef BOOST_POSIX_API
++#     if _POSIX_C_SOURCE >= 200809L
++
++    struct timespec times[2] = {};
++
++    // Keep the last access time unchanged
++    times[0].tv_nsec = UTIME_OMIT;
++
++    times[1].tv_sec = new_time;
++
++    if (BOOST_UNLIKELY(::utimensat(AT_FDCWD, p.c_str(), times, 0) != 0))
++    {
++      error(BOOST_ERRNO, p, ec, "boost::filesystem::last_write_time");
++      return;
++    }
++
++#     else // _POSIX_C_SOURCE >= 200809L
+     struct stat path_stat;
+     if (error(::stat(p.c_str(), &path_stat)!= 0,
+@@ -1462,6 +1480,8 @@ namespace detail
+     error(::utime(p.c_str(), &buf)!= 0 ? BOOST_ERRNO : 0,
+       p, ec, "boost::filesystem::last_write_time");
++#     endif // _POSIX_C_SOURCE >= 200809L
++
+ #   else
+     handle_wrapper hw(
diff --git a/libs/boost/patches/010-uclibc-ng.patch b/libs/boost/patches/010-uclibc-ng.patch
deleted file mode 100644 (file)
index 27d93b2..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
---- a/boost/asio/detail/impl/eventfd_select_interrupter.ipp
-+++ b/boost/asio/detail/impl/eventfd_select_interrupter.ipp
-@@ -23,11 +23,11 @@
- #include <sys/stat.h>
- #include <sys/types.h>
- #include <fcntl.h>
--#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
-+#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 2
- # include <asm/unistd.h>
--#else // __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
-+#else // __GLIBC__ == 2 && __GLIBC_MINOR__ < 2
- # include <sys/eventfd.h>
--#endif // __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
-+#endif // __GLIBC__ == 2 && __GLIBC_MINOR__ < 2
- #include <boost/asio/detail/cstdint.hpp>
- #include <boost/asio/detail/eventfd_select_interrupter.hpp>
- #include <boost/asio/detail/throw_error.hpp>
-@@ -46,14 +46,14 @@ eventfd_select_interrupter::eventfd_select_interrupter()
- void eventfd_select_interrupter::open_descriptors()
- {
--#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
-+#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 2
-   write_descriptor_ = read_descriptor_ = syscall(__NR_eventfd, 0);
-   if (read_descriptor_ != -1)
-   {
-     ::fcntl(read_descriptor_, F_SETFL, O_NONBLOCK);
-     ::fcntl(read_descriptor_, F_SETFD, FD_CLOEXEC);
-   }
--#else // __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
-+#else // __GLIBC__ == 2 && __GLIBC_MINOR__ < 2
- # if defined(EFD_CLOEXEC) && defined(EFD_NONBLOCK)
-   write_descriptor_ = read_descriptor_ =
-     ::eventfd(0, EFD_CLOEXEC | EFD_NONBLOCK);
-@@ -70,7 +70,7 @@ void eventfd_select_interrupter::open_descriptors()
-       ::fcntl(read_descriptor_, F_SETFD, FD_CLOEXEC);
-     }
-   }
--#endif // __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
-+#endif // __GLIBC__ == 2 && __GLIBC_MINOR__ < 2
-   if (read_descriptor_ == -1)
-   {
diff --git a/libs/boost/patches/100-fix-apply_visitor-on-lvalue-variant.patch b/libs/boost/patches/100-fix-apply_visitor-on-lvalue-variant.patch
deleted file mode 100644 (file)
index 02623d9..0000000
+++ /dev/null
@@ -1,131 +0,0 @@
-From cbdb354a274c8ab51a15dd43eafd02c2b6a576f0 Mon Sep 17 00:00:00 2001
-From: Edward Catmur <edward.catmur@mavensecurities.com>
-Date: Wed, 17 Apr 2019 15:05:37 +0100
-Subject: [PATCH 1/2] Copy variant cvref when determining result type
-
-Ensures that we can e.g. call apply_visitor on a lvalue variant
----
- boost/variant/detail/apply_visitor_unary.hpp | 9 +++++----
- 1 file changed, 5 insertions(+), 4 deletions(-)
-
-diff --git a/boost/variant/detail/apply_visitor_unary.hpp b/boost/variant/detail/apply_visitor_unary.hpp
-index 71610cb6..c3a741ef 100644
---- a/boost/variant/detail/apply_visitor_unary.hpp
-+++ b/boost/variant/detail/apply_visitor_unary.hpp
-@@ -23,6 +23,7 @@
- #   include <boost/mpl/size.hpp>
- #   include <boost/utility/declval.hpp>
- #   include <boost/core/enable_if.hpp>
-+#   include <boost/type_traits/copy_cv_ref.hpp>
- #   include <boost/type_traits/remove_reference.hpp>
- #   include <boost/variant/detail/has_result_type.hpp>
- #endif
-@@ -85,7 +86,7 @@ namespace detail { namespace variant {
- // This class serves only metaprogramming purposes. none of its methods must be called at runtime!
- template <class Visitor, class Variant>
- struct result_multideduce1 {
--    typedef typename Variant::types                 types;
-+    typedef typename remove_reference<Variant>::type::types types;
-     typedef typename boost::mpl::begin<types>::type begin_it;
-     typedef typename boost::mpl::advance<
-         begin_it, boost::mpl::int_<boost::mpl::size<types>::type::value - 1>
-@@ -95,14 +96,14 @@ struct result_multideduce1 {
-     struct deduce_impl {
-         typedef typename boost::mpl::next<It>::type next_t;
-         typedef typename boost::mpl::deref<It>::type value_t;
--        typedef decltype(true ? boost::declval< Visitor& >()( boost::declval< value_t >() )
-+        typedef decltype(true ? boost::declval< Visitor& >()( boost::declval< copy_cv_ref_t< value_t, Variant > >() )
-                               : boost::declval< typename deduce_impl<next_t>::type >()) type;
-     };
-     template <class Dummy>
-     struct deduce_impl<last_it, Dummy> {
-         typedef typename boost::mpl::deref<last_it>::type value_t;
--        typedef decltype(boost::declval< Visitor& >()( boost::declval< value_t >() )) type;
-+        typedef decltype(boost::declval< Visitor& >()( boost::declval< copy_cv_ref_t< value_t, Variant > >() )) type;
-     };
-     typedef typename deduce_impl<begin_it>::type type;
-@@ -132,7 +133,7 @@ inline decltype(auto) apply_visitor(Visitor&& visitor, Visitable&& visitable,
-         boost::detail::variant::has_result_type<Visitor>
-     >::type* = 0)
- {
--    boost::detail::variant::result_wrapper1<Visitor, typename remove_reference<Visitable>::type> cpp14_vis(::boost::forward<Visitor>(visitor));
-+    boost::detail::variant::result_wrapper1<Visitor, Visitable> cpp14_vis(::boost::forward<Visitor>(visitor));
-     return ::boost::forward<Visitable>(visitable).apply_visitor(cpp14_vis);
- }
-
-From 7331d648f46b6008138cbd22087b8c5c61ff7926 Mon Sep 17 00:00:00 2001
-From: Ed Catmur <ed@catmur.uk>
-Date: Sun, 21 Apr 2019 00:50:00 +0100
-Subject: [PATCH 2/2] Add test.
-
----
- libs/variant/test/const_ref_apply_visitor.cpp | 44 ++++++++++++++++++++++++++++++++
- 1 file changed, 44 insertions(+)
-
-diff --git a/libs/variant/test/const_ref_apply_visitor.cpp b/libs/variant/test/const_ref_apply_visitor.cpp
-index 0ec77bd4..72afff9e 100644
---- a/libs/variant/test/const_ref_apply_visitor.cpp
-+++ b/libs/variant/test/const_ref_apply_visitor.cpp
-@@ -224,6 +224,44 @@ void test_cpp14_visitor(const variant_type& test_var, const variant_type& test_v
- #endif
- }
-+void test_cpp14_visitor(variant_type& test_var)
-+{
-+    std::cout << "Testing lvalue visitable for c++14\n";
-+
-+    BOOST_TEST(boost::apply_visitor([](auto& v) { return lvalue_rvalue_detector()(v); }, test_var) == "lvalue reference");
-+}
-+
-+void test_cpp14_mutable_visitor(variant_type& test_var)
-+{
-+    std::cout << "Testing lvalue visitable for c++14 with inline mutable lambda\n";
-+
-+    BOOST_TEST(boost::apply_visitor([](auto& v) mutable -> auto { return lvalue_rvalue_detector()(v); }, test_var) == "lvalue reference");
-+}
-+
-+void test_cpp14_visitor(variant_type& test_var, variant_type& test_var2)
-+{
-+    std::cout << "Testing lvalue visitable for c++14\n";
-+
-+    BOOST_TEST(boost::apply_visitor([](auto& v, auto& vv) { return lvalue_rvalue_detector()(v, vv); }, test_var, test_var2)
-+            == "lvalue reference, lvalue reference");
-+}
-+
-+void test_cpp14_visitor(variant_type& test_var, variant_type& test_var2, variant_type& test_var3)
-+{
-+#if !defined(BOOST_VARIANT_DO_NOT_USE_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_HDR_TUPLE)
-+    std::cout << "Testing lvalue visitable for c++14\n";
-+
-+    auto result = boost::apply_visitor([](auto& v, auto& t, auto& p) { return lvalue_rvalue_detector()(v, t, p); },
-+                test_var, test_var2, test_var3);
-+    std::cout << "result: " << result << std::endl;
-+    BOOST_TEST(result == "lvalue reference, lvalue reference, lvalue reference");
-+#else
-+    (void)test_var;
-+    (void)test_var2;
-+    (void)test_var3;
-+#endif
-+}
-+
- void test_cpp14_visitor(variant_type&& test_var)
- {
-     std::cout << "Testing rvalue visitable for c++14\n";
-@@ -344,8 +382,14 @@ void run_cpp14_mixed_tests()
- void run_cpp14_tests()
- {
- #ifndef BOOST_NO_CXX14_DECLTYPE_AUTO
-+    variant_type const c1(10), c2(20), c3(30);
-     variant_type v1(10), v2(20), v3(30);
-+    test_cpp14_visitor(c1);
-+    test_cpp14_mutable_visitor(c1);
-+    test_cpp14_visitor(c2, c3);
-+    test_cpp14_visitor(c1, c2, c3);
-+
-     test_cpp14_visitor(v1);
-     test_cpp14_mutable_visitor(v1);
-     test_cpp14_visitor(v2, v3);
diff --git a/libs/boost/patches/101-uclibc-ng-math.patch b/libs/boost/patches/101-uclibc-ng-math.patch
new file mode 100644 (file)
index 0000000..0d16686
--- /dev/null
@@ -0,0 +1,21 @@
+--- a/boost/math/tools/roots.hpp
++++ b/boost/math/tools/roots.hpp
+@@ -665,8 +665,8 @@ namespace detail
+     inline T discriminant(T const & a, T const & b, T const & c)
+     {
+         T w = 4*a*c;
+-        T e = std::fma(-c, 4*a, w);
+-        T f = std::fma(b, b, -w);
++        T e = fma(-c, 4*a, w);
++        T f = fma(b, b, -w);
+         return f + e;
+     }
+ }
+@@ -674,7 +674,6 @@ namespace detail
+ template<class T>
+ auto quadratic_roots(T const& a, T const& b, T const& c)
+ {
+-    using std::copysign;
+     using std::sqrt;
+     if constexpr (std::is_integral<T>::value)
+     {
diff --git a/libs/boost/patches/uclibc-ng-2.patch b/libs/boost/patches/uclibc-ng-2.patch
deleted file mode 100644 (file)
index 0d16686..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
---- a/boost/math/tools/roots.hpp
-+++ b/boost/math/tools/roots.hpp
-@@ -665,8 +665,8 @@ namespace detail
-     inline T discriminant(T const & a, T const & b, T const & c)
-     {
-         T w = 4*a*c;
--        T e = std::fma(-c, 4*a, w);
--        T f = std::fma(b, b, -w);
-+        T e = fma(-c, 4*a, w);
-+        T f = fma(b, b, -w);
-         return f + e;
-     }
- }
-@@ -674,7 +674,6 @@ namespace detail
- template<class T>
- auto quadratic_roots(T const& a, T const& b, T const& c)
- {
--    using std::copysign;
-     using std::sqrt;
-     if constexpr (std::is_integral<T>::value)
-     {
index 2e0429686aeb6d609c46dc50cc1869e089b969e4..cead30e08fb0b9584b18927f306e6d83781536d2 100644 (file)
@@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=check
 PKG_VERSION:=0.12.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/libcheck/check/releases/download/$(PKG_VERSION)
 PKG_HASH:=464201098bee00e90f5c4bdfa94a5d3ead8d641f9025b560a27755a83b824234
 
-PKG_LICENSE:=LGPL-2.1+
+PKG_LICENSE:=LGPL-2.1-or-later
 PKG_LICENSE_FILES:=COPYING.LESSER
 PKG_MAINTAINER:=Eduardo Abinader <eduardoabinader@gmail.com>
 
index 9eed414f80530fa8f1f9867d7f02d7dc7418f16c..f9d58b3fdef787c85d954ea32462806c08dce011 100644 (file)
@@ -9,16 +9,20 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=classpath
 PKG_VERSION:=0.99
-PKG_RELEASE:=2
-PKG_LICENSE:=GPL-2.0
-PKG_MAINTAINER:=Dana H. Myers <k6jq@comcast.net>
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@GNU/classpath
 PKG_HASH:=f929297f8ae9b613a1a167e231566861893260651d913ad9b6c11933895fecc8
 
-PKG_FIXUP:=autoreconf
+PKG_MAINTAINER:=Dana H. Myers <k6jq@comcast.net>
+PKG_LICENSE:=GPL-2.0-or-later
+PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:gnu:classpath
+
 PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
+PKG_BUILD_DEPENDS:=jamvm/host
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -26,7 +30,7 @@ define Package/classpath
   SECTION:=libs
   CATEGORY:=Libraries
   TITLE:=GNU Classpath
-  URL:=http://www.gnu.org/software/classpath/
+  URL:=https://www.gnu.org/software/classpath/
   DEPENDS:=+alsa-lib +libgmp +libmagic
 endef
 
@@ -40,11 +44,11 @@ define Package/classpath-tools
   SECTION:=libs
   CATEGORY:=Libraries
   TITLE:=GNU Classpath tools
-  URL:=http://www.gnu.org/software/classpath/
+  URL:=https://www.gnu.org/software/classpath/
 endef
 
 define Download/antlr
-  URL:=http://www.antlr.org/download
+  URL:=https://www.antlr.org/download
   FILE:=antlr-3.4-complete.jar
   HASH:=9d3e866b610460664522520f73b81777b5626fb0a282a5952b9800b751550bf7
 endef
index 0f20abdc61afaa2e98f5cfa93fbb461c36b4327b..34a17e1042ce768f2f77f5b0ab860dddf0e138d5 100644 (file)
@@ -16,6 +16,7 @@ PKG_SOURCE_URL:=https://github.com/martinh/libconfuse/releases/download/v$(PKG_V
 PKG_HASH:=a9240b653d02e8cfc52db48e8c4224426e528e1faa09b65e8ca08a197fad210b
 PKG_MAINTAINER:=
 PKG_LICENSE:=ISC
+PKG_CPE_ID:=cpe:/a:libconfuse_project:libconfuse
 
 include $(INCLUDE_DIR)/package.mk
 
index a4093e1e51ef313089dac68322629f4664dbebe3..b905f266431587958d112d02e73d8c9e978b5a76 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2016-2018 Yousong Zhou <yszhou4tech@gmail.com>
+# Copyright (C) 2016-2019 Yousong Zhou <yszhou4tech@gmail.com>
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,10 +8,10 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=dtc
-PKG_VERSION:=1.5.0
+PKG_VERSION:=1.5.1
 PKG_RELEASE:=1
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_HASH:=c672e443c9f7e39f5a7c8e602da6777f9ad55ad70de87de300a43828c8050172
+PKG_HASH:=660b74039690fc37013660544d09191834efb58503c73c555c5513ba75ab031f
 PKG_SOURCE_URL:=@KERNEL/software/utils/dtc
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=GPL
@@ -46,6 +46,7 @@ define Package/fdt-utils
   CATEGORY:=Utilities
   TITLE:=Flat Device Tree Utilities
   URL:=https://git.kernel.org/pub/scm/utils/dtc/dtc.git
+  DEPENDS:=+libfdt
 endef
 
 define Package/fdt-utils/install
@@ -80,6 +81,7 @@ MAKE_FLAGS += \
        NO_PYTHON=1 \
        NO_VALGRIND=1 \
        NO_YAML=1 \
+       EXTRA_CFLAGS=$(EXTRA_CFLAGS) \
 
 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
deleted file mode 100644 (file)
index 15d47c5..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
---- 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 919718b12503a27782d5f9e91ff627ad6a0b74ed..b78253e3f88edf621facaee16c3597e4acc830d2 100644 (file)
@@ -15,7 +15,7 @@ PKG_NAME:=elektra
 PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=LICENSE.md
 PKG_VERSION:=0.8.21
-PKG_RELEASE:=1
+PKG_RELEASE:=4
 
 # Use this for official releasees
 PKG_HASH:=51892570f18d1667d0da4d0908a091e41b41c20db9835765677109a3d150cd26
@@ -29,18 +29,20 @@ PKG_SOURCE_URL:=http://ftp.libelektra.org/ftp/elektra/releases
 #PKG_SOURCE_VERSION:=e97efb29a94f3a49cb952d06552fcf53708ea8c7
 #PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
 
-PKG_BUILD_DEPENDS:=elektra/host swig/host
+HOST_BUILD_DEPENDS:=swig/host
+PKG_BUILD_DEPENDS:=elektra/host lua
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/host-build.mk
 include $(INCLUDE_DIR)/cmake.mk
+include $(INCLUDE_DIR)/nls.mk
 
 define Package/libelektra/Default
   SECTION:=libs
   CATEGORY:=Libraries
   TITLE:=Elektra
   URL:=http://www.libelektra.org/
-  SUBMENU:=libelektra
+  SUBMENU:=LibElektra
 endef
 
 define Package/libelektra/Default-description
@@ -93,7 +95,7 @@ endef
 define Package/libelektra-plugins
   $(call Package/libelektra/Default)
   TITLE:=Useful elektra plugins
-  DEPENDS:=+libelektra-core
+  DEPENDS:=+libelektra-core $(ICONV_DEPENDS)
 endef
 
 define CONTENT_ELEKTRA_PLUGINS_TEXT
@@ -260,7 +262,7 @@ endef
 define Package/libelektra-lua
   $(call Package/libelektra/Default)
   TITLE:=Elektra lua plugin
-  DEPENDS:=+libelektra-core +lua +libstdcpp
+  DEPENDS:=+libelektra-core +lua5.3 +libstdcpp
 endef
 
 define Package/libelektra-lua/description
@@ -302,7 +304,10 @@ CMAKE_OPTIONS = \
        -DKDB_DEFAULT_RESOLVER=resolver_fm_pb_b \
        -DKDB_DEFAULT_STORAGE=ini \
        -DENABLE_OPTIMIZATIONS=OFF \
-       -DPLUGINS="ALL;-multifile"
+       -DPLUGINS="ALL;-multifile" \
+       -DICONV_FIND_REQUIRED=ON \
+       -DICONV_INCLUDE_DIR="$(ICONV_PREFIX)/include" \
+       -DICONV_LIBRARY="$(ICONV_PREFIX)/lib"
 
 CMAKE_HOST_OPTIONS = \
        -DCMAKE_SKIP_RPATH=FALSE \
diff --git a/libs/elektra/patches/010-openssl-deprecated.patch b/libs/elektra/patches/010-openssl-deprecated.patch
new file mode 100644 (file)
index 0000000..ea7df04
--- /dev/null
@@ -0,0 +1,35 @@
+--- a/src/plugins/crypto/openssl_operations.c
++++ b/src/plugins/crypto/openssl_operations.c
+@@ -25,6 +25,10 @@
+ #include <stdlib.h>
+ #include <string.h>
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#define EVP_CIPHER_CTX_reset EVP_CIPHER_CTX_cleanup
++#endif
++
+ #define KEY_BUFFER_SIZE (ELEKTRA_CRYPTO_SSL_KEYSIZE + ELEKTRA_CRYPTO_SSL_BLOCKSIZE)
+ /*
+@@ -144,8 +148,10 @@ int elektraCryptoOpenSSLInit (Key * errorKey ELEKTRA_UNUSED)
+       // initialize OpenSSL according to
+       // https://wiki.openssl.org/index.php/Library_Initialization
+       pthread_mutex_lock (&mutex_ssl);
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+       OpenSSL_add_all_algorithms ();
+       ERR_load_crypto_strings ();
++#endif
+       pthread_mutex_unlock (&mutex_ssl);
+       return 1;
+ }
+@@ -246,8 +252,8 @@ void elektraCryptoOpenSSLHandleDestroy (elektraCryptoHandle * handle)
+       if (handle)
+       {
+               pthread_mutex_lock (&mutex_ssl);
+-              EVP_CIPHER_CTX_cleanup (handle->encrypt);
+-              EVP_CIPHER_CTX_cleanup (handle->decrypt);
++              EVP_CIPHER_CTX_reset (handle->encrypt);
++              EVP_CIPHER_CTX_reset (handle->decrypt);
+               EVP_CIPHER_CTX_free (handle->encrypt);
+               EVP_CIPHER_CTX_free (handle->decrypt);
+               pthread_mutex_unlock (&mutex_ssl);
index 52e7133366b41a590800e1594f3388527a085aac..ec064986c1b25a0b39cfe75f3159b514519eff90 100644 (file)
@@ -6,20 +6,19 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=expat
-PKG_VERSION:=2.2.6
+PKG_VERSION:=2.2.7
 PKG_RELEASE:=1
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@SF/expat
-PKG_HASH:=17b43c2716d521369f82fc2dc70f359860e90fa440bea65b3b85f0b246ea81f2
-PKG_MAINTAINER:=Steven Barth <cyrus@openwrt.org>, \
-               Ted Hess <thess@kitschensync.net>
+PKG_HASH:=30e3f40acf9a8fdbd5c379bdcc8d1178a1d9af306de29fc8ece922bc4c57bef8
 
+PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:libexpat:expat
 
 PKG_FIXUP:=autoreconf
-
 PKG_INSTALL:=1
 PKG_BUILD_PARALLEL:=1
 
index 77027b5be063efdfd71fb3c37b9fbb12d2914538..1f609b542bbec90c53366a7a8f4f5457f7e556cd 100644 (file)
@@ -13,6 +13,7 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/faac/faad2-src/$(PKG_NAME)-2.8.0
 PKG_HASH:=985c3fadb9789d2815e50f4ff714511c79c2710ac27a4aaaf5c0c2662141426d
 PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
+PKG_CPE_ID:=cpe:/a:audiocoding:faad2
 
 PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
index 5bd4e1965e13433b4eeecce1dbcac7ef83a4849c..d21b6dcd13cdf6f163e5c9b372a32b4023aae93c 100644 (file)
@@ -1,53 +1,66 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=fbthrift
-PKG_VERSION:=2019.05.27.00
+PKG_SOURCE_DATE:=2019-09-22
+PKG_SOURCE_VERSION:=2f9839604e2569120cc4876c667388da6d7342f2
 PKG_RELEASE:=1
-PKG_MAINTAINER:=Amol Bhave <ambhave@fb.com>
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://codeload.github.com/facebook/fbthrift/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=7c56dae532e60844520cef4ce03abd4911323fe340fdee0cc3a6a3e8adb09e3f
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_DATE).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/facebook/fbthrift/tar.gz/$(PKG_SOURCE_VERSION)?
+PKG_HASH:=339a73610ad19070d33151127966aaf56e5df3640c238292fc74658c3075da3a
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_SOURCE_VERSION)
+HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)-$(PKG_SOURCE_VERSION)
 
+PKG_MAINTAINER:=Amol Bhave <ambhave@fb.com>
+PKG_LICENSE:=Apache-2.0
 PKG_LICENSE_FILES:=LICENSE
 
-PKG_BUILD_DEPENDS:=fbthrift/host
-HOST_BUILD_DEPENDS:=boost/host libmstch/host
+HOST_BUILD_DEPENDS:=libmstch/host
+PKG_BUILD_DEPENDS:=fbthrift/host libwangle librsocket-cpp
+
+HOST_BUILD_PARALLEL:=1
+PKG_BUILD_PARALLEL:=1
+CMAKE_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/host-build.mk
 include $(INCLUDE_DIR)/cmake.mk
 
-HOST_BUILD_PREFIX:=$(STAGING_DIR_HOST)
-
-PKG_BUILD_PARALLEL:=1
-HOST_BUILD_PARALLEL:=1
-CMAKE_OPTIONS:= \
-       -DBoost_NO_BOOST_CMAKE=ON \
-       -DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-       -DBUILD_SHARED_LIBS=ON
-CMAKE_HOST_OPTIONS:= \
-       -DBoost_NO_BOOST_CMAKE=ON \
-       -Dcompiler_only=ON
-HOST_LDFLAGS:=-Wl,-rpath=$(STAGING_DIR_HOST)/lib
-CMAKE_INSTALL:=1
-
 define Package/fbthrift
-       SECTION:=libs
-       CATEGORY:=Libraries
-       TITLE:=Facebook's branch of Apache Thrift, including a new C++ server.
-       DEPENDS:=+libwangle +libfmt +libmstch +librsocket-cpp +@boost-host-build-filesystem \
-               +@boost-host-build-thread +@boost-host-build-system
+  SECTION:=libs
+  CATEGORY:=Libraries
+  TITLE:=Facebook's branch of Apache Thrift, including a new C++ server.
+  URL:=https://github.com/facebook/fbthrift
+  DEPENDS:=+libfmt +libfolly
 endef
 
 define Package/fbthrift/description
-       Facebook's branch of Apache Thrift, including a new C++ server.
+  Facebook's branch of Apache Thrift, including a new C++ server.
 endef
 
-define Package/fbthrift/install
-       $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.so* $(1)/usr/lib/
-endef
+CMAKE_HOST_OPTIONS += \
+       -DBUILD_SHARED_LIBS=ON \
+       -DCMAKE_SKIP_RPATH=OFF \
+       -DCMAKE_INSTALL_RPATH="${STAGING_DIR_HOSTPKG}/lib" \
+       -Dcompiler_only=ON
+
+CMAKE_OPTIONS += \
+       -DCMAKE_POSITION_INDEPENDENT_CODE=ON \
+       -DCXX_STD=c++14 \
+       -Dlib_only=ON \
+       -DTHRIFT1="$(STAGING_DIR_HOSTPKG)/bin/thrift1" \
+       -DTHRIFT_COMPILER_INCLUDE="$(STAGING_DIR_HOSTPKG)/include/" \
+       -Dpython-six_DIR=OFF
+
+# This should not be necessary as it is supposed to be done above.
+# Someone broke something.
+HOST_LDFLAGS += -Wl,-rpath="$(STAGING_DIR_HOSTPKG)/lib"
+
+# GCC9 bug
+TARGET_LDFLAGS += -fno-lto
+
+TARGET_CFLAGS += -ffunction-sections -fdata-sections
+TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
 
 $(eval $(call BuildPackage,fbthrift))
 $(eval $(call HostBuild))
diff --git a/libs/fbthrift/patches/010-boost.patch b/libs/fbthrift/patches/010-boost.patch
new file mode 100644 (file)
index 0000000..a393683
--- /dev/null
@@ -0,0 +1,14 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -44,7 +44,11 @@ endif(MSVC)
+ find_package(
+   Boost 1.54.0 REQUIRED #1.54.0 or greater
+   COMPONENTS
++    context
++    date_time
+     filesystem
++    program_options
++    regex
+     system
+     thread
+ )
diff --git a/libs/fbzmq/Makefile b/libs/fbzmq/Makefile
new file mode 100644 (file)
index 0000000..e6df49c
--- /dev/null
@@ -0,0 +1,45 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=fbzmq
+PKG_VERSION:=2019.06.10.00
+PKG_RELEASE:=4
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/facebook/fbzmq/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=9bb9b2bd42951fa3458b5d6d25f3364c14a7efa3b78bef68a6c00ee6fcba5813
+
+PKG_MAINTAINER:=Amol Bhave <ambhave@fb.com>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+
+CMAKE_SOURCE_SUBDIR:=fbzmq
+PKG_BUILD_DEPENDS:=fbthrift
+PKG_BUILD_PARALLEL:=1
+CMAKE_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+define Package/fbzmq
+  SECTION:=libs
+  CATEGORY:=Libraries
+  TITLE:=Facebook ZeroMQ wrappers.
+  URL:=https://github.com/facebook/fbzmq
+  DEPENDS:=+libfolly +libzmq +libsigar
+endef
+
+define Package/fbzmq/description
+  Facebook ZeroMQ wrappers.
+endef
+
+CMAKE_OPTIONS += \
+       -DCMAKE_POSITION_INDEPENDENT_CODE=ON \
+       -DBUILD_TESTS=OFF \
+       -DTHRIFT1="$(STAGING_DIR_HOSTPKG)/bin/thrift1" \
+       -DTHRIFT_COMPILER_INCLUDE="$(STAGING_DIR_HOSTPKG)/include/"
+
+TARGET_CXXFLAGS += -faligned-new
+TARGET_CXXFLAGS += -ffunction-sections -fdata-sections -flto
+TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
+
+$(eval $(call BuildPackage,fbzmq))
diff --git a/libs/fbzmq/patches/010-move.patch b/libs/fbzmq/patches/010-move.patch
new file mode 100644 (file)
index 0000000..a007b66
--- /dev/null
@@ -0,0 +1,31 @@
+--- a/fbzmq/zmq/Message.cpp
++++ b/fbzmq/zmq/Message.cpp
+@@ -35,7 +35,7 @@ Message::allocate(size_t size) noexcept {
+   if (rc != 0) {
+     return folly::makeUnexpected(Error());
+   }
+-  return std::move(msg);
++  return msg;
+ }
+ folly::Expected<Message, Error>
+@@ -58,7 +58,7 @@ Message::wrapBuffer(std::unique_ptr<folly::IOBuf> buf) noexcept {
+     delete ptr;
+     return folly::makeUnexpected(Error());
+   }
+-  return std::move(msg);
++  return msg;
+ }
+ Message&
+--- a/fbzmq/zmq/Socket.cpp
++++ b/fbzmq/zmq/Socket.cpp
+@@ -449,7 +449,7 @@ SocketImpl::recv(int flags) const noexcept {
+   while (true) {
+     const int n = zmq_msg_recv(&(msg.msg_), ptr_, flags);
+     if (n >= 0) {
+-      return std::move(msg);
++      return msg;
+     }
+     const int err = zmq_errno();
index 6e23625fda8a7f4f2984778cbb8c2363585c8440..ee57a522b276789fbcb13139185cd149887cb6bd 100644 (file)
@@ -9,8 +9,8 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=fftw3
 PKG_VERSION:=3.3.8
-PKG_RELEASE:=1
-PKG_LICENSE:=GPL-2.0+
+PKG_RELEASE:=2
+PKG_LICENSE:=GPL-2.0-or-later
 
 PKG_SOURCE:=fftw-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.fftw.org
index 8fceca7e8838b9df3baf04913b205a52870f2ecd..d18ca7b9492061e9d0285e4b56c5b86d3533f036 100644 (file)
@@ -8,14 +8,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=file
-PKG_VERSION:=5.36
+PKG_VERSION:=5.37
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://src.fedoraproject.org/lookaside/pkgs/file/ \
        http://download.openpkg.org/components/cache/file/ \
        ftp://ftp.astron.com/pub/file/
-PKG_HASH:=fb608290c0fd2405a8f63e5717abf6d03e22e183fb21884413d1edd918184379
+PKG_HASH:=e9c13967f7dd339a3c241b7710ba093560b9a33013491318e88e6b8b57bae07f
 
 PKG_LICENSE:=BSD-2c
 PKG_LICENSE_FILES:=COPYING
index 47de71e32d9158e2169d77a535d0e23389363efa..9541210761cc801a1a0ebe60dc41964a3c3d32a0 100644 (file)
@@ -8,21 +8,21 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=flac
-PKG_VERSION:=1.3.2
-PKG_RELEASE:=2
+PKG_VERSION:=1.3.3
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://downloads.xiph.org/releases/flac/
-PKG_HASH:=91cfc3ed61dc40f47f050a109b08610667d73477af6ef36dcad31c31a4a8d53f
-PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
-
-PKG_INSTALL:=1
+PKG_HASH:=213e82bd716c9de6db2f98bcadbc4c24c7e2efe8c75939a1a84e28539c4e1748
 
+PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
 PKG_LICENSE:=GFDL-1.2 GPL-2 LGPL-2.1 BSD-3-Clause
 PKG_LICENSE_FILES:=README COPYING.FDL COPYING.GPL COPYING.LGPL COPYING.Xiph
 PKG_CPE_ID:=cpe:/a:flac_project:flac
 
 PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
 PKG_REMOVE_FILES:=autogen.sh aclocal.m4
 
 include $(INCLUDE_DIR)/package.mk
@@ -37,15 +37,18 @@ endef
 CONFIGURE_ARGS += \
        --disable-cpplibs \
        --disable-sse \
-       --disable-3dnow \
        --disable-altivec \
        --disable-doxgen-docs \
        --disable-local-xmms-plugin \
        --disable-xmms-plugin \
        --disable-ogg \
        --disable-oggtest \
+       --disable-thorough-tests \
+       --disable-examples \
+       --disable-rpath \
        $(if $(CONFIG_DEBUG),--enable-debug) \
-       --enable-static
+       --enable-static \
+       --without-pic
 
 TARGET_CFLAGS += $(FPIC)
 
index 7c34288c3060633625e5775d94c4f334813e10ca..c844771d8beb238a1012cfee8da5ecfaf24a7b8d 100644 (file)
@@ -4,11 +4,11 @@
  
  ACLOCAL_AMFLAGS = -I m4
  
--SUBDIRS = doc include m4 man src examples test build objs microbench
+-SUBDIRS = doc include m4 man src test build objs microbench
 +SUBDIRS = include m4 src build objs
  
- EXTRA_DIST = \
-       COPYING.FDL \
+ if EXAMPLES
+ SUBDIRS += examples
 --- a/src/Makefile.am
 +++ b/src/Makefile.am
 @@ -30,11 +30,6 @@ SUBDIRS = \
diff --git a/libs/flac/patches/005-gcc_debug_options.patch b/libs/flac/patches/005-gcc_debug_options.patch
deleted file mode 100644 (file)
index ea7db8e..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
---- a/configure.ac
-+++ b/configure.ac
-@@ -386,10 +386,11 @@ fi
- if test "x$debug" = xtrue; then
-       CPPFLAGS="-DDEBUG $CPPFLAGS"
--      CFLAGS="-g $CFLAGS"
-+      CFLAGS=$(echo "$CFLAGS" | sed 's/-g[0-9]*//')
-+      CFLAGS="-g3 $CFLAGS"
- else
-       CPPFLAGS="-DNDEBUG $CPPFLAGS"
--      CFLAGS=$(echo "$CFLAGS" | sed 's/-O2//')
-+      CFLAGS=$(echo "$CFLAGS" | sed 's/-O2//;s/-g[0-9]*//')
-       CFLAGS="-O3 -funroll-loops $CFLAGS"
- fi
diff --git a/libs/flac/patches/010-automake-compat.patch b/libs/flac/patches/010-automake-compat.patch
deleted file mode 100644 (file)
index 8318048..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -33,6 +33,8 @@ ACLOCAL_AMFLAGS = -I m4
- SUBDIRS = include m4 src build objs
-+ACLOCAL_AMFLAGS = -I m4
-+
- EXTRA_DIST = \
-       COPYING.FDL \
-       COPYING.GPL \
diff --git a/libs/flac/patches/010-utime.patch b/libs/flac/patches/010-utime.patch
new file mode 100644 (file)
index 0000000..0c1d170
--- /dev/null
@@ -0,0 +1,118 @@
+Return-Path: <rosenp@gmail.com>
+Received: from localhost.localdomain (76-14-106-55.rk.wavecable.com. [76.14.106.55])
+        by smtp.gmail.com with ESMTPSA id f19sm148509170pfk.180.2019.08.09.13.01.06
+        for <flac-dev@xiph.org>
+        (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256);
+        Fri, 09 Aug 2019 13:01:06 -0700 (PDT)
+From: Rosen Penev <rosenp@gmail.com>
+To: flac-dev@xiph.org
+Subject: [PATCH] Switch to utimensat for newer POSIX versions
+Date: Fri,  9 Aug 2019 13:01:05 -0700
+Message-Id: <20190809200105.1443-1-rosenp@gmail.com>
+X-Mailer: git-send-email 2.17.1
+
+Some libcs like uClibc-ng can optionally disable deprecated functions.
+utime is one of them. When done so, both the header and the function go
+missing.
+
+This fixes flac_utime to work in such a situation.
+---
+ include/share/compat.h           | 10 +++++++++-
+ src/libFLAC/metadata_iterators.c |  9 +++++++--
+ src/share/grabbag/file.c         |  9 +++++++--
+ 3 files changed, 23 insertions(+), 5 deletions(-)
+
+diff --git a/include/share/compat.h b/include/share/compat.h
+index f3041655..a063c083 100644
+--- a/include/share/compat.h
++++ b/include/share/compat.h
+@@ -112,9 +112,13 @@
+ #include <sys/utime.h> /* for utime() */
+ #endif
+ #else
++#if _POSIX_C_SOURCE >= 200809L
++#include <fcntl.h>
++#else
+ #include <sys/types.h> /* some flavors of BSD (like OS X) require this to get time_t */
+ #include <utime.h> /* for utime() */
+ #endif
++#endif
+ #if defined _MSC_VER
+ #  if _MSC_VER >= 1800
+@@ -160,11 +164,15 @@
+ #define flac_fopen fopen
+ #define flac_chmod chmod
+-#define flac_utime utime
+ #define flac_unlink unlink
+ #define flac_rename rename
+ #define flac_stat stat
++#if _POSIX_C_SOURCE >= 200809L
++#define flac_utime(a, b) utimensat (AT_FDCWD, a, *b, 0)
++#else
++#define flac_utime utime
++#endif
+ #endif
+ #ifdef _WIN32
+diff --git a/src/libFLAC/metadata_iterators.c b/src/libFLAC/metadata_iterators.c
+index 352a6c7a..d5255eb9 100644
+--- a/src/libFLAC/metadata_iterators.c
++++ b/src/libFLAC/metadata_iterators.c
+@@ -3422,13 +3422,18 @@ FLAC__bool get_file_stats_(const char *filename, struct flac_stat_s *stats)
+ void set_file_stats_(const char *filename, struct flac_stat_s *stats)
+ {
+-      struct utimbuf srctime;
+-
+       FLAC__ASSERT(0 != filename);
+       FLAC__ASSERT(0 != stats);
++#if _POSIX_C_SOURCE >= 200809L
++      struct timespec srctime[2] = {};
++      srctime[0].tv_sec = stats->st_atime;
++      srctime[1].tv_sec = stats->st_mtime;
++#else
++      struct utimbuf srctime;
+       srctime.actime = stats->st_atime;
+       srctime.modtime = stats->st_mtime;
++#endif
+       (void)flac_chmod(filename, stats->st_mode);
+       (void)flac_utime(filename, &srctime);
+ #if !defined _MSC_VER && !defined __BORLANDC__ && !defined __MINGW32__
+diff --git a/src/share/grabbag/file.c b/src/share/grabbag/file.c
+index 2c67bebf..edd835a6 100644
+--- a/src/share/grabbag/file.c
++++ b/src/share/grabbag/file.c
+@@ -27,7 +27,6 @@
+ #include <fcntl.h> /* for _O_BINARY */
+ #else
+ #include <sys/types.h> /* some flavors of BSD (like OS X) require this to get time_t */
+-#include <utime.h> /* for utime() */
+ #endif
+ #if defined __EMX__
+ #include <io.h> /* for setmode(), O_BINARY */
+@@ -53,11 +52,17 @@
+ void grabbag__file_copy_metadata(const char *srcpath, const char *destpath)
+ {
+       struct flac_stat_s srcstat;
+-      struct utimbuf srctime;
+       if(0 == flac_stat(srcpath, &srcstat)) {
++#if _POSIX_C_SOURCE >= 200809L
++              struct timespec srctime[2] = {};
++              srctime[0].tv_sec = srcstat.st_atime;
++              srctime[1].tv_sec = srcstat.st_mtime;
++#else
++              struct utimbuf srctime;
+               srctime.actime = srcstat.st_atime;
+               srctime.modtime = srcstat.st_mtime;
++#endif
+               (void)flac_chmod(destpath, srcstat.st_mode);
+               (void)flac_utime(destpath, &srctime);
+       }
+-- 
+2.17.1
+
diff --git a/libs/flac/patches/100-CVE-2017-6888.patch b/libs/flac/patches/100-CVE-2017-6888.patch
deleted file mode 100644 (file)
index 3de0cc5..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-From 4f47b63e9c971e6391590caf00a0f2a5ed612e67 Mon Sep 17 00:00:00 2001
-From: Erik de Castro Lopo <erikd@mega-nerd.com>
-Date: Sat, 8 Apr 2017 18:34:49 +1000
-Subject: [PATCH] stream_decoder.c: Fix a memory leak
-
-Leak reported by Secunia Research.
----
- src/libFLAC/stream_decoder.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/src/libFLAC/stream_decoder.c b/src/libFLAC/stream_decoder.c
-index 14d5fe7f..a5527511 100644
---- a/src/libFLAC/stream_decoder.c
-+++ b/src/libFLAC/stream_decoder.c
-@@ -1759,6 +1759,9 @@ FLAC__bool read_metadata_vorbiscomment_(FLAC__StreamDecoder *decoder, FLAC__Stre
-                                       }
-                                       memset (obj->comments[i].entry, 0, obj->comments[i].length) ;
-                                       if (!FLAC__bitreader_read_byte_block_aligned_no_crc(decoder->private_->input, obj->comments[i].entry, obj->comments[i].length)) {
-+                                              /* Current i-th entry is bad, so we delete it. */
-+                                              free (obj->comments[i].entry) ;
-+                                              obj->comments[i].entry = NULL ;
-                                               obj->num_comments = i;
-                                               goto skip;
-                                       }
--- 
-2.17.0
-
index 3270af354f2c1acdc3374fad155ce28fdc2b04a8..0dd7bf70055f3f31792aaf842e013f1013066fb5 100644 (file)
@@ -8,15 +8,15 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=freetype
-PKG_VERSION:=2.10.0
+PKG_VERSION:=2.10.1
 PKG_RELEASE:=1
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@SF/freetype
-PKG_HASH:=fccc62928c65192fff6c98847233b28eb7ce05f12d2fea3f6cc90e8b4e5fbe06
+PKG_HASH:=16dbfa488a21fe827dc27eaf708f42f7aa3bb997d745d31a19781628c36ba26f
 
-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
+PKG_LICENSE:=FTL GPL-2.0-only MIT ZLIB GPL-3.0-or-later
+PKG_LICENSE_FILES:=docs/LICENSE.TXT docs/FTL.TXT docs/GPLv2.TXT src/bdf/README src/pcf/README src/gzip/zlib.h builds/unix/config.sub builds/unix/config.guess builds/unix/libtool 
 PKG_CPE_ID:=cpe:/a:freetype:freetype2
 PKG_MAINTAINER:=Val Kulkov <val.kulkov@gmail.com>
 
index dac4d5e8d4222fa8c53d29510cb796d5c7203186..911059bc5ff6703436cb31ccefe546b559746186 100644 (file)
@@ -8,21 +8,19 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gdbm
-PKG_VERSION:=1.11
+PKG_VERSION:=1.18.1
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@GNU/gdbm
-PKG_HASH:=8d912f44f05d0b15a4a5d96a76f852e905d051bb88022fcdfd98b43be093e3c3
+PKG_HASH:=86e613527e5dba544e73208f42b78b7c022d4fa5a6d5498bf18c8d6f745b91dc
 
-PKG_LICENSE:=GPL-3.0+
-PKG_LICENSE_FILES:=COPYING
 PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
+PKG_LICENSE:=GPL-3.0-or-later
+PKG_LICENSE_FILES:=COPYING
 
-PKG_FIXUP:=autoreconf gettext-version
-PKG_REMOVE_FILES:=Makefile compat/Makefile doc/Makefile export/Makefile src/Makefile tests/Makefile
+PKG_INSTALL:=1
 PKG_BUILD_PARALLEL:=0
-
 PKG_BUILD_DEPENDS:=gettext-full/host
 
 include $(INCLUDE_DIR)/package.mk
@@ -31,7 +29,7 @@ define Package/libgdbm
   SECTION:=libs
   CATEGORY:=Libraries
   TITLE:=GNU database manager
-  URL:=http://www.gnu.org/software/gdbm/
+  URL:=https://www.gnu.org/software/gdbm/
 endef
 
 define Package/libgdbm/description
@@ -40,11 +38,9 @@ define Package/libgdbm/description
   works similar to the standard UNIX dbm routines.
 endef
 
-TARGET_CFLAGS += $(FPIC)
-
 CONFIGURE_ARGS += \
        --enable-shared \
-       --enable-static \
+       --enable-static
 
 define Build/Compile
        +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
index 40e559ef45143c5c7d293b9e0ffe3c1f81374a12..b26be3c7a0d40ad461d5970fb600423d0921f266 100644 (file)
@@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=getdns
 PKG_VERSION:=1.5.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=LICENSE
@@ -72,7 +72,7 @@ endef
 
 define Package/getdns/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libgetdns.so.* $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgetdns.so.* $(1)/usr/lib/
        $(INSTALL_DIR) $(1)/usr/sbin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/getdns_query $(1)/usr/sbin/getdns_query
 endef
index 97646c834808cbb9e00827d4dd19fb7f8f939953..b59e37ffe16463ab22183fdf4c959cc38276cb9d 100644 (file)
@@ -8,21 +8,20 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=giflib
-PKG_VERSION:=5.1.4
+PKG_VERSION:=5.2.1
 PKG_RELEASE:=1
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/giflib
-PKG_HASH:=df27ec3ff24671f80b29e6ab1c4971059c14ac3db95406884fc26574631ba8d5
+PKG_HASH:=31da5562f44c5f15d63340a09a4fd62b48c45620cd302f77a6d9acf0077879bd
 
 PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
-
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=COPYING
 PKG_CPE_ID:=cpe:/a:giflib_project:giflib
 
-PKG_FIXUP:=autoreconf
-PKG_REMOVE_FILES:=autogen.sh aclocal.m4
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/host-build.mk
 include $(INCLUDE_DIR)/package.mk
@@ -31,7 +30,7 @@ define Package/giflib
   SECTION:=libs
   CATEGORY:=Libraries
   TITLE:=GIF libraries
-  URL:=http://sourceforge.net/projects/giflib
+  URL:=https://sourceforge.net/projects/giflib
 endef
 
 define Package/giflib/description
@@ -40,24 +39,42 @@ define Package/giflib/description
   the LZW compression algorithm was patented.
 endef
 
-TARGET_CFLAGS += $(FPIC)
+define Package/giflib-utils
+  SECTION:=utils
+  CATEGORY:=Utilities
+  TITLE:=GIF utilities
+  URL:=https://sourceforge.net/projects/giflib
+endef
 
-define Build/Compile
-       $(MAKE) -C $(PKG_BUILD_DIR)
+define Package/giflib-utils/description
+  These are the utilities that come with giflib.
 endef
 
+TARGET_CFLAGS += -ffunction-sections -fdata-sections $(FPIC)
+TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
+
+MAKE_FLAGS += \
+       CFLAGS="$(TARGET_CFLAGS)" \
+       LDFLAGS="$(TARGET_LDFLAGS)" \
+       PREFIX=$(CONFIGURE_PREFIX)
+
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/{lib,include}
-       $(CP) $(PKG_BUILD_DIR)/lib/.libs/lib*so* $(1)/usr/lib
-       $(CP) $(PKG_BUILD_DIR)/lib/.libs/libgif.a $(1)/usr/lib
-       $(CP) $(PKG_BUILD_DIR)/lib/libgif.la $(1)/usr/lib
-       $(CP) $(PKG_BUILD_DIR)/lib/*.h $(1)/usr/include/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgif.so* $(1)/usr/lib
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libgif.a $(1)/usr/lib
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include
 endef
 
 define Package/giflib/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_BUILD_DIR)/lib/.libs/lib*so* $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgif.so* $(1)/usr/lib
+endef
+
+define Package/giflib-utils/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin
 endef
 
 $(eval $(call HostBuild))
 $(eval $(call BuildPackage,giflib))
+$(eval $(call BuildPackage,giflib-utils))
diff --git a/libs/giflib/patches/100-no-docs.patch b/libs/giflib/patches/100-no-docs.patch
deleted file mode 100644 (file)
index f006d6c..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/configure.ac
-+++ b/configure.ac
-@@ -21,7 +21,6 @@ AC_PROG_MAKE_SET
- AM_PROG_CC_C_O
- dnl Allow partial building on systems without xmlto
--AC_CHECK_PROG([have_xmlto], [xmlto], ["yes"],["no"])
- AM_CONDITIONAL([BUILD_DOC], [test "x${have_xmlto}" = "xyes"])
- dnl Shared-library version
index a6405965771814ed85760e6d9495a0e260a69669..8205edaba168e18de74c939d390918754b17fcbb 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=glib2
 PKG_VERSION:=2.58.3
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=glib-$(PKG_VERSION).tar.xz
 PKG_BUILD_DIR:=$(BUILD_DIR)/glib-$(PKG_VERSION)
@@ -18,11 +18,13 @@ PKG_HASH:=8f43c31767e88a25da72b52a40f3301fefc49a665b56dc10ee7cc9565cbe7481
 
 PKG_BUILD_PARALLEL:=1
 HOST_BUILD_PARALLEL:=1
-PKG_BUILD_DEPENDS:=glib2/host gettext
+PKG_BUILD_DEPENDS:=gettext
 HOST_BUILD_DEPENDS:=gettext-full/host libiconv/host libffi/host
 PKG_INSTALL:=1
 PKG_USE_MIPS16:=0
 
+PKG_CPE_ID:=cpe:/a:gnome:glib
+
 PKG_FIXUP:=autoreconf
 
 HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/glib-$(PKG_VERSION)
@@ -47,6 +49,7 @@ endef
 TARGET_CFLAGS += -Wno-error=implicit-function-declaration
 
 HOST_CONFIGURE_ARGS += \
+       --disable-libelf \
        --disable-selinux \
        --with-libiconv=gnu \
        --with-pcre=internal \
index 36837c11122f4f0a363815a5472e3e4e67c8db62..bc1ddd350547cab59287e5abe779212b76f0b22c 100644 (file)
@@ -8,16 +8,16 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gnutls
-PKG_VERSION:=3.6.8
+PKG_VERSION:=3.6.9
 PKG_RELEASE:=2
 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:=aa81944e5635de981171772857e72be231a7e0f559ae0292d2737de475383e83
+PKG_HASH:=4331fca55817ecdd74450b908a6c29b4f05bb24dd13144c6284aa34d872e1fcb
 #PKG_FIXUP:=autoreconf gettext-version
 PKG_MAINTAINER:=Nikos Mavrogiannopoulos <nmav@gnutls.org>
-PKG_LICENSE:=LGPLv2.1+
+PKG_LICENSE:=LGPL-2.1-or-later
 PKG_CPE_ID:=cpe:/a:gnu:gnutls
 
 PKG_INSTALL:=1
@@ -104,7 +104,10 @@ $(call Package/gnutls/Default/description)
  This package contains the GnuTLS shared library, needed by other programs.
 endef
 
-
+# We disable the configuration file (system-priority-file) because
+# the use of configuration increases the non-shared memory used by
+# the library and we don't provide an openwrt-specific configuration
+# anyway.
 CONFIGURE_ARGS+= \
        --enable-shared \
        --enable-static \
@@ -124,7 +127,8 @@ CONFIGURE_ARGS+= \
        --with-default-trust-store-dir=/etc/ssl/certs/ \
        --with-included-unistring \
        --with-librt-prefix="$(LIBRT_ROOT_DIR)/" \
-       --with-pic
+       --with-pic \
+       --with-system-priority-file=""
 
 ifneq ($(CONFIG_GNUTLS_EXT_LIBTASN1),y)
 CONFIGURE_ARGS += --with-included-libtasn1
index 978b5630a05cb321f169b0e70d5c7f8a61c41dd5..de7bd36dfbfecfb1b1a683fbd8ee73da339ef3f8 100644 (file)
@@ -4,17 +4,18 @@
 #
 
 include $(TOPDIR)/rules.mk
+
 PKG_NAME:=google-authenticator-libpam
-PKG_SOURCE_DATE:=2019-01-03
+PKG_VERSION:=1.06
 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_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/google/google-authenticator-libpam/tar.gz/$(PKG_VERSION)?
+PKG_HASH:=52f03ec746e8deb1af37911697d096f0fa87583491b7cc460cdf09a6ef0d6b06
 
+PKG_MAINTAINER:=Lucian Cristian <lucian.cristian@gmail.com>
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=LICENSE
 
 PKG_BUILD_PARALLEL:=1
 PKG_FIXUP:=autoreconf
@@ -28,7 +29,6 @@ define Package/google-authenticator-libpam
   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
index 51d2e53a88a65128635347d73d55022edd373892..926615fbaa5ba5c4e9c6fec16fb248b9343f411e 100644 (file)
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=hwloc
 PKG_VERSION:=2.0.3
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://download.open-mpi.org/release/$(PKG_NAME)/v2.0
@@ -56,6 +56,7 @@ $(call Package/hwloc/Default)
   SECTION:=libs
   CATEGORY:=Libraries
   TITLE+= libraries
+  DEPENDS+=+libpciaccess
 endef
 
 define Package/libhwloc/description
index 3c50d3acff87765724b4da47387677185b70900f..dfa2e591038728a8fb24b15fcac6747753564a9d 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ibrcommon
 PKG_VERSION:=1.0.1
-PKG_RELEASE:=6
+PKG_RELEASE:=7
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.ibr.cs.tu-bs.de/projects/ibr-dtn/releases
@@ -20,12 +20,13 @@ PKG_LICENSE:=Apache-2.0
 PKG_INSTALL:=1
 PKG_FIXUP:=libtool
 
+include $(INCLUDE_DIR)/uclibc++.mk
 include $(INCLUDE_DIR)/package.mk
 
 define Package/ibrcommon
   SECTION:=libs
   CATEGORY:=Libraries
-  DEPENDS:=+libstdcpp +libpthread +librt +libnl +libopenssl
+  DEPENDS:=$(CXX_DEPENDS) +librt +libnl +libopenssl
   TITLE:=IBR Common C++ Library
 endef
 
index a510c78619919a241455fe3ed4db62659f806c30..c4aceba12c29bc09d7aa8bc8be000bb0cb3a0792 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ibrdtn
 PKG_VERSION:=1.0.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.ibr.cs.tu-bs.de/projects/ibr-dtn/releases
@@ -20,6 +20,7 @@ PKG_LICENSE:=Apache-2.0
 PKG_INSTALL:=1
 PKG_FIXUP:=libtool
 
+include $(INCLUDE_DIR)/uclibc++.mk
 include $(INCLUDE_DIR)/package.mk
 
 define Package/ibrdtn
diff --git a/libs/ibrdtn/patches/010-Add-operator-to-Bundle-block_elem.patch b/libs/ibrdtn/patches/010-Add-operator-to-Bundle-block_elem.patch
new file mode 100644 (file)
index 0000000..fe53508
--- /dev/null
@@ -0,0 +1,25 @@
+From 199c86591edc7e82b92903efecadc4f69ea63370 Mon Sep 17 00:00:00 2001
+From: Johannes Morgenroth <jm@m-network.de>
+Date: Tue, 1 Jan 2019 11:25:50 +0100
+Subject: [PATCH] Add operator!=() to Bundle::block_elem
+
+Alternative implementations of libstdcpp as uclibc++ use it in
+the algorithm implemenetations.
+---
+ ibrdtn/data/Bundle.h | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/ibrdtn/data/Bundle.h b/ibrdtn/data/Bundle.h
+index 036a2a6fb..9bbc066d7 100644
+--- a/ibrdtn/data/Bundle.h
++++ b/ibrdtn/data/Bundle.h
+@@ -69,6 +69,9 @@ namespace dtn
+                               bool operator==(const dtn::data::block_t &type) const {
+                                       return (**this) == type;
+                               }
++                              bool operator!=(const dtn::data::block_t &type) const {
++                                      return !((**this) == type);
++                              }
+                       };
+                       typedef std::list<block_elem> block_list;
diff --git a/libs/ibrdtn/patches/020-Use-const-iterator-in-const-function-of-MemoryBundle.patch b/libs/ibrdtn/patches/020-Use-const-iterator-in-const-function-of-MemoryBundle.patch
new file mode 100644 (file)
index 0000000..d1e2c58
--- /dev/null
@@ -0,0 +1,22 @@
+From 6945698778caf7cdaace9ce8dae82162dbe2ee9f Mon Sep 17 00:00:00 2001
+From: Johannes Morgenroth <jm@m-network.de>
+Date: Thu, 3 Jan 2019 07:26:51 +0100
+Subject: [PATCH] Use const iterator in const function of MemoryBundleSet
+
+---
+ ibrdtn/data/MemoryBundleSet.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/ibrdtn/data/MemoryBundleSet.cpp b/ibrdtn/data/MemoryBundleSet.cpp
+index 987342e6d..b67fdd393 100644
+--- a/ibrdtn/data/MemoryBundleSet.cpp
++++ b/ibrdtn/data/MemoryBundleSet.cpp
+@@ -134,7 +134,7 @@ namespace dtn
+                               // the bundles set. This happen if the MemoryBundleSet gets deserialized.
+                               if (!_consistent) return true;
+-                              bundle_set::iterator iter = _bundles.find(dtn::data::MetaBundle::create(bundle));
++                              bundle_set::const_iterator iter = _bundles.find(dtn::data::MetaBundle::create(bundle));
+                               return (iter != _bundles.end());
+                       }
diff --git a/libs/ibrdtn/patches/030-Use-std-streamoff-instead-of-std-streampos.patch b/libs/ibrdtn/patches/030-Use-std-streamoff-instead-of-std-streampos.patch
new file mode 100644 (file)
index 0000000..0e29a13
--- /dev/null
@@ -0,0 +1,41 @@
+From 1395d849d73147319ee422d2ce34de0bcb90e6f8 Mon Sep 17 00:00:00 2001
+From: Johannes Morgenroth <jm@m-network.de>
+Date: Thu, 3 Jan 2019 07:34:14 +0100
+Subject: [PATCH] Use std::streamoff instead of std::streampos
+
+---
+ ibrdtn/data/BundleMerger.cpp | 2 +-
+ ibrdtn/data/Dictionary.cpp   | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/ibrdtn/data/BundleMerger.cpp b/ibrdtn/data/BundleMerger.cpp
+index 1cd20c522..b71a0849b 100644
+--- a/ibrdtn/data/BundleMerger.cpp
++++ b/ibrdtn/data/BundleMerger.cpp
+@@ -119,7 +119,7 @@ namespace dtn
+                       }
+                       ibrcommon::BLOB::iostream stream = c._blob.iostream();
+-                      (*stream).seekp(obj.fragmentoffset.get<std::streampos>());
++                      (*stream).seekp(obj.fragmentoffset.get<std::streamoff>());
+                       const dtn::data::PayloadBlock &p = obj.find<dtn::data::PayloadBlock>();
+                       const Length plength = p.getLength();
+diff --git a/ibrdtn/data/Dictionary.cpp b/ibrdtn/data/Dictionary.cpp
+index 6299e66f3..208f90488 100644
+--- a/ibrdtn/data/Dictionary.cpp
++++ b/ibrdtn/data/Dictionary.cpp
+@@ -154,11 +154,11 @@ namespace dtn
+               {
+                       char buffer[1024];
+-                      _bytestream.seekg(scheme.get<std::streampos>());
++                      _bytestream.seekg(scheme.get<std::streamoff>());
+                       _bytestream.get(buffer, 1024, '\0');
+                       std::string scheme_str(buffer);
+-                      _bytestream.seekg(ssp.get<std::streampos>());
++                      _bytestream.seekg(ssp.get<std::streamoff>());
+                       _bytestream.get(buffer, 1024, '\0');
+                       std::string ssp_str(buffer);
diff --git a/libs/ibrdtn/patches/040-Add-operator-to-BundleID-and-MetaBundle.patch b/libs/ibrdtn/patches/040-Add-operator-to-BundleID-and-MetaBundle.patch
new file mode 100644 (file)
index 0000000..df9f27f
--- /dev/null
@@ -0,0 +1,53 @@
+From a5b9c2feeaabbd90c9734c5d865d471eed0d5e3a Mon Sep 17 00:00:00 2001
+From: Rosen Penev <rosenp@gmail.com>
+Date: Thu, 28 Mar 2019 01:55:15 -0700
+Subject: [PATCH] Add operator!=() to BundleID and MetaBundle
+
+Needed for uClibc++.
+
+Signed-off-by: Rosen Penev <rosenp@gmail.com>
+---
+ ibrdtn/data/Bundle.cpp | 10 ++++++++++
+ ibrdtn/data/Bundle.h   |  2 ++
+ 2 files changed, 12 insertions(+)
+
+diff --git a/ibrdtn/data/Bundle.cpp b/ibrdtn/data/Bundle.cpp
+index f515860..943544e 100644
+--- a/ibrdtn/data/Bundle.cpp
++++ b/ibrdtn/data/Bundle.cpp
+@@ -71,11 +71,21 @@ namespace dtn
+                       return other == (const PrimaryBlock&)(*this);
+               }
++              bool Bundle::operator!=(const BundleID& other) const
++              {
++                      return other != (const PrimaryBlock&)(*this);
++              }
++
+               bool Bundle::operator==(const MetaBundle& other) const
+               {
+                       return other == (const PrimaryBlock&)(*this);
+               }
++              bool Bundle::operator!=(const MetaBundle& other) const
++              {
++                      return other != (const PrimaryBlock&)(*this);
++              }
++
+               bool Bundle::operator!=(const Bundle& other) const
+               {
+                       return (const PrimaryBlock&)(*this) != (const PrimaryBlock&)other;
+diff --git a/ibrdtn/data/Bundle.h b/ibrdtn/data/Bundle.h
+index 9bbc066..6a4ea47 100644
+--- a/ibrdtn/data/Bundle.h
++++ b/ibrdtn/data/Bundle.h
+@@ -97,7 +97,9 @@ namespace dtn
+                       virtual ~Bundle();
+                       bool operator==(const BundleID& other) const;
++                      bool operator!=(const BundleID& other) const;
+                       bool operator==(const MetaBundle& other) const;
++                      bool operator!=(const MetaBundle& other) const;
+                       bool operator==(const Bundle& other) const;
+                       bool operator!=(const Bundle& other) const;
index e7ca37bf54c1ee680abf32a43c7bbc52bcfe1c0f..cca2b65d851dcded26e13ac6ed2a70073cd2f870 100644 (file)
@@ -28,6 +28,7 @@ PKG_BUILD_PARALLEL:=1
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
 
 PKG_BUILD_DEPENDS:=icu/host
+HOST_BUILD_DEPENDS:=python3/host
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/host-build.mk
index 89d7a39c12fbacba68ca5258bafbacbd405361c0..244f59995a729d6c1aa5eca787d8be3cbd400164 100644 (file)
@@ -7,19 +7,24 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=intltool
 PKG_VERSION:=0.51.0
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://launchpad.net/intltool/trunk/$(PKG_VERSION)/+download
 PKG_HASH:=67c74d94196b153b774ab9f89b2fa6c6ba79352407037c8c14d5aeb334e959cd
 PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
 
+
+HOST_BUILD_DEPENDS:=perl/host
 PKG_HOST_ONLY:=1
 HOST_FIXUP:=autoreconf
 
 include $(INCLUDE_DIR)/host-build.mk
 include $(INCLUDE_DIR)/package.mk
 
+HOST_CONFIGURE_VARS+= \
+        PATH="$(STAGING_DIR_HOSTPKG)/bin:$(STAGING_DIR_HOSTPKG)/usr/bin:$(PATH)"
+
 define Package/intltool
   SECTION:=libs
   CATEGORY:=Libraries
index f129ad712fc30e296b480bd354886ceb0334e832..053a3d3c720f530141a31be245d39cdd4f438e9c 100644 (file)
@@ -9,14 +9,18 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=jsoncpp
 PKG_VERSION:=1.8.4
-PKG_RELEASE:=1
+PKG_RELEASE:=2
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/open-source-parsers/jsoncpp/tar.gz/$(PKG_VERSION)?
+PKG_HASH:=c49deac9e0933bcb7044f08516861a2d560988540b23de2ac1ad443b219afdb6
+
 PKG_MAINTAINER:=
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
 
-PKG_SOURCE_URL:=https://codeload.github.com/open-source-parsers/jsoncpp/tar.gz/$(PKG_VERSION)?
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=c49deac9e0933bcb7044f08516861a2d560988540b23de2ac1ad443b219afdb6
+PKG_BUILD_PARALLEL:=1
+CMAKE_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/cmake.mk
@@ -48,13 +52,4 @@ define Package/jsoncpp/install
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjsoncpp.so* $(1)/usr/lib/
 endef
 
-define Build/InstallDev
-       $(INSTALL_DIR) $(1)/usr/include
-       $(CP) $(PKG_INSTALL_DIR)/usr/include/json $(1)/usr/include
-       $(INSTALL_DIR) $(1)/usr/lib/
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjsoncpp.so* $(1)/usr/lib/
-       $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/jsoncpp.pc $(1)/usr/lib/pkgconfig/
-endef
-
 $(eval $(call BuildPackage,jsoncpp))
diff --git a/libs/jsoncpp/patches/010-pkgconnfig.patch b/libs/jsoncpp/patches/010-pkgconnfig.patch
new file mode 100644 (file)
index 0000000..26a7931
--- /dev/null
@@ -0,0 +1,26 @@
+From 63dc2f77e33e9ff559e051cd2964960b9d3e761e Mon Sep 17 00:00:00 2001
+From: Rosen Penev <rosenp@gmail.com>
+Date: Mon, 16 Sep 2019 18:38:24 -0700
+Subject: [PATCH] pkgconfig: Fix for cross compilation
+
+exec_ and prefix must be overridden  in such a case.
+
+Makes the .pc file more consistent with other projects.
+---
+ pkg-config/jsoncpp.pc.in | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/pkg-config/jsoncpp.pc.in b/pkg-config/jsoncpp.pc.in
+index dea51f51..d4fa9ef2 100644
+--- a/pkg-config/jsoncpp.pc.in
++++ b/pkg-config/jsoncpp.pc.in
+@@ -1,5 +1,7 @@
+-libdir=@CMAKE_INSTALL_FULL_LIBDIR@
+-includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
++prefix=@CMAKE_INSTALL_PREFIX@
++exec_prefix=@CMAKE_INSTALL_PREFIX@
++libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
++includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
+ Name: jsoncpp
+ Description: A C++ library for interacting with JSON
index 430473cd4630bf300cd68d696c5cd5bc7a9da3c6..f88e4f484711a21e0fdbafb03c1c2389d4fee827 100644 (file)
@@ -7,12 +7,15 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=keyutils
 PKG_VERSION:=1.6
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://people.redhat.com/dhowells/keyutils/
 PKG_HASH:=d3aef20cec0005c0fa6b4be40079885567473185b1a57b629b030e67942c7115
 
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
+
 include $(INCLUDE_DIR)/package.mk
 
 define Package/libkeyutils
@@ -20,6 +23,9 @@ define Package/libkeyutils
   CATEGORY:=Libraries
   TITLE:=Key utilities library
   URL:=https://people.redhat.com/dhowells/keyutils/
+  LICENSE:=LGPL-2.1-or-later
+  LICENSE_FILES:=LICENSE.LGPL
+  ABI_VERSION:=1
 endef
 
 define Package/keyctl
@@ -28,31 +34,36 @@ define Package/keyctl
   SUBMENU:=Encryption
   TITLE:=keyctl
   DEPENDS:=+libkeyutils
+  LICENSE:=GPL-2.0-or-later
+  LICENSE_FILES:=LICENSE.GPL
 endef
 
 define Package/keyutils/description
   Key utilities
 endef
 
-define Build/Install
-       make -C $(PKG_BUILD_DIR) DESTDIR=$(PKG_INSTALL_DIR) LIBDIR=/usr/lib install
-endef
+MAKE_FLAGS += \
+       BINDIR=/usr/bin \
+       LIBDIR=/usr/lib \
+       SBINDIR=/usr/sbin \
+       CFLAGS="$(TARGET_CFLAGS) $(FPIC)"
 
 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/libkeyutils.{a,so*} $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libkeyutils.a $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libkeyutils.so.$(ABI_VERSION)* $(1)/usr/lib/
 endef
 
 define Package/libkeyutils/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libkeyutils.so* $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libkeyutils.so.$(ABI_VERSION)* $(1)/usr/lib/
 endef
 
 define Package/keyctl/install
-       $(INSTALL_DIR) $(1)/bin
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/keyctl $(1)/bin
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/keyctl $(1)/usr/bin
 endef
 
 $(eval $(call BuildPackage,libkeyutils))
index 1a6369ba4ca804ae3f48a39a2a25571c25c2fd1e..484e5c368a3905fb67657ff0a9ca5c756eebc4e1 100644 (file)
@@ -18,6 +18,7 @@ PKG_HASH:=c19f5b1b4fb374cfe34f4845ea11b1e0551ddc67803bd6ddd5d2a20f0997a6cc
 PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=LICENSE
 PKG_MAINTAINER:=
+PKG_CPE_ID:=cpe:/a:nlnetlabs:ldns
 
 PKG_FIXUP:=autoreconf
 PKG_BUILD_PARALLEL:=1
diff --git a/libs/leptonica/Makefile b/libs/leptonica/Makefile
new file mode 100644 (file)
index 0000000..6fff834
--- /dev/null
@@ -0,0 +1,53 @@
+#
+# Copyright (C) 2019 Valentín Kivachuk <vk18496@gmail.com>
+#
+# This is free software, licensed under the GNU General Public License v3.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=leptonica
+PKG_VERSION:=1.78.0
+PKG_RELEASE:=2
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://www.leptonica.org/source/
+PKG_HASH:=e2ed2e81e7a22ddf45d2c05f0bc8b9ae7450545d995bfe28517ba408d14a5a88
+
+PKG_MAINTAINER:=Valentín Kivachuk <vk18496@gmail.com>
+PKG_LICENSE:=BSD-2-Clause
+PKG_LICENSE_FILES:=leptonica-license.txt
+
+PKG_BUILD_PARALLEL:=1
+PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libleptonica
+  SECTION:=libs
+  CATEGORY:=Libraries
+  TITLE:=A library for efficient image processing and image analysis operations
+  URL:=http://www.leptonica.org/
+  DEPENDS:=+giflib +libjpeg +libpng +libtiff +libwebp +zlib
+endef
+
+TARGET_CFLAGS:=$(filter-out -O%,$(TARGET_CFLAGS)) -O3
+TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib
+
+define Build/InstallDev
+       $(INSTALL_DIR) $(1)/usr/include
+       $(CP) $(PKG_INSTALL_DIR)/usr/include/leptonica $(1)/usr/include/
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblept.{a,so*} $(1)/usr/lib/
+       $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/lept.pc $(1)/usr/lib/pkgconfig/
+endef
+
+define Package/libleptonica/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblept.so.* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,libleptonica))
index d523714561259129062fa2e485a5a2e8ff6e48c5..7e702bfc0eda953f68a26c6794585fac093b0f0e 100644 (file)
@@ -8,19 +8,20 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libaio
-PKG_VERSION:=0.3.111
+PKG_VERSION:=0.3.112
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://releases.pagure.org/libaio
-PKG_HASH:=62cf871ad8fd09eb3418f00aca7a7d449299b8e1de31c65f28bf6a2ef1fa502a
-PKG_MAINTAINER:=Steven Barth <cyrus@openwrt.org>
-PKG_LICENSE:=LGPL-2.1
+PKG_HASH:=ab0462f2c9d546683e5147b1ce9c195fe95d07fac5bf362f6c01637955c3b492
 
-PKG_ASLR_PIE:=1
-PKG_BUILD_PARALLEL:=1
+PKG_MAINTAINER:=Rosen Penev <rosenp@gmail.com>
+PKG_LICENSE:=LGPL-2.1-only
+PKG_LICENSE_FILES:=COPYING
 
+PKG_BUILD_PARALLEL:=1
 PKG_USE_MIPS16:=0
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -31,24 +32,6 @@ define Package/libaio
   URL:=http://lse.sourceforge.net/io/aio.html
 endef
 
-define Build/Configure
-endef
-
-LIBAIO_CFLAGS:=-nostdlib -nostartfiles -I. $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(FPIC)
-
-define Build/Compile
-       $(MAKE) -C $(PKG_BUILD_DIR) \
-               $(TARGET_CONFIGURE_OPTS) \
-               ARCH="$(ARCH)" \
-               CC="$(TARGET_CROSS)gcc" \
-               LD="$(TARGET_CROSS)ld" \
-               CFLAGS="$(LIBAIO_CFLAGS)" \
-               all
-       $(MAKE) -C $(PKG_BUILD_DIR) \
-               prefix="$(PKG_INSTALL_DIR)/usr" \
-               install
-endef
-
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include
        $(CP) $(PKG_INSTALL_DIR)/usr/include/libaio.h $(1)/usr/include/
index 1cf2545a627361272217ec1bc7216ed05d674c56..a0b801c4fea6d63c3773aa2668d0c688eb88038b 100644 (file)
@@ -96,7 +96,7 @@ Last-Update: 2014-10-09
 +#endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */
 --- a/src/libaio.h
 +++ b/src/libaio.h
-@@ -71,6 +71,7 @@ typedef enum io_iocb_cmd {
+@@ -72,6 +72,7 @@ typedef enum io_iocb_cmd {
  
  /* big endian, 64 bits */
  #elif defined(__powerpc64__) || defined(__s390x__) || \
index 42df37f108a00b232e7c24346608369ec38cc307..b88863639d0c9f544ce1ac85c099c236399d488f 100644 (file)
@@ -26,7 +26,7 @@ Description: Add SH supprt
  #define KERNEL_RW_POINTER     ((void *)0x10100000)
 --- a/src/libaio.h
 +++ b/src/libaio.h
-@@ -51,7 +51,8 @@ typedef enum io_iocb_cmd {
+@@ -52,7 +52,8 @@ typedef enum io_iocb_cmd {
  
  /* little endian, 32 bits */
  #if defined(__i386__) || (defined(__arm__) && !defined(__ARMEB__)) || \
@@ -36,7 +36,7 @@ Description: Add SH supprt
      defined(__cris__) || (defined(__riscv) && __riscv_xlen == 32) || \
      (defined(__GNUC__) && defined(__BYTE_ORDER__) && \
           __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ && __SIZEOF_LONG__ == 4)
-@@ -83,6 +84,7 @@ typedef enum io_iocb_cmd {
+@@ -84,6 +85,7 @@ typedef enum io_iocb_cmd {
  /* big endian, 32 bits */
  #elif defined(__PPC__) || defined(__s390__) || \
        (defined(__arm__) && defined(__ARMEB__)) || \
index a116f495d77296c839ff394ed8437bd4b1854580..4e0a11878503fb19357365cdfdbeb2447f8db76c 100644 (file)
@@ -10,7 +10,7 @@ Last-Update: 2014-07-23
 
 --- a/src/libaio.h
 +++ b/src/libaio.h
-@@ -52,7 +52,8 @@ typedef enum io_iocb_cmd {
+@@ -53,7 +53,8 @@ typedef enum io_iocb_cmd {
  /* little endian, 32 bits */
  #if defined(__i386__) || (defined(__arm__) && !defined(__ARMEB__)) || \
      (defined(__sh__) && defined(__LITTLE_ENDIAN__)) || \
@@ -20,7 +20,7 @@ Last-Update: 2014-07-23
      defined(__cris__) || (defined(__riscv) && __riscv_xlen == 32) || \
      (defined(__GNUC__) && defined(__BYTE_ORDER__) && \
           __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ && __SIZEOF_LONG__ == 4)
-@@ -62,6 +63,7 @@ typedef enum io_iocb_cmd {
+@@ -63,6 +64,7 @@ typedef enum io_iocb_cmd {
  
  /* little endian, 64 bits */
  #elif defined(__ia64__) || defined(__x86_64__) || defined(__alpha__) || \
@@ -28,7 +28,7 @@ Last-Update: 2014-07-23
        (defined(__aarch64__) && defined(__AARCH64EL__)) || \
        (defined(__riscv) && __riscv_xlen == 64) || \
        (defined(__GNUC__) && defined(__BYTE_ORDER__) && \
-@@ -74,6 +76,7 @@ typedef enum io_iocb_cmd {
+@@ -75,6 +77,7 @@ typedef enum io_iocb_cmd {
  #elif defined(__powerpc64__) || defined(__s390x__) || \
        (defined(__hppa__) && defined(__arch64__)) || \
        (defined(__sparc__) && defined(__arch64__)) || \
index 6d579644bc58125c6f19b781c9085cdba2f05836..b2e6fcf100f9c5649184ca92e9f9090f4244f7ea 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libarchive
-PKG_VERSION:=3.3.3
-PKG_RELEASE:=3
+PKG_VERSION:=3.4.0
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://www.libarchive.org/downloads
-PKG_HASH:=ba7eb1781c9fbbae178c4c6bad1c6eb08edab9a1496c64833d1715d022b30e2e
+PKG_SOURCE_URL:=https://codeload.github.com/libarchive/libarchive/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=c160d3c45010a51a924208f13f6b7b956dabdf8c5c60195df188a599028caa7c
 
 PKG_MAINTAINER:=Johannes Morgenroth <morgenroth@ibr.cs.tu-bs.de>
 PKG_LICENSE:=BSD-2-Clause
@@ -27,38 +27,49 @@ PKG_FIXUP:=autoreconf
 include $(INCLUDE_DIR)/package.mk
 
 define Package/libarchive/Default
-       SECTION:=libs
-       CATEGORY:=Libraries
-       DEPENDS:=+zlib +liblzma +libbz2 +libexpat
-       TITLE:=Multi-format archive and compression library
-       URL:=https://www.libarchive.org/
+  SECTION:=libs
+  CATEGORY:=Libraries
+  DEPENDS:=+zlib +liblzma +libbz2 +libexpat
+  TITLE:=Multi-format archive and compression library
+  URL:=https://www.libarchive.org/
 endef
 
 define Package/libarchive
        $(call Package/libarchive/Default)
-       DEPENDS += +libopenssl
+  DEPENDS += +libopenssl
 endef
 
 define Package/libarchive-noopenssl
        $(call Package/libarchive/Default)
-       TITLE += (without OpenSSL dependency)
-       VARIANT:=noopenssl
+  TITLE += (without OpenSSL dependency)
+  VARIANT:=noopenssl
+endef
+
+define Package/bsdtar/Default
+  SECTION:=utils
+  CATEGORY:=Utilities
+  SUBMENU:=Compression
+  TITLE:=tar BSD variant
+  URL:=https://www.libarchive.org/
 endef
 
 define Package/bsdtar
-       SECTION:=utils
-       CATEGORY:=Utilities
-       SUBMENU:=Compression
-       DEPENDS:=+libarchive-noopenssl
-       TITLE:=BSD variant that supports various file compression formats
-       URL:=http://www.libarchive.org/
+       $(call Package/bsdtar/Default)
+  DEPENDS:= +libarchive
+endef
+
+define Package/bsdtar-noopenssl
+       $(call Package/bsdtar/Default)
+  TITLE += (without OpenSSL dependency)
+  DEPENDS:= +libarchive-noopenssl
+  VARIANT:=noopenssl
 endef
 
 define Package/bsdtar/description
-       Reads a variety of formats including tar, pax, zip, xar, lha, ar,
-       cab, mtree, rar, warc, 7z and ISO images. Writes tar, pax, zip,
-       xar, ar, ISO, mtree and shar archives. Automatically handles
-       archives compressed with gzip, bzip2, lzip, xz, lzma or compress.
+  Reads a variety of formats including tar, pax, zip, xar, lha, ar,
+  cab, mtree, rar, warc, 7z and ISO images. Writes tar, pax, zip,
+  xar, ar, ISO, mtree and shar archives. Automatically handles
+  archives compressed with gzip, bzip2, lzip, xz, lzma or compress.
 endef
 
 CONFIGURE_ARGS += \
@@ -99,7 +110,9 @@ define Package/bsdtar/install
 endef
 
 Package/libarchive-noopenssl/install = $(Package/libarchive/install)
+Package/bsdtar-noopenssl/install = $(Package/bsdtar/install)
 
 $(eval $(call BuildPackage,libarchive))
 $(eval $(call BuildPackage,libarchive-noopenssl))
 $(eval $(call BuildPackage,bsdtar))
+$(eval $(call BuildPackage,bsdtar-noopenssl))
diff --git a/libs/libarchive/patches/100-CVE-2018-1000880.patch b/libs/libarchive/patches/100-CVE-2018-1000880.patch
deleted file mode 100644 (file)
index 0d9566f..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-From 9c84b7426660c09c18cc349f6d70b5f8168b5680 Mon Sep 17 00:00:00 2001
-From: Daniel Axtens <dja@axtens.net>
-Date: Tue, 4 Dec 2018 16:33:42 +1100
-Subject: [PATCH] warc: consume data once read
-
-The warc decoder only used read ahead, it wouldn't actually consume
-data that had previously been printed. This means that if you specify
-an invalid content length, it will just reprint the same data over
-and over and over again until it hits the desired length.
-
-This means that a WARC resource with e.g.
-Content-Length: 666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666665
-but only a few hundred bytes of data, causes a quasi-infinite loop.
-
-Consume data in subsequent calls to _warc_read.
-
-Found with an AFL + afl-rb + qsym setup.
----
- libarchive/archive_read_support_format_warc.c | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/libarchive/archive_read_support_format_warc.c b/libarchive/archive_read_support_format_warc.c
-index e8753853f..e8fc8428b 100644
---- a/libarchive/archive_read_support_format_warc.c
-+++ b/libarchive/archive_read_support_format_warc.c
-@@ -386,6 +386,11 @@ _warc_read(struct archive_read *a, const void **buf, size_t *bsz, int64_t *off)
-               return (ARCHIVE_EOF);
-       }
-+      if (w->unconsumed) {
-+              __archive_read_consume(a, w->unconsumed);
-+              w->unconsumed = 0U;
-+      }
-+
-       rab = __archive_read_ahead(a, 1U, &nrd);
-       if (nrd < 0) {
-               *bsz = 0U;
diff --git a/libs/libarchive/patches/101-CVE-2018-1000879.patch b/libs/libarchive/patches/101-CVE-2018-1000879.patch
deleted file mode 100644 (file)
index ecd4da5..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-From 15bf44fd2c1ad0e3fd87048b3fcc90c4dcff1175 Mon Sep 17 00:00:00 2001
-From: Daniel Axtens <dja@axtens.net>
-Date: Tue, 4 Dec 2018 14:29:42 +1100
-Subject: [PATCH] Skip 0-length ACL fields
-
-Currently, it is possible to create an archive that crashes bsdtar
-with a malformed ACL:
-
-Program received signal SIGSEGV, Segmentation fault.
-archive_acl_from_text_l (acl=<optimised out>, text=0x7e2e92 "", want_type=<optimised out>, sc=<optimised out>) at libarchive/archive_acl.c:1726
-1726                           switch (*s) {
-(gdb) p n
-$1 = 1
-(gdb) p field[n]
-$2 = {start = 0x0, end = 0x0}
-
-Stop this by checking that the length is not zero before beginning
-the switch statement.
-
-I am pretty sure this is the bug mentioned in the qsym paper [1],
-and I was able to replicate it with a qsym + AFL + afl-rb setup.
-
-[1] https://www.usenix.org/conference/usenixsecurity18/presentation/yun
----
- libarchive/archive_acl.c | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/libarchive/archive_acl.c b/libarchive/archive_acl.c
-index 512beee1f..7beeee86e 100644
---- a/libarchive/archive_acl.c
-+++ b/libarchive/archive_acl.c
-@@ -1723,6 +1723,11 @@ archive_acl_from_text_l(struct archive_acl *acl, const char *text,
-                       st = field[n].start + 1;
-                       len = field[n].end - field[n].start;
-+                      if (len == 0) {
-+                              ret = ARCHIVE_WARN;
-+                              continue;
-+                      }
-+
-                       switch (*s) {
-                       case 'u':
-                               if (len == 1 || (len == 4
diff --git a/libs/libarchive/patches/102-CVE-2018-1000878.patch b/libs/libarchive/patches/102-CVE-2018-1000878.patch
deleted file mode 100644 (file)
index df48969..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-From bfcfe6f04ed20db2504db8a254d1f40a1d84eb28 Mon Sep 17 00:00:00 2001
-From: Daniel Axtens <dja@axtens.net>
-Date: Tue, 4 Dec 2018 00:55:22 +1100
-Subject: [PATCH] rar: file split across multi-part archives must match
-
-Fuzzing uncovered some UAF and memory overrun bugs where a file in a
-single file archive reported that it was split across multiple
-volumes. This was caused by ppmd7 operations calling
-rar_br_fillup. This would invoke rar_read_ahead, which would in some
-situations invoke archive_read_format_rar_read_header.  That would
-check the new file name against the old file name, and if they didn't
-match up it would free the ppmd7 buffer and allocate a new
-one. However, because the ppmd7 decoder wasn't actually done with the
-buffer, it would continue to used the freed buffer. Both reads and
-writes to the freed region can be observed.
-
-This is quite tricky to solve: once the buffer has been freed it is
-too late, as the ppmd7 decoder functions almost universally assume
-success - there's no way for ppmd_read to signal error, nor are there
-good ways for functions like Range_Normalise to propagate them. So we
-can't detect after the fact that we're in an invalid state - e.g. by
-checking rar->cursor, we have to prevent ourselves from ever ending up
-there. So, when we are in the dangerous part or rar_read_ahead that
-assumes a valid split, we set a flag force read_header to either go
-down the path for split files or bail. This means that the ppmd7
-decoder keeps a valid buffer and just runs out of data.
-
-Found with a combination of AFL, afl-rb and qsym.
----
- libarchive/archive_read_support_format_rar.c | 9 +++++++++
- 1 file changed, 9 insertions(+)
-
-diff --git a/libarchive/archive_read_support_format_rar.c b/libarchive/archive_read_support_format_rar.c
-index 6f419c270..a8cc5c94d 100644
---- a/libarchive/archive_read_support_format_rar.c
-+++ b/libarchive/archive_read_support_format_rar.c
-@@ -258,6 +258,7 @@ struct rar
-   struct data_block_offsets *dbo;
-   unsigned int cursor;
-   unsigned int nodes;
-+  char filename_must_match;
-   /* LZSS members */
-   struct huffman_code maincode;
-@@ -1560,6 +1561,12 @@ read_header(struct archive_read *a, struct archive_entry *entry,
-     }
-     return ret;
-   }
-+  else if (rar->filename_must_match)
-+  {
-+    archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
-+      "Mismatch of file parts split across multi-volume archive");
-+    return (ARCHIVE_FATAL);
-+  }
-   rar->filename_save = (char*)realloc(rar->filename_save,
-                                       filename_size + 1);
-@@ -2933,12 +2940,14 @@ rar_read_ahead(struct archive_read *a, size_t min, ssize_t *avail)
-     else if (*avail == 0 && rar->main_flags & MHD_VOLUME &&
-       rar->file_flags & FHD_SPLIT_AFTER)
-     {
-+      rar->filename_must_match = 1;
-       ret = archive_read_format_rar_read_header(a, a->entry);
-       if (ret == (ARCHIVE_EOF))
-       {
-         rar->has_endarc_header = 1;
-         ret = archive_read_format_rar_read_header(a, a->entry);
-       }
-+      rar->filename_must_match = 0;
-       if (ret != (ARCHIVE_OK))
-         return NULL;
-       return rar_read_ahead(a, min, avail);
diff --git a/libs/libarchive/patches/103-CVE-2018-1000877.patch b/libs/libarchive/patches/103-CVE-2018-1000877.patch
deleted file mode 100644 (file)
index 7998b55..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-From 021efa522ad729ff0f5806c4ce53e4a6cc1daa31 Mon Sep 17 00:00:00 2001
-From: Daniel Axtens <dja@axtens.net>
-Date: Tue, 20 Nov 2018 17:56:29 +1100
-Subject: [PATCH] Avoid a double-free when a window size of 0 is specified
-
-new_size can be 0 with a malicious or corrupted RAR archive.
-
-realloc(area, 0) is equivalent to free(area), so the region would
-be free()d here and the free()d again in the cleanup function.
-
-Found with a setup running AFL, afl-rb, and qsym.
----
- libarchive/archive_read_support_format_rar.c | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/libarchive/archive_read_support_format_rar.c b/libarchive/archive_read_support_format_rar.c
-index 234522229..6f419c270 100644
---- a/libarchive/archive_read_support_format_rar.c
-+++ b/libarchive/archive_read_support_format_rar.c
-@@ -2300,6 +2300,11 @@ parse_codes(struct archive_read *a)
-       new_size = DICTIONARY_MAX_SIZE;
-     else
-       new_size = rar_fls((unsigned int)rar->unp_size) << 1;
-+    if (new_size == 0) {
-+      archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
-+                        "Zero window size is invalid.");
-+      return (ARCHIVE_FATAL);
-+    }
-     new_window = realloc(rar->lzss.window, new_size);
-     if (new_window == NULL) {
-       archive_set_error(&a->archive, ENOMEM,
diff --git a/libs/libarchive/patches/104-CVE-2019-1000019.patch b/libs/libarchive/patches/104-CVE-2019-1000019.patch
deleted file mode 100644 (file)
index a7df5a2..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-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
deleted file mode 100644 (file)
index 86bbd9d..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-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
index 6dd0af355f0fdd75bdd464a5cf6907983c69e284..54799e3665fa8eeb3c059a95e35a267b5ca5c38c 100644 (file)
@@ -14,6 +14,7 @@ PKG_SOURCE_URL:=@GNOME/$(PKG_NAME)/0.3
 PKG_HASH:=ea2449ad3f201ec590d811db9da6d02ffc5e87a677d06b92ab15363d8cb59782
 
 PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
+PKG_CPE_ID:=cpe:/a:audiofile:audiofile
 
 PKG_FIXUP:=autoreconf
 PKG_INSTALL=1
index 3d7325f20cd8a40259888f4d03731597b28d3e94..da093da04d96d73778160af761ff41bb0f34b1dc 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libavl
 PKG_VERSION:=0.3.5
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_HASH:=4497b9e22cdd61ae2fa893b9d5fd6213dc306726d7c4be08c29e173622dca8a0
 
 PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz
@@ -18,7 +18,7 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/avl-$(PKG_VERSION)
 PKG_INSTALL:=1
 
 PKG_MAINTAINER:=Espen Jürgensen <espenjurgensen+openwrt@gmail.com>
-PKG_LICENSE:=LGPL-2.0+
+PKG_LICENSE:=LGPL-2.0-or-later
 PKG_LICENSE_FILES:=COPYING
 
 include $(INCLUDE_DIR)/package.mk
index 29594699b4d328ae3276f9716c7b444b1650d39b..062c8082bf2cebcc26c42b9f398a1ecc38d34770 100644 (file)
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libcanfestival
-PKG_RELEASE:=6
+PKG_RELEASE:=7
 
 PKG_SOURCE_VERSION:=8bfe0ac00cdb
 PKG_SOURCE_URL:=http://dev.automforge.net/CanFestival-3/archive/$(PKG_SOURCE_VERSION).tar.bz2?_dummyfilename=
@@ -18,7 +18,7 @@ PKG_SOURCE_SUBDIR:=CanFestival-3-$(PKG_SOURCE_VERSION)
 
 PKG_MAINTAINER:=Anton Glukhov <anton.a.glukhov@gmail.com>
 
-PKG_LICENSE:=LGPL-2.1+
+PKG_LICENSE:=LGPL-2.1-or-later
 PKG_LICENSE_FILES:=LICENCE
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
index 8372297284463cdc6c3edfa3e7961cdf7ed4ebfa..3b62b0dc63e0c87ba8db1496a8283865125f97cd 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libcap
 PKG_VERSION:=2.27
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@KERNEL/linux/libs/security/linux-privs/libcap2
@@ -69,8 +69,13 @@ endif
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include/sys
        $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
-       $(INSTALL_DIR) $(1)/usr/lib/
+       $(INSTALL_DIR) $(1)/usr/lib
        $(CP) $(PKG_INSTALL_DIR)/lib/* $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
+       $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+       $(SED) 's,exec_prefix=,exec_prefix=/usr,g' $(1)/usr/lib/pkgconfig/libcap.pc
+       $(SED) 's,/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/libcap.pc
+       $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/libcap.pc
 endef
 
 define Package/libcap/install
index 4f49adccf01346f64369d4521a1e4aaefd157924..f8a8208745c2ab04514cf1377d6dedeca9b57708 100644 (file)
@@ -8,24 +8,20 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libcoap
-PKG_VERSION:=v4.1.2
-PKG_RELEASE:=1
+PKG_VERSION:=4.2.0
+PKG_RELEASE:=2
 
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/obgm/libcoap
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)
-PKG_SOURCE_VERSION:=fa5248603049ddf95cc84608aad569120763bf2b
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_MIRROR_HASH:=0ab4bc9569a78904743cc3074fd1c0fc9c78c85fd510fef5145dd872523619e6
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/obgm/libcoap/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=9523e38da6ee8b2a8f5ce83ded64107dd1e514c7ad00cd74ccfe3454b679c271
 
 PKG_MAINTAINER:=Anton Glukhov <anton.a.glukhov@gmail.com>
-PKG_LICENSE:=GPL-2.0+ BSD-2-Clause
+PKG_LICENSE:=GPL-2.0-or-later BSD-2-Clause
 PKG_LICENSE_FILES:=COPYING LICENSE.GPL LICENSE.BSD
 
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
-
 PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -33,7 +29,8 @@ define Package/libcoap
   SECTION:=libs
   CATEGORY:=Libraries
   TITLE:=CoAP (RFC 7252) library
-  URL:=http://libcoap.net/
+  URL:=https://libcoap.net/
+  ABI_VERSION:=2
 endef
 
 define Package/libcoap/description
@@ -66,11 +63,11 @@ TARGET_CFLAGS += $(FPIC)
 
 CONFIGURE_ARGS += \
        --enable-examples \
-       --disable-documentation
-
-ifeq ($(CONFIG_BIG_ENDIAN),y)
-TARGET_CFLAGS += -DWORDS_BIGENDIAN
-endif
+       --disable-documentation \
+       --disable-doxygen \
+       --disable-dtls \
+       --disable-gcov \
+       --disable-tests
 
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include
@@ -82,7 +79,7 @@ endef
 
 define Package/libcoap/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcoap-1.so* $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcoap-$(ABI_VERSION).so* $(1)/usr/lib/
 endef
 
 define Package/coap-client/install
index 29264005c6716238f5cd59abc4d0bc3c32cd3e34..ebe8f0a839f5a7aa199ca3d9d17da083339c1062 100644 (file)
@@ -9,15 +9,16 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=cups
-PKG_VERSION:=2.2.11
+PKG_VERSION:=2.2.12
 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:=f58010813fd6903f690cdb0c0b91e4d1bc9e5b9570c28734229ba3ed2908b76c
+PKG_HASH:=0f61ab449e4748a24c6ab355b481ff7691247a140d327b2b7526fce34b7f9aa8
 PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=LICENSE.txt
+PKG_CPE_ID:=cpe:/a:apple:cups
 
 include $(INCLUDE_DIR)/package.mk
 
index ac7e4f93407e4b590587c59a0688318df8d44437..1f066d741b47281273f1bdbb37b6c6d99f73117e 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libdouble-conversion
-PKG_VERSION:=3.1.4
-PKG_RELEASE:=2
+PKG_VERSION:=3.1.5
+PKG_RELEASE:=3
 
 PKG_SOURCE:=double-conversion-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/google/double-conversion/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=95004b65e43fefc6100f337a25da27bb99b9ef8d4071a36a33b5e83eb1f82021
+PKG_HASH:=a63ecb93182134ba4293fd5f22d6e08ca417caafa244afaa751cbfddf6415b13
 
 HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/double-conversion-$(PKG_VERSION)
 PKG_BUILD_DIR:=$(BUILD_DIR)/double-conversion-$(PKG_VERSION)
@@ -22,6 +22,8 @@ PKG_MAINTAINER:=
 PKG_LICENSE:=BSD-3c
 PKG_LICENSE_FILES:=COPYING LICENSE
 
+CMAKE_INSTALL:=1
+
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/host-build.mk
 include $(INCLUDE_DIR)/cmake.mk
@@ -43,30 +45,15 @@ define Package/libdouble-conversion/description
 endef
 
 CMAKE_OPTIONS += \
-  -DBUILD_SHARED_LIBS=ON \
-  -DBUILD_TESTING=OFF
-
-define Build/InstallDev
-       $(INSTALL_DIR) \
-         $(1)/usr/lib \
-         $(1)/usr/include/double-conversion
+       -DBUILD_SHARED_LIBS=ON \
+       -DBUILD_TESTING=OFF
 
-       $(CP) \
-         $(PKG_INSTALL_DIR)/usr/include/* \
-         $(1)/usr/include/
-
-       $(INSTALL_DATA) \
-         $(PKG_INSTALL_DIR)/usr/lib/lib*.so* \
-         $(1)/usr/lib/
-endef
+TARGET_CXXFLAGS += -ffunction-sections -fdata-sections -fno-rtti -flto
+TARGET_LDFLAGS += -Wl,--gc-sections
 
 define Package/libdouble-conversion/install
-       $(INSTALL_DIR) \
-         $(1)/usr/lib
-
-       $(INSTALL_DATA) \
-         $(PKG_INSTALL_DIR)/usr/lib/lib*.so* \
-         $(1)/usr/lib/
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.so* $(1)/usr/lib/
 endef
 
 $(eval $(call BuildPackage,libdouble-conversion))
diff --git a/libs/libdouble-conversion/patches/010-armeb.patch b/libs/libdouble-conversion/patches/010-armeb.patch
deleted file mode 100644 (file)
index 29c397e..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- 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 148721ff7ed84c55f51f687f99bb2957e259baa5..843e55a93fa39ba418666d47f7eae4d868625ba1 100644 (file)
@@ -9,10 +9,10 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libesmtp
 PKG_VERSION:=1.0.6
-PKG_RELEASE:=4
+PKG_RELEASE:=5
 
 PKG_MAINTAINER:=Othmar Truniger <github@truniger.ch>
-PKG_LICENSE:=LGPL-2.0+
+PKG_LICENSE:=LGPL-2.0-or-later
 PKG_LICENSE_FILES:=COPYING
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
index d2fc567355453b5e0c0c3543a2a294fdf92a99b9..07a1ce73a91810aeb507273ad713d6d2552a6069 100644 (file)
@@ -9,14 +9,14 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libestr
 PKG_VERSION:=0.1.11
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_URL:=http://libestr.adiscon.com/files/download/
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_HASH:=46632b2785ff4a231dcf241eeb0dcb5fc0c7d4da8ee49cf5687722cdbe8b2024
 
 PKG_MAINTAINER:=Rosen Penev <rosenp@gmail.com>
-PKG_LICENSE:=LGPL-2.1+
+PKG_LICENSE:=LGPL-2.1-or-later
 PKG_LICENSE_FILES:=COPYING
 
 PKG_FIXUP:=autoreconf
index d117e1daafefd105c1efff6641204f47f3ad8ef7..02eac5b602509ce8610b09131a7af51e001a4288 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libev
-PKG_VERSION:=4.25
+PKG_VERSION:=4.27
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://dist.schmorp.de/libev/Attic/
-PKG_HASH:=78757e1c27778d2f3795251d9fe09715d51ce0422416da4abb34af3929c02589
+PKG_HASH:=2d5526fc8da4f072dd5c73e18fbb1666f5ef8ed78b73bba12e195cfdd810344e
 PKG_LICENSE:=BSD-2-Clause
 PKG_MAINTAINER:=Karl Palsson <karlp@tweak.net.au>
 
index badfc350f52ce8c7489ae77cdc1d76d37f4e1e25..d80ad7218586d5d2f822a635548971d7fc6638cd 100644 (file)
@@ -17,6 +17,7 @@ PKG_HASH:=16cdaeb62eb3e6dfab2435f7d7bccd2f37438d21c5218ec4e58efa9157d4d41a
 
 PKG_LICENSE:=LGPL-2.1
 PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:libexif:libexif
 
 PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
index a314125d966e0fd00dd3fb0e1ac73b54620904cc..d1f15a58f00aaa624409ad45d8cff6e85bb9038c 100644 (file)
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libextractor
 PKG_VERSION:=1.9
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 # ToDo:
 # - package missing optional dependencies: libexiv2, gsf, librpm, smf, tidy
@@ -16,7 +16,7 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@GNU/$(PKG_NAME)
 PKG_HASH:=f08f257d26c5e9b503f068d6753c8e55cb76f47f73a81da6ed2bba3de3fee2ff
 
-PKG_LICENSE:=GPL-3.0
+PKG_LICENSE:=GPL-3.0-or-later
 PKG_LICENSE_FILES:=COPYING
 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
 
diff --git a/libs/libextractor/patches/010-musl.patch b/libs/libextractor/patches/010-musl.patch
new file mode 100644 (file)
index 0000000..5786f3b
--- /dev/null
@@ -0,0 +1,13 @@
+diff --git a/src/common/le_architecture.h b/src/common/le_architecture.h
+index b863ddb..713acdd 100644
+--- a/src/common/le_architecture.h
++++ b/src/common/le_architecture.h
+@@ -26,6 +26,8 @@
\r
+ #if WINDOWS\r
+ #include <sys/param.h>          /* #define BYTE_ORDER */\r
++#else\r
++#include <byteswap.h>\r
+ #endif\r
\r
+ /* This is copied directly from GNUnet headers */\r
index 3f5681fdc8fbe978479003485f12afc8563fd37a..49f0eecc0b9e4edd2e40ac382cb0af2c44f48738 100644 (file)
@@ -1,43 +1,44 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libfizz
-PKG_VERSION:=2019.05.27.00
+PKG_VERSION:=2019.09.22.00
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://codeload.github.com/facebookincubator/fizz/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=d3f5325717a2af3684a41889d45b19e975cfff177faffdfaab8cb63df4e0318c
-PKG_BUILD_DIR:=$(BUILD_DIR)/fizz-$(PKG_VERSION)
+PKG_SOURCE_VERSION:=0ccff0813dea8d3f730d9c3a1b80e6936522d3f3
+PKG_SOURCE_URL:=https://codeload.github.com/facebookincubator/fizz/tar.gz/$(PKG_SOURCE_VERSION)?
+PKG_HASH:=32a8de32e7a83e53ad44931ac637f6e17ce7f81bd65bc835f14d59442041e7f6
+PKG_BUILD_DIR:=$(BUILD_DIR)/fizz-$(PKG_SOURCE_VERSION)
 
-PKG_LICENSE:=BSD
+PKG_MAINTAINER:=Amol Bhave <ambhave@fb.com>
+PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=LICENSE
-
-include $(INCLUDE_DIR)/package.mk
-include $(INCLUDE_DIR)/cmake.mk
+PKG_CPE_ID:=cpe:/a:facebook:fizz
 
 PKG_BUILD_PARALLEL:=1
 CMAKE_SOURCE_SUBDIR:=fizz
-CMAKE_OPTIONS:= \
-       -DBUILD_EXAMPLES=OFF \
-       -DBUILD_SHARED_LIBS=ON
 CMAKE_INSTALL:=1
 
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
+
 define Package/libfizz
-       SECTION:=libs
-       CATEGORY:=Libraries
-       DEPENDS:=+libfolly
-       TITLE:=C++14 implementation of the TLS-1.3 standard
-       URL:=https://github.com/facebookincubator/fizz
+  SECTION:=libs
+  CATEGORY:=Libraries
+  DEPENDS:=+libfolly
+  TITLE:=C++14 implementation of the TLS-1.3 standard
+  URL:=https://github.com/facebookincubator/fizz
 endef
 
 define Package/libfizz/description
-       C++14 implementation of the TLS-1.3 standard.
-       Fizz currently supports TLS 1.3 drafts 28, 26 (both wire-compatible with the final specification), and 23.
+  C++14 implementation of the TLS-1.3 standard.
+  Fizz currently supports TLS 1.3 drafts 28, 26 (both wire-compatible with the final specification), and 23.
 endef
 
-define Package/libfizz/install
-       $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfizz.so* $(1)/usr/lib/
-endef
+CMAKE_OPTIONS += \
+       -DBUILD_EXAMPLES=OFF
+
+TARGET_CXXFLAGS += -ffunction-sections -fdata-sections -flto
+TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
 
 $(eval $(call BuildPackage,libfizz))
index f3c10dbf88102926068be5fef99b84d079515c95..632dd86718ac61476b314501bd51e26b927c8438 100644 (file)
@@ -8,17 +8,17 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libfmt
-PKG_VERSION:=5.3.0
+PKG_VERSION:=6.0.0
 PKG_RELEASE:=1
 
 PKG_SOURCE_NAME:=fmt
 PKG_SOURCE:=$(PKG_SOURCE_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/fmtlib/$(PKG_SOURCE_NAME)/tar.gz/$(PKG_VERSION)?
-PKG_HASH:=defa24a9af4c622a7134076602070b45721a43c51598c8456ec6f2c4dbb51c89
+PKG_HASH:=f1907a58d5e86e6c382e51441d92ad9e23aea63827ba47fd647eacc0d3a16c78
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_NAME)-$(PKG_VERSION)
 
 PKG_MAINTAINER:=Othmar Truniger <github@truniger.ch>
-PKG_LICENSE:=BSD-2-Clause
+PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE.rst
 
 CMAKE_INSTALL:=1
@@ -43,20 +43,15 @@ define Package/libfmt/description
   It can be used as a safe alternative to printf or as a fast alternative to IOStreams.
 endef
 
-define Package/libfmt/install
-       $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfmt.so* $(1)/usr/lib/
-endef
-
 define Build/InstallDev
-       $(INSTALL_DIR) $(1)/usr/include/fmt
-       $(CP) $(PKG_INSTALL_DIR)/usr/include/fmt/*.h $(1)/usr/include/fmt/
+       $(call Build/InstallDev/cmake,$(1))
+       $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/fmt.pc
+       $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/fmt.pc
+endef
 
+define Package/libfmt/install
        $(INSTALL_DIR) $(1)/usr/lib
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfmt.so* $(1)/usr/lib/
-
-       $(INSTALL_DIR) $(1)/usr/lib/cmake
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/cmake/* $(1)/usr/lib/cmake/
 endef
 
 $(eval $(call BuildPackage,libfmt))
index 73df0725f73d3943fce3f3eee167e8558ae4d221..37a6cd6ec7e426cf52c5db0abe4520d4328361c1 100644 (file)
@@ -1,49 +1,58 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libfolly
-PKG_VERSION:=2019.05.27.00
+PKG_VERSION:=2019.09.22.00
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://codeload.github.com/facebook/folly/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=7535937e4b4bde14e6c854dc55a5fe9f290ccf1918621f20678ebecd0c1239e1
-PKG_BUILD_DIR:=$(BUILD_DIR)/folly-$(PKG_VERSION)
+PKG_SOURCE_VERSION:=af2373b9858c61685eb6eb2f1db99d9a31edd58e
+PKG_SOURCE_URL:=https://codeload.github.com/facebook/folly/tar.gz/$(PKG_SOURCE_VERSION)?
+PKG_HASH:=fbf25a96e5487fcd959ff50ff1c5413c8e18b8aaa9af3d2406156d750167affd
+PKG_BUILD_DIR:=$(BUILD_DIR)/folly-$(PKG_SOURCE_VERSION)
 
+PKG_MAINTAINER:=Amol Bhave <ambhave@fb.com>
 PKG_LICENSE:=Apache-2.0
 PKG_LICENSE_FILES:=LICENSE
 
+PKG_BUILD_PARALLEL:=1
+CMAKE_INSTALL:=1
+
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/cmake.mk
 
-PKG_BUILD_PARALLEL:=1
-CMAKE_OPTIONS:= \
+define Package/libfolly
+  SECTION:=libs
+  CATEGORY:=Libraries
+  TITLE:=An open-source C++ library developed and used at Facebook.
+  URL:=https://github.com/facebook/folly
+  DEPENDS:=+boost +boost-context +boost-date_time +boost-filesystem +boost-program_options +boost-regex \
+       +libopenssl +libdouble-conversion +libevent2 +glog +libsodium +libaio +libatomic \
+       +libbz2 +zlib +libzstd +liblzma +liblz4 +PACKAGE_libunwind:libunwind
+endef
+
+define Package/libfolly/description
+  An open-source C++ library developed and used at Facebook.
+  Folly (acronymed loosely after Facebook Open Source Library) is a library of
+  C++14 components designed with practicality and efficiency in mind.
+  Folly contains a variety of core library components used extensively at Facebook.
+  This package includes the shared library.
+endef
+
+CMAKE_OPTIONS += \
        -DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-       -DCXX_STD=gnu++14 \
+       -DCXX_STD=c++14 \
        -DFOLLY_HAVE_UNALIGNED_ACCESS_EXITCODE=OFF \
+       -DFOLLY_HAVE_UNALIGNED_ACCESS_EXITCODE__TRYRUN_OUTPUT=OFF \
        -DFOLLY_HAVE_LINUX_VDSO_EXITCODE=OFF \
+       -DFOLLY_HAVE_LINUX_VDSO_EXITCODE__TRYRUN_OUTPUT=OFF \
        -DFOLLY_HAVE_WCHAR_SUPPORT_EXITCODE=OFF \
+       -DFOLLY_HAVE_WCHAR_SUPPORT_EXITCODE__TRYRUN_OUTPUT=OFF \
        -DHAVE_VSNPRINTF_ERRORS_EXITCODE=OFF \
-       -DFOLLY_HAVE_XSI_STRERROR_R_EXITCODE=0 \
+       -DHAVE_VSNPRINTF_ERRORS_EXITCODE__TRYRUN_OUTPUT=OFF \
        -DBUILD_SHARED_LIBS=ON
-CMAKE_INSTALL:=1
-
-define Package/libfolly
-       SECTION:=libs
-       CATEGORY:=Libraries
-       TITLE:=An open-source C++ library developed and used at Facebook.
-       URL:=https://github.com/facebook/folly
-       DEPENDS:=+boost +boost-context +boost-date_time +boost-filesystem +boost-program_options +boost-regex \
-               +libopenssl +libdouble-conversion +libevent2 +glog +libsodium +libaio +libunwind +libatomic \
-               +libbz2 +zlib +libzstd +liblzma +liblz4
-endef
 
-define Package/libfolly/description
-       An open-source C++ library developed and used at Facebook.
-       Folly (acronymed loosely after Facebook Open Source Library) is a library of
-       C++14 components designed with practicality and efficiency in mind.
-       Folly contains a variety of core library components used extensively at Facebook.
-       This package includes the shared library.
-endef
+TARGET_CXXFLAGS += -ffunction-sections -fdata-sections -flto
+TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
 
 define Package/libfolly/install
        $(INSTALL_DIR) $(1)/usr/lib
index ac4adbea82ddf9806fa43bdde2a3824cb5c5d04c..48bb8aa6bae2ff51bd9dfd77c34880124da5cd76 100644 (file)
@@ -29,7 +29,7 @@ Index: folly-2019.05.06.00/CMakeLists.txt
      "Benchmark.cpp$"
      "Test.cpp$"
  )
-@@ -169,7 +171,7 @@ list(APPEND hfiles
+@@ -172,7 +174,7 @@ list(APPEND hfiles
  if (NOT FOLLY_USE_SYMBOLIZER)
    REMOVE_MATCHES_FROM_LISTS(files hfiles
      MATCHES
index 74cce0af763cb2e84038edcab08c45ec37730cc7..470745bfe07d26f46c45ebeaf1131091a44750be 100644 (file)
@@ -1,8 +1,6 @@
-Index: folly-2019.05.06.00/folly/stats/detail/BufferedStat-defs.h
-===================================================================
---- folly-2019.05.06.00.orig/folly/stats/detail/BufferedStat-defs.h
-+++ folly-2019.05.06.00/folly/stats/detail/BufferedStat-defs.h
-@@ -74,7 +74,6 @@ void BufferedStat<DigestT, ClockT>::doUp
+--- a/folly/stats/detail/BufferedStat-inl.h
++++ b/folly/stats/detail/BufferedStat-inl.h
+@@ -69,7 +69,6 @@ void BufferedStat<DigestT, ClockT>::doUpdate(
      TimePoint now,
      const std::unique_lock<SharedMutex>& g,
      UpdateMode updateMode) {
diff --git a/libs/libfolly/patches/102-uclibc-patches.patch b/libs/libfolly/patches/102-uclibc-patches.patch
new file mode 100644 (file)
index 0000000..7a68fb9
--- /dev/null
@@ -0,0 +1,23 @@
+--- a/folly/CachelinePadded.h
++++ b/folly/CachelinePadded.h
+@@ -35,10 +35,6 @@ namespace folly {
+  */
+ template <typename T>
+ class CachelinePadded {
+-  static_assert(
+-      alignof(T) <= max_align_v,
+-      "CachelinePadded does not support over-aligned types.");
+-
+  public:
+   template <typename... Args>
+   explicit CachelinePadded(Args&&... args)
+--- a/folly/external/farmhash/farmhash.cpp
++++ b/folly/external/farmhash/farmhash.cpp
+@@ -181,6 +181,7 @@
+ #undef bswap_32
+ #undef bswap_64
++#undef _BYTESWAP_H
+ #include <byteswap.h>
+ #endif
diff --git a/libs/libfolly/patches/103-arm-yield.patch b/libs/libfolly/patches/103-arm-yield.patch
new file mode 100644 (file)
index 0000000..f869526
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/folly/portability/Asm.h
++++ b/folly/portability/Asm.h
+@@ -38,7 +38,7 @@ inline void asm_volatile_pause() {
+   ::_mm_pause();
+ #elif defined(__i386__) || FOLLY_X64
+   asm volatile("pause");
+-#elif FOLLY_AARCH64 || defined(__arm__)
++#elif FOLLY_AARCH64 || (defined(__arm__) && !(__ARM_ARCH < 7))
+   asm volatile("yield");
+ #elif FOLLY_PPC64
+   asm volatile("or 27,27,27");
index 3c0eefb2ef205583e098116854f9942d9356044a..d4fcc5f90ccb964d146963aa2fe59d769c46d9e8 100644 (file)
@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libfstrm
 PKG_VERSION:=0.5.0
-PKG_RELEASE=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=fstrm-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://dl.farsightsecurity.com/dist/fstrm/
@@ -55,7 +55,7 @@ endef
 
 define Package/libfstrm/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libfstrm.so* $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfstrm.so* $(1)/usr/lib/
 endef
 
 $(eval $(call BuildPackage,libfstrm))
index 4cdb0166d48bc4609dfce59fd467bfb3913d55f2..6d3c1b9acd7a252f12fd63fc8b7caa39097b5d6b 100644 (file)
@@ -9,17 +9,18 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libftdi
 PKG_VERSION:=0.20
-PKG_RELEASE:=5
+PKG_RELEASE:=6
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.intra2net.com/en/developer/libftdi/download/
 PKG_HASH:=3176d5b5986438f33f5208e690a8bfe90941be501cc0a72118ce3d338d4b838e
-PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
 
+PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
 PKG_LICENSE:=LGPL-2.0
 PKG_LICENSE_FILES:=COPYING.LIB
 
-PKG_INSTALL:=1
+CMAKE_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
 PKG_USE_MIPS16:=0
 
 include $(INCLUDE_DIR)/package.mk
@@ -39,21 +40,18 @@ define Package/libftdi/description
   The library is linked with your program in userspace, no kernel driver required.
 endef
 
-CMAKE_OPTIONS += -DBoost_NO_BOOST_CMAKE=ON
+CMAKE_OPTIONS += \
+       -DBoost_NO_BOOST_CMAKE=ON \
+       -DEXAMPLES=OFF
 
 define Build/InstallDev
-       $(INSTALL_DIR) $(1)/usr/include/
-       $(CP) $(PKG_INSTALL_DIR)/usr/include/ftdi.h $(1)/usr/include/
-       $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libftdi.{a,so*} $(1)/usr/lib/
-       $(INSTALL_DIR) $(1)/usr/lib/pkgconfig/
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libftdi.pc $(1)/usr/lib/pkgconfig/libftdi.pc
-       $(SED) \
-               's,/usr/include,$$$${prefix}/include,g' \
-                $(1)/usr/lib/pkgconfig/libftdi.pc
-       $(SED) \
-               's,/usr/lib,$$$${prefix}/lib,g' \
-                $(1)/usr/lib/pkgconfig/libftdi.pc
+       $(call Build/InstallDev/cmake,$(1))
+       $(SED) 's,/usr/bin,/usr,g' $(1)/usr/lib/pkgconfig/libftdi.pc
+       $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/libftdi.pc
+       $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/libftdi.pc
+       $(SED) 's,/usr/bin,/usr,g' $(1)/usr/lib/pkgconfig/libftdipp.pc
+       $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/libftdipp.pc
+       $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/libftdipp.pc
 endef
 
 define Package/libftdi/install
index 2280030320dd005042474b398364124d084220ba..3aaf5e76ac5f12d45f56cd6c94f560fdd5704bf0 100644 (file)
@@ -9,17 +9,18 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libftdi1
 PKG_VERSION:=1.4
-PKG_RELEASE:=3
+PKG_RELEASE:=6
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://www.intra2net.com/en/developer/libftdi/download/
 PKG_HASH:=ec36fb49080f834690c24008328a5ef42d3cf584ef4060f3a35aa4681cb31b74
-PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
 
-PKG_LICENSE:=LGPL-2.0
+PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
+PKG_LICENSE:=LGPL-2.1-only
 PKG_LICENSE_FILES:=COPYING.LIB
 
-PKG_INSTALL:=1
+CMAKE_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
 PKG_USE_MIPS16:=0
 
 include $(INCLUDE_DIR)/package.mk
@@ -58,25 +59,19 @@ define Package/ftdi_eeprom/description
   read. Otherwise, you will still get the old values.
 endef
 
-CMAKE_OPTIONS:= \
+CMAKE_OPTIONS += \
+       -DBoost_NO_BOOST_CMAKE=ON \
        -DBUILD_TESTS=OFF \
-       -DBoost_NO_BOOST_CMAKE=ON
+       -DEXAMPLES=OFF
 
 define Build/InstallDev
-       $(INSTALL_DIR) $(1)/usr/include/libftdi1/
-       $(CP) $(PKG_INSTALL_DIR)/usr/include/libftdi1/ftdi.h $(1)/usr/include/libftdi1/
-       $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libftdi1.{a,so*} $(1)/usr/lib/
-       $(INSTALL_DIR) $(1)/usr/lib/cmake/libftdi1
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/cmake/libftdi1/* $(1)/usr/lib/cmake/libftdi1/
-       $(INSTALL_DIR) $(1)/usr/lib/pkgconfig/
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libftdi1.pc $(1)/usr/lib/pkgconfig/libftdi1.pc
-       $(SED) \
-               's,/usr/include,$$$${prefix}/include,g' \
-                $(1)/usr/lib/pkgconfig/libftdi1.pc
-       $(SED) \
-               's,/usr/lib,$$$${prefix}/lib,g' \
-                $(1)/usr/lib/pkgconfig/libftdi1.pc
+       $(call Build/InstallDev/cmake,$(1))
+       $(SED) 's,/usr/bin,/usr,g' $(1)/usr/lib/pkgconfig/libftdi1.pc
+       $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/libftdi1.pc
+       $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/libftdi1.pc
+       $(SED) 's,/usr/bin,/usr,g' $(1)/usr/lib/pkgconfig/libftdipp1.pc
+       $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/libftdipp1.pc
+       $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/libftdipp1.pc
 endef
 
 define Package/libftdi1/install
index 5f2a7520b35dddd7967c106388ab5bd7b34a6fba..9c748811e84eb47f4a1cb18a6b58e116e7171c57 100644 (file)
@@ -1,23 +1,20 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libgabe
-PKG_VERSION:=0.99
-PKG_RELEASE:=2
+PKG_VERSION:=1.0
+PKG_RELEASE:=1
 
-PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/schanzen/libgabe/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=2a8c151a90c9ad8eaad073c8ad1482d66875e3433b0b4fd1e08424c0fc89e877
 
+PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
 PKG_LICENSE:=GPLv2
 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:=a082729326155207312a5fc280d17844b69450f2
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.xz
-PKG_MIRROR_HASH:=74046e8c5657d2e5bcdc0e806983ad4e205a0ed0945f8ab802d7fe564c32e9bd
-
 PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
diff --git a/libs/libgabe/patches/010-shared-library.patch b/libs/libgabe/patches/010-shared-library.patch
new file mode 100644 (file)
index 0000000..4524756
--- /dev/null
@@ -0,0 +1,51 @@
+From 9a0e73c5f6cbcf825eced89d26273a24f7266522 Mon Sep 17 00:00:00 2001
+From: "Schanzenbach, Martin" <martin.schanzenbach@aisec.fraunhofer.de>
+Date: Sun, 30 Sep 2018 20:38:37 +0200
+Subject: [PATCH] shared library
+
+---
+ Makefile.in | 13 ++++++-------
+ 1 file changed, 6 insertions(+), 7 deletions(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index f23bf90..c8c19fa 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -18,13 +18,12 @@ LDFLAGS = @LDFLAGS@ \
+ DISTNAME = @PACKAGE_TARNAME@-@PACKAGE_VERSION@
+-all: libgabe.a TAGS
++all: libgabe.so TAGS
+ # compilation and library making
+-libgabe.a: core.o misc.o
+-      rm -f $@
+-      ar rc $@ $^
++libgabe.so: core.o misc.o
++      $(CC) -shared -o $@ $^
+ # test: test.o libgabe.a
+ #     $(CC) -o $@ $(LDFLAGS) $^
+@@ -44,14 +43,14 @@ dist: AUTHORS COPYING INSTALL NEWS README \
+       tar zc $(DISTNAME) > $(DISTNAME).tar.gz
+       rm -rf $(DISTNAME)
+-install: libgabe.a gabe.h
++install: libgabe.so gabe.h
+       $(top_srcdir)/mkinstalldirs -m 755 $(DESTDIR)$(libdir)
+       $(top_srcdir)/mkinstalldirs -m 755 $(DESTDIR)$(includedir)
+-      $(top_srcdir)/install-sh -m 755 libgabe.a $(DESTDIR)$(libdir)
++      $(top_srcdir)/install-sh -m 755 libgabe.so $(DESTDIR)$(libdir)
+       $(top_srcdir)/install-sh -m 644 gabe.h $(DESTDIR)$(includedir)
+ uninstall:
+-      /bin/rm -f $(DESTDIR)$(libdir)/libgabe.a
++      /bin/rm -f $(DESTDIR)$(libdir)/libgabe.so
+       /bin/rm -f $(DESTDIR)$(includedir)/gabe.h
+ # development and meta stuff
+-- 
+2.17.1
+
index 42c1e9dee8c8b1e8fea348621c18cf126ce15e2c..de36709290a800a82fe5a7aa2189de9416a70a9a 100644 (file)
@@ -8,19 +8,16 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libgcrypt
-PKG_VERSION:=1.8.4
+PKG_VERSION:=1.8.5
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://www.gnupg.org/ftp/gcrypt/libgcrypt/
-PKG_HASH:=f638143a0672628fde0cad745e9b14deb85dffb175709cacc1f4fe24b93f2227
+PKG_HASH:=3b4a2a94cb637eff5bdebbcaf46f4d95c4f25206f459809339cdada0eb577ac3
 
 PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
-PKG_LICENSE:=LGPL-2.1+ GPL-2.0+
-PKG_LICENSE_FILES:=COPYING
 PKG_CPE_ID:=cpe:/a:gnupg:libgcrypt
 
-PKG_FIXUP:=autoreconf patch-libtool
 PKG_INSTALL:=1
 PKG_BUILD_PARALLEL:=1
 
@@ -32,6 +29,8 @@ define Package/libgcrypt
   DEPENDS:=+libgpg-error
   TITLE:=GNU crypto library
   URL:=https://www.gnupg.org/related_software/libgcrypt/
+  LICENSE:=LGPL-2.1-or-later
+  LICENSE_FILES:=COPYING.LIB
 endef
 
 define Package/libgcrypt/description
index 8d4fc08a594ed99e72c0b3b66891e0dbeb2c5c2b..e298e9fc4bd3f0aed2a41aed47ec63f5d7af1c52 100644 (file)
@@ -9,27 +9,29 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libgd
 PKG_VERSION:=2.2.5
-PKG_RELEASE:=1
+PKG_RELEASE:=4
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://github.com/$(PKG_NAME)/$(PKG_NAME)/releases/download/gd-$(PKG_VERSION)/
 PKG_HASH:=8c302ccbf467faec732f0741a859eef4ecae22fea2d2ab87467be940842bde51
+
 PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
 PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:libgd:gd_graphics_library
 
-PKG_FIXUP:=autoreconf
-
-PKG_INSTALL:=1
+CMAKE_INSTALL:=1
 PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
 
 define Package/libgd
   SECTION:=libs
   CATEGORY:=Libraries
-  DEPENDS:=+libjpeg +libpng +LIBGD_TIFF:libtiff +LIBGD_FREETYPE:libfreetype
+  DEPENDS:=+libjpeg +libpng +libwebp +LIBGD_TIFF:libtiff +LIBGD_FREETYPE:libfreetype
   TITLE:=The GD graphics library
-  URL:=http://www.libgd.org/
+  URL:=https://libgd.github.io/
   MENU:=1
 endef
 
@@ -55,56 +57,37 @@ define Package/libgd/config
        endif
 endef
 
-TARGET_CFLAGS += $(FPIC)
+TARGET_CFLAGS += $(FPIC) -ffunction-sections -fdata-sections -flto
 
-CONFIGURE_ARGS += \
-       --enable-shared \
-       --enable-static \
-       --disable-rpath \
-       --without-x \
-       --without-fontconfig \
-       --with-jpeg=$(STAGING_DIR)/usr \
-       --with-png=$(STAGING_DIR)/usr \
-       --without-xpm
+CMAKE_OPTIONS += \
+       -DENABLE_FONTCONFIG=OFF \
+       -DENABLE_ICONV=OFF \
+       -DENABLE_JPEG=ON \
+       -DENABLE_LIQ=OFF \
+       -DENABLE_PNG=ON \
+       -DENABLE_WEBP=ON \
+       -DENABLE_XPM=OFF \
+       -DZLIB_INCLUDE_DIR="$(STAGING_DIR)/usr"
 
 ifdef CONFIG_LIBGD_TIFF
-       CONFIGURE_ARGS+= \
-               --with-tiff=$(STAGING_DIR)/usr
+       CMAKE_OPTIONS += \
+               -DENABLE_TIFF=ON
 else
-       CONFIGURE_ARGS+= \
-               --without-tiff
+       CMAKE_OPTIONS += \
+               -DENABLE_TIFF=OFF
 endif
 
 ifdef CONFIG_LIBGD_FREETYPE
-       CONFIGURE_ARGS+= \
-               --with-freetype=$(STAGING_DIR)/usr
+       CMAKE_OPTIONS += \
+               -DENABLE_FREETYPE=ON
 else
-       CONFIGURE_ARGS+= \
-               --without-freetype
+       CMAKE_OPTIONS += \
+               -DENABLE_FREETYPE=OFF
 endif
 
-CONFIGURE_VARS += \
-       ac_cv_header_iconv_h=no
-
-define Build/InstallDev
-       $(INSTALL_DIR) $(1)/usr/bin
-       $(CP) $(PKG_INSTALL_DIR)/usr/bin/gdlib-config $(1)/usr/bin/
-       $(SED) \
-               's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \
-               $(1)/usr/bin/gdlib-config
-       $(INSTALL_DIR) $(1)/usr/include
-       $(CP) $(PKG_INSTALL_DIR)/usr/include/entities.h $(1)/usr/include/
-       $(CP) $(PKG_INSTALL_DIR)/usr/include/gd{,_color_map,_errors,_io,cache,fontg,fontl,fontmb,fonts,fontt,fx,pp}.h \
-               $(1)/usr/include/
-       $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgd.{a,la,so*} $(1)/usr/lib/
-       $(INSTALL_DIR) $(2)/bin
-       $(LN) ../../usr/bin/gdlib-config $(2)/bin/
-endef
-
 define Package/libgd/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgd.so.* $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgd.so* $(1)/usr/lib/
 endef
 
 $(eval $(call BuildPackage,libgd))
diff --git a/libs/libgd/patches/100-no-cxx.patch b/libs/libgd/patches/100-no-cxx.patch
new file mode 100644 (file)
index 0000000..3659fee
--- /dev/null
@@ -0,0 +1,26 @@
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -23,8 +23,6 @@ SET (LIBGD_SRC_FILES
+       gd_io_dp.c
+       gd_io_file.c
+       gd_io_ss.c
+-      gd_io_stream.cxx
+-      gd_io_stream.h
+       gd_jpeg.c
+       gd_matrix.c
+       gd_nnquant.c
+@@ -60,8 +58,6 @@ SET (LIBGD_SRC_FILES
+       gdhelpers.c
+       gdhelpers.h
+       gdkanji.c
+-      gdpp.cxx
+-      gdpp.h
+       gdtables.c
+       gdxpm.c
+       jisx0208.h
+@@ -175,5 +171,4 @@ install(FILES
+       gdfonts.h
+       gdfontt.h
+       gdfx.h
+-      gdpp.h
+       DESTINATION include)
diff --git a/libs/libgd/patches/101-gdlib-config.patch b/libs/libgd/patches/101-gdlib-config.patch
deleted file mode 100644 (file)
index b0d82b7..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
---- a/config/gdlib-config.in
-+++ b/config/gdlib-config.in
-@@ -74,7 +74,7 @@ while test $# -gt 0; do
-       echo @LDFLAGS@
-       ;;
-     --libs)
--      echo -lgd @LIBS@ @LIBICONV@
-+      echo -lgd @LIBS@
-       ;;
-     --cflags|--includes)
-       echo -I@includedir@
-@@ -87,7 +87,7 @@ while test $# -gt 0; do
-       echo "includedir: $includedir"
-       echo "cflags:     -I@includedir@"
-       echo "ldflags:    @LDFLAGS@"
--      echo "libs:       @LIBS@ @LIBICONV@"
-+      echo "libs:       @LIBS@"
-       echo "libdir:     $libdir"
-       echo "features:   @FEATURES@"
-       ;;
diff --git a/libs/libgd/patches/102-gdlib-pc-in.patch b/libs/libgd/patches/102-gdlib-pc-in.patch
deleted file mode 100644 (file)
index 79baeb3..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
---- a/config/gdlib.pc.in
-+++ b/config/gdlib.pc.in
-@@ -7,5 +7,5 @@ Name: gd
- Description: GD graphics library
- Version: @VERSION@
- Cflags: -I${includedir}
--Libs.private: @LIBS@ @LIBICONV@
-+Libs.private: @LIBS@ 
- Libs: -L${libdir} -lgd
diff --git a/libs/libgd/patches/200-cmake-add-soname-info-to-libgd.so.patch b/libs/libgd/patches/200-cmake-add-soname-info-to-libgd.so.patch
new file mode 100644 (file)
index 0000000..f4af744
--- /dev/null
@@ -0,0 +1,135 @@
+From 5ebbd50cffc013a7dd0f3b1eaaa83d199e8e47fd Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Sun, 24 Jul 2016 00:14:20 +0530
+Subject: [PATCH] cmake: add soname info to libgd.so
+
+Pull out the library versioning info out of configure and into a common
+script that both cmake & autotools can run.  This way we have a single
+source of truth for the versioning info.
+---
+ CMakeLists.txt     | 11 +++++++++++
+ config/getlib.sh   | 42 ++++++++++++++++++++++++++++++++++++++++++
+ configure.ac       | 25 +++++++++++--------------
+ src/CMakeLists.txt |  2 ++
+ 4 files changed, 66 insertions(+), 14 deletions(-)
+ create mode 100755 config/getlib.sh
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 7c8ad34b..9fe2eb4e 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -78,6 +78,17 @@ else (USE_EXT_GD)
+       SET(GD_VERSION_INT "2020555")
++      MACRO(GV_LT VER VAR)
++              execute_process(
++                      COMMAND sh ${CMAKE_CURRENT_SOURCE_DIR}/config/getlib.sh ${VER}
++                      OUTPUT_VARIABLE ${VAR}
++              )
++      ENDMACRO(GV_LT)
++
++      GV_LT(SONAME GDLIB_LIB_SOVERSION)
++      GV_LT(VERSION GDLIB_LIB_VERSION)
++      MESSAGE(STATUS "gd shared lib version ${GDLIB_LIB_SOVERSION} (${GDLIB_LIB_VERSION})")
++
+       SET(CMAKE_REQUIRED_INCLUDES "/usr/include" "/usr/local/include")
+       include(CheckIncludeFiles)
+diff --git a/config/getlib.sh b/config/getlib.sh
+new file mode 100755
+index 00000000..4835cf6c
+--- /dev/null
++++ b/config/getlib.sh
+@@ -0,0 +1,42 @@
++#!/bin/sh
++
++GETVER="${0%/*}/getver.pl"
++GDLIB_MAJOR=$("${GETVER}" MAJOR)
++GDLIB_MINOR=$("${GETVER}" MINOR)
++GDLIB_REVISION=$("${GETVER}" RELEASE)
++
++# Dynamic library version information
++# See http://www.gnu.org/software/libtool/manual/libtool.html#Updating-version-info
++
++GDLIB_LT_CURRENT=3
++# This is the version where the soname (current above) changes.  We use it
++# to reset the revision base back to zero.  It's a bit of a pain, but some
++# systems restrict the revision range below to [0..255] (like OS X).
++GDLIB_PREV_MAJOR=2
++GDLIB_PREV_MINOR=2
++# This isn't 100% correct, but it tends to be a close enough approximation
++# for how we manage the codebase.  It's rare to do a release that doesn't
++# modify the library since this project is centered around the library.
++GDLIB_LT_REVISION=$(( ((GDLIB_MAJOR - GDLIB_PREV_MAJOR) << 6) | ((GDLIB_MINOR - GDLIB_PREV_MINOR) << 3) | GDLIB_REVISION ))
++GDLIB_LT_AGE=0
++
++# The first three fields we feed into libtool and the OS target determines how
++# they get used.  The last two fields we feed into cmake.  We use the same rules
++# as Linux SONAME versioning in libtool, but cmake should handle it for us.
++case $1 in
++CURRENT)
++      printf '%s' "${GDLIB_LT_CURRENT}"
++      ;;
++REVISION)
++      printf '%s' "${GDLIB_LT_REVISION}"
++      ;;
++AGE)
++      printf '%s' "${GDLIB_LT_AGE}"
++      ;;
++VERSION)
++      printf '%s' "$(( GDLIB_LT_CURRENT - GDLIB_LT_AGE )).${GDLIB_LT_AGE}.${GDLIB_LT_REVISION}"
++      ;;
++SONAME)
++      printf '%s' "$(( GDLIB_LT_CURRENT - GDLIB_LT_AGE ))"
++      ;;
++esac
+diff --git a/configure.ac b/configure.ac
+index 91643bd6..c3fb034e 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -34,20 +34,17 @@ AC_SUBST(GDLIB_REVISION)
+ AC_SUBST(GDLIB_EXTRA)
+ AC_SUBST(GDLIB_VERSION)
+-# Dynamic library version information
+-# See http://www.gnu.org/software/libtool/manual/libtool.html#Updating-version-info
+-
+-GDLIB_LT_CURRENT=3
+-dnl This is the version where the soname (current above) changes.  We use it
+-dnl to reset the revision base back to zero.  It's a bit of a pain, but some
+-dnl systems restrict the revision range below to [0..255] (like OS X).
+-GDLIB_PREV_MAJOR=2
+-GDLIB_PREV_MINOR=2
+-dnl This isn't 100% correct, but it tends to be a close enough approximation
+-dnl for how we manage the codebase.  It's rare to do a release that doesn't
+-dnl modify the library since this project is centered around the library.
+-GDLIB_LT_REVISION=$(( ((GDLIB_MAJOR - GDLIB_PREV_MAJOR) << 6) | ((GDLIB_MINOR - GDLIB_PREV_MINOR) << 3) | GDLIB_REVISION ))
+-GDLIB_LT_AGE=0
++dnl Keep the libtool version details in an external script so cmake can
++dnl access the values too.
++define([lt_gv], [config/getlib.sh ]$1)
++m4_define([gd_LT_CURRENT], esyscmd(lt_gv(CURRENT)))
++m4_define([gd_LT_REVISION], esyscmd(lt_gv(REVISION)))
++m4_define([gd_LT_AGE], esyscmd(lt_gv(AGE)))
++
++GDLIB_LT_CURRENT=gd_LT_CURRENT
++GDLIB_LT_REVISION=gd_LT_REVISION
++GDLIB_LT_AGE=gd_LT_AGE
++
+ AC_SUBST(GDLIB_LT_CURRENT)
+ AC_SUBST(GDLIB_LT_REVISION)
+ AC_SUBST(GDLIB_LT_AGE)
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 08fd6991..a621fe1e 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -76,6 +76,8 @@ include(GNUInstallDirs)
+ if (BUILD_SHARED_LIBS)
+       add_library(${GD_LIB} ${LIBGD_SRC_FILES})
+       set_target_properties(${GD_LIB} PROPERTIES
++              SOVERSION ${GDLIB_LIB_SOVERSION}
++              VERSION ${GDLIB_LIB_VERSION}
+               C_VISIBILITY_PRESET hidden
+               CXX_VISIBILITY_PRESET hidden
+       )
diff --git a/libs/libgd/patches/200-uclibc-ceill.patch b/libs/libgd/patches/200-uclibc-ceill.patch
deleted file mode 100644 (file)
index 1b4fc8e..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
---- a/src/gd_bmp.c
-+++ b/src/gd_bmp.c
-@@ -28,6 +28,7 @@
- #include <math.h>
- #include <string.h>
- #include <stdlib.h>
-+#include <features.h>
- #include "gd.h"
- #include "gdhelpers.h"
- #include "bmp.h"
-@@ -49,6 +50,13 @@ static int bmp_read_rle(gdImagePtr im, g
- #define BMP_DEBUG(s)
-+#if defined(__UCLIBC__) && !defined(__UCLIBC_HAS_LONG_DOUBLE_MATH__)
-+long double ceill(long double x)
-+{
-+      return (long double)ceil((double)x);
-+}
-+#endif
-+
- static int gdBMPPutWord(gdIOCtx *out, int w)
- {
-       /* Byte order is little-endian */
diff --git a/libs/libgd/patches/210-generate-install-gdlib.pc-for-cmake-builds-too-164.patch b/libs/libgd/patches/210-generate-install-gdlib.pc-for-cmake-builds-too-164.patch
new file mode 100644 (file)
index 0000000..79e44e6
--- /dev/null
@@ -0,0 +1,39 @@
+From dd76e8fcf2a2d7e122110444695ad20f2549420e Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Wed, 10 Jan 2018 01:56:10 -0500
+Subject: [PATCH] generate & install gdlib.pc for cmake builds too #164
+
+---
+ config/gdlib.pc.cmake | 9 +++++++++
+ src/CMakeLists.txt    | 3 +++
+ 2 files changed, 12 insertions(+)
+ create mode 100644 config/gdlib.pc.cmake
+
+diff --git a/config/gdlib.pc.cmake b/config/gdlib.pc.cmake
+new file mode 100644
+index 00000000..fb828882
+--- /dev/null
++++ b/config/gdlib.pc.cmake
+@@ -0,0 +1,11 @@
++prefix=@CMAKE_INSTALL_PREFIX@
++exec_prefix=@CMAKE_INSTALL_PREFIX@
++libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
++includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
++
++Name: gd
++Description: GD graphics library
++Version: @GDLIB_VERSION@
++Cflags: -I${includedir}
++Libs.private: @LIBGD_DEP_LIBS@
++Libs: -L${libdir} -lgd
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index a621fe1e..38fc9c42 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -174,3 +174,6 @@ install(FILES
+       gdfontt.h
+       gdfx.h
+       DESTINATION include)
++
++CONFIGURE_FILE(../config/gdlib.pc.cmake gdlib.pc @ONLY)
++INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/gdlib.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
diff --git a/libs/libgd/patches/220-exclude_host_headers.patch b/libs/libgd/patches/220-exclude_host_headers.patch
new file mode 100644 (file)
index 0000000..a1571dd
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -89,8 +89,6 @@
+       GV_LT(VERSION GDLIB_LIB_VERSION)
+       MESSAGE(STATUS "gd shared lib version ${GDLIB_LIB_SOVERSION} (${GDLIB_LIB_VERSION})")
+-      SET(CMAKE_REQUIRED_INCLUDES "/usr/include" "/usr/local/include")
+-
+       include(CheckIncludeFiles)
+       include(CheckIncludeFile)
index ce0a30b8c3188e2449f25f356690b109f18525a9..71429ec7eb810ae4328bf59173ec1c627a6a1753 100644 (file)
@@ -6,21 +6,19 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libgee
-PKG_VERSION:=0.20.1
-PKG_RELEASE:=2
+PKG_VERSION:=0.20.2
+PKG_RELEASE:=1
 
-PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE_URL:=@GNOME/libgee/0.20
+PKG_HASH:=9e035c4b755f46bfae70ba81cdcf8328b03f554373cec8c816e8b5680f85353c
 
-PKG_LICENSE:=LGPL-2.1 
+PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
+PKG_LICENSE:=LGPL-2.1-or-later
 PKG_LICENSE_FILES:=COPYING
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_SOURCE_URL:=@GNOME/libgee/0.20/
-PKG_HASH:=bb2802d29a518e8c6d2992884691f06ccfcc25792a5686178575c7111fea4630
-
-PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
-
+PKG_BUILD_PARALLEL:=1
 PKG_BUILD_DEPENDS:=vala/host
 
 include $(INCLUDE_DIR)/package.mk
@@ -39,7 +37,12 @@ define Package/libgee/decription
 endef
 
 CONFIGURE_ARGS += \
-       --disable-doc
+       --disable-benchmark \
+       --disable-coverage \
+       --disable-doc \
+       --disable-internal-asserts \
+       --disable-introspection \
+       --disable-vala-fatal-warnings
 
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include/
diff --git a/libs/libgee/patches/libgee-0.18.0-no-introspection.patch b/libs/libgee/patches/libgee-0.18.0-no-introspection.patch
deleted file mode 100644 (file)
index fd30e45..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-diff -u --recursive libgee-0.20.0-vanilla/configure.ac libgee-0.20.0/configure.ac
---- libgee-0.20.0-vanilla/configure.ac 2018-01-07 20:42:52.827537620 -0500
-+++ libgee-0.20.0/configure.ac 2018-01-07 20:43:25.128645499 -0500
-@@ -65,11 +65,6 @@
-               enable_consistency_check=$enableval, enable_consistency_check=no)
- AS_IF([test "x$enable_consistency_check" != xno], [VALA_ADD_VALAFLAGS(-D CONSISTENCY_CHECKS)])
--AX_REQUIRE_DEFINED([GOBJECT_INTROSPECTION_CHECK])
--GOBJECT_INTROSPECTION_CHECK([0.9.0])
--
--VALA_CHECK([0.25.1])
--
- AC_OUTPUT([Makefile
-            gee-0.8.pc
-            benchmark/Makefile
-diff -u --recursive libgee-0.20.0-vanilla/gee/Makefile.am libgee-0.20.0/gee/Makefile.am
---- libgee-0.20.0-vanilla/gee/Makefile.am      2018-01-07 20:42:52.829537627 -0500
-+++ libgee-0.20.0/gee/Makefile.am      2018-01-07 20:43:48.332722990 -0500
-@@ -146,29 +146,6 @@
-       gee-0.8.vapi \
-       $(NULL)
--if HAVE_INTROSPECTION
--girdir = @INTROSPECTION_GIRDIR@
--
--dist_gir_DATA = \
--      Gee-0.8.gir \
--      $(NULL)
--
--typelibdir = @INTROSPECTION_TYPELIBDIR@
--typelib_DATA = \
--      Gee-0.8.typelib \
--      $(NULL)
--
--# Extract dlname from libfolks.la; see bug #658002.
--# This is what g-ir-scanner does.
--libgee_dlname = \
--      `$(SED) -nE "s/^dlname='([A-Za-z0-9.+-]+)'/\1/p" libgee-0.8.la`
--INTROSPECTION_COMPILER_ARGS= \
--      -l $(libgee_dlname)
--Gee-0.8.gir: libgee_0_8_la_vala.stamp
--Gee-0.8.typelib: Gee-0.8.gir libgee-0.8.la
--      @INTROSPECTION_COMPILER@ $(INTROSPECTION_COMPILER_ARGS) -o $@ $^
--endif
--
- MOSTLYCLEANFILES = \
-       $(libgee_0_8_la_VALASOURCES:.vala=.c) \
-       libgee_0_8_la_vala.stamp \
-diff -u --recursive libgee-0.20.0-vanilla/gee/Makefile.in libgee-0.20.0/gee/Makefile.in
---- libgee-0.20.0-vanilla/gee/Makefile.in      2018-01-07 20:42:52.830537630 -0500
-+++ libgee-0.20.0/gee/Makefile.in      2018-01-07 20:44:18.433823516 -0500
-@@ -297,14 +297,6 @@
- INSTALL_PROGRAM = @INSTALL_PROGRAM@
- INSTALL_SCRIPT = @INSTALL_SCRIPT@
- INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
--INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@
--INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
--INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
--INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
--INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
--INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
--INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
--INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@
- LCOV = @LCOV@
- LD = @LD@
- LDFLAGS = @LDFLAGS@
-@@ -544,25 +536,6 @@
-       gee-0.8.vapi \
-       $(NULL)
--@HAVE_INTROSPECTION_TRUE@girdir = @INTROSPECTION_GIRDIR@
--@HAVE_INTROSPECTION_TRUE@dist_gir_DATA = \
--@HAVE_INTROSPECTION_TRUE@     Gee-0.8.gir \
--@HAVE_INTROSPECTION_TRUE@     $(NULL)
--
--@HAVE_INTROSPECTION_TRUE@typelibdir = @INTROSPECTION_TYPELIBDIR@
--@HAVE_INTROSPECTION_TRUE@typelib_DATA = \
--@HAVE_INTROSPECTION_TRUE@     Gee-0.8.typelib \
--@HAVE_INTROSPECTION_TRUE@     $(NULL)
--
--
--# Extract dlname from libfolks.la; see bug #658002.
--# This is what g-ir-scanner does.
--@HAVE_INTROSPECTION_TRUE@libgee_dlname = \
--@HAVE_INTROSPECTION_TRUE@     `$(SED) -nE "s/^dlname='([A-Za-z0-9.+-]+)'/\1/p" libgee-0.8.la`
--
--@HAVE_INTROSPECTION_TRUE@INTROSPECTION_COMPILER_ARGS = \
--@HAVE_INTROSPECTION_TRUE@     -l $(libgee_dlname)
--
- MOSTLYCLEANFILES = \
-       $(libgee_0_8_la_VALASOURCES:.vala=.c) \
-       libgee_0_8_la_vala.stamp \
-@@ -1621,9 +1594,6 @@
- $(libgee_0_8_la_VALASOURCES:.vala=.c): libgee_0_8_la_vala.stamp
- gee-0.8.vapi gee-internals-0.8.vapi gee.h gee-internals.h: libgee_0_8_la_vala.stamp
--@HAVE_INTROSPECTION_TRUE@Gee-0.8.gir: libgee_0_8_la_vala.stamp
--@HAVE_INTROSPECTION_TRUE@Gee-0.8.typelib: Gee-0.8.gir libgee-0.8.la
--@HAVE_INTROSPECTION_TRUE@     @INTROSPECTION_COMPILER@ $(INTROSPECTION_COMPILER_ARGS) -o $@ $^
- # Tell versions [3.59,3.63) of GNU make to not export all variables.
- # Otherwise a system limit (for SysV at least) may be exceeded.
index dbaace61d8af0b39ee3317add59ce5b812e71c5d..28bd559b78813b4118d9a5c5595fd43046340f93 100644 (file)
@@ -2,12 +2,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gflags
 PKG_VERSION:=2.2.2
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/gflags/gflags/tar.gz/v$(PKG_VERSION)?
 PKG_HASH:=34af2f15cf7367513b352bdcd2493ab14ce43692d2dcd9dfc499492966c64dcf
 
+PKG_MAINTAINER:=Amol Bhave <ambhave@fb.com>
 PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=COPYING.txt
 
@@ -28,7 +29,6 @@ define Package/gflags
        TITLE:=C++ library that implements commandline flags processing
        DEPENDS:=+libstdcpp +libpthread
        URL:=https://github.com/gflags/gflags
-       MAINTAINER:=Amol Bhave <ambhave@fb.com>
 endef
 
 define Package/gflags/description
@@ -39,7 +39,7 @@ endef
 
 define Package/gflags/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libgflags.so* $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgflags.so* $(1)/usr/lib/
 endef
 
 $(eval $(call BuildPackage,gflags))
index 83ff65cb79515daabc019724963b079b5fd9b66e..f70b7a1cf9083d24ae254d4381646f1346a67ec1 100644 (file)
@@ -2,31 +2,29 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=glog
 PKG_VERSION:=0.4.0
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/google/glog/tar.gz/v$(PKG_VERSION)?
 PKG_HASH:=f28359aeba12f30d73d9e4711ef356dc842886968112162bc73002645139c39c
 
+PKG_MAINTAINER:=Amir Sabbaghi <asaba90@gmail.com>
 PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=COPYING
 
 PKG_FIXUP:=autoreconf
-
 PKG_BUILD_PARALLEL:=1
-PKG_INSTALL:=1
-
-PKG_BUILD_DEPENDS:=libgflags
+CMAKE_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
 
 define Package/glog
   SECTION:=libs
   CATEGORY:=Libraries
   TITLE:=C++ implementation of the Google logging module
-  DEPENDS:= +libstdcpp +libpthread +gflags
+  DEPENDS:=+libstdcpp +libpthread +gflags
   URL:=https://github.com/google/glog
-  MAINTAINER:=Amir Sabbaghi <amir@pichak.co>
 endef
 
 define Package/glog/description
@@ -34,23 +32,13 @@ define Package/glog/description
   module.  Documentation for the implementation is in doc/.
 endef
 
-CONFIGURE_VARS+=ac_cv_header_libunwind_h=0
+CMAKE_OPTIONS += \
+       -DBUILD_SHARED_LIBS=ON \
+       -DBUILD_TESTING=OFF \
+       -DUNWIND_LIBRARY=OFF
 
-TARGET_CXXFLAGS+=-std=c++11
-TARGET_LDFLAGS+=-lpthread
-
-define Build/Configure
-       $(call Build/Configure/Default,)
-endef
-
-define Build/InstallDev
-       $(INSTALL_DIR) $(1)/usr/include/glog
-       $(CP) $(PKG_INSTALL_DIR)/usr/include/glog/*.h $(1)/usr/include/glog
-       $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libglog.{a,so*} $(1)/usr/lib
-       $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libglog.pc $(1)/usr/lib/pkgconfig/
-endef
+TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto
+TARGET_CFLAGS += -Wl,--gc-sections
 
 define Package/glog/install
        $(INSTALL_DIR) $(1)/usr/lib
diff --git a/libs/libglog/patches/110-nanosleep.patch b/libs/libglog/patches/110-nanosleep.patch
new file mode 100644 (file)
index 0000000..8d1a2ff
--- /dev/null
@@ -0,0 +1,24 @@
+From d7b02b6929baf5b21ee6e15a700b4fc82d962e9c Mon Sep 17 00:00:00 2001
+From: Rosen Penev <rosenp@gmail.com>
+Date: Thu, 25 Jul 2019 19:14:42 -0700
+Subject: [PATCH] googletest: Switch to nanosleep
+
+usleep is deprecated and optionally not available with uClibc-ng.
+---
+ src/googletest.h | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/googletest.h b/src/googletest.h
+index 49ddbc0a..39fb29fb 100644
+--- a/src/googletest.h
++++ b/src/googletest.h
+@@ -574,7 +574,8 @@ class Thread {
+ static inline void SleepForMilliseconds(int t) {
+ #ifndef OS_WINDOWS
+-  usleep(t * 1000);
++  const struct timespec req = {0, t * 1000 * 1000};
++  nanosleep(&req, NULL);
+ #else
+   Sleep(t);
+ #endif
index b9841107d0c026b06a0baa021c88cd68008d1967..8a18cd18a3cc45055b319a0d4c60d5a046ef1fe3 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libgpg-error
 PKG_VERSION:=1.36
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://mirrors.dotsrc.org/gcrypt/libgpg-error \
@@ -18,12 +18,11 @@ PKG_SOURCE_URL:=https://mirrors.dotsrc.org/gcrypt/libgpg-error \
 PKG_HASH:=babd98437208c163175c29453f8681094bcaf92968a15cafb1a276076b33c97c
 
 PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
-PKG_LICENSE:=LGPL-2.1+
+PKG_LICENSE:=LGPL-2.1-or-later
 PKG_LICENSE_FILES:=COPYING
 
 PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
-
 PKG_FIXUP:=autoreconf
 
 include $(INCLUDE_DIR)/package.mk
diff --git a/libs/libgpg-error/patches/020-gawk5-support.patch b/libs/libgpg-error/patches/020-gawk5-support.patch
new file mode 100644 (file)
index 0000000..17e8816
--- /dev/null
@@ -0,0 +1,158 @@
+From 7865041c77f4f7005282f10f9b6666b19072fbdf Mon Sep 17 00:00:00 2001
+From: NIIBE Yutaka <gniibe@fsij.org>
+Date: Mon, 15 Apr 2019 15:10:44 +0900
+Subject: [PATCH] awk: Prepare for Gawk 5.0.
+
+* src/Makefile.am: Use pkg_namespace (instead of namespace).
+* src/mkerrnos.awk: Likewise.
+* lang/cl/mkerrcodes.awk: Don't escape # in regexp.
+* src/mkerrcodes.awk, src/mkerrcodes1.awk, src/mkerrcodes2.awk: Ditto.
+
+--
+
+In Gawk 5.0, regexp routines are replaced by Gnulib implementation,
+which only allows escaping specific characters.
+
+GnuPG-bug-id: 4459
+Reported-by: Marius Schamschula
+Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
+---
+ lang/cl/mkerrcodes.awk |  2 +-
+ src/Makefile.am        |  2 +-
+ src/mkerrcodes.awk     |  2 +-
+ src/mkerrcodes1.awk    |  2 +-
+ src/mkerrcodes2.awk    |  2 +-
+ src/mkerrnos.awk       |  2 +-
+ src/mkstrtable.awk     | 10 +++++-----
+ 7 files changed, 11 insertions(+), 11 deletions(-)
+
+diff --git a/lang/cl/mkerrcodes.awk b/lang/cl/mkerrcodes.awk
+index ae29043..9a1fc18 100644
+--- a/lang/cl/mkerrcodes.awk
++++ b/lang/cl/mkerrcodes.awk
+@@ -122,7 +122,7 @@ header {
+ }
+ !header {
+-  sub (/\#.+/, "");
++  sub (/#.+/, "");
+   sub (/[     ]+$/, ""); # Strip trailing space and tab characters.
+   if (/^$/)
+diff --git a/src/Makefile.am b/src/Makefile.am
+index ce1b882..f2590cb 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -293,7 +293,7 @@ code-from-errno.h: mkerrcodes$(EXEEXT_FOR_BUILD) Makefile
+ errnos-sym.h: Makefile mkstrtable.awk errnos.in
+       $(AWK) -f $(srcdir)/mkstrtable.awk -v textidx=2 -v nogettext=1 \
+-              -v prefix=GPG_ERR_ -v namespace=errnos_ \
++              -v prefix=GPG_ERR_ -v pkg_namespace=errnos_ \
+               $(srcdir)/errnos.in >$@
+diff --git a/src/mkerrcodes.awk b/src/mkerrcodes.awk
+index 46d436c..e9c857c 100644
+--- a/src/mkerrcodes.awk
++++ b/src/mkerrcodes.awk
+@@ -85,7 +85,7 @@ header {
+ }
+ !header {
+-  sub (/\#.+/, "");
++  sub (/#.+/, "");
+   sub (/[     ]+$/, ""); # Strip trailing space and tab characters.
+   if (/^$/)
+diff --git a/src/mkerrcodes1.awk b/src/mkerrcodes1.awk
+index a771a73..4578e29 100644
+--- a/src/mkerrcodes1.awk
++++ b/src/mkerrcodes1.awk
+@@ -81,7 +81,7 @@ header {
+ }
+ !header {
+-  sub (/\#.+/, "");
++  sub (/#.+/, "");
+   sub (/[     ]+$/, ""); # Strip trailing space and tab characters.
+   if (/^$/)
+diff --git a/src/mkerrcodes2.awk b/src/mkerrcodes2.awk
+index ea58503..188f7a4 100644
+--- a/src/mkerrcodes2.awk
++++ b/src/mkerrcodes2.awk
+@@ -91,7 +91,7 @@ header {
+ }
+ !header {
+-  sub (/\#.+/, "");
++  sub (/#.+/, "");
+   sub (/[     ]+$/, ""); # Strip trailing space and tab characters.
+   if (/^$/)
+diff --git a/src/mkerrnos.awk b/src/mkerrnos.awk
+index f79df66..15b1aad 100644
+--- a/src/mkerrnos.awk
++++ b/src/mkerrnos.awk
+@@ -83,7 +83,7 @@ header {
+ }
+ !header {
+-  sub (/\#.+/, "");
++  sub (/#.+/, "");
+   sub (/[     ]+$/, ""); # Strip trailing space and tab characters.
+   if (/^$/)
+diff --git a/src/mkstrtable.awk b/src/mkstrtable.awk
+index c9de9c1..285e45f 100644
+--- a/src/mkstrtable.awk
++++ b/src/mkstrtable.awk
+@@ -77,7 +77,7 @@
+ #
+ # The variable prefix can be used to prepend a string to each message.
+ #
+-# The variable namespace can be used to prepend a string to each
++# The variable pkg_namespace can be used to prepend a string to each
+ # variable and macro name.
+ BEGIN {
+@@ -102,7 +102,7 @@ header {
+       print "/* The purpose of this complex string table is to produce";
+       print "   optimal code with a minimum of relocations.  */";
+       print "";
+-      print "static const char " namespace "msgstr[] = ";
++      print "static const char " pkg_namespace "msgstr[] = ";
+       header = 0;
+     }
+   else
+@@ -110,7 +110,7 @@ header {
+ }
+ !header {
+-  sub (/\#.+/, "");
++  sub (/#.+/, "");
+   sub (/[     ]+$/, ""); # Strip trailing space and tab characters.
+   if (/^$/)
+@@ -150,7 +150,7 @@ END {
+   else
+     print "  gettext_noop (\"" last_msgstr "\");";
+   print "";
+-  print "static const int " namespace "msgidx[] =";
++  print "static const int " pkg_namespace "msgidx[] =";
+   print "  {";
+   for (i = 0; i < coded_msgs; i++)
+     print "    " pos[i] ",";
+@@ -158,7 +158,7 @@ END {
+   print "  };";
+   print "";
+   print "static GPG_ERR_INLINE int";
+-  print namespace "msgidxof (int code)";
++  print pkg_namespace "msgidxof (int code)";
+   print "{";
+   print "  return (0 ? 0";
+-- 
+2.21.0
+
index c0d3d88e3ce9d9a52210c38c26685e568e6f2e62..cb741f2005fcdc57f7e0095faab74ae75d17a708 100644 (file)
@@ -9,14 +9,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libgphoto2
-PKG_VERSION:=2.5.22
+PKG_VERSION:=2.5.23
 PKG_RELEASE:=1
 PORT_VERSION:=0.12.0
 PKG_MAINTAINER:=Leonardo Medici <leonardo_medici@me.com>
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=@SF/gphoto
-PKG_HASH:=15d7327aa9a986af1e1dbfd8f15ba81352b67450d30e44562ce768ff9435ce58
+PKG_HASH:=d8af23364aa40fd8607f7e073df74e7ace05582f4ba13f1724d12d3c97e8852d
 PKG_LICENSE:=LGPL-2.1
 PKG_LICENSE_FILES:=COPYING
 
@@ -434,7 +434,7 @@ CONFIGURE_ARGS += \
        --enable-shared \
        --enable-static \
        --disable-rpath \
-       --with-camlibs="all" \
+       --with-camlibs="all,outdated" \
        --with-gdlib=no \
        --with-libexif=no \
        --with-libusb=no \
index 643ff9b7a1677122970f3b2f6e69efd0b9e6bef7..5b43ede8f150e1b2281d28f4f20071552dca4690 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2018 Michael Heimpold <mhei@heimpold.de>
+# Copyright (C) 2018-2019 Michael Heimpold <mhei@heimpold.de>
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,14 +8,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libgpiod
-PKG_VERSION:=1.3
+PKG_VERSION:=1.4.1
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@KERNEL/software/libs/libgpiod/
-PKG_HASH:=6ec837f23e8f2196e5976dec4ac81403170830075e7f33ede1394eaf67f2e962
+PKG_HASH:=21ae8fd1f8dafc2eb2ba50e652390cf533d21351419a7426255895cb52e21b1c
 
-PKG_LICENSE:=LGPL-2.1+
+PKG_LICENSE:=LGPL-2.1-or-later
 PKG_LICENSE_FILES:=COPYING
 
 PKG_MAINTAINER:=Michael Heimpold <mhei@heimpold.de>
@@ -34,7 +34,7 @@ define Package/libgpiod
   CATEGORY:=Libraries
   URL:=https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git
   TITLE:=Library for interacting with Linux's GPIO character device
-  DEPENDS:=@GPIO_SUPPORT @(LINUX_4_9||LINUX_4_14)
+  DEPENDS:=@GPIO_SUPPORT
 endef
 
 define Package/libgpiod/description
@@ -67,7 +67,7 @@ endef
 
 define Package/libgpiod/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgpiod.so* $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgpiod.so.* $(1)/usr/lib/
 endef
 
 define Package/gpiod-tools/install
index 9e9a85ff328c0a492542493f5aa16f6bd488e6d3..8743c379db6bde9adb26e27f48a9a305ee470158 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libhttp-parser
 PKG_VERSION:=2.9.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/nodejs/http-parser/tar.gz/v$(PKG_VERSION)?
@@ -41,18 +41,19 @@ define Package/libhttp-parser/description
   (in a web server that is per connection).
 endef
 
-MAKE_FLAGS+=library
+MAKE_FLAGS+=library \
+       PREFIX=/usr
 
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include
-       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/local/include/http_parser.h $(1)/usr/include/
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/http_parser.h $(1)/usr/include/
        $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/local/lib/libhttp_parser.so* $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libhttp_parser.so* $(1)/usr/lib/
 endef
 
 define Package/libhttp-parser/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/local/lib/libhttp_parser.so* $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libhttp_parser.so* $(1)/usr/lib/
 endef
 
 $(eval $(call BuildPackage,libhttp-parser))
diff --git a/libs/libhttp-parser/patches/000-fix_darwin_error.patch b/libs/libhttp-parser/patches/000-fix_darwin_error.patch
new file mode 100644 (file)
index 0000000..6937b5e
--- /dev/null
@@ -0,0 +1,51 @@
+--- a/Makefile
++++ b/Makefile
+@@ -25,11 +25,7 @@
+ SOMAJOR = 2
+ SOMINOR = 9
+ SOREV   = 2
+-ifeq (darwin,$(PLATFORM))
+-SOEXT ?= dylib
+-SONAME ?= $(SOLIBNAME).$(SOMAJOR).$(SOMINOR).$(SOEXT)
+-LIBNAME ?= $(SOLIBNAME).$(SOMAJOR).$(SOMINOR).$(SOREV).$(SOEXT)
+-else ifeq (wine,$(PLATFORM))
++ifeq (wine,$(PLATFORM))
+ CC = winegcc
+ BINEXT = .exe.so
+ HELPER = wine
+@@ -65,12 +61,8 @@
+ LIBDIR = $(PREFIX)/lib
+ INCLUDEDIR = $(PREFIX)/include
+-ifeq (darwin,$(PLATFORM))
+-LDFLAGS_LIB += -Wl,-install_name,$(LIBDIR)/$(SONAME)
+-else
+ # TODO(bnoordhuis) The native SunOS linker expects -h rather than -soname...
+ LDFLAGS_LIB += -Wl,-soname=$(SONAME)
+-endif
+ test: test_g test_fast
+       $(HELPER) ./test_g$(BINEXT)
+@@ -131,14 +123,18 @@
+       ctags $^
+ install: library
+-      $(INSTALL) -D  http_parser.h $(DESTDIR)$(INCLUDEDIR)/http_parser.h
+-      $(INSTALL) -D $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(LIBNAME)
++      $(INSTALL) -d $(DESTDIR)$(INCLUDEDIR)
++      $(INSTALL) -d $(DESTDIR)$(LIBDIR)
++      $(INSTALL)    http_parser.h $(DESTDIR)$(INCLUDEDIR)/http_parser.h
++      $(INSTALL)    $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(LIBNAME)
+       ln -s $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(SONAME)
+       ln -s $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(SOLIBNAME).$(SOEXT)
+ install-strip: library
+-      $(INSTALL) -D  http_parser.h $(DESTDIR)$(INCLUDEDIR)/http_parser.h
+-      $(INSTALL) -D -s $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(LIBNAME)
++      $(INSTALL) -d $(DESTDIR)$(INCLUDEDIR)
++      $(INSTALL) -d $(DESTDIR)$(LIBDIR)
++      $(INSTALL)    http_parser.h $(DESTDIR)$(INCLUDEDIR)/http_parser.h
++      $(INSTALL) -s $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(LIBNAME)
+       ln -s $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(SONAME)
+       ln -s $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(SOLIBNAME).$(SOEXT)
index 9c104965569a450c2b6034b6fa87f6b6c44a31f8..e51000c278b89d02b29d1dd2f577000e52be010c 100644 (file)
@@ -18,6 +18,7 @@ PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
 
 PKG_LICENSE:=GPL-2
 PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:media-libs:libid3tag
 
 PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
index 5d1e810d64909a6e1589369b0788de1d83615594..ea32aab9a65d5032fb294909cf5a58d6746c51e0 100644 (file)
@@ -9,12 +9,12 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libidn
 PKG_VERSION:=1.35
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@GNU/libidn
 PKG_HASH:=f11af1005b46b7b15d057d7f107315a1ad46935c7fcdf243c16e46ec14f0fe1e
 
-PKG_LICENSE:=GPL-2.0+ GPL-3.0+ LGPL-2.1+ LGPL-3.0+ Apache-2.0
+PKG_LICENSE:=GPL-2.0-or-later GPL-3.0-or-later LGPL-2.1-or-later LGPL-3.0-or-later Apache-2.0
 PKG_LICENSE_FILES:=COPYING COPYINGv2 COPYINGv3 COPYING.LESSERv2 COPYING.LESSERv3 java/LICENSE-2.0.txt
 
 PKG_INSTALL:=1
index be17d3782897c513e67c2370f441db3d0d6f7631..84bf43d43953e1a0ac8d5e8cfe51d98fb428b103 100644 (file)
@@ -12,6 +12,7 @@ PKG_VERSION:=2.0.5
 PKG_RELEASE:=1
 PKG_LICENSE:=GPL-2.0-or-later LGPL-3.0-or-later
 PKG_LICENSE_FILES:=COPYING COPYINGv2 COPYING.LESSERv3
+PKG_CPE_ID:=cpe:/a:libidn2_project:libidn2
 
 PKG_SOURCE_URL:=@GNU/libidn
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
index f3559f37e7111d49436ada8e39ce4018cd47ad57..b1260936a29e27f073f9df80d8389b5306e48851 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libiio
-PKG_VERSION:=0.16
+PKG_VERSION:=0.18
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/analogdevicesinc/libiio/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=5eb3ec24342eb01c49235a1d8a053462f930835a3002e687371b680a9bb150f6
+PKG_HASH:=bc2c5299974b65cfe9aa4a06d8c74d7651594e026bce416db48a2c5aa7ba2554
 
 PKG_LICENSE:=LGPL-2.1
 PKG_LICENSE_FILES:=COPYING.txt
@@ -133,7 +133,7 @@ endef
 
 define Package/libiio/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libiio.so* $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libiio.so.* $(1)/usr/lib/
 endef
 
 define Package/iiod/install
index ae33b568ee617be0c5cc0b94995cfeea0ae02721..6eba622d51a936b2b7df840fbbb416a79eb2df5a 100644 (file)
@@ -10,10 +10,10 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=libimobiledevice
 PKG_SOURCE_DATE:=2019-02-16
 PKG_SOURCE_VERSION:=0584aa90c93ff6ce46927b8d67887cb987ab9545
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_MAINTAINER:=
-PKG_LICENSE:=LGPL-2.1+
+PKG_LICENSE:=LGPL-2.1-or-later
 PKG_LICENSE_FILES:=COPYING.LESSER
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_DATE).tar.gz
index fbeb06f2fe976b92bfa6ff820b53dde98cf73406..6eb4e2ee09e2c632b841a80915a7e6c5417f7998 100644 (file)
@@ -8,18 +8,19 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=liblo
-PKG_VERSION:=0.29
-PKG_RELEASE:=1
+PKG_VERSION:=0.30
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/liblo
-PKG_HASH:=ace1b4e234091425c150261d1ca7070cece48ee3c228a5612d048116d864c06a
+PKG_HASH:=30a7c9de49a25ed7f2425a7a7415f5b14739def62431423d3419ea26fb978d1b
 
-PKG_LICENSE:=LGPL-2.1+
+PKG_MAINTAINER:=
+PKG_LICENSE:=LGPL-2.1-or-later
 PKG_LICENSE_FILES:=COPYING
-PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org>
 
 PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -44,8 +45,12 @@ $(call Package/liblo/Default)
   DEPENDS:= +liblo
 endef
 
-TARGET_CFLAGS += \
-       -Wno-error=maybe-uninitialized \
+CONFIGURE_ARGS += \
+       $(if $(CONFIG_IPV6),--enable,--disable)-ipv6 \
+       --enable-threads \
+       --disable-examples \
+       --disable-network-tests \
+       --disable-tests
 
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include
diff --git a/libs/liblo/patches/001-fix-musl-include.patch b/libs/liblo/patches/001-fix-musl-include.patch
deleted file mode 100644 (file)
index f974bd3..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/src/server.c
-+++ b/src/server.c
-@@ -48,7 +48,7 @@
- #include <netdb.h>
- #include <sys/socket.h>
- #ifdef HAVE_POLL
--#include <sys/poll.h>
-+#include <poll.h>
- #endif
- #include <sys/un.h>
- #include <arpa/inet.h>
diff --git a/libs/liblo/patches/010-index.patch b/libs/liblo/patches/010-index.patch
new file mode 100644 (file)
index 0000000..22dc433
--- /dev/null
@@ -0,0 +1,15 @@
+--- a/src/server.c
++++ b/src/server.c
+@@ -2006,11 +2006,8 @@ static void dispatch_method(lo_server s, const char *path,
+                     tmp = (char*) malloc(strlen(it->path + len) + 1);
+                     strcpy(tmp, it->path + len);
+-#if defined(WIN32) || defined(_MSC_VER)
+                     sec = strchr(tmp, '/');
+-#else
+-                    sec = index(tmp, '/');
+-#endif
++
+                     if (sec)
+                         *sec = '\0';
+                     slend = sl;
diff --git a/libs/liblo/patches/020-usleep.patch b/libs/liblo/patches/020-usleep.patch
new file mode 100644 (file)
index 0000000..b0bf17f
--- /dev/null
@@ -0,0 +1,20 @@
+--- a/src/tools/oscsendfile.c
++++ b/src/tools/oscsendfile.c
+@@ -354,7 +354,7 @@ int send_file(lo_address target, double speed) {
+             lo_timetag_now(&tt_now);
+             double wait_time = timetag_diff(*tt_last, tt_now);
+             if (wait_time > 0.) {
+-                usleep(wait_time * 1000000);
++                sleep(wait_time);
+             }
+             if (b) {
+                 ret = lo_send_bundle(target, b);
+@@ -376,7 +376,7 @@ int send_file(lo_address target, double speed) {
+         lo_timetag_now(&tt_now);
+         double wait_time = timetag_diff(*tt_last, tt_now);
+         if (wait_time > 0.) {
+-            usleep(wait_time * 1000000);
++            sleep(wait_time);
+         }
+         lo_send_bundle(target, b);
+     }
diff --git a/libs/liblz4/Config.in b/libs/liblz4/Config.in
new file mode 100644 (file)
index 0000000..d66fb7d
--- /dev/null
@@ -0,0 +1,7 @@
+config LZ4_OPTIMIZE_SPEED
+       bool "Optimize for speed"
+       depends on PACKAGE_liblz4
+       help
+               This enables additional optimization and
+               increases performance considerably at
+               the expense of binary size.
index 9112a1bc606c41d7182272edf9e822cade1676e5..6f3383825aedfea17335c3ee99d9ce7cad13b621 100644 (file)
@@ -7,30 +7,38 @@
 
 include $(TOPDIR)/rules.mk
 
-# Although liblz4 exports a major.minor.patch version, it isn't always
-# incremented for new releases. Check the NEWS file and instead use a
-# release tag when appropriate. (eg: PKG_VERSION:=r131)
 PKG_NAME:=liblz4
-PKG_VERSION:=v1.7.5
+PKG_VERSION:=1.9.2
 PKG_RELEASE:=1
 
-PKG_LICENSE:=BSD-2-Clause
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/lz4/lz4/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=658ba6191fa44c92280d4aa2c271b0f4fbc0e34d249578dd05e50e76d0e5efcc
+PKG_BUILD_DIR:=$(BUILD_DIR)/lz4-$(PKG_VERSION)
+
 PKG_MAINTAINER:=Darik Horn <dajhorn@vanadac.com>
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_MIRROR_HASH:=afb362b970816e06dac4997d26dd7d2cdb83168510228d174d25b1044b271e18
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_URL:=https://github.com/lz4/lz4.git
-PKG_SOURCE_VERSION:=$(PKG_VERSION)
+PKG_BUILD_PARALLEL:=1
+CMAKE_INSTALL:=1
+CMAKE_SOURCE_SUBDIR:=contrib/cmake_unofficial
 
 include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+define Package/lz4/Default
+  SUBMENU:=Compression
+  URL:=https://www.lz4.org/
+endef
 
 define Package/liblz4
-       SECTION:=libs
-       CATEGORY:=Libraries
-       TITLE:=Extremely fast compression
-       URL:=http://www.lz4.org/
+$(call Package/lz4/Default)
+  SECTION:=libs
+  CATEGORY:=Libraries
+  TITLE:=Extremely fast compression
+  LICENSE:=BSD-2-Clause
+  LICENSE_FILES:=LICENSE lib/LICENSE
+  ABI_VERSION:=$(firstword $(subst .,$(space),$(PKG_VERSION)))
+  MENU:=1
 endef
 
 define Package/liblz4/description
@@ -38,23 +46,45 @@ define Package/liblz4/description
   even faster decoder. This package provides the liblz4 shared library.
 endef
 
-TARGET_CFLAGS += $(FPIC)
+define Package/liblz4/config
+       source "$(SOURCE)/Config.in"
+endef
 
-define Build/Compile
-       $(MAKE) -C "$(PKG_BUILD_DIR)/lib" $(MAKE_INSTALL_FLAGS) \
-         CC="$(TARGET_CC)" \
-         CFLAGS="$(TARGET_CFLAGS)" \
-         PREFIX="$(CONFIGURE_PREFIX)" \
-         install
+define Package/lz4
+$(call Package/lz4/Default)
+  SECTION:=utils
+  CATEGORY:=Utilities
+  TITLE:=Extremely fast compression
+  LICENSE:=GPL-2.0-or-later
+  LICENSE_FILES:=LICENSE programs/COPYING
+  DEPENDS:=+liblz4
 endef
 
-define Build/InstallDev
-       $(CP) $(PKG_INSTALL_DIR)/* $(1)/
+define Package/lz4/description
+  LZ4 - Fast real-time compression algorithm.
+  This package provides the lz4 binaries.
 endef
 
+CMAKE_OPTIONS += \
+       -DCMAKE_INSTALL_MANDIR=/dev/null \
+       -DLZ4_BUILD_LEGACY_LZ4C=OFF
+
+ifeq ($(CONFIG_LZ4_OPTIMIZE_SPEED),y)
+       TARGET_CFLAGS := $(filter-out -O%,$(TARGET_CFLAGS)) -O3
+endif
+
+TARGET_CFLAGS += $(FPIC) -ffunction-sections -fdata-sections -flto
+TARGET_LDFLAGS += -Wl,--gc-sections
+
 define Package/liblz4/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblz4.so* $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblz4.so.$(ABI_VERSION)* $(1)/usr/lib/
+endef
+
+define Package/lz4/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/{lz4,lz4cat,unlz4} $(1)/usr/bin/
 endef
 
 $(eval $(call BuildPackage,liblz4))
+$(eval $(call BuildPackage,lz4))
diff --git a/libs/liblz4/patches/010-utime.patch b/libs/liblz4/patches/010-utime.patch
new file mode 100644 (file)
index 0000000..6c21c33
--- /dev/null
@@ -0,0 +1,72 @@
+From e9d5a3cbbb47eb0f785a409d836225b592b250f3 Mon Sep 17 00:00:00 2001
+From: Rosen Penev <rosenp@gmail.com>
+Date: Tue, 30 Jul 2019 22:13:51 -0700
+Subject: [PATCH] util.h: Remove deprecated utime for non-Windows
+
+utime was deprecated in POSIX 2008.
+---
+ programs/platform.h |  2 +-
+ programs/util.h     | 17 ++++++++++++++++-
+ 2 files changed, 17 insertions(+), 2 deletions(-)
+
+diff --git a/programs/platform.h b/programs/platform.h
+index c0b38402..7e2cb58f 100644
+--- a/programs/platform.h
++++ b/programs/platform.h
+@@ -86,7 +86,7 @@ extern "C" {
+ #  else
+ #    if defined(__linux__) || defined(__linux)
+ #      ifndef _POSIX_C_SOURCE
+-#        define _POSIX_C_SOURCE 200112L  /* use feature test macro */
++#        define _POSIX_C_SOURCE 200809L  /* use feature test macro */
+ #      endif
+ #    endif
+ #    include <unistd.h>  /* declares _POSIX_VERSION */
+diff --git a/programs/util.h b/programs/util.h
+index 1dd515ce..112dddbf 100644
+--- a/programs/util.h
++++ b/programs/util.h
+@@ -37,12 +37,17 @@ extern "C" {
+ #include <assert.h>
+ #include <sys/types.h>    /* stat, utime */
+ #include <sys/stat.h>     /* stat */
+-#if defined(_MSC_VER)
++#if defined(_WIN32)
+ #  include <sys/utime.h>  /* utime */
+ #  include <io.h>         /* _chmod */
+ #else
+ #  include <unistd.h>     /* chown, stat */
++#if PLATFORM_POSIX_VERSION < 200809L
+ #  include <utime.h>      /* utime */
++#else
++#  include <fcntl.h>      /* AT_FDCWD */
++#  include <sys/stat.h>   /* for utimensat */
++#endif
+ #endif
+ #include <time.h>         /* time */
+ #include <limits.h>       /* INT_MAX */
+@@ -287,14 +292,24 @@ UTIL_STATIC int UTIL_isRegFile(const char* infilename);
+ UTIL_STATIC int UTIL_setFileStat(const char *filename, stat_t *statbuf)
+ {
+     int res = 0;
++#if defined(_WIN32) || (PLATFORM_POSIX_VERSION < 200809L)
+     struct utimbuf timebuf;
++#else
++    struct timespec timebuf[2] = {};
++#endif
+     if (!UTIL_isRegFile(filename))
+         return -1;
++#if defined(_WIN32) || (PLATFORM_POSIX_VERSION < 200809L)
+     timebuf.actime = time(NULL);
+     timebuf.modtime = statbuf->st_mtime;
+     res += utime(filename, &timebuf);  /* set access and modification times */
++#else
++    timebuf[0].tv_nsec = UTIME_NOW;
++    timebuf[1].tv_sec = statbuf->st_mtime;
++    res += utimensat(AT_FDCWD, filename, timebuf, 0);  /* set access and modification times */
++#endif
+ #if !defined(_WIN32)
+     res += chown(filename, statbuf->st_uid, statbuf->st_gid);  /* Copy ownership */
index b18f8735c0b33fbfb2e7a7b99a7fcf496b217248..a160620ce67244a1cc98cf92f56e2e201bb6d202 100644 (file)
@@ -15,6 +15,7 @@ PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
 
 PKG_LICENSE:=LGPLv2.1
 PKG_LICENSE_FILES:=COPYING.LIB
+PKG_CPE_ID:=cpe:/a:mcrypt:libmcrypt
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=@SF/mcrypt
index fa24a5c731f8bf52bc1ad6d4d9ee1477a1d10957..49000a632218a4b33bc55600ad189c0c517fbde1 100644 (file)
@@ -16,6 +16,7 @@ PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
 
 PKG_LICENSE:=LGPLv2.1
 PKG_LICENSE_FILES:=COPYING.LIB
+PKG_CPE_ID:=cpe:/a:libmms_project:libmms
 
 PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
index bfa1d73e14baf75b2cc5f62fee1e9e07b7b6507d..4ae5bb53aab24cb44b2268faaa2927a7962ef5c6 100644 (file)
@@ -8,17 +8,17 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libmodbus
-PKG_VERSION:=3.1.4
-PKG_RELEASE:=2
+PKG_VERSION:=3.1.6
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://libmodbus.org/releases
-PKG_HASH:=c8c862b0e9a7ba699a49bc98f62bdffdfafd53a5716c0e162696b4bf108d3637
+PKG_HASH:=d7d9fa94a16edb094e5fdf5d87ae17a0dc3f3e3d687fead81835d9572cf87c16
 
 PKG_MAINTAINER:=Michael Heimpold <mhei@heimpold.de>
 
-PKG_LICENSE:=GPL-3.0+ LGPL-2.1+
-PKG_LICENSE_FILES:=COPYING COPYING.LESSER
+PKG_LICENSE:=LGPL-2.1-or-later
+PKG_LICENSE_FILES:=COPYING.LESSER
 
 PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
@@ -50,7 +50,7 @@ endef
 
 define Package/libmodbus/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmodbus.so* $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmodbus.so.* $(1)/usr/lib/
 endef
 
 $(eval $(call BuildPackage,libmodbus))
diff --git a/libs/libmodbus/patches/0001-Fixed-MODBUS_GET_-macros-in-case-of-negative-values.patch b/libs/libmodbus/patches/0001-Fixed-MODBUS_GET_-macros-in-case-of-negative-values.patch
new file mode 100644 (file)
index 0000000..1ce28ff
--- /dev/null
@@ -0,0 +1,35 @@
+From f1eb4bc7ccb09cd8d19ab641ee37637f8c34d16d Mon Sep 17 00:00:00 2001
+From: i-ky <gl.ivanovsky@gmail.com>
+Date: Tue, 10 Jul 2018 15:58:45 +0300
+Subject: [PATCH] Fixed MODBUS_GET_* macros in case of negative values
+
+In case resulting value should be negative it is incorrect to use '+' operator to construct it from pieces, because highest bytes will result in negative number after bitwise shift while others will stay positive. Replacing addition with '|' should solve the issue.
+---
+ src/modbus.h | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/src/modbus.h b/src/modbus.h
+index f6e9a5f..c63f5ce 100644
+--- a/src/modbus.h
++++ b/src/modbus.h
+@@ -245,12 +245,12 @@ MODBUS_API int modbus_reply_exception(modbus_t *ctx, const uint8_t *req,
+ #define MODBUS_GET_HIGH_BYTE(data) (((data) >> 8) & 0xFF)
+ #define MODBUS_GET_LOW_BYTE(data) ((data) & 0xFF)
+ #define MODBUS_GET_INT64_FROM_INT16(tab_int16, index) \
+-    (((int64_t)tab_int16[(index)    ] << 48) + \
+-     ((int64_t)tab_int16[(index) + 1] << 32) + \
+-     ((int64_t)tab_int16[(index) + 2] << 16) + \
++    (((int64_t)tab_int16[(index)    ] << 48) | \
++     ((int64_t)tab_int16[(index) + 1] << 32) | \
++     ((int64_t)tab_int16[(index) + 2] << 16) | \
+       (int64_t)tab_int16[(index) + 3])
+-#define MODBUS_GET_INT32_FROM_INT16(tab_int16, index) ((tab_int16[(index)] << 16) + tab_int16[(index) + 1])
+-#define MODBUS_GET_INT16_FROM_INT8(tab_int8, index) ((tab_int8[(index)] << 8) + tab_int8[(index) + 1])
++#define MODBUS_GET_INT32_FROM_INT16(tab_int16, index) ((tab_int16[(index)] << 16) | tab_int16[(index) + 1])
++#define MODBUS_GET_INT16_FROM_INT8(tab_int8, index) ((tab_int8[(index)] << 8) | tab_int8[(index) + 1])
+ #define MODBUS_SET_INT16_TO_INT8(tab_int8, index, value) \
+     do { \
+         tab_int8[(index)] = (value) >> 8;  \
+-- 
+2.17.1
+
diff --git a/libs/libmodbus/patches/0001-Only-set-SER_RS485_ENABLED-bit-of-existing-RS485-set.patch b/libs/libmodbus/patches/0001-Only-set-SER_RS485_ENABLED-bit-of-existing-RS485-set.patch
deleted file mode 100644 (file)
index d24ef27..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-From 1c5d969f46ccd5333f602dfbe2b0a1295650b9b0 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?St=C3=A9phane=20Raimbault?= <stephane.raimbault@gmail.com>
-Date: Wed, 25 Oct 2017 20:35:47 +0200
-Subject: [PATCH 1/2] Only set SER_RS485_ENABLED bit of existing RS485 settings
-
-Thanks to @JCWren
----
- src/modbus-rtu.c | 10 +++++++++-
- 1 file changed, 9 insertions(+), 1 deletion(-)
-
-diff --git a/src/modbus-rtu.c b/src/modbus-rtu.c
-index 8d9f386..f2911d6 100644
---- a/src/modbus-rtu.c
-+++ b/src/modbus-rtu.c
-@@ -909,9 +909,13 @@ int modbus_rtu_set_serial_mode(modbus_t *ctx, int mode)
- #if HAVE_DECL_TIOCSRS485
-         modbus_rtu_t *ctx_rtu = ctx->backend_data;
-         struct serial_rs485 rs485conf;
--        memset(&rs485conf, 0x0, sizeof(struct serial_rs485));
-         if (mode == MODBUS_RTU_RS485) {
-+            // Get
-+            if (ioctl(ctx->s, TIOCGRS485, &rs485conf) < 0) {
-+                return -1;
-+            }
-+            // Set
-             rs485conf.flags = SER_RS485_ENABLED;
-             if (ioctl(ctx->s, TIOCSRS485, &rs485conf) < 0) {
-                 return -1;
-@@ -923,6 +927,10 @@ int modbus_rtu_set_serial_mode(modbus_t *ctx, int mode)
-             /* Turn off RS485 mode only if required */
-             if (ctx_rtu->serial_mode == MODBUS_RTU_RS485) {
-                 /* The ioctl call is avoided because it can fail on some RS232 ports */
-+                if (ioctl(ctx->s, TIOCGRS485, &rs485conf) < 0) {
-+                    return -1;
-+                }
-+                rs485conf.flags &= ~SER_RS485_ENABLED;
-                 if (ioctl(ctx->s, TIOCSRS485, &rs485conf) < 0) {
-                     return -1;
-                 }
--- 
-2.21.0
-
diff --git a/libs/libmodbus/patches/0002-Oops-fix-OR-on-RS485-settings-1c5d969.patch b/libs/libmodbus/patches/0002-Oops-fix-OR-on-RS485-settings-1c5d969.patch
deleted file mode 100644 (file)
index 3742457..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-From 91a1d74f76c64e7b35bfb10114e1a4a6ff351656 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?St=C3=A9phane=20Raimbault?= <stephane.raimbault@gmail.com>
-Date: Thu, 26 Oct 2017 11:10:31 +0200
-Subject: [PATCH 2/2] Oops fix OR on RS485 settings (1c5d969)
-
----
- src/modbus-rtu.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/modbus-rtu.c b/src/modbus-rtu.c
-index f2911d6..190298e 100644
---- a/src/modbus-rtu.c
-+++ b/src/modbus-rtu.c
-@@ -916,7 +916,7 @@ int modbus_rtu_set_serial_mode(modbus_t *ctx, int mode)
-                 return -1;
-             }
-             // Set
--            rs485conf.flags = SER_RS485_ENABLED;
-+            rs485conf.flags |= SER_RS485_ENABLED;
-             if (ioctl(ctx->s, TIOCSRS485, &rs485conf) < 0) {
-                 return -1;
-             }
--- 
-2.21.0
-
index a5d128552ca8bccfea84563d72e4efbb297ef739..bff939a4e52a34ea986d94b0ed3505dcef76f3f2 100644 (file)
@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libmstch
 PKG_VERSION:=1.0.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/no1msd/mstch/tar.gz/$(PKG_VERSION)?
@@ -10,36 +10,32 @@ PKG_HASH:=811ed61400d4e9d4f9ae0f7679a2ffd590f0b3c06b16f2798e1f89ab917cba6c
 PKG_BUILD_DIR:=$(BUILD_DIR)/mstch-$(PKG_VERSION)
 HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/mstch-$(PKG_VERSION)
 
+PKG_MAINTAINER:=Amol Bhave <ambhave@fb.com>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
 
-HOST_BUILD_DEPENDS:=boost boost/host
-
-PKG_BUILD_DEPENDS:=boost
+HOST_BUILD_DEPENDS:=boost/host
+PKG_BUILD_PARALLEL:=1
+CMAKE_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/host-build.mk
 include $(INCLUDE_DIR)/cmake.mk
 
-HOST_BUILD_PREFIX:=$(STAGING_DIR_HOST)
-
-PKG_BUILD_PARALLEL:=1
-CMAKE_INSTALL:=1
-CMAKE_OPTIONS:= \
-       -DCMAKE_POSITION_INDEPENDENT_CODE=True
-
 define Package/libmstch
        SECTION:=libs
        CATEGORY:=Libraries
        TITLE:=Complete implementation of {{mustache}} templates using modern C++
        DEPENDS:=+boost +boost-container
        URL:=https://github.com/no1msd/mstch
-       MAINTAINER:=Amol Bhave <ambhave@fb.com>
 endef
 
 define Package/libmstch/description
        mstch is a complete implementation of {{mustache}} templates using modern C++
 endef
 
+CMAKE_OPTIONS += \
+       -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE
+
 $(eval $(call BuildPackage,libmstch))
 $(eval $(call HostBuild))
index b7b52b4a60a98fbaaa4077a2009a689267328550..6e2dce29d38426412e5282efaa5296c407332d9c 100644 (file)
@@ -9,22 +9,25 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libnatpmp
 PKG_VERSION:=20150609
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://miniupnp.tuxfamily.org/files
 PKG_HASH:=e1aa9c4c4219bc06943d6b2130f664daee213fb262fcb94dd355815b8f4536b0
-PKG_MAINTAINER:=Hauke Mehrtens <hauke@hauke-m.de>
-PKG_LICENSE:=BSD-3c
+
+PKG_MAINTAINER:=Rosen Penev <rosenp@gmail.com>
+PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=LICENSE
 
-PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
+CMAKE_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
 
 define Package/libnatpmp/Default
   TITLE:=NAT Port Mapping Protocol (NAT-PMP)
-  URL:=http://miniupnp.free.fr/libnatpmp.html
+  URL:=https://miniupnp.tuxfamily.org/libnatpmp.html
 endef
 
 define Package/libnatpmp/Default/description
@@ -39,6 +42,7 @@ define Package/libnatpmp
   SECTION:=libs
   CATEGORY:=Libraries
   TITLE+= library
+  ABI_VERSION:=1
 endef
 
 define Package/libnatpmp/description
@@ -60,22 +64,9 @@ define Package/natpmpc/description
   This package contains the natpmp client.
 endef
 
-MAKE_FLAGS += \
-       COPTS="$(TARGET_CFLAGS)" \
-       PREFIX="$(PKG_INSTALL_DIR)" \
-       OS="Linux"
-
-define Build/InstallDev
-       $(INSTALL_DIR) $(1)/usr/include
-       $(CP) $(PKG_INSTALL_DIR)/usr/include/declspec.h $(1)/usr/include/
-       $(CP) $(PKG_INSTALL_DIR)/usr/include/natpmp.h $(1)/usr/include/
-       $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnatpmp*.{so*,a} $(1)/usr/lib/
-endef
-
 define Package/libnatpmp/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libnatpmp.so.* $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnatpmp.so.* $(1)/usr/lib/
 endef
 
 define Package/natpmpc/install
diff --git a/libs/libnatpmp/patches/001-install_declspec.patch b/libs/libnatpmp/patches/001-install_declspec.patch
deleted file mode 100644 (file)
index d79dd3f..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/Makefile
-+++ b/Makefile
-@@ -56,7 +56,7 @@ else
- endif
- endif
--HEADERS = natpmp.h
-+HEADERS = natpmp.h declspec.h
- EXECUTABLES = testgetgateway natpmpc-shared natpmpc-static
diff --git a/libs/libnatpmp/patches/010-cmake.patch b/libs/libnatpmp/patches/010-cmake.patch
new file mode 100644 (file)
index 0000000..c3909ed
--- /dev/null
@@ -0,0 +1,53 @@
+--- /dev/null
++++ b/CMakeLists.txt
+@@ -0,0 +1,50 @@
++cmake_minimum_required(VERSION 2.8.12)
++
++if(POLICY CMP0048)
++      cmake_policy(SET CMP0048 NEW)
++endif()
++
++project(natpmp C)
++
++set (NATPMP_VERSION 20150609)
++set (NATPMP_API_VERSION 1)
++
++set (NATPMP_SOURCES
++        natpmp.c
++        getgateway.c
++)
++
++if (WIN32)
++    set (NATPMP_SOURCES ${NATPMP_SOURCES} wingettimeofday.c)
++endif (WIN32)
++
++# Library itself
++add_library(natpmp SHARED ${NATPMP_SOURCES})
++set_target_properties (natpmp PROPERTIES OUTPUT_NAME "natpmp")
++set_target_properties (natpmp PROPERTIES VERSION ${NATPMP_VERSION})
++set_target_properties (natpmp PROPERTIES SOVERSION ${NATPMP_API_VERSION})
++target_compile_definitions(natpmp PRIVATE -DENABLE_STRNATPMPERR)
++target_include_directories(natpmp PUBLIC ${CMAKE_CURRENT_LIST_DIR})
++
++if (WIN32)
++      target_link_libraries(natpmp PUBLIC ws2_32 Iphlpapi)
++      target_compile_definitions(natpmp PUBLIC -DNATPMP_STATICLIB)
++endif (WIN32)
++
++install(TARGETS natpmp
++      RUNTIME DESTINATION bin
++      LIBRARY DESTINATION lib${LIB_SUFFIX}
++      ARCHIVE DESTINATION lib${LIB_SUFFIX})
++
++# Executables
++add_executable(natpmpc natpmpc.c)
++target_link_libraries(natpmpc natpmp)
++
++install(FILES natpmpc DESTINATION bin)
++
++add_executable(testgetgateway
++      testgetgateway.c
++      getgateway.c)
++target_link_libraries(testgetgateway natpmp)
++
++install(FILES natpmp.h DESTINATION include)
index 25f10ea5aa506d3403173ee3fd8fea067b65baf9..e6830314ab692fbefcca87179691916099db794b 100644 (file)
@@ -9,19 +9,18 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libnetconf2
 PKG_VERSION:=0.12-r1
-PKG_RELEASE:=2
-
-PKG_LICENSE:=BSD-3-Clause
-PKG_MAINTAINER:=Mislav Novakovic <mislav.novakovic@sartura.hr>
+PKG_RELEASE:=4
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/CESNET/libnetconf2/tar.gz/v$(PKG_VERSION)?
 PKG_HASH:=86269d3f1bc85bb17d8823d214f9a676ee3b14ee18a0b87a230380df8503e8f5
 
-CMAKE_INSTALL:=1
+PKG_MAINTAINER:=Mislav Novakovic <mislav.novakovic@sartura.hr>
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=LICENSE
 
 PKG_BUILD_PARALLEL:=1
-PKG_INSTALL:=1
+CMAKE_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/cmake.mk
@@ -30,7 +29,7 @@ define Package/libnetconf2
   SECTION:=libs
   CATEGORY:=Libraries
   TITLE:=NETCONF library
-  URL:=$(PKG_SOURCE_URL)
+  URL:=https://github.com/CESNET/libnetconf2
   DEPENDS:= +libyang +libssh +libopenssl +libpthread
 endef
 
@@ -45,21 +44,6 @@ CMAKE_OPTIONS += \
        -DCMAKE_INSTALL_PREFIX:PATH=/usr \
        -DCMAKE_BUILD_TYPE:STRING=Release
 
-define Build/InstallDev
-       $(INSTALL_DIR) $(1)/usr/include/libnetconf2
-       $(CP) $(PKG_INSTALL_DIR)/usr/include/libnetconf2/*.h $(1)/usr/include/libnetconf2/
-       $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
-
-       $(INSTALL_DIR) $(1)/usr/lib
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libnetconf2.so* $(1)/usr/lib/
-
-       $(INSTALL_DIR) $(1)/usr/include/libnetconf2
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/include/libnetconf2/* $(1)/usr/include/libnetconf2/
-
-       $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
-       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libnetconf2.pc $(1)/usr/lib/pkgconfig/
-endef
-
 define Package/libnetconf2/install
        $(INSTALL_DIR) $(1)/usr/lib
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnetconf2.so* $(1)/usr/lib/
diff --git a/libs/libnetconf2/patches/020-openssl-deprecated.patch b/libs/libnetconf2/patches/020-openssl-deprecated.patch
new file mode 100644 (file)
index 0000000..a823428
--- /dev/null
@@ -0,0 +1,160 @@
+--- a/src/session.c
++++ b/src/session.c
+@@ -1372,11 +1372,11 @@ tls_thread_id_func(CRYPTO_THREADID *tid)
+ static void
+ nc_tls_init(void)
+ {
++#if OPENSSL_VERSION_NUMBER < 0x10100000L // < 1.1.0
+     SSL_load_error_strings();
+     ERR_load_BIO_strings();
+     SSL_library_init();
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L // < 1.1.0
+     int i;
+     tls_locks = malloc(CRYPTO_num_locks() * sizeof *tls_locks);
+@@ -1400,6 +1400,7 @@ nc_tls_init(void)
+ static void
+ nc_tls_destroy(void)
+ {
++#if OPENSSL_VERSION_NUMBER < 0x10100000L // < 1.1.0
+     FIPS_mode_set(0);
+     CRYPTO_cleanup_all_ex_data();
+     nc_thread_destroy();
+@@ -1411,7 +1412,6 @@ nc_tls_destroy(void)
+     SSL_COMP_free_compression_methods();
+ #endif
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L // < 1.1.0
+     int i;
+     CRYPTO_THREADID_set_callback(NULL);
+@@ -1434,13 +1434,13 @@ nc_tls_destroy(void)
+ static void
+ nc_ssh_tls_init(void)
+ {
++#if OPENSSL_VERSION_NUMBER < 0x10100000L // < 1.1.0
+     SSL_load_error_strings();
+     ERR_load_BIO_strings();
+     SSL_library_init();
+     nc_ssh_init();
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L // < 1.1.0
+     CRYPTO_set_dynlock_create_callback(tls_dyn_create_func);
+     CRYPTO_set_dynlock_lock_callback(tls_dyn_lock_func);
+     CRYPTO_set_dynlock_destroy_callback(tls_dyn_destroy_func);
+@@ -1450,6 +1450,7 @@ nc_ssh_tls_init(void)
+ static void
+ nc_ssh_tls_destroy(void)
+ {
++#if OPENSSL_VERSION_NUMBER < 0x10100000L // < 1.1.0
+     ERR_free_strings();
+ #if OPENSSL_VERSION_NUMBER < 0x10002000L // < 1.0.2
+     sk_SSL_COMP_free(SSL_COMP_get_compression_methods());
+@@ -1459,7 +1460,6 @@ nc_ssh_tls_destroy(void)
+     nc_ssh_destroy();
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L // < 1.1.0
+     CRYPTO_set_dynlock_create_callback(NULL);
+     CRYPTO_set_dynlock_lock_callback(NULL);
+     CRYPTO_set_dynlock_destroy_callback(NULL);
+--- a/src/session_client_tls.c
++++ b/src/session_client_tls.c
+@@ -29,6 +29,10 @@
+ #include "session_client_ch.h"
+ #include "libnetconf.h"
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#define X509_STORE_CTX_get_by_subject X509_STORE_get_by_subject
++#endif
++
+ struct nc_client_context *nc_client_context_location(void);
+ int nc_session_new_ctx( struct nc_session *session, struct ly_ctx *ctx);
+@@ -74,7 +78,7 @@ tlsauth_verify_callback(int preverify_ok, X509_STORE_CTX *x509_ctx)
+     store_ctx = X509_STORE_CTX_new();
+     obj = X509_OBJECT_new();
+     X509_STORE_CTX_init(store_ctx, opts->crl_store, NULL, NULL);
+-    rc = X509_STORE_get_by_subject(store_ctx, X509_LU_CRL, subject, obj);
++    rc = X509_STORE_CTX_get_by_subject(store_ctx, X509_LU_CRL, subject, obj);
+     X509_STORE_CTX_free(store_ctx);
+     crl = X509_OBJECT_get0_X509_CRL(obj);
+     if (rc > 0 && crl) {
+@@ -113,7 +117,7 @@ tlsauth_verify_callback(int preverify_ok, X509_STORE_CTX *x509_ctx)
+     store_ctx = X509_STORE_CTX_new();
+     obj = X509_OBJECT_new();
+     X509_STORE_CTX_init(store_ctx, opts->crl_store, NULL, NULL);
+-    rc = X509_STORE_get_by_subject(store_ctx, X509_LU_CRL, issuer, obj);
++    rc = X509_STORE_CTX_get_by_subject(store_ctx, X509_LU_CRL, issuer, obj);
+     X509_STORE_CTX_free(store_ctx);
+     crl = X509_OBJECT_get0_X509_CRL(obj);
+     if (rc > 0 && crl) {
+@@ -169,7 +173,7 @@ tlsauth_verify_callback(int preverify_ok, X509_STORE_CTX *x509_ctx)
+      * the current certificate in order to verify it's integrity */
+     memset((char *)&obj, 0, sizeof obj);
+     X509_STORE_CTX_init(&store_ctx, opts->crl_store, NULL, NULL);
+-    rc = X509_STORE_get_by_subject(&store_ctx, X509_LU_CRL, subject, &obj);
++    rc = X509_STORE_CTX_get_by_subject(&store_ctx, X509_LU_CRL, subject, &obj);
+     X509_STORE_CTX_cleanup(&store_ctx);
+     crl = obj.data.crl;
+     if (rc > 0 && crl) {
+@@ -207,7 +211,7 @@ tlsauth_verify_callback(int preverify_ok, X509_STORE_CTX *x509_ctx)
+      * the current certificate in order to check for revocation */
+     memset((char *)&obj, 0, sizeof obj);
+     X509_STORE_CTX_init(&store_ctx, opts->crl_store, NULL, NULL);
+-    rc = X509_STORE_get_by_subject(&store_ctx, X509_LU_CRL, issuer, &obj);
++    rc = X509_STORE_CTX_get_by_subject(&store_ctx, X509_LU_CRL, issuer, &obj);
+     X509_STORE_CTX_cleanup(&store_ctx);
+     crl = obj.data.crl;
+     if (rc > 0 && crl) {
+--- a/src/session_server_tls.c
++++ b/src/session_server_tls.c
+@@ -28,6 +28,10 @@
+ #include "session_server_ch.h"
+ #include "libnetconf.h"
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#define X509_STORE_CTX_get_by_subject X509_STORE_get_by_subject
++#endif
++
+ struct nc_server_tls_opts tls_ch_opts;
+ pthread_mutex_t tls_ch_opts_lock = PTHREAD_MUTEX_INITIALIZER;
+ extern struct nc_server_opts server_opts;
+@@ -563,7 +567,7 @@ nc_tlsclb_verify(int preverify_ok, X509_STORE_CTX *x509_ctx)
+         store_ctx = X509_STORE_CTX_new();
+         obj = X509_OBJECT_new();
+         X509_STORE_CTX_init(store_ctx, opts->crl_store, NULL, NULL);
+-        rc = X509_STORE_get_by_subject(store_ctx, X509_LU_CRL, subject, obj);
++        rc = X509_STORE_CTX_get_by_subject(store_ctx, X509_LU_CRL, subject, obj);
+         X509_STORE_CTX_free(store_ctx);
+         crl = X509_OBJECT_get0_X509_CRL(obj);
+         if (rc > 0 && crl) {
+@@ -616,7 +620,7 @@ nc_tlsclb_verify(int preverify_ok, X509_STORE_CTX *x509_ctx)
+         store_ctx = X509_STORE_CTX_new();
+         obj = X509_OBJECT_new();
+         X509_STORE_CTX_init(store_ctx, opts->crl_store, NULL, NULL);
+-        rc = X509_STORE_get_by_subject(store_ctx, X509_LU_CRL, issuer, obj);
++        rc = X509_STORE_CTX_get_by_subject(store_ctx, X509_LU_CRL, issuer, obj);
+         X509_STORE_CTX_free(store_ctx);
+         crl = X509_OBJECT_get0_X509_CRL(obj);
+         if (rc > 0 && crl) {
+@@ -776,7 +780,7 @@ nc_tlsclb_verify(int preverify_ok, X509_STORE_CTX *x509_ctx)
+          * the current certificate in order to verify it's integrity */
+         memset((char *)&obj, 0, sizeof(obj));
+         X509_STORE_CTX_init(&store_ctx, opts->crl_store, NULL, NULL);
+-        rc = X509_STORE_get_by_subject(&store_ctx, X509_LU_CRL, subject, &obj);
++        rc = X509_STORE_CTX_get_by_subject(&store_ctx, X509_LU_CRL, subject, &obj);
+         X509_STORE_CTX_cleanup(&store_ctx);
+         crl = obj.data.crl;
+         if (rc > 0 && crl) {
+@@ -828,7 +832,7 @@ nc_tlsclb_verify(int preverify_ok, X509_STORE_CTX *x509_ctx)
+          * the current certificate in order to check for revocation */
+         memset((char *)&obj, 0, sizeof(obj));
+         X509_STORE_CTX_init(&store_ctx, opts->crl_store, NULL, NULL);
+-        rc = X509_STORE_get_by_subject(&store_ctx, X509_LU_CRL, issuer, &obj);
++        rc = X509_STORE_CTX_get_by_subject(&store_ctx, X509_LU_CRL, issuer, &obj);
+         X509_STORE_CTX_cleanup(&store_ctx);
+         crl = obj.data.crl;
+         if (rc > 0 && crl) {
index ad29c1c99d93e64b449049d0209689432463b3a8..272295eec786974035a67bf90728877a86352d3c 100644 (file)
@@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libnetfilter_acct
 PKG_VERSION:=1.0.3
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://netfilter.org/projects/libnetfilter_acct/files
 PKG_HASH:=4250ceef3efe2034f4ac05906c3ee427db31b9b0a2df41b2744f4bf79a959a1a
 
-PKG_LICENSE:=LGPL-2.1+
+PKG_LICENSE:=LGPL-2.1-or-later
 PKG_LICENSE_FILES:=COPYING
 PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org>
 
index cc363e0515389fe1de949fb6c0ae8554dee4f2f5..91dfe8e1c3296a1c0d66d08298c8d3d81ff4cc69 100644 (file)
@@ -8,20 +8,20 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libogg
-PKG_VERSION:=1.3.3
+PKG_VERSION:=1.3.4
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://downloads.xiph.org/releases/ogg/
-PKG_HASH:=4f3fc6178a533d392064f14776b23c397ed4b9f48f5de297aba73b643f955c08
-PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
+PKG_HASH:=c163bc12bc300c401b6aa35907ac682671ea376f13ae0969a220f7ddf71893fe
 
+PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
 PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=COPYING
 
 PKG_FIXUP:=autoreconf
-
 PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -29,7 +29,8 @@ define Package/libogg
   SECTION:=libs
   CATEGORY:=Libraries
   TITLE:=libogg
-  URL:=http://xiph.org/ogg/
+  URL:=https://xiph.org/ogg/
+  ABI_VERSION:=0
 endef
 
 define Package/libogg/description
@@ -40,6 +41,8 @@ possible, as well as mixing several sepearate, concurrent media
 streams into a single physical bitstream.
 endef
 
+TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
+
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include/ogg/
        $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/ogg/* $(1)/usr/include/ogg/
@@ -53,7 +56,7 @@ endef
 
 define Package/libogg/install
        $(INSTALL_DIR) $(1)/usr/lib/
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so.* $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libogg.so.* $(1)/usr/lib/
 endef
 
 $(eval $(call BuildPackage,libogg))
index a04cbafc974de9de29c0128b64f27d0ece0f3d89..8ef66bc7d004f20d70bdc7c3597bb8d51159b139 100644 (file)
@@ -9,9 +9,9 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=liboping
 PKG_VERSION:=1.10.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
-PKG_LICENSE:=LGPL-2.1+
+PKG_LICENSE:=LGPL-2.1-or-later
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://noping.cc/files
index 9c6eda9988535e01f9573687b828d8ddf04d7a5a..f575b2fa4f89f617eb6f12d64311249a368c51a8 100644 (file)
@@ -9,14 +9,14 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libp11
 PKG_VERSION:=0.4.10
-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
 PKG_HASH:=639ea43c3341e267214b712e1e5e12397fd2d350899e673dd1220f3c6b8e3db4
 
 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
-PKG_LICENSE:=LGPL-2.1+
+PKG_LICENSE:=LGPL-2.1-or-later
 PKG_LICENSE_FILES:=COPYING
 
 PKG_BUILD_PARALLEL:=1
index 5a72b6bea606024c01e27c85a0097da62262bf51..77e04db347a7d02f1f9c31a8644bb7d3e5899933 100644 (file)
@@ -2,18 +2,21 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libpbc
 PKG_VERSION:=0.5.14
-PKG_RELEASE:=1
-PKG_HASH:=772527404117587560080241cedaf441e5cac3269009cdde4c588a1dce4c23d2
+PKG_RELEASE:=2
 
 PKG_SOURCE:=pbc-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://crypto.stanford.edu/pbc/files/
+PKG_HASH:=772527404117587560080241cedaf441e5cac3269009cdde4c588a1dce4c23d2
 PKG_BUILD_DIR:=$(BUILD_DIR)/pbc-$(PKG_VERSION)
-PKG_INSTALL:=1
 
 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
-PKG_LICENSE:=LGPL-3.0+
+PKG_LICENSE:=LGPL-3.0-or-later
 PKG_LICENSE_FILES:=COPYING
 
+PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
+
 include $(INCLUDE_DIR)/package.mk
 
 define Package/libpbc
diff --git a/libs/libpbc/patches/010-pass-cflags.patch b/libs/libpbc/patches/010-pass-cflags.patch
new file mode 100644 (file)
index 0000000..078ff83
--- /dev/null
@@ -0,0 +1,10 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -10,7 +10,6 @@ AC_CONFIG_SRCDIR([./])
+ LT_INIT
+ #AC_CANONICAL_HOST
+-CFLAGS=
+ default_fink_path=/sw
+ case $host_os in
+      darwin*) 
index c69c73317e7adaab86019ab78d891f0fd3805a25..846b6ae44acd43aff6b3e32391c0631d93abfdab 100644 (file)
@@ -9,10 +9,10 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libplist
 PKG_VERSION:=2.0.0
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_MAINTAINER:=Lukasz Baj <l.baj@radytek.com>
-PKG_LICENSE:=LGPL-2.1+
+PKG_LICENSE:=LGPL-2.1-or-later
 PKG_LICENSE_FILES:=COPYING.LESSER
 
 PKG_SOURCE_PROTO:=git
index da15375da7c5028beebef7f474173dca7d6d0dac..685a43b5d5305c0902ecef710bf6321de07f5abd 100644 (file)
@@ -9,14 +9,14 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libpng
 PKG_VERSION:=1.6.37
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@SF/libpng
 PKG_HASH:=505e70834d35383537b6491e7ae8641f1a4bed1876dbfe361201fc80868d88ca
 
 PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
-PKG_LICENSE:=Libpng GPL-2.0+ BSD-3-Clause
+PKG_LICENSE:=Libpng GPL-2.0-or-later BSD-3-Clause
 PKC_LICENSE_FILES:=LICENSE contrib/gregbook/COPYING contrib/gregbook/LICENSE
 PKG_CPE_ID:=cpe:/a:libpng:libpng
 
diff --git a/libs/libradiotap/Makefile b/libs/libradiotap/Makefile
new file mode 100644 (file)
index 0000000..050ba39
--- /dev/null
@@ -0,0 +1,50 @@
+#
+# Copyright (C) 2016 Bruno Randolf (br1@einfach.org)
+#               2019 Nick Hainke (vincent@systemli.org)
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libradiotap
+PKG_VERSION:=2019-04-15
+PKG_RELEASE:=1
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/radiotap/radiotap-library.git
+PKG_SOURCE_VERSION:=1ca6b4f0d7225971ebcadf575c8f9e00ee55e840
+PKG_MIRROR_HASH:=59d2350d569c4027ca1b23ebbe3519852e194184c1aaa04308712235f387e422
+
+PKG_MAINTAINER:=Nick Hainke <vincent@systemli.org>
+PKG_LICENSE:=ISC
+PKG_LICENSE_FILES:=COPYING
+
+PKG_BUILD_PARALLEL:=1
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+define Package/libradiotap
+       SECTION:=libs
+       CATEGORY:=Libraries
+       TITLE:=Radiotap Parser Library
+       URL:=https://www.radiotap.org/
+endef
+
+define Package/libradiotap/description
+       Library that supplies additional information about frames from the driver to userspace applications.
+endef
+
+define Build/InstallDev
+       $(INSTALL_DIR) $(1)/usr/include
+       $(CP) $(PKG_INSTALL_DIR)/usr/include/radiotap* $(1)/usr/include/
+
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libradiotap.so* $(1)/usr/lib/
+endef
+
+define Package/libradiotap/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libradiotap.so* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,libradiotap))
index 76cbe845046cf7df29850c4bb6221b98958cdd41..538e43d1cbd57e7978e17aed989bf278dbedc68a 100644 (file)
@@ -1,12 +1,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=re2
-PKG_VERSION:=2019-04-01
-PKG_RELEASE:=1
+PKG_VERSION:=2019-06-01
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/google/re2/tar.gz/$(PKG_VERSION)?
-PKG_HASH:=2ed94072145272012bb5b7054afcbe707447d49dcd79fd6d1689e6f3dc589def
+PKG_HASH:=02b7d73126bd18e9fbfe5d6375a8bb13fadaf8e99e48cbb062e4500fc18e8e2e
 
 PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=LICENSE
@@ -57,7 +57,7 @@ endef
 
 define Package/re2/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libre2.so* $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libre2.so* $(1)/usr/lib/
 endef
 
 $(eval $(call BuildPackage,re2))
index 75a616a0ab8e680bc99864188df3fbe73a5d88eb..40d32df4ddd3b471d7a437d7853a51484ae9b7bc 100644 (file)
@@ -8,25 +8,20 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libredblack
-PKG_VERSION:=0.2.3
-PKG_RELEASE=$(PKG_SOURCE_VERSION)
+PKG_VERSION:=1.3
+PKG_RELEASE:=2
 
-PKG_LICENSE:=GPL-2.0+
-PKG_MAINTAINER:=Mislav Novakovic <mislav.novakovic@sartura.hr>
-
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_VERSION:=a399310d99b61eec4d3c0677573ab5dddcf9395d
-PKG_MIRROR_HASH:=71b05e70988b97865f734c698dd5564e349680556ccb8634a5bddf344012f22a
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
-PKG_SOURCE_URL:=https://github.com/sysrepo/libredblack.git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION)
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=@SF/libredblack
+PKG_HASH:=a0ecc59b0aae2df01558a6950532c711a782a099277b439a51d270003092f44f
 
-PKG_BUILD_ROOT:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
-PKG_BUILD_DIR:=$(PKG_BUILD_ROOT)
+PKG_MAINTAINER:=Mislav Novakovic <mislav.novakovic@sartura.hr>
+PKG_LICENSE:=GPL-2.0-or-later
+PKG_LICENSE_FILES:=COPYING
 
 PKG_FIXUP:=autoreconf
-PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/host-build.mk
@@ -35,13 +30,16 @@ define Package/libredblack
   SECTION:=libs
   CATEGORY:=Libraries
   TITLE:=RedBlack tree library
-  URL:=$(PKG_SOURCE_URL)
+  URL:=http://libredblack.sourceforge.net/
 endef
 
 define Package/libredblack/description
  RedBlack Balanced Tree Searching and Sorting Library.
 endef
 
+CONFIGURE_ARGS += --without-rbgen
+CONFIGURE_VARS += lt_cv_prog_cc_pic=$(FPIC)
+
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/lib
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libredblack.{so*,a,la} $(1)/usr/lib/
@@ -52,7 +50,7 @@ endef
 
 define Package/libredblack/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libredblack.{so*,a,la} $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libredblack.so* $(1)/usr/lib/
 
        $(INSTALL_DIR) $(1)/usr/include
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/include/redblack.h $(1)/usr/include
diff --git a/libs/librouteros/Makefile b/libs/librouteros/Makefile
new file mode 100644 (file)
index 0000000..2908de0
--- /dev/null
@@ -0,0 +1,54 @@
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=librouteros
+PKG_SOURCE_DATE:=2018-07-19
+PKG_SOURCE_VERSION:=c485c777ffbbbd87c3d72d843af36ba016803cae
+PKG_RELEASE:=1
+
+PKG_MAINTAINER:=Sven Roederer <devel-sven@geroedel.de>
+PKG_LICENSE:=ISC
+PKG_LICENSE_FILES:=COPYING
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_DATE).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/octo/librouteros/tar.gz/$(PKG_SOURCE_VERSION)?
+PKG_HASH:=427e071fe270ff6c08e32a10e5beff2add4205e6c864b142f950efdb8d2245a4
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_SOURCE_VERSION)
+
+PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/librouteros
+  TITLE:=A library that talks to MikroTik devices.
+  URL:=https://octo.github.io/librouteros/
+  SECTION:=libs
+  CATEGORY:=Libraries
+endef
+
+define Package/librouteros/description
+  librouteros is a library to communicate with RouterOS, the operating system of MikroTik's RouterBoards.
+  It uses the API port provided by those systems to connect and talk to the devices. librouteros is a
+  low-level library in that it abstracts the network protocol used but has next to no knowledge about the
+  commands and responses available
+endef
+
+define Build/InstallDev
+       $(INSTALL_DIR) $(1)/usr/include
+       $(CP) $(PKG_INSTALL_DIR)/usr/include/routeros_*.h $(1)/usr/include/
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/librouteros.{a,la,so*} $(1)/usr/lib/
+endef
+
+define Package/librouteros/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/librouteros.so.* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,librouteros))
index 775ca72fc8bb228c062b4a90d059a44c4f704703..865addf15e9801bdde1e529202b5bff489d75f3a 100644 (file)
@@ -1,61 +1,55 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=librsocket-cpp
-PKG_SOURCE_DATE:=2019-05-08
-PKG_SOURCE_VERSION:=ddc80392b17a3fadcbea09f82ea5f6936f0fd459
+PKG_SOURCE_DATE:=2019-09-22
+PKG_SOURCE_VERSION:=b268907312af589828634c143b9f35b58cd6cfea
 PKG_RELEASE:=1
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_DATE).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/rsocket/rsocket-cpp/tar.gz/$(PKG_SOURCE_VERSION)?
-PKG_HASH:=b9b5177be57f6cd23ff3592845b11209167f679b683cb73acbf351e7a3550a76
+PKG_HASH:=7ab4655d3d8148ce689f74a116ae7393d9e802f91d0dfd697ffd8daeff800e61
 PKG_BUILD_DIR:=$(BUILD_DIR)/rsocket-cpp-$(PKG_SOURCE_VERSION)
 
+PKG_MAINTAINER:=Amol Bhave <ambhave@fb.com>
 PKG_LICENSE:=Apache-2.0
 PKG_LICENSE_FILES:=LICENSE
 
-include $(INCLUDE_DIR)/package.mk
-include $(INCLUDE_DIR)/cmake.mk
-
 PKG_BUILD_PARALLEL:=1
 CMAKE_BINARY_SUBDIR:=builddir
-CMAKE_OPTIONS:= \
-       -DBUILD_BENCHMARKS=OFF \
-       -DBUILD_EXAMPLES=OFF \
-       -DBUILD_TESTS=OFF \
-       -DBUILD_SHARED_LIBS=ON
 CMAKE_INSTALL:=1
 
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
+
 define Package/librsocket-cpp
-       SECTION:=libs
-       CATEGORY:=Libraries
-       TITLE:=C++ implementation of RSocket
-       DEPENDS:=+libyarpl
+  SECTION:=libs
+  CATEGORY:=Libraries
+  TITLE:=C++ implementation of RSocket
+  URL:=https://rsocket.io/
+  DEPENDS:=+libyarpl
 endef
 
 define Package/libyarpl
-       SECTION:=libs
-       CATEGORY:=Libraries
-       TITLE:=yarpl: Yet Another Reactive Programming Library
-       DEPENDS:=+libfolly
+  SECTION:=libs
+  CATEGORY:=Libraries
+  TITLE:=yarpl: Yet Another Reactive Programming Library
+  URL:=https://rsocket.io/
+  DEPENDS:=+libfolly
 endef
 
 define Package/librsocket-cpp/description
-       C++ implementation of RSocket, and Application protocol providing Reactive Streams semantics
+  C++ implementation of RSocket, and Application protocol providing Reactive Streams semantics
 endef
 
 define Package/libyarpl/description
-       C++ implementation of reactive functional programming including both Observable and Flowable types.
-endef
-
-define Package/librsocket-cpp/install
-       $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libReactiveSocket.so* $(1)/usr/lib/
+  C++ implementation of reactive functional programming including both Observable and Flowable types.
 endef
 
-define Package/libyarpl/install
-       $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libyarpl*.so* $(1)/usr/lib/
-endef
+CMAKE_OPTIONS += \
+       -DBUILD_BENCHMARKS=OFF \
+       -DBUILD_EXAMPLES=OFF \
+       -DBUILD_TESTS=OFF \
+       -DCMAKE_POSITION_INDEPENDENT_CODE=ON
 
 $(eval $(call BuildPackage,librsocket-cpp))
 $(eval $(call BuildPackage,libyarpl))
diff --git a/libs/librsocket-cpp/patches/100-fix-momit-leaf-frame-pointer-error.patch b/libs/librsocket-cpp/patches/100-fix-momit-leaf-frame-pointer-error.patch
deleted file mode 100644 (file)
index 24dfe4b..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-diff --git a/yarpl/CMakeLists.txt b/yarpl/CMakeLists.txt
---- a/yarpl/CMakeLists.txt       Fri May 03 07:45:18 2019 -0700
-+++ b/yarpl/CMakeLists.txt       Tue May 07 02:03:23 2019 -0700
-@@ -21,7 +21,11 @@
-   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wno-unused-parameter")
-   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-weak-vtables -Wno-padded")
-   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-omit-frame-pointer")
--  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -momit-leaf-frame-pointer")
-+  include(CheckCXXCompilerFlag)
-+  CHECK_CXX_COMPILER_FLAG("-momit-leaf-frame-pointer" HAVE_OMIT_LEAF_FRAME_POINTER)
-+  if(HAVE_OMIT_LEAF_FRAME_POINTER)
-+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -momit-leaf-frame-pointer")
-+  endif()
- endif()
-
- if(YARPL_WRAP_SHARED_IN_LOCK)
index c9f33876fc77dcf493f9394348f37169f2f5b8c1..a65154e58693c72e567a0504c974b5113aee9d55 100644 (file)
@@ -1,4 +1,3 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
 @@ -67,7 +67,6 @@
diff --git a/libs/librsocket-cpp/patches/102-gcc9.patch b/libs/librsocket-cpp/patches/102-gcc9.patch
new file mode 100644 (file)
index 0000000..1a5910a
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/yarpl/Refcounted.h
++++ b/yarpl/Refcounted.h
+@@ -42,7 +42,7 @@ std::shared_ptr<T> atomic_exchange(
+   auto refptr = ar->ref.lock();
+   auto old = std::move(*refptr);
+   *refptr = std::move(r);
+-  return std::move(old);
++  return old;
+ }
+ template <typename T>
diff --git a/libs/librsocket-cpp/patches/103-boost.patch b/libs/librsocket-cpp/patches/103-boost.patch
new file mode 100644 (file)
index 0000000..40737f0
--- /dev/null
@@ -0,0 +1,12 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -194,6 +194,9 @@ find_package(Gflags REQUIRED)
+ # find glog::glog to satisfy the folly dep.
+ find_package(Glog REQUIRED)
++find_package(Boost REQUIRED COMPONENTS system thread filesystem regex context
++                                       date_time program_options)
++
+ include_directories(SYSTEM ${OPENSSL_INCLUDE_DIR})
+ include_directories(SYSTEM ${GFLAGS_INCLUDE_DIR})
index d88507b6f179f360cfde690db752bd461ce893d9..d47fd3ea5e391db3c35a41231fe3033cdfb4728c 100644 (file)
@@ -16,6 +16,7 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/seccomp/libseccomp/releases/download/v$(PKG_VERSION)/
 PKG_HASH:=1ca3735249af66a1b2f762fe6e710fcc294ad7185f1cc961e5bd83f9988006e8
 PKG_MAINTAINER:=Nikos Mavrogiannopoulos <nmav@gnutls.org>
+PKG_CPE_ID:=cpe:/a:libseccomp_project:libseccomp
 
 PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
index 101f3c0dbfcd87298d9b808dd2c5159a63180025..8790fdff255e43e587468fa81f52163b4b2b1573 100644 (file)
@@ -6,21 +6,22 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libshout
-PKG_VERSION:=2.4.1
-PKG_RELEASE:=3
+PKG_VERSION:=2.4.3
+PKG_RELEASE:=1
 
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://downloads.us.xiph.org/releases/libshout/
-PKG_HASH:=f3acb8dec26f2dbf6df778888e0e429a4ce9378a9d461b02a7ccbf2991bbf24d
+PKG_SOURCE_URL:=https://downloads.us.xiph.org/releases/libshout/
+PKG_HASH:=0d8af55d1141bf90710bcd41a768c9cc5adb251502a0af1dd22c8da215d40dfe
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
 
-PKG_LICENSE:=LGPL-2.0+
+PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
+PKG_LICENSE:=LGPL-2.0-or-later
 PKG_LICENSE_FILES:=COPYING
-PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org>, \
-               Ted Hess <thess@kitschensync.net>
+PKG_CPE_ID:=cpe:/a:libshout:libshout
 
 PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -77,21 +78,22 @@ Package/libshout-full/description=$(Package/libshout/description/default)
 CONFIGURE_ARGS += \
        --enable-shared \
        --enable-static \
-       --disable-speex
+       --disable-speex \
+       --without-pic
 
 ifeq ($(BUILD_VARIANT),notheora)
   CONFIGURE_ARGS += --disable-theora
 endif
 
 ifeq ($(BUILD_VARIANT),nossl)
-  CONFIGURE_ARGS += --disable-theora --with-openssl="no"
+  CONFIGURE_ARGS += --disable-theora --without-openssl
 endif
 
 CONFIGURE_VARS += \
        VORBIS_CFLAGS="-I$(STAGING_DIR)/usr/include/tremor/" \
        VORBIS_LIBS="$(TARGET_LDFLAGS) -lvorbisidec" \
 
-TARGET_CFLAGS += $(FPIC) -Wl,-rpath-link="$(STAGING_DIR)/usr/lib"
+TARGET_CFLAGS += $(FPIC)
 
 PACKAGE_CONFIG_FILE=shout$(if $(findstring $(BUILD_VARIANT),full),-full).pc
 
index be7ca7a1f821ceacc13374cb3e6d3d82ad19f44f..d7886b7fc469d9af26683598b4bad1e3e7843de0 100644 (file)
@@ -1,6 +1,6 @@
 --- a/src/codec_vorbis.c
 +++ b/src/codec_vorbis.c
-@@ -28,7 +28,7 @@
+@@ -29,7 +29,7 @@
  #endif
  #include <stdlib.h>
  
diff --git a/libs/libshout/patches/140-no_example_doc_win32.patch b/libs/libshout/patches/140-no_example_doc_win32.patch
deleted file mode 100644 (file)
index 4f09328..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -3,14 +3,14 @@
- AUTOMAKE_OPTIONS = 1.6 foreign
- ACLOCAL_AMFLAGS = -I m4
--SUBDIRS = include src examples doc win32
-+SUBDIRS = include src
- EXTRA_DIST = INSTALL m4/shout.m4 m4/acx_pthread.m4 \
-       m4/ogg.m4 m4/vorbis.m4 m4/xiph_compiler.m4 m4/xiph_net.m4 \
-       m4/xiph_types.m4 libshout.ckport
- docdir = $(datadir)/doc/$(PACKAGE)
--doc_DATA = COPYING NEWS README examples/example.c examples/nonblocking.c
-+doc_DATA = COPYING README
- m4datadir = $(datadir)/aclocal
- m4data_DATA = m4/shout.m4
diff --git a/libs/libshout/patches/150-openssl-1.1.patch b/libs/libshout/patches/150-openssl-1.1.patch
deleted file mode 100644 (file)
index 6028919..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-diff --git a/src/tls.c b/src/tls.c
-index 4562c73..f946946 100644
---- a/src/tls.c
-+++ b/src/tls.c
-@@ -63,12 +63,16 @@ static inline int tls_setup(shout_tls_t *tls)
- {
-       SSL_METHOD *meth;
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
-       SSL_library_init();
-       SSL_load_error_strings();
-       SSLeay_add_all_algorithms();
-       SSLeay_add_ssl_algorithms();
-       meth = TLSv1_client_method();
-+#else
-+      meth = TLS_client_method();
-+#endif
-       if (!meth)
-               goto error;
index 7a332e6da2d94a07b4f2544a9f708be8c2e93478..39f22138e8cedece76a6c732dc69ff4eb0fd6790 100644 (file)
@@ -3,13 +3,13 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=libsigar
 PKG_SOURCE_DATE:=2017-02-21
 PKG_SOURCE_VERSION:=a6c61edf8c64e013411e8c9d753165cd03102c6e
-PKG_RELEASE:=1
+PKG_RELEASE:=3
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_DATE).tar.gz
-PKG_SOURCE_URL:=https://codeload.github.com/boundary/sigar/tar.gz/$(PKG_SOURCE_VERSION)?
-PKG_HASH:=5232f0fa994ab60ad4622364fad0297c0054e04f0cfec9c586b14e33bbc387da
-PKG_BUILD_DIR:=$(BUILD_DIR)/sigar-$(PKG_SOURCE_VERSION)
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/boundary/sigar
+PKG_MIRROR_HASH:=5f017e10ab1d929c9dfb2937fef16a45962b60958cd1569573d18f00fcea290f
 
+PKG_MAINTAINER:=Amol Bhave <ambhave@fb.com>
 PKG_LICENSE:=Apache-2.0
 PKG_LICENSE_FILE:=LICENSE
 
@@ -25,7 +25,6 @@ define Package/libsigar
        TITLE:=System Information Gatherer And Reporter
        URL:=https://github.com/boundary/sigar
        DEPENDS:=+libtirpc
-       MAINTAINER:=Amol Bhave <ambhave@fb.com>
 endef
 
 define Package/libsigar/description
diff --git a/libs/libsigar/patches/010-rindex.patch b/libs/libsigar/patches/010-rindex.patch
new file mode 100644 (file)
index 0000000..bc0b064
--- /dev/null
@@ -0,0 +1,18 @@
+--- a/src/sigar_util.c
++++ b/src/sigar_util.c
+@@ -954,14 +954,10 @@ int sigar_file2str(const char *fname, char *buffer, int buflen)
+ #define vsnprintf _vsnprintf
+ #endif
+-#ifdef WIN32
+-#   define rindex strrchr
+-#endif
+-
+ static int proc_module_get_self(void *data, char *name, int len)
+ {
+     sigar_t *sigar = (sigar_t *)data;
+-    char *ptr = rindex(name, '/');
++    char *ptr = strrchr(name, '/');
+     if (!ptr) {
+         return SIGAR_OK;
diff --git a/libs/libsigar/patches/020-sysmacros.patch b/libs/libsigar/patches/020-sysmacros.patch
new file mode 100644 (file)
index 0000000..334a908
--- /dev/null
@@ -0,0 +1,10 @@
+--- a/src/os/linux/linux_sigar.c
++++ b/src/os/linux/linux_sigar.c
+@@ -23,6 +23,7 @@
+ #include <linux/param.h>
+ #include <sys/param.h>
+ #include <sys/stat.h>
++#include <sys/sysmacros.h>
+ #include <sys/times.h>
+ #include <sys/utsname.h>
+ #include <mntent.h>
diff --git a/libs/libsigc++/Makefile b/libs/libsigc++/Makefile
deleted file mode 100644 (file)
index 74548de..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-#
-# Copyright (C) 2006-2015 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:=libsigc++
-PKG_VERSION:=2.10.1
-PKG_RELEASE:=1
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_SOURCE_URL:=@GNOME/libsigc++/2.10
-PKG_HASH:=c9a25f26178c6cbb147f9904d8c533b5a5c5111a41ac2eb781eb734eea446003
-
-PKG_MAINTAINER:=Rosen Penev <rosenp@gmail.com>
-PKG_LICENSE:=LGPL-3.0+
-PKG_LICENSE_FILES:=COPYING
-
-PKG_FIXUP:=autoreconf
-PKG_BUILD_PARALLEL:=1
-PKG_INSTALL:=1
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/libsigcxx
-  SECTION:=libs
-  CATEGORY:=Libraries
-  TITLE:=typesafe callback system for standard C++
-  URL:=https://libsigcplusplus.github.io/libsigcplusplus/
-  DEPENDS:=+libstdcpp
-endef
-
-define Package/libsigcxx/description
- It allows you to define signals and to connect those signals to any
- callback function, either global or a member function, regardless of
- whether it is static or virtual.
-endef
-
-CONFIGURE_ARGS += \
-       --enable-shared \
-       --enable-static \
-       --disable-benchmark \
-       --disable-documentation \
-       --disable-deprecated-api \
-       --disable-warnings
-
-define Build/InstallDev
-       $(INSTALL_DIR) $(1)/usr/include
-       $(CP) $(PKG_INSTALL_DIR)/usr/include/sigc++-2.0 $(1)/usr/include/
-       $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsigc-2.0.{a,so*} $(1)/usr/lib/
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/sigc++-2.0 $(1)/usr/lib/
-       $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/sigc++-2.0.pc $(1)/usr/lib/pkgconfig/
-endef
-
-define Package/libsigcxx/install
-       $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsigc-2.0.so.* $(1)/usr/lib/
-endef
-
-$(eval $(call BuildPackage,libsigcxx))
index cae33e3da9a76abd991b6f3cf0daef9f8275d65b..41cbf92bc0f3e50c6db3d54906ca9ce73d41bc8d 100644 (file)
@@ -18,6 +18,7 @@ PKG_MIRROR_HASH:=9b3beef70003456ff297ce50ecd5cb1d066ca98f10f6363562431d773b3fcb3
 
 PKG_LICENSE:=LGPLv2.1
 PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:libsndfile_project:libsndfile
 
 PKG_INSTALL:=1
 
index 7f7467e5b6662293b45d580b4c093347c31de10f..a75a5339a1d3f6db880e5fd29007e131ebfbeae2 100644 (file)
@@ -8,20 +8,21 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libsodium
-PKG_VERSION:=1.0.17
+PKG_VERSION:=1.0.18
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://download.libsodium.org/libsodium/releases \
                https://github.com/jedisct1/libsodium/releases/download/$(PKG_VERSION)
-PKG_HASH:=0cc3dae33e642cc187b5ceb467e0ad0e1b51dcba577de1190e9ffa17766ac2b1
-
-PKG_FIXUP:=libtool autoreconf
-PKG_USE_MIPS16:=0
-PKG_INSTALL:=1
+PKG_HASH:=6f504490b342a4f8a4c4a02fc9b866cbef8622d5df4e5452b46be121e46636c1
 
 PKG_MAINTAINER:=Damiano Renfer <damiano.renfer@gmail.com>
 PKG_LICENSE:=ISC
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_USE_MIPS16:=0
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -30,7 +31,6 @@ define Package/libsodium
   CATEGORY:=Libraries
   TITLE:=P(ortable|ackageable) NaCl-based crypto library
   URL:=https://github.com/jedisct1/libsodium
-  MAINTAINER:=Damiano Renfer <damiano.renfer@gmail.com>
 endef
 
 define Package/libsodium/description
@@ -53,7 +53,7 @@ endef
 
 CONFIGURE_ARGS+= \
        --disable-ssp \
-       $(if $(CONFIG_LIBSODIUM_MINIMAL),--enable-minimal=yes,--enable-minimal=no)
+       $(if $(CONFIG_LIBSODIUM_MINIMAL),--enable,--disable)-minimal
 
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include/sodium
index 69dffc7de687b17435028c4b75b299755a4fa7d5..d3f88ea2252a6fc229cbc6422aa8eb629790b4b6 100644 (file)
@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libsoxr
 PKG_VERSION:=0.1.3
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_URL:=@SF/project/soxr/
 PKG_SOURCE:=soxr-$(PKG_VERSION)-Source.tar.xz
@@ -17,12 +17,12 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/soxr-$(PKG_VERSION)-Source
 
 PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>, \
                Mike Brady <mikebrady@eircom.net>
-
 PKG_LICENSE:=LGPL-2.1
 PKG_LICENSE_FILES:=LICENCE
+PKG_CPE_ID:=cpe:/a:sox:sox
 
+CMAKE_INSTALL:=1
 PKG_BUILD_PARALLEL:=1
-PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/cmake.mk
@@ -31,7 +31,7 @@ define Package/libsoxr
   SECTION:=libs
   CATEGORY:=Libraries
   TITLE:=The SoX Resampler library
-  URL:=http://sourceforge.net/projects/soxr/
+  URL:=https://sourceforge.net/projects/soxr/
   DEPENDS:= +libpthread
 endef
 
@@ -44,14 +44,6 @@ CMAKE_OPTIONS:= -DBUILD_TESTS=0 -DBUILD_EXAMPLES=0
 CMAKE_OPTIONS+= -DHAVE_WORDS_BIGENDIAN_EXITCODE=$(if $(CONFIG_BIG_ENDIAN),0,1)
 CMAKE_OPTIONS+= -DWITH_OPENMP=0
 
-define Build/InstallDev
-       $(INSTALL_DIR) $(1)/usr/include
-       $(CP) $(PKG_INSTALL_DIR)/usr/include/soxr.h $(1)/usr/include/
-       $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsoxr.so* $(1)/usr/lib/
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/soxr.pc $(1)/usr/lib/pkgconfig/
-endef
-
 define Package/libsoxr/install
        $(INSTALL_DIR) $(1)/usr/lib
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsoxr.so* $(1)/usr/lib/
diff --git a/libs/libsoxr/patches/020-pkgconfig.patch b/libs/libsoxr/patches/020-pkgconfig.patch
new file mode 100644 (file)
index 0000000..cf44255
--- /dev/null
@@ -0,0 +1,56 @@
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -88,7 +88,7 @@ if (BUILD_FRAMEWORK)
+   set_target_properties (${PROJECT_NAME} PROPERTIES FRAMEWORK TRUE)
+ elseif (NOT WIN32)
+   set (TARGET_PCS ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc)
+-  configure_file (${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}.pc.in ${TARGET_PCS})
++  configure_file (${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}.pc.in ${TARGET_PCS} @ONLY)
+   install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
+ endif ()
+@@ -112,7 +112,7 @@ if (WITH_LSR_BINDINGS)
+     set_target_properties (${LSR} PROPERTIES FRAMEWORK TRUE)
+   elseif (NOT WIN32)
+     set (TARGET_PCS "${TARGET_PCS} ${CMAKE_CURRENT_BINARY_DIR}/${LSR}.pc")
+-    configure_file (${CMAKE_CURRENT_SOURCE_DIR}/${LSR}.pc.in ${CMAKE_CURRENT_BINARY_DIR}/${LSR}.pc)
++    configure_file (${CMAKE_CURRENT_SOURCE_DIR}/${LSR}.pc.in ${CMAKE_CURRENT_BINARY_DIR}/${LSR}.pc @ONLY)
+     install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${LSR}.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
+   endif ()
+ endif ()
+--- a/src/soxr-lsr.pc.in
++++ b/src/soxr-lsr.pc.in
+@@ -1,5 +1,10 @@
+-Name: ${LSR}
+-Description: ${DESCRIPTION_SUMMARY} (with libsamplerate-like bindings)
+-Version: ${PROJECT_VERSION}
+-Libs: -L${LIB_INSTALL_DIR} -l${LSR}
+-Cflags: -I${INCLUDE_INSTALL_DIR}
++prefix=@CMAKE_INSTALL_PREFIX@
++exec_prefix=@CMAKE_INSTALL_PREFIX@
++libdir=${exec_prefix}/lib
++includedir=${prefix}/include
++
++Name: @LSR@
++Description: @DESCRIPTION_SUMMARY@ (with libsamplerate-like bindings)
++Version: @PROJECT_VERSION@
++Libs: -L${libdir} -l@LSR@
++Cflags: -I${includedir}
+--- a/src/soxr.pc.in
++++ b/src/soxr.pc.in
+@@ -1,5 +1,10 @@
+-Name: ${PROJECT_NAME}
+-Description: ${DESCRIPTION_SUMMARY}
+-Version: ${PROJECT_VERSION}
+-Libs: -L${LIB_INSTALL_DIR} -l${PROJECT_NAME}
+-Cflags: -I${INCLUDE_INSTALL_DIR}
++prefix=@CMAKE_INSTALL_PREFIX@
++exec_prefix=@CMAKE_INSTALL_PREFIX@
++libdir=${exec_prefix}/lib
++includedir=${prefix}/include
++
++Name: @PROJECT_NAME@
++Description: @DESCRIPTION_SUMMARY@
++Version: @PROJECT_VERSION@
++Libs: -L${libdir} -l@PROJECT_NAME@
++Cflags: -I${includedir}
index 7f85982fb1955865f035e89d5170960ad8146870..b7143c02a8f8f6dfb6f645fb019b6c073ab34d24 100644 (file)
@@ -7,12 +7,12 @@
 
 include $(TOPDIR)/rules.mk
 
-PKG_LICENSE:=LGPL-2.1+ BSD-2-Clause
+PKG_LICENSE:=LGPL-2.1-or-later BSD-2-Clause
 PKG_MAINTAINER:=Mislav Novakovic <mislav.novakovic@sartura.hr>
 
 PKG_NAME:=libssh
 PKG_VERSION:=0.7.6
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://www.libssh.org/files/0.7/
index c2d29ae3a3e75eea4959fd8550bd70a2d23fb379..f619f37eea9d17543f5e34afcfcf80f613f2e4b2 100644 (file)
@@ -8,26 +8,27 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libssh2
-PKG_VERSION:=1.8.2
-PKG_RELEASE:=1
+PKG_VERSION:=1.9.0
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://www.libssh2.org/download
-PKG_HASH:=088307d9f6b6c4b8c13f34602e8ff65d21c2dc4d55284dfe15d502c4ee190d67
+PKG_HASH:=d5fb8bd563305fd1074dda90bd053fb2d29fc4bce048d182f96eaa466dfadafd
 
-PKG_FIXUP:=autoreconf
-
-PKG_INSTALL:=1
-
-PKG_LICENSE:=BSD
+PKG_MAINTAINER:=Jiri Slachta <jiri@slachta.eu>
+PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=COPYING
 PKG_CPE_ID:=cpe:/a:libssh2:libssh2
 
+CMAKE_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
+
 PKG_CONFIG_DEPENDS:= \
        CONFIG_LIBSSH2_MBEDTLS \
        CONFIG_LIBSSH2_OPENSSL
 
 include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
 
 define Package/libssh2
   SECTION:=libs
@@ -35,7 +36,7 @@ define Package/libssh2
   TITLE:=SSH2 library
   URL:=https://www.libssh2.org/
   DEPENDS:=+LIBSSH2_MBEDTLS:libmbedtls +LIBSSH2_OPENSSL:libopenssl +zlib
-  MAINTAINER:=Jiri Slachta <jiri@slachta.eu>
+  ABI_VERSION:=1
 endef
 
 define Package/libssh2/description
@@ -46,25 +47,21 @@ define Package/libssh2/config
        source "$(SOURCE)/Config.in"
 endef
 
-CONFIGURE_ARGS += \
-       --disable-examples-build \
-       --disable-silent-rules \
-       $(if $(CONFIG_LIBSSH2_MBEDTLS),--with-mbedtls --with-libmbedtls-prefix=$(STAGING_DIR)/usr) \
-       $(if $(CONFIG_LIBSSH2_OPENSSL),--with-openssl --with-libssl-prefix=$(STAGING_DIR)/usr) \
-       --with-libz-prefix=$(STAGING_DIR)/usr
+CMAKE_OPTIONS += \
+       -DBUILD_SHARED_LIBS=ON \
+       -DBUILD_TESTING=OFF \
+       -DENABLE_ZLIB_COMPRESSION=ON \
+       -DCLEAR_MEMORY=ON
 
-define Build/InstallDev
-       $(INSTALL_DIR) $(1)/usr/include
-       $(INSTALL_DIR) $(1)/usr/lib
-       $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
-       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libssh2.so* $(1)/usr/lib/
-       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libssh2.pc $(1)/usr/lib/pkgconfig/
-endef
+ifeq ($(CONFIG_LIBSSH2_OPENSSL),y)
+       CMAKE_OPTIONS += -DCRYPTO_BACKEND=OpenSSL
+else
+       CMAKE_OPTIONS += -DCRYPTO_BACKEND=mbedTLS
+endif
 
 define Package/libssh2/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libssh2.so* $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libssh2.so.$(ABI_VERSION)* $(1)/usr/lib/
 endef
 
 $(eval $(call BuildPackage,libssh2))
diff --git a/libs/libssh2/patches/01-fix-acinclude-m4.patch b/libs/libssh2/patches/01-fix-acinclude-m4.patch
deleted file mode 100644 (file)
index d4e1182..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
---- a/acinclude.m4
-+++ b/acinclude.m4
-@@ -386,9 +386,9 @@ AC_DEFUN([LIBSSH2_CHECKFOR_MBEDTLS], [
-   old_LDFLAGS=$LDFLAGS
-   old_CFLAGS=$CFLAGS
--  if test -n "$use_mbedtls" && test "$use_mbedtls" != "no"; then
--    LDFLAGS="$LDFLAGS -L$use_mbedtls/lib"
--    CFLAGS="$CFLAGS -I$use_mbedtls/include"
-+  if test -n "$with_libmbedtls_prefix" && test "$use_mbedtls" != "no"; then
-+    LDFLAGS="$LDFLAGS -L$with_libmbedtls_prefix/lib"
-+    CFLAGS="$CFLAGS -I$with_libmbedtls_prefix/include"
-   fi
-   AC_LIB_HAVE_LINKFLAGS([mbedtls], [], [
-@@ -412,9 +412,9 @@ AC_DEFUN([LIBSSH2_CHECKFOR_GCRYPT], [
-   old_LDFLAGS=$LDFLAGS
-   old_CFLAGS=$CFLAGS
--  if test -n "$use_libgcrypt" && test "$use_libgcrypt" != "no"; then
--    LDFLAGS="$LDFLAGS -L$use_libgcrypt/lib"
--    CFLAGS="$CFLAGS -I$use_libgcrypt/include"
-+  if test -n "$with_libgcrypt_prefix" && test "$use_libgcrypt" != "no"; then
-+    LDFLAGS="$LDFLAGS -L$with_libgcrypt_prefix/lib"
-+    CFLAGS="$CFLAGS -I$with_libgcrypt_prefix/include"
-   fi
-   AC_LIB_HAVE_LINKFLAGS([gcrypt], [], [
-     #include <gcrypt.h>
diff --git a/libs/libssh2/patches/02-openssl-deprecated.patch b/libs/libssh2/patches/02-openssl-deprecated.patch
deleted file mode 100644 (file)
index eab0d86..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-diff --git a/src/openssl.c b/src/openssl.c
-index 4f63ef9..411f9f6 100644
---- a/src/openssl.c
-+++ b/src/openssl.c
-@@ -1062,6 +1062,7 @@ _libssh2_pub_priv_keyfile(LIBSSH2_SESSION *session,
-                               "Unable to extract public key from private key "
-                               "file: Unable to open private key file");
-     }
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
-     if (!EVP_get_cipherbyname("des")) {
-         /* If this cipher isn't loaded it's a pretty good indication that none
-          * are.  I have *NO DOUBT* that there's a better way to deal with this
-@@ -1070,6 +1071,7 @@ _libssh2_pub_priv_keyfile(LIBSSH2_SESSION *session,
-          */
-         OpenSSL_add_all_ciphers();
-     }
-+#endif
-     BIO_reset(bp);
-     pk = PEM_read_bio_PrivateKey(bp, NULL, NULL, (void*)passphrase);
-     BIO_free(bp);
-@@ -1138,6 +1140,7 @@ _libssh2_pub_priv_keyfilememory(LIBSSH2_SESSION *session,
-     if (!bp) {
-         return -1;
-     }
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
-     if (!EVP_get_cipherbyname("des")) {
-         /* If this cipher isn't loaded it's a pretty good indication that none
-          * are.  I have *NO DOUBT* that there's a better way to deal with this
-@@ -1146,6 +1149,7 @@ _libssh2_pub_priv_keyfilememory(LIBSSH2_SESSION *session,
-          */
-         OpenSSL_add_all_ciphers();
-     }
-+#endif
-     BIO_reset(bp);
-     pk = PEM_read_bio_PrivateKey(bp, NULL, NULL, (void*)passphrase);
-     BIO_free(bp);
-diff --git a/src/openssl.h b/src/openssl.h
-index 3ca71fa..7a89793 100644
---- a/src/openssl.h
-+++ b/src/openssl.h
-@@ -40,7 +40,9 @@
- #include <openssl/opensslconf.h>
- #include <openssl/sha.h>
- #include <openssl/rsa.h>
-+#ifndef OPENSSL_NO_ENGINE
- #include <openssl/engine.h>
-+#endif
- #ifndef OPENSSL_NO_DSA
- #include <openssl/dsa.h>
- #endif
-@@ -226,10 +228,18 @@ int _libssh2_md5_init(libssh2_md5_ctx *ctx);
- #define libssh2_hmac_cleanup(ctx) HMAC_cleanup(ctx)
- #endif
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#ifndef OPENSSL_NO_ENGINE
- #define libssh2_crypto_init() \
-   OpenSSL_add_all_algorithms(); \
-   ENGINE_load_builtin_engines(); \
-   ENGINE_register_all_complete()
-+#else
-+#define libssh2_crypto_init() OpenSSL_add_all_algorithms()
-+#endif
-+#else
-+#define libssh2_crypto_init()
-+#endif
- #define libssh2_crypto_exit()
index 5c0e4917cdd1fb3cec9d24622278647cfef71edd..f09ece1c2e889c9c22ecd7593784ca7197d8126b 100644 (file)
@@ -8,14 +8,14 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=talloc
 PKG_VERSION:=2.1.14
 MAJOR_VERSION:=2
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://www.samba.org/ftp/talloc
 PKG_HASH:=b185602756a628bac507fa8af8b9df92ace69d27c0add5dab93190ad7c3367ce
 
 PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
-PKG_LICENSE:=LGPL-3.0+
+PKG_LICENSE:=LGPL-3.0-or-later
 
 PKG_BUILD_PARALLEL:=0
 
index e20fcada5d2d551a5dc4da0f677a527ca3bac8e8..01347bfb067eb9567dcb9172b1d7a0cc7f5f523e 100644 (file)
@@ -8,19 +8,21 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libtasn1
-PKG_VERSION:=4.13
+PKG_VERSION:=4.14
 PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@GNU/$(PKG_NAME)
-PKG_HASH:=7e528e8c317ddd156230c4e31d082cd13e7ddeb7a54824be82632209550c8cca
+PKG_HASH:=9e604ba5c5c8ea403487695c2e407405820d98540d9de884d6e844f9a9c5ba08
 
 PKG_MAINTAINER:=Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
-PKG_LICENSE:=LGPLv2.1+
+PKG_LICENSE:=LGPL-2.1-or-later
 PKG_LICENSE_FILES:=COPYING.LIB
+PKG_CPE_ID:=cpe:/a:gnu:libtasn1
 
 #PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -36,6 +38,7 @@ define Package/libtasn1/description
  Distinguish Encoding Rules (DER) manipulation.
 endef
 
+TARGET_CFLAGS += -ffunction-sections -fdata-sections
 TARGET_LDFLAGS += -Wl,--gc-sections
 
 CONFIGURE_ARGS += \
index 8abc6aa46cc4dccb8cc1dacb48b39b9fb3a5e1ca..66e482bf97b237bcea35c5f322d169f824d30df2 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libtins
 PKG_VERSION:=4.0
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_MAINTAINER:= Steven Hessing <steven.hessing@gmail.com>
 
@@ -48,8 +48,8 @@ libtins is a high-level, multiplatform C++ network packet sniffing and crafting
 endef
 
 define Package/libtins/install
-    $(INSTALL_DIR) $(1)/usr/lib
-       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libtins.so.* $(1)/usr/lib/
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtins.so.* $(1)/usr/lib/
 endef
 
 $(eval $(call BuildPackage,libtins))
index d7c8cd25bbec78e266fc35df10bc7dbf6163c15c..333520edff82db8246c2ea8915c4370820ed8a22 100644 (file)
@@ -1,4 +1,4 @@
-# 
+#
 # Copyright (C) 2006-2018 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libtirpc
 PKG_VERSION:=1.1.4
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_URL:=@SF/libtirpc
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
diff --git a/libs/libtirpc/patches/010-b-functions.patch b/libs/libtirpc/patches/010-b-functions.patch
new file mode 100644 (file)
index 0000000..89e882a
--- /dev/null
@@ -0,0 +1,66 @@
+--- a/src/auth_des.c
++++ b/src/auth_des.c
+@@ -396,7 +396,7 @@ authdes_validate(AUTH *auth, struct opaque_auth *rverf)
+       /*
+        * validate
+        */
+-      if (bcmp((char *)&ad->ad_timestamp, (char *)&verf.adv_timestamp,
++      if (memcmp((char *)&ad->ad_timestamp, (char *)&verf.adv_timestamp,
+                sizeof(struct timeval)) != 0) {
+               LIBTIRPC_DEBUG(1, ("authdes_validate: verifier mismatch"));
+               return (FALSE);
+--- a/src/auth_time.c
++++ b/src/auth_time.c
+@@ -104,7 +104,7 @@ static int uaddr_to_sockaddr(uaddr, sin)
+       p_bytes[1] = (unsigned char)a[5] & 0x000000FF;
+       sin->sin_family = AF_INET; /* always */
+-      bcopy((char *)&p_bytes, (char *)&sin->sin_port, 2);
++      memcpy((char *)&sin->sin_port, (char *)&p_bytes, 2);
+       return (0);
+ }
+--- a/src/crypt_client.c
++++ b/src/crypt_client.c
+@@ -75,8 +75,8 @@ _des_crypt_call(buf, len, dparms)
+       des_crypt_1_arg.desbuf.desbuf_val = buf;
+       des_crypt_1_arg.des_dir = dparms->des_dir;
+       des_crypt_1_arg.des_mode = dparms->des_mode;
+-      bcopy(dparms->des_ivec, des_crypt_1_arg.des_ivec, 8);
+-      bcopy(dparms->des_key, des_crypt_1_arg.des_key, 8);
++      memcpy(des_crypt_1_arg.des_ivec, dparms->des_ivec, 8);
++      memcpy(des_crypt_1_arg.des_key, dparms->des_key, 8);
+       result_1 = des_crypt_1(&des_crypt_1_arg, clnt);
+       if (result_1 == (desresp *) NULL) {
+@@ -88,8 +88,8 @@ _des_crypt_call(buf, len, dparms)
+       if (result_1->stat == DESERR_NONE ||
+           result_1->stat == DESERR_NOHWDEVICE) {
+-              bcopy(result_1->desbuf.desbuf_val, buf, len);
+-              bcopy(result_1->des_ivec, dparms->des_ivec, 8);
++              memcpy(buf, result_1->desbuf.desbuf_val, len);
++              memcpy(dparms->des_ivec, result_1->des_ivec, 8);
+       }
+       clnt_freeres(clnt, (xdrproc_t)xdr_desresp, result_1);
+--- a/src/svc_auth_des.c
++++ b/src/svc_auth_des.c
+@@ -145,7 +145,7 @@ _svcauth_des(rqst, msg)
+                       return (AUTH_BADCRED);
+               }
+               cred->adc_fullname.name = area->area_netname;
+-              bcopy((char *)ixdr, cred->adc_fullname.name, 
++              memcpy(cred->adc_fullname.name, (char *)ixdr,
+                       (u_int)namelen);
+               cred->adc_fullname.name[namelen] = 0;
+               ixdr += (RNDUP(namelen) / BYTES_PER_XDR_UNIT);
+@@ -419,7 +419,7 @@ cache_spot(key, name, timestamp)
+               if (cp->key.key.high == hi && 
+                   cp->key.key.low == key->key.low &&
+                   cp->rname != NULL &&
+-                  bcmp(cp->rname, name, strlen(name) + 1) == 0) {
++                  memcmp(cp->rname, name, strlen(name) + 1) == 0) {
+                       if (BEFORE(timestamp, &cp->laststamp)) {
+                               svcauthdes_stats.ncachereplays++;
+                               return (-1); /* replay */
index 2f94b2f755bd8dcad6ec4b0f5c0bf7ef2ea52c4b..15b018d700cf38c710ae5b5ad05574d36c8182d9 100644 (file)
@@ -8,15 +8,20 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libtorrent
-PKG_VERSION:=0.13.7
+PKG_VERSION:=0.13.8
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/rakshasa/libtorrent/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=86b4b1753385aaddf9e59ad94f1292eee5102139eb57520e84d1af2f04693708
+PKG_HASH:=0f6c2e7ffd3a1723ab47fdac785ec40f85c0a5b5a42c1d002272205b988be722
+
+PKG_MAINTAINER:=Rosen Penev <rosenp@gmail.com>
+PKG_LICENSE:=GPL-2.0-or-later
+PKG_LICENSE_FILES:=COPYING
 
 PKG_FIXUP:=autoreconf
-PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -25,8 +30,7 @@ define Package/libtorrent
   CATEGORY:=Libraries
   TITLE:=Rakshasa's BitTorrent library
   URL:=https://rakshasa.github.io/rtorrent/
-  DEPENDS:=+libopenssl +libsigcxx +zlib
-  MAINTAINER:=Rosen Penev <rosenp@gmail.com>
+  DEPENDS:=+libopenssl +libstdcpp +zlib
 endef
 
 define Package/libtorrent/description
@@ -37,30 +41,26 @@ define Package/libtorrent/description
  official client.
 endef
 
-TARGET_LDFLAGS += $(LIBGCC_S)
-
-CONFIGURE_ARGS+= \
+CONFIGURE_ARGS += \
        --enable-shared \
        --enable-static \
        --enable-aligned \
-       --disable-debug \
        --enable-openssl \
+       --disable-debug \
        --disable-instrumentation \
+       --with-epoll \
        --with-zlib=$(STAGING_DIR)/usr \
-       --disable-ipv6
+       --without-kqueue
+
+TARGET_CXXFLAGS += -faligned-new
 
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include
        $(CP) $(PKG_INSTALL_DIR)/usr/include/torrent $(1)/usr/include/
        $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtorrent.{a,so*} $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtorrent.a $(1)/usr/lib/
        $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libtorrent.pc $(1)/usr/lib/pkgconfig/
 endef
 
-define Package/libtorrent/install
-       $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtorrent.so.* $(1)/usr/lib/
-endef
-
 $(eval $(call BuildPackage,libtorrent))
diff --git a/libs/libtorrent/patches/010-usleep.patch b/libs/libtorrent/patches/010-usleep.patch
new file mode 100644 (file)
index 0000000..6539fad
--- /dev/null
@@ -0,0 +1,54 @@
+--- a/src/data/hash_queue.cc
++++ b/src/data/hash_queue.cc
+@@ -38,9 +38,10 @@
+ #define __STDC_FORMAT_MACROS
++#include <chrono>
++#include <thread>
+ #include <functional>
+ #include <rak/functional.h>
+-#include <unistd.h>
+ #include "torrent/exceptions.h"
+ #include "torrent/data/download_data.h"
+@@ -137,7 +138,7 @@ HashQueue::remove(HashQueueNode::id_type id) {
+       while ((done_itr = m_done_chunks.find(hash_chunk)) == m_done_chunks.end()) {
+         pthread_mutex_unlock(&m_done_chunks_lock);
+-        usleep(100);
++        std::this_thread::sleep_for(std::chrono::microseconds(100));
+         pthread_mutex_lock(&m_done_chunks_lock);
+       }
+--- a/src/torrent/utils/thread_base.cc
++++ b/src/torrent/utils/thread_base.cc
+@@ -37,8 +37,9 @@
+ #include "config.h"
+ #include <cstring>
++#include <chrono>
++#include <thread>
+ #include <signal.h>
+-#include <unistd.h>
+ #include "exceptions.h"
+ #include "poll.h"
+@@ -97,7 +98,7 @@ thread_base::stop_thread_wait() {
+   release_global_lock();
+   while (!is_inactive()) {
+-    usleep(1000);
++    std::this_thread::sleep_for(std::chrono::milliseconds(1));
+   }  
+   acquire_global_lock();
+@@ -161,7 +162,7 @@ thread_base::event_loop(thread_base* thread) {
+       }
+       // Add the sleep call when testing interrupts, etc.
+-      // usleep(50);
++      // std::this_thread::sleep_for(std::chrono::microseconds(50));
+       int poll_flags = 0;
diff --git a/libs/libtorrent/patches/100-fix_cross_compile.patch b/libs/libtorrent/patches/100-fix_cross_compile.patch
deleted file mode 100644 (file)
index 8d3ebb7..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
---- a/scripts/checks.m4
-+++ b/scripts/checks.m4
-@@ -96,7 +96,7 @@ AC_DEFUN([TORRENT_CHECK_KQUEUE], [
- AC_DEFUN([TORRENT_CHECK_KQUEUE_SOCKET_ONLY], [
-   AC_MSG_CHECKING(whether kqueue supports pipes and ptys)
--  AC_RUN_IFELSE([AC_LANG_SOURCE([
-+  AC_LINK_IFELSE([AC_LANG_SOURCE([
-       #include <fcntl.h>
-       #include <stdlib.h>
-       #include <unistd.h>
---- a/scripts/common.m4
-+++ b/scripts/common.m4
-@@ -153,7 +153,7 @@ dnl   Need to fix this so that it uses t
- AC_DEFUN([TORRENT_CHECK_EXECINFO], [
-   AC_MSG_CHECKING(for execinfo.h)
--  AC_RUN_IFELSE([AC_LANG_SOURCE([
-+  AC_LINK_IFELSE([AC_LANG_SOURCE([
-       #include <execinfo.h>
-       int main() { backtrace((void**)0, 0); backtrace_symbols((char**)0, 0); return 0;}
-       ])],
-@@ -168,7 +168,7 @@ AC_DEFUN([TORRENT_CHECK_EXECINFO], [
- AC_DEFUN([TORRENT_CHECK_ALIGNED], [
-   AC_MSG_CHECKING(the byte alignment)
--  AC_RUN_IFELSE([AC_LANG_SOURCE([
-+  AC_LINK_IFELSE([AC_LANG_SOURCE([
-       #include <inttypes.h>
-       int main() {
-         char buf@<:@8@:>@ = { 0, 0, 0, 0, 1, 0, 0, 0 };
diff --git a/libs/libtorrent/patches/110-openssl-1.1.patch b/libs/libtorrent/patches/110-openssl-1.1.patch
deleted file mode 100644 (file)
index 277cd94..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-From 4607bbf78040789dee29266878ce109136b984ef Mon Sep 17 00:00:00 2001
-From: rakshasa <sundell.software@gmail.com>
-Date: Tue, 20 Dec 2016 19:51:02 +0900
-Subject: [PATCH] Added support for openssl 1.1.
-
----
- configure.ac                |  4 ++++
- src/utils/diffie_hellman.cc | 36 ++++++++++++++++++++++++++++++++++--
- 2 files changed, 38 insertions(+), 2 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 65e34872..27e33570 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -71,12 +71,15 @@ AC_ARG_ENABLE(openssl,
-   [  --disable-openssl       Don't use OpenSSL's SHA1 implementation.],
-   [
-     if test "$enableval" = "yes"; then
-+dnl move to scripts.
-       PKG_CHECK_MODULES(OPENSSL, libcrypto,
-         CXXFLAGS="$CXXFLAGS $OPENSSL_CFLAGS";
-         LIBS="$LIBS $OPENSSL_LIBS")
-       AC_DEFINE(USE_OPENSSL, 1, Using OpenSSL.)
-       AC_DEFINE(USE_OPENSSL_SHA, 1, Using OpenSSL's SHA1 implementation.)
-+      AC_CHECK_LIB([crypto], [DH_set0_pqg], [AC_DEFINE(USE_OPENSSL_1_1, 1, Using OpenSSL 1.1.)])
-+
-     else
-       AC_DEFINE(USE_NSS_SHA, 1, Using Mozilla's SHA1 implementation.)
-     fi
-@@ -87,6 +90,7 @@ AC_ARG_ENABLE(openssl,
-     AC_DEFINE(USE_OPENSSL, 1, Using OpenSSL.)
-     AC_DEFINE(USE_OPENSSL_SHA, 1, Using OpenSSL's SHA1 implementation.)
-+    AC_CHECK_LIB([crypto], [DH_set0_pqg], [AC_DEFINE(USE_OPENSSL_1_1, 1, Using OpenSSL 1.1.)])
-   ]
- )
-diff --git a/src/utils/diffie_hellman.cc b/src/utils/diffie_hellman.cc
-index aa653d45..7ec13165 100644
---- a/src/utils/diffie_hellman.cc
-+++ b/src/utils/diffie_hellman.cc
-@@ -54,11 +54,23 @@ DiffieHellman::DiffieHellman(const unsigned char *prime, int primeLength,
-   m_secret(NULL), m_size(0) {
- #ifdef USE_OPENSSL
-+
-   m_dh = DH_new();
-+
-+#ifdef USE_OPENSSL_1_1
-+  BIGNUM * const dh_p = BN_bin2bn(prime, primeLength, NULL);
-+  BIGNUM * const dh_g = BN_bin2bn(generator, generatorLength, NULL);
-+
-+  if (dh_p == NULL || dh_g == NULL ||
-+      !DH_set0_pqg(m_dh, dh_p, NULL, dh_g))
-+        throw internal_error("Could not generate Diffie-Hellman parameters");
-+#else
-   m_dh->p = BN_bin2bn(prime, primeLength, NULL);
-   m_dh->g = BN_bin2bn(generator, generatorLength, NULL);
-+#endif
-   DH_generate_key(m_dh);
-+
- #else
-   throw internal_error("Compiled without encryption support.");
- #endif
-@@ -74,7 +86,19 @@ DiffieHellman::~DiffieHellman() {
- bool
- DiffieHellman::is_valid() const {
- #ifdef USE_OPENSSL
-+  if (m_dh == NULL)
-+    return false;
-+
-+#ifdef USE_OPENSSL_1_1
-+  const BIGNUM *pub_key;
-+
-+  DH_get0_key(m_dh, &pub_key, NULL);
-+
-+  return pub_key != NULL;
-+#else
-   return m_dh != NULL && m_dh->pub_key != NULL;
-+#endif
-+
- #else
-   return false;
- #endif
-@@ -103,8 +127,16 @@ DiffieHellman::store_pub_key(unsigned char* dest, unsigned int length) {
- #ifdef USE_OPENSSL
-   std::memset(dest, 0, length);
--  if ((int)length >= BN_num_bytes(m_dh->pub_key))
--    BN_bn2bin(m_dh->pub_key, dest + length - BN_num_bytes(m_dh->pub_key));
-+  const BIGNUM *pub_key;
-+
-+#ifdef USE_OPENSSL_1_1
-+  DH_get0_key(m_dh, &pub_key, NULL);
-+#else
-+  pub_key = m_dh->pub_key;
-+#endif
-+
-+  if ((int)length >= BN_num_bytes(pub_key))
-+    BN_bn2bin(pub_key, dest + length - BN_num_bytes(pub_key));
- #endif
- }
index af9f278b21b4543a0410cfd87a4e18425f4ace84..d5f8661153c746b20ef8c2b9953ed4787561be31 100644 (file)
@@ -5,21 +5,20 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libudev-fbsd
-
-PKG_RELEASE:=1
-PKG_VERSION:=20171216
+PKG_SOURCE_DATE:=2017-12-16
 PKG_SOURCE_VERSION:=fa190fdf0b22a41b5f42e3a722f754c08ad7b337
+PKG_RELEASE:=1
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
-PKG_MIRROR_HASH:=d4638099fd288a293a165304541eb9c01e828bb358a0091caa02c1327c20964b
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/jiixyj/libudev-fbsd.git
+PKG_MIRROR_HASH:=dac2d960191fe970c974f022d008ef3b712ad331e2426a51debd5aa2e208f02b
 
+PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=COPYING
-PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
 
-PKG_INSTALL:=1
+CMAKE_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/cmake.mk
@@ -34,15 +33,6 @@ define Package/libudev-fbsd
   CONFLICTS:=libudev eudev udev
 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/*.so* $(1)/usr/lib/
-       $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/
-endef
-
 define Package/libudev-fbsd/install
        $(INSTALL_DIR) $(1)/usr/lib
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
index 93129631835829b111d768854687acb69a9e2108..57ca7a377f6ab5847f4f27e7d1a5ad71a5d7561e 100644 (file)
@@ -13,7 +13,7 @@ PKG_RELEASE:=2
 
 PKG_MAINTAINER:=Matthias Schiffer <mschiffer@universe-factory.net>
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_SOURCE_URL:=https://projects.universe-factory.net/attachments/download/85
+PKG_SOURCE_URL:=https://github.com/NeoRaider/libuecc/releases/download/v$(PKG_VERSION)
 PKG_HASH:=b94aef08eab5359d0facaa7ead2ce81b193eef0c61379d9835213ebc0a46257a
 
 PKG_LICENSE:=BSD-2-Clause
@@ -26,7 +26,7 @@ define Package/libuecc
   SECTION:=libs
   CATEGORY:=Libraries
   TITLE:=Very small Elliptic Curve Cryptography library
-  URL:=http://git.universe-factory.net/libuecc/
+  URL:=https://github.com/NeoRaider/libuecc/
 endef
 
 TARGET_CFLAGS += -ffunction-sections -fdata-sections
index e7a1e874fa10aef495bc6b5355e7bfa92c16b998..e88f4ff70d91d0985f0e428bca394ac9a3306b43 100644 (file)
@@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libugpio
 PKG_VERSION:=0.0.6
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://github.com/mhei/libugpio/releases/download/v$(PKG_VERSION)
 PKG_HASH:=07d96b46560f42843e46869f45f53d48afee71f9bbcf06f43267fafad0d50b05
 
-PKG_LICENSE:=LGPL-2.1+
+PKG_LICENSE:=LGPL-2.1-or-later
 PKG_LICENSE_FILES:=COPYING.LESSER
 
 PKG_MAINTAINER:=Michael Heimpold <mhei@heimpold.de>
index 9b1aff24f1952964934de15105eb37fd5badfb47..dad07fafe2b752a3e6c45c95cfc68a8f55093383 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2014-2017 OpenWrt.org
+# Copyright (C) 2018 Jianhui Zhao
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,79 +8,55 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libuhttpd
-PKG_VERSION:=2.2.1
-PKG_RELEASE:=2
+PKG_VERSION:=3.0.1
+PKG_RELEASE:=1
 
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_VERSION:=v$(PKG_VERSION)
-PKG_SOURCE_URL=https://github.com/zhaojh329/libuhttpd.git
-PKG_MIRROR_HASH:=e6b3d540a0d32a77739ab6b028ded46fbf4997d241fabb578ef1f212581eea33
-CMAKE_INSTALL:=1
-
-PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_SOURCE_SUBDIR)
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL=https://github.com/zhaojh329/libuhttpd/releases/download/v$(PKG_VERSION)
+PKG_HASH:=07cc357a94e29c5a04eea46331352c869beed01d7fd6cc23972e878a5c4b023c
 
-PKG_LICENSE:=LGPL-2.1
+PKG_MAINTAINER:=Jianhui Zhao <jianhuizhao329@gmail.com>
+PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
 
-PKG_MAINTAINER:=Jianhui Zhao <jianhuizhao329@gmail.com>
+PKG_BUILD_PARALLEL:=1
+CMAKE_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/cmake.mk
 
-define Package/libuhttpd/default
+define Package/libuhttpd/Default
   SECTION:=libs
   CATEGORY:=Libraries
   SUBMENU:=Networking
-  TITLE:=libuhttpd
-  DEPENDS:=+libubox +liblua
-endef
-
-define Package/libuhttpd-nossl
-  $(Package/libuhttpd/default)
-  TITLE += (NO SSL)
-  VARIANT:=nossl
-  CONFLICTS:=libuhttpd-openssl libuhttpd-wolfssl libuhttpd-mbedtls
-endef
-
-define Package/libuhttpd-openssl
-  $(Package/libuhttpd/default)
-  TITLE += (openssl)
-  DEPENDS += +libustream-openssl
-  VARIANT:=openssl
-  CONFLICTS:=libuhttpd-wolfssl libuhttpd-mbedtls
+  TITLE:=A lightweight HTTP server library based on libev
+  URL:=https://github.com/zhaojh329/libuhttpd
+  DEPENDS:=+libev $(2)
+  VARIANT:=$(1)
+  PROVIDES:=libuhttpd
 endef
 
-define Package/libuhttpd-wolfssl
-  $(Package/libuhttpd/default)
-  TITLE += (wolfssl)
-  DEPENDS += +libustream-wolfssl
-  VARIANT:=wolfssl
-  CONFLICTS:=libuhttpd-mbedtls
-endef
-
-define Package/libuhttpd-mbedtls
-  $(Package/libuhttpd/default)
-  TITLE += (mbedtls)
-  DEPENDS += +libustream-mbedtls
-  VARIANT:=mbedtls
-endef
-
-ifeq ($(BUILD_VARIANT),nossl)
-  CMAKE_OPTIONS += -DUHTTPD_SSL_SUPPORT=off
+Package/libuhttpd-openssl=$(call Package/libuhttpd/Default,openssl,+PACKAGE_libuhttpd-openssl:libopenssl)
+Package/libuhttpd-wolfssl=$(call Package/libuhttpd/Default,wolfssl,+PACKAGE_libuhttpd-wolfssl:libwolfssl)
+Package/libuhttpd-mbedtls=$(call Package/libuhttpd/Default,mbedtls,+PACKAGE_libuhttpd-mbedtls:libmbedtls)
+Package/libuhttpd-nossl=$(call Package/libuhttpd/Default,nossl)
+
+ifeq ($(BUILD_VARIANT),openssl)
+  CMAKE_OPTIONS += -DUHTTPD_USE_OPENSSL=ON
+else ifeq ($(BUILD_VARIANT),wolfssl)
+  CMAKE_OPTIONS += -DUHTTPD_USE_WOLFSSL=ON
+else ifeq ($(BUILD_VARIANT),mbedtls)
+  CMAKE_OPTIONS += -DUHTTPD_USE_MBEDTLS=ON
+else
+  CMAKE_OPTIONS += -DUHTTPD_SSL_SUPPORT=OFF
 endif
 
-define Package/libuhttpd/default/install
-       $(INSTALL_DIR) $(1)/usr/lib/ $(1)/usr/lib/lua/
-       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libuhttpd.so* $(1)/usr/lib/
-       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/lua/uhttpd.so* $(1)/usr/lib/lua/
+define Package/libuhttpd-$(BUILD_VARIANT)/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libuhttpd.so* $(1)/usr/lib/
 endef
 
-Package/libuhttpd-nossl/install = $(Package/libuhttpd/default/install)
-Package/libuhttpd-openssl/install = $(Package/libuhttpd/default/install)
-Package/libuhttpd-wolfssl/install = $(Package/libuhttpd/default/install)
-Package/libuhttpd-mbedtls/install = $(Package/libuhttpd/default/install)
-
-$(eval $(call BuildPackage,libuhttpd-nossl))
+$(eval $(call BuildPackage,libuhttpd-openssl))
 $(eval $(call BuildPackage,libuhttpd-mbedtls))
 $(eval $(call BuildPackage,libuhttpd-wolfssl))
-$(eval $(call BuildPackage,libuhttpd-openssl))
+$(eval $(call BuildPackage,libuhttpd-nossl))
diff --git a/libs/libuhttpd/patches/001-fix-find-lua.patch b/libs/libuhttpd/patches/001-fix-find-lua.patch
deleted file mode 100644 (file)
index eeb633f..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-Index: libuhttpd-2.1.0/src/CMakeLists.txt
-===================================================================
---- libuhttpd-2.1.0.orig/src/CMakeLists.txt
-+++ libuhttpd-2.1.0/src/CMakeLists.txt
-@@ -8,7 +8,7 @@ set(UHTTPD_VERSION_PATCH 0)
- # Check the third party Libraries
- find_package(Libubox REQUIRED)
--find_package(Lua)
-+find_package(Lua51)
- include_directories(${CMAKE_CURRENT_BINARY_DIR} ${LIBUBOX_INCLUDE_DIR})
-@@ -20,9 +20,9 @@ option(UHTTPD_SSL_SUPPORT "SSL support"
- set(LUA_SUPPORT_DEFAULT "ON")
--if (NOT LUA_FOUND)
-+if (NOT LUA51_FOUND)
-     set(LUA_SUPPORT_DEFAULT "OFF")
--endif (NOT LUA_FOUND)
-+endif (NOT LUA51_FOUND)
- set(UHTTPD_LUA_SUPPORT_CONFIG 1)
- option(UHTTPD_LUA_SUPPORT "LUA support" ${LUA_SUPPORT_DEFAULT})
-@@ -34,9 +34,9 @@ else ()
- endif ()
- if (UHTTPD_LUA_SUPPORT)
--    if (NOT LUA_FOUND)
-+    if (NOT LUA51_FOUND)
-         message(FATAL_ERROR "Lua was not found on your system")
--    endif (NOT LUA_FOUND)
-+    endif (NOT LUA51_FOUND)
-     include_directories(${LUA_INCLUDE_DIR})
-     list(APPEND EXTRA_LIBS ${LUA_LIBRARY})
index 384ab1816cc8c271d6d4ad38006c0db66c4799f8..d9b809e2d96690cfdb85daf3b5faf57265679c5e 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libupm
-PKG_VERSION:=1.7.1
+PKG_VERSION:=2.0.0
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/intel-iot-devkit/upm/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=b253742b01146f4b86e20714aa24e75ca1e9d46629eab9aa8db070ce94cf3619
+PKG_HASH:=7dd2f4165b71e071d100b58d6a392f3cf57b0f257c82ffabf49e931b5ed6bc23
 PKG_BUILD_DIR:=$(BUILD_DIR)/upm-$(PKG_VERSION)
 
 PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>, Hirokazu MORIKAWA <morikw2@gmail.com>
@@ -21,7 +21,9 @@ PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
 
 CMAKE_INSTALL:=1
+CMAKE_BINARY_SUBDIR:=build
 PKG_USE_MIPS16:=0
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/cmake.mk
@@ -33,9 +35,7 @@ UPM_MODULES:= \
        adxrs610 am2315 apa102 apds9002 apds9930 at42qt1070 bh1749 bh1750 bh1792 biss0001 bma220 \
        bma250e bmg160 bmi160 bmm150 bmp280 bmpx8x bmx055 bno055 button buzzer cjq4435 collision \
        cwlsxxa dfrec dfrorp dfrph ds1307 ds1808lc ds18b20 ds2413 ecezo ecs1030 \
-       ehr eldriver electromagnet emg enc03r flex gas gp2y0a gprs grove grovecollision groveehr \
-       groveeldriver groveelectromagnet groveemg grovegprs grovegsr grovelinefinder grovemd \
-       grovemoisture groveo2 grovescam grovespeaker groveultrasonic grovevdiv grovewater grovewfs \
+       ehr eldriver electromagnet emg enc03r flex gas gp2y0a gprs \
        gsr guvas12d h3lis331dl hcsr04 hdc1000 hdxxvxta hka5 hlg150h hm11 hmc5883l hmtrp hp20x \
        ht9170 htu21d hx711 ili9341 ims ina132 interfaces isd1820 itg3200 jhd1313m1 joystick12 kx122 \
        kxcjk1013 kxtj3 l298 l3gd20 lcd lcdks lcm1602 ldt0028 led lidarlitev3 light linefinder lis2ds12 \
@@ -51,6 +51,7 @@ UPM_MODULES:= \
        veml6070 water waterlevel wfs wheelencoder wt5001 xbee yg1006 zfm20 \
        vcap t3311 hwxpxx h803x ozw curieimu
 # (require libbacnet) tb7300 t8100 e50hx bacnetmstp
+# (require libtinyb) 2jciebu01_ble 2jciebu01_usb
 
 define Package/libupm/Default
   SECTION:=libs
@@ -96,7 +97,7 @@ endef
 
 define Package/libupm/install/Default-python
        $(INSTALL_DIR) $(1)/usr/lib/python$(PYTHON_VERSION)/site-packages/upm
-       $(CP) $(PKG_BUILD_DIR)/src/$(2)/python$(PYTHON_VERSION)/pyupm_$(2).py \
+       $(CP) $(CMAKE_BINARY_DIR)/$(if $(filter interfaces, $(2)),,src/)$(2)/python$(PYTHON_VERSION)/pyupm_$(2).py \
                $(1)/usr/lib/python$(PYTHON_VERSION)/site-packages/upm/
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON_VERSION)/site-packages/upm/_pyupm_$(2).so \
                $(1)/usr/lib/python$(PYTHON_VERSION)/site-packages/upm/ ;
@@ -104,7 +105,7 @@ endef
 
 define Package/libupm/install/Default-python3
        $(INSTALL_DIR) $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/upm
-       $(CP) $(PKG_BUILD_DIR)/src/$(2)/python$(PYTHON3_VERSION)/pyupm_$(2).py \
+       $(CP) $(CMAKE_BINARY_DIR)/$(if $(filter interfaces, $(2)),,src/)$(2)/python$(PYTHON3_VERSION)/pyupm_$(2).py \
                $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/upm/
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON3_VERSION)/site-packages/upm/_pyupm_$(2).so \
                $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/upm/ ;
index ef07c25dc34cd5fab022140b7a54f06d0b48b06c..49147e6e2940516078e07c3cf8363acb5c671f0a 100644 (file)
@@ -1,6 +1,6 @@
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -225,14 +225,7 @@ include(GNUInstallDirs)
+@@ -231,14 +231,7 @@
  set (LIB_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}" CACHE PATH "Installation path for libraries")
  
  # Make a version file containing the current version from git.
@@ -9,10 +9,10 @@
 -# If git_describe fails, use a dirty version
 -if (${VERSION} MATCHES -NOTFOUND)
 -  set (VERSION "v1.7.1")
++  set (VERSION "v2.0.0")
 -  message (WARNING "Failed to retrieve UPM version with 'git describe' (using "
 -      "${VERSION}). Check that git is installed and this is a valid git repo.")
 -endif ()
-+set (VERSION "v1.7.1")
  
  message (STATUS "UPM Version ${VERSION}")
  
diff --git a/libs/libupm/patches/004-uint8_t.patch b/libs/libupm/patches/004-uint8_t.patch
new file mode 100644 (file)
index 0000000..4f975b0
--- /dev/null
@@ -0,0 +1,106 @@
+diff -urN a/src/bma250e/bma250e.cxx b/src/bma250e/bma250e.cxx
+--- a/src/bma250e/bma250e.cxx  2019-05-09 00:06:25.000000000 +0900
++++ b/src/bma250e/bma250e.cxx  2019-05-13 16:43:04.344536227 +0900
+@@ -195,35 +195,35 @@
+             fifoConfig(mode, axes);
+         }
+         if(tok.substr(0, 20) == "setInterruptEnable0:") {
+-            u_int8_t bits = (u_int8_t)std::stoul(tok.substr(20), nullptr, 0);
++            uint8_t bits = (uint8_t)std::stoul(tok.substr(20), nullptr, 0);
+             setInterruptEnable0(bits);
+         }
+         if(tok.substr(0, 20) == "setInterruptEnable1:") {
+-            u_int8_t bits = (u_int8_t)std::stoul(tok.substr(20), nullptr, 0);
++            uint8_t bits = (uint8_t)std::stoul(tok.substr(20), nullptr, 0);
+             setInterruptEnable1(bits);
+         }
+         if(tok.substr(0, 20) == "setInterruptEnable2:") {
+-            u_int8_t bits = (u_int8_t)std::stoul(tok.substr(20), nullptr, 0);
++            uint8_t bits = (uint8_t)std::stoul(tok.substr(20), nullptr, 0);
+             setInterruptEnable2(bits);
+         }
+         if(tok.substr(0, 17) == "setInterruptMap0:") {
+-            u_int8_t bits = (u_int8_t)std::stoul(tok.substr(17), nullptr, 0);
++            uint8_t bits = (uint8_t)std::stoul(tok.substr(17), nullptr, 0);
+             setInterruptMap0(bits);
+         }
+         if(tok.substr(0, 17) == "setInterruptMap1:") {
+-            u_int8_t bits = (u_int8_t)std::stoul(tok.substr(17), nullptr, 0);
++            uint8_t bits = (uint8_t)std::stoul(tok.substr(17), nullptr, 0);
+             setInterruptMap1(bits);
+         }
+         if(tok.substr(0, 17) == "setInterruptMap2:") {
+-            u_int8_t bits = (u_int8_t)std::stoul(tok.substr(17), nullptr, 0);
++            uint8_t bits = (uint8_t)std::stoul(tok.substr(17), nullptr, 0);
+             setInterruptMap2(bits);
+         }
+         if(tok.substr(0, 16) == "setInterruptSrc:") {
+-            u_int8_t bits = (u_int8_t)std::stoul(tok.substr(16), nullptr, 0);
++            uint8_t bits = (uint8_t)std::stoul(tok.substr(16), nullptr, 0);
+             setInterruptSrc(bits);
+         }
+         if(tok.substr(0, 26) == "setInterruptOutputControl:") {
+-            u_int8_t bits = (u_int8_t)std::stoul(tok.substr(26), nullptr, 0);
++            uint8_t bits = (uint8_t)std::stoul(tok.substr(26), nullptr, 0);
+             setInterruptOutputControl(bits);
+         }
+         if(tok.substr(0, 26) == "setInterruptLatchBehavior:") {
+diff -urN a/src/bmg160/bmg160.cxx b/src/bmg160/bmg160.cxx
+--- a/src/bmg160/bmg160.cxx    2019-05-09 00:06:25.000000000 +0900
++++ b/src/bmg160/bmg160.cxx    2019-05-13 16:44:25.516304666 +0900
+@@ -173,23 +173,23 @@
+             fifoConfig(mode, axes);
+         }
+         if(tok.substr(0, 20) == "setInterruptEnable0:") {
+-            u_int8_t bits = (u_int8_t)std::stoul(tok.substr(20), nullptr, 0);
++            uint8_t bits = (uint8_t)std::stoul(tok.substr(20), nullptr, 0);
+             setInterruptEnable0(bits);
+         }
+         if(tok.substr(0, 17) == "setInterruptMap0:") {
+-            u_int8_t bits = (u_int8_t)std::stoul(tok.substr(17), nullptr, 0);
++            uint8_t bits = (uint8_t)std::stoul(tok.substr(17), nullptr, 0);
+             setInterruptMap0(bits);
+         }
+         if(tok.substr(0, 17) == "setInterruptMap1:") {
+-            u_int8_t bits = (u_int8_t)std::stoul(tok.substr(17), nullptr, 0);
++            uint8_t bits = (uint8_t)std::stoul(tok.substr(17), nullptr, 0);
+             setInterruptMap1(bits);
+         }
+         if(tok.substr(0, 16) == "setInterruptSrc:") {
+-            u_int8_t bits = (u_int8_t)std::stoul(tok.substr(16), nullptr, 0);
++            uint8_t bits = (uint8_t)std::stoul(tok.substr(16), nullptr, 0);
+             setInterruptSrc(bits);
+         }
+         if(tok.substr(0, 26) == "setInterruptOutputControl:") {
+-            u_int8_t bits = (u_int8_t)std::stoul(tok.substr(26), nullptr, 0);
++            uint8_t bits = (uint8_t)std::stoul(tok.substr(26), nullptr, 0);
+             setInterruptOutputControl(bits);
+         }
+         if(tok.substr(0, 26) == "setInterruptLatchBehavior:") {
+diff -urN a/src/bmm150/bmm150.cxx b/src/bmm150/bmm150.cxx
+--- a/src/bmm150/bmm150.cxx    2019-05-09 00:06:25.000000000 +0900
++++ b/src/bmm150/bmm150.cxx    2019-05-13 16:45:03.228197100 +0900
+@@ -170,19 +170,19 @@
+             setOpmode(opmode);
+         }
+         if(tok.substr(0, 19) == "setInterruptEnable:") {
+-            u_int8_t bits = (u_int8_t)std::stoul(tok.substr(19), nullptr, 0);
++            uint8_t bits = (uint8_t)std::stoul(tok.substr(19), nullptr, 0);
+             setInterruptEnable(bits);
+         }
+         if(tok.substr(0, 19) == "setInterruptConfig:") {
+-            u_int8_t bits = (u_int8_t)std::stoul(tok.substr(19), nullptr, 0);
++            uint8_t bits = (uint8_t)std::stoul(tok.substr(19), nullptr, 0);
+             setInterruptConfig(bits);
+         }
+         if(tok.substr(0, 17) == "setRepetitionsXY:") {
+-            u_int8_t reps = (u_int8_t)std::stoul(tok.substr(17), nullptr, 0);
++            uint8_t reps = (uint8_t)std::stoul(tok.substr(17), nullptr, 0);
+             setRepetitionsXY(reps);
+         }
+         if(tok.substr(0, 16) == "setRepetitionsZ:") {
+-            u_int8_t reps = (u_int8_t)std::stoul(tok.substr(16), nullptr, 0);
++            uint8_t reps = (uint8_t)std::stoul(tok.substr(16), nullptr, 0);
+             setRepetitionsZ(reps);
+         }
+         if(tok.substr(0, 14) == "setPresetMode:") {
index 407a717c6090ab4a8a7357163d9a1dfe5858565b..799f19f5e98e4cd01458c9cef76c85e9fa9fd315 100644 (file)
@@ -8,6 +8,7 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=@SF/pupnp
 PKG_HASH:=188d3f786d92fe14191f17634d2d87847eee7d2b568a5257ea23262fec9973d6
 PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
+PKG_CPE_ID:=cpe:/a:portable_sdk_for_upnp_project:portable_sdk_for_upnp
 
 PKG_FIXUP:=autoreconf
 PKG_BUILD_PARALLEL:=1
index 8848404adc8903110a2c275d56100b77fea2b936..fa788c10ecf71639a52ef785f75ad62c0ed60ffe 100644 (file)
@@ -8,18 +8,19 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libupnpp
-PKG_VERSION:=0.17.0
+PKG_VERSION:=0.17.1
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://www.lesbonscomptes.com/upmpdcli/downloads
-PKG_HASH:=7035dda48207c254cbd8cd64e4e679a9e5f085a35d28c19bc2ddeba0deaff58b
+PKG_HASH:=90403b55583e932a9a04905a01bf452016a56aecbeade5c9e1454a5fbb6f01b0
+
 PKG_MAINTAINER:=Petko Bordjukov <bordjukov@gmail.com>
-PKG_LICENSE:=GPL-2.0
+PKG_LICENSE:=LGPL-2.1-or-later
 PKG_LICENSE_FILES:=COPYING
 
-PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
index 744355fe04e8b0c838c0e6d47f1b0c16dd4d83f3..401c5db54e59d8ddd8144bf23d98332f0e7717f3 100644 (file)
@@ -9,17 +9,18 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=liburcu
-PKG_VERSION:=0.9.5
+PKG_VERSION:=0.11.1
 PKG_RELEASE:=1
 
 PKG_MAINTAINER:=Daniel Salzman <daniel.salzman@nic.cz>
-PKG_LICENSE:=LGPL-2.1 GPL-2.0 GPL-3.0 MIT
+PKG_LICENSE:=LGPL-2.1-or-later GPL-2.0-or-later MIT
+PKG_LICENSE_FILES:=lgpl-2.1.txt gpl-2.0.txt lgpl-relicensing.txt
 
 PKG_SOURCE:=userspace-rcu-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://lttng.org/files/urcu/
-PKG_HASH:=d948250f1b365f052b29a4c017b7d67066c905f6ab529892cc6bc35c503a38a6
-
+PKG_HASH:=92b9971bf3f1c443edd6c09e7bf5ff3b43531e778841f16377a812c8feeb3350
 PKG_BUILD_DIR:=$(BUILD_DIR)/userspace-rcu-$(PKG_VERSION)
+
 PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
 PKG_USE_MIPS16:=0
@@ -31,7 +32,7 @@ define Package/liburcu
        CATEGORY:=Libraries
        TITLE:=User-space Read-Copy-Update library
        URL:=https://lttng.org/
-       DEPENDS:=+libpthread @!arc
+       DEPENDS:=+libpthread @!TARGET_arc770 @!TARGET_archs38
 endef
 
 define Package/liburcu/description
index 01b4c704ec6877fbd69b5706f30a8628a8c19263..851833aa900c3362848a2135a5efaf67f7045b44 100644 (file)
@@ -10,10 +10,10 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=libusbmuxd
 PKG_SOURCE_DATE:=2019-03-23
 PKG_SOURCE_VERSION:=873252dc8b4e469c7dc692064ac616104fca5f65
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_MAINTAINER:=Lukasz Baj <l.baj@radytek.com>
-PKG_LICENSE:=LGPL-2.1+
+PKG_LICENSE:=LGPL-2.1-or-later
 PKG_LICENSE_FILES:=COPYING.LGPLv2.1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_DATE).tar.gz
index b290849cb855c20da1fbb4b57f06609fc7642378..80c8b678862c0d6ad40ddf9bbc2007eeac55c138 100644 (file)
@@ -8,31 +8,33 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libuv
-PKG_VERSION:=1.24.1
+PKG_VERSION:=1.32.0
 PKG_RELEASE:=1
 
-PKG_LICENSE_FILES:=LICENSE
-
-PKG_MAINTAINER:=Marko Ratkaj <marko.ratkaj@sartura.hr>
-
 PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://dist.libuv.org/dist/v$(PKG_VERSION)/
-PKG_HASH:=3dd3eeb7b00214b0226da55b38898d3f9481d0cf744d42faf82771e0f19f2b0a
-
+PKG_HASH:=203927683d53d1b82eee766c8ffecfa8ed0e392679c15d5ad3a23504eda0ed1f
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-v$(PKG_VERSION)
-PKG_BUILD_PARALLEL:=1
 
-PKG_INSTALL:=1
-PKG_FIXUP:=autoreconf
+PKG_MAINTAINER:=Marko Ratkaj <marko.ratkaj@sartura.hr>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+PKG_CPE_ID:=cpe:/a:libuv_project:libuv
+
+CMAKE_INSTALL:=1
+CMAKE_BINARY_SUBDIR:=out/cmake
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
 
 define Package/libuv
   SECTION:=libs
   CATEGORY:=Libraries
   TITLE:=Cross-platform asychronous I/O library
-  URL:=https://github.com/libuv/libuv
+  URL:=https://libuv.org/
   DEPENDS:=+libpthread +librt
+  ABI_VERSION:=1
 endef
 
 define Package/libuv/description
@@ -41,36 +43,17 @@ define Package/libuv/description
  pyuv, and others.
 endef
 
-define Build/Configure
-       ( cd $(PKG_BUILD_DIR); ./autogen.sh )
-       $(call Build/Configure/Default)
-endef
+CMAKE_OPTIONS += -DBUILD_TESTING=OFF
 
 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/libuv.so* \
-               $(1)/usr/lib/
-       $(CP) \
-               $(PKG_INSTALL_DIR)/usr/lib/libuv.a \
-               $(1)/usr/lib/
-
-       $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
-       $(CP) \
-               $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libuv.pc \
-               $(1)/usr/lib/pkgconfig/
+       $(call Build/InstallDev/cmake,$(1))
+       $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/libuv.pc
+       $(SED) 's,/usr/lib,$$$${prefix}/lib,g' $(1)/usr/lib/pkgconfig/libuv.pc
 endef
 
 define Package/libuv/install
        $(INSTALL_DIR) $(1)/usr/lib/
-       $(CP) \
-               $(PKG_INSTALL_DIR)/usr/lib/libuv.so* \
-               $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libuv.so* $(1)/usr/lib/
 endef
 
 $(eval $(call BuildPackage,libuv))
diff --git a/libs/libuwifi/Makefile b/libs/libuwifi/Makefile
new file mode 100644 (file)
index 0000000..4cb4391
--- /dev/null
@@ -0,0 +1,56 @@
+#
+# Copyright (C) 2016 Bruno Randolf (br1@einfach.org)
+#               2019 Nick Hainke (vincent@systemli.org)
+#
+#
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libuwifi
+PKG_VERSION:=2019-05-27
+PKG_RELEASE:=2
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/br101/libuwifi.git
+PKG_SOURCE_VERSION:=bb92bc9b041a077488f2fa5a1716902c7bb23e5b
+PKG_MIRROR_HASH:=c6dc795ef6c2cc87d411d3f907974f634a132c3e732db2597f96ff25a05faa05
+
+PKG_MAINTAINER:=Bruno Randolf <br1@einfach.org>, Nick Hainke <vincent@systemli.org>
+PKG_LICENSE:=LGPL-3.0-only
+PKG_LICENSE_FILES:=COPYING
+
+PKG_BUILD_PARALLEL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libuwifi
+       SECTION:=libs
+       CATEGORY:=Libraries
+       DEPENDS:=+libradiotap +libnl-tiny
+       TITLE:=Userspace Wifi Library
+endef
+
+define Package/libuwifi/description
+       Library for parsing, generating and analyzing Wifi (WLAN 802.11) frames in userspace and related functions.
+endef
+
+MAKE_FLAGS += DEBUG=0 LIBNL=tiny BUILD_RADIOTAP=0
+
+define Build/InstallDev
+       $(INSTALL_DIR) $(1)/usr/include/uwifi
+
+       $(CP) $(PKG_BUILD_DIR)/include/uwifi/*.h $(1)/usr/include/uwifi
+       $(CP) $(PKG_BUILD_DIR)/linux/*.h $(1)/usr/include/uwifi
+
+       $(CP) $(PKG_BUILD_DIR)/ccan $(1)/usr/include/
+       $(CP) $(PKG_BUILD_DIR)/config.h $(1)/usr/include/ccan/
+
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_BUILD_DIR)/build/libuwifi.{a,so*} $(1)/usr/lib/
+endef
+
+define Package/libuwifi/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_BUILD_DIR)/build/libuwifi.so* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,libuwifi))
diff --git a/libs/libuwifi/patches/500-ccan-includes.patch b/libs/libuwifi/patches/500-ccan-includes.patch
new file mode 100644 (file)
index 0000000..7a1e6af
--- /dev/null
@@ -0,0 +1,100 @@
+Index: libuwifi-2019-05-27/ccan/build_assert/_info
+===================================================================
+--- libuwifi-2019-05-27.orig/ccan/build_assert/_info
++++ libuwifi-2019-05-27/ccan/build_assert/_info
+@@ -1,4 +1,4 @@
+-#include "config.h"
++#include "../config.h"
+ #include <stdio.h>
+ #include <string.h>
+Index: libuwifi-2019-05-27/ccan/check_type/_info
+===================================================================
+--- libuwifi-2019-05-27.orig/ccan/check_type/_info
++++ libuwifi-2019-05-27/ccan/check_type/_info
+@@ -1,4 +1,4 @@
+-#include "config.h"
++#include "../config.h"
+ #include <stdio.h>
+ #include <string.h>
+Index: libuwifi-2019-05-27/ccan/check_type/check_type.h
+===================================================================
+--- libuwifi-2019-05-27.orig/ccan/check_type/check_type.h
++++ libuwifi-2019-05-27/ccan/check_type/check_type.h
+@@ -1,7 +1,7 @@
+ /* CC0 (Public domain) - see LICENSE file for details */
+ #ifndef CCAN_CHECK_TYPE_H
+ #define CCAN_CHECK_TYPE_H
+-#include "config.h"
++#include "../config.h"
+ /**
+  * check_type - issue a warning or build failure if type is not correct.
+Index: libuwifi-2019-05-27/ccan/container_of/_info
+===================================================================
+--- libuwifi-2019-05-27.orig/ccan/container_of/_info
++++ libuwifi-2019-05-27/ccan/container_of/_info
+@@ -1,4 +1,4 @@
+-#include "config.h"
++#include "../config.h"
+ #include <stdio.h>
+ #include <string.h>
+Index: libuwifi-2019-05-27/ccan/container_of/container_of.h
+===================================================================
+--- libuwifi-2019-05-27.orig/ccan/container_of/container_of.h
++++ libuwifi-2019-05-27/ccan/container_of/container_of.h
+@@ -3,7 +3,7 @@
+ #define CCAN_CONTAINER_OF_H
+ #include <stddef.h>
+-#include "config.h"
++#include "../config.h"
+ #include <ccan/check_type/check_type.h>
+ /**
+Index: libuwifi-2019-05-27/ccan/list/_info
+===================================================================
+--- libuwifi-2019-05-27.orig/ccan/list/_info
++++ libuwifi-2019-05-27/ccan/list/_info
+@@ -1,4 +1,4 @@
+-#include "config.h"
++#include "../config.h"
+ #include <stdio.h>
+ #include <string.h>
+Index: libuwifi-2019-05-27/ccan/str/_info
+===================================================================
+--- libuwifi-2019-05-27.orig/ccan/str/_info
++++ libuwifi-2019-05-27/ccan/str/_info
+@@ -1,4 +1,4 @@
+-#include "config.h"
++#include "../config.h"
+ #include <stdio.h>
+ #include <string.h>
+Index: libuwifi-2019-05-27/ccan/str/debug.c
+===================================================================
+--- libuwifi-2019-05-27.orig/ccan/str/debug.c
++++ libuwifi-2019-05-27/ccan/str/debug.c
+@@ -1,5 +1,5 @@
+ /* CC0 (Public domain) - see LICENSE file for details */
+-#include "config.h"
++#include "../config.h"
+ #include <ccan/str/str_debug.h>
+ #include <assert.h>
+ #include <ctype.h>
+Index: libuwifi-2019-05-27/ccan/str/str.h
+===================================================================
+--- libuwifi-2019-05-27.orig/ccan/str/str.h
++++ libuwifi-2019-05-27/ccan/str/str.h
+@@ -1,7 +1,7 @@
+ /* CC0 (Public domain) - see LICENSE file for details */
+ #ifndef CCAN_STR_H
+ #define CCAN_STR_H
+-#include "config.h"
++#include "../config.h"
+ #include <string.h>
+ #include <stdbool.h>
+ #include <limits.h>
index 0ce7fd5433ccc4d5854b45fd6bd2f52ef627edb7..b0c8771a7148a3fe53a7d7732799efcce46607e1 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libuwsc
-PKG_VERSION:=3.3.1
+PKG_VERSION:=3.3.2
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL=https://github.com/zhaojh329/libuwsc/releases/download/v$(PKG_VERSION)
-PKG_HASH:=0bfff3e11d075a125a4f4c486dd17f0cdfef546dd0581116578c0d41f0f121ee
+PKG_HASH:=bae2cd13eda86876ebcf99a38a069f5e8c01717713d2fec25031051b9c47624b
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
 
 PKG_MAINTAINER:=Jianhui Zhao <jianhuizhao329@gmail.com>
index 23b891a3dfc5317d7f93e2a430cb13bd1d331027..a58b8ff0141468ad1442f02a049fdd70300fb903 100644 (file)
@@ -6,12 +6,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=v4l-utils
-PKG_VERSION:=1.16.5
+PKG_VERSION:=1.16.6
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://www.linuxtv.org/downloads/v4l-utils
-PKG_HASH:=ed80242510385017a1dc566e17a285a77222bb301f5bc19386badfcc2c19df1b
+PKG_HASH:=f9dac1878e3d5636eab7f56bb209fdfc66b94ee8a2aae54dcb4282fe63a678ae
 
 PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
 PKG_LICENSE:=GPL-2.0 LGPL-2.1
@@ -64,7 +64,7 @@ define Package/v4l-utils
   SECTION:=utils
   CATEGORY:=Utilities
   TITLE+= utilities
-  DEPENDS := +libv4l $(CXX_DEPENDS) $(ICONV_DEPENDS)
+  DEPENDS := +libv4l $(CXX_DEPENDS) $(ICONV_DEPENDS) $(INTL_DEPENDS)
 endef
 
 define Package/v4l-utils/description
index f1850c82c6382ac90a99432514ecf5a60fa257d4..695f8e3e0490f60697860b540586c200c2a8ed7c 100644 (file)
  #include <linux/cec-funcs.h>
 --- a/utils/common/media-info.cpp
 +++ b/utils/common/media-info.cpp
-@@ -20,7 +20,7 @@
+@@ -21,6 +21,7 @@
  #include <linux/media.h>
  
--#include <fstream>
+ #include <fstream>
 +#include <iostream>
  #include <media-info.h>
  
  #include <map>
 --- a/utils/v4l2-compliance/media-info.cpp
 +++ b/utils/v4l2-compliance/media-info.cpp
-@@ -20,7 +20,7 @@
+@@ -21,6 +21,7 @@
  #include <linux/media.h>
  
--#include <fstream>
+ #include <fstream>
 +#include <iostream>
  #include <media-info.h>
  
  static std::string num2s(unsigned num, bool is_hex = true)
 --- a/utils/v4l2-ctl/media-info.cpp
 +++ b/utils/v4l2-ctl/media-info.cpp
-@@ -20,7 +20,7 @@
+@@ -21,6 +21,7 @@
  #include <linux/media.h>
  
--#include <fstream>
+ #include <fstream>
 +#include <iostream>
  #include <media-info.h>
  
index c476e5ed7e7ac40f58aa566a6c31255fe58e29cf..5fbb60422def001156ff34342838d521ef605b30 100644 (file)
@@ -3,11 +3,9 @@ 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)
+@@ -679,16 +679,17 @@ static bool parse_subset(char *optarg)
  
  static bool parse_next_subopt(char **subs, char **value)
  {
index 95c85598be3bc80d5a81f94a3b12612be6e39381..d755506b0087b601126f2fa145b36ef53993afbb 100644 (file)
@@ -16,6 +16,7 @@ PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
 
 PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:xiph.org:libvorbis
 
 PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
index 81ad4cd361f120d57722488046fd9a006c905f05..5aab2602c5d1c2660f5657afa59b41636f9a0e77 100644 (file)
@@ -9,12 +9,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libvpx
-PKG_VERSION:=1.8.0
+PKG_VERSION:=1.8.1
 PKG_RELEASE:=1
 
 PKG_REV:=v$(PKG_VERSION)
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_REV).tar.gz
-PKG_MIRROR_HASH:=caf53ffff549fefb14d8d054db014c6394e1955d199b80dc985ef6098bd4213d
+PKG_MIRROR_HASH:=6703842a870727b621a82efe5b2ff6f5553d41f7b0905dd4fde1f8bdf062d6ea
 PKG_SOURCE_URL:=https://chromium.googlesource.com/webm/libvpx
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_VERSION:=$(PKG_REV)
index ace8e2c878f23de96e4070196a35db26de4ea8e2..64fd1b497ad69ec73e81a5176099b7130296c45e 100644 (file)
@@ -1,41 +1,35 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libwangle
-PKG_VERSION:=2019.05.27.00
+PKG_VERSION:=2019.09.22.00
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://codeload.github.com/facebook/wangle/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=935d94658133279d98de27ab7c78801c87f16414b8eec43766798acc5b14f549
-PKG_BUILD_DIR:=$(BUILD_DIR)/wangle-$(PKG_VERSION)
+PKG_SOURCE_VERSION:=fb79e25af6d4e184587b62475fb3444643ae8867
+PKG_SOURCE_URL:=https://codeload.github.com/facebook/wangle/tar.gz/$(PKG_SOURCE_VERSION)?
+PKG_HASH:=e973cad492d025c93af49c245b1f77b484df09a4d70ade069648d633d5a85e0e
+PKG_BUILD_DIR:=$(BUILD_DIR)/wangle-$(PKG_SOURCE_VERSION)
 
+PKG_MAINTAINER:=Amol Bhave <ambhave@fb.com>
 PKG_LICENSE:=Apache-2.0
 PKG_LICENSE_FILES:=LICENSE
 
-include $(INCLUDE_DIR)/package.mk
-include $(INCLUDE_DIR)/cmake.mk
-
 PKG_BUILD_PARALLEL:=1
+PKG_BUILD_DEPENDS:=libfizz
 CMAKE_SOURCE_SUBDIR:=wangle
-CMAKE_OPTIONS:= \
-       -DBUILD_SHARED_LIBS=ON
 CMAKE_INSTALL:=1
 
-define Package/libwangle
-       SECTION:=libs
-       CATEGORY:=Libraries
-       TITLE:=Wangle: C++ networking library
-       DEPENDS:=+libfizz
-endef
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
 
-define Package/libwangle/description
-       Wangle is a framework providing a set of common client/server abstractions for building services in a consistent, modular, and composable way.
-       This package includes the shared library.
+define Package/libwangle
+  SECTION:=libs
+  CATEGORY:=Libraries
+  TITLE:=Wangle: C++ networking library
+  URL:=https://github.com/facebook/wangle
 endef
 
-define Package/libwangle/install
-       $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libwangle.so* $(1)/usr/lib/
-endef
+TARGET_CXXFLAGS += -ffunction-sections -fdata-sections -flto
+TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
 
 $(eval $(call BuildPackage,libwangle))
diff --git a/libs/libwangle/patches/010-c++14.patch b/libs/libwangle/patches/010-c++14.patch
new file mode 100644 (file)
index 0000000..46b1281
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/wangle/CMakeLists.txt
++++ b/wangle/CMakeLists.txt
+@@ -9,7 +9,7 @@ cmake_minimum_required(VERSION 3.0.2)
+ project("wangle" VERSION 1.0.0 LANGUAGES CXX C)
+-add_compile_options(-std=c++1z)
++add_compile_options(-std=c++14)
+ set(CMAKE_POSITION_INDEPENDENT_CODE ON)
+ set(CMAKE_MODULE_PATH
+   "${CMAKE_CURRENT_SOURCE_DIR}/cmake/"
diff --git a/libs/libwebp/Makefile b/libs/libwebp/Makefile
new file mode 100644 (file)
index 0000000..319d1a0
--- /dev/null
@@ -0,0 +1,65 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libwebp
+PKG_VERSION:=1.0.3
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://storage.googleapis.com/downloads.webmproject.org/releases/webp
+PKG_HASH:=e20a07865c8697bba00aebccc6f54912d6bc333bb4d604e6b07491c1a226b34f
+
+PKG_MAINTAINER:=
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=COPYING
+
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
+PKG_USE_MIPS16:=0
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libwebp
+  SECTION:=libs
+  CATEGORY:=Libraries
+  TITLE:=WebP library
+  URL:=https://www.webmproject.org
+endef
+
+define Package/libwebp/description
+  The libwebp package contains a library for the WebP format.
+endef
+
+CONFIGURE_ARGS += \
+       --enable-shared \
+       --disable-static \
+       --disable-neon-rtcd \
+       --disable-gl \
+       --disable-sdl \
+       --disable-gif \
+       --disable-jpeg \
+       --disable-png \
+       --disable-tiff \
+       --disable-wic \
+       --disable-libwebpmux \
+       --disable-libwebpdemux \
+       --disable-libwebpdecoder \
+       --disable-libwebpextras \
+       --without-pic
+
+TARGET_CFLAGS += $(FPIC) -flto
+
+define Build/InstallDev
+       $(INSTALL_DIR) $(1)/usr/include/webp
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/webp/* $(1)/usr/include/webp/
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libwebp* $(1)/usr/lib/
+       $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libwebp.pc $(1)/usr/lib/pkgconfig/
+endef
+
+define Package/libwebp/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libwebp.s* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,libwebp))
index 445044e10ac5a292f6c86bdac407a330e04c9cd1..e0b4af6d1ec3890c1aa36e0cc404cfd10b4fb77d 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libxml2
 PKG_VERSION:=2.9.9
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://xmlsoft.org/sources/
@@ -40,6 +40,34 @@ define Package/libxml2/description
   A library for manipulating XML and HTML resources.
 endef
 
+define Package/libxml2-dev
+  SECTION:=devel
+  CATEGORY:=Development
+  SUBMENU:=Libraries
+  TITLE:=Development files for libxml2
+  URL:=http://xmlsoft.org/
+  DEPENDS:=+libxml2
+endef
+
+define Package/libxml2-dev/description
+  A library for manipulating XML and HTML resources.
+
+  This package contains the headers and xml2-config binary.
+endef
+
+define Package/libxml2-utils
+  SECTION:=utils
+  CATEGORY:=Utilities
+  TITLE:=XML command line utilities (xmllint...)
+  URL:=http://xmlsoft.org/
+  DEPENDS:=+libxml2
+endef
+
+define Package/libxml2-utils/description
+  This package contains the binaries xmllint and xmlcatalog
+  from libxml2, a library for manipulating XML and HTML resources.
+endef
+
 TARGET_CFLAGS += $(FPIC)
 
 CONFIGURE_ARGS += \
@@ -130,7 +158,32 @@ endef
 
 define Package/libxml2/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxml2.so* $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxml2.so.* $(1)/usr/lib/
+endef
+
+define Package/libxml2-dev/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/xml2-config $(1)/usr/bin/
+       $(SED) "s,$(STAGING_DIR),,g" $(1)/usr/bin/xml2-config
+
+       $(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/libxml2.so $(1)/usr/lib/
+
+       $(INSTALL_DIR) $(1)/usr/lib/{cmake,pkgconfig}
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/{cmake,pkgconfig} $(1)/usr/lib/
+       $(SED) "s,$(STAGING_DIR),,g" $(1)/usr/lib/pkgconfig/*.pc
+
+       $(INSTALL_DIR) $(1)/usr/share/aclocal
+       $(CP) $(PKG_INSTALL_DIR)/usr/share/aclocal/* $(1)/usr/share/aclocal
+endef
+
+define Package/libxml2-utils/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/xmllint $(1)/usr/bin/
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/xmlcatalog $(1)/usr/bin/
 endef
 
 define Host/Install
@@ -140,3 +193,5 @@ endef
 
 $(eval $(call HostBuild))
 $(eval $(call BuildPackage,libxml2))
+$(eval $(call BuildPackage,libxml2-dev))
+$(eval $(call BuildPackage,libxml2-utils))
index 795bf2a56008d9f0338041bdf52729607abcce5d..b31989e4a53b06bc210dacb462cb6ea6bfcdfb7c 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libxslt
 PKG_VERSION:=1.1.33
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:= \
diff --git a/libs/libxslt/patches/101-fix-cve-2019-13117.patch b/libs/libxslt/patches/101-fix-cve-2019-13117.patch
new file mode 100644 (file)
index 0000000..78ebb90
--- /dev/null
@@ -0,0 +1,29 @@
+From c5eb6cf3aba0af048596106ed839b4ae17ecbcb1 Mon Sep 17 00:00:00 2001
+From: Nick Wellnhofer <wellnhofer@aevum.de>
+Date: Sat, 27 Apr 2019 11:19:48 +0200
+Subject: [PATCH] Fix uninitialized read of xsl:number token
+
+Found by OSS-Fuzz.
+---
+ libxslt/numbers.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/libxslt/numbers.c b/libxslt/numbers.c
+index 89e1f668..75c31eba 100644
+--- a/libxslt/numbers.c
++++ b/libxslt/numbers.c
+@@ -382,7 +382,10 @@ xsltNumberFormatTokenize(const xmlChar *format,
+               tokens->tokens[tokens->nTokens].token = val - 1;
+               ix += len;
+               val = xmlStringCurrentChar(NULL, format+ix, &len);
+-          }
++          } else {
++                tokens->tokens[tokens->nTokens].token = (xmlChar)'0';
++                tokens->tokens[tokens->nTokens].width = 1;
++            }
+       } else if ( (val == (xmlChar)'A') ||
+                   (val == (xmlChar)'a') ||
+                   (val == (xmlChar)'I') ||
+-- 
+2.21.0
+
diff --git a/libs/libxslt/patches/102-fix-cve-2019-13118.patch b/libs/libxslt/patches/102-fix-cve-2019-13118.patch
new file mode 100644 (file)
index 0000000..b377f4b
--- /dev/null
@@ -0,0 +1,71 @@
+From 6ce8de69330783977dd14f6569419489875fb71b Mon Sep 17 00:00:00 2001
+From: Nick Wellnhofer <wellnhofer@aevum.de>
+Date: Mon, 3 Jun 2019 13:14:45 +0200
+Subject: [PATCH] Fix uninitialized read with UTF-8 grouping chars
+
+The character type in xsltFormatNumberConversion was too narrow and
+an invalid character/length combination could be passed to
+xsltNumberFormatDecimal, resulting in an uninitialized read.
+
+Found by OSS-Fuzz.
+---
+ libxslt/numbers.c         | 5 +++--
+ tests/docs/bug-222.xml    | 1 +
+ tests/general/bug-222.out | 2 ++
+ tests/general/bug-222.xsl | 6 ++++++
+ 4 files changed, 12 insertions(+), 2 deletions(-)
+ create mode 100644 tests/docs/bug-222.xml
+ create mode 100644 tests/general/bug-222.out
+ create mode 100644 tests/general/bug-222.xsl
+
+diff --git a/libxslt/numbers.c b/libxslt/numbers.c
+index f1ed8846..20b99d5a 100644
+--- a/libxslt/numbers.c
++++ b/libxslt/numbers.c
+@@ -1298,13 +1298,14 @@ OUTPUT_NUMBER:
+     number = floor((scale * number + 0.5)) / scale;
+     if ((self->grouping != NULL) &&
+         (self->grouping[0] != 0)) {
++        int gchar;
+       len = xmlStrlen(self->grouping);
+-      pchar = xsltGetUTF8Char(self->grouping, &len);
++      gchar = xsltGetUTF8Char(self->grouping, &len);
+       xsltNumberFormatDecimal(buffer, floor(number), self->zeroDigit[0],
+                               format_info.integer_digits,
+                               format_info.group,
+-                              pchar, len);
++                              gchar, len);
+     } else
+       xsltNumberFormatDecimal(buffer, floor(number), self->zeroDigit[0],
+                               format_info.integer_digits,
+diff --git a/tests/docs/bug-222.xml b/tests/docs/bug-222.xml
+new file mode 100644
+index 00000000..69d62f2c
+--- /dev/null
++++ b/tests/docs/bug-222.xml
+@@ -0,0 +1 @@
++<doc/>
+diff --git a/tests/general/bug-222.out b/tests/general/bug-222.out
+new file mode 100644
+index 00000000..e3139698
+--- /dev/null
++++ b/tests/general/bug-222.out
+@@ -0,0 +1,2 @@
++<?xml version="1.0"?>
++1⠢0
+diff --git a/tests/general/bug-222.xsl b/tests/general/bug-222.xsl
+new file mode 100644
+index 00000000..e32dc473
+--- /dev/null
++++ b/tests/general/bug-222.xsl
+@@ -0,0 +1,6 @@
++<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
++  <xsl:decimal-format name="f" grouping-separator="⠢"/>
++  <xsl:template match="/">
++    <xsl:value-of select="format-number(10,'#⠢0','f')"/>
++  </xsl:template>
++</xsl:stylesheet>
+-- 
+2.21.0
+
index 6e3547b7dc91332e4a350f9ac3dc79b1f1d9eced..6d5cba9976937b5441df3275122af2f9055fccc9 100644 (file)
@@ -9,9 +9,9 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libyang
 PKG_VERSION:=0.16-r3
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
-PKG_LICENSE:=GPL-2.0+
+PKG_LICENSE:=GPL-2.0-or-later
 PKG_MAINTAINER:=Mislav Novakovic <mislav.novakovic@sartura.hr>
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
diff --git a/libs/lmdb/Makefile b/libs/lmdb/Makefile
new file mode 100644 (file)
index 0000000..acb77ad
--- /dev/null
@@ -0,0 +1,97 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=lmdb
+PKG_VERSION:=0.9.24
+PKG_RELEASE:=1
+
+PKG_SOURCE:=LMDB_$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/LMDB/lmdb/tar.gz/LMDB_$(PKG_VERSION)?
+PKG_HASH:=44602436c52c29d4f301f55f6fd8115f945469b868348e3cddaf91ab2473ea26
+PKG_BUILD_DIR:=$(BUILD_DIR)/lmdb-LMDB_$(PKG_VERSION)
+
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+PKG_LICENSE:=OLDAP-2.8
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+MAKE_PATH:=libraries/liblmdb
+
+define Package/lmdb/Default
+  SECTION:=libs
+  CATEGORY:=Libraries
+  TITLE:=Lightning Memory-Mapped Database
+  URL:=https://symas.com/lmdb/
+endef
+
+define Package/lmdb
+       $(call Package/lmdb/Default)
+  TITLE+= shared library
+endef
+
+define Package/lmdb/description
+  LMDB is an ultra-fast, ultra-compact key-value
+  embedded data store developed for the OpenLDAP Project.
+endef
+
+define Package/lmdb-utils
+       $(call Package/lmdb/Default)
+  TITLE+= utils
+  MDEPENDS+= lmdb
+endef
+
+define Package/lmdb-utils/description
+  LMDB environment status and copy tool
+endef
+
+define Package/lmdb-test
+       $(call Package/lmdb/Default)
+  TITLE+= test
+  MDEPENDS+= lmdb
+endef
+
+define Package/lmdb-test/description
+  LMDB test application
+endef
+
+define Build/Prepare
+       $(call Build/Prepare/Default)
+       $(SED) 's,%%PKG_VERSION%%,$(PKG_VERSION),g' $(PKG_BUILD_DIR)/liblmdb.pc
+endef
+
+define Build/Compile
+       $(MAKE) -C "$(PKG_BUILD_DIR)/$(MAKE_PATH)/" \
+               CC="$(TARGET_CC)" \
+               CFLAGS+="$(TARGET_CFLAGS)" \
+               LDFLAGS+="$(TARGET_LDFLAGS)" \
+               FPIC="$(FPIC)"
+endef
+
+define Build/InstallDev
+       $(INSTALL_DIR) $(1)/usr/include
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_BUILD_DIR)/$(MAKE_PATH)/lmdb.h $(1)/usr/include
+       $(CP) $(PKG_BUILD_DIR)/$(MAKE_PATH)/liblmdb.{a,so} $(1)/usr/lib
+       $(INSTALL_DIR) $(1)/usr/lib/pkgconfig/
+       $(CP) $(PKG_BUILD_DIR)/liblmdb.pc $(1)/usr/lib/pkgconfig/lmdb.pc
+endef
+
+define Package/lmdb/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/local/lib/*.so $(1)/usr/lib
+endef
+
+define Package/lmdb-utils/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/local/bin/mdb_{stat,copy,dump,load} $(1)/usr/bin
+endef
+
+define Package/lmdb-test/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(MAKE_PATH)/mtest $(1)/usr/bin
+endef
+
+$(eval $(call BuildPackage,lmdb))
+$(eval $(call BuildPackage,lmdb-utils))
+$(eval $(call BuildPackage,lmdb-test))
diff --git a/libs/lmdb/patches/010-fix-makefile.patch b/libs/lmdb/patches/010-fix-makefile.patch
new file mode 100644 (file)
index 0000000..23a30fa
--- /dev/null
@@ -0,0 +1,23 @@
+--- a/libraries/liblmdb/Makefile
++++ b/libraries/liblmdb/Makefile
+@@ -34,6 +34,7 @@ libdir = $(exec_prefix)/lib
+ includedir = $(prefix)/include
+ datarootdir = $(prefix)/share
+ mandir = $(datarootdir)/man
++FPIC ?= -fPIC
+
+ ########################################################################
+
+@@ -86,10 +87,10 @@ midl.o: midl.c midl.h
+       $(CC) $(CFLAGS) $(CPPFLAGS) -c midl.c
+
+ mdb.lo: mdb.c lmdb.h midl.h
+-      $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) -c mdb.c -o $@
++      $(CC) $(CFLAGS) $(FPIC) $(CPPFLAGS) -c mdb.c -o $@
+
+ midl.lo: midl.c midl.h
+-      $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) -c midl.c -o $@
++      $(CC) $(CFLAGS) $(FPIC) $(CPPFLAGS) -c midl.c -o $@
+
+ %:    %.o
+       $(CC) $(CFLAGS) $(LDFLAGS) $^ $(LDLIBS) -o $@
diff --git a/libs/lmdb/src/liblmdb.pc b/libs/lmdb/src/liblmdb.pc
new file mode 100644 (file)
index 0000000..d6fcaf6
--- /dev/null
@@ -0,0 +1,12 @@
+prefix=/usr
+exec_prefix=/usr
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+
+Name: Lightning Memory-Mapped Database
+Description: Lightning Memory-Mapped Database
+Version: %%PKG_VERSION%%
+Requires:
+Libs: -L${libdir} -llmdb
+Cflags: -I${includedir}
index 314d556b423d054fc1711fc824fb456bf4522112..dc3cfc322a5b280702e8922328208c4137a742d1 100644 (file)
@@ -9,15 +9,19 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=log4cplus
-PKG_VERSION:=2.0.3
+PKG_VERSION:=2.0.4
 PKG_RELEASE:=2
-PKG_MAINTAINER:=BangLang Huang <banglang.huang@foxmail.com>, Rosy Song <rosysong@rosinson.com>
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_SOURCE_URL:=https://github.com/log4cplus/log4cplus/releases/download/REL_2_0_3/
-PKG_HASH:=c55742c348d09b33219eea00d65b05bdd78ea967761b980b7134855fe24c5f73
+PKG_SOURCE_URL:=@SF/$(PKG_NAME)
+PKG_HASH:=faf15f3651e2d0f9f9cf2c1bfcb38ec4962f22f4a671410453a27c0976da5e36
 
+PKG_MAINTAINER:=BangLang Huang <banglang.huang@foxmail.com>, Rosy Song <rosysong@rosinson.com>
+PKG_LICENSE:=BSD-2-Clause Apache-2.0
 PKG_LICENSE_FILES:=LICENSE
+
+HOST_BUILD_PARALLEL:=1
+PKG_BUILD_PARALLEL:=1
 CMAKE_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
@@ -38,9 +42,8 @@ define Package/log4cplus/description
   configuration. It is modeled after the Java log4j API.
 endef
 
-TARGET_CFLAGS += -flto
-
-TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
+CMAKE_HOST_OPTIONS += \
+       -DCMAKE_INSTALL_LIBDIR:PATH=lib
 
 CMAKE_OPTIONS += \
        -DLOG4CPLUS_BUILD_LOGGINGSERVER:BOOL=OFF \
@@ -48,17 +51,13 @@ CMAKE_OPTIONS += \
        -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
+TARGET_CFLAGS += -flto
+TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
 
 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))
+$(eval $(call HostBuild))
index 2fe3740400f7adb6aac493419164e09f93e42811..2dd3dffead84db02c5ee33aa4e068e723889d988 100644 (file)
@@ -18,6 +18,7 @@ PKG_HASH:=9e8420f90d5f963f7aa32bc6d44adc1e491136f687c69ffb7a3075d33b40852b
 PKG_MAINTAINER:=
 PKG_LICENSE:=LGPL-2.1 GPL-2.0
 PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:lttng:ust
 
 PKG_FIXUP:=autoreconf
 PKG_USE_MIPS16:=0
index f78d24ec82b76f8522eaae49e8b93f4dffcc0d7c..d7523d48e0c1b33335923db7377aedf5ad854c10 100644 (file)
@@ -8,21 +8,20 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=measurement-kit
-PKG_VERSION:=0.10.3
-PKG_RELEASE=1
+PKG_VERSION:=0.10.6
+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:=04bc1832fbaa54a9fde4923e8f44a2f99610a862c228dd05977c36f54870d80f
-
-PKG_INSTALL:=1
-PKG_FIXUP:=autoreconf
-PKG_BUILD_PARALLEL:=1
+PKG_HASH:=5ec94e522c3bc43cbf749659c18d4b13bcfbb2874db4d6b4e21b160d76dd5bd0
 
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
 PKG_LICENSE:=BSD-2-Clause
 PKG_LICENSE_FILES:=LICENSE
 
-PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
diff --git a/libs/measurement-kit/patches/003-fix-openssl-depredecated-api.patch b/libs/measurement-kit/patches/003-fix-openssl-depredecated-api.patch
deleted file mode 100644 (file)
index 9afc65e..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-From 45904ae4548c848d053bea20e2f3e38189043c3a Mon Sep 17 00:00:00 2001
-From: Rosen Penev <rosenp@gmail.com>
-Date: Fri, 3 May 2019 23:37:10 -0700
-Subject: [PATCH] Fix compilation without deprecated OpenSSL APIs (#1785)
-
-Initialization is deprecated and causes compile errors with OpenSSL 1.1 when
-deprecated APIs are disabled.
----
- src/libmeasurement_kit/net/libssl.hpp | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/src/libmeasurement_kit/net/libssl.hpp b/src/libmeasurement_kit/net/libssl.hpp
-index eacee86ae..d1cecebbb 100644
---- a/src/libmeasurement_kit/net/libssl.hpp
-+++ b/src/libmeasurement_kit/net/libssl.hpp
-@@ -38,10 +38,12 @@ static inline void libssl_init_once(SharedPtr<Logger> logger) {
-         static bool initialized = false;
-         if (!initialized) {
-             logger->debug2("initializing libssl once");
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
-             SSL_library_init();
-             ERR_load_crypto_strings();
-             SSL_load_error_strings();
-             OpenSSL_add_all_algorithms();
-+#endif
-             initialized = true;
-         }
-     });
diff --git a/libs/measurement-kit/patches/010-nextafter.patch b/libs/measurement-kit/patches/010-nextafter.patch
new file mode 100644 (file)
index 0000000..b7004a6
--- /dev/null
@@ -0,0 +1,14 @@
+--- a/include/private/catch.hpp
++++ b/include/private/catch.hpp
+@@ -11095,7 +11095,11 @@ bool almostEqualUlps(FP lhs, FP rhs, int maxUlpDiff) {
+ template <typename FP>
+ FP step(FP start, FP direction, int steps) {
+     for (int i = 0; i < steps; ++i) {
++#ifndef __UCLIBC__
+         start = std::nextafter(start, direction);
++#else
++        start = ::nextafterf(start, direction);
++#endif
+     }
+     return start;
+ }
index 0e500ca8010fe548b723e4d8166df29400d8590e..a7ef3de78f99a90438ebd9e094681d2819d8dbf2 100644 (file)
@@ -1,14 +1,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mxml
-PKG_VERSION:=2.12
+PKG_VERSION:=3.1
 PKG_RELEASE:=1
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/michaelrsweet/mxml.git
-PKG_SOURCE_VERSION:=3aaa12c7d709d05286255d191998f29105dd407a
-PKG_MIRROR_HASH:=fccb77d4c9f6139db9937483596068f40112424ef261025227cda258a5561002
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://github.com/michaelrsweet/$(PKG_NAME)/releases/download/v$(PKG_VERSION)/
+PKG_HASH:=1ac8d252f62f9dc2b2004518c70d2da313bdfcd92b8350e215f46064a34b52fc
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
 
 PKG_FIXUP:=autoreconf
index 65be717d6319d428b0d0bb89f59c6dfbf53b0c71..a482818fd4c3693af7695dbee846d6c9f609ad80 100644 (file)
@@ -15,6 +15,8 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://web.archive.org/web/20170923042221/http://webdav.org:80/neon/
 PKG_HASH:=db0bd8cdec329b48f53a6f00199c92d5ba40b0f015b153718d1b15d3d967fbca
 
+PKG_CPE_ID:=cpe:/a:webdav:neon
+
 PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
index 462d35dfc4bb3774b86306fb5668730060855d00..3f10fb0c13f1ceb1d58681a7848984717b12c9cc 100644 (file)
@@ -11,16 +11,16 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=newt
 PKG_VERSION:=0.52.21
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://releases.pagure.org/newt
 PKG_HASH:=265eb46b55d7eaeb887fca7a1d51fe115658882dfe148164b6c49fccac5abb31
 
-PKG_LICENSE:=LGPL-2.0
+PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
+PKG_LICENSE:=LGPL-2.0-only
 PKG_LICENSE_FILES:=COPYING
 PKG_CPE_ID:=cpe:/a:fedorahosted:newt
-PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
 
 PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
@@ -89,7 +89,9 @@ CONFIGURE_ARGS+= \
        --without-gpm-support \
        --with-colorsfile=/etc/newt/palette
 
-MAKE_VARS+= PYTHON_CONFIG_PATH="$(STAGING_DIR)/usr/bin"
+CONFIGURE_VARS += $(if $(CONFIG_BUILD_NLS),ac_cv_lib_c_gettext=no)
+
+MAKE_VARS+= PYTHON_CONFIG_PATH="$(STAGING_DIR)/host/bin"
 
 Build/Compile=$(call Build/Compile/Default,)
 
index a01ba131f48a53e47ede74aba0170b54279c17a1..9f7dc69f0f7e0e05546bdbe2bd72bd31311f7c5f 100644 (file)
@@ -7,7 +7,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=nspr
-PKG_VERSION:=4.21
+PKG_VERSION:=4.22
 PKG_RELEASE:=1
 PKG_MAINTAINER:=Lucian Cristian <lucian.cristian@gmail.com>
 PKG_LICENCE:=MPL-2.0
@@ -16,7 +16,7 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:= \
     https://download.cdn.mozilla.net/pub/$(PKG_NAME)/releases/v$(PKG_VERSION)/src/ \
     https://archive.mozilla.org/pub/$(PKG_NAME)/releases/v$(PKG_VERSION)/src/
-PKG_HASH:=15ea32c7b100217b6e3193bc03e77f485d9bf7504051443ba9ce86d1c17c6b5a
+PKG_HASH:=c9e4b6cc24856ec93202fe13704b38b38ba219f0f2aeac93090ce2b6c696d430
 
 PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
index 4ab1df58e412941d939cb1780c3786ee8e85d8ba..184f89cf4992ab51aef4f7b9208133aab5aeb1d2 100644 (file)
@@ -26,7 +26,7 @@ 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)
+@@ -110,13 +110,7 @@ GARBAGE += $(TINC)
  
  $(TINC):
        @$(MAKE_OBJDIR)
@@ -45,7 +45,7 @@ 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)
+@@ -112,13 +112,7 @@ GARBAGE += $(TINC)
  
  $(TINC):
        @$(MAKE_OBJDIR)
@@ -64,7 +64,7 @@ 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
+@@ -110,13 +110,7 @@ endif
  
  $(TINC):
        @$(MAKE_OBJDIR)
@@ -83,7 +83,7 @@ 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)
+@@ -310,13 +310,7 @@ GARBAGE += $(TINC)
  
  $(TINC):
        @$(MAKE_OBJDIR)
diff --git a/libs/nspr/patches/002-Add-ARC-support.patch b/libs/nspr/patches/002-Add-ARC-support.patch
deleted file mode 100644 (file)
index 92785cc..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-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/002-native_and_musl_fix.patch b/libs/nspr/patches/002-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/nspr/patches/003-native_and_musl_fix.patch b/libs/nspr/patches/003-native_and_musl_fix.patch
deleted file mode 100644 (file)
index c5485db..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
---- 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
index bec217b227dc11282576201261f6b4abbe3b90f0..396c6f8db41058aa269689ec1b74a764d729fe8e 100644 (file)
@@ -7,16 +7,19 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=nss
-PKG_VERSION:=3.44
+PKG_VERSION:=3.46
 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:=a5620e59b6eeedfd5a12c9298b50ad92e9898b223e214eb675e36f4ffb5b6aff
+PKG_HASH:=6b699649d285602ba258a4b0957cb841eafc94eff5735a9da8da0adbb9a10cef
+
+PKG_MAINTAINER:=Lucian Cristian <lucian.cristian@gmail.com>
+PKG_LICENCE:=MPL-2.0
+PKG_LICENSE_FILES:=nss/COPYING
+PKG_CPE_ID:=cpe:/a:mozilla:network_security_services
 
 PKG_BUILD_PARALLEL:=0
 
@@ -40,7 +43,7 @@ define Package/nss-utils
 endef
 
 define Package/libnss/description
-  Network Security Services (NSS) is a set of libraries designed to support 
+  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.
diff --git a/libs/nss/patches/010-nanosleep.patch b/libs/nss/patches/010-nanosleep.patch
new file mode 100644 (file)
index 0000000..2c32499
--- /dev/null
@@ -0,0 +1,33 @@
+--- a/nss/lib/freebl/stubs.c
++++ b/nss/lib/freebl/stubs.c
+@@ -503,7 +503,8 @@ extern PRStatus
+ PR_Sleep_stub(PRIntervalTime ticks)
+ {
+     STUB_SAFE_CALL1(PR_Sleep, ticks);
+-    usleep(ticks * 1000);
++    const struct timespec req = {0, ticks * 1000 * 1000};
++    nanosleep(&req, NULL);
+     return PR_SUCCESS;
+ }
+--- a/nss/lib/sqlite/sqlite3.c
++++ b/nss/lib/sqlite/sqlite3.c
+@@ -33761,7 +33761,8 @@ static int proxyConchLock(unixFile *pFile, uuid_t myHostID, int lockType){
+       
+       if( nTries==1 ){
+         conchModTime = buf.st_mtimespec;
+-        usleep(500000); /* wait 0.5 sec and try the lock again*/
++        const struct timespec req = {0, 500 * 1000 * 1000};
++        nanosleep(&req, NULL); /* wait 0.5 sec and try the lock again*/
+         continue;  
+       }
+@@ -33787,7 +33788,7 @@ static int proxyConchLock(unixFile *pFile, uuid_t myHostID, int lockType){
+           /* don't break the lock on short read or a version mismatch */
+           return SQLITE_BUSY;
+         }
+-        usleep(10000000); /* wait 10 sec and try the lock again */
++        sleep(10); /* wait 10 sec and try the lock again */
+         continue; 
+       }
+       
index 62ba644b8ea14e25da9a94fbd3d75a6666603f1a..f782705b514e6a675bd4246626c2df641a8ab298 100644 (file)
@@ -5,14 +5,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=oniguruma
-PKG_VERSION:=6.9.2
+PKG_VERSION:=6.9.3
 PKG_RELEASE:=1
 
 PKG_SOURCE:=onig-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/kkos/oniguruma/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=3b568a9050839e7828b2f2d5bc9cd3650979b6b54a080f54c515320dddda06b0
+PKG_HASH:=dc6dec742941e24b761cea1b9a2f12e750879107ae69fd80ae1046459d4fb1db
 
-PKG_MAINTAINER:=Eneas U de Queiroz <cote2004-github@yahoo.com.br>
+PKG_MAINTAINER:=Eneas U de Queiroz <cotequeiroz@gmail.com>
 PKG_LICENSE:=BSD-2-Clause
 PKG_LICENSE_FILES:=COPYING
 PKG_CPE_ID:=cpe:/a:oniguruma_project:oniguruma
@@ -27,7 +27,6 @@ define Package/oniguruma
     CATEGORY:=Libraries
     TITLE:=Regular expression library for different character encodings
     URL:=https://github.com/kkos/oniguruma
-    DEPENDS:=
     ABI_VERSION:=5
 endef
 
index b110787a28d43b0d756307db26db385f1496bb22..f2690b5e32c9b017eb44d9564f7d11aaf82c3239 100644 (file)
@@ -9,16 +9,23 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=opencv
-PKG_VERSION:=3.1.0
-PKG_RELEASE:=3
+PKG_VERSION:=4.1.1
+PKG_RELEASE:=2
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).zip
-PKG_SOURCE_URL:=http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/$(PKG_VERSION)/
-PKG_HASH:=1f6990249fdb82804fff40e96fa6d99949023ab0e3277eae4bd459b374e622a4
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/opencv/opencv
+PKG_SOURCE_VERSION:=$(PKG_VERSION)
+PKG_MIRROR_HASH:=c8587820421d2f22acdafe4712d068ae490897dc445bdb4aa128ecaa8e65d3a1
 
+PKG_MAINTAINER:=
 PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=LICENSE
 
+CMAKE_INSTALL:=1
+CMAKE_BINARY_SUBDIR:=build
+PKG_BUILD_PARALLEL:=1
+PKG_USE_MIPS16:=0
+
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/cmake.mk
 
@@ -35,14 +42,12 @@ define Package/opencv
   SECTION:=libs
   CATEGORY:=Libraries
   TITLE:=OpenCV
-  URL:=http://opencv.org/
-  MAINTAINER:=WRTnode Team <pub@wrtnode.com>
-  DEPENDS:=+libpthread +librt +libstdcpp +zlib +libjpeg
+  URL:=https://opencv.org/
+  DEPENDS:=+libpthread +librt +libatomic +libstdcpp +zlib +libjpeg +libwebp
 endef
 
-PKG_INSTALL:=1
-
-CMAKE_OPTIONS += -DBUILD_opencv_gpu:BOOL=OFF \
+CMAKE_OPTIONS += \
+       -DBUILD_opencv_gpu:BOOL=OFF \
        -DWITH_1394:BOOL=OFF -DBUILD_opencv_stitching:BOOL=OFF \
        -DBUILD_opencv_superres:BOOL=OFF -DBUILD_opencv_ts:BOOL=OFF \
        -DBUILD_opencv_highgui:BOOL=OFF \
@@ -56,15 +61,7 @@ CMAKE_OPTIONS += -DBUILD_opencv_gpu:BOOL=OFF \
        -DCMAKE_VERBOSE:BOOL=OFF \
        -DENABLE_PRECOMPILED_HEADERS=OFF
 
-define Build/InstallDev
-       $(INSTALL_DIR) $(1)/usr/include
-       $(CP) $(PKG_INSTALL_DIR)/usr/include/opencv $(1)/usr/include/
-       $(CP) $(PKG_INSTALL_DIR)/usr/include/opencv2 $(1)/usr/include/
-       $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libopencv* $(1)/usr/lib/
-       $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/opencv.pc $(1)/usr/lib/pkgconfig/
-endef
+TARGET_LDFLAGS += -latomic
 
 define Package/opencv/install
        $(INSTALL_DIR) $(1)/usr/lib
diff --git a/libs/opencv/patches/010-fix-url.patch b/libs/opencv/patches/010-fix-url.patch
deleted file mode 100644 (file)
index cad061b..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/3rdparty/ippicv/downloader.cmake
-+++ b/3rdparty/ippicv/downloader.cmake
-@@ -64,7 +64,7 @@ function(_icv_downloader)
-       if(DEFINED ENV{OPENCV_ICV_URL})
-         set(OPENCV_ICV_URL $ENV{OPENCV_ICV_URL})
-       else()
--        set(OPENCV_ICV_URL "https://raw.githubusercontent.com/Itseez/opencv_3rdparty/${IPPICV_BINARIES_COMMIT}/ippicv")
-+        set(OPENCV_ICV_URL "https://raw.githubusercontent.com/opencv/opencv_3rdparty/${IPPICV_BINARIES_COMMIT}/ippicv")
-       endif()
-     endif()
diff --git a/libs/opencv/patches/010-uclibc-ng.patch b/libs/opencv/patches/010-uclibc-ng.patch
new file mode 100644 (file)
index 0000000..52e9fd0
--- /dev/null
@@ -0,0 +1,46 @@
+--- a/modules/gapi/include/opencv2/gapi/core.hpp
++++ b/modules/gapi/include/opencv2/gapi/core.hpp
+@@ -392,8 +392,8 @@ namespace core {
+             {
+                 GAPI_Assert(fx != 0. && fy != 0.);
+                 return in.withSize
+-                    (Size(static_cast<int>(std::round(in.size.width  * fx)),
+-                          static_cast<int>(std::round(in.size.height * fy))));
++                    (Size(static_cast<int>(round(in.size.width  * fx)),
++                          static_cast<int>(round(in.size.height * fy))));
+             }
+         }
+     };
+--- a/modules/gapi/include/opencv2/gapi/own/saturate.hpp
++++ b/modules/gapi/include/opencv2/gapi/own/saturate.hpp
+@@ -81,8 +81,8 @@ static inline DST saturate(SRC x, R round)
+ // explicit suffix 'd' for double type
+ inline double  ceild(double x) { return std::ceil(x); }
+ inline double floord(double x) { return std::floor(x); }
+-inline double roundd(double x) { return std::round(x); }
+-inline double  rintd(double x) { return std::rint(x); }
++inline double roundd(double x) { return round(x); }
++inline double  rintd(double x) { return rint(x); }
+ } //namespace own
+ } //namespace gapi
+--- a/modules/gapi/src/backends/fluid/gfluidcore.cpp
++++ b/modules/gapi/src/backends/fluid/gfluidcore.cpp
+@@ -389,7 +389,7 @@ static void run_arithm_s1(uchar out[], const float in[], int width, const float
+     cv::util::suppress_unused_warning(v_op);
+     for (; w < width; w++)
+     {
+-        out[w] = saturate<uchar>(s_op(in[w], scalar[0]), std::roundf);
++        out[w] = saturate<uchar>(s_op(in[w], scalar[0]), roundf);
+     }
+ }
+@@ -1954,7 +1954,7 @@ GAPI_FLUID_KERNEL(GFluidCartToPolar, cv::gapi::core::GCartToPolar, false)
+         {
+             float x = in1[l];
+             float y = in2[l];
+-            float magnitude = std::hypot(y, x);
++            float magnitude = hypot(y, x);
+             float angle_rad = std::atan2(y, x);
+             float angle = angleInDegrees?
+                           angle_rad * static_cast<float>(180 / CV_PI):
diff --git a/libs/opencv/patches/020-l_tmpnam.patch b/libs/opencv/patches/020-l_tmpnam.patch
new file mode 100644 (file)
index 0000000..31a2bc2
--- /dev/null
@@ -0,0 +1,13 @@
+--- a/3rdparty/libjasper/jas_stream.c
++++ b/3rdparty/libjasper/jas_stream.c
+@@ -86,6 +86,10 @@
+ #include <io.h>
+ #endif
++#ifndef L_tmpnam
++#define L_tmpnam 20
++#endif
++
+ #include "jasper/jas_types.h"
+ #include "jasper/jas_stream.h"
+ #include "jasper/jas_malloc.h"
index f667d76703e586cd068f68fcdaf88407a8bcf237..a25c3d0bebf3af24f81178a60dca3cf8e901fb88 100644 (file)
@@ -8,17 +8,18 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=openldap
-PKG_VERSION:=2.4.47
-PKG_RELEASE:=2
+PKG_VERSION:=2.4.48
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
 PKG_SOURCE_URL:=https://gpl.savoirfairelinux.net/pub/mirrors/openldap/openldap-release/ \
        http://mirror.eu.oneandone.net/software/openldap/openldap-release/ \
        http://mirror.switch.ch/ftp/software/mirror/OpenLDAP/openldap-release/ \
        https://www.openldap.org/software/download/OpenLDAP/openldap-release/
-PKG_HASH:=f54c5877865233d9ada77c60c0f69b3e0bfd8b1b55889504c650047cc305520b
+PKG_HASH:=d9523ffcab5cd14b709fcf3cb4d04e8bc76bb8970113255f372bc74954c6074d
 PKG_LICENSE:=OLDAP-2.8
 PKG_LICENSE_FILES:=LICENSE
+PKG_CPE_ID:=cpe:/a:openldap:openldap
 
 PKG_FIXUP:=autoreconf
 
diff --git a/libs/openldap/patches/800-implicit.patch b/libs/openldap/patches/800-implicit.patch
new file mode 100644 (file)
index 0000000..6a39d78
--- /dev/null
@@ -0,0 +1,10 @@
+--- a/libraries/libldap/tls2.c
++++ b/libraries/libldap/tls2.c
+@@ -41,6 +41,7 @@ static tls_impl *tls_imp = &ldap_int_tls_impl;
+ #define HAS_TLS( sb ) ber_sockbuf_ctrl( sb, LBER_SB_OPT_HAS_IO, \
+                               (void *)tls_imp->ti_sbio )
++static int ldap_pvt_tls_check_hostname( LDAP *ld, void *s, const char *name_in );
+ #endif /* HAVE_TLS */
+ #ifdef LDAP_DEVEL
index f336a878d07ef8c8955df4f0d29190caf290ebca..689b7c0ea990d92687b7fe3828a27f287b4bb14d 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=opus
-PKG_VERSION:=1.3
+PKG_VERSION:=1.3.1
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://archive.mozilla.org/pub/opus
-PKG_HASH:=4f3d69aefdf2dbaf9825408e452a8a414ffc60494c70633560700398820dc550
+PKG_HASH:=65b58e1e25b2a114157014736a3d9dfeaad8d41be1c8179866f144a2fb44ff9d
 
 PKG_MAINTAINER:=Ted Hess <thess@kitchensync.net>, Ian Leonard <antonlacon@gmail.com>
 PKG_LICENSE:=BSD-3-Clause
index d1f3302874cdd6851c51f3a23cf89bbb52d41388..e829f0e6a93e17aa614e89ad6757c77fd43f2ec8 100644 (file)
@@ -8,15 +8,15 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=p11-kit
-PKG_VERSION:=0.23.15
+PKG_VERSION:=0.23.17
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=f7c139a0c77a1f0012619003e542060ba8f94799a0ef463026db390680e4d798
 PKG_SOURCE_URL:=https://github.com/p11-glue/p11-kit/releases/download/$(PKG_VERSION)
+PKG_HASH:=5447b25d66c05f86cce5bc8856f7a074be84c186730e32c74069ca03386d7c1e
 
 PKG_MAINTAINER:=Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
-PKG_LICENSE:=BSD-3c
+PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=COPYING
 
 PKG_BUILD_PARALLEL:=1
@@ -38,12 +38,14 @@ define Package/p11-kit/description
   way that they are discoverable.
 endef
 
-TARGET_LDFLAGS += -Wl,--gc-sections
+TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
 
 CONFIGURE_ARGS+= \
        --disable-debug \
+       --disable-rpath \
        --disable-trust-module \
-       --without-libffi
+       --without-libffi \
+       --without-systemd
 
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include/p11-kit-1/p11-kit/
index 8d1cc09b1c063cdcd25d1544d285892811db4345..720142332b2fbe68e085f450db3e433548cab620 100644 (file)
@@ -18,11 +18,14 @@ PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>
 
 PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=LICENCE
+PKG_CPE_ID:=cpe:/a:pcre:pcre
 
 PKG_FIXUP:=autoreconf
 
 PKG_INSTALL:=1
 
+PKG_CONFIG_DEPENDS := CONFIG_PACKAGE_libpcrecpp
+
 include $(INCLUDE_DIR)/uclibc++.mk
 include $(INCLUDE_DIR)/package.mk
 
@@ -30,7 +33,6 @@ define Package/libpcre/default
   SECTION:=libs
   CATEGORY:=Libraries
   URL:=https://www.pcre.org/
-  DEPENDS:=$(CXX_DEPENDS)
 endef
 
 define Package/libpcre
@@ -46,7 +48,7 @@ endef
 define Package/libpcrecpp
   $(call Package/libpcre/default)
   TITLE:=C++ wrapper for Perl Compatible Regular Expression library
-  DEPENDS:=+libpcre
+  DEPENDS:=+libpcre $(CXX_DEPENDS)
 endef
 
 TARGET_CFLAGS += $(FPIC)
@@ -56,8 +58,7 @@ CONFIGURE_ARGS += \
        --enable-unicode-properties \
        --enable-pcre16 \
        --with-match-limit-recursion=16000 \
-       --enable-cpp
-
+       $(if $(CONFIG_PACKAGE_libpcrecpp),--enable,--disable)-cpp
 
 MAKE_FLAGS += \
        CFLAGS="$(TARGET_CFLAGS)"
index fbc81c6ea842fd3bf46ea63584e6f934269be870..3c84903051b6d14827462dd173f188c63c8c8fbf 100644 (file)
@@ -18,6 +18,7 @@ PKG_HASH:=f29e89cc5de813f45786580101aaee3984a65818631d4ddbda7b32f699b87c2e
 PKG_MAINTAINER:=Shane Peelar <lookatyouhacker@gmail.com>
 PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=LICENCE
+PKG_CPE_ID:=cpe:/a:pcre:pcre
 
 PKG_FIXUP:=autoreconf
 
index b74845a3c24124dffad64d39a230250d2179cab4..9eba6cbfbd33c0d425179767b937ed1f05b3705c 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=poco
 PKG_VERSION:=1.9.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://pocoproject.org/releases/$(PKG_NAME)-$(PKG_VERSION)
@@ -18,6 +18,7 @@ PKG_HASH:=a0a5a03d87c585f1a43def33bfc52c0c34a528e43a7b13bc83841a7c00adde39
 
 PKG_LICENSE:=BSL-1.0
 PKG_LICENSE_FILES:=LICENSE
+PKG_CPE_ID:=cpe:/a:pocoproject:poco
 
 PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
@@ -29,7 +30,7 @@ define Package/poco
   CATEGORY:=Libraries
   TITLE:=Poco C++ libraries
   URL:=https://www.pocoproject.org/
-  DEPENDS:=+libstdcpp +libpthread +librt
+  DEPENDS:=+libstdcpp +libpthread +librt @!arc
   MAINTAINER:=Jean-Michel Julien <jean-michel.julien@trilliantinc.com>
 endef
 
index dd110e07aa0fb3fac5db9a86e8c6368843c18929..810f59c5504849b644c829f245e2ef9ac2649004 100644 (file)
@@ -5,10 +5,11 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=postgresql
-PKG_VERSION:=9.6.13
+PKG_VERSION:=11.3
 PKG_RELEASE:=1
 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
 PKG_LICENSE:=PostgreSQL
+PKG_CPE_ID:=cpe:/a:postgresql:postgresql
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=\
@@ -16,12 +17,12 @@ PKG_SOURCE_URL:=\
        http://ftp.postgresql.org/pub/source/v$(PKG_VERSION) \
        ftp://ftp.postgresql.org/pub/source/v$(PKG_VERSION)
 
-PKG_HASH:=ecbed20056296a65b6a4f5526c477e3ae5cc284cb01a15507785ddb23831e9a4
+PKG_HASH:=2a85e082fc225944821dfd23990e32dfcd2284c19060864b0ad4ca537d30522d
 
 PKG_USE_MIPS16:=0
 PKG_FIXUP:=autoreconf
 PKG_MACRO_PATHS:=config
-PKG_BUILD_DEPENDS:=readline/host postgresql/host
+PKG_BUILD_DEPENDS:=postgresql/host
 PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/host-build.mk
@@ -33,7 +34,7 @@ define Package/libpq
   DEPENDS:=+libpthread
   TITLE:=PostgreSQL client library
   URL:=http://www.postgresql.org/
-  SUBMENU:=database
+  SUBMENU:=Database
 endef
 
 define Package/libpq/description
@@ -46,7 +47,7 @@ define Package/pgsql-cli
   DEPENDS:=+libncursesw +libpq +libreadline +librt +zlib
   TITLE:=Command Line Interface (CLI) to PostgreSQL databases
   URL:=http://www.postgresql.org/
-  SUBMENU:=database
+  SUBMENU:=Database
 endef
 
 define Package/pgsql-cli/description
@@ -59,7 +60,7 @@ define Package/pgsql-cli-extra
   DEPENDS:=+libncursesw +libpq +libreadline +librt +zlib
   TITLE:=Command Line extras for PostgreSQL databases
   URL:=http://www.postgresql.org/
-  SUBMENU:=database
+  SUBMENU:=Database
 endef
 
 define Package/pgsql-cli-extra/description
@@ -72,7 +73,7 @@ define Package/pgsql-server
   DEPENDS:=+pgsql-cli
   TITLE:=PostgreSQL databases Server
   URL:=http://www.postgresql.org/
-  SUBMENU:=database
+  SUBMENU:=Database
   USERID:=postgres=5432:postgres=5432
 endef
 
@@ -88,23 +89,19 @@ PGSQL_SERVER_BIN := \
        pg_dump \
        pg_dumpall \
        pg_isready \
-       pg_receivexlog \
        pg_recvlogical \
-       pg_resetxlog \
+       pg_resetwal \
        pg_restore \
        pg_standby \
        pg_upgrade \
-       pg_xlogdump \
        postgres \
        initdb
 
 PGSQL_CLI_EXTRA_BIN := \
        clusterdb       \
        createdb        \
-       createlang      \
        createuser      \
        dropdb          \
-       droplang        \
        dropuser        \
        pgbench         \
        reindexdb       \
@@ -112,7 +109,9 @@ PGSQL_CLI_EXTRA_BIN := \
 
 PGSQL_CONFIG_VARS:= \
        pgac_cv_snprintf_long_long_int_format="%lld" \
-       pgac_cv_snprintf_size_t_support=yes
+       pgac_cv_snprintf_size_t_support=yes \
+       USE_DEV_URANDOM=1 \
+       ZIC=zic
 
 ifeq ($(CONFIG_USE_UCLIBC),y)
 # PostgreSQL does not build against uClibc with locales
@@ -137,6 +136,7 @@ HOST_CONFIGURE_ARGS += \
                        --without-python \
                        --without-readline \
                        --without-tcl \
+                       --without-systemd \
                        --with-zlib="yes" \
                        --enable-depend
 
@@ -151,15 +151,15 @@ CONFIGURE_ARGS += \
                        --without-perl \
                        --without-python \
                        --without-tcl \
+                       --without-systemd \
                        --with-zlib="yes" \
                        --enable-depend \
                        $(if $(CONFIG_arc),--disable-spinlocks)
 
-# Need a native ecpg, pg_config and zic for build
+# Need a native zic and pg_config for build
 define Host/Compile
-       $(MAKE) -C $(HOST_BUILD_DIR)/src/bin/pg_config CC="$(HOSTCC)"
-       $(MAKE) -C $(HOST_BUILD_DIR)/src/interfaces/ecpg/preproc CC="$(HOSTCC)"
-       $(MAKE) -C $(HOST_BUILD_DIR)/src/timezone CC="$(HOSTCC)"
+       +$(HOST_MAKE_VARS) MAKELEVEL=0 $(MAKE) -C $(HOST_BUILD_DIR)/src/bin/pg_config CC="$(HOSTCC)"
+       +$(HOST_MAKE_VARS) MAKELEVEL=0 $(MAKE) -C $(HOST_BUILD_DIR)/src/timezone CC="$(HOSTCC)"
 endef
 
 define Host/Install
@@ -168,13 +168,11 @@ define Host/Install
        $(INSTALL_BIN) $(HOST_BUILD_DIR)/src/port/libpgport.a $(STAGING_DIR_HOSTPKG)/lib/
        $(INSTALL_BIN) $(HOST_BUILD_DIR)/src/bin/pg_config/pg_config $(STAGING_DIR_HOSTPKG)/lib/
        $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/bin/
-       $(INSTALL_BIN) $(HOST_BUILD_DIR)/src/interfaces/ecpg/preproc/ecpg $(STAGING_DIR_HOSTPKG)/bin/
        $(INSTALL_BIN) $(HOST_BUILD_DIR)/src/timezone/zic $(STAGING_DIR_HOSTPKG)/bin/
 endef
 
-define Build/Configure
-       $(Build/Configure/Default)
-       $(SED) 's@ECPG = ../../preproc/ecpg@ECPG = $(STAGING_DIR_HOSTPKG)/bin/ecpg@' $(PKG_BUILD_DIR)/src/interfaces/ecpg/test/Makefile.regress
+define Build/Compile
+       $(MAKE) -C $(PKG_BUILD_DIR) MAKELEVEL=0 all contrib
 endef
 
 # because PROFILE means something else in the project Makefile
index ece527cbe785d5e185c8fd56f86ab7fba6c41747..5d027ef6f973ad2483c8d0fc575ffa22b3b6bdc9 100644 (file)
@@ -1,11 +1,41 @@
+diff --git a/configure.in b/configure.in
+index 9082c5b..2c04edc 100644
 --- a/configure.in
 +++ b/configure.in
-@@ -25,7 +25,7 @@ recommended.  You can remove the check f
- your responsibility whether the result works or not.])])
- AC_COPYRIGHT([Copyright (c) 1996-2016, PostgreSQL Global Development Group])
- AC_CONFIG_SRCDIR([src/backend/access/common/heaptuple.c])
--AC_CONFIG_AUX_DIR(config)
-+AC_CONFIG_AUX_DIR([config])
- AC_PREFIX_DEFAULT(/usr/local/pgsql)
- AC_SUBST(configure_args, [$ac_configure_args])
+@@ -2283,36 +2283,6 @@ if test "$with_python" = yes; then
+   CPPFLAGS=$ac_save_CPPFLAGS
+ fi
  
+-#
+-# Check for DocBook and tools
+-#
+-PGAC_PATH_XMLLINT
+-PGAC_CHECK_DOCBOOK(4.2)
+-PGAC_PATH_PROGS(DBTOEPUB, dbtoepub)
+-PGAC_PATH_PROGS(XSLTPROC, xsltproc)
+-PGAC_PATH_PROGS(FOP, fop)
+-
+-#
+-# Check for test tools
+-#
+-if test "$enable_tap_tests" = yes; then
+-  # Check for necessary modules, unless user has specified the "prove" to use;
+-  # in that case it's her responsibility to have a working configuration.
+-  # (prove might be part of a different Perl installation than perl, eg on
+-  # MSys, so the result of AX_PROG_PERL_MODULES could be irrelevant anyway.)
+-  if test -z "$PROVE"; then
+-    # Test::More and Time::HiRes are supposed to be part of core Perl,
+-    # but some distros omit them in a minimal installation.
+-    AX_PROG_PERL_MODULES([IPC::Run Test::More=0.87 Time::HiRes], ,
+-      [AC_MSG_ERROR([Additional Perl modules are required to run TAP tests])])
+-  fi
+-  # Now make sure we know where prove is
+-  PGAC_PATH_PROGS(PROVE, prove)
+-  if test -z "$PROVE"; then
+-    AC_MSG_ERROR([prove not found])
+-  fi
+-fi
+-
+ # Thread testing
+ # We have to run the thread test near the end so we have all our symbols
index e044833180870145c2386e07401c7d9b455dcf8b..31595926aa5ad8fc95ab49d0bb24c70791cb2bcd 100644 (file)
@@ -8,26 +8,29 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libprotobuf-c
-PKG_VERSION:=1.3.1
-PKG_RELEASE:=2
+PKG_VERSION:=1.3.2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=protobuf-c-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/protobuf-c/protobuf-c/releases/download/v$(PKG_VERSION)
-PKG_HASH:=51472d3a191d6d7b425e32b612e477c06f73fe23e07f6a6a839b11808e9d2267
+PKG_HASH:=53f251f14c597bdb087aecf0b63630f434d73f5a10fc1ac545073597535b9e74
 PKG_BUILD_DIR:=$(BUILD_DIR)/protobuf-c-$(PKG_VERSION)
 HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/protobuf-c-$(PKG_VERSION)
 
 PKG_MAINTAINER:=Rosen Penev <rosenp@gmail.com>
-PKG_LICENSE:=BSD-2c
+PKG_LICENSE:=BSD-2-Clause
+PKG_LICENSE_FILES:=LICENSE
 
-PKG_BUILD_DEPENDS:=protobuf-c/host
 HOST_BUILD_DEPENDS:=protobuf/host
+PKG_BUILD_DEPENDS:=protobuf
 
-PKG_INSTALL:=1
+CMAKE_INSTALL:=1
 PKG_BUILD_PARALLEL:=1
+CMAKE_SOURCE_SUBDIR:=build-cmake
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/host-build.mk
+include $(INCLUDE_DIR)/cmake.mk
 
 define Package/libprotobuf-c
   TITLE:=Protocol Buffers library
@@ -43,23 +46,17 @@ define Package/libprotobuf-c/description
   internal RPC protocols and file formats.
 endef
 
-CONFIGURE_ARGS += \
-       --enable-shared \
-       --enable-static \
-       --disable-protoc
+CMAKE_HOST_OPTIONS += \
+       -DBUILD_SHARED_LIBS=ON \
+       -DCMAKE_SKIP_RPATH=OFF \
+       -DCMAKE_INSTALL_RPATH="${STAGING_DIR_HOSTPKG}/lib"
 
-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/libprotobuf-c.{a,la,so*} $(1)/usr/lib/
-       $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/
-endef
+CMAKE_OPTIONS += \
+       -DBUILD_SHARED_LIBS=ON
 
 define Package/libprotobuf-c/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libprotobuf-c.so.* $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libprotobuf-c.so* $(1)/usr/lib/
 endef
 
 $(eval $(call BuildPackage,libprotobuf-c))
diff --git a/libs/protobuf-c/patches/001-t-generated-code2-cxx-generate-packed-data-fix.patch b/libs/protobuf-c/patches/001-t-generated-code2-cxx-generate-packed-data-fix.patch
deleted file mode 100644 (file)
index 2d83cec..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: protobuf-c-1.3.1/t/generated-code2/cxx-generate-packed-data.cc
-===================================================================
---- protobuf-c-1.3.1.orig/t/generated-code2/cxx-generate-packed-data.cc
-+++ protobuf-c-1.3.1/t/generated-code2/cxx-generate-packed-data.cc
-@@ -998,7 +998,7 @@ static void dump_test_packed_repeated_en
- static void dump_test_unknown_fields (void)
- {
-   EmptyMess mess;
--  const google::protobuf::Message::Reflection *reflection = mess.GetReflection();
-+  const google::protobuf::Reflection *reflection = mess.GetReflection();
-   google::protobuf::UnknownFieldSet *fs = reflection->MutableUnknownFields(&mess);
- #if GOOGLE_PROTOBUF_VERSION >= 2001000
diff --git a/libs/protobuf-c/patches/010-pkgconfig.patch b/libs/protobuf-c/patches/010-pkgconfig.patch
new file mode 100644 (file)
index 0000000..f0fd749
--- /dev/null
@@ -0,0 +1,40 @@
+--- a/build-cmake/CMakeLists.txt
++++ b/build-cmake/CMakeLists.txt
+@@ -1,7 +1,10 @@
+ SET(PACKAGE protobuf-c)
+ SET(PACKAGE_NAME protobuf-c)
+ SET(PACKAGE_VERSION 1.3.2)
++set(PACKAGE_URL https://github.com/protobuf-c/protobuf-c)
++set(PACKAGE_DESCRIPTION "Protocol Buffers implementation in C")
++include(GNUInstallDirs)
+ CMAKE_MINIMUM_REQUIRED(VERSION 2.8 FATAL_ERROR)
+@@ -137,6 +140,9 @@ IF(CMAKE_HOST_UNIX)
+ INSTALL(CODE "EXECUTE_PROCESS (COMMAND ln -sf protoc-gen-c protoc-c WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/bin)")
+ ENDIF()
++CONFIGURE_FILE ("libprotobufc.pc.in" "libprotobufc.pc" @ONLY)
++INSTALL (FILES "../libprotobufc.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
++
+ INCLUDE(Dart)
+ SET(DART_TESTING_TIMEOUT 5)
+--- /dev/null
++++ b/build-cmake/libprotobufc.pc.in
+@@ -0,0 +1,14 @@
++prefix=@CMAKE_INSTALL_PREFIX@
++exec_prefix=@CMAKE_INSTALL_PREFIX@
++bindir=${exec_prefix}/@CMAKE_INSTALL_BINDIR@
++libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
++includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
++
++Name: @PACKAGE_NAME@
++Version: @PACKAGE_VERSION@
++Description: @PACKAGE_DESCRIPTION@
++URL: @PACKAGE_URL@
++Requires:
++Libs: -L${libdir} -lprotobuf-c
++Libs.private: 
++Cflags: -I${includedir}
index 3d0a16f2807c158243beacab63724ca7644ade18..251bdffa10794db67009eb0ec47a8af3f6b9b477 100644 (file)
@@ -8,23 +8,26 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=protobuf
-PKG_VERSION:=3.7.1
-PKG_RELEASE:=1
+PKG_VERSION:=3.8.0
+PKG_RELEASE:=4
 
 PKG_SOURCE:=$(PKG_NAME)-cpp-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/google/protobuf/releases/download/v$(PKG_VERSION)
-PKG_HASH:=97f6cdaa0724d5a8cd3375d5f5cf4bd253d5ad5291154f533ed0d94a9d501ef3
+PKG_HASH:=ddc96d83f3b7417da53bce2510b94ad2796465ef8763f7a4e82089157efe97aa
 
+PKG_MAINTAINER:=Ken Keys <kkeys@caida.org>
 PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=LICENSE
+PKG_CPE_ID:=cpe:/a:google:protobuf
 
-PKG_BUILD_DEPENDS:=protobuf/host
-
+HOST_BUILD_PARALLEL:=1
 PKG_BUILD_PARALLEL:=1
-PKG_INSTALL:=1
+CMAKE_INSTALL:=1
+CMAKE_SOURCE_SUBDIR:=cmake
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/host-build.mk
+include $(INCLUDE_DIR)/cmake.mk
 
 define Package/protobuf/Default
   SECTION:=libs
@@ -32,7 +35,6 @@ define Package/protobuf/Default
   TITLE:=A structured data encoding library
   URL:=https://github.com/google/protobuf
   DEPENDS:=+zlib +libpthread +libatomic +libstdcpp
-  MAINTAINER:=Ken Keys <kkeys@caida.org>
 endef
 
 define Package/protobuf
@@ -65,20 +67,27 @@ This package provides the libprotobuf-lite library.
 
 endef
 
-CONFIGURE_ARGS += --with-protoc=$(STAGING_DIR_HOSTPKG)/bin/protoc
+CMAKE_HOST_OPTIONS += \
+       -Dprotobuf_BUILD_PROTOC_BINARIES=ON \
+       -Dprotobuf_BUILD_TESTS=OFF \
+       -DBUILD_SHARED_LIBS=ON \
+       -DCMAKE_SKIP_RPATH=OFF \
+       -DCMAKE_INSTALL_RPATH="${STAGING_DIR_HOSTPKG}/lib"
 
-define Build/InstallDev
-       $(INSTALL_DIR) \
-               $(1)/usr/lib \
-               $(1)/usr/include
+CMAKE_OPTIONS += \
+       -Dprotobuf_BUILD_PROTOC_BINARIES=ON \
+       -Dprotobuf_BUILD_TESTS=OFF \
+       -Dprotobuf_WITH_ZLIB=ON \
+       -DBUILD_SHARED_LIBS=ON
 
-       $(CP) \
-               $(PKG_INSTALL_DIR)/usr/include/* \
-               $(1)/usr/include/
+TARGET_LDFLAGS += -latomic
 
-       $(CP) \
-               $(PKG_INSTALL_DIR)/usr/lib/* \
-               $(1)/usr/lib/
+define Build/InstallDev
+       $(call Build/InstallDev/cmake,$(1))
+       $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/protobuf.pc
+       $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/protobuf.pc
+       $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/protobuf-lite.pc
+       $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/protobuf-lite.pc
 endef
 
 define Package/protobuf-lite/install
diff --git a/libs/protobuf/patches/010-rpath.patch b/libs/protobuf/patches/010-rpath.patch
new file mode 100644 (file)
index 0000000..70d2752
--- /dev/null
@@ -0,0 +1,24 @@
+--- a/cmake/install.cmake
++++ b/cmake/install.cmake
+@@ -16,8 +16,8 @@ foreach(_library ${_protobuf_libraries})
+     $<BUILD_INTERFACE:${protobuf_source_dir}/src>
+     $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
+   if (UNIX AND NOT APPLE)
+-    set_property(TARGET ${_library}
+-      PROPERTY INSTALL_RPATH "$ORIGIN")
++#    set_property(TARGET ${_library}
++#      PROPERTY INSTALL_RPATH "$ORIGIN")
+   elseif (APPLE)
+     set_property(TARGET ${_library}
+       PROPERTY INSTALL_RPATH "@loader_path")
+@@ -32,8 +32,8 @@ if (protobuf_BUILD_PROTOC_BINARIES)
+   install(TARGETS protoc EXPORT protobuf-targets
+     RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT protoc)
+   if (UNIX AND NOT APPLE)
+-    set_property(TARGET protoc
+-      PROPERTY INSTALL_RPATH "$ORIGIN/../lib")
++#    set_property(TARGET protoc
++#      PROPERTY INSTALL_RPATH "$ORIGIN/../lib")
+   elseif (APPLE)
+     set_property(TARGET protoc
+       PROPERTY INSTALL_RPATH "@loader_path/../lib")
index 2dd743b5b1dd4ea10562662006321246a63f7547..4bb3b85886d188b449afb4298b7c7f847a268514 100644 (file)
@@ -6,14 +6,14 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=psqlodbc
 PKG_VERSION:=11.00.0000
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://ftp.postgresql.org/pub/odbc/versions/src
 PKG_HASH:=703e6b87022f95ffa00d9f86c8f0a877f8a55b9b3be0942081f382e794112a86
 
 PKG_MAINTAINER:=
-PKG_LICENSE:=LGPL-2.0+
+PKG_LICENSE:=LGPL-2.0-or-later
 PKG_LICENSE_FILES:=license.txt
 
 PKG_BUILD_DEPENDS:=unixodbc/host
@@ -27,7 +27,7 @@ CONFIGURE_ARGS += \
        --with-libpq=$(STAGING_DIR)/usr
 
 define Package/psqlodbc/Default
-  SUBMENU:=database
+  SUBMENU:=Database
   URL:=https://odbc.postgresql.org/
   SECTION:=libs
   CATEGORY:=Libraries
index 9ab8a09f6e9cb16257ea6923c3ec2a8ae2b5f483..5ce4f53d68bab5fdbe0673287a8ac99fa482238b 100644 (file)
@@ -9,16 +9,16 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=pthsem
 PKG_VERSION:=2.0.8
-PKG_RELEASE:=5
-
-PKG_MAINTAINER:=Othmar Truniger <github@truniger.ch>
-PKG_LICENSE:=LGPL-2.1+
-PKG_LICENSE_FILES:=COPYING
+PKG_RELEASE:=6
 
 PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.auto.tuwien.ac.at/~mkoegler/pth/
 PKG_HASH:=4024cafdd5d4bce2b1778a6be5491222c3f6e7ef1e43971264c451c0012c5c01
 
+PKG_MAINTAINER:=Othmar Truniger <github@truniger.ch>
+PKG_LICENSE:=LGPL-2.1-or-later
+PKG_LICENSE_FILES:=COPYING
+
 PKG_FIXUP:=autoreconf
 PKG_BUILD_PARALLEL:=1
 PKG_FORTIFY_SOURCE:=0
@@ -40,7 +40,7 @@ endef
 
 # The musl libc provides a proper implementation of sigaltstack() so
 # prevent configure from wrongly assuming a broken Linux platform
-ifeq ($(CONFIG_USE_MUSL),y)
+ifneq ($(CONFIG_USE_GLIBC),y)
   CONFIGURE_VARS += \
        ac_cv_check_sjlj=ssjlj
 endif
index 01bd1cf159f264d0d88a59787ec84ee51762c23d..be69f7b2abe17f3b0f7eb9861947689edb8a8787 100644 (file)
@@ -9,14 +9,14 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=qrencode
 PKG_VERSION:=4.0.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://fukuchi.org/works/qrencode
 PKG_HASH:=c9cb278d3b28dcc36b8d09e8cad51c0eca754eb004cb0247d4703cb4472b58b4
 
 PKG_MAINTAINER:=Jonathan Bennett <JBennett@incomsystems.biz>
-PKG_LICENSE:=LGPL-2.1+
+PKG_LICENSE:=LGPL-2.1-or-later
 
 PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
diff --git a/libs/redis/Makefile b/libs/redis/Makefile
new file mode 100644 (file)
index 0000000..c8f93be
--- /dev/null
@@ -0,0 +1,96 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=redis
+PKG_VERSION:=5.0.5
+PKG_RELEASE:=2
+
+PKG_SOURCE_URL:=http://download.redis.io/releases/
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_HASH:=2139009799d21d8ff94fc40b7f36ac46699b9e1254086299f8d3b223ca54a375
+
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:pivotal_software:redis
+
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+MAKE_FLAGS+= \
+       MALLOC="libc" \
+       USE_JEMALLOC="no" \
+       PREFIX="$(PKG_INSTALL_DIR)/usr" \
+       ARCH=""
+
+define Package/redis/Default
+  SUBMENU:=Database
+  SECTION:=libs
+  CATEGORY:=Libraries
+  URL:=https://redis.io
+endef
+
+define Package/redis-server
+$(call  Package/redis/Default)
+  TITLE:=Redis server
+  DEPENDS:=+libpthread
+endef
+
+define Package/redis-cli
+$(call  Package/redis/Default)
+  TITLE:=Redis cli
+endef
+
+define Package/redis-utils
+$(call  Package/redis/Default)
+  TITLE:=Redis utilities
+  DEPENDS:=+redis-server
+endef
+
+define Package/redis-full
+$(call  Package/redis/Default)
+  TITLE:=All Redis binaries (server,cli and utils)
+  DEPENDS:=+redis-utils +redis-cli
+endef
+
+define Package/redis-full/description
+  Redis is an open source, BSD licensed, advanced key-value cache and store.
+  It is often referred to as a data structure server since keys can contain
+  strings, hashes, lists, sets, sorted sets, bitmaps and hyperloglogs.
+endef
+
+define Package/redis-server/conffiles
+/etc/redis.conf
+endef
+
+define Build/Compile
+       $(MAKE) -C "$(PKG_BUILD_DIR)/deps/hiredis" static $(MAKE_FLAGS)  $(MAKE_VARS)
+       $(MAKE) -C "$(PKG_BUILD_DIR)/deps/linenoise" $(MAKE_FLAGS)  $(MAKE_VARS)
+       $(MAKE) -C "$(PKG_BUILD_DIR)/deps/lua" posix $(MAKE_FLAGS)  $(MAKE_VARS) AR="${AR} ru"
+       $(call Build/Compile/Default)
+endef
+
+define Package/redis-server/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/redis-server $(1)/usr/bin/
+       $(INSTALL_DIR) $(1)/etc/init.d
+       $(INSTALL_BIN) ./files/redis.init $(1)/etc/init.d/redis
+       $(INSTALL_DIR) $(1)/etc
+       $(INSTALL_DATA) $(PKG_BUILD_DIR)/redis.conf $(1)/etc/
+       $(SED) "s|^dir .*|dir /var/lib/redis|" $(1)/etc/redis.conf
+endef
+
+define Package/redis-cli/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/redis-cli $(1)/usr/bin/
+endef
+
+define Package/redis-utils/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/redis-{check-aof,benchmark} $(1)/usr/bin/
+endef
+
+$(eval $(call BuildPackage,redis-full))
+$(eval $(call BuildPackage,redis-server))
+$(eval $(call BuildPackage,redis-cli))
+$(eval $(call BuildPackage,redis-utils))
diff --git a/libs/redis/files/redis.init b/libs/redis/files/redis.init
new file mode 100755 (executable)
index 0000000..686514d
--- /dev/null
@@ -0,0 +1,17 @@
+#!/bin/sh /etc/rc.common
+
+USE_PROCD=1
+START=95
+STOP=10
+
+REDIS_BIN="/usr/bin/redis-server"
+REDIS_CONFIG="/etc/redis.conf"
+REDIS_PID="/var/run/redis.pid"
+REDIS_DATA="/var/lib/redis"
+
+start_service() {
+       mkdir -p "$REDIS_DATA"
+       procd_open_instance redis
+       procd_set_param command "$REDIS_BIN" "$REDIS_CONFIG"
+       procd_close_instance
+}
diff --git a/libs/redis/patches/020-fix-atomicvar.patch b/libs/redis/patches/020-fix-atomicvar.patch
new file mode 100644 (file)
index 0000000..ad6519e
--- /dev/null
@@ -0,0 +1,22 @@
+Index: redis-5.0.0/src/atomicvar.h
+===================================================================
+--- redis-5.0.0.orig/src/atomicvar.h
++++ redis-5.0.0/src/atomicvar.h
+@@ -68,7 +68,7 @@
+  * is reported. */
+ // #define __ATOMIC_VAR_FORCE_SYNC_MACROS
+
+-#if !defined(__ATOMIC_VAR_FORCE_SYNC_MACROS) && defined(__ATOMIC_RELAXED) && !defined(__sun) && (!defined(__clang__) || !defined(__APPLE__) || __apple_build_version__ > 4210057)
++#if defined(CONFIG_EDAC_ATOMIC_SCRUB) &&  !defined(__ATOMIC_VAR_FORCE_SYNC_MACROS) && defined(__ATOMIC_RELAXED) && !defined(__sun) && (!defined(__clang__) || !defined(__APPLE__) || __apple_build_version__ > 4210057)
+ /* Implementation using __atomic macros. */
+
+ #define atomicIncr(var,count) __atomic_add_fetch(&var,(count),__ATOMIC_RELAXED)
+@@ -82,7 +82,7 @@
+ #define atomicSet(var,value) __atomic_store_n(&var,value,__ATOMIC_RELAXED)
+ #define REDIS_ATOMIC_API "atomic-builtin"
+
+-#elif defined(HAVE_ATOMIC)
++#elif defined(CONFIG_EDAC_ATOMIC_SCRUB) && defined(HAVE_ATOMIC)
+ /* Implementation using __sync macros. */
+
+ #define atomicIncr(var,count) __sync_add_and_fetch(&var,(count))
\ No newline at end of file
diff --git a/libs/redis/patches/030-fix-uclibc-compilation.patch b/libs/redis/patches/030-fix-uclibc-compilation.patch
new file mode 100644 (file)
index 0000000..0fc39b0
--- /dev/null
@@ -0,0 +1,25 @@
+--- a/src/config.h
++++ b/src/config.h
+@@ -30,6 +30,10 @@
+ #ifndef __CONFIG_H
+ #define __CONFIG_H
+
++#if defined(__unix) || defined(__linux__)
++#include <features.h>
++#endif
++
+ #ifdef __APPLE__
+ #include <AvailabilityMacros.h>
+ #endif
+@@ -62,9 +66,9 @@
+ #endif
+
+ /* Test for backtrace() */
+-#if defined(__APPLE__) || (defined(__linux__) && defined(__GLIBC__)) || \
++#if (defined(__APPLE__) || (defined(__linux__) && defined(__GLIBC__)) || \
+     defined(__FreeBSD__) || (defined(__OpenBSD__) && defined(USE_BACKTRACE))\
+- || defined(__DragonFly__)
++ || defined(__DragonFly__)) && !defined(__UCLIBC__)
+ #define HAVE_BACKTRACE 1
+ #endif
+
index 93abdb59f3963962a5a2f15b08eaa4d5264caf17..3ead1376449b16a73223743ba6fef7be58301fab 100644 (file)
@@ -27,7 +27,7 @@ define Package/rxtx
   CATEGORY:=Libraries
   TITLE:=RX/TX Support for Java serial communications
   URL:=http://rxtx.qbang.org/wiki/index.php/Main_Page
-  DEPENDS:=+libpthread
+  DEPENDS:=+libpthread +classpath
 endef
 
 define Package/rxtx/description
index 5cb9bf5c7b59e112f3834d6e3d5a50a0e5955578..95f2b8c108ce552c72d960677ef4ebdade27cdbd 100644 (file)
@@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=sbc
 PKG_VERSION:=1.4
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@KERNEL/linux/bluetooth/
 PKG_HASH:=518bf46e6bb3dc808a95e1eabad26fdebe8a099c1e781c27ed7fca6c2f4a54c9
 
-PKG_LICENSE:=LGPL-2.1+
+PKG_LICENSE:=LGPL-2.1-or-later
 PKG_LICENSE_FILES:=COPYING.LIB
 PKG_MAINTAINER:=
 
diff --git a/libs/serdisplib/Makefile b/libs/serdisplib/Makefile
new file mode 100644 (file)
index 0000000..520b3bf
--- /dev/null
@@ -0,0 +1,76 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=serdisplib
+PKG_VERSION:=2.01
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=@SF/serdisplib
+PKG_HASH:=a0a4eb6339de33f694e8eec1731bbe31789493434f747998a8788c2d0e6c324b
+PKG_LICENSE:=GPL-2.0
+PLG_LICENSE_FILES:=COPYING
+PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
+
+PKG_FIXUP:=libtool
+
+include $(INCLUDE_DIR)/package.mk
+
+CONFIGURE_ARGS += --enable-dynloading --disable-statictools
+
+define Package/serdisplib
+  SECTION:=libs
+  CATEGORY:=Libraries
+  TITLE:=serdisplib
+  URL:=http://serdisplib.sourceforge.net/
+endef
+
+define Package/serdisplib/description
+ serdisplib started as a library to drive serial displays with
+ built-in controllers. It can optionally dynamically link with
+ libusb-compat, libgd and libpthread, some features require having
+ those packages installed as well.
+endef
+
+define Package/serdisplib-tools
+  SECTION:=utils
+  CATEGORY:=Utilities
+  TITLE:=serdisplib tools
+  URL:=http://serdisplib.sourceforge.net/
+  DEPENDS:=+serdisplib +libgd
+endef
+
+define Package/serdisplib-tools/description
+ serdisplib started as a library to drive serial displays with
+ built-in controllers. This package contains tools for serdisplib:
+ * l4m132c_tool
+ * l4m320t_tool
+ * multidisplay
+ * sdcmegtron_tool
+ * touchscreen_tool
+endef
+
+TARGET_CFLAGS += $(FPIC)
+
+define Build/InstallDev
+       $(INSTALL_DIR) $(1)/usr/include/serdisplib
+       $(CP) $(PKG_BUILD_DIR)/include/serdisplib/*.h $(1)/usr/include/serdisplib
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_BUILD_DIR)/lib/*.{a,so*} $(1)/usr/lib/
+endef
+
+define Package/serdisplib/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_BUILD_DIR)/lib/*.so* $(1)/usr/lib/
+endef
+
+define Package/serdisplib-tools/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/l4m132c_tool $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/l4m320t_tool $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/multidisplay $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/sdcmegtron_tool $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/touchscreen_tool $(1)/usr/bin
+endef
+
+$(eval $(call BuildPackage,serdisplib))
+$(eval $(call BuildPackage,serdisplib-tools))
diff --git a/libs/serdisplib/patches/001-fix-static-libary-build.patch b/libs/serdisplib/patches/001-fix-static-libary-build.patch
new file mode 100644 (file)
index 0000000..5162b0e
--- /dev/null
@@ -0,0 +1,22 @@
+Index: serdisplib-2.01/src/Makefile.in
+===================================================================
+--- serdisplib-2.01.orig/src/Makefile.in
++++ serdisplib-2.01/src/Makefile.in
+@@ -28,7 +28,7 @@ includedir = @includedir@
+ datarootdir = @datarootdir@
+ CC=@CC@
+-AR=@AR@ -r
++AR=@AR@
+ LN_S=@LN_S@
+ INSTALL=@INSTALL@
+ INSTALL_PROGRAM = @INSTALL_PROGRAM@
+@@ -180,7 +180,7 @@ programs: $(PROGRAMS)
+ $(LIB_DIR)/$(LIB_STATIC): $(LIB_OBJECTS)
+       $(top_srcdir)/mkinstalldirs $(top_srcdir)/lib
+-      $(AR) $(LIB_DIR)/$(LIB_STATIC) $(LIB_OBJECTS)
++      $(AR) -r -- $(LIB_DIR)/$(LIB_STATIC) $(LIB_OBJECTS)
+ $(LIB_DIR)/$(LIB_SHARED): $(LIB_OBJECTS)
+       $(top_srcdir)/mkinstalldirs $(top_srcdir)/lib
diff --git a/libs/serdisplib/patches/002-allow-1bpp-framebuffer.patch b/libs/serdisplib/patches/002-allow-1bpp-framebuffer.patch
new file mode 100644 (file)
index 0000000..7bc059e
--- /dev/null
@@ -0,0 +1,23 @@
+Index: serdisplib-2.01/src/serdisp_specific_framebuffer.c
+===================================================================
+--- serdisplib-2.01.orig/src/serdisp_specific_framebuffer.c
++++ serdisplib-2.01/src/serdisp_specific_framebuffer.c
+@@ -306,13 +306,15 @@ serdisp_t* serdisp_framebuffer_setup(con
+     if (fb_success) {
+       /* check if colour mode is supported */
+-      if (! (vinfo.bits_per_pixel == 16 || vinfo.bits_per_pixel == 24 || vinfo.bits_per_pixel == 32) ) {
++      if (! (vinfo.bits_per_pixel == 1 ||vinfo.bits_per_pixel == 16 || vinfo.bits_per_pixel == 24 || vinfo.bits_per_pixel == 32) ) {
+         sd_error(SERDISP_ERUNTIME, "unsupported colour depth (%d)", vinfo.bits_per_pixel);
+         fb_success = 0;
+       }
+     }
+-
+-    dd->scrbuf_size = vinfo.xres * vinfo.yres * vinfo.bits_per_pixel/8;
++    if (vinfo.bits_per_pixel == 1)
++        dd->scrbuf_size = (vinfo.xres * vinfo.yres) / 8;
++    else
++        dd->scrbuf_size = vinfo.xres * vinfo.yres * vinfo.bits_per_pixel/8;
+     if (fb_success) {
+       /* map framebuffer device to memory */
index 9b9fb08fdc89419f5bc67df0fdc38fabc6087ced..fcb0793ed63fdc0c584eef53f9b6f667c552cd96 100644 (file)
@@ -11,14 +11,14 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=slang
 PKG_VERSION:=2.3.2
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://www.jedsoft.org/releases/slang \
        https://www.jedsoft.org/releases/slang/old
 PKG_HASH:=fc9e3b0fc4f67c3c1f6d43c90c16a5c42d117b8e28457c5b46831b8b5d3ae31a
 
-PKG_LICENSE:=GPL-2.0+
+PKG_LICENSE:=GPL-2.0-or-later
 PKG_LICENSE_FILES:=COPYING
 PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
 
index 01538ebe1804c3f58754d0bb768ebf5b5331576d..63180ff4d75fff97f66ab8aed4005779a495d5f3 100644 (file)
@@ -18,6 +18,8 @@ PKG_HASH:=eaae8af0ac742dc7d542c9439ac72f1f385ce838392dc849cae4536af9210094
 PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
 
+PKG_CPE_ID:=cpe:/a:xiph:speex
+
 include $(INCLUDE_DIR)/package.mk
 
 define Package/libspeex
index 5b94e14b76b775760c0faf6cdc484db449add074..284a1cab3e538bd1c57c6d71ed986b75d7347b01 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=speexdsp
-PKG_VERSION:=1.2rc3
+PKG_VERSION:=1.2.0
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://downloads.us.xiph.org/releases/speex/
-PKG_HASH:=4ae688600039f5d224bdf2e222d2fbde65608447e4c2f681585e4dca6df692f1
+PKG_SOURCE_URL:=https://downloads.us.xiph.org/releases/speex/
+PKG_HASH:=682042fc6f9bee6294ec453f470dadc26c6ff29b9c9e9ad2ffc1f4312fd64771
 
 PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
index ffa0a68a4a5bedf0d3455d08a4bbf563b53dbbb5..059aff2a8d271f5b0d3dad4916336bed09cdd13d 100644 (file)
@@ -8,11 +8,11 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=sqlite
-PKG_VERSION:=3270200
-PKG_RELEASE:=2
+PKG_VERSION:=3290000
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-autoconf-$(PKG_VERSION).tar.gz
-PKG_HASH:=50c39e85ea28b5ecfdb3f9e860afe9ba606381e21836b2849efca6a0bfe6ef6e
+PKG_HASH:=8e7c1e2950b5b04c5944a981cb31fffbf9d2ddda939d536838ebc854481afd5b
 PKG_SOURCE_URL:=https://www.sqlite.org/2019/
 
 PKG_LICENSE:=PUBLICDOMAIN
@@ -42,7 +42,7 @@ PKG_CONFIG_DEPENDS := \
 include $(INCLUDE_DIR)/package.mk
 
 define Package/sqlite3/Default
-  SUBMENU:=database
+  SUBMENU:=Database
   TITLE:=SQLite (v3.x) database engine
   URL:=http://www.sqlite.org/
   MAINTAINER:=Sebastian Kemper <sebastian_ml@gmx.net>
diff --git a/libs/sqlite3/patches/01-sqlite-arm-endian.patch b/libs/sqlite3/patches/01-sqlite-arm-endian.patch
deleted file mode 100644 (file)
index 65fe771..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
---- a/sqlite3.c
-+++ b/sqlite3.c
-@@ -13920,12 +13920,13 @@ typedef INT16_TYPE LogEst;
- ** at run-time.
- */
- #ifndef SQLITE_BYTEORDER
--# if defined(i386)     || defined(__i386__)   || defined(_M_IX86) ||    \
--     defined(__x86_64) || defined(__x86_64__) || defined(_M_X64)  ||    \
--     defined(_M_AMD64) || defined(_M_ARM)     || defined(__x86)   ||    \
--     defined(__arm__)  || defined(_M_ARM64)
-+# if defined(i386)      || defined(__i386__)      || defined(_M_IX86) ||    \
-+     defined(__x86_64)  || defined(__x86_64__)    || defined(_M_X64)  ||    \
-+     defined(_M_AMD64)  || defined(_M_ARM)        || defined(__x86)   ||    \
-+     defined(__ARMEL__) || defined(__AARCH64EL__) || defined(_M_ARM64)
- #   define SQLITE_BYTEORDER    1234
--# elif defined(sparc)    || defined(__ppc__)
-+# elif defined(sparc)     || defined(__ppc__) || \
-+       defined(__ARMEB__) || defined(__AARCH64EB__)
- #   define SQLITE_BYTEORDER    4321
- # else
- #   define SQLITE_BYTEORDER 0
index 12558de0754d31834828b3930138a1f3998c630d..107d521d40946858ff4008babf870aa80106c70d 100644 (file)
@@ -25,7 +25,7 @@ include $(INCLUDE_DIR)/kernel.mk
 include $(INCLUDE_DIR)/version.mk
 
 define Package/tdb
-  SUBMENU:=database
+  SUBMENU:=Database
   SECTION:=libs
   CATEGORY:=Libraries
   TITLE:=Trivial Database
index efbe1a9fee5e4b189e70284780718119faea5b7b..5b6325d31e9f032741793c63af7b684c698b42d2 100644 (file)
@@ -39,7 +39,7 @@ CONFIGURE_ARGS += \
        --includedir=$(STAGING_DIR)/usr/include
 
 define Package/unixodbc/Default
-  SUBMENU:=database
+  SUBMENU:=Database
   TITLE:=unixODBC
   URL:=http://www.unixodbc.org
 endef
index fd4507d7411db7dc560d968b694c4a80cadbe8c2..95dc1cde727ecf1d6ac7b80b97d4bc890636db21 100644 (file)
@@ -6,16 +6,17 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=vips
-PKG_VERSION:=8.7.4
-PKG_RELEASE:=2
+PKG_VERSION:=8.8.2
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/libvips/libvips/releases/download/v$(PKG_VERSION)
-PKG_HASH:=ce7518a8f31b1d29a09b3d7c88e9852a5a2dcb3ee1501524ab477e433383f205
+PKG_HASH:=aba3f97d60c344c5d40ffcec524460e378dab939f873ec5d155bbc510a4fbd5d
 
 PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
-PKG_LICENSE:=LGPL-2.1+
+PKG_LICENSE:=LGPL-2.1-or-later
 PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:vips:vips
 
 PKG_FIXUP:=autoreconf
 PKG_BUILD_PARALLEL:=1
index d9bc8ed0efc0d29f39df10929e165659d3fc08a0..665c6972083d141837afbddd58de4d5c1b3e2bbe 100644 (file)
@@ -8,22 +8,20 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=xmlrpc-c
-PKG_VERSION:=1.43.08
+PKG_VERSION:=1.51.03
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
 PKG_SOURCE_URL:=@SF/xmlrpc-c/Xmlrpc-c%20Super%20Stable/$(PKG_VERSION)
-PKG_HASH:=c9f5b584a42493877ae0f09ed680d94e035ab389e8fa1873b1ec42118d5cfca3
+PKG_HASH:=82f9a4f6dee03f6a58921d75a65949dd4f0036a4c268bce6a4343338932ec065
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
 
 PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
 PKG_LICENSE:=VARIOUS
 PKG_LICENSE_FILES:=doc/COPYING
 
-PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
-PKG_BUILD_PARALLEL:=0
-
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
diff --git a/libs/xmlrpc-c/patches/001-config.mk.in.patch b/libs/xmlrpc-c/patches/001-config.mk.in.patch
deleted file mode 100644 (file)
index 165c3ee..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/config.mk.in
-+++ b/config.mk.in
-@@ -176,7 +176,7 @@ ifeq ($(patsubst linux-gnu%,linux-gnu,$(
-   shlibfn = $(1:%=%.$(SHLIB_SUFFIX).$(MAJ).$(MIN))
-   shliblefn = $(1:%=%.$(SHLIB_SUFFIX))
- #  SHLIB_CLIB = -lc
--  LDFLAGS_SHLIB = -shared -Wl,-soname,$(SONAME) $(SHLIB_CLIB)
-+  LDFLAGS_SHLIB = -shared -Wl,-soname,$(SONAME) $(SHLIB_CLIB) $(LDFLAGS)
-   CFLAGS_SHLIB=-fPIC
- endif
diff --git a/libs/xmlrpc-c/patches/002-automake-compat.patch b/libs/xmlrpc-c/patches/002-automake-compat.patch
deleted file mode 100644 (file)
index d5a2575..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/configure.in
-+++ b/configure.in
-@@ -223,9 +223,7 @@ dnl Checks for programs.
- dnl =======================================================================
- AC_PROG_CC
--if test x"$enable_cplusplus" != xno; then
--    AC_PROG_CXX
--fi
-+AC_PROG_CXX
- dnl =======================================================================
diff --git a/libs/xmlrpc-c/patches/010-nanosleep.patch b/libs/xmlrpc-c/patches/010-nanosleep.patch
new file mode 100644 (file)
index 0000000..a40ceef
--- /dev/null
@@ -0,0 +1,20 @@
+--- a/lib/libutil/sleep.c
++++ b/lib/libutil/sleep.c
+@@ -8,7 +8,7 @@
+ #  include <windows.h>
+ #  include <process.h>
+ #else
+-#  include <unistd.h>
++#  include <time.h>
+ #endif
+@@ -18,6 +18,7 @@ xmlrpc_millisecond_sleep(unsigned int const milliseconds) {
+ #if MSVCRT
+     SleepEx(milliseconds, true);
+ #else
+-    usleep(milliseconds * 1000);
++    const struct timespec req = {0, milliseconds * 1000 * 1000};
++    nanosleep(&req, NULL);
+ #endif
+ }
index 843b5967f2ad075095ffd61743b46b8016a06394..d3972542d676c2ca1055c856b38b827b3ad7f72c 100644 (file)
@@ -1,4 +1,4 @@
-# 
+#
 # Copyright (C) 2014, 2015 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
@@ -9,18 +9,19 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=yajl
 PKG_VERSION:=2.1.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/lloyd/yajl
+PKG_SOURCE_VERSION:=$(PKG_VERSION)
+PKG_MIRROR_HASH:=0cd74320be0270a07931e42d2f14f87a8b3fb664ecb5db58b0e838886211ab1f
+
 PKG_MAINTAINER:=Charles Southerland <charlie@stuphlabs.com>
 PKG_LICENSE:=ISC
 PKG_LICENSE_FILES:=COPYING
-PKG_REV:=66cb08ca2ad8581080b626a75dfca266a890afb2
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_MIRROR_HASH:=95bfdb37f864318fc3c2ee736a747d4902d279a88f361770c89e60ff5e1d6f63
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=$(PKG_REV)
-PKG_SOURCE_URL:=git://github.com/lloyd/yajl.git
-PKG_SOURCE_PROTO:=git
+PKG_BUILD_PARALLEL:=1
+CMAKE_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/cmake.mk
@@ -29,7 +30,7 @@ define Package/yajl
   SECTION:=libs
   CATEGORY:=Libraries
   TITLE:=Yet Another JSON Library
-  URL:=http://lloyd.github.io/yajl
+  URL:=https://lloyd.github.io/yajl
 endef
 
 define Package/yajl/description
@@ -40,18 +41,6 @@ YAJL is released under the ISC license.
   YAJL was created by Lloyd Hilaiel.
 endef
 
-PKG_INSTALL:=1
-
-CMAKE_OPTIONS += \
-       -DCMAKE_BUILD_TYPE:String="Release" 
-
-define Build/InstallDev
-       $(INSTALL_DIR) $(1)/usr/include
-       $(CP) $(PKG_INSTALL_DIR)/usr/include/yajl $(1)/usr/include/
-       $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libyajl.so* $(1)/usr/lib/
-endef
-
 define Package/yajl/install
        $(INSTALL_DIR) $(1)/usr/lib
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libyajl.so* $(1)/usr/lib/
index 7aaa9c17d7228a207160565991076cc0efe24eca..a01109d4e60d6b0254569730c13c92bc1ba8e380 100644 (file)
@@ -8,20 +8,20 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=yaml
-PKG_VERSION:=0.2.1
+PKG_VERSION:=0.2.2
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://pyyaml.org/download/libyaml/
-PKG_HASH:=78281145641a080fb32d6e7a87b9c0664d611dcb4d542e90baf731f51cbb59cd
+PKG_HASH:=4a9100ab61047fd9bd395bcef3ce5403365cafd55c1e0d0299cde14958e47be9
 
+PKG_MAINTAINER:=
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=COPYING
-PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org>
+PKG_CPE_ID:=cpe:/a:pyyaml_project:pyyaml
 
-PKG_FIXUP:=autoreconf
-PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
index 2d21be000ffdc583339b54db3ec731225568239a..a202d1a382ac4110b106b00e7feefb068421c2e5 100644 (file)
@@ -1,4 +1,4 @@
-# 
+#
 # Copyright (C) 2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=zeromq
-PKG_VERSION:=4.1.6
+PKG_VERSION:=4.1.7
 PKG_RELEASE:=2
-PKG_MAINTAINER:=Dirk Chang <dirk@kooiot.com>
-PKG_LICENSE:=GPL-3.0+
-PKG_LICENSE_FILES:=LICENCE.txt
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/zeromq/zeromq4-1/releases/download/v$(PKG_VERSION)
-PKG_HASH:=02ebf60a43011e770799336365bcbce2eb85569e9b5f52aa0d8cc04672438a0a
-
+PKG_HASH:=31c383cfcd3be1dc8a66e448c403029e793687e70473b89c4cc0bd626e7da299
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
 
-PKG_FIXUP:=autoreconf
+PKG_MAINTAINER:=Dirk Chang <dirk@kooiot.com>
+PKG_LICENSE:=GPL-3.0-or-later
+PKG_LICENSE_FILES:=LICENCE.txt
+PKG_CPE_ID:=cpe:/a:zeromq:libzmq
 
 PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
+PKG_REMOVE_FILES:=autogen.sh acinclude.m4 aclocal.m4
 
-
-include $(INCLUDE_DIR)/uclibc++.mk
 include $(INCLUDE_DIR)/package.mk
 
 define Package/libzmq/default
@@ -35,7 +34,7 @@ define Package/libzmq/default
   URL:=http://www.zeromq.org/
   SECTION:=libs
   CATEGORY:=Libraries
-  DEPENDS:=+libuuid +libpthread +librt $(CXX_DEPENDS)
+  DEPENDS:=+libuuid +libpthread +librt +libstdcpp
   PROVIDES:=libzmq
 endef
 
@@ -63,7 +62,10 @@ endef
 # add extra configure flags here
 CONFIGURE_ARGS += \
        --enable-static \
-       --enable-shared
+       --enable-shared \
+       --with-pic \
+       --with-relaxed \
+       --without-documentation
 
 ifeq ($(BUILD_VARIANT),curve)
   CONFIGURE_ARGS+= --with-libsodium
@@ -71,6 +73,8 @@ else
   CONFIGURE_ARGS+= --without-libsodium
 endif
 
+TARGET_CXXFLAGS += -Wno-error=cpp
+
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include
        $(CP) $(PKG_INSTALL_DIR)/usr/include/zmq.h $(1)/usr/include
diff --git a/libs/zmq/patches/010-disable_pedantic_on_linux_with_ulibc++.patch b/libs/zmq/patches/010-disable_pedantic_on_linux_with_ulibc++.patch
deleted file mode 100644 (file)
index 391941f..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
---- a/configure.ac
-+++ b/configure.ac
-@@ -150,8 +150,10 @@ case "${host_os}" in
-     *linux*)
-         # Define on Linux to enable all library features. Define if using a gnu compiler
-         if test "x$GXX" = "xyes"; then
--            CPPFLAGS="-D_GNU_SOURCE $CPPFLAGS"
-+            CPPFLAGS="-D_GNU_SOURCE $CPPFLAGS -Wno-long-long"
-         fi
-+        libzmq_pedantic="no"
-+        libzmq_werror="no"
-         AC_DEFINE(ZMQ_HAVE_LINUX, 1, [Have Linux OS])
-         libzmq_on_linux="yes"
index 8a47aa1ad05378be6d17a9e41b14f1b325eaacbd..a00716060b9e55ce7e9d60fa9ab379ad4e85df5a 100644 (file)
  
              metadata_t (const dict_t &dict);
              virtual ~metadata_t ();
---- a/src/socket_base.cpp
-+++ b/src/socket_base.cpp
-@@ -30,6 +30,7 @@
- #include <new>
- #include <string>
- #include <algorithm>
-+#include <ctype.h>
- #include "platform.hpp"
 --- a/src/stream_engine.cpp
 +++ b/src/stream_engine.cpp
 @@ -208,7 +208,11 @@ void zmq::stream_engine_t::plug (io_thread_t *io_thread_,
@@ -36,7 +26,7 @@
              zmq_assert (metadata == NULL);
              metadata = new (std::nothrow) metadata_t (properties);
          }
-@@ -815,7 +815,11 @@ void zmq::stream_engine_t::mechanism_ready ()
+@@ -824,7 +828,11 @@ void zmq::stream_engine_t::mechanism_ready ()
  
      //  If we have a peer_address, add it to metadata
      if (!peer_address.empty()) {
diff --git a/libs/zmq/patches/050-nanosleep.patch b/libs/zmq/patches/050-nanosleep.patch
new file mode 100644 (file)
index 0000000..5e48c07
--- /dev/null
@@ -0,0 +1,54 @@
+--- a/src/signaler.cpp
++++ b/src/signaler.cpp
+@@ -86,7 +86,8 @@ static int sleep_ms (unsigned int ms_)
+     usleep (ms_ * 1000);
+     return 0;
+ #else
+-    return usleep (ms_ * 1000);
++    const struct timespec req = {0, (long int)ms_ * 1000 * 1000};
++    return nanosleep (&req, NULL);
+ #endif
+ }
+--- a/src/tcp_address.cpp
++++ b/src/tcp_address.cpp
+@@ -29,6 +29,7 @@
+ #include <string>
+ #include <sstream>
++#include <ctime>
+ #include "tcp_address.hpp"
+ #include "platform.hpp"
+@@ -194,7 +195,8 @@ int zmq::tcp_address_t::resolve_nic_name (const char *nic_, bool ipv6_, bool is_
+         rc = getifaddrs (&ifa);
+         if (rc == 0 || (rc < 0 && errno != ECONNREFUSED))
+             break;
+-        usleep ((backoff_msec << i) * 1000);
++        const struct timespec req = {0, (backoff_msec << i) * 1000 * 1000};
++        nanosleep (&req, NULL);
+     }
+     errno_assert (rc == 0);
+     zmq_assert (ifa != NULL);
+--- a/src/zmq.cpp
++++ b/src/zmq.cpp
+@@ -692,7 +692,8 @@ int zmq_poll (zmq_pollitem_t *items_, int nitems_, long timeout_)
+         usleep (timeout_ * 1000);
+         return 0;
+ #else
+-        return usleep (timeout_ * 1000);
++        const struct timespec req = {0, timeout_ * 1000 * 1000};
++        return nanosleep (&req, NULL);
+ #endif
+     }
+@@ -852,7 +853,8 @@ int zmq_poll (zmq_pollitem_t *items_, int nitems_, long timeout_)
+         Sleep (timeout_ > 0 ? timeout_ : INFINITE);
+         return 0;
+ #else
+-        return usleep (timeout_ * 1000);
++        const struct timespec req = {0, timeout_ * 1000 * 1000};
++        return nanosleep (&req, NULL);
+ #endif
+     }
+     zmq::clock_t clock;
index d921dae47425431aec23f3611bfd8342f86584f0..265d424839f2a1d58df94b002ce1dc2b5d8c9343 100644 (file)
@@ -13,6 +13,7 @@ PKG_RELEASE:=5
 
 PKG_LICENSE:=GPLv2
 PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:bogofilter:bogofilter
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=@SF/bogofilter
diff --git a/mail/dovecot/Config.in b/mail/dovecot/Config.in
new file mode 100644 (file)
index 0000000..0f48b9f
--- /dev/null
@@ -0,0 +1,40 @@
+menu "Select dovecot build options"
+               depends on PACKAGE_dovecot
+
+config DOVECOT_GSSAPI
+       bool "GSSAPI support"
+       default n
+       help
+               Implements GSSAPI support in dovecot.
+
+config DOVECOT_LDAP
+       bool "LDAP support"
+       default n
+       help
+               Implements LDAP support in dovecot.
+
+config DOVECOT_MYSQL
+       bool "MYSQL support"
+       default n
+       help
+               Implements MYSQL support in dovecot.
+
+config DOVECOT_PGSQL
+       bool "PostgreSQL support"
+       default n
+       help
+               Implements PostgreSQL support in dovecot.
+
+config DOVECOT_SQLITE
+       bool "SQLite support"
+       default n
+       help
+               Implements SQLite DB support in dovecot.
+
+config DOVECOT_ICU
+bool "Enable i18n features"
+       default n
+       help
+               Enable ICU (International Components for Unicode) support.
+
+endmenu
index 9ac11f00c1d9e066d8d2953072ab7ed1cc135c39..21ff060191cc92db648dc0448eec257c1d2aacb0 100644 (file)
@@ -8,15 +8,17 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=dovecot
-PKG_VERSION:=2.3.6
+PKG_VERSION:=2.3.7.2
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://www.dovecot.org/releases/2.3
-PKG_HASH:=ed1d8dc1beeae9c6c73deac73a62ef19fe9262fbffd86604a3f690452f5536c7
+PKG_SOURCE_URL:=https://dovecot.org/releases/2.3
+PKG_HASH:=666ce084760a47e601d49a9be3c7993c48789d332631e8dfb45f443b367b1260
+
+PKG_MAINTAINER:=Lucian Cristian <lucian.cristian@gmail.com>
 PKG_LICENSE:=LGPL-2.1-only MIT BSD-3-Clause
 PKG_LICENSE_FILES:=COPYING COPYING.LGPL COPYING.MIT
-PKG_MAINTAINER:=Lucian Cristian <lucian.cristian@gmail.com>
+PKG_CPE_ID:=cpe:/a:dovecot:dovecot
 
 PKG_BUILD_DEPENDS:=libiconv
 PKG_CONFIG_DEPENDS:= \
@@ -39,10 +41,10 @@ include $(INCLUDE_DIR)/nls.mk
 define Package/dovecot
   SECTION:=mail
   CATEGORY:=Mail
-  DEPENDS:=+DOVECOT_GSSAPI:krb5-libs +DOVECOT_LDAP:libopenldap +DOVECOT_MYSQL:libmysqlclient +DOVECOT_PGSQL:libpq +DOVECOT_SQLITE:libsqlite3 +libopenssl +librt +zlib +libbz2 +libcap +DOVECOT_ICU:icu $(ICONV_DEPENDS)
   TITLE:=An IMAP and POP3 daemon
   URL:=https://www.dovecot.org/
-  USERID:=dovecot=59:dovecot=59
+  DEPENDS:=+DOVECOT_GSSAPI:krb5-libs +DOVECOT_LDAP:libopenldap +DOVECOT_MYSQL:libmysqlclient +DOVECOT_PGSQL:libpq +DOVECOT_SQLITE:libsqlite3 +libopenssl +librt +zlib +libbz2 +libcap +DOVECOT_ICU:icu $(ICONV_DEPENDS)
+  USERID:=dovecot=59:dovecot=59 dovenull=60:dovenull=60
   ABI_VERSION:=$(PKG_VERSION)
 endef
 
@@ -51,43 +53,10 @@ define Package/dovecot/description
 endef
 
 define Package/dovecot/config
-        menu "Select dovecot build options"
-                depends on PACKAGE_dovecot
-                config DOVECOT_GSSAPI
-                        bool "GSSAPI support"
-                        default n
-                        help
-                          Implements GSSAPI support in dovecot.
-                config DOVECOT_LDAP
-                        bool "LDAP support"
-                        default n
-                        help
-                          Implements LDAP support in dovecot.
-                config DOVECOT_MYSQL
-                        bool "MYSQL support"
-                        default n
-                        help
-                          Implements MYSQL support in dovecot.
-                config DOVECOT_PGSQL
-                        bool "PostgreSQL support"
-                        default n
-                        help
-                          Implements PostgreSQL support in dovecot.
-                config DOVECOT_SQLITE
-                        bool "SQLite support"
-                        default n
-                        help
-                          Implements SQLite DB support in dovecot.
-                config DOVECOT_ICU
-                        bool "Enable i18n features"
-                        default n
-                        help
-                          Enable ICU (International Components for Unicode) support.
-        endmenu
+       source "$(SOURCE)/Config.in"
 endef
 
 define Package/dovecot/conffiles
-/etc/init.d/dovecot
 /etc/dovecot/
 endef
 
@@ -105,7 +74,6 @@ CONFIGURE_ARGS += \
        --without-lzma \
        --without-lz4 \
        --without-sodium \
-       --without-docs \
        $(if $(CONFIG_DOVECOT_GSSAPI),--with-gssapi=yes,--with-gssapi=no) \
        $(if $(CONFIG_DOVECOT_LDAP),--with-ldap=yes,--with-ldap=no) \
        $(if $(CONFIG_DOVECOT_MYSQL),--with-mysql=yes,--with-mysql=no) \
@@ -131,24 +99,30 @@ define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib
        $(CP) $(PKG_INSTALL_DIR)/usr/include/dovecot $(1)/usr/include/
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/dovecot $(1)/usr/lib/
-       rm -f $(1)/usr/lib/dovecot/*.la
+       $(call libtool_remove_files,$(1))
 endef
 
 
 define Package/dovecot/install
-       $(INSTALL_DIR)  $(1)/etc/init.d \
-                       $(1)/etc/dovecot \
-                       $(1)/usr/lib/dovecot \
-                       $(1)/usr/libexec/dovecot \
-                       $(1)/usr/bin \
-                       $(1)/usr/sbin
+       $(INSTALL_DIR) $(1)/etc/init.d
+       $(INSTALL_BIN) ./files/dovecot.init $(1)/etc/init.d/dovecot
+
+       $(INSTALL_DIR) $(1)/etc/dovecot
+       $(CP) $(PKG_INSTALL_DIR)/usr/share/doc/dovecot/example-config/* $(1)/etc/dovecot/
+
+       $(INSTALL_DIR) $(1)/usr/lib/dovecot
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/dovecot/* $(1)/usr/lib/dovecot/
+       rm  $(1)/usr/lib/dovecot/dovecot-config
+       find $(1)/usr/lib/dovecot/ -name "*.a" -o -name "*.la" | $(XARGS) rm -f
+
+       $(INSTALL_DIR) $(1)/usr/libexec/dovecot
        $(CP) $(PKG_INSTALL_DIR)/usr/libexec/dovecot/* $(1)/usr/libexec/dovecot/
+
+       $(INSTALL_DIR) $(1)/usr/bin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/doveconf $(1)/usr/bin/
+
+       $(INSTALL_DIR) $(1)/usr/sbin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/
-       $(INSTALL_BIN) ./files/dovecot.init $(1)/etc/init.d/dovecot
-       rm  $(1)/usr/lib/dovecot/dovecot-config
-       find $(1)/usr/lib/dovecot/ -name "*.a" -o -name "*.la" | xargs rm
 endef
 
 define Package/dovecot-utils/install
index 650c5c6258b39e4ad5a9331ca16f4c2438ee12a2..11c31b87ef5bf33f21d804669ed583b6af64a571 100644 (file)
@@ -1,7 +1,6 @@
-diff -u --recursive dovecot-2.3.1-vanilla/m4/fd_passing.m4 dovecot-2.3.1/m4/fd_passing.m4
---- dovecot-2.3.1-vanilla/m4/fd_passing.m4     2018-06-08 20:02:15.849850956 -0400
-+++ dovecot-2.3.1/m4/fd_passing.m4     2018-06-08 20:04:28.947016370 -0400
-@@ -8,7 +8,7 @@
+--- a/m4/fd_passing.m4
++++ b/m4/fd_passing.m4
+@@ -8,7 +8,7 @@ AC_DEFUN([DOVECOT_FD_PASSING], [
          CFLAGS="$CFLAGS -DBUGGY_CMSG_MACROS"
        fi
      
@@ -10,7 +9,7 @@ diff -u --recursive dovecot-2.3.1-vanilla/m4/fd_passing.m4 dovecot-2.3.1/m4/fd_p
          #include <sys/types.h>
          #include <sys/socket.h>
          #include <sys/wait.h>
-@@ -16,7 +16,7 @@
+@@ -16,7 +16,7 @@ AC_DEFUN([DOVECOT_FD_PASSING], [
          #include <unistd.h>
          #include <fcntl.h>
          #include "fdpass.h"
@@ -19,10 +18,9 @@ diff -u --recursive dovecot-2.3.1-vanilla/m4/fd_passing.m4 dovecot-2.3.1/m4/fd_p
        static
          int nopen(void)
          {
-diff -u --recursive dovecot-2.3.1-vanilla/m4/glibc.m4 dovecot-2.3.1/m4/glibc.m4
---- dovecot-2.3.1-vanilla/m4/glibc.m4  2018-06-08 20:02:15.850850957 -0400
-+++ dovecot-2.3.1/m4/glibc.m4  2018-06-08 20:04:00.780981363 -0400
-@@ -17,7 +17,7 @@
+--- a/m4/glibc.m4
++++ b/m4/glibc.m4
+@@ -17,7 +17,7 @@ AC_DEFUN([DOVECOT_GLIBC], [
    dnl * Old glibcs have broken posix_fallocate(). Make sure not to use it.
    dnl * It may also be broken in AIX.
    AC_CACHE_CHECK([whether posix_fallocate() works],i_cv_posix_fallocate_works,[
@@ -31,7 +29,7 @@ diff -u --recursive dovecot-2.3.1-vanilla/m4/glibc.m4 dovecot-2.3.1/m4/glibc.m4
        #define _XOPEN_SOURCE 600
        #include <stdio.h>
        #include <stdlib.h>
-@@ -26,6 +26,7 @@
+@@ -26,6 +26,7 @@ AC_DEFUN([DOVECOT_GLIBC], [
        #if defined(__GLIBC__) && (__GLIBC__ < 2 || __GLIBC_MINOR__ < 7)
          possibly broken posix_fallocate
        #endif
@@ -39,10 +37,9 @@ diff -u --recursive dovecot-2.3.1-vanilla/m4/glibc.m4 dovecot-2.3.1/m4/glibc.m4
        int main() {
          int fd = creat("conftest.temp", 0600);
          int ret;
-diff -u --recursive dovecot-2.3.1-vanilla/m4/ioloop.m4 dovecot-2.3.1/m4/ioloop.m4
---- dovecot-2.3.1-vanilla/m4/ioloop.m4 2018-06-08 20:02:15.850850957 -0400
-+++ dovecot-2.3.1/m4/ioloop.m4 2018-06-08 20:03:31.666945181 -0400
-@@ -4,9 +4,9 @@
+--- a/m4/ioloop.m4
++++ b/m4/ioloop.m4
+@@ -4,9 +4,9 @@ AC_DEFUN([DOVECOT_IOLOOP], [
    
    if test "$ioloop" = "best" || test "$ioloop" = "epoll"; then
      AC_CACHE_CHECK([whether we can use epoll],i_cv_epoll_works,[
@@ -54,9 +51,8 @@ diff -u --recursive dovecot-2.3.1-vanilla/m4/ioloop.m4 dovecot-2.3.1/m4/ioloop.m
          int main()
          {
        return epoll_create(5) < 1;
-diff -u --recursive dovecot-2.3.1-vanilla/m4/mmap_write.m4 dovecot-2.3.1/m4/mmap_write.m4
---- dovecot-2.3.1-vanilla/m4/mmap_write.m4     2018-06-08 20:02:15.850850957 -0400
-+++ dovecot-2.3.1/m4/mmap_write.m4     2018-06-08 20:03:27.369939841 -0400
+--- a/m4/mmap_write.m4
++++ b/m4/mmap_write.m4
 @@ -1,7 +1,7 @@
  dnl * If mmap() plays nicely with write()
  AC_DEFUN([DOVECOT_MMAP_WRITE], [
@@ -66,7 +62,7 @@ diff -u --recursive dovecot-2.3.1-vanilla/m4/mmap_write.m4 dovecot-2.3.1/m4/mmap
        #include <stdio.h>
        #include <sys/types.h>
        #include <sys/stat.h>
-@@ -9,6 +9,7 @@
+@@ -9,6 +9,7 @@ AC_DEFUN([DOVECOT_MMAP_WRITE], [
        #include <fcntl.h>
        #include <sys/mman.h>
        #include <string.h>
@@ -74,10 +70,9 @@ diff -u --recursive dovecot-2.3.1-vanilla/m4/mmap_write.m4 dovecot-2.3.1/m4/mmap
        int main() {
          /* return 0 if we're signed */
          int f = open("conftest.mmap", O_RDWR|O_CREAT|O_TRUNC, 0600);
-diff -u --recursive dovecot-2.3.1-vanilla/m4/want_gssapi.m4 dovecot-2.3.1/m4/want_gssapi.m4
---- dovecot-2.3.1-vanilla/m4/want_gssapi.m4    2018-06-08 20:02:15.850850957 -0400
-+++ dovecot-2.3.1/m4/want_gssapi.m4    2018-06-08 20:04:13.204996804 -0400
-@@ -54,7 +54,7 @@
+--- a/m4/want_gssapi.m4
++++ b/m4/want_gssapi.m4
+@@ -54,7 +54,7 @@ AC_DEFUN([DOVECOT_WANT_GSSAPI], [
    
                                # does the kerberos library support SPNEGO?
                                AC_CACHE_CHECK([whether GSSAPI supports SPNEGO],i_cv_gssapi_spnego,[
@@ -86,7 +81,7 @@ diff -u --recursive dovecot-2.3.1-vanilla/m4/want_gssapi.m4 dovecot-2.3.1/m4/wan
                                    #ifdef HAVE_GSSAPI_H
                                    #  include <gssapi.h>
                                    #else
-@@ -62,6 +62,7 @@
+@@ -62,6 +62,7 @@ AC_DEFUN([DOVECOT_WANT_GSSAPI], [
                                    #endif
                                    #include <krb5.h>
                                    #include <string.h>
index 6c0bc743db10bce98d8320087691305d966e6855..2fd49d9b2610eaa2edde80ca2c776919c114ce40 100644 (file)
@@ -33,10 +33,8 @@ LIBDOVECOT_LIBFTS=-ldovecot-fts
 
 This patch modifed dovecot-config that gets installed on the assumption
 that users of libdovecot will also be cross-compiled (a safe bet).
-Index: dovecot-2.3.2.1/Makefile.am
-===================================================================
---- dovecot-2.3.2.1.orig/Makefile.am
-+++ dovecot-2.3.2.1/Makefile.am
+--- a/Makefile.am
++++ b/Makefile.am
 @@ -73,7 +73,7 @@ install-exec-hook:
        grep -v '^LIBDOVECOT_.*_INCLUDE' dovecot-config | \
        grep -v '^LIBDOVECOT.*_DEPS' | sed \
index 72d447425bfc9b4d04da8ee006f0c23cc7b341dc..e0d40e1e199f70a8e362b18dc47a4897f1c566fa 100644 (file)
@@ -10,7 +10,7 @@
  
 --- a/src/lib-ssl-iostream/dovecot-openssl-common.c
 +++ b/src/lib-ssl-iostream/dovecot-openssl-common.c
-@@ -63,9 +63,11 @@ void dovecot_openssl_common_global_ref(void)
+@@ -63,9 +63,11 @@ void dovecot_openssl_common_global_ref(v
                /*i_warning("CRYPTO_set_mem_functions() was called too late");*/
        }
  
@@ -22,7 +22,7 @@
  }
  
  bool dovecot_openssl_common_global_unref(void)
-@@ -79,6 +81,7 @@ bool dovecot_openssl_common_global_unref(void)
+@@ -79,6 +81,7 @@ bool dovecot_openssl_common_global_unref
                ENGINE_finish(dovecot_openssl_engine);
                dovecot_openssl_engine = NULL;
        }
        /* OBJ_cleanup() is called automatically by EVP_cleanup() in
           newer versions. Doesn't hurt to call it anyway. */
        OBJ_cleanup();
-@@ -100,6 +103,7 @@ bool dovecot_openssl_common_global_unref(void)
-       ERR_free_strings();
+@@ -101,6 +104,7 @@ bool dovecot_openssl_common_global_unref
  #ifdef HAVE_OPENSSL_CLEANUP
        OPENSSL_cleanup();
-+#endif
  #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 @@
@@ -50,7 +50,7 @@
  #include <openssl/x509.h>
  #include <openssl/pem.h>
  #include <openssl/ssl.h>
-@@ -510,8 +513,10 @@ ssl_proxy_ctx_set_crypto_params(SSL_CTX *ssl_ctx,
+@@ -514,8 +517,10 @@ ssl_proxy_ctx_set_crypto_params(SSL_CTX
        int nid;
        const char *curve_name;
  #endif
index 19326fb13b891ea6718cf01bc9f59079aed0cd41..6f8d47119cbbf1a4419b74beda5ab651690d03c2 100644 (file)
@@ -14,7 +14,7 @@
  #include "dcrypt.h"
  #include "dcrypt-private.h"
  
-@@ -179,11 +181,13 @@ static bool dcrypt_openssl_error(const char **error_r)
+@@ -179,11 +181,13 @@ static bool dcrypt_openssl_error(const c
  static bool dcrypt_openssl_initialize(const struct dcrypt_settings *set,
                                      const char **error_r)
  {
@@ -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)
-@@ -77,10 +80,12 @@ bool dovecot_openssl_common_global_unref(void)
+@@ -77,10 +80,12 @@ bool dovecot_openssl_common_global_unref
        if (--openssl_init_refcount > 0)
                return TRUE;
  
@@ -60,7 +60,7 @@
  #if OPENSSL_VERSION_NUMBER < 0x10100000L
        /* OBJ_cleanup() is called automatically by EVP_cleanup() in
           newer versions. Doesn't hurt to call it anyway. */
-@@ -88,7 +93,9 @@ bool dovecot_openssl_common_global_unref(void)
+@@ -88,7 +93,9 @@ bool dovecot_openssl_common_global_unref
  #ifdef HAVE_SSL_COMP_FREE_COMPRESSION_METHODS
        SSL_COMP_free_compression_methods();
  #endif
@@ -70,7 +70,7 @@
        EVP_cleanup();
        CRYPTO_cleanup_all_ex_data();
  #ifdef HAVE_OPENSSL_AUTO_THREAD_DEINIT
-@@ -111,6 +118,7 @@ bool dovecot_openssl_common_global_unref(void)
+@@ -111,6 +118,7 @@ bool dovecot_openssl_common_global_unref
  int dovecot_openssl_common_global_set_engine(const char *engine,
                                             const char **error_r)
  {
@@ -78,7 +78,7 @@
        if (dovecot_openssl_engine != NULL)
                return 1;
  
-@@ -132,5 +140,6 @@ int dovecot_openssl_common_global_set_engine(const char *engine,
+@@ -132,5 +140,6 @@ int dovecot_openssl_common_global_set_en
                dovecot_openssl_engine = NULL;
                return -1;
        }
index 3f3796bb454e824a68c82ff58712d437bb5b0abd..d1c41ac2536a2945230a266a6f43c1c0280b9979 100644 (file)
@@ -9,14 +9,14 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mailman
 PKG_VERSION:=2.1.29
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
 PKG_SOURCE_URL:=@GNU/$(PKG_NAME)
 PKG_HASH:=838872713601e8a124146e550f53709482c1ef168f1e16d201465c651cbf0d2c
 
 PKG_MAINTAINER:=Denis Shulyaka <Shulyaka@gmail.com>
-PKG_LICENSE:=GPL-2.0+
+PKG_LICENSE:=GPL-2.0-or-later
 PKG_LICENSE_FILES:=gnu-COPYING-GPL
 PKG_CPE_ID:=cpe:2.3:a:gnu:mailman
 
index 3e38d4896316a3599d4f8d2a11e89f83880d0a09..f965ebb833f115902805545ec58c67d41f1710f6 100644 (file)
@@ -1,7 +1,6 @@
 #
 # Copyright (C) 2009 David Cooper <dave@kupesoft.com>
-# Copyright (C) 2009-2015 OpenWrt.org
-# Copyright (C) 2016 Daniel Dickinson <cshored@thecshore.com>
+# Copyright (C) 2016-2019 Daniel Dickinson <cshored@thecshore.com>
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=msmtp-scripts
-PKG_VERSION:=1.0.8
-PKG_RELEASE:=1
+PKG_VERSION:=1.2.4
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=@SF/msmtp-scripts
-PKG_HASH:=2aec48d47b02facf2a33cf97a7434e969c1a054224406e6c55320d825c7902b2
+PKG_SOURCE_URL:=https://launchpad.net/$(PKG_NAME)/1.2/$(PKG_VERSION)/+download
+PKG_HASH:=fc85ab8ed1348be584adfc1feb89f51daed7404e9e8643652ff31d2af00f1cf5
+PKG_MAINTAINER:=Daniel F. Dickinson <cshored@thecshore.com>
 
-PKG_LICENSE:=GPL-3.0+
+PKG_LICENSE:=GPL-3.0-or-later
 PKG_LICENSE_FILES:=COPYING
 
 include $(INCLUDE_DIR)/package.mk
@@ -25,24 +25,20 @@ include $(INCLUDE_DIR)/package.mk
 define Package/msmtp-scripts/Default
   SECTION:=mail
   CATEGORY:=Mail
-  TITLE:=DEPRECATED: Simple sendmail SMTP queueing and forwarding
-  URL:=http://msmtp-scripts.sourceforge.net/
+  TITLE:=Forwarding only SMTP with queuing
+  URL:=https://msmtp-scripts.thecshore.com
 endef
 
 define Package/msmtp-scripts/Default/description
- DEPRECATED: SourceForge project is abandonded; and upstream (on GitHub)
- has deprecated this project. See:
- https://github.com/cshore-history/msmtp-scripts#deprecation-notice
-
  msmtp-scripts are scripts wrappers around the msmtp SMTP client that
- add queueing, logging to syslog or file, a subset of sendmail/postfix
+ add queueing, logging to syslog or file, and a subset of sendmail/postfix
  mailq/postsuper/postqueue commands implemented in a compatible fashion.
 endef
 
 define Package/msmtpq-ng
 $(call Package/msmtp-scripts/Default)
-  DEPENDS+= @(PACKAGE_msmtp||PACKAGE_msmtp-nossl)
-  TITLE+= (msmtpq-ng wrappers)
+  DEPENDS+= +msmtp
+  TITLE+= (common)
 endef
 
 define Package/msmtpq-ng/conffiles
@@ -60,10 +56,15 @@ define Package/msmtpq-ng-mta
 $(call Package/msmtp-scripts/Default)
   TITLE+= (as MTA)
   DEPENDS+=+msmtpq-ng
-  USERID:=msmtp=482:msmtp=482
+  ALTERNATIVES:=\
+    400:/usr/sbin/sendmail:/usr/sbin/msmtpq-ng-mta \
+    400:/usr/lib/sendmail:/usr/sbin/msmtpq-ng-mta \
+    400:/usr/sbin/mailq:/usr/sbin/msmtpq-ng-queue-mta \
+    400:/usr/sbin/postqueue:/usr/sbin/msmtpq-ng-queue-mta \
+    400:/usr/sbin/postsuper:/usr/sbin/msmtpq-ng-queue-mta
 endef
 
-define Package/msmtp-queue-mta/conffiles
+define Package/msmtpq-ng-mta/conffiles
 /etc/msmtpq-ng-mta.rc
 endef
 
@@ -73,12 +74,47 @@ define Package/msmtpq-ng-mta/description
  and postsuper symlinks to wrappers that configure
  msmtpq-ng for use as the system mail transport
  agent via the sendmail command.
+
+**NB**: In order for msmtpq-ng-mta aka sendmail to
+send mail for non-root users (not just queue it
+after failing), the user must have permissions to
+access /etc/msmtprc -- package msmtp sets msmtprc
+to rw only by root by default as a security measure
+(it _can_ contain information like passwords with
+which to send mail through your email server).
+
+There are a couple of choices.  One is to leave
+the default permissions (in which cases the mail
+will queue and fail to send until the mailq -q
+runner which runs in a root crontab sends the mail).
+Another is to give any non-root daemon users (or
+any other users) group access (i.e. create a
+group for all the users who should be able to
+send mail, add the users to it, and give the
+group read-only permissions on the msmtrpc).
+A final option (which is only resonable if you
+have no secrets in msmtprc because you are
+sending unauthenticated mail to a server that
+accepts mail directly for the intended user --
+usually that means a self-hosted system mail
+server, rather than trying to send mail to
+public servers (which don't typically accept
+mail from normal user IP addresses, even if
+you ISP doesn't block the traffic) is to
+make msmtprc world readable.
+
+The first option is probably the best choice
+for most users, as it just means a 15
+minute delay in the mail getting off the
+system, and doesn't involve special permissions
+for non-root daemons or users.
 endef
 
 define Package/msmtpq-ng-mta-smtpd
 $(call Package/msmtp-scripts/Default)
   DEPENDS+= +msmtpq-ng-mta +xinetd
-  TITLE+= (basic SMTP server)
+  TITLE+= (localhost SMTPd)
+  USERID:=msmtp=482:msmtp=482
 endef
 
 define Package/msmtp-ng-mta-smtpd/description
@@ -92,13 +128,13 @@ define Package/msmtp-ng-mta-smtpd/description
  the hold queue before it can be delivered.
 endef
 
-define Package/msmtpq-ng-mta/postinst
-       mkdir -p $${IPKG_INSTROOT}/etc/crontabs
-       if ! grep -q msmtpq-ng-mta $${IPKG_INSTROOT}/etc/crontabs/root; then echo $$'\n'"*/60 * * * * /usr/bin/msmtpq-ng-mta -q" >>$${IPKG_INSTROOT}/etc/crontabs/root; fi
+define Package/msmtpq-ng-mta-smtpd/conffiles
+/etc/xinetd.d/ms-mta-smtpd
 endef
 
-define Package/msmtp-queue-mta/prerm
-       if grep -q msmtpq-ng-mta $${IPKG_INSTROOT}/etc/crontabs/root; then grep -v '\*/60 \* \* \* \* /usr/bin/msmtpq-ng-mta -q' $${IPKG_INSTROOT}/etc/crontabs/root >$${IPKG_INSTROOT}/etc/crontabs/root.new; mv -f $${IPKG_INSTROOT}/etc/crontabs/root.new $${IPKG_INSTROOT}/etc/crontabs; fi
+define Package/msmtpq-ng-mta/postinst
+       mkdir -p $${IPKG_INSTROOT}/etc/crontabs
+       if ! grep -q msmtpq-ng-mta $${IPKG_INSTROOT}/etc/crontabs/root 2>/dev/null; then echo $$'\n'"*/60 * * * * /usr/bin/msmtpq-ng-mta -q" >>$${IPKG_INSTROOT}/etc/crontabs/root; fi
 endef
 
 define Build/Configure
@@ -111,31 +147,25 @@ endef
 
 define Package/msmtpq-ng/install
        $(INSTALL_DIR) $(1)/etc
-       $(INSTALL_CONF) ./files/msmtpq-ng.rc $(1)/etc/msmtpq-ng.rc
+       $(INSTALL_DATA) ./files/msmtpq-ng.rc $(1)/etc/msmtpq-ng.rc
        $(INSTALL_DIR) $(1)/usr/bin
-       $(CP) $(PKG_BUILD_DIR)/msmtpq-ng/msmtpq-ng $(1)/usr/bin/
-       $(SED) 's/logger -i/logger/' $(1)/usr/bin/msmtpq-ng
-       $(CP) $(PKG_BUILD_DIR)/msmtpq-ng/msmtpq-ng-queue $(1)/usr/bin/
+       $(CP) $(PKG_BUILD_DIR)/src/usr/bin/msmtpq-ng $(1)/usr/bin/
+       $(SED) "s,nc -vz,printf \"HEAD / HTTP/1.1\\\\r\\\\nHost: \$$$${EMAIL_CONN_TEST_SITE}\\\\r\\\\n\\\\r\\\\n\"|nc," $(1)/usr/bin/msmtpq-ng
+       $(CP) $(PKG_BUILD_DIR)/src/usr/bin/msmtpq-ng-queue $(1)/usr/bin/
 endef
 
 define Package/msmtpq-ng-mta/install
        $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/sbin $(1)/usr/lib $(1)/etc/init.d
-       $(INSTALL_CONF) $(PKG_BUILD_DIR)/msmtpq-ng-mta/msmtpq-ng-mta.rc $(1)/etc/
-       echo 'MSMTP_LOCK_DIR=/var/lock/msmtp' >>$(1)/etc/msmtpq-ng-mta.rc
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/msmtpq-ng-mta/msmtpq-ng-mta $(1)/usr/bin/
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/msmtpq-ng-mta/msmtpq-ng-queue-mta $(1)/usr/bin/
+       $(INSTALL_DATA) ./files/msmtpq-ng-mta.rc $(1)/etc/
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/usr/sbin/msmtpq-ng-mta $(1)/usr/sbin/
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/usr/sbin//msmtpq-ng-queue-mta $(1)/usr/sbin/
        $(INSTALL_DIR) $(1)/etc/crontabs
        $(INSTALL_BIN) ./files/msmtpq-ng-mta.init $(1)/etc/init.d/msmtpq-ng-mta
-       ln -sf ../bin/msmtpq-ng-mta $(1)/usr/sbin/sendmail
-       ln -sf ../bin/msmtpq-ng-mta $(1)/usr/lib/sendmail
-       ln -sf ../bin/msmtpq-ng-queue-mta $(1)/usr/sbin/mailq
-       ln -sf ../bin/msmtpq-ng-queue-mta $(1)/usr/sbin/postqueue
-       ln -sf ../bin/msmtpq-ng-queue-mta $(1)/usr/sbin/postsuper
 endef
 
 define Package/msmtpq-ng-mta-smtpd/install
        $(INSTALL_DIR) $(1)/etc/xinetd.d
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/msmtpq-ng-mta/sendmail-bs.xinetd $(1)/etc/xinetd.d/msmtpq-ng-mta-smtpd
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/etc/xinetd.d/ms-mta-smtpd $(1)/etc/xinetd.d/ms-mta-smtpd
 endef
 
 
index 944164c205f606160a9be6df051e8e8757941340..1636d58bfad93d6fe85597f8fda4a00a9a388fc2 100644 (file)
@@ -4,14 +4,16 @@
 START=90
 
 boot() {
-       [ ! -d /var/spool/msmtp ] && {
-               mkdir -m 0770 -p /var/spool/msmtp
-               chown msmtp:msmtp /var/spool/msmtp
-       }
+       if [ ! -d /var/spool/msmtp ]; then
+               mkdir -m1777 -p /var/spool/msmtp
+       else
+               chmod 1777 /var/spool/msmtp
+       fi
 
-       [ ! -d /var/lock/msmtp ] && {
-               mkdir -m 0770 -p /var/lock/msmtp
-               chown msmtp:msmtp /var/lock/msmtp
-       }
+       if [ ! -d /var/lock/msmtp ]; then
+               mkdir -m1777 -p /var/lock/msmtp
+       else
+               chmod 1777 /var/spool/msmtp
+       fi
 }
 
diff --git a/mail/msmtp-scripts/files/msmtpq-ng-mta.rc b/mail/msmtp-scripts/files/msmtpq-ng-mta.rc
new file mode 100644 (file)
index 0000000..bb1536a
--- /dev/null
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+#Q=/var/spool/msmtp/"$(id -un)"
+#LOG=syslog
+#MAXLOGLEVEL=7
+#MSMTP_LOCK_DIR=/var/lock/msmtp/"$(id -un)"
+#MSMTP_UMASK=077
+#MSMTP_LOG_UMASK=007
+#MSMTP_QUEUE_QUIET=true
+#MSMTP_IGNORE_NO_RECIPIENTS=true
+#MSMTP_QUEUE_ONLY=false
+#MSMTP_SEND_DELAY=0
+#MSMTP_MAXIMUM_QUEUE_LIFETIME=345600    # Four days
+#MSMTPQ_NG=msmtpq-ng
+#MSMTPQ_NG_QUEUE=msmtpq-ng-queue
+#MSMTP_CONF=/etc/msmtprc
+EMAIL_CONN_TEST=n
+#EMAIL_CONN_TEST_PING=openwrt.org
+#EMAIL_CONN_TEST_IP=8.8.8.8
+EMAIL_CONN_TEST_SITE=openwrt.org
+#MSMTP_HOLD_SMTP_MAIL=true
+#MSMTP_HOLD_CLI_MAIL=false
index 179002126224b03c3d2ae95b062f7744f8b486c0..ef8c0f051a7903ff68f991212e6ccb4d46865c99 100644 (file)
@@ -1,14 +1,17 @@
+#!/bin/sh
+
 #Q=~/msmtp.queue
 #LOG=~/log/.msmtp.queue.log
 #MAXLOGLEVEL=7
-#MSMTP_LOCKDIR=/var/lock
-EMAIL_CONN_TEST=p
-EMAIL_CONN_TEST_SITE=www.lede-project.org
+#MSMTP_LOCK_DIR=~/.msmtp.lock
+EMAIL_CONN_TEST=n
+#EMAIL_CONN_TEST_PING=openwrt.org
 #EMAIL_CONN_TEST_IP=8.8.8.8
+EMAIL_CONN_TEST_SITE=openwrt.org
 #MSMTP_UMASK=077
 #MSMTP_LOG_UMASK=077
 #MSMTP_QUEUE_QUIET=false
-#MSMTP_IGNORE_NO_RECIPIENTS=false
+#MSMTP_IGNORE_NO_RECIPIENTS=true
 #MSMTP_QUEUE_ONLY=false
 #MSMTP_SEND_DELAY=0
 #MSMTP_MAXIMUM_QUEUE_LIFETIME=345600   # Four days
@@ -16,3 +19,5 @@ EMAIL_CONN_TEST_SITE=www.lede-project.org
 #MSMTPQ_NG_QUEUE=msmtpq-ng-queue
 #MSMTP_HOLD_SMTP_MAIL=true
 #MSMTP_HOLD_CLI_MAIL=false
+#MSMTP_CONF=/etc/msmtprc
+#LOCK_CMD=flock
index 6bbabf0214561b5a495553c4397c82c931e4c2b4..3595949a454a920cb8b1e56d2255f0a5fc8af149 100644 (file)
@@ -9,21 +9,21 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=msmtp
-PKG_VERSION:=1.8.4
+PKG_VERSION:=1.8.5
 PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://marlam.de/msmtp/releases
-PKG_HASH:=e5dd7fe95bc8e2f5eea3e4894ec9628252f30bd700a7fd1a568b10efa91129f7
+PKG_HASH:=1613daced9c47b8c028224fc076799c2a4d72923e242be4e9e5c984cbbbb9f39
 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:=GPL-3.0-or-later
 PKG_LICENSE_FILES:=COPYING
 PKG_CPE_ID:=cpe:/a:marlam:msmtp
 
-PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/nls.mk
@@ -49,6 +49,7 @@ $(call Package/msmtp/Default)
   DEPENDS+= +libgnutls +ca-bundle
   TITLE+= (with SSL support)
   VARIANT:=ssl
+  DEFAULT_VARIANT:=1
 endef
 
 define Package/msmtp/conffiles
@@ -64,6 +65,7 @@ define Package/msmtp-nossl
 $(call Package/msmtp/Default)
   TITLE+= (without SSL support)
   VARIANT:=nossl
+  PROVIDES:=msmtp
 endef
 
 define Package/msmtp-nossl/description
@@ -74,7 +76,10 @@ endef
 define Package/msmtp-mta
 $(call Package/msmtp/Default)
   TITLE+= (as MTA)
-  DEPENDS+=@(PACKAGE_msmtp||PACKAGE_msmtp-nossl)
+  DEPENDS+=+msmtp
+  ALTERNATIVES:=\
+       100:/usr/sbin/sendmail:/usr/bin/msmtp \
+       100:/usr/lib/sendmail:/usr/bin/msmtp
 endef
 
 define Package/msmtp-mta/description
@@ -85,7 +90,7 @@ endef
 
 define Package/msmtp-queue
 $(call Package/msmtp/Default)
-  DEPENDS+= +bash @(PACKAGE_msmtp||PACKAGE_msmtp-nossl)
+  DEPENDS+= +bash +msmtp
   TITLE+= (queue scripts)
 endef
 
@@ -119,8 +124,6 @@ endef
 
 define Package/msmtp-mta/install
        $(INSTALL_DIR) $(1)/usr/sbin $(1)/usr/lib
-       ln -sf ../bin/msmtp $(1)/usr/sbin/sendmail
-       ln -sf ../bin/msmtp $(1)/usr/lib/sendmail
 endef
 
 Package/msmtp-nossl/conffiles = $(Package/msmtp/conffiles)
index d085dfda55b857691107173860b127336b3926ca..d15949eb62091904d71413d5766f7ced80a6750e 100644 (file)
@@ -8,17 +8,18 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mutt
-PKG_VERSION:=1.12.0
+PKG_VERSION:=1.12.2
 PKG_RELEASE:=1
 
 PKG_SOURCE_URL:=https://bitbucket.org/mutt/mutt/downloads/ \
                http://ftp.mutt.org/pub/mutt/
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=ca12448784ed7b6c86d498921e18bc7b152d45494a452df56a7a0c8aaf13f98f
+PKG_HASH:=bc42750ce8237742b9382f2148fc547a8d8601aa4a7cd28c55fe7ca045196882
 
 PKG_MAINTAINER:=Phil Eichinger <phil@zankapfel.net>
-PKG_LICENSE:=GPL-2.0+
+PKG_LICENSE:=GPL-2.0-or-later
 PKG_LICENSE_FILES:=GPL
+PKG_CPE_ID:=cpe:/a:mutt:mutt
 
 PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
index eaf0f81e6e4c97c52f5239b888494438a467b6db..ded120fa34e3b7c982571f2c04ea6ebe9fa943d4 100644 (file)
@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=opendkim
 PKG_VERSION:=2.10.3
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/$(PKG_NAME)
diff --git a/mail/opendkim/patches/020-uclibc.patch b/mail/opendkim/patches/020-uclibc.patch
new file mode 100644 (file)
index 0000000..b74c3a9
--- /dev/null
@@ -0,0 +1,20 @@
+--- a/libopendkim/dkim-dns.c
++++ b/libopendkim/dkim-dns.c
+@@ -163,6 +163,9 @@ int
+ dkim_res_query(void *srv, int type, unsigned char *query, unsigned char *buf,
+                size_t buflen, void **qh)
+ {
++#ifdef __UCLIBC__
++      return DKIM_DNS_ERROR;
++#else
+       int n;
+       int ret;
+       struct dkim_res_qh *rq;
+@@ -209,6 +212,7 @@ dkim_res_query(void *srv, int type, unsigned char *query, unsigned char *buf,
+       *qh = (void *) rq;
+       return DKIM_DNS_SUCCESS;
++#endif // __UCLIBC__
+ }
+ /*
index d28479aa321d3cf9981e3d6edc8b063015921a1c..bc28838438d24ce1e9d72d7db1f3bbff123fc55f 100644 (file)
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=dovecot-pigeonhole
-PKG_VERSION_PLUGIN:=0.5.5
+PKG_VERSION_PLUGIN:=0.5.7.2
 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:=1
@@ -17,9 +17,10 @@ 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:=cbaa106e1c2b23824420efdd6a9f8572c64c8dccf75a3101a899b6ddb25149a5
+PKG_HASH:=d59d0c5c5225a126e5b98bf95d75e8dd368bdeeb3da2e9766dbe4fddaa9411b0
 PKG_LICENSE:=LGPL-2.1
 PKG_LICENSE_FILES:=COPYING COPYING.LGPL
+PKG_CPE_ID:=cpe:/a:dovecot:pigeonhole
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/dovecot-$(DOVECOT_VERSION)-pigeonhole-$(PKG_VERSION_PLUGIN)
 PKG_INSTALL:=1
index f25e054a9d875f636b83a46bbd2f2ec65cb08c19..82d7677c9b2efc22ae9f0b4d8afb2003fa254a05 100644 (file)
@@ -8,17 +8,19 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=postfix
-PKG_RELEASE:=2
-PKG_VERSION:=3.4.4
+PKG_RELEASE:=1
+PKG_VERSION:=3.4.6
 PKG_SOURCE_URL:= \
        https://cdn.postfix.johnriley.me/mirrors/postfix-release/official/ \
        http://ftp.porcupine.org/mirrors/postfix-release/official/
 
-PKG_HASH:=27f2ab631a966a40e002aedc6db9281e5970295fa5fd96b29066e457a4601e34
+PKG_HASH:=d674a9b40602ee30420ee7ff93c3600e8913eeb2ea9bfb0ac1d140dac5dbe326
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_MAINTAINER:=Denis Shulyaka <Shulyaka@gmail.com>
 PKG_LICENSE:=IPL-1.0
 PKG_LICENSE_FILES:=LICENSE
+PKG_CPE_ID:=cpe:/a:postfix:postfix
+
 PKG_BUILD_DEPENDS:=POSTFIX_CDB:tinycdb
 PKG_CONFIG_DEPENDS:= \
        CONFIG_POSTFIX_TLS \
index c93b728b59eeef726b3a2164d9e205fa48719be2..512de95aa0dac8cab21cc025511e56a0ab7891ff 100644 (file)
@@ -19,6 +19,7 @@ PKG_MAINTAINER:=Val Kulkov <val.kulkov@gmail.com>
 
 PKG_LICENSE:=Sendmail
 PKG_LICENSE_FILES:=LICENSE
+PKG_CPE_ID:=cpe:/a:sendmail:sendmail
 
 PKG_INSTALL:=1
 PKG_BUILD_DEPENDS:=openssl
index f6322cf61927bfe0e668082eb2546e1b21f290ac..0b430cb24771b51bc1593626cffa2516e515fb49 100644 (file)
@@ -9,9 +9,10 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ssmtp
 PKG_VERSION:=2.64
-PKG_RELEASE:=6
+PKG_RELEASE:=7
 PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
-PKG_LICENSE:=GPL-2.0+
+PKG_LICENSE:=GPL-2.0-or-later
+PKG_CPE_ID:=cpe:/a:ssmtp:ssmtp
 
 PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.bz2
 PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/s/ssmtp
index e6ffcec4ce70baefad22e65db285a61519b77146..0a19c1def346bf7f134c88ddda8be9c718b1464f 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=crtmpserver
 PKG_SOURCE_DATE:=2015-10-04
 PKG_SOURCE_VERSION:=b866fffca37c3b967a8878499cd2b91aa2587f34
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_DATE).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/shiretu/crtmpserver/tar.gz/$(PKG_SOURCE_VERSION)?
@@ -80,7 +80,7 @@ define Package/crtmpserver/install
        $(INSTALL_DIR) $(1)/usr/bin
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/builders/make/output/dynamic/crtmpserver $(1)/usr/bin/
        $(INSTALL_DIR) $(1)/usr/lib/crtmpserver
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/builders/make/output/dynamic/*.so $(1)/usr/lib/crtmpserver/
+       $(CP) $(PKG_BUILD_DIR)/builders/make/output/dynamic/*.so $(1)/usr/lib/crtmpserver/
        $(foreach app,flvplayback samplefactory admin stresstest appselector vptests applestreamingclient proxypublish, \
                $(INSTALL_DIR) $(1)/usr/lib/crtmpserver/$(app); \
                $(INSTALL_BIN) $(PKG_BUILD_DIR)/builders/make/output/dynamic/applications/$(app)/lib$(app).so \
index bffb9c3d8937abd0dd56da3132566c213665b9e6..5a18edf1a69d613746aec011d879d47b753901e3 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ffmpeg
 PKG_VERSION:=3.4.6
-PKG_RELEASE:=1
+PKG_RELEASE:=4
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://ffmpeg.org/releases/
@@ -18,7 +18,7 @@ PKG_HASH:=3572279cb139d9e39dcfbc23edf438ff5311ec3fc5d0dcb3558e49591e5cb83e
 PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>, \
                Ian Leonard <antonlacon@gmail.com>
 
-PKG_LICENSE:=LGPL-2.1+ GPL-2+ LGPL-3
+PKG_LICENSE:=LGPL-2.1-or-later GPL-2.0-or-later LGPL-3
 PKG_LICENSE_FILES:=COPYING.GPLv2 COPYING.GPLv3 COPYING.LGPLv2.1 COPYING.LGPLv3
 PKG_CPE_ID:=cpe:/a:ffmpeg:ffmpeg
 
@@ -752,11 +752,15 @@ define Package/ffprobe/install
        $(CP) $(PKG_INSTALL_DIR)/usr/bin/ffprobe $(1)/usr/bin/
 endef
 
+Package/ffprobe-custom/install = $(Package/ffprobe/install)
+
 define Package/ffserver/install
        $(INSTALL_DIR) $(1)/usr/bin
        $(CP) $(PKG_INSTALL_DIR)/usr/bin/ffserver $(1)/usr/bin/
 endef
 
+Package/ffserver-custom/install = $(Package/ffserver/install)
+
 define Package/libffmpeg-custom/install
        $(INSTALL_DIR) $(1)/usr/lib
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{avcodec,avdevice,avformat,avutil}.so.* $(1)/usr/lib/
diff --git a/multimedia/ffmpeg/patches/010-pkgconfig.patch b/multimedia/ffmpeg/patches/010-pkgconfig.patch
new file mode 100644 (file)
index 0000000..48635e1
--- /dev/null
@@ -0,0 +1,15 @@
+--- a/ffbuild/pkgconfig_generate.sh
++++ b/ffbuild/pkgconfig_generate.sh
+@@ -28,9 +28,9 @@ version=$(grep ${name}_VERSION= $name/${name}.version | cut -d= -f2)
+ cat <<EOF > $name/$fullname.pc
+ prefix=$prefix
+-exec_prefix=\${prefix}
+-libdir=$libdir
+-includedir=$incdir
++exec_prefix=${prefix}
++libdir=\${exec_prefix}/lib
++includedir=\${prefix}/include
+ Name: $fullname
+ Description: $comment
diff --git a/multimedia/ffmpeg/patches/020-ffmpeg-fix-build-with-fdk-aac-2.0.patch b/multimedia/ffmpeg/patches/020-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
+
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
deleted file mode 100644 (file)
index c951a87..0000000
+++ /dev/null
@@ -1,316 +0,0 @@
-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 16887854257cc1571d58ad2256df3bfc7dcc814b..a5c9e11474161c47ba9e6814a808ea78e6abda1e 100644 (file)
@@ -9,13 +9,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gphoto2
-PKG_VERSION:=2.5.20
+PKG_VERSION:=2.5.23
 PKG_RELEASE:=1
 PKG_MAINTAINER:=Leonardo Medici <leonardo_medici@me.com>
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=@SF/gphoto
-PKG_HASH:=a36f03b50a8f040f185cbc757f957f03dc05a9210907199e6919ef3f970248f6
+PKG_HASH:=df87092100e7766c9d0a4323217c91908a9c891c0d3670ebf40b76903be458d1
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=COPYING
 
index 47a650667d3bcdfd1c556e9fd15b5dd696f626d8..6bb185f0547a62bbcae44b3a240b080143aeeacf 100644 (file)
@@ -5,17 +5,18 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=graphicsmagick
-PKG_VERSION:=1.3.31
-PKG_RELEASE:=2
+PKG_VERSION:=1.3.33
+PKG_RELEASE:=1
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/GraphicsMagick-$(PKG_VERSION)
 PKG_SOURCE:=GraphicsMagick-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=@SF/graphicsmagick
-PKG_HASH:=69ee4ac6a49a818098f47f51c4f430ca9bb2493cb3594f322eb211b8aeb71f41
+PKG_HASH:=d18aaca2d79a10270d49ad1aaa01dce24752f7548880138d59874a78ac62e11f
 
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=Copyright.txt
 PKG_MAINTAINER:=Val Kulkov <val.kulkov@gmail.com>
+PKG_CPE_ID:=cpe:/a:graphicsmagick:graphicsmagick
 
 PKG_BUILD_PARALLEL:=1
 DISABLE_NLS:=
index b0079859bc38084321a058d59c891842cf7f5669..632fe4de4b7c664e56f8b590939748484d38e7e5 100644 (file)
@@ -17,7 +17,6 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@GNOME/grilo-plugins/0.3/
 PKG_HASH:=fc2f3bbc319136e53e1efb6659fa65b6af45db114b6621008f9abba64fad6820
 
-PKG_BUILD_DEPENDS:=glib2
 PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
 PKG_FIXUP:=autoreconf
index d67006e086562b40167560f63afdb79e3867084e..c797e2c44394259a3f1ccf3505aab94c9b34b468 100644 (file)
@@ -16,6 +16,7 @@ PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org> \
 
 PKG_LICENSE:=LGPLv2 GPLv2
 PKG_LICENSE_FILES:=COPYING.LIB COPYING
+PKG_CPE_ID:=cpe:/a:gstreamer:gst-plugins-base
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/gst-plugins-base-$(PKG_VERSION)
 PKG_SOURCE:=gst-plugins-base-$(PKG_VERSION).tar.xz
index 0971ffa9ca48c5da707227eaefa8957c459c75bc..2c0a718a6641a36bf56bea122ce7dee64503bead 100644 (file)
@@ -16,6 +16,7 @@ PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org> \
 
 PKG_LICENSE:=LGPLv2
 PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:gstreamer:good_plug-ins
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/gst-plugins-good-$(PKG_VERSION)
 PKG_SOURCE:=gst-plugins-good-$(PKG_VERSION).tar.xz
index f693ec36de5b03743b65be3417350d1d7758fa8a..0e149074074c79bc956f42f88bff5df3eb669750 100644 (file)
@@ -16,6 +16,7 @@ PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org> \
 
 PKG_LICENSE:=LGPLv2
 PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:gstreamer_project:gstreamer
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/gstreamer-$(PKG_VERSION)
 PKG_SOURCE:=gstreamer-$(PKG_VERSION).tar.xz
diff --git a/multimedia/imagemagick/Makefile b/multimedia/imagemagick/Makefile
new file mode 100644 (file)
index 0000000..396abcd
--- /dev/null
@@ -0,0 +1,141 @@
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=imagemagick
+PKG_VERSION:=7.0.8
+PKG_REVISION:=62
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Val Kulkov <val.kulkov@gmail.com>
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_REVISION).tar.gz
+PKG_SOURCE_URL:=http://github.com/ImageMagick/ImageMagick/archive/$(PKG_VERSION)-$(PKG_REVISION)
+PKG_HASH:=ceae2596df95d0f9e42e405b9c1b6c369bf1f065fc74078e76a45c5cbde5260e
+PKG_BUILD_DIR:=$(BUILD_DIR)/ImageMagick-$(PKG_VERSION)-$(PKG_REVISION)
+
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=LICENSE
+PKG_CPE_ID:=cpe:/a:imagemagick:imagemagick
+
+PKG_USE_MIPS16:=0
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/imagemagick/Default
+  SECTION:=multimedia
+  CATEGORY:=Multimedia
+  TITLE:=Image manipulation tools
+  URL:=https://www.imagemagick.org/
+endef
+
+define Package/imagemagick
+  $(call Package/imagemagick/Default)
+  DEPENDS:=+libltdl +libpthread +zlib +libfreetype +libpng +libjpeg +libtiff
+endef
+
+define Package/imagemagick/description
+ImageMagick is a free and open-source software suite for displaying,
+converting, and editing raster image and vector image files.
+NOTE: this package may not be suitable for many embedded devices because
+of its large size. Consider using extroot or alternatively consider
+graphicsmagick which is smaller but similar in functionality.
+endef
+
+define Package/imagemagick/conffiles
+/etc/ImageMagick-7/colors.xml
+/etc/ImageMagick-7/delegates.xml
+/etc/ImageMagick-7/log.xml
+/etc/ImageMagick-7/mime.xml
+/etc/ImageMagick-7/policy.xml
+/etc/ImageMagick-7/quantization-table.xml
+/etc/ImageMagick-7/thresholds.xml
+/etc/ImageMagick-7/type-apple.xml
+/etc/ImageMagick-7/type-dejavu.xml
+/etc/ImageMagick-7/type-ghostscript.xml
+/etc/ImageMagick-7/type-urw-base35.xml
+/etc/ImageMagick-7/type-windows.xml
+/etc/ImageMagick-7/type.xml
+endef
+
+CONFIGURE_ARGS += \
+       --enable-shared \
+       --disable-static \
+       --disable-docs \
+       --enable-dependency-tracking \
+       --with-modules \
+       --with-threads \
+       --with-ltdl \
+       --with-zlib \
+       --disable-hdri \
+       --with-quantum-depth=8 \
+       --disable-deprecated \
+       --disable-cipher \
+       --without-bzlib \
+       --without-autotrace \
+       --without-djvu \
+       --without-dps \
+       --without-fftw \
+       --without-flif \
+       --without-fpx \
+       --without-fontconfig \
+       --without-gslib \
+       --without-gvc \
+       --without-heic \
+       --without-jbig \
+       --without-lcms \
+       --without-lqr \
+       --without-lzma \
+       --without-magick-plus-plus \
+       --without-openexr \
+       --without-openjp2 \
+       --without-raqm \
+       --without-raw \
+       --without-webp \
+       --without-x \
+       --without-zstd \
+       --without-gslib \
+       --without-gvc \
+       --without-pango \
+       --without-perl \
+       --without-rsvg \
+       --without-wmf \
+       --without-xml \
+       --with-freetype \
+       --with-jpeg \
+       --with-png \
+       --with-tiff
+
+TARGET_CFLAGS += -flto
+
+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/*.so* \
+               $(1)/usr/lib/
+
+       $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+       $(INSTALL_DATA) \
+               $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \
+               $(1)/usr/lib/pkgconfig/
+endef
+
+IMlibdir:=usr/lib/ImageMagick-$(PKG_VERSION)
+define Package/imagemagick/install
+       $(INSTALL_DIR) $(1)/etc $(1)/usr/bin $(1)/$(IMlibdir)
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so.* $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
+       $(RM) $(1)/usr/bin/*-config
+       $(CP) $(PKG_INSTALL_DIR)/etc/ImageMagick-* $(1)/etc/
+       $(CP) $(PKG_INSTALL_DIR)/$(IMlibdir)/* $(1)/$(IMlibdir)/
+endef
+
+$(eval $(call BuildPackage,imagemagick))
index 7e61560846acc9b63eb91404a417cef3d404e264..178745d7eb5a18ad5a6d134f2ab8d45f90f39b8b 100644 (file)
@@ -9,20 +9,20 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=lcdgrilo
 PKG_VERSION:=0.0.12
-PKG_RELEASE:=2
-
-PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
-
-PKG_LICENSE:=GPL-2.0
-PKG_LICENSE_FILES:=COPYING
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://www.flyn.org/projects/lcdgrilo
 PKG_HASH:=2e5028fff7a90b1a3688c466f048e978a52d9a4da20a382546d5e5bd42e2fc6a
-PKG_BUILD_DEPENDS:=vala
 
-PKG_INSTALL:=1
+PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
+PKG_LICENSE:=GPL-2.0-or-later
+PKG_LICENSE_FILES:=COPYING
+
 PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
+PKG_BUILD_DEPENDS:=vala/host
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/nls.mk
@@ -32,7 +32,7 @@ define Package/lcdgrilo
   CATEGORY:=Multimedia
   DEPENDS:=+grilo +grilo-plugins +libgee +libgstreamer1
   TITLE:=lcdgrilo
-  URL:=http://www.flyn.org/projects/lcdgrilo/
+  URL:=https://www.flyn.org/projects/lcdgrilo/
 endef
 
 define Package/lcdgrilo/decription
diff --git a/multimedia/lcdgrilo/patches/020-vala.patch b/multimedia/lcdgrilo/patches/020-vala.patch
new file mode 100644 (file)
index 0000000..c35e227
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/src/lcdgrilo.vala
++++ b/src/lcdgrilo.vala
+@@ -47,7 +47,7 @@ private class LCDPlayer {
+       private int current = 0;
+       private Transitions transitions;
+       private MainLoop loop;
+-      private Gee.ArrayList<Grl.Source> sources = new Gee.ArrayList<unowned Grl.Source> ();
++      private Gee.ArrayList<weak Grl.Source> sources = new Gee.ArrayList<unowned Grl.Source> ();
+       private uint watch_id = 0;
+       public LCDPlayer () {
diff --git a/multimedia/minisatip/Makefile b/multimedia/minisatip/Makefile
new file mode 100644 (file)
index 0000000..ec07f87
--- /dev/null
@@ -0,0 +1,61 @@
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=minisatip
+PKG_RELEASE:=1
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/catalinii/minisatip.git
+PKG_SOURCE_VERSION:=b9fcb51b207f3b26b32b9b7c0e633cffea82274d
+PKG_SOURCE_DATE:=2019-07-08
+PKG_MIRROR_HASH:=1857595acb8216c078b1c4a355f7559cfce4dff22464a5b31c7712be6b374534
+
+PKG_MAINTAINER:=Daniel Kucera <github@danman.eu>
+PKG_LICENSE:=GPL-2.0-or-later
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/minisatip
+  TITLE:=SATIP server
+  URL:=https://github.com/catalinii/minisatip
+  SECTION:=multimedia
+  CATEGORY:=Multimedia
+  DEPENDS:=+MINISATIP_AES:libopenssl
+endef
+
+define Package/minisatip/config
+       if PACKAGE_minisatip
+
+               config MINISATIP_AES
+                       bool "OpenSSL (AES as part of DVBAPI)"
+                       default n
+
+               config MINISATIP_CLIENT
+                       bool "SatIP Client"
+                       default y
+
+       endif
+endef
+
+ifeq ($(CONFIG_MINISATIP_AES),)
+       CONFIGURE_ARGS += --disable-dvbaes
+endif
+
+ifeq ($(CONFIG_MINISATIP_CLIENT),)
+       CONFIGURE_ARGS += --disable-satipc
+endif
+
+define Package/minisatip/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/minisatip $(1)/usr/bin/
+       $(INSTALL_DIR) $(1)/usr/share/minisatip/html/
+       $(INSTALL_DATA) $(PKG_BUILD_DIR)/html/* $(1)/usr/share/minisatip/html
+       $(INSTALL_DIR) $(1)/etc/init.d
+       $(INSTALL_BIN) ./files/minisatip.init $(1)/etc/init.d/minisatip
+endef
+
+$(eval $(call BuildPackage,minisatip))
diff --git a/multimedia/minisatip/files/minisatip.init b/multimedia/minisatip/files/minisatip.init
new file mode 100644 (file)
index 0000000..17a283c
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/sh /etc/rc.common
+
+USE_PROCD=1
+START=99
+
+start_service() {
+       procd_open_instance minisatip
+       procd_set_param command /usr/bin/minisatip -f -R /usr/share/minisatip/html
+
+       procd_set_param respawn
+
+       procd_set_param stdout 1
+       procd_set_param stderr 1
+       procd_close_instance
+}
+
diff --git a/multimedia/mjpg-streamer/Config.in b/multimedia/mjpg-streamer/Config.in
deleted file mode 100644 (file)
index 08eea1d..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-#
-# Copyright (C) 2014 OpenWrt.org
-#
-
-if PACKAGE_mjpg-streamer
-
-config MJPG_STREAMER_V4L2
-       bool "Build input_uvc with libv4l2 (camera controls)"
-       default n
-       select PACKAGE_libv4l
-
-config MJPG_STREAMER_INPUT_FILE
-       bool "Install input file plugin"
-       default n
-
-config MJPG_STREAMER_INPUT_UVC
-       bool "Install input uvc plugin"
-       default y
-
-config MJPG_STREAMER_INPUT_HTTP
-       bool "Install input HTTP plugin"
-       default n
-
-config MJPG_STREAMER_OUTPUT_RTSP
-       bool "Install output RTSP plugin"
-       default n
-
-config MJPG_STREAMER_OUTPUT_UDP
-       bool "Install output UDP plugin"
-       default n
-
-config MJPG_STREAMER_OUTPUT_FILE
-       bool "Install output file plugin"
-       default n
-
-config MJPG_STREAMER_OUTPUT_HTTP
-       bool "Install output HTTP plugin"
-       default y
-
-config MJPG_STREAMER_WWW
-       bool "Install complete Web UI files (includes cambozola)"
-       default n
-
-endif
index dad986f33c7a4bedcc2d746c5d163e1ac397ab1f..8458647c169a7e3bbef3a6e96289a8601d0850dd 100644 (file)
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mjpg-streamer
 PKG_VERSION:=2018-10-25
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 PKG_MAINTAINER:=Roger D <rogerdammit@gmail.com>, \
                Ted Hess <thess@kitschensync.net>
 
@@ -24,7 +24,7 @@ PKG_LICENSE_FILES:=LICENSE
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/cmake.mk
 
-PKG_BUILD_DEPENDS:=MJPG_STREAMER_V4L2:libv4l
+PKG_BUILD_DEPENDS:=MJPG_STREAMER_V4L2:libv4l zmq protobuf-c/host
 
 define Package/mjpg-streamer
   SECTION:=multimedia
@@ -32,21 +32,151 @@ define Package/mjpg-streamer
   TITLE:=MJPG-streamer
   DEPENDS:=+libpthread +libjpeg +MJPG_STREAMER_V4L2:libv4l
   URL:=https://github.com/jacksonliam/mjpg-streamer
-  MENU:=1
 endef
 
-define Package/mjpg-streamer/description
+define Package/mjpg-streamer/Default/description
  Streaming application for Linux-UVC compatible webcams
 endef
 
-define Package/mjpg-streamer/config
-  source "$(SOURCE)/Config.in"
+define Package/mjpg-streamer/description
+$(call Package/mjpg-streamer/Default/description)
 endef
 
 define Package/mjpg-streamer/conffiles
 /etc/config/mjpg-streamer
 endef
 
+define Package/mjpg-streamer/config
+if PACKAGE_mjpg-streamer-input-uvc
+
+config MJPG_STREAMER_V4L2
+       bool "Build input_uvc with libv4l2 (camera controls)"
+       default n
+       select PACKAGE_libv4l
+endif
+endef
+
+define Package/mjpg-streamer/Default
+  SECTION:=multimedia
+  CATEGORY:=Multimedia
+  TITLE:=MJPG-streamer
+  URL:=https://github.com/jacksonliam/mjpg-streamer
+  DEPENDS:=mjpg-streamer
+endef
+
+define Package/mjpg-streamer-input-file
+$(call Package/mjpg-streamer/Default)
+  TITLE+= (file input)
+endef
+
+define Package/mjpg-streamer-input-file/description
+$(call Package/mjpg-streamer/Default/description)
+
+This package provides the file input plugin.
+endef
+
+define Package/mjpg-streamer-input-uvc
+$(call Package/mjpg-streamer/Default)
+  TITLE+= (UVC input)
+endef
+
+define Package/mjpg-streamer-input-uvc/description
+$(call Package/mjpg-streamer/Default/description)
+
+This package provides the UVC input plugin.
+endef
+
+define Package/mjpg-streamer-input-http
+$(call Package/mjpg-streamer/Default)
+  TITLE+= (HTTP input)
+endef
+
+define Package/mjpg-streamer-input-http/description
+$(call Package/mjpg-streamer/Default/description)
+
+This package provides the http input plugin.
+endef
+
+define Package/mjpg-streamer-output-rtsp
+$(call Package/mjpg-streamer/Default)
+  TITLE+= (RTSP output)
+endef
+
+define Package/mjpg-streamer-output-rtsp/description
+$(call Package/mjpg-streamer/Default/description)
+
+This package provides the RTSP output plugin.
+endef
+
+define Package/mjpg-streamer-output-udp
+$(call Package/mjpg-streamer/Default)
+  TITLE+= (UDP output)
+endef
+
+define Package/mjpg-streamer-output-udp/description
+$(call Package/mjpg-streamer/Default/description)
+
+This package provides the UDP output plugin.
+endef
+
+define Package/mjpg-streamer-output-file
+$(call Package/mjpg-streamer/Default)
+  TITLE+= (file output)
+endef
+
+define Package/mjpg-streamer-output-file/description
+$(call Package/mjpg-streamer/Default/description)
+
+This package provides the file output plugin.
+endef
+
+define Package/mjpg-streamer-output-http
+$(call Package/mjpg-streamer/Default)
+  TITLE+= (HTTP output)
+endef
+
+define Package/mjpg-streamer-output-http/description
+$(call Package/mjpg-streamer/Default/description)
+
+This package provides the HTTP output plugin.
+endef
+
+define Package/mjpg-streamer-output-zmq
+$(call Package/mjpg-streamer/Default)
+  TITLE+= (zmq output)
+  DEPENDS+= +libzmq +libprotobuf-c
+endef
+
+define Package/mjpg-streamer-output-zmq/description
+$(call Package/mjpg-streamer/Default/description)
+
+This package provides the ZeroMQ output plugin.
+endef
+
+define Package/mjpg-streamer-www
+$(call Package/mjpg-streamer/Default)
+  TITLE+= (full www)
+  CONFLICTS:=mjpg-streamer-www-simple
+endef
+
+define Package/mjpg-streamer-www/description
+$(call Package/mjpg-streamer/Default/description)
+
+This package provides full version of the web content.
+Includes cambozola applet.
+endef
+
+define Package/mjpg-streamer-www-simple
+$(call Package/mjpg-streamer/Default)
+  TITLE+= (simple www)
+endef
+
+define Package/mjpg-streamer-www-simple/description
+$(call Package/mjpg-streamer/Default/description)
+
+This package provides simple version of the web content.
+endef
+
 CAMBOZOLA:=cambozola-0.936.tar.gz
 
 # Distribution URL doesn't always have the correct version
@@ -67,7 +197,7 @@ define Build/Prepare
        $(Build/Patch)
     # Fetch latest cambozola that works with latest Java(s)
     # Yes, I know this is ugly
-    ifeq ($(CONFIG_MJPG_STREAMER_WWW),y)
+    ifneq ($(CONFIG_PACKAGE_mjpg-streamer-www),)
        $(eval $(call Download,cambozola))
        $(TAR) -xf $(DL_DIR)/$(CAMBOZOLA) --strip=2 --wildcards \
                -C $(PKG_BUILD_DIR)/www */dist/cambozola.jar
@@ -76,9 +206,10 @@ endef
 
 define Build/Configure
     $(RM) $(PKG_BUILD_DIR)/plugins/input_uvc/uvcvideo.h
+$(call Build/Configure/Default)
 endef
 
-    TARGET_LDFLAGS+= -ljpeg
+TARGET_LDFLAGS+= -ljpeg
 
 ifeq ($(CONFIG_MJPG_STREAMER_V4L2),y)
     TARGET_CFLAGS+= -DUSE_LIBV4L2
@@ -87,41 +218,72 @@ endif
 
 define Package/mjpg-streamer/install
        $(INSTALL_DIR) $(1)/usr/bin
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/mjpg_streamer $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mjpg_streamer $(1)/usr/bin/
        $(INSTALL_DIR) $(1)/etc/config
        $(CP) ./files/mjpg-streamer.config $(1)/etc/config/mjpg-streamer
        $(INSTALL_DIR) $(1)/etc/init.d
        $(INSTALL_BIN) ./files/mjpg-streamer.init $(1)/etc/init.d/mjpg-streamer
        $(INSTALL_DIR) $(1)/etc/hotplug.d/usb
        $(INSTALL_DATA) ./files/mjpg-streamer.hotplug $(1)/etc/hotplug.d/usb/20-mjpg-streamer
-       $(INSTALL_DIR) $(1)/usr/lib
-ifeq ($(CONFIG_MJPG_STREAMER_INPUT_FILE),y)
-       $(CP) $(PKG_BUILD_DIR)/input_file.so $(1)/usr/lib
-endif
-ifeq ($(CONFIG_MJPG_STREAMER_INPUT_UVC),y)
-       $(CP) $(PKG_BUILD_DIR)/input_uvc.so $(1)/usr/lib
-endif
-ifeq ($(CONFIG_MJPG_STREAMER_INPUT_HTTP),y)
-       $(CP) $(PKG_BUILD_DIR)/input_http.so $(1)/usr/lib
-endif
-ifeq ($(CONFIG_MJPG_STREAMER_OUTPUT_RTSP),y)
-       $(CP) $(PKG_BUILD_DIR)/output_rtsp.so $(1)/usr/lib
-endif
-ifeq ($(CONFIG_MJPG_STREAMER_OUTPUT_UDP),y)
-       $(CP) $(PKG_BUILD_DIR)/output_udp.so $(1)/usr/lib
-endif
-ifeq ($(CONFIG_MJPG_STREAMER_OUTPUT_FILE),y)
-       $(CP) $(PKG_BUILD_DIR)/output_file.so $(1)/usr/lib
-endif
-ifeq ($(CONFIG_MJPG_STREAMER_OUTPUT_HTTP),y)
-       $(CP) $(PKG_BUILD_DIR)/output_http.so $(1)/usr/lib
+endef
+
+define Package/mjpg-streamer-input-file/install
+       $(INSTALL_DIR) $(1)/usr/lib/mjpg-streamer
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/mjpg-streamer/input_file.so $(1)/usr/lib/mjpg-streamer
+endef
+
+define Package/mjpg-streamer-input-uvc/install
+       $(INSTALL_DIR) $(1)/usr/lib/mjpg-streamer
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/mjpg-streamer/input_uvc.so $(1)/usr/lib/mjpg-streamer
+endef
+
+define Package/mjpg-streamer-input-http/install
+       $(INSTALL_DIR) $(1)/usr/lib/mjpg-streamer
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/mjpg-streamer/input_http.so $(1)/usr/lib/mjpg-streamer
+endef
+
+define Package/mjpg-streamer-output-rtsp/install
+       $(INSTALL_DIR) $(1)/usr/lib/mjpg-streamer
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/mjpg-streamer/output_rtsp.so $(1)/usr/lib/mjpg-streamer
+endef
+
+define Package/mjpg-streamer-output-udp/install
+       $(INSTALL_DIR) $(1)/usr/lib/mjpg-streamer
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/mjpg-streamer/output_udp.so $(1)/usr/lib/mjpg-streamer
+endef
+
+define Package/mjpg-streamer-output-file/install
+       $(INSTALL_DIR) $(1)/usr/lib/mjpg-streamer
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/mjpg-streamer/output_file.so $(1)/usr/lib/mjpg-streamer
+endef
+
+define Package/mjpg-streamer-output-http/install
+       $(INSTALL_DIR) $(1)/usr/lib/mjpg-streamer
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/mjpg-streamer/output_http.so $(1)/usr/lib/mjpg-streamer
+endef
+
+define Package/mjpg-streamer-output-zmq/install
+       $(INSTALL_DIR) $(1)/usr/lib/mjpg-streamer
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/mjpg-streamer/output_zmqserver.so $(1)/usr/lib/mjpg-streamer
+endef
+
+define Package/mjpg-streamer-www/install
        $(INSTALL_DIR) $(1)/www/webcam
-    ifeq ($(CONFIG_MJPG_STREAMER_WWW),y)
-       $(INSTALL_DATA) $(PKG_BUILD_DIR)/www/* $(1)/www/webcam
-    else
-       $(INSTALL_DATA) $(PKG_BUILD_DIR)/www/stream_simple.html $(1)/www/webcam/index.html
-    endif
-endif
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/mjpg-streamer/www/* $(1)/www/webcam
+endef
+
+define Package/mjpg-streamer-www-simple/install
+       $(INSTALL_DIR) $(1)/www/webcam
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/mjpg-streamer/www/stream_simple.html $(1)/www/webcam/index.html
 endef
 
 $(eval $(call BuildPackage,mjpg-streamer))
+$(eval $(call BuildPackage,mjpg-streamer-input-file))
+$(eval $(call BuildPackage,mjpg-streamer-input-uvc))
+$(eval $(call BuildPackage,mjpg-streamer-input-http))
+$(eval $(call BuildPackage,mjpg-streamer-output-rtsp))
+$(eval $(call BuildPackage,mjpg-streamer-output-file))
+$(eval $(call BuildPackage,mjpg-streamer-output-http))
+$(eval $(call BuildPackage,mjpg-streamer-output-zmq))
+$(eval $(call BuildPackage,mjpg-streamer-www))
+$(eval $(call BuildPackage,mjpg-streamer-www-simple))
index 597e960103eedfe88acd1c53e06d24d06ba48290..037afcd0ca19108b7b0345d31ce83e551ffdeb09 100644 (file)
@@ -8,16 +8,17 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=motion
-PKG_VERSION:=4.2.1
-PKG_RELEASE:=2
+PKG_VERSION:=4.2.2
+PKG_RELEASE:=1
 
 PKG_MAINTAINER:=Roger D <rogerdammit@gmail.com>
 PKG_LICENSE:=GPLv2
 PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:lavrsen:motion
 
 PKG_SOURCE:=$(PKG_NAME)-release-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/Motion-Project/motion/tar.gz/release-$(PKG_VERSION)?
-PKG_HASH:=d97ec6ae766adfd478b6f7f9cc0da5f2fe21faa9366d98664be255714c1cf81d
+PKG_HASH:=c8d40976b41da8eb9f9f7128599403a312fc26b7226bf3787d75f78cb5a6cc6e
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-release-$(PKG_VERSION)
 
 PKG_BUILD_PARALLEL:=1
@@ -45,14 +46,14 @@ CONFIGURE_ARGS+= \
        --without-mysql \
        --without-pgsql \
        --without-sqlite3 \
-       --without-bktr
+       --without-bktr \
+       --without-webp
 
 define Package/motion/install
        $(INSTALL_DIR) $(1)/etc
        $(CP) $(PKG_BUILD_DIR)/motion-dist.conf $(1)/etc/motion.conf
        $(INSTALL_DIR) $(1)/usr/bin
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/motion $(1)/usr/bin/
-
 endef
 
 $(eval $(call BuildPackage,motion))
index 4ea69b2bc2d745027398b07fb2a923e0370a3f8b..4f7b166fa093b8b902663e286148ff525174b872 100644 (file)
@@ -7,17 +7,17 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=v4l2rtspserver
-PKG_VERSION:=0.1.6
+PKG_VERSION:=0.1.8
 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:=9e076d2ecac08d5cbd0af7cfaa355e077e03fe35be73259ae7f520e2ef4243f8
+PKG_MIRROR_HASH:=2df448435fa169b1611e619496ec529baa4caa59627a8a508fb6db59c31e42be
 
-LIVE555_VERSION:=2019.02.03
-LIVE555_HASH:=1c938d91553eff224c7a860f8f38b3256028704b474a3fc6bcf2eddc42268710
+LIVE555_VERSION:=2019.08.28
+LIVE555_HASH:=a3dcd157865186cf883c3a80b4bb09637e91fff96b234b2c780a7f7dcc7a35dc
 LIVE555_FILE:=live.$(LIVE555_VERSION).tar.gz
 
 PKG_MAINTAINER:=Roger Dammit <rogerdammit@gmail.com>
@@ -53,14 +53,12 @@ define Download/live555
        HASH:=$(LIVE555_HASH)
 endef
 
-TARGET_CFLAGS += -flto
-TARGET_CXXFLAGS += -fno-rtti
-TARGET_LDFLAGS += -Wl,--gc-sections
+TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto
+TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
 
-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" 
+CMAKE_OPTIONS += -DALSA=OFF -DLIVE555CFLAGS="$(TARGET_CFLAGS) -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"
 
-
-define Build/Prepare   
+define Build/Prepare
        $(Build/Prepare/Default)
 
        # download live555
@@ -69,11 +67,9 @@ define Build/Prepare
        $(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/
-       mv $(1)/usr/bin/v4l2rtspserver-$(PKG_VERSION) $(1)/usr/bin/v4l2rtspserver
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/v4l2rtspserver $(1)/usr/bin/
 
        $(INSTALL_DIR) $(1)/etc/init.d
        $(INSTALL_BIN) files/v4l2rtspserver.init $(1)/etc/init.d/v4l2rtspserver
index 866d25b50d20cd48636013f7fe075cc754571fab..f2182084310aeeb74014fb7bb4b520c273d1bda8 100644 (file)
@@ -8,28 +8,35 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=youtube-dl
-PKG_VERSION:=2019.5.20
+PKG_VERSION:=2019.9.28
 PKG_RELEASE:=1
 
 PKG_SOURCE:=youtube_dl-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/y/youtube_dl/
-PKG_HASH:=f73babe4bbad1c1eab3b4d74042ed8204cd62820e8489db74d3087ff9a6575df
-
+PKG_HASH:=4f4668392f9675d19bc9bd0d5d40017d2f3f43ae8be3e5b9926101d18a374f1c
 PKG_BUILD_DIR:=$(BUILD_DIR)/youtube_dl-$(PKG_VERSION)
 
+PKG_MAINTAINER:=Adrian Panella <ianchi74@outlook.com>, Josef Schlehofer <pepe.schlehofer@gmail.com>
 PKG_LICENSE:=Unlicense
 PKG_LICENSE_FILES:=LICENSE
-PKG_MAINTAINER:=Adrian Panella <ianchi74@outlook.com>, Josef Schlehofer <pepe.schlehofer@gmail.com>
 
 include $(INCLUDE_DIR)/package.mk
 include ../../lang/python/python3-package.mk
 
-define Package/youtube-dl/Default
+define Package/youtube-dl
   SECTION:=multimedia
   CATEGORY:=Multimedia
   TITLE:=Utility to download videos from YouTube.com
-  DEPENDS:=+ca-certificates
   URL:=https://yt-dl.org
+  DEPENDS:= \
+    +ca-certificates \
+    +python3 \
+    +python3-email \
+    +python3-xml \
+    +python3-codecs \
+    +python3-ctypes \
+    +python3-setuptools
+  VARIANT:=python3
 endef
 
 define Package/youtube-dl/description
@@ -38,17 +45,6 @@ define Package/youtube-dl/description
   It requires the Python3 interpreter.
 endef
 
-define Package/youtube-dl
-$(call Package/youtube-dl/Default)
-  DEPENDS+= \
-       +python3 \
-       +python3-email \
-       +python3-xml \
-       +python3-codecs \
-       +python3-ctypes
-  VARIANT:=python3
-endef
-
 $(eval $(call Py3Package,youtube-dl))
 $(eval $(call BuildPackage,youtube-dl))
 $(eval $(call BuildPackage,youtube-dl-src))
index 74619086207fdac447c1d8aa845760e57a053714..1eb1b68e11d4924f1779f0e4e76c3786815c0ea1 100644 (file)
@@ -11,19 +11,18 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=Netopeer2
 PKG_VERSION:=0.7-r1
-PKG_RELEASE:=2
-
-PKG_LICENSE:=BSD-3-Clause
-PKG_MAINTAINER:=Mislav Novakovic <mislav.novakovic@sartura.hr>
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/CESNET/Netopeer2/tar.gz/v$(PKG_VERSION)?
 PKG_HASH:=040013d1e315c62c496b704475665165578c374ffb387cbbff422cf8898d3a12
 
-CMAKE_INSTALL:=1
+PKG_MAINTAINER:=Mislav Novakovic <mislav.novakovic@sartura.hr>
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=LICENSE
 
 PKG_BUILD_PARALLEL:=1
-PKG_INSTALL:=1
+CMAKE_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/cmake.mk
@@ -36,7 +35,7 @@ define Package/netopeer2-server
   SECTION:=utils
   CATEGORY:=Utilities
   TITLE:=NETCONF server
-  URL:=$(PKG_SOURCE_URL)
+  URL:=https://github.com/CESNET/Netopeer2
   DEPENDS:=+libcurl +libpthread +libyang +libnetconf2 +netopeer2-keystored +libsysrepo +sysrepocfg +sysrepoctl +sysrepo
   MENU:=1
 endef
@@ -45,7 +44,7 @@ define Package/netopeer2-cli
   SECTION:=utils
   CATEGORY:=Utilities
   TITLE:=Netopeer2 cli tool
-  URL:=$(PKG_SOURCE_URL)
+  URL:=https://github.com/CESNET/Netopeer2
   DEPENDS:=+libpthread +libyang +libnetconf2 +libopenssl
 endef
 
@@ -53,7 +52,7 @@ define Package/netopeer2-keystored
   SECTION:=utils
   CATEGORY:=Utilities
   TITLE:=Netopeer2 key store management
-  URL:=$(PKG_SOURCE_URL)
+  URL:=https://github.com/CESNET/Netopeer2
   DEPENDS:=+libopenssl +libsysrepo +sysrepo +sysrepocfg +sysrepoctl +SSH_KEYS:openssh-keygen
   MENU:=1
 endef
diff --git a/net/Netopeer2/patches/010-openssl-deprecated.patch b/net/Netopeer2/patches/010-openssl-deprecated.patch
new file mode 100644 (file)
index 0000000..b0a9f4f
--- /dev/null
@@ -0,0 +1,14 @@
+--- a/cli/commands.c
++++ b/cli/commands.c
+@@ -1659,7 +1659,11 @@ parse_cert(const char *name, const char *path)
+     BIO_printf(bio_out, "\n");
+     BIO_printf(bio_out, "Valid until: ");
++#if OPENSSL_VERSION_NUMBER < 0x10100000L // < 1.1.0
+     ASN1_TIME_print(bio_out, X509_get_notAfter(cert));
++#else
++    ASN1_TIME_print(bio_out, X509_get0_notAfter(cert));
++#endif
+     BIO_printf(bio_out, "\n");
+     has_san = 0;
index 0274e28f7fee34339e5bf86b5e01914bb3e3dcb9..613d96ebfca3fe9b03aea0e0442dbe58cc4d4f6f 100644 (file)
@@ -8,16 +8,17 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=acme
-PKG_VERSION:=2.7.9
-PKG_RELEASE:=9
-PKG_LICENSE:=GPLv3
+PKG_VERSION:=2.8.1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/Neilpang/acme.sh/tar.gz/$(PKG_VERSION)?
-PKG_HASH:=25f8eef1a53584e3ebc653e1ae7763362ca97c40bb476ab7fee01aa50fa3a101
+PKG_HASH:=4fc55b2112058e563616893fefb56c5ff4895a7e6327e9f8416797fdc44d98e3
 PKG_BUILD_DIR:=$(BUILD_DIR)/acme.sh-$(PKG_VERSION)
+
 PKG_MAINTAINER:=Toke Høiland-Jørgensen <toke@toke.dk>
-PKGARCH:=all
+PKG_LICENSE:=GPL-3.0-only
+PKG_LICENSE_FILES:=LICENSE.md
 
 LUCI_DIR:=/usr/lib/lua/luci
 
@@ -26,8 +27,10 @@ include $(INCLUDE_DIR)/package.mk
 define Package/acme
   SECTION:=net
   CATEGORY:=Network
-  DEPENDS:=+curl +ca-bundle +openssl-util +socat
+  DEPENDS:=+gnu-wget +ca-bundle +openssl-util +socat
   TITLE:=ACME (Letsencrypt) client
+  URL:=https://acme.sh
+  PKGARCH:=all
 endef
 
 define Package/acme/description
@@ -61,6 +64,7 @@ define Package/acme-dnsapi
   CATEGORY:=Network
   DEPENDS:=+acme
   TITLE:=DNS API integration for ACME (Letsencrypt) client
+  PKGARCH:=all
 endef
 
 define Package/acme-dnsapi/description
@@ -78,6 +82,7 @@ define Package/luci-app-acme
   TITLE:=ACME package - LuCI interface
   DEPENDS:= lua luci-base +acme
   SUBMENU:=3. Applications
+  PKGARCH:=all
 endef
 
 define Package/luci-app-acme/description
index 7e4dff09aadf12cde14b0eaf70083f83ae19d102..670d951473da3e318ea03f2e84be3746bc31f986 100644 (file)
@@ -6,9 +6,9 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=adblock
-PKG_VERSION:=3.6.5
+PKG_VERSION:=3.8.6
 PKG_RELEASE:=1
-PKG_LICENSE:=GPL-3.0+
+PKG_LICENSE:=GPL-3.0-or-later
 PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
 
 include $(INCLUDE_DIR)/package.mk
@@ -22,7 +22,7 @@ define Package/adblock
 endef
 
 define Package/adblock/description
-Powerful adblock script to block ad/abuse domains via dnsmasq, unbound, named, kresd or dnscrypt-proxy.
+Powerful adblock script to block ad/abuse domains via dnsmasq, unbound, named or kresd.
 The script supports many domain blacklist sites plus manual black- and whitelist overrides.
 Please see https://github.com/openwrt/packages/blob/master/net/adblock/files/README.md for further information.
 
@@ -45,7 +45,7 @@ endef
 
 define Package/adblock/install
        $(INSTALL_DIR) $(1)/usr/bin
-       $(INSTALL_BIN) ./files/adblock.sh $(1)/usr/bin/
+       $(INSTALL_BIN) ./files/adblock.sh $(1)/usr/bin
 
        $(INSTALL_DIR) $(1)/etc/init.d
        $(INSTALL_BIN) ./files/adblock.init $(1)/etc/init.d/adblock
@@ -54,9 +54,10 @@ define Package/adblock/install
        $(INSTALL_CONF) ./files/adblock.conf $(1)/etc/config/adblock
 
        $(INSTALL_DIR) $(1)/etc/adblock
-       $(INSTALL_CONF) ./files/adblock.notify $(1)/etc/adblock/
-       $(INSTALL_CONF) ./files/adblock.blacklist $(1)/etc/adblock/
-       $(INSTALL_CONF) ./files/adblock.whitelist $(1)/etc/adblock/
+       $(INSTALL_BIN) ./files/adblock.mail $(1)/etc/adblock
+       $(INSTALL_BIN) ./files/adblock.service $(1)/etc/adblock
+       $(INSTALL_CONF) ./files/adblock.blacklist $(1)/etc/adblock
+       $(INSTALL_CONF) ./files/adblock.whitelist $(1)/etc/adblock
 endef
 
 $(eval $(call BuildPackage,adblock))
index a5fbead52f07aa8063f3ece893e48eeb4b298108..d6c363f132bc318405ec7cd376dcd3edca567ee7 100644 (file)
-# dns based ad/abuse domain blocking
+# DNS based ad/abuse domain blocking
 
 ## Description
-A lot of people already use adblocker plugins within their desktop browsers, but what if you are using your (smart) phone, tablet, watch or any other (wlan) gadget!? Getting rid of annoying ads, trackers and other abuse sites (like facebook) is simple: block them with your router. When the dns server on your router receives dns requests, you will sort out queries that ask for the resource records of ad servers and return a simple 'NXDOMAIN'. This is nothing but **N**on-e**X**istent Internet or Intranet domain name, if domain name is unable to resolved using the dns server, a condition called the 'NXDOMAIN' occurred.  
+A lot of people already use adblocker plugins within their desktop browsers, but what if you are using your (smart) phone, tablet, watch or any other (wlan) gadget!? Getting rid of annoying ads, trackers and other abuse sites (like facebook) is simple: block them with your router. When the DNS server on your router receives DNS requests, you will sort out queries that ask for the resource records of ad servers and return a simple 'NXDOMAIN'. This is nothing but **N**on-e**X**istent Internet or Intranet domain name, if domain name is unable to resolved using the DNS server, a condition called the 'NXDOMAIN' occurred.  
 
 ## Main Features
-* support of the following domain blocklist sources (free for private usage, for commercial use please check their individual licenses):
+* Support of the following domain blocklist sources (free for private usage, for commercial use please check their individual licenses):
     * [adaway](https://adaway.org)
-    * => infrequent updates, approx. 400 entries (enabled by default)
+        * Infrequent updates, approx. 400 entries (enabled by default)
     * [adguard](https://adguard.com)
-    * => numerous updates on the same day, approx. 12.000 entries
+        * Numerous updates on the same day, approx. 12.000 entries
     * [bitcoin](https://github.com/hoshsadiq/adblock-nocoin-list)
-    * => infrequent updates, approx. 15 entries
+        * Infrequent updates, approx. 15 entries
     * [blacklist]()
-    * => static local blacklist, located by default in '/etc/adblock/adblock.blacklist'
+        * Static local blacklist, located by default in `/etc/adblock/adblock.blacklist`
     * [disconnect](https://disconnect.me)
-    * => numerous updates on the same day, approx. 6.500 entries (enabled by default)
+        * Numerous updates on the same day, approx. 6.500 entries (enabled by default)
     * [dshield](http://dshield.org)
-    * => daily updates, approx. 4.500 entries
+        * Daily updates, approx. 4.500 entries
     * [hphosts](https://hosts-file.net)
-    * => monthly updates, approx. 50.000 entries
+        * Monthly updates, approx. 50.000 entries
     * [malwaredomains](http://malwaredomains.com)
-    * => daily updates, approx. 16.000 entries
+        * Daily updates, approx. 16.000 entries
     * [malwaredomainlist](http://www.malwaredomainlist.com)
-    * => daily updates, approx. 1.500 entries
+        * Daily updates, approx. 1.500 entries
     * [openphish](https://openphish.com)
-    * => numerous updates on the same day, approx. 1.800 entries
+        * Numerous updates on the same day, approx. 1.800 entries
     * [ransomware tracker](https://ransomwaretracker.abuse.ch)
-    * => daily updates, approx. 150 entries
+        * Daily updates, approx. 150 entries
     * [reg_cn](https://easylist-downloads.adblockplus.org/easylistchina+easylist.txt)
-    * => regional blocklist for China, daily updates, approx. 1.600 entries
+        * Regional blocklist for China, daily updates, approx. 1.600 entries
     * [reg_cz](https://raw.githubusercontent.com/qxstyles/turris-hole-czech-block-list/master/turris-hole-czech-block-list)
-    * => regional blocklist for Czechia, maintained by Turris Omnia Users, infrequent updates, approx. 100 entries
+        * Regional blocklist for Czechia, maintained by Turris Omnia Users, infrequent updates, approx. 100 entries
     * [reg_de](https://easylist-downloads.adblockplus.org/easylistgermany+easylist.txt)
-    * => regional blocklist for Germany, daily updates, approx. 9.200 entries
+        * Regional blocklist for Germany, daily updates, approx. 9.200 entries
     * [reg_id](https://easylist-downloads.adblockplus.org/abpindo+easylist.txt)
-    * => regional blocklist for Indonesia, daily updates, approx. 800 entries
+        * Regional blocklist for Indonesia, daily updates, approx. 800 entries
     * [reg_nl](https://easylist-downloads.adblockplus.org/easylistdutch+easylist.txt)
-    * => regional blocklist for the Netherlands, weekly updates, approx. 1300 entries
+        * Regional blocklist for the Netherlands, weekly updates, approx. 1300 entries
     * [reg_pl](http://adblocklist.org)
-    * => regional blocklist for Poland, daily updates, approx. 50 entries
+        * Regional blocklist for Poland, daily updates, approx. 50 entries
     * [reg_ro](https://easylist-downloads.adblockplus.org/rolist+easylist.txt)
-    * => regional blocklist for Romania, weekly updates, approx. 600 entries
+        * Regional blocklist for Romania, weekly updates, approx. 600 entries
     * [reg_ru](https://code.google.com/p/ruadlist)
-    * => regional blocklist for Russia, weekly updates, approx. 2.000 entries
+        * Regional blocklist for Russia, weekly updates, approx. 2.000 entries
     * [shallalist](http://www.shallalist.de) (categories "adv" "costtraps" "spyware" "tracker" "warez" enabled by default)
-    * => daily updates, approx. 32.000 entries (a short description of all categories can be found [online](http://www.shallalist.de/categories.html))
+        * Daily updates, approx. 32.000 entries (a short description of all categories can be found [online](http://www.shallalist.de/categories.html))
     * [spam404](http://www.spam404.com)
-    * => infrequent updates, approx. 5.000 entries
+        * Infrequent updates, approx. 5.000 entries
     * [sysctl/cameleon](http://sysctl.org/cameleon)
-    * => weekly updates, approx. 21.000 entries
+        * Weekly updates, approx. 21.000 entries
     * [ut_capitole](https://dsi.ut-capitole.fr/blacklists) (categories "cryptojacking" "ddos" "malware" "phishing" "warez" enabled by default)
-    * => daily updates, approx. 64.000 entries (a short description of all categories can be found [online](https://dsi.ut-capitole.fr/blacklists/index_en.php))
-    * [urlhaus](https://urlhaus.abuse.ch)
-    * => numerous updates on the same day, approx. 3.500 entries
+        * Daily updates, approx. 64.000 entries (a short description of all categories can be found [online](https://dsi.ut-capitole.fr/blacklists/index_en.php))
     * [whocares](http://someonewhocares.org)
-    * => weekly updates, approx. 12.000 entries
+        * Weekly updates, approx. 12.000 entries
     * [winhelp](http://winhelp2002.mvps.org)
-    * => infrequent updates, approx. 15.000 entries
+        * Infrequent updates, approx. 15.000 entries
     * [winspy](https://github.com/crazy-max/WindowsSpyBlocker)
-    * => infrequent updates, approx. 120 entries
-    * [youtube](https://api.hackertarget.com/hostsearch/?q=googlevideo.com)
-    * => dynamic request API to filter "random" youtube ad domains (experimental!), approx. 150 entries
+        * Infrequent updates, approx. 120 entries
     * [yoyo](http://pgl.yoyo.org/adservers)
-    * => weekly updates, approx. 2.500 entries (enabled by default)
-    * [zeus tracker](https://zeustracker.abuse.ch)
-    * => daily updates, approx. 440 entries
-* zero-conf like automatic installation & setup, usually no manual changes needed
-* simple but yet powerful adblock engine: adblock does not use error prone external iptables rulesets, http pixel server instances and things like that
-* supports five different dns backends / blocklist formats: dnsmasq, unbound, named (bind), kresd and dnscrypt-proxy
-* supports six different download utilities: uclient-fetch, wget, curl, aria2c, wget-nossl, busybox-wget
-* Really fast downloads & list processing as they are handled in parallel as background jobs in a configurable 'Download Queue'
-* provides 'http only' mode without installed ssl library for all non-SSL blocklist sources
-* supports a wide range of router modes, even AP modes are supported
-* full IPv4 and IPv6 support
-* provides top level domain compression ('tld compression'), this feature removes thousands of needless host entries from the blocklist and lowers the memory footprint for the dns backend
-* blocklist source parsing by fast & flexible regex rulesets
-* overall duplicate removal in central blocklist 'adb_list.overall'
-* additional whitelist for manual overrides, located by default in /etc/adblock/adblock.whitelist
-* quality checks during blocklist update to ensure a reliable dns backend service
-* minimal status & error logging to syslog, enable debug logging to receive more output
-* procd based init system support (start/stop/restart/reload/suspend/resume/query/status)
+        * Weekly updates, approx. 2.500 entries (enabled by default)
+* Zero-conf like automatic installation & setup, usually no manual changes needed
+* Simple but yet powerful adblock engine: adblock does not use error prone external iptables rulesets, http pixel server instances and things like that
+* Support four different DNS backends: `dnsmasq`, `unbound`, `named` (bind) and `kresd`
+* Support two different DNS blocking variants: `nxdomain` (default, supported by all backends), `null` (supported only by `dnsmasq`)
+* Support six different download utilities: `uclient-fetch`, `wget`, `curl`, `aria2c`, `wget-nossl`, `busybox-wget`
+* Fast downloads & list processing as they are handled in parallel running background jobs (see 'Download Queue')
+* Provide `http only` mode without installed SSL library for all non-SSL blocklist sources
+* Support a wide range of router modes, even AP modes are supported
+* Full IPv4 and IPv6 support
+* Provide top level domain compression (`tld compression`), this feature removes thousands of needless host entries from the blocklist and lowers the memory footprint for the DNS backend
+* Provide a 'DNS File Reset', where the final DNS blockfile will be purged after DNS backend loading to save storage space
+* Blocklist source parsing by fast & flexible regex rulesets
+* Overall duplicate removal in central blocklist `adb_list.overall`
+* Additional blacklist for manual overrides, located by default in `/etc/adblock/adblock.blacklist` or in LuCI
+* Additional whitelist for manual overrides, located by default in `/etc/adblock/adblock.whitelist` or in LuCI
+* Quality checks during blocklist update to ensure a reliable DNS backend service
+* Minimal status & error logging to syslog, enable debug logging to receive more output
+* procd based init system support (`start/stop/restart/reload/suspend/resume/query/status`)
 * procd network interface trigger support or classic time based startup
-* keep the dns cache intact after adblock processing (currently supported by unbound, named and kresd)
-* conditional dns backend restarts by old/new blocklist comparison with sha256sum (default) or md5sum
-* suspend & resume adblock actions temporarily without blocklist reloading
-* provide comprehensive runtime information via LuCI or via 'status' init command
-* provide a detailed DNS Query Report with dns related information about client requests, top (blocked) domains and more
-* provide a query function to quickly identify blocked (sub-)domains, e.g. for whitelisting. This function is also able to search in adblock backups, to get back the set of blocking lists sources for a certain domain
-* force dns requests to local resolver
-* force overall sort / duplicate removal for low memory devices (handle with care!)
-* automatic blocklist backup & restore, they will be used in case of download errors or during startup in backup mode
-* 'backup mode' to re-use blocklist backups during startup, get fresh lists only via reload or restart action
-* 'Jail' blocklist generation which builds an additional list (/tmp/adb_list.jail) to block access to all domains except those listed in the whitelist file. You can use this restrictive blocklist manually e.g. for guest wifi or kidsafe configurations
-* send notification emails in case of a processing error or if the overall domain count is &le; 0
-* add new adblock sources on your own, see example below
-* strong LuCI support
-
-## Prerequisites
-* [OpenWrt](https://openwrt.org), tested with the stable release series (18.06) and with the latest snapshot
-* a usual setup with an enabled dns backend at minimum - dump AP modes without a working dns backend are _not_ supported
-* a download utility:
-    * to support all blocklist sources a full version (with ssl support) of 'wget', 'uclient-fetch' with one of the 'libustream-*' ssl libraries, 'aria2c' or 'curl' is required
-    * for limited devices with real memory constraints, adblock provides also a 'http only' option and supports wget-nossl and uclient-fetch (without libustream-ssl) as well
-    * for more configuration options see examples below
-* email notification (optional): for email notification support you need to install and configure the additional 'msmtp' package
-* DNS Query Report (optional): for this detailed report you need to install the additional package 'tcpdump' or 'tcpdump-mini'
+* Keep the DNS cache intact after adblock processing (currently supported by unbound, named and kresd)
+* Suspend & resume adblock actions temporarily without blocklist reloading
+* Provide comprehensive runtime information via LuCI or via `status` init command
+* Provide a detailed DNS Query Report with DNS related information about client requests, top (blocked) domains and more
+* Provide a query function to quickly identify blocked (sub-)domains, e.g. for whitelisting. This function is also able to search in adblock backups and black-/whitelist, to get back the set of blocking lists sources for a certain domain
+* Option to force DNS requests to the local resolver
+* Automatic blocklist backup & restore, these backups will be used in case of download errors and during startup
+* Send notification emails in case of a processing error or if the overall domain count is &le; 0
+* Add new adblock sources on your own, see example below
+* Strong LuCI support for all options
 
 ## Installation & Usage
-* install 'adblock' (_opkg install adblock_)
-* at minimum configure the appropriate dns backend ('dnsmasq' by default), the download utility and enable the adblock service in _/etc/config/adblock_
-* control the adblock service manually with _/etc/init.d/adblock_ start/stop/restart/reload/suspend/resume/status or use the LuCI frontend
+### Prerequisites
+* [OpenWrt](https://openwrt.org), tested with the stable release series (19.07) and with the latest snapshot
+* A usual setup with an enabled DNS backend at minimum - dump AP modes without a working DNS backend are _not_ supported
+* A download utility:
+    * To support all blocklist sources and in order to run the default configuration of `adblock`, a full version (with SSL support) of `wget`, `uclient-fetch` with one of the `libustream-*` SSL libraries, `aria2c` or `curl` is required
+        * The package used by default is probably `uclient-fetch` so in order to make `adblock` work with its default configuration it is needed to install one of the `libustream-*` SSL libraries. Example: `opkg install libustream-openssl`
+    * For limited devices with real memory constraints, adblock provides also a `http only` option and supports `wget-nossl` and `uclient-fetch` (without `libustream-ssl`) as well
+    * For more configuration options see examples below
+* Email notification (optional): For email notification support you need the additional `msmtp` package
+* DNS Query Report (optional): For this detailed report you need the additional package `tcpdump` or `tcpdump-mini`
 
-## LuCI adblock companion package
-* it's strongly recommended to use the LuCI frontend to easily configure all powerful aspects of adblock
-* install 'luci-app-adblock' (_opkg install luci-app-adblock_)
-* the application is located in LuCI under 'Services' menu
+### Installation of the core package
+* Install `adblock` (`opkg install adblock`)
 
-## Tweaks
-* **runtime information:** the adblock status is available via _/etc/init.d/adblock status_ (see example below)
-* **debug logging:** for script debugging please set the config option 'adb\_debug' to '1' and check the runtime output with _logread -e "adblock"_
-* **storage expansion:** to process and store all blocklist sources at once it might helpful to enlarge your temp directory with a swap partition => see [OpenWrt Wiki](https://wiki.openwrt.org/doc/uci/fstab) for further details
-* **add white- / blacklist entries:** add domain white- or blacklist entries to always-allow or -deny certain (sub) domains, by default both lists are empty and located in _/etc/adblock_. Please add one domain per line - ip addresses, wildcards & regex are _not_ allowed (see example below)
-* **backup & restore blocklists:** enable this feature, to restore automatically the latest compressed backup of your blocklists in case of any processing error (e.g. a single blocklist source is not available during update). Please use an (external) solid partition and _not_ your volatile router temp directory for this
-* **download queue size:** for further download & list processing performance improvements you can raise the 'adb\_maxqueue' value, e.g. '8' or '16' should be safe
-* **scheduled list updates:** for a scheduled call of the adblock service add an appropriate crontab entry (see example below)
-* **change startup behaviour:** by default the startup will be triggered by the 'wan' procd interface trigger. Choose 'none' to disable automatic startups, 'timed' to use a classic timeout (default 30 sec.) or select another trigger interface
-* **suspend & resume adblocking:** to quickly switch the adblock service 'on' or 'off', simply use _/etc/init.d/adblock [suspend|resume]_
-* **domain query:** to query the active blocklist for a certain domain, please use the LuCI frontend or run _/etc/init.d/adblock query `<DOMAIN>`_ (see example below)
-* **add new list sources:** you could add new blocklist sources on your own via uci config, all you need is a source url and an awk one-liner (see example below)
-* **disable active dns probing in windows 10:** to prevent a yellow exclamation mark on your internet connection icon (which wrongly means connected, but no internet), please change the following registry key/value from "1" to "0" _HKLM\SYSTEM\CurrentControlSet\Services\NlaSvc\Parameters\Internet\EnableActiveProbing_
+### LuCI adblock companion package
+* It is strongly recommended to use the LuCI frontend to easily configure all powerful aspects of adblock
+* Install `luci-app-adblock` (`opkg install luci-app-adblock`)
+* The application is located in LuCI under the `Services` menu
 
-## Further adblock config options
-* usually the pre-configured adblock setup works quite well and no manual overrides are needed
-* the following options apply to the 'global' config section:
-    * adb\_enabled => main switch to enable/disable adblock service (default: '0', disabled)
-    * adb\_debug => enable/disable adblock debug output (default: '0', disabled)
-    * adb\_fetchutil => name of the used download utility: 'uclient-fetch', 'wget', 'curl', 'aria2c', 'wget-nossl'. 'busybox' (default: 'uclient-fetch')
-    * adb\_fetchparm => special config options for the download utility (default: not set)
-    * adb\_dns => select the dns backend for your environment: 'dnsmasq', 'unbound', 'named', 'kresd' or 'dnscrypt-proxy' (default: 'dnsmasq')
-    * adb\_dnsdir => target directory for the generated blocklist 'adb_list.overall' (default: not set, use dns backend default)
-    * adb\_trigger => set the startup trigger to a certain interface, to 'timed' or to 'none' (default: 'wan')
+### Configuration and controlling
+* At minimum configure the appropriate DNS backend (`dnsmasq` by default), the download utility and enable the adblock service in `/etc/config/adblock`
+* Control the adblock service manually with `/etc/init.d/adblock` `start/stop/restart/reload/suspend/resume/status` or use the LuCI frontend
 
-* the following options apply to the 'extra' config section:
-    * adb\_nice => set the nice level of the adblock process and all sub-processes (int/default: '0', standard priority)
-    * adb\_triggerdelay => additional trigger delay in seconds before adblock processing begins (int/default: '2')
-    * adb\_forcedns => force dns requests to local resolver (bool/default: '0', disabled)
-    * adb\_backup => create compressed blocklist backups, they will be used in case of download errors or during startup in backup mode (bool/default: '0', disabled)
-    * adb\_backupdir => target directory for adblock backups (default: not set)
-    * adb\_backup_mode => do not automatically update blocklists during startup, use backups instead (bool/default: '0', disabled)
-    * adb\_report => enable the background tcpdump gathering process to provide a detailed DNS Query Report (bool/default: '0', disabled)
-    * adb\_repdir => target directory for dns related report files generated by tcpdump (default: '/tmp')
-    * adb\_repiface => reporting interface used by tcpdump, set to 'any' for multiple interfaces (default: 'br-lan')
-    * adb\_replisten => space separated list of reporting port(s) used by tcpdump (default: '53')
-    * adb\_repchunksize => report chunk size used by tcpdump in MB (int/default: '1')
-    * adb\_repchunkcnt => report chunk count used by tcpdump (default: '5')
-    * adb\_maxqueue => size of the download queue to handle downloads & list processing in parallel (int/default: '8')
-    * adb\_jail => builds an additional 'Jail' list (/tmp/adb_list.jail) to block access to all domains except those listed in the whitelist file (bool/default: '0', disabled)
-    * adb\_dnsflush => flush DNS cache after adblock processing, i.e. enable the old restart behavior (bool/default: '0', disabled)
-    * adb\_notify => send notification emails in case of a processing error or if the overall domain count is &le; 0 (bool/default: '0', disabled)
-    * adb\_notifycnt => Raise minimum domain count email notification trigger (int/default: '0')
+#### Tweaks
+* **Runtime information:** The adblock status is available via `/etc/init.d/adblock status` (see example below)
+* **Debug logging:** For script debugging please set the config option `adb\_debug` to `1` and check the runtime output with `logread -e "adblock"`
+* **Storage expansion:** To process and store all blocklist sources at once it might be helpful to enlarge your temp directory with a swap partition => see [OpenWrt Wiki](https://openwrt.org/docs/guide-user/storage/fstab) for further details
+* **coreutils sort:** To speedup adblock processing in particular with many enabled blocklist sources it is recommended to install the additional package `coreutils-sort`
+* **Add white- / blacklist entries:** Add domain black- or whitelist entries to always-deny or -allow certain (sub) domains, by default both lists are empty and located in `/etc/adblock`. Please add one domain per line - ip addresses, wildcards & regex are _not_ allowed (see example below). You need to refresh your blocklists after changes to these static lists.
+* **Download queue size:** For further download & list processing performance improvements you can raise the `adb\_maxqueue` value, e.g. `8` or `16` should be safe
+* **Scheduled list updates:** For a scheduled call of the adblock service add an appropriate crontab entry (see example below)
+* **Change startup behaviour:** By default the startup will be triggered by the `wan` procd interface trigger. Choose `none` to disable automatic startups, `timed` to use a classic timeout (default 30 sec.) or select another trigger interface
+* **Suspend & resume adblocking:** To quickly switch the adblock service `on` or `off`, simply use `/etc/init.d/adblock [suspend|resume]`
+* **Domain query:** To query the active blocklist for a certain domain, please use the LuCI frontend or run _/etc/init.d/adblock query `<DOMAIN>`_ (see example below)
+* **Add new list sources:** You can add new blocklist sources on your own via uci config, all you need is a source url and an awk one-liner (see example below)
 
-## Examples
-**change default dns backend to 'unbound':**
+#### Further adblock config options
+* Usually the pre-configured adblock setup works quite well and no manual overrides are needed
+* The following options apply to the `global` config section:
+    * `adb\_enabled` => Main switch to enable/disable adblock service (default: `0`, disabled)
+    * `adb\_dns` => Select the DNS backend for your environment: `dnsmasq`, `unbound`, `named` or `kresd` (default: `dnsmasq`)
+    * `adb\_dnsvariant` => Select the blocking variant: `nxdomain` (default, supported by all backends), `null (IPv4)` and `null (IPv4/IPv6)` both options are only supported by `dnsmasq`
+    * `adb\_fetchutil` => Name of the used download utility: `uclient-fetch`, `wget`, `curl`, `aria2c`, `wget-nossl` or `busybox` (default: `uclient-fetch`)
+    * `adb\_fetchparm` => Special config options for the download utility (default: not set)
+    * `adb\_trigger` => Set the startup trigger to a certain interface, to `timed` or to `none` (default: `wan`)
+* The following options apply to the `extra` config section:
+    * `adb\_debug` => Enable/disable adblock debug output (default: `0`, disabled)
+    * `adb\_nice` => Set the nice level of the adblock process and all sub-processes (int/default: `0`, standard priority)
+    * `adb\_forcedns` => Force DNS requests to local resolver (bool/default: `0`, disabled)
+    * `adb\_maxqueue` => Size of the download queue to handle downloads & list processing in parallel (int/default: `8`)
+    * `adb\_dnsfilereset` => The final DNS blockfile will be purged after DNS backend loading to save storage space (bool/default: `false`, disabled)
+    * `adb\_report` => Enable the background tcpdump gathering process to provide a detailed DNS Query Report (bool/default: `0`, disabled)
+    * `adb\_repdir` => Target directory for DNS related report files generated by tcpdump (default: `/tmp`)
+    * `adb\_backupdir` => Target directory for adblock backups (default: `/tmp`)
+    * `adb\_mail` => Send notification emails in case of a processing errors or if the overall domain count is &le; 0 (bool/default: `0`, disabled)
+    * `adb\_mreceiver` => Receiver address for adblock notification emails (default: not set)
+* The following options could be added via "Additional Field" in LuCI and apply to the `extra` config section as well:
+    * `adb\_dnsdir` => Target directory for the generated blocklist `adb_list.overall` (default: not set, use DNS backend default)
+    * `adb\_blacklist` => Full path to the static blacklist file (default: `/etc/adblock/adblock.blacklist`)
+    * `adb\_whitelist` => Full path to the static whitelist file (default: `/etc/adblock/adblock.whitelist`)
+    * `adb\_triggerdelay` => Additional trigger delay in seconds before adblock processing begins (int/default: `2`)
+    * `adb\_maxtld` => Disable the tld compression, if the number of blocked domains is greater than this value (int/default: `100000`)
+    * `adb\_portlist` => Space separated list of fw ports which should be redirected locally (default: `53 853 5353`)
+    * `adb\_dnsinotify` => Disable adblock triggered restarts and the 'DNS File Reset' for DNS backends with autoload features (bool/default: `false`, disabled)
+    * `adb\_dnsflush` => Flush DNS cache after adblock processing, i.e. enable the old restart behavior (bool/default: `0`, disabled)
+    * `adb\_repiface` => Reporting interface used by tcpdump, set to `any` for multiple interfaces (default: `br-lan`)
+    * `adb\_replisten` => Space separated list of reporting port(s) used by tcpdump (default: `53`)
+    * `adb\_repchunkcnt` => Report chunk count used by tcpdump (default: `5`)
+    * `adb\_repchunksize` => Report chunk size used by tcpdump in MB (int/default: `1`)
+    * `adb\_msender` => Sender address for adblock notification emails (default: `no-reply@adblock`)
+    * `adb\_mtopic` => Topic for adblock notification emails (default: `adblock notification`)
+    * `adb\_mprofile` => Email profile used in `msmtp` for adblock notification emails (default: `adb_notify`)
+    * `adb\_mcnt` => Raise the minimum domain count email notification trigger (int/default: `0`)
 
-Adblock deposits the final blocklist 'adb_list.overall' in '/var/lib/unbound' where unbound can find them in its jail.  
-To preserve the DNS cache after adblock processing you need to install 'unbound-control'.  
-  
-**change default dns backend to 'named' (bind):**
+#### Examples
+**Change default DNS backend to `unbound`:**
 
-Adblock deposits the final blocklist 'adb_list.overall' in '/var/lib/bind'.  
-To preserve the DNS cache after adblock processing you need to install & configure 'bind-rdnc'.  
-To use the blocklist please modify '/etc/bind/named.conf':
-<pre><code>
-in the 'options' namespace add:
-  response-policy { zone "rpz"; };
+Adblock deposits the final blocklist `adb_list.overall` in `/var/lib/unbound` where unbound can find them in its jail, no further configuration needed.  
+To preserve the DNS cache after adblock processing you need to install `unbound-control`.
+
+**Change default DNS backend to `named` (bind):**
 
-and at the end of the file add:
+Adblock deposits the final blocklist `adb_list.overall` in `/var/lib/bind`.  
+To preserve the DNS cache after adblock processing you need to install & configure `bind-rdnc`.  
+To use the blocklist please modify `/etc/bind/named.conf`:
+* In the `options` namespace add:
+```
+  response-policy { zone "rpz"; };
+```
+* And at the end of the file add:
+```
   zone "rpz" {
     type master;
     file "/var/lib/bind/adb_list.overall";
     allow-query { none; };
     allow-transfer { none; };
   };
-</code></pre>
-  
-**change default dns backend to 'kresd':**
-
-The knot-resolver (kresd) is only available on Turris Omnia devices.  
-Adblock deposits the final blocklist 'adb_list.overall' in '/etc/kresd', no further configuration needed.
-  
-**change default dns backend to 'dnscrypt-proxy':**
+```
 
-The required 'blacklist' option of dnscrypt-proxy is not enabled by default, because the package will be compiled without plugins support.  
-Take a custom OpenWrt build with plugins support to use this feature. Adblock deposits the final blocklist 'adb_list.overall' in '/tmp'.  
-To use the blocklist please modify '/etc/config/dnscrypt-proxy' per instance:
-<pre><code>
-  list blacklist 'domains:/tmp/adb_list.overall'
-</code></pre>
-  
-**reference the jail block list manually in a 'kidsafe' dhcp config:**
+**Change default DNS backend to `kresd`:**
 
-The additional 'Jail' blocklist (by default in /tmp/adb_list.jail) block access to all domains except those listed in the whitelist file.
-<pre><code>
-config dnsmasq 'kidsafe'
-        [...]
-        option serversfile '/tmp/adb_list.jail'
-</code></pre>
+The knot-resolver (kresd) is only available on Turris Omnia devices.  
+Adblock deposits the final blocklist `adb_list.overall` in `/etc/kresd`, no further configuration needed.
   
-**enable email notification via msmtp:**
+**Enable email notification via msmtp:**
 
-To use the email notification you have to install & configure the package 'msmtp'.  
-Modify the file '/etc/msmtprc':
-<pre><code>
+To use the email notification you have to install & configure the package `msmtp`.  
+Modify the file `/etc/msmtprc`:
+```
 [...]
 defaults
 auth            on
@@ -226,26 +213,27 @@ port            587
 from            dev.adblock@gmail.com
 user            dev.adblock
 password        xxx
-</code></pre>
-Edit the file '/etc/adblock/adblock.notify' and change at least the 'mail_receiver'.  
-Finally make this file executable via 'chmod' and test it directly. If no more errors come up you can comment 'mail_debug', too.
+```
+Finally enable email support and add a valid email address in LuCI.
   
-**receive adblock runtime information:**
+**Receive adblock runtime information:**
 
-<pre><code>
+```
 /etc/init.d/adblock status
 ::: adblock runtime information
   + adblock_status  : enabled
-  + adblock_version : 3.6.0
-  + overall_domains : 30267 (backup mode)
+  + adblock_version : 3.8.0
+  + overall_domains : 48359
   + fetch_utility   : /bin/uclient-fetch (libustream-ssl)
-  + dns_backend     : dnsmasq (/tmp)
-  + last_rundate    : 19.12.2018 16:29:25
-  + system_release  : GL-AR750S, OpenWrt SNAPSHOT r8814-6835c13e5a
-</code></pre>
+  + dns_backend     : dnsmasq, /tmp
+  + dns_variant     : null (IPv4/IPv6), true
+  + backup_dir      : /mnt/data/adblock
+  + last_rundate    : 15.08.2019 08:43:16
+  + system_release  : GL.iNet GL-AR750S, OpenWrt SNAPSHOT r10720-ccb4b96b8a
+```
   
-**receive adblock DNS Query Report information:**
-<pre><code>
+**Receive adblock DNS Query Report information:**
+```
 /etc/init.d/adblock report
 :::
 ::: Adblock DNS-Query Report
@@ -278,17 +266,18 @@ Finally make this file executable via 'chmod' and test it directly. If no more e
   + 2        ::: v10.events.data.microsoft.com
   + 2        ::: settings-win.data.microsoft.com
   + 2        ::: nexusrules.officeapps.live.com
-</code></pre>
+[...]
+```
   
-**cronjob for a regular block list update (/etc/crontabs/root):**
+**Cronjob for a regular block list update (`/etc/crontabs/root`):**
 
-<pre><code>
+```
 0 06 * * *    /etc/init.d/adblock reload
-</code></pre>
+```
   
-**blacklist entry (/etc/adblock/adblock.blacklist):**
+**Blacklist entry (`/etc/adblock/adblock.blacklist`):**
 
-<pre><code>
+```
 ads.example.com
 
 This entry blocks the following (sub)domains:
@@ -299,11 +288,11 @@ This entry blocks the following (sub)domains:
 This entry does not block:
   http://ads.example.com.ua/foo.gif
   http://example.com/
-</code></pre>
+```
   
-**whitelist entry (/etc/adblock/adblock.whitelist):**
+**Whitelist entry (`/etc/adblock/adblock.whitelist`):**
 
-<pre><code>
+```
 here.com
 
 This entry removes the following (sub)domains from the blocklist:
@@ -313,25 +302,30 @@ This entry removes the following (sub)domains from the blocklist:
 This entry does not remove:
   where.com
   www.adwhere.com
-</code></pre>
+```
   
-**query the active blocklist for a certain (sub-)domain, e.g. for whitelisting:**
+**Query the active blocklist, the backups and black-/whitelist for a certain (sub-)domain, e.g. for whitelisting:**
 
 The query function checks against the submitted (sub-)domain and recurses automatically to the upper top level domain. For every (sub-)domain it returns the first ten relevant results.
-<pre><code>
+```
 /etc/init.d/adblock query google.com
 :::
-::: results for domain 'google.com'
+::: results for domain 'google.com' in active blocklist
 :::
+  + adservice.google.com
+  + adservice.google.com.au
+  + adservice.google.com.vn
+  + adservices.google.com
   + analytics.google.com
   + googleadapis.l.google.com
   + pagead.l.google.com
   + partnerad.l.google.com
   + ssl-google-analytics.l.google.com
-  + www-google-analytics.l.google.com
   + video-stats.video.google.com
+  + [...]
+
 :::
-::: results for domain 'google.com' in backups
+::: results for domain 'google.com' in backups and black-/whitelist
 :::
   + adb_list.adguard.gz           partnerad.l.google.com
   + adb_list.adguard.gz           googleadapis.l.google.com
@@ -341,35 +335,34 @@ The query function checks against the submitted (sub-)domain and recurses automa
   + adb_list.disconnect.gz        partnerad.l.google.com
   + adb_list.disconnect.gz        video-stats.video.google.com
   + adb_list.disconnect.gz        [...]
+  + adb_list.whocares.gz          video-stats.video.google.com
+  + adb_list.whocares.gz          adservice.google.com
+  + adb_list.whocares.gz          adservice.google.com.au
+  + adb_list.whocares.gz          [...]
+  + adb_list.yoyo.gz              adservice.google.com
   + adb_list.yoyo.gz              analytics.google.com
   + adb_list.yoyo.gz              pagead.l.google.com
-  + adb_list.yoyo.gz              partnerad.l.google.com
   + adb_list.yoyo.gz              [...]
-</code></pre>
-  
-**add a new blocklist source:**
+```
 
-1. the easy way ...  
-example: https://easylist-downloads.adblockplus.org/rolist+easylist.txt  
-Adblock already supports an easylist source, called 'reg_ru'. To add the additional local easylist as a new source, copy the existing config source section and change only
-the source name, the url and the description - that's all!
-<pre><code>
+**Add a new blocklist source:**
+
+1. The easy way ...  
+Example: https://easylist-downloads.adblockplus.org/rolist+easylist.txt  
+Adblock already supports an easylist source, called 'reg_ru'. To add the additional local easylist as a new source, copy the existing config source section and change only the source name, the url and the description - that's all!
+```
 config source 'reg_ro'
   option enabled '0'
   option adb_src 'https://easylist-downloads.adblockplus.org/rolist+easylist.txt'
   option adb_src_rset 'BEGIN{FS=\"[|^]\"}/^\|\|([^([:space:]|#|\*|\/).]+\.)+[[:alpha:]]+\^("\\\$third-party")?$/{print tolower(\$3)}'
   option adb_src_desc 'focus on romanian ads plus generic easylist additions, weekly updates, approx. 9.400 entries'
-</code></pre>
+```
 
-2. a bit harder ...  
-To add a really new source with different domain/host format you have to write a suitable awk one-liner on your own, so basic awk skills are needed. As a starting point check the already existing awk rulesets 'adb_src_rset' in the config file, probably you need only small changes for your individual list. Download the desired list and test your new awk string locally. The output result should be a sequential list with one domain/host per line - nothing more. If your awk one-liner works quite well, add a new source section to the adblock config file and test the new source.  
+2. A bit harder ...  
+To add a really new source with different domain/host format you have to write a suitable awk one-liner on your own, so basic awk skills are needed. As a starting point check the already existing awk rulesets `adb_src_rset` in the config file, probably you need only small changes for your individual list. Download the desired list and test your new awk string locally. The output result should be a sequential list with one domain/host per line - nothing more. If your awk one-liner works quite well, add a new source section to the adblock config file and test the new source.  
 
 ## Support
-Please join the adblock discussion in this [forum thread](https://forum.openwrt.org/t/adblock-support-thread/507) or contact me by mail <dev@brenken.org>  
-
-## Removal
-* stop all adblock related services with _/etc/init.d/adblock stop_
-* optional: remove the adblock package (_opkg remove adblock_)
+Please join the adblock discussion in this [forum thread](https://forum.openwrt.org/t/adblock-support-thread/507) or contact me by email <dev@brenken.org>  
 
 Have fun!  
 Dirk  
index 0b620593f438c99346968194ea79bfbca17b7b72..fad665ba49209ec6a0132291440f75887e71ed02 100644 (file)
@@ -1,18 +1,17 @@
-# adblock configuration, for further information
-# see 'https://github.com/openwrt/packages/blob/master/net/adblock/files/README.md'
 
 config adblock 'global'
+       option adb_basever '3.8'
        option adb_enabled '0'
        option adb_dns 'dnsmasq'
+       option adb_dnsvariant 'nxdomain'
        option adb_fetchutil 'uclient-fetch'
        option adb_trigger 'wan'
 
 config adblock 'extra'
        option adb_debug '0'
        option adb_forcedns '0'
-       option adb_backup '0'
        option adb_report '0'
-       option adb_maxqueue '8'
+       option adb_maxqueue '4'
 
 config source 'adaway'
        option adb_src 'https://adaway.org/hosts.txt'
@@ -32,12 +31,6 @@ config source 'bitcoin'
        option adb_src_desc 'focus on malicious bitcoin mining sites, infrequent updates, approx. 80 entries'
        option enabled '0'
 
-config source 'blacklist'
-       option adb_src '/etc/adblock/adblock.blacklist'
-       option adb_src_rset '/^([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}'
-       option adb_src_desc 'static local domain blacklist, always deny these domains'
-       option enabled '1'
-
 config source 'disconnect'
        option adb_src 'https://s3.amazonaws.com/lists.disconnect.me/simple_malvertising.txt'
        option adb_src_rset '/^([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}'
@@ -151,12 +144,6 @@ config source 'sysctl'
        option adb_src_desc 'broad blocklist, weekly updates, approx. 16.500 entries'
        option enabled '0'
 
-config source 'urlhaus'
-       option adb_src 'https://urlhaus.abuse.ch/downloads/rpz'
-       option adb_src_rset '/^([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)+/{print tolower(\$1)}'
-       option adb_src_desc 'urlhaus RPZ domains by abuse.ch, numerous updates on the same day, approx. 3.500 entries'
-       option enabled '0'
-
 config source 'ut_capitole'
        option adb_src 'https://dsi.ut-capitole.fr/blacklists/download/blacklists.tar.gz'
        option adb_src_rset '/^([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}'
@@ -187,20 +174,8 @@ config source 'winhelp'
        option adb_src_desc 'broad blocklist, infrequent updates, approx. 13.000 entries'
        option enabled '0'
 
-config source 'youtube'
-       option adb_src 'https://api.hackertarget.com/hostsearch/?q=googlevideo.com'
-       option adb_src_rset 'BEGIN{FS=\",\"}/^(r[0-9]+\.){1,1}([[:alnum:]_-]+\.)+[[:alpha:]]+/{sub(/\./,\"---\");print tolower(\$1)}'
-       option adb_src_desc 'focus on youtube ad-related subdomains, dynamic request API, approx. 150 entries'
-       option enabled '0'
-
 config source 'yoyo'
        option adb_src 'https://pgl.yoyo.org/adservers/serverlist.php?hostformat=nohtml&showintro=0&mimetype=plaintext'
        option adb_src_rset '/^([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}'
        option adb_src_desc 'focus on ad related domains, weekly updates, approx. 2.400 entries'
        option enabled '1'
-
-config source 'zeus'
-       option adb_src 'https://zeustracker.abuse.ch/blocklist.php?download=domainblocklist'
-       option adb_src_rset '/^([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}'
-       option adb_src_desc 'focus on zeus botnet by abuse.ch, daily updates, approx. 400 entries'
-       option enabled '0'
index 74cbf01bb38446ba510b3f4fb720280e7b743316..0917288ea9e167c4515ed53eefd2d99657e3d4d3 100755 (executable)
@@ -23,7 +23,7 @@ boot()
 
 start_service()
 {
-       if [ $("${adb_init}" enabled; printf "%u" ${?}) -eq 0 ]
+       if [ "$("${adb_init}" enabled; printf "%u" ${?})" -eq 0 ]
        then
                if [ -n "${adb_boot}" ]
                then
@@ -33,11 +33,11 @@ start_service()
                                return 0
                        fi
                fi
-               local nice="$(uci_get adblock extra adb_nice)"
+               local nice="$(uci_get adblock extra adb_nice "0")"
                procd_open_instance "adblock"
                procd_set_param command "${adb_script}" "${@}"
                procd_set_param pidfile "${adb_pidfile}"
-               procd_set_param nice ${nice:-0}
+               procd_set_param nice "${nice}"
                procd_set_param stdout 1
                procd_set_param stderr 1
                procd_close_instance
@@ -52,7 +52,6 @@ reload_service()
 stop_service()
 {
        rc_procd "${adb_script}" stop
-       rc_procd start_service
 }
 
 restart()
@@ -63,13 +62,13 @@ restart()
 suspend()
 {
        [ -s "${adb_pidfile}" ] && return 1
-       rc_procd "${adb_script}" suspend
+       rc_procd start_service suspend
 }
 
 resume()
 {
        [ -s "${adb_pidfile}" ] && return 1
-       rc_procd "${adb_script}" resume
+       rc_procd start_service resume
 }
 
 query()
@@ -86,34 +85,37 @@ report()
 
 status()
 {
-       local key keylist value rtfile="$(uci_get adblock extra adb_rtfile)"
+       local key keylist value 
+       local rtfile="$(uci_get adblock extra adb_rtfile "/tmp/adb_runtime.json")"
 
-       rtfile="${rtfile:-"/tmp/adb_runtime.json"}"
        if [ -s "${rtfile}" ]
        then
-               printf "%s\n" "::: adblock runtime information"
+               printf "%s\\n" "::: adblock runtime information"
                json_load_file "${rtfile}"
                json_select data
                json_get_keys keylist
                for key in ${keylist}
                do
                        json_get_var value "${key}"
-                       printf "  + %-15s : %s\n" "${key}" "${value}"
+                       printf "  + %-15s : %s\\n" "${key}" "${value}"
                done
        else
-               printf "%s\n" "::: no adblock runtime information available"
+               printf "%s\\n" "::: no adblock runtime information available"
        fi
 }
 
 service_triggers()
 {
        local trigger="$(uci_get adblock global adb_trigger)"
-       local delay="$(uci_get adblock extra adb_triggerdelay)"
+       local delay="$(uci_get adblock extra adb_triggerdelay "2")"
 
-       if [ "${trigger}" != "none" ] && [ "${trigger}" != "timed" ]
+       PROCD_RELOAD_DELAY=$((delay*1000))
+       if [ -n "${trigger}" ] && [ "${trigger}" != "none" ] && [ "${trigger}" != "timed" ]
        then
-               PROCD_RELOAD_DELAY=$((${delay:-2} * 1000))
                procd_add_interface_trigger "interface.*.up" "${trigger}" "${adb_init}" start
+       elif [ -z "${trigger}" ]
+       then
+               procd_add_raw_trigger "interface.*.up" ${PROCD_RELOAD_DELAY} "${adb_init}" start
        fi
        procd_add_reload_trigger "adblock"
 }
diff --git a/net/adblock/files/adblock.mail b/net/adblock/files/adblock.mail
new file mode 100755 (executable)
index 0000000..0f8b176
--- /dev/null
@@ -0,0 +1,70 @@
+#!/bin/sh
+# send mail script for adblock notifications
+# written by Dirk Brenken (dev@brenken.org)
+# Please note: you have to manually install and configure the package 'msmtp' before using this script
+
+# This is free software, licensed under the GNU General Public License v3.
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+LC_ALL=C
+PATH="/usr/sbin:/usr/bin:/sbin:/bin"
+
+if [ -r "/lib/functions.sh" ]
+then
+       . "/lib/functions.sh"
+       adb_debug="$(uci_get adblock extra adb_debug "0")"
+       adb_msender="$(uci_get adblock extra adb_msender "no-reply@adblock")"
+       adb_mreceiver="$(uci_get adblock extra adb_mreceiver)"
+       adb_mtopic="$(uci_get adblock extra adb_mtopic "adblock notification")"
+       adb_mprofile="$(uci_get adblock extra adb_mprofile "adb_notify")"
+fi
+adb_ver="${1}"
+adb_mail="$(command -v msmtp)"
+adb_rc=1
+
+if [ "${adb_debug}" -eq 1 ]
+then
+       debug="--debug"
+fi
+
+# mail header & receiver check
+#
+if [ -z "${adb_mreceiver}" ]
+then
+       logger -p "err" -t "adblock-${adb_ver}[${$}]" "please set the mail receiver with the 'adb_mreceiver' option"
+       exit ${adb_rc}
+fi
+adb_mhead="From: ${adb_msender}\\nTo: ${adb_mreceiver}\\nSubject: ${adb_mtopic}\\nReply-to: ${adb_msender}\\nMime-Version: 1.0\\nContent-Type: text/html\\nContent-Disposition: inline\\n\\n"
+
+# info preparation
+#
+sys_info="$(strings /etc/banner 2>/dev/null; ubus call system board | sed -e 's/\"release\": {//' | sed -e 's/^[ \t]*//' | sed -e 's/[{}\",]//g' | sed -e 's/[ ]/  \t/' | sed '/^$/d' 2>/dev/null)"
+adb_info="$(/etc/init.d/adblock status 2>/dev/null)"
+if [ -f "/var/log/messages" ]
+then
+       log_info="$(awk '/adblock-/{NR=1;max=79;if(length($0)>max+1)while($0){if(NR==1){print substr($0,1,max),"&#8629;"} else {print " ",substr($0,1,max)}{$0=substr($0,max+1);NR=NR+1}}else print}' /var/log/messages)"
+else
+       log_info="$(logread -e "adblock-" | awk '{NR=1;max=79;if(length($0)>max+1)while($0){if(NR==1){print substr($0,1,max),"&#8629;"} else {print " ",substr($0,1,max)}{$0=substr($0,max+1);NR=NR+1}}else print}')"
+fi
+
+# mail body
+#
+adb_mtext="<html><body><pre style='display:block;font-family:monospace;font-size:1rem;padding:20;background-color:#f3eee5;white-space:pre'>"
+adb_mtext="${adb_mtext}\\n<strong>++\\n++ System Information ++\\n++</strong>\\n${sys_info}"
+adb_mtext="${adb_mtext}\\n\\n<strong>++\\n++ Adblock Information ++\\n++</strong>\\n${adb_info}"
+adb_mtext="${adb_mtext}\\n\\n<strong>++\\n++ Logfile Information ++\\n++</strong>\\n${log_info}"
+adb_mtext="${adb_mtext}</pre></body></html>"
+
+# send mail
+#
+if [ -x "${adb_mail}" ]
+then
+       printf "%b" "${adb_mhead}${adb_mtext}" 2>/dev/null | "${adb_mail}" ${debug} -a "${adb_mprofile}" "${adb_mreceiver}" >/dev/null 2>&1
+       adb_rc=${?}
+       logger -p "info" -t "adblock-${adb_ver}[${$}]" "mail sent to '${adb_mreceiver}' with rc '${adb_rc}'"
+else
+       logger -p "err" -t "adblock-${adb_ver}[${$}]" "msmtp mail daemon not found"
+fi
+
+exit ${adb_rc}
diff --git a/net/adblock/files/adblock.notify b/net/adblock/files/adblock.notify
deleted file mode 100644 (file)
index 54f0288..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-#!/bin/sh
-#
-# adblock send mail script for msmtp
-# written by Dirk Brenken (dev@brenken.org)
-# Please note: you have to install and configure the package 'msmtp' before using this script.
-
-# This is free software, licensed under the GNU General Public License v3.
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-LC_ALL=C
-PATH="/usr/sbin:/usr/bin:/sbin:/bin"
-mail_ver="1.0.4"
-mail_daemon="$(command -v msmtp)"
-mail_profile="adb_notify"
-#mail_debug="--debug"
-mail_rc=1
-
-# mail header & mail receiver check
-#
-mail_receiver=""
-mail_sender="no-reply@adblock"
-mail_topic="${HOSTNAME}: adblock notification"
-mail_head="From: ${mail_sender}\nTo: ${mail_receiver}\nSubject: ${mail_topic}\nReply-to: ${mail_sender}\nMime-Version: 1.0\nContent-Type: text/html\nContent-Disposition: inline\n\n"
-
-if [ -z "${mail_receiver}" ]
-then
-       logger -p "err" -t "adblock-notify-${mail_ver}[${$}]" "please supply/customize the 'mail_receiver' in '/etc/adblock/adblock.notify'"
-       exit ${mail_rc}
-fi
-
-# mail daemon check
-#
-if [ ! -x "${mail_daemon}" ]
-then
-       mail_daemon="$(command -v sendmail)"
-fi
-
-# info preparation
-#
-sys_info="$(strings /etc/banner 2>/dev/null; ubus call system board | sed -e 's/\"release\": {//' | sed -e 's/^[ \t]*//' | sed -e 's/[{}\",]//g' | sed -e 's/[ ]/  \t/' | sed '/^$/d' 2>/dev/null)"
-adb_info="$(/etc/init.d/adblock status 2>/dev/null)"
-if [ -f "/var/log/messages" ]
-then
-       log_info="$(awk '/adblock-/{NR=1;max=79;if(length($0)>max+1)while($0){if(NR==1){print substr($0,1,max),"&#8629;"} else {print " ",substr($0,1,max)}{$0=substr($0,max+1);NR=NR+1}}else print}' /var/log/messages)"
-else
-       log_info="$(logread -e "adblock-" | awk '{NR=1;max=79;if(length($0)>max+1)while($0){if(NR==1){print substr($0,1,max),"&#8629;"} else {print " ",substr($0,1,max)}{$0=substr($0,max+1);NR=NR+1}}else print}')"
-fi
-
-# mail body
-#
-mail_text="<html><body><pre style='display:block;font-family:monospace;font-size:1rem;padding:20;background-color:#f3eee5;white-space:pre'>"
-mail_text="${mail_text}\n<strong>++\n++ System Information ++\n++</strong>\n${sys_info}"
-mail_text="${mail_text}\n\n<strong>++\n++ Adblock Information ++\n++</strong>\n${adb_info}"
-mail_text="${mail_text}\n\n<strong>++\n++ Logfile Information ++\n++</strong>\n${log_info}"
-mail_text="${mail_text}</pre></body></html>"
-
-# send mail
-#
-if [ -x "${mail_daemon}" ]
-then
-       printf "%b" "${mail_head}${mail_text}" 2>/dev/null | "${mail_daemon}" ${mail_debug} -a "${mail_profile}" "${mail_receiver}" >/dev/null 2>&1
-       mail_rc=${?}
-       logger -p "info" -t "adblock-notify-${mail_ver}[${$}]" "mail sent to '${mail_receiver}' with rc '${mail_rc}'"
-else
-       logger -p "err" -t "adblock-notify-${mail_ver}[${$}]" "msmtp mail daemon not found"
-fi
-
-exit ${mail_rc}
diff --git a/net/adblock/files/adblock.service b/net/adblock/files/adblock.service
new file mode 100755 (executable)
index 0000000..c6ac40a
--- /dev/null
@@ -0,0 +1,27 @@
+#!/bin/sh
+# ubus monitor to trace dns backend events and conditionally restart adblock
+# written by Dirk Brenken (dev@brenken.org)
+
+# This is free software, licensed under the GNU General Public License v3.
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+LC_ALL=C
+PATH="/usr/sbin:/usr/bin:/sbin:/bin"
+
+if [ -r "/lib/functions.sh" ]
+then
+       . "/lib/functions.sh"
+       adb_dns="$(uci_get adblock global adb_dns)"
+fi
+adb_ver="${1}"
+adb_ubus="$(command -v ubus)"
+
+if [ -x "${adb_ubus}" ] && [ -n "${adb_dns}" ]
+then
+       logger -p "info" -t "adblock-${adb_ver}[${$}]" "ubus/adblock service started"
+       "${adb_ubus}" -S -M r -m invoke monitor | \
+               { grep -qE "\"method\":\"(set|signal)\",\"data\":\{\"name\":\"${adb_dns}\""; [ $? -eq 0 ] && /etc/init.d/adblock start; }
+else
+       logger -p "err" -t "adblock-${adb_ver}[${$}]" "can't start ubus/adblock service"
+fi
index 6b235c62571bde0d8e391e1c74892a8593c398de..b8bfbb775d60a0f589a0b71e91dcd3a57e2e1b32 100755 (executable)
@@ -6,34 +6,36 @@
 # You should have received a copy of the GNU General Public License
 # along with this program. If not, see <http://www.gnu.org/licenses/>.
 
+# (s)hellcheck exceptions
+# shellcheck disable=1091 disable=2039 disable=2143 disable=2181 disable=2188
+
 # set initial defaults
 #
 LC_ALL=C
 PATH="/usr/sbin:/usr/bin:/sbin:/bin"
-adb_ver="3.6.5"
-adb_sysver="unknown"
+adb_ver="3.8.6"
+adb_basever=""
 adb_enabled=0
 adb_debug=0
 adb_forcedns=0
-adb_jail=0
-adb_maxqueue=8
-adb_notify=0
-adb_notifycnt=0
+adb_maxqueue=4
+adb_mail=0
+adb_mcnt=0
+adb_trigger="wan"
 adb_triggerdelay=0
-adb_backup=0
-adb_backup_mode=0
-adb_backupdir="/mnt"
+adb_backupdir="/tmp"
 adb_fetchutil="uclient-fetch"
 adb_dns="dnsmasq"
+adb_dnsvariant="nxdomain"
 adb_dnsprefix="adb_list"
 adb_dnsfile="${adb_dnsprefix}.overall"
-adb_dnsjail="${adb_dnsprefix}.jail"
+adb_dnsfilereset="false"
+adb_maxtld=100000
 adb_dnsflush=0
+adb_blacklist="/etc/adblock/adblock.blacklist"
 adb_whitelist="/etc/adblock/adblock.whitelist"
 adb_rtfile="/tmp/adb_runtime.json"
-adb_hashutil="$(command -v sha256sum)"
-adb_hashold=""
-adb_hashnew=""
+adb_portlist="53 853 5353"
 adb_report=0
 adb_repiface="br-lan"
 adb_replisten="53"
@@ -41,33 +43,23 @@ adb_repdir="/tmp"
 adb_reputil="$(command -v tcpdump)"
 adb_repchunkcnt="5"
 adb_repchunksize="1"
-adb_cnt=""
-adb_rc=0
 adb_action="${1:-"start"}"
 adb_pidfile="/var/run/adblock.pid"
+adb_ubusservice="/etc/adblock/adblock.service"
+adb_mailservice="/etc/adblock/adblock.mail"
+adb_sources=""
+adb_cnt=""
 
 # load adblock environment
 #
-f_envload()
+f_load()
 {
-       local dns_up sys_call sys_desc sys_model cnt=0
+       local dns_up cnt=0
 
        # get system information
        #
-       sys_call="$(ubus -S call system board 2>/dev/null)"
-       if [ -n "${sys_call}" ]
-       then
-               sys_desc="$(printf '%s' "${sys_call}" | jsonfilter -e '@.release.description')"
-               sys_model="$(printf '%s' "${sys_call}" | jsonfilter -e '@.model')"
-               adb_sysver="${sys_model}, ${sys_desc}"
-       fi
-
-       # check hash utility
-       #
-       if [ ! -x "${adb_hashutil}" ]
-       then
-               adb_hashutil="$(command -v md5sum)"
-       fi
+       adb_sysver="$(ubus -S call system board 2>/dev/null | jsonfilter -e '@.model' -e '@.release.description' | \
+               awk 'BEGIN{ORS=", "}{print $0}' | awk '{print substr($0,1,length($0)-2)}')"
 
        # parse 'global' and 'extra' section by callback
        #
@@ -108,117 +100,143 @@ f_envload()
        config_load adblock
        config_foreach parse_config source
 
-       # check dns backend
+       # version check
+       #
+       if [ -z "${adb_basever}" ] || [ "${adb_ver%.*}" != "${adb_basever}" ]
+       then
+               f_log "info" "your adblock config seems to be too old, please update your config with the '--force-maintainer' opkg option"
+               exit 0
+       fi
+
+       # set dns backend
        #
        case "${adb_dns}" in
-               dnsmasq)
+               "dnsmasq")
+                       adb_dnsinotify="${adb_dnsinotify:-"false"}"
                        adb_dnsinstance="${adb_dnsinstance:-"0"}"
                        adb_dnsuser="${adb_dnsuser:-"dnsmasq"}"
                        adb_dnsdir="${adb_dnsdir:-"/tmp"}"
                        adb_dnsheader=""
-                       adb_dnsdeny="awk '{print \"server=/\"\$0\"/\"}'"
-                       adb_dnsallow="awk '{print \"server=/\"\$0\"/#\"}'"
-                       adb_dnshalt="server=/#/"
+                       if [ "${adb_dnsvariant}" = "nxdomain" ]
+                       then
+                               adb_dnsdeny="awk '{print \"server=/\"\$0\"/\"}'"
+                               adb_dnsallow="awk '{print \"server=/\"\$0\"/#\"}'"
+                       elif [ "${adb_dnsvariant}" = "null (IPv4)" ]
+                       then
+                               adb_dnsdeny="awk '{print \"0.0.0.0\\t\"\$0\"\"}'"
+                               adb_dnsallow=""
+                       elif [ "${adb_dnsvariant}" = "null (IPv4/IPv6)" ]
+                       then
+                               adb_dnsdeny="awk '{print \"0.0.0.0\\t\"\$0\"\\n::\\t\"\$0\"\"}'"
+                               adb_dnsallow=""
+                       fi
                ;;
-               unbound)
-                       adb_dnsinstance="${adb_dnsinstance:-"0"}"
+               "unbound")
+                       adb_dnsinotify="${adb_dnsinotify:-"false"}"
                        adb_dnsuser="${adb_dnsuser:-"unbound"}"
                        adb_dnsdir="${adb_dnsdir:-"/var/lib/unbound"}"
                        adb_dnsheader=""
-                       adb_dnsdeny="awk '{print \"local-zone: \042\"\$0\"\042 static\"}'"
-                       adb_dnsallow="awk '{print \"local-zone: \042\"\$0\"\042 transparent\"}'"
-                       adb_dnshalt="local-zone: \".\" static"
+                       adb_dnsdeny="awk '{print \"local-zone: \\042\"\$0\"\\042 static\"}'"
+                       adb_dnsallow="awk '{print \"local-zone: \\042\"\$0\"\\042 transparent\"}'"
                ;;
-               named)
-                       adb_dnsinstance="${adb_dnsinstance:-"0"}"
+               "named")
+                       adb_dnsinotify="${adb_dnsinotify:-"false"}"
                        adb_dnsuser="${adb_dnsuser:-"bind"}"
                        adb_dnsdir="${adb_dnsdir:-"/var/lib/bind"}"
                        adb_dnsheader="\$TTL 2h"$'\n'"@ IN SOA localhost. root.localhost. (1 6h 1h 1w 2h)"$'\n'"  IN NS localhost."
-                       adb_dnsdeny="awk '{print \"\"\$0\" CNAME .\n*.\"\$0\" CNAME .\"}'"
-                       adb_dnsallow="awk '{print \"\"\$0\" CNAME rpz-passthru.\n*.\"\$0\" CNAME rpz-passthru.\"}'"
-                       adb_dnshalt="* CNAME ."
+                       adb_dnsdeny="awk '{print \"\"\$0\" CNAME .\\n*.\"\$0\" CNAME .\"}'"
+                       adb_dnsallow="awk '{print \"\"\$0\" CNAME rpz-passthru.\\n*.\"\$0\" CNAME rpz-passthru.\"}'"
                ;;
-               kresd)
-                       adb_dnsinstance="${adb_dnsinstance:-"0"}"
+               "kresd")
+                       adb_dnsinotify="${adb_dnsinotify:-"false"}"
                        adb_dnsuser="${adb_dnsuser:-"root"}"
                        adb_dnsdir="${adb_dnsdir:-"/etc/kresd"}"
                        adb_dnsheader="\$TTL 2h"$'\n'"@ IN SOA localhost. root.localhost. (1 6h 1h 1w 2h)"$'\n'"  IN NS  localhost."
-                       adb_dnsdeny="awk '{print \"\"\$0\" CNAME .\n*.\"\$0\" CNAME .\"}'"
-                       adb_dnsallow="awk '{print \"\"\$0\" CNAME rpz-passthru.\n*.\"\$0\" CNAME rpz-passthru.\"}'"
-                       adb_dnshalt="* CNAME ."
-               ;;
-               dnscrypt-proxy)
-                       adb_dnsinstance="${adb_dnsinstance:-"0"}"
-                       adb_dnsuser="${adb_dnsuser:-"nobody"}"
-                       adb_dnsdir="${adb_dnsdir:-"/tmp"}"
-                       adb_dnsheader=""
-                       adb_dnsdeny="awk '{print \$0}'"
-                       adb_dnsallow=""
-                       adb_dnshalt=""
+                       adb_dnsdeny="awk '{print \"\"\$0\" CNAME .\\n*.\"\$0\" CNAME .\"}'"
+                       adb_dnsallow="awk '{print \"\"\$0\" CNAME rpz-passthru.\\n*.\"\$0\" CNAME rpz-passthru.\"}'"
                ;;
        esac
 
-       # check adblock status
+       # status check
        #
-       if [ ${adb_enabled} -eq 0 ]
+       if [ "${adb_enabled}" -eq 0 ]
        then
                f_extconf
                f_temp
                f_rmdns
+               f_bgserv "stop"
                f_jsnup "disabled"
-               f_log "info" "adblock is currently disabled, please set adb_enabled to '1' to use this service"
+               f_log "info" "adblock is currently disabled, please set the config option 'adb_enabled' to '1' to use this service"
                exit 0
        fi
 
+       # dns backend check
+       #
        if [ -d "${adb_dnsdir}" ] && [ ! -f "${adb_dnsdir}/${adb_dnsfile}" ]
        then
-               printf '%s\n' "${adb_dnsheader}" > "${adb_dnsdir}/${adb_dnsfile}"
+               printf "%s\\n" "${adb_dnsheader}" > "${adb_dnsdir}/${adb_dnsfile}"
        fi
 
        if [ "${adb_action}" = "start" ] && [ "${adb_trigger}" = "timed" ]
        then
-               sleep ${adb_triggerdelay}
+               sleep "${adb_triggerdelay}"
        fi
 
-       while [ ${cnt} -le 30 ]
-       do
-               dns_up="$(ubus -S call service list "{\"name\":\"${adb_dns}\"}" 2>/dev/null | jsonfilter -l1 -e "@[\"${adb_dns}\"].instances.*.running" 2>/dev/null)"
-               if [ "${dns_up}" = "true" ]
+       if [ "${adb_action}" != "stop" ]
+       then
+               while [ "${cnt}" -le 30 ]
+               do
+                       dns_up="$(ubus -S call service list "{\"name\":\"${adb_dns}\"}" 2>/dev/null | jsonfilter -l1 -e "@[\"${adb_dns}\"].instances.*.running" 2>/dev/null)"
+                       if [ "${dns_up}" = "true" ]
+                       then
+                               break
+                       fi
+                       sleep 1
+                       cnt=$((cnt+1))
+               done
+
+               if [ "${dns_up}" != "true" ] || [ -z "${adb_dns}" ] || [ ! -x "$(command -v "${adb_dns}")" ]
                then
-                       break
+                       f_log "err" "dns backend '${adb_dns}' not running or executable"
+               elif [ ! -d "${adb_dnsdir}" ]
+               then
+                       f_log "err" "dns backend directory '${adb_dnsdir}' not found"
                fi
-               sleep 1
-               cnt=$((cnt+1))
-       done
+       fi
 
-       if [ "${dns_up}" != "true" ] || [ -z "${adb_dns}" ] || [ ! -x "$(command -v ${adb_dns})" ]
-       then
-               f_log "err" "'${adb_dns}' not running or not executable"
-       elif [ ! -d "${adb_dnsdir}" ]
+       # inotify check
+       #
+       if [ "${adb_dnsinotify}" = "true" ]
        then
-               f_log "err" "'${adb_dnsdir}' backend directory not found"
+               if [ "${adb_dnsfilereset}" = "true" ]
+               then
+                       adb_dnsfilereset="false"
+               fi
+               f_log "info" "inotify is enabled for '${adb_dns}', adblock restart and file reset will be disabled"
        fi
 }
 
-# check environment
+# check & set environment
 #
-f_envcheck()
+f_env()
 {
        local ssl_lib
 
-       # startup message
-       #
        f_log "info" "adblock instance started ::: action: ${adb_action}, priority: ${adb_nice:-"0"}, pid: ${$}"
        f_jsnup "running"
+       f_extconf
 
-       # check external uci config files
+       # check backup directory
        #
-       f_extconf
+       if [ ! -d "${adb_backupdir}" ]
+       then
+               f_log "err" "backup directory '${adb_backupdir}' does not exist/is not mounted yet, please create the directory or raise the 'adb_triggerdelay' to defer the adblock start"
+       fi
 
        # check fetch utility
        #
        case "${adb_fetchutil}" in
-               uclient-fetch)
+               "uclient-fetch")
                        if [ -f "/lib/libustream-ssl.so" ]
                        then
                                adb_fetchparm="${adb_fetchparm:-"--timeout=10 --no-check-certificate -O"}"
@@ -227,21 +245,21 @@ f_envcheck()
                                adb_fetchparm="${adb_fetchparm:-"--timeout=10 -O"}"
                        fi
                ;;
-               wget)
+               "wget")
                        adb_fetchparm="${adb_fetchparm:-"--no-cache --no-cookies --max-redirect=0 --timeout=10 --no-check-certificate -O"}"
                        ssl_lib="built-in"
                ;;
-               wget-nossl)
+               "wget-nossl")
                        adb_fetchparm="${adb_fetchparm:-"--no-cache --no-cookies --max-redirect=0 --timeout=10 -O"}"
                ;;
-               busybox)
+               "busybox")
                        adb_fetchparm="${adb_fetchparm:-"-O"}"
                ;;
-               curl)
+               "curl")
                        adb_fetchparm="${adb_fetchparm:-"--connect-timeout 10 --insecure -o"}"
                        ssl_lib="built-in"
                ;;
-               aria2c)
+               "aria2c")
                        adb_fetchparm="${adb_fetchparm:-"--timeout=10 --allow-overwrite=true --auto-file-renaming=false --check-certificate=false -o"}"
                        ssl_lib="built-in"
                ;;
@@ -260,15 +278,18 @@ f_envcheck()
 #
 f_temp()
 {
-       if [ -z "${adb_tmpdir}" ]
+       if [ -d "/tmp" ] && [ -z "${adb_tmpdir}" ]
        then
                adb_tmpdir="$(mktemp -p /tmp -d)"
-               adb_tmpload="$(mktemp -p ${adb_tmpdir} -tu)"
-               adb_tmpfile="$(mktemp -p ${adb_tmpdir} -tu)"
+               adb_tmpload="$(mktemp -p "${adb_tmpdir}" -tu)"
+               adb_tmpfile="$(mktemp -p "${adb_tmpdir}" -tu)"
+       elif [ ! -d "/tmp" ]
+       then
+               f_log "err" "the temp directory '/tmp' does not exist/is not mounted yet, please create the directory or raise the 'adb_triggerdelay' to defer the adblock start"
        fi
        if [ ! -s "${adb_pidfile}" ]
        then
-               printf '%s' "${$}" > "${adb_pidfile}"
+               printf "%s" "${$}" > "${adb_pidfile}"
        fi
 }
 
@@ -283,25 +304,27 @@ f_rmtemp()
        > "${adb_pidfile}"
 }
 
-# remove dns related files and directories
+# remove dns related files, services and directories
 #
 f_rmdns()
 {
-       if [ -n "${adb_dns}" ]
+       local status dns_status rc
+
+       status="$(ubus -S call service list '{"name":"adblock"}' 2>/dev/null | jsonfilter -l1 -e '@["adblock"].instances.*.running' 2>/dev/null)"
+       if [ -n "${adb_dns}" ] && [ -n "${status}" ]
        then
-               f_hash
-               printf '%s\n' "${adb_dnsheader}" > "${adb_dnsdir}/${adb_dnsfile}"
-               > "${adb_dnsdir}/.${adb_dnsfile}"
+               dns_status="$(ubus -S call service list "{\"name\":\"${adb_dns}\"}" 2>/dev/null | jsonfilter -l1 -e "@[\"${adb_dns}\"].instances.*.running" 2>/dev/null)"
+               printf "%s\\n" "${adb_dnsheader}" > "${adb_dnsdir}/${adb_dnsfile}"
                > "${adb_rtfile}"
-               rm -f "${adb_backupdir}/${adb_dnsprefix}"*.gz
-               f_hash
-               if [ ${?} -eq 1 ]
+               rm "${adb_backupdir}/${adb_dnsprefix}".*.gz 2>/dev/null
+               rc="${?}"
+               if [ "${rc}" -eq 0 ] && [ -n "${dns_status}" ]
                then
-                       f_dnsup
+                       f_dnsup 4
                fi
-               f_rmtemp
        fi
-       f_log "debug" "f_rmdns  ::: dns: ${adb_dns}, dns_dir: ${adb_dnsdir}, dns_prefix: ${adb_dnsprefix}, dns_file: ${adb_dnsfile}, rt_file: ${adb_rtfile}, backup_dir: ${adb_backupdir}"
+       f_rmtemp
+       f_log "debug" "f_rmdns  ::: status: ${status:-"-"}, dns_status: ${dns_status:-"-"}, rc: ${rc:-"-"}, dns: ${adb_dns}, dns_dir: ${adb_dnsdir}, dns_file: ${adb_dnsfile}, rt_file: ${adb_rtfile}, backup_dir: ${adb_backupdir}"
 }
 
 # commit uci changes
@@ -317,11 +340,14 @@ f_uci()
                then
                        uci_commit "${config}"
                        case "${config}" in
-                               firewall)
-                                       /etc/init.d/firewall reload >/dev/null 2>&1
+                               "firewall")
+                                       "/etc/init.d/firewall" reload >/dev/null 2>&1
                                ;;
-                               *)
-                                       /etc/init.d/"${adb_dns}" reload >/dev/null 2>&1
+                               "dhcp"|"resolver")
+                                       printf "%s\\n" "${adb_dnsheader}" > "${adb_dnsdir}/${adb_dnsfile}"
+                                       f_count
+                                       f_jsnup "running"
+                                       "/etc/init.d/${adb_dns}" reload >/dev/null 2>&1
                                ;;
                        esac
                fi
@@ -329,353 +355,424 @@ f_uci()
        fi
 }
 
-# list/overall count
+# set/reset the global counter
 #
 f_count()
 {
        local mode="${1}"
 
        adb_cnt=0
-       if [ -s "${adb_dnsdir}/${adb_dnsfile}" ] && ([ -z "${mode}" ] || [ "${mode}" = "final" ])
-       then
-               adb_cnt="$(wc -l 2>/dev/null < "${adb_dnsdir}/${adb_dnsfile}")"
-               if [ -s "${adb_tmpdir}/tmp.add_whitelist" ]
-               then
-                       adb_cnt="$(( ${adb_cnt} - $(wc -l 2>/dev/null < "${adb_tmpdir}/tmp.add_whitelist") ))"
-               fi
-               if [ "${adb_dns}" = "named" ] || [ "${adb_dns}" = "kresd" ]
-               then
-                       adb_cnt="$(( (${adb_cnt} - $(printf '%s' "${adb_dnsheader}" | grep -c "^")) / 2 ))"
-               fi
-       elif [ -s "${adb_tmpfile}" ]
-       then
-               adb_cnt="$(wc -l 2>/dev/null < "${adb_tmpfile}")"
-       fi
+       case "${mode}" in
+               "blacklist")
+                       if [ -s "${adb_tmpfile}.blacklist" ]
+                       then
+                               adb_cnt="$(wc -l 2>/dev/null < "${adb_tmpfile}.blacklist")"
+                       fi
+               ;;
+               "whitelist")
+                       if [ -s "${adb_tmpdir}/tmp.raw.whitelist" ]
+                       then
+                               adb_cnt="$(wc -l 2>/dev/null < "${adb_tmpdir}/tmp.raw.whitelist")"
+                       fi
+               ;;
+               "merge")
+                       if [ -s "${adb_tmpdir}/${adb_dnsfile}" ]
+                       then
+                               adb_cnt="$(wc -l 2>/dev/null < "${adb_tmpdir}/${adb_dnsfile}")"
+                       fi
+               ;;
+               "download"|"backup"|"restore")
+                       if [ -s "${src_tmpfile}" ]
+                       then
+                               adb_cnt="$(wc -l 2>/dev/null < "${src_tmpfile}")"
+                       fi
+               ;;
+               "final")
+                       if [ -s "${adb_dnsdir}/${adb_dnsfile}" ]
+                       then
+                               adb_cnt="$(wc -l 2>/dev/null < "${adb_dnsdir}/${adb_dnsfile}")"
+                               if [ -s "${adb_tmpdir}/tmp.add.whitelist" ]
+                               then
+                                       adb_cnt="$((adb_cnt-$(wc -l 2>/dev/null < "${adb_tmpdir}/tmp.add.whitelist")))"
+                               fi
+                               if [ "${adb_dns}" = "named" ] || [ "${adb_dns}" = "kresd" ] || { [ "${adb_dns}" = "dnsmasq" ] && [ "${adb_dnsvariant}" = "null (IPv4/IPv6)" ]; }
+                               then
+                                       adb_cnt="$(((adb_cnt-$(printf "%s" "${adb_dnsheader}" | grep -c "^"))/2))"
+                               fi
+                       fi
+               ;;
+       esac
 }
 
 # set external config options
 #
 f_extconf()
 {
-       local uci_config port port_list="53 853 5353"
+       local config port fwcfg
 
        case "${adb_dns}" in
-               dnsmasq)
-                       uci_config="dhcp"
-                       if [ ${adb_enabled} -eq 1 ] && [ -n "$(uci_get dhcp "@dnsmasq[${adb_dnsinstance}]")" ] && \
-                               [ -z "$(uci_get dhcp "@dnsmasq[${adb_dnsinstance}]" serversfile | grep -Fo "${adb_dnsdir}/${adb_dnsfile}")" ] && \
-                               [ -z "$(uci_get dhcp "@dnsmasq[${adb_dnsinstance}]" serversfile | grep -Fo "${adb_dnsdir}/${adb_dnsjail}")" ]
+               "dnsmasq")
+                       config="dhcp"
+                       if [ "${adb_dnsvariant}" = "nxdomain" ]
                        then
-                               uci_set dhcp "@dnsmasq[${adb_dnsinstance}]" serversfile "${adb_dnsdir}/${adb_dnsfile}"
-                       elif [ ${adb_enabled} -eq 0 ] && [ -n "$(uci_get dhcp "@dnsmasq[${adb_dnsinstance}]" serversfile | grep -Fo "${adb_dnsdir}/${adb_dnsfile}")" ]
+                               if [ "${adb_enabled}" -eq 1 ] && [ -z "$(uci_get dhcp "@dnsmasq[${adb_dnsinstance}]" serversfile | grep -Fo "${adb_dnsdir}/${adb_dnsfile}")" ]
+                               then
+                                       uci_set dhcp "@dnsmasq[${adb_dnsinstance}]" serversfile "${adb_dnsdir}/${adb_dnsfile}"
+                                       if [ -n "$(uci_get dhcp "@dnsmasq[${adb_dnsinstance}]" addnhosts | grep -Fo "${adb_dnsdir}/${adb_dnsfile}")" ]
+                                       then
+                                               uci -q del_list dhcp.@dnsmasq[${adb_dnsinstance}].addnhosts="${adb_dnsdir}/${adb_dnsfile}"
+                                       fi
+                               elif [ "${adb_enabled}" -eq 0 ] && [ -n "$(uci_get dhcp "@dnsmasq[${adb_dnsinstance}]" serversfile | grep -Fo "${adb_dnsdir}/${adb_dnsfile}")" ]
+                               then
+                                       uci_remove dhcp "@dnsmasq[${adb_dnsinstance}]" serversfile
+                               fi
+                       elif [ "${adb_dnsvariant% *}" = "null" ]
                        then
-                               uci_remove dhcp "@dnsmasq[${adb_dnsinstance}]" serversfile
+                               if [ "${adb_enabled}" -eq 1 ] && [ -z "$(uci_get dhcp "@dnsmasq[${adb_dnsinstance}]" addnhosts | grep -Fo "${adb_dnsdir}/${adb_dnsfile}")" ]
+                               then
+                                       uci -q add_list dhcp.@dnsmasq[${adb_dnsinstance}].addnhosts="${adb_dnsdir}/${adb_dnsfile}"
+                                       if [ -n "$(uci_get dhcp "@dnsmasq[${adb_dnsinstance}]" serversfile | grep -Fo "${adb_dnsdir}/${adb_dnsfile}")" ]
+                                       then
+                                               uci_remove dhcp "@dnsmasq[${adb_dnsinstance}]" serversfile
+                                       fi
+                               elif [ "${adb_enabled}" -eq 0 ] && [ -n "$(uci_get dhcp "@dnsmasq[${adb_dnsinstance}]" addnhosts | grep -Fo "${adb_dnsdir}/${adb_dnsfile}")" ]
+                               then
+                                       uci_remove dhcp "@dnsmasq[${adb_dnsinstance}]" addnhosts
+                               fi
                        fi
                ;;
-               kresd)
-                       uci_config="resolver"
-                       if [ ${adb_enabled} -eq 1 ] && [ -z "$(uci_get resolver kresd rpz_file | grep -Fo "${adb_dnsdir}/${adb_dnsfile}")" ]
+               "kresd")
+                       config="resolver"
+                       if [ "${adb_enabled}" -eq 1 ] && [ -z "$(uci_get resolver kresd rpz_file | grep -Fo "${adb_dnsdir}/${adb_dnsfile}")" ]
                        then
                                uci -q add_list resolver.kresd.rpz_file="${adb_dnsdir}/${adb_dnsfile}"
-                       elif [ ${adb_enabled} -eq 0 ] && [ -n "$(uci_get resolver kresd rpz_file | grep -Fo "${adb_dnsdir}/${adb_dnsfile}")" ]
+                       elif [ "${adb_enabled}" -eq 0 ] && [ -n "$(uci_get resolver kresd rpz_file | grep -Fo "${adb_dnsdir}/${adb_dnsfile}")" ]
                        then
                                uci -q del_list resolver.kresd.rpz_file="${adb_dnsdir}/${adb_dnsfile}"
                        fi
-                       if [ ${adb_enabled} -eq 1 ] && [ ${adb_dnsflush} -eq 0 ] && [ "$(uci_get resolver kresd keep_cache)" != "1" ]
+                       if [ "${adb_enabled}" -eq 1 ] && [ "${adb_dnsflush}" -eq 0 ] && [ "$(uci_get resolver kresd keep_cache)" != "1" ]
                        then
                                uci_set resolver kresd keep_cache "1"
-                       elif [ ${adb_enabled} -eq 0 ] || ([ ${adb_dnsflush} -eq 1 ] && [ "$(uci_get resolver kresd keep_cache)" = "1" ])
+                       elif [ "${adb_enabled}" -eq 0 ] || { [ "${adb_dnsflush}" -eq 1 ] && [ "$(uci_get resolver kresd keep_cache)" = "1" ]; }
                        then
                                uci_set resolver kresd keep_cache "0"
                        fi
                ;;
        esac
-       f_uci "${uci_config}"
+       f_uci "${config}"
 
-       uci_config="firewall"
-       if [ ${adb_enabled} -eq 1 ] && [ ${adb_forcedns} -eq 1 ] && \
-               [ -z "$(uci_get firewall adblock_dns_53)" ] && [ $(/etc/init.d/firewall enabled; printf '%u' ${?}) -eq 0 ]
+       config="firewall"
+       fwcfg="$(uci -qNX show "${config}")"
+       if [ "${adb_enabled}" -eq 1 ] && [ "${adb_forcedns}" -eq 1 ] && \
+               [ "$(/etc/init.d/firewall enabled; printf "%u" ${?})" -eq 0 ]
        then
-               for port in ${port_list}
+               for port in ${adb_portlist}
                do
-                       uci_add firewall "redirect" "adblock_dns_${port}"
-                       uci_set firewall "adblock_dns_${port}" "name" "Adblock DNS, port ${port}"
-                       uci_set firewall "adblock_dns_${port}" "src" "lan"
-                       uci_set firewall "adblock_dns_${port}" "proto" "tcp udp"
-                       uci_set firewall "adblock_dns_${port}" "src_dport" "${port}"
-                       uci_set firewall "adblock_dns_${port}" "dest_port" "${port}"
-                       uci_set firewall "adblock_dns_${port}" "target" "DNAT"
+                       if [ -z "$(printf "%s" "${fwcfg}" | grep -Fo -m1 "adblock_dns_${port}")" ]
+                       then
+                               uci_add firewall "redirect" "adblock_dns_${port}"
+                               uci_set firewall "adblock_dns_${port}" "name" "Adblock DNS, port ${port}"
+                               uci_set firewall "adblock_dns_${port}" "src" "lan"
+                               uci_set firewall "adblock_dns_${port}" "proto" "tcp udp"
+                               uci_set firewall "adblock_dns_${port}" "src_dport" "${port}"
+                               uci_set firewall "adblock_dns_${port}" "dest_port" "${port}"
+                               uci_set firewall "adblock_dns_${port}" "target" "DNAT"
+                       fi
                done
-       elif [ -n "$(uci_get firewall adblock_dns_53)" ] && ([ ${adb_enabled} -eq 0 ] || [ ${adb_forcedns} -eq 0 ])
+       elif [ "${adb_enabled}" -eq 0 ] || [ "${adb_forcedns}" -eq 0 ]
        then
-               for port in ${port_list}
+               for port in ${adb_portlist}
                do
-                       uci_remove firewall "adblock_dns_${port}"
+                       if [ -n "$(printf "%s" "${fwcfg}" | grep -Fo -m1 "adblock_dns_${port}")" ]
+                       then
+                               uci_remove firewall "adblock_dns_${port}"
+                       fi
                done
        fi
-       f_uci "${uci_config}"
+       f_uci "${config}"
 }
 
 # restart of the dns backend
 #
 f_dnsup()
 {
-       local dns_up cache_util cache_rc cnt=0
+       local dns_service dns_up dns_pid dns_procfile cache_util cache_rc cnt=0 out_rc=4 in_rc="${1:-0}"
 
-       if [ ${adb_dnsflush} -eq 0 ] && [ ${adb_enabled} -eq 1 ] && [ "${adb_rc}" -eq 0 ]
+       if [ "${in_rc}" -eq 0 ] && [ "${adb_dnsinotify}" = "true" ]
        then
-               case "${adb_dns}" in
-                       dnsmasq)
-                               killall -q -HUP "${adb_dns}"
-                               cache_rc=${?}
-                       ;;
-                       unbound)
-                               cache_util="$(command -v unbound-control)"
-                               if [ -x "${cache_util}" ] && [ -d "${adb_tmpdir}" ] && [ -f "${adb_dnsdir}"/unbound.conf ]
-                               then
-                                       "${cache_util}" -c "${adb_dnsdir}"/unbound.conf dump_cache > "${adb_tmpdir}"/adb_cache.dump 2>/dev/null
-                               fi
-                               "/etc/init.d/${adb_dns}" restart >/dev/null 2>&1
-                       ;;
-                       kresd)
-                               cache_util="keep_cache"
-                               "/etc/init.d/${adb_dns}" restart >/dev/null 2>&1
-                               cache_rc=${?}
-                       ;;
-                       named)
-                               cache_util="$(command -v rndc)"
-                               if [ -x "${cache_util}" ] && [ -f /etc/bind/rndc.conf ]
-                               then
-                                       "${cache_util}" -c /etc/bind/rndc.conf reload >/dev/null 2>&1
-                                       cache_rc=${?}
-                               else
-                                       "/etc/init.d/${adb_dns}" restart >/dev/null 2>&1
-                               fi
-                       ;;
-                       *)
-                               "/etc/init.d/${adb_dns}" restart >/dev/null 2>&1
-                       ;;
-               esac
+               out_rc=0
        else
-               "/etc/init.d/${adb_dns}" restart >/dev/null 2>&1
-       fi
-
-       adb_rc=1
-       while [ ${cnt} -le 10 ]
-       do
-               dns_up="$(ubus -S call service list "{\"name\":\"${adb_dns}\"}" | jsonfilter -l1 -e "@[\"${adb_dns}\"].instances.*.running")"
-               if [ "${dns_up}" = "true" ]
+               if [ "${in_rc}" -eq 0 ] && [ "${adb_dnsflush}" -eq 0 ] && [ "${adb_enabled}" -eq 1 ]
                then
                        case "${adb_dns}" in
-                               unbound)
+                               "dnsmasq")
+                                       killall -q -HUP "${adb_dns}"
+                                       cache_rc="${?}"
+                               ;;
+                               "unbound")
                                        cache_util="$(command -v unbound-control)"
-                                       if [ -x "${cache_util}" ] && [ -d "${adb_tmpdir}" ] && [ -s "${adb_tmpdir}"/adb_cache.dump ]
+                                       if [ -x "${cache_util}" ] && [ -d "${adb_tmpdir}" ] && [ -f "${adb_dnsdir}/unbound.conf" ]
                                        then
-                                               while [ ${cnt} -le 10 ]
-                                               do
-                                                       "${cache_util}" -c "${adb_dnsdir}"/unbound.conf load_cache < "${adb_tmpdir}"/adb_cache.dump >/dev/null 2>&1
-                                                       cache_rc=${?}
-                                                       if [ ${cache_rc} -eq 0 ]
-                                                       then
-                                                               break
-                                                       fi
-                                                       cnt=$((cnt+1))
-                                                       sleep 1
-                                               done
+                                               "${cache_util}" -c "${adb_dnsdir}/unbound.conf" dump_cache > "${adb_tmpdir}/adb_cache.dump" 2>/dev/null
+                                       fi
+                                       "/etc/init.d/${adb_dns}" restart >/dev/null 2>&1
+                               ;;
+                               "kresd")
+                                       "/etc/init.d/${adb_dns}" restart >/dev/null 2>&1
+                                       cache_rc="${?}"
+                               ;;
+                               "named")
+                                       cache_util="$(command -v rndc)"
+                                       if [ -x "${cache_util}" ] && [ -f "/etc/bind/rndc.conf" ]
+                                       then
+                                               "${cache_util}" -c "/etc/bind/rndc.conf" reload >/dev/null 2>&1
+                                               cache_rc="${?}"
+                                       else
+                                               "/etc/init.d/${adb_dns}" restart >/dev/null 2>&1
                                        fi
                                ;;
                        esac
-                       adb_rc=0
-                       break
+               else
+                       "/etc/init.d/${adb_dns}" restart >/dev/null 2>&1
                fi
-               cnt=$((cnt+1))
-               sleep 1
-       done
-       f_log "debug" "f_dnsup  ::: cache_util: ${cache_util:-"-"}, cache_rc: ${cache_rc:-"-"}, cache_flush: ${adb_dnsflush}, cache_cnt: ${cnt}, rc: ${adb_rc}"
-       return ${adb_rc}
+
+               while [ "${cnt}" -le 10 ]
+               do
+                       dns_service="$(ubus -S call service list "{\"name\":\"${adb_dns}\"}")"
+                       dns_up="$(printf "%s" "${dns_service}" | jsonfilter -l1 -e "@[\"${adb_dns}\"].instances.*.running")"
+                       dns_pid="$(printf "%s" "${dns_service}" | jsonfilter -l1 -e "@[\"${adb_dns}\"].instances.*.pid")"
+                       dns_procfile="$(ls -l "/proc/${dns_pid}/fd" 2>/dev/null | grep -Fo "${adb_dnsdir}/${adb_dnsfile}")"
+                       if [ "${dns_up}" = "true" ] && [ -n "${dns_pid}" ] && [ -z "${dns_procfile}" ]
+                       then
+                               case "${adb_dns}" in
+                                       "unbound")
+                                               cache_util="$(command -v unbound-control)"
+                                               if [ -x "${cache_util}" ] && [ -d "${adb_tmpdir}" ] && [ -s "${adb_tmpdir}/adb_cache.dump" ]
+                                               then
+                                                       while [ "${cnt}" -le 10 ]
+                                                       do
+                                                               "${cache_util}" -c "${adb_dnsdir}/unbound.conf" load_cache < "${adb_tmpdir}/adb_cache.dump" >/dev/null 2>&1
+                                                               cache_rc="${?}"
+                                                               if [ "${cache_rc}" -eq 0 ]
+                                                               then
+                                                                       break
+                                                               fi
+                                                               cnt=$((cnt+1))
+                                                               sleep 1
+                                                       done
+                                               fi
+                                       ;;
+                               esac
+                               out_rc=0
+                               sleep 1
+                               break
+                       fi
+                       cnt=$((cnt+1))
+                       sleep 1
+               done
+       fi
+       f_log "debug" "f_dnsup  ::: inotify: ${adb_dnsinotify}, cache_util: ${cache_util:-"-"}, cache_flush: ${adb_dnsflush}, cache_rc: ${cache_rc:-0}, dns_cnt: ${cnt}, in_rc: ${in_rc}, out_rc: ${out_rc}"
+       return "${out_rc}"
 }
 
 # backup/restore/remove blocklists
 #
 f_list()
 {
-       local file mode="${1}" in_rc="${adb_rc}"
+       local hold file name out_rc mode="${1}" in_rc="${src_rc:-0}" cnt=1
 
        case "${mode}" in
-               backup)
-                       if [ -d "${adb_backupdir}" ]
+               "blacklist"|"whitelist")
+                       if [ "${mode}" = "blacklist" ] && [ -s "${adb_blacklist}" ]
+                       then
+                               adb_blacklist_rset="/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}"
+                               awk "${adb_blacklist_rset}" "${adb_blacklist}" > "${adb_tmpfile}.${mode}"
+                               out_rc="${?}"
+                       elif [ "${mode}" = "whitelist" ] && [ -s "${adb_whitelist}" ]
                        then
-                               gzip -cf "${adb_tmpfile}" 2>/dev/null > "${adb_backupdir}/${adb_dnsprefix}.${src_name}.gz"
-                               adb_rc=${?}
+                               adb_whitelist_rset="/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}"
+                               awk "${adb_whitelist_rset}" "${adb_whitelist}" > "${adb_tmpdir}/tmp.raw.${mode}"
+                               out_rc="${?}"
+                               if [ "${out_rc}" -eq 0 ]
+                               then
+                                       adb_whitelist_rset="/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{gsub(\"\\\\.\",\"\\\\.\",\$1);print tolower(\"^\"\$1\"\\\\|\\\\.\"\$1)}"
+                                       awk "${adb_whitelist_rset}" "${adb_tmpdir}/tmp.raw.${mode}" > "${adb_tmpdir}/tmp.rem.${mode}"
+                                       out_rc="${?}"
+                                       if [ "${out_rc}" -eq 0 ] && [ -n "${adb_dnsallow}" ]
+                                       then
+                                               eval "${adb_dnsallow}" "${adb_tmpdir}/tmp.raw.${mode}" > "${adb_tmpdir}/tmp.add.${mode}"
+                                               out_rc="${?}"
+                                       fi
+                               fi
                        fi
                ;;
-               restore)
-                       if [ -d "${adb_backupdir}" ] && [ -f "${adb_backupdir}/${adb_dnsprefix}.${src_name}.gz" ]
+               "backup")
+                       gzip -cf "${src_tmpfile}" 2>/dev/null > "${adb_backupdir}/${adb_dnsprefix}.${src_name}.gz"
+                       out_rc="${?}"
+               ;;
+               "restore")
+                       if [ -n "${src_name}" ] && [ -s "${adb_backupdir}/${adb_dnsprefix}.${src_name}.gz" ]
                        then
-                               gunzip -cf "${adb_backupdir}/${adb_dnsprefix}.${src_name}.gz" 2>/dev/null > "${adb_tmpfile}"
-                               adb_rc=${?}
+                               zcat "${adb_backupdir}/${adb_dnsprefix}.${src_name}.gz" 2>/dev/null > "${src_tmpfile}"
+                               out_rc="${?}"
+                       elif [ -z "${src_name}" ]
+                       then
+                               for file in "${adb_backupdir}/${adb_dnsprefix}".*.gz
+                               do
+                                       name="${file##*/}"
+                                       name="${name%.*}"
+                                       zcat "${file}" 2>/dev/null > "${adb_tmpfile}.${name}" &
+                                       hold=$((cnt%adb_maxqueue))
+                                       if [ "${hold}" -eq 0 ]
+                                       then
+                                               wait
+                                       fi
+                                       cnt=$((cnt+1))
+                               done
+                               wait
+                               out_rc="${?}"
                        fi
                ;;
-               remove)
-                       if [ -d "${adb_backupdir}" ]
+               "remove")
+                       if [ -f "${adb_backupdir}/${adb_dnsprefix}.${src_name}.gz" ]
                        then
                                rm -f "${adb_backupdir}/${adb_dnsprefix}.${src_name}.gz"
+                               out_rc="${?}"
                        fi
-                       adb_rc=${?}
                ;;
-               merge)
+               "merge")
+                       > "${adb_tmpdir}/${adb_dnsfile}"
                        for file in "${adb_tmpfile}".*
                        do
                                cat "${file}" 2>/dev/null >> "${adb_tmpdir}/${adb_dnsfile}"
-                               if [ ${?} -ne 0 ]
+                               out_rc="${?}"
+                               if [ "${out_rc}" -ne 0 ]
                                then
-                                       adb_rc=${?}
                                        break
                                fi
-                               rm -f "${file}"
                        done
-                       adb_tmpfile="${adb_tmpdir}/${adb_dnsfile}"
+                       rm -f "${adb_tmpfile}".*
                ;;
-               final)
+               "final")
                        > "${adb_dnsdir}/${adb_dnsfile}"
-
-                       if [ -s "${adb_tmpdir}/tmp.add_whitelist" ]
+                       if [ -s "${adb_tmpdir}/tmp.add.whitelist" ]
                        then
-                               cat "${adb_tmpdir}/tmp.add_whitelist" >> "${adb_dnsdir}/${adb_dnsfile}"
+                               cat "${adb_tmpdir}/tmp.add.whitelist" >> "${adb_dnsdir}/${adb_dnsfile}"
                        fi
-
-                       if [ -s "${adb_tmpdir}/tmp.rem_whitelist" ]
+                       if [ -s "${adb_tmpdir}/tmp.rem.whitelist" ]
                        then
-                               grep -vf "${adb_tmpdir}/tmp.rem_whitelist" "${adb_tmpdir}/${adb_dnsfile}" | eval "${adb_dnsdeny}" >> "${adb_dnsdir}/${adb_dnsfile}"
+                               grep -vf "${adb_tmpdir}/tmp.rem.whitelist" "${adb_tmpdir}/${adb_dnsfile}" | eval "${adb_dnsdeny}" >> "${adb_dnsdir}/${adb_dnsfile}"
                        else
                                eval "${adb_dnsdeny}" "${adb_tmpdir}/${adb_dnsfile}" >> "${adb_dnsdir}/${adb_dnsfile}"
                        fi
-
-                       if [ ${?} -eq 0 ] && [ -n "${adb_dnsheader}" ]
+                       if [ -n "${adb_dnsheader}" ]
                        then
-                               printf '%s\n' "${adb_dnsheader}" | cat - "${adb_dnsdir}/${adb_dnsfile}" > "${adb_tmpdir}/${adb_dnsfile}"
+                               printf "%s\\n" "${adb_dnsheader}" | cat - "${adb_dnsdir}/${adb_dnsfile}" > "${adb_tmpdir}/${adb_dnsfile}"
                                mv -f "${adb_tmpdir}/${adb_dnsfile}" "${adb_dnsdir}/${adb_dnsfile}"
                        fi
-                       adb_rc=${?}
+                       out_rc="${?}"
                ;;
        esac
        f_count "${mode}"
-       f_log "debug" "f_list   ::: name: ${src_name:-"-"}, mode: ${mode}, cnt: ${adb_cnt}, in_rc: ${in_rc}, out_rc: ${adb_rc}"
+       out_rc="${out_rc:-"${in_rc}"}"
+       f_log "debug" "f_list   ::: name: ${src_name:-"-"}, mode: ${mode}, cnt: ${adb_cnt}, in_rc: ${in_rc}, out_rc: ${out_rc}"
+       return "${out_rc}"
 }
 
 # top level domain compression
 #
 f_tld()
 {
-       local cnt cnt_srt cnt_tld source="${1}" temp_src="${1}.src.gz" temp_tld="${1}.tld" tld_ok="false"
+       local cnt cnt_srt cnt_tld source="${1}" temp_tld="${1}.tld" tld_ok="false"
 
-       gzip -cf "${source}" 2>/dev/null > "${temp_src}"
-       if [ ${?} -eq 0 ]
-       then    
-               cnt="$(wc -l 2>/dev/null < "${source}")"
+       cnt="${adb_cnt}"
+       if [ "${adb_dnsvariant% *}" != "null" ] && [ "${adb_cnt}" -le "${adb_maxtld}" ]
+       then
                awk 'BEGIN{FS="."}{for(f=NF;f>1;f--)printf "%s.",$f;print $1}' "${source}" > "${temp_tld}"
-               if [ ${?} -eq 0 ]
+               if [ "${?}" -eq 0 ]
                then
                        sort -u "${temp_tld}" > "${source}"
-                       if [ ${?} -eq 0 ]
+                       if [ "${?}" -eq 0 ]
                        then
                                cnt_srt="$(wc -l 2>/dev/null < "${source}")"
                                awk '{if(NR==1){tld=$NF};while(getline){if($NF!~tld"\\."){print tld;tld=$NF}}print tld}' "${source}" > "${temp_tld}"
-                               if [ ${?} -eq 0 ]
+                               if [ "${?}" -eq 0 ]
                                then
                                        awk 'BEGIN{FS="."}{for(f=NF;f>1;f--)printf "%s.",$f;print $1}' "${temp_tld}" > "${source}"
-                                       if [ ${?} -eq 0 ]
+                                       if [ "${?}" -eq 0 ]
                                        then
-                                               rm -f "${temp_src}" "${temp_tld}"
+                                               rm -f "${temp_tld}"
                                                cnt_tld="$(wc -l 2>/dev/null < "${source}")"
                                                tld_ok="true"
                                        fi
                                fi
                        fi
                fi
-       fi
-
-       if [ "${tld_ok}" = "false" ]
-       then
-               rm -f "${temp_tld}"
-               gunzip -cf "${temp_src}" 2>/dev/null > "${source}"
-               if [ ${?} -ne 0 ]
+       else
+               sort -u "${source}" > "${temp_tld}"
+               if [ "${?}" -eq 0 ]
                then
-                       rm -f "${temp_src}"
-                       > "${source}"
+                       mv -f "${temp_tld}" "${source}"
+                       cnt_srt="$(wc -l 2>/dev/null < "${source}")"
+                       tld_ok="true"
                fi
        fi
-       f_log "debug" "f_tld    ::: source: ${source}, cnt: ${cnt:-"-"}, cnt_srt: ${cnt_srt:-"-"}, cnt_tld: ${cnt_tld:-"-"}, tld_ok: ${tld_ok}"
-}
-
-# blocklist hash compare
-#
-f_hash()
-{
-       local hash hash_rc=1
-
-       if [ -x "${adb_hashutil}" ] && [ -f "${adb_dnsdir}/${adb_dnsfile}" ]
+       if [ "${tld_ok}" = "false" ]
        then
-               hash="$(${adb_hashutil} "${adb_dnsdir}/${adb_dnsfile}" 2>/dev/null | awk '{print $1}')"
-               if [ -z "${adb_hashold}" ] && [ -n "${hash}" ]
-               then
-                       adb_hashold="${hash}"
-               elif [ -z "${adb_hashnew}" ] && [ -n "${hash}" ]
-               then
-                       adb_hashnew="${hash}"
-               fi
-               if [ -n "${adb_hashold}" ] && [ -n "${adb_hashnew}" ]
-               then
-                       if [ "${adb_hashold}" = "${adb_hashnew}" ]
-                       then
-                               hash_rc=0
-                       fi
-                       adb_hashold=""
-                       adb_hashnew=""
-               fi
+               unset cnt_srt cnt_tld
+               rm -f "${temp_tld}" "${source}"
+               f_list blacklist
+               f_list whitelist
+               f_list restore
+               f_list merge
+               f_list final
+               cnt="${adb_cnt}"
        fi
-       f_log "debug" "f_hash   ::: hash_util: ${adb_hashutil}, hash: ${hash}, out_rc: ${hash_rc}"
-       return ${hash_rc}
+       f_log "debug" "f_tld    ::: source: ${source}, max_tld: ${adb_maxtld}, cnt: ${cnt:-"-"}, cnt_srt: ${cnt_srt:-"-"}, cnt_tld: ${cnt_tld:-"-"}, tld_ok: ${tld_ok}"
 }
 
 # suspend/resume adblock processing
 #
 f_switch()
 {
-       local status cnt mode="${1}"
+       local status done="false" mode="${1}"
 
        json_load_file "${adb_rtfile}" >/dev/null 2>&1
-       json_select "data"
+       json_select "data" >/dev/null 2>&1
        json_get_var status "adblock_status"
-       json_get_var cnt "overall_domains"
-
        if [ "${mode}" = "suspend" ] && [ "${status}" = "enabled" ]
        then
-               if [ ${cnt%% *} -gt 0 ] && [ -s "${adb_dnsdir}/${adb_dnsfile}" ]
-               then
-                       f_hash
-                       cat "${adb_dnsdir}/${adb_dnsfile}" > "${adb_dnsdir}/.${adb_dnsfile}"
-                       printf '%s\n' "${adb_dnsheader}" > "${adb_dnsdir}/${adb_dnsfile}"
-                       f_hash
-               fi
+               f_jsnup "running"
+               f_temp
+               printf "%s\\n" "${adb_dnsheader}" > "${adb_dnsdir}/${adb_dnsfile}"
+               f_count
+               done="true"
        elif [ "${mode}" = "resume" ] && [ "${status}" = "paused" ]
        then
-               if [ ${cnt%% *} -gt 0 ] && [ -s "${adb_dnsdir}/.${adb_dnsfile}" ]
-               then
-                       f_hash
-                       cat "${adb_dnsdir}/.${adb_dnsfile}" > "${adb_dnsdir}/${adb_dnsfile}"
-                       > "${adb_dnsdir}/.${adb_dnsfile}"
-                       f_hash
-               fi
+               f_jsnup "running"
+               f_temp
+               f_list blacklist
+               f_list whitelist
+               f_list restore
+               f_list merge
+               f_tld "${adb_tmpdir}/${adb_dnsfile}"
+               f_list final
+               done="true"
        fi
-       if [ ${?} -eq 1 ]
+       if [ "${done}" = "true" ]
        then
-               f_temp
+               if [ "${mode}" = "suspend" ]
+               then
+                       f_bgserv "stop"
+               fi
                f_dnsup
+               if [ "${mode}" = "resume" ]
+               then
+                       f_bgserv "start"
+               fi
                f_jsnup "${mode}"
                f_log "info" "${mode} adblock processing"
                f_rmtemp
-               exit 0
        fi
 }
 
@@ -687,54 +784,65 @@ f_query()
 
        if [ -z "${domain}" ] || [ "${domain}" = "${tld}" ]
        then
-               printf '%s\n' "::: invalid domain input, please submit a single domain, e.g. 'doubleclick.net'"
+               printf "%s\\n" "::: invalid domain input, please submit a single domain, e.g. 'doubleclick.net'"
        else
                case "${adb_dns}" in
-                       dnsmasq)
-                               prefix=".*[\/\.]"
-                               suffix="(\/)"
-                               field=2
+                       "dnsmasq")
+                               if [ "${adb_dnsvariant}" = "nxdomain" ]
+                               then
+                                       prefix=".*[\\/\\.]"
+                                       suffix="(\\/)"
+                                       field=2
+                               elif [ "${adb_dnsvariant% *}" = "null" ]
+                               then
+                                       prefix="0\\..*[\\t\\.]"
+                                       suffix=""
+                                       field=2
+                               fi
                        ;;
-                       unbound)
-                               prefix=".*[\"\.]"
+                       "unbound")
+                               prefix=".*[\"\\.]"
                                suffix="(static)"
                                field=3
                        ;;
-                       named)
-                               prefix="[^\*].*[\.]"
-                               suffix="( \.)"
-                               field=1
-                       ;;
-                       kresd)
-                               prefix="[^\*].*[\.]"
-                               suffix="( \.)"
+                       "named")
+                               prefix="[^\\*].*[\\.]"
+                               suffix="( \\.)"
                                field=1
                        ;;
-                       dnscrypt-proxy)
-                               prefix=".*[\.]"
-                               suffix=""
+                       "kresd")
+                               prefix="[^\\*].*[\\.]"
+                               suffix="( \\.)"
                                field=1
                        ;;
                esac
-               while [ "${domain}" != "${tld}" ]
-               do
-                       search="${domain//./\\.}"
-                       search="${search//[+*~%\$&\"\']/}"
-                       result="$(awk -F '/|\"| ' "/^(${search}|${prefix}+${search}.*${suffix}$)/{i++;{printf(\"  + %s\n\",\$${field})};if(i>9){printf(\"  + %s\n\",\"[...]\");exit}}" "${adb_dnsdir}/${adb_dnsfile}")"
-                       printf '%s\n%s\n%s\n' ":::" "::: results for domain '${domain}'" ":::"
-                       printf '%s\n' "${result:-"  - no match"}"
-                       domain="${tld}"
-                       tld="${domain#*.}"
-               done
-
-               if [ ${adb_backup} -eq 1 ] && [ -d "${adb_backupdir}" ]
+               if [ "${adb_dnsfilereset}" = "false" ]
                then
-                       search="${1//./\\.}"
-                       search="${search//[+*~%\$&\"\']/}"
-                       printf '%s\n%s\n%s\n' ":::" "::: results for domain '${1}' in backups" ":::"
-                       for file in ${adb_backupdir}/${adb_dnsprefix}.*.gz
+                       while [ "${domain}" != "${tld}" ]
                        do
-                               zcat "${file}" 2>/dev/null | awk -v f="${file##*/}" "/^($search|.*\.${search})/{i++;{printf(\"  + %-30s%s\n\",f,\$1)};if(i>=3){printf(\"  + %-30s%s\n\",f,\"[...]\");exit}}"
+                               search="${domain//[+*~%\$&\"\']/}"
+                               search="${search//./\\.}"
+                               result="$(awk -F '/|\"|\t| ' "/^(${search}|${prefix}+${search}.*${suffix}$)/{i++;{printf(\"  + %s\\n\",\$${field})};if(i>9){printf(\"  + %s\\n\",\"[...]\");exit}}" "${adb_dnsdir}/${adb_dnsfile}")"
+                               printf "%s\\n%s\\n%s\\n" ":::" "::: results for domain '${domain}' in active blocklist" ":::"
+                               printf "%s\\n\\n" "${result:-"  - no match"}"
+                               domain="${tld}"
+                               tld="${domain#*.}"
+                       done
+               fi
+               if [ -d "${adb_backupdir}" ]
+               then
+                       search="${1//[+*~%\$&\"\']/}"
+                       search="${search//./\\.}"
+                       printf "%s\\n%s\\n%s\\n" ":::" "::: results for domain '${1}' in backups and black-/whitelist" ":::"
+                       for file in "${adb_backupdir}/${adb_dnsprefix}".*.gz "${adb_blacklist}" "${adb_whitelist}"
+                       do
+                               suffix="${file##*.}"
+                               if [ "${suffix}" = "gz" ]
+                               then
+                                       zcat "${file}" 2>/dev/null | awk -v f="${file##*/}" "/^($search|.*\\.${search})/{i++;{printf(\"  + %-30s%s\\n\",f,\$1)};if(i>=3){printf(\"  + %-30s%s\\n\",f,\"[...]\");exit}}"
+                               else
+                                       awk -v f="${file##*/}" "/^($search|.*\\.${search})/{i++;{printf(\"  + %-30s%s\\n\",f,\$1)};if(i>=3){printf(\"  + %-30s%s\\n\",f,\"[...]\");exit}}" "${file}"
+                               fi
                        done
                fi
        fi
@@ -744,33 +852,22 @@ f_query()
 #
 f_jsnup()
 {
-       local run_time bg_pid status="${1:-"enabled"}" mode="normal mode"
-
-       if [ ${adb_rc} -gt 0 ]
-       then
-               status="error"
-               run_time="$(/bin/date "+%d.%m.%Y %H:%M:%S")"
-       fi
-       if [ "${status}" = "enabled" ]
-       then
-               run_time="$(/bin/date "+%d.%m.%Y %H:%M:%S")"
-       fi
-       if [ "${status}" = "suspend" ]
-       then
-               status="paused"
-       fi
-       if [ "${status}" = "resume" ]
-       then
-               status=""
-       fi
-       if [ ${adb_backup_mode} -eq 1 ]
-       then
-               mode="backup mode"
-       fi
+       local run_time bg_pid status="${1:-"enabled"}"
 
+       case "${status}" in
+               "enabled"|"error")
+                       run_time="$(/bin/date "+%d.%m.%Y %H:%M:%S")"
+               ;;
+               "suspend")
+                       status="paused"
+               ;;
+               "resume")
+                       status=""
+               ;;
+       esac
        json_load_file "${adb_rtfile}" >/dev/null 2>&1
        json_select "data" >/dev/null 2>&1
-       if [ ${?} -eq 0 ]
+       if [ "${?}" -eq 0 ]
        then
                if [ -z "${adb_fetchinfo}" ]
                then
@@ -786,28 +883,29 @@ f_jsnup()
                        json_get_var run_time "last_rundate"
                fi
        fi
-
        > "${adb_rtfile}"
        json_load_file "${adb_rtfile}" >/dev/null 2>&1
        json_init
        json_add_object "data"
        json_add_string "adblock_status" "${status:-"enabled"}"
        json_add_string "adblock_version" "${adb_ver}"
-       json_add_string "overall_domains" "${adb_cnt:-0} (${mode})"
+       json_add_string "overall_domains" "${adb_cnt:-0}"
        json_add_string "fetch_utility" "${adb_fetchinfo:-"-"}"
-       json_add_string "dns_backend" "${adb_dns} (${adb_dnsdir})"
+       json_add_string "dns_backend" "${adb_dns}, ${adb_dnsdir}"
+       json_add_string "dns_variant" "${adb_dnsvariant}, ${adb_dnsfilereset:-"false"}"
+       json_add_string "backup_dir" "${adb_backupdir}"
        json_add_string "last_rundate" "${run_time:-"-"}"
        json_add_string "system_release" "${adb_sysver}"
        json_close_object
        json_dump > "${adb_rtfile}"
 
-       if [ ${adb_notify} -eq 1 ] && [ -x /etc/adblock/adblock.notify ] && \
-               ([ "${status}" = "error" ] || ([ "${status}" = "enabled" ] && [ ${adb_cnt} -le ${adb_notifycnt} ]))
+       if [ "${adb_mail}" -eq 1 ] && [ -x "${adb_mailservice}" ] && \
+               { [ "${status}" = "error" ] || { [ "${status}" = "enabled" ] && [ "${adb_cnt}" -le "${adb_mcnt}" ]; } }
        then
-               (/etc/adblock/adblock.notify >/dev/null 2>&1)&
-               bg_pid=${!}
+               ("${adb_mailservice}" "${adb_ver}" >/dev/null 2>&1)&
+               bg_pid="${!}"
        fi
-       f_log "debug" "f_jsnup  ::: status: ${status:-"-"}, mode: ${mode}, cnt: ${adb_cnt}, notify: ${adb_notify}, notify_cnt: ${adb_notifycnt}, notify_pid: ${bg_pid:-"-"}"
+       f_log "debug" "f_jsnup  ::: status: ${status:-"-"}, cnt: ${adb_cnt}, mail: ${adb_mail}, mail_service: ${adb_mailservice}, mail_cnt: ${adb_mcnt}, mail_pid: ${bg_pid:-"-"}"
 }
 
 # write to syslog
@@ -816,80 +914,66 @@ f_log()
 {
        local class="${1}" log_msg="${2}"
 
-       if [ -n "${log_msg}" ] && ([ "${class}" != "debug" ] || [ ${adb_debug} -eq 1 ])
+       if [ -n "${log_msg}" ] && { [ "${class}" != "debug" ] || [ "${adb_debug}" -eq 1 ]; }
        then
                logger -p "${class}" -t "adblock-${adb_ver}[${$}]" "${log_msg}"
                if [ "${class}" = "err" ]
                then
                        f_rmdns
-                       f_jsnup
+                       f_bgserv "stop"
+                       f_jsnup "error"
                        logger -p "${class}" -t "adblock-${adb_ver}[${$}]" "Please also check 'https://github.com/openwrt/packages/blob/master/net/adblock/files/README.md'"
                        exit 1
                fi
        fi
 }
 
-# main function for blocklist processing
+# start ubus monitor service to trace dns backend events
 #
-f_main()
+f_bgserv()
 {
-       local tmp_load tmp_file src_name src_rset src_url src_log src_arc src_cat cat list entry suffix mem_total mem_free enabled cnt=1
+       local bg_pid status="${1}"
 
-       mem_total="$(awk '/^MemTotal/ {print int($2/1000)}' "/proc/meminfo" 2>/dev/null)"
-       mem_free="$(awk '/^MemFree/ {print int($2/1000)}' "/proc/meminfo" 2>/dev/null)"
-       tmp_load="${adb_tmpload}"
-       tmp_file="${adb_tmpfile}"
-       > "${adb_dnsdir}/.${adb_dnsfile}"
-       > "${adb_tmpdir}/tmp.raw_whitelist"
-       > "${adb_tmpdir}/tmp.add_whitelist"
-       > "${adb_tmpdir}/tmp.rem_whitelist"
-       f_log "debug" "f_main   ::: dns: ${adb_dns}, fetch_util: ${adb_fetchinfo}, backup: ${adb_backup}, backup_mode: ${adb_backup_mode}, dns_jail: ${adb_jail}, force_dns: ${adb_forcedns}, mem_total: ${mem_total:-0}, mem_free: ${mem_free:-0}, max_queue: ${adb_maxqueue}"
-
-       # prepare whitelist entries
-       #
-       if [ -s "${adb_whitelist}" ]
+       bg_pid="$(pgrep -f "^/bin/sh ${adb_ubusservice}|^/bin/ubus -S -M r -m invoke monitor|^grep -qF \"method\":\"set\",\"data\":\\{\"name\":\"${adb_dns}\"" | awk '{ORS=" "; print $1}')"
+       if [ -z "${bg_pid}" ] && [ "${status}" = "start" ] \
+               && [ -x "${adb_ubusservice}" ] && [ "${adb_dnsfilereset}" = "true" ]
        then
-               adb_whitelist_rset="/^([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}"
-               awk "${adb_whitelist_rset}" "${adb_whitelist}" > "${adb_tmpdir}/tmp.raw_whitelist"
-               f_tld "${adb_tmpdir}/tmp.raw_whitelist"
-
-               adb_whitelist_rset="/^([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{gsub(\"\\\.\",\"\\\.\",\$1);print tolower(\"^\"\$1\"\\\|\\\.\"\$1)}"
-               awk "${adb_whitelist_rset}" "${adb_tmpdir}/tmp.raw_whitelist" > "${adb_tmpdir}/tmp.rem_whitelist"
-
-               if [ -n "${adb_dnsallow}" ]
-               then
-                       eval "${adb_dnsallow}" "${adb_tmpdir}/tmp.raw_whitelist" > "${adb_tmpdir}/tmp.add_whitelist"
-               fi
-       fi
-
-       # build 'dnsjail' list
-       #
-       if [ ${adb_jail} -eq 1 ]
+               ( "${adb_ubusservice}" "${adb_ver}" &)
+       elif [ -n "${bg_pid}" ] && [ "${status}" = "stop" ] 
        then
-               cat "${adb_tmpdir}/tmp.add_whitelist" > "/tmp/${adb_dnsjail}"
-               printf '%s\n' "${adb_dnshalt}" >> "/tmp/${adb_dnsjail}"
-               if [ -n "${adb_dnsheader}" ]
-               then
-                       printf '%s\n' "${adb_dnsheader}" | cat - "/tmp/${adb_dnsjail}" > "${adb_tmpdir}/tmp.dnsjail"
-                       cat "${adb_tmpdir}/tmp.dnsjail" > "/tmp/${adb_dnsjail}"
-               fi
+               kill -HUP "${bg_pid}" 2>/dev/null
        fi
+       f_log "debug" "f_bgserv ::: status: ${status:-"-"}, bg_pid: ${bg_pid:-"-"}, dns_filereset: ${adb_dnsfilereset:-"-"}, ubus_service: ${adb_ubusservice:-"-"}"
+}
+
+# main function for blocklist processing
+#
+f_main()
+{
+       local src_tmpload src_tmpfile src_name src_rset src_url src_log src_arc src_cat src_item src_rc list entry suffix mem_total mem_free enabled cnt=1
 
+       mem_total="$(awk '/^MemTotal/ {print int($2/1000)}' "/proc/meminfo" 2>/dev/null)"
+       mem_free="$(awk '/^MemFree/ {print int($2/1000)}' "/proc/meminfo" 2>/dev/null)"
+       f_log "debug" "f_main   ::: dns: ${adb_dns}, fetch_util: ${adb_fetchinfo}, force_dns: ${adb_forcedns}, mem_total: ${mem_total:-0}, mem_free: ${mem_free:-0}, max_queue: ${adb_maxqueue}"
+       
        # main loop
        #
+       f_list blacklist
+       f_list whitelist
        for src_name in ${adb_sources}
        do
-               enabled="$(eval printf '%s' \"\${enabled_${src_name}\}\")"
-               src_url="$(eval printf '%s' \"\${adb_src_${src_name}\}\")"
-               src_rset="$(eval printf '%s' \"\${adb_src_rset_${src_name}\}\")"
-               src_cat="$(eval printf '%s' \"\${adb_src_cat_${src_name}\}\")"
-               adb_tmpload="${tmp_load}.${src_name}"
-               adb_tmpfile="${tmp_file}.${src_name}"
+               enabled="$(eval printf "%s" \"\$\{enabled_${src_name}\}\")"
+               src_url="$(eval printf "%s" \"\$\{adb_src_${src_name}\}\")"
+               src_rset="$(eval printf "%s" \"\$\{adb_src_rset_${src_name}\}\")"
+               src_cat="$(eval printf "%s" \"\$\{adb_src_cat_${src_name}\}\")"
+               src_tmpload="${adb_tmpload}.${src_name}"
+               src_tmpfile="${adb_tmpfile}.${src_name}"
+               src_rc=4
 
                # basic pre-checks
                #
                f_log "debug" "f_main   ::: name: ${src_name}, enabled: ${enabled}"
-               if [ "${enabled}" != "1" ] || [ -z "${src_url}" ] || [ -z "${src_rset}" ]
+               if [ "${enabled}" != "1" ] || [ -f "${src_url}" ] || [ -z "${src_url}" ] || [ -z "${src_rset}" ]
                then
                        f_list remove
                        continue
@@ -897,10 +981,10 @@ f_main()
 
                # backup mode
                #
-               if [ ${adb_backup_mode} -eq 1 ] && [ "${adb_action}" = "start" ] && [ "${src_name}" != "blacklist" ]
+               if [ "${adb_action}" = "start" ]
                then
                        f_list restore
-                       if [ ${adb_rc} -eq 0 ] && [ -s "${adb_tmpfile}" ]
+                       if [ "${?}" -eq 0 ] && [ -s "${src_tmpfile}" ]
                        then
                                continue
                        fi
@@ -908,128 +992,93 @@ f_main()
 
                # download queue processing
                #
-               if [ "${src_name}" = "blacklist" ]
-               then
-                       if [ -s "${src_url}" ]
-                       then
-                               (
-                                       src_log="$(cat "${src_url}" > "${adb_tmpload}" 2>&1)"
-                                       adb_rc=${?}
-                                       if [ ${adb_rc} -eq 0 ] && [ -s "${adb_tmpload}" ]
-                                       then
-                                               awk "${src_rset}" "${adb_tmpload}" 2>/dev/null > "${adb_tmpfile}"
-                                               adb_rc=${?}
-                                               if [ ${adb_rc} -eq 0 ] && [ -s "${adb_tmpfile}" ]
-                                               then
-                                                       rm -f "${adb_tmpload}"
-                                                       f_list download
-                                               fi
-                                       else
-                                               src_log="$(printf '%s' "${src_log}" | awk '{ORS=" ";print $0}')"
-                                               f_log "debug" "f_main   ::: name: ${src_name}, url: ${src_url}, rc: ${adb_rc}, log: ${src_log:-"-"}"
-                                       fi
-                               ) &
-                       else
-                               continue
-                       fi
-               elif [ -n "${src_cat}" ]
+               if [ -n "${src_cat}" ]
                then
                        (
                                src_arc="${adb_tmpdir}/${src_url##*/}"
                                src_log="$("${adb_fetchutil}" ${adb_fetchparm} "${src_arc}" "${src_url}" 2>&1)"
-                               adb_rc=${?}
-                               if [ ${adb_rc} -eq 0 ] && [ -s "${src_arc}" ]
+                               src_rc="${?}"
+                               if [ "${src_rc}" -eq 0 ] && [ -s "${src_arc}" ]
                                then
                                        list="$(tar -tzf "${src_arc}")"
-                                       suffix="$(eval printf '%s' \"\${adb_src_suffix_${src_name}:-\"domains\"\}\")"
-                                       for cat in ${src_cat}
+                                       suffix="$(eval printf "%s" \"\$\{adb_src_suffix_${src_name}:-\"domains\"\}\")"
+                                       for src_item in ${src_cat}
                                        do
-                                               entry="$(printf '%s' "${list}" | grep -E "[\^/]+${cat}/${suffix}")"
+                                               entry="$(printf "%s" "${list}" | grep -E "[\\^/]+${src_item}/${suffix}")"
                                                if [ -n "${entry}" ]
                                                then
-                                                       tar -xOzf "${src_arc}" "${entry}" >> "${adb_tmpload}"
-                                                       adb_rc=${?}
-                                                       if [ ${adb_rc} -ne 0 ]
+                                                       tar -xOzf "${src_arc}" "${entry}" >> "${src_tmpload}"
+                                                       src_rc="${?}"
+                                                       if [ "${src_rc}" -ne 0 ]
                                                        then
                                                                break
                                                        fi
                                                fi
                                        done
                                else
-                                       src_log="$(printf '%s' "${src_log}" | awk '{ORS=" ";print $0}')"
-                                       f_log "debug" "f_main   ::: name: ${src_name}, url: ${src_url}, rc: ${adb_rc}, log: ${src_log:-"-"}"
+                                       src_log="$(printf "%s" "${src_log}" | awk '{ORS=" ";print $0}')"
+                                       f_log "debug" "f_main   ::: name: ${src_name}, url: ${src_url}, rc: ${src_rc}, log: ${src_log:-"-"}"
                                fi
-                               if [ ${adb_rc} -eq 0 ] && [ -s "${adb_tmpload}" ]
+                               if [ "${src_rc}" -eq 0 ] && [ -s "${src_tmpload}" ]
                                then
                                        rm -f "${src_arc}"
-                                       awk "${src_rset}" "${adb_tmpload}" 2>/dev/null > "${adb_tmpfile}"
-                                       adb_rc=${?}
-                                       if [ ${adb_rc} -eq 0 ] && [ -s "${adb_tmpfile}" ]
+                                       awk "${src_rset}" "${src_tmpload}" 2>/dev/null > "${src_tmpfile}"
+                                       src_rc="${?}"
+                                       if [ "${src_rc}" -eq 0 ] && [ -s "${src_tmpfile}" ]
                                        then
-                                               rm -f "${adb_tmpload}"
+                                               rm -f "${src_tmpload}"
                                                f_list download
-                                               if [ ${adb_backup} -eq 1 ]
-                                               then
-                                                       f_list backup
-                                               fi
-                                       elif [ ${adb_backup} -eq 1 ]
+                                               f_list backup
+                                       elif [ "${adb_action}" != "start" ]
                                        then
                                                f_list restore
                                        fi
-                               elif [ ${adb_backup} -eq 1 ]
+                               elif [ "${adb_action}" != "start" ]
                                then
                                        f_list restore
                                fi
-                       ) &
+                       )&
                else
                        (
-                               src_log="$("${adb_fetchutil}" ${adb_fetchparm} "${adb_tmpload}" "${src_url}" 2>&1)"
-                               adb_rc=${?}
-                               if [ ${adb_rc} -eq 0 ] && [ -s "${adb_tmpload}" ]
+                               src_log="$("${adb_fetchutil}" ${adb_fetchparm} "${src_tmpload}" "${src_url}" 2>&1)"
+                               src_rc="${?}"
+                               if [ "${src_rc}" -eq 0 ] && [ -s "${src_tmpload}" ]
                                then
-                                       awk "${src_rset}" "${adb_tmpload}" 2>/dev/null > "${adb_tmpfile}"
-                                       adb_rc=${?}
-                                       if [ ${adb_rc} -eq 0 ] && [ -s "${adb_tmpfile}" ]
+                                       awk "${src_rset}" "${src_tmpload}" 2>/dev/null > "${src_tmpfile}"
+                                       src_rc="${?}"
+                                       if [ "${src_rc}" -eq 0 ] && [ -s "${src_tmpfile}" ]
                                        then
-                                               rm -f "${adb_tmpload}"
+                                               rm -f "${src_tmpload}"
                                                f_list download
-                                               if [ ${adb_backup} -eq 1 ]
-                                               then
-                                                       f_list backup
-                                               fi
-                                       elif [ ${adb_backup} -eq 1 ]
+                                               f_list backup
+                                       elif [ "${adb_action}" != "start" ]
                                        then
                                                f_list restore
                                        fi
                                else
-                                       src_log="$(printf '%s' "${src_log}" | awk '{ORS=" ";print $0}')"
-                                       f_log "debug" "f_main   ::: name: ${src_name}, url: ${src_url}, rc: ${adb_rc}, log: ${src_log:-"-"}"
-                                       if [ ${adb_backup} -eq 1 ]
+                                       src_log="$(printf "%s" "${src_log}" | awk '{ORS=" ";print $0}')"
+                                       f_log "debug" "f_main   ::: name: ${src_name}, url: ${src_url}, rc: ${src_rc}, log: ${src_log:-"-"}"
+                                       if [ "${adb_action}" != "start" ]
                                        then
                                                f_list restore
                                        fi
                                fi
-                       ) &
+                       )&
                fi
-               hold=$(( cnt % adb_maxqueue ))
-               if [ ${hold} -eq 0 ]
+               hold=$((cnt%adb_maxqueue))
+               if [ "${hold}" -eq 0 ]
                then
                        wait
                fi
-               cnt=$(( cnt + 1 ))
+               cnt=$((cnt+1))
        done
-
-       # list merge
-       #
        wait
-       src_name="overall"
-       adb_tmpfile="${tmp_file}"
+       unset src_name
        f_list merge
 
-       # overall sort and conditional dns restart
+       # tld compression and dns restart
        #
-       f_hash
-       if [ -s "${adb_tmpdir}/${adb_dnsfile}" ]
+       if [ "${?}" -eq 0 ] && [ -s "${adb_tmpdir}/${adb_dnsfile}" ]
        then
                f_tld "${adb_tmpdir}/${adb_dnsfile}"
                f_list final
@@ -1037,45 +1086,47 @@ f_main()
                > "${adb_dnsdir}/${adb_dnsfile}"
        fi
        chown "${adb_dnsuser}" "${adb_dnsdir}/${adb_dnsfile}" 2>/dev/null
-       f_hash
-       if [ ${?} -eq 1 ]
-       then
-               f_dnsup
-       fi
-       f_jsnup
-       if [ ${?} -eq 0 ]
+       f_dnsup
+       if [ "${?}" -eq 0 ]
        then
-               f_log "info" "blocklist with overall ${adb_cnt} domains loaded successfully (${adb_sysver})"
+               f_jsnup "enabled"
+               if [ "${adb_dnsfilereset}" = "true" ]
+               then
+                       printf "%s\\n" "${adb_dnsheader}" > "${adb_dnsdir}/${adb_dnsfile}"
+                       f_log "info" "blocklist with overall ${adb_cnt} domains loaded successfully and reset afterwards (${adb_sysver})"
+                       f_bgserv "start"
+               else
+                       f_log "info" "blocklist with overall ${adb_cnt} domains loaded successfully (${adb_sysver})"
+               fi
        else
                f_log "err" "dns backend restart with active blocklist failed"
        fi
        f_rmtemp
-       exit ${adb_rc}
 }
 
 # trace dns queries via tcpdump and prepare a report
 #
 f_report()
 {
-       local bg_pid total blocked percent rep_clients rep_domains rep_blocked index hold ports cnt=0 search="${1}" count="${2}" filter="${3}" print="${4}"
+       local bg_pid status total blocked percent rep_clients rep_domains rep_blocked index hold ports cnt=0 search="${1}" count="${2}" filter="${3}" print="${4}"
 
-       if [ ${adb_report} -eq 1 ] && [ ! -x "${adb_reputil}" ]
+       if [ "${adb_report}" -eq 1 ] && [ ! -x "${adb_reputil}" ]
        then
                f_log "info" "Please install the package 'tcpdump' or 'tcpdump-mini' to use the adblock reporting feature!"
-       elif [ ${adb_report} -eq 0 ] && [ "${adb_action}" = "report" ]
+       elif [ "${adb_report}" -eq 0 ] && [ "${adb_action}" = "report" ]
        then
                f_log "info" "Please enable the extra option 'adb_report' to use the adblock reporting feature!"
        fi
 
        if [ -x "${adb_reputil}" ]
        then
-               bg_pid="$(pgrep -f "^${adb_reputil}.*adb_report\.pcap$" | awk '{ORS=" "; print $1}')"
-               if [ ${adb_report} -eq 0 ] || ([ -n "${bg_pid}" ] && ([ "${adb_action}" = "stop" ] || [ "${adb_action}" = "restart" ]))
+               bg_pid="$(pgrep -f "^${adb_reputil}.*adb_report\\.pcap$" | awk '{ORS=" "; print $1}')"
+               if [ "${adb_report}" -eq 0 ] || { [ -n "${bg_pid}" ] && { [ "${adb_action}" = "stop" ] || [ "${adb_action}" = "restart" ]; } }
                then
                        if [ -n "${bg_pid}" ]
                        then
-                               kill -HUP ${bg_pid}
-                               while $(kill -0 ${bg_pid} 2>/dev/null)
+                               kill -HUP "${bg_pid}" 2>/dev/null
+                               while $(kill -0 "${bg_pid}" 2>/dev/null)
                                do
                                        sleep 1
                                done
@@ -1084,7 +1135,7 @@ f_report()
                fi
        fi
 
-       if [ -x "${adb_reputil}" ] && [ ${adb_report} -eq 1 ]
+       if [ -x "${adb_reputil}" ] && [ "${adb_report}" -eq 1 ]
        then
                if [ -z "${bg_pid}" ] && [ "${adb_action}" != "report" ] && [ "${adb_action}" != "stop" ]
                then
@@ -1097,53 +1148,53 @@ f_report()
                                        ports="${ports} or port ${port}"
                                fi
                        done
-                       ("${adb_reputil}" -nn -s0 -l -i ${adb_repiface} ${ports} -C${adb_repchunksize} -W${adb_repchunkcnt} -w "${adb_repdir}/adb_report.pcap" >/dev/null 2>&1 &)
-                       bg_pid="$(pgrep -f "^${adb_reputil}.*adb_report\.pcap$" | awk '{ORS=" "; print $1}')"
+                       ( "${adb_reputil}" -nn -s0 -l -i ${adb_repiface} ${ports} -C${adb_repchunksize} -W${adb_repchunkcnt} -w "${adb_repdir}/adb_report.pcap" >/dev/null 2>&1 & )
+                       bg_pid="$(pgrep -f "^${adb_reputil}.*adb_report\\.pcap$" | awk '{ORS=" "; print $1}')"
                fi
 
                if [ "${adb_action}" = "report" ] && [ "${filter}" = "false" ]
                then
                        > "${adb_repdir}/adb_report.raw"
-                       for file in "${adb_repdir}"/adb_report.pcap*
+                       for file in "${adb_repdir}/adb_report.pcap"*
                        do
                                (
-                                       "${adb_reputil}" -tttt -r $file 2>/dev/null | \
-                                               awk -v cnt=${cnt} '!/\.lan\. /&&/ A[\? ]+|NXDomain/{a=$1;b=substr($2,0,8);c=$4;sub(/\.[0-9]+$/,"",c); \
-                                               d=cnt $7;e=$(NF-1);sub(/[0-9]\/[0-9]\/[0-9]/,"NX",e);sub(/\.$/,"",e);sub(/([0-9]{1,3}\.){3}[0-9]{1,3}/,"OK",e);printf("%s\t%s\t%s\t%s\t%s\n", a,b,c,d,e)}' >> "${adb_repdir}/adb_report.raw"
+                                       "${adb_reputil}" -tttt -r "${file}" 2>/dev/null | \
+                                               awk -v cnt="${cnt}" '!/\.lan\. /&&/ A[\? ]+|NXDomain|0\.0\.0\.0/{a=$1;b=substr($2,0,8);c=$4;sub(/\.[0-9]+$/,"",c);d=cnt $7;sub(/\*$/,"",d);
+                                               e=$(NF-1);sub(/[0-9]\/[0-9]\/[0-9]|0\.0\.0\.0/,"NX",e);sub(/\.$/,"",e);sub(/([0-9]{1,3}\.){3}[0-9]{1,3}/,"OK",e);printf("%s\t%s\t%s\t%s\t%s\n", a,b,c,d,e)}' >> "${adb_repdir}/adb_report.raw"
                                )&
-                               hold=$(( cnt % adb_maxqueue ))
-                               if [ ${hold} -eq 0 ]
+                               hold=$((cnt%adb_maxqueue))
+                               if [ "${hold}" -eq 0 ]
                                then
                                        wait
                                fi
-                               cnt=$(( cnt + 1 ))
+                               cnt=$((cnt+1))
                        done
                        wait
 
                        if [ -s "${adb_repdir}/adb_report.raw" ]
                        then
                                awk '{printf("%s\t%s\t%s\t%s\t%s\t%s\n", $4,$5,$1,$2,$3,$4)}' "${adb_repdir}/adb_report.raw" | \
-                                       sort -ur | uniq -uf2 | awk '{currA=($6+0);currB=$6;currC=substr($6,length($6),1); \
+                                       sort -ur | uniq -uf2 | awk '{currA=($6+0);currB=$6;currC=substr($6,length($6),1);
                                        if(reqA==currB){reqA=0;printf("%s\t%s\n",d,$2)}else if(currC=="+"){reqA=currA;d=$3"\t"$4"\t"$5"\t"$2}}' | sort -ur > "${adb_repdir}/adb_report"
                        fi
 
                        if [ -s "${adb_repdir}/adb_report" ]
                        then
-                               total="$(wc -l < ${adb_repdir}/adb_report)"
-                               blocked="$(awk '{if($5=="NX")print $4}' ${adb_repdir}/adb_report | wc -l)"
-                               percent="$(awk -v t=${total} -v b=${blocked} 'BEGIN{printf("%.2f %s\n",b/t*100, "%")}')"
-                               rep_clients="$(awk '{print $3}' ${adb_repdir}/adb_report | sort | uniq -c | sort -r | awk '{ORS=" ";if(NR<=10) printf("%s_%s ",$1,$2)}')"
-                               rep_domains="$(awk '{if($5!="NX")print $4}' ${adb_repdir}/adb_report | sort | uniq -c | sort -r | awk '{ORS=" ";if(NR<=10)printf("%s_%s ",$1,$2)}')"
-                               rep_blocked="$(awk '{if($5=="NX")print $4}' ${adb_repdir}/adb_report | sort | uniq -c | sort -r | awk '{ORS=" ";if(NR<=10)printf("%s_%s ",$1,$2)}')"
+                               total="$(wc -l < "${adb_repdir}/adb_report")"
+                               blocked="$(awk '{if($5=="NX")print $4}' "${adb_repdir}/adb_report" | wc -l)"
+                               percent="$(awk -v t="${total}" -v b="${blocked}" 'BEGIN{printf("%.2f %s\n",b/t*100, "%")}')"
+                               rep_clients="$(awk '{print $3}' "${adb_repdir}/adb_report" | sort | uniq -c | sort -r | awk '{ORS=" ";if(NR<=10) printf("%s_%s ",$1,$2)}')"
+                               rep_domains="$(awk '{if($5!="NX")print $4}' "${adb_repdir}/adb_report" | sort | uniq -c | sort -r | awk '{ORS=" ";if(NR<=10)printf("%s_%s ",$1,$2)}')"
+                               rep_blocked="$(awk '{if($5=="NX")print $4}' "${adb_repdir}/adb_report" | sort | uniq -c | sort -r | awk '{ORS=" ";if(NR<=10)printf("%s_%s ",$1,$2)}')"
 
                                > "${adb_repdir}/adb_report.json"
                                json_load_file "${adb_repdir}/adb_report.json" >/dev/null 2>&1
                                json_init
                                json_add_object "data"
-                               json_add_string "start_date" "$(awk 'END{printf("%s",$1)}' ${adb_repdir}/adb_report)"
-                               json_add_string "start_time" "$(awk 'END{printf("%s",$2)}' ${adb_repdir}/adb_report)"
-                               json_add_string "end_date" "$(awk 'NR==1{printf("%s",$1)}' ${adb_repdir}/adb_report)"
-                               json_add_string "end_time" "$(awk 'NR==1{printf("%s",$2)}' ${adb_repdir}/adb_report)"
+                               json_add_string "start_date" "$(awk 'END{printf("%s",$1)}' "${adb_repdir}/adb_report")"
+                               json_add_string "start_time" "$(awk 'END{printf("%s",$2)}' "${adb_repdir}/adb_report")"
+                               json_add_string "end_date" "$(awk 'NR==1{printf("%s",$1)}' "${adb_repdir}/adb_report")"
+                               json_add_string "end_time" "$(awk 'NR==1{printf("%s",$2)}' "${adb_repdir}/adb_report")"
                                json_add_string "total" "${total}"
                                json_add_string "blocked" "${blocked}"
                                json_add_string "percent" "${percent}"
@@ -1185,10 +1236,10 @@ f_report()
                        search="${search//./\\.}"
                        search="${search//[+*~%\$&\"\' ]/}"
                        > "${adb_repdir}/adb_report.final"
-                       awk "BEGIN{i=0}/(${search})/{i++;if(i<=${count}){printf \"%s\t%s\t%s\t%s\t%s\n\",\$1,\$2,\$3,\$4,\$5}}" "${adb_repdir}/adb_report" > "${adb_repdir}/adb_report.final"
+                       awk "BEGIN{i=0}/(${search})/{i++;if(i<=${count}){printf \"%s\\t%s\\t%s\\t%s\\t%s\\n\",\$1,\$2,\$3,\$4,\$5}}" "${adb_repdir}/adb_report" > "${adb_repdir}/adb_report.final"
                        if [ ! -s "${adb_repdir}/adb_report.final" ]
                        then
-                               printf "%s\t%s\t%s\t%s\t%s\n" "-" "-" "-" "-" "-" > "${adb_repdir}/adb_report.final"
+                               printf "%s\\t%s\\t%s\\t%s\\t%s\\n" "-" "-" "-" "-" "-" > "${adb_repdir}/adb_report.final"
                        fi
                fi
 
@@ -1196,7 +1247,7 @@ f_report()
                then
                        if [ -s "${adb_repdir}/adb_report.json" ]
                        then
-                               printf "%s\n%s\n%s\n" ":::" "::: Adblock DNS-Query Report" ":::"
+                               printf "%s\\n%s\\n%s\\n" ":::" "::: Adblock DNS-Query Report" ":::"
                                json_load_file "${adb_repdir}/adb_report.json"
                                json_select "data"
                                json_get_keys keylist
@@ -1205,55 +1256,55 @@ f_report()
                                        json_get_var value "${key}"
                                        eval "${key}=\"${value}\""
                                done
-                               printf "  + %s\n  + %s\n" "Start    ::: ${start_date}, ${start_time}" "End      ::: ${end_date}, ${end_time}"
-                               printf "  + %s\n  + %s %s\n" "Total    ::: ${total}" "Blocked  ::: ${blocked}" "(${percent})"
+                               printf "  + %s\\n  + %s\\n" "Start    ::: ${start_date}, ${start_time}" "End      ::: ${end_date}, ${end_time}"
+                               printf "  + %s\\n  + %s %s\\n" "Total    ::: ${total}" "Blocked  ::: ${blocked}" "(${percent})"
                                json_select ".."
-                               if json_get_type Status "top_clients" && [ "${Status}" = "array" ]
+                               if json_get_type status "top_clients" && [ "${status}" = "array" ]
                                then
-                                       printf "%s\n%s\n%s\n" ":::" "::: Top 10 Clients" ":::"
+                                       printf "%s\\n%s\\n%s\\n" ":::" "::: Top 10 Clients" ":::"
                                        json_select "top_clients"
                                        index=1
-                                       while json_get_type Status ${index} && [ "${Status}" = "object" ]
+                                       while json_get_type status "${index}" && [ "${status}" = "object" ]
                                        do
-                                               json_get_values client ${index}
-                                               printf "  + %-9s::: %s\n" ${client}
-                                               index=$((index + 1))
+                                               json_get_values client "${index}"
+                                               printf "  + %-9s::: %s\\n" ${client}
+                                               index=$((index+1))
                                        done
                                fi
                                json_select ".."
-                               if json_get_type Status "top_domains" && [ "${Status}" = "array" ]
+                               if json_get_type status "top_domains" && [ "${status}" = "array" ]
                                then
-                                       printf "%s\n%s\n%s\n" ":::" "::: Top 10 Domains" ":::"
+                                       printf "%s\\n%s\\n%s\\n" ":::" "::: Top 10 Domains" ":::"
                                        json_select "top_domains"
                                        index=1
-                                       while json_get_type Status ${index} && [ "${Status}" = "object" ]
+                                       while json_get_type status "${index}" && [ "${status}" = "object" ]
                                        do
-                                               json_get_values domain ${index}
-                                               printf "  + %-9s::: %s\n" ${domain}
-                                               index=$((index + 1))
+                                               json_get_values domain "${index}"
+                                               printf "  + %-9s::: %s\\n" ${domain}
+                                               index=$((index+1))
                                        done
                                fi
                                json_select ".."
-                               if json_get_type Status "top_blocked" && [ "${Status}" = "array" ]
+                               if json_get_type status "top_blocked" && [ "${status}" = "array" ]
                                then
-                                       printf "%s\n%s\n%s\n" ":::" "::: Top 10 Blocked Domains" ":::"
+                                       printf "%s\\n%s\\n%s\\n" ":::" "::: Top 10 Blocked Domains" ":::"
                                        json_select "top_blocked"
                                        index=1
-                                       while json_get_type Status ${index} && [ "${Status}" = "object" ]
+                                       while json_get_type status "${index}" && [ "${status}" = "object" ]
                                        do
-                                               json_get_values blocked ${index}
-                                               printf "  + %-9s::: %s\n" ${blocked}
-                                               index=$((index + 1))
+                                               json_get_values blocked "${index}"
+                                               printf "  + %-9s::: %s\\n" ${blocked}
+                                               index=$((index+1))
                                        done
                                fi
                                if [ -s "${adb_repdir}/adb_report.final" ]
                                then
-                                       printf "%s\n%s\n%s\n" ":::" "::: Latest DNS Queries" ":::"
-                                       printf "%-15s%-15s%-45s%-50s%s\n" "Date" "Time" "Client" "Domain" "Answer"
+                                       printf "%s\\n%s\\n%s\\n" ":::" "::: Latest DNS Queries" ":::"
+                                       printf "%-15s%-15s%-45s%-50s%s\\n" "Date" "Time" "Client" "Domain" "Answer"
                                        awk '{printf "%-15s%-15s%-45s%-50s%s\n",$1,$2,$3,$4,$5}' "${adb_repdir}/adb_report.final"
                                fi
                        else
-                               printf "%s\n%s\n%s\n" ":::" "::: no reporting data available yet" ":::"
+                               printf "%s\\n%s\\n%s\\n" ":::" "::: no reporting data available yet" ":::"
                        fi
                fi
        fi
@@ -1272,33 +1323,36 @@ fi
 
 # handle different adblock actions
 #
-f_envload
+f_load
 case "${adb_action}" in
-       stop)
+       "stop")
+               f_bgserv "stop"
                f_report "+" "50" "false" "false"
                f_rmdns
        ;;
-       restart)
+       "restart")
+               f_bgserv "stop"
                f_report "+" "50" "false" "false"
                f_rmdns
-               f_envcheck
+               f_env
                f_main
        ;;
-       suspend)
+       "suspend")
                f_switch suspend
        ;;
-       resume)
+       "resume")
                f_switch resume
        ;;
-       report)
+       "report")
                f_report "${2}" "${3}" "${4}" "${5}"
        ;;
-       query)
+       "query")
                f_query "${2}"
        ;;
-       start|reload)
+       "start"|"reload")
+               f_bgserv "stop"
                f_report "+" "50" "false" "false"
-               f_envcheck
+               f_env
                f_main
        ;;
 esac
index c4f5d8dab5b73b7dacf958bbb6ecc86f149714d8..63a4ff7129ca5f4bd76e0a90856b261ea3434d9b 100644 (file)
@@ -12,6 +12,7 @@ PKG_VERSION:=1.5.2
 PKG_RELEASE:=$(PKG_SOURCE_VERSION)
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=LICENSE
+PKG_CPE_ID:=cpe:/a:aircrack-ng:aircrack-ng
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/aircrack-ng/aircrack-ng.git
@@ -49,7 +50,7 @@ define Package/aircrack-ng
   DEPENDS += +libnl-core +libnl-genl +zlib
   TITLE:=WLAN tools (without airmon-ng) for breaking 802.11 WEP/WPA keys
   URL:=https://www.aircrack-ng.org/
-  SUBMENU:=wireless
+  SUBMENU:=Wireless
 endef
 
 define Package/aircrack-ng/description
@@ -66,7 +67,7 @@ define Package/airmon-ng
   DEPENDS:=+wireless-tools +ethtool +procps-ng +CONFIG_PCI_SUPPORT:pciutils +CONFIG_USB_SUPPORT:usbutils
   TITLE:=Bash script designed to turn wireless cards into monitor mode.
   URL:=http://www.aircrack-ng.org/
-  SUBMENU:=wireless
+  SUBMENU:=Wireless
 endef
 
 define Package/airmon-ng/description
index 5e4974c950e44dec3840bf9074585e586ae816ce..00f33d51b88753d1e9edba200bf3e6e88da8b9b6 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=apcupsd
 PKG_VERSION:=3.14.14
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_MAINTAINER:=Othmar Truniger <github@truniger.ch>
 PKG_LICENSE:=GPL-2.0
@@ -18,6 +18,7 @@ PKG_LICENSE_FILES:=COPYING
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/apcupsd
 PKG_HASH:=db7748559b6b4c3784f9856561ef6ac6199ef7bd019b3edcd7e0a647bf8f9867
+PKG_CPE_ID:=cpe:/a:apc:apcupsd
 
 PKG_BUILD_DEPENDS:=libgd
 
@@ -39,7 +40,7 @@ define Package/apcupsd-cgi
   URL:=http://www.apcupsd.org/
 endef
 
-CONFIGURE_VARS += SHUTDOWN=/sbin/halt
+CONFIGURE_VARS += SHUTDOWN=/sbin/halt SCRIPTSHELL=/bin/sh WALL=/bin/true APCUPSD_MAIL=/bin/true
 
 define Build/Configure
        $(CP) $(SCRIPT_DIR)/config.* $(PKG_BUILD_DIR)/autoconf/
index 0972d91ea72b1ead8787e6a78bba70f7c82b45c1..bea59df31579b88031b50cf2b99fff30d98b81a8 100644 (file)
@@ -8,20 +8,17 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=apfree-wifidog
-PKG_VERSION:=3.8.1588
-PKG_RELEASE=1
-
-PKG_LICENSE:=GPL-3.0-or-later
-PKG_LICENSE_FILES:=COPYING
-
-PKG_MAINTAINER:=Dengfeng Liu <liudf0716@gmail.com>
+PKG_VERSION:=3.11.1716
+PKG_RELEASE:=2
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/liudf0716/apfree_wifidog.git
 PKG_SOURCE_VERSION:=$(PKG_VERSION)
-PKG_MIRROR_HASH:=0d10ad5a29358a7124ba75570894f48998af841519b0f295e3fcbed66ee7bccc
+PKG_MIRROR_HASH:=76eda57e40b919091281305344bc57fc732a779d7944f57bd5de87914ba127d1
 
-PKG_INSTALL:=1
+PKG_MAINTAINER:=Dengfeng Liu <liudf0716@gmail.com>
+PKG_LICENSE:=GPL-3.0-or-later
+PKG_LICENSE_FILES:=COPYING
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/cmake.mk
@@ -31,8 +28,7 @@ define Package/apfree-wifidog
   SECTION:=net
   CATEGORY:=Network
   DEPENDS:=+zlib +iptables-mod-extra +iptables-mod-ipopt +kmod-ipt-nat +iptables-mod-nat-extra \
-           +libjson-c +ipset +libip4tc +libevent2 +libevent2-openssl \
-           +fping +libmosquitto +libuci +px5g
+           +libjson-c +ipset +libip4tc +libevent2 +libevent2-openssl +libuci +px5g
   TITLE:=Apfree's wireless captive portal solution
   URL:=https://github.com/liudf0716/apfree_wifidog
 endef
@@ -41,16 +37,13 @@ define Package/apfree-wifidog/description
   The ApFree Wifidog project is a complete and embeddable captive portal
   solution for wireless community groups or individuals who wish to open a free
   Hotspot while still preventing abuse of their Internet connection.
-
   It's enhanced wifidog
 endef
 
 define Package/apfree-wifidog/install
        $(INSTALL_DIR) $(1)/usr/bin
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/wifidog $(1)/usr/bin/wifidogx
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/wdctl $(1)/usr/bin/wdctlx
-       $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libhttpd.so* $(1)/usr/lib/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/wifidogx $(1)/usr/bin/wifidogx
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/wdctlx $(1)/usr/bin/wdctlx
        $(INSTALL_DIR) $(1)/usr/sbin
        $(INSTALL_BIN) ./files/wdping $(1)/usr/sbin/
        $(INSTALL_DIR) $(1)/etc
index 7ade3291051edc7b722d69501c5b41802aead8da..b9cff56742d0fb1130670c220d690150aff3bfc1 100644 (file)
@@ -1,13 +1,9 @@
 config wifidog
-       option  gateway_interface       'br-lan'
-       option  auth_server_hostname    'change wifidog.kunteng.org.cn to your auth server domain or ip'
-       option  auth_server_port        8001
-       option  auth_server_path        '/wifidog/'
-       option  check_interval          60
-       option  client_timeout          5
-       option  httpd_max_conn          200
-       option  pool_mode                       1
-       option  thread_number           5
-       option  queue_size                      20
-       option  wired_passed            0
-       option  enable          0
+       option gateway_interface 'br-lan'
+       option auth_server_hostname 'change wifidog.kunteng.org.cn to your auth server domain or ip'
+       option auth_server_port 443
+       option auth_server_path '/wifidog/'
+       option check_interval 60
+       option client_timeout 5
+       option wired_passed 0
+       option disabled 1
index bc8e68151e5cd4d6e854acd5b1a986c216f4c8b2..be87af5b99d014207b807bbffe12e79af84e9b3a 100644 (file)
@@ -7,7 +7,7 @@ START=99
 
 USE_PROCD=1
 PROG=/usr/bin/wifidogx
-CONFIGFILE=/tmp/wifidog.conf
+CONFIGFILE=/tmp/wifidogx.conf
 
 EXTRA_COMMANDS="status"
 EXTRA_HELP="        status Print the status of the service"
@@ -50,7 +50,7 @@ prepare_mqtt_conf() {
 
        config_get serveraddr "$cfg" "serveraddr"
        config_get serverport "$cfg" "serverport"
-       [ -z "${serveraddr}" -o -z "${serverport}" ] && return 1
+       [ -z "${serveraddr}" ] || [ -z "${serverport}" ] && return 1
 
        cat <<-EOF >>${CONFIGFILE}
                MQTT {
@@ -75,7 +75,6 @@ prepare_wifidog_conf() {
        local delta_traffic
        local check_interval
        local client_timeout
-       local httpd_max_conn
        local trusted_domains
        local js_filter
        local trusted_maclist
@@ -97,8 +96,11 @@ prepare_wifidog_conf() {
 
        [ -f ${CONFIGFILE} ] && rm -f ${CONFIGFILE}
 
-       config_get enable "${cfg}" "enable" 0
-       [ "${enable}" = "1" ] || return
+       config_get enable "${cfg}" "disabled" 0
+       if [ "${enable}" = "0" ]; then
+               echo "wifidogx disabled in /etc/config/wifidogx file, please set disabled to 0 to enable it" >&2
+               return
+       fi
 
        default_gateway_id=$(sed -e 's/://g' /sys/class/net/br-lan/address)
 
@@ -118,7 +120,6 @@ prepare_wifidog_conf() {
        config_get check_interval "${cfg}" "check_interval" "60"
        config_get js_filter "${cfg}" "js_filter" 1
        config_get client_timeout "${cfg}" "client_timeout"     "5"
-       config_get httpd_max_conn "${cfg}" "httpd_max_conn"     "200"
        config_get trusted_domains "${cfg}" "trusted_domains"
        config_get trusted_maclist "${cfg}" "trusted_maclist"
        config_get untrusted_maclist "${cfg}" "untrusted_maclist"
@@ -184,7 +185,7 @@ prepare_wifidog_conf() {
                GatewayID $gateway_id
                GatewayInterface $gateway_interface
                Externalinterface $external_interface
+
                AuthServer {
                        Hostname $auth_server_hostname
                        HTTPPort $auth_server_port
@@ -195,57 +196,41 @@ prepare_wifidog_conf() {
                        $set_auth_server_path_ping
                        $set_auth_server_path_auth
                }
+
                $set_delta_traffic
                CheckInterval $check_interval
                ClientTimeout $client_timeout
                JsFilter $js_filter
                WiredPassed $wired_passed
-
-               HTTPDMaxConn $httpd_max_conn
-
-               PoolMode $pool_mode
-               ThreadNumber $thread_number
-               QueueSize $queue_size
-
                $set_trusted_domains
-
                $set_untrusted_maclist
-
                $set_trusted_maclist
-
                $set_trusted_iplist
-
                $set_trusted_pan_domains
-
                $set_proxy_port
-
                $set_no_auth
-
                $set_apple_cna
-
                $set_update_domain_interval
-
                $set_dns_timeout
 
                FirewallRuleSet global {
                        $set_firewall_rule_global
                }
+
                FirewallRuleSet validating-users {
                        $set_firewall_rule_validating_users
                        FirewallRule allow to 0.0.0.0/0
                }
+
                FirewallRuleSet known-users {
                        $set_firewall_rule_known_users
                        FirewallRule allow to 0.0.0.0/0
                }
+
                FirewallRuleSet auth-is-down {
                        $set_firewall_rule_auth_is_down
                }
+
                FirewallRuleSet unknown-users {
                        $set_firewall_rule_unknown_users
                        FirewallRule allow udp port 53
@@ -253,7 +238,7 @@ prepare_wifidog_conf() {
                        FirewallRule allow udp port 67
                        FirewallRule allow tcp port 67
                }
+
                FirewallRuleSet locked-users {
                        $set_firewall_rule_locked_users
                        FirewallRule block to 0.0.0.0/0
@@ -265,21 +250,19 @@ init_config() {
        config_load wifidogx
        config_foreach prepare_wifidog_conf wifidog
 
-       [ ! -f ${CONFIGFILE} ] && {
-               echo "no wifidog.conf, exit..."
-               stop
+       if [ ! -f ${CONFIGFILE} ]; then
+               echo "no wifidogx.conf, exit..." >&2
                exit
-       }
+       fi
 
-       [ -s "${APFREE_CERT}" -a -s "${APFREE_KEY}" ] || {
+       if [ -s "${APFREE_CERT}" ] && [ -s "${APFREE_KEY}" ]; then
                generate_keys
-       }
+       fi
 
-       [ -s ${APFREE_KEY} -a -s ${APFREE_CERT} ] || {
-               echo "no cert or key, exit..."
-               stop
+       if [ -s ${APFREE_KEY} ] && [ -s ${APFREE_CERT} ]; then
+               echo "no cert or key, exit..." >&2
                exit
-       }
+       fi
 
        config_foreach prepare_mqtt_conf mqtt
 
diff --git a/net/apfree-wifidog/patches/010-openssl-deprecated.patch b/net/apfree-wifidog/patches/010-openssl-deprecated.patch
new file mode 100644 (file)
index 0000000..ece9ce3
--- /dev/null
@@ -0,0 +1,18 @@
+--- a/src/gateway.c
++++ b/src/gateway.c
+@@ -78,10 +78,14 @@ openssl_init(void)
+       ERR_load_crypto_strings();
+       SSL_load_error_strings();
+       OpenSSL_add_all_algorithms();
+-#endif
+       debug (LOG_DEBUG, "Using OpenSSL version \"%s\"\nand libevent version \"%s\"\n",
+                 SSLeay_version (SSLEAY_VERSION),
+                 event_get_version ());
++#else
++      debug (LOG_DEBUG, "Using OpenSSL version \"%s\"\nand libevent version \"%s\"\n",
++                OpenSSL_version (OPENSSL_VERSION),
++                event_get_version ());
++#endif
+ }
+ static void
index e8ae8a81c296ed6869ccd9723766c3f8b56f15b0..1c52c7578e7711798f19404eb71e8d9cecfbb7f7 100644 (file)
@@ -8,23 +8,22 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=apinger
-PKG_VERSION:=0.6.1
-PKG_RELEASE=$(PKG_SOURCE_VERSION)
+PKG_SOURCE_DATE:=2015-04-09
+PKG_SOURCE_VERSION:=78eb328721ba1a10571c19df95acddcb5f0c17c8
+PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/Jajcus/apinger.git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=c7da72f7ec26eedd7fd8d224c0e10787b204f94e
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
-PKG_MIRROR_HASH:=c6739bef32568877ad63dbfa8e34b617a287e225a0344d4c41ba891e1f25d487
+PKG_SOURCE_URL:=https://github.com/Jajcus/apinger
+PKG_MIRROR_HASH:=4ada1330fc5d0adc0216d141f5e3b494df7a4c6500bbffce1efeab3d58684f7e
 
 PKG_MAINTAINER:=Alex Samorukov <samm@os2.kiev.ua>
-PKG_LICENSE:= GPL-2.0
+PKG_LICENSE:=GPL-2.0-only
 
+PKG_REMOVE_FILES:=autogen.sh
 PKG_FIXUP:=autoreconf
 
-PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=0
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -33,7 +32,6 @@ define Package/apinger
   CATEGORY:=Network
   TITLE:=Tool which monitors various IP devices by simple ICMP echo requests
   URL:=https://github.com/Jajcus/apinger
-  PKG_MAINTAINER:=Alex Samorukov <samm@os2.kiev.ua>
 endef
 
 define Package/apinger/description
@@ -51,10 +49,6 @@ define Package/apinger/conffiles
 /etc/apinger.conf
 endef
 
-define Build/Configure
-       $(call Build/Configure/Default)
-endef
-
 define Package/apinger/install
        $(INSTALL_DIR) $(1)/usr/sbin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/apinger $(1)/usr/sbin/
diff --git a/net/apinger/patches/001-autoreconf.patch b/net/apinger/patches/001-autoreconf.patch
deleted file mode 100644 (file)
index cb5bd45..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
---- apinger-0.6.1/acinclude.m4 2003-10-21 12:44:48.000000000 +0000
-+++ apinger-0.6.1/acinclude.m4 2015-04-08 15:27:37.451903960 +0000
-@@ -39,9 +39,7 @@
-               [$jk_inet_includes
- $jk_icmp_includes])
--AC_CHECK_MEMBERS([struct icmp.icmp_type, struct icmp.icmp_code,\
--struct icmp.icmp_cksum, struct icmp.icmp_seq,\
--struct icmp.icmp_id],[],
-+AC_CHECK_MEMBERS([struct icmp.icmp_type, struct icmp.icmp_code,struct icmp.icmp_cksum, struct icmp.icmp_seq,struct icmp.icmp_id],[],
-               AC_MSG_ERROR(struct icmp not defined or not compatible),
-               [$jk_inet_includes
- $jk_icmp_includes])
index 16d64acc5f07da5ce477f8aa104798810836ce86..ca36e97a66d0794e16c0043558fe76c6900af426 100644 (file)
@@ -1,6 +1,6 @@
---- apinger-0.6.1/src/apinger.conf.orig        2015-04-08 16:05:24.558919722 +0000
-+++ apinger-0.6.1/src/apinger.conf     2015-04-08 16:07:47.089170236 +0000
-@@ -9,7 +9,7 @@
+--- a/src/apinger.conf
++++ b/src/apinger.conf
+@@ -8,7 +8,7 @@
  
  ## User and group the pinger should run as
  user "nobody"
index c08f44de7531b44390f89047a3a76826653f8a35..ecfca2d7e9a247ee618a16fdf8fa2a0d14389002 100644 (file)
@@ -1,5 +1,5 @@
---- apinger-0.6.1/Makefile.am.orig     2015-04-08 16:47:40.999990050 +0000
-+++ apinger-0.6.1/Makefile.am  2015-04-08 16:48:07.565220137 +0000
+--- a/Makefile.am
++++ b/Makefile.am
 @@ -1,7 +1,7 @@
  
  EXTRA_DIST = autogen.sh TODO BUGS
diff --git a/net/apinger/patches/010-poll.patch b/net/apinger/patches/010-poll.patch
new file mode 100644 (file)
index 0000000..760079e
--- /dev/null
@@ -0,0 +1,24 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -23,7 +23,7 @@ AC_HEADER_SYS_WAIT
+ AC_CHECK_HEADERS([arpa/inet.h errno.h malloc.h \
+               stddef.h stdlib.h string.h sys/socket.h \
+               sys/time.h syslog.h unistd.h time.h \
+-              assert.h sys/poll.h signal.h pwd.h grp.h stdarg.h\
++              assert.h poll.h signal.h pwd.h grp.h stdarg.h\
+               limits.h sys/wait.h sched.h sys/ioctl.h sys/uio.h])
+ AC_HEADER_TIME
+--- a/src/apinger.c
++++ b/src/apinger.c
+@@ -33,8 +33,8 @@
+ #ifdef HAVE_SYS_WAIT_H
+ # include <sys/wait.h>
+ #endif
+-#ifdef HAVE_SYS_POLL_H
+-# include <sys/poll.h>
++#ifdef HAVE_POLL_H
++# include <poll.h>
+ #endif
+ #ifdef HAVE_ARPA_INET_H
+ # include <arpa/inet.h>
index 672894aede4915d1342a3acfc0691b114a772e41..e521b453873d86e5c95ac703d1b17b27785da455 100644 (file)
@@ -21,6 +21,7 @@ PKG_MAINTAINER:=Imre Kaloz <kaloz@openwrt.org>, \
        Hsing-Wang Liao <kuoruan@gmail.com>
 PKG_LICENSE:=GPLv2
 PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:tatsuhiro_tsujikawa:aria2
 
 PKG_CONFIG_DEPENDS := \
        CONFIG_ARIA2_NOSSL \
index be57f48b34aebd1100d38402289e3ddf590d40a8..e72c8dfbc3429240f88614e798175e79d6865711 100644 (file)
@@ -1,13 +1,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ariang
-PKG_VERSION:=1.1.0
+PKG_VERSION:=1.1.1
 PKG_RELEASE:=1
 
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/mayswind/AriaNg-DailyBuild
-PKG_MIRROR_HASH:=31a41eed1d812956bf0c482b961cc86ab1b9ad2863e9b17f383330d3067c444f
-PKG_SOURCE_VERSION:=ca6f9168bdfbfc1fd3cbb1bac4600010d3725c0c
+PKG_SOURCE_URL:=https://codeload.github.com/mayswind/AriaNg-DailyBuild/tar.gz/$(PKG_VERSION)?
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_HASH:=48f3f737a6a79ab140f6bc75b0b6fd377ccbb75c7b7260b38ad4e64dee97d9e8
+PKG_BUILD_DIR:=$(BUILD_DIR)/AriaNg-DailyBuild-$(PKG_VERSION)
 
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
@@ -21,7 +21,7 @@ define Package/ariang/default
   SUBMENU:=Download Manager
   DEPENDS:=+aria2
   TITLE:=AriaNg webui
-  URL:=https://github.com/mayswind/AriaNg
+  URL:=https://ariang.mayswind.net
   PKGARCH:=all
 endef
 
index 429aa50ce4a090386b7dacecf28bc872c38ddd40..ea6838776ed083250333697aebed08bfe3e178f0 100644 (file)
@@ -7,14 +7,19 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=atftp
-PKG_VERSION:=0.7.1
-PKG_RELEASE:=5
-PKG_MAINTAINER:=Daniel Danzberger <daniel@dd-wrt.com>
-PKG_LICENSE:=GPL-2.0
+PKG_VERSION:=0.7.2
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/$(PKG_NAME)
-PKG_HASH:=ae4c6f09cadb8d2150c3ce32d88f19036a54e8211f22d723e97864bb5e18f92d
+PKG_HASH:=1ad080674e9f974217b3a703e7356c6c8446dc5e7b2014d0d06e1bfaa11b5041
+
+PKG_MAINTAINER:=Daniel Danzberger <daniel@dd-wrt.com>
+PKG_LICENSE:=GPL-2.0-or-later
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -38,17 +43,18 @@ define Package/atftpd
 endef
 
 CONFIGURE_ARGS += \
+       --disable-debug \
        --disable-libwrap
 
 define Package/atftp/install
-       $(INSTALL_DIR) $(1)/usr/sbin
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/atftp $(1)/usr/sbin/
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/atftp $(1)/usr/bin/
 endef
 
 define Package/atftpd/install
        $(INSTALL_DIR) $(1)/etc
        $(INSTALL_DIR) $(1)/usr/sbin
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/atftpd $(1)/usr/sbin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)//usr/sbin/atftpd $(1)/usr/sbin/
 endef
 
 $(eval $(call BuildPackage,atftp))
index b553b633666a54b42d671fd7f316e43522236ae5..897ecd8a70259c709f66da5e2db6597956dffd88 100644 (file)
@@ -6,9 +6,9 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=banip
-PKG_VERSION:=0.1.3
+PKG_VERSION:=0.3.0
 PKG_RELEASE:=1
-PKG_LICENSE:=GPL-3.0+
+PKG_LICENSE:=GPL-3.0-or-later
 PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
 
 include $(INCLUDE_DIR)/package.mk
@@ -17,7 +17,7 @@ define Package/banip
        SECTION:=net
        CATEGORY:=Network
        TITLE:=Ban incoming and/or outgoing ip adresses via ipsets
-       DEPENDS:=+jshn +jsonfilter +ip +ipset +iptables
+       DEPENDS:=+jshn +jsonfilter +ip +ipset +iptables +ca-bundle
        PKGARCH:=all
 endef
 
@@ -45,7 +45,7 @@ endef
 
 define Package/banip/install
        $(INSTALL_DIR) $(1)/usr/bin
-       $(INSTALL_BIN) ./files/banip.sh $(1)/usr/bin/
+       $(INSTALL_BIN) ./files/banip.sh $(1)/usr/bin
 
        $(INSTALL_DIR) $(1)/etc/init.d
        $(INSTALL_BIN) ./files/banip.init $(1)/etc/init.d/banip
@@ -54,9 +54,10 @@ define Package/banip/install
        $(INSTALL_CONF) ./files/banip.conf $(1)/etc/config/banip
 
        $(INSTALL_DIR) $(1)/etc/banip
-       $(INSTALL_CONF) ./files/banip.blacklist $(1)/etc/banip/
-       $(INSTALL_CONF) ./files/banip.whitelist $(1)/etc/banip/
-       
+       $(INSTALL_BIN) ./files/banip.service $(1)/etc/banip
+       $(INSTALL_CONF) ./files/banip.blacklist $(1)/etc/banip
+       $(INSTALL_CONF) ./files/banip.whitelist $(1)/etc/banip
+
        $(INSTALL_DIR) $(1)/etc/hotplug.d/firewall
        $(INSTALL_DATA) ./files/banip.hotplug $(1)/etc/hotplug.d/firewall/30-banip
 endef
index 1df1f7cdce65b41a4a23d6c8e0843702945cf16a..b42dd5768ff0ef24dfcb8c0d65de8717ef5b3c7a 100644 (file)
@@ -1,44 +1,41 @@
 # banIP - ban incoming and/or outgoing ip adresses via ipsets
 
 ## Description
-IP address blocking is commonly used to protect against brute force attacks, prevent disruptive or unautherized address(es) from access or it can be used to restrict access to or from a particular geographic area — for example.  
+IP address blocking is commonly used to protect against brute force attacks, prevent disruptive or unauthorized address(es) from access or it can be used to restrict access to or from a particular geographic area — for example.  
 
 ## Main Features
 * support many IP blocklist sources (free for private usage, for commercial use please check their individual licenses):
 * zero-conf like automatic installation & setup, usually no manual changes needed
-* supports six different download utilities: uclient-fetch, wget, curl, aria2c, wget-nossl, busybox-wget
+* automatically selects one of the following download utilities: aria2c, curl, uclient-fetch, wget
 * Really fast downloads & list processing as they are handled in parallel as background jobs in a configurable 'Download Queue'
-* provides 'http only' mode without installed ssl library for all non-SSL blocklist sources
 * full IPv4 and IPv6 support
 * ipsets (one per source) are used to ban a large number of IP addresses
 * supports blocking by ASN numbers
 * supports blocking by iso country codes
 * supports local white & blacklist (IPv4, IPv6 & CIDR notation), located by default in /etc/banip/banip.whitelist and /etc/banip/banip.blacklist
-* auto-add unsuccessful ssh login attempts to local blacklist
-* auto-add the uplink subnet to local whitelist
+* auto-add unsuccessful LuCI and ssh login attempts via 'dropbear' or 'sshd' to local blacklist (see 'ban_autoblacklist' option)
+* auto-add the uplink subnet to local whitelist (see 'ban_autowhitelist' option)
+* provides a small background log monitor to ban unsuccessful login attempts in real-time
 * per source configuration of SRC (incoming) and DST (outgoing)
 * integrated IPSet-Lookup
 * integrated RIPE-Lookup
 * blocklist source parsing by fast & flexible regex rulesets
 * minimal status & error logging to syslog, enable debug logging to receive more output
-* procd based init system support (start/stop/restart/reload/status)
+* procd based init system support (start/stop/restart/reload/refresh/status)
 * procd network interface trigger support
-* automatic blocklist backup & restore, they will be used in case of download errors or during startup in backup mode
-* 'backup mode' to re-use blocklist backups during startup, get fresh lists via reload or restart action
+* automatic blocklist backup & restore, they will be used in case of download errors or during startup
 * output comprehensive runtime information via LuCI or via 'status' init command
 * strong LuCI support
 * optional: add new banIP sources on your own
 
 ## Prerequisites
-* [OpenWrt](https://openwrt.org), tested with the stable release series (18.06) and with the latest snapshot
-* a download utility:
-    * to support all blocklist sources a full version (with ssl support) of 'wget', 'uclient-fetch' with one of the 'libustream-*' ssl libraries, 'aria2c' or 'curl' is required
-    * for limited devices with real memory constraints, banIP provides also a 'http only' option and supports wget-nossl and uclient-fetch (without libustream-ssl) as well
+* [OpenWrt](https://openwrt.org), tested with the stable release series (19.07) and with the latest snapshot
+* download utility: 'uclient-fetch' with one of the 'libustream-*' ssl libraries, 'wget',  'aria2c' or 'curl' is required
 
 ## Installation & Usage
 * install 'banip' (_opkg install banip_)
 * at minimum configure the needed IP blocklist sources, the download utility and enable the banIP service in _/etc/config/banip_
-* control the banip service manually with _/etc/init.d/banip_ start/stop/restart/reload/status or use the LuCI frontend
+* control the banip service manually with _/etc/init.d/banip_ start/stop/restart/reload/refresh/status or use the LuCI frontend
 
 ## LuCI banIP companion package
 * it's recommended to use the provided LuCI frontend to control all aspects of banIP
@@ -50,18 +47,21 @@ IP address blocking is commonly used to protect against brute force attacks, pre
 * the following options apply to the 'global' config section:
     * ban\_enabled => main switch to enable/disable banIP service (bool/default: '0', disabled)
     * ban\_automatic => determine the L2/L3 WAN network device automatically (bool/default: '1', enabled)
-    * ban\_fetchutil => name of the used download utility: 'uclient-fetch', 'wget', 'curl', 'aria2c', 'wget-nossl'. 'busybox' (default: 'uclient-fetch')
-    * ban\_iface => space separated list of WAN network interface(s)/device(s) used by banIP (default: automatically set by banIP ('ban_automatic'))
+    * ban\_iface => space separated list of WAN network interface(s)/device(s) used by banIP (default: not set, automatically detected)
+    * ban\_realtime => a small log/banIP background monitor to block SSH/LuCI brute force attacks in realtime (bool/default: 'false', disabled)
 
 * the following options apply to the 'extra' config section:
-    * ban\_debug => enable/disable banIP debug output (default: '0', disabled)
+    * ban\_debug => enable/disable banIP debug output (bool/default: '0', disabled)
     * ban\_nice => set the nice level of the banIP process and all sub-processes (int/default: '0', standard priority)
     * ban\_triggerdelay => additional trigger delay in seconds before banIP processing begins (int/default: '2')
-    * ban\_backup => create compressed blocklist backups, they will be used in case of download errors or during startup in 'backup mode' (bool/default: '0', disabled)
-    * ban\_backupdir => target directory for adblock backups (default: not set)
-    * ban\_backupboot => do not automatically update blocklists during startup, use their backups instead (bool/default: '0', disabled)
-    * ban\_maxqueue => size of the download queue to handle downloads & IPSet processing in parallel (int/default: '8')
+    * ban\_backupdir => target directory for banIP backups (default: '/tmp')
+    * ban\_sshdaemon => select the SSH daemon for logfile parsing, 'dropbear' or 'sshd' (default: 'dropbear')
+    * ban\_starttype => select the used start type during boot, 'start', 'refresh' or 'reload' (default: 'start')
+    * ban\_maxqueue => size of the download queue to handle downloads & IPSet processing in parallel (int/default: '4')
+    * ban\_fetchutil => name of the used download utility: 'uclient-fetch', 'wget', 'curl', 'aria2c' (default: not set, automatically detected)
     * ban\_fetchparm => special config options for the download utility (default: not set)
+    * ban\_autoblacklist => store auto-addons temporary in ipset and permanently in local blacklist as well (bool/default: '1', enabled)
+    * ban\_autowhitelist => store auto-addons temporary in ipset and permanently in local whitelist as well (bool/default: '1', enabled)
 
 ## Examples
 **receive banIP runtime information:**
@@ -70,14 +70,15 @@ IP address blocking is commonly used to protect against brute force attacks, pre
 /etc/init.d/banip status
 ::: banIP runtime information
   + status     : enabled
-  + version    : 0.1.0
-  + fetch_info : /bin/uclient-fetch (libustream-ssl)
-  + ipset_info : 1 IPSets with overall 516 IPs/Prefixes (backup mode)
-  + last_run   : 05.01.2019 14:48:18
-  + system     : TP-LINK RE450, OpenWrt SNAPSHOT r8910+72-25d8aa7d02
+  + version    : 0.3.0
+  + util_info  : /usr/bin/aria2c, true
+  + ipset_info : 10 IPSets with overall 106729 IPs/Prefixes
+  + backup_dir : /tmp
+  + last_run   : 03.10.2019 19:15:25
+  + system     : UBNT-ERX, OpenWrt SNAPSHOT r11102-ced4c0e635
 </code></pre>
   
-**cronjob for a regular block list update (/etc/crontabs/root):**
+**cronjob for a regular IPSet blocklist update (/etc/crontabs/root):**
 
 <pre><code>
 0 06 * * *    /etc/init.d/banip reload
index f658c445ba2e38db04dd98dbcd5b4ea186628b14..04f5cee8d1c4f6b4850d3bb91c3b64c94d0e970a 100644 (file)
@@ -1,15 +1,12 @@
-# banIP configuration, for further information
-# see 'https://github.com/openwrt/packages/blob/master/net/banip/files/README.md'
 
 config banip 'global'
        option ban_enabled '0'
+       option ban_basever '0.3'
        option ban_automatic '1'
-       option ban_fetchutil 'uclient-fetch'
-       option ban_iface 'wan'
+       option ban_realtime 'false'
 
 config banip 'extra'
        option ban_debug '0'
-       option ban_backup '0'
        option ban_maxqueue '4'
 
 config source 'whitelist'
@@ -85,25 +82,17 @@ config source 'myip'
        option ban_src_on_6 '0'
 
 config source 'yoyo'
-       option ban_src 'http://pgl.yoyo.org/adservers/iplist.php?ipformat=plain&showintro=0&mimetype=plaintext'
+       option ban_src 'https://pgl.yoyo.org/adservers/iplist.php?ipformat=plain&showintro=0&mimetype=plaintext'
        option ban_src_desc 'IP blocklist provided by Peter Lowe (IPv4)'
        option ban_src_rset '/^(([0-9]{1,3}\.){3}[0-9]{1,3})([[:space:]]|$)/{print \"add yoyo \"\$1}'
        option ban_src_settype 'ip'
        option ban_src_ruletype 'src'
        option ban_src_on '0'
 
-config source 'zeus'
-       option ban_src 'https://zeustracker.abuse.ch/blocklist.php?download=ipblocklist'
-       option ban_src_desc 'Zeus Tracker by abuse.ch (IPv4)'
-       option ban_src_rset '/^(([0-9]{1,3}\.){3}[0-9]{1,3})([[:space:]]|$)/{print \"add zeus \"\$1}'
-       option ban_src_settype 'ip'
-       option ban_src_ruletype 'src'
-       option ban_src_on '0'
-
 config source 'sslbl'
        option ban_src 'https://sslbl.abuse.ch/blacklist/sslipblacklist.csv'
        option ban_src_desc 'SSL Blacklist by abuse.ch (IPv4)'
-       option ban_src_rset 'BEGIN{FS=\",\"}/^(([0-9]{1,3}\.){3}[0-9]{1,3},).*/{print \"add sslbl \"\$1}'
+       option ban_src_rset 'BEGIN{FS=\",\"}/(([0-9]{1,3}\.){3}[0-9]{1,3},).*/{print \"add sslbl \"\$2}'
        option ban_src_settype 'ip'
        option ban_src_ruletype 'src'
        option ban_src_on '0'
@@ -125,7 +114,7 @@ config source 'feodo'
        option ban_src_on '0'
 
 config source 'dshield'
-       option ban_src 'http://feeds.dshield.org/block.txt'
+       option ban_src 'https://feeds.dshield.org/block.txt'
        option ban_src_desc 'Dshield recommended IP blocklist. Contains top 20 attacking class C subnets (IPv4)'
        option ban_src_rset '/^(([0-9]{1,3}\.){3}[0-9]{1,3})([[:space:]]|$)/{print \"add dshield \"\$1 \"/\"\$3}'
        option ban_src_settype 'net'
@@ -141,7 +130,7 @@ config source 'proxy'
        option ban_src_on '0'
 
 config source 'iblocklist'
-       option ban_src 'http://list.iblocklist.com/?list=dgxtneitpuvgqqcpfulq&fileformat=cidr&archiveformat=gz'
+       option ban_src 'https://list.iblocklist.com/?list=dgxtneitpuvgqqcpfulq&fileformat=cidr&archiveformat=gz'
        option ban_src_desc 'Contains advertising trackers and a short list of bad/intrusive porn sites (IPv4)'
        option ban_src_rset '/^(([0-9]{1,3}\.){3}[0-9]{1,3}(\/[0-9]{1,2})?)([[:space:]]|$)/{print \"add iblocklist \"\$1}'
        option ban_src_settype 'net'
index 56e5b2a9932990ed5e7a8a7fda6b589d0775ecbf..763c07baf593b6974ef8433c0ec4982e1addd3f9 100644 (file)
@@ -1,12 +1,11 @@
 #!/bin/sh
 #
-
 ban_pidfile="/var/run/banip.pid"
-ban_enabled="$(/etc/init.d/banip enabled; printf "%u" ${?})"
+ban_enabled="$(/etc/init.d/banip enabled; printf "%u" "${?}")"
 
 if [ "${ban_enabled}" = "1" ] || [ ! -f "${ban_pidfile}" ] || [ -s "${ban_pidfile}" ] || [ "${ACTION}" != "add" ]
 then
        exit 0
+else
+       /etc/init.d/banip refresh
 fi
-
-/etc/init.d/banip refresh
index a0b58366875c2c42cfdcb21bccbbb47812195374..25f2f72cd4feecac70207f009974f25004eb9bd3 100755 (executable)
@@ -5,7 +5,7 @@ START=30
 USE_PROCD=1
 
 EXTRA_COMMANDS="refresh status"
-EXTRA_HELP="   refresh Refresh ipsets only (no new download!)
+EXTRA_HELP="   refresh Refresh ipsets without new list downloads
        status  Print runtime information"
 
 ban_init="/etc/init.d/banip"
@@ -20,17 +20,17 @@ boot()
 
 start_service()
 {
-       if [ $("${ban_init}" enabled; printf "%u" ${?}) -eq 0 ]
+       if [ "$("${ban_init}" enabled; printf "%u" ${?})" -eq 0 ]
        then
                if [ "${ban_boot}" = "1" ]
                then
                        return 0
                fi
-               local nice="$(uci_get banip extra ban_nice)"
+               local nice="$(uci_get banip extra ban_nice "0")"
                procd_open_instance "banip"
                procd_set_param command "${ban_script}" "${@}"
                procd_set_param pidfile "${ban_pidfile}"
-               procd_set_param nice ${nice:-0}
+               procd_set_param nice "${nice}"
                procd_set_param stdout 1
                procd_set_param stderr 1
                procd_close_instance
@@ -39,6 +39,7 @@ start_service()
 
 refresh()
 {
+       [ -s "${ban_pidfile}" ] && return 1
        rc_procd start_service refresh
 }
 
@@ -50,39 +51,44 @@ reload_service()
 stop_service()
 {
        rc_procd "${ban_script}" stop
-       rc_procd start_service
 }
 
-status()
+status_service()
 {
-       local key keylist value rtfile="$(uci_get banip global ban_rtfile)"
+       local key keylist value
+       local rtfile="$(uci_get banip global ban_rtfile "/tmp/ban_runtime.json")"
 
-       rtfile="${rtfile:-"/tmp/ban_runtime.json"}"
        json_load_file "${rtfile}" >/dev/null 2>&1
        json_select data >/dev/null 2>&1
-       if [ ${?} -eq 0 ]
+       if [ "${?}" -eq 0 ]
        then
-               printf "%s\n" "::: banIP runtime information"
+               printf "%s\\n" "::: banIP runtime information"
                json_get_keys keylist
                for key in ${keylist}
                do
                        json_get_var value "${key}"
-                       printf "  + %-10s : %s\n" "${key}" "${value}"
+                       printf "  + %-10s : %s\\n" "${key}" "${value}"
                done
        else
-               printf "%s\n" "::: no banIP runtime information available"
+               printf "%s\\n" "::: no banIP runtime information available"
        fi
 }
 
 service_triggers()
 {
-       local ban_iface="$(uci_get banip global ban_iface)"
-       local delay="$(uci_get banip extra ban_triggerdelay)"
+       local iface iface_list="$(uci_get banip global ban_iface)"
+       local delay="$(uci_get banip extra ban_triggerdelay "2")"
+       local type="$(uci_get banip extra ban_starttype "start")"
 
-       PROCD_RELOAD_DELAY=$((${delay:-2} * 1000))
-       for iface in ${ban_iface:-"wan"}
-       do
-               procd_add_interface_trigger "interface.*.up" "${iface}" "${ban_init}" start
-       done
-       procd_add_reload_trigger "banip" "firewall"
+       PROCD_RELOAD_DELAY=$((${delay}*1000))
+       if [ -n "${iface_list}" ]
+       then
+               for iface in ${iface_list}
+               do
+                       procd_add_interface_trigger "interface.*.up" "${iface}" "${ban_init}" "${type}"
+               done
+       else
+               procd_add_raw_trigger "interface.*.up" ${PROCD_RELOAD_DELAY} "${ban_init}" "${type}"
+       fi
+       procd_add_reload_trigger "banip"
 }
diff --git a/net/banip/files/banip.service b/net/banip/files/banip.service
new file mode 100755 (executable)
index 0000000..1c44be3
--- /dev/null
@@ -0,0 +1,27 @@
+#!/bin/sh
+# log service to trace failed ssh/luci logins and conditionally refresh banIP
+# written by Dirk Brenken (dev@brenken.org)
+
+# This is free software, licensed under the GNU General Public License v3.
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+LC_ALL=C
+PATH="/usr/sbin:/usr/bin:/sbin:/bin"
+
+if [ -r "/lib/functions.sh" ]
+then
+       . "/lib/functions.sh"
+       ban_sshdaemon="$(uci_get banip extra ban_sshdaemon "dropbear")"
+fi
+ban_ver="${1}"
+ban_log="$(command -v logread)"
+
+if [ -x "${ban_log}" ]
+then
+       logger -p "info" -t "banIP-${ban_ver}[${$}]" "log/banIP service started"
+       "${ban_log}" -f -e "${ban_sshdaemon}\|luci: failed login" | \
+               { grep -qE "Exit before auth|luci: failed login|[0-9]+ \[preauth\]$"; [ $? -eq 0 ] && /etc/init.d/banip refresh; }
+else
+       logger -p "err" -t "banIP-${ban_ver}[${$}]" "can't start log/banIP service"
+fi
index c86f74d70eb4cd1558cd9cbb7fb2fa2ea6ba51bb..8634b19df60441175004205ac0024b272308f3df 100755 (executable)
@@ -6,22 +6,26 @@
 # You should have received a copy of the GNU General Public License
 # along with this program. If not, see <http://www.gnu.org/licenses/>.
 
+# (s)hellcheck exceptions
+# shellcheck disable=1091 disable=2039 disable=2143 disable=2181 disable=2188
+
 # set initial defaults
 #
 LC_ALL=C
 PATH="/usr/sbin:/usr/bin:/sbin:/bin"
-ban_ver="0.1.3"
-ban_sysver="unknown"
+ban_ver="0.3.0"
+ban_basever=""
 ban_enabled=0
 ban_automatic="1"
 ban_sources=""
 ban_iface=""
 ban_debug=0
-ban_backup=0
-ban_backupboot=0
 ban_backupdir="/mnt"
 ban_maxqueue=4
-ban_fetchutil="uclient-fetch"
+ban_autoblacklist=1
+ban_autowhitelist=1
+ban_realtime="false"
+ban_fetchutil=""
 ban_ip="$(command -v ip)"
 ban_ipt="$(command -v iptables)"
 ban_ipt_save="$(command -v iptables-save)"
@@ -34,25 +38,19 @@ ban_chain="banIP"
 ban_action="${1:-"start"}"
 ban_pidfile="/var/run/banip.pid"
 ban_rtfile="/tmp/ban_runtime.json"
+ban_logservice="/etc/banip/banip.service"
+ban_sshdaemon="dropbear"
 ban_setcnt=0
 ban_cnt=0
-ban_rc=0
 
 # load environment
 #
 f_envload()
 {
-       local sys_call sys_desc sys_model
-
        # get system information
        #
-       sys_call="$(ubus -S call system board 2>/dev/null)"
-       if [ -n "${sys_call}" ]
-       then
-               sys_desc="$(printf '%s' "${sys_call}" | jsonfilter -e '@.release.description')"
-               sys_model="$(printf '%s' "${sys_call}" | jsonfilter -e '@.model')"
-               ban_sysver="${sys_model}, ${sys_desc}"
-       fi
+       ban_sysver="$(ubus -S call system board 2>/dev/null | jsonfilter -e '@.model' -e '@.release.description' | \
+               awk 'BEGIN{ORS=", "}{print $0}' | awk '{print substr($0,1,length($0)-2)}')"
 
        # parse 'global' and 'extra' section by callback
        #
@@ -99,6 +97,14 @@ f_envload()
        config_load banip
        config_foreach parse_config source
 
+       # version check
+       #
+       if [ -z "${ban_basever}" ] || [ "${ban_ver%.*}" != "${ban_basever}" ]
+       then
+               f_log "info" "your banIP config seems to be too old, please update your config with the '--force-maintainer' opkg option"
+               exit 0
+       fi
+
        # create temp directory & files
        #
        f_temp
@@ -107,6 +113,7 @@ f_envload()
        #
        if [ "${ban_enabled}" -eq 0 ]
        then
+               f_bgserv "stop"
                f_jsnup disabled
                f_ipset destroy
                f_rmbackup
@@ -120,56 +127,82 @@ f_envload()
 #
 f_envcheck()
 {
-       local ssl_lib tmp
+       local util utils packages tmp cnt=0
+
+       # check backup directory
+       #
+       if [ ! -d "${ban_backupdir}" ]
+       then
+               f_log "err" "the backup directory '${ban_backupdir}' does not exist/is not mounted yet, please create the directory or raise the 'ban_triggerdelay' to defer the banIP start"
+       fi
 
        # check fetch utility
        #
-       case "${ban_fetchutil}" in
-               uclient-fetch)
-                       if [ -f "/lib/libustream-ssl.so" ]
+       if [ -z "${ban_fetchutil}" ]
+       then
+               utils="aria2c curl wget uclient-fetch"
+               packages="$(opkg list-installed 2>/dev/null)"
+               for util in ${utils}
+               do
+                       if { [ "${util}" = "uclient-fetch" ] && [ -n "$(printf "%s\\n" "${packages}" | grep "^libustream-")" ]; } || \
+                               { [ "${util}" = "wget" ] && [ -n "$(printf "%s\\n" "${packages}" | grep "^wget -")" ]; } || \
+                               { [ "${util}" != "uclient-fetch" ] && [ "${util}" != "wget" ]; }
                        then
-                               ban_fetchparm="${ban_fetchparm:-"--timeout=20 --no-check-certificate -O"}"
-                               ssl_lib="libustream-ssl"
-                       else
-                               ban_fetchparm="${ban_fetchparm:-"--timeout=20 -O"}"
+                               ban_fetchutil="$(command -v "${util}")"
+                               if [ -x "${ban_fetchutil}" ]
+                               then
+                                       break
+                               fi
                        fi
+                       unset ban_fetchutil util
+               done
+       else
+               util="${ban_fetchutil}"
+               ban_fetchutil="$(command -v "${util}")"
+               if [ ! -x "${ban_fetchutil}" ]
+               then
+                       unset ban_fetchutil util
+               fi
+       fi
+       case "${util}" in
+               "aria2c")
+                       ban_fetchparm="${ban_fetchparm:-"--timeout=20 --allow-overwrite=true --auto-file-renaming=false --check-certificate=true --dir=" " -o"}"
                ;;
-               wget)
-                       ban_fetchparm="${ban_fetchparm:-"--no-cache --no-cookies --max-redirect=0 --timeout=20 --no-check-certificate -O"}"
-                       ssl_lib="built-in"
-               ;;
-               wget-nossl)
-                       ban_fetchparm="${ban_fetchparm:-"--no-cache --no-cookies --max-redirect=0 --timeout=20 -O"}"
-               ;;
-               busybox)
-                       ban_fetchparm="${ban_fetchparm:-"-O"}"
+               "curl")
+                       ban_fetchparm="${ban_fetchparm:-"--connect-timeout 20 -o"}"
                ;;
-               curl)
-                       ban_fetchparm="${ban_fetchparm:-"--connect-timeout 20 --insecure -o"}"
-                       ssl_lib="built-in"
+               "uclient-fetch")
+                       ban_fetchparm="${ban_fetchparm:-"--timeout=20 -O"}"
                ;;
-               aria2c)
-                       ban_fetchparm="${ban_fetchparm:-"--timeout=20 --allow-overwrite=true --auto-file-renaming=false --check-certificate=false -o"}"
-                       ssl_lib="built-in"
+               "wget")
+                       ban_fetchparm="${ban_fetchparm:-"--no-cache --no-cookies --max-redirect=0 --timeout=20 -O"}"
                ;;
        esac
-       ban_fetchutil="$(command -v "${ban_fetchutil}")"
-       ban_fetchinfo="${ban_fetchutil:-"-"} (${ssl_lib:-"-"})"
-
-       if [ ! -x "${ban_fetchutil}" ] || [ -z "${ban_fetchutil}" ] || [ -z "${ban_fetchparm}" ]
+       if [ -z "${ban_fetchutil}" ] || [ -z "${ban_fetchparm}" ]
        then
-               f_log "err" "download utility not found, please install 'uclient-fetch' with 'libustream-mbedtls' or the full 'wget' package"
+               f_log "err" "download utility with SSL support not found, please install 'uclient-fetch' with a 'libustream-*' variant or another download utility like 'wget', 'curl' or 'aria2'"
        fi
 
        # get wan device and wan subnets
        #
        if [ "${ban_automatic}" = "1" ]
        then
-               network_find_wan ban_iface
-               if [ -z "${ban_iface}" ]
-               then
-                       network_find_wan6 ban_iface
-               fi
+               while [ "${cnt}" -le 30 ]
+               do
+                       network_find_wan ban_iface
+                       if [ -z "${ban_iface}" ]
+                       then
+                               network_find_wan6 ban_iface
+                       fi
+                       if [ -z "${ban_iface}" ]
+                       then
+                               network_flush_cache
+                               cnt=$((cnt+1))
+                               sleep 1
+                       else
+                               break
+                       fi
+               done
        fi
 
        for iface in ${ban_iface}
@@ -200,29 +233,30 @@ f_envcheck()
        if [ -z "${ban_iface}" ] || [ -z "${ban_dev}" ]
        then
                f_log "err" "wan interface(s)/device(s) (${ban_iface:-"-"}/${ban_dev:-"-"}) not found, please please check your configuration"
+       else
+               ban_dev_all="$(${ban_ip} link show | awk 'BEGIN{FS="[@: ]"}/^[0-9:]/{if(($3!="lo")&&($3!="br-lan")){print $3}}')"
+               f_jsnup "running"
+               f_log "info" "start banIP processing (${ban_action})"
        fi
-       ban_dev_all="$(${ban_ip} link show | awk 'BEGIN{FS="[@: ]"}/^[0-9:]/{if(($3!="lo")&&($3!="br-lan")){print $3}}')"
-       uci_set banip global ban_iface "${ban_iface}"
-       uci_commit banip
-
-       f_jsnup "running"
-       f_log "info" "start banIP processing (${ban_action})"
 }
 
 # create temporary files and directories
 #
 f_temp()
 {
-       if [ -z "${ban_tmpdir}" ]
+       if [ -d "/tmp" ] && [ -z "${ban_tmpdir}" ]
        then
                ban_tmpdir="$(mktemp -p /tmp -d)"
                ban_tmpload="$(mktemp -p "${ban_tmpdir}" -tu)"
                ban_tmpfile="$(mktemp -p "${ban_tmpdir}" -tu)"
+       elif [ ! -d "/tmp" ]
+       then
+               f_log "err" "the temp directory '/tmp' does not exist/is not mounted yet, please create the directory or raise the 'ban_triggerdelay' to defer the banIP start"
        fi
 
        if [ ! -s "${ban_pidfile}" ]
        then
-               printf '%s' "${$}" > "${ban_pidfile}"
+               printf "%s" "${$}" > "${ban_pidfile}"
        fi
 }
 
@@ -257,7 +291,7 @@ f_iptrule()
        then
                if [ -x "${ban_ipt6}" ]
                then
-                       rc="$("${ban_ipt6}" "${timeout}" -C ${rule} 2>/dev/null; printf '%u' ${?})"
+                       rc="$("${ban_ipt6}" "${timeout}" -C ${rule} 2>/dev/null; printf "%u" ${?})"
 
                        if { [ "${rc}" -ne 0 ] && { [ "${action}" = "-A" ] || [ "${action}" = "-I" ]; } } || \
                                { [ "${rc}" -eq 0 ] && [ "${action}" = "-D" ]; }
@@ -268,7 +302,7 @@ f_iptrule()
        else
                if [ -x "${ban_ipt}" ]
                then
-                       rc="$("${ban_ipt}" "${timeout}" -C ${rule} 2>/dev/null; printf '%u' ${?})"
+                       rc="$("${ban_ipt}" "${timeout}" -C ${rule} 2>/dev/null; printf "%u" ${?})"
 
                        if { [ "${rc}" -ne 0 ] && { [ "${action}" = "-A" ] || [ "${action}" = "-I" ]; } } || \
                                { [ "${rc}" -eq 0 ] && [ "${action}" = "-D" ]; }
@@ -326,9 +360,9 @@ f_iptadd()
                        done
                fi
        else
-               if [ -x "${ban_ipset}" ] && [ -n "$("${ban_ipset}" -n list "${src_name}" 2>/dev/null)" ]
+               if [ -x "${ban_ipset}" ] && [ -n "$("${ban_ipset}" -q -n list "${src_name}")" ]
                then
-                       "${ban_ipset}" destroy "${src_name}"
+                       "${ban_ipset}" -q destroy "${src_name}"
                fi
        fi
 }
@@ -337,7 +371,7 @@ f_iptadd()
 #
 f_ipset()
 {
-       local rc cnt cnt_ip cnt_cidr size source action ruleset ruleset_6 rule timeout="-w 5" mode="${1}"
+       local out_rc source action ruleset ruleset_6 rule cnt=0 cnt_ip=0 cnt_cidr=0 timeout="-w 5" mode="${1}" in_rc="${src_rc:-0}"
 
        if [ "${src_name%_6*}" = "whitelist" ]
        then
@@ -347,32 +381,33 @@ f_ipset()
        fi
 
        case "${mode}" in
-               backup)
-                       ban_rc=4
-                       if [ -d "${ban_backupdir}" ]
-                       then
-                               gzip -cf "${tmp_load}" 2>/dev/null > "${ban_backupdir}/banIP.${src_name}.gz"
-                               ban_rc=${?}
-                       fi
-                       f_log "debug" "f_ipset ::: name: ${src_name:-"-"}, mode: ${mode:-"-"}, rc: ${ban_rc}"
+               "backup")
+                       gzip -cf "${tmp_load}" 2>/dev/null > "${ban_backupdir}/banIP.${src_name}.gz"
+                       out_rc="${?:-"${in_rc}"}"
+                       f_log "debug" "f_ipset ::: name: ${src_name:-"-"}, mode: ${mode:-"-"}, out_rc: ${out_rc}"
+                       return "${out_rc}"
                ;;
-               restore)
-                       ban_rc=4
-                       if [ -d "${ban_backupdir}" ] && [ -f "${ban_backupdir}/banIP.${src_name}.gz" ]
+               "restore")
+                       if [ -f "${ban_backupdir}/banIP.${src_name}.gz" ]
                        then
-                               gunzip -cf "${ban_backupdir}/banIP.${src_name}.gz" 2>/dev/null > "${tmp_load}"
-                               ban_rc=${?}
+                               zcat "${ban_backupdir}/banIP.${src_name}.gz" 2>/dev/null > "${tmp_load}"
+                               out_rc="${?}"
                        fi
-                       f_log "debug" "f_ipset ::: name: ${src_name:-"-"}, mode: ${mode:-"-"}, rc: ${ban_rc}"
+                       out_rc="${out_rc:-"${in_rc}"}"
+                       f_log "debug" "f_ipset ::: name: ${src_name:-"-"}, mode: ${mode:-"-"}, out_rc: ${out_rc}"
+                       return "${out_rc}"
                ;;
-               remove)
-                       if [ -d "${ban_backupdir}" ] && [ -f "${ban_backupdir}/banIP.${src_name}.gz" ]
+               "remove")
+                       if [ -f "${ban_backupdir}/banIP.${src_name}.gz" ]
                        then
                                rm -f "${ban_backupdir}/banIP.${src_name}.gz"
+                               out_rc="${?}"
                        fi
-                       f_log "debug" "f_ipset ::: name: ${src_name:-"-"}, mode: ${mode:-"-"}"
+                       out_rc="${out_rc:-"${in_rc}"}"
+                       f_log "debug" "f_ipset ::: name: ${src_name:-"-"}, mode: ${mode:-"-"}, out_rc: ${out_rc}"
+                       return "${out_rc}"
                ;;
-               initial)
+               "initial")
                        if [ -x "${ban_ipt}" ] && [ -z "$("${ban_ipt}" "${timeout}" -nL "${ban_chain}" 2>/dev/null)" ]
                        then
                                "${ban_ipt}" "${timeout}" -N "${ban_chain}"
@@ -385,7 +420,6 @@ f_ipset()
                                        f_iptrule "-D" "${rule} -j ${ban_chain}"
                                done
                        fi
-
                        if [ -x "${ban_ipt6}" ] && [ -z "$("${ban_ipt6}" "${timeout}" -nL "${ban_chain}" 2>/dev/null)" ]
                        then
                                "${ban_ipt6}" "${timeout}" -N "${ban_chain}"
@@ -400,57 +434,63 @@ f_ipset()
                        fi
                        f_log "debug" "f_ipset ::: name: -, mode: ${mode:-"-"}, chain: ${ban_chain:-"-"}, ruleset: ${ruleset:-"-"}, ruleset_6: ${ruleset_6:-"-"}"
                ;;
-               create)
-                       cnt="$(wc -l 2>/dev/null < "${tmp_file}")"
-                       cnt_cidr="$(grep -cF "/" "${tmp_file}")"
-                       cnt_ip="$((cnt-cnt_cidr))"
-                       size="$((cnt/4))"
-
-                       if [ "${cnt}" -gt 0 ]
+               "create")
+                       if [ -x "${ban_ipset}" ]
                        then
-                               if [ -x "${ban_ipset}" ] && [ -z "$("${ban_ipset}" -n list "${src_name}" 2>/dev/null)" ]
+                               if [ -s "${tmp_file}" ] && [ -z "$("${ban_ipset}" -q -n list "${src_name}")" ]
                                then
-                                       "${ban_ipset}" create "${src_name}" hash:"${src_settype}" hashsize "${size}" maxelem 262144 family "${src_setipv}" counters
+                                       "${ban_ipset}" -q create "${src_name}" hash:"${src_settype}" hashsize 64 maxelem 262144 family "${src_setipv}" counters
                                else
-                                       "${ban_ipset}" flush "${src_name}"
+                                       "${ban_ipset}" -q flush "${src_name}"
                                fi
-
-                               "${ban_ipset}" -! restore < "${tmp_file}"
-                               printf "%s\n" "1" > "${tmp_set}"
-                               printf "%s\n" "${cnt}" > "${tmp_cnt}"
+                               if [ -s "${tmp_file}" ]
+                               then
+                                       "${ban_ipset}" -! restore < "${tmp_file}"
+                                       out_rc="${?}"
+                                       "${ban_ipset}" -q save "${src_name}" > "${tmp_file}"
+                                       cnt="$(($(wc -l 2>/dev/null < "${tmp_file}")-1))"
+                                       cnt_cidr="$(grep -cF "/" "${tmp_file}")"
+                                       cnt_ip="$((cnt-cnt_cidr))"
+                                       printf "%s\\n" "1" > "${tmp_set}"
+                                       printf "%s\\n" "${cnt}" > "${tmp_cnt}"
+                               fi
+                               f_iptadd
                        fi
-                       f_iptadd
                        end_ts="$(date +%s)"
-                       f_log "debug" "f_ipset ::: name: ${src_name:-"-"}, mode: ${mode:-"-"}, settype: ${src_settype:-"-"}, setipv: ${src_setipv:-"-"}, ruletype: ${src_ruletype:-"-"}, count(sum/ip/cidr): ${cnt:-0}/${cnt_ip:-0}/${cnt_cidr:-0}, time(s): $((end_ts-start_ts))"
+                       out_rc="${out_rc:-"${in_rc}"}"
+                       f_log "debug" "f_ipset ::: name: ${src_name:-"-"}, mode: ${mode:-"-"}, settype: ${src_settype:-"-"}, setipv: ${src_setipv:-"-"}, ruletype: ${src_ruletype:-"-"}, count(sum/ip/cidr): ${cnt}/${cnt_ip}/${cnt_cidr}, time: $((end_ts-start_ts)), out_rc: ${out_rc}"
                ;;
-               refresh)
-                       if [ -x "${ban_ipset}" ] && [ -n "$("${ban_ipset}" -n list "${src_name}" 2>/dev/null)" ]
+               "refresh")
+                       if [ -x "${ban_ipset}" ] && [ -n "$("${ban_ipset}" -q -n list "${src_name}")" ]
                        then
-                               "${ban_ipset}" save "${src_name}" > "${tmp_file}"
+                               "${ban_ipset}" -q save "${src_name}" > "${tmp_file}"
+                               out_rc="${?}"
                                if [ -s "${tmp_file}" ]
                                then
                                        cnt="$(($(wc -l 2>/dev/null < "${tmp_file}")-1))"
                                        cnt_cidr="$(grep -cF "/" "${tmp_file}")"
                                        cnt_ip="$((cnt-cnt_cidr))"
-                                       printf "%s\n" "1" > "${tmp_set}"
-                                       printf "%s\n" "${cnt}" > "${tmp_cnt}"
+                                       printf "%s\\n" "1" > "${tmp_set}"
+                                       printf "%s\\n" "${cnt}" > "${tmp_cnt}"
                                fi
                                f_iptadd
                        fi
                        end_ts="$(date +%s)"
-                       f_log "debug" "f_ipset ::: name: ${src_name:-"-"}, mode: ${mode:-"-"}, count: ${cnt:-0}/${cnt_ip:-0}/${cnt_cidr:-0}, time(s): $((end_ts-start_ts))"
+                       out_rc="${out_rc:-"${in_rc}"}"
+                       f_log "debug" "f_ipset ::: name: ${src_name:-"-"}, mode: ${mode:-"-"}, count: ${cnt}/${cnt_ip}/${cnt_cidr}, time: $((end_ts-start_ts)), out_rc: ${out_rc}"
+                       return "${out_rc}"
                ;;
-               flush)
+               "flush")
                        f_iptadd "remove"
 
-                       if [ -x "${ban_ipset}" ] && [ -n "$("${ban_ipset}" -n list "${src_name}" 2>/dev/null)" ]
+                       if [ -x "${ban_ipset}" ] && [ -n "$("${ban_ipset}" -q -n list "${src_name}")" ]
                        then
-                               "${ban_ipset}" flush "${src_name}"
-                               "${ban_ipset}" destroy "${src_name}"
+                               "${ban_ipset}" -q flush "${src_name}"
+                               "${ban_ipset}" -q destroy "${src_name}"
                        fi
                        f_log "debug" "f_ipset ::: name: ${src_name:-"-"}, mode: ${mode:-"-"}"
                ;;
-               destroy)
+               "destroy")
                        if [ -x "${ban_ipt}" ] && [ -x "${ban_ipt_save}" ] && [ -x "${ban_ipt_restore}" ] && \
                                [ -n "$("${ban_ipt}" "${timeout}" -nL "${ban_chain}" 2>/dev/null)" ]
                        then
@@ -458,7 +498,6 @@ f_ipset()
                                "${ban_ipt}" "${timeout}" -F "${ban_chain}"
                                "${ban_ipt}" "${timeout}" -X "${ban_chain}"
                        fi
-
                        if [ -x "${ban_ipt6}" ] && [ -x "${ban_ipt6_save}" ] && [ -x "${ban_ipt6_restore}" ] && \
                                [ -n "$("${ban_ipt6}" "${timeout}" -nL "${ban_chain}" 2>/dev/null)" ]
                        then
@@ -466,12 +505,11 @@ f_ipset()
                                "${ban_ipt6}" "${timeout}" -F "${ban_chain}"
                                "${ban_ipt6}" "${timeout}" -X "${ban_chain}"
                        fi
-
                        for source in ${ban_sources}
                        do
-                               if [ -x "${ban_ipset}" ] && [ -n "$("${ban_ipset}" -n list "${source}" 2>/dev/null)" ]
+                               if [ -x "${ban_ipset}" ] && [ -n "$("${ban_ipset}" -q -n list "${source}")" ]
                                then
-                                       "${ban_ipset}" destroy "${source}"
+                                       "${ban_ipset}" -q destroy "${source}"
                                fi
                        done
                        f_log "debug" "f_ipset ::: name: ${src_name:-"-"}, mode: ${mode:-"-"}"
@@ -487,36 +525,54 @@ f_log()
 
        if [ -n "${log_msg}" ] && { [ "${class}" != "debug" ] || [ "${ban_debug}" -eq 1 ]; }
        then
-               logger -p "${class}" -t "banIP-[${ban_ver}]" "${log_msg}"
+               logger -p "${class}" -t "banIP-${ban_ver}[${$}]" "${log_msg}"
                if [ "${class}" = "err" ]
                then
                        f_jsnup error
                        f_ipset destroy
                        f_rmbackup
                        f_rmtemp
-                       logger -p "${class}" -t "banIP-[${ban_ver}]" "Please also check 'https://github.com/openwrt/packages/blob/master/net/banip/files/README.md'"
+                       logger -p "${class}" -t "banIP-${ban_ver}[${$}]" "Please also check 'https://github.com/openwrt/packages/blob/master/net/banip/files/README.md'"
                        exit 1
                fi
        fi
 }
 
+# start log service to trace failed ssh/luci logins
+#
+f_bgserv()
+{
+       local bg_pid status="${1}"
+
+       bg_pid="$(pgrep -f "^/bin/sh ${ban_logservice}.*|^logread -f -e ${ban_sshdaemon}\|luci: failed login|^grep -qE Exit before auth|luci: failed login|[0-9]+ \[preauth\]$" | awk '{ORS=" "; print $1}')"
+       if [ -z "${bg_pid}" ] && [ "${status}" = "start" ] \
+               && [ -x "${ban_logservice}" ] && [ "${ban_realtime}" = "true" ]
+       then
+               ( "${ban_logservice}" "${ban_ver}" &)
+       elif [ -n "${bg_pid}" ] && [ "${status}" = "stop" ] 
+       then
+               kill -HUP "${bg_pid}" 2>/dev/null
+       fi
+       f_log "debug" "f_bgserv ::: status: ${status:-"-"}, bg_pid: ${bg_pid:-"-"}, ban_realtime: ${ban_realtime:-"-"}, log_service: ${ban_logservice:-"-"}"
+}
+
 # main function for banIP processing
 #
 f_main()
 {
        local pid pid_list start_ts end_ts ip tmp_raw tmp_cnt tmp_load tmp_file mem_total mem_free cnt=1
-       local src_name src_on src_url src_rset src_setipv src_settype src_ruletype src_cat src_log src_addon
-       local wan_input wan_forward lan_input lan_forward target_src target_dst log_content
+       local src_name src_on src_url src_rset src_setipv src_settype src_ruletype src_cat src_log src_addon src_ts src_rc
+       local wan_input wan_forward lan_input lan_forward target_src target_dst ssh_log luci_log
 
-       log_content="$(logread -e "dropbear")"
+       ssh_log="$(logread -e "${ban_sshdaemon}" | grep -o "${ban_sshdaemon}.*" | sed 's/:[0-9]*$//g')"
+       luci_log="$(logread -e "luci: failed login" | grep -o "luci:.*")"
        mem_total="$(awk '/^MemTotal/ {print int($2/1000)}' "/proc/meminfo" 2>/dev/null)"
        mem_free="$(awk '/^MemFree/ {print int($2/1000)}' "/proc/meminfo" 2>/dev/null)"
-       f_log "debug" "f_main  ::: fetch_util: ${ban_fetchinfo:-"-"}, fetch_parm: ${ban_fetchparm:-"-"}, interface(s): ${ban_iface:-"-"}, device(s): ${ban_dev:-"-"}, all_devices: ${ban_dev_all:-"-"}, backup: ${ban_backup:-"-"}, backup_boot: ${ban_backupboot:-"-"}, backup_dir: ${ban_backupdir:-"-"}, mem_total: ${mem_total:-0}, mem_free: ${mem_free:-0}, max_queue: ${ban_maxqueue}"
-
-       f_ipset initial
+       f_log "debug" "f_main  ::: fetch_util: ${ban_fetchutil:-"-"}, fetch_parm: ${ban_fetchparm:-"-"}, ssh_daemon: ${ban_sshdaemon}, interface(s): ${ban_iface:-"-"}, device(s): ${ban_dev:-"-"}, all_devices: ${ban_dev_all:-"-"}, backup_dir: ${ban_backupdir:-"-"}, mem_total: ${mem_total:-0}, mem_free: ${mem_free:-0}, max_queue: ${ban_maxqueue}"
 
        # main loop
        #
+       f_ipset initial
        for src_name in ${ban_sources}
        do
                unset src_on
@@ -524,9 +580,9 @@ f_main()
                then
                        if [ -x "${ban_ipt6}" ]
                        then
-                               src_on="$(eval printf '%s' \"\${ban_src_on_6_${src_name%_6*}\}\")"
-                               src_url="$(eval printf '%s' \"\${ban_src_6_${src_name%_6*}\}\")"
-                               src_rset="$(eval printf '%s' \"\${ban_src_rset_6_${src_name%_6*}\}\")"
+                               src_on="$(eval printf "%s" \"\$\{ban_src_on_6_${src_name%_6*}\}\")"
+                               src_url="$(eval printf "%s" \"\$\{ban_src_6_${src_name%_6*}\}\")"
+                               src_rset="$(eval printf "%s" \"\$\{ban_src_rset_6_${src_name%_6*}\}\")"
                                src_setipv="inet6"
                                wan_input="${ban_wan_input_chain_6:-"input_wan_rule"}"
                                wan_forward="${ban_wan_forward_chain_6:-"forwarding_wan_rule"}"
@@ -538,9 +594,9 @@ f_main()
                else
                        if [ -x "${ban_ipt}" ]
                        then
-                               src_on="$(eval printf '%s' \"\${ban_src_on_${src_name}\}\")"
-                               src_url="$(eval printf '%s' \"\${ban_src_${src_name}\}\")"
-                               src_rset="$(eval printf '%s' \"\${ban_src_rset_${src_name}\}\")"
+                               src_on="$(eval printf "%s" \"\$\{ban_src_on_${src_name}\}\")"
+                               src_url="$(eval printf "%s" \"\$\{ban_src_${src_name}\}\")"
+                               src_rset="$(eval printf "%s" \"\$\{ban_src_rset_${src_name}\}\")"
                                src_setipv="inet"
                                wan_input="${ban_wan_input_chain:-"input_wan_rule"}"
                                wan_forward="${ban_wan_forward_chain:-"forwarding_wan_rule"}"
@@ -550,10 +606,11 @@ f_main()
                                target_dst="${ban_target_dst:-"REJECT"}"
                        fi
                fi
-               src_settype="$(eval printf '%s' \"\${ban_src_settype_${src_name%_6*}\}\")"
-               src_ruletype="$(eval printf '%s' \"\${ban_src_ruletype_${src_name%_6*}\}\")"
-               src_cat="$(eval printf '%s' \"\${ban_src_cat_${src_name%_6*}\}\")"
+               src_settype="$(eval printf "%s" \"\$\{ban_src_settype_${src_name%_6*}\}\")"
+               src_ruletype="$(eval printf "%s" \"\$\{ban_src_ruletype_${src_name%_6*}\}\")"
+               src_cat="$(eval printf "%s" \"\$\{ban_src_cat_${src_name%_6*}\}\")"
                src_addon=""
+               src_rc=4
                tmp_load="${ban_tmpload}.${src_name}"
                tmp_file="${ban_tmpfile}.${src_name}"
                tmp_raw="${tmp_load}.raw"
@@ -570,55 +627,78 @@ f_main()
                        f_ipset flush
                        f_ipset remove
                        continue
-               elif [ "${ban_action}" = "refresh" ]
+               elif [ "${ban_action}" = "refresh" ] && [ ! -f "${src_url}" ]
                then
+                       start_ts="$(date +%s)"
                        f_ipset refresh
-                       continue
+                       if [ "${?}" -eq 0 ]
+                       then
+                               continue
+                       fi
                fi
 
                # download queue processing
                #
                (
                        start_ts="$(date +%s)"
-                       if [ ! -f "${src_url}" ] && [ ${ban_backup} -eq 1 ] && [ ${ban_backupboot} -eq 1 ] && [ "${ban_action}" = "start" ]
+                       if [ "${ban_action}" = "start" ] && [ ! -f "${src_url}" ]
                        then
                                f_ipset restore
                        fi
-
-                       if [ ${ban_rc} -ne 0 ] || [ ! -s "${tmp_load}" ]
+                       src_rc="${?}"
+                       if [ "${src_rc}" -ne 0 ] || [ ! -s "${tmp_load}" ]
                        then
                                if [ -f "${src_url}" ]
                                then
                                        src_log="$(cat "${src_url}" 2>/dev/null > "${tmp_load}")"
-                                       ban_rc=${?}
+                                       src_rc="${?}"
                                        case "${src_name}" in
-                                               whitelist)
+                                               "whitelist")
                                                        src_addon="${ban_subnets}"
                                                ;;
-                                               whitelist_6)
+                                               "whitelist_6")
                                                        src_addon="${ban_subnets6}"
                                                ;;
-                                               blacklist)
-                                                       pid_list="$(printf "%s\n" "${log_content}" | grep -F "Exit before auth" | awk 'match($0,/(\[[0-9]+\])/){ORS=" ";print substr($0,RSTART,RLENGTH)}')"
-                                                       for pid in ${pid_list}
-                                                       do
-                                                               src_addon="${src_addon} $(printf "%s\n" "${log_content}" | grep -F "${pid}" | awk 'match($0,/([0-9]{1,3}\.){3}[0-9]{1,3}/){ORS=" ";print substr($0,RSTART,RLENGTH)}')"
-                                                       done
+                                               "blacklist")
+                                                       if [ "${ban_sshdaemon}" = "dropbear" ]
+                                                       then
+                                                               pid_list="$(printf "%s\\n" "${ssh_log}" | grep -F "Exit before auth" | awk 'match($0,/(\[[0-9]+\])/){ORS=" ";print substr($0,RSTART,RLENGTH)}')"
+                                                               for pid in ${pid_list}
+                                                               do
+                                                                       src_addon="${src_addon} $(printf "%s\\n" "${ssh_log}" | grep -F "${pid}" | awk 'match($0,/([0-9]{1,3}\.){3}[0-9]{1,3}$/){ORS=" ";print substr($0,RSTART,RLENGTH);exit}')"
+                                                               done
+                                                       elif [ "${ban_sshdaemon}" = "sshd" ]
+                                                       then
+                                                               src_addon="$(printf "%s\\n" "${ssh_log}" | grep -E "[0-9]+ \[preauth\]$" | awk 'match($0,/([0-9]{1,3}\.){3}[0-9]{1,3}$/){ORS=" ";print substr($0,RSTART,RLENGTH)}')"
+                                                       fi
+                                                       src_addon="${src_addon} $(printf "%s\\n" "${luci_log}" | awk 'match($0,/([0-9]{1,3}\.){3}[0-9]{1,3}$/){ORS=" ";print substr($0,RSTART,RLENGTH)}')"
                                                ;;
-                                               blacklist_6)
-                                                       pid_list="$(printf "%s\n" "${log_content}" | grep -F "Exit before auth" | awk 'match($0,/(\[[0-9]+\])/){ORS=" ";print substr($0,RSTART,RLENGTH)}')"
-                                                       for pid in ${pid_list}
-                                                       do
-                                                               src_addon="${src_addon} $(printf "%s\n" "${log_content}" | grep -F "${pid}" | awk 'match($0,/([0-9a-fA-F]{0,4}:){1,7}[0-9a-fA-F]{0,4}/){ORS=" ";print substr($0,RSTART,RLENGTH)}')"
-                                                       done
+                                               "blacklist_6")
+                                                       if [ "${ban_sshdaemon}" = "dropbear" ]
+                                                       then
+                                                               pid_list="$(printf "%s\\n" "${ssh_log}" | grep -F "Exit before auth" | awk 'match($0,/(\[[0-9]+\])/){ORS=" ";print substr($0,RSTART,RLENGTH)}')"
+                                                               for pid in ${pid_list}
+                                                               do
+                                                                       src_addon="${src_addon} $(printf "%s\\n" "${ssh_log}" | grep -F "${pid}" | awk 'match($0,/(([0-9A-f]{0,4}::?){1,7}[0-9A-f]{0,4}$)/){ORS=" ";print substr($0,RSTART,RLENGTH);exit}')"
+                                                               done
+                                                       elif [ "${ban_sshdaemon}" = "sshd" ]
+                                                       then
+                                                               src_addon="$(printf "%s\\n" "${ssh_log}" | grep -E "[0-9]+ \[preauth\]$" | awk 'match($0,/(([0-9A-f]{0,4}::?){1,7}[0-9A-f]{0,4}$)/){ORS=" ";print substr($0,RSTART,RLENGTH)}')"
+                                                       fi
+                                                       src_addon="${src_addon} $(printf "%s\\n" "${luci_log}" | awk 'match($0,/(([0-9A-f]{0,4}::?){1,7}[0-9A-f]{0,4}$)/){ORS=" ";print substr($0,RSTART,RLENGTH)}')"
                                                ;;
                                        esac
                                        for ip in ${src_addon}
                                        do
                                                if [ -z "$(grep -F "${ip}" "${src_url}")" ]
                                                then
-                                                       printf '%s\n' "${ip}" >> "${tmp_load}"
-                                                       printf '%s\n' "${ip}" >> "${src_url}"
+                                                       printf "%s\\n" "${ip}" >> "${tmp_load}"
+                                                       if { [ "${src_name//_*/}" = "blacklist" ] && [ "${ban_autoblacklist}" -eq 1 ]; } || \
+                                                               { [ "${src_name//_*/}" = "whitelist" ] && [ "${ban_autowhitelist}" -eq 1 ]; }
+                                                       then
+                                                               src_ts="# auto-added $(date "+%d.%m.%Y %H:%M:%S")"
+                                                               printf "%s %s\\n" "${ip}" "${src_ts}" >> "${src_url}"
+                                                       fi
                                                fi
                                        done
                                elif [ -n "${src_cat}" ]
@@ -628,18 +708,18 @@ f_main()
                                                for as in ${src_cat}
                                                do
                                                        src_log="$("${ban_fetchutil}" ${ban_fetchparm} "${tmp_raw}" "${src_url}AS${as}" 2>&1)"
-                                                       ban_rc=${?}
-                                                       if [ ${ban_rc} -eq 0 ]
+                                                       src_rc="${?}"
+                                                       if [ "${src_rc}" -eq 0 ]
                                                        then
                                                                jsonfilter -i "${tmp_raw}" -e '@.data.prefixes.*.prefix' 2>/dev/null >> "${tmp_load}"
                                                        else
                                                                break
                                                        fi
                                                done
-                                               if [ ${ban_rc} -eq 0 ] && [ ${ban_backup} -eq 1 ]
+                                               if [ "${src_rc}" -eq 0 ]
                                                then
                                                        f_ipset backup
-                                               elif [ ${ban_backup} -eq 1 ]
+                                               elif [ "${ban_action}" != "start" ]
                                                then
                                                        f_ipset restore
                                                fi
@@ -647,8 +727,8 @@ f_main()
                                                for co in ${src_cat}
                                                do
                                                        src_log="$("${ban_fetchutil}" ${ban_fetchparm} "${tmp_raw}" "${src_url}${co}&v4_format=prefix" 2>&1)"
-                                                       ban_rc=${?}
-                                                       if [ ${ban_rc} -eq 0 ]
+                                                       src_rc="${?}"
+                                                       if [ "${src_rc}" -eq 0 ]
                                                        then
                                                                if [ "${src_name##*_}" = "6" ]
                                                                then
@@ -660,53 +740,62 @@ f_main()
                                                                break
                                                        fi
                                                done
-                                               if [ ${ban_rc} -eq 0 ] && [ ${ban_backup} -eq 1 ]
+                                               if [ "${src_rc}" -eq 0 ]
                                                then
                                                        f_ipset backup
-                                               elif [ ${ban_backup} -eq 1 ]
+                                               elif [ "${ban_action}" != "start" ]
                                                then
                                                        f_ipset restore
                                                fi
                                        fi
                                else
                                        src_log="$("${ban_fetchutil}" ${ban_fetchparm} "${tmp_raw}" "${src_url}" 2>&1)"
-                                       ban_rc=${?}
-                                       if [ ${ban_rc} -eq 0 ]
+                                       src_rc="${?}"
+                                       if [ "${src_rc}" -eq 0 ]
                                        then
                                                zcat "${tmp_raw}" 2>/dev/null > "${tmp_load}"
-                                               ban_rc=${?}
-                                               if [ ${ban_rc} -ne 0 ]
+                                               src_rc="${?}"
+                                               if [ "${src_rc}" -ne 0 ]
                                                then
                                                        mv -f "${tmp_raw}" "${tmp_load}"
-                                                       ban_rc=${?}
+                                                       src_rc="${?}"
                                                fi
-                                               if [ ${ban_rc} -eq 0 ] && [ ${ban_backup} -eq 1 ]
+                                               if [ "${src_rc}" -eq 0 ]
                                                then
                                                        f_ipset backup
+                                                       src_rc="${?}"
                                                fi
-                                       elif [ ${ban_backup} -eq 1 ]
+                                       elif [ "${ban_action}" != "start" ]
                                        then
                                                f_ipset restore
+                                               src_rc="${?}"
                                        fi
                                fi
                        fi
 
-                       if [ ${ban_rc} -eq 0 ]
+                       if [ "${src_rc}" -eq 0 ]
                        then
                                awk "${src_rset}" "${tmp_load}" 2>/dev/null > "${tmp_file}"
-                               ban_rc=${?}
-                               if [ ${ban_rc} -eq 0 ]
+                               src_rc="${?}"
+                               if [ "${src_rc}" -eq 0 ]
                                then
                                        f_ipset create
-                               else
+                                       src_rc="${?}"
+                               elif [ "${ban_action}" != "refresh" ]
+                               then
                                        f_ipset refresh
+                                       src_rc="${?}"
                                fi
                        else
-                               src_log="$(printf '%s' "${src_log}" | awk '{ORS=" ";print $0}')"
-                               f_log "debug" "f_main  ::: name: ${src_name}, url: ${src_url}, rc: ${ban_rc}, log: ${src_log:-"-"}"
-                               f_ipset refresh
+                               src_log="$(printf "%s" "${src_log}" | awk '{ORS=" ";print $0}')"
+                               if [ "${ban_action}" != "refresh" ]
+                               then
+                                       f_ipset refresh
+                                       src_rc="${?}"
+                               fi
+                               f_log "debug" "f_main  ::: name: ${src_name}, url: ${src_url}, rc: ${src_rc}, log: ${src_log:-"-"}"
                        fi
-               ) &
+               )&
                hold="$((cnt%ban_maxqueue))"
                if [ "${hold}" -eq 0 ]
                then
@@ -714,53 +803,44 @@ f_main()
                fi
                cnt="$((cnt+1))"
        done
-
        wait
-       if [ "${ban_rc}" -eq 0 ]
-       then
-               for cnt in $(cat "${ban_tmpfile}".*.setcnt 2>/dev/null)
-               do
-                       ban_setcnt="$((ban_setcnt+cnt))"
-               done
-               for cnt in $(cat "${ban_tmpfile}".*.cnt 2>/dev/null)
-               do
-                       ban_cnt="$((ban_cnt+cnt))"
-               done
-               f_log "info" "${ban_setcnt} IPSets with overall ${ban_cnt} IPs/Prefixes loaded successfully (${ban_sysver})"
-       fi
+
+       for cnt in $(cat "${ban_tmpfile}".*.setcnt 2>/dev/null)
+       do
+               ban_setcnt="$((ban_setcnt+cnt))"
+       done
+       for cnt in $(cat "${ban_tmpfile}".*.cnt 2>/dev/null)
+       do
+               ban_cnt="$((ban_cnt+cnt))"
+       done
+       f_log "info" "${ban_setcnt} IPSets with overall ${ban_cnt} IPs/Prefixes loaded successfully (${ban_sysver})"
+       f_bgserv "start"
        f_jsnup
        f_rmtemp
-       exit ${ban_rc}
 }
 
 # update runtime information
 #
 f_jsnup()
 {
-       local rundate mode status="${1:-"enabled"}"
+       local rundate status="${1:-"enabled"}"
 
-       rundate="$(/bin/date "+%d.%m.%Y %H:%M:%S")"
-       mode="normal mode"
+       rundate="$(date "+%d.%m.%Y %H:%M:%S")"
        ban_cntinfo="${ban_setcnt} IPSets with overall ${ban_cnt} IPs/Prefixes"
 
-       if [ "${ban_backupboot}" -eq 1 ]
-       then
-               mode="backup mode"
-       fi
-
        > "${ban_rtfile}"
        json_load_file "${ban_rtfile}" >/dev/null 2>&1
        json_init
        json_add_object "data"
        json_add_string "status" "${status}"
        json_add_string "version" "${ban_ver}"
-       json_add_string "fetch_info" "${ban_fetchinfo:-"-"}"
-       json_add_string "ipset_info" "${ban_cntinfo:-"-"} (${mode})"
+       json_add_string "util_info" "${ban_fetchutil:-"-"}, ${ban_realtime:-"-"}"
+       json_add_string "ipset_info" "${ban_cntinfo:-"-"}"
+       json_add_string "backup_dir" "${ban_backupdir}"
        json_add_string "last_run" "${rundate:-"-"}"
        json_add_string "system" "${ban_sysver}"
        json_close_object
        json_dump > "${ban_rtfile}"
-
        f_log "debug" "f_jsnup ::: status: ${status}, setcnt: ${ban_setcnt}, cnt: ${ban_cnt}"
 }
 
@@ -779,13 +859,15 @@ fi
 #
 f_envload
 case "${ban_action}" in
-       stop)
+       "stop")
+               f_bgserv "stop"
                f_jsnup stopped
                f_ipset destroy
                f_rmbackup
                f_rmtemp
        ;;
-       start|restart|reload|refresh)
+       "start"|"restart"|"reload"|"refresh")
+               f_bgserv "stop"
                f_envcheck
                f_main
        ;;
index 1ca8ab9b69ad429582b0fb08efa706b57163ad26..c5ca841914ac4d806095c0fe6d973856b7a47532 100644 (file)
@@ -7,8 +7,8 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=bcp38
 PKG_VERSION:=5
-PKG_RELEASE:=5
-PKG_LICENCE:=GPL-3.0+
+PKG_RELEASE:=6
+PKG_LICENCE:=GPL-3.0-or-later
 
 include $(INCLUDE_DIR)/package.mk
 
index db9d2573bb064865074067731ed539e8bfd86c01..3bedb09bc9e4ba5c304034b63b8db0c64fd82147 100644 (file)
@@ -19,6 +19,7 @@ PKG_HASH:=6d5155ab347b731640495b1f0df6a4a849e84194d2ef0c2ec6af3879ee1aca2c
 PKG_MAINTAINER:=Philip Prindeville <philipp@redfish-solutions.com>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
+PKG_CPE_ID:=cpe:/a:wildbit:beanstalkd
 
 include $(INCLUDE_DIR)/package.mk
 
diff --git a/net/bfdd/Makefile b/net/bfdd/Makefile
new file mode 100644 (file)
index 0000000..6f2df65
--- /dev/null
@@ -0,0 +1,59 @@
+#
+# Copyright (C) 2019 Lucian Cristian <lucian.cristian@gmail.com>
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=bfdd
+PKG_SOURCE_DATE:=2019-08-22
+PKG_RELEASE:=1
+
+PKG_SOURCE_VERSION:=c54534beb524afc3972039f57b56ec65332b43f7
+PKG_SOURCE_URL:=https://codeload.github.com/rzalamena/bfdd/tar.gz/$(PKG_SOURCE_VERSION)?
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_DATE).tar.gz
+PKG_HASH:=8b65f502163aacfe43bb897464f3bf44bc5af4cc85d23b7c644e329abf89cc5f
+
+PKG_MAINTAINER:=Lucian Cristian <lucian.cristian@gmail.com>
+PKG_LICENSE:=GPL-2.0-or-later
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_SOURCE_VERSION)
+PKG_BUILD_PARALLEL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/bfdd
+  SECTION:=net
+  CATEGORY:=Network
+  SUBMENU:=Routing and Redirection
+  TITLE:=BFD daemon
+  URL:=https://github.com/rzalamena/bfdd
+  DEPENDS:=+libevent2 +libjson-c
+endef
+
+define Package/bfdd/description
+  A port of Cumulus BFD daemon to a more portable daemon.
+
+  Bidirectional Forwarding Detection (BFD) is a network protocol that is used to
+  detect faults between two forwarding engines connected by a link. It provides
+  low-overhead detection of faults even on physical media that doesn't support
+  failure detection of any kind, such as Ethernet, virtual circuits, tunnels and
+  MPLS Label Switched Paths.
+endef
+
+define Package/bfdd/conffiles
+/etc/bfdd/bfdd.json
+endef
+
+define Package/bfdd/install
+       $(INSTALL_DIR) \
+        $(1)/usr/sbin \
+        $(1)/etc/bfdd \
+        $(1)/etc/init.d
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/{bfdd,bfdctl} $(1)/usr/sbin/
+       $(INSTALL_BIN) ./files/bfdd.init $(1)/etc/init.d/bfdd
+       $(INSTALL_CONF) ./files/bfdd.template.json $(1)/etc/bfdd/bfdd.json
+endef
+
+$(eval $(call BuildPackage,bfdd))
diff --git a/net/bfdd/files/bfdd.init b/net/bfdd/files/bfdd.init
new file mode 100644 (file)
index 0000000..a1889c1
--- /dev/null
@@ -0,0 +1,17 @@
+#!/bin/sh /etc/rc.common
+
+START=99
+STOP=10
+USE_PROCD=1
+
+PROG="/usr/sbin/bfdd"
+CONF="/etc/bfdd/bfdd.json"
+
+start_service() {
+    procd_open_instance
+    procd_set_param command $PROG -c $CONF
+    procd_set_param stdout 1
+    procd_set_param stderr 1
+    procd_set_param respawn
+    procd_close_instance
+}
diff --git a/net/bfdd/files/bfdd.template.json b/net/bfdd/files/bfdd.template.json
new file mode 100644 (file)
index 0000000..344c64b
--- /dev/null
@@ -0,0 +1,57 @@
+{
+  "ipv4": [
+    {
+      "_create-only": "optional, defaults to false",
+      "_create-only-help": "If create-only is true then bfdd will return failure if a peer with the same target exists",
+      "create-only": true,
+
+      "_multihop": "optional defaults to false",
+      "multihop": false,
+
+      "_peer-address": "mandatory",
+      "peer-address": "127.0.0.1",
+
+      "_local-address": "mandatory on multihop",
+      "local-address": "127.0.0.1",
+
+      "_local-interface": "optional",
+      "local-interface": "enp0s3",
+
+      "_label": "optional",
+      "label": "peer1",
+
+      "_vxlan": "optional, defaults to 0",
+      "vxlan": 100,
+
+      "_vrf-name": "optional",
+      "vrf-name": "netns1",
+
+      "_detect-multiplier": "optional, defaults to 3",
+      "detect-multiplier": 3,
+
+      "_receive-interval": "optional, defaults to 300 milliseconds",
+      "receive-interval": 300,
+
+      "_transmit-interval": "optional, defaults to 300 milliseconds",
+      "transmit-interval": 300,
+
+      "_echo-interval": "optional, defaults to 50 milliseconds",
+      "echo-interval": 50,
+
+      "_echo-mode": "optional, defaults to false",
+      "echo-mode": false,
+
+      "_shutdown": "optional, defaults to false",
+      "shutdown": false
+    }
+  ],
+  "ipv6": [
+  ],
+  "label": [
+    {
+      "_label": "mandatory to identify the peer without addresses",
+      "_label-help": "peer must have been already created in ipv4 or ipv6",
+      "label": "peer1",
+    }
+  ]
+}
diff --git a/net/bfdd/patches/002-ipv6_musl_fix.patch b/net/bfdd/patches/002-ipv6_musl_fix.patch
new file mode 100644 (file)
index 0000000..8ee41b9
--- /dev/null
@@ -0,0 +1,10 @@
+--- a/bfd_packet.c     2019-08-15 02:45:47.270120616 +0300
++++ b/bfd_packet.c     2019-08-15 02:44:38.266117706 +0300
+@@ -34,7 +34,6 @@
+ #include <linux/if_packet.h>
+ #include <linux/udp.h>
+ #include <linux/ip.h>
+-#include <linux/ipv6.h>
+ #include <arpa/inet.h>
+ #include <sys/types.h>
index 2655693029a75de151a653d6b3160731b2f31d94..e436371836a36b827d39e9c7e03004a27e04f68e 100644 (file)
@@ -9,19 +9,20 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=bind
-PKG_VERSION:=9.14.2
+PKG_VERSION:=9.14.6
 PKG_RELEASE:=1
 USERID:=bind=57:bind=57
 
 PKG_MAINTAINER:=Noah Meyerhans <frodo@morgul.net>
-PKG_LICENSE := MPL-2.0
+PKG_LICENSE:=MPL-2.0
+PKG_LICENSE_FILES:=LICENSE
 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:=0e4027573726502ec038db3973a086c02508671723a4845e21da1769a5c27f0c
+PKG_HASH:=8967a040ed900e1800293b9874357fc2f267f33c723aa617268e163bd921edfe
 
 PKG_FIXUP:=autoreconf
 PKG_REMOVE_FILES:=aclocal.m4 libtool.m4
diff --git a/net/bind/patches/002-continue-if-yield-instruction-is-missing.patch b/net/bind/patches/002-continue-if-yield-instruction-is-missing.patch
deleted file mode 100644 (file)
index 24508fb..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
---- a/config.h.in
-+++ b/config.h.in
-@@ -45,6 +45,9 @@
- /* Define to 1 if you have the `arc4random_uniform' function. */
- #undef HAVE_ARC4RANDOM_UNIFORM
-+/* Define if the ARM yield instruction is available */
-+#undef HAVE_ARM_YIELD
-+
- /* Define to 1 if the compiler supports __builtin_clz. */
- #undef HAVE_BUILTIN_CLZ
---- a/configure.ac
-+++ b/configure.ac
-@@ -421,8 +421,8 @@ AS_CASE([$host],
-              [[]],
-              [[__asm__ __volatile__ ("yield")]]
-            )],
--          [AC_MSG_RESULT([yes])],
--          [AC_MSG_ERROR([no, try adding -march=native or -march=armv7-a to CFLAGS (see PLATFORMS.md for more information)])])])
-+          [AC_MSG_RESULT([yes]) AC_DEFINE([HAVE_ARM_YIELD],[1],[Define if the ARM yield instruction is available])],
-+          [AC_MSG_RESULT([no])])])
- AC_CHECK_FUNCS([sysctlbyname])
---- a/lib/isc/rwlock.c
-+++ b/lib/isc/rwlock.c
-@@ -54,7 +54,7 @@
- # define isc_rwlock_pause() __asm__ __volatile__ ("rep; nop")
- #elif defined(__ia64__)
- # define isc_rwlock_pause() __asm__ __volatile__ ("hint @pause")
--#elif defined(__arm__)
-+#elif defined(__arm__) && HAVE_ARM_YIELD
- # define isc_rwlock_pause() __asm__ __volatile__ ("yield")
- #elif defined(sun) && (defined(__sparc) || defined(__sparc__))
- # define isc_rwlock_pause() smt_pause()
index 90b852760bb4346f2f6e64a88ab6c510f9f37f46..2742766b27ec76b993fc7a3a00674e10947a2575 100644 (file)
@@ -8,19 +8,20 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=bitlbee
-PKG_VERSION:=3.5.1
-PKG_RELEASE:=2
+PKG_VERSION:=3.6
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://get.bitlbee.org/src/ \
-                       http://distcache.FreeBSD.org/local-distfiles/brix/
-PKG_HASH:=9636d7fd89ebb3756c13a9a3387736ca6d56ccf66ec0580d512f07b21db0fa69
+PKG_SOURCE_URL:=https://get.bitlbee.org/src
+PKG_HASH:=9f15de46f29b46bf1e39fc50bdf4515e71b17f551f3955094c5da792d962107e
 
 PKG_MAINTAINER:=Nikil Mehta <nikil.mehta@gmail.com>
-PKG_LICENSE:=GPL-2.0
+PKG_LICENSE:=GPL-2.0-or-later
 PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:bitlbee:bitlbee
 
 PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/nls.mk
@@ -30,7 +31,7 @@ define Package/bitlbee
   CATEGORY:=Network
   SUBMENU:=Instant Messaging
   TITLE:=An IRC to other chat networks gateway
-  URL:=http://www.bitlbee.org/
+  URL:=https://www.bitlbee.org/
   DEPENDS:=+glib2 +libopenssl $(ICONV_DEPENDS) $(INTL_DEPENDS)
 endef
 
@@ -58,7 +59,7 @@ define Build/Install
        $(call Build/Install/Default,install install-etc)
 endef
 
-define Package/bitlbee/install 
+define Package/bitlbee/install
        $(INSTALL_DIR) $(1)/usr/sbin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/bitlbee $(1)/usr/sbin/
        $(INSTALL_DIR) $(1)/etc/bitlbee
diff --git a/net/bitlbee/patches/010-openssl-1.1-compatibility.patch b/net/bitlbee/patches/010-openssl-1.1-compatibility.patch
deleted file mode 100644 (file)
index 02327e6..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
---- a/lib/ssl_openssl.c
-+++ b/lib/ssl_openssl.c
-@@ -64,11 +64,17 @@ void ssl_init(void)
- {
-       const SSL_METHOD *meth;
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
-       SSL_library_init();
-       meth = SSLv23_client_method();
-       ssl_ctx = SSL_CTX_new(meth);
-       SSL_CTX_set_options(ssl_ctx, SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3);
-+#else
-+      meth = TLS_client_method();
-+      ssl_ctx = SSL_CTX_new(meth);
-+      SSL_CTX_set_min_proto_version(ssl_ctx, TLS1_VERSION);
-+#endif
-       initialized = TRUE;
- }
-@@ -300,20 +306,20 @@ size_t ssl_des3_encrypt(const unsigned c
-                         const unsigned char *iv, unsigned char **res)
- {
-       int output_length = 0;
--      EVP_CIPHER_CTX ctx;
-+      EVP_CIPHER_CTX *ctx;
-       *res = g_new0(unsigned char, 72);
-       /* Don't set key or IV because we will modify the parameters */
--      EVP_CIPHER_CTX_init(&ctx);
--      EVP_CipherInit_ex(&ctx, EVP_des_ede3_cbc(), NULL, NULL, NULL, 1);
--      EVP_CIPHER_CTX_set_key_length(&ctx, key_len);
--      EVP_CIPHER_CTX_set_padding(&ctx, 0);
-+      ctx = EVP_CIPHER_CTX_new();
-+      EVP_CipherInit_ex(ctx, EVP_des_ede3_cbc(), NULL, NULL, NULL, 1);
-+      EVP_CIPHER_CTX_set_key_length(ctx, key_len);
-+      EVP_CIPHER_CTX_set_padding(ctx, 0);
-       /* We finished modifying parameters so now we can set key and IV */
--      EVP_CipherInit_ex(&ctx, NULL, NULL, key, iv, 1);
--      EVP_CipherUpdate(&ctx, *res, &output_length, input, input_len);
--      EVP_CipherFinal_ex(&ctx, *res, &output_length);
--      EVP_CIPHER_CTX_cleanup(&ctx);
-+      EVP_CipherInit_ex(ctx, NULL, NULL, key, iv, 1);
-+      EVP_CipherUpdate(ctx, *res, &output_length, input, input_len);
-+      EVP_CipherFinal_ex(ctx, *res, &output_length);
-+      EVP_CIPHER_CTX_free(ctx);
-       //EVP_cleanup();
-       return output_length;
index 81614d3e6a71cd3bcebd27aa533fc4801ac311b6..e9e3472dc465b36dd8eecb0256e779fad9700212 100644 (file)
@@ -10,14 +10,14 @@ include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=bridge-utils
 PKG_VERSION:=1.6
-PKG_RELEASE:=1
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@KERNEL/linux/utils/net/$(PKG_NAME)
 PKG_HASH:=cc67efb5d5fb8928a6569b3fade2b4042ec17da04678dab127d96b46489e26c8
 PKG_MAINTAINER:=Nikolay Martynov <mar.kolya@gmail.com>
 
-PKG_LICENSE:=GPL-2.0+
+PKG_LICENSE:=GPL-2.0-or-later
 PKG_LICENSE_FILES:=COPYING
 PKG_FIXUP:=autoreconf
 
@@ -28,6 +28,7 @@ define Package/bridge
   CATEGORY:=Base system
   TITLE:=Ethernet bridging configuration utility
   URL:=http://www.linuxfromscratch.org/blfs/view/svn/basicnet/bridge-utils.html
+  ALTERNATIVES:=300:/usr/sbin/brctl:/usr/libexec/bridge-utils-brctl
 endef
 
 define Package/bridge/description
@@ -41,15 +42,8 @@ CONFIGURE_ARGS += \
        --with-linux-headers="$(LINUX_DIR)" \
 
 define Package/bridge/install
-       $(INSTALL_DIR) $(1)/usr/sbin
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/brctl/brctl $(1)/usr/sbin
-endef
-
-define Package/bridge/prerm
-#!/bin/sh
-$${IPKG_INSTROOT}/bin/busybox brctl -h 2>&1 | grep -q BusyBox && \
-ln -sf ../../bin/busybox $${IPKG_INSTROOT}/usr/sbin/brctl
-exit 0
+       $(INSTALL_DIR) $(1)/usr/libexec
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/brctl/brctl $(1)/usr/libexec/bridge-utils-brctl
 endef
 
 $(eval $(call BuildPackage,bridge))
index 2a734b5e58562d895c03725714c994cd932c31d9..211360905c245f12cbd0217076ae1b7236ac59a7 100644 (file)
@@ -8,9 +8,9 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=cgi-io
-PKG_RELEASE:=6
+PKG_RELEASE:=12
 
-PKG_LICENSE:=GPL-2.0+
+PKG_LICENSE:=GPL-2.0-or-later
 
 PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>
 
@@ -37,7 +37,8 @@ endef
 define Package/cgi-io/install
        $(INSTALL_DIR) $(1)/usr/libexec $(1)/www/cgi-bin/
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/cgi-io $(1)/usr/libexec
-       $(LN) ../../usr/libexec/cgi-io $(1)/www/cgi-bin/cgi-upload 
+       $(LN) ../../usr/libexec/cgi-io $(1)/www/cgi-bin/cgi-upload
+       $(LN) ../../usr/libexec/cgi-io $(1)/www/cgi-bin/cgi-download
        $(LN) ../../usr/libexec/cgi-io $(1)/www/cgi-bin/cgi-backup
 endef
 
index 2bfec623b00d84b37defb4bccfcc08ff95008924..ca157584225c5a01b2a9d7856bfd117f622504d0 100644 (file)
@@ -16,6 +16,8 @@
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
+#define _GNU_SOURCE /* splice(), SPLICE_F_MORE */
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdbool.h>
@@ -26,6 +28,9 @@
 #include <ctype.h>
 #include <sys/stat.h>
 #include <sys/wait.h>
+#include <sys/sendfile.h>
+#include <sys/ioctl.h>
+#include <linux/fs.h>
 
 #include <libubus.h>
 #include <libubox/blobmsg.h>
@@ -89,7 +94,7 @@ session_access_cb(struct ubus_request *req, int type, struct blob_attr *msg)
 }
 
 static bool
-session_access(const char *sid, const char *obj, const char *func)
+session_access(const char *sid, const char *scope, const char *obj, const char *func)
 {
        uint32_t id;
        bool allow = false;
@@ -103,7 +108,7 @@ session_access(const char *sid, const char *obj, const char *func)
 
        blob_buf_init(&req, 0);
        blobmsg_add_string(&req, "ubus_rpc_session", sid);
-       blobmsg_add_string(&req, "scope", "cgi-io");
+       blobmsg_add_string(&req, "scope", scope);
        blobmsg_add_string(&req, "object", obj);
        blobmsg_add_string(&req, "function", func);
 
@@ -263,6 +268,64 @@ postdecode(char **fields, int n_fields)
        return (found >= n_fields);
 }
 
+static char *
+canonicalize_path(const char *path, size_t len)
+{
+       char *canonpath, *cp;
+       const char *p, *e;
+
+       if (path == NULL || *path == '\0')
+               return NULL;
+
+       canonpath = datadup(path, len);
+
+       if (canonpath == NULL)
+               return NULL;
+
+       /* normalize */
+       for (cp = canonpath, p = path, e = path + len; p < e; ) {
+               if (*p != '/')
+                       goto next;
+
+               /* skip repeating / */
+               if ((p + 1 < e) && (p[1] == '/')) {
+                       p++;
+                       continue;
+               }
+
+               /* /./ or /../ */
+               if ((p + 1 < e) && (p[1] == '.')) {
+                       /* skip /./ */
+                       if ((p + 2 >= e) || (p[2] == '/')) {
+                               p += 2;
+                               continue;
+                       }
+
+                       /* collapse /x/../ */
+                       if ((p + 2 < e) && (p[2] == '.') && ((p + 3 >= e) || (p[3] == '/'))) {
+                               while ((cp > canonpath) && (*--cp != '/'))
+                                       ;
+
+                               p += 3;
+                               continue;
+                       }
+               }
+
+next:
+               *cp++ = *p++;
+       }
+
+       /* remove trailing slash if not root / */
+       if ((cp > canonpath + 1) && (cp[-1] == '/'))
+               cp--;
+       else if (cp == canonpath)
+               *cp++ = '/';
+
+       *cp = '\0';
+
+       return canonpath;
+}
+
 static int
 response(bool success, const char *message)
 {
@@ -308,15 +371,17 @@ response(bool success, const char *message)
 }
 
 static int
-failure(int e, const char *message)
+failure(int code, int e, const char *message)
 {
-       printf("Status: 500 Internal Server failure\r\n");
+       printf("Status: %d %s\r\n", code, message);
        printf("Content-Type: text/plain\r\n\r\n");
        printf("%s", message);
 
        if (e)
                printf(": %s", strerror(e));
 
+       printf("\n");
+
        return -1;
 }
 
@@ -417,6 +482,9 @@ data_begin_cb(multipart_parser *p)
                if (!st.filename)
                        return response(false, "File data without name");
 
+               if (!session_access(st.sessionid, "file", st.filename, "write"))
+                       return response(false, "Access to path denied by ACL");
+
                st.tempfd = mkstemp(tmpname);
 
                if (st.tempfd < 0)
@@ -438,7 +506,7 @@ data_cb(multipart_parser *p, const char *data, size_t len)
                break;
 
        case PART_FILENAME:
-               st.filename = datadup(data, len);
+               st.filename = canonicalize_path(data, len);
                break;
 
        case PART_FILEMODE:
@@ -469,7 +537,7 @@ data_end_cb(multipart_parser *p)
 {
        if (st.parttype == PART_SESSIONID)
        {
-               if (!session_access(st.sessionid, "upload", "write"))
+               if (!session_access(st.sessionid, "cgi-io", "upload", "write"))
                {
                        errno = EPERM;
                        return response(false, "Upload permission denied");
@@ -584,6 +652,84 @@ main_upload(int argc, char *argv[])
        return 0;
 }
 
+static int
+main_download(int argc, char **argv)
+{
+       char *fields[] = { "sessionid", NULL, "path", NULL, "filename", NULL, "mimetype", NULL };
+       unsigned long long size = 0;
+       char *p, buf[4096];
+       ssize_t len = 0;
+       struct stat s;
+       int rfd;
+
+       postdecode(fields, 4);
+
+       if (!fields[1] || !session_access(fields[1], "cgi-io", "download", "read"))
+               return failure(403, 0, "Download permission denied");
+
+       if (!fields[3] || !session_access(fields[1], "file", fields[3], "read"))
+               return failure(403, 0, "Access to path denied by ACL");
+
+       if (stat(fields[3], &s))
+               return failure(404, errno, "Failed to stat requested path");
+
+       if (!S_ISREG(s.st_mode) && !S_ISBLK(s.st_mode))
+               return failure(403, 0, "Requested path is not a regular file or block device");
+
+       for (p = fields[5]; p && *p; p++)
+               if (!isalnum(*p) && !strchr(" ()<>@,;:[]?.=%", *p))
+                       return failure(400, 0, "Invalid characters in filename");
+
+       for (p = fields[7]; p && *p; p++)
+               if (!isalnum(*p) && !strchr(" .;=/-", *p))
+                       return failure(400, 0, "Invalid characters in mimetype");
+
+       rfd = open(fields[3], O_RDONLY);
+
+       if (rfd < 0)
+               return failure(500, errno, "Failed to open requested path");
+
+       if (S_ISBLK(s.st_mode))
+               ioctl(rfd, BLKGETSIZE64, &size);
+       else
+               size = (unsigned long long)s.st_size;
+
+       printf("Status: 200 OK\r\n");
+       printf("Content-Type: %s\r\n", fields[7] ? fields[7] : "application/octet-stream");
+
+       if (fields[5])
+               printf("Content-Disposition: attachment; filename=\"%s\"\r\n", fields[5]);
+
+       printf("Content-Length: %llu\r\n\r\n", size);
+       fflush(stdout);
+
+       while (size > 0) {
+               len = sendfile(1, rfd, NULL, size);
+
+               if (len == -1) {
+                       if (errno == ENOSYS || errno == EINVAL) {
+                               while ((len = read(rfd, buf, sizeof(buf))) > 0)
+                                       fwrite(buf, len, 1, stdout);
+
+                               fflush(stdout);
+                               break;
+                       }
+
+                       if (errno == EINTR || errno == EAGAIN)
+                               continue;
+               }
+
+               if (len <= 0)
+                       break;
+
+               size -= len;
+       }
+
+       close(rfd);
+
+       return 0;
+}
+
 static int
 main_backup(int argc, char **argv)
 {
@@ -592,21 +738,20 @@ main_backup(int argc, char **argv)
        int len;
        int status;
        int fds[2];
-       char buf[4096];
        char datestr[16] = { 0 };
        char hostname[64] = { 0 };
        char *fields[] = { "sessionid", NULL };
 
-       if (!postdecode(fields, 1) || !session_access(fields[1], "backup", "read"))
-               return failure(0, "Backup permission denied");
+       if (!postdecode(fields, 1) || !session_access(fields[1], "cgi-io", "backup", "read"))
+               return failure(403, 0, "Backup permission denied");
 
        if (pipe(fds))
-               return failure(errno, "Failed to spawn pipe");
+               return failure(500, errno, "Failed to spawn pipe");
 
        switch ((pid = fork()))
        {
        case -1:
-               return failure(errno, "Failed to fork process");
+               return failure(500, errno, "Failed to fork process");
 
        case 0:
                dup2(fds[1], 1);
@@ -624,7 +769,6 @@ main_backup(int argc, char **argv)
                return -1;
 
        default:
-               fcntl(fds[0], F_SETFL, fcntl(fds[0], F_GETFL) | O_NONBLOCK);
                now = time(NULL);
                strftime(datestr, sizeof(datestr) - 1, "%Y-%m-%d", localtime(&now));
 
@@ -636,15 +780,13 @@ main_backup(int argc, char **argv)
                printf("Content-Disposition: attachment; "
                       "filename=\"backup-%s-%s.tar.gz\"\r\n\r\n", hostname, datestr);
 
-               do {
-                       waitpid(pid, &status, 0);
+               fflush(stdout);
 
-                       while ((len = read(fds[0], buf, sizeof(buf))) > 0) {
-                               fwrite(buf, len, 1, stdout);
-                               fflush(stdout);
-                       }
+               do {
+                       len = splice(fds[0], NULL, 1, NULL, 4096, SPLICE_F_MORE);
+               } while (len > 0);
 
-               } while (!WIFEXITED(status));
+               waitpid(pid, &status, 0);
 
                close(fds[0]);
                close(fds[1]);
@@ -657,6 +799,8 @@ int main(int argc, char **argv)
 {
        if (strstr(argv[0], "cgi-upload"))
                return main_upload(argc, argv);
+       else if (strstr(argv[0], "cgi-download"))
+               return main_download(argc, argv);
        else if (strstr(argv[0], "cgi-backup"))
                return main_backup(argc, argv);
 
index b08d158b6acfd5cd5613e06207832ebcd8058951..9d400568e1c81253b2b99a27bb843fb3883d0be5 100644 (file)
@@ -18,6 +18,7 @@ PKG_HASH:=4e02795b1260a4ec51e6ace84149036305cc9fc340e65edb9f8452aa611339b5
 PKG_MAINTAINER:=Miroslav Lichvar <mlichvar0@gmail.com>
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:tuxfamily:chrony
 
 PKG_BUILD_DEPENDS:=pps-tools
 
index bdd01974801a758bb4a29db14e2473d2bfc4df13..b76b27f838e7f8aadd13dcd7785f89ecb38720f0 100644 (file)
@@ -18,6 +18,7 @@ PKG_HASH:=18d8f1bf92c13c4d611502dbd6759e3a766ddc8467ec8a2eda3f589e40b9ac9c
 PKG_MAINTAINER:=Florian Fainelli <florian@openwrt.org>
 PKG_LICENSE:=GPL-3.0
 PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:debian:cifs-utils
 
 include $(INCLUDE_DIR)/package.mk
 
diff --git a/net/cifsd-tools/Makefile b/net/cifsd-tools/Makefile
new file mode 100644 (file)
index 0000000..591b1ee
--- /dev/null
@@ -0,0 +1,59 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=cifsd-tools
+PKG_RELEASE:=1
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/cifsd-team/cifsd-tools.git
+PKG_SOURCE_DATE:=2019-08-19
+PKG_SOURCE_VERSION:=bbeab27f0a1695f711fb84d9cd29a83f818ef90e
+PKG_MIRROR_HASH:=f8bef545400aa8c0db6ba0fffdf0c0a2f201603503728f140df133aff3a39cbb
+
+PKG_MAINTAINER:=Andy Walsh <andy.walsh44+github@gmail.com>
+PKG_LICENSE:=GPL-2.0-or-later
+PKG_LICENSE_FILES:=COPYING
+
+PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
+PKG_REMOVE_FILES:=autogen.sh
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/nls.mk
+
+define Package/cifsd-tools
+  SECTION:=net
+  CATEGORY:=Network
+  SUBMENU:=Filesystem
+  TITLE:=Kernel CIFS/SMB server support and userspace tools
+  URL:=https://github.com/cifsd-team/cifsd-tools
+  DEPENDS:=+kmod-fs-cifsd +glib2 +libnl-core +libnl-genl
+endef
+
+define Package/cifsd-tools/description
+  Userspace tools (cifsd, cifsadmin) for the CIFS/SMB kernel fileserver.
+  The config file location is /etc/cifs/smb.conf
+endef
+
+define Package/cifsd-tools/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcifsdtools.so* $(1)/usr/lib/
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{cifsadmin,cifsd} $(1)/usr/sbin/
+       $(INSTALL_DIR) $(1)/etc/config $(1)/etc/cifs $(1)/etc/init.d
+       $(INSTALL_CONF) ./files/cifsd.config $(1)/etc/config/cifsd
+       $(INSTALL_DATA) ./files/smb.conf.template $(1)/etc/cifs/
+       $(INSTALL_BIN) ./files/cifsd.init $(1)/etc/init.d/cifsd
+       # copy examples until we have a wiki page
+       $(INSTALL_DATA) ./files/cifsd.config.example $(1)/etc/cifs/
+       $(INSTALL_DATA) ./files/smb.conf.help $(1)/etc/cifs/
+endef
+
+define Package/cifsd-tools/conffiles
+/etc/config/cifsd
+/etc/cifs/smb.conf.template
+/etc/cifs/smb.conf
+/etc/cifs/cifsdpwd.db
+endef
+
+$(eval $(call BuildPackage,cifsd-tools))
diff --git a/net/cifsd-tools/files/cifsd.config b/net/cifsd-tools/files/cifsd.config
new file mode 100644 (file)
index 0000000..f0c7921
--- /dev/null
@@ -0,0 +1,2 @@
+config globals
+       option 'description'    'Cifsd on OpenWrt'
diff --git a/net/cifsd-tools/files/cifsd.config.example b/net/cifsd-tools/files/cifsd.config.example
new file mode 100644 (file)
index 0000000..d0ffa5b
--- /dev/null
@@ -0,0 +1,11 @@
+config globals
+       option 'description'    'Cifsd on OpenWrt'
+
+config share
+       option name 'testshare'
+       option path '/tmp'
+       option guest_ok 'yes'
+       option create_mask '0666'
+       option dir_mask '0777'
+       option writeable 'yes'
+       option force_root '1'
diff --git a/net/cifsd-tools/files/cifsd.init b/net/cifsd-tools/files/cifsd.init
new file mode 100644 (file)
index 0000000..c676159
--- /dev/null
@@ -0,0 +1,183 @@
+#!/bin/sh /etc/rc.common
+
+START=98
+USE_PROCD=1
+
+CIFSD_IFACE=""
+
+smb_header()
+{
+       config_get CIFSD_IFACE $1 interface "lan"
+
+       # resolve interfaces
+       local interfaces
+       interfaces=$(
+               . /lib/functions/network.sh
+
+               local net
+               for net in $CIFSD_IFACE; do
+                       local device
+                       network_is_up $net || continue
+                       network_get_device device "$net"
+                       echo -n "${device:-$net} "
+               done
+       )
+
+       local workgroup description
+       local hostname
+       hostname="$(cat /proc/sys/kernel/hostname)"
+
+       config_get workgroup            $1 workgroup    "WORKGROUP"
+       config_get description          $1 description  "Cifsd on OpenWrt"
+
+       sed -e "s#|NAME|#$hostname#g" \
+           -e "s#|WORKGROUP|#$workgroup#g" \
+           -e "s#|DESCRIPTION|#$description#g" \
+           -e "s#|INTERFACES|#$interfaces#g" \
+           /etc/cifs/smb.conf.template > /var/etc/cifs/smb.conf
+
+       [ -e /etc/cifs/smb.conf ] || ln -nsf /var/etc/cifs/smb.conf /etc/cifs/smb.conf
+
+       if [ ! -L /etc/cifs/smb.conf ]; then
+               logger -t 'cifsd' "Local custom /etc/cifs/smb.conf file detected, all UCI/Luci config settings are ignored!"
+       fi
+}
+
+smb_add_share()
+{
+       local name
+       local path
+       local comment
+       local users
+       local create_mask
+       local dir_mask
+       local browseable
+       local read_only
+       local writeable
+       local guest_ok
+       local force_root
+       local write_list
+       local read_list
+       local hide_dot_files
+       local veto_files
+       local inherit_owner
+       local force_create_mode
+       local force_directory_mode
+
+       config_get name $1 name
+       config_get path $1 path
+       config_get comment $1 comment
+       config_get users $1 users
+       config_get create_mask $1 create_mask
+       config_get dir_mask $1 dir_mask
+       config_get browseable $1 browseable
+       config_get read_only $1 read_only
+       config_get writeable $1 writeable
+       config_get guest_ok $1 guest_ok
+       config_get_bool force_root      $1 force_root   0
+       config_get write_list $1 write_list
+       config_get read_list $1 read_list
+       config_get_bool hide_dot_files  $1 hide_dot_files       0
+       config_get veto_files $1 veto_files
+       config_get inherit_owner $1 inherit_owner
+       config_get force_create_mode $1 force_create_mode
+       config_get force_directory_mode $1 force_directory_mode
+
+       [ -z "$name" ] || [ -z "$path" ] && return
+
+       {
+               printf "\n[%s]\n\tpath = %s\n" "$name" "$path"
+               [ -n "$comment" ] && printf "\tcomment = %s\n" "$comment"
+
+               if [ "$force_root" -eq 1 ]; then
+                       printf "\tforce user = %s\n" "root"
+                       printf "\tforce group = %s\n" "root"
+               else
+                       [ -n "$users" ] && printf "\tvalid users = %s\n" "$users"
+               fi
+
+               [ -n "$create_mask" ] && printf "\tcreate mask = %s\n" "$create_mask"
+               [ -n "$dir_mask" ] && printf "\tdirectory mask = %s\n" "$dir_mask"
+               [ -n "$force_create_mode" ] && printf "\tforce create mode = %s\n" "$force_create_mode"
+               [ -n "$force_directory_mode" ] && printf "\tforce directory mode = %s\n" "$force_directory_mode"
+
+               [ -n "$browseable" ] && printf "\tbrowseable = %s\n" "$browseable"
+               [ -n "$read_only" ] && printf "\tread only = %s\n" "$read_only"
+               [ -n "$writeable" ] && printf "\twriteable = %s\n" "$writeable"
+               [ -n "$guest_ok" ] && printf "\tguest ok = %s\n" "$guest_ok"
+               [ -n "$inherit_owner" ] && printf "\tinherit owner = %s\n" "$inherit_owner"
+
+               [ -n "$write_list" ] && printf "\twrite list = %s\n" "$write_list"
+               [ -n "$read_list" ] && printf "\tread list = %s\n" "$read_list"
+
+               [ "$hide_dot_files" -eq 1 ] && printf "\thide dot files = %s\n" "yes"
+               [ -n "$veto_files" ] && printf "\tveto files = %s\n" "$veto_files"
+       } >> /var/etc/cifs/smb.conf
+}
+
+init_config()
+{
+       mkdir -p /var/etc/cifs
+
+       config_load cifsd
+       # allow copy&paste from samba UCI configs (we dont have a cifsd wiki yet)
+       config_foreach smb_header globals
+       config_foreach smb_header samba
+       config_foreach smb_add_share share
+       config_foreach smb_add_share sambashare
+}
+
+service_triggers()
+{
+       PROCD_RELOAD_DELAY=2000
+
+       procd_add_reload_trigger "dhcp" "system" "cifsd"
+
+       local i
+       for i in $CIFSD_IFACE; do
+               procd_add_reload_interface_trigger $i
+       done
+}
+
+start_service()
+{
+       init_config
+
+       if [ ! -e /etc/cifs/smb.conf ]; then
+               logger -t 'cifsd' "missing config /etc/cifs/smb.conf, needs to-be created manually!"
+               exit 1
+       fi
+
+       modprobe cifsd 2> /dev/null
+       if [ ! -e /sys/module/cifsd ]; then
+               logger -t 'cifsd' "modprobe of cifsd module failed, can\'t start cifsd!"
+               exit 1
+       fi
+
+       logger -t 'cifsd' "Starting CIFS/SMB userspace service."
+       procd_open_instance
+       procd_set_param command /usr/sbin/cifsd --n
+       procd_close_instance
+}
+
+stop_service()
+{
+       logger -t 'cifsd' "Stopping CIFSD userspace service."
+       killall cifsd > /dev/null 2>&1
+       sleep 1
+       [ -e /sys/class/cifsd-control/kill_server ] && echo hard > /sys/class/cifsd-control/kill_server
+       sleep 2
+       [ -e /sys/module/cifsd ] && rmmod cifsd > /dev/null 2>&1
+       # With open smb connections rmmod takes longer
+       if [ -e /sys/module/cifsd ]; then
+               sleep 5
+               rmmod cifsd > /dev/null 2>&1
+       fi
+       [ -f /tmp/cifsd.lock ] && rm /tmp/cifsd.lock
+}
+
+reload_service() {
+       stop_service "$@"
+       sleep 1
+       start_service "$@"
+}
diff --git a/net/cifsd-tools/files/smb.conf.help b/net/cifsd-tools/files/smb.conf.help
new file mode 100644 (file)
index 0000000..a4c29d2
--- /dev/null
@@ -0,0 +1,168 @@
+;******************************************************************************
+; File to define cifsd configuration parameters which are comparable with
+; samba's ones
+;
+; Supported [global] level parameters list:
+;      - server string
+;              This controls what string will show up in browse lists next
+;              to the machine name
+;      - workgroup
+;              This controls what workgroup your server will appear to be
+;              in when queried by clients
+;      - netbios name
+;              This sets the NetBIOS name by which a SMB server is known.
+;              By default it is the same as the first component of the host's
+;              DNS name. If a machine is a browse server or logon server this
+;              name (or the first component of the hosts DNS name) will be
+;              the name that these services are advertised under.
+;      - server min protocol
+;              This setting controls the minimum protocol version that the
+;              server will allow the client to use.
+;      - server max protocol
+;              The value of the parameter (a string) is the highest protocol
+;              level that will be supported by the server.
+;      - server signing
+;              This controls whether the client is allowed or required to use
+;              SMB1 and SMB2 signing. Possible values are default, auto,
+;              mandatory and disabled.
+;      - guest account
+;              This is a username which will be used for access to services
+;              which are specified as guest ok.
+;      - max active sessions
+;              This option allows the number of simultaneous connections to
+;              a service to be limited.
+;      - ipc timeout
+;              This option specifies the number of seconds server will wait
+;              for the userspace to reply to heartbeat frames. If user space
+;              is down for more than `ipc timeout` seconds the server will
+;              reset itself - close all sessions and all TCP connections.
+;      - restrict anonymous
+;              The setting of this parameter determines whether user and
+;              group list information is returned for an anonymous connection.
+;      - map to guest
+;              This parameter can take four different values, which tell cifsd
+;              what to do with user login requests.(bad user
+;      - bind interfaces only
+;              This global parameter allows the cifsd admin to limit what
+;              interfaces on a machine will serve SMB requests.
+;      - interfaces
+;              This option allows you to override the default network
+;              interfaces list that cifsd will use for browsing. The option
+;              takes only list of interface name.
+;      - deadtime
+;              The value of the parameter (a decimal integer) represents
+;              the number of minutes of inactivity before a connection is
+;              considered dead, and it is disconnected. The deadtime only
+;              takes effect if the number of open files is zero.
+;
+; Supported [share] level parameters list:
+;      - comment
+;              comment string to associate with the new share
+;      - path
+;              This parameter specifies a directory to which the user of the
+;              service is to be given access.
+;      - guest ok
+;              If this parameter is yes for a service, then no password is
+;              required to connect to the service.
+;      - read only
+;              If this parameter is yes, then users of a service may not
+;              create or modify files in the service's directory.
+;      - browseable
+;              This controls whether this share is seen in the list of
+;              available shares in a net view and in the browse list.
+;      - write ok
+;      - writeable
+;              Inverted synonym for read only.
+;      - store dos attributes
+;              If this parameter is set cifsd attempts to first read DOS
+;              attributes (SYSTEM, HIDDEN, ARCHIVE or READ-ONLY) from a
+;              filesystem extended attribute, before mapping DOS attributes
+;              to UNIX permission bits (such as occurs with map hidden and
+;              map readonly).
+;      - oplocks
+;              This boolean option tells cifsd whether to issue oplocks
+;              (opportunistic locks) to file open requests on this share.
+;      - create mask
+;              When a file is created, the necessary permissions are calculated
+;              according to the mapping from DOS modes to UNIX permissions, and
+;              the resulting UNIX mode is then bit-wise 'AND'ed with this
+;              parameter.
+;      - directory mask
+;              This parameter is the octal modes which are used when converting
+;              DOS modes to UNIX modes when creating UNIX directories.
+;      - force group
+;              This specifies a UNIX group name that will be assigned as
+;              the default primary group for all users connecting to this
+;              service.
+;      - force user
+;              This specifies a UNIX user name that will be assigned as
+;              the default user for all users connecting to this service.
+;      - hide dot files
+;              This is a boolean parameter that controls whether files starting
+;              with a dot appear as hidden files.
+;      - hosts allow
+;              This parameter is a comma, space, or tab delimited set of hosts
+;              which are permitted to access a service
+;      - hosts deny
+;              The opposite of allow hosts - hosts listed here are NOT
+;              permitted access to services unless the specific services have
+;              their own lists to override this one. Where the lists conflict,
+;              the allow list takes precedence.
+;      - valid users
+;              This is a list of users that should be allowed to login to this
+;              service
+;      - invalid users
+;              This is a list of users that should not be allowed to login to
+;              this service.
+;      - read list
+;              This is a list of users that are given read-only access to
+;              a service.
+;      - write list
+;              This is a list of users that are given read-write access to
+;              a service.
+;      - max connections
+;              This option allows the number of simultaneous connections to
+;              a service to be limited.
+;      - veto files
+;              This is a list of files and directories that are neither visible
+;              nor accessible.
+;
+;              Veto any files containing the word Security,
+;              any ending in .tmp, and any directory containing the
+;              word root.
+;              veto files = /*Security*/*.tmp/*root*/
+;
+;              Veto the Apple specific files that a NetAtalk server
+;              creates.
+;              veto files = /.AppleDouble/.bin/.AppleDesktop/Network Trash Folder/
+;      - inherit owner
+;              The ownership for new files and directories should be controlled
+;              by the ownership of the parent directory.
+;              Valid options are yes or no.
+;      - inherit smack
+;              This parameter can be used to ensure that if smack label exist
+;              on parent directories.
+;              Valid options are yes or no.
+;      - force create mode
+;              This parameter specifies a set of UNIX mode bit permissions
+;              that will always be set on a file created by cifsd.
+;      - force directory mode
+;              This parameter specifies a set of UNIX mode bit permissions
+;              that will always be set on a directory created by cifsd.
+;
+; Rules to update this file:
+;      - Every [share] definition should start on new line
+;      - Every parameter should be indented with single tab
+;      - There should be single spaces around equal (eg: " = ")
+;      - Multiple parameters should be separated with comma
+;              eg: "invalid users = usr1,usr2,usr3"
+;
+; Make sure to configure the server after making changes to this file.
+;******************************************************************************
+
+[global]
+       netbios name = CIFSD
+
+[homes]
+       comment = content server share
+       path = /tmp
diff --git a/net/cifsd-tools/files/smb.conf.template b/net/cifsd-tools/files/smb.conf.template
new file mode 100644 (file)
index 0000000..aa54bf2
--- /dev/null
@@ -0,0 +1,9 @@
+[global]
+       netbios name = |NAME|
+       server string = |DESCRIPTION|
+       workgroup = |WORKGROUP|
+       interfaces = |INTERFACES|
+       bind interfaces only = yes
+       ipc timeout = 8
+       deadtime = 15
+       map to guest = Bad User
index bc399827df24114eb4f7b47cdce4e51ff48dbf43..6fc2c8a1ca7b61c4aa344e0456997045d2f1d857 100644 (file)
@@ -8,21 +8,22 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=clamav
-PKG_VERSION:=0.101.2
-PKG_RELEASE:=2
+PKG_VERSION:=0.101.3
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://www.clamav.net/downloads/production/
-PKG_HASH:=0a12ebdf6ff7a74c0bde2bdc2b55cae33449e6dd953ec90824a9e01291277634
+PKG_HASH:=68d42aac4a9cbde293288533a9a3c3d55863de38f2b8707c1ef2d987b1260338
 
 PKG_MAINTAINER:=Marko Ratkaj <marko.ratkaj@sartura.hr> \
                Lucian Cristian <lucian.cristian@gmail.com>
-PKG_LICENSE:=GPL-2.0
+PKG_LICENSE:=GPL-2.0-only
 PKG_LICENSE_FILES:=COPYING*
 PKG_CPE_ID:=cpe:/a:clamav:clamav
 
 PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
+PKG_FIXUP:=autoreconf
 
 include $(INCLUDE_DIR)/uclibc++.mk
 include $(INCLUDE_DIR)/package.mk
@@ -74,7 +75,6 @@ CONFIGURE_ARGS += \
        --with-openssl="$(STAGING_DIR)/usr/" \
        --with-pcre="$(STAGING_DIR)/usr/" \
        --with-zlib="$(STAGING_DIR)/usr/" \
-       --without-xml \
        --without-iconv \
        --without-libncurses-prefix
 
@@ -93,18 +93,14 @@ define Package/clamav/install
        $(INSTALL_DIR) $(1)/usr/sbin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/clamd $(1)/usr/sbin/
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/clamav-milter $(1)/usr/sbin/
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/clamav-config $(1)/usr/sbin/
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/clambc $(1)/usr/sbin/
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/clamconf $(1)/usr/sbin/
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/clamdscan $(1)/usr/sbin/
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/clamscan $(1)/usr/sbin/
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/sigtool $(1)/usr/sbin/
 
-       $(INSTALL_DIR) $(1)/usr/include
-       $(CP) $(PKG_INSTALL_DIR)/usr/include/clamav.h $(1)/usr/include/
-
        $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib*/* $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib*/lib*.so.* $(1)/usr/lib/
 
        $(INSTALL_DIR) $(1)/etc/config
        $(INSTALL_CONF) ./files/clamav.config $(1)/etc/config/clamav
diff --git a/net/clamav/patches/002-Avoid-libxml-checks-if-disable-xml-is-used.patch b/net/clamav/patches/002-Avoid-libxml-checks-if-disable-xml-is-used.patch
new file mode 100644 (file)
index 0000000..3564c31
--- /dev/null
@@ -0,0 +1,167 @@
+From de943f313fa5c17bf9cbd560a7578796991b24b5 Mon Sep 17 00:00:00 2001
+From: Eneas U de Queiroz <cotequeiroz@gmail.com>
+Date: Sat, 10 Aug 2019 19:43:20 -0300
+Subject: [PATCH] Avoid libxml checks if --disable-xml is used
+
+Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
+---
+ m4/reorganization/libs/xml.m4 | 126 +++++++++++++++++-----------------
+ 1 file changed, 62 insertions(+), 64 deletions(-)
+
+diff --git a/m4/reorganization/libs/xml.m4 b/m4/reorganization/libs/xml.m4
+index 77b2c13a8..0709d2914 100644
+--- a/m4/reorganization/libs/xml.m4
++++ b/m4/reorganization/libs/xml.m4
+@@ -12,87 +12,85 @@ if test "X$want_xml" != "Xno"; then
+                     @<:@default=/usr/local or /usr if not found in /usr/local@:>@]),
+     [with_xml_val=$withval]
+   )
+-fi
+-
+-AS_IF([test "x$with_xml_val" = "xno"], [XML_HOME=""],
+-  [test "x$with_xml_val" = "xyes"], [XML_HOME="/usr/local"],
+-  [XML_HOME="$with_xml_val"])
+-AS_IF([test "x$XML_HOME" != "x"], [
+-   AS_IF([test ! -x "$XML_HOME/bin/xml2-config"], [XML_HOME=""])
+-   ])
++  AS_IF([test "x$with_xml_val" = "xno"], [XML_HOME=""],
++    [test "x$with_xml_val" = "xyes"], [XML_HOME="/usr/local"],
++    [XML_HOME="$with_xml_val"])
+-AS_IF([test "x$XML_HOME" = "x" -a "x$with_xml_val" = "xyes"], [
+-   AS_IF([test -x "/usr/bin/xml2-config"], [XML_HOME="/usr"])
+-   ])
++  AS_IF([test "x$XML_HOME" != "x"], [
++     AS_IF([test ! -x "$XML_HOME/bin/xml2-config"], [XML_HOME=""])
++     ])
+-if test "x$XML_HOME" != "x"; then
+-  AC_MSG_RESULT([$XML_HOME])
+-else
+-  AC_MSG_RESULT([not found])
+-fi
++  AS_IF([test "x$XML_HOME" = "x" -a "x$with_xml_val" = "xyes"], [
++     AS_IF([test -x "/usr/bin/xml2-config"], [XML_HOME="/usr"])
++     ])
+-found_xml="no"
+-XMLCONF_VERSION=""
+-XML_CPPFLAGS=""
+-XML_LIBS=""
+-if test "x$XML_HOME" != "x"; then
+-  AC_MSG_CHECKING([xml2-config version])
+-  XMLCONF_VERSION="`$XML_HOME/bin/xml2-config --version`"
+-  if test "x%XMLCONF_VERSION" != "x"; then
+-    AC_MSG_RESULT([$XMLCONF_VERSION])
+-    found_xml="yes"
+-    XML_CPPFLAGS="`$XML_HOME/bin/xml2-config --cflags`"
+-    XML_LIBS="`$XML_HOME/bin/xml2-config --libs`"
+-    AS_ECHO("$XML_CPPFLAGS")
+-    AS_ECHO("$XML_LIBS")
++  if test "x$XML_HOME" != "x"; then
++    AC_MSG_RESULT([$XML_HOME])
+   else
+-    AC_MSG_ERROR([xml2-config failed])
++    AC_MSG_RESULT([not found])
++  fi
++
++  found_xml="no"
++  XMLCONF_VERSION=""
++  XML_CPPFLAGS=""
++  XML_LIBS=""
++  if test "x$XML_HOME" != "x"; then
++    AC_MSG_CHECKING([xml2-config version])
++    XMLCONF_VERSION="`$XML_HOME/bin/xml2-config --version`"
++    if test "x%XMLCONF_VERSION" != "x"; then
++      AC_MSG_RESULT([$XMLCONF_VERSION])
++      found_xml="yes"
++      XML_CPPFLAGS="`$XML_HOME/bin/xml2-config --cflags`"
++      XML_LIBS="`$XML_HOME/bin/xml2-config --libs`"
++      AS_ECHO("$XML_CPPFLAGS")
++      AS_ECHO("$XML_LIBS")
++    else
++      AC_MSG_ERROR([xml2-config failed])
++    fi
+   fi
+-fi
+-working_xml="no"
+-if test "X$found_xml" != "Xno"; then
+-  AC_MSG_CHECKING([for xmlreader.h in $XML_HOME])
++  working_xml="no"
++  if test "X$found_xml" != "Xno"; then
++    AC_MSG_CHECKING([for xmlreader.h in $XML_HOME])
+-  if test ! -f "$XML_HOME/include/libxml2/libxml/xmlreader.h"; then
+-    AC_MSG_RESULT([not found])
+-  else
+-    AC_MSG_RESULT([found])
+-    save_LIBS="$LIBS"
+-    save_CPPFLAGS="$CPPFLAGS"
+-    CPPFLAGS="$CPPFLAGS $XML_CPPFLAGS"
+-    save_LDFLAGS="$LDFLAGS"
+-    LDFLAGS="$LDFLAGS $XML_LIBS"
++    if test ! -f "$XML_HOME/include/libxml2/libxml/xmlreader.h"; then
++      AC_MSG_RESULT([not found])
++    else
++      AC_MSG_RESULT([found])
++      save_LIBS="$LIBS"
++      save_CPPFLAGS="$CPPFLAGS"
++      CPPFLAGS="$CPPFLAGS $XML_CPPFLAGS"
++      save_LDFLAGS="$LDFLAGS"
++      LDFLAGS="$LDFLAGS $XML_LIBS"
+-    AS_ECHO("CPPFLAGS: $CPPFLAGS")
+-    AS_ECHO("LD_FLAGS: $LDFLAGS")
++      AS_ECHO("CPPFLAGS: $CPPFLAGS")
++      AS_ECHO("LD_FLAGS: $LDFLAGS")
+-    AC_CHECK_LIB([xml2], [xmlTextReaderRead], [working_xml="yes"], [working_xml="no"], [$XML_LIBS])
++      AC_CHECK_LIB([xml2], [xmlTextReaderRead], [working_xml="yes"], [working_xml="no"], [$XML_LIBS])
+-    CPPFLAGS="$save_CPPFLAGS"
+-    LDFLAGS="$save_LDFLAGS"
+-    LIBS="$save_LIBS"
++      CPPFLAGS="$save_CPPFLAGS"
++      LDFLAGS="$save_LDFLAGS"
++      LIBS="$save_LIBS"
++    fi
+   fi
+-fi
+-if test "$working_xml" = "yes"; then
+-  AC_DEFINE([HAVE_LIBXML2],1,[Define to 1 if you have the 'libxml2' library (-lxml2).])
+-  AC_SUBST(XML_CPPFLAGS)
+-  AC_SUBST(XML_LIBS)
+-  AC_MSG_NOTICE([Compiling and linking with libxml2 from $XML_HOME])
+-else
+-  if test "$want_xml" = "yes"; then
+-     AC_MSG_ERROR([****** Please install libxml2 packages!])
++  if test "$working_xml" = "yes"; then
++    AC_DEFINE([HAVE_LIBXML2],1,[Define to 1 if you have the 'libxml2' library (-lxml2).])
++    AC_SUBST(XML_CPPFLAGS)
++    AC_SUBST(XML_LIBS)
++    AC_MSG_NOTICE([Compiling and linking with libxml2 from $XML_HOME])
+   else
+-    if test "$want_xml" != "no"; then
++    if test "$want_xml" = "yes"; then
++      AC_MSG_ERROR([****** Please install libxml2 packages!])
++    else
+       AC_MSG_NOTICE([****** libxml2 support unavailable])
+     fi
++    XML_CPPFLAGS=""
++    XML_LIBS=""
++    AC_SUBST(XML_CPPFLAGS)
++    AC_SUBST(XML_LIBS)
+   fi
+-  XML_CPPFLAGS=""
+-  XML_LIBS=""
+-  AC_SUBST(XML_CPPFLAGS)
+-  AC_SUBST(XML_LIBS)
+ fi
+ AM_CONDITIONAL([HAVE_LIBXML2], test "x$HAVE_LIBXML2" = "xyes")
+-- 
+2.21.0
+
index 8c93f4592e05f434edf8eb64052a6809696d0ad0..423a0e8481e3e69e04b966a2ac6a52c2e44168c0 100644 (file)
@@ -38,8 +38,8 @@ choice
 config COOVACHILLI_NOSSL
        bool "No SSL support"
 
-config COOVACHILLI_CYASSL
-       bool "CyaSSL"
+config COOVACHILLI_WOLFSSL
+       bool "wolfSSL"
 
 config COOVACHILLI_OPENSSL
        bool "OpenSSL"
index 4a1960e9736bc5242192a61ad59c9664a1e32c12..510c4a197eb575af7008200a26835be13d55e77e 100644 (file)
@@ -9,18 +9,21 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=coova-chilli
 PKG_VERSION:=1.4
-PKG_MAINTAINER:=Jaehoon You <teslamint@gmail.com>
-PKG_LICENSE:=GPL-2.0+
-PKG_LICENSE_FILES:=COPYING
-PKG_RELEASE:=9
+PKG_RELEASE:=11
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/coova/coova-chilli/tar.gz/$(PKG_VERSION)?
 PKG_HASH:=987647a4c8efe7b1e2d7108d56068e3bd7830d326680f0eaa2c705e4c59c46d9
 
+PKG_MAINTAINER:=Jaehoon You <teslamint@gmail.com>
+PKG_LICENSE:=GPL-2.0-or-later
+PKG_LICENSE_FILES:=COPYING
+
+PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=0
 
-PKG_CONFIG_DEPENDS := \
+PKG_CONFIG_DEPENDS:= \
   COOVACHILLI_MINIPORTAL \
   COOVACHILLI_REDIR \
   COOVACHILLI_USERAGENT \
@@ -28,7 +31,7 @@ PKG_CONFIG_DEPENDS := \
   COOVACHILLI_UAMDOMAINFILE \
   COOVACHILLI_LARGELIMITS \
   COOVACHILLI_NOSSL \
-  COOVACHILLI_CYASSL \
+  COOVACHILLI_WOLFSSL \
   COOVACHILLI_OPENSSL
 
 include $(INCLUDE_DIR)/package.mk
@@ -38,7 +41,7 @@ define Package/coova-chilli
   SUBMENU:=Captive Portals
   SECTION:=net
   CATEGORY:=Network
-  DEPENDS:=+kmod-tun +librt +COOVACHILLI_CYASSL:libcyassl +COOVACHILLI_OPENSSL:libopenssl
+  DEPENDS:=+kmod-tun +librt +COOVACHILLI_WOLFSSL:libwolfssl +COOVACHILLI_OPENSSL:libopenssl
   TITLE:=Wireless LAN HotSpot controller (Coova Chilli Version)
   URL:=https://coova.github.io/
   MENU:=1
@@ -75,7 +78,7 @@ endef
 
 DISABLE_NLS=
 
-TARGET_CFLAGS += $(FPIC)
+TARGET_CFLAGS += $(FPIC) -Wno-address-of-packed-member
 
 CONFIGURE_VARS += \
        ARCH="$(LINUX_KARCH)" \
@@ -109,7 +112,7 @@ define Build/Configure
        $(if $(CONFIG_COOVACHILLI_LARGELIMITS),--enable,--disable)-largelimits \
        $(if $(CONFIG_COOVACHILLI_UAMDOMAINFILE),--enable,--disable)-uamdomainfile \
        $(if $(CONFIG_IPV6),--with,--without)-ipv6 \
-       $(if $(CONFIG_COOVACHILLI_CYASSL),--with,--without)-cyassl \
+       $(if $(CONFIG_COOVACHILLI_WOLFSSL),--with,--without)-cyassl \
        $(if $(CONFIG_COOVACHILLI_OPENSSL),--with,--without)-openssl \
        $(if $(CONFIG_PACKAGE_kmod-ipt-coova),--with-nfcoova) \
        )
index 41ee6cd26886959ddcaf37e8c667c1d3895c30ed..997560368eab4cb03fe02badc210d4fa14aca27d 100644 (file)
@@ -16,7 +16,7 @@ config chilli
     #option fg
 
     # Include this flag to include debug information.
-    #option debug 9
+    #option debug 1
 
     # Re-read configuration file at this interval. Will also cause new domain
     # name lookups to be performed. Value is given in seconds.
index e0f0a0b68f4d656440a5faab60c3a22d3e878a31..b1015f38859cf81e026ca3324d9fd04e0e38742c 100644 (file)
@@ -9,18 +9,15 @@ service_triggers() {
 }
 
 config_cb() {
-       local chilli_inst="$2"
-       if [ "$chilli_inst" != "" ]; then
-               chilli_conf="/var/run/chilli_${chilli_inst}.conf"
-               if [ -e "$chilli_conf" ]; then
-                       rm -f "$chilli_conf"
-               fi
-               eval "start_chilli_$chilli_inst=1"
-       fi
+       chilli_conf="/var/run/chilli_${2}.conf"
+       [ -e "$chilli_conf" ] && rm -f "$chilli_conf"
 }
 
 option_cb() {
        case "$1" in
+               # ignored/internal settings
+               disabled)
+                       ;;
                # UCI settings
                network)
                        . /lib/functions/network.sh
@@ -28,11 +25,18 @@ option_cb() {
                        network_get_device ifname "$2"
                        echo "dhcpif=\"$ifname\"" >> "$chilli_conf"
                        ;;
-               disabled)
-                       [ "$(config_get_bool "$1")" = "1" ] && eval "start_chilli_$chilli_inst=0"
-                       ;;
                # boolean settings
-               debug|dhcpbroadcast|nodynip|vlanlocation|locationstopstart|locationcopycalled|locationimmediateupdate|locationopt82|coanoipcheck|noradallow|proxymacaccept|proxyonacct|dhcpmacset|dhcpradius|noc2c|eapolenable|uamanydns|uamanyip|uamnatanyip|nouamsuccess|nowispr1|nowispr2|domaindnslocal|radsec|macauth|macreauth|macauthdeny|macallowlocal|strictmacauth|strictdhcp|ieee8021q|only8021q|radiusoriginalurl|swapoctets|statusfilesave|wpaguests|openidauth|papalwaysok|mschapv2|chillixml|acctupdate|dnsparanoia|seskeepalive|usetap|noarpentries|framedservice|scalewin|redir|injectwispr|redirurl|routeonetone|nousergardendata|uamgardendata|uamotherdata|withunixipc|uamallowpost|redirssl|uamuissl|layer3|patricia|redirdnsreq|dhcpnotidle|ipv6|ipv6only)
+               acctupdate|chillixml|coanoipcheck|debug|dhcpbroadcast|dhcpmacset|dhcpnotidle|\
+               dhcpradius|dnsparanoia|domaindnslocal|eapolenable|fg|forgiving|framedservice|\
+               ieee8021q|injectwispr|ipv6|ipv6only|layer3|locationcopycalled|\
+               locationimmediateupdate|locationopt82|locationstopstart|macallowlocal|\
+               macauth|macauthdeny|macreauth|mmapring|mschapv2|noarpentries|noc2c|nochallenge|\
+               nodynip|noradallow|nosystemdns|nouamsuccess|nousergardendata|nowispr1|nowispr2|\
+               only8021q|openidauth|papalwaysok|patricia|postauthproxyssl|proxymacaccept|\
+               proxyonacct|radiusoriginalurl|radsec|redir|redirdnsreq|redirssl|redirurl|reload|\
+               routeonetone|scalewin|seskeepalive|statusfilesave|strictdhcp|strictmacauth|\
+               swapoctets|uamallowpost|uamanydns|uamanyip|uamauthedallowed|uamgardendata|\
+               uamnatanyip|uamotherdata|uamuissl|usetap|vlanlocation|wpaguests)
                        [ "$2" = "true" -o "$2" = "1" ] && echo "$1" >> "$chilli_conf"
                        ;;
                *)
@@ -43,14 +47,20 @@ option_cb() {
 
 start_chilli() {
        local cfg="$1"
-       local start_chilli=$(eval "echo \$start_chilli_$cfg")
-       [ "$start_chilli" = "0" ] && return
        local base="/var/run/chilli_${cfg}"
 
+       config_get_bool disabled "$1" 'disabled' 1
+       [ $disabled = 1 ] && return
+
        procd_open_instance "$cfg"
        procd_set_param command /usr/sbin/chilli
-       procd_set_param file "${base}.conf"
-       procd_append_param command --fg --conf "${base}.conf" --pidfile "${base}.pid" --cmdsocket "${base}.sock" --unixipc "${base}.ipc"
+       procd_set_param file "$chilli_conf"
+       procd_append_param command \
+               --fg \
+               --conf "${base}.conf" \
+               --pidfile "${base}.pid" \
+               --cmdsocket "${base}.sock" \
+               --unixipc "${base}.ipc"
        procd_set_param respawn
        procd_set_param stdout 1
        procd_set_param stderr 1
diff --git a/net/coova-chilli/patches/300-openssl-deprecated.patch b/net/coova-chilli/patches/300-openssl-deprecated.patch
new file mode 100644 (file)
index 0000000..70ce863
--- /dev/null
@@ -0,0 +1,84 @@
+--- a/src/ms_chap.c
++++ b/src/ms_chap.c
+@@ -96,18 +96,18 @@ MakeKey(u_char *key, u_char *des_key)
+   des_key[6] = Get7Bits(key, 42);
+   des_key[7] = Get7Bits(key, 49);
+-  des_set_odd_parity((des_cblock *)des_key);
++  DES_set_odd_parity((DES_cblock *)des_key);
+ }
+ static void /* IN 8 octets IN 7 octest OUT 8 octets */
+ DesEncrypt(u_char *clear, u_char *key, u_char *cipher)
+ {
+-  des_cblock          des_key;
+-  des_key_schedule    key_schedule;
++  DES_cblock          des_key;
++  DES_key_schedule    key_schedule;
+   MakeKey(key, des_key);
+-  des_set_key(&des_key, key_schedule);
+-  des_ecb_encrypt((des_cblock *)clear, (des_cblock *)cipher, key_schedule, 1);
++  DES_set_key(&des_key, &key_schedule);
++  DES_ecb_encrypt((DES_cblock *)clear, (DES_cblock *)cipher, &key_schedule, 1);
+ }
+ #define LENGTH 20
+--- a/src/ssl.c
++++ b/src/ssl.c
+@@ -35,11 +35,13 @@ openssl_env * initssl() {
+     if (openssl_init == 0) {
+       openssl_init = 1;
+ #ifdef HAVE_OPENSSL
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+       if (_options.debug) {
+       SSL_load_error_strings();
+       }
+       SSL_library_init();
+       OpenSSL_add_all_algorithms();
++#endif
+ #else
+       matrixSslOpen();
+       syslog(LOG_DEBUG, "%s(%d): MatrixSslOpen()", __FUNCTION__, __LINE__);
+@@ -55,11 +57,13 @@ openssl_env * initssl_cli() {
+     if (openssl_init == 0) {
+       openssl_init = 1;
+ #ifdef HAVE_OPENSSL
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+       if (_options.debug) {
+       SSL_load_error_strings();
+       }
+       SSL_library_init();
+       OpenSSL_add_all_algorithms();
++#endif
+ #else
+       matrixSslOpen();
+       syslog(LOG_DEBUG, "%s(%d): MatrixSslOpen()", __FUNCTION__, __LINE__);
+@@ -132,7 +136,7 @@ _openssl_env_init(openssl_env *env, char *engine, int server) {
+   if (_options.sslciphers) {
+     SSL_CTX_set_cipher_list(env->ctx, _options.sslciphers);
+   }
+-#ifdef HAVE_OPENSSL_ENGINE
++#ifndef OPENSSL_NO_ENGINE
+   if (engine) {
+  retry:
+     if ((env->engine = ENGINE_by_id(engine)) == NULL) {
+@@ -609,7 +613,7 @@ openssl_env_free(openssl_env *env) {
+ #endif
+ #ifdef HAVE_OPENSSL
+   if (env->ctx) SSL_CTX_free(env->ctx);
+-#ifdef HAVE_OPENSSL_ENGINE
++#ifndef OPENSSL_NO_ENGINE
+   if (env->engine) ENGINE_free(env->engine);
+ #endif
+ #endif
+--- a/src/ssl.h
++++ b/src/ssl.h
+@@ -41,6 +41,7 @@ typedef struct {
+ #include <openssl/ssl.h>
+ #include <openssl/pem.h>
+ #include <openssl/engine.h>
++#include <openssl/err.h>
+ #elif HAVE_CYASSL
+ #include <stdio.h>
+ #include <stdlib.h>
diff --git a/net/coova-chilli/patches/400-wolfssl.patch b/net/coova-chilli/patches/400-wolfssl.patch
new file mode 100644 (file)
index 0000000..9cc61da
--- /dev/null
@@ -0,0 +1,53 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -397,7 +397,7 @@ AC_ARG_WITH([cyassl],
+  [AS_HELP_STRING([--with-cyassl], [enable support for cyassl])],[],[with_cyassl=no])
+ AS_IF([test x"$with_cyassl" != xno],
+-  [AC_CHECK_LIB([cyassl], [CyaSSL_Init],
++  [AC_CHECK_LIB([cyassl], [wolfSSL_Init],
+               [AC_SUBST([LIBSSL], ["-lcyassl"])
+                AC_DEFINE([HAVE_CYASSL], [1],
+                          [Define if you have cyassl])
+--- a/src/ippool.c
++++ b/src/ippool.c
+@@ -35,6 +35,7 @@ int ippool_print(int fd, struct ippool_t *this) {
+   char * sep = "-- %-15s ------------------------------------------------------------\n";
+ #define ERR 0
++#undef USED /* defined in <wolfssl/wolfcrypt/integer.h> */
+ #define USED 1
+ #define FREE 2
+ #define LIST 3
+--- a/src/md5.h
++++ b/src/md5.h
+@@ -35,7 +35,6 @@
+ #define MD5Update MD5_Update
+ #define MD5Final MD5_Final
+-typedef struct CYASSL_MD5_CTX MD5_CTX;
+ #else
+ struct MD5Context {
+--- a/src/ssl.c
++++ b/src/ssl.c
+@@ -131,7 +131,7 @@ _openssl_env_init(openssl_env *env, char *engine, int server) {
+    */
+   const long options = SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3 | SSL_OP_NO_COMPRESSION;
+   env->meth = SSLv23_method();
+-  env->ctx = SSL_CTX_new(env->meth);
++  env->ctx = SSL_CTX_new((void *)env->meth);
+   SSL_CTX_set_options(env->ctx, options);
+   if (_options.sslciphers) {
+     SSL_CTX_set_cipher_list(env->ctx, _options.sslciphers);
+--- a/src/ssl.h
++++ b/src/ssl.h
+@@ -48,6 +48,8 @@ typedef struct {
+ #include <time.h>
+ #include <string.h>
++#define OPENSSL_NO_ENGINE
++#include <cyassl/options.h>
+ #include <cyassl/ssl.h>
+ #include <cyassl/openssl/bio.h>
+ #include <cyassl/openssl/crypto.h>
diff --git a/net/coova-chilli/patches/500-redir.patch b/net/coova-chilli/patches/500-redir.patch
new file mode 100644 (file)
index 0000000..444aa48
--- /dev/null
@@ -0,0 +1,44 @@
+--- a/src/redir.c
++++ b/src/redir.c
+@@ -3358,14 +3358,17 @@ int redir_main(struct redir_t *redir,
+   }
+ #define redir_memcopy(msgtype)                                          \
++  do {                                                                  \
+   redir_challenge(challenge);                                           \
+   redir_chartohex(challenge, hexchal, REDIR_MD5LEN);                    \
+   msg.mtype = msgtype;                                                  \
+   memcpy(conn.s_state.redir.uamchal, challenge, REDIR_MD5LEN);          \
+-  if (_options.debug) syslog(LOG_DEBUG, "%s(%d): ---->>> resetting challenge: %s", __FUNCTION__, __LINE__, hexchal)
++  if (_options.debug) syslog(LOG_DEBUG, "%s(%d): ---->>> resetting challenge: %s", __FUNCTION__, __LINE__, hexchal); \
++  } while (0)
+ #ifdef USING_IPC_UNIX
+ #define redir_msg_send(msgopt)                                          \
++  do {                                                                  \
+   msg.mdata.opt = msgopt;                                               \
+   memcpy(&msg.mdata.address, address, sizeof(msg.mdata.address));       \
+   memcpy(&msg.mdata.baddress, baddress, sizeof(msg.mdata.baddress));    \
+@@ -3375,9 +3378,11 @@ int redir_main(struct redir_t *redir,
+     syslog(LOG_ERR, "%s: write() failed! msgfd=%d type=%ld len=%d",     \
+            strerror(errno), redir->msgfd, msg.mtype, (int)sizeof(msg.mdata)); \
+     return redir_main_exit(&socket, forked, rreq);                      \
+-  }
++  }                                                                     \
++  } while (0)
+ #else
+ #define redir_msg_send(msgopt)                                          \
++  do {                                                                  \
+   msg.mdata.opt = msgopt;                                               \
+   memcpy(&msg.mdata.address, address, sizeof(msg.mdata.address));       \
+   memcpy(&msg.mdata.baddress, baddress, sizeof(msg.mdata.baddress));    \
+@@ -3387,7 +3392,8 @@ int redir_main(struct redir_t *redir,
+     syslog(LOG_ERR, "%s: msgsnd() failed! msgid=%d type=%ld len=%d",    \
+            strerror(errno), redir->msgid, msg.mtype, (int)sizeof(msg.mdata)); \
+     return redir_main_exit(&socket, forked, rreq);                      \
+-  }
++  }                                                                     \
++  } while (0)
+ #endif
+   /*
index a4b67d9b1c93745a8cdad0a6b85eb8d8ca8a0089..e5fa96223b7e9ec7347bb4afd5f12aa7f5f050ad 100644 (file)
@@ -8,18 +8,18 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=cshark
-PKG_VERSION=2018-08-20-$(PKG_SOURCE_VERSION)
-PKG_RELEASE=1
+PKG_SOURCE_DATE:=2018-08-20
+PKG_SOURCE_VERSION:=7a7cf7f35074b85c6fb0c52067e640d2433ef73b
+PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/cloudshark/cshark.git
-PKG_SOURCE_SUBDIR=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=7a7cf7f35074b85c6fb0c52067e640d2433ef73b
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
-PKG_MIRROR_HASH:=bc448bb4e910e771a5a8a39af7cfa09a79b59c595f15cdcae9d0103ce09be019
+PKG_MIRROR_HASH:=b09822e93d7de7f4aa9fa018c304ebc52dd3419de3dd2eff463986d3a3b8ca71
+
+PKG_MAINTAINER:=Luka Perkov <luka@openwrt.org>
+PKG_LICENSE:=BSD-2-Clause
 
 PKG_BUILD_PARALLEL:=1
-PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/cmake.mk
@@ -28,14 +28,12 @@ define Package/cshark
   SECTION:=net
   CATEGORY:=Network
   TITLE:=CloudShark capture tool
-  URL:=http://www.cloudshark.org/
+  URL:=https://cloudshark.io/
   DEPENDS:=+libjson-c +libpcap +libuci +libubox +libuclient +libustream-mbedtls
-  MAINTAINER:=Luka Perkov <luka@openwrt.org>
 endef
 
 CMAKE_OPTIONS = \
-       -DCMAKE_INSTALL_PREFIX=/usr \
-       -DWITH_DEBUG=OFF \
+       -DWITH_DEBUG=OFF
 
 define Package/cshark/conffiles
 /etc/config/cshark
index e1d3202fd3a5b9cf2ee6d303344eab407f8fc47c..18b7969adc3614a5ebdce69b82d7d3c75823c577 100644 (file)
@@ -18,6 +18,7 @@ PKG_HASH:=587c6a25ad78109995a7ccb8e60aa1c491b149f2c99d47033f3d5e648430ad2f
 PKG_MAINTAINER:=Federico Di Marco <fededim@gmail.com>
 PKG_LICENSE:=GPL-3
 PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:davfs2:davfs2
 
 PKG_FIXUP:=gettext-version autoreconf
 PKG_BUILD_PARALLEL:=1
diff --git a/net/dcwifi/README.md b/net/dcwifi/README.md
new file mode 100644 (file)
index 0000000..6513933
--- /dev/null
@@ -0,0 +1,14 @@
+# Description
+
+This directory contains package files for including Dual Channel Wi-Fi (dcwifi) components in an OpenWrt build.
+
+# dcwifi Packages
+
+The dcwifi packages can be found in the menuconfig in the following locations:
+
+  * dcstad: `Network -> Routing and Redirection`
+  * dcwapd: `Network -> Routing and Redirection`
+  * libdcwproto: `Libraries -> Networking`
+  * libdcwsocket: `Libraries -> Networking`
+  * macremapper: `Kernel modules -> Network Support` (listed as `kmod-macremapper`)
+  * mrmctl: `Utilities`
diff --git a/net/dcwifi/dcstad/Makefile b/net/dcwifi/dcstad/Makefile
new file mode 100644 (file)
index 0000000..150eb62
--- /dev/null
@@ -0,0 +1,49 @@
+#
+# Copyright (C) 2019 EWSI
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=dcstad
+PKG_VERSION:=1.0.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/ewsi/$(PKG_NAME)/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=3b146ea22bc5480d8264c5ea269831d25993673aa90a9e82dc2dc601a111da55
+
+PKG_MAINTAINER:=Carey Sonsino <careys@edgewaterwireless.com>
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=COPYING
+
+PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/dcstad
+  SECTION:=net
+  CATEGORY:=Network
+  SUBMENU:=Routing and Redirection
+  TITLE:=Dual-Channel WiFi client daemon
+  URL:=https://www.edgewaterwireless.com
+  DEPENDS:=+libdcwsocket +libdcwproto
+endef
+
+define Package/dcstad/description
+Implementation of the Dual-Channel WiFi client daemon
+endef
+
+TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto
+TARGET_LDFLAGS += -Wl,--gc-sections
+
+define Package/dcstad/install
+       $(INSTALL_DIR) $(1)/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dcstad $(1)/bin/
+endef
+
+$(eval $(call BuildPackage,dcstad))
diff --git a/net/dcwifi/dcstad/patches/01_replace_bzero.patch b/net/dcwifi/dcstad/patches/01_replace_bzero.patch
new file mode 100644 (file)
index 0000000..db924f7
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/src/main.c
++++ b/src/main.c
+@@ -190,7 +190,7 @@ main( int argc, char *argv[] ) {
+   rv = 1; /* failure unless proven otherwise */
+   /* first initialize and parse the command line */
+-  bzero(&cfg, sizeof(cfg));
++  memset(&cfg, 0, sizeof(cfg));
+   parse_cmdline(&cfg, argc, argv);
+   dcwloginfof("%s\n", "DCW Station Daemon Starting Up...");
diff --git a/net/dcwifi/dcwapd/Makefile b/net/dcwifi/dcwapd/Makefile
new file mode 100644 (file)
index 0000000..9e35d31
--- /dev/null
@@ -0,0 +1,76 @@
+#
+# Copyright (C) 2019 EWSI
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=dcwapd
+PKG_VERSION:=1.0.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/ewsi/$(PKG_NAME)/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=750a08abccd88d9aeda942307f76ce5711181c06f9f3e8fded5cb5ce42bac323
+
+PKG_MAINTAINER:=Carey Sonsino <careys@edgewaterwireless.com>
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=COPYING
+
+PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
+
+include $(INCLUDE_DIR)/uclibc++.mk
+include $(INCLUDE_DIR)/package.mk
+
+define Package/dcwapd
+  SECTION:=net
+  CATEGORY:=Network
+  SUBMENU:=Routing and Redirection
+  TITLE:=Dual-Channel WiFi AP daemon
+  URL:=https://www.edgewaterwireless.com
+  DEPENDS:=$(CXX_DEPENDS) +kmod-macremapper +libdcwsocket +libdcwproto +mrmctl +libuci
+endef
+
+define Package/dcwapd/description
+Implementation of the Dual-Channel WiFi AP daemon
+endef
+
+CONFIGURE_ARGS += \
+       --enable-platform=linuxjsonstatic \
+       --enable-shared
+
+TARGET_CXXFLAGS += -std=c++11 -DRAPIDJSON_HAS_CXX11_RVALUE_REFS=0 -ffunction-sections -fdata-sections -flto
+TARGET_LDFLAGS += -ldcwproto -ldcwsocket -lmrmfilterparser -luci -Wl,--gc-sections,--as-needed
+
+define Build/InstallDev
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
+endef
+
+define Package/dcwapd/install
+       $(INSTALL_DIR) $(1)/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME) $(1)/bin/
+       $(INSTALL_DIR) $(1)/usr/lib
+       # Note: $(INSTALL_BIN) does not keep symlinks, so use $(CP)
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
+
+#      Utility files
+       $(INSTALL_DIR) $(1)/etc/$(PKG_NAME)
+       $(INSTALL_DATA) ./files/*.inc $(1)/etc/$(PKG_NAME)/
+       $(INSTALL_BIN) ./files/*.sh $(1)/etc/$(PKG_NAME)/
+#      UCI config file copy - this is here for convenience and reference only
+       $(INSTALL_DATA) ./files/dcwapd.uci $(1)/etc/$(PKG_NAME)/
+
+#      UCI config file
+       $(INSTALL_DIR) $(1)/etc/config
+       $(INSTALL_DATA) ./files/dcwapd.uci $(1)/etc/config/dcwapd
+
+#      Init script
+       $(INSTALL_DIR) $(1)/etc/init.d
+       $(INSTALL_BIN) ./files/dcwapd.init.d $(1)/etc/init.d/dcwapd
+endef
+$(eval $(call BuildPackage,dcwapd))
diff --git a/net/dcwifi/dcwapd/files/dcwapd.inc b/net/dcwifi/dcwapd/files/dcwapd.inc
new file mode 100644 (file)
index 0000000..c4b44f1
--- /dev/null
@@ -0,0 +1,256 @@
+#!/bin/sh
+
+#
+# Dual Channel Wi-Fi Startup Script
+#
+# This script creates the proper network bridge configuration
+#  necessary for Dual Channel Wi-Fi, and starts the dcwapd daemon
+#
+
+verbose=1
+
+uciconfig=dcwapd
+
+result=
+
+# NOTE: all functions write the result to the $result variable
+
+get_channelsets()
+{
+       # default to empty
+       result=
+       channelsets=$(uci show $uciconfig | grep "=channel-set$")
+       for channelset in $channelsets; do
+               channelset=$(echo "$channelset" | sed -rn "s/$uciconfig\.(.*)=.*/\1/p")
+               result="$result $channelset"
+       done
+       if [ $verbose -eq 1 ]; then
+               echo "Channel Sets: $result" 2>&1 | logger
+       fi
+}
+
+# $1 : the channel set name
+get_channelset_enabled()
+{
+       # default to disabled
+       result=0
+       if [ -n "$1" ]; then
+               result=$(uci get $uciconfig."$1".enabled)
+       fi
+       if [ $verbose -eq 1 ]; then
+               echo "Channel Set \"$1\" Enabled: $result" 2>&1 | logger
+       fi
+}
+
+# $1 : the channel set name
+get_primary_bridge()
+{
+       result=
+       if [ -n "$1" ]; then
+               result=$(uci get $uciconfig."$1".bridge)
+       fi
+       if [ $verbose -eq 1 ]; then
+               echo "Channel Set \"$1\" Primary Bridge: $result" 2>&1 | logger
+       fi
+}
+
+# $1 : the channel set name
+get_datachannels()
+{
+       # default to empty
+       result=
+       if [ -n "$1" ]; then
+               result=$(uci get $uciconfig."$1".data_channels)
+       fi
+       if [ $verbose -eq 1 ]; then
+               echo "Channel Set \"$1\" Data Channels: $result" 2>&1 | logger
+       fi
+}
+
+# $1 : the wlan interface name
+get_wifi_iface_num()
+{
+       result=
+       if [ -n "$1" ];then
+               #result=$(echo "$1" | sed -n "s/wlan//p")
+               result=$(echo "$1" | sed -rn "s/wlan([0-9]*).*/\1/p")
+       fi
+}
+
+# $1 : the bridge name
+get_bridge_network_name()
+{
+       result=
+       if [ -n "$1" ];then
+               result=$(echo "$1" | sed -n "s/br-//p")
+       fi
+}
+
+# $1 : the wlan interface name
+set_iface_init_state()
+{
+       result=
+       if [ -n "$1" ]; then
+               iface=$1
+               # need to extract the "X" from wlanX
+               get_wifi_iface_num "$iface"
+               iface_num=$result
+               if [ -n "$iface_num" ]; then
+                       # get the iface network
+                       init_net=$(uci get wireless.@wifi-iface[$iface_num].network)
+                       if [ -n "$init_net" ]; then
+                               # if the iface network is a bridge, but doesn't start with "br-"
+                               #  I think we need to prepend it?
+                               net_type=$(uci get network."$init_net".type)
+                               if [ -n "$net_type" ] && [ "$net_type" = "bridge" ]; then
+                                       prefix_ok=$(echo "$init_net" | grep "^br-")
+                                       if [ -z "$prefix_ok" ]; then
+                                               init_net="br-$init_net"
+                                       fi
+                               fi
+                       fi
+
+                       # make sure that the init_net section exists
+                       init_net_section=$(uci get dcwapd.init_net)
+                       if [ "$init_net_section" != "init_net" ]; then
+                               # the section did not exist
+                               uci set dcwapd.init_net=init_net
+                       fi
+
+                       # save the initial network
+                       if [ $verbose -eq 1 ]; then
+                               echo "Saving '$iface' initial network '$init_net'" 2>&1 | logger
+                       fi
+                       uci set $uciconfig.init_net."$iface"="$init_net"
+                       uci commit
+
+                       # save the initial network in the result variable
+                       result=$init_net
+               fi
+       fi
+}
+
+# $1 : the wlan interface name
+get_iface_init_state()
+{
+       result=
+       if [ -n "$1" ];then
+               init_net=$(uci get $uciconfig.init_net."$iface")
+
+               # if the response starts with "uci: ", it was an error not the real result
+               err=$(echo "$init_net" | grep "^uci: ")
+               if [ -z "$err" ]; then
+                       # no error, set the result
+                       result=$init_net
+
+                       if [ $verbose -eq 1 ]; then
+                               echo "Got '$iface' initial network '$init_net'" 2>&1 | logger
+                       fi
+               fi
+       fi
+}
+
+# $1 : the name of the data channel name to bring up
+datachannel_up()
+{
+       if [ -n "$1" ]; then
+               bridge=$(uci get $uciconfig."$1".bridge)
+               interfaces=$(uci get $uciconfig."$1".interfaces)
+                if [ $verbose -eq 1 ]; then
+                       echo "Creating Data Channel Bridge: $bridge" 2>&1 | logger
+               fi
+
+               get_bridge_network_name "$bridge"
+               netname=$result
+               if [ -n "$netname" ]; then
+                   uci set network."$netname"=interface
+                   uci set network."$netname".type=bridge
+                   uci set network."$netname".proto=static
+                   uci set network."$netname".bridge_empty='1'
+               fi
+
+               # create the bridge
+               uci commit
+               /etc/init.d/network reload
+
+               for iface in $interfaces; do
+                       # if iface is in a bridge, the bridge name should be stored in result
+                       set_iface_init_state "$iface"
+                       init_bridge=$result
+
+                       # update uci with the new bridge info
+                       get_wifi_iface_num "$iface"
+                       iface_num=$result
+                       if [ -n "$iface_num" ]; then
+                           uci set wireless.@wifi-iface[$iface_num].network="$netname"
+                       fi
+
+                       # manually put the interface into the data bridge
+                       # if iface is in a bridge, remove it before adding it to the data bridge
+                       if [ -n "$init_bridge" ]; then
+                               brctl delif "$init_bridge" "$iface" 2>&1 | logger
+                       fi
+                       brctl addif "$bridge" "$iface" 2>&1 | logger
+               done
+
+               # commit uci changes and reload the network
+               uci commit
+               /etc/init.d/network reload
+               #/etc/init.d/network restart
+               # while [ 1 ]; do
+               #       ifconfig "$bridge" > /dev/null 2>&1
+               #       if [ $? == 0 ]; then
+               #               break;
+               #       fi
+               #       sleep 1
+               # done
+       fi
+}
+
+# $1 : the name of the data channel to bring down
+datachannel_down()
+{
+       if [ -n "$1" ]; then
+               bridge=$(uci get $uciconfig."$1".bridge)
+               interfaces=$(uci get $uciconfig."$1".interfaces)
+               for iface in $interfaces; do
+                       if [ $verbose -eq 1 ]; then
+                               echo "Deconfiguring Data Channel Interface: $iface" 2>&1 | logger
+                       fi
+
+                       # manually remove the interface from the data bridge
+                       brctl delif "$bridge" "$iface" 2>&1 | logger
+
+                       get_iface_init_state "$iface"
+                       init_bridge=$result
+                       if [ -n "$init_bridge" ]; then
+                               # manually move the interface back to the original bridge
+                               brctl addif "$init_bridge" "$iface" 2>&1 | logger
+
+                               # update uci with the new bridge and interface configuration
+                               get_wifi_iface_num "$iface"
+                               iface_num=$result
+                               get_bridge_network_name "$init_bridge"
+                               netname=$result
+                               if [ -n "$iface_num" ] && [ -n "$netname" ]; then
+                                   uci set wireless.@wifi-iface[$iface_num].network="$netname"
+                               fi
+                       fi
+               done
+               if [ $verbose -eq 1 ]; then
+                       echo "Deconfiguring Data Channel Bridge: $bridge" 2>&1 | logger
+               fi
+
+               # delete the bridge from uci
+               get_bridge_network_name "$bridge"
+               netname=$result
+               if [ -n "$netname" ]; then
+                   uci delete network."$netname"
+               fi
+
+               # commit uci changes and reload the network
+               uci commit
+               /etc/init.d/network reload
+               #`/etc/init.d/network restart`
+       fi
+}
diff --git a/net/dcwifi/dcwapd/files/dcwapd.init.d b/net/dcwifi/dcwapd/files/dcwapd.init.d
new file mode 100755 (executable)
index 0000000..6f6a48f
--- /dev/null
@@ -0,0 +1,31 @@
+#!/bin/sh /etc/rc.common
+
+START=99
+# Setting the stop value makes the restart script unreliable when invoked by LuCI
+#STOP=0
+
+scriptdir=/etc/dcwapd
+
+#validate_section_dcwapd() {
+#      uci_validate_section dcwapd general "${1}" \
+#              'enabled:bool:1'
+#}
+
+start() {
+#      validate_section_dcwapd dcwapd
+
+       # only run the start script if the enabled uci option is set properly
+       enabled=$(uci get dcwapd.general.enabled)
+       if [ "${enabled}" = "1" ]; then
+               ${scriptdir}/start_dcwapd.sh
+       else
+               echo "dcwapd is disabled in UCI"
+               return 1
+       fi
+}
+
+stop() {
+        ${scriptdir}/stop_dcwapd.sh
+       # Add a sleep after stopping because an immediate restat will fail otherwise
+       sleep 1
+}
diff --git a/net/dcwifi/dcwapd/files/dcwapd.uci b/net/dcwifi/dcwapd/files/dcwapd.uci
new file mode 100644 (file)
index 0000000..b24ec6f
--- /dev/null
@@ -0,0 +1,116 @@
+######################################################
+# Copyright 2018 EWSI
+#
+# Licensed to the public under the Apache License 2.0.
+######################################################
+# Dual Channel Wi-Fi AP Daemon configuration
+
+###################
+# General Options #
+###################
+# The "enabled" option controls the run state of the Dual Channel Wi-Fi AP Daemon
+#  0 - disabled, 1 - enabled
+# The "tmpdir" option MUST be specified
+#  option tmpdir '<path_of_temp_dir>'
+
+config general 'general'
+       option enabled 0
+       option tmpdir '/tmp/dcwapd'
+
+################
+# Channel Sets #
+################
+# Sections of type "channel-set" define a Dual Channel Wi-Fi primary channel,
+#  along with it's associated data channels
+#
+# The "data_channels" option is a space-delimited list of "datachannel"-typed instance names
+
+config channel-set 'channelset0'
+       option enabled 0
+#      option enabled 1
+       option ssid 'OpenWrt'
+       option bridge 'br-lan'
+       option data_channels 'datachannel0'
+
+#config channel-set 'channelset1'
+#      option enabled 0
+#      option ssid 'OpenWrt2'
+#      option bridge 'br-lan'
+#      option data_channels 'datachannel1'
+
+#################
+# Data Channels #
+#################
+# Sections of type "datachannel" define a Dual Channel Wi-Fi data channel,
+#  along with it's associated bridge and wireless interfaces
+#
+# The "interfaces" option is a space-delimited list of wireless interface names 
+
+config datachannel 'datachannel0'
+       option ssid 'DCW0'
+       option bridge 'br-dc0'
+       option interfaces 'wlan2 wlan5'
+
+#config datachannel 'datachannel1'
+#      option ssid 'DCW1'
+#      option bridge 'br-dc1'
+#      option interfaces 'wlan4'
+
+####################
+# Init Net Options #
+####################
+# The "init_net" section MUST be specified
+#  This section will be used to save and restore the state of the data interfaces
+config init_net 'init_net'
+
+###############
+# Filter Sets #
+###############
+# Sections of type "filter-set" define a Dual Channel Wi-Fi group of filters,
+#  along with it's associated MAC address and filter rules
+# 
+# The "TFP_Default" filter set MUST be defined, although it is not required
+#  to have any associated filter rules
+# The "TFP_Default" filter mac option can have the value of '*', meaning match
+#  all MAC addresses
+#
+# The "filters" option is a space-delimited list of "filter"-typed instance names
+
+config filter-set 'TFP_Default'
+       option mac '*'
+       option filters 'filter0 filter1'
+
+#config filter-set 'filterset0'
+#      option mac '00:00:BE:EF:F0:0D'
+#      option filters 'filter2'
+
+
+################
+# Filter Rules #
+################
+# Sections of type "filter" define a Dual Channel Wi-Fi filter,
+#  along with it's associated filter parameters
+# 
+# Any or all of the filter options may be set to '*' to match
+#  all values
+
+config filter 'filter0'
+       option packet_size '*'
+       option source_ip '*'
+       option source_port '80'
+       option protocol 'tcp'
+       option dest_port '*'
+
+config filter 'filter1'
+       option packet_size '*'
+       option source_ip '*'
+       option source_port '443'
+       option protocol 'tcp'
+       option dest_port '*'
+
+#config filter 'filter2'
+#      option packet_size '*'
+#      option source_ip '*'
+#      option source_port '22'
+#      option protocol 'tcp'
+#      option dest_port '*'
diff --git a/net/dcwifi/dcwapd/files/start_dcwapd.sh b/net/dcwifi/dcwapd/files/start_dcwapd.sh
new file mode 100755 (executable)
index 0000000..8a8c11b
--- /dev/null
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+#
+# Dual Channel Wi-Fi Startup Script
+#
+# This script creates the proper network bridge configuration
+#  necessary for Dual Channel Wi-Fi, and starts the dcwapd daemon
+#
+
+# Note - shellcheck cannot deal with the dynamic sourcing
+# shellcheck disable=SC1090
+# which also messes with variables defined in the sourced file
+# shellcheck disable=SC2154
+scriptdir=$(dirname -- "$(readlink -f -- "$0")")
+. "$scriptdir"/dcwapd.inc
+
+get_channelsets
+# get the list of channel sets
+channelsets=$result
+
+for channelset in $channelsets; do
+       if [ -n "$channelset" ]; then
+               get_channelset_enabled "$channelset"
+               enabled=$result
+               if [ "$enabled" = "1" ]; then
+                       # the channel set is enabled
+
+                       # get the list of data channels used by the channel set
+                       get_datachannels "$channelset"
+                       datachannels=$result
+                       for datachannel in $datachannels; do
+                               datachannel_up "$datachannel"
+                       done
+               fi
+       fi
+done
+
+# start dcwapd, sending stdout and stderr to the system log
+dcwapd 2>&1 | logger &
diff --git a/net/dcwifi/dcwapd/files/stop_dcwapd.sh b/net/dcwifi/dcwapd/files/stop_dcwapd.sh
new file mode 100755 (executable)
index 0000000..a360a82
--- /dev/null
@@ -0,0 +1,45 @@
+#!/bin/sh
+
+#
+# Dual Channel Wi-Fi Startup Script
+#
+# This script creates the proper network bridge configuration
+#  necessary for Dual Channel Wi-Fi, and starts the dcwapd daemon
+#
+
+# Note - shellcheck cannot deal with the dynamic sourcing
+# shellcheck disable=SC1090
+# which also messes with variables defined in the sourced file
+# shellcheck disable=SC2154
+scriptdir=$(dirname -- "$(readlink -f -- "$0")")
+. "$scriptdir"/dcwapd.inc
+
+pid=$(pidof dcwapd)
+if [ -n "$pid" ]; then
+       if [ "$verbose" -eq "1" ]; then
+               echo "Stopping dcwapd..." 2>&1 | logger
+       fi
+       kill "$pid"
+fi
+
+get_channelsets
+# get the list of channel sets
+channelsets=$result
+
+for channelset in $channelsets; do
+       if [ -n "$channelset" ]; then
+# we don't care if it is enabled, tear it down
+#              get_channelset_enabled $channelset
+#              enabled=$result
+#              if [ $enabled = "1" ]; then
+#                      # the channel set is enabled
+
+                       # get the list of data channels used by the channel set
+                       get_datachannels "$channelset"
+                       datachannels=$result
+                       for datachannel in $datachannels; do
+                               datachannel_down "$datachannel"
+                       done
+#              fi
+       fi
+done
diff --git a/net/dcwifi/dcwapd/patches/01_add_uci_config_provider.patch b/net/dcwifi/dcwapd/patches/01_add_uci_config_provider.patch
new file mode 100644 (file)
index 0000000..afb034b
--- /dev/null
@@ -0,0 +1,475 @@
+--- a/dev/null
++++ b/dcwlinux/uci_configuration_provider.h
+@@ -0,0 +1,104 @@
++#ifndef UCI_CONFIGURATION_PROVIDER_H_INCLUDED
++#define UCI_CONFIGURATION_PROVIDER_H_INCLUDED
++
++#include "./ap_configuration.h"
++
++namespace dcwlinux {
++
++class UciConfigurationProvider : public APConfigurationProvider {
++
++  static const char *SECTION_TYPE_GENERAL;
++  static const char *SECTION_TYPE_CHANNEL_SET;
++  static const char *SECTION_TYPE_DATA_CHANNEL;
++  static const char *SECTION_TYPE_FILTER_SET;
++  static const char *SECTION_TYPE_FILTER;
++  static const char *DEFAULT_FILTER_SET_NAME;
++
++  static const char *OPTION_TMPDIR;
++  static const char *OPTION_ENABLED;
++  static const char *OPTION_SSID;
++  static const char *OPTION_BRIDGE;
++  static const char *OPTION_DATA_CHANNELS;
++  static const char *OPTION_INTERFACES;
++  static const char *OPTION_MAC_ADDRESS;
++  static const char *OPTION_FILTERS;
++  static const char *OPTION_PACKET_SIZE;
++  static const char *OPTION_SOURCE_IP;
++  static const char *OPTION_SOURCE_PORT;
++  static const char *OPTION_PROTOCOL;
++  static const char *OPTION_DEST_PORT;
++
++  static const char *FILTER_FILE_EXTENSION;
++
++  UciConfigurationProvider(const UciConfigurationProvider&); //no copy
++
++  typedef std::map<std::string, std::string>  DataChannelBridgeMap;
++  struct PrimaryChannel {
++    std::string            bridgeName;
++    DataChannelBridgeMap   dataChannels;
++  };
++  typedef std::map<std::string, PrimaryChannel>   PrimaryChannelMap;
++  typedef std::map<dcw::MacAddress, std::string>  StationFilterMap;
++
++  struct uci_context *_uciContext;
++  struct uci_package *_uciPackage;
++  const char *_uciConfig;
++
++  std::string        _filterDirectory;
++  PrimaryChannelMap  _primaryChannels;
++  StationFilterMap   _stationFilters;
++
++public:
++  UciConfigurationProvider(const char * const uciConfig); // the "config" part of UCI commands
++  virtual ~UciConfigurationProvider();
++
++  virtual void InstanciateCFileTrafficFilterProfiles(CFTFPList& output) const;
++  virtual void GetPrimarySsids(SsidSet& output) const;
++  virtual void GetDataSsids(SsidSet& output, const char * const primarySsid) const;
++  virtual const char *GetSsidIfname(const char * const ssid) const;
++  virtual void GetStationTrafficFilterProfiles(StationTFPMap& output) const;
++};
++
++}; //namespace dcwlinux {
++
++#endif //#ifndef UCI_CONFIGURATION_PROVIDER_H_INCLUDED
++#ifndef UCI_CONFIGURATION_PROVIDER_H_INCLUDED
++#define UCI_CONFIGURATION_PROVIDER_H_INCLUDED
++
++#include "./ap_configuration.h"
++
++namespace dcwlinux {
++
++class UciConfigurationProvider : public APConfigurationProvider {
++  UciConfigurationProvider(const UciConfigurationProvider&); //no copy
++
++  typedef std::map<std::string, std::string>  DataChannelBridgeMap;
++  struct PrimaryChannel {
++    std::string            bridgeName;
++    DataChannelBridgeMap   dataChannels;
++  };
++  typedef std::map<std::string, PrimaryChannel>   PrimaryChannelMap;
++  typedef std::map<dcw::MacAddress, std::string>  StationFilterMap;
++
++  struct uci_context *_uciContext;
++  struct uci_package *_uciPackage;
++  const char *_uciConfig;
++
++  PrimaryChannelMap  _primaryChannels;
++  StationFilterMap   _stationFilters;
++  CFTFPList          _defaultFilters;
++
++public:
++  UciConfigurationProvider(const char * const uciConfig); // the "config" part of UCI commands
++  virtual ~UciConfigurationProvider();
++
++  virtual void InstanciateCFileTrafficFilterProfiles(CFTFPList& output) const;
++  virtual void GetPrimarySsids(SsidSet& output) const;
++  virtual void GetDataSsids(SsidSet& output, const char * const primarySsid) const;
++  virtual const char *GetSsidIfname(const char * const ssid) const;
++  virtual void GetStationTrafficFilterProfiles(StationTFPMap& output) const;
++};
++
++}; //namespace dcwlinux {
++
++#endif //#ifndef UCI_CONFIGURATION_PROVIDER_H_INCLUDED
+--- a/dev/null
++++ b/dcwlinux/uci_configuration_provider.cxx
+@@ -0,0 +1,365 @@
++
++#include <uci.h>
++#include <string.h>
++
++#include <stdlib.h>
++#include <stdexcept>
++#include <sys/stat.h>
++#include <cerrno>
++#include <iostream>
++#include <fstream>
++
++#include "./uci_configuration_provider.h"
++
++#include "dcwposix/filterdirscanner.h"
++#include "dcw/macaddress.h"
++#include "dcw/dcwlog.h"
++
++using namespace dcwlinux;
++
++  const char *UciConfigurationProvider::SECTION_TYPE_GENERAL = "general";
++  const char *UciConfigurationProvider::SECTION_TYPE_CHANNEL_SET = "channel-set";
++  const char *UciConfigurationProvider::SECTION_TYPE_DATA_CHANNEL = "datachannel";
++  const char *UciConfigurationProvider::SECTION_TYPE_FILTER_SET = "filter-set";
++  const char *UciConfigurationProvider::SECTION_TYPE_FILTER = "filter";
++  const char *UciConfigurationProvider::DEFAULT_FILTER_SET_NAME = "TFP_Default";
++
++  const char *UciConfigurationProvider::OPTION_TMPDIR = "tmpdir";
++  const char *UciConfigurationProvider::OPTION_ENABLED = "enabled";
++  const char *UciConfigurationProvider::OPTION_SSID = "ssid";
++  const char *UciConfigurationProvider::OPTION_BRIDGE = "bridge";
++  const char *UciConfigurationProvider::OPTION_DATA_CHANNELS = "data_channels";
++  const char *UciConfigurationProvider::OPTION_INTERFACES = "interfaces";
++  const char *UciConfigurationProvider::OPTION_MAC_ADDRESS = "mac";
++  const char *UciConfigurationProvider::OPTION_FILTERS = "filters";
++  const char *UciConfigurationProvider::OPTION_PACKET_SIZE = "packet_size";
++  const char *UciConfigurationProvider::OPTION_SOURCE_IP = "source_ip";
++  const char *UciConfigurationProvider::OPTION_SOURCE_PORT = "source_port";
++  const char *UciConfigurationProvider::OPTION_PROTOCOL = "protocol";
++  const char *UciConfigurationProvider::OPTION_DEST_PORT = "dest_port";
++
++  const char *UciConfigurationProvider::FILTER_FILE_EXTENSION = ".tfp";
++
++  UciConfigurationProvider::UciConfigurationProvider(const char * const uciConfig) : _uciConfig(uciConfig) {
++
++    //printf("*** Start UciConfigurationProvider(%s)\n", _uciConfig);
++    //printf("*** About to uci_alloc_context()\n");
++
++    _uciContext = uci_alloc_context();
++
++    //printf("*** uci_alloc_context() complete\n");
++    //printf("*** About to uci_load()\n");
++
++    if (_uciContext == NULL)
++    {
++      std::string err = "Error creating UCI context ";
++      throw std::runtime_error(err);
++    }
++
++    uci_load(_uciContext, _uciConfig, &_uciPackage);
++
++    //printf("*** uci_load complete()\n");
++
++    if (_uciPackage == NULL)
++    {
++      std::string err = "Error loading UCI package " + std::string(_uciConfig);
++      throw std::runtime_error(err);
++    }
++    
++    uci_section *generalSection = uci_lookup_section(_uciContext, _uciPackage, UciConfigurationProvider::SECTION_TYPE_GENERAL);
++    if (generalSection == NULL)
++    {
++      std::string err = "Error: A general section (" + std::string(UciConfigurationProvider::SECTION_TYPE_GENERAL) + ") must be specified!";
++      throw std::runtime_error(err);
++    }
++
++    uci_option *opt_tmpdir = uci_lookup_option(_uciContext, generalSection, UciConfigurationProvider::OPTION_TMPDIR);
++    if (opt_tmpdir == NULL)
++    {
++      std::string err = "Error: A temporary directory (" + std::string(UciConfigurationProvider::OPTION_TMPDIR) + ") must be specified!";
++      throw std::runtime_error(err);
++    }
++    char *tmpdir = opt_tmpdir->v.string;
++    //printf(" *** Set tmpdir: %s\n", tmpdir);
++
++    // make sure that tmpdir exists
++    int status = mkdir(tmpdir, S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
++    if ((status != 0) && // failure
++      (errno != EEXIST)) // the failure was not that the directory already existed
++    {
++      std::string err = "Error: Unable to create the temporary directory (tmpdir), error # " + errno;
++      throw std::runtime_error(err);
++    }
++    _filterDirectory = std::string(tmpdir);
++    
++    if (uci_lookup_section(_uciContext, _uciPackage, UciConfigurationProvider::DEFAULT_FILTER_SET_NAME) == NULL)
++    {
++      std::string err = "Error: A default traffic filter profile named " + std::string(UciConfigurationProvider::DEFAULT_FILTER_SET_NAME) + " MUST exist!";
++      throw std::runtime_error(err);
++    }
++
++    // iterate over all of the sections in the package
++    uci_element *elem;
++    uci_foreach_element(&_uciPackage->sections, elem)
++    {
++      //printf("--==-- element.type: %d\n", elem->type);
++      //printf("--==-- element.name: %s\n", elem->name);
++
++      if (elem->type == UCI_TYPE_SECTION)
++      {
++      // look up the section and get it's type
++      
++      uci_section *section = NULL;
++        //printf("*** Looking up section: %s\n", elem->name);
++
++      section = uci_lookup_section(_uciContext, _uciPackage, elem->name);
++
++      if ((section != NULL) && (section->type != NULL))
++      {
++        //printf(" *** Section type: %s\n", section->type);
++        if (strcmp(elem->name, UciConfigurationProvider::SECTION_TYPE_GENERAL) == 0)
++        {
++          // we already processed the general section for the tmpdir
++        }
++        else if (strcmp(section->type, UciConfigurationProvider::SECTION_TYPE_CHANNEL_SET) == 0)
++        {
++          // the section is a channel set, populate it with the specified values
++          
++          uci_option *enabled = uci_lookup_option(_uciContext, section, UciConfigurationProvider::OPTION_ENABLED);
++          if ((enabled == NULL) || (strcmp(enabled->v.string, "1") != 0))
++          {
++            // found a disabled channel set, ignore it
++            continue;
++          }
++
++          uci_option *ssid = uci_lookup_option(_uciContext, section, UciConfigurationProvider::OPTION_SSID);
++          uci_option *bridge = uci_lookup_option(_uciContext, section, UciConfigurationProvider::OPTION_BRIDGE);
++          uci_option *dataChannels = uci_lookup_option(_uciContext, section, UciConfigurationProvider::OPTION_DATA_CHANNELS);
++          
++          if ((ssid != NULL) && (bridge != NULL) && (dataChannels != NULL))
++          {
++            PrimaryChannel &pc = _primaryChannels[ssid->v.string];
++            pc.bridgeName = bridge->v.string;
++            
++            char dataChannels_list[255];
++            // The dataChannels option is not a list
++            //if (dataChannels->type == UCI_TYPE_LIST)
++            if (dataChannels->v.string != NULL)
++            {
++              strcpy(dataChannels_list, dataChannels->v.string);
++              std::string str_dataChannels = dataChannels->v.string;
++              size_t start_pos = 0;
++              size_t pos = 0;
++              while(start_pos != std::string::npos)
++              {
++                pos = str_dataChannels.find(" ", start_pos);
++                //printf("****** start_pos: %u, pos: %u\n", start_pos, pos);
++                std::string str_dataChannel = str_dataChannels.substr(start_pos,
++                                                                      pos == std::string::npos ? pos : pos-start_pos);
++                //printf("*** dataChannel: %s\n", str_dataChannel.c_str());
++                
++                // update the start position for next loop
++                start_pos = (pos == std::string::npos ? pos : pos+1);
++
++                uci_section *dcSection = uci_lookup_section(_uciContext, _uciPackage, str_dataChannel.c_str());
++                if (dcSection != NULL)
++                {
++                  uci_option *dcSsid = uci_lookup_option(_uciContext, dcSection, UciConfigurationProvider::OPTION_SSID);
++                  uci_option *dcBridge = uci_lookup_option(_uciContext, dcSection, UciConfigurationProvider::OPTION_BRIDGE);
++                  
++                  // TODO: configure dcBridge and dcInterfaces
++                  //uci_option *dcInterfaces = uci_lookup_option(_uciContext, dcSection, UciConfigurationProvider::OPTION_INTERFACES);
++                  
++                  if ((dcSsid != NULL) && (dcBridge != NULL))
++                  {
++                    pc.dataChannels[dcSsid->v.string];
++                    pc.dataChannels[dcSsid->v.string] = dcBridge->v.string;
++                  }
++                }
++              }
++            }
++            
++            //printf("Section: %s, SSID: %s, Bridge: %s, Data Channels: %s\n", section->e.name, ssid->v.string, bridge->v.string, dataChannels_list);
++          }
++        }
++        else if (strcmp(section->type, UciConfigurationProvider::SECTION_TYPE_DATA_CHANNEL) == 0)
++        {
++          // data channels are processed by the channel set
++        }
++        else if (strcmp(section->type, UciConfigurationProvider::SECTION_TYPE_FILTER_SET) == 0)
++        {
++          // the section is a filter set, populate it with the specified values
++          //printf("*** filter set: %s\n", elem->name);
++          
++          // create a tfp file for the sectionName
++          std::ofstream tfpFile;
++          std::string tfpFilePath =
++            tmpdir + std::string("/") +
++            std::string(elem->name) +
++            std::string(UciConfigurationProvider::FILTER_FILE_EXTENSION);
++          tfpFile.open(tfpFilePath.c_str(), std::ios::out | std::ios::trunc);
++          if (!tfpFile.is_open())
++          {
++            std::string err = "Error: Unable to open the filter file: " + tfpFilePath;
++            throw std::runtime_error(err);
++          }
++          
++          const char *filterDelimiter = "\n";
++          char sFilterContents[2048];
++          sFilterContents[0] = '\0';
++          
++          uci_option *filters = uci_lookup_option(_uciContext, section, UciConfigurationProvider::OPTION_FILTERS);
++          // The filters option is not a list
++          //if ((filters != NULL) && (filters->type == UCI_TYPE_LIST))
++          if (filters != NULL)
++          {
++            //printf("*** %s.filters is a list.\n", elem->name);
++            //struct uci_element *e;
++            //uci_foreach_element(&filters->v.list, e)
++ 
++            std::string str_filters = filters->v.string;
++            //printf("*** STR_FILTERS: %s\n", str_filters.c_str());
++            size_t start_pos = 0;
++            size_t pos = 0;
++            while(start_pos != std::string::npos)
++            {
++              pos = str_filters.find(" ", start_pos);
++              //printf("****** start_pos: %u, pos: %u\n", start_pos, pos);
++              std::string str_filter = str_filters.substr(start_pos,
++                                                          pos == std::string::npos ? pos : pos-start_pos);
++              //printf("*** Looking for filter section named: %s ...\n", str_filter.c_str());
++
++              // update the start position for next loop
++              start_pos = (pos == std::string::npos ? pos : pos+1);
++              
++              uci_section *fSection = uci_lookup_section(_uciContext, _uciPackage, str_filter.c_str());
++              if (fSection != NULL)
++              {
++                uci_option *fPacketSize = uci_lookup_option(_uciContext, fSection, UciConfigurationProvider::OPTION_PACKET_SIZE);
++                uci_option *fSourceIp = uci_lookup_option(_uciContext, fSection, UciConfigurationProvider::OPTION_SOURCE_IP);
++                uci_option *fSourcePort = uci_lookup_option(_uciContext, fSection, UciConfigurationProvider::OPTION_SOURCE_PORT);
++                uci_option *fProtocol = uci_lookup_option(_uciContext, fSection, UciConfigurationProvider::OPTION_PROTOCOL);
++                uci_option *fDestPort = uci_lookup_option(_uciContext, fSection, UciConfigurationProvider::OPTION_DEST_PORT);
++
++                if ((fPacketSize != NULL) &&
++                    (fSourceIp != NULL) &&
++                    (fSourcePort != NULL) &&
++                    (fProtocol != NULL) &&
++                    (fDestPort != NULL))
++                {
++                  //printf("*** filter: %s  %s:%s:%s:%s:%s\n", e->name,
++                  //      fPacketSize->v.string, fSourceIp->v.string, fSourcePort->v.string,
++                  //      fProtocol->v.string, fDestPort->v.string);
++                  
++                  strcpy(sFilterContents, fPacketSize->v.string);
++                  strcat(sFilterContents, ":");
++                  strcat(sFilterContents, fSourceIp->v.string);
++                  strcat(sFilterContents, ":");
++                  strcat(sFilterContents, fSourcePort->v.string);
++                  strcat(sFilterContents, ":");
++                  strcat(sFilterContents, fProtocol->v.string);
++                  strcat(sFilterContents, ":");
++                  strcat(sFilterContents, fDestPort->v.string);
++                  strcat(sFilterContents, filterDelimiter);
++                  
++                  //printf("*** Writing filter contents to file: %s\n", sFilterContents);
++                  tfpFile << sFilterContents;
++                }
++                else
++                {
++                  std::string err = "Error parsing filter: " + str_filter;
++                  throw std::runtime_error(err);
++                }
++              }
++            }
++          }
++          tfpFile.close();
++          
++          // if there is a MAC address for the filter set, we need to add it to the station filters list
++          uci_option *mac = uci_lookup_option(_uciContext, section, UciConfigurationProvider::OPTION_MAC_ADDRESS);
++          if (mac != NULL)
++          {
++            // ignore wildcard MAC address
++            if (strcmp(mac->v.string,"*") != 0)
++            {
++              //printf(" *** MAC Address: %s\n", mac->v.string);
++              _stationFilters[::dcw::MacAddress(mac->v.string)] = elem->name;
++            }
++          }
++        }
++        else if (strcmp(section->type, UciConfigurationProvider::SECTION_TYPE_FILTER) == 0)
++        {
++          // filters are processed by the filter set
++        }
++        else
++        {
++          //std::string err = "Error: Unknown UCI section type: " + std::string(section->type);
++          //throw std::runtime_error(err);
++          
++          // Don't throw an exception. It is fine for UCI to contain things that we do not know about
++          //  that it may use for other purposes, like UI or internal state
++          dcwlogdbgf("Ignoring UCI section type: %s\n", section->type);
++        }
++      }
++      }
++    }
++  }
++
++  UciConfigurationProvider::~UciConfigurationProvider() {
++    uci_free_context(_uciContext);
++  }
++
++  void UciConfigurationProvider::InstanciateCFileTrafficFilterProfiles(CFTFPList& output) const {
++    ::dcwposix::FilterdirScanner::FileFilterProfileList ffpl;
++    ::dcwposix::FilterdirScanner dirScanner(_filterDirectory.c_str());
++    dirScanner.Scan(ffpl);
++
++    for (::dcwposix::FilterdirScanner::FileFilterProfileList::const_iterator i = ffpl.begin(); i != ffpl.end(); i++) {
++      output.push_back(new ::dcw::FileTrafficFilterProfile(*i));
++    }
++  }
++
++
++  void UciConfigurationProvider::GetPrimarySsids(SsidSet& output) const {
++    for (PrimaryChannelMap::const_iterator i = _primaryChannels.begin(); i != _primaryChannels.end(); i++) {
++      output.insert(i->first);
++    }
++  }
++
++  void UciConfigurationProvider::GetDataSsids(SsidSet& output, const char * const primarySsid) const {
++    const PrimaryChannelMap::const_iterator pssid = _primaryChannels.find(primarySsid);
++    if (pssid == _primaryChannels.end()) return;
++
++    for (DataChannelBridgeMap::const_iterator i = pssid->second.dataChannels.begin(); i != pssid->second.dataChannels.end(); i++) {
++      output.insert(i->first);
++    }
++  }
++
++  const char *UciConfigurationProvider::GetSsidIfname(const char * const ssid) const {
++    PrimaryChannelMap::const_iterator pssid = _primaryChannels.find(ssid);
++    if (pssid != _primaryChannels.end()) {
++      if (pssid->second.bridgeName.empty()) {
++        return NULL;
++      }
++      return pssid->second.bridgeName.c_str();
++    }
++
++    for (pssid = _primaryChannels.begin(); pssid != _primaryChannels.end(); pssid++) {
++      const DataChannelBridgeMap& dataChannels = pssid->second.dataChannels;
++      const DataChannelBridgeMap::const_iterator dc = dataChannels.find(ssid);
++      if (dc == dataChannels.end()) continue;
++      if (dc->second.empty()) {
++        return NULL;
++      }
++      return dc->second.c_str();
++    }
++
++    return NULL;
++  }
++
++  void UciConfigurationProvider::GetStationTrafficFilterProfiles(StationTFPMap& output) const {
++    for (StationFilterMap::const_iterator i = _stationFilters.begin(); i != _stationFilters.end(); i++) {
++      output[i->first] = i->second;
++    }
++
++  }
diff --git a/net/dcwifi/dcwapd/patches/02_use_uci_config_provider.patch b/net/dcwifi/dcwapd/patches/02_use_uci_config_provider.patch
new file mode 100644 (file)
index 0000000..db1037d
--- /dev/null
@@ -0,0 +1,20 @@
+--- a/dcwapd.linuxjsonstatic/main.cxx
++++ b/dcwapd.linuxjsonstatic/main.cxx
+@@ -10,6 +10,7 @@
+ #include "dcwlinux/ap_configuration.h"
+ #include "dcwlinux/vap_manager.h"
+ #include "dcwlinux/json_configuration_provider.h"
++#include "dcwlinux/uci_configuration_provider.h"
+ #include "dcw/dcwlog.h"
+@@ -19,7 +20,8 @@ int
+ main( void ) {
+   try {
+-    dcwlinux::JsonConfigurationProvider      configProvider("./dcwapdconf.json");
++    //dcwlinux::JsonConfigurationProvider      configProvider("./dcwapdconf.json");
++    dcwlinux::UciConfigurationProvider      configProvider("dcwapd");
+     dcwposix::ProcessSignalManager           sigman;
+     dcwposix::SelectEventReactor             eventReactor;
diff --git a/net/dcwifi/dcwapd/patches/03_add_uci_config_provider_to_Makefile.patch b/net/dcwifi/dcwapd/patches/03_add_uci_config_provider_to_Makefile.patch
new file mode 100644 (file)
index 0000000..2980c85
--- /dev/null
@@ -0,0 +1,10 @@
+--- a/dcwlinux/Makefile.am
++++ b/dcwlinux/Makefile.am
+@@ -6,6 +6,7 @@ libdcwlinux_la_SOURCES =
+   ap_configuration.cxx                  \
+   brctlnetwork.cxx                      \
+   json_configuration_provider.cxx       \
++  uci_configuration_provider.cxx        \
+   macremapper_driver.cxx                \
+   vap_manager.cxx                       \
+   virtual_ap.cxx
diff --git a/net/dcwifi/dcwapd/patches/04_uclibc++_fixes.patch b/net/dcwifi/dcwapd/patches/04_uclibc++_fixes.patch
new file mode 100644 (file)
index 0000000..a8721c4
--- /dev/null
@@ -0,0 +1,40 @@
+--- a/dcw/controller.cxx
++++ b/dcw/controller.cxx
+@@ -195,7 +195,7 @@ void Controller::OnStationUnjoin(const MacAddress& primaryMacAddr, const Message
+   //remove any channel bondings matching the provided data channel mac addresses
+   for (unsigned i = 0; i < m.data_macaddr_count; i++) {
+     const ::dcw::MacAddress dcaddr(m.data_macaddrs[i]);
+-    const ::dcw::TrafficPolicy::DataChannelMap::iterator dcmEntry = state.policy.dataChannels.find(dcaddr);
++    ::dcw::TrafficPolicy::DataChannelMap::iterator dcmEntry = state.policy.dataChannels.find(dcaddr);
+     if (dcmEntry == state.policy.dataChannels.end()) continue;
+     if (dcmEntry->second == NULL) {
+       dcwlogwarnf("Data channel MAC address %s on client %s is not currently bonded\n", dcaddr.ToString().c_str(), primaryMacAddr.ToString().c_str());
+@@ -238,7 +238,7 @@ void Controller::OnStationAck(const MacAddress& primaryMacAddr, const Message& m
+   dcwlogdbgf("Got a station ACK from %s\n", primaryMacAddr.ToString().c_str());
+   // first make sure this client has actually sent a join first...
+-  const ClientStateMap::iterator client = _clients.find(primaryMacAddr);
++  ClientStateMap::iterator client = _clients.find(primaryMacAddr);
+   if (client == _clients.end()) {
+     dcwlogerrf("Got a client ACK without a station join from %s\n", primaryMacAddr.ToString().c_str());
+     Message reply(DCWMSG_AP_REJECT_STA);
+--- a/dcwposix/processsignalmanager.cxx
++++ b/dcwposix/processsignalmanager.cxx
+@@ -40,7 +40,7 @@ ProcessSignalManager::~ProcessSignalManager() {
+ }
+ void ProcessSignalManager::RegisterEventHandler(const int signum, ::dcwposix::ProcessSignalManager::EventHandler& eventHandler) {
+-  const SignalMap::iterator i = _sigmap.find(signum);
++  SignalMap::iterator i = _sigmap.find(signum);
+   if (i == _sigmap.end()) {
+     //be sure to preseve the old signal when inserting a new "unseen" signal
+     _sigmap[signum].insert(&eventHandler);
+@@ -53,7 +53,7 @@ void ProcessSignalManager::RegisterEventHandler(const int signum, ::dcwposix::Pr
+ }
+ void ProcessSignalManager::UnRegisterEventHandler(const int signum, ::dcwposix::ProcessSignalManager::EventHandler& eventHandler) {
+-  const SignalMap::iterator i = _sigmap.find(signum);
++  SignalMap::iterator i = _sigmap.find(signum);
+   if (i == _sigmap.end()) {
+     dcwlogwarnf("Attempting to unregister handler %p non-registered process signal #%d\n", &eventHandler, signum);
\ No newline at end of file
diff --git a/net/dcwifi/dcwapd/patches/05_replace_bzero.patch b/net/dcwifi/dcwapd/patches/05_replace_bzero.patch
new file mode 100644 (file)
index 0000000..ffd9ee0
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/dcwlinux/macremapper_driver.cxx
++++ b/dcwlinux/macremapper_driver.cxx
+@@ -174,7 +174,7 @@ void MacRemapperDriver::ApplyClientTrafficPolicy(const dcw::MacAddress& primaryA
+   }
+   //populate our remap ioctl()
+-  bzero(&re, sizeof(re));
++  memset(&re, 0, sizeof(re));
+   strncpy(re.filter_name, policy.trafficFilterProfile->GetName(), sizeof(re.filter_name));
+   memcpy(re.match_macaddr, primaryAddr.Value, sizeof(re.match_macaddr));
diff --git a/net/dcwifi/libdcwproto/Makefile b/net/dcwifi/libdcwproto/Makefile
new file mode 100644 (file)
index 0000000..2216e1f
--- /dev/null
@@ -0,0 +1,56 @@
+#
+# Copyright (C) 2019 EWSI
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libdcwproto
+PKG_VERSION:=1.0.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/ewsi/$(PKG_NAME)/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=5bda395c648aa12eb90515c29024029738fde1a8f73a2cbc553be1c6962c2629
+
+PKG_MAINTAINER:=Carey Sonsino <careys@edgewaterwireless.com>
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=COPYING
+
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libdcwproto
+  SECTION:=libs
+  CATEGORY:=Libraries
+  SUBMENU:=Networking
+  TITLE:=Dual-Channel WiFi messaging library
+  URL:=https://www.edgewaterwireless.com
+  DEPENDS:=+kmod-macremapper
+endef
+
+define Package/libdcwproto/description
+  Platform-independent C library for marshaling and serializing DCW messages
+endef
+
+TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto
+TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
+
+define Build/InstallDev
+       $(INSTALL_DIR) $(1)/usr/include
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/$(PKG_NAME)*.so* $(1)/usr/lib/
+endef
+
+define Package/libdcwproto/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       # Note: $(INSTALL_BIN) does not keep symlinks, so use $(CP)
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/$(PKG_NAME)*.so* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,libdcwproto))
diff --git a/net/dcwifi/libdcwproto/patches/01_replace_bzero.patch b/net/dcwifi/libdcwproto/patches/01_replace_bzero.patch
new file mode 100644 (file)
index 0000000..bfcbf75
--- /dev/null
@@ -0,0 +1,33 @@
+--- a/src/dcwproto.c
++++ b/src/dcwproto.c
+@@ -20,12 +20,8 @@
+
+
+
+-#ifdef WIN32
+-#define bzero(ptr, size) memset(ptr, 0, size)
+-#else
+ #include <config.h>
+ #include <strings.h>
+-#endif
+ #include <dcwproto.h>
+
+ #include <string.h>
+@@ -95,7 +91,7 @@ dcwmsg_marshal_sta_ack(struct dcwmsg_sta_ack * const output, const unsigned char
+
+     /* copy in the data ssid string bytes */
+     if (buf_len < copy_size) return 0;
+-    bzero(output->bonded_data_channels[i].ssid, sizeof(output->bonded_data_channels[i].ssid));
++    memset(output->bonded_data_channels[i].ssid, 0, sizeof(output->bonded_data_channels[i].ssid));
+     memcpy(output->bonded_data_channels[i].ssid, buf, copy_size);
+     buf_len -= copy_size;
+     buf += copy_size;
+@@ -134,7 +130,7 @@ dcwmsg_marshal_ap_accept_sta(struct dcwmsg_ap_accept_sta * const output, const u
+
+     /* copy in the data ssid string bytes */
+     if (buf_len < copy_size) return 0;
+-    bzero(output->data_ssids[i], sizeof(output->data_ssids[i]));
++    memset(output->data_ssids[i], 0, sizeof(output->data_ssids[i]));
+     memcpy(output->data_ssids[i], buf, copy_size);
+     buf_len -= copy_size;
+     buf += copy_size;
diff --git a/net/dcwifi/libdcwsocket/Makefile b/net/dcwifi/libdcwsocket/Makefile
new file mode 100644 (file)
index 0000000..ff21bce
--- /dev/null
@@ -0,0 +1,56 @@
+#
+# Copyright (C) 2019 EWSI
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libdcwsocket
+PKG_VERSION:=1.0.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/ewsi/$(PKG_NAME)/tar.gz/v$(PKG_VERSION)?
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_HASH:=c7f6c69a5246fe1f184c21585f0805ceaca09c3c087ae439ded7ed4d25c7a3fa
+
+PKG_MAINTAINER:=Carey Sonsino <careys@edgewaterwireless.com>
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=COPYING
+
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libdcwsocket
+  SECTION:=libs
+  CATEGORY:=Libraries
+  SUBMENU:=Networking
+  TITLE:=Dual-Channel socket library
+  URL:=https://www.edgewaterwireless.com
+endef
+
+define Package/libdcwsocket/description
+  User-land C library for sending and receiving DCW "EtherType"d messages
+endef
+
+TARGET_CFLAGS += -std=c89 -ffunction-sections -fdata-sections -flto
+TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
+
+define Build/InstallDev
+       $(INSTALL_DIR) $(1)/usr/include
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/$(PKG_NAME)*.so* $(1)/usr/lib/
+endef
+
+define Package/libdcwsocket/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       # Note: $(INSTALL_BIN) does not keep symlinks, so use $(CP)
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/$(PKG_NAME)*.so* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,libdcwsocket))
diff --git a/net/dcwifi/libdcwsocket/patches/01_replace_bzero.patch b/net/dcwifi/libdcwsocket/patches/01_replace_bzero.patch
new file mode 100644 (file)
index 0000000..9b799e1
--- /dev/null
@@ -0,0 +1,45 @@
+--- a/src/dcwsocket.c.linux
++++ b/src/dcwsocket.c.linux
+@@ -100,10 +100,10 @@ dcwsock_open(const char * const ifname) {
+   }
+   /* sanitize our data structs... defensive */
+-  bzero(rv, sizeof(*rv));
+-  bzero(&ifr, sizeof(ifr));
+-  bzero(&sall, sizeof(sall));
+-  bzero(&sfp, sizeof(sfp));
++  memset(rv, 0, sizeof(*rv));
++  memset(&ifr, 0, sizeof(ifr));
++  memset(&sall, 0, sizeof(sall));
++  memset(&sfp, 0, sizeof(sfp));
+   /* open a raw socket... "ETH_P_ALL" says take EVERYTHING 
+      (this means that it is IMPERATIVE to apply a filter)
+diff --git a/src/dcwsocket.c.osx b/src/dcwsocket.c.osx
+index abead10..75cda2f 100644
+--- a/src/dcwsocket.c.osx
++++ b/src/dcwsocket.c.osx
+@@ -90,10 +90,10 @@ dcwsock_open(const char * const ifname) {
+   }
+   /* sanitize our data structs... defensive */
+-  bzero(rv, sizeof(*rv));
+-  bzero(&dmx_desc, sizeof(dmx_desc));
+-  bzero(&proto_desc, sizeof(proto_desc));
+-  bzero(&snd, sizeof(snd));
++  memset(rv, 0, sizeof(*rv));
++  memset(&dmx_desc, 0, sizeof(dmx_desc));
++  memset(&proto_desc, 0, sizeof(proto_desc));
++  memset(&snd, 0, sizeof(snd));
+   /* open a "NDRV" socket... */
+   rv->fd = socket(PF_NDRV, SOCK_RAW, 0);
+@@ -201,7 +201,7 @@ dcwsock_send( dcw_socket_t s, const void * const buf, const unsigned buf_size, c
+      fill out a link-level sockaddr cause we can only 
+      use sendto() with PF_NDRV...
+   */
+-  bzero(&sdl, sizeof(sdl));
++  memset(&sdl, 0, sizeof(sdl));
+   sdl.sdl_len   = sizeof(sdl);
+   sdl.sdl_index = 0;
+   sdl.sdl_type  = IFT_ETHER;
diff --git a/net/dcwifi/libdcwsocket/patches/02_fix_storage_size_error.patch b/net/dcwifi/libdcwsocket/patches/02_fix_storage_size_error.patch
new file mode 100644 (file)
index 0000000..431b093
--- /dev/null
@@ -0,0 +1,10 @@
+--- a/src/dcwsocket.c.linux
++++ b/src/dcwsocket.c.linux
+@@ -31,6 +31,7 @@
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <net/if.h>
++#include <linux/if.h>
+ #include <linux/if_packet.h>
+ #include <linux/if_ether.h>
+ #include <linux/filter.h>
diff --git a/net/dcwifi/macremapper/Makefile b/net/dcwifi/macremapper/Makefile
new file mode 100644 (file)
index 0000000..85e39f3
--- /dev/null
@@ -0,0 +1,42 @@
+#
+# Copyright (C) 2019 EWSI
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+include $(INCLUDE_DIR)/kernel.mk
+
+PKG_NAME:=macremapper
+PKG_VERSION:=1.0.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/ewsi/$(PKG_NAME)/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=f054201dd805ce005b89606a507b58a5717d383a4339c69dfdc02f0202935437
+
+PKG_MAINTAINER:=Carey Sonsino <careys@edgewaterwireless.com>
+PKG_LICENSE:=GPL-2.0-only
+PKG_LICENSE_FILES:=kernelmod/COPYING
+
+include $(INCLUDE_DIR)/package.mk
+
+define KernelPackage/macremapper
+  SUBMENU:=Network Support
+  URL:=https://www.edgewaterwireless.com
+  VERSION:=$(LINUX_VERSION)-$(BOARD)-$(PKG_RELEASE)
+  TITLE:=Dual Channel Wi-Fi macremapper Module
+  DEPENDS:= +kmod-cfg80211 +kmod-br-netfilter
+  FILES:=$(PKG_BUILD_DIR)/kernelmod/$(PKG_NAME).$(LINUX_KMOD_SUFFIX)
+  AUTOLOAD:=$(call AutoProbe,macremapper)
+endef
+
+define KernelPackage/macremapper/description
+  Linux kernel module for implementation the DCW filtering mechanism
+endef
+
+MAKE_FLAGS += KERNEL_SRC=$(LINUX_DIR)
+MAKE_PATH:=kernelmod
+
+$(eval $(call KernelPackage,macremapper))
diff --git a/net/dcwifi/macremapper/patches/01_fix_nf_hooks.patch b/net/dcwifi/macremapper/patches/01_fix_nf_hooks.patch
new file mode 100644 (file)
index 0000000..570d781
--- /dev/null
@@ -0,0 +1,27 @@
+--- a/kernelmod/main.c
++++ b/kernelmod/main.c
+@@ -91,8 +91,11 @@ modinit( void ) {
+   rv = mrm_rcdb_init();
+   if (rv != 0) return rv;
+-
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,13,0)
+   nf_register_hook(&_hops);
++#else
++  nf_register_net_hook(&init_net, &_hops);
++#endif
+   mrm_init_ctlfile(); /* XXX not checking for failure! */
+   printk(KERN_INFO "MRM The MAC Address Re-Mapper is now in the kernel\n");
+@@ -103,7 +106,11 @@ modinit( void ) {
+ static void __exit
+ modexit( void ) {
+   mrm_destroy_ctlfile();
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,13,0)
+   nf_unregister_hook(&_hops);
++#else
++  nf_unregister_net_hook(&init_net, &_hops);
++#endif
+   mrm_rcdb_destroy(); /* imperative that this happens last */
+   printk(KERN_INFO "MRM The MAC Address Re-Mapper gone bye-bye\n");
+ }
diff --git a/net/dcwifi/mrmctl/Makefile b/net/dcwifi/mrmctl/Makefile
new file mode 100644 (file)
index 0000000..4c587ab
--- /dev/null
@@ -0,0 +1,63 @@
+#
+# Copyright (C) 2019 EWSI
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=mrmctl
+PKG_VERSION:=1.0.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=macremapper-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/ewsi/macremapper/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=f054201dd805ce005b89606a507b58a5717d383a4339c69dfdc02f0202935437
+PKG_BUILD_DIR:=$(BUILD_DIR)/macremapper-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Carey Sonsino <careys@edgewaterwireless.com>
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=userland/COPYING
+
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/mrmctl
+  SECTION:=utils
+  CATEGORY:=Utilities
+  TITLE:=mrmctl utility (macremapper kernel module)
+  URL:=https://www.edgewaterwireless.com
+  DEPENDS:= +kmod-macremapper
+endef
+
+define Package/mrmctl/description
+  Command-line utility to manually manipulate the macremapper kernel module
+endef
+
+MAKE_PATH:=userland
+CONFIGURE_PATH:=userland
+CONFIGURE_ARGS += \
+       --enable-shared
+
+TARGET_CFLAGS += -std=c89 -ffunction-sections -fdata-sections -flto
+TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
+
+define Build/InstallDev
+       $(INSTALL_DIR) $(1)/usr/include
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
+endef
+
+define Package/mrmctl/install
+       $(INSTALL_DIR) $(1)/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME) $(1)/bin/
+
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,mrmctl))
diff --git a/net/dcwifi/mrmctl/patches/01_replace_bzero.patch b/net/dcwifi/mrmctl/patches/01_replace_bzero.patch
new file mode 100644 (file)
index 0000000..0f67ab4
--- /dev/null
@@ -0,0 +1,24 @@
+--- a/userland/mrmctl/mrmctl.c
++++ b/userland/mrmctl/mrmctl.c
+@@ -139,7 +139,7 @@ remap(int argc, char **argv) {
+   if (argc < 5) return 1; /* defensive */
+   /* initialize variables and put things into human-readable variable names */
+-  bzero(&re, sizeof(re));
++  memset(&re, 0, sizeof(re));
+   filter_name   = argv[2];
+   match_macaddr = argv[3];
+diff --git a/userland/mrmfilterparser/mrm_filter_conf_parser.c b/userland/mrmfilterparser/mrm_filter_conf_parser.c
+index 926fa76..f5c54c1 100644
+--- a/userland/mrmfilterparser/mrm_filter_conf_parser.c
++++ b/userland/mrmfilterparser/mrm_filter_conf_parser.c
+@@ -319,7 +319,7 @@ filter_file_loadf(struct mrm_filter_config * const output, FILE * const f) {
+     return -1;
+   output->rules_active = 0;
+-  bzero(output->rules, sizeof(output->rules)); /* defensive */
++  memset(output->rules, 0, sizeof(output->rules)); /* defensive */
+   for (linenum = 1; fgets(buf, sizeof(buf), f) != NULL; linenum++) {
index 86c52dce27b86d408040bc00162ffbf450747f0e..4e7ef2e8c7880c351296aae643a9a9a8c6f37b1f 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:=8
+PKG_RELEASE:=12
 
 PKG_LICENSE:=GPL-2.0
 PKG_MAINTAINER:=
index f409d16c6704220da76696a3f21957f79815dfd5..0c6befbbcfe3e8be246a03f557274ff00974d114 100755 (executable)
@@ -21,7 +21,7 @@
 . /lib/functions/network.sh
 
 # GLOBAL VARIABLES #
-VERSION="2.7.8-6"
+VERSION="2.7.8-11"
 SECTION_ID=""          # hold config's section name
 VERBOSE=0              # default mode is log to console, but easily changed with parameter
 MYPROG=$(basename $0)  # my program call name
@@ -319,16 +319,19 @@ urlencode() {
 # $2   Name of Variable to store script to
 # $3   Name of Variable to store service answer to
 get_service_data() {
+       local __FILE __SERVICE __DATA __ANSWER __URL __SCRIPT __PIPE
+
        [ $# -ne 3 ] && write_log 12 "Error calling 'get_service_data()' - wrong number of parameters"
 
        __FILE="/etc/ddns/services"                             # IPv4
        [ $use_ipv6 -ne 0 ] && __FILE="/etc/ddns/services_ipv6" # IPv6
 
        # workaround with variables; pipe create subshell with no give back of variable content
-       mkfifo pipe_$$
+       __PIPE="$ddns_rundir/pipe_$$"
+       mkfifo "$__PIPE"
+
        # only grep without # or whitespace at linestart | remove "
-#      grep -v -E "(^#|^[[:space:]]*$)" $__FILE | sed -e s/\"//g > pipe_$$ &
-       sed '/^#/d; /^[ \t]*$/d; s/\"//g' $__FILE  > pipe_$$ &
+       sed '/^#/d; /^[ \t]*$/d; s/\"//g' "$__FILE" > "$__PIPE" &
 
        while read __SERVICE __DATA __ANSWER; do
                if [ "$__SERVICE" = "$service_name" ]; then
@@ -339,11 +342,11 @@ get_service_data() {
                        eval "$1=\"$__URL\""
                        eval "$2=\"$__SCRIPT\""
                        eval "$3=\"$__ANSWER\""
-                       rm pipe_$$
+                       rm "$__PIPE"
                        return 0
                fi
-       done < pipe_$$
-       rm pipe_$$
+       done < "$__PIPE"
+       rm "$__PIPE"
 
        eval "$1=\"\""  # no service match clear variables
        eval "$2=\"\""
@@ -533,17 +536,17 @@ verify_host_port() {
                }
                # extract IP address
                if [ -n "$BIND_HOST" -o -n "$KNOT_HOST" ]; then # use BIND host or Knot host if installed
-                       __IPV4=$(cat $DATFILE | awk -F "address " '/has address/ {print $2; exit}' )
-                       __IPV6=$(cat $DATFILE | awk -F "address " '/has IPv6/ {print $2; exit}' )
+                       __IPV4="$(awk -F "address " '/has address/ {print $2; exit}' "$DATFILE")"
+                       __IPV6="$(awk -F "address " '/has IPv6/ {print $2; exit}' "$DATFILE")"
                elif [ -n "$DRILL" ]; then      # use drill if installed
-                       __IPV4=$(cat $DATFILE | awk '/^'"$lookup_host"'/ {print $5}' | grep -m 1 -o "$IPV4_REGEX")
-                       __IPV6=$(cat $DATFILE | awk '/^'"$lookup_host"'/ {print $5}' | grep -m 1 -o "$IPV6_REGEX")
+                       __IPV4="$(awk '/^'"$__HOST"'/ {print $5}' "$DATFILE" | grep -m 1 -o "$IPV4_REGEX")"
+                       __IPV6="$(awk '/^'"$__HOST"'/ {print $5}' "$DATFILE" | grep -m 1 -o "$IPV6_REGEX")"
                elif [ -n "$HOSTIP" ]; then     # use hostip if installed
-                       __IPV4=$(cat $DATFILE | grep -m 1 -o "$IPV4_REGEX")
-                       __IPV6=$(cat $DATFILE | grep -m 1 -o "$IPV6_REGEX")
+                       __IPV4="$(grep -m 1 -o "$IPV4_REGEX" "$DATFILE")"
+                       __IPV6="$(grep -m 1 -o "$IPV6_REGEX" "$DATFILE")"
                else    # use BusyBox nslookup
-                       __IPV4=$(cat $DATFILE | sed -ne "/^Name:/,\$ { s/^Address[0-9 ]\{0,\}: \($IPV4_REGEX\).*$/\\1/p }")
-                       __IPV6=$(cat $DATFILE | sed -ne "/^Name:/,\$ { s/^Address[0-9 ]\{0,\}: \($IPV6_REGEX\).*$/\\1/p }")
+                       __IPV4="$(sed -ne "/^Name:/,\$ { s/^Address[0-9 ]\{0,\}: \($IPV4_REGEX\).*$/\\1/p }" "$DATFILE")"
+                       __IPV6="$(sed -ne "/^Name:/,\$ { s/^Address[0-9 ]\{0,\}: \($IPV6_REGEX\).*$/\\1/p }" "$DATFILE")"
                fi
        }
 
index 472bb7c283dc6c40f39678cfc75b971c3bdb7015..f6bdbc021bdb28ba28ca1c891b6f0e3ececa54bd 100644 (file)
@@ -61,7 +61,7 @@
 
 "ddo.jp"               "http://free.ddo.jp/dnsupdate.php?dn=[DOMAIN]&pw=[PASSWORD]&ip=[IP]"
 
-"desec.io"             "http://update.dedyn.io/?username=[USERNAME]&password=[PASSWORD]&hostname=[DOMAIN]&myipv4=[IP]" "good|nochg"
+"desec.io"             "http://update.dedyn.io/update?username=[USERNAME]&password=[PASSWORD]&hostname=[DOMAIN]&myipv4=[IP]"   "good|nochg"
 
 "dhis.org"             "http://[USERNAME]:[PASSWORD]@is.dhis.org/"
 
 
 "goip.de"              "http://www.goip.de/setip?username=[USERNAME]&password=[PASSWORD]&subdomain=[DOMAIN]&ip=[IP]"
 
-"google.com"           "http://[USERNAME]:[PASSWORD]@domains.google.com/nic/update?hostname=[DOMAIN]&myip=[IP]"        "good|nochg"
+"google.com"           "https://[USERNAME]:[PASSWORD]@domains.google.com/nic/update?hostname=[DOMAIN]&myip=[IP]"       "good|nochg"
 
 "he.net"               "http://[DOMAIN]:[PASSWORD]@dyn.dns.he.net/nic/update?hostname=[DOMAIN]&myip=[IP]"      "good|nochg"
 
+"inwx.de"              "http://[USERNAME]:[PASSWORD]@dyndns.inwx.com/nic/update?myip=[IP]"     "good|nochg"
+
 "joker.com"            "http://svc.joker.com/nic/update?username=[USERNAME]&password=[PASSWORD]&myip=[IP]&hostname=[DOMAIN]"   "good|nochg"
 
 "loopia.se"            "http://[USERNAME]:[PASSWORD]@dns.loopia.se/XDynDNSServer/XDynDNS.php?system=custom&hostname=[DOMAIN]&myip=[IP]"        "good|nochg"
index 8a2028ba4537ccdc96149e5882a07632baf0df37..ced7b2aa5d34a039dcec5ae2a23dcb59c93b578e 100644 (file)
@@ -50,7 +50,7 @@
 # "ddnss.de"           "http://[USERNAME]:[PASSWORD]@ip6.ddnss.de/upd.php?host=[DOMAIN]&ip6=[IP]"      "good|nochg"
 "ddnss.de"             "http://ip6.ddnss.de/upd.php?user=[USERNAME]&pwd=[PASSWORD]&host=[DOMAIN]&ip6=[IP]"     "good|nochg"
 
-"desec.io"             "http://update.dedyn.io/?username=[USERNAME]&password=[PASSWORD]&hostname=[DOMAIN]&myipv6=[IP]" "good|nochg"
+"desec.io"             "http://update.dedyn.io/update?username=[USERNAME]&password=[PASSWORD]&hostname=[DOMAIN]&myipv6=[IP]"   "good|nochg"
 
 "dhis.org"             "http://[USERNAME]:[PASSWORD]@is.dhis.org/"
 
@@ -63,6 +63,7 @@
 "duiadns.net"          "http://ip.duiadns.net/dynamic.duia?host=[DOMAIN]&password=[PASSWORD]&ip6=[IP]"
 
 "dyn.com"              "http://[USERNAME]:[PASSWORD]@members.dyndns.org/nic/update?hostname=[DOMAIN]&myip=[IP]"        "good|nochg"
+
 "dyndns.org"           "http://[USERNAME]:[PASSWORD]@members.dyndns.org/nic/update?hostname=[DOMAIN]&myip=[IP]"        "good|nochg"
 
 "dynu.com"             "http://api.dynu.com/nic/update?hostname=[DOMAIN]&myipv6=[IP]&username=[USERNAME]&password=[PASSWORD]"
@@ -75,6 +76,8 @@
 
 "he.net"               "http://[DOMAIN]:[PASSWORD]@dyn.dns.he.net/nic/update?hostname=[DOMAIN]&myip=[IP]"      "good|nochg"
 
+"inwx.de"              "http://[USERNAME]:[PASSWORD]@dyndns.inwx.com/nic/update?myipv6=[IP]"   "good|nochg"
+
 "loopia.se"            "http://[USERNAME]:[PASSWORD]@dns.loopia.se/XDynDNSServer/XDynDNS.php?system=custom&hostname=[DOMAIN]&myip=[IP]"        "good|nochg"
 
 "mydns.jp"             "http://www.mydns.jp/directip.html?MID=[USERNAME]&PWD=[PASSWORD]&IPV6ADDR=[IP]"
index f78bce0bcaca4cea72d2ae6df158cd0e70585719..dbf6f592bfba7dc0c2432402c72ef19b8c7f5608 100755 (executable)
@@ -29,6 +29,7 @@
 # used variables
 local __HOST __DOMAIN __TYPE __URLBASE __PRGBASE __RUNPROG __DATA __IPV6 __ZONEID __RECID __PROXIED
 local __URLBASE="https://api.cloudflare.com/client/v4"
+local __TTL=120
 
 # split __HOST __DOMAIN from $domain
 # given data:
@@ -127,7 +128,6 @@ fi
 __PRGBASE="$__PRGBASE --header 'X-Auth-Email: $username' "
 __PRGBASE="$__PRGBASE --header 'X-Auth-Key: $password' "
 __PRGBASE="$__PRGBASE --header 'Content-Type: application/json' "
-# __PRGBASE="$__PRGBASE --header 'Accept: application/json' "
 
 # read zone id for registered domain.TLD
 __RUNPROG="$__PRGBASE --request GET '$__URLBASE/zones?name=$__DOMAIN'"
@@ -182,7 +182,7 @@ __PROXIED=$(grep -o '"proxied":[^",]*' $DATFILE | grep -o '[^:]*$')
 
 # use file to work around " needed for json
 cat > $DATFILE << EOF
-{"id":"$__ZONEID","type":"$__TYPE","name":"$__HOST","content":"$__IP","proxied":$__PROXIED}
+{"id":"$__ZONEID","type":"$__TYPE","name":"$__HOST","content":"$__IP","ttl":$__TTL,"proxied":$__PROXIED}
 EOF
 
 # let's complete transfer command
index 48a0cdaed2d6fa6e94d9dd2f503708d60d1cd0d9..71c3afb7f5dbcdbd6efa2d05acc7d853799fa798 100644 (file)
@@ -8,16 +8,17 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=dhcpcd
-PKG_VERSION:=7.0.8
+PKG_VERSION:=7.2.2
 PKG_RELEASE:=1
 
 PKG_SOURCE_URL:=ftp://roy.marples.name/pub/dhcpcd \
     http://roy.marples.name/downloads/dhcpcd
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_HASH:=96968e883369ab4afd11eba9dfd9bb109f5dfff65b2814ce6c432f36362dc9b5
+PKG_HASH:=3db7ff18cba9274da1d2176fb3c7cbe23926a8e58d5c8e244ad55c62d38ba09e
 
 PKG_LICENSE:=BSD-2c
 PKG_LICENSE_FILES:=
+PKG_CPE_ID:=cpe:/a:roy_marples:dhcpcd
 
 PKG_MAINTAINER:=Marko Ratkaj <marko.ratkaj@sartura.hr>
 
index ddaca8954970bea97e38307a26e4404a4d599b13..9bbfa8a08a3bd7bbc31225e52a0a67e634e067a3 100644 (file)
@@ -8,21 +8,21 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=dnscrypt-proxy
-PKG_VERSION:=1.9.5
-PKG_RELEASE:=8
+PKG_SOURCE_DATE:=2019-08-20
+PKG_SOURCE_VERSION:=07ac3825b5069adc28e2547c16b1d983a8ed8d80
+PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_SOURCE_VERSION:=f71ca699aa3399f0c103c1f13ce1a86f9ce9638c
 PKG_SOURCE_URL:=https://github.com/dyne/dnscrypt-proxy
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_MIRROR_HASH:=a3a52f7f85b390184695db688c9837bf51cf25c4cb2c1093bb315640dbd2a54f
-
-PKG_FIXUP:=autoreconf
-PKG_INSTALL:=1
+PKG_MIRROR_HASH:=c5c074f52732f14f026002bc48bdffcf0b212092de5798120209b2e6b65fc3e6
 
 PKG_MAINTAINER:=Damiano Renfer <damiano.renfer@gmail.com>
 PKG_LICENSE:=ISC
+PKG_LICENSE_FILES:=COPYING
+
+PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
 PKG_CONFIG_DEPENDS:= \
        CONFIG_DNSCRYPT_ENABLE_PLUGINS
 
@@ -33,7 +33,6 @@ define Package/dnscrypt-proxy/Default
   CATEGORY:=Network
   SUBMENU:=IP Addresses and Names
   URL:=https://github.com/dyne/dnscrypt-proxy
-  MAINTAINER:=Damiano Renfer <damiano.renfer@gmail.com>
 endef
 
 define Package/dnscrypt-proxy
@@ -55,7 +54,6 @@ endef
 define Package/dnscrypt-proxy-resolvers
   $(call Package/dnscrypt-proxy/Default)
   TITLE:=Package with current list of dnscrypt-proxy resolvers
-  VERSION:=$(PKG_VERSION)+git-20171001-2d43be3-$(PKG_RELEASE)
 endef
 
 define Package/dnscrypt-proxy-resolvers/description
index 0958c92844447e657e0d936d825d15dc5c3d61cb..7df6b220cd17e19699ccbc595bab7b66aec982ca 100644 (file)
@@ -1,6 +1,7 @@
 #!/bin/sh /etc/rc.common
 
-START=30
+# Startup before dnsmasq
+START=18
 USE_PROCD=1
 PROG=/usr/sbin/dnscrypt-proxy
 CONFIG_DIR=/var/etc
index e2cf7b1324aa5ed127a68f4f7edfa5131b85edf1..de8feb5e32118097eb3a590b957a6ac4b9f5128d 100644 (file)
@@ -84,8 +84,8 @@ d0wn-us-ns1,"D0wn Resolver United States of America 01","Server provided by Mart
 d0wn-us-ns2,"D0wn Resolver United States of America 02","Server provided by Martin 'd0wn' Albus","United States of America","",https://dns.d0wn.biz,1,yes,yes,no,192.252.222.24,2.dnscrypt-cert.us2.d0wn.biz,729B:FABE:2295:D469:E911:F97E:3EE4:F6DB:0190:EA6F:7CF3:F7EE:BB6B:99B1:698A:237D,pubkey.us2.dnscrypt.d0wn.biz
 d0wn-us-ns4,"D0wn Resolver United States of America 04","Server provided by Martin 'd0wn' Albus","United States of America","",https://dns.d0wn.biz,1,yes,yes,no,107.181.168.52,2.dnscrypt-cert.us4.d0wn.biz,F392:5D53:A315:66C2:ACF2:B2D2:8A69:6739:B066:1B8C:EF1B:3AFD:E828:0D83:D4EA:6D7D,pubkey.us4.dnscrypt.d0wn.biz
 d0wn-za-ns1,"D0wn Resolver South Africa 01","Server provided by Martin 'd0wn' Albus","South Africa","",https://dns.d0wn.biz,1,yes,yes,no,169.239.181.3,2.dnscrypt-cert.za.d0wn.biz,FBBD:0F3A:AF2B:B1BB:CD8F:9324:D5F6:A68C:E722:3890:8B90:92CF:F6D2:BF7C:9EC1:1368,pubkey.za.dnscrypt.d0wn.biz
-dnscrypt.ca-1,"dnscrypt.ca Server 1","Uncensored DNSSEC validating and log-free","Montreal, Canada","","https://dnscrypt.ca/",1,yes,yes,no,"199.167.130.118:5353","2.dnscrypt-cert.dnscrypt.ca-1",74F7:4555:17BC:26F7:1177:E56D:7293:2788:6C72:915B:3F46:2830:3F91:0C47:C38E:8279,
-dnscrypt.ca-2,"dnscrypt.ca Server 2","Uncensored DNSSEC validating and log-free","Montreal, Canada","","https://dnscrypt.ca/",1,yes,yes,no,"199.167.128.112:5353","2.dnscrypt-cert.dnscrypt.ca-2",43D5:2C82:5922:96C2:DB6F:8D48:CE22:4FDC:C726:26E1:06F6:E388:6193:FA00:9029:631B,
+dnscrypt.ca-1,"dnscrypt.ca Server 1","Uncensored DNSSEC validating and log-free","Montreal, Canada","","https://dnscrypt.ca/",1,yes,yes,no,"192.99.183.132:443","2.dnscrypt-cert.dnscrypt.ca-1",1A53:A3C9:5078:9CBD:D10B:1933:A468:9B6C:846A:40F1:B73D:1752:AECA:C982:9ECB:7CE2,
+dnscrypt.ca-2,"dnscrypt.ca Server 2","Uncensored DNSSEC validating and log-free","Montreal, Canada","","https://dnscrypt.ca/",1,yes,yes,no,"149.56.228.45:443","2.dnscrypt-cert.dnscrypt.ca-2",0108:54AB:3B56:A7EE:F9D3:9158:FEF6:820B:FF93:A235:7C89:1608:DB9E:15D3:BBE0:1185,
 dnscrypt.eu-dk,"DNSCrypt.eu Denmark","Free, non-logged, uncensored. Hosted by Netgroup.","Denmark","",https://dnscrypt.eu,1,yes,yes,no,77.66.84.233,2.dnscrypt-cert.resolver2.dnscrypt.eu,3748:5585:E3B9:D088:FD25:AD36:B037:01F5:520C:D648:9E9A:DD52:1457:4955:9F0A:9955,pubkey.resolver2.dnscrypt.eu
 dnscrypt.eu-dk-ipv6,"DNSCrypt.eu Denmark over IPv6","Free, non-logged, uncensored. Hosted by Netgroup.","Denmark","",https://dnscrypt.eu,1,yes,yes,no,[2001:1448:243::dc2]:443,2.dnscrypt-cert.resolver2.dnscrypt.eu,3748:5585:E3B9:D088:FD25:AD36:B037:01F5:520C:D648:9E9A:DD52:1457:4955:9F0A:9955,pubkey.resolver2.dnscrypt.eu
 dnscrypt.eu-nl,"DNSCrypt.eu Holland","Free, non-logged, uncensored. Hosted by RamNode.","Netherlands","",https://dnscrypt.eu,1,yes,yes,no,176.56.237.171,2.dnscrypt-cert.resolver1.dnscrypt.eu,67C0:0F2C:21C5:5481:45DD:7CB4:6A27:1AF2:EB96:9931:40A3:09B6:2B8D:1653:1185:9C66,pubkey.resolver1.dnscrypt.eu
diff --git a/net/dnscrypt-proxy/patches/010-internal.patch b/net/dnscrypt-proxy/patches/010-internal.patch
new file mode 100644 (file)
index 0000000..f10a85f
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/src/proxy/app.c
++++ b/src/proxy/app.c
+@@ -391,7 +391,7 @@ dnscrypt_proxy_main(int argc, char *argv[])
+     }
+     logger_noformat(&proxy_context, LOG_NOTICE, "Starting " PACKAGE_STRING);
+     sodium_mlock(&proxy_context, sizeof proxy_context);
+-    randombytes_set_implementation(&randombytes_salsa20_implementation);
++    randombytes_set_implementation(&randombytes_internal_implementation);
+ #ifdef PLUGINS
+     if (plugin_support_context_load(app_context.dcps_context) != 0) {
diff --git a/net/dnscrypt-proxy2/Makefile b/net/dnscrypt-proxy2/Makefile
new file mode 100644 (file)
index 0000000..6854384
--- /dev/null
@@ -0,0 +1,83 @@
+#
+# 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:=dnscrypt-proxy2
+PKG_VERSION:=2.0.27
+PKG_RELEASE:=1
+
+PKG_SOURCE:=dnscrypt-proxy-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/jedisct1/dnscrypt-proxy/tar.gz/$(PKG_VERSION)?
+PKG_HASH:=a501f44af39cb43e00489ef9e6678aa8adba2bc98f9042dd61ce60e9ad074d5a
+PKG_BUILD_DIR:=$(BUILD_DIR)/dnscrypt-proxy-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>
+PKG_LICENSE:=ISC
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_BUILD_DEPENDS:=golang/host
+PKG_BUILD_PARALLEL:=1
+PKG_USE_MIPS16:=0
+
+GO_PKG:=github.com/jedisct1/dnscrypt-proxy
+
+include $(INCLUDE_DIR)/package.mk
+include ../../lang/golang/golang-package.mk
+
+define Package/dnscrypt-proxy2
+  SECTION:=net
+  CATEGORY:=Network
+  TITLE:=Flexible DNS proxy with encrypted DNS protocols
+  URL:=https://github.com/jedisct1/dnscrypt-proxy
+  DEPENDS:=$(GO_ARCH_DEPENDS) +ca-bundle
+  CONFLICTS:=dnscrypt-proxy
+endef
+
+define Package/dnscrypt-proxy2/install
+       $(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR))
+
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/sbin/
+
+       $(INSTALL_DIR) $(1)/etc/dnscrypt-proxy2
+       $(INSTALL_CONF) $(PKG_BUILD_DIR)/dnscrypt-proxy/example-dnscrypt-proxy.toml $(1)/etc/dnscrypt-proxy2/dnscrypt-proxy.toml
+       $(INSTALL_CONF) ./files/blacklist.txt $(1)/etc/dnscrypt-proxy2/blacklist.txt
+
+       $(INSTALL_DIR) $(1)/etc/init.d
+       $(INSTALL_BIN) ./files/dnscrypt-proxy.init $(1)/etc/init.d/dnscrypt-proxy
+
+       sed -i "s/^listen_addresses = .*/listen_addresses = ['127.0.0.53:53']/" $(1)/etc/dnscrypt-proxy2/dnscrypt-proxy.toml
+       sed -i "s/^  # blacklist_file = 'blacklist.txt'/blacklist_file = 'blacklist.txt'/" $(1)/etc/dnscrypt-proxy2/dnscrypt-proxy.toml
+endef
+
+define Package/dnscrypt-proxy2/description
+  A flexible DNS proxy, with support for modern encrypted DNS protocols
+  such as DNSCrypt v2 and DNS-over-HTTPS.
+endef
+
+define Package/dnscrypt-proxy2/conffiles
+/etc/dnscrypt-proxy2/dnscrypt-proxy.toml
+endef
+
+define Package/golang-github-jedisct1-dnscrypt-proxy2-dev
+$(call Package/dnscrypt-proxy2)
+$(call GoPackage/GoSubMenu)
+  TITLE+= (source files)
+  PKGARCH:=all
+endef
+
+define Package/golang-github-jedisct1-dnscrypt-proxy2-dev/description
+$(call Package/dnscrypt-proxy2/description)
+
+  This package provides the source files for the client/bridge program.
+endef
+
+$(eval $(call GoBinPackage,dnscrypt-proxy2))
+$(eval $(call BuildPackage,dnscrypt-proxy2))
+$(eval $(call GoSrcPackage,golang-github-jedisct1-dnscrypt-proxy2-dev))
+$(eval $(call BuildPackage,golang-github-jedisct1-dnscrypt-proxy2-dev))
diff --git a/net/dnscrypt-proxy2/files/blacklist.txt b/net/dnscrypt-proxy2/files/blacklist.txt
new file mode 100644 (file)
index 0000000..c975af3
--- /dev/null
@@ -0,0 +1,54 @@
+
+###########################
+#        Blacklist        #
+###########################
+
+## Rules for name-based query blocking, one per line
+##
+## Example of valid patterns:
+##
+## ads.*         | matches anything with an "ads." prefix
+## *.example.com | matches example.com and all names within that zone such as www.example.com
+## example.com   | identical to the above
+## =example.com  | block example.com but not *.example.com
+## *sex*         | matches any name containing that substring
+## ads[0-9]*     | matches "ads" followed by one or more digits
+## ads*.example* | *, ? and [] can be used anywhere, but prefixes/suffixes are faster
+
+ad.*
+ads.*
+banner.*
+banners.*
+creatives.*
+oas.*
+oascentral.*
+stats.*
+tag.*
+telemetry.*
+tracker.*
+*.local
+eth0.me
+*.workgroup
+
+*.test
+*.onion
+*.localhost
+*.local
+*.invalid
+*.bind
+*.lan
+*.internal
+*.intranet
+*.private
+*.workgroup
+
+*.10.in-addr.arpa
+*.16.172.in-addr.arpa
+*.168.192.in-addr.arpa
+*.254.169.in-addr.arpa
+*.d.f.ip6.arpa
+
+## Time-based rules
+
+# *.youtube.*  @time-to-sleep
+# facebook.com @work
diff --git a/net/dnscrypt-proxy2/files/dnscrypt-proxy.init b/net/dnscrypt-proxy2/files/dnscrypt-proxy.init
new file mode 100644 (file)
index 0000000..db07d5e
--- /dev/null
@@ -0,0 +1,21 @@
+#!/bin/sh /etc/rc.common
+
+USE_PROCD=1
+
+# starts before dnsmasq starts
+START=18
+# stops before networking stops
+STOP=89
+
+PROG=/usr/sbin/dnscrypt-proxy
+CONFIGFILE=/etc/dnscrypt-proxy2/dnscrypt-proxy.toml
+
+start_service() {
+        procd_open_instance
+        procd_set_param command "$PROG" -config "$CONFIGFILE"
+        procd_set_param file "$CONFIGFILE"
+        procd_set_param stdout 1
+        procd_set_param stderr 1
+        procd_set_param respawn ${respawn_threshold:-3600} ${respawn_timeout:-5} ${respawn_retry:-5}
+        procd_close_instance
+}
index 4f2ff92d953370995460595beb7a26dd78f43537..3acd8c9f6c4ddcf5461cf028df77dda22847812f 100644 (file)
@@ -11,6 +11,7 @@ PKG_HASH:=9fb24f9032025955169f3c6e9b0a05b6aa9d6441ec47da08d22de1c1aa23e8cf
 PKG_MAINTAINER:=James Taylor <james@jtaylor.id.au>
 PKG_LICENSE:=GPL-2.0-only
 PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:powerdns:dnsdist
 
 PKG_INSTALL:=1
 
@@ -40,8 +41,9 @@ endchoice
 endef
 
 define Package/dnsdist
-  SECTION:=base
+  SECTION:=net
   CATEGORY:=Network
+  SUBMENU:=IP Addresses and Names
   TITLE:=dnsdist DNS-, DOS- and abuse-aware loadbalancer
   DEPENDS:=+DNSDIST_OPENSSL:libopenssl +DNSDIST_GNUTLS:libgnutls +protobuf +re2 +libedit +libfstrm +libsodium +lua +boost +libnetsnmp +libatomic
   URL:=https://dnsdist.org/
diff --git a/net/dnstop/Makefile b/net/dnstop/Makefile
new file mode 100644 (file)
index 0000000..6681552
--- /dev/null
@@ -0,0 +1,35 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=dnstop
+PKG_RELEASE:=1
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/measurement-factory/dnstop.git
+PKG_SOURCE_DATE:=2018-05-22
+PKG_SOURCE_VERSION:=a5a5d2e2ca9a433bb8f017682ac6f2085741bdf8
+PKG_MIRROR_HASH:=1fe443c6faf1726aeb86a53a3a44efce23cad604304036371e76ff020eb0dac2
+
+PKG_MAINTAINER:=Ken Xu <windedge99@gmail.com>
+PKG_LICENSE:=NLPL
+PKG_LICENSE_FILES:=LICENSE
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/dnstop
+  SECTION:=net
+  CATEGORY:=Network
+  DEPENDS:=+libpcap +libncurses
+  TITLE:=stay on top of your dns traffic
+  URL:=http://dns.measurement-factory.com/tools/dnstop/
+endef
+
+define Package/dnstop/description
+ dnstop is a libpcap application (like tcpdump) that displays various tables of DNS traffic on your network
+endef
+
+define Package/dnstop/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/dnstop $(1)/usr/bin/
+endef
+
+$(eval $(call BuildPackage,dnstop))
diff --git a/net/dnstop/patches/100-fix_udphdr_error.patch b/net/dnstop/patches/100-fix_udphdr_error.patch
new file mode 100644 (file)
index 0000000..2b729ea
--- /dev/null
@@ -0,0 +1,14 @@
+--- a/dnstop.c
++++ b/dnstop.c
+@@ -71,11 +71,6 @@ static const char *Version = "@VERSION@"
+ #define ETHERTYPE_IPV6 0x86DD
+ #endif
+-#if defined(__linux__) || defined(__GLIBC__) || defined(__GNU__)
+-#define uh_dport dest
+-#define uh_sport source
+-#endif
+-
+ typedef struct {
+     inX_addr src;
+     int count;
index e724874795f3eb1135a228d524d6c5c0bff913df..cb91f511326364ec5d20f5f41768c2c579e9a3a8 100644 (file)
@@ -8,17 +8,17 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=dynapoint
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_MAINTAINER:=Tobias Ilte <tobias.ilte@campus.tu-berlin.de>
-PKG_LICENSE:=GPL-3.0+
+PKG_LICENSE:=GPL-3.0-or-later
 
 include $(INCLUDE_DIR)/package.mk
 
 define Package/dynapoint
     SECTION:=net
     CATEGORY:=Network
-    SUBMENU:=wireless
+    SUBMENU:=Wireless
     DEPENDS:=+lua +libubus-lua +libuci-lua +libubox-lua +luci-lib-nixio
     TITLE:=Dynamic access point manager
     PKGARCH:=all
diff --git a/net/etherwake-nfqueue/Makefile b/net/etherwake-nfqueue/Makefile
new file mode 100644 (file)
index 0000000..19897f7
--- /dev/null
@@ -0,0 +1,51 @@
+#
+# Copyright (C) 2019 Mister Benjamin <144dbspl@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:=etherwake-nfqueue
+PKG_RELEASE:=2
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/mister-benjamin/etherwake-nfqueue.git
+PKG_SOURCE_DATE:=2019-09-28
+PKG_SOURCE_VERSION:=f71c269b58585e93575fa3e9fcc1793806fb3080
+PKG_MIRROR_HASH:=4960dc592abc4ca06504c92ca09fc736c678353df0dcc32d4081e17b137a9164
+
+PKG_MAINTAINER:=Mister Benjamin <144dbspl@gmail.com>
+PKG_LICENSE:=GPL-2.0-or-later
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+define Package/etherwake-nfqueue
+  SECTION:=net
+  CATEGORY:=Network
+  DEPENDS:=+libnetfilter-queue +iptables-mod-nfqueue
+  TITLE:=Wake up computers on netfilter match
+  URL:=https://github.com/mister-benjamin/etherwake-nfqueue
+endef
+
+define Package/etherwake-nfqueue/description
+ Fork of etherwake with additional support for sending WOL packets
+ when a router added a filtered packet to an NFQUEUE.
+endef
+
+define Package/etherwake-nfqueue/conffiles
+/etc/config/etherwake-nfqueue
+endef
+
+define Package/etherwake-nfqueue/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/etherwake-nfqueue $(1)/usr/bin/
+       $(INSTALL_DIR) $(1)/etc/config
+       $(INSTALL_CONF) files/$(PKG_NAME).config $(1)/etc/config/$(PKG_NAME)
+       $(INSTALL_DIR) $(1)/etc/init.d
+       $(INSTALL_BIN) files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME)
+endef
+
+$(eval $(call BuildPackage,etherwake-nfqueue))
diff --git a/net/etherwake-nfqueue/README.md b/net/etherwake-nfqueue/README.md
new file mode 100644 (file)
index 0000000..b44ac9e
--- /dev/null
@@ -0,0 +1,378 @@
+# OpenWrt package feed for etherwake-nfqueue
+
+
+## Wake up computers on netfilter match
+
+This repository contains the OpenWrt package feed for
+[etherwake-nfqueue](https://github.com/mister-benjamin/etherwake-nfqueue),
+a fork of the **etherwake** Wake-on-LAN client, with support to send magic
+packets only after a queued packet is received from the Linux *nfnetlink_queue*
+subsystem.
+
+When running **etherwake-nfqueue** on a residential gateway or other type of
+router, it can wake up hosts on its network based on packet filtering rules.
+
+For instance, when your set-top box wants to record a TV programme and
+tries to access a network share on your NAS, which is in sleep or standby mode,
+**etherwake-nfqueue** can wake up your NAS. Or when you set up port forwarding
+to a host on your home network, **etherwake-nfqueue** can wake up your host
+when you try to access it over the Internet.
+
+The documentation below is mostly OpenWrt specific. For more information on
+etherwake-nfqueue itself and use case examples, please consult its
+[Readme](https://github.com/mister-benjamin/etherwake-nfqueue/blob/master/README.md).
+
+
+## Building the package
+
+Currently, no pre-built packages are provided. The following assumes that you
+already have a working OpenWrt build system for your target device.
+
+If you haven't, you can follow one of these guides:
+
+* If you only want to compile packages, and no firmware image:
+  [Build system – Installation](https://openwrt.org/docs/guide-developer/build-system/install-buildsystem) and
+  [Using the SDK](https://openwrt.org/docs/guide-developer/using_the_sdk)
+
+* To quickly build a firmware image off a development snapshot:
+  [Quick Image Building Guide](https://openwrt.org/docs/guide-developer/quickstart-build-images)
+
+* Or when you are completely new to using build systems:
+  [Beginners guide to building your own firmware](https://openwrt.org/docs/guide-user/additional-software/beginners-build-guide)
+
+### Dependencies
+
+**etherwake-nfqueue** depends on these OpenWrt packages:
+
+* libnetfilter-queue
+* iptables-mod-nfqueue
+
+They will be automatically selected and compiled for you. If they are not
+installed on your target device, *opkg* will try to resolve dependencies with
+packages in the repositories.
+
+### Adding the package feed
+
+First, you need to add the **etherwake-nfqueue** package feed to your build
+system.  In the root directory of your OpenWrt build system, find the file
+*feeds.conf* (or *feeds.conf.default* if the former shouldn't exist) and add
+the following line to it:
+
+```
+src-git ethernfq https://github.com/mister-benjamin/etherwake-nfqueue-openwrt.git
+```
+
+Then update and install the package feed:
+```
+user@host:~/openwrt$ scripts/feeds update ethernfq
+user@host:~/openwrt$ scripts/feeds install -a -p ethernfq
+```
+
+After that, enter OpenWrt's configuration menu
+```
+user@host:~/openwrt$ make menuconfig
+```
+and enable **etherwake-nfqueue** in the **Network** sub-menu. It can either be selected
+as built-in (\*) or module (M), depending on your decision to include it into a
+firmware image or just build the *opkg* package for installation.
+
+Then you should be able to compile the package:
+```
+user@host:~/openwrt$ make package/etherwake-nfqueue/compile
+```
+
+The path of the resulting package depends on your selected *Target System*.
+In case of the Linksys WRT1200AC, it can be found here:
+```
+bin/packages/arm_cortex-a9_vfpv3/ethernfq/etherwake-nfqueue_2019-09-10-67e9d4ca-1_arm_cortex-a9_vfpv3.ipk
+```
+
+
+## Installation
+
+One way to install the package is by simply copying it over to the device with *scp*:
+```
+user@host:~$ scp etherwake-nfqueue_2019-09-10-67e9d4ca-1_arm_cortex-a9_vfpv3.ipk root@gateway:~
+```
+And then, install it on the device:
+```
+root@gateway:~# opkg install etherwake-nfqueue_2019-09-10-67e9d4ca-1_arm_cortex-a9_vfpv3.ipk
+```
+
+
+## Configuration
+
+### WoL Targets
+
+After a fresh installation, no target is configured. Targets are referred
+to as the hosts to wake up. Multiple targets can coexist.
+
+Targets can be configured with OpenWrt's UCI.
+
+For example, to add a target called **nas**, with MAC address
+ **00:25:90:00:d5:fd**, which is reachable over the VLAN configured
+on **eth0.3**, issue this command sequence on your router:
+
+```
+uci add etherwake-nfqueue target
+uci set etherwake-nfqueue.@target[-1].name=nas
+uci set etherwake-nfqueue.@target[-1].mac=00:25:90:00:d5:fd
+uci set etherwake-nfqueue.@target[-1].interface=eth0.3
+uci commit
+```
+
+For each target, one instance of **etherwake-nfqueue** will be started.
+
+Each instance should bind to a different *nfnetlink_queue*. A queue can
+be referenced by its queue number. Counting starts from 0, which is the default.
+To use a different queue, provide the **nfqueue_num** option. The
+following could have been added to the sequence above to use queue 1 instead
+of 0:
+
+```
+uci set etherwake-nfqueue.@target[-1].nfqueue_num=1
+```
+
+The necessity of a queue number will probably become clear, when the iptables
+rules are configured in section [Setup firewall rules](#setup-firewall-rules).
+
+The full list of options for a target is:
+
+| Option      | Required | Description                                      |
+| ----------- | -------- | ------------------------------------------------ |
+| name        | no       | Name of the target, e.g. name=example            |
+| mac         | yes      | MAC address of the host to wake up, e.g. mac=00:22:44:66:88:aa |
+| nfqueue_num | no       | The queue number used for receiving filtered packets, default is nfqueue_num=0 |
+| interface   | no       | The interface used for sending the magic packet, default is interface=eth0 |
+| broadcast   | no       | Send magic packet to broadcast address, default is broadcast=off |
+| password    | no       | Set a password (required by some adapters), e.g. password=00:22:44:66:88:aa or 192.168.1.1 |
+| enabled     | no       | Optionally disable the target, default is enabled=true |
+
+After committing your changes, the settings are persisted to
+*/etc/config/etherwake-nfqueue*. This is an illustrative example:
+```
+config etherwake-nfqueue 'setup'
+        option sudo 'off'
+        option debug 'off'
+
+config target
+        option name 'nas'
+        option mac '00:25:90:00:d5:fd'
+        option interface 'eth0.3'
+
+config target
+        option name 'xyz-board'
+        option mac '00:25:90:00:d5:fc'
+        option nfqueue_num '1'
+        option enabled 'false'
+
+config target
+        option name 'ip-camera'
+        option mac '00:25:90:00:d5:fb'
+        option nfqueue_num '2'
+        option interface 'eth0.3'
+        option broadcast 'on'
+        option password '00:25:90:00:d5:fb'
+```
+
+When all target(s) are configured, restart the *etherwake-nfqueue* service:
+```
+/etc/init.d/etherwake-nfqueue restart
+```
+
+### Setting up filters
+
+Without any firewall rules which tell the kernel to match and add packets
+to a *nfnetlink_queue*, **etherwake-nfqueue** will never send out a magic
+packet to wake its target.
+
+#### Prerequisites
+
+In order to let the *netfilter* framework of the kernel see the packets,
+they need to pass through the router. This is usually not the case when
+hosts are on the same subnet and don't require network layer routing.
+The data will only pass through the router's switch on the link layer.
+
+As a consequence, we can only use packets as a trigger which need to be
+routed or bridged by the router. Packets being forwarded between WAN
+and LAN are of that type. For other SOHO use cases, partitioning your
+network by means of subnets or VLANs might be necessary. The latter
+is often used to set up a DMZ.
+
+For VLANs:
+
+* There's a mini howto referring to the **LuCI Web Interface**
+  *(Network -> Switch)* way of configuring VLANs:
+  [How-To: Creating an additional virtual switch on a typical home router](https://openwrt.org/docs/guide-user/network/vlan/creating_virtual_switches)
+
+* The manual approach is documented here:
+  [VLAN](https://openwrt.org/docs/guide-user/network/vlan/switch_configuration)
+
+Guides to setup a DMZ can be found here:
+
+* [Guide to set up DMZ via LUCI](https://forum.openwrt.org/t/guide-to-set-up-dmz-via-luci/21616)
+
+* [fw3 DMZ Configuration Using VLANs](https://openwrt.org/docs/guide-user/firewall/fw3_configurations/fw3_dmz)
+
+The physical switch layout is device specific. E.g. the layout for the Linksys
+WRT AC Series is documented
+[here](https://oldwiki.archive.openwrt.org/toh/linksys/wrt_ac_series#switch_layout).
+
+
+Using two LANs or VLANs with the same network address and bridging them again
+is a trick to setup a transparent (or bridging) firewall on the same subnet.
+This way, packets can be seen by *netfilter* on the router even if the
+packets are not routed. Unfortunately this doesn't help when the host
+which we want to wake up is offline, as the ARP requests for the destination
+IP address are not answered and thus the client trying to reach out to its
+destination will not send any *network layer* packets. We could use *arptables*
+instead to wake the host when someone requests its MAC address, but this
+would probably happen too often and no fine-grained control would be possible.
+
+As a workaround, it might be possible to configure a static ARP entry on your
+router (untested), e.g. with:
+```
+ip neigh add 192.168.0.10 lladdr 00:25:90:00:d5:fd nud permanent dev eth0.3
+```
+Note that this requires the *ip-full* OpenWrt package to be installed.
+
+To make your firewall rules work with bridging, you need to install the
+*kmod-br-netfilter* package and add `net.bridge.bridge-nf-call-iptables=1`
+to */etc/sysctl.conf*.
+
+
+#### Setup firewall rules
+
+One way to setup custom firewall rules in OpenWrt is through its
+*/etc/firewall.user* script. This file can also be edited by means of
+the **LuCI Web Interface** *(Network -> Firewall -> Custom Rules)*.
+
+The file is interpreted as a shell script, so we can simply use **iptables**
+to add our custom firewall rules.
+
+Notice the comment
+```
+# 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.
+```
+
+Refer to [Packet flow](https://oldwiki.archive.openwrt.org/doc/uci/firewall#packet_flow)
+for usable chains. In the example below, the chains *forwarding_lan_rule* and
+*forwarding_wan_rule* are used. To inspect the rule sets of the different tables, one can
+use
+
+```
+iptables --list                  # default is --table filter
+iptables --table nat --list
+iptables --table mangle --list
+iptables --table raw --list      # requires kmod-ipt-raw
+```
+
+The following is an example of what could be added to */etc/firewall.user*:
+
+```
+iptables --insert forwarding_lan_rule\
+         --protocol tcp --in-interface=br-lan --out-interface=eth0.3\
+         --destination 192.168.0.10 --destination-port 445\
+         --match conntrack --ctstate NEW\
+         --match limit --limit 3/hour --limit-burst 1\
+         --jump NFQUEUE --queue-num 0 --queue-bypass\
+         --match comment --comment "Wake up NAS on LAN SMB"
+iptables --insert forwarding_lan_rule\
+         --protocol tcp --in-interface=br-lan --out-interface=eth0.3\
+         --destination 192.168.0.11 --match multiport --destination-ports 515,54921,631\
+         --match conntrack --ctstate NEW\
+         --match limit --limit 3/hour --limit-burst 1\
+         --jump NFQUEUE --queue-num 0 --queue-bypass\
+         --match comment --comment "Wake up NAS on print request"
+iptables --insert forwarding_lan_rule\
+         --protocol udp --in-interface=br-lan --out-interface=eth0.3\
+         --destination 192.168.0.11 --destination-port 161\
+         --match conntrack --ctstate NEW\
+         --match limit --limit 3/hour --limit-burst 1\
+         --jump NFQUEUE --queue-num 0 --queue-bypass\
+         --match comment --comment "Wake up NAS on print request"
+iptables --insert forwarding_wan_rule\
+         --protocol tcp --in-interface=eth1.2 --out-interface=eth0.3\
+         --destination 192.168.0.10 --destination-port 22\
+         --match conntrack --ctstate NEW\
+         --match limit --limit 3/hour --limit-burst 1\
+         --jump NFQUEUE --queue-num 0 --queue-bypass\
+         --match comment --comment "Wake up NAS on WAN SSH"
+```
+
+In this example, packets are filtered based on the protocol, their input
+and output interfaces, their destination (IP address) and their destination
+port(s).
+
+The option `--match conntrack --ctstate NEW` only matches packets of a new
+connection and `--match limit --limit 3/hour --limit-burst 1` limits the
+amount of packets that are matched. The latter option roughly matches
+only one packet per 20 minutes. The intention here is to not be too intrusive
+and avoid sending a lot of magic packets.
+
+The `--jump NFQUEUE --queue-num 0` options tell the *netfilter*
+framework to enqueue a matching packet to the NFQUEUE number 0. In this
+example, all four rules send the matching packets into queue 0. The
+additional option `--queue-bypass` helps in the situation, when
+**etherwake-nfqueue** isn't running. Packets will then be handled
+as if the rule wasn't present.
+
+
+## Disabling targets
+
+To disable targets, first find their index:
+```
+uci show etherwake-nfqueue
+```
+
+Then set its *enabled* option to false and restart the service.
+For index 0, it can be done like this:
+```
+uci set etherwake-nfqueue.@target[0].enabled=false
+/etc/init.d/etherwake-nfqueue restart
+```
+
+
+## Troubleshooting
+
+### Debug mode
+
+In order to see what's going on in syslog and get some debug output when
+starting the service, enable etherwake-nfqueue's debug mode:
+```
+uci set etherwake-nfqueue.setup.debug=on
+```
+In another user session tail the log:
+```
+logread -f
+```
+And then restart the service:
+```
+/etc/init.d/etherwake-nfqueue restart
+```
+
+### Inspect netfilter
+
+To inspect the working of your firewall rules, you can print statistics
+of the chains you used, e.g.:
+```
+iptables --verbose --list forwarding_lan_rule
+```
+
+If you happen to have the *procps-ng-watch* package installed, you can watch
+them:
+```
+watch iptables --verbose --list forwarding_lan_rule
+```
+
+To see, if your queues are in place, use:
+```
+cat /proc/net/netfilter/nfnetlink_queue
+```
+
+## Potential improvements
+
+* Add **LuCI Web Interface** configuration frontend for *targets* and *filter rules*
+* Add an option to set *nice* values for instances
diff --git a/net/etherwake-nfqueue/files/etherwake-nfqueue.config b/net/etherwake-nfqueue/files/etherwake-nfqueue.config
new file mode 100644 (file)
index 0000000..541bbe2
--- /dev/null
@@ -0,0 +1,21 @@
+config etherwake-nfqueue 'setup'
+       option sudo 'off'
+       option debug 'off'
+
+# You can add targets with uci:
+# # uci add etherwake-nfqueue target
+# Set a name for the target
+# # uci set etherwake-nfqueue.@target[-1].name=example
+# Set MAC address of the host to wake up
+# # uci set etherwake-nfqueue.@target[-1].mac=00:22:44:66:88:aa
+# Set the nfqueue num used for receiving filtered packets, defaults to 0
+# # uci set etherwake-nfqueue.@target[-1].nfqueue_num=0
+# Set the interface used for sending the magic packet, defaults to 'eth0'
+# # uci set etherwake-nfqueue.@target[-1].interface=eth0
+# Configure if it should be sent to broadcast address, defaults to off
+# # uci set etherwake-nfqueue.@target[-1].broadcast=off
+# Optionally provide a password (required by some adapters)
+# e.g. 00:22:44:66:88:aa or 192.168.1.1
+# # uci set etherwake-nfqueue.@target[-1].password=00:22:44:66:88:aa
+# Optionally disable the target, by default it is enabled
+# # uci set etherwake-nfqueue.@target[-1].enabled=false
diff --git a/net/etherwake-nfqueue/files/etherwake-nfqueue.init b/net/etherwake-nfqueue/files/etherwake-nfqueue.init
new file mode 100644 (file)
index 0000000..0be740d
--- /dev/null
@@ -0,0 +1,69 @@
+#!/bin/sh /etc/rc.common
+#
+# Copyright (C) 2019 Mister Benjamin <144dbspl@gmail.com>
+
+NAME='etherwake-nfqueue'
+
+START=60
+USE_PROCD=1
+
+PROGRAM=${NAME}
+
+start_service()
+{
+    local value
+
+    config_load ${NAME}
+
+    config_get_bool value setup sudo 0
+    [ "${value}" -ne 0 ] && PROGRAM="sudo ${PROGRAM}"
+
+    config_get_bool value setup debug 0
+    if [ "${value}" -ne 0 ]; then
+        PROCD_DEBUG=1
+        append PROGRAM '-D'
+    fi
+
+    config_foreach start_instance target
+}
+
+start_instance()
+{
+    local section="$1"
+    local value name mac
+
+    config_get_bool value "${section}" enabled 1
+    [ "${value}" -ne 1 ] && return 0
+
+    config_get value "${section}" name
+    [ -z "${value}" ] && value="{section}"
+    name=${value}
+
+    config_get mac "${section}" mac
+    [ -z "${mac}" ] && {
+        echo "${initscript}: Target ${name} has no MAC address"
+        return 1
+    }
+
+    procd_open_instance ${name}
+    procd_set_param command ${PROGRAM}
+    procd_set_param respawn
+    procd_set_param stdout 1
+    procd_set_param stderr 1
+
+    config_get_bool value "${section}" broadcast 0
+    [ "${value}" -ne 0 ] && procd_append_param command -b
+
+    config_get value "${section}" interface
+    [ -n "${value}" ] && procd_append_param command -i "${value}"
+
+    config_get value "${section}" password
+    [ -n "${value}" ] && procd_append_param command -p "${value}"
+
+    config_get value "${section}" nfqueue_num 0
+    procd_append_param command -q "${value}"
+
+    procd_append_param command "${mac}"
+
+    procd_close_instance
+}
index 9a0b9ba80459caa7468ebcf647725ed53684465e..98063c036e2739907cc92e4cb2de0241f06a9bd1 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=etherwake
 PKG_VERSION:=1.09
-PKG_RELEASE:=4
+PKG_RELEASE:=5
 
 PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz
 PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/e/etherwake
diff --git a/net/etherwake/patches/100-no_ether_hostton.patch b/net/etherwake/patches/100-no_ether_hostton.patch
deleted file mode 100644 (file)
index e33c06b..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
---- etherwake-1.09.orig/ether-wake.c   2005-07-10 20:44:25.000000000 +0200
-+++ etherwake-1.09.orig.no_ether_hostton/ether-wake.c  2007-04-29 19:03:41.000000000 +0200
-@@ -15,7 +15,11 @@
- "     an optional password appended.\n"
- "\n"
- "     The single required parameter is the Ethernet MAC (station) address\n"
-+#if !defined(__UCLIBC__)
- "     of the machine to wake or a host ID with known NSS 'ethers' entry.\n"
-+#else
-+"     of the machine to wake.\n"
-+#endif
- "     The MAC address may be found with the 'arp' program while the target\n"
- "     machine is awake.\n"
- "\n"
-@@ -289,16 +293,22 @@
-               if (debug)
-                       fprintf(stderr, "The target station address is %s.\n",
-                                       ether_ntoa(eaddr));
-+#if !defined(__UCLIBC__)
-       } else if (ether_hostton(hostid, eaddr) == 0) {
-               if (debug)
-                       fprintf(stderr, "Station address for hostname %s is %s.\n",
-                                       hostid, ether_ntoa(eaddr));
-+#endif
-       } else {
-               (void)fprintf(stderr,
-                                         "ether-wake: The Magic Packet host address must be "
-                                         "specified as\n"
-+#if !defined(__UCLIBC__)
-                                         "  - a station address, 00:11:22:33:44:55, or\n"
-                                         "  - a hostname with a known 'ethers' entry.\n");
-+#else
-+                                        "  - a station address, 00:11:22:33:44:55\n");
-+#endif
-               return -1;
-       }
-       return 0;
index e52c15287d80663423bd2267a51a1bbf69f68f73..ec799d162fea6ac6a7eb704a5d20879fbc51e324 100644 (file)
@@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=fakeidentd
 PKG_VERSION:=2.6
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).c
 PKG_SOURCE_URL:=http://distfiles.gentoo.org/distfiles/
 PKG_HASH:=75b321e5d9dddcea2b38035b62ac30f2175ed43f3f187be6da19aaa67c4fe165
 PKG_MAINTAINER:=Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>
-PKG_LICENSE:=GPL-2.0+
+PKG_LICENSE:=GPL-2.0-or-later
 UNPACK_CMD=$(CP) $(DL_DIR)/$(PKG_SOURCE) $(1)/
 
 include $(INCLUDE_DIR)/package.mk
index 4e2bcd5f96240aafef1e8e5741c06c768c7ca9fb..44b37b6ca300ba43f15d7a116fb654ccd0a69e99 100644 (file)
@@ -9,11 +9,11 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=fastd
 PKG_VERSION:=18
-PKG_RELEASE:=2
+PKG_RELEASE:=4
 
 PKG_MAINTAINER:=Matthias Schiffer <mschiffer@universe-factory.net>
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_SOURCE_URL:=https://projects.universe-factory.net/attachments/download/86
+PKG_SOURCE_URL:=https://github.com/NeoRaider/fastd/releases/download/v$(PKG_VERSION)
 PKG_HASH:=714ff09d7bd75f79783f744f6f8c5af2fe456c8cf876feaa704c205a73e043c9
 
 PKG_LICENSE:=BSD-2-Clause
@@ -53,7 +53,7 @@ define Package/fastd
   CATEGORY:=Network
   DEPENDS:=+kmod-tun +librt +libpthread +libuecc +FASTD_WITH_STATUS_SOCKET:libjson-c +FASTD_WITH_CAPABILITIES:libcap
   TITLE:=Fast and Secure Tunneling Daemon
-  URL:=https://projects.universe-factory.net/projects/fastd
+  URL:=https://github.com/NeoRaider/fastd/
   SUBMENU:=VPN
 endef
 
diff --git a/net/fastd/patches/0001-resolve-fix-segmentation-fault-with-musl-1.1.20.patch b/net/fastd/patches/0001-resolve-fix-segmentation-fault-with-musl-1.1.20.patch
new file mode 100644 (file)
index 0000000..52c1917
--- /dev/null
@@ -0,0 +1,35 @@
+From 9710132c04cd378bd36f16a2a3d98d9c4c5fdbac Mon Sep 17 00:00:00 2001
+From: David Bauer <mail@david-bauer.net>
+Date: Thu, 25 Jul 2019 18:51:25 +0200
+Subject: [PATCH] resolve: fix segmentation fault with musl >1.1.20
+
+When compiled with musl >1.1.20, fastd will crash in case it can't
+resolve a peers hostname. This is due to a changed implementation of
+freeaddrinfo in musl 1.1.21 onwards.
+
+This segfault is fixed by not calling freeaddrinfo in case the supplied
+pointer is null.
+
+Signed-off-by: David Bauer <mail@david-bauer.net>
+---
+ src/resolve.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/src/resolve.c b/src/resolve.c
+index 9bdfa1c..bfd2a59 100644
+--- a/src/resolve.c
++++ b/src/resolve.c
+@@ -104,7 +104,9 @@ static void * resolve_peer(void *varg) {
+       fastd_async_enqueue(ASYNC_TYPE_RESOLVE_RETURN, ret, sizeof(fastd_async_resolve_return_t) + n_addr*sizeof(fastd_peer_address_t));
+-      freeaddrinfo(res);
++      if (res)
++              freeaddrinfo(res);
++
+       free(arg->hostname);
+       free(arg);
+-- 
+2.20.1
+
diff --git a/net/fastd/patches/0002-doc-examples-openwrt-fix-init-script-wasn-t-working-.patch b/net/fastd/patches/0002-doc-examples-openwrt-fix-init-script-wasn-t-working-.patch
new file mode 100644 (file)
index 0000000..b576a98
--- /dev/null
@@ -0,0 +1,29 @@
+From c29b4b0e3cc5bf68129fd0f94f424950b7888deb Mon Sep 17 00:00:00 2001
+Message-Id: <c29b4b0e3cc5bf68129fd0f94f424950b7888deb.1567630068.git.mschiffer@universe-factory.net>
+From: Wilfried Klaebe <wklaebe@users.noreply.github.com>
+Date: Sat, 31 Aug 2019 21:44:13 +0200
+Subject: [PATCH] doc: examples/openwrt: fix init script, wasn't working with
+ two VPNs
+
+If two VPNs were configured via uci, the init script complained about
+the peer group of its peers not matching its net.
+---
+ doc/examples/openwrt/fastd.init | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/doc/examples/openwrt/fastd.init b/doc/examples/openwrt/fastd.init
+index 15737b403ec2..4ba69ece9887 100644
+--- a/doc/examples/openwrt/fastd.init
++++ b/doc/examples/openwrt/fastd.init
+@@ -233,7 +233,7 @@ generate_peer_group_config() {
+       config_get group_parent "$group" parent
+       [ "$parent" = "$group_parent" ] || return 0
+-      if [ "$net" != "$peer_net" ]; then
++      if [ "$net" != "$group_net" ]; then
+               [ -z "$parent" ] || error "warning: the parent of peer group '$group' doesn't match its net, the peer group will be ignored"
+               return 0
+       fi
+-- 
+2.23.0
+
diff --git a/net/fossil/Makefile b/net/fossil/Makefile
deleted file mode 100644 (file)
index fcece20..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-#
-# Copyright (C) 2015 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:=fossil
-PKG_VERSION:=1.34
-PKG_RELEASE:=2
-
-PKG_LICENSE:=BSD-2-Clause
-PKG_MAINTAINER:=Luka Perkov <luka@openwrt.org>
-
-PKG_SOURCE:=$(PKG_NAME)-src-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://www.fossil-scm.org/index.html/uv/download
-PKG_HASH:=53a6b83e878feced9ac7705f87e5b6ea82727314e3e19202ae1c46c7e4dba49f
-
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-src-$(PKG_VERSION)
-
-PKG_INSTALL:=1
-PKG_BUILD_PARALLEL:=1
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/fossil
-  SECTION:=net
-  CATEGORY:=Network
-  SUBMENU:=Version Control Systems
-  TITLE:=Simple distributed software configuration management
-  URL:=http://www.fossil-scm.org
-  DEPENDS:=+zlib
-endef
-
-define Package/fossil/description
-  Fossil is a distributed version control system, bug tracking system
-  and wiki software server for use in software development.
-endef
-
-MAKE_FLAGS := \
-       TCC="$(TARGET_CC)" \
-       CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include -DFOSSIL_ENABLE_JSON" \
-       LDFLAGS="$(TARGET_LDFLAGS) -Wl,-rpath=$(TOOLCHAIN_DIR)/lib -L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib -lm" \
-
-define Build/Configure
-endef
-
-define Build/Compile
-       $(call Build/Compile/Default, \
-               -f Makefile.classic $(MAKE_FLAGS) all \
-       )
-endef
-
-define Build/Install
-endef
-
-define Package/fossil/conffiles
-/etc/config/fossil
-endef
-
-define Package/fossil/install
-       $(INSTALL_DIR) $(1)/usr/bin
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/bin/
-       $(INSTALL_DIR) $(1)/etc/init.d
-       $(INSTALL_BIN) ./files/fossil.init $(1)/etc/init.d/fossil
-       $(INSTALL_DIR) $(1)/etc/config
-       $(INSTALL_CONF) ./files/fossil.config $(1)/etc/config/fossil
-endef
-
-$(eval $(call BuildPackage,fossil))
diff --git a/net/fossil/files/fossil.config b/net/fossil/files/fossil.config
deleted file mode 100644 (file)
index f35876c..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-config server 'dummy'
-       option repository '/tmp/fossil/dummy'
-       option port 8008
-       option localhost 0
-       option create 1
diff --git a/net/fossil/files/fossil.init b/net/fossil/files/fossil.init
deleted file mode 100644 (file)
index f5a17b9..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-#!/bin/sh /etc/rc.common
-# Copyright (C) 2015 OpenWrt.org
-
-START=90
-USE_PROCD=1
-
-start_instance() {
-       local cfg="$1"
-
-       config_get repository "$cfg" repository
-       if [ -z "$repository" ]; then
-               echo "repository is not defined in $1, skipping"
-               return
-       fi
-
-       config_get_bool create "$cfg" create 0
-
-       if [ "$create" -eq 0 -a ! -f "$repository" ]; then
-               echo "in $1 create option is '$create' and repository '$repository' is not a regular file, skipping"
-               return
-       fi
-
-       if [ "$create" -eq 1 -a ! -d `dirname $repository` ]; then
-               mkdir -p `dirname $repository`
-               if [ "$?" -ne 0 ]; then
-                       echo "could not create directory, skipping"
-                       return
-               fi
-       fi
-
-       config_get port "$cfg" port ""
-       if [ -z "$port" ]; then
-               echo "port is not defined in $1, skipping"
-               return
-       fi
-
-       config_get_bool debug "$cfg" debug 0
-       config_get_bool localhost "$cfg" localhost 1
-       config_get_bool scgi "$cfg" scgi 0
-
-       procd_open_instance
-       procd_set_param command /usr/bin/fossil server "$repository" --port $port
-       [ "$debug" -eq 1 ] && procd_append_param command --th-trace
-       [ "$create" -eq 1 ] && procd_append_param command --user root --create
-       [ "$localhost" -eq 1 ] && procd_append_param command --localhost
-       [ "$scgi" -eq 1 ] && procd_append_param command --scgi
-       procd_set_param respawn
-       procd_close_instance
-}
-
-start_service() {
-       config_load 'fossil'
-       config_foreach start_instance 'server'
-}
diff --git a/net/fossil/patches/001-no_https.patch b/net/fossil/patches/001-no_https.patch
deleted file mode 100644 (file)
index cd83ffa..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
---- a/Makefile.classic
-+++ b/Makefile.classic
-@@ -41,9 +41,6 @@
- # FOSSIL_ENABLE_MINIZ = 1
- # TCC += -DFOSSIL_ENABLE_MINIZ
--# To add support for HTTPS
--TCC += -DFOSSIL_ENABLE_SSL
--
- #### We sometimes add the -static option here so that we can build a
- #    static executable that will run in a chroot jail.
- #LIB = -static
-@@ -60,9 +57,6 @@
- # If using zlib:
- LIB += $(ZLIB_LIB.$(FOSSIL_ENABLE_MINIZ)) $(LDFLAGS)
--# If using HTTPS:
--LIB += -lcrypto -lssl
--
- #### Tcl shell for use in running the fossil testsuite.  If you do not
- #    care about testing the end result, this can be blank.
- #
index fa417df5407602f0f440898316b4f2b9dc386775..575568c374ce38ca5fc02f7e0a2a2a6025601d97 100644 (file)
@@ -18,6 +18,7 @@ PKG_HASH:=34c50ac47a683b13eae1a02f2d0263c0bd51a83f01b99c02c5fe25df07a1ee77
 PKG_MAINTAINER:=
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=COPYRIGHT LICENSE
+PKG_CPE_ID:=cpe:/a:freeradius:freeradius
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/freeradius-server-$(PKG_VERSION)
 PKG_FIXUP:=autoreconf
diff --git a/net/frp/Makefile b/net/frp/Makefile
new file mode 100644 (file)
index 0000000..78058ae
--- /dev/null
@@ -0,0 +1,75 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=frp
+PKG_VERSION:=0.29.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/fatedier/frp/tar.gz/v${PKG_VERSION}?
+PKG_HASH:=5d7980b81cfd055e3e5bb7a120098f94342656f647cb906ea075912f63568816
+
+PKG_MAINTAINER:=Richard Yu <yurichard3839@gmail.com>
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_BUILD_DEPENDS:=golang/host
+PKG_BUILD_PARALLEL:=1
+PKG_USE_MIPS16:=0
+
+GO_PKG:=github.com/fatedier/frp
+GO_PKG_BUILD_PKG:=github.com/fatedier/frp/cmd/...
+
+include $(INCLUDE_DIR)/package.mk
+include ../../lang/golang/golang-package.mk
+
+define Package/frp/template
+  SECTION:=net
+  CATEGORY:=Network
+  SUBMENU:=Web Servers/Proxies
+  TITLE:=frp - fast reverse proxy
+  URL:=https://github.com/fatedier/frp
+  DEPENDS:=$(GO_ARCH_DEPENDS)
+endef
+
+define Package/frpc
+  $(call Package/frp/template)
+  TITLE+= (client)
+endef
+
+define Package/frps
+  $(call Package/frp/template)
+  TITLE+= (server)
+endef
+
+define Package/frp/description
+  frp is a fast reverse proxy to help you expose a local server behind
+  a NAT or firewall to the internet.
+endef
+Package/frpc/description = $(Package/frp/description)
+Package/frps/description = $(Package/frp/description)
+
+define Package/frp/install
+       $(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR))
+
+       $(INSTALL_DIR) $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(2) $(1)/usr/bin/
+       $(INSTALL_DIR) $(1)/etc/frp/$(2).d/
+       $(INSTALL_DATA) $(PKG_BUILD_DIR)/conf/$(2)_full.ini $(1)/etc/frp/$(2).d/
+       $(INSTALL_DIR) $(1)/etc/config/
+       $(INSTALL_CONF) ./files/$(2).config $(1)/etc/config/$(2)
+       $(INSTALL_DIR) $(1)/etc/init.d/
+       $(INSTALL_BIN) ./files/$(2).init $(1)/etc/init.d/$(2)
+endef
+
+define Package/frpc/install
+  $(call Package/frp/install,$(1),frpc)
+endef
+
+define Package/frps/install
+  $(call Package/frp/install,$(1),frps)
+endef
+
+$(eval $(call GoBinPackage,frpc))
+$(eval $(call BuildPackage,frpc))
+$(eval $(call GoBinPackage,frps))
+$(eval $(call BuildPackage,frps))
diff --git a/net/frp/files/frpc.config b/net/frp/files/frpc.config
new file mode 100644 (file)
index 0000000..492e224
--- /dev/null
@@ -0,0 +1,23 @@
+config init
+       option stdout 1
+       option stderr 1
+       option user frpc
+       option group frpc
+       option respawn 1
+#      OS environments pass to frp for config file template, see
+#      https://github.com/fatedier/frp#configuration-file-template
+#      list env 'ENV_NAME=value'
+#      Config files include in temporary config file.
+#      list conf_inc '/etc/frp/frpc.d/frpc_full.ini'
+
+config conf 'common'
+       option server_addr 127.0.0.1
+       option server_port 7000
+#      List options with name="_" will be directly appended to config file
+#      list _ '# Key-A=Value-A'
+
+config conf 'ssh'
+       option type tcp
+       option local_ip 127.0.0.1
+       option local_port 22
+       option remote_port 6000
diff --git a/net/frp/files/frpc.init b/net/frp/files/frpc.init
new file mode 100644 (file)
index 0000000..96208d8
--- /dev/null
@@ -0,0 +1,72 @@
+#!/bin/sh /etc/rc.common
+
+START=99
+USE_PROCD=1
+
+NAME=frpc
+PROG=/usr/bin/$NAME
+
+_err() {
+       echo "$*" >&2
+       logger -p daemon.err -t "$NAME" "$*"
+}
+
+config_cb() {
+       [ $# -eq 0 ] && return
+
+       local type="$1"
+       local name="$2"
+       if [ "$type" = "conf" ]; then
+               echo "[$name]" >> "$conf_file"
+               option_cb() {
+                       local option="$1"
+                       local value="$2"
+                       echo "$option = $value" >> "$conf_file"
+               }
+               list_cb() {
+                       local name="$1"
+                       local value="$2"
+                       [ "$name" = "_" ] && echo "$value" >> "$conf_file"
+               }
+       else
+               [ "$type" = "init" ] && init_cfg="$name"
+               option_cb() { return 0; }
+               list_cb() { return 0; }
+       fi
+}
+
+start_service() {
+       local init_cfg=" "
+       local conf_file="/var/etc/$NAME.ini"
+
+       > "$conf_file"
+       config_load "$NAME"
+
+       local stdout stderr user group respawn env conf_inc
+       uci_validate_section "$NAME" init "$init_cfg" \
+               'stdout:bool:1' \
+               'stderr:bool:1' \
+               'user:string' \
+               'group:string' \
+               'respawn:bool:1' \
+               'env:list(string)' \
+               'conf_inc:list(string)'
+
+       local err=$?
+       [ $err -ne 0 ] && {
+               _err "uci_validate_section returned $err"
+               return 1
+       }
+
+       [ -n "$conf_inc" ] && config_list_foreach "$init_cfg" conf_inc cat >> "$conf_file"
+
+       procd_open_instance
+       procd_set_param command "$PROG" -c "$conf_file"
+       procd_set_param stdout $stdout
+       procd_set_param stderr $stderr
+       [ -n "$user" ] && procd_set_param user "$user"
+       [ -n "$group" ] && procd_set_param group "$group"
+       [ $respawn -eq 1 ] && procd_set_param respawn
+       [ -n "$env" ] && config_list_foreach "$init_cfg" env "procd_append_param env"
+       procd_close_instance
+}
diff --git a/net/frp/files/frps.config b/net/frp/files/frps.config
new file mode 100644 (file)
index 0000000..ae0bffc
--- /dev/null
@@ -0,0 +1,16 @@
+config init
+       option stdout 1
+       option stderr 1
+       option user frps
+       option group frps
+       option respawn 1
+#      OS environments pass to frp for config file template, see
+#      https://github.com/fatedier/frp#configuration-file-template
+#      list env 'ENV_NAME=value'
+#      Config files include in temporary config file.
+#      list conf_inc '/etc/frp/frps.d/frps_full.ini'
+
+config conf 'common'
+       option bind_port 7000
+#      List options with name="_" will be directly appended to config file
+#      list _ '# Key-A=Value-A'
diff --git a/net/frp/files/frps.init b/net/frp/files/frps.init
new file mode 100644 (file)
index 0000000..be4e1b8
--- /dev/null
@@ -0,0 +1,72 @@
+#!/bin/sh /etc/rc.common
+
+START=99
+USE_PROCD=1
+
+NAME=frps
+PROG=/usr/bin/$NAME
+
+_err() {
+       echo "$*" >&2
+       logger -p daemon.err -t "$NAME" "$*"
+}
+
+config_cb() {
+       [ $# -eq 0 ] && return
+
+       local type="$1"
+       local name="$2"
+       if [ "$type" = "conf" ]; then
+               echo "[$name]" >> "$conf_file"
+               option_cb() {
+                       local option="$1"
+                       local value="$2"
+                       echo "$option = $value" >> "$conf_file"
+               }
+               list_cb() {
+                       local name="$1"
+                       local value="$2"
+                       [ "$name" = "_" ] && echo "$value" >> "$conf_file"
+               }
+       else
+               [ "$type" = "init" ] && init_cfg="$name"
+               option_cb() { return 0; }
+               list_cb() { return 0; }
+       fi
+}
+
+start_service() {
+       local init_cfg=" "
+       local conf_file="/var/etc/$NAME.ini"
+
+       > "$conf_file"
+       config_load "$NAME"
+
+       local stdout stderr user group respawn env conf_inc
+       uci_validate_section "$NAME" init "$init_cfg" \
+               'stdout:bool:1' \
+               'stderr:bool:1' \
+               'user:string' \
+               'group:string' \
+               'respawn:bool:1' \
+               'env:list(string)' \
+               'conf_inc:list(string)'
+
+       local err=$?
+       [ $err -ne 0 ] && {
+               _err "uci_validate_section returned $err"
+               return 1
+       }
+
+       [ -n "$conf_inc" ] && config_list_foreach "$init_cfg" conf_inc cat >> "$conf_file"
+
+       procd_open_instance
+       procd_set_param command "$PROG" -c "$conf_file"
+       procd_set_param stdout $stdout
+       procd_set_param stderr $stderr
+       [ -n "$user" ] && procd_set_param user "$user"
+       [ -n "$group" ] && procd_set_param group "$group"
+       [ $respawn -eq 1 ] && procd_set_param respawn
+       [ -n "$env" ] && config_list_foreach "$init_cfg" env "procd_append_param env"
+       procd_close_instance
+}
diff --git a/net/frr/Makefile b/net/frr/Makefile
new file mode 100644 (file)
index 0000000..1388e51
--- /dev/null
@@ -0,0 +1,394 @@
+#
+# Copyright (C) 2019 Lucian Cristian <lucian.cristian@gmail.com>
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+PKG_NAME:=frr
+PKG_VERSION:=7.1
+PKG_RELEASE:=2
+
+PKG_SOURCE_URL:=https://github.com/FRRouting/frr/releases/download/$(PKG_NAME)-$(PKG_VERSION)/
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_HASH:=2a4210565e7b41d366f7b9f5f745917d67a0b159f3b6bd49d75f9e730557db2f
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+PKG_MAINTAINER:=Lucian Cristian <lucian.cristian@gmail.com>
+
+PKG_CONFIG_DEPENDS:= \
+       CONFIG_IPV6 \
+       CONFIG_PACKAGE_frr-babeld \
+       CONFIG_PACKAGE_frr-bfdd \
+       CONFIG_PACKAGE_frr-bgpd \
+       CONFIG_PACKAGE_frr-eigrpd \
+       CONFIG_PACKAGE_frr-fabricd \
+       CONFIG_PACKAGE_frr-isisd \
+       CONFIG_PACKAGE_frr-ldpd \
+       CONFIG_PACKAGE_frr-libfrr \
+       CONFIG_PACKAGE_frr-nhrpd \
+       CONFIG_PACKAGE_frr-ospfd \
+       CONFIG_PACKAGE_frr-ospf6d \
+       CONFIG_PACKAGE_frr-pbrd \
+       CONFIG_PACKAGE_frr-pimd \
+       CONFIG_PACKAGE_frr-ripd \
+       CONFIG_PACKAGE_frr-ripngd \
+       CONFIG_PACKAGE_frr-staticd \
+       CONFIG_PACKAGE_frr-vtysh \
+       CONFIG_PACKAGE_frr-watchfrr \
+       CONFIG_PACKAGE_frr-zebra
+
+PKG_BUILD_PARALLEL:=1
+PKG_BUILD_DEPENDS:=python3/host
+PKG_FIXUP:=autoreconf
+PKG_LICENSE:=GPL-2.0
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
+
+define Package/frr/Default
+  SECTION:=net
+  CATEGORY:=Network
+  SUBMENU:=Routing and Redirection
+  DEPENDS:=frr
+  TITLE:=The FRRouting (FRR) Software Routing Suite
+  URL:=https://www.frrouting.org/
+endef
+
+define Package/frr
+  $(call Package/frr/Default)
+  DEPENDS:=+librt
+  MENU:=1
+endef
+
+define Package/frr/description
+  FRRouting is free software that implements and manages various IPv4 and IPv6
+  routing protocols.
+
+  Currently FRRouting supports BGP4, BGP4+, OSPFv2, OSPFv3, RIPv1, RIPv2, RIPng,
+  IS-IS, PIM-SM/MSDP, LDP and Babel as well as very early support for EIGRP and
+  NHRP.
+endef
+
+define Package/frr-babeld
+  $(call Package/frr/Default)
+  DEPENDS+=+frr-libfrr
+  TITLE:=BABEL routing engine
+endef
+
+define Package/frr-bfdd
+  $(call Package/frr/Default)
+  DEPENDS+=+frr-libfrr
+  TITLE:=BFD routing engine
+  CONFLICTS:=bfdd
+endef
+
+define Package/frr-bgpd
+  $(call Package/frr/Default)
+  DEPENDS+=+frr-libfrr
+  TITLE:=BGPv4, BGPv4+, BGPv4- routing engine
+  CONFLICTS:=quagga-bgpd
+endef
+
+define Package/frr-eigrpd
+  $(call Package/frr/Default)
+  DEPENDS+=+frr-libfrr
+  TITLE:=EIGRPD routing engine
+endef
+
+define Package/frr-fabricd
+  $(call Package/frr/Default)
+  DEPENDS+=+frr-libfrr
+  TITLE:=OpenFabric routing engine
+endef
+
+define Package/frr-isisd
+  $(call Package/frr/Default)
+  DEPENDS+=+frr-libfrr
+  TITLE:=IS-IS routing engine
+  CONFLICTS:=quagga-isisd
+endef
+
+define Package/frr-ldpd
+  $(call Package/frr/Default)
+  DEPENDS+=+frr-libfrr
+  TITLE:=LDP routing engine
+endef
+
+define Package/frr-libfrr
+  $(call Package/frr/Default)
+  TITLE:=zebra library
+  DEPENDS+=+libjson-c +libyang
+  CONFLICTS:=quagga-libzebra
+endef
+
+define Package/frr-nhrpd
+  $(call Package/frr/Default)
+  DEPENDS+=+frr-libfrr +libcares
+  TITLE:=NHRP routing engine
+endef
+
+define Package/frr-ospfd
+  $(call Package/frr/Default)
+  DEPENDS+=+frr-libfrr
+  TITLE:=OSPFv2 routing engine
+  CONFLICTS:=quagga-ospfd
+endef
+
+define Package/frr-ospf6d
+  $(call Package/frr/Default)
+  DEPENDS+=+frr-libfrr @IPV6
+  TITLE:=OSPFv3 routing engine
+  CONFLICTS:=quagga-ospf6d
+endef
+
+define Package/frr-pbrd
+  $(call Package/frr/Default)
+  DEPENDS+=+frr-libfrr
+  TITLE:=PBRD routing daemon
+endef
+
+define Package/frr-pimd
+  $(call Package/frr/Default)
+  DEPENDS+=+frr-libfrr
+  TITLE:=PIM routing engine
+endef
+
+define Package/frr-ripd
+  $(call Package/frr/Default)
+  DEPENDS+=+frr-libfrr
+  TITLE:=RIP routing engine
+  CONFLICTS:=quagga-ripd
+endef
+
+define Package/frr-ripngd
+  $(call Package/frr/Default)
+  DEPENDS+=+frr-libfrr @IPV6
+  TITLE:=RIPNG routing engine
+  CONFLICTS:=quagga-ripngd
+endef
+
+define Package/frr-staticd
+  $(call Package/frr/Default)
+  DEPENDS+=+frr-libfrr
+  TITLE:=STATICD routing engine
+endef
+
+define Package/frr-vtysh
+  $(call Package/frr/Default)
+  DEPENDS+=+frr-libfrr +libreadline +libncurses
+  TITLE:=integrated shell for frr routing software
+  CONFLICTS:=quagga-vtysh
+endef
+
+define Package/frr-watchfrr
+  $(call Package/frr/Default)
+  TITLE:=frr watchdog
+  DEPENDS+=+frr-libfrr
+  DEFAULT:=y if PACKAGE_frr
+endef
+
+define Package/frr-zebra
+  $(call Package/frr/Default)
+  TITLE:=Zebra daemon
+  DEPENDS+=+frr-libfrr
+  DEFAULT:=y if PACKAGE_frr
+  CONFLICTS:=quagga-zebra
+endef
+
+define Package/frr-libfrr/conffiles
+/etc/frr/
+endef
+
+define Build/Prepare
+       $(Build/Prepare/Default)
+       mkdir -p $(PKG_BUILD_DIR)/build/lib
+       $(CP) $(PKG_BUILD_DIR)/lib/command.h $(PKG_BUILD_DIR)/build/lib/
+endef
+
+define Build/Configure
+    ( cd $(PKG_BUILD_DIR)/build/ ; \
+    cd build ; \
+    ../configure \
+       --host="$(GNU_TARGET_NAME)" \
+       --build="$(GNU_HOST_NAME)" \
+       CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
+       CXXFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
+       LDFLAGS="$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS)" \
+       HOST_CFLAGS="$(HOST_CFLAGS)" \
+       HOST_LDFLAGS="$(HOST_LDFLAGS)" \
+       BUILD_CPPFLAGS="$(TARGET_CPPLAGS)" \
+       BUILD_CFLAGS="$(TARGET_CFLAGS)" \
+       BUILD_LDFLAGS="$(TARGET_LDFLAGS)" \
+       --prefix=/usr \
+       --enable-shared \
+       --disable-static \
+       --enable-user=network \
+       --enable-group=network \
+       --enable-multipath=16 \
+       --disable-capabilities \
+       --disable-ospfclient \
+       --disable-doc \
+       --disable-backtrace \
+       --with-vtysh-pager=cat \
+       --localstatedir=/var/run/frr \
+       --sysconfdir=/etc/frr/ \
+       $(call autoconf_bool,CONFIG_PACKAGE_frr-babeld,babeld) \
+       $(call autoconf_bool,CONFIG_PACKAGE_frr-bfdd,bfdd) \
+       $(call autoconf_bool,CONFIG_PACKAGE_frr-bgpd,bgpd) \
+       $(call autoconf_bool,CONFIG_PACKAGE_frr-eigrpd,eigrpd) \
+       $(call autoconf_bool,CONFIG_PACKAGE_frr-fabricd,fabricd) \
+       $(call autoconf_bool,CONFIG_PACKAGE_frr-isisd,isisd) \
+       $(call autoconf_bool,CONFIG_PACKAGE_frr-ldpd,ldpd) \
+       $(call autoconf_bool,CONFIG_PACKAGE_frr-nhrpd,nhrpd) \
+       $(call autoconf_bool,CONFIG_PACKAGE_frr-ospfd,ospfd) \
+       $(call autoconf_bool,CONFIG_PACKAGE_frr-ospf6d,ospf6d) \
+       $(call autoconf_bool,CONFIG_PACKAGE_frr-pbrd,pbrd) \
+       $(call autoconf_bool,CONFIG_PACKAGE_frr-pimd,pimd) \
+       $(call autoconf_bool,CONFIG_PACKAGE_frr-staticd,staticd) \
+       $(call autoconf_bool,CONFIG_PACKAGE_frr-ripd,ripd) \
+       $(call autoconf_bool,CONFIG_PACKAGE_frr-ripngd,ripngd) \
+       $(call autoconf_bool,CONFIG_PACKAGE_frr-vtysh,vtysh) \
+       $(call autoconf_bool,CONFIG_PACKAGE_frr-libfrr,zebra) \
+)
+endef
+
+#      just speed it up
+NUM_CORES ?= $(shell grep -c "vendor_id" /proc/cpuinfo)
+
+define Build/Compile
+       $(MAKE) -C $(PKG_BUILD_DIR)/build -j$(NUM_CORES)
+endef
+
+define Package/frr/install
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) ./files/frrcommon.sh $(1)/usr/sbin/
+       $(INSTALL_DIR) $(1)/etc/init.d
+       $(INSTALL_BIN) ./files/frr $(1)/etc/init.d/
+endef
+
+define Package/frr-watchfrr/install
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) ./files/watchfrr.sh $(1)/usr/sbin/
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/watchfrr/.libs/watchfrr $(1)/usr/sbin/
+endef
+
+define Package/frr-zebra/install
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/zebra/.libs/zebra $(1)/usr/sbin/
+endef
+
+define Package/frr-babeld/install
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/babeld/.libs/babeld $(1)/usr/sbin/
+endef
+
+define Package/frr-bfdd/install
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/bfdd/.libs/bfdd $(1)/usr/sbin/
+endef
+
+define Package/frr-bgpd/install
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/bgpd/.libs/bgpd $(1)/usr/sbin/
+endef
+
+define Package/frr-eigrpd/install
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/eigrpd/.libs/eigrpd $(1)/usr/sbin/
+endef
+
+define Package/frr-fabricd/install
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/isisd/.libs/fabricd $(1)/usr/sbin/
+endef
+
+define Package/frr-isisd/install
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/isisd/.libs/isisd $(1)/usr/sbin/
+endef
+
+define Package/frr-ldpd/install
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/ldpd/.libs/ldpd $(1)/usr/sbin/
+endef
+
+define Package/frr-nhrpd/install
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/nhrpd/.libs/nhrpd $(1)/usr/sbin/
+endef
+
+define Package/frr-ospfd/install
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/ospfd/.libs/ospfd $(1)/usr/sbin/
+endef
+
+define Package/frr-ospf6d/install
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/ospf6d/.libs/ospf6d $(1)/usr/sbin/
+endef
+
+define Package/frr-pbrd/install
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/pbrd/.libs/pbrd $(1)/usr/sbin/
+endef
+
+define Package/frr-pimd/install
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/pimd/.libs/pimd $(1)/usr/sbin/
+endef
+
+define Package/frr-ripd/install
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/ripd/.libs/ripd $(1)/usr/sbin/
+endef
+
+define Package/frr-ripngd/install
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/ripngd/.libs/ripngd $(1)/usr/sbin/
+endef
+
+define Package/frr-staticd/install
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/staticd/.libs/staticd $(1)/usr/sbin/
+endef
+
+define Package/frr-vrrpd/install
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/vrrpd/.libs/vrrpd $(1)/usr/sbin/
+endef
+
+define Package/frr-vtysh/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/vtysh/.libs/vtysh $(1)/usr/bin/
+endef
+
+define Package/frr-libfrr/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_BUILD_DIR)/build/lib/.libs/libfrr.so* $(1)/usr/lib/
+       $(INSTALL_DIR) $(1)/etc/frr
+       chmod 0750 $(1)/etc/frr
+       $(INSTALL_CONF) ./files/{frr.conf,daemons} $(1)/etc/frr/
+endef
+
+$(eval $(call HostBuild))
+$(eval $(call BuildPackage,frr))
+$(eval $(call BuildPackage,frr-babeld))
+$(eval $(call BuildPackage,frr-bfdd))
+$(eval $(call BuildPackage,frr-bgpd))
+$(eval $(call BuildPackage,frr-eigrpd))
+$(eval $(call BuildPackage,frr-fabricd))
+$(eval $(call BuildPackage,frr-isisd))
+$(eval $(call BuildPackage,frr-ldpd))
+$(eval $(call BuildPackage,frr-libfrr))
+$(eval $(call BuildPackage,frr-nhrpd))
+$(eval $(call BuildPackage,frr-ospfd))
+$(eval $(call BuildPackage,frr-ospf6d))
+$(eval $(call BuildPackage,frr-pbrd))
+$(eval $(call BuildPackage,frr-pimd))
+$(eval $(call BuildPackage,frr-ripd))
+$(eval $(call BuildPackage,frr-ripngd))
+$(eval $(call BuildPackage,frr-staticd))
+$(eval $(call BuildPackage,frr-vtysh))
+$(eval $(call BuildPackage,frr-watchfrr))
+$(eval $(call BuildPackage,frr-zebra))
diff --git a/net/frr/files/daemons b/net/frr/files/daemons
new file mode 100644 (file)
index 0000000..c3a2064
--- /dev/null
@@ -0,0 +1,54 @@
+# The watchfrr and zebra daemons are always started.
+#
+bgpd=no
+ospfd=no
+#ospfd_instances=1,20
+ospf6d=no
+ripd=no
+ripngd=no
+isisd=no
+pimd=no
+ldpd=no
+nhrpd=no
+eigrpd=no
+babeld=no
+sharpd=no
+pbrd=no
+bfdd=no
+fabricd=no
+vrrpd=no
+
+#
+# If this option is set the /etc/init.d/frr script automatically loads
+# the config via "vtysh -b" when the servers are started.
+# Check /etc/pam.d/frr if you intend to use "vtysh"!
+#
+vtysh_enable=yes
+zebra_options="  -A 127.0.0.1 -s 90000000"
+bgpd_options="   -A 127.0.0.1"
+ospfd_options="  -A 127.0.0.1"
+ospf6d_options=" -A ::1"
+ripd_options="   -A 127.0.0.1"
+ripngd_options=" -A ::1"
+isisd_options="  -A 127.0.0.1"
+pimd_options="   -A 127.0.0.1"
+ldpd_options="   -A 127.0.0.1"
+nhrpd_options="  -A 127.0.0.1"
+eigrpd_options=" -A 127.0.0.1"
+babeld_options=" -A 127.0.0.1"
+sharpd_options=" -A 127.0.0.1"
+pbrd_options="   -A 127.0.0.1"
+staticd_options="-A 127.0.0.1"
+bfdd_options="   -A 127.0.0.1"
+fabricd_options="-A 127.0.0.1"
+vrrpd_options="  -A 127.0.0.1"
+
+# The list of daemons to watch is automatically generated by the init script.
+#watchfrr_options=""
+
+# for debugging purposes, you can specify a "wrap" command to start instead
+# of starting the daemon directly, e.g. to use valgrind on ospfd:
+#   ospfd_wrap="/usr/bin/valgrind"
+# or you can use "all_wrap" for all daemons, e.g. to use perf record:
+#   all_wrap="/usr/bin/perf record --call-graph -"
+# the normal daemon command is added to this at the end.
diff --git a/net/frr/files/frr b/net/frr/files/frr
new file mode 100644 (file)
index 0000000..caeea21
--- /dev/null
@@ -0,0 +1,68 @@
+#!/bin/sh /etc/rc.common
+
+START=95
+
+log_success_msg() {
+        echo "$@"
+}
+log_warning_msg() {
+        echo "$@" >&2
+}
+log_failure_msg() {
+        echo "$@" >&2
+}
+
+self="`dirname $0`"
+if [ -r "$self/frrcommon.sh" ]; then
+       . "$self/frrcommon.sh"
+else
+       . "/usr/sbin/frrcommon.sh"
+fi
+
+
+start() {
+       daemon_list daemons
+       watchfrr_options="$watchfrr_options $daemons"
+       daemon_start watchfrr
+}
+stop() {
+       daemon_stop watchfrr
+       all_stop --reallyall
+       exit ${still_running:-0}
+}
+
+restart() {
+       daemon_stop watchfrr
+       all_stop --reallyall
+
+       daemon_list daemons
+       watchfrr_options="$watchfrr_options $daemons"
+       daemon_start watchfrr
+}
+
+status() {
+       fail=0
+       print_status watchfrr || fail=1
+       all_status || fail=1
+       exit $fail
+}
+
+reload() {
+       if [ ! -x "$RELOAD_SCRIPT" ]; then
+               log_failure_msg "The frr-pythontools package is required for reload functionality."
+               exit 1
+       fi
+
+       # restart watchfrr to pick up added daemons.
+       # NB: This will NOT cause the other daemons to be restarted.
+       daemon_list daemons
+       watchfrr_options="$watchfrr_options $daemons"
+       daemon_stop watchfrr && \
+               daemon_start watchfrr
+
+       NEW_CONFIG_FILE="${2:-$C_PATH/frr.conf}"
+       [ ! -r $NEW_CONFIG_FILE ] && log_failure_msg "Unable to read new configuration file $NEW_CONFIG_FILE" && exit 1
+       "$RELOAD_SCRIPT" --reload "$NEW_CONFIG_FILE"
+       exit $?
+}
+
diff --git a/net/frr/files/frr.conf b/net/frr/files/frr.conf
new file mode 100644 (file)
index 0000000..ee7b442
--- /dev/null
@@ -0,0 +1,22 @@
+password zebra
+!
+!router eigrp 1
+! network 10.0.0.0/8
+! network 192.168.1.0/24
+!
+!router ospf
+!ospf router-id 172.16.0.2
+!network 192.168.1.0/24 area 0
+!neighbor 172.16.0.1
+!
+!router rip
+! network 10.0.0.0/8
+! network 192.168.1.0/24
+!
+log syslog
+!
+access-list vty permit 127.0.0.0/8
+access-list vty deny any
+!
+line vty
+ access-class vty
diff --git a/net/frr/files/frrcommon.sh b/net/frr/files/frrcommon.sh
new file mode 100644 (file)
index 0000000..c125205
--- /dev/null
@@ -0,0 +1,335 @@
+#!/bin/sh
+#
+#
+# This is a "library" of sorts for use by the other FRR shell scripts.  It
+# has most of the daemon start/stop logic, but expects the following shell
+# functions/commands to be provided by the "calling" script:
+#
+#   log_success_msg
+#   log_warning_msg
+#   log_failure_msg
+#
+# (coincidentally, these are LSB standard functions.)
+#
+# Sourcing this file in a shell script will load FRR config variables but
+# not perform any action.  Note there is an "exit 1" if the main config
+# file does not exist.
+#
+# This script should be installed in  /usr/sbin/frrcommon.sh
+
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+D_PATH="/usr/sbin" # /usr/lib/frr
+C_PATH="/etc/frr" # /etc/frr
+V_PATH="/var/run/frr" # /var/run/frr
+VTYSH="/usr/bin/vtysh" # /usr/bin/vtysh
+FRR_USER="network" # frr
+FRR_GROUP="network" # frr
+FRR_VTY_GROUP="" # frrvty
+
+# ORDER MATTERS FOR $DAEMONS!
+# - keep zebra first
+# - watchfrr does NOT belong in this list
+
+DAEMONS="zebra bgpd ripd ripngd ospfd ospf6d isisd babeld pimd ldpd nhrpd eigrpd sharpd pbrd staticd bfdd fabricd vrrpd"
+RELOAD_SCRIPT="$D_PATH/frr-reload.py"
+
+#
+# general helpers
+#
+
+debug() {
+       [ -n "$watchfrr_debug" ] || return 0
+
+       printf '%s %s(%s):' "`date +%Y-%m-%dT%H:%M:%S.%N`" "$0" $$ >&2
+       # this is to show how arguments are split regarding whitespace & co.
+       # (e.g. for use with `debug "message" "$@"`)
+       while [ $# -gt 0 ]; do
+               printf ' "%s"' "$1" >&2
+               shift
+       done
+       printf '\n' >&2
+}
+
+chownfrr() {
+       [ -n "$FRR_USER" ] && chown "$FRR_USER" "$1"
+       [ -n "$FRR_GROUP" ] && chgrp "$FRR_GROUP" "$1"
+}
+
+vtysh_b () {
+       [ "$1" = "watchfrr" ] && return 0
+       [ -r "$C_PATH/frr.conf" ] || return 0
+       if [ -n "$1" ]; then
+               "$VTYSH" -b -n -d "$1"
+       else
+               "$VTYSH" -b -n
+       fi
+}
+
+daemon_inst() {
+       # note this sets global variables ($dmninst, $daemon, $inst)
+       dmninst="$1"
+       daemon="${dmninst%-*}"
+       inst=""
+       [ "$daemon" != "$dmninst" ] && inst="${dmninst#*-}"
+}
+
+daemon_list() {
+       # note $1 and $2 specify names for global variables to be set
+       local enabled disabled evar dvar
+       enabled=""
+       disabled=""
+       evar="$1"
+       dvar="$2"
+
+       for daemon in $DAEMONS; do
+               eval cfg=\$$daemon
+               eval inst=\$${daemon}_instances
+               [ "$daemon" = zebra -o "$daemon" = staticd ] && cfg=yes
+               if [ -n "$cfg" -a "$cfg" != "no" -a "$cfg" != "0" ]; then
+                       if ! daemon_prep "$daemon" "$inst"; then
+                               continue
+                       fi
+                       debug "$daemon enabled"
+                       enabled="$enabled $daemon"
+                       if [ -n "$inst" ]; then
+                               debug "$daemon multi-instance $inst"
+                               oldifs="${IFS}"
+                               IFS="${IFS},"
+                               for i in $inst; do
+                                       enabled="$enabled $daemon-$i"
+                               done
+                               IFS="${oldifs}"
+                       fi
+               else
+                       debug "$daemon disabled"
+                       disabled="$disabled $daemon"
+               fi
+       done
+
+       enabled="${enabled# }"
+       disabled="${disabled# }"
+       [ -z "$evar" ] && echo "$enabled"
+       [ -n "$evar" ] && eval $evar="\"$enabled\""
+       [ -n "$dvar" ] && eval $dvar="\"$disabled\""
+}
+
+#
+# individual daemon management
+#
+
+daemon_prep() {
+       local daemon inst cfg
+       daemon="$1"
+       inst="$2"
+       [ "$daemon" = "watchfrr" ] && return 0
+       [ -x "$D_PATH/$daemon" ] || {
+               log_failure_msg "cannot start $daemon${inst:+ (instance $inst)}: daemon binary not installed"
+               return 1
+       }
+       [ -r "$C_PATH/frr.conf" ] && return 0
+
+       cfg="$C_PATH/$daemon${inst:+-$inst}.conf"
+       if [ ! -r "$cfg" ]; then
+               touch "$cfg"
+               chownfrr "$cfg"
+       fi
+       return 0
+}
+
+daemon_start() {
+       local dmninst daemon inst args instopt wrap bin
+       daemon_inst "$1"
+
+       ulimit -n $MAX_FDS > /dev/null 2> /dev/null
+       daemon_prep "$daemon" "$inst" || return 1
+       if test ! -d "$V_PATH"; then
+               mkdir -p "$V_PATH"
+               chown frr "$V_PATH"
+       fi
+
+       eval wrap="\$${daemon}_wrap"
+       bin="$D_PATH/$daemon"
+       instopt="${inst:+-n $inst}"
+       eval args="\$${daemon}_options"
+
+       if eval "$all_wrap $wrap $bin -d $instopt $args"; then
+               log_success_msg "Started $dmninst"
+               vtysh_b "$daemon"
+       else
+               log_failure_msg "Failed to start $dmninst!"
+       fi
+}
+
+daemon_stop() {
+       local dmninst daemon inst pidfile vtyfile pid cnt fail
+       daemon_inst "$1"
+
+       pidfile="$V_PATH/$daemon${inst:+-$inst}.pid"
+       vtyfile="$V_PATH/$daemon${inst:+-$inst}.vty"
+
+       [ -r "$pidfile" ] || fail="pid file not found"
+       [ -z "$fail" ] && pid="`cat \"$pidfile\"`"
+       [ -z "$fail" -a -z "$pid" ] && fail="pid file is empty"
+       [ -n "$fail" ] || kill -0 "$pid" 2>/dev/null || fail="pid $pid not running"
+
+       if [ -n "$fail" ]; then
+               log_failure_msg "Cannot stop $dmninst: $fail"
+               return 1
+       fi
+
+       debug "kill -2 $pid"
+       kill -2 "$pid"
+       cnt=1200
+       while kill -0 "$pid" 2>/dev/null; do
+               sleep 1
+               [ $(( cnt -= 1 )) -gt 0 ] || break
+       done
+       if kill -0 "$pid" 2>/dev/null; then
+               log_failure_msg "Failed to stop $dmninst, pid $pid still running"
+               still_running=1
+               return 1
+       else
+               log_success_msg "Stopped $dmninst"
+               rm -f "$pidfile"
+               return 0
+       fi
+}
+
+daemon_status() {
+       local dmninst daemon inst pidfile pid fail
+       daemon_inst "$1"
+
+       pidfile="$V_PATH/$daemon${inst:+-$inst}.pid"
+
+       [ -r "$pidfile" ] || return 3
+       pid="`cat \"$pidfile\"`"
+       [ -z "$pid" ] && return 1
+       kill -0 "$pid" 2>/dev/null || return 1
+       return 0
+}
+
+print_status() {
+       daemon_status "$1"
+       rv=$?
+       if [ "$rv" -eq 0 ]; then
+               log_success_msg "Status of $1: running"
+       else
+               log_failure_msg "Status of $1: FAILED"
+       fi
+       return $rv
+}
+
+#
+# all-daemon commands
+#
+
+all_start() {
+       daemon_list daemons
+       for dmninst in $daemons; do
+               daemon_start "$dmninst"
+       done
+}
+
+all_stop() {
+       local pids reversed
+
+       daemon_list daemons disabled
+       [ "$1" = "--reallyall" ] && daemons="$daemons $disabled"
+
+       reversed=""
+       for dmninst in $daemons; do
+               reversed="$dmninst $reversed"
+       done
+
+       for dmninst in $reversed; do
+               daemon_stop "$dmninst" &
+               pids="$pids $!"
+       done
+       for pid in $pids; do
+               wait $pid
+       done
+}
+
+all_status() {
+       local fail
+
+       daemon_list daemons
+       fail=0
+       for dmninst in $daemons; do
+               print_status "$dmninst" || fail=1
+       done
+       return $fail
+}
+
+#
+# config sourcing
+#
+
+load_old_config() {
+       oldcfg="$1"
+       [ -r "$oldcfg" ] || return 0
+       [ -s "$oldcfg" ] || return 0
+       grep -v '^[[:blank:]]*\(#\|$\)' "$oldcfg" > /dev/null || return 0
+
+       log_warning_msg "Reading deprecated $oldcfg.  Please move its settings to $C_PATH/daemons and remove it."
+
+       # save off settings from daemons for the OR below
+       for dmn in $DAEMONS; do eval "_new_$dmn=\${$dmn:-no}"; done
+
+       . "$oldcfg"
+
+       # OR together the daemon enabling options between config files
+       for dmn in $DAEMONS; do eval "test \$_new_$dmn != no && $dmn=\$_new_$dmn; unset _new_$dmn"; done
+}
+
+[ -r "$C_PATH/daemons" ] || {
+       log_failure_msg "cannot run $@: $C_PATH/daemons does not exist"
+       exit 1
+}
+. "$C_PATH/daemons"
+
+load_old_config "$C_PATH/daemons.conf"
+load_old_config "/etc/default/frr"
+load_old_config "/etc/sysconfig/frr"
+
+if { declare -p watchfrr_options 2>/dev/null || true; } | grep -q '^declare \-a'; then
+       log_warning_msg "watchfrr_options contains a bash array value." \
+               "The configured value is intentionally ignored since it is likely wrong." \
+               "Please remove or fix the setting."
+       unset watchfrr_options
+fi
+
+#
+# other defaults and dispatch
+#
+
+frrcommon_main() {
+       local cmd
+
+       debug "frrcommon_main" "$@"
+
+       cmd="$1"
+       shift
+
+       if [ "$1" = "all" -o -z "$1" ]; then
+               case "$cmd" in
+               start)  all_start;;
+               stop)   all_stop;;
+               restart)
+                       all_stop
+                       all_start
+                       ;;
+               *)      $cmd "$@";;
+               esac
+       else
+               case "$cmd" in
+               start)  daemon_start "$@";;
+               stop)   daemon_stop "$@";;
+               restart)
+                       daemon_stop "$@"
+                       daemon_start "$@"
+                       ;;
+               *)      $cmd "$@";;
+               esac
+       fi
+}
diff --git a/net/frr/files/watchfrr.sh b/net/frr/files/watchfrr.sh
new file mode 100644 (file)
index 0000000..aae461c
--- /dev/null
@@ -0,0 +1,35 @@
+#!/bin/sh
+#
+# This is NOT the init script!  This is the watchfrr start/stop/restart
+# command handler, passed to watchfrr with the -s/-r/-k commands.  It is used
+# internally by watchfrr to start the protocol daemons with the appropriate
+# options.
+#
+# This script should be installed in  /usr/sbin/watchfrr.sh
+
+log_success_msg() {
+       :
+}
+
+log_warning_msg() {
+       echo "$@" >&2
+       [ -x /usr/bin/logger ] && echo "$@" \
+               | /usr/bin/logger -t watchfrr.sh -p daemon.warn
+}
+
+log_failure_msg() {
+       echo "$@" >&2
+       [ -x /usr/bin/logger ] && echo "$@" \
+               | /usr/bin/logger -t watchfrr.sh -p daemon.err
+}
+
+self="`dirname $0`"
+if [ -r "$self/frrcommon.sh" ]; then
+       . "$self/frrcommon.sh"
+else
+       . "/usr/sbin/frrcommon.sh"
+fi
+
+chownfrr $V_PATH
+
+frrcommon_main "$@"
diff --git a/net/frr/patches/099-redefine_ethhdr.patch b/net/frr/patches/099-redefine_ethhdr.patch
new file mode 100644 (file)
index 0000000..361ab87
--- /dev/null
@@ -0,0 +1,17 @@
+--- a/lib/prefix.h     2017-12-03 22:02:41.642317377 +0200
++++ b/lib/prefix.h     2017-12-03 22:03:30.011320262 +0200
+@@ -24,12 +24,12 @@
+ #ifdef SUNOS_5
+ #include <sys/ethernet.h>
+-#else
++/*#else
+ #ifdef GNU_LINUX
+ #include <net/ethernet.h>
+ #else
+ #include <netinet/if_ether.h>
+-#endif
++#endif*/
+ #endif
+ #include "sockunion.h"
+ #include "ipaddr.h"
index f48893c284aa6e2af139504c04c1afbb9366dc55..577b586e5a0ca196dad73d60e3aa9b23955dca35 100644 (file)
@@ -9,13 +9,14 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=fwknop
 PKG_VERSION:=2.6.10
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://www.cipherdyne.org/fwknop/download
 PKG_HASH:=f6c09bec97ed8e474a98ae14f9f53e1bcdda33393f20667b6af3fb6bb894ca77
 PKG_MAINTAINER:=Jonathan Bennett <JBennett@incomsystems.biz>
-PKG_LICENSE:=GPLv2+
+PKG_LICENSE:=GPL-2.0-or-later
+PKG_CPE_ID:=cpe:/a:cipherdyne:fwknop
 PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
index 0bca8f56d49cc90f1e356f99cb347c6fe7a01d7d..caef70b9ad4fc88bfddbaa891675ebe524205eb8 100644 (file)
@@ -8,15 +8,15 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=go-ethereum
-PKG_VERSION:=1.8.27
+PKG_VERSION:=1.9.1
 PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/ethereum/go-ethereum/tar.gz/v${PKG_VERSION}?
-PKG_HASH:=45d264106991d0e2a4c34ac5d6539fc9460c768fc70588ea38a25f467039ece8
+PKG_HASH:=7394ae0eeac4b2aafa4bd56eef18c077088770bbce0962b215607b44369a5430
 
 PKG_MAINTAINER:=Mislav Novakovic <mislav.novakovic@sartura.hr>
-PKG_LICENSE:=GPL-3 LGPL-3
+PKG_LICENSE:=GPL-3.0-or-later LGPL-3.0-or-later
 PKG_LICENSE_FILES:=COPYING COPYING.LESSER
 
 PKG_BUILD_DEPENDS:=golang/host
diff --git a/net/geth/patches/010-crypto-bn256-cloudflare-pull-in-upstream-fix-for-Go-.patch b/net/geth/patches/010-crypto-bn256-cloudflare-pull-in-upstream-fix-for-Go-.patch
deleted file mode 100644 (file)
index ee2b096..0000000
+++ /dev/null
@@ -1,127 +0,0 @@
-From 39bd2609ca730b3b628003b3f938aed7d49132ab Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= <peterke@gmail.com>
-Date: Thu, 28 Feb 2019 14:53:44 +0200
-Subject: [PATCH] crypto/bn256/cloudflare: pull in upstream fix for Go 1.12 R18
-
----
- crypto/bn256/cloudflare/mul_arm64.h | 32 ++++++++++++++---------------
- 1 file changed, 16 insertions(+), 16 deletions(-)
-
-diff --git a/crypto/bn256/cloudflare/mul_arm64.h b/crypto/bn256/cloudflare/mul_arm64.h
-index 75d52217311..d405eb8f728 100644
---- a/crypto/bn256/cloudflare/mul_arm64.h
-+++ b/crypto/bn256/cloudflare/mul_arm64.h
-@@ -12,7 +12,7 @@
-       UMULH R1, R8, c4 \
-       ADCS ZR, c4 \
-       \
--      MUL R2, R5, R25 \
-+      MUL R2, R5, R1 \
-       UMULH R2, R5, R26 \
-       MUL R2, R6, R0 \
-       ADDS R0, R26 \
-@@ -24,13 +24,13 @@
-       ADCS R0, R29 \
-       UMULH R2, R8, c5 \
-       ADCS ZR, c5 \
--      ADDS R25, c1 \
-+      ADDS R1, c1 \
-       ADCS R26, c2 \
-       ADCS R27, c3 \
-       ADCS R29, c4 \
-       ADCS  ZR, c5 \
-       \
--      MUL R3, R5, R25 \
-+      MUL R3, R5, R1 \
-       UMULH R3, R5, R26 \
-       MUL R3, R6, R0 \
-       ADDS R0, R26 \
-@@ -42,13 +42,13 @@
-       ADCS R0, R29 \
-       UMULH R3, R8, c6 \
-       ADCS ZR, c6 \
--      ADDS R25, c2 \
-+      ADDS R1, c2 \
-       ADCS R26, c3 \
-       ADCS R27, c4 \
-       ADCS R29, c5 \
-       ADCS  ZR, c6 \
-       \
--      MUL R4, R5, R25 \
-+      MUL R4, R5, R1 \
-       UMULH R4, R5, R26 \
-       MUL R4, R6, R0 \
-       ADDS R0, R26 \
-@@ -60,7 +60,7 @@
-       ADCS R0, R29 \
-       UMULH R4, R8, c7 \
-       ADCS ZR, c7 \
--      ADDS R25, c3 \
-+      ADDS R1, c3 \
-       ADCS R26, c4 \
-       ADCS R27, c5 \
-       ADCS R29, c6 \
-@@ -69,15 +69,15 @@
- #define gfpReduce() \
-       \ // m = (T * N') mod R, store m in R1:R2:R3:R4
-       MOVD ·np+0(SB), R17 \
--      MOVD ·np+8(SB), R18 \
-+      MOVD ·np+8(SB), R25 \
-       MOVD ·np+16(SB), R19 \
-       MOVD ·np+24(SB), R20 \
-       \
-       MUL R9, R17, R1 \
-       UMULH R9, R17, R2 \
--      MUL R9, R18, R0 \
-+      MUL R9, R25, R0 \
-       ADDS R0, R2 \
--      UMULH R9, R18, R3 \
-+      UMULH R9, R25, R3 \
-       MUL R9, R19, R0 \
-       ADCS R0, R3 \
-       UMULH R9, R19, R4 \
-@@ -86,9 +86,9 @@
-       \
-       MUL R10, R17, R21 \
-       UMULH R10, R17, R22 \
--      MUL R10, R18, R0 \
-+      MUL R10, R25, R0 \
-       ADDS R0, R22 \
--      UMULH R10, R18, R23 \
-+      UMULH R10, R25, R23 \
-       MUL R10, R19, R0 \
-       ADCS R0, R23 \
-       ADDS R21, R2 \
-@@ -97,7 +97,7 @@
-       \
-       MUL R11, R17, R21 \
-       UMULH R11, R17, R22 \
--      MUL R11, R18, R0 \
-+      MUL R11, R25, R0 \
-       ADDS R0, R22 \
-       ADDS R21, R3 \
-       ADCS R22, R4 \
-@@ -107,19 +107,19 @@
-       \
-       \ // m * N
-       loadModulus(R5,R6,R7,R8) \
--      mul(R17,R18,R19,R20,R21,R22,R23,R24) \
-+      mul(R17,R25,R19,R20,R21,R22,R23,R24) \
-       \
-       \ // Add the 512-bit intermediate to m*N
--      MOVD  ZR, R25 \
-+      MOVD  ZR, R0 \
-       ADDS  R9, R17 \
--      ADCS R10, R18 \
-+      ADCS R10, R25 \
-       ADCS R11, R19 \
-       ADCS R12, R20 \
-       ADCS R13, R21 \
-       ADCS R14, R22 \
-       ADCS R15, R23 \
-       ADCS R16, R24 \
--      ADCS  ZR, R25 \
-+      ADCS  ZR, R0 \
-       \
-       \ // Our output is R21:R22:R23:R24. Reduce mod p if necessary.
-       SUBS R5, R21, R10 \
index aa7186127b3fd5993b8dfb782f12f69a1a783797..42a1adc3dbfae42331686e8460a2a5754b42728f 100644 (file)
@@ -8,17 +8,19 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=git
-PKG_VERSION:=2.21.0
+PKG_VERSION:=2.22.0
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@KERNEL/software/scm/git/
-PKG_HASH:=8ccb1ce743ee991d91697e163c47c11be4bf81efbdd9fb0b4a7ad77cc0020d28
+PKG_HASH:=159e4b599f8af4612e70b666600a3139541f8bacc18124daf2cbe8d1b934f29f
 
 PKG_INSTALL:=1
 PKG_FIXUP:=autoreconf
 PKG_BUILD_PARALLEL:=1
 
+PKG_CPE_ID:=cpe:/a:git:git
+
 include $(INCLUDE_DIR)/package.mk
 
 define Package/git/Default
index 4edcd9cbafc6dcc4aafda3be08fc53dd6e00c2b2..487ffe8719a1bee5aa686e9d39d2b6b9bf11be16 100644 (file)
@@ -15,6 +15,8 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_HASH:=2166a61b14de19e605b14f4a13a070fbfd5ecd247b6fd725108f111198a2c121
 PKG_SOURCE_URL:=https://codeload.github.com/sitaramc/gitolite/tar.gz/v$(PKG_VERSION)?
 
+PKG_CPE_ID:=cpe:/a:sitaram_chamarty:gitolite
+
 include $(INCLUDE_DIR)/package.mk
 
 define Package/gitolite
index ae98cb7c5ab0c01ea3e262a3d445e0e2d397eb72..a4ed478bfa34f29631208868e70a1ae1f39120fb 100644 (file)
@@ -2,10 +2,10 @@ 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_VERSION:=5fc42cc72b97b22a27d8d6622060a429f7fa9098
+PKG_SOURCE_DATE:=20190728
+PKG_MIRROR_HASH:=44106b73d7077ff8123d9972f6a1f746eca7a4d4e47a623d6576db80bdb97bad
+PKG_RELEASE:=1
 PKG_SOURCE_URL:=https://gnunet.org/git/gnunet-secushare.git
 PKG_SOURCE_PROTO:=git
 PKG_LICENSE:=GPL-3.0
@@ -82,21 +82,21 @@ 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/
+       $(CP) $(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/
+       $(CP) $(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/
+       $(CP) $(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
index be8c46609c7bae90eafea6bd28c43d7bb8360108..e35e6ee8b3fc0cc46a44b35b91ba11de7039a38f 100644 (file)
@@ -2,15 +2,16 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gnunet
 
-PKG_VERSION:=0.11.4
+PKG_VERSION:=0.11.6
 PKG_RELEASE:=1
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@GNU/gnunet
-PKG_HASH:=7afeb638bd8b5a33c6b8dab24b90c5d7467439adc79794ff33218e9180f8b01b
+PKG_HASH:=f8a07063b1e0890a1386fed2313a967f58f5495c075a25725aba200469c857bf
 
 PKG_LICENSE:=AGPL-3.0
 PKG_LICENSE_FILES:=COPYING
 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
+PKG_CPE_ID:=cpe:/a:gnunet:gnunet
 
 PKG_BUILD_PARALLEL:=1
 PKG_FIXUP:=gettext-version
@@ -99,7 +100,7 @@ define BuildComponent
        ( if [ "$(PLUGIN_$(1))" ]; then \
                $(INSTALL_DIR) $$(1)/usr/lib/gnunet ; \
                for plug in $(PLUGIN_$(1)); do \
-                       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/gnunet/libgnunet_plugin_$$$$$$$$plug*.so $$(1)/usr/lib/gnunet ; \
+                       $(CP) $(PKG_INSTALL_DIR)/usr/lib/gnunet/libgnunet_plugin_$$$$$$$$plug*.so $$(1)/usr/lib/gnunet ; \
                done \
        fi )
 
@@ -144,7 +145,7 @@ define Package/gnunet/install
        done )
 
        ( 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 ; \
+               $(CP) $(PKG_INSTALL_DIR)/usr/lib/gnunet/libgnunet_plugin_$$$$plug*.so $(1)/usr/lib/gnunet ; \
        done )
 
        ( for lex in daemon-topology helper-nat-client \
@@ -281,7 +282,7 @@ 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
+PLUGIN_gns-flat:=namecache_flat namestore_flat
 
 PLUGIN_peerstore-flat:=peerstore_flat
 
index f37228dd7c7bb7da4406ad6a17f2e539da5f2793..e2794b7a8a9022d389908d5aa367295ee0f05a30 100644 (file)
@@ -7,7 +7,7 @@ uci -q batch <<EOF
        del gnunet.namestore_heap
        set gnunet.namestore_heap=gnunet-config
        set gnunet.namestore_heap.FILENAME=/etc/gnunet/namestore.flat
-       set gnunet.namestore.DATABASE=heap
+       set gnunet.namestore.DATABASE=flat
        del gnunet.namecache_flat
        set gnunet.namecache_flat=gnunet-config
        set gnunet.namecache_flat.FILENAME=/var/run/gnunet/namecache.flat
index 085e6aad6d5df7ab3d274201a0402b2574055e94..ea4ed8ebfaf09ed5d9a30d5c1862f3a6dbb675d9 100644 (file)
@@ -8,14 +8,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gnurl
-PKG_VERSION:=7.64.1
+PKG_VERSION:=7.65.1
 PKG_RELEASE:=1
 
 PKG_SOURCE_URL:=https://ftp.gnu.org/gnu/gnunet
 
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=8ea67d505e2576f00d8a09485e6c04396af75388c17d77087a140f05e0ca2a96
+PKG_HASH:=37bb87993f9219f4c76195031f1b0311afde157a1b852d54f570e3195ad7af01
 
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=COPYING
index b42bc595831d6aabfb693dca5f61692df57d0d95..6cd2ae16cf48023249d9b9cfc54a6ef476a7dbb8 100644 (file)
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=haproxy
-PKG_VERSION:=1.8.20
+PKG_VERSION:=2.0.7
 PKG_RELEASE:=1
 
-PKG_SOURCE:=haproxy-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://www.haproxy.org/download/1.8/src/
-PKG_HASH:=3228f78d5fe1dfbaccf41bf387e36b08eeef6e16330053cafde5fa303e262b16
-
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://www.haproxy.org/download/2.0/src
+PKG_HASH:=3873cd72028ed1bd2506dd174e01a92620e92683092f34234c96e067dcb113dc
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
-PKG_LICENSE:=GPL-2.0
-MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>, \
+
+PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>, \
                Christian Lachner <gladiac@gmail.com>
+PKG_LICENSE:=GPL-2.0-only
+PKG_LICENSE_FILES:=LICENSE
+PKG_CPE_ID:=cpe:/a:haproxy:haproxy
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -55,7 +57,7 @@ define Package/haproxy/Default/description
 endef
 
 define Package/haproxy
-  DEPENDS+= +libpcre +libltdl +zlib +libpthread +libopenssl +libncursesw +libreadline +libatomic
+  DEPENDS+= +libpcre +libltdl +zlib +libpthread +libopenssl +libncurses +libreadline +libatomic
   TITLE+= (with SSL support)
   VARIANT:=ssl
 $(call Package/haproxy/Default)
@@ -91,10 +93,14 @@ ENABLE_LUA:=y
 ENABLE_REGPARM:=n
 
 ifeq ($(CONFIG_TARGET_x86),y)
-  ENABLE_REGPARM:=y
+       ENABLE_REGPARM:=y
 endif
 
-LINUX_TARGET:=linux2628
+ifeq ($(CONFIG_USE_UCLIBC),y)
+       LINUX_TARGET:=linux-uclibc
+else
+       LINUX_TARGET:=linux-glibc
+endif
 
 ifeq ($(BUILD_VARIANT),ssl)
        ADDON+=USE_OPENSSL=1
@@ -133,14 +139,16 @@ define Build/Compile
                CC="$(TARGET_CC)" \
                PCREDIR="$(STAGING_DIR)/usr/" \
                SMALL_OPTS="-DBUFSIZE=16384 -DMAXREWRITE=1030 -DSYSTEM_MAXCONN=165530" \
-               USE_LINUX_TPROXY=1 USE_LINUX_SPLICE=1 USE_TFO=1 \
-               USE_ZLIB=yes USE_PCRE=1 USE_PCRE_JIT=1 USE_GETADDRINFO=1 \
+               USE_LINUX_TPROXY=1 USE_LINUX_SPLICE=1 USE_TFO=1 USE_NS=1 \
+               USE_ZLIB=1 USE_PCRE=1 USE_PCRE_JIT=1 USE_GETADDRINFO=1 \
+               USE_THREAD=1 USE_PTHREAD_PSHARED=1 \
                VERSION="$(PKG_VERSION)" SUBVERS="-$(PKG_RELEASE)" \
                VERDATE="$(shell date -d @$(SOURCE_DATE_EPOCH) '+%Y/%m/%d')" IGNOREGIT=1 \
                $(ADDON) \
-               CFLAGS="$(TARGET_CFLAGS)" \
+               CFLAGS="$(TARGET_CFLAGS) -fno-strict-aliasing -Wdeclaration-after-statement -fwrapv -Wno-format-truncation -Wno-unused-label -Wno-sign-compare -Wno-unused-parameter -Wno-old-style-declaration -Wno-ignored-qualifiers -Wno-clobbered -Wno-missing-field-initializers -Wno-implicit-fallthrough -Wno-stringop-overflow -Wno-cast-function-type -Wtype-limits -Wshift-negative-value -Wshift-overflow=2 -Wduplicated-cond -Wnull-dereference" \
                LD="$(TARGET_CC)" \
-               LDFLAGS="$(TARGET_LDFLAGS) -latomic"
+               LDFLAGS="$(TARGET_LDFLAGS) -latomic" \
+               EXTRA_OBJS="contrib/prometheus-exporter/service-prometheus.o"
 
        $(MAKE_VARS) $(MAKE) -C $(PKG_BUILD_DIR) \
                DESTDIR="$(PKG_INSTALL_DIR)" \
@@ -152,6 +160,7 @@ define Build/Compile
        $(MAKE_VARS) $(MAKE) -C $(PKG_BUILD_DIR)/contrib/halog \
                DESTDIR="$(PKG_INSTALL_DIR)" \
                $(MAKE_FLAGS) \
+               OPTIMIZE="$(TARGET_CFLAGS)" \
                ADDLIB="-lcrypto" \
                halog
 endef
index a54f5f5ddb67f9cb272d2e28a4d95151b372ef91..ffe5949ca015c24b37df9ec4f986753939d6d020 100644 (file)
@@ -1,6 +1,6 @@
-# Example configuration file for HAProxy 1.3, refer to the url below for
+# Example configuration file for HAProxy 2.0, refer to the url below for
 # a full documentation and examples for configuration:
-# http://haproxy.1wt.eu/download/1.3/doc/configuration.txt
+# https://cbonte.github.io/haproxy-dconv/2.0/configuration.html
 
 
 # Global parameters
@@ -38,6 +38,13 @@ global
        # limits like number of open file descriptors. Default is 1.
        #nbproc 2
 
+# Default parameters
+defaults
+       # Default timeouts
+       timeout connect 5000ms
+       timeout client 50000ms
+       timeout server 50000ms
+
 
 # Example HTTP proxy listener
 listen my_http_proxy
@@ -78,9 +85,9 @@ listen my_smtp_proxy
        # Round robin load balancing over two servers on port 123 forcing
        # the address 192.168.1.1 and port 25 as source.
        balance roundrobin
-  #use next line for transparent proxy, so the servers can see the 
-  #original ip-address and remove source keyword in server definition
-  #source 0.0.0.0 usesrc clientip
+       #use next line for transparent proxy, so the servers can see the 
+       #original ip-address and remove source keyword in server definition
+       #source 0.0.0.0 usesrc clientip
        server server01 192.168.1.10:123 source 192.168.1.1:25
        server server02 192.168.1.20:123 source 192.168.1.1:25
        
index d14b5bf3f4d27659259b554b1551b110918bdbf3..bfb5d6da122fb68755c3a2ec40379225cdc93851 100644 (file)
@@ -1,7 +1,6 @@
 #!/bin/sh
 
 if [ "$ACTION" = add ]; then
-
        /etc/init.d/haproxy enabled && \
                /etc/init.d/haproxy start
 fi
index edda9a3a783e209834295ab3283819bf70e16707..52bc126ac2d1b8a5bd101ddf43d5db078a041763 100644 (file)
@@ -5,6 +5,7 @@ START=99
 STOP=80
 
 SERVICE_USE_PID=1
+EXTRA_COMMANDS="check"
 
 HAPROXY_BIN="/usr/sbin/haproxy"
 HAPROXY_CONFIG="/etc/haproxy.cfg"
@@ -20,6 +21,9 @@ stop() {
 }
 
 reload() {
-       $HAPROXY_BIN -D -q -f $HAPROXY_CONFIG -p $HAPROXY_PID -sf $(cat $HAPROXY_PID | tr "\n" " ")     
-       #$HAPROXY_BIN -D -q -f $HAPROXY_CONFIG -p $HAPROXY_PID -sf $(cat $HAPROXY_PID)
+       $HAPROXY_BIN -D -q -f $HAPROXY_CONFIG -p $HAPROXY_PID -sf $(cat $HAPROXY_PID)
+}
+
+check() {
+        $HAPROXY_BIN -c -q -V -f $HAPROXY_CONFIG
 }
index f4b683ecf0d3c3ba25a55c4ff8d85fe0094b2e1d..8ef123d21c01dd0619933445646bfcf577af486f 100755 (executable)
@@ -1,7 +1,7 @@
-#!/bin/bash
+#!/bin/sh
 
-CLONEURL=http://git.haproxy.org/git/haproxy-1.8.git
-BASE_TAG=v1.8.20
+CLONEURL=https://git.haproxy.org/git/haproxy-2.0.git
+BASE_TAG=v2.0.7
 TMP_REPODIR=tmprepo
 PATCHESDIR=patches
 
@@ -15,10 +15,10 @@ find ${PATCHESDIR} -type f -name "*.patch" -exec rm -f "{}" \;
 i=0
 for cid in $(git -C "${TMP_REPODIR}" rev-list ${BASE_TAG}..HEAD | tac); do
        filename="$(printf "%03d" $i)-$(git -C "${TMP_REPODIR}" log --format=%s -n 1 $cid | sed -e"s/[()']//g" -e's/[^_a-zA-Z0-9+-]\+/-/g' -e's/-$//').patch"
-       printf "Creating ${filename}\n"
-       git -C "${TMP_REPODIR}" show $cid > "${PATCHESDIR}/$filename"
+       printf "Creating %s\n" "${filename}"
+       git -C "${TMP_REPODIR}" show "$cid" > "${PATCHESDIR}/$filename"
        git add "${PATCHESDIR}/$filename"
-       let i++
+       i=$((i+1))
 done
 
 rm -rf "${TMP_REPODIR}"
diff --git a/net/haproxy/patches/000-BUG-MINOR-http-Call-stream_inc_be_http_req_ctr-only-one-time-per-request.patch b/net/haproxy/patches/000-BUG-MINOR-http-Call-stream_inc_be_http_req_ctr-only-one-time-per-request.patch
deleted file mode 100644 (file)
index 4449df1..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-commit cf2f1243373be97249567ffd259e975cc87068b8
-Author: Christopher Faulet <cfaulet@haproxy.com>
-Date:   Mon Apr 29 13:12:02 2019 +0200
-
-    BUG/MINOR: http: Call stream_inc_be_http_req_ctr() only one time per request
-    
-    The function stream_inc_be_http_req_ctr() is called at the beginning of the
-    analysers AN_REQ_HTTP_PROCESS_FE/BE. It as an effect only on the backend. But we
-    must be careful to call it only once. If the processing of HTTP rules is
-    interrupted in the middle, when the analyser is resumed, we must not call it
-    again. Otherwise, the tracked counters of the backend are incremented several
-    times.
-    
-    This bug was reported in github. See issue #74.
-    
-    This fix should be backported as far as 1.6.
-    
-    (cherry picked from commit 1907ccc2f75b78ace1ee4acdfc60d48a76e3decd)
-    Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
-    (cherry picked from commit 319921866ea9ecc46215fea5679abc8efdfcbea5)
-    [cf: HTX part was removed]
-    Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
-
-diff --git a/src/proto_http.c b/src/proto_http.c
-index ccacd6a4..556cabad 100644
---- a/src/proto_http.c
-+++ b/src/proto_http.c
-@@ -3420,8 +3420,10 @@ int http_process_req_common(struct stream *s, struct channel *req, int an_bit, s
-               req->buf->i,
-               req->analysers);
--      /* just in case we have some per-backend tracking */
--      stream_inc_be_http_req_ctr(s);
-+      /* just in case we have some per-backend tracking. Only called the first
-+       * execution of the analyser. */
-+      if (!s->current_rule || s->current_rule_list != &px->http_req_rules)
-+              stream_inc_be_http_req_ctr(s);
-       /* evaluate http-request rules */
-       if (!LIST_ISEMPTY(&px->http_req_rules)) {
diff --git a/net/haproxy/patches/000-BUG-MINOR-stats-Add-a-missing-break-in-a-switch-statement.patch b/net/haproxy/patches/000-BUG-MINOR-stats-Add-a-missing-break-in-a-switch-statement.patch
new file mode 100644 (file)
index 0000000..07874dd
--- /dev/null
@@ -0,0 +1,27 @@
+commit c0104fc33ccf7e843efd37cc033e4c3849a37844
+Author: Christopher Faulet <cfaulet@haproxy.com>
+Date:   Sat Sep 28 10:37:31 2019 +0200
+
+    BUG/MINOR: stats: Add a missing break in a switch statement
+    
+    A break is missing in the switch statement in the function
+    stats_emit_json_data_field(). This bug was introduced in the commit 88a0db28a
+    ("MINOR: stats: Add the support of float fields in stats").
+    
+    This patch fixes the issue #302 and #303. It must be backported to 2.0.
+    
+    (cherry picked from commit 52c91bb72ccf20e75f2f79da6ebe345cb2a768f4)
+    Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
+
+diff --git a/src/stats.c b/src/stats.c
+index 5819f459..9ec5066f 100644
+--- a/src/stats.c
++++ b/src/stats.c
+@@ -399,6 +399,7 @@ int stats_emit_json_data_field(struct buffer *out, const struct field *f)
+                      type = "\"u64\"";
+                      snprintf(buf, sizeof(buf), "%llu",
+                               (unsigned long long) f->u.u64);
++                     break;
+       case FF_FLT:   type = "\"flt\"";
+                      snprintf(buf, sizeof(buf), "%f", f->u.flt);
+                      break;
diff --git a/net/haproxy/patches/001-BUG-MEDIUM-spoe-arg-len-encoded-in-previous-frag-frame-but-len-changed.patch b/net/haproxy/patches/001-BUG-MEDIUM-spoe-arg-len-encoded-in-previous-frag-frame-but-len-changed.patch
deleted file mode 100644 (file)
index 9ef9507..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-commit c1620a52a3def02b4837376385c416c03ca874c4
-Author: Kevin Zhu <ipandtcp@gmail.com>
-Date:   Fri Apr 26 14:00:01 2019 +0800
-
-    BUG/MEDIUM: spoe: arg len encoded in previous frag frame but len changed
-    
-    Fragmented arg will do fetch at every encode time, each fetch may get
-    different result if SMP_F_MAY_CHANGE, for example res.payload, but
-    the length already encoded in first fragment of the frame, that will
-    cause SPOA decode failed and waste resources.
-    
-    This patch must be backported to 1.9 and 1.8.
-    
-    (cherry picked from commit f7f54280c8106e92a55243f5d60f8587e79602d1)
-    Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
-    (cherry picked from commit 3a838e526cdbc00ded5362e66f1ef3a441abc3c1)
-    Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
-
-diff --git a/include/proto/spoe.h b/include/proto/spoe.h
-index 002cf7d7..2cdca10b 100644
---- a/include/proto/spoe.h
-+++ b/include/proto/spoe.h
-@@ -121,7 +121,7 @@ spoe_decode_buffer(char **buf, char *end, char **str, uint64_t *len)
-  * many bytes has been encoded. If <*off> is zero at the end, it means that all
-  * data has been encoded. */
- static inline int
--spoe_encode_data(struct sample *smp, unsigned int *off, char **buf, char *end)
-+spoe_encode_data(unsigned int *len, struct sample *smp, unsigned int *off, char **buf, char *end)
- {
-       char *p = *buf;
-       int   ret;
-@@ -183,15 +183,16 @@ spoe_encode_data(struct sample *smp, unsigned int *off, char **buf, char *end)
-                               ret = spoe_encode_frag_buffer(chk->str, chk->len, &p, end);
-                               if (ret == -1)
-                                       return -1;
-+                              *len = chk->len;
-                       }
-                       else {
-                               /* The sample has been fragmented, encode remaining data */
--                              ret = MIN(chk->len - *off, end - p);
-+                              ret = MIN(*len - *off, end - p);
-                               memcpy(p, chk->str + *off, ret);
-                               p += ret;
-                       }
-                       /* Now update <*off> */
--                      if (ret + *off != chk->len)
-+                      if (ret + *off != *len)
-                               *off += ret;
-                       else
-                               *off = 0;
-diff --git a/include/types/spoe.h b/include/types/spoe.h
-index 53e7200c..cfaa42f8 100644
---- a/include/types/spoe.h
-+++ b/include/types/spoe.h
-@@ -304,6 +304,7 @@ struct spoe_context {
-               struct spoe_message *curmsg;      /* SPOE message from which to resume encoding */
-               struct spoe_arg     *curarg;      /* SPOE arg in <curmsg> from which to resume encoding */
-               unsigned int         curoff;      /* offset in <curarg> from which to resume encoding */
-+              unsigned int         curlen;      /* length of <curarg> need to be encode, for SMP_F_MAY_CHANGE data */
-               unsigned int         flags;       /* SPOE_FRM_FL_* */
-       } frag_ctx; /* Info about fragmented frames, valid on if SPOE_CTX_FL_FRAGMENTED is set */
- };
-diff --git a/src/flt_spoe.c b/src/flt_spoe.c
-index f6109778..0c0b3794 100644
---- a/src/flt_spoe.c
-+++ b/src/flt_spoe.c
-@@ -2172,6 +2172,7 @@ spoe_encode_message(struct stream *s, struct spoe_context *ctx,
-       list_for_each_entry(arg, &msg->args, list) {
-               ctx->frag_ctx.curarg = arg;
-               ctx->frag_ctx.curoff = UINT_MAX;
-+              ctx->frag_ctx.curlen = 0;
-         encode_argument:
-               if (ctx->frag_ctx.curoff != UINT_MAX)
-@@ -2186,7 +2187,7 @@ spoe_encode_message(struct stream *s, struct spoe_context *ctx,
-               /* Fetch the arguement value */
-               smp = sample_process(s->be, s->sess, s, dir|SMP_OPT_FINAL, arg->expr, NULL);
--              ret = spoe_encode_data(smp, &ctx->frag_ctx.curoff, buf, end);
-+              ret = spoe_encode_data(&ctx->frag_ctx.curlen, smp, &ctx->frag_ctx.curoff, buf, end);
-               if (ret == -1 || ctx->frag_ctx.curoff)
-                       goto too_big;
-       }
diff --git a/net/haproxy/patches/001-OPENWRT-add-uclibc-support.patch b/net/haproxy/patches/001-OPENWRT-add-uclibc-support.patch
new file mode 100644 (file)
index 0000000..2757025
--- /dev/null
@@ -0,0 +1,18 @@
+--- a/Makefile
++++ b/Makefile
+@@ -327,6 +327,15 @@ ifeq ($(TARGET),linux-glibc)
+     USE_GETADDRINFO)
+ endif
++# For linux >= 2.6.28 and uclibc
++ifeq ($(TARGET),linux-uclibc)
++  set_target_defaults = $(call default_opts, \
++    USE_POLL USE_TPROXY USE_DL USE_RT USE_NETFILTER                           \
++    USE_CPU_AFFINITY USE_THREAD USE_EPOLL USE_FUTEX USE_LINUX_TPROXY          \
++    USE_ACCEPT4 USE_LINUX_SPLICE USE_PRCTL USE_THREAD_DUMP USE_NS USE_TFO     \
++    USE_GETADDRINFO)
++endif
++
+ # Solaris 8 and above
+ ifeq ($(TARGET),solaris)
+   # We also enable getaddrinfo() which works since solaris 8.
diff --git a/net/haproxy/patches/002-MINOR-spoe-Use-the-sample-context-to-pass-frag_ctx-info-during-encoding.patch b/net/haproxy/patches/002-MINOR-spoe-Use-the-sample-context-to-pass-frag_ctx-info-during-encoding.patch
deleted file mode 100644 (file)
index c26629c..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-commit 72fdff1fdb5b82685dc3d2db23ece042195a0cbd
-Author: Christopher Faulet <cfaulet@haproxy.com>
-Date:   Fri Apr 26 14:30:15 2019 +0200
-
-    MINOR: spoe: Use the sample context to pass frag_ctx info during encoding
-    
-    This simplifies the API and hide the details in the sample. This way, only
-    string and binary are aware of these info, because other types cannot be
-    partially encoded.
-    
-    This patch may be backported to 1.9 and 1.8.
-    
-    (cherry picked from commit 85db3212b87b33f1a39a688546f4f53a5c4ba4da)
-    Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
-    (cherry picked from commit b93366e3ee44f5de93f01569fcdcd602f6d0703f)
-    Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
-
-diff --git a/include/proto/spoe.h b/include/proto/spoe.h
-index 2cdca10b..cce13e50 100644
---- a/include/proto/spoe.h
-+++ b/include/proto/spoe.h
-@@ -117,11 +117,9 @@ spoe_decode_buffer(char **buf, char *end, char **str, uint64_t *len)
-  *
-  * If the value is too big to be encoded, depending on its type, then encoding
-  * failed or the value is partially encoded. Only strings and binaries can be
-- * partially encoded. In this case, the offset <*off> is updated to known how
-- * many bytes has been encoded. If <*off> is zero at the end, it means that all
-- * data has been encoded. */
-+ * partially encoded. */
- static inline int
--spoe_encode_data(unsigned int *len, struct sample *smp, unsigned int *off, char **buf, char *end)
-+spoe_encode_data(struct sample *smp, char **buf, char *end)
- {
-       char *p = *buf;
-       int   ret;
-@@ -164,12 +162,16 @@ spoe_encode_data(unsigned int *len, struct sample *smp, unsigned int *off, char
-               case SMP_T_STR:
-               case SMP_T_BIN: {
-+                      /* If defined, get length and offset of the sample by reading the sample
-+                       * context. ctx.a[0] is the pointer to the length and ctx.a[1] is the
-+                       * pointer to the offset. If the offset is greater than 0, it means the
-+                       * sample is partially encoded. In this case, we only need to encode the
-+                       * reamining. When all the sample is encoded, the offset is reset to 0.
-+                       * So the caller know it can try to encode the next sample. */
-                       struct chunk *chk = &smp->data.u.str;
-+                      unsigned int *len  = (smp->ctx.a[0] ? smp->ctx.a[0] : 0);
-+                      unsigned int *off  = (smp->ctx.a[1] ? smp->ctx.a[1] : 0);
--                      /* Here, we need to know if the sample has already been
--                       * partially encoded. If yes, we only need to encode the
--                       * remaining, <*off> reprensenting the number of bytes
--                       * already encoded. */
-                       if (!*off) {
-                               /* First evaluation of the sample : encode the
-                                * type (string or binary), the buffer length
-diff --git a/src/flt_spoe.c b/src/flt_spoe.c
-index 0c0b3794..66d8b045 100644
---- a/src/flt_spoe.c
-+++ b/src/flt_spoe.c
-@@ -2187,7 +2187,9 @@ spoe_encode_message(struct stream *s, struct spoe_context *ctx,
-               /* Fetch the arguement value */
-               smp = sample_process(s->be, s->sess, s, dir|SMP_OPT_FINAL, arg->expr, NULL);
--              ret = spoe_encode_data(&ctx->frag_ctx.curlen, smp, &ctx->frag_ctx.curoff, buf, end);
-+              smp->ctx.a[0] = &ctx->frag_ctx.curlen;
-+              smp->ctx.a[1] = &ctx->frag_ctx.curoff;
-+              ret = spoe_encode_data(smp, buf, end);
-               if (ret == -1 || ctx->frag_ctx.curoff)
-                       goto too_big;
-       }
diff --git a/net/haproxy/patches/002-OPENWRT-openssl-deprecated.patch b/net/haproxy/patches/002-OPENWRT-openssl-deprecated.patch
new file mode 100644 (file)
index 0000000..541077e
--- /dev/null
@@ -0,0 +1,12 @@
+--- a/include/common/openssl-compat.h
++++ b/include/common/openssl-compat.h
+@@ -217,7 +217,8 @@ static inline int EVP_PKEY_base_id(EVP_PKEY *pkey)
+ #define TLSEXT_signature_ecdsa      3
+ #endif
+-#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || (LIBRESSL_VERSION_NUMBER < 0x20700000L)
++#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || \
++      (defined(LIBRESSL_VERSION_NUMBER) && (LIBRESSL_VERSION_NUMBER < 0x20700000L))
+ #define X509_getm_notBefore     X509_get_notBefore
+ #define X509_getm_notAfter      X509_get_notAfter
+ #endif
diff --git a/net/haproxy/patches/003-DOC-contrib-modsecurity-Typos-and-fix-the-reject-example.patch b/net/haproxy/patches/003-DOC-contrib-modsecurity-Typos-and-fix-the-reject-example.patch
deleted file mode 100644 (file)
index 514c4c5..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-commit dfc3718f0a302ea3deb5f1a325d35fce0e4cfa48
-Author: Yann Cézard <ycezard@viareport.com>
-Date:   Thu Apr 25 14:48:38 2019 +0200
-
-    DOC: contrib/modsecurity: Typos and fix the reject example
-    
-    Thanks to https://www.mail-archive.com/haproxy@formilux.org/msg30056.html
-    
-    This patch may be backported to 1.9 and 1.8.
-    
-    (cherry picked from commit 494ddbff478d880e48de490f2689607addac70bc)
-    Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
-    (cherry picked from commit 850896603086877641272d6e4075e66bd91f2e50)
-    Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
-
-diff --git a/contrib/modsecurity/README b/contrib/modsecurity/README
-index e6cb305e..8031389d 100644
---- a/contrib/modsecurity/README
-+++ b/contrib/modsecurity/README
-@@ -88,15 +88,15 @@ HAProxy configuration. For example:
-       balance roundrobin
-       timeout connect 5s
-       timeout server  3m
--      server iprep1 127.0.0.1:12345
-+      server modsec1 127.0.0.1:12345
- The modsecurity action is returned in a variable called txn.modsec.code. It
- contains the HTTP returned code. If the variable contains 0, the request is
- clean.
--   tcp-request content reject if { var(txn.modsec.code) -m int gt 0 }
-+   http-request deny if { var(txn.modsec.code) -m int gt 0 }
--With this rule, all the request not clean are reected.
-+With this rule, all the request not clean are rejected.
-   Known bugs, limitations and TODO list
diff --git a/net/haproxy/patches/004-BUG-MEDIUM-contrib-modsecurity-If-host-header-is-NULL-dont-try-to-strdup-it.patch b/net/haproxy/patches/004-BUG-MEDIUM-contrib-modsecurity-If-host-header-is-NULL-dont-try-to-strdup-it.patch
deleted file mode 100644 (file)
index af49cc2..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-commit 95cf225d099dcb49eefcf4f5b648be604414ae0c
-Author: Yann Cézard <ycezard@viareport.com>
-Date:   Thu Apr 25 14:30:23 2019 +0200
-
-    BUG/MEDIUM: contrib/modsecurity: If host header is NULL, don't try to strdup it
-    
-    I discovered this bug when running OWASP regression tests against HAProxy +
-    modsecurity-spoa (it's a POC to evaluate how it is working).  I found out that
-    modsecurity spoa will crash when the request doesn't have any Host header.
-    
-    See the pull request #86 on github for details.
-    
-    This patch must be backported to 1.9 and 1.8.
-    
-    (cherry picked from commit bf60f6b8033deddc86de5357d6099c7593fe44cc)
-    Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
-    (cherry picked from commit d988e3dddcbe1f48f3b24d1bb529fc9ecefde180)
-    Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
-
-diff --git a/contrib/modsecurity/modsec_wrapper.c b/contrib/modsecurity/modsec_wrapper.c
-index 271ec15d..2f3987b4 100644
---- a/contrib/modsecurity/modsec_wrapper.c
-+++ b/contrib/modsecurity/modsec_wrapper.c
-@@ -325,7 +325,11 @@ int modsecurity_process(struct worker *worker, struct modsecurity_parameters *pa
-       req->content_type = apr_table_get(req->headers_in, "Content-Type");
-       req->content_encoding = apr_table_get(req->headers_in, "Content-Encoding");
-       req->hostname = apr_table_get(req->headers_in, "Host");
--      req->parsed_uri.hostname = chunk_strdup(req, req->hostname, strlen(req->hostname));
-+      if (req->hostname != NULL) {
-+              req->parsed_uri.hostname = chunk_strdup(req, req->hostname, strlen(req->hostname));
-+      } else {
-+              req->parsed_uri.hostname = NULL;
-+      }
-       lang = apr_table_get(req->headers_in, "Content-Languages");
-       if (lang != NULL) {
diff --git a/net/haproxy/patches/005-MINOR-examples-Use-right-locale-for-the-last-changelog-date-in-haproxy-spec.patch b/net/haproxy/patches/005-MINOR-examples-Use-right-locale-for-the-last-changelog-date-in-haproxy-spec.patch
deleted file mode 100644 (file)
index 310dc0f..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-commit 86860896dc1841eb59cb95832d76a8093e8dc8c5
-Author: Christopher Faulet <cfaulet@haproxy.com>
-Date:   Tue Apr 30 10:55:38 2019 +0200
-
-    MINOR: examples: Use right locale for the last changelog date in haproxy.spec
-    
-    The last changelog entry was stamped with the wrong locale.
-    
-    No need to backport, it is specific to 1.8
-
-diff --git a/examples/haproxy.spec b/examples/haproxy.spec
-index f3e0c7e0..fe5215d7 100644
---- a/examples/haproxy.spec
-+++ b/examples/haproxy.spec
-@@ -74,7 +74,7 @@ fi
- %attr(0755,root,root) %config %{_sysconfdir}/rc.d/init.d/%{name}
- %changelog
--* jeu. avril 25 2019 Christopher Faulet <cfaulet@haproxy.com>
-+* Thu Apr 25 2019 Christopher Faulet <cfaulet@haproxy.com>
- - updated to 1.8.20
- * Mon Feb 11 2019 Willy Tarreau <w@1wt.eu>
diff --git a/net/haproxy/patches/006-BUG-MAJOR-map-acl-real-fix-segfault-during-show-map-acl-on-CLI.patch b/net/haproxy/patches/006-BUG-MAJOR-map-acl-real-fix-segfault-during-show-map-acl-on-CLI.patch
deleted file mode 100644 (file)
index e961294..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-commit 83af1f6b65806982640679823228976deebf5202
-Author: Willy Tarreau <w@1wt.eu>
-Date:   Tue Apr 30 11:43:43 2019 +0200
-
-    BUG/MAJOR: map/acl: real fix segfault during show map/acl on CLI
-    
-    A previous commit 8d85aa44d ("BUG/MAJOR: map: fix segfault during
-    'show map/acl' on cli.") was provided to address a concurrency issue
-    between "show acl" and "clear acl" on the CLI. Sadly the code placed
-    there was copy-pasted without changing the element type (which was
-    struct stream in the original code) and not tested since the crash
-    is still present.
-    
-    The reproducer is simple : load a large ACL file (e.g. geolocation
-    addresses), issue "show acl #0" in loops in one window and issue a
-    "clear acl #0" in the other one, haproxy crashes.
-    
-    This fix was also tested with threads enabled and looks good since
-    the locking seems to work correctly in these areas though. It will
-    have to be backported as far as 1.6 since the commit above went
-    that far as well...
-    
-    (cherry picked from commit 49ee3b2f9a9e5d0b8d394938df527aa645ce72b4)
-    Signed-off-by: Willy Tarreau <w@1wt.eu>
-    (cherry picked from commit ac4be10f62ef72962d9cf0e6f2619e1e1c370d62)
-    Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
-
-diff --git a/src/pattern.c b/src/pattern.c
-index 7eea9d96..21639569 100644
---- a/src/pattern.c
-+++ b/src/pattern.c
-@@ -1651,7 +1651,7 @@ int pat_ref_delete_by_id(struct pat_ref *ref, struct pat_ref_elt *refelt)
-                               LIST_DEL(&bref->users);
-                               LIST_INIT(&bref->users);
-                               if (elt->list.n != &ref->head)
--                                      LIST_ADDQ(&LIST_ELEM(elt->list.n, struct stream *, list)->back_refs, &bref->users);
-+                                      LIST_ADDQ(&LIST_ELEM(elt->list.n, typeof(elt), list)->back_refs, &bref->users);
-                               bref->ref = elt->list.n;
-                       }
-                       list_for_each_entry(expr, &ref->pat, list)
-@@ -1691,7 +1691,7 @@ int pat_ref_delete(struct pat_ref *ref, const char *key)
-                               LIST_DEL(&bref->users);
-                               LIST_INIT(&bref->users);
-                               if (elt->list.n != &ref->head)
--                                      LIST_ADDQ(&LIST_ELEM(elt->list.n, struct stream *, list)->back_refs, &bref->users);
-+                                      LIST_ADDQ(&LIST_ELEM(elt->list.n, typeof(elt), list)->back_refs, &bref->users);
-                               bref->ref = elt->list.n;
-                       }
-                       list_for_each_entry(expr, &ref->pat, list)
-@@ -2086,7 +2086,7 @@ void pat_ref_reload(struct pat_ref *ref, struct pat_ref *replace)
-                       LIST_DEL(&bref->users);
-                       LIST_INIT(&bref->users);
-                       if (elt->list.n != &ref->head)
--                              LIST_ADDQ(&LIST_ELEM(elt->list.n, struct stream *, list)->back_refs, &bref->users);
-+                              LIST_ADDQ(&LIST_ELEM(elt->list.n, typeof(elt), list)->back_refs, &bref->users);
-                       bref->ref = elt->list.n;
-               }
-               LIST_DEL(&elt->list);
-@@ -2175,7 +2175,7 @@ void pat_ref_prune(struct pat_ref *ref)
-                       LIST_DEL(&bref->users);
-                       LIST_INIT(&bref->users);
-                       if (elt->list.n != &ref->head)
--                              LIST_ADDQ(&LIST_ELEM(elt->list.n, struct stream *, list)->back_refs, &bref->users);
-+                              LIST_ADDQ(&LIST_ELEM(elt->list.n, typeof(elt), list)->back_refs, &bref->users);
-                       bref->ref = elt->list.n;
-               }
-               LIST_DEL(&elt->list);
diff --git a/net/haproxy/patches/007-BUG-MEDIUM-listener-Fix-how-unlimited-number-of-consecutive-accepts-is-handled.patch b/net/haproxy/patches/007-BUG-MEDIUM-listener-Fix-how-unlimited-number-of-consecutive-accepts-is-handled.patch
deleted file mode 100644 (file)
index e54c530..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-commit 7bd7a8d2b8889f604b807c21190d2e70328d6674
-Author: Christopher Faulet <cfaulet@haproxy.com>
-Date:   Tue Apr 30 12:17:13 2019 +0200
-
-    BUG/MEDIUM: listener: Fix how unlimited number of consecutive accepts is handled
-    
-    There is a bug when global.tune.maxaccept is set to -1 (no limit). It is pretty
-    visible with one process (nbproc sets to 1). The functions listener_accept() and
-    accept_queue_process() don't expect to handle negative maxaccept values. So
-    instead of accepting incoming connections without any limit, none are never
-    accepted and HAProxy loop infinitly in the scheduler.
-    
-    When there are 2 or more processes, the bug is a bit more subtile. The limit for
-    a listener is set to 1. So only one connection is accepted at a time by a given
-    listener. This happens because the listener's maxaccept value is an unsigned
-    integer. In check_config_validity(), it is first set to UINT_MAX (-1 casted in
-    an unsigned integer), and then some calculations on it leads to an integer
-    overflow.
-    
-    To fix the bug, the listener's maxaccept value is now a signed integer. So, if a
-    negative value is set for global.tune.maxaccept, we keep it untouched for the
-    listener and no calculation is made on it. Then, in the listener code, this
-    signed value is casted to a unsigned one. It simplifies all tests instead of
-    dealing with negative values. So, it limits the number of connections accepted
-    at a time to UINT_MAX at most. But, honestly, it not an issue.
-    
-    This patch must be backported to 1.9 and 1.8.
-    
-    (cherry picked from commit 102854cbbaa4d22466dddec9035d411db244082f)
-    Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
-    (cherry picked from commit bca4fb2d9d7f2966d9f8270fa1796fdc0dfc866d)
-    Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
-
-diff --git a/include/types/listener.h b/include/types/listener.h
-index ea2eadb5..16ef6d7a 100644
---- a/include/types/listener.h
-+++ b/include/types/listener.h
-@@ -196,7 +196,7 @@ struct listener {
-       int nbconn;                     /* current number of connections on this listener */
-       int maxconn;                    /* maximum connections allowed on this listener */
-       unsigned int backlog;           /* if set, listen backlog */
--      unsigned int maxaccept;         /* if set, max number of connections accepted at once */
-+      int maxaccept;         /* if set, max number of connections accepted at once (-1 when disabled) */
-       struct list proto_list;         /* list in the protocol header */
-       int (*accept)(struct listener *l, int fd, struct sockaddr_storage *addr); /* upper layer's accept() */
-       enum obj_type *default_target;  /* default target to use for accepted sessions or NULL */
-diff --git a/src/listener.c b/src/listener.c
-index 821c931a..74990c45 100644
---- a/src/listener.c
-+++ b/src/listener.c
-@@ -406,7 +406,7 @@ void listener_accept(int fd)
- {
-       struct listener *l = fdtab[fd].owner;
-       struct proxy *p;
--      int max_accept;
-+      unsigned int max_accept;
-       int next_conn = 0;
-       int next_feconn = 0;
-       int next_actconn = 0;
-@@ -420,6 +420,10 @@ void listener_accept(int fd)
-       if (!l)
-               return;
-       p = l->bind_conf->frontend;
-+
-+      /* if l->maxaccept is -1, then max_accept is UINT_MAX. It is not really
-+       * illimited, but it is probably enough.
-+       */
-       max_accept = l->maxaccept ? l->maxaccept : 1;
-       if (!(l->options & LI_O_UNLIMITED) && global.sps_lim) {
-@@ -480,7 +484,7 @@ void listener_accept(int fd)
-        * worst case. If we fail due to system limits or temporary resource
-        * shortage, we try again 100ms later in the worst case.
-        */
--      for (; max_accept-- > 0; next_conn = next_feconn = next_actconn = 0) {
-+      for (; max_accept; next_conn = next_feconn = next_actconn = 0, max_accept--) {
-               struct sockaddr_storage addr;
-               socklen_t laddr = sizeof(addr);
-               unsigned int count;
diff --git a/net/haproxy/patches/008-MINOR-config-Test-validity-of-tune-maxaccept-during-the-config-parsing.patch b/net/haproxy/patches/008-MINOR-config-Test-validity-of-tune-maxaccept-during-the-config-parsing.patch
deleted file mode 100644 (file)
index 5c5d889..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-commit 6e580b6e744011e87c337ebe2c082acfd5ca835a
-Author: Christopher Faulet <cfaulet@haproxy.com>
-Date:   Tue Apr 30 14:03:56 2019 +0200
-
-    MINOR: config: Test validity of tune.maxaccept during the config parsing
-    
-    Only -1 and positive integers from 0 to INT_MAX are accepted. An error is
-    triggered during the config parsing for any other values.
-    
-    This patch may be backported to all supported versions.
-    
-    (cherry picked from commit 6b02ab87348090efec73b1dd24f414239669f279)
-    Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
-    (cherry picked from commit 2bbc40f8bc9a52ba0d03b25270ac0129cca29bba)
-    Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
-
-diff --git a/src/cfgparse.c b/src/cfgparse.c
-index c178538b..8e325416 100644
---- a/src/cfgparse.c
-+++ b/src/cfgparse.c
-@@ -789,6 +789,8 @@ int cfg_parse_global(const char *file, int linenum, char **args, int kwm)
-               global.tune.maxpollevents = atol(args[1]);
-       }
-       else if (!strcmp(args[0], "tune.maxaccept")) {
-+              long max;
-+
-               if (alertif_too_many_args(1, file, linenum, args, &err_code))
-                       goto out;
-               if (global.tune.maxaccept != 0) {
-@@ -801,7 +803,13 @@ int cfg_parse_global(const char *file, int linenum, char **args, int kwm)
-                       err_code |= ERR_ALERT | ERR_FATAL;
-                       goto out;
-               }
--              global.tune.maxaccept = atol(args[1]);
-+              max = atol(args[1]);
-+              if (/*max < -1 || */max > INT_MAX) {
-+                      ha_alert("parsing [%s:%d] : '%s' expects -1 or an integer from 0 to INT_MAX.\n", file, linenum, args[0]);
-+                      err_code |= ERR_ALERT | ERR_FATAL;
-+                      goto out;
-+              }
-+              global.tune.maxaccept = max;
-       }
-       else if (!strcmp(args[0], "tune.chksize")) {
-               if (alertif_too_many_args(1, file, linenum, args, &err_code))
diff --git a/net/haproxy/patches/009-CLEANUP-config-Dont-alter-listener--maxaccept-when-nbproc-is-set-to-1.patch b/net/haproxy/patches/009-CLEANUP-config-Dont-alter-listener--maxaccept-when-nbproc-is-set-to-1.patch
deleted file mode 100644 (file)
index 4bcae44..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-commit c6e03c1495fa51f9a98ed0bbe3230313c7c7201c
-Author: Christopher Faulet <cfaulet@haproxy.com>
-Date:   Tue Apr 30 14:08:41 2019 +0200
-
-    CLEANUP: config: Don't alter listener->maxaccept when nbproc is set to 1
-    
-    This patch only removes a useless calculation on listener->maxaccept when nbproc
-    is set to 1. Indeed, the following formula has no effet in such case:
-    
-      listener->maxaccept = (listener->maxaccept + nbproc - 1) / nbproc;
-    
-    This patch may be backported as far as 1.5.
-    
-    (cherry picked from commit 02f3cf19ed803d20aff9294ce7cb732489951ff5)
-    Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
-    (cherry picked from commit 14203e3cf9404e57de5e274b453f0fe4f2174924)
-    Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
-
-diff --git a/src/cfgparse.c b/src/cfgparse.c
-index 8e325416..3f6ea352 100644
---- a/src/cfgparse.c
-+++ b/src/cfgparse.c
-@@ -9018,9 +9018,8 @@ out_uri_auth_compat:
-                        * is bound to. Rememeber that maxaccept = -1 must be kept as it is
-                        * used to disable the limit.
-                        */
--                      if (listener->maxaccept > 0) {
--                              if (nbproc > 1)
--                                      listener->maxaccept = (listener->maxaccept + 1) / 2;
-+                      if (listener->maxaccept > 0 && nbproc > 1) {
-+                              listener->maxaccept = (listener->maxaccept + 1) / 2;
-                               listener->maxaccept = (listener->maxaccept + nbproc - 1) / nbproc;
-                       }
diff --git a/net/haproxy/patches/010-MINOR-threads-Implement-HA_ATOMIC_LOAD.patch b/net/haproxy/patches/010-MINOR-threads-Implement-HA_ATOMIC_LOAD.patch
deleted file mode 100644 (file)
index 30e8cd4..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-commit f95cf6ad70565ee2322cf23bc519b7bb0b3831b2
-Author: Olivier Houchard <ohouchard@haproxy.com>
-Date:   Tue Apr 30 13:38:02 2019 +0200
-
-    MINOR: threads: Implement HA_ATOMIC_LOAD().
-    
-    The same way we have HA_ATOMIC_STORE(), implement HA_ATOMIC_LOAD().
-    
-    This should be backported to 1.8 and 1.9, as we need it for a bug fix
-    in port ranges.
-    
-    (cherry picked from commit 9ce62b5498b27fbf4217d9c25779d5b2ceca23f2)
-    Signed-off-by: Olivier Houchard <cognet@ci0.org>
-    (cherry picked from commit 358c979611370fa2bc3b8e47ed50a325cf9126cf)
-    Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
-
-diff --git a/include/common/hathreads.h b/include/common/hathreads.h
-index 8134839a..11d7cab6 100644
---- a/include/common/hathreads.h
-+++ b/include/common/hathreads.h
-@@ -62,6 +62,7 @@ enum { tid = 0 };
-               *(val) = new;                                           \
-               __old_xchg;                                             \
-       })
-+#define HA_ATOMIC_LOAD(val)          *(val)
- #define HA_ATOMIC_STORE(val, new)    ({*(val) = new;})
- #define HA_ATOMIC_UPDATE_MAX(val, new)                                        \
-       ({                                                              \
-@@ -203,6 +204,16 @@ static inline unsigned long thread_isolated()
-               } while (!__sync_bool_compare_and_swap(__val_xchg, __old_xchg, __new_xchg)); \
-               __old_xchg;                                             \
-       })
-+
-+#define HA_ATOMIC_LOAD(val)                                             \
-+        ({                                                              \
-+              typeof(*(val)) ret;                                     \
-+              __sync_synchronize();                                   \
-+              ret = *(volatile typeof(val))val;                       \
-+              __sync_synchronize();                                   \
-+              ret;                                                    \
-+      })
-+
- #define HA_ATOMIC_STORE(val, new)                                     \
-       ({                                                              \
-               typeof((val)) __val_store = (val);                      \
-@@ -221,6 +232,8 @@ static inline unsigned long thread_isolated()
- #define HA_ATOMIC_OR(val, flags)     __atomic_or_fetch(val,  flags, __ATOMIC_SEQ_CST)
- #define HA_ATOMIC_XCHG(val, new)     __atomic_exchange_n(val, new, __ATOMIC_SEQ_CST)
- #define HA_ATOMIC_STORE(val, new)    __atomic_store_n(val, new, __ATOMIC_SEQ_CST)
-+#define HA_ATOMIC_LOAD(val)          __atomic_load_n(val, __ATOMIC_SEQ_CST)
-+
- #endif
- #define HA_ATOMIC_UPDATE_MAX(val, new)                                        \
diff --git a/net/haproxy/patches/011-BUG-MEDIUM-port_range-Make-the-ring-buffer-lock-free.patch b/net/haproxy/patches/011-BUG-MEDIUM-port_range-Make-the-ring-buffer-lock-free.patch
deleted file mode 100644 (file)
index 68332fd..0000000
+++ /dev/null
@@ -1,116 +0,0 @@
-commit 31470e2ba2aabb4c6340fbc15cb5486ceb8c69c8
-Author: Olivier Houchard <ohouchard@haproxy.com>
-Date:   Mon Apr 29 18:52:06 2019 +0200
-
-    BUG/MEDIUM: port_range: Make the ring buffer lock-free.
-    
-    Port range uses a ring buffer, and unfortunately, when making haproxy
-    multithreaded, it's been overlooked, and the ring buffer is not thread-safe.
-    When specifying a source range, 2 or more threads could pick the same
-    port, and of course only one of them could use the port, the others would
-    always fail the connection.
-    To fix this, make it a lock-free ring buffer. This is easier than usual
-    because we know the ring buffer can never be full.
-    
-    This should be backported to 1.8 and 1.9.
-    
-    (cherry picked from commit 07425de71777b688e77a9c70a7088c13e66e41e9)
-    Signed-off-by: Olivier Houchard <cognet@ci0.org>
-    (cherry picked from commit bffb51147a4a5939e344b3c838628f9a944febef)
-    Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
-
-diff --git a/include/proto/port_range.h b/include/proto/port_range.h
-index 8c63faca..f7e3f1d5 100644
---- a/include/proto/port_range.h
-+++ b/include/proto/port_range.h
-@@ -24,18 +24,22 @@
- #include <types/port_range.h>
-+#define GET_NEXT_OFF(range, off) ((off) == (range)->size - 1 ? 0 : (off) + 1)
-+
- /* return an available port from range <range>, or zero if none is left */
- static inline int port_range_alloc_port(struct port_range *range)
- {
-       int ret;
-+      int get;
-+      int put;
--      if (!range->avail)
--              return 0;
--      ret = range->ports[range->get];
--      range->get++;
--      if (range->get >= range->size)
--              range->get = 0;
--      range->avail--;
-+      get = HA_ATOMIC_LOAD(&range->get);
-+      do {
-+              put = HA_ATOMIC_LOAD(&range->put_t);
-+              if (unlikely(put == get))
-+                      return 0;
-+              ret = range->ports[get];
-+      } while (!(HA_ATOMIC_CAS(&range->get, &get, GET_NEXT_OFF(range, get))));
-       return ret;
- }
-@@ -45,14 +49,28 @@ static inline int port_range_alloc_port(struct port_range *range)
-  */
- static inline void port_range_release_port(struct port_range *range, int port)
- {
-+      int put;
-+
-       if (!port || !range)
-               return;
--      range->ports[range->put] = port;
--      range->avail++;
--      range->put++;
--      if (range->put >= range->size)
--              range->put = 0;
-+      put = range->put_h;
-+      /* put_h is reserved for producers, so that they can each get a
-+       * free slot, put_t is what is used by consumers to know if there's
-+       * elements available or not
-+       */
-+      /* First reserve or slot, we know the ring buffer can't be full,
-+       * as we will only ever release port we allocated before
-+       */
-+      while (!(HA_ATOMIC_CAS(&range->put_h, &put, GET_NEXT_OFF(range, put))));
-+      HA_ATOMIC_STORE(&range->ports[put], port);
-+      /* Wait until all the threads that got a slot before us are done */
-+      while ((volatile int)range->put_t != put)
-+              __ha_compiler_barrier();
-+      /* Let the world know we're done, and any potential consumer they
-+       * can use that port.
-+       */
-+      HA_ATOMIC_STORE(&range->put_t, GET_NEXT_OFF(range, put));
- }
- /* return a new initialized port range of N ports. The ports are not
-@@ -62,8 +80,10 @@ static inline struct port_range *port_range_alloc_range(int n)
- {
-       struct port_range *ret;
-       ret = calloc(1, sizeof(struct port_range) +
--                   n * sizeof(((struct port_range *)0)->ports[0]));
--      ret->size = ret->avail = n;
-+                   (n + 1) * sizeof(((struct port_range *)0)->ports[0]));
-+      ret->size = n + 1;
-+      /* Start at the first free element */
-+      ret->put_h = ret->put_t = n;
-       return ret;
- }
-diff --git a/include/types/port_range.h b/include/types/port_range.h
-index 1d010f77..33455d2d 100644
---- a/include/types/port_range.h
-+++ b/include/types/port_range.h
-@@ -25,8 +25,7 @@
- #include <netinet/in.h>
- struct port_range {
--      int size, get, put;             /* range size, and get/put positions */
--      int avail;                      /* number of available ports left */
-+      int size, get, put_h, put_t;    /* range size, and get/put positions */
-       uint16_t ports[0];              /* array of <size> ports, in host byte order */
- };
diff --git a/net/haproxy/patches/012-deprecated-openssl.patch b/net/haproxy/patches/012-deprecated-openssl.patch
deleted file mode 100644 (file)
index 8dd011e..0000000
+++ /dev/null
@@ -1,107 +0,0 @@
---- a/src/ssl_sock.c
-+++ b/src/ssl_sock.c
-@@ -39,6 +39,7 @@
- #include <netdb.h>
- #include <netinet/tcp.h>
-+#include <openssl/bn.h>
- #include <openssl/crypto.h>
- #include <openssl/ssl.h>
- #include <openssl/x509.h>
-@@ -60,6 +61,17 @@
- #include <openssl/async.h>
- #endif
-+#ifndef OPENSSL_VERSION
-+#define OPENSSL_VERSION               SSLEAY_VERSION
-+#define OpenSSL_version(x)    SSLeay_version(x)
-+#define OpenSSL_version_num   SSLeay
-+#endif
-+
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#define X509_getm_notBefore X509_get_notBefore
-+#define X509_getm_notAfter X509_get_notAfter
-+#endif
-+
- #include <import/lru.h>
- #include <import/xxhash.h>
-@@ -217,7 +229,7 @@ static struct {
-       .capture_cipherlist = 0,
- };
--#ifdef USE_THREAD
-+#if defined(USE_THREAD) && (OPENSSL_VERSION_NUMBER < 0x10100000L)
- static HA_RWLOCK_T *ssl_rwlocks;
-@@ -1716,8 +1728,8 @@ ssl_sock_do_create_cert(const char *servername, struct bind_conf *bind_conf, SSL
-       ASN1_INTEGER_set(X509_get_serialNumber(newcrt), HA_ATOMIC_ADD(&ssl_ctx_serial, 1));
-       /* Set duration for the certificate */
--      if (!X509_gmtime_adj(X509_get_notBefore(newcrt), (long)-60*60*24) ||
--          !X509_gmtime_adj(X509_get_notAfter(newcrt),(long)60*60*24*365))
-+      if (!X509_gmtime_adj(X509_getm_notBefore(newcrt), (long)-60*60*24) ||
-+          !X509_gmtime_adj(X509_getm_notAfter(newcrt),(long)60*60*24*365))
-               goto mkcert_error;
-       /* set public key in the certificate */
-@@ -6299,7 +6311,7 @@ smp_fetch_ssl_x_notafter(const struct arg *args, struct sample *smp, const char
-               goto out;
-       smp_trash = get_trash_chunk();
--      if (ssl_sock_get_time(X509_get_notAfter(crt), smp_trash) <= 0)
-+      if (ssl_sock_get_time(X509_getm_notAfter(crt), smp_trash) <= 0)
-               goto out;
-       smp->data.u.str = *smp_trash;
-@@ -6399,7 +6411,7 @@ smp_fetch_ssl_x_notbefore(const struct arg *args, struct sample *smp, const char
-               goto out;
-       smp_trash = get_trash_chunk();
--      if (ssl_sock_get_time(X509_get_notBefore(crt), smp_trash) <= 0)
-+      if (ssl_sock_get_time(X509_getm_notBefore(crt), smp_trash) <= 0)
-               goto out;
-       smp->data.u.str = *smp_trash;
-@@ -8976,10 +8988,12 @@ static void __ssl_sock_init(void)
- #endif
-       xprt_register(XPRT_SSL, &ssl_sock);
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
-       SSL_library_init();
-+#endif
-       cm = SSL_COMP_get_compression_methods();
-       sk_SSL_COMP_zero(cm);
--#ifdef USE_THREAD
-+#if defined(USE_THREAD) && (OPENSSL_VERSION_NUMBER < 0x10100000L)
-       ssl_locking_init();
- #endif
- #if (OPENSSL_VERSION_NUMBER >= 0x1000200fL && !defined OPENSSL_NO_TLSEXT && !defined OPENSSL_IS_BORINGSSL && !defined LIBRESSL_VERSION_NUMBER)
-@@ -9008,8 +9022,8 @@ static void __ssl_sock_init(void)
- #else /* OPENSSL_IS_BORINGSSL */
-               OPENSSL_VERSION_TEXT
-               "\nRunning on OpenSSL version : %s%s",
--             SSLeay_version(SSLEAY_VERSION),
--             ((OPENSSL_VERSION_NUMBER ^ SSLeay()) >> 8) ? " (VERSIONS DIFFER!)" : "");
-+             OpenSSL_version(OPENSSL_VERSION),
-+             ((OPENSSL_VERSION_NUMBER ^ OpenSSL_version_num()) >> 8) ? " (VERSIONS DIFFER!)" : "");
- #endif
-       memprintf(&ptr, "%s\nOpenSSL library supports TLS extensions : "
- #if OPENSSL_VERSION_NUMBER < 0x00907000L
-@@ -9100,12 +9114,14 @@ static void __ssl_sock_deinit(void)
-       }
- #endif
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
-         ERR_remove_state(0);
-         ERR_free_strings();
-         EVP_cleanup();
-+#endif
--#if OPENSSL_VERSION_NUMBER >= 0x00907000L
-+#if OPENSSL_VERSION_NUMBER >= 0x00907000L && OPENSSL_VERSION_NUMBER < 0x10100000L
-         CRYPTO_cleanup_all_ex_data();
- #endif
- }
diff --git a/net/hcxdumptool/Makefile b/net/hcxdumptool/Makefile
new file mode 100644 (file)
index 0000000..9abebec
--- /dev/null
@@ -0,0 +1,52 @@
+#
+# Copyright (C) 2019 Andreas Nilsen <adde88@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:=hcxdumptool
+PKG_VERSION:=5.2.2
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/zerbea/hcxdumptool/tar.gz/$(PKG_VERSION)?
+PKG_HASH:=b091171fe5e6f926ace3997219dfc5a84ce6d1f2080d3320d456f88282019057
+
+PKG_MAINTAINER:=Andreas Nilsen <adde88@gmail.com>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=license.txt
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/hcxdumptool
+  SECTION:=net
+  CATEGORY:=Network
+  DEPENDS:=+libpcap
+  TITLE:=hcxdumptool
+  URL:=https://github.com/ZerBea/hcxdumptool
+  SUBMENU:=Wireless
+endef
+
+define Package/hcxdumptool/description
+  Small tool to capture packets from wlan devices. After capturing, upload
+  the "uncleaned" cap here (https://wpa-sec.stanev.org/?submit)
+  to see if your ap or the client is vulnerable by using common wordlists.
+  Convert the cap to hccapx and/or to WPA-PMKID-PBKDF2 hashline (16800) with hcxpcaptool (hcxtools)
+  and check if wlan-key or plainmasterkey was transmitted unencrypted.
+endef
+
+define Build/Compile
+       $(MAKE) -C $(PKG_BUILD_DIR)/ \
+               $(TARGET_CONFIGURE_OPTS) \
+               CFLAGS="$(TARGET_CFLAGS)"
+endef
+
+define Package/hcxdumptool/install
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/hcxdumptool $(1)/usr/sbin/
+endef
+
+$(eval $(call BuildPackage,hcxdumptool))
diff --git a/net/hcxtools/Makefile b/net/hcxtools/Makefile
new file mode 100644 (file)
index 0000000..388a97c
--- /dev/null
@@ -0,0 +1,67 @@
+#
+# Copyright (C) 2019 Andreas Nilsen <adde88@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:=hcxtools
+PKG_VERSION:=5.2.2
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/zerbea/hcxtools/tar.gz/$(PKG_VERSION)?
+PKG_HASH:=a2dd9559e1cc541f07f7a4c2451c295896355a94cfc970dc5cdceb40e605ee7e
+
+PKG_MAINTAINER:=Andreas Nilsen <adde88@gmail.com>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=license.txt
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/hcxtools
+  SECTION:=net
+  CATEGORY:=Network
+  DEPENDS:=+libpthread +libpcap +zlib +libcurl +libopenssl
+  TITLE:=hcxtools
+  URL:=https://github.com/ZerBea/hcxtools
+  SUBMENU:=Wireless
+endef
+
+define Package/hcxtools/description
+  Set of tools convert packets from captures (h = hash, c = capture, convert and calculate candidates, x = different hashtypes)
+  for the use with latest hashcat or John the Ripper.
+endef
+
+define Build/Compile
+       $(MAKE) -C $(PKG_BUILD_DIR)/ \
+               $(TARGET_CONFIGURE_OPTS) \
+               CFLAGS="$(TARGET_CFLAGS)"
+endef
+
+define Package/hcxtools/install
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_DIR) $(1)/etc
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/wlanwkp2hcx     $(1)/usr/sbin/
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/wlanpmk2hcx     $(1)/usr/sbin/
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/wlanhcxmnc      $(1)/usr/sbin/
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/wlanhcx2essid   $(1)/usr/sbin/
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/wlanjohn2hcx    $(1)/usr/sbin/
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/hcxpcaptool     $(1)/usr/sbin/
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/wlanhcx2john    $(1)/usr/sbin/
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/hcxpsktool      $(1)/usr/sbin/
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/wlancow2hcxpmk  $(1)/usr/sbin/
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/wlanhcxinfo     $(1)/usr/sbin/
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/hcxhash2cap     $(1)/usr/sbin/
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/hcxhashcattool  $(1)/usr/sbin/
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/wlanhashhcx     $(1)/usr/sbin/
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/wlancap2wpasec  $(1)/usr/sbin/
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/wlanhc2hcx      $(1)/usr/sbin/
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/hcxwltool       $(1)/usr/sbin/
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/whoismac        $(1)/usr/sbin/
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/wlancap2wpasec  $(1)/usr/sbin/
+endef
+
+$(eval $(call BuildPackage,hcxtools))
index 6805199e51ab61030a0817cd17cfbc96ddad7f55..a9dfc17a9ad784bec03666e244cb167208cac2ca 100644 (file)
@@ -9,14 +9,14 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=horst
 PKG_VERSION:=5.1
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/br101/horst/archive/v$(PKG_VERSION)/
 PKG_HASH:=74b4cb1143d93c73c3b4bbbe0c36f89a790401bde9e894e94e2a27339ca384d9
 
 PKG_MAINTAINER:=Bruno Randolf <br1@einfach.org>
-PKG_LICENSE:=GPL-2.0+
+PKG_LICENSE:=GPL-2.0-or-later
 PKG_LICENSE_FILES:=LICENSE
 
 PKG_BUILD_PARALLEL:=1
@@ -28,7 +28,7 @@ MAKE_FLAGS += DEBUG=1 LIBNL=tiny
 define Package/horst
        SECTION:=net
        CATEGORY:=Network
-       SUBMENU:=wireless
+       SUBMENU:=Wireless
        DEPENDS:=+libncurses +libnl-tiny
        MAINTAINER:=Bruno Randolf <br1@einfach.org>
        TITLE:=Highly Optimized 802.11 Radio Scanning Tool
index adf331a09297ef4e89c7ae540831c6c8c9f27218..fa238a5c37168494f849def597ccba377c0bf7a2 100644 (file)
@@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=htpdate
 PKG_VERSION:=1.1.1
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=http://www.vervest.org/htp/archive/c/
 PKG_HASH:=0d75f91cb61f8869c8298d198fa52b9a139ae505b366e9d4d331af8bc1c04880
 
-PKG_LICENSE:=GPL-2.0+
+PKG_LICENSE:=GPL-2.0-or-later
 PKG_LICENSE_FILES:=
 
 include $(INCLUDE_DIR)/package.mk
index 6e9f8e1cdc1df94719d965fc01e7f7351fe71d54..27660ca6dc6f4a677e6477aa1b160ccae6e3dd20 100644 (file)
@@ -16,6 +16,8 @@ PKG_LICENSE:=MIT
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/cmake.mk
 
+CMAKE_OPTIONS += -DCLANG_TIDY_EXE=
+
 define Package/https_dns_proxy
   SECTION:=net
   CATEGORY:=Network
index 20708c02744134862f866f9f2085ba9c9b68f66a..09aafa5a47585aa0aadea0c86b15df6110ebd596 100644 (file)
@@ -9,13 +9,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=i2pd
-PKG_VERSION:=2.24.0
+PKG_VERSION:=2.28.0
 PKG_RELEASE:=1
 PKG_BUILD_PARALLEL:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/PurpleI2P/i2pd/tar.gz/$(PKG_VERSION)?
-PKG_HASH:=809b37100f0f176432b01ab6edee96dc62b0f65d5bf7531e008a87117e742566
+PKG_HASH:=181327edc7cf5b3c25ee51ecc518a4da90fa9e421eca2107996791038a514a21
 
 PKG_MAINTAINER:=David Yang <mmyangfl@gmail.com>
 PKG_LICENSE:=BSD-3-Clause
@@ -43,6 +43,7 @@ define Package/i2pd/conffiles
        /etc/config/i2pd
        /etc/i2pd/i2pd.conf
        /etc/i2pd/tunnels.conf
+       /etc/i2pd/tunnels.d/*
 endef
 
 TARGET_LDFLAGS+=-latomic
@@ -62,6 +63,9 @@ define Package/i2pd/install
                s/datadir = \/var\/lib/datadir = \/etc/ \
        ' $(1)/etc/i2pd/i2pd.conf
        $(INSTALL_CONF) $(PKG_BUILD_DIR)/contrib/tunnels.conf $(1)/etc/i2pd
+       $(INSTALL_DIR) $(1)/etc/i2pd/tunnels.d
+       $(INSTALL_CONF) $(PKG_BUILD_DIR)/contrib/tunnels.d/*.conf  $(1)/etc/i2pd/tunnels.d
+       # subscriptions.txt deprecated, see #8088
        $(INSTALL_DIR) $(1)/etc/init.d
        $(INSTALL_BIN) ./files/i2pd.init $(1)/etc/init.d/i2pd
 endef
index ca6f3c7565b54f24548b2abf3ea29f94f24654be..426ff9d11b2a2d19b775b8ccfa730a258050501e 100644 (file)
@@ -1,15 +1,18 @@
 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.
+       # 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.
+       # If you store data permanently, you may want to enable
+       # 'profiles = true' and 'addressbook = true' in i2pd.conf
+       #### 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.
+       # If you don't store i2pd data permanently, you can still choose to
+       # store only addressbooks. If not, i2pd will be forced to do HTTP
+       # 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.
+       # Enable 'addressbook = true' in i2pd.conf to make it take effect.
        #option addressbook_dir '/etc/i2pd/addressbook'
index 4af1013637478dd1617e9ac0a1d02b54c48a4bb0..21473407f13db4cb08df34f8d45fc9ac13544b98 100755 (executable)
@@ -11,27 +11,25 @@ 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() {
+i2pd_start() {
+       local cfg="$1"
        local data_dir
        local addressbook_dir
 
-       config_load i2pd
-
-       config_get data_dir i2pd data_dir
-       config_get addressbook_dir i2pd addressbook_dir
+       config_get data_dir "$cfg" data_dir "$DATADIR"
+       config_get addressbook_dir "$cfg" 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"
@@ -50,6 +48,9 @@ start_service() {
        procd_set_param command "$PROG" --service --conf="$CONFFILE" --pidfile "$PIDFILE"
        ## Don't know about i2pd user's HOME
        procd_set_param env "HOME=$DATADIR"
+       ## For debugging, provide about 512 MB on external storage for coredump and adjust /proc/sys/kernel/core_pattern
+       # echo "/tmp/coredumps/core.%e.%p.%s.%t" > /proc/sys/kernel/core_pattern
+       # procd_set_param limits core="unlimited unlimited"
        procd_set_param limits nofile=4096
        procd_set_param stdout 1
        procd_set_param stderr 1
@@ -57,3 +58,28 @@ start_service() {
        procd_set_param pidfile "$PIDFILE"
        procd_close_instance
 }
+
+
+start_service() {
+       local instance="$1"
+       local instance_found=0
+
+       config_cb() {
+               local type="$1"
+               local name="$2"
+               if [ "$type" = "i2pd" ]; then
+                       if [ -n "$instance" ] && [ "$instance" = "$name" ]; then
+                               instance_found=1
+                       fi
+               fi
+       }
+
+       config_load i2pd
+
+       if [ -n "$instance" ]; then
+               [ "$instance_found" -gt 0 ] || return
+               i2pd_start "$instance"
+       else
+               config_foreach i2pd_start i2pd
+       fi
+}
diff --git a/net/i2pd/patches/config.patch b/net/i2pd/patches/config.patch
new file mode 100644 (file)
index 0000000..5dae88a
--- /dev/null
@@ -0,0 +1,88 @@
+diff -u -r a/contrib/i2pd.conf b/contrib/i2pd.conf
+--- a/contrib/i2pd.conf        2019-09-04 11:00:27.660713504 +0800
++++ b/contrib/i2pd.conf        2019-09-04 11:07:53.669745273 +0800
+@@ -8,12 +8,12 @@
+ ## Tunnels config file
+ ## Default: ~/.i2pd/tunnels.conf or /var/lib/i2pd/tunnels.conf
+-# tunconf = /var/lib/i2pd/tunnels.conf
++tunconf = /etc/i2pd/tunnels.conf
+ ## Tunnels config files path
+ ## Use that path to store separated tunnels in different config files.
+ ## Default: ~/.i2pd/tunnels.d or /var/lib/i2pd/tunnels.d
+-# tunnelsdir = /var/lib/i2pd/tunnels.conf.d
++tunnelsdir = /etc/i2pd/tunnels.conf.d
+ ## Where to write pidfile (don't write by default)
+ # pidfile = /var/run/i2pd.pid
+@@ -25,12 +25,12 @@
+ ##  * stdout - print log entries to stdout
+ ##  * file - log entries to a file
+ ##  * syslog - use syslog, see man 3 syslog
+-# log = file
++log = syslog
+ ## Path to logfile (default - autodetect)
+ # logfile = /var/log/i2pd.log
+ ## Log messages above this level (debug, *info, warn, error, none)
+ ## If you set it to none, logging will be disabled
+-# loglevel = info
++loglevel = error
+ ## Write full CLF-formatted date and time to log (default: write only time)
+ # logclftime = true
+@@ -61,7 +61,7 @@
+ # ifname6 = 
+ ## Enable NTCP transport (default = true)
+-# ntcp = true
++ntcp = false
+ ## If you run i2pd behind a proxy server, you can only use NTCP transport with ntcpproxy option 
+ ## Should be http://address:port or socks://address:port
+ # ntcpproxy = http://127.0.0.1:8118
+@@ -81,7 +81,7 @@
+ ## Router will not accept transit tunnels, disabling transit traffic completely
+ ## (default = false)
+-# notransit = true
++notransit = true
+ ## Router will be floodfill
+ # floodfill = true
+@@ -91,8 +91,10 @@
+ ## Uncomment and set to 'false' to disable Web Console
+ # enabled = true
+ ## Address and port service will listen on
+-address = 127.0.0.1
++address = 192.168.1.1
++# address = ::
+ port = 7070
++# strictheaders = false
+ ## Path to web console, default "/"
+ # webroot = /
+ ## Uncomment following lines to enable Web Console authentication 
+@@ -104,7 +106,7 @@
+ ## Uncomment and set to 'false' to disable HTTP Proxy
+ # enabled = true
+ ## Address and port service will listen on
+-address = 127.0.0.1
++address = 192.168.1.1
+ port = 4444
+ ## Optional keys file for proxy local destination
+ # keys = http-proxy-keys.dat
+@@ -118,7 +120,7 @@
+ ## Uncomment and set to 'false' to disable SOCKS Proxy
+ # enabled = true
+ ## Address and port service will listen on
+-address = 127.0.0.1
++address = 192.168.1.1
+ port = 4447
+ ## Optional keys file for proxy local destination
+ # keys = socks-proxy-keys.dat
+@@ -228,4 +230,5 @@
+ [persist]
+ ## Save peer profiles on disk (default: true)
+-# profiles = true
++profiles = false
++addressbook = false
index 3ef388136710f0e1c8cebfd47c3edd0a34fd561b..6112c993da8c08f28c59094ad7ed76c477597ec4 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ibrdtn-tools
 PKG_VERSION:=1.0.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.ibr.cs.tu-bs.de/projects/ibr-dtn/releases
@@ -19,6 +19,7 @@ PKG_LICENSE:=Apache-2.0
 
 PKG_INSTALL:=1
 
+include $(INCLUDE_DIR)/uclibc++.mk
 include $(INCLUDE_DIR)/package.mk
 
 define Package/ibrdtn-tools
index 0a2a5ee815ae3eb7fc58b488c0bfadecc9b76cd0..d83bc2cc14f0a15a3093b78024bd21104976df8b 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ibrdtnd
 PKG_VERSION:=1.0.1
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.ibr.cs.tu-bs.de/projects/ibr-dtn/releases
@@ -20,6 +20,7 @@ PKG_LICENSE:=Apache-2.0
 PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
 
+include $(INCLUDE_DIR)/uclibc++.mk
 include $(INCLUDE_DIR)/package.mk
 
 define Package/ibrdtnd
diff --git a/net/ibrdtnd/patches/030-openssl-deprecated.patch b/net/ibrdtnd/patches/030-openssl-deprecated.patch
new file mode 100644 (file)
index 0000000..a793da8
--- /dev/null
@@ -0,0 +1,20 @@
+--- a/src/security/SecurityKeyManager.cpp
++++ b/src/security/SecurityKeyManager.cpp
+@@ -29,6 +29,7 @@
+ #include <fstream>
+ #include <fcntl.h>
++#include <openssl/bn.h>
+ #include <openssl/pem.h>
+ #include <openssl/rsa.h>
+ #include <openssl/err.h>
+--- a/src/security/exchange/DHProtocol.cpp
++++ b/src/security/exchange/DHProtocol.cpp
+@@ -28,6 +28,7 @@
+ #include <ibrcommon/ssl/HMacStream.h>
+ #include <ibrcommon/Logger.h>
++#include <openssl/dh.h>
+ #include <openssl/rand.h>
+ #include <openssl/pem.h>
+ #include "openssl_compat.h"
index 7d085345175687542ac1bd12c1f76062668ce054..d32a95b8aa687fcbb8b17f96779db2007ea00b98 100644 (file)
@@ -8,17 +8,19 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=inadyn
-PKG_VERSION:=2.3.1
-PKG_RELEASE:=2
-PKG_MAINTAINER:=
-PKG_LICENSE:=GPL-2.0
-PKG_LICENSE_FILES:=COPYING
+PKG_VERSION:=2.5
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://github.com/troglobit/inadyn/releases/download/v$(PKG_VERSION)
-PKG_HASH:=81c942db6eab27fa16e868175bdb7aff963eeee06d48bc5443e0dcd6f7c2da40
+PKG_HASH:=4a9ad208671f62912428413da0282450b2d2c4da38f3c95c4ac975d048c41fcd
+
+PKG_MAINTAINER:=
+PKG_LICENSE:=GPL-2.0
+PKG_LICENSE_FILES:=COPYING
 
-PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -39,12 +41,18 @@ define Package/inadyn/conffiles
 /etc/inadyn.conf
 endef
 
-CONFIGURE_ARGS += --enable-shared --disable-static --enable-openssl
+TARGET_CFLAGS += $(FPIC)
+
+CONFIGURE_ARGS += \
+       --enable-shared \
+       --disable-static \
+       --enable-openssl \
+       --without-pic
 
 define Package/inadyn/install
        $(INSTALL_DIR) $(1)/etc
        $(INSTALL_DIR) $(1)/usr/sbin
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/inadyn $(1)/usr/sbin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/inadyn $(1)/usr/sbin/
 endef
 
 $(eval $(call BuildPackage,inadyn))
diff --git a/net/inadyn/patches/010-openssl-deprecated.patch b/net/inadyn/patches/010-openssl-deprecated.patch
deleted file mode 100644 (file)
index 933ec44..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
---- a/src/openssl.c
-+++ b/src/openssl.c
-@@ -25,17 +25,21 @@
- int ssl_init(void)
- {
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
-       SSL_library_init();
-       SSL_load_error_strings();
-       OpenSSL_add_all_algorithms();
-+#endif
-       return 0;
- }
- void ssl_exit(void)
- {
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
-       ERR_free_strings();
-       EVP_cleanup();
-+#endif
- }
- static int verify_callback(int preverify_ok, X509_STORE_CTX *ctx)
index bf4d2f50b798b85d6defb2250ec091de91861338..434876abecdeec58bcaa131fbef6b212017c1498 100644 (file)
@@ -18,6 +18,7 @@ PKG_HASH:=ad2b40acf1421316ec15800dcde0f587ab31d7d6f891fa8b9967c4ded93c013e
 PKG_MAINTAINER:=Uwe Kleine-König <uwe+openwrt@kleine-koenig.org>
 PKG_LICENSE:=ISC
 PKG_LICENSE_FILES:=README
+PKG_CPE_ID:=cpe:/a:kryo:iodine
 
 include $(INCLUDE_DIR)/package.mk
 
index 9158831ce6379c1f48119b08d3513fa18b2e1a71..488f575c387e45d56ca476b961b6ba5474cbb210 100644 (file)
@@ -16,7 +16,7 @@ PKG_SOURCE_URL:=http://mirrors.kernel.org/${PKG_NAME}/${PKG_VERSION}/
 PKG_HASH:=7dcd9f0f48263c6b27a2c3d085dd7278b5c0feed1dfec8872a04899707fa23d8
 PKG_USE_MIPS16:=0
 
-PKG_BUILD_DEPENDS:=boost
+PKG_BUILD_DEPENDS:=boost python/host scons/host
 
 PKG_MAINTAINER:=Hauke Mehrtens <hauke.mehrtens@intel.com>
 
@@ -37,7 +37,7 @@ PKG_CONFIG_DEPENDS := \
        CONFIG_PACKAGE_iotivity_SECURE
 
 include $(INCLUDE_DIR)/package.mk
-include $(INCLUDE_DIR)/scons.mk
+include ../../devel/scons/scons.mk
 
 
 define Package/iotivity
@@ -227,7 +227,7 @@ endef
 define Build/Configure
        (cd $(PKG_BUILD_DIR); \
                $(SCONS_VARS) \
-               scons \
+               python2.7 $(STAGING_DIR_HOST)/bin/scons.py \
                        $(SCONS_OPTIONS) \
        )
 endef
diff --git a/net/ipsec-tools/Makefile b/net/ipsec-tools/Makefile
deleted file mode 100644 (file)
index 317df78..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-#
-# Copyright (C) 2006-2015 OpenWrt.org
-#               2014 Noah Meyerhans <frodo@morgul.net>
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-include $(INCLUDE_DIR)/kernel.mk
-
-PKG_NAME:=ipsec-tools
-PKG_VERSION:=0.8.2
-PKG_RELEASE:=9
-PKG_MAINTAINER:=Noah Meyerhans <frodo@morgul.net>, \
-       Vitaly Protsko <villy@sft.ru>
-PKG_LICENSE := BSD-3-Clause
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=@SF/ipsec-tools
-PKG_HASH:=8eb6b38716e2f3a8a72f1f549c9444c2bc28d52c9536792690564c74fe722f2d
-
-PKG_BUILD_PARALLEL:=1
-PKG_INSTALL:=1
-
-PKG_FIXUP:=autoreconf
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/ipsec-tools
-  SECTION:=net
-  CATEGORY:=Network
-  SUBMENU:=VPN
-  DEPENDS:=+libopenssl +kmod-ipsec
-  TITLE:=IPsec management tools
-  URL:=http://ipsec-tools.sourceforge.net/
-  MAINTAINER:=Noah Meyerhans <frodo@morgul.net>
-endef
-
-CONFIGURE_ARGS += \
-       --enable-shared \
-       --enable-static \
-       --with-kernel-headers="$(LINUX_DIR)/include" \
-       --without-readline \
-       --with-openssl="$(STAGING_DIR)/usr" \
-       --without-libradius \
-       --without-libpam \
-       --enable-dpd \
-       --enable-hybrid \
-       --enable-security-context=no \
-       --enable-natt \
-       --enable-adminport \
-       --enable-frag \
-        $(call autoconf_bool,CONFIG_IPV6,ipv6)
-
-# override CFLAGS holding "-Werror" that break builds on compile warnings
-MAKE_FLAGS+=\
-       CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)"
-
-define Build/Prepare
-       $(call Build/Prepare/Default)
-       chmod -R u+w $(PKG_BUILD_DIR)
-endef
-
-define Build/Configure
-       (cd $(PKG_BUILD_DIR); touch \
-               configure.ac \
-               aclocal.m4 \
-               Makefile.in \
-               config.h.in \
-               configure \
-       );
-       $(call Build/Configure/Default)
-ifndef CONFIG_SHADOW_PASSWORDS
-       echo "#undef HAVE_SHADOW_H" >> $(PKG_BUILD_DIR)/config.h
-endif
-endef
-
-define Package/ipsec-tools/install
-       $(INSTALL_DIR) $(1)/etc/racoon
-       $(INSTALL_CONF) ./files/functions.sh $(1)/etc/racoon/
-       $(INSTALL_BIN) ./files/p1client-up $(1)/etc/racoon/
-       $(INSTALL_BIN) ./files/p1client-down $(1)/etc/racoon/
-       $(INSTALL_BIN) ./files/vpnctl $(1)/etc/racoon/
-       $(INSTALL_DIR) $(1)/etc/init.d
-       $(INSTALL_BIN) ./files/racoon.init $(1)/etc/init.d/racoon
-       $(INSTALL_DIR) $(1)/etc/config
-       $(INSTALL_CONF) ./files/racoon $(1)/etc/config/
-       $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libipsec.so.* $(1)/usr/lib/
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libracoon.so.* $(1)/usr/lib/
-       $(INSTALL_DIR) $(1)/usr/sbin
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/plainrsa-gen $(1)/usr/sbin/
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/racoon $(1)/usr/sbin/
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/racoonctl $(1)/usr/sbin/
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/setkey $(1)/usr/sbin/
-endef
-
-define Package/ipsec-tools/conffiles
-/etc/config/racoon
-endef
-
-$(eval $(call BuildPackage,ipsec-tools))
diff --git a/net/ipsec-tools/files/functions.sh b/net/ipsec-tools/files/functions.sh
deleted file mode 100644 (file)
index 45715b5..0000000
+++ /dev/null
@@ -1,172 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2015 Vitaly Protsko <villy@sft.ru>
-
-errno=0
-
-get_fieldval() {
-  local __data="$3"
-  local __rest
-
-  test -z "$1" && return
-
-  while true ; do
-    __rest=${__data#* }
-    test "$__rest" = "$__data" && break
-
-    if [ "${__data/ *}" = "$2" ]; then
-      eval "$1=${__rest/ *}"
-      break
-    fi
-
-    __data="$__rest"
-  done
-}
-
-manage_fw() {
-  local cmd=/usr/sbin/iptables
-  local mode
-  local item
-
-  if [ -z "$4" ]; then
-    $log "Bad usage of manage_fw"
-    errno=3; return 3
-  fi
-
-  case "$1" in
-    add|up|1) mode=A ;;
-    del|down|0) mode=D ;;
-    *) return 3 ;;
-  esac
-
-  for item in $4 ; do
-    $cmd -$mode forwarding_$2_rule -s $item -j ACCEPT
-    $cmd -$mode output_$3_rule -d $item -j ACCEPT
-    $cmd -$mode forwarding_$3_rule -d $item -j ACCEPT
-    $cmd -t nat -$mode postrouting_$3_rule -d $item -j ACCEPT
-  done
-}
-
-manage_sa() {
-  local spdcmd
-  local rtcmd
-  local gate
-  local litem
-  local ritem
-
-  if [ -z "$4" ]; then
-    $log "Bad usage of manage_sa"
-    errno=3; return 3
-  fi
-
-  case "$1" in
-    add|up|1) spdcmd=add; rtcmd=add ;;
-    del|down|0) spdcmd=delete; rtcmd=del ;;
-    *) errno=3; return 3 ;;
-  esac
-
-  get_fieldval gate src "$(/usr/sbin/ip route get $4)"
-  if [ -z "$gate" ]; then
-    $log "Can not find outbound IP for $4"
-    errno=3; return 3
-  fi
-
-
-  for litem in $2 ; do
-    for ritem in $3 ; do
-      echo "
-spd$spdcmd $litem $ritem any -P out ipsec esp/tunnel/$gate-$4/require;
-spd$spdcmd $ritem $litem any -P in ipsec esp/tunnel/$4-$gate/require;
-" | /usr/sbin/setkey -c 1>&2
-    done
-  done
-
-  test -n "$5" && gate=$5
-
-  for ritem in $3 ; do
-    (sleep 3; /usr/sbin/ip route $rtcmd $ritem via $gate) &
-  done
-}
-
-manage_nonesa() {
-  local spdcmd
-  local item
-  local cout cin
-
-  if [ -z "$4" ]; then
-    $log "Bad usage of manage_nonesa"
-    errno=3; return 3
-  fi
-
-  case "$1" in
-    add|up|1) spdcmd=add ;;
-    del|down|0) spdcmd=delete ;;
-    *) errno=3; return 3 ;;
-  esac
-
-  case "$2" in
-    local|remote) ;;
-    *) errno=3; return 3 ;;
-  esac
-
-  for item in $3 ; do
-    if [ "$2" = "local" ]; then
-      cout="$4 $item"
-      cin="$item $4"
-    else
-      cout="$item $4"
-      cin="$4 $item"
-    fi
-    echo "
-spd$spdcmd $cout any -P out none;
-spd$spdcmd $cin any -P in none;
-" | /usr/sbin/setkey -c 1>&2
-  done
-}
-
-. /lib/functions/network.sh
-
-get_zoneiflist() {
-  local item
-  local data
-  local addr
-
-  item=0
-  data=$(uci get firewall.@zone[0].name)
-  while [ -n "$data" ]; do
-    test "$data" = "$1" && break
-    let "item=$item+1"
-    data=$(uci get firewall.@zone[$item].name)
-  done
-
-  if [ -z "$data" ]; then
-    errno=1
-    return $errno
-  fi
-  data=$(uci get firewall.@zone[$item].network)
-
-  echo "$data"
-}
-
-get_zoneiplist() {
-  local item
-  local addr
-  local data
-  local result
-
-  data=$(get_zoneiflist $1)
-  test $? -gt 0 -o $errno -gt 0 -o -z "$data" && return $errno
-
-  for item in $data ; do
-    if network_is_up $item ; then
-      network_get_ipaddrs addr $item
-      test $? -eq 0 && result="$result $addr"
-    fi
-  done
-
-  result=$(echo $result)
-  echo "$result"
-}
-
-
-# EOF /etc/racoon/functions.sh
diff --git a/net/ipsec-tools/files/p1client-down b/net/ipsec-tools/files/p1client-down
deleted file mode 100644 (file)
index 8c5a195..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/bin/sh
-#
-
-log="logger -t p1client-down[$$]"
-
-. /lib/functions.sh
-. /etc/racoon/functions.sh
-
-if [ -z "$SPLIT_INCLUDE_CIDR" ]; then
-  $log "Connection without server-pushed routing is not supported"
-  exit 1
-fi
-
-$log "Shutting down tunnel to server $REMOTE_ADDR"
-$log "Closing tunnel(-s) to $SPLIT_INCLUDE_CIDR through $INTERNAL_ADDR4"
-
-config_load racoon
-config_get confIntZone racoon int_zone lan
-config_get confExtZone racoon ext_zone wan
-
-manage_fw del $confIntZone $confExtZone "$INTERNAL_ADDR4 $SPLIT_INCLUDE_CIDR"
-
-data=$(get_zoneiflist $confIntZone)
-if [ -n "$data" ]; then
-  for item in $data ; do
-    network_get_subnet locnet $item
-    if [ -n "$locnet" ]; then
-      manage_sa del "$locnet" "$SPLIT_INCLUDE_CIDR" $REMOTE_ADDR $INTERNAL_ADDR4
-    else
-      $log "Can not find subnet on interface $item"
-    fi
-  done
-else
-  $log "Can not find subnets in zone $confIntZone"
-fi
-
-get_fieldval data dev "$(/usr/sbin/ip route get $REMOTE_ADDR)"
-ip address del $INTERNAL_ADDR4/32 dev $data
-
-
-# EOF /etc/racoon/p1client-down
diff --git a/net/ipsec-tools/files/p1client-up b/net/ipsec-tools/files/p1client-up
deleted file mode 100644 (file)
index 8a9678a..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/bin/sh
-#
-
-log="logger -t p1client-up[$$]"
-
-. /lib/functions.sh
-. /etc/racoon/functions.sh
-
-if [ -z "$SPLIT_INCLUDE_CIDR" ]; then
-  $log "Connection without server-pushed routing is not supported"
-  exit 1
-fi
-
-$log "Setting up tunnel to server $REMOTE_ADDR"
-$log "Making tunnel(-s) to $SPLIT_INCLUDE_CIDR through $INTERNAL_ADDR4"
-
-get_fieldval data dev "$(/usr/sbin/ip route get $REMOTE_ADDR)"
-ip address add $INTERNAL_ADDR4/32 dev $data
-
-config_load racoon
-config_get confIntZone racoon int_zone lan
-config_get confExtZone racoon ext_zone wan
-
-data=$(get_zoneiflist $confIntZone)
-if [ -n "$data" ]; then
-  for item in $data ; do
-    network_get_subnet locnet $item
-    if [ -n "$locnet" ]; then
-      manage_sa add "$locnet" "$SPLIT_INCLUDE_CIDR" $REMOTE_ADDR $INTERNAL_ADDR4
-    else
-      $log "Can not find subnet on interface $item"
-    fi
-  done
-else
-  $log "Can not find interfaces in zone $confIntZone"
-fi
-
-manage_fw add $confIntZone $confExtZone "$INTERNAL_ADDR4 $SPLIT_INCLUDE_CIDR"
-
-
-# EOF /etc/racoon/p1client-up
diff --git a/net/ipsec-tools/files/racoon b/net/ipsec-tools/files/racoon
deleted file mode 100644 (file)
index e2c8400..0000000
+++ /dev/null
@@ -1,113 +0,0 @@
-#/etc/config/racoon
-#
-# Copyright 2015 Vitaly Protsko <villy@sft.ru>
-
-# * WARNING: this is "not working" example
-# * Defaults are commented out
-# * Resuting config will appear in /var/racoon/
-
-config racoon
-#      option  debug           0
-#      option  ext_zone        'wan'
-#      option  int_zone        'lan'
-#      option  port            500
-#      option  natt_port       4500
-# following 4 or 6, no default
-#      option  ipversion       4
-
-config p1_proposal 'example_prop1'
-#      option  lifetime        28800
-       option  enc_alg         'aes'
-       option  hash_alg        'sha1'
-       option  auth_method     'rsasig'
-       option  dh_group        2
-
-config p1_proposal 'example_anon'
-#      option  lifetime        28800
-       option  enc_alg         'aes'
-       option  hash_alg        'sha1'
-       option  auth_method     'xauth_rsa_server'
-       option  dh_group        2
-
-config p1_proposal 'example_xauth'
-#      option  lifetime        28800
-       option  enc_alg         'aes'
-       option  hash_alg        'sha1'
-       option  auth_method     'xauth_rsa_client'
-       option  dh_group        2
-
-config p2_proposal 'example_prop2'
-       option  pfs_group       2
-       option  enc_alg         'aes'
-       option  auth_alg        'hmac_sha1'
-
-config p2_proposal 'example_in2'
-       option  pfs_group       2
-#      option  lifetime        14400
-       option  enc_alg         'aes'
-       option  auth_alg        'hmac_sha1'
-
-config sainfo 'office'
-       option  p2_proposal     'example_prop2'
-       option  local_net       '192.168.8.0/24'
-       option  remote_net      '192.168.1.0/24'
-# you can exclude some local or remote
-# addresses from SA rules
-       list    local_exclude   '192.168.8.0/30'
-       list    remote_exclude  '192.168.1.128/29'
-
-config sainfo 'welcome'
-       option  p2_proposal     'example_in2'
-       option  local_net       '192.168.8.0/24'
-       option  remote_net      '192.168.10.0/24'
-       option  dns4            '192.168.8.1'
-       option  defdomain       'myhome.local'
-
-config sainfo 'client'
-       option  p2_proposal     'std_p2'
-
-config tunnel 'Office'
-       option  enabled         1
-# initial_contact
-#      option  init            1
-       option  remote          'vpn.example.tld'
-       option  exchange_mode   'main'
-       option  certificate     'example_cert'
-#      option  peer_id_type    'asn1dn'
-#      option  prop_check      'obey'
-#      option  verify_id       1
-#      option  weak_p1check    1
-#      option  dpd_delay       ''
-       list    p1_proposal     'example_prop1'
-       list    sainfo          'office'
-
-# WARNING:     Only ONE tunnel with remote anonymous
-#              can be configured and it can have only
-#              ONE sainfo. Otherwise resulting racoon
-#              configuration will be unusable
-config tunnel 'Incoming'
-       option  enabled         1
-       option  remote          'anonymous'
-       option  pre_shared_key  'testitnow'
-       option  exchange_mode   'aggressive,main'
-       option  my_id_type      'fqdn'
-       option  my_id           'myserver.homeip.net'
-       list    p1_proposal     'example_anon'
-       list    sainfo          'welcome'
-
-config tunnel 'Client'
-       option  enabled         1
-       option  remote          'vpn.example.tld'
-       option  username        'testuser'
-       option  password        'testW0rD'
-#      option  mode_cfg        1
-       list    p1_proposal     'example_xauth'
-       list    sainfo          'client'
-
-# Insert corresponding data in PEM format as one line
-config 'certificate' 'example_cert'
-       option  'key'   '-----BEGIN PRIVATE KEY----- ~ -----END PRIVATE KEY-----'
-       option  'crt'   '-----BEGIN CERTIFICATE----- ~ -----END CERTIFICATE-----'
-
-config 'certificate' 'example_ca_cert'
-       option  'crt'   '-----BEGIN CERTIFICATE----- ~ -----END CERTIFICATE-----'
diff --git a/net/ipsec-tools/files/racoon.init b/net/ipsec-tools/files/racoon.init
deleted file mode 100644 (file)
index 247bdfc..0000000
+++ /dev/null
@@ -1,479 +0,0 @@
-#!/bin/sh /etc/rc.common
-#
-# Copyright (C) 2015 Vitaly Protsko <villy@sft.ru>
-
-#set -vx
-
-USE_PROCD=1
-
-START=60
-STOP=40
-
-let connWait=2/2
-confDir=/var/racoon
-confExtZone=
-confIntZone=
-confPort=
-confNATPort=
-confIPMode=
-
-confPh1ID=0
-
-log="logger -t init.d/racoon[$$] "
-
-. /etc/racoon/functions.sh
-
-setup_load() {
-  config_get confExtZone "$1" ext_zone wan
-  config_get confIntZone "$1" int_zone lan
-  config_get confPort    "$1" port 500
-  config_get confNATPort "$1" natt_port 4500
-  config_get confIPMode  "$1" ipversion ""
-
-  case X$confIPMode in
-    X4|X6) ;;
-    *) unset confIPMode ;;
-  esac
-}
-
-write_header() {
-  echo "
-# autogenerated, don't edit, look at /etc/config/racoon
-#
-path certificate \"$confDir/cert\";
-path script \"/etc/racoon\";
-path pre_shared_key \"$confDir/psk.txt\";
-path pidfile \"$confDir/racoon.pid\";
-padding { maximum_length 20; randomize off; strict_check off; exclusive_tail off; }
-timer { counter 5; interval 20 sec; persend 1; phase1 30 sec; phase2 15 sec; }
-"
-}
-
-setup_conf() {
-  local conf=$confDir/racoon.conf
-  local peerconf=$confDir/peers.txt
-  local pskconf=$confDir/psk.txt
-  local item
-  local data
-
-  data="$(get_zoneiplist $confExtZone)"
-  if [ "X$data" = X ]; then
-    $log "No IP addresses found for zone $confExtZone, exitng"
-    errno=2; return 2
-  fi
-
-  write_header > $conf
-  echo -n > $peerconf
-  echo -n > $pskconf
-  chmod 0600 $conf $peerconf $pskconf
-
-  echo "listen {" >> $conf
-  for item in $data ; do
-    echo "  isakmp $item [$confPort]; isakmp_natt $item [$confNATPort];" >> $conf
-  done
-  echo "}" >> $conf
-
-  config_get_bool item "$1" debug 0
-  data=warning
-  test $item -ne 0 && data=debug
-  echo "log $data;" >> $conf
-
-  setup_fw add
-}
-
-setup_p1() {
-  local conf=$confDir/racoon.conf
-  local data
-
-  echo "  proposal {" >> $conf
-  config_get data "$1" lifetime 28800
-  echo "    lifetime time $data sec;" >> $conf
-
-  config_get data "$1" enc_alg
-  test -n "$data" && echo "    encryption_algorithm $data;" >> $conf
-
-  config_get data "$1" hash_alg
-  test -n "$data" && echo "    hash_algorithm $data;" >> $conf
-
-  config_get data "$1" auth_method
-  test -n "$data" && echo "    authentication_method $data;" >> $conf
-
-  config_get data "$1" dh_group 2
-  echo -e "    dh_group $data;\n  }" >> $conf
-}
-
-setup_fw() {
-  local cmd=/usr/sbin/iptables
-  local mode
-
-  case "$1" in
-    add|up|1) mode=A ;;
-    del|down|0) mode=D ;;
-    *) return 3 ;;
-  esac
-
-  $cmd -$mode input_${confExtZone}_rule -p AH -j ACCEPT
-  $cmd -$mode input_${confExtZone}_rule -p ESP -j ACCEPT
-  $cmd -$mode input_${confExtZone}_rule -p UDP --dport $confPort -j ACCEPT
-  $cmd -$mode input_${confExtZone}_rule -p UDP --dport $confNATPort -j ACCEPT
-}
-
-setup_sa() {
-  local conf=$confDir/racoon.conf
-  local remote="${2/ *}"
-  local client="${2#* }"
-  local locnet
-  local remnet
-  local p2
-  local data
-
-  test "$2" = "$client" && unset client
-
-  if [ -z "$client" ]; then
-    config_get locnet "$1" local_net
-    config_get remnet "$1" remote_net
-    if [ -z "$locnet" ] || [ -z "$remnet" ]; then
-      $log "Remote and local networks for $1 must be configured ($2)"
-      errno=4; return 4
-    fi
-
-    if [ "$remote" = "anonymous" ]; then
-      echo "sainfo anonymous {" >> $conf
-     else
-      echo "sainfo address $locnet any address $remnet any {" >> $conf
-    fi
-  else
-    echo "sainfo anonymous {" >> $conf
-  fi
-
-  config_get p2 "$1" p2_proposal
-  if [ -z "$p2" ]; then
-    $log "Phase2 proposal must be configured in $1 sainfo"
-    errno=5; return 5
-  fi
-
-  echo "  remoteid $confPh1ID;" >> $conf
-
-  config_get data "$p2" pfs_group
-  test -n "$data" && echo "  pfs_group $data;" >> $conf
-  config_get data "$p2" lifetime 14400
-  test -n "$data" && echo "  lifetime time $data sec;" >> $conf
-  config_get data "$p2" enc_alg
-  test -n "$data" && echo "  encryption_algorithm $data;" >> $conf
-  config_get data "$p2" auth_alg
-  test -n "$data" && echo "  authentication_algorithm $data;" >> $conf
-
-  echo -e "  compression_algorithm deflate;\n}" >> $conf
-
-  if [ "$remote" = "anonymous" ]; then
-    echo -e "mode_cfg {\n  auth_source system;\n  conf_source local;" >> $conf
-
-    config_get data "$1" dns4
-    test -n "$data" && echo "  dns4 $data;" >> $conf
-    config_get data "$1" defdomain
-    test -n "$data" && echo "  default_domain \"$data\";" >> $conf
-
-    data=${remnet%/*}
-    let "data=${data##*.}+1"
-    echo "  network4 ${remnet%.*}.$data;" >> $conf
-
-    let "data=255<<(24-${remnet#*/}+8)&255"
-    echo "  netmask4 255.255.255.$data;" >> $conf
-
-    echo -e "  split_network include $locnet;\n}" >> $conf
-
-  elif [ -z "$client" ]; then
-    config_list_foreach "$1" remote_exclude manage_nonesa add remote "$locnet"
-    config_list_foreach "$1" local_exclude manage_nonesa add local "$remnet"
-    manage_sa add "$locnet" "$remnet" $remote
-    test $? -gt 0 -o $errno -gt 0 && return $errno
-
-    manage_fw add $confIntZone $confExtZone "$remnet"
-  fi
-}
-
-setup_tunnel() {
-  local conf=$confDir/racoon.conf
-  local peerconf=$confDir/peers.txt
-  local data
-  local remote
-  local xauth
-
-  config_get_bool data "$1" enabled 0
-  test "$data" = "0" && return 0
-
-  config_get remote "$1" remote
-  if [ "$remote" = "anonymous" ]; then
-    echo -e "remote anonymous {\n  generate_policy on;" >> $conf
-  else
-    data=$(nslookup "$remote" | awk 'NR == 5 {print $3}')
-    test -n "$data" && remote="$data"
-    echo -e "remote \"$1\" {\n  remote_address $remote;" >> $conf
-    echo "$data" >> $peerconf
-  fi
-
-  config_get data "$1" pre_shared_key ""
-  if [ -n "$data" ]; then
-    if [ "$remote" != "anonymous" ]; then
-      echo "$remote $data" >> $confDir/psk.txt
-    else
-      echo "* $data" >> $confDir/psk.txt
-    fi
-  fi
-
-  let confPh1ID=$confPh1ID+1
-  echo "  ph1id $confPh1ID;" >> $conf
-
-  config_get xauth "$1" username ""
-
-  config_get data "$1" certificate ""
-  if [ -n "$data" ]; then
-    echo -en "  verify_cert on;\n  my_identifier asn1dn;\n  certificate_type x509 " >> $conf
-    echo -en "\"$data.crt\" \"$data.key\";\n  send_cr off;\n  peers_identifier " >> $conf
-  else
-    config_get data "$1" my_id_type ""
-    if [ -n "$data" ]; then
-      echo -n "  my_identifier $data" >> $conf
-      config_get data "$1" my_id ""
-      if [ -n "$data" ]; then
-       echo " \"$data\";" >> $conf
-      elif [ -n "$xauth" ]; then
-       echo " \"$xauth\";" >> $conf
-      else
-       echo ";" >> $conf
-      fi
-    elif [ -n "$xauth" ]; then
-      echo "  my_identifier user_fqdn \"$xauth\";" >> $conf
-    fi
-    echo -n "  peers_identifier " >> $conf
-  fi
-
-  if [ "$remote" = "anonymous" ]; then
-    echo "user_fqdn;" >> $conf
-  else
-    config_get data "$1" peer_id_type "asn1dn"
-    echo -n "$data" >> $conf
-
-    config_get data "$1" peer_id ""
-    test -n "$data" && echo -n " \"$data\"" >> $conf
-
-    echo ";" >> $conf
-  fi
-
-  if [ -n "$xauth" ]; then
-    config_get data "$1" password
-    if [ -z "$data" ]; then
-      $log "Password must be given in $1 tunnel"
-      errno=7; return 7
-    fi
-    echo "$xauth $data" >> $confDir/psk.txt
-
-    echo "  xauth_login \"$xauth\";" >> $conf
-    echo -e "  script \"p1client-up\" phase1_up;\n  script \"p1client-down\" phase1_down;" >> $conf
-  fi
-
-  config_get data "$1" exchange_mode
-  if [ -z "$data" ]; then
-    data=main
-    test -n "$xauth" && data="${data},aggressive"
-  fi
-  echo -e "  exchange_mode $data;\n  nat_traversal on;\n  support_proxy on;" >> $conf
-
-  config_get data "$1" prop_check "obey"
-  test -n "$data" && echo "  proposal_check $data;" >> $conf
-
-  config_get_bool data "$1" weak_p1check 1
-  if [ $data -eq 0 ]; then data=off; else data=on; fi
-  echo "  weak_phase1_check $data;" >> $conf
-
-  config_get_bool data "$1" verify_id 1
-  if [ $data -eq 0 ]; then data=off; else data=on; fi
-  echo "  verify_identifier $data;" >> $conf
-
-  config_get data "$1" dpd_delay ""
-  test -n "$data" && echo "  dpd_delay $data;" >> $conf
-
-  unset data
-  test -n "$xauth" && data="on"
-  config_get data "$1" mode_cfg "$data"
-  test -n "$data" && echo "  mode_cfg $data;" >> $conf
-
-  config_get_bool data "$1" init 0
-  if [ $data -eq 0 ]; then data=off; else data=on; fi
-  echo "  initial_contact $data;" >> $conf
-
-
-  config_list_foreach "$1" p1_proposal setup_p1
-  echo "}" >> $conf
-
-  config_list_foreach "$1" sainfo setup_sa "$remote $xauth"
-}
-
-setup_cert() {
-  local item
-  local data
-
-  for item in key crt ; do
-    config_get data "$1" $item ""
-    test -z "$data" && continue
-
-    echo "$data" |\
-    sed 's/-\+[A-Z ]\+-\+/\n&\n/g' | sed 's/.\{50,50\}/&\n/g' | sed '/^$/d'\
-    > $confDir/cert/$1.$item
-
-    chmod 600 $confDir/cert/$1.$item
-  done
-
-  if [ -s $confDir/cert/$1.crt ]; then
-    data=$(openssl x509 -noout -hash -in $confDir/cert/$1.crt)
-    ln -sf $confDir/cert/$1.crt $confDir/cert/$data.0
-  fi
-}
-
-destroy_sa() {
-  local locnet
-  local remnet
-
-  config_get locnet "$1" local_net
-  config_get remnet "$1" remote_net
-  if [ -z "$locnet" ] || [ -z "$remnet" ]; then
-    $log "Remote and local networks for $1 must be configured"
-    errno=4; return 4
-  fi
-
-  config_list_foreach "$1" remote_exclude manage_nonesa del remote "$locnet"
-  config_list_foreach "$1" local_exclude manage_nonesa del local "$remnet"
-  manage_sa del "$locnet" "$remnet" $2
-  manage_fw del $confIntZone $confExtZone "$remnet"
-}
-
-destroy_tunnel() {
-  local data
-
-  config_get_bool data "$1" enabled 0
-  test "$data" = "0" && return 0
-
-  config_get remote "$1" remote
-  data=$(nslookup "$remote" | awk 'NR == 5 {print $3}')
-  test -n "$data" && remote="$data"
-
-  config_get data "$1" username ""
-  if [ -z "$data" ]; then
-    config_list_foreach "$1" sainfo destroy_sa $remote
-  fi
-}
-
-destroy_conf() {
-  setup_fw del
-}
-
-check_software() {
-  local item
-
-  for item in /usr/sbin/setkey /usr/bin/openssl /usr/sbin/ip ; do
-    if [ ! -x $item ]; then
-      $log "Needed program $item not found, exiting"
-      errno=9; return 9
-    fi
-  done
-}
-
-cleanup_conf() {
-  config_load racoon
-  config_foreach setup_load racoon
-  config_foreach destroy_conf racoon
-  config_foreach destroy_tunnel tunnel
-
-  /usr/sbin/setkey -P -F
-  /usr/sbin/setkey -F
-}
-
-check_dir() {
-  local item
-
-  for item in $confDir $confDir/cert ; do
-    if [ ! -d $item ]; then
-      mkdir -m 0700 -p $item
-    fi
-  done
-}
-
-wait4wanzone() {
-  local item=$connWait
-  local data
-
-  data="$(get_zoneiplist $confExtZone)"
-  while [ $item -gt 0 ]; do
-    test -n "$data" && break
-    sleep 2
-    let "item=$item-1"
-    data="$(get_zoneiplist $confExtZone)"
-  done
-
-  test -z "$data" && return 10
-}
-
-start_service() {
-  check_software
-  test $? -gt 0 -o $errno -gt 0 && exit $errno
-
-  check_dir
-
-  config_load racoon
-  config_foreach setup_load racoon
-
-  config_foreach wait4wanzone racoon
-  if [ $? -gt 0 ] || [ $errno -gt 0 ]; then
-    $log "No active interfaces in $confExtZone zone found, exiting"
-    exit $errno
-  fi
-
-  config_foreach setup_conf racoon
-  test $? -gt 0 -o $errno -gt 0 && exit $errno
-
-  config_foreach setup_tunnel tunnel
-  test $? -gt 0 -o $errno -gt 0 && exit $errno
-
-  config_foreach setup_cert certificate
-
-  procd_open_instance
-  procd_set_param command /usr/sbin/racoon
-  test -n "$confIPMode" && procd_append_param command -$confIPMode
-  procd_append_param command -F -f $confDir/racoon.conf
-  procd_set_param file $confDir/racoon.conf
-  procd_close_instance
-
-  if [ -x /etc/racoon/vpnctl ]; then
-    let connWait=$connWait*2+2
-    ( sleep $connWait; /etc/racoon/vpnctl up ) &
-  fi
-}
-
-service_triggers() {
-  local item
-  local data
-
-  procd_add_reload_trigger "racoon" "network"
-
-  config_load racoon
-  config_foreach setup_load racoon
-
-  data=$(get_zoneiflist $confExtZone)
-  if [ $? -gt 0 ] || [ $errno -gt 0 ] || [ -z "$data" ]; then
-    $log "Can not find interfaces for $confExtZone zone"
-  else
-    for item in $data ; do
-      procd_add_reload_interface_trigger $item
-    done
-  fi
-}
-
-stop_service() {
-  cleanup_conf
-  procd_kill racoon 
-}
-
-trap "cleanup_conf" 1 2 3 4 5 6 7 8 9 10
-
-
-# EOF /etc/init.d/racoon
diff --git a/net/ipsec-tools/files/vpnctl b/net/ipsec-tools/files/vpnctl
deleted file mode 100644 (file)
index 5fb6667..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/sh
-#
-
-case X$1 in
-  Xup|X1|Xstart) connMode=vpn-connect ;;
-  Xdown|X0|Xstop) connMode=vpn-disconnect ;;
-  *)
-    echo "Usage: $0: up|1|start || down|0|stop"
-    exit 1 ;;
-esac
-
-if [ -s /var/racoon/peers.txt ]; then
-  (while read ipa ; do
-    racoonctl $connMode $ipa
-  done) < /var/racoon/peers.txt
-fi
-
-
-# EOF /usr/bin/vpnctl
diff --git a/net/ipsec-tools/patches/001-ipsec-tools-def-psk.patch b/net/ipsec-tools/patches/001-ipsec-tools-def-psk.patch
deleted file mode 100644 (file)
index db5b306..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
---- a/src/racoon/oakley.c
-+++ b/src/racoon/oakley.c
-@@ -2424,8 +2424,21 @@ oakley_skeyid(iph1)
-                               plog(LLV_ERROR, LOCATION, iph1->remote,
-                                       "couldn't find the pskey for %s.\n",
-                                       saddrwop2str(iph1->remote));
-+                      }
-+              }
-+              if (iph1->authstr == NULL) {
-+                      /*
-+                       * If we could not locate a psk above try and locate
-+                       * the default psk, ie, "*".
-+                       */
-+                      iph1->authstr = privsep_getpsk("*", 1);
-+                      if (iph1->authstr == NULL) {
-+                              plog(LLV_ERROR, LOCATION, iph1->remote,
-+                                      "couldn't find the the default pskey either.\n");
-                               goto end;
-                       }
-+                      plog(LLV_NOTIFY, LOCATION, iph1->remote,
-+                                      "Using default PSK.\n");
-               }
-               plog(LLV_DEBUG, LOCATION, NULL, "the psk found.\n");
-               /* should be secret PSK */
diff --git a/net/ipsec-tools/patches/001-no_libfl.patch b/net/ipsec-tools/patches/001-no_libfl.patch
deleted file mode 100644 (file)
index b56b596..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
---- a/src/racoon/cftoken.l
-+++ b/src/racoon/cftoken.l
-@@ -104,6 +104,8 @@ static struct include_stack {
- static int incstackp = 0;
- static int yy_first_time = 1;
-+
-+int yywrap(void) { return 1; }
- %}
- /* common seciton */
---- a/src/setkey/token.l
-+++ b/src/setkey/token.l
-@@ -86,6 +86,8 @@
- #if defined(SADB_X_EALG_AES) && ! defined(SADB_X_EALG_AESCBC)
- #define SADB_X_EALG_AESCBC  SADB_X_EALG_AES
- #endif
-+
-+int yywrap(void) { return 1; }
- %}
- /* common section */
diff --git a/net/ipsec-tools/patches/002-patch8-utmp.patch b/net/ipsec-tools/patches/002-patch8-utmp.patch
deleted file mode 100644 (file)
index 5475390..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
---- a/src/racoon/isakmp_cfg.c
-+++ b/src/racoon/isakmp_cfg.c
-@@ -38,7 +38,7 @@
- #include <sys/socket.h>
- #include <sys/queue.h>
--#include <utmpx.h>
-+#include <utmp.h>
- #if defined(__APPLE__) && defined(__MACH__)
- #include <util.h>
- #endif
-@@ -1664,7 +1664,8 @@ isakmp_cfg_accounting_system(port, raddr
-       int inout;
- {
-       int error = 0;
--      struct utmpx ut;
-+      struct utmp ut;
-+      char term[UT_LINESIZE];
-       char addr[NI_MAXHOST];
-       
-       if (usr == NULL || usr[0]=='\0') {
-@@ -1673,34 +1674,37 @@ isakmp_cfg_accounting_system(port, raddr
-               return -1;
-       }
--      memset(&ut, 0, sizeof ut);
--      gettimeofday((struct timeval *)&ut.ut_tv, NULL);
--      snprintf(ut.ut_id, sizeof ut.ut_id, TERMSPEC, port);
-+      sprintf(term, TERMSPEC, port);
-       switch (inout) {
-       case ISAKMP_CFG_LOGIN:
--              ut.ut_type = USER_PROCESS;
--              strncpy(ut.ut_user, usr, sizeof ut.ut_user);
-+              strncpy(ut.ut_name, usr, UT_NAMESIZE);
-+              ut.ut_name[UT_NAMESIZE - 1] = '\0';
-+              
-+              strncpy(ut.ut_line, term, UT_LINESIZE);
-+              ut.ut_line[UT_LINESIZE - 1] = '\0';
-               GETNAMEINFO_NULL(raddr, addr);
--              strncpy(ut.ut_host, addr, sizeof ut.ut_host);
-+              strncpy(ut.ut_host, addr, UT_HOSTSIZE);
-+              ut.ut_host[UT_HOSTSIZE - 1] = '\0';
-+
-+              ut.ut_time = time(NULL);
-               plog(LLV_INFO, LOCATION, NULL,
-                       "Accounting : '%s' logging on '%s' from %s.\n",
--                      ut.ut_user, ut.ut_id, addr);
--
--              pututxline(&ut);
-+                      ut.ut_name, ut.ut_line, ut.ut_host);
-+              login(&ut);
-+              
-               break;
-       case ISAKMP_CFG_LOGOUT: 
--              ut.ut_type = DEAD_PROCESS;
-               plog(LLV_INFO, LOCATION, NULL,
-                       "Accounting : '%s' unlogging from '%s'.\n",
--                      usr, ut.ut_id);
--
--              pututxline(&ut);
-+                      usr, term);
-+              logout(term);
-+              
-               break;
-       default:
-               plog(LLV_ERROR, LOCATION, NULL, "Unepected inout\n");
diff --git a/net/ipsec-tools/patches/003-microsoft-fqdn-in-main.patch b/net/ipsec-tools/patches/003-microsoft-fqdn-in-main.patch
deleted file mode 100644 (file)
index 7174300..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/src/racoon/ipsec_doi.c
-+++ b/src/racoon/ipsec_doi.c
-@@ -3581,8 +3581,8 @@ ipsecdoi_checkid1(iph1)
-           iph1->approval->authmethod == OAKLEY_ATTR_AUTH_METHOD_PSKEY) {
-                if (id_b->type != IPSECDOI_ID_IPV4_ADDR
-                 && id_b->type != IPSECDOI_ID_IPV6_ADDR) {
--                      plog(LLV_ERROR, LOCATION, NULL,
--                              "Expecting IP address type in main mode, "
-+                      plog(LLV_WARNING, LOCATION, NULL,
-+                              "Expecting IP address type in main mode (RFC2409) , "
-                               "but %s.\n", s_ipsecdoi_ident(id_b->type));
-                       return ISAKMP_NTYPE_INVALID_ID_INFORMATION;
-               }
diff --git a/net/ipsec-tools/patches/005-isakmp-fix.patch b/net/ipsec-tools/patches/005-isakmp-fix.patch
deleted file mode 100644 (file)
index f7aa3c2..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/src/racoon/isakmp.c
-+++ b/src/racoon/isakmp.c
-@@ -31,6 +31,8 @@
-  * SUCH DAMAGE.
-  */
-+#define __packed __attribute__((__packed__))
-+
- #include "config.h"
- #include <sys/types.h>
diff --git a/net/ipsec-tools/patches/006-linux-3.7-compat.patch b/net/ipsec-tools/patches/006-linux-3.7-compat.patch
deleted file mode 100644 (file)
index 46b11ee..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
---- a/configure.ac
-+++ b/configure.ac
-@@ -74,9 +74,10 @@ case "$host_os" in
-           [ KERNEL_INCLUDE="/lib/modules/`uname -r`/build/include" ])
-     AC_CHECK_HEADER($KERNEL_INCLUDE/linux/pfkeyv2.h, ,
--      [ AC_CHECK_HEADER(/usr/src/linux/include/linux/pfkeyv2.h,
--        KERNEL_INCLUDE=/usr/src/linux/include ,
--        [ AC_MSG_ERROR([Unable to find linux-2.6 kernel headers. Aborting.]) ] ) ] )
-+      [ AC_CHECK_HEADER($KERNEL_INCLUDE/uapi/linux/pfkeyv2.h, ,
-+        [ AC_CHECK_HEADER(/usr/src/linux/include/linux/pfkeyv2.h,
-+          KERNEL_INCLUDE=/usr/src/linux/include ,
-+          [ AC_MSG_ERROR([Unable to find linux-2.6 kernel headers. Aborting.]) ] ) ] ) ] )
-     AC_SUBST(KERNEL_INCLUDE)
-     # We need the configure script to run with correct kernel headers.
-     # However we don't want to point to kernel source tree in compile time,
-@@ -643,7 +644,14 @@ AC_EGREP_CPP(yes,
- #ifdef SADB_X_EXT_NAT_T_TYPE
- yes
- #endif
--], [kernel_natt="yes"])
-+], [kernel_natt="yes"], [
-+  AC_EGREP_CPP(yes,
-+  [#include <uapi/linux/pfkeyv2.h>
-+  #ifdef SADB_X_EXT_NAT_T_TYPE
-+  yes
-+  #endif
-+  ], [kernel_natt="yes"])
-+])
-       ;;
- freebsd*|netbsd*)
- # NetBSD case
---- a/src/include-glibc/Makefile.am
-+++ b/src/include-glibc/Makefile.am
-@@ -1,14 +1,7 @@
--
--.includes: ${top_builddir}/config.status
--      ln -snf $(KERNEL_INCLUDE)/linux
--      touch .includes
--
--all: .includes
--
- EXTRA_DIST = \
-   glibc-bugs.h \
-   net/pfkeyv2.h \
-   netinet/ipsec.h \
-   sys/queue.h
--DISTCLEANFILES = .includes linux
-+DISTCLEANFILES = linux
diff --git a/net/ipsec-tools/patches/007-force_have_policy_fwd.patch b/net/ipsec-tools/patches/007-force_have_policy_fwd.patch
deleted file mode 100644 (file)
index 69cd1c0..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
---- a/configure.ac
-+++ b/configure.ac
-@@ -732,7 +732,8 @@ case $host in
-                       ],
-                       [AC_MSG_RESULT(yes)
-                        AC_DEFINE([HAVE_POLICY_FWD], [], [Have forward policy])],
--                      [AC_MSG_RESULT(no)])
-+                      [AC_MSG_RESULT(forced)
-+                       AC_DEFINE([HAVE_POLICY_FWD], [], [Have forward policy])])
-               ;;
-       *)
-               AC_MSG_RESULT(no)
diff --git a/net/ipsec-tools/patches/008-racoon-fix_dereference_crash.patch b/net/ipsec-tools/patches/008-racoon-fix_dereference_crash.patch
deleted file mode 100644 (file)
index 5e3a2d4..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-Fix null dereference in racoon/gssapi.c (CVE-2015-4047)
-
---- a/src/racoon/gssapi.c
-+++ b/src/racoon/gssapi.c
-@@ -192,6 +192,11 @@ gssapi_init(struct ph1handle *iph1)
-       gss_name_t princ, canon_princ;
-       OM_uint32 maj_stat, min_stat;
-+      if (iph1->rmconf == NULL) {
-+              plog(LLV_ERROR, LOCATION, NULL, "no remote config\n");
-+              return -1;
-+      }
-+
-       gps = racoon_calloc(1, sizeof (struct gssapi_ph1_state));
-       if (gps == NULL) {
-               plog(LLV_ERROR, LOCATION, NULL, "racoon_calloc failed\n");
diff --git a/net/ipsec-tools/patches/009-musl-compat.patch b/net/ipsec-tools/patches/009-musl-compat.patch
deleted file mode 100644 (file)
index 85d03f9..0000000
+++ /dev/null
@@ -1,187 +0,0 @@
---- a/src/racoon/grabmyaddr.c
-+++ b/src/racoon/grabmyaddr.c
-@@ -47,7 +47,6 @@
- #include <net/route.h>
- #include <net/if.h>
- #include <net/if_dl.h>
--#include <sys/sysctl.h>
- #define USE_ROUTE
- #endif
---- a/src/racoon/pfkey.c
-+++ b/src/racoon/pfkey.c
-@@ -59,7 +59,6 @@
- #include <sys/param.h>
- #include <sys/socket.h>
- #include <sys/queue.h>
--#include <sys/sysctl.h>
- #include <net/route.h>
- #include <net/pfkeyv2.h>
---- a/src/setkey/setkey.c
-+++ b/src/setkey/setkey.c
-@@ -40,7 +40,6 @@
- #include <sys/socket.h>
- #include <sys/time.h>
- #include <sys/stat.h>
--#include <sys/sysctl.h>
- #include <err.h>
- #include <netinet/in.h>
- #include <net/pfkeyv2.h>
---- a/src/libipsec/ipsec_strerror.h
-+++ b/src/libipsec/ipsec_strerror.h
-@@ -34,6 +34,8 @@
- #ifndef _IPSEC_STRERROR_H
- #define _IPSEC_STRERROR_H
-+#include <sys/cdefs.h>
-+
- extern int __ipsec_errcode;
- extern void __ipsec_set_strerror __P((const char *));
---- a/src/libipsec/libpfkey.h
-+++ b/src/libipsec/libpfkey.h
-@@ -34,6 +34,8 @@
- #ifndef _LIBPFKEY_H
- #define _LIBPFKEY_H
-+#include <sys/cdefs.h>
-+
- #ifndef KAME_LIBPFKEY_H
- #define KAME_LIBPFKEY_H
---- a/src/racoon/backupsa.c
-+++ b/src/racoon/backupsa.c
-@@ -276,9 +276,9 @@ do {                                                               \
-               GETNEXTNUM(sa_args.a_keylen, strtoul);
-               GETNEXTNUM(sa_args.flags, strtoul);
-               GETNEXTNUM(sa_args.l_alloc, strtoul);
--              GETNEXTNUM(sa_args.l_bytes, strtouq);
--              GETNEXTNUM(sa_args.l_addtime, strtouq);
--              GETNEXTNUM(sa_args.l_usetime, strtouq);
-+              GETNEXTNUM(sa_args.l_bytes, strtoull);
-+              GETNEXTNUM(sa_args.l_addtime, strtoull);
-+              GETNEXTNUM(sa_args.l_usetime, strtoull);
-               GETNEXTNUM(sa_args.seq, strtoul);
- #undef GETNEXTNUM
---- a/src/racoon/cftoken.l
-+++ b/src/racoon/cftoken.l
-@@ -77,6 +77,10 @@
- #include "cfparse.h"
-+#ifndef GLOB_TILDE
-+#define GLOB_TILDE 0
-+#endif
-+
- int yyerrorcount = 0;
- #if defined(YIPS_DEBUG)
---- a/src/racoon/logger.h
-+++ b/src/racoon/logger.h
-@@ -34,6 +34,8 @@
- #ifndef _LOGGER_H
- #define _LOGGER_H
-+#include <sys/cdefs.h>
-+
- struct log {
-       int head;
-       int siz;
---- a/src/racoon/misc.h
-+++ b/src/racoon/misc.h
-@@ -34,6 +34,8 @@
- #ifndef _MISC_H
- #define _MISC_H
-+#include <sys/cdefs.h>
-+
- #define BIT2STR(b) bit2str(b, sizeof(b)<<3)
- #ifdef HAVE_FUNC_MACRO
---- a/src/racoon/missing/crypto/sha2/sha2.h
-+++ b/src/racoon/missing/crypto/sha2/sha2.h
-@@ -40,6 +40,8 @@
- #ifndef __SHA2_H__
- #define __SHA2_H__
-+#include <sys/cdefs.h>
-+
- #ifdef __cplusplus
- extern "C" {
- #endif
---- a/src/racoon/netdb_dnssec.h
-+++ b/src/racoon/netdb_dnssec.h
-@@ -34,6 +34,8 @@
- #ifndef _NETDB_DNSSEC_H
- #define _NETDB_DNSSEC_H
-+#include <sys/cdefs.h>
-+
- #ifndef T_CERT
- #define T_CERT        37              /* defined by RFC2538 section 2 */
- #endif
---- a/src/racoon/plog.h
-+++ b/src/racoon/plog.h
-@@ -34,6 +34,8 @@
- #ifndef _PLOG_H
- #define _PLOG_H
-+#include <sys/cdefs.h>
-+
- #ifdef HAVE_STDARG_H
- #include <stdarg.h>
- #else
---- a/src/racoon/str2val.h
-+++ b/src/racoon/str2val.h
-@@ -34,6 +34,8 @@
- #ifndef _STR2VAL_H
- #define _STR2VAL_H
-+#include <sys/cdefs.h>
-+
- extern caddr_t val2str __P((const char *, size_t));
- extern char *str2val __P((const char *, int, size_t *));
---- a/src/racoon/vmbuf.h
-+++ b/src/racoon/vmbuf.h
-@@ -34,6 +34,8 @@
- #ifndef _VMBUF_H
- #define _VMBUF_H
-+#include <sys/cdefs.h>
-+
- /*
-  *    bp      v
-  *    v       v
---- a/src/setkey/extern.h
-+++ b/src/setkey/extern.h
-@@ -1,6 +1,6 @@
- /*    $NetBSD: extern.h,v 1.5 2009/03/06 11:45:03 tteras Exp $        */
--
-+#include <sys/cdefs.h>
- void parse_init __P((void));
- int parse __P((FILE **));
---- a/src/racoon/isakmp_cfg.c
-+++ b/src/racoon/isakmp_cfg.c
-@@ -1694,8 +1694,6 @@ isakmp_cfg_accounting_system(port, raddr
-                       "Accounting : '%s' logging on '%s' from %s.\n",
-                       ut.ut_name, ut.ut_line, ut.ut_host);
--              login(&ut);
--              
-               break;
-       case ISAKMP_CFG_LOGOUT: 
-@@ -1703,8 +1701,6 @@ isakmp_cfg_accounting_system(port, raddr
-                       "Accounting : '%s' unlogging from '%s'.\n",
-                       usr, term);
--              logout(term);
--              
-               break;
-       default:
-               plog(LLV_ERROR, LOCATION, NULL, "Unepected inout\n");
diff --git a/net/ipsec-tools/patches/010-CVE-2016-10396.patch b/net/ipsec-tools/patches/010-CVE-2016-10396.patch
deleted file mode 100644 (file)
index 110b86c..0000000
+++ /dev/null
@@ -1,201 +0,0 @@
-Description: Fix remotely exploitable DoS. http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-10396
-Source: vendor; https://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=51682
-Bug-debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=867986
-
-Index: ipsec-tools-0.8.2/src/racoon/isakmp_frag.c
-===================================================================
---- ipsec-tools-0.8.2.orig/src/racoon/isakmp_frag.c
-+++ ipsec-tools-0.8.2/src/racoon/isakmp_frag.c
-@@ -1,4 +1,4 @@
--/*    $NetBSD: isakmp_frag.c,v 1.5 2009/04/22 11:24:20 tteras Exp $   */
-+/*    $NetBSD: isakmp_frag.c,v 1.5.36.1 2017/04/21 16:50:42 bouyer Exp $      */
- /* Id: isakmp_frag.c,v 1.4 2004/11/13 17:31:36 manubsd Exp */
-@@ -173,6 +173,43 @@ vendorid_frag_cap(gen)
-       return ntohl(hp[MD5_DIGEST_LENGTH / sizeof(*hp)]);
- }
-+static int 
-+isakmp_frag_insert(struct ph1handle *iph1, struct isakmp_frag_item *item)
-+{
-+      struct isakmp_frag_item *pitem = NULL;
-+      struct isakmp_frag_item *citem = iph1->frag_chain;
-+
-+      /* no frag yet, just insert at beginning of list */
-+      if (iph1->frag_chain == NULL) {
-+              iph1->frag_chain = item;
-+              return 0;
-+      }
-+
-+      do {
-+              /* duplicate fragment number, abort (CVE-2016-10396) */
-+              if (citem->frag_num == item->frag_num)
-+                      return -1;
-+
-+              /* need to insert before current item */
-+              if (citem->frag_num > item->frag_num) {
-+                      if (pitem != NULL)
-+                              pitem->frag_next = item;
-+                      else
-+                              /* insert at the beginning of the list  */
-+                              iph1->frag_chain = item;
-+                      item->frag_next = citem;
-+                      return 0;
-+              }
-+
-+              pitem = citem;
-+              citem = citem->frag_next;
-+      } while (citem != NULL);
-+
-+      /* we reached the end of the list, insert */
-+      pitem->frag_next = item;
-+      return 0;
-+}
-+
- int 
- isakmp_frag_extract(iph1, msg)
-       struct ph1handle *iph1;
-@@ -224,39 +261,43 @@ isakmp_frag_extract(iph1, msg)
-       item->frag_next = NULL;
-       item->frag_packet = buf;
--      /* Look for the last frag while inserting the new item in the chain */
--      if (item->frag_last)
--              last_frag = item->frag_num;
-+      /* Check for the last frag before inserting the new item in the chain */
-+      if (item->frag_last) {
-+              /* if we have the last fragment, indices must match */
-+              if (iph1->frag_last_index != 0 &&
-+                  item->frag_last != iph1->frag_last_index) {
-+                      plog(LLV_ERROR, LOCATION, NULL,
-+                           "Repeated last fragment index mismatch\n");
-+                      racoon_free(item);
-+                      vfree(buf);
-+                      return -1;
-+              }
--      if (iph1->frag_chain == NULL) {
--              iph1->frag_chain = item;
--      } else {
--              struct isakmp_frag_item *current;
-+              last_frag = iph1->frag_last_index = item->frag_num;
-+      }
--              current = iph1->frag_chain;
--              while (current->frag_next) {
--                      if (current->frag_last)
--                              last_frag = item->frag_num;
--                      current = current->frag_next;
--              }
--              current->frag_next = item;
-+      /* insert fragment into chain */
-+      if (isakmp_frag_insert(iph1, item) == -1) {
-+              plog(LLV_ERROR, LOCATION, NULL,
-+                  "Repeated fragment index mismatch\n");
-+              racoon_free(item);
-+              vfree(buf);
-+              return -1;
-       }
--      /* If we saw the last frag, check if the chain is complete */
-+      /* If we saw the last frag, check if the chain is complete
-+       * we have a sorted list now, so just walk through */
-       if (last_frag != 0) {
-+              item = iph1->frag_chain;
-               for (i = 1; i <= last_frag; i++) {
--                      item = iph1->frag_chain;
--                      do {
--                              if (item->frag_num == i)
--                                      break;
--                              item = item->frag_next;
--                      } while (item != NULL);
--
-+                      if (item->frag_num != i)
-+                              break;
-+                      item = item->frag_next;
-                       if (item == NULL) /* Not found */
-                               break;
-               }
--              if (item != NULL) /* It is complete */
-+              if (i > last_frag) /* It is complete */
-                       return 1;
-       }
-               
-@@ -291,15 +332,9 @@ isakmp_frag_reassembly(iph1)
-       }
-       data = buf->v;
-+      item = iph1->frag_chain;
-       for (i = 1; i <= frag_count; i++) {
--              item = iph1->frag_chain;
--              do {
--                      if (item->frag_num == i)
--                              break;
--                      item = item->frag_next;
--              } while (item != NULL);
--
--              if (item == NULL) {
-+              if (item->frag_num != i) {
-                       plog(LLV_ERROR, LOCATION, NULL, 
-                           "Missing fragment #%d\n", i);
-                       vfree(buf);
-@@ -308,6 +343,7 @@ isakmp_frag_reassembly(iph1)
-               }
-               memcpy(data, item->frag_packet->v, item->frag_packet->l);
-               data += item->frag_packet->l;
-+              item = item->frag_next;
-       }
- out:
-Index: ipsec-tools-0.8.2/src/racoon/isakmp_inf.c
-===================================================================
---- ipsec-tools-0.8.2.orig/src/racoon/isakmp_inf.c
-+++ ipsec-tools-0.8.2/src/racoon/isakmp_inf.c
-@@ -720,6 +720,7 @@ isakmp_info_send_nx(isakmp, remote, loca
- #endif
- #ifdef ENABLE_FRAG
-       iph1->frag = 0;
-+      iph1->frag_last_index = 0;
-       iph1->frag_chain = NULL;
- #endif
-Index: ipsec-tools-0.8.2/src/racoon/isakmp.c
-===================================================================
---- ipsec-tools-0.8.2.orig/src/racoon/isakmp.c
-+++ ipsec-tools-0.8.2/src/racoon/isakmp.c
-@@ -1071,6 +1071,7 @@ isakmp_ph1begin_i(rmconf, remote, local)
-               iph1->frag = 1;
-       else
-               iph1->frag = 0;
-+      iph1->frag_last_index = 0;
-       iph1->frag_chain = NULL;
- #endif
-       iph1->approval = NULL;
-@@ -1175,6 +1176,7 @@ isakmp_ph1begin_r(msg, remote, local, et
- #endif
- #ifdef ENABLE_FRAG
-       iph1->frag = 0;
-+      iph1->frag_last_index = 0;
-       iph1->frag_chain = NULL;
- #endif
-       iph1->approval = NULL;
-Index: ipsec-tools-0.8.2/src/racoon/handler.h
-===================================================================
---- ipsec-tools-0.8.2.orig/src/racoon/handler.h
-+++ ipsec-tools-0.8.2/src/racoon/handler.h
-@@ -1,4 +1,4 @@
--/*    $NetBSD: handler.h,v 1.25 2010/11/17 10:40:41 tteras Exp $      */
-+/*    $NetBSD: handler.h,v 1.26 2017/01/24 19:23:56 christos Exp $    */
- /* Id: handler.h,v 1.19 2006/02/25 08:25:12 manubsd Exp */
-@@ -141,6 +141,7 @@ struct ph1handle {
- #endif
- #ifdef ENABLE_FRAG
-       int frag;                       /* IKE phase 1 fragmentation */
-+      int frag_last_index;
-       struct isakmp_frag_item *frag_chain;    /* Received fragments */
- #endif
diff --git a/net/ipsec-tools/patches/012-fix-implicit-int.patch b/net/ipsec-tools/patches/012-fix-implicit-int.patch
deleted file mode 100644 (file)
index 1fa7cb2..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/src/racoon/isakmp_xauth.c
-+++ b/src/racoon/isakmp_xauth.c
-@@ -376,6 +376,7 @@ xauth_reply(iph1, port, id, res)
-       struct ph1handle *iph1;
-       int port;
-       int id;
-+      int res;
- {
-       struct xauth_state *xst = &iph1->mode_cfg->xauth;
-       char *usr = xst->authdata.generic.usr;
-
diff --git a/net/ipsec-tools/patches/015-openssl-1.1.patch b/net/ipsec-tools/patches/015-openssl-1.1.patch
deleted file mode 100644 (file)
index 5d55c59..0000000
+++ /dev/null
@@ -1,1096 +0,0 @@
-From 071fec7181255b9234add44865a435dfdefee520 Mon Sep 17 00:00:00 2001
-In-Reply-To: <20180528120513.560-1-cote2004-github@yahoo.com>
-References: <20180528120513.560-1-cote2004-github@yahoo.com>
-From: Eneas U de Queiroz <cote2004-github@yahoo.com>
-Date: Wed, 30 May 2018 15:42:20 -0300
-Subject: [PATCH v2 1/1] ipsec-tools: add openssl 1.1 support
-To: equeiroz@troianet.com.br
-
-This patch updates the calls to openssl 1.1 API, and adds a
-compatibility layer so it compiles with (at least) openssl 1.0.2, I
-haven't tested it with lower versions, but all that's needed is to edit
-the openssl_compat.* files and add the missing functions there--they're
-usually trivial.
-
-Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
----
- src/racoon/Makefile.am      |  10 +--
- src/racoon/algorithm.c      |   6 +-
- src/racoon/cfparse.y        |   2 +-
- src/racoon/crypto_openssl.c | 197 +++++++++++++++++++++-------------------
- src/racoon/crypto_openssl.h |   2 +-
- src/racoon/eaytest.c        |   7 +-
- src/racoon/ipsec_doi.c      |   2 +-
- src/racoon/openssl_compat.c | 213 ++++++++++++++++++++++++++++++++++++++++++++
- src/racoon/openssl_compat.h |  45 ++++++++++
- src/racoon/plainrsa-gen.c   |  41 +++++----
- src/racoon/prsa_par.y       |  28 ++++--
- src/racoon/rsalist.c        |   5 +-
- 12 files changed, 431 insertions(+), 127 deletions(-)
- create mode 100644 src/racoon/openssl_compat.c
- create mode 100644 src/racoon/openssl_compat.h
-
-diff --git a/src/racoon/Makefile.am b/src/racoon/Makefile.am
-index dbaded9..4c585f3 100644
---- a/src/racoon/Makefile.am
-+++ b/src/racoon/Makefile.am
-@@ -4,7 +4,7 @@ sbin_PROGRAMS = racoon racoonctl plainrsa-gen
- noinst_PROGRAMS = eaytest
- include_racoon_HEADERS = racoonctl.h var.h vmbuf.h misc.h gcmalloc.h admin.h \
-       schedule.h sockmisc.h isakmp_var.h isakmp.h isakmp_xauth.h \
--      isakmp_cfg.h isakmp_unity.h ipsec_doi.h evt.h
-+      isakmp_cfg.h isakmp_unity.h ipsec_doi.h evt.h openssl_compat.h
- lib_LTLIBRARIES = libracoon.la
- adminsockdir=${localstatedir}/racoon
-@@ -32,7 +32,7 @@ racoon_SOURCES = \
-       gssapi.c dnssec.c getcertsbyname.c privsep.c \
-       pfkey.c admin.c evt.c ipsec_doi.c oakley.c grabmyaddr.c vendorid.c \
-       policy.c localconf.c remoteconf.c crypto_openssl.c algorithm.c \
--      proposal.c sainfo.c strnames.c \
-+      openssl_compat.c proposal.c sainfo.c strnames.c \
-       plog.c logger.c schedule.c str2val.c \
-       safefile.c backupsa.c genlist.c rsalist.c \
-       cftoken.l cfparse.y prsa_tok.l prsa_par.y 
-@@ -51,12 +51,12 @@ libracoon_la_SOURCES = kmpstat.c vmbuf.c sockmisc.c misc.c
- libracoon_la_CFLAGS = -DNOUSE_PRIVSEP $(AM_CFLAGS)
- plainrsa_gen_SOURCES = plainrsa-gen.c plog.c \
--      crypto_openssl.c logger.c 
-+      crypto_openssl.c logger.c openssl_compat.c
- EXTRA_plainrsa_gen_SOURCES = $(MISSING_ALGOS)
- plainrsa_gen_LDADD = $(CRYPTOBJS) vmbuf.o misc.o
- plainrsa_gen_DEPENDENCIES = $(CRYPTOBJS) vmbuf.o misc.o
--eaytest_SOURCES = eaytest.c plog.c logger.c
-+eaytest_SOURCES = eaytest.c plog.c logger.c openssl_compat.c
- EXTRA_eaytest_SOURCES = missing/crypto/sha2/sha2.c
- eaytest_LDADD =       crypto_openssl_test.o vmbuf.o str2val.o misc_noplog.o \
-       $(CRYPTOBJS)
-@@ -75,7 +75,7 @@ noinst_HEADERS = \
-       debugrm.h         isakmp.h      misc.h          sainfo.h \
-       dhgroup.h         isakmp_agg.h  netdb_dnssec.h  schedule.h \
-       isakmp_cfg.h      isakmp_xauth.h isakmp_unity.h isakmp_frag.h \
--      throttle.h        privsep.h \
-+      throttle.h        privsep.h     openssl_compat.h \
-       cfparse_proto.h   cftoken_proto.h genlist.h     rsalist.h \
-       missing/crypto/sha2/sha2.h missing/crypto/rijndael/rijndael_local.h \
-       missing/crypto/rijndael/rijndael-api-fst.h \
-diff --git a/src/racoon/algorithm.c b/src/racoon/algorithm.c
-index 3fd50f6..66c874b 100644
---- a/src/racoon/algorithm.c
-+++ b/src/racoon/algorithm.c
-@@ -128,7 +128,7 @@ static struct enc_algorithm oakley_encdef[] = {
- { "aes",      algtype_aes,    OAKLEY_ATTR_ENC_ALG_AES,        16,
-               eay_aes_encrypt,        eay_aes_decrypt,
-               eay_aes_weakkey,        eay_aes_keylen, },
--#ifdef HAVE_OPENSSL_CAMELLIA_H
-+#if defined(HAVE_OPENSSL_CAMELLIA_H) && ! defined(OPENSSL_NO_CAMELLIA)
- { "camellia", algtype_camellia,       OAKLEY_ATTR_ENC_ALG_CAMELLIA,   16,
-               eay_camellia_encrypt,   eay_camellia_decrypt,
-               eay_camellia_weakkey,   eay_camellia_keylen, },
-@@ -168,7 +168,7 @@ static struct enc_algorithm ipsec_encdef[] = {
- { "twofish",  algtype_twofish,        IPSECDOI_ESP_TWOFISH,           16,
-               NULL,                   NULL,
-               NULL,                   eay_twofish_keylen, },
--#ifdef HAVE_OPENSSL_IDEA_H
-+#if defined(HAVE_OPENSSL_IDEA_H) && ! defined(OPENSSL_NO_IDEA)
- { "3idea",    algtype_3idea,          IPSECDOI_ESP_3IDEA,             8,
-               NULL,                   NULL,
-               NULL,                   NULL, },
-@@ -179,7 +179,7 @@ static struct enc_algorithm ipsec_encdef[] = {
- { "rc4",      algtype_rc4,            IPSECDOI_ESP_RC4,               8,
-               NULL,                   NULL,
-               NULL,                   NULL, },
--#ifdef HAVE_OPENSSL_CAMELLIA_H
-+#if defined(HAVE_OPENSSL_CAMELLIA_H) && ! defined(OPENSSL_NO_CAMELLIA)
- { "camellia", algtype_camellia,       IPSECDOI_ESP_CAMELLIA,          16,
-               NULL,                   NULL,
-               NULL,                   eay_camellia_keylen, },
-diff --git a/src/racoon/cfparse.y b/src/racoon/cfparse.y
-index 0d9bd67..8415752 100644
---- a/src/racoon/cfparse.y
-+++ b/src/racoon/cfparse.y
-@@ -2564,7 +2564,7 @@ set_isakmp_proposal(rmconf)
-               plog(LLV_DEBUG2, LOCATION, NULL,
-                       "encklen=%d\n", s->encklen);
--              memset(types, 0, ARRAYLEN(types));
-+              memset(types, 0, sizeof types);
-               types[algclass_isakmp_enc] = s->algclass[algclass_isakmp_enc];
-               types[algclass_isakmp_hash] = s->algclass[algclass_isakmp_hash];
-               types[algclass_isakmp_dh] = s->algclass[algclass_isakmp_dh];
-diff --git a/src/racoon/crypto_openssl.c b/src/racoon/crypto_openssl.c
-index 55b076a..8fb358f 100644
---- a/src/racoon/crypto_openssl.c
-+++ b/src/racoon/crypto_openssl.c
-@@ -90,6 +90,7 @@
- #endif
- #endif
- #include "plog.h"
-+#include "openssl_compat.h"
- #define USE_NEW_DES_API
-@@ -316,9 +317,12 @@ eay_cmp_asn1dn(n1, n2)
-                       i = idx+1;
-                       goto end;
-               }
--              if ((ea->value->length == 1 && ea->value->data[0] == '*') ||
--                  (eb->value->length == 1 && eb->value->data[0] == '*')) {
--                      if (OBJ_cmp(ea->object,eb->object)) {
-+              ASN1_STRING *sa = X509_NAME_ENTRY_get_data(ea);
-+              ASN1_STRING *sb = X509_NAME_ENTRY_get_data(eb);
-+              if ((ASN1_STRING_length(sa) == 1 && ASN1_STRING_get0_data(sa)[0] == '*') ||
-+                  (ASN1_STRING_length(sb) == 1 && ASN1_STRING_get0_data(sb)[0] == '*')) {
-+                      if (OBJ_cmp(X509_NAME_ENTRY_get_object(ea),
-+                                  X509_NAME_ENTRY_get_object(eb))) {
-                               i = idx+1;
-                               goto end;
-                       }
-@@ -430,7 +434,7 @@ cb_check_cert_local(ok, ctx)
-       if (!ok) {
-               X509_NAME_oneline(
--                              X509_get_subject_name(ctx->current_cert),
-+                              X509_get_subject_name(X509_STORE_CTX_get_current_cert(ctx)),
-                               buf,
-                               256);
-               /*
-@@ -438,7 +442,8 @@ cb_check_cert_local(ok, ctx)
-                * ok if they are self signed. But we should still warn
-                * the user.
-                */
--              switch (ctx->error) {
-+              int ctx_error = X509_STORE_CTX_get_error(ctx);
-+              switch (ctx_error) {
-               case X509_V_ERR_CERT_HAS_EXPIRED:
-               case X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT:
-               case X509_V_ERR_INVALID_CA:
-@@ -453,9 +458,9 @@ cb_check_cert_local(ok, ctx)
-               }
-               plog(log_tag, LOCATION, NULL,
-                       "%s(%d) at depth:%d SubjectName:%s\n",
--                      X509_verify_cert_error_string(ctx->error),
--                      ctx->error,
--                      ctx->error_depth,
-+                      X509_verify_cert_error_string(ctx_error),
-+                      ctx_error,
-+                      X509_STORE_CTX_get_error_depth(ctx),
-                       buf);
-       }
-       ERR_clear_error();
-@@ -477,10 +482,11 @@ cb_check_cert_remote(ok, ctx)
-       if (!ok) {
-               X509_NAME_oneline(
--                              X509_get_subject_name(ctx->current_cert),
-+                              X509_get_subject_name(X509_STORE_CTX_get_current_cert(ctx)),
-                               buf,
-                               256);
--              switch (ctx->error) {
-+              int ctx_error=X509_STORE_CTX_get_error(ctx);
-+              switch (ctx_error) {
-               case X509_V_ERR_UNABLE_TO_GET_CRL:
-                       ok = 1;
-                       log_tag = LLV_WARNING;
-@@ -490,9 +496,9 @@ cb_check_cert_remote(ok, ctx)
-               }
-               plog(log_tag, LOCATION, NULL,
-                       "%s(%d) at depth:%d SubjectName:%s\n",
--                      X509_verify_cert_error_string(ctx->error),
--                      ctx->error,
--                      ctx->error_depth,
-+                      X509_verify_cert_error_string(ctx_error),
-+                      ctx_error,
-+                      X509_STORE_CTX_get_error_depth(ctx),
-                       buf);
-       }
-       ERR_clear_error();
-@@ -516,14 +522,15 @@ eay_get_x509asn1subjectname(cert)
-       if (x509 == NULL)
-               goto error;
-+      X509_NAME *subject_name = X509_get_subject_name(x509);
-       /* get the length of the name */
--      len = i2d_X509_NAME(x509->cert_info->subject, NULL);
-+      len = i2d_X509_NAME(subject_name, NULL);
-       name = vmalloc(len);
-       if (!name)
-               goto error;
-       /* get the name */
-       bp = (unsigned char *) name->v;
--      len = i2d_X509_NAME(x509->cert_info->subject, &bp);
-+      len = i2d_X509_NAME(subject_name, &bp);
-       X509_free(x509);
-@@ -661,15 +668,16 @@ eay_get_x509asn1issuername(cert)
-       if (x509 == NULL)
-               goto error;
-+      X509_NAME *issuer_name = X509_get_issuer_name(x509);
-       /* get the length of the name */
--      len = i2d_X509_NAME(x509->cert_info->issuer, NULL);
-+      len = i2d_X509_NAME(issuer_name, NULL);
-       name = vmalloc(len);
-       if (name == NULL)
-               goto error;
-       /* get the name */
-       bp = (unsigned char *) name->v;
--      len = i2d_X509_NAME(x509->cert_info->issuer, &bp);
-+      len = i2d_X509_NAME(issuer_name, &bp);
-       X509_free(x509);
-@@ -850,7 +858,7 @@ eay_check_x509sign(source, sig, cert)
-               return -1;
-       }
--      res = eay_rsa_verify(source, sig, evp->pkey.rsa);
-+      res = eay_rsa_verify(source, sig, EVP_PKEY_get0_RSA(evp));
-       EVP_PKEY_free(evp);
-       X509_free(x509);
-@@ -992,7 +1000,7 @@ eay_get_x509sign(src, privkey)
-       if (evp == NULL)
-               return NULL;
--      sig = eay_rsa_sign(src, evp->pkey.rsa);
-+      sig = eay_rsa_sign(src, EVP_PKEY_get0_RSA(evp));
-       EVP_PKEY_free(evp);
-@@ -1079,7 +1087,11 @@ eay_strerror()
-       int line, flags;
-       unsigned long es;
-+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
-+      es = 0; /* even when allowed by OPENSSL_API_COMPAT, it is defined as 0 */
-+#else
-       es = CRYPTO_thread_id();
-+#endif
-       while ((l = ERR_get_error_line_data(&file, &line, &data, &flags)) != 0){
-               n = snprintf(ebuf + len, sizeof(ebuf) - len,
-@@ -1100,7 +1112,7 @@ vchar_t *
- evp_crypt(vchar_t *data, vchar_t *key, vchar_t *iv, const EVP_CIPHER *e, int enc)
- {
-       vchar_t *res;
--      EVP_CIPHER_CTX ctx;
-+      EVP_CIPHER_CTX *ctx;
-       if (!e)
-               return NULL;
-@@ -1111,7 +1123,7 @@ evp_crypt(vchar_t *data, vchar_t *key, vchar_t *iv, const EVP_CIPHER *e, int enc
-       if ((res = vmalloc(data->l)) == NULL)
-               return NULL;
--      EVP_CIPHER_CTX_init(&ctx);
-+      ctx = EVP_CIPHER_CTX_new();
-       switch(EVP_CIPHER_nid(e)){
-       case NID_bf_cbc:
-@@ -1125,54 +1137,41 @@ evp_crypt(vchar_t *data, vchar_t *key, vchar_t *iv, const EVP_CIPHER *e, int enc
-               /* XXX: can we do that also for algos with a fixed key size ?
-                */
-               /* init context without key/iv
--         */
--        if (!EVP_CipherInit(&ctx, e, NULL, NULL, enc))
--        {
--            OpenSSL_BUG();
--            vfree(res);
--            return NULL;
--        }
-+                 */
-+              if (!EVP_CipherInit(ctx, e, NULL, NULL, enc))
-+                      goto out;
-               
--        /* update key size
--         */
--        if (!EVP_CIPHER_CTX_set_key_length(&ctx, key->l))
--        {
--            OpenSSL_BUG();
--            vfree(res);
--            return NULL;
--        }
--
--        /* finalize context init with desired key size
--         */
--        if (!EVP_CipherInit(&ctx, NULL, (u_char *) key->v,
-+              /* update key size
-+               */
-+              if (!EVP_CIPHER_CTX_set_key_length(ctx, key->l))
-+                      goto out;
-+
-+              /* finalize context init with desired key size
-+               */
-+              if (!EVP_CipherInit(ctx, NULL, (u_char *) key->v,
-                                                       (u_char *) iv->v, enc))
--        {
--            OpenSSL_BUG();
--            vfree(res);
--            return NULL;
--              }
-+                      goto out;
-               break;
-       default:
--              if (!EVP_CipherInit(&ctx, e, (u_char *) key->v, 
--                                                      (u_char *) iv->v, enc)) {
--                      OpenSSL_BUG();
--                      vfree(res);
--                      return NULL;
--              }
-+              if (!EVP_CipherInit(ctx, e, (u_char *) key->v,
-+                                                      (u_char *) iv->v, enc))
-+                      goto out;
-       }
-       /* disable openssl padding */
--      EVP_CIPHER_CTX_set_padding(&ctx, 0); 
-+      EVP_CIPHER_CTX_set_padding(ctx, 0);
-       
--      if (!EVP_Cipher(&ctx, (u_char *) res->v, (u_char *) data->v, data->l)) {
--              OpenSSL_BUG();
--              vfree(res);
--              return NULL;
--      }
-+      if (!EVP_Cipher(ctx, (u_char *) res->v, (u_char *) data->v, data->l))
-+              goto out;
--      EVP_CIPHER_CTX_cleanup(&ctx);
-+      EVP_CIPHER_CTX_free(ctx);
-       return res;
-+out:
-+      EVP_CIPHER_CTX_free(ctx);
-+      OpenSSL_BUG();
-+      vfree(res);
-+      return NULL;
- }
- int
-@@ -1230,7 +1229,7 @@ eay_des_keylen(len)
-       return evp_keylen(len, EVP_des_cbc());
- }
--#ifdef HAVE_OPENSSL_IDEA_H
-+#if defined(HAVE_OPENSSL_IDEA_H) && ! defined(OPENSSL_NO_IDEA)
- /*
-  * IDEA-CBC
-  */
-@@ -1587,7 +1586,7 @@ eay_aes_keylen(len)
-       return len;
- }
--#if defined(HAVE_OPENSSL_CAMELLIA_H)
-+#if defined(HAVE_OPENSSL_CAMELLIA_H) && ! defined(OPENSSL_NO_CAMELLIA)
- /*
-  * CAMELLIA-CBC
-  */
-@@ -1680,9 +1679,9 @@ eay_hmac_init(key, md)
-       vchar_t *key;
-       const EVP_MD *md;
- {
--      HMAC_CTX *c = racoon_malloc(sizeof(*c));
-+      HMAC_CTX *c = HMAC_CTX_new();
--      HMAC_Init(c, key->v, key->l, md);
-+      HMAC_Init_ex(c, key->v, key->l, md, NULL);
-       return (caddr_t)c;
- }
-@@ -1761,8 +1760,7 @@ eay_hmacsha2_512_final(c)
-       HMAC_Final((HMAC_CTX *)c, (unsigned char *) res->v, &l);
-       res->l = l;
--      HMAC_cleanup((HMAC_CTX *)c);
--      (void)racoon_free(c);
-+      HMAC_CTX_free((HMAC_CTX *)c);
-       if (SHA512_DIGEST_LENGTH != res->l) {
-               plog(LLV_ERROR, LOCATION, NULL,
-@@ -1811,8 +1809,7 @@ eay_hmacsha2_384_final(c)
-       HMAC_Final((HMAC_CTX *)c, (unsigned char *) res->v, &l);
-       res->l = l;
--      HMAC_cleanup((HMAC_CTX *)c);
--      (void)racoon_free(c);
-+      HMAC_CTX_free((HMAC_CTX *)c);
-       if (SHA384_DIGEST_LENGTH != res->l) {
-               plog(LLV_ERROR, LOCATION, NULL,
-@@ -1861,8 +1858,7 @@ eay_hmacsha2_256_final(c)
-       HMAC_Final((HMAC_CTX *)c, (unsigned char *) res->v, &l);
-       res->l = l;
--      HMAC_cleanup((HMAC_CTX *)c);
--      (void)racoon_free(c);
-+      HMAC_CTX_free((HMAC_CTX *)c);
-       if (SHA256_DIGEST_LENGTH != res->l) {
-               plog(LLV_ERROR, LOCATION, NULL,
-@@ -1912,8 +1908,7 @@ eay_hmacsha1_final(c)
-       HMAC_Final((HMAC_CTX *)c, (unsigned char *) res->v, &l);
-       res->l = l;
--      HMAC_cleanup((HMAC_CTX *)c);
--      (void)racoon_free(c);
-+      HMAC_CTX_free((HMAC_CTX *)c);
-       if (SHA_DIGEST_LENGTH != res->l) {
-               plog(LLV_ERROR, LOCATION, NULL,
-@@ -1962,8 +1957,7 @@ eay_hmacmd5_final(c)
-       HMAC_Final((HMAC_CTX *)c, (unsigned char *) res->v, &l);
-       res->l = l;
--      HMAC_cleanup((HMAC_CTX *)c);
--      (void)racoon_free(c);
-+      HMAC_CTX_free((HMAC_CTX *)c);
-       if (MD5_DIGEST_LENGTH != res->l) {
-               plog(LLV_ERROR, LOCATION, NULL,
-@@ -2266,6 +2260,7 @@ eay_dh_generate(prime, g, publen, pub, priv)
-       u_int32_t g;
- {
-       BIGNUM *p = NULL;
-+      BIGNUM *BNg = NULL;
-       DH *dh = NULL;
-       int error = -1;
-@@ -2276,25 +2271,28 @@ eay_dh_generate(prime, g, publen, pub, priv)
-       if ((dh = DH_new()) == NULL)
-               goto end;
--      dh->p = p;
--      p = NULL;       /* p is now part of dh structure */
--      dh->g = NULL;
--      if ((dh->g = BN_new()) == NULL)
-+      if ((BNg = BN_new()) == NULL)
-               goto end;
--      if (!BN_set_word(dh->g, g))
-+      if (!BN_set_word(BNg, g))
-               goto end;
-+      if (! DH_set0_pqg(dh, p, NULL, BNg))
-+              goto end;
-+      BNg = NULL;
-+      p = NULL;       /* p is now part of dh structure */
-       if (publen != 0)
--              dh->length = publen;
-+              DH_set_length(dh, publen);
-       /* generate public and private number */
-       if (!DH_generate_key(dh))
-               goto end;
-       /* copy results to buffers */
--      if (eay_bn2v(pub, dh->pub_key) < 0)
-+      BIGNUM *pub_key, *priv_key;
-+      DH_get0_key(dh, (const BIGNUM**) &pub_key, (const BIGNUM**) &priv_key);
-+      if (eay_bn2v(pub, pub_key) < 0)
-               goto end;
--      if (eay_bn2v(priv, dh->priv_key) < 0) {
-+      if (eay_bn2v(priv, priv_key) < 0) {
-               vfree(*pub);
-               goto end;
-       }
-@@ -2306,6 +2304,8 @@ end:
-               DH_free(dh);
-       if (p != 0)
-               BN_free(p);
-+      if (BNg != 0)
-+              BN_free(BNg);
-       return(error);
- }
-@@ -2319,6 +2319,10 @@ eay_dh_compute(prime, g, pub, priv, pub2, key)
-       int l;
-       unsigned char *v = NULL;
-       int error = -1;
-+      BIGNUM *p = BN_new();
-+      BIGNUM *BNg = BN_new();
-+      BIGNUM *pub_key = BN_new();
-+      BIGNUM *priv_key = BN_new();
-       /* make public number to compute */
-       if (eay_v2bn(&dh_pub, pub2) < 0)
-@@ -2327,19 +2331,21 @@ eay_dh_compute(prime, g, pub, priv, pub2, key)
-       /* make DH structure */
-       if ((dh = DH_new()) == NULL)
-               goto end;
--      if (eay_v2bn(&dh->p, prime) < 0)
-+      if (p == NULL || BNg == NULL || pub_key == NULL || priv_key == NULL)
-               goto end;
--      if (eay_v2bn(&dh->pub_key, pub) < 0)
-+
-+      if (eay_v2bn(&p, prime) < 0)
-               goto end;
--      if (eay_v2bn(&dh->priv_key, priv) < 0)
-+      if (eay_v2bn(&pub_key, pub) < 0)
-               goto end;
--      dh->length = pub2->l * 8;
--
--      dh->g = NULL;
--      if ((dh->g = BN_new()) == NULL)
-+      if (eay_v2bn(&priv_key, priv) < 0)
-               goto end;
--      if (!BN_set_word(dh->g, g))
-+      if (!BN_set_word(BNg, g))
-               goto end;
-+      DH_set0_key(dh, pub_key, priv_key);
-+      DH_set_length(dh, pub2->l * 8);
-+      DH_set0_pqg(dh, p, NULL, BNg);
-+      pub_key = priv_key = p = BNg = NULL;
-       if ((v = racoon_calloc(prime->l, sizeof(u_char))) == NULL)
-               goto end;
-@@ -2350,6 +2356,14 @@ eay_dh_compute(prime, g, pub, priv, pub2, key)
-       error = 0;
- end:
-+      if (p != NULL)
-+              BN_free(p);
-+      if (BNg != NULL)
-+              BN_free(BNg);
-+      if (pub_key != NULL)
-+              BN_free(pub_key);
-+      if (priv_key != NULL)
-+              BN_free(priv_key);
-       if (dh_pub != NULL)
-               BN_free(dh_pub);
-       if (dh != NULL)
-@@ -2400,12 +2414,14 @@ eay_bn2v(var, bn)
- void
- eay_init()
- {
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
-       OpenSSL_add_all_algorithms();
-       ERR_load_crypto_strings();
- #ifdef HAVE_OPENSSL_ENGINE_H
-       ENGINE_load_builtin_engines();
-       ENGINE_register_all_complete();
- #endif
-+#endif
- }
- vchar_t *
-@@ -2504,8 +2520,7 @@ binbuf_pubkey2rsa(vchar_t *binbuf)
-               goto out;
-       }
-       
--      rsa_pub->n = mod;
--      rsa_pub->e = exp;
-+      RSA_set0_key(rsa_pub, mod, exp, NULL);
- out:
-       return rsa_pub;
-@@ -2582,5 +2597,5 @@ eay_random()
- const char *
- eay_version()
- {
--      return SSLeay_version(SSLEAY_VERSION);
-+      return OpenSSL_version(OPENSSL_VERSION);
- }
-diff --git a/src/racoon/crypto_openssl.h b/src/racoon/crypto_openssl.h
-index 66fac73..ee5b765 100644
---- a/src/racoon/crypto_openssl.h
-+++ b/src/racoon/crypto_openssl.h
-@@ -124,7 +124,7 @@ extern vchar_t *eay_aes_decrypt __P((vchar_t *, vchar_t *, vchar_t *));
- extern int eay_aes_weakkey __P((vchar_t *));
- extern int eay_aes_keylen __P((int));
--#if defined(HAVE_OPENSSL_CAMELLIA_H)
-+#if defined(HAVE_OPENSSL_CAMELLIA_H) && ! defined(OPENSSL_NO_CAMELLIA)
- /* Camellia */
- extern vchar_t *eay_camellia_encrypt __P((vchar_t *, vchar_t *, vchar_t *));
- extern vchar_t *eay_camellia_decrypt __P((vchar_t *, vchar_t *, vchar_t *));
-diff --git a/src/racoon/eaytest.c b/src/racoon/eaytest.c
-index 1474bdc..ae09db3 100644
---- a/src/racoon/eaytest.c
-+++ b/src/racoon/eaytest.c
-@@ -62,6 +62,7 @@
- #include "dhgroup.h"
- #include "crypto_openssl.h"
- #include "gnuc.h"
-+#include "openssl_compat.h"
- #include "package_version.h"
-@@ -103,7 +104,7 @@ rsa_verify_with_pubkey(src, sig, pubkey_txt)
-               printf ("PEM_read_PUBKEY(): %s\n", eay_strerror());
-               return -1;
-       }
--      error = eay_check_rsasign(src, sig, evp->pkey.rsa);
-+      error = eay_check_rsasign(src, sig, EVP_PKEY_get0_RSA(evp));
-       return error;
- }
-@@ -698,7 +699,7 @@ ciphertest(ac, av)
-                         eay_cast_encrypt, eay_cast_decrypt) < 0)
-         return -1;
-       
--#ifdef HAVE_OPENSSL_IDEA_H
-+#if defined(HAVE_OPENSSL_IDEA_H) && ! defined(OPENSSL_NO_IDEA)
-       if (ciphertest_1 ("IDEA",
-                         &data, 8,
-                         &key, key.l,
-@@ -715,7 +716,7 @@ ciphertest(ac, av)
-                         eay_rc5_encrypt, eay_rc5_decrypt) < 0)
-         return -1;
- #endif
--#if defined(HAVE_OPENSSL_CAMELLIA_H)
-+#if defined(HAVE_OPENSSL_CAMELLIA_H) && ! defined(OPENSSL_NO_CAMELLIA)
-       if (ciphertest_1 ("CAMELLIA",
-                         &data, 16,
-                         &key, key.l,
-diff --git a/src/racoon/ipsec_doi.c b/src/racoon/ipsec_doi.c
-index 84a4c71..b52469f 100644
---- a/src/racoon/ipsec_doi.c
-+++ b/src/racoon/ipsec_doi.c
-@@ -715,7 +715,7 @@ out:
-       /* key length must not be specified on some algorithms */
-       if (keylen) {
-               if (sa->enctype == OAKLEY_ATTR_ENC_ALG_DES
--#ifdef HAVE_OPENSSL_IDEA_H
-+#if defined(HAVE_OPENSSL_IDEA_H) && ! defined(OPENSSL_NO_IDEA)
-                || sa->enctype == OAKLEY_ATTR_ENC_ALG_IDEA
- #endif
-                || sa->enctype == OAKLEY_ATTR_ENC_ALG_3DES) {
-diff --git a/src/racoon/openssl_compat.c b/src/racoon/openssl_compat.c
-new file mode 100644
-index 0000000..864b5fb
---- /dev/null
-+++ b/src/racoon/openssl_compat.c
-@@ -0,0 +1,213 @@
-+/*
-+ * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved.
-+ *
-+ * Licensed under the OpenSSL license (the "License").  You may not use
-+ * this file except in compliance with the License.  You can obtain a copy
-+ * in the file LICENSE in the source distribution or at
-+ * https://www.openssl.org/source/license.html
-+ */
-+
-+#include "openssl_compat.h"
-+
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+
-+#include <string.h>
-+
-+static void *OPENSSL_zalloc(size_t num)
-+{
-+    void *ret = OPENSSL_malloc(num);
-+
-+    if (ret != NULL)
-+        memset(ret, 0, num);
-+    return ret;
-+}
-+
-+int RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d)
-+{
-+    /* If the fields n and e in r are NULL, the corresponding input
-+     * parameters MUST be non-NULL for n and e.  d may be
-+     * left NULL (in case only the public key is used).
-+     */
-+    if ((r->n == NULL && n == NULL)
-+        || (r->e == NULL && e == NULL))
-+        return 0;
-+
-+    if (n != NULL) {
-+        BN_free(r->n);
-+        r->n = n;
-+    }
-+    if (e != NULL) {
-+        BN_free(r->e);
-+        r->e = e;
-+    }
-+    if (d != NULL) {
-+        BN_free(r->d);
-+        r->d = d;
-+    }
-+
-+    return 1;
-+}
-+
-+int RSA_set0_factors(RSA *r, BIGNUM *p, BIGNUM *q)
-+{
-+    /* If the fields p and q in r are NULL, the corresponding input
-+     * parameters MUST be non-NULL.
-+     */
-+    if ((r->p == NULL && p == NULL)
-+        || (r->q == NULL && q == NULL))
-+        return 0;
-+
-+    if (p != NULL) {
-+        BN_free(r->p);
-+        r->p = p;
-+    }
-+    if (q != NULL) {
-+        BN_free(r->q);
-+        r->q = q;
-+    }
-+
-+    return 1;
-+}
-+
-+int RSA_set0_crt_params(RSA *r, BIGNUM *dmp1, BIGNUM *dmq1, BIGNUM *iqmp)
-+{
-+    /* If the fields dmp1, dmq1 and iqmp in r are NULL, the corresponding input
-+     * parameters MUST be non-NULL.
-+     */
-+    if ((r->dmp1 == NULL && dmp1 == NULL)
-+        || (r->dmq1 == NULL && dmq1 == NULL)
-+        || (r->iqmp == NULL && iqmp == NULL))
-+        return 0;
-+
-+    if (dmp1 != NULL) {
-+        BN_free(r->dmp1);
-+        r->dmp1 = dmp1;
-+    }
-+    if (dmq1 != NULL) {
-+        BN_free(r->dmq1);
-+        r->dmq1 = dmq1;
-+    }
-+    if (iqmp != NULL) {
-+        BN_free(r->iqmp);
-+        r->iqmp = iqmp;
-+    }
-+
-+    return 1;
-+}
-+
-+void RSA_get0_key(const RSA *r,
-+                  const BIGNUM **n, const BIGNUM **e, const BIGNUM **d)
-+{
-+    if (n != NULL)
-+        *n = r->n;
-+    if (e != NULL)
-+        *e = r->e;
-+    if (d != NULL)
-+        *d = r->d;
-+}
-+
-+void RSA_get0_factors(const RSA *r, const BIGNUM **p, const BIGNUM **q)
-+{
-+    if (p != NULL)
-+        *p = r->p;
-+    if (q != NULL)
-+        *q = r->q;
-+}
-+
-+void RSA_get0_crt_params(const RSA *r,
-+                         const BIGNUM **dmp1, const BIGNUM **dmq1,
-+                         const BIGNUM **iqmp)
-+{
-+    if (dmp1 != NULL)
-+        *dmp1 = r->dmp1;
-+    if (dmq1 != NULL)
-+        *dmq1 = r->dmq1;
-+    if (iqmp != NULL)
-+        *iqmp = r->iqmp;
-+}
-+
-+int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g)
-+{
-+    /* If the fields p and g in d are NULL, the corresponding input
-+     * parameters MUST be non-NULL.  q may remain NULL.
-+     */
-+    if ((dh->p == NULL && p == NULL)
-+        || (dh->g == NULL && g == NULL))
-+        return 0;
-+
-+    if (p != NULL) {
-+        BN_free(dh->p);
-+        dh->p = p;
-+    }
-+    if (q != NULL) {
-+        BN_free(dh->q);
-+        dh->q = q;
-+    }
-+    if (g != NULL) {
-+        BN_free(dh->g);
-+        dh->g = g;
-+    }
-+
-+    if (q != NULL) {
-+        dh->length = BN_num_bits(q);
-+    }
-+
-+    return 1;
-+}
-+
-+void DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key)
-+{
-+    if (pub_key != NULL)
-+        *pub_key = dh->pub_key;
-+    if (priv_key != NULL)
-+        *priv_key = dh->priv_key;
-+}
-+
-+int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key)
-+{
-+    /* If the field pub_key in dh is NULL, the corresponding input
-+     * parameters MUST be non-NULL.  The priv_key field may
-+     * be left NULL.
-+     */
-+    if (dh->pub_key == NULL && pub_key == NULL)
-+        return 0;
-+
-+    if (pub_key != NULL) {
-+        BN_free(dh->pub_key);
-+        dh->pub_key = pub_key;
-+    }
-+    if (priv_key != NULL) {
-+        BN_free(dh->priv_key);
-+        dh->priv_key = priv_key;
-+    }
-+
-+    return 1;
-+}
-+
-+int DH_set_length(DH *dh, long length)
-+{
-+    dh->length = length;
-+    return 1;
-+}
-+
-+HMAC_CTX *HMAC_CTX_new(void)
-+{
-+    return OPENSSL_zalloc(sizeof(HMAC_CTX));
-+}
-+
-+void HMAC_CTX_free(HMAC_CTX *ctx)
-+{
-+    HMAC_CTX_cleanup(ctx);
-+    OPENSSL_free(ctx);
-+}
-+
-+RSA *EVP_PKEY_get0_RSA(EVP_PKEY *pkey)
-+{
-+    if (pkey->type != EVP_PKEY_RSA) {
-+        return NULL;
-+    }
-+    return pkey->pkey.rsa;
-+}
-+
-+
-+#endif /* OPENSSL_VERSION_NUMBER */
-diff --git a/src/racoon/openssl_compat.h b/src/racoon/openssl_compat.h
-new file mode 100644
-index 0000000..9e152c2
---- /dev/null
-+++ b/src/racoon/openssl_compat.h
-@@ -0,0 +1,45 @@
-+#ifndef OPENSSL_COMPAT_H
-+#define OPENSSL_COMPAT_H
-+
-+#include <openssl/opensslv.h>
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+
-+#include <openssl/rsa.h>
-+#include <openssl/dh.h>
-+#include <openssl/evp.h>
-+#include <openssl/hmac.h>
-+
-+int RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d);
-+int RSA_set0_factors(RSA *r, BIGNUM *p, BIGNUM *q);
-+int RSA_set0_crt_params(RSA *r, BIGNUM *dmp1, BIGNUM *dmq1, BIGNUM *iqmp);
-+void RSA_get0_key(const RSA *r, const BIGNUM **n, const BIGNUM **e, const BIGNUM **d);
-+void RSA_get0_factors(const RSA *r, const BIGNUM **p, const BIGNUM **q);
-+void RSA_get0_crt_params(const RSA *r, const BIGNUM **dmp1, const BIGNUM **dmq1, const BIGNUM **iqmp);
-+
-+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_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key);
-+int DH_set_length(DH *dh, long length);
-+
-+HMAC_CTX *HMAC_CTX_new(void);
-+void HMAC_CTX_free(HMAC_CTX* ctx);
-+
-+RSA *EVP_PKEY_get0_RSA(EVP_PKEY *pkey);
-+
-+#define ASN1_STRING_length(s) s->length
-+#define ASN1_STRING_get0_data(s) s->data
-+
-+#define X509_get_subject_name(x) x->cert_info->subject
-+#define X509_get_issuer_name(x) x->cert_info->issuer
-+#define X509_NAME_ENTRY_get_data(n) n->value
-+#define X509_NAME_ENTRY_get_object(n) n->object
-+#define X509_STORE_CTX_get_current_cert(ctx) ctx->current_cert
-+#define X509_STORE_CTX_get_error(ctx) ctx->error
-+#define X509_STORE_CTX_get_error_depth(ctx) ctx->error_depth
-+
-+#define OPENSSL_VERSION SSLEAY_VERSION
-+#define OpenSSL_version SSLeay_version
-+
-+#endif /* OPENSSL_VERSION_NUMBER */
-+
-+#endif /* OPENSSL_COMPAT_H */
-diff --git a/src/racoon/plainrsa-gen.c b/src/racoon/plainrsa-gen.c
-index cad1861..b949b08 100644
---- a/src/racoon/plainrsa-gen.c
-+++ b/src/racoon/plainrsa-gen.c
-@@ -60,6 +60,7 @@
- #include "vmbuf.h"
- #include "plog.h"
- #include "crypto_openssl.h"
-+#include "openssl_compat.h"
- #include "package_version.h"
-@@ -90,12 +91,14 @@ mix_b64_pubkey(const RSA *key)
-       char *binbuf;
-       long binlen, ret;
-       vchar_t *res;
--      
--      binlen = 1 + BN_num_bytes(key->e) + BN_num_bytes(key->n);
-+      const BIGNUM *e, *n;
-+
-+      RSA_get0_key(key, &n, &e, NULL);
-+      binlen = 1 + BN_num_bytes(e) + BN_num_bytes(n);
-       binbuf = malloc(binlen);
-       memset(binbuf, 0, binlen);
--      binbuf[0] = BN_bn2bin(key->e, (unsigned char *) &binbuf[1]);
--      ret = BN_bn2bin(key->n, (unsigned char *) (&binbuf[binbuf[0] + 1]));
-+      binbuf[0] = BN_bn2bin(e, (unsigned char *) &binbuf[1]);
-+      ret = BN_bn2bin(n, (unsigned char *) (&binbuf[binbuf[0] + 1]));
-       if (1 + binbuf[0] + ret != binlen) {
-               plog(LLV_ERROR, LOCATION, NULL,
-                    "Pubkey generation failed. This is really strange...\n");
-@@ -131,16 +134,20 @@ print_rsa_key(FILE *fp, const RSA *key)
-       
-       fprintf(fp, "# : PUB 0s%s\n", pubkey64->v);
-       fprintf(fp, ": RSA\t{\n");
--      fprintf(fp, "\t# RSA %d bits\n", BN_num_bits(key->n));
-+      const BIGNUM *n, *e, *d, *p, *q, *dmp1, *dmq1, *iqmp;
-+      RSA_get0_key(key, &n, &e, &d);
-+      RSA_get0_factors(key, &p, &q);
-+      RSA_get0_crt_params(key, &dmp1, &dmq1, &iqmp);
-+      fprintf(fp, "\t# RSA %d bits\n", BN_num_bits(n));
-       fprintf(fp, "\t# pubkey=0s%s\n", pubkey64->v);
--      fprintf(fp, "\tModulus: 0x%s\n", lowercase(BN_bn2hex(key->n)));
--      fprintf(fp, "\tPublicExponent: 0x%s\n", lowercase(BN_bn2hex(key->e)));
--      fprintf(fp, "\tPrivateExponent: 0x%s\n", lowercase(BN_bn2hex(key->d)));
--      fprintf(fp, "\tPrime1: 0x%s\n", lowercase(BN_bn2hex(key->p)));
--      fprintf(fp, "\tPrime2: 0x%s\n", lowercase(BN_bn2hex(key->q)));
--      fprintf(fp, "\tExponent1: 0x%s\n", lowercase(BN_bn2hex(key->dmp1)));
--      fprintf(fp, "\tExponent2: 0x%s\n", lowercase(BN_bn2hex(key->dmq1)));
--      fprintf(fp, "\tCoefficient: 0x%s\n", lowercase(BN_bn2hex(key->iqmp)));
-+      fprintf(fp, "\tModulus: 0x%s\n", lowercase(BN_bn2hex(n)));
-+      fprintf(fp, "\tPublicExponent: 0x%s\n", lowercase(BN_bn2hex(e)));
-+      fprintf(fp, "\tPrivateExponent: 0x%s\n", lowercase(BN_bn2hex(d)));
-+      fprintf(fp, "\tPrime1: 0x%s\n", lowercase(BN_bn2hex(p)));
-+      fprintf(fp, "\tPrime2: 0x%s\n", lowercase(BN_bn2hex(q)));
-+      fprintf(fp, "\tExponent1: 0x%s\n", lowercase(BN_bn2hex(dmp1)));
-+      fprintf(fp, "\tExponent2: 0x%s\n", lowercase(BN_bn2hex(dmq1)));
-+      fprintf(fp, "\tCoefficient: 0x%s\n", lowercase(BN_bn2hex(iqmp)));
-       fprintf(fp, "  }\n");
-       vfree(pubkey64);
-@@ -203,11 +210,13 @@ int
- gen_rsa_key(FILE *fp, size_t bits, unsigned long exp)
- {
-       int ret;
--      RSA *key;
-+      RSA *key = RSA_new();
-+      BIGNUM *e = BN_new();
--      key = RSA_generate_key(bits, exp, NULL, NULL);
--      if (!key) {
-+      BN_set_word(e, exp);
-+      if (! RSA_generate_key_ex(key, bits, e, NULL)) {
-               fprintf(stderr, "RSA_generate_key(): %s\n", eay_strerror());
-+              RSA_free(key);
-               return -1;
-       }
-       
-diff --git a/src/racoon/prsa_par.y b/src/racoon/prsa_par.y
-index 1987e4d..27ce4c6 100644
---- a/src/racoon/prsa_par.y
-+++ b/src/racoon/prsa_par.y
-@@ -68,6 +68,7 @@
- #include "isakmp_var.h"
- #include "handler.h"
- #include "crypto_openssl.h"
-+#include "openssl_compat.h"
- #include "sockmisc.h"
- #include "rsalist.h"
-@@ -85,7 +86,18 @@ char *prsa_cur_fname = NULL;
- struct genlist *prsa_cur_list = NULL;
- enum rsa_key_type prsa_cur_type = RSA_TYPE_ANY;
--static RSA *rsa_cur;
-+struct my_rsa_st {
-+      BIGNUM *n;
-+      BIGNUM *e;
-+      BIGNUM *d;
-+      BIGNUM *p;
-+      BIGNUM *q;
-+      BIGNUM *dmp1;
-+      BIGNUM *dmq1;
-+      BIGNUM *iqmp;
-+};
-+
-+static struct my_rsa_st *rsa_cur;
- void
- prsaerror(const char *s, ...)
-@@ -201,8 +213,12 @@ rsa_statement:
-                               rsa_cur->iqmp = NULL;
-                       }
-               }
--              $$ = rsa_cur;
--              rsa_cur = RSA_new();
-+              RSA * rsa_tmp = RSA_new();
-+              RSA_set0_key(rsa_tmp, rsa_cur->n, rsa_cur->e, rsa_cur->d);
-+              RSA_set0_factors(rsa_tmp, rsa_cur->p, rsa_cur->q);
-+              RSA_set0_crt_params(rsa_tmp, rsa_cur->dmp1, rsa_cur->dmq1, rsa_cur->iqmp);
-+              $$ = rsa_tmp;
-+              memset(rsa_cur, 0, sizeof(struct my_rsa_st));
-       }
-       | TAG_PUB BASE64
-       {
-@@ -351,10 +367,12 @@ prsa_parse_file(struct genlist *list, char *fname, enum rsa_key_type type)
-       prsa_cur_fname = fname;
-       prsa_cur_list = list;
-       prsa_cur_type = type;
--      rsa_cur = RSA_new();
-+      rsa_cur = malloc(sizeof(struct my_rsa_st));
-+      memset(rsa_cur, 0, sizeof(struct my_rsa_st));
-       ret = prsaparse();
-       if (rsa_cur) {
--              RSA_free(rsa_cur);
-+              memset(rsa_cur, 0, sizeof(struct my_rsa_st));
-+              free(rsa_cur);
-               rsa_cur = NULL;
-       }
-       fclose (fp);
-diff --git a/src/racoon/rsalist.c b/src/racoon/rsalist.c
-index f152c82..96e8363 100644
---- a/src/racoon/rsalist.c
-+++ b/src/racoon/rsalist.c
-@@ -52,6 +52,7 @@
- #include "genlist.h"
- #include "remoteconf.h"
- #include "crypto_openssl.h"
-+#include "openssl_compat.h"
- #ifndef LIST_FIRST
- #define LIST_FIRST(head)        ((head)->lh_first)
-@@ -98,7 +99,9 @@ rsa_key_dup(struct rsa_key *key)
-               return NULL;
-       if (key->rsa) {
--              new->rsa = key->rsa->d != NULL ? RSAPrivateKey_dup(key->rsa) : RSAPublicKey_dup(key->rsa);
-+              const BIGNUM *d;
-+              RSA_get0_key(key->rsa, NULL, NULL, &d);
-+              new->rsa = (d != NULL ? RSAPrivateKey_dup(key->rsa) : RSAPublicKey_dup(key->rsa));
-               if (new->rsa == NULL)
-                       goto dup_error;
-       }
--- 
-2.16.1
-
diff --git a/net/ipsec-tools/patches/020-openssl-deprecated.patch b/net/ipsec-tools/patches/020-openssl-deprecated.patch
deleted file mode 100644 (file)
index 3c2cca1..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
---- a/src/racoon/crypto_openssl.c
-+++ b/src/racoon/crypto_openssl.c
-@@ -1087,7 +1087,7 @@ eay_strerror()
-       int line, flags;
-       unsigned long es;
--#if OPENSSL_VERSION_NUMBER >= 0x10100000L
-+#if OPENSSL_VERSION_NUMBER >= 0x10000000L
-       es = 0; /* even when allowed by OPENSSL_API_COMPAT, it is defined as 0 */
- #else
-       es = CRYPTO_thread_id();
---- a/src/racoon/openssl_compat.h
-+++ b/src/racoon/openssl_compat.h
-@@ -5,6 +5,7 @@
- #if OPENSSL_VERSION_NUMBER < 0x10100000L
- #include <openssl/rsa.h>
-+#include <openssl/bn.h>
- #include <openssl/dh.h>
- #include <openssl/evp.h>
- #include <openssl/hmac.h>
index 88c78b302a0453828ba2333690753c8f4e42596d..f591ebdc496bac8ac476aeca6857138d95ead2c4 100644 (file)
@@ -9,15 +9,15 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ipvsadm
-PKG_VERSION:=1.29
+PKG_VERSION:=1.30
 PKG_MAINTAINER:=Mauro Mozzarelli <mauro@ezplanet.org>, \
                Florian Eckert <fe@dev.tdt.de>
-PKG_LICENSE:=GPL-2.0+
+PKG_LICENSE:=GPL-2.0-or-later
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_SOURCE_URL:=https://www.kernel.org/pub/linux/utils/kernel/ipvsadm/
-PKG_HASH:=c3de4a21d90a02c621f0c72ee36a7aa27374b6f29fd4178f33fbf71b4c66c149
+PKG_SOURCE_URL:=@KERNEL/linux/utils/kernel/ipvsadm/
+PKG_HASH:=95573d70df473c9f63fc4ac496c044c69e3a6de7ccac119922210c0b44cd7a0c
 
 PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
@@ -29,7 +29,7 @@ define Package/ipvsadm
   CATEGORY:=Network
   TITLE:=IP Virtual Server Configuration Manager
   URL:=http://www.linuxvirtualserver.org
-  DEPENDS:= +kmod-nf-ipvs +libnl-tiny +libpopt
+  DEPENDS:= +kmod-nf-ipvs +libnl-genl +libpopt
 endef
 
 define Package/ipvsadm/description
@@ -40,17 +40,6 @@ define Package/ipvsadm/description
   network services based on a cluster of two or more nodes.
 endef
 
-TARGET_CFLAGS += \
-       -D_GNU_SOURCE \
-       -I$(STAGING_DIR)/usr/include/libnl-tiny
-
-define Build/Compile
-       CFLAGS="$(TARGET_CFLAGS)" \
-       $(MAKE) -C $(PKG_BUILD_DIR) \
-               CC="$(TARGET_CC)" \
-               LIBS="$(TARGET_LDFLAGS) -lnl-tiny -lpopt"
-endef
-
 define Package/ipvsadm/install
        $(INSTALL_DIR) $(1)/sbin
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/ipvsadm $(1)/sbin/
index 20c3324651d95bda445d10fd6e40533aade11d3b..95e841f4847feb925746a5940fede0c9ec7a7a1e 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=irssi
-PKG_VERSION:=1.2.0
-PKG_RELEASE:=2
+PKG_VERSION:=1.2.2
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_SOURCE_URL:=https://github.com/irssi/irssi/releases/download/1.2.0/
-PKG_HASH:=1643fca1d8b35e5a5d7b715c9c889e1e9cdb7e578e06487901ea959e6ab3ebe5
+PKG_SOURCE_URL:=https://github.com/irssi/irssi/releases/download/$(PKG_VERSION)/
+PKG_HASH:=6727060c918568ba2ff4295ad736128dba0b995d7b20491bca11f593bd857578
 
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=COPYING
index 2bb7ffb11501fa259883e26f92f322dda6870b86..ec1ece144818b96085b119d0c703071f22819a71 100644 (file)
@@ -10,11 +10,12 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=isc-dhcp
 UPSTREAM_NAME:=dhcp
 PKG_VERSION:=4.4.1
-PKG_RELEASE:=3
+PKG_RELEASE:=5
 
 PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=LICENSE
 PKG_MAINTAINER:=Philip Prindeville <philipp@redfish-solutions.com>
+PKG_CPE_ID:=cpe:/a:isc:dhcp
 
 PKG_SOURCE:=$(UPSTREAM_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=ftp://ftp.isc.org/isc/dhcp/$(PKG_VERSION) \
@@ -59,7 +60,7 @@ define Package/isc-dhcp-relay/description
 endef
 
 define Package/isc-dhcp-relay-ipv4/description
-$(call Package/isc-dhcp-relay-ipv6/description)
+$(call Package/isc-dhcp-relay/description)
  This package is compiled with IPv4 support only.
 endef
 
@@ -161,7 +162,6 @@ $(call Package/isc-dhcp-omshell/description)
 endef
 
 CONFIGURE_ARGS += \
-       --disable-tracing               \
        --enable-paranoia               \
        --disable-dependency-tracking   \
        --with-randomdev=/dev/urandom \
index 0e0ea11ab088dfd23b13d173a8344d68e16713e1..17cd56bc359b56925bc0953a26dacba43bb5f059 100644 (file)
@@ -8,40 +8,36 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=jool
-PKG_VERSION:=3.5.7
-PKG_RELEASE:=2
+PKG_VERSION:=4.0.5
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://codeload.github.com/NICMx/Jool/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=b8e95d1526cd2434dedbae292afd2d17f0780ac2dca2be21264712b41eb76a3d
-PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/Jool-$(PKG_VERSION)
+PKG_SOURCE_URL:=https://github.com/NICMx/Jool/releases/download/v$(PKG_VERSION)
+PKG_HASH:=b61ae37d7a71e28530765bdfd9a62f89e7878e3ea9c15dabbcefcd144891100d
 
-PKG_LICENSE:=GPL-2.0
+PKG_MAINTAINER:=
+PKG_LICENSE:=GPL-2.0-only
 PKG_LICENSE_FILES:=COPYING
 
+PKG_INSTALL:=1
 PKG_BUILD_PARALLEL:=1
-PKG_BUILD_DEPENDS:=USE_UCLIBC:argp-standalone USE_MUSL:argp-standalone
-
-PKG_FIXUP:=autoreconf
+PKG_BUILD_DEPENDS:=!USE_GLIBC:argp-standalone
 
 include $(INCLUDE_DIR)/package.mk
 
-MAKE_PATH:=usr
-CONFIGURE_PATH:=usr
-
 define Build/Compile
        $(MAKE) -C "$(LINUX_DIR)" \
                KERNEL_DIR="$(LINUX_DIR)" \
                ARCH="$(LINUX_KARCH)" \
                CROSS_COMPILE="$(TARGET_CROSS)" \
-               SUBDIRS="$(PKG_BUILD_DIR)/mod/stateful" \
+               SUBDIRS="$(PKG_BUILD_DIR)/src/mod/nat64" \
                V="$(V)" \
                modules
        $(MAKE) -C "$(LINUX_DIR)" \
                KERNEL_DIR="$(LINUX_DIR)" \
                ARCH="$(LINUX_KARCH)" \
                CROSS_COMPILE="$(TARGET_CROSS)" \
-               SUBDIRS="$(PKG_BUILD_DIR)/mod/stateless" \
+               SUBDIRS="$(PKG_BUILD_DIR)/src/mod/siit" \
                V="$(V)" \
                modules
        $(call Build/Compile/Default)
@@ -76,10 +72,11 @@ define KernelPackage/jool
     @IPV6 \
     +kmod-crypto-md5 \
     +kmod-nf-conntrack \
-    +kmod-nf-conntrack6
+    +kmod-nf-conntrack6 \
+    +kmod-nf-ipt
   FILES:= \
-    $(PKG_BUILD_DIR)/mod/stateful/jool.$(LINUX_KMOD_SUFFIX) \
-    $(PKG_BUILD_DIR)/mod/stateless/jool_siit.$(LINUX_KMOD_SUFFIX)
+    $(PKG_BUILD_DIR)/src/mod/nat64/jool.$(LINUX_KMOD_SUFFIX) \
+    $(PKG_BUILD_DIR)/src/mod/siit/jool_siit.$(LINUX_KMOD_SUFFIX)
 endef
 
 define KernelPackage/jool/description
@@ -91,7 +88,7 @@ endef
 define Package/jool-tools
   $(call Package/jool/Default)
   TITLE:=Jool userspace control programs
-  DEPENDS:=+libnl +ethtool
+  DEPENDS:=+libnl +libxtables +ethtool
 endef
 
 define Package/jool-tools/description
@@ -100,10 +97,19 @@ define Package/jool-tools/description
   This package provides the userspace control programs for Jool.
 endef
 
+CONFIGURE_ARGS += \
+       --disable-shared \
+       --without-bash-completion-dir
+
+CONFIGURE_VARS += \
+       ac_cv_func_memset=yes \
+       ac_cv_func_strcasecmp=yes
+
 define Package/jool-tools/install
-       $(INSTALL_DIR) $(1)/usr/sbin/
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/usr/stateful/jool       $(1)/usr/sbin/
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/usr/stateless/jool_siit $(1)/usr/sbin/
+       $(INSTALL_DIR) $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/jool          $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/joold         $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/jool_siit     $(1)/usr/bin/
 endef
 
 $(eval $(call BuildPackage,jool))
diff --git a/net/jool/patches/010-Add-support-for-kernel-4.17.patch b/net/jool/patches/010-Add-support-for-kernel-4.17.patch
deleted file mode 100644 (file)
index be860a4..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-From 831486ea6c7d7adfbdc453587a65bcba247d698b Mon Sep 17 00:00:00 2001
-From: Alberto Leiva Popper <ydahhrk@gmail.com>
-Date: Fri, 6 Jul 2018 13:19:21 -0500
-Subject: [PATCH 1/2] Add support for kernel 4.17
-
-Fixes #266.
----
- mod/common/hash_table.c    | 14 +++-----------
- mod/stateful/fragment_db.c |  4 +---
- 2 files changed, 4 insertions(+), 14 deletions(-)
-
-diff --git a/mod/common/hash_table.c b/mod/common/hash_table.c
-index 25ddd7a6..4e9272f8 100644
---- a/mod/common/hash_table.c
-+++ b/mod/common/hash_table.c
-@@ -23,8 +23,7 @@
-  * @macro HTABLE_NAME name of the hash table structure to generate. Optional; Default: hash_table.
-  * @macro KEY_TYPE data type of the table's keys.
-  * @macro VALUE_TYPE data type of the table's values.
-- * @macro HASH_TABLE_SIZE The size of the internal array, in slots. Optional;
-- *            Default = Max = 64k - 1.
-+ * @macro HASH_TABLE_SIZE The size of the internal array, in slots. MUST be a power of 2.
-  * @macro GENERATE_PRINT just define it if you want the print function; otherwise it will not be
-  *            generated.
-  * @macro GENERATE_FOR_EACH just define it if you want the for_each function; otherwise it will not
-@@ -44,13 +43,6 @@
- #define HTABLE_NAME hash_table
- #endif
--#ifndef HASH_TABLE_SIZE
--/**
-- * This number should not exceed unsigned int's maximum.
-- */
--#define HASH_TABLE_SIZE (64 * 1024 - 1)
--#endif
--
- /** Creates a token name by concatenating prefix and suffix. */
- #define CONCAT_AUX(prefix, suffix) prefix ## suffix
- /** Seems useless, but if not present, the compiler won't expand the HTABLE_NAME macro... */
-@@ -131,7 +123,7 @@ static struct KEY_VALUE_PAIR *GET_AUX(struct HTABLE_NAME *table, const KEY_TYPE
-       if (WARN(!table, "The table is NULL."))
-               return NULL;
--      hash_code = table->hash_function(key) % HASH_TABLE_SIZE;
-+      hash_code = table->hash_function(key) & (HASH_TABLE_SIZE - 1);
-       hlist_for_each(current_node, &table->table[hash_code]) {
-               current_pair = hlist_entry(current_node, struct KEY_VALUE_PAIR, hlist_hook);
-               if (table->equals_function(key, &current_pair->key))
-@@ -210,7 +202,7 @@ static int PUT(struct HTABLE_NAME *table, KEY_TYPE *key, VALUE_TYPE *value)
-       key_value->value = value;
-       /* Insert the key-value to the table. */
--      hash_code = table->hash_function(key) % HASH_TABLE_SIZE;
-+      hash_code = table->hash_function(key) & (HASH_TABLE_SIZE - 1);
-       hlist_add_head(&key_value->hlist_hook, &table->table[hash_code]);
-       list_add_tail(&key_value->list_hook, &table->list);
-diff --git a/mod/stateful/fragment_db.c b/mod/stateful/fragment_db.c
-index 44f966aa..ef0b1f5a 100644
---- a/mod/stateful/fragment_db.c
-+++ b/mod/stateful/fragment_db.c
-@@ -90,10 +90,8 @@ static bool equals_function(const struct packet *k1, const struct packet *k2)
- static unsigned int inet6_hash_frag(__be32 id, const struct in6_addr *saddr,
-               const struct in6_addr *daddr, u32 rnd)
- {
--      u32 c;
--      c = jhash_3words(ipv6_addr_hash(saddr), ipv6_addr_hash(daddr),
-+      return jhash_3words(ipv6_addr_hash(saddr), ipv6_addr_hash(daddr),
-                       (__force u32)id, rnd);
--      return c & (INETFRAGS_HASHSZ - 1);
- }
- #endif
--- 
-2.19.1
-
diff --git a/net/jool/patches/010-musl.patch b/net/jool/patches/010-musl.patch
new file mode 100644 (file)
index 0000000..0bac615
--- /dev/null
@@ -0,0 +1,24 @@
+--- a/src/usr/argp/main.c
++++ b/src/usr/argp/main.c
+@@ -8,6 +8,7 @@
+ #include <errno.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <getopt.h>
+ #include "command.h"
+ #include "log.h"
+--- a/src/usr/iptables/Makefile
++++ b/src/usr/iptables/Makefile
+@@ -34,9 +34,9 @@ uninstall:
+       rm -f ${DESTDIR}${XTABLES_SO_DIR}/libxt_JOOL_SIIT.so
+       rm -f ${DESTDIR}${XTABLES_SO_DIR}/libxt_JOOL.so
+ lib%.so: lib%.o
+-      gcc -shared -fPIC ${LDFLAGS} -o $@ $^;
++      ${CC} -shared -fPIC ${LDFLAGS} -o $@ $^;
+ lib%.o: lib%.c
+-      gcc ${DEFAULT_CFLAGS} ${CFLAGS} -D_INIT=lib$*_init -fPIC -c -o $@ $<;
++      ${CC} ${DEFAULT_CFLAGS} ${CFLAGS} -D_INIT=lib$*_init -fPIC -c -o $@ $<;
+ clean distclean:
+       rm -f *.so
+ distdir:
diff --git a/net/jool/patches/020-packet-rename-offset_to_ptr-to-skb_offset_to_ptr-to-.patch b/net/jool/patches/020-packet-rename-offset_to_ptr-to-skb_offset_to_ptr-to-.patch
deleted file mode 100644 (file)
index 4023af7..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-From f9e62248f252accb0609243958fb51f0f99a5bf3 Mon Sep 17 00:00:00 2001
-From: Ricardo Salveti <ricardo@foundries.io>
-Date: Mon, 1 Oct 2018 22:45:17 -0300
-Subject: [PATCH 2/2] packet: rename offset_to_ptr to skb_offset_to_ptr to
- avoid conflicts with newer kernel
-
-Rename offset_to_ptr to skb_offset_to_ptr to avoid definition conflict
-when building jool against linux >= 4.19.
-
-Fixes:
-| mod/stateful/../common/packet.c:73:14: error: conflicting types for 'offset_to_ptr'
-|  static void *offset_to_ptr(struct sk_buff *skb, unsigned int offset)
-|               ^~~~~~~~~~~~~
-| In file included from kernel-source/include/linux/export.h:45,
-|                  from kernel-source/include/linux/linkage.h:7,
-|                  from kernel-source/include/linux/kernel.h:7,
-|                  from kernel-source/include/linux/skbuff.h:17,
-|                  from mod/stateful/../../include/nat64/mod/common/packet.h:81,
-|                  from mod/stateful/../common/packet.c:1:
-| kernel-source/include/linux/compiler.h:297:21: note: previous definition of 'offset_to_ptr' was here
-|  static inline void *offset_to_ptr(const int *off)
-|                      ^~~~~~~~~~~~~
-
-Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
----
- mod/common/packet.c | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/mod/common/packet.c b/mod/common/packet.c
-index 9b4fbcd6..1b094fcc 100644
---- a/mod/common/packet.c
-+++ b/mod/common/packet.c
-@@ -70,7 +70,7 @@ static int inhdr4(struct sk_buff *skb, const char *msg)
-       return -EINVAL;
- }
--static void *offset_to_ptr(struct sk_buff *skb, unsigned int offset)
-+static void *skb_offset_to_ptr(struct sk_buff *skb, unsigned int offset)
- {
-       return ((void *) skb->data) + offset;
- }
-@@ -368,9 +368,9 @@ int pkt_init_ipv6(struct packet *pkt, struct sk_buff *skb)
-       pkt->l4_proto = meta.l4_proto;
-       pkt->is_inner = 0;
-       pkt->is_hairpin = false;
--      pkt->hdr_frag = meta.has_frag_hdr ? offset_to_ptr(skb, meta.frag_offset) : NULL;
-+      pkt->hdr_frag = meta.has_frag_hdr ? skb_offset_to_ptr(skb, meta.frag_offset) : NULL;
-       skb_set_transport_header(skb, meta.l4_offset);
--      pkt->payload = offset_to_ptr(skb, meta.payload_offset);
-+      pkt->payload = skb_offset_to_ptr(skb, meta.payload_offset);
-       pkt->original_pkt = pkt;
-       return 0;
-@@ -530,7 +530,7 @@ int pkt_init_ipv4(struct packet *pkt, struct sk_buff *skb)
-       pkt->is_hairpin = false;
-       pkt->hdr_frag = NULL;
-       skb_set_transport_header(skb, meta.l4_offset);
--      pkt->payload = offset_to_ptr(skb, meta.payload_offset);
-+      pkt->payload = skb_offset_to_ptr(skb, meta.payload_offset);
-       pkt->original_pkt = pkt;
-       return 0;
--- 
-2.19.1
-
diff --git a/net/kcptun/Makefile b/net/kcptun/Makefile
new file mode 100644 (file)
index 0000000..b39a112
--- /dev/null
@@ -0,0 +1,74 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=kcptun
+PKG_VERSION:=20190725
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/xtaci/kcptun/tar.gz/v${PKG_VERSION}?
+PKG_HASH:=65c0d0d4f7e3bb3c3b91e23ff2eb6621455d6d376a4f17e6fb2017337ce711c1
+
+PKG_MAINTAINER:=Dengfeng Liu <liudf0716@gmail.com>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_BUILD_DEPENDS:=golang/host
+PKG_BUILD_PARALLEL:=1
+PKG_USE_MIPS16:=0
+
+GO_PKG:=github.com/xtaci/kcptun
+
+include $(INCLUDE_DIR)/package.mk
+include ../../lang/golang/golang-package.mk
+
+define Package/kcptun/template
+  SECTION:=net
+  CATEGORY:=Network
+  SUBMENU:=Web Servers/Proxies
+  TITLE:=KCP-based Secure Tunnel 
+  URL:=https://github.com/xtaci/kcptun
+  DEPENDS:=$(GO_ARCH_DEPENDS)
+endef
+
+define Package/kcptun-c
+  $(call Package/kcptun/template)
+  TITLE+= (client)
+endef
+
+define Package/kcptun-s
+  $(call Package/kcptun/template)
+  TITLE+= (server)
+endef
+
+define Package/kcptun/description
+  kcptun is a Stable & Secure Tunnel Based On KCP with N:M Multiplexing
+endef
+Package/kcptun-c/description = $(Package/kcptun/description)
+Package/kcptun-s/description = $(Package/kcptun/description)
+
+GO_PKG_LDFLAGS_X:=main.VERSION=$(PKG_VERSION)
+GO_PKG_LDFLAGS:=-s -w
+
+define Package/kcptun/install
+       $(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR))
+
+       $(INSTALL_DIR) $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(2) $(1)/usr/bin/$(3)
+       $(INSTALL_DIR) $(1)/etc/config/
+       $(INSTALL_CONF) ./files/$(3).conf $(1)/etc/config/$(3)
+       $(INSTALL_DIR) $(1)/etc/init.d/
+       $(INSTALL_BIN) ./files/$(3).init $(1)/etc/init.d/$(3)
+endef
+
+define Package/kcptun-c/install
+  $(call Package/kcptun/install,$(1),client,kcptun-c)
+endef
+
+define Package/kcptun-s/install
+  $(call Package/kcptun/install,$(1),server,kcptun-s)
+endef
+
+$(eval $(call GoBinPackage,kcptun-c))
+$(eval $(call BuildPackage,kcptun-c))
+$(eval $(call GoBinPackage,kcptun-s))
+$(eval $(call BuildPackage,kcptun-s))
diff --git a/net/kcptun/files/kcptun-c.conf b/net/kcptun/files/kcptun-c.conf
new file mode 100644 (file)
index 0000000..adef9e3
--- /dev/null
@@ -0,0 +1,9 @@
+config kcptun
+       option local_port 12948 # this port should be your service port
+       option remote_ip 'your vps ip'
+       option remote_port 29900 
+       option mode 'fast'
+       option nocomp 1
+       option sndwnd 128
+       option rcvwnd 512
+       option disabled 1 # set 0 to enable it
diff --git a/net/kcptun/files/kcptun-c.init b/net/kcptun/files/kcptun-c.init
new file mode 100644 (file)
index 0000000..653d8d8
--- /dev/null
@@ -0,0 +1,56 @@
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2019 Dengfeng Liu
+
+START=99
+
+USE_PROCD=1
+NAME=kcptun-c
+PROG=/usr/bin/${NAME}
+
+validate_section_kcptun() 
+{
+       uci_load_validate "${NAME}" kcptun "$1" "$2" \
+               'local_port:port' \
+               'remote_ip:string' \
+               'remote_port:port' \
+               'mode:string' \
+               'nocomp:bool' \
+               'sndwnd:uinteger' \
+               'rcvwnd:uinteger' \
+               'disabled:bool'
+}
+
+kcptun_instance() 
+{
+       [ "$2" = 0 ] || {
+               echo "validation failed"
+               return 1
+       }
+
+       [ "${disabled}" = "1" ] && return 1
+
+       [ "${local_port}" -gt 0 ] && [ "${local_port}" -lt 65536 ] || return 1
+
+       [ "${remote_port}" -gt 0 ] && [ "${remote_port}" -lt 65536 ] || return 1
+
+       [ -n "${remote_ip}" ] || {
+               return 1
+       }
+
+       procd_open_instance
+       procd_set_param command "${PROG}"
+       procd_append_param command --localaddr ":${local_port}"
+       procd_append_param command --remoteaddr "${remote_ip}:${remote_port}"
+       [ -n "${mode}" ] && procd_append_param command --mode "${mode}"
+       [ "${nocomp}" -eq 1 ] && procd_append_param command --nocomp
+       [ "${sndwnd}" -gt 0 ] && procd_append_param command --sndwnd "${sndwnd}"
+       [ "${rcvwnd}" -gt 0 ] && procd_append_param command --rcvwnd "${rcvwnd}"
+       procd_set_param respawn
+       procd_close_instance
+}
+
+start_service() 
+{
+       config_load "${NAME}"
+       config_foreach validate_section_kcptun kcptun kcptun_instance
+}
diff --git a/net/kcptun/files/kcptun-s.conf b/net/kcptun/files/kcptun-s.conf
new file mode 100644 (file)
index 0000000..3537f64
--- /dev/null
@@ -0,0 +1,9 @@
+config kcptun
+       option local_port 29900
+       option target_ip '127.0.0.1'
+       option target_port 12948 # this port should be your service port
+       option mode 'fast'
+       option nocomp 1
+       option sndwnd 1024
+       option rcvwnd 1024
+       option disabled 1 # set 0 to enable it
diff --git a/net/kcptun/files/kcptun-s.init b/net/kcptun/files/kcptun-s.init
new file mode 100644 (file)
index 0000000..cfcb81a
--- /dev/null
@@ -0,0 +1,56 @@
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2019 Dengfeng Liu
+
+START=99
+
+USE_PROCD=1
+NAME=kcptun-s
+PROG=/usr/bin/${NAME}
+
+validate_section_kcptun() 
+{
+       uci_load_validate "${NAME}" kcptun "$1" "$2" \
+               'local_port:port' \
+               'target_ip:string' \
+               'target_port:port' \
+               'mode:string' \
+               'nocomp:bool' \
+               'sndwnd:uinteger' \
+               'rcvwnd:uinteger' \
+               'disabled:bool'
+}
+
+kcptun_instance() 
+{
+       [ "$2" = 0 ] || {
+               echo "validation failed"
+               return 1
+       }
+
+       [ "${disabled}" = "1" ] && return 1
+
+       [ "${local_port}" -gt 0 ] && [ "${local_port}" -lt 65536 ] || return 1
+
+       [ "${target_port}" -gt 0 ] && [ "${target_port}" -lt 65536 ] || return 1
+       
+       [ -n "${target_ip}" ] || {
+               return 1
+       }
+
+       procd_open_instance
+       procd_set_param command "${PROG}"
+       procd_append_param command --listen ":${local_port}"
+       procd_append_param command --target "${target_ip}:${target_port}"
+       [ -n "${mode}" ] && procd_append_param command --mode "${mode}"
+       [ "${nocomp}" -eq 1 ] && procd_append_param command --nocomp
+       [ "${sndwnd}" -gt 0 ] && procd_append_param command --sndwnd "${sndwnd}"
+       [ "${rcvwnd}" -gt 0 ] && procd_append_param command --rcvwnd "${rcvwnd}"
+       procd_set_param respawn
+       procd_close_instance
+}
+
+start_service() 
+{
+       config_load "${NAME}"
+       config_foreach validate_section_kcptun kcptun kcptun_instance
+}
index ec7e92fb865afb25675e1b6a3d44a08f594e08cd..d52a159a41d99b5076159cf7d623c654d69c28c1 100644 (file)
@@ -10,26 +10,27 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=kea
 PKG_VERSION:=1.5.0
-PKG_RELEASE:=3
-PKG_MAINTAINER:=BangLang Huang<banglang.huang@foxmail.com>, Rosy Song<rosysong@rosinson.com>
-PKG_BUILD_DEPENDS:=boost log4cplus kea/host
-HOST_BUILD_DEPENDS:=boost boost/host log4cplus/host
+PKG_RELEASE:=5
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://ftp.isc.org/isc/kea/$(PKG_VERSION)/
-
+PKG_SOURCE_URL:=https://ftp.isc.org/isc/kea/$(PKG_VERSION)
 PKG_HASH:=edce4fab68ca7af607cf7f5bc86596e04fe0ef4b8e88906e339cdefcf21daaec
 
-PKG_INSTALL:=1
-PKG_BUILD_PARALLEL:=1
+PKG_MAINTAINER:=BangLang Huang<banglang.huang@foxmail.com>, Rosy Song<rosysong@rosinson.com>
 PKG_LICENSE:=MPL-2.0
+PKG_LICENSE_FILES:=COPYING
+
+HOST_BUILD_DEPENDS:=boost/host log4cplus/host openssl
+PKG_BUILD_DEPENDS:=kea/host
+HOST_BUILD_PARALLEL:=1
+PKG_BUILD_PARALLEL:=1
+
+PKG_INSTALL:=1
 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
@@ -75,7 +76,7 @@ endef
 define Package/kea-admin
        $(call Package/kea/Default)
        TITLE+= Admin
-       DEPENDS:= +kea-libs +python3
+       DEPENDS:= +kea-libs
 endef
 
 define Package/kea-ctrl
@@ -97,32 +98,33 @@ define Package/kea-perfdhcp
        DEPENDS:=+kea-libs
 endef
 
+HOST_CONFIGURE_ARGS += \
+       --with-boost-include="$(STAGING_DIR_HOSTPKG)" \
+       --with-log4cplus="$(STAGING_DIR_HOSTPKG)" \
+       --with-openssl="$(STAGING_DIR)/usr" \
+       --enable-boost-headers-only \
+       --enable-static-link
+
+HOST_LDFLAGS += \
+        -Wl,--gc-sections,--as-needed
+
 CONFIGURE_ARGS += \
+       --with-boost-include="$(STAGING_DIR)/usr" \
        --with-log4cplus="$(STAGING_DIR)/usr" \
        --with-openssl="$(STAGING_DIR)/usr" \
+       --without-pic \
        $(if $(CONFIG_PACKAGE_kea-perfdhcp),--enable-perfdhcp,)
 
 CONFIGURE_VARS += \
        cross_compiling="yes"
 
-HOST_CONFIGURE_ARGS += \
-       --enable-static-link \
-       --enable-boost-headers-only \
-       --with-log4cplus="$(STAGING_DIR_HOSTPKG)" \
-       --with-boost-include="$(STAGING_DIR)/usr/include" \
-       --with-openssl="$(STAGING_DIR)/usr" \
-       --without-pic
-
-HOST_LDFLAGS += \
-               -Wl,--gc-sections,--as-needed
-
 TARGET_CXXFLAGS += \
-               $(FPIC) \
-               -fdata-sections \
-               -ffunction-sections
+       $(FPIC) \
+       -fdata-sections \
+       -ffunction-sections
 
 TARGET_LDFLAGS += \
-               -Wl,--gc-sections,--as-needed
+       -Wl,--gc-sections,--as-needed
 
 # Only compile the kea-msg-compiler which we need for
 # package compilation
diff --git a/net/kea/patches/010-openssl-deprecated.patch b/net/kea/patches/010-openssl-deprecated.patch
new file mode 100644 (file)
index 0000000..c8b438e
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/src/lib/cryptolink/openssl_link.cc
++++ b/src/lib/cryptolink/openssl_link.cc
+@@ -79,7 +79,7 @@ CryptoLink::initialize() {
+ std::string
+ CryptoLink::getVersion() {
+-    return (SSLeay_version(SSLEAY_VERSION));
++    return (OpenSSL_version(OPENSSL_VERSION));
+ }
+ } // namespace cryptolink
index 24da2bc246f27e1c717e323637d72b751db8b9c9..a35f5194b5b935e6722abd60efded13074f7dc7f 100644 (file)
@@ -8,15 +8,15 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=keepalived
-PKG_VERSION:=2.0.16
-PKG_RELEASE:=1
+PKG_VERSION:=2.0.18
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://www.keepalived.org/software
-PKG_HASH:=f0c7dc86147a286913c1c2c918f557735016285d25779d4d2fce5732fcb888df
+PKG_HASH:=1423a2b1b8e541211029b9e1e1452e683bbe5f4b0b287eddd609aaf5ff024fd0
 
 PKG_CPE_ID:=cpe:/a:keepalived:keepalived
-PKG_LICENSE:=GPL-2.0+
+PKG_LICENSE:=GPL-2.0-or-later
 PKG_LICENSE_FILES:=COPYING
 PKG_MAINTAINER:=Ben Kelly <ben@benjii.net> \
                Florian Eckert <fe@dev.tdt.de>
index 4e63711f480ee9458308b478f72c04441d206a5d..cf425e87227ab86717f8144fe775a2bf38044da5 100644 (file)
@@ -8,104 +8,106 @@ USE_PROCD=1
 
 KEEPALIVED_CONF=/tmp/keepalived.conf
 
-INDENT_1=\\t
-INDENT_2=$INDENT_1$INDENT_1
-INDENT_3=$INDENT_1$INDENT_1$INDENT_1
-INDENT_4=$INDENT_1$INDENT_1$INDENT_1$INDENT_1
+INDENT_1="\t"
+INDENT_2="${INDENT_1}${INDENT_1}"
+INDENT_3="${INDENT_1}${INDENT_1}${INDENT_1}"
+INDENT_4="${INDENT_1}${INDENT_1}${INDENT_1}${INDENT_1}"
 
 config_section_open() {
-       local tag=$1
-       local name=$2
+       local tag="$1"
+       local name="$2"
 
-       printf "$tag" >> $KEEPALIVED_CONF
-       [ -n "$name" ] && printf " $name" >> $KEEPALIVED_CONF
-       printf " {\n" >> $KEEPALIVED_CONF
+       printf '%s' "$tag" >> "$KEEPALIVED_CONF"
+       [ -n "$name" ] && printf ' %s' "$name" >> "$KEEPALIVED_CONF"
+       printf ' {\n' >> "$KEEPALIVED_CONF"
 }
 
 config_section_close() {
-       printf "}\n\n" >> $KEEPALIVED_CONF
+       printf '}\n\n' >> "$KEEPALIVED_CONF"
 }
 
 config_foreach_wrapper() {
-       local section=$1
-       local function=$1
+       local section="$1"
+       local function="$1"
 
        # Convention is that 'function' and 'section' are the same
-       config_foreach $function $section
+       config_foreach "$function" "$section"
 }
 
 print_elems_indent() {
-       local config=$1
+       local config="$1"
        shift
-       local indent=$1
+       local indent="$1"
        shift
+
        [ -z "$indent" ] && indent="$INDENT_1"
-       for opt in $*; do
-               local $opt
+       for opt in "$@"; do
+               local "$opt"
+               local optval
                local no_val=0
-               if [ ${opt:0:7} == "no_val_" ]; then
-                       opt=${opt:7}
+               if [ "${opt:0:7}" = "no_val_" ]; then
+                       opt="${opt:7}"
                        no_val=1
                fi
-               config_get $opt $config $opt
-               eval optval=\$$opt
+               config_get "$opt" "$config" "$opt"
+               eval optval=\$"$opt"
                [ -z "$optval" ] && continue
-               printf "$indent$opt" >> $KEEPALIVED_CONF
-               [ "$no_val" == "0" ] && {
-                       local words=$(echo "$optval" | wc -w)
-                       if [ $words -gt 1 ]; then
-                               printf " \"$optval\"" >> $KEEPALIVED_CONF
+               printf '%b%s' "$indent" "$opt" >> "$KEEPALIVED_CONF"
+               [ "$no_val" = "0" ] && {
+                       local words=0
+                       words="$(echo "$optval" | wc -w)"
+                       if [ "$words" -gt 1 ]; then
+                               printf ' "%s"' "$optval" >> "$KEEPALIVED_CONF"
                        else
-                               printf " $optval" >> $KEEPALIVED_CONF
+                               printf ' %s' "$optval" >> "$KEEPALIVED_CONF"
                        fi
                }
-               printf "\n" >> $KEEPALIVED_CONF
+               printf '\n' >> "$KEEPALIVED_CONF"
        done
        unset optval
 }
 
 print_list_indent() {
-       local lst=$1
-       local indent=$2
+       local lst="$1"
+       local indent="$2"
        local lst_elems
-       [ -z "$indent" ] && indent=$INDENT_1
+       [ -z "$indent" ] && indent="$INDENT_1"
 
-       eval lst_elems=\$$lst
+       eval lst_elems=\$"$lst"
        [ -z "$lst_elems" ] && return 0
 
-       printf "$indent$lst {\n" >> $KEEPALIVED_CONF
+       printf '%b%s {\n' "$indent" "$lst" >> "$KEEPALIVED_CONF"
        for e in $lst_elems; do
-               [ -n "$eval_item_func" ]
-               printf "$indent$INDENT_1$e\n" >> $KEEPALIVED_CONF
+               printf '%b%s\n' "${indent}${INDENT_1}" "$e">> "$KEEPALIVED_CONF"
        done
-       printf "$indent}\n" >> $KEEPALIVED_CONF
+       printf '%b}\n' "$indent" >> "$KEEPALIVED_CONF"
 }
 
 print_notify() {
-       local type=$1
+       local type="$1"
        shift
-       local name=$1
+       local name="$1"
        shift
-       for notify in $*; do
-               printf "$INDENT_1$notify" >> $KEEPALIVED_CONF
-               notify=$(echo $notify | tr 'a-z' 'A-Z')
-               printf " \"/bin/busybox env -i ACTION=$notify TYPE=$type NAME=$name /sbin/hotplug-call keepalived\"\n" >> $KEEPALIVED_CONF
+       for notify in "$@"; do
+               printf '%b%s' "${INDENT_1}" "$notify">> "$KEEPALIVED_CONF"
+               notify="$(echo "$notify" | tr 'a-z' 'A-Z')"
+               printf ' "/bin/busybox env -i ACTION=%s TYPE=%s NAME=%s /sbin/hotplug-call keepalived"\n' "$notify" "$type" "$name" >> "$KEEPALIVED_CONF"
        done
 }
 
 global_defs() {
        local linkbeat_use_polling notification_email
 
-       config_get alt_config_file $1 alt_config_file
+       config_get alt_config_file "$1" alt_config_file
        [ -z "$alt_config_file" ] || return 0
 
-       config_get_bool linkbeat_use_polling $1 linkbeat_use_polling 0
-       [ $linkbeat_use_polling -gt 0 ] && printf "linkbeat_use_polling\n\n" >> $KEEPALIVED_CONF
+       config_get_bool linkbeat_use_polling "$1" linkbeat_use_polling 0
+       [ "$linkbeat_use_polling" -gt 0 ] && printf 'linkbeat_use_polling\n\n' >> "$KEEPALIVED_CONF"
 
-       config_get notification_email $1 notification_email
+       config_get notification_email "$1" notification_email
        print_list_indent notification_email
 
-       print_elems_indent $1 $INDENT_1 \
+       print_elems_indent "$1" "$INDENT_1" \
                notification_email_from \
                smtp_server \
                smtp_connect_timeout \
@@ -116,129 +118,129 @@ global_defs() {
 }
 
 print_ipaddress_indent() {
-       local section=$1
-       local curr_ipaddr=$2
-       local indent=$3
+       local section="$1"
+       local curr_ipaddr="$2"
+       local indent="$3"
 
        local address device scope name
-       config_get name    $section name
+       config_get name "$section" name
        [ "$name" != "$curr_ipaddr" ] && return 0
 
-       config_get address $section address
-       config_get device  $section device
-       config_get scope   $section scope
+       config_get address "$section" address
+       config_get device "$section" device
+       config_get scope "$section" scope
 
        # Default indent
-       [ -z "$indent" ] && indent=$INDENT_1
+       [ -z "$indent" ] && indent="$INDENT_1"
 
        # If no address exit
        [ -z "$address" ] && return 0
 
        if [ -z "$device" ]; then
-               printf "$indent$address" >> $KEEPALIVED_CONF
+               printf '%b%s' "$indent" "$address" >> "$KEEPALIVED_CONF"
        else
                # Add IP address/netmask and device
-               printf "$indent$address dev $device" >> $KEEPALIVED_CONF
+               printf '%b%s dev %s' "$indent" "$address" "$device">> "$KEEPALIVED_CONF"
                # Add scope
-               [ -n "$scope" ] && printf " scope $scope" >> $KEEPALIVED_CONF
+               [ -n "$scope" ] && printf ' scope %s' "$scope" >> "$KEEPALIVED_CONF"
        fi
 
-       printf "\n" >> $KEEPALIVED_CONF
+       printf '\n' >> "$KEEPALIVED_CONF"
 }
 
 static_ipaddress() {
        local address
        config_get address "$1" address
        for a in $address; do
-               config_foreach print_ipaddress_indent ipaddress $a
+               config_foreach print_ipaddress_indent ipaddress "$a"
        done
 }
 
 print_route_indent() {
-       local section=$1
-       local curr_route=$2
-       local indent=$3
+       local section="$1"
+       local curr_route="$2"
+       local indent="$3"
 
        local name blackhole address src_addr gateway device scope table
 
-       config_get name           $section name
+       config_get name "$section" name
        [ "$name" != "$curr_route" ] && return 0
 
-       config_get_bool blackhole $section blackhole 0
-       config_get address        $section address
-       config_get src_addr       $section src_addr
-       config_get gateway        $section gateway
-       config_get device         $section device
-       config_get table          $section table
+       config_get_bool blackhole "$section" blackhole 0
+       config_get address "$section" address
+       config_get src_addr "$section" src_addr
+       config_get gateway "$section" gateway
+       config_get device "$section" device
+       config_get table "$section" table
 
        # If no address exit
        [ -z "$address" ] && return 0
 
        # Default indent
-       [ -z "$indent" ] && indent=$INDENT_1
+       [ -z "$indent" ] && indent="$INDENT_1"
 
-       [ $blackhole -gt 0 ] && {
-               printf "${indent}blackhole $address\n" >> $KEEPALIVED_CONF
+       [ "$blackhole" -gt 0 ] && {
+               printf '%bblackhole %s\n' "$indent" "$address" >> "$KEEPALIVED_CONF"
                return 0
        }
        # Add src addr or address
        if [ -n "$src_addr" ]; then
-               printf "${indent}src $src_addr $address" >> $KEEPALIVED_CONF
+               printf '%bsrc %s %s' "$indent" "$src_addr" "$address" >> "$KEEPALIVED_CONF"
        else
                [ -z "$device" ] && return 0
-               printf "$indent$address" >> $KEEPALIVED_CONF
+               printf '%b%s' "$indent" "$address" >> "$KEEPALIVED_CONF"
        fi
        # Add route/gateway
-       [ -n "$gateway" ] && printf " via $gateway" >> $KEEPALIVED_CONF
+       [ -n "$gateway" ] && printf ' via %s' "$gateway" >> "$KEEPALIVED_CONF"
        # Add device
-       printf " dev $device" >> $KEEPALIVED_CONF
+       printf ' dev %s' "$device" >> "$KEEPALIVED_CONF"
        # Add scope
-       [ -n "$scope" ] && printf " scope $scope" >> $KEEPALIVED_CONF
+       [ -n "$scope" ] && printf ' scope %s' "$scope" >> "$KEEPALIVED_CONF"
        # Add table
-       [ -n "$table" ] && printf " table $table" >> $KEEPALIVED_CONF
-       printf "\n" >> $KEEPALIVED_CONF
+       [ -n "$table" ] && printf ' table %s' "$table" >> "$KEEPALIVED_CONF"
+       printf '\n' >> "$KEEPALIVED_CONF"
 
 }
 
 print_track_elem_indent() {
-       local section=$1
-       local curr_track_elem=$2
-       local indent=$3
+       local section="$1"
+       local curr_track_elem="$2"
+       local indent="$3"
 
-       local script name value
-       config_get name    $section name
+       local name value
+       config_get name "$section" name
        [ "$name" != "$curr_track_elem" ] && return 0
 
-       config_get value  $section value
-       config_get weight $section weight
+       config_get value "$section" value
+       config_get weight "$section" weight
 
        [ -z "$value" ] && return 0
 
-       printf "$indent$value" >> $KEEPALIVED_CONF
-       [ -n "$weight" ] && printf " weight $weight" >> $KEEPALIVED_CONF
-       printf "\n" >> $KEEPALIVED_CONF
+       printf '%b%s' "$indent" "$value" >> "$KEEPALIVED_CONF"
+       [ -n "$weight" ] && printf ' weight %s' "$weight" >> "$KEEPALIVED_CONF"
+       printf '\n' >> "$KEEPALIVED_CONF"
 }
 
 static_routes() {
        local route
        config_get route "$1" route
        for r in $route; do
-               config_foreach print_route_indent route $r
+               config_foreach print_route_indent route "$r"
        done
 }
 
 # Count 'vrrp_instance' with the given name ; called by vrrp_instance_check()
 vrrp_instance_name_count() {
        local name
-       config_get name $1 name
-       [ "$name" == "$2" ] && count=$((count + 1))
+       config_get name "$1" name
+       [ "$name" = "$2" ] && count="$((count + 1))"
 }
 
 # Check if there's a 'vrrp_instance' section with the given name
 vrrp_instance_check() {
-       local count=0
-       local name=$1
-       config_foreach vrrp_instance_name_count vrrp_instance $name
+       local count="0"
+       local name="$1"
+       config_foreach vrrp_instance_name_count vrrp_instance "$name"
        [ $count -gt 0 ] && return 0 || return 1
 }
 
@@ -247,17 +249,17 @@ vrrp_sync_group() {
        local valid_group
 
        # No name for group, exit
-       config_get name $1 name
+       config_get name "$1" name
        [ -z "$name" ] && return 0
 
        # No members for group, exit
-       config_get group $1 group
+       config_get group "$1" group
        [ -z "$group" ] && return 0
 
        # Check if we have 'vrrp_instance's defined for 
        # each member and remove names with not vrrp_instance defined
        for m in $group; do
-               vrrp_instance_check $m && valid_group="$valid_group $m"
+               vrrp_instance_check "$m" && valid_group="$valid_group $m"
        done
        [ -z "$valid_group" ] && return 0
 
@@ -266,7 +268,7 @@ vrrp_sync_group() {
        group="$valid_group"
        print_list_indent group
 
-       print_elems_indent $1 $INDENT_1 no_val_smtp_alert no_val_global_tracking
+       print_elems_indent "$1" "$INDENT_1" no_val_smtp_alert no_val_global_tracking
 
        print_notify "GROUP" "$name" notify_backup notify_master \
                notify_fault notify
@@ -277,21 +279,21 @@ vrrp_sync_group() {
 vrrp_instance() {
        local name auth_type auth_pass
 
-       config_get name $1 name
+       config_get name "$1" name
        [ -z "$name" ] && return 0
 
        config_section_open "vrrp_instance" "$name"
 
-       config_get auth_type $1 auth_type
-       config_get auth_pass $1 auth_pass
-       [ -n "$auth_type" -a -n "$auth_pass" ] && {
-               printf "${INDENT_1}authentication {\n" >> $KEEPALIVED_CONF
-               printf "${INDENT_2}auth_type $auth_type\n" >> $KEEPALIVED_CONF
-               printf "${INDENT_2}auth_pass $auth_pass\n" >> $KEEPALIVED_CONF
-               printf "$INDENT_1}\n" >> $KEEPALIVED_CONF
+       config_get auth_type "$1" auth_type
+       config_get auth_pass "$1" auth_pass
+       [ -n "$auth_type" ] && [ -n "$auth_pass" ] && {
+               printf '%bauthentication {\n' "${INDENT_1}" >> "$KEEPALIVED_CONF"
+               printf '%bauth_type %s\n' "${INDENT_2}" "$auth_type" >> "$KEEPALIVED_CONF"
+               printf '%bauth_pass %s\n' "${INDENT_2}" "$auth_pass" >> "$KEEPALIVED_CONF"
+               printf '%b}\n' "${INDENT_1}" >> "$KEEPALIVED_CONF"
        }
 
-       print_elems_indent $1 $INDENT_1 state interface \
+       print_elems_indent "$1" "$INDENT_1" state interface \
                mcast_src_ip unicast_src_ip virtual_router_id version priority \
                advert_int preempt_delay debug \
                lvs_sync_daemon_interface garp_master_delay garp_master_refresh \
@@ -305,56 +307,56 @@ vrrp_instance() {
 
        # Handle virtual_ipaddress & virtual_ipaddress_excluded lists
        for opt in virtual_ipaddress virtual_ipaddress_excluded; do
-               config_get $opt $1 $opt
+               config_get "$opt" "$1" "$opt"
                eval optval=\$$opt
                [ -z "$optval" ] && continue
-               printf "$INDENT_1$opt {\n" >> $KEEPALIVED_CONF
+               printf '%b%s {\n' "${INDENT_1}" "$opt" >> "$KEEPALIVED_CONF"
                for a in $optval; do
-                       config_foreach print_ipaddress_indent ipaddress $a $INDENT_2
+                       config_foreach print_ipaddress_indent ipaddress "$a" "$INDENT_2"
                done
-               printf "$INDENT_1}\n" >> $KEEPALIVED_CONF
+               printf '%b}\n' "${INDENT_1}" >> "$KEEPALIVED_CONF"
        done
 
        # Handle virtual_routes
        for opt in virtual_routes; do
-               config_get $opt $1 $opt
+               config_get "$opt" "$1" "$opt"
                eval optval=\$$opt
                [ -z "$optval" ] && continue
-               printf "$INDENT_1$opt {\n" >> $KEEPALIVED_CONF
+               printf '%b%s {\n' "${INDENT_1}" "$opt" >> "$KEEPALIVED_CONF"
                for r in $optval; do
-                       config_foreach print_route_indent route $r $INDENT_2
+                       config_foreach print_route_indent route "$r" "$INDENT_2"
                done
-               printf "$INDENT_1}\n" >> $KEEPALIVED_CONF
+               printf '%b}\n' "${INDENT_1}" >> "$KEEPALIVED_CONF"
        done
 
        # Handle track_script lists
        for opt in track_script; do
-               config_get $opt $1 $opt
+               config_get "$opt" "$1" "$opt"
                eval optval=\$$opt
                [ -z "$optval" ] && continue
-               printf "$INDENT_1$opt {\n" >> $KEEPALIVED_CONF
+               printf '%b%s {\n' "${INDENT_1}" "$opt" >> "$KEEPALIVED_CONF"
                for t in $optval; do
-                       printf "$INDENT_2$optval\n" >> $KEEPALIVED_CONF
+                       printf '%b%s\n' "${INDENT_2}" "$optval" >> "$KEEPALIVED_CONF"
                done
-               printf "$INDENT_1}\n" >> $KEEPALIVED_CONF
+               printf '%b}\n' "${INDENT_1}" >> "$KEEPALIVED_CONF"
        done
 
        # Handle track_interface lists
        for opt in track_interface; do
-               config_get $opt $1 $opt
+               config_get "$opt" "$1" "$opt"
                eval optval=\$$opt
                [ -z "$optval" ] && continue
-               printf "$INDENT_1$opt {\n" >> $KEEPALIVED_CONF
+               printf '%b%s {\n' "${INDENT_1}" "$opt" >> "$KEEPALIVED_CONF"
                for t in $optval; do
-                       config_foreach print_track_elem_indent track_interface $t $INDENT_2
+                       config_foreach print_track_elem_indent track_interface "$t" "$INDENT_2"
                done
-               printf "$INDENT_1}\n" >> $KEEPALIVED_CONF
+               printf '%b}\n' "${INDENT_1}" >> "$KEEPALIVED_CONF"
        done
 
        # Handle simple lists of strings (with no spaces in between)
        for opt in unicast_peer; do
-               config_get $opt $1 $opt
-               print_list_indent $opt
+               config_get "$opt" "$1" "$opt"
+               print_list_indent "$opt"
        done
        unset optval
 
@@ -364,12 +366,12 @@ vrrp_instance() {
 vrrp_script() {
        local name
 
-       config_get name $1 name
+       config_get name "$1" name
        [ -z "$name" ] && return 0
 
        config_section_open "vrrp_script" "$name"
 
-       print_elems_indent $1 $INDENT_1 script interval weight fall rise
+       print_elems_indent "$1" "$INDENT_1" script interval weight fall rise
 
        config_section_close
 }
@@ -379,17 +381,17 @@ url() {
 
        local name path digest
 
-       config_get name $1 name
+       config_get name "$1" name
        [ "$url" = "$name" ] || return 0
 
-       config_get path $1 path
-       config_get digest $1 digest
+       config_get path "$1" path
+       config_get digest "$1" digest
 
-       [ -n "$digest" -a -n "$path" ] && {
-               printf "${INDENT_3}url {\n" >> $KEEPALIVED_CONF
-               printf "${INDENT_4}path "$path"\n" >> $KEEPALIVED_CONF
-               printf "${INDENT_4}digest $digest\n" >> $KEEPALIVED_CONF
-               printf "${INDENT_3}}\n" >> $KEEPALIVED_CONF
+       [ -n "$digest" ] && [ -n "$path" ] && {
+               printf '%burl {\n' "${INDENT_3}" >> "$KEEPALIVED_CONF"
+               printf '%bpath %s\n' "${INDENT_4}" "$path" >> "$KEEPALIVED_CONF"
+               printf '%bdigest %s\n' "${INDENT_4}" "$digest" >> "$KEEPALIVED_CONF"
+               printf '%b}\n' "${INDENT_3}" >> "$KEEPALIVED_CONF"
        }
 }
 
@@ -402,44 +404,44 @@ real_server() {
 
        local enabled name weight ipaddr port check
 
-       config_get_bool enabled $1 enabled 1
+       config_get_bool enabled "$1" enabled 1
        [ "$enabled" -eq 1 ] || return 0
 
-       config_get name $1 name
+       config_get name "$1" name
        [ "$server" = "$name" ] || return 0
 
-       config_get weight $1 weight
+       config_get weight "$1" weight
        [ -n "$weight" ] || return 0
 
-       config_get ipaddr $1 ipaddr
-       config_get port $1 port
-       config_get check $1 check
+       config_get ipaddr "$1" ipaddr
+       config_get port "$1" port
+       config_get check "$1" check
 
-       [ -n "$ipaddr" -a -n "$port" ] && {
-               printf "${INDENT_1}real_server $ipaddr $port {\n" >> $KEEPALIVED_CONF
-               printf "${INDENT_2}weight $weight\n" >> $KEEPALIVED_CONF
+       [ -n "$ipaddr" ] && [ -n "$port" ] && {
+               printf '%breal_server %s %d {\n' "${INDENT_1}" "$ipaddr" "$port" >> "$KEEPALIVED_CONF"
+               printf '%bweight %d\n' "${INDENT_2}" "$weight" >> "$KEEPALIVED_CONF"
                case "$check" in
                        TCP_CHECK)
-                               printf "${INDENT_2}${check} {\n" >> $KEEPALIVED_CONF
-                               print_elems_indent $1 $INDENT_3 connect_timeout \
+                               printf '%b%s {\n' "${INDENT_2}" "$check" >> "$KEEPALIVED_CONF"
+                               print_elems_indent "$1" "$INDENT_3" connect_timeout \
                                        connect_port
-                               printf "${INDENT_2}}\n" >> $KEEPALIVED_CONF
+                               printf '%b}\n' "${INDENT_2}" >> "$KEEPALIVED_CONF"
                                ;;
                        MISC_CHECK)
-                               printf "${INDENT_2}${check} {\n" >> $KEEPALIVED_CONF
-                               print_elems_indent $1 $INDENT_3 misc_path
-                               printf "${INDENT_2}}\n" >> $KEEPALIVED_CONF
+                               printf '%b%s {\n' "${INDENT_2}" "$check" >> "$KEEPALIVED_CONF"
+                               print_elems_indent "$1" "$INDENT_3" misc_path
+                               printf '%b}\n' "${INDENT_2}" >> "$KEEPALIVED_CONF"
                                ;;
                        HTTP_GET | SSL_GET)
-                               printf "${INDENT_2}${check} {\n" >> $KEEPALIVED_CONF
-                               print_elems_indent $1 $INDENT_3 connect_timeout \
+                               printf '%b%s {\n' "${INDENT_2}" "$check" >> "$KEEPALIVED_CONF"
+                               print_elems_indent "$1" "$INDENT_3" connect_timeout \
                                        connect_port nb_get_retry delay_before_retry
                                # Handle url list
-                               config_list_foreach $1 url url_list
-                               printf "${INDENT_2}}\n" >> $KEEPALIVED_CONF
+                               config_list_foreach "$1" url url_list
+                               printf '%b}\n' "${INDENT_2}" >> "$KEEPALIVED_CONF"
                                ;;
                esac
-               printf "${INDENT_1}}\n" >> $KEEPALIVED_CONF
+               printf '%b}\n' "${INDENT_1}" >> "$KEEPALIVED_CONF"
        }
 }
 
@@ -450,33 +452,33 @@ real_server_list() {
 virtual_server() {
        local enabled ipaddr port lb_algo sorry_server_ip sorry_server_port
 
-       config_get_bool enabled $1 enabled 1
+       config_get_bool enabled "$1" enabled 1
        [ "$enabled" -eq 1 ] || return 0
 
-       config_get ipaddr $1 ipaddr
+       config_get ipaddr "$1" ipaddr
        [ -z "$ipaddr" ] && return 0
-       config_get port $1 port
+       config_get port "$1" port
        [ -z "$port" ] && return 0
 
        config_section_open "virtual_server" "$ipaddr $port"
 
-       print_elems_indent $1 $INDENT_1 fwmark delay_loop \
+       print_elems_indent "$1" "$INDENT_1" fwmark delay_loop \
                lb_kind persistence_timeout persistence_granularity \
                virtualhost protocol
 
-       config_get lb_algo $1 lb_algo
+       config_get lb_algo "$1" lb_algo
        [ -z "$lb_algo" ] && lb_algo="rr"
-       modprobe ip_vs_${lb_algo} 2>&1 1>/dev/null
-       printf "${INDENT_1}lb_algo ${lb_algo}\n" >> $KEEPALIVED_CONF
+       modprobe ip_vs_${lb_algo} 1>/dev/null 2>&1
+       printf '%blb_algo %s\n' "${INDENT_1}" "${lb_algo}" >> "$KEEPALIVED_CONF"
 
-       config_get sorry_server_ip $1 sorry_server_ip
-       config_get sorry_server_port $1 sorry_server_port
-       [ -n "$sorry_server_ip" -a -n "$sorry_server_port" ] && {
-               printf "${INDENT_1}sorry_server $sorry_server_ip $sorry_server_port\n" >> $KEEPALIVED_CONF
+       config_get sorry_server_ip "$1" sorry_server_ip
+       config_get sorry_server_port "$1" sorry_server_port
+       [ -n "$sorry_server_ip" ] && [ -n "$sorry_server_port" ] && {
+               printf '%bsorry_server %s %s\n' "${INDENT_1}" "$sorry_server_ip" "$sorry_server_port" >> "$KEEPALIVED_CONF"
        }
 
        # Handle real_server list
-       config_list_foreach $1 real_server real_server_list
+       config_list_foreach "$1" real_server real_server_list
 
        config_section_close
 }
@@ -484,11 +486,11 @@ virtual_server() {
 process_config() {
        local alt_config_file
 
-       rm -f $KEEPALIVED_CONF
+       rm -f "$KEEPALIVED_CONF"
 
        # First line
-       printf "! Configuration file for keepalived (autogenerated via init script)\n" > $KEEPALIVED_CONF
-       printf "! Written %s\n\n" "$(date +'%c')" >> $KEEPALIVED_CONF
+       printf '! Configuration file for keepalived (autogenerated via init script)\n' > "$KEEPALIVED_CONF"
+       printf '! Written %s\n\n' "$(date +'%c')" >> "$KEEPALIVED_CONF"
 
        [ -f /etc/config/keepalived ] || return 0
        config_load 'keepalived'
@@ -499,9 +501,9 @@ process_config() {
 
        # If "alt_config_file" specified, use that instead
        [ -n "$alt_config_file" ] && [ -f "$alt_config_file" ] && {
-               rm -f $KEEPALIVED_CONF
+               rm -f "$KEEPALIVED_CONF"
                # Symlink "alt_config_file" since it's a bit easier and safer
-               ln -s $alt_config_file $KEEPALIVED_CONF
+               ln -s "$alt_config_file" "$KEEPALIVED_CONF"
                return 0
        }
 
index 97f56fe8905d5d8a987280db34ea5a9810176f64..b174a2c06259496f1126ced2d84b2500f585f900 100644 (file)
@@ -12,6 +12,7 @@ PKG_VERSION:=2016-07-R1
 PKG_RELEASE:=1
 
 PKG_LICENSE:=LGPLv2.1
+PKG_CPE_ID:=cpe:/a:kismet:kismet
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=http://www.kismetwireless.net/code
@@ -27,7 +28,7 @@ define Package/kismet/Default
   MAINTAINER:=Jean-Michel lacroix <lacroix@lepine-lacroix.info>
   DEPENDS:= $(CXX_DEPENDS) +libnl
   URL:=http://www.kismetwireless.net/
-  SUBMENU:=wireless
+  SUBMENU:=Wireless
 endef
 
 define Package/kismet/Default/description
index 0d74f6868f9d620bd4dac87c96b757e24b60b58d..93ab341e9d3ede94e22cdf14762d3f12bffe9af4 100644 (file)
@@ -8,15 +8,16 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=knot
-PKG_VERSION:=2.8.1
+PKG_VERSION:=2.8.4
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://secure.nic.cz/files/knot-dns/
-PKG_HASH:=b21bf03e5cb6804df4e0e8b3898446349e86ddae5bf110edaf240d0ad1e2a2c6
+PKG_HASH:=541e7e43503765c91405c5797b3838103bb656154712e69b3f959c6ab0e700a9
 
 PKG_MAINTAINER:=Daniel Salzman <daniel.salzman@nic.cz>
 PKG_LICENSE:=GPL-3.0 LGPL-2.0 0BSD BSD-3-Clause OLDAP-2.8
+PKG_CPE_ID:=cpe:/a:knot-dns:knot_dns
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
 PKG_FIXUP:=autoreconf
@@ -44,7 +45,7 @@ endef
 define Package/knot-libs
        $(call Package/knot-lib/Default)
        TITLE+= common DNS and DNSSEC libraries
-       DEPENDS+=+libgnutls
+       DEPENDS+=+libgnutls +lmdb
 endef
 
 define Package/knot-libzscanner
index 89b0d24afc810463b849cc6aac2882f3167c8926..46c956276ad56e777d6794cc70c539961d62367f 100644 (file)
@@ -12,7 +12,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=knxd
 PKG_VERSION:=0.14.29
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/knxd/knxd/tar.gz/$(PKG_VERSION)?
@@ -20,7 +20,7 @@ PKG_HASH:=4513328dd5ecfc17955e6884e938d652dbd33b82797893ae9ad768a247a0f63e
 
 PKG_MAINTAINER:=Othmar Truniger <github@truniger.ch>
 
-PKG_LICENSE:=GPL-2.0+
+PKG_LICENSE:=GPL-2.0-or-later
 PKG_LICENSE_FILES:=LICENSE
 
 PKG_BUILD_PARALLEL:=1
index e1ff76fd229bbe761cf40209b58411ae2e56a438..1c0aae9935d66e87b5220c8b9a212f220792a9d6 100644 (file)
@@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=kplex
 PKG_VERSION:=1.4
-PKG_RELEASE=1
+PKG_RELEASE=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
 PKG_SOURCE_URL:=http://www.stripydog.com/download
 PKG_HASH:=8c2f1ccba4a22cb3b683b73b9dab6ce317e7d858764f1c2c695970f94c726fc1
 
-PKG_LICENSE:=GPL-3.0+
+PKG_LICENSE:=GPL-3.0-or-later
 PKG_LICENSE_FILES:=COPYING
 
 PKG_MAINTAINER:=Nuno Goncalves <nunojpg@gmail.com>
index d72e29d2e77a380bba8503d8801f2a17ed05a864..c268950cc216d51fbfec50c997839bc4c985d988 100644 (file)
@@ -15,6 +15,7 @@ PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
 
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=NOTICE
+PKG_CPE_ID:=cpe:/a:mit:kerberos
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://web.mit.edu/kerberos/dist/krb5/1.17
index f56d4a9a213a719fb5d25cf27479099da12d30f4..98d4eca486e4016f5bc162f5c99b663b9010647c 100644 (file)
@@ -19,7 +19,7 @@ PKG_LICENSE_FILES:=COPYING
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://www.flyn.org/projects/lcdringer
 PKG_HASH:=72f34473a62f997516e0a73827b4400150966e1d1d98ece4d7b92075e26913e0
-PKG_BUILD_DEPENDS:=vala
+PKG_BUILD_DEPENDS:=vala/host
 
 PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
index 1dfe10508e6c07199249f08356fde7b389412096..020f933d4ec544aac5e133b5943c1d140a9af9da 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=lftp
 PKG_VERSION:=4.8.4
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=http://lftp.tech/ftp/ \
                https://mirror.csclub.uwaterloo.ca/gentoo-distfiles/distfiles/
@@ -17,8 +17,9 @@ PKG_SOURCE_URL:=http://lftp.tech/ftp/ \
 PKG_HASH:=4ebc271e9e5cea84a683375a0f7e91086e5dac90c5d51bb3f169f75386107a62
 
 
-PKG_LICENSE:=GPL-3.0+
+PKG_LICENSE:=GPL-3.0-or-later
 PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:alexander_v._lukyanov:lftp
 
 include $(INCLUDE_DIR)/uclibc++.mk
 include $(INCLUDE_DIR)/package.mk
index e56547e8532bf6242055ab65acc27d1d60f60622..406b049f0922e17a528e5ed0ad352f7610171076 100644 (file)
@@ -12,6 +12,7 @@ PKG_VERSION:=1.7
 PKG_RELEASE:=1
 PKG_LICENSE:=LGPL-2.1
 PKG_MAINTAINER:=Thomas Guyot-Sionnest <tguyot@gmail.com>
+PKG_CPE_ID:=cpe:/a:libndp:libndp
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://libndp.org/files/
index 606e4c1c91e908aae729a7664969713539e90fe6..ccd1a4f22ddca2a8dd11ec67c64d8a390c1fb1be 100644 (file)
@@ -7,15 +7,17 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libreswan
-PKG_VERSION:=3.27
-PKG_RELEASE:=3
+PKG_VERSION:=3.29
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://download.libreswan.org/
-PKG_HASH:=ead07dd701116094b483dc57e54e2a5ee9a06d3982bb142260bcbf3d1faf7b82
+PKG_HASH:=d60e4160f43272b6307b697a13f79f56b5ec2bca61d83097ddadd8586a58ab3e
 
-PKG_LICENSE:=GPL-2.0
 PKG_MAINTAINER:=Lucian Cristian <lucian.cristian@gmail.com>
+PKG_LICENSE:=GPL-2.0-or-later
+PKG_LICENSE_FILES:=COPYING LICENSE
+PKG_CPE_ID:=cpe:/a:libreswan:libreswan
 
 PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
@@ -39,9 +41,11 @@ $(call Package/libreswan/Default)
   SUBMENU:=VPN
   SECTION:=net
   CATEGORY:=Network
-  DEPENDS:= +libnss +librt +libevent2 +libevent2-pthreads +kmod-crypto-authenc \
-       +kmod-crypto-hash +kmod-ipt-ipsec +iptables-mod-ipsec +ip-full +kmod-ip-vti \
-       +kmod-ipsec +kmod-ipsec4 +kmod-crypto-rng +IPV6:kmod-ipsec6 +IPV6:kmod-ip6-vti
+  DEPENDS:= +IPV6:kmod-ip6-vti +IPV6:kmod-ipsec6 +ip-full +iptables-mod-ipsec \
+       +kmod-crypto-aead +kmod-crypto-authenc +kmod-crypto-gcm \
+       +kmod-crypto-hash +kmod-crypto-rng +kmod-ip-vti +kmod-ipsec \
+       +kmod-ipsec4 +kmod-ipt-ipsec +libevent2 +libevent2-pthreads \
+       +libldns +librt +libunbound-heavy +nss-utils +nspr
   PROVIDES:=openswan
   CONFLICTS:=strongswan
   TITLE+= IPsec Server
@@ -61,10 +65,8 @@ define Package/libreswan/conffiles
 /etc/ipsec.secrets
 endef
 
-TARGET_CFLAGS+= -Wno-error=format-nonliteral
 MAKE_FLAGS+= \
     WERROR_CFLAGS=" " \
-    USE_DNSSEC=false \
     USE_LINUX_AUDIT=false \
     USE_LABELED_IPSEC=false \
     USE_NM=false \
@@ -74,10 +76,10 @@ MAKE_FLAGS+= \
     USE_FIPSCHECK=false \
     USE_LIBCAP_NG=false \
     USE_SYSTEMD_WATCHDOG=false \
+    USE_SECCOMP=false\
     INC_USRLOCAL="/usr" \
     FINALRUNDIR="/var/run/pluto" \
     ARCH="$(LINUX_KARCH)" \
-    KERNELSRC="$(LINUX_DIR)"
 
 define Build/Prepare
        $(call Build/Prepare/Default)
diff --git a/net/libreswan/patches/000-dh31-auto-detect.patch b/net/libreswan/patches/000-dh31-auto-detect.patch
new file mode 100644 (file)
index 0000000..301e87a
--- /dev/null
@@ -0,0 +1,34 @@
+From 9126ec99ca9e136666cbba5b48a8a02cb11350e0 Mon Sep 17 00:00:00 2001
+From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
+Date: Mon, 15 Oct 2018 11:16:54 -0400
+Subject: [PATCH] Automatically detect whether Curve25519 is available in NSS
+ for USE_DH31
+
+currently, USE_DH31 defaults to true.
+
+On some platforms, where older versions of NSS are in use, this should
+default to false.
+
+This patch automatically detects such systems and disables USE_DH31 on
+those platforms.
+
+It produces some amount of noise on stderr about CURVE_25519 during
+the build on those older platforms, but that seems ok to me, since
+those platforms should know that they're missing a modern feature.
+
+If you prefer less noise, i'd be happy with any modification that does
+a similar sort of autodetection.
+
+diff --git a/mk/userland-cflags.mk b/mk/userland-cflags.mk
+index d0a88b1aa1..7d88874b1c 100644
+--- a/mk/userland-cflags.mk
++++ b/mk/userland-cflags.mk
+@@ -240,7 +240,7 @@ ifeq ($(USE_DH24),true)
+ USERLAND_CFLAGS += -DUSE_DH24
+ endif
+-USE_DH31 ?= true
++USE_DH31 ?= $(shell if printf '\#include <secoidt.h>\nint main() { return SEC_OID_CURVE25519; }\n'| $(CC) -x c $$(pkg-config --cflags nss) -o /dev/null -; then echo true; else echo false; fi )
+ ifeq ($(USE_DH31),true)
+ USERLAND_CFLAGS += -DUSE_DH31
+ endif
diff --git a/net/libreswan/patches/001-move_kernel_klips_to_mk_kernel.mk.patch b/net/libreswan/patches/001-move_kernel_klips_to_mk_kernel.mk.patch
deleted file mode 100644 (file)
index 0cca6c3..0000000
+++ /dev/null
@@ -1,973 +0,0 @@
-From 010a9f2bbdaa97024933be04eff1a48ff1f9b657 Mon Sep 17 00:00:00 2001
-From: Andrew Cagney <cagney@gnu.org>
-Date: Thu, 25 Oct 2018 21:00:59 -0400
-Subject: [PATCH] building: move kernel (klips) rules to mk/kernel.mk
-
----
- Makefile     | 448 +-----------------------------------------------
- mk/kernel.mk | 468 +++++++++++++++++++++++++++++++++++++++++++++++++++
- 2 files changed, 474 insertions(+), 442 deletions(-)
- create mode 100644 mk/kernel.mk
-
-diff --git a/Makefile b/Makefile
-index b706defd0f..0b070966e6 100644
---- a/Makefile
-+++ b/Makefile
-@@ -97,119 +97,14 @@ KERNELREL=$(shell ${KVSHORTUTIL} ${KERNELSRC}/Makefile)
- # directories visited by all recursion
--# declaration for make's benefit
--.PHONY:       def insert kpatch patches _patches _patches2.4 \
--      klipsdefaults programs man install \
--      precheck verset confcheck kernel \
--      module module24 module26 kinstall minstall minstall24 minstall26 \
--      moduleclean mod24clean module24clean mod26clean module26clean \
--      backup unpatch uninstall \
--      check \
--
--kpatch: unapplypatch applypatch klipsdefaults
--npatch: unapplynpatch applynpatch
--sarefpatch: unapplysarefpatch applysarefpatch
--
--unapplypatch:
--      @echo "info: making unapplypatch in `pwd` and KERNELSRC=\"${KERNELSRC}\";"
--      -@if [ -f ${KERNELSRC}/libreswan.patch ]; then \
--              echo Undoing previous patches; \
--              cat ${KERNELSRC}/libreswan.patch | (cd ${KERNELSRC} && patch -p1 -R --force -E -z .preipsec --reverse --ignore-whitespace ); \
--      fi
--
--applypatch:
--      @echo "info: Now performing forward patches in `pwd`";
--      ${MAKE} kernelpatch${KERNELREL} | tee ${KERNELSRC}/libreswan.patch | (cd ${KERNELSRC} && patch -p1 -b -z .preipsec --forward --ignore-whitespace )
--
--unapplynpatch:
--      @echo "info: making unapplynpatch (note the second N) in `pwd`";
--      -@if [ -f ${KERNELSRC}/natt.patch ]; then \
--              echo Undoing previous NAT patches; \
--              cat ${KERNELSRC}/natt.patch | (cd ${KERNELSRC} && patch -p1 -R --force -E -z .preipsec --reverse --ignore-whitespace ); \
--      fi
--
--applynpatch:
--      @echo "info: Now performing forward NAT patches in `pwd`";
--      ${MAKE} nattpatch${KERNELREL} | tee ${KERNELSRC}/natt.patch | (cd ${KERNELSRC} && patch -p1 -b -z .preipsec --forward --ignore-whitespace )
--
--unapplysarefpatch:
--      @echo "info: making unapplysarefpatch in `pwd`";
--      -@if [ -f ${KERNELSRC}/saref.patch ]; then \
--              echo Undoing previous saref patches; \
--              cat ${KERNELSRC}/saref.patch | (cd ${KERNELSRC} && patch -p1 -R --force -E -z .preng --reverse --ignore-whitespace ); \
--      fi
--
--applysarefpatch:
--      @echo "info: Now performing SAref patches in `pwd`";
--      ${MAKE} sarefpatch${KERNELREL} | tee ${KERNELSRC}/klipsng.patch | (cd ${KERNELSRC} && patch -p1 -b -z .preng --forward --ignore-whitespace )
--
--# patch kernel
--PATCHER=packaging/utils/patcher
--
--_patches:
--      echo "===============" >>out.kpatch
--      echo "`date` `cd $(KERNELSRC) ; pwd`" >>out.kpatch
--      $(MAKE) __patches$(KERNELREL) >>out.kpatch
--
--# Linux-2.4.0 version
--__patches2.4:
--      @$(PATCHER) -v -c $(KERNELSRC) Documentation/Configure.help \
--              'CONFIG_KLIPS' $(PATCHES)/Documentation/Configure.help.fs2_2.patch
--      @$(PATCHER) -v $(KERNELSRC) net/Config.in \
--              'CONFIG_KLIPS' $(PATCHES)/net/Config.in.fs2_4.patch
--      @$(PATCHER) -v $(KERNELSRC) net/Makefile \
--              'CONFIG_KLIPS' $(PATCHES)/net/Makefile.fs2_4.patch
--      @$(PATCHER) -v $(KERNELSRC) net/ipv4/af_inet.c \
--              'CONFIG_KLIPS' $(PATCHES)/net/ipv4/af_inet.c.fs2_4.patch
--      @$(PATCHER) -v $(KERNELSRC) net/ipv4/udp.c \
--              'CONFIG_KLIPS' $(PATCHES)/net/ipv4/udp.c.fs2_4.patch
--      @$(PATCHER) -v $(KERNELSRC) include/net/sock.h \
--              'CONFIG_KLIPS' $(PATCHES)/include/net/sock.h.fs2_4.patch
--# Removed patches, will unpatch automatically.
--      @$(PATCHER) -v $(KERNELSRC) include/linux/proc_fs.h
--      @$(PATCHER) -v $(KERNELSRC) net/core/dev.c
--      @$(PATCHER) -v $(KERNELSRC) net/ipv4/protocol.c
--      @$(PATCHER) -v $(KERNELSRC) drivers/net/Space.c
--      @$(PATCHER) -v $(KERNELSRC) include/linux/netlink.h
--      @$(PATCHER) -v $(KERNELSRC) net/netlink/af_netlink.c
--      @$(PATCHER) -v $(KERNELSRC) net/netlink/netlink_dev.c
--      @$(PATCHER) -v $(KERNELSRC) drivers/isdn/isdn_net.c
--
--klipsdefaults:
--      @KERNELDEFCONFIG=$(KERNELSRC)/arch/$(ARCH)/defconfig ; \
--      KERNELCONFIG=$(KCFILE) ; \
--      if ! egrep -q 'CONFIG_KLIPS' $$KERNELDEFCONFIG ; \
--      then \
--              set -x ; \
--              cp -a $$KERNELDEFCONFIG $$KERNELDEFCONFIG.orig ; \
--              chmod u+w $$KERNELDEFCONFIG ; \
--              cat $$KERNELDEFCONFIG $(KERNELKLIPS)/defconfig \
--                      >$$KERNELDEFCONFIG.tmp ; \
--              rm -f $$KERNELDEFCONFIG ; \
--              cp -a $$KERNELDEFCONFIG.tmp $$KERNELDEFCONFIG ; \
--              rm -f $$KERNELDEFCONFIG.tmp ; \
--      fi ; \
--      if ! egrep -q 'CONFIG_KLIPS' $$KERNELCONFIG ; \
--      then \
--              set -x ; \
--              cp -a $$KERNELCONFIG $$KERNELCONFIG.orig ; \
--              chmod u+w $$KERNELCONFIG ; \
--              cat $$KERNELCONFIG $(KERNELKLIPS)/defconfig \
--                      >$$KERNELCONFIG.tmp ; \
--              rm -f $$KERNELCONFIG ; \
--              cp -a $$KERNELCONFIG.tmp $$KERNELCONFIG ; \
--              rm -f $$KERNELCONFIG.tmp ; \
--      fi
--
--
--
- # programs
- ABSOBJDIR:=$(shell mkdir -p ${OBJDIR}; cd ${OBJDIR} && pwd)
- OBJDIRTOP=${ABSOBJDIR}
- # Recursive clean dealt with elsewhere.
--local-clean-base: moduleclean
-+.PHONY: local-clean-base
-+local-clean-base:
-       $(foreach file,$(RPMTMPDIR) $(RPMDEST) out.*build out.*install, \
-               rm -rf $(file) ; )      # but leave out.kpatch
-@@ -219,339 +114,13 @@ local-clean-base: moduleclean
- # $(OBJDIR), "distclean" does not depend on it.  If it did, "make
- # distclean" would have the quirky behaviour of first creating
- # $(OBJDIR) only to then delete it.
--distclean: moduleclean module24clean module26clean clean-kvm-keys
-+.PHONY: distclean
-+distclean: clean-kvm-keys
-       rm -f $(RPMTMPDIR) $(RPMDEST) out.*
-       rm -rf testing/pluto/*/OUTPUT*
-       rm -rf OBJ.* $(OBJDIR)
-       rm -rf BACKUP
--# proxies for major kernel make operations
--
--# do-everything entries
--KINSERT_PRE=precheck verset insert
--PRE=precheck verset kpatch
--POST=confcheck programs kernel install
--MPOST=confcheck programs module install
--
--# preliminaries
--precheck:
--      @if test ! -d $(KERNELSRC) -a ! -L $(KERNELSRC) ; \
--      then \
--              echo '*** cannot find directory "$(KERNELSRC)"!!' ; \
--              echo '*** may be necessary to add symlink to kernel source' ; \
--              exit 1 ; \
--      fi
--      @if ! cd $(KERNELSRC) ; \
--      then \
--              echo '*** cannot "cd $(KERNELSRC)"!!' ; \
--              echo '*** may be necessary to add symlink to kernel source' ; \
--              exit 1 ; \
--      fi
--      @if test ! -f $(KCFILE) ; \
--      then \
--              echo '*** cannot find "$(KCFILE)"!!' ; \
--              echo '*** perhaps kernel has never been configured?' ; \
--              echo '*** please do that first; the results are necessary.' ; \
--              exit 1 ; \
--      fi
--      @if test ! -f $(VERFILE) ; \
--      then \
--              echo '*** cannot find "$(VERFILE)"!!' ; \
--              echo '*** perhaps kernel has never been compiled?' ; \
--              echo '*** please do that first; the results are necessary.' ; \
--              exit 1 ; \
--      fi
--
--# configuring (exit statuses disregarded, something fishy here sometimes)
--xcf:
--      -cd $(KERNELSRC) ; $(MAKE) $(KERNMAKEOPTS) xconfig
--mcf:
--      -cd $(KERNELSRC) ; $(MAKE) $(KERNMAKEOPTS) menuconfig
--pcf:
--      -cd $(KERNELSRC) ; $(MAKE) $(KERNMAKEOPTS) config
--
--ocf:
--      -cd $(KERNELSRC) ; $(MAKE) $(KERNMAKEOPTS) oldconfig
--
--rcf:
--      cd $(KERNELSRC) ; $(MAKE) $(KERNMAKEOPTS) ${NONINTCONFIG} </dev/null
--      cd $(KERNELSRC) ; $(MAKE) $(KERNMAKEOPTS) dep >/dev/null
--
--kclean:
--      -cd $(KERNELSRC) ; $(MAKE) $(KERNMAKEOPTS) clean
--
--confcheck:
--      @if test ! -f $(KCFILE) ; \
--      then echo '*** no kernel configuration file written!!' ; exit 1 ; \
--      fi
--      @if ! egrep -q '^CONFIG_KLIPS=[my]' $(KCFILE) ; \
--      then echo '*** IPsec not in kernel config ($(KCFILE))!!' ; exit 1 ; \
--      fi
--      @if ! egrep -q 'CONFIG_KLIPS[   ]+1' $(ACFILE) && \
--              ! egrep -q 'CONFIG_KLIPS_MODULE[        ]+1' $(ACFILE) ; \
--      then echo '*** IPsec in kernel config ($(KCFILE)),' ; \
--              echo '***       but not in config header file ($(ACFILE))!!' ; \
--              exit 1 ; \
--      fi
--      @if egrep -q '^CONFIG_KLIPS=m' $(KCFILE) && \
--              ! egrep -q '^CONFIG_MODULES=y' $(KCFILE) ; \
--      then echo '*** IPsec configured as module in kernel with no module support!!' ; exit 1 ; \
--      fi
--      @if ! egrep -q 'CONFIG_KLIPS_AH[        ]+1' $(ACFILE) && \
--              ! egrep -q 'CONFIG_KLIPS_ESP[   ]+1' $(ACFILE) ; \
--      then echo '*** IPsec configuration must include AH or ESP!!' ; exit 1 ; \
--      fi
--
--# kernel building, with error checks
--kernel:
--      rm -f out.kbuild out.kinstall
--      # undocumented kernel folklore: clean BEFORE dep.
--      # we run make dep separately, because there is no point in running ERRCHECK
--      # on the make dep output.
--      # see LKML thread "clean before or after dep?"
--      ( cd $(KERNELSRC) ; $(MAKE) $(KERNMAKEOPTS) $(KERNCLEAN) $(KERNDEP) )
--      ( cd $(KERNELSRC) ; $(MAKE) $(KERNMAKEOPTS) $(KERNEL) ) 2>&1 | tee out.kbuild
--      @if egrep -q '^CONFIG_MODULES=y' $(KCFILE) ; \
--      then set -x ; \
--              ( cd $(KERNELSRC) ; \
--              $(MAKE) $(KERNMAKEOPTS) modules 2>&1 ) | tee -a out.kbuild ; \
--      fi
--      ${ERRCHECK} out.kbuild
--
--# module-only building, with error checks
--ifneq ($(strip $(MOD24BUILDDIR)),)
--${MOD24BUILDDIR}/Makefile : ${LIBRESWANSRCDIR}/packaging/makefiles/module24.make
--      mkdir -p ${MOD24BUILDDIR}
--      cp ${LIBRESWANSRCDIR}/packaging/makefiles/module24.make ${MOD24BUILDDIR}/Makefile
--
--module:
--      @if [ -f ${KERNELSRC}/README.libreswan-2 ] ; then \
--                echo "WARNING: Kernel source ${KERNELSRC} has already been patched with libreswan-2, out of tree build might fail!"; \
--        fi;
--      @if [ -f ${KERNELSRC}/README.openswan ] ; then \
--                echo "WARNING: Kernel source ${KERNELSRC} has already been patched with openswan, out of tree build might fail!"; \
--        fi;
--      @if [ -f ${KERNELSRC}/README.openswan-2 ] ; then \
--                echo "WARNING: Kernel source ${KERNELSRC} has already been patched with openswan-2, out of tree build might fail!"; \
--        fi;
--      @if [ -f ${KERNELSRC}/README.freeswan ] ; then \
--                echo "ERROR: Kernel source ${KERNELSRC} has already been patched with freeswan, out of tree build will fail!"; \
--        fi;
--      @if [ -f ${KERNELSRC}/Rules.make ] ; then \
--                echo "Building module for a 2.4 kernel"; ${MAKE} module24 ; \
--        else echo "Building module for a 2.6 kernel"; ${MAKE} module26; \
--        fi;
--
--modclean moduleclean:
--      @if [ -f ${KERNELSRC}/Rules.make ] ; then \
--              echo "Cleaning module for a 2.4 kernel"; ${MAKE} module24clean ; \
--      else echo "Cleaning module for a 2.6 kernel"; ${MAKE} module26clean; \
--      fi;
--
--module24:
--      @if [ ! -f ${KERNELSRC}/Rules.make ] ; then \
--                echo "Warning: Building for a 2.4 kernel in what looks like a 2.6 tree"; \
--        fi ; \
--        ${MAKE} ${MOD24BUILDDIR}/Makefile
--      ${MAKE} -C ${MOD24BUILDDIR}  LIBRESWANSRCDIR=${LIBRESWANSRCDIR} ARCH=${ARCH} V=${V} ${MODULE_FLAGS} MODULE_DEF_INCLUDE=${MODULE_DEF_INCLUDE} TOPDIR=${KERNELSRC} -f Makefile ipsec.o
--      @echo
--      @echo '========================================================='
--      @echo
--      @echo 'KLIPS24 module built successfully. '
--      @echo ipsec.o is in ${MOD24BUILDDIR}
--      @echo
--      @(cd ${MOD24BUILDDIR}; ls -l ipsec.o)
--      @(cd ${MOD24BUILDDIR}; size ipsec.o)
--      @echo
--      @echo 'use make minstall as root to install it'
--      @echo
--      @echo '========================================================='
--      @echo
--
--mod24clean module24clean:
--      rm -rf ${MOD24BUILDDIR}
--
--#autoodetect 2.4 and 2.6
--module_install minstall install-module:
--      @if [ -f $(KERNELSRC)/Rules.make ] ; then \
--                $(MAKE) minstall24 ; \
--      else \
--              $(MAKE) minstall26 ; \
--        fi;
--
--# Extract the value of MODLIB from the output of $(MAKE).  Also hide
--# the sup-process $(MAKE) so that GNU Make doesn't always invoke the
--# target ("make -n" ignored).
--#
--# If $(MAKE) directly appears in a target (for instance in minstall26)
--# then GNU Make will assume that it is a recursive make invocation and
--# invoke the target regardless of -n.
--#
--# XXX: minstall24 should also use this.
--
--osmodlib-from-make = \
--      OSMODLIB=$$($(MAKE) $(1) 2>/dev/null | sed -n -e 's/^MODLIB[ :=]*\([^;]*\).*/\1/p' | head -1) ; \
--      test -z "$$OSMODLIB" || echo "OSMODLIB=$$OSMODLIB ($(MAKE) $(1))"
--
--# module-only install, with error checks
--minstall24:
--      ( OSMODLIB=`${MAKE} -C $(KERNELSRC) -p dummy | ( sed -n -e '/^MODLIB/p' -e '/^MODLIB/q' ; cat > /dev/null ) | sed -e 's/^MODLIB[ :=]*\([^;]*\).*/\1/'` ; \
--      if [ -z "$$OSMODLIB" ] ; then \
--              OSMODLIB=`${MAKE} -C $(KERNELSRC) -n -p modules_install | ( sed -n -e '/^MODLIB/p' -e '/^MODLIB/q' ; cat > /dev/null ) | sed -e 's/^MODLIB[ :=]*\([^;]*\).*/\1/'` ; \
--      fi ; \
--      if [ -z "$$OSMODLIB" ] ; then \
--              echo "No known place to install module. Aborting." ; \
--              exit 93 ; \
--      fi ; \
--      set -x ; \
--      mkdir -p $$OSMODLIB/kernel/$(OSMOD_DESTDIR) ; \
--      cp $(MOD24BUILDDIR)/ipsec.o $$OSMODLIB/kernel/$(OSMOD_DESTDIR) ; \
--      if [ -f /sbin/depmod ] ; then /sbin/depmod -a ; fi; \
--      if [ -n "$(OSMOD_DESTDIR)" ] ; then \
--        mkdir -p $$OSMODLIB/kernel/$(OSMOD_DESTDIR) ; \
--                if [ -f $$OSMODLIB/kernel/ipsec.o -a -f $$OSMODLIB/kernel/$(OSMOD_DESTDIR)/ipsec.o ] ; then \
--                        echo "WARNING: two ipsec.o modules found in $$OSMODLIB/kernel:" ; \
--                        ls -l $$OSMODLIB/kernel/ipsec.o $$OSMODLIB/kernel/$(OSMOD_DESTDIR)/ipsec.o ; \
--                        exit 1; \
--                fi ; \
--        fi ; \
--        set -x ) ;
--
--
--else
--module:
--      echo 'Building in place is no longer supported. Please set MOD24BUILDDIR='
--      exit 1
--
--endif
--
--# module-only building, with error checks
--ifneq ($(strip $(MODBUILDDIR)),)
--${MODBUILDDIR}/Makefile : ${LIBRESWANSRCDIR}/packaging/makefiles/module.make
--      mkdir -p ${MODBUILDDIR}
--      echo ln -s -f ${LIBRESWANSRCDIR}/linux/net/ipsec/des/*.S ${MODBUILDDIR}
--      (rm -f ${MODBUILDDIR}/des; mkdir -p ${MODBUILDDIR}/des && cd ${MODBUILDDIR}/des && ln -s -f ${LIBRESWANSRCDIR}/linux/net/ipsec/des/* . && ln -s -f Makefile.fs2_6 Makefile)
--      (rm -f ${MODBUILDDIR}/aes; mkdir -p ${MODBUILDDIR}/aes && cd ${MODBUILDDIR}/aes && ln -s -f ${LIBRESWANSRCDIR}/linux/net/ipsec/aes/* . && ln -s -f Makefile.fs2_6 Makefile)
--      mkdir -p ${MODBUILDDIR}/aes
--      cp ${LIBRESWANSRCDIR}/packaging/makefiles/module.make ${MODBUILDDIR}/Makefile
--      ln -s -f ${LIBRESWANSRCDIR}/linux/net/ipsec/match*.S ${MODBUILDDIR}
--
--module26:
--      @if [ -f ${KERNELSRC}/Rules.make ] ; then \                 echo "Warning: Building for a 2.6+ kernel in what looks like a 2.4 tree"; \
--        fi ; \
--        ${MAKE}  ${MODBUILDDIR}/Makefile
--      ${MAKE} -C ${KERNELSRC} ${KERNELBUILDMFLAGS} BUILDDIR=${MODBUILDDIR} SUBDIRS=${MODBUILDDIR} INITSYSTEM=$(INITSYSTEM) MODULE_DEF_INCLUDE=${MODULE_DEF_INCLUDE} MODULE_DEFCONFIG=${MODULE_DEFCONFIG}  MODULE_EXTRA_INCLUDE=${MODULE_EXTRA_INCLUDE} ARCH=${ARCH} V=${V} modules
--      @echo
--      @echo '========================================================='
--      @echo
--      @echo 'KLIPS module built successfully. '
--      @echo ipsec.ko is in ${MODBUILDDIR}
--      @echo
--      @(cd ${MODBUILDDIR}; ls -l ipsec.ko)
--      @(cd ${MODBUILDDIR}; size ipsec.ko)
--      @echo
--      @echo 'use make minstall as root to install it'
--      @echo
--      @echo '========================================================='
--      @echo
--
--mod26clean module26clean:
--      rm -rf ${MODBUILDDIR}
--
--# module-only install, with error checks
--minstall26:
--      $(call osmodlib-from-make,-C $(KERNELSRC) -p help) ; \
--      if [ -z "$$OSMODLIB" ] ; then \
--              $(call osmodlib-from-make,-C $(KERNELSRC) -n -p modules_install) ; \
--      fi ; \
--      if [ -z "$$OSMODLIB" ] ; then \
--              echo "No known place to install module. Aborting." ; \
--              exit 93 ; \
--      fi ; \
--      set -x ; \
--      mkdir -p $$OSMODLIB/kernel/$(OSMOD_DESTDIR) ; \
--      cp $(MODBUILDDIR)/ipsec.ko $$OSMODLIB/kernel/$(OSMOD_DESTDIR) ; \
--      if [ -f /sbin/depmod ] ; then \
--              /sbin/depmod -a ; \
--      fi ; \
--      if [ -n "$(OSMOD_DESTDIR)" ] ; then \
--              mkdir -p $$OSMODLIB/kernel/$(OSMOD_DESTDIR) ; \
--              if [ -f $$OSMODLIB/kernel/ipsec.ko -a -f $$OSMODLIB/kernel/$(OSMOD_DESTDIR)/ipsec.ko ] ; then \
--                      echo "WARNING: two ipsec.ko modules found in $$OSMODLIB/kernel:" ; \
--                      ls -l $$OSMODLIB/kernel/ipsec.ko $$OSMODLIB/kernel/$(OSMOD_DESTDIR)/ipsec.ko ; \
--                      exit 1; \
--              fi ; \
--      fi
--
--
--else
--module26:
--      echo 'Building in place is no longer supported. Please set MODBUILDDIR='
--      exit 1
--
--endif
--
--# kernel install, with error checks
--kinstall:
--      rm -f out.kinstall
--      >out.kinstall
--      # undocumented kernel folklore: modules_install must precede install (observed on RHL8.0)
--      @if egrep -q '^CONFIG_MODULES=y' $(KCFILE) ; \
--      then set -x ; \
--              ( cd $(KERNELSRC) ; \
--              $(MAKE) $(KERNMAKEOPTS) modules_install 2>&1 ) | tee -a out.kinstall ; \
--      fi
--      ( cd $(KERNELSRC) ; $(MAKE) $(KERNMAKEOPTS) install ) 2>&1 | tee -a out.kinstall
--      ${ERRCHECK} out.kinstall
--
--kernelpatch3 kernelpatch3.5 kernelpatch2.6 kernelpatch:
--      packaging/utils/kernelpatch 2.6
--
--kernelpatch2.4:
--      packaging/utils/kernelpatch 2.4
--
--nattpatch:
--      if [ -f ${KERNELSRC}/Makefile ]; then \
--              ${MAKE} nattpatch${KERNELREL}; \
--      else    echo "Cannot determine Linux kernel version. Perhaps you need to set KERNELSRC? (eg: export KERNELSRC=/usr/src/linux-`uname -r`/)"; exit 1; \
--      fi;
--
--sarefpatch2.6:
--      #cat patches/kernel/2.6.38/0001-SAREF-add-support-for-SA-selection-through-sendmsg.patch
--      #packaging/utils/sarefpatch 2.6
--      echo ""
--
--nattpatch2.6:
--      packaging/utils/nattpatch 2.6
--
--nattpatch2.4:
--      packaging/utils/nattpatch 2.4
--
--nattupdate:
--      (cd UMLPOOL && diff -u plain26/net/ipv4/udp.c.orig plain26/net/ipv4/udp.c; exit 0) >nat-t/net/ipv4/udp.c.os2_6.patch
--
--# take all the patches out of the kernel
--# (Note, a couple of files are modified by non-patch means; they are
--# included in "make backup".)
--unpatch:
--      @echo \"make unpatch\" is obsolete. See make unapplypatch.
--      exit 1
--
--_unpatch:
--      for f in `find $(KERNELSRC)/. -name '*.preipsec' -print` ; \
--      do \
--              echo "restoring $$f:" ; \
--              dir=`dirname $$f` ; \
--              core=`basename $$f .preipsec` ; \
--              cd $$dir ; \
--              mv -f $$core.preipsec $$core ; \
--              rm -f $$core.wipsec $$core.ipsecmd5 ; \
--      done
--
--# at the moment there is no difference between snapshot and release build
--snapready:    buildready
--relready:     buildready
--ready:                devready
- # set up for build
- buildready:
-@@ -604,13 +173,6 @@ deb:
-       #debuild -S -sa
-       @echo "to build optional KLIPS kernel module, run make deb-klips"
--deb-klips:
--      sudo module-assistant prepare -u .
--      sudo dpkg -i ../libreswan-modules-source_`make -s showdebversion`_all.deb
--      sudo module-assistant -u . prepare
--      sudo module-assistant -u . build libreswan
--
--
- release:
-       packaging/utils/makerelease
-@@ -654,3 +216,5 @@ install-fipshmac:
- include ${LIBRESWANSRCDIR}/mk/docker-targets.mk
- include ${LIBRESWANSRCDIR}/mk/kvm-targets.mk
- include ${LIBRESWANSRCDIR}/mk/web-targets.mk
-+include ${LIBRESWANSRCDIR}/mk/kernel.mk
-+
-diff --git a/mk/kernel.mk b/mk/kernel.mk
-new file mode 100644
-index 0000000000..187167d440
---- /dev/null
-+++ b/mk/kernel.mk
-@@ -0,0 +1,468 @@
-+# Libreswan master makefile
-+#
-+# Copyright (C) 1998-2002  Henry Spencer.
-+# Copyright (C) 2003-2004  Xelerance Corporation
-+# Copyright (C) 2017, Richard Guy Briggs <rgb@tricolour.ca>
-+# Copyright (C) 2015-2018  Andrew Cagney
-+#
-+# This program is free software; you can redistribute it and/or modify it
-+# under the terms of the GNU General Public License as published by the
-+# Free Software Foundation; either version 2 of the License, or (at your
-+# option) any later version.  See <https://www.gnu.org/licenses/gpl2.txt>.
-+#
-+# This program is distributed in the hope that it will be useful, but
-+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-+# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-+# for more details.
-+#
-+
-+PATCHES=linux
-+# where KLIPS goes in the kernel
-+# note, some of the patches know the last part of this path
-+KERNELKLIPS=$(KERNELSRC)/net/ipsec
-+KERNELCRYPTODES=$(KERNELSRC)/crypto/ciphers/des
-+KERNELLIBFREESWAN=$(KERNELSRC)/lib/libfreeswan
-+KERNELLIBZLIB=$(KERNELSRC)/lib/zlib
-+KERNELINCLUDE=$(KERNELSRC)/include
-+
-+MAKEUTILS=packaging/utils
-+ERRCHECK=${MAKEUTILS}/errcheck
-+KVUTIL=${MAKEUTILS}/kernelversion
-+KVSHORTUTIL=${MAKEUTILS}/kernelversion-short
-+
-+# kernel details
-+# what variant of our patches should we use, and where is it
-+KERNELREL=$(shell ${KVSHORTUTIL} ${KERNELSRC}/Makefile)
-+
-+# directories visited by all recursion
-+
-+# declaration for make's benefit
-+.PHONY:       def insert kpatch patches _patches _patches2.4 \
-+      klipsdefaults programs man install \
-+      precheck verset confcheck kernel \
-+      module module24 module26 kinstall minstall minstall24 minstall26 \
-+      moduleclean mod24clean module24clean mod26clean module26clean \
-+      backup unpatch uninstall \
-+      check \
-+
-+kpatch: unapplypatch applypatch klipsdefaults
-+npatch: unapplynpatch applynpatch
-+sarefpatch: unapplysarefpatch applysarefpatch
-+
-+unapplypatch:
-+      @echo "info: making unapplypatch in `pwd` and KERNELSRC=\"${KERNELSRC}\";"
-+      -@if [ -f ${KERNELSRC}/libreswan.patch ]; then \
-+              echo Undoing previous patches; \
-+              cat ${KERNELSRC}/libreswan.patch | (cd ${KERNELSRC} && patch -p1 -R --force -E -z .preipsec --reverse --ignore-whitespace ); \
-+      fi
-+
-+applypatch:
-+      @echo "info: Now performing forward patches in `pwd`";
-+      ${MAKE} kernelpatch${KERNELREL} | tee ${KERNELSRC}/libreswan.patch | (cd ${KERNELSRC} && patch -p1 -b -z .preipsec --forward --ignore-whitespace )
-+
-+unapplynpatch:
-+      @echo "info: making unapplynpatch (note the second N) in `pwd`";
-+      -@if [ -f ${KERNELSRC}/natt.patch ]; then \
-+              echo Undoing previous NAT patches; \
-+              cat ${KERNELSRC}/natt.patch | (cd ${KERNELSRC} && patch -p1 -R --force -E -z .preipsec --reverse --ignore-whitespace ); \
-+      fi
-+
-+applynpatch:
-+      @echo "info: Now performing forward NAT patches in `pwd`";
-+      ${MAKE} nattpatch${KERNELREL} | tee ${KERNELSRC}/natt.patch | (cd ${KERNELSRC} && patch -p1 -b -z .preipsec --forward --ignore-whitespace )
-+
-+unapplysarefpatch:
-+      @echo "info: making unapplysarefpatch in `pwd`";
-+      -@if [ -f ${KERNELSRC}/saref.patch ]; then \
-+              echo Undoing previous saref patches; \
-+              cat ${KERNELSRC}/saref.patch | (cd ${KERNELSRC} && patch -p1 -R --force -E -z .preng --reverse --ignore-whitespace ); \
-+      fi
-+
-+applysarefpatch:
-+      @echo "info: Now performing SAref patches in `pwd`";
-+      ${MAKE} sarefpatch${KERNELREL} | tee ${KERNELSRC}/klipsng.patch | (cd ${KERNELSRC} && patch -p1 -b -z .preng --forward --ignore-whitespace )
-+
-+# patch kernel
-+PATCHER=packaging/utils/patcher
-+
-+_patches:
-+      echo "===============" >>out.kpatch
-+      echo "`date` `cd $(KERNELSRC) ; pwd`" >>out.kpatch
-+      $(MAKE) __patches$(KERNELREL) >>out.kpatch
-+
-+# Linux-2.4.0 version
-+__patches2.4:
-+      @$(PATCHER) -v -c $(KERNELSRC) Documentation/Configure.help \
-+              'CONFIG_KLIPS' $(PATCHES)/Documentation/Configure.help.fs2_2.patch
-+      @$(PATCHER) -v $(KERNELSRC) net/Config.in \
-+              'CONFIG_KLIPS' $(PATCHES)/net/Config.in.fs2_4.patch
-+      @$(PATCHER) -v $(KERNELSRC) net/Makefile \
-+              'CONFIG_KLIPS' $(PATCHES)/net/Makefile.fs2_4.patch
-+      @$(PATCHER) -v $(KERNELSRC) net/ipv4/af_inet.c \
-+              'CONFIG_KLIPS' $(PATCHES)/net/ipv4/af_inet.c.fs2_4.patch
-+      @$(PATCHER) -v $(KERNELSRC) net/ipv4/udp.c \
-+              'CONFIG_KLIPS' $(PATCHES)/net/ipv4/udp.c.fs2_4.patch
-+      @$(PATCHER) -v $(KERNELSRC) include/net/sock.h \
-+              'CONFIG_KLIPS' $(PATCHES)/include/net/sock.h.fs2_4.patch
-+# Removed patches, will unpatch automatically.
-+      @$(PATCHER) -v $(KERNELSRC) include/linux/proc_fs.h
-+      @$(PATCHER) -v $(KERNELSRC) net/core/dev.c
-+      @$(PATCHER) -v $(KERNELSRC) net/ipv4/protocol.c
-+      @$(PATCHER) -v $(KERNELSRC) drivers/net/Space.c
-+      @$(PATCHER) -v $(KERNELSRC) include/linux/netlink.h
-+      @$(PATCHER) -v $(KERNELSRC) net/netlink/af_netlink.c
-+      @$(PATCHER) -v $(KERNELSRC) net/netlink/netlink_dev.c
-+      @$(PATCHER) -v $(KERNELSRC) drivers/isdn/isdn_net.c
-+
-+klipsdefaults:
-+      @KERNELDEFCONFIG=$(KERNELSRC)/arch/$(ARCH)/defconfig ; \
-+      KERNELCONFIG=$(KCFILE) ; \
-+      if ! egrep -q 'CONFIG_KLIPS' $$KERNELDEFCONFIG ; \
-+      then \
-+              set -x ; \
-+              cp -a $$KERNELDEFCONFIG $$KERNELDEFCONFIG.orig ; \
-+              chmod u+w $$KERNELDEFCONFIG ; \
-+              cat $$KERNELDEFCONFIG $(KERNELKLIPS)/defconfig \
-+                      >$$KERNELDEFCONFIG.tmp ; \
-+              rm -f $$KERNELDEFCONFIG ; \
-+              cp -a $$KERNELDEFCONFIG.tmp $$KERNELDEFCONFIG ; \
-+              rm -f $$KERNELDEFCONFIG.tmp ; \
-+      fi ; \
-+      if ! egrep -q 'CONFIG_KLIPS' $$KERNELCONFIG ; \
-+      then \
-+              set -x ; \
-+              cp -a $$KERNELCONFIG $$KERNELCONFIG.orig ; \
-+              chmod u+w $$KERNELCONFIG ; \
-+              cat $$KERNELCONFIG $(KERNELKLIPS)/defconfig \
-+                      >$$KERNELCONFIG.tmp ; \
-+              rm -f $$KERNELCONFIG ; \
-+              cp -a $$KERNELCONFIG.tmp $$KERNELCONFIG ; \
-+              rm -f $$KERNELCONFIG.tmp ; \
-+      fi
-+
-+
-+local-clean-base: moduleclean
-+distclean: moduleclean module24clean module26clean clean-kvm-keys
-+
-+# proxies for major kernel make operations
-+
-+# do-everything entries
-+KINSERT_PRE=precheck verset insert
-+PRE=precheck verset kpatch
-+POST=confcheck programs kernel install
-+MPOST=confcheck programs module install
-+
-+# preliminaries
-+precheck:
-+      @if test ! -d $(KERNELSRC) -a ! -L $(KERNELSRC) ; \
-+      then \
-+              echo '*** cannot find directory "$(KERNELSRC)"!!' ; \
-+              echo '*** may be necessary to add symlink to kernel source' ; \
-+              exit 1 ; \
-+      fi
-+      @if ! cd $(KERNELSRC) ; \
-+      then \
-+              echo '*** cannot "cd $(KERNELSRC)"!!' ; \
-+              echo '*** may be necessary to add symlink to kernel source' ; \
-+              exit 1 ; \
-+      fi
-+      @if test ! -f $(KCFILE) ; \
-+      then \
-+              echo '*** cannot find "$(KCFILE)"!!' ; \
-+              echo '*** perhaps kernel has never been configured?' ; \
-+              echo '*** please do that first; the results are necessary.' ; \
-+              exit 1 ; \
-+      fi
-+      @if test ! -f $(VERFILE) ; \
-+      then \
-+              echo '*** cannot find "$(VERFILE)"!!' ; \
-+              echo '*** perhaps kernel has never been compiled?' ; \
-+              echo '*** please do that first; the results are necessary.' ; \
-+              exit 1 ; \
-+      fi
-+
-+# configuring (exit statuses disregarded, something fishy here sometimes)
-+xcf:
-+      -cd $(KERNELSRC) ; $(MAKE) $(KERNMAKEOPTS) xconfig
-+mcf:
-+      -cd $(KERNELSRC) ; $(MAKE) $(KERNMAKEOPTS) menuconfig
-+pcf:
-+      -cd $(KERNELSRC) ; $(MAKE) $(KERNMAKEOPTS) config
-+
-+ocf:
-+      -cd $(KERNELSRC) ; $(MAKE) $(KERNMAKEOPTS) oldconfig
-+
-+rcf:
-+      cd $(KERNELSRC) ; $(MAKE) $(KERNMAKEOPTS) ${NONINTCONFIG} </dev/null
-+      cd $(KERNELSRC) ; $(MAKE) $(KERNMAKEOPTS) dep >/dev/null
-+
-+kclean:
-+      -cd $(KERNELSRC) ; $(MAKE) $(KERNMAKEOPTS) clean
-+
-+confcheck:
-+      @if test ! -f $(KCFILE) ; \
-+      then echo '*** no kernel configuration file written!!' ; exit 1 ; \
-+      fi
-+      @if ! egrep -q '^CONFIG_KLIPS=[my]' $(KCFILE) ; \
-+      then echo '*** IPsec not in kernel config ($(KCFILE))!!' ; exit 1 ; \
-+      fi
-+      @if ! egrep -q 'CONFIG_KLIPS[   ]+1' $(ACFILE) && \
-+              ! egrep -q 'CONFIG_KLIPS_MODULE[        ]+1' $(ACFILE) ; \
-+      then echo '*** IPsec in kernel config ($(KCFILE)),' ; \
-+              echo '***       but not in config header file ($(ACFILE))!!' ; \
-+              exit 1 ; \
-+      fi
-+      @if egrep -q '^CONFIG_KLIPS=m' $(KCFILE) && \
-+              ! egrep -q '^CONFIG_MODULES=y' $(KCFILE) ; \
-+      then echo '*** IPsec configured as module in kernel with no module support!!' ; exit 1 ; \
-+      fi
-+      @if ! egrep -q 'CONFIG_KLIPS_AH[        ]+1' $(ACFILE) && \
-+              ! egrep -q 'CONFIG_KLIPS_ESP[   ]+1' $(ACFILE) ; \
-+      then echo '*** IPsec configuration must include AH or ESP!!' ; exit 1 ; \
-+      fi
-+
-+# kernel building, with error checks
-+kernel:
-+      rm -f out.kbuild out.kinstall
-+      # undocumented kernel folklore: clean BEFORE dep.
-+      # we run make dep separately, because there is no point in running ERRCHECK
-+      # on the make dep output.
-+      # see LKML thread "clean before or after dep?"
-+      ( cd $(KERNELSRC) ; $(MAKE) $(KERNMAKEOPTS) $(KERNCLEAN) $(KERNDEP) )
-+      ( cd $(KERNELSRC) ; $(MAKE) $(KERNMAKEOPTS) $(KERNEL) ) 2>&1 | tee out.kbuild
-+      @if egrep -q '^CONFIG_MODULES=y' $(KCFILE) ; \
-+      then set -x ; \
-+              ( cd $(KERNELSRC) ; \
-+              $(MAKE) $(KERNMAKEOPTS) modules 2>&1 ) | tee -a out.kbuild ; \
-+      fi
-+      ${ERRCHECK} out.kbuild
-+
-+# module-only building, with error checks
-+ifneq ($(strip $(MOD24BUILDDIR)),)
-+${MOD24BUILDDIR}/Makefile : ${LIBRESWANSRCDIR}/packaging/makefiles/module24.make
-+      mkdir -p ${MOD24BUILDDIR}
-+      cp ${LIBRESWANSRCDIR}/packaging/makefiles/module24.make ${MOD24BUILDDIR}/Makefile
-+
-+module:
-+      @if [ -f ${KERNELSRC}/README.libreswan-2 ] ; then \
-+                echo "WARNING: Kernel source ${KERNELSRC} has already been patched with libreswan-2, out of tree build might fail!"; \
-+        fi;
-+      @if [ -f ${KERNELSRC}/README.openswan ] ; then \
-+                echo "WARNING: Kernel source ${KERNELSRC} has already been patched with openswan, out of tree build might fail!"; \
-+        fi;
-+      @if [ -f ${KERNELSRC}/README.openswan-2 ] ; then \
-+                echo "WARNING: Kernel source ${KERNELSRC} has already been patched with openswan-2, out of tree build might fail!"; \
-+        fi;
-+      @if [ -f ${KERNELSRC}/README.freeswan ] ; then \
-+                echo "ERROR: Kernel source ${KERNELSRC} has already been patched with freeswan, out of tree build will fail!"; \
-+        fi;
-+      @if [ -f ${KERNELSRC}/Rules.make ] ; then \
-+                echo "Building module for a 2.4 kernel"; ${MAKE} module24 ; \
-+        else echo "Building module for a 2.6 kernel"; ${MAKE} module26; \
-+        fi;
-+
-+modclean moduleclean:
-+      @if [ -f ${KERNELSRC}/Rules.make ] ; then \
-+              echo "Cleaning module for a 2.4 kernel"; ${MAKE} module24clean ; \
-+      else echo "Cleaning module for a 2.6 kernel"; ${MAKE} module26clean; \
-+      fi;
-+
-+module24:
-+      @if [ ! -f ${KERNELSRC}/Rules.make ] ; then \
-+                echo "Warning: Building for a 2.4 kernel in what looks like a 2.6 tree"; \
-+        fi ; \
-+        ${MAKE} ${MOD24BUILDDIR}/Makefile
-+      ${MAKE} -C ${MOD24BUILDDIR}  LIBRESWANSRCDIR=${LIBRESWANSRCDIR} ARCH=${ARCH} V=${V} ${MODULE_FLAGS} MODULE_DEF_INCLUDE=${MODULE_DEF_INCLUDE} TOPDIR=${KERNELSRC} -f Makefile ipsec.o
-+      @echo
-+      @echo '========================================================='
-+      @echo
-+      @echo 'KLIPS24 module built successfully. '
-+      @echo ipsec.o is in ${MOD24BUILDDIR}
-+      @echo
-+      @(cd ${MOD24BUILDDIR}; ls -l ipsec.o)
-+      @(cd ${MOD24BUILDDIR}; size ipsec.o)
-+      @echo
-+      @echo 'use make minstall as root to install it'
-+      @echo
-+      @echo '========================================================='
-+      @echo
-+
-+mod24clean module24clean:
-+      rm -rf ${MOD24BUILDDIR}
-+
-+#autoodetect 2.4 and 2.6
-+module_install minstall install-module:
-+      @if [ -f $(KERNELSRC)/Rules.make ] ; then \
-+                $(MAKE) minstall24 ; \
-+      else \
-+              $(MAKE) minstall26 ; \
-+        fi;
-+
-+# Extract the value of MODLIB from the output of $(MAKE).  Also hide
-+# the sup-process $(MAKE) so that GNU Make doesn't always invoke the
-+# target ("make -n" ignored).
-+#
-+# If $(MAKE) directly appears in a target (for instance in minstall26)
-+# then GNU Make will assume that it is a recursive make invocation and
-+# invoke the target regardless of -n.
-+#
-+# XXX: minstall24 should also use this.
-+
-+osmodlib-from-make = \
-+      OSMODLIB=$$($(MAKE) $(1) 2>/dev/null | sed -n -e 's/^MODLIB[ :=]*\([^;]*\).*/\1/p' | head -1) ; \
-+      test -z "$$OSMODLIB" || echo "OSMODLIB=$$OSMODLIB ($(MAKE) $(1))"
-+
-+# module-only install, with error checks
-+minstall24:
-+      ( OSMODLIB=`${MAKE} -C $(KERNELSRC) -p dummy | ( sed -n -e '/^MODLIB/p' -e '/^MODLIB/q' ; cat > /dev/null ) | sed -e 's/^MODLIB[ :=]*\([^;]*\).*/\1/'` ; \
-+      if [ -z "$$OSMODLIB" ] ; then \
-+              OSMODLIB=`${MAKE} -C $(KERNELSRC) -n -p modules_install | ( sed -n -e '/^MODLIB/p' -e '/^MODLIB/q' ; cat > /dev/null ) | sed -e 's/^MODLIB[ :=]*\([^;]*\).*/\1/'` ; \
-+      fi ; \
-+      if [ -z "$$OSMODLIB" ] ; then \
-+              echo "No known place to install module. Aborting." ; \
-+              exit 93 ; \
-+      fi ; \
-+      set -x ; \
-+      mkdir -p $$OSMODLIB/kernel/$(OSMOD_DESTDIR) ; \
-+      cp $(MOD24BUILDDIR)/ipsec.o $$OSMODLIB/kernel/$(OSMOD_DESTDIR) ; \
-+      if [ -f /sbin/depmod ] ; then /sbin/depmod -a ; fi; \
-+      if [ -n "$(OSMOD_DESTDIR)" ] ; then \
-+        mkdir -p $$OSMODLIB/kernel/$(OSMOD_DESTDIR) ; \
-+                if [ -f $$OSMODLIB/kernel/ipsec.o -a -f $$OSMODLIB/kernel/$(OSMOD_DESTDIR)/ipsec.o ] ; then \
-+                        echo "WARNING: two ipsec.o modules found in $$OSMODLIB/kernel:" ; \
-+                        ls -l $$OSMODLIB/kernel/ipsec.o $$OSMODLIB/kernel/$(OSMOD_DESTDIR)/ipsec.o ; \
-+                        exit 1; \
-+                fi ; \
-+        fi ; \
-+        set -x ) ;
-+
-+
-+else
-+module:
-+      echo 'Building in place is no longer supported. Please set MOD24BUILDDIR='
-+      exit 1
-+
-+endif
-+
-+# module-only building, with error checks
-+ifneq ($(strip $(MODBUILDDIR)),)
-+${MODBUILDDIR}/Makefile : ${LIBRESWANSRCDIR}/packaging/makefiles/module.make
-+      mkdir -p ${MODBUILDDIR}
-+      echo ln -s -f ${LIBRESWANSRCDIR}/linux/net/ipsec/des/*.S ${MODBUILDDIR}
-+      (rm -f ${MODBUILDDIR}/des; mkdir -p ${MODBUILDDIR}/des && cd ${MODBUILDDIR}/des && ln -s -f ${LIBRESWANSRCDIR}/linux/net/ipsec/des/* . && ln -s -f Makefile.fs2_6 Makefile)
-+      (rm -f ${MODBUILDDIR}/aes; mkdir -p ${MODBUILDDIR}/aes && cd ${MODBUILDDIR}/aes && ln -s -f ${LIBRESWANSRCDIR}/linux/net/ipsec/aes/* . && ln -s -f Makefile.fs2_6 Makefile)
-+      mkdir -p ${MODBUILDDIR}/aes
-+      cp ${LIBRESWANSRCDIR}/packaging/makefiles/module.make ${MODBUILDDIR}/Makefile
-+      ln -s -f ${LIBRESWANSRCDIR}/linux/net/ipsec/match*.S ${MODBUILDDIR}
-+
-+module26:
-+      @if [ -f ${KERNELSRC}/Rules.make ] ; then \                 echo "Warning: Building for a 2.6+ kernel in what looks like a 2.4 tree"; \
-+        fi ; \
-+        ${MAKE}  ${MODBUILDDIR}/Makefile
-+      ${MAKE} -C ${KERNELSRC} ${KERNELBUILDMFLAGS} BUILDDIR=${MODBUILDDIR} SUBDIRS=${MODBUILDDIR} INITSYSTEM=$(INITSYSTEM) MODULE_DEF_INCLUDE=${MODULE_DEF_INCLUDE} MODULE_DEFCONFIG=${MODULE_DEFCONFIG}  MODULE_EXTRA_INCLUDE=${MODULE_EXTRA_INCLUDE} ARCH=${ARCH} V=${V} modules
-+      @echo
-+      @echo '========================================================='
-+      @echo
-+      @echo 'KLIPS module built successfully. '
-+      @echo ipsec.ko is in ${MODBUILDDIR}
-+      @echo
-+      @(cd ${MODBUILDDIR}; ls -l ipsec.ko)
-+      @(cd ${MODBUILDDIR}; size ipsec.ko)
-+      @echo
-+      @echo 'use make minstall as root to install it'
-+      @echo
-+      @echo '========================================================='
-+      @echo
-+
-+mod26clean module26clean:
-+      rm -rf ${MODBUILDDIR}
-+
-+# module-only install, with error checks
-+minstall26:
-+      $(call osmodlib-from-make,-C $(KERNELSRC) -p help) ; \
-+      if [ -z "$$OSMODLIB" ] ; then \
-+              $(call osmodlib-from-make,-C $(KERNELSRC) -n -p modules_install) ; \
-+      fi ; \
-+      if [ -z "$$OSMODLIB" ] ; then \
-+              echo "No known place to install module. Aborting." ; \
-+              exit 93 ; \
-+      fi ; \
-+      set -x ; \
-+      mkdir -p $$OSMODLIB/kernel/$(OSMOD_DESTDIR) ; \
-+      cp $(MODBUILDDIR)/ipsec.ko $$OSMODLIB/kernel/$(OSMOD_DESTDIR) ; \
-+      if [ -f /sbin/depmod ] ; then \
-+              /sbin/depmod -a ; \
-+      fi ; \
-+      if [ -n "$(OSMOD_DESTDIR)" ] ; then \
-+              mkdir -p $$OSMODLIB/kernel/$(OSMOD_DESTDIR) ; \
-+              if [ -f $$OSMODLIB/kernel/ipsec.ko -a -f $$OSMODLIB/kernel/$(OSMOD_DESTDIR)/ipsec.ko ] ; then \
-+                      echo "WARNING: two ipsec.ko modules found in $$OSMODLIB/kernel:" ; \
-+                      ls -l $$OSMODLIB/kernel/ipsec.ko $$OSMODLIB/kernel/$(OSMOD_DESTDIR)/ipsec.ko ; \
-+                      exit 1; \
-+              fi ; \
-+      fi
-+
-+
-+else
-+module26:
-+      echo 'Building in place is no longer supported. Please set MODBUILDDIR='
-+      exit 1
-+
-+endif
-+
-+# kernel install, with error checks
-+kinstall:
-+      rm -f out.kinstall
-+      >out.kinstall
-+      # undocumented kernel folklore: modules_install must precede install (observed on RHL8.0)
-+      @if egrep -q '^CONFIG_MODULES=y' $(KCFILE) ; \
-+      then set -x ; \
-+              ( cd $(KERNELSRC) ; \
-+              $(MAKE) $(KERNMAKEOPTS) modules_install 2>&1 ) | tee -a out.kinstall ; \
-+      fi
-+      ( cd $(KERNELSRC) ; $(MAKE) $(KERNMAKEOPTS) install ) 2>&1 | tee -a out.kinstall
-+      ${ERRCHECK} out.kinstall
-+
-+kernelpatch3 kernelpatch3.5 kernelpatch2.6 kernelpatch:
-+      packaging/utils/kernelpatch 2.6
-+
-+kernelpatch2.4:
-+      packaging/utils/kernelpatch 2.4
-+
-+nattpatch:
-+      if [ -f ${KERNELSRC}/Makefile ]; then \
-+              ${MAKE} nattpatch${KERNELREL}; \
-+      else    echo "Cannot determine Linux kernel version. Perhaps you need to set KERNELSRC? (eg: export KERNELSRC=/usr/src/linux-`uname -r`/)"; exit 1; \
-+      fi;
-+
-+sarefpatch2.6:
-+      #cat patches/kernel/2.6.38/0001-SAREF-add-support-for-SA-selection-through-sendmsg.patch
-+      #packaging/utils/sarefpatch 2.6
-+      echo ""
-+
-+nattpatch2.6:
-+      packaging/utils/nattpatch 2.6
-+
-+nattpatch2.4:
-+      packaging/utils/nattpatch 2.4
-+
-+nattupdate:
-+      (cd UMLPOOL && diff -u plain26/net/ipv4/udp.c.orig plain26/net/ipv4/udp.c; exit 0) >nat-t/net/ipv4/udp.c.os2_6.patch
-+
-+# take all the patches out of the kernel
-+# (Note, a couple of files are modified by non-patch means; they are
-+# included in "make backup".)
-+unpatch:
-+      @echo \"make unpatch\" is obsolete. See make unapplypatch.
-+      exit 1
-+
-+_unpatch:
-+      for f in `find $(KERNELSRC)/. -name '*.preipsec' -print` ; \
-+      do \
-+              echo "restoring $$f:" ; \
-+              dir=`dirname $$f` ; \
-+              core=`basename $$f .preipsec` ; \
-+              cd $$dir ; \
-+              mv -f $$core.preipsec $$core ; \
-+              rm -f $$core.wipsec $$core.ipsecmd5 ; \
-+      done
diff --git a/net/libreswan/patches/002-cripple_klips_klips_kernel_rules.patch b/net/libreswan/patches/002-cripple_klips_klips_kernel_rules.patch
deleted file mode 100644 (file)
index f07f0ed..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-From fa00316e8c5151747f3e80895e6afd9ee1a9c0cd Mon Sep 17 00:00:00 2001
-From: Andrew Cagney <cagney@gnu.org>
-Date: Thu, 25 Oct 2018 21:02:45 -0400
-Subject: [PATCH] building: when !USE_KLIPS=true cripple klips kernel module
- rules
-
----
- Makefile | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/Makefile b/Makefile
-index 0b070966e6..2fcf0229fd 100644
---- a/Makefile
-+++ b/Makefile
-@@ -216,5 +216,6 @@ install-fipshmac:
- include ${LIBRESWANSRCDIR}/mk/docker-targets.mk
- include ${LIBRESWANSRCDIR}/mk/kvm-targets.mk
- include ${LIBRESWANSRCDIR}/mk/web-targets.mk
-+ifeq ($(USE_KLIPS),true)
- include ${LIBRESWANSRCDIR}/mk/kernel.mk
--
-+endif
diff --git a/net/libreswan/patches/010-nanosleep.patch b/net/libreswan/patches/010-nanosleep.patch
new file mode 100644 (file)
index 0000000..a7fd829
--- /dev/null
@@ -0,0 +1,21 @@
+--- a/programs/pluto/send.c
++++ b/programs/pluto/send.c
+@@ -26,7 +26,7 @@
+  *
+  */
+-#include <unistd.h>   /* for usleep() */
++#include <time.h>     /* for nanosleep() */
+ #include <errno.h>
+ #include "defs.h"
+@@ -173,7 +173,8 @@ bool send_chunks(const char *where, bool just_a_keepalive,
+       /* Send a duplicate packet when this impair is enabled - used for testing */
+       if (IMPAIR(JACOB_TWO_TWO)) {
+               /* sleep for half a second, and second another packet */
+-              usleep(500000);
++              const struct timespec req = {0, 500 * 1000 * 1000};
++              nanosleep(&req, NULL);
+               ip_endpoint_buf b;
+               DBG_log("JACOB 2-2: resending %zu bytes for %s through %s:%d to %s:",
index d85610bbb76751767e2ddfc27f205bdbf63b9740..a23d9c07260161e9afda230fd7c4516196957685 100644 (file)
@@ -8,14 +8,15 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=lighttpd
-PKG_VERSION:=1.4.53
-PKG_RELEASE:=2
+PKG_VERSION:=1.4.54
+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:=3bdfce1cf3e9650a556a8c26fb15342c5717c63f530c54693db632b0371dcb78
+PKG_HASH:=cf14cce2254a96d8fcb6d3181e1a3c29a8f832531c3e86ff6f2524ecda9a8721
 
-PKG_LICENSE:=BSD-3c
+PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
+PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=COPYING
 PKG_CPE_ID:=cpe:/a:lighttpd:lighttpd
 
@@ -31,11 +32,10 @@ include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/nls.mk
 
 define Package/lighttpd/Default
-  SUBMENU:=Web Servers/Proxies
   SECTION:=net
   CATEGORY:=Network
-  URL:=http://www.lighttpd.net/
-  MAINTAINER:=W. Michael Petullo <mike@flyn.org>
+  SUBMENU:=Web Servers/Proxies
+  URL:=https://www.lighttpd.net/
 endef
 
 define Package/lighttpd
index d3e66966c614c3743e617e90910b507226326f4d..ed4fd48115c2a7740fc6aafa2c0775eebd067dba 100644 (file)
@@ -9,28 +9,29 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=linknx
 PKG_VERSION:=0.0.1.37
-PKG_RELEASE:=1
-
-PKG_MAINTAINER:=Othmar Truniger <github@truniger.ch>
-PKG_LICENSE:=GPL-2.0+
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-${PKG_VERSION}.tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/linknx/linknx/tar.gz/$(PKG_VERSION)?
 PKG_HASH:=3c3aaf8c409538153b15f5fb975a4485e58c4820cfea289a3f20777ba69782ab
 
-PKG_BUILD_DEPENDS:=argp-standalone
-PKG_FORTIFY_SOURCE:=1
+PKG_MAINTAINER:=Othmar Truniger <github@truniger.ch>
+PKG_LICENSE:=GPL-2.0-or-later
+PKG_LICENSE_FILES:=LICENSE
 
+PKG_BUILD_DEPENDS:=USE_UCLIBC:argp-standalone USE_MUSL:argp-standalone
 PKG_FIXUP:=autoreconf
 
+include $(INCLUDE_DIR)/uclibc++.mk
 include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/nls.mk
 
 define Package/linknx
   SECTION:=net
   CATEGORY:=Network
   TITLE:=KNX home automation platform
   URL:=https://github.com/linknx/linknx
-  DEPENDS:=+pthsem +lua +luac +libstdcpp +libcurl +libesmtp
+  DEPENDS:=+pthsem +lua +luac +libcurl +libesmtp $(CXX_DEPENDS) $(ICONV_DEPENDS)
 endef
 
 CONFIGURE_ARGS+= \
diff --git a/net/linknx/patches/010-iconv.patch b/net/linknx/patches/010-iconv.patch
new file mode 100644 (file)
index 0000000..d4d2706
--- /dev/null
@@ -0,0 +1,50 @@
+From 8c025865f7cc57761d2227b897ba3980090391c2 Mon Sep 17 00:00:00 2001
+From: Rosen Penev <rosenp@gmail.com>
+Date: Mon, 24 Jun 2019 14:13:34 -0700
+Subject: [PATCH] Use AM_ICONV for properly supporting libiconv
+
+AM_ICONV does multiple things like checking the function parameters to
+avoid const problems.
+---
+ configure.ac             | 1 +
+ src/Makefile.am          | 2 +-
+ src/objectcontroller.cpp | 2 +-
+ 3 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 22f242c..23582cb 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -10,6 +10,7 @@ PKG_CONFIG=`which pkg-config`
+ AC_PROG_CXX
+ AC_PROG_CC
+ AC_PROG_RANLIB
++AM_ICONV
+ AC_CHECK_PTHSEM(2.0.4,yes,yes,no)
+ AC_CHECK_HEADER(argp.h,,[AC_MSG_ERROR([argp_parse not found])])
+ AC_SEARCH_LIBS(argp_parse,argp,,[AC_MSG_ERROR([argp_parse not found])])
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 6a4f493..6e0dc03 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -7,5 +7,5 @@ B64_CFLAGS=
+ B64_LIBS=
+ endif
+ AM_CPPFLAGS=-I$(top_srcdir)/include -I$(top_srcdir)/ticpp $(B64_CFLAGS) $(PTH_CPPFLAGS) $(LIBCURL_CPPFLAGS) $(LOG4CPP_CFLAGS) $(LUA_CFLAGS) $(MYSQL_CFLAGS) $(ESMTP_CFLAGS)
+-linknx_LDADD=$(top_srcdir)/ticpp/libticpp.a $(B64_LIBS) $(PTH_LDFLAGS) $(PTH_LIBS) $(LIBCURL) $(LOG4CPP_LIBS) $(LUA_LIBS) $(MYSQL_LIBS) $(ESMTP_LIBS) -lm
++linknx_LDADD=$(top_srcdir)/ticpp/libticpp.a $(LIBICONV) $(B64_LIBS) $(PTH_LDFLAGS) $(PTH_LIBS) $(LIBCURL) $(LOG4CPP_LIBS) $(LUA_LIBS) $(MYSQL_LIBS) $(ESMTP_LIBS) -lm
+ linknx_SOURCES=linknx.cpp logger.cpp ruleserver.cpp objectcontroller.cpp eibclient.c threads.cpp timermanager.cpp  persistentstorage.cpp xmlserver.cpp smsgateway.cpp emailgateway.cpp knxconnection.cpp services.cpp suncalc.cpp  luacondition.cpp ioport.cpp ruleserver.h objectcontroller.h threads.h timermanager.h persistentstorage.h xmlserver.h smsgateway.h emailgateway.h knxconnection.h services.h suncalc.h luacondition.h ioport.h logger.h
+diff --git a/src/objectcontroller.cpp b/src/objectcontroller.cpp
+index fb2fc3a..7622491 100644
+--- a/src/objectcontroller.cpp
++++ b/src/objectcontroller.cpp
+@@ -2925,7 +2925,7 @@ std::string StringObjectValue::transcode(const std::string &source, const std::s
+       iconv_t conversionDescriptor = iconv_open((targetEncoding + "//TRANSLIT").c_str(), sourceEncoding.c_str());
+       char cSource[source.size()];
+       memcpy(cSource, source.c_str(), source.size() + 1);
+-      char *sourceStart = &cSource[0];
++      ICONV_CONST char *sourceStart = &cSource[0];
+       size_t sourceLength = source.size();
+       const size_t targetLength = source.size() * 5; // Should be pretty enough even in worst cases.
+       char targetChars[targetLength];
+
index 1b79a77fdd77f6c75345440eeac5a9511f678323..5a89aa370689a560cf5300ad7d1ecadb6072bedc 100644 (file)
@@ -8,19 +8,20 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=lksctp-tools
-PKG_VERSION:=1.0.16
+PKG_VERSION:=1.0.18
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=@SF/lksctp
-PKG_HASH:=0903dd526b7f30a89d5031aa2c82757612becc38ed7bc6e4f972f8deae351f26
+PKG_SOURCE_URL:=https://codeload.github.com/sctp/lksctp-tools/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=3e9ab5b3844a8b65fc8152633aafe85f406e6da463e53921583dfc4a443ff03a
 
+PKG_MAINTAINER:=
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=COPYING
-PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org>
 
 PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -28,7 +29,7 @@ define Package/lksctp-tools/Default
   SECTION:=net
   CATEGORY:=Network
   TITLE:=SCTP user-land
-  URL:=http://lksctp.sourceforge.net
+  URL:=https://github.com/sctp/lksctp-tools
 endef
 
 define Package/libsctp
@@ -37,29 +38,26 @@ $(call Package/lksctp-tools/Default)
   SECTION:=libs
   CATEGORY:=Libraries
   TITLE+= library
-  URL:=http://lksctp.sourceforge.net
   DEPENDS:=+kmod-sctp
 endef
 
 define Package/sctp
 $(call Package/lksctp-tools/Default)
   TITLE+= (meta)
-  URL:=http://lksctp.sourceforge.net
   DEPENDS:=+libsctp +sctp-tools
 endef
 
 define Package/sctp-tools
 $(call Package/lksctp-tools/Default)
   TITLE+= tools
-  URL:=http://lksctp.sourceforge.net
   DEPENDS:=+libsctp
 endef
 
 define Build/InstallDev
-       $(INSTALL_DIR) $(1)/usr/include
-       $(CP) \
-               $(PKG_INSTALL_DIR)/usr/include/netinet \
-               $(STAGING_DIR)/usr/include/
+       $(INSTALL_DIR) $(1)/usr/include/netinet
+       $(INSTALL_DATA) \
+               $(PKG_INSTALL_DIR)/usr/include/netinet/sctp.h \
+               $(1)/usr/include/netinet
        $(INSTALL_DIR) $(1)/usr/lib
        $(CP) \
                $(PKG_INSTALL_DIR)/usr/lib/libsctp.{a,so*} \
@@ -73,16 +71,12 @@ define Package/libsctp/install
                $(1)/usr/lib/
 endef
 
-define Package/sctp/install
-       :
-endef
-
 define Package/sctp-tools/install
        $(INSTALL_DIR) $(1)/usr/bin
-       $(CP) \
+       $(INSTALL_BIN) \
                $(PKG_INSTALL_DIR)/usr/bin/checksctp \
                $(1)/usr/bin/
-       $(CP) \
+       $(INSTALL_BIN) \
                $(PKG_INSTALL_DIR)/usr/bin/sctp_{darn,status,test} \
                $(1)/usr/bin/
 endef
diff --git a/net/lksctp-tools/patches/010-build-fix-netinet-sctp.h-not-to-be-installed.patch b/net/lksctp-tools/patches/010-build-fix-netinet-sctp.h-not-to-be-installed.patch
new file mode 100644 (file)
index 0000000..3d9d939
--- /dev/null
@@ -0,0 +1,35 @@
+From 378560050a8f93786c590cc99a55461666205b61 Mon Sep 17 00:00:00 2001
+From: Xin Long <lucien.xin@gmail.com>
+Date: Fri, 24 Aug 2018 01:13:32 +0800
+Subject: [PATCH] build: fix netinet/sctp.h not to be installed
+
+After libcnetinet_HEADERS was set to sctp.h.in, netinet/sctp.h can
+no longer be installed into ${includedir}.
+
+Since "AC_CONFIG_HEADERS([src/include/netinet/sctp.h])" is already
+added into configure.ac, there's no need to generate sctp.h by
+automake.
+
+So we simply set libcnetinet_HEADERS back to sctp.h.
+
+Fixes: 9607dd85e70a ("netinet/sctp.h: dynamically build based on system setup")
+Signed-off-by: Xin Long <lucien.xin@gmail.com>
+Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
+---
+ src/include/netinet/Makefile.am | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/src/include/netinet/Makefile.am b/src/include/netinet/Makefile.am
+index ca0aac2..965db8c 100644
+--- a/src/include/netinet/Makefile.am
++++ b/src/include/netinet/Makefile.am
+@@ -11,5 +11,4 @@ libcnetinetdir = $(includedir)/netinet
+ # API.
+ include_HEADERS =
+-libcnetinet_HEADERS = sctp.h.in
+-BUILT_SOURCES = sctp.h
++libcnetinet_HEADERS = sctp.h
+-- 
+2.17.1
+
index d71d181656a1f9f3170709e06262993344acf6b3..80e802b17b4d0fad1b5559c4d623730089300e39 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=lora-gateway-hal
 PKG_VERSION:=5.0.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_URL:=https://codeload.github.com/Lora-net/lora_gateway/tar.gz/v$(PKG_VERSION)?
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
@@ -64,7 +64,7 @@ define Build/InstallDev
        $(CP) $(PKG_BUILD_DIR)/libloragw/inc/loragw_* $(1)/usr/include/libloragw
        $(CP) $(PKG_BUILD_DIR)/libloragw/config.h $(1)/usr/include/libloragw
        $(INSTALL_DIR) $(1)/usr/lib
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/libloragw/libloragw.so* $(1)/usr/lib/
+       $(CP) $(PKG_BUILD_DIR)/libloragw/libloragw.so* $(1)/usr/lib/
        $(LN) libloragw.so.0 $(1)/usr/lib/libloragw.so
        $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
        $(CP) $(PKG_BUILD_DIR)/loragw.pc  $(1)/usr/lib/pkgconfig/
@@ -72,7 +72,7 @@ endef
 
 define Package/libloragw/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/libloragw/libloragw.so.* $(1)/usr/lib/
+       $(CP) $(PKG_BUILD_DIR)/libloragw/libloragw.so.* $(1)/usr/lib/
 endef
 
 define Package/libloragw-tests/install
index 5c324c6197c536e23d69268e1fd0983ea8ec56b1..3efea46de05e91c90578cba75bc220775b73249c 100644 (file)
@@ -12,6 +12,7 @@ PKG_RELEASE:=1
 
 PKG_LICENSE:=GPL-2.0
 PKG_MAINTAINER:=Leonid Esman <leonid.esman@gmail.com>
+PKG_CPE_ID:=cpe:/a:lynx:lynx
 PKG_SOURCE:=$(PKG_NAME)$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://invisible-mirror.net/archives/lynx/tarballs/ \
                 https://ftp.icm.edu.pl/packages/lynx/tarballs/ \
index 31fb2c716b601c29c8e9b03cfae1c99fd8ba5da3..f21cfc7b194fefb8db5eeaca436130dfdd63b181 100644 (file)
@@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mac-telnet
 PKG_VERSION:=2015-09-02
-PKG_RELEASE=$(PKG_SOURCE_VERSION)
+PKG_RELEASE=$(PKG_SOURCE_VERSION)+1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/jow-/MAC-Telnet.git
@@ -15,7 +15,7 @@ PKG_SOURCE_VERSION:=37d83cbc9c07266d6c957d27bf75285b305eceab
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
 PKG_MIRROR_HASH:=13429f1a870121cdbbfb687e0581967904798000eca1f8f9c1e9dc87dee5669b
 
-PKG_LICENSE:=GPL-2.0+
+PKG_LICENSE:=GPL-2.0-or-later
 PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
 
 include $(INCLUDE_DIR)/package.mk
index 5072a45b6e370ffe41faa7ed4ff2953d120b8924..ccc1eeeb75a27335e87e79bbe9c15a778a13e213 100644 (file)
@@ -8,14 +8,15 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mDNSResponder
-PKG_VERSION:=878.200.35
-PKG_RELEASE:=1
+PKG_VERSION:=IETF104
+PKG_RELEASE:=2
 
 PKG_SOURCE:=mDNSResponder-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://opensource.apple.com/tarballs/mDNSResponder/
-PKG_HASH:=e777b4d7dbf5eb1552cb80090ad1ede319067ab6e45e3990d68aabf6e8b3f5a0
+PKG_SOURCE_URL:=https://opensource.apple.com/tarballs/mDNSResponder/IETF/
+PKG_HASH:=b3a76fd35cf2d561546c2fbeaea1e5998b7e04b8330afb918ea5fbdeb202162c
 PKG_MAINTAINER:=
 PKG_LICENSE:=Apache-2.0
+PKG_CPE_ID:=cpe:/a:apple:mdnsresponder
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/mDNSResponder-$(PKG_VERSION)
 
diff --git a/net/mdnsresponder/patches/001-cross_compile.patch b/net/mdnsresponder/patches/001-cross_compile.patch
deleted file mode 100644 (file)
index aa90eb9..0000000
+++ /dev/null
@@ -1,114 +0,0 @@
---- a/Clients/Makefile
-+++ b/Clients/Makefile
-@@ -27,6 +27,8 @@
- #############################################################################
-+CC = @cc
-+
- # On OS X the dns_sd library functions are included in libSystem, which is implicitly linked with every executable
- # If /usr/lib/libSystem.dylib exists, then we're on OS X, so we don't need also to link the "dns_sd" shared library
- ifneq "$(wildcard /usr/lib/libSystem.dylib)" ""
-@@ -46,10 +48,10 @@ build:
-       mkdir build
- build/dns-sd: build dns-sd.c ClientCommon.c
--      $(CC) $(filter %.c %.o, $+) $(LIBS) -I../mDNSShared -Wall -o $@
-+      $(CC) $(CFLAGS) $(filter %.c %.o, $+) $(LIBS) -I../mDNSShared -Wall -o $@
- build/dns-sd64: build dns-sd.c ClientCommon.c
--      $(CC) $(filter %.c %.o, $+) $(LIBS) -I../mDNSShared -Wall -o $@ -m64
-+      $(CC) $(CFLAGS) $(filter %.c %.o, $+) $(LIBS) -I../mDNSShared -Wall -o $@ -m64
- # Note, we can make a 'fat' version of dns-sd using 'lipo', as shown below, but we
- # don't, because we don't want or need a 'fat' version of dns-sd, because it will
---- a/mDNSPosix/Makefile
-+++ b/mDNSPosix/Makefile
-@@ -54,11 +54,12 @@ COREDIR = ../mDNSCore
- SHAREDDIR ?= ../mDNSShared
- JDK = /usr/jdk
--CC = @cc
-+CC = @gcc
- BISON = @bison
- FLEX = @flex
- ST = @strip
--LD = ld -shared
-+LD = @ld
-+SOOPTS = -shared
- CP = cp
- RM = rm
- LN = ln -s -f
-@@ -92,7 +93,7 @@ CFLAGS_DEBUG = -O0 -DMDNS_DEBUGMSGS=0
- CFLAGS_OS = -DNOT_HAVE_DAEMON -DNOT_HAVE_SA_LEN -DNOT_HAVE_SOCKLEN_T -DNOT_HAVE_IF_NAMETOINDEX \
-        -DLOG_PERROR=0 -D_XPG4_2 -D__EXTENSIONS__ -DHAVE_BROKEN_RECVIF_NAME -DTARGET_OS_SOLARIS
- CC = gcc
--LD = gcc -shared
-+LD = gcc
- LINKOPTS = -lsocket -lnsl -lresolv
- JAVACFLAGS_OS += -I$(JDK)/include/solaris
- ifneq ($(DEBUG),1)
-@@ -149,7 +150,8 @@    -D__MAC_OS_X_VERSION_MIN_REQUIRED=__MAC_OS_X_VERSION_10_4 \
-       -DHAVE_STRLCPY=1 \
-       -D__APPLE_USE_RFC_2292 #-Wunreachable-code
- CC = gcc
--LD = $(CC) -dynamiclib
-+LD = $(CC)
-+SOOPTS= -dynamiclib
- LINKOPTS = -lSystem
- LDSUFFIX = dylib
- JDK = /System/Library/Frameworks/JavaVM.framework/Home
-@@ -172,8 +174,9 @@ NSSLIBFILE  := $(NSSLIBNAME)-$(NSSVERSIO
- NSSLINKNAME := $(NSSLIBNAME).so.2
- NSSINSTPATH := /lib
--# If not otherwise defined, we install into /usr/lib and /usr/include
-+# If not otherwise defined, we install into /usr/lib, /usr/include and /etc
- # and our startup script is called mdns (e.g. /etc/init.d/mdns)
-+ETCBASE?=/etc
- INSTBASE?=/usr
- STARTUPSCRIPTNAME?=mdns
-@@ -259,7 +262,7 @@ libdns_sd: setup $(BUILDDIR)/libdns_sd.$
- CLIENTLIBOBJS = $(OBJDIR)/dnssd_clientlib.c.so.o $(OBJDIR)/dnssd_clientstub.c.so.o $(OBJDIR)/dnssd_ipc.c.so.o
- $(BUILDDIR)/libdns_sd.$(LDSUFFIX): $(CLIENTLIBOBJS)
--      @$(LD) $(LINKOPTS) -o $@ $+
-+      @$(LD) $(SOOPTS) $(LINKOPTS) -o $@ $+
-       @$(STRIP) $@
- Clients: setup libdns_sd ../Clients/build/dns-sd
-@@ -294,7 +297,7 @@ InstalledManPages: $(MANPATH)/man8/mdnsd
- InstalledClients: $(INSTBASE)/bin/dns-sd
-       @echo $+ " installed"
--InstalledNSS: $(NSSINSTPATH)/$(NSSLINKNAME) /etc/nss_mdns.conf $(MANPATH)/man5/nss_mdns.conf.5 $(MANPATH)/man8/libnss_mdns.8
-+InstalledNSS: $(NSSINSTPATH)/$(NSSLINKNAME) $(ETCBASE)/nss_mdns.conf $(MANPATH)/man5/nss_mdns.conf.5 $(MANPATH)/man8/libnss_mdns.8
-       @echo $+ " installed"
- # Note: If daemon already installed, we make sure it's stopped before overwriting it
-@@ -347,19 +350,21 @@ $(INSTBASE)/bin/dns-sd: ../Clients/build
- $(NSSINSTPATH)/$(NSSLINKNAME): $(NSSINSTPATH)/$(NSSLIBFILE)
-       $(LN) $< $@
--      ldconfig
-+ifdef LDCONFIG
-+      $(LDCONFIG)
-+endif
- $(NSSINSTPATH)/$(NSSLIBFILE): $(BUILDDIR)/$(NSSLIBFILE)
-       $(CP) $< $@
-       chmod 444 $@
--/etc/nss_mdns.conf: nss_mdns.conf
-+$(ETCBASE)/nss_mdns.conf: nss_mdns.conf
-       $(CP) $< $@
-       chmod 444 $@
-       # Check the nsswitch.conf file.
-       # If 'mdns' does not already appear on the "hosts:" line, then add it right before 'dns'
--      cp -f /etc/nsswitch.conf /etc/nsswitch.conf.pre-mdns
--      sed -e '/mdns/!s/^\(hosts:.*\)dns\(.*\)/\1mdns dns\2/' /etc/nsswitch.conf.pre-mdns > /etc/nsswitch.conf
-+      -[ -f $(ETCBASE)/nsswitch.conf ] && cp -f $(ETCBASE)/nsswitch.conf $(ETCBASE)/nsswitch.conf.pre-mdns
-+      -[ -f $(ETCBASE)/nsswitch.conf ] && sed -e '/mdns/!s/^\(hosts:.*\)dns\(.*\)/\1mdns dns\2/' $(ETCBASE)/nsswitch.conf.pre-mdns > $(ETCBASE)/nsswitch.conf
- #############################################################################
diff --git a/net/mdnsresponder/patches/010-uclibc.patch b/net/mdnsresponder/patches/010-uclibc.patch
new file mode 100644 (file)
index 0000000..a4d1308
--- /dev/null
@@ -0,0 +1,13 @@
+--- a/mDNSShared/PlatformCommon.c
++++ b/mDNSShared/PlatformCommon.c
+@@ -43,6 +43,10 @@
+ typedef unsigned int socklen_t;
+ #endif
++#ifndef TCP_NOTSENT_LOWAT
++#define TCP_NOTSENT_LOWAT 25
++#endif
++
+ #if MDNS_MALLOC_DEBUGGING
+ // We ONLY want this for malloc debugging--on a running production system we want to deal with
+ // malloc failures, not just die.   There is a small performance penalty for enabling these options
diff --git a/net/mdnsresponder/patches/100-linux_fixes.patch b/net/mdnsresponder/patches/100-linux_fixes.patch
deleted file mode 100644 (file)
index cb62382..0000000
+++ /dev/null
@@ -1,262 +0,0 @@
-diff --git a/Clients/Makefile b/Clients/Makefile
-index 383af31..925c20e 100755
---- a/Clients/Makefile
-+++ b/Clients/Makefile
-@@ -36,7 +36,7 @@ TARGETS = build/dns-sd build/dns-sd64
- LIBS =
- else
- TARGETS = build/dns-sd
--LIBS = -L../mDNSPosix/build/prod/ -ldns_sd
-+LIBS ?= -L../mDNSPosix/build/prod/ -ldns_sd
- endif
- all: $(TARGETS)
-diff --git a/mDNSPosix/PosixDaemon.c b/mDNSPosix/PosixDaemon.c
-index 88b3292..e86a6c7 100644
---- a/mDNSPosix/PosixDaemon.c
-+++ b/mDNSPosix/PosixDaemon.c
-@@ -37,6 +37,11 @@
- #include <fcntl.h>
- #include <pwd.h>
- #include <sys/types.h>
-+#ifdef __linux__
-+#include <sys/capability.h> /* !!! We require libcap-dev for this. Oh well. */
-+/* prctl is required to enable inheriting of capabilities across setuid */
-+#include <sys/prctl.h>
-+#endif /* __linux__ */
- #if __APPLE__
- #undef daemon
-@@ -184,16 +189,50 @@ int main(int argc, char **argv)
-     Reconfigure(&mDNSStorage);
-+#ifdef __linux__
-+    /*
-+     * SO_BINDTODEVICE is privileged operation; however, we can get
-+     * around it using capabilities instead of remaining root.
-+     */
-+    if (mStatus_NoError == err)
-+      {
-+        if (prctl(PR_SET_KEEPCAPS, 1, 0, 0, 0) < 0)
-+          perror("prctl PR_SET_KEEPCAPS");
-+      }
-+#endif /* __linux__ */
-+
-     // Now that we're finished with anything privileged, switch over to running as "nobody"
-     if (mStatus_NoError == err)
-     {
-         const struct passwd *pw = getpwnam("nobody");
-         if (pw != NULL)
-+          {
-             setuid(pw->pw_uid);
-+#ifdef __linux__
-+            struct __user_cap_header_struct ch;
-+            struct __user_cap_data_struct cd[_LINUX_CAPABILITY_U32S_3];
-+
-+            memset(&ch, 0, sizeof(ch));
-+            ch.version = _LINUX_CAPABILITY_VERSION_3;
-+            ch.pid = getpid();
-+            memset(&cd[0], 0, sizeof(cd));
-+            /* CAP_NET_RAW is required to use SO_BINDTODEVICE */
-+            int caps = CAP_TO_MASK(CAP_NET_RAW);
-+            cd[0].permitted = caps;
-+            cd[0].effective = caps;
-+            if (capset(&ch, &cd[0]) < 0)
-+              perror("capset");
-+#endif /* __linux__ */
-+          }
-         else
-             LogMsg("WARNING: mdnsd continuing as root because user \"nobody\" does not exist");
-     }
-+#ifdef __linux__
-+    if (mStatus_NoError == err)
-+      err = mDNSPlatformPosixRefreshInterfaceList(&mDNSStorage);
-+#endif /* __linux__ */
-+
-     if (mStatus_NoError == err)
-         err = MainLoop(&mDNSStorage);
-diff --git a/mDNSPosix/mDNSPosix.c b/mDNSPosix/mDNSPosix.c
-index 6effa12..7c1d6eb 100755
---- a/mDNSPosix/mDNSPosix.c
-+++ b/mDNSPosix/mDNSPosix.c
-@@ -733,6 +741,29 @@ mDNSlocal int SetupSocket(struct sockaddr *intfAddr, mDNSIPPort port, int interf
-             if (err < 0) { err = errno; perror("setsockopt - IP_MULTICAST_TTL"); }
-         }
-+#ifdef __linux__
-+#ifdef SO_BINDTODEVICE
-+        if (err == 0 && interfaceIndex)
-+        {
-+            char ifname[IFNAMSIZ];
-+            if (if_indextoname(interfaceIndex, ifname))
-+              {
-+                err = setsockopt(*sktPtr, SOL_SOCKET, SO_BINDTODEVICE, ifname, strlen(ifname));
-+                if (err < 0)
-+                  {
-+                    err = errno;
-+                    perror("setsockopt - SO_BINDTODEVICE");
-+                  }
-+              }
-+            else
-+              {
-+                err = errno;
-+                perror("if_indextoname");
-+              }
-+        }
-+#endif /* SO_BINDTODEVICE */
-+#endif /* __linux__ */
-+
-         // And start listening for packets
-         if (err == 0)
-         {
-@@ -814,6 +845,29 @@ mDNSlocal int SetupSocket(struct sockaddr *intfAddr, mDNSIPPort port, int interf
-             if (err < 0) { err = errno; perror("setsockopt - IPV6_MULTICAST_HOPS"); }
-         }
-+#ifdef __linux__
-+#ifdef SO_BINDTODEVICE
-+        if (err == 0 && interfaceIndex)
-+        {
-+            char ifname[IFNAMSIZ];
-+            if (if_indextoname(interfaceIndex, ifname))
-+              {
-+                err = setsockopt(*sktPtr, SOL_SOCKET, SO_BINDTODEVICE, ifname, strlen(ifname));
-+                if (err < 0)
-+                  {
-+                    err = errno;
-+                    perror("setsockopt - SO_BINDTODEVICE");
-+                  }
-+              }
-+            else
-+              {
-+                err = errno;
-+                perror("if_indextoname");
-+              }
-+        }
-+#endif /* SO_BINDTODEVICE */
-+#endif /* __linux__ */
-+
-         // And start listening for packets
-         if (err == 0)
-         {
-@@ -958,19 +1017,14 @@ mDNSlocal int SetupInterfaceList(mDNS *const m)
-     int err            = 0;
-     struct ifi_info *intfList      = get_ifi_info(AF_INET, mDNStrue);
-     struct ifi_info *firstLoopback = NULL;
-+    struct ifi_info **p = &intfList;
-     assert(m != NULL);
-     debugf("SetupInterfaceList");
--    if (intfList == NULL) err = ENOENT;
--
- #if HAVE_IPV6
--    if (err == 0)       /* Link the IPv6 list to the end of the IPv4 list */
--    {
--        struct ifi_info **p = &intfList;
--        while (*p) p = &(*p)->ifi_next;
--        *p = get_ifi_info(AF_INET6, mDNStrue);
--    }
-+    while (*p) p = &(*p)->ifi_next;
-+    *p = get_ifi_info(AF_INET6, mDNStrue);
- #endif
-     if (err == 0)
-@@ -1046,7 +1100,7 @@ mDNSlocal mStatus OpenIfNotifySocket(int *pFD)
-     /* Subscribe the socket to Link & IP addr notifications. */
-     mDNSPlatformMemZero(&snl, sizeof snl);
-     snl.nl_family = AF_NETLINK;
--    snl.nl_groups = RTMGRP_LINK | RTMGRP_IPV4_IFADDR;
-+    snl.nl_groups = RTMGRP_LINK | RTMGRP_IPV4_IFADDR | RTMGRP_IPV6_IFADDR;
-     ret = bind(sock, (struct sockaddr *) &snl, sizeof snl);
-     if (0 == ret)
-         *pFD = sock;
-@@ -1124,11 +1178,18 @@ mDNSlocal mDNSu32       ProcessRoutingNotification(int sd)
-         PrintNetLinkMsg(pNLMsg);
- #endif
-+        // this result isn't used anywhere as a number, just as
-+        // non-zero - however, I have seen devices with more than 32
-+        // interfaces at some point..
-+        // (on Linux, every tunnel increases index for example)
-+
-         // Process the NetLink message
-         if (pNLMsg->nlmsg_type == RTM_GETLINK || pNLMsg->nlmsg_type == RTM_NEWLINK)
--            result |= 1 << ((struct ifinfomsg*) NLMSG_DATA(pNLMsg))->ifi_index;
-+          result |= 1;
-+        // << ((struct ifinfomsg*) NLMSG_DATA(pNLMsg))->ifi_index;
-         else if (pNLMsg->nlmsg_type == RTM_DELADDR || pNLMsg->nlmsg_type == RTM_NEWADDR)
--            result |= 1 << ((struct ifaddrmsg*) NLMSG_DATA(pNLMsg))->ifa_index;
-+          result |= 1;
-+        // << ((struct ifaddrmsg*) NLMSG_DATA(pNLMsg))->ifa_index;
-         // Advance pNLMsg to the next message in the buffer
-         if ((pNLMsg->nlmsg_flags & NLM_F_MULTI) != 0 && pNLMsg->nlmsg_type != NLMSG_DONE)
-@@ -1299,8 +1360,12 @@ mDNSexport mStatus mDNSPlatformInit(mDNS *const m)
-     if (err == mStatus_NoError) err = SetupSocket(&sa, zeroIPPort, 0, &m->p->unicastSocket6);
- #endif
-+    // In Linux case, we can't set up sockets with different owner -
-+    // it blows up SO_REUSEPORT. So we do this step bit later.
-+#ifndef __linux__
-     // Tell mDNS core about the network interfaces on this machine.
-     if (err == mStatus_NoError) err = SetupInterfaceList(m);
-+#endif /* !__linux__ */
-     // Tell mDNS core about DNS Servers
-     mDNS_Lock(m);
-diff --git a/mDNSPosix/mDNSUNP.c b/mDNSPosix/mDNSUNP.c
-index b392fc7..f551ad5 100755
---- a/mDNSPosix/mDNSUNP.c
-+++ b/mDNSPosix/mDNSUNP.c
-@@ -63,6 +63,7 @@
- #if defined(AF_INET6) && HAVE_IPV6 && HAVE_LINUX
- #include <netdb.h>
- #include <arpa/inet.h>
-+#include <linux/if_addr.h>
- /* Converts a prefix length to IPv6 network mask */
- void plen_to_mask(int plen, char *addr) {
-@@ -127,6 +128,8 @@
-             nitems = fscanf(fp, ifnameFmt, ifname);
-             if (nitems != 1) break;
-+            if (flags & IFA_F_DEPRECATED) continue;
-+
-             if (strcmp(lastname, ifname) == 0) {
-                 if (doaliases == 0)
-                     continue;   /* already processed this interface */
-diff --git a/mDNSShared/dnsextd_parser.y b/mDNSShared/dnsextd_parser.y
-index 18c5990..d4b63ce 100644
---- a/mDNSShared/dnsextd_parser.y
-+++ b/mDNSShared/dnsextd_parser.y
-@@ -15,6 +15,8 @@
-  * limitations under the License.
-  */
-+%parse-param { void *context }
-+
- %{
- #include <stdio.h>
- #include <stdlib.h>
-@@ -23,7 +25,7 @@
- #include "DebugServices.h"
- #include "dnsextd.h"
--void yyerror( const char* error );
-+void yyerror( void *context, const char* error );
- int  yylex(void);
-@@ -409,7 +419,7 @@ int yywrap(void);
- extern int yylineno;
--void yyerror( const char *str )
-+void yyerror( void *context, const char *str )
- {
-         fprintf( stderr,"%s:%d: error: %s\n", g_filename, yylineno, str );
- }
diff --git a/net/mdnsresponder/patches/120-reproducible-builds.patch b/net/mdnsresponder/patches/120-reproducible-builds.patch
deleted file mode 100644 (file)
index 16b2cc9..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
---- a/Clients/dns-sd.c
-+++ b/Clients/dns-sd.c
-@@ -2281,7 +2281,7 @@ Fail:
- // NOT static -- otherwise the compiler may optimize it out
- // The "@(#) " pattern is a special prefix the "what" command looks for
--const char VersionString_SCCS[] = "@(#) dns-sd " STRINGIFY(mDNSResponderVersion) " (" __DATE__ " " __TIME__ ")";
-+const char VersionString_SCCS[] = "@(#) dns-sd " STRINGIFY(mDNSResponderVersion);
- #if _BUILDING_XCODE_PROJECT_
- // If the process crashes, then this string will be magically included in the automatically-generated crash log
---- a/mDNSPosix/PosixDaemon.c
-+++ b/mDNSPosix/PosixDaemon.c
-@@ -290,9 +290,9 @@ asm (".desc ___crashreporter_info__, 0x1
- // For convenience when using the "strings" command, this is the last thing in the file
- #if mDNSResponderVersion > 1
--mDNSexport const char mDNSResponderVersionString_SCCS[] = "@(#) mDNSResponder-" STRINGIFY(mDNSResponderVersion) " (" __DATE__ " " __TIME__ ")";
-+mDNSexport const char mDNSResponderVersionString_SCCS[] = "@(#) mDNSResponder-" STRINGIFY(mDNSResponderVersion);
- #elif MDNS_VERSIONSTR_NODTS
- mDNSexport const char mDNSResponderVersionString_SCCS[] = "@(#) mDNSResponder (Engineering Build)";
- #else
--mDNSexport const char mDNSResponderVersionString_SCCS[] = "@(#) mDNSResponder (Engineering Build) (" __DATE__ " " __TIME__ ")";
-+mDNSexport const char mDNSResponderVersionString_SCCS[] = "@(#) mDNSResponder (Engineering Build)";
- #endif
---- a/mDNSShared/Java/JNISupport.c
-+++ b/mDNSShared/Java/JNISupport.c
-@@ -1069,4 +1069,4 @@ exit:
- // NOT static -- otherwise the compiler may optimize it out
- // The "@(#) " pattern is a special prefix the "what" command looks for
--const char VersionString_SCCS[] = "@(#) libjdns_sd " STRINGIFY(mDNSResponderVersion) " (" __DATE__ " " __TIME__ ")";
-+const char VersionString_SCCS[] = "@(#) libjdns_sd " STRINGIFY(mDNSResponderVersion);
---- a/mDNSShared/dnsextd.c
-+++ b/mDNSShared/dnsextd.c
-@@ -3136,7 +3136,7 @@ mDNS mDNSStorage;
- // For convenience when using the "strings" command, this is the last thing in the file
- // The "@(#) " pattern is a special prefix the "what" command looks for
--const char mDNSResponderVersionString_SCCS[] = "@(#) dnsextd " STRINGIFY(mDNSResponderVersion) " (" __DATE__ " " __TIME__ ")";
-+const char mDNSResponderVersionString_SCCS[] = "@(#) dnsextd " STRINGIFY(mDNSResponderVersion);
- #if _BUILDING_XCODE_PROJECT_
- // If the process crashes, then this string will be magically included in the automatically-generated crash log
---- a/mDNSShared/dnssd_clientlib.c
-+++ b/mDNSShared/dnssd_clientlib.c
-@@ -363,4 +363,4 @@ DNSServiceErrorType DNSSD_API TXTRecordG
- // NOT static -- otherwise the compiler may optimize it out
- // The "@(#) " pattern is a special prefix the "what" command looks for
--const char VersionString_SCCS_libdnssd[] DNSSD_USED = "@(#) libdns_sd " STRINGIFY(mDNSResponderVersion) " (" __DATE__ " " __TIME__ ")";
-+const char VersionString_SCCS_libdnssd[] DNSSD_USED = "@(#) libdns_sd " STRINGIFY(mDNSResponderVersion);
index 8f2b4641983ba5dcf3b07d8d5996036100e39442..1c2f64807c7d579d8f1273181032a7a984d4f7e6 100644 (file)
@@ -19,6 +19,7 @@ PKG_HASH:=9c5bdf29a780fb6c6f7c9eaaeeda0583efdf663193758c3e316c969a510af2a9
 PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>
 PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:memcachedb:memcached
 
 PKG_INSTALL:=1
 
index bce9d91250ff221fc03c1970db9f6a9074b1902e..a5470d53dfcc86bd2c144cf78ac82955da6ef499 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mini_snmpd
 PKG_VERSION:=1.4-rc1
-PKG_RELEASE:=4
+PKG_RELEASE:=5
 PKG_MAINTAINER:=Marcin Jurkowski <marcin1j@gmail.com>
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=COPYING
index 9e6eff88ec9621554f7f79bded0c325bc7dd1642..96dc5ab9e839321dce8a52184c67727f3ace3d71 100644 (file)
@@ -77,7 +77,7 @@ append_interface() {
        # 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
-               [ $netdev_count -ge 4 ] && {
+               [ $netdev_count -ge 8 ] && {
                        _err "$cfg: too many network interfaces configured, ignoring $name"
                        return
                }
index 7e7fddab5dbf11cb80987a686d0372fc4d23a9fd..467b5b5743a84d3e3ae7d5b46eab434bbb0bd2a6 100644 (file)
@@ -8,18 +8,20 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=miniupnpc
-PKG_VERSION:=2.1.20190408
-PKG_RELEASE:=2
+PKG_VERSION:=2.1.20190824
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://miniupnp.tuxfamily.org/files
-PKG_HASH:=a0c46bcf6065d6351a8fa6a0a18dc57d10a16908dbb470908fd2e423511514ec
+PKG_HASH:=1fadefea0ecdceb3e35bb5d901f0db880c826740e93148ddfb087b4b4389e165
 
 PKG_MAINTAINER:=Steven Barth <cyrus@openwrt.org>
-PKG_LICENSE:=BSD-3c
+PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=LICENSE
+PKG_CPE_ID:=cpe:/a:miniupnp_project:miniupnp
 
-PKG_INSTALL:=1
+CMAKE_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/cmake.mk
@@ -50,17 +52,6 @@ CMAKE_OPTIONS += -DUPNPC_BUILD_TESTS=OFF
 TARGET_CFLAGS += $(FPIC)
 TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
 
-define Build/InstallDev
-       $(INSTALL_DIR) $(1)/usr/include/miniupnpc
-       $(CP) \
-               $(PKG_INSTALL_DIR)/usr/include/miniupnpc/*.h \
-               $(1)/usr/include/miniupnpc/
-       $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) \
-               $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a} \
-               $(1)/usr/lib/
-endef
-
 define Package/miniupnpc/install
        $(INSTALL_DIR) $(1)/usr/bin
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/upnpc-shared $(1)/usr/bin/upnpc
index 1e8b964874748cf81b2aeffb64c3f0b478d6b59c..ce4c6752ca40ec96564ed709cdd68b3f786fdca4 100644 (file)
@@ -1,6 +1,6 @@
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -38,12 +38,6 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
+@@ -39,12 +39,6 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
    target_compile_definitions(miniupnpc-private INTERFACE _DARWIN_C_SOURCE)
  endif ()
  
diff --git a/net/miniupnpc/patches/300-add-listdevices-to-cmake.patch b/net/miniupnpc/patches/300-add-listdevices-to-cmake.patch
deleted file mode 100644 (file)
index e8d7900..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -66,6 +66,7 @@ set (MINIUPNPC_SOURCES
-   connecthostport.c
-   portlistingparse.c
-   receivedata.c
-+  listdevices.c
-   connecthostport.h
-   igd_desc_parse.h
-   minisoap.h
-@@ -142,6 +143,10 @@ if (UPNPC_BUILD_SHARED)
-     add_executable (upnpc-shared upnpc.c)
-     target_link_libraries (upnpc-shared PRIVATE libminiupnpc-shared)
-     target_include_directories(upnpc-shared PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
-+
-+    add_executable (listdevices listdevices.c)
-+    target_link_libraries (listdevices PRIVATE libminiupnpc-shared)
-+    target_include_directories(listdevices PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
-   endif ()
- endif ()
index 822a297dab552a797f6b340be98526a7c08f05f6..886d95f86bb8c0242f1743982c9812562d1ac872 100644 (file)
@@ -17,6 +17,7 @@ PKG_HASH:=4175d588f600e2877503c781c5d75320dfce572669fcab7604434b07ec5c0d5d
 
 PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=LICENSE
+PKG_CPE_ID:=cpe:/a:miniupnp_project:miniupnpd
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/version.mk
diff --git a/net/mosh/Makefile b/net/mosh/Makefile
new file mode 100644 (file)
index 0000000..d98d9b1
--- /dev/null
@@ -0,0 +1,115 @@
+#
+# Copyright (C) 2011-2013 Entware
+# Copyright (C) 2018 Jakub Tymejczyk <jakub.tymejczyk.pl>
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=mosh
+PKG_VERSION:=1.3.2
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://mosh.org/
+PKG_HASH:=da600573dfa827d88ce114e0fed30210689381bbdcff543c931e4d6a2e851216
+
+PKG_MAINTAINER:=Rosen Penev <rosenp@gmail.com>
+PKG_LICENSE:=GPL-3.0-or-later
+PKG_LICENSE_FILES:=COPYING
+
+PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
+PKG_USE_MIPS16:=0
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/mosh/Default
+  SECTION:=utils
+  CATEGORY:=Utilities
+  TITLE:=Mosh mobile shell
+  DEPENDS:=+libncursesw +libopenssl +protobuf
+  URL:=https://mosh.org/
+endef
+
+define Package/mosh-client
+$(call Package/mosh/Default)
+ TITLE+= (client)
+endef
+
+define Package/mosh-server
+$(call Package/mosh/Default)
+ TITLE+= (server)
+endef
+
+define Package/mosh-full
+$(call Package/mosh/Default)
+ TITLE+= (full)
+ DEPENDS:= \
+    +mosh-client \
+    +mosh-server \
+    +perlbase-essential \
+    +perlbase-socket \
+    +perlbase-xsloader \
+    +perlbase-getopt \
+    +perlbase-errno \
+    +perlbase-config \
+    +perlbase-io \
+    +perlbase-symbol \
+    +perlbase-selectsaver \
+    +perlbase-posix \
+    +perlbase-autoloader \
+    +perlbase-fcntl \
+    +perlbase-tie
+endef
+
+
+define Package/mosh/Default/description
+ Mosh is a remote terminal application that allows roaming, supports
+ intermittent connectivity, and provides intelligent local echo and line
+ editing of user keystrokes.
+endef
+
+define Package/mosh-client/description
+$(call Package/mosh/Default/description)
+ This is a mosh client.
+endef
+
+define Package/mosh-server/description
+$(call Package/mosh/Default/description)
+ This is a mosh server.
+endef
+
+define Package/mosh-full/description
+$(call Package/mosh/Default/description)
+ This is a full package with perl wrapper script
+endef
+
+CONFIGURE_ARGS += \
+       --disable-compile-warnings \
+       --disable-hardening \
+       --without-utempter
+
+TARGET_CXXFLAGS += -ffunction-sections -fdata-sections -flto -std=c++11
+TARGET_LDFLAGS += -Wl,--gc-sections -lncurses
+
+define Package/mosh-client/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mosh-client $(1)/usr/bin/
+endef
+
+define Package/mosh-server/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mosh-server $(1)/usr/bin/
+endef
+
+define Package/mosh-full/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mosh $(1)/usr/bin/
+endef
+
+$(eval $(call BuildPackage,mosh-client))
+$(eval $(call BuildPackage,mosh-server))
+$(eval $(call BuildPackage,mosh-full))
diff --git a/net/mosh/patches/010-ffs.patch b/net/mosh/patches/010-ffs.patch
new file mode 100644 (file)
index 0000000..7df9a07
--- /dev/null
@@ -0,0 +1,12 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -425,7 +425,8 @@ AC_CHECK_DECL([mach_absolute_time],
+ AC_CHECK_DECLS([__builtin_ctz])
+ AC_CHECK_DECLS([ffs], [], [],
+-  [[#include <strings.h>]])
++  [[#define _GNU_SOURCE
++#include <strings.h>]])
+ AC_CHECK_DECLS([be64toh, betoh64, bswap64, __builtin_bswap64], [], [],
+   [[#if defined(HAVE_ENDIAN_H)
index 1cd2e92e4eea035d7c7c5c8c6e17271f212e46b5..6a6928e40a1e8d8cddc327f7fa7585ce6d154b79 100644 (file)
@@ -9,7 +9,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mosquitto
-PKG_VERSION:=1.6.2
+PKG_VERSION:=1.6.7
 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:=33499e78dfa0ca1cb488fd196fde940a66305bdfd44ba763ce2001db2569a08b
+PKG_HASH:=bcd31a8fbbd053fee328986fadd8666d3058357ded56b9782f7d4f19931d178e
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
 
 include $(INCLUDE_DIR)/package.mk
diff --git a/net/mosquitto/patches/901-fix-openssl-ui.patch b/net/mosquitto/patches/901-fix-openssl-ui.patch
deleted file mode 100644 (file)
index cfef42d..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/lib/net_mosq.c b/lib/net_mosq.c
-index 745b170..bdcaa19 100644
---- a/lib/net_mosq.c
-+++ b/lib/net_mosq.c
-@@ -50,6 +50,7 @@ Contributors:
- #include <openssl/conf.h>
- #include <openssl/engine.h>
- #include <openssl/err.h>
-+#include <openssl/ui.h>
- #include <tls_mosq.h>
- #endif
diff --git a/net/mosquitto/patches/902-fix-engine-guards.patch b/net/mosquitto/patches/902-fix-engine-guards.patch
deleted file mode 100644 (file)
index 48b3c42..0000000
+++ /dev/null
@@ -1,215 +0,0 @@
-diff --git a/lib/net_mosq.c b/lib/net_mosq.c
-index bdcaa19..f207e32 100644
---- a/lib/net_mosq.c
-+++ b/lib/net_mosq.c
-@@ -141,7 +141,9 @@ int net__init(void)
-                       | OPENSSL_INIT_ADD_ALL_DIGESTS \
-                       | OPENSSL_INIT_LOAD_CONFIG, NULL);
- #  endif
-+#if !defined(OPENSSL_NO_ENGINE)
-       ENGINE_load_builtin_engines();
-+#endif
-       setup_ui_method();
-       if(tls_ex_index_mosq == -1){
-               tls_ex_index_mosq = SSL_get_ex_new_index(0, "client context", NULL, NULL, NULL);
-@@ -599,6 +601,7 @@ static int net__init_ssl_ctx(struct mosquitto *mosq)
-                       SSL_CTX_set_mode(mosq->ssl_ctx, SSL_MODE_RELEASE_BUFFERS);
- #endif
-+#if !defined(OPENSSL_NO_ENGINE)
-               if(mosq->tls_engine){
-                       engine = ENGINE_by_id(mosq->tls_engine);
-                       if(!engine){
-@@ -615,12 +618,15 @@ static int net__init_ssl_ctx(struct mosquitto *mosq)
-                       ENGINE_set_default(engine, ENGINE_METHOD_ALL);
-                       ENGINE_free(engine); /* release the structural reference from ENGINE_by_id() */
-               }
-+#endif
-               if(mosq->tls_ciphers){
-                       ret = SSL_CTX_set_cipher_list(mosq->ssl_ctx, mosq->tls_ciphers);
-                       if(ret == 0){
-                               log__printf(mosq, MOSQ_LOG_ERR, "Error: Unable to set TLS ciphers. Check cipher list \"%s\".", mosq->tls_ciphers);
-+#if !defined(OPENSSL_NO_ENGINE)
-                               ENGINE_FINISH(engine);
-+#endif
-                               COMPAT_CLOSE(mosq->sock);
-                               mosq->sock = INVALID_SOCKET;
-                               net__print_ssl_error(mosq);
-@@ -647,7 +653,9 @@ static int net__init_ssl_ctx(struct mosquitto *mosq)
-                                       log__printf(mosq, MOSQ_LOG_ERR, "Error: Unable to load CA certificates, check capath \"%s\".", mosq->tls_capath);
-                               }
- #endif
-+#if !defined(OPENSSL_NO_ENGINE)
-                               ENGINE_FINISH(engine);
-+#endif
-                               COMPAT_CLOSE(mosq->sock);
-                               mosq->sock = INVALID_SOCKET;
-                               net__print_ssl_error(mosq);
-@@ -672,7 +680,9 @@ static int net__init_ssl_ctx(struct mosquitto *mosq)
- #else
-                                       log__printf(mosq, MOSQ_LOG_ERR, "Error: Unable to load client certificate \"%s\".", mosq->tls_certfile);
- #endif
-+#if !defined(OPENSSL_NO_ENGINE)
-                                       ENGINE_FINISH(engine);
-+#endif
-                                       COMPAT_CLOSE(mosq->sock);
-                                       mosq->sock = INVALID_SOCKET;
-                                       net__print_ssl_error(mosq);
-@@ -681,6 +691,7 @@ static int net__init_ssl_ctx(struct mosquitto *mosq)
-                       }
-                       if(mosq->tls_keyfile){
-                               if(mosq->tls_keyform == mosq_k_engine){
-+#if !defined(OPENSSL_NO_ENGINE)
-                                       UI_METHOD *ui_method = net__get_ui_method();
-                                       if(mosq->tls_engine_kpass_sha1){
-                                               if(!ENGINE_ctrl_cmd(engine, ENGINE_SECRET_MODE, ENGINE_SECRET_MODE_SHA, NULL, NULL, 0)){
-@@ -714,6 +725,7 @@ static int net__init_ssl_ctx(struct mosquitto *mosq)
-                                               net__print_ssl_error(mosq);
-                                               return MOSQ_ERR_TLS;
-                                       }
-+#endif
-                               }else{
-                                       ret = SSL_CTX_use_PrivateKey_file(mosq->ssl_ctx, mosq->tls_keyfile, SSL_FILETYPE_PEM);
-                                       if(ret != 1){
-@@ -722,7 +734,9 @@ static int net__init_ssl_ctx(struct mosquitto *mosq)
- #else
-                                               log__printf(mosq, MOSQ_LOG_ERR, "Error: Unable to load client key file \"%s\".", mosq->tls_keyfile);
- #endif
-+#if !defined(OPENSSL_NO_ENGINE)
-                                               ENGINE_FINISH(engine);
-+#endif
-                                               COMPAT_CLOSE(mosq->sock);
-                                               mosq->sock = INVALID_SOCKET;
-                                               net__print_ssl_error(mosq);
-@@ -732,7 +746,9 @@ static int net__init_ssl_ctx(struct mosquitto *mosq)
-                               ret = SSL_CTX_check_private_key(mosq->ssl_ctx);
-                               if(ret != 1){
-                                       log__printf(mosq, MOSQ_LOG_ERR, "Error: Client certificate/key are inconsistent.");
-+#if !defined(OPENSSL_NO_ENGINE)
-                                       ENGINE_FINISH(engine);
-+#endif
-                                       COMPAT_CLOSE(mosq->sock);
-                                       mosq->sock = INVALID_SOCKET;
-                                       net__print_ssl_error(mosq);
-diff --git a/lib/options.c b/lib/options.c
-index 005b781..6dc4262 100644
---- a/lib/options.c
-+++ b/lib/options.c
-@@ -255,6 +255,7 @@ int mosquitto_string_option(struct mosquitto *mosq, enum mosq_opt_t option, cons
-       switch(option){
-               case MOSQ_OPT_TLS_ENGINE:
- #ifdef WITH_TLS
-+#    if !defined(OPENSSL_NO_ENGINE)
-                       eng = ENGINE_by_id(value);
-                       if(!eng){
-                               return MOSQ_ERR_INVAL;
-@@ -265,6 +266,7 @@ int mosquitto_string_option(struct mosquitto *mosq, enum mosq_opt_t option, cons
-                               return MOSQ_ERR_NOMEM;
-                       }
-                       return MOSQ_ERR_SUCCESS;
-+#endif
- #else
-                       return MOSQ_ERR_NOT_SUPPORTED;
- #endif
-diff --git a/src/net.c b/src/net.c
-index 74b4ee8..495f8b2 100644
---- a/src/net.c
-+++ b/src/net.c
-@@ -534,6 +534,7 @@ int net__socket_listen(struct mosquitto__listener *listener)
-                               return 1;
-                       }
-                       if(listener->tls_engine){
-+#if !defined(OPENSSL_NO_ENGINE)
-                               engine = ENGINE_by_id(listener->tls_engine);
-                               if(!engine){
-                                       log__printf(NULL, MOSQ_LOG_ERR, "Error loading %s engine\n", listener->tls_engine);
-@@ -548,6 +549,7 @@ int net__socket_listen(struct mosquitto__listener *listener)
-                               }
-                               ENGINE_set_default(engine, ENGINE_METHOD_ALL);
-                               ENGINE_free(engine); /* release the structural reference from ENGINE_by_id() */
-+#endif
-                       }
-                       /* FIXME user data? */
-                       if(listener->require_certificate){
-@@ -560,10 +562,13 @@ int net__socket_listen(struct mosquitto__listener *listener)
-                               log__printf(NULL, MOSQ_LOG_ERR, "Error: Unable to load server certificate \"%s\". Check certfile.", listener->certfile);
-                               net__print_error(MOSQ_LOG_ERR, "Error: %s");
-                               COMPAT_CLOSE(sock);
-+#if !defined(OPENSSL_NO_ENGINE)
-                               ENGINE_FINISH(engine);
-+#endif
-                               return 1;
-                       }
-                       if(listener->tls_keyform == mosq_k_engine){
-+#if !defined(OPENSSL_NO_ENGINE)
-                               UI_METHOD *ui_method = net__get_ui_method();
-                               if(listener->tls_engine_kpass_sha1){
-                                       if(!ENGINE_ctrl_cmd(engine, ENGINE_SECRET_MODE, ENGINE_SECRET_MODE_SHA, NULL, NULL, 0)){
-@@ -593,13 +598,16 @@ int net__socket_listen(struct mosquitto__listener *listener)
-                                       ENGINE_FINISH(engine);
-                                       return 1;
-                               }
-+#endif
-                       }else{
-                               rc = SSL_CTX_use_PrivateKey_file(listener->ssl_ctx, listener->keyfile, SSL_FILETYPE_PEM);
-                               if(rc != 1){
-                                       log__printf(NULL, MOSQ_LOG_ERR, "Error: Unable to load server key file \"%s\". Check keyfile.", listener->keyfile);
-                                       net__print_error(MOSQ_LOG_ERR, "Error: %s");
-                                       COMPAT_CLOSE(sock);
-+#if !defined(OPENSSL_NO_ENGINE)
-                                       ENGINE_FINISH(engine);
-+#endif
-                                       return 1;
-                               }
-                       }
-@@ -608,7 +616,9 @@ int net__socket_listen(struct mosquitto__listener *listener)
-                               log__printf(NULL, MOSQ_LOG_ERR, "Error: Server certificate/key are inconsistent.");
-                               net__print_error(MOSQ_LOG_ERR, "Error: %s");
-                               COMPAT_CLOSE(sock);
-+#if !defined(OPENSSL_NO_ENGINE)
-                               ENGINE_FINISH(engine);
-+#endif
-                               return 1;
-                       }
-                       /* Load CRLs if they exist. */
-@@ -618,7 +628,9 @@ int net__socket_listen(struct mosquitto__listener *listener)
-                                       log__printf(NULL, MOSQ_LOG_ERR, "Error: Unable to obtain TLS store.");
-                                       net__print_error(MOSQ_LOG_ERR, "Error: %s");
-                                       COMPAT_CLOSE(sock);
-+#if !defined(OPENSSL_NO_ENGINE)
-                                       ENGINE_FINISH(engine);
-+#endif
-                                       return 1;
-                               }
-                               lookup = X509_STORE_add_lookup(store, X509_LOOKUP_file());
-@@ -627,7 +639,9 @@ int net__socket_listen(struct mosquitto__listener *listener)
-                                       log__printf(NULL, MOSQ_LOG_ERR, "Error: Unable to load certificate revocation file \"%s\". Check crlfile.", listener->crlfile);
-                                       net__print_error(MOSQ_LOG_ERR, "Error: %s");
-                                       COMPAT_CLOSE(sock);
-+#if !defined(OPENSSL_NO_ENGINE)
-                                       ENGINE_FINISH(engine);
-+#endif
-                                       return 1;
-                               }
-                               X509_STORE_set_flags(store, X509_V_FLAG_CRL_CHECK);
-@@ -644,7 +658,9 @@ int net__socket_listen(struct mosquitto__listener *listener)
-                       if(mosquitto__tls_server_ctx(listener)){
-                               COMPAT_CLOSE(sock);
-+#if !defined(OPENSSL_NO_ENGINE)
-                               ENGINE_FINISH(engine);
-+#endif
-                               return 1;
-                       }
-                       SSL_CTX_set_psk_server_callback(listener->ssl_ctx, psk_server_callback);
-@@ -654,7 +670,9 @@ int net__socket_listen(struct mosquitto__listener *listener)
-                                       log__printf(NULL, MOSQ_LOG_ERR, "Error: Unable to set TLS PSK hint.");
-                                       net__print_error(MOSQ_LOG_ERR, "Error: %s");
-                                       COMPAT_CLOSE(sock);
-+#if !defined(OPENSSL_NO_ENGINE)
-                                       ENGINE_FINISH(engine);
-+#endif
-                                       return 1;
-                               }
-                       }
diff --git a/net/mstpd/Config.in b/net/mstpd/Config.in
new file mode 100644 (file)
index 0000000..84d5147
--- /dev/null
@@ -0,0 +1,12 @@
+menu "Configuration"
+       depends on PACKAGE_mstpd
+
+config MSTPD_RTNL_RCV_BUFSIZE
+       int "Netlink receive buffer size"
+       default 262144
+
+config MSTPD_RTNL_SND_BUFSIZE
+       int "Netlink send buffer size"
+       default 262144
+
+endmenu
diff --git a/net/mstpd/Makefile b/net/mstpd/Makefile
new file mode 100644 (file)
index 0000000..f6c67df
--- /dev/null
@@ -0,0 +1,58 @@
+#
+# 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.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=mstpd
+PKG_VERSION:=0.0.8
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/mstpd/mstpd/tar.gz/$(PKG_VERSION)?
+PKG_HASH:=dd6492039368efff0bd13b3f9c8bb32d859ebfe258a70ef23b2163c4b6c35f0c
+
+PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
+PKG_LICENSE:=GPL-2.0-or-later
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_FIXUP:=autoreconf
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/mstpd
+  SECTION:=net
+  CATEGORY:=Network
+  TITLE:=Multiple Spanning Tree Protocol daemon
+  URL:=https://github.com/mstpd/mstpd
+endef
+
+define Package/mstpd/description
+  Multiple Spanning Tree Protocol daemon.
+  Implements MSTP which is not implemented yet in the Linux kernel.
+endef
+
+define Package/mstpd/config
+  source "$(SOURCE)/Config.in"
+endef
+
+TARGET_CFLAGS += \
+       -DRTNL_RCV_BUFSIZE=$(CONFIG_MSTPD_RTNL_RCV_BUFSIZE) \
+       -DRTNL_SND_BUFSIZE=$(CONFIG_MSTPD_RTNL_SND_BUFSIZE)
+
+MAKE_VARS+=MODE=prod
+
+define Package/mstpd/install
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/mstpd $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/mstpctl $(1)/usr/sbin
+       $(INSTALL_DIR) $(1)/etc/init.d/
+       $(INSTALL_BIN) ./files/etc/init.d/mstpd.init $(1)/etc/init.d/mstpd
+       $(INSTALL_DIR) $(1)/sbin
+       $(INSTALL_BIN) ./files/sbin/bridge-stp $(1)/sbin
+endef
+
+$(eval $(call BuildPackage,mstpd))
diff --git a/net/mstpd/files/etc/init.d/mstpd.init b/net/mstpd/files/etc/init.d/mstpd.init
new file mode 100644 (file)
index 0000000..bade419
--- /dev/null
@@ -0,0 +1,124 @@
+#!/bin/sh /etc/rc.common
+
+# shellcheck disable=SC2034    # foo appears unused. Verify it or export it.
+
+START=25
+STOP=99
+
+MSTPCTL="/usr/sbin/mstpctl"
+MSTPD="/usr/sbin/mstpd"
+
+USE_PROCD=1
+
+mstpd_get_bridges() {
+       "$MSTPCTL" showbridge | grep -v "^ " | cut -d " " -f 1 2>/dev/null
+}
+
+# mstpd log levels 
+#   LOG_LEVEL_NONE  0
+#   LOG_LEVEL_ERROR 1
+#   LOG_LEVEL_INFO  2
+#   LOG_LEVEL_DEBUG 3
+#   LOG_LEVEL_STATE_MACHINE_TRANSITION 4
+#   LOG_LEVEL_MAX   100
+
+config_bridge_port_mstpd() {
+       local config="$1"
+       local index=$2 # FIXME: maybe remove index later
+       local name=$3
+
+       [ -n "$index" -a -n "$name" ] || return 0
+
+       config_get br_index "$config" br_index
+       [ -n "$br_index" ] || return 0
+       [ "$index" = "$br_index" ] || return 0
+
+       config_get port_name "$config" name
+       [ -n "$port_name" ] || return 0
+
+       for opt in bpduguard; do
+               config_get $opt "$config" $opt
+               eval optval=\$$opt
+               [ -z "$optval" ] || "$MSTPCTL" "set$opt" "$name" "$port_name" "$optval"
+       done
+}
+
+config_bridge_mstpd() {
+       local config="$1"
+       local optval=
+       local name=
+       local enable=
+       local mstid=0 #  for the moment, using only MSTID
+
+       config_get index "$config" index
+       [ -n "$index" ] || return 1
+
+       # Get bridge name
+       config_get name "$config" name
+       [ -n "$name" ] || return 0
+
+       config_get enable "$config" enable
+       if [ "$enable" != "1" ] ; then
+               return 0
+       fi
+
+       list_contains MSTPD_PREINSTALLED_BRIDGES "$name" || \
+               "$MSTPCTL" addbridge "$name"
+       # All options here have 'set$opt' equivalent calls in mstpd,
+       #  hence this trick with the loop
+       for opt in maxage fdelay maxhops hello ageing forcevers txholdcount; do
+               config_get $opt "$config" "$opt"
+               eval optval=\$$opt
+               [ -z "$optval" ] || "$MSTPCTL" set$opt "$name" "$optval"
+       done
+       config_get treeprio "$config" treeprio
+       [ -z "$treeprio" ] || $MSTPCTL settreeprio "$name" "$mstid" "$treeprio"
+       config_foreach config_bridge_port_mstpd bridge_port "$index" "$name"
+       CONFIGURED_BRIDGES="$CONFIGURED_BRIDGES $name"
+       export CONFIGURED_BRIDGES
+}
+
+start_service() {
+       procd_open_instance
+       procd_set_param command $MSTPD
+       procd_append_param command -v 2
+       procd_append_param command -d # don't daemonize, procd will handle that for us
+       procd_append_param command -s # print to syslog
+
+       # set auto respawn behavior
+       procd_set_param respawn
+
+       # reload config on respawn
+       procd_open_trigger
+       procd_add_raw_trigger "instance.start" 2000 "/etc/init.d/mstpd" "reload"
+       procd_close_trigger
+
+       procd_close_instance
+}
+
+service_running() {
+       pgrep mstpd >/dev/null 2>&1
+}
+
+reload_service() {
+       if ! running ; then
+               start
+               return
+       fi
+
+       unset CONFIGURED_BRIDGES
+       MSTPD_PREINSTALLED_BRIDGES="$(mstpd_get_bridges)"
+       export MSTPD_PREINSTALLED_BRIDGES
+
+       config_load 'mstpd'
+       config_foreach config_bridge_mstpd bridge
+
+       for bridge in $(mstpd_get_bridges) ; do
+               list_contains CONFIGURED_BRIDGES "$bridge" || \
+                       $MSTPCTL delbridge "$bridge"
+       done
+       # return 0 (success) here, otherwise, and endless restart loop will occur from procd
+       # because the last return code may be mstpctl failing
+       return 0
+}
+
diff --git a/net/mstpd/files/sbin/bridge-stp b/net/mstpd/files/sbin/bridge-stp
new file mode 100644 (file)
index 0000000..7b2cbc0
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+# Dummy file ; don't do anything ;
+# Returning success here, tells the kernel to allow
+# a userspace module to handle STP states
+#
+# Meanwhile, procd will start mstpd, and all will be well
+
+exit 0
index 6743e190b64260e3955623435c455ae3075dd446..ce62d3ccfaa164644a6fafa2386924c5d898e92f 100644 (file)
@@ -9,15 +9,16 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mtr
 PKG_VERSION:=0.92
-PKG_RELEASE:=5
+PKG_RELEASE:=6
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://www.bitwizard.nl/mtr/files
 PKG_HASH:=f2979db9e2f41aa8e6574e7771767c9afe111d9213814eb47f5e1e71876e4382
 
 PKG_MAINTAINER:=Jonathan McCrohan <jmccrohan@gmail.com>
-PKG_LICENSE:=GPL-2.0+
+PKG_LICENSE:=GPL-2.0-or-later
 PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:matt_kimball_and_roger_wolff:mtr
 
 PKG_INSTALL:=1
 PKG_BUILD_PARALLEL:=1
index 03fb2be88bc1e37461637de7f6afb719cf0607ea..e6d5386162b5e77b180331e149c8dc1d8cde1717 100644 (file)
@@ -8,8 +8,8 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mwan3
-PKG_VERSION:=2.7.12
-PKG_RELEASE:=1
+PKG_VERSION:=2.8.0
+PKG_RELEASE:=2
 PKG_MAINTAINER:=Florian Eckert <fe@dev.tdt.de>
 PKG_LICENSE:=GPLv2
 
index 3f64b99d41d7838f331187f9d41e44d595c62397..3f09d95696cccb850094cbe648939377000d3673 100644 (file)
@@ -37,19 +37,27 @@ config interface 'wan6'
 
 config interface 'wanb'
        option enabled '0'
+       list track_ip '8.8.4.4'
        list track_ip '8.8.8.8'
+       list track_ip '208.67.222.222'
        list track_ip '208.67.220.220'
        option family 'ipv4'
        option reliability '1'
        option count '1'
        option timeout '2'
+       option failure_latency '1000'
+       option recovery_latency '500'
+       option failure_loss '20'
+       option recovery_loss '5'
        option interval '5'
        option down '3'
        option up '8'
 
 config interface 'wanb6'
        option enabled '0'
+       list track_ip '2001:4860:4860::8844'
        list track_ip '2001:4860:4860::8888'
+       list track_ip '2620:0:ccd::2'
        list track_ip '2620:0:ccc::2'
        option family 'ipv6'
        option reliability '1'
index 65b99c1bdee061bf865d1a3e575c5e0dd9d14d37..5bfbd24624ad21ba28570c518576800f020d226e 100644 (file)
@@ -79,7 +79,6 @@ case "$ACTION" in
                fi
                mwan3_set_policies_iptables
                mwan3_set_user_rules
-               mwan3_flush_conntrack $INTERFACE $DEVICE "ifup"
        ;;
        ifdown)
                mwan3_set_iface_hotplug_state $INTERFACE "offline"
@@ -87,7 +86,6 @@ case "$ACTION" in
                mwan3_track_signal $INTERFACE $DEVICE
                mwan3_set_policies_iptables
                mwan3_set_user_rules
-               mwan3_flush_conntrack $INTERFACE $DEVICE "ifdown"
        ;;
 esac
 
index 15a8ae5f15c657db840e1855a38aaa8c98577357..c243d55ff8e0b6c63b517858c39cd496b77f583a 100644 (file)
@@ -14,4 +14,9 @@ if [ "$ACTION" == "ifup" ]; then
        mwan3_unlock "$ACTION" "mwan3rtmon"
 fi
 
+config_get enabled $INTERFACE enabled 0
+[ "${enabled}" = "0" ] || {
+       mwan3_flush_conntrack "$INTERFACE" "$ACTION"
+}
+
 exit 0
diff --git a/net/mwan3/files/etc/uci-defaults/mwan3-migrate-flush_conntrack b/net/mwan3/files/etc/uci-defaults/mwan3-migrate-flush_conntrack
new file mode 100644 (file)
index 0000000..1691efa
--- /dev/null
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+. /lib/functions.sh
+
+mwan3_migrate_flush_conntrack() {
+       local iface="$1"
+
+       config_get value "${iface}" flush_conntrack
+       case $value in
+               always)
+                       uci_remove mwan3 "$iface" flush_conntrack
+                       uci_add_list mwan3 "$iface" flush_conntrack ifup
+                       uci_add_list mwan3 "$iface" flush_conntrack ifdown
+                       ;;
+               never)
+                       uci_remove mwan3 "$iface" flush_conntrack
+                       ;;
+       esac
+
+       uci_commit mwan3
+}
+
+config_load mwan3
+config_foreach mwan3_migrate_flush_conntrack interface
+
+exit 0
index 4bb8f34a947a9b14f3446f5c87b805a90f73fcf7..ae7b398aa9377454359dc5182d37296d637ed4f8 100644 (file)
@@ -1251,34 +1251,21 @@ mwan3_report_rules_v6()
 
 mwan3_flush_conntrack()
 {
-       local flush_conntrack
+       local interface="$1"
+       local action="$2"
 
-       config_get flush_conntrack $1 flush_conntrack never
+       handle_flush() {
+               local flush_conntrack="$1"
+               local action="$2"
+
+               if [ "$action" = "$flush_conntrack" ]; then
+                       echo f > ${CONNTRACK_FILE}
+                       $LOG info "Connection tracking flushed for interface '$interface' on action '$action'"
+               fi
+       }
 
        if [ -e "$CONNTRACK_FILE" ]; then
-               case $flush_conntrack in
-                       ifup)
-                               [ "$3" = "ifup" ] && {
-                                       echo f > ${CONNTRACK_FILE}
-                                       $LOG info "connection tracking flushed on interface $1 ($2) $3"
-                               }
-                               ;;
-                       ifdown)
-                               [ "$3" = "ifdown" ] && {
-                                       echo f > ${CONNTRACK_FILE}
-                                       $LOG info "connection tracking flushed on interface $1 ($2) $3"
-                               }
-                               ;;
-                       always)
-                               echo f > ${CONNTRACK_FILE}
-                               $LOG info "connection tracking flushed on interface $1 ($2) $3"
-                               ;;
-                       never)
-                               $LOG info "connection tracking not flushed on interface $1 ($2) $3"
-                               ;;
-               esac
-       else
-               $LOG warning "connection tracking not enabled"
+               config_list_foreach "$interface" flush_conntrack handle_flush "$action"
        fi
 }
 
index d31ee63bcef0eea5755334de8ef1d81add908422..b8b55212a1297e5e14b69594ba5958ef1739a65d 100755 (executable)
@@ -74,9 +74,10 @@ get_mwan3_status() {
        local iface_select="${2}"
        local running="0"
        local age=0
-       local uptime=0
-       local downtime=0
-       local pid device time_p time_n time_u time_d
+       local online=0
+       local offline=0
+       local up="0"
+       local enabled pid device time_p time_n time_u time_d
 
        network_get_device device $1
 
@@ -92,27 +93,36 @@ get_mwan3_status() {
                        let age=time_n-time_p
                }
 
-               time_u="$(cat "$MWAN3TRACK_STATUS_DIR/${iface}/UPTIME")"
+               time_u="$(cat "$MWAN3TRACK_STATUS_DIR/${iface}/ONLINE")"
                [ -z "${time_u}" ] || [ "${time_u}" = "0" ] || {
                        time_n="$(get_uptime)"
-                       let uptime=time_n-time_u
+                       let online=time_n-time_u
                }
 
-               time_d="$(cat "$MWAN3TRACK_STATUS_DIR/${iface}/DOWNTIME")"
+               time_d="$(cat "$MWAN3TRACK_STATUS_DIR/${iface}/OFFLINE")"
                [ -z "${time_d}" ] || [ "${time_d}" = "0" ] || {
                        time_n="$(get_uptime)"
-                       let downtime=time_n-time_d
+                       let offline=time_n-time_d
                }
 
+               local uptime="0"
+
+               config_get enabled "$iface" enabled 0
+               network_get_uptime uptime "$iface"
+               network_is_up "$iface" && up="1"
+
                json_add_object "${iface}"
                json_add_int age "$age"
+               json_add_int online "${online}"
+               json_add_int offline "${offline}"
                json_add_int uptime "${uptime}"
-               json_add_int downtime "${downtime}"
                json_add_int "score" "$(cat "$MWAN3TRACK_STATUS_DIR/${iface}/SCORE")"
                json_add_int "lost" "$(cat "$MWAN3TRACK_STATUS_DIR/${iface}/LOST")"
                json_add_int "turn" "$(cat "$MWAN3TRACK_STATUS_DIR/${iface}/TURN")"
                json_add_string "status" "$(cat "$MWAN3TRACK_STATUS_DIR/${iface}/STATUS")"
+               json_add_boolean "enabled" "${enabled}"
                json_add_boolean "running" "${running}"
+               json_add_boolean "up" "${up}"
                json_add_array "track_ip"
                for file in $MWAN3TRACK_STATUS_DIR/${iface}/*; do
                        track="${file#*/TRACK_}"
index 09ee3c119b951790cd5f0c370830f68f4e2982d8..5a36922301399b3725cb465651f38f65db791220 100755 (executable)
@@ -114,13 +114,13 @@ main() {
 
        if [ "$STATUS" = "offline" ]; then
                echo "offline" > /var/run/mwan3track/$1/STATUS
-               echo "0" > /var/run/mwan3track/$1/UPTIME
-               echo "$(get_uptime)" > /var/run/mwan3track/$1/DOWNTIME
+               echo "0" > /var/run/mwan3track/$1/ONLINE
+               echo "$(get_uptime)" > /var/run/mwan3track/$1/OFFLINE
                score=0
        else
                echo "online" > /var/run/mwan3track/$1/STATUS
-               echo "0" > /var/run/mwan3track/$1/DOWNTIME
-               echo "$(get_uptime)" > /var/run/mwan3track/$1/UPTIME
+               echo "0" > /var/run/mwan3track/$1/OFFLINE
+               echo "$(get_uptime)" > /var/run/mwan3track/$1/ONLINE
                env -i ACTION="connected" INTERFACE="$1" DEVICE="$2" /sbin/hotplug-call iface
        fi
        while true; do
@@ -260,8 +260,8 @@ main() {
 
                if [ "${IFDOWN_EVENT}" -eq 1 ]; then
                        echo "offline" > /var/run/mwan3track/$1/STATUS
-                       echo "$(get_uptime)" > /var/run/mwan3track/$1/DOWNTIME
-                       echo "0" > /var/run/mwan3track/$1/UPTIME
+                       echo "$(get_uptime)" > /var/run/mwan3track/$1/OFFLINE
+                       echo "0" > /var/run/mwan3track/$1/ONLINE
                        $LOG notice "Interface $1 ($2) is offline"
                        env -i ACTION="disconnected" INTERFACE="$1" DEVICE="$2" /sbin/hotplug-call iface
                        score=0
index 2523be473d5a12df0334b0a22293e2eaeb0985d5..787bc020063c0449990a572810f9d854f58ec81b 100644 (file)
@@ -9,13 +9,14 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=nbd
 PKG_VERSION:=3.19
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@SF/nbd
 PKG_HASH:=b4466412f13e057659f25d35e1e8e181afd62c7179bff22a6add81445ecb8690
-PKG_LICENSE:=GPL-2.0+
+PKG_LICENSE:=GPL-2.0-or-later
 PKG_MAINTAINER:=Marcin Jurkowski <marcin1j@gmail.com>
+PKG_CPE_ID:=cpe:/a:network_block_device:nbd
 
 PKG_INSTALL:=1
 
@@ -24,8 +25,6 @@ include $(INCLUDE_DIR)/package.mk
 # -liconv due to glib2, to be revisited later
 include $(INCLUDE_DIR)/nls.mk
 
-PKG_BUILD_DEPENDS:=glib2 gettext
-
 define Package/nbd
   SECTION:=net
   CATEGORY:=Network
index bfcaa90661728c3a57cd2287adc00fa007f34984..7aa4235ad5f50e25251fec98cb503f55f4ac2dae 100644 (file)
@@ -16,6 +16,7 @@ PKG_SOURCE_URL:=@SF/net-snmp
 PKG_HASH:=b2fc3500840ebe532734c4786b0da4ef0a5f67e51ef4c86b3345d697e4976adf
 PKG_MAINTAINER:=Stijn Tintel <stijn@linux-ipv6.be>
 PKG_LICENSE:=MIT BSD-3-Clause-Clear
+PKG_CPE_ID:=cpe:/a:net-snmp:net-snmp
 
 PKG_FIXUP:=autoreconf
 
index 9ebcb491cf4191418748362422c34f3c1d2adbba..a7653176d4c76050f4fefc5a1f33026eb454a170 100644 (file)
@@ -337,7 +337,8 @@ start_service() {
 }
 
 stop_service() {
-       [ -f "$CONFIGFILE" ] && rm -f "$CONFIGFILE"
+       [ -f "$CONFIGFILE" ] || return
+       rm -f "$CONFIGFILE"
        procd_set_config_changed firewall
 }
 
@@ -353,5 +354,6 @@ service_triggers(){
 }
 
 service_started() {
+       [ "$snmp_enabled" -eq 0 ] && return
        procd_set_config_changed firewall
 }
index a156316b319f109cd7a859c92a3653a55ffd37b7..d34b5f895f81f2f95fd64a8acc1c4e15d998a6b8 100644 (file)
@@ -19,6 +19,8 @@ PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
 PKG_FIXUP:=autoreconf
 
+PKG_CPE_ID:=cpe:/a:netatalk:netatalk
+
 PKG_BUILD_DEPENDS:=libevent2
 
 include $(INCLUDE_DIR)/package.mk
index 5a56317fbcd6b4534b5beb8275dce879ec05cf8f..d36a0de1c1147ceb7e03afa65d3b252716236eaf 100644 (file)
@@ -16,6 +16,7 @@ PKG_SOURCE_URL:=@SF/$(PKG_NAME)
 PKG_HASH:=b55af0bbdf5acc02d1eb6ab18da2acd77a400bafd074489003f3df09676332bb
 PKG_MAINTAINER:=Adam Gensler <openwrt@a.gnslr.us>
 PKG_LICENSE:=GPL-2.0
+PKG_CPE_ID:=cpe:/a:netcat:netcat
 PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
index c3c8279f2f5ed2692eab17853fac800ec2cf9004..656067e4235656e2182e8f3b4a6efe748fa19037 100644 (file)
@@ -6,9 +6,9 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=netifyd
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_MAINTAINER:=Darryl Sokoloski <darryl@egloo.ca>
-PKG_LICENSE:=GPL-3.0+
+PKG_LICENSE:=GPL-3.0-or-later
 
 PKG_BUILD_PARALLEL:=1
 PKG_FIXUP:=autoreconf
@@ -16,10 +16,10 @@ PKG_INSTALL:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://gitlab.com/netify.ai/public/netify-agent.git
-PKG_SOURCE_DATE:=2019-01-03
-PKG_SOURCE_VERSION:=v2.87
-#PKG_SOURCE_VERSION:=e846598bbe26eb6d631f1eda922c7141245f48e3
-PKG_MIRROR_HASH:=05af5b4e48ccfccf60cfb3c0b08c8bb3987d8957f17723520da4488798a7b68d
+PKG_SOURCE_DATE:=2019-08-31
+PKG_SOURCE_VERSION:=v2.92
+#PKG_SOURCE_VERSION:=cbc5572cde53992b06e5560b6305cbc7d0a8b1c3
+PKG_MIRROR_HASH:=99db0e98c3f1529609dfc10fa366217991c79593d185b85e4607528efa723969
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -28,7 +28,7 @@ define Package/netifyd
   CATEGORY:=Network
   TITLE:=Netify Agent
   URL:=http://www.netify.ai/
-  DEPENDS:=+libcurl +libmnl +libnetfilter-conntrack +libjson-c +libpcap +zlib +libpthread
+  DEPENDS:=+ca-bundle +libcurl +libmnl +libnetfilter-conntrack +libjson-c +libpcap +zlib +libpthread @!USE_UCLIBC
   # Explicitly depend on libstdcpp rather than $(CXX_DEPENDS).  At the moment
   # std::unordered_map is only available via libstdcpp which is required for
   # performance reasons.
@@ -54,7 +54,6 @@ TARGET_LDFLAGS+=-Wl,--gc-sections
 CONFIGURE_ARGS+= \
        --sharedstatedir=/var/run \
        --enable-lean-and-mean \
-       --disable-ncurses \
        --disable-libtcmalloc \
        --without-systemdsystemunitdir \
        --without-tmpfilesdir
index ac427bc5be05a20ea4e5b4b534ada207f2209999..f0d25eaac66871698eed751cb3c698dda4d881d6 100644 (file)
@@ -1,11 +1,11 @@
 Netify Agent
 ============
-Copyright ©2015-2018 eGloo Incorporated ([www.egloo.ca](https://www.egloo.ca))
+Copyright ©2015-2019 eGloo Incorporated ([www.egloo.ca](https://www.egloo.ca))
 
-Deep-Packet Inspection Server
------------------------------
+Network Intelligence - Simplified
+---------------------------------
 
-The [Netify Agent](https://www.netify.ai/) is a deep-packet inspection server.  The Agent is built on top of [nDPI](http://www.ntop.org/products/deep-packet-inspection/ndpi/) (formerly OpenDPI) to detect network protocols and applications.  These detections can be saved locally, served over a UNIX or TCP socket, and/or "pushed" (via HTTP POSTs) to a remote third-party server.  Flow metadata, network statistics, and detection classifications are stored using JSON encoding.
+The [Netify Agent](https://www.netify.ai/) is a deep-packet inspection server.  The Agent is built on top of [nDPI](http://www.ntop.org/products/deep-packet-inspection/ndpi/) (formerly OpenDPI) to detect network protocols and applications.  Detections can be saved locally, served over a UNIX or TCP socket, and/or "pushed" (via HTTP POSTs) to a remote third-party server.  Flow metadata, network statistics, and detection classifications are stored using JSON encoding.
 
 Optionally, the Netify Agent can be coupled with a [Netify Cloud](https://www.netify.ai/) subscription for further cloud processing, historical storage, machine-learning analysis, event notifications, device detection/identification, along with the option (on supported platforms) to take an active role in policing/bandwidth-shaping specific network protocols and applications.
 
@@ -44,6 +44,11 @@ Currently you can download binary packages for the following OS distributions:
 - [Fedora](http://software.opensuse.org/download.html?project=home%3Aegloo&package=netifyd)
 - [Ubuntu](http://software.opensuse.org/download.html?project=home%3Aegloo&package=netifyd)
 
+Developer Documentation
+-----------------------
+
+Further developer documentation can be found [here](https://www.netify.ai/developer/netify-agent).
+
 Configuring/Building From Source
 --------------------------------
 
index 5f15333949e1009065f29e60a542867c1be3f29a..032ded5866f2998b72a4714e86a79ebaf400f197 100644 (file)
@@ -16,6 +16,8 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=ftp://ftp.netperf.org/netperf/
 PKG_HASH:=842af17655835c8be7203808c3393e6cb327a8067f3ed1f1053eb78b4e40375a
 
+PKG_CPE_ID:=cpe:/a:netperf:netperf
+
 include $(INCLUDE_DIR)/package.mk
 
 define Package/netperf
index 389477041e1f13d92f625fa6fc19d82b33502b67..81ee53d010217bc7742e65a80d391900acb36fea 100644 (file)
@@ -7,9 +7,9 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=nfs-kernel-server
-PKG_VERSION:=2.3.4
-PKG_RELEASE:=2
-PKG_HASH:=8a6bafd5a33c4259e6e5093d126384cbe33acb10135578b5faa60c40f2f5e995
+PKG_VERSION:=2.4.1
+PKG_RELEASE:=1
+PKG_HASH:=1a21bf8e8b8864d54d114aa7b0e87e48ec87a5d861de0c03c20e35f7e3c67721
 
 PKG_SOURCE_URL:=@SF/nfs
 PKG_SOURCE:=nfs-utils-$(PKG_VERSION).tar.xz
diff --git a/net/nfs-kernel-server/patches/102-uclibc-ns-maxmsg.patch b/net/nfs-kernel-server/patches/102-uclibc-ns-maxmsg.patch
new file mode 100644 (file)
index 0000000..98d7725
--- /dev/null
@@ -0,0 +1,13 @@
+--- a/support/nfsidmap/libnfsidmap.c
++++ b/support/nfsidmap/libnfsidmap.c
+@@ -89,6 +89,10 @@ gid_t nobody_gid = (gid_t)-1;
+ #define NFS4DNSTXTREC "_nfsv4idmapdomain"
+ #endif
++#ifndef NS_MAXMSG
++#define NS_MAXMSG 65535
++#endif
++
+ /* Default logging fuction */
+ static void default_logger(const char *fmt, ...)
+ {
index 85f97bc9ded3839745952978157db445d825f6e5..244b7abe096434012cdef1a1f0988641724bbc4e 100644 (file)
@@ -8,16 +8,17 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=nginx
-PKG_VERSION:=1.16.0
+PKG_VERSION:=1.16.1
 PKG_RELEASE:=1
 
 PKG_SOURCE:=nginx-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://nginx.org/download/
-PKG_HASH:=4fd376bad78797e7f18094a00f0f1088259326436b537eb5af69b01be2ca1345
+PKG_HASH:=f11c2a6dd1d3515736f0324857957db2de98be862461b5a542a3ac6188dbe32b
 
 PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de> \
                                Ansuel Smith <ansuelsmth@gmail.com>
 PKG_LICENSE:=2-clause BSD-like license
+PKG_CPE_ID:=cpe:/a:nginx:nginx
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
 
@@ -429,18 +430,18 @@ endif
 
 ifeq ($(CONFIG_NGINX_HTTP_BROTLI),y)
   define Download/nginx-brotli
-    VERSION:=e26248ee361c04e25f581b92b85d95681bdffb39
+    VERSION:=dc37f658ccb5a51d090dc09d1a2aca2f24309869
     SUBDIR:=nginx-brotli
-    FILE:=ngx-brotli-module-$$(VERSION).tar.gz
+    FILE:=ngx-brotli-module-$$(VERSION).tar.xz
     URL:=https://github.com/eustas/ngx_brotli.git
-    MIRROR_HASH:=76b891ba49f82f0cfbc9cba875646e26ee986b522373e0aa2698a9923a4adcdb
+    MIRROR_HASH:=6bc0c40ff24f6e0ac616dfddc803bdc7fcf54764ba9dc4f9cecb3a68beedcdaf
     PROTO:=git
   endef
   $(eval $(call Download,nginx-brotli))
 
   define Prepare/nginx-brotli
        $(eval $(Download/nginx-brotli))
-       gzip -dc $(DL_DIR)/$(FILE) | tar -C $(PKG_BUILD_DIR) $(TAR_OPTIONS)
+       xzcat $(DL_DIR)/$(FILE) | tar -C $(PKG_BUILD_DIR) $(TAR_OPTIONS)
   endef
 endif
 
index 31af664a2190590e21c381e396e0780d45a979cc..5b0f3da0ae8c1f537eca1287465dea66c8170fef 100644 (file)
@@ -20,7 +20,7 @@ http {
 
     sendfile on;
     keepalive_timeout 0;
-    
+
     client_body_buffer_size 10K;
     client_header_buffer_size 1k;
     client_max_body_size 1G;
@@ -31,14 +31,15 @@ http {
     gzip_vary on;
     gzip_comp_level 1;
     gzip_proxied any;
-    
+    gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript image/svg+xml;
+
     root /www;
 
     server {
         listen 80 default_server;
         listen [::]:80 default_server;
         server_name  localhost;
-        
+
         location ~* .(jpg|jpeg|png|gif|ico|css|js)$ {
             expires 365d;
         }
index 318453b54d7dbd752b7e53d195cbc58e782dfc13..db33e554cef4f2067de348cabe9fe0124a04f1c9 100644 (file)
@@ -20,7 +20,7 @@ http {
 
     sendfile on;
     keepalive_timeout 0;
-    
+
     client_body_buffer_size 10K;
     client_header_buffer_size 1k;
     client_max_body_size 1G;
@@ -31,9 +31,10 @@ http {
     gzip_vary on;
     gzip_comp_level 1;
     gzip_proxied any;
-    
+    gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript image/svg+xml;
+
     root /www;
-    
+
     server {
         listen 80 default_server;
         listen [::]:80 default_server;
@@ -45,7 +46,7 @@ http {
         listen 443 ssl default_server;
         listen [::]:443 ssl default_server;
         server_name  localhost;
-        
+
         ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
         ssl_prefer_server_ciphers on;
         ssl_ciphers "EECDH+ECDSA+AESGCM:EECDH+aRSA+AESGCM:EECDH+ECDSA+SHA384:EECDH+ECDSA+SHA256:EECDH+aRSA+SHA384:EECDH+aRSA+SHA256:EECDH:DHE+AESGCM:DHE:!RSA!aNULL:!eNULL:!LOW:!RC4:!3DES:!MD5:!EXP:!PSK:!SRP:!DSS:!CAMELLIA:!SEED";
@@ -53,7 +54,7 @@ http {
 
         ssl_certificate /etc/nginx/nginx.cer;
         ssl_certificate_key /etc/nginx/nginx.key;
-        
+
         location ~* .(jpg|jpeg|png|gif|ico|css|js)$ {
             expires 365d;
         }
index 48773f4eae1a3d05a057b430979220f22774baa9..94fd4910f65e841abfdfef6986e22da00ea483f9 100644 (file)
@@ -19,6 +19,7 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSI
 PKG_MAINTAINER:=
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:ngircd:ngircd
 
 PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
index c20998e220feee63d6d108731154e96545bc116d..a13c4aae42a52b5a1800bf451221ef3b84bc89bf 100644 (file)
@@ -1,13 +1,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=nlbwmon
-PKG_RELEASE:=2
+PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/jow-/nlbwmon.git
-PKG_SOURCE_DATE:=2017-12-05
-PKG_SOURCE_VERSION:=75accd647459a8a4167f9baa402d116cad41caa9
-PKG_MIRROR_HASH:=821572fdd11bba4a62ecea0b0ddee24645d2ceccdfe7a83dfe5f5edea433ef02
+PKG_SOURCE_DATE:=2019-06-06
+PKG_SOURCE_VERSION:=4574e6e80e3a5ab8de65886baa0d563dfee589ff
+PKG_MIRROR_HASH:=559a8b04e8942c83e31a6a5e2576a5308fdc16349ed29e0b2d9fc182d715976d
 
 CMAKE_INSTALL:=1
 
index cf921f0ab41cd8bbe3b60ad6bae7a80a36146252..e8efdbeb8829330a173856b389b57e0aa6683999 100644 (file)
@@ -22,6 +22,7 @@ PKG_SOURCE_URL:=https://nmap.org/dist/
 PKG_HASH:=847b068955f792f4cc247593aca6dc3dc4aae12976169873247488de147a6e18
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:nmap:nmap
 
 PKG_INSTALL:=1
 
index cdd0e313db9c95db585090d06c91bb419f391808..1cfec48b9add5782560823d407ff478264cc2f51 100644 (file)
@@ -9,18 +9,20 @@ include $(TOPDIR)/rules.mk
 
 # Name and release number of this package
 PKG_NAME:=noddos
-PKG_RELEASE:=3
-PKG_LICENSE:=GPLv3
-PKG_MAINTAINER:=Steven Hessing <steven.hessing@gmail.com>
+PKG_VERSION:=0.5.5
+PKG_RELEASE:=4
 
-PKG_SOURCE_VERSION:=0.5.5
-PKG_SOURCE_URL:=https://github.com/noddos/noddos/releases/download/v$(PKG_SOURCE_VERSION)/
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.xz
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE_URL:=https://github.com/noddos/noddos/releases/download/v$(PKG_VERSION)/
 PKG_HASH:=1f5be0c1015b0407036eecc8449d60d2abcacec442bba55db85fc32e89f754db
 
-PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)-$(PKG_SOURCE_VERSION)
+PKG_MAINTAINER:=Steven Hessing <steven.hessing@gmail.com>
+PKG_LICENSE:=GPL-3.0-or-later
+PKG_LICENSE_FILES:=LICENSE.md
 
+PKG_BUILD_PARALLEL:=1
 CMAKE_INSTALL:=1
+
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/cmake.mk
 
@@ -29,7 +31,7 @@ define Package/noddos
        CATEGORY:=Network
        TITLE:=noddos -- device-aware cloud-powered firewall
        URL:=https://www.noddos.io/
-       DEPENDS:=+libstdcpp +libnetfilter-conntrack +libcurl +libopenssl +openssl-util +ca-bundle +ca-certificates +wget +bzip2 +libtins +ipset +libpthread +libyaml-cpp
+       DEPENDS:=+libstdcpp +libnetfilter-conntrack +libcurl +libopenssl +openssl-util +ca-bundle +wget +bzip2 +libtins +ipset +libpthread +libyaml-cpp
 endef
 
 define Package/noddos/description
diff --git a/net/noddos/patches/040-openssl-deprecated.patch b/net/noddos/patches/040-openssl-deprecated.patch
new file mode 100644 (file)
index 0000000..915f623
--- /dev/null
@@ -0,0 +1,14 @@
+--- a/src/opensslfingerprint.cxx
++++ b/src/opensslfingerprint.cxx
+@@ -73,9 +73,11 @@ std::string getCertFingerprint(const std::string certfile, const bool Debug = fa
+       // closes file
+       close(fd);
++#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER)
+       // initialize OpenSSL
+       SSL_load_error_strings();
+       SSL_library_init();
++#endif
+       // creates BIO buffer
+       BIO * bio = BIO_new_mem_buf(buff, len);
index 334ba8726c12b6d8a226908031945bdc68bf75e5..b6fb9f64481d09ebf79d96f4c466c3ccdf4ec475 100644 (file)
@@ -8,27 +8,26 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=nsd
-PKG_VERSION:=4.1.13
+PKG_VERSION:=4.2.1
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://www.nlnetlabs.nl/downloads/nsd
-PKG_HASH:=c45cd4ba2101a027e133b2be44db9378e27602e05f09a5ef25019e1ae45291af
-PKG_FIXUP:=autoreconf
-PKG_INSTALL:=1
-
-PKG_LICENSE:=BSD-3c
-PKG_LICENSE_FILES:=LICENSE
+PKG_SOURCE_URL:=https://www.nlnetlabs.nl/downloads/nsd
+PKG_HASH:=d17c0ea3968cb0eb2be79f2f83eb299b7bfcc554b784007616eed6ece828871f
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
 
 PKG_MAINTAINER:=Vasilis Tsiligiannis <acinonyx@openwrt.gr>
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=LICENSE
 
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
 define Package/nsd/default
   TITLE:=NSD Name Server Daemon
-  URL:=http://www.nlnetlabs.nl/projects/nsd/
+  URL:=https://www.nlnetlabs.nl/projects/nsd/
   SECTION:=net
   CATEGORY:=Network
   SUBMENU:=IP Addresses and Names
@@ -85,22 +84,22 @@ define Package/nsd-control-setup/description
 endef
 
 CONFIGURE_ARGS+= \
+       --enable-packed \
+       --enable-recvmmsg \
+       --enable-tcp-fastopen \
        --disable-checking \
-       --with-libevent=no \
        --with-user="network" \
+       --without-libevent \
+       $(if $(CONFIG_IPV6),--with,--without)-ipv6
 
 CONFIGURE_VARS+= \
        ac_cv_c_va_list_def=no \
-       ac_cv_c_strptime_needs_defs=no \
+       ac_cv_c_strptime_needs_defs=no
 
 ifeq ($(BUILD_VARIANT),ssl)
-       CONFIGURE_ARGS += \
-               --with-ssl="$(STAGING_DIR)/usr"
-endif
-
-ifeq ($(BUILD_VARIANT),nossl)
-       CONFIGURE_ARGS += \
-               --without-ssl
+       CONFIGURE_ARGS += --with-ssl="$(STAGING_DIR)/usr"
+else
+       CONFIGURE_ARGS += --without-ssl
 endif
 
 define Package/nsd/conffiles
diff --git a/net/nsd/patches/010-musl.patch b/net/nsd/patches/010-musl.patch
new file mode 100644 (file)
index 0000000..3ba61e4
--- /dev/null
@@ -0,0 +1,10 @@
+--- a/nsd-control.c
++++ b/nsd-control.c
+@@ -42,6 +42,7 @@
+  */
+ #include "config.h"
++#include <stdio.h>
+ #ifdef HAVE_SSL
+ #include <sys/types.h>
diff --git a/net/nsd/patches/020-openssl.patch b/net/nsd/patches/020-openssl.patch
new file mode 100644 (file)
index 0000000..31381ff
--- /dev/null
@@ -0,0 +1,13 @@
+--- a/tsig.c
++++ b/tsig.c
+@@ -19,6 +19,10 @@
+ #include "query.h"
+ #include "rbtree.h"
++#ifndef HAVE_SSL
++#define CRYPTO_memcmp memcmp
++#endif
++
+ static region_type *tsig_region;
+ struct tsig_key_table
index e98924a7ae8387c8e7e067be20b52e5d1246baa0..d1f7d5d7bda488a29f22f26410a926e89c423751 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ntp
 PKG_VERSION:=4.2.8p13
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/
index 2f332104d2437c5ec442a32e4dce228bee0d43a3..30460e5ae3b14905bdbf56c40f8f1940413ead7c 100644 (file)
@@ -3,7 +3,9 @@
 
 START=60
 
-STEP_SERVERS="0.openwrt.pool.ntp.org 1.openwrt.pool.ntp.org 2.openwrt.pool.ntp.org"
+DEFAULT_SERVERS="0.openwrt.pool.ntp.org 1.openwrt.pool.ntp.org 2.openwrt.pool.ntp.org"
+CFG_SERVERS=$(uci -q get system.ntp.server)
+STEP_SERVERS=${CFG_SERVERS:-$DEFAULT_SERVERS}
 TIMEOUT="2" # in seconds
 
 start() {
index 12b07c5d06f674c9717db5a02eb6bb7f1e07534c..872a5c69dff19283031cba80e14f723c19f1df20 100644 (file)
@@ -10,13 +10,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ntripcaster
 PKG_VERSION:=0.1.5
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/nunojpg/ntripcaster/tar.gz/v$(PKG_VERSION)?
 PKG_HASH:=2184af9821cf73bac1df229f1e61ca1d3e288c9de6087bee1ae218b54c588452
 
-PKG_LICENSE:=GPL-2.0+
+PKG_LICENSE:=GPL-2.0-or-later
 
 PKG_MAINTAINER:=Nuno Goncalves <nunojpg@gmail.com>
 
index 09199516e00bcf9dc2b8ad21c3be4694ca12886a..0c33b1f0e0c91f27b840ce6a7de4e0ac2da4ebab 100644 (file)
@@ -10,13 +10,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ntripclient
 PKG_VERSION:=1.51
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/nunojpg/ntripclient/tar.gz/v$(PKG_VERSION)?
 PKG_HASH:=d668e87b2260ef262e2066ac0ed217ec77478170deaf76ff48f2116a23c48ae5
 
-PKG_LICENSE:=GPL-2.0+
+PKG_LICENSE:=GPL-2.0-or-later
 
 PKG_MAINTAINER:=Nuno Goncalves <nunojpg@gmail.com>
 
index d4b34d4d15f4dbd87911c94ad17d52a5cd51a240..d964977b9f8f54558149e800426f3504a6d005ac 100644 (file)
@@ -10,13 +10,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ntripserver
 PKG_VERSION:=1.51
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/nunojpg/ntripserver/tar.gz/v$(PKG_VERSION)?
 PKG_HASH:=3878c13d1b56e14085ce995565a2113aa592e3aa0b0eacfc65b6e3f5bdfc07e7
 
-PKG_LICENSE:=GPL-2.0+
+PKG_LICENSE:=GPL-2.0-or-later
 
 PKG_MAINTAINER:=Nuno Goncalves <nunojpg@gmail.com>
 
index 9f84ed26e626f85932f92a3138ae95df0c3390de..614a3dae9d0d61c357db17bfca29ab3a7dc5fbfa 100644 (file)
@@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=nut
 PKG_VERSION:=2.7.4
-PKG_RELEASE:=16
+PKG_RELEASE:=18
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.networkupstools.org/source/2.7/
 PKG_HASH:=980e82918c52d364605c0703a5dcf01f74ad2ef06e3d365949e43b7d406d25a7
 PKG_MAINTAINER:=Daniel Dickinson <cshored@thecshore.com>
-PKG_LICENSE:=GPL-2.0+ GPL-3.0+ GPL-1.0+ Artistic-1.0-Perl
+PKG_LICENSE:=GPL-2.0-or-later GPL-3.0-or-later GPL-1.0-or-later Artistic-1.0-Perl
 PKG_LICENSE_FILES:=LICENSE-GPL2 LICENSE-GPL3 COPYING
 PKG_FIXUP:=autoreconf
 
diff --git a/net/nut/patches/010-libgd-pkgconfig.patch b/net/nut/patches/010-libgd-pkgconfig.patch
new file mode 100644 (file)
index 0000000..bb87090
--- /dev/null
@@ -0,0 +1,79 @@
+--- a/m4/nut_check_libgd.m4
++++ b/m4/nut_check_libgd.m4
+@@ -9,37 +9,27 @@ if test -z "${nut_have_libgd_seen}"; then
+       nut_have_libgd_seen=yes
+       CFLAGS_ORIG="${CFLAGS}"
+-      LDFLAGS_ORIG="${LDFLAGS}"
+       LIBS_ORIG="${LIBS}"
+-      dnl Initial defaults. These are only used if gdlib-config is
+-      dnl unusable and the user fails to pass better values in --with
+-      dnl arguments
+-      CFLAGS=""
+-      LDFLAGS="-L/usr/X11R6/lib"
+-      LIBS="-lgd -lpng -lz -ljpeg -lfreetype -lm -lXpm -lX11"
+-
+-      AC_MSG_CHECKING(for gd version via gdlib-config)
+-      GD_VERSION=`gdlib-config --version 2>/dev/null`
+-      if test "$?" != "0" -o -z "${GD_VERSION}"; then
+-              GD_VERSION="none"
++      AC_MSG_CHECKING(for gd version via pkg-config)
++      GD_VERSION=`pkg-config --silence-errors --modversion gdlib 2>/dev/null`
++      if test "$?" != "0" -a -n "${GD_VERSION}"; then
++              CFLAGS"`pkg-config --silence-errors --cflags gdllib 2>/dev/null`"
++              LIBS="`pkg-config --silence-errors --libs gdlib 2>/dev/null`"
++      else
++              AC_MSG_CHECKING(via gdlib-config)
++              GD_VERSION="`gdlib-config --version 2>/dev/null`"
++              if test "$?" = "0" -a -n "${GD_VERSION}"; then
++                      CFLAGS="`gdlib-config --cflags 2>/dev/null`"
++                      LIBS="`gdlib-config --libs 2>/dev/null`"
++              else
++                      GD_VERSION="none"
++                      CFLAGS=""
++                      LIBS="-lgd"
++              fi
+       fi
+       AC_MSG_RESULT(${GD_VERSION} found)
+-      case "${GD_VERSION}" in
+-      none)
+-              ;;
+-      2.0.5 | 2.0.6 | 2.0.7)
+-              AC_MSG_WARN([[gd ${GD_VERSION} detected, unable to use gdlib-config script]])
+-              AC_MSG_WARN([[If gd detection fails, upgrade gd or use --with-gd-includes and --with-gd-libs]])
+-              ;;
+-      *)
+-              CFLAGS="`gdlib-config --includes 2>/dev/null`"
+-              LDFLAGS="`gdlib-config --ldflags 2>/dev/null`"
+-              LIBS="`gdlib-config --libs 2>/dev/null`"
+-              ;;
+-      esac
+-
+       dnl Now allow overriding gd settings if the user knows best
+       AC_MSG_CHECKING(for gd include flags)
+       AC_ARG_WITH(gd-includes,
+@@ -70,7 +60,7 @@ if test -z "${nut_have_libgd_seen}"; then
+                       ;;
+               esac
+       ], [])
+-      AC_MSG_RESULT([${LDFLAGS} ${LIBS}])
++      AC_MSG_RESULT([${LIBS}])
+       dnl check if gd is usable
+       AC_CHECK_HEADERS(gd.h gdfontmb.h, [nut_have_libgd=yes], [nut_have_libgd=no], [AC_INCLUDES_DEFAULT])
+@@ -79,12 +69,11 @@ if test -z "${nut_have_libgd_seen}"; then
+       if test "${nut_have_libgd}" = "yes"; then
+               AC_DEFINE(HAVE_LIBGD, 1, [Define if you have Boutell's libgd installed])
+               LIBGD_CFLAGS="${CFLAGS}"
+-              LIBGD_LDFLAGS="${LDFLAGS} ${LIBS}"
++              LIBGD_LDFLAGS="${LIBS}"
+       fi
+       dnl put back the original versions
+       CFLAGS="${CFLAGS_ORIG}"
+-      LDFLAGS="${LDFLAGS_ORIG}"
+       LIBS="${LIBS_ORIG}"
+ fi
+ ])
index d5796618e00af4abfd3bf7797e0a2e3b9b7385b5..37cf0fee47f16b8519290ac04971e0fde9b9e5c4 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=obfs4proxy
-PKG_VERSION:=0.0.10
+PKG_VERSION:=0.0.11
 PKG_RELEASE:=1
 
 PKG_SOURCE:=obfs4-$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://gitlab.com/yawning/obfs4/-/archive/$(PKG_NAME)-$(PKG_VERSION)/
-PKG_HASH:=0de856a33502005661f0491dc695dcaa1a7eb3f6cafbe689b99301a0d6762639
+PKG_HASH:=b0964479300a3ea899a4354fdeb5196e52544554f8edf6190142cddd1072526c
 PKG_BUILD_DIR:=$(BUILD_DIR)/obfs4-$(PKG_NAME)-$(PKG_VERSION)
 
 PKG_LICENSE:=BSD-2-Clause
index dbffd3aeffeee48ace39f08deb6d5d6555284845..6729d0a72e6b8d8eaefbb1f2d97d1acd27fe72ff 100644 (file)
@@ -8,16 +8,16 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ocserv
-PKG_VERSION:=0.12.3
-PKG_RELEASE:=1
+PKG_VERSION:=0.12.4
+PKG_RELEASE:=2
 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:=42f8f459dae6f88862d4098997d8f5668d97439ec78beede3985f6ff24d91edd
+PKG_HASH:=05c01effa8a7c2f022616fcb62bade4df51aa7f0035248671da12819d62cb185
 
-PKG_LICENSE:=GPLv2+
+PKG_LICENSE:=GPL-2.0-or-later
 PKG_LICENSE_FILES:=COPYING
 #PKG_FIXUP:=autoreconf
 
index a76ea79a9326744b6a809ea554040deacafe4cfc..7081f3c47ba09eaa4e5348890e276be48b7ca075 100644 (file)
@@ -10,16 +10,17 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ola
 PKG_VERSION:=0.10.7
-PKG_RELEASE:=3
+PKG_RELEASE:=5
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/OpenLightingProject/ola/tar.gz/$(PKG_VERSION)?
 PKG_HASH:=95b5e99775f700a9cdf6e2219eccfc8c037fa8841f87cb00344359c4b8c7bf26
 
-PKG_LICENSE:=LGPL-2.1+
-
-PKG_FIXUP:=libtool
+PKG_MAINTAINER:=Christian Beier <dontmind@freeshell.org>
+PKG_LICENSE:=LGPL-2.1-or-later
+PKG_LICENSE_FILES:=COPYING
 
+PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
 PKG_BUILD_PARALLEL:=1
 PKG_USE_MIPS16:=0
@@ -35,7 +36,6 @@ define Package/ola
   CATEGORY:=Network
   TITLE:=Open Lighting Architecture Daemon
   URL:=https://www.openlighting.org/
-  MAINTAINER:=Christian Beier <dontmind@freeshell.org>
   DEPENDS:=+protobuf +libftdi1 +libusb-1.0 +libuuid +libstdcpp +libpthread +librt +zlib +libncurses +liblo +libmicrohttpd
 endef
 
@@ -51,7 +51,7 @@ CONFIGURE_ARGS += \
        --disable-fatal-warnings \
        --disable-unittests \
        --without-dns-sd \
-       --with-ola-protoc-plugin=$(STAGING_DIR_HOSTPKG)/bin/ola_protoc_plugin
+       --with-ola-protoc-plugin="$(STAGING_DIR_HOSTPKG)/bin/ola_protoc_plugin"
 
 HOST_CONFIGURE_ARGS += \
        --disable-all-plugins \
@@ -65,6 +65,8 @@ HOST_CONFIGURE_ARGS += \
        --disable-doxygen-html \
        --disable-doxygen-doc
 
+HOST_LDFLAGS += -Wl,-rpath="$(STAGING_DIR_HOSTPKG)/lib"
+
 # only build the ola_protoc thingy
 define Host/Compile
        cd $(HOST_BUILD_DIR); \
index d75d2af019ad861ad974d261e64755d5cdffef5a..0d90c2b7757597c0c697934a6e9bb32ae04ec59e 100644 (file)
@@ -8,19 +8,22 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=openconnect
-PKG_VERSION:=8.03
-PKG_RELEASE:=1
-PKG_USE_MIPS16:=0
+PKG_VERSION:=8.04
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=ftp://ftp.infradead.org/pub/openconnect/
-PKG_HASH:=908cff9b1ce266b6bb7f969a7f62723543ab94719ba3c95a150fe3894cbc9ef2
-PKG_LICENSE:=LGPLv2.1+
+PKG_HASH:=98979c6e3f78b294dc663e3fd75d5c9e9d779f247be9d4e3ab84b5e90565f81f
+
+PKG_LICENSE:=LGPL-2.1-or-later
+PKG_LICENSE_FILES:=COPYING.LGPL
+PKG_CPE_ID:=cpe:/a:infradead:openconnect
 
 PKG_CONFIG_DEPENDS:= \
        CONFIG_OPENCONNECT_GNUTLS \
        CONFIG_OPENCONNECT_OPENSSL \
 
+PKG_USE_MIPS16:=0
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -34,7 +37,7 @@ define Package/openconnect
   DEPENDS:=+libxml2 +kmod-tun +resolveip +vpnc-scripts +OPENCONNECT_OPENSSL:libopenssl +OPENCONNECT_OPENSSL:p11-kit +OPENCONNECT_OPENSSL:libp11 +OPENCONNECT_GNUTLS:libgnutls +OPENCONNECT_GNUTLS:libtasn1 +OPENCONNECT_STOKEN:libstoken
   TITLE:=OpenConnect VPN client (Cisco AnyConnect and Juniper/Pulse compatible)
   MAINTAINER:=Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
-  URL:=http://www.infradead.org/openconnect/
+  URL:=https://www.infradead.org/openconnect/
   SUBMENU:=VPN
 endef
 
index 019058ce505e3f304cd4d4399d9285eb1e474916..29c807490790992672623b13957fa89de6e27e68 100644 (file)
@@ -33,6 +33,9 @@ config interface 'MYVPN'
        # Juniper vpn support
        #option juniper '1'
 
+       # Authentication form responses
+       #list form_entry FORM:OPT=VAL
+
 The additional files are also used:
 /etc/openconnect/user-cert-vpn-MYVPN.pem: The user certificate
 /etc/openconnect/user-key-vpn-MYVPN.pem: The user private key
index dc1d42b80fc0993713bc4024d0296cff60279c4f..15bd3b5a5c504d583d64dbdc6ee12924b9e3bbd3 100755 (executable)
@@ -19,14 +19,19 @@ proto_openconnect_init_config() {
        proto_config_add_string "token_script"
        proto_config_add_string "os"
        proto_config_add_string "csd_wrapper"
+       proto_config_add_array 'form_entry:regex("[^:]+:[^=]+=.*")'
        no_device=1
        available=1
 }
 
+proto_openconnect_add_form_entry() {
+       [ -n "$1" ] && append cmdline "--form-entry $1"
+}
+
 proto_openconnect_setup() {
        local config="$1"
 
-       json_get_vars server port interface username serverhash authgroup password password2 token_mode token_secret token_script os csd_wrapper mtu juniper
+       json_get_vars server port interface username serverhash authgroup password password2 token_mode token_secret token_script os csd_wrapper mtu juniper form_entry
 
        grep -q tun /proc/modules || insmod tun
        ifname="vpn-$config"
@@ -88,6 +93,8 @@ proto_openconnect_setup() {
        [ -n "$os" ] && append cmdline "--os=$os"
        [ -n "$csd_wrapper" ] && [ -x "$csd_wrapper" ] && append cmdline "--csd-wrapper=$csd_wrapper"
 
+       json_for_each_item proto_openconnect_add_form_entry form_entry
+
        proto_export INTERFACE="$config"
        logger -t openconnect "executing 'openconnect $cmdline'"
 
diff --git a/net/openconnect/patches/0001-Fix-compilation-with-libp11-version-0.4.7.patch b/net/openconnect/patches/0001-Fix-compilation-with-libp11-version-0.4.7.patch
deleted file mode 100644 (file)
index c6e139a..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-From 03ecd34e0137b3f0bf0d2fc3ab7f7d8b3682785e Mon Sep 17 00:00:00 2001
-From: Yousong Zhou <yszhou4tech@gmail.com>
-Date: Thu, 14 Dec 2017 18:03:35 +0800
-Subject: [PATCH] Fix compilation with libp11 version >= 0.4.7
-
-libp11 0.4.7 renamed then dropped macro definition in commits
-
- 4f0fce4: Error reporting fixes
- e4c641b: PKCS11 errors separated into P11 and CKR
-
-This change assumes that libp11 will restore compatibility by bringing
-back old forms of macro definition
-
-Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
----
- openssl-pkcs11.c | 18 ++++++++++++++++++
- 1 file changed, 18 insertions(+)
-
-diff --git a/openssl-pkcs11.c b/openssl-pkcs11.c
-index 61da123..ba7e491 100644
---- a/openssl-pkcs11.c
-+++ b/openssl-pkcs11.c
-@@ -30,6 +30,24 @@
- #include <libp11.h>
- #include <p11-kit/pkcs11.h>
-+#ifndef ERR_LIB_PKCS11
-+#     if defined(ERR_LIB_CKR)
-+#             define ERR_LIB_PKCS11 ERR_LIB_CKR
-+#     elif defined(ERR_LIB_USER)
-+#             define ERR_LIB_PKCS11 ERR_LIB_USER
-+#     else
-+#             error undefined macro ERR_LIB_PKCS11
-+#     endif
-+#endif
-+
-+#ifndef PKCS11_F_PKCS11_LOGIN
-+#     if defined(CKR_F_PKCS11_LOGIN)
-+#             define PKCS11_F_PKCS11_LOGIN CKR_F_PKCS11_LOGIN
-+#     else
-+#             error undefined macro PKCS11_F_PKCS11_LOGIN
-+#     endif
-+#endif
-+
- static PKCS11_CTX *pkcs11_ctx(struct openconnect_info *vpninfo)
- {
-       PKCS11_CTX *ctx;
--- 
-1.8.3.1
-
diff --git a/net/openfortivpn/Makefile b/net/openfortivpn/Makefile
new file mode 100644 (file)
index 0000000..aca8b7a
--- /dev/null
@@ -0,0 +1,66 @@
+#
+# Copyright (C) 2019 - Lucian Cristian <lucian.cristian@gmail.com>
+#
+# This is free software, licensed under the GNU General Public License v3.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=openfortivpn
+PKG_VERSION:=1.10.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/adrienverge/openfortivpn/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=d6ea0c84c0cf811530073fa19865334bb42ab10a780157fe95c4efb3476ad58d
+
+PKG_MAINTAINER:=Lucian Cristian <lucian.cristian@gmail.com>
+PKG_LICENSE:=GPL-3.0-or-later OpenSSL
+PKG_LICENSE_FILES:=LICENSE LICENSE.OpenSSL
+
+PKG_BUILD_PARALLEL:=1
+PKG_INSTALL:=1
+
+PKG_FIXUP:=autoreconf
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/openfortivpn
+  SUBMENU:=VPN
+  SECTION:=net
+  CATEGORY:=Network
+  TITLE:=Fortinet SSL VPN client
+  URL:=https://github.com/adrienverge/openfortivpn
+  DEPENDS:=+ppp +libopenssl
+endef
+
+define Package/openfortivpn/description
+  An open implementation of Fortinet's proprietary PPP+SSL VPN solution
+  It spawns a pppd process and operates the communication between the gateway and this process.
+  It is compatible with Fortinet VPNs.
+endef
+
+CONFIGURE_ARGS += \
+       --enable-proc \
+       --with-rt_dst="yes" \
+       --with-pppd="/usr/sbin/pppd"
+
+TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
+
+define Package/openfortivpn/conffiles
+/etc/config/openfortivpn
+endef
+
+define Package/openfortivpn/install
+       $(INSTALL_DIR) \
+         $(1)/usr/sbin \
+         $(1)/etc/config \
+         $(1)/etc/init.d
+
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/openfortivpn $(1)/usr/sbin/
+       $(INSTALL_DATA) ./files/openfortivpn.config $(1)/etc/config/openfortivpn
+       $(INSTALL_BIN) ./files/openfortivpn.init $(1)/etc/init.d/openfortivpn
+endef
+
+$(eval $(call BuildPackage,openfortivpn))
diff --git a/net/openfortivpn/files/openfortivpn.config b/net/openfortivpn/files/openfortivpn.config
new file mode 100644 (file)
index 0000000..108e3eb
--- /dev/null
@@ -0,0 +1,12 @@
+config service 'openfortivpn'
+    option 'enabled' '0'
+    option 'host' 'vpn-gateway'
+    option 'port' '10443'
+    option 'set_routes' '0'
+    option 'set_dns' '0'
+    option 'pppd_use_peerdns' '0'
+    option 'username' 'foo'
+    option 'password' 'bar'
+config 'certs'
+# example X509 certificate sha256 sum, trust only defined one(s)!
+    option 'trusted_cert' 'e46d4aff08ba6914e64daa85bc6112a422fa7ce16631bff0b592a28556f993db'
diff --git a/net/openfortivpn/files/openfortivpn.init b/net/openfortivpn/files/openfortivpn.init
new file mode 100644 (file)
index 0000000..e9fdc20
--- /dev/null
@@ -0,0 +1,75 @@
+#!/bin/sh /etc/rc.common
+
+START=99
+USE_PROCD=1
+BIN=/usr/sbin/openfortivpn
+CONFIG=/var/etc/openfortivpn.config
+
+
+validate_certs_section() {
+       uci_load_validate openfortivpn certs "$1" "$2" \
+               'trusted_cert:string'
+}
+
+validate_openfortivpn_section() {
+       uci_load_validate openfortivpn service "$1" "$2" \
+               'enabled:uinteger' \
+               'host:string' \
+               'port:uinteger' \
+               'username:string' \
+               'password:string' \
+               'set_routes:uinteger' \
+               'set_dns:uinteger' \
+               'pppd_use_peerdns:uinteger'
+}
+
+setup_certs() {
+       [ "$2" = 0 ] || {
+               echo "validation failed"
+               return 1
+       }
+
+       [ -n "$trusted_cert" ] || return 0
+       echo "trusted-cert = $trusted_cert" >> $CONFIG
+}
+
+setup_config() {
+       [ "$2" = 0 ] || {
+               echo "validation failed"
+               return 1
+       }
+
+       [ "$enabled" -eq 0 ] && return 1
+
+       mkdir -p /var/etc
+       echo '# auto-generated config file from /etc/config/openfortivpn' > $CONFIG
+
+       [ -n "$host" ] && echo "host =  $host" >> $CONFIG
+       [ -n "$port" ] && echo "port =  $port" >> $CONFIG
+       [ -n "$username" ] && echo "username =  $username" >> $CONFIG
+       [ -n "$password" ] && echo "password =  $password" >> $CONFIG
+       [ -n "$set_routes" ] && echo "set-routes = $set_routes" >> $CONFIG
+       [ -n "$set_dns" ] && echo "set-dns = $set_dns" >> $CONFIG
+       [ -n "$pppd_use_peerdns" ] && echo "pppd-use-peerdns = $pppd_use_peerdns" >> $CONFIG
+       return 0
+}
+
+start_service() {
+       config_load openfortivpn
+       validate_openfortivpn_section openfortivpn setup_config || return
+       config_foreach validate_certs_section certs setup_certs
+
+       procd_open_instance
+       procd_set_param stderr 1
+       procd_set_param command $BIN -c $CONFIG --use-syslog
+       procd_close_instance
+}
+
+service_triggers () {
+       procd_add_reload_trigger "openfortivpn"
+
+       procd_open_validate
+       validate_openfortivpn_section
+       validate_certs_section
+       procd_close_validate
+}
diff --git a/net/opennhrp/Makefile b/net/opennhrp/Makefile
deleted file mode 100644 (file)
index b6d611c..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-#
-# Copyright (C) 2009-2015 OpenWrt.org
-# Copyright (C) 2009 Jakob Pfeiffer
-# Copyright (C) 2014 Artem Makhutov
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=opennhrp
-PKG_VERSION:=0.14.1
-PKG_RELEASE:=2
-PKG_MAINTAINER:=Artem Makhutov <artem@makhutov.org>
-PKG_LICENSE:=MIT License
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=@SF/opennhrp
-PKG_HASH:=1517d53d688ffc165a1da20c344d96b4c53e60f34bd73c64e60cb67cfca4e9ab
-
-PKG_FIXUP:=autoreconf
-PKG_BUILD_PARALLEL:=1
-PKG_INSTALL:=1
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/opennhrp
-  SECTION:=net
-  CATEGORY:=Network
-  SUBMENU:=VPN
-  DEPENDS:=+libcares +ipsec-tools +ip +kmod-gre
-  KCONFIG:=CONFIG_ARPD=y
-  TITLE:=NBMA Next Hop Resolution Protocol
-  URL:=http://opennhrp.sourceforge.net/
-endef
-
-define Package/opennhrp/description
-  OpenNHRP implements NBMA Next Hop Resolution Protocol (as defined in RFC 2332).
-  It makes it possible to create dynamic multipoint VPN Linux router using NHRP,
-  GRE and IPsec. It aims to be Cisco DMVPN compatible.
-endef
-
-define Package/opennhrp/conffiles
-/etc/opennhrp/opennhrp.conf
-endef
-
-define Package/opennhrp/install
-       $(INSTALL_DIR) $(1)/usr/sbin
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/opennhrp{,ctl} $(1)/usr/sbin/
-       $(INSTALL_DIR) $(1)/etc/opennhrp
-       $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/opennhrp/opennhrp.conf $(1)/etc/opennhrp/
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/etc/opennhrp/opennhrp-script $(1)/etc/opennhrp/
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/etc/opennhrp/racoon-ph1down.sh $(1)/etc/opennhrp/
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/etc/opennhrp/racoon-ph1dead.sh $(1)/etc/opennhrp/
-       $(INSTALL_DIR) $(1)/etc/init.d
-       $(INSTALL_BIN) ./files/opennhrp.init $(1)/etc/init.d/opennhrp
-endef
-
-$(eval $(call BuildPackage,opennhrp))
diff --git a/net/opennhrp/files/opennhrp.init b/net/opennhrp/files/opennhrp.init
deleted file mode 100644 (file)
index 8831287..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/sh /etc/rc.common
-# Copyright (C) 2009-2011 OpenWrt.org
-# Copyright (C) 2009 Jakob Pfeiffer
-
-START=50
-
-SERVICE_USE_PID=1
-
-start() {
-       service_start /usr/sbin/opennhrp -d
-}
-
-stop() {
-       service_stop /usr/sbin/opennhrp
-}
diff --git a/net/opennhrp/patches/100-musl-compat.patch b/net/opennhrp/patches/100-musl-compat.patch
deleted file mode 100644 (file)
index 8be0f71..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
---- a/nhrp/opennhrp.c
-+++ b/nhrp/opennhrp.c
-@@ -9,6 +9,7 @@
- #include <ctype.h>
- #include <stdio.h>
- #include <errno.h>
-+#include <fcntl.h>
- #include <malloc.h>
- #include <stddef.h>
- #include <string.h>
---- a/nhrp/nhrp_common.h
-+++ b/nhrp/nhrp_common.h
-@@ -12,6 +12,7 @@
- #include <stdint.h>
- #include <stdlib.h>
- #include <sys/time.h>
-+#include <sys/types.h>
- #include <linux/if_ether.h>
- struct nhrp_interface;
index 04b2d0e9e79d0bc86508c8bba34bae4aeb77c4d7..094b13d387592048ca4430ce22fb9963c1ea6ccf 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=openssh
 PKG_VERSION:=8.0p1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/ \
@@ -19,7 +19,7 @@ PKG_HASH:=bd943879e69498e8031eb6b7f44d08cdc37d59a7ab689aa0b437320c3481fd68
 
 PKG_LICENSE:=BSD ISC
 PKG_LICENSE_FILES:=LICENCE
-
+PKG_CPE_ID:=cpe:/a:openssh:openssh
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
 PKG_REMOVE_FILES:=
diff --git a/net/openssh/patches/010-musl-stdio.patch b/net/openssh/patches/010-musl-stdio.patch
new file mode 100644 (file)
index 0000000..282f963
--- /dev/null
@@ -0,0 +1,22 @@
+From 73eb6cef41daba0359c1888e4756108d41b4e819 Mon Sep 17 00:00:00 2001
+From: Darren Tucker <dtucker@dtucker.net>
+Date: Sun, 16 Jun 2019 12:55:27 +1000
+Subject: [PATCH] Include stdio.h for vsnprintf.
+
+Patch from mforney at mforney.org.
+---
+ openbsd-compat/setproctitle.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/openbsd-compat/setproctitle.c b/openbsd-compat/setproctitle.c
+index dbd1a95a0..e4064323a 100644
+--- a/openbsd-compat/setproctitle.c
++++ b/openbsd-compat/setproctitle.c
+@@ -36,6 +36,7 @@
+ #ifndef HAVE_SETPROCTITLE
+ #include <stdarg.h>
++#include <stdio.h>
+ #include <stdlib.h>
+ #include <unistd.h>
+ #ifdef HAVE_SYS_PSTAT_H
index 57942fe42b2c10ac90464c3709779912563eb42b..819e0a34d62a4a1ff0e682ffedd9d415d977c2a0 100644 (file)
@@ -15,14 +15,15 @@ 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.11.0
-PKG_RELEASE:=3
+PKG_VERSION:=2.12.0
+PKG_RELEASE:=1
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://www.openvswitch.org/releases/
-PKG_HASH:=f4b01d7376d7298bc6e7fa7a6067229ca7c7e299394e5ea9aff651d52edfdbee
+PKG_HASH:=13fd42703180b4b1146c7e97926d09225485868cc2fbbd58dc0c421b4b8fe8f8
 
 PKG_LICENSE:=Apache-2.0
 PKG_LICENSE_FILES:=LICENSE
+PKG_CPE_ID:=cpe:/a:openvswitch:openvswitch
 
 PKG_BUILD_DEPENDS+=python3/host python-six/host
 PKG_USE_MIPS16:=0
@@ -40,7 +41,7 @@ include ../../lang/python/python3-package.mk
 
 ovs_kmod_packages:=
 ovs_kmod_intree_kernel_patchver_min:=3.10
-ovs_kmod_intree_kernel_patchver_max:=4.18
+ovs_kmod_intree_kernel_patchver_max:=5.0
 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
@@ -49,12 +50,13 @@ ovs_kmod_is_intree=$(filter %-intree,$(1))
 ovs_kmod_upstream_name=kmod-$(call ovs_kmod_package_name,$(patsubst %-intree,%,$(1)))
 ovs_kmod_package_provides=$(call ovs_kmod_upstream_name,$(1))
 define OvsKmodPackageTemplate
+ifeq ($(if $(call ovs_kmod_is_intree,$(1)),$(ovs_kmod_intree_not_supported)),)
   define KernelPackage/$(call ovs_kmod_package_name,$(1))
      SECTION:=kernel
      CATEGORY:=Kernel modules
      SUBMENU:=Network Support
      TITLE:=$(ovs_kmod_$(1)_title)
-     DEPENDS:=$(ovs_kmod_$(1)_depends) $(if $(call ovs_kmod_is_intree,$(1)),@DEVEL $(if $(ovs_kmod_intree_not_supported),@BROKEN))
+     DEPENDS:=$(ovs_kmod_$(1)_depends) $(if $(call ovs_kmod_is_intree,$(1)),@DEVEL)
      PROVIDES:=$(call ovs_kmod_package_provides,$(1))
      KCONFIG:=$(ovs_kmod_$(1)_kconfig)
      FILES:=$(ovs_kmod_$(1)_files)
@@ -62,14 +64,20 @@ define OvsKmodPackageTemplate
   endef
 
   ovs_kmod_packages+=$(call ovs_kmod_package_name,$(1))
+endif
 endef
 
 ovs_kmod_openvswitch_title:=Open vSwitch kernel datapath (upstream)
 ovs_kmod_openvswitch_kconfig:=CONFIG_OPENVSWITCH
 ovs_kmod_openvswitch_depends:=\
-         +kmod-lib-crc32c +kmod-mpls \
-         +kmod-nf-nat +IPV6:kmod-nf-nat6 \
-         +kmod-nf-conntrack +IPV6:kmod-nf-conntrack6
+         +kmod-lib-crc32c \
+         +kmod-nf-nat \
+         +IPV6:kmod-nf-nat6 \
+         +kmod-nf-conntrack \
+         +IPV6:kmod-nf-conntrack6 \
+         +(!LINUX_4_9&&!LINUX_4_14):kmod-nsh \
+         +(!LINUX_4_9&&!LINUX_4_14):kmod-ipt-conntrack-extra \
+
 ovs_kmod_openvswitch_files:=$(ovs_kmod_upstream_dir)/openvswitch.ko
 $(eval $(call OvsKmodPackageTemplate,openvswitch))
 
@@ -104,8 +112,20 @@ $(eval $(call OvsKmodPackageTemplate,openvswitch-geneve))
 #    will be pulled in by kmod-gre6.  NOTE that tunnel6.ko itself cannot be
 #    enabled and selected on its own
 #
+#  - kmod-ipt-conntrack-extra: required for nf_conncount.ko
+#
 ovs_kmod_openvswitch-intree_title:=Open vSwitch kernel datapath (in tree)
-ovs_kmod_openvswitch-intree_depends:=$(ovs_kmod_openvswitch_depends) +kmod-gre +IPV6:kmod-gre6
+ovs_kmod_openvswitch-intree_depends:=\
+         +kmod-lib-crc32c \
+         +kmod-nf-nat \
+         +IPV6:kmod-nf-nat6 \
+         +kmod-nf-conntrack \
+         +(IPV6&&(LINUX_4_9||LINUX_4_14)):kmod-nf-conntrack6 \
+         +(LINUX_4_9||LINUX_4_14):kmod-gre \
+         +(IPV6&&(LINUX_4_9||LINUX_4_14)):kmod-gre6 \
+         +(!LINUX_4_9&&!LINUX_4_14):kmod-udptunnel4 \
+         +(!LINUX_4_9&&!LINUX_4_14):kmod-ipt-conntrack-extra \
+
 ovs_kmod_openvswitch-intree_files:= $(ovs_kmod_intree_dir)/openvswitch.ko
 $(eval $(call OvsKmodPackageTemplate,openvswitch-intree))
 
@@ -311,7 +331,11 @@ ovs_intree_kmod_configs:=CONFIG_PACKAGE_kmod-openvswitch-intree
 ovs_intree_kmod_enabled:=$(strip $(foreach c,$(ovs_intree_kmod_configs),$($(c))))
 PKG_CONFIG_DEPENDS+=$(ovs_intree_kmod_configs)
 ifneq ($(ovs_intree_kmod_enabled),)
-  CONFIGURE_ARGS += --with-linux=$(LINUX_DIR)
+  ifeq ($(ovs_kmod_intree_not_supported),)
+    CONFIGURE_ARGS += --with-linux=$(LINUX_DIR)
+  else
+    $(warning XXX: openvswitch: intree kmods selected but not supported)
+  endif
 endif
 
 TARGET_CFLAGS += -flto -std=gnu99
index 33af680592a1c4429e809e6e9d0f7ee12f795ef0..3a293f21a2b91d9531fef0da262de663369d32fa 100644 (file)
@@ -1,7 +1,7 @@
-From bfcee43923a4bb07954f6648bde1abdcbfa5d95f Mon Sep 17 00:00:00 2001
+From d215c18a17e82194d4ab9ecd14776712f12d6b07 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/5] netdev-linux: Let interface flag survive internal port
+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
@@ -18,10 +18,10 @@ Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
  1 file changed, 7 insertions(+), 1 deletion(-)
 
 diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c
-index 25d037cb6..ba1427986 100644
+index 2432cd176..11efbdbc9 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,
+@@ -3161,7 +3161,13 @@ update_flags(struct netdev_linux *netdev, enum netdev_flags off,
      unsigned int old_flags, new_flags;
      int error = 0;
  
index 5cfbecb25235a70c53b619d3ec6c504fd1d131ed..73f40ff314f273569b431ca543cdc45041ae461d 100644 (file)
@@ -1,7 +1,7 @@
-From e881c50ff537d4b34c10227360589f83d90ce373 Mon Sep 17 00:00:00 2001
+From e2d9b5d6fc33d7b9cbb7dc16832c5c86e6470966 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/5] python: separate host/target python for cross-compile
+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.
@@ -26,10 +26,10 @@ index ff1f94b48..417f53230 100644
  ALL_LOCAL =
  BUILT_SOURCES =
 diff --git a/m4/openvswitch.m4 b/m4/openvswitch.m4
-index 41042c98e..4a5f0a84a 100644
+index cd6b51d86..6dc9d630b 100644
 --- a/m4/openvswitch.m4
 +++ b/m4/openvswitch.m4
-@@ -449,7 +449,9 @@ AC_DEFUN([OVS_CHECK_PYTHON],
+@@ -456,7 +456,9 @@ AC_DEFUN([OVS_CHECK_PYTHON],
        fi])
      AC_SUBST([PYTHON])
      PYTHON=$ovs_cv_python
index 667f38e0f729447aff08199c6be456c57882bbb3..4d9b04de3b7a626e24167fe95ad3bf98d63f3586 100644 (file)
@@ -1,7 +1,7 @@
-From b65652ff441c4236b51f037a76147331c1ffd5fd Mon Sep 17 00:00:00 2001
+From 10fa6a820c155b6b7a97875de0b805aacf1046b8 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/5] ovs-lib: fix install_dir()
+Subject: [PATCH 3/4] ovs-lib: fix install_dir()
 
 The command "install" is not available in OpenWrt by default
 
@@ -11,7 +11,7 @@ Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
  1 file changed, 4 insertions(+), 1 deletion(-)
 
 diff --git a/utilities/ovs-lib.in b/utilities/ovs-lib.in
-index 9a0af2e82..68ab3f250 100644
+index d646b444a..dee63dece 100644
 --- a/utilities/ovs-lib.in
 +++ b/utilities/ovs-lib.in
 @@ -159,7 +159,10 @@ install_dir () {
index 6d552ac08611293f18de1871b9ea03fbe9ba12f2..e1c0f82111fcf2b004db46ebae1fd74a8659efef 100644 (file)
@@ -1,7 +1,7 @@
-From 2f9075aca5f54b8d0c14517c408f162985fb1b18 Mon Sep 17 00:00:00 2001
+From 77dfef9dd14987b091c2d4fc9475690759e1f4d7 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/5] build: disable building tests
+Subject: [PATCH 4/4] build: disable building tests
 
 Signed-off-by: Yousong Zhou <zhouyousong@yunionyun.com>
 ---
diff --git a/net/openvswitch/patches/0005-datapath-conntrack-fix-include-for-IP6_DEFRAG_CONNTR.patch b/net/openvswitch/patches/0005-datapath-conntrack-fix-include-for-IP6_DEFRAG_CONNTR.patch
deleted file mode 100644 (file)
index 1f77ab5..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-From b89f391203c4420eb454cb321e799a64de809f52 Mon Sep 17 00:00:00 2001
-From: Yousong Zhou <zhouyousong@yunionyun.com>
-Date: Fri, 3 May 2019 15:03:24 +0000
-Subject: [PATCH 5/5] datapath: conntrack: fix include for
- IP6_DEFRAG_CONNTRACK_IN
-
-The enum definition is now inside include/net/ipv6_frag.h since upstream commit
-70b095c ("ipv6: remove dependency of nf_defrag_ipv6 on ipv6 module") which was
-backported to stable trees (4.9, 4.14, 4.19) only these days.
-
-The error message
-
-         CC [M]  /opt/buildbot/slaves/lede-slave-tah/mipsel_24kc/build/sdk/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/openvswitch-2.11.0/datapath/linux/conntrack.o
-       /opt/buildbot/slaves/lede-slave-tah/mipsel_24kc/build/sdk/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/openvswitch-2.11.0/datapath/linux/conntrack.c: In function 'handle_fragments':
-       /opt/buildbot/slaves/lede-slave-tah/mipsel_24kc/build/sdk/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/openvswitch-2.11.0/datapath/linux/conntrack.c:554:8: error: variable 'user' has initializer but incomplete type
-          enum ip6_defrag_users user = IP6_DEFRAG_CONNTRACK_IN + zone;
-               ^~~~~~~~~~~~~~~~
-       /opt/buildbot/slaves/lede-slave-tah/mipsel_24kc/build/sdk/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/openvswitch-2.11.0/datapath/linux/conntrack.c:554:32: error: 'IP6_DEFRAG_CONNTRACK_IN' undeclared (first use in this function); did you mean 'IP_DEFRAG_CONNTRACK_IN'?
-          enum ip6_defrag_users user = IP6_DEFRAG_CONNTRACK_IN + zone;
-                                       ^~~~~~~~~~~~~~~~~~~~~~~
-                                       IP_DEFRAG_CONNTRACK_IN
-       /opt/buildbot/slaves/lede-slave-tah/mipsel_24kc/build/sdk/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/openvswitch-2.11.0/datapath/linux/conntrack.c:554:32: note: each undeclared identifier is reported only once for each function it appears in
-       /opt/buildbot/slaves/lede-slave-tah/mipsel_24kc/build/sdk/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/openvswitch-2.11.0/datapath/linux/conntrack.c:554:25: error: storage size of 'user' isn't known
-          enum ip6_defrag_users user = IP6_DEFRAG_CONNTRACK_IN + zone;
-                                ^~~~
-       /opt/buildbot/slaves/lede-slave-tah/mipsel_24kc/build/sdk/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/openvswitch-2.11.0/datapath/linux/conntrack.c:554:25: warning: unused variable 'user' [-Wunused-variable]
-       scripts/Makefile.build:326: recipe for target '/opt/buildbot/slaves/lede-slave-tah/mipsel_24kc/build/sdk/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/openvswitch-2.11.0/datapath/linux/conntrack.o' failed
-
-Reference: https://github.com/openwrt/packages/issues/8548#issuecomment-488871090
-Signed-off-by: Yousong Zhou <zhouyousong@yunionyun.com>
----
- datapath/conntrack.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/datapath/conntrack.c b/datapath/conntrack.c
-index a7dc9e0c3..69bda5a9c 100644
---- a/datapath/conntrack.c
-+++ b/datapath/conntrack.c
-@@ -31,6 +31,7 @@
- #include <net/netfilter/nf_conntrack_seqadj.h>
- #include <net/netfilter/nf_conntrack_zones.h>
- #include <net/netfilter/ipv6/nf_defrag_ipv6.h>
-+#include <net/ipv6_frag.h>
- #ifdef CONFIG_NF_NAT_NEEDED
- #include <linux/netfilter/nf_nat.h>
diff --git a/net/ostiary/Makefile b/net/ostiary/Makefile
new file mode 100644 (file)
index 0000000..b7829fa
--- /dev/null
@@ -0,0 +1,47 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=ostiary
+PKG_VERSION:=4.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://ingles.homeunix.net/software/ost/latest/
+PKG_HASH:=1b6a0a8a17fd3aa0f6511cdda81558d54f11023a0c953201ddaaef35f56a82c4
+
+PKG_MAINTAINER:=Chris Geraghty <cgretski@hotmail.com>
+PKG_LICENSE:=GPL-2.0-only
+PKG_LICENSE_FILES:=COPYING
+
+PKG_BUILD_PARALLEL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/ostiary
+  SECTION:=base
+  CATEGORY:=Network
+  TITLE:=Secure remote execution utility
+  URL:=http://ingles.homeunix.net/software/ost/index.html
+endef
+
+define Package/ostiary/description
+ Replay-resistent predefined remote-command trigger
+endef
+
+define Package/ostiary/conffiles
+/etc/ostiary.cfg
+endef
+
+MAKE_FLAGS += all
+
+define Package/ostiary/install
+        $(INSTALL_DIR) $(1)/usr/bin
+        $(INSTALL_BIN) $(PKG_BUILD_DIR)/ostiaryd $(1)/usr/bin/
+        $(INSTALL_BIN) $(PKG_BUILD_DIR)/ostclient $(1)/usr/bin/
+        $(INSTALL_DIR) $(1)/etc
+        $(INSTALL_CONF) $(PKG_BUILD_DIR)/tests/ostiary.cfg $(1)/etc/ostiary.cfg
+        $(INSTALL_DIR) $(1)/etc/init.d
+        $(INSTALL_BIN) ./files/ostiaryd.init $(1)/etc/init.d/ostiary
+endef
+
+
+$(eval $(call BuildPackage,ostiary))
diff --git a/net/ostiary/files/ostiaryd.init b/net/ostiary/files/ostiaryd.init
new file mode 100755 (executable)
index 0000000..da79a45
--- /dev/null
@@ -0,0 +1,19 @@
+#!/bin/sh /etc/rc.common
+
+START=99
+STOP=85
+
+USE_PROCD=1
+
+start_service()
+{
+
+       procd_open_instance
+       procd_set_param command /usr/bin/ostiaryd -c /etc/ostiary.cfg 
+       procd_close_instance
+}
+
+
+reload_service() {
+         procd_send_signal ostiaryd
+}
index 12b4e86374d7e34f20db839ffed9eb0f8ebc5f46..cfe4ea7d916ba56bb386d2ebce241fa6b3500ce3 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=p910nd
 PKG_VERSION:=0.97
-PKG_RELEASE:=7
+PKG_RELEASE:=8
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=@SF/p910nd
@@ -28,6 +28,7 @@ define Package/p910nd
   SUBMENU:=Printing
   TITLE:=A small non-spooling printer server
   URL:=http://p910nd.sourceforge.net
+  USERID:=p910nd=393:lp=7
 endef
 
 define Package/p910nd/conffiles
@@ -54,6 +55,8 @@ define Package/p910nd/install
        $(INSTALL_DATA) ./files/p910nd.config $(1)/etc/config/p910nd
        $(INSTALL_DIR) $(1)/etc/init.d
        $(INSTALL_BIN) ./files/p910nd.init $(1)/etc/init.d/p910nd
+       $(INSTALL_DIR) $(1)/etc/hotplug.d/usbmisc
+       $(INSTALL_BIN) ./files/p910nd.hotplug $(1)/etc/hotplug.d/usbmisc/20-p910nd
 endef
 
 $(eval $(call BuildPackage,p910nd))
index b8257b77c9b8d77066c745c9a8e97bd345dfa839..5446192c7630470925e73921c9f41992fd6c304f 100644 (file)
@@ -5,6 +5,8 @@ config p910nd
        option port          0
        option bidirectional 1
        option enabled       0
+       # Override running as user p910nd, group lp
+       option runas_root    0
 
        # mDNS support - see Bonjour Printing Specification for details concerning the values
        # Be aware that you can only advertise one printer on this host via mDNS
diff --git a/net/p910nd/files/p910nd.hotplug b/net/p910nd/files/p910nd.hotplug
new file mode 100644 (file)
index 0000000..0c2291e
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+case "$ACTION" in
+        add)
+               [ -n "${DEVNAME}" ] && [ "${DEVNAME##usb/lp*}" = "" ] && {
+                       chmod 660 /dev/"$DEVNAME"
+                       chgrp lp /dev/"$DEVNAME"
+               }
+                ;;
+        remove)
+                # device is gone
+                ;;
+esac
index 479b8410feda4e95d9a9269a32bb60353f53f835..0eadebd65ec11a14ae2d4c3a1a95d77e6907d2e9 100644 (file)
@@ -28,7 +28,7 @@ start_service() {
 
 
 start_p910nd() {
-       local section="$1"
+       local section="$1" runas_root
        config_get_bool "enabled" "$section" "enabled" '1'
        if [ "$enabled" -gt 0 ]; then
                args="-d "
@@ -42,6 +42,9 @@ start_p910nd() {
                procd_set_param command /usr/sbin/p910nd $args
                procd_set_param respawn
 
+               config_get_bool runas_root "$section" runas_root 0
+               [ "$runas_root" -ne 1 ] && procd_set_param user p910nd
+
                config_get_bool "mdns" "$section" "mdns" '0'
                config_get mdns_note "$section" mdns_note
                config_get mdns_ty "$section" mdns_ty
index 5cb0fcb432221ffaa4b8e06f39a2498caf941bda..58a62b79cc24f02d7723f45c4178fabff650efcd 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=pagekitec
 PKG_REV:=0.91.171102
 PKG_VERSION:=$(PKG_REV)C
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_LICENSE:=Apache-2.0
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
@@ -92,7 +92,7 @@ endef
 
 define Package/libpagekite/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libpagekite.so* $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpagekite.so* $(1)/usr/lib
 endef
 
 define Package/pagekitec/install
diff --git a/net/pdns-recursor/Makefile b/net/pdns-recursor/Makefile
new file mode 100644 (file)
index 0000000..f82cbaa
--- /dev/null
@@ -0,0 +1,62 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=pdns-recursor
+PKG_VERSION:=4.2.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=https://downloads.powerdns.com/releases/
+PKG_HASH:=f03c72c1816fdcc645cc539d8c16721d2ec294feac9b5179e78c3db311b7c2c2
+
+PKG_MAINTAINER:=James Taylor <james@jtaylor.id.au>
+PKG_LICENCE:=GPL-2.0-only
+PKG_LICENCE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:powerdns:recursor
+
+PKG_INSTALL:=1
+PKG_FIXUP:=autoreconf
+PKG_BUILD_PARALLEL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/pdns-recursor
+  SECTION:=net
+  CATEGORY:=Network
+  SUBMENU:=IP Addresses and Names
+  USERID:=pdns:pdns
+  TITLE:=PowerDNS Recursor
+  DEPENDS:=+boost +boost-context +libatomic +liblua +libopenssl +protobuf
+  URL:=https://www.powerdns.com/recursor.html
+endef
+
+define Package/pdns-recursor/description
+  High-performance resolving name server, utilizing multiple
+  processor and including Lua scripting capabilities.
+endef
+
+define Package/pdns-recursor/conffiles
+/etc/powerdns/pdns-recursor.conf
+/etc/init.d/pdns-recursor
+endef
+
+CONFIGURE_ARGS+= \
+       --sysconfdir=/etc/powerdns \
+       --with-lua=lua \
+       --without-libcap \
+       --without-libsodium \
+       --with-protobuf \
+       --without-net-snmp \
+       --disable-silent-rules
+
+define Package/pdns-recursor/install
+       $(INSTALL_DIR) $(1)/etc/powerdns
+       $(INSTALL_CONF) ./files/recursor.conf-dist $(1)/etc/powerdns/
+       $(INSTALL_DIR) $(1)/etc/init.d
+       $(INSTALL_BIN) ./files/pdns-recursor.init $(1)/etc/init.d/pdns-recursor
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rec_control $(1)/usr/bin/
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pdns_recursor $(1)/usr/sbin/
+endef
+
+$(eval $(call BuildPackage,pdns-recursor))
diff --git a/net/pdns-recursor/files/pdns-recursor.init b/net/pdns-recursor/files/pdns-recursor.init
new file mode 100644 (file)
index 0000000..26fbea1
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/sh /etc/rc.common
+START=99
+
+USE_PROCD=1
+
+start_service() {
+       [ -e /etc/powerdns/recursor.conf ] || return 1
+
+       procd_open_instance
+       procd_set_param command /usr/sbin/pdns_recursor --daemon=no
+       procd_set_param file /etc/powerdns/recursor.conf
+       procd_set_param respawn
+       procd_close_instance
+}
diff --git a/net/pdns-recursor/files/recursor.conf-dist b/net/pdns-recursor/files/recursor.conf-dist
new file mode 100644 (file)
index 0000000..8a40ce5
--- /dev/null
@@ -0,0 +1,662 @@
+# Autogenerated configuration file template
+#################################
+# allow-from   If set, only allow these comma separated netmasks to recurse
+#
+# allow-from=127.0.0.0/8, 10.0.0.0/8, 100.64.0.0/10, 169.254.0.0/16, 192.168.0.0/16, 172.16.0.0/12, ::1/128, fc00::/7, fe80::/10
+
+#################################
+# allow-from-file      If set, load allowed netmasks from this file
+#
+# allow-from-file=
+
+#################################
+# any-to-tcp   Answer ANY queries with tc=1, shunting to TCP
+#
+# any-to-tcp=no
+
+#################################
+# api-config-dir       Directory where REST API stores config and zones
+#
+# api-config-dir=
+
+#################################
+# api-key      Static pre-shared authentication key for access to the REST API
+#
+# api-key=
+
+#################################
+# auth-zones   Zones for which we have authoritative data, comma separated domain=file pairs 
+#
+# auth-zones=
+
+#################################
+# carbon-instance      If set overwrites the the instance name default
+#
+# carbon-instance=recursor
+
+#################################
+# carbon-interval      Number of seconds between carbon (graphite) updates
+#
+# carbon-interval=30
+
+#################################
+# carbon-namespace     If set overwrites the first part of the carbon string
+#
+# carbon-namespace=pdns
+
+#################################
+# carbon-ourname       If set, overrides our reported hostname for carbon stats
+#
+# carbon-ourname=
+
+#################################
+# carbon-server        If set, send metrics in carbon (graphite) format to this server IP address
+#
+# carbon-server=
+
+#################################
+# chroot       switch to chroot jail
+#
+# chroot=
+
+#################################
+# client-tcp-timeout   Timeout in seconds when talking to TCP clients
+#
+# client-tcp-timeout=2
+
+#################################
+# config-dir   Location of configuration directory (recursor.conf)
+#
+# config-dir=/etc/powerdns
+
+#################################
+# config-name  Name of this virtual configuration - will rename the binary image
+#
+# config-name=
+
+#################################
+# cpu-map      Thread to CPU mapping, space separated thread-id=cpu1,cpu2..cpuN pairs
+#
+# cpu-map=
+
+#################################
+# daemon       Operate as a daemon
+#
+# daemon=no
+
+#################################
+# delegation-only      Which domains we only accept delegations from
+#
+# delegation-only=
+
+#################################
+# disable-packetcache  Disable packetcache
+#
+# disable-packetcache=no
+
+#################################
+# disable-syslog       Disable logging to syslog, useful when running inside a supervisor that logs stdout
+#
+# disable-syslog=no
+
+#################################
+# distribution-load-factor     The load factor used when PowerDNS is distributing queries to worker threads
+#
+# distribution-load-factor=0.0
+
+#################################
+# distribution-pipe-buffer-size        Size in bytes of the internal buffer of the pipe used by the distributor to pass incoming queries to a worker thread
+#
+# distribution-pipe-buffer-size=0
+
+#################################
+# distributor-threads  Launch this number of distributor threads, distributing queries to other threads
+#
+# distributor-threads=0
+
+#################################
+# dnssec       DNSSEC mode: off/process-no-validate (default)/process/log-fail/validate
+#
+# dnssec=process-no-validate
+
+#################################
+# dnssec-log-bogus     Log DNSSEC bogus validations
+#
+# dnssec-log-bogus=no
+
+#################################
+# dont-query   If set, do not query these netmasks for DNS data
+#
+# dont-query=127.0.0.0/8, 10.0.0.0/8, 100.64.0.0/10, 169.254.0.0/16, 192.168.0.0/16, 172.16.0.0/12, ::1/128, fc00::/7, fe80::/10, 0.0.0.0/8, 192.0.0.0/24, 192.0.2.0/24, 198.51.100.0/24, 203.0.113.0/24, 240.0.0.0/4, ::/96, ::ffff:0:0/96, 100::/64, 2001:db8::/32
+
+#################################
+# dont-throttle-names  Do not throttle nameservers with this name or suffix
+#
+# dont-throttle-names=
+
+#################################
+# dont-throttle-netmasks       Do not throttle nameservers with this IP netmask
+#
+# dont-throttle-netmasks=
+
+#################################
+# ecs-add-for  List of client netmasks for which EDNS Client Subnet will be added
+#
+# ecs-add-for=0.0.0.0/0, ::/0, !127.0.0.0/8, !10.0.0.0/8, !100.64.0.0/10, !169.254.0.0/16, !192.168.0.0/16, !172.16.0.0/12, !::1/128, !fc00::/7, !fe80::/10
+
+#################################
+# ecs-cache-limit-ttl  Minimum TTL to cache ECS response
+#
+# ecs-cache-limit-ttl=0
+
+#################################
+# ecs-ipv4-bits        Number of bits of IPv4 address to pass for EDNS Client Subnet
+#
+# ecs-ipv4-bits=24
+
+#################################
+# ecs-ipv4-cache-bits  Maximum number of bits of IPv4 mask to cache ECS response
+#
+# ecs-ipv4-cache-bits=24
+
+#################################
+# ecs-ipv6-bits        Number of bits of IPv6 address to pass for EDNS Client Subnet
+#
+# ecs-ipv6-bits=56
+
+#################################
+# ecs-ipv6-cache-bits  Maximum number of bits of IPv6 mask to cache ECS response
+#
+# ecs-ipv6-cache-bits=56
+
+#################################
+# ecs-minimum-ttl-override     Set under adverse conditions, a minimum TTL for records in ECS-specific answers
+#
+# ecs-minimum-ttl-override=0
+
+#################################
+# ecs-scope-zero-address       Address to send to whitelisted authoritative servers for incoming queries with ECS prefix-length source of 0
+#
+# ecs-scope-zero-address=
+
+#################################
+# edns-outgoing-bufsize        Outgoing EDNS buffer size
+#
+# edns-outgoing-bufsize=1232
+
+#################################
+# edns-subnet-whitelist        List of netmasks and domains that we should enable EDNS subnet for
+#
+# edns-subnet-whitelist=
+
+#################################
+# entropy-source       If set, read entropy from this file
+#
+# entropy-source=/dev/urandom
+
+#################################
+# etc-hosts-file       Path to 'hosts' file
+#
+# etc-hosts-file=/etc/hosts
+
+#################################
+# export-etc-hosts     If we should serve up contents from /etc/hosts
+#
+# export-etc-hosts=off
+
+#################################
+# export-etc-hosts-search-suffix       Also serve up the contents of /etc/hosts with this suffix
+#
+# export-etc-hosts-search-suffix=
+
+#################################
+# forward-zones        Zones for which we forward queries, comma separated domain=ip pairs
+#
+# forward-zones=
+
+#################################
+# forward-zones-file   File with (+)domain=ip pairs for forwarding
+#
+# forward-zones-file=
+
+#################################
+# forward-zones-recurse        Zones for which we forward queries with recursion bit, comma separated domain=ip pairs
+#
+# forward-zones-recurse=
+
+#################################
+# gettag-needs-edns-options    If EDNS Options should be extracted before calling the gettag() hook
+#
+# gettag-needs-edns-options=no
+
+#################################
+# hint-file    If set, load root hints from this file
+#
+# hint-file=
+
+#################################
+# include-dir  Include *.conf files from this directory
+#
+# include-dir=
+
+#################################
+# latency-statistic-size       Number of latency values to calculate the qa-latency average
+#
+# latency-statistic-size=10000
+
+#################################
+# local-address        IP addresses to listen on, separated by spaces or commas. Also accepts ports.
+#
+# local-address=127.0.0.1
+
+#################################
+# local-port   port to listen on
+#
+# local-port=53
+
+#################################
+# log-common-errors    If we should log rather common errors
+#
+# log-common-errors=no
+
+#################################
+# log-rpz-changes      Log additions and removals to RPZ zones at Info level
+#
+# log-rpz-changes=no
+
+#################################
+# log-timestamp        Print timestamps in log lines, useful to disable when running with a tool that timestamps stdout already
+#
+# log-timestamp=yes
+
+#################################
+# logging-facility     Facility to log messages as. 0 corresponds to local0
+#
+# logging-facility=
+
+#################################
+# loglevel     Amount of logging. Higher is more. Do not set below 3
+#
+# loglevel=6
+
+#################################
+# lowercase-outgoing   Force outgoing questions to lowercase
+#
+# lowercase-outgoing=no
+
+#################################
+# lua-config-file      More powerful configuration options
+#
+# lua-config-file=
+
+#################################
+# lua-dns-script       Filename containing an optional 'lua' script that will be used to modify dns answers
+#
+# lua-dns-script=
+
+#################################
+# lua-maintenance-interval     Number of seconds between calls to the lua user defined maintenance() function
+#
+# lua-maintenance-interval=1
+
+#################################
+# max-cache-bogus-ttl  maximum number of seconds to keep a Bogus (positive or negative) cached entry in memory
+#
+# max-cache-bogus-ttl=3600
+
+#################################
+# max-cache-entries    If set, maximum number of entries in the main cache
+#
+# max-cache-entries=1000000
+
+#################################
+# max-cache-ttl        maximum number of seconds to keep a cached entry in memory
+#
+# max-cache-ttl=86400
+
+#################################
+# max-mthreads Maximum number of simultaneous Mtasker threads
+#
+# max-mthreads=2048
+
+#################################
+# max-negative-ttl     maximum number of seconds to keep a negative cached entry in memory
+#
+# max-negative-ttl=3600
+
+#################################
+# max-packetcache-entries      maximum number of entries to keep in the packetcache
+#
+# max-packetcache-entries=500000
+
+#################################
+# max-qperq    Maximum outgoing queries per query
+#
+# max-qperq=50
+
+#################################
+# max-recursion-depth  Maximum number of internal recursion calls per query, 0 for unlimited
+#
+# max-recursion-depth=40
+
+#################################
+# max-tcp-clients      Maximum number of simultaneous TCP clients
+#
+# max-tcp-clients=128
+
+#################################
+# max-tcp-per-client   If set, maximum number of TCP sessions per client (IP address)
+#
+# max-tcp-per-client=0
+
+#################################
+# max-tcp-queries-per-connection       If set, maximum number of TCP queries in a TCP connection
+#
+# max-tcp-queries-per-connection=0
+
+#################################
+# max-total-msec       Maximum total wall-clock time per query in milliseconds, 0 for unlimited
+#
+# max-total-msec=7000
+
+#################################
+# max-udp-queries-per-round    Maximum number of UDP queries processed per recvmsg() round, before returning back to normal processing
+#
+# max-udp-queries-per-round=10000
+
+#################################
+# minimum-ttl-override Set under adverse conditions, a minimum TTL
+#
+# minimum-ttl-override=0
+
+#################################
+# network-timeout      Wait this number of milliseconds for network i/o
+#
+# network-timeout=1500
+
+#################################
+# no-shuffle   Don't change
+#
+# no-shuffle=off
+
+#################################
+# non-local-bind       Enable binding to non-local addresses by using FREEBIND / BINDANY socket options
+#
+# non-local-bind=no
+
+#################################
+# nsec3-max-iterations Maximum number of iterations allowed for an NSEC3 record
+#
+# nsec3-max-iterations=2500
+
+#################################
+# packetcache-servfail-ttl     maximum number of seconds to keep a cached servfail entry in packetcache
+#
+# packetcache-servfail-ttl=60
+
+#################################
+# packetcache-ttl      maximum number of seconds to keep a cached entry in packetcache
+#
+# packetcache-ttl=3600
+
+#################################
+# pdns-distributes-queries     If PowerDNS itself should distribute queries over threads
+#
+# pdns-distributes-queries=yes
+
+#################################
+# processes    Launch this number of processes (EXPERIMENTAL, DO NOT CHANGE)
+#
+# processes=1
+
+#################################
+# protobuf-use-kernel-timestamp        Compute the latency of queries in protobuf messages by using the timestamp set by the kernel when the query was received (when available)
+#
+# protobuf-use-kernel-timestamp=
+
+#################################
+# public-suffix-list-file      Path to the Public Suffix List file, if any
+#
+# public-suffix-list-file=
+
+#################################
+# query-local-address  Source IP address for sending queries
+#
+# query-local-address=0.0.0.0
+
+#################################
+# query-local-address6 Source IPv6 address for sending queries. IF UNSET, IPv6 WILL NOT BE USED FOR OUTGOING QUERIES
+#
+# query-local-address6=
+
+#################################
+# quiet        Suppress logging of questions and answers
+#
+# quiet=
+
+#################################
+# reuseport    Enable SO_REUSEPORT allowing multiple recursors processes to listen to 1 address
+#
+# reuseport=no
+
+#################################
+# rng  Specify random number generator to use. Valid values are auto,sodium,openssl,getrandom,arc4random,urandom.
+#
+# rng=auto
+
+#################################
+# root-nx-trust        If set, believe that an NXDOMAIN from the root means the TLD does not exist
+#
+# root-nx-trust=yes
+
+#################################
+# security-poll-suffix Domain name from which to query security update notifications
+#
+# security-poll-suffix=secpoll.powerdns.com.
+
+#################################
+# serve-rfc1918        If we should be authoritative for RFC 1918 private IP space
+#
+# serve-rfc1918=yes
+
+#################################
+# server-down-max-fails        Maximum number of consecutive timeouts (and unreachables) to mark a server as down ( 0 => disabled )
+#
+# server-down-max-fails=64
+
+#################################
+# server-down-throttle-time    Number of seconds to throttle all queries to a server after being marked as down
+#
+# server-down-throttle-time=60
+
+#################################
+# server-id    Returned when queried for 'id.server' TXT or NSID, defaults to hostname, set custom or 'disabled'
+#
+# server-id=
+
+#################################
+# setgid       If set, change group id to this gid for more security
+#
+# setgid=
+
+#################################
+# setuid       If set, change user id to this uid for more security
+#
+# setuid=
+
+#################################
+# signature-inception-skew     Allow the signature inception to be off by this number of seconds
+#
+# signature-inception-skew=60
+
+#################################
+# single-socket        If set, only use a single socket for outgoing queries
+#
+# single-socket=off
+
+#################################
+# snmp-agent   If set, register as an SNMP agent
+#
+# snmp-agent=no
+
+#################################
+# snmp-master-socket   If set and snmp-agent is set, the socket to use to register to the SNMP master
+#
+# snmp-master-socket=
+
+#################################
+# soa-minimum-ttl      Don't change
+#
+# soa-minimum-ttl=0
+
+#################################
+# socket-dir   Where the controlsocket will live, /var/run when unset and not chrooted
+#
+# socket-dir=
+
+#################################
+# socket-group Group of socket
+#
+# socket-group=
+
+#################################
+# socket-mode  Permissions for socket
+#
+# socket-mode=
+
+#################################
+# socket-owner Owner of socket
+#
+# socket-owner=
+
+#################################
+# spoof-nearmiss-max   If non-zero, assume spoofing after this many near misses
+#
+# spoof-nearmiss-max=20
+
+#################################
+# stack-size   stack size per mthread
+#
+# stack-size=200000
+
+#################################
+# statistics-interval  Number of seconds between printing of recursor statistics, 0 to disable
+#
+# statistics-interval=1800
+
+#################################
+# stats-api-blacklist  List of statistics that are disabled when retrieving the complete list of statistics via the API
+#
+# stats-api-blacklist=cache-bytes, packetcache-bytes, special-memory-usage, ecs-v4-response-bits-1, ecs-v4-response-bits-2, ecs-v4-response-bits-3, ecs-v4-response-bits-4, ecs-v4-response-bits-5, ecs-v4-response-bits-6, ecs-v4-response-bits-7, ecs-v4-response-bits-8, ecs-v4-response-bits-9, ecs-v4-response-bits-10, ecs-v4-response-bits-11, ecs-v4-response-bits-12, ecs-v4-response-bits-13, ecs-v4-response-bits-14, ecs-v4-response-bits-15, ecs-v4-response-bits-16, ecs-v4-response-bits-17, ecs-v4-response-bits-18, ecs-v4-response-bits-19, ecs-v4-response-bits-20, ecs-v4-response-bits-21, ecs-v4-response-bits-22, ecs-v4-response-bits-23, ecs-v4-response-bits-24, ecs-v4-response-bits-25, ecs-v4-response-bits-26, ecs-v4-response-bits-27, ecs-v4-response-bits-28, ecs-v4-response-bits-29, ecs-v4-response-bits-30, ecs-v4-response-bits-31, ecs-v4-response-bits-32, ecs-v6-response-bits-1, ecs-v6-response-bits-2, ecs-v6-response-bits-3, ecs-v6-response-bits-4, ecs-v6-response-bits-5, ecs-v6-response-bits-6, ecs-v6-response-bits-7, ecs-v6-response-bits-8, ecs-v6-response-bits-9, ecs-v6-response-bits-10, ecs-v6-response-bits-11, ecs-v6-response-bits-12, ecs-v6-response-bits-13, ecs-v6-response-bits-14, ecs-v6-response-bits-15, ecs-v6-response-bits-16, ecs-v6-response-bits-17, ecs-v6-response-bits-18, ecs-v6-response-bits-19, ecs-v6-response-bits-20, ecs-v6-response-bits-21, ecs-v6-response-bits-22, ecs-v6-response-bits-23, ecs-v6-response-bits-24, ecs-v6-response-bits-25, ecs-v6-response-bits-26, ecs-v6-response-bits-27, ecs-v6-response-bits-28, ecs-v6-response-bits-29, ecs-v6-response-bits-30, ecs-v6-response-bits-31, ecs-v6-response-bits-32, ecs-v6-response-bits-33, ecs-v6-response-bits-34, ecs-v6-response-bits-35, ecs-v6-response-bits-36, ecs-v6-response-bits-37, ecs-v6-response-bits-38, ecs-v6-response-bits-39, ecs-v6-response-bits-40, ecs-v6-response-bits-41, ecs-v6-response-bits-42, ecs-v6-response-bits-43, ecs-v6-response-bits-44, ecs-v6-response-bits-45, ecs-v6-response-bits-46, ecs-v6-response-bits-47, ecs-v6-response-bits-48, ecs-v6-response-bits-49, ecs-v6-response-bits-50, ecs-v6-response-bits-51, ecs-v6-response-bits-52, ecs-v6-response-bits-53, ecs-v6-response-bits-54, ecs-v6-response-bits-55, ecs-v6-response-bits-56, ecs-v6-response-bits-57, ecs-v6-response-bits-58, ecs-v6-response-bits-59, ecs-v6-response-bits-60, ecs-v6-response-bits-61, ecs-v6-response-bits-62, ecs-v6-response-bits-63, ecs-v6-response-bits-64, ecs-v6-response-bits-65, ecs-v6-response-bits-66, ecs-v6-response-bits-67, ecs-v6-response-bits-68, ecs-v6-response-bits-69, ecs-v6-response-bits-70, ecs-v6-response-bits-71, ecs-v6-response-bits-72, ecs-v6-response-bits-73, ecs-v6-response-bits-74, ecs-v6-response-bits-75, ecs-v6-response-bits-76, ecs-v6-response-bits-77, ecs-v6-response-bits-78, ecs-v6-response-bits-79, ecs-v6-response-bits-80, ecs-v6-response-bits-81, ecs-v6-response-bits-82, ecs-v6-response-bits-83, ecs-v6-response-bits-84, ecs-v6-response-bits-85, ecs-v6-response-bits-86, ecs-v6-response-bits-87, ecs-v6-response-bits-88, ecs-v6-response-bits-89, ecs-v6-response-bits-90, ecs-v6-response-bits-91, ecs-v6-response-bits-92, ecs-v6-response-bits-93, ecs-v6-response-bits-94, ecs-v6-response-bits-95, ecs-v6-response-bits-96, ecs-v6-response-bits-97, ecs-v6-response-bits-98, ecs-v6-response-bits-99, ecs-v6-response-bits-100, ecs-v6-response-bits-101, ecs-v6-response-bits-102, ecs-v6-response-bits-103, ecs-v6-response-bits-104, ecs-v6-response-bits-105, ecs-v6-response-bits-106, ecs-v6-response-bits-107, ecs-v6-response-bits-108, ecs-v6-response-bits-109, ecs-v6-response-bits-110, ecs-v6-response-bits-111, ecs-v6-response-bits-112, ecs-v6-response-bits-113, ecs-v6-response-bits-114, ecs-v6-response-bits-115, ecs-v6-response-bits-116, ecs-v6-response-bits-117, ecs-v6-response-bits-118, ecs-v6-response-bits-119, ecs-v6-response-bits-120, ecs-v6-response-bits-121, ecs-v6-response-bits-122, ecs-v6-response-bits-123, ecs-v6-response-bits-124, ecs-v6-response-bits-125, ecs-v6-response-bits-126, ecs-v6-response-bits-127, ecs-v6-response-bits-128
+
+#################################
+# stats-carbon-blacklist       List of statistics that are prevented from being exported via Carbon
+#
+# stats-carbon-blacklist=cache-bytes, packetcache-bytes, special-memory-usage, ecs-v4-response-bits-1, ecs-v4-response-bits-2, ecs-v4-response-bits-3, ecs-v4-response-bits-4, ecs-v4-response-bits-5, ecs-v4-response-bits-6, ecs-v4-response-bits-7, ecs-v4-response-bits-8, ecs-v4-response-bits-9, ecs-v4-response-bits-10, ecs-v4-response-bits-11, ecs-v4-response-bits-12, ecs-v4-response-bits-13, ecs-v4-response-bits-14, ecs-v4-response-bits-15, ecs-v4-response-bits-16, ecs-v4-response-bits-17, ecs-v4-response-bits-18, ecs-v4-response-bits-19, ecs-v4-response-bits-20, ecs-v4-response-bits-21, ecs-v4-response-bits-22, ecs-v4-response-bits-23, ecs-v4-response-bits-24, ecs-v4-response-bits-25, ecs-v4-response-bits-26, ecs-v4-response-bits-27, ecs-v4-response-bits-28, ecs-v4-response-bits-29, ecs-v4-response-bits-30, ecs-v4-response-bits-31, ecs-v4-response-bits-32, ecs-v6-response-bits-1, ecs-v6-response-bits-2, ecs-v6-response-bits-3, ecs-v6-response-bits-4, ecs-v6-response-bits-5, ecs-v6-response-bits-6, ecs-v6-response-bits-7, ecs-v6-response-bits-8, ecs-v6-response-bits-9, ecs-v6-response-bits-10, ecs-v6-response-bits-11, ecs-v6-response-bits-12, ecs-v6-response-bits-13, ecs-v6-response-bits-14, ecs-v6-response-bits-15, ecs-v6-response-bits-16, ecs-v6-response-bits-17, ecs-v6-response-bits-18, ecs-v6-response-bits-19, ecs-v6-response-bits-20, ecs-v6-response-bits-21, ecs-v6-response-bits-22, ecs-v6-response-bits-23, ecs-v6-response-bits-24, ecs-v6-response-bits-25, ecs-v6-response-bits-26, ecs-v6-response-bits-27, ecs-v6-response-bits-28, ecs-v6-response-bits-29, ecs-v6-response-bits-30, ecs-v6-response-bits-31, ecs-v6-response-bits-32, ecs-v6-response-bits-33, ecs-v6-response-bits-34, ecs-v6-response-bits-35, ecs-v6-response-bits-36, ecs-v6-response-bits-37, ecs-v6-response-bits-38, ecs-v6-response-bits-39, ecs-v6-response-bits-40, ecs-v6-response-bits-41, ecs-v6-response-bits-42, ecs-v6-response-bits-43, ecs-v6-response-bits-44, ecs-v6-response-bits-45, ecs-v6-response-bits-46, ecs-v6-response-bits-47, ecs-v6-response-bits-48, ecs-v6-response-bits-49, ecs-v6-response-bits-50, ecs-v6-response-bits-51, ecs-v6-response-bits-52, ecs-v6-response-bits-53, ecs-v6-response-bits-54, ecs-v6-response-bits-55, ecs-v6-response-bits-56, ecs-v6-response-bits-57, ecs-v6-response-bits-58, ecs-v6-response-bits-59, ecs-v6-response-bits-60, ecs-v6-response-bits-61, ecs-v6-response-bits-62, ecs-v6-response-bits-63, ecs-v6-response-bits-64, ecs-v6-response-bits-65, ecs-v6-response-bits-66, ecs-v6-response-bits-67, ecs-v6-response-bits-68, ecs-v6-response-bits-69, ecs-v6-response-bits-70, ecs-v6-response-bits-71, ecs-v6-response-bits-72, ecs-v6-response-bits-73, ecs-v6-response-bits-74, ecs-v6-response-bits-75, ecs-v6-response-bits-76, ecs-v6-response-bits-77, ecs-v6-response-bits-78, ecs-v6-response-bits-79, ecs-v6-response-bits-80, ecs-v6-response-bits-81, ecs-v6-response-bits-82, ecs-v6-response-bits-83, ecs-v6-response-bits-84, ecs-v6-response-bits-85, ecs-v6-response-bits-86, ecs-v6-response-bits-87, ecs-v6-response-bits-88, ecs-v6-response-bits-89, ecs-v6-response-bits-90, ecs-v6-response-bits-91, ecs-v6-response-bits-92, ecs-v6-response-bits-93, ecs-v6-response-bits-94, ecs-v6-response-bits-95, ecs-v6-response-bits-96, ecs-v6-response-bits-97, ecs-v6-response-bits-98, ecs-v6-response-bits-99, ecs-v6-response-bits-100, ecs-v6-response-bits-101, ecs-v6-response-bits-102, ecs-v6-response-bits-103, ecs-v6-response-bits-104, ecs-v6-response-bits-105, ecs-v6-response-bits-106, ecs-v6-response-bits-107, ecs-v6-response-bits-108, ecs-v6-response-bits-109, ecs-v6-response-bits-110, ecs-v6-response-bits-111, ecs-v6-response-bits-112, ecs-v6-response-bits-113, ecs-v6-response-bits-114, ecs-v6-response-bits-115, ecs-v6-response-bits-116, ecs-v6-response-bits-117, ecs-v6-response-bits-118, ecs-v6-response-bits-119, ecs-v6-response-bits-120, ecs-v6-response-bits-121, ecs-v6-response-bits-122, ecs-v6-response-bits-123, ecs-v6-response-bits-124, ecs-v6-response-bits-125, ecs-v6-response-bits-126, ecs-v6-response-bits-127, ecs-v6-response-bits-128
+
+#################################
+# stats-rec-control-blacklist  List of statistics that are prevented from being exported via rec_control get-all
+#
+# stats-rec-control-blacklist=cache-bytes, packetcache-bytes, special-memory-usage, ecs-v4-response-bits-1, ecs-v4-response-bits-2, ecs-v4-response-bits-3, ecs-v4-response-bits-4, ecs-v4-response-bits-5, ecs-v4-response-bits-6, ecs-v4-response-bits-7, ecs-v4-response-bits-8, ecs-v4-response-bits-9, ecs-v4-response-bits-10, ecs-v4-response-bits-11, ecs-v4-response-bits-12, ecs-v4-response-bits-13, ecs-v4-response-bits-14, ecs-v4-response-bits-15, ecs-v4-response-bits-16, ecs-v4-response-bits-17, ecs-v4-response-bits-18, ecs-v4-response-bits-19, ecs-v4-response-bits-20, ecs-v4-response-bits-21, ecs-v4-response-bits-22, ecs-v4-response-bits-23, ecs-v4-response-bits-24, ecs-v4-response-bits-25, ecs-v4-response-bits-26, ecs-v4-response-bits-27, ecs-v4-response-bits-28, ecs-v4-response-bits-29, ecs-v4-response-bits-30, ecs-v4-response-bits-31, ecs-v4-response-bits-32, ecs-v6-response-bits-1, ecs-v6-response-bits-2, ecs-v6-response-bits-3, ecs-v6-response-bits-4, ecs-v6-response-bits-5, ecs-v6-response-bits-6, ecs-v6-response-bits-7, ecs-v6-response-bits-8, ecs-v6-response-bits-9, ecs-v6-response-bits-10, ecs-v6-response-bits-11, ecs-v6-response-bits-12, ecs-v6-response-bits-13, ecs-v6-response-bits-14, ecs-v6-response-bits-15, ecs-v6-response-bits-16, ecs-v6-response-bits-17, ecs-v6-response-bits-18, ecs-v6-response-bits-19, ecs-v6-response-bits-20, ecs-v6-response-bits-21, ecs-v6-response-bits-22, ecs-v6-response-bits-23, ecs-v6-response-bits-24, ecs-v6-response-bits-25, ecs-v6-response-bits-26, ecs-v6-response-bits-27, ecs-v6-response-bits-28, ecs-v6-response-bits-29, ecs-v6-response-bits-30, ecs-v6-response-bits-31, ecs-v6-response-bits-32, ecs-v6-response-bits-33, ecs-v6-response-bits-34, ecs-v6-response-bits-35, ecs-v6-response-bits-36, ecs-v6-response-bits-37, ecs-v6-response-bits-38, ecs-v6-response-bits-39, ecs-v6-response-bits-40, ecs-v6-response-bits-41, ecs-v6-response-bits-42, ecs-v6-response-bits-43, ecs-v6-response-bits-44, ecs-v6-response-bits-45, ecs-v6-response-bits-46, ecs-v6-response-bits-47, ecs-v6-response-bits-48, ecs-v6-response-bits-49, ecs-v6-response-bits-50, ecs-v6-response-bits-51, ecs-v6-response-bits-52, ecs-v6-response-bits-53, ecs-v6-response-bits-54, ecs-v6-response-bits-55, ecs-v6-response-bits-56, ecs-v6-response-bits-57, ecs-v6-response-bits-58, ecs-v6-response-bits-59, ecs-v6-response-bits-60, ecs-v6-response-bits-61, ecs-v6-response-bits-62, ecs-v6-response-bits-63, ecs-v6-response-bits-64, ecs-v6-response-bits-65, ecs-v6-response-bits-66, ecs-v6-response-bits-67, ecs-v6-response-bits-68, ecs-v6-response-bits-69, ecs-v6-response-bits-70, ecs-v6-response-bits-71, ecs-v6-response-bits-72, ecs-v6-response-bits-73, ecs-v6-response-bits-74, ecs-v6-response-bits-75, ecs-v6-response-bits-76, ecs-v6-response-bits-77, ecs-v6-response-bits-78, ecs-v6-response-bits-79, ecs-v6-response-bits-80, ecs-v6-response-bits-81, ecs-v6-response-bits-82, ecs-v6-response-bits-83, ecs-v6-response-bits-84, ecs-v6-response-bits-85, ecs-v6-response-bits-86, ecs-v6-response-bits-87, ecs-v6-response-bits-88, ecs-v6-response-bits-89, ecs-v6-response-bits-90, ecs-v6-response-bits-91, ecs-v6-response-bits-92, ecs-v6-response-bits-93, ecs-v6-response-bits-94, ecs-v6-response-bits-95, ecs-v6-response-bits-96, ecs-v6-response-bits-97, ecs-v6-response-bits-98, ecs-v6-response-bits-99, ecs-v6-response-bits-100, ecs-v6-response-bits-101, ecs-v6-response-bits-102, ecs-v6-response-bits-103, ecs-v6-response-bits-104, ecs-v6-response-bits-105, ecs-v6-response-bits-106, ecs-v6-response-bits-107, ecs-v6-response-bits-108, ecs-v6-response-bits-109, ecs-v6-response-bits-110, ecs-v6-response-bits-111, ecs-v6-response-bits-112, ecs-v6-response-bits-113, ecs-v6-response-bits-114, ecs-v6-response-bits-115, ecs-v6-response-bits-116, ecs-v6-response-bits-117, ecs-v6-response-bits-118, ecs-v6-response-bits-119, ecs-v6-response-bits-120, ecs-v6-response-bits-121, ecs-v6-response-bits-122, ecs-v6-response-bits-123, ecs-v6-response-bits-124, ecs-v6-response-bits-125, ecs-v6-response-bits-126, ecs-v6-response-bits-127, ecs-v6-response-bits-128
+
+#################################
+# stats-ringbuffer-entries     maximum number of packets to store statistics for
+#
+# stats-ringbuffer-entries=10000
+
+#################################
+# stats-snmp-blacklist List of statistics that are prevented from being exported via SNMP
+#
+# stats-snmp-blacklist=cache-bytes, packetcache-bytes, special-memory-usage, ecs-v4-response-bits-1, ecs-v4-response-bits-2, ecs-v4-response-bits-3, ecs-v4-response-bits-4, ecs-v4-response-bits-5, ecs-v4-response-bits-6, ecs-v4-response-bits-7, ecs-v4-response-bits-8, ecs-v4-response-bits-9, ecs-v4-response-bits-10, ecs-v4-response-bits-11, ecs-v4-response-bits-12, ecs-v4-response-bits-13, ecs-v4-response-bits-14, ecs-v4-response-bits-15, ecs-v4-response-bits-16, ecs-v4-response-bits-17, ecs-v4-response-bits-18, ecs-v4-response-bits-19, ecs-v4-response-bits-20, ecs-v4-response-bits-21, ecs-v4-response-bits-22, ecs-v4-response-bits-23, ecs-v4-response-bits-24, ecs-v4-response-bits-25, ecs-v4-response-bits-26, ecs-v4-response-bits-27, ecs-v4-response-bits-28, ecs-v4-response-bits-29, ecs-v4-response-bits-30, ecs-v4-response-bits-31, ecs-v4-response-bits-32, ecs-v6-response-bits-1, ecs-v6-response-bits-2, ecs-v6-response-bits-3, ecs-v6-response-bits-4, ecs-v6-response-bits-5, ecs-v6-response-bits-6, ecs-v6-response-bits-7, ecs-v6-response-bits-8, ecs-v6-response-bits-9, ecs-v6-response-bits-10, ecs-v6-response-bits-11, ecs-v6-response-bits-12, ecs-v6-response-bits-13, ecs-v6-response-bits-14, ecs-v6-response-bits-15, ecs-v6-response-bits-16, ecs-v6-response-bits-17, ecs-v6-response-bits-18, ecs-v6-response-bits-19, ecs-v6-response-bits-20, ecs-v6-response-bits-21, ecs-v6-response-bits-22, ecs-v6-response-bits-23, ecs-v6-response-bits-24, ecs-v6-response-bits-25, ecs-v6-response-bits-26, ecs-v6-response-bits-27, ecs-v6-response-bits-28, ecs-v6-response-bits-29, ecs-v6-response-bits-30, ecs-v6-response-bits-31, ecs-v6-response-bits-32, ecs-v6-response-bits-33, ecs-v6-response-bits-34, ecs-v6-response-bits-35, ecs-v6-response-bits-36, ecs-v6-response-bits-37, ecs-v6-response-bits-38, ecs-v6-response-bits-39, ecs-v6-response-bits-40, ecs-v6-response-bits-41, ecs-v6-response-bits-42, ecs-v6-response-bits-43, ecs-v6-response-bits-44, ecs-v6-response-bits-45, ecs-v6-response-bits-46, ecs-v6-response-bits-47, ecs-v6-response-bits-48, ecs-v6-response-bits-49, ecs-v6-response-bits-50, ecs-v6-response-bits-51, ecs-v6-response-bits-52, ecs-v6-response-bits-53, ecs-v6-response-bits-54, ecs-v6-response-bits-55, ecs-v6-response-bits-56, ecs-v6-response-bits-57, ecs-v6-response-bits-58, ecs-v6-response-bits-59, ecs-v6-response-bits-60, ecs-v6-response-bits-61, ecs-v6-response-bits-62, ecs-v6-response-bits-63, ecs-v6-response-bits-64, ecs-v6-response-bits-65, ecs-v6-response-bits-66, ecs-v6-response-bits-67, ecs-v6-response-bits-68, ecs-v6-response-bits-69, ecs-v6-response-bits-70, ecs-v6-response-bits-71, ecs-v6-response-bits-72, ecs-v6-response-bits-73, ecs-v6-response-bits-74, ecs-v6-response-bits-75, ecs-v6-response-bits-76, ecs-v6-response-bits-77, ecs-v6-response-bits-78, ecs-v6-response-bits-79, ecs-v6-response-bits-80, ecs-v6-response-bits-81, ecs-v6-response-bits-82, ecs-v6-response-bits-83, ecs-v6-response-bits-84, ecs-v6-response-bits-85, ecs-v6-response-bits-86, ecs-v6-response-bits-87, ecs-v6-response-bits-88, ecs-v6-response-bits-89, ecs-v6-response-bits-90, ecs-v6-response-bits-91, ecs-v6-response-bits-92, ecs-v6-response-bits-93, ecs-v6-response-bits-94, ecs-v6-response-bits-95, ecs-v6-response-bits-96, ecs-v6-response-bits-97, ecs-v6-response-bits-98, ecs-v6-response-bits-99, ecs-v6-response-bits-100, ecs-v6-response-bits-101, ecs-v6-response-bits-102, ecs-v6-response-bits-103, ecs-v6-response-bits-104, ecs-v6-response-bits-105, ecs-v6-response-bits-106, ecs-v6-response-bits-107, ecs-v6-response-bits-108, ecs-v6-response-bits-109, ecs-v6-response-bits-110, ecs-v6-response-bits-111, ecs-v6-response-bits-112, ecs-v6-response-bits-113, ecs-v6-response-bits-114, ecs-v6-response-bits-115, ecs-v6-response-bits-116, ecs-v6-response-bits-117, ecs-v6-response-bits-118, ecs-v6-response-bits-119, ecs-v6-response-bits-120, ecs-v6-response-bits-121, ecs-v6-response-bits-122, ecs-v6-response-bits-123, ecs-v6-response-bits-124, ecs-v6-response-bits-125, ecs-v6-response-bits-126, ecs-v6-response-bits-127, ecs-v6-response-bits-128
+
+#################################
+# tcp-fast-open        Enable TCP Fast Open support on the listening sockets, using the supplied numerical value as the queue size
+#
+# tcp-fast-open=0
+
+#################################
+# threads      Launch this number of threads
+#
+# threads=2
+
+#################################
+# trace        if we should output heaps of logging. set to 'fail' to only log failing domains
+#
+# trace=off
+
+#################################
+# udp-source-port-avoid        List of comma separated UDP port number to avoid
+#
+# udp-source-port-avoid=11211
+
+#################################
+# udp-source-port-max  Maximum UDP port to bind on
+#
+# udp-source-port-max=65535
+
+#################################
+# udp-source-port-min  Minimum UDP port to bind on
+#
+# udp-source-port-min=1024
+
+#################################
+# udp-truncation-threshold     Maximum UDP response size before we truncate
+#
+# udp-truncation-threshold=1232
+
+#################################
+# use-incoming-edns-subnet     Pass along received EDNS Client Subnet information
+#
+# use-incoming-edns-subnet=no
+
+#################################
+# version-string       string reported on version.pdns or version.bind
+#
+# version-string=PowerDNS Recursor 4.2.0 (built May 18 2019 15:59:49 by jamestk@zanzabar.cybase.for-no-reason.net)
+
+#################################
+# webserver    Start a webserver (for REST API)
+#
+# webserver=no
+
+#################################
+# webserver-address    IP Address of webserver to listen on
+#
+# webserver-address=127.0.0.1
+
+#################################
+# webserver-allow-from Webserver access is only allowed from these subnets
+#
+# webserver-allow-from=127.0.0.1,::1
+
+#################################
+# webserver-loglevel   Amount of logging in the webserver (none, normal, detailed)
+#
+# webserver-loglevel=normal
+
+#################################
+# webserver-password   Password required for accessing the webserver
+#
+# webserver-password=
+
+#################################
+# webserver-port       Port of webserver to listen on
+#
+# webserver-port=8082
+
+#################################
+# write-pid    Write a PID file
+#
+# write-pid=yes
+
+#################################
+# xpf-allow-from       XPF information is only processed from these subnets
+#
+# xpf-allow-from=
+
+#################################
+# xpf-rr-code  XPF option code to use
+#
+# xpf-rr-code=0
+
+
diff --git a/net/pdns-recursor/patches/100-disable-recursor.conf-dist.patch b/net/pdns-recursor/patches/100-disable-recursor.conf-dist.patch
new file mode 100644 (file)
index 0000000..6bd1a0d
--- /dev/null
@@ -0,0 +1,15 @@
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -357,12 +357,6 @@
+ pubsuffix.cc: $(srcdir)/effective_tld_names.dat
+       $(AM_V_GEN)./mkpubsuffixcc
+
+-## Config file
+-sysconf_DATA = recursor.conf-dist
+-
+-recursor.conf-dist: pdns_recursor
+-      $(AM_V_GEN)./pdns_recursor --config > $@
+-
+ ## Manpages
+ MANPAGES=pdns_recursor.1 \
+        rec_control.1
diff --git a/net/pdns/Makefile b/net/pdns/Makefile
new file mode 100644 (file)
index 0000000..41c4e42
--- /dev/null
@@ -0,0 +1,248 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=pdns
+PKG_VERSION:=4.2.0
+PKG_RELEASE:=2
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=https://downloads.powerdns.com/releases/
+PKG_HASH:=222007f25e25aad71ac7d8b7f1797a4bcb30781e456d74ed00396e53828a903a
+
+PKG_MAINTAINER:=James Taylor <james@jtaylor.id.au>
+PKG_LICENCE:=GPL-2.0-only
+PKG_LICENCE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:powerdns:authoritative
+
+PKG_FIXUP:=autoreconf
+
+PKG_INSTALL:=1
+
+PKG_BUILD_PARALLEL:=1
+
+PKG_BUILD_DEPENDS:=unixodbc/host
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/pdns/Default
+  SECTION:=net
+  CATEGORY:=Network
+  SUBMENU:=IP Addresses and Names
+  TITLE:=PowerDNS Authoritative Server
+  DEPENDS:=+libatomic
+  URL:=https://www.powerdns.com/auth.html
+endef
+
+define Package/pdns/description
+  PowerDNS is a versatile nameserver which supports a large number
+  of different backends ranging from simple zonefiles to relational
+  databases and load balancing/failover algorithms.
+  PowerDNS tries to emphasize speed and security.
+
+  This is the authoritative nameserver that answers questions about
+  domains that it knows about. You also need at least one backend installed to
+  serve data.
+endef
+
+PDNS_BACKENDS =
+
+define Package/pdns-backends
+$(call Package/pdns/Default)
+  TITLE+= (all backends)
+  DEPENDS+= $(PDNS_DEPENDS)
+  HIDDEN:=1
+endef
+
+define Package/pdns-backends/description
+ This meta package contains only dependencies for PowerDNS backends.
+endef
+
+# Create a meta-package of dependent backends (for ALL)
+define Package/pdns-backends/install
+  true
+endef
+
+define Package/pdns-tools
+  $(call Package/pdns/Default)
+  TITLE:=Tools for DNS debugging by PowerDNS
+  DEPENDS+=+boost +boost-program_options +libcurl +libmbedtls +libopenssl +p11-kit +protobuf
+endef
+
+define Package/pdns-tools/description
+  PowerDNS is a versatile nameserver which supports a large number
+  of different backends ranging from simple zonefiles to relational
+  databases and load balancing/failover algorithms.
+  PowerDNS tries to emphasize speed and security.
+
+  This package contains several tools to debug DNS issues. These tools do not
+  require any part of the PowerDNS server components to work.
+
+    * dnsbulktest: A resolver stress-tester
+    * dnsgram: Show per 5-second statistics to study intermittent resolver issues
+    * dnsreplay: Replay a pcap with DNS queries
+    * dnsscan: Prints the query-type amounts in a pcap
+    * dnsscope: Calculates statistics without replaying traffic
+    * dnstcpbench: Perform TCP benchmarking of DNS servers
+    * dnswasher: Clean a pcap of identifying IP information
+    * ixplore: Explore diffs from IXFRs
+    * nsec3dig: Calculate the correctness of NSEC3 proofs
+    * saxfr: AXFR zones and show extra information
+endef
+
+define Package/pdns-ixfrdist
+  $(call Package/pdns/Default)
+  TITLE:=Redistribute zones via AXFR and IXFR
+  DEPENDS+=+boost +boost-program_options +libopenssl +libyaml-cpp +p11-kit +protobuf
+endef
+
+define Package/pdns-ixfrdist/description
+  PowerDNS is a versatile nameserver which supports a large number
+  of different backends ranging from simple zonefiles to relational
+  databases and load balancing/failover algorithms.
+  PowerDNS tries to emphasize speed and security.
+
+  This package contains the ixfrdist tool that can redistribute multiple versions
+  of zones over AXFR and IXFR. This tool does not require any part of the
+  PowerDNS server components to work.
+endef
+
+define Package/pdns
+  $(call Package/pdns/Default)
+  DEPENDS+=+boost +boost-program_options +libcurl +liblua +libopenssl +libsqlite3 +p11-kit
+endef
+
+define Package/pdns/config
+       menu "Select PowerDNS backends"
+               depends on PACKAGE_pdns
+               comment "PowerDNS backends"
+
+               $(foreach backend,$(PDNS_BACKENDS), \
+                       config PACKAGE_pdns-backend-$(backend)
+                       prompt "$(PDNS_BACKEND_$(backend)_DESC) backend"
+                       default m if ALL
+               )
+       endmenu
+endef
+
+
+# 1: short name
+# 2: dependencies on other PowerDNS libraries (short name)
+# 3: dependencies on other packages
+# 4: conditional/inward dependencies
+define DefinePdnsBackend
+  PDNS_DEPENDS+= +pdns-backend-$(1)
+  PKG_CONFIG_DEPENDS+= CONFIG_PACKAGE_pdns-backend$(1)
+
+  PDNS_BACKENDS+= $(1)
+
+  PDNS_BACKEND_$(1)_DESC=$(if $(5),$(5),$(1))
+  PDNS_BACKEND_$(1)_LIB=$(if $(4),$(4),$(1))
+
+  define Package/pdns-backend-$(1)
+    $(call Package/pdns/Default)
+    TITLE+= ($(1))
+    DEPENDS+= pdns $$(foreach backend,$(2),+pdns-backend-$$(backend)) $(3)
+    HIDDEN:=1
+  endef
+
+  define Package/pdns-backend-$(1)/description
+   PowerDNS is a versatile nameserver which supports a large number
+   of different backends ranging from simple zonefiles to relational
+   databases and load balancing/failover algorithms.
+   PowerDNS tries to emphasize speed and security.
+
+   This package contains the $(if $(5),$(5),$(1)) backend for the PowerDNS nameserver.
+  endef
+endef
+
+$(eval $(call DefinePdnsBackend,geoip,,libmaxminddb libyaml-cpp,,GeoIP))
+$(eval $(call DefinePdnsBackend,mysql,,libmysqlclient,gmysql,MySQL))
+$(eval $(call DefinePdnsBackend,odbc,,unixodbc,godbc,ODBC))
+$(eval $(call DefinePdnsBackend,pgsql,,libpq,gpgsql,PostgreSQL))
+$(eval $(call DefinePdnsBackend,sqlite3,,libsqlite3,gsqlite3,SQLite 3))
+$(eval $(call DefinePdnsBackend,ldap,,libopenldap krb5-libs,,OpenLDAP))
+$(eval $(call DefinePdnsBackend,lua,,lua liblua,,Lua))
+$(eval $(call DefinePdnsBackend,lua2,,lua liblua,,Lua2))
+$(eval $(call DefinePdnsBackend,mydns,,libmysqlclient,,MyDNS))
+$(eval $(call DefinePdnsBackend,pipe,,,,Pipe))
+$(eval $(call DefinePdnsBackend,remote,,,,Remote))
+
+define Package/pdns/conffiles
+/etc/powerdns/pdns.conf
+/etc/init.d/pdns
+endef
+
+CONFIGURE_ARGS+= \
+       --sysconfdir=/etc/powerdns \
+       --libdir=/usr/lib/powerdns  \
+       --with-dynmodules="$(foreach backend,$(PDNS_BACKENDS),$(if $(CONFIG_PACKAGE_pdns-backend-$(backend)),$(PDNS_BACKEND_$(backend)_LIB),))" \
+       --with-lua="lua" \
+       --with-modules="bind random" \
+       --with-mysql-lib=$(STAGING_DIR)/usr \
+       --with-mysql-includes=$(STAGING_DIR)/usr \
+       $(if $(CONFIG_PACKAGE_pdns-tools),--enable-tools,) \
+       --with-protobuf \
+       --without-libsodium \
+       --enable-experimental-pkcs11 \
+       --enable-lua-records \
+       $(if $(CONFIG_PACKAGE_pdns-ixfrdist),--enable-ixfrdist,)
+
+define Package/pdns/install
+       $(INSTALL_DIR) $(1)/etc/powerdns
+       $(INSTALL_CONF) ./files/pdns.conf-dist $(1)/etc/powerdns/pdns.conf-dist
+       $(INSTALL_DIR) $(1)/etc/init.d
+       $(INSTALL_BIN) ./files/pdns.init $(1)/etc/init.d/pdns
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/pdns_control $(1)/usr/bin/
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/pdnsutil $(1)/usr/bin/
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/zone2sql $(1)/usr/bin/
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/zone2json $(1)/usr/bin/
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(CP) $(PKG_INSTALL_DIR)/usr/sbin/pdns_server $(1)/usr/sbin/
+endef
+
+define Package/pdns/Default/install
+       $(INSTALL_DIR) $(1)/usr/lib/powerdns/pdns
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/powerdns/pdns/lib$(PDNS_BACKEND_$(2)_LIB)backend.so $(1)/usr/lib/powerdns/pdns/
+endef
+
+define Package/pdns-ixfrdist/install
+       $(INSTALL_DIR) $(1)/etc/powerdns
+       $(CP) $(PKG_INSTALL_DIR)/etc/powerdns/ixfrdist.example.yml $(1)/etc/powerdns/
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/ixfrdist $(1)/usr/bin/
+endef
+
+define Package/pdns-tools/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/zone2ldap $(1)/usr/bin/
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/dnsgram $(1)/usr/bin/
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/dnsreplay $(1)/usr/bin/
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/dnsscan $(1)/usr/bin/
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/dnsscope $(1)/usr/bin/
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/dnswasher $(1)/usr/bin/
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/dumresp $(1)/usr/bin/
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/pdns_notify $(1)/usr/bin/
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/nproxy $(1)/usr/bin/
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/nsec3dig $(1)/usr/bin/
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/saxfr $(1)/usr/bin/
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/stubquery $(1)/usr/bin/
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/ixplore $(1)/usr/bin/
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/sdig $(1)/usr/bin/
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/calidns $(1)/usr/bin/
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/dnsbulktest $(1)/usr/bin/
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/dnstcpbench $(1)/usr/bin/
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/dnspcap2protobuf $(1)/usr/bin/
+endef
+
+define BuildPdnsBackend
+  define Package/pdns-backend-$(1)/install
+       $(call Package/pdns/Default/install,$$(1),$(1))
+  endef
+
+  $$(eval $$(call BuildPackage,pdns-backend-$(1)))
+endef
+
+$(foreach backend,$(PDNS_BACKENDS),$(eval $(call BuildPdnsBackend,$(backend))))
+$(eval $(call BuildPackage,pdns))
+$(eval $(call BuildPackage,pdns-tools))
+$(eval $(call BuildPackage,pdns-ixfrdist))
diff --git a/net/pdns/files/pdns.conf-dist b/net/pdns/files/pdns.conf-dist
new file mode 100644 (file)
index 0000000..84b75d3
--- /dev/null
@@ -0,0 +1,652 @@
+# Autogenerated configuration file template
+#################################
+# 8bit-dns     Allow 8bit dns queries
+#
+# 8bit-dns=no
+
+#################################
+# allow-axfr-ips       Allow zonetransfers only to these subnets
+#
+# allow-axfr-ips=127.0.0.0/8,::1
+
+#################################
+# allow-dnsupdate-from A global setting to allow DNS updates from these IP ranges.
+#
+# allow-dnsupdate-from=127.0.0.0/8,::1
+
+#################################
+# allow-notify-from    Allow AXFR NOTIFY from these IP ranges. If empty, drop all incoming notifies.
+#
+# allow-notify-from=0.0.0.0/0,::/0
+
+#################################
+# allow-unsigned-notify        Allow unsigned notifications for TSIG secured domains
+#
+# allow-unsigned-notify=yes
+
+#################################
+# allow-unsigned-supermaster   Allow supermasters to create zones without TSIG signed NOTIFY
+#
+# allow-unsigned-supermaster=yes
+
+#################################
+# also-notify  When notifying a domain, also notify these nameservers
+#
+# also-notify=
+
+#################################
+# any-to-tcp   Answer ANY queries with tc=1, shunting to TCP
+#
+# any-to-tcp=yes
+
+#################################
+# api  Enable/disable the REST API (including HTTP listener)
+#
+# api=no
+
+#################################
+# api-key      Static pre-shared authentication key for access to the REST API
+#
+# api-key=
+
+#################################
+# axfr-lower-serial    Also AXFR a zone from a master with a lower serial
+#
+# axfr-lower-serial=no
+
+#################################
+# cache-ttl    Seconds to store packets in the PacketCache
+#
+# cache-ttl=20
+
+#################################
+# carbon-instance      If set overwrites the the instance name default
+#
+# carbon-instance=auth
+
+#################################
+# carbon-interval      Number of seconds between carbon (graphite) updates
+#
+# carbon-interval=30
+
+#################################
+# carbon-namespace     If set overwrites the first part of the carbon string
+#
+# carbon-namespace=pdns
+
+#################################
+# carbon-ourname       If set, overrides our reported hostname for carbon stats
+#
+# carbon-ourname=
+
+#################################
+# carbon-server        If set, send metrics in carbon (graphite) format to this server IP address
+#
+# carbon-server=
+
+#################################
+# chroot       If set, chroot to this directory for more security
+#
+# chroot=
+
+#################################
+# config-dir   Location of configuration directory (pdns.conf)
+#
+# config-dir=/etc/powerdns
+
+#################################
+# config-name  Name of this virtual configuration - will rename the binary image
+#
+# config-name=
+
+#################################
+# control-console      Debugging switch - don't use
+#
+# control-console=no
+
+#################################
+# daemon       Operate as a daemon
+#
+# daemon=no
+
+#################################
+# default-api-rectify  Default API-RECTIFY value for zones
+#
+# default-api-rectify=yes
+
+#################################
+# default-ksk-algorithm        Default KSK algorithm
+#
+# default-ksk-algorithm=ecdsa256
+
+#################################
+# default-ksk-size     Default KSK size (0 means default)
+#
+# default-ksk-size=0
+
+#################################
+# default-soa-edit     Default SOA-EDIT value
+#
+# default-soa-edit=
+
+#################################
+# default-soa-edit-signed      Default SOA-EDIT value for signed zones
+#
+# default-soa-edit-signed=
+
+#################################
+# default-soa-mail     mail address to insert in the SOA record if none set in the backend
+#
+# default-soa-mail=
+
+#################################
+# default-soa-name     name to insert in the SOA record if none set in the backend
+#
+# default-soa-name=a.misconfigured.powerdns.server
+
+#################################
+# default-ttl  Seconds a result is valid if not set otherwise
+#
+# default-ttl=3600
+
+#################################
+# default-zsk-algorithm        Default ZSK algorithm
+#
+# default-zsk-algorithm=
+
+#################################
+# default-zsk-size     Default ZSK size (0 means default)
+#
+# default-zsk-size=0
+
+#################################
+# direct-dnskey        Fetch DNSKEY, CDS and CDNSKEY RRs from backend during DNSKEY or CDS/CDNSKEY synthesis
+#
+# direct-dnskey=no
+
+#################################
+# disable-axfr Disable zonetransfers but do allow TCP queries
+#
+# disable-axfr=no
+
+#################################
+# disable-axfr-rectify Disable the rectify step during an outgoing AXFR. Only required for regression testing.
+#
+# disable-axfr-rectify=no
+
+#################################
+# disable-syslog       Disable logging to syslog, useful when running inside a supervisor that logs stdout
+#
+# disable-syslog=no
+
+#################################
+# distributor-threads  Default number of Distributor (backend) threads to start
+#
+# distributor-threads=3
+
+#################################
+# dname-processing     If we should support DNAME records
+#
+# dname-processing=no
+
+#################################
+# dnssec-key-cache-ttl Seconds to cache DNSSEC keys from the database
+#
+# dnssec-key-cache-ttl=30
+
+#################################
+# dnsupdate    Enable/Disable DNS update (RFC2136) support. Default is no.
+#
+# dnsupdate=no
+
+#################################
+# do-ipv6-additional-processing        Do AAAA additional processing
+#
+# do-ipv6-additional-processing=yes
+
+#################################
+# domain-metadata-cache-ttl    Seconds to cache domain metadata from the database
+#
+# domain-metadata-cache-ttl=60
+
+#################################
+# edns-subnet-processing       If we should act on EDNS Subnet options
+#
+# edns-subnet-processing=no
+
+#################################
+# enable-lua-records   Process LUA records for all zones (metadata overrides this)
+#
+# enable-lua-records=no
+
+#################################
+# entropy-source       If set, read entropy from this file
+#
+# entropy-source=/dev/urandom
+
+#################################
+# expand-alias Expand ALIAS records
+#
+# expand-alias=no
+
+#################################
+# forward-dnsupdate    A global setting to allow DNS update packages that are for a Slave domain, to be forwarded to the master.
+#
+# forward-dnsupdate=yes
+
+#################################
+# forward-notify       IP addresses to forward received notifications to regardless of master or slave settings
+#
+# forward-notify=
+
+#################################
+# guardian     Run within a guardian process
+#
+# guardian=no
+
+#################################
+# include-dir  Include *.conf files from this directory
+#
+# include-dir=
+
+#################################
+# launch       Which backends to launch and order to query them in
+#
+# launch=
+
+#################################
+# load-modules Load this module - supply absolute or relative path
+#
+# load-modules=
+
+#################################
+# local-address        Local IP addresses to which we bind
+#
+# local-address=0.0.0.0
+
+#################################
+# local-address-nonexist-fail  Fail to start if one or more of the local-address's do not exist on this server
+#
+# local-address-nonexist-fail=yes
+
+#################################
+# local-ipv6   Local IP address to which we bind
+#
+# local-ipv6=::
+
+#################################
+# local-ipv6-nonexist-fail     Fail to start if one or more of the local-ipv6 addresses do not exist on this server
+#
+# local-ipv6-nonexist-fail=yes
+
+#################################
+# local-port   The port on which we listen
+#
+# local-port=53
+
+#################################
+# log-dns-details      If PDNS should log DNS non-erroneous details
+#
+# log-dns-details=no
+
+#################################
+# log-dns-queries      If PDNS should log all incoming DNS queries
+#
+# log-dns-queries=no
+
+#################################
+# log-timestamp        Print timestamps in log lines
+#
+# log-timestamp=yes
+
+#################################
+# logging-facility     Log under a specific facility
+#
+# logging-facility=
+
+#################################
+# loglevel     Amount of logging. Higher is more. Do not set below 3
+#
+# loglevel=4
+
+#################################
+# lua-axfr-script      Script to be used to edit incoming AXFRs
+#
+# lua-axfr-script=
+
+#################################
+# lua-dnsupdate-policy-script  Lua script with DNS update policy handler
+#
+# lua-dnsupdate-policy-script=
+
+#################################
+# lua-prequery-script  Lua script with prequery handler (DO NOT USE)
+#
+# lua-prequery-script=
+
+#################################
+# lua-records-exec-limit       LUA records scripts execution limit (instructions count). Values <= 0 mean no limit
+#
+# lua-records-exec-limit=1000
+
+#################################
+# master       Act as a master
+#
+# master=no
+
+#################################
+# max-cache-entries    Maximum number of entries in the query cache
+#
+# max-cache-entries=1000000
+
+#################################
+# max-ent-entries      Maximum number of empty non-terminals in a zone
+#
+# max-ent-entries=100000
+
+#################################
+# max-nsec3-iterations Limit the number of NSEC3 hash iterations
+#
+# max-nsec3-iterations=500
+
+#################################
+# max-packet-cache-entries     Maximum number of entries in the packet cache
+#
+# max-packet-cache-entries=1000000
+
+#################################
+# max-queue-length     Maximum queuelength before considering situation lost
+#
+# max-queue-length=5000
+
+#################################
+# max-signature-cache-entries  Maximum number of signatures cache entries
+#
+# max-signature-cache-entries=
+
+#################################
+# max-tcp-connection-duration  Maximum time in seconds that a TCP DNS connection is allowed to stay open.
+#
+# max-tcp-connection-duration=0
+
+#################################
+# max-tcp-connections  Maximum number of TCP connections
+#
+# max-tcp-connections=20
+
+#################################
+# max-tcp-connections-per-client       Maximum number of simultaneous TCP connections per client
+#
+# max-tcp-connections-per-client=0
+
+#################################
+# max-tcp-transactions-per-conn        Maximum number of subsequent queries per TCP connection
+#
+# max-tcp-transactions-per-conn=0
+
+#################################
+# module-dir   Default directory for modules
+#
+# module-dir=/usr/lib/powerdns/pdns
+
+#################################
+# negquery-cache-ttl   Seconds to store negative query results in the QueryCache
+#
+# negquery-cache-ttl=60
+
+#################################
+# no-shuffle   Set this to prevent random shuffling of answers - for regression testing
+#
+# no-shuffle=off
+
+#################################
+# non-local-bind       Enable binding to non-local addresses by using FREEBIND / BINDANY socket options
+#
+# non-local-bind=no
+
+#################################
+# only-notify  Only send AXFR NOTIFY to these IP addresses or netmasks
+#
+# only-notify=0.0.0.0/0,::/0
+
+#################################
+# outgoing-axfr-expand-alias   Expand ALIAS records during outgoing AXFR
+#
+# outgoing-axfr-expand-alias=no
+
+#################################
+# overload-queue-length        Maximum queuelength moving to packetcache only
+#
+# overload-queue-length=0
+
+#################################
+# prevent-self-notification    Don't send notifications to what we think is ourself
+#
+# prevent-self-notification=yes
+
+#################################
+# query-cache-ttl      Seconds to store query results in the QueryCache
+#
+# query-cache-ttl=20
+
+#################################
+# query-local-address  Source IP address for sending queries
+#
+# query-local-address=0.0.0.0
+
+#################################
+# query-local-address6 Source IPv6 address for sending queries
+#
+# query-local-address6=::
+
+#################################
+# query-logging        Hint backends that queries should be logged
+#
+# query-logging=no
+
+#################################
+# queue-limit  Maximum number of milliseconds to queue a query
+#
+# queue-limit=1500
+
+#################################
+# receiver-threads     Default number of receiver threads to start
+#
+# receiver-threads=1
+
+#################################
+# resolver     Use this resolver for ALIAS and the internal stub resolver
+#
+# resolver=no
+
+#################################
+# retrieval-threads    Number of AXFR-retrieval threads for slave operation
+#
+# retrieval-threads=2
+
+#################################
+# reuseport    Enable higher performance on compliant kernels by using SO_REUSEPORT allowing each receiver thread to open its own socket
+#
+# reuseport=no
+
+#################################
+# rng  Specify the random number generator to use. Valid values are auto,sodium,openssl,getrandom,arc4random,urandom.
+#
+# rng=auto
+
+#################################
+# security-poll-suffix Domain name from which to query security update notifications
+#
+# security-poll-suffix=secpoll.powerdns.com.
+
+#################################
+# send-signed-notify   Send TSIG secured NOTIFY if TSIG key is configured for a domain
+#
+# send-signed-notify=yes
+
+#################################
+# server-id    Returned when queried for 'id.server' TXT or NSID, defaults to hostname - disabled or custom
+#
+# server-id=
+
+#################################
+# setgid       If set, change group id to this gid for more security
+#
+# setgid=
+
+#################################
+# setuid       If set, change user id to this uid for more security
+#
+# setuid=
+
+#################################
+# signing-threads      Default number of signer threads to start
+#
+# signing-threads=3
+
+#################################
+# slave        Act as a slave
+#
+# slave=no
+
+#################################
+# slave-cycle-interval Schedule slave freshness checks once every .. seconds
+#
+# slave-cycle-interval=60
+
+#################################
+# slave-renotify       If we should send out notifications for slaved updates
+#
+# slave-renotify=no
+
+#################################
+# soa-expire-default   Default SOA expire
+#
+# soa-expire-default=604800
+
+#################################
+# soa-minimum-ttl      Default SOA minimum ttl
+#
+# soa-minimum-ttl=3600
+
+#################################
+# soa-refresh-default  Default SOA refresh
+#
+# soa-refresh-default=10800
+
+#################################
+# soa-retry-default    Default SOA retry
+#
+# soa-retry-default=3600
+
+#################################
+# socket-dir   Where the controlsocket will live, /var/run when unset and not chrooted
+#
+# socket-dir=
+
+#################################
+# superslave   Act as a superslave
+#
+# superslave=no
+
+#################################
+# tcp-control-address  If set, PowerDNS can be controlled over TCP on this address
+#
+# tcp-control-address=
+
+#################################
+# tcp-control-port     If set, PowerDNS can be controlled over TCP on this address
+#
+# tcp-control-port=53000
+
+#################################
+# tcp-control-range    If set, remote control of PowerDNS is possible over these networks only
+#
+# tcp-control-range=127.0.0.0/8, 10.0.0.0/8, 192.168.0.0/16, 172.16.0.0/12, ::1/128, fe80::/10
+
+#################################
+# tcp-control-secret   If set, PowerDNS can be controlled over TCP after passing this secret
+#
+# tcp-control-secret=
+
+#################################
+# tcp-fast-open        Enable TCP Fast Open support on the listening sockets, using the supplied numerical value as the queue size
+#
+# tcp-fast-open=0
+
+#################################
+# tcp-idle-timeout     Maximum time in seconds that a TCP DNS connection is allowed to stay open while being idle
+#
+# tcp-idle-timeout=5
+
+#################################
+# traceback-handler    Enable the traceback handler (Linux only)
+#
+# traceback-handler=yes
+
+#################################
+# trusted-notification-proxy   IP address of incoming notification proxy
+#
+# trusted-notification-proxy=
+
+#################################
+# udp-truncation-threshold     Maximum UDP response size before we truncate
+#
+# udp-truncation-threshold=1232
+
+#################################
+# version-string       PowerDNS version in packets - full, anonymous, powerdns or custom
+#
+# version-string=full
+
+#################################
+# webserver    Start a webserver for monitoring (api=yes also enables the HTTP listener)
+#
+# webserver=no
+
+#################################
+# webserver-address    IP Address of webserver/API to listen on
+#
+# webserver-address=127.0.0.1
+
+#################################
+# webserver-allow-from Webserver/API access is only allowed from these subnets
+#
+# webserver-allow-from=127.0.0.1,::1
+
+#################################
+# webserver-loglevel   Amount of logging in the webserver (none, normal, detailed)
+#
+# webserver-loglevel=normal
+
+#################################
+# webserver-max-bodysize       Webserver/API maximum request/response body size in megabytes
+#
+# webserver-max-bodysize=2
+
+#################################
+# webserver-password   Password required for accessing the webserver
+#
+# webserver-password=
+
+#################################
+# webserver-port       Port of webserver/API to listen on
+#
+# webserver-port=8081
+
+#################################
+# webserver-print-arguments    If the webserver should print arguments
+#
+# webserver-print-arguments=no
+
+#################################
+# write-pid    Write a PID file
+#
+# write-pid=yes
+
+#################################
+# xfr-max-received-mbytes      Maximum number of megabytes received from an incoming XFR
+#
+# xfr-max-received-mbytes=100
+
+
diff --git a/net/pdns/files/pdns.init b/net/pdns/files/pdns.init
new file mode 100644 (file)
index 0000000..85a14cd
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/sh /etc/rc.common
+START=99
+
+USE_PROCD=1
+
+start_service() {
+       [ -e /etc/powerdns/pdns.conf ] || return 1
+
+       procd_open_instance
+       procd_set_param command /usr/sbin/pdns_server --daemon=no --guardian=no
+       procd_set_param file /etc/powerdns/pdns.conf
+       procd_set_param respawn
+       procd_close_instance
+}
diff --git a/net/pdns/patches/100-pdns-disable-pdns.conf-dist.patch b/net/pdns/patches/100-pdns-disable-pdns.conf-dist.patch
new file mode 100644 (file)
index 0000000..bb9af15
--- /dev/null
@@ -0,0 +1,34 @@
+--- a/pdns/Makefile.am
++++ b/pdns/Makefile.am
+@@ -69,11 +69,9 @@
+       backends/gsql/gsqlbackend.gcda \
+       backends/gsql/gsqlbackend.gcno \
+       backends/gsql/gsqlbackend.gcov \
+-      dnsmessage.pb.cc dnsmessage.pb.h \
+-      pdns.conf-dist
++      dnsmessage.pb.cc dnsmessage.pb.h
+ noinst_SCRIPTS = pdns.init
+-sysconf_DATA = pdns.conf-dist
+ sbin_PROGRAMS = pdns_server
+ bin_PROGRAMS = \
+@@ -113,7 +111,7 @@
+ bin_PROGRAMS += \
+       ixfrdist
+-sysconf_DATA += \
++sysconf_DATA = \
+       ixfrdist.example.yml
+ endif
+@@ -1256,9 +1254,6 @@
+ endif
+ endif
+-pdns.conf-dist: pdns_server
+-      $(AM_V_GEN)./pdns_server --no-config --config 2>/dev/null > $@
+-
+ testrunner_SOURCES = \
+       arguments.cc \
+       auth-caches.cc auth-caches.hh \
index 66284f3272093724f044c5e39e2793d1a1537561..c444a938e1e13c21fd0022c4f7e10664d02045ea 100644 (file)
@@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=pen
 PKG_VERSION:=0.34.1
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://siag.nu/pub/pen/
 PKG_HASH:=2b640795029df9d1672e17202c109cc5d42538f6754a6070dc27da640881e864
 
-PKG_LICENSE:=GPL-2.0+
+PKG_LICENSE:=GPL-2.0-or-later
 PKG_LICENSE_FILES:=COPYING
 PKG_MAINTAINER:=
 
diff --git a/net/phantap/Makefile b/net/phantap/Makefile
new file mode 100644 (file)
index 0000000..6bd0a25
--- /dev/null
@@ -0,0 +1,65 @@
+# Copyright (C) 2019 Diana Dragusin <diana.dragusin@nccgroup.com>
+# Copyright (C) 2019 Etienne Champetier <champetier.etienne@gmail.com>
+#
+# This is free software, licensed under the GNU General Public License v3.
+# See <http://www.gnu.org/licenses/> for more information.
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=phantap
+PKG_RELEASE:=1
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/nccgroup/phantap
+PKG_MIRROR_HASH:=a8bbcdeb3520384ad7a7ff26324143dfd2e1baaf04e32396501dbfc78819287c
+PKG_SOURCE_DATE:=2019.09.18
+PKG_SOURCE_VERSION:=7cc6017ee445885a99d52e556406c07093aa2bb1
+
+PKG_MAINTAINER:=Diana Dragusin <diana.dragusin@nccgroup.com>, \
+    Etienne Champetier <champetier.etienne@gmail.com>
+PKG_LICENSE:=GPL-3.0-only
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+CMAKE_SOURCE_SUBDIR:=src
+
+define Package/phantap/Default
+  SECTION:=net
+  CATEGORY:=Network
+  URL:=https://github.com/nccgroup/phantap
+endef
+
+define Package/phantap
+  $(call Package/phantap/Default)
+  TITLE:=PhanTap
+  PKGARCH:=all
+  DEPENDS:=+ebtables +libpcap +ip-full +kmod-br-netfilter +kmod-ebtables-ipv4
+endef
+
+define Package/phantap/conffiles
+/etc/config/phantap
+endef
+
+define Package/phantap/description
+  PhanTap or Phantom tap is a small set of scripts and C code that allow you to setup a
+  network tap that automatically impersonate a victim device, allowing you to access
+  internet using the IP & MAC of the victim.
+endef
+
+define Package/phantap/install
+       $(INSTALL_DIR) $(1)/etc/config
+       $(INSTALL_DATA) $(PKG_BUILD_DIR)/files/etc/config/phantap $(1)/etc/config/
+       $(INSTALL_DIR) $(1)/etc/hotplug.d/iface
+       $(INSTALL_DATA) $(PKG_BUILD_DIR)/files/etc/hotplug.d/iface/00-phantap $(1)/etc/hotplug.d/iface/
+       $(INSTALL_DIR) $(1)/etc/hotplug.d/net
+       $(INSTALL_DATA) $(PKG_BUILD_DIR)/files/etc/hotplug.d/net/00-phantap $(1)/etc/hotplug.d/net/
+       $(INSTALL_DIR) $(1)/etc/init.d
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/files/etc/init.d/phantap $(1)/etc/init.d/
+       $(INSTALL_DIR) $(1)/etc/sysctl.d
+       $(INSTALL_DATA) $(PKG_BUILD_DIR)/files/etc/sysctl.d/12-phantap.conf $(1)/etc/sysctl.d/
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/phantap-learn $(1)/usr/sbin/
+endef
+
+$(eval $(call BuildPackage,phantap))
index 4f3a711c2d3f65887c08b73db64cf5a0a76a8ed7..dfd15995ef5c1cd2155295e3a679c0b9d033c40a 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=pingcheck
 PKG_VERSION:=2017-10-02
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_MIRROR_HASH:=8c8d1743b8972ade6c75027346fc652f7a1c0f17e2f9bd2e65aad20013d9870e
@@ -19,7 +19,7 @@ PKG_SOURCE_PROTO:=git
 PKG_SOURCE_VERSION:=12e65e2f3fd2a17db785d28756df43ccade29b1b
 
 PKG_MAINTAINER:=Bruno Randolf <br1@einfach.org>
-PKG_LICENSE:=GPL-2.0+
+PKG_LICENSE:=GPL-2.0-or-later
 PKG_LICENSE_FILES:=LICENSE
 
 PKG_BUILD_PARALLEL:=1
index 9d5fd41c2c14b0ce2327a8fe23063eace2d2484b..d63d0e951bcadfca247c6923962f84d0dc157e4e 100644 (file)
@@ -22,7 +22,7 @@ include $(INCLUDE_DIR)/package.mk
 define Package/pixiewps
   SECTION:=net
   CATEGORY:=Network
-  SUBMENU:=wireless
+  SUBMENU:=Wireless
   TITLE:=An offline WPS bruteforce utility
   URL:=https://github.com/wiire-a/pixiewps
   DEPENDS:=+libpthread
index 93aa18a26a28b5e6cfd98904d27268f67ba77a02..52ccf6e2717fe9308f4e2837d17d3032fc82af98 100644 (file)
@@ -15,6 +15,8 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.pps.jussieu.fr/~jch/software/files/$(PKG_NAME)/
 PKG_HASH:=a259750793ab79c491d05fcee5a917faf7d9030fb5d15e05b3704e9c9e4ee015
 
+PKG_CPE_ID:=cpe:/a:pps.jussieu:polipo
+
 include $(INCLUDE_DIR)/package.mk
 
 define Package/polipo
index 083254b834bcf0553650009b1c9b12954fcd8abf..6c90f4f492b74153d6c020b74a47fd0659083e8d 100644 (file)
@@ -18,6 +18,8 @@ PKG_HASH:=8fcd8b8a42de2af59e9fe8cbaa9f894045c977f4d038bbd6346a8522bb7f06c0
 PKG_INSTALL:=1
 PKG_BUILD_PARALLEL:=1
 
+PKG_CPE_ID:=cpe:/a:poptop:pptp_server
+
 include $(INCLUDE_DIR)/package.mk
 
 define Package/pptpd
index d350875d3c15cc4639165deec7ffa0dc88cc4e49..c33efd9c6b611b5fde6b73a272943d1c57e71bd2 100644 (file)
@@ -20,6 +20,7 @@ PKG_INSTALL:=1
 
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=LICENSE
+PKG_CPE_ID:=cpe:/a:privoxy:privoxy
 
 PKG_MAINTAINER:=
 
index c5c0d89138d91f7d35c06eb5e7941186c17aee09..1720af76d3e10fbe6ec86618226b8db3765a6bfd 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=prosody
 PKG_VERSION:=0.11.2
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://prosody.im/downloads/source
@@ -104,10 +104,10 @@ define Package/prosody/install
        $(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/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/prosody/util/*.so $(1)/usr/lib/prosody/util/
        $(INSTALL_DIR) $(1)/usr/lib/prosody/util/sasl
        $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/util/sasl/*.lua $(1)/usr/lib/prosody/util/sasl/
-       #$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/prosody/util/sasl/*.so $(1)/usr/lib/prosody/util/sasl/
+       #$(CP) $(PKG_INSTALL_DIR)/usr/lib/prosody/util/sasl/*.so $(1)/usr/lib/prosody/util/sasl/
 endef
 
 define Package/prosody/postinst
diff --git a/net/proxychains-ng/Makefile b/net/proxychains-ng/Makefile
new file mode 100644 (file)
index 0000000..7ed4e5b
--- /dev/null
@@ -0,0 +1,67 @@
+#
+# Copyright (C) 2019 Daniel Bermond
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=proxychains-ng
+PKG_VERSION:=4.14
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/rofl0r/proxychains-ng/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=ab31626af7177cc2669433bb244b99a8f98c08031498233bb3df3bcc9711a9cc
+
+PKG_MAINTAINER:=Daniel Bermond <dbermond@archlinux.org>
+PKG_LICENSE:=GPL-2.0-or-later
+PKG_LICENSE_FILES:=COPYING
+
+PKG_BUILD_PARALLEL:=1
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/proxychains-ng
+  SECTION:=net
+  CATEGORY:=Network
+  TITLE:=Redirect TCP traffic to a HTTP or SOCKS proxy
+  URL:=https://github.com/rofl0r/proxychains/
+endef
+
+define Package/proxychains-ng/description
+  A hook preloader that allows to redirect TCP traffic of
+  existing dynamically linked programs through one or more
+  SOCKS or HTTP proxies.
+endef
+
+define Build/Compile
+       $(call Build/Compile/Default,all)
+endef
+
+define Build/Install
+       $(call Build/Install/Default,install install-config)
+endef
+
+define Package/proxychains-ng/conffiles
+/etc/proxychains.conf
+endef
+
+define Package/proxychains-ng/install
+       # binary executable
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/proxychains4 $(1)/usr/bin/
+       $(LN) proxychains4 $(1)/usr/bin/proxychains
+       
+       # library
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libproxychains4.so $(1)/usr/lib/
+       
+       # config
+       $(INSTALL_DIR) $(1)/etc
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/proxychains.conf $(1)/etc/
+endef
+
+$(eval $(call BuildPackage,proxychains-ng))
index e1434db6198edfdddfc0120a1d7fef7dd4e7b286..8b850be05d7c14b8ce711f5ea9c4a082c4e57ea5 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=quassel-irssi
 PKG_SOURCE_DATE:=2017-11-30
 PKG_SOURCE_VERSION:=079be662dde374a383646256108a4974c2bc7796
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_DATE).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/phhusson/quassel-irssi/tar.gz/$(PKG_SOURCE_VERSION)?
@@ -18,7 +18,7 @@ PKG_HASH:=c276a92a47f8edf5ae1d9db0e72a69d078f2f3f80e055853fc6d06099d898966
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_SOURCE_VERSION)
 
 PKG_MAINTAINER:=Ben Rosser <rosser.bjr@gmail.com>
-PKG_LICENSE:=GPL-3.0+
+PKG_LICENSE:=GPL-3.0-or-later
 PKG_LICENSE_FILES:=core/COPYING
 
 PKG_BUILD_PARALLEL:=1
index 248bac4b5fa7a24a2c9fee9456bbce64018a6583..aa73850818f3673758838fa5833e98f6ef6d9596 100644 (file)
@@ -1,6 +1,6 @@
 --- a/core/Makefile
 +++ b/core/Makefile
-@@ -49,7 +49,7 @@ irssi/network-openssl.o: CFLAGS:=$(IRSSI_CFLAGS)
+@@ -49,7 +49,7 @@ irssi/network-openssl.o: CFLAGS:=$(IRSSI
  quasselc-connector.o: CFLAGS:=$(CFLAGS)
  
  $(TARGET): $(OBJECTS)
index f33c046aa62b4967812494c19ba278f1670e337c..ddf313a9fd8b5a430beb92119990a27f82e2daba 100644 (file)
@@ -8,4 +8,4 @@
 +    LDFLAGS += $(shell pkg-config --libs quasselc)
  endif
  
- CFLAGS+=-std=gnu11 -Wall -Wextra -Werror -g $(IRSSI_CFLAGS) $(QUASSELC_FLAGS) -Wmissing-prototypes -Wmissing-declarations
+ CFLAGS+=-std=gnu11 -Wall -Wextra -g $(IRSSI_CFLAGS) $(QUASSELC_FLAGS) -Wmissing-prototypes -Wmissing-declarations
index 0e0727a0d6deb53aee8b9556dadd82e326bd5633..5c84128b5a4496515a41e5fd4c02044567008323 100644 (file)
@@ -8,11 +8,9 @@ Subject: [PATCH] Get compatible with potential irssi abi 8, and drop polling
  core/quassel-net.c | 64 ++++++++++++++++++++++++++++++++++++++--------
  2 files changed, 53 insertions(+), 10 deletions(-)
 
-diff --git a/core/Makefile b/core/Makefile
-index c1c65fc..987bd7b 100644
 --- a/core/Makefile
 +++ b/core/Makefile
-@@ -16,7 +16,6 @@ SSL_CFLAGS=$(shell pkg-config --cflags openssl)
+@@ -16,7 +16,6 @@ SSL_CFLAGS=$(shell pkg-config --cflags o
  SSL_LDLAGS=$(shell pkg-config --libs openssl)
  OBJECTS:=quasselc-connector.o quassel-core.o
  OBJECTS+=quassel-net.o quassel-msgs.o quassel-cmds.o
@@ -20,11 +18,9 @@ index c1c65fc..987bd7b 100644
  OBJECTS+=quassel-fe-window.o quassel-fe-level.o quassel-cfg.o
  
  LDFLAGS ?=
-diff --git a/core/quassel-net.c b/core/quassel-net.c
-index 8a6eb55..5db7fe0 100644
 --- a/core/quassel-net.c
 +++ b/core/quassel-net.c
-@@ -132,10 +132,10 @@ static SERVER_REC* quassel_server_init_connect(SERVER_CONNECT_REC* conn) {
+@@ -132,10 +132,10 @@ static SERVER_REC* quassel_server_init_c
        ret->got = 0;
        server_connect_ref(SERVER_CONNECT(conn));
  
@@ -37,7 +33,7 @@ index 8a6eb55..5db7fe0 100644
  
        ret->channels_join = quassel_irssi_channels_join;
        ret->send_message = quassel_irssi_send_message;
-@@ -161,12 +161,59 @@ void quassel_net_init(CHAT_PROTOCOL_REC* rec) {
+@@ -161,12 +161,59 @@ void quassel_net_init(CHAT_PROTOCOL_REC*
        signal_add_first("server connected", (SIGNAL_FUNC) sig_connected);
  }
  
@@ -113,6 +109,3 @@ index 8a6eb55..5db7fe0 100644
  }
  
  void quassel_irssi_init_nack(void *arg) {
--- 
-2.17.1
-
index 7f413ae1af15e5d1bfa07e3a8b43526712d7d5d9..6f589509578d5457d25106c6cae3f9026050a53c 100644 (file)
@@ -8,97 +8,54 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=radicale
 PKG_VERSION:=1.1.6
-PKG_RELEASE:=2
-PKG_MAINTAINER:=
+PKG_RELEASE:=3
+
+PKG_SOURCE:=Radicale-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/R/Radicale
+PKG_HASH:=c007198ea45ef797344672c681d4c13f8b4aa85c15c41a1156225767a405c92b
 
+PKG_BUILD_DIR:=$(BUILD_DIR)/Radicale-$(PKG_VERSION)
+
+PKG_MAINTAINER:=
 PKG_LICENSE:=GPL-3.0
 PKG_LICENSE_FILES:=COPYING
-
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL=https://github.com/Kozea/Radicale
-PKG_SOURCE_VERSION:=7568ec39f09a753217fb2d525c5f8db64f4d98f4
-PKG_MIRROR_HASH:=73de51e296479f860d4d8cd383a6aa34e8c702d9fca63b0499c7fcc2e794e6df
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_SOURCE_SUBDIR=$(PKG_NAME)-$(PKG_VERSION)
+PKG_CPE_ID:=cpe:/a:radicale:radicale
 
 include $(INCLUDE_DIR)/package.mk
-include ../../lang/python/python-package.mk
 include ../../lang/python/python3-package.mk
 
-# no default dependencies
-PKG_DEFAULT_DEPENDS:=
-
-define Package/radicale/Default
+define Package/radicale
   SECTION:=net
   CATEGORY:=Network
   SUBMENU:=Web Servers/Proxies
-  URL:=http://radicale.org/
   TITLE:=Radicale CalDAV/CardDAV server
-  PKGARCH:=all
+  URL:=https://radicale.org/
+  DEPENDS:= \
+      +python3-light \
+      +python3-codecs \
+      +python3-logging \
+      +python3-openssl \
+      +python3-urllib \
+      +python3-xml
   USERID:=radicale=5232:radicale=5232
-endef
-define Package/radicale-py2
-  $(call Package/radicale/Default)
-  TITLE+= (Python 2)
-  VARIANT:=2
-  DEPENDS:=+python-logging +python-openssl +python-xml +python-codecs
-endef
-define Package/radicale-py3
-  $(call Package/radicale/Default)
-  TITLE+= (Python 3)
-  VARIANT:=3
-  DEPENDS:=+python3-logging +python3-openssl +python3-xml +python3-codecs +python3-email
-endef
-
-# shown in LuCI package description
-define Package/radicale-py2/description
-Radicale CalDAV/CardDAV server (Python 2) - Homepage: http://radicale.org/
-endef
-define Package/radicale-py3/description
-Radicale CalDAV/CardDAV server (Python 3) - Homepage: http://radicale.org/
+  PROVIDES:=radicale-py2 radicale-py3
+  VARIANT:=python3
 endef
 
-# shown in make menuconfig <Help>
-define Package/radicale-py2/config
-    help
-       The Radicale Project is a CalDAV (calendar) and CardDAV (contact) server.
-       It aims to be a light solution, easy to use, easy to install, easy to configure.
-       As a consequence, it requires few software dependances and is pre-configured to work out-of-the-box.
-       !!! Will install and use Python $(VARIANT) !!!
-       .
-       Version : $(PKG_VERSION)
-       Homepage: http://radicale.org/
+define Package/radicale/description
+  The Radicale Project is a CalDAV (calendar) and CardDAV (contact) server.  It
+  aims to be a light solution, easy to use, easy to install, easy to configure.
+  As a consequence, it requires few software dependances and is pre-configured to
+  work out-of-the-box.
 endef
-Package/radicale-py3/config = $(Package/radicale-py2/config)
 
-define Package/radicale-py2/conffiles
+define Package/radicale/conffiles
 /etc/config/radicale
 /etc/radicale/users
 /etc/radicale/rights
 endef
-Package/radicale-py3/conffiles = $(Package/radicale-py2/conffiles)
 
-define Build/Configure
-       # nothing to configure
-endef
-define Build/Compile
-       # nothing to compile
-endef
-
-define Package/radicale-py2/preinst
-       #!/bin/sh
-       [ -n "$${IPKG_INSTROOT}" ] && exit 0    # if run within buildroot exit
-
-       # stop service if PKG_UPGRADE
-       [ "$${PKG_UPGRADE}" = "1" ] && /etc/init.d/radicale stop >/dev/null 2>&1
-
-       exit 0  # suppress errors from stop command
-endef
-define Package/radicale-py3/preinst
-$(call Package/radicale-py2/preinst)
-endef
-
-define Package/radicale/inst_all
+define Py3Package/radicale/install
        $(INSTALL_DIR)  $(1)/etc/init.d
        $(INSTALL_BIN)  ./files/radicale.init    $(1)/etc/init.d/radicale
 
@@ -108,9 +65,6 @@ define Package/radicale/inst_all
        $(INSTALL_DIR)  $(1)/etc/config
        $(INSTALL_CONF) ./files/radicale.config  $(1)/etc/config/radicale
 
-       $(INSTALL_DIR)  $(1)/lib/upgrade/keep.d
-       $(INSTALL_DATA) ./files/radicale.upgrade $(1)/lib/upgrade/keep.d/radicale
-
        $(INSTALL_DIR)  $(1)/etc/radicale/ssl
        $(INSTALL_DATA) ./files/config.template  $(1)/etc/radicale/config.template
        $(INSTALL_DATA) ./files/logging.template $(1)/etc/radicale/logging.template
@@ -118,29 +72,9 @@ define Package/radicale/inst_all
        $(INSTALL_DATA) ./files/radicale.rights  $(1)/etc/radicale/rights
 
        $(INSTALL_DIR) $(1)/usr/bin
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/radicale $(1)/usr/bin/
-endef
-define Package/radicale-py2/install
-       $(call Package/radicale/inst_all, $(1))
-       $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)/radicale
-       $(CP) $(PKG_BUILD_DIR)/radicale/* $(1)$(PYTHON_PKG_DIR)/radicale
-endef
-define Package/radicale-py3/install
-       $(call Package/radicale/inst_all, $(1))
-       $(INSTALL_DIR) $(1)$(PYTHON3_PKG_DIR)/radicale
-       $(CP) $(PKG_BUILD_DIR)/radicale/* $(1)$(PYTHON3_PKG_DIR)/radicale
-endef
-
-define Package/radicale-py2/postinst
-       #!/bin/sh
-       # patch /usr/bin/radicale force run using python2
-       /bin/sed -i 's/python/python2/' $${IPKG_INSTROOT}/usr/bin/radicale
-endef
-define Package/radicale-py3/postinst
-       #!/bin/sh
-       # patch /usr/bin/radicale force run using python3
-       /bin/sed -i 's/python/python3/' $${IPKG_INSTROOT}/usr/bin/radicale
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/radicale $(1)/usr/bin/
 endef
 
-$(eval $(call BuildPackage,radicale-py2))
-$(eval $(call BuildPackage,radicale-py3))
+$(eval $(call Py3Package,radicale))
+$(eval $(call BuildPackage,radicale))
+$(eval $(call BuildPackage,radicale-src))
diff --git a/net/radicale/files/radicale.upgrade b/net/radicale/files/radicale.upgrade
deleted file mode 100644 (file)
index 760782f..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-/etc/config/radicale
-/etc/radicale/users
-/etc/radicale/rights
-
index 5bf5c1f44417d73df57d229321087874b3c7c240..1ed70584813813dc4bf713c623a9374c435472b0 100644 (file)
@@ -10,6 +10,7 @@ PKG_MAINTAINER:=Daniel Dickinson <cshored@thecshore.com>
 
 PKG_LICENSE:=GPL-3.0
 PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:radicale:radicale
 
 PKG_SOURCE:=Radicale-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/R/Radicale/
index 76a1a3ca90f28b0e4e9112ce7826c272ab33da15..8a0f9ebebbf927d0512ae29e3884399b19453433 100644 (file)
@@ -17,6 +17,7 @@ PKG_HASH:=2cf23e618ab9275221350acf5a97bce4ff18aee472045f8a3b4c7673491079d2
 
 PKG_LICENSE:=BSD-3-CLAUSE
 PKG_LICENSE_FILES:=LICENSE
+PKG_CPE_ID:=cpe:/a:uninett:radsecproxy
 
 PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
index 681c511df07d195dc7ec4b9522a21354add39bfa..befa38d6762cfe8eebda34550e85c111bf9067fd 100644 (file)
@@ -9,11 +9,11 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ratechecker
 PKG_VERSION:=0.0.20170609
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_REV:=4cd4e3c70d9832336af5ba157f2a272f9c0098dc
 PKG_MIRROR_HASH:=c6f02b273536738bbcf4b16e3859f733a02ada88b4078fc8a5b0ad8d1d184370
 
-PKG_LICENSE:=GPL-2.0+
+PKG_LICENSE:=GPL-2.0-or-later
 PKG_LICENSE_FILES:=COPYING
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
index 8894eac38d1af91472de1ca2a8be699fdc6077c7..81a2d078f9ac5ddbf669dafc51773cb33ac3563a 100644 (file)
@@ -33,7 +33,7 @@ CONFIGURE_ARGS += --enable-savetocurrent
 define Package/reaver
   SECTION:=net
   CATEGORY:=Network
-  SUBMENU:=wireless
+  SUBMENU:=Wireless
   TITLE:=Efficient brute force attack against Wifi Protected Setup
   URL:=https://github.com/t6x/reaver-wps-fork-t6x
   DEPENDS:=+libpcap
index 333c903df577a0cc1ab3990e8743e44bc5fb5cbc..1bd812e25e09447074436b9c71bae512fb75bd66 100644 (file)
@@ -8,8 +8,8 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=remserial
 PKG_VERSION:=1.4
-PKG_RELEASE:=1
-PKG_LICENSE:=GPL-2.0+
+PKG_RELEASE:=2
+PKG_LICENSE:=GPL-2.0-or-later
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://lpccomp.bc.ca/remserial/
index 8b83698d9a86b04e1f2b9556c0d137989e5aac2a..cff70a7a4810b3f382b4f7c3ed98f801d33fdc3c 100644 (file)
@@ -9,8 +9,9 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=rp-pppoe
 PKG_VERSION:=3.12
-PKG_RELEASE:=6
-PKG_LICENSE:=LGPL-2.0+
+PKG_RELEASE:=7
+PKG_LICENSE:=LGPL-2.0-or-later
+PKG_CPE_ID:=cpe:/a:roaring_penguin:pppoe
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://roaringpenguin.com/files/download
@@ -25,7 +26,7 @@ define Package/rp-pppoe/Default
   CATEGORY:=Network
   TITLE:=PPPoE (PPP over Ethernet)
   URL:=http://roaringpenguin.com/products/pppoe
-  SUBMENU:=dial-in/up
+  SUBMENU:=Dial-in/up
 endef
 
 define Package/rp-pppoe/Default/description
index 02ce086359b09a16a6b23cd94763c60ae7e3de4b..a0c6b4569b001ce02c5358f813e8a4d14458af9c 100644 (file)
@@ -9,14 +9,16 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=rsync
 PKG_VERSION:=3.1.3
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://download.samba.org/pub/rsync/src
 PKG_HASH:=55cc554efec5fdaad70de921cd5a5eeb6c29a95524c715f3bbf849235b0800c0
+
 PKG_MAINTAINER:=Maxim Storchak <m.storchak@gmail.com>
-PKG_LICENSE:=GPL-3.0
+PKG_LICENSE:=GPL-3.0-or-later
 PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:rsync:rsync
 
 PKG_INSTALL:=1
 PKG_BUILD_PARALLEL:=1
@@ -29,7 +31,7 @@ define Package/rsync
   SUBMENU:=File Transfer
   TITLE:=Fast remote file copy program (like rcp)
   DEPENDS:=+libpopt +RSYNC_xattr:libattr +RSYNC_acl:libacl +RSYNC_zlib:zlib
-  URL:=http://rsync.samba.org/
+  URL:=https://rsync.samba.org/
   MENU:=1
 endef
 
@@ -66,13 +68,15 @@ else
     CONFIGURE_ARGS+= --disable-ipv6
 endif
 
+CONFIGURE_VARS += rsync_cv_HAVE_GETTIMEOFDAY_TZ=yes
+
 define Package/rsyncd
   SECTION:=net
   CATEGORY:=Network
   SUBMENU:=File Transfer
   TITLE:=Rsync daemon
   DEPENDS:=+rsync
-  URL:=http://rsync.samba.org/
+  URL:=https://rsync.samba.org/
 endef
 
 define Package/rsync/description
index 78a26d136892567a8395b622f3bbb6488c83d3c0..2b47af5c2ae9c284db5599bbd98bb4f6059307f1 100644 (file)
@@ -18,6 +18,7 @@ PKG_HASH:=c71f96fed6538de397df25da602384f6ee2cb67329d9f3362af2a18508616ab4
 PKG_MAINTAINER:=
 PKG_LICENSE:=GPL-3.0
 PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:rsyslog:rsyslog
 
 PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
index 8c21cbcc8630da130602b9661b309c84ce2218ee..77a2cea19f973630726d6dd521f78a149ca84dbc 100644 (file)
@@ -8,21 +8,21 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=rtorrent
-PKG_VERSION:=0.9.7
-PKG_RELEASE:=1
+PKG_VERSION:=0.9.8
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://github.com/rakshasa/rtorrent/releases/download/v$(PKG_VERSION)
-PKG_HASH:=5d9842fe48c9582fbea2c7bf9f51412c1ccbba07d059b257039ad53b863fe8bb
+PKG_SOURCE_URL:=https://codeload.github.com/rakshasa/rtorrent/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=bc889ce1dde475ec56aa72ae996912ff58723226a4f4256fef4f1f8636d991d4
 
-PKG_LICENSE:=GPL-2.0
+PKG_MAINTAINER:=Rosen Penev <rosenp@gmail.com>
+PKG_LICENSE:=GPL-2.0-or-later
 PKG_LICENSE_FILES:=COPYING
 
 PKG_FIXUP:=autoreconf
-PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
-
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
+PKG_BUILD_PARALLEL:=1
+PKG_BUILD_DEPENDS:=libtorrent
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -31,9 +31,8 @@ define Package/rtorrent/Default
   SECTION:=net
   CATEGORY:=Network
   TITLE:=BitTorrent client for ncurses
-  URL:=http://libtorrent.rakshasa.no/
-  DEPENDS:=+libcurl +libtorrent +libncursesw +libsigcxx +libpthread
-  MAINTAINER:=Rosen Penev <rosenp@gmail.com>
+  URL:=https://github.com/rakshasa/rtorrent
+  DEPENDS:=+libcurl +libncurses +libpthread +libopenssl +libstdcpp +zlib
 endef
 
 define Package/rtorrent/Default/description
@@ -65,19 +64,20 @@ $(call Package/rtorrent/Default/description)
  This package is built with xmlrpc support
 endef
 
-TARGET_LDFLAGS += -lz -lpthread -Wl,-rpath-link=$(STAGING_DIR)/usr/lib
-
-CONFIGURE_ARGS+= \
-       --enable-shared \
-       --disable-static \
+CONFIGURE_ARGS += \
+       --enable-static \
+       --disable-shared \
        --disable-debug \
-       --disable-ipv6
+       --with-libcurl="$(STAGING_DIR)/usr" \
+       --with-ncurses \
+       $(if $(CONFIG_IPV6),--enable,--disable)-ipv6
 
 ifeq ($(BUILD_VARIANT),rpc)
-       CONFIGURE_ARGS += \
-               --with-xmlrpc-c
+CONFIGURE_ARGS += --with-xmlrpc-c
 endif
 
+TARGET_CXXFLAGS += -faligned-new
+TARGET_LDFLAGS += -lcrypto -lz
 
 define Package/rtorrent/install
        $(INSTALL_DIR) $(1)/usr/bin
diff --git a/net/rtorrent/patches/100-fix-cross_compile.patch b/net/rtorrent/patches/100-fix-cross_compile.patch
deleted file mode 100644 (file)
index 50657df..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
---- a/scripts/common.m4
-+++ b/scripts/common.m4
-@@ -153,7 +153,7 @@ dnl   Need to fix this so that it uses t
- AC_DEFUN([TORRENT_CHECK_EXECINFO], [
-   AC_MSG_CHECKING(for execinfo.h)
--  AC_RUN_IFELSE([AC_LANG_SOURCE([
-+  AC_LINK_IFELSE([AC_LANG_SOURCE([
-       #include <execinfo.h>
-       int main() { backtrace((void**)0, 0); backtrace_symbols((char**)0, 0); return 0;}
-       ])],
-@@ -168,7 +168,7 @@ AC_DEFUN([TORRENT_CHECK_EXECINFO], [
- AC_DEFUN([TORRENT_CHECK_ALIGNED], [
-   AC_MSG_CHECKING(the byte alignment)
--  AC_RUN_IFELSE([AC_LANG_SOURCE([
-+  AC_LINK_IFELSE([AC_LANG_SOURCE([
-       #include <inttypes.h>
-       int main() {
-         char buf@<:@8@:>@ = { 0, 0, 0, 0, 1, 0, 0, 0 };
diff --git a/net/rtorrent/patches/130-usleep.patch b/net/rtorrent/patches/130-usleep.patch
new file mode 100644 (file)
index 0000000..c3463e4
--- /dev/null
@@ -0,0 +1,33 @@
+From b3d75a642177f21f00d18f0e46bca4a9f363d08e Mon Sep 17 00:00:00 2001
+From: Rosen Penev <rosenp@gmail.com>
+Date: Fri, 23 Aug 2019 13:35:28 -0700
+Subject: [PATCH] Replace usleep with C++11 sleep_for
+
+usleep was deprecated with POSIX 2008 and optionally unavailable with
+uClibc-ng.
+---
+ src/thread_base.cc | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/src/thread_base.cc b/src/thread_base.cc
+index 081791d4..275015ab 100644
+--- a/src/thread_base.cc
++++ b/src/thread_base.cc
+@@ -42,6 +42,8 @@
+ #include <cstdlib>
+ #include <cstring>
+ #include <iostream>
++#include <chrono>
++#include <thread>
+ #include <signal.h>
+ #include <unistd.h>
+ #include <rak/error_number.h>
+@@ -66,7 +68,7 @@ class lt_cacheline_aligned thread_queue_hack {
+   thread_queue_hack() { std::memset(this, 0, sizeof(thread_queue_hack)); }
+-  void     lock()   { while (!__sync_bool_compare_and_swap(&m_lock, 0, 1)) usleep(0); }
++  void     lock()   { while (!__sync_bool_compare_and_swap(&m_lock, 0, 1)) std::this_thread::sleep_for(std::chrono::microseconds(0)); }
+   void     unlock() { __sync_bool_compare_and_swap(&m_lock, 1, 0); }
+   iterator begin() { return m_queue; }
index ff37ebd8ede9377989552cb5a3045609a58a8cfe..faa9abc128a92533cb802c7e4bdcafb26e64cc85 100644 (file)
@@ -2,24 +2,25 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=samba
-PKG_VERSION:=4.9.8
+PKG_VERSION:=4.9.13
 PKG_RELEASE:=1
 
-PKG_MAINTAINER:=Andy Walsh <andy.walsh44+github@gmail.com>
-PKG_LICENSE:=GPL-3.0-only
-PKG_LICENSE_FILES:=COPYING
-
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://ftp.heanet.ie/mirrors/ftp.samba.org/stable/ \
                https://ftp.gwdg.de/pub/samba/stable/ \
                https://ftp.riken.jp/net/samba/samba/stable/ \
                http://www.nic.funet.fi/index/samba/pub/samba/stable/ \
                http://samba.mirror.bit.nl/samba/ftp/stable/ \
                https://download.samba.org/pub/samba/stable/
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=82ebb7c3f1847c39341dd97ff8b73f40fa83f5f794daeceb80f3c349ace3cf56
+PKG_HASH:=ab18331e37766b13dbb07d1f115bda3d794917baf502d0ca2b2b8fff014b88f2
+
+PKG_MAINTAINER:=Andy Walsh <andy.walsh44+github@gmail.com>
+PKG_LICENSE:=GPL-3.0-only
+PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:samba:samba
 
 # samba4=(asn1_compile) e2fsprogs=(compile_et) nfs-kernel-server=(rpcgen)
-HOST_BUILD_DEPENDS:=nfs-kernel-server/host e2fsprogs/host
+HOST_BUILD_DEPENDS:=python/host nfs-kernel-server/host e2fsprogs/host
 PKG_BUILD_DEPENDS:=samba4/host
 
 PKG_CONFIG_DEPENDS:= \
@@ -43,7 +44,7 @@ define Package/samba4/Default
   SECTION:=net
   CATEGORY:=Network
   TITLE:=Samba $(PKG_VERSION)
-  URL:=http://www.samba.org/
+  URL:=https://www.samba.org/
 endef
 
 define Package/samba4/Default/description
@@ -57,20 +58,19 @@ endef
 define Package/samba4-libs
   $(call Package/samba4/Default)
   TITLE+= libs
-  DEPENDS:= +zlib +libtirpc +libpopt +libcomerr \
+  DEPENDS:= +zlib +libtirpc +libpopt +libcomerr +libreadline \
        +PACKAGE_libcap:libcap +PACKAGE_libpthread:libpthread +PACKAGE_libnettle:libnettle \
        +PACKAGE_libgcrypt:libgcrypt +PACKAGE_libpam:libpam +PACKAGE_dbus:dbus +PACKAGE_libavahi-client:libavahi-client \
        +SAMBA4_SERVER_VFS:attr \
        +SAMBA4_SERVER_ACL:acl +SAMBA4_SERVER_ACL:attr \
        +SAMBA4_SERVER_AVAHI:libavahi-client \
-       +SAMBA4_SERVER_AD_DC:python-base +SAMBA4_SERVER_AD_DC:libopenssl +SAMBA4_SERVER_AD_DC:libgnutls +SAMBA4_SERVER_AD_DC:libopenldap +SAMBA4_SERVER_AD_DC:jansson +SAMBA4_SERVER_AD_DC:libarchive
+       +SAMBA4_SERVER_AD_DC:python-base +SAMBA4_SERVER_AD_DC:python-crypto +SAMBA4_SERVER_AD_DC:libopenssl +SAMBA4_SERVER_AD_DC:libgnutls +SAMBA4_SERVER_AD_DC:libopenldap +SAMBA4_SERVER_AD_DC:jansson +SAMBA4_SERVER_AD_DC:libarchive
 endef
 
 define Package/samba4-server
   $(call Package/samba4/Default)
   TITLE+= server
   DEPENDS:= +samba4-libs
-  EXTRA_DEPENDS:=$(if $(CONFIG_SAMBA4_SERVER_AD_DC),python-crypto,)
 endef
 
 define Package/samba4-server/description
@@ -453,7 +453,7 @@ ifeq ($(CONFIG_SAMBA4_SERVER_ACL),y)
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/sharesec $(1)/usr/bin/
 endif
        $(INSTALL_DIR) $(1)/etc/config $(1)/etc/samba $(1)/etc/init.d
-       $(INSTALL_DATA) ./files/samba.config $(1)/etc/config/samba4
+       $(INSTALL_CONF) ./files/samba.config $(1)/etc/config/samba4
        $(INSTALL_DATA) ./files/smb.conf.template $(1)/etc/samba
        $(INSTALL_BIN) ./files/samba.init $(1)/etc/init.d/samba4
 endef
index b61f4bbe0712425ac86abbb6f1c1c15666496c8d..39686e6cd4ed57f7c7f1a47634072ff3641b72d8 100644 (file)
@@ -7,7 +7,8 @@ smb_header() {
        config_get samba_iface $1 interface "loopback lan"
 
        # resolve interfaces
-       local interfaces=$(
+       local interfaces
+       interfaces=$(
                . /lib/functions/network.sh
 
                local net
@@ -15,19 +16,20 @@ smb_header() {
                        local device
                        network_is_up $net || continue
                        network_get_device device "$net"
-                       echo -n "${device:-$net} "
+                       printf "%s " "${device:-$net}"
                done
        )
 
        local workgroup description charset
        # we dont use netbios anymore as default and wsd/avahi is dns based
-       local hostname="$(cat /proc/sys/kernel/hostname)"
+       local hostname
+       hostname="$(cat /proc/sys/kernel/hostname)"
 
        config_get workgroup            $1 workgroup    "WORKGROUP"
        config_get description          $1 description  "Samba on OpenWrt"
-       config_get charset                      $1 charset              "UTF-8"
-       
-       config_get_bool MACOS                   $1 macos                        0
+       config_get charset              $1 charset      "UTF-8"
+
+       config_get_bool MACOS           $1 macos                0
        config_get_bool DISABLE_NETBIOS $1 disable_netbios      0
        config_get_bool DISABLE_AD_DC   $1 disable_ad_dc        0
        config_get_bool DISABLE_WINBIND $1 disable_winbind      0
@@ -40,15 +42,16 @@ smb_header() {
            -e "s#|CHARSET|#$charset#g" \
            /etc/samba/smb.conf.template > /var/etc/smb.conf
 
-       echo -e "\n######### Dynamic written config options #########\n" >> /var/etc/smb.conf
-       if [ "$DISABLE_NETBIOS" -eq 1 ] || [ ! -x /usr/sbin/nmbd ]; then
-               echo -e "\tdisable netbios = yes" >> /var/etc/smb.conf
-       fi
+       {
+               printf "\n######### Dynamic written config options #########\n"
+               if [ "$DISABLE_NETBIOS" -eq 1 ] || [ ! -x /usr/sbin/nmbd ]; then
+                       printf "\tdisable netbios = yes\n"
+               fi
 
-       local homes
-       config_get_bool homes $1 homes 0
-       [ $homes -gt 0 ] && {
-               cat <<EOT >> /var/etc/smb.conf
+               local homes
+               config_get_bool homes $1 homes 0
+               [ $homes -gt 0 ] && {
+                       cat <<EOT
 
 [homes]
        comment     = Home Directories
@@ -57,14 +60,15 @@ smb_header() {
        read only   = no
        create mask = 0750
 EOT
-       }
+               }
+       } >> /var/etc/smb.conf
 
        [ -e /etc/samba/smb.conf ] || ln -nsf /var/etc/smb.conf /etc/samba/smb.conf
-       
-       if [ -f /etc/samba/smb.conf ]; then
+
+       if ! [ -L /etc/samba/smb.conf ]; then
                logger -t 'samba4-server' "Local custom /etc/samba/smb.conf file detected, all luci/config settings are ignored!"
        fi
-       
+
 }
 
 smb_add_share() {
@@ -75,6 +79,7 @@ smb_add_share() {
        local dir_mask
        local browseable
        local read_only
+       local writeable
        local guest_ok
        local guest_only
        local inherit_owner
@@ -92,6 +97,7 @@ smb_add_share() {
        config_get dir_mask $1 dir_mask
        config_get browseable $1 browseable
        config_get read_only $1 read_only
+       config_get writeable $1 writeable
        config_get guest_ok $1 guest_ok
        config_get guest_only $1 guest_only
        config_get inherit_owner $1 inherit_owner
@@ -102,42 +108,45 @@ smb_add_share() {
        config_get write_list $1 write_list
        config_get read_list $1 read_list
 
-       [ -z "$name" -o -z "$path" ] && return
+       [ -z "$name" ] || [ -z "$path" ] && return
 
-       echo -e "\n[$name]\n\tpath = $path" >> /var/etc/smb.conf
-       
-       if [ "$force_root" -eq 1 ]; then
-               echo -e "\tforce user = root" >> /var/etc/smb.conf
-               echo -e "\tforce group = root" >> /var/etc/smb.conf
-       else
-               [ -n "$users" ] && echo -e "\tvalid users = $users" >> /var/etc/smb.conf
-       fi
+       {
+               printf "\n[$name]\n\tpath = %s\n" "$path"
 
-       [ -n "$create_mask" ] && echo -e "\tcreate mask = $create_mask" >> /var/etc/smb.conf
-       [ -n "$dir_mask" ] && echo -e "\tdirectory mask = $dir_mask" >> /var/etc/smb.conf
-
-       [ -n "$browseable" ] && echo -e "\tbrowseable = $browseable" >> /var/etc/smb.conf
-       [ -n "$read_only" ] && echo -e "\tread only = $read_only" >> /var/etc/smb.conf
-       [ -n "$guest_ok" ] && echo -e "\tguest ok = $guest_ok" >> /var/etc/smb.conf
-       [ -n "$guest_only" ] && echo -e "\tguest only = $guest_only" >> /var/etc/smb.conf
-       [ -n "$inherit_owner" ] && echo -e "\tinherit owner = $inherit_owner" >> /var/etc/smb.conf
-
-       [ -n "$write_list" ] && echo -e "\twrite list = $write_list" >> /var/etc/smb.conf
-       [ -n "$read_list" ] && echo -e "\tread list = $read_list" >> /var/etc/smb.conf
-
-       if [ "$MACOS" -eq 1 ]; then
-               vfs_objects="catia fruit streams_xattr $vfs_objects"
-               echo -e "\tfruit:encoding = native" >> /var/etc/smb.conf
-               echo -e "\tfruit:metadata = stream" >> /var/etc/smb.conf
-               echo -e "\tfruit:veto_appledouble = no" >> /var/etc/smb.conf
-               # avoid mixed shares order for aapl
-               if [ "$timemachine" -eq 1 ]; then
-                       echo -e "\tfruit:time machine = yes" >> /var/etc/smb.conf
-                       [ -n "$timemachine_maxsize" ] && echo -e "\tfruit:time machine max size = ${timemachine_maxsize}G" >> /var/etc/smb.conf
+               if [ "$force_root" -eq 1 ]; then
+                       printf "\tforce user = root\n"
+                       printf "\tforce group = root\n"
+               else
+                       [ -n "$users" ] && printf "\tvalid users = %s\n" "$users"
                fi
-       fi
-       
-       [ -n "$vfs_objects" ] && echo -e "\tvfs objects = $vfs_objects" >> /var/etc/smb.conf
+
+               [ -n "$create_mask" ] && printf "\tcreate mask = %s\n" "$create_mask"
+               [ -n "$dir_mask" ] && printf "\tdirectory mask = %s\n" "$dir_mask"
+
+               [ -n "$browseable" ] && printf "\tbrowseable = %s\n" "$browseable"
+               [ -n "$read_only" ] && printf "\tread only = %s\n" "$read_only"
+               [ -n "$writeable" ] && printf "\twriteable = %s\n" "$writeable"
+               [ -n "$guest_ok" ] && printf "\tguest ok = %s\n" "$guest_ok"
+               [ -n "$guest_only" ] && printf "\tguest only = %s\n" "$guest_only"
+               [ -n "$inherit_owner" ] && printf "\tinherit owner = %s\n" "$inherit_owner"
+
+               [ -n "$write_list" ] && printf "\twrite list = %s\n" "$write_list"
+               [ -n "$read_list" ] && printf "\tread list = %s\n" "$read_list"
+
+               if [ "$MACOS" -eq 1 ]; then
+                       vfs_objects="catia fruit streams_xattr $vfs_objects"
+                       printf "\tfruit:encoding = native\n"
+                       printf "\tfruit:metadata = stream\n"
+                       printf "\tfruit:veto_appledouble = no\n"
+                       # avoid mixed shares order for aapl
+                       if [ "$timemachine" -eq 1 ]; then
+                               printf "\tfruit:time machine = yes\n"
+                               [ -n "$timemachine_maxsize" ] && printf "\tfruit:time machine max size = %sG\n" "${timemachine_maxsize}"
+                       fi
+               fi
+
+               [ -n "$vfs_objects" ] && printf "\tvfs objects = %s\n" "$vfs_objects"
+       } >> /var/etc/smb.conf
 }
 
 init_config() {
@@ -146,10 +155,8 @@ init_config() {
        [ -d /var/cache/samba ] || mkdir -p /var/cache/samba
        [ -d /var/run/samba ] || mkdir -p /var/run/samba
        [ -d /var/log/samba ] || mkdir -p /var/log/samba
-       [ -d /var/lock ] && chmod 0755 /var/lock || {
-               mkdir -p /var/lock
-               chmod 0755 /var/lock
-       }
+       [ -d /var/lock ] || mkdir -p /var/lock
+       chmod 0755 /var/lock
 
        config_load samba4
        config_foreach smb_header samba
@@ -158,9 +165,9 @@ init_config() {
 
 service_triggers() {
        PROCD_RELOAD_DELAY=2000
-       
+
        procd_add_reload_trigger "dhcp" "system" "samba4"
-       
+
        local i
        for i in $samba_iface; do
                procd_add_reload_interface_trigger $i
diff --git a/net/samba4/patches/100-do-not-import-target-module-while-cross-compile.patch b/net/samba4/patches/100-do-not-import-target-module-while-cross-compile.patch
deleted file mode 100644 (file)
index e0766b6..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-Some modules such as dynamic library maybe cann't be imported while cross compile, 
-we just check whether does the module exist.
-
-Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com>
-
---- a/buildtools/wafsamba/samba_bundled.py
-+++ b/buildtools/wafsamba/samba_bundled.py
-@@ -2,6 +2,7 @@
- import sys
- import Build, Options, Logs
-+import imp, os
- from Configure import conf
- from samba_utils import TO_LIST
-@@ -249,17 +250,32 @@ def CHECK_BUNDLED_SYSTEM_PYTHON(conf, li
-     # versions
-     minversion = minimum_library_version(conf, libname, minversion)
--    try:
--        m = __import__(modulename)
--    except ImportError:
--        found = False
--    else:
-+    # Find module in PYTHONPATH
-+    stuff = imp.find_module(modulename, [os.environ["PYTHONPATH"]])
-+    if stuff:
-         try:
--            version = m.__version__
--        except AttributeError:
-+            m = imp.load_module(modulename, stuff[0], stuff[1], stuff[2])
-+        except ImportError:
-             found = False
-+
-+            if conf.env.CROSS_COMPILE:
-+                # Some modules such as dynamic library maybe cann't be imported
-+                # while cross compile, we just check whether the module exist
-+                Logs.warn('Cross module[%s] has been found, but can not be loaded.' % (stuff[1]))
-+                found = True
-         else:
--            found = tuplize_version(version) >= tuplize_version(minversion)
-+            try:
-+                version = m.__version__
-+            except AttributeError:
-+                found = False
-+            else:
-+                found = tuplize_version(version) >= tuplize_version(minversion)
-+        finally:
-+            if stuff[0]:
-+                stuff[0].close()
-+    else:
-+        found = False
-+
-     if not found and not conf.LIB_MAY_BE_BUNDLED(libname):
-         Logs.error('ERROR: Python module %s of version %s not found, and bundling disabled' % (libname, minversion))
-         sys.exit(1)
diff --git a/net/samba4/patches/102-samba-4.8.2-unbundle-libreadline.patch b/net/samba4/patches/102-samba-4.8.2-unbundle-libreadline.patch
deleted file mode 100644 (file)
index e164d56..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
---- a/libcli/smbreadline/wscript_configure
-+++ b/libcli/smbreadline/wscript_configure
-@@ -1,11 +1,13 @@
- #!/usr/bin/env python
--conf.CHECK_HEADERS('readline.h history.h readline/readline.h readline/history.h')
--for termlib in ['ncurses', 'curses', 'termcap', 'terminfo', 'termlib', 'tinfo']:
--    if conf.CHECK_FUNCS_IN('tgetent', termlib):
--        conf.env['READLINE_TERMLIB'] = termlib
--        break
-+#conf.CHECK_HEADERS('readline.h history.h readline/readline.h readline/history.h')
-+#for termlib in ['ncurses', 'curses', 'termcap', 'terminfo', 'termlib', 'tinfo']:
-+#    if conf.CHECK_FUNCS_IN('tgetent', termlib):
-+#        conf.env['READLINE_TERMLIB'] = termlib
-+#        break
-+
-+conf.undefine('HAVE_READLINE_READLINE_H')
- #
- # Check if we need to work around readline/readline.h
diff --git a/net/samba4/patches/102-samba-4.8.5-unbundle-libbsd.patch b/net/samba4/patches/102-samba-4.8.5-unbundle-libbsd.patch
new file mode 100644 (file)
index 0000000..c8eae59
--- /dev/null
@@ -0,0 +1,77 @@
+--- a/lib/crypto/wscript_configure
++++ b/lib/crypto/wscript_configure
+@@ -2,11 +2,11 @@
+ import Options
+ import Utils
+-if not conf.CHECK_FUNCS_IN('MD5Init', 'bsd', headers='bsd/md5.h',
+-    checklibc=True):
+-    conf.CHECK_FUNCS_IN('MD5Init', 'md5', headers='sys/md5.h',
+-                        checklibc=True)
+-    conf.CHECK_FUNCS_IN('MD5Init', 'md', headers='sys/md5.h',
++# if not conf.CHECK_FUNCS_IN('MD5Init', 'bsd', headers='bsd/md5.h',
++    # checklibc=True):
++conf.CHECK_FUNCS_IN('MD5Init', 'md5', headers='sys/md5.h',
++                                      checklibc=True)
++conf.CHECK_FUNCS_IN('MD5Init', 'md', headers='sys/md5.h',
+                         checklibc=True)
+ conf.CHECK_FUNCS_IN('CC_MD5_Init', '', headers='CommonCrypto/CommonDigest.h',
+     checklibc=True)
+--- a/lib/replace/wscript
++++ b/lib/replace/wscript
+@@ -340,22 +340,13 @@ def configure(conf):
+     conf.CHECK_FUNCS('prctl dirname basename')
+-    strlcpy_in_bsd = False
++    # Not checking for libbsd
++    conf.CHECK_FUNCS('strlcpy strlcat')
++    conf.CHECK_FUNCS('getpeereid')
++    conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h')
++    conf.CHECK_FUNCS('setproctitle_init')
+-    # libbsd on some platforms provides strlcpy and strlcat
+-    if not conf.CHECK_FUNCS('strlcpy strlcat'):
+-        if conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h',
+-                               checklibc=True):
+-            strlcpy_in_bsd = True
+-    if not conf.CHECK_FUNCS('getpeereid'):
+-        conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h')
+-    if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'):
+-        conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h')
+-    if not conf.CHECK_FUNCS('setproctitle_init'):
+-        conf.CHECK_FUNCS_IN('setproctitle_init', 'bsd', headers='sys/types.h bsd/unistd.h')
+-
+-    if not conf.CHECK_FUNCS('closefrom'):
+-        conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h')
++    conf.CHECK_FUNCS('closefrom')
+     conf.CHECK_CODE('''
+                 struct ucred cred;
+@@ -698,9 +689,6 @@ def configure(conf):
+     # look for a method of finding the list of network interfaces
+     for method in ['HAVE_IFACE_GETIFADDRS', 'HAVE_IFACE_AIX', 'HAVE_IFACE_IFCONF', 'HAVE_IFACE_IFREQ']:
+-        bsd_for_strlcpy = ''
+-        if strlcpy_in_bsd:
+-            bsd_for_strlcpy = ' bsd'
+         if conf.CHECK_CODE('''
+                            #define %s 1
+                            #define NO_CONFIG_H 1
+@@ -713,7 +701,7 @@ def configure(conf):
+                            #include "test/getifaddrs.c"
+                            ''' % method,
+                            method,
+-                           lib='nsl socket' + bsd_for_strlcpy,
++                           lib='nsl socket',
+                            addmain=False,
+                            execute=True):
+             break
+@@ -761,7 +749,6 @@ def build(bld):
+                 break
+     extra_libs = ''
+-    if bld.CONFIG_SET('HAVE_LIBBSD'): extra_libs += ' bsd'
+     bld.SAMBA_SUBSYSTEM('LIBREPLACE_HOSTCC',
+         REPLACE_HOSTCC_SOURCE,
diff --git a/net/samba4/patches/103-samba-4.8.5-unbundle-libbsd.patch b/net/samba4/patches/103-samba-4.8.5-unbundle-libbsd.patch
deleted file mode 100644 (file)
index c8eae59..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
---- a/lib/crypto/wscript_configure
-+++ b/lib/crypto/wscript_configure
-@@ -2,11 +2,11 @@
- import Options
- import Utils
--if not conf.CHECK_FUNCS_IN('MD5Init', 'bsd', headers='bsd/md5.h',
--    checklibc=True):
--    conf.CHECK_FUNCS_IN('MD5Init', 'md5', headers='sys/md5.h',
--                        checklibc=True)
--    conf.CHECK_FUNCS_IN('MD5Init', 'md', headers='sys/md5.h',
-+# if not conf.CHECK_FUNCS_IN('MD5Init', 'bsd', headers='bsd/md5.h',
-+    # checklibc=True):
-+conf.CHECK_FUNCS_IN('MD5Init', 'md5', headers='sys/md5.h',
-+                                      checklibc=True)
-+conf.CHECK_FUNCS_IN('MD5Init', 'md', headers='sys/md5.h',
-                         checklibc=True)
- conf.CHECK_FUNCS_IN('CC_MD5_Init', '', headers='CommonCrypto/CommonDigest.h',
-     checklibc=True)
---- a/lib/replace/wscript
-+++ b/lib/replace/wscript
-@@ -340,22 +340,13 @@ def configure(conf):
-     conf.CHECK_FUNCS('prctl dirname basename')
--    strlcpy_in_bsd = False
-+    # Not checking for libbsd
-+    conf.CHECK_FUNCS('strlcpy strlcat')
-+    conf.CHECK_FUNCS('getpeereid')
-+    conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h')
-+    conf.CHECK_FUNCS('setproctitle_init')
--    # libbsd on some platforms provides strlcpy and strlcat
--    if not conf.CHECK_FUNCS('strlcpy strlcat'):
--        if conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h',
--                               checklibc=True):
--            strlcpy_in_bsd = True
--    if not conf.CHECK_FUNCS('getpeereid'):
--        conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h')
--    if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'):
--        conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h')
--    if not conf.CHECK_FUNCS('setproctitle_init'):
--        conf.CHECK_FUNCS_IN('setproctitle_init', 'bsd', headers='sys/types.h bsd/unistd.h')
--
--    if not conf.CHECK_FUNCS('closefrom'):
--        conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h')
-+    conf.CHECK_FUNCS('closefrom')
-     conf.CHECK_CODE('''
-                 struct ucred cred;
-@@ -698,9 +689,6 @@ def configure(conf):
-     # look for a method of finding the list of network interfaces
-     for method in ['HAVE_IFACE_GETIFADDRS', 'HAVE_IFACE_AIX', 'HAVE_IFACE_IFCONF', 'HAVE_IFACE_IFREQ']:
--        bsd_for_strlcpy = ''
--        if strlcpy_in_bsd:
--            bsd_for_strlcpy = ' bsd'
-         if conf.CHECK_CODE('''
-                            #define %s 1
-                            #define NO_CONFIG_H 1
-@@ -713,7 +701,7 @@ def configure(conf):
-                            #include "test/getifaddrs.c"
-                            ''' % method,
-                            method,
--                           lib='nsl socket' + bsd_for_strlcpy,
-+                           lib='nsl socket',
-                            addmain=False,
-                            execute=True):
-             break
-@@ -761,7 +749,6 @@ def build(bld):
-                 break
-     extra_libs = ''
--    if bld.CONFIG_SET('HAVE_LIBBSD'): extra_libs += ' bsd'
-     bld.SAMBA_SUBSYSTEM('LIBREPLACE_HOSTCC',
-         REPLACE_HOSTCC_SOURCE,
diff --git a/net/samba4/patches/103-tmsize-overflow-fix.patch b/net/samba4/patches/103-tmsize-overflow-fix.patch
new file mode 100644 (file)
index 0000000..5d6cebe
--- /dev/null
@@ -0,0 +1,21 @@
+--- a/source3/modules/vfs_fruit.c      2019-07-09
++++ b/source3/modules/vfs_fruit.c      2019-07-09
+@@ -6995,12 +6995,12 @@ static bool fruit_tmsize_do_dirent(vfs_h
+               return true;
+       }
+-      if (bandsize > SIZE_MAX/nbands) {
+-              DBG_ERR("tmsize overflow: bandsize [%zu] nbands [%zu]\n",
+-                      bandsize, nbands);
+-              return false;
+-      }
+-      tm_size = bandsize * nbands;
++      // if (bandsize > SIZE_MAX/nbands) {
++              // DBG_ERR("tmsize overflow: bandsize [%zu] nbands [%zu]\n",
++                      // bandsize, nbands);
++              // return false;
++      // }
++      tm_size = (off_t)bandsize * (off_t)nbands;
+       if (state->total_size + tm_size < state->total_size) {
+               DBG_ERR("tmsize overflow: bandsize [%zu] nbands [%zu]\n",
diff --git a/net/samba4/patches/104-tmsize-overflow-check.patch b/net/samba4/patches/104-tmsize-overflow-check.patch
deleted file mode 100644 (file)
index 8a35a78..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-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 c6b8ce61624cc7829654ef5b00dbe68cf3387981..19c06031e2b69a56d2fad7ce467d7bbc2984ada7 100644 (file)
@@ -8,14 +8,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=scapy
-PKG_VERSION:=2.4.2
+PKG_VERSION:=2.4.3
 PKG_RELEASE:=1
 PKG_LICENSE:=GPL-2.0
-PKG_LICENSE_FILES:=PKG-INFO
+PKG_LICENSE_FILES:=LICENSE
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/secdev/scapy/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=141ee386cf6f296e8c9fae94a40a5386ac2d9bfa43a3870b13f575200c46b5f8
+PKG_HASH:=6cacd9ebe2beeb06b10ff57bff3632222755e9d62f1b38e71b02edab6e71d776
 
 include $(INCLUDE_DIR)/package.mk
 include ../../lang/python/python3-package.mk
index 0666d4944c41e5aed28854b5159c8de0c7dbd478..071f043c272d18875c07872c552089b129fb0d0a 100644 (file)
@@ -9,36 +9,48 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=seafile-seahub
 PKG_VERSION:=6.3.4
-PKG_RELEASE:=3
-PKG_LICENSE:=Apache-2.0
+PKG_RELEASE:=7
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/haiwen/seahub/tar.gz/v$(PKG_VERSION)-server?
 PKG_HASH:=53a9efdb6791fd3a2a191e89cb0f133632056046ec08adbb2ad72088e6161430
-PKG_BUILD_DIR:=$(BUILD_DIR)/seahub-$(PKG_VERSION)-server
 
-PKG_BUILD_DEPENDS:=python-pytz/host
+PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=LICENSE.txt
+
+HOST_PYTHON_PACKAGE_BUILD_DEPENDS:="django>=1.11"
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/seahub-$(PKG_VERSION)-server
 
 include $(INCLUDE_DIR)/package.mk
 include ../../lang/python/python-package.mk
 
+SEAFILE_PYTHON_DEPENDS:= \
+       simplejson chardet dateutil mysqlclient pytz qrcode requests requests-oauthlib \
+       django django-constance django-appconf django-compressor django-formtools \
+       django-jsonfield django-picklefield django-postoffice django-restframework \
+       pillow django-simple-captcha django-statici18n django-webpack-loader
+
 define Package/seafile-seahub
-    SECTION:=net
-    CATEGORY:=Network
-    TITLE:=Seafile server - seahub component
-    URL:=https://seafile.com/
-    DEPENDS:=+python-simplejson +python +pillow +python-chardet +django +django-appconf \
-               +django-compressor +django-constance +django-formtools +django-jsonfield \
-               +django-picklefield +django-postoffice +django-restframework \
-               +django-simple-captcha +django-statici18n +django-webpack-loader \
-               +flup +gunicorn +openpyxl +python-dateutil +python-mysql \
-               +python-qrcode +python-requests +python-requests-oauthlib +python-pytz
+  SECTION:=net
+  CATEGORY:=Network
+  TITLE:=Seafile server - seahub component
+  URL:=https://seafile.com/
+  DEPENDS:=+python \
+       +python-flup +gunicorn +openpyxl \
+       $(foreach dep,$(SEAFILE_PYTHON_DEPENDS),+python-$(dep))
 endef
 
 define Build/Configure
 endef
 
+MAKE_VARS += \
+       PYTHON="$(HOST_PYTHON_BIN)" \
+       DJANGO_ADMIN_PY="$(STAGING_DIR_HOSTPKG)/bin/django-admin"
+
 define Build/Compile
+       $(call Build/Compile/HostPyPipInstall,$(HOST_PYTHON_PACKAGE_BUILD_DEPENDS))
        $(call Build/Compile/Default,locale)
 endef
 
index 07180cbb492317cacbfa541621ce6cecf30b6397..36c808493f551b2afea799f56de10f73ec245372 100644 (file)
@@ -1,8 +1,8 @@
 --- a/Makefile
 +++ b/Makefile
 @@ -1,3 +1,6 @@
-+include $(TOPDIR)/rules.mk
-+include $(TOPDIR)/feeds/packages/lang/python/python-package.mk
++PYTHON ?= python
++DJANGO_ADMIN_PY ?= django-admin.py
 +
  PROJECT=seahub
  
@@ -12,7 +12,7 @@
  locale:
        @echo "--> Compile locales"
 -      django-admin.py compilemessages
-+      $(call HostPython,,$(STAGING_DIR)/usr/bin/django-admin.py compilemessages)
++      $(DJANGO_ADMIN_PY) compilemessages
        @echo ""
  
  uglify:
  statici18n:
        @echo "--> Generate JS locale files in static/scripts/i18n"
 -      python manage.py compilejsi18n
-+      $(call HostPython,,manage.py compilejsi18n)
++      $(PYTHON) manage.py compilejsi18n
  
  collectstatic:
        @echo "--> Collect django static files to media/assets"
        rm -rf media/assets 2> /dev/null
 -      python manage.py collectstatic --noinput -i admin -i termsandconditions -i app -i sysadmin-app -i build.js
-+      $(call HostPython,,manage.py collectstatic --noinput -i admin -i termsandconditions -i app -i sysadmin-app -i build.js)
++      $(PYTHON) manage.py collectstatic --noinput -i admin -i termsandconditions -i app -i sysadmin-app -i build.js
  
  compressstatic:
        @echo "--> Compress static files(css) to media/CACHE"
        rm -rf media/CACHE 2> /dev/null
 -      python manage.py compress
-+      $(call HostPython,,manage.py compress)
++      $(PYTHON) manage.py compress
  
  clean:
        @echo '--> Cleaning media/static cache & dist'
index 5dc71e4b2d4030254a5532a16fdc435c71f880ad..aabb4eb07818b95ed60aee96eb193c0214b708f9 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=seafile-server
 PKG_VERSION:=6.3.4
-PKG_RELEASE:=5
+PKG_RELEASE:=6
 PKG_LICENSE:=GPL-3.0
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
@@ -39,7 +39,8 @@ define Package/seafile-server
     CATEGORY:=Network
     TITLE:=Seafile server
     URL:=https://seafile.com/
-    DEPENDS:=+libarchive +libopenssl +glib2 +libsearpc +seafile-ccnet +seafile-seahub +sqlite3-cli +python-mysql +python-urllib3 \
+    DEPENDS:=+libarchive +libopenssl +glib2 +libsearpc +seafile-ccnet +seafile-seahub +sqlite3-cli \
+               +python-mysqlclient +python-urllib3 \
                +jansson +libevent2 +libevent2-openssl +zlib +libzdb +libsqlite3 +libmysqlclient +oniguruma \
                +libpthread +libuuid +bash +procps-ng +procps-ng-pkill +SEAFILE_FUSE_SUPPORT:libfuse $(ICONV_DEPENDS)
     MENU:=1
@@ -77,6 +78,10 @@ endif
 TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib -liconv \
                    -L$(STAGING_DIR)/usr/lib/mysql -lmysqlclient -lz -levent_openssl -levent
 
+ifdef CONFIG_GCC_LIBSSP
+TARGET_LDFLAGS += -lssp
+endif
+
 define Package/seafile-server/conffiles
 /etc/config/seafile
 endef
index aaa99065bc362f73023e50811946a97c29d49ee7..0bbb9b4b0c8fc974920722a0e3b85c4967e2a631 100644 (file)
@@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ser2net
 PKG_VERSION:=3.5.1
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/ser2net
 PKG_HASH:=02f5dd0abbef5a17b80836b0de1ef0588e257106fb5e269b86822bfd001dc862
 
-PKG_LICENSE:=GPL-2.0+
+PKG_LICENSE:=GPL-2.0-or-later
 PKG_LICENSE_FILES:=COPYING
 PKG_MAINTAINER:=Michael Heimpold <mhei@heimpold.de>
 
index 0374e7ece5abfb506e1887f9430f66741484422a..401a2b3e14d8454e2b8ddc4c2bdb4b88d6ab44f2 100644 (file)
@@ -13,22 +13,23 @@ include $(TOPDIR)/rules.mk
 # - check if default mode has changed from being tcp_only
 #
 PKG_NAME:=shadowsocks-libev
-PKG_VERSION:=3.2.5
-PKG_RELEASE:=3
+PKG_VERSION:=3.3.1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/shadowsocks/shadowsocks-libev/releases/download/v$(PKG_VERSION)
-PKG_HASH:=02273d571b8bea067eefb203a43c142d052042179904f9050a1f20cb8dc5d242
+PKG_HASH:=afd25ae5e737be385fa53364c66095c354277e98cf141b54beb2be93d9228f4f
 
 PKG_MAINTAINER:=Yousong Zhou <yszhou4tech@gmail.com>
 
-PKG_LICENSE:=GPL-3.0+
+PKG_LICENSE:=GPL-3.0-or-later
 PKG_LICENSE_FILES:=LICENSE
 
 PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
 PKG_USE_MIPS16:=0
 PKG_BUILD_PARALLEL:=1
+PKG_BUILD_DEPENDS:=c-ares pcre
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -56,7 +57,7 @@ define Package/shadowsocks-libev/Default
     SUBMENU:=Web Servers/Proxies
     TITLE:=shadowsocks-libev $(1)
     URL:=https://github.com/shadowsocks/shadowsocks-libev
-    DEPENDS:=+libcares +libev +libmbedtls +libpcre +libpthread +libsodium +shadowsocks-libev-config +zlib
+    DEPENDS:=+libev +libmbedtls +libpthread +libsodium +shadowsocks-libev-config $(DEPENDS_$(1))
   endef
 
   define Package/shadowsocks-libev-$(1)/install
@@ -66,6 +67,9 @@ define Package/shadowsocks-libev/Default
 
 endef
 
+DEPENDS_ss-local = +libpcre
+DEPENDS_ss-server = +libcares +libpcre
+
 SHADOWSOCKS_COMPONENTS:=ss-local ss-redir ss-tunnel ss-server
 define shadowsocks-libev/templates
   $(foreach component,$(SHADOWSOCKS_COMPONENTS),
@@ -118,6 +122,9 @@ CONFIGURE_ARGS += \
        --disable-assert \
        --disable-ssp \
 
+TARGET_CFLAGS += -flto
+TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
+
 $(eval $(call BuildPackage,shadowsocks-libev-config))
 $(eval $(call BuildPackage,shadowsocks-libev-ss-rules))
 $(foreach component,$(SHADOWSOCKS_COMPONENTS), \
index 965633088f69eb23ed23cf2883a9ef2cf768f5bc..80e7766f046745831dafdf8c10040213552f7661 100644 (file)
@@ -11,10 +11,10 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=shorewall-core
 PKG_MAJOR_MINOR_VERSION:=5.2
 PKG_BUGFIX_MAJOR_VERSION:=3
-PKG_BUGFIX_MINOR_VERSION:=.3
+PKG_BUGFIX_MINOR_VERSION:=.4
 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,10 +22,10 @@ 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:=e516c56b416181c325dfee68d0bbf38685f89ec0b6bc9c25c6c98ffabbf3e2bd
+PKG_HASH:=8fdc6e326d0c07df2a636634c510630e99f7a3ab70bb60fb735dd92a0d33d500
 
 PKG_MAINTAINER:=Willem van den Akker <wvdakker@wilsoft.nl>
-PKG_LICENSE:=GPL-2.0+
+PKG_LICENSE:=GPL-2.0-or-later
 PKG_LICENSE_FILES:=COPYING
 
 include $(INCLUDE_DIR)/package.mk
index cb68afc79965519cb046c410a5153b4db405619c..f621c1c1e5e1b61ea08b09c99806408dea58bc54 100644 (file)
@@ -11,10 +11,10 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=shorewall-lite
 PKG_MAJOR_MINOR_VERSION:=5.2
 PKG_BUGFIX_MAJOR_VERSION:=3
-PKG_BUGFIX_MINOR_VERSION:=.3
+PKG_BUGFIX_MINOR_VERSION:=.4
 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,10 +22,10 @@ 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:=3ac7affab434a7bc39d229aeadbefc845d5568d7402ad3546e0c1e429acc2de9
+PKG_HASH:=cf48465402eb5fee0886b7dfc4b0a78ec9c0850e8a2046874dee22154c6ee107
 
 PKG_MAINTAINER:=Willem van den Akker <wvdakker@wilsoft.nl>
-PKG_LICENSE:=GPL-2.0+
+PKG_LICENSE:=GPL-2.0-or-later
 PKG_LICENSE_FILES:=COPYING
 
 include $(INCLUDE_DIR)/package.mk
index 98311d890c8ac63ef466871c062043ae693d3649..0cc9e4e2d69b0cfef8507504b17132ab5610d42f 100644 (file)
@@ -11,10 +11,10 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=shorewall
 PKG_MAJOR_MINOR_VERSION:=5.2
 PKG_BUGFIX_MAJOR_VERSION:=3
-PKG_BUGFIX_MINOR_VERSION:=.3
+PKG_BUGFIX_MINOR_VERSION:=.4
 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,10 +22,10 @@ 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:=6bb832d557f9646b62af1b60db6d8b693756403ea5d23c10db96013dd40547cd
+PKG_HASH:=a6e1a1a6b20ea37695fe12d36233dacd461548ac67665664c8de3a99cf7aa23b
 
 PKG_MAINTAINER:=Willem van den Akker <wvdakker@wilsoft.nl>
-PKG_LICENSE:=GPL-2.0+
+PKG_LICENSE:=GPL-2.0-or-later
 PKG_LICENSE_FILES:=COPYING
 
 include $(INCLUDE_DIR)/package.mk
index 5c11de83ddb5dcbc5db21597f0c0363137958399..7500cc32c55f217b48a6759029e1e86a1deecdee 100644 (file)
@@ -11,10 +11,10 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=shorewall6-lite
 PKG_MAJOR_MINOR_VERSION:=5.2
 PKG_BUGFIX_MAJOR_VERSION:=3
-PKG_BUGFIX_MINOR_VERSION:=.3
+PKG_BUGFIX_MINOR_VERSION:=.4
 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,10 +22,10 @@ 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:=34c7ddb7f9901f7a74374f17cd1740a4059195a560401a461363e24c7e55b99f
+PKG_HASH:=af1a62397e8232bb4fb6c266a29df0063c339c94772d06a92e086a2e8f1ee70f
 
 PKG_MAINTAINER:=Willem van den Akker <wvdakker@wilsoft.nl>
-PKG_LICENSE:=GPL-2.0+
+PKG_LICENSE:=GPL-2.0-or-later
 PKG_LICENSE_FILES:=COPYING
 
 
index 0231a97be7292468a00bf04fc99e3ea740339a30..48ac7c2a7d2fd03fe772bd94360078d1f11af3f8 100644 (file)
@@ -11,10 +11,10 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=shorewall6
 PKG_MAJOR_MINOR_VERSION:=5.2
 PKG_BUGFIX_MAJOR_VERSION:=3
-PKG_BUGFIX_MINOR_VERSION:=.3
+PKG_BUGFIX_MINOR_VERSION:=.4
 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,10 +22,10 @@ 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:=f620107bd19f8df573ca249720506bcc5fa99db72f191ba04060f2a74c251a56
+PKG_HASH:=c1fc1244bd68710aecd504841965ac7fbbb05fa7fb1b857b1ad43659bd81877b
 
 PKG_MAINTAINER:=Willem van den Akker <wvdakker@wilsoft.nl>
-PKG_LICENSE:=GPL-2.0+
+PKG_LICENSE:=GPL-2.0-or-later
 PKG_LICENSE_FILES:=COPYING
 
 include $(INCLUDE_DIR)/package.mk
index c1f5a410748d74d0c90c4c0290720323d84b3ff3..e3d13005f7fe5a574f414e508a6fc392fb7c837e 100644 (file)
@@ -10,8 +10,8 @@ include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=siit
 PKG_VERSION:=1.2
-PKG_RELEASE:=2
-PKG_LICENSE:=GPLv2+
+PKG_RELEASE:=3
+PKG_LICENSE:=GPL-2.0-or-later
 
 include $(INCLUDE_DIR)/package.mk
 
index 0ef43b23a0f680d2a0d6ff6a18dd45f0a234b5a6..3c5acae9553f5a28928edd94dfa5b7c63f7bec9c 100644 (file)
@@ -5,10 +5,10 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=simple-adblock
-PKG_VERSION:=1.6.3
-PKG_RELEASE:=5
-PKG_LICENSE:=GPL-3.0+
+PKG_VERSION:=1.8.1
+PKG_RELEASE:=11
 PKG_MAINTAINER:=Stan Grishin <stangri@melmac.net>
+PKG_LICENSE:=GPL-3.0-or-later
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -20,8 +20,8 @@ define Package/simple-adblock
 endef
 
 define Package/simple-adblock/description
-This service provides dnsmasq-based ad blocking.
-Please see the README for further information.
+This service provides DNSMASQ or Unbound based ad blocking.
+Please see the project's README at github for further information.
 
 endef
 
@@ -71,6 +71,10 @@ define Package/simple-adblock/prerm
        if [ -z "$${IPKG_INSTROOT}" ]; then
                while uci -q del ucitrack.@simple-adblock[-1]; do :; done
                echo "Stopping service and removing rc.d symlink for simple-adblock"
+               uci -q del_list dhcp.@dnsmasq[0].addnhosts="/var/run/simple-adblock.addnhosts" || true
+               if [ "$$(uci -q get dhcp.@dnsmasq[0].serversfile)" == "/var/run/simple-adblock.servers" ]; then
+                       uci -q del dhcp.@dnsmasq[0].serversfile || true
+               fi
                /etc/init.d/simple-adblock stop || true
                /etc/init.d/simple-adblock killcache || true
                /etc/init.d/simple-adblock disable || true
index fd3dd7f28303bac830b97a022afc1a711cf262de..1f9b249e5d6f02403bb9c55ea32e737b279885f5 100644 (file)
 # Simple AdBlock
-A simple DNSMASQ-based AdBlocking service for OpenWrt/LEDE Project. Loosely based on [bole5's](https://forum.openwrt.org/profile.php?id=45571) idea with major performance improvements, added features and Web UI (as a separate package); inspired by @dibdot's innovation.
+
+A simple DNSMASQ/Unbound-based AdBlocking service for OpenWrt/LEDE Project.
 
 ## Features
-- Supports OpenWrt Designated Driver and LEDE Project.
-- Super-fast due to the nature of supported block lists and backgrounding of already downloaded data while next list is downloading.
-- Supports both hosts files and domains lists for blocking (to keep it lean and fast).
+
+- Super-fast due to the nature of supported block lists and parallel downloading/processing of the blacklists.
+- Supports hosts files and domains lists for blocking.
 - Everything is configurable from Web UI.
 - Allows you to easily add your own domains to whitelist or blacklist.
-- Allows you to easily add URLs to your own blocked hosts or domains lists to block/whitelist (just put whitelisted domains one per line).
-- Requires no configuration for the download utility wherever you want to use wget/libopenssl or uclient-fetch/libustream-mbedtls.
-- Installs dependencies automatically (DD/LEDE-default uclient-fetch libustream-mbedtls).
-- Doesn't stay in memory -- creates the list of blocked domains and then uses DNSMASQ and firewall rules to serve "domain not found reply".
-- As some of the default lists are using https, reliably works with either wget/libopenssl or uclient-fetch/libustream-mbedtls.
-- Very lightweight and easily hackable, the whole script is just one /etc/init.d/simple-adblock file.
-- Logs single entry in the system log with the number of blocked domains if verbosity is set to 0.
-- Retains the downloaded/sorted adblocking list on service stop and reuses it on service start (use reload if you want to force re-download of the list).
-- Blocks ads served over https.
+- Allows you to easily add URLs to your own blocked hosts or domains lists to block/whitelist (just put whitelisted domains one per line in the file you're linking).
+- Supports multiple modes of AdBlocking implementations with DNSMASQ and Unbound.
+- Doesn't stay in memory -- creates the list of blocked domains and then uses DNSMASQ/Unbound and firewall rules to serve NXDOMAIN or 127.0.0.1 reply or to reject access (depending on settings)  for blocked domains.
+- As some of the default lists are using https, reliably works with either wget/libopenssl,  uclient-fetch/libustream-mbedtls or curl.
+- Very lightweight and easily hackable, the whole script is just one ```/etc/init.d/simple-adblock``` file.
+- Retains the downloaded/sorted AdBlocking list on service stop and reuses it on service start (use ```dl``` command if you want to force re-download of the list).
+- Has an option to store a compressed copy of the AdBlocking list in persistent memory which survives reboots.
+- Blocks ads served over https (unlike PixelServ-derived solutions).
+- Blocks ads inside browsers with [DNS-over-HTTPS proxy](https://en.wikipedia.org/wiki/DNS_over_HTTPS) built-in, like [Mozilla Firefox](https://support.mozilla.org/en-US/kb/firefox-dns-over-https#w_about-dns-over-https) or [Google Chrome/Chromium](https://blog.chromium.org/2019/09/experimenting-with-same-provider-dns.html) -- with the ```dnsmasq.ipset``` option.
 - Proudly made in Canada, using locally-sourced electrons.
 
-If you want a more robust AdBlocking, supporting free memory detection and complex block lists, check out [@dibdot's adblock](https://github.com/openwrt/packages/tree/master/net/adblock/files).
+If you want a more robust AdBlocking, supporting free memory detection and complex block lists, supporting IDN, check out [net/adblock](https://github.com/openwrt/packages/tree/master/net/adblock/files).
+
+## Screenshots (luci-app-simple-adblock)
+
+Service Status
+
+![screenshot](https://raw.githubusercontent.com/stangri/openwrt_packages/master/screenshots/simple-adblock/screenshot08-status.png "Service Status")
+
+Configuration - Basic Configuration
 
+![screenshot](https://raw.githubusercontent.com/stangri/openwrt_packages/master/screenshots/simple-adblock/screenshot08-config-basic.png "Configuration - Basic Configuration")
 
-## Screenshot (luci-app-simple-adblock)
-![screenshot](https://raw.githubusercontent.com/stangri/openwrt_packages/master/screenshots/simple-adblock/screenshot06.png "screenshot")
+Configuration - Advanced Configuration
 
+![screenshot](https://raw.githubusercontent.com/stangri/openwrt_packages/master/screenshots/simple-adblock/screenshot08-config-advanced.png "Configuration - Advanced Configuration")
+
+Whitelist and Blocklist Management
+
+![screenshot](https://raw.githubusercontent.com/stangri/openwrt_packages/master/screenshots/simple-adblock/screenshot08-lists.png "Whitelist and Blocklist Management")
 
 ## Requirements
-This service requires the following packages to be installed on your router: ```dnsmasq``` or ```dnsmasq-full``` and either ```ca-certificates```, ```wget``` and ```libopenssl``` (for OpenWrt 15.05.1) or ```uclient-fetch``` and ```libustream-mbedtls``` (for OpenWrt DD trunk and all LEDE Project builds). Additionally installation of ```coreutils-sort``` is highly recommended as it speeds up blocklist processing.
+
+This service requires the following packages to be installed on your router: ```dnsmasq``` or ```dnsmasq-full``` or ```unbound``` and either ```ca-certificates```, ```wget``` and ```libopenssl``` (for OpenWrt 15.05.1) or ```uclient-fetch``` and ```libustream-mbedtls``` (for LEDE Project and OpenWrt 18.06.xx or newer). Additionally installation of ```coreutils-sort``` is highly recommended as it speeds up blocklist processing.
 
 To satisfy the requirements for connect to your router via ssh and run the following commands:
-###### OpenWrt 15.05.1
+
+### How to use DNSMASQ ipset
+
+The ```dnsmasq.ipset``` option requires you to install ```ipset``` and  ```dnsmasq-full``` instead of the ```dnsmasq```. To do that, connect to your router via ssh and run the following command:
+
+```sh
+opkg update; opkg remove dnsmasq; opkg install dnsmasq-full ipset;
+```
+
+### OpenWrt 15.05.1 Requirements
+
 ```sh
 opkg update; opkg install ca-certificates wget libopenssl coreutils-sort dnsmasq
 ```
 
-###### LEDE Project 17.01.x and OpenWrt 18.xx or later
+### LEDE Project 17.01.x and OpenWrt 18.xx (or newer) Requirements
+
 ```sh
 opkg update; opkg install uclient-fetch libustream-mbedtls coreutils-sort dnsmasq
 ```
 
-###### IPv6 Support
+### IPv6 Support
+
 For IPv6 support additionally install ```ip6tables-mod-nat``` and ```kmod-ipt-nat6``` packages from Web UI or run the following in the command line:
+
 ```sh
 opkg update; opkg install ip6tables-mod-nat kmod-ipt-nat6
 ```
 
-###### Speed up blocklist processing with coreutils-sort
+### Speed Up Blocklist Processing
+
 The ```coreutils-sort``` is an optional, but recommended package as it speeds up sorting and removing duplicates from the merged list dramatically. If opkg complains that it can't install ```coreutils-sort``` because /usr/bin/sort is already provided by busybox, you can run ```opkg --force-overwrite install coreutils-sort```.
 
+## Unmet Dependencies
 
-#### Unmet dependencies
 If you are running a development (trunk/snapshot) build of OpenWrt/LEDE Project on your router and your build is outdated (meaning that packages of the same revision/commit hash are no longer available and when you try to satisfy the [requirements](#requirements) you get errors), please flash either current LEDE release image or current development/snapshot image.
 
+## How To Install
 
-## How to install
 Install ```simple-adblock``` and ```luci-app-simple-adblock``` packages from Web UI or run the following in the command line:
+
 ```sh
 opkg update; opkg install simple-adblock luci-app-simple-adblock
 ```
 
-If ```simple-adblock``` and ```luci-app-simple-adblock``` packages are not found in the official feed/repo for your version of OpenWrt/LEDE Project, you will need to [add a custom repo to your router](#add-custom-repo-to-your-router) first.
+If ```simple-adblock``` and ```luci-app-simple-adblock``` packages are not found in the official feed/repo for your version of OpenWrt/LEDE Project, you will need to [add a custom repo to your router](https://github.com/stangri/openwrt_packages/blob/master/README.md#on-your-router) first.
 
+## Default Settings
 
-#### Add custom repo to your router
-If your router is not set up with the access to repository containing these packages you will need to add custom repository to your router by connecting to your router via ssh and running the following commands:
+Default configuration has service disabled (use Web UI to enable/start service or run ```uci set simple-adblock.config.enabled=1; uci commit simple-adblock;```) and selected ad/malware lists suitable for routers with 64Mb RAM. The configuration file has lists in descending order starting with biggest ones, comment out or delete the lists you don't want or your router can't handle.
 
-###### OpenWrt 15.05.1
-```sh
-opkg update; opkg install ca-certificates wget libopenssl
-echo -e -n 'untrusted comment: LEDE usign key of Stan Grishin\nRWR//HUXxMwMVnx7fESOKO7x8XoW4/dRidJPjt91hAAU2L59mYvHy0Fa\n' > /tmp/stangri-repo.pub && opkg-key add /tmp/stangri-repo.pub
-! grep -q 'stangri_repo' /etc/opkg/customfeeds.conf && echo 'src/gz stangri_repo https://raw.githubusercontent.com/stangri/openwrt-repo/master' >> /etc/opkg/customfeeds.conf
-opkg update
-```
+## How To Customize
 
-###### LEDE Project and OpenWrt 18.xx or later
-```sh
-opkg update
-opkg list-installed | grep -q uclient-fetch || opkg install uclient-fetch
-opkg list-installed | grep -q libustream || opkg install libustream-mbedtls
-echo -e -n 'untrusted comment: LEDE usign key of Stan Grishin\nRWR//HUXxMwMVnx7fESOKO7x8XoW4/dRidJPjt91hAAU2L59mYvHy0Fa\n' > /tmp/stangri-repo.pub && opkg-key add /tmp/stangri-repo.pub
-! grep -q 'stangri_repo' /etc/opkg/customfeeds.conf && echo 'src/gz stangri_repo https://raw.githubusercontent.com/stangri/openwrt-repo/master' >> /etc/opkg/customfeeds.conf
-opkg update
-```
+You can use Web UI (found in Services/Simple AdBlock) to add/remove/edit links to:
 
+- [hosts files](https://en.wikipedia.org/wiki/Hosts_(file)) (127.0.0.1 or 0.0.0.0 followed by space and domain name per line) to be blocked.
+- domains lists (one domain name per line) to be blocked.
+- domains lists (one domain name per line) to be whitelisted. It is useful if you want to run ```simple-adblock``` on multiple routers and maintain one centralized whitelist which you can publish on a web-server.
 
-#### Default Settings
-Default configuration has service disabled (use Web UI to enable/start service or run ```uci set simple-adblock.config.enabled=1```) and selected ad/malware lists suitable for routers with 64Mb RAM. The configuration file has lists in descending order starting with biggest ones, comment out or delete the lists you don't want or your router can't handle.
+Please note that these lists **must** include either ```http://``` or ```https://``` (or, if ```curl``` is installed the ```file://```) prefix. Some of the top block lists (both hosts files and domains lists) suitable for routers with at least 8MB RAM are used in the default ```simple-adblock``` installation.
 
+You can also use Web UI to add individual domains to be blocked or whitelisted.
 
-## How to customize
-You can use Web UI (found in Services/Simple AdBlock) to add/remove/edit links to:
-- hosts files (127.0.0.1 or 0.0.0.0 followed by space and domain name per line) to be blocked.
-- domains lists (one domain name per line) to be blocked.
-- domains lists (one domain name per line) to be whitelisted. It is useful if you want to run simple-adblock on multiple routers and maintain one centralized whitelist which you can publish on a web-server.
+If you want to use CLI to customize ```simple-adblock``` config, refer to the [Customization Settings](#customization-settings) section.
 
-Please note that these lists **have** to include either ```http://``` or ```https://``` prefix. Some of the top block lists (both hosts files and domains lists) suitable for routers with at least 8MB RAM are used in the default simple-adblock installation.
+## How To Use
 
-You can also use Web UI to add individual domains to be blocked or whitelisted.
+Once the service is enabled in the [config file](#default-settings), run ```/etc/init.d/simple-adblock start``` to start the service. Either ```/etc/init.d/simple-adblock restart``` or ```/etc/init.d/simple-adblock reload``` will only restart the service and/or re-donwload the lists if there were relevant changes in the config file since the last successful start. Had the previous start resulted in any error, either ```/etc/init.d/simple-adblock start```, ```/etc/init.d/simple-adblock restart``` or ```/etc/init.d/simple-adblock reload``` will attempt to re-download the lists.
+
+If you want to force simple-adblock to re-download the lists, run ```/etc/init.d/simple-adblock dl```.
+
+If you want to check if the specific domain (or part of the domain name) is being blocked, run ```/etc/init.d/simple-adblock check test-domain.com```.
+
+## Configuration Settings
 
-If you want to use CLI to customize simple-adblock config, you can probably figure out how to do it by looking at the contents of ```/etc/config/simple-adblock``` or output of the ```uci show simple-adblock``` command.
+In the Web UI the ```simple-adblock``` settings are split into ```basic``` and ```advanced``` settings. The full list of configuration parameters of ```simple-adblock.config``` section is:
 
-## How does it work
-This service downloads (and processes in the background, removing comments and other useless data) lists of hosts and domains to be blocked, combines those lists into one big block list, removes duplicates and sorts it and then removes your whitelisted domains from the block list before converting to to dnsmasq-compatible file and restarting dnsmasq. The result of the process is that dnsmasq returns "domain not found" for the blocked domains.
+|Web UI Section|Parameter|Type|Default|Description|
+| --- | --- | --- | --- | --- |
+|Basic|enabled|boolean|0|Enable/disable the ```simple-adblock``` service.|
+|Basic|verbosity|integer|2|Can be set to 0, 1 or 2 to control the console and system log output verbosity of the ```simple-adblock``` service.|
+|Basic|force_dns|boolean|1|Force router's DNS to local devices which may have different/hardcoded DNS server settings. If enabled, creates a firewall rule to intercept DNS requests from local devices to external DNS servers and redirect them to router.|
+|Basic|led|string|none|Use one of the router LEDs to indicate the AdBlocking status.|
+|Advanced|dns|string|dnsmasq.servers|DNS resolution option. See [table below](#dns-resolution-option) for addtional information.|
+|Advanced|ipv6_enabled|boolean|0|Add IPv6 entries to block-list if ```dnsmasq.addnhosts``` is used. This option is only visible in Web UI if the ```dnsmasq.addnhosts``` is selected as the DNS resolution option.|
+|Advanced|boot_delay|integer|120|Delay service activation for that many seconds on boot up. You can shorten it to 10-30 seconds on modern fast routers. Routers with built-in modems may require longer boot delay.|
+|Advanced|download_timeout|integer|10|Time-out downloads if no reply received within that many last seconds.|
+|Advanced|curl_retry|integer|3|If ```curl``` is installed and detected, attempt that many retries for failed downloads.|
+|Advanced|parallel_downloads|boolean|1|If enabled, all downloads are completed concurrently, if disabled -- sequentioally. Concurrent downloads dramatically speed up service loading.|
+|Advanced|debug|boolean|0|If enabled, output service full debug to ```/tmp/simple-adblock.log```. Please note that the debug file may clog up the router's RAM on some devices. Use with caution.|
+|Advanced|allow_non_ascii|boolean|0|Enable support for non-ASCII characters in the final AdBlocking file. Only enable if your target service supports non-ASCII characters. If you enable this on the system where DNS resolver doesn't support non-ASCII characters, it will crash. Use with caution.|
+|Advanced|compressed_cache|boolean|0|Create compressed cache of the AdBlocking file in router's persistent memory. Only recommended to be used on routers with large ROM and/or routers with metered/flaky internet connection.|
+||whitelist_domain|list/string||List of white-listed domains.|
+||whitelist_domains_url|list/string||List of URL(s) to text files containing white-listed domains. **Must** include either ```http://``` or ```https://``` (or, if ```curl``` is installed the ```file://```) prefix. Useful if you want to keep/publish a single white-list for multiple routers.|
+||blacklist_domains_url|list/string||List of URL(s) to text files containing black-listed domains. **Must** include either ```http://``` or ```https://``` (or, if ```curl``` is installed the ```file://```) prefix.|
+||blacklist_hosts_url|list/string||List of URL(s) to [hosts files](https://en.wikipedia.org/wiki/Hosts_(file)) containing black-listed domains. **Must** include either ```http://``` or ```https://``` (or, if ```curl``` is installed the ```file://```) prefix.|
+
+### DNS Resolution Option
+
+Currently supported options are:
+
+|Option|Explanation|
+| --- | --- |
+|```dnsmasq.addnhosts```|Creates the DNSMASQ additional hosts file ```/var/run/simple-adblock.addnhosts``` and modifies DNSMASQ settings, so that DNSMASQ resolves all blocked domains to "local machine": 127.0.0.1. This option doesn't allow block-list optimization (by removing secondary level domains if the top-level domain is also in the block-list), so it results in a much larger block-list file, but, unlike other DNSMASQ-based options, it has almost no effect on the DNS look up speed. This option also allows quick reloads of DNSMASQ on block-list updates.|
+|```dnsmasq.conf```|Creates the DNSMASQ config file ```/var/dnsmasq.d/simple-adblock``` so that DNSMASQ replies with NXDOMAIN: "domain not found". This option allows the block-list optimization (by removing secondary level domains if the top-level domain is also in the block-list), resulting in the smaller block-list file. This option will slow down DNS look up speed somewhat.|
+|```dnsmasq.ipset```|Creates the DNSMASQ ipset file ```/var/dnsmasq.d/simple-adblock.ipset``` and the firewall rule to reject the matching requests. This is the only option for AdBlocking if you're using a browser with [DNS-over-HTTPS proxy](https://en.wikipedia.org/wiki/DNS_over_HTTPS) built-in, like [Mozilla Firefox](https://support.mozilla.org/en-US/kb/firefox-dns-over-https#w_about-dns-over-https) or [Google Chrome/Chromium](https://blog.chromium.org/2019/09/experimenting-with-same-provider-dns.html). This option allows the block-list optimization (by removing secondary level domains if the top-level domain is also in the block-list), resulting in the smaller block-list file. This option requires you install ```dnsmasq-full``` and ```ipset``` [as described here](#how-to-use-dnsmasq-ipset).<br/>PLEASE NOTE, that unlike other options which are truly domain name based blocking, this is essentially an IP address based blocking, ie: if you try to block ```google-analytics.com``` with this option, it may also block/break things like YouTube, Hangouts and other Google services if they share IP address(es) with ```google-analytics.com```.|
+|```dnsmasq.servers```|Creates the DNSMASQ servers file ```/var/run/simple-adblock.servers``` and modifies DNSMASQ settings so that DNSMASQ replies with NXDOMAIN: "domain not found". This option allows the block-list optimization (by removing secondary level domains if the top-level domain is also in the block-list), resulting in the smaller block-list file. This option will slow down DNS look up speed somewhat. This is a default setting as it results in the smaller block-file and allows quick reloads of DNSMASQ.|
+|```unbound.adb_list```|Creates the Unbound config file ```/var/lib/unbound/adb_list.simple-adblock``` so that Unbound replies with NXDOMAIN: "domain not found". This option allows the block-list optimization (by removing secondary level domains if the top-level domain is also in the block-list), resulting in the smaller block-list file.|
+
+## How Does It Work
+
+This service downloads (and processes in the background, removing comments and other useless data) lists of hosts and domains to be blocked, combines those lists into one big block list, removes duplicates and sorts it and then removes your whitelisted domains from the block list before converting to to DNSMASQ/Unbound-compatible file and restarting DNSMASQ/Unbound if needed. The result of the process is that DNSMASQ/Unbound return NXDOMAIN or 127.0.0.1 (depending on settings) for the blocked domains.
 
 If you specify ```google.com``` as a domain to be whitelisted, you will have access to ```google.com```, ```www.google.com```, ```analytics.google.com```, but not fake domains like ```email-google.com``` or ```drive.google.com.verify.signin.normandeassociation.com``` for example. If you only want to allow ```www.google.com``` while blocking all other ```google.com``` subdomains, just specify ```www.google.com``` as domain to be whitelisted.
 
 In general, whatever domain is specified to be whitelisted; it, along with with its subdomains will be whitelisted, but not any fake domains containing it.
 
+## How It Does Not Work
+
+For most of the [DNS Resolution Options](#dns-resolution-option) to work, your local LAN clients need to be set to use your router's DNS (by default ```192.168.1.1```). The ```dnsmasq.addnhosts``` is the only option which can help you block ads if your local LAN clients are NOT using your router's DNS. There are multiple ways your local LAN clients can be set to NOT use your router's DNS:
+
+  1. Hardcoded on the device. Some Android Lollipop 5.0 phones, some media-centric tablets and some streaming devices for example are known to have hardcoded DNS servers and they ignore your router's DNS settings. You can fix this by either:
+      - Rooting your device and changing it from hardcoded DNS servers to obtaining DNS servers from DHCP.
+      - Enabling ```simple-adblock```'s ```force_dns``` setting to override the hardcoded DNS on your device.
+  2. Manually set on the device. Instead of setting your device to obtain the DNS settings via DHCP, you can set the DNS servers manually. There are some guides online which recommend manually changing the DNS servers on your computer to Google's (8.8.8.8) or Cloudflare's (1.1.1.1) or OpenDNS (208.67.222.222). You can fix this by either:
+      - Changing the on-device DNS settings from manual to obtaining DNS servers from DHCP and changing your [router's DNS settings](https://openwrt.org/docs/guide-user/base-system/dhcp#all_options) to use the DNS from Google, Cloudflare or OpenDNS respectively.
+      - Enabling ```simple-adblock```'s ```force_dns``` setting to override the hardcoded DNS on your device.
+  3. Sent to your device from router via [DHCP Options](https://openwrt.org/docs/guide-user/base-system/dhcp_configuration#dhcp_options). You can fix this by either:
+      - Removing [DHCP Options](https://openwrt.org/docs/guide-user/base-system/dhcp_configuration#dhcp_options) 5 and 6 from your router's ```/etc/config/dhcp``` file.
+      - Enabling ```simple-adblock```'s ```force_dns``` setting to override the hardcoded DNS on your device.
+  4. By using the DNS-over-TLS, DNS-over-HTTPS or DNSCrypt on your local device or (if supported) by browser on your local device. You can fix this only by:
+      - Stopping/removing/disabling DNS-over-TLS, DNS-over-HTTPS or DNSCrypt on your local device and using the secure DNS on your router instead. There are merits to all three of the options above, I can recommend the ```https_dns_proxy``` and ```luci-app-https_dns_proxy``` packages for enabling DNS-over-HTTPS on your router.
+
 ## Documentation / Discussion
-Please head [LEDE Project Forum](https://forum.lede-project.org/t/simple-adblock-fast-lean-and-fully-uci-luci-configurable-adblocking/1327/) for discussion of this package.
-
-## What's New
-1.5.8:
-- Better start/stop/reload logic.
-- Better uninstall logic.
-- Better start/stop/reload from Web UI.
-- New command-line ```check``` command.
-
-1.5.7:
-- Much stricter filters for hosts and domains lists resulting in better garbage removal.
-- Better handling of service start/enable from Web UI and enabled flag management.
-- Implemented support to set one of the router LEDs on/off based on the AdBlocking status.
-- Fixed the output bug when verbosity=1.
-- No longer using enabled in config file, Simple AdBlocking Web UI now enables/disables service directly.
-- Reworked console/system log output logic and formatting.
-- Processes already downloaded lists in the background while downloading next list from config, dramatically increasing overall speed.
-
-1.0.0:
-- Initial release
+
+Please head to [OpenWrt Forum](https://forum.openwrt.org/t/simple-adblock-fast-lean-and-fully-uci-luci-configurable-adblocking/1327/) for discussion of this package.
+
+## Thanks
+
+I'd like to thank everyone who helped create, test and troubleshoot this service. Special thanks to [@hnyman](https://github.com/hnyman) for general package/luci guidance, [@dibdot](https://github.com/dibdot) for general guidance and block-list optimization code, [@ckuethe](https://github.com/ckuethe) for the curl support, non-ASCII filtering and compressed cache code, [@EricLuehrsen](https://github.com/EricLuehrsen) for the Unbound support information, [@mushoz]( https://github.com/mushoz) for performance testing and [@phasecat](https://forum.openwrt.org/u/phasecat/summary) for submitting various bugs and testing.
index ee151594edef1e9be352dee05aa0f961d3107a0f..6f1947a3b89206465982d7f5e25d503e4d39d45d 100644 (file)
@@ -1,26 +1,85 @@
 config simple-adblock 'config'
        option enabled '0'
+       option dns 'dnsmasq.servers'
+       option dns_instance '0'
        option verbosity '2'
        option force_dns '1'
-       option hosts_file '/var/dnsmasq.d/simple-adblock'
+       option led 'none'
+       option boot_delay '120'
+       option download_timeout '10'
+       option curl_retry '3'
+       option parallel_downloads '1'
+       option debug '0'
+       option compressed_cache '0'
   list whitelist_domain 'raw.githubusercontent.com'
-#      list blacklist_hosts_url 'http://support.it-mate.co.uk/downloads/hosts.txt'
-#      list blacklist_hosts_url 'http://hostsfile.mine.nu/Hosts'
-#      list blacklist_hosts_url 'http://hosts-file.net/.\ad_servers.txt'
-#      list blacklist_hosts_url 'http://sysctl.org/cameleon/hosts.win'
-       list blacklist_hosts_url 'http://www.mvps.org/winhelp2002/hosts.txt'
-       list blacklist_hosts_url 'http://pgl.yoyo.org/as/serverlist.php?hostformat=hosts&showintro=1&mimetype=plaintext'
-       list blacklist_hosts_url 'http://www.malwaredomainlist.com/hostslist/hosts.txt'
-       list blacklist_hosts_url 'https://adaway.org/hosts.txt'
-       list blacklist_hosts_url 'http://someonewhocares.org/hosts/hosts'
-       list blacklist_hosts_url 'https://raw.githubusercontent.com/hoshsadiq/adblock-nocoin-list/master/hosts.txt'
-       list blacklist_hosts_url 'https://zeustracker.abuse.ch/blocklist.php?download=hostfile'
-       list blacklist_domains_url 'http://mirror1.malwaredomains.com/files/justdomains'
-       list blacklist_domains_url 'https://s3.amazonaws.com/lists.disconnect.me/simple_malvertising.txt'
-       list blacklist_domains_url 'https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt'
-       list blacklist_domains_url 'https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt'
-       list blacklist_domains_url 'https://ransomwaretracker.abuse.ch/downloads/RW_DOMBL.txt'
-       list blacklist_domains_url 'https://ssl.bblck.me/blacklists/domain-list.txt'
-       list blacklist_domains_url 'http://dshield.org/feeds/suspiciousdomains_High.txt'
-#      list blacklist_domains_url 'http://dshield.org/feeds/suspiciousdomains_Medium.txt'
-#      list blacklist_domains_url 'http://dshield.org/feeds/suspiciousdomains_Low.txt'
+
+# Thu Oct  3 17:54:04 PDT 2019
+# File size: 4.0K
+  list blacklist_domains_url 'https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt'
+
+# File size: 4.0K
+  list blacklist_domains_url 'https://dshield.org/feeds/suspiciousdomains_High.txt'
+
+# File size: 12.0K
+  list blacklist_domains_url 'https://ssl.bblck.me/blacklists/domain-list.txt'
+
+# File size: 44.0K
+  list blacklist_domains_url 'https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt'
+
+# File size: 44.0K
+  list blacklist_domains_url 'https://s3.amazonaws.com/lists.disconnect.me/simple_malvertising.txt'
+
+# File size: 52.0K
+  list blacklist_domains_url 'https://ransomwaretracker.abuse.ch/downloads/RW_DOMBL.txt'
+
+# File size: 60.0K
+# use just one of the dshield.org blocklists
+#  list blacklist_domains_url 'https://dshield.org/feeds/suspiciousdomains_Medium.txt'
+
+# File size: 64.0K
+# use just one of the dshield.org blocklists
+#  list blacklist_domains_url 'https://dshield.org/feeds/suspiciousdomains_Low.txt'
+
+# File size: 584.0K
+# blocklist too big for most routers
+#  list blacklist_domains_url 'https://mirror1.malwaredomains.com/files/justdomains'
+
+# File size: 20.0K
+  list blacklist_hosts_url 'https://raw.githubusercontent.com/hoshsadiq/adblock-nocoin-list/master/hosts.txt'
+
+# File size: 36.0K
+  list blacklist_hosts_url 'https://www.malwaredomainlist.com/hostslist/hosts.txt'
+
+# File size: 80.0K
+  list blacklist_hosts_url 'https://pgl.yoyo.org/as/serverlist.php?hostformat=hosts&showintro=1&mimetype=plaintext'
+
+# File size: 388.0K
+# blocklist may be too big for some routers
+  list blacklist_hosts_url 'https://raw.githubusercontent.com/jawz101/MobileAdTrackers/master/hosts'
+
+# File size: 424.0K
+# blocklist may be too big for some routers
+  list blacklist_hosts_url 'http://winhelp2002.mvps.org/hosts.txt'
+
+# File size: 432.0K
+# blocklist may be too big for some routers
+  list blacklist_hosts_url 'https://someonewhocares.org/hosts/hosts'
+
+# File size: 624.0K
+# blocklist too big for most routers
+#  list blacklist_hosts_url 'http://sysctl.org/cameleon/hosts'
+
+# File size: 1.7M
+# blocklist too big for most routers
+#  list blacklist_hosts_url 'https://hosts-file.net/ad_servers.txt'
+
+# File size: 3.1M
+# blocklist too big for most routers
+#  list blacklist_hosts_url 'https://hostsfile.mine.nu/Hosts'
+
+# site was down on last check
+#  list blacklist_domains_url 'https://adaway.org/hosts.txt'
+
+# site was down on last check
+#  list blacklist_domains_url 'http://support.it-mate.co.uk/downloads/hosts.txt'
+
index 53062460d9911f6da7870e6d882e97772a7cedb9..a21673a68b62c63f99a727ab32dd724086b1bfbe 100644 (file)
@@ -1,5 +1,5 @@
 #!/bin/sh
 
-if [[ "$ACTION" == "ifup" ]]; then
+if [ "$ACTION" = "ifup" ]; then
   sleep 10 && /etc/init.d/simple-adblock start &
 fi
index 799ee44677c7b2ec7b690e8680d27e82fb985e68..d95ae25e69d4b0c06b40040b708eedd4f42b44f1 100644 (file)
@@ -1,23 +1,48 @@
 #!/bin/sh /etc/rc.common
-# TLD optimization written by Dirk Brenken (dev@brenken.org)
+# Copyright 2017-2019 Stan Grishin (stangri@melmac.net)
+# shellcheck disable=SC2039
+# shellcheck disable=SC1091
 PKG_VERSION=
 
 export START=94
 export USE_PROCD=1
+export LC_ALL=C
+
+export EXTRA_COMMANDS='check dl killcache sizes status'
+export EXTRA_HELP='    check   Checks if specified domain is found in current blacklist
+       dl      Force-redownloads all the list
+       sizes   Shows the file-sizes of enabled block-lists (by downloading them one by one)
+       status  Shows the service last-run status'
 
 readonly packageName='simple-adblock'
 readonly serviceName="$packageName $PKG_VERSION"
-readonly PID="/var/run/${packageName}.pid"
+readonly addnhostsFile="/var/run/${packageName}.addnhosts"
+readonly addnhostsCache="/var/run/${packageName}.addnhosts.cache"
+readonly addnhostsGzip="/etc/${packageName}.addnhosts.gz"
+readonly addnhostsOutputFilter='s|^|127.0.0.1 |;s|$||'
+readonly addnhostsOutputFilterIPv6='s|^|:: |;s|$||'
 readonly dnsmasqFile="/var/dnsmasq.d/${packageName}"
-export EXTRA_COMMANDS="check killcache"
-export EXTRA_HELP="    check   Checks if specified domain is found in current blacklist"
-
-readonly A_TMP='/var/simple-adblock.hosts.a.tmp'
-readonly B_TMP='/var/simple-adblock.hosts.b.tmp'
-readonly CACHE_TMP='/var/simple-adblock.cache'
-readonly h_filter='/localhost/d;/^#/d;/^[^0-9]/d;s/^0\.0\.0\.0.//;s/^127\.0\.0\.1.//;s/[[:space:]]*#.*$//;s/[[:cntrl:]]$//;s/[[:space:]]//g;/[`~!@#\$%\^&\*()=+;:"'\'',<>?/\|[{}]/d;/]/d;/\./!d;/^$/d;'
-readonly d_filter='/^#/d;s/[[:space:]]*#.*$//;s/[[:space:]]*$//;s/[[:cntrl:]]$//;/[[:space:]]/d;/[`~!@#\$%\^&\*()=+;:"'\'',<>?/\|[{}]/d;/]/d;/\./!d;/^$/d;'
-readonly f_filter='s|^|local=/|;s|$|/|'
+readonly dnsmasqCache="/var/run/${packageName}.dnsmasq.cache"
+readonly dnsmasqGzip="/etc/${packageName}.dnsmasq.gz"
+readonly dnsmasqOutputFilter='s|^|local=/|;s|$|/|'
+readonly ipsetFile="/var/dnsmasq.d/${packageName}.ipset"
+readonly ipsetCache="/var/run/${packageName}.ipset.cache"
+readonly ipsetGzip="/etc/${packageName}.ipset.gz"
+readonly ipsetOutputFilter='s|^|ipset=/|;s|$|/adb|'
+readonly serversFile="/var/run/${packageName}.servers"
+readonly serversCache="/var/run/${packageName}.servers.cache"
+readonly serversGzip="/etc/${packageName}.servers.gz"
+readonly serversOutputFilter='s|^|server=/|;s|$|/|'
+readonly unboundFile="/var/lib/unbound/adb_list.${packageName}"
+readonly unboundCache="/var/run/${packageName}.unbound.cache"
+readonly unboundGzip="/etc/${packageName}.unbound.gz"
+readonly unboundOutputFilter='s|^|local-zone: "|;s|$|" static|'
+readonly A_TMP="/var/${packageName}.hosts.a.tmp"
+readonly B_TMP="/var/${packageName}.hosts.b.tmp"
+readonly PIDFile="/var/run/${packageName}.pid"
+readonly jsonFile="/var/run/${packageName}.json"
+readonly hostsFilter='/localhost/d;/^#/d;/^[^0-9]/d;s/^0\.0\.0\.0.//;s/^127\.0\.0\.1.//;s/[[:space:]]*#.*$//;s/[[:cntrl:]]$//;s/[[:space:]]//g;/[`~!@#\$%\^&\*()=+;:"'\'',<>?/\|[{}]/d;/]/d;/\./!d;/^$/d;/[^[:alnum:]_.-]/d;'
+readonly domainsFilter='/^#/d;s/[[:space:]]*#.*$//;s/[[:space:]]*$//;s/[[:cntrl:]]$//;/[[:space:]]/d;/[`~!@#\$%\^&\*()=+;:"'\'',<>?/\|[{}]/d;/]/d;/\./!d;/^$/d;/[^[:alnum:]_.-]/d;'
 readonly checkmark='\xe2\x9c\x93'
 readonly xmark='\xe2\x9c\x97'
 readonly _OK_='\033[0;32m\xe2\x9c\x93\033[0m'
@@ -25,56 +50,158 @@ readonly _FAIL_='\033[0;31m\xe2\x9c\x97\033[0m'
 readonly __OK__='\033[0;32m[\xe2\x9c\x93]\033[0m'
 readonly __FAIL__='\033[0;31m[\xe2\x9c\x97]\033[0m'
 readonly _ERROR_='\033[0;31mERROR\033[0m'
+readonly statusSuccess='Success'
+readonly statusFail='Fail'
+readonly statusDownloading='Downloading'
+readonly statusReloading='Reloading'
+readonly statusRestarting='Restarting'
+readonly statusStarting='Starting'
+readonly statusForceReloading='Force-Reloading'
+readonly statusProcessing='Processing'
+readonly statusStopped='Stopped'
+readonly sharedMemoryError="/dev/shm/$packageName-error"
+readonly sharedMemoryOutput="/dev/shm/$packageName-output"
 
-create_lock() { [ -e "$PID" ] && return 1; touch "$PID"; }
-remove_lock() { [ -e "$PID" ] && rm -f "$PID"; rm -f /var/simple-adblock_tmp_* >/dev/null 2>&1; }
+create_lock() { [ -e "$PIDFile" ] && return 1; touch "$PIDFile"; }
+remove_lock() { [ -e "$PIDFile" ] && rm -f "$PIDFile"; }
 trap remove_lock EXIT
-output_ok() { case $verbosity in 1) output 1 "$_OK_";; 2) output 2 "$__OK__\n";; esac; }
-output_okn() { case $verbosity in 1) output 1 "$_OK_\n";; 2) output 2 "$__OK__\n";; esac; }
-output_fail() { case $verbosity in 1) output 1 "$_FAIL_";; 2) output 2 "$__FAIL__\n";; esac; }
-output_failn() { case $verbosity in 1) output 1 "$_FAIL_\n";; 2) output 2 "$__FAIL__\n";; esac; }
-export logmsg
+output_ok() { output 1 "$_OK_"; output 2 "$__OK__\\n"; }
+output_okn() { output 1 "$_OK_\\n"; output 2 "$__OK__\\n"; }
+output_fail() { output 1 "$_FAIL_"; output 2 "$__FAIL__\\n"; }
+output_failn() { output 1 "$_FAIL_\\n"; output 2 "$__FAIL__\\n"; }
+str_replace() { echo "$1" | sed -e "s/$2/$3/g"; }
+str_contains() { test "$1" != "$(str_replace "$1" "$2" '')"; }
+compare_versions() { test "$(printf '%s\n' "$@" | sort -V | head -n 1)" != "$1"; }
+is_chaos_calmer() { ubus -S call system board | grep -q 'Chaos Calmer'; }
+is_ipset_procd() { compare_versions "$(sed -ne 's/^Version: //p' /usr/lib/opkg/info/firewall.control)" "2019-09-18"; }
+led_on(){ if [ -n "${1}" ] && [ -e "${1}/trigger" ]; then echo 'default-on' > "${1}/trigger" 2>&1; fi; }
+led_off(){ if [ -n "${1}" ] &&  [ -e "${1}/trigger" ]; then echo 'none' > "${1}/trigger" 2>&1; fi; }
+dnsmasq_kill() { killall -q -HUP dnsmasq; }
+dnsmasq_restart() { /etc/init.d/dnsmasq restart >/dev/null 2>&1; }
+unbound_restart() { /etc/init.d/unbound restart >/dev/null 2>&1; }
+
 output() {
 # Can take a single parameter (text) to be output at any verbosity
 # Or target verbosity level and text to be output at specifc verbosity
-       if [[ $# -ne 1 ]]; then
-               [[ ! $((verbosity & $1)) -gt 0 ]] && return 0 || shift
+       local msg memmsg
+       if [ $# -ne 1 ]; then
+               if [ $((verbosity & $1)) -gt 0 ] || [ "$verbosity" = "$1" ]; then shift; else return 0; fi
        fi
-       [[ -t 1 ]] && echo -e -n "$1" # if we're running in console, echo text
-       # strip text of ASCII control characters and send completed lines to log
-       local msg=$(echo -n "${1/$serviceName /service }" | sed 's|\\033\[[0-9]\?;\?[0-9]\?[0-9]\?m||g');
-       if [[ $(echo -e -n "$msg" | wc -l) -gt 0 ]]; then
-               logger -t "${packageName:-service} [$$]" "$(echo -e -n ${logmsg}${msg})"
-               logmsg=''
+       [ -t 1 ] && printf "%b" "$1"
+       msg="$(printf "%s" "$(str_replace "$1" "$serviceName " "service ")" | sed 's|\\033\[[0-9]\?;\?[0-9]\?[0-9]\?m||g')";
+       if [ "$(printf "%b" "$msg" | wc -l)" -gt 0 ]; then
+               [ -s "$sharedMemoryOutput" ] && memmsg="$(cat "$sharedMemoryOutput")"
+               logger -t "${packageName:-service} [$$]" "$(printf "%b" "${memmsg}${msg}")"
+               rm -f "$sharedMemoryOutput"
        else
-               logmsg=${logmsg}${msg}
+               printf "%b" "$msg" >> "$sharedMemoryOutput"
        fi
 }
-led_on(){ [[ -n "${1}" && -e "${1}/trigger" ]] && echo "default-on" > "${1}/trigger" 2>&1; }
-led_off(){ [[ -n "${1}" && -e "${1}/trigger" ]] && echo "none" > "${1}/trigger" 2>&1; }
-boot() { load_package_config; ( sleep $bootDelay && rc_procd start_service && rc_procd service_triggers | cat & ); }
 
-export serviceEnabled verbosity forceDNS debug led wan_if wan_gw wanphysdev bootDelay dl_command serviceStatus
+export serviceEnabled forceDNS parallelDL debug allowIDN compressedCache     
+export targetDNS bootDelay dlTimeout curlRetry verbosity led dnsInstance
+export whitelist_domains blacklist_domains
+export whitelist_domains_urls blacklist_domains_urls blacklist_hosts_urls
+export wan_if wan_gw wanphysdev dl_command serviceStatus dl_flag
+export outputFilter outputFilterIPv6 outputFile outputGzip outputCache ipv6Enabled
 
 load_package_config() {
        config_load "$packageName"
-       config_get_bool serviceEnabled 'config' 'enabled' 1
-       config_get_bool forceDNS       'config' 'force_dns' 1
-       config_get_bool debug          'config' 'debug' 0
-       config_get bootDelay           'config' 'boot_delay' '120'
-       config_get dlTimeout           'config' 'download_timeout' '20'
-       config_get verbosity           'config' 'verbosity' '2'
-       config_get led                 'config' 'led'
-       if [ -z "${verbosity##*[!0-9]*}" ] || [ $verbosity -lt 0 ] || [ $verbosity -gt 2 ]; then
+       config_get_bool serviceEnabled        'config' 'enabled' 1
+       config_get_bool forceDNS              'config' 'force_dns' 1
+       config_get_bool parallelDL            'config' 'parallel_downloads' 1
+       config_get_bool debug                 'config' 'debug' 0
+       config_get_bool compressedCache       'config' 'compressed_cache' 0
+       config_get_bool ipv6Enabled           'config' 'ipv6_enabled' 0
+       config_get bootDelay                  'config' 'boot_delay' '120'
+       config_get dlTimeout                  'config' 'download_timeout' '20'
+       config_get curlRetry                  'config' 'curl_retry' '3'
+       config_get verbosity                  'config' 'verbosity' '2'
+       config_get led                        'config' 'led'
+       config_get targetDNS                  'config' 'dns' 'dnsmasq.servers'
+       config_get dnsInstance                'config' 'dns_instance' '0'
+       config_get whitelist_domains          'config' 'whitelist_domain'
+       config_get blacklist_domains          'config' 'blacklist_domain'
+       config_get whitelist_domains_urls     'config' 'whitelist_domains_url'
+       config_get blacklist_domains_urls     'config' 'blacklist_domains_url'
+       config_get blacklist_hosts_urls       'config' 'blacklist_hosts_url'
+
+       if [ "$targetDNS" != 'dnsmasq.addnhosts' ] && [ "$targetDNS" != 'dnsmasq.conf' ] && \
+                [ "$targetDNS" != 'dnsmasq.servers' ] && [ "$targetDNS" != 'unbound.adb_list' ] && \
+                [ "$targetDNS" != 'dnsmasq.ipset' ] ; then
+               targetDNS='dnsmasq.servers'
+       fi
+
+       case "$targetDNS" in
+               dnsmasq.addnhosts)
+                       outputFilter="$addnhostsOutputFilter"
+                       outputFile="$addnhostsFile"
+                       outputCache="$addnhostsCache"
+                       outputGzip="$addnhostsGzip"
+                       [ "$ipv6Enabled" -gt 0 ] && outputFilterIPv6="$addnhostsOutputFilterIPv6"
+                       rm -f "$dnsmasqFile" "$dnsmasqCache" "$dnsmasqGzip"
+                       rm -f "$ipsetFile" "$ipsetCache" "$ipsetGzip"
+                       rm -f "$serversFile" "$serversCache" "$serversGzip"
+                       rm -f "$unboundFile" "$unboundCache" "$unboundGzip"
+                       ;;
+               dnsmasq.conf)
+                       outputFilter="$dnsmasqOutputFilter"
+                       outputFile="$dnsmasqFile"
+                       outputCache="$dnsmasqCache"
+                       outputGzip="$dnsmasqGzip"
+                       rm -f "$addnhostsFile" "$addnhostsCache" "$addnhostsGzip"
+                       rm -f "$ipsetFile" "$ipsetCache" "$ipsetGzip"
+                       rm -f "$serversFile" "$serversCache" "$serversGzip"
+                       rm -f "$unboundFile" "$unboundCache" "$unboundGzip"
+                       ;;
+               dnsmasq.ipset)
+                       outputFilter="$ipsetOutputFilter"
+                       outputFile="$ipsetFile"
+                       outputCache="$ipsetCache"
+                       outputGzip="$ipsetGzip"
+                       rm -f "$dnsmasqFile" "$dnsmasqCache" "$dnsmasqGzip"
+                       rm -f "$addnhostsFile" "$addnhostsCache" "$addnhostsGzip"
+                       rm -f "$serversFile" "$serversCache" "$serversGzip"
+                       rm -f "$unboundFile" "$unboundCache" "$unboundGzip"
+                       ;;
+               dnsmasq.servers)
+                       outputFilter="$serversOutputFilter"
+                       outputFile="$serversFile"
+                       outputCache="$serversCache"
+                       outputGzip="$serversGzip"
+                       rm -f "$dnsmasqFile" "$dnsmasqCache" "$dnsmasqGzip"
+                       rm -f "$addnhostsFile" "$addnhostsCache" "$addnhostsGzip"
+                       rm -f "$ipsetFile" "$ipsetCache" "$ipsetGzip"
+                       rm -f "$unboundFile" "$unboundCache" "$unboundGzip"
+                       ;;
+               unbound.adb_list)
+                       outputFilter="$unboundOutputFilter"
+                       outputFile="$unboundFile"
+                       outputCache="$unboundCache"
+                       outputGzip="$unboundGzip"
+                       rm -f "$addnhostsFile" "$addnhostsCache" "$addnhostsGzip"
+                       rm -f "$dnsmasqFile" "$dnsmasqCache" "$dnsmasqGzip"
+                       rm -f "$ipsetFile" "$ipsetCache" "$ipsetGzip"
+                       rm -f "$serversFile" "$serversCache" "$serversGzip"
+                       ;;
+       esac
+       if [ -z "${verbosity##*[!0-9]*}" ] || [ "$verbosity" -lt 0 ] || [ "$verbosity" -gt 2 ]; then
                verbosity=1
        fi
-       source /lib/functions/network.sh
-       dl_command="wget --no-check-certificate --timeout $dlTimeout -qO-"
+       . /lib/functions/network.sh
+       . /usr/share/libubox/jshn.sh
+       # Prefer curl because it supports the file: scheme.
+       if [ -x /usr/bin/curl ] ; then
+               dl_command="curl --insecure --retry $curlRetry --connect-timeout $dlTimeout --silent"
+               dl_flag="-o"
+       else
+               dl_command="wget --no-check-certificate --timeout $dlTimeout -q"
+               dl_flag="-O"
+       fi
        led="${led:+/sys/class/leds/$led}"
 }
 
 is_enabled() {
-       local sleepCount=1
        load_package_config
 
        if [ "$debug" -ne 0 ]; then
@@ -83,346 +210,921 @@ is_enabled() {
                set -x
        fi
 
-       if [ $serviceEnabled -eq 0 ]; then
-               if [ "$1" == "on_start" ]; then
-                       output "$packageName is currently disabled.\n"
-                       output "Run the following commands before starting service again:\n"
-                       output "uci set $packageName.config.enabled='1'; uci commit;\n"
-               fi
+       if [ "$serviceEnabled" -eq 0 ]; then
+               case "$1" in
+                       on_start)
+                               output "$packageName is currently disabled.\\n"
+                               output "Run the following commands before starting service again:\\n"
+                               output "uci set ${packageName}.config.enabled='1'; uci commit $packageName;\\n"
+                               ;;
+               esac
                return 1
        fi
-       network_flush_cache; network_find_wan wan_if;   network_get_gateway wan_gw $wan_if;
+
+       case $targetDNS in
+               dnsmasq.addnhosts | dnsmasq.conf | dnsmasq.ipset | dnsmasq.servers)
+                       if dnsmasq -v 2>/dev/null | grep -q 'no-IDN' || ! dnsmasq -v 2>/dev/null | grep -q -w 'IDN'; then
+                               allowIDN=0
+                       else
+                               allowIDN=1
+                       fi
+                       ;;
+               unbound.adb_list)
+                       allowIDN=1;;
+       esac
+
+       case $targetDNS in
+               dnsmasq.ipset)
+                       if dnsmasq -v 2>/dev/null | grep -q 'no-ipset' || ! dnsmasq -v 2>/dev/null | grep -q -w 'ipset'; then
+                               output "$_ERROR_: DNSMASQ ipset support is enabled in $packageName, but DNSMASQ is either not installed or installed DNSMASQ does not support ipsets!\\n"
+                               targetDNS='dnsmasq.servers'
+                       fi
+                       if ! ipset help hash:net >/dev/null 2>&1; then
+                               output "$_ERROR_: DNSMASQ ipset support is enabled in $packageName, but ipset is either not installed or installed ipset does not support 'hash:net' type!\\n"
+                               targetDNS='dnsmasq.servers'
+                       fi
+                       ;;
+       esac
+
+       [ ! -d "${outputFile%/*}" ] && mkdir -p "${outputFile%/*}"
+       [ ! -d "${outputCache%/*}" ] && mkdir -p "${outputFile%/*}"
+       [ ! -d "${outputGzip%/*}" ] && mkdir -p "${outputFile%/*}"
+       cacheOps 'testGzip' && return 0
+       network_flush_cache; network_find_wan wan_if; network_get_gateway wan_gw "$wan_if";
        [ -n "$wan_gw" ] && return 0
-       output "$_ERROR_: $serviceName failed to discover WAN gateway.\n"; return 1;
+       output "$_ERROR_: $serviceName failed to discover WAN gateway.\\n"; return 1;
 }
 
-dnsmasq_kill() { killall -q -HUP dnsmasq; }
-dnsmasq_restart() { /etc/init.d/dnsmasq restart >/dev/null 2>&1; }
-reload_dnsmasq() {
+reload_resolver() {
+       local param output_text
        case $1 in
                on_start)
-                       if [ -s $dnsmasqFile ]; then
-                               output 3 'Restarting dnsmasq '
-                               if dnsmasq_restart; then
-                                       led_on "$led"
-                                       output_okn
+                       if [ ! -s "$outputFile" ]; then
+                               tmpfs set status "$statusFail"
+                               tmpfs add error "Error: Failed to create $outputFile file."
+                               output "$_ERROR_: $serviceName failed to create its data file!\\n"
+                               return 1
+                       fi
+                       case "$targetDNS" in
+                               dnsmasq.addnhosts)
+                                       if [ "$(uci -q get dhcp.@dnsmasq["$dnsInstance"].serversfile)" = "$serversFile" ]; then
+                                               uci -q del dhcp.@dnsmasq["$dnsInstance"].serversfile
+                                       fi
+                                       if ! uci -q get dhcp.@dnsmasq["$dnsInstance"].addnhosts | grep -q "$addnhostsFile"; then
+                                               uci add_list dhcp.@dnsmasq["$dnsInstance"].addnhosts="$addnhostsFile"
+                                       fi
+                                       param=dnsmasq_kill
+                                       output_text='Reloading DNSMASQ'
+                                       ;;
+                               dnsmasq.conf)
+                                       uci -q del_list dhcp.@dnsmasq["$dnsInstance"].addnhosts="$addnhostsFile"
+                                       if [ "$(uci -q get dhcp.@dnsmasq["$dnsInstance"].serversfile)" = "$serversFile" ]; then
+                                               uci -q del dhcp.@dnsmasq["$dnsInstance"].serversfile
+                                       fi
+                                       param=dnsmasq_restart
+                                       output_text='Restarting DNSMASQ'
+                                       ;;
+                               dnsmasq.ipset)
+                                       uci -q del_list dhcp.@dnsmasq["$dnsInstance"].addnhosts="$addnhostsFile"
+                                       if [ "$(uci -q get dhcp.@dnsmasq["$dnsInstance"].serversfile)" = "$serversFile" ]; then
+                                               uci -q del dhcp.@dnsmasq["$dnsInstance"].serversfile
+                                       fi
+                                       param=dnsmasq_restart
+                                       output_text='Restarting DNSMASQ'
+                                       ;;
+                               dnsmasq.servers)
+                                       uci -q del_list dhcp.@dnsmasq["$dnsInstance"].addnhosts="$addnhostsFile"
+                                       if [ "$(uci -q get dhcp.@dnsmasq["$dnsInstance"].serversfile)" != "$serversFile" ]; then
+                                               uci set dhcp.@dnsmasq["$dnsInstance"].serversfile="$serversFile"
+                                       fi
+                                       param=dnsmasq_kill
+                                       output_text='Reloading DNSMASQ'
+                                       ;;
+                               unbound.adb_list)
+                                       uci -q del_list dhcp.@dnsmasq["$dnsInstance"].addnhosts="$addnhostsFile"
+                                       if [ "$(uci -q get dhcp.@dnsmasq["$dnsInstance"].serversfile)" = "$serversFile" ]; then
+                                               uci -q del dhcp.@dnsmasq["$dnsInstance"].serversfile
+                                       fi
+                                       param=unbound_restart
+                                       output_text='Restarting Unbound'
+                                       ;;
+                       esac
+                       if [ -n "$(uci changes dhcp)" ]; then
+                               uci commit dhcp
+                               if [ "$param" = 'unbound_restart' ]; then
+                                       param='dnsmasq_restart; unbound_restart;'
+                                       output_text='Restarting Unbound/DNSMASQ'
                                else
-                                       output_failn
-                                       output "$_ERROR_: $serviceName failed to restart dnsmasq!\n"
-                                       serviceStatus="${serviceStatus:-'DNSMASQ restart error'}"
-                                       return 1
+                                       param=dnsmasq_restart
+                                       output_text='Restarting DNSMASQ'
                                fi
-                       else
-                               output "$_ERROR_: $serviceName failed to create its data file!\n"
-                               serviceStatus="${serviceStatus:-'Failed to create data file'}"
+                       fi
+                       output 1 "$output_text "
+                       output 2 "$output_text "
+                       tmpfs set message "$output_text"
+                       if eval "$param"; then
+                               tmpfs set status "$statusSuccess"
+                               led_on "$led"
+                               output_okn
+                       else 
+                               output_fail
+                               tmpfs set status "$statusFail"
+                               tmpfs add error "Error: $output_text error."
+                               output "$_ERROR_: $serviceName $output_text error!\\n"
                                return 1
                        fi
                        ;;
                on_stop)
-                       [ -f $dnsmasqFile ] && mv $dnsmasqFile $CACHE_TMP
-                       output 3 'Restarting dnsmasq '
-                       if dnsmasq_restart; then
-                               led_off "$led"
-                               output_okn
-                               output "$serviceName stopped.\n"
-                               return 0
-                       else
-                               output_failn;
-                               output "$_ERROR_: $serviceName failed to restart dnsmasq!\n"
-                               return 1
+                       cacheOps 'create'
+                       case "$targetDNS" in
+                               dnsmasq.addnhosts | dnsmasq.servers)
+                                       param=dnsmasq_kill
+                                       ;;
+                               dnsmasq.conf | dnsmasq.ipset)
+                                       param=dnsmasq_restart
+                                       ;;
+                               unbound.adb_list)
+                                       param=unbound_restart
+                                       ;;
+                       esac
+                       if [ -n "$(uci changes dhcp)" ]; then 
+                               uci -q commit dhcp
+                               if [ "$param" = 'unbound_restart' ]; then
+                                       param='dnsmasq_restart; unbound_restart;'
+                               else
+                                       param=dnsmasq_restart
+                               fi
                        fi
+                       eval "$param"
+                       return $?
                        ;;
-               quiet | *)
-                       dnsmasq_restart && return 0 || return 1
+               quiet)
+                       case "$targetDNS" in
+                               dnsmasq.addnhosts | dnsmasq.conf | dnsmasq.ipset | dnsmasq.servers)
+                                       param=dnsmasq_restart
+                                       ;;
+                               unbound.adb_list)
+                                       param=unbound_restart
+                                       ;;
+                       esac
+                       eval "$param"
+                       return $?
                        ;;
        esac
 }
 
-ubus_status(){
-       case "$1" in
+tmpfs() {
+       local action="$1" instance="$2" value="$3" 
+       local status message error stats 
+       local readReload readRestart curReload curRestart ret
+       if [ -s "$jsonFile" ]; then
+               status="$(jsonfilter -i $jsonFile -l1 -e "@['data']['status']")"
+               message="$(jsonfilter -i $jsonFile -l1 -e "@['data']['message']")"
+               error="$(jsonfilter -i $jsonFile -l1 -e "@['data']['error']")"
+               stats="$(jsonfilter -i $jsonFile -l1 -e "@['data']['stats']")"
+               readReload="$(jsonfilter -i $jsonFile -l1 -e "@['data']['reload']")"
+               readRestart="$(jsonfilter -i $jsonFile -l1 -e "@['data']['restart']")"
+       fi
+       case "$action" in
+               get)
+                       case "$instance" in
+                               status)
+                                       echo "$status"; return;;
+                               message) 
+                                       echo "$message"; return;;
+                               error) 
+                                       echo "$error"; return;;
+                               stats) 
+                                       echo "$stats"; return;;
+                               triggers)
+                                       curReload="$parallelDL $debug $dlTimeout $whitelist_domains $blacklist_domains $whitelist_domains_urls $blacklist_domains_urls $blacklist_hosts_urls $targetDNS"
+                                       curRestart="$compressedCache $forceDNS $led"
+                                       if [ "$curReload" != "$readReload" ]; then
+                                               ret='download'
+                                       elif [ "$curRestart" != "$readRestart" ]; then
+                                               ret='restart'
+                                       fi
+                                       echo "$ret"
+                                       return;;
+                       esac
+                       ;;
                add)
-                       ubus_status set "$(ubus_status get)${2}"
+                       case "$instance" in
+                               status)
+                                       [ -n "$status" ] && status="$status $value" || status="$value";;
+                               message) 
+                                       [ -n "$message" ] && message="${message} ${value}" || message="$value";;
+                               error) 
+                                       [ -n "$error" ] && error="$error $value" || error="$value";;
+                               stats) 
+                                       [ -n "$stats" ] && stats="$stats $value" || stats="$value";;
+                       esac
                        ;;
-               del | set)
-                       ubus call service set "{ \"name\": \"${packageName}\", \"instances\": { \"status\": { \"command\": [ \"\" ],  \"data\": { \"status\": \"${2}\" }}}}"
-                       # ubus call service set "{ \"name\": \"${packageName}\", \"instances\": { \"status\": { \"data\": { \"status\": \"${2}\" }}}}"
+               del)
+                       case "$instance" in
+                               all)
+                                       unset status;
+                                       unset message;
+                                       unset error;
+                                       unset stats;
+                                       ;;
+                               status)
+                                       unset status;;
+                               message) 
+                                       unset message;;
+                               error) 
+                                       unset error;;
+                               stats) 
+                                       unset stats;;
+                               triggers) 
+                                       unset readReload; unset readRestart;;
+                       esac
                        ;;
-               get)
-                       echo "$(ubus call service list "{\"name\": \"${packageName}\"}" | jsonfilter -l1 -e "@['${packageName}']['instances']['status']['data']['status']")"
+               set)
+                       case "$instance" in
+                               status)
+                                       status="$value";;
+                               message) 
+                                       message="$value";;
+                               error) 
+                                       error="$value";;
+                               stats) 
+                                       stats="$value";;
+                               triggers) 
+                                       readReload="$parallelDL $debug $dlTimeout $whitelist_domains $blacklist_domains $whitelist_domains_urls $blacklist_domains_urls $blacklist_hosts_urls $targetDNS"
+                                       readRestart="$compressedCache $forceDNS $led"
+                                       ;;
+                       esac
                        ;;
        esac
+  json_init
+  json_add_object 'data'
+  json_add_string version "$PKG_VERSION"
+  json_add_string status "$status"
+  json_add_string message "$message"
+  json_add_string error "$error"
+  json_add_string stats "$stats"
+  json_add_string reload "$readReload"
+  json_add_string restart "$readRestart"
+  json_close_object
+  json_dump > "$jsonFile"
+       sync
 }
 
-is_chaos_calmer() { ubus -S call system board | grep -q 'Chaos Calmer'; }
-
-remove_fw3_redirect() {
-       config_get name "$1" 'name'
-       if [[ -n "$name" && "$name" != "${name//simple_adblock}" ]]; then
-               uci -q del "firewall.$1"
-       fi
+cacheOps() {
+       local R_TMP
+       case "$1" in
+               create|backup)
+                       [ -f "$outputFile" ] && mv "$outputFile" "$outputCache" >/dev/null 2>/dev/null
+                       return $?
+                       ;;
+               restore|use)
+                       [ -f "$outputCache" ] && mv "$outputCache" "$outputFile" >/dev/null 2>/dev/null
+                       return $?
+                       ;;
+               test)
+                       [ -s "$outputCache" ]
+                       return $?
+                       ;;
+               testGzip)
+                       [ -s "$outputGzip" ] && gzip -t -c "$outputGzip"
+                       return $?
+                       ;;
+               createGzip)
+                       R_TMP="$(mktemp -u -q -t ${packageName}_tmp.XXXXXXXX)"
+                       if gzip < "$outputFile" > "$R_TMP"; then
+                               if mv "$R_TMP" "$outputGzip"; then
+                                       rm -f "$R_TMP"
+                                       return 0
+                               else
+                                       rm -f "$R_TMP"
+                                       return 1
+                               fi
+                       else
+                               return 1
+                       fi
+                       ;;
+               expand|unpack|expandGzip|unpackGzip)
+                       [ -s "$outputGzip" ] && gzip -dc < "$outputGzip" > "$outputCache"
+                       return $?
+                       ;;
+       esac
 }
 
-fw3_setup() {
-       config_load 'firewall'
-       config_foreach remove_fw3_redirect 'redirect'
-       if [ "$1" == "start" ]; then
-               uci -q add firewall redirect >/dev/null 2>&1
-               uci -q set firewall.@redirect[-1].name='simple_adblock_dns_hijack'
-               uci -q set firewall.@redirect[-1].target='DNAT'
-               uci -q set firewall.@redirect[-1].src='lan'
-               uci -q set firewall.@redirect[-1].proto='tcpudp'
-               uci -q set firewall.@redirect[-1].src_dport='53'
-               uci -q set firewall.@redirect[-1].dest_port='53'
-               uci -q set firewall.@redirect[-1].dest_ip="$ip"
-               uci -q set firewall.@redirect[-1].reflection='0'
-       fi
-
+fw3Ops() {
+       local action="$1" param="$2" _restart
+       case "$action" in
+               reload) /etc/init.d/firewall reload >/dev/null 2>&1;;
+               restart) /etc/init.d/firewall restart >/dev/null 2>&1;;
+               remove)
+                       case "$param" in
+                               dns_redirect) uci -q del firewall.simple_adblock_dns_redirect;;
+                               ipset)        uci -q del firewall.simple_adblock_ipset
+                                             uci -q del firewall.simple_adblock_ipset_rule;;
+                               *)
+                                       uci -q del firewall.simple_adblock_dns_redirect
+                                       uci -q del firewall.simple_adblock_ipset
+                                       uci -q del firewall.simple_adblock_ipset_rule
+                                       ;;
+                       esac
+                       ;;
+               insert)
+                       case "$param" in
+                               dns_redirect)
+                                       if ! uci -q get firewall.simple_adblock_dns_redirect >/dev/null; then
+                                               uci -q set firewall.simple_adblock_dns_redirect=redirect
+                                               uci -q set firewall.simple_adblock_dns_redirect.name=simple_adblock_dns_hijack
+                                               uci -q set firewall.simple_adblock_dns_redirect.target=DNAT
+                                               uci -q set firewall.simple_adblock_dns_redirect.src=lan
+                                               uci -q set firewall.simple_adblock_dns_redirect.proto=tcpudp
+                                               uci -q set firewall.simple_adblock_dns_redirect.src_dport=53
+                                               uci -q set firewall.simple_adblock_dns_redirect.dest_port=53
+                                       fi
+                                       ;;
+                               ipset)
+                                       if ! uci -q get firewall.simple_adblock_ipset >/dev/null; then
+                                               uci -q set firewall.simple_adblock_ipset=ipset
+                                               uci -q set firewall.simple_adblock_ipset.name=adb
+                                               uci -q set firewall.simple_adblock_ipset.match=dest_net
+                                               uci -q set firewall.simple_adblock_ipset.storage=hash
+                                               uci -q set firewall.simple_adblock_ipset.enabled=1
+                                               _restart=1
+                                       fi
+                                       if ! uci -q get firewall.simple_adblock_ipset_rule >/dev/null; then
+                                               uci -q set firewall.simple_adblock_ipset_rule=rule
+                                               uci -q set firewall.simple_adblock_ipset_rule.name=simple_adblock_ipset_rule
+                                               uci -q set firewall.simple_adblock_ipset_rule.ipset=adb
+                                               uci -q set firewall.simple_adblock_ipset_rule.src=lan
+                                               uci -q set firewall.simple_adblock_ipset_rule.dest='*'
+                                               uci -q set firewall.simple_adblock_ipset_rule.proto=tcpudp
+                                               uci -q set firewall.simple_adblock_ipset_rule.target=REJECT
+                                               uci -q set firewall.simple_adblock_ipset_rule.enabled=1
+                                       fi
+                                       ;;
+                               *)
+                                       if ! uci -q get firewall.simple_adblock_dns_redirect >/dev/null; then
+                                               uci -q set firewall.simple_adblock_dns_redirect=redirect
+                                               uci -q set firewall.simple_adblock_dns_redirect.name=simple_adblock_dns_hijack
+                                               uci -q set firewall.simple_adblock_dns_redirect.target=DNAT
+                                               uci -q set firewall.simple_adblock_dns_redirect.src=lan
+                                               uci -q set firewall.simple_adblock_dns_redirect.proto=tcpudp
+                                               uci -q set firewall.simple_adblock_dns_redirect.src_dport=53
+                                               uci -q set firewall.simple_adblock_dns_redirect.dest_port=53
+                                       fi
+                                       if ! uci -q get firewall.simple_adblock_ipset >/dev/null; then
+                                               uci -q set firewall.simple_adblock_ipset=ipset
+                                               uci -q set firewall.simple_adblock_ipset.name=adb
+                                               uci -q set firewall.simple_adblock_ipset.match=dest_net
+                                               uci -q set firewall.simple_adblock_ipset.storage=hash
+                                               uci -q set firewall.simple_adblock_ipset.enabled=1
+                                               _restart=1
+                                       fi
+                                       if ! uci -q get firewall.simple_adblock_ipset_rule >/dev/null; then
+                                               uci -q set firewall.simple_adblock_ipset_rule=rule
+                                               uci -q set firewall.simple_adblock_ipset_rule.name=simple_adblock_ipset_rule
+                                               uci -q set firewall.simple_adblock_ipset_rule.ipset=adb
+                                               uci -q set firewall.simple_adblock_ipset_rule.src=lan
+                                               uci -q set firewall.simple_adblock_ipset_rule.dest='*'
+                                               uci -q set firewall.simple_adblock_ipset_rule.proto=tcpudp
+                                               uci -q set firewall.simple_adblock_ipset_rule.target=REJECT
+                                               uci -q set firewall.simple_adblock_ipset_rule.enabled=1
+                                       fi
+                                       ;;
+               esac
+       esac
        if [ -n "$(uci changes firewall)" ]; then
                uci -q commit firewall
-               /etc/init.d/firewall restart >/dev/null 2>&1
+               if [ -z "$_restart" ]; then
+                       fw3Ops 'reload'
+               else
+                       fw3Ops 'restart'
+               fi
        fi
 }
 
 process_url() {
        local label type D_TMP R_TMP
-       [[ -n "$1" && -n "$2" && -n "$3" ]] || return 1
-#      ping -W5 -c1 "$(echo $1 | awk -F '/' '{print $3}')" 1>/dev/null 2>/dev/null || { output_fail; return 1; }
-       if [ "$2" == "hosts" ]; then
-               label="Hosts: $(echo $1 | cut -d'/' -f3)" filter="$h_filter"
+       if [ -z "$1" ] || [ -z "$2" ] || [ -z "$3" ]; then return 1; fi
+       label="${1##*//}"; label="${label%%/*}";
+       if [ "$2" = 'hosts' ]; then
+               label="Hosts:   $label"; filter="$hostsFilter";
        else
-               label="Domains: $(echo $1 | cut -d'/' -f3)" filter="$d_filter"
+               label="Domains: $label"; filter="$domainsFilter";
        fi
-       if [ "$3" == "blocked" ]; then
+       if [ "$3" = 'blocked' ]; then
                type='Blocked'; D_TMP="$B_TMP";
        else
                type='Allowed'; D_TMP="$A_TMP";
        fi
-       while [[ -z "$R_TMP" || -e "$R_TMP" ]]; do
-               R_TMP="/var/${packageName}_tmp_$(head -c40 /dev/urandom 2>/dev/null | tr -dc 'A-Za-z0-9' 2>/dev/null)"
+       while [ -z "$R_TMP" ] || [ -e "$R_TMP" ]; do
+               R_TMP="$(mktemp -u -q -t ${packageName}_tmp.XXXXXXXX)"
        done
-       touch "$R_TMP"
-       if ! $dl_command "$1" > "$R_TMP" 2>/dev/null; then
-               output 2 "[DL] $type $label $__FAIL__\n"
+       if ! $dl_command "$1" $dl_flag "$R_TMP" 2>/dev/null || [ ! -s "$R_TMP" ]; then
                output 1 "$_FAIL_"
-               ubus_status add '-'
-               return 1
+               output 2 "[DL] $type $label $__FAIL__\\n"
+               echo "Error: downloading '${1}'." >> "$sharedMemoryError"
+       else
+               sed -i "$filter" "$R_TMP"
+               if [ ! -s "$R_TMP" ]; then
+                       output 1 "$_FAIL_"
+                       output 2 "[DL] $type $label $__FAIL__\\n"
+                       echo "Error: parsing '${1}'." >> "$sharedMemoryError"
+               else
+                       cat "${R_TMP}" >> "$D_TMP"
+                       output 1 "$_OK_"
+                       output 2 "[DL] $type $label $__OK__\\n"
+               fi
        fi
-       sed -i "$filter" "$R_TMP"
-       cat "$R_TMP" >> "$D_TMP"
-       rm -f "$R_TMP" >/dev/null 2>/dev/null
-       output 2 "[DL] $type $label $__OK__\n"
-       output 1 "$_OK_"
-       ubus_status add '+'
+       rm -f "$R_TMP"
        return 0
 }
 
 download_lists() {
-       local i hf w_filter whitelist_domains blacklist_domains whitelist_domains_urls blacklist_domains_urls blacklist_hosts_urls j=0
-       config_get whitelist_domains          'config' 'whitelist_domain'
-       config_get blacklist_domains          'config' 'blacklist_domain'
-       config_get whitelist_domains_urls     'config' 'whitelist_domains_url'
-       config_get blacklist_domains_urls     'config' 'blacklist_domains_url'
-       config_get blacklist_hosts_urls       'config' 'blacklist_hosts_url'
+       local hf w_filter j=0 R_TMP
 
-       ubus_status set 'Reloading '
-       [ ! -d ${dnsmasqFile%/*} ] && mkdir -p ${dnsmasqFile%/*}
-       for i in $A_TMP $B_TMP $CACHE_TMP $dnsmasqFile; do [ -f $i ] && rm -f $i; done
+       tmpfs set message "${statusDownloading}..."
+       rm -f "$A_TMP" "$B_TMP" "$outputFile" "$outputCache" "$outputGzip"
        if [ "$(awk '/^MemFree/ {print int($2/1000)}' "/proc/meminfo")" -lt 32 ]; then
-               output 3 'Low free memory, restarting dnsmasq...'
-               reload_dnsmasq 'quiet' && output_okn || output_failn
+               output 3 'Low free memory, restarting resolver... '
+               if reload_resolver 'quiet'; then
+                       output_okn
+               else 
+                       output_fail
+               fi
        fi
        touch $A_TMP; touch $B_TMP;
        output 1 'Downloading lists '
+       rm -f "$sharedMemoryError"
        if [ -n "$blacklist_hosts_urls" ]; then
                for hf in ${blacklist_hosts_urls}; do
-                       process_url "$hf" 'hosts' 'blocked' &
+                       if [ "$parallelDL" -gt 0 ]; then
+                               process_url "$hf" 'hosts' 'blocked' &
+                       else
+                               process_url "$hf" 'hosts' 'blocked'
+                       fi
                done
        fi
        if [ -n "$blacklist_domains_urls" ]; then
                for hf in ${blacklist_domains_urls}; do
-                       process_url "$hf" 'domains' 'blocked' &
+                       if [ "$parallelDL" -gt 0 ]; then
+                               process_url "$hf" 'domains' 'blocked' &
+                       else
+                               process_url "$hf" 'domains' 'blocked'
+                       fi
                done
        fi
        if [ -n "$whitelist_domains_urls" ]; then
                for hf in ${whitelist_domains_urls}; do
-                       process_url "$hf" 'domains' 'allowed' &
+                       if [ "$parallelDL" -gt 0 ]; then
+                               process_url "$hf" 'domains' 'allowed' &
+                       else
+                               process_url "$hf" 'domains' 'allowed'
+                       fi
                done
        fi
        wait
-       i="$(ubus_status get)"
-       [ "${i//-}" != "$i" ] && serviceStatus="${serviceStatus:-'Download error'}" || unset serviceStatus
-       i="${i//Reloading }"
-       i="${i//-/$xmark}"
-       i="${i//+/$checkmark}"
-       [ "$verbosity" == "1" ] && logmsg="${logmsg}${i}"
+       [ -s "$sharedMemoryError" ] && tmpfs add error "$(cat "$sharedMemoryError")"
+       rm -f "$sharedMemoryError"
        output 1 '\n'
 
-       [ -n "$blacklist_domains" ] && for hf in ${blacklist_domains}; do echo "$hf" | sed "$d_filter" >> $B_TMP; done
-       whitelist_domains="${whitelist_domains}"$'\n'"$(cat $A_TMP)"
-       [ -n "$whitelist_domains" ] && for hf in ${whitelist_domains}; do hf=$(echo $hf | sed 's/\./\\./g'); w_filter="$w_filter/^${hf}$/d;/\\.${hf}$/d;"; done
-       if [ -s $B_TMP ]; then
-                       output 1 'Processing downloads '
-                       output 2 'Sorting combined list '
-                       if sort $B_TMP | uniq > $A_TMP; then
-                               output_ok
-                       else
-                               output_fail
-                               serviceStatus="${serviceStatus:-'Sorting error'}"
-                       fi
-                       output 2 'Optimizing combined list '
-                       if awk -F "." '{for(f=NF;f>1;f--)printf "%s.",$f;print $1}' "$A_TMP" > "$B_TMP"; then
-                               if sort "$B_TMP" > "$A_TMP"; then
-                                       if awk '{if(NR==1){tld=$NF};while(getline){if($NF!~tld"\\."){print tld;tld=$NF}}print tld}' "$A_TMP" > "$B_TMP"; then
-                                               if awk -F "." '{for(f=NF;f>1;f--)printf "%s.",$f;print $1}' "$B_TMP" > "$A_TMP"; then
-                                                       if sort "$A_TMP" | uniq > "$B_TMP"; then
-                                                               output_ok
-                                                       else
-                                                               output_fail
-                                                               serviceStatus="${serviceStatus:-'Data file optimization error'}"
-                                                               mv $A_TMP $B_TMP
-                                                       fi
+       [ -n "$blacklist_domains" ] && for hf in ${blacklist_domains}; do echo "$hf" | sed "$domainsFilter" >> $B_TMP; done
+       whitelist_domains="${whitelist_domains}
+$(cat $A_TMP)"
+       [ -n "$whitelist_domains" ] && for hf in ${whitelist_domains}; do hf="$(echo "$hf" | sed 's/\./\\./g')"; w_filter="$w_filter/^${hf}$/d;/\\.${hf}$/d;"; done
+
+       [ ! -s "$B_TMP" ] && return 1
+
+       output 1 'Processing downloads '
+       output 2 'Sorting combined list '
+       tmpfs set message "$statusProcessing: sorting combined list"
+       if [ "$allowIDN" -gt 0 ]; then
+               if sort -u "$B_TMP" > "$A_TMP"; then
+                       output_ok
+               else
+                       output_failn
+                       tmpfs add error 'Error: Sorting error.'
+               fi
+       else
+               if sort -u "$B_TMP" | grep -E -v '[^a-zA-Z0-9=/.-]' > "$A_TMP"; then
+                       output_ok
+               else
+                       output_failn
+                       tmpfs add error 'Error: Sorting error.'
+               fi
+       fi
+
+       if [ "$targetDNS" = 'dnsmasq.conf' ] || \
+          [ "$targetDNS" = 'dnsmasq.ipset' ] || \
+          [ "$targetDNS" = 'dnsmasq.servers' ] || \
+                [ "$targetDNS" = 'unbound.adb_list' ]; then
+               # TLD optimization written by Dirk Brenken (dev@brenken.org)
+               output 2 'Optimizing combined list '
+               tmpfs set message "$statusProcessing: optimizing combined list"
+#      sed -E 'G;:t;s/(.*)(\.)(.*)(\n)(.*)/\1\4\5\2\3/;tt;s/(.*)\n(\.)(.*)/\3\2\1/' is actually slower than awk
+               if awk -F "." '{for(f=NF;f>1;f--)printf "%s.",$f;print $1}' "$A_TMP" > "$B_TMP"; then
+                       if sort "$B_TMP" > "$A_TMP"; then
+                               if awk '{if(NR=1){tld=$NF};while(getline){if($NF!~tld"\\."){print tld;tld=$NF}}print tld}' "$A_TMP" > "$B_TMP"; then
+                                       if awk -F "." '{for(f=NF;f>1;f--)printf "%s.",$f;print $1}' "$B_TMP" > "$A_TMP"; then
+                                               if sort -u "$A_TMP" > "$B_TMP"; then
+                                                       output_ok
                                                else
-                                                       output_fail
-                                                       serviceStatus="${serviceStatus:-'Data file optimization error'}"
+                                                       output_failn
+                                                       tmpfs add error 'Error: Data file optimization.'
+                                                       mv "$A_TMP" "$B_TMP"
                                                fi
                                        else
-                                               output_fail
-                                               serviceStatus="${serviceStatus:-'Data file optimization error'}"
-                                               mv $A_TMP $B_TMP
+                                               output_failn
+                                               tmpfs add error 'Error: Data file optimization.'
                                        fi
                                else
-                                       output_fail
-                                       serviceStatus="${serviceStatus:-'Data file optimization error'}"
+                                       output_failn
+                                       tmpfs add error 'Error: Data file optimization.'
+                                       mv "$A_TMP" "$B_TMP"
                                fi
                        else
-                               output_fail
-                               serviceStatus="${serviceStatus:-'Data file optimization error'}"
-                               mv $A_TMP $B_TMP
+                               output_failn
+                               tmpfs add error 'Error: Data file optimization.'
                        fi
-                       output 2 'Whitelisting domains '
-                       if sed -i "$w_filter" $B_TMP; then
-                               output_ok
-                       else
-                               output_fail
-                               serviceStatus="${serviceStatus:-'Whitelist processing error'}"
-                       fi
-                       output 2 'Formatting merged file '
-                       if sed "$f_filter" $B_TMP > $A_TMP; then
-                               output_ok
-                       else
-                               output_fail
-                               serviceStatus="${serviceStatus:-'Data file formatting error'}"
-                       fi
-                       output 2 'Creating dnsmasq config '
-                       if mv $A_TMP $dnsmasqFile; then
-                               output_ok
-                       else
-                               output_fail
-                               serviceStatus="${serviceStatus:-'Error moving data file'}"
-                       fi
-                       output 2 'Removing temporary files '
-                       rm -f /var/simple-adblock_tmp_* >/dev/null 2>&1;
-                       for i in $A_TMP $B_TMP $CACHE_TMP; do if [ -s $i ]; then rm -f $i || j=1; fi; done
-                       if [ $j -eq 0 ]; then
-                               output_ok
-                       else
-                               output_fail
-                               serviceStatus="${serviceStatus:-'Error removing temporary files'}"
-                       fi
-                       output 1 '\n'
+               else
+                       output_failn
+                       tmpfs add error 'Error: Data file optimization.'
+                       mv "$A_TMP" "$B_TMP"
+               fi
+       else
+               mv "$A_TMP" "$B_TMP"
+       fi
+
+       output 2 'Whitelisting domains '
+       tmpfs set message "$statusProcessing: whitelisting domains"
+       if sed -i "$w_filter" "$B_TMP"; then
+               output_ok
+       else
+               output_failn
+               tmpfs add error 'Error: Whitelist processing.'
+       fi
+
+       output 2 'Formatting merged file '
+       tmpfs set message "$statusProcessing: formatting merged file"
+       if [ -z "$outputFilterIPv6" ]; then
+               if sed "$outputFilter" "$B_TMP" > "$A_TMP"; then
+                       output_ok
+               else
+                       output_failn
+                       tmpfs add error 'Error: Data file formatting.'
+               fi
+       else
+               case "$targetDNS" in
+                       dnsmasq.addnhosts)
+                               if sed "$outputFilter" "$B_TMP" > "$A_TMP" && \
+                                       sed "$outputFilterIPv6" "$B_TMP" >> "$A_TMP"; then
+                                       output_ok
+                               else
+                                       output_failn
+                                       tmpfs add error 'Error: Data file formatting.'
+                               fi
+                               ;;
+               esac
+       fi
+
+       case "$targetDNS" in
+               dnsmasq.addnhosts)
+                       output 2 'Creating DNSMASQ addnhosts file '
+                       tmpfs set message "$statusProcessing: creating DNSMASQ addnhosts file"
+                       ;;
+               dnsmasq.conf)
+                       output 2 'Creating DNSMASQ config file '
+                       tmpfs set message "$statusProcessing: creating DNSMASQ config file"
+                       ;;
+               dnsmasq.ipset)
+                       output 2 'Creating DNSMASQ ipset file '
+                       tmpfs set message "$statusProcessing: creating DNSMASQ ipset file"
+                       ;;
+               dnsmasq.servers)
+                       output 2 'Creating DNSMASQ servers file '
+                       tmpfs set message "$statusProcessing: creating DNSMASQ servers file"
+                       ;;
+               unbound.adb_list)
+                       output 2 'Creating Unbound adb_list file '
+                       tmpfs set message "$statusProcessing: creating Unbound adb_list file"
+                       ;;
+       esac
+       if mv "$A_TMP" "$outputFile"; then
+               output_ok
+       else
+               output_failn
+               tmpfs add error "Error: moving data file '${A_TMP}' to '${outputFile}'."
+       fi
+       if [ "$compressedCache" -gt 0 ]; then
+               output 2 'Creating compressed cache '
+               tmpfs set message "$statusProcessing: creating compressed cache"
+               if cacheOps 'createGzip'; then
+                       output_ok
+               else
+                       output_failn
+                       tmpfs add error 'Error: creating compressed cache.'
+               fi
+       else
+               rm -f "$outputGzip"
+       fi
+       output 2 'Removing temporary files '
+       tmpfs set message "$statusProcessing: removing temporary files"
+       rm -f "/tmp/${packageName}_tmp.*" "$A_TMP" "$B_TMP" "$outputCache" || j=1
+       if [ $j -eq 0 ]; then
+               output_ok
+       else
+               output_failn
+               tmpfs add error 'Error: removing temporary files.'
+       fi
+       output 1 '\n'
+}
+
+boot() { 
+       load_package_config
+       if create_lock; then
+               sleep "$bootDelay"
+               remove_lock
+               rc_procd start_service && rc_procd service_triggers
        fi
 }
 
 start_service() {
-       local ip status
+       is_enabled 'on_start' || return 1
+       local action status error message stats
        if create_lock; then
-               is_enabled 'on_start' || return 1
-               procd_open_instance
-               procd_set_param command /bin/true
-               procd_set_param stdout 1
-               procd_set_param stderr 1
-               network_get_ipaddr ip 'lan'
-               if [[ $forceDNS -ne 0 && -n "$ip" ]]; then
-                       if is_chaos_calmer; then
-                               fw3_setup 'start'
+               if is_chaos_calmer || ! is_ipset_procd; then
+                       if [ "$forceDNS" -ne 0 ]; then
+                               fw3Ops 'insert' 'dns_redirect'
+                       else
+                               fw3Ops 'remove' 'dns_redirect'
+                       fi
+                       if [ "$targetDNS" = 'dnsmasq.ipset' ]; then
+                               fw3Ops 'insert' 'ipset'
                        else
-                               procd_open_data
-                               json_add_array firewall
-                               json_add_object ""
+                               fw3Ops 'remove' 'ipset'
+                       fi
+                       procd_open_instance 'main'
+                       procd_set_param command /bin/true
+                       procd_set_param stdout 1
+                       procd_set_param stderr 1
+                       procd_close_instance
+               else
+                       procd_open_instance 'main'
+                       procd_set_param command /bin/true
+                       procd_set_param stdout 1
+                       procd_set_param stderr 1
+                       procd_open_data
+                       json_add_array firewall
+                       if [ "$forceDNS" -ne 0 ]; then
+                               json_add_object ''
                                json_add_string type redirect
-                               json_add_string target 'DNAT'
-                               json_add_string src 'lan'
-                               json_add_string proto 'tcpudp'
-                               json_add_string src_dport '53'
-                               json_add_string dest_port '53'
-                               json_add_string dest_ip "$ip"
-                               json_add_string name 'simple_adblock_dns_hijack'
-                               json_add_string reflection '0'
+                               json_add_string name simple_adblock_dns_redirect
+                               json_add_string target DNAT
+                               json_add_string src lan
+                               json_add_string proto tcpudp
+                               json_add_string src_dport 53
+                               json_add_string dest_port 53
+                               json_add_string reflection 0
                                json_close_object
-                               json_close_array
-                               procd_close_data
                        fi
+                       if [ "$targetDNS" = 'dnsmasq.ipset' ]; then
+                               json_add_object ''
+                               json_add_string type ipset
+                               json_add_string name adb
+                               json_add_string match dest_net
+                               json_add_string storage hash
+                               json_add_string enabled 1
+                               json_close_object
+                               json_add_object ''
+                               json_add_string type rule
+                               json_add_string name simple_adblock_ipset_rule
+                               json_add_string ipset adb
+                               json_add_string src lan
+                               json_add_string dest '*'
+                               json_add_string proto tcpudp
+                               json_add_string target REJECT
+                               json_add_string enabled 1
+                               json_close_object
+                       fi
+                       json_close_array
+                       procd_close_data
+                       procd_close_instance
                fi
-               procd_close_instance
-               status="$(ubus_status get)"
-               if [ -s "$CACHE_TMP" ] && [ "$1" != "reload" ]; then
-                       output "Starting $serviceName...\n"
-                       output 3 'Found existing data file, reusing it '
-                       mv $CACHE_TMP $dnsmasqFile && output_okn || output_failn
-                       reload_dnsmasq 'on_start' || serviceStatus="${serviceStatus:-'DNSMASQ restart error'}"
-               elif [ "$1" == "reload" ] || [ "$status" == "${status//Success}" ]; then
-                       output "Reloading $serviceName...\n"
-                       download_lists
-                       reload_dnsmasq 'on_start' || serviceStatus="${serviceStatus:-'DNSMASQ restart error'}"
-               elif [ ! -s "$dnsmasqFile" ]; then
-                       output "Starting $serviceName...\n"
-                       download_lists
-                       reload_dnsmasq 'on_start' || serviceStatus="${serviceStatus:-'DNSMASQ restart error'}"
-               fi
-               if [ -s "$dnsmasqFile" ]; then
-                       if [ -z "$serviceStatus" ]; then
-                               output "$serviceName is blocking $(wc -l < $dnsmasqFile) domains "; output_okn;
-                               serviceStatus="Success: $(wc -l < $dnsmasqFile) domains blocked"
-                       else
-                               output "$serviceName is blocking $(wc -l < $dnsmasqFile) domains with error: $serviceStatus "; output_failn;
-                               serviceStatus="$(wc -l < $dnsmasqFile) domains blocked with error: $serviceStatus"
+
+               status="$(tmpfs get status)"
+               error="$(tmpfs get error)"
+               message="$(tmpfs get message)"
+               stats="$(tmpfs get stats)"
+               action="$(tmpfs get triggers)"
+
+               case "$1" in
+                       download) action='download';;
+                       restart|*)
+                               if [ -s "$outputFile" ] && [ -n "$status" ] && [ -z "$error" ]; then
+                                       status
+                                       exit 0
+                               elif [ ! -s "$outputFile" ] && ! cacheOps 'test' && ! cacheOps 'testGzip'; then
+                                       action='download'
+                               elif cacheOps 'test' || cacheOps 'testGzip'; then
+                                       action='start'
+                               fi
+                               if [ -n "$error" ]; then 
+                                       action='download'
+                               fi
+                               action="${action:-$1}"
+                       ;;
+               esac
+
+               tmpfs del all
+               tmpfs set triggers
+
+               case $action in
+                       download)
+                               if [ -s "$outputFile" ] || cacheOps 'test' || cacheOps 'testGzip'; then
+                                       output 0 "Force-reloading $serviceName... "
+                                       output 3 "Force-reloading $serviceName...\\n"
+                                       tmpfs set status "$statusForceReloading"
+                               else
+                                       output 0 "Starting $serviceName... "
+                                       output 3 "Starting $serviceName...\\n"
+                                       tmpfs set status "$statusStarting"
+                               fi
+                               download_lists
+                               reload_resolver 'on_start'
+                       ;;
+                       restart|start)
+                               if [ "$action" = 'restart' ]; then
+                                       output 0 "Restarting $serviceName... "
+                                       output 3 "Restarting $serviceName...\\n"
+                                       tmpfs set status "$statusRestarting"
+                               else
+                                       output 0 "Starting $serviceName... "
+                                       output 3 "Starting $serviceName...\\n"
+                                       tmpfs set status "$statusStarting"
+                               fi
+                               if cacheOps 'testGzip' && ! cacheOps 'test' && [ ! -s "$outputFile" ]; then
+                                       output 3 'Found compressed cache file, unpacking it '
+                                       tmpfs set message 'found compressed cache file, unpacking it.'
+                                       if cacheOps 'unpackGzip'; then
+                                               output_okn
+                                       else
+                                               output_fail
+                                               output "$_ERROR_: $serviceName failed to unpack compressed cache!\\n"
+                                               tmpfs add error 'Error: Failed to unpack compressed cache.'
+                                               return 1
+                                       fi
+                               fi
+                               if cacheOps 'test' && [ ! -s "$outputFile" ]; then
+                                       output 3 'Found cache file, reusing it '
+                                       tmpfs set message 'found cache file, reusing it.'
+                                       if cacheOps 'restore'; then 
+                                               output_okn
+                                       else 
+                                               output_fail
+                                               tmpfs add error "Error: moving '$outputCache' to '$outputFile'."
+                                       fi
+                               fi
+                               reload_resolver 'on_start'
+                       ;;
+               esac
+
+               if [ -s "$outputFile" ] && [ "$(tmpfs get status)" != "$statusFail" ]; then
+                       output 0 "$__OK__\\n";
+                       c="$(wc -l < "$outputFile")"
+                       output 3 "$serviceName is blocking $c domains (with ${targetDNS}) "; output_okn
+                       tmpfs del message
+                       tmpfs set status "$statusSuccess: $c domains blocked (with ${targetDNS})."
+                       error="$(tmpfs get error)"
+                       if [ -n "$error" ]; then
+                               output "$(str_replace "$error" "Error:" "$_ERROR_:")\\n"
                        fi
+               else
+                       output 0 "$__FAIL__\\n";
+                       tmpfs set status "$statusFail"
+                       tmpfs add error 'Error: Failed to create blocklist.'
                fi
-               [ -n "$serviceStatus" ] && ubus_status set "$serviceStatus"
                remove_lock
        else
-               output "$serviceName: another instance is starting up "; output_failn;
-               return 1
+               output 3 "$serviceName: another instance is starting up "; output_fail
+               return 0
        fi
 }
 
-service_started() { procd_set_config_changed firewall; }
-reload_service() { start_service 'reload'; }
-killcache() { [ -s $CACHE_TMP ] && rm -f $CACHE_TMP >/dev/null 2>/dev/null; }
+service_started() { is_ipset_procd && procd_set_config_changed firewall; }
+service_stopped() { is_ipset_procd && procd_set_config_changed firewall; }
+restart_service() { rc_procd start_service 'restart'; }
+reload_service() { restart_service; }
+restart() { restart_service; }
+reload() { restart_service; }
+dl() { rc_procd start_service 'download'; }
+
+killcache() {
+       rm -f "$addnhostsCache" "$addnhostsGzip"
+       rm -f "$dnsmasqCache" "$dnsmasqGzip"
+       rm -f "$ipsetCache" "$ipsetGzip"
+       rm -f "$serversCache" "$serversGzip"
+       rm -f "$unboundCache" "$unboundGzip"
+       return 0
+}
+
+status() {
+       local status="$(tmpfs get status)" error="$(tmpfs get error)" message="$(tmpfs get message)"
+       if [ -n "$status" ] && [ -n "$message" ]; then 
+               status="${status}: $message"
+       fi
+       [ -n "$status" ] && output "$serviceName $status\\n"
+       [ -n "$error" ] && output "$error\\n"
+}
 
 stop_service() {
        load_package_config
-       if [ $serviceEnabled -gt 0 ]; then
-               output "Stopping $serviceName...\n"
-               reload_dnsmasq 'on_stop'
-       else
-               reload_dnsmasq 'quiet'
+       fw3Ops 'remove' 'all'
+       if [ -s "$outputFile" ]; then
+               output "Stopping $serviceName... "
+               tmpfs del triggers
+               if reload_resolver 'on_stop'; then
+                       led_off "$led"
+                       output 0 "$__OK__\\n"; output_okn
+                       tmpfs set status "$statusStopped"
+                       tmpfs del message
+               else 
+                       output 0 "$__FAIL__\\n"; output_fail
+                       tmpfs set status "$statusFail"
+                       tmpfs add error "Error: error stopping $serviceName."
+                       output "$_ERROR_:  error stopping $serviceName!\\n"
+               fi
        fi
-       ubus_status set 'Stopped'
-       procd_set_config_changed firewall
 }
 
 check() {
        load_package_config
-       local string="$1"
-       if [ ! -f $dnsmasqFile ]; then
-               echo "No local blacklist ($dnsmasqFile) found."
+       local string="$1" 
+       local c="$(grep -c "$string" "$outputFile")"
+       if [ ! -f "$outputFile" ]; then
+               echo "No blacklist ('$outputFile') found."
        elif [ -z "$string" ]; then
-               echo "Usage: /etc/init.d/${packageName} check 'domain'"
-       elif grep -m1 -q $string $dnsmasqFile; then
-               echo "Found $(grep $string $dnsmasqFile | wc -l) matches for $string in $dnsmasqFile:"
-               grep $string $dnsmasqFile | sed 's|local=/||;s|/$||;'
+               echo "Usage: /etc/init.d/${packageName} check string"
+       elif [ "$c" -gt 0 ]; then
+               if [ "$c" -gt 1 ]; then
+                       echo "Found $c matches for '$string' in '$outputFile':"
+               else
+                       echo "Found 1 match for '$string' in '$outputFile':"
+               fi
+               case "$targetDNS" in
+                       dnsmasq.addnhosts)
+                               grep "$string" "$outputFile" | sed 's|^127.0.0.1 ||;s|^:: ||;';;
+                       dnsmasq.conf)
+                               grep "$string" "$outputFile" | sed 's|local=/||;s|/$||;';;
+                       dnsmasq.ipset)
+                               grep "$string" "$outputFile" | sed 's|ipset=/||;s|/adb$||;';;
+                       dnsmasq.servers)
+                               grep "$string" "$outputFile" | sed 's|server=/||;s|/$||;';;
+                       unbound.adb_list)
+                               grep "$string" "$outputFile" | sed 's|^local-zone: "||;s|" static$||;';;
+               esac
        else
-               echo "The $string is not found in current blacklist."
+               echo "The $string is not found in current blacklist ('$outputFile')."
        fi
 }
+
+sizes() {
+       local i
+       load_package_config
+       echo "# $(date)"
+
+       for i in $blacklist_domains_urls; do
+               [ "${i//melmac}" != "$i" ] && continue
+               if $dl_command "$i" $dl_flag /tmp/sast 2>/dev/null && [ -s /tmp/sast ]; then
+                       echo "# File size: $(du -sh /tmp/sast | awk '{print $1}')"
+                       if compare_versions "$(du -sk /tmp/sast)" "500"; then
+                               echo "# blocklist too big for most routers"
+                       elif compare_versions "$(du -sk /tmp/sast)" "100"; then
+                               echo "# blocklist may be too big for some routers"
+                       fi
+                       rm -rf /tmp/sast
+                       echo "  list blacklist_domains_url '$i'"
+                       echo ""
+               else
+                       echo "# site was down on last check"
+                       echo "#  list blacklist_domains_url '$i'"
+                       echo ""
+               fi
+       done
+
+       for i in $blacklist_hosts_urls; do
+               if $dl_command "$i" $dl_flag /tmp/sast 2>/dev/null && [ -s /tmp/sast ]; then
+                       echo "# File size: $(du -sh /tmp/sast | awk '{print $1}')"
+                       if compare_versions "$(du -sk /tmp/sast)" "500"; then
+                               echo "# blocklist too big for most routers"
+                       elif compare_versions "$(du -sk /tmp/sast)" "100"; then
+                               echo "# blocklist may be too big for some routers"
+                       fi
+                       rm -rf /tmp/sast
+                       echo "  list blacklist_hosts_url '$i'"
+                       echo ""
+               else
+                       echo "# site was down on last check"
+                       echo "#  list blacklist_hosts_url '$i'"
+                       echo ""
+               fi
+       done
+}
index 2bc26a3d86afbb2d5740274b4af839ddde2a2ee6..369a2e34d941098167bfed84aaec6d498ad45d40 100644 (file)
@@ -8,24 +8,22 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=smartsnmpd
-PKG_VERSION:=2014-08-13
-PKG_RELEASE=$(PKG_SOURCE_VERSION)
+PKG_VERSION:=2015-02-22
+PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/credosemi/smartsnmp.git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=fb93473d895f058b2d8975d3cfa280ae2a8ae98d
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
-PKG_MIRROR_HASH:=fc7f3eef8341163e21aecf6abf2492fa90362877093baef9987af3c703baa6ea
-
+PKG_SOURCE_URL:=https://github.com/credosemi/smartsnmp
+PKG_SOURCE_VERSION:=ca1d455fd06748caa629fe7ad16a47cec8877b93
+PKG_MIRROR_HASH:=fda89ec37944b4f800eb3c0147678745b57f08c87f10d246d3c9d165a43418b4
 
 PKG_MAINTAINER:=Xiongfei Guo <xfguo@credosemi.com>
-PKG_LICENSE:=GPL-2.0
+PKG_LICENSE:=GPL-2.0-or-later
 PKG_LICENSE_FILES:=LICENSE
 
+PKG_BUILD_DEPENDS:=scons/host
 
 include $(INCLUDE_DIR)/package.mk
-include $(INCLUDE_DIR)/scons.mk
+include ../../devel/scons/scons.mk
 
 define Package/smartsnmpd
   SECTION:=net
@@ -38,10 +36,16 @@ endef
 define Package/smartsnmpd/description
 smartsnmpd is an implementation of SNMP Agent. Its goal is "Easily
 writing boring SNMP MIB with Lua". This package add native support
-for OpenWrt. Include using ubus and uci to get system info/status. 
+for OpenWrt. Include using ubus and uci to get system info/status.
 And, it use libubox/uloop as low level event-driven library.
 endef
 
+ifeq ($(CONFIG_BIG_ENDIAN),y)
+       TARGET_CFLAGS += -DBIG_ENDIAN
+else
+       TARGET_CFLAGS += -DLITTLE_ENDIAN
+endif
+
 SCONS_OPTIONS += --transport=uloop
 
 define Build/Configure
@@ -64,7 +68,7 @@ define Package/smartsnmpd/install
 
        $(INSTALL_DIR) $(1)/usr/lib/lua/smartsnmp/mibs
        $(INSTALL_BIN) ./files/mibs/*.lua $(1)/usr/lib/lua/smartsnmp/mibs/
-       
+
        $(INSTALL_DIR) $(1)/etc/config
        $(INSTALL_DATA) ./files/smartsnmpd.conf $(1)/etc/config/smartsnmpd
 
index dbe3af8586dd9fb866b8fa6c2ca5ebeb4365c7cd..8cad81418b489c4c20c11cdaf7e6e326e750d556 100755 (executable)
@@ -24,24 +24,26 @@ start_service() {
        procd_set_param file $CONFIGFILE
        procd_set_param respawn
        procd_close_instance
-       
+
        # before we can call xappend
-       mkdir -p $(dirname $CONFIGFILE)
+       mkdir -p "$(dirname $CONFIGFILE)"
 
        echo "-- auto-generated config file from /etc/config/smartsnmpd" > $CONFIGFILE
-       
-       config_get PORT smartsnmpd port 161
-       echo "port = $PORT" >> $CONFIGFILE
-       
-       config_get RO_COMMUNITY smartsnmpd ro_community 'public'
-       config_get RW_COMMUNITY smartsnmpd rw_community 'private'
-       echo "ro_community = '$RO_COMMUNITY'" >> $CONFIGFILE
-       echo "rw_community = '$RW_COMMUNITY'" >> $CONFIGFILE
-
-       config_get MIB_MODULE_PATH smartsnmpd mib_module_path '/usr/lib/lua/smartsnmp/mibs/'
-       echo "mib_module_path = '$MIB_MODULE_PATH'" >> $CONFIGFILE
-
-       echo "mib_modules = {" >> $CONFIGFILE
-       config_foreach smartsnmpd_mib_module smartsnmpd_module 
-       echo "}" >> $CONFIGFILE
+
+       {
+               config_get PORT smartsnmpd port 161
+               echo "port = $PORT"
+
+               config_get RO_COMMUNITY smartsnmpd ro_community 'public'
+               config_get RW_COMMUNITY smartsnmpd rw_community 'private'
+               echo "ro_community = '$RO_COMMUNITY'"
+               echo "rw_community = '$RW_COMMUNITY'"
+
+               config_get MIB_MODULE_PATH smartsnmpd mib_module_path '/usr/lib/lua/smartsnmp/mibs/'
+               echo "mib_module_path = '$MIB_MODULE_PATH'"
+
+               echo "mib_modules = {"
+               config_foreach smartsnmpd_mib_module smartsnmpd_module
+               echo "}"
+       } >> $CONFIGFILE
 }
diff --git a/net/smartsnmpd/patches/010-2to3.patch b/net/smartsnmpd/patches/010-2to3.patch
new file mode 100644 (file)
index 0000000..4acca31
--- /dev/null
@@ -0,0 +1,82 @@
+--- a/SConstruct
++++ b/SConstruct
+@@ -133,21 +133,21 @@ env = Environment(
+ )
+ # handle options/environment varibles.
+-if os.environ.has_key('CC'):
++if 'CC' in os.environ:
+   env.Replace(CC = os.environ['CC'])
+ # CFLAGS
+ if GetOption("cflags") != "":
+   env.Append(CFLAGS = GetOption("cflags"))
+-elif os.environ.has_key('CFLAGS'):
++elif 'CFLAGS' in os.environ:
+   env.Append(CFLAGS = os.environ['CFLAGS'])
+ # LDFLAGS
+ if GetOption("ldflags") != "":
+   env.Replace(LINKFLAGS = GetOption("ldflags"))
+-elif os.environ.has_key('LDFLAGS'):
++elif 'LDFLAGS' in os.environ:
+   env.Replace(LINKFLAGS = os.environ['LDFLAGS'])
+-elif os.environ.has_key('LINKFLAGS'):
++elif 'LINKFLAGS' in os.environ:
+   env.Replace(LINKFLAGS = os.environ['LINKFLAGS'])
+ # LIBS
+@@ -183,10 +183,10 @@ elif GetOption("transport") == 'built-in' or GetOption("transport") == '':
+   elif GetOption("evloop") == 'select' or GetOption("evloop") == '':
+     pass
+   else:
+-    print "Error: Not the right event driving type"
++    print("Error: Not the right event driving type")
+     Exit(1)
+ else:
+-  print "Error: Transport not found!"
++  print("Error: Transport not found!")
+   Exit(1)
+ # autoconf
+@@ -205,18 +205,18 @@ else:
+ if GetOption("transport") == 'built-in' or GetOption("transport") == '':
+   if GetOption("evloop") == 'epoll':
+     if not conf.CheckEpoll():
+-      print "Error: epoll failed"
++      print("Error: epoll failed")
+       Exit(1)
+   elif GetOption("evloop") == 'kqueue':
+     if not conf.CheckKqueue():
+-      print "Error: Kqueue failed"
++      print("Error: Kqueue failed")
+       Exit(1)
+   elif GetOption("evloop") == 'select' or GetOption("evloop") == '':
+     if not conf.CheckSelect():
+-      print "Error: select failed"
++      print("Error: select failed")
+       Exit(1)
+   else:
+-    print "Error: Not the right event driving type"
++    print("Error: Not the right event driving type")
+     Exit(1)
+ # CFLAGS
+@@ -232,7 +232,7 @@ if conf.CheckLib('lua'):
+ elif conf.CheckLib('lua5.1'):
+   env.Append(LIBS = ['lua5.1'])
+ else:
+-  print "Error: liblua or liblua5.1 not found!"
++  print("Error: liblua or liblua5.1 not found!")
+   Exit(1)
+ # find lua header files
+@@ -241,7 +241,7 @@ if conf.CheckCHeader('lua.h'):
+ elif conf.CheckCHeader('lua5.1/lua.h'):
+   env.Append(CFLAGS = ['-I/usr/include/lua5.1'])
+ else:
+-  print "Error: lua.h not found"
++  print("Error: lua.h not found")
+   Exit(1)
+ env = conf.Finish()
diff --git a/net/smartsnmpd/patches/020-flags.patch b/net/smartsnmpd/patches/020-flags.patch
new file mode 100644 (file)
index 0000000..05d0971
--- /dev/null
@@ -0,0 +1,44 @@
+--- a/SConstruct
++++ b/SConstruct
+@@ -134,21 +134,21 @@ env = Environment(
+ # handle options/environment varibles.
+ if 'CC' in os.environ:
+-  env.Replace(CC = os.environ['CC'])
++  env.Replace(CC = Split(os.environ['CC']))
+ # CFLAGS
+ if GetOption("cflags") != "":
+   env.Append(CFLAGS = GetOption("cflags"))
+ elif 'CFLAGS' in os.environ:
+-  env.Append(CFLAGS = os.environ['CFLAGS'])
++  env.Append(CFLAGS = Split(os.environ['CFLAGS']))
+ # LDFLAGS
+ if GetOption("ldflags") != "":
+   env.Replace(LINKFLAGS = GetOption("ldflags"))
+ elif 'LDFLAGS' in os.environ:
+-  env.Replace(LINKFLAGS = os.environ['LDFLAGS'])
++  env.Replace(LINKFLAGS = Split(os.environ['LDFLAGS']))
+ elif 'LINKFLAGS' in os.environ:
+-  env.Replace(LINKFLAGS = os.environ['LINKFLAGS'])
++  env.Replace(LINKFLAGS = Split(os.environ['LINKFLAGS']))
+ # LIBS
+ if GetOption("libs") != "":
+@@ -192,15 +192,6 @@ else:
+ # autoconf
+ conf = Configure(env, custom_tests = {'CheckEpoll' : CheckEpoll, 'CheckSelect' : CheckSelect, 'CheckKqueue' : CheckKqueue, 'CheckEndian' : CheckEndian})
+-# Endian check
+-endian = conf.CheckEndian()
+-if endian == 'Big':
+-  env.Append(CFLAGS = ["-DBIG_ENDIAN"])
+-elif endian == 'Little':
+-  env.Append(CFLAGS = ["-DLITTLE_ENDIAN"])
+-else:
+-  raise SConfError("Error when testing the endian.")
+-
+ # built-in event loop check
+ if GetOption("transport") == 'built-in' or GetOption("transport") == '':
+   if GetOption("evloop") == 'epoll':
index 2f65527e15785d4c8ed4bab269455a3c74acc56c..073ce7891406a37a4d3b6530695862c9a8094bcd 100644 (file)
@@ -13,6 +13,7 @@ PKG_RELEASE:=8
 
 PKG_LICENSE:=GPL-2.0
 PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
+PKG_CPE_ID:=cpe:/a:snort:snort
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://www.snort.org/downloads/snort/ \
index 73c6ce825fa2458c4aaa1fcc3167e6ceee3a7cb0..370b8127f1ba42e06507b7317ad71cb244b10aba 100644 (file)
@@ -8,18 +8,19 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=snort3
 PKG_VERSION:=3.0.0-beta
 PKG_VERSION_SHORT:=3.0.0
-PKG_RELEASE:=3
-
-PKG_LICENSE:=GPL-2.0
-PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
+PKG_RELEASE:=4
 
 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
+
+PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
+PKG_LICENSE:=GPL-2.0-only
+PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:snort:snort
+
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/cmake.mk
index 4fac5f8ae94ee99facfc91d2e40c480041e1f518..33a4bf1cddb07696b96f03a9b8507aafb115e85e 100644 (file)
@@ -7,18 +7,19 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=socat
 PKG_VERSION:=1.7.3.3
-PKG_RELEASE:=1
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://www.dest-unreach.org/socat/download
 PKG_HASH:=0dd63ffe498168a4aac41d307594c5076ff307aa0ac04b141f8f1cec6594d04a
 
 PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
-
-PKG_LICENSE:=GPL-2.0 OpenSSL
+PKG_LICENSE:=GPL-2.0-or-later OpenSSL
 PKG_LICENSE_FILES:=COPYING COPYING.OpenSSL
+PKG_CPE_ID:=cpe:/a:dest-unreach:socat
 
 PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
diff --git a/net/socat/patches/100-musl-compat.patch b/net/socat/patches/100-musl-compat.patch
deleted file mode 100644 (file)
index ae5c8d0..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
---- a/sysincludes.h
-+++ b/sysincludes.h
-@@ -79,6 +79,9 @@
- #endif
- #if HAVE_NETDB_H && (_WITH_IP4 || _WITH_IP6)
- #include <netdb.h>    /* struct hostent, gethostbyname() */
-+#if !(__UCLIBC__ || __GLIBC__)
-+#define NETDB_INTERNAL -1
-+#endif
- #endif
- #if HAVE_SYS_UN_H && WITH_UNIX
- #include <sys/un.h>   /* struct sockaddr_un, unix domain sockets */
-@@ -139,8 +142,10 @@
- #include <netpacket/packet.h>
- #endif
- #if HAVE_NETINET_IF_ETHER_H
-+#if defined(__UCLIBC__) || defined(__GLIBC__)
- #include <netinet/if_ether.h>
- #endif
-+#endif
- #if HAVE_LINUX_IF_TUN_H
- #include <linux/if_tun.h>
- #endif
diff --git a/net/socat/patches/100-usleep.patch b/net/socat/patches/100-usleep.patch
new file mode 100644 (file)
index 0000000..305eaf2
--- /dev/null
@@ -0,0 +1,18 @@
+--- a/sycls.c
++++ b/sycls.c
+@@ -1329,6 +1329,7 @@ unsigned int Sleep(unsigned int seconds) {
+    return retval;
+ }
++#if 0
+ /* obsolete by POSIX.1-2001 */
+ void Usleep(unsigned long usec) {
+    Debug1("usleep(%lu)", usec);
+@@ -1336,6 +1337,7 @@ void Usleep(unsigned long usec) {
+    Debug("usleep() ->");
+    return;
+ }
++#endif
+ #if HAVE_NANOSLEEP
+ unsigned int Nanosleep(const struct timespec *req, struct timespec *rem) {
index 1ca8366fba260837f94bf40e4c52383542dff1a8..b5f9c4378fac0f340037f49d5c380e9a2c70c37e 100644 (file)
@@ -9,14 +9,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=softethervpn
-PKG_VERSION:=4.28-9669
-PKG_VERREL:=beta
-PKG_VERDATE:=2018.09.11
-PKG_RELEASE:=3
+PKG_VERSION:=4.29-9680
+PKG_VERREL:=rtm
+PKG_VERDATE:=2019.02.28
+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/
-PKG_HASH:=1e641fa227a732b3eec3fe8bdcf4d4fd2b1d0b0a5084119126c1216d2ec1b545
+PKG_HASH:=e6035fa7d9aaf59bdb342cd7ab5ecfdff89811a875f62a3230208cdc8a4e26e4
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)/v$(PKG_VERSION)
 HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)/v$(PKG_VERSION)
@@ -25,7 +25,7 @@ PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=COPYING
 
 PKG_BUILD_DEPENDS:=softethervpn/host
-HOST_BUILD_DEPENDS:=readline/host
+HOST_BUILD_DEPENDS:=readline/host libiconv/host
 
 HAMCORE_SE2:=$(STAGING_DIR_HOST)/share/softethervpn/hamcore.se2
 
@@ -63,9 +63,6 @@ TARGET_CFLAGS += \
        $(if $(CONFIG_OPENSSL_WITH_SSL3),,-DSSL_OP_NO_SSLv3) \
        $(if $(filter mips mipsel,$(ARCH)),-minterlink-mips16)
 
-TARGET_LDFLAGS += \
-       -liconv
-
 # Select 32 or 64 bit Makefile for target build depending on 64bit config symbol
 MAKE_FLAGS += \
        -f src/makefiles/linux_$(if $(CONFIG_ARCH_64BIT),64,32)bit.mak
diff --git a/net/softethervpn/patches/001-Encrypt_set_default_RSA.patch b/net/softethervpn/patches/001-Encrypt_set_default_RSA.patch
deleted file mode 100644 (file)
index da1bcbd..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-From 1fad008e1adba5cb596da6f9ec6a244d49a585cf Mon Sep 17 00:00:00 2001
-From: Davide Beatrici <davidebeatrici@gmail.com>
-Date: Mon, 9 Apr 2018 22:02:34 +0200
-Subject: [PATCH] Encrypt: set default RSA key size to 1024 everywhere, using
- the RSA_KEY_SIZE macro
-
-This commit also fixes the problem described in #31, which was caused by the test key generated in RsaCheck() being too small for newer OpenSSL versions.
----
- src/Mayaqua/Encrypt.c | 8 ++++----
- src/Mayaqua/Encrypt.h | 2 +-
- 2 files changed, 5 insertions(+), 5 deletions(-)
-
---- a/src/Mayaqua/Encrypt.c
-+++ b/src/Mayaqua/Encrypt.c
-@@ -2458,7 +2458,7 @@ bool RsaVerifyEx(void *data, UINT data_s
-       }\r
-       if (bits == 0)\r
-       {\r
--              bits = 1024;\r
-+              bits = RSA_KEY_SIZE;\r
-       }\r
\r
-       // Hash the data\r
-@@ -2497,7 +2497,7 @@ bool RsaSignEx(void *dst, void *src, UIN
-       }\r
-       if (bits == 0)\r
-       {\r
--              bits = 1024;\r
-+              bits = RSA_KEY_SIZE;\r
-       }\r
\r
-       Zero(dst, bits / 8);\r
-@@ -2684,7 +2684,7 @@ bool RsaCheck()
-       BIO *bio;\r
-       char errbuf[MAX_SIZE];\r
-       UINT size = 0;\r
--      UINT bit = 32;\r
-+      UINT bit = RSA_KEY_SIZE;\r
-       // Validate arguments\r
\r
-       // Key generation\r
-@@ -2754,7 +2754,7 @@ bool RsaGen(K **priv, K **pub, UINT bit)
-       }\r
-       if (bit == 0)\r
-       {\r
--              bit = 1024;\r
-+              bit = RSA_KEY_SIZE;\r
-       }\r
\r
-       // Key generation\r
---- a/src/Mayaqua/Encrypt.h
-+++ b/src/Mayaqua/Encrypt.h
-@@ -128,7 +128,7 @@ void RAND_Free_For_SoftEther();
- #define       DES_IV_SIZE                                     8                       // DES IV size\r
- #define DES_BLOCK_SIZE                                8                       // DES block size\r
- #define DES3_KEY_SIZE                         (8 * 3)         // 3DES key size\r
--#define RSA_KEY_SIZE                          128                     // RSA key size\r
-+#define RSA_KEY_SIZE                          1024            // RSA key size\r
- #define DH_KEY_SIZE                                   128                     // DH key size\r
- #define       RSA_MIN_SIGN_HASH_SIZE          (15 + SHA1_HASH_SIZE)   // Minimum RSA hash size\r
- #define       RSA_SIGN_HASH_SIZE                      (RSA_MIN_SIGN_HASH_SIZE)        // RSA hash size\r
index f403dfb128792f7779655918831abeb550d92b1c..b1e338cfc0e9f6fe395c04e1860814a6cc0f616a 100644 (file)
@@ -1,6 +1,6 @@
 --- a/src/Mayaqua/Internat.c
 +++ b/src/Mayaqua/Internat.c
-@@ -123,7 +123,7 @@
+@@ -114,7 +114,7 @@
  #include <Mayaqua/Mayaqua.h>\r
  \r
  extern LOCK *token_lock;\r
@@ -9,7 +9,7 @@
  static LOCK *iconv_lock = NULL;\r
  void *iconv_cache_wide_to_str = 0;\r
  void *iconv_cache_str_to_wide = 0;\r
-@@ -938,7 +938,7 @@ void InitInternational()
+@@ -929,7 +929,7 @@ void InitInternational()
  #ifdef        UNIX_MACOS\r
                StrCpy(charset, sizeof(charset), "utf-8");\r
  #else // UNIX_MACOS\r
@@ -18,7 +18,7 @@
  #endif        // UNIX_MACOS\r
                d = IconvWideToStrInternal();\r
                if (d == (void *)-1)\r
-@@ -1198,7 +1198,7 @@ void GetCurrentCharSet(char *name, UINT
+@@ -1189,7 +1189,7 @@ void GetCurrentCharSet(char *name, UINT
                }\r
                else\r
                {\r
diff --git a/net/softethervpn/patches/105-nossl3.patch b/net/softethervpn/patches/105-nossl3.patch
deleted file mode 100644 (file)
index e602580..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: v4.25-9656/src/Mayaqua/Network.c
-===================================================================
---- v4.25-9656.orig/src/Mayaqua/Network.c
-+++ v4.25-9656/src/Mayaqua/Network.c
-@@ -13025,7 +13025,7 @@ bool StartSSLEx(SOCK *sock, X *x, K *pri
-               {\r
-                       if (client_tls == false)\r
-                       {\r
--#if OPENSSL_VERSION_NUMBER < 0x10100000L\r
-+#ifndef SSL_OP_NO_SSLv3\r
-                               SSL_CTX_set_ssl_version(ssl_ctx, SSLv3_method());\r
- #else\r
-                               SSL_CTX_set_ssl_version(ssl_ctx, SSLv23_method());\r
index 5fc3e61e3bca1f47af6afeb090da7b5a2cbed991..ed21e1488145a3d5ba3a9116eb8383356abb728a 100644 (file)
@@ -1,6 +1,6 @@
 --- 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
+@@ -66,9 +66,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
  
index 6c06e64748bf83a089e86fe22d1a1410d6f65710..3a154ce40e35aa5bb7bdf25a579c16b7934f06fa 100644 (file)
@@ -2,7 +2,7 @@ diff --git a/src/Mayaqua/Encrypt.c b/src/Mayaqua/Encrypt.c
 index f3b3908..06b7fea 100644
 --- a/src/Mayaqua/Encrypt.c
 +++ b/src/Mayaqua/Encrypt.c
-@@ -129,6 +129,7 @@
+@@ -120,6 +120,7 @@
  #include <openssl/rand.h>\r
  #include <openssl/engine.h>\r
  #include <openssl/bio.h>\r
@@ -10,7 +10,7 @@ index f3b3908..06b7fea 100644
  #include <openssl/x509.h>\r
  #include <openssl/pkcs7.h>\r
  #include <openssl/pkcs12.h>\r
-@@ -137,6 +138,7 @@
+@@ -128,6 +129,7 @@
  #include <openssl/md4.h>\r
  #include <openssl/hmac.h>\r
  #include <openssl/sha.h>\r
@@ -18,7 +18,7 @@ index f3b3908..06b7fea 100644
  #include <openssl/des.h>\r
  #include <openssl/aes.h>\r
  #include <openssl/dh.h>\r
-@@ -634,7 +636,7 @@ UINT CipherProcess(CIPHER *c, void *iv, void *dest, void *src, UINT size)
+@@ -625,7 +627,7 @@ UINT CipherProcess(CIPHER *c, void *iv, void *dest, void *src, UINT size)
                return 0;\r
        }\r
  \r
@@ -27,7 +27,7 @@ index f3b3908..06b7fea 100644
        {\r
                return 0;\r
        }\r
-@@ -933,6 +935,7 @@ BUF *BigNumToBuf(const BIGNUM *bn)
+@@ -924,6 +926,7 @@ BUF *BigNumToBuf(const BIGNUM *bn)
  // Initialization of the lock of OpenSSL\r
  void OpenSSL_InitLock()\r
  {\r
@@ -35,7 +35,7 @@ index f3b3908..06b7fea 100644
        UINT i;\r
  \r
        // Initialization of the lock object\r
-@@ -946,11 +949,13 @@ void OpenSSL_InitLock()
+@@ -937,11 +940,13 @@ void OpenSSL_InitLock()
        // Setting the lock function\r
        CRYPTO_set_locking_callback(OpenSSL_Lock);\r
        CRYPTO_set_id_callback(OpenSSL_Id);\r
@@ -49,7 +49,7 @@ index f3b3908..06b7fea 100644
        UINT i;\r
  \r
        for (i = 0;i < ssl_lock_num;i++)\r
-@@ -962,11 +967,13 @@ void OpenSSL_FreeLock()
+@@ -953,11 +958,13 @@ void OpenSSL_FreeLock()
  \r
        CRYPTO_set_locking_callback(NULL);\r
        CRYPTO_set_id_callback(NULL);\r
@@ -63,7 +63,7 @@ index f3b3908..06b7fea 100644
        LOCK *lock = ssl_lock_obj[n];\r
  \r
        if (mode & CRYPTO_LOCK)\r
-@@ -979,12 +986,15 @@ void OpenSSL_Lock(int mode, int n, const char *file, int line)
+@@ -970,12 +977,15 @@ void OpenSSL_Lock(int mode, int n, const char *file, int line)
                // Unlock\r
                Unlock(lock);\r
        }\r
@@ -79,7 +79,7 @@ index f3b3908..06b7fea 100644
  }\r
  \r
  // Get the display name of the certificate\r
-@@ -1908,8 +1918,8 @@ X509 *NewX509(K *pub, K *priv, X *ca, NAME *name, UINT days, X_SERIAL *serial)
+@@ -1899,8 +1909,8 @@ X509 *NewX509(K *pub, K *priv, X *ca, NAME *name, UINT days, X_SERIAL *serial)
        X509_set_version(x509, 2L);\r
  \r
        // Set the Expiration\r
@@ -90,7 +90,7 @@ index f3b3908..06b7fea 100644
        if (!UINT64ToAsn1Time(t1, notBefore))\r
        {\r
                FreeX509(x509);\r
-@@ -2050,8 +2060,8 @@ X509 *NewRootX509(K *pub, K *priv, NAME *name, UINT days, X_SERIAL *serial)
+@@ -2041,8 +2051,8 @@ X509 *NewRootX509(K *pub, K *priv, NAME *name, UINT days, X_SERIAL *serial)
        X509_set_version(x509, 2L);\r
  \r
        // Set the Expiration\r
@@ -101,7 +101,7 @@ index f3b3908..06b7fea 100644
        if (!UINT64ToAsn1Time(t1, notBefore))\r
        {\r
                FreeX509(x509);\r
-@@ -2677,6 +2687,43 @@ bool RsaCheckEx()
+@@ -2697,6 +2707,43 @@ bool RsaCheckEx()
  \r
        return false;\r
  }\r
@@ -145,7 +145,7 @@ index f3b3908..06b7fea 100644
  bool RsaCheck()\r
  {\r
        RSA *rsa;\r
-@@ -2690,12 +2737,11 @@ bool RsaCheck()
+@@ -2710,12 +2757,11 @@ bool RsaCheck()
        // Key generation\r
        Lock(openssl_lock);\r
        {\r
@@ -159,7 +159,7 @@ index f3b3908..06b7fea 100644
                return false;\r
        }\r
  \r
-@@ -2760,12 +2806,11 @@ bool RsaGen(K **priv, K **pub, UINT bit)
+@@ -2780,12 +2826,11 @@ bool RsaGen(K **priv, K **pub, UINT bit)
        // Key generation\r
        Lock(openssl_lock);\r
        {\r
@@ -173,7 +173,7 @@ index f3b3908..06b7fea 100644
                return false;\r
        }\r
  \r
-@@ -3875,7 +3920,7 @@ X *X509ToX(X509 *x509)
+@@ -3895,7 +3940,7 @@ X *X509ToX(X509 *x509)
                                {\r
                                        if (OBJ_obj2nid(ad->method) == NID_ad_ca_issuers && ad->location->type == GEN_URI)\r
                                        {\r
@@ -182,7 +182,7 @@ index f3b3908..06b7fea 100644
  \r
                                                if (IsEmptyStr(uri) == false)\r
                                                {\r
-@@ -4088,7 +4133,9 @@ void Rand(void *buf, UINT size)
+@@ -4108,7 +4153,9 @@ void Rand(void *buf, UINT size)
  // Delete a thread-specific information that OpenSSL has holded\r
  void FreeOpenSSLThreadState()\r
  {\r
@@ -192,7 +192,7 @@ index f3b3908..06b7fea 100644
  }\r
  \r
  // Release the Crypt library\r
-@@ -4110,13 +4157,16 @@ void InitCryptLibrary()
+@@ -4130,13 +4177,16 @@ void InitCryptLibrary()
        CheckIfIntelAesNiSupportedInit();\r
  //    RAND_Init_For_SoftEther()\r
        openssl_lock = NewLock();\r
diff --git a/net/softethervpn/patches/130-iconv.patch b/net/softethervpn/patches/130-iconv.patch
new file mode 100644 (file)
index 0000000..6f8a5fa
--- /dev/null
@@ -0,0 +1,39 @@
+diff --git a/src/Mayaqua/Mayaqua.h b/src/Mayaqua/Mayaqua.h
+index 194f8e6..177129e 100644
+--- a/src/Mayaqua/Mayaqua.h
++++ b/src/Mayaqua/Mayaqua.h
+@@ -283,7 +283,7 @@ int PASCAL WinMain(HINSTANCE hInst, HINSTANCE hPrev, char *CmdLine, int CmdShow)
+ #include <ifaddrs.h>\r
+ #endif        // MAYAQUA_SUPPORTS_GETIFADDRS\r
\r
+-#ifdef        UNIX_LINUX\r
++#if 0\r
+ typedef void *iconv_t;\r
+ iconv_t iconv_open (__const char *__tocode, __const char *__fromcode);\r
+ size_t iconv (iconv_t __cd, char **__restrict __inbuf,\r
+diff --git a/src/makefiles/linux_32bit.mak b/src/makefiles/linux_32bit.mak
+index 8219d5d..8020290 100644
+--- a/src/makefiles/linux_32bit.mak
++++ b/src/makefiles/linux_32bit.mak
+@@ -68,7 +68,7 @@ OPTIONS_LINK_DEBUG=-g -fsigned-char -lm -ldl -lrt -lpthread -lssl -lcrypto -lrea
+ OPTIONS_COMPILE_RELEASE=-DNDEBUG -DVPN_SPEED -DUNIX -DUNIX_LINUX -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 -lm -ldl -lrt -lpthread -lssl -lcrypto -lreadline -lncurses -lz
++OPTIONS_LINK_RELEASE=-O2 -fsigned-char -lm -ldl -lrt -liconv -lpthread -lssl -lcrypto -lreadline -lncurses -lz
+ INSTALL_BINDIR=/usr/bin/
+ INSTALL_VPNSERVER_DIR=/usr/vpnserver/
+diff --git a/src/makefiles/linux_64bit.mak b/src/makefiles/linux_64bit.mak
+index 7f81b58..a36e0de 100644
+--- a/src/makefiles/linux_64bit.mak
++++ b/src/makefiles/linux_64bit.mak
+@@ -68,7 +68,7 @@ OPTIONS_LINK_DEBUG=-g -fsigned-char -m64 -lm -ldl -lrt -lpthread -lssl -lcrypto
+ 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 -lm -ldl -lrt -lpthread -lssl -lcrypto -lreadline -lncurses -lz
++OPTIONS_LINK_RELEASE=-O2 -fsigned-char -lm -ldl -lrt -liconv -lpthread -lssl -lcrypto -lreadline -lncurses -lz
+ INSTALL_BINDIR=/usr/bin/
+ INSTALL_VPNSERVER_DIR=/usr/vpnserver/
diff --git a/net/softethervpn/patches/140-openssl-header.patch b/net/softethervpn/patches/140-openssl-header.patch
new file mode 100644 (file)
index 0000000..c034792
--- /dev/null
@@ -0,0 +1,10 @@
+--- a/src/Mayaqua/Secure.c
++++ b/src/Mayaqua/Secure.c
+@@ -127,6 +127,7 @@
+ #include <openssl/pkcs7.h>\r
+ #include <openssl/pkcs12.h>\r
+ #include <openssl/rc4.h>\r
++#include <openssl/rsa.h>\r
+ #include <openssl/md5.h>\r
+ #include <openssl/sha.h>\r
+ #include <Mayaqua/Mayaqua.h>\r
index 929e14d298f881fdeca4d4f6db7f76b8389266dd..0c15bfe56ecaa80af6427b2ede03a8f0689164b4 100644 (file)
@@ -3,17 +3,19 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=softethervpn5
-PKG_VERSION:=5.01.9670
+PKG_VERSION:=5.01.9671
 PKG_RELEASE:=1
 
 PKG_MAINTAINER:=Andy Walsh <andy.walsh44+github@gmail.com>
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=COPYING
 
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/SoftEtherVPN/SoftEtherVPN.git
-PKG_SOURCE_VERSION:=$(PKG_VERSION)
-PKG_MIRROR_HASH:=a7de5cf5e109450297af1bf79bc5f9ae15229d24da86b134b6251f8354b3dfb8
+PKG_SOURCE_URL:=https://github.com/SoftEtherVPN/SoftEtherVPN/releases/download/$(PKG_VERSION)/
+PKG_SOURCE:=softether-vpn-src-$(PKG_VERSION).tar.gz
+PKG_HASH:=56930110ad5e21a3b7c69008bdb3efd368c0ebafc1d0d97b48a76a3563ec8e24
+
+HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/SoftEtherVPN-$(PKG_VERSION)
+PKG_BUILD_DIR:=$(BUILD_DIR)/SoftEtherVPN-$(PKG_VERSION)
 
 HOST_BUILD_DEPENDS:=ncurses/host readline/host
 PKG_BUILD_DEPENDS:=softethervpn5/host
@@ -82,6 +84,7 @@ export USE_MUSL=YES
 # BUG: outdated host/include/elf.h
 HOST_CFLAGS += $(FPIC) -DAT_HWCAP2=26
 TARGET_CFLAGS += $(FPIC)
+CMAKE_OPTIONS = -DICONV_LIB_PATH="$(ICONV_PREFIX)/lib"
 
 # static build for host (hamcorebuilder), avoid -fpic on ncurses/host and shared libs can't be found on host
 define Host/Prepare
diff --git a/net/softethervpn5/patches/001-musl-poll-fix.patch b/net/softethervpn5/patches/001-musl-poll-fix.patch
new file mode 100644 (file)
index 0000000..ec9edef
--- /dev/null
@@ -0,0 +1,27 @@
+From a4ed6560017d0b9edcd7cab93ca05d80f794ec10 Mon Sep 17 00:00:00 2001
+From: Rosen Penev <rosenp@gmail.com>
+Date: Wed, 10 Jul 2019 17:01:01 -0700
+Subject: [PATCH] Mayaqua: Replace GNU specific sys/poll.h header with POSIX
+ poll.h
+
+Fixes warning from the musl libc:
+
+warning redirecting incorrect #include <sys/poll.h> to <poll.h>
+---
+ src/Mayaqua/Mayaqua.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/Mayaqua/Mayaqua.h b/src/Mayaqua/Mayaqua.h
+index 0f46d52a..63c2edc3 100644
+--- a/src/Mayaqua/Mayaqua.h
++++ b/src/Mayaqua/Mayaqua.h
+@@ -157,8 +157,8 @@ int PASCAL WinMain(HINSTANCE hInst, HINSTANCE hPrev, char *CmdLine, int CmdShow)
+ #ifdef        UNIX_SOLARIS\r
+ #include <sys/filio.h>\r
+ #endif        // UNIX_SOLARIS\r
+-#include <sys/poll.h>\r
+ #include <sys/resource.h>\r
++#include <poll.h>\r
+ #include <pthread.h>\r
+ #ifdef        UNIX_LINUX\r
+ #include <sys/prctl.h>\r
diff --git a/net/softethervpn5/patches/002-iconv-defines-fix.patch b/net/softethervpn5/patches/002-iconv-defines-fix.patch
new file mode 100644 (file)
index 0000000..66173f9
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/src/Mayaqua/Mayaqua.h    2019-07-11
++++ b/src/Mayaqua/Mayaqua.h    2019-07-11
+@@ -178,7 +178,7 @@ int PASCAL WinMain(HINSTANCE hInst, HINS
+ #include <ifaddrs.h>\r
+ #endif        // MAYAQUA_SUPPORTS_GETIFADDRS\r
\r
+-#ifdef        UNIX_LINUX\r
++#if 0\r
+ typedef void *iconv_t;\r
+ iconv_t iconv_open (__const char *__tocode, __const char *__fromcode);\r
+ size_t iconv (iconv_t __cd, char **__restrict __inbuf,\r
diff --git a/net/softethervpn5/patches/003-iconv-cmake-fix.patch b/net/softethervpn5/patches/003-iconv-cmake-fix.patch
new file mode 100644 (file)
index 0000000..1f94c1a
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/src/Mayaqua/CMakeLists.txt       2019-07-10
++++ b/src/Mayaqua/CMakeLists.txt       2019-07-11
+@@ -59,7 +59,7 @@ if(UNIX)
+   find_package(ZLIB REQUIRED)
+   # In some cases libiconv is not included in libc
+-  find_library(LIB_ICONV iconv)
++  find_library(LIB_ICONV iconv HINTS "${ICONV_LIB_PATH}")
+   find_library(LIB_RT rt)
index 1726179a7aa81de8126deeb92317a8810b67c4b9..cf379ce7080f6ae7f70bd7bfa04e357c5ba6a701 100644 (file)
@@ -8,16 +8,21 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=softflowd
-PKG_VERSION:=0.9.9
-PKG_RELEASE:=2
+PKG_VERSION:=1.0.0
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/softflowd
-PKG_HASH:=2313f2c50ea9b3f2db3524e38ec7cd71f9a6e885ac2e3b55ab037bccf8173612
+PKG_SOURCE_URL:=https://codeload.github.com/irino/softflowd/tar.gz/softflowd-$(PKG_VERSION)?
+PKG_HASH:=98aa66026d730211b45fe89670cd6ce50959846d536880b82f5afbca6281e108
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-softflowd-$(PKG_VERSION)
+
 PKG_MAINTAINER:=Ross Vandegrift <ross@kallisti.us>
 PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=LICENSE
 
 PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -26,17 +31,13 @@ define Package/softflowd
   CATEGORY:=Network
   DEPENDS:=+libpcap
   TITLE:=softflowd
-  URL:=https://code.google.com/archive/p/softflowd/
+  URL:=https://github.com/irino/softflowd
 endef
 
 define Package/softflowd/description
        Software netflow exporter
 endef
 
-define Build/Compile
-       $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" softflowd softflowctl
-endef
-
 define Package/softflowd/install
        $(INSTALL_DIR) $(1)/usr/sbin
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/softflowd $(1)/usr/sbin/
index 98b4e349431568fb7a34bbe4f0843cf45fe82e00..3f1c5f8aa36fd28e1a735b7e637c721eea047b6d 100755 (executable)
@@ -26,7 +26,7 @@ start_instance() {
        local section="$1"
 
        config_get_bool enabled "$section" 'enabled' '0'
-       [ $enabled -gt 0 ] || return 1
+       [ "$enabled" -gt 0 ] || return 1
 
        config_get pid_file "$section" 'pid_file'
 
@@ -51,7 +51,8 @@ start_instance() {
 }
 
 start_service() {
-        mkdir -m 0755 -p /var/empty
+        mkdir -p /var/empty
+        chmod 0755 /var/empty
 
        config_load 'softflowd'
        config_foreach start_instance 'softflowd'
diff --git a/net/softflowd/patches/010-bzero.patch b/net/softflowd/patches/010-bzero.patch
new file mode 100644 (file)
index 0000000..8743a58
--- /dev/null
@@ -0,0 +1,134 @@
+--- a/freelist.c
++++ b/freelist.c
+@@ -46,7 +46,7 @@ freelist_init(struct freelist *fl, size_t allocsz)
+ {
+       size_t sizeof_fl = sizeof(fl);
+       FLOGIT((LOG_DEBUG, "%s: %s(%p, %zu)", __func__, __func__, fl, allocsz));
+-      bzero(fl, sizeof_fl);
++      memset(fl, 0, sizeof_fl);
+       fl->allocsz = roundup(allocsz, FREELIST_ALLOC_ALIGN);
+       fl->free_entries = NULL;
+ }
+--- a/ipfix.c
++++ b/ipfix.c
+@@ -388,7 +388,7 @@ ipfix_init_template_unity (struct FLOWTRACKPARAMETERS *param,
+                            u_int8_t icmp_flag, u_int8_t bi_flag,
+                            u_int16_t version) {
+   u_int index = 0, bi_index = 0, length = 0;
+-  bzero (template, sizeof (*template));
++  memset (template, 0, sizeof (*template));
+   template->h.c.set_id = htons (version == 10 ?
+                                 IPFIX_TEMPLATE_SET_ID :
+                                 NFLOW9_TEMPLATE_SET_ID);
+@@ -510,7 +510,7 @@ nflow9_init_option (u_int16_t ifidx, struct OPTION *option) {
+     NFLOW9_SOFTFLOWD_OPTION_TEMPLATE_NRECORDS *
+     sizeof (struct IPFIX_FIELD_SPECIFIER);
+-  bzero (&option_template, sizeof (option_template));
++  memset (&option_template, 0, sizeof (option_template));
+   option_template.h.c.set_id = htons (NFLOW9_OPTION_TEMPLATE_SET_ID);
+   option_template.h.c.length =
+     htons (sizeof (option_template.h) + scope_len + opt_len);
+@@ -524,7 +524,7 @@ nflow9_init_option (u_int16_t ifidx, struct OPTION *option) {
+   ipfix_init_fields (option_template.r, &option_index,
+                      field_nf9option,
+                      NFLOW9_SOFTFLOWD_OPTION_TEMPLATE_NRECORDS);
+-  bzero (&nf9opt_data, sizeof (nf9opt_data));
++  memset (&nf9opt_data, 0, sizeof (nf9opt_data));
+   nf9opt_data.c.set_id = htons (IPFIX_SOFTFLOWD_OPTION_TEMPLATE_ID);
+   nf9opt_data.c.length = htons (sizeof (nf9opt_data));
+   nf9opt_data.scope_ifidx = htonl (ifidx);
+@@ -536,7 +536,7 @@ nflow9_init_option (u_int16_t ifidx, struct OPTION *option) {
+ static void
+ ipfix_init_option (struct timeval *system_boot_time, struct OPTION *option) {
+   u_int scope_index = 0, option_index = 0;
+-  bzero (&option_template, sizeof (option_template));
++  memset (&option_template, 0, sizeof (option_template));
+   option_template.h.c.set_id = htons (IPFIX_OPTION_TEMPLATE_SET_ID);
+   option_template.h.c.length = htons (sizeof (option_template));
+   option_template.h.u.i.r.template_id =
+@@ -553,7 +553,7 @@ ipfix_init_option (struct timeval *system_boot_time, struct OPTION *option) {
+   ipfix_init_fields (option_template.r, &option_index, field_option,
+                      IPFIX_SOFTFLOWD_OPTION_TEMPLATE_NRECORDS);
+-  bzero (&option_data, sizeof (option_data));
++  memset (&option_data, 0, sizeof (option_data));
+   option_data.c.set_id = htons (IPFIX_SOFTFLOWD_OPTION_TEMPLATE_ID);
+   option_data.c.length = htons (sizeof (option_data));
+   option_data.scope_pid = htonl ((u_int32_t) option->meteringProcessId);
+@@ -809,7 +809,7 @@ send_ipfix_common (struct FLOW **flows, int num_flows,
+   last_valid = num_packets = 0;
+   for (j = 0; j < num_flows;) {
+-    bzero (packet, sizeof (packet));
++    memset (packet, 0, sizeof (packet));
+     if (version == 10) {
+       ipfix = (struct IPFIX_HEADER *) packet;
+       ipfix->version = htons (version);
+--- a/netflow9.c
++++ b/netflow9.c
+@@ -145,7 +145,7 @@ static int nf9_pkts_until_template = -1;
+ static void
+ nf9_init_template (void) {
+-  bzero (&v4_template, sizeof (v4_template));
++  memset (&v4_template, 0, sizeof (v4_template));
+   v4_template.h.c.flowset_id = htons (NFLOW9_TEMPLATE_SET_ID);
+   v4_template.h.c.length = htons (sizeof (v4_template));
+   v4_template.h.template_id = htons (NF9_SOFTFLOWD_V4_TEMPLATE_ID);
+@@ -182,7 +182,7 @@ nf9_init_template (void) {
+   v4_template.r[14].length = htons (2);
+   v4_template.r[15].type = htons (NF9_SRC_VLAN);
+   v4_template.r[15].length = htons (2);
+-  bzero (&v6_template, sizeof (v6_template));
++  memset (&v6_template, 0, sizeof (v6_template));
+   v6_template.h.c.flowset_id = htons (NFLOW9_TEMPLATE_SET_ID);
+   v6_template.h.c.length = htons (sizeof (v6_template));
+   v6_template.h.template_id = htons (NF9_SOFTFLOWD_V6_TEMPLATE_ID);
+@@ -223,7 +223,7 @@ nf9_init_template (void) {
+ static void
+ nf9_init_option (u_int16_t ifidx, struct OPTION *option) {
+-  bzero (&option_template, sizeof (option_template));
++  memset (&option_template, 0, sizeof (option_template));
+   option_template.h.c.flowset_id = htons (NFLOW9_OPTION_TEMPLATE_SET_ID);
+   option_template.h.c.length = htons (sizeof (option_template));
+   option_template.h.template_id = htons (NF9_SOFTFLOWD_OPTION_TEMPLATE_ID);
+@@ -238,7 +238,7 @@ nf9_init_option (u_int16_t ifidx, struct OPTION *option) {
+   option_template.r[1].length =
+     htons (sizeof (option_data.sampling_algorithm));
+-  bzero (&option_data, sizeof (option_data));
++  memset (&option_data, 0, sizeof (option_data));
+   option_data.c.flowset_id = htons (NF9_SOFTFLOWD_OPTION_TEMPLATE_ID);
+   option_data.c.length = htons (sizeof (option_data));
+   option_data.scope_ifidx = htonl (ifidx);
+@@ -257,7 +257,7 @@ nf_flow_to_flowset (const struct FLOW *flow, u_char * packet, u_int len,
+   struct NF9_SOFTFLOWD_DATA_COMMON *dc[2];
+   u_int freclen, ret_len, nflows;
+-  bzero (d, sizeof (d));
++  memset (d, 0, sizeof (d));
+   *len_used = nflows = ret_len = 0;
+   switch (flow->af) {
+   case AF_INET:
+@@ -363,7 +363,7 @@ send_netflow_v9 (struct SENDPARAMETER sp) {
+   last_valid = num_packets = 0;
+   for (j = 0; j < num_flows;) {
+-    bzero (packet, sizeof (packet));
++    memset (packet, 0, sizeof (packet));
+     nf9 = (struct NFLOW9_HEADER *) packet;
+     nf9->version = htons (9);
+--- a/psamp.c
++++ b/psamp.c
+@@ -51,7 +51,7 @@ static int psamp_pkts_until_template = -1;
+ static void
+ psamp_init_template (struct PSAMP_SOFTFLOWD_TEMPLATE *template_p) {
+   u_int index = 0;
+-  bzero (template_p, sizeof (*template_p));
++  memset (template_p, 0, sizeof (*template_p));
+   template_p->h.c.set_id = htons (IPFIX_TEMPLATE_SET_ID);
+   template_p->h.c.length = htons (sizeof (struct PSAMP_SOFTFLOWD_TEMPLATE));
+   template_p->h.r.template_id = htons (PSAMP_SOFTFLOWD_TEMPLATE_ID);
index 1630771a5988643441874ce711049b14f8139b86..29811a7f2d64033644f3d7e6c05caa172a09e1cd 100644 (file)
@@ -8,18 +8,18 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=spoofer
-PKG_VERSION:=1.4.3
+PKG_VERSION:=1.4.5
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://www.caida.org/projects/spoofer/downloads
-PKG_HASH:=994555b360a095f0e9baed2469ef26bd29610af155ce58b3984d2f1616a74526
+PKG_HASH:=5f045be7269d93efb1ee7918e923e7695c9a36d192c3ada932bb6ae7fba8d15e
 
-PKG_LICENSE:=GPL-3.0
+PKG_MAINTAINER:=Ken Keys <spoofer-info@caida.org>
+PKG_LICENSE:=GPL-3.0-or-later
 PKG_LICENSE_FILES:=LICENSE
 
 PKG_USE_MIPS16:=0
-HOST_BUILD_DEPENDS:=protobuf/host
 
 include $(INCLUDE_DIR)/host-build.mk
 include $(INCLUDE_DIR)/package.mk
@@ -31,7 +31,6 @@ define Package/spoofer
   CATEGORY:=Network
   TITLE:=Measure your ISP's resistance to spoofed IP packets
   URL:=https://spoofer.caida.org/
-  MAINTAINER:=Ken Keys <spoofer-info@caida.org>
   DEPENDS:=+protobuf-lite +libpcap +libpthread +libopenssl
 endef
 
index 95497a693554569a23dc59d0eafff210b3b5f0a4..654a61f4c2681a335730646bc8d76c6c040e046c 100644 (file)
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=sqm-scripts
-PKG_SOURCE_VERSION:=4d6ec3349026dac798b5dd84dbffa0bc8331ff04
-PKG_VERSION:=1.3.0
+PKG_SOURCE_VERSION:=ab763cba8b1516b3afa99760e0ca884f8b8d93b8
+PKG_VERSION:=1.4.0
 PKG_RELEASE:=1
 PKG_LICENSE:=GPLv2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE).tar.xz
-PKG_MIRROR_HASH:=ae61179fb60a44e5b657f4d6cdce861b91fc20c224465d2b2ddf2d12d1833edf
+PKG_MIRROR_HASH:=00bc93f667ad417d4ba9bea4a01d87e3c670a294f61de13348a0f71e7700241f
 PKG_SOURCE_URL:=https://github.com/tohojo/sqm-scripts.git
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)
index 008ad4b3b698ee773c77399a3c9d4229bf1972b3..e59f70203a7f13bd6f16a47f8bec139fca28b1ae 100644 (file)
@@ -9,10 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=squid
 PKG_VERSION:=4.6
-PKG_RELEASE:=1
-
-PKG_LICENSE:=GPL-2.0
-PKG_MAINTAINER:=Marko Ratkaj <marko.ratkaj@sartura.hr>
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=http://www3.us.squid-cache.org/Versions/v4/ \
@@ -20,6 +17,10 @@ PKG_SOURCE_URL:=http://www3.us.squid-cache.org/Versions/v4/ \
        http://www.squid-cache.org/Versions/v4/
 PKG_HASH:=015bade5d3a4905142c4c605df5c4216471e3d8338079955e0e44b0ae0303d41
 
+PKG_MAINTAINER:=Marko Ratkaj <marko.ratkaj@sartura.hr>
+PKG_LICENSE:=GPL-2.0-or-later
+PKG_CPE_ID:=cpe:/a:squid-cache:squid
+
 PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
 PKG_FIXUP:=autoreconf
@@ -117,6 +118,9 @@ CONFIGURE_VARS += \
        ac_cv_header_linux_netfilter_ipv4_h=yes \
        ac_cv_epoll_works=yes
 
+TARGET_CFLAGS += -Wno-error
+TARGET_LDFLAGS += -latomic
+
 define Build/Compile
        +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/lib all
        +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
index f2c2e00cf5154ae9417095181697d51ecf460570..4512b5621c8f137a77d6c3ee76b645d35ebcdd8a 100644 (file)
@@ -9,8 +9,8 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=sshtunnel
 PKG_VERSION:=4
-PKG_RELEASE:=2
-PKG_LICENSE:=GPL-2.0+
+PKG_RELEASE:=3
+PKG_LICENSE:=GPL-2.0-or-later
 
 PKG_MAINTAINER:=Nuno Goncalves <nunojpg@gmail.com>
 
index caf58a9014a2d071c77efd8331a76aa7e99bc6c6..0a516fa6f8a5f5356648fa0a6db874ecfd434185 100644 (file)
@@ -9,12 +9,12 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=sslh
 PKG_VERSION:=v1.19c
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://rutschle.net/tech/sslh/
 PKG_HASH:=bb11dfa88b27ae1ec825a1b8156000c3f17f7e8f042311f19b7a249193c47bf3
-PKG_LICENSE:=GPL-2.0+
+PKG_LICENSE:=GPL-2.0-or-later
 PKG_LICENSE_FILES:=COPYING
 
 include $(INCLUDE_DIR)/package.mk
index feb7df1fe38ef3a7ad0e48e1cac2bb5b7bf01469..d4d5d5fa3c989565d4ccb5fe05728b21f3fb4191 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=sstp-client
 PKG_VERSION:=1.0.12
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/sstp-client/$(PKG_VERSION)
@@ -24,7 +24,7 @@ define Package/sstp-client
   SECTION:=net
   CATEGORY:=Network
   SUBMENU:=VPN
-  DEPENDS=+libevent2 +libopenssl +ppp
+  DEPENDS=+libevent2 +libopenssl +ppp +resolveip
   TITLE:=SSTP-Client is a SSTP client for Linux.
   URL:=http://sstp-client.sourceforge.net/
   MAINTAINER:=Federico Di Marco <fededim@gmail.com>
@@ -53,9 +53,11 @@ define Package/sstp-client/install
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/.libs/sstpc $(1)/usr/bin/
        $(CP) $(PKG_BUILD_DIR)/src/libsstp-api/.libs/*.so* $(1)/usr/lib/
        $(CP) $(PKG_BUILD_DIR)/src/pppd-plugin/.libs/*.so* $(1)/usr/lib/
-
+       
        $(INSTALL_DIR) $(1)/etc
        $(CP) files/etc $(1) 
+       $(INSTALL_DIR) $(1)/lib/netifd/proto
+       $(INSTALL_BIN) ./files/lib/netifd/proto/sstp.sh $(1)/lib/netifd/proto
 endef
 
 $(eval $(call BuildPackage,sstp-client))
diff --git a/net/sstp-client/files/lib/netifd/proto/sstp.sh b/net/sstp-client/files/lib/netifd/proto/sstp.sh
new file mode 100755 (executable)
index 0000000..f8cb704
--- /dev/null
@@ -0,0 +1,130 @@
+#!/bin/sh
+
+[ -x /usr/bin/sstpc ] || exit 0
+
+[ -n "$INCLUDE_ONLY" ] || {
+       . /lib/functions.sh
+       . ../netifd-proto.sh
+       init_proto "$@"
+}
+
+proto_sstp_init_config() {
+       proto_config_add_string "server"
+       proto_config_add_string "username"
+       proto_config_add_string "password"
+       proto_config_add_string "pppd_options"
+       proto_config_add_string "sstp_options"
+       proto_config_add_int "log_level"
+       proto_config_add_int "mtu"
+       proto_config_add_boolean "ipv6"
+       proto_config_add_boolean "defaultroute"
+       proto_config_add_boolean "peerdns"
+       available=1
+       no_device=1
+}
+
+proto_sstp_setup() {
+       local config="$1"; shift
+       local iface="$2"
+       local ifname="sstp-$config"
+
+       local ip serv_addr server ipv6 defaultroute peerdns
+       json_get_var server server && {
+               for ip in $(resolveip -t 5 "$server"); do
+                       ( proto_add_host_dependency "$config" "$ip" )
+                       serv_addr=1
+               done
+       }
+       [ -n "$serv_addr" ] || {
+               echo "Could not resolve server address"
+               sleep 5
+               proto_setup_failed "$config"
+               exit 1
+       }
+
+       json_get_vars username password pppd_options sstp_options log_level ipv6 defaultroute peerdns
+       if [ "$ipv6" = 1 ]; then
+               ipv6=1
+       else
+               ipv6=""
+       fi
+       if [ "$defaultroute" = 0 ]; then
+               defaultroute=""
+       else
+               defaultroute=1
+       fi
+
+       if [ "$peerdns" = 0 ]; then
+               peerdns=""
+       else
+               peerdns=1
+       fi
+
+       [ -n "$mtu" ] || json_get_var mtu mtu
+       [ -n "$log_level" ] || log_level=0
+
+       local load
+       for module in slhc ppp_generic ppp_async ppp_mppe ip_gre gre pptp; do
+               grep -q "^$module " /proc/modules && continue
+               /sbin/insmod $module 2>&- >&-
+               load=1
+       done
+       [ "$load" = "1" ] && sleep 1
+
+       proto_init_update "$ifname" 1
+       proto_send_update "$config"
+
+       proto_run_command "$config" sstpc \
+               --cert-warn \
+               --password $password \
+               --user $username \
+               --log-level $log_level \
+               --save-server-route \
+               --ipparam $config \
+               $sstp_options \
+               $server \
+               ifname $ifname \
+               require-mschap-v2 \
+               ${ipv6:++ipv6} \
+               refuse-pap \
+               noauth \
+               ${defaultroute:+replacedefaultroute defaultroute} \
+               ${peerdns:+usepeerdns} \
+               ip-up-script /lib/netifd/ppp-up \
+               ipv6-up-script /lib/netifd/ppp-up \
+               ip-down-script /lib/netifd/ppp-down \
+               ipv6-down-script /lib/netifd/ppp-down \
+               ${mtu:+mtu $mtu mru $mtu} \
+               $pppd_options
+               
+       # WORKAROUND: Workaround to properly register the sstp interface (As seeen in: https://forum.archive.openwrt.org/viewtopic.php?id=58007)
+       # WORKAROUND: Start
+       sleep 10
+       proto_init_update "$ifname" 1
+       proto_send_update "$config"
+       # WORKAROUND: End
+       
+       # if use pppoe and sstp at same time , firewall need reload .
+       # but don't konw why
+       /etc/init.d/firewall reload 2>&- >&-
+}
+
+proto_sstp_teardown() {
+       local interface="$1"
+
+       case "$ERROR" in
+               11|19)
+                       proto_notify_error "$interface" AUTH_FAILED
+                       proto_block_restart "$interface"
+               ;;
+               2)
+                       proto_notify_error "$interface" INVALID_OPTIONS
+                       proto_block_restart "$interface"
+               ;;
+       esac
+       proto_kill_command "$interface"
+}
+
+[ -n "$INCLUDE_ONLY" ] || {
+       add_protocol sstp
+}
index 48ff454e3967f595b7da24b4093052e34fb76e0e..6daa4e4208f4ea6210e2fba61cc50e82fd51ccec 100644 (file)
@@ -8,14 +8,15 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=strongswan
-PKG_VERSION:=5.8.0
+PKG_VERSION:=5.8.1
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://download.strongswan.org/ https://download2.strongswan.org/
-PKG_HASH:=15b1e10c7dd6253ab5d791fe9b9cb84624e24c118aecd9b90251b4e60daa0933
-PKG_LICENSE:=GPL-2.0+
+PKG_HASH:=d9af70acea5c054952ad1584916c1bf231b064eb6c8a9791dcb6ae90a769990c
+PKG_LICENSE:=GPL-2.0-or-later
 PKG_MAINTAINER:=Stijn Tintel <stijn@linux-ipv6.be>
+PKG_CPE_ID:=cpe:/a:strongswan:strongswan
 
 PKG_MOD_AVAILABLE:= \
        addrblock \
index ef0c51c2ce255bd45256f0bf1cd18eb2525e8ae8..70ccc885951a1da282dd49c461bc464c0e7afaa6 100644 (file)
@@ -8,7 +8,7 @@
  ARG_DISBL_SET([curve25519],     [disable Curve25519 Diffie-Hellman plugin.])
  ARG_DISBL_SET([hmac],           [disable HMAC crypto implementation plugin.])
  ARG_ENABL_SET([md4],            [enable MD4 software implementation plugin.])
-@@ -1423,6 +1424,7 @@ ADD_PLUGIN([botan],                [s ch
+@@ -1431,6 +1432,7 @@ ADD_PLUGIN([botan],                [s ch
  ADD_PLUGIN([af-alg],               [s charon scepclient pki scripts medsrv attest nm cmd aikgen])
  ADD_PLUGIN([fips-prf],             [s charon nm cmd])
  ADD_PLUGIN([gmp],                  [s charon scepclient pki scripts manager medsrv attest nm cmd aikgen fuzz])
@@ -16,7 +16,7 @@
  ADD_PLUGIN([curve25519],           [s charon pki scripts nm cmd])
  ADD_PLUGIN([agent],                [s charon nm cmd])
  ADD_PLUGIN([keychain],             [s charon cmd])
-@@ -1563,6 +1565,7 @@ AM_CONDITIONAL(USE_SHA3, test x$sha3 = x
+@@ -1571,6 +1573,7 @@ AM_CONDITIONAL(USE_SHA3, test x$sha3 = x
  AM_CONDITIONAL(USE_MGF1, test x$mgf1 = xtrue)
  AM_CONDITIONAL(USE_FIPS_PRF, test x$fips_prf = xtrue)
  AM_CONDITIONAL(USE_GMP, test x$gmp = xtrue)
@@ -24,7 +24,7 @@
  AM_CONDITIONAL(USE_CURVE25519, test x$curve25519 = xtrue)
  AM_CONDITIONAL(USE_RDRAND, test x$rdrand = xtrue)
  AM_CONDITIONAL(USE_AESNI, test x$aesni = xtrue)
-@@ -1838,6 +1841,7 @@ AC_CONFIG_FILES([
+@@ -1846,6 +1849,7 @@ AC_CONFIG_FILES([
        src/libstrongswan/plugins/mgf1/Makefile
        src/libstrongswan/plugins/fips_prf/Makefile
        src/libstrongswan/plugins/gmp/Makefile
index bc5344cd807dc05b0417b1f76d50e784fc33171b..12fcef3974084f35f8806f887df98c5a4b6bad55 100644 (file)
@@ -86,7 +86,7 @@ to use resolvers found in `/etc/resolv.conf` by setting the dnsmasq option
 command line:
 
     uci add_list dhcp.@dnsmasq[-1].server='127.0.0.1#5453'
-    uci dhcp.@dnsmasq[-1].noresolv=1
+    uci set dhcp.@dnsmasq[-1].noresolv=1
     uci commit && reload_config
 
 The same outcome can be achieved in the LUCI web interface as follows:
index 77771dda68c9da027bd2fef6e90c30d766a95e02..c6858bfb5cb35424dcf97422ef46e81589d2ad1e 100644 (file)
@@ -8,10 +8,10 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=stunnel
-PKG_VERSION:=5.54
-PKG_RELEASE:=1
+PKG_VERSION:=5.55
+PKG_RELEASE:=2
 
-PKG_LICENSE:=GPL-2.0+
+PKG_LICENSE:=GPL-2.0-or-later
 PKG_MAINTAINER:=Florian Eckert <fe@dev.tdt.de>
 PKG_LICENSE_FILES:=COPYING COPYRIGHT.GPL
 PKG_CPE_ID:=cpe:/a:stunnel:stunnel
@@ -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:=5e8588a6c274b46b1d63e1b50f0725f4908dec736f6588eb48d1eb3d20c87902
+PKG_HASH:=90de69f41c58342549e74c82503555a6426961b29af3ed92f878192727074c62
 
 PKG_FIXUP:=autoreconf
 PKG_FIXUP:=patch-libtool
index bc46bd011c4c3e19b4d4278dbe4b8b168cf366ce..c04282657df072691bd4d1f5bac9a22a87306404 100644 (file)
@@ -124,7 +124,7 @@ validate_service_section_service_options() {
 print_options() {
        local _opt
        local _value
-       for _opt in $*; do
+       for _opt in "$@"; do
                eval "_value=\$$_opt"
                [ -z "$_value" ] || echo "$_opt = $_value" >> "$CONF_FILE"
        done
@@ -134,7 +134,7 @@ print_bool_options() {
        local _opt
        local _bool
        local _value
-       for _opt in $*; do
+       for _opt in "$@"; do
                eval "_bool=\$$_opt"
                [ -z "$_bool" ] || {
                        _value=no
@@ -148,7 +148,7 @@ print_lists_map() {
        local _opt
        local _values
        local _value
-       for _opt in $*; do
+       for _opt in "$@"; do
                eval "_values=\$$_opt"
                for _value in $_values; do
                        echo "$_opt = $_value" >> "$CONF_FILE"
@@ -163,7 +163,7 @@ print_lists_reduce() {
        local _values
        local _v
        shift
-       for _opt in $*; do
+       for _opt in "$@"; do
                _value=
                eval "_values=\$$_opt"
                for _v in $_values; do
@@ -178,7 +178,7 @@ print_host_port() {
        local _opt
        local _host
        local _port
-       for _opt in $*; do
+       for _opt in "$@"; do
                eval "_host=\${${_opt}_host}"
                eval "_port=\${${_opt}_port}"
                [ -z "$_host" ] || [ -z "$_port" ] || echo "$_opt = $_host:$_port" >> "$CONF_FILE"
@@ -190,7 +190,7 @@ print_optional_host_port() {
        local _host
        local _port
        local _value
-       for _opt in $*; do
+       for _opt in "$@"; do
                eval "_host=\${${_opt}_host}"
                eval "_port=\${${_opt}_port}"
                [ -z "$_port" ] || {
@@ -376,10 +376,10 @@ service_triggers() {
        procd_add_reload_trigger stunnel
 
        procd_open_validate
-       validate_globals_section
-       validate_globals_section_service_options
-       validate_service_section
-       validate_service_section_service_options
+       validate_globals_section "$@"
+       validate_globals_section_service_options "$@"
+       validate_service_section "$@"
+       validate_service_section_service_options "$@"
        procd_close_validate
 }
 
index 9cafc73dd14d6091fdb7ded066f910b7d1e8afdb..cbd7d71ddefefdc33f2c40378a46d7a74b9209a5 100644 (file)
@@ -6,14 +6,15 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=subversion
-PKG_RELEASE:=1
-PKG_VERSION:=1.12.0
+PKG_RELEASE:=2
+PKG_VERSION:=1.12.2
 PKG_SOURCE_URL:=@APACHE/subversion
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_HASH:=7fae7c73d8a007c107c0ae5eb372bc0bb013dbfe966fcd5c59cd5a195a5e2edf
+PKG_HASH:=3bd0b5c8e4c5175263dc9a92fd9aef94ce917e80af034f26fe5c45fde7e0f771
 PKG_LICENSE:=Apache-2.0
 PKG_LICENSE_FILES:=LICENSE
 PKG_MAINTAINER:=Val Kulkov <val.kulkov@gmail.com>
+PKG_CPE_ID:=cpe:/a:apache:subversion
 
 PKG_FIXUP:=autoreconf
 PKG_MACRO_PATHS:=build/ac-macros
@@ -35,11 +36,11 @@ define Package/subversion/Default
 endef
 
 define Package/subversion/Default/description
-       Subversion is a free/open-source version control system. That is,
-       Subversion manages files and directories, and the changes made to them,
-       over time. This allows you to recover older versions of your data, or
-       examine the history of how your data changed. In this regard, many
-       people think of a version control system as a sort of time machine.
+  Subversion is a free/open-source version control system. That is,
+  Subversion manages files and directories, and the changes made to them,
+  over time. This allows you to recover older versions of your data, or
+  examine the history of how your data changed. In this regard, many
+  people think of a version control system as a sort of time machine.
 endef
 
 define Package/subversion-libs
diff --git a/net/switchdev-poller/Makefile b/net/switchdev-poller/Makefile
new file mode 100644 (file)
index 0000000..9ac4b9f
--- /dev/null
@@ -0,0 +1,41 @@
+#
+# Copyright (C) 2018-2019 Luiz Angelo Daros de Luca
+#
+# This is free software, licensed under the GNU General Public License v2.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=switchdev-poller
+PKG_VERSION:=1.0.1
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
+PKG_LICENSE:=GPL-2.0-or-later
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/switchdev-poller
+   SECTION:=net
+   CATEGORY:=Network
+   TITLE:=Poll switchdev ports to bring CPU ports up/down
+   DEPENDS:=+swconfig
+   PKGARCH:=all
+endef
+
+define Package/switchdev-poller/description
+  This service monitors switchdev ports and brings down CPU ports when
+  all related non-CPU vlan ports are also down. Otherwise, it brings
+  the port up.
+endef
+
+define Build/Compile
+endef
+
+define Package/switchdev-poller/install
+       $(INSTALL_DIR) $(1)/etc/init.d
+       $(INSTALL_BIN) ./files/switchdev-poller.init $(1)/etc/init.d/switchdev-poller
+       $(INSTALL_DIR) $(1)/usr/lib/switchdev-poller
+       $(INSTALL_BIN) ./files/switchdev-poller $(1)/usr/lib/switchdev-poller/switchdev-poller
+endef
+
+$(eval $(call BuildPackage,switchdev-poller))
diff --git a/net/switchdev-poller/files/switchdev-poller b/net/switchdev-poller/files/switchdev-poller
new file mode 100755 (executable)
index 0000000..1e2f79e
--- /dev/null
@@ -0,0 +1,159 @@
+#!/bin/sh
+# shellcheck disable=SC2039,SC1091
+#  https://www.shellcheck.net/wiki/SC2039 -- In POSIX sh, SC2039: In POSIX sh, string replacement is undefined.
+#  https://www.shellcheck.net/wiki/SC2039 -- In POSIX sh, string indexing is undefined.
+#  https://www.shellcheck.net/wiki/SC1091 -- Not following: /lib/functions.sh:...
+# Copyright (C) 2018 Luiz Angelo Daros de Luca <luizluca@gmail.com>
+#
+# Pools switchdev for port changes
+#
+
+[ -n "$NICED" ] && NICED=1 exec nice -n 19 "$0" "$@"
+
+. /usr/share/libubox/jshn.sh
+. /lib/functions.sh
+
+cpu_ports=""
+
+json_init
+json_load "$(cat /etc/board.json)"
+
+switches=
+json_get_keys switches switch
+json_select switch
+for switch in $switches; do
+       echo Loading $switch >&2
+       json_select "$switch"
+       if json_is_a ports array; then
+               ports=
+               json_get_keys ports ports
+               json_select ports
+
+               for port in $ports; do
+                       echo Checking port "$port" in "$switch" >&2
+                       json_select "$port"
+                       num=
+                       json_get_vars num device
+                       if [ -n "$device" ]; then
+                               echo "Port ${switch}_$num is CPU port as $device" >&2
+                               cpu_ports="$cpu_ports ${switch}_$num=$device"
+                       fi
+                       json_select ..
+               done
+               json_select ..
+       fi
+       json_select ..
+done
+
+each_switch_vlan() {
+       switch=
+       vlan=
+       ports=
+       config_get switch "$1" device
+       config_get vlan "$1" vlan
+       config_get ports "$1" ports
+
+       [ -n "$vlan" ] || { echo "No vlan for '$1'" >&2; return 1; }
+       [ -n "$switch" ] || { echo "No device for '$1'" >&2; return 1; }
+
+       vlan_ifnames=""
+       vlan_non_cpu_ports=""
+       echo Checking vlan "$vlan" in $switch >&2
+       for port in $ports; do
+               case $port in
+               *t) tagged=1; port=${port:0:-1} ;;
+               *)  tagged= ;;
+               esac
+               echo "Checking port $port in $switch used by vlan $vlan" >&2
+
+               cpu_port_ifname=""
+               for cpu_port in $cpu_ports; do
+                       device=${cpu_port#*=}
+                       cpu_switchport=${cpu_port%=*}
+                       [ "${cpu_switchport}" = "${switch}_${port}" ] || continue
+                       echo "Port $port in $switch used by $vlan is a CPU port at $device" >&2
+
+                       for device_tagged in $device_tagged; do
+                               [ "${tagged}" = 1 ] && not_tagged=0 || not_tagged=1
+                               if [ "$device_tagged" = "$device=${not_tagged}" ]; then
+                                       echo "Cannot control CPU port ${cpu_switchport} when it is used both as tagged and not tagged"
+                                       exit 1
+                               fi
+                       done
+                       device_tagged="${device_tagged} ${device}=${tagged:-0}"
+                       cpu_port_ifname=${device}${tagged+.$vlan}
+               done
+
+               if [ -n "$cpu_port_ifname" ]; then
+                       vlan_ifnames="$vlan_ifnames $cpu_port_ifname"
+                       continue
+               fi
+               vlan_non_cpu_ports="$vlan_non_cpu_ports ${port}"
+       done
+       vlan_non_cpu_switch_ports="${vlan_non_cpu_ports// /:${switch}_}"
+       vlan_non_cpu_switch_ports="${vlan_non_cpu_switch_ports:1}"
+       vlan_non_cpu_ports="${vlan_non_cpu_ports:1}"
+       for vlan_ifname in $vlan_ifnames; do
+               devices2ports="$devices2ports $vlan_ifname=${vlan_non_cpu_switch_ports}"
+               echo "Monitoring $switch (ports ${vlan_non_cpu_ports// /,}) for $vlan_ifname"
+       done
+}
+
+device_tagged=""
+devices2ports=""
+config_load network
+config_foreach each_switch_vlan switch_vlan
+
+cleanup() {
+       for device2ports in $devices2ports; do
+               device=${device2ports%=*}
+               ip link show dev ${device}_down >/dev/null 2>&1 && {
+                       echo "Bringing up $device on exit..."
+                       ip link set dev ${device}_down name ${device}
+                       ip link set dev ${device} up >/dev/null 2>&1;
+               }
+       done
+       echo "Stopped poller"
+       exit
+}
+trap cleanup INT TERM
+echo "Starting poller"
+while true; do (
+for device2ports in $devices2ports; do
+               device=${device2ports%=*}
+               switch_ports=${device2ports#*=}
+               switch_ports=${switch_ports//:/ }
+               should_be_up=false
+               for switch_port in $switch_ports; do
+                       state=$(eval echo \$${switch_port})
+                       if [ -z "${state}" ]; then
+                               switch=${switch_port%_*}
+                               port=${switch_port#*_}
+                               echo "Polling $switch_port..." >&2
+                               swconfig dev $switch port $port get link | grep -q 'link:up' &&
+                                       state=up || state=down
+                               eval "$switch_port=$state"
+                               echo "State of $switch_port, used by $device, is $state" >&2
+                       else
+                               echo "State of $switch_port, used by $device, is $state (cached)" >&2
+                       fi
+                       [ $state = up ] && should_be_up=true
+               done
+
+               if $should_be_up; then
+                       ip link show dev ${device}_down >/dev/null 2>&1 && {
+                               echo "Bringing up $device..."
+                               ip link set dev ${device}_down name ${device}
+                               ip link set dev ${device} up >/dev/null 2>&1;
+                       }
+               else
+                       ip link show dev ${device} >/dev/null 2>&1 && {
+                               echo "Bringing down $device..."
+                               ip link set dev ${device} down >/dev/null 2>&1;
+                               ip link set dev ${device} name ${device}_down
+                       }
+
+               fi
+done )
+sleep 3
+done
diff --git a/net/switchdev-poller/files/switchdev-poller.init b/net/switchdev-poller/files/switchdev-poller.init
new file mode 100755 (executable)
index 0000000..a6a5dc6
--- /dev/null
@@ -0,0 +1,18 @@
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2018-2019 Luiz Angelo Daros de Luca <luizluca@gmail.com>
+
+START=99
+USE_PROCD=1
+
+start_service() {
+       procd_open_instance switchdev-poller
+       procd_set_param command /usr/lib/switchdev-poller/switchdev-poller
+       procd_set_param stdout 1
+       procd_set_param stderr 0 # enable for extra debug info
+       procd_set_param respawn 3600 5 5
+       procd_close_instance
+}
+
+service_triggers() {
+       procd_add_reload_trigger network
+}
index 2b91abba81c160525eb640edf6d2b9b60856d3a2..9db5fd5daa4e60a8a1aa31d029af05175180b222 100644 (file)
@@ -7,17 +7,18 @@
 
 include $(TOPDIR)/rules.mk
 
-PKG_LICENSE:=ASL-2.0
-PKG_MAINTAINER:=Mislav Novakovic <mislav.novakovic@sartura.hr>
-
 PKG_NAME:=sysrepo
 PKG_VERSION:=0.7.7
-PKG_RELEASE:=4
+PKG_RELEASE:=5
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/sysrepo/sysrepo/tar.gz/v$(PKG_VERSION)?
 PKG_HASH:=2bf8cb4d810d19231eba1e549f58f3a0ce068d170a5e7b212b927396098560e4
 
+PKG_MAINTAINER:=Mislav Novakovic <mislav.novakovic@sartura.hr>
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=LICENSE
+
 CMAKE_INSTALL:=1
 
 PKG_BUILD_PARALLEL:=1
@@ -38,8 +39,8 @@ PKG_BUILD_DEPENDS:=SYSREPO_BINDINGS:swig/host
 define Package/libsysrepo
   SECTION:=utils
   CATEGORY:=Utilities
-  URL:=$(PKG_SOURCE_URL)
   TITLE:=YANG-based data store library
+  URL:=https://www.sysrepo.org/
   DEPENDS:=+libyang +libprotobuf-c +libev +libredblack +librt +libpthread +SYSREPO_BINDINGS:libstdcpp +SYSREPO_PYTHON:python-base +SYSREPO_LUA:lua
   MENU:=1
 endef
@@ -47,24 +48,24 @@ endef
 define Package/sysrepo
   SECTION:=utils
   CATEGORY:=Utilities
-  URL:=$(PKG_SOURCE_URL)
   TITLE:=YANG-based data store daemon and plugin
+  URL:=https://www.sysrepo.org/
   DEPENDS:=+libsysrepo
 endef
 
 define Package/sysrepoctl
   SECTION:=utils
   CATEGORY:=Utilities
-  URL:=$(PKG_SOURCE_URL)
   TITLE:=sysrepo cli tool
+  URL:=https://www.sysrepo.org/
   DEPENDS:=+libsysrepo
 endef
 
 define Package/sysrepocfg
   SECTION:=utils
   CATEGORY:=Utilities
-  URL:=$(PKG_SOURCE_URL)
   TITLE:=sysrepo configuration tool
+  URL:=https://www.sysrepo.org/
   DEPENDS:=+libsysrepo
 endef
 
index ec08c137fc5b0df42fff817c69d40e0991e733b5..d13bcec7b2a5f98f18087b6bf189987985558163 100644 (file)
@@ -1,7 +1,5 @@
-Index: sysrepo-0.7.5/src/common/sysrepo.pb-c.c
-===================================================================
 --- /dev/null
-+++ sysrepo-0.7.5/src/common/sysrepo.pb-c.c
++++ b/src/common/sysrepo.pb-c.c
 @@ -0,0 +1,10537 @@
 +/* Generated by the protocol buffer compiler.  DO NOT EDIT! */
 +/* Generated from: sysrepo.proto */
@@ -10540,10 +10538,8 @@ Index: sysrepo-0.7.5/src/common/sysrepo.pb-c.c
 +  sr__operation__value_ranges,
 +  NULL,NULL,NULL,NULL   /* reserved[1234] */
 +};
-Index: sysrepo-0.7.5/src/common/sysrepo.pb-c.h
-===================================================================
 --- /dev/null
-+++ sysrepo-0.7.5/src/common/sysrepo.pb-c.h
++++ b/src/common/sysrepo.pb-c.h
 @@ -0,0 +1,4238 @@
 +/* Generated by the protocol buffer compiler.  DO NOT EDIT! */
 +/* Generated from: sysrepo.proto */
index 3826853fbd5ebc41fe7f5e965997cee76677fe6d..5ca818b2fed2049d60071847c2de911a20f2f490 100644 (file)
@@ -1,8 +1,6 @@
-Index: sysrepo-0.7.5/CMakeLists.txt
-===================================================================
---- sysrepo-0.7.5.orig/CMakeLists.txt
-+++ sysrepo-0.7.5/CMakeLists.txt
-@@ -303,7 +303,7 @@ install (FILES ${INTERNAL_YANGS} DESTINA
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -310,7 +310,7 @@ install (FILES ${INTERNAL_YANGS} DESTINA
  
  # install NACM YANG module
  if(ENABLE_NACM)
@@ -11,7 +9,7 @@ Index: sysrepo-0.7.5/CMakeLists.txt
  endif(ENABLE_NACM)
  
  find_package(PkgConfig QUIET)
-@@ -327,9 +327,9 @@ if(WITH_SYSTEMD)
+@@ -334,9 +334,9 @@ if(WITH_SYSTEMD)
          FILES_MATCHING PATTERN "*.service")
  endif()
  
@@ -22,5 +20,5 @@ Index: sysrepo-0.7.5/CMakeLists.txt
 +#INSTALL_YANG("nc-notifications" "" "666")
 +#INSTALL_YANG("notifications" "" "666")
  
- if(GEN_LANGUAGE_BINDINGS)
    add_subdirectory(swig)
+ # uninstall
add_custom_target(uninstall "${CMAKE_COMMAND}" -P "${CMAKE_MODULE_PATH}/uninstall.cmake")
index ca4b0caa8990c4a26072c4a5fe2e27e79b0af263..a70113771faa019a1fe0c6f1a2811e23c38c56fe 100644 (file)
@@ -1,7 +1,5 @@
-Index: sysrepo-0.7.5/src/clientlib/client_library.c
-===================================================================
---- sysrepo-0.7.5.orig/src/clientlib/client_library.c
-+++ sysrepo-0.7.5/src/clientlib/client_library.c
+--- a/src/clientlib/client_library.c
++++ b/src/clientlib/client_library.c
 @@ -396,13 +396,13 @@ sr_connect(const char *app_name, const s
          if (opts & SR_CONN_DAEMON_REQUIRED) {
              if ((opts & SR_CONN_DAEMON_START) && (0 == getuid())) {
index 15479760aa461e2b503488e58ecf5a34507e3a22..9de4e2ed88a27960730d9f0105b0a38970506d8b 100644 (file)
@@ -1,8 +1,6 @@
-Index: sysrepo-0.7.0-7aa2f18d234267403147df92c0005c871f0aa840/src/common/sr_utils.c
-===================================================================
---- sysrepo-0.7.0-7aa2f18d234267403147df92c0005c871f0aa840.orig/src/common/sr_utils.c
-+++ sysrepo-0.7.0-7aa2f18d234267403147df92c0005c871f0aa840/src/common/sr_utils.c
-@@ -460,14 +460,24 @@ sr_fd_set_nonblock(int fd)
+--- a/src/common/sr_utils.c
++++ b/src/common/sr_utils.c
+@@ -477,14 +477,24 @@ sr_fd_set_nonblock(int fd)
  
  #if defined(SO_PEERCRED)
  
index 9041eeca7cae242d219f4337ec66337bea62a1b4..093fc415499ceb0d6a82494e0a79f85facaed2c8 100644 (file)
@@ -1,7 +1,5 @@
-Index: sysrepo-0.7.7/src/common/sysrepo.pb-c.c
-===================================================================
---- sysrepo-0.7.7.orig/src/common/sysrepo.pb-c.c
-+++ sysrepo-0.7.7/src/common/sysrepo.pb-c.c
+--- a/src/common/sysrepo.pb-c.c
++++ b/src/common/sysrepo.pb-c.c
 @@ -8013,7 +8013,7 @@ const ProtobufCMessageDescriptor sr__eve
    (ProtobufCMessageInit) sr__event_notif_replay_resp__init,
    NULL,NULL,NULL    /* reserved[123] */
@@ -51,10 +49,8 @@ Index: sysrepo-0.7.7/src/common/sysrepo.pb-c.c
    sr__data_provide_req__field_descriptors,
    sr__data_provide_req__field_indices_by_name,
    3,  sr__data_provide_req__number_ranges,
-Index: sysrepo-0.7.7/src/common/sysrepo.pb-c.h
-===================================================================
---- sysrepo-0.7.7.orig/src/common/sysrepo.pb-c.h
-+++ sysrepo-0.7.7/src/common/sysrepo.pb-c.h
+--- a/src/common/sysrepo.pb-c.h
++++ b/src/common/sysrepo.pb-c.h
 @@ -1630,10 +1630,11 @@ struct  _Sr__DataProvideReq
    char *subscriber_address;
    uint32_t subscription_id;
index 0e97965b8a8f4bfe1bc44d951b0b0093849a068d..e56e8ad87a73ea6deb3a31b86f538eac3d8e8982 100644 (file)
@@ -13,13 +13,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=tcpproxy
 PKG_VERSION:=1.2
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.spreadspace.org/tcpproxy/releases/
 PKG_HASH:=446104b3abefda73b1255e5197702acbeb36b3aada251ad39e1e5ab55292683b
 PKG_MAINTAINER:=Christian Pointner <equinox@spreadspace.org>
-PKG_LICENSE:=GPL-3.0+
+PKG_LICENSE:=GPL-3.0-or-later
 PKG_LICENSE_FILES:=LICENSE
 include $(INCLUDE_DIR)/package.mk
 
index 5a45af74c9bb53153395c511442c96d60940a424..4cadc7c3a062ad83251fdef21e4f52455b978069 100644 (file)
@@ -17,6 +17,7 @@ PKG_HASH:=955aed6a40f49a5b8c1234fd0a928edc5c665d94b7755ab5769c30938e33f380
 
 PKG_LICENSE:=GPL-3.0
 PKG_LICENSE_FILES:=docs/LICENSE
+PKG_CPE_ID:=cpe:/a:appneta:tcpreplay
 
 PKG_FIXUP:=libtool
 PKG_INSTALL:=1
@@ -28,7 +29,7 @@ TCPREPLAY_MODULES:= \
        tcpreplay tcpreplay-edit tcprewrite
 
 define Package/tcpreplay/default
-  SUBMENU:=tcprelay
+  SUBMENU:=Tcpreplay
   SECTION:=net
   CATEGORY:=Network
   URL:=http://tcpreplay.appneta.com/
index 3daa0eaeda30ad0b22eb1640028a84ca3ae2a661..d7a8d5ee05de6560155799db551b8d6c365d2b55 100644 (file)
@@ -4,15 +4,16 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=tgt
-PKG_VERSION:=1.0.78
+PKG_VERSION:=1.0.79
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/fujita/tgt/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=3ba44d5195b2007c6d9008f46a10f7754c90b9bcf6117a7f3e136accb209faac
+PKG_HASH:=6736d799a202ff665549359859441c6d2b5e3425bffef9ee60ab5a101342a40d
 
 PKG_MAINTAINER:=Maxim Storchak <m.storchak@gmail.com>
-PKG_LICENSE:=GPL-2.0
+PKG_LICENSE:=GPL-2.0-only
+PKG_CPE_ID:=cpe:/a:zaal:tgt
 
 PKG_USE_MIPS16:=0
 PKG_INSTALL:=1
index e226f65860f5f7b2066188e2810bca3263140311..069f59472d26523eecbc8fb30517846365c48062 100644 (file)
@@ -4,6 +4,7 @@ config options 'tgt'
        option iothreads '2'
 #      option nop_count '3'
 #      option nop_interval '1'
+#      option logging '0'
 #      list portal '[::1]'
 #      list portal '127.0.0.1:3261'
 #      list portal '0.0.0.0:3262'
index c10057d6502a58701a66ea7e10e0ff708956d8f5..04ee4931d0326a5f378a5a5fb623f84ee6132c56 100755 (executable)
@@ -184,16 +184,20 @@ validate_tgt_section() {
                'iothreads:uinteger' \
                'portal:list(string)' \
                'nop_interval:uinteger' \
-               'nop_count:uinteger'
+               'nop_count:uinteger' \
+               'logging:bool:0'
 }
 
 start_tgt_instance() {
+       local fg_flag=-f
        [ "$2" = 0 ] || {
                $logger "Validation failed for tgt options"
                return 1
        }
        procd_open_instance
-       procd_set_param command $PROG -f
+       procd_set_param command $PROG
+       [ "$logging" -eq 1 ] && fg_flag=-D
+       procd_append_param command "$fg_flag"
        [ "$iothreads" ] && procd_append_param command -t "$iothreads"
        [ "$portal$nop_interval$nop_count" ] && {
                local iscsi="" i
index a70f018f95a2efc75c0c46652ad15b8dd1858827..8b24aae7240c38f39acd5970094fc90c37f15f21 100644 (file)
@@ -15,6 +15,8 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://www.tinc-vpn.org/packages
 PKG_HASH:=18c83b147cc3e2133a7ac2543eeb014d52070de01c7474287d3ccecc9b16895e
 
+PKG_CPE_ID:=cpe:/a:tinc:tinc
+
 PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
 
index a7865c96e862d23e22caa27428a2fc332f9a2314..7400ac9dedbe31453ff44c11071b6e9faf8b2118 100644 (file)
@@ -16,6 +16,8 @@ PKG_SOURCE_URL:=http://www.banu.com/pub/tinyproxy/1.8/
 PKG_HASH:=be559b54eb4772a703ad35239d1cb59d32f7cf8a739966742622d57df88b896e
 PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
 
+PKG_CPE_ID:=cpe:/a:banu:tinyproxy
+
 PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
index 752dd66111d76b6c2d60785d8b3f5473c9e8e095..c6dd448f4bb1b61bfd47df9a0713a42f15c0de21 100644 (file)
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=tor
-PKG_VERSION:=0.4.0.5
+PKG_VERSION:=0.4.1.5
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://dist.torproject.org/ \
        https://archive.torproject.org/tor-package-archive
-PKG_HASH:=b5a2cbf0dcd3f1df2675dbd5ec10bbe6f8ae995c41b68cebe2bc95bffc90696e
+PKG_HASH:=a864e0b605fb933fcc167bf242eed4233949e8a1bf23ac8e0381b106cd920425
 PKG_MAINTAINER:=Hauke Mehrtens <hauke@hauke-m.de> \
                Peter Wagner <tripolar@gmx.at>
 PKG_LICENSE_FILES:=LICENSE
index 939c37a977fd69e653434972bc9aa693fb2b7607..cedf29479e0b06fb4cbdffede3656e151bba14b9 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2018 Luiz Angelo Daros de Luca
+# Copyright (C) 2018-2019 Luiz Angelo Daros de Luca
 #
 # This is free software, licensed under the GNU General Public License v2.
 #
@@ -10,30 +10,25 @@ 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
+PKG_LICENSE:=GPL-2.0-or-later
 
 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
+  SECTION:=net
+  CATEGORY:=Network
+  TITLE:=WAN traffic shaper based on LAN addresses
+  DEPENDS:=+tc +kmod-sched-core +kmod-sched-connmark +kmod-ifb +iptables +kmod-sched-cake +iptables-mod-conntrack-extra
+  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.
-
+  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
@@ -44,7 +39,10 @@ define Build/Compile
 endef
 
 define Package/trafficshaper/install
-$(CP) ./files/* $(1)
+       $(INSTALL_DIR) $(1)/etc/config
+       $(INSTALL_CONF) ./files/trafficshaper.conf $(1)/etc/config/trafficshaper
+       $(INSTALL_DIR) $(1)/etc/init.d
+       $(INSTALL_BIN) ./files/trafficshaper.init $(1)/etc/init.d/trafficshaper
 endef
 
 $(eval $(call BuildPackage,trafficshaper))
diff --git a/net/trafficshaper/files/etc/config/trafficshaper b/net/trafficshaper/files/etc/config/trafficshaper
deleted file mode 100644 (file)
index daee103..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-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
deleted file mode 100755 (executable)
index 445f50e..0000000
+++ /dev/null
@@ -1,477 +0,0 @@
-#!/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
-}
diff --git a/net/trafficshaper/files/trafficshaper.conf b/net/trafficshaper/files/trafficshaper.conf
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/trafficshaper.init b/net/trafficshaper/files/trafficshaper.init
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 7547dbde206c06e7d72acb4fc9759002db81fb04..32d554faf5ee84186b9ff12c3e5866ea69e1c93c 100644 (file)
@@ -5,9 +5,9 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/ronggang/transmission-web-control
-PKG_SOURCE_DATE:=2019-04-16
-PKG_SOURCE_VERSION:=a747a87babb246b0d3e6dd108ad7b4c19462cfe6
-PKG_MIRROR_HASH:=90a2e33bd799a13504881e26980823fa181b47918900fc4ef03ae3daf0625f14
+PKG_SOURCE_DATE:=2019-07-24
+PKG_SOURCE_VERSION:=c27e3ba9f08148f79fb4121d8a1f5906640ff8d6
+PKG_MIRROR_HASH:=6de823b9b8229b176fbb5c9f33f326c0fb23553ae00a36f60d019fdcdf90a712
 
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
index bbe073e698ad20d8d49544ae8767e617007493f9..b78db281e63eb050c56581afffb7c04c4f4cae75 100644 (file)
@@ -9,18 +9,17 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=transmission
 PKG_VERSION:=2.94
-PKG_RELEASE:=4
+PKG_RELEASE:=7
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@GITHUB/transmission/transmission-releases/master
 PKG_HASH:=35442cc849f91f8df982c3d0d479d650c6ca19310a994eccdaa79a4af3916b7d
-PKG_MAINTAINER:=Rosen Penev <rosenp@gmail.com>
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
 
-PKG_LICENSE:=GPL-2.0+
+PKG_MAINTAINER:=Rosen Penev <rosenp@gmail.com>
+PKG_LICENSE:=GPL-2.0-or-later
 PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:transmissionbt:transmission
 
-PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
 PKG_BUILD_PARALLEL:=1
 
@@ -31,7 +30,7 @@ define Package/transmission/template
   SECTION:=net
   CATEGORY:=Network
   TITLE:=BitTorrent client
-  URL:=http://www.transmissionbt.com
+  URL:=https://www.transmissionbt.com
   DEPENDS:=+libcurl +libevent2 +libminiupnpc +libnatpmp +libpthread +librt +zlib
 endef
 
@@ -120,7 +119,7 @@ define Package/transmission-daemon-openssl/conffiles
 endef
 Package/transmission-daemon-mbedtls/conffiles = $(Package/transmission-daemon-openssl/conffiles)
 
-TARGET_CFLAGS += -flto
+TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto
 TARGET_LDFLAGS += -Wl,--gc-sections -Wl,--as-needed
 
 CONFIGURE_ARGS += \
index 2a25214a7d2e4ed8439097cbf7e130443b485dba..1d57db5e629ab42188dfe1fee45f4ff2288e7596 100644 (file)
@@ -14,8 +14,8 @@ append_params() {
                IFS="$LIST_SEP"
                for v in $v; do
                        [ -n "$v" ] && (
-                               echo "\"$p\": $v," | sed -e 's|_|-|g' >> $config_file
-                       )
+                               echo "\"$p\": $v," | sed -e 's|_|-|g'
+                       ) >> "$config_file"
                done
                unset IFS
        done
@@ -28,9 +28,9 @@ append_params_quotes() {
                IFS="$LIST_SEP"
                for v in $v; do
                        [ -n "$v" ] && (
-                               echo -n "\"$p" | sed -e 's|/|\\/|g;s|_|-|g' >> $config_file; \
-                               echo "\": \"$v\"," >> $config_file
-                       )
+                               printf "\"%s" "$p" | sed -e 's|/|\\/|g;s|_|-|g'; \
+                               echo "\": \"$v\","
+                       ) >> "$config_file"
                done
                unset IFS
        done
@@ -51,7 +51,6 @@ transmission() {
        local download_dir config_dir
        local mem_percentage
        local nice
-       local cmdline
        local web_home
 
        section_enabled "$section" || return 1
@@ -73,16 +72,16 @@ transmission() {
        fi
 
        config_file="$config_dir/settings.json"
-       [ -d $config_dir ] || {
-               mkdir -p $config_dir
-               chmod 0755 $config_dir
-               touch $config_file
-               [ -z "$user" ] || chown -R "$user:$group" $config_dir
+       [ -d "$config_dir" ] || {
+               mkdir -p "$config_dir"
+               chmod 0755 "$config_dir"
+               touch "$config_file"
+               [ -z "$user" ] || chown -R "$user:$group" "$config_dir"
        }
 
        [ "$config_overwrite" = 0 ] || {
 
-               echo "{" > $config_file
+               echo "{" > "$config_file"
 
                append_params "$cfg" \
                        alt_speed_down alt_speed_enabled alt_speed_time_begin alt_speed_time_day \
@@ -107,20 +106,22 @@ transmission() {
                        peer_congestion_algorithm peer_socket_tos rpc_bind_address rpc_password rpc_url \
                        rpc_username rpc_host_whitelist rpc_whitelist script_torrent_done_filename watch_dir
 
-               echo "\"invalid-key\": false" >> $config_file
-               echo "}" >> $config_file
-
+               {
+                       echo "\"invalid-key\": false"
+                       echo "}"
+               } >> "$config_file"
        }
 
-       cmdline="transmission-daemon -g $config_dir -f"
        procd_open_instance
-       procd_set_param command $cmdline
-       procd_set_param user $user
-       procd_set_param group $group
-       procd_set_param nice $nice
-       procd_set_param respawn retry=60
-
-       if test -z $USE; then
+       procd_set_param command "/usr/bin/transmission-daemon"
+       procd_append_param command -f --log-error -g "$config_dir"
+       procd_set_param user "$user"
+       procd_set_param group "$group"
+       procd_set_param nice "$nice"
+       procd_set_param stderr 1
+       procd_set_param respawn
+
+       if [ -z "$USE" ]; then
                procd_set_param limits core="0 0"
        else
                procd_set_param limits core="0 0" as="$USE $USE"
@@ -132,8 +133,8 @@ transmission() {
        fi
 
        procd_add_jail transmission log
-       procd_add_jail_mount $config_file
-       procd_add_jail_mount_rw $download_dir
+       procd_add_jail_mount "$config_file"
+       procd_add_jail_mount_rw "$download_dir"
        procd_close_instance
 }
 
index bdf0de2064e106d1cf447c6472767a16c5b32269..7d81b736afbbfb656a8221820f8afd6d09e49c1b 100644 (file)
@@ -1,2 +1,6 @@
+# Transmission requests large buffers by default
 net.core.rmem_max = 4194304
 net.core.wmem_max = 1048576
+
+# Some firewalls block SYN packets that are too small
+net.ipv4.tcp_adv_win_scale = 4
diff --git a/net/transmission/patches/050-https-portcheck.patch b/net/transmission/patches/050-https-portcheck.patch
deleted file mode 100644 (file)
index 73a6c1d..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-From a2991e22434352a3114bf437674070a135b723fd Mon Sep 17 00:00:00 2001
-From: Rosen Penev <rosenp@gmail.com>
-Date: Sun, 27 May 2018 13:38:27 -0700
-Subject: [PATCH] portcheck: Switch to HTTPS
-
-Useful for testing TLS verification.
----
- libtransmission/rpcimpl.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libtransmission/rpcimpl.c b/libtransmission/rpcimpl.c
-index 46fd3192c..dcd96df59 100644
---- a/libtransmission/rpcimpl.c
-+++ b/libtransmission/rpcimpl.c
-@@ -1455,7 +1455,7 @@ portTest (tr_session               * session,
-           struct tr_rpc_idle_data  * idle_data)
- {
-   const int port = tr_sessionGetPeerPort (session);
--  char * url = tr_strdup_printf ("http://portcheck.transmissionbt.com/%d", port);
-+  char * url = tr_strdup_printf ("https://portcheck.transmissionbt.com/%d", port);
-   tr_webRun (session, url, portTested, idle_data);
-   tr_free (url);
-   return NULL;
--- 
-2.17.0
-
diff --git a/net/transmission/patches/060-fix-tls-verify.patch b/net/transmission/patches/060-fix-tls-verify.patch
deleted file mode 100644 (file)
index 1a9a120..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-From 81d584b9027b2b2ddd3209c1582c9ec73c26cc3e Mon Sep 17 00:00:00 2001
-From: Simon Wells <simonrwells@gmail.com>
-Date: Sun, 27 May 2018 13:44:41 -0700
-Subject: [PATCH] Change TR_CURL_SSL_VERIFY to TR_CURL_SSL_NO_VERIFY
-
-use secure by default and change the env var to match curl -k behaviour
-
-Closes: #179
----
- libtransmission/web.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libtransmission/web.c b/libtransmission/web.c
-index 997a151b5..ce41e342a 100644
---- a/libtransmission/web.c
-+++ b/libtransmission/web.c
-@@ -392,7 +392,7 @@ tr_webThreadFunc (void * vsession)
-   web->taskLock = tr_lockNew ();
-   web->tasks = NULL;
-   web->curl_verbose = tr_env_key_exists ("TR_CURL_VERBOSE");
--  web->curl_ssl_verify = tr_env_key_exists ("TR_CURL_SSL_VERIFY");
-+  web->curl_ssl_verify = !tr_env_key_exists ("TR_CURL_SSL_NO_VERIFY");
-   web->curl_ca_bundle = tr_env_get_string ("CURL_CA_BUNDLE", NULL);
-   if (web->curl_ssl_verify)
-     {
--- 
-2.17.0
-
index e1682e17e0d8f7078d2cc69be12385b1e98e2701..e2864a5fca885edd77216ccd0e5bcaeeedcc347f 100644 (file)
@@ -6,9 +6,9 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=travelmate
-PKG_VERSION:=1.4.7
-PKG_RELEASE:=1
-PKG_LICENSE:=GPL-3.0+
+PKG_VERSION:=1.4.13
+PKG_RELEASE:=2
+PKG_LICENSE:=GPL-3.0-or-later
 PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
 
 include $(INCLUDE_DIR)/package.mk
@@ -17,7 +17,7 @@ define Package/travelmate
        SECTION:=net
        CATEGORY:=Network
        TITLE:=A wlan connection manager for travel router
-       DEPENDS:=+iwinfo +jshn +jsonfilter +uclient-fetch
+       DEPENDS:=+iwinfo +jshn +jsonfilter +uclient-fetch +dnsmasq
        PKGARCH:=all
 endef
 
@@ -42,13 +42,16 @@ endef
 
 define Package/travelmate/install
        $(INSTALL_DIR) $(1)/usr/bin
-       $(INSTALL_BIN) ./files/travelmate.sh $(1)/usr/bin/
+       $(INSTALL_BIN) ./files/travelmate.sh $(1)/usr/bin
 
        $(INSTALL_DIR) $(1)/etc/init.d
        $(INSTALL_BIN) ./files/travelmate.init $(1)/etc/init.d/travelmate
 
        $(INSTALL_DIR) $(1)/etc/config
        $(INSTALL_CONF) ./files/travelmate.conf $(1)/etc/config/travelmate
+
+       $(INSTALL_DIR) $(1)/etc/travelmate
+       $(INSTALL_BIN) ./files/*.login $(1)/etc/travelmate
 endef
 
 $(eval $(call BuildPackage,travelmate))
index e261e76614d7fe0fe05252654150035e7ff09881..4f7eab676a94b891c801794403af0c06ab9177c6 100644 (file)
@@ -12,7 +12,9 @@ To avoid these kind of deadlocks, travelmate will set all station interfaces to
 * fast uplink connections
 * support all kinds of uplinks, incl. hidden and enterprise uplinks
 * continuously checks the existing uplink connection (quality), e.g. for conditional uplink (dis-) connections
+* automatically add open uplinks to your wireless config, e.g. hotel captive portals
 * captive portal detection with internet online check and a 'heartbeat' function to keep the uplink connection up & running
+* captive portal auto-login hook (configured via uci/LuCI), you could reference an external script for captive portal auto-logins (see example below)
 * proactively scan and switch to a higher prioritized uplink, despite of an already existing connection
 * support devices with multiple radios in any order
 * procd init and hotplug support
@@ -21,10 +23,11 @@ To avoid these kind of deadlocks, travelmate will set all station interfaces to
 * optional: the LuCI frontend shows the WiFi QR codes from all configured Access Points. It allows you to connect your Android or iOS devices to your router’s WiFi using the QR code
 
 ## Prerequisites
-* [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
+* [OpenWrt](https://openwrt.org), tested with the stable release series (19.07.x) and with the latest OpenWrt snapshot
+* iwinfo for wlan scanning, uclient-fetch for captive portal detection, dnsmasq as dns backend
 * optional: qrencode 4.x for QR code support
 * optional: wpad (the full version, not wpad-mini) to use Enterprise WiFi
+* optional: curl to use external scripts for captive portal auto-logins
 
 ## Installation & Usage
 * download the package [here](https://downloads.openwrt.org/snapshots/packages/x86_64/packages)
@@ -45,29 +48,44 @@ To avoid these kind of deadlocks, travelmate will set all station interfaces to
     * trm\_debug => enable/disable debug logging (bool/default: '0', disabled)
     * trm\_captive => enable/disable the captive portal detection (bool/default: '1', enabled)
     * trm\_proactive => enable/disable the proactive uplink switch (bool/default: '1', enabled)
+    * trm\_autoadd => automatically add open uplinks to your wireless config (bool/default: '0', disabled)
     * trm\_minquality => minimum signal quality threshold as percent for conditional uplink (dis-) connections (int/default: '35', valid range: 20-80)
     * trm\_maxwait => how long (in seconds) should travelmate wait for a successful wlan interface reload action (int/default: '30', valid range: 20-40)
     * trm\_maxretry => how many times should travelmate try to connect to an uplink (int/default: '3', valid range: 1-10)
     * trm\_timeout => overall retry timeout in seconds (int/default: '60', valid range: 30-300)
     * trm\_radio => limit travelmate to a single radio (e.g. 'radio1') or change the overall scanning priority (e.g. 'radio1 radio2 radio0') (default: not set, use all radios 0-n)
-    * trm\_iface => main uplink / procd trigger network interface (default: trm_wwan)
+    * trm\_iface => uplink / procd trigger network interface (default: trm_wwan)
     * trm\_triggerdelay => additional trigger delay in seconds before travelmate processing begins (int/default: '2')
 
+## Captive Portal auto-logins
+For automated captive portal logins you could reference external shell scripts. All login scripts should be executable and located in '/etc/travelmate' with the extension '.login'. The provided 'wifionice.login' script example requires curl and automates the login to german ICE hotspots, it also explains the principle approach to extract runtime data like security tokens for a successful login. Hopefully more scripts for different captive portals will be provided by the community ...
+
+A typical/successful captive portal login looks like this:
+<pre><code>
+[...]
+Mon Aug  5 10:15:48 2019 user.info travelmate-1.4.10[1481]: travelmate instance started ::: action: start, pid: 1481
+Mon Aug  5 10:16:17 2019 user.info travelmate-1.4.10[1481]: captive portal login '/etc/travelmate/wifionice.login' for 'www.wifionice.de' has been executed with rc '0'
+Mon Aug  5 10:16:23 2019 user.info travelmate-1.4.10[1481]: connected to uplink 'radio1/WIFIonICE/-' (1/5, GL.iNet GL-AR750S, OpenWrt SNAPSHOT r10644-cb49e46a8a)
+[...]
+</code></pre>
+
 ## Runtime information
 
 **receive travelmate runtime information:**
 <pre><code>
 ~# /etc/init.d/travelmate status
 ::: travelmate runtime information
-  + travelmate_status  : connected (net ok/78)
-  + travelmate_version : 1.2.3
-  + station_id         : radio1/blackhole/01:02:03:04:05:06
+  + travelmate_status  : connected (net ok/100)
+  + travelmate_version : 1.4.10
+  + station_id         : radio1/blackhole/-
   + station_interface  : trm_wwan
   + faulty_stations    : 
-  + last_rundate       : 07.09.2018 17:22:37
-  + system             : TP-LINK RE450, OpenWrt SNAPSHOT r8018-42f158314e
+  + last_rundate       : 2019.08.03-20:37:19
+  + system             : GL.iNet GL-AR750S, OpenWrt SNAPSHOT r10644-cb49e46a8a
 </code></pre>
 
+To debug travelmate runtime problems, please always enable the 'trm\_debug' flag, restart travelmate and scan the system log (_logread -e "travelmate"_)
+
 ## Manual Setup
 **1. configure the travelmate wwan interface in /etc/config/network:**
 <pre><code>
diff --git a/net/travelmate/files/generic-user-pass.login b/net/travelmate/files/generic-user-pass.login
new file mode 100755 (executable)
index 0000000..fbcefdf
--- /dev/null
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+cmd="$(command -v curl)"
+url="http://example.com/"
+success_string="Thank you!"
+
+if [ ! -x "${cmd}" ]
+then
+       exit 1
+fi
+
+
+response="$("${cmd}" $url -d "password=$2&pwd=$2&username=$1" \
+       --header "Content-Type:application/x-www-form-urlencoded" -s)"
+
+if echo "${response}" | grep -q "${success_string}";
+then
+       exit 0
+else
+       exit 2
+fi
index 1833b92a7a59f50ae989bbb8763a23bc865e0800..ce9eb5f97ae60781b02d813c4f1fbdf6eed54ee9 100644 (file)
@@ -6,6 +6,7 @@ config travelmate 'global'
        option trm_captive '1'
        option trm_proactive '1'
        option trm_netcheck '0'
+       option trm_autoadd '0'
        option trm_iface 'trm_wwan'
        option trm_triggerdelay '2'
        option trm_debug '0'
index 94d4211db6907823cb140000e9d149575d8e7c29..8d4669ce35d3621c4e61750fbaf4822e35ebf3cf 100755 (executable)
@@ -6,19 +6,23 @@
 # You should have received a copy of the GNU General Public License
 # along with this program. If not, see <http://www.gnu.org/licenses/>.
 
+# (s)hellcheck exceptions
+# shellcheck disable=1091 disable=2039 disable=2143 disable=2181 disable=2188
+
 # set initial defaults
 #
 LC_ALL=C
 PATH="/usr/sbin:/usr/bin:/sbin:/bin"
-trm_ver="1.4.7"
-trm_sysver="unknown"
+trm_ver="1.4.13"
 trm_enabled=0
 trm_debug=0
 trm_iface="trm_wwan"
 trm_captive=1
 trm_proactive=1
 trm_netcheck=0
+trm_autoadd=0
 trm_captiveurl="http://captive.apple.com"
+trm_scanbuffer=1024
 trm_minquality=35
 trm_maxretry=5
 trm_maxwait=30
@@ -48,7 +52,7 @@ f_trim()
 #
 f_envload()
 {
-       local IFS sys_call sys_desc sys_model
+       local IFS
 
        # (re-)initialize global list variables
        #
@@ -56,18 +60,12 @@ f_envload()
 
        # get system information
        #
-       sys_call="$(ubus -S call system board 2>/dev/null)"
-       if [ -n "${sys_call}" ]
-       then
-               sys_desc="$(printf '%s' "${sys_call}" | jsonfilter -e '@.release.description')"
-               sys_model="$(printf '%s' "${sys_call}" | jsonfilter -e '@.model')"
-               trm_sysver="${sys_model}, ${sys_desc}"
-       fi
+       trm_sysver="$(ubus -S call system board 2>/dev/null | jsonfilter -e '@.model' -e '@.release.description' | \
+               awk 'BEGIN{ORS=", "}{print $0}' | awk '{print substr($0,1,length($0)-2)}')"
 
-       # get eap capabilities and rebind protection setting
+       # get eap capabilities
        #
-       trm_eap="$("${trm_wpa}" -veap >/dev/null 2>&1; printf "%u" ${?})"
-       trm_rebind="$(uci_get dhcp "@dnsmasq[0]" rebind_protection)"
+       trm_eap="$("${trm_wpa}" -veap >/dev/null 2>&1; printf "%u" "${?}")"
 
        # load config and check 'enabled' option
        #
@@ -137,11 +135,11 @@ f_prep()
 {
        local IFS mode network radio disabled eaptype config="${1}" proactive="${2}"
 
-       mode="$(uci_get wireless "${config}" mode)"
-       network="$(uci_get wireless "${config}" network)"
-       radio="$(uci_get wireless "${config}" device)"
-       disabled="$(uci_get wireless "${config}" disabled)"
-       eaptype="$(uci_get wireless "${config}" eap_type)"
+       mode="$(uci_get "wireless" "${config}" "mode")"
+       network="$(uci_get "wireless" "${config}" "network")"
+       radio="$(uci_get "wireless" "${config}" "device")"
+       disabled="$(uci_get "wireless" "${config}" "disabled")"
+       eaptype="$(uci_get "wireless" "${config}" "eap_type")"
 
        if [ -n "${config}" ] && [ -n "${radio}" ] && [ -n "${mode}" ] && [ -n "${network}" ]
        then
@@ -168,24 +166,36 @@ f_prep()
                        fi
                fi
        fi
-       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}"
+       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:-"-"}, disabled: ${disabled}"
+}
+
+# check net status
+#
+f_net()
+{
+       local IFS result
+
+       result="$(${trm_fetch} --timeout=$((trm_maxwait/6)) "${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}')"
+       printf "%s" "${result}"
+       f_log "debug" "f_net  ::: fetch: ${trm_fetch}, timeout: $((trm_maxwait/6)), url: ${trm_captiveurl}, result: ${result}"
 }
 
 # check interface status
 #
 f_check()
 {
-       local IFS ifname radio dev_status last_status config sta_essid sta_bssid result cp_domain wait mode="${1}" status="${2:-"false"}"
+       local IFS ifname radio dev_status config sta_essid sta_bssid result uci_essid uci_bssid login_command login_command_args wait_time mode="${1}" status="${2:-"false"}" cp_domain="${3:-"false"}"
 
        if [ "${mode}" != "initial" ] && [ "${status}" = "false" ]
        then
                ubus call network reload
-               wait=$((trm_maxwait/6))
-               sleep ${wait}
+               wait_time=$((trm_maxwait/6))
+               sleep "${wait_time}"
        fi
 
-       wait=1
-       while [ "${wait}" -le "${trm_maxwait}" ]
+       wait_time=1
+       while [ "${wait_time}" -le "${trm_maxwait}" ]
        do
                dev_status="$(ubus -S call network.wireless status 2>/dev/null)"
                if [ -n "${dev_status}" ]
@@ -205,7 +215,7 @@ f_check()
                                                trm_devlist="$(f_trim "${trm_devlist} ${radio}")"
                                        fi
                                done
-                               if [ "${trm_devlist}" = "${trm_radiolist}" ] || [ "${wait}" -eq "${trm_maxwait}" ]
+                               if [ "${trm_devlist}" = "${trm_radiolist}" ] || [ "${wait_time}" -eq "${trm_maxwait}" ]
                                then
                                        ifname="${trm_devlist}"
                                        break
@@ -222,39 +232,76 @@ f_check()
                                        trm_ifquality="$(${trm_iwinfo} "${ifname}" info 2>/dev/null | awk -F "[ ]" '/Link Quality:/{split($NF,var0,"/");printf "%i\n",(var0[1]*100/var0[2])}')"
                                        if [ "${mode}" = "initial" ] && [ "${trm_captive}" -eq 1 ]
                                        then
-                                               result="$(${trm_fetch} --timeout=$((trm_maxwait/6)) "${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}')"
+                                               result="$(f_net)"
+                                               if [ "${cp_domain}" = "true" ]
+                                               then
+                                                       cp_domain="$(printf "%s" "${result}" | awk -F "[\\'| ]" '/^net cp/{printf "%s" $4}')"
+                                                       uci_essid="$(printf "%s" "${dev_status}" | jsonfilter -l1 -e '@.*.interfaces[@.config.mode="sta"].config.ssid')"
+                                                       uci_essid="${uci_essid//[^[:alnum:]_]/_}"
+                                                       uci_bssid="$(printf "%s" "${dev_status}" | jsonfilter -l1 -e '@.*.interfaces[@.config.mode="sta"].config.bssid')"
+                                                       uci_bssid="${uci_bssid//[^[:alnum:]_]/_}"
+                                               fi
                                        fi
-                                       if [ "${trm_ifquality}" -ge "${trm_minquality}" ] && [ "${result%/*}" != "net nok" ]
+                                       if [ "${trm_ifquality}" -ge "${trm_minquality}" ] && [ "${result}" != "net nok" ]
                                        then
                                                trm_ifstatus="$(ubus -S call network.interface dump 2>/dev/null | jsonfilter -l1 -e "@.interface[@.device=\"${ifname}\"].up")"
                                                if [ "${trm_ifstatus}" = "true" ]
                                                then
-                                                       if [ "${mode}" = "sta" ] && [ "${trm_captive}" -eq 1 ] && [ "${trm_rebind:-0}" -eq 1 ] && [ -x "/etc/init.d/dnsmasq" ]
+                                                       if [ "${mode}" = "sta" ] && [ "${trm_captive}" -eq 1 ]
                                                        then
                                                                while true
                                                                do
-                                                                       result="$(${trm_fetch} --timeout=$((trm_maxwait/6)) "${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}')"
+                                                                       result="$(f_net)"
                                                                        cp_domain="$(printf "%s" "${result}" | awk -F "[\\'| ]" '/^net cp/{printf "%s" $4}')"
-                                                                       if [ "${trm_netcheck}" -eq 1 ] && [ "${result%/*}" = "net nok" ]
+                                                                       uci_essid="$(printf "%s" "${dev_status}" | jsonfilter -l1 -e '@.*.interfaces[@.config.mode="sta"].config.ssid')"
+                                                                       uci_essid="${uci_essid//[^[:alnum:]_]/_}"
+                                                                       uci_bssid="$(printf "%s" "${dev_status}" | jsonfilter -l1 -e '@.*.interfaces[@.config.mode="sta"].config.bssid')"
+                                                                       uci_bssid="${uci_bssid//[^[:alnum:]_]/_}"
+                                                                       if [ "${trm_netcheck}" -eq 1 ] && [ "${result}" = "net nok" ]
                                                                        then
                                                                                trm_ifstatus="${status}"
                                                                                f_jsnup
                                                                                break 2
                                                                        fi
-                                                                       if [ -z "${cp_domain}" ] || [ -n "$(uci_get dhcp "@dnsmasq[0]" rebind_domain | grep -Fo "${cp_domain}")" ]
+                                                                       if [ -z "${cp_domain}" ] || [ -n "$(uci_get "dhcp" "@dnsmasq[0]" "rebind_domain" | grep -Fo "${cp_domain}")" ]
                                                                        then
                                                                                break
                                                                        fi
                                                                        uci -q add_list dhcp.@dnsmasq[0].rebind_domain="${cp_domain}"
-                                                                       f_log "info" "captive portal domain '${cp_domain}' added to rebind whitelist"
+                                                                       f_log "info" "captive portal domain '${cp_domain}' added to to dhcp rebind whitelist"
+                                                                       if [ -z "$(uci_get "travelmate" "${uci_essid}${uci_bssid}")" ]
+                                                                       then
+                                                                               uci_add travelmate "login" "${uci_essid}${uci_bssid}"
+                                                                               uci_set travelmate "${uci_essid}${uci_bssid}" "command" "none"
+                                                                               f_log "info" "captive portal login section '${uci_essid}${uci_bssid}' added to travelmate config section"
+                                                                       fi
                                                                done
-                                                               if [ -n "$(uci -q changes dhcp)" ]
+                                                               if [ -n "$(uci -q changes "dhcp")" ]
                                                                then
-                                                                       uci_commit dhcp
+                                                                       uci_commit "dhcp"
                                                                        /etc/init.d/dnsmasq reload
                                                                fi
+                                                               if [ -n "$(uci -q changes "travelmate")" ]
+                                                               then
+                                                                       uci_commit "travelmate"
+                                                               fi
+                                                       fi
+                                                       if [ -n "${cp_domain}" ] && [ "${cp_domain}" != "false" ] && [ -n "${uci_essid}" ] && [ "${trm_captive}" -eq 1 ]
+                                                       then
+                                                               trm_connection="${result:-"-"}/${trm_ifquality}"
+                                                               f_jsnup
+                                                               login_command="$(uci_get "travelmate" "${uci_essid}${uci_bssid}" "command")"
+                                                               if [ -x "${login_command}" ]
+                                                               then
+                                                                       login_command_args="$(uci_get "travelmate" "${uci_essid}${uci_bssid}" "command_args")"
+                                                                       "${login_command}" ${login_command_args} >/dev/null 2>&1
+                                                                       rc=${?}
+                                                                       f_log "info" "captive portal login '${login_command:0:40} ${login_command_args}' for '${cp_domain}' has been executed with rc '${rc}'"
+                                                                       if [ "${rc}" -eq 0 ]
+                                                                       then
+                                                                               result="$(f_net)"
+                                                                       fi
+                                                               fi
                                                        fi
                                                        trm_connection="${result:-"-"}/${trm_ifquality}"
                                                        f_jsnup
@@ -266,13 +313,15 @@ f_check()
                                                sta_bssid="$(printf "%s" "${dev_status}" | jsonfilter -l1 -e '@.*.interfaces[@.config.mode="sta"].*.bssid')"
                                                if [ "${trm_ifquality}" -lt "${trm_minquality}" ]
                                                then
+                                                       unset trm_connection
+                                                       trm_ifstatus="${status}"
                                                        f_log "info" "uplink '${sta_essid:-"-"}/${sta_bssid:-"-"}' is out of range (${trm_ifquality}/${trm_minquality})"
-                                               elif [ "${trm_netcheck}" -eq 1 ] && [ "${result%/*}" = "net nok" ]
+                                               elif [ "${trm_netcheck}" -eq 1 ] && [ "${result}" = "net nok" ]
                                                then
+                                                       unset trm_connection
+                                                       trm_ifstatus="${status}"
                                                        f_log "info" "uplink '${sta_essid:-"-"}/${sta_bssid:-"-"}' has no internet (${result})"
                                                fi
-                                               unset trm_connection
-                                               trm_ifstatus="${status}"
                                                f_jsnup
                                                break
                                        elif [ "${mode}" = "initial" ]
@@ -293,10 +342,10 @@ f_check()
                                fi
                        fi
                fi
-               wait=$((wait+1))
+               wait_time=$((wait_time+1))
                sleep 1
        done
-       f_log "debug" "f_check::: mode: ${mode}, name: ${ifname:-"-"}, status: ${trm_ifstatus}, connection: ${trm_connection:-"-"}, wait: ${wait}, max_wait: ${trm_maxwait}, min_quality: ${trm_minquality}, captive: ${trm_captive}, netcheck: ${trm_netcheck}"
+       f_log "debug" "f_check::: mode: ${mode}, name: ${ifname:-"-"}, status: ${trm_ifstatus}, connection: ${trm_connection:-"-"}, wait: ${wait_time}, max_wait: ${trm_maxwait}, min_quality: ${trm_minquality}, captive: ${trm_captive}, netcheck: ${trm_netcheck}"
 }
 
 # update runtime information
@@ -311,10 +360,10 @@ f_jsnup()
                config="$(printf "%s" "${dev_status}" | jsonfilter -l1 -e '@.*.interfaces[@.config.mode="sta"].section')"
                if [ -n "${config}" ]
                then
-                       sta_iface="$(uci_get wireless "${config}" network)"
-                       sta_radio="$(uci_get wireless "${config}" device)"
-                       sta_essid="$(uci_get wireless "${config}" ssid)"
-                       sta_bssid="$(uci_get wireless "${config}" bssid)"
+                       sta_iface="$(uci_get "wireless" "${config}" "network")"
+                       sta_radio="$(uci_get "wireless" "${config}" "device")"
+                       sta_essid="$(uci_get "wireless" "${config}" "ssid")"
+                       sta_bssid="$(uci_get "wireless" "${config}" "bssid")"
                fi
        fi
 
@@ -358,6 +407,7 @@ f_jsnup()
                if [ -z "$(printf "%s" "${faulty_list}" | grep -Fo "${faulty_station}")" ]
                then
                        faulty_list="$(f_trim "${faulty_list} ${faulty_station}")"
+                       last_date="$(/bin/date "+%Y.%m.%d-%H:%M:%S")"
                fi
        fi
        json_add_string "travelmate_status" "${status}"
@@ -394,10 +444,10 @@ f_log()
 #
 f_main()
 {
-       local IFS cnt dev config scan scan_list scan_essid scan_bssid scan_quality faulty_list
+       local IFS cnt dev config spec scan_list scan_essid scan_bssid scan_open scan_quality uci_essid cfg_essid faulty_list
        local station_id sta sta_essid sta_bssid sta_radio sta_iface active_essid active_bssid active_radio
 
-       f_check "initial"
+       f_check "initial" "false" "true"
        f_log "debug" "f_main ::: status: ${trm_ifstatus}, proactive: ${trm_proactive}"
        if [ "${trm_ifstatus}" != "true" ] || [ "${trm_proactive}" -eq 1 ]
        then
@@ -413,11 +463,11 @@ f_main()
                        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
+                       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:-"-"}"
+               f_log "debug" "f_main ::: iwinfo: ${trm_iwinfo:-"-"}, dev_list: ${trm_devlist:-"-"}, sta_list: ${trm_stalist:0:${trm_scanbuffer}}, faulty_list: ${faulty_list:-"-"}"
                # radio loop
                #
                for dev in ${trm_devlist}
@@ -433,9 +483,9 @@ f_main()
                        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)"
+                               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
@@ -450,10 +500,11 @@ f_main()
                                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:/{split($NF,var0,"/");printf "%i,%s,%s\n",(var0[1]*100/var0[2]),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}"
+                                       scan_list="$("${trm_iwinfo}" "${dev}" scan 2>/dev/null | \
+                                               awk 'BEGIN{FS="[[:space:]]"}/Address:/{var1=$NF}/ESSID:/{var2="";for(i=12;i<=NF;i++)if(var2==""){var2=$i}else{var2=var2" "$i};
+                                               gsub(/,/,".",var2)}/Quality:/{split($NF,var0,"/")}/Encryption:/{if($NF=="none"){var3="+"}else{var3="-"};printf "%i,%s,%s,%s\n",(var0[1]*100/var0[2]),var1,var2,var3}' | \
+                                               sort -rn | awk -v buf="${trm_scanbuffer}" 'BEGIN{ORS=","}{print substr($0,1,buf)}')"
+                                       f_log "debug" "f_main ::: scan_buffer: ${trm_scanbuffer}, scan_list: ${scan_list}"
                                        if [ -z "${scan_list}" ]
                                        then
                                                f_log "debug" "f_main ::: no scan results on '${dev}' - continue"
@@ -463,47 +514,51 @@ f_main()
                                # scan loop
                                #
                                IFS=","
-                               for scan in ${scan_list}
+                               for spec in ${scan_list}
                                do
                                        if [ -z "${scan_quality}" ]
                                        then
-                                               scan_quality="${scan}"
+                                               scan_quality="${spec}"
                                        elif [ -z "${scan_bssid}" ]
                                        then
-                                               scan_bssid="${scan}"
+                                               scan_bssid="${spec}"
                                        elif [ -z "${scan_essid}" ]
                                        then
-                                               scan_essid="${scan}"
+                                               scan_essid="${spec}"
+                                       elif [ -z "${scan_open}" ]
+                                       then
+                                               scan_open="${spec}"
                                        fi
-                                       if [ -n "${scan_quality}" ] && [ -n "${scan_bssid}" ] && [ -n "${scan_essid}" ]
+                                       if [ -n "${scan_quality}" ] && [ -n "${scan_bssid}" ] && [ -n "${scan_essid}" ] && [ -n "${scan_open}" ]
                                        then
                                                if [ "${scan_quality}" -ge "${trm_minquality}" ]
                                                then
                                                        if { { [ "${scan_essid}" = "\"${sta_essid//,/.}\"" ] && { [ -z "${sta_bssid}" ] || [ "${scan_bssid}" = "${sta_bssid}" ]; } } || \
                                                                { [ "${scan_bssid}" = "${sta_bssid}" ] && [ "${scan_essid}" = "unknown" ]; } } && [ "${dev}" = "${sta_radio}" ]
                                                        then
-                                                               f_log "debug" "f_main ::: scan_quality: ${scan_quality}, scan_essid: ${scan_essid}, scan_bssid: ${scan_bssid:-"-"}"
+                                                               f_log "debug" "f_main ::: scan_quality: ${scan_quality}, scan_essid: ${scan_essid}, scan_bssid: ${scan_bssid:-"-"}, scan_open: ${scan_open}"
                                                                if [ "${dev}" = "${active_radio}" ]
                                                                then
+                                                                       uci_set "wireless" "${trm_active_sta}" "disabled" "1"
+                                                                       uci_commit "wireless"
+                                                                       f_log "debug" "f_main ::: active uplink connection '${active_radio}/${active_essid}/${active_bssid:-"-"}' terminated"
                                                                        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
+                                                                       uci_set "wireless" "${config}" "disabled" "0"
                                                                        f_check "sta"
                                                                        if [ "${trm_ifstatus}" = "true" ]
                                                                        then
                                                                                unset IFS scan_list
-                                                                               uci_commit wireless
+                                                                               uci_commit "wireless"
                                                                                f_log "info" "connected to uplink '${sta_radio}/${sta_essid}/${sta_bssid:-"-"}' (${cnt}/${trm_maxretry}, ${trm_sysver})"
                                                                                return 0
                                                                        else
-                                                                               uci -q revert wireless
+                                                                               uci -q revert "wireless"
                                                                                f_check "rev"
                                                                                if [ "${cnt}" -eq "${trm_maxretry}" ]
                                                                                then
@@ -519,17 +574,33 @@ f_main()
                                                                        cnt=$((cnt+1))
                                                                        sleep $((trm_maxwait/6))
                                                                done
-                                                       else
-                                                               unset scan_quality scan_bssid scan_essid
-                                                               continue
+                                                       elif [ "${trm_autoadd}" -eq 1 ] && [ "${scan_open}" = "+" ] && [ "${scan_essid}" != "unknown" ]
+                                                       then
+                                                               cfg_essid="${scan_essid#*\"}"
+                                                               cfg_essid="${cfg_essid%\"*}"
+                                                               uci_essid="${cfg_essid//[^[:alnum:]_]/_}"
+                                                               if [ -z "$(uci_get "wireless" "trm_${uci_essid}")" ]
+                                                               then
+                                                                       uci_add "wireless" "wifi-iface" "trm_${uci_essid}"
+                                                                       uci_set "wireless" "trm_${uci_essid}" "mode" "sta"
+                                                                       uci_set "wireless" "trm_${uci_essid}" "network" "${trm_iface}"
+                                                                       uci_set "wireless" "trm_${uci_essid}" "device" "${sta_radio}"
+                                                                       uci_set "wireless" "trm_${uci_essid}" "ssid" "${cfg_essid}"
+                                                                       uci_set "wireless" "trm_${uci_essid}" "encryption" "none"
+                                                                       uci_set "wireless" "trm_${uci_essid}" "disabled" "1"
+                                                                       uci_commit "wireless"
+                                                                       f_log "info" "open uplink '${sta_radio}/${cfg_essid}' added to wireless config"
+                                                               fi
                                                        fi
+                                                       unset scan_quality scan_bssid scan_essid scan_open
+                                                       continue
                                                else
-                                                       unset scan_quality scan_bssid scan_essid
+                                                       unset scan_quality scan_bssid scan_essid scan_open
                                                        continue
                                                fi
                                        fi
                                done
-                               unset IFS scan_quality scan_bssid scan_essid
+                               unset IFS scan_quality scan_bssid scan_essid scan_open
                        done
                        unset scan_list
                done
diff --git a/net/travelmate/files/wifionice.login b/net/travelmate/files/wifionice.login
new file mode 100755 (executable)
index 0000000..5687921
--- /dev/null
@@ -0,0 +1,37 @@
+#!/bin/sh
+# captive portal auto-login script for german ICE hotspots
+# written by Dirk Brenken (dev@brenken.org)
+
+# This is free software, licensed under the GNU General Public License v3.
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+domain="www.wifionice.de"
+cmd="$(command -v curl)"
+
+# curl check
+#
+if [ ! -x "${cmd}" ]
+then
+       exit 1
+fi
+
+# initial get request to receive & extract a valid security token
+#
+"${cmd}" "http://${domain}/en/" -s -o /dev/null -c "/tmp/${domain}.cookie"
+if [ -f "/tmp/${domain}.cookie" ]
+then
+       sec_token="$(awk '/csrf/{print $7}' "/tmp/${domain}.cookie")"
+       rm -f "/tmp/${domain}.cookie"
+else
+       exit 2
+fi
+
+# final post request/login with valid session cookie/security token
+#
+if [ -n "${sec_token}" ]
+then
+       "${cmd}" "http://${domain}/en/" -H "Cookie: csrf=${sec_token}" --data "login=true&CSRFToken=${sec_token}&connect="
+else
+       exit 3
+fi
index f8e5ea22bcf7fd48bbc68686f688a29e2d26e44a..cb85c38eb48ef998b8ac8ab762126fd23e968cb6 100644 (file)
@@ -13,14 +13,14 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=uanytun
 PKG_VERSION:=0.3.7
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.anytun.org/download/
 PKG_HASH:=076318c771c908386c4408dda0769171542da701785302903641ce23fd33a295
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
 PKG_MAINTAINER:=Christian Pointner <equinox@spreadspace.org>
-PKG_LICENSE:=GPL-3.0+
+PKG_LICENSE:=GPL-3.0-or-later
 PKG_LICENSE_FILES:=LICENSE
 include $(INCLUDE_DIR)/package.mk
 
index 201f05f25456a94f1c4de5f28b9ef07c7c70e0cc..188091a1e69c5a37424b0b43d6b82e7697f68247 100644 (file)
@@ -9,26 +9,34 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ulogd
 PKG_VERSION:=2.0.7
-PKG_RELEASE:=1
+PKG_RELEASE:=6
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://netfilter.org/projects/ulogd/files/ \
        ftp://ftp.netfilter.org/pub/ulogd/
 PKG_HASH:=990a05494d9c16029ba0a83f3b7294fc05c756546b8d60d1c1572dc25249a92b
 
-PKG_LICENSE:=GPL-2.0
+PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
+PKG_LICENSE:=GPL-2.0-only
 PKG_LICENSE_FILES:=COPYING
-PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org>
 
 PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
+
+PKG_BUILD_DEPENDS:=libnetfilter-acct libnetfilter-conntrack libnetfilter-log
+PKG_CONFIG_DEPENDS:= \
+       CONFIG_PACKAGE_ulogd-mod-dbi \
+       CONFIG_PACKAGE_ulogd-mod-mysql \
+       CONFIG_PACKAGE_ulogd-mod-pgsql \
+       CONFIG_PACKAGE_ulogd-mod-sqlite
 
 include $(INCLUDE_DIR)/package.mk
 
 define Package/ulogd/Default
   SECTION:=net
   CATEGORY:=Network
-  URL:=http://www.netfilter.org/projects/ulogd/index.html
+  URL:=https://www.netfilter.org/projects/ulogd/index.html
 endef
 
 define Package/ulogd
@@ -114,21 +122,10 @@ define Package/ulogd-mod-extra
   TITLE:=Extra plugins
 endef
 
-PKG_BUILD_DEPENDS:=libnetfilter-acct libnetfilter-conntrack libnetfilter-log
-
-PKG_CONFIG_DEPENDS:= \
-       CONFIG_PACKAGE_ulogd-mod-dbi \
-       CONFIG_PACKAGE_ulogd-mod-mysql \
-       CONFIG_PACKAGE_ulogd-mod-pgsql \
-       CONFIG_PACKAGE_ulogd-mod-sqlite \
-
-TARGET_CFLAGS += \
-       -D_GNU_SOURCE \
-
 CONFIGURE_ARGS += \
        --enable-nfacct \
        --enable-nfct \
-       --enable-nflog \
+       --enable-nflog
 
 ifneq ($(DEVELOPER)$(SDK)$(CONFIG_PACKAGE_ulogd-mod-dbi),)
        CONFIGURE_ARGS += --with-dbi \
@@ -192,6 +189,7 @@ ULOGD_EXTRA_PLUGINS:= \
        inppkt_UNIXSOCK \
        output_GPRINT \
        output_GRAPHITE \
+       output_IPFIX \
        output_LOGEMU \
        output_OPRINT \
 
diff --git a/net/ulogd/patches/010-json-remote.patch b/net/ulogd/patches/010-json-remote.patch
new file mode 100644 (file)
index 0000000..a250e06
--- /dev/null
@@ -0,0 +1,441 @@
+From 9d9ea2cd70a369a7f665a322e6c53631e01a2570 Mon Sep 17 00:00:00 2001
+From: Andreas Jaggi <andreas.jaggi@waterwave.ch>
+Date: Wed, 30 May 2018 22:15:36 +0200
+Subject: ulogd: json: send messages to a remote host / unix socket
+
+Extend the JSON output plugin so that the generated JSON stream can be
+sent to a remote host via TCP/UDP or to a local unix socket.
+
+Signed-off-by: Andreas Jaggi <andreas.jaggi@waterwave.ch>
+Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
+---
+ output/ulogd_output_JSON.c | 291 +++++++++++++++++++++++++++++++++++++++++----
+ ulogd.conf.in              |  11 ++
+ 2 files changed, 281 insertions(+), 21 deletions(-)
+
+diff --git a/output/ulogd_output_JSON.c b/output/ulogd_output_JSON.c
+index 4d8e3e9..6edfa90 100644
+--- a/output/ulogd_output_JSON.c
++++ b/output/ulogd_output_JSON.c
+@@ -20,10 +20,15 @@
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <unistd.h>
+ #include <string.h>
+ #include <time.h>
+ #include <errno.h>
+ #include <inttypes.h>
++#include <sys/types.h>
++#include <sys/socket.h>
++#include <sys/un.h>
++#include <netdb.h>
+ #include <ulogd/ulogd.h>
+ #include <ulogd/conffile.h>
+ #include <jansson.h>
+@@ -36,6 +41,10 @@
+ #define ULOGD_JSON_DEFAULT_DEVICE "Netfilter"
+ #endif
++#define host_ce(x)    (x->ces[JSON_CONF_HOST])
++#define port_ce(x)    (x->ces[JSON_CONF_PORT])
++#define mode_ce(x)    (x->ces[JSON_CONF_MODE])
++#define file_ce(x)    (x->ces[JSON_CONF_FILENAME])
+ #define unlikely(x) __builtin_expect((x),0)
+ struct json_priv {
+@@ -44,6 +53,15 @@ struct json_priv {
+       int usec_idx;
+       long cached_gmtoff;
+       char cached_tz[6];      /* eg +0200 */
++      int mode;
++      int sock;
++};
++
++enum json_mode {
++      JSON_MODE_FILE = 0,
++      JSON_MODE_TCP,
++      JSON_MODE_UDP,
++      JSON_MODE_UNIX
+ };
+ enum json_conf {
+@@ -53,6 +71,9 @@ enum json_conf {
+       JSON_CONF_EVENTV1,
+       JSON_CONF_DEVICE,
+       JSON_CONF_BOOLEAN_LABEL,
++      JSON_CONF_MODE,
++      JSON_CONF_HOST,
++      JSON_CONF_PORT,
+       JSON_CONF_MAX
+ };
+@@ -95,15 +116,167 @@ static struct config_keyset json_kset = {
+                       .options = CONFIG_OPT_NONE,
+                       .u = { .value = 0 },
+               },
++              [JSON_CONF_MODE] = {
++                      .key = "mode",
++                      .type = CONFIG_TYPE_STRING,
++                      .options = CONFIG_OPT_NONE,
++                      .u = { .string = "file" },
++              },
++              [JSON_CONF_HOST] = {
++                      .key = "host",
++                      .type = CONFIG_TYPE_STRING,
++                      .options = CONFIG_OPT_NONE,
++                      .u = { .string = "127.0.0.1" },
++              },
++              [JSON_CONF_PORT] = {
++                      .key = "port",
++                      .type = CONFIG_TYPE_STRING,
++                      .options = CONFIG_OPT_NONE,
++                      .u = { .string = "12345" },
++              },
+       },
+ };
++static void close_socket(struct json_priv *op) {
++      if (op->sock != -1) {
++              close(op->sock);
++              op->sock = -1;
++      }
++}
++
++static int _connect_socket_unix(struct ulogd_pluginstance *pi)
++{
++      struct json_priv *op = (struct json_priv *) &pi->private;
++      struct sockaddr_un u_addr;
++      int sfd;
++
++      close_socket(op);
++
++      ulogd_log(ULOGD_DEBUG, "connecting to unix:%s\n",
++                file_ce(pi->config_kset).u.string);
++
++      sfd = socket(AF_UNIX, SOCK_STREAM, 0);
++      if (sfd == -1) {
++              return -1;
++      }
++      u_addr.sun_family = AF_UNIX;
++      strncpy(u_addr.sun_path, file_ce(pi->config_kset).u.string,
++              sizeof(u_addr.sun_path) - 1);
++      if (connect(sfd, (struct sockaddr *) &u_addr, sizeof(struct sockaddr_un)) == -1) {
++              close(sfd);
++              return -1;
++      }
++
++      op->sock = sfd;
++
++      return 0;
++}
++
++static int _connect_socket_net(struct ulogd_pluginstance *pi)
++{
++      struct json_priv *op = (struct json_priv *) &pi->private;
++      struct addrinfo hints;
++      struct addrinfo *result, *rp;
++      int sfd, s;
++
++      close_socket(op);
++
++      ulogd_log(ULOGD_DEBUG, "connecting to %s:%s\n",
++                host_ce(pi->config_kset).u.string,
++                port_ce(pi->config_kset).u.string);
++
++      memset(&hints, 0, sizeof(struct addrinfo));
++      hints.ai_family = AF_UNSPEC;
++      hints.ai_socktype = op->mode == JSON_MODE_UDP ? SOCK_DGRAM : SOCK_STREAM;
++      hints.ai_protocol = 0;
++      hints.ai_flags = 0;
++
++      s = getaddrinfo(host_ce(pi->config_kset).u.string,
++                      port_ce(pi->config_kset).u.string, &hints, &result);
++      if (s != 0) {
++              ulogd_log(ULOGD_ERROR, "getaddrinfo: %s\n", gai_strerror(s));
++              return -1;
++      }
++
++      for (rp = result; rp != NULL; rp = rp->ai_next) {
++              int on = 1;
++
++              sfd = socket(rp->ai_family, rp->ai_socktype,
++                              rp->ai_protocol);
++              if (sfd == -1)
++                      continue;
++
++              setsockopt(sfd, SOL_SOCKET, SO_REUSEADDR,
++                         (char *) &on, sizeof(on));
++
++              if (connect(sfd, rp->ai_addr, rp->ai_addrlen) != -1)
++                      break;
++
++              close(sfd);
++      }
++
++      freeaddrinfo(result);
++
++      if (rp == NULL) {
++              return -1;
++      }
++
++      op->sock = sfd;
++
++      return 0;
++}
++
++static int _connect_socket(struct ulogd_pluginstance *pi)
++{
++      struct json_priv *op = (struct json_priv *) &pi->private;
++
++      if (op->mode == JSON_MODE_UNIX)
++              return _connect_socket_unix(pi);
++      else
++              return _connect_socket_net(pi);
++}
++
++static int json_interp_socket(struct ulogd_pluginstance *upi, char *buf, int buflen)
++{
++      struct json_priv *opi = (struct json_priv *) &upi->private;
++      int ret = 0;
++
++      if (opi->sock != -1)
++              ret = send(opi->sock, buf, buflen, MSG_NOSIGNAL);
++      free(buf);
++      if (ret != buflen) {
++              ulogd_log(ULOGD_ERROR, "Failure sending message: %s\n",
++                        strerror(errno));
++              if (ret == -1 || opi->sock == -1)
++                      return _connect_socket(upi);
++              else
++                      return ULOGD_IRET_ERR;
++      }
++
++      return ULOGD_IRET_OK;
++}
++
++static int json_interp_file(struct ulogd_pluginstance *upi, char *buf)
++{
++      struct json_priv *opi = (struct json_priv *) &upi->private;
++
++      fprintf(opi->of, "%s", buf);
++      free(buf);
++
++      if (upi->config_kset->ces[JSON_CONF_SYNC].u.value != 0)
++              fflush(opi->of);
++
++      return ULOGD_IRET_OK;
++}
++
+ #define MAX_LOCAL_TIME_STRING 38
+ static int json_interp(struct ulogd_pluginstance *upi)
+ {
+       struct json_priv *opi = (struct json_priv *) &upi->private;
+       unsigned int i;
++      char *buf;
++      int buflen;
+       json_t *msg;
+       msg = json_object();
+@@ -218,34 +391,65 @@ static int json_interp(struct ulogd_pluginstance *upi)
+               }
+       }
+-      json_dumpf(msg, opi->of, 0);
+-      fprintf(opi->of, "\n");
++      buf = json_dumps(msg, 0);
+       json_decref(msg);
++      if (buf == NULL) {
++              ulogd_log(ULOGD_ERROR, "Could not create message\n");
++              return ULOGD_IRET_ERR;
++      }
++      buflen = strlen(buf);
++      buf = realloc(buf, sizeof(char)*(buflen+2));
++      if (buf == NULL) {
++              ulogd_log(ULOGD_ERROR, "Could not create message\n");
++              return ULOGD_IRET_ERR;
++      }
++      strncat(buf, "\n", 1);
++      buflen++;
+-      if (upi->config_kset->ces[JSON_CONF_SYNC].u.value != 0)
+-              fflush(opi->of);
++      if (opi->mode == JSON_MODE_FILE)
++              return json_interp_file(upi, buf);
++      else
++              return json_interp_socket(upi, buf, buflen);
++}
+-      return ULOGD_IRET_OK;
++static void reopen_file(struct ulogd_pluginstance *upi)
++{
++      struct json_priv *oi = (struct json_priv *) &upi->private;
++      FILE *old = oi->of;
++
++      ulogd_log(ULOGD_NOTICE, "JSON: reopening logfile\n");
++      oi->of = fopen(upi->config_kset->ces[0].u.string, "a");
++      if (!oi->of) {
++              ulogd_log(ULOGD_ERROR, "can't open JSON "
++                                     "log file: %s\n",
++                        strerror(errno));
++              oi->of = old;
++      } else {
++              fclose(old);
++      }
++}
++
++static void reopen_socket(struct ulogd_pluginstance *upi)
++{
++      ulogd_log(ULOGD_NOTICE, "JSON: reopening socket\n");
++      if (_connect_socket(upi) < 0) {
++              ulogd_log(ULOGD_ERROR, "can't open JSON "
++                                     "socket: %s\n",
++                        strerror(errno));
++      }
+ }
+ static void sighup_handler_print(struct ulogd_pluginstance *upi, int signal)
+ {
+       struct json_priv *oi = (struct json_priv *) &upi->private;
+-      FILE *old = oi->of;
+       switch (signal) {
+       case SIGHUP:
+-              ulogd_log(ULOGD_NOTICE, "JSON: reopening logfile\n");
+-              oi->of = fopen(upi->config_kset->ces[0].u.string, "a");
+-              if (!oi->of) {
+-                      ulogd_log(ULOGD_ERROR, "can't open JSON "
+-                                             "log file: %s\n",
+-                                strerror(errno));
+-                      oi->of = old;
+-              } else {
+-                      fclose(old);
+-              }
++              if (oi->mode == JSON_MODE_FILE)
++                      reopen_file(upi);
++              else
++                      reopen_socket(upi);
+               break;
+       default:
+               break;
+@@ -255,6 +459,8 @@ static void sighup_handler_print(struct ulogd_pluginstance *upi, int signal)
+ static int json_configure(struct ulogd_pluginstance *upi,
+                           struct ulogd_pluginstance_stack *stack)
+ {
++      struct json_priv *op = (struct json_priv *) &upi->private;
++      char *mode_str = mode_ce(upi->config_kset).u.string;
+       int ret;
+       ret = ulogd_wildcard_inputkeys(upi);
+@@ -265,13 +471,25 @@ static int json_configure(struct ulogd_pluginstance *upi,
+       if (ret < 0)
+               return ret;
++      if (!strcasecmp(mode_str, "udp")) {
++              op->mode = JSON_MODE_UDP;
++      } else if (!strcasecmp(mode_str, "tcp")) {
++              op->mode = JSON_MODE_TCP;
++      } else if (!strcasecmp(mode_str, "unix")) {
++              op->mode = JSON_MODE_UNIX;
++      } else if (!strcasecmp(mode_str, "file")) {
++              op->mode = JSON_MODE_FILE;
++      } else {
++              ulogd_log(ULOGD_ERROR, "unknown mode '%s'\n", mode_str);
++              return -EINVAL;
++      }
++
+       return 0;
+ }
+-static int json_init(struct ulogd_pluginstance *upi)
++static int json_init_file(struct ulogd_pluginstance *upi)
+ {
+       struct json_priv *op = (struct json_priv *) &upi->private;
+-      unsigned int i;
+       op->of = fopen(upi->config_kset->ces[0].u.string, "a");
+       if (!op->of) {
+@@ -280,6 +498,27 @@ static int json_init(struct ulogd_pluginstance *upi)
+               return -1;
+       }
++      return 0;
++}
++
++static int json_init_socket(struct ulogd_pluginstance *upi)
++{
++      struct json_priv *op = (struct json_priv *) &upi->private;
++
++      if (host_ce(upi->config_kset).u.string == NULL)
++              return -1;
++      if (port_ce(upi->config_kset).u.string == NULL)
++              return -1;
++
++      op->sock = -1;
++      return _connect_socket(upi);
++}
++
++static int json_init(struct ulogd_pluginstance *upi)
++{
++      struct json_priv *op = (struct json_priv *) &upi->private;
++      unsigned int i;
++
+       /* search for time */
+       op->sec_idx = -1;
+       op->usec_idx = -1;
+@@ -293,15 +532,25 @@ static int json_init(struct ulogd_pluginstance *upi)
+       *op->cached_tz = '\0';
+-      return 0;
++      if (op->mode == JSON_MODE_FILE)
++              return json_init_file(upi);
++      else
++              return json_init_socket(upi);
++}
++
++static void close_file(FILE *of) {
++      if (of != stdout)
++              fclose(of);
+ }
+ static int json_fini(struct ulogd_pluginstance *pi)
+ {
+       struct json_priv *op = (struct json_priv *) &pi->private;
+-      if (op->of != stdout)
+-              fclose(op->of);
++      if (op->mode == JSON_MODE_FILE)
++              close_file(op->of);
++      else
++              close_socket(op);
+       return 0;
+ }
+diff --git a/ulogd.conf.in b/ulogd.conf.in
+index 62222db..99cfc24 100644
+--- a/ulogd.conf.in
++++ b/ulogd.conf.in
+@@ -213,6 +213,17 @@ sync=1
+ # Uncomment the following line to use JSON v1 event format that
+ # can provide better compatility with some JSON file reader.
+ #eventv1=1
++# Uncomment the following lines to send the JSON logs to a remote host via UDP
++#mode="udp"
++#host="192.0.2.10"
++#port="10210"
++# Uncomment the following lines to send the JSON logs to a remote host via TCP
++#mode="tcp"
++#host="192.0.2.10"
++#port="10210"
++# Uncomment the following lines to send the JSON logs to a local unix socket
++#mode="unix"
++#file="/var/run/ulogd.socket"
+ [pcap1]
+ #default file is /var/log/ulogd.pcap
+-- 
+cgit v1.2.1
+
diff --git a/net/ulogd/patches/020-fix-musl.patch b/net/ulogd/patches/020-fix-musl.patch
new file mode 100644 (file)
index 0000000..592429a
--- /dev/null
@@ -0,0 +1,29 @@
+From 675e762091380590f78ff07a94a25caa459b786b Mon Sep 17 00:00:00 2001
+From: Cameron Norman <camerontnorman@gmail.com>
+Date: Sat, 27 Oct 2018 13:05:45 -0700
+Subject: ulogd: fix build with musl libc
+
+The attached patch fixes building ulogd2 with musl libc. It is being
+used on Void Linux right now.
+
+Closes: https://bugzilla.netfilter.org/show_bug.cgi?id=1278
+Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
+---
+ src/ulogd.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/ulogd.c b/src/ulogd.c
+index b8bc57c..9cd64e8 100644
+--- a/src/ulogd.c
++++ b/src/ulogd.c
+@@ -65,6 +65,7 @@
+ #include <sys/time.h>
+ #include <sys/stat.h>
+ #include <sched.h>
++#include <limits.h>
+ #include <ulogd/conffile.h>
+ #include <ulogd/ulogd.h>
+ #ifdef DEBUG
+-- 
+cgit v1.2.1
+
diff --git a/net/ulogd/patches/030-ipfix-add.patch b/net/ulogd/patches/030-ipfix-add.patch
new file mode 100644 (file)
index 0000000..ec42c66
--- /dev/null
@@ -0,0 +1,879 @@
+From 4f639231c83b09ea004c03e95c702b7750bf9930 Mon Sep 17 00:00:00 2001
+From: Ander Juaristi <a@juaristi.eus>
+Date: Fri, 26 Apr 2019 09:58:06 +0200
+Subject: IPFIX: Add IPFIX output plugin
+
+This patch adds an IPFIX output plugin to ulogd2. It generates NetFlow/IPFIX
+traces and sends them to a remote server (collector) via TCP or UDP.
+
+Based on original work by Holger Eitzenberger <holger@eitzenberger.org>.
+
+How to test this
+----------------
+
+I am currently testing this with the NFCT input and Wireshark.
+
+Place the following in ulogd.conf:
+
+      # this will print all flows on screen
+      loglevel=1
+
+      # load NFCT and IPFIX plugins
+      plugin="/lib/ulogd/ulogd_inpflow_NFCT.so"
+      plugin="/lib/ulogd/ulogd_output_IPFIX.so"
+
+      stack=ct1:NFCT,ipfix1:IPFIX
+
+      [ct1]
+      netlink_socket_buffer_size=217088
+      netlink_socket_buffer_maxsize=1085440
+      accept_proto_filter=tcp,sctp
+
+      [ipfix1]
+      oid=1
+      host="127.0.0.1"
+      #port=4739
+      #send_template="once"
+
+I am currently testing it by launching a plain NetCat listener on port
+4739 (the default for IPFIX) and then running Wireshark and see that it
+dissects the IPFIX/NetFlow traffic correctly (obviously this relies on
+the Wireshark NetFlow dissector being correct).
+
+First:
+
+      nc -vvvv -l 127.0.0.1 4739
+
+Then:
+
+      sudo ulogd -vc ulogd.conf
+
+Signed-off-by: Ander Juaristi <a@juaristi.eus>
+Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
+---
+ configure.ac                      |   2 +-
+ include/ulogd/ulogd.h             |   5 +
+ input/flow/ulogd_inpflow_IPFIX.c  |   2 -
+ output/Makefile.am                |   2 +-
+ output/ipfix/Makefile.am          |   7 +
+ output/ipfix/ipfix.c              | 141 ++++++++++
+ output/ipfix/ipfix.h              |  89 +++++++
+ output/ipfix/ulogd_output_IPFIX.c | 503 +++++++++++++++++++++++++++++++++++
+ output/ulogd_output_IPFIX.c       | 546 --------------------------------------
+ 9 files changed, 747 insertions(+), 550 deletions(-)
+ delete mode 100644 input/flow/ulogd_inpflow_IPFIX.c
+ create mode 100644 output/ipfix/Makefile.am
+ create mode 100644 output/ipfix/ipfix.c
+ create mode 100644 output/ipfix/ipfix.h
+ create mode 100644 output/ipfix/ulogd_output_IPFIX.c
+ delete mode 100644 output/ulogd_output_IPFIX.c
+
+diff --git a/configure.ac b/configure.ac
+index 3aa0624..48b4995 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -179,7 +179,7 @@ AC_CONFIG_FILES(include/Makefile include/ulogd/Makefile include/libipulog/Makefi
+         input/sum/Makefile \
+         filter/Makefile filter/raw2packet/Makefile filter/packet2flow/Makefile \
+         output/Makefile output/pcap/Makefile output/mysql/Makefile output/pgsql/Makefile output/sqlite3/Makefile \
+-        output/dbi/Makefile \
++        output/dbi/Makefile output/ipfix/Makefile \
+         src/Makefile Makefile Rules.make)
+ AC_OUTPUT
+diff --git a/include/ulogd/ulogd.h b/include/ulogd/ulogd.h
+index 2e38195..1636a8c 100644
+--- a/include/ulogd/ulogd.h
++++ b/include/ulogd/ulogd.h
+@@ -28,6 +28,11 @@
+ /* types without length */
+ #define ULOGD_RET_NONE                0x0000
++#define __packed              __attribute__((packed))
++#define __noreturn            __attribute__((noreturn))
++#define __cold                        __attribute__((cold))
++
++#define __packed              __attribute__((packed))
+ #define ULOGD_RET_INT8                0x0001
+ #define ULOGD_RET_INT16               0x0002
+diff --git a/output/Makefile.am b/output/Makefile.am
+index ff851ad..7ba8217 100644
+--- a/output/Makefile.am
++++ b/output/Makefile.am
+@@ -2,7 +2,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/include ${LIBNETFILTER_ACCT_CFLAGS} \
+               ${LIBNETFILTER_CONNTRACK_CFLAGS} ${LIBNETFILTER_LOG_CFLAGS}
+ AM_CFLAGS = ${regular_CFLAGS}
+-SUBDIRS= pcap mysql pgsql sqlite3 dbi
++SUBDIRS= pcap mysql pgsql sqlite3 dbi ipfix
+ pkglib_LTLIBRARIES = ulogd_output_LOGEMU.la ulogd_output_SYSLOG.la \
+                        ulogd_output_OPRINT.la ulogd_output_GPRINT.la \
+diff --git a/output/ipfix/Makefile.am b/output/ipfix/Makefile.am
+new file mode 100644
+index 0000000..cacda26
+--- /dev/null
++++ b/output/ipfix/Makefile.am
+@@ -0,0 +1,7 @@
++AM_CPPFLAGS = -I$(top_srcdir)/include
++AM_CFLAGS = $(regular_CFLAGS)
++
++pkglib_LTLIBRARIES = ulogd_output_IPFIX.la
++
++ulogd_output_IPFIX_la_SOURCES = ulogd_output_IPFIX.c ipfix.c
++ulogd_output_IPFIX_la_LDFLAGS = -avoid-version -module
+diff --git a/output/ipfix/ipfix.c b/output/ipfix/ipfix.c
+new file mode 100644
+index 0000000..60a4c7f
+--- /dev/null
++++ b/output/ipfix/ipfix.c
+@@ -0,0 +1,141 @@
++/*
++ * ipfix.c
++ *
++ * Holger Eitzenberger, 2009.
++ */
++
++/* These forward declarations are needed since ulogd.h doesn't like to be the first */
++#include <ulogd/linuxlist.h>
++
++#define __packed              __attribute__((packed))
++
++#include "ipfix.h"
++
++#include <ulogd/ulogd.h>
++#include <ulogd/common.h>
++
++struct ipfix_msg *ipfix_msg_alloc(size_t len, uint32_t oid)
++{
++      struct ipfix_msg *msg;
++      struct ipfix_hdr *hdr;
++
++      if (len < IPFIX_HDRLEN + IPFIX_SET_HDRLEN)
++              return NULL;
++
++      msg = malloc(sizeof(struct ipfix_msg) + len);
++      memset(msg, 0, sizeof(struct ipfix_msg));
++      msg->tail = msg->data + IPFIX_HDRLEN;
++      msg->end = msg->data + len;
++
++      hdr = ipfix_msg_hdr(msg);
++      memset(hdr, 0, IPFIX_HDRLEN);
++      hdr->version = htons(IPFIX_VERSION);
++      hdr->oid = htonl(oid);
++
++      return msg;
++}
++
++void ipfix_msg_free(struct ipfix_msg *msg)
++{
++      if (!msg)
++              return;
++
++      if (msg->nrecs > 0)
++              ulogd_log(ULOGD_DEBUG, "%s: %d flows have been lost\n", __func__,
++                      msg->nrecs);
++
++      free(msg);
++}
++
++struct ipfix_hdr *ipfix_msg_hdr(const struct ipfix_msg *msg)
++{
++      return (struct ipfix_hdr *)msg->data;
++}
++
++void *ipfix_msg_data(struct ipfix_msg *msg)
++{
++      return msg->data;
++}
++
++size_t ipfix_msg_len(const struct ipfix_msg *msg)
++{
++      return msg->tail - msg->data;
++}
++
++struct ipfix_set_hdr *ipfix_msg_add_set(struct ipfix_msg *msg, uint16_t sid)
++{
++      struct ipfix_set_hdr *shdr;
++
++      if (msg->end - msg->tail < (int) IPFIX_SET_HDRLEN)
++              return NULL;
++
++      shdr = (struct ipfix_set_hdr *)msg->tail;
++      shdr->id = sid;
++      shdr->len = IPFIX_SET_HDRLEN;
++      msg->tail += IPFIX_SET_HDRLEN;
++      msg->last_set = shdr;
++      return shdr;
++}
++
++struct ipfix_set_hdr *ipfix_msg_get_set(const struct ipfix_msg *msg)
++{
++      return msg->last_set;
++}
++
++/**
++ * Add data record to an IPFIX message.  The data is accounted properly.
++ *
++ * @return pointer to data or %NULL if not that much space left.
++ */
++void *ipfix_msg_add_data(struct ipfix_msg *msg, size_t len)
++{
++      void *data;
++
++      if (!msg->last_set) {
++              ulogd_log(ULOGD_FATAL, "msg->last_set is NULL\n");
++              return NULL;
++      }
++
++      if ((ssize_t) len > msg->end - msg->tail)
++              return NULL;
++
++      data = msg->tail;
++      msg->tail += len;
++      msg->nrecs++;
++      msg->last_set->len += len;
++
++      return data;
++}
++
++/* check and dump message */
++int ipfix_dump_msg(const struct ipfix_msg *msg)
++{
++      const struct ipfix_hdr *hdr = ipfix_msg_hdr(msg);
++      const struct ipfix_set_hdr *shdr = (struct ipfix_set_hdr *) hdr->data;
++
++      if (ntohs(hdr->len) < IPFIX_HDRLEN) {
++              ulogd_log(ULOGD_FATAL, "Invalid IPFIX message header length\n");
++              return -1;
++      }
++      if (ipfix_msg_len(msg) != IPFIX_HDRLEN + ntohs(shdr->len)) {
++              ulogd_log(ULOGD_FATAL, "Invalid IPFIX message length\n");
++              return -1;
++      }
++
++      ulogd_log(ULOGD_DEBUG, "msg: ver=%#x len=%#x t=%#x seq=%#x oid=%d\n",
++                        ntohs(hdr->version), ntohs(hdr->len), htonl(hdr->time),
++                        ntohl(hdr->seqno), ntohl(hdr->oid));
++
++      return 0;
++}
++
++/* template management */
++size_t ipfix_rec_len(uint16_t sid)
++{
++      if (sid != htons(VY_IPFIX_SID)) {
++              ulogd_log(ULOGD_FATAL, "Invalid SID\n");
++              return 0;
++      }
++
++      return sizeof(struct vy_ipfix_data);
++}
+diff --git a/output/ipfix/ipfix.h b/output/ipfix/ipfix.h
+new file mode 100644
+index 0000000..cdb5a6f
+--- /dev/null
++++ b/output/ipfix/ipfix.h
+@@ -0,0 +1,89 @@
++/*
++ * ipfix.h
++ *
++ * Holger Eitzenberger <holger@eitzenberger.org>, 2009.
++ */
++#ifndef IPFIX_H
++#define IPFIX_H
++
++#include <stdint.h>
++#include <netinet/in.h>
++
++
++struct ipfix_hdr {
++#define IPFIX_VERSION                 0xa
++      uint16_t version;
++      uint16_t len;
++      uint32_t time;
++      uint32_t seqno;
++      uint32_t oid;                           /* Observation Domain ID */
++      uint8_t data[];
++} __packed;
++
++#define IPFIX_HDRLEN  sizeof(struct ipfix_hdr)
++
++/*
++ * IDs 0-255 are reserved for Template Sets.  IDs of Data Sets are > 255.
++ */
++struct ipfix_templ_hdr {
++      uint16_t id;
++      uint16_t cnt;
++      uint8_t data[];
++} __packed;
++
++struct ipfix_set_hdr {
++#define IPFIX_SET_TEMPL                       2
++#define IPFIX_SET_OPT_TEMPL           3
++      uint16_t id;
++      uint16_t len;
++      uint8_t data[];
++} __packed;
++
++#define IPFIX_SET_HDRLEN              sizeof(struct ipfix_set_hdr)
++
++struct ipfix_msg {
++      struct llist_head link;
++      uint8_t *tail;
++      uint8_t *end;
++      unsigned nrecs;
++      struct ipfix_set_hdr *last_set;
++      uint8_t data[];
++};
++
++struct vy_ipfix_data {
++      struct in_addr saddr;
++      struct in_addr daddr;
++      uint16_t ifi_in;
++      uint16_t ifi_out;
++      uint32_t packets;
++      uint32_t bytes;
++      uint32_t start;                         /* Unix time */
++      uint32_t end;                           /* Unix time */
++      uint16_t sport;
++      uint16_t dport;
++      uint32_t aid;                           /* Application ID */
++      uint8_t l4_proto;
++      uint8_t dscp;
++      uint16_t __padding;
++} __packed;
++
++#define VY_IPFIX_SID          256
++
++#define VY_IPFIX_FLOWS                36
++#define VY_IPFIX_PKT_LEN      (IPFIX_HDRLEN + IPFIX_SET_HDRLEN \
++                                                       + VY_IPFIX_FLOWS * sizeof(struct vy_ipfix_data))
++
++/* template management */
++size_t ipfix_rec_len(uint16_t);
++
++/* message handling */
++struct ipfix_msg *ipfix_msg_alloc(size_t, uint32_t);
++void ipfix_msg_free(struct ipfix_msg *);
++struct ipfix_hdr *ipfix_msg_hdr(const struct ipfix_msg *);
++size_t ipfix_msg_len(const struct ipfix_msg *);
++void *ipfix_msg_data(struct ipfix_msg *);
++struct ipfix_set_hdr *ipfix_msg_add_set(struct ipfix_msg *, uint16_t);
++void *ipfix_msg_add_data(struct ipfix_msg *, size_t);
++int ipfix_dump_msg(const struct ipfix_msg *);
++
++#endif /* IPFIX_H */
+diff --git a/output/ipfix/ulogd_output_IPFIX.c b/output/ipfix/ulogd_output_IPFIX.c
+new file mode 100644
+index 0000000..ec143b1
+--- /dev/null
++++ b/output/ipfix/ulogd_output_IPFIX.c
+@@ -0,0 +1,503 @@
++/*
++ * ulogd_output_IPFIX.c
++ *
++ * ulogd IPFIX Exporter plugin.
++ *
++ * 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, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
++ *
++ * Holger Eitzenberger <holger@eitzenberger.org>  Astaro AG 2009
++ */
++#include <unistd.h>
++#include <time.h>
++#include <sys/types.h>
++#include <sys/socket.h>
++#include <arpa/inet.h>
++#include <netdb.h>
++#include <ulogd/ulogd.h>
++#include <ulogd/common.h>
++
++#include "ipfix.h"
++
++#define DEFAULT_MTU           512 /* RFC 5101, 10.3.3 */
++#define DEFAULT_PORT          4739 /* RFC 5101, 10.3.4 */
++#define DEFAULT_SPORT         4740
++
++enum {
++      OID_CE = 0,
++      HOST_CE,
++      PORT_CE,
++      PROTO_CE,
++      MTU_CE,
++};
++
++#define oid_ce(x)     (x->ces[OID_CE])
++#define host_ce(x)    (x->ces[HOST_CE])
++#define port_ce(x)    (x->ces[PORT_CE])
++#define proto_ce(x)   (x->ces[PROTO_CE])
++#define mtu_ce(x)     (x->ces[MTU_CE])
++
++static const struct config_keyset ipfix_kset = {
++      .num_ces = 5,
++      .ces = {
++              {
++                      .key = "oid",
++                      .type = CONFIG_TYPE_INT,
++                      .u.value = 0
++              },
++              {
++                      .key = "host",
++                      .type = CONFIG_TYPE_STRING,
++                      .u.string = ""
++              },
++              {
++                      .key = "port",
++                      .type = CONFIG_TYPE_INT,
++                      .u.value = DEFAULT_PORT
++              },
++              {
++                      .key = "proto",
++                      .type = CONFIG_TYPE_STRING,
++                      .u.string = "tcp"
++              },
++              {
++                      .key = "mtu",
++                      .type = CONFIG_TYPE_INT,
++                      .u.value = DEFAULT_MTU
++              }
++      }
++};
++
++struct ipfix_templ {
++      struct ipfix_templ *next;
++};
++
++struct ipfix_priv {
++      struct ulogd_fd ufd;
++      uint32_t seqno;
++      struct ipfix_msg *msg;          /* current message */
++      struct llist_head list;
++      struct ipfix_templ *templates;
++      int proto;
++      struct ulogd_timer timer;
++      struct sockaddr_in sa;
++};
++
++enum {
++      InIpSaddr = 0,
++      InIpDaddr,
++      InRawInPktCount,
++      InRawInPktLen,
++      InRawOutPktCount,
++      InRawOutPktLen,
++      InFlowStartSec,
++      InFlowStartUsec,
++      InFlowEndSec,
++      InFlowEndUsec,
++      InL4SPort,
++      InL4DPort,
++      InIpProto,
++      InCtMark
++};
++
++static struct ulogd_key ipfix_in_keys[] = {
++              [InIpSaddr] = {
++                      .type = ULOGD_RET_IPADDR,
++                      .name = "orig.ip.saddr"
++              },
++              [InIpDaddr] = {
++                      .type = ULOGD_RET_IPADDR,
++                      .name = "orig.ip.daddr"
++              },
++              [InRawInPktCount] = {
++                      .type = ULOGD_RET_UINT64,
++                      .name = "orig.raw.pktcount"
++              },
++              [InRawInPktLen] = {
++                      .type = ULOGD_RET_UINT64,
++                      .name = "orig.raw.pktlen"
++              },
++              [InRawOutPktCount] = {
++                      .type = ULOGD_RET_UINT64,
++                      .name = "reply.raw.pktcount"
++              },
++              [InRawOutPktLen] = {
++                      .type = ULOGD_RET_UINT64,
++                      .name = "reply.raw.pktlen"
++              },
++              [InFlowStartSec] = {
++                      .type = ULOGD_RET_UINT32,
++                      .name = "flow.start.sec"
++              },
++              [InFlowStartUsec] = {
++                      .type = ULOGD_RET_UINT32,
++                      .name = "flow.start.usec"
++              },
++              [InFlowEndSec] = {
++                      .type = ULOGD_RET_UINT32,
++                      .name = "flow.end.sec"
++              },
++              [InFlowEndUsec] = {
++                      .type = ULOGD_RET_UINT32,
++                      .name = "flow.end.usec"
++              },
++              [InL4SPort] = {
++                      .type = ULOGD_RET_UINT16,
++                      .name = "orig.l4.sport"
++              },
++              [InL4DPort] = {
++                      .type = ULOGD_RET_UINT16,
++                      .name = "orig.l4.dport"
++              },
++              [InIpProto] = {
++                      .type = ULOGD_RET_UINT8,
++                      .name = "orig.ip.protocol"
++              },
++              [InCtMark] = {
++                      .type = ULOGD_RET_UINT32,
++                      .name = "ct.mark"
++              }
++};
++
++/* do some polishing and enqueue it */
++static void enqueue_msg(struct ipfix_priv *priv, struct ipfix_msg *msg)
++{
++      struct ipfix_hdr *hdr = ipfix_msg_data(msg);
++
++      if (!msg)
++              return;
++
++      hdr->time = htonl(time(NULL));
++      hdr->seqno = htonl(priv->seqno += msg->nrecs);
++      if (msg->last_set) {
++              msg->last_set->id = htons(msg->last_set->id);
++              msg->last_set->len = htons(msg->last_set->len);
++              msg->last_set = NULL;
++      }
++      hdr->len = htons(ipfix_msg_len(msg));
++
++      llist_add(&msg->link, &priv->list);
++}
++
++/**
++ * @return %ULOGD_IRET_OK or error value
++ */
++static int send_msgs(struct ulogd_pluginstance *pi)
++{
++      struct ipfix_priv *priv = (struct ipfix_priv *) &pi->private;
++      struct llist_head *curr, *tmp;
++      struct ipfix_msg *msg;
++      int ret = ULOGD_IRET_OK, sent;
++
++      llist_for_each_prev(curr, &priv->list) {
++              msg = llist_entry(curr, struct ipfix_msg, link);
++
++              sent = send(priv->ufd.fd, ipfix_msg_data(msg), ipfix_msg_len(msg), 0);
++              if (sent < 0) {
++                      ulogd_log(ULOGD_ERROR, "send: %m\n");
++                      ret = ULOGD_IRET_ERR;
++                      goto done;
++              }
++
++              /* TODO handle short send() for other protocols */
++              if ((size_t) sent < ipfix_msg_len(msg))
++                      ulogd_log(ULOGD_ERROR, "short send: %d < %d\n",
++                                      sent, ipfix_msg_len(msg));
++      }
++
++      llist_for_each_safe(curr, tmp, &priv->list) {
++              msg = llist_entry(curr, struct ipfix_msg, link);
++              llist_del(curr);
++              msg->nrecs = 0;
++              ipfix_msg_free(msg);
++      }
++
++done:
++      return ret;
++}
++
++static int ipfix_ufd_cb(int fd, unsigned what, void *arg)
++{
++      struct ulogd_pluginstance *pi = arg;
++      struct ipfix_priv *priv = (struct ipfix_priv *) pi->private;
++      ssize_t nread;
++      char buf[16];
++
++      if (what & ULOGD_FD_READ) {
++              nread = recv(priv->ufd.fd, buf, sizeof(buf), MSG_DONTWAIT);
++              if (nread < 0) {
++                      ulogd_log(ULOGD_ERROR, "recv: %m\n");
++              } else if (!nread) {
++                      ulogd_log(ULOGD_INFO, "connection reset by peer\n");
++                      ulogd_unregister_fd(&priv->ufd);
++              } else
++                      ulogd_log(ULOGD_INFO, "unexpected data (%d bytes)\n", nread);
++      }
++
++      return 0;
++}
++
++static void ipfix_timer_cb(struct ulogd_timer *t, void *data)
++{
++      struct ulogd_pluginstance *pi = data;
++      struct ipfix_priv *priv = (struct ipfix_priv *) &pi->private;
++
++      if (priv->msg && priv->msg->nrecs > 0) {
++              enqueue_msg(priv, priv->msg);
++              priv->msg = NULL;
++              send_msgs(pi);
++      }
++}
++
++static int ipfix_configure(struct ulogd_pluginstance *pi, struct ulogd_pluginstance_stack *stack)
++{
++      struct ipfix_priv *priv = (struct ipfix_priv *) &pi->private;
++      int oid, port, mtu, ret;
++      char *host, *proto;
++      char addr[16];
++
++      ret = config_parse_file(pi->id, pi->config_kset);
++      if (ret < 0)
++              return ret;
++
++      oid = oid_ce(pi->config_kset).u.value;
++      host = host_ce(pi->config_kset).u.string;
++      port = port_ce(pi->config_kset).u.value;
++      proto = proto_ce(pi->config_kset).u.string;
++      mtu = mtu_ce(pi->config_kset).u.value;
++
++      if (!oid) {
++              ulogd_log(ULOGD_FATAL, "invalid Observation ID\n");
++              return ULOGD_IRET_ERR;
++      }
++      if (!host || !strcmp(host, "")) {
++              ulogd_log(ULOGD_FATAL, "no destination host specified\n");
++              return ULOGD_IRET_ERR;
++      }
++
++      if (!strcmp(proto, "udp")) {
++              priv->proto = IPPROTO_UDP;
++      } else if (!strcmp(proto, "tcp")) {
++              priv->proto = IPPROTO_TCP;
++      } else {
++              ulogd_log(ULOGD_FATAL, "unsupported protocol '%s'\n", proto);
++              return ULOGD_IRET_ERR;
++      }
++
++      memset(&priv->sa, 0, sizeof(priv->sa));
++      priv->sa.sin_family = AF_INET;
++      priv->sa.sin_port = htons(port);
++      ret = inet_pton(AF_INET, host, &priv->sa.sin_addr);
++      if (ret <= 0) {
++              ulogd_log(ULOGD_FATAL, "inet_pton: %m\n");
++              return ULOGD_IRET_ERR;
++      }
++
++      INIT_LLIST_HEAD(&priv->list);
++
++      ulogd_init_timer(&priv->timer, pi, ipfix_timer_cb);
++
++      ulogd_log(ULOGD_INFO, "using IPFIX Collector at %s:%d (MTU %d)\n",
++                inet_ntop(AF_INET, &priv->sa.sin_addr, addr, sizeof(addr)),
++                port, mtu);
++
++      return ULOGD_IRET_OK;
++}
++
++static int tcp_connect(struct ulogd_pluginstance *pi)
++{
++      struct ipfix_priv *priv = (struct ipfix_priv *) &pi->private;
++      int ret = ULOGD_IRET_ERR;
++
++      if ((priv->ufd.fd = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
++              ulogd_log(ULOGD_FATAL, "socket: %m\n");
++              return ULOGD_IRET_ERR;
++      }
++
++      if (connect(priv->ufd.fd, (struct sockaddr *) &priv->sa, sizeof(priv->sa)) < 0) {
++              ulogd_log(ULOGD_ERROR, "connect: %m\n");
++              ret = ULOGD_IRET_ERR;
++              goto err_close;
++      }
++
++      return ULOGD_IRET_OK;
++
++err_close:
++      close(priv->ufd.fd);
++      return ret;
++}
++
++static int udp_connect(struct ulogd_pluginstance *pi)
++{
++      struct ipfix_priv *priv = (struct ipfix_priv *) &pi->private;
++
++      if ((priv->ufd.fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
++              ulogd_log(ULOGD_FATAL, "socket: %m\n");
++              return ULOGD_IRET_ERR;
++      }
++
++      if (connect(priv->ufd.fd, (struct sockaddr *) &priv->sa, sizeof(priv->sa)) < 0) {
++              ulogd_log(ULOGD_ERROR, "connect: %m\n");
++              return ULOGD_IRET_ERR;
++      }
++
++      return 0;
++}
++
++static int ipfix_start(struct ulogd_pluginstance *pi)
++{
++      struct ipfix_priv *priv = (struct ipfix_priv *) &pi->private;
++      char addr[16];
++      int port, ret;
++
++      switch (priv->proto) {
++      case IPPROTO_UDP:
++              if ((ret = udp_connect(pi)) < 0)
++                      return ret;
++              break;
++      case IPPROTO_TCP:
++              if ((ret = tcp_connect(pi)) < 0)
++                      return ret;
++              break;
++
++      default:
++              break;
++      }
++
++      priv->seqno = 0;
++
++      port = port_ce(pi->config_kset).u.value;
++      ulogd_log(ULOGD_INFO, "connected to %s:%d\n",
++                      inet_ntop(AF_INET, &priv->sa.sin_addr, addr, sizeof(addr)),
++                      port);
++
++      /* Register the socket FD */
++      priv->ufd.when = ULOGD_FD_READ;
++      priv->ufd.cb = ipfix_ufd_cb;
++      priv->ufd.data = pi;
++
++      if (ulogd_register_fd(&priv->ufd) < 0)
++              return ULOGD_IRET_ERR;
++
++      /* Add a 1 second timer */
++      ulogd_add_timer(&priv->timer, 1);
++
++      return ULOGD_IRET_OK;
++}
++
++static int ipfix_stop(struct ulogd_pluginstance *pi)
++{
++      struct ipfix_priv *priv = (struct ipfix_priv *) &pi->private;
++
++      ulogd_unregister_fd(&priv->ufd);
++      close(priv->ufd.fd);
++      priv->ufd.fd = -1;
++
++      ulogd_del_timer(&priv->timer);
++
++      ipfix_msg_free(priv->msg);
++      priv->msg = NULL;
++
++      return 0;
++}
++
++static int ipfix_interp(struct ulogd_pluginstance *pi)
++{
++      struct ipfix_priv *priv = (struct ipfix_priv *) &pi->private;
++      struct vy_ipfix_data *data;
++      int oid, mtu, ret;
++      char addr[16];
++
++      if (!(GET_FLAGS(pi->input.keys, InIpSaddr) & ULOGD_RETF_VALID))
++              return ULOGD_IRET_OK;
++
++      oid = oid_ce(pi->config_kset).u.value;
++      mtu = mtu_ce(pi->config_kset).u.value;
++
++again:
++      if (!priv->msg) {
++              priv->msg = ipfix_msg_alloc(mtu, oid);
++              if (!priv->msg) {
++                      /* just drop this flow */
++                      ulogd_log(ULOGD_ERROR, "out of memory, dropping flow\n");
++                      return ULOGD_IRET_OK;
++              }
++              ipfix_msg_add_set(priv->msg, VY_IPFIX_SID);
++      }
++
++      data = ipfix_msg_add_data(priv->msg, sizeof(struct vy_ipfix_data));
++      if (!data) {
++              enqueue_msg(priv, priv->msg);
++              priv->msg = NULL;
++              /* can't loop because the next will definitely succeed */
++              goto again;
++      }
++
++      data->ifi_in = data->ifi_out = 0;
++
++      data->saddr.s_addr = ikey_get_u32(&pi->input.keys[InIpSaddr]);
++      data->daddr.s_addr = ikey_get_u32(&pi->input.keys[InIpDaddr]);
++
++      data->packets = htonl((uint32_t) (ikey_get_u64(&pi->input.keys[InRawInPktCount])
++                                              + ikey_get_u64(&pi->input.keys[InRawOutPktCount])));
++      data->bytes = htonl((uint32_t) (ikey_get_u64(&pi->input.keys[InRawInPktLen])
++                                              + ikey_get_u64(&pi->input.keys[InRawOutPktLen])));
++
++      data->start = htonl(ikey_get_u32(&pi->input.keys[InFlowStartSec]));
++      data->end = htonl(ikey_get_u32(&pi->input.keys[InFlowEndSec]));
++
++      if (GET_FLAGS(pi->input.keys, InL4SPort) & ULOGD_RETF_VALID) {
++              data->sport = htons(ikey_get_u16(&pi->input.keys[InL4SPort]));
++              data->dport = htons(ikey_get_u16(&pi->input.keys[InL4DPort]));
++      }
++
++      data->aid = 0;
++      if (GET_FLAGS(pi->input.keys, InCtMark) & ULOGD_RETF_VALID)
++              data->aid = htonl(ikey_get_u32(&pi->input.keys[InCtMark]));
++
++      data->l4_proto = ikey_get_u8(&pi->input.keys[InIpProto]);
++      data->__padding = 0;
++
++      ulogd_log(ULOGD_DEBUG, "Got new packet (packets = %u, bytes = %u, flow = (%u, %u), saddr = %s, daddr = %s, sport = %u, dport = %u)\n",
++                      ntohl(data->packets), ntohl(data->bytes), ntohl(data->start), ntohl(data->end),
++                      inet_ntop(AF_INET, &data->saddr.s_addr, addr, sizeof(addr)),
++                      inet_ntop(AF_INET, &data->daddr.s_addr, addr, sizeof(addr)),
++                      ntohs(data->sport), ntohs(data->dport));
++
++      if ((ret = send_msgs(pi)) < 0)
++              return ret;
++
++      return ULOGD_IRET_OK;
++}
++
++static struct ulogd_plugin ipfix_plugin = {
++      .name = "IPFIX",
++      .input = {
++              .keys = ipfix_in_keys,
++              .num_keys = ARRAY_SIZE(ipfix_in_keys),
++              .type = ULOGD_DTYPE_PACKET | ULOGD_DTYPE_FLOW | ULOGD_DTYPE_SUM
++      },
++      .output = {
++              .type = ULOGD_DTYPE_SINK
++      },
++      .config_kset = (struct config_keyset *) &ipfix_kset,
++      .priv_size = sizeof(struct ipfix_priv),
++      .configure = ipfix_configure,
++      .start = ipfix_start,
++      .stop = ipfix_stop,
++      .interp = ipfix_interp,
++      .version = VERSION,
++};
++
++void __attribute__ ((constructor)) init(void);
++
++void init(void)
++{
++      ulogd_register_plugin(&ipfix_plugin);
++}
+-- 
+cgit v1.2.1
+
diff --git a/net/ulogd/patches/040-ipfix-template.patch b/net/ulogd/patches/040-ipfix-template.patch
new file mode 100644 (file)
index 0000000..c6ac601
--- /dev/null
@@ -0,0 +1,432 @@
+From cc919f7013d2d76c8bef0b9c562c1faf98a095a3 Mon Sep 17 00:00:00 2001
+From: Ander Juaristi <a@juaristi.eus>
+Date: Fri, 26 Apr 2019 09:58:07 +0200
+Subject: IPFIX: Introduce template record support
+
+This commit adds the ability to send template records
+to the remote collector.
+
+In addition, it also introduces a new
+configuration parameter 'send_template', which tells when template
+records should be sent. It accepts the following string values:
+
+ - "once": Send the template record only the first time (might be coalesced
+    with data records).
+ - "always": Send the template record always, with every data record that is sent
+    to the collector (multiple data records might be sent together).
+ - "never": Assume the collector knows the schema already. Do not send template records.
+
+If omitted, the default value for 'send_template' is "once".
+
+Signed-off-by: Ander Juaristi <a@juaristi.eus>
+Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
+---
+ include/ulogd/ipfix_protocol.h    |  1 +
+ output/ipfix/ipfix.c              | 97 +++++++++++++++++++++++++++++++++++++--
+ output/ipfix/ipfix.h              | 22 ++++-----
+ output/ipfix/ulogd_output_IPFIX.c | 56 ++++++++++++----------
+ 4 files changed, 139 insertions(+), 37 deletions(-)
+
+diff --git a/include/ulogd/ipfix_protocol.h b/include/ulogd/ipfix_protocol.h
+index aef47f0..01dd96a 100644
+--- a/include/ulogd/ipfix_protocol.h
++++ b/include/ulogd/ipfix_protocol.h
+@@ -129,6 +129,7 @@ enum {
+       /* reserved */
+       IPFIX_fragmentOffsetIPv4        = 88,
+       /* reserved */
++      IPFIX_applicationId             = 95,
+       IPFIX_bgpNextAdjacentAsNumber   = 128,
+       IPFIX_bgpPrevAdjacentAsNumber   = 129,
+       IPFIX_exporterIPv4Address       = 130,
+diff --git a/output/ipfix/ipfix.c b/output/ipfix/ipfix.c
+index 60a4c7f..4bb432a 100644
+--- a/output/ipfix/ipfix.c
++++ b/output/ipfix/ipfix.c
+@@ -2,6 +2,7 @@
+  * ipfix.c
+  *
+  * Holger Eitzenberger, 2009.
++ * Ander Juaristi, 2019
+  */
+ /* These forward declarations are needed since ulogd.h doesn't like to be the first */
+@@ -13,25 +14,107 @@
+ #include <ulogd/ulogd.h>
+ #include <ulogd/common.h>
++#include <ulogd/ipfix_protocol.h>
++
++struct ipfix_templ_elem {
++      uint16_t id;
++      uint16_t len;
++};
++
++struct ipfix_templ {
++      unsigned int num_templ_elements;
++      struct ipfix_templ_elem templ_elements[];
++};
++
++/* Template fields modeled after vy_ipfix_data */
++static const struct ipfix_templ template = {
++      .num_templ_elements = 10,
++      .templ_elements = {
++              {
++                      .id = IPFIX_sourceIPv4Address,
++                      .len = sizeof(uint32_t)
++              },
++              {
++                      .id = IPFIX_destinationIPv4Address,
++                      .len = sizeof(uint32_t)
++              },
++              {
++                      .id = IPFIX_packetTotalCount,
++                      .len = sizeof(uint32_t)
++              },
++              {
++                      .id = IPFIX_octetTotalCount,
++                      .len = sizeof(uint32_t)
++              },
++              {
++                      .id = IPFIX_flowStartSeconds,
++                      .len = sizeof(uint32_t)
++              },
++              {
++                      .id = IPFIX_flowEndSeconds,
++                      .len = sizeof(uint32_t)
++              },
++              {
++                      .id = IPFIX_sourceTransportPort,
++                      .len = sizeof(uint16_t)
++              },
++              {
++                      .id = IPFIX_destinationTransportPort,
++                      .len = sizeof(uint16_t)
++              },
++              {
++                      .id = IPFIX_protocolIdentifier,
++                      .len = sizeof(uint8_t)
++              },
++              {
++                      .id = IPFIX_applicationId,
++                      .len = sizeof(uint32_t)
++              }
++      }
++};
+-struct ipfix_msg *ipfix_msg_alloc(size_t len, uint32_t oid)
++struct ipfix_msg *ipfix_msg_alloc(size_t len, uint32_t oid, int tid)
+ {
+       struct ipfix_msg *msg;
+       struct ipfix_hdr *hdr;
++      struct ipfix_templ_hdr *templ_hdr;
++      struct ipfix_templ_elem *elem;
++      unsigned int i = 0;
+-      if (len < IPFIX_HDRLEN + IPFIX_SET_HDRLEN)
++      if ((tid > 0 && len < IPFIX_HDRLEN + IPFIX_TEMPL_HDRLEN(template.num_templ_elements) + IPFIX_SET_HDRLEN) ||
++          (len < IPFIX_HDRLEN + IPFIX_SET_HDRLEN))
+               return NULL;
+       msg = malloc(sizeof(struct ipfix_msg) + len);
+       memset(msg, 0, sizeof(struct ipfix_msg));
+-      msg->tail = msg->data + IPFIX_HDRLEN;
++      msg->tid = tid;
+       msg->end = msg->data + len;
++      msg->tail = msg->data + IPFIX_HDRLEN;
++      if (tid > 0)
++              msg->tail += IPFIX_TEMPL_HDRLEN(template.num_templ_elements);
++      /* Initialize message header */
+       hdr = ipfix_msg_hdr(msg);
+       memset(hdr, 0, IPFIX_HDRLEN);
+       hdr->version = htons(IPFIX_VERSION);
+       hdr->oid = htonl(oid);
++      if (tid > 0) {
++              /* Initialize template record header */
++              templ_hdr = ipfix_msg_templ_hdr(msg);
++              templ_hdr->sid = htons(2);
++              templ_hdr->tid = htons(tid);
++              templ_hdr->len = htons(IPFIX_TEMPL_HDRLEN(template.num_templ_elements));
++              templ_hdr->cnt = htons(template.num_templ_elements);
++
++              while (i < template.num_templ_elements) {
++                      elem = (struct ipfix_templ_elem *) &templ_hdr->data[i * 4];
++                      elem->id = htons(template.templ_elements[i].id);
++                      elem->len = htons(template.templ_elements[i].len);
++                      i++;
++              }
++      }
++
+       return msg;
+ }
+@@ -47,6 +130,14 @@ void ipfix_msg_free(struct ipfix_msg *msg)
+       free(msg);
+ }
++struct ipfix_templ_hdr *ipfix_msg_templ_hdr(const struct ipfix_msg *msg)
++{
++      if (msg->tid > 0)
++              return (struct ipfix_templ_hdr *) (msg->data + IPFIX_HDRLEN);
++
++      return NULL;
++}
++
+ struct ipfix_hdr *ipfix_msg_hdr(const struct ipfix_msg *msg)
+ {
+       return (struct ipfix_hdr *)msg->data;
+diff --git a/output/ipfix/ipfix.h b/output/ipfix/ipfix.h
+index cdb5a6f..93945fb 100644
+--- a/output/ipfix/ipfix.h
++++ b/output/ipfix/ipfix.h
+@@ -2,6 +2,7 @@
+  * ipfix.h
+  *
+  * Holger Eitzenberger <holger@eitzenberger.org>, 2009.
++ * Ander Juaristi <a@juaristi.eus>, 2019
+  */
+ #ifndef IPFIX_H
+ #define IPFIX_H
+@@ -20,17 +21,21 @@ struct ipfix_hdr {
+       uint8_t data[];
+ } __packed;
+-#define IPFIX_HDRLEN  sizeof(struct ipfix_hdr)
++#define IPFIX_HDRLEN          sizeof(struct ipfix_hdr)
+ /*
+  * IDs 0-255 are reserved for Template Sets.  IDs of Data Sets are > 255.
+  */
+ struct ipfix_templ_hdr {
+-      uint16_t id;
++      uint16_t sid;
++      uint16_t len;
++      uint16_t tid;
+       uint16_t cnt;
+       uint8_t data[];
+ } __packed;
++#define IPFIX_TEMPL_HDRLEN(nfields)   sizeof(struct ipfix_templ_hdr) + (sizeof(uint16_t) * 2 * nfields)
++
+ struct ipfix_set_hdr {
+ #define IPFIX_SET_TEMPL                       2
+ #define IPFIX_SET_OPT_TEMPL           3
+@@ -46,6 +51,7 @@ struct ipfix_msg {
+       uint8_t *tail;
+       uint8_t *end;
+       unsigned nrecs;
++      int tid;
+       struct ipfix_set_hdr *last_set;
+       uint8_t data[];
+ };
+@@ -53,18 +59,14 @@ struct ipfix_msg {
+ struct vy_ipfix_data {
+       struct in_addr saddr;
+       struct in_addr daddr;
+-      uint16_t ifi_in;
+-      uint16_t ifi_out;
+       uint32_t packets;
+       uint32_t bytes;
+       uint32_t start;                         /* Unix time */
+       uint32_t end;                           /* Unix time */
+       uint16_t sport;
+       uint16_t dport;
+-      uint32_t aid;                           /* Application ID */
+       uint8_t l4_proto;
+-      uint8_t dscp;
+-      uint16_t __padding;
++      uint32_t aid;                           /* Application ID */
+ } __packed;
+ #define VY_IPFIX_SID          256
+@@ -73,13 +75,11 @@ struct vy_ipfix_data {
+ #define VY_IPFIX_PKT_LEN      (IPFIX_HDRLEN + IPFIX_SET_HDRLEN \
+                                                        + VY_IPFIX_FLOWS * sizeof(struct vy_ipfix_data))
+-/* template management */
+-size_t ipfix_rec_len(uint16_t);
+-
+ /* message handling */
+-struct ipfix_msg *ipfix_msg_alloc(size_t, uint32_t);
++struct ipfix_msg *ipfix_msg_alloc(size_t, uint32_t, int);
+ void ipfix_msg_free(struct ipfix_msg *);
+ struct ipfix_hdr *ipfix_msg_hdr(const struct ipfix_msg *);
++struct ipfix_templ_hdr *ipfix_msg_templ_hdr(const struct ipfix_msg *);
+ size_t ipfix_msg_len(const struct ipfix_msg *);
+ void *ipfix_msg_data(struct ipfix_msg *);
+ struct ipfix_set_hdr *ipfix_msg_add_set(struct ipfix_msg *, uint16_t);
+diff --git a/output/ipfix/ulogd_output_IPFIX.c b/output/ipfix/ulogd_output_IPFIX.c
+index ec143b1..5b59003 100644
+--- a/output/ipfix/ulogd_output_IPFIX.c
++++ b/output/ipfix/ulogd_output_IPFIX.c
+@@ -3,6 +3,9 @@
+  *
+  * ulogd IPFIX Exporter plugin.
+  *
++ * (C) 2009 by Holger Eitzenberger <holger@eitzenberger.org>, Astaro AG
++ * (C) 2019 by Ander Juaristi <a@juaristi.eus>
++ *
+  * 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
+@@ -11,8 +14,6 @@
+  * You should have received a copy of the GNU General Public License
+  * along with this program; if not, write to the Free Software
+  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+- *
+- * Holger Eitzenberger <holger@eitzenberger.org>  Astaro AG 2009
+  */
+ #include <unistd.h>
+ #include <time.h>
+@@ -28,6 +29,7 @@
+ #define DEFAULT_MTU           512 /* RFC 5101, 10.3.3 */
+ #define DEFAULT_PORT          4739 /* RFC 5101, 10.3.4 */
+ #define DEFAULT_SPORT         4740
++#define DEFAULT_SEND_TEMPLATE "once"
+ enum {
+       OID_CE = 0,
+@@ -35,16 +37,18 @@ enum {
+       PORT_CE,
+       PROTO_CE,
+       MTU_CE,
++      SEND_TEMPLATE_CE
+ };
+-#define oid_ce(x)     (x->ces[OID_CE])
+-#define host_ce(x)    (x->ces[HOST_CE])
+-#define port_ce(x)    (x->ces[PORT_CE])
+-#define proto_ce(x)   (x->ces[PROTO_CE])
+-#define mtu_ce(x)     (x->ces[MTU_CE])
++#define oid_ce(x)             (x->ces[OID_CE])
++#define host_ce(x)            (x->ces[HOST_CE])
++#define port_ce(x)            (x->ces[PORT_CE])
++#define proto_ce(x)           (x->ces[PROTO_CE])
++#define mtu_ce(x)             (x->ces[MTU_CE])
++#define send_template_ce(x)   (x->ces[SEND_TEMPLATE_CE])
+ static const struct config_keyset ipfix_kset = {
+-      .num_ces = 5,
++      .num_ces = 6,
+       .ces = {
+               {
+                       .key = "oid",
+@@ -70,20 +74,21 @@ static const struct config_keyset ipfix_kset = {
+                       .key = "mtu",
+                       .type = CONFIG_TYPE_INT,
+                       .u.value = DEFAULT_MTU
++              },
++              {
++                      .key = "send_template",
++                      .type = CONFIG_TYPE_STRING,
++                      .u.string = DEFAULT_SEND_TEMPLATE
+               }
+       }
+ };
+-struct ipfix_templ {
+-      struct ipfix_templ *next;
+-};
+-
+ struct ipfix_priv {
+       struct ulogd_fd ufd;
+       uint32_t seqno;
+       struct ipfix_msg *msg;          /* current message */
+       struct llist_head list;
+-      struct ipfix_templ *templates;
++      int tid;
+       int proto;
+       struct ulogd_timer timer;
+       struct sockaddr_in sa;
+@@ -258,8 +263,8 @@ static void ipfix_timer_cb(struct ulogd_timer *t, void *data)
+ static int ipfix_configure(struct ulogd_pluginstance *pi, struct ulogd_pluginstance_stack *stack)
+ {
+       struct ipfix_priv *priv = (struct ipfix_priv *) &pi->private;
++      char *host, *proto, *send_template;
+       int oid, port, mtu, ret;
+-      char *host, *proto;
+       char addr[16];
+       ret = config_parse_file(pi->id, pi->config_kset);
+@@ -271,6 +276,7 @@ static int ipfix_configure(struct ulogd_pluginstance *pi, struct ulogd_pluginsta
+       port = port_ce(pi->config_kset).u.value;
+       proto = proto_ce(pi->config_kset).u.string;
+       mtu = mtu_ce(pi->config_kset).u.value;
++      send_template = send_template_ce(pi->config_kset).u.string;
+       if (!oid) {
+               ulogd_log(ULOGD_FATAL, "invalid Observation ID\n");
+@@ -303,6 +309,8 @@ static int ipfix_configure(struct ulogd_pluginstance *pi, struct ulogd_pluginsta
+       ulogd_init_timer(&priv->timer, pi, ipfix_timer_cb);
++      priv->tid = (strcmp(send_template, "never") ? VY_IPFIX_SID : -1);
++
+       ulogd_log(ULOGD_INFO, "using IPFIX Collector at %s:%d (MTU %d)\n",
+                 inet_ntop(AF_INET, &priv->sa.sin_addr, addr, sizeof(addr)),
+                 port, mtu);
+@@ -410,25 +418,30 @@ static int ipfix_stop(struct ulogd_pluginstance *pi)
+ static int ipfix_interp(struct ulogd_pluginstance *pi)
+ {
+       struct ipfix_priv *priv = (struct ipfix_priv *) &pi->private;
++      char saddr[16], daddr[16], *send_template;
+       struct vy_ipfix_data *data;
+       int oid, mtu, ret;
+-      char addr[16];
+       if (!(GET_FLAGS(pi->input.keys, InIpSaddr) & ULOGD_RETF_VALID))
+               return ULOGD_IRET_OK;
+       oid = oid_ce(pi->config_kset).u.value;
+       mtu = mtu_ce(pi->config_kset).u.value;
++      send_template = send_template_ce(pi->config_kset).u.string;
+ again:
+       if (!priv->msg) {
+-              priv->msg = ipfix_msg_alloc(mtu, oid);
++              priv->msg = ipfix_msg_alloc(mtu, oid, priv->tid);
+               if (!priv->msg) {
+                       /* just drop this flow */
+                       ulogd_log(ULOGD_ERROR, "out of memory, dropping flow\n");
+                       return ULOGD_IRET_OK;
+               }
+               ipfix_msg_add_set(priv->msg, VY_IPFIX_SID);
++
++              /* template sent - do not send it again the next time */
++              if (priv->tid == VY_IPFIX_SID && strcmp(send_template, "once") == 0)
++                      priv->tid = -1;
+       }
+       data = ipfix_msg_add_data(priv->msg, sizeof(struct vy_ipfix_data));
+@@ -439,8 +452,6 @@ again:
+               goto again;
+       }
+-      data->ifi_in = data->ifi_out = 0;
+-
+       data->saddr.s_addr = ikey_get_u32(&pi->input.keys[InIpSaddr]);
+       data->daddr.s_addr = ikey_get_u32(&pi->input.keys[InIpDaddr]);
+@@ -462,13 +473,12 @@ again:
+               data->aid = htonl(ikey_get_u32(&pi->input.keys[InCtMark]));
+       data->l4_proto = ikey_get_u8(&pi->input.keys[InIpProto]);
+-      data->__padding = 0;
+       ulogd_log(ULOGD_DEBUG, "Got new packet (packets = %u, bytes = %u, flow = (%u, %u), saddr = %s, daddr = %s, sport = %u, dport = %u)\n",
+-                      ntohl(data->packets), ntohl(data->bytes), ntohl(data->start), ntohl(data->end),
+-                      inet_ntop(AF_INET, &data->saddr.s_addr, addr, sizeof(addr)),
+-                      inet_ntop(AF_INET, &data->daddr.s_addr, addr, sizeof(addr)),
+-                      ntohs(data->sport), ntohs(data->dport));
++                ntohl(data->packets), ntohl(data->bytes), ntohl(data->start), ntohl(data->end),
++                inet_ntop(AF_INET, &data->saddr.s_addr, saddr, sizeof(saddr)),
++                inet_ntop(AF_INET, &data->daddr.s_addr, daddr, sizeof(daddr)),
++                ntohs(data->sport), ntohs(data->dport));
+       if ((ret = send_msgs(pi)) < 0)
+               return ret;
+-- 
+cgit v1.2.1
+
index 6ce30ff3ab63e5fdfb1e68173bc1038fcdc72f1c..29c8a0d8c9562d67ae7e9f64adc7ccb00a987b04 100644 (file)
@@ -12,16 +12,14 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/umurmur/umurmur/tar.gz/$(PKG_VERSION)?
 PKG_HASH:=e77b7b6616768f4a1c07442afe49a772692f667b00c23cc85909d4dd0ce206d2
 
-PKG_INSTALL:=1
-PKG_BUILD_PARALLEL:=1
-PKG_FIXUP:=autoreconf
-
 PKG_MAINTAINER:=Martin Johansson <martin@fatbob.nu>
 PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=LICENSE
 
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
 
 define Package/umurmur/Default
   SECTION:=net
@@ -29,7 +27,7 @@ define Package/umurmur/Default
   SUBMENU:=Instant Messaging
   TITLE:=uMurmur
   DEPENDS:=+libconfig +libprotobuf-c
-  URL:=http://umurmur.net
+  URL:=https://umurmur.net
 endef
 
 define Package/umurmur/Default/description
@@ -60,13 +58,6 @@ define Package/umurmur-mbedtls/description
   Uses the mbed TLS library for SSL and crypto.
 endef
 
-define Build/Compile
-       CC="$(TARGET_CC)" \
-       CFLAGS="$(TARGET_CFLAGS)" \
-       LDFLAGS="$(TARGET_LDFLAGS)" \
-       $(MAKE) -C $(PKG_BUILD_DIR)/src all
-endef
-
 define Package/umurmur-openssl/conffiles
 /etc/umurmur.conf
 endef
@@ -75,7 +66,7 @@ Package/umurmur-mbedtls/conffiles = $(Package/umurmur-openssl/conffiles)
 
 define Package/umurmur-openssl/install
        $(INSTALL_DIR) $(1)/usr/bin
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/umurmurd $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/umurmurd $(1)/usr/bin/
        $(INSTALL_DIR) $(1)/etc
        $(INSTALL_CONF) $(PKG_BUILD_DIR)/openwrt/files/umurmur.conf $(1)/etc/
        $(INSTALL_DIR) $(1)/etc/init.d
@@ -85,14 +76,21 @@ endef
 
 Package/umurmur-mbedtls/install = $(Package/umurmur-openssl/install)
 
-ifeq ($(BUILD_VARIANT),openssl)
-  CONFIGURE_ARGS += \
-       --with-ssl=openssl
-endif
+CMAKE_OPTIONS += \
+       -DLIBCONFIG_INCLUDE_DIR="$(STAGING_DIR)/include" \
+       -DLIBCONFIG_LIBRARIES="$(STAGING_DIR)/lib" \
+       -DLIBCONFIG_LIB_DIR="$(STAGING_DIR)/lib" \
+       -DPROTOBUFC_INCLUDE_DIR="$(STAGING_DIR)/include" \
+       -DPROTOBUFC_LIBRARIES="$(STAGING_DIR)/lib" \
+       -DPROTOBUFC_LIB_DIR="$(STAGING_DIR)/lib"
 
-ifeq ($(BUILD_VARIANT),mbedtls)
-  CONFIGURE_ARGS += \
-       --with-ssl=mbedtls
+ifeq ($(BUILD_VARIANT),openssl)
+CMAKE_OPTIONS += -DSSL=openssl
+else
+CMAKE_OPTIONS += -DSSL=mbedtls \
+       -DMBEDTLS_INCLUDE_DIR="$(STAGING_DIR)/include/mbedtls" \
+       -DMBEDTLS_LIBRARIES="$(STAGING_DIR)/lib" \
+       -DMBEDTLS_LIB_DIR="$(STAGING_DIR)/lib"
 endif
 
 $(eval $(call BuildPackage,umurmur-openssl))
index 50258fed0e440d85a09fff753fcb38b8edc244db..dbc6c75846a1da47795383fb1b87f5f2a023c3db 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=unbound
-PKG_VERSION:=1.9.1
-PKG_RELEASE:=4
+PKG_VERSION:=1.9.4
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://nlnetlabs.nl/downloads/unbound
-PKG_HASH:=c3c0bf9b86ccba4ca64f93dd4fe7351308ab54293f297a67de5a8914c1dc59c5
+PKG_HASH:=3d3e25fb224025f0e732c7970e5676f53fd1764c16d6a01be073a13e42954bb0
 
 PKG_MAINTAINER:=Eric Luehrsen <ericluehrsen@gmail.com>
 PKG_LICENSE:=BSD-3-Clause
@@ -221,7 +221,7 @@ Package/unbound-daemon-heavy/install = $(Package/unbound-daemon/install)
 
 define Package/libunbound/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libunbound.so.* $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libunbound.so.* $(1)/usr/lib/
 endef
 
 Package/libunbound-heavy/install = $(Package/libunbound/install)
index 24cf1f242b7bfa3698fe7fc67070ad447691019e..653a3f836734ec83e254ab97935dea9fec48c631 100644 (file)
@@ -212,18 +212,17 @@ config unbound
     4 - Above and interfaces named <iface>.<hostname>.<domain>
 
   option add_wan_fqdn '0'
-    Level. Same as previous option only this applies to the WAN. WAN
-    are inferred by a UCI `config dhcp` entry that contains the line
-    option ignore '1'.
+    Level. Same as previous option only this applies to the WAN. WAN are
+    inferred by a UCI `config dhcp` entry that contains the 'option ignore 1'.
 
   option dns64 '0'
-    Boolean. Enable DNS64 through Unbound in order to bridge networks
-    that are IPV6 only and IPV4 only (see RFC6052).
+    Boolean. Enable DNS64 through Unbound in order to bridge networks that are
+    IPV6 only and IPV4 only (see RFC6052).
 
   option dns64_prefix '64:ff9b::/96'
-    IPV6 Prefix. The IPV6 prefix wrapped on the IPV4 address for DNS64.
-    You should use RFC6052 "well known" address, unless you also
-    redirect to a proxy or gateway for your NAT64.
+    IPV6 Prefix. The IPV6 prefix wrapped on the IPV4 address for DNS64. You
+    should use RFC6052 "well known" address, unless you also redirect to a proxy
+    or gateway for your NAT64.
 
   option dhcp_link 'none'
     Program Name. Link to one of the supported programs we have scripts
@@ -271,6 +270,12 @@ config unbound
     Boolean. Skip all this UCI nonsense. Manually edit the
     configuration. Make changes to /etc/unbound/unbound.conf.
 
+  option num_threads '1'
+    Count. Enable multithreading with the "heavy traffic" variant. Base variant
+    spins each as whole proces and is not efficient. Two threads may be used,
+    but they use one shared cache slab. More edges into an industrial setup,
+    and UCI simplificaitons may not be appropriate.
+
   option protocol 'mixed'
     Unbound can limit its protocol used for recursive queries.
     ip4_only - old fashioned IPv4 upstream and downstream
@@ -281,19 +286,18 @@ config unbound
     default - Unbound built-in defaults
 
   option query_minimize '0'
-    Boolean. Enable a minor privacy option. Don't let each server know
-    the next recursion. Query one piece at a time.
+    Boolean. Enable a minor privacy option. Don't let each server know the next
+    recursion. Query one piece at a time.
 
   option query_min_strict '0'
-    Boolean. Query minimize is best effort and will fall back to normal
-    when it must. This option prevents the fall back, but less than
-    standard name servers will fail to resolve their domains.
+    Boolean. Query minimize is best effort and will fall back to normal when it
+    must. This option prevents the fall back, but less than standard name
+    servers will fail to resolve their domains.
 
   option rebind_localhost '0'
-    Boolean. Prevent loopback "127.0.0.0/8" or "::1/128" responses.
-    These may used by black hole servers for good purposes like
-    ad-blocking or parental access control. Obviously these responses
-    also can be used to for bad purposes.
+    Boolean. Prevent loopback "127.0.0.0/8" or "::1/128" responses. These may
+    used by black hole servers for good purposes like ad-blocking or parental
+    access control. Obviously these responses may be used to for bad purposes.
 
   option rebind_protection '1'
     Level. Block your local address responses from global DNS. A poisoned
@@ -319,16 +323,16 @@ config unbound
     large - about double of medium
 
   option root_age '9'
-    Days. >90 Disables. Age limit for Unbound root data like root
-    DNSSEC key. Unbound uses RFC 5011 to manage root key. This could
-    harm flash ROM. This activity is mapped to "tmpfs," but every so
-    often it needs to be copied back to flash for the next reboot.
+    Days. >90 Disables. Age limit for Unbound root data like root DNSSEC key.
+    Unbound uses RFC 5011 to manage root key. This could harm flash ROM. This
+    activity is mapped to "tmpfs," but every so often it needs to be copied back
+    to flash for the next reboot.
 
   option ttl_min '120'
-    Seconds. Minimum TTL in cache. Recursion can be expensive without
-    cache. A low TTL is normal for server migration. A low TTL can be
-    abused for snoop-vertising (DNS hit counts; recording query IP).
-    Typical to configure maybe 0~300, but 1800 is the maximum accepted.
+    Seconds. Minimum TTL in cache. Recursion can be expensive without cache. A
+    low TTL is normal for server migration. A low TTL can be abused for snoop-
+    vertising (DNS hit counts; recording query IP). Typical to configure maybe
+    0~300, but 1800 is the maximum accepted.
 
   option unbound_control '0'
     Level. Enables unbound-control application access ports.
@@ -342,10 +346,10 @@ config unbound
     Boolean. Enable DNSSEC. Unbound names this the "validator" module.
 
   option validator_ntp '1'
-    Boolean. Disable DNSSEC time checks at boot. Once NTP confirms
-    global real time, then DNSSEC is restarted at full strength. Many
-    embedded devices don't have a real time power off clock. NTP needs
-    DNS to resolve servers. This works around the chicken-and-egg.
+    Boolean. Disable DNSSEC time checks at boot. Once NTP confirms global real
+    time, then DNSSEC is restarted at full strength. Many embedded devices don't
+    have a real time power off clock. NTP needs DNS to resolve servers. This
+    works around the chicken-and-egg.
 
   option verbosity '1'
     Level. Sets Unbounds logging intensity.
@@ -356,9 +360,9 @@ config unbound
 
   list trigger_interface 'lan' 'wan'
     Interface (logical). This option is a work around for netifd/procd
-    interaction with WAN DHCPv6. Minor RA or DHCP changes in IP6 can
-    cause netifd to execute procd interface reload. Limit Unbound procd
-    triggers to LAN and WAN (IP4 only) to prevent restart @2-3 minutes.
+    interaction with WAN DHCPv6. Minor RA or DHCP changes in IP6 can cause
+    netifd to execute procd interface reload. Limit Unbound procd triggers to
+    LAN and WAN (IP4 only) to prevent restart @2-3 minutes.
 
 
 config zone
@@ -368,23 +372,22 @@ config zone
     Boolean. Enable the zone clause.
 
   option fallback 1
-    Boolean. Permit normal recursion when the narrowly selected servers
-    in this zone are unresponsive or return empty responses. Disable, if
-    there are security concerns (forward only internal to organization).
+    Boolean. Permit normal recursion when the narrowly selected servers in this
+    zone are unresponsive or return empty responses. Disable, if there are
+    security concerns (forward only internal to organization).
 
   option port 53
     Port. Servers are contact on this port for plain DNS operations.
 
   option resolv_conf 0
-    Boolean. Use "resolv.conf" as it was filled by the DHCP client. This
-    can be used to forward zones within your ISP (mail.example.net) or that
-    have co-located services (streamed-movies.example.com). Recursion may
-    not yield the most local result, but forwarding may instead.
+    Boolean. Use "resolv.conf" as it was filled by the DHCP client. This can be
+    used to forward zones within your ISP (mail.example.net) or that have co-
+    located services (streamed-movies.example.com). Recursion may not yield the
+    most local result, but forwarding may instead.
 
   option tls_index (n/a)
     Domain. Name TLS certificates are signed for (dns.example.net). If this
-    option is ommitted, then Unbound will make the connection but not
-    validate it.
+    option is ommitted, then Unbound will make connections but not validate.
 
   option tls_port 853
     Port. Servers are contact on this port for DNS over TLS operations.
@@ -397,33 +400,33 @@ config zone
     auth_zone type only. Files "${zone_name}.zone" are expect in this path.
 
   option zone_type (n/a)
-    State. Required field or the clause is effectively disabled. Check
-    Unbound documentation for clarity (unbound-conf).
+    State. Required field or the clause is effectively disabled. Check Unbound
+    documentation for clarity (unbound-conf).
     auth_zone     - prefetch whole zones from authoritative server (ICANN)
     forward_zone  - forward queries in these domains to the listed servers
     stub_zone     - force recursion of these domains to the listed servers
 
   list server (n/a)
-    IP. Every zone must have one server. Stub and forward require IP to
-    prevent chicken and egg (due to UCI simplicity). Authoritative prefetch
-    may use a server name.
+    IP. Every zone must have one server. Stub and forward require IP to prevent
+    chicken and egg (due to UCI simplicity). Authoritative prefetch may use a
+    server name.
 
   list zone_name
-    Domain. Every zone must represent some part of the DNS tree. It can be
-    all of it "." or you internal organization domain "example.com." Within
-    each zone clause all zone names will be matched to all servers.
+    Domain. Every zone must represent some part of the DNS tree. It can be all
+    of it "." or you internal organization domain "example.com." Within each
+    zone clause all zone names will be matched to all servers.
 ```
 
 ## Replaced Options
   config unbound / option prefetch_root
-    List the domains in a zone with type auth_zone and fill in the server
-    or url fields. Root zones are ready but disabled in default install UCI.
+    List the domains in a zone with type auth_zone and fill in the server or url
+    fields. Root zones are ready but disabled in default install UCI.
 
   config unbound / list domain_forward
     List the domains in a zone with type forward_zone and enable the
     resolv_conf option.
 
   config unbound / list rebind_interface
-    Enable rebind_protection at 2 and all DHCP interfaces are also
-    protected for IPV6 GLA (parallel to subnets in add_local_fqdn).
+    Enable rebind_protection at 2 and all DHCP interfaces are also protected for
+    IPV6 GLA (parallel to subnets in add_local_fqdn).
 
index e76f68cd1a4f2d68d5aa3ae4e0618b27d26a051e..2f2df14834f5ce0d9db687c9d78892fd121fe37e 100755 (executable)
@@ -62,8 +62,8 @@ service_triggers() {
 
 
   if [ ! -f "$UB_TOTAL_CONF" ] || [ -n "$UB_BOOT" ] ; then
-    # Unbound is can be a bit heavy, so wait some on first start but any
-    # interface coming up affects the trigger and delay so guarantee start
+    # Unbound can be a bit heavy, so wait some on first start. Any interface
+    # up affects the trigger delay and will guarantee start.
     procd_add_raw_trigger "interface.*.up" 3000 /etc/init.d/unbound restart
 
   elif [ -n "$triggers" ] ; then
index f89901ddc4765004a49bdb3aeb787e19169e0bad..83717fefb5ebfc920ea1bcb3d03973f8c2efcff1 100644 (file)
@@ -54,6 +54,7 @@ UB_IP_DNS64="64:ff9b::/96"
 UB_N_EDNS_SIZE=1280
 UB_N_RX_PORT=53
 UB_N_ROOT_AGE=9
+UB_N_THREADS=1
 
 UB_TTL_MIN=120
 UB_TXT_DOMAIN=lan
@@ -580,9 +581,18 @@ unbound_conf() {
   fi
 
 
+  if [ "$UB_N_THREADS" -gt 1 ] \
+  && $PROG -V | grep -q "Linked libs:.*libevent" ; then
+    # heavy variant using "threads" may need substantial resources
+    echo "  num-threads: 2" >> $UB_CORE_CONF
+  else
+    # light variant with one "process" is much more efficient with light traffic
+    echo "  num-threads: 1" >> $UB_CORE_CONF
+  fi
+
+
   {
-    # No threading
-    echo "  num-threads: 1"
+    # Limited threading (2) with one shared slab
     echo "  msg-cache-slabs: 1"
     echo "  rrset-cache-slabs: 1"
     echo "  infra-cache-slabs: 1"
@@ -967,19 +977,16 @@ unbound_hostname() {
           echo "  local-data: \"$UB_TXT_DOMAIN. $UB_XNS\""
           echo "  local-data: '$UB_TXT_DOMAIN. $UB_XTXT'"
           echo
-          # avoid upstream involvement in RFC6762
-          echo "  domain-insecure: local"
-          echo "  private-domain: local"
-          echo "  local-zone: local $UB_D_DOMAIN_TYPE"
-          echo "  local-data: \"local. $UB_XSOA\""
-          echo "  local-data: \"local. $UB_XNS\""
-          echo "  local-data: 'local. $UB_LTXT'"
-          echo
+          if [ "$UB_TXT_DOMAIN" != "local" ] ; then
+            # avoid involvement in RFC6762, unless it is the local zone name
+            echo "  local-zone: local always_nxdomain"
+            echo
+          fi
         } >> $UB_HOST_CONF
         zonetype=2
         ;;
 
-      transparent|typetransparent)
+      inform|transparent|typetransparent)
         {
           # transparent will permit forward-zone: or stub-zone: clauses
           echo "  private-domain: $UB_TXT_DOMAIN"
@@ -1205,6 +1212,7 @@ unbound_uci() {
   config_get UB_N_EDNS_SIZE "$cfg" edns_size 1280
   config_get UB_N_RX_PORT   "$cfg" listen_port 53
   config_get UB_N_ROOT_AGE  "$cfg" root_age 9
+  config_get UB_N_THREADS   "$cfg" num_threads 1
 
   config_get UB_D_CONTROL     "$cfg" unbound_control 0
   config_get UB_D_DOMAIN_TYPE "$cfg" domain_type static
index 9614357eb6a9b034a14400557dadab01152c42e1..604c960aa346465173c2da20bc0b9ee4f752b7e9 100644 (file)
@@ -14,6 +14,7 @@ config unbound
        option listen_port '53'
        option localservice '1'
        option manual_conf '0'
+       option num_threads '1'
        option protocol 'default'
        option query_minimize '0'
        option query_min_strict '0'
index a2046ae00ba57e99a6f5cdc6034cee1d7c8002e0..8910a1b603b28c7ae13c26e988c5030e24b4a9f3 100644 (file)
@@ -32,6 +32,7 @@ Hooks/Prepare/Pre += prepare_source_directory
 
 PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
+PKG_ASLR_PIE:=0
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/nls.mk
index 06041f2b68a0441d0f658c2b9f5383288b8752cd..933ce885ea12b615c9eb1b3d4502aff716790ec6 100644 (file)
@@ -15,6 +15,8 @@ PKG_LICENSE:=GPL-2.0-or-later
 PKG_LICENSE_FILES:=LICENSE
 PKG_MAINTAINER:=Ansuel Smith <ansuelsmth@gmail.com>
 
+PKG_BUILD_DEPENDS:=python3/host
+
 include $(INCLUDE_DIR)/package.mk
 
 define Package/uwsgi-cgi
@@ -39,7 +41,8 @@ define Package/uwsgi-cgi/description
 endef
 
 MAKE_VARS+=\
-       CPP=$(TARGET_CROSS)cpp
+       CPP=$(TARGET_CROSS)cpp \
+       PYTHON=$(STAGING_DIR_HOSTPKG)/bin/python3
 
 define Build/Compile
        $(call Build/Compile/Default,PROFILE=cgi)
diff --git a/net/uwsgi-cgi/patches/020-uwsgiconfig-system-python3.patch b/net/uwsgi-cgi/patches/020-uwsgiconfig-system-python3.patch
new file mode 100644 (file)
index 0000000..82522be
--- /dev/null
@@ -0,0 +1,10 @@
+Index: uwsgi-2.0.18/Makefile
+===================================================================
+--- uwsgi-2.0.18.orig/Makefile
++++ uwsgi-2.0.18/Makefile
+@@ -1,4 +1,4 @@
+-PYTHON := python
++PYTHON ?= python3
+ all:
+       $(PYTHON) uwsgiconfig.py --build $(PROFILE)
index 2c0b545cff67ea3f1c8d7a43b00ae8e23fa91f24..28275ca9c102a9aaae7bf33fbadbf4b88ba58c16 100644 (file)
@@ -5,8 +5,8 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=vpnbypass
 PKG_VERSION:=1.3.1
-PKG_RELEASE:=1
-PKG_LICENSE:=GPL-3.0+
+PKG_RELEASE:=2
+PKG_LICENSE:=GPL-3.0-or-later
 PKG_MAINTAINER:=Stan Grishin <stangri@melmac.net>
 
 include $(INCLUDE_DIR)/package.mk
index 8634c1e7542e6f8dfd9d90970158277912a06812..754bb1fbc877f66e301b126f8b029a4b50cc071d 100644 (file)
@@ -9,14 +9,14 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=wavemon
 PKG_VERSION:=0.9.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/uoaerg/wavemon/tar.gz/v$(PKG_VERSION)?
 PKG_HASH:=5823ef9459d6147a457b390b6744a77465584e93d37c2809fa7a0be557070166
 
 PKG_MAINTAINER:=Jonathan McCrohan <jmccrohan@gmail.com>
-PKG_LICENSE:=GPL-2.0+
+PKG_LICENSE:=GPL-2.0-or-later
 PKG_LICENSE_FILES:=COPYING
 
 PKG_BUILD_PARALLEL:=1
@@ -29,7 +29,7 @@ define Package/wavemon
   CATEGORY:=Network
   TITLE:=N-curses based wireless network devices monitor
   DEPENDS:=+libncurses +libpthread +libnl-genl
-  SUBMENU:=wireless
+  SUBMENU:=Wireless
   URL:=https://github.com/uoaerg/wavemon/releases
 endef
 
index 62aed759d0387a5b1066f7d511b099b1dd17a392..83c91374edd6a464f9b42a46ad78b8f872f6d6a1 100644 (file)
@@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=wget
 PKG_VERSION:=1.20.3
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@GNU/$(PKG_NAME)
 PKG_HASH:=31cccfc6630528db1c8e3a06f6decf2a370060b982841cfab2b8677400a5092e
 PKG_MAINTAINER:=Peter Wagner <tripolar@gmx.at>
-PKG_LICENSE:=GPL-3.0+
+PKG_LICENSE:=GPL-3.0-or-later
 PKG_LICENSE_FILES:=COPYING
 
 PKG_CPE_ID:=cpe:/a:gnu:wget
@@ -31,6 +31,7 @@ define Package/wget/Default
   SUBMENU:=File Transfer
   TITLE:=Non-interactive network downloader
   URL:=https://www.gnu.org/software/wget/index.html
+  PROVIDES:=wget
 endef
 
 define Package/wget/Default/description
@@ -47,6 +48,7 @@ $(call Package/wget/Default)
   DEPENDS+= +libopenssl +librt
   TITLE+= (with SSL support)
   VARIANT:=ssl
+  PROVIDES+=gnu-wget
   ALTERNATIVES:=300:/usr/bin/wget:/usr/bin/wget-ssl
 endef
 
@@ -59,6 +61,7 @@ define Package/wget-nossl
 $(call Package/wget/Default)
   TITLE+= (without SSL support)
   VARIANT:=nossl
+  PROVIDES+=gnu-wget
   ALTERNATIVES:=300:/usr/bin/wget:/usr/bin/wget-nossl
 endef
 
index 3909e2a13c9a766c88712f3f4bd7d340878ddfb0..c936e3ad5c0ad25835139f3d0499f550e20e1928 100644 (file)
@@ -8,8 +8,8 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=wifidog-ng
-PKG_VERSION:=2.0.0
-PKG_RELEASE:=2
+PKG_VERSION:=2.0.1
+PKG_RELEASE:=1
 
 PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)
 
index 96da9a667fc7faa5f76361a16acd0fc6d2da1018..afb1b038ed6a8be41378860742d0a39aed832410 100644 (file)
 #define IPS_HIJACKED    (1 << 31)
 #define IPS_ALLOWED     (1 << 30)
 
-static u32 wd_nf_nat_setup_info(void *priv, struct sk_buff *skb,
+#if LINUX_VERSION_CODE > KERNEL_VERSION(4, 17, 19)
+static u32 wd_nat_setup_info(struct sk_buff *skb, struct nf_conn *ct)
+#else
+static u32 wd_nat_setup_info(void *priv, struct sk_buff *skb,
     const struct nf_hook_state *state, struct nf_conn *ct)
+#endif
 {
     struct config *conf = get_config();
     struct tcphdr *tcph = tcp_hdr(skb);
     union nf_conntrack_man_proto proto;
-    struct nf_nat_range newrange;
+#if LINUX_VERSION_CODE > KERNEL_VERSION(4, 17, 19)
+    struct nf_nat_range2 newrange = {};
+#else
+    struct nf_nat_range newrange = {};
+#endif
     static uint16_t PORT_80 = htons(80);
 
     proto.tcp.port = (tcph->dest == PORT_80) ? htons(conf->port) : htons(conf->ssl_port);
     newrange.flags       = NF_NAT_RANGE_MAP_IPS | NF_NAT_RANGE_PROTO_SPECIFIED;
-    newrange.min_addr.ip = newrange.max_addr.ip = conf->interface_ipaddr;
-    newrange.min_proto   = newrange.max_proto = proto;
+    newrange.min_addr.ip = conf->interface_ipaddr;
+    newrange.max_addr.ip = conf->interface_ipaddr;
+    newrange.min_proto   = proto;
+    newrange.max_proto   = proto;
 
     ct->status |= IPS_HIJACKED;
 
@@ -117,16 +127,18 @@ redirect:
         return NF_DROP;
     }
 
-    return nf_nat_ipv4_in(priv, skb, state, wd_nf_nat_setup_info);
+#if LINUX_VERSION_CODE > KERNEL_VERSION(4, 17, 19)
+    return wd_nat_setup_info(skb, ct);
+#else
+    return nf_nat_ipv4_in(priv, skb, state, wd_nat_setup_info);
+#endif
 }
 
-static struct nf_hook_ops wifidog_ops[] __read_mostly = {
-    {
-        .hook       = wifidog_hook,
-        .pf         = PF_INET,
-        .hooknum    = NF_INET_PRE_ROUTING,
-        .priority   = NF_IP_PRI_CONNTRACK + 1 /* after conntrack */
-    }
+static struct nf_hook_ops wifidog_ops __read_mostly = {
+    .hook       = wifidog_hook,
+    .pf         = PF_INET,
+    .hooknum    = NF_INET_PRE_ROUTING,
+    .priority   = NF_IP_PRI_NAT_DST
 };
 
 static int __init wifidog_init(void)
@@ -137,10 +149,12 @@ static int __init wifidog_init(void)
     if (ret)
         return ret;
 
-#if LINUX_VERSION_CODE > KERNEL_VERSION(4, 12, 14)
-    ret = nf_register_net_hooks(&init_net, wifidog_ops, ARRAY_SIZE(wifidog_ops));
+#if LINUX_VERSION_CODE > KERNEL_VERSION(4, 17, 19)
+    ret = nf_nat_l3proto_ipv4_register_fn(&init_net, &wifidog_ops);
+#elif LINUX_VERSION_CODE > KERNEL_VERSION(4, 12, 14)
+    ret = nf_register_net_hook(&init_net, &wifidog_ops);
 #else
-    ret = nf_register_hooks(wifidog_ops, ARRAY_SIZE(wifidog_ops));
+    ret = nf_register_hook(&wifidog_ops);
 #endif
     if (ret < 0) {
         pr_err("can't register hook\n");
@@ -160,10 +174,12 @@ static void __exit wifidog_exit(void)
 {
     deinit_config();
 
-#if LINUX_VERSION_CODE > KERNEL_VERSION(4, 12, 14)
-    nf_unregister_net_hooks(&init_net, wifidog_ops, ARRAY_SIZE(wifidog_ops));
+#if LINUX_VERSION_CODE > KERNEL_VERSION(4, 17, 19)
+    nf_nat_l3proto_ipv4_unregister_fn(&init_net, &wifidog_ops);
+#elif LINUX_VERSION_CODE > KERNEL_VERSION(4, 12, 14)
+    nf_unregister_net_hook(&init_net, &wifidog_ops);
 #else
-    nf_unregister_hooks(wifidog_ops, ARRAY_SIZE(wifidog_ops));
+    nf_unregister_hook(&wifidog_ops);
 #endif
 
     pr_info("kmod of wifidog-ng is stop\n");
index 15b975a0c5b259960f7a7086cd1687a751e3e819..a9593a830f0705edcee88a59094cfc314ed2f14c 100644 (file)
@@ -9,27 +9,20 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=wifidog
 PKG_VERSION:=1.3.0
-PKG_RELEASE:=3
-
-
-PKG_LICENSE:=GPL-2.0
-# Note: Packaging is maintained upstream at
-# https://github.com/wifidog/packages
-PKG_MAINTAINER:=Michael Haas <haas@computerlinguist.org>
-PKG_LICENSE_FILES:=COPYING
-
+PKG_RELEASE:=4
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/wifidog/wifidog-gateway
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=1.3.0
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
+PKG_SOURCE_VERSION:=$(PKG_VERSION)
 PKG_MIRROR_HASH:=9ffd9f3ae54baceb723abb7a04e27a9b6a3ff1479f8a3bfda9b8a496e8b4050f
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Michael Haas <haas@computerlinguist.org>
+PKG_LICENSE:=GPL-2.0-or-later
+PKG_LICENSE_FILES:=COPYING
 
 PKG_FIXUP:=autoreconf
-# do not run make install
 PKG_INSTALL:=0
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -49,7 +42,7 @@ endef
 
 define Package/wifidog-tls
 $(call Package/wifidog/Default)
-  DEPENDS+= +libcyassl
+  DEPENDS+= +PACKAGE_wifidog-tls:libwolfssl
   VARIANT:=tls
 endef
 
@@ -73,11 +66,6 @@ endef
 
 Package/wifidog-tls/conffiles = $(Package/wifidog/conffiles)
 
-
-define Package/wifidog/configure
-       $(call Build/Configure/Default)
-endef
-
 ifeq ($(BUILD_VARIANT),tls)
 
 CONFIGURE_ARGS += \
@@ -90,7 +78,7 @@ define Package/wifidog/install
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/wifidog $(1)/usr/bin/
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/wdctl $(1)/usr/bin/
        $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libhttpd.so* $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libhttpd.so.* $(1)/usr/lib/
        $(INSTALL_DIR) $(1)/etc
        $(INSTALL_DATA) $(PKG_BUILD_DIR)/wifidog.conf $(1)/etc/
        $(INSTALL_DATA) $(PKG_BUILD_DIR)/wifidog-msg.html $(1)/etc/
diff --git a/net/wifidog/patches/020-Modify-get-ip-from-iface-method.patch b/net/wifidog/patches/020-Modify-get-ip-from-iface-method.patch
new file mode 100644 (file)
index 0000000..a1afe59
--- /dev/null
@@ -0,0 +1,28 @@
+From 37b2dda9b1d62eb91028f6d590beddd36f7b79c8 Mon Sep 17 00:00:00 2001
+From: Nathan Samson <nathan@nathansamson.be>
+Date: Mon, 1 Feb 2016 21:37:22 +0100
+Subject: [PATCH] Modify get ip from iface method.
+
+This used to use a RAW socket, while now it used a DGRAM socket.
+Previously it failed with operation not permitted, while this version
+seems to work reliably.
+
+diff --git a/src/util.c b/src/util.c
+index 46ec5a2..426ba13 100644
+--- a/src/util.c
++++ b/src/util.c
+@@ -174,11 +174,13 @@ get_iface_ip(const char *ifname)
+     u_int32_t ip;
+     /* Create a socket */
+-    if ((sockd = socket(AF_INET, SOCK_RAW, htons(0x8086))) < 0) {
++    if ((sockd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
+         debug(LOG_ERR, "socket(): %s", strerror(errno));
+         return NULL;
+     }
++     /* I want to get an IPv4 IP address */
++    if_data.ifr_addr.sa_family = AF_INET;
+     /* Get IP of internal interface */
+     strncpy(if_data.ifr_name, ifname, 15);
+     if_data.ifr_name[15] = '\0';
index 893b7749bf0e203eeef2fefb7ef3c7374aca4ced..45dd505380528b14a101a5f3adb6de966a6ffc7e 100644 (file)
@@ -24,7 +24,7 @@ PKG_MAINTAINER:=Nils Koenig <openwrt@newk.it>
 include $(INCLUDE_DIR)/package.mk
 
 define Package/wifischedule
-  SUBMENU:=wireless
+  SUBMENU:=Wireless
   TITLE:=Turns WiFi on and off according to a schedule
   SECTION:=net
   CATEGORY:=Network
index c7c0ded851a143fa4b6f2940e4f02dff4b4cafb7..a1050091078265a00fdc775daad65e9bc48767ec 100644 (file)
@@ -16,6 +16,7 @@ PKG_SOURCE_URL:=https://github.com/xinetd-org/xinetd/archive
 PKG_HASH:=bf4e060411c75605e4dcbdf2ac57c6bd9e1904470a2f91e01ba31b50a80a5be3
 PKG_LICENSE:=xinetd
 PKG_LICENSE_FILES:=COPYRIGHT
+PKG_CPE_ID:=cpe:/a:xinetd:xinetd
 
 PKG_INSTALL:=1
 
index d8a97a226d9e5a261bf987fb24c42e7e066693d7..678892cf29c07e02f60691d258d6fe056999dd7c 100644 (file)
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=xl2tpd
-PKG_VERSION:=1.3.13
+PKG_VERSION:=1.3.14
 PKG_RELEASE:=1
 PKG_MAINTAINER:=Yousong Zhou <yszhou4tech@gmail.com>
 PKG_LICENSE:=GPL-2.0
@@ -19,7 +19,7 @@ PKG_SOURCE_URL:=https://github.com/xelerance/xl2tpd.git
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
 PKG_SOURCE_VERSION:=v$(PKG_VERSION)
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_MIRROR_HASH:=dbff24b8720063b510e711091459d6928d0bef332ead838aa63ed179ca02219e
+PKG_MIRROR_HASH:=4a35bb75bdd05964b1438771483a79a52eed2e30d0bc85e7481bf951d3bc0b96
 
 PKG_BUILD_DEPENDS:=libpcap
 
index d81605388ac7deb0b2735466b639fd9c92989c1b..bc0fc0120bb3dfb99e0cdb967e635af6bbea6d44 100644 (file)
@@ -9,9 +9,9 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=xtables-addons
-PKG_VERSION:=2.14
-PKG_RELEASE:=8
-PKG_HASH:=d215a9a8b8e66aae04b982fa2e1228e8a71e7dfe42320df99e34e5000cbdf152
+PKG_VERSION:=3.5
+PKG_RELEASE:=1
+PKG_HASH:=189ff57a0b8960969bd99141a6c79c345efa67e4461f450e2f162c9bd3d17da6
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@SF/xtables-addons
@@ -170,6 +170,7 @@ $(eval $(call BuildTemplate,length2,length2,xt_length2,xt_length2,+kmod-ipt-comp
 $(eval $(call BuildTemplate,logmark,LOGMARK,xt_LOGMARK,xt_LOGMARK,+kmod-ipt-compat-xtables))
 $(eval $(call BuildTemplate,lscan,lscan,xt_lscan,xt_lscan,))
 $(eval $(call BuildTemplate,lua,Lua PacketScript,xt_LUA,LUA/xt_LUA,+kmod-ipt-conntrack-extra))
+$(eval $(call BuildTemplate,proto,PROTO,xt_PROTO,xt_PROTO,))
 $(eval $(call BuildTemplate,psd,psd,xt_psd,xt_psd,))
 $(eval $(call BuildTemplate,quota2,quota2,xt_quota2,xt_quota2,))
 $(eval $(call BuildTemplate,sysrq,SYSRQ,xt_SYSRQ,xt_SYSRQ,+kmod-ipt-compat-xtables +kmod-crypto-hash))
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
deleted file mode 100644 (file)
index 99b0cfe..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-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-restore-support-for-Linux-4.14.patch b/net/xtables-addons/patches/002-restore-support-for-Linux-4.14.patch
new file mode 100644 (file)
index 0000000..930687a
--- /dev/null
@@ -0,0 +1,78 @@
+Restore support for kernel 4.14
+This reverts commit bf63a25a64c9223435c26e6543ba749834b47752.
+---
+ configure.ac                  |  2 +-
+ extensions/compat_xtables.h   |  4 ++--
+ extensions/pknock/xt_pknock.c | 16 ++++++++++++++++
+ 3 files changed, 19 insertions(+), 3 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 7631f6b..0d3aa72 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -61,7 +61,7 @@ if test -n "$kbuilddir"; then
+                       echo "WARNING: That kernel version is not officially supported yet. Continue at own luck.";
+               elif test "$kmajor" -eq 5 -a "$kminor" -ge 0; then
+                       :
+-              elif test "$kmajor" -eq 4 -a "$kminor" -ge 18; then
++              elif test "$kmajor" -eq 4 -a "$kminor" -ge 14; then
+                       :
+               else
+                       echo "WARNING: That kernel version is not officially supported.";
+diff --git a/extensions/compat_xtables.h b/extensions/compat_xtables.h
+index d08354a..faf5dd8 100644
+--- a/extensions/compat_xtables.h
++++ b/extensions/compat_xtables.h
+@@ -8,8 +8,8 @@
+ #define DEBUGP Use__pr_debug__instead
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
+-#     warning Kernels below 4.15 not supported.
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0)
++#     warning Kernels below 4.14 not supported.
+ #endif
+ #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
+diff --git a/extensions/pknock/xt_pknock.c b/extensions/pknock/xt_pknock.c
+index c76901a..7be0345 100644
+--- a/extensions/pknock/xt_pknock.c
++++ b/extensions/pknock/xt_pknock.c
+@@ -357,10 +357,18 @@ has_logged_during_this_minute(const struct peer *peer)
+  *
+  * @r: rule
+  */
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
+ static void peer_gc(struct timer_list *tl)
++#else
++static void peer_gc(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;
+@@ -467,7 +475,15 @@ add_rule(struct xt_pknock_mtinfo *info)
+       rule->peer_head      = alloc_hashtable(peer_hashsize);
+       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);
+       if (rule->status_proc == NULL)
+-- 
+2.21.0
+
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
deleted file mode 100644 (file)
index a6f31cf..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-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/xtables-addons/patches/003-restore-support-for-Linux-4.9.patch b/net/xtables-addons/patches/003-restore-support-for-Linux-4.9.patch
new file mode 100644 (file)
index 0000000..3e7e34a
--- /dev/null
@@ -0,0 +1,312 @@
+Restore support for kernel 4.9
+This reverts commits:
+94656621ed269882aedf116f900009f1ccade3f6
+95d4f9e113fae3ef1e161548fe25c43c091392e3
+123e1a14e95f01b6ba2e4a31b3b2a74ff250be57
+f4f3f9860916d2ec88eb8339680d9ca0f64d41a4
+9b1c7c1c047f0e9c6cb4f9abbdb9fd7b86ae6c1b
+---
+ configure.ac                    |  2 +-
+ extensions/ACCOUNT/xt_ACCOUNT.c |  4 ++++
+ extensions/compat_xtables.h     |  8 ++++++--
+ extensions/xt_CHAOS.c           | 28 ++++++++++++++++++++++++++--
+ extensions/xt_DELUDE.c          |  8 +++++++-
+ extensions/xt_DNETMAP.c         | 13 +++++++++++++
+ extensions/xt_ECHO.c            |  4 ++++
+ extensions/xt_LOGMARK.c         |  8 ++++++++
+ extensions/xt_TARPIT.c          | 10 ++++++++++
+ extensions/xt_iface.c           |  8 ++++++++
+ extensions/xt_lscan.c           |  4 ++++
+ 11 files changed, 91 insertions(+), 6 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 0d3aa72..1cea354 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -61,7 +61,7 @@ if test -n "$kbuilddir"; then
+                       echo "WARNING: That kernel version is not officially supported yet. Continue at own luck.";
+               elif test "$kmajor" -eq 5 -a "$kminor" -ge 0; then
+                       :
+-              elif test "$kmajor" -eq 4 -a "$kminor" -ge 14; then
++              elif test "$kmajor" -eq 4 -a "$kminor" -ge 9; then
+                       :
+               else
+                       echo "WARNING: That kernel version is not officially supported.";
+diff --git a/extensions/ACCOUNT/xt_ACCOUNT.c b/extensions/ACCOUNT/xt_ACCOUNT.c
+index 019f5bd..8abe8ab 100644
+--- a/extensions/ACCOUNT/xt_ACCOUNT.c
++++ b/extensions/ACCOUNT/xt_ACCOUNT.c
+@@ -485,7 +485,11 @@ static void ipt_acc_depth2_insert(struct ipt_acc_mask_8 *mask_8,
+ static unsigned int
+ ipt_acc_target(struct sk_buff *skb, const struct xt_action_param *par)
+ {
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)
+       struct ipt_acc_net *ian = net_generic(par->state->net, ipt_acc_net_id);
++#else
++      struct ipt_acc_net *ian = net_generic(par->net, ipt_acc_net_id);
++#endif
+       struct ipt_acc_table *ipt_acc_tables = ian->ipt_acc_tables;
+       const struct ipt_acc_info *info =
+               par->targinfo;
+diff --git a/extensions/compat_xtables.h b/extensions/compat_xtables.h
+index faf5dd8..23785d9 100644
+--- a/extensions/compat_xtables.h
++++ b/extensions/compat_xtables.h
+@@ -8,8 +8,8 @@
+ #define DEBUGP Use__pr_debug__instead
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0)
+-#     warning Kernels below 4.14 not supported.
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
++#     warning Kernels below 4.9 not supported.
+ #endif
+ #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
+@@ -44,7 +44,11 @@
+ static inline struct net *par_net(const struct xt_action_param *par)
+ {
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0)
+       return par->state->net;
++#else
++      return par->net;
++#endif
+ }
+ #ifndef NF_CT_ASSERT
+diff --git a/extensions/xt_CHAOS.c b/extensions/xt_CHAOS.c
+index eec36d4..cee2026 100644
+--- a/extensions/xt_CHAOS.c
++++ b/extensions/xt_CHAOS.c
+@@ -58,7 +58,12 @@ xt_chaos_total(struct sk_buff *skb, const struct xt_action_param *par)
+       {
+               struct xt_action_param local_par;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)
+               local_par.state    = par->state;
++#else
++              local_par.in        = par->in,
++              local_par.out       = par->out,
++#endif
+               local_par.match     = xm_tcp;
+               local_par.matchinfo = &tcp_params;
+               local_par.fragoff   = fragoff;
+@@ -73,7 +78,14 @@ xt_chaos_total(struct sk_buff *skb, const struct xt_action_param *par)
+       destiny = (info->variant == XTCHAOS_TARPIT) ? xt_tarpit : xt_delude;
+       {
+               struct xt_action_param local_par;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)
+               local_par.state    = par->state;
++#else
++              local_par.in       = par->in;
++              local_par.out      = par->out;
++              local_par.hooknum  = par->hooknum;
++              local_par.family   = par->family;
++#endif
+               local_par.target   = destiny;
+               local_par.targinfo = par->targinfo;
+               destiny->target(skb, &local_par);
+@@ -96,15 +108,27 @@ chaos_tg(struct sk_buff *skb, const struct xt_action_param *par)
+       if ((unsigned int)prandom_u32() <= reject_percentage) {
+               struct xt_action_param local_par;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)
+               local_par.state    = par->state;
++#else
++              local_par.in       = par->in;
++              local_par.out      = par->out;
++              local_par.hooknum  = par->hooknum;
++#endif
+               local_par.target   = xt_reject;
+               local_par.targinfo = &reject_params;
+               return xt_reject->target(skb, &local_par);
+       }
+       /* TARPIT/DELUDE may not be called from the OUTPUT chain */
+-      if (iph->protocol == IPPROTO_TCP && info->variant != XTCHAOS_NORMAL &&
+-          par->state->hook != NF_INET_LOCAL_OUT)
++      if (iph->protocol == IPPROTO_TCP &&
++          info->variant != XTCHAOS_NORMAL &&
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)
++          par->state->hook
++#else
++          par->hooknum
++#endif
++          != NF_INET_LOCAL_OUT)
+               xt_chaos_total(skb, par);
+       return NF_DROP;
+diff --git a/extensions/xt_DELUDE.c b/extensions/xt_DELUDE.c
+index 618de5e..221f342 100644
+--- a/extensions/xt_DELUDE.c
++++ b/extensions/xt_DELUDE.c
+@@ -151,7 +151,13 @@ delude_tg(struct sk_buff *skb, const struct xt_action_param *par)
+        * a problem, as that is supported since Linux 2.6.35. But since we do not
+        * actually want to have a connection open, we are still going to drop it.
+        */
+-      delude_send_reset(par_net(par), skb, par->state->hook);
++      delude_send_reset(par_net(par), skb,
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)
++                        par->state->hook
++#else
++                        par->hooknum
++#endif
++                        );
+       return NF_DROP;
+ }
+diff --git a/extensions/xt_DNETMAP.c b/extensions/xt_DNETMAP.c
+index de7d4ec..36a59e2 100644
+--- a/extensions/xt_DNETMAP.c
++++ b/extensions/xt_DNETMAP.c
+@@ -356,7 +356,11 @@ out:
+ static unsigned int
+ dnetmap_tg(struct sk_buff *skb, const struct xt_action_param *par)
+ {
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)
+       struct net *net = dev_net(par->state->in ? par->state->in : par->state->out);
++#else
++      struct net *net = dev_net(par->in ? par->in : par->out);
++#endif
+       struct dnetmap_net *dnetmap_net = dnetmap_pernet(net);
+       struct nf_conn *ct;
+       enum ip_conntrack_info ctinfo;
+@@ -371,7 +375,11 @@ dnetmap_tg(struct sk_buff *skb, const struct xt_action_param *par)
+       struct dnetmap_entry *e;
+       struct dnetmap_prefix *p;
+       __s32 jttl;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)
+       unsigned int hooknum = par->state->hook;
++#else
++      unsigned int hooknum = par->hooknum;
++#endif
+       ct = nf_ct_get(skb, &ctinfo);
+       jttl = tginfo->flags & XT_DNETMAP_TTL ? tginfo->ttl * HZ : jtimeout;
+@@ -496,7 +504,12 @@ bind_new_prefix:
+       newrange.max_addr.ip = postnat_ip;
+       newrange.min_proto = mr->min_proto;
+       newrange.max_proto = mr->max_proto;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)
+       return nf_nat_setup_info(ct, &newrange, HOOK2MANIP(par->state->hook));
++#else
++      return nf_nat_setup_info(ct, &newrange, HOOK2MANIP(par->hooknum));
++#endif
++
+ no_rev_map:
+ no_free_ip:
+       spin_unlock_bh(&dnetmap_lock);
+diff --git a/extensions/xt_ECHO.c b/extensions/xt_ECHO.c
+index e99312b..60cb815 100644
+--- a/extensions/xt_ECHO.c
++++ b/extensions/xt_ECHO.c
+@@ -35,7 +35,11 @@ echo_tg6(struct sk_buff *oldskb, const struct xt_action_param *par)
+       void *payload;
+       struct flowi6 fl;
+       struct dst_entry *dst = NULL;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)
+       struct net *net = dev_net((par->state->in != NULL) ? par->state->in : par->state->out);
++#else
++      struct net *net = dev_net((par->in != NULL) ? par->in : par->out);
++#endif
+       /* This allows us to do the copy operation in fewer lines of code. */
+       if (skb_linearize(oldskb) < 0)
+diff --git a/extensions/xt_LOGMARK.c b/extensions/xt_LOGMARK.c
+index 0474bf8..02e32be 100644
+--- a/extensions/xt_LOGMARK.c
++++ b/extensions/xt_LOGMARK.c
+@@ -77,13 +77,21 @@ logmark_tg(struct sk_buff *skb, const struct xt_action_param *par)
+       printk("<%u>%.*s""iif=%d hook=%s nfmark=0x%x "
+              "secmark=0x%x classify=0x%x",
+              info->level, (unsigned int)sizeof(info->prefix), info->prefix,
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)
+              skb_ifindex(skb), hook_names[par->state->hook],
++#else
++             skb_ifindex(skb), hook_names[par->hooknum],
++#endif
+              skb_nfmark(skb), skb_secmark(skb), skb->priority);
+       ct = nf_ct_get(skb, &ctinfo);
+       printk(" ctdir=%s", dir_names[ctinfo >= IP_CT_IS_REPLY]);
+       if (ct == NULL)
+               printk(" ct=NULL ctmark=NULL ctstate=INVALID ctstatus=NONE");
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 12, 0)
++      else if (nf_ct_is_untracked(ct))
++              printk(" ct=UNTRACKED ctmark=NULL ctstate=UNTRACKED ctstatus=NONE");
++#endif
+       else
+               logmark_ct(ct, ctinfo);
+diff --git a/extensions/xt_TARPIT.c b/extensions/xt_TARPIT.c
+index cb98e9e..b78683c 100644
+--- a/extensions/xt_TARPIT.c
++++ b/extensions/xt_TARPIT.c
+@@ -436,7 +436,12 @@ tarpit_tg4(struct sk_buff *skb, const struct xt_action_param *par)
+       /* We are not interested in fragments */
+       if (iph->frag_off & htons(IP_OFFSET))
+               return NF_DROP;
++
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)
+       tarpit_tcp4(par_net(par), skb, par->state->hook, info->variant);
++#else
++      tarpit_tcp4(par_net(par), skb, par->hooknum, info->variant);
++#endif
+       return NF_DROP;
+ }
+@@ -477,7 +482,12 @@ tarpit_tg6(struct sk_buff *skb, const struct xt_action_param *par)
+               pr_debug("addr is not unicast.\n");
+               return NF_DROP;
+       }
++
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)
+       tarpit_tcp6(par_net(par), skb, par->state->hook, info->variant);
++#else
++      tarpit_tcp6(par_net(par), skb, par->hooknum, info->variant);
++#endif
+       return NF_DROP;
+ }
+ #endif
+diff --git a/extensions/xt_iface.c b/extensions/xt_iface.c
+index 7704686..be52a52 100644
+--- a/extensions/xt_iface.c
++++ b/extensions/xt_iface.c
+@@ -45,9 +45,17 @@ static const struct net_device *iface_get(const struct xt_iface_mtinfo *info,
+     const struct xt_action_param *par, struct net_device **put)
+ {
+       if (info->flags & XT_IFACE_DEV_IN)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)
+               return par->state->in;
++#else
++              return par->in;
++#endif
+       else if (info->flags & XT_IFACE_DEV_OUT)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)
+               return par->state->out;
++#else
++              return par->out;
++#endif
+       return *put = dev_get_by_name(&init_net, info->ifname);
+ }
+diff --git a/extensions/xt_lscan.c b/extensions/xt_lscan.c
+index 060fe44..3a7d2ed 100644
+--- a/extensions/xt_lscan.c
++++ b/extensions/xt_lscan.c
+@@ -204,7 +204,11 @@ lscan_mt(const struct sk_buff *skb, struct xt_action_param *par)
+               unsigned int n;
+               n = lscan_mt_full(ctdata->mark & connmark_mask, ctstate,
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)
+                   par->state->in == init_net.loopback_dev, tcph,
++#else
++                  par->in == init_net.loopback_dev, tcph,
++#endif
+                   skb->len - par->thoff - 4 * tcph->doff);
+               ctdata->mark = (ctdata->mark & ~connmark_mask) | n;
+-- 
+2.21.0
+
index 4666ea79b8687141cb45629ed4bc75d0c7d1bc0b..c78b03e13943883cbeda4fddd78a3f500e01f9ab 100644 (file)
 +module_exit(fini);
 --- a/extensions/Kbuild
 +++ b/extensions/Kbuild
-@@ -26,6 +26,7 @@ obj-${build_lscan}       += xt_lscan.o
+@@ -27,6 +27,7 @@ obj-${build_lscan}       += xt_lscan.o
  obj-${build_pknock}      += pknock/
  obj-${build_psd}         += xt_psd.o
  obj-${build_quota2}      += xt_quota2.o
  -include ${M}/Kbuild.*
 --- a/mconfig
 +++ b/mconfig
-@@ -22,3 +22,4 @@ build_lscan=m
+@@ -23,3 +23,4 @@ build_lscan=m
  build_pknock=m
  build_psd=m
  build_quota2=m
index 33d0d74814731e627b7a33605d1ecd9d1360ca7d..8dd9267125b089aed655485330b730be2abc4b0f 100644 (file)
 +
 --- a/extensions/Kbuild
 +++ b/extensions/Kbuild
-@@ -27,6 +27,7 @@ obj-${build_pknock}      += pknock/
+@@ -28,6 +28,7 @@ obj-${build_pknock}      += pknock/
  obj-${build_psd}         += xt_psd.o
  obj-${build_quota2}      += xt_quota2.o
  obj-${build_rtsp}        += rtsp/
  -include ${M}/Kbuild.*
 --- a/extensions/Mbuild
 +++ b/extensions/Mbuild
-@@ -22,3 +22,4 @@ obj-${build_pknock}      += pknock/
+@@ -23,3 +23,4 @@ obj-${build_pknock}      += pknock/
  obj-${build_psd}         += libxt_psd.so
  obj-${build_quota2}      += libxt_quota2.so
  obj-${build_gradm}       += libxt_gradm.so
 +obj-${build_LUA}         += LUA/
 --- a/mconfig
 +++ b/mconfig
-@@ -23,3 +23,4 @@ build_pknock=m
+@@ -24,3 +24,4 @@ build_pknock=m
  build_psd=m
  build_quota2=m
  build_rtsp=m
diff --git a/net/xtables-addons/patches/300-geoip-endian-detection.patch b/net/xtables-addons/patches/300-geoip-endian-detection.patch
deleted file mode 100644 (file)
index 842e7af..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
---- a/extensions/libxt_geoip.c
-+++ b/extensions/libxt_geoip.c
-@@ -59,13 +59,13 @@ geoip_get_subnets(const char *code, uint
-       /* Use simple integer vector files */
-       if (nfproto == NFPROTO_IPV6) {
--#if __BYTE_ORDER == _BIG_ENDIAN
-+#if BYTE_ORDER == BIG_ENDIAN
-               snprintf(buf, sizeof(buf), GEOIP_DB_DIR "/BE/%s.iv6", code);
- #else
-               snprintf(buf, sizeof(buf), GEOIP_DB_DIR "/LE/%s.iv6", code);
- #endif
-       } else {
--#if __BYTE_ORDER == _BIG_ENDIAN
-+#if BYTE_ORDER == BIG_ENDIAN
-               snprintf(buf, sizeof(buf), GEOIP_DB_DIR "/BE/%s.iv4", code);
- #else
-               snprintf(buf, sizeof(buf), GEOIP_DB_DIR "/LE/%s.iv4", code);
diff --git a/net/yaaw/Makefile b/net/yaaw/Makefile
deleted file mode 100644 (file)
index c0016f2..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-#
-# Copyright (C) 2016-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:=yaaw
-PKG_VERSION:=2017-04-12
-PKG_RELEASE:=1
-
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/binux/yaaw.git
-PKG_MIRROR_HASH:=02c79d4233384df7b82e18740f96803da03260785a710be587b4c1554e900326
-PKG_SOURCE_VERSION:=d3a8346c5b9c2c1875dc79e1db2533b584fc8def
-
-PKG_LICENSE:=LGPL-3.0
-PKG_MAINTAINER:=Hsing-Wang Liao <kuoruan@gmail.com>
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/yaaw
-  SECTION:=net
-  CATEGORY:=Network
-  SUBMENU:=Download Manager
-  DEPENDS:=
-  TITLE:=Yet another aria2 web frontend
-  URL:=https://github.com/binux/yaaw
-  PKGARCH:=all
-endef
-
-define Package/yaaw/description
-       Yet Another Aria2 Web Frontend in pure HTML/CSS/Javascirpt.
-endef
-
-define Build/Compile
-endef
-
-define Package/yaaw/install
-       $(INSTALL_DIR) $(1)/www/yaaw
-       $(CP) \
-               $(PKG_BUILD_DIR)/{css,img,js} \
-               $(1)/www/yaaw
-       $(CP) \
-               $(PKG_BUILD_DIR)/{index.html,offline.appcache} \
-               $(1)/www/yaaw
-endef
-
-$(eval $(call BuildPackage,yaaw))
index 9c35acec28101b8a1496c53c1459f05fd9f93655..0b739fe54be43a3cbb6c1465392b72367a8805c3 100644 (file)
@@ -1,16 +1,17 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=yggdrasil
-PKG_VERSION:=0.3.5
-PKG_RELEASE:=4
+PKG_VERSION:=0.3.9
+PKG_RELEASE:=1
 
-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_SOURCE_URL:=https://codeload.github.com/yggdrasil-network/yggdrasil-go/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=34780dbdbcb486320097274ef9d3c606165c44132f250e481671f99686c77b73
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-go-$(PKG_VERSION)
 
-PKG_LICENSE:=GPL-3.0
 PKG_MAINTAINER:=William Fleurant <meshnet@protonmail.com>
+PKG_LICENSE:=LGPL-3.0-only
+PKG_LICENSE_FILES:=LICENSE
 
 PKG_BUILD_DEPENDS:=golang/host
 PKG_BUILD_PARALLEL:=1
index afdcdb4335e6818a02bd244d223748a0302cc6db..6ad3f6583bb5b64842d0140d5ebde6195f33daba 100755 (executable)
@@ -11,8 +11,10 @@ start_service()
 
        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_set_param command /usr/sbin/yggdrasil -useconffile /etc/yggdrasil.conf
+       procd_set_param stdout 1
+       procd_set_param stderr 1
        procd_close_instance
 }
 
index c5725aad981fe2c53c024ec953514e2b31655462..4413da2df0d9284bba0c28c4735e7c05dc0ad4b4 100644 (file)
@@ -6,16 +6,17 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=zerotier
-PKG_VERSION:=1.2.12
-PKG_RELEASE:=2
+PKG_VERSION:=1.4.6
+PKG_RELEASE:=1
 
-PKG_LICENSE:=GPL-3.0
-
-PKG_SOURCE_URL:=https://codeload.github.com/zerotier/ZeroTierOne/tar.gz/$(PKG_VERSION)?
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=212799bfaeb5e7dff20f2cd83f15742c8e13b8e9535606cfb85abcfb5fb6fed4
+PKG_SOURCE_URL:=https://codeload.github.com/zerotier/ZeroTierOne/tar.gz/$(PKG_VERSION)?
+PKG_HASH:=d1a0eeb03acfa446f67adf5901902d17de14b4648c21e160024acf476e3d4fba
 PKG_BUILD_DIR:=$(BUILD_DIR)/ZeroTierOne-$(PKG_VERSION)
 
+PKG_MAINTAINER:=Moritz Warning <moritzwarning@web.de>
+PKG_LICENSE:=BSL 1.1
+PKG_LICENSE_FILES:=LICENSE.txt
 
 PKG_BUILD_PARALLEL:=1
 include $(INCLUDE_DIR)/package.mk
@@ -27,7 +28,6 @@ define Package/zerotier
   TITLE:=Create flat virtual Ethernet networks of almost unlimited size
   URL:=https://www.zerotier.com
   SUBMENU:=VPN
-  MAINTAINER:=Moritz Warning <moritzwarning@web.de>
 endef
 
 define Package/zerotier/description
@@ -54,7 +54,15 @@ endef
 
 # Make binary smaller
 TARGET_CFLAGS += -ffunction-sections -fdata-sections
-TARGET_LDFLAGS += -Wl,--gc-sections
+TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
+
+ifdef CONFIG_USE_UCLIBC
+       TARGET_CFLAGS += -D'valloc(a)=aligned_alloc(getpagesize(),a)'
+endif
+
+define Package/zerotier/conffiles
+/etc/config/zerotier
+endef
 
 define Package/zerotier/install
        $(INSTALL_DIR) $(1)/usr/bin
index 1a016ebcfb416fbbf487db65edf20b7392148616..f342f851b5548daa4f216a4e1e18da2c293673e3 100644 (file)
@@ -7,6 +7,9 @@ config zerotier sample_config
 
        #option port '9993'
 
+       # path to the local.conf
+       #option local_conf '/etc/zerotier.conf'
+
        # Generate secret on first start
        option secret ''
 
index ba6b427fa75cf537a1451c7a3038928dedcfc4d8..c308b4246ee53ffd45aff5b11a5cfa93743dd26c 100755 (executable)
@@ -14,7 +14,7 @@ section_enabled() {
 
 start_instance() {
        local cfg="$1"
-       local port secret config_path path
+       local port secret config_path local_conf path
        local args=""
 
        if ! section_enabled "$cfg"; then
@@ -25,6 +25,7 @@ start_instance() {
        config_get config_path $cfg 'config_path'
        config_get port $cfg 'port'
        config_get secret $cfg 'secret'
+       config_get local_conf $cfg 'local_conf'
 
        path=${CONFIG_PATH}_$cfg
 
@@ -38,6 +39,9 @@ start_instance() {
                        return
                fi
 
+               # ensure that the symlink target exists
+               mkdir -p $(dirname $path)
+
                ln -s $config_path $path
        fi
 
@@ -71,6 +75,10 @@ start_instance() {
                rm -f $path/identity.public
        fi
 
+       if [ -f "$local_conf" ]; then
+               ln -s "$local_conf" $path/local.conf
+       fi
+
        add_join() {
                # an (empty) config file will cause ZT to join a network
                touch $path/networks.d/$1.conf
index 5ea4d697ee9ff574b10c30af259b14ffb69688ea..7aa9c7ead342437d961c01caabf5d599c0a04bbe 100644 (file)
@@ -1,4 +1,4 @@
-From c578216351a4daa3916265b39b14f7c23ef15c90 Mon Sep 17 00:00:00 2001
+From 14454285d7ef5b9cd134c86059933036c1aa2fef Mon Sep 17 00:00:00 2001
 From: Moritz Warning <moritzwarning@web.de>
 Date: Mon, 23 Apr 2018 22:12:31 +0200
 Subject: [PATCH 1/4] find miniupnpc.h in staging directory
@@ -8,10 +8,10 @@ Subject: [PATCH 1/4] find miniupnpc.h in staging directory
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/make-linux.mk b/make-linux.mk
-index 2e6a8632..0cd955d1 100644
+index b81c7aeb..a547125d 100644
 --- a/make-linux.mk
 +++ b/make-linux.mk
-@@ -22,8 +22,8 @@ ONE_OBJS+=osdep/LinuxEthernetTap.o
+@@ -29,8 +29,8 @@ TIMESTAMP=$(shell date +"%Y%m%d%H%M")
  # otherwise build into binary as done on Mac and Windows.
  ONE_OBJS+=osdep/PortMapper.o
  override DEFS+=-DZT_USE_MINIUPNPC
@@ -23,5 +23,5 @@ index 2e6a8632..0cd955d1 100644
        override DEFS+=-DZT_USE_SYSTEM_MINIUPNPC
        LDLIBS+=-lminiupnpc
 -- 
-2.17.0
+2.22.0
 
index 369698ff7760218ee6f13210239ebd1cb344b7f8..8f90d8f0a2f9898660397d5df90fe367d66690a1 100644 (file)
@@ -1,4 +1,4 @@
-From 7cfe751128d412a9b780ba5e4cb11908fc71cd3d Mon Sep 17 00:00:00 2001
+From 68fe97ef6b05e3709cd4b67c7681dcfc63bfaf80 Mon Sep 17 00:00:00 2001
 From: Moritz Warning <moritzwarning@web.de>
 Date: Mon, 30 Apr 2018 16:14:30 +0200
 Subject: [PATCH 2/4] remove -pie
@@ -10,10 +10,10 @@ when making a shared object; recompile with -fPIC" error
  1 file changed, 3 insertions(+), 3 deletions(-)
 
 diff --git a/make-linux.mk b/make-linux.mk
-index 0cd955d1..add1d3ae 100644
+index a547125d..13244741 100644
 --- a/make-linux.mk
 +++ b/make-linux.mk
-@@ -71,11 +71,11 @@ ifeq ($(ZT_DEBUG),1)
+@@ -77,11 +77,11 @@ ifeq ($(ZT_DEBUG),1)
        # C25519 in particular is almost UNUSABLE in -O0 even on a 3ghz box!
  node/Salsa20.o node/SHA512.o node/C25519.o node/Poly1305.o: CXXFLAGS=-Wall -O2 -g -pthread $(INCLUDES) $(DEFS)
  else
@@ -29,5 +29,5 @@ index 0cd955d1..add1d3ae 100644
        STRIP+=--strip-all
  endif
 -- 
-2.17.0
+2.22.0
 
diff --git a/net/zerotier/patches/0003-remove-arm32-conservative-CFLAGS.patch b/net/zerotier/patches/0003-remove-arm32-conservative-CFLAGS.patch
new file mode 100644 (file)
index 0000000..f2189b9
--- /dev/null
@@ -0,0 +1,25 @@
+From a856855ab97e0775a08e1571a4ad26c264cb13f4 Mon Sep 17 00:00:00 2001
+From: Moritz Warning <moritzwarning@web.de>
+Date: Sun, 4 Aug 2019 03:56:37 +0200
+Subject: [PATCH 3/4] remove arm32 conservative CFLAGS
+
+---
+ make-linux.mk | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/make-linux.mk b/make-linux.mk
+index 13244741..fd164dfa 100644
+--- a/make-linux.mk
++++ b/make-linux.mk
+@@ -262,7 +262,7 @@ ifeq ($(ZT_OFFICIAL),1)
+ endif
+ # ARM32 hell -- use conservative CFLAGS
+-ifeq ($(ZT_ARCHITECTURE),3)
++ifeq (0,3)
+       ifeq ($(shell if [ -e /usr/bin/dpkg ]; then dpkg --print-architecture; fi),armel)
+               override CFLAGS+=-march=armv5 -mfloat-abi=soft -msoft-float -mno-unaligned-access -marm
+               override CXXFLAGS+=-march=armv5 -mfloat-abi=soft -msoft-float -mno-unaligned-access -marm
+-- 
+2.22.0
+
index d14692b23c038e97d8ac0aad0ac27dc1e88af507..a28f4d8266da1069187c7cec4f71e9ce82748875 100644 (file)
@@ -1,4 +1,4 @@
-From a2cf8bf645d25f18cbc2ed7ad4b9a25725811afd Mon Sep 17 00:00:00 2001
+From 5169e5328525af28f6b7de087ece10a9bc0a2282 Mon Sep 17 00:00:00 2001
 From: Moritz Warning <moritzwarning@web.de>
 Date: Wed, 2 May 2018 16:06:46 +0200
 Subject: [PATCH 4/4] accept external linker flags
@@ -8,10 +8,10 @@ Subject: [PATCH 4/4] accept external linker flags
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/make-linux.mk b/make-linux.mk
-index 49e14f70..8e766bfb 100644
+index fd164dfa..29ff8813 100644
 --- a/make-linux.mk
 +++ b/make-linux.mk
-@@ -75,7 +75,7 @@ else
+@@ -81,7 +81,7 @@ else
        override CFLAGS+=-Wall -Wno-deprecated -pthread $(INCLUDES) -DNDEBUG $(DEFS)
        CXXFLAGS?=-O3 -fstack-protector
        override CXXFLAGS+=-Wall -Wno-deprecated -std=c++11 -pthread $(INCLUDES) -DNDEBUG $(DEFS)
@@ -21,5 +21,5 @@ index 49e14f70..8e766bfb 100644
        STRIP+=--strip-all
  endif
 -- 
-2.17.0
+2.22.0
 
diff --git a/net/zerotier/patches/0005-link-natpmp.patch b/net/zerotier/patches/0005-link-natpmp.patch
new file mode 100644 (file)
index 0000000..d1c8209
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/make-linux.mk
++++ b/make-linux.mk
+@@ -38,7 +38,7 @@ else
+       override DEFS+=-DMINIUPNP_STATICLIB -DMINIUPNPC_SET_SOCKET_TIMEOUT -DMINIUPNPC_GET_SRC_ADDR -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -DOS_STRING=\"Linux\" -DMINIUPNPC_VERSION_STRING=\"2.0\" -DUPNP_VERSION_STRING=\"UPnP/1.1\" -DENABLE_STRNATPMPERR
+       ONE_OBJS+=ext/miniupnpc/connecthostport.o ext/miniupnpc/igd_desc_parse.o ext/miniupnpc/minisoap.o ext/miniupnpc/minissdpc.o ext/miniupnpc/miniupnpc.o ext/miniupnpc/miniwget.o ext/miniupnpc/minixml.o ext/miniupnpc/portlistingparse.o ext/miniupnpc/receivedata.o ext/miniupnpc/upnpcommands.o ext/miniupnpc/upnpdev.o ext/miniupnpc/upnperrors.o ext/miniupnpc/upnpreplyparse.o
+ endif
+-ifeq ($(wildcard /usr/include/natpmp.h),)
++ifeq ($(wildcard $(STAGING_DIR)/usr/include/natpmp.h),)
+       ONE_OBJS+=ext/libnatpmp/natpmp.o ext/libnatpmp/getgateway.o
+ else
+       LDLIBS+=-lnatpmp
index efc98059984a15a5ab674655070369754cb684a3..d3b57963e606489d83e163ab518640e223ba5310 100644 (file)
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=znc
-PKG_VERSION:=1.7.3
-PKG_RELEASE:=3
+PKG_VERSION:=1.7.4
+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:=1e4cc31837a1e8e6cc310873659a167cec16a3fd4281cbc3bf364e42352c113d
+PKG_HASH:=b1a32921a8e6d79ee6c5900c8d07293026966db7c05aaac48984231befc49b71
 
 PKG_MAINTAINER:=Jonas Gorski <jonas.gorski@gmail.com>
 PKG_LICENSE:=Apache-2.0
index af53e2a0794d6d70e312a42e505e98db11676b33..9a1d863a7046ec723f763a6d4f3bc2dc56642f19 100644 (file)
@@ -8,15 +8,21 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=alsa-utils
-PKG_VERSION:=1.1.7
+PKG_VERSION:=1.1.9
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=ftp://ftp.alsa-project.org/pub/utils/ \
                http://distfiles.gentoo.org/distfiles/
-PKG_HASH:=1db27fb54ab7fdeb54b00d68b8a174808ffea198cfbd67e3c959482194e1540a
-PKG_INSTALL:=1
+PKG_HASH:=5ddf2cbddb4bd1a4a2a6492a09c25898b08c3ad64893c3655be14194cf0a213a
+
 PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
+PKG_LICENSE:=GPL-2.0-or-later
+PKG_LICENSE_FILES:=COPYING
+
+PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -25,7 +31,7 @@ define Package/alsa-utils
   CATEGORY:=Sound
   DEPENDS:=+alsa-lib +libncursesw +libpthread
   TITLE:=ALSA (Advanced Linux Sound Architecture) utilities
-  URL:=http://www.alsa-project.org/
+  URL:=https://www.alsa-project.org/
 endef
 
 define Package/alsa-utils-seq
@@ -33,7 +39,7 @@ define Package/alsa-utils-seq
   CATEGORY:=Sound
   DEPENDS:=+alsa-lib +libpthread
   TITLE:=ALSA sequencer utilities
-  URL:=http://www.alsa-project.org/
+  URL:=https://www.alsa-project.org/
 endef
 
 define Package/alsa-utils-tests
@@ -41,16 +47,16 @@ define Package/alsa-utils-tests
   CATEGORY:=Sound
   TITLE:=ALSA utilities test data (adds ~1.3M to image)
   DEPENDS:=+alsa-lib +libpthread
-  URL:=http://www.alsa-project.org/
+  URL:=https://www.alsa-project.org/
 endef
 
 CONFIGURE_ARGS+= \
-               --disable-rpath \
-               --disable-alsatest \
-               --disable-bat \
-               --disable-xmlto \
-               --disable-rst2man \
-               --with-curses=ncursesw
+       --disable-rpath \
+       --disable-alsatest \
+       --disable-bat \
+       --disable-xmlto \
+       --disable-rst2man \
+       --with-curses=ncursesw
 
 define Package/alsa-utils/install
        $(INSTALL_DIR) $(1)/usr/{s,}bin
index 987c9b8b79a97f466e1249a14b37cd096a989211..21c87f0b76df9de3390b075e75126a359e66a6f1 100644 (file)
@@ -1,6 +1,6 @@
 --- a/alsamixer/volume_mapping.c
 +++ b/alsamixer/volume_mapping.c
-@@ -114,9 +114,9 @@ static double get_normalized_volume(snd_
+@@ -108,9 +108,9 @@ static double get_normalized_volume(snd_
        if (use_linear_dB_scale(min, max))
                return (value - min) / (double)(max - min);
  
@@ -12,7 +12,7 @@
                normalized = (normalized - min_norm) / (1 - min_norm);
        }
  
-@@ -149,7 +149,7 @@ static int set_normalized_volume(snd_mix
+@@ -143,7 +143,7 @@ static int set_normalized_volume(snd_mix
        }
  
        if (min != SND_CTL_TLV_DB_GAIN_MUTE) {
index 2b670d96e634727623e9430e6c6c9cbfd5a5d7a3..f3dfa9d0c389db1507ae9b3777b7280d938dba4c 100644 (file)
@@ -1,5 +1,3 @@
-diff --git a/alsaloop/Makefile.am b/alsaloop/Makefile.am
-index 4cdf20b..0715b02 100644
 --- a/alsaloop/Makefile.am
 +++ b/alsaloop/Makefile.am
 @@ -1,9 +1,9 @@
@@ -15,21 +13,6 @@ index 4cdf20b..0715b02 100644
  # LDFLAGS = -static
  # CFLAGS += -g -Wall
  
-diff --git a/alsaloop/Makefile.in b/alsaloop/Makefile.in
-index 374cbcc..25dbae3 100644
---- a/alsaloop/Makefile.in
-+++ b/alsaloop/Makefile.in
-@@ -51,7 +51,7 @@ PRE_UNINSTALL = :
- POST_UNINSTALL = :
- build_triplet = @build@
- host_triplet = @host@
--@HAVE_SAMPLERATE_TRUE@am__append_1 = -lsamplerate
-+# @HAVE_SAMPLERATE_TRUE@am__append_1 = -lsamplerate
- bin_PROGRAMS = alsaloop$(EXEEXT)
- subdir = alsaloop
- DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
-diff --git a/configure.ac b/configure.ac
-index 3e8f1e8..487e5de 100644
 --- a/configure.ac
 +++ b/configure.ac
 @@ -38,8 +38,8 @@ AC_CHECK_HEADERS([alsa/use-case.h], [have_ucm="yes"], [have_ucm="no"],
index ea2bf903c5462e55c65e5eeb3f7ffbe5758d2dbd..76d21a59af6ce575e77f00f073df277b82c83b3f 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=forked-daapd
-PKG_VERSION:=26.4
-PKG_RELEASE:=1
+PKG_VERSION:=26.5
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://github.com/ejurgensen/$(PKG_NAME)/releases/download/$(PKG_VERSION)/
-PKG_HASH:=c37012faf56238544fc7274ad0ade7bf16c15a9ae6af9ef4ba56ba88e508fffa
+PKG_HASH:=6d12e5c1c078ff406413a08a65327c3b23d80605a997d3b219322a5c6a05923c
 
 PKG_FIXUP:=autoreconf
 PKG_USE_MIPS16:=0
diff --git a/sound/forked-daapd/patches/010-alsa.patch b/sound/forked-daapd/patches/010-alsa.patch
new file mode 100644 (file)
index 0000000..a4256ab
--- /dev/null
@@ -0,0 +1,36 @@
+From 20f5118f7505e2e82be3504624ac934b8837d25b Mon Sep 17 00:00:00 2001
+From: Scott Shambarger <devel@shambarger.net>
+Date: Tue, 11 Jun 2019 20:10:04 -0700
+Subject: [PATCH] [alsa] asoundlib.h should be alsa/asoundlib.h
+
+---
+ configure.ac       | 2 +-
+ src/outputs/alsa.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 9ec5eb101..98068bf11 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -238,7 +238,7 @@ AC_CHECK_SIZEOF([void *])
+ dnl --- Begin configuring the options ---
+ dnl ALSA
+ FORK_ARG_WITH_CHECK([FORKED_OPTS], [ALSA support], [alsa], [ALSA],
+-      [alsa], [snd_mixer_open], [asoundlib.h])
++      [alsa], [snd_mixer_open], [alsa/asoundlib.h])
+ AM_CONDITIONAL([COND_ALSA], [[test "x$with_alsa" = "xyes"]])
+ dnl PULSEAUDIO
+diff --git a/src/outputs/alsa.c b/src/outputs/alsa.c
+index b696f0c3d..1a32aad19 100644
+--- a/src/outputs/alsa.c
++++ b/src/outputs/alsa.c
+@@ -30,7 +30,7 @@
+ #include <inttypes.h>
+ #include <event2/event.h>
+-#include <asoundlib.h>
++#include <alsa/asoundlib.h>
+ #include "misc.h"
+ #include "conffile.h"
index 068280f3657ee13c44295ad25fa976ca17c56f5e..574bda9594065749fd95786fd83524d10411f0e6 100644 (file)
@@ -9,19 +9,20 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=madplay
 PKG_VERSION:=0.15.2b
-PKG_RELEASE:=6
+PKG_RELEASE:=7
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/mad \
        ftp://ftp.mars.org/pub/mpeg/
 PKG_HASH:=5a79c7516ff7560dffc6a14399a389432bc619c905b13d3b73da22fa65acede0
-PKG_LICENSE:=GPL-2.0+
-PKG_LICENSE_FILES:=COPYING
-PKG_MAINTAINER:=Simon Peter <probono@puredarwin.org>
 
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
+PKG_MAINTAINER:=Simon Peter <probono@puredarwin.org>
+PKG_LICENSE:=GPL-2.0-or-later
+PKG_LICENSE_FILES:=COPYING
 
 PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/nls.mk
@@ -45,40 +46,39 @@ define Package/madplay/description
        full support for ID3 tags.
 endef
 
-define Build/Configure
-       $(call Build/Configure/Default, \
-               --enable-shared \
-               --disable-static \
-               --disable-debugging \
-               --disable-profiling \
-               --disable-experimental \
-               --without-libiconv-prefix \
-               --without-libintl-prefix \
-               --without-esd \
-               , \
-               LIBS="-lz" \
-       )
-endef
+CONFIGURE_ARGS += \
+       --enable-shared \
+       --disable-static \
+       --disable-debugging \
+       --disable-profiling \
+       --disable-experimental \
+       --without-libiconv-prefix \
+       --without-libintl-prefix \
+       --without-esd \
+
+CONFIGURE_VARS += \
+       lt_prog_compiler_pic=$(FPIC)
+
+MAKE_FLAGS += CFLAGS="$(TARGET_CFLAGS)"
 
 ifeq ($(BUILD_VARIANT),alsa)
        CONFIGURE_ARGS += \
                --without-oss \
                --with-alsa
-endif
-
-ifeq ($(BUILD_VARIANT),oss)
+else
        CONFIGURE_ARGS += \
-               --without-alsa
+               --without-alsa \
+               --with-oss
 endif
 
 define Package/madplay/install
        $(INSTALL_DIR) $(1)/usr/bin
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/madplay $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/madplay $(1)/usr/bin/
 endef
 
 define Package/madplay-alsa/install
        $(INSTALL_DIR) $(1)/usr/bin
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/madplay $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/madplay $(1)/usr/bin/
 endef
 
 $(eval $(call BuildPackage,madplay-alsa))
index 8860ce19528d8674bd60415227f4c036c9e78ff4..eec46f9511c53514b07289c0ef2645d996993382 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=moc
 PKG_VERSION:=2.5.2
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://ftp.daper.net/pub/soft/moc/stable/
@@ -62,7 +62,7 @@ define Package/moc/install
        $(INSTALL_DIR) $(1)/usr/bin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mocp $(1)/usr/bin/
        $(INSTALL_DIR) $(1)/usr/lib/moc/decoder_plugins
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/moc/decoder_plugins/*.so $(1)/usr/lib/moc/decoder_plugins
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/moc/decoder_plugins/*.so $(1)/usr/lib/moc/decoder_plugins
 endef
 
 $(eval $(call BuildPackage,moc))
index 4cc0d13ce12bae4eac72a6b66ddfbd8cfde1fedd..ff50bbce4eb4047613cfe5db767e094c1104bae5 100644 (file)
@@ -7,13 +7,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mpc
 PKG_VERSION:=0.30
-PKG_RELEASE:=1
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://www.musicpd.org/download/mpc/0
 PKG_HASH:=65fc5b0a8430efe9acbe6e261127960682764b20ab994676371bdc797d867fce
 
-PKG_LICENSE:=GPL-2.0+
+PKG_LICENSE:=GPL-2.0-or-later
 PKG_LICENSE_FILES:=COPYING
 PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
 
index 6a56ca22441a9014b670c496efd300072b9113ce..609f3a375a1cecb748ed57d9f437e19372ec8e97 100644 (file)
@@ -7,14 +7,14 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mpd
 PKG_VERSION:=0.20.23
-PKG_RELEASE:=1
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=http://www.musicpd.org/download/mpd/0.20/
 PKG_HASH:=503e5f9f237290f568ff7956ab2f9aed563594bf749f19b8fe994fb21434afea
-PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
 
-PKG_LICENSE:=GPL-2.0
+PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
+PKG_LICENSE:=GPL-2.0-or-later
 PKG_LICENSE_FILES:=COPYING
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
@@ -48,7 +48,7 @@ endef
 define Package/mpd-full
 $(call Package/mpd/Default)
   TITLE+= (full)
-  DEPENDS+= +libffmpeg +libid3tag +libmms +libupnp +libshout
+  DEPENDS+= +libffmpeg +libid3tag +libmms +libupnp +libshout +pulseaudio-daemon +yajl
   PROVIDES:=mpd
   VARIANT:=full
 endef
@@ -99,7 +99,7 @@ define Package/mpd-avahi-service/conffiles
 /etc/avahi/services/mpd.service
 endef
 
-EXTRA_LDFLAGS += $(if $(ICONV_FULL),-liconv,-Wl,--whole-archive -liconv -Wl,--no-whole-archive)
+EXTRA_LDFLAGS += $(if $(ICONV_FULL),-liconv,-Wl,--whole-archive -liconv -Wl,--no-whole-archive) -Wl,-rpath-link=$(STAGING_DIR)/usr/lib/pulseaudio
 
 CONFIGURE_ARGS += \
        $(call autoconf_bool,CONFIG_IPV6,ipv6) \
@@ -130,7 +130,6 @@ CONFIGURE_ARGS += \
        --disable-nfs \
        --disable-openal \
        --disable-opus \
-       --disable-pulse \
        --disable-sidplay \
        --disable-smbclient \
        --disable-sndfile \
@@ -166,7 +165,9 @@ ifeq ($(BUILD_VARIANT),full)
        --enable-pipe-output \
        --enable-recorder-output \
        --enable-shout \
-       --disable-vorbis
+       --enable-pulse \
+       --disable-vorbis \
+       --enable-soundcloud
 endif
 
 ifeq ($(BUILD_VARIANT),mini)
@@ -179,6 +180,8 @@ ifeq ($(BUILD_VARIANT),mini)
        --disable-id3 \
        --disable-mms \
        --disable-shout \
+       --disable-soundcloud \
+       --disable-pulse \
        --enable-vorbis \
        --with-tremor=yes \
        --disable-recorder-output
index 3218b2e95db2535ad8bf4bc32856b8e67fc95fa4..f301f89b67b4ed87833630b4a4adaa38622c944c 100644 (file)
@@ -20,6 +20,7 @@ PKG_FIXUP:=libtool
 
 PKG_LICENSE:=LGPL-2.1 GPL-2.0
 PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:mpg123:mpg123
 
 PKG_INSTALL:=1
 
index 0d66b34baedfc40c01f8a28801412d5e9495ea30..1688f7c37273cb9ee2b52a19c842354ad1c3273b 100644 (file)
@@ -9,24 +9,22 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=pulseaudio
 PKG_VERSION:=12.2
-PKG_RELEASE:=1
+PKG_RELEASE:=4
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://freedesktop.org/software/pulseaudio/releases/
 PKG_HASH:=809668ffc296043779c984f53461c2b3987a45b7a25eb2f0a1d11d9f23ba4055
-PKG_LICENSE:=LGPL-2.1+
-PKG_LICENSE_FILES:=GPL LICENSE
 
-PKG_BUILD_PARALLEL:=1
-PKG_BUILD_DEPENDS:=intltool/host
+PKG_LICENSE:=LGPL-2.1-or-later
+PKG_LICENSE_FILES:=GPL LICENSE
+PKG_CPE_ID:=cpe:/a:pulseaudio:pulseaudio
 
 PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
+PKG_BUILD_DEPENDS:=intltool/host glib2/host
 PKG_USE_MIPS16:=0
 
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
-
-PKG_INSTALL = 1
-
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/nls.mk
 
@@ -84,7 +82,7 @@ endef
 define Package/pulseaudio-tools
   SECTION:=sound
   CATEGORY:=Sound
-  DEPENDS:=+libsndfile +pulseaudio
+  DEPENDS:=+libsndfile pulseaudio
   TITLE:=Tools for Pulseaudio
   URL:=http://www.pulseaudio.org
   VARIANT:=noavahi
@@ -93,7 +91,7 @@ endef
 define Package/pulseaudio-profiles
   SECTION:=sound
   CATEGORY:=Sound
-  DEPENDS:=+pulseaudio
+  DEPENDS:=pulseaudio
   TITLE:=Profiles for Pulseaudio
   URL:=http://www.pulseaudio.org
 endef
@@ -119,6 +117,7 @@ CONFIGURE_ARGS += \
        --disable-jack \
        --disable-asyncns \
        --disable-lirc \
+       --disable-tests \
        --disable-udev \
        --without-fftw \
        --without-soxr \
diff --git a/sound/pulseaudio/patches/010-also-include.patch b/sound/pulseaudio/patches/010-also-include.patch
new file mode 100644 (file)
index 0000000..aec5b17
--- /dev/null
@@ -0,0 +1,130 @@
+From 993d3fd89e5611997f1e165bf03edefb0204b0a4 Mon Sep 17 00:00:00 2001
+From: Olaf Hering <olaf@aepfle.de>
+Date: Wed, 27 Mar 2019 09:35:05 +0100
+Subject: [PATCH] alsa: Use correct header path
+
+Consumers are expected to use <alsa/asoundlib.h> instead of
+<asoundlib.h>.
+
+This is in preparation of an change to pkgconfig(alsa) to
+not pollute CFLAGS with -I/usr/include/alsa anymore.
+
+Signed-off-by: Olaf Hering <olaf@aepfle.de>
+---
+ src/modules/alsa/alsa-mixer.c         | 2 +-
+ src/modules/alsa/alsa-mixer.h         | 2 +-
+ src/modules/alsa/alsa-sink.c          | 2 +-
+ src/modules/alsa/alsa-source.c        | 2 +-
+ src/modules/alsa/alsa-ucm.c           | 2 +-
+ src/modules/alsa/alsa-util.c          | 2 +-
+ src/modules/alsa/alsa-util.h          | 2 +-
+ src/modules/alsa/module-alsa-source.c | 2 +-
+ 8 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/src/modules/alsa/alsa-mixer.c b/src/modules/alsa/alsa-mixer.c
+index 5cb99c8fd..cd99a75f8 100644
+--- a/src/modules/alsa/alsa-mixer.c
++++ b/src/modules/alsa/alsa-mixer.c
+@@ -23,7 +23,7 @@
+ #endif
+ #include <sys/types.h>
+-#include <asoundlib.h>
++#include <alsa/asoundlib.h>
+ #include <math.h>
+ #ifdef HAVE_VALGRIND_MEMCHECK_H
+diff --git a/src/modules/alsa/alsa-mixer.h b/src/modules/alsa/alsa-mixer.h
+index 3ea4d7329..65b071165 100644
+--- a/src/modules/alsa/alsa-mixer.h
++++ b/src/modules/alsa/alsa-mixer.h
+@@ -21,7 +21,7 @@
+   along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
+ ***/
+-#include <asoundlib.h>
++#include <alsa/asoundlib.h>
+ #include <pulse/sample.h>
+ #include <pulse/mainloop-api.h>
+diff --git a/src/modules/alsa/alsa-sink.c b/src/modules/alsa/alsa-sink.c
+index 28143402a..4b46708ce 100644
+--- a/src/modules/alsa/alsa-sink.c
++++ b/src/modules/alsa/alsa-sink.c
+@@ -25,7 +25,7 @@
+ #include <signal.h>
+ #include <stdio.h>
+-#include <asoundlib.h>
++#include <alsa/asoundlib.h>
+ #ifdef HAVE_VALGRIND_MEMCHECK_H
+ #include <valgrind/memcheck.h>
+diff --git a/src/modules/alsa/alsa-source.c b/src/modules/alsa/alsa-source.c
+index 8129220b0..c8bf649e1 100644
+--- a/src/modules/alsa/alsa-source.c
++++ b/src/modules/alsa/alsa-source.c
+@@ -25,7 +25,7 @@
+ #include <signal.h>
+ #include <stdio.h>
+-#include <asoundlib.h>
++#include <alsa/asoundlib.h>
+ #include <pulse/rtclock.h>
+ #include <pulse/timeval.h>
+diff --git a/src/modules/alsa/alsa-ucm.c b/src/modules/alsa/alsa-ucm.c
+index 341c8012e..0a40ca8fe 100644
+--- a/src/modules/alsa/alsa-ucm.c
++++ b/src/modules/alsa/alsa-ucm.c
+@@ -27,7 +27,7 @@
+ #include <ctype.h>
+ #include <sys/types.h>
+ #include <limits.h>
+-#include <asoundlib.h>
++#include <alsa/asoundlib.h>
+ #ifdef HAVE_VALGRIND_MEMCHECK_H
+ #include <valgrind/memcheck.h>
+diff --git a/src/modules/alsa/alsa-util.c b/src/modules/alsa/alsa-util.c
+index e8d712e72..bd0a47e50 100644
+--- a/src/modules/alsa/alsa-util.c
++++ b/src/modules/alsa/alsa-util.c
+@@ -23,7 +23,7 @@
+ #endif
+ #include <sys/types.h>
+-#include <asoundlib.h>
++#include <alsa/asoundlib.h>
+ #include <pulse/sample.h>
+ #include <pulse/xmalloc.h>
+diff --git a/src/modules/alsa/alsa-util.h b/src/modules/alsa/alsa-util.h
+index 6b27339ec..4ceaa06ee 100644
+--- a/src/modules/alsa/alsa-util.h
++++ b/src/modules/alsa/alsa-util.h
+@@ -21,7 +21,7 @@
+   along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
+ ***/
+-#include <asoundlib.h>
++#include <alsa/asoundlib.h>
+ #include <pulse/sample.h>
+ #include <pulse/channelmap.h>
+diff --git a/src/modules/alsa/module-alsa-source.c b/src/modules/alsa/module-alsa-source.c
+index af6800dd2..747ba9342 100644
+--- a/src/modules/alsa/module-alsa-source.c
++++ b/src/modules/alsa/module-alsa-source.c
+@@ -24,7 +24,7 @@
+ #include <stdio.h>
+-#include <asoundlib.h>
++#include <alsa/asoundlib.h>
+ #ifdef HAVE_VALGRIND_MEMCHECK_H
+ #include <valgrind/memcheck.h>
+-- 
+2.22.0
+
index d64ff5941b68985db259d517b1de727ca85b3c7e..13834ba5169bb15ebc2f39b9f7c3b968f390f521 100644 (file)
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=squeezelite
 PKG_VERSION:=1.9.1-1130
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_LICENSE:=GPL-3.0
 PKG_LICENSE_FILES:=LICENSE.txt
index 6bfcaab3aa77e51e9edc86d6f0ef4e45c0106662..a6895e21ec538807ef779aba51e982b4c34b9cfb 100644 (file)
@@ -1,4 +1,3 @@
-
 config options 'options'
        option name 'SqueezeWrt'
        option model_name 'SqueezeLite'
@@ -6,7 +5,6 @@ config options 'options'
        option priority '0'
        option max_sr '0'
        option device 'hw:0,0'
-       option decoder_auto_conf '1'
        option dsd_over_pcm '0'
        option ircontrol '0'
        option interface ''
index de320daf35e16e1406d18911ed92d2436c96d46a..330cc407b7f5cd848cf75853f3d2ae2117fcf558 100644 (file)
@@ -7,38 +7,18 @@ STOP=1
 USE_PROCD=1
 PROG=/usr/bin/squeezelite
 
-#
-# Auto config checks for existing codec installations if not specified in config
-# Explicit disable (override) by setting appropriate "decode_xxx" in config
-#
+# Check if a codec is disabled in the configuration (ie "decode_<codec> 0")
 checkcodec() {
-       config_get_bool auto_conf options "decoder_auto_conf" 1
-       config_get_bool codec options "$1" $auto_conf
-       
-       if [ $codec -ne 0 ] ; then 
-               if [ $auto_conf -eq 0 ] ; then
-                       #force use requested
-                       echo "$4"
+       config_get_bool codec options "$1" 1
+
+       if [ $codec -eq 0 ] ; then
+               if [ -z "$3" ] ; then
+                       echo "-e $2"
                else
-                       if [ -e "/usr/lib/${2}" ] ; then
-                               # Use codec (it exists)
-                               echo "$4"
-                       else
-                               #exclude non-existant
-                               if [ -z "$4" ] ; then
-                                       echo "-e $3"
-                               else
-                                       echo "$4,$3"
-                               fi
-                       fi
-               fi
-       else
-               # explicitly excluded
-               if [ -z "$4" ] ; then
-                       echo "-e $3"
-               else
-                       echo "$4,$3"
+                       echo "$3,$2"
                fi
+       else
+               echo "$3"
        fi
 }
 
@@ -59,10 +39,10 @@ make_cmdline() {
 
        config_get alsa_buffer options alsa_buffer 200
        [ $alsa_buffer -eq 0 ] && alsa_buffer="200"
-    
+
        config_get alsa_period options alsa_period 4
        [ $alsa_period -eq 0 ] && alsa_period="4"
-    
+
        config_get alsa_format options alsa_format 16
        [ $alsa_format = "0" ] && alsa_format="16"
 
@@ -95,20 +75,12 @@ make_cmdline() {
        config_get priority options priority 0
        [ $priority -ne 0 ] && cmdline="$cmdline -p $priority"
 
-       #
-       # ***NOTE: codec lib names are in squeezelite.h (set decode_auto_conf to 0 to ignore)
-       #
        local excl_codecs=""
-       local vorbis_lib="libvorbisidec.so.1"
-
-       excl_codecs=`checkcodec decode_flac "libFLAC.so.8" flac "$excl_codecs"`
-       excl_codecs=`checkcodec decode_mp3 "libmpg123.so.0" mp3 "$excl_codecs"`
-       excl_codecs=`checkcodec decode_aac "libfaad.so.2" aac "$excl_codecs"`
-
-       [ -e "/usr/lib/$vorbis_lib" ] || vorbis_lib="libvorbisfile.so.3"
-
-       excl_codecs=`checkcodec decode_ogg "$vorbis_lib" ogg "$excl_codecs"`
-       excl_codecs=`checkcodec decode_wma_alac "libavcodec.so.56" wma,alac "$excl_codecs"`
+       excl_codecs=$(checkcodec decode_flac flac "$excl_codecs")
+       excl_codecs=$(checkcodec decode_mp3 mp3 "$excl_codecs")
+       excl_codecs=$(checkcodec decode_aac aac "$excl_codecs")
+       excl_codecs=$(checkcodec decode_ogg ogg "$excl_codecs")
+       excl_codecs=$(checkcodec decode_wma_alac wma,alac "$excl_codecs")
        cmdline="$cmdline $excl_codecs"
 
        config_get dop options dsd_over_pcm 0
index 259e8c9c3be4ec5a3da312e9c082be74c1a4a435..3d1a614a0e00607bdf985d087edbe98fad231e12 100644 (file)
@@ -8,19 +8,19 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=upmpdcli
-PKG_VERSION:=1.4.0
+PKG_VERSION:=1.4.2
 PKG_RELEASE:=1
 
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://www.lesbonscomptes.com/upmpdcli/downloads
+PKG_HASH:=1d4489e76416b9cff2e98a68243d56bf46303890752ac18db382be2859b62bc3
+
 PKG_MAINTAINER:=Petko Bordjukov <bordjukov@gmail.com>
-PKG_LICENSE:=GPL-2.0
+PKG_LICENSE:=LGPL-2.1-or-later
 PKG_LICENSE_FILES:=COPYING
 
-PKG_SOURCE_URL:=https://www.lesbonscomptes.com/upmpdcli/downloads
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=28742910fa16b72f0c4e5b7dc561f59aa7f1a5fdd3e8e4f72f359d2e4af90d35
-
-PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
index 6c69209c24eb03ec0d53accfe7648a1fd6463f62..061628f94fb9883712979cb4855dea91f068a5af 100644 (file)
@@ -16,7 +16,9 @@ append_arg() {
         local val
 
         config_get val "$cfg" "$var"
-        [ -n "$val" -o -n "$def" ] && procd_append_param command $opt "${val:-$def}"
+        if [ -n "$val" ] || [ -n "$def" ]; then
+               procd_append_param command "$opt" "${val:-$def}"
+       fi
 }
 
 start_instance() {
diff --git a/sound/upmpdcli/patches/100-Use-uint64_t-instead-of-u_int64_t.patch b/sound/upmpdcli/patches/100-Use-uint64_t-instead-of-u_int64_t.patch
deleted file mode 100644 (file)
index de0da18..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-From 256394399f57ba6e3057ee2c981127a14e4623f8 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?J=C3=B6rg=20Krause?= <joerg.krause@embedded.rocks>
-Date: Tue, 22 Jan 2019 09:07:56 +0100
-Subject: [PATCH] Use uint64_t instead of u_int64_t
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-`uintN_t` is standard C99 type available in `<stdint.h>`, whereas `u_intN_t`
-is defined `<sys/types.h>`
-
-As upmpdcli already uses the `uintN_t` type, replace the few existing
-`u_intN_t` types, as it breaks build with the musl C library, which is
-very strict, because of the missing `<sys/types.h>`:
-
-```
-src/mediaserver/cdplugins/netfetch.h:71:5: error: ‘u_int64_t’ does not name a type
-     u_int64_t datacount() {
-```
----
- src/mediaserver/cdplugins/netfetch.h | 12 ++++++------
- 1 file changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/src/mediaserver/cdplugins/netfetch.h b/src/mediaserver/cdplugins/netfetch.h
-index d7e9df4..d105e53 100644
---- a/src/mediaserver/cdplugins/netfetch.h
-+++ b/src/mediaserver/cdplugins/netfetch.h
-@@ -68,7 +68,7 @@ public:
-     /// Reset after transfer done, for retrying for exemple.
-     virtual bool reset() = 0;
--    u_int64_t datacount() {
-+    uint64_t datacount() {
-         return fetch_data_count;
-     }
-@@ -84,11 +84,11 @@ public:
-         buf1cb = f;
-     }
-     // Called when the network transfer is done
--    void setEOFetchCB(std::function<void(bool ok, u_int64_t count)> f) {
-+    void setEOFetchCB(std::function<void(bool ok, uint64_t count)> f) {
-         eofcb = f;
-     }
-     // Called every time we get new data from the remote
--    void setFetchBytesCB(std::function<void(u_int64_t count)> f) {
-+    void setFetchBytesCB(std::function<void(uint64_t count)> f) {
-         fbcb = f;
-     }
-@@ -98,11 +98,11 @@ protected:
-     std::string _url;
-     uint64_t startoffset;
-     int timeoutsecs{0};
--    u_int64_t fetch_data_count{0};
-+    uint64_t fetch_data_count{0};
-     BufXChange<ABuffer*> *outqueue{nullptr};
-     std::function<bool(std::string&, void *, int)> buf1cb;
--    std::function<void(u_int64_t)> fbcb;
--    std::function<void(bool, u_int64_t)> eofcb;
-+    std::function<void(uint64_t)> fbcb;
-+    std::function<void(bool, uint64_t)> eofcb;
- };
- #endif /* _MEDIAFETCH_H_INCLUDED_ */
--- 
-2.11.0
-
index c327aa8489787a7ed85fc9c5c3572ef306665bd3..7c9b32228fe46b8b3d6c49fcd939ba6ab4dafcd5 100644 (file)
@@ -17,6 +17,7 @@ PKG_HASH:=28b77b62d3f64ebd1c2a3d16bccc6d4333b4e24a86aeacebec255fad223cf4cb
 PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:tedfelix:acpid
 
 include $(INCLUDE_DIR)/package.mk
 
index 10ba299aaa6fdf776fca289174a0584c0c6a512d..6ba1903b6815cddfc16ad6566d7ed688575e632d 100644 (file)
@@ -7,15 +7,15 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ap51-flash
-PKG_VERSION:=2018.0
-PKG_RELEASE:=1
+PKG_VERSION:=2019.0
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/ap51-flash/ap51-flash/releases/download/v$(PKG_VERSION)
-PKG_HASH:=e38e48a12d7c7b8e189f5538b78bbf00548044414d9ededa18ec9a5b5886afaa
+PKG_HASH:=e7992b2151721cc6f5db91f443ad7fc83cb5604c08cd11fca3e78ecd6b538e57
 PKG_MAINTAINER:=Russell Senior <russell@personaltelco.net>
-PKG_LICENSE:=GPL-3.0+
-PKG_LICENSE_FILES:=LICENSES/preferred/GPL-3.0
+PKG_LICENSE:=GPL-3.0-or-later CC0-1.0
+PKG_LICENSE_FILES:=LICENSES/GPL-3.0-or-later.txt LICENSES/CC0-1.0.txt
 
 include $(INCLUDE_DIR)/package.mk
 
index c37b6b07cf55fb457ba9d360b96779efaad66531..08a8b6121c853c29674adcc02d4a941ce08a1599 100644 (file)
@@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=at
 PKG_VERSION:=3.1.23
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz
 PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/a/at
 PKG_HASH:=97450aa954aaa8a70218cc8e61a33df9fee9f86527e9f861de302fb7a3c81710
 
-PKG_LICENSE:=GPL-2.0+ GPL-3.0+ ISC
+PKG_LICENSE:=GPL-2.0-or-later GPL-3.0-or-later ISC
 PKG_LICENSE_FILES:=COPYING Copyright
 PKG_MAINTAINER:=Phil Eichinger <phil@zankapfel.net>
 
index 0a79cde726546d9e296b882e9ab0f6415e309a3e..eb107ce8f34752c128c72d93fdc1aabb533af7dc 100644 (file)
@@ -9,18 +9,17 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=attr
 PKG_VERSION:=2.4.48
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://git.savannah.nongnu.org/cgit/attr.git/snapshot
 PKG_HASH:=095699f71230ace37e5bc680c6f9d15cf8e53eb38d00b2c46db5cc7e0712e5f3
-PKG_MAINTAINER:=Maxim Storchak <m.storchak@gmail.com>
 
-PKG_LICENSE:=LGPL-2.1 GPL-2.0
-PKG_LICENSE_FILES:=doc/COPYING doc/COPYING.LGPL
+PKG_MAINTAINER:=Maxim Storchak <m.storchak@gmail.com>
 
-PKG_INSTALL:=1
 PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -39,6 +38,8 @@ $(call Package/attr/Default)
   SECTION:=utils
   CATEGORY:=Utilities
   TITLE+=utils
+  LICENSE:=GPL-2.0-or-later
+  LICENSE_FILES:=doc/COPYING
   DEPENDS:=+libattr
 endef
 
@@ -47,6 +48,8 @@ $(call Package/attr/Default)
   SECTION:=libs
   CATEGORY:=Libraries
   TITLE+=library
+  LICENSE:=LGPL-2.1-or-later
+  LICENSE_FILES:=doc/COPYING.LGPL
 endef
 
 define Package/libattr/description
@@ -81,8 +84,8 @@ define Package/attr/conffiles
 endef
 
 define Build/InstallDev
-       mkdir -p $(1)/usr/include
-       mkdir -p $(1)/usr/lib/pkgconfig
+       $(INSTALL_DIR) $(1)/usr/include
+       $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
        $(CP) $(PKG_INSTALL_DIR)/usr/{include,lib} $(1)/usr/
 endef
 
diff --git a/utils/attr/patches/110-Replace-bzero-with-memset.patch b/utils/attr/patches/110-Replace-bzero-with-memset.patch
new file mode 100644 (file)
index 0000000..4607451
--- /dev/null
@@ -0,0 +1,69 @@
+From 0ce120a140dadaa56875af2efc66ff805d37925b Mon Sep 17 00:00:00 2001
+From: Rosen Penev <rosenp@gmail.com>
+Date: Sun, 11 Aug 2019 16:17:11 -0700
+Subject: [PATCH] attr: Replace bzero with memset
+
+bzero is a deprecated function that is optionally unavailable with
+uClibc-ng.
+
+Signed-off-by: Rosen Penev <rosenp@gmail.com>
+---
+ include/attributes.h | 4 ++--
+ libattr/libattr.c    | 4 ++--
+ tools/attr.c         | 2 +-
+ 3 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/include/attributes.h b/include/attributes.h
+index 14beb8f..039c817 100644
+--- a/include/attributes.h
++++ b/include/attributes.h
+@@ -91,9 +91,9 @@ typedef struct attrlist_ent {        /* data from attr_list() */
+  * Implement a "cursor" for use in successive attr_list() calls.
+  * It provides a way to find the last attribute that was returned in the
+  * last attr_list() call so that we can get the next one without missing
+- * any.  This should be bzero()ed before use and whenever it is desired to
++ * any.  This should be zeroed before use and whenever it is desired to
+  * start over from the beginning of the attribute list.  The only valid
+- * operation on a cursor is to bzero() it.
++ * operation on a cursor is to zero it.
+  */
+ typedef struct attrlist_cursor {
+       uint32_t        opaque[4];      /* an opaque cookie */
+diff --git a/libattr/libattr.c b/libattr/libattr.c
+index d550e10..2ebd1c5 100644
+--- a/libattr/libattr.c
++++ b/libattr/libattr.c
+@@ -298,7 +298,7 @@ attr_list(const char *path, char *buffer, const int buffersize, int flags,
+               errno = EINVAL;
+               return -1;
+       }
+-      bzero(buffer, sizeof(attrlist_t));
++      memset(buffer, 0, sizeof(attrlist_t));
+       if (flags & ATTR_DONTFOLLOW)
+               length = llistxattr(path, lbuf, sizeof(lbuf));
+@@ -348,7 +348,7 @@ attr_listf(int fd, char *buffer, const int buffersize, int flags,
+               errno = EINVAL;
+               return -1;
+       }
+-      bzero(buffer, sizeof(attrlist_t));
++      memset(buffer, 0, sizeof(attrlist_t));
+       length = flistxattr(fd, lbuf, sizeof(lbuf));
+       if (length < 0)
+diff --git a/tools/attr.c b/tools/attr.c
+index c8aa0b4..312aef1 100644
+--- a/tools/attr.c
++++ b/tools/attr.c
+@@ -228,7 +228,7 @@ main(int argc, char **argv)
+                       perror("malloc");
+                       exit(1);
+               }
+-              bzero((char *)&cursor, sizeof(cursor));
++              memset(&cursor, 0, sizeof(cursor));
+               do {
+                       error = attr_list(filename, buffer, BUFSIZE,
+                                         attrflags, &cursor);
+-- 
+2.17.1
+
index bac8fd468ffbc806913726abcfc280edfaf113ac..04f9b155d951bb7fe88361f6237df64653dace65 100644 (file)
@@ -9,14 +9,14 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=avrdude
 PKG_VERSION:=6.3
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SAVANNAH/$(PKG_NAME)
 PKG_HASH:=0f9f731b6394ca7795b88359689a7fa1fba818c6e1d962513eb28da670e0a196
 
 PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
-PKG_LICENSE:=GPL-2.0
+PKG_LICENSE:=GPL-2.0-or-later
 PKG_LICENSE_FILES:=COPYING
 
 PKG_FIXUP:=autoreconf
@@ -30,7 +30,7 @@ define Package/avrdude
   CATEGORY:=Utilities
   SUBMENU:=Microcontroller programming
   TITLE:=AVR Downloader/UploaDEr
-  URL:=http://www.nongnu.org/avrdude/
+  URL:=https://www.nongnu.org/avrdude/
   DEPENDS:=+libncurses +libreadline +libusb-compat +libftdi1 +libelf
 endef
 
diff --git a/utils/avrdude/patches/110-ud-to-u.patch b/utils/avrdude/patches/110-ud-to-u.patch
new file mode 100644 (file)
index 0000000..4036c28
--- /dev/null
@@ -0,0 +1,38 @@
+--- a/linuxgpio.c
++++ b/linuxgpio.c
+@@ -66,7 +66,7 @@ static int linuxgpio_export(unsigned int gpio)
+     return fd;
+   }
+-  len = snprintf(buf, sizeof(buf), "%ud", gpio);
++  len = snprintf(buf, sizeof(buf), "%u", gpio);
+   r = write(fd, buf, len);
+   close(fd);
+@@ -84,7 +84,7 @@ static int linuxgpio_unexport(unsigned int gpio)
+     return fd;
+   }
+-  len = snprintf(buf, sizeof(buf), "%ud", gpio);
++  len = snprintf(buf, sizeof(buf), "%u", gpio);
+   r = write(fd, buf, len);
+   close(fd);
+@@ -95,7 +95,7 @@ static int linuxgpio_openfd(unsigned int gpio)
+ {
+   char filepath[60];
+-  snprintf(filepath, sizeof(filepath), "/sys/class/gpio/gpio%ud/value", gpio);
++  snprintf(filepath, sizeof(filepath), "/sys/class/gpio/gpio%u/value", gpio);
+   return (open(filepath, O_RDWR));
+ }
+@@ -104,7 +104,7 @@ static int linuxgpio_dir(unsigned int gpio, unsigned int dir)
+   int fd, r;
+   char buf[60];
+-  snprintf(buf, sizeof(buf), "/sys/class/gpio/gpio%ud/direction", gpio);
++  snprintf(buf, sizeof(buf), "/sys/class/gpio/gpio%u/direction", gpio);
+   fd = open(buf, O_WRONLY);
+   if (fd < 0) {
index 06c51382d1ca34346fc62629f687deb71dfeaf18..ce3f03ddc732c89c2bdc1ebd71e020db4c22e30b 100644 (file)
@@ -9,15 +9,16 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=bash
 PKG_VERSION:=5.0
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@GNU/bash
 PKG_HASH:=b4a80f2ac66170b2913efbfb9f2594f1f76c7b1afd11f799e22035d63077fb4d
 
-PKG_LICENSE:=GPL-3.0+
+PKG_LICENSE:=GPL-3.0-or-later
 PKG_LICENSE_FILES:=COPYING
 PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
+PKG_CPE_ID:=cpe:/a:gnu:bash
 
 PKG_INSTALL:=1
 
diff --git a/utils/bigclown/bigclown-firmware-tool/Makefile b/utils/bigclown/bigclown-firmware-tool/Makefile
new file mode 100644 (file)
index 0000000..9722d62
--- /dev/null
@@ -0,0 +1,46 @@
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=bigclown-firmware-tool
+PKG_VERSION:=1.4.1
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/bigclownlabs/bch-firmware-tool/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=076acd25af717fa9cc0ce180e2e863cfce8957d00cc24e982f44c91bae10f956
+PKG_BUILD_DIR:=$(BUILD_DIR)/bch-firmware-tool-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Karel Kočí <cynerd@email.cz>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+
+include $(INCLUDE_DIR)/package.mk
+include ../../../lang/python/python3-package.mk
+
+define Package/$(PKG_NAME)
+  SECTION:=utils
+  CATEGORY:=Utilities
+  SUBMENU:=BigClown
+  TITLE:=BigCLown firmware tool
+  URL:=https://github.com/bigclownlabs/bch-firmware-tool
+  DEPENDS:= \
+    +python3-appdirs \
+    +python3-pyserial \
+    +python3-colorama \
+    +python3-yaml \
+    +python3-schema \
+    +python3-requests \
+    +python3-click \
+    +python3-intelhex
+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)))
index 14a462f81bcd4bc760ff7e4197e48f9f79c7977a..b87b548a1b68e3aa8863ccd24028a77df3919c60 100644 (file)
@@ -5,12 +5,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=bigclown-mqtt2influxdb
-PKG_VERSION:=1.1.0
+PKG_VERSION:=1.2.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_HASH:=60a3ba8a3d76356ed46fbb7bcbedaf439b7edc2dfc2d43232c9250db80c77387
 PKG_LICENSE:=MIT
 PKG_MAINTAINER:=Karel Kočí <cynerd@email.cz>
 PKG_BUILD_DIR:=$(BUILD_DIR)/bch-mqtt2influxdb-$(PKG_VERSION)
index 55a3e665fcf4836d218bcb55c05f45221334aca7..5c95600ffd8e3b41dca55dfaa9acea8bb1fa67c5 100644 (file)
@@ -10,8 +10,7 @@ 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 command "$PROG" -d -c "$CONF"
        procd_set_param stdout 1
        procd_set_param stderr 1
        procd_close_instance
index a12261a7149827a5ba027868fbb36718e627ed54..7a700320e0b1d3e652d9b4865d98338966eca86b 100644 (file)
@@ -9,15 +9,16 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=bluez
 PKG_VERSION:=5.50
-PKG_RELEASE:=4
+PKG_RELEASE:=5
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@KERNEL/linux/bluetooth/
 PKG_HASH:=5ffcaae18bbb6155f1591be8c24898dc12f062075a40b538b745bfd477481911
 
-PKG_LICENSE:=GPL-2.0+
+PKG_LICENSE:=GPL-2.0-or-later
 PKG_LICENSE_FILES:=COPYING
 PKG_MAINTAINER:=
+PKG_CPE_ID:=cpe:/a:bluez:bluez
 
 PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
@@ -43,6 +44,14 @@ $(call Package/bluez/Default)
   SECTION:=utils
   CATEGORY:=Utilities
   TITLE+= utilities
+  DEPENDS:=+bluez-libs
+endef
+
+define Package/bluez-utils-extra
+$(call Package/bluez/Default)
+  SECTION:=utils
+  CATEGORY:=Utilities
+  TITLE+= additional utilities
   DEPENDS:=+bluez-libs +libpthread +librt +glib2 +libncurses +libreadline $(INTL_DEPENDS) $(ICONV_DEPENDS) +dbus
 endef
 
@@ -51,7 +60,7 @@ $(call Package/bluez/Default)
   SECTION:=utils
   CATEGORY:=Utilities
   TITLE+= daemon
-  DEPENDS:=+bluez-libs +bluez-utils +dbus +libical $(INTL_DEPENDS) $(ICONV_DEPENDS)
+  DEPENDS:=+bluez-libs +bluez-utils +bluez-utils-extra +glib2 +libncurses +libreadline +dbus +libical $(INTL_DEPENDS) $(ICONV_DEPENDS)
 endef
 
 define Package/bluez-daemon/conffiles
@@ -106,7 +115,6 @@ define Package/bluez-utils/install
        $(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/
@@ -115,9 +123,14 @@ define Package/bluez-utils/install
        $(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/
+endef
+
+define Package/bluez-utils-extra/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/btmgmt $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mpris-proxy $(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
@@ -140,4 +153,5 @@ endef
 
 $(eval $(call BuildPackage,bluez-libs))
 $(eval $(call BuildPackage,bluez-utils))
+$(eval $(call BuildPackage,bluez-utils-extra))
 $(eval $(call BuildPackage,bluez-daemon))
index 632d348eb4b53eb15862a0fa930040366e29d728..3387a78bccc203aa51f8fbef854191bec150f395 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=bonnie++
 PKG_VERSION:=1.98
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
 PKG_SOURCE_URL:=https://www.coker.com.au/bonnie++/
@@ -19,8 +19,8 @@ PKG_MAINTAINER:=Florian Fainelli <florian@openwrt.org>
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=copyright.txt
 
-PKG_BUILD_PARALLEL:=1
 PKG_FIXUP:=autoreconf
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/uclibc++.mk
 include $(INCLUDE_DIR)/package.mk
@@ -42,7 +42,7 @@ ifeq ($(CONFIG_USE_UCLIBCXX),y)
 TARGET_LDFLAGS += -nodefaultlibs
 endif
 
-TARGET_CXXFLAGS += -fno-rtti -flto
+TARGET_CXXFLAGS += -ffunction-sections -fdata-sections -fno-rtti -flto -std=c++98
 
 define Package/bonniexx/install
        $(INSTALL_DIR) $(1)/usr/bin
index 6da2bff6e141757bfce77bfced1fccca7173c3a7..2ea0aadef73e26274a7dd36352e988be9fde5884 100644 (file)
@@ -6,16 +6,16 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=btrfs-progs
-PKG_VERSION:=4.20.2
-PKG_RELEASE:=3
+PKG_VERSION:=5.2.2
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@KERNEL/linux/kernel/people/kdave/btrfs-progs
-PKG_HASH:=890f8b7e162f2bbfaa5c7b23e8b6f791fd3f325239a0510871fa4b45e4a80e7c
+PKG_HASH:=821321dbf17087e1172023fa35656ce52d342fbfe210fb8ea01fc57b65dfb1c6
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-v$(PKG_VERSION)
 
 PKG_MAINTAINER:=Karel Kočí <karel.koci@nic.cz>
-PKG_LICENSE:=GPL-2.0
+PKG_LICENSE:=GPL-2.0-only
 PKG_LICENSE_FILES:=COPYING
 
 PKG_INSTALL:=1
@@ -28,9 +28,9 @@ define Package/btrfs-progs
   SECTION:=utils
   CATEGORY:=Utilities
   SUBMENU:=Filesystem
-  DEPENDS:=+libattr +libuuid +zlib +libblkid +liblzo +libpthread +BTRFS_PROGS_ZSTD:libzstd
   TITLE:=Btrfs filesystems utilities
   URL:=https://btrfs.wiki.kernel.org/
+  DEPENDS:=+libattr +libuuid +zlib +libblkid +liblzo +libpthread +BTRFS_PROGS_ZSTD:libzstd
 endef
 
 define Package/btrfs-progs/description
@@ -44,8 +44,8 @@ define Package/btrfs-progs/config
        source "$(SOURCE)/Config.in"
 endef
 
-progs = btrfs btrfs-find-root btrfs-image btrfs-map-logical \
-       btrfs-select-super btrfstune mkfs.btrfs
+boxprogs = btrfsck mkfs.btrfs btrfs-image btrfstune btrfs-find-root
+progs = btrfs-map-logical btrfs-select-super
 
 TARGET_CFLAGS += -ffunction-sections -fdata-sections
 TARGET_LDFLAGS += -Wl,--gc-sections -Wl,--as-needed
@@ -61,6 +61,10 @@ ifneq ($(CONFIG_BTRFS_PROGS_ZSTD),y)
 CONFIGURE_ARGS += --disable-zstd
 endif
 
+MAKE_INSTALL_FLAGS += BUILD_PROGRAMS=0
+
+Build/Compile=$(call Build/Compile/Default,btrfs.box $(progs))
+
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib
        $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
@@ -72,10 +76,11 @@ define Package/btrfs-progs/install
        $(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
-       $(INSTALL_DIR) $(1)/etc/init.d
-       $(INSTALL_BIN) ./files/btrfs-scan.init $(1)/etc/init.d/btrfs-scan
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/btrfs.box $(1)/usr/bin/btrfs
+       $(foreach prog,$(boxprogs),$(LN) btrfs $(1)/usr/bin/$(prog);)
+       $(foreach prog,$(progs),$(INSTALL_BIN) $(PKG_BUILD_DIR)/$(prog) $(1)/usr/bin/;)
+       $(INSTALL_DIR) $(1)/lib/preinit
+       $(INSTALL_BIN) ./files/btrfs-scan.init $(1)/lib/preinit/85_btrfs_scan
 endef
 
 $(eval $(call BuildPackage,btrfs-progs))
index 762e0b84079f1a6e6e9ad0568020f22b756c0959..608d3d6c59b0c861debbb049e515e84f69ba6692 100644 (file)
@@ -1,9 +1,7 @@
-#!/bin/sh /etc/rc.common
-# Copyright (C) 2014 OpenWrt.org
+#!/bin/sh
 
-START=19
-
-start() {
-       grep -q btrfs /proc/filesystems && /usr/bin/btrfs device scan
+preinit_btrfs_scan() {
+       grep -vq btrfs /proc/filesystems || btrfs device scan
 }
 
+boot_hook_add preinit_main preinit_btrfs_scan
index d7860e85aec35b605a187a2cb2d3c935e2682fb2..3c0590a760cc662ac362e2e6cffa4f985bd119de 100644 (file)
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=byobu
-PKG_VERSION:=5.127
+PKG_VERSION:=5.129
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz
 PKG_SOURCE_URL:=https://launchpad.net/byobu/trunk/$(PKG_VERSION)/+download
-PKG_HASH:=4bafc7cb69ff5b0ab6998816d58cd1ef7175e5de75abc1dd7ffd6d5288a4f63b
+PKG_HASH:=e5135f20750c359b6371ee87cf2729c6038fbf3a6e66680e67f6a2125b07c2b9
 
 PKG_LICENSE:=GPL-3.0
 PKG_LICENSE_FILES:=COPYING
diff --git a/utils/byobu/patches/002-fix-missing-tty-arm-serial-autolaunch.patch b/utils/byobu/patches/002-fix-missing-tty-arm-serial-autolaunch.patch
deleted file mode 100644 (file)
index a22777b..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
---- a/usr/bin/byobu.in
-+++ b/usr/bin/byobu.in
-@@ -62,7 +62,7 @@ esac
- export BYOBU_BACKEND
- # Store the parent tty
--export BYOBU_TTY=$(tty)
-+export BYOBU_TTY=$(readlink /proc/$$/fd/0)
- # Get the default window name
- [ -n "$BYOBU_WINDOW_NAME" ] || BYOBU_WINDOW_NAME=-
---- a/usr/bin/byobu-launch.in
-+++ b/usr/bin/byobu-launch.in
-@@ -30,8 +30,8 @@
- #    or edit your sshd_config, ssh_config, and set:
- #      $HOME/.bashrc:  export BYOBU_DISABLE=1
--_tty=$(tty)
--if [ "${_tty#/dev/ttyS}" != "$_tty" ]; then
-+_tty=$(readlink /proc/$$/fd/0)
-+if [ "${_tty#/dev/ttyS}" != "$_tty" ] && [ "${_tty#/dev/ttyAMA}" != "$_tty" ]; then
-       # Don't autolaunch byobu on serial consoles
-       # You can certainly run 'byobu' manually, though
-       echo
diff --git a/utils/byobu/patches/002-fix-missing-tty.patch b/utils/byobu/patches/002-fix-missing-tty.patch
new file mode 100644 (file)
index 0000000..fe80ecf
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/usr/bin/byobu-launch.in
++++ b/usr/bin/byobu-launch.in
+@@ -30,7 +30,7 @@
+ #    or edit your sshd_config, ssh_config, and set:
+ #      $HOME/.bashrc:  export BYOBU_DISABLE=1
+-_tty=$(tty)
++_tty=$(readlink /proc/$$/fd/0)
+ if [ "${_tty#/dev/ttyS}" != "$_tty" ] && [ "${_tty#/dev/ttyAMA}" != "$_tty" ]; then
+       # Don't autolaunch byobu on serial consoles
+       # You can certainly run 'byobu' manually, though
diff --git a/utils/byobu/patches/003-fix-missing-install.patch b/utils/byobu/patches/003-fix-missing-install.patch
deleted file mode 100644 (file)
index 1af626f..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/usr/bin/byobu-janitor.in
-+++ b/usr/bin/byobu-janitor.in
-@@ -41,7 +41,7 @@ DEFAULT_PROFILE="light"
- PROFILE="$BYOBU_CONFIG_DIR/profile"
- # Create byobu-exchange buffer file, with secure permissions, if it doesn't exist
--[ -e "$BYOBU_RUN_DIR/printscreen" ] || install -m 600 /dev/null "$BYOBU_RUN_DIR/printscreen"
-+[ -e "$BYOBU_RUN_DIR/printscreen" ] || { cp /dev/null "$BYOBU_RUN_DIR/printscreen"; chmod 600 "$BYOBU_RUN_DIR/printscreen"; }
- # Affects: users who launched using sudo, such that their config dir
- # is not writable by them
index fc4027a63bc7daa1712249d8d3d54761376cd349..0fbfb3bc0a659f1acaf9599ec28a43958d16dfbb 100644 (file)
        # By default, we won't bug the user with the display of network traffic
        # below DISK_IO_THRESHOLD in kB/s; override in $BYOBU_CONFIG_DIR/status
        [ -n "$DISK_IO_THRESHOLD" ] || DISK_IO_THRESHOLD=50
+--- a/usr/share/byobu/status/statusrc
++++ b/usr/share/byobu/status/statusrc
+@@ -36,8 +36,8 @@
+ # and your lsb_release is "precise", only "p" will be displayed
+ #RELEASE_ABBREVIATED=1
+-# Default: /
+-#MONITORED_DISK=/
++# Default: /overlay
++#MONITORED_DISK=/overlay
+ # Minimum disk throughput that triggers the notification (in kB/s)
+ # Default: 50
diff --git a/utils/byobu/patches/006-only-pgrep-services.patch b/utils/byobu/patches/006-only-pgrep-services.patch
new file mode 100644 (file)
index 0000000..be1b9a2
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/usr/lib/byobu/services
++++ b/usr/lib/byobu/services
+@@ -24,6 +24,8 @@ __services_detail() {
+ }
+ service_running() {
++      pgrep "$1" >/dev/null
++      return $?
+       if [ -f "/etc/init/$1.conf" ]; then
+               # Use upstart
+               case "$(status $1 2>/dev/null)" in
diff --git a/utils/byobu/patches/006-pgrep-services.patch b/utils/byobu/patches/006-pgrep-services.patch
deleted file mode 100644 (file)
index 762a1cb..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/usr/lib/byobu/services
-+++ b/usr/lib/byobu/services
-@@ -24,7 +24,9 @@ __services_detail() {
- }
- service_running() {
--      if [ -f "/etc/init/$1.conf" ]; then
-+      if pgrep "$1" >/dev/null; then
-+              true
-+      elif [ -f "/etc/init/$1.conf" ]; then
-               # Use upstart
-               case "$(status $1 2>/dev/null)" in
-                       *running*)
index 3d3ccb3bdb63d2b45a8c99b7c7cf778bfeb4f874..357270e2738ea08b2cc939842082592b684cbadf 100644 (file)
@@ -1,11 +1,6 @@
 --- a/usr/lib/byobu/users
 +++ b/usr/lib/byobu/users
-@@ -22,20 +22,26 @@
- #    along with this program.  If not, see <http://www.gnu.org/licenses/>.
- __users_detail() {
--      ps -ef | grep "sshd:.*@" | grep -v grep
-+      ps -ef 2>/dev/null | grep "sshd:.*@" | grep -v grep
+@@ -26,7 +26,12 @@ __users_detail() {
  }
  
  __users() {
        if [ "$USERS_DISTINCT" = "1" ]; then
                count=$(pgrep -fl 'sshd:.*@' | cut -f3 -d\ | cut -f1 -d@ | sort -u | wc -l)
        else
-               # Note: we'd like to use pgrep -c, however, this isn't available in
+@@ -34,6 +39,7 @@ __users() {
                # busybox and some distro's pgrep (and it doesn't exit non-zero).
--              count=$(pgrep -f "^sshd:.*@|^/usr/sbin/sshd -i" | wc -l) || return
-+              count=$(pgrep -f "^sshd:.*@|^/usr/sbin/sshd -i" | wc -l)
-+      fi
+               count=$(pgrep -f "^sshd:.*@|^/usr/sbin/sshd -i" | wc -l) || return
        fi
++      fi
        if [ $count -gt 0 ]; then
--              color b w r; printf "%d" "$count"; color -; color w r; printf "#"; color --
-+              color b w r; printf "%d" "$count"; color -; color w r; printf "##"; color --
+               color b w r; printf "%d" "$count"; color -; color w r; printf "##"; color --
        else
-               rm -f "$BYOBU_RUN_DIR/status.$BYOBU_BACKEND/users"*
-       fi
diff --git a/utils/byobu/patches/008-no-gettext.patch b/utils/byobu/patches/008-no-gettext.patch
deleted file mode 100644 (file)
index 981eb67..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
---- a/usr/bin/byobu-export.in
-+++ b/usr/bin/byobu-export.in
-@@ -22,7 +22,7 @@ PKG="byobu"
- [ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="@prefix@" || export BYOBU_PREFIX
- . "${BYOBU_PREFIX}/lib/${PKG}/include/common"
--gettext "
-+echo "
- The byobu-export utility is now deprecated.
- To install byobu on a system for which byobu is not packaged, or
---- a/usr/lib/byobu/menu
-+++ b/usr/lib/byobu/menu
-@@ -35,7 +35,7 @@ __menu() {
-       else
-               key="F9"
-       fi
--      text=$(gettext "Menu" 2>/dev/null) || text="Menu"
-+      text="Menu"
-       color k w; printf "%s:<" "$text"; color -; color b k w; printf "%s" "$key"; color k w; printf ">"
- }
diff --git a/utils/byobu/patches/100-check-if-bashrc-exists.patch b/utils/byobu/patches/100-check-if-bashrc-exists.patch
deleted file mode 100644 (file)
index 79906d4..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
---- a/usr/bin/byobu-disable-prompt.in
-+++ b/usr/bin/byobu-disable-prompt.in
-@@ -17,6 +17,8 @@
- #    You should have received a copy of the GNU General Public License
- #    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-+[ -w "$HOME/.bashrc" ] || exit 1
-+
- PKG="byobu"
- [ -r "$HOME/.byoburc" ] && . "$HOME/.byoburc"
- [ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="@prefix@" || export BYOBU_PREFIX
---- a/usr/bin/byobu-janitor.in
-+++ b/usr/bin/byobu-janitor.in
-@@ -112,6 +112,7 @@ killall -u $USER byobu-statusd >/dev/nul
- rm -f "$FLAG" "/var/run/screen/S-$USER/$PKG.reload-required"
- # Affects: Upgrades from <= byobu 5.50, install byobu prompt if using stock bashrc
-+if [ -r /etc/skel/.bashrc ] && [ -r "$HOME/.bashrc" ] && [ -w "$HOME/.bashrc" ]; then
- if ! (grep -qs "#byobu-prompt#$" "$HOME/.bashrc") && ! [ -e "$BYOBU_CONFIG_DIR/prompt" ]; then
-       if eval $BYOBU_TEST diff >/dev/null 2>&1; then
-               if  diff /etc/skel/.bashrc "$HOME/.bashrc" >/dev/null 2>&1; then
-@@ -123,6 +124,7 @@ if ! (grep -qs "#byobu-prompt#$" "$HOME/
-               fi
-       fi
- fi
-+fi
- [ -r "$BYOBU_CONFIG_DIR/prompt" ] || printf "[ -r ${BYOBU_PREFIX}/share/${PKG}/profiles/bashrc ] && . ${BYOBU_PREFIX}/share/${PKG}/profiles/bashrc  #byobu-prompt#\n" > "$BYOBU_CONFIG_DIR/prompt"
- # Affects: Upgrades from <= byobu 5.126, clear out ec2/rcs cost statuses
diff --git a/utils/byobu/patches/101-fix-tmux-2.8-new-window.patch b/utils/byobu/patches/101-fix-tmux-2.8-new-window.patch
deleted file mode 100644 (file)
index 511f20e..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
---- a/usr/share/byobu/keybindings/f-keys.tmux
-+++ b/usr/share/byobu/keybindings/f-keys.tmux
-@@ -26,8 +26,8 @@ source $BYOBU_PREFIX/share/byobu/keybind
- # Byobu's Keybindings
- # Documented in: $BYOBU_PREFIX/share/doc/byobu/help.tmux.txt
--bind-key -n F1 new-window -k -n config byobu-config
--bind-key -n S-F1 new-window -k -n help "sh -c '$BYOBU_PAGER $BYOBU_PREFIX/share/doc/byobu/help.tmux.txt'"
-+bind-key -n F1 new-window -n config byobu-config
-+bind-key -n S-F1 new-window -n help "sh -c '$BYOBU_PAGER $BYOBU_PREFIX/share/doc/byobu/help.tmux.txt'"
- bind-key -n F2 new-window -c "#{pane_current_path}" \; rename-window "-"
- bind-key -n C-F2 display-panes \; split-window -h -c "#{pane_current_path}"
- bind-key -n S-F2 display-panes \; split-window -v -c "#{pane_current_path}"
-@@ -54,7 +54,7 @@ bind-key -n M-S-Left resize-pane -L
- bind-key -n M-S-Right resize-pane -R
- bind-key -n F5 source $BYOBU_PREFIX/share/byobu/profiles/tmuxrc
- bind-key -n M-F5 run-shell '$BYOBU_PREFIX/lib/byobu/include/toggle-utf8' \; source $BYOBU_PREFIX/share/byobu/profiles/tmuxrc
--bind-key -n S-F5 new-window -k "$BYOBU_PREFIX/lib/byobu/include/cycle-status" \; source $BYOBU_PREFIX/share/byobu/profiles/tmuxrc
-+bind-key -n S-F5 new-window "$BYOBU_PREFIX/lib/byobu/include/cycle-status" \; source $BYOBU_PREFIX/share/byobu/profiles/tmuxrc
- bind-key -n C-F5 send-keys ". $BYOBU_PREFIX/bin/byobu-reconnect-sockets" \; send-keys Enter
- bind-key -n C-S-F5 new-window -d "byobu-select-profile -r"
- bind-key -n F6 detach
-@@ -68,9 +68,9 @@ bind-key -n M-PPage copy-mode \; send-ke
- bind-key -n F8 command-prompt -p "(rename-window) " "rename-window '%%'"
- bind-key -n C-F8 command-prompt -p "(rename-session) " "rename-session '%%'"
- bind-key -n S-F8 next-layout
--bind-key -n M-S-F8 new-window -k "byobu-layout restore; clear; $SHELL"
-+bind-key -n M-S-F8 new-window "byobu-layout restore; clear; $SHELL"
- bind-key -n C-S-F8 command-prompt -p "Save byobu layout as:" "run-shell \"byobu-layout save '%%'\""
--bind-key -n F9 new-window -k -n config byobu-config
-+bind-key -n F9 new-window -n config byobu-config
- bind-key -n S-F9 command-prompt -p "Send command to all panes:" "run-shell \"$BYOBU_PREFIX/lib/byobu/include/tmux-send-command-to-all-panes '%%'\""
- bind-key -n C-F9 command-prompt -p "Send command to all windows:" "run-shell \"$BYOBU_PREFIX/lib/byobu/include/tmux-send-command-to-all-windows '%%'\""
- bind-key -n M-F9 display-panes \; setw synchronize-panes
diff --git a/utils/byobu/patches/102-ensure-disk-exists.patch b/utils/byobu/patches/102-ensure-disk-exists.patch
deleted file mode 100644 (file)
index 020a6ab..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/usr/lib/byobu/disk_io
-+++ b/usr/lib/byobu/disk_io
-@@ -53,6 +53,7 @@ __disk_io() {
-               /dev/*) part="${mount_point}";;
-               *) part=$(awk '$2 == mp { print $1 ; exit(0); }' "mp=$mount_point" /etc/mtab);;
-       esac
-+      [ -e "$part" ] || return
-       getdisk "$part"
-       local disk=${_RET}
-       local t2=$(date +%s) t1=
diff --git a/utils/byobu/patches/103-add-hostname-fallback.patch b/utils/byobu/patches/103-add-hostname-fallback.patch
deleted file mode 100644 (file)
index c17ab14..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
---- a/usr/lib/byobu/hostname
-+++ b/usr/lib/byobu/hostname
-@@ -20,12 +20,16 @@
- #    along with this program.  If not, see <http://www.gnu.org/licenses/>.
- __hostname_detail() {
--      hostname -f
-+      hostname -f 2>/dev/null
- }
- __hostname() {
-       local h=
--      h=$(hostname -s 2>/dev/null || hostname)
-+      if eval $BYOBU_TEST hostname >/dev/null 2>&1; then
-+              h=$(hostname -s 2>/dev/null || hostname)
-+      elif [ -r /proc/sys/kernel/hostname ]; then
-+              read h < /proc/sys/kernel/hostname
-+      fi
-       if metadata_available; then
-               local cache="$BYOBU_RUN_DIR/cache.$BYOBU_BACKEND/hostname"
-               # Background a retrieval of our public hostname
diff --git a/utils/byobu/patches/104-add-custom-logo.patch b/utils/byobu/patches/104-add-custom-logo.patch
deleted file mode 100644 (file)
index 61400f0..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/usr/lib/byobu/logo
-+++ b/usr/lib/byobu/logo
-@@ -111,6 +111,10 @@ __logo() {
-                       logo=" lm "
-                       $MARKUP && printf "$(color g w)$logo$(color -)$(color g w)$(color -) " || printf "$logo"
-               ;;
-+              *openwrt*)
-+                      logo="OWrt"
-+                      $MARKUP && printf "$(color b colour66 W)%s$(color -)" "$logo" || printf "$logo"
-+              ;;
-               *red*hat*|*rhel*)
-                       logo=" RH "
-                       $MARKUP && printf "$(color R k)%s$(color -)" "$logo" || printf "$logo"
diff --git a/utils/byobu/patches/105-handle-processes-stderr.patch b/utils/byobu/patches/105-handle-processes-stderr.patch
deleted file mode 100644 (file)
index e83ecda..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
---- a/usr/lib/byobu/processes
-+++ b/usr/lib/byobu/processes
-@@ -20,15 +20,15 @@
- #    along with this program.  If not, see <http://www.gnu.org/licenses/>.
- __processes_detail() {
--      ps -ej
-+      ps -ej 2>/dev/null
- }
- __processes() {
-       local count=
-       if [ -r /proc ]; then
--              count=$(ls -d /proc/[0-9]* 2>/dev/null| wc -l)
-+              count=$(ls -d /proc/[0-9]* 2>/dev/null | wc -l)
-       else
--              count=$(ps -ef | wc -l | awk '{print $1}')
-+              count=$(ps -ef | wc -l)
-       fi
-       [ -n "$count" ] || return
-       color b y w; printf "%s" "$count"; color -; color y w; printf "&"; color --
diff --git a/utils/byobu/patches/106-fix-release-typo.patch b/utils/byobu/patches/106-fix-release-typo.patch
deleted file mode 100644 (file)
index d4d5bc4..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/usr/lib/byobu/release
-+++ b/usr/lib/byobu/release
-@@ -30,7 +30,7 @@ __release() {
-               true
-       elif [ -r "/etc/os-release" ]; then
-               # lsb_release is *really* slow;  try to use /etc/os-release
--              release=$(. /etc/os-release && echo "$VERSION_ID")
-+              RELEASE=$(. /etc/os-release && echo "$VERSION_ID")
-       elif [ -r "/etc/issue" ]; then
-               # next try /etc/issue first
-               local issue
diff --git a/utils/byobu/patches/107-fix-SERVICES.patch b/utils/byobu/patches/107-fix-SERVICES.patch
deleted file mode 100644 (file)
index 5533566..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/usr/lib/byobu/services
-+++ b/usr/lib/byobu/services
-@@ -45,7 +45,7 @@ service_running() {
- }
- __services() {
--      local services=
-+      local services="$SERVICES"
-       # Users can define a list of services to monitor in $BYOBU_CONFIG_DIR/status
-       if [ -z "$services" ]; then
-               if [ -f "/etc/eucalyptus/eucalyptus.conf" ]; then
diff --git a/utils/byobu/patches/108-custom-updates-available.patch b/utils/byobu/patches/108-custom-updates-available.patch
deleted file mode 100644 (file)
index 1bdee58..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
---- a/usr/lib/byobu/updates_available
-+++ b/usr/lib/byobu/updates_available
-@@ -67,9 +67,16 @@ ___update_cache() {
-       elif eval $BYOBU_TEST pacman >/dev/null; then
-               # If pacman (Archlinux) exists, use it
-               LC_ALL=C flock -xn "$flock" pacman -Sup | grep -vc "^\(::\| \)" >$mycache 2>/dev/null &
-+      elif eval $BYOBU_TEST opkg >/dev/null; then
-+              # If opkg (OpenWrt) exists, use it, also background if flock exists
-+              if eval $BYOBU_TEST flock >/dev/null; then
-+                      flock -xn "$flock" opkg list-upgradable | wc -l >$mycache 2>/dev/null &
-+              else
-+                      opkg list-upgradable | wc -l >$mycache &
-+              fi
-       elif eval $BYOBU_TEST brew >/dev/null; then
-               # If homebrew (Mac OSX) exists, use it, also background if flock exists
--              if eval $BYOBU_TEST flock; then
-+              if eval $BYOBU_TEST flock >/dev/null; then
-                       flock -xn "$flock" brew outdated | wc -l >$mycache 2>/dev/null &
-               else
-                       brew outdated | wc -l >$mycache &
-@@ -106,6 +113,18 @@ ___update_needed() {
-                       [ "$db" -nt "$mycache" ] && return 0
-               done
-               return 1
-+      elif eval $BYOBU_TEST opkg >/dev/null; then
-+              # OpenWrt
-+              [ ! -e /var/lock/opkg.lock ] || return 1
-+              if [ -d /var/opkg-lists ]; then
-+                      [ /var/opkg-lists -nt "$mycache" ]
-+                      return $?
-+              else
-+                      local u s
-+                      read u s < "$mycache"
-+                      [ "$u" -gt 0 ]
-+                      return $?
-+              fi
-       elif eval $BYOBU_TEST brew >/dev/null; then
-               # Mac OSX
-               # check if any new versions have been installed since
diff --git a/utils/byobu/patches/109-add-whoami-fallback.patch b/utils/byobu/patches/109-add-whoami-fallback.patch
deleted file mode 100644 (file)
index 57d4263..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
---- a/usr/lib/byobu/whoami
-+++ b/usr/lib/byobu/whoami
-@@ -19,12 +19,28 @@
- #    You should have received a copy of the GNU General Public License
- #    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-+___get_user() {
-+      if eval $BYOBU_TEST whoami >/dev/null 2>&1; then
-+              whoami
-+      elif eval $BYOBU_TEST id >/dev/null 2>&1; then
-+              id -un
-+      fi
-+}
-+
- __whoami_detail() {
--      getent -- passwd "$USER"
-+      local user=$(___get_user)
-+      [ -n "$user" ] || return
-+      if eval $BYOBU_TEST getent >/dev/null 2>&1; then
-+              getent -- passwd "$user"
-+      else
-+              grep "^$user:" /etc/passwd
-+      fi
- }
- __whoami() {
--      color bold2; printf "%s@" "$(whoami)"; color -
-+      local user=$(___get_user)
-+      [ -n "$user" ] || return
-+      color bold2; printf "%s@" "$user"; color -
- }
- # vi: syntax=sh ts=4 noexpandtab
diff --git a/utils/byobu/patches/110-wifi-quality.patch b/utils/byobu/patches/110-wifi-quality.patch
deleted file mode 100644 (file)
index b814ab8..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
---- a/usr/lib/byobu/wifi_quality
-+++ b/usr/lib/byobu/wifi_quality
-@@ -19,32 +19,61 @@
- #    You should have received a copy of the GNU General Public License
- #    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-+___get_dev_list() {
-+      if [ -n "$MONITORED_NETWORK" ]; then
-+              echo "$MONITORED_NETWORK"
-+      else
-+              iw dev | grep Interface | cut -f2 -d\ 
-+      fi
-+}
-+
- __wifi_quality_detail() {
--      /sbin/iwconfig 2>/dev/null
-+      if eval $BYOBU_TEST iw >/dev/null 2>&1; then
-+              local dev
-+              for dev in $(___get_dev_list); do
-+                      iw dev "$dev" info
-+                      iw dev "$dev" link
-+                      echo
-+              done
-+      elif eval $BYOBU_TEST iwconfig >/dev/null 2>&1; then
-+              iwconfig 2>/dev/null
-+      fi
- }
- __wifi_quality() {
-       local out bitrate quality
--      # iwconfig is expected to output lines like:
--      #    Bit Rate=54 Mb/s   Tx-Power=15 dBm
--      #    Link Quality=60/70  Signal level=-50 dBm
--      # the awk below tokenizes the output and prints shell evalable results
--      out=`iwconfig $MONITORED_NETWORK 2>/dev/null |
--              awk '$0 ~ /[ ]*Link Quality./ {
--   sub(/.*=/,"",$2); split($2,a,"/");
--   printf "quality=%.0f\n", 100*a[1]/a[2] };
--   $0 ~ /[ ]*Bit Rate/ { sub(/.*[:=]/,"",$2); printf("bitrate=%s\n", $2); }
--   '`
--      eval "$out"
--      [ -z "$bitrate" ] && bitrate="0"
--      if [ -z "$quality" ] || [ "$quality" = "0" ]; then
--              quality="0"
-+      if eval $BYOBU_TEST iw >/dev/null 2>&1; then
-+              local dev
-+              for dev in $(___get_dev_list); do
-+                      # signal to quality: https://superuser.com/a/1360447
-+                      out=`iw dev "$dev" link 2>/dev/null |
-+                              awk '$0 ~ /^\s*signal:/ { a = 100 * ($2 + 110) / 70;
-+                                  printf "quality=%.0f\n", (a > 100) ? 100 : ((a < 0) ? 0 : a); }
-+                                  $0 ~ /^\s*tx bitrate:/ { printf "bitrate=%s\n", $3; }
-+                                  '`
-+                      eval "$out"
-+                      [ -z "$bitrate" ] || [ -z "$quality" ] || break
-+              done
-+      elif eval $BYOBU_TEST iwconfig >/dev/null 2>&1; then
-+              # iwconfig is expected to output lines like:
-+              #    Bit Rate=54 Mb/s   Tx-Power=15 dBm
-+              #    Link Quality=60/70  Signal level=-50 dBm
-+              # the awk below tokenizes the output and prints shell evalable results
-+              out=`iwconfig $MONITORED_NETWORK 2>/dev/null |
-+                      awk '$0 ~ /[ ]*Link Quality./ {
-+                          sub(/.*=/,"",$2); split($2,a,"/");
-+                          printf "quality=%.0f\n", 100*a[1]/a[2] };
-+                          $0 ~ /[ ]*Bit Rate/ { sub(/.*[:=]/,"",$2); printf("bitrate=%s\n", $2); }
-+                          '`
-+              eval "$out"
-       fi
--      if [ "$bitrate" = "0" ] || [ "$quality" = "0" ] || [ -z "$bitrate" ] || [ -z "$quality"]; then
-+      [ -n "$bitrate" ] || bitrate=0
-+      [ -n "$quality" ] || quality=0
-+      if [ "$bitrate" -gt 0 ] && [ "$quality" -gt 0 ]; then
-+              printf "${ICON_WIFI}"; color b C k; printf "%s" "$bitrate"; color -; color C k; printf "%s" "$ICON_MBPS"; color -; color b C k; printf "%s" "$quality"; color -; color C k; printf "%s" "$PCT"; color --
-+      else
-               rm -f "$BYOBU_RUN_DIR/status.$BYOBU_BACKEND/wifi_quality"*
--              return
-       fi
--      printf "${ICON_WIFI}"; color b C k; printf "%s" "$bitrate"; color -; color C k; printf "%s" "$ICON_MBPS"; color -; color b C k; printf "%s" "$quality"; color -; color C k; printf "%s" "$PCT"; color --
- }
- # vi: syntax=sh ts=4 noexpandtab
diff --git a/utils/byobu/patches/111-ensure-proc-mdstat-exists.patch b/utils/byobu/patches/111-ensure-proc-mdstat-exists.patch
deleted file mode 100644 (file)
index b190561..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/usr/lib/byobu/raid
-+++ b/usr/lib/byobu/raid
-@@ -24,6 +24,7 @@ __raid_detail() {
- }
- __raid() {
-+      [ -r /proc/mdstat ] || return
-       while read line; do
-               local p msg
-               # Errors in your raid
diff --git a/utils/byobu/patches/112-fix-session-regex.patch b/utils/byobu/patches/112-fix-session-regex.patch
deleted file mode 100644 (file)
index 3890d30..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/usr/lib/byobu/session
-+++ b/usr/lib/byobu/session
-@@ -34,7 +34,7 @@ __session() {
-                       fi
-               ;;
-               screen)
--                      local count=$(screen -ls | grep "^        .*\)$" | wc -l)
-+                      local count=$(screen -ls | grep "^\s\+.*)$" | wc -l)
-                       if [ $count -gt 1 ]; then
-                               color u W k; printf "${ICON_SESSION}%S"; color --
-                       else
index 7781fd390870d7cfde5336dfeea4396977546030..e06e383105606576220b34a15cd22ba24a9e87d0 100644 (file)
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=canutils
-PKG_RELEASE=1
+PKG_RELEASE=2
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/linux-can/can-utils
@@ -17,7 +17,7 @@ PKG_SOURCE_VERSION:=cb33a55720716cbe01e6025a2bda74a1b7e492d3
 PKG_MIRROR_HASH:=d9c01eeff3d81a28161ca5c3937ec005a1f49ca3eb97bee0164d53cc66365786
 
 PKG_MAINTAINER:=Anton Glukhov <anton.a.glukhov@gmail.com>
-PKG_LICENSE:=GPL-2.0+
+PKG_LICENSE:=GPL-2.0-or-later
 
 PKG_FIXUP:=autoreconf
 
index 5ce1252f328aed401c47328537ec607b7493a493..fc72f39967cc8b98f572d475868d5ba890db7a05 100644 (file)
@@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ccid
 PKG_VERSION:=1.4.30
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://ccid.apdu.fr/files/
 PKG_HASH:=ac17087be08880a0cdf99a8a2799a4ef004dc6ffa08b4d9b0ad995f39a53ff7c
 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
-PKG_LICENSE:=LGPL-2.1+
+PKG_LICENSE:=LGPL-2.1-or-later
 PKG_LICENSE_FILES:=COPYING
 
 PKG_FIXUP:=libtool
index 2deda025652c43d6d3ec4f639f50cc6c7612776e..f720562de883fc09802353063b510bce2edac08b 100644 (file)
@@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ccrypt
 PKG_VERSION:=1.11
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/ccrypt
 PKG_HASH:=b19c47500a96ee5fbd820f704c912f6efcc42b638c0a6aa7a4e3dc0a6b51a44f
 PKG_MAINTAINER:=Hannu Nyman <hannu.nyman@iki.fi>
-PKG_LICENSE:=GPLv2+
+PKG_LICENSE:=GPL-2.0-or-later
 
 PKG_FIXUP:=autoreconf
 
diff --git a/utils/cgroupfs-mount/Makefile b/utils/cgroupfs-mount/Makefile
new file mode 100644 (file)
index 0000000..03d1088
--- /dev/null
@@ -0,0 +1,38 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=cgroupfs-mount
+PKG_VERSION:=1.4
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/tianon/cgroupfs-mount/tar.gz/${PKG_VERSION}?
+PKG_HASH:=d6c8aff7af59c7d0082ee3018c97f73b0421e81a49bb28ad9f66a36da5cd6ec7
+
+PKG_MAINTAINER:=Gerard Ryan <G.M0N3Y.2503@gmail.com>
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/cgroupfs-mount
+  SECTION:=utils
+  CATEGORY:=Utilities
+  TITLE:=cgroup mount scripts
+  DEPENDS:=@KERNEL_CGROUPS +mount-utils
+  MENU:=1
+endef
+
+define Package/cgroupfs-mount/description
+Simple scripts to properly mount the cgroupfs hierarchy, especially structured for Debian packaging
+endef
+
+Build/Compile=# Nothing to compile, just install the scripts
+
+define Package/cgroupfs-mount/install
+       $(INSTALL_DIR) $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/cgroupfs-mount $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/cgroupfs-umount $(1)/usr/bin/
+
+       $(INSTALL_DIR) $(1)/etc/init.d
+       $(INSTALL_BIN) ./files/cgroupfs-mount.init $(1)/etc/init.d/cgroupfs-mount
+endef
+
+$(eval $(call BuildPackage,cgroupfs-mount))
diff --git a/utils/cgroupfs-mount/files/cgroupfs-mount.init b/utils/cgroupfs-mount/files/cgroupfs-mount.init
new file mode 100644 (file)
index 0000000..d1eb4ed
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/sh /etc/rc.common
+
+START=1
+
+boot() {
+       # Procd mounts non-hierarchical cgroupfs so unmount first before cgroupfs-mount
+       if mountpoint -q /sys/fs/cgroup; then
+               umount /sys/fs/cgroup/
+       fi
+
+       cgroupfs-mount
+}
index a63e9e202620d77f240265b3a16d45856b1f38ee..aa34f31fa6e238d942234f117567c5de377ffb1a 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=cmdpad
 PKG_VERSION:=0.0.3
-PKG_RELEASE:=4
+PKG_RELEASE:=5
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
 PKG_SOURCE_URL:=@SF/cmdpad
@@ -28,8 +28,6 @@ define Package/cmdpad
   URL:=http://cmdpad.sourceforge.net/index.php
 endef
 
-TARGET_CFLAGS += -std=gnu89
-
 CONFIGURE_ARGS += \
        --enable-static \
        --enable-shared
diff --git a/utils/cmdpad/patches/150-header.patch b/utils/cmdpad/patches/150-header.patch
new file mode 100644 (file)
index 0000000..2b4c3aa
--- /dev/null
@@ -0,0 +1,49 @@
+--- a/src/command.c
++++ b/src/command.c
+@@ -43,6 +43,7 @@
+ #include <linux/input.h>
+ #include <linux/ioctl.h>
++#include <sys/wait.h>
+ #include <stdlib.h>
+ #include <fcntl.h>
+ #include <unistd.h>
+--- a/src/main.c
++++ b/src/main.c
+@@ -54,6 +54,7 @@
+ #include "debug.h"
+ #include "command.h"
++#include "parse.h"
+ #define DEBUGNAME         "MAIN: "
+--- a/src/parse.c
++++ b/src/parse.c
+@@ -58,7 +58,7 @@
+ extern char * pchProgramName ;
+ extern char * pchEventDevice ;
+-inline void ltrim( char * pchText)
++static void ltrim( char * pchText)
+ {
+       if( pchText) {
+               char * pchTxt = pchText ;
+@@ -67,7 +67,7 @@ inline void ltrim( char * pchText)
+       }
+ }
+-inline void rtrim( char * pchText)
++static void rtrim( char * pchText)
+ {
+       if( pchText)
+       {
+@@ -77,7 +77,7 @@ inline void rtrim( char * pchText)
+       }
+ }
+-inline void trim( char * pchText) 
++static void trim( char * pchText)
+ {
+       ltrim( pchText) ;
+       rtrim( pchText) ;
index 232225e45adb4a494969463252e9ad5b37339a47..02b1b53972205aa8163f85edfa13f7d71d151ee4 100644 (file)
@@ -8,17 +8,18 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=collectd
-PKG_VERSION:=5.8.1
-PKG_RELEASE:=6
+PKG_VERSION:=5.9.0
+PKG_RELEASE:=7
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://collectd.org/files/ \
        https://github.com/collectd/collectd/releases/download/collectd-$(PKG_VERSION)
-PKG_HASH:=e796fda27ce06377f491ad91aa286962a68c2b54076aa77a29673d53204453da
+PKG_HASH:=7b220f8898a061f6e7f29a8c16697d1a198277f813da69474a67911097c0626b
 
 PKG_FIXUP:=autoreconf
 PKG_REMOVE_FILES:=aclocal.m4 libltdl/aclocal.m4
 PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>, Hannu Nyman <hannu.nyman@iki.fi>
+PKG_CPE_ID:=cpe:/a:collectd:collectd
 
 PKG_INSTALL:=1
 PKG_BUILD_PARALLEL:=1
@@ -26,6 +27,7 @@ PKG_USE_MIPS16:=0
 
 COLLECTD_PLUGINS_DISABLED:= \
        amqp \
+       ampq1 \
        apple_sensors \
        aquaero \
        barometer \
@@ -43,6 +45,7 @@ COLLECTD_PLUGINS_DISABLED:= \
        genericjmx \
        gmond \
        gps \
+       gpu_nvidia \
        grpc \
        hddtemp \
        hugepages \
@@ -75,12 +78,12 @@ COLLECTD_PLUGINS_DISABLED:= \
        oracle \
        ovs_events \
        ovs_stats \
+       pcie_errors \
        perl \
        pf \
        pinba \
        python \
        redis \
-       routeros \
        rrdcached \
        serial \
        sigrok \
@@ -103,6 +106,8 @@ COLLECTD_PLUGINS_DISABLED:= \
        write_redis \
        write_riemann \
        write_sensu \
+       write_stackdriver \
+       write_syslog \
        write_tsdb \
        xencpu \
        xmms \
@@ -160,6 +165,7 @@ COLLECTD_PLUGINS_SELECTED:= \
        powerdns \
        processes \
        protocols \
+       routeros \
        rrdtool \
        sensors \
        snmp \
@@ -171,6 +177,7 @@ COLLECTD_PLUGINS_SELECTED:= \
        teamspeak2 \
        ted \
        thermal \
+       threshold \
        unixsock \
        uptime \
        users \
@@ -399,8 +406,9 @@ $(eval $(call BuildPlugin,openvpn,OpenVPN traffic/compression input,openvpn,))
 $(eval $(call BuildPlugin,ping,ping status input,ping,+PACKAGE_collectd-mod-ping:liboping))
 $(eval $(call BuildPlugin,postgresql,PostgreSQL status input,postgresql,+PACKAGE_collectd-mod-postgresql:libpq))
 $(eval $(call BuildPlugin,powerdns,PowerDNS server status input,powerdns,))
-$(eval $(call BuildPlugin,processes,process status input,processes,))
+$(eval $(call BuildPlugin,processes,process status input,processes,+PACKAGE_collectd-mod-processes:libmnl))
 $(eval $(call BuildPlugin,protocols,network protocols input,protocols,))
+$(eval $(call BuildPlugin,routeros,MikroTik RouterOS input,routeros,+PACKAGE_collectd-mod-routeros:librouteros))
 $(eval $(call BuildPlugin,rrdtool,RRDtool output,rrdtool,+PACKAGE_collectd-mod-rrdtool:librrd1))
 $(eval $(call BuildPlugin,sensors,lm_sensors input,sensors,+PACKAGE_collectd-mod-sensors:libsensors))
 $(eval $(call BuildPlugin,snmp,SNMP input,snmp,+PACKAGE_collectd-mod-snmp:libnetsnmp))
@@ -412,6 +420,7 @@ $(eval $(call BuildPlugin,teamspeak2,TeamSpeak2 input,teamspeak2,))
 $(eval $(call BuildPlugin,ted,The Energy Detective input,ted,))
 $(eval $(call BuildPlugin,tcpconns,TCP connection tracking input,tcpconns,))
 $(eval $(call BuildPlugin,thermal,system temperatures input,thermal,))
+$(eval $(call BuildPlugin,threshold,Notifications and thresholds,threshold,))
 $(eval $(call BuildPlugin,unixsock,unix socket output,unixsock,))
 $(eval $(call BuildPlugin,uptime,uptime status input,uptime,))
 $(eval $(call BuildPlugin,users,user logged in status input,users,))
index a0029267a7aafc6acd70213e114cdce2e06c7a1a..89af365c2917ba5b266f96a98cd2f39d620c25a7 100644 (file)
@@ -1,8 +1,6 @@
 #!/bin/sh /etc/rc.common
 # Copyright (C) 2006-2016 OpenWrt.org
 
-. "/usr/share/libubox/jshn.sh"
-
 START=80
 STOP=10
 
@@ -46,6 +44,129 @@ process_exec_sections() {
        fi
 }
 
+process_curl() {
+       printf "<Plugin curl>\n" >> "$COLLECTD_CONF"
+       config_foreach process_curl_page curl_page
+       printf "</Plugin>\n\n" >> "$COLLECTD_CONF"
+}
+
+process_curl_page() {
+       local cfg="$1"
+
+       local name url
+
+       config_get name "$cfg" name
+       [ -z "$name" ] && {
+               $LOG notice "No name option in config $cfg defined"
+               return 0
+       }
+
+       config_get url "$cfg" url
+       [ -z "$url" ] && {
+               $LOG notice "No URL option in config $cfg defined"
+               return 0
+       }
+
+       printf "\\t<Page \"%s\">\n" "${name}" >> "$COLLECTD_CONF"
+       printf "\\t\\tURL \"%s\"\n" "${url}" >> "$COLLECTD_CONF"
+       printf "\\t\\tMeasureResponseTime true\n" >> "$COLLECTD_CONF"
+       printf "\\t</Page>\n" >> "$COLLECTD_CONF"
+}
+
+process_network() {
+       local cfg="$1"
+
+       local TimeToLive Forward CacheFlush
+
+       printf "<Plugin network>\n" >> "$COLLECTD_CONF"
+       config_foreach process_network_sections network_listen "listen"
+       config_foreach process_network_sections network_server "server"
+
+       config_get TimeToLive "$cfg" TimeToLive
+       [ -z "$TimeToLive" ] || {
+               printf "\\tTimeToLive %s\n" "${TimeToLive}" >> "$COLLECTD_CONF"
+       }
+
+       config_get CacheFlush "$cfg" CacheFlush
+       [ -z "$CacheFlush" ] || {
+               printf "\\tCacheFlush %s\n" "${CacheFlush}" >> "$COLLECTD_CONF"
+       }
+
+       config_get_bool Forward "$cfg" Forward
+       if [ "$value" = "0" ]; then
+               printf "\\tForward false\n" >> "$COLLECTD_CONF"
+       else
+               printf "\\tForward true\n" >> "$COLLECTD_CONF"
+       fi
+
+       printf "</Plugin>\n\n" >> "$COLLECTD_CONF"
+}
+
+process_network_sections() {
+       local cfg="$1"
+       local section="$2"
+
+       local host port output
+
+       config_get host "$cfg" host
+       [ -z "$host" ] && {
+               $LOG notice "No host option in config $cfg defined"
+               return 0
+       }
+
+       if [ "$section" = "server" ]; then
+               output="Server \"$host\""
+       else
+               output="Listen \"$host\""
+       fi
+
+       config_get port "$cfg" port
+       if [ -z "$port" ]; then
+               printf "\\t%s\n" "${output}" >> "$COLLECTD_CONF"
+       else
+               printf "\\t%s \"%s\"\n" "${output}" "${port}" >> "$COLLECTD_CONF"
+       fi
+}
+
+process_iptables() {
+       local cfg="$1"
+
+       printf "<Plugin iptables>\n" >> "$COLLECTD_CONF"
+       config_foreach process_iptables_sections iptables_match
+       printf "</Plugin>\n\n" >> "$COLLECTD_CONF"
+}
+
+process_iptables_sections() {
+       local cfg="$1"
+
+       local table chain
+
+       config_get table "$cfg" table
+       [ -z "$table" ] && {
+               $LOG notice "No table option in config $cfg defined"
+               return 0
+       }
+
+       config_get chain "$cfg" chain
+       [ -z "$chain" ] && {
+               $LOG notice "No chain option in config $cfg defined"
+               return 0
+       }
+
+       config_get index "$cfg" index
+       [ -z "$index" ] && {
+               $LOG notice "No index option in config $cfg defined"
+               return 0
+       }
+
+       config_get name "$cfg" name
+       if [ -z "$name" ]; then
+               printf "\\tChain %s %s %s\n" "${table}" "${chain}" "${index}" >> "$COLLECTD_CONF"
+       else
+               printf "\\tChain %s %s %s \"%s\"\n" "${table}" "${chain}" "${index}" "${name}">> "$COLLECTD_CONF"
+       fi
+}
+
 CONFIG_LIST=""
 add_list_option() {
        local value="$1"
@@ -62,6 +183,7 @@ process_generic() {
 
        local config=""
 
+       . /usr/share/libubox/jshn.sh
        json_init
        json_load_file "$json"
 
@@ -140,6 +262,18 @@ process_plugins() {
                        CONFIG_STRING=""
                        process_exec
                        ;;
+               curl)
+                       CONFIG_STRING=""
+                       process_curl
+                       ;;
+               network)
+                       CONFIG_STRING=""
+                       process_network "$cfg"
+                       ;;
+               iptables)
+                       CONFIG_STRING=""
+                       process_iptables
+                       ;;
                *)
                        CONFIG_STRING=""
                        process_generic "$cfg" "\\t" "/usr/share/collectd/plugin/$cfg.json"
@@ -190,7 +324,7 @@ process_config() {
        config_get ReadThreads globals ReadThreads 2
        printf "ReadThreads \"%s\"\n" "$ReadThreads" >> "$COLLECTD_CONF"
 
-       config_get Hostname globals Hostname "$(hostname)"
+       config_get Hostname globals Hostname "$(uname -n)"
        printf "Hostname \"%s\"\n" "$Hostname" >> "$COLLECTD_CONF"
 
        printf "\n" >> "$COLLECTD_CONF"
@@ -199,17 +333,24 @@ process_config() {
        config_foreach process_plugins plugin
 }
 
+service_triggers()
+{
+       procd_add_reload_trigger "collectd"
+}
+
 start_service() {
+       process_config
+
        procd_open_instance
        procd_set_param command /usr/sbin/collectd
        procd_append_param command -C "$COLLECTD_CONF"
-       procd_append_param command -f # don't daemonize, procd will handle that for us
+       procd_append_param command -f # don't daemonize
        procd_set_param nice "$NICEPRIO"
-
-       process_config
-
-       # set auto respawn behavior
+       procd_set_param stderr 1
        procd_set_param respawn
        procd_close_instance
 }
 
+reload_service() {
+       restart "$@"
+}
index 73e2c2ab597976f14d1e111c791545cb3d231d3b..a04cbc31a2800b18c4f7b287bfeb4fa3403d47bd 100644 (file)
@@ -8,6 +8,11 @@ config globals 'globals'
 #      option Interval '30'
 #      option ReadThreads '2'
 
+#config plugin 'apcups'
+#      option enable '0'
+#      option Host 'localhost'
+#      option Port '3551'
+
 #config plugin 'conntrack'
 #      option enable '0'
 
@@ -25,6 +30,13 @@ config globals 'globals'
 #      option StoreRates '0'
 #      option DataDir '/tmp'
 
+#config plugin 'curl'
+#      option enable '0'
+
+#config curl_page
+#      option name 'test'
+#      option url 'http://finance.google.com/finance?q=NYSE%3AAMD%22'
+
 #config plugin 'df'
 #      option enable '0'
 #      list Device '/dev/mtdblock/4'
@@ -69,6 +81,15 @@ config globals 'globals'
 #      list Interface 'br-lan'
 #      option IgnoreSelected '0'
 
+#config plugin 'iptables'
+#      option enable '1'
+
+#config iptables_match
+#      option table 'nat'
+#      option chain 'zone_wan_postrouting'
+#      option index '1'
+#      option name 'WLAN-Clients traffic'
+
 #config plugin 'irq'
 #      option enable '0'
 #      list Irq '2'
@@ -96,6 +117,20 @@ config globals 'globals'
 #      list VerboseInterface 'br-lan'
 #      list QDisc 'br-lan'
 
+#config plugin 'network'
+#      option enable '1'
+#      option TimeToLive '128'
+#      option Forward '1'
+#      option CacheFlush '86400'
+
+#config network_listen
+#      option host '0.0.0.0'
+#      option port '25826'
+
+#config network_server
+#      option host '1.1.1.1'
+#      option port '25826'
+
 #config plugin 'nut'
 #      option enable '0'
 #      option UPS 'myupsname'
diff --git a/utils/collectd/files/usr/share/collectd/plugin/apcups.json b/utils/collectd/files/usr/share/collectd/plugin/apcups.json
new file mode 100644 (file)
index 0000000..15a31df
--- /dev/null
@@ -0,0 +1,6 @@
+{
+       "string": [
+               "Host",
+               "Port"
+       ]
+}
index 2c63c0851048d8f7bff41ecf0f8cee05f52fd120..ef28a43e833d9ad238842953e1df91aede1a47ad 100644 (file)
@@ -1,2 +1,7 @@
 {
+       "bool": [
+               "ValuesPercentage",
+               "ReportByCpu",
+               "ReportByState"
+       ]
 }
diff --git a/utils/collectd/files/usr/share/collectd/plugin/curl.json b/utils/collectd/files/usr/share/collectd/plugin/curl.json
new file mode 100644 (file)
index 0000000..2c63c08
--- /dev/null
@@ -0,0 +1,2 @@
+{
+}
diff --git a/utils/collectd/files/usr/share/collectd/plugin/iptables.json b/utils/collectd/files/usr/share/collectd/plugin/iptables.json
new file mode 100644 (file)
index 0000000..2c63c08
--- /dev/null
@@ -0,0 +1,2 @@
+{
+}
diff --git a/utils/collectd/files/usr/share/collectd/plugin/logfile.json b/utils/collectd/files/usr/share/collectd/plugin/logfile.json
new file mode 100644 (file)
index 0000000..fd16084
--- /dev/null
@@ -0,0 +1,9 @@
+{
+       "string": [
+               "LogLevel",
+               "File"
+       ],
+       "bool": [
+               "Timestamp"
+       ]
+}
index 2c63c0851048d8f7bff41ecf0f8cee05f52fd120..fc43e2fe9e550a5e624758f1b88ade614bbaac34 100644 (file)
@@ -1,2 +1,6 @@
 {
+       "bool": [
+               "ValuesPercentage",
+               "ValuesAbsolute"
+       ]
 }
diff --git a/utils/collectd/files/usr/share/collectd/plugin/network.json b/utils/collectd/files/usr/share/collectd/plugin/network.json
new file mode 100644 (file)
index 0000000..2c63c08
--- /dev/null
@@ -0,0 +1,2 @@
+{
+}
diff --git a/utils/collectd/patches/000-01-backport-upstream-remove-sensors-version-limit.patch b/utils/collectd/patches/000-01-backport-upstream-remove-sensors-version-limit.patch
deleted file mode 100644 (file)
index af2c3ee..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-From d5a3c020d33cc33ee8049f54c7b4dffcd123bf83 Mon Sep 17 00:00:00 2001
-From: Pavel Rochnyack <pavel2000@ngs.ru>
-Date: Mon, 3 Dec 2018 18:34:14 +0700
-Subject: [PATCH] sensors: Removed checks for upper limit of
- SENSORS_API_VERSION
-
-That makes no more sense after lm-sensors got new maintainers.
-
-Closes: #3006
----
- src/sensors.c | 17 ++++++-----------
- 1 file changed, 6 insertions(+), 11 deletions(-)
-
-diff --git a/src/sensors.c b/src/sensors.c
-index f4ecda5e49..33982e061a 100644
---- a/src/sensors.c
-+++ b/src/sensors.c
-@@ -149,7 +149,7 @@ typedef struct featurelist {
- static char *conffile = SENSORS_CONF_PATH;
- /* #endif SENSORS_API_VERSION < 0x400 */
--#elif (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x500)
-+#elif (SENSORS_API_VERSION >= 0x400)
- typedef struct featurelist {
-   const sensors_chip_name *chip;
-   const sensors_feature *feature;
-@@ -159,11 +159,6 @@ typedef struct featurelist {
- static char *conffile = NULL;
- static _Bool use_labels = 0;
--/* #endif (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x500) */
--
--#else /* if SENSORS_API_VERSION >= 0x500 */
--#error "This version of libsensors is not supported yet. Please report this " \
--      "as bug."
- #endif
- static featurelist_t *first_feature = NULL;
-@@ -223,7 +218,7 @@ static int sensors_config(const char *key, const char *value) {
-     if (IS_TRUE(value))
-       ignorelist_set_invert(sensor_list, 0);
-   }
--#if (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x500)
-+#if (SENSORS_API_VERSION >= 0x400)
-   else if (strcasecmp(key, "UseLabels") == 0) {
-     use_labels = IS_TRUE(value) ? 1 : 0;
-   }
-@@ -353,7 +348,7 @@ static int sensors_load_conf(void) {
-   }   /* while sensors_get_detected_chips */
- /* #endif SENSORS_API_VERSION < 0x400 */
--#elif (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x500)
-+#elif (SENSORS_API_VERSION >= 0x400)
-   chip_num = 0;
-   while ((chip = sensors_get_detected_chips(NULL, &chip_num)) != NULL) {
-     const sensors_feature *feature;
-@@ -410,7 +405,7 @@ static int sensors_load_conf(void) {
-       } /* while (subfeature) */
-     }   /* while (feature) */
-   }     /* while (chip) */
--#endif /* (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x500) */
-+#endif /* (SENSORS_API_VERSION >= 0x400) */
-   if (first_feature == NULL) {
-     sensors_cleanup();
-@@ -485,7 +480,7 @@ static int sensors_read(void) {
-   } /* for fl = first_feature .. NULL */
- /* #endif SENSORS_API_VERSION < 0x400 */
--#elif (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x500)
-+#elif (SENSORS_API_VERSION >= 0x400)
-   for (featurelist_t *fl = first_feature; fl != NULL; fl = fl->next) {
-     double value;
-     int status;
-@@ -528,7 +523,7 @@ static int sensors_read(void) {
-     sensors_submit(plugin_instance, type, type_instance, value);
-   } /* for fl = first_feature .. NULL */
--#endif /* (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x500) */
-+#endif /* (SENSORS_API_VERSION >= 0x400) */
-   return 0;
- } /* int sensors_read */
-
diff --git a/utils/collectd/patches/050-backport-modbus-little-endian.patch b/utils/collectd/patches/050-backport-modbus-little-endian.patch
deleted file mode 100644 (file)
index 26a589d..0000000
+++ /dev/null
@@ -1,179 +0,0 @@
-From 6028f89df95b12219d735b277863f83e9f5ee9e9 Mon Sep 17 00:00:00 2001
-From: PJ Bostley <pbostley@gmail.com>
-Date: Sat, 20 Jan 2018 16:39:36 -0700
-Subject: [PATCH 1/2] Adding support for CDAB endian 32-bit modbus polls
-
----
- src/modbus.c | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-----
- 1 file changed, 56 insertions(+), 5 deletions(-)
-
-diff --git a/src/modbus.c b/src/modbus.c
-index 31f0c2da81..daa3c028f5 100644
---- a/src/modbus.c
-+++ b/src/modbus.c
-@@ -76,9 +76,13 @@
- enum mb_register_type_e /* {{{ */
- { REG_TYPE_INT16,
-   REG_TYPE_INT32,
-+  REG_TYPE_INT32_CDAB,
-   REG_TYPE_UINT16,
-   REG_TYPE_UINT32,
--  REG_TYPE_FLOAT }; /* }}} */
-+  REG_TYPE_UINT32_CDAB,
-+  REG_TYPE_FLOAT,
-+  REG_TYPE_FLOAT_CDAB }; /* }}} */
-+
- enum mb_mreg_type_e /* {{{ */
- { MREG_HOLDING,
-   MREG_INPUT }; /* }}} */
-@@ -425,7 +429,9 @@ static int mb_read_data(mb_host_t *host, mb_slave_t *slave, /* {{{ */
-   if ((ds->ds[0].type != DS_TYPE_GAUGE) &&
-       (data->register_type != REG_TYPE_INT32) &&
--      (data->register_type != REG_TYPE_UINT32)) {
-+      (data->register_type != REG_TYPE_INT32_CDAB) &&
-+      (data->register_type != REG_TYPE_UINT32) &&
-+      (data->register_type != REG_TYPE_UINT32_CDAB)) {
-     NOTICE(
-         "Modbus plugin: The data source of type \"%s\" is %s, not gauge. "
-         "This will most likely result in problems, because the register type "
-@@ -434,8 +440,11 @@ static int mb_read_data(mb_host_t *host, mb_slave_t *slave, /* {{{ */
-   }
-   if ((data->register_type == REG_TYPE_INT32) ||
-+      (data->register_type == REG_TYPE_INT32_CDAB) ||
-       (data->register_type == REG_TYPE_UINT32) ||
--      (data->register_type == REG_TYPE_FLOAT))
-+      (data->register_type == REG_TYPE_UINT32_CDAB) ||
-+      (data->register_type == REG_TYPE_FLOAT) ||
-+      (data->register_type == REG_TYPE_FLOAT_CDAB))
-     values_num = 2;
-   else
-     values_num = 1;
-@@ -496,8 +505,8 @@ static int mb_read_data(mb_host_t *host, mb_slave_t *slave, /* {{{ */
-   }
-   if (status != values_num) {
-     ERROR("Modbus plugin: modbus read function (%s/%s) failed. "
--          " status = %i, values_num = %i. Giving up.",
--          host->host, host->node, status, values_num);
-+          " status = %i, start_addr = %i, values_num = %i. Giving up.",
-+          host->host, host->node, status, data->register_base, values_num);
- #if LEGACY_LIBMODBUS
-     modbus_close(&host->connection);
- #else
-@@ -521,6 +530,17 @@ static int mb_read_data(mb_host_t *host, mb_slave_t *slave, /* {{{ */
-           "Returned float value is %g",
-           (double)float_value);
-+    CAST_TO_VALUE_T(ds, vt, float_value);
-+    mb_submit(host, slave, data, vt);
-+  } else if (data->register_type == REG_TYPE_FLOAT_CDAB) {
-+    float float_value;
-+    value_t vt;
-+
-+    float_value = mb_register_to_float(values[1], values[0]);
-+    DEBUG("Modbus plugin: mb_read_data: "
-+          "Returned float value is %g",
-+          (double)float_value);
-+
-     CAST_TO_VALUE_T(ds, vt, float_value);
-     mb_submit(host, slave, data, vt);
-   } else if (data->register_type == REG_TYPE_INT32) {
-@@ -535,6 +555,20 @@ static int mb_read_data(mb_host_t *host, mb_slave_t *slave, /* {{{ */
-           "Returned int32 value is %" PRIi32,
-           v.i32);
-+    CAST_TO_VALUE_T(ds, vt, v.i32);
-+    mb_submit(host, slave, data, vt);
-+  } else if (data->register_type == REG_TYPE_INT32_CDAB) {
-+    union {
-+      uint32_t u32;
-+      int32_t i32;
-+    } v;
-+    value_t vt;
-+
-+    v.u32 = (((uint32_t)values[1]) << 16) | ((uint32_t)values[0]);
-+    DEBUG("Modbus plugin: mb_read_data: "
-+          "Returned int32 value is %" PRIi32,
-+          v.i32);
-+
-     CAST_TO_VALUE_T(ds, vt, v.i32);
-     mb_submit(host, slave, data, vt);
-   } else if (data->register_type == REG_TYPE_INT16) {
-@@ -561,6 +595,17 @@ static int mb_read_data(mb_host_t *host, mb_slave_t *slave, /* {{{ */
-           "Returned uint32 value is %" PRIu32,
-           v32);
-+    CAST_TO_VALUE_T(ds, vt, v32);
-+    mb_submit(host, slave, data, vt);
-+  } else if (data->register_type == REG_TYPE_UINT32_CDAB) {
-+    uint32_t v32;
-+    value_t vt;
-+
-+    v32 = (((uint32_t)values[1]) << 16) | ((uint32_t)values[0]);
-+    DEBUG("Modbus plugin: mb_read_data: "
-+          "Returned uint32 value is %" PRIu32,
-+          v32);
-+
-     CAST_TO_VALUE_T(ds, vt, v32);
-     mb_submit(host, slave, data, vt);
-   } else /* if (data->register_type == REG_TYPE_UINT16) */
-@@ -702,12 +747,18 @@ static int mb_config_add_data(oconfig_item_t *ci) /* {{{ */
-         data.register_type = REG_TYPE_INT16;
-       else if (strcasecmp("Int32", tmp) == 0)
-         data.register_type = REG_TYPE_INT32;
-+      else if (strcasecmp("Int32LE", tmp) == 0)
-+        data.register_type = REG_TYPE_INT32_CDAB;
-       else if (strcasecmp("Uint16", tmp) == 0)
-         data.register_type = REG_TYPE_UINT16;
-       else if (strcasecmp("Uint32", tmp) == 0)
-         data.register_type = REG_TYPE_UINT32;
-+      else if (strcasecmp("Uint32LE", tmp) == 0)
-+        data.register_type = REG_TYPE_UINT32_CDAB;
-       else if (strcasecmp("Float", tmp) == 0)
-         data.register_type = REG_TYPE_FLOAT;
-+      else if (strcasecmp("FloatLE", tmp) == 0)
-+        data.register_type = REG_TYPE_FLOAT_CDAB;
-       else {
-         ERROR("Modbus plugin: The register type \"%s\" is unknown.", tmp);
-         status = -1;
-
-From 67afd2685892e69ababb489f48b9033ab5908f4d Mon Sep 17 00:00:00 2001
-From: PJ Bostley <pbostley@gmail.com>
-Date: Tue, 23 Jan 2018 15:33:23 -0700
-Subject: [PATCH 2/2] Adding documentation for the Modbus little endian modes
- where 32 bit values have thier registers swapped
-
----
- src/collectd.conf.pod | 18 +++++++++++++-----
- 1 file changed, 13 insertions(+), 5 deletions(-)
-
-diff --git a/src/collectd.conf.pod b/src/collectd.conf.pod
-index dfd785a2c8..e9715126e6 100644
---- a/src/collectd.conf.pod
-+++ b/src/collectd.conf.pod
-@@ -4139,11 +4139,19 @@ Configures the base register to read from the device. If the option
- B<RegisterType> has been set to B<Uint32> or B<Float>, this and the next
- register will be read (the register number is increased by one).
--=item B<RegisterType> B<Int16>|B<Int32>|B<Uint16>|B<Uint32>|B<Float>
--
--Specifies what kind of data is returned by the device. If the type is B<Int32>,
--B<Uint32> or B<Float>, two 16E<nbsp>bit registers will be read and the data is
--combined into one value. Defaults to B<Uint16>.
-+=item B<RegisterType> B<Int16>|B<Int32>|B<Uint16>|B<Uint32>|B<Float>|B<Int32LE>|B<Uint32LE>|B<FloatLE>
-+
-+Specifies what kind of data is returned by the device. This defaults to
-+B<Uint16>.  If the type is B<Int32>, B<Int32LE>, B<Uint32>, B<Uint32LE>,
-+B<Float> or B<FloatLE>, two 16E<nbsp>bit registers at B<RegisterBase>
-+and B<RegisterBase+1> will be read and the data is combined into one
-+32E<nbsp>value. For B<Int32>, B<Uint32> and B<Float> the most significant
-+16E<nbsp>bits are in the register at B<RegisterBase> and the least
-+significant 16E<nbsp>bits are in the register at B<RegisterBase+1>.
-+For B<Int32LE>, B<Uint32LE>, or B<Float32LE>, the high and low order
-+registers are swapped with the most significant 16E<nbsp>bits in
-+the B<RegisterBase+1> and the least significant 16E<nbsp>bits in
-+B<RegisterBase>.
- =item B<RegisterCmd> B<ReadHolding>|B<ReadInput>
diff --git a/utils/collectd/patches/051-Add-scale-and-shift-to-modbus-plugin.patch b/utils/collectd/patches/051-Add-scale-and-shift-to-modbus-plugin.patch
deleted file mode 100644 (file)
index f95df9d..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-From eeabc41e703f39cae0ad7eb8a596045a5a2f25b4 Mon Sep 17 00:00:00 2001
-From: cekstam <christian.ekstam@gmail.com>
-Date: Tue, 27 Mar 2018 13:15:28 +0200
-Subject: [PATCH 1/3] Add scale and shift to modbus plugin
-
-Adding a Scale and Shift parameter to the modbus plugin in order to correct amplifed data
----
- src/collectd.conf.pod | 10 ++++++++++
- src/modbus.c          | 18 ++++++++++++++----
- 2 files changed, 24 insertions(+), 4 deletions(-)
-
---- a/src/collectd.conf.pod
-+++ b/src/collectd.conf.pod
-@@ -4169,6 +4169,16 @@ supported.
- Sets the type instance to use when dispatching the value to I<collectd>. If
- unset, an empty string (no type instance) is used.
-+=item B<Scale> I<Value>
-+
-+The values taken from collectd are multiplied by I<Value>. The field is optional
-+and the default is B<1.0>.
-+
-+=item B<Shift> I<Value>
-+
-+I<Value> is added to values from collectd after they have been multiplied by
-+B<Scale> value. The field is optional and the default value is B<0.0>.
-+
- =back
- =item E<lt>B<Host> I<Name>E<gt> blocks
---- a/src/modbus.c
-+++ b/src/modbus.c
-@@ -105,6 +105,8 @@ struct mb_data_s /* {{{ */
-   mb_mreg_type_t modbus_register_type;
-   char type[DATA_MAX_NAME_LEN];
-   char instance[DATA_MAX_NAME_LEN];
-+  double scale;
-+  double shift;
-   mb_data_t *next;
- }; /* }}} */
-@@ -395,13 +397,13 @@ static int mb_init_connection(mb_host_t
- #define CAST_TO_VALUE_T(ds, vt, raw)                                           \
-   do {                                                                         \
-     if ((ds)->ds[0].type == DS_TYPE_COUNTER)                                   \
--      (vt).counter = (counter_t)(raw);                                         \
-+      (vt).counter = (((counter_t)(raw) * ds[0].scale) + ds[0].shift);         \
-     else if ((ds)->ds[0].type == DS_TYPE_GAUGE)                                \
--      (vt).gauge = (gauge_t)(raw);                                             \
-+      (vt).gauge = (((gauge_t)(raw) * ds[0].scale) + ds[0].shift);             \
-     else if ((ds)->ds[0].type == DS_TYPE_DERIVE)                               \
--      (vt).derive = (derive_t)(raw);                                           \
-+      (vt).derive = (((derive_t)(raw) * ds[0].scale) + ds[0].shift);           \
-     else /* if (ds->ds[0].type == DS_TYPE_ABSOLUTE) */                         \
--      (vt).absolute = (absolute_t)(raw);                                       \
-+      (vt).absolute = (((absolute_t)(raw) * ds[0].scale) + ds[0].shift);       \
-   } while (0)
- static int mb_read_data(mb_host_t *host, mb_slave_t *slave, /* {{{ */
-@@ -723,6 +725,8 @@ static int mb_config_add_data(oconfig_it
-   data.name = NULL;
-   data.register_type = REG_TYPE_UINT16;
-   data.next = NULL;
-+  data.scale = 1;
-+  data.shift = 0;
-   status = cf_util_get_string(ci, &data.name);
-   if (status != 0)
-@@ -736,6 +740,12 @@ static int mb_config_add_data(oconfig_it
-     else if (strcasecmp("Instance", child->key) == 0)
-       status = cf_util_get_string_buffer(child, data.instance,
-                                          sizeof(data.instance));
-+    else if (strcasecmp("Scale", child->key) == 0)
-+      status = cf_util_get_string_buffer(child, data.scale, 
-+                                         sizeof(data.scale));
-+    else if (strcasecmp("Shift", child->key) == 0)
-+      status = cf_util_get_string_buffer(child, data.shift, 
-+                                         sizeof(data.shift));
-     else if (strcasecmp("RegisterBase", child->key) == 0)
-       status = cf_util_get_int(child, &data.register_base);
-     else if (strcasecmp("RegisterType", child->key) == 0) {
diff --git a/utils/collectd/patches/052-correcting-all-the-wrongs.patch b/utils/collectd/patches/052-correcting-all-the-wrongs.patch
deleted file mode 100644 (file)
index b56fe3d..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-From e596496f5c783f4bba85c4d559502c98e4050465 Mon Sep 17 00:00:00 2001
-From: cekstam <christian.ekstam@gmail.com>
-Date: Tue, 27 Mar 2018 14:11:52 +0200
-Subject: [PATCH 2/3] correcting all the wrongs
-
-, data->scale, data->shift
----
- src/modbus.c | 32 +++++++++++++++-----------------
- 1 file changed, 15 insertions(+), 17 deletions(-)
-
---- a/src/modbus.c
-+++ b/src/modbus.c
-@@ -394,16 +394,16 @@ static int mb_init_connection(mb_host_t
- } /* }}} int mb_init_connection */
- #endif /* !LEGACY_LIBMODBUS */
--#define CAST_TO_VALUE_T(ds, vt, raw)                                           \
-+#define CAST_TO_VALUE_T(ds, vt, raw, scale, shift)                             \
-   do {                                                                         \
-     if ((ds)->ds[0].type == DS_TYPE_COUNTER)                                   \
--      (vt).counter = (((counter_t)(raw) * ds[0].scale) + ds[0].shift);         \
-+      (vt).counter = (((counter_t)(raw) * scale) + shift);                     \
-     else if ((ds)->ds[0].type == DS_TYPE_GAUGE)                                \
--      (vt).gauge = (((gauge_t)(raw) * ds[0].scale) + ds[0].shift);             \
-+      (vt).gauge = (((gauge_t)(raw) * scale) + shift);                         \
-     else if ((ds)->ds[0].type == DS_TYPE_DERIVE)                               \
--      (vt).derive = (((derive_t)(raw) * ds[0].scale) + ds[0].shift);           \
-+      (vt).derive = (((derive_t)(raw) * scale) + shift);                       \
-     else /* if (ds->ds[0].type == DS_TYPE_ABSOLUTE) */                         \
--      (vt).absolute = (((absolute_t)(raw) * ds[0].scale) + ds[0].shift);       \
-+      (vt).absolute = (((absolute_t)(raw) * scale) + shift);                   \
-   } while (0)
- static int mb_read_data(mb_host_t *host, mb_slave_t *slave, /* {{{ */
-@@ -532,7 +532,7 @@ static int mb_read_data(mb_host_t *host,
-           "Returned float value is %g",
-           (double)float_value);
--    CAST_TO_VALUE_T(ds, vt, float_value);
-+    CAST_TO_VALUE_T(ds, vt, float_value, data->scale, data->shift);
-     mb_submit(host, slave, data, vt);
-   } else if (data->register_type == REG_TYPE_FLOAT_CDAB) {
-     float float_value;
-@@ -543,7 +543,7 @@ static int mb_read_data(mb_host_t *host,
-           "Returned float value is %g",
-           (double)float_value);
--    CAST_TO_VALUE_T(ds, vt, float_value);
-+    CAST_TO_VALUE_T(ds, vt, float_value, data->scale, data->shift);
-     mb_submit(host, slave, data, vt);
-   } else if (data->register_type == REG_TYPE_INT32) {
-     union {
-@@ -557,7 +557,7 @@ static int mb_read_data(mb_host_t *host,
-           "Returned int32 value is %" PRIi32,
-           v.i32);
--    CAST_TO_VALUE_T(ds, vt, v.i32);
-+    CAST_TO_VALUE_T(ds, vt, v.i32, data->scale, data->shift);
-     mb_submit(host, slave, data, vt);
-   } else if (data->register_type == REG_TYPE_INT32_CDAB) {
-     union {
-@@ -571,7 +571,7 @@ static int mb_read_data(mb_host_t *host,
-           "Returned int32 value is %" PRIi32,
-           v.i32);
--    CAST_TO_VALUE_T(ds, vt, v.i32);
-+    CAST_TO_VALUE_T(ds, vt, v.i32, data->scale, data->shift);
-     mb_submit(host, slave, data, vt);
-   } else if (data->register_type == REG_TYPE_INT16) {
-     union {
-@@ -586,7 +586,7 @@ static int mb_read_data(mb_host_t *host,
-           "Returned int16 value is %" PRIi16,
-           v.i16);
--    CAST_TO_VALUE_T(ds, vt, v.i16);
-+    CAST_TO_VALUE_T(ds, vt, v.i16, data->scale, data->shift);
-     mb_submit(host, slave, data, vt);
-   } else if (data->register_type == REG_TYPE_UINT32) {
-     uint32_t v32;
-@@ -597,7 +597,7 @@ static int mb_read_data(mb_host_t *host,
-           "Returned uint32 value is %" PRIu32,
-           v32);
--    CAST_TO_VALUE_T(ds, vt, v32);
-+    CAST_TO_VALUE_T(ds, vt, v32, data->scale, data->shift);
-     mb_submit(host, slave, data, vt);
-   } else if (data->register_type == REG_TYPE_UINT32_CDAB) {
-     uint32_t v32;
-@@ -608,7 +608,7 @@ static int mb_read_data(mb_host_t *host,
-           "Returned uint32 value is %" PRIu32,
-           v32);
--    CAST_TO_VALUE_T(ds, vt, v32);
-+    CAST_TO_VALUE_T(ds, vt, v32, data->scale, data->shift);
-     mb_submit(host, slave, data, vt);
-   } else /* if (data->register_type == REG_TYPE_UINT16) */
-   {
-@@ -618,7 +618,7 @@ static int mb_read_data(mb_host_t *host,
-           "Returned uint16 value is %" PRIu16,
-           values[0]);
--    CAST_TO_VALUE_T(ds, vt, values[0]);
-+    CAST_TO_VALUE_T(ds, vt, values[0], data->scale, data->shift);
-     mb_submit(host, slave, data, vt);
-   }
-@@ -741,11 +741,9 @@ static int mb_config_add_data(oconfig_it
-       status = cf_util_get_string_buffer(child, data.instance,
-                                          sizeof(data.instance));
-     else if (strcasecmp("Scale", child->key) == 0)
--      status = cf_util_get_string_buffer(child, data.scale, 
--                                         sizeof(data.scale));
-+      status = cf_util_get_double(child, &data.scale);
-     else if (strcasecmp("Shift", child->key) == 0)
--      status = cf_util_get_string_buffer(child, data.shift, 
--                                         sizeof(data.shift));
-+      status = cf_util_get_double(child, &data.shift);
-     else if (strcasecmp("RegisterBase", child->key) == 0)
-       status = cf_util_get_int(child, &data.register_base);
-     else if (strcasecmp("RegisterType", child->key) == 0) {
diff --git a/utils/collectd/patches/053-Add-support-for-RS485-to-modbus-plugin.patch b/utils/collectd/patches/053-Add-support-for-RS485-to-modbus-plugin.patch
deleted file mode 100644 (file)
index 752689e..0000000
+++ /dev/null
@@ -1,114 +0,0 @@
-From a00ab52931a587cf29c53a945e9295b4d7fe41ba Mon Sep 17 00:00:00 2001
-From: Daniel Golle <daniel@makrotopia.org>
-Date: Thu, 28 Mar 2019 01:52:04 +0100
-Subject: [PATCH] Add support for RS485 to modbus plugin
-
-Allow setting up RS485 mode for Modbus-RTU
----
- src/collectd.conf.pod |  6 +++++
- src/modbus.c          | 55 +++++++++++++++++++++++++++++++++++++++----
- 2 files changed, 57 insertions(+), 4 deletions(-)
-
---- a/src/collectd.conf.pod
-+++ b/src/collectd.conf.pod
-@@ -4234,6 +4234,12 @@ For Modbus/RTU, specifies the path to th
- For Modbus/RTU, specifies the baud rate of the serial device.
- Note, connections currently support only 8/N/1.
-+=item B<UARTType> I<UARTType>
-+
-+For Modbus/RTU, specifies the type of the serial device.
-+RS232, RS422 and RS485 are supported. Defaults to RS232.
-+Available only on Linux systems with libmodbus>=2.9.4.
-+
- =item B<Interval> I<Interval>
- Sets the interval (in seconds) in which the values will be collected from this
---- a/src/modbus.c
-+++ b/src/modbus.c
-@@ -95,6 +95,12 @@ enum mb_conntype_e /* {{{ */
-   MBCONN_RTU }; /* }}} */
- typedef enum mb_conntype_e mb_conntype_t;
-+enum mb_uarttype_e /* {{{ */
-+{ UARTTYPE_RS232,
-+  UARTTYPE_RS422,
-+  UARTTYPE_RS485 }; /* }}} */
-+typedef enum mb_uarttype_e mb_uarttype_t;
-+
- struct mb_data_s;
- typedef struct mb_data_s mb_data_t;
- struct mb_data_s /* {{{ */
-@@ -124,8 +130,9 @@ struct mb_host_s /* {{{ */
-   char host[DATA_MAX_NAME_LEN];
-   char node[NI_MAXHOST]; /* TCP hostname or RTU serial device */
-   /* char service[NI_MAXSERV]; */
--  int port;     /* for Modbus/TCP */
--  int baudrate; /* for Modbus/RTU */
-+  int port;               /* for Modbus/TCP */
-+  int baudrate;           /* for Modbus/RTU */
-+  mb_uarttype_t uarttype; /* UART type for Modbus/RTU */
-   mb_conntype_t conntype;
-   cdtime_t interval;
-@@ -390,6 +397,22 @@ static int mb_init_connection(mb_host_t
-     return status;
-   }
-+#if defined(linux) && LIBMODBUS_VERSION_CHECK(2, 9, 4)
-+  switch (host->uarttype) {
-+  case UARTTYPE_RS485:
-+    if (modbus_rtu_set_serial_mode(host->connection, MODBUS_RTU_RS485))
-+      DEBUG("Modbus plugin: Setting RS485 mode failed.");
-+    break;
-+  case UARTTYPE_RS422:
-+    /* libmodbus doesn't say anything about full-duplex symmetric RS422 UART */
-+    break;
-+  case UARTTYPE_RS232:
-+    break;
-+  default:
-+    DEBUG("Modbus plugin: Invalid UART type!.");
-+  }
-+#endif /* defined(linux) && LIBMODBUS_VERSION_CHECK(2, 9, 4) */
-+
-   return 0;
- } /* }}} int mb_init_connection */
- #endif /* !LEGACY_LIBMODBUS */
-@@ -951,11 +974,35 @@ static int mb_config_add_host(oconfig_it
-         status = -1;
-     } else if (strcasecmp("Device", child->key) == 0) {
-       status = cf_util_get_string_buffer(child, host->node, sizeof(host->node));
--      if (status == 0)
-+      if (status == 0) {
-         host->conntype = MBCONN_RTU;
-+        host->uarttype = UARTTYPE_RS232;
-+      }
-     } else if (strcasecmp("Baudrate", child->key) == 0)
-       status = cf_util_get_int(child, &host->baudrate);
--    else if (strcasecmp("Interval", child->key) == 0)
-+    else if (strcasecmp("UARTType", child->key) == 0) {
-+#if defined(linux) && !LEGACY_LIBMODBUS && LIBMODBUS_VERSION_CHECK(2, 9, 4)
-+      char buffer[NI_MAXHOST];
-+      status = cf_util_get_string_buffer(child, buffer, sizeof(buffer));
-+      if (status != 0)
-+        break;
-+      if (strncmp(buffer, "RS485", 6) == 0)
-+        host->uarttype = UARTTYPE_RS485;
-+      else if (strncmp(buffer, "RS422", 6) == 0)
-+        host->uarttype = UARTTYPE_RS422;
-+      else if (strncmp(buffer, "RS232", 6) == 0)
-+        host->uarttype = UARTTYPE_RS232;
-+      else {
-+        ERROR("Modbus plugin: The UARTType \"%s\" is unknown.", buffer);
-+        status = -1;
-+        break;
-+      }
-+#else
-+      ERROR("Modbus plugin: Option `UARTType' not supported. Please "
-+            "upgrade libmodbus to at least 2.9.4");
-+      return -1;
-+#endif
-+    } else if (strcasecmp("Interval", child->key) == 0)
-       status = cf_util_get_cdtime(child, &host->interval);
-     else if (strcasecmp("Slave", child->key) == 0)
-       /* Don't set status: Gracefully continue if a slave fails. */
index 2820e07558c4eeeadecbab81eaf2a3c3e6b25c5a..9fb749b248638b15913df133c7940fdd48a6244f 100644 (file)
@@ -17,7 +17,7 @@
      /* consolidation_functions = */ NULL,
      /* consolidation_functions_num = */ 0,
  
-@@ -949,6 +952,12 @@ static int rrd_config(const char *key, c
+@@ -944,6 +947,12 @@ static int rrd_config(const char *key, c
            /* compar = */ rrd_compare_numeric);
  
      free(value_copy);
@@ -30,8 +30,8 @@
    } else if (strcasecmp("XFF", key) == 0) {
      double tmp = atof(value);
      if ((tmp < 0.0) || (tmp >= 1.0)) {
---- a/src/utils_rrdcreate.c
-+++ b/src/utils_rrdcreate.c
+--- a/src/utils/rrdcreate/rrdcreate.c
++++ b/src/utils/rrdcreate/rrdcreate.c
 @@ -180,6 +180,9 @@ static int rra_get(char ***ret, const va
      rts_num = rra_timespans_num;
    }
@@ -42,8 +42,8 @@
    rra_max = rts_num * rra_types_num;
    assert(rra_max > 0);
  
---- a/src/utils_rrdcreate.h
-+++ b/src/utils_rrdcreate.h
+--- a/src/utils/rrdcreate/rrdcreate.h
++++ b/src/utils/rrdcreate/rrdcreate.h
 @@ -40,6 +40,8 @@ struct rrdcreate_config_s {
    int *timespans;
    size_t timespans_num;
index 3d878d750d764f425634dff3a19abeb56a560ac3..6c6d1b116cca473cb5e0f7e3b1c6fe9dd1e3ceb8 100644 (file)
@@ -1,6 +1,6 @@
 --- a/src/daemon/plugin.c
 +++ b/src/daemon/plugin.c
-@@ -1099,7 +1099,7 @@ static int plugin_insert_read(read_func_
+@@ -1085,7 +1085,7 @@ static int plugin_insert_read(read_func_
    int status;
    llentry_t *le;
  
index d12295ad4ddd492fdb0a901280032fbe0b32a714..d46a57af58eb86a9b0da2e4c6ac286cbc5173278 100644 (file)
@@ -1,6 +1,6 @@
 --- a/src/olsrd.c
 +++ b/src/olsrd.c
-@@ -585,7 +585,7 @@ static int olsrd_read(void) /* {{{ */
+@@ -582,7 +582,7 @@ static int olsrd_read(void) /* {{{ */
    if (fh == NULL)
      return -1;
  
index 80e4720ac84be98fbfd515b0dad79bb6d672bf4f..7b22b6a8955d5df9bd8c42db33967d446589c09b 100644 (file)
@@ -18,7 +18,7 @@ Reversed patch to be applied:
 
 --- a/configure.ac
 +++ b/configure.ac
-@@ -3327,9 +3327,9 @@ if test "x$with_libmodbus" = "xyes"; the
+@@ -3399,9 +3399,9 @@ if test "x$with_libmodbus" = "xyes"; the
    SAVE_CPPFLAGS="$CPPFLAGS"
    CPPFLAGS="$CPPFLAGS $with_libmodbus_cflags"
  
@@ -33,8 +33,8 @@ Reversed patch to be applied:
 --- a/src/modbus.c
 +++ b/src/modbus.c
 @@ -26,7 +26,7 @@
- #include "configfile.h"
  #include "plugin.h"
+ #include "utils/common/common.h"
  
 -#include <modbus.h>
 +#include <modbus/modbus.h>
index 95920681a46b4557cd420e5c167649f4bdcde428..c5126731efcab8e612065faf8892702b049a69ba 100644 (file)
@@ -1,6 +1,6 @@
 --- a/configure.ac
 +++ b/configure.ac
-@@ -526,11 +526,7 @@ if test "x$ac_system" = "xLinux"; then
+@@ -531,11 +531,7 @@ if test "x$ac_system" = "xLinux"; then
      [have_cpuid_h="no (cpuid.h not found)"]
    )
  
index 360c41751975a265e0315dbb03ea3129fa057ae4..ff0269b8388702cb9a099edb89e44cc3b980714b 100644 (file)
@@ -1,6 +1,6 @@
 --- a/configure.ac
 +++ b/configure.ac
-@@ -710,6 +710,11 @@ AC_CACHE_CHECK([whether clock_boottime a
+@@ -721,6 +721,11 @@ AC_CACHE_CHECK([whether clock_boottime a
    ]
  )
  
@@ -12,7 +12,7 @@
  
  #
  # Checks for typedefs, structures, and compiler characteristics.
-@@ -6127,6 +6132,7 @@ plugin_ipc="no"
+@@ -6392,6 +6397,7 @@ plugin_ipc="no"
  plugin_ipmi="no"
  plugin_ipvs="no"
  plugin_irq="no"
  plugin_load="no"
  plugin_log_logstash="no"
  plugin_mcelog="no"
-@@ -6538,6 +6544,7 @@ AC_PLUGIN([ipmi],                [$plugi
- AC_PLUGIN([iptables],            [$with_libiptc],           [IPTables rule counters])
- AC_PLUGIN([ipvs],                [$plugin_ipvs],            [IPVS connection statistics])
- AC_PLUGIN([irq],                 [$plugin_irq],             [IRQ statistics])
-+AC_PLUGIN([iwinfo],              [$with_iwinfo],            [Common iwinfo wireless statistics])
- AC_PLUGIN([java],                [$with_java],              [Embed the Java Virtual Machine])
- AC_PLUGIN([load],                [$plugin_load],            [System load])
- AC_PLUGIN([log_logstash],        [$plugin_log_logstash],    [Logstash json_event compatible logging])
-@@ -6899,6 +6906,7 @@ AC_MSG_RESULT([    libyajl . . . . . . .
+@@ -6826,6 +6832,7 @@ AC_PLUGIN([ipmi],                [$plugi
+ AC_PLUGIN([iptables],            [$with_libiptc],             [IPTables rule counters])
+ AC_PLUGIN([ipvs],                [$plugin_ipvs],              [IPVS connection statistics])
+ AC_PLUGIN([irq],                 [$plugin_irq],               [IRQ statistics])
++AC_PLUGIN([iwinfo],              [$with_iwinfo],              [Common iwinfo wireless statistics])
+ AC_PLUGIN([java],                [$with_java],                [Embed the Java Virtual Machine])
+ AC_PLUGIN([load],                [$plugin_load],              [System load])
+ AC_PLUGIN([log_logstash],        [$plugin_log_logstash],      [Logstash json_event compatible logging])
+@@ -7193,6 +7200,7 @@ AC_MSG_RESULT([    libyajl . . . . . . .
  AC_MSG_RESULT([    oracle  . . . . . . . $with_oracle])
  AC_MSG_RESULT([    protobuf-c  . . . . . $have_protoc_c])
  AC_MSG_RESULT([    protoc 3  . . . . . . $have_protoc3])
@@ -36,7 +36,7 @@
  AC_MSG_RESULT()
  AC_MSG_RESULT([  Features:])
  AC_MSG_RESULT([    daemon mode . . . . . $enable_daemon])
-@@ -6957,6 +6965,7 @@ AC_MSG_RESULT([    ipmi  . . . . . . . .
+@@ -7253,6 +7261,7 @@ AC_MSG_RESULT([    ipmi  . . . . . . . .
  AC_MSG_RESULT([    iptables  . . . . . . $enable_iptables])
  AC_MSG_RESULT([    ipvs  . . . . . . . . $enable_ipvs])
  AC_MSG_RESULT([    irq . . . . . . . . . $enable_irq])
@@ -46,7 +46,7 @@
  AC_MSG_RESULT([    logfile . . . . . . . $enable_logfile])
 --- a/src/collectd.conf.in
 +++ b/src/collectd.conf.in
-@@ -137,6 +137,7 @@
+@@ -138,6 +138,7 @@
  #@BUILD_PLUGIN_IPTABLES_TRUE@LoadPlugin iptables
  #@BUILD_PLUGIN_IPVS_TRUE@LoadPlugin ipvs
  #@BUILD_PLUGIN_IRQ_TRUE@LoadPlugin irq
@@ -54,7 +54,7 @@
  #@BUILD_PLUGIN_JAVA_TRUE@LoadPlugin java
  @BUILD_PLUGIN_LOAD_TRUE@@BUILD_PLUGIN_LOAD_TRUE@LoadPlugin load
  #@BUILD_PLUGIN_LPAR_TRUE@LoadPlugin lpar
-@@ -721,6 +722,12 @@
+@@ -767,6 +768,12 @@
  #     IgnoreSelected true
  #</Plugin>
  
@@ -69,7 +69,7 @@
  #     JVMArg "-Djava.class.path=@prefix@/share/collectd/java/collectd-api.jar"
 --- a/src/collectd.conf.pod
 +++ b/src/collectd.conf.pod
-@@ -3521,6 +3521,27 @@ and all other interrupts are collected.
+@@ -3803,6 +3803,27 @@ and all other interrupts are collected.
  
  =back
  
 + **/
 +
 +#include "collectd.h"
-+#include "common.h"
 +#include "plugin.h"
-+#include "utils_ignorelist.h"
++#include "utils/common/common.h"
++#include "utils/ignorelist/ignorelist.h"
 +
 +#include <stdint.h>
 +#include <iwinfo.h>
 +}
 --- a/src/types.db
 +++ b/src/types.db
-@@ -269,6 +269,7 @@ voltage_threshold       value:GAUGE:U:U,
- vs_memory               value:GAUGE:0:9223372036854775807
- vs_processes            value:GAUGE:0:65535
- vs_threads              value:GAUGE:0:65535
+@@ -240,6 +240,7 @@ voltage_threshold       value:GAUGE:U:U,
+ spam_check              value:GAUGE:0:U
+ spam_score              value:GAUGE:U:U
+ spl                     value:GAUGE:U:U
 +stations                value:GAUGE:0:256
- #
- # Legacy types
+ swap                    value:GAUGE:0:1099511627776
+ swap_io                 value:DERIVE:0:U
+ tcp_connections         value:GAUGE:0:4294967295
 --- a/Makefile.am
 +++ b/Makefile.am
-@@ -997,6 +997,14 @@ irq_la_LDFLAGS = $(PLUGIN_LDFLAGS)
+@@ -1149,6 +1149,14 @@ irq_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  irq_la_LIBADD = libignorelist.la
  endif
  
diff --git a/utils/collectd/patches/920-fix-ping-droprate.patch b/utils/collectd/patches/920-fix-ping-droprate.patch
deleted file mode 100644 (file)
index e32947d..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/src/ping.c
-+++ b/src/ping.c
-@@ -633,7 +633,7 @@ static int ping_read(void) /* {{{ */
-                             ((double)(pkg_recv * (pkg_recv - 1))));
-     /* Calculate drop rate. */
--    droprate = ((double)(pkg_sent - pkg_recv)) / ((double)pkg_sent);
-+    droprate = ((double)(pkg_sent - pkg_recv)) * 100 / ((double)pkg_sent);
-     submit(hl->host, "ping", latency_average);
-     submit(hl->host, "ping_stddev", latency_stddev);
diff --git a/utils/collectd/patches/930-fix-lua-callback-registration.patch b/utils/collectd/patches/930-fix-lua-callback-registration.patch
deleted file mode 100644 (file)
index bffe656..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
---- a/src/lua.c
-+++ b/src/lua.c
-@@ -281,9 +281,6 @@ static int lua_cb_register_read(lua_Stat
-   luaL_checktype(L, 1, LUA_TFUNCTION);
--  char function_name[DATA_MAX_NAME_LEN];
--  snprintf(function_name, sizeof(function_name), "lua/%s", lua_tostring(L, 1));
--
-   int callback_id = clua_store_callback(L, 1);
-   if (callback_id < 0)
-     return luaL_error(L, "%s", "Storing callback function failed");
-@@ -298,6 +295,9 @@ static int lua_cb_register_read(lua_Stat
-   if (cb == NULL)
-     return luaL_error(L, "%s", "calloc failed");
-+  char function_name[DATA_MAX_NAME_LEN];
-+  snprintf(function_name, sizeof(function_name), "lua/%p", thread);
-+
-   cb->lua_state = thread;
-   cb->callback_id = callback_id;
-   cb->lua_function_name = strdup(function_name);
-@@ -325,9 +325,6 @@ static int lua_cb_register_write(lua_Sta
-   luaL_checktype(L, 1, LUA_TFUNCTION);
--  char function_name[DATA_MAX_NAME_LEN] = "";
--  snprintf(function_name, sizeof(function_name), "lua/%s", lua_tostring(L, 1));
--
-   int callback_id = clua_store_callback(L, 1);
-   if (callback_id < 0)
-     return luaL_error(L, "%s", "Storing callback function failed");
-@@ -342,6 +339,9 @@ static int lua_cb_register_write(lua_Sta
-   if (cb == NULL)
-     return luaL_error(L, "%s", "calloc failed");
-+  char function_name[DATA_MAX_NAME_LEN] = "";
-+  snprintf(function_name, sizeof(function_name), "lua/%p", thread);
-+
-   cb->lua_state = thread;
-   cb->callback_id = callback_id;
-   cb->lua_function_name = strdup(function_name);
diff --git a/utils/containerd/Makefile b/utils/containerd/Makefile
new file mode 100644 (file)
index 0000000..5092a68
--- /dev/null
@@ -0,0 +1,86 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=containerd
+PKG_VERSION:=1.2.6
+PKG_RELEASE:=1
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/containerd/containerd/tar.gz/v${PKG_VERSION}?
+PKG_HASH:=f2d578b743fb9faa5b3477b7cf4b33d00501087043a53b27754f14bbe741f891
+PKG_SOURCE_VERSION:=894b81a4b802e4eb2a91d1ce216b8817763c29fb
+
+PKG_MAINTAINER:=Gerard Ryan <G.M0N3Y.2503@gmail.com>
+
+PKG_BUILD_DEPENDS:=golang/host
+PKG_BUILD_PARALLEL:=1
+PKG_INSTALL:=1
+
+GO_PKG:=github.com/containerd/containerd
+
+include $(INCLUDE_DIR)/package.mk
+include ../../lang/golang/golang-package.mk
+
+define Package/containerd/config
+config CONTAINERD_SECCOMP
+       depends on PACKAGE_containerd
+       bool "Enable support for seccomp in containerd"
+       default DOCKER_SECCOMP
+       select KERNEL_SECCOMP
+       select PACKAGE_libseccomp
+       help
+         Build containerd with support for seccomp filters.
+         Select libseccomp which also pulls-in the needed kernel features.
+endef
+
+define Package/containerd
+  SECTION:=utils
+  CATEGORY:=Utilities
+  TITLE:=containerd container runtime
+  URL:=https://containerd.io/
+  DEPENDS:=$(GO_ARCH_DEPENDS) @TARGET_x86_64 +btrfs-progs +runc +CONTAINERD_SECCOMP:libseccomp
+  MENU:=1
+endef
+
+define Package/containerd/description
+An industry-standard container runtime with an emphasis on simplicity, robustness and portability
+endef
+
+GO_PKG_INSTALL_ALL:=1
+MAKE_PATH:=$(GO_PKG_WORK_DIR_NAME)/build/src/$(GO_PKG)
+MAKE_VARS += \
+       GOPATH=$(GO_PKG_BUILD_DIR) \
+       GOCACHE=$(GO_PKG_CACHE_DIR) \
+       GOTMPDIR=$(GO_PKG_TMP_DIR) \
+       GOROOT_FINAL=$(GO_TARGET_ROOT) \
+       CC=$(TARGET_CC) \
+       CXX=$(TARGET_CXX) \
+       $(call GoPackage/Environment)
+MAKE_FLAGS += \
+       DESTDIR="$(PKG_INSTALL_DIR)" \
+       VERSION=$(PKG_VERSION) \
+       REVISION=$(PKG_SOURCE_VERSION)
+
+ifeq ($(CONFIG_CONTAINERD_SECCOMP),y)
+MAKE_FLAGS += BUILDTAGS='seccomp'
+else
+MAKE_FLAGS += BUILDTAGS=''
+endif
+
+define Build/Compile
+       $(call Build/Compile/Default)
+endef
+
+# Avoid installing binaries
+define Build/InstallDev
+       $(call Build/Compile/Default,clean)
+       $(call GoPackage/Build/InstallDev,$(1))
+endef
+
+define Package/containerd/install
+       $(INSTALL_DIR) $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/{ctr,containerd,containerd-stress,containerd-shim} $(1)/usr/bin/
+endef
+
+$(eval $(call BuildPackage,containerd))
index 046866b3f86b99a6bc0a4f2de315370b05d51c3e..420a2f866f681ca1f19cc9426c695511e4858bb0 100644 (file)
@@ -9,12 +9,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=coreutils
 PKG_VERSION:=8.30
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@GNU/coreutils
 PKG_HASH:=e831b3a86091496cdba720411f9748de81507798f6130adeaef872d206e1b057
 PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
+PKG_CPE_ID:=cpe:/a:gnu:coreutils
 
 PKG_BUILD_PARALLEL:=1
 
@@ -31,6 +32,30 @@ COREUTILS_APPLETS := \
        timeout touch tr true truncate tsort tty uname unexpand uniq unlink     \
        uptime users vdir wc who whoami yes
 
+DIR_BIN := \
+       base64 cat chgrp chmod chown cp date dd echo false kill link ln ls      \
+       mkdir mknod mktemp mv nice printenv pwd rm rmdir sleep stat stty sync   \
+       touch true uname
+
+DIR_USR_BIN := \
+       basename cksum comm cut dirname du env expand expr factor fold groups   \
+       head hostid id install logname md5sum mkfifo nl nohup nproc od paste    \
+       printf readlink realpath seq sha1sum sha256sum sha512sum shred shuf     \
+       sort split sum tac tail tee test timeout tr truncate tty unexpand uniq  \
+       unlink uptime users wc who whoami yes
+
+DIR_USR_SBIN := \
+       chroot
+
+# BusyBox does not provide these yet
+DIR_OTHERS := \
+       chcon csplit dir dircolors fmt join pathchk pinky pr ptx runcon         \
+       sha224sum sha384sum stdbuf tsort vdir
+
+$(eval $(foreach a,$(DIR_BIN),ALTS_$(a):=300:/bin/$(a):/usr/bin/gnu-$(a)$(newline)))
+$(eval $(foreach a,$(DIR_USR_BIN),ALTS_$(a):=300:/usr/bin/$(a):/usr/bin/gnu-$(a)$(newline)))
+$(eval $(foreach a,$(DIR_USR_SBIN),ALTS_$(a):=300:/usr/sbin/$(a):/usr/bin/gnu-$(a)$(newline)))
+
 DEPENDS_sort = +libpthread
 DEPENDS_timeout = +librt
 DEPENDS_expr = +libgmp
@@ -68,6 +93,7 @@ define GenPlugin
    $(call Package/coreutils/Default)
    DEPENDS:=coreutils $(DEPENDS_$(2))
    TITLE:=Utility $(2) from the GNU core utilities
+   ALTERNATIVES:=$(ALTS_$(2))
  endef
 
  define Package/$(1)/description
@@ -105,7 +131,7 @@ endef
 define BuildPlugin
   define Package/$(1)/install
        $(INSTALL_DIR) $$(1)/usr/bin
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(2) $$(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(2) $$(1)/usr/bin/$(if $(ALTS_$(2)),gnu-$(2),$(2))
        $(foreach f,$(FILES_$(2)),
                $(INSTALL_DIR) $$(1)/$(dir $(f))
                $(INSTALL_BIN) $(PKG_INSTALL_DIR)/$(f) $$(1)/$(f)
index 6172fbdd8c3799128250bedae9753a6daf0e8be2..c5e7f3d0802286341a65fd4eda8759c90766af93 100644 (file)
@@ -6,19 +6,20 @@
 
 include $(TOPDIR)/rules.mk
 
-PKG_SOURCE_VERSION:=8bd996400d087028ba56b724abc1f5b378eaa77f
-
 PKG_NAME:=crconf
-PKG_VERSION:=pre2-$(PKG_SOURCE_VERSION)
 PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://git.code.sf.net/p/crconf/code
-PKG_MIRROR_HASH:=f772306c0b005c18f481b73e3be193dba5ebb9f6f3bf20cb3f67c4a80dac0613
+PKG_SOURCE_DATE:=2018-03-02
+PKG_SOURCE_VERSION:=8bd996400d087028ba56b724abc1f5b378eaa77f
+PKG_MIRROR_HASH:=454307cb40a8743b53933cbdd4d9367996ffcf1bd2946413d2862cf050df3bca
 
 PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
+PKG_LICENSE:=GPL-2.0-only
 
 PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -37,6 +38,8 @@ define Package/crconf/description
   Most interesting stuff you can find on https://wiki.strongswan.org
 endef
 
+MAKE_FLAGS += CFLAGS="$(TARGET_CFLAGS) -I../include"
+
 define Package/crconf/install
        $(INSTALL_DIR) $(1)/sbin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/crconf $(1)/sbin
index c6d2e992e6aee95d6d0148d00002fe76238d4313..875084c03607bf276fd0f50cfd7f40bff9ad1f33 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=cryptsetup
 PKG_VERSION:=2.1.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@KERNEL/linux/utils/cryptsetup/v2.1
@@ -17,7 +17,7 @@ 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:=GPL-2.0-or-later LGPL-2.1-or-later
 PKG_LICENSE_FILES:=COPYING COPYING.LGPL
 
 include $(INCLUDE_DIR)/package.mk
index 107dda6c0a7017a4a9ff9844b5b4a1368f100806..9875e05fc460086ff480bb8803979891b78afc74 100644 (file)
@@ -16,6 +16,7 @@ PKG_SOURCE_URL:=https://dbus.freedesktop.org/releases/dbus/
 PKG_HASH:=9546f226011a1e5d9d77245fe5549ef25af4694053189d624d0d6ac127ecf5f8
 PKG_MAINTAINER:=
 PKG_LICENSE:=AFL-2.1
+PKG_CPE_ID:=cpe:/a:freedesktop:dbus
 
 PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
index cc9c5796838ab5d27d37dc5d0ca8dcbe5e115c86..dc6d33a88c49dd652757ea4da7d3b49526e4f125 100644 (file)
@@ -2,13 +2,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=device-observatory
 PKG_VERSION:=1.2.0
-PKG_RELEASE:=4
+PKG_RELEASE:=5
 
 PKG_SOURCE_URL:=https://codeload.github.com/mwarning/device-observatory/tar.gz/v$(PKG_VERSION)?
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_HASH:=83b3f362f154a427abbd3af31b3c2dda9983cdc15f6b833d804727ef0fbdc72e
 
-PKG_LICENSE:=GPL-3.0+
+PKG_LICENSE:=GPL-3.0-or-later
 PKG_BUILD_DEPENDS:=vim/host
 
 include $(INCLUDE_DIR)/package.mk
index bd148dd7c4f059fa1b4c5f16a5a4a3e211a29d16..d6900ab3658a3e374708f3f0d676b52773e6c9b9 100644 (file)
@@ -9,14 +9,14 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=dfu-util
 PKG_VERSION:=0.9
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/$(PKG_NAME)
 PKG_MAINTAINER:=Bruno Randolf <br1@einfach.org>
 PKG_HASH:=36428c6a6cb3088cad5a3592933385253da5f29f2effa61518ee5991ea38f833
 
-PKG_LICENSE:=GPL-2.0+
+PKG_LICENSE:=GPL-2.0-or-later
 PKG_LICENSE_FILES:=COPYING
 
 include $(INCLUDE_DIR)/package.mk
index 268d8002401474e712b6ea5a4ffd42796a2c300b..c5e5f179d676a49d3c18476f840698dfc5e0f7e9 100644 (file)
@@ -11,14 +11,14 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=digitemp
 PKG_VERSION:=3.7.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/bcl/digitemp/tar.gz/v$(PKG_VERSION)?
 PKG_HASH:=683df4ab5cc53a45fe4f860c698f148d34bcca91b3e0568a342f32d64d12ba24
 
 PKG_MAINTAINER:=Jasper Scholte <NightNL@outlook.com>
-PKG_LICENSE:=GPL-2.0+
+PKG_LICENSE:=GPL-2.0-or-later
 
 include $(INCLUDE_DIR)/package.mk
 
diff --git a/utils/docker-ce/Config.in b/utils/docker-ce/Config.in
new file mode 100644 (file)
index 0000000..b67076e
--- /dev/null
@@ -0,0 +1,84 @@
+menu "Kernel features for Docker"
+       config DOCKER_KERNEL_OPTIONS
+               bool "Enable Basic kernel support for Docker"
+               default n
+               select KERNEL_CGROUPS
+               select KERNEL_CGROUP_CPUACCT
+               select KERNEL_CGROUP_SCHED
+               select KERNEL_NAMESPACES
+               select KERNEL_CPUSETS
+               select KERNEL_MEMCG
+               select KERNEL_KEYS
+               select KERNEL_DEVPTS_MULTIPLE_INSTANCES
+               select KERNEL_POSIX_MQUEUE
+               help
+                 Select needed kernel options for Docker. Options include
+                 cgroups, namespaces and other miscellaneous options.
+                 see also https://github.com/docker/engine/blob/master/contrib/check-config.sh
+
+       config DOCKER_SECCOMP
+               bool "Enable support for seccomp in Docker"
+               default n
+               select KERNEL_SECCOMP
+               select PACKAGE_libseccomp
+               help
+                 Build Docker with support for seccomp filters.
+                 Select libseccomp which also pulls-in the needed kernel features.
+
+       config DOCKER_RES_SHAPE
+               bool "Enables support for resource shaping"
+               default n
+               select KERNEL_MEMCG_SWAP
+               select KERNEL_MEMCG_SWAP_ENABLED
+               select KERNEL_BLK_DEV_THROTTLING
+               select KERNEL_CGROUP_PERF
+               select KERNEL_FAIR_GROUP_SCHED
+               select KERNEL_CFS_BANDWIDTH
+               select KERNEL_RT_GROUP_SCHED
+
+       menu "Network"
+               config DOCKER_NET_OVERLAY
+                       bool "Enables the Overlay network feature"
+                       default n
+                       select PACKAGE_kmod-udptunnel4
+                       help
+                         Selects kernel options for the Overlay network feature.
+                         Includes udptunnel4
+
+               config DOCKER_NET_ENCRYPT
+                       bool "Enable encrypted networking kernel support"
+                       depends on DOCKER_NET_OVERLAY
+                       default n
+                       select PACKAGE_kmod-ipsec
+                       select PACKAGE_kmod-ipsec4
+                       select PACKAGE_kmod-crypto-gcm
+                       select PACKAGE_kmod-crypto-ghash
+                       help
+                         Select needed kernel options for encrypted networking support.
+
+               config DOCKER_NET_MACVLAN
+                       bool "Enables macvlan kernel support"
+                       default n
+                       select PACKAGE_kmod-macvlan
+                       select PACKAGE_kmod-dummy
+
+               config DOCKER_NET_TFTP
+                       bool "Enable ftp/tftp client kernel support"
+                       default n
+                       select PACKAGE_kmod-nf-nathelper
+                       select PACKAGE_kmod-nf-nathelper-extra
+       endmenu
+
+       menu "Storage"
+               config DOCKER_STO_EXT4
+                       bool "Enables support for ext3 or ext4 as the backing filesystem"
+                       default n
+                       select KERNEL_EXT4_FS_POSIX_ACL
+
+               config DOCKER_STO_BTRFS
+                       bool "Enables support for btrfs as the backing filesystem"
+                       default n
+                       select PACKAGE_kmod-fs-btrfs
+                       select KERNEL_BTRFS_FS_POSIX_ACL
+       endmenu
+endmenu
diff --git a/utils/docker-ce/Makefile b/utils/docker-ce/Makefile
new file mode 100644 (file)
index 0000000..19f1646
--- /dev/null
@@ -0,0 +1,124 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=docker-ce
+PKG_VERSION:=19.03.1
+PKG_RELEASE:=2
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=components/cli/LICENSE components/engine/LICENSE
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/docker/docker-ce/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=dad9123e203751ce9981bc34773721593655231c32412e310e748b18f10f0053
+PKG_SOURCE_VERSION:=74b1e89e8a
+
+PKG_MAINTAINER:=Gerard Ryan <G.M0N3Y.2503@gmail.com>
+
+define CheckExpectedSrcVer
+       $(eval SRC_VER:=$(shell grep --only-matching --perl-regexp '(?<=PKG_SOURCE_VERSION:=)(.*)' $(1)))
+       $(if $(subst $(2),,$(SRC_VER)), \
+               $(error ERROR: Expected $(1) source version '$(2)', found '$(SRC_VER)'), \
+               $(info OK: Expected $(1) source version '$(2)', found '$(SRC_VER)') \
+       )
+endef
+
+# values from respective '.installer' files at https://github.com/docker/docker-ce/blob/v$(PKG_VERSION)/components/engine/hack/dockerfile/install/
+$(eval $(call CheckExpectedSrcVer,../containerd/Makefile,894b81a4b802e4eb2a91d1ce216b8817763c29fb))
+$(eval $(call CheckExpectedSrcVer,../libnetwork/Makefile,fc5a7d91d54cc98f64fc28f9e288b46a0bee756c))
+$(eval $(call CheckExpectedSrcVer,../runc/Makefile,425e105d5a03fabd737a126ad93d62a9eeede87f))
+$(eval $(call CheckExpectedSrcVer,../tini/Makefile,fec3683b971d9c3ef73f284f176672c44b448662))
+
+PKG_BUILD_DEPENDS:=golang/host
+PKG_BUILD_PARALLEL:=1
+
+GO_PKG:=github.com/docker
+
+include $(INCLUDE_DIR)/package.mk
+include ../../lang/golang/golang-package.mk
+
+define Package/docker-ce/config
+  source "$(SOURCE)/Config.in"
+endef
+
+define Package/docker-ce
+  SECTION:=utils
+  CATEGORY:=Utilities
+  TITLE:=Docker Community Edition
+  URL:=https://www.docker.com/
+  DEPENDS:=$(GO_ARCH_DEPENDS) @TARGET_x86_64 +btrfs-progs +ca-certificates +cgroupfs-mount +containerd +libdevmapper +libnetwork +tini \
+           +DOCKER_SECCOMP:libseccomp +iptables-mod-extra +kmod-br-netfilter +kmod-ikconfig +kmod-nf-ipvs +kmod-veth
+  USERID:=docker:docker
+  MENU:=1
+endef
+
+define Package/docker-ce/description
+  Docker Engine is used by millions enables containerized applications
+  to run anywhere consistently on any infrastructure.
+endef
+
+define Build/Configure
+       # move so GoPackage/Build/Configure will get the correct path
+       mv $(PKG_BUILD_DIR)/components/engine $(PKG_BUILD_DIR)/
+       mv $(PKG_BUILD_DIR)/components/cli $(PKG_BUILD_DIR)/
+
+       # docker generates files at build time so we'll just symlink for now and call GoPackage/Build/Configure later
+       mkdir -p $(GO_PKG_BUILD_DIR)/bin \
+                        $(GO_PKG_BUILD_DIR)/src \
+                        $(GO_PKG_BUILD_DIR)/src/$(GO_PKG)/ \
+                        $(GO_PKG_CACHE_DIR) \
+                        $(GO_PKG_TMP_DIR)
+       $(LN) $(PKG_BUILD_DIR)/cli $(GO_PKG_BUILD_DIR)/src/$(GO_PKG)/cli
+       $(LN) $(PKG_BUILD_DIR)/engine $(GO_PKG_BUILD_DIR)/src/$(GO_PKG)/docker
+endef
+
+ifeq ($(CONFIG_DOCKER_SECCOMP),y)
+BUILDTAGS:=seccomp
+else
+BUILDTAGS:=
+endif
+
+define Build/Compile
+       ( \
+               export GOPATH=$(GO_PKG_BUILD_DIR) \
+                       GOCACHE=$(GO_PKG_CACHE_DIR) \
+                       GOTMPDIR=$(GO_PKG_TMP_DIR) \
+                       GOROOT_FINAL=$(GO_TARGET_ROOT) \
+                       CC=$(TARGET_CC) \
+                       CXX=$(TARGET_CXX) \
+                       $(call GoPackage/Environment) \
+                       GITCOMMIT=$(PKG_SOURCE_VERSION) \
+                       DOCKER_GITCOMMIT=$(PKG_SOURCE_VERSION) \
+                       DOCKER_BUILDTAGS='$(BUILDTAGS)' \
+                       VERSION=$(PKG_VERSION) \
+               \
+               && echo "Compiling CLI..." \
+               && cd $(PKG_BUILD_DIR)/cli \
+               && ./scripts/build/binary \
+               \
+               && echo "Compiling Engine..." \
+               && cd $(PKG_BUILD_DIR)/engine \
+               && ./hack/make.sh binary \
+       )
+
+       # done here to include autogenerated files also
+       rm $(GO_PKG_BUILD_DIR)/src/$(GO_PKG)/cli
+       rm $(GO_PKG_BUILD_DIR)/src/$(GO_PKG)/docker
+       $(call GoPackage/Build/Configure)
+endef
+
+define Package/docker-ce/install
+       $(INSTALL_DIR) $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/cli/build/docker $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/engine/bundles/binary-daemon/dockerd $(1)/usr/bin/
+
+       $(INSTALL_DIR) $(1)/opt/docker/
+       $(INSTALL_DIR) $(1)/usr/share/docker/
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/engine/contrib/check-config.sh $(1)/usr/share/docker/
+
+       $(INSTALL_DIR) $(1)/etc/init.d
+       $(INSTALL_BIN) ./files/dockerd.init $(1)/etc/init.d/dockerd
+
+       $(INSTALL_DIR) $(1)/etc/docker
+       $(INSTALL_CONF) ./files/daemon.json $(1)/etc/docker/
+endef
+
+$(eval $(call BuildPackage,docker-ce))
diff --git a/utils/docker-ce/files/daemon.json b/utils/docker-ce/files/daemon.json
new file mode 100644 (file)
index 0000000..4084c23
--- /dev/null
@@ -0,0 +1,3 @@
+{
+    "data-root": "/opt/docker/"
+}
diff --git a/utils/docker-ce/files/dockerd.init b/utils/docker-ce/files/dockerd.init
new file mode 100644 (file)
index 0000000..6faea9f
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/sh /etc/rc.common
+
+USE_PROCD=1
+START=25
+
+start_service() {
+       local nofile=$(cat /proc/sys/fs/nr_open)
+       
+       procd_open_instance
+       procd_set_param command /usr/bin/dockerd
+       procd_set_param limits nofile="${nofile} ${nofile}"
+       procd_close_instance
+}
diff --git a/utils/docker-ce/patches/001-libdevmapper_name_fix.patch b/utils/docker-ce/patches/001-libdevmapper_name_fix.patch
new file mode 100644 (file)
index 0000000..eb7340d
--- /dev/null
@@ -0,0 +1,13 @@
+Index: docker-ce-18.09.0/components/engine/hack/make.sh
+===================================================================
+--- docker-ce-18.09.0.orig/components/engine/hack/make.sh
++++ docker-ce-18.09.0/components/engine/hack/make.sh
+@@ -129,7 +129,7 @@ fi
+ # with a newer libdevmapper than the one it was built with.
+ if \
+       command -v gcc &> /dev/null \
+-      && ! ( echo -e  '#include <libdevmapper.h>\nint main() { dm_task_deferred_remove(NULL); }'| gcc -xc - -o /dev/null $(pkg-config --libs devmapper) &> /dev/null ) \
++      && ! ( echo -e  '#include <libdevmapper.h>\nint main() { dm_task_deferred_remove(NULL); }'| gcc -xc - -o /dev/null $(pkg-config --libs libdevmapper) &> /dev/null ) \
+ ; then
+       add_buildtag libdm dlsym_deferred_remove
+ fi
index 1fee52fe7079fc8afc07d2d45a22b78950753700..edf3edf1796d46b8e6ede4bb7c2ddc8ca4742c14 100644 (file)
@@ -9,10 +9,10 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=domoticz
 PKG_VERSION_MAJOR:=4
-PKG_VERSION_PATCH:=9700
+PKG_VERSION_PATCH:=10717
 PKG_COMMIT:=
 PKG_VERSION:=$(PKG_VERSION_MAJOR).$(PKG_VERSION_PATCH)
-PKG_RELEASE:=2
+PKG_RELEASE:=1
 
 ifeq ($(PKG_COMMIT),)
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
@@ -22,7 +22,7 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_COMMIT).tar.gz
 PKG_SOURCE_URL:=https://github.com/domoticz/domoticz/archive/$(PKG_COMMIT)/$(PKG_SOURCE)
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_COMMIT)
 endif
-PKG_HASH:=c31f185a1ffac01b86a77bf33e059a4403d814e826c9d6639c63c2e9afa55a46
+PKG_HASH:=c053a2161942529f56b748945ec297dcd67f449e68029fc886893a528891ad86
 
 PKG_LICENSE:=GPL-3.0
 PKG_LICENSE_FILES:=License.txt
@@ -62,6 +62,8 @@ define Package/domoticz/description
 endef
 
 CMAKE_OPTIONS += \
+       -DBUILD_SHARED_LIBS=yes \
+       -DBoost_NO_BOOST_CMAKE=yes \
        -DCMAKE_BUILD_TYPE=Release \
        -DUSE_BUILTIN_MQTT=no \
        -DUSE_BUILTIN_SQLITE=no \
diff --git a/utils/domoticz/patches/010-boost-170-fix.patch b/utils/domoticz/patches/010-boost-170-fix.patch
deleted file mode 100644 (file)
index 4d2bd8a..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-From 9d226dab339f5767ec01ea1bcc9043ceee185cca Mon Sep 17 00:00:00 2001
-From: Rob Peters <info@domoticz.com>
-Date: Mon, 25 Mar 2019 08:50:23 +0100
-Subject: [PATCH] Fix for boot 1.70 get_io_service, fixed #3117
-
----
- hardware/Pinger.cpp                   | 10 ++++++++--
- hardware/TCPProxy/tcpproxy_server.cpp |  8 +++++++-
- 2 files changed, 15 insertions(+), 3 deletions(-)
-
-diff --git a/hardware/Pinger.cpp b/hardware/Pinger.cpp
-index 01a955ba4..184378738 100644
---- a/hardware/Pinger.cpp
-+++ b/hardware/Pinger.cpp
-@@ -18,6 +18,12 @@
- #include <iostream>
-+#if BOOST_VERSION >= 107000
-+#define GET_IO_SERVICE(s) ((boost::asio::io_context&)(s).get_executor().context())
-+#else
-+#define GET_IO_SERVICE(s) ((s).get_io_service())
-+#endif
-+
- class pinger
-       : private domoticz::noncopyable
- {
-@@ -76,7 +82,7 @@ class pinger
-                               num_tries_++;
-                               if (num_tries_ > 4)
-                               {
--                                      resolver_.get_io_service().stop();
-+                                      GET_IO_SERVICE(resolver_).stop();
-                               }
-                               else
-                               {
-@@ -118,7 +124,7 @@ class pinger
-                       if (num_replies_++ == 0)
-                               timer_.cancel();
-                       m_PingState = true;
--                      resolver_.get_io_service().stop();
-+                      GET_IO_SERVICE(resolver_).stop();
-               }
-               else
-               {
-diff --git a/hardware/TCPProxy/tcpproxy_server.cpp b/hardware/TCPProxy/tcpproxy_server.cpp
-index fddac08de..60445d9c2 100644
---- a/hardware/TCPProxy/tcpproxy_server.cpp
-+++ b/hardware/TCPProxy/tcpproxy_server.cpp
-@@ -15,6 +15,12 @@
- #include "stdafx.h"
- #include "tcpproxy_server.h"
-+#if BOOST_VERSION >= 107000
-+#define GET_IO_SERVICE(s) ((boost::asio::io_context&)(s).get_executor().context())
-+#else
-+#define GET_IO_SERVICE(s) ((s).get_io_service())
-+#endif
-+
- namespace tcp_proxy
- {
-       bridge::bridge(boost::asio::io_service& ios)
-@@ -38,7 +44,7 @@ namespace tcp_proxy
-               boost::asio::ip::tcp::endpoint end;
--              boost::asio::io_service &ios=downstream_socket_.get_io_service();
-+              boost::asio::io_service &ios= GET_IO_SERVICE(downstream_socket_);
-               boost::asio::ip::tcp::resolver resolver(ios);
-               boost::asio::ip::tcp::resolver::query query(upstream_host, upstream_port, boost::asio::ip::resolver_query_base::numeric_service);
-               boost::asio::ip::tcp::resolver::iterator i = resolver.resolve(query);
diff --git a/utils/domoticz/patches/020-openssl-deprecated.patch b/utils/domoticz/patches/020-openssl-deprecated.patch
new file mode 100644 (file)
index 0000000..6b01a2e
--- /dev/null
@@ -0,0 +1,22 @@
+From 87749eb9b74d82dced807cc16fb011d4e3fb052d Mon Sep 17 00:00:00 2001
+From: Rosen Penev <rosenp@gmail.com>
+Date: Sat, 13 Jul 2019 17:28:06 -0700
+Subject: [PATCH] WebServerHelper: Fix compilation - deprecated APIs
+
+OpenSSL has initialization deprecated.
+---
+ main/WebServerHelper.cpp | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/main/WebServerHelper.cpp
++++ b/main/WebServerHelper.cpp
+@@ -37,7 +37,9 @@ namespace http {
+                       our_listener_port = web_settings.listening_port;
+ #ifdef WWW_ENABLE_SSL
+                       if (secure_web_settings.is_enabled()) {
++#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER)
+                               SSL_library_init();
++#endif
+                               secureServer_.reset(new CWebServer());
+                               bRet |= secureServer_->StartServer(secure_web_settings, serverpath, bIgnoreUsernamePassword);
+                               serverCollection.push_back(secureServer_);
index 0fc31c7720dcb64cdb7cc39453527f06ff544344..38c304112200ab4bf778081c6a68c291b7527bf3 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=dosfstools
 PKG_VERSION:=4.1
-PKG_RELEASE:=2
+PKG_RELEASE:=4
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://github.com/dosfstools/dosfstools/releases/download/v$(PKG_VERSION)/ \
@@ -17,8 +17,9 @@ PKG_SOURCE_URL:=https://github.com/dosfstools/dosfstools/releases/download/v$(PK
 PKG_HASH:=e6b2aca70ccc3fe3687365009dd94a2e18e82b688ed4e260e04b7412471cc173
 PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
 
-PKG_LICENSE:=GPL-3.0+
+PKG_LICENSE:=GPL-3.0-or-later
 PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:dosfstools_project:dosfstools
 
 PKG_INSTALL:=1
 PKG_FIXUP:=autoreconf
@@ -42,8 +43,6 @@ define Package/dosfstools/description
        The dosfstools package includes the mkfs.fat and fsck.fat utilities, which respectively make and check MS-DOS FAT filesystems.
 endef
 
-TARGET_LDFLAGS += $(if $(ICONV_FULL),-liconv)
-
 define Package/dosfstools/install
        $(INSTALL_DIR) $(1)/usr/sbin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/fatlabel $(1)/usr/sbin/
diff --git a/utils/dosfstools/patches/0002-Switch-to-AC_CHECK_LIB-for-iconv-library-linking.patch b/utils/dosfstools/patches/0002-Switch-to-AC_CHECK_LIB-for-iconv-library-linking.patch
deleted file mode 100644 (file)
index ea93320..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-From 1c6c135ee15e449c1bf2e76d5307f83a3a1d7425 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= <noltari@gmail.com>
-Date: Tue, 11 Oct 2016 12:07:48 +0200
-Subject: [PATCH] Switch to AC_CHECK_LIB for iconv library linking.
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-AC_SEARCH_LIB doesn't work properly for openwrt/lede when building dosfstools
-as a package.
-
-Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
----
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/configure.ac
-+++ b/configure.ac
-@@ -59,7 +59,7 @@ if test "x$with_udev" != "xno"; then
-                 [true])
- fi
--AC_SEARCH_LIBS(iconv_open, iconv)
-+AC_CHECK_LIB(iconv, iconv_open)
- # xxd (distributed with vim) is used in the testsuite
- AC_CHECK_PROG([XXD_FOUND], [xxd], [yes])
diff --git a/utils/dosfstools/patches/010-iconv.patch b/utils/dosfstools/patches/010-iconv.patch
new file mode 100644 (file)
index 0000000..04d402b
--- /dev/null
@@ -0,0 +1,26 @@
+From e18bcc65d5772e518c6496b439bad8a986f7e434 Mon Sep 17 00:00:00 2001
+From: Rosen Penev <rosenp@gmail.com>
+Date: Thu, 20 Jun 2019 15:18:19 -0700
+Subject: [PATCH] configure: Fix iconv check for cross compilation
+
+AC_CHECK_LIB is more friendly towards cross-compilation.
+
+Added check for libiconv_open as that can be used when the libc lacks iconv.
+---
+ configure.ac | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 07e8703..1b09964 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -75,7 +75,8 @@ if test "x$with_udev" != "xno"; then
+                 [true])
+ fi
+-AC_SEARCH_LIBS(iconv_open, iconv)
++AC_CHECK_LIB(iconv, iconv_open)
++AC_CHECK_LIB(iconv, libiconv_open)
+ # xxd (distributed with vim) is used in the testsuite
+ AC_CHECK_PROG([XXD_FOUND], [xxd], [yes])
index 2758dc4d233d2435164c6b3c69f1fc33edcaeade..fd1b6a772d8cf1f839cab4b018bd6330112d1788 100644 (file)
@@ -8,21 +8,19 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=dump1090
-PKG_VERSION:=2017-06-01
+PKG_VERSION:=3.7.2
 PKG_RELEASE:=1
 
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/mutability/dump1090.git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=b155fdb458c3241ab375d1f2b12fbb6a9f8a8a3a
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
-PKG_MIRROR_HASH:=bea40197bce22c837273848bc75d273c2688b131c11895685a35ee6c6242843a
-PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/flightaware/dump1090/tar.gz/v${PKG_VERSION}?
+PKG_HASH:=a4f8edd051e0a663a92b848bde4ab7c47cb8bce812bb368cba42bbb4b5c83f71
 
-PKG_LICENSE:=GPL-2.0
+PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
+PKG_LICENSE:=GPL-2.0-or-later
 PKG_LICENSE_FILES:=COPYING LICENSE
 
 PKG_BUILD_DEPENDS:=libusb
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -31,18 +29,18 @@ define Package/dump1090/Default
   CATEGORY:=Utilities
   TITLE:=Mode S decoder for the Realtek RTL2832U
   URL:=https://github.com/mutability/dump1090
-  DEPENDS:=+libpthread
 endef
 
 define Package/dump1090
   $(call Package/dump1090/Default)
   TITLE+= (dump1090)
-  DEPENDS+= +librtlsdr +uhttpd
+  DEPENDS+=+librtlsdr +uhttpd +libncurses
 endef
 
 define Package/view1090
   $(call Package/dump1090/Default)
   TITLE+= (view1090)
+  DEPENDS+=+libncurses
 endef
 
 define Package/dump1090/description
@@ -54,9 +52,13 @@ define Package/view1090/description
 endef
 
 MAKE_FLAGS += \
+       BLADERF=no \
        CFLAGS="$(TARGET_CFLAGS)" \
        UNAME="Linux"
 
+TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto
+TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
+
 define Package/dump1090/install
        $(INSTALL_DIR) $(1)/etc/init.d
        $(INSTALL_BIN) files/dump1090.init $(1)/etc/init.d/dump1090
index d57a2e1988eaca0d18ab6a9843f559b069c382b4..89c3333224b81a83c22d06150197fed750a55593 100644 (file)
@@ -13,7 +13,9 @@ append_arg() {
        local val
 
        config_get val "$cfg" "$var"
-       [ -n "$val" -o -n "$def" ] && procd_append_param command $opt "${val:-$def}"
+       if [ -n "$val" ] || [ -n "$def" ]; then
+               procd_append_param command "$opt" "${val:-$def}"
+       fi
 }
 
 append_bool() {
@@ -82,7 +84,7 @@ start_instance() {
        append_arg "$cfg" html_dir "--html-dir"
        append_arg "$cfg" write_json "--write-json"
        config_get aux "$cfg" "write_json"
-       [ -n "$aux" ] && mkdir -p $aux
+       [ -n "$aux" ] && mkdir -p "$aux"
        append_arg "$cfg" write_json_every "--write-json-every"
        append_arg "$cfg" json_location_accuracy "--json-location-accuracy"
        append_bool "$cfg" oversample "--oversample"
index 7f1c76f0301f56b0a88c1f6a1a0147397fde25c7..b4fe3208a4c613b0e77fa68a3507fbccdf749fe1 100644 (file)
@@ -10,14 +10,17 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=ecdsautils
 PKG_VERSION:=0.3.2.20160630
 PKG_RELEASE:=1
-PKG_REV:=07538893fb6c2a9539678c45f9dbbf1e4f222b46
-PKG_MAINTAINER:=Matthias Schiffer <mschiffer@universe-factory.net>
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_MIRROR_HASH:=397395a471c0b5af1a173666ba21a5bedb4c3423a6e37c545c3627bed73dcb76
-PKG_SOURCE_URL:=git://github.com/tcatm/$(PKG_NAME).git
-PKG_SOURCE_VERSION:=$(PKG_REV)
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+
 PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/freifunk-gluon/ecdsautils
+PKG_SOURCE_VERSION:=07538893fb6c2a9539678c45f9dbbf1e4f222b46
+PKG_MIRROR_HASH:=397395a471c0b5af1a173666ba21a5bedb4c3423a6e37c545c3627bed73dcb76
+
+PKG_MAINTAINER:=Matthias Schiffer <mschiffer@universe-factory.net>
+PKG_LICENSE_FILES:=COPYRIGHT
+
+PKG_BUILD_PARALLEL:=1
+CMAKE_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/cmake.mk
@@ -28,6 +31,7 @@ define Package/libecdsautil
   DEPENDS:=+libuecc
   TITLE:=ECDSA library
   URL:=https://github.com/tcatm/ecdsautils
+  LICENSE:=MIT
 endef
 
 define Package/ecdsautils
@@ -36,12 +40,9 @@ define Package/ecdsautils
   DEPENDS:=+libecdsautil +libuecc
   TITLE:=ECDSA Utilities
   URL:=https://github.com/tcatm/ecdsautils
+  LICENSE:=BSD-2-Clause
 endef
 
-CMAKE_OPTIONS += \
-  -DCMAKE_BUILD_TYPE:String="MINSIZEREL" \
-
-
 define Package/libecdsautil/description
  Library to sign and verify checksums using ECDSA.
 endef
@@ -50,6 +51,9 @@ define Package/ecdsautils/description
  Utilities to sign and verify checksums using ECDSA.
 endef
 
+CMAKE_OPTIONS += \
+       -DCMAKE_BUILD_TYPE:String="MINSIZEREL"
+
 define Package/libecdsautil/install
        $(INSTALL_DIR) $(1)/usr/lib/
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libecdsautil.so* $(1)/usr/lib/
@@ -63,11 +67,5 @@ define Package/ecdsautils/install
        $(CP) $(PKG_INSTALL_DIR)/usr/bin/ecdsaverify $(1)/usr/bin/
 endef
 
-define Build/InstallDev
-       $(INSTALL_DIR) $(1)/usr/
-       $(CP) $(PKG_INSTALL_DIR)/usr/include $(1)/usr/
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib $(1)/usr/
-endef
-
 $(eval $(call BuildPackage,libecdsautil))
 $(eval $(call BuildPackage,ecdsautils))
index b97b7b80ff32ce68c4500181aff9931df751f79f..ed5e03d52df946acace2156f6bfc1eced03c671c 100644 (file)
@@ -8,26 +8,27 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=evtest
-PKG_VERSION:=1.33
+PKG_VERSION:=1.34
 PKG_RELEASE:=1
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://cgit.freedesktop.org/evtest/snapshot
-PKG_HASH:=5037d1162f4c407053cd97e85763ba03150a0c35f929ee9bf9a360abd32ef1c1
-PKG_MAINTAINER:=Pushpal Sidhu <psidhu.devel@gmail.com>
+PKG_HASH:=e49f1f160b30c8f7c2a4caef5ab655f1caf816483d19fdedd6db2d251d7ab80e
 
-PKG_LICENSE:=GPL-2.0
+PKG_MAINTAINER:=Pushpal Sidhu <psidhu.devel@gmail.com>
+PKG_LICENSE:=GPL-2.0-or-later
 PKG_LICENSE_FILES:=COPYING
 
 PKG_FIXUP:=autoreconf
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
-include $(INCLUDE_DIR)/autotools.mk
 
 define Package/evtest
   SECTION:=utils
   CATEGORY:=Utilities
   TITLE:=Event Test Program
+  URL:=https://gitlab.freedesktop.org/libevdev/evtest
 endef
 
 define Package/evtest/description
index 2463fc6ee932898aa5989135075dfa09e700b59c..aac9bc850ead3a0b999885d75615c640e9c42730 100644 (file)
@@ -1,4 +1,4 @@
-# 
+#
 # Copyright (C) 2006-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
@@ -8,14 +8,16 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=findutils
 PKG_VERSION:=4.6.0
-PKG_RELEASE:=3
-
-PKG_LICENSE:=GPL-3.0+
+PKG_RELEASE:=4
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@GNU/$(PKG_NAME)
 PKG_HASH:=ded4c9f73731cd48fec3b6bdaccce896473b6d8e337e9612e16cf1431bb1169d
+
 PKG_MAINTAINER:=Daniel Dickinson <cshored@thecshore.com>
+PKG_LICENSE:=GPL-3.0-or-later
+PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:gnu:findutils
 
 PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
diff --git a/utils/findutils/patches/010-sysmacros.patch b/utils/findutils/patches/010-sysmacros.patch
new file mode 100644 (file)
index 0000000..dc3678d
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/gl/lib/mountlist.c
++++ b/gl/lib/mountlist.c
+@@ -33,6 +33,8 @@
+ #include <unistd.h>
++#include <sys/sysmacros.h>
++
+ #if HAVE_SYS_PARAM_H
+ # include <sys/param.h>
+ #endif
index 5d8bdf2b23fba76eeb3ffa7430b56ed67efd9a52..f119de5954612a8fda35e1daf80c7b8d0925c6ef 100644 (file)
@@ -8,17 +8,18 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=fio
-PKG_VERSION:=3.13
-PKG_RELEASE:=2
+PKG_VERSION:=3.15
+PKG_RELEASE:=1
 
-PKG_SOURCE_URL:=http://brick.kernel.dk/snaps
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_HASH:=a21d1e50c18eecbd5ee6f7c3c0a8c8605bbe31b91e07c387b2144b02ea3fb235
+PKG_SOURCE_URL:=http://brick.kernel.dk/snaps
+PKG_HASH:=246369954833e0d6be5ef4f9c47968adafcb4a0751badca2cdd80700b4bc5784
 
 PKG_MAINTAINER:=Rosen Penev <rosenp@gmail.com>
-PKG_LICENSE:=GPL-2.0+
+PKG_LICENSE:=GPL-2.0-or-later
 PKG_LICENSE_FILES:=COPYING
 
+PKG_INSTALL:=1
 PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
@@ -53,11 +54,12 @@ CONFIGURE_ARGS = \
        --disable-pmem \
        --disable-native \
        --cc="$(TARGET_CC)" \
-       --extra-cflags="$(TARGET_CFLAGS)"
+       --extra-cflags="$(TARGET_CFLAGS)" \
+       --prefix="$(CONFIGURE_PREFIX)"
 
 define Package/fio/install
        $(INSTALL_DIR) $(1)/usr/bin
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/fio $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fio $(1)/usr/bin/
 endef
 
 $(eval $(call BuildPackage,fio))
diff --git a/utils/fio/patches/010-mpcore.patch b/utils/fio/patches/010-mpcore.patch
deleted file mode 100644 (file)
index bc46d56..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-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 8ce4474256fb9336034e4f83f894637892a3d810..69b292275570917f86233dd4d7b6586e9c9f2bef 100644 (file)
@@ -13,6 +13,7 @@ PKG_SOURCE_URL:=https://github.com/fish-shell/fish-shell/releases/download/$(PKG
 PKG_HASH:=14728ccc6b8e053d01526ebbd0822ca4eb0235e6487e832ec1d0d22f1395430e
 PKG_MAINTAINER:=Curtis Jiang <jqqqqqqqqqq@gmail.com>, Hao Dong <halbertdong@gmail.com>
 PKG_LICENSE:=GPL-2.0
+PKG_CPE_ID:=cpe:/a:fishshell:fish
 
 PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
index e2152b65b837d4b391b36a2e2fbe398fb1194924..5cea259a197753a418f806a375ab9e0508df27fd 100644 (file)
@@ -9,20 +9,20 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=flashrom
 PKG_VERSION:=1.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=http://download.flashrom.org/releases
+PKG_SOURCE_URL:=https://download.flashrom.org/releases
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
 PKG_HASH:=3702fa215ba5fb5af8e54c852d239899cfa1389194c1e51cb2a170c4dc9dee64
-PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
-
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_SOURCE_SUBDIR)
 
-PKG_LICENSE:=GPL-2.0
+PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
+PKG_LICENSE:=GPL-2.0-or-later
 PKG_LICENSE_FILES:=COPYING
 
 PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 include flashrom.mk
@@ -37,7 +37,7 @@ define Package/flashrom/default
   SECTION:=utils
   CATEGORY:=Utilities
   TITLE:=FlashROM Utility
-  URL:=http://www.flashrom.org/
+  URL:=https://www.flashrom.org/
 endef
 
 define Package/flashrom
diff --git a/utils/flashrom/patches/0002-fix-io-h-include.patch b/utils/flashrom/patches/0002-fix-io-h-include.patch
deleted file mode 100644 (file)
index 63109e1..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/flash.h
-+++ b/flash.h
-@@ -30,6 +30,7 @@
- #include <stdio.h>
- #include <stdint.h>
- #include <stddef.h>
-+#include <sys/io.h>
- #include <stdarg.h>
- #include <stdbool.h>
- #if IS_WINDOWS
index 7a9be3b2aff85e17acdbab2459d9b4b8781e2a9a..fa941e42d0ac8a9536fac605201eb268af0439d1 100644 (file)
@@ -21,7 +21,7 @@ diff --git a/ch341a_spi.c b/ch341a_spi.c
 index 95e9c95..ee18624 100644
 --- a/ch341a_spi.c
 +++ b/ch341a_spi.c
-@@ -441,7 +441,12 @@ int ch341a_spi_init(void)
+@@ -444,7 +444,12 @@ int ch341a_spi_init(void)
                return -1;
        }
  
diff --git a/utils/flashrom/patches/010-add-arc.patch b/utils/flashrom/patches/010-add-arc.patch
new file mode 100644 (file)
index 0000000..c2ccbe8
--- /dev/null
@@ -0,0 +1,54 @@
+--- a/Makefile
++++ b/Makefile
+@@ -420,7 +420,7 @@ endif
+ # Disable all drivers needing raw access (memory, PCI, port I/O) on
+ # architectures with unknown raw access properties.
+ # Right now those architectures are alpha hppa m68k sh s390
+-ifneq ($(ARCH),$(filter $(ARCH),x86 mips ppc arm sparc))
++ifneq ($(ARCH),$(filter $(ARCH),x86 mips ppc arm sparc arc))
+ ifeq ($(CONFIG_INTERNAL), yes)
+ UNSUPPORTED_FEATURES += CONFIG_INTERNAL=yes
+ else
+--- a/hwaccess.h
++++ b/hwaccess.h
+@@ -87,6 +87,13 @@
+ /* SPARC is big endian in general (but allows to access data in little endian too). */
+ #define __FLASHROM_BIG_ENDIAN__ 1
++#elif IS_ARC
++#ifdef __arceb__
++#define __FLASHROM_BIG_ENDIAN__ 1
++#else
++#define __FLASHROM_LITTLE_ENDIAN__ 1
++#endif
++
+ #endif /* IS_? */
+ #if !defined (__FLASHROM_BIG_ENDIAN__) && !defined (__FLASHROM_LITTLE_ENDIAN__)
+@@ -378,6 +385,8 @@ int libpayload_wrmsr(int addr, msr_t msr);
+ /* Non memory mapped I/O is not supported on ARM. */
++#elif IS_ARC
++
+ #else
+ #error Unknown architecture, please check if it supports PCI port IO.
+diff --git a/platform.h b/platform.h
+index b2fdcd0..2e68e71 100644
+--- a/platform.h
++++ b/platform.h
+@@ -75,9 +75,12 @@
+ #elif defined(__s390__) || defined(__s390x__) || defined(__zarch__)
+       #define __FLASHROM_ARCH__ "s390"
+       #define IS_S390 1
++#elif defined (__arc__)
++      #define __FLASHROM_ARCH__ "arc"
++      #define IS_ARC 1
+ #endif
+-#if !(IS_X86 || IS_MIPS || IS_PPC || IS_ARM || IS_SPARC || IS_ALPHA || IS_HPPA || IS_M68K || IS_SH || IS_S390)
++#if !(IS_X86 || IS_MIPS || IS_PPC || IS_ARM || IS_SPARC || IS_ALPHA || IS_HPPA || IS_M68K || IS_SH || IS_S390 || IS_ARC)
+ #error Unknown architecture
+ #endif
index 68999daef3ec135e6df5579f90e055d06defdf11..1a6567be95d579e79cc8527f5607e765a5f179ff 100644 (file)
@@ -15,6 +15,8 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://fontconfig.org/release/
 PKG_HASH:=dc62447533bca844463a3c3fd4083b57c90f18a70506e7a9f4936b5a1e516a99
 
+PKG_CPE_ID:=cpe:/a:fontconfig_project:fontconfig
+
 PKG_FIXUP:=libtool
 PKG_INSTALL:=1
 
@@ -23,7 +25,7 @@ include $(INCLUDE_DIR)/package.mk
 define Package/fontconfig
   SECTION:=xorg-util
   CATEGORY:=Xorg
-  SUBMENU:=font-utils
+  SUBMENU:=Font-Utils
   TITLE:=fontconfig
   DEPENDS:=+libpthread +libexpat +libfreetype
   URL:=http://fontconfig.org/
index 3a2fbdc13cacd886d1871ba4b1d7d49b634abde7..81342a535a373df5714d2fdc164bbc5655c9a585 100644 (file)
@@ -9,18 +9,19 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gammu
-PKG_VERSION:=1.39.0
-PKG_RELEASE:=3
+PKG_VERSION:=1.40.0
+PKG_RELEASE:=1
 
-PKG_SOURCE_URL:=https://dl.cihar.com/gammu/releases
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_HASH:=66d1d991d7a993fdf254d4c425f0fdd38c9cca15b1735936695a486067a6a9f8
+PKG_SOURCE_URL:=https://dl.cihar.com/gammu/releases
+PKG_HASH:=a760a3520d9f3a16a4ed73cefaabdbd86125bec73c6fa056ca3f0a4be8478dd6
 
 PKG_MAINTAINER:=Vitaly Protsko <villy@sft.ru>
-PKG_LICENCE:=GPL-2.0
+PKG_LICENCE:=GPL-2.0-or-later
+PKG_LICENSE_FILES:=COPYING
 
 PKG_BUILD_PARALLEL:=1
-PKG_INSTALL:=1
+CMAKE_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/nls.mk
@@ -48,13 +49,6 @@ CMAKE_OPTIONS += -DICONV_INCLUDE_DIRS:PATH=$(ICONV_PREFIX)/include
 CMAKE_OPTIONS += -DICONV_LIBRARIES:STRING=iconv
 endif
 
-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{Gammu*,gsmsd*} $(1)/usr/lib/
-endef
-
 define Package/gammu/install
        $(INSTALL_DIR) $(1)/usr/bin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gammu $(1)/usr/bin
index 9aa8eaa3bc9a3d0a8718f16dd6c762bd2987ebc1..9cc4315da4452b372ec7b09bcbd04f61674e8359 100644 (file)
@@ -1,5 +1,3 @@
-diff --git a/cmake/FindIconv.cmake b/cmake/FindIconv.cmake
-index 3ec0493..f716700 100644
 --- a/cmake/FindIconv.cmake
 +++ b/cmake/FindIconv.cmake
 @@ -9,10 +9,10 @@
@@ -15,8 +13,6 @@ index 3ec0493..f716700 100644
  
  IF(APPLE)
      FIND_PATH(ICONV_INCLUDE_DIR iconv.h
-diff --git a/configure b/configure
-index 4f51ca7..5b0d993 100755
 --- a/configure
 +++ b/configure
 @@ -33,6 +33,7 @@ Usage: ./configure [options]
diff --git a/utils/gammu/patches/002-no-fstack-protector.patch b/utils/gammu/patches/002-no-fstack-protector.patch
deleted file mode 100644 (file)
index 6c7ff71..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -511,8 +511,6 @@ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMP
-         #    MACRO_TUNE_LINKER("-pie")
-         # These do not work on Windows right now
-         if (NOT WIN32)
--            # Stack protector
--            MACRO_TUNE_COMPILER("-fstack-protector")
-             # Mark code read only
-             MACRO_TUNE_LINKER("-Wl,-zrelro")
-         endif (NOT WIN32)
index e0a59b4a80fca475df1c5a0add927ac03bb30df8..30a749bf0388fa3ef666c78a21fa66d2221c2660 100644 (file)
@@ -16,7 +16,7 @@
  --enable-shared     enables shared build
  --enable-debug      enables debug build
  --enable-tiger      enables Mac OS X 10.4 (Tiger) build
-@@ -51,6 +52,7 @@ SOURCE_DIR=`pwd`
+@@ -51,6 +52,7 @@ BUILD_DIR="$SOURCE_DIR/build-configure"
  
  # cmake parameters
  CMAKE_PREFIX=
index fecb07f550c3213f1c25e1a3de3d71028c03ec20..0067ad1b884fc2fbe012700d2ed6953c1bc79a8c 100644 (file)
@@ -8,7 +8,7 @@
  
  All enable params have their disable counterparts.
  
-@@ -61,6 +62,7 @@ CMAKE_PYTHON=
+@@ -61,6 +62,7 @@ CMAKE_PROTECTION=
  CMAKE_GNAP=
  CMAKE_COMPLETE=
  CMAKE_ICONV=
diff --git a/utils/gammu/patches/020-select.patch b/utils/gammu/patches/020-select.patch
new file mode 100644 (file)
index 0000000..de4ba46
--- /dev/null
@@ -0,0 +1,10 @@
+--- a/libgammu/device/devfunc.c
++++ b/libgammu/device/devfunc.c
+@@ -24,6 +24,7 @@
+ #  include <signal.h>
+ #  include <sys/socket.h>
+ #  include <sys/stat.h>
++#  include <sys/select.h>
+ #endif
+ #include "devfunc.h"
index 230a1feebbe51802c82476808111d500f329fd28..192c26500fe4262d316a2f0845d1a73064ec2495 100644 (file)
@@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gddrescue
 PKG_VERSION:=1.23
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.xz
 PKG_SOURCE_URL:=http://http.debian.net/debian/pool/main/g/$(PKG_NAME)
diff --git a/utils/gddrescue/patches/010-fix-uclibcxx.patch b/utils/gddrescue/patches/010-fix-uclibcxx.patch
new file mode 100644 (file)
index 0000000..66e8e76
--- /dev/null
@@ -0,0 +1,102 @@
+--- a/fillbook.cc
++++ b/fillbook.cc
+@@ -31,6 +31,9 @@
+ #include "block.h"
+ #include "mapbook.h"
++#ifdef __UCLIBCXX_MAJOR__
++#undef fputc
++#endif
+ // Return values: 1 write error, 0 OK.
+ //
+--- a/genbook.cc
++++ b/genbook.cc
+@@ -31,6 +31,9 @@
+ #include "block.h"
+ #include "mapbook.h"
++#ifdef __UCLIBCXX_MAJOR__
++#undef fputc
++#endif
+ const char * format_time( const long t, const bool low_prec )
+   {
+--- a/loggers.cc
++++ b/loggers.cc
+@@ -25,6 +25,9 @@
+ #include "block.h"
+ #include "loggers.h"
++#ifdef __UCLIBCXX_MAJOR__
++#undef fputc
++#endif
+ namespace {
+--- a/main.cc
++++ b/main.cc
+@@ -46,6 +46,11 @@
+ #include "non_posix.h"
+ #include "rescuebook.h"
++#ifdef __UCLIBCXX_MAJOR__
++#undef fgetc
++#undef fputc
++#endif
++
+ #ifndef O_BINARY
+ #define O_BINARY 0
+ #endif
+--- a/main_common.cc
++++ b/main_common.cc
+@@ -15,6 +15,10 @@
+     along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
++#ifdef __UCLIBCXX_MAJOR__
++#undef fputc
++#endif
++
+ int verbosity = 0;
+ namespace {
+--- a/mapbook.cc
++++ b/mapbook.cc
+@@ -32,6 +32,10 @@
+ #include "block.h"
+ #include "mapbook.h"
++#ifdef __UCLIBCXX_MAJOR__
++#undef fgetc
++#undef fputc
++#endif
+ namespace {
+--- a/mapfile.cc
++++ b/mapfile.cc
+@@ -29,6 +29,11 @@
+ #include "block.h"
++#ifdef __UCLIBCXX_MAJOR__
++#undef fgetc
++#undef ferror
++#undef feof
++#endif
+ namespace {
+--- a/rescuebook.cc
++++ b/rescuebook.cc
+@@ -36,6 +36,9 @@
+ #include "mapbook.h"
+ #include "rescuebook.h"
++#ifdef __UCLIBCXX_MAJOR__
++#undef fputc
++#endif
+ namespace {
index f8240e4bda0776d0514fe20790067f22452e686e..65f1b223ec05a3edc1b31f5b27d957880e793d49 100644 (file)
@@ -8,15 +8,15 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gkermit
 PKG_VERSION:=1.00
-PKG_RELEASE:=1
-PKG_LICENSE:=GPL-2.0
+PKG_RELEASE:=2
 
 PKG_SOURCE:=gku100.tar.gz
 PKG_SOURCE_URL:=ftp://kermit.columbia.edu/kermit/archives
 PKG_HASH:=3dbe63291277c4795255343b48b860777fb0a160163d7e1d30b1ee68585593eb
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
 
 PKG_MAINTAINER:=Nathaniel Wesley Filardo <nwfilardo@gmail.com>
+PKG_LICENSE:=GPL-2.0-or-later
+PKG_LICENSE_FILES:=COPYING
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -34,6 +34,7 @@ endef
 define Build/Prepare
        mkdir -p $(PKG_BUILD_DIR)
        tar -C $(PKG_BUILD_DIR) -xzvf "$(DL_DIR)/$(PKG_SOURCE)"
+       $(Build/Patch)
 endef
 
 # nothing to do
diff --git a/utils/gkermit/patches/010-musl.patch b/utils/gkermit/patches/010-musl.patch
new file mode 100644 (file)
index 0000000..e8458a5
--- /dev/null
@@ -0,0 +1,29 @@
+--- a/gcmdline.c
++++ b/gcmdline.c
+@@ -29,6 +29,7 @@
+ */
+ #include <stdio.h>
++#include <stdlib.h>
+ #include "gkermit.h"
+ /* Externals */
+@@ -53,7 +54,7 @@ _MYPROTOTYPE( VOID fatal, (char *) );
+ _MYPROTOTYPE( VOID usage, (void) );
+ #ifndef NOGETENV
+-_MYPROTOTYPE( char * getenv, (char *) );
++_MYPROTOTYPE( char * getenv, (const char *) );
+ #define GARGC 32
+ #define GBUFSIZ 256
+ static char gbuf[GBUFSIZ], *gargs[GARGC], *gptr = NULL;
+--- a/gunixio.c
++++ b/gunixio.c
+@@ -58,6 +58,7 @@
+ */
+ #include <stdio.h>                    /* Standard input/output */
++#include <stdlib.h>
+ #ifdef POSIX
+ #include <termios.h>                  /* Terminal modes */
index 4272034128da29746f156e2ab9b93be8717774b4..a6756659d932b85c3b39a58d37739ebb1cc0e42a 100644 (file)
@@ -8,23 +8,26 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gpsd
-PKG_VERSION:=3.17
+PKG_VERSION:=3.19
 PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SAVANNAH/$(PKG_NAME)
-PKG_HASH:=68e0dbecfb5831997f8b3d6ba48aed812eb465d8c0089420ab68f9ce4d85e77a
+PKG_HASH:=27dd24d45b2ac69baab7933da2bf6ae5fb0be90130f67e753c110a3477155f39
 
 PKG_MAINTAINER:=Pushpal Sidhu <psidhu.devel@gmail.com>
 PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:berlios:gps_daemon
+
+PKG_BUILD_DEPENDS:=scons/host
 
 include $(INCLUDE_DIR)/package.mk
-include $(INCLUDE_DIR)/scons.mk
+include ../../devel/scons/scons.mk
 
 define Package/gpsd/Default
   DEPENDS+= +libusb-1.0
-  URL:=http://catb.org/gpsd/
+  URL:=https://gpsd.gitlab.io/gpsd/
 endef
 
 define Package/gpsd/Default/description
@@ -109,9 +112,9 @@ define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/lib
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgps*.so* $(1)/usr/lib/
        $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
-       $(CP) \
-               $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libgps*.pc \
-               $(1)/usr/lib/pkgconfig/
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libgps.pc $(1)/usr/lib/pkgconfig
+       $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/libgps.pc
+       $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/libgps.pc
 endef
 
 define Package/gpsd/install
index d1e4d8f3b8b961272dcc67281e1e9445ab51c158..cd0fe6e76443257a5a5cd29a508a818e7187498f 100644 (file)
@@ -18,6 +18,7 @@ PKG_HASH:=b960541c499619efd6afe1fa795402e4733c8e11ebf9fafccc0bb4bccdc5b514
 PKG_MAINTAINER:=Julen Landa Alustiza <julen@zokormazo.info>
 PKG_LICENSE:=GPL-3.0
 PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:gnu:grep
 
 PKG_INSTALL:=1
 PKG_BUILD_PARALLEL:=1
index 532b905a1b0ee257e035814b352e1940eda5c308..0b64553e3f1c13726f9574dbab3ff0dcd6b44f32 100644 (file)
@@ -9,12 +9,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gzip
 PKG_VERSION:=1.10
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@GNU/gzip
 PKG_HASH:=8425ccac99872d544d4310305f915f5ea81e04d0f437ef1a230dc9d1c819d7c0
-PKG_LICENSE:=GPL-3.0+
+PKG_LICENSE:=GPL-3.0-or-later
+PKG_CPE_ID:=cpe:/a:gnu:gzip
 
 PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
index d1525ef334710af9b114848d65ea0ae73e36d558..2409c92f17f754d34cfea14c155c982493ef04e8 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=haveged
-PKG_VERSION:=1.9.4
-PKG_RELEASE:=1
+PKG_VERSION:=1.9.8
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://codeload.github.com/jirka-h/haveged/tar.gz/$(PKG_VERSION)?
-PKG_HASH:=c4959d3cb1fa6391d16a3aa1ba4d82cd3a0d497206ae4b87d638088c0664e5aa
+PKG_SOURCE_URL:=https://codeload.github.com/jirka-h/haveged/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=99aa1996c6e39ea2459cfc37addfb8b1eecc63f3a2b6da9db17b22e76b6851ae
 PKG_BUILD_DIR:=$(BUILD_DIR)/haveged-$(PKG_VERSION)
 PKG_LICENSE:=GPLv3
 
index 113d64f795bd241dfecc269092a2fc163e782eca..c0b1a7ffc1118b5e19e47b218a0aa7ef0393e891 100644 (file)
@@ -1,16 +1,17 @@
 #!/bin/sh /etc/rc.common
-# Copyright (C) 2012 OpenWrt.org
 
 START=13
+USE_PROCD=1
 
 HAVEGED_THRESHOLD=1024
 HAVEGED_DCACHE=32
 HAVEGED_ICACHE=32
 
-start() {
-       service_start /usr/sbin/haveged -w $HAVEGED_THRESHOLD -d $HAVEGED_DCACHE -i $HAVEGED_ICACHE -v 1
-}
-
-stop() {
-       service_stop /usr/sbin/haveged
+start_service() {
+       procd_open_instance
+       procd_set_param command /usr/sbin/haveged
+       procd_append_param command -F -w $HAVEGED_THRESHOLD -d $HAVEGED_DCACHE -i $HAVEGED_ICACHE -v 1
+       procd_set_param stdout 1
+       procd_set_param stderr 1
+       procd_close_instance
 }
index e5184280e9fa1b512a8f686de32e656a982a78e0..1c7cd97d47b8bdc4078988d4915ac56452194bda 100644 (file)
@@ -9,9 +9,9 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=hfsprogs
 PKG_VERSION:=332.25
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
-PKG_LICENSE:=GPL-3.0+
+PKG_LICENSE:=GPL-3.0-or-later
 PKG_LICENSE_FILES:=COPYING
 
 PKG_MAINTAINER:=Florian Fainelli <florian@openwrt.org>
index e3e8054bd73c6140bd8eb4f74a169f60684a7830..842eb7b352ecae78346e15521c381cb9fc735f1a 100644 (file)
@@ -9,19 +9,19 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=hplip
-PKG_VERSION:=3.19.3
-PKG_RELEASE:=1
+PKG_VERSION:=3.19.6
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/hplip
-PKG_HASH:=a04edf0b5b4c4dcaa3998a27caad8f24513340e0aea61b694397c7807d7c2ae6
+PKG_HASH:=fcdaedee9ed17d2e70f3aff9558a452d99443d1b93d6623132faf3f3ae61d66d
 
 PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
-PKG_LICENSE:=GPL-2.0 GPL-2.0+
+PKG_LICENSE:=GPL-2.0 GPL-2.0-or-later
 PKG_LICENSE_FILES:=COPYING LICENSE
 
 PKG_BUILD_PARALLEL:=1
-PKG_BUILD_DEPENDS:= python libcups
+PKG_BUILD_DEPENDS:=libcups
 PKG_FIXUP:=autoreconf
 
 include $(INCLUDE_DIR)/package.mk
index a3a8a35d0b208939d23f323bc2c49bae729f9af1..31ea2544beb817f42d7920d0e1ddccf45eeee2d9 100644 (file)
@@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=hub-ctrl
 PKG_VERSION:=1.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/codazoda/hub-ctrl.c.git
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
 PKG_SOURCE_VERSION:=3eef0240fac90067d081551e9f73dfa741d94a9e
-PKG_LICENSE:=GPL-2.0+
+PKG_LICENSE:=GPL-2.0-or-later
 
 PKG_MAINTAINER:=Simon Peter <probono@puredarwin.org>
 
index 3e8a2b3d7eaca40eff1557b0e9f3db9dc65a55fb..58c5ff86d5e6a1e7fa849804caa7b5bd4ffa1149 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=i2c-tools
 PKG_VERSION:=4.1
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@KERNEL/software/utils/i2c-tools
@@ -114,7 +114,7 @@ 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/
+       $(CP) $(PKG_BUILD_DIR)/lib/libi2c.so* $(1)/usr/lib/
 endef
 
 define Package/i2c-tools/install
index a861e7477e86794a7b0e6cbf210e6c4bad037738..fe3f779b2af107ec09ef9ccd0241dab65649b1ab 100644 (file)
@@ -6,7 +6,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=io
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 include $(INCLUDE_DIR)/package.mk
 
index 257205404925349de34aa397c5a116a5f1e2cf9d..51929121397b1d3fdf4a8971419d8c02b81d52f2 100644 (file)
@@ -343,7 +343,7 @@ main (int argc, char **argv)
                printf("Attempting to map 0x%lx bytes at address 0x%08lx\n",
                        real_len, real_addr);
 
-       mfd = open("/dev/mem", (memfunc == MEM_READ) ? O_RDONLY : O_RDWR);
+       mfd = open("/dev/mem", (memfunc == MEM_READ) ? (O_RDONLY | O_SYNC) : (O_RDWR | O_SYNC));
        if (mfd == -1) {
                perror("open /dev/mem");
                fprintf(stderr, "Is CONFIG_DEVMEM activated?\n");
index 409369903ad5029707d70b6bd3d4d7d6dd08c7c0..66843072e3471ab1bb69ca77783f0037de4230e5 100644 (file)
@@ -29,6 +29,7 @@ PKG_HASH:=495a0a61f26404070fe8a719d80406dc7f337623788e445b92a9f6de512ab9de
 
 PKG_MAINTAINER:=Vitaly Protsko <villy@sft.ru>
 PKG_LICENCE:=GPL-2.0
+PKG_CPE_ID:=cpe:/a:joseph_allen:joe
 
 include $(INCLUDE_DIR)/package.mk
 
index d54e4583cc53e17ebe5eb9d116f4618720e370b3..b9e7b6068ec0da02cdd65786f7e17bea9c9f0683 100644 (file)
@@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=kmod
 PKG_VERSION:=20
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@KERNEL/linux/utils/kernel/kmod/
 PKG_HASH:=89c1a1a2193c31f9ebe582640bfa2bd401341dc24119f5a7f702588116fadaa0
 PKG_MAINTAINER:=Jeff Waugh <jdub@bethesignal.org>
-PKG_LICENSE:=LGPL-2.1+
+PKG_LICENSE:=LGPL-2.1-or-later
 PKG_LICENSE_FILES:=COPYING
 PKG_FIXUP:=autoreconf
 
index 0260cf4a4999dcb988b95cada098d55bb6729bd7..231f03e88f5768670f39b98e3f107bf5bc9e2d8a 100644 (file)
@@ -9,17 +9,17 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=lcdproc
 PKG_VERSION:=0.5.9
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/lcdproc/lcdproc/releases/download/v$(PKG_VERSION)/
 PKG_HASH:=d48a915496c96ff775b377d2222de3150ae5172bfb84a6ec9f9ceab962f97b83
+
 PKG_MAINTAINER:=Harald Geyer <harald@ccbib.org>, \
                Philip Prindeville <philipp@redfish-solutions.com>
-PKG_LICENSE:=GPL-2.0
+PKG_LICENSE:=GPL-2.0-only
 PKG_LICENSE_FILES:=COPYING
-
-PKG_FIXUP:=autoreconf
+PKG_CPE_ID:=cpe:/a:lcdproc:lcdproc
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -109,10 +109,6 @@ This package contains display drivers with external dependencies:
 $(LCDPROC_OTHER_DRIVERS_TEXT)
 endef
 
-
-# not everything groks --disable-nls
-DISABLE_NLS:=
-
 CONFIGURE_ARGS += \
        --disable-libX11 \
        --disable-libhid \
@@ -120,9 +116,6 @@ CONFIGURE_ARGS += \
        --disable-freetype \
        --enable-drivers='all,!g15,!g15driver,!glcdlib,!irman,!lirc,!mdm166a,!mx5000,!svga,!xosd'
 
-# can't use -Wformat=2 because MUSL is somewhat broken
-TARGET_CFLAGS+=-Wall
-
 MAKE_FLAGS += \
         CFLAGS="$(TARGET_CFLAGS)" \
         LDFLAGS="$(TARGET_LDFLAGS)"
diff --git a/utils/lcdproc/patches/110-in-outb.patch b/utils/lcdproc/patches/110-in-outb.patch
new file mode 100644 (file)
index 0000000..7bf34eb
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/server/drivers/port.h
++++ b/server/drivers/port.h
+@@ -94,7 +94,7 @@ static inline int port_deny_multiple(unsigned short port, unsigned short count);
+ /*  ---------------------------- Linux ------------------------------------ */
+ /*  Use ioperm, inb and outb in <sys/io.h> (Linux) */
+ /*  And iopl for higher addresses of PCI LPT cards */
+-#if defined HAVE_IOPERM
++#if defined(__GLIBC__) || (defined(__x86__) || defined(__x86_64__))
+ /* Glibc2 and Glibc1 */
+ # ifdef HAVE_SYS_IO_H
index 9b334f13cc2412e1827a0c080f85dfd762e3d0e6..f74a40122f22cbcac79c55c6701ca59e9b9ee3ae 100644 (file)
@@ -18,6 +18,7 @@ PKG_HASH:=503f91ab0af4846f34f0444ab71c4b286123f0044a4964f1ae781486c617f2e2
 PKG_LICENSE:=GPL-3.0
 PKG_LICENSE_FILES:=COPYING
 PKG_MAINTAINER:=Julen Landa Alustiza <julen@zokormazo.info>
+PKG_CPE_ID:=cpe:/a:gnu:less
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
 PKG_INSTALL:=1
diff --git a/utils/libnetwork/Makefile b/utils/libnetwork/Makefile
new file mode 100644 (file)
index 0000000..28bfbb2
--- /dev/null
@@ -0,0 +1,49 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libnetwork
+PKG_RELEASE:=2
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=LICENSE
+
+GO_PKG:=github.com/docker/libnetwork
+GO_PKG_BUILD_PKG:= \
+  $(GO_PKG)/cmd/proxy \
+  $(GO_PKG)/cmd/dnet
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://$(GO_PKG)
+PKG_SOURCE_VERSION:=fc5a7d91d54cc98f64fc28f9e288b46a0bee756c
+PKG_SOURCE_DATE:=2019-08-03
+PKG_MIRROR_HASH:=a54fe7456ce448efc33d274ac8f2115d25196d7d58c44e5227bb0846b29b7fcd
+
+PKG_MAINTAINER:=Gerard Ryan <G.M0N3Y.2503@gmail.com>
+
+PKG_BUILD_DEPENDS:=golang/host
+PKG_BUILD_PARALLEL:=1
+
+include $(INCLUDE_DIR)/package.mk
+include ../../lang/golang/golang-package.mk
+
+define Package/libnetwork
+  SECTION:=utils
+  CATEGORY:=Utilities
+  TITLE:=networking for containers
+  URL:=https://github.com/docker/libnetwork
+  DEPENDS:=$(GO_ARCH_DEPENDS) @TARGET_x86_64
+endef
+
+define Package/libnetwork/description
+Libnetwork provides a native Go implementation for connecting containers.
+The goal of libnetwork is to deliver a robust Container Network Model that provides a consistent programming interface and the required network abstractions for applications.
+endef
+
+define Package/libnetwork/install
+       $(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR))
+
+       $(INSTALL_DIR) $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dnet $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/proxy $(1)/usr/bin/docker-proxy
+endef
+
+$(eval $(call GoBinPackage,libnetwork))
+$(eval $(call BuildPackage,libnetwork))
index 28cedf060e3aae914c6b326e49af1fd9ea552042..5cacb6112ac1d18649c029b7e8c85055010cee60 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=lm-sensors
 PKG_VERSION:=3.5.0
-PKG_RELEASE:=2
+PKG_RELEASE:=4
 
 PKG_VERSION_SUBST=$(subst .,-,$(PKG_VERSION))
 PKG_SOURCE_URL:=https://codeload.github.com/lm-sensors/lm-sensors/tar.gz/V$(PKG_VERSION_SUBST)?
@@ -18,7 +18,8 @@ PKG_HASH:=f671c1d63a4cd8581b3a4a775fd7864a740b15ad046fe92038bcff5c5134d7e0
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION_SUBST)
 
 PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
-PKG_LICENSE:=GPL-2.0+ LGPL-2.1+
+PKG_LICENSE:=GPL-2.0-or-later LGPL-2.1-or-later
+PKG_CPE_ID:=cpe:/a:lm_sensors:lm_sensors
 
 PKG_BUILD_PARALLEL:=1
 
@@ -42,7 +43,12 @@ define Package/lm-sensors-detect
   SECTION:=utils
   CATEGORY:=Utilities
   TITLE:=lm-sensors-detect
-  DEPENDS+=+lm-sensors +perl +perlbase-essential +perlbase-fcntl +perlbase-file +perlbase-xsloader
+  DEPENDS+=+lm-sensors \
+       +PACKAGE_lm-sensors-detect:perl \
+       +PACKAGE_lm-sensors-detect:perlbase-essential \
+       +PACKAGE_lm-sensors-detect:perlbase-fcntl \
+       +PACKAGE_lm-sensors-detect:perlbase-file \
+       +PACKAGE_lm-sensors-detect:perlbase-xsloader
 endef
 
 define Package/libsensors
@@ -114,7 +120,7 @@ endef
 
 define Package/libsensors/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(INSTALL_DATA) $(PKG_BUILD_DIR)/lib/libsensors.so* $(1)/usr/lib
+       $(CP) $(PKG_BUILD_DIR)/lib/libsensors.so* $(1)/usr/lib
 endef
 
 $(eval $(call BuildPackage,lm-sensors))
index 24774258b91c37c3a3fe76199649ba690794d7ad..6b44088eb2b6b05c77eced37901099df90ea8353 100644 (file)
@@ -9,22 +9,35 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=logrotate
 PKG_VERSION:=3.15.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:= https://github.com/logrotate/logrotate/releases/download/$(PKG_VERSION)
 PKG_HASH:=313612c4776a305393454c874ef590d8acf84c9ffa648717731dfe902284ff8f
-PKG_LICENSE:=GPL-2.0
+
+PKG_MAINTAINER:=Christian Beier <cb@shoutrlabs.com>
+PKG_LICENSE:=GPL-2.0-or-later
+PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:gentoo:logrotate
 
 include $(INCLUDE_DIR)/package.mk
 
 define Package/logrotate
   SECTION:=utils
   CATEGORY:=Utilities
-  DEPENDS:=+libpopt
+  DEPENDS:=+libpopt +LOGROTATE_ACL:libacl
   TITLE:=rotates, compresses, and mails system logs
   URL:=https://github.com/logrotate/logrotate
-  MAINTAINER:=Christian Beier <cb@shoutrlabs.com>
+  MENU:=1
+endef
+
+define Package/logrotate/config
+       if PACKAGE_logrotate
+               config LOGROTATE_ACL
+                       bool
+                       prompt "Enable ACL support"
+                       default y if USE_FS_ACL_ATTR
+       endif
 endef
 
 define Package/logrotate/description
@@ -38,20 +51,17 @@ define Package/logrotate/conffiles
 /etc/logrotate.conf
 endef
 
-CONFIGURE_ARGS += --with-acl=no
-
-EXTRA_CFLAGS += $(TARGET_CPPFLAGS) -Wno-nonnull-compare
-EXTRA_LDFLAGS += $(TARGET_LDFLAGS)
+CONFIGURE_ARGS += $(if $(CONFIG_LOGROTATE_ACL),--with,--without)-acl
 
 define Build/Compile
        $(call Build/Compile/Default, \
-               RPM_OPT_FLAGS:="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
-               LDFLAGS="$(EXTRA_LDFLAGS)" \
+               RPM_OPT_FLAGS:="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
+               LDFLAGS="$(TARGET_LDFLAGS)" \
                logrotate \
        )
 endef
 
-define Package/logrotate/install       
+define Package/logrotate/install
        $(INSTALL_DIR) $(1)/usr/sbin
        $(INSTALL_BIN) ${PKG_BUILD_DIR}/logrotate $(1)/usr/sbin/
        $(INSTALL_DIR) $(1)/etc
index 50374e53ea0d17cc74364461b75e211a1fc9fd03..a1b9595135ed1e0f5122a5556dc7aca05fc7090c 100644 (file)
@@ -9,14 +9,14 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=lrzsz
 PKG_VERSION:=0.12.20
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://ohse.de/uwe/releases/
 PKG_HASH:=c28b36b14bddb014d9e9c97c52459852f97bd405f89113f30bee45ed92728ff1
 
 PKG_MAINTAINER:=Hsing-Wang Liao <kuoruan@gmail.com>
-PKG_LICENSE:=GPL-2.0+
+PKG_LICENSE:=GPL-2.0-or-later
 PKG_LICENSE_FILES:=COPYING
 
 PKG_INSTALL:=1
index 7395c95a502035bed75854b7992f6c997c09294d..d351763f3b1115c36c8d714437fc09b91c5e5152 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=LVM2
 PKG_VERSION:=2.03.02
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME).$(PKG_VERSION).tgz
 PKG_SOURCE_URL:=https://sourceware.org/pub/lvm2
@@ -20,6 +20,7 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME).$(PKG_VERSION)
 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
 PKG_LICENSE:=GPL-2.0 LGPL-2.1
 PKG_LICENSE_FILES:=COPYING COPYING.lib
+PKG_CPE_ID:=cpe:/a:heinz_mauelshagen:lvm2
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -76,7 +77,7 @@ endef
 
 define Package/libdevmapper/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libdevmapper.so.* $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdevmapper.so.* $(1)/usr/lib
 endef
 
 define Package/lvm2/install
index b655d3e594590944d6f3069a798279b681705d41..ff58ba09602d230771795b08d7a34b70f52a17ac 100644 (file)
@@ -6,7 +6,8 @@ config LXC_KERNEL_OPTIONS
        default n
        select KERNEL_CGROUPS
        select KERNEL_NAMESPACES
-       select KERNEL_LXC_MISC
+       select KERNEL_DEVPTS_MULTIPLE_INSTANCES
+       select KERNEL_POSIX_MQUEUE
        select KERNEL_CGROUP_SCHED
        select KERNEL_FAIR_GROUP_SCHED
        select KERNEL_RT_GROUP_SCHED
index 8641775dd1d7d4d0415bc9d083c0a46ecf4d70b5..a66d468c5d6a3dbc7498004c9ab6dfcedc067bfb 100644 (file)
@@ -9,9 +9,9 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=lxc
 PKG_VERSION:=2.1.1
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
-PKG_LICENSE:=LGPL-2.1+ BSD-2-Clause GPL-2.0
+PKG_LICENSE:=LGPL-2.1-or-later BSD-2-Clause GPL-2.0
 PKG_MAINTAINER:=Marko Ratkaj <marko.ratkaj@sartura.hr>
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
index e0d9b7c2959990607b18d14a47a7a78f7a77c9ed..c2ca58f1d40c80f64c3823f6c6bbe6abe8aec5e5 100644 (file)
@@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=macchanger
 PKG_VERSION:=1.7.0
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/alobbs/macchanger/releases/download/$(PKG_VERSION)/
 PKG_HASH:=dae2717c270fd5f62d790dbf80c19793c651b1b26b62c101b82d5fdf25a845bf
 
-PKG_LICENSE:=GPL-2.0+
+PKG_LICENSE:=GPL-2.0-or-later
 PKG_LICENSE_FILES:=COPYING
 PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org>
 
index fead55294452438ddff6517492b05d96aadc9e78..df26bc568f2d1bc513fd826b4c27795605608752 100644 (file)
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mariadb
-PKG_VERSION:=10.2.24
+PKG_VERSION:=10.2.26
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
@@ -18,10 +18,10 @@ 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:=97f4d924e69f77abb2f650116785c2f5ef356230442534ebcbaadb51d9bb8bc4
+PKG_HASH:=152fe941c4f2a352b2b3a4db1ef64e70235fd9ff055af62ad7bda9f2b2191528
 PKG_MAINTAINER:=Sebastian Kemper <sebastian_ml@gmx.net>
 PKG_LICENSE:=GPL-2.0 LGPL-2.1
-PKG_LICENSE_FILES:=COPYING libmariadb/COPYING.LIB
+PKG_LICENSE_FILES:=COPYING THIRDPARTY libmariadb/COPYING.LIB
 
 PKG_CPE_ID:=cpe:/a:mariadb:mariadb
 
@@ -65,7 +65,6 @@ MARIADB_SERVER_PLUGINS := \
        auth_ed25519 \
        auth_gssapi \
        auth_pam \
-       client_ed25519 \
        disks \
        feedback \
        file_key_management \
@@ -98,7 +97,6 @@ plugin-auth_gssapi_client       := PLUGIN_AUTH_GSSAPI_CLIENT
 plugin-auth_ed25519             := PLUGIN_AUTH_ED25519
 plugin-auth_gssapi              := PLUGIN_AUTH_GSSAPI
 plugin-auth_pam                 := PLUGIN_AUTH_PAM
-plugin-client_ed25519           := PLUGIN_CLIENT_ED25519
 plugin-disks                    := PLUGIN_DISKS
 plugin-feedback                 := PLUGIN_FEEDBACK
 plugin-file_key_management      := PLUGIN_FILE_KEY_MANAGEMENT
@@ -235,7 +233,7 @@ define Package/mariadb/Default
   SECTION:=utils
   CATEGORY:=Utilities
   URL:=https://mariadb.org/
-  SUBMENU:=database
+  SUBMENU:=Database
 endef
 
 define Package/mariadb-client
@@ -327,7 +325,7 @@ define Package/mariadb-server-base
   $(call Package/mariadb/Default)
   DEPENDS:=mariadb-common \
          $(MARIADB_COMMON_DEPENDS_EXE) \
-         +!arc:libaio \
+         +libaio \
          +liblzma \
          +libpcre \
          +resolveip
@@ -523,6 +521,7 @@ define Package/libmariadb/install
        $(INSTALL_DIR) $(1)$(PLUGIN_DIR)
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{mariadb,mysqlclient}*.so* $(1)/usr/lib
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)$(PLUGIN_DIR)/caching_sha2_password.so $(1)$(PLUGIN_DIR)
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)$(PLUGIN_DIR)/client_ed25519.so $(1)$(PLUGIN_DIR)
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)$(PLUGIN_DIR)/dialog.so $(1)$(PLUGIN_DIR)
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)$(PLUGIN_DIR)/mysql_clear_password.so $(1)$(PLUGIN_DIR)
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)$(PLUGIN_DIR)/sha256_password.so $(1)$(PLUGIN_DIR)
@@ -617,7 +616,6 @@ $(eval $(call BuildPlugin,libmariadb,auth_gssapi_client,+krb5-libs))
 $(eval $(call BuildPlugin,mariadb-server,auth_ed25519,))
 $(eval $(call BuildPlugin,mariadb-server,auth_gssapi,+krb5-libs))
 $(eval $(call BuildPlugin,mariadb-server,auth_pam,+libpam))
-$(eval $(call BuildPlugin,mariadb-server,client_ed25519,))
 $(eval $(call BuildPlugin,mariadb-server,disks,))
 $(eval $(call BuildPlugin,mariadb-server,feedback,))
 $(eval $(call BuildPlugin,mariadb-server,file_key_management,))
index 81cef724cb5c14131a72926e3869cbd12159f913..ae1ce0e226cf6b38d09be3d013c4a06960b2d21f 100644 (file)
@@ -1,6 +1,6 @@
 --- a/scripts/mysql_install_db.sh
 +++ b/scripts/mysql_install_db.sh
-@@ -403,7 +403,7 @@ fi
+@@ -410,7 +410,7 @@ fi
  
  
  # Try to determine the hostname
index e7dad179e3c9af3a842b89be5b7a02f117495a34..00a6363057708578040ec1be8e40547b92d63d22 100644 (file)
@@ -46,7 +46,7 @@ Author: Vicențiu Ciorbaru <vicentiu@mariadb.org>
 +++ b/include/atomic/gcc_builtins.h
 @@ -16,6 +16,7 @@
     along with this program; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA */
+    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335  USA */
  
 +#if defined (HAVE_GCC_ATOMIC_BUILTINS)
  #define make_atomic_add_body(S)                     \
index c2b58778dcbc7904c5a4bbd78f4700960c40c8c3..501eb53ca5160330c9486c2b3f86c45cfa2ca98d 100644 (file)
@@ -189,7 +189,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
    CheckType(pv)
    TYPE *lp = ((TYPBLK*)pv)->Typp;
  
--  for (register int i = k; i < n; i++)          // TODO
+-  for (int i = k; i < n; i++)          // TODO
 -    Typp[i] = lp[i];
 +  memcpy(Typp + k, lp + k, sizeof(TYPE) * n);
  
index 198d5f10cd0630eab7350340c0f0fd13bd355e94..84637a47d42a21276f6514e6382af50d610e3e86 100644 (file)
@@ -27,7 +27,7 @@ directly was the first solution adopted in MariaDB [2].
 
 --- a/storage/xtradb/include/ut0ut.h
 +++ b/storage/xtradb/include/ut0ut.h
-@@ -85,9 +85,8 @@ private:
+@@ -83,9 +83,8 @@ private:
     the YieldProcessor macro defined in WinNT.h. It is a CPU architecture-
     independent way by using YieldProcessor. */
  #  define UT_RELAX_CPU() YieldProcessor()
@@ -39,7 +39,7 @@ directly was the first solution adopted in MariaDB [2].
  # else
  #  define UT_RELAX_CPU() ((void)0) /* avoid warning for an empty statement */
  # endif
-@@ -101,9 +100,8 @@ private:
+@@ -99,9 +98,8 @@ private:
  #endif
  
  # if defined(HAVE_HMT_PRIORITY_INSTRUCTION)
@@ -53,7 +53,7 @@ directly was the first solution adopted in MariaDB [2].
  #  define UT_RESUME_PRIORITY_CPU() ((void)0)
 --- a/storage/innobase/include/ut0ut.h
 +++ b/storage/innobase/include/ut0ut.h
-@@ -71,9 +71,8 @@ typedef time_t       ib_time_t;
+@@ -68,9 +68,8 @@ Created 1/20/1994 Heikki Tuuri
     the YieldProcessor macro defined in WinNT.h. It is a CPU architecture-
     independent way by using YieldProcessor. */
  # define UT_RELAX_CPU() YieldProcessor()
@@ -65,7 +65,7 @@ directly was the first solution adopted in MariaDB [2].
  #else
  # define UT_RELAX_CPU() do { \
       volatile int32   volatile_var; \
-@@ -91,9 +90,8 @@ typedef time_t       ib_time_t;
+@@ -88,9 +87,8 @@ Created 1/20/1994 Heikki Tuuri
  #endif
  
  #if defined(HAVE_HMT_PRIORITY_INSTRUCTION)
index 5227928503c7d82a64b3b11d52644c9517174b6f..edf1ea7f873599dc0c4bd460490540437de5f3bf 100644 (file)
@@ -24,7 +24,7 @@ Date:   Sun Dec 9 21:19:24 2018 +0100
 
 --- a/client/mysql.cc
 +++ b/client/mysql.cc
-@@ -2577,7 +2577,7 @@ C_MODE_END
+@@ -2578,7 +2578,7 @@ C_MODE_END
    if not.
  */
  
@@ -33,7 +33,7 @@ Date:   Sun Dec 9 21:19:24 2018 +0100
  static int fake_magic_space(int, int);
  extern "C" char *no_completion(const char*,int)
  #elif defined(USE_LIBEDIT_INTERFACE)
-@@ -2659,7 +2659,7 @@ static int not_in_history(const char *li
+@@ -2660,7 +2660,7 @@ static int not_in_history(const char *li
  }
  
  
@@ -42,7 +42,7 @@ Date:   Sun Dec 9 21:19:24 2018 +0100
  static int fake_magic_space(int, int)
  #else
  static int fake_magic_space(const char *, int)
-@@ -2676,7 +2676,7 @@ static void initialize_readline (char *n
+@@ -2677,7 +2677,7 @@ static void initialize_readline (char *n
    rl_readline_name = name;
  
    /* Tell the completer that we want a crack first. */
@@ -51,7 +51,7 @@ Date:   Sun Dec 9 21:19:24 2018 +0100
    rl_attempted_completion_function= (rl_completion_func_t*)&new_mysql_completion;
    rl_completion_entry_function= (rl_compentry_func_t*)&no_completion;
  
-@@ -2706,7 +2706,7 @@ static char **new_mysql_completion(const
+@@ -2707,7 +2707,7 @@ static char **new_mysql_completion(const
                                     int end __attribute__((unused)))
  {
    if (!status.batch && !quick)
index 6a96ef24792296448957fec34a9a9fe6d551fa35..fcd8fad33fea3625c341f0e84cff35799fb647e7 100644 (file)
@@ -49,11 +49,11 @@ config MC_CHARSET
 
 config MC_VFS
        bool "Enable virtual filesystem support"
-       default n
+       default y
        help
            This option enables the Virtual File System switch code to get
            transparent access to the following file systems:
            cpio, tar, fish, sfs, ftp, sftp, extfs.
-           Disabled by default.
+           Enabled by default.
 
 endmenu
index d37eba52af1eae7119f3458f986459091e0fa411..1f031646c7e202dc2c96e2f086013abc82aea449 100644 (file)
@@ -6,14 +6,15 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mc
-PKG_VERSION:=4.8.22
-PKG_RELEASE:=1
+PKG_VERSION:=4.8.23
+PKG_RELEASE:=2
 PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
-PKG_LICENSE:=GPL-3.0+
+PKG_LICENSE:=GPL-3.0-or-later
+PKG_CPE_ID:=cpe:/a:midnight_commander:midnight_commander
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=http://ftp.midnight-commander.org/
-PKG_HASH:=ee7868d7ba0498cf2cccefe107d7efee7f2571098806bba2aed5a159db801318
+PKG_HASH:=dd7f7ce74183307b0df25b5c3e60ad3293fd3d3d27d2f37dd7a10efce13dff1c
 PKG_BUILD_PARALLEL:=1
 PKG_FIXUP:=autoreconf gettext-version
 PKG_BUILD_DEPENDS:=MC_VFS:libtirpc
@@ -98,8 +99,9 @@ define Package/mc/install
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/mc $(1)/usr/bin
        $(INSTALL_DIR) $(1)/etc/mc
        $(INSTALL_DATA) $(PKG_BUILD_DIR)/misc/mc.charsets $(1)/etc/mc
-       $(INSTALL_DATA) $(PKG_BUILD_DIR)/misc/mc.default.keymap $(1)/etc/mc
        $(INSTALL_DATA) $(PKG_BUILD_DIR)/misc/mc.ext $(1)/etc/mc
+       $(INSTALL_DATA) $(PKG_BUILD_DIR)/misc/mc.default.keymap $(1)/etc/mc/mc.keymap
+       $(INSTALL_DATA) $(PKG_BUILD_DIR)/misc/filehighlight.ini $(1)/etc/mc
        $(INSTALL_DIR) $(1)/usr/share/mc/help
        $(INSTALL_DATA) $(PKG_BUILD_DIR)/doc/hlp/mc.hlp $(1)/usr/share/mc/help
        $(INSTALL_DATA) $(PKG_BUILD_DIR)/misc/mc.menu $(1)/etc/mc
@@ -113,7 +115,7 @@ ifeq ($(CONFIG_MC_EDITOR),y)
        ln -sf mc $(1)/usr/bin/mcedit
 endif
 ifeq ($(CONFIG_MC_VFS),y)
-       $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/vfs/extfs/helpers/sfs.ini $(1)/etc/mc
+       $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/vfs/sfs/sfs.ini $(1)/etc/mc
        $(INSTALL_DIR) $(1)/usr/lib/mc/extfs.d
 endif
 endef
index 268c0e568840b296b1c7e00ed7fed0f262ec77cd..13c6d64431f92631f39822931602f0d8fb0662f2 100644 (file)
@@ -5,12 +5,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mg
-PKG_VERSION:=20180927
-PKG_RELEASE:=2
+PKG_VERSION:=6.5
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://github.com/ibara/mg/releases/download/mg-20180927
-PKG_HASH:=99b2fd2cf9d6474153d6c5769c818dd5514c147b8a8ad660a5e114bc1ebd504d
+PKG_SOURCE_URL:=https://codeload.github.com/ibara/mg/tar.gz/$(PKG_NAME)-$(PKG_VERSION)?
+PKG_HASH:=c18ab048c192921b5f826885b4087f3e82ec4272dce2e7ed7cde051cd0acf375
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_NAME)-$(PKG_VERSION)
 
 PKG_MAINTAINER:=Hirokazu MORIKAWA <morikw2@gmail.com>
 PKG_LICENSE:=PUBLICDOMAIN ISC BSD VARIOUS
index cd33355a4b6d9b80366665a940a7f1e7ebf72b1c..67c611682abdab8e0e0f27b0cfa21e07d66773e0 100644 (file)
@@ -1,7 +1,7 @@
 diff -urN a/configure b/configure
---- a/configure        2018-09-28 01:38:31.000000000 +0900
-+++ b/configure        2019-05-22 15:17:05.722101952 +0900
-@@ -3,52 +3,7 @@
+--- a/configure        2019-03-03 22:17:03.000000000 +0900
++++ b/configure        2019-06-04 13:08:41.418919319 +0900
+@@ -3,51 +3,21 @@
  # This configure script written by Brian Callahan <bcallah@openbsd.org>
  # and released into the Public Domain.
  
@@ -50,12 +50,25 @@ diff -urN a/configure b/configure
 -    fi
 -  done
 -  return 1
--}
 +cc="$CC"
++
++fgetlncheck() {
++  cat << EOF > conftest.c
++#include <stdio.h>
++int main(void){fgetln(NULL,NULL);return 0;}
++EOF
++  $cc $tflags -o conftest conftest.c > /dev/null 2>&1
++  if [ $? -eq 0 ] ; then
++    rm -f conftest conftest.c
++    return 0
++  else
++    rm -f conftest conftest.c
++    return 1
++  fi
+ }
  
- fgetlncheck() {
-   cat << EOF > conftest.c
-@@ -162,18 +117,19 @@
+ fparselncheck() {
+@@ -211,18 +181,19 @@
    fi
  }
  
@@ -83,7 +96,7 @@ diff -urN a/configure b/configure
    fi
  }
  
-@@ -241,53 +197,9 @@
+@@ -290,54 +261,9 @@
    ldflags="${ldflags}-static"
  fi
  
@@ -127,6 +140,7 @@ diff -urN a/configure b/configure
 -    libs="$libs -lutil"
 -    ;;
 -  "xNetBSD")
+-    cflags="$cflags -D_OPENBSD_SOURCE"
 -    libs="$libs -lutil"
 -    ;;
 -  "xDragonFly")
@@ -135,24 +149,56 @@ diff -urN a/configure b/configure
 -    ;;
 -esac
 +# OpenWrt
-+libs='-lncurses -lpcre'
++libs='-lncurses -lpcreposix'
 +cflags="$cflags -D_GNU_SOURCE -D__dead=\"__attribute__((__noreturn__))\" -Dst_mtimespec=st_mtim"
  
  cat << EOF > config.h
  /* This file generated automatically by configure.  */
-@@ -370,6 +282,15 @@
-   echo "no"
- fi
+@@ -357,6 +283,15 @@
+ EOF
  
-+printf "checking for futimens... "
-+futimenscheck
++printf "checking for fgetln... "
++fgetlncheck
 +if [ $? -eq 0 ] ; then
-+    echo "#define HAVE_FUTIMENS" >> config.h
++    echo "#define HAVE_FGETLN" >> config.h
 +    echo "yes"
 +else
 +    echo "no"
 +fi
 +
- printf "creating Makefile... "
- cat << EOF > Makefile
- # This Makefile automatically generated by configure.
+ printf "checking for fparseln... "
+ fparselncheck
+ if [ $? -eq 0 ] ; then
+diff -urN a/fparseln.c b/fparseln.c
+--- a/fparseln.c       2019-03-03 22:17:03.000000000 +0900
++++ b/fparseln.c       2019-06-04 13:05:38.815543338 +0900
+@@ -74,6 +74,8 @@
+ #include "util.h"
+ #endif
++#ifndef HAVE_FGETLN
++
+ static char *
+ fgetln(FILE *fp, size_t *len)
+ {
+@@ -119,6 +121,8 @@
+       return buf;
+ }
++#endif /* !HAVE_FGETLN */
++
+ static int isescaped(const char *, const char *, int);
+ /* isescaped():
+diff -urN a/linux.h b/linux.h
+--- a/linux.h  2019-03-03 22:17:03.000000000 +0900
++++ b/linux.h  2019-06-04 13:45:21.787063324 +0900
+@@ -7,6 +7,7 @@
+ #endif
+ #include <sys/types.h>
++#include <sys/stat.h>
+ #include <stdio.h>
+ /* Defines */
index 5bffc22c6b3997be7cabdcc71dda0258273773df..5376eeb70eec5149dc072533851a4972abe16fb8 100644 (file)
@@ -18,6 +18,7 @@ PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
 
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:minicom:minicom
 
 PKG_FIXUP:=autoreconf
 
index 9783f54a5ccb11bb718ab5b16bc0a2c9549a82f0..442e621ea5696fa3f3a18bf21d450037accdc6d5 100644 (file)
@@ -12,9 +12,9 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc-utils.git
-PKG_SOURCE_DATE:=2018-12-09
-PKG_SOURCE_VERSION:=aef913e31b659462fe6b9320d241676cba97f67b
-PKG_MIRROR_HASH:=8c3d872be1392b7a140a36ce75ed48ef300ee6b6f1ce1b37dad1ad263d338dc3
+PKG_SOURCE_DATE:=2019-08-08
+PKG_SOURCE_VERSION:=d40ec535b9d4e4c974e8c2fbfb422cd0348cc5e8
+PKG_MIRROR_HASH:=06bc3a82e173dc0b6823c04645b30db74e2686dc15559bb4e2d4805c43e30b51
 
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=
index aab5e751e90b7c64d6187690d07505c1d0f5ac31..71bfdcf995947e6fe51a9b0d947e9d0121d0fafb 100644 (file)
@@ -9,14 +9,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mt-st
 PKG_VERSION:=1.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)
-PKG_SOURCE_VERSION:=$(PKG_VERSION)
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=ftp://ftp.ibiblio.org/pub/Linux/system/backup/
 PKG_HASH:=945cb4f3d9957dabe768f5941a9148b746396836c797b25f020c84319ba8170d
 
+PKG_MAINTAINER:=Giuseppe Magnotta <giuseppe.magnotta@gmail.com>
 PKG_LICENSE:=GPL-2.0
 
 include $(INCLUDE_DIR)/package.mk
@@ -26,7 +25,6 @@ define Package/mt-st
   CATEGORY:=Utilities
   TITLE:=Magnetic tape control tools for Linux SCSI tapes
   URL:=http://ftp.ibiblio.org/pub/Linux/system/backup/
-  MAINTAINER:=Giuseppe Magnotta <giuseppe.magnotta@gmail.com>
 endef
 
 define Package/mt-st/description
diff --git a/utils/mt-st/patches/010-sysmacros.patch b/utils/mt-st/patches/010-sysmacros.patch
new file mode 100644 (file)
index 0000000..8e4b373
--- /dev/null
@@ -0,0 +1,10 @@
+--- a/mt.c
++++ b/mt.c
+@@ -21,6 +21,7 @@
+ #include <sys/types.h>
+ #include <sys/ioctl.h>
+ #include <sys/stat.h>
++#include <sys/sysmacros.h>
+ #include <sys/utsname.h>
+ #include "mtio.h"
index 05c25d223ad5c53b13989154a8675baa13e16a55..3398dc1fe050e91dd2cc635257f88166ba2f220c 100644 (file)
@@ -8,16 +8,17 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=nano
-PKG_VERSION:=4.2
-PKG_RELEASE:=1
+PKG_VERSION:=4.4
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@GNU/nano
-PKG_HASH:=1143defce62e391b241252ffdb6e5c1ded56cfe26d46ee81b796abe0ccc45df9
+PKG_HASH:=2af222e0354848ffaa3af31b5cd0a77917e9cb7742cd073d762f3c32f0f582c7
 
-PKG_LICENSE:=GPL-3.0+
+PKG_LICENSE:=GPL-3.0-or-later
 PKG_LICENSE_FILES:=COPYING
 PKG_MAINTAINER:=Jonathan Bennett <JBennett@incomsystems.biz>, Hannu Nyman <hannu.nyman@iki.fi>
+PKG_CPE_ID:=cpe:/a:gnu:nano
 
 PKG_INSTALL:=1
 PKG_BUILD_PARALLEL:=1
index 627871367efb628552b41b163327594a02b7219f..19fbc14319c8ca4d69def164d5d252d235725f26 100644 (file)
@@ -15,6 +15,7 @@ PKG_HASH:=3e5a021d7b761261836dcb305370af299793eedbded731df3d6943802e1262d5
 
 PKG_LICENSE:=GPL-2.0 LGPL-2.0
 PKG_LICENSE_FILES:=COPYING COPYING.LIB
+PKG_CPE_ID:=cpe:/a:ntfs-3g:ntfs-3g
 
 PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
 
index 6ab25ce5ecf67f3e02cc9c736bf2ae93f91798b6..07a15fc081ad477f7d84148b6e404e31359b97db 100644 (file)
@@ -9,14 +9,14 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=oath-toolkit
 PKG_VERSION:=2.6.2
-PKG_RELEASE:=3
+PKG_RELEASE:=5
 
 PKG_SOURCE:=oath-toolkit-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SAVANNAH/oath-toolkit
 PKG_HASH:=b03446fa4b549af5ebe4d35d7aba51163442d255660558cd861ebce536824aa0
 
 PKG_MAINTAINER:=Fam Zheng <fam@euphon.net>
-PKG_LICENSE:=LGPL-2.0+ GPL-3.0+
+PKG_LICENSE:=LGPL-2.0-or-later GPL-3.0-or-later
 PKG_LICENSE_FILES:=COPYING
 PKG_CPE_ID:=cpe:/a:nongnu:oath_toolkit
 
@@ -48,7 +48,7 @@ define Package/oath-toolkit/install
        $(INSTALL_DIR) $(1)/usr/bin
        $(INSTALL_DIR) $(1)/usr/lib
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/oathtool $(1)/usr/bin/
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/liboath.so* $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/liboath.so* $(1)/usr/lib/
 endef
 
 $(eval $(call BuildPackage,oath-toolkit))
index 2354610368b8ea4ff6b3f9e5d006efb002110ea9..41da7bab05f9e6f2b6028368f0d348f8b972423f 100644 (file)
@@ -1,4 +1,4 @@
-# 
+#
 # Copyright (C) 2010 segal.ubi.pt
 # Copyright (C) 2014 nunojpg@gmail.com
 # Copyright (C) 2015 dev@localnet.hu
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=open2300
-PKG_VERSION:=1.12
-PKG_RELEASE:=5
-PKG_LICENSE:=GPL-2.0+
-PKG_LICENSE_FILES:=COPYING
+PKG_SOURCE_DATE:=2014-03-04
+PKG_SOURCE_VERSION:=1af8ae609da66f8e1b745533c19095c9758bfb0b
+PKG_RELEASE:=1
 
-PKG_SOURCE_PROTO:=svn
-PKG_SOURCE_URL:=http://www.lavrsen.dk/svn/open2300/trunk
-PKG_SOURCE_VERSION:=r12
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_CHECK_FORMAT_SECURITY:=0
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/wezm/open2300
+PKG_MIRROR_HASH:=3287ca1c70e736dd1c6c3abb01e0d986f91573c7c54b9adabdc437309dc4fd56
 
 PKG_MAINTAINER:=Gabor SZOLLOSI <dev@localnet.hu>
+PKG_LICENSE:=GPL-2.0-or-later
+PKG_LICENSE_FILES:=COPYING
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -37,9 +35,6 @@ define Package/open2300/description
   This is an utility suite used to communicate with and collect data from a WS23XX wheather station.
 endef
 
-MAKE_FLAGS += \
-       CFLAGS="$(TARGET_CFLAGS) -DVERSION=\"$(PKG_VERSION)\""
-
 define Package/open2300/install
        $(INSTALL_DIR) $(1)/usr/bin
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin2300         $(1)/usr/bin/
diff --git a/utils/open2300/patches/001-crosscompile.patch b/utils/open2300/patches/001-crosscompile.patch
deleted file mode 100644 (file)
index 0953047..0000000
+++ /dev/null
@@ -1,139 +0,0 @@
---- a/Makefile
-+++ b/Makefile
-@@ -15,87 +15,82 @@
- prefix = /usr/local
- exec_prefix = ${prefix}
- bindir = ${exec_prefix}/bin
-+libdir = ${prefix}/lib
- #########################################
- CC  = gcc
--OBJ = open2300.o rw2300.o linux2300.o win2300.o
--LOGOBJ = log2300.o rw2300.o linux2300.o win2300.o
--FETCHOBJ = fetch2300.o rw2300.o linux2300.o win2300.o
--WUOBJ = wu2300.o rw2300.o linux2300.o win2300.o
--CWOBJ = cw2300.o rw2300.o linux2300.o win2300.o
--DUMPOBJ = dump2300.o rw2300.o linux2300.o win2300.o
--HISTOBJ = history2300.o rw2300.o linux2300.o win2300.o
--HISTLOGOBJ = histlog2300.o rw2300.o linux2300.o win2300.o
--DUMPBINOBJ = bin2300.o rw2300.o linux2300.o win2300.o
--XMLOBJ = xml2300.o rw2300.o linux2300.o win2300.o
--PGSQLOBJ = pgsql2300.o rw2300.o linux2300.o win2300.o
--LIGHTOBJ = light2300.o rw2300.o linux2300.o win2300.o
--INTERVALOBJ = interval2300.o rw2300.o linux2300.o win2300.o
--MINMAXOBJ = minmax2300.o rw2300.o linux2300.o win2300.o
--MYSQLHISTLOGOBJ = mysqlhistlog2300.o rw2300.o linux2300.o win2300.o
-+LIB = lib2300
-+LIB_C = rw2300.c linux2300.c
-+LIBOBJ = rw2300.o linux2300.o
- VERSION = 1.11
- CFLAGS = -Wall -O3 -DVERSION=\"$(VERSION)\"
--CC_LDFLAGS = -lm
--CC_WINFLAG = 
--# For Windows - comment the two line above and un-comment the two lines below.
--#CC_LDFLAGS = -lm -lwsock32
--#CC_WINFLAG = -mwindows
-+CC_LDFLAGS = -L. -lm -l2300
-+LFLAGS = -shared -Wl,-soname
- INSTALL = install
-+MAKE_EXEC = $(CC) $(CFLAGS) $@.c -o $@ $(CC_LDFLAGS)
- ####### Build rules
--all: open2300 dump2300 log2300 fetch2300 wu2300 cw2300 history2300 histlog2300 bin2300 xml2300 light2300 interval2300 minmax2300 mysql2300 mysqlhistlog2300
-+all: open2300 dump2300 log2300 fetch2300 wu2300 cw2300 history2300 histlog2300 bin2300 xml2300 light2300 interval2300 minmax2300 #mysql2300 mysqlhistlog2300
--open2300 : $(OBJ)
--      $(CC) $(CFLAGS) -o $@ $(OBJ) $(CC_LDFLAGS)
--      
--dump2300 : $(DUMPOBJ)
--      $(CC) $(CFLAGS) -o $@ $(DUMPOBJ) $(CC_LDFLAGS)
-+lib2300 :
-+      $(CC) -c -fPIC $(CFLAGS) $(LIB_C)
-+      $(CC) $(LFLAGS),$@.so -o $@.so.$(VERSION) $(LIBOBJ)
-+      ln -sf $@.so.$(VERSION) $@.so
-+
-+open2300 : $(LIB)
-+      $(MAKE_EXEC)
-       
--log2300 : $(LOGOBJ)
--      $(CC) $(CFLAGS) -o $@ $(LOGOBJ) $(CC_LDFLAGS) $(CC_WINFLAG)
-+dump2300 : $(LIB)
-+      $(MAKE_EXEC)
-       
--fetch2300 : $(FETCHOBJ)
--      $(CC) $(CFLAGS) -o $@ $(FETCHOBJ) $(CC_LDFLAGS)
-+log2300 : $(LIB)
-+      $(MAKE_EXEC)
-       
--wu2300 : $(WUOBJ)
--      $(CC) $(CFLAGS) -o $@ $(WUOBJ) $(CC_LDFLAGS) $(CC_WINFLAG)
-+fetch2300 : $(LIB)
-+      $(MAKE_EXEC)
-+
-+srv2300 : $(LIB)
-+      $(MAKE_EXEC)
-+
-+wu2300 : $(LIB)
-+      $(MAKE_EXEC)
-       
--cw2300 : $(CWOBJ)
--      $(CC) $(CFLAGS) -o $@ $(CWOBJ) $(CC_LDFLAGS) $(CC_WINFLAG)
-+cw2300 : $(LIB)
-+      $(MAKE_EXEC)
--history2300 : $(HISTOBJ)
--      $(CC) $(CFLAGS) -o $@ $(HISTOBJ) $(CC_LDFLAGS)
-+history2300 : $(LIB)
-+      $(MAKE_EXEC)
-       
--histlog2300 : $(HISTLOGOBJ)
--      $(CC) $(CFLAGS) -o $@ $(HISTLOGOBJ) $(CC_LDFLAGS) $(CC_WINFLAG)
-+histlog2300 : $(LIB)
-+      $(MAKE_EXEC)
-       
--bin2300 : $(DUMPBINOBJ)
--      $(CC) $(CFLAGS) -o $@ $(DUMPBINOBJ) $(CC_LDFLAGS)
-+bin2300 : $(LIB)
-+      $(MAKE_EXEC)
--xml2300 : $(XMLOBJ)
--      $(CC) $(CFLAGS) -o $@ $(XMLOBJ) $(CC_LDFLAGS) $(CC_WINFLAG)
-+xml2300 : $(LIB)
-+      $(MAKE_EXEC)
--mysql2300:
--      $(CC) $(CFLAGS) -o mysql2300 mysql2300.c rw2300.c linux2300.c $(CC_LDFLAGS) $(CC_WINFLAG) -I/usr/include/mysql -L/usr/lib/mysql -lmysqlclient
-+mysql2300: $(LIB)
-+      $(CC) $(CFLAGS) $@.c -o $@ -I/usr/include/mysql -L/usr/lib/mysql $(CC_LDFLAGS) -lmysqlclient
--pgsql2300: $(PGSQLOBJ)
--      $(CC) $(CFLAGS) -o $@ $(PGSQLOBJ) $(CC_LDFLAGS) $(CC_WINFLAG) -I/usr/include/pgsql -L/usr/lib/pgsql -lpq
-+pgsql2300: $(LIB)
-+      $(CC) $(CFLAGS) $@.c -o $@ -I/usr/include/pgsql -L/usr/lib/pgsql $(CC_LDFLAGS) -lpq
--light2300: $(LIGHTOBJ)
--      $(CC) $(CFLAGS) -o $@ $(LIGHTOBJ) $(CC_LDFLAGS)
-+light2300: $(LIB)
-+      $(MAKE_EXEC)
-       
--interval2300: $(INTERVALOBJ)
--      $(CC) $(CFLAGS) -o $@ $(INTERVALOBJ) $(CC_LDFLAGS)
-+interval2300: $(LIB)
-+      $(MAKE_EXEC)
-       
--minmax2300: $(MINMAXOBJ)
--      $(CC) $(CFLAGS) -o $@ $(MINMAXOBJ) $(CC_LDFLAGS) $(CC_WINFLAG)
-+minmax2300: $(LIB)
-+      $(MAKE_EXEC)
-       
--mysqlhistlog2300 :
--      $(CC) $(CFLAGS) -o mysqlhistlog2300 mysqlhistlog2300.c rw2300.c linux2300.c $(CC_LDFLAGS) $(CC_WINFLAG) -I/usr/include/mysql -L/usr/lib/mysql -lmysqlclient
-+mysqlhistlog2300 : $(LIB)
-+      $(CC) $(CFLAGS) $@.c -o $@ -I/usr/include/mysql -L/usr/lib/mysql $(CC_LDFLAGS) -lmysqlclient
- install:
index 88a2fa46c1b11b4fac71020bfc768e1e61721db5..b82d14d39a2e545a56ca5b99bdf901f4ffd54543 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=openobex
 PKG_VERSION:=1.7.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-Source.tar.gz
 PKG_SOURCE_URL:=@SF/openobex
@@ -17,7 +17,7 @@ PKG_HASH:=158860aaea52f0fce0c8e4b64550daaae06df2689e05834697b7e8c7d73dd4fc
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-Source
 
 PKG_MAINTAINER:=Rosen Penev <rosenp@gmail.com>
-PKG_LICENSE:=GPL-2.0+ LGPL-2.1+
+PKG_LICENSE:=GPL-2.0-or-later LGPL-2.1-or-later
 PKG_LICENSE_FILES:=COPYING
 PKG_CPE_ID:=cpe:/a:openobex:openobex
 
index 2efe32f68e6a051fc128b9f6188011042001b12b..71231a38490e6936fce3bb1225395f82d06c855d 100644 (file)
@@ -9,10 +9,10 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=opensc
 PKG_VERSION:=0.19.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_HASH:=2c5a0e4df9027635290b9c0f3addbbf0d651db5ddb0ab789cb0e978f02fd5826
 
-PKG_LICENSE:=LGPL-2.1+
+PKG_LICENSE:=LGPL-2.1-or-later
 PKG_LICENSE_FILES:=COPYING
 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
 PKG_SOURCE_URL:=https://github.com/OpenSC/OpenSC/releases/download/$(PKG_VERSION)/
index 48953a4edb25460d366ecd960adcbb1b256c7831..4b611d1b3a60976addef3c471af1eda0c425f451 100644 (file)
@@ -17,6 +17,7 @@ PKG_HASH:=b8d33eba57d4a2f6c8a11ff23f233e3248bd75a42c8219b058a888846edd8717
 
 PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
 PKG_LICENSE:=GPL-2.0
+PKG_CPE_ID:=cpe:/a:owfs:owfs
 
 PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
index b5661c407d6317d2aeae84062d86b1c9c63b9579..ed287eeff8acb7d60ad086061ce6d4a3e7c017d6 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=pciutils
 PKG_VERSION:=3.6.2
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@KERNEL/software/utils/pciutils
@@ -43,17 +43,16 @@ define Package/libpci
   CATEGORY:=Libraries
   TITLE:=Linux PCI Libraries
   URL:=http://mj.ucw.cz/pciutils.shtml
-  DEPENDS:=
 endef
 
 
-PCI_IDS_VER:=0.319
+PCI_IDS_VER:=0.324
 PCI_IDS_FILE:=pci.ids.$(PCI_IDS_VER)
 define Download/pci_ids
   FILE:=$(PCI_IDS_FILE)
   URL_FILE:=pci.ids
   URL:=@GITHUB/vcrhonek/hwdata/v$(PCI_IDS_VER)
-  HASH:=54154a6955f550b110c6a216943dcd69ba6188e68b80bee6efbaa03ef0df0a5f
+  HASH:=6dba287b4aaafb9582d6139eda22ee6580651b8557828b9598d99078a5f4217e
 endef
 $(eval $(call Download,pci_ids))
 
@@ -98,7 +97,7 @@ endef
 
 define Package/libpci/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
 endef
 
 
index bfbd0964e491b8e6209a22bee2a4d2c33fecbe16..a360590d7ae87a8e117b15bde05fd07d3dfb9bc9 100644 (file)
@@ -17,6 +17,7 @@ PKG_HASH:=d76d79edc31cf76e782b9f697420d3defbcc91778c3c650658086a1b748e8792
 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
 PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:muscle:pcsc-lite
 
 PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
index dc8cf38ec48926855aa33683955da07b3fc206e4..23aff9a60825ee6242944f2c4d89bd7a3cfca9fe 100644 (file)
@@ -9,14 +9,14 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=picocom
 PKG_VERSION:=3.1
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/npat-efault/picocom/tar.gz/$(PKG_VERSION)?
 PKG_HASH:=e6761ca932ffc6d09bd6b11ff018bdaf70b287ce518b3282d29e0270e88420bb
 
 PKG_MAINTAINER:=Rosen Penev <rosenp@gmail.com>
-PKG_LICENSE:=GPL-2.0+
+PKG_LICENSE:=GPL-2.0-or-later
 
 include $(INCLUDE_DIR)/package.mk
 
diff --git a/utils/pigz/Makefile b/utils/pigz/Makefile
new file mode 100644 (file)
index 0000000..7f76a08
--- /dev/null
@@ -0,0 +1,35 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=pigz
+PKG_VERSION:=2.4
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://zlib.net/pigz/
+PKG_HASH:=a4f816222a7b4269bd232680590b579ccc72591f1bb5adafcd7208ca77e14f73
+
+PKG_MAINTAINER:=Ken Wong <xinxijishuwyq@gmail.com>
+PKG_LICENSE:=CUSTOM
+PKG_LICENSE_FILES:=README
+PKG_CPE_ID:=cpe:/a:zlib:pigz
+
+PKG_BUILD_PARALLEL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/pigz
+  SECTION:=utils
+  CATEGORY:=Utilities
+  SUBMENU:=Compression
+  TITLE:=pigz
+  URL:=https://zlib.net/pigz
+  DEPENDS:=+zlib
+endef
+
+define Package/pigz/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/pigz $(1)/usr/bin/pigz
+endef
+
+$(eval $(call BuildPackage,pigz))
+
diff --git a/utils/pigz/patches/001.patch b/utils/pigz/patches/001.patch
new file mode 100644 (file)
index 0000000..b75daa1
--- /dev/null
@@ -0,0 +1,14 @@
+--- a/Makefile 2019-05-22 19:54:23.980451289 +0800
++++ b/Makefile 2019-06-10 10:32:58.054675929 +0800
+@@ -1,7 +1,7 @@
+-CC=gcc
+-CFLAGS=-O3 -Wall -Wextra -Wno-unknown-pragmas
+-LDFLAGS=
+-LIBS=-lm -lpthread -lz
++CC?=gcc
++CFLAGS?=-O3 -Wall -Wextra -Wno-unknown-pragmas
++LDFLAGS?=
++LIBS?=-lm -lpthread -lz
+ ZOPFLI=zopfli/src/zopfli/
+ ZOP=deflate.o blocksplitter.o tree.o lz77.o cache.o hash.o util.o squeeze.o katajainen.o
index 15a5881e4d02a5a865a6f186e5ee62064414906b..4fa32c542d8edc14e97f0aa262d01f58bf54e8b0 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=powertop
 PKG_VERSION:=2.10
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://01.org/sites/default/files/downloads/
@@ -39,8 +39,14 @@ define Package/powertop/description
  and power management.
 endef
 
+TARGET_CFLAGS += $(FPIC)
+ifeq ($(CONFIG_USE_UCLIBC),y)
+TARGET_CFLAGS += -fno-stack-protector
+endif
 TARGET_LDFLAGS += $(if $(INTL_FULL),-lintl)
 
+CONFIGURE_ARGS += --without-pic
+
 define Package/powertop/install
        $(INSTALL_DIR) $(1)/usr/sbin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/powertop \
diff --git a/utils/powertop/patches/001-musl-fix-headers.patch b/utils/powertop/patches/001-musl-fix-headers.patch
deleted file mode 100644 (file)
index 9839d15..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
---- ./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" {
index 3f389282598a11079f3ac6a6221213ed1c7409b4..11c69426ffb811c31e8e051bcf1031fc9f9b14ff 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=procps-ng
 PKG_VERSION:=3.3.15
-PKG_RELEASE:=1
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@SF/procps-ng
@@ -73,7 +73,7 @@ define GenPlugin
    $(call Package/procps-ng/Default)
    DEPENDS:=procps-ng
    TITLE:=Applet $(2) from the procps-ng package
-   DEFAULT:=y
+   DEFAULT:=n
    ALTERNATIVES:=200:$(3)/$(2):$(3)/$(1)
  endef
 
@@ -91,7 +91,7 @@ MAKE_FLAGS += \
 
 define Package/procps-ng/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libprocps.so* $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libprocps.so* $(1)/usr/lib/
 endef
 
 define BuildPlugin
index 83a5c06cf78745433236db4730aaa091fd2b1b47..6536943b1f8c26eb175a438d524758dec00d5270 100644 (file)
@@ -4,8 +4,8 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=prometheus-node-exporter-lua
-PKG_VERSION:=2019.04.12
-PKG_RELEASE:=1
+PKG_VERSION:=2019.08.14
+PKG_RELEASE:=2
 
 PKG_MAINTAINER:=Etienne CHAMPETIER <champetier.etienne@gmail.com>
 PKG_LICENSE:=Apache-2.0
@@ -79,7 +79,7 @@ endef
 define Package/prometheus-node-exporter-lua-openwrt
   $(call Package/prometheus-node-exporter-lua/Default)
   TITLE+= (openwrt collector)
-  DEPENDS:=prometheus-node-exporter-lua
+  DEPENDS:=prometheus-node-exporter-lua +libubus-lua
 endef
 
 define Package/prometheus-node-exporter-lua-ltq-dsl
index 39b65fb8eb37098dfc5c56bc27faaa10f168a2e9..a59c1507ee4754e2a08ee93dd2c9edbc78b9122b 100644 (file)
@@ -79,8 +79,8 @@ local function scrape()
   dsl_max_datarate({direction="up"}, dsl_stat.max_data_rate_up)
 
   -- dsl errors
-  dsl_error_seconds_total({err="forward error correction",loc="near"}, dsl_stat.errors_fec_near)
-  dsl_error_seconds_total({err="forward error correction",loc="far"}, dsl_stat.errors_fec_far)
+  dsl_error_seconds_total({err="forward error correction",loc="near"}, dsl_stat.errors_fecs_near)
+  dsl_error_seconds_total({err="forward error correction",loc="far"}, dsl_stat.errors_fecs_far)
   dsl_error_seconds_total({err="errored",loc="near"}, dsl_stat.errors_es_near)
   dsl_error_seconds_total({err="errored",loc="far"}, dsl_stat.errors_es_near)
   dsl_error_seconds_total({err="severely errored",loc="near"}, dsl_stat.errors_ses_near)
index 8b9785a27dc0c4136fcab90d00c462ffa25f91de..8d44792b917d5642e6f268db1d0e873ee1519f09 100644 (file)
@@ -1,20 +1,20 @@
+local ubus = require "ubus"
+local u = ubus.connect()
+local b = u:call("system", "board", {})
+
 local labels = {
-    id = "",
-    release = "",
-    revision = "",
-    model = string.sub(get_contents("/tmp/sysinfo/model"), 1, -2),
-    board_name = string.sub(get_contents("/tmp/sysinfo/board_name"), 1, -2)
+    board_name = b.board_name,
+    id = b.release.distribution,
+    model = b.model,
+    release = b.release.version,
+    revision = b.release.revision,
+    system = b.system,
+    target = b.release.target
 }
 
-for k, v in string.gmatch(get_contents("/etc/openwrt_release"), "(DISTRIB_%w+)='(.-)'\n") do
-    if k == "DISTRIB_ID" then
-        labels["id"] = v
-    elseif k == "DISTRIB_RELEASE" then
-        labels["release"] = v
-    elseif k == "DISTRIB_REVISION" then
-        labels["revision"] = v
-    end
-end
+b = nil
+u = nil
+ubus = nil
 
 local function scrape()
     metric("node_openwrt_info", "gauge", labels, 1)
index 8f7fa132acd616df85b59d0c97295f7e00556a66..c2a544abc17b1b48622890782b8d4bf27f10cf2e 100644 (file)
@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=prometheus
 PKG_VERSION:=2.10.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/prometheus/prometheus/tar.gz/v${PKG_VERSION}?
diff --git a/utils/prometheus/patches/001-update-fsnotify.patch b/utils/prometheus/patches/001-update-fsnotify.patch
new file mode 100644 (file)
index 0000000..d6f0299
--- /dev/null
@@ -0,0 +1,27 @@
+fsnotify v1.3.1 uses unix.InotifyInit, which does not exist for mips64/mips64el
+v1.4.2 changed to unix.InotifyInit1, which should exist for all Linux systems
+
+--- a/go.mod
++++ b/go.mod
+@@ -95,7 +95,7 @@ require (
+       google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19
+       google.golang.org/grpc v1.19.1
+       gopkg.in/alecthomas/kingpin.v2 v2.2.6
+-      gopkg.in/fsnotify/fsnotify.v1 v1.3.1
++      gopkg.in/fsnotify/fsnotify.v1 v1.4.7
+       gopkg.in/inf.v0 v0.9.1 // indirect
+       gopkg.in/yaml.v2 v2.2.2
+       k8s.io/api v0.0.0-20190409021203-6e4e0e4f393b
+--- a/go.sum
++++ b/go.sum
+@@ -416,8 +416,8 @@ gopkg.in/check.v1 v1.0.0-20180628173108-
+ gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+ gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=
+ gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
+-gopkg.in/fsnotify/fsnotify.v1 v1.3.1 h1:2fkCHbPQZNYRAyRyIV9VX0bpRkxIorlQDiYRmufHnhA=
+-gopkg.in/fsnotify/fsnotify.v1 v1.3.1/go.mod h1:Fyux9zXlo4rWoMSIzpn9fDAYjalPqJ/K1qJ27s+7ltE=
++gopkg.in/fsnotify/fsnotify.v1 v1.4.7 h1:XNNYLJHt73EyYiCZi6+xjupS9CpvmiDgjPTAjrBlQbo=
++gopkg.in/fsnotify/fsnotify.v1 v1.4.7/go.mod h1:Fyux9zXlo4rWoMSIzpn9fDAYjalPqJ/K1qJ27s+7ltE=
+ gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
+ gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
+ gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo=
diff --git a/utils/pservice/Makefile b/utils/pservice/Makefile
new file mode 100644 (file)
index 0000000..56a2ac0
--- /dev/null
@@ -0,0 +1,28 @@
+# Copyright (C) 2017 Yousong Zhou
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=pservice
+PKG_VERSION:=2017-08-29
+PKG_RELEASE=2
+
+PKG_MAINTAINER:=Yousong Zhou <yszhou4tech@gmail.com>
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/pservice
+  SECTION:=utils
+  CATEGORY:=Utilities
+  TITLE:=Wrap commands as procd services
+endef
+
+define Build/Compile
+endef
+
+define Package/pservice/install
+       $(INSTALL_DIR) $(1)/usr/bin $(1)/etc/init.d $(1)/etc/config
+       $(INSTALL_BIN) ./files/pservice.init $(1)/etc/init.d/pservice
+       $(INSTALL_DATA) ./files/pservice.config $(1)/etc/config/pservice
+endef
+
+$(eval $(call BuildPackage,pservice))
diff --git a/utils/pservice/README.md b/utils/pservice/README.md
new file mode 100644 (file)
index 0000000..85fbd6c
--- /dev/null
@@ -0,0 +1,44 @@
+# uci
+
+`disabled`, bool, default `0`
+
+`name`, string, name of the service instance
+
+`command`, file, the service instance executable
+
+`args`, list of args
+
+`stderr`, bool, default `0`, log stderr output of the service instance
+
+`stdout`, bool, default `0`, log stdout output of the service instance
+
+`env`, list of environment variable settings of the form `var=val`
+
+`file`, list of file names.  Service instances will be restarted if content of
+these files have changed on service reload event.
+
+`respawn_threshold`, uinteger, default `3600`, time in seconds the instances
+have to be in running state to be considered a valid run
+
+`respawn_timeout`, uinteger, default `5`, time in seconds the instance should
+be delayed to start again after the last crash
+
+`respawn_maxfail`, uinteger, default `5`, maximum times the instances can
+crash/fail in a row and procd will not try to bring it up again after this
+limit has been reached
+
+# notes and faq
+
+Initial environment variables presented to service instances may be different
+from what was observed on the interactive terminal.  E.g. `HOME=/` may affect
+reading `~/.ssh/known_hosts` of dropbear ssh instance.
+
+       PATH=/usr/sbin:/usr/bin:/sbin:/bin PWD=/ HOME=/
+
+If `list args xxx` seems to be too long causing pain, consider using `/bin/sh`
+as the `command`.  It is also worth noting that uci supports multi-line option
+value.
+
+Child processes will keep running when their parent process was killed.  This
+is especially the case and should be taken into account with option `command`
+being `/bin/sh` and it is recommended to use `exec` as the last shell command.
diff --git a/utils/pservice/files/pservice.config b/utils/pservice/files/pservice.config
new file mode 100644 (file)
index 0000000..0f505b3
--- /dev/null
@@ -0,0 +1,24 @@
+config pservice
+       option disabled 1
+       option name 'demo0'
+       option command /bin/sh
+       option respawn_maxfail 0
+       list args -c
+       list args 'env | logger -t $name; exec sleep $time'
+       list env 'v0=0'
+       list env 'v1=val with space'
+       list env 'name=demo0'
+       list env 'time=1799'
+       list file /tmp/sleep.conf
+
+config pservice
+       option disabled 1
+       option name 8021x
+       option command /usr/sbin/wpa_supplicant
+       option stdout 1
+       list args -i
+       list args eth0.1
+       list args -D
+       list args wired
+       list args -c
+       list args /etc/wpa_supplicant-eth0.1.conf
diff --git a/utils/pservice/files/pservice.init b/utils/pservice/files/pservice.init
new file mode 100755 (executable)
index 0000000..3a3ce02
--- /dev/null
@@ -0,0 +1,63 @@
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2017-2019 Yousong Zhou
+
+START=99
+
+USE_PROCD=1
+
+pservice_list_cb() {
+       local val="$1"; shift
+       local param="$1"; shift
+
+       procd_append_param "$param" "$val"
+}
+
+pservice_instance() {
+       local cfg="$1"
+
+       [ "$disabled" = 0 ] || return 0
+       [ -x "$command" ] || {
+               echo "$command is not executable" >&2
+               return 1
+       }
+
+       procd_open_instance "$name"
+       procd_set_param command "$command"
+       procd_set_param stderr "$stderr"
+       procd_set_param stdout "$stdout"
+       procd_set_param respawn "$respawn_threshold" "$respawn_timeout" "$respawn_maxfail"
+       [ -z "$args" ] || config_list_foreach "$cfg" args pservice_list_cb command
+       if [ -n "$env" ]; then
+               procd_set_param env
+               config_list_foreach "$cfg" env pservice_list_cb env
+       fi
+       if [ -n "$file" ]; then
+               procd_set_param file
+               config_list_foreach "$cfg" file pservice_list_cb file
+       fi
+       procd_close_instance
+}
+
+start_service() {
+       config_load 'pservice'
+       config_foreach validate_pservice_section pservice pservice_instance
+}
+
+service_triggers() {
+       procd_add_validation validate_pservice_section
+}
+
+validate_pservice_section() {
+       uci_load_validate pservice pservice "$1" "$2" \
+               "disabled:bool:0" \
+               "name:string" \
+               "env:regex('^[a-zA-Z_][a-zA-Z0-9_]*=.*$')" \
+               "command:file" \
+               "args:string" \
+               "stderr:bool:0" \
+               "stdout:bool:0" \
+               "respawn_threshold:uinteger:3600" \
+               "respawn_timeout:uinteger:5" \
+               "respawn_maxfail:uinteger:5" \
+               "file:string"
+}
index da1e31b03be34ac43586fcc26900cd357f97fc37..ccaa6ef0c756fd6476a69ec6631ca340491cdb8e 100644 (file)
@@ -9,14 +9,15 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=qemu
-PKG_VERSION:=4.0.0
-PKG_RELEASE:=1
+PKG_VERSION:=4.1.0
+PKG_RELEASE:=2
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_HASH:=13a93dfe75b86734326f8d5b475fde82ec692d5b5a338b4262aeeb6b0fa4e469
+PKG_HASH:=656e60218689bdeec69903087fd7582d5d3e72238d02f4481d8dc6d79fd909c6
 PKG_SOURCE_URL:=http://download.qemu.org/
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=LICENSE tcg/LICENSE
 PKG_MAINTAINER:=Yousong Zhou <yszhou4tech@gmail.com>
+PKG_CPE_ID:=cpe:/a:qemu:qemu
 
 PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
@@ -53,10 +54,6 @@ define Package/qemu-ga
   DEPENDS:= +glib2 +virtio-console-helper $(CXX_DEPENDS) $(QEMU_DEPS_IN_GUEST)
 endef
 
-define Package/qemu-ga/description
-  This package contains the QEMU Guest Agent daemon
-endef
-
 define Package/qemu-ga/install
        $(INSTALL_DIR) $(1)/usr/bin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/qemu-ga $(1)/usr/bin
@@ -66,20 +63,8 @@ define Package/qemu-ga/install
        $(INSTALL_BIN) ./files/10-qemu-ga.hotplug $(1)/etc/hotplug.d/virtio-ports/10-qemu-ga
 endef
 
+PKG_CONFIG_DEPENDS += CONFIG_PACKAGE_qemu-ga
 
-define Package/qemu-blobs
-  SECTION:=utils
-  CATEGORY:=Utilities
-  SUBMENU:=Virtualization
-  TITLE:=QEMU blobs of BIOS, VGA BIOS and keymaps
-  URL:=http://www.qemu.org
-  DEPENDS:=$(QEMU_DEPS_IN_HOST)
-endef
-
-define Package/qemu-blobs/install
-       $(INSTALL_DIR) $(1)/usr/share/qemu
-       $(CP) $(PKG_INSTALL_DIR)/usr/share/qemu/* $(1)/usr/share/qemu
-endef
 
 define Package/qemu-bridge-helper
   SECTION:=utils
@@ -97,13 +82,14 @@ define Package/qemu-bridge-helper/install
        $(INSTALL_DATA) ./files/bridge.conf $(1)/etc/qemu
 endef
 
+
 define Package/qemu-img
  SECTION:=utils
  CATEGORY:=Utilities
  SUBMENU:=Virtualization
  TITLE:=QEMU Image utility
  URL:=http://www.qemu.org
- DEPENDS:=+glib2 $(CXX_DEPENDS) $(QEMU_DEPS_IN_HOST)
+ DEPENDS:=+glib2 $(QEMU_DEPS_IN_HOST)
 endef
 
 define Package/qemu-img/install
@@ -111,13 +97,14 @@ define Package/qemu-img/install
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/qemu-img $(1)/usr/bin/qemu-img
 endef
 
+
 define Package/qemu-nbd
  SECTION:=utils
  CATEGORY:=Utilities
  SUBMENU:=Virtualization
  TITLE:=QEMU Network Block Device Utility
  URL:=http://www.qemu.org
- DEPENDS:=+glib2 $(CXX_DEPENDS) $(QEMU_DEPS_IN_HOST) +kmod-nbd
+ DEPENDS:=+glib2 $(QEMU_DEPS_IN_HOST) +kmod-nbd
 endef
 
 define Package/qemu-nbd/install
@@ -125,7 +112,41 @@ define Package/qemu-nbd/install
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/qemu-nbd $(1)/usr/sbin/qemu-nbd
 endef
 
-PKG_CONFIG_DEPENDS += CONFIG_PACKAGE_qemu-ga
+
+define qemu-firmware
+  QEMU_PACKAGES += qemu-firmware-$(1)
+
+  define Package/qemu-firmware-$(1)
+    SECTION:=utils
+    CATEGORY:=Utilities
+    SUBMENU:=Virtualization
+    TITLE:=$(qemu-firmware-$(1)-title)
+    URL:=http://www.qemu.org
+    DEPENDS:=$(QEMU_DEPS_IN_HOST)
+  endef
+
+  define Package/qemu-firmware-$(1)/install
+       $$(INSTALL_DIR) $$(1)/usr/share/qemu
+       $$(CP) $(foreach f,$(qemu-firmware-$(1)-files),$$(PKG_INSTALL_DIR)/usr/share/qemu/$(f)) $$(1)/usr/share/qemu
+  endef
+endef
+
+qemu-firmware-seabios-title:=QEMU build of SeaBIOS for x86 guest
+qemu-firmware-seabios-files:=bios.bin bios-256k.bin
+$(eval $(call qemu-firmware,seabios))
+
+qemu-firmware-seavgabios-title:=QEMU build of SeaVGABIOS
+qemu-firmware-seavgabios-files:=vgabios-*.bin
+$(eval $(call qemu-firmware,seavgabios))
+
+qemu-firmware-pxe-title:=QEMU build of iPXE PXE roms
+qemu-firmware-pxe-files:=pxe-*.rom
+$(eval $(call qemu-firmware,pxe))
+
+qemu-firmware-efi-title:=QEMU build of iPXE EFI roms
+qemu-firmware-efi-files:=efi-*.rom
+$(eval $(call qemu-firmware,efi))
+
 
 # Naming rules used in qemu Makefile.target
 define qemu-prog_
@@ -145,6 +166,7 @@ qemu-prog = $(strip $(call qemu-prog_,$(1)))
 #
 define qemu-target
   PKG_CONFIG_DEPENDS += CONFIG_PACKAGE_qemu-$(1)
+  QEMU_PACKAGES += qemu-$(1)
 
   define Package/qemu-$(1)
     SECTION:=utils
@@ -152,8 +174,8 @@ define qemu-target
     SUBMENU:=Virtualization
     TITLE:=QEMU target $(1)
     URL:=http://www.qemu.org
-    DEPENDS:= +glib2 +libpthread +zlib $(CXX_DEPENDS) $(QEMU_DEPS_IN_HOST) \
-       $(if $(filter %-softmmu,$(1)),+libncurses +libfdt +pixman +qemu-blobs $(ICONV_DEPENDS))
+    DEPENDS:= +glib2 +libpthread +zlib $(CXX_DEPENDS) $(QEMU_DEPS_IN_HOST) $(qemu-target-$(1)-deps) \
+       $(if $(filter %-softmmu,$(1)),+libncurses +libfdt +pixman +qemu-firmware-efi $(ICONV_DEPENDS))
   endef
 
   define Package/qemu-$(1)/description
@@ -163,18 +185,34 @@ define qemu-target
   define Package/qemu-$(1)/install
        $(INSTALL_DIR) $$(1)/usr/bin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(call qemu-prog,$(1)) $$(1)/usr/bin
+       $(foreach f,$(qemu-target-$(1)-extra-files),
+               $(INSTALL_DIR) $$(1)/$(dir $(f))
+               $(CP) $(PKG_INSTALL_DIR)/$(f) $$(1)/$(f)
+       )
   endef
 
 endef
 
-QEMU_TARGET_LIST :=    \
+qemu-target-list :=    \
        x86_64-softmmu  \
        arm-softmmu     \
 
-$(foreach target,$(QEMU_TARGET_LIST), \
+qemu-target-x86_64-softmmu-deps:= \
+       +qemu-firmware-pxe \
+       +qemu-firmware-seabios \
+       +qemu-firmware-seavgabios
+qemu-target-x86_64-softmmu-extra-files:= \
+       usr/share/qemu/kvmvapic.bin \
+       usr/share/qemu/linuxboot.bin \
+       usr/share/qemu/linuxboot_dma.bin \
+       usr/share/qemu/multiboot.bin \
+       usr/share/qemu/pvh.bin
+
+$(foreach target,$(qemu-target-list), \
   $(eval $(call qemu-target,$(target))) \
 )
 
+
 # QEMU configure script does not recognize these options
 CONFIGURE_ARGS:=$(filter-out   \
        --target=%              \
@@ -193,6 +231,9 @@ CONFIGURE_ARGS +=                   \
        --host-cc="$(HOSTCC)"           \
        --disable-fortify-source        \
        --disable-stack-protector       \
+       --extra-cflags="$(EXTRA_CFLAGS)"        \
+       --extra-cxxflags="$(EXTRA_CXXFLAGS)"    \
+       --extra-ldflags="$(EXTRA_LDFLAGS)"      \
 
 # VHost features
 CONFIGURE_ARGS +=                      \
@@ -285,7 +326,7 @@ CONFIGURE_ARGS +=                   \
        --disable-libiscsi              \
        --disable-libnfs                \
        --disable-libpmem               \
-       --disable-libssh2               \
+       --disable-libssh                \
        --disable-libudev               \
        --disable-libusb                \
        --disable-libxml2               \
@@ -321,11 +362,11 @@ CONFIGURE_ARGS +=                 \
        --disable-xen-pci-passthrough   \
        --disable-xfsctl                \
 
-CONFIGURE_ARGS += --target-list='$(foreach target,$(QEMU_TARGET_LIST),$(if $(CONFIG_PACKAGE_qemu-$(target)),$(target)))'
+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)
 
 TARGET_LDFLAGS += -Wl,--as-needed
-MAKE_VARS += V=s
+MAKE_VARS += V=1
 # ARCH is special in qemu's build system, e.g. ARCH mips64 will be translated
 # there to mips and stored in config-host.mak
 MAKE_FLAGS:=$(filter-out       \
@@ -337,7 +378,7 @@ QEMU_MAKE_TARGETS := \
        $(if $(CONFIG_PACKAGE_qemu-bridge-helper),qemu-bridge-helper) \
        $(if $(CONFIG_PACKAGE_qemu-img),qemu-img) \
        $(if $(CONFIG_PACKAGE_qemu-nbd),qemu-nbd) \
-       $(foreach target,$(QEMU_TARGET_LIST),$(if $(CONFIG_PACKAGE_qemu-$(target)),subdir-$(target))) \
+       $(foreach target,$(qemu-target-list),$(if $(CONFIG_PACKAGE_qemu-$(target)),$(target)/all)) \
 
 define Build/Compile
        $(if $(strip $(QEMU_MAKE_TARGETS)),$(call Build/Compile/Default,$(QEMU_MAKE_TARGETS)))
@@ -348,7 +389,6 @@ $(eval $(call BuildPackage,qemu-ga))
 $(eval $(call BuildPackage,qemu-bridge-helper))
 $(eval $(call BuildPackage,qemu-img))
 $(eval $(call BuildPackage,qemu-nbd))
-$(eval $(call BuildPackage,qemu-blobs))
-$(foreach target,$(QEMU_TARGET_LIST), \
-  $(eval $(call BuildPackage,qemu-$(target))) \
+$(foreach p,$(QEMU_PACKAGES), \
+  $(eval $(call BuildPackage,$(p))) \
 )
diff --git a/utils/qemu/patches/0005-slirp-ipreass-fix-use-after-free.patch b/utils/qemu/patches/0005-slirp-ipreass-fix-use-after-free.patch
new file mode 100644 (file)
index 0000000..45f37d3
--- /dev/null
@@ -0,0 +1,46 @@
+From c59279437eda91841b9d26079c70b8a540d41204 Mon Sep 17 00:00:00 2001
+From: Samuel Thibault <samuel.thibault@ens-lyon.org>
+Date: Mon, 26 Aug 2019 00:55:03 +0200
+Subject: [PATCH] ip_reass: Fix use after free
+
+Using ip_deq after m_free might read pointers from an allocation reuse.
+
+This would be difficult to exploit, but that is still related with
+CVE-2019-14378 which generates fragmented IP packets that would trigger this
+issue and at least produce a DoS.
+
+Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
+---
+Taken from https://gitlab.freedesktop.org/slirp/libslirp/commit/c5927943
+
+ slirp/src/ip_input.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/slirp/src/ip_input.c b/slirp/src/ip_input.c
+index 7364ce0..aa514ae 100644
+--- a/slirp/src/ip_input.c
++++ b/slirp/src/ip_input.c
+@@ -292,6 +292,7 @@ static struct ip *ip_reass(Slirp *slirp, struct ip *ip, struct ipq *fp)
+      */
+     while (q != (struct ipasfrag *)&fp->frag_link &&
+            ip->ip_off + ip->ip_len > q->ipf_off) {
++        struct ipasfrag *prev;
+         i = (ip->ip_off + ip->ip_len) - q->ipf_off;
+         if (i < q->ipf_len) {
+             q->ipf_len -= i;
+@@ -299,9 +300,10 @@ static struct ip *ip_reass(Slirp *slirp, struct ip *ip, struct ipq *fp)
+             m_adj(dtom(slirp, q), i);
+             break;
+         }
++        prev = q;
+         q = q->ipf_next;
+-        m_free(dtom(slirp, q->ipf_prev));
+-        ip_deq(q->ipf_prev);
++        ip_deq(prev);
++        m_free(dtom(slirp, prev));
+     }
+ insert:
+-- 
+2.22.0
+
index 6f6a8b41025991812ca2b462c63f092071db40cb..0618c840932efe571ccecaedb7ebcab071de011d 100644 (file)
@@ -8,20 +8,22 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=rng-tools
-PKG_VERSION:=6.6
+PKG_VERSION:=6.7
 PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/nhorman/rng-tools.git
-PKG_SOURCE_VERSION:=4ebc21d6f387bb7b4b3f6badc429e27b21c0a6ee
-PKG_MIRROR_HASH:=d942283b7482337d40a4933f7b24a5d1361518dacf9c87928f5ea06d492e95b0
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
-PKG_LICENSE:=GPLv2
+PKG_SOURCE_URL:=https://github.com/nhorman/rng-tools
+PKG_SOURCE_VERSION:=v$(PKG_VERSION)
+PKG_MIRROR_HASH:=05cb68b8600025f362ea0875f5966b60f8195f91ed89b431996a48cd88b1e5b0
+
 PKG_MAINTAINER:=Nathaniel Wesley Filardo <nwfilardo@gmail.com>
+PKG_LICENSE:=GPL-2.0-or-later
+PKG_LICENSE_FILES:=COPYING
 
 PKG_FIXUP:=autoreconf
-
-PKG_BUILD_DEPENDS:=USE_UCLIBC:argp-standalone USE_MUSL:argp-standalone
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
+PKG_BUILD_DEPENDS:=!USE_GLIBC:argp-standalone
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -34,24 +36,19 @@ define Package/rng-tools
 endef
 
 define Package/rng-tools/description
-Daemon for adding entropy to kernel entropy pool. By default it uses
-/dev/urandom as the source but the init script can be modified
-to use a hardware source like /dev/hwrng if present
+  Daemon for adding entropy to kernel entropy pool. By default it uses
+  /dev/urandom as the source but the init script can be modified
+  to use a hardware source like /dev/hwrng if present
 endef
 
-ifdef CONFIG_USE_UCLIBC
-CONFIGURE_VARS += \
-    LIBS="-largp"
-endif
-
-ifdef CONFIG_USE_MUSL
-CONFIGURE_VARS += \
-    LIBS="-largp"
-endif
-
 CONFIGURE_ARGS += \
        --without-libgcrypt \
-       --without-nistbeacon
+       --without-nistbeacon \
+       --without-pkcs11
+
+ifndef CONFIG_USE_GLIBC
+       CONFIGURE_VARS += LIBS="-largp"
+endif
 
 define Build/Prepare
        $(call Build/Prepare/Default)
@@ -64,9 +61,9 @@ define Package/rng-tools/install
        $(INSTALL_DIR) $(1)/etc/uci-defaults
        $(INSTALL_BIN) ./files/rngd.uci_defaults $(1)/etc/uci-defaults/rngd
        $(INSTALL_DIR) $(1)/usr/bin
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/rngtest $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rngtest $(1)/usr/bin/
        $(INSTALL_DIR) $(1)/sbin
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/rngd $(1)/sbin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rngd $(1)/sbin/
 endef
 
 $(eval $(call BuildPackage,rng-tools))
index 61eeec704580eb4f519742097384aa59ea754181..49da89fc122f0a674c617cb10efadfac9e3be1f6 100644 (file)
@@ -61,7 +61,7 @@ define Package/rrdcgi1
 $(call Package/rrdtool1/Default)
   SECTION:=utils
   CATEGORY:=Utilities
-  SUBMENU:=database
+  SUBMENU:=Database
   DEPENDS:=+librrd1
   TITLE+= CGI graphing tool
 endef
@@ -76,7 +76,7 @@ define Package/rrdtool1
 $(call Package/rrdtool1/Default)
   SECTION:=utils
   CATEGORY:=Utilities
-  SUBMENU:=database
+  SUBMENU:=Database
   DEPENDS:=+librrd1
   TITLE+= management tools
 endef
index f179f266961470cfbce786e2547adfc321bb4672..571985235d278a5ffb2ae6da3b986655ef4d63e7 100644 (file)
@@ -1,4 +1,4 @@
-# 
+#
 # Copyright (C) 2014-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
@@ -7,18 +7,18 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=rtklib
-PKG_VERSION:=2.4.3_b24
-PKG_RELEASE:=$(PKG_SOURCE_VERSION)
+PKG_VERSION:=2.4.3_b32
+PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=git://github.com/tomojitakasu/RTKLIB.git
-PKG_SOURCE_VERSION:=1cec90a9ffa424908ad1a4ca3d52f33f9b94d1f7
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
-PKG_MIRROR_HASH:=edda6c29ba3d2f5401145a1497e88646fa0c13afc31ade7bdd982bd8e8081c6a
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_LICENSE:=BSD-2-Clause
+PKG_SOURCE_URL:=https://github.com/tomojitakasu/RTKLIB
+PKG_SOURCE_VERSION:=6e5ddadb737c54d4a43c43feeeb4e244c51b4286
+PKG_MIRROR_HASH:=b6ada49b6667a98e935055e718bf9a5712030cddc1694d1be7c0ab0e98bdc7b8
 
 PKG_MAINTAINER:=Nuno Goncalves <nunojpg@gmail.com>
+PKG_LICENSE:=BSD-2-Clause
+
+PKG_BUILD_PARALLEL:=0
 
 include $(INCLUDE_DIR)/package.mk
 
diff --git a/utils/rtklib/patches/010-musl.patch b/utils/rtklib/patches/010-musl.patch
new file mode 100644 (file)
index 0000000..14a405f
--- /dev/null
@@ -0,0 +1,12 @@
+--- a/src/stream.c
++++ b/src/stream.c
+@@ -81,6 +81,9 @@
+ #include <netinet/in.h>
+ #include <netinet/tcp.h>
+ #include <arpa/inet.h>
++#ifndef _POSIX_SOURCE
++#define _POSIX_SOURCE
++#endif
+ #include <netdb.h>
+ #endif
diff --git a/utils/rtklib/patches/020-no-gfortran.patch b/utils/rtklib/patches/020-no-gfortran.patch
new file mode 100644 (file)
index 0000000..3bbd2fb
--- /dev/null
@@ -0,0 +1,21 @@
+--- a/app/rnx2rtkp/gcc/makefile
++++ b/app/rnx2rtkp/gcc/makefile
+@@ -2,14 +2,14 @@
+ BINDIR  = /usr/local/bin
+ SRC     = ../../../src
+-#OPTS    = -DTRACE -DENAGLO -DENAQZS -DENAGAL -DENACMP -DENAIRN -DNFREQ=3
+-OPTS    = -DTRACE -DENAGLO -DENAQZS -DENAGAL -DENACMP -DENAIRN -DNFREQ=3 -DIERS_MODEL
++OPTS    = -DTRACE -DENAGLO -DENAQZS -DENAGAL -DENACMP -DENAIRN -DNFREQ=3
++#OPTS    = -DTRACE -DENAGLO -DENAQZS -DENAGAL -DENACMP -DENAIRN -DNFREQ=3 -DIERS_MODEL
+ #OPTS    = -DENAGLO -DENAQZS -DENAGAL -DENACMP -DNFREQ=2
+ # for no lapack
+ CFLAGS  = -Wall -O3 -ansi -pedantic -Wno-unused-but-set-variable -I$(SRC) $(OPTS) -g
+-#LDLIBS  = -lm -lrt
+-LDLIBS  = ../../../lib/iers/gcc/iers.a -lgfortran -lm -lrt
++LDLIBS  = -lm -lrt
++#LDLIBS  = ../../../lib/iers/gcc/iers.a -lgfortran -lm -lrt
+ #CFLAGS  = -Wall -O3 -ansi -pedantic -Wno-unused-but-set-variable -I$(SRC) -DLAPACK $(OPTS)
+ #LDLIBS  = -lm -lrt -llapack -lblas
index a4a9863fd9b82a3868119fc5060ab7e4791a66fa..3f234fc7f589c2c17fc1e4d16dbdddda981eabcf 100644 (file)
@@ -8,14 +8,14 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=rtl-ais
 PKG_VERSION:=0.3
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/dgiardini/rtl-ais/tar.gz/v$(PKG_VERSION)?
 PKG_HASH:=01e2b675226ec403c409cec8b55999008f5c7aa9e82d6c0ba085ef13b200ceb1
 
 PKG_MAINTAINER:=Nuno Goncalves <nunojpg@gmail.com>
-PKG_LICENSE:=GPL-2.0+
+PKG_LICENSE:=GPL-2.0-or-later
 PKG_LICENSE_FILES:=COPYING
 
 include $(INCLUDE_DIR)/package.mk
diff --git a/utils/rtl-ais/patches/010-musl.patch b/utils/rtl-ais/patches/010-musl.patch
new file mode 100644 (file)
index 0000000..c2f0781
--- /dev/null
@@ -0,0 +1,10 @@
+--- a/tcp_listener/tcp_listener.c
++++ b/tcp_listener/tcp_listener.c
+@@ -6,6 +6,7 @@
+ #include <string.h>
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <unistd.h>
+ #include <errno.h>
+ #include <stdio.h>
+ #include <pthread.h>
diff --git a/utils/runc/Makefile b/utils/runc/Makefile
new file mode 100644 (file)
index 0000000..5547742
--- /dev/null
@@ -0,0 +1,88 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=runc
+PKG_VERSION:=1.0.0-rc8
+PKG_RELEASE:=1
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/opencontainers/runc/tar.gz/v${PKG_VERSION}?
+PKG_HASH:=efe4ff9bbe49b19074346d65c914d809c0a3e90d062ea9619fe240f931f0b700
+PKG_SOURCE_VERSION:=425e105d5a03fabd737a126ad93d62a9eeede87f
+
+PKG_MAINTAINER:=Gerard Ryan <G.M0N3Y.2503@gmail.com>
+
+PKG_BUILD_DEPENDS:=golang/host
+PKG_BUILD_PARALLEL:=1
+PKG_USE_MIPS16:=0
+
+GO_PKG:=github.com/opencontainers/runc
+
+include $(INCLUDE_DIR)/package.mk
+include ../../lang/golang/golang-package.mk
+
+define Package/runc/config
+config RUNC_SECCOMP
+       depends on PACKAGE_runc
+       bool "Enable support for seccomp in runc"
+       default DOCKER_SECCOMP
+       select KERNEL_SECCOMP
+       select PACKAGE_libseccomp
+       help
+         Build runc with support for seccomp filters.
+         Select libseccomp which also pulls-in the needed kernel features.
+endef
+
+define Package/runc
+  SECTION:=utils
+  CATEGORY:=Utilities
+  TITLE:=runc container runtime
+  URL:=https://www.opencontainers.org/
+  DEPENDS:=$(GO_ARCH_DEPENDS) @TARGET_x86_64 +RUNC_SECCOMP:libseccomp
+  MENU:=1
+endef
+
+define Package/runc/description
+runc is a CLI tool for spawning and running containers according to the OCI specification.
+endef
+
+GO_PKG_INSTALL_ALL:=1
+MAKE_PATH:=$(GO_PKG_WORK_DIR_NAME)/build/src/$(GO_PKG)
+MAKE_VARS += \
+       GOPATH=$(GO_PKG_BUILD_DIR) \
+       GOCACHE=$(GO_PKG_CACHE_DIR) \
+       GOTMPDIR=$(GO_PKG_TMP_DIR) \
+       GOROOT_FINAL=$(GO_TARGET_ROOT) \
+       CC=$(TARGET_CC) \
+       CXX=$(TARGET_CXX) \
+       $(call GoPackage/Environment)
+MAKE_FLAGS += \
+       COMMIT=$(PKG_SOURCE_VERSION)
+
+ifeq ($(ARCH),mips)
+MAKE_FLAGS += EXTRA_FLAGS='-buildmode=default'
+endif
+
+ifeq ($(CONFIG_RUNC_SECCOMP),y)
+MAKE_FLAGS += BUILDTAGS='seccomp'
+else
+MAKE_FLAGS += BUILDTAGS=''
+endif
+
+define Build/Compile
+       $(call Build/Compile/Default)
+endef
+
+# Avoid installing binaries
+define Build/InstallDev
+       $(call Build/Compile/Default,clean)
+       $(call GoPackage/Build/InstallDev,$(1))
+endef
+
+define Package/runc/install
+       $(INSTALL_DIR) $(1)/usr/sbin/
+       $(INSTALL_BIN) $(GO_PKG_BUILD_DIR)/src/$(GO_PKG)/runc $(1)/usr/sbin/
+endef
+
+$(eval $(call BuildPackage,runc))
index 774428d7fd3ed1804b5515a416ce52c9f2831550..a67bae33f6702b31d60c0c4e331886e344b93000 100644 (file)
@@ -10,13 +10,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=sane-backends
 PKG_VERSION:=1.0.27
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://fossies.org/linux/misc \
     https://alioth.debian.org/frs/download.php/file/4146/
 PKG_HASH:=293747bf37275c424ebb2c833f8588601a60b2f9653945d5a3194875355e36c9
 PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
-PKG_LICENSE:=GPL-2.0 GPL-2.0+
+PKG_LICENSE:=GPL-2.0 GPL-2.0-or-later
 PKG_LICENSE_FILES:=COPYING LICENSE
 PKG_CPE_ID:=cpe:/a:sane-backends_project:sane-backends
 
index c4244522f4c13ba4e2c2c399632b44946697c123..93119305d8ba71ae1c5bd10b0356f8c0c5aa828f 100644 (file)
@@ -9,15 +9,16 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=screen
 PKG_VERSION:=4.6.2
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@GNU/screen
 PKG_HASH:=1b6922520e6a0ce5e28768d620b0f640a6631397f95ccb043b70b91bb503fa3a
 
 PKG_MAINTAINER:=Etienne CHAMPETIER <champetier.etienne@gmail.com>
-PKG_LICENSE:=GPL-3.0+
+PKG_LICENSE:=GPL-3.0-or-later
 PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:gnu:screen
 
 PKG_FIXUP:=autoreconf
 PKG_BUILD_PARALLEL:=1
index 8279d3e13e8f91249887b254b4d217332c483a7a..e11adb2a392092e7bc4fff3d62581fe3e120f6c7 100644 (file)
@@ -2,15 +2,14 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=setserial
 PKG_VERSION:=2.17
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/setserial
 PKG_HASH:=7e4487d320ac31558563424189435d396ddf77953bb23111a17a3d1487b5794a
 
 PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
-PKG_LICENSE:=GPL-2.0
-
+PKG_LICENSE:=GPL-2.0-only
 
 include $(INCLUDE_DIR)/package.mk
 
diff --git a/utils/setserial/patches/020-musl.patch b/utils/setserial/patches/020-musl.patch
new file mode 100644 (file)
index 0000000..7b26594
--- /dev/null
@@ -0,0 +1,19 @@
+--- a/setserial.c
++++ b/setserial.c
+@@ -11,6 +11,8 @@
+  */
+ #include <stdio.h>
++#include <stdlib.h>
++#include <unistd.h>
+ #include <fcntl.h>
+ #include <termios.h>
+ #include <string.h>
+@@ -22,6 +24,7 @@
+ #ifdef HAVE_LINUX_HAYESESP_H
+ #include <linux/hayesesp.h>
+ #endif
++#include <sys/ioctl.h>
+ #include <linux/serial.h>
+ #include "version.h"
index 8e9e31197c6f34dcf058a7ff0ab29554e2696e6e..dddeffb5944cb49e671856a45f5fdbb1d3bee91e 100644 (file)
@@ -16,6 +16,7 @@ PKG_SOURCE_URL:=https://github.com/shadow-maint/shadow/releases/download/$(PKG_V
 PKG_HASH:=0998c8d84242a231ab0acb7f8613927ff5bcff095f8aa6b79478893a03f05583
 PKG_MAINTAINER:=Steven Barth <cyrus@openwrt.org>
 PKG_LICENSE:=BSD-3-Clause
+PKG_CPE_ID:=cpe:/a:debian:shadow
 
 PKG_FIXUP:=autoreconf
 PKG_BUILD_PARALLEL:=1
index 8ede4c2b3dfcf1f7d7aa671b15c6d9fa9a371b9a..56e4e6898fbbe98667b72b5cb45ef91f32daee2d 100644 (file)
@@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=sispmctl
 PKG_VERSION:=4.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/$(PKG_NAME)
 PKG_HASH:=bf5177e085cb0168e18e4cfb69645c3095da149ed46f5659d6e757bde3548e40
 PKG_MAINTAINER:=Rosen Penev <rosenp@gmail.com>
-PKG_LICENSE:=GPL-2.0+
+PKG_LICENSE:=GPL-2.0-or-later
 
 PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
index c4344ecb34ce920cdc16b5c93cf7ff2c75fc54a6..e3ac08369010774555824593b37418a61d3b1e66 100644 (file)
@@ -8,15 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=slide-switch
-PKG_VERSION:=0.9.4
+PKG_VERSION:=0.9.5
 PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/jefferyto/openwrt-slide-switch.git
-PKG_SOURCE_VERSION:=0.9.4
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.xz
-PKG_MIRROR_HASH:=52a93506c994b1babf174aec8ac8aebbf94f27263125d144f6d86db001dd24d6
+PKG_MIRROR_HASH:=ac61aea3ce620364285de5525635999aa8b463c4070da6bce134278ff92a433c
+PKG_SOURCE_VERSION:=$(PKG_VERSION)
 
 PKG_BUILD_PARALLEL:=1
 PKG_FIXUP:=autoreconf
index 34bc91517f738a77ca3e7e2714c2a599ed4b1821..6d0c912b5a3de89c144dfd7da28f979f114e7e3c 100644 (file)
@@ -10,14 +10,14 @@ include $(INCLUDE_DIR)/uclibc++.mk
 
 PKG_NAME:=smartmontools
 PKG_VERSION:=7.0
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/smartmontools
 PKG_HASH:=e5e1ac2786bc87fdbd6f92d0ee751b799fbb3e1a09c0a6a379f9eb64b3e8f61c
 
 PKG_MAINTAINER:=Maxim Storchak <m.storchak@gmail.com>
-PKG_LICENSE:=GPL-2.0+
+PKG_LICENSE:=GPL-2.0-or-later
 PKG_LICENSE_FILES:=COPYING
 
 PKG_BUILD_PARALLEL:=1
index d856ce7c150e5f13628077a57c26941f9dec2742..d9ef50e373c25003733229e0fa15eacc118fdba2 100644 (file)
@@ -12,6 +12,7 @@ PKG_VERSION:=4.3
 PKG_RELEASE:=6
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:phillip_lougher:squashfs
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/plougher/squashfs-tools
diff --git a/utils/squashfs-tools/patches/0005-mksquashfs-unsquashfs-fix-compilation-with-glibc-2.2.patch b/utils/squashfs-tools/patches/0005-mksquashfs-unsquashfs-fix-compilation-with-glibc-2.2.patch
new file mode 100644 (file)
index 0000000..39c781f
--- /dev/null
@@ -0,0 +1,47 @@
+From 968aa53dd6d2c0831a9af01873441767c06b88d0 Mon Sep 17 00:00:00 2001
+From: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
+Date: Wed, 1 Aug 2018 12:17:10 +0200
+Subject: [PATCH] mksquashfs/unsquashfs: fix compilation with glibc 2.25+
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From glibc 2.25 release notes:
+https://sourceware.org/ml/libc-alpha/2017-02/msg00079.html
+"* The inclusion of <sys/sysmacros.h> by <sys/types.h> is deprecated.
+  This means that in a future release, the macros “major”, “minor”, and
+  “makedev” will only be available from <sys/sysmacros.h>."
+
+See glibc bug https://sourceware.org/bugzilla/show_bug.cgi?id=19239 .
+---
+ squashfs-tools/mksquashfs.c | 1 +
+ squashfs-tools/unsquashfs.c | 1 +
+ 2 files changed, 2 insertions(+)
+
+diff --git a/squashfs-tools/mksquashfs.c b/squashfs-tools/mksquashfs.c
+index d696a51..8d57c3e 100644
+--- a/squashfs-tools/mksquashfs.c
++++ b/squashfs-tools/mksquashfs.c
+@@ -35,6 +35,7 @@
+ #include <stddef.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
++#include <sys/sysmacros.h>
+ #include <fcntl.h>
+ #include <errno.h>
+ #include <dirent.h>
+diff --git a/squashfs-tools/unsquashfs.c b/squashfs-tools/unsquashfs.c
+index a57f85c..a492b27 100644
+--- a/squashfs-tools/unsquashfs.c
++++ b/squashfs-tools/unsquashfs.c
+@@ -33,6 +33,7 @@
+ #include "fnmatch_compat.h"
+ #include <sys/sysinfo.h>
++#include <sys/sysmacros.h>
+ #include <sys/types.h>
+ #include <sys/time.h>
+ #include <sys/resource.h>
+-- 
+2.21.0
+
index 6250dfe397f98dd4fb16b28f73c735e46a0c17c9..5621e9a4672296a2372f44973b4f8e96b4da4ae9 100644 (file)
@@ -9,14 +9,14 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=stm32flash
 PKG_VERSION:=0.5
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/$(PKG_NAME)
 PKG_HASH:=97aa9422ef02e82f7da9039329e21a437decf972cb3919ad817f70ac9a49e306
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
 PKG_MAINTAINER:=Christian Pointner <equinox@spreadspace.org>
-PKG_LICENSE:=GPL-2.0+
+PKG_LICENSE:=GPL-2.0-or-later
 PKG_LICENSE_FILES:=gpl-2.0.txt
 include $(INCLUDE_DIR)/package.mk
 
index 26f951ce154b4e0b47202a87868006b36380720b..b931534ef89a421c64ca09fe899980af6afebd0c 100644 (file)
@@ -7,12 +7,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=swig
-PKG_VERSION:=4.0.0
+PKG_VERSION:=4.0.1
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/$(PKG_NAME)
-PKG_HASH:=e8a39cd6437e342cdcbd5af27a9bf11b62dc9efec9248065debcb8276fcbb925
+PKG_HASH:=7a00b4d0d53ad97a14316135e2d702091cd5f193bb58bcfcd8bc59d41e7887a9
 PKG_INSTALL:=1
 
 PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>, Hirokazu MORIKAWA <morikw2@gmail.com>
diff --git a/utils/syncthing/Makefile b/utils/syncthing/Makefile
new file mode 100644 (file)
index 0000000..5b91dd6
--- /dev/null
@@ -0,0 +1,66 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=syncthing
+PKG_VERSION:=1.2.1
+PKG_RELEASE:=1
+
+PKG_SOURCE:=syncthing-source-v$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://github.com/syncthing/syncthing/releases/download/v$(PKG_VERSION)
+PKG_HASH:=313bd59ddc2562e833fc4caa8d90360a06d5ff02976c0a4d5d42393e6f8bceac
+
+PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/$(PKG_NAME)
+
+PKG_MAINTAINER:=Paul Spooren <mail@aparcar.org>
+PKG_LICENSE:=MPL-2.0
+PKG_LICENSE_FILES:=LICENSE
+PKG_CPE_ID:=cpe:/a:syncthing:syncthing
+
+PKG_BUILD_DEPENDS:=golang/host
+PKG_BUILD_PARALLEL:=1
+PKG_USE_MIPS16:=0
+
+GO_PKG:=github.com/syncthing/syncthing/
+GO_PKG_BUILD_PKG:=github.com/syncthing/syncthing/cmd/syncthing/
+GO_PKG_INSTALL_EXTRA:=^gui/
+
+include $(INCLUDE_DIR)/package.mk
+include ../../lang/golang/golang-package.mk
+
+define Package/syncthing
+  TITLE:=Continuous file synchronization program
+  URL:=https://syncthing.net
+  DEPENDS:=$(GO_ARCH_DEPENDS)
+  SECTION:=utils
+  CATEGORY:=Utilities
+endef
+
+GO_PKG_LDFLAGS_X:=\
+       main.Version=v$(PKG_VERSION) \
+       main.BuildUser=openwrt \
+       main.BuildHost=openwrt \
+       main.BuildStamp=$(SOURCE_DATE_EPOCH)
+
+define Build/Compile
+  $(call GoPackage/Build/Compile,-tags noupgrade)
+endef
+
+define Package/syncthing/conffiles
+/etc/config/syncthing
+/etc/syncthing
+endef
+
+define Package/syncthing/description
+               Syncthing replaces proprietary sync and cloud services with something
+               open, trustworthy and decentralized. Your data is your data alone and
+               you deserve to choose where it is stored, if it is shared with some
+               third party and how it's transmitted over the Internet.
+endef
+
+define Package/syncthing/install
+       $(call GoPackage/Package/Install/Bin,$(1))
+
+       $(CP) ./files/* $(1)/
+endef
+
+$(eval $(call GoBinPackage,syncthing))
+$(eval $(call BuildPackage,syncthing))
diff --git a/utils/syncthing/files/etc/config/syncthing b/utils/syncthing/files/etc/config/syncthing
new file mode 100644 (file)
index 0000000..9c17b68
--- /dev/null
@@ -0,0 +1,3 @@
+config syncthing 'syncthing'
+    option gui_address 'http://127.0.0.1:8384'
+    option home '/etc/syncthing/'
diff --git a/utils/syncthing/files/etc/init.d/syncthing b/utils/syncthing/files/etc/init.d/syncthing
new file mode 100755 (executable)
index 0000000..1740351
--- /dev/null
@@ -0,0 +1,21 @@
+#!/bin/sh /etc/rc.common
+
+START=99
+
+PROG=/usr/bin/syncthing
+
+start_service() {
+    [ -d /var/syncthing/ ] || mkdir /var/syncthing/
+
+    local gui_address home
+    config_load "syncthing"
+    config_get gui_address syncthing gui_address "http://127.0.0.1:8384"
+    config_get home syncthing home "/etc/syncthing/"
+
+    procd_open_instance
+    procd_set_param command "$PROG"
+    procd_append_param command -gui-address="$gui_address"
+    procd_append_param command -home="$home"
+    procd_set_param respawn
+    procd_close_instance
+}
diff --git a/utils/syncthing/files/etc/syncthing/index-v0.14.0.db b/utils/syncthing/files/etc/syncthing/index-v0.14.0.db
new file mode 120000 (symlink)
index 0000000..3bfbcfa
--- /dev/null
@@ -0,0 +1 @@
+/var/syncthing/
\ No newline at end of file
index 45e5529baf122af3b82e83ecc68ec9ffc4b65fa3..0c31291c402214517a516ca519fede95ba5b065f 100644 (file)
@@ -8,15 +8,16 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=sysstat
-PKG_VERSION:=12.0.2
-PKG_RELEASE:=2
+PKG_VERSION:=12.0.5
+PKG_RELEASE:=1
 
 PKG_LICENSE:=GPL-2.0
 PKG_MAINTAINER:=Marko Ratkaj <marko.ratkaj@sartura.hr>
+PKG_CPE_ID:=cpe:/a:sysstat:sysstat
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=http://pagesperso-orange.fr/sebastien.godard/
-PKG_HASH:=2d30947c8fabbb5015c229fbc149f2891db4926cdf165e5f099310795d8dac80
+PKG_HASH:=58583b0776b9addec69e42eebd6dd1a8e976da8a36bad2422659a1ad6c1a2600
 
 PKG_INSTALL:=1
 
index 4eb1f3381c234fa3578c9c6938362af544b704a8..2d71c88bf81e9eea701221a604ea8d366d3d5228 100644 (file)
@@ -1,6 +1,6 @@
 --- a/sa_common.c
 +++ b/sa_common.c
-@@ -28,6 +28,7 @@
+@@ -29,6 +29,7 @@
  #include <dirent.h>
  #include <fcntl.h>
  #include <libgen.h>
index 0bc686df41c5f10a19cda26757031b669ac5bbfe..e159bd482d8af7b1b235e5b4fd7fe51710941700 100644 (file)
@@ -8,26 +8,31 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=tang
-PKG_VERSION:=6
+PKG_VERSION:=7
 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_HASH:=fbe13e4e3103cd24cada7824b63e510cffd650832ecd075fd49b99475a4f9bfa
 
-PKG_INSTALL:=1
-PKG_BUILD_PARALLEL:=1
+PKG_MAINTAINER:=Tibor Dudlák <tibor.dudlak@gmail.com>
+PKG_LICENSE:=GPL-3.0-or-later
+PKG_LICENSE_FILES:=COPYING
 
 PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
+# This avoids generating man pages
+CONFIGURE_VARS += ac_cv_prog_A2X=
+
 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
diff --git a/utils/tang/patches/010-makefile.patch b/utils/tang/patches/010-makefile.patch
new file mode 100644 (file)
index 0000000..30a480e
--- /dev/null
@@ -0,0 +1,31 @@
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1,4 +1,3 @@
+-DISTCHECK_CONFIGURE_FLAGS = --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir)
+ BUILT_SOURCES=
+ CLEANFILES=
+ man1_MANS=
+@@ -10,13 +9,6 @@ LDADD = @jose_LIBS@ @http_parser_LIBS@
+ 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
+ dist_bin_SCRIPTS = src/tang-show-keys
+ libexec_PROGRAMS = src/tangd
+@@ -52,9 +44,7 @@ src_tangd_SOURCES = src/http.c src/http.h src/tangd.c
+ AM_TESTS_ENVIRONMENT = SD_ACTIVATE="@SD_ACTIVATE@" PATH=$(srcdir)/src:$(builddir)/src:$(PATH)
+ TESTS = tests/adv tests/rec
+-CLEANFILES += $(nodist_systemdsystemunit_DATA)
+ EXTRA_DIST = \
+-    $(foreach unit,$(nodist_systemdsystemunit_DATA),$(unit).in) \
+     COPYING \
+     $(TESTS) \
+     $(man_ADOC_FILES)
diff --git a/utils/tang/patches/020-no-systemd.patch b/utils/tang/patches/020-no-systemd.patch
new file mode 100644 (file)
index 0000000..571c72a
--- /dev/null
@@ -0,0 +1,35 @@
+--- 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/030-readlink.patch b/utils/tang/patches/030-readlink.patch
new file mode 100644 (file)
index 0000000..1a3f897
--- /dev/null
@@ -0,0 +1,13 @@
+--- 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=()
diff --git a/utils/tang/patches/Makefile_am.patch b/utils/tang/patches/Makefile_am.patch
deleted file mode 100644 (file)
index 647aca5..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-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
deleted file mode 100644 (file)
index 50dc68c..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-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
deleted file mode 100644 (file)
index 7c07b1d..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-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 8b65d1a50d85c459c91b4afcb645437c57bf4005..36ebd2c2ad696eae56ce2fbb662f42f3fd46c47d 100644 (file)
@@ -9,22 +9,20 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=tar
 PKG_VERSION:=1.32
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@GNU/$(PKG_NAME)
 PKG_HASH:=d0d3ae07f103323be809bc3eac0dcc386d52c5262499fe05511ac4788af1fdd8
 
 PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
-PKG_LICENSE:=GPL-3.0
+PKG_LICENSE:=GPL-3.0-or-later
 PKG_LICENSE_FILES:=COPYING
 PKG_CPE_ID:=cpe:/a:gnu:tar
 
 PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
 
-PKG_BUILD_DEPENDS:=xz
-
 include $(INCLUDE_DIR)/package.mk
 
 define Package/tar
@@ -49,19 +47,24 @@ define Package/tar/config
                        default y if USE_FS_ACL_ATTR
                        default n
 
-               config PACKAGE_TAR_GZIP
-                       bool "tar: Enable seamless gzip support"
-                       default y
-
                config PACKAGE_TAR_BZIP2
                        bool "tar: Enable seamless bzip2 support"
                        default y
 
+               config PACKAGE_TAR_GZIP
+                       bool "tar: Enable seamless gzip support"
+                       default y
+
                config PACKAGE_TAR_XZ
                        bool "tar: Enable seamless xz support"
                        select PACKAGE_xz-utils
                        select PACKAGE_xz
                        default y
+
+               config PACKAGE_TAR_ZSTD
+                       bool "tar: Enable seamless zstd support"
+                       select PACKAGE_libzstd
+                       default y
        endif
 endef
 
@@ -89,14 +92,16 @@ endef
 CONFIGURE_ARGS += \
        $(if $(CONFIG_PACKAGE_TAR_POSIX_ACL),--with,--without)-posix-acls \
        $(if $(CONFIG_PACKAGE_TAR_XATTR),--with,--without)-xattrs \
-       $(if $(CONFIG_PACKAGE_TAR_GZIP),--with-gzip=gzip,--without-gzip) \
        $(if $(CONFIG_PACKAGE_TAR_BZIP2),--with-bzip2=bzip2,--without-bzip2) \
+       $(if $(CONFIG_PACKAGE_TAR_GZIP),--with-gzip=gzip,--without-gzip) \
        $(if $(CONFIG_PACKAGE_TAR_XZ),--with-xz=xz,--without-xz) \
+       $(if $(CONFIG_PACKAGE_TAR_ZSTD),--with-zstd=zstd,--without-zstd) \
        --without-compress \
        --without-lzip \
        --without-lzma \
        --without-lzop \
-       --without-selinux
+       --without-selinux \
+       --disable-rpath
 
 MAKE_FLAGS += \
        CFLAGS="$(TARGET_CFLAGS)" \
index 4f22824752697fa1835ebabba5490a6ae75851d8..49d1552e4490bd9fb853c7098f3ac53f67b4868a 100644 (file)
@@ -20,6 +20,7 @@ PKG_HASH:=b89de7064ab54dac454a266cfe5d8bf66940cb5ed048d0c30674ea62e7ecef9d
 
 PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=Copyright
+PKG_CPE_ID:=cpe:/a:tcsh:tcsh
 
 PKG_MAINTAINER:=Nuno Goncalves <nunojpg@gmail.com>
 
diff --git a/utils/tessdata/Makefile b/utils/tessdata/Makefile
new file mode 100644 (file)
index 0000000..6f12c77
--- /dev/null
@@ -0,0 +1,59 @@
+# Copyright (C) 2019 Valentín Kivachuk <vk18496@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:=tessdata
+PKG_VERSION:=4.0.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/tesseract-ocr/tessdata/tar.gz/$(PKG_VERSION)?
+PKG_HASH:=38c637d3a1763f6c3d32e8f1d979f045668676ec5feb8ee1869ee77cedd31b08
+
+PKG_MAINTAINER:=Valentín Kivachuk <vk18496@gmail.com>
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=COPYING
+
+PKG_INSTALL:=1
+
+#No need to extract 1,5GB...
+PKG_UNPACK:=
+
+include $(INCLUDE_DIR)/package.mk
+
+ALLTESSERACTLANG:=afr amh ara asm aze aze_cyrl bel ben bod bos bre bul cat ceb ces chi_sim chi_sim_vert chi_tra chi_tra_vert chr cos cym dan dan_frak deu deu_frak div dzo ell eng enm epo equ est eus fao fas fil fin fra frk frm fry gla gle glg grc guj hat heb hin hrv hun hye iku ind isl ita ita_old jav jpn jpn_vert kan kat kat_old kaz khm kir kor kor_vert kur kur_ara lao lat lav lit ltz mal mar mkd mlt mon mri msa mya nep nld nor oci ori osd pan pol por pus que ron rus san sin slk slk_frak slv snd spa spa_old sqi srp srp_latn sun swa swe syr tam tat tel tgk tgl tha tir ton tur uig ukr urd uzb uzb_cyrl vie yid yor
+
+
+define Build/Compile
+endef
+
+define Build/Install
+endef
+
+
+define Package/tesseract-data-default
+  SECTION:=utils
+  CATEGORY:=Utilities
+  DEPENDS:=tesseract
+endef
+
+define generate-tesseract-data-package
+  define Package/tesseract-data-$(1)
+    TITLE:=Training data for $(1) language
+    $(call Package/tesseract-data-default)
+  endef
+
+  define Package/tesseract-data-$(1)/install
+       $(INSTALL_DIR) $$(1)/usr/share/tessdata
+       $(TAR) --strip=1 -C $$(1)/usr/share/tessdata/ -xvf $(DL_DIR)/$(PKG_NAME)-$(PKG_VERSION).tar.gz $(PKG_NAME)-$(PKG_VERSION)/$(1).traineddata
+  endef
+
+endef
+
+
+$(foreach LANG,$(ALLTESSERACTLANG),$(eval $(call generate-tesseract-data-package,$(LANG))))
+$(foreach LANG,$(ALLTESSERACTLANG),$(eval $(call BuildPackage,tesseract-data-$(LANG))))
diff --git a/utils/tesseract/Makefile b/utils/tesseract/Makefile
new file mode 100644 (file)
index 0000000..dc8d2a4
--- /dev/null
@@ -0,0 +1,57 @@
+# Copyright (C) 2019 Valentin Kivachuk <vk18496@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:=tesseract
+PKG_VERSION:=4.0.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/tesseract-ocr/tesseract/tar.gz/$(PKG_VERSION)?
+PKG_HASH:=a1f5422ca49a32e5f35c54dee5112b11b99928fc9f4ee6695cdc6768d69f61dd
+
+PKG_MAINTAINER:=Valentin Kivachuk <vk18496@gmail.com>
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_BUILD_PARALLEL:=1
+PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib
+
+define Package/tesseract
+  MENU:=1
+  SECTION:=utils
+  CATEGORY:=Utilities
+  TITLE:=Tesseract Open Source OCR Engine
+  URL:=https://github.com/tesseract-ocr/tesseract
+  DEPENDS:=+libleptonica +libpthread +libstdcpp
+endef
+
+TARGET_CFLAGS:=$(filter-out -O%,$(TARGET_CFLAGS)) -O3
+define Build/InstallDev
+       $(INSTALL_DIR) $(1)/usr/include
+       $(CP) $(PKG_INSTALL_DIR)/usr/include/tesseract $(1)/usr/include/
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtesseract.{a,so*} $(1)/usr/lib/
+       $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/tesseract.pc $(1)/usr/lib/pkgconfig/
+endef
+
+define Package/tesseract/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.so.* $(1)/usr/lib/
+       $(INSTALL_DIR) $(1)/usr/share
+       $(CP) $(PKG_INSTALL_DIR)/usr/share/* $(1)/usr/share/
+endef
+
+$(eval $(call BuildPackage,tesseract))
diff --git a/utils/tini/Makefile b/utils/tini/Makefile
new file mode 100644 (file)
index 0000000..28abe82
--- /dev/null
@@ -0,0 +1,43 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=tini
+PKG_VERSION:=0.18.0
+PKG_RELEASE:=1
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/krallin/tini/tar.gz/v${PKG_VERSION}?
+PKG_HASH:=1097675352d6317b547e73f9dc7c6839fd0bb0d96dafc2e5c95506bb324049a2
+PKG_SOURCE_VERSION:=fec3683b971d9c3ef73f284f176672c44b448662
+
+PKG_MAINTAINER:=Gerard Ryan <G.M0N3Y.2503@gmail.com>
+
+CMAKE_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+define Package/tini
+  SECTION:=utils
+  CATEGORY:=Utilities
+  TITLE:=simplest init utility
+  URL:=https://github.com/krallin/tini
+  DEPENDS:=
+endef
+
+define Package/tini/description
+A tiny but valid init process for containers.
+endef
+
+# static version seemes to be effected by https://www.openwall.com/lists/musl/2018/07/18/8 so we use the workaround
+TARGET_CFLAGS += -Wl,--build-id
+
+define Package/tini/install
+       $(INSTALL_DIR) $(1)/usr/bin
+
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/tini-static $(1)/usr/bin/docker-init
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/tini $(1)/usr/bin/
+endef
+
+$(eval $(call BuildPackage,tini))
index a92083454603f6c81b3cf9199ab85f9152c2d749..7fa987b9ae5e536b1149677fad3a2e02a2d91a02 100644 (file)
@@ -9,14 +9,14 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=tio
 PKG_VERSION:=1.32
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://github.com/tio/tio/releases/download/v$(PKG_VERSION)
 PKG_HASH:=a8f5ed6994cacb96780baa416b19e5a6d7d67e8c162a8ea4fd9eccd64984ae44
 
 PKG_MAINTAINER:=
-PKG_LICENSE:=GPL-2.0+
+PKG_LICENSE:=GPL-2.0-or-later
 PKG_LICENSE_FILES:=COPYING
 
 PKG_FIXUP:=autoreconf
index b46d4c2fa231883a62d1c031f4dccd5efd2fab61..c1281488db896d7b905588ba86d18476b44ea249 100644 (file)
@@ -12,6 +12,7 @@ PKG_MAINTAINER:=Maxim Storchak <m.storchak@gmail.com>
 
 PKG_LICENSE:=ISC
 PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:nicholas_marriott:tmux
 
 PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
index 5ec444e4d9d1be5e6bb4c18b53fba79e6e954ebd..eb8fa776e30179b20cef8669454e591c19648452 100644 (file)
@@ -8,15 +8,16 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ttyd
-PKG_VERSION:=1.4.2
-PKG_RELEASE:=2
+PKG_VERSION:=1.5.1
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/tsl0922/ttyd/tar.gz/$(PKG_VERSION)?
-PKG_HASH:=ff1a66b418df6cd741868a8ea84f69cd63f15e52e3fa117641ec57d3c37a1315
+PKG_HASH:=817d33d59834f9a76af99f689339722fc1ec9f3c46c9a324665b91cb44d79ee8
 
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
+PKG_MAINTAINER:=Shuanglei Tao <tsl0922@gmail.com>
 
 PKG_BUILD_DEPENDS:=vim/host
 CMAKE_INSTALL:=1
@@ -31,7 +32,6 @@ define Package/ttyd
        DEPENDS:=+libopenssl +libjson-c +libpthread +libwebsockets-full
        URL:=https://github.com/tsl0922/ttyd
        SUBMENU:=Terminal
-       MAINTAINER:=Shuanglei Tao <tsl0922@gmail.com>
 endef
 
 define Package/ttyd/description
index 528a585f55474b115a189e8ada71a47d607b9c11..ca60603376b4c1cf6dd861824c8d6dbcdde5a4d0 100644 (file)
@@ -6,12 +6,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=unrar
-PKG_VERSION:=5.7.3
+PKG_VERSION:=5.8.1
 PKG_RELEASE:=1
 
 PKG_SOURCE:=unrarsrc-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://www.rarlab.com/rar
-PKG_HASH:=40e856b78374f258d8a1f5f02c02f828c5392a0118c9300fd169a300b520a444
+PKG_HASH:=035f1f436f0dc2aea09aec146b9cc3e47ca2442f2c62b4ad9374c7c9cc20e632
 PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>, \
                Ted Hess <thess@kitschensync.net>
 
index 091e14e481d885b38e1fec5616df85df4f8abffd..58e59ebb3f6c5172921346bd6eb14646db9d4393 100644 (file)
@@ -15,6 +15,7 @@ PKG_RELEASE:=1
 PKG_MAINTAINER:=
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=COPYING.GPLv2
+PKG_CPE_ID:=cpe:/a:nikias_bassen:usbmuxd
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_DATE).tar.gz
 PKG_SOURCE_URL=https://codeload.github.com/libimobiledevice/usbmuxd/tar.gz/$(PKG_SOURCE_VERSION)?
index ca598ab034b08311681353ecbf1f2a312ab12436..d5679f19189957dfd7461ca06168e2228cfb2295 100644 (file)
@@ -9,23 +9,27 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=uvcdynctrl
 PKG_VERSION:=0.2.5
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=libwebcam-src-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/libwebcam
 PKG_HASH:=3ca5199c7b8398b655a7c38e3ad4191bb053b1486503287f20d30d141bda9d41
-PKG_MAINTAINER:=Roger D <rogerdammit@gmail.com>
-
 PKG_BUILD_DIR:=$(BUILD_DIR)/libwebcam-$(PKG_VERSION)
 
+PKG_MAINTAINER:=Roger D <rogerdammit@gmail.com>
+CMAKE_INSTALL:=1
+
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/cmake.mk
+include $(INCLUDE_DIR)/nls.mk
 
 define Package/uvcdynctrl
   SECTION:=utils
   CATEGORY:=Utilities
   DEPENDS:=+libwebcam
   TITLE:=Manage dynamic controls in uvcvideo
+  LICENSE:=GPL-3.0-or-later
+  LICENSE_FILES:=uvcdynctrl/COPYING
   URL:=https://sourceforge.net/projects/libwebcam/
   MENU:=1
 endef
@@ -39,8 +43,10 @@ endef
 define Package/libwebcam
   SECTION:=libs
   CATEGORY:=Libraries
-  DEPENDS:=+libxml2 +libiconv-full
+  DEPENDS:=+libxml2 $(ICONV_DEPENDS)
   TITLE:=Webcam library
+  LICENSE:=LGPL-3.0-or-later
+  LICENSE_FILES:=libwebcam/COPYING.LESSER
   URL:=https://sourceforge.net/projects/libwebcam/
 endef
 
@@ -48,9 +54,6 @@ define Package/libwebcam/description
   $(call Package/uvcdynctrl/description)
 endef
 
-TARGET_CFLAGS += -I$(STAGING_DIR)/usr/lib/libiconv-full/include -liconv
-TARGET_LDFLAGS += -L$(STAGING_DIR)/usr/lib/libiconv-full/lib
-
 define Package/uvcdynctrl/install
        $(INSTALL_DIR) $(1)/usr/{bin,share}
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/uvcdynctrl* $(1)/usr/bin/
@@ -62,11 +65,5 @@ define Package/libwebcam/install
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libwebcam.so* $(1)/usr/lib/
 endef
 
-define Build/InstallDev
-       $(INSTALL_DIR) $(1)/usr/{include,lib}
-       $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libwebcam.{a,so*} $(1)/usr/lib/
-endef
-
 $(eval $(call BuildPackage,uvcdynctrl))
 $(eval $(call BuildPackage,libwebcam))
diff --git a/utils/uvcdynctrl/patches/010-iconv.patch b/utils/uvcdynctrl/patches/010-iconv.patch
new file mode 100644 (file)
index 0000000..5f0e535
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/uvcdynctrl/CMakeLists.txt
++++ b/uvcdynctrl/CMakeLists.txt
+@@ -77,7 +77,7 @@ include_directories (../common/include)
+ include_directories (${CMAKE_CURRENT_BINARY_DIR})
+ link_directories (${LIBWEBCAM_BINARY_DIR}/webcam)
+-target_link_libraries (uvcdynctrl webcam)
++target_link_libraries (uvcdynctrl webcam iconv)
+ # Compiler flags
+ set_target_properties (uvcdynctrl PROPERTIES
index 03eeec84a9b04e3f1b2c79a3825e2eecfe721b61..1e1ec75fe235668623c78aa3c109e43d0716ad08 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=vim
 PKG_VERSION:=8.1
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 VIMVER:=81
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
diff --git a/utils/vim/patches/003-CVE-2019-12735.patch b/utils/vim/patches/003-CVE-2019-12735.patch
new file mode 100644 (file)
index 0000000..bf29ce9
--- /dev/null
@@ -0,0 +1,15 @@
+--- a/src/getchar.c
++++ b/src/getchar.c
+@@ -1407,6 +1407,12 @@ openscript(
+       emsg(_(e_nesting));
+       return;
+     }
++
++    // Disallow sourcing a file in the sandbox, the commands would be executed
++    // later, possibly outside of the sandbox.
++    if (check_secure())
++      return;
++
+ #ifdef FEAT_EVAL
+     if (ignore_script)
+       /* Not reading from script, also don't open one.  Warning message? */
index 0fda123e9e2419e12bb8c6e787a777ad1158ba55..5b157de3d1f2f2c846836d02b044cd54efe6c017 100644 (file)
@@ -52,7 +52,7 @@ watchcat_ping() {
                time_now="${time_now%%.*}"
                time_lastcheck="$time_now"
 
-               for host in "$pinghosts"
+               for host in $pinghosts
                do
                        if ping -c 1 "$host" &> /dev/null
                        then
index d9aa68d57b6b2be425c5b6f92a8962c9b38abfb9..44919c89ea95c68dd8831921e30193412cb11680 100644 (file)
@@ -11,8 +11,8 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=wifitoggle
 PKG_VERSION:=1
-PKG_RELEASE:=5
-PKG_LICENSE:=GPL-2.0+
+PKG_RELEASE:=6
+PKG_LICENSE:=GPL-2.0-or-later
 
 PKG_MAINTAINER:=Nuno Goncalves <nunojpg@gmail.com>
 
diff --git a/utils/wipe/Makefile b/utils/wipe/Makefile
new file mode 100644 (file)
index 0000000..84053d3
--- /dev/null
@@ -0,0 +1,42 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=wipe
+PKG_VERSION:=0.24
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/berke/$(PKG_NAME)/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=aefb4403333562f9af5e3e03ecbba4b124e98788c688662240f9b04d80bfdb2f
+
+PKG_MAINTAINER:=Toni Uhlig <matzeton@googlemail.com>
+PKG_LICENSE:=GPL-2.0-only
+
+PKG_BUILD_PARALLEL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/wipe
+  SECTION:=utils
+  CATEGORY:=Utilities
+  TITLE:=securely erase files
+  URL:=http://lambda-diode.com/software/wipe/
+endef
+
+define Package/wipe/description
+  wipe is a little command for securely erasing files from magnetic media.
+endef
+
+define Build/Compile
+       $(MAKE) -C $(PKG_BUILD_DIR) linux \
+               CC_LINUX="$(TARGET_CC)" \
+               CFLAGS="$(TARGET_CFLAGS)" \
+               LDFLAGS="$(TARGET_LDFLAGS)" \
+               CPPFLAGS="$(TARGET_CPPFLAGS)"
+endef
+
+define Package/wipe/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/wipe $(1)/usr/bin/
+endef
+
+$(eval $(call BuildPackage,wipe))
diff --git a/utils/wipe/patches/001-ignore_git_version_hash_and_fix_release_version.patch b/utils/wipe/patches/001-ignore_git_version_hash_and_fix_release_version.patch
new file mode 100644 (file)
index 0000000..945d63e
--- /dev/null
@@ -0,0 +1,30 @@
+diff --git a/Makefile b/Makefile
+index 5757ae3..20d52ce 100644
+--- a/Makefile
++++ b/Makefile
+@@ -157,11 +157,7 @@ wipe.o    :       wipe.c random.h misc.h version.h
+               $(CC) $(CCO) $(CCOC) wipe.c -o wipe.o
+ version.h: always
+-              if which git >/dev/null 2>&1 ; then \
+-                      git rev-list --max-count=1 HEAD | sed -e 's/^/#define WIPE_GIT "/' -e 's/$$/"/' >version.h ; \
+-        else \
+-                      echo '#define WIPE_GIT "(unknown, compiled without git)"' >version.h ; \
+-        fi
++              echo '#define WIPE_GIT "(unknown, compiled without git)"' >version.h ; \
+ random.o      :       random.c misc.h md5.h
+               $(CC) $(CCO) $(CCOC) random.c -o random.o
+diff --git a/wipe.c b/wipe.c
+index 5a215e8..5a4f2ad 100644
+--- a/wipe.c
++++ b/wipe.c
+@@ -24,7 +24,7 @@
+ /*** defines */
+-#define WIPE_VERSION "0.23"
++#define WIPE_VERSION "0.24"
+ #define WIPE_DATE "2016-11-03"
+ /* exit codes */
index 0b94e5bdd864e08511255d9beb2ad32caa533a6d..012c77d5916c8abe215b2e89cbe7e39d64f8b41a 100644 (file)
@@ -10,14 +10,14 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=xz
 PKG_VERSION:=5.2.4
-PKG_RELEASE:=3
+PKG_RELEASE:=5
 
 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:=Public-Domain LGPL-2.1-or-later GPL-2.0-or-later GPL-3.0-or-later
 PKG_LICENSE_FILES:=COPYING
 PKG_CPE_ID:=cpe:/a:tukaani:xz
 
@@ -83,6 +83,9 @@ CONFIGURE_ARGS += \
        --disable-werror \
        --with-pic
 
+CONFIGURE_VARS += \
+       gl_cv_posix_shell=/bin/sh
+
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include
        $(CP) \
@@ -114,7 +117,7 @@ $(eval $(call BuildSubPackage,lzmadec, +liblzma,))
 $(eval $(call BuildSubPackage,lzmainfo, +liblzma,))
 $(eval $(call BuildSubPackage,xz, +liblzma, lzcat lzma unlzma unxz xzcat))
 $(eval $(call BuildSubPackage,xzdec, +liblzma,))
-$(eval $(call BuildSubPackage,xzdiff, +bash +xz, lzcmp lzdiff xzcmp))
-$(eval $(call BuildSubPackage,xzgrep, +bash +xz, lzegrep lzfgrep lzgrep xzegrep xzfgrep))
-$(eval $(call BuildSubPackage,xzless, +bash +xz, lzless))
-$(eval $(call BuildSubPackage,xzmore, +bash +xz, lzmore))
+$(eval $(call BuildSubPackage,xzdiff, +xz, lzcmp lzdiff xzcmp))
+$(eval $(call BuildSubPackage,xzgrep, +xz, lzegrep lzfgrep lzgrep xzegrep xzfgrep))
+$(eval $(call BuildSubPackage,xzless, +xz, lzless))
+$(eval $(call BuildSubPackage,xzmore, +xz, lzmore))
index c2bd1e7c165662bcf54fbf41ce2006019f853a12..1c883af640373ab7925529be8540e60a1a0cf3e8 100644 (file)
@@ -1,23 +1,21 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ykpers
-PKG_VERSION:=1.19.0
+PKG_VERSION:=1.20.0
 PKG_RELEASE:=1
 
-PKG_SOURCE:=ykpers-$(PKG_VERSION).tar.gz
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://developers.yubico.com/yubikey-personalization/Releases
-PKG_HASH:=2bc8afa16d495a486582bad916d16de1f67c0cce9bb0a35c3123376c2d609480
+PKG_HASH:=0ec84d0ea862f45a7d85a1a3afe5e60b8da42df211bb7d27a50f486e31a79b93
+
 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
+PKG_LICENSE_FILES:=COPYING
 
 include $(INCLUDE_DIR)/package.mk
 
 define Package/ykpers
-  SECTION:=utils       
+  SECTION:=utils
   CATEGORY:=Utilities
   TITLE:=The Yuibco personalization package
   URL:=https://developers.yubico.com/yubikey-personalization/
@@ -25,7 +23,7 @@ define Package/ykpers
 endef
 
 define Package/ykpers/description
-       The YubiKey Personalization package contains a library and command 
+       The YubiKey Personalization package contains a library and command
        line tool used to personalize (i.e., set a AES key) YubiKeys.
 endef
 
@@ -33,7 +31,6 @@ 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
index 06d5d2ff6ef6d46c5bbb62ee39f02883425150e1..6669dd2f59b399b44d98d9939b8da41b69833697 100644 (file)
@@ -9,14 +9,14 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=zile
 PKG_VERSION:=2.3.24
-PKG_RELEASE:=4
+PKG_RELEASE:=5
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@GNU/zile
 PKG_HASH:=218bb2af414c6a168101656631a5b2da92f20a965895e1006658cc658b0b7e89
 PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
 
-PKG_LICENSE:=GPL-3.0+
+PKG_LICENSE:=GPL-3.0-or-later
 PKG_LICENSE_FILES:=COPYING
 
 PKG_FIXUP:=autoreconf
index f625ca3afb7e295caae91dce3915ff2eefcf7bdb..6981b5762ed313f7795e30063a37f05d8541e1fa 100644 (file)
@@ -9,7 +9,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=zoneinfo
-PKG_VERSION:=2019a
+PKG_VERSION:=2019c
 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:=90366ddf4aa03e37a16cd49255af77f801822310b213f195e2206ead48c59772
+PKG_HASH:=79c7806dab09072308da0e3d22c37d3b245015a591891ea147d3b133b60ffc7c
 
 include $(INCLUDE_DIR)/package.mk
 
 define Download/tzcode
    FILE=$(PKG_SOURCE_CODE)
    URL=$(PKG_SOURCE_URL)
-   HASH:=8739f162bc30cdfb482435697f969253abea49595541a0afd5f443fbae433ff5
+   HASH:=f6ebd3668e02d5ed223d3b7b1947561bf2d2da2f4bd1db61efefd9e06c167ed4
 endef
 
 $(eval $(call Download,tzcode))
index 865dc73b3abddc28e0efd00b7eff1adaf737152b..f6bdf5ec439bea169109fd19560d497c904bf0ac 100644 (file)
@@ -1,36 +1,29 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=zstd
-PKG_VERSION:=1.4.0
-PKG_RELEASE:=3
+PKG_VERSION:=1.4.3
+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:=63be339137d2b683c6d19a9e34f4fb684790e864fee13c7dd40e197a64c705c1
+PKG_HASH:=5eda3502ecc285c3c92ee0cc8cd002234dee39d539b3f692997a0e80de1d33de
 
+PKG_MAINTAINER:=Amol Bhave <ambhave@fb.com>
 PKG_LICENSE:=GPL-2.0-or-later
 PKG_LICENSE_FILES:=COPYING
 
-include $(INCLUDE_DIR)/package.mk
-include $(INCLUDE_DIR)/host-build.mk
-include $(INCLUDE_DIR)/cmake.mk
-
 PKG_BUILD_PARALLEL:=1
 HOST_BUILD_PARALLEL:=1
 CMAKE_SOURCE_SUBDIR:=build/cmake
 CMAKE_INSTALL:=1
 
-ifeq ($(CONFIG_ZSTD_OPTIMIZE_O3),y)
-       TARGET_CFLAGS := $(filter-out -O%,$(TARGET_CFLAGS))
-       TARGET_CFLAGS += -O3
-       TARGET_CXXFLAGS := $(filter-out -O%,$(TARGET_CXXFLAGS))
-       TARGET_CXXFLAGS += -O3
-endif
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
+include $(INCLUDE_DIR)/cmake.mk
 
 define Package/zstd/Default
        SUBMENU:=Compression
        URL:=https://github.com/facebook/zstd
-       MAINTAINER:=Amol Bhave <ambhave@fb.com>
 endef
 
 define Package/libzstd
@@ -38,6 +31,7 @@ $(call Package/zstd/Default)
        SECTION:=libs
        CATEGORY:=Libraries
        TITLE:=zstd library.
+       MENU:=1
 endef
 
 define Package/libzstd/description
@@ -48,6 +42,7 @@ endef
 define Package/libzstd/config
        config ZSTD_OPTIMIZE_O3
                bool "Use all optimizations (-O3)"
+               depends on PACKAGE_libzstd
                default y
                help
                        This enables additional optmizations using the -O3 compilation flag.
@@ -66,14 +61,27 @@ define Package/zstd/description
        This package provides the zstd binaries.
 endef
 
+ifeq ($(CONFIG_ZSTD_OPTIMIZE_O3),y)
+TARGET_CFLAGS:= $(filter-out -O%,$(TARGET_CFLAGS)) -O3
+endif
+
+TARGET_CFLAGS += -flto
+TARGET_LDFLAGS += -Wl,--as-needed
+
+define Build/InstallDev
+       $(call Build/InstallDev/cmake,$(1))
+       $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/libzstd.pc
+       $(SED) 's,/usr/lib,$$$${prefix}/lib,g' $(1)/usr/lib/pkgconfig/libzstd.pc
+endef
+
 define Package/libzstd/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libzstd.so* $(1)/usr/lib/
+       $(CP) $(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/
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/{unzstd,zstd,zstdcat,zstdmt} $(1)/usr/bin/
 endef
 
 $(eval $(call BuildPackage,libzstd))
diff --git a/utils/zstd/patches/010-uClibc-ng.patch b/utils/zstd/patches/010-uClibc-ng.patch
deleted file mode 100644 (file)
index 552286b..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/programs/fileio.c
-+++ b/programs/fileio.c
-@@ -175,7 +175,7 @@ static void clearHandler(void)
- #if !defined(BACKTRACE_ENABLE)
- /* automatic detector : backtrace enabled by default on linux+glibc and osx */
--#  if (defined(__linux__) && defined(__GLIBC__)) \
-+#  if (defined(__linux__) && (defined(__GLIBC__) && !defined(__UCLIBC__))) \
-      || (defined(__APPLE__) && defined(__MACH__))
- #    define BACKTRACE_ENABLE 1
- #  else
diff --git a/utils/zstd/patches/010-utime.patch b/utils/zstd/patches/010-utime.patch
new file mode 100644 (file)
index 0000000..a67e696
--- /dev/null
@@ -0,0 +1,97 @@
+From 245a69c0f5784ba89c28301263bcfd5785ebe0ea Mon Sep 17 00:00:00 2001
+From: Rosen Penev <rosenp@gmail.com>
+Date: Tue, 30 Jul 2019 17:17:07 -0700
+Subject: [PATCH] zstd: Don't use utime on Linux
+
+utime is deprecated by POSIX 2008 and optionally not available with
+uClibc-ng.
+
+Got rid of a few useless headers in timefn.h.
+
+Signed-off-by: Rosen Penev <rosenp@gmail.com>
+---
+ programs/platform.h |  2 +-
+ programs/timefn.h   |  6 ------
+ programs/util.c     | 10 ++++++++++
+ programs/util.h     |  5 +++--
+ 4 files changed, 14 insertions(+), 9 deletions(-)
+
+diff --git a/programs/platform.h b/programs/platform.h
+index 38ded8727..5934e59cf 100644
+--- a/programs/platform.h
++++ b/programs/platform.h
+@@ -92,7 +92,7 @@ extern "C" {
+ #    if defined(__linux__) || defined(__linux)
+ #      ifndef _POSIX_C_SOURCE
+-#        define _POSIX_C_SOURCE 200112L  /* feature test macro : https://www.gnu.org/software/libc/manual/html_node/Feature-Test-Macros.html */
++#        define _POSIX_C_SOURCE 200809L  /* feature test macro : https://www.gnu.org/software/libc/manual/html_node/Feature-Test-Macros.html */
+ #      endif
+ #    endif
+ #    include <unistd.h>  /* declares _POSIX_VERSION */
+diff --git a/programs/timefn.h b/programs/timefn.h
+index d1ddd31b1..2db3765b9 100644
+--- a/programs/timefn.h
++++ b/programs/timefn.h
+@@ -19,12 +19,6 @@ extern "C" {
+ /*-****************************************
+ *  Dependencies
+ ******************************************/
+-#include <sys/types.h>    /* utime */
+-#if defined(_MSC_VER)
+-#  include <sys/utime.h>  /* utime */
+-#else
+-#  include <utime.h>      /* utime */
+-#endif
+ #include <time.h>         /* clock_t, clock, CLOCKS_PER_SEC */
+diff --git a/programs/util.c b/programs/util.c
+index fb77d1783..3a2e9e28f 100644
+--- a/programs/util.c
++++ b/programs/util.c
+@@ -54,14 +54,24 @@ int UTIL_getFileStat(const char* infilename, stat_t *statbuf)
+ int UTIL_setFileStat(const char *filename, stat_t *statbuf)
+ {
+     int res = 0;
++#if defined(_WIN32)
+     struct utimbuf timebuf;
++#else
++    struct timespec timebuf[2];
++#endif
+     if (!UTIL_isRegularFile(filename))
+         return -1;
++#if defined(_WIN32)
+     timebuf.actime = time(NULL);
+     timebuf.modtime = statbuf->st_mtime;
+     res += utime(filename, &timebuf);  /* set access and modification times */
++#else
++    timebuf[0].tv_sec = time(NULL);
++    timebuf[1].tv_sec = statbuf->st_mtime;
++    res += utimensat(AT_FDCWD, filename, timebuf, 0);  /* set access and modification times */
++#endif
+ #if !defined(_WIN32)
+     res += chown(filename, statbuf->st_uid, statbuf->st_gid);  /* Copy ownership */
+diff --git a/programs/util.h b/programs/util.h
+index d6e5bb550..71d4c7c77 100644
+--- a/programs/util.h
++++ b/programs/util.h
+@@ -25,12 +25,13 @@ extern "C" {
+ #include <stdio.h>        /* fprintf */
+ #include <sys/types.h>    /* stat, utime */
+ #include <sys/stat.h>     /* stat, chmod */
+-#if defined(_MSC_VER)
++#if defined(_WIN32)
+ #  include <sys/utime.h>  /* utime */
+ #  include <io.h>         /* _chmod */
+ #else
++#  include <fcntl.h>      /* AT_FDCWD */
++#  include <sys/stat.h>   /* utimensat */
+ #  include <unistd.h>     /* chown, stat */
+-#  include <utime.h>      /* utime */
+ #endif
+ #include <time.h>         /* clock_t, clock, CLOCKS_PER_SEC, nanosleep */
+ #include "mem.h"          /* U32, U64 */