Merge pull request #11744 from ja-pa/pytest-new
authorHannu Nyman <hannu.nyman@iki.fi>
Tue, 7 Apr 2020 14:23:11 +0000 (17:23 +0300)
committerGitHub <noreply@github.com>
Tue, 7 Apr 2020 14:23:11 +0000 (17:23 +0300)
python-pytest: add new package

364 files changed:
devel/meson/Makefile
lang/node-homebridge/Makefile
lang/node-javascript-obfuscator/Makefile
lang/php7-pecl-krb5/Makefile
lang/php7-pecl-redis/Makefile
lang/php7/Makefile
lang/python/README.md
lang/python/bcrypt/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-restframework39/Makefile
lang/python/django-simple-captcha/Makefile
lang/python/django-statici18n/Makefile
lang/python/django-webpack-loader/Makefile
lang/python/django/Makefile
lang/python/django1/Makefile
lang/python/flup/Makefile
lang/python/gunicorn/Makefile
lang/python/openpyxl/Makefile
lang/python/passlib/Makefile
lang/python/pillow/Makefile
lang/python/pyjwt/Makefile
lang/python/pyodbc/Makefile
lang/python/python-astral/Makefile
lang/python/python-attrs/Makefile
lang/python/python-automat/Makefile
lang/python/python-awscli/Makefile
lang/python/python-botocore/Makefile
lang/python/python-certifi/Makefile
lang/python/python-cffi/Makefile
lang/python/python-chardet/Makefile
lang/python/python-colorama/Makefile
lang/python/python-constantly/Makefile
lang/python/python-crcmod/Makefile [deleted file]
lang/python/python-crypto/Makefile
lang/python/python-cryptodome/Makefile
lang/python/python-cryptodomex/Makefile
lang/python/python-cryptography/Makefile
lang/python/python-cryptography/patches/001-disable-setup-requirements.patch [deleted file]
lang/python/python-curl/Makefile
lang/python/python-dateutil/Makefile
lang/python/python-defusedxml/Makefile
lang/python/python-dns/Makefile
lang/python/python-docutils/Makefile
lang/python/python-dpkt/Makefile [deleted file]
lang/python/python-egenix-mx-base/Makefile [deleted file]
lang/python/python-enum34/Makefile [deleted file]
lang/python/python-enum34/patches/001-omit-docs.patch [deleted file]
lang/python/python-et_xmlfile/Makefile
lang/python/python-evdev/Makefile
lang/python/python-futures/Makefile [deleted file]
lang/python/python-gmpy2/Makefile
lang/python/python-gnupg/Makefile
lang/python/python-host.mk [deleted file]
lang/python/python-hyperlink/Makefile
lang/python/python-idna/Makefile
lang/python/python-incremental/Makefile
lang/python/python-ipaddress/Makefile [deleted file]
lang/python/python-jdcal/Makefile
lang/python/python-jmespath/Makefile
lang/python/python-ldap/Makefile [deleted file]
lang/python/python-libmodbus/Makefile
lang/python/python-lxml/Makefile
lang/python/python-mysqlclient/Makefile
lang/python/python-oauthlib/Makefile
lang/python/python-package.mk [deleted file]
lang/python/python-packages/Makefile [deleted file]
lang/python/python-packages/README.md [deleted file]
lang/python/python-packaging/Makefile [new file with mode: 0644]
lang/python/python-parsley/Makefile
lang/python/python-pcapy/Makefile [deleted file]
lang/python/python-pcapy/patches/010-libcxx.patch [deleted file]
lang/python/python-pluggy/Makefile [new file with mode: 0644]
lang/python/python-ply/Makefile
lang/python/python-psycopg2/Makefile [deleted file]
lang/python/python-pyasn1-modules/Makefile
lang/python/python-pyasn1/Makefile
lang/python/python-pycparser/Makefile
lang/python/python-pyopenssl/Makefile
lang/python/python-pyptlib/Makefile [deleted file]
lang/python/python-pyserial/Makefile
lang/python/python-pytz/Makefile
lang/python/python-qrcode/Makefile
lang/python/python-rcssmin/Makefile
lang/python/python-requests-oauthlib/Makefile
lang/python/python-requests/Makefile
lang/python/python-rsa/Makefile
lang/python/python-s3transfer/Makefile
lang/python/python-service-identity/Makefile
lang/python/python-simplejson/Makefile
lang/python/python-six/Makefile
lang/python/python-twisted/Makefile
lang/python/python-txsocksx/Makefile [deleted file]
lang/python/python-txsocksx/patches/001-omit-tests.patch [deleted file]
lang/python/python-txsocksx/patches/002-do-not-use-vcversioner.patch [deleted file]
lang/python/python-urllib3/Makefile
lang/python/python-version.mk [deleted file]
lang/python/python-voluptuous/Makefile
lang/python/python-wcwidth/Makefile
lang/python/python-yaml/Makefile
lang/python/python-zope-interface/Makefile
lang/python/python/Config-python-light.in [deleted file]
lang/python/python/Makefile [deleted file]
lang/python/python/files/config.site [deleted file]
lang/python/python/files/python-config.in [deleted file]
lang/python/python/files/python-package-codecs.mk [deleted file]
lang/python/python/files/python-package-compiler.mk [deleted file]
lang/python/python/files/python-package-ctypes.mk [deleted file]
lang/python/python/files/python-package-db.mk [deleted file]
lang/python/python/files/python-package-decimal.mk [deleted file]
lang/python/python/files/python-package-dev.mk [deleted file]
lang/python/python/files/python-package-distutils.mk [deleted file]
lang/python/python/files/python-package-email.mk [deleted file]
lang/python/python/files/python-package-gdbm.mk [deleted file]
lang/python/python/files/python-package-lib2to3.mk [deleted file]
lang/python/python/files/python-package-logging.mk [deleted file]
lang/python/python/files/python-package-multiprocessing.mk [deleted file]
lang/python/python/files/python-package-ncurses.mk [deleted file]
lang/python/python/files/python-package-openssl.mk [deleted file]
lang/python/python/files/python-package-pip.mk [deleted file]
lang/python/python/files/python-package-pkg-resources.mk [deleted file]
lang/python/python/files/python-package-pydoc.mk [deleted file]
lang/python/python/files/python-package-setuptools.mk [deleted file]
lang/python/python/files/python-package-sqlite3.mk [deleted file]
lang/python/python/files/python-package-unittest.mk [deleted file]
lang/python/python/files/python-package-xml.mk [deleted file]
lang/python/python/patches-setuptools/001-reproducible.patch [deleted file]
lang/python/python/patches-setuptools/002-sorted-requires.patch [deleted file]
lang/python/python/patches-setuptools/003-PKG-INFO-output-reproducible.patch [deleted file]
lang/python/python/patches/001-enable-zlib.patch [deleted file]
lang/python/python/patches/002-do-not-add-include-dirs-when-cross-compiling.patch [deleted file]
lang/python/python/patches/003-do-not-compile-tests-at-build.patch [deleted file]
lang/python/python/patches/004-do-not-write-bytes-codes.patch [deleted file]
lang/python/python/patches/005-fix-bluetooth-support.patch [deleted file]
lang/python/python/patches/006-remove-multi-arch-and-local-paths.patch [deleted file]
lang/python/python/patches/007-distutils-do-not-adjust-path.patch [deleted file]
lang/python/python/patches/008-distutils-use-python-sysroot.patch [deleted file]
lang/python/python/patches/009-do-not-use-dblib_dir-when-cross-compiling.patch [deleted file]
lang/python/python/patches/010-do-not-add-rt-lib-dirs-when-cross-compiling.patch [deleted file]
lang/python/python/patches/012-add-support-source-date-epoch-pyc.patch [deleted file]
lang/python/python/patches/013-getbuildinfo-date-time-source-date-epoch.patch [deleted file]
lang/python/python/patches/021-compileall-add-recursion-option.patch [deleted file]
lang/python/python/patches/024-musl-find_library.patch [deleted file]
lang/python/python/patches/025-utime.patch [deleted file]
lang/python/python/patches/026-bpo-34585-Dont-do-runtime-test-to-get-float-byte-order-GH-9085.patch [deleted file]
lang/python/python/patches/027-bpo-34585-run-autoconf-GH-9411-edited.patch [deleted file]
lang/python/python3-asgiref/Makefile
lang/python/python3-package.mk
lang/python/python3-version.mk
lang/python/python3/files/python3-package-pip.mk
lang/python/ruamel-yaml/Makefile
lang/python/text-unidecode/Makefile
lang/python/vobject/Makefile
lang/vala/Makefile
libs/boost/Makefile
libs/elektra/Makefile
libs/gnutls/Makefile
libs/jansson/Makefile [deleted file]
libs/libcap/Makefile
libs/libcgroup/Makefile
libs/libcgroup/patches/0001-musl-fts-configure.patch [deleted file]
libs/libcgroup/patches/010-cdefs.patch [new file with mode: 0644]
libs/libgd/Makefile
libs/libgd/patches/010-getlib.patch [new file with mode: 0644]
libs/libgd/patches/100-no-cxx.patch
libs/libgd/patches/200-cmake-add-soname-info-to-libgd.so.patch [deleted file]
libs/libgd/patches/210-generate-install-gdlib.pc-for-cmake-builds-too-164.patch [deleted file]
libs/libgd/patches/220-exclude_host_headers.patch
libs/libgd/patches/300-gdlib.pc-cmake.patch [deleted file]
libs/libhttp-parser/Makefile
libs/libhttp-parser/patches/000-fix_darwin_error.patch
libs/libmraa/Makefile
libs/libpfring/Makefile
libs/libpfring/patches/0001-fix-cross-compiling.patch
libs/libpfring/patches/0002-fix-march-native.patch [deleted file]
libs/libpfring/patches/010-kernel-416.patch [deleted file]
libs/libsearpc/Makefile
libs/libssh/Makefile
libs/libssh/patches/0001-libcrypto-compat-add-extra-functions.patch [new file with mode: 0644]
libs/libssh/patches/0002-libcrypto-remove-deprecated-API-usage.patch [new file with mode: 0644]
libs/libtalloc/Makefile
libs/libupm/Makefile
libs/libupnp/Makefile
libs/libuwsc/Makefile
libs/libv4l/Makefile
libs/libv4l/patches/040-musl.patch [new file with mode: 0644]
libs/libxslt/Makefile
libs/libxslt/patches/100-fix-cve-2019-11068.patch [deleted file]
libs/libxslt/patches/101-fix-cve-2019-13117.patch [deleted file]
libs/libxslt/patches/102-fix-cve-2019-13118.patch [deleted file]
libs/mtdev/Makefile
libs/nspr/Makefile
libs/nspr/patches/010-sgidefs.patch [new file with mode: 0644]
libs/nss/Makefile
libs/rpcsvc-proto/Makefile
mail/dovecot/Makefile
mail/mailman/Makefile [deleted file]
mail/mailman/files/mailman.init [deleted file]
mail/mailman/patches/100-postfix.patch [deleted file]
mail/mailman/patches/200-nohostdnspython.patch [deleted file]
mail/mailman/patches/300-targetpython.patch [deleted file]
mail/mailman/patches/400-modules.patch [deleted file]
multimedia/graphicsmagick/Makefile
multimedia/grilo-plugins/Makefile
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
net/adblock/files/adblock.monitor [new file with mode: 0755]
net/adblock/files/adblock.service [deleted file]
net/adblock/files/adblock.sh
net/adblock/files/adblock.sources [new file with mode: 0644]
net/apache/Makefile
net/apache/files/openwrt.layout [deleted file]
net/apache/patches/020-openssl-deprecated.patch [deleted file]
net/atftp/Makefile
net/atftp/patches/04-cdefs.patch [new file with mode: 0644]
net/boinc/Makefile [new file with mode: 0644]
net/boinc/files/boinc-client.init [new file with mode: 0755]
net/boinc/files/global_prefs_override.xml [new file with mode: 0644]
net/boinc/files/remote_hosts.cfg [new file with mode: 0644]
net/bonding/Makefile
net/bonding/files/lib/netifd/proto/bonding.sh
net/clamav/Makefile
net/clamav/patches/001-compile.patch [deleted file]
net/clamav/patches/002-Avoid-libxml-checks-if-disable-xml-is-used.patch [deleted file]
net/clamav/patches/010-openssl-deprecated.patch [deleted file]
net/danish/Makefile [deleted file]
net/dawn/Makefile [new file with mode: 0644]
net/dawn/files/dawn.config [new file with mode: 0644]
net/dawn/files/dawn.init [new file with mode: 0755]
net/dnscrypt-proxy2/Makefile
net/freeradius3/Makefile
net/freeradius3/patches/004-fix-target-python-header-detection.patch
net/frr/Makefile
net/haproxy/Makefile
net/haproxy/get-latest-patches.sh
net/haproxy/patches/000-BUG-MINOR-protocol_buffer-Wrong-maximum-shifting.patch [new file with mode: 0644]
net/haproxy/patches/000-OPENWRT-add-uclibc-support.patch [deleted file]
net/haproxy/patches/001-OPENWRT-add-uclibc-support.patch [new file with mode: 0644]
net/jool/Makefile
net/kea/Makefile
net/kismet/Makefile
net/kismet/patches/030-libcxx.patch [new file with mode: 0644]
net/libreswan/Makefile
net/miniupnpd/Makefile
net/miniupnpd/files/miniupnpd.init
net/nft-qos/Makefile
net/nmap/Makefile
net/nmap/patches/010-Avoid-using-namespace-std-causing-name-conflicts.patch [new file with mode: 0644]
net/nmap/patches/010-cxx.patch [deleted file]
net/nmap/patches/020-Python3-port-of-ndiff.patch [new file with mode: 0644]
net/obfsproxy/Makefile [deleted file]
net/obfsproxy/files/obfsproxy.conf [deleted file]
net/obfsproxy/files/obfsproxy.init [deleted file]
net/obfsproxy/patches/001-exclude-tests.patch [deleted file]
net/obfsproxy/patches/002-fix-python-path.patch [deleted file]
net/obfsproxy/patches/003-remove-argparse-dependency-test.patch [deleted file]
net/obfsproxy/patches/004-add-syslog-support.patch [deleted file]
net/openfortivpn/Makefile
net/openssh/Makefile
net/openssh/files/sshd.init
net/openvswitch/Makefile
net/pagekitec/Makefile
net/pagekitec/files/etc/init.d/pagekitec
net/pagekitec/patches/01-Omit-redundant-times-when-logging-to-syslog.patch [deleted file]
net/pdns/Makefile
net/pdns/patches/200-openssl-deprecated.patch [new file with mode: 0644]
net/port-mirroring/Makefile
net/port-mirroring/patches/020-time.patch [new file with mode: 0644]
net/prosody/Makefile
net/prosody/files/prosody.init
net/reaver/Makefile
net/seafile-ccnet/Makefile
net/seafile-server/Makefile
net/shorewall-core/Makefile
net/shorewall-core/patches/110-lib.common.patch
net/shorewall-lite/Makefile
net/shorewall/Makefile
net/shorewall6-lite/Makefile
net/shorewall6/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/softflowd/Makefile
net/softflowd/patches/020-uid.patch [new file with mode: 0644]
net/sqm-scripts/Makefile
net/sqm-scripts/files/luci-app-sqm.defaults [deleted file]
net/strongswan/Makefile
net/tinyproxy/Makefile
net/tinyproxy/files/tinyproxy.init
net/tor/Makefile
net/transmission/Makefile
net/transmission/files/transmission.init
net/vpn-policy-routing/Makefile
net/vpn-policy-routing/files/README.md
net/vpn-policy-routing/files/vpn-policy-routing.init
net/wifidog-ng/Makefile
net/wifidog-ng/src/config.c
net/wifidog-ng/src/config.h
net/wifidog-ng/src/main.c
net/wifidog-ng/src/utils.h
net/wsdd2/Makefile
net/wsdd2/files/wsdd2.init
net/yggdrasil/Makefile
net/zerotier/Makefile
net/zerotier/patches/020-musl.patch [new file with mode: 0644]
sound/forked-daapd/Makefile
sound/forked-daapd/patches/010-errno.patch [new file with mode: 0644]
sound/mpd/Makefile
sound/mpd/patches/010-treewide-use-boost-lround-when-std-round-is-unavaila.patch [deleted file]
sound/mpd/patches/020-fix-incorrect-rounding.patch [deleted file]
sound/mpd/patches/030-volume_mapping-get-rid-of-exp10-workaround.patch [deleted file]
sound/mpd/patches/040-treewide-get-rid-of-C-math-function-usage.patch [deleted file]
utils/bcm27xx-eeprom/Makefile [new file with mode: 0644]
utils/bcm27xx-eeprom/patches/0001-rpi-eeprom-update-OpenWrt-defaults.patch [new file with mode: 0644]
utils/bcm27xx-eeprom/patches/0002-rpi-eeprom-config-switch-to-Python-3.patch [new file with mode: 0644]
utils/bcm27xx-eeprom/patches/0003-rpi-eeprom-update-change-default-include-path.patch [new file with mode: 0644]
utils/collectd/Makefile
utils/evtest/Makefile
utils/evtest/patches/020-Fix-build-on-32bit-arches-with-64bit-time_t.patch [new file with mode: 0644]
utils/gammu/Makefile
utils/gammu/files/gammu.init
utils/gammu/patches/001-iconv-disabling-option.patch [deleted file]
utils/gammu/patches/003-cmake-cross-toolchain.patch [deleted file]
utils/gammu/patches/004-cmake_libdbi_optional.patch [deleted file]
utils/hfsprogs/Makefile
utils/hfsprogs/patches/020-cdefs.patch [new file with mode: 0644]
utils/i2c-tools/Makefile
utils/nano/Makefile
utils/qemu/Makefile
utils/qemu/patches/0001-configure-allow-disable-fortify_source.patch
utils/qemu/patches/0002-configure-allow-enabling-disabling-libudev-from-comm.patch
utils/qemu/patches/0003-configure-enable-guest_agent-no-matter-whether-softm.patch
utils/qemu/patches/0004-disas-fix-compilation-failure-when-isnan-is-a-macro.patch
utils/qemu/patches/0005-pc-bios-fix-compilation-when-AS-is-actually-gcc-driv.patch
utils/qemu/patches/0006-util-mmap-alloc-fix-missing-MAP_SYNC.patch [new file with mode: 0644]
utils/quota/Makefile [new file with mode: 0644]
utils/rtl_433/Makefile
utils/rtl_433/patches/010-gnu-source.patch [deleted file]
utils/rtty/Makefile
utils/syncthing/Makefile
utils/syncthing/files/etc/config/syncthing
utils/syncthing/files/etc/init.d/syncthing
utils/syncthing/files/etc/syncthing/index-v0.14.0.db [deleted symlink]
utils/xz/Makefile
utils/yunbridge/Makefile [deleted file]
utils/yunbridge/files/etc/config/yunbridge [deleted file]
utils/yunbridge/files/etc/init.d/yunbridge [deleted file]
utils/yunbridge/files/sbin/yunbridge [deleted file]
utils/yunbridge/files/usr/bin/pretty-wifi-info.lua [deleted file]
utils/yunbridge/files/usr/lib/lua/luci/controller/arduino/index.lua [deleted file]
utils/yunbridge/files/usr/lib/lua/luci/sha256.lua [deleted file]
utils/yunbridge/patches/000-scripts.patch [deleted file]

index 1df088083e1cf98c2cecb09e3037755fa242c9f9..b9af6f71c47fa23777836c8314c22f03fe50528f 100644 (file)
@@ -1,11 +1,11 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=meson
-PKG_VERSION:=0.53.2
+PKG_VERSION:=0.54.0
 PKG_RELEASE:=1
 
 PYPI_NAME:=meson
-PKG_HASH:=3e8f830f33184397c2eb0b651ec502adb63decb28978bdc84b3558d71284c21f
+PKG_HASH:=dde5726d778112acbd4a67bb3633ab2ee75d33d1e879a6283a7b4a44c3363c27
 
 PKG_MAINTAINER:=Andre Heider <a.heider@gmail.com>
 PKG_LICENSE:=Apache-2.0
index 24e9d72dfcf848cc6387f35dc2002bcbd24477de..3ceb0df8193011d2978c357b92c84b9d557caae0 100644 (file)
@@ -6,12 +6,12 @@ include $(TOPDIR)/rules.mk
 
 PKG_NPM_NAME:=homebridge
 PKG_NAME:=node-$(PKG_NPM_NAME)
-PKG_VERSION:=0.4.52
+PKG_VERSION:=0.4.53
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NPM_NAME)-$(PKG_VERSION).tgz
 PKG_SOURCE_URL:=http://registry.npmjs.org/$(PKG_NPM_NAME)/-/
-PKG_HASH:=2acab13e3a48d47917b31cf137fd034872ef5a1f3683cfd8c295e544decdc848
+PKG_HASH:=c616c004451a2d508b810927488abece965a0c099f6d8bf13bbfc9b647e886bb
 
 PKG_BUILD_DEPENDS:=node/host
 PKG_USE_MIPS16:=0
index 6432f7d0737568a58a9d98af9aaddd75164f6e42..76b485139a715908d73c81309e09ed8aa7fcf82a 100644 (file)
@@ -6,12 +6,12 @@ include $(TOPDIR)/rules.mk
 
 PKG_NPM_NAME:=javascript-obfuscator
 PKG_NAME:=node-$(PKG_NPM_NAME)
-PKG_VERSION:=0.24.0
+PKG_VERSION:=0.27.2
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NPM_NAME)-$(PKG_VERSION).tgz
 PKG_SOURCE_URL:=https://registry.npmjs.org/$(PKG_NPM_NAME)/-/
-PKG_HASH:=2312220a65b8d03195837bb8e2555115c9c9910eb08d3077297f5b9133570c26
+PKG_HASH:=0180bff7f2bbebc353d7c117d87cd66f7b136b7ea3f4c21b0f39bff5e5c99917
 
 PKG_BUILD_DEPENDS:=node/host
 HOST_BUILD_PARALLEL:=1
index e5db58177e63eba70845bc96f9f1367405353006..d93ea0cd81e4cb35c90b938620709dd56ca019e8 100644 (file)
@@ -8,9 +8,9 @@ include $(TOPDIR)/rules.mk
 PECL_NAME:=krb5
 PECL_LONGNAME:=Bindings for the Kerberos library
 
-PKG_VERSION:=1.1.2
-PKG_RELEASE:=4
-PKG_HASH:=3301e047fc7dc3574da19b2a4b18e15feca5ad39db9335c3353a8e16b855c35b
+PKG_VERSION:=1.1.3
+PKG_RELEASE:=1
+PKG_HASH:=3a65bb5f7d64ed5f6fbcf07250c17b0de29f693ac88f96cd1cc9737b996da120
 
 PKG_NAME:=php7-pecl-krb5
 PKG_SOURCE:=$(PECL_NAME)-$(PKG_VERSION).tgz
index d29c6d30f09f8fb585b91ee0121e6def3666cea6..2c9edaf16b405f0f5dcbaed93a2f3dae28b7d493 100644 (file)
@@ -8,9 +8,9 @@ include $(TOPDIR)/rules.mk
 PECL_NAME:=redis
 PECL_LONGNAME:=PHP extension for interfacing with Redis
 
-PKG_VERSION:=5.1.1
-PKG_RELEASE:=2
-PKG_HASH:=621c9d2b4054c797b0e5d5bc5e0f1eeb49bedb37f20e46f838aa4d17d2fe8180
+PKG_VERSION:=5.2.1
+PKG_RELEASE:=1
+PKG_HASH:=c05af6254d704844303fbe8b13b2d54bdb4372b1a081934e67cac42ec79ecbbe
 
 PKG_NAME:=php7-pecl-redis
 PKG_SOURCE:=$(PECL_NAME)-$(PKG_VERSION).tgz
index 63eb6aee47998beaf3d197df43e794e7fda4d1b0..6bcc4bc21d1ca639f1cd67fe929ee2fe4a65944c 100644 (file)
@@ -6,7 +6,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=php
-PKG_VERSION:=7.4.3
+PKG_VERSION:=7.4.4
 PKG_RELEASE:=1
 
 PKG_MAINTAINER:=Michael Heimpold <mhei@heimpold.de>
@@ -16,7 +16,7 @@ PKG_CPE_ID:=cpe:/a:php:php
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=http://www.php.net/distributions/
-PKG_HASH:=cf1f856d877c268124ded1ede40c9fb6142b125fdaafdc54f855120b8bc6982a
+PKG_HASH:=1873c4cefdd3df9a78dcffb2198bba5c2f0464f55c9c960720c84df483fca74c
 
 PKG_BUILD_PARALLEL:=1
 PKG_USE_MIPS16:=0
index 501c1e69fc6f95eb2ea9559dc5e38bcde2a92551..7fed9857cca6d0a97979808eaf53b3c0a181100a 100644 (file)
@@ -1,18 +1,15 @@
 # Python packages folder
 
-:warning: **Python 2 will soon be unsupported and removed from the feed - [see below](#python-2-end-of-life)** :warning:
-
 ## Table of contents
 
 1. [Description](#description)
-2. [Python 2 end-of-life](#python-2-end-of-life)
-    1. [Transition policy / schedule](#transition-policy--schedule)
-3. [Introduction](#introduction)
-4. [Using Python[3] in external/other package feeds](#using-python3-in-externalother-package-feeds)
+2. [Introduction](#introduction)
+3. [Python 2 end-of-life](#python-2-end-of-life)
+4. [Using Python in external/other package feeds](#using-python-in-externalother-package-feeds)
 5. [Build considerations](#build-considerations)
 6. [General folder structure](#general-folder-structure)
-7. [Building a Python[3] package](#building-a-python3-package)
-    1. [Include python[3]-package.mk](#include-python3-packagemk)
+7. [Building a Python package](#building-a-python-package)
+    1. [Include python3-package.mk](#include-python3-packagemk)
     2. [Add Package/<PKG_NAME> OpenWrt definitions](#add-packagepkg_name-openwrt-definitions)
     3. [Wrapping things up so that they build](#wrapping-things-up-so-that-they-build)
     4. [Customizing things](#customizing-things)
 
 This section describes specifics for the Python packages that are present in this repo, and how things are structured.
 
-In terms of license, contributing guide, etc, all of that information is described in the top [README.md](README.md) file, and it applies here as well. This document attempts to cover only technical aspects of Python/Python3 packages, and maybe some explanations about how things are (and why they are as they are).
-
-## Python 2 end-of-life
-
-Python 2 will not be maintained past [1 January 2020](https://pythonclock.org/). As such, we will be transitioning Python 2 programs and libraries to Python 3, and Python 2 packages will be removed in early 2020.
-
-(Discussion for how to handle this transition can be found in [#8520](https://github.com/openwrt/packages/issues/8520).)
-
-### Transition policy / schedule
-
-A mass removal event ("The Snap") will occur on 31 March 2020, or 2 weeks before the freeze for a 20.x release, whichever is sooner. The exact date will be confirmed when the 20.x release schedule is known, or by 15 March 2020.
-
-All Python 2 packages (the Python 2 interpreter, programs that depend on Python 2, and Python 2-only libraries) will be removed during this event.
-
-Leading up to "The Snap":
-
-* In general, new Python 2 packages are no longer accepted
-  * Exceptions can be made on a case-by-case basis, given extraordinary circumstances or reasons, until 31 May 2019
-  * From 31 May 2019 onward, absolutely no new Python 2 packages will be accepted
-
-* The Python 2 interpreter will remain in the feed until "The Snap"
-  * The interpreter will continue to be updated, including the last release in January 2020 (if there is one)
-
-* Programs that depend on Python 2 will be transitioned to Python 3 (see [#8893](https://github.com/openwrt/packages/issues/8893))
-  * If a program cannot be transitioned, a suitable replacement will be found
-  * If a replacement cannot be found, the program will be removed during "The Snap"
-
-* Python 2 libraries will remain in the feed until "The Snap"
-  * 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
-    * Python 2 libraries that share the same Makefile as their Python 3 version will continue to receive normal updates
+In terms of license, contributing guide, etc, all of that information is described in the top [README.md](README.md) file, and it applies here as well. This document attempts to cover only technical aspects of Python packages, and maybe some explanations about how things are (and why they are as they are).
 
 ## Introduction
 
 This sub-tree came to exist after a number of contributions (Python packages) were made to this repo, and the [lang](lang) subtree grew to a point where a decision was made to move all Python packages under [lang/python](lang/python).
 
-It contains the 2 Python interpreters (Python & Python3) and Python packages. Most of the Python packages are downloaded from [pypi.org](https://pypi.org/). Python packages from [pypi.org](https://pypi.org/) are typically preferred when adding new packages.
+It contains the Python 3 interpreter and Python packages. Most of the Python packages are downloaded from [pypi.org](https://pypi.org/). Python packages from [pypi.org](https://pypi.org/) are typically preferred when adding new packages.
+
+If more packages (than the ones packaged here) are needed, they can be downloaded via [pip](https://pip.pypa.io). Note that the versions of `pip` & `setuptools` [available in this repo] are the ones that are packaged inside the Python package (yes, Python comes packaged with `pip` & `setuptools`).
 
-If more packages (than the ones packaged here) are needed, they can be downloaded via [pip or pip3](https://pip.pypa.io). Note that the versions of `pip` & `setuptools` [available in this repo] are the ones that are packaged inside the Python & Python3 packages (yes, Python & Python3 come packaged with `pip` & `setuptools`).
+## Python 2 end-of-life
+
+Python 2 [will not be maintained past 2020](https://www.python.org/dev/peps/pep-0373/). All Python 2 packages have been removed from the packages feed (this repo) and archived in the [abandoned packages feed](https://github.com/openwrt/packages-abandoned).
 
-## Using Python[3] in external/other package feeds
+## Using Python in external/other package feeds
 
 In the feeds.conf (or feeds.conf.default file, whatever is preferred), the packages repo should be present.
 
@@ -79,14 +48,12 @@ src-git telephony https://git.openwrt.org/feed/telephony.git
 src-git someotherfeed https://github.com/<github-user>/<some-other-package>
 ```
 
-Assuming that there are Python packages in the `<some-other-package>`, they should include `python[3]-package.mk` like this:
+Assuming that there are Python packages in the `<some-other-package>`, they should include `python3-package.mk` like this:
 ```
-include $(TOPDIR)/feeds/packages/lang/python/python-package.mk
 include $(TOPDIR)/feeds/packages/lang/python/python3-package.mk
 ```
 
-Same rules apply for `python[3]-package.mk` as the Python packages in this repo.
-And if only 1 of `python-package.mk` or `python3-package.mk` is needed, then only the needed mk file should be included (though it's not an issue if both are included).
+Same rules apply for `python3-package.mk` as the Python packages in this repo.
 
 **One important consideration:**: if the local name is not `packages`, it's something else, like `openwrt-packages`. And in `feeds.conf[.default]` it's:
 ```
@@ -95,7 +62,6 @@ src-git openwrt-packages https://git.openwrt.org/feed/packages.git
 
 Then, the inclusions also change:
 ```
-include $(TOPDIR)/feeds/openwrt-packages/lang/python/python-package.mk
 include $(TOPDIR)/feeds/openwrt-packages/lang/python/python3-package.mk
 ```
 
@@ -104,86 +70,73 @@ Each maintainer[s] of external packages feeds is responsible for the local name,
 In case there is a need/requirement such that the local package feed is named something else than `packages`, one approach to make the package flexible to change is:
 
 ```
-PYTHON_PACKAGE_MK:=$(wildcard $(TOPDIR)/feeds/*/lang/python/python-package.mk)
+PYTHON3_PACKAGE_MK:=$(wildcard $(TOPDIR)/feeds/*/lang/python/python3-package.mk)
 
 # verify that there is only one single file returned
-ifneq (1,$(words $(PYTHON_PACKAGE_MK)))
-ifeq (0,$(words $(PYTHON_PACKAGE_MK)))
-$(error did not find python-package.mk in any feed)
+ifneq (1,$(words $(PYTHON3_PACKAGE_MK)))
+ifeq (0,$(words $(PYTHON3_PACKAGE_MK)))
+$(error did not find python3-package.mk in any feed)
 else
-$(error found multiple python-package.mk files in the feeds)
+$(error found multiple python3-package.mk files in the feeds)
 endif
 else
-$(info found python-package.mk at $(PYTHON_PACKAGE_MK))
+$(info found python3-package.mk at $(PYTHON3_PACKAGE_MK))
 endif
 
-include $(PYTHON_PACKAGE_MK)
+include $(PYTHON3_PACKAGE_MK)
 ```
 
-Same can be done for `python3-package.mk`.
-This should solve the corner-case where the `python[3]-package.mk` can be in some other feed, or if the packages feed will be named something else locally.
+This should solve the corner-case where the `python3-package.mk` can be in some other feed, or if the packages feed will be named something else locally.
 
 ## Build considerations
 
-In order to build the Python[3] interpreters, a host Python/Python3 interpreter needs to be built, in order to process some of the build for the target Python/Python3 build. The host Python[3] interpreters are also needed so that Python bytecodes are generated, so the host interpreters need to be the exact versions as on the target. And finally, the host Python[3] interpreters also provide pip & pip3, so that they may be used to install some Python[3] packages that are required to build other Python[3] packages.
-That's why you'll also see a Python/Python3 build & staging directories.
+In order to build the Python interpreter, a host Python interpreter needs to be built, in order to process some of the build for the target Python build. The host Python interpreter is also needed so that Python bytecodes are generated, so the host interpreter needs to be the exact version as on the target. And finally, the host Python interpreter also provides pip, so that it may be used to install some Python packages that are required to build other Python packages.
+That's why you'll also see a Python build & staging directories.
 
-As you're probably thinking, this sounds [and is] somewhat too much complication [just for packaging], but the status of things is-as-it-is, and it's probably much worse than what's currently visible on the surface [with respect to packaging Python[3] & packages].
+As you're probably thinking, this sounds [and is] somewhat too much complication [just for packaging], but the status of things is-as-it-is, and it's probably much worse than what's currently visible on the surface [with respect to packaging Python & packages].
 
-As mentioned earlier, Python[3] packages are shipped with bytecodes, and the reason for this is simply performance & size.
+As mentioned earlier, Python packages are shipped with bytecodes, and the reason for this is simply performance & size.
 The thought/discussion matrix derives a bit like this:
 * shipping both Python source-code & bytecodes takes too much space on some devices ; Python source code & byte-code take about similar disk-size
 * shipping only Python source code has a big performance penalty [on some lower end systems] ; something like 500 msecs (Python source-only) -> 70 msecs (Python byte-codes) time reduction for a simple "Hello World" script
-* shipping only Python byte-codes seems like a good trade-off, and this means that `python-src` & `python3-src` can be provided for people that want the source code
+* shipping only Python byte-codes seems like a good trade-off, and this means that `python3-src` can be provided for people that want the source code
 
-By default, automatic Python[3] byte-code generation is disabled when running a Python script, in order to prevent a disk from accidentally filling up. Since some disks reside in RAM, this also means not filling up the RAM. If someone wants to convert Python source to byte-code then he/she is free to compile it [directly on the device] manually via the Python interpreter & library.
+By default, automatic Python byte-code generation is disabled when running a Python script, in order to prevent a disk from accidentally filling up. Since some disks reside in RAM, this also means not filling up the RAM. If someone wants to convert Python source to byte-code then he/she is free to compile it [directly on the device] manually via the Python interpreter & library.
 
 ## General folder structure
 
-The basis of all these packages are:
-* [lang/python/python](lang/python/python) - The Python 2.7.y interpreter (supposedly, there won't ever by a 2.8.y)
+The basis of all these packages is:
 * [lang/python/python3](lang/python/python3) - The Python 3.x.y interpreter
 
-These 2 are normal OpenWrt packages, which will build the Python interpreters. They also provide `python[3]-pip` & `python[3]-setuptools`. Each Python or Python3 package is actually split into multiple sub-packages [e.g. python-email, python-sqlite3, etc]. This can be viewed inside [lang/python/python/files](lang/python/python/files) & [lang/python/python3/files](lang/python/python3/files).
-
-The reason for this splitting, is purely to offer a way for some people to package Python/Python3 in as-minimal-as-possible-and-still-runable way, and also to be somewhat maintainable when packaging. A standard Python[3] installation can take ~20-30 MBs of disk, which can be somewhat big for some people, so there are the `python[3]-base` packages which bring that down to ~5 MBs. This seems to be good enough (and interesting) for a number of people.
+This is a normal OpenWrt package, which will build the Python interpreter. This also provides `python3-pip` & `python3-setuptools`. Each Python package is actually split into multiple sub-packages [e.g. python3-email, python3-sqlite3, etc]. This can be viewed inside [lang/python/python3/files](lang/python/python3/files).
 
-The Python[3] interpreters are structured like this:
-* `python-base` (and `python3-base`), which is just the minimal package to startup Python[3] and run basic commands
-* `python` (and `python3`) are meta-packages, which install almost everything (python[3]-base [plus] Python[3] library [minus] some unit-tests & some windows-y things)
-* `python-light` (and `python3-light`) are `python` (and `python3`) [minus] packages that are in [lang/python/python/files](lang/python/python/files) or [lang/python/python3/files](lang/python/python3/files) ; the size of these 2 packages may be sensible (and interesting) to another group of people
+The reason for this splitting, is purely to offer a way for some people to package Python in as-minimal-as-possible-and-still-runable way, and also to be somewhat maintainable when packaging. A standard Python installation can take ~20-30 MBs of disk, which can be somewhat big for some people, so there is the `python3-base` package which brings that down to ~5 MBs. This seems to be good enough (and interesting) for a number of people.
 
-All other Python & Python3 packages (aside from the 2 intepreters) typically use these files:
-* **python[3]-host.mk** - this file contains paths and build rules for running the Python[3] interpreters on the host-side; they also provide paths to host interprete, host Python lib-dir & so on
-* **python[3]-package.mk**
-  * includes **python[3]-host.mk**
-  * contains all the default build rules for Python[3] packages; these will be detailed below in the [Building a Python[3] package](#Building a Python[3] package) section
+The Python interpreter is structured like this:
+* `python3-base`, which is just the minimal package to startup Python and run basic commands
+* `python3` is a meta-package, which installs almost everything (python3-base [plus] Python library [minus] some unit-tests & some windows-y things)
+* `python3-light` is `python3` [minus] packages that are in [lang/python/python3/files](lang/python/python3/files) ; the size of this package may be sensible (and interesting) to another group of people
 
-**Note** that Python/Python3 packages don't need to use these files (i.e. `python[3]-package.mk` & `python[3]-host.mk`), but they do provide some ease-of-use & reduction of duplicate code, especially when packaging for both Python & Python3. And they do contain some learned-lessons about packaging Python/Python3 packages, so it's a good idea to use them.
+All other Python packages (aside from the intepreter) typically use these files:
+* **python3-host.mk** - this file contains paths and build rules for running the Python interpreter on the host-side; they also provide paths to host interprete, host Python lib-dir & so on
+* **python3-package.mk**
+  * includes **python3-host.mk**
+  * contains all the default build rules for Python packages; these will be detailed below in the [Building a Python package](#Building a Python package) section
 
-## Building a Python[3] package
+**Note** that Python packages don't need to use these files (i.e. `python3-package.mk` & `python3-host.mk`), but they do provide some ease-of-use & reduction of duplicate code. And they do contain some learned-lessons about packaging Python packages, so it's a good idea to use them.
 
-A Python package can be packaged for either Python or Python3 or both.
+## Building a Python package
 
-This section will describe both, and then it can be inferred which is for which.
+Packaging for Python uses the `VARIANT` mechanism for packaging inside OpenWrt. (#### FIXME: find a link for this later if it exists)
 
-Packaging for both Python & Python3 uses the `VARIANT` mechanism for packaging inside OpenWrt. (#### FIXME: find a link for this later if it exists)
+### Include python3-package.mk
 
-### Include python[3]-package.mk
-
-If packaging for Python, add this after  `include $(INCLUDE_DIR)/package.mk`
-```
-include ../python-package.mk
-```
-
-If packaging for Python3, add this after  `include $(INCLUDE_DIR)/package.mk`
+Add this after  `include $(INCLUDE_DIR)/package.mk`
 ```
 include ../python3-package.mk
 ```
 
-Order doesn't matter between `python-package.mk` & `python3-package.mk`.
-
-These will make sure that build rules for Python or Python3 can be specified and picked up for build.
+This will make sure that build rules for Python can be specified and picked up for build.
 
 ### Include pypi.mk (optional)
 
@@ -225,98 +178,58 @@ The `PYPI_SOURCE_*` variables allow this default `PKG_SOURCE` value to be custom
 ### Add Package/<PKG_NAME> OpenWrt definitions
 
 This part is similar to default OpenWrt packages.
-It's usually recommended to have a `Package/<PKG_NAME>/Default` section that's common for both Python & Python3.
 
 Example:
 ```
-define Package/python-lxml/Default
+define Package/python3-lxml
   SECTION:=lang
   CATEGORY:=Languages
   SUBMENU:=Python
+  TITLE:=Pythonic XML processing library
   URL:=https://lxml.de
-  DEPENDS:=+libxml2 +libxslt +libexslt
-endef
-```
-
-Then for each variant do something like:
-```
-define Package/python-lxml
-$(call Package/python-lxml/Default)
-  TITLE:=python-lxml
-  DEPENDS+=+PACKAGE_python-lxml:python-light +PACKAGE_python-lxml:python-codecs
-  VARIANT:=python
-endef
-
-define Package/python3-lxml
-$(call Package/python-lxml/Default)
-  TITLE:=python3-lxml
-  DEPENDS+=+PACKAGE_python3-lxml:python3-light
+  DEPENDS:=+python3-light +libxml2 +libxslt +libexslt
   VARIANT:=python3
 endef
-```
-
-Some considerations here (based on the example above):
-* be sure to make sure that `DEPENDS` are correct for both variants; as seen in the example above, `python-codecs` is needed only for `python-lxml` (see **[note-encodings](#note-encodings)**)
-* consider adding conditional DEPENDS for each variant ; so for each Python[3] package add `+PACKAGE_python-lxml:<dep>` as seen in the above example ; the reason for this is build-time reduction ; if you want to build Python3 only packages, this won't build Python & Python packages + dependencies ; this is a known functionality of OpenWrt build deps
-  * this should not happen anymore, but if adding `+PACKAGE_python-lxml` conditional deps creates circular dependencies, then open an issue so this can be resolved again.
-* `VARIANT=python` or `VARIANT=python3` must be added
-* typically each variant package is named `Package/python-<something>` & `Package/python3-<something>` ; this convention makes things easier to follow, though it could work without naming things this way
-* `TITLE` can be something a bit more verbose/neat ; typically the name is short as seen above
-
-<a name="note-encodings">**note-encodings**</a>: That's because some character encodings are needed, which are present in `python3-base` but not in `python-light` (but are present in `python-codecs`) ; this is because Python3 is designed to be more Unicode friendly than Python2 (it's one of the fundamental differences between the 2), and Python3 won't start without those encodings being present.
-
-
-Following these, 2 more definitions are required:
-```
-define Package/python-lxml/description
-The lxml XML toolkit is a Pythonic binding
-for the C libraries libxml2 and libxslt.
-endef
 
 define Package/python3-lxml/description
-$(call Package/python-lxml/description)
-.
-(Variant for Python3)
+  The lxml XML toolkit is a Pythonic binding
+  for the C libraries libxml2 and libxslt.
 endef
 ```
 
-Typically, the description is the same for both, so just mentioning that one is a variant of the other is sufficient.
+Some considerations here (based on the example above):
+* `VARIANT=python3` must be added
+* typically the package is named `Package/python3-<something>` ; this convention makes things easier to follow, though it could work without naming things this way
+* `TITLE` can be something a bit more verbose/neat ; typically the name is short as seen above
 
 ### Wrapping things up so that they build
 
 If all the above prerequisites have been met, all that's left is:
 
 ```
-$(eval $(call PyPackage,python-lxml))
-$(eval $(call BuildPackage,python-lxml))
-
 $(eval $(call Py3Package,python3-lxml))
 $(eval $(call BuildPackage,python3-lxml))
 ```
 
-The `$(eval $(call PyPackage,python-lxml))` part will instantiate all the default Python build rules so that the final Python package is packaged into an OpenWrt.
-And `$(eval $(call BuildPackage,python-lxml))` will bind all the rules generated with `$(eval $(call PyPackage,python-lxml))` into the OpenWrt build system.
+The `$(eval $(call Py3Package,python3-lxml))` part will instantiate all the default Python build rules so that the final Python package is packaged into an OpenWrt.
+And `$(eval $(call BuildPackage,python3-lxml))` will bind all the rules generated with `$(eval $(call Py3Package,python3-lxml))` into the OpenWrt build system.
 
 These packages will contain byte-codes and binaries (shared libs & other stuff).
 
-If a user wishes to ship source code, adding 2 more lines creates 2 more packages that ship Python source code:
+If a user wishes to ship source code, adding one more line creates one more package that ship Python source code:
 ```
-$(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))
 ```
 
-The name `*-src` must be the Python package name; so for `python-lxml-src` a equivalent `python-lxml` name must exist.
+The name `*-src` must be the Python package name; so for `python3-lxml-src` a equivalent `python3-lxml` name must exist.
 
 ### Customizing things
 
 Some packages need custom build rules (because they do).
 
-The default package build and install processes are defined in `python[3]-package.mk`.
+The default package build and install processes are defined in `python3-package.mk`.
 
 #### Building
 
@@ -324,35 +237,35 @@ The default build process calls `setup.py install` inside the directory where th
 
 There are several Makefile variables that can be used to customize this process (all optional):
 
-* `PYTHON_PKG_SETUP_DIR` / `PYTHON3_PKG_SETUP_DIR`: Path where `setup.py` can be found, relative to the package directory (`PKG_BUILD_DIR`).  
+* `PYTHON3_PKG_SETUP_DIR`: Path where `setup.py` can be found, relative to the package directory (`PKG_BUILD_DIR`).  
   Default: empty value (`setup.py` is in the package directory)
-* `PYTHON_PKG_SETUP_VARS` / `PYTHON3_PKG_SETUP_VARS`: Additional environment variables to set for the call to `setup.py`. Should be in the form of `VARIABLE1=value VARIABLE2=value ...`.  
+* `PYTHON3_PKG_SETUP_VARS`: Additional environment variables to set for the call to `setup.py`. Should be in the form of `VARIABLE1=value VARIABLE2=value ...`.  
   Default: empty value
-* `PYTHON_PKG_SETUP_GLOBAL_ARGS` / `PYTHON3_PKG_SETUP_GLOBAL_ARGS`: Additional command line arguments to pass to `setup.py`, before / in front of the `install` command.  
+* `PYTHON3_PKG_SETUP_GLOBAL_ARGS`: Additional command line arguments to pass to `setup.py`, before / in front of the `install` command.  
   Default: empty value
-* `PYTHON_PKG_SETUP_ARGS` / `PYTHON3_PKG_SETUP_ARGS`: Additional command line arguments to pass to `setup.py`, after the `install` command.  
+* `PYTHON3_PKG_SETUP_ARGS`: Additional command line arguments to pass to `setup.py`, after the `install` command.  
   Default: `--single-version-externally-managed`
 
-Conceptually, these variables are used in this way (using a Python 2 package as an example):
+Conceptually, these variables are used in this way:
 
 ```
-cd $(PKG_BUILD_DIR)/$(PYTHON_PKG_SETUP_DIR)
-$(PYTHON_PKG_SETUP_VARS) python setup.py $(PYTHON_PKG_SETUP_GLOBAL_ARGS) install $(PYTHON_PKG_SETUP_ARGS)
+cd $(PKG_BUILD_DIR)/$(PYTHON3_PKG_SETUP_DIR)
+$(PYTHON3_PKG_SETUP_VARS) python3 setup.py $(PYTHON3_PKG_SETUP_GLOBAL_ARGS) install $(PYTHON3_PKG_SETUP_ARGS)
 ```
 
-The default build process can be completely overridden by defining custom `PyBuild/Compile` & `Py3Build/Compile` rules in the package Makefile.
+The default build process can be completely overridden by defining a custom `Py3Build/Compile` rule in the package Makefile.
 
 #### Installing
 
 The default install process copies some/all of the files from `PKG_INSTALL_DIR`, placed there by the build process, to a location passed to the install rule as the first argument (`$(1)`). The OpenWrt build system will then take those files and create the actual .ipk package archives.
 
 This default process uses 2 build rules:
-* `PyPackage/<package>/filespec` & `Py3Package/<package>/filespec` which are Python library files relative to `/usr/lib/pythonX.Y` ; by default this is `/usr/lib/python$(PYTHON[3]_VERSION)/site-packages` (`PYTHON[3]_PKG_DIR`) ; most Python[3] packages generate files that get installed in this sub-folder
-* `PyPackage/<package>/install` & `Py3Package/<package>/install` is similar to `Package/<package>/install` ; these allow binary (or other files) to be installed on the target
+* `Py3Package/<package>/filespec` which are Python library files relative to `/usr/lib/pythonX.Y` ; by default this is `/usr/lib/python$(PYTHON3_VERSION)/site-packages` (`PYTHON3_PKG_DIR`) ; most Python packages generate files that get installed in this sub-folder
+* `Py3Package/<package>/install` is similar to `Package/<package>/install` ; this allows binary (or other files) to be installed on the target
 
-Both the 2 above rules generate a `Package/<package>/install` build rule, which gets picked up by the build system. Both can be used together (they are not mutually exclusive), and provide a good enough flexibility for specifying Python[3] packages.
+Both the 2 above rules generate a `Package/<package>/install` build rule, which gets picked up by the build system. Both can be used together (they are not mutually exclusive), and provide a good enough flexibility for specifying Python packages.
 
-The `PyPackage/<package>/filespec` & `Py3Package/<package>/filespec` rules contain one or more lines of the following format (whitespace added for clarity):
+The `Py3Package/<package>/filespec` rule contains one or more lines of the following format (whitespace added for clarity):
 
 ```
 <one of: +-=> | <file/directory path> | <file permissions>
@@ -366,21 +279,21 @@ The initial character controls the action that will be taken:
   * File permissions is not used / ignored in this case.
 * `=`: Assign the given file permissions to the given path. File permissions is required in this case.
 
-As mentioned, the default `PyPackage/<package>/filespec` & `Py3Package/<package>/filespec` install `PYTHON[3]_PKG_DIR`:
+As mentioned, the default `Py3Package/<package>/filespec` installs `PYTHON3_PKG_DIR`:
 
 ```
-define PyPackage/python-example/filespec
-+|$(PYTHON_PKG_DIR)
+define Py3Package/python3-example/filespec
++|$(PYTHON3_PKG_DIR)
 endef
 ```
 
-If the package installs a `example_package` directory inside `PYTHON_PKG_DIR`, and there is an `examples` directory and `test_*.py` files that can be omitted to save space, this can be specified as:
+If the package installs a `example_package` directory inside `PYTHON3_PKG_DIR`, and there is an `examples` directory and `test_*.py` files that can be omitted to save space, this can be specified as:
 
 ```
-define PyPackage/python-example/filespec
-+|$(PYTHON_PKG_DIR)
--|$(PYTHON_PKG_DIR)/example_package/examples
--|$(PYTHON_PKG_DIR)/example_package/test_*.py
+define Py3Package/python3-example/filespec
++|$(PYTHON3_PKG_DIR)
+-|$(PYTHON3_PKG_DIR)/example_package/examples
+-|$(PYTHON3_PKG_DIR)/example_package/test_*.py
 endef
 ```
 
@@ -390,9 +303,8 @@ These can be installed via pip and ideally they should only be installed like th
 
 Which is why [for example] if you need python cffi on the host build, it's easier to just add it via:
 ```
-HOST_PYTHON_PACKAGE_BUILD_DEPENDS:="cffi==$(PKG_VERSION)"
 HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:="cffi==$(PKG_VERSION)"
 ```
-[cffi is one of those packages that needs a host-side package installed for both Python & Python3].
+[cffi is one of those packages that needs a host-side package installed].
 
 This works reasonably well in the current OpenWrt build system, as binaries get built for this package and get installed in the staging-dir `$(STAGING_DIR)/usr/lib/pythonX.Y/site-packages`.
index eb56b00e44644922ce29d8472911be8216dbb839..90c53bd63780692bd352cbe1f9e8fcf11d2aa34d 100644 (file)
@@ -16,12 +16,10 @@ PKG_LICENSE:=Apache-2.0
 PKG_LICENSE_FILES:=LICENSE
 
 PKG_BUILD_DEPENDS:=libffi/host
-HOST_PYTHON_PACKAGE_BUILD_DEPENDS:="cffi>=1.1"
 HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:="cffi>=1.1"
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
 define Package/bcrypt/Default
@@ -32,15 +30,6 @@ define Package/bcrypt/Default
   URL:=https://github.com/pyca/bcrypt/
 endef
 
-define Package/python-bcrypt
-$(call Package/bcrypt/Default)
-  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)
   DEPENDS:= \
@@ -50,20 +39,12 @@ $(call Package/bcrypt/Default)
   VARIANT:=python3
 endef
 
-define Package/python-bcrypt/description
-  Good password hashing for your software and your servers.
-endef
-
 define Package/python3-bcrypt/description
-$(call Package/python-bcrypt/description)
+  Good password hashing for your software and your servers.
 .
 (Variant for Python3)
 endef
 
-$(eval $(call PyPackage,python-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 34ce696e99387093ee5b2eefc4a236406d653fd1..21aee4f8dbee1998bcc119cf3d9de9c625d0f47c 100644 (file)
@@ -20,7 +20,6 @@ PKG_LICENSE_FILES:=LICENSE
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
 define Package/django-appconf/Default
@@ -31,20 +30,6 @@ define Package/django-appconf/Default
   URL:=https://django-appconf.readthedocs.io
 endef
 
-define Package/python-django-appconf
-$(call Package/django-appconf/Default)
-  DEPENDS:= \
-       +PACKAGE_python-django-appconf:python \
-       python-django1 \
-       +PACKAGE_python-django-appconf:python-six
-  VARIANT:=python
-  MDEPENDS:=python-django1
-endef
-
-define Package/python-django-appconf/description
-  A helper class for handling configuration defaults of packaged apps gracefully
-endef
-
 define Package/python3-django-appconf
 $(call Package/django-appconf/Default)
   DEPENDS:= \
@@ -55,15 +40,11 @@ $(call Package/django-appconf/Default)
 endef
 
 define Package/python3-django-appconf/description
-$(call Package/python-django-appconf/description)
+  A helper class for handling configuration defaults of packaged apps gracefully
 .
 (Variant for Python3)
 endef
 
-$(eval $(call PyPackage,python-django-appconf))
-$(eval $(call BuildPackage,python-django-appconf))
-$(eval $(call BuildPackage,python-django-appconf-src))
-
 $(eval $(call Py3Package,python3-django-appconf))
 $(eval $(call BuildPackage,python3-django-appconf))
 $(eval $(call BuildPackage,python3-django-appconf-src))
index 0c277d362b468c183187bd258496ba8407d8e261..8f420a15371fc9fda68f4b1974aefd26620e9cdd 100644 (file)
@@ -21,7 +21,6 @@ PKG_LICENSE_FILES:=LICENSE
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
 define Package/django-compressor/Default
@@ -32,24 +31,6 @@ define Package/django-compressor/Default
   URL:=https://django-compressor.readthedocs.io
 endef
 
-define Package/python-django-compressor
-$(call Package/django-compressor/Default)
-  DEPENDS:= \
-       +PACKAGE_python-django-compressor:python \
-       python-django1 \
-       +PACKAGE_python-django-compressor:python-django-appconf \
-       +PACKAGE_python-django-compressor:python-rcssmin
-  VARIANT:=python
-  MDEPENDS:=python-django1
-endef
-
-define Package/python-django-compressor/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
-
 define Package/python3-django-compressor
 $(call Package/django-compressor/Default)
   DEPENDS:= \
@@ -61,15 +42,14 @@ $(call Package/django-compressor/Default)
 endef
 
 define Package/python3-django-compressor/description
-$(call Package/python-django-compressor/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.
 .
 (Variant for Python3)
 endef
 
-$(eval $(call PyPackage,python-django-compressor))
-$(eval $(call BuildPackage,python-django-compressor))
-$(eval $(call BuildPackage,python-django-compressor-src))
-
 $(eval $(call Py3Package,python3-django-compressor))
 $(eval $(call BuildPackage,python3-django-compressor))
 $(eval $(call BuildPackage,python3-django-compressor-src))
index 1332c44dc32b1aae10a7600d9eab53c0241d9347..0d5da2aae37d9fb2887f6d1595ad0e9da3fe4fc6 100644 (file)
@@ -19,7 +19,6 @@ PKG_LICENSE:=BSD-3-Clause
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
 define Package/python-django-constance/Default
@@ -30,19 +29,6 @@ define Package/python-django-constance/Default
   URL:=https://github.com/jazzband/django-constance
 endef
 
-define Package/python-django-constance
-$(call Package/python-django-constance/Default)
-  DEPENDS:= \
-       +PACKAGE_python-django-constance:python \
-       python-django1
-  VARIANT:=python
-  MDEPENDS:=python-django1
-endef
-
-define Package/python-django-constance/description
-  Django live settings with pluggable backends, including Redis.
-endef
-
 define Package/python3-django-constance
 $(call Package/python-django-constance/Default)
   DEPENDS:= \
@@ -52,15 +38,11 @@ $(call Package/python-django-constance/Default)
 endef
 
 define Package/python3-django-constance/description
-$(call Package/python-django-constance/description)
+  Django live settings with pluggable backends, including Redis.
 .
 (Variant for Python3)
 endef
 
-$(eval $(call PyPackage,python-django-constance))
-$(eval $(call BuildPackage,python-django-constance))
-$(eval $(call BuildPackage,python-django-constance-src))
-
 $(eval $(call Py3Package,python3-django-constance))
 $(eval $(call BuildPackage,python3-django-constance))
 $(eval $(call BuildPackage,python3-django-constance-src))
index c391da958746664b4703ff2a5789cb84fe620a35..3bbd46958655354a15833362614b2219ac7bd445 100644 (file)
@@ -18,7 +18,6 @@ PKG_LICENSE_FILES:=LICENSE
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
 define Package/django-formtools/Default
@@ -29,20 +28,6 @@ define Package/django-formtools/Default
   URL:=https://django-formtools.readthedocs.io
 endef
 
-define Package/python-django-formtools
-$(call Package/django-formtools/Default)
-  DEPENDS:= \
-       +PACKAGE_python-django-formtools:python \
-       python-django1
-  VARIANT:=python
-  MDEPENDS:=python-django1
-endef
-
-define Package/python-django-formtools/description
-  Django "formtools" is a set of high-level abstractions for Django forms.
-  Currently for form previews and multi-step forms.
-endef
-
 define Package/python3-django-formtools
 $(call Package/django-formtools/Default)
   DEPENDS:= \
@@ -52,15 +37,12 @@ $(call Package/django-formtools/Default)
 endef
 
 define Package/python3-django-formtools/description
-$(call Package/python-django-formtools/description)
+  Django "formtools" is a set of high-level abstractions for Django forms.
+  Currently for form previews and multi-step forms.
 .
 (Variant for Python3)
 endef
 
-$(eval $(call PyPackage,python-django-formtools))
-$(eval $(call BuildPackage,python-django-formtools))
-$(eval $(call BuildPackage,python-django-formtools-src))
-
 $(eval $(call Py3Package,python3-django-formtools))
 $(eval $(call BuildPackage,python3-django-formtools))
 $(eval $(call BuildPackage,python3-django-formtools-src))
index 2ed18e8a59ded4c18177bb815f9cd73a8921b103..930be5b0d3c5be63162245f57e6ed645c1cb3b80 100644 (file)
@@ -20,7 +20,6 @@ PKG_LICENSE_FILES:=LICENSE
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
 define Package/django-jsonfield/Default
@@ -31,21 +30,6 @@ define Package/django-jsonfield/Default
   URL:=https://github.com/rpkilby/jsonfield
 endef
 
-define Package/python-django-jsonfield
-$(call Package/django-jsonfield/Default)
-  DEPENDS:= \
-       +PACKAGE_python-django-jsonfield:python \
-       python-django1 \
-       +PACKAGE_python-django-jsonfield:python-six
-  VARIANT:=python
-  MDEPENDS:=python-django1
-endef
-
-define Package/python-django-jsonfield/description
-  jsonfield is a reusable model field that allows you to store validated
-  JSON, automatically handling serialization to and from the database.
-endef
-
 define Package/python3-django-jsonfield
 $(call Package/django-jsonfield/Default)
   DEPENDS:= \
@@ -56,15 +40,12 @@ $(call Package/django-jsonfield/Default)
 endef
 
 define Package/python3-django-jsonfield/description
-$(call Package/python-django-jsonfield/description)
+  jsonfield is a reusable model field that allows you to store validated
+  JSON, automatically handling serialization to and from the database.
 .
 (Variant for Python3)
 endef
 
-$(eval $(call PyPackage,python-django-jsonfield))
-$(eval $(call BuildPackage,python-django-jsonfield))
-$(eval $(call BuildPackage,python-django-jsonfield-src))
-
 $(eval $(call Py3Package,python3-django-jsonfield))
 $(eval $(call BuildPackage,python3-django-jsonfield))
 $(eval $(call BuildPackage,python3-django-jsonfield-src))
index c240b3f49e390fbab3e779ac1043d45d41ec6d25..da3f4ee0594567c5312ee0a4a153abb0edcf5ee5 100644 (file)
@@ -20,11 +20,8 @@ PKG_LICENSE_FILES:=LICENSE
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
-PYTHON_PKG_SETUP_VARS:= \
-  PKG_VERSION="$(PKG_VERSION)"
 PYTHON3_PKG_SETUP_VARS:= \
   PKG_VERSION="$(PKG_VERSION)"
 
@@ -36,19 +33,6 @@ define Package/django-picklefield/Default
   URL:=https://github.com/gintas/django-picklefield/
 endef
 
-define Package/python-django-picklefield
-$(call Package/django-picklefield/Default)
-  DEPENDS:= \
-       +PACKAGE_python-django-picklefield:python \
-       python-django1
-  VARIANT:=python
-  MDEPENDS:=python-django1
-endef
-
-define Package/python-django-picklefield/description
-  Pickled object field for Django
-endef
-
 define Package/python3-django-picklefield
 $(call Package/django-picklefield/Default)
   DEPENDS:= \
@@ -58,15 +42,11 @@ $(call Package/django-picklefield/Default)
 endef
 
 define Package/python3-django-picklefield/description
-$(call Package/python-django-picklefield/description)
+  Pickled object field for Django
 .
 (Variant for Python3)
 endef
 
-$(eval $(call PyPackage,python-django-picklefield))
-$(eval $(call BuildPackage,python-django-picklefield))
-$(eval $(call BuildPackage,python-django-picklefield-src))
-
 $(eval $(call Py3Package,python3-django-picklefield))
 $(eval $(call BuildPackage,python3-django-picklefield))
 $(eval $(call BuildPackage,python3-django-picklefield-src))
index 20af16ee798e02aeb451bf0a3892126336942a76..0525f342052658132d3adab2f1b56c221f75a9bf 100644 (file)
@@ -21,7 +21,6 @@ PKG_LICENSE_FILES:=LICENSE.txt
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
 define Package/django-postoffice/Default
@@ -32,21 +31,6 @@ define Package/django-postoffice/Default
   URL:=https://github.com/ui/django-post_office
 endef
 
-define Package/python-django-postoffice
-$(call Package/django-postoffice/Default)
-  DEPENDS:= \
-       +PACKAGE_python-django-postoffice:python \
-       python-django1 \
-       +PACKAGE_python-django-postoffice:python-django-jsonfield
-  VARIANT:=python
-  MDEPENDS:=python-django1
-endef
-
-define Package/python-django-postoffice/description
-  A Django app to monitor and send mail asynchronously, complete with template
-  support
-endef
-
 define Package/python3-django-postoffice
 $(call Package/django-postoffice/Default)
   DEPENDS:= \
@@ -57,15 +41,12 @@ $(call Package/django-postoffice/Default)
 endef
 
 define Package/python3-django-postoffice/description
-$(call Package/python-django-postoffice/description)
+  A Django app to monitor and send mail asynchronously, complete with template
+  support
 .
 (Variant for Python3)
 endef
 
-$(eval $(call PyPackage,python-django-postoffice))
-$(eval $(call BuildPackage,python-django-postoffice))
-$(eval $(call BuildPackage,python-django-postoffice-src))
-
 $(eval $(call Py3Package,python3-django-postoffice))
 $(eval $(call BuildPackage,python3-django-postoffice))
 $(eval $(call BuildPackage,python3-django-postoffice-src))
index 896073f620d5c4e55874e6f16cd83f566f1fe26f..6006963d2d12df021cafac0d034c9fe01fa9dd16 100644 (file)
@@ -18,7 +18,6 @@ PKG_LICENSE_FILES:=LICENSE
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
 define Package/django-ranged-response/Default
@@ -29,19 +28,6 @@ define Package/django-ranged-response/Default
   URL:=https://github.com/i3thuan5/django-ranged-response
 endef
 
-define Package/python-django-ranged-response
-$(call Package/django-ranged-response/Default)
-  DEPENDS:= \
-       +PACKAGE_python-django-ranged-response:python \
-       python-django1
-  VARIANT:=python
-  MDEPENDS:=python-django1
-endef
-
-define Package/python-django-ranged-response/description
-  Modified Django FileResponse that adds Content-Range headers.
-endef
-
 define Package/python3-django-ranged-response
 $(call Package/django-ranged-response/Default)
   DEPENDS:= \
@@ -51,15 +37,11 @@ $(call Package/django-ranged-response/Default)
 endef
 
 define Package/python3-django-ranged-response/description
-$(call Package/python-django-ranged-response/description)
+  Modified Django FileResponse that adds Content-Range headers.
 .
 (Variant for Python3)
 endef
 
-$(eval $(call PyPackage,python-django-ranged-response))
-$(eval $(call BuildPackage,python-django-ranged-response))
-$(eval $(call BuildPackage,python-django-ranged-response-src))
-
 $(eval $(call Py3Package,python3-django-ranged-response))
 $(eval $(call BuildPackage,python3-django-ranged-response))
 $(eval $(call BuildPackage,python3-django-ranged-response-src))
index 5cdb76bfc5d92f89744d03938e71279053bfda2d..6c45abb73f173e3751c225a550feb0d2269c2752 100644 (file)
@@ -20,7 +20,6 @@ PKG_LICENSE_FILES:=LICENSE.md
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
 define Package/django-restframework39/Default
@@ -31,19 +30,6 @@ define Package/django-restframework39/Default
   URL:=https://www.django-rest-framework.org
 endef
 
-define Package/python-django-restframework39
-$(call Package/django-restframework39/Default)
-  DEPENDS:= \
-       +PACKAGE_python-django-restframework39:python \
-       python-django1
-  VARIANT:=python
-  MDEPENDS:=python-django1
-endef
-
-define Package/python-django-restframework39/description
-  Web APIs for Django, made easy. (3.9 series)
-endef
-
 define Package/python3-django-restframework39
 $(call Package/django-restframework39/Default)
   DEPENDS:= \
@@ -54,15 +40,11 @@ $(call Package/django-restframework39/Default)
 endef
 
 define Package/python3-django-restframework39/description
-$(call Package/python-django-restframework39/description)
+  Web APIs for Django, made easy. (3.9 series)
 .
 (Variant for Python3)
 endef
 
-$(eval $(call PyPackage,python-django-restframework39))
-$(eval $(call BuildPackage,python-django-restframework39))
-$(eval $(call BuildPackage,python-django-restframework39-src))
-
 $(eval $(call Py3Package,python3-django-restframework39))
 $(eval $(call BuildPackage,python3-django-restframework39))
 $(eval $(call BuildPackage,python3-django-restframework39-src))
index a4431aa5fb7adc55b535202ee2cfafe9246ade29..03f547a45010358c724a9b296b43c7d5dc029143 100644 (file)
@@ -22,7 +22,6 @@ 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)
@@ -35,23 +34,6 @@ define Package/django-simple-captcha/Default
   URL:=https://github.com/mbi/django-simple-captcha
 endef
 
-define Package/python-django-simple-captcha
-$(call Package/django-simple-captcha/Default)
-  DEPENDS:= \
-       +PACKAGE_python-django-simple-captcha:python \
-       +PACKAGE_python-django-simple-captcha:python-six \
-       python-django1 \
-       +PACKAGE_python-django-simple-captcha:python-pillow \
-       +PACKAGE_python-django-simple-captcha:python-django-ranged-response
-  VARIANT:=python
-  MDEPENDS:=python-django1
-endef
-
-define Package/python-django-simple-captcha/description
-  Django Simple Captcha is an extremely simple, yet highly customizable Django
-  application to add captcha images to any Django form.
-endef
-
 define Package/python3-django-simple-captcha
 $(call Package/django-simple-captcha/Default)
   DEPENDS:= \
@@ -64,15 +46,12 @@ $(call Package/django-simple-captcha/Default)
 endef
 
 define Package/python3-django-simple-captcha/description
-$(call Package/python-django-simple-captcha/description)
+  Django Simple Captcha is an extremely simple, yet highly customizable Django
+  application to add captcha images to any Django form.
 .
 (Variant for Python3)
 endef
 
-$(eval $(call PyPackage,python-django-simple-captcha))
-$(eval $(call BuildPackage,python-django-simple-captcha))
-$(eval $(call BuildPackage,python-django-simple-captcha-src))
-
 $(eval $(call Py3Package,python3-django-simple-captcha))
 $(eval $(call BuildPackage,python3-django-simple-captcha))
 $(eval $(call BuildPackage,python3-django-simple-captcha-src))
index 2e86437f7537fedd0a61cb32c819eb4e8f71373d..73872264b8b21107e8cb22fc0984fb47f24ac705 100644 (file)
@@ -20,7 +20,6 @@ PKG_LICENSE_FILES:=LICENSE
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
 define Package/django-statici18n/Default
@@ -31,21 +30,6 @@ define Package/django-statici18n/Default
   URL:=https://django-statici18n.readthedocs.io
 endef
 
-define Package/python-django-statici18n
-$(call Package/django-statici18n/Default)
-  DEPENDS:= \
-       +PACKAGE_python-django-statici18n:python \
-       python-django1 \
-       +PACKAGE_python-django-statici18n:python-django-appconf \
-       +PACKAGE_python-django-statici18n:python-six
-  VARIANT:=python
-  MDEPENDS:=python-django1
-endef
-
-define Package/python-django-statici18n/description
-  A Django app that provides helper for generating JavaScript catalog to static files.
-endef
-
 define Package/python3-django-statici18n
 $(call Package/django-statici18n/Default)
   DEPENDS:= \
@@ -57,15 +41,11 @@ $(call Package/django-statici18n/Default)
 endef
 
 define Package/python3-django-statici18n/description
-$(call Package/python-django-statici18n/description)
+  A Django app that provides helper for generating JavaScript catalog to static files.
 .
 (Variant for Python3)
 endef
 
-$(eval $(call PyPackage,python-django-statici18n))
-$(eval $(call BuildPackage,python-django-statici18n))
-$(eval $(call BuildPackage,python-django-statici18n-src))
-
 $(eval $(call Py3Package,python3-django-statici18n))
 $(eval $(call BuildPackage,python3-django-statici18n))
 $(eval $(call BuildPackage,python3-django-statici18n-src))
index 90c65d2acfa97b4cadcc5c1037416d8d0c130c1a..d21f0268b92f66e32949534266d6b4fd061b36b8 100644 (file)
@@ -18,7 +18,6 @@ PKG_LICENSE_FILES:=LICENSE
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
 define Package/django-webpack-loader/Default
@@ -29,19 +28,6 @@ define Package/django-webpack-loader/Default
   URL:=https://github.com/owais/django-webpack-loader
 endef
 
-define Package/python-django-webpack-loader
-$(call Package/django-webpack-loader/Default)
-  DEPENDS:= \
-       +PACKAGE_python-django-webpack-loader:python \
-       python-django1
-  VARIANT:=python
-  MDEPENDS:=python-django1
-endef
-
-define Package/python-django-webpack-loader/description
-  Use webpack to generate your static bundles without django’s staticfiles or opaque wrappers.
-endef
-
 define Package/python3-django-webpack-loader
 $(call Package/django-webpack-loader/Default)
   DEPENDS:= \
@@ -51,15 +37,11 @@ $(call Package/django-webpack-loader/Default)
 endef
 
 define Package/python3-django-webpack-loader/description
-$(call Package/python-django-webpack-loader/description)
+  Use webpack to generate your static bundles without django’s staticfiles or opaque wrappers.
 .
 (Variant for Python3)
 endef
 
-$(eval $(call PyPackage,python-django-webpack-loader))
-$(eval $(call BuildPackage,python-django-webpack-loader))
-$(eval $(call BuildPackage,python-django-webpack-loader-src))
-
 $(eval $(call Py3Package,python3-django-webpack-loader))
 $(eval $(call BuildPackage,python3-django-webpack-loader))
 $(eval $(call BuildPackage,python3-django-webpack-loader-src))
index e60d693aba05d0a631b199aeb661bfc6385fe719..c6be64b0f8ea947b0bca286e1deb3203c82c8ee7 100644 (file)
@@ -8,11 +8,11 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=django
-PKG_VERSION:=3.0.4
+PKG_VERSION:=3.0.5
 PKG_RELEASE:=1
 
 PYPI_NAME:=Django
-PKG_HASH:=50b781f6cbeb98f673aa76ed8e572a019a45e52bdd4ad09001072dfd91ab07c8
+PKG_HASH:=d4666c2edefa38c5ede0ec1655424c56dc47ceb04b6d8d62a7eac09db89545c1
 
 PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
 PKG_LICENSE:=BSD-3-Clause
index db260a2084a16b2907be3e1c229c1efd5d54a7c0..d3599e9621bd2fdc472660d89dcdd4300f64405a 100644 (file)
@@ -21,7 +21,6 @@ PKG_CPE_ID:=cpe:/a:djangoproject:django
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
 define Package/django1/Default
@@ -32,20 +31,6 @@ define Package/django1/Default
   URL:=https://www.djangoproject.com/
 endef
 
-define Package/python-django1
-$(call Package/django1/Default)
-  DEPENDS:= \
-       +PACKAGE_python-django1:python \
-       +PACKAGE_python-django1:python-pytz \
-       +PACKAGE_python-django1:python-django1-common
-  VARIANT:=python
-  MENU:=1
-endef
-
-define Package/python-django1/description
-  The web framework for perfectionists with deadlines (LTS 1.11 series).
-endef
-
 define Package/python3-django1
 $(call Package/django1/Default)
   DEPENDS:= \
@@ -57,7 +42,7 @@ $(call Package/django1/Default)
 endef
 
 define Package/python3-django1/description
-$(call Package/python-django1/description)
+  The web framework for perfectionists with deadlines (LTS 1.11 series).
 .
 (Variant for Python3)
 endef
@@ -67,12 +52,11 @@ $(call Package/django1/Default)
 endef
 
 define Package/python-django1-common/description
-$(call Package/python-django1/description)
+  The web framework for perfectionists with deadlines (LTS 1.11 series).
 .
 This package contains files common to both Python 2.7 and Python 3.
 endef
 
-PyPackage/python-django1/install:=:
 Py3Package/python3-django1/install:=:
 
 define Package/python-django1-common/install
@@ -80,10 +64,6 @@ define Package/python-django1-common/install
        $(INSTALL_BIN) ./files/django-admin $(1)/usr/bin
 endef
 
-$(eval $(call PyPackage,python-django1))
-$(eval $(call BuildPackage,python-django1))
-$(eval $(call BuildPackage,python-django1-src))
-
 $(eval $(call Py3Package,python3-django1))
 $(eval $(call BuildPackage,python3-django1))
 $(eval $(call BuildPackage,python3-django1-src))
index 504b082a3a3e103348c6bbddd3451d4f73fc9c85..819346896c8188c2faeb10559f5f3f6705c2a2cc 100644 (file)
@@ -20,7 +20,6 @@ PKG_LICENSE_FILES:=PKG-INFO
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
 define Package/flup/Default
@@ -31,14 +30,6 @@ define Package/flup/Default
   URL:=https://www.saddi.com/software/flup/
 endef
 
-define Package/python-flup
-$(call Package/flup/Default)
-  DEPENDS+= \
-      +PACKAGE_python-flup:python-light \
-      +PACKAGE_python-flup:python-logging
-  VARIANT:=python
-endef
-
 define Package/python3-flup
 $(call Package/flup/Default)
   DEPENDS+= \
@@ -47,20 +38,12 @@ $(call Package/flup/Default)
   VARIANT:=python3
 endef
 
-define Package/python-flup/description
-  Random assortment of WSGI servers.
-endef
-
 define Package/python3-flup/description
-$(call Package/python-flup/description)
+  Random assortment of WSGI servers.
 .
 (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 1e65f4d1e4c739f98f83a9cb465bea37e082b8f5..75f3bef5761cc1abaf3717ef4871b7f3c4dc5370 100644 (file)
@@ -8,11 +8,11 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gunicorn
-PKG_VERSION:=19.9.0
-PKG_RELEASE=2
+PKG_VERSION:=20.0.4
+PKG_RELEASE:=1
 
 PYPI_NAME:=$(PKG_NAME)
-PKG_HASH:=fa2662097c66f920f53f70621c6c58ca4a3c4d3434205e608e121b5b3b71f4f3
+PKG_HASH:=1904bb2b8a43658807108d59c3f3d56c2b6121a701161de0ddf9ad140073c626
 
 PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
 PKG_LICENSE:=MIT
@@ -20,7 +20,6 @@ PKG_LICENSE_FILES:=LICENSE
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
 define Package/gunicorn/Default
@@ -31,65 +30,32 @@ define Package/gunicorn/Default
   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)
+  TITLE:=WSGI HTTP Server for UNIX (library)
   DEPENDS:=+python3
   VARIANT:=python3
 endef
 
 define Package/python3-gunicorn/description
-$(call Package/python-gunicorn/description)
+    WSGI HTTP Server for UNIX (libraries)
 .
 (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
-
+# That means adding some empty Py3Package/gunicorn3/install rules
 define Py3Package/python3-gunicorn/install
        :
 endef
 
-define Package/gunicorn
-$(call Package/gunicorn/Default)
-  DEPENDS:=+python +python-pkg-resources +python-gunicorn
-endef
-
-define Package/gunicorn/description
-    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 Package/gunicorn3
 $(call Package/gunicorn/Default)
-  DEPENDS:=+python3 +python3-pkg-resources +python3-gunicorn
+  DEPENDS:=+python3 +python3-setuptools +python3-gunicorn
 endef
 
 define Package/gunicorn3/description
-$(call Package/gunicorn/description)
+    WSGI HTTP Server for UNIX (daemon)
 .
 (Variant for Python3)
 endef
@@ -99,17 +65,10 @@ define Package/gunicorn3/install
        $(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
+       $(LN) gunicorn3 $(1)/usr/bin/gunicorn
        $(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))
index f0ea9326bf5a01f8adb1485d3d9a58983033da3b..4d292d7f4bde4846abfe498875e96a72d989e795 100644 (file)
@@ -20,7 +20,6 @@ PKG_HASH:=1d2af392cef8c8227bd2ac3ebe3a28b25aba74fd4fa473ce106065f0b73bfe2e
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
 define Package/python-openpyxl/Default
@@ -31,18 +30,6 @@ define Package/python-openpyxl/Default
   URL:=https://openpyxl.readthedocs.org/
 endef
 
-define Package/python-openpyxl
-  $(call Package/python-openpyxl/Default)
-  DEPENDS:= \
-       +PACKAGE_python-openpyxl:python \
-       +PACKAGE_python-openpyxl:python-defusedxml \
-       +PACKAGE_python-openpyxl:python-et_xmlfile \
-       +PACKAGE_python-openpyxl:python-jdcal
-  VARIANT:=python
-  # The PROVIDES below is deprecated and should be dropped with the next version.
-  PROVIDES:=openpyxl
-endef
-
 define Package/python3-openpyxl
   $(call Package/python-openpyxl/Default)
   DEPENDS:= \
@@ -53,20 +40,12 @@ define Package/python3-openpyxl
   VARIANT:=python3
 endef
 
-define Package/python-openpyxl/description
-  A Python library to read/write Excel 2010 xlsx/xlsm files
-endef
-
 define Package/python3-openpyxl/description
-$(call Package/python-openpyxl/description)
+  A Python library to read/write Excel 2010 xlsx/xlsm files
 .
 (Variant for Python3)
 endef
 
-$(eval $(call PyPackage,python-openpyxl))
-$(eval $(call BuildPackage,python-openpyxl))
-$(eval $(call BuildPackage,python-openpyxl-src))
-
 $(eval $(call Py3Package,python3-openpyxl))
 $(eval $(call BuildPackage,python3-openpyxl))
 $(eval $(call BuildPackage,python3-openpyxl-src))
index 144939f0641ee6d1a8043ace1436cd352c221aff..bba473f68a0e6c0597be9c3938866ee0e89cdef7 100644 (file)
@@ -14,7 +14,6 @@ PKG_HASH:=8d666cef936198bc2ab47ee9b0410c94adf2ba798e5a84bf220be079ae7ab6a8
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
 
-include ../python-package.mk
 include ../python3-package.mk
 
 define Package/passlib/Default
@@ -25,37 +24,24 @@ define Package/passlib/Default
   URL:=https://bitbucket.org/ecollins/passlib
 endef
 
-define Package/python-passlib
-$(call Package/passlib/Default)
-  DEPENDS:=+PACKAGE_python-passlib:python +PACKAGE_python-passlib:python-dateutil
-  VARIANT:=python
-endef
-
 define Package/python3-passlib
 $(call Package/passlib/Default)
   DEPENDS:=+PACKAGE_python3-passlib:python3 +PACKAGE_python3-passlib:python3-dateutil
   VARIANT:=python3
 endef
 
-define Package/python-passlib/description
+define Package/python3-passlib/description
 Passlib is a password hashing library for Python 2 & 3, which provides
 cross-platform implementations of over 30 password hashing algorithms,
 as well as a framework for managing existing password hashes. It’s
 designed to be useful for a wide range of tasks, from verifying a hash
 found in /etc/shadow, to providing full-strength password hashing for
 multi-user applications.
-endef
-
-define Package/python3-passlib/description
-$(call Package/python-passlib/description)
 .
 (Variant for Python3)
 endef
 
-$(eval $(call PyPackage,python-passlib))
 $(eval $(call Py3Package,python3-passlib))
 
-$(eval $(call BuildPackage,python-passlib))
-$(eval $(call BuildPackage,python-passlib-src))
 $(eval $(call BuildPackage,python3-passlib))
 $(eval $(call BuildPackage,python3-passlib-src))
index e51fc016fac769c2d361d242bf82dea6899d4ad1..b0ec93b183eb1f5620282f10aac5480fca2f71a7 100644 (file)
@@ -7,11 +7,11 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=pillow
-PKG_VERSION:=6.2.1
+PKG_VERSION:=7.1.1
 PKG_RELEASE:=1
 
 PYPI_NAME:=Pillow
-PKG_HASH:=bf4e972a88f8841d8fdc6db1a75e0f8d763e66e3754b03006cbc3854d89f1cb1
+PKG_HASH:=0f89ddc77cf421b8cd34ae852309501458942bf370831b4a9b406156b599a14e
 
 PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
 PKG_LICENSE:=HPND
@@ -20,7 +20,6 @@ PKG_CPE_ID:=cpe:/a:python:pillow
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
 define Package/python-pillow/Default
@@ -32,24 +31,14 @@ define Package/python-pillow/Default
   DEPENDS:=+libfreetype +libjpeg +libtiff +zlib
 endef
 
-define Package/python-pillow
-$(call Package/python-pillow/Default)
-  DEPENDS+=+PACKAGE_python-pillow:python
-  VARIANT:=python
-endef
-
-define Package/python-pillow/description
-  The friendly PIL fork
-endef
-
 define Package/python3-pillow
 $(call Package/python-pillow/Default)
-  DEPENDS+=+PACKAGE_python3-pillow:python3
+  DEPENDS+=+python3
   VARIANT:=python3
 endef
 
 define Package/python3-pillow/description
-$(call Package/python-pillow/description)
+  The friendly PIL fork
 .
 (Variant for Python3)
 endef
@@ -66,12 +55,6 @@ PYTHON3_PKG_SETUP_GLOBAL_ARGS += build_ext \
        --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))
index b8000308bc684e05cb58514539a92f453b0ab524..b4745b631d8d876fdbe02fa8dc3b2f8720866663 100644 (file)
@@ -18,7 +18,6 @@ PKG_HASH:=8d59a976fb773f3e6a39c85636357c4f0e242707394cadadd9814f5cbaa20e96
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
 define Package/python-pyjwt/Default
@@ -29,32 +28,18 @@ define Package/python-pyjwt/Default
   URL:=http://github.com/jpadilla/pyjwt
 endef
 
-define Package/python-pyjwt
-  $(call Package/python-pyjwt/Default)
-  DEPENDS:=+PACKAGE_python-pyjwt:python
-  VARIANT:=python
-endef
-
 define Package/python3-pyjwt
   $(call Package/python-pyjwt/Default)
   DEPENDS:=+PACKAGE_python3-pyjwt:python3
   VARIANT:=python3
 endef
 
-define Package/python-pyjwt/description
-  A Python implementation of RFC 7519.
-endef
-
 define Package/python3-pyjwt/description
-$(call Package/python-pyjwt/description)
+  A Python implementation of RFC 7519.
 .
 (Variant for Python3)
 endef
 
-$(eval $(call PyPackage,python-pyjwt))
-$(eval $(call BuildPackage,python-pyjwt))
-$(eval $(call BuildPackage,python-pyjwt-src))
-
 $(eval $(call Py3Package,python3-pyjwt))
 $(eval $(call BuildPackage,python3-pyjwt))
 $(eval $(call BuildPackage,python3-pyjwt-src))
index fa70c8f6b97298e49f0e45f1766c57f03e22b68c..87ca5c936a17e98a5e53363b419e3b8433586023 100644 (file)
@@ -10,7 +10,7 @@ PKG_RELEASE:=2
 
 PYPI_NAME:=$(PKG_NAME)
 PKG_HASH:=e52700b5d24a846483b5ab80acd9153f8e593999c9184ffea11596288fb33de3
-PKG_BUILD_DEPENDS:=python python3 unixodbc
+PKG_BUILD_DEPENDS:=python3 unixodbc
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE.txt
 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
@@ -20,7 +20,6 @@ PKG_BUILD_DEPENDS:=unixodbc/host
 include ../pypi.mk
 include $(INCLUDE_DIR)/uclibc++.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
 define Package/python-pyodbc/Default
@@ -31,15 +30,6 @@ define Package/python-pyodbc/Default
   DEPENDS:=+unixodbc $(CXX_DEPENDS)
 endef
 
-define Package/python-pyodbc
-$(call Package/python-pyodbc/Default)
-  TITLE:=python-pyodbc
-  DEPENDS+=+PACKAGE_python-pyodbc:python-light \
-           +PACKAGE_python-pyodbc:python-logging \
-           +PACKAGE_python-pyodbc:python-openssl
-  VARIANT:=python
-endef
-
 define Package/python3-pyodbc
 $(call Package/python-pyodbc/Default)
   TITLE:=python3-pyodbc
@@ -47,21 +37,14 @@ $(call Package/python-pyodbc/Default)
   VARIANT:=python3
 endef
 
-define Package/python-pyodbc/description
+define Package/python3-pyodbc/description
 DB API Module for ODBC
 
 A Python DB API 2 module for ODBC. This project provides an up-to-date,
 convenient interface to ODBC using native data types like datetime and decimal.
-endef
-
-define Package/python3-pyodbc/description
-$(call Package/python-pyodbc/description)
 
 (Variant for Python3)
 endef
 
-$(eval $(call PyPackage,python-pyodbc))
-$(eval $(call BuildPackage,python-pyodbc))
-
 $(eval $(call Py3Package,python3-pyodbc))
 $(eval $(call BuildPackage,python3-pyodbc))
index 302eefc728b16627e1965479f382398d84f4bf10..35825e8aa47c7fa08cb3216db13b30c4cf729c34 100644 (file)
@@ -20,7 +20,6 @@ PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
 define Package/python-astral/Default
@@ -31,14 +30,6 @@ define Package/python-astral/Default
   URL:=https://github.com/sffjunkie/astral
 endef
 
-define Package/python-astral
-$(call Package/python-astral/Default)
-  DEPENDS+= \
-      +PACKAGE_python-astral:python-light \
-      +PACKAGE_python-astral:python-pytz
-  VARIANT:=python
-endef
-
 define Package/python3-astral
 $(call Package/python-astral/Default)
   DEPENDS+= \
@@ -47,20 +38,12 @@ $(call Package/python-astral/Default)
   VARIANT:=python3
 endef
 
-define Package/python-astral/description
-Astral is a python module for calculating the times of various aspects of the sun and moon.
-endef
-
 define Package/python3-astral/description
-$(call Package/python-astral/description)
+Astral is a python module for calculating the times of various aspects of the sun and moon.
 .
 (Variant for Python3)
 endef
 
-$(eval $(call PyPackage,python-astral))
-$(eval $(call BuildPackage,python-astral))
-$(eval $(call BuildPackage,python-astral-src))
-
 $(eval $(call Py3Package,python3-astral))
 $(eval $(call BuildPackage,python3-astral))
 $(eval $(call BuildPackage,python3-astral-src))
index 5936704cb5f42c83196cb393df7f871ec3843740..82fc5d4bde9cb5d0a26cb93d7931a981ee87791f 100644 (file)
@@ -20,7 +20,6 @@ PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
 define Package/python-attrs/Default
@@ -31,34 +30,20 @@ define Package/python-attrs/Default
   URL:=https://www.attrs.org/
 endef
 
-define Package/python-attrs
-$(call Package/python-attrs/Default)
-  DEPENDS:=+PACKAGE_python-attrs:python-light
-  VARIANT:=python
-endef
-
 define Package/python3-attrs
 $(call Package/python-attrs/Default)
   DEPENDS:=+PACKAGE_python3-attrs:python3-light
   VARIANT:=python3
 endef
 
-define Package/python-attrs/description
+define Package/python3-attrs/description
 attrs is an MIT-licensed Python package with class decorators that ease
 the chores of implementing the most common attribute-related object
 protocols.
-endef
-
-define Package/python3-attrs/description
-$(call Package/python-attrs/description)
 .
 (Variant for Python3)
 endef
 
-$(eval $(call PyPackage,python-attrs))
-$(eval $(call BuildPackage,python-attrs))
-$(eval $(call BuildPackage,python-attrs-src))
-
 $(eval $(call Py3Package,python3-attrs))
 $(eval $(call BuildPackage,python3-attrs))
 $(eval $(call BuildPackage,python3-attrs-src))
index 804d3c881a1b6749f19b6d1fdb7dc6b732728169..b399ec03f4976698d56f60a8e8386abed0bac50e 100644 (file)
@@ -20,11 +20,8 @@ PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
-PYTHON_PKG_SETUP_VARS:= \
-  PKG_VERSION="$(PKG_VERSION)"
 PYTHON3_PKG_SETUP_VARS:= \
   PKG_VERSION="$(PKG_VERSION)"
 
@@ -36,15 +33,6 @@ define Package/python-automat/Default
   URL:=https://github.com/glyph/Automat
 endef
 
-define Package/python-automat
-$(call Package/python-automat/Default)
-  DEPENDS:= \
-      +PACKAGE_python-automat:python-light \
-      +PACKAGE_python-automat:python-attrs \
-      +PACKAGE_python-automat:python-six
-  VARIANT:=python
-endef
-
 define Package/python3-automat
 $(call Package/python-automat/Default)
   DEPENDS:= \
@@ -54,32 +42,19 @@ $(call Package/python-automat/Default)
   VARIANT:=python3
 endef
 
-define Package/python-automat/description
+define Package/python3-automat/description
 Automat is a library for concise, idiomatic Python expression of
 finite-state automata (particularly deterministic finite-state
 transducers).
-endef
-
-define Package/python3-automat/description
-$(call Package/python-automat/description)
 .
 (Variant for Python3)
 endef
 
-define PyPackage/python-automat/filespec
-+|$(PYTHON_PKG_DIR)
--|$(PYTHON_PKG_DIR)/automat/_visualize.py
-endef
-
 define Py3Package/python3-automat/filespec
 +|$(PYTHON3_PKG_DIR)
 -|$(PYTHON3_PKG_DIR)/automat/_visualize.py
 endef
 
-$(eval $(call PyPackage,python-automat))
-$(eval $(call BuildPackage,python-automat))
-$(eval $(call BuildPackage,python-automat-src))
-
 $(eval $(call Py3Package,python3-automat))
 $(eval $(call BuildPackage,python3-automat))
 $(eval $(call BuildPackage,python3-automat-src))
index 164ed090d77f42aa4c23f042db78540f14712fd3..537b5c78baa1e88be023b6db7ddb077fd7674731 100644 (file)
@@ -12,7 +12,6 @@ PKG_LICENSE:=MIT
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
 define Package/python-awscli/Default
@@ -23,19 +22,6 @@ define Package/python-awscli/Default
   URL:=https://github.com/aws/aws-cli
 endef
 
-define Package/python-awscli
-$(call Package/python-awscli/Default)
-  DEPENDS:=+PACKAGE_python-awscli:python \
-       +PACKAGE_python-awscli:python-yaml \
-       +PACKAGE_python-awscli:python-pyasn1 \
-       +PACKAGE_python-awscli:python-botocore \
-       +PACKAGE_python-awscli:python-rsa \
-       +PACKAGE_python-awscli:python-colorama \
-       +PACKAGE_python-awscli:python-docutils \
-       +PACKAGE_python-awscli:python-s3transfer
-  VARIANT:=python
-endef
-
 define Package/python3-awscli
 $(call Package/python-awscli/Default)
   DEPENDS:=+PACKAGE_python3-awscli:python3 \
@@ -49,20 +35,12 @@ $(call Package/python-awscli/Default)
   VARIANT:=python3
 endef
 
-define Package/python-awscli/description
-This package provides a unified command line interface to Amazon Web Services.
-endef
-
 define Package/python3-awscli/description
-$(call Package/python-awscli/description)
+This package provides a unified command line interface to Amazon Web Services.
 .
 (Variant for Python3)
 endef
 
-$(eval $(call PyPackage,python-awscli))
-$(eval $(call BuildPackage,python-awscli))
-$(eval $(call BuildPackage,python-awscli-src))
-
 $(eval $(call Py3Package,python3-awscli))
 $(eval $(call BuildPackage,python3-awscli))
 $(eval $(call BuildPackage,python3-awscli-src))
index d230176b93a05f0ae064a2857a8fdd4c2d6abd59..505dbe1f99efcf0f8a4508ed31e3261bfe6fb493 100644 (file)
@@ -12,7 +12,6 @@ PKG_LICENSE:=MIT
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
 define Package/python-botocore/Default
@@ -23,17 +22,6 @@ define Package/python-botocore/Default
   URL:=https://github.com/boto/botocore
 endef
 
-define Package/python-botocore
-$(call Package/python-botocore/Default)
-  DEPENDS:=+PACKAGE_python-botocore:python \
-       +PACKAGE_python-botocore:python-urllib3 \
-       +PACKAGE_python-botocore:python-docutils \
-       +PACKAGE_python-botocore:python-dateutil \
-       +PACKAGE_python-botocore:python-jmespath \
-       +PACKAGE_python-botocore:python-requests
-  VARIANT:=python
-endef
-
 define Package/python3-botocore
 $(call Package/python-botocore/Default)
   DEPENDS:=+PACKAGE_python3-botocore:python3 \
@@ -45,21 +33,13 @@ $(call Package/python-botocore/Default)
   VARIANT:=python3
 endef
 
-define Package/python-botocore/description
+define Package/python3-botocore/description
 A low-level interface to a growing number of Amazon Web Services.
 The botocore package is the foundation for the AWS CLI as well as boto3.
-endef
-
-define Package/python3-botocore/description
-$(call Package/python-botocore/description)
 .
 (Variant for Python3)
 endef
 
-$(eval $(call PyPackage,python-botocore))
-$(eval $(call BuildPackage,python-botocore))
-$(eval $(call BuildPackage,python-botocore-src))
-
 $(eval $(call Py3Package,python3-botocore))
 $(eval $(call BuildPackage,python3-botocore))
 $(eval $(call BuildPackage,python3-botocore-src))
index 640099b717d6341de5b6b42b15f05c576d52c9b4..914bce87b9968a1ddde59a106375b4915e0539f4 100644 (file)
@@ -18,7 +18,6 @@ PKG_HASH:=25b64c7da4cd7479594d035c08c2d809eb4aab3a26e5a990ea98cc450c320f1f
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
 define Package/python-certifi/Default
@@ -29,33 +28,19 @@ define Package/python-certifi/Default
   URL:=http://certifi.io/
 endef
 
-define Package/python-certifi
-  $(call Package/python-certifi/Default)
-  DEPENDS:=+PACKAGE_python-certifi:python-light
-  VARIANT:=python
-endef
-
 define Package/python3-certifi
   $(call Package/python-certifi/Default)
   DEPENDS:=+PACKAGE_python3-certifi:python3-light
   VARIANT:=python3
 endef
 
-define Package/python-certifi/description
+define Package/python3-certifi/description
   Certifi is a carefully curated collection of Root Certificates for validating the
   trustworthiness of SSL certificates while verifying the identity of TLS hosts.
-endef
-
-define Package/python3-certifi/description
-$(call Package/python-certifi/description)
 .
 (Variant for Python3)
 endef
 
-$(eval $(call PyPackage,python-certifi))
-$(eval $(call BuildPackage,python-certifi))
-$(eval $(call BuildPackage,python-certifi-src))
-
 $(eval $(call Py3Package,python3-certifi))
 $(eval $(call BuildPackage,python3-certifi))
 $(eval $(call BuildPackage,python3-certifi-src))
index 8a97339300cd3d7efa383f5ad68f80f5edb25efa..77b5fd7d1007090f715f46903e11ff879c3e7d27 100644 (file)
@@ -20,7 +20,6 @@ PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>, Alexandru Ardelean <ardeleana
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
 define Package/python-cffi/Default
@@ -32,14 +31,6 @@ define Package/python-cffi/Default
   DEPENDS:=+libffi
 endef
 
-define Package/python-cffi
-$(call Package/python-cffi/Default)
-  DEPENDS+= \
-      +PACKAGE_python-cffi:python-light \
-      +PACKAGE_python-cffi:python-pycparser
-  VARIANT:=python
-endef
-
 define Package/python3-cffi
 $(call Package/python-cffi/Default)
   DEPENDS+= \
@@ -48,20 +39,12 @@ $(call Package/python-cffi/Default)
   VARIANT:=python3
 endef
 
-define Package/python-cffi/description
-Foreign Function Interface for Python calling C code.
-endef
-
 define Package/python3-cffi/description
-$(call Package/python-cffi/description)
+Foreign Function Interface for Python calling C code.
 .
 (Variant for Python3)
 endef
 
-$(eval $(call PyPackage,python-cffi))
-$(eval $(call BuildPackage,python-cffi))
-$(eval $(call BuildPackage,python-cffi-src))
-
 $(eval $(call Py3Package,python3-cffi))
 $(eval $(call BuildPackage,python3-cffi))
 $(eval $(call BuildPackage,python3-cffi-src))
index 8f2da9e423ca5a9dc79dd513aa8b914df4dc9af2..956491cb7fcea466451ac16769f66a654954bff1 100644 (file)
@@ -17,7 +17,6 @@ PKG_HASH:=84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
 define Package/python-chardet/Default
@@ -28,13 +27,6 @@ define Package/python-chardet/Default
   URL:=https://github.com/chardet/chardet
 endef
 
-define Package/python-chardet
-$(call Package/python-chardet/Default)
-  TITLE:=Universal encoding detector for Python 2
-  DEPENDS:=+PACKAGE_python-chardet:python
-  VARIANT:=python
-endef
-
 define Package/python3-chardet
 $(call Package/python-chardet/Default)
   TITLE:=Universal encoding detector for Python3
@@ -42,12 +34,8 @@ $(call Package/python-chardet/Default)
   VARIANT:=python3
 endef
 
-define Package/python-chardet/description
-  Universal encoding detector for Python 2 and 3
-endef
-
 define Package/python3-chardet/description
-$(call Package/python-chardet/description)
+  Universal encoding detector for Python 2 and 3
 .
 (Variant for Python3)
 endef
@@ -60,10 +48,6 @@ define Py3Package/python3-chardet/install
        done
 endef
 
-$(eval $(call PyPackage,python-chardet))
-$(eval $(call BuildPackage,python-chardet))
-$(eval $(call BuildPackage,python-chardet-src))
-
 $(eval $(call Py3Package,python3-chardet))
 $(eval $(call BuildPackage,python3-chardet))
 $(eval $(call BuildPackage,python3-chardet-src))
index 61c862dee36e148c7ced9e2391d53174e20b19bd..d81d50c7ad2b3d14d13e9892a8cee1e08999bdf4 100644 (file)
@@ -12,7 +12,6 @@ PKG_LICENSE:=MIT
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
 define Package/python-colorama/Default
@@ -23,33 +22,19 @@ define Package/python-colorama/Default
   URL:=https://github.com/tartley/colorama
 endef
 
-define Package/python-colorama
-$(call Package/python-colorama/Default)
-  DEPENDS:=+PACKAGE_python-colorama:python
-  VARIANT:=python
-endef
-
 define Package/python3-colorama
 $(call Package/python-colorama/Default)
   DEPENDS:=+PACKAGE_python3-colorama:python3
   VARIANT:=python3
 endef
 
-define Package/python-colorama/description
+define Package/python3-colorama/description
 Makes ANSI escape character sequences
 (for producing colored terminal text and cursor positioning) work under MS Windows.
-endef
-
-define Package/python3-colorama/description
-$(call Package/python-colorama/description)
 .
 (Variant for Python3)
 endef
 
-$(eval $(call PyPackage,python-colorama))
-$(eval $(call BuildPackage,python-colorama))
-$(eval $(call BuildPackage,python-colorama-src))
-
 $(eval $(call Py3Package,python3-colorama))
 $(eval $(call BuildPackage,python3-colorama))
 $(eval $(call BuildPackage,python3-colorama-src))
index e26705f4f2c5ec360bd2cbbc33b1a6b2fa824eea..c0efca096a73ec2582a70a13a19ca2b3efda9a5b 100644 (file)
@@ -20,7 +20,6 @@ PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
 define Package/python-constantly/Default
@@ -31,34 +30,20 @@ define Package/python-constantly/Default
   URL:=https://github.com/twisted/constantly
 endef
 
-define Package/python-constantly
-$(call Package/python-constantly/Default)
-  DEPENDS:=+PACKAGE_python-constantly:python-light
-  VARIANT:=python
-endef
-
 define Package/python3-constantly
 $(call Package/python-constantly/Default)
   DEPENDS:=+PACKAGE_python3-constantly:python3-light
   VARIANT:=python3
 endef
 
-define Package/python-constantly/description
+define Package/python3-constantly/description
 A library that provides symbolic constant support. It includes
 collections and constants with text, numeric, and bit flag values.
 Originally twisted.python.constants from the Twisted project.
-endef
-
-define Package/python3-constantly/description
-$(call Package/python-constantly/description)
 .
 (Variant for Python3)
 endef
 
-$(eval $(call PyPackage,python-constantly))
-$(eval $(call BuildPackage,python-constantly))
-$(eval $(call BuildPackage,python-constantly-src))
-
 $(eval $(call Py3Package,python3-constantly))
 $(eval $(call BuildPackage,python3-constantly))
 $(eval $(call BuildPackage,python3-constantly-src))
diff --git a/lang/python/python-crcmod/Makefile b/lang/python/python-crcmod/Makefile
deleted file mode 100644 (file)
index 818fa72..0000000
+++ /dev/null
@@ -1,49 +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:=python-crcmod
-PKG_VERSION:=1.7
-PKG_RELEASE:=1
-PKG_MAINTAINER:=Micke Prag <micke.prag@telldus.se>
-PKG_LICENSE:=MIT
-
-PYPI_NAME:=crcmod
-PKG_HASH:=dc7051a0db5f2bd48665a990d3ec1cc305a466a77358ca4492826f41f283601e
-
-PKG_BUILD_DEPENDS:=python
-
-include ../pypi.mk
-include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
-
-define Package/python-crcmod
-  SUBMENU:=Python
-  SECTION:=lang
-  CATEGORY:=Languages
-  TITLE:=python-crcmod
-  URL:=http://crcmod.sourceforge.net/
-  DEPENDS:=+python-light
-endef
-
-define Package/python-crcmod/description
-  The software in this package is a Python module for generating objects that compute the Cyclic Redundancy Check (CRC). There is no attempt in this package to explain how the CRC works. There are a number of resources on the web that give a good explanation of the algorithms. Just do a Google search for "crc calculation" and browse till you find what you need. Another resource can be found in chapter 20 of the book "Numerical Recipes in C" by Press et. al.
-endef
-
-define Build/Compile
-       $(call Build/Compile/PyMod,,install --prefix="$(PKG_INSTALL_DIR)/usr")
-endef
-
-define Package/python-crcmod/install
-       $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
-       $(CP) \
-           $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
-           $(1)$(PYTHON_PKG_DIR)
-endef
-
-$(eval $(call BuildPackage,python-crcmod))
index 94eb78a45e62455f551ef189c4bee7234733a615..8ee28e025c8f9aaba0bf316804527b603454028b 100644 (file)
@@ -21,13 +21,8 @@ PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
-PYTHON_PKG_SETUP_ARGS:=
-PYTHON_PKG_SETUP_VARS:= \
-  CONFIG_BIG_ENDIAN="$(CONFIG_BIG_ENDIAN)"
-
 PYTHON3_PKG_SETUP_ARGS:=
 PYTHON3_PKG_SETUP_VARS:= \
   CONFIG_BIG_ENDIAN="$(CONFIG_BIG_ENDIAN)"
@@ -41,33 +36,19 @@ define Package/python-crypto/Default
   DEPENDS:=+libgmp
 endef
 
-define Package/python-crypto
-$(call Package/python-crypto/Default)
-  DEPENDS+=+PACKAGE_python-crypto:python
-  VARIANT:=python
-endef
-
 define Package/python3-crypto
 $(call Package/python-crypto/Default)
   DEPENDS+=+PACKAGE_python3-crypto:python3
   VARIANT:=python3
 endef
 
-define Package/python-crypto/description
+define Package/python3-crypto/description
 A collection of both secure hash functions (such as MD5 and SHA),
 and various encryption algorithms (AES, DES, IDEA, RSA, ElGamal, etc.).
-endef
-
-define Package/python3-crypto/description
-$(call Package/python-crypto/description)
 .
 (Variant for Python3)
 endef
 
-$(eval $(call PyPackage,python-crypto))
-$(eval $(call BuildPackage,python-crypto))
-$(eval $(call BuildPackage,python-crypto-src))
-
 $(eval $(call Py3Package,python3-crypto))
 $(eval $(call BuildPackage,python3-crypto))
 $(eval $(call BuildPackage,python3-crypto-src))
index f6d1e88a946be0a9edbac8e5be8e309544691b3d..2e2d9f5f778b3648f637f302f55dab28630884c8 100644 (file)
@@ -18,13 +18,8 @@ PKG_CPE_ID:=cpe:/a:pycryptodome:pycryptodome
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
-PYTHON_PKG_SETUP_ARGS:=
-PYTHON_PKG_SETUP_VARS:= \
-  CONFIG_BIG_ENDIAN="$(CONFIG_BIG_ENDIAN)"
-
 PYTHON3_PKG_SETUP_ARGS:=
 PYTHON3_PKG_SETUP_VARS:= \
   CONFIG_BIG_ENDIAN="$(CONFIG_BIG_ENDIAN)"
@@ -38,13 +33,6 @@ define Package/python-cryptodome/Default
   DEPENDS:=+libgmp
 endef
 
-define Package/python-cryptodome
-$(call Package/python-cryptodome/Default)
-  DEPENDS+=+PACKAGE_python-cryptodome:python
-  VARIANT:=python
-  CONFLICTS:=python-crypto
-endef
-
 define Package/python3-cryptodome
 $(call Package/python-cryptodome/Default)
   DEPENDS+=+PACKAGE_python3-cryptodome:python3
@@ -52,21 +40,13 @@ $(call Package/python-cryptodome/Default)
   CONFLICTS:=python3-crypto
 endef
 
-define Package/python-cryptodome/description
+define Package/python3-cryptodome/description
 PyCryptodome is a self-contained Python package of low-level
 cryptographic primitives.
-endef
-
-define Package/python3-cryptodome/description
-$(call Package/python-cryptodome/description)
 .
 (Variant for Python3)
 endef
 
-$(eval $(call PyPackage,python-cryptodome))
-$(eval $(call BuildPackage,python-cryptodome))
-$(eval $(call BuildPackage,python-cryptodome-src))
-
 $(eval $(call Py3Package,python3-cryptodome))
 $(eval $(call BuildPackage,python3-cryptodome))
 $(eval $(call BuildPackage,python3-cryptodome-src))
index 10c68e7d278ad6ee2fbb40be6cd789db5c100285..191d8083b1c4b072bb94bb3b8e74cbef4fe8526e 100644 (file)
@@ -17,13 +17,8 @@ PKG_MAINTAINER:=Richard Yu <yurichard3839@gmail.com>
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
-PYTHON_PKG_SETUP_ARGS:=
-PYTHON_PKG_SETUP_VARS:= \
-  CONFIG_BIG_ENDIAN="$(CONFIG_BIG_ENDIAN)"
-
 PYTHON3_PKG_SETUP_ARGS:=
 PYTHON3_PKG_SETUP_VARS:= \
   CONFIG_BIG_ENDIAN="$(CONFIG_BIG_ENDIAN)"
@@ -37,33 +32,19 @@ define Package/python-cryptodomex/Default
   DEPENDS:=+libgmp
 endef
 
-define Package/python-cryptodomex
-$(call Package/python-cryptodomex/Default)
-  DEPENDS+=+PACKAGE_python-cryptodomex:python
-  VARIANT:=python
-endef
-
 define Package/python3-cryptodomex
 $(call Package/python-cryptodomex/Default)
   DEPENDS+=+PACKAGE_python3-cryptodomex:python3
   VARIANT:=python3
 endef
 
-define Package/python-cryptodomex/description
+define Package/python3-cryptodomex/description
 PyCryptodome is a self-contained Python package of low-level
 cryptographic primitives.
-endef
-
-define Package/python3-cryptodomex/description
-$(call Package/python-cryptodomex/description)
 .
 (Variant for Python3)
 endef
 
-$(eval $(call PyPackage,python-cryptodomex))
-$(eval $(call BuildPackage,python-cryptodomex))
-$(eval $(call BuildPackage,python-cryptodomex-src))
-
 $(eval $(call Py3Package,python3-cryptodomex))
 $(eval $(call BuildPackage,python3-cryptodomex))
 $(eval $(call BuildPackage,python3-cryptodomex-src))
index d7981d37df4f29c3cd041a16d3e73b3cbcc74d25..6d52596b5f215c8ade2b4e8904403d651a3ffffa 100644 (file)
@@ -8,11 +8,11 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-cryptography
-PKG_VERSION:=2.8
+PKG_VERSION:=2.9
 PKG_RELEASE:=1
 
 PYPI_NAME:=cryptography
-PKG_HASH:=3cda1f0ed8747339bbdf71b9f38ca74c7b592f24f65cdb3ab3765e4b02871651
+PKG_HASH:=0cacd3ef5c604b8e5f59bf2582c076c98a37fe206b31430d0cd08138aff0986e
 
 PKG_LICENSE:=Apache-2.0 BSD-3-Clause
 PKG_LICENSE_FILES:=LICENSE.APACHE LICENSE.BSD
@@ -20,12 +20,10 @@ PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>, Alexandru Ardelean <ardeleana
 
 PKG_BUILD_DEPENDS:=libffi/host
 
-HOST_PYTHON_PACKAGE_BUILD_DEPENDS:="cffi>=1.8,!=1.11.3"
 HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:="cffi>=1.8,!=1.11.3"
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
 define Package/python-cryptography/Default
@@ -37,17 +35,6 @@ define Package/python-cryptography/Default
   DEPENDS:=+libopenssl
 endef
 
-define Package/python-cryptography
-$(call Package/python-cryptography/Default)
-  DEPENDS+= \
-      +PACKAGE_python-cryptography:python \
-      +PACKAGE_python-cryptography:python-cffi \
-      +PACKAGE_python-cryptography:python-enum34 \
-      +PACKAGE_python-cryptography:python-ipaddress \
-      +PACKAGE_python-cryptography:python-six
-  VARIANT:=python
-endef
-
 define Package/python3-cryptography
 $(call Package/python-cryptography/Default)
   DEPENDS+= \
@@ -57,22 +44,14 @@ $(call Package/python-cryptography/Default)
   VARIANT:=python3
 endef
 
-define Package/python-cryptography/description
+define Package/python3-cryptography/description
 cryptography is a package which provides cryptographic recipes and
 primitives to Python developers.  Our goal is for it to be your "cryptographic
 standard library". It supports Python 2.6-2.7, Python 3.3+, and PyPy 2.6+.
-endef
-
-define Package/python3-cryptography/description
-$(call Package/python-cryptography/description)
 .
 (Variant for Python3)
 endef
 
-$(eval $(call PyPackage,python-cryptography))
-$(eval $(call BuildPackage,python-cryptography))
-$(eval $(call BuildPackage,python-cryptography-src))
-
 $(eval $(call Py3Package,python3-cryptography))
 $(eval $(call BuildPackage,python3-cryptography))
 $(eval $(call BuildPackage,python3-cryptography-src))
diff --git a/lang/python/python-cryptography/patches/001-disable-setup-requirements.patch b/lang/python/python-cryptography/patches/001-disable-setup-requirements.patch
deleted file mode 100644 (file)
index ea257ad..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/setup.py
-+++ b/setup.py
-@@ -243,6 +243,7 @@ class DummyPyTest(test):
- with open(os.path.join(base_dir, "README.rst")) as f:
-     long_description = f.read()
-+setup_requirements=[]
- setup(
-     name=about["__title__"],
index 9ca4845fa2ff2d36b577dfdd1854016495625b6c..8248c9bd71b42b41bd92f546f1e33f7a1e1b084c 100644 (file)
@@ -17,7 +17,6 @@ PKG_LICENSE_FILES:=COPYING-LGPL
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
 define Package/python-curl/Default
@@ -29,16 +28,6 @@ define Package/python-curl/Default
   DEPENDS:=+libcurl
 endef
 
-define Package/python-curl
-$(call Package/python-curl/Default)
-  DEPENDS+=+PACKAGE_python-curl:python
-  VARIANT:=python
-endef
-
-define Package/python-curl/description
-PycURL is a Python interface to libcurl, the multiprotocol file transfer library.
-endef
-
 define Package/python3-curl
 $(call Package/python-curl/Default)
   DEPENDS+=+PACKAGE_python3-curl:python3
@@ -46,38 +35,29 @@ $(call Package/python-curl/Default)
 endef
 
 define Package/python3-curl/description
-$(call Package/python-curl/description)
+PycURL is a Python interface to libcurl, the multiprotocol file transfer library.
 .
 (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
 endif
 
 ifdef CONFIG_LIBCURL_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
 endif
 
 ifdef CONFIG_LIBCURL_WOLFSSL
-  PYTHON_PKG_SETUP_ARGS+=--with-wolfssl
   PYTHON3_PKG_SETUP_ARGS+=--with-wolfssl
 endif
 
-$(eval $(call PyPackage,python-curl))
-$(eval $(call BuildPackage,python-curl))
-$(eval $(call BuildPackage,python-curl-src))
-
 $(eval $(call Py3Package,python3-curl))
 $(eval $(call BuildPackage,python3-curl))
 $(eval $(call BuildPackage,python3-curl-src))
index 8b5601eaf89804da530738d186d71a9b277324bd..5427f177275fbe73a29a7dd297770f763ed89e66 100644 (file)
@@ -19,7 +19,6 @@ PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
 
-include ../python-package.mk
 include ../python3-package.mk
 
 define Package/python-dateutil/Default
@@ -30,16 +29,6 @@ define Package/python-dateutil/Default
   URL:=https://dateutil.readthedocs.org/
 endef
 
-define Package/python-dateutil
-$(call Package/python-dateutil/Default)
-  DEPENDS:=+PACKAGE_python-dateutil:python +PACKAGE_python-dateutil:python-six
-  VARIANT:=python
-endef
-
-define Package/python-dateutil/description
-  Extensions to the standard Python datetime module
-endef
-
 define Package/python3-dateutil
 $(call Package/python-dateutil/Default)
   DEPENDS:=+PACKAGE_python3-dateutil:python3 +PACKAGE_python3-dateutil:python3-six
@@ -47,14 +36,11 @@ $(call Package/python-dateutil/Default)
 endef
 
 define Package/python3-dateutil/description
-$(call Package/python-dateutil/description)
+  Extensions to the standard Python datetime module
 .
 (Variant for Python3)
 endef
 
-$(eval $(call PyPackage,python-dateutil))
-$(eval $(call BuildPackage,python-dateutil))
-$(eval $(call BuildPackage,python-dateutil-src))
 $(eval $(call Py3Package,python3-dateutil))
 $(eval $(call BuildPackage,python3-dateutil))
 $(eval $(call BuildPackage,python3-dateutil-src))
index 2057e0fa255a39b172880293f943bf13442736a7..a7476defa28f5daa5218447699e9fc12093f5aab 100644 (file)
@@ -18,7 +18,6 @@ PKG_HASH:=f684034d135af4c6cbb949b8a4d2ed61634515257a67299e5f940fbaa34377f5
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
 define Package/python-defusedxml/Default
@@ -29,15 +28,6 @@ define Package/python-defusedxml/Default
   URL:=https://github.com/tiran/defusedxml
 endef
 
-define Package/python-defusedxml
-  $(call Package/python-defusedxml/Default)
-  DEPENDS:= \
-       +PACKAGE_python-defusedxml:python-light \
-       +PACKAGE_python-defusedxml:python-codecs \
-       +PACKAGE_python-defusedxml:python-xml
-  VARIANT:=python
-endef
-
 define Package/python3-defusedxml
   $(call Package/python-defusedxml/Default)
   DEPENDS:= \
@@ -46,21 +36,13 @@ define Package/python3-defusedxml
   VARIANT:=python3
 endef
 
-define Package/python-defusedxml/description
+define Package/python3-defusedxml/description
   The defusedxml package contains several Python-only workarounds and fixes for
   denial of service and other vulnerabilities in Python’s XML libraries.
-endef
-
-define Package/python3-defusedxml/description
-$(call Package/python-defusedxml/description)
 .
 (Variant for Python3)
 endef
 
-$(eval $(call PyPackage,python-defusedxml))
-$(eval $(call BuildPackage,python-defusedxml))
-$(eval $(call BuildPackage,python-defusedxml-src))
-
 $(eval $(call Py3Package,python3-defusedxml))
 $(eval $(call BuildPackage,python3-defusedxml))
 $(eval $(call BuildPackage,python3-defusedxml-src))
index bb93b85e5ef214ca85bce2f35665eff4cc489282..a7837131aa9162f98065909de0af1087f35c681d 100644 (file)
@@ -23,7 +23,6 @@ PKG_CPE_ID:=cpe:/a:debian:python-dns
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-dnspython-$(PKG_VERSION)
 
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
 PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
@@ -36,16 +35,6 @@ define Package/python-dns/Default
   URL:=http://www.dnspython.org/
 endef
 
-define Package/python-dns
-$(call Package/python-dns/Default)
-  DEPENDS:=+PACKAGE_python-dns:python
-  VARIANT:=python
-endef
-
-define Package/python-dns/description
- dnspython is a DNS toolkit for Python. It supports almost all record types. It can be used for queries, zone transfers, and dynamic updates. It supports TSIG authenticated messages and EDNS0.
-endef
-
 define Package/python3-dns
 $(call Package/python-dns/Default)
   DEPENDS:=+PACKAGE_python3-dns:python3
@@ -53,14 +42,11 @@ $(call Package/python-dns/Default)
 endef
 
 define Package/python3-dns/description
-$(call Package/python-dns/description)
+ dnspython is a DNS toolkit for Python. It supports almost all record types. It can be used for queries, zone transfers, and dynamic updates. It supports TSIG authenticated messages and EDNS0.
 .
 (Variant for Python3)
 endef
 
-$(eval $(call PyPackage,python-dns))
-$(eval $(call BuildPackage,python-dns))
-$(eval $(call BuildPackage,python-dns-src))
 $(eval $(call Py3Package,python3-dns))
 $(eval $(call BuildPackage,python3-dns))
 $(eval $(call BuildPackage,python3-dns-src))
index 060ef552c8d0cfe0984cb4a0c463ae2174ce488f..4cc9c2534897729cec549b3ced28fcaa5b3f4363 100644 (file)
@@ -12,7 +12,6 @@ PKG_LICENSE:=MIT
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
 define Package/python-docutils/Default
@@ -23,37 +22,22 @@ define Package/python-docutils/Default
   URL:=http://docutils.sourceforge.net
 endef
 
-define Package/python-docutils
-$(call Package/python-docutils/Default)
-  DEPENDS:=+PACKAGE_python-docutils:python
-  VARIANT:=python
-endef
-
 define Package/python3-docutils
 $(call Package/python-docutils/Default)
   DEPENDS:=+PACKAGE_python3-docutils:python3
   VARIANT:=python3
 endef
 
-define Package/python-docutils/description
+define Package/python3-docutils/description
 Docutils is a modular system for processing documentation into useful formats,
 such as HTML, XML, and LaTeX. For input Docutils supports reStructuredText,
 an easy-to-read, what-you-see-is-what-you-get plaintext markup syntax.
-endef
-
-define Package/python3-docutils/description
-$(call Package/python-docutils/description)
 .
 (Variant for Python3)
 endef
 
-PYTHON_PKG_SETUP_ARGS:=
 PYTHON3_PKG_SETUP_ARGS:=
 
-$(eval $(call PyPackage,python-docutils))
-$(eval $(call BuildPackage,python-docutils))
-$(eval $(call BuildPackage,python-docutils-src))
-
 $(eval $(call Py3Package,python3-docutils))
 $(eval $(call BuildPackage,python3-docutils))
 $(eval $(call BuildPackage,python3-docutils-src))
diff --git a/lang/python/python-dpkt/Makefile b/lang/python/python-dpkt/Makefile
deleted file mode 100644 (file)
index 1ca4908..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-#
-# Copyright (C) 2017 Andrew McConachie
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=python-dpkt
-PKG_VERSION:=1.9.2
-PKG_RELEASE:=1
-
-PYPI_NAME:=dpkt
-PKG_HASH:=52a92ecd5ca04d5bd852bb11cb2eac4bbe38b42a7c472e0d950eeb9f82a81e54
-
-PKG_MAINTAINER:=Andrew McConachie <andrew@depht.com>
-PKG_LICENSE:=BSD-3-Clause
-PKG_LICENSE_FILES:=LICENSE
-
-include ../pypi.mk
-include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
-
-define Package/python-dpkt
-       SECTION:=language-python
-       CATEGORY:=Languages
-       SUBMENU:=Python
-       TITLE:=python-dpkt
-       URL:=https://dpkt.readthedocs.io/en/latest/
-       DEPENDS:=+python
-endef
-
-define Package/python-dpkt/description
-  dpkt is a python module for fast, simple packet creation / parsing, with definitions for the basic TCP/IP protocols
-  https://pypi.python.org/pypi/dpkt
-  https://github.com/kbandla/dpkt
-endef
-
-define Build/Compile
-       $(call Build/Compile/PyMod,,\
-               install --prefix=/usr --root="$(PKG_INSTALL_DIR)" \
-       )
-endef
-
-$(eval $(call PyPackage,python-dpkt))
-$(eval $(call BuildPackage,python-dpkt))
diff --git a/lang/python/python-egenix-mx-base/Makefile b/lang/python/python-egenix-mx-base/Makefile
deleted file mode 100644 (file)
index dfb669b..0000000
+++ /dev/null
@@ -1,47 +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:=python-egenix-mx-base
-PKG_VERSION:=3.2.9
-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_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
-  SECTION:=lang
-  CATEGORY:=Languages
-  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
- The eGenix.com mx Base Distribution for Python is a collection
- of professional quality software tools which enhance Python's
- usability in many important areas such as fast text searching,
- date/time processing and high speed data types.
-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))
diff --git a/lang/python/python-enum34/Makefile b/lang/python/python-enum34/Makefile
deleted file mode 100644 (file)
index f988e2f..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-#
-# Copyright (C) 2015-2018 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=python-enum34
-PKG_VERSION:=1.1.10
-PKG_RELEASE:=1
-
-PYPI_NAME:=enum34
-PKG_HASH:=cce6a7477ed816bd2542d03d53db9f0db935dd013b70f336a95c73979289f248
-
-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 ../pypi.mk
-include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
-
-define Package/python-enum34/Default
-  SECTION:=lang
-  CATEGORY:=Languages
-  SUBMENU:=Python
-  TITLE:=Backported Python 3.4 enum
-  URL:=https://bitbucket.org/stoneleaf/enum34
-endef
-
-define Package/python-enum34
-$(call Package/python-enum34/Default)
-  DEPENDS:=+PACKAGE_python-enum34:python-light
-  VARIANT:=python
-endef
-
-define Package/python-enum34/description
-enum34 is the new Python stdlib enum module available in Python 3.4
-backported for previous versions of Python from 2.4 to 3.3.
-endef
-
-define PyPackage/python-enum34/filespec
-+|$(PYTHON_PKG_DIR)
--|$(PYTHON_PKG_DIR)/enum/test.py
-endef
-
-$(eval $(call PyPackage,python-enum34))
-$(eval $(call BuildPackage,python-enum34))
-$(eval $(call BuildPackage,python-enum34-src))
diff --git a/lang/python/python-enum34/patches/001-omit-docs.patch b/lang/python/python-enum34/patches/001-omit-docs.patch
deleted file mode 100644 (file)
index 85faa0e..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
---- a/setup.py
-+++ b/setup.py
-@@ -71,15 +71,6 @@ data = dict(
-         version='1.1.10',\r
-         url='https://bitbucket.org/stoneleaf/enum34',\r
-         packages=packages,\r
--        package_data={\r
--            'enum' : [\r
--                'LICENSE',\r
--                'README',\r
--                'doc/enum.rst',\r
--                'doc/enum.pdf',\r
--                'test.py',\r
--                ]\r
--            },\r
-         license='BSD License',\r
-         description='Python 3.4 Enum backported to 3.3, 3.2, 3.1, 2.7, 2.6, 2.5, and 2.4',\r
-         long_description=long_desc,\r
index 426337d6d494696bf9534f7835084e5b56c9a3ab..6266e66276186ee13347b24710ae1c0db09c844b 100644 (file)
@@ -17,7 +17,6 @@ PKG_HASH:=614d9722d572f6246302c4491846d2c393c199cfa4edc9af593437691683335b
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
 define Package/python-et_xmlfile/Default
@@ -28,14 +27,6 @@ define Package/python-et_xmlfile/Default
   URL:=https://bitbucket.org/openpyxl/et_xmlfile
 endef
 
-define Package/python-et_xmlfile
-$(call Package/python-et_xmlfile/Default)
-  DEPENDS:= \
-       +PACKAGE_python-et_xmlfile:python-light \
-       +PACKAGE_python-et_xmlfile:python-lxml
-  VARIANT:=python
-endef
-
 define Package/python3-et_xmlfile
 $(call Package/python-et_xmlfile/Default)
   DEPENDS:= \
@@ -44,22 +35,14 @@ $(call Package/python-et_xmlfile/Default)
   VARIANT:=python3
 endef
 
-define Package/python-et_xmlfile/description
+define Package/python3-et_xmlfile/description
   An implementation of lxml.xmlfile for the standard library.
   It is based upon the xmlfile module from lxml with the aim of
   allowing code to be developed that will work with both libraries.
-endef
-
-define Package/python3-et_xmlfile/description
-$(call Package/python-et_xmlfile/description)
 .
 (Variant for Python3)
 endef
 
-$(eval $(call PyPackage,python-et_xmlfile))
-$(eval $(call BuildPackage,python-et_xmlfile))
-$(eval $(call BuildPackage,python-et_xmlfile-src))
-
 $(eval $(call Py3Package,python3-et_xmlfile))
 $(eval $(call BuildPackage,python3-et_xmlfile))
 $(eval $(call BuildPackage,python3-et_xmlfile-src))
index 2f7ad030d71220a9cc9261d4920fcc6ea50170e2..037d26c92ec6592f055020536a0995db47840b49 100644 (file)
@@ -20,7 +20,6 @@ PKG_HASH:=b1c649b4fed7252711011da235782b2c260b32e004058d62473471e5cd30634d
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
 define Package/python-evdev/Default
@@ -30,15 +29,6 @@ define Package/python-evdev/Default
   URL:=https://github.com/gvalkov/python-evdev
 endef
 
-define Package/python-evdev
-$(call Package/python-evdev/Default)
-  TITLE:=python-evdev
-  DEPENDS:= \
-     +PACKAGE_python-evdev:python-light \
-     +PACKAGE_python-evdev:python-ctypes
-  VARIANT:=python
-endef
-
 define Package/python3-evdev
 $(call Package/python-evdev/Default)
   TITLE:=python3-evdev
@@ -48,13 +38,8 @@ $(call Package/python-evdev/Default)
   VARIANT:=python3
 endef
 
-
-define Package/python-evdev/description
-       Bindings to the Linux input handling subsystem
-endef
-
 define Package/python3-evdev/description
-$(call Package/python-evdev/description)
+       Bindings to the Linux input handling subsystem
 .
 (Variant for Python3)
 endef
@@ -66,12 +51,6 @@ PYTHON3_PKG_SETUP_GLOBAL_ARGS:= \
        --evdev-headers="$(LINUX_EVDEV_HEADERS)" \
        build_ext
 
-PYTHON_PKG_SETUP_GLOBAL_ARGS:=$(PYTHON3_PKG_SETUP_GLOBAL_ARGS)
-
-$(eval $(call PyPackage,python-evdev))
-$(eval $(call BuildPackage,python-evdev))
-$(eval $(call BuildPackage,python-evdev-src))
-
 $(eval $(call Py3Package,python3-evdev))
 $(eval $(call BuildPackage,python3-evdev))
 $(eval $(call BuildPackage,python3-evdev-src))
diff --git a/lang/python/python-futures/Makefile b/lang/python/python-futures/Makefile
deleted file mode 100644 (file)
index ba56053..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=futures
-PKG_VERSION:=3.2.0
-PKG_RELEASE:=1
-
-PYPI_NAME:=$(PKG_NAME)
-PKG_HASH:=9ec02aa7d674acb8618afb127e27fde7fc68994c0437ad759fa094a574adb265
-
-PKG_MAINTAINER:=Daniel Danzberger <daniel@dd-wrt.com>
-PKG_LICENSE:=MIT
-
-include ../pypi.mk
-include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
-
-define Package/python-futures
-  SUBMENU:=Python
-  SECTION:=lang
-  CATEGORY:=Languages
-  TITLE:=futures
-  URL:=https://github.com/agronholm/pythonfutures
-  DEPENDS:=+python
-  VARIANT:=python
-endef
-
-define Package/python-futures/description
-  This is a backport of the concurrent.futures standard library module to Python 2.
-  It should not be installed on Python 3, although there should be no harm in doing so,
-  as the standard library takes precedence over third party libraries.
-endef
-
-$(eval $(call PyPackage,python-futures))
-$(eval $(call BuildPackage,python-futures))
-$(eval $(call BuildPackage,python-futures-src))
index 81f602c7c776f91cd2902b46240ded95fab6a358..c12e341c74b41702c383a6312ea5c75d6f43f1c9 100644 (file)
@@ -21,10 +21,8 @@ PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
-PYTHON_PKG_SETUP_ARGS:=--nompfr
 PYTHON3_PKG_SETUP_ARGS:=--nompfr
 
 define Package/python-gmpy2/Default
@@ -36,19 +34,13 @@ define Package/python-gmpy2/Default
   DEPENDS:=+libgmp
 endef
 
-define Package/python-gmpy2
-$(call Package/python-gmpy2/Default)
-  DEPENDS+=+PACKAGE_python-gmpy2:python-light
-  VARIANT:=python
-endef
-
 define Package/python3-gmpy2
 $(call Package/python-gmpy2/Default)
   DEPENDS+=+PACKAGE_python3-gmpy2:python3-light
   VARIANT:=python3
 endef
 
-define Package/python-gmpy2/description
+define Package/python3-gmpy2/description
 gmpy2 is a C-coded Python extension module that supports multiple-precision
 arithmetic. gmpy2 is the successor to the original gmpy module. The gmpy module
 only supported the GMP multiple-precision library. gmpy2 adds support for the
@@ -56,18 +48,10 @@ MPFR (correctly rounded real floating-point arithmetic) and MPC (correctly
 rounded complex floating-point arithmetic) libraries. gmpy2 also updates the
 API and naming conventions to be more consistent and support the additional
 functionality.
-endef
-
-define Package/python3-gmpy2/description
-$(call Package/python-gmpy2/description)
 .
 (Variant for Python3)
 endef
 
-$(eval $(call PyPackage,python-gmpy2))
-$(eval $(call BuildPackage,python-gmpy2))
-$(eval $(call BuildPackage,python-gmpy2-src))
-
 $(eval $(call Py3Package,python3-gmpy2))
 $(eval $(call BuildPackage,python3-gmpy2))
 $(eval $(call BuildPackage,python3-gmpy2-src))
index 54a827e95b575c86788eb50e7e36593afd89a504..53f716547e89c27f1ee30176d57dde0cf4e069cc 100644 (file)
@@ -18,7 +18,6 @@ PKG_CPE_ID:=cpe:/a:python-gnupg_project:python-gnupg
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
 define Package/python-gnupg/Default
@@ -29,13 +28,6 @@ define Package/python-gnupg/Default
   DEPENDS:=+gnupg
 endef
 
-define Package/python-gnupg
-$(call Package/python-gnupg/Default)
-  TITLE:=python-pyodbc
-  DEPENDS+=+PACKAGE_python-gnupg:python-light
-  VARIANT:=python
-endef
-
 define Package/python3-gnupg
 $(call Package/python-gnupg/Default)
   TITLE:=python3-gnupg
@@ -43,7 +35,7 @@ $(call Package/python-gnupg/Default)
   VARIANT:=python3
 endef
 
-define Package/python-gnupg/description
+define Package/python3-gnupg/description
 A Python wrapper for GnuPG
 
 This module allows easy access to GnuPG.s key management, encryption
@@ -53,29 +45,15 @@ and sanitised, and therefore this module should be safe to use in
 networked applications requiring direct user input. It is intended for
 use on Windows, MacOS X, BSD, or Linux, with Python 2.6, Python 2.7,
 Python 3.3, Python 3.4, or PyPy.
-endef
-
-define Package/python3-gnupg/description
-$(call Package/python-gnupg/description)
 
 (Variant for Python3)
 endef
 
-define PyBuild/Compile
-       $(call Build/Compile/PyMod,,\
-               install --prefix="/usr" --root="$(PKG_INSTALL_DIR)" \
-       )
-endef
-
 define Py3Build/Compile
        $(call Build/Compile/Py3Mod,,\
                install --prefix="/usr" --root="$(PKG_INSTALL_DIR)" \
        )
 endef
 
-
-$(eval $(call PyPackage,python-gnupg))
-$(eval $(call BuildPackage,python-gnupg))
-
 $(eval $(call Py3Package,python3-gnupg))
 $(eval $(call BuildPackage,python3-gnupg))
diff --git a/lang/python/python-host.mk b/lang/python/python-host.mk
deleted file mode 100644 (file)
index 44ecbbf..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-#
-# Copyright (C) 2015-2016 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-# Note: include this after `include $(TOPDIR)/rules.mk in your package Makefile
-#       if `python-package.mk` is included, this will already be included
-
-ifneq ($(__python_host_mk_inc),1)
-__python_host_mk_inc=1
-
-# For PYTHON_VERSION
-python_mk_path:=$(dir $(lastword $(MAKEFILE_LIST)))
-include $(python_mk_path)python-version.mk
-
-HOST_PYTHON_DIR:=$(STAGING_DIR_HOSTPKG)
-HOST_PYTHON_INC_DIR:=$(HOST_PYTHON_DIR)/include/python$(PYTHON_VERSION)
-HOST_PYTHON_LIB_DIR:=$(HOST_PYTHON_DIR)/lib/python$(PYTHON_VERSION)
-
-HOST_PYTHON_PKG_DIR:=$(HOST_PYTHON_DIR)/lib/python$(PYTHON_VERSION)/site-packages
-
-HOST_PYTHON_BIN:=$(HOST_PYTHON_DIR)/bin/python$(PYTHON_VERSION)
-
-HOST_PYTHONPATH:=$(HOST_PYTHON_LIB_DIR):$(HOST_PYTHON_PKG_DIR)
-
-define HostPython
-       if [ "$(strip $(3))" == "HOST" ]; then \
-               export PYTHONPATH="$(HOST_PYTHONPATH)"; \
-               export PYTHONDONTWRITEBYTECODE=0; \
-       else \
-               export PYTHONPATH="$(PYTHONPATH)"; \
-               export PYTHONDONTWRITEBYTECODE=1; \
-               export _python_sysroot="$(STAGING_DIR)"; \
-               export _python_prefix="/usr"; \
-               export _python_exec_prefix="/usr"; \
-       fi; \
-       export PYTHONOPTIMIZE=""; \
-       $(1) \
-       $(HOST_PYTHON_BIN) $(2);
-endef
-
-define host_python_settings
-       ARCH="$(HOST_ARCH)" \
-       CC="$(HOSTCC)" \
-       CCSHARED="$(HOSTCC) $(HOST_FPIC)" \
-       CXX="$(HOSTCXX)" \
-       LD="$(HOSTCC)" \
-       LDSHARED="$(HOSTCC) -shared" \
-       CFLAGS="$(HOST_CFLAGS)" \
-       CPPFLAGS="$(HOST_CPPFLAGS) -I$(HOST_PYTHON_INC_DIR)" \
-       LDFLAGS="$(HOST_LDFLAGS) -lpython$(PYTHON_VERSION) -Wl$(comma)-rpath=$(STAGING_DIR_HOSTPKG)/lib" \
-       _PYTHON_HOST_PLATFORM=linux2
-endef
-
-# $(1) => commands to execute before running pythons script
-# $(2) => python script and its arguments
-# $(3) => additional variables
-define Build/Compile/HostPyRunHost
-       $(call HostPython, \
-               $(if $(1),$(1);) \
-               $(call host_python_settings) \
-               $(3) \
-               , \
-               $(2) \
-               , \
-               HOST \
-       )
-endef
-
-# Note: I shamelessly copied this from Yousong's logic (from python-packages);
-HOST_PYTHON_PIP:=$(STAGING_DIR_HOSTPKG)/bin/pip$(PYTHON_VERSION)
-
-# $(1) => packages to install
-define Build/Compile/HostPyPipInstall
-       $(call host_python_settings) \
-       $(HOST_PYTHON_PIP) \
-               --disable-pip-version-check \
-               --cache-dir "$(DL_DIR)/pip-cache" \
-               install \
-               $(1)
-endef
-
-# $(1) => build subdir
-# $(2) => additional arguments to setup.py
-# $(3) => additional variables
-define Build/Compile/HostPyMod
-       $(call Build/Compile/HostPyRunHost, \
-               cd $(HOST_BUILD_DIR)/$(strip $(1)), \
-               ./setup.py $(2), \
-               $(3))
-endef
-
-endif # __python_host_mk_inc
index 869fc5a9b5148bfd2e4d9103ddb634ed8936c98a..8a88eb60db0979f002b3b1ad505640d267f37a25 100644 (file)
@@ -20,7 +20,6 @@ PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
 define Package/python-hyperlink/Default
@@ -31,14 +30,6 @@ define Package/python-hyperlink/Default
   URL:=https://github.com/python-hyper/hyperlink
 endef
 
-define Package/python-hyperlink
-$(call Package/python-hyperlink/Default)
-  DEPENDS:= \
-      +PACKAGE_python-hyperlink:python-light \
-      +PACKAGE_python-hyperlink:python-idna
-  VARIANT:=python
-endef
-
 define Package/python3-hyperlink
 $(call Package/python-hyperlink/Default)
   DEPENDS:= \
@@ -47,22 +38,14 @@ $(call Package/python-hyperlink/Default)
   VARIANT:=python3
 endef
 
-define Package/python-hyperlink/description
+define Package/python3-hyperlink/description
 Hyperlink provides a pure-Python implementation of immutable URLs. Based
 on RFC 3986 and 3987, the Hyperlink URL makes working with both URIs and
 IRIs easy.
-endef
-
-define Package/python3-hyperlink/description
-$(call Package/python-hyperlink/description)
 .
 (Variant for Python3)
 endef
 
-$(eval $(call PyPackage,python-hyperlink))
-$(eval $(call BuildPackage,python-hyperlink))
-$(eval $(call BuildPackage,python-hyperlink-src))
-
 $(eval $(call Py3Package,python3-hyperlink))
 $(eval $(call BuildPackage,python3-hyperlink))
 $(eval $(call BuildPackage,python3-hyperlink-src))
index 57b6d7abee69b4ad4a566fe8268d1fd5210da16c..fe524b44bad1b5b2f4966b78584fe1e3c31eb13f 100644 (file)
@@ -20,7 +20,6 @@ PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>, Alexandru Ardelean <ardeleana
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
 define Package/python-idna/Default
@@ -31,14 +30,6 @@ define Package/python-idna/Default
   URL:=https://github.com/kjd/idna
 endef
 
-define Package/python-idna
-$(call Package/python-idna/Default)
-  DEPENDS:= \
-      +PACKAGE_python-idna:python-light \
-      +PACKAGE_python-idna:python-codecs
-  VARIANT:=python
-endef
-
 define Package/python3-idna
 $(call Package/python-idna/Default)
   DEPENDS:= \
@@ -47,23 +38,15 @@ $(call Package/python-idna/Default)
   VARIANT:=python3
 endef
 
-define Package/python-idna/description
+define Package/python3-idna/description
 A library to support the Internationalised Domain Names in Applications
 (IDNA) protocol as specified in RFC 5891. This version of the protocol
 is often referred to as "IDNA2008" and can produce different results
 from the earlier standard from 2003.
-endef
-
-define Package/python3-idna/description
-$(call Package/python-idna/description)
 .
 (Variant for Python3)
 endef
 
-$(eval $(call PyPackage,python-idna))
-$(eval $(call BuildPackage,python-idna))
-$(eval $(call BuildPackage,python-idna-src))
-
 $(eval $(call Py3Package,python3-idna))
 $(eval $(call BuildPackage,python3-idna))
 $(eval $(call BuildPackage,python3-idna-src))
index 65cc4f7127d357dcf11d5283ec03345394a18c0c..7390088f09d23b0aa6ade8637a84513c1fbea8bc 100644 (file)
@@ -20,7 +20,6 @@ PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
 define Package/python-incremental/Default
@@ -31,32 +30,18 @@ define Package/python-incremental/Default
   URL:=https://github.com/twisted/incremental
 endef
 
-define Package/python-incremental
-$(call Package/python-incremental/Default)
-  DEPENDS:=+PACKAGE_python-incremental:python-light
-  VARIANT:=python
-endef
-
 define Package/python3-incremental
 $(call Package/python-incremental/Default)
   DEPENDS:=+PACKAGE_python3-incremental:python3-light
   VARIANT:=python3
 endef
 
-define Package/python-incremental/description
-Incremental is a small library that versions your Python projects.
-endef
-
 define Package/python3-incremental/description
-$(call Package/python-incremental/description)
+Incremental is a small library that versions your Python projects.
 .
 (Variant for Python3)
 endef
 
-$(eval $(call PyPackage,python-incremental))
-$(eval $(call BuildPackage,python-incremental))
-$(eval $(call BuildPackage,python-incremental-src))
-
 $(eval $(call Py3Package,python3-incremental))
 $(eval $(call BuildPackage,python3-incremental))
 $(eval $(call BuildPackage,python3-incremental-src))
diff --git a/lang/python/python-ipaddress/Makefile b/lang/python/python-ipaddress/Makefile
deleted file mode 100644 (file)
index 664076b..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-#
-# Copyright (C) 2015-2018 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=python-ipaddress
-PKG_VERSION:=1.0.23
-PKG_RELEASE:=1
-
-PYPI_NAME:=ipaddress
-PKG_HASH:=b7f8e0369580bb4a24d5ba1d7cc29660a4a6987763faf1d8a8046830e020e7e2
-
-PKG_LICENSE:=Python-2.0
-PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
-
-include ../pypi.mk
-include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
-
-define Package/python-ipaddress/Default
-  SECTION:=lang
-  CATEGORY:=Languages
-  SUBMENU:=Python
-  TITLE:=Python 3.3+'s ipaddress
-  URL:=https://github.com/phihag/ipaddress
-endef
-
-define Package/python-ipaddress
-$(call Package/python-ipaddress/Default)
-  DEPENDS:=+PACKAGE_python-ipaddress:python-light
-  VARIANT:=python
-endef
-
-define Package/python-ipaddress/description
-Python 3.3+'s ipaddress for Python 2.6, 2.7, 3.2.
-endef
-
-$(eval $(call PyPackage,python-ipaddress))
-$(eval $(call BuildPackage,python-ipaddress))
-$(eval $(call BuildPackage,python-ipaddress-src))
index b674c82276078df3de90d80c34471d2d1ebbc10b..035fa623f9398f47638c7d50893f9c830755b025 100644 (file)
@@ -18,7 +18,6 @@ PKG_HASH:=472872e096eb8df219c23f2689fc336668bdb43d194094b5cc1707e1640acfc8
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
 define Package/python-jdcal/Default
@@ -29,32 +28,18 @@ define Package/python-jdcal/Default
   URL:=https://github.com/phn/jdcal
 endef
 
-define Package/python-jdcal
-$(call Package/python-jdcal/Default)
-  DEPENDS:= +PACKAGE_python-jdcal:python-light
-  VARIANT:=python
-endef
-
 define Package/python3-jdcal
 $(call Package/python-jdcal/Default)
   DEPENDS:= +PACKAGE_python3-jdcal:python3-light
   VARIANT:=python3
 endef
 
-define Package/python-jdcal/description
-  This module contains functions for converting between Julian dates and calendar dates.
-endef
-
 define Package/python3-jdcal/description
-$(call Package/python-jdcal/description)
+  This module contains functions for converting between Julian dates and calendar dates.
 .
 (Variant for Python3)
 endef
 
-$(eval $(call PyPackage,python-jdcal))
-$(eval $(call BuildPackage,python-jdcal))
-$(eval $(call BuildPackage,python-jdcal-src))
-
 $(eval $(call Py3Package,python3-jdcal))
 $(eval $(call BuildPackage,python3-jdcal))
 $(eval $(call BuildPackage,python3-jdcal-src))
index e4d1494fb9d56018c402de1f45065c2b40804285..3006caf9a80c2d94d7cbd261de574b32534f58f7 100644 (file)
@@ -12,7 +12,6 @@ PKG_LICENSE:=MIT
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
 define Package/python-jmespath/Default
@@ -23,33 +22,19 @@ define Package/python-jmespath/Default
   URL:=https://github.com/jmespath/jmespath.py
 endef
 
-define Package/python-jmespath
-$(call Package/python-jmespath/Default)
-  DEPENDS:=+PACKAGE_python-jmespath:python
-  VARIANT:=python
-endef
-
 define Package/python3-jmespath
 $(call Package/python-jmespath/Default)
   DEPENDS:=+PACKAGE_python3-jmespath:python3
   VARIANT:=python3
 endef
 
-define Package/python-jmespath/description
+define Package/python3-jmespath/description
   JMESPath (pronounced “james path”) allows you to declaratively specify how to extract
   elements from a JSON document.
-endef
-
-define Package/python3-jmespath/description
-$(call Package/python-jmespath/description)
 .
 (Variant for Python3)
 endef
 
-$(eval $(call PyPackage,python-jmespath))
-$(eval $(call BuildPackage,python-jmespath))
-$(eval $(call BuildPackage,python-jmespath-src))
-
 $(eval $(call Py3Package,python3-jmespath))
 $(eval $(call BuildPackage,python3-jmespath))
 $(eval $(call BuildPackage,python3-jmespath-src))
diff --git a/lang/python/python-ldap/Makefile b/lang/python/python-ldap/Makefile
deleted file mode 100644 (file)
index 7808028..0000000
+++ /dev/null
@@ -1,57 +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:=python-ldap
-PKG_VERSION:=3.1.0
-PKG_RELEASE:=1
-PKG_MAINTAINER:=Dmitry Trefilov <the-alien@live.ru>
-PKG_LICENSE:=Python-style
-PKG_LICENSE_FILES:=LICENSE
-
-PYPI_NAME:=$(PKG_NAME)
-PKG_HASH:=41975e79406502c092732c57ef0c2c2eb318d91e8e765f81f5d4ab6c1db727c5
-
-include ../pypi.mk
-include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
-
-define Package/python-ldap
-  SUBMENU:=Python
-  SECTION:=lang
-  CATEGORY:=Languages
-  DEPENDS:=+libopenldap +python
-  TITLE:=Python modules for implementing LDAP clients
-  URL:=https://python-ldap.org/
-endef
-
-define Package/python-ldap/description
-  python-ldap provides an object-oriented API to access LDAP directory
-  servers from Python programs. Mainly it wraps the OpenLDAP 2.x libs
-  for that purpose. Additionally the package contains modules for
-  other LDAP-related stuff (e.g. processing LDIF, LDAPURLs, LDAPv3
-  schema, LDAPv3 extended operations and controls, etc.).
-endef
-
-define Build/Compile
-       $(call Build/Compile/PyMod,,build_ext \
-               --include-dirs="$(STAGING_DIR)/usr/include:$(STAGING_DIR)/usr/include/sasl" \
-               --library-dirs="$(STAGING_DIR)/usr/lib:$(STAGING_DIR)/usr/lib/sasl2" \
-       build_py \
-       install --prefix="$(PKG_INSTALL_DIR)/usr")
-endef
-
-define PyPackage/python-ldap/install
-       $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
-       $(CP) \
-           $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
-           $(1)$(PYTHON_PKG_DIR)
-endef
-
-$(eval $(call PyPackage,python-ldap))
-$(eval $(call BuildPackage,python-ldap))
index 2f393f447ff829bc3266afd0c262b3b223906965..fda6db33d1e5b88d26e99aadb5b7cdb5993835f0 100644 (file)
@@ -13,7 +13,6 @@ PKG_HASH:=80f837304ffa8476145ea643f6b98aa94b205013a96f1e5173d7bdc776426aee
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
 define Package/python-libmodbus/Default
@@ -23,15 +22,6 @@ define Package/python-libmodbus/Default
   URL:=https://pypi.org/project/pylibmodbus
 endef
 
-define Package/python-libmodbus
-$(call Package/python-libmodbus/Default)
-  TITLE:=python-libmodbus
-  DEPENDS:=+libmodbus \
-     +PACKAGE_python-libmodbus:python-light \
-     +PACKAGE_python-libmodbus:python-cffi
-  VARIANT:=python
-endef
-
 define Package/python3-libmodbus
 $(call Package/python-libmodbus/Default)
   TITLE:=pylibmodbus
@@ -41,18 +31,11 @@ $(call Package/python-libmodbus/Default)
   VARIANT:=python3
 endef
 
-define Package/python-libmodbus/description
-       Python Interface for libmodbus written with CFFI.
-endef
-
 define Package/python3-libmodbus/description
-$(call Package/python-libmodbus/description)
+       Python Interface for libmodbus written with CFFI.
 .
 (Variant for Python3)
 endef
 
-$(eval $(call PyPackage,python-libmodbus))
-$(eval $(call BuildPackage,python-libmodbus))
-
 $(eval $(call Py3Package,python3-libmodbus))
 $(eval $(call BuildPackage,python3-libmodbus))
index 611168de7aaa316f6214da2200d83822d36e139c..c2c7d3ad3ea3f958183fe69578b0b23a7bfbffb6 100644 (file)
@@ -21,7 +21,6 @@ PKG_CPE_ID:=cpe:/a:lxml:lxml
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
 define Package/python-lxml/Default
@@ -32,13 +31,6 @@ define Package/python-lxml/Default
   DEPENDS:=+libxml2 +libxslt +libexslt
 endef
 
-define Package/python-lxml
-$(call Package/python-lxml/Default)
-  TITLE:=python-lxml
-  DEPENDS+=+PACKAGE_python-lxml:python-light +PACKAGE_python-lxml:python-codecs
-  VARIANT:=python
-endef
-
 define Package/python3-lxml
 $(call Package/python-lxml/Default)
   TITLE:=python3-lxml
@@ -46,32 +38,15 @@ $(call Package/python-lxml/Default)
   VARIANT:=python3
 endef
 
-define Package/python-lxml/description
+define Package/python3-lxml/description
 The lxml XML toolkit is a Pythonic binding
 for the C libraries libxml2 and libxslt.
-endef
-
-define Package/python3-lxml/description
-$(call Package/python-lxml/description)
 .
 (Variant for Python3)
 endef
 
 TARGET_LDFLAGS += -lxml2 -lxslt -lexslt
 
-define PyBuild/Compile
-       $(call Build/Compile/PyMod,, \
-               install --prefix="/usr" --root="$(PKG_INSTALL_DIR)" \
-               --static \
-               --single-version-externally-managed \
-               , \
-               INCLUDE="$(STAGING_DIR)/usr/include/ $(STAGING_DIR)/usr/include/libxml2" \
-               LIBRARY="$(STAGING_DIR)/usr/lib $(STAGING_DIR)/lib" \
-               CFLAGS="$(TARGET_CFLAGS)" \
-               LDFLAGS="$(TARGET_LDFLAGS)" \
-       )
-endef
-
 define Py3Build/Compile
        $(call Build/Compile/Py3Mod,, \
                install --prefix="/usr" --root="$(PKG_INSTALL_DIR)" \
@@ -85,10 +60,6 @@ define Py3Build/Compile
        )
 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))
index 47f4a1a5d39347ecc9c8e9609e8fe95656e9ed40..9f24e3b83401567a095d1cfbcc3d97385bea0a2a 100644 (file)
@@ -18,7 +18,6 @@ PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 # python-mysqlclient needs iconv
 include $(INCLUDE_DIR)/nls.mk
@@ -30,13 +29,6 @@ define Package/python-mysqlclient/Default
   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
@@ -44,21 +36,13 @@ define Package/python3-mysqlclient
   VARIANT:=python3
 endef
 
-define Package/python-mysqlclient/description
+define Package/python3-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 ae157406f5f822d87db788c163965877b0aa59d7..4fcd4cea913bf96aae22482b2f41bfcee1a960bc 100644 (file)
@@ -18,7 +18,6 @@ PKG_HASH:=bee41cc35fcca6e988463cacc3bcb8a96224f470ca547e697b604cc697b2f889
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
 define Package/python-oauthlib/Default
@@ -29,33 +28,19 @@ define Package/python-oauthlib/Default
   URL:=https://github.com/oauthlib/oauthlib
 endef
 
-define Package/python-oauthlib
-  $(call Package/python-oauthlib/Default)
-  DEPENDS:=+PACKAGE_python-oauthlib:python-light
-  VARIANT:=python
-endef
-
 define Package/python3-oauthlib
   $(call Package/python-oauthlib/Default)
   DEPENDS:=+PACKAGE_python3-oauthlib:python3-light
   VARIANT:=python3
 endef
 
-define Package/python-oauthlib/description
+define Package/python3-oauthlib/description
   A generic, spec-compliant, thorough implementation of the OAuth request-signing
   logic for Python
-endef
-
-define Package/python3-oauthlib/description
-$(call Package/python-oauthlib/description)
 .
 (Variant for Python3)
 endef
 
-$(eval $(call PyPackage,python-oauthlib))
-$(eval $(call BuildPackage,python-oauthlib))
-$(eval $(call BuildPackage,python-oauthlib-src))
-
 $(eval $(call Py3Package,python3-oauthlib))
 $(eval $(call BuildPackage,python3-oauthlib))
 $(eval $(call BuildPackage,python3-oauthlib-src))
diff --git a/lang/python/python-package.mk b/lang/python/python-package.mk
deleted file mode 100644 (file)
index 019f4f0..0000000
+++ /dev/null
@@ -1,153 +0,0 @@
-#
-# Copyright (C) 2006-2016 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-# Note: include this after `include $(TOPDIR)/rules.mk in your package Makefile
-
-python_mk_path:=$(dir $(lastword $(MAKEFILE_LIST)))
-include $(python_mk_path)python-host.mk
-
-PYTHON_DIR:=$(STAGING_DIR)/usr
-PYTHON_BIN_DIR:=$(PYTHON_DIR)/bin
-PYTHON_INC_DIR:=$(PYTHON_DIR)/include/python$(PYTHON_VERSION)
-PYTHON_LIB_DIR:=$(PYTHON_DIR)/lib/python$(PYTHON_VERSION)
-
-PYTHON_PKG_DIR:=/usr/lib/python$(PYTHON_VERSION)/site-packages
-
-PYTHON:=python$(PYTHON_VERSION)
-
-PYTHONPATH:=$(PYTHON_LIB_DIR):$(STAGING_DIR)/$(PYTHON_PKG_DIR):$(PKG_INSTALL_DIR)/$(PYTHON_PKG_DIR)
-
-# These configure args are needed in detection of path to Python header files
-# using autotools.
-CONFIGURE_ARGS += \
-       _python_sysroot="$(STAGING_DIR)" \
-       _python_prefix="/usr" \
-       _python_exec_prefix="/usr"
-
-PKG_USE_MIPS16:=0
-# This is required in addition to PKG_USE_MIPS16:=0 because otherwise MIPS16
-# flags are inherited from the Python base package (via sysconfig module)
-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
-    $(call Package/$(1))
-    DEPENDS:=
-    CONFLICTS:=
-    PROVIDES:=
-    EXTRA_DEPENDS:=
-    TITLE+= (sources)
-    USERID:=
-    MENU:=
-  endef
-
-  define Package/$(1)-src/description
-    $(call Package/$(1)/description).
-    (Contains the Python sources for this package).
-  endef
-
-  # Add default PyPackage filespec none defined
-  ifndef PyPackage/$(1)/filespec
-    define PyPackage/$(1)/filespec
-      +|$(PYTHON_PKG_DIR)
-    endef
-  endif
-
-  ifndef PyPackage/$(1)/install
-    define PyPackage/$(1)/install
-               if [ -d $(PKG_INSTALL_DIR)/usr/bin ]; then \
-                       $(INSTALL_DIR) $$(1)/usr/bin ; \
-                       $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $$(1)/usr/bin/ ; \
-               fi
-    endef
-  endif
-
-  ifndef Package/$(1)/install
-  $(call shexport,PyPackage/$(1)/filespec)
-
-  define Package/$(1)/install
-       $$(call PyPackage/$(1)/install,$$(1))
-       $(SHELL) $(python_mk_path)python-package-install.sh "2" \
-               "$(PKG_INSTALL_DIR)" "$$(1)" \
-               "$(HOST_PYTHON_BIN)" "$$(2)" \
-               "$$$$$$$$$$(call shvar,PyPackage/$(1)/filespec)" && \
-       if [ -d "$$(1)/usr/bin" ]; then \
-               $(call PyShebang,$$(1)/usr/bin/*) ; \
-       fi
-  endef
-
-  define Package/$(1)-src/install
-       $$(call Package/$(1)/install,$$(1),sources)
-  endef
-  endif # Package/$(1)/install
-endef
-
-# $(1) => commands to execute before running pythons script
-# $(2) => python script and its arguments
-# $(3) => additional variables
-define Build/Compile/HostPyRunTarget
-       $(call HostPython, \
-               $(if $(1),$(1);) \
-               CC="$(TARGET_CC)" \
-               CCSHARED="$(TARGET_CC) $(FPIC)" \
-               CXX="$(TARGET_CXX)" \
-               LD="$(TARGET_CC)" \
-               LDSHARED="$(TARGET_CC) -shared" \
-               CFLAGS="$(TARGET_CFLAGS)" \
-               CPPFLAGS="$(TARGET_CPPFLAGS) -I$(PYTHON_INC_DIR)" \
-               LDFLAGS="$(TARGET_LDFLAGS) -lpython$(PYTHON_VERSION)" \
-               _PYTHON_HOST_PLATFORM=linux2 \
-               __PYVENV_LAUNCHER__="/usr/bin/$(PYTHON)" \
-               $(3) \
-               , \
-               $(2) \
-       )
-endef
-
-# $(1) => build subdir
-# $(2) => additional arguments to setup.py
-# $(3) => additional variables
-define Build/Compile/PyMod
-       $(INSTALL_DIR) $(PKG_INSTALL_DIR)/$(PYTHON_PKG_DIR)
-       $(call Build/Compile/HostPyRunTarget, \
-               cd $(PKG_BUILD_DIR)/$(strip $(1)), \
-               ./setup.py $(2), \
-               $(3))
-endef
-
-PYTHON_PKG_SETUP_DIR ?=
-PYTHON_PKG_SETUP_GLOBAL_ARGS ?=
-PYTHON_PKG_SETUP_ARGS ?= --single-version-externally-managed
-PYTHON_PKG_SETUP_VARS ?=
-
-define PyBuild/Compile/Default
-       $(if $(HOST_PYTHON_PACKAGE_BUILD_DEPENDS),
-               $(call Build/Compile/HostPyPipInstall,$(HOST_PYTHON_PACKAGE_BUILD_DEPENDS))
-       )
-       $(call Build/Compile/PyMod, \
-               $(PYTHON_PKG_SETUP_DIR), \
-               $(PYTHON_PKG_SETUP_GLOBAL_ARGS) \
-               install --prefix="/usr" --root="$(PKG_INSTALL_DIR)" \
-               $(PYTHON_PKG_SETUP_ARGS), \
-               $(PYTHON_PKG_SETUP_VARS) \
-       )
-endef
-
-PyBuild/Compile=$(PyBuild/Compile/Default)
-
-ifeq ($(BUILD_VARIANT),python)
-define Build/Compile
-       $(call PyBuild/Compile)
-endef
-endif # python
diff --git a/lang/python/python-packages/Makefile b/lang/python/python-packages/Makefile
deleted file mode 100644 (file)
index 1cc565f..0000000
+++ /dev/null
@@ -1,131 +0,0 @@
-#
-# Copyright (C) 2016 Yousong Zhou <yszhou4tech@gmail.com>
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=python-packages
-PKG_VERSION:=1.0
-PKG_RELEASE:=2
-
-PKG_MAINTAINER:=Yousong Zhou <yszhou4tech@gmail.com>
-
-#
-# NOTE: move the host module installation to Host/Compile when
-# HOST_CONFIG_DEPENDS is supported
-#
-# NOTE: PKG_CONFIG_DEPENDS cannot correctly track changes of string type config
-# options, so you may want to do manual cleanup on config change.
-#
-PKG_CONFIG_DEPENDS:= \
-       CONFIG_PACKAGE_python-packages-list-host \
-       CONFIG_PACKAGE_python-packages-list \
-       CONFIG_PACKAGE_python-packages-list-cleanup \
-       CONFIG_PACKAGE_python-packages-envs \
-       CONFIG_PACKAGE_python-packages-extra-deps \
-       CONFIG_PACKAGE_python-packages-index-url \
-       CONFIG_PACKAGE_python-packages-pip-opts \
-
-PKG_BUILD_DEPENDS:=python python/host
-
-include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
-
-define Package/python-packages
-  SUBMENU:=Python
-  SECTION:=lang
-  CATEGORY:=Languages
-  TITLE:=A dummy package for packaging python modules with pip
-  DEPENDS:=@DEVEL +python
-endef
-
-define Package/python-packages/config
-if PACKAGE_python-packages
-config PACKAGE_python-packages-list-host
-       string "List of python packages to install on host"
-config PACKAGE_python-packages-list
-       string "List of python packages to install on target"
-config PACKAGE_python-packages-list-cleanup
-       string "List of python packages to cleanup to avoid clash with existing packages"
-config PACKAGE_python-packages-envs
-       string "Extra environment variables to pass on to pip and its children on target build"
-config PACKAGE_python-packages-extra-deps
-       string "List of deps fulfilled but not tracked by the build system"
-config PACKAGE_python-packages-index-url
-       string "Index URL passed to pip with --index-url"
-config PACKAGE_python-packages-pip-opts
-       string "Additional arguments to pip command line"
-endif
-endef
-
-CONFIG_PACKAGE_python-packages-list-host:=$(call qstrip,$(CONFIG_PACKAGE_python-packages-list-host))
-CONFIG_PACKAGE_python-packages-list:=$(call qstrip,$(CONFIG_PACKAGE_python-packages-list))
-CONFIG_PACKAGE_python-packages-list-cleanup:=$(call qstrip,$(CONFIG_PACKAGE_python-packages-list-cleanup))
-CONFIG_PACKAGE_python-packages-envs:=$(call qstrip,$(CONFIG_PACKAGE_python-packages-envs))
-CONFIG_PACKAGE_python-packages-extra-deps:=$(call qstrip,$(CONFIG_PACKAGE_python-packages-extra-deps))
-CONFIG_PACKAGE_python-packages-index-url:=$(call qstrip,$(CONFIG_PACKAGE_python-packages-index-url))
-CONFIG_PACKAGE_python-packages-pip-opts:=$(call qstrip,$(CONFIG_PACKAGE_python-packages-pip-opts))
-
-HOST_PYTHON_PIP:=$(STAGING_DIR_HOSTPKG)/bin/pip$(PYTHON_VERSION)
-
-decr=$(word $(1),0 1 2 3 4 5 6 7 8 9 10)
-recur=$(if $(subst 0,,$(2)),$(call recur,$(1),$(call decr,$(2)),$(call $(1)$(2),$(3))),$(3))
-_req2dir1=$(subst >,gt,$(1))
-_req2dir2=$(subst <,lt,$(1))
-_req2dir3=$(subst >=,geq,$(1))
-_req2dir4=$(subst <=,leq,$(1))
-_req2dir5=$(subst ://,:::,$(1))
-_req2dir6=$(subst *,_,$(1))
-_req2dir7=$(subst ?,_,$(1))
-req2dir=$(call recur,_req2dir,7,$(1))
-
-# --ignore-installed, it may happen that host pip will ignore target install if
-#  it was already installed as host module, e.g. cffi deps of cryptograph
-HOST_PYTHON_PIP_INSTALL=$(HOST_PYTHON_PIP) install \
-       --root=$(1) \
-       --prefix=$(2) \
-       --ignore-installed \
-       --no-compile \
-       $(if $(CONFIG_PACKAGE_python-packages-index-url), --index-url "$(CONFIG_PACKAGE_python-packages-index-url)") \
-       $(if $(CONFIG_PACKAGE_python-packages-pip-opts), $(CONFIG_PACKAGE_python-packages-pip-opts)) \
-
-HOST_PYTHON_PIP_INSTALL_HOST:=$(call HOST_PYTHON_PIP_INSTALL,$(STAGING_DIR_HOSTPKG),"")
-HOST_PYTHON_PIP_INSTALL_TARGET=$(call HOST_PYTHON_PIP_INSTALL,$(PKG_INSTALL_DIR)/$(call req2dir,$(pkg)),/usr)
-HOST_PYTHON_PIP_INSTALL_CLEANUP:=$(call HOST_PYTHON_PIP_INSTALL,$(PKG_INSTALL_DIR)/_cleanup,/usr)
-
-define Build/Compile
-       $(foreach pkg,$(CONFIG_PACKAGE_python-packages-list-host),
-               $(call Build/Compile/HostPyRunHost,,$(HOST_PYTHON_PIP_INSTALL_HOST) $(pkg))
-       )
-       $(foreach pkg,$(CONFIG_PACKAGE_python-packages-list),
-               $(call Build/Compile/HostPyRunTarget,,$(call HOST_PYTHON_PIP_INSTALL_TARGET,$(pkg)) $(pkg),$(CONFIG_PACKAGE_python-packages-envs))
-       )
-       $(foreach pkg,$(CONFIG_PACKAGE_python-packages-list-cleanup),
-               $(call Build/Compile/HostPyRunTarget,,$(HOST_PYTHON_PIP_INSTALL_CLEANUP) $(pkg),$(CONFIG_PACKAGE_python-packages-envs))
-       )
-endef
-
-define Package/python-packages/install
-       $(foreach pkg,$(CONFIG_PACKAGE_python-packages-list),
-               $(CP) "$(PKG_INSTALL_DIR)/$(call req2dir,$(pkg))"/* $(1)
-       )
-
-       find "$(PKG_INSTALL_DIR)/_cleanup" -mindepth 1 -depth | while read sf; do \
-               tf="$$$${sf#$(PKG_INSTALL_DIR)/_cleanup/}"; \
-               tf="$(1)/$$$$tf"; \
-               if [ -f "$$$$tf" -o -L "$$$$tf" ]; then \
-                       rm -vf "$$$$tf"; \
-               elif [ -d "$$$$tf" ]; then \
-                       rmdir -v -p "$$$$tf" || true; \
-               fi \
-       done
-endef
-
-define Package/python-packages/extra_provides
-       echo $(CONFIG_PACKAGE_python-packages-extra-deps) | tr ' ' '\n'
-endef
-
-$(eval $(call BuildPackage,python-packages))
diff --git a/lang/python/python-packages/README.md b/lang/python/python-packages/README.md
deleted file mode 100644 (file)
index 3c09d8e..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-This package allows users to package python modules without creating package
-Makefiles for each individual module and their dependencies.  It provides a
-way making packaging python packages faster and may also facilitate the process
-of developing Makefiles for new python packages
-
-This is a raw DEVEL only package.  Using it may entail a lot of implementation
-details and you may need to resolve target dependencies and package details on
-your own
-
-- Third party python packages may depend on features not included in e.g.
-  python-light
-- Some python modules may require host install of another module to progress,
-  e.g. target cryptography requires host cffi
-- Some python modules have external C library dependencies, e.g. pyOpenSSL
-  requires openssl libs
-- Some packages may have an autoconf configure script whose arguments we
-  cannot control with pip and has to be passed on (hacked) by overriding some
-  environment variables
-
-## How it works
-
-1. Install host modules required for building target modules
-2. Install each target module to separate directories
-3. Install another copy of modules for cleanup purposes to make list of
-   installed files to be removed from target modules installed in step 2
-
-Why should it be so
-
-1. Installing target cryptography requires host installation of cffi module
-2. cryptography requires setuptools and pip will install its own copy with
-   --ignore-installed.  When PACKAGE_python-setuptools is also selected, opkg
-   will complain of data file clashes if it was not removed here.
-
-Pip will handle dependency requirements of python modules, but external
-dependencies like c libraries has to be prepared by the build system.  The
-issue is that there is currently no way to express such dependencies, thus may
-cause build failure, e.g. pycrypto requires the presence of libgmp to build
-successfully.
-
-## Tips
-
-If something goes wrong, we can add additional arguments to pip command
-line to check the detailed build process.  Some useful arguments may be
-
-- -v, for verbose output.  Repeat this option if the current level of
-  verbosity is not enough
-- --no-clean, for preserving pip build dir on build failure
-
-## Examples
-
-tornado (python-only module)
-
-       CONFIG_PACKAGE_python-packages=y
-       CONFIG_PACKAGE_python-packages-list="tornado==4.4.2"
-
-cryptography (requires installation of host modules and cleanup on target modules)
-
-       CONFIG_PACKAGE_python-packages=y
-       CONFIG_PACKAGE_python-packages-list-host="cffi"
-       CONFIG_PACKAGE_python-packages-list="cryptography"
-       CONFIG_PACKAGE_python-packages-list-cleanup="setuptools"
-
-pycrypto 2.7a1 (python module with autoconf configure script; depends on
-libgmp; broken wmmintrin.h).  2.6.1 does not work because of a flaw in
-the setup.py hardcoding host include directory
-
-       CONFIG_PACKAGE_libgmp=y
-       CONFIG_PACKAGE_python-packages=y
-       CONFIG_PACKAGE_python-packages-list="https://github.com/dlitz/pycrypto/archive/v2.7a1.tar.gz"
-       CONFIG_PACKAGE_python-packages-envs="ac_cv_header_wmmintrin_h=no build_alias=$(GNU_HOST_NAME) host_alias=$(GNU_TARGET_NAME) target_alias=$(GNU_TARGET_NAME)"
-       CONFIG_PACKAGE_python-packages-extra-deps="libgmp.so.10"
-
diff --git a/lang/python/python-packaging/Makefile b/lang/python/python-packaging/Makefile
new file mode 100644 (file)
index 0000000..c656b11
--- /dev/null
@@ -0,0 +1,41 @@
+#
+# Copyright (C) 2020 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-packaging
+PKG_VERSION:=20.3
+PKG_RELEASE:=1
+
+PYPI_NAME:=packaging
+PKG_HASH:=3c292b474fda1671ec57d46d739d072bfd495a4f51ad01a055121d81e952b7a3
+
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+PKG_LICENSE:=Apache-2.0 BSD-2-Clause
+PKG_LICENSE_FILES:=LICENSE.APACHE LICENSE.BSD
+
+include ../pypi.mk
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-packaging
+  SECTION:=lang
+  CATEGORY:=Languages
+  SUBMENU:=Python
+  TITLE:=Core utilities for Python packages
+  URL:=https://github.com/pypa/packaging
+  DEPENDS:=+python3-light +python3-pyparsing +python3-six +python3-logging +python3-distutils
+  VARIANT:=python3
+endef
+
+define Package/python3-packaging/description
+  The packaging project includes version handling, specifiers,
+  markers, requirements, tags, utilities.
+endef
+
+$(eval $(call Py3Package,python3-packaging))
+$(eval $(call BuildPackage,python3-packaging))
+$(eval $(call BuildPackage,python3-packaging-src))
index 39fed358ce42dc06196187ae26c87e0d9bda120e..ad28e585ebfc3ec1edb59ab23fd094552a0a967a 100644 (file)
@@ -20,10 +20,8 @@ PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
-PYTHON_PKG_SETUP_ARGS:=
 PYTHON3_PKG_SETUP_ARGS:=
 
 define Package/python-parsley/Default
@@ -34,32 +32,18 @@ define Package/python-parsley/Default
   URL:=http://launchpad.net/parsley
 endef
 
-define Package/python-parsley
-$(call Package/python-parsley/Default)
-  DEPENDS:=+PACKAGE_python-parsley:python-light
-  VARIANT:=python
-endef
-
 define Package/python3-parsley
 $(call Package/python-parsley/Default)
   DEPENDS:=+PACKAGE_python3-parsley:python3-light
   VARIANT:=python3
 endef
 
-define Package/python-parsley/description
-Parsing and pattern matching made easy.
-endef
-
 define Package/python3-parsley/description
-$(call Package/python-parsley/description)
+Parsing and pattern matching made easy.
 .
 (Variant for Python3)
 endef
 
-$(eval $(call PyPackage,python-parsley))
-$(eval $(call BuildPackage,python-parsley))
-$(eval $(call BuildPackage,python-parsley-src))
-
 $(eval $(call Py3Package,python3-parsley))
 $(eval $(call BuildPackage,python3-parsley))
 $(eval $(call BuildPackage,python3-parsley-src))
diff --git a/lang/python/python-pcapy/Makefile b/lang/python/python-pcapy/Makefile
deleted file mode 100644 (file)
index 5389146..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-#
-# Copyright (C) 2016 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=python-pcapy
-PKG_VERSION:=0.11.4
-PKG_RELEASE:=2
-
-PYPI_NAME:=pcapy
-PKG_HASH:=aa239913678d7ba116e66057a37f914de7726aecd11d00db470127df115c4e78
-
-PKG_MAINTAINER:=Andrew McConachie <andrew@depht.com>
-PKG_LICENSE:=Apache-1.1
-
-include ../pypi.mk
-include $(INCLUDE_DIR)/uclibc++.mk
-include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
-
-define Package/python-pcapy
-       SECTION:=language-python
-       CATEGORY:=Languages
-       SUBMENU:=Python
-       TITLE:=python-pcapy
-       URL:=https://www.coresecurity.com/corelabs-research/open-source-tools/pcapy
-       DEPENDS:=+python +libpcap $(CXX_DEPENDS)
-endef
-
-define Package/python-pcapy/description
- Pcapy is a Python extension module that interfaces with the libpcap packet capture library. Pcapy enables python scripts to capture packets on the network. Pcapy is highly effective when used in conjunction with a packet-handling package such as Impacket, which is a collection of Python classes for constructing and dissecting network packets.
-endef
-
-define Build/Compile
-       $(call Build/Compile/PyMod,,\
-               install --prefix=/usr --root="$(PKG_INSTALL_DIR)" \
-       )
-endef
-
-$(eval $(call PyPackage,python-pcapy))
-$(eval $(call BuildPackage,python-pcapy))
diff --git a/lang/python/python-pcapy/patches/010-libcxx.patch b/lang/python/python-pcapy/patches/010-libcxx.patch
deleted file mode 100644 (file)
index d27dbdd..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/setup.py b/setup.py
-index 4da69bc..165059b 100644
---- a/setup.py
-+++ b/setup.py
-@@ -28,7 +28,7 @@ if sys.platform == 'win32':
-             library_dirs.append(r'c:\wpdpack\Lib')
-     libraries = ['wpcap', 'packet', 'ws2_32']
- else:
--    libraries = ['pcap', 'stdc++']
-+    libraries = ['pcap']
- # end of user configurable parameters
diff --git a/lang/python/python-pluggy/Makefile b/lang/python/python-pluggy/Makefile
new file mode 100644 (file)
index 0000000..2c34fe4
--- /dev/null
@@ -0,0 +1,43 @@
+#
+# Copyright (C) 2020 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-pluggy
+PKG_VERSION:=0.13.1
+PKG_RELEASE:=1
+
+PYPI_NAME:=pluggy
+PKG_HASH:=15b2acde666561e1298d71b523007ed7364de07029219b604cf808bfa1c765b0
+
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+
+include ../pypi.mk
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=setuptools-scm
+
+define Package/python3-pluggy
+  SUBMENU:=Python
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=Plugin and hook calling mechanisms for Python
+  URL:=https://github.com/pytest-dev/pluggy
+  DEPENDS:=+python3-light
+  VARIANT:=python3
+endef
+
+define Package/python3-pluggy/description
+  A minimalist production ready plugin system for python
+endef
+
+$(eval $(call Py3Package,python3-pluggy))
+$(eval $(call BuildPackage,python3-pluggy))
+$(eval $(call BuildPackage,python3-pluggy-src))
index ea6457d7786f9c2af018ad00656311b8e7329cbb..4b302d04800e2f771108d071cd462256f903d001 100644 (file)
@@ -20,7 +20,6 @@ PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
 define Package/python-ply/Default
@@ -31,33 +30,19 @@ define Package/python-ply/Default
   URL:=http://www.dabeaz.com/ply/
 endef
 
-define Package/python-ply
-$(call Package/python-ply/Default)
-  DEPENDS:=+PACKAGE_python-ply:python-light
-  VARIANT:=python
-endef
-
 define Package/python3-ply
 $(call Package/python-ply/Default)
   DEPENDS:=+PACKAGE_python3-ply:python3-light
   VARIANT:=python3
 endef
 
-define Package/python-ply/description
+define Package/python3-ply/description
 PLY is a 100% Python implementation of the common parsing tools lex
 and yacc.
-endef
-
-define Package/python3-ply/description
-$(call Package/python-ply/description)
 .
 (Variant for Python3)
 endef
 
-$(eval $(call PyPackage,python-ply))
-$(eval $(call BuildPackage,python-ply))
-$(eval $(call BuildPackage,python-ply-src))
-
 $(eval $(call Py3Package,python3-ply))
 $(eval $(call BuildPackage,python3-ply))
 $(eval $(call BuildPackage,python3-ply-src))
diff --git a/lang/python/python-psycopg2/Makefile b/lang/python/python-psycopg2/Makefile
deleted file mode 100644 (file)
index b67d29e..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-#
-# Copyright (C) 2016 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=python-psycopg2
-PKG_VERSION:=2.7.6.1
-PKG_RELEASE:=2
-
-PYPI_NAME:=psycopg2
-PKG_HASH:=27959abe64ca1fc6d8cd11a71a1f421d8287831a3262bd4cacd43bbf43cc3c82
-
-PKG_MAINTAINER:=Dmitry Trefilov <the-alien@live.ru>
-PKG_LICENSE:=LGPL-3.0-or-later
-PKG_LICENSE_FILES:=LICENSE
-
-PKG_BUILD_DEPENDS:=python/host
-
-include ../pypi.mk
-include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
-
-define Package/python-psycopg2
-  SUBMENU:=Python
-  SECTION:=lang
-  CATEGORY:=Languages
-  TITLE:=PostgreSQL database adapter for Python
-  URL:=http://initd.org/psycopg/
-  DEPENDS:=+python +libpq +python-egenix-mx-base
-endef
-
-define Package/python-psycopg2/description
- Psycopg is the most popular PostgreSQL adapter for the Python programming language
-endef
-
-define Build/Compile
-       # The PATH var is required so that psycopg2's setup.py script finds pg_config
-       $(call Build/Compile/PyMod,., \
-               install --prefix=/usr --root=$(PKG_INSTALL_DIR), \
-               PATH=$(STAGING_DIR)/usr/bin:$(PATH))
-endef
-
-define Package/python-psycopg2/install
-       $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
-       $(CP) \
-           $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
-           $(1)$(PYTHON_PKG_DIR)
-endef
-
-$(eval $(call PyPackage,python-psycopg2))
-$(eval $(call BuildPackage,python-psycopg2))
index 5261bece5dad93f28cd5dcab01e4a1c09eafeb4c..5eafbfef400cc00bfa39e2133c216c5291e575c2 100644 (file)
@@ -20,7 +20,6 @@ PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>, Alexandru Ardelean <ardeleana
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
 define Package/python-pyasn1-modules/Default
@@ -31,14 +30,6 @@ define Package/python-pyasn1-modules/Default
   URL:=https://github.com/etingof/pyasn1-modules
 endef
 
-define Package/python-pyasn1-modules
-$(call Package/python-pyasn1-modules/Default)
-  DEPENDS:= \
-      +PACKAGE_python-pyasn1-modules:python-light \
-      +PACKAGE_python-pyasn1-modules:python-pyasn1
-  VARIANT:=python
-endef
-
 define Package/python3-pyasn1-modules
 $(call Package/python-pyasn1-modules/Default)
   DEPENDS:= \
@@ -47,21 +38,13 @@ $(call Package/python-pyasn1-modules/Default)
   VARIANT:=python3
 endef
 
-define Package/python-pyasn1-modules/description
+define Package/python3-pyasn1-modules/description
 This is a small but growing collection of ASN.1 data structures
 expressed in Python terms using pyasn1 data model.
-endef
-
-define Package/python3-pyasn1-modules/description
-$(call Package/python-pyasn1-modules/description)
 .
 (Variant for Python3).
 endef
 
-$(eval $(call PyPackage,python-pyasn1-modules))
-$(eval $(call BuildPackage,python-pyasn1-modules))
-$(eval $(call BuildPackage,python-pyasn1-modules-src))
-
 $(eval $(call Py3Package,python3-pyasn1-modules))
 $(eval $(call BuildPackage,python3-pyasn1-modules))
 $(eval $(call BuildPackage,python3-pyasn1-modules-src))
index 3ba9073cdd1cf66c59b9841ec7f75d6ee4ae32f3..23c81a6138c97a55e2132bcd1fc0b4d3f589d954 100644 (file)
@@ -20,7 +20,6 @@ PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>, Alexandru Ardelean <ardeleana
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
 define Package/python-pyasn1/Default
@@ -31,35 +30,21 @@ define Package/python-pyasn1/Default
   URL:=https://github.com/etingof/pyasn1
 endef
 
-define Package/python-pyasn1
-$(call Package/python-pyasn1/Default)
-  DEPENDS:=+PACKAGE_python-pyasn1:python-light
-  VARIANT:=python
-endef
-
 define Package/python3-pyasn1
 $(call Package/python-pyasn1/Default)
   DEPENDS:=+PACKAGE_python3-pyasn1:python3-light
   VARIANT:=python3
 endef
 
-define Package/python-pyasn1/description
+define Package/python3-pyasn1/description
 This is an implementation of ASN.1 types and codecs in Python programming
 language. It has been first written to support particular protocol (SNMP)
 but then generalized to be suitable for a wide range of protocols
 based on ASN.1 specification.
-endef
-
-define Package/python3-pyasn1/description
-$(call Package/python-pyasn1/description)
 .
 (Variant for Python3)
 endef
 
-$(eval $(call PyPackage,python-pyasn1))
-$(eval $(call BuildPackage,python-pyasn1))
-$(eval $(call BuildPackage,python-pyasn1-src))
-
 $(eval $(call Py3Package,python3-pyasn1))
 $(eval $(call BuildPackage,python3-pyasn1))
 $(eval $(call BuildPackage,python3-pyasn1-src))
index 19cf88c1dd4a55b0b0cddd11c431dec9a67daee5..1c1b9199e7fc4b00e504b09b3d432cb54a36998a 100644 (file)
@@ -18,12 +18,10 @@ PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=LICENSE
 PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
 
-HOST_PYTHON_PACKAGE_BUILD_DEPENDS:="ply==3.10"
 HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:="ply==3.10"
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
 define Package/python-pycparser/Default
@@ -34,14 +32,6 @@ define Package/python-pycparser/Default
   URL:=https://github.com/eliben/pycparser
 endef
 
-define Package/python-pycparser
-$(call Package/python-pycparser/Default)
-  DEPENDS:= \
-      +PACKAGE_python-pycparser:python-light \
-      +PACKAGE_python-pycparser:python-ply
-  VARIANT:=python
-endef
-
 define Package/python3-pycparser
 $(call Package/python-pycparser/Default)
   DEPENDS:= \
@@ -50,22 +40,14 @@ $(call Package/python-pycparser/Default)
   VARIANT:=python3
 endef
 
-define Package/python-pycparser/description
+define Package/python3-pycparser/description
 pycparser is a parser for the C language, written in pure Python. It is a
 module designed to be easily integrated into applications that need to parse
 C source code.
-endef
-
-define Package/python3-pycparser/description
-$(call Package/python-pycparser/description)
 .
 (Variant for Python3)
 endef
 
-$(eval $(call PyPackage,python-pycparser))
-$(eval $(call BuildPackage,python-pycparser))
-$(eval $(call BuildPackage,python-pycparser-src))
-
 $(eval $(call Py3Package,python3-pycparser))
 $(eval $(call BuildPackage,python3-pycparser))
 $(eval $(call BuildPackage,python3-pycparser-src))
index 53dccc3066c41a7bba5a8e7480d8cba23b49ed46..e693cacd34478e7cfec6f599512ddab3376f0f71 100644 (file)
@@ -21,7 +21,6 @@ PKG_CPE_ID:=cpe:/a:pyopenssl_project:pyopenssl
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
 define Package/python-pyopenssl/Default
@@ -32,15 +31,6 @@ define Package/python-pyopenssl/Default
   URL:=https://pyopenssl.org/
 endef
 
-define Package/python-pyopenssl
-$(call Package/python-pyopenssl/Default)
-  DEPENDS:= \
-      +PACKAGE_python-pyopenssl:python-light \
-      +PACKAGE_python-pyopenssl:python-cryptography \
-      +PACKAGE_python-pyopenssl:python-six
-  VARIANT:=python
-endef
-
 define Package/python3-pyopenssl
 $(call Package/python-pyopenssl/Default)
   DEPENDS:= \
@@ -50,20 +40,12 @@ $(call Package/python-pyopenssl/Default)
   VARIANT:=python3
 endef
 
-define Package/python-pyopenssl/description
-Python wrapper module around the OpenSSL library
-endef
-
 define Package/python3-pyopenssl/description
-$(call Package/python-pyopenssl/description)
+Python wrapper module around the OpenSSL library
 .
 (Variant for Python3).
 endef
 
-$(eval $(call PyPackage,python-pyopenssl))
-$(eval $(call BuildPackage,python-pyopenssl))
-$(eval $(call BuildPackage,python-pyopenssl-src))
-
 $(eval $(call Py3Package,python3-pyopenssl))
 $(eval $(call BuildPackage,python3-pyopenssl))
 $(eval $(call BuildPackage,python3-pyopenssl-src))
diff --git a/lang/python/python-pyptlib/Makefile b/lang/python/python-pyptlib/Makefile
deleted file mode 100644 (file)
index 9c0403a..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-#
-# Copyright (C) 2015, 2017-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-pyptlib
-PKG_VERSION:=0.0.6
-PKG_RELEASE:=3
-
-PYPI_NAME:=pyptlib
-PKG_HASH:=b98472e3d9e8f4689d3913ca8f89afa5e6cc5383dcd8686987606166f9dac607
-
-PKG_LICENSE:=BSD-3-Clause
-PKG_LICENSE_FILES:=LICENSE
-PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
-
-include ../pypi.mk
-include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
-
-define Package/python-pyptlib/Default
-  SECTION:=lang
-  CATEGORY:=Languages
-  SUBMENU:=Python
-  TITLE:=Pluggable Transports for Tor
-  URL:=https://pypi.org/project/pyptlib/
-endef
-
-define Package/python-pyptlib
-$(call Package/python-pyptlib/Default)
-  DEPENDS:=+PACKAGE_python-pyptlib:python-light
-  VARIANT:=python
-endef
-
-define Package/python-pyptlib/description
-A python implementation of the Pluggable Transports for Circumvention
-specification for Tor
-endef
-
-$(eval $(call PyPackage,python-pyptlib))
-$(eval $(call BuildPackage,python-pyptlib))
-$(eval $(call BuildPackage,python-pyptlib-src))
index ca80e6c485651a19e5a2512f27e2b3bb3cdf4f69..7cc4ec91fe5e90fdf06e5eff861178ac5b3af366 100644 (file)
@@ -19,7 +19,6 @@ PKG_MAINTAINER:=Micke Prag <micke.prag@telldus.se>
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
 define Package/python-pyserial/Default
@@ -29,13 +28,6 @@ define Package/python-pyserial/Default
   URL:=https://github.com/pyserial/pyserial
 endef
 
-define Package/python-pyserial
-$(call Package/python-pyserial/Default)
-  TITLE:=python-pyserial
-  DEPENDS:=+PACKAGE_python-pyserial:python-light
-  VARIANT:=python
-endef
-
 define Package/python3-pyserial
 $(call Package/python-pyserial/Default)
   TITLE:=python3-pyserial
@@ -43,23 +35,15 @@ $(call Package/python-pyserial/Default)
   VARIANT:=python3
 endef
 
-define Package/python-pyserial/description
+define Package/python3-pyserial/description
 This module encapsulates the access for the serial port. It provides backends
 for Python running on Windows, OSX, Linux, BSD (possibly any POSIX compliant
 system) and IronPython. The module named "serial" automatically selects the
 appropriate backend.
-endef
-
-define Package/python3-pyserial/description
-$(call Package/python-pyserial/description)
 .
 (Variant for Python3)
 endef
 
-$(eval $(call PyPackage,python-pyserial))
-$(eval $(call BuildPackage,python-pyserial))
-$(eval $(call BuildPackage,python-pyserial-src))
-
 $(eval $(call Py3Package,python3-pyserial))
 $(eval $(call BuildPackage,python3-pyserial))
 $(eval $(call BuildPackage,python3-pyserial-src))
index bdff0ac509feed6640d37de1ba4ec81b0eebf974..f421b198be20b2f042a9954695fcca48f973605f 100644 (file)
@@ -20,7 +20,6 @@ PKG_LICENSE_FILES:=LICENSE.txt
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
 define Package/python-pytz/Default
@@ -30,13 +29,6 @@ define Package/python-pytz/Default
   URL:=https://pythonhosted.org/pytz/
 endef
 
-define Package/python-pytz
-$(call Package/python-pytz/Default)
-  TITLE:=World timezone definitions, modern and historical
-  DEPENDS:=+PACKAGE_python-pytz:python-light
-  VARIANT:=python
-endef
-
 define Package/python3-pytz
 $(call Package/python-pytz/Default)
   TITLE:=World timezone definitions, modern and historical for Python3
@@ -44,20 +36,12 @@ $(call Package/python-pytz/Default)
   VARIANT:=python3
 endef
 
-define Package/python-pytz/description
-  World timezone definitions, modern and historical
-endef
-
 define Package/python3-pytz/description
-$(call Package/python-pytz/description)
+  World timezone definitions, modern and historical
 .
 (Variant for Python3)
 endef
 
-$(eval $(call PyPackage,python-pytz))
-$(eval $(call BuildPackage,python-pytz))
-$(eval $(call BuildPackage,python-pytz-src))
-
 $(eval $(call Py3Package,python3-pytz))
 $(eval $(call BuildPackage,python3-pytz))
 $(eval $(call BuildPackage,python3-pytz-src))
index 63c08db39990e0e9aa7806a18417fdc85aefa83c..1628c90d0960dc23c498c454f8b8982ee055fdf5 100644 (file)
@@ -18,7 +18,6 @@ PKG_LICENSE_FILES:=LICENSE
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
 define Package/python-qrcode/Default
@@ -29,20 +28,6 @@ define Package/python-qrcode/Default
   URL:=https://github.com/lincolnloop/python-qrcode
 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
-
-define Package/python-qrcode/description
-  Pure python QR Code generator
-endef
-
 define Package/python3-qrcode
 $(call Package/python-qrcode/Default)
   DEPENDS:= \
@@ -54,15 +39,11 @@ $(call Package/python-qrcode/Default)
 endef
 
 define Package/python3-qrcode/description
-$(call Package/python-qrcode/description)
+  Pure python QR Code generator
 .
 (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 2a812920fa3420cc2b6d31a0a65b3a095c57dd62..7791a8b4dfacac2e1b3f3cbc49ab16bf899b44a1 100644 (file)
@@ -18,7 +18,6 @@ PKG_HASH:=ca87b695d3d7864157773a61263e5abb96006e9ff0e021eff90cbe0e1ba18270
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
 define Package/python-rcssmin/Default
@@ -29,14 +28,6 @@ define Package/python-rcssmin/Default
     URL:=http://opensource.perlig.de/rcssmin/
 endef
 
-define Package/python-rcssmin
-    $(call Package/python-rcssmin/Default)
-    DEPENDS:= \
-       +PACKAGE_python-rcssmin:python-light \
-       +PACKAGE_python-rcssmin:python-codecs
-    VARIANT:=python
-endef
-
 define Package/python3-rcssmin
     $(call Package/python-rcssmin/Default)
     DEPENDS:= \
@@ -44,24 +35,16 @@ define Package/python3-rcssmin
     VARIANT:=python3
 endef
 
-define Package/python-rcssmin/description
+define Package/python3-rcssmin/description
     This module is a re-implementation aiming for speed instead of maximum compression,
     so it can be used at runtime (rather than during a preprocessing step).
     RCSSmin does syntactical compression only (removing spaces, comments and possibly
     semicolons). It does not provide semantic compression (like removing empty blocks,
     collapsing redundant properties etc).
-endef
-
-define Package/python3-rcssmin/description
-$(call Package/python-rcssmin/description)
 .
 (Variant for Python3)
 endef
 
-$(eval $(call PyPackage,python-rcssmin))
-$(eval $(call BuildPackage,python-rcssmin))
-$(eval $(call BuildPackage,python-rcssmin-src))
-
 $(eval $(call Py3Package,python3-rcssmin))
 $(eval $(call BuildPackage,python3-rcssmin))
 $(eval $(call BuildPackage,python3-rcssmin-src))
index 30b00d61409e30394b1e9a676b0a985a93619383..6cd863d065b391026e081d1a9db473cba7326cd3 100644 (file)
@@ -18,7 +18,6 @@ PKG_HASH:=b4261601a71fd721a8bd6d7aa1cc1d6a8a93b4a9f5e96626f8e4d91e8beeaa6a
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
 define Package/python-requests-oauthlib/Default
@@ -29,15 +28,6 @@ define Package/python-requests-oauthlib/Default
   URL:=https://github.com/requests/requests-oauthlib
 endef
 
-define Package/python-requests-oauthlib
-  $(call Package/python-requests-oauthlib/Default)
-  DEPENDS:= \
-       +PACKAGE_python-requests-oauthlib:python \
-       +PACKAGE_python-requests-oauthlib:python-oauthlib \
-       +PACKAGE_python-requests-oauthlib:python-requests
-  VARIANT:=python
-endef
-
 define Package/python3-requests-oauthlib
   $(call Package/python-requests-oauthlib/Default)
   DEPENDS:= \
@@ -47,21 +37,13 @@ define Package/python3-requests-oauthlib
   VARIANT:=python3
 endef
 
-define Package/python-requests-oauthlib/description
+define Package/python3-requests-oauthlib/description
   This python package provides first-class OAuth library support
   for Requests.
-endef
-
-define Package/python3-requests-oauthlib/description
-$(call Package/python-requests-oauthlib/description)
 .
 (Variant for Python3)
 endef
 
-$(eval $(call PyPackage,python-requests-oauthlib))
-$(eval $(call BuildPackage,python-requests-oauthlib))
-$(eval $(call BuildPackage,python-requests-oauthlib-src))
-
 $(eval $(call Py3Package,python3-requests-oauthlib))
 $(eval $(call BuildPackage,python3-requests-oauthlib))
 $(eval $(call BuildPackage,python3-requests-oauthlib-src))
index d7573ed9d58ca723806ccb7dfe9dc7ffbd056f7a..9a33e315f00b15bda0e0590b4675b2b4550e963e 100644 (file)
@@ -21,7 +21,6 @@ PKG_HASH:=b3f43d496c6daba4493e7c431722aeb7dbc6288f52a6e04e7b6023b0247817e6
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
 define Package/python-requests/Default
@@ -32,17 +31,6 @@ define Package/python-requests/Default
   URL:=https://2.python-requests.org/
 endef
 
-define Package/python-requests
-$(call Package/python-requests/Default)
-  DEPENDS:= \
-         +PACKAGE_python-requests:python \
-         +PACKAGE_python-requests:python-chardet \
-         +PACKAGE_python-requests:python-idna \
-         +PACKAGE_python-requests:python-urllib3 \
-         +PACKAGE_python-requests:python-certifi
-  VARIANT:=python
-endef
-
 define Package/python3-requests
 $(call Package/python-requests/Default)
   DEPENDS:= \
@@ -54,20 +42,12 @@ $(call Package/python-requests/Default)
   VARIANT:=python3
 endef
 
-define Package/python-requests/description
-  Requests is the only Non-GMO HTTP library for Python, safe for human consumption
-endef
-
 define Package/python3-requests/description
-$(call Package/python-requests/description)
+  Requests is the only Non-GMO HTTP library for Python, safe for human consumption
 .
 (Variant for Python3)
 endef
 
-$(eval $(call PyPackage,python-requests))
-$(eval $(call BuildPackage,python-requests))
-$(eval $(call BuildPackage,python-requests-src))
-
 $(eval $(call Py3Package,python3-requests))
 $(eval $(call BuildPackage,python3-requests))
 $(eval $(call BuildPackage,python3-requests-src))
index 9bdca772ab5fc91da3e551aafa90e6a8de79f99a..eba462f63513aecfb713b86ccd9233d17bb7df50 100644 (file)
@@ -12,7 +12,6 @@ PKG_LICENSE:=MIT
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
 define Package/python-rsa/Default
@@ -23,34 +22,20 @@ define Package/python-rsa/Default
   URL:=https://stuvel.eu/rsa
 endef
 
-define Package/python-rsa
-$(call Package/python-rsa/Default)
-  DEPENDS:=+PACKAGE_python-rsa:python +PACKAGE_python-rsa:python-pyasn1
-  VARIANT:=python
-endef
-
 define Package/python3-rsa
 $(call Package/python-rsa/Default)
   DEPENDS:=+PACKAGE_python3-rsa:python3 +PACKAGE_python3-rsa:python3-pyasn1
   VARIANT:=python3
 endef
 
-define Package/python-rsa/description
+define Package/python3-rsa/description
   Is a pure-Python RSA implementation. It supports encryption and decryption,
   signing and verifying signatures, and key generation according to PKCS#1 version 1.5.
   It can be used as a Python library as well as on the commandline. 
-endef
-
-define Package/python3-rsa/description
-$(call Package/python-rsa/description)
 .
 (Variant for Python3)
 endef
 
-$(eval $(call PyPackage,python-rsa))
-$(eval $(call BuildPackage,python-rsa))
-$(eval $(call BuildPackage,python-rsa-src))
-
 $(eval $(call Py3Package,python3-rsa))
 $(eval $(call BuildPackage,python3-rsa))
 $(eval $(call BuildPackage,python3-rsa-src))
index 5ed85e9d83b1111dfa1f7e5cd44bdd2ad8f28e3d..e49212f6c11106b56fcd1d9f4f419cc2adcfe6ec 100644 (file)
@@ -12,7 +12,6 @@ PKG_LICENSE:=MIT
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
 define Package/python-s3transfer/Default
@@ -23,15 +22,6 @@ define Package/python-s3transfer/Default
   URL:=https://github.com/boto/s3transfer
 endef
 
-define Package/python-s3transfer
-$(call Package/python-s3transfer/Default)
-  DEPENDS:= \
-       +PACKAGE_python-s3transfer:python \
-       +PACKAGE_python-s3transfer:python-botocore \
-       +PACKAGE_python-s3transfer:python-futures
-  VARIANT:=python
-endef
-
 define Package/python3-s3transfer
 $(call Package/python-s3transfer/Default)
   DEPENDS:= \
@@ -40,20 +30,12 @@ $(call Package/python-s3transfer/Default)
   VARIANT:=python3
 endef
 
-define Package/python-s3transfer/description
-S3transfer is a Python library for managing Amazon S3 transfers.
-endef
-
 define Package/python3-s3transfer/description
-$(call Package/python-s3transfer/description)
+S3transfer is a Python library for managing Amazon S3 transfers.
 .
 (Variant for Python3)
 endef
 
-$(eval $(call PyPackage,python-s3transfer))
-$(eval $(call BuildPackage,python-s3transfer))
-$(eval $(call BuildPackage,python-s3transfer-src))
-
 $(eval $(call Py3Package,python3-s3transfer))
 $(eval $(call BuildPackage,python3-s3transfer))
 $(eval $(call BuildPackage,python3-s3transfer-src))
index dc99d4b793f34f24bc38b343296d5f42c7c411dc..5810e1d5787bd2d636ddb899fd1d9270739b6309 100644 (file)
@@ -20,7 +20,6 @@ PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
 define Package/python-service-identity/Default
@@ -31,18 +30,6 @@ define Package/python-service-identity/Default
   URL:=https://service-identity.readthedocs.io/
 endef
 
-define Package/python-service-identity
-$(call Package/python-service-identity/Default)
-  DEPENDS:= \
-      +PACKAGE_python-service-identity:python-light \
-      +PACKAGE_python-service-identity:python-attrs \
-      +PACKAGE_python-service-identity:python-cryptography \
-      +PACKAGE_python-service-identity:python-ipaddress \
-      +PACKAGE_python-service-identity:python-pyasn1 \
-      +PACKAGE_python-service-identity:python-pyasn1-modules
-  VARIANT:=python
-endef
-
 define Package/python3-service-identity
 $(call Package/python-service-identity/Default)
   DEPENDS:= \
@@ -54,21 +41,13 @@ $(call Package/python-service-identity/Default)
   VARIANT:=python3
 endef
 
-define Package/python-service-identity/description
+define Package/python3-service-identity/description
 service_identity aspires to give you all the tools you need for
 verifying whether a certificate is valid for the intended purposes.
-endef
-
-define Package/python3-service-identity/description
-$(call Package/python-service-identity/description)
 .
 (Variant for Python3)
 endef
 
-$(eval $(call PyPackage,python-service-identity))
-$(eval $(call BuildPackage,python-service-identity))
-$(eval $(call BuildPackage,python-service-identity-src))
-
 $(eval $(call Py3Package,python3-service-identity))
 $(eval $(call BuildPackage,python3-service-identity))
 $(eval $(call BuildPackage,python3-service-identity-src))
index d8a2558fade4b3d68549a0d2030fdd5bb10042dd..808c73871e68b275b392c39826901b825f4f13fb 100644 (file)
@@ -18,7 +18,6 @@ PKG_HASH:=2b4b2b738b3b99819a17feaf118265d0753d5536049ea570b3c43b51c4701e81
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
 define Package/python-simplejson/Default
@@ -29,13 +28,6 @@ define Package/python-simplejson/Default
   URL:=https://simplejson.readthedocs.org/
 endef
 
-define Package/python-simplejson
-$(call Package/python-simplejson/Default)
-  TITLE:=Simple, fast, extensible JSON encoder/decoder for Python 2
-  DEPENDS:=+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
@@ -43,30 +35,17 @@ $(call Package/python-simplejson/Default)
   VARIANT:=python3
 endef
 
-define Package/python-simplejson/description
-  Simple, fast, extensible JSON encoder/decoder for Python
-endef
-
 define Package/python3-simplejson/description
-$(call Package/python-simplejson/description)
+  Simple, fast, extensible JSON encoder/decoder for Python
 .
 (Variant for Python3)
 endef
 
-define PyPackage/python-simplejson/filespec
-+|$(PYTHON_PKG_DIR)
--|$(PYTHON_PKG_DIR)/simplejson/tests
-endef
-
 define Py3Package/python3-simplejson/filespec
 +|$(PYTHON3_PKG_DIR)
 -|$(PYTHON3_PKG_DIR)/simplejson/tests
 endef
 
-$(eval $(call PyPackage,python-simplejson))
-$(eval $(call BuildPackage,python-simplejson))
-$(eval $(call BuildPackage,python-simplejson-src))
-
 $(eval $(call Py3Package,python3-simplejson))
 $(eval $(call BuildPackage,python3-simplejson))
 $(eval $(call BuildPackage,python3-simplejson-src))
index 4125139dcf141aee30f65211a228008eead263c6..3f0250d26c6aa282c1c2276c40ca0fb5b98b3b79 100644 (file)
@@ -23,7 +23,6 @@ HOST_BUILD_DEPENDS:=python3/host
 include ../pypi.mk
 include $(INCLUDE_DIR)/host-build.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
 define Package/python-six/Default
@@ -34,27 +33,17 @@ define Package/python-six/Default
   URL:=https://github.com/benjaminp/six
 endef
 
-define Package/python-six
-$(call Package/python-six/Default)
-  DEPENDS:=+PACKAGE_python-six:python-light
-  VARIANT:=python
-endef
-
 define Package/python3-six
 $(call Package/python-six/Default)
   DEPENDS:=+PACKAGE_python3-six:python3-light
   VARIANT:=python3
 endef
 
-define Package/python-six/description
+define Package/python3-six/description
 Six is a Python 2 and 3 compatibility library.  It provides utility functions
 for smoothing over the differences between the Python versions with the goal of
 writing Python code that is compatible on both Python versions.  See the
 documentation for more information on what is provided.
-endef
-
-define Package/python3-six/description
-$(call Package/python-six/description)
 .
 (Variant for Python3)
 endef
@@ -67,10 +56,6 @@ Host/Install:=
 
 $(eval $(call HostBuild))
 
-$(eval $(call PyPackage,python-six))
-$(eval $(call BuildPackage,python-six))
-$(eval $(call BuildPackage,python-six-src))
-
 $(eval $(call Py3Package,python3-six))
 $(eval $(call BuildPackage,python3-six))
 $(eval $(call BuildPackage,python3-six-src))
index e91743d7c3e07204de93c3e582eaa24c69718d21..ee72d39a0de03770d7683a437b45b298d013f4ce 100644 (file)
@@ -24,7 +24,6 @@ PKG_CPE_ID:=cpe:/a:twistedmatrix:twisted
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
 define Package/python-twisted/Default
@@ -35,20 +34,6 @@ define Package/python-twisted/Default
   URL:=https://twistedmatrix.com/
 endef
 
-define Package/python-twisted
-$(call Package/python-twisted/Default)
-  DEPENDS:= \
-      +PACKAGE_python-twisted:python-light \
-      +PACKAGE_python-twisted:python-attrs \
-      +PACKAGE_python-twisted:python-automat \
-      +PACKAGE_python-twisted:python-constantly \
-      +PACKAGE_python-twisted:python-incremental \
-      +PACKAGE_python-twisted:python-hyperlink \
-      +PACKAGE_python-twisted:python-setuptools \
-      +PACKAGE_python-twisted:python-zope-interface
-  VARIANT:=python
-endef
-
 define Package/python3-twisted
 $(call Package/python-twisted/Default)
   DEPENDS:= \
@@ -63,23 +48,14 @@ $(call Package/python-twisted/Default)
   VARIANT:=python3
 endef
 
-define Package/python-twisted/description
+define Package/python3-twisted/description
 Twisted is a networking engine written in Python, supporting numerous
 protocols. It contains a web server, numerous chat clients, chat servers,
 mail servers, and more.
-endef
-
-define Package/python3-twisted/description
-$(call Package/python-twisted/description)
 .
 (Variant for Python3)
 endef
 
-define PyPackage/python-twisted/filespec
-+|$(PYTHON_PKG_DIR)
--|$(PYTHON_PKG_DIR)/twisted/conch/scripts/tkconch.py
-endef
-
 define Py3Package/python3-twisted/filespec
 +|$(PYTHON3_PKG_DIR)
 -|$(PYTHON3_PKG_DIR)/twisted/conch/scripts/tkconch.py
@@ -93,10 +69,6 @@ define Py3Package/python3-twisted/install
        done
 endef
 
-$(eval $(call PyPackage,python-twisted))
-$(eval $(call BuildPackage,python-twisted))
-$(eval $(call BuildPackage,python-twisted-src))
-
 $(eval $(call Py3Package,python3-twisted))
 $(eval $(call BuildPackage,python3-twisted))
 $(eval $(call BuildPackage,python3-twisted-src))
diff --git a/lang/python/python-txsocksx/Makefile b/lang/python/python-txsocksx/Makefile
deleted file mode 100644 (file)
index 9a0e2db..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-#
-# Copyright (C) 2015, 2017-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-txsocksx
-PKG_VERSION:=1.15.0.2
-PKG_RELEASE:=4
-
-PYPI_NAME:=txsocksx
-PKG_HASH:=4f79b5225ce29709bfcee45e6f726e65b70fd6f1399d1898e54303dbd6f8065f
-
-PKG_LICENSE:=ISC
-PKG_LICENSE_FILES:=COPYING
-PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
-
-include ../pypi.mk
-include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
-
-PYTHON_PKG_SETUP_VARS:= \
-  PKG_VERSION="$(PKG_VERSION)"
-
-define Package/python-txsocksx/Default
-  SECTION:=lang
-  CATEGORY:=Languages
-  SUBMENU:=Python
-  TITLE:=SOCKS client endpoints for Twisted
-  URL:=https://github.com/habnabit/txsocksx
-endef
-
-define Package/python-txsocksx
-$(call Package/python-txsocksx/Default)
-  DEPENDS:= \
-      +PACKAGE_python-txsocksx:python-light \
-      +PACKAGE_python-txsocksx:python-parsley \
-      +PACKAGE_python-txsocksx:python-twisted
-  VARIANT:=python
-endef
-
-define Package/python-txsocksx/description
-txsocksx is SOCKS4/4a and SOCKS5 client endpoints for Twisted 10.1 or
-greater.
-endef
-
-$(eval $(call PyPackage,python-txsocksx))
-$(eval $(call BuildPackage,python-txsocksx))
-$(eval $(call BuildPackage,python-txsocksx-src))
diff --git a/lang/python/python-txsocksx/patches/001-omit-tests.patch b/lang/python/python-txsocksx/patches/001-omit-tests.patch
deleted file mode 100644 (file)
index 2bed548..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
---- a/setup.py
-+++ b/setup.py
-@@ -35,5 +35,5 @@ setup(
-         'version_module_paths': ['txsocksx/_version.py'],
-     },
-     install_requires=install_requires,
--    packages=['txsocksx', 'txsocksx.test'],
-+    packages=['txsocksx'],
- )
diff --git a/lang/python/python-txsocksx/patches/002-do-not-use-vcversioner.patch b/lang/python/python-txsocksx/patches/002-do-not-use-vcversioner.patch
deleted file mode 100644 (file)
index c7c2cbb..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
---- a/setup.py
-+++ b/setup.py
-@@ -1,6 +1,8 @@
- # Copyright (c) Aaron Gallagher <_@habnab.it>
- # See COPYING for details.
-+import os
-+
- from setuptools import setup
-@@ -30,10 +32,11 @@ setup(
-     ],
-     license='ISC',
--    setup_requires=['vcversioner>=1'],
--    vcversioner={
--        'version_module_paths': ['txsocksx/_version.py'],
--    },
-+    #setup_requires=['vcversioner>=1'],
-+    #vcversioner={
-+    #    'version_module_paths': ['txsocksx/_version.py'],
-+    #},
-+    version=os.environ.get('PKG_VERSION'),
-     install_requires=install_requires,
-     packages=['txsocksx'],
- )
index 7802c1ab37dc44af5cd623031dfbc68332be81b2..d291773f5db636d2da2ba42bfcdcc0ecb57ab524 100644 (file)
@@ -21,7 +21,6 @@ PKG_HASH:=f3c5fd51747d450d4dcf6f923c81f78f811aab8205fda64b0aba34a4e48b0745
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
 define Package/python-urllib3/Default
@@ -32,16 +31,6 @@ define Package/python-urllib3/Default
   URL:=https://urllib3.readthedocs.io/
 endef
 
-define Package/python-urllib3
-$(call Package/python-urllib3/Default)
-  DEPENDS:=+PACKAGE_python-urllib3:python
-  VARIANT:=python
-endef
-
-define Package/python-urllib3/description
-  HTTP library with thread-safe connection pooling, file post, and more.
-endef
-
 define Package/python3-urllib3
 $(call Package/python-urllib3/Default)
   DEPENDS:=+PACKAGE_python3-urllib3:python3
@@ -49,15 +38,11 @@ $(call Package/python-urllib3/Default)
 endef
 
 define Package/python3-urllib3/description
-$(call Package/python-urllib3/description)
+  HTTP library with thread-safe connection pooling, file post, and more.
 .
 (Variant for Python3)
 endef
 
-$(eval $(call PyPackage,python-urllib3))
-$(eval $(call BuildPackage,python-urllib3))
-$(eval $(call BuildPackage,python-urllib3-src))
-
 $(eval $(call Py3Package,python3-urllib3))
 $(eval $(call BuildPackage,python3-urllib3))
 $(eval $(call BuildPackage,python3-urllib3-src))
diff --git a/lang/python/python-version.mk b/lang/python/python-version.mk
deleted file mode 100644 (file)
index 2da2fa8..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-#
-# Copyright (C) 2016 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-PYTHON_VERSION:=2.7
-PYTHON_VERSION_MICRO:=17
-
-PYTHON_SETUPTOOLS_PKG_RELEASE:=1
-PYTHON_PIP_PKG_RELEASE:=1
-
-PYTHON_SETUPTOOLS_VERSION:=41.2.0
-PYTHON_PIP_VERSION:=19.2.3
index 910f82a51f107629d03d96a04b46c32898cdacf3..bcac10b079e0d031aeed746b49b8adb5e24136d5 100644 (file)
@@ -20,7 +20,6 @@ PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
 define Package/python-voluptuous/Default
@@ -31,13 +30,6 @@ define Package/python-voluptuous/Default
   URL:=https://github.com/alecthomas/voluptuous
 endef
 
-define Package/python-voluptuous
-$(call Package/python-voluptuous/Default)
-  DEPENDS:= \
-      +PACKAGE_python-voluptuous:python-light
-  VARIANT:=python
-endef
-
 define Package/python3-voluptuous
 $(call Package/python-voluptuous/Default)
   DEPENDS:= \
@@ -45,20 +37,12 @@ $(call Package/python-voluptuous/Default)
   VARIANT:=python3
 endef
 
-define Package/python-voluptuous/description
-It is primarily intended for validating data coming into Python as JSON, YAML, etc.
-endef
-
 define Package/python3-voluptuous/description
-$(call Package/python-voluptuous/description)
+It is primarily intended for validating data coming into Python as JSON, YAML, etc.
 .
 (Variant for Python3)
 endef
 
-$(eval $(call PyPackage,python-voluptuous))
-$(eval $(call BuildPackage,python-voluptuous))
-$(eval $(call BuildPackage,python-voluptuous-src))
-
 $(eval $(call Py3Package,python3-voluptuous))
 $(eval $(call BuildPackage,python3-voluptuous))
 $(eval $(call BuildPackage,python3-voluptuous-src))
index 2c8731469bd7a8a0d4e95102fd1a5c9b89389587..cdfde0cbc7331349978dfbf8dfa7b31cb6d5ab86 100644 (file)
@@ -9,11 +9,11 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-wcwidth
-PKG_VERSION:=0.1.8
+PKG_VERSION:=0.1.9
 PKG_RELEASE:=1
 
 PYPI_NAME:=wcwidth
-PKG_HASH:=f28b3e8a6483e5d49e7f8949ac1a78314e740333ae305b4ba5defd3e74fb37a8
+PKG_HASH:=ee73862862a156bf77ff92b09034fc4825dd3af9cf81bc5b360668d425f3c5f1
 
 PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
 PKG_LICENSE:=MIT
index 46eaeaeb13f7684c3ef30848a2f42d54ff6cecb7..cf0cb122508187555e081d95b7074a409f1f0a5f 100644 (file)
@@ -8,11 +8,11 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-yaml
-PKG_VERSION:=5.3
+PKG_VERSION:=5.3.1
 PKG_RELEASE:=1
 
 PYPI_NAME:=PyYAML
-PKG_HASH:=e9f45bd5b92c7974e59bcd2dcc8631a6b6cc380a904725fce7bc08872e691615
+PKG_HASH:=b8eac752c5e14d3eca0e6dd9199cd627518cb5ec06add0de9d32baeee6fe645d
 
 PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>
 PKG_LICENSE:=MIT
@@ -21,7 +21,6 @@ PKG_CPE_ID:=cpe:/a:pyyaml_project:pyyaml
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
 define Package/python-yaml/Default
@@ -33,39 +32,21 @@ define Package/python-yaml/Default
   DEPENDS:=+libyaml
 endef
 
-define Package/python-yaml
-$(call Package/python-yaml/Default)
-  DEPENDS+= \
-       +PACKAGE_python-yaml:python-light \
-       +PACKAGE_python-yaml:python-codecs
-  VARIANT:=python
-endef
-
 define Package/python3-yaml
 $(call Package/python-yaml/Default)
   DEPENDS+=+PACKAGE_python3-yaml:python3-light
   VARIANT:=python3
 endef
 
-define Package/python-yaml/description
-  PyYAML is a YAML parser and emitter for the Python programming language.
-endef
-
 define Package/python3-yaml/description
-$(call Package/python-yaml/description)
+  PyYAML is a YAML parser and emitter for the Python programming language.
 .
 (Variant for Python3)
 endef
 
-PYTHON_PKG_SETUP_GLOBAL_ARGS:=--with-libyaml
-PYTHON_PKG_SETUP_ARGS:=
 PYTHON3_PKG_SETUP_GLOBAL_ARGS:=--with-libyaml
 PYTHON3_PKG_SETUP_ARGS:=
 
-$(eval $(call PyPackage,python-yaml))
-$(eval $(call BuildPackage,python-yaml))
-$(eval $(call BuildPackage,python-yaml-src))
-
 $(eval $(call Py3Package,python3-yaml))
 $(eval $(call BuildPackage,python3-yaml))
 $(eval $(call BuildPackage,python3-yaml-src))
index 06bda5718585351f0b3f8bbc729f4e64f07fe1b7..e3852dcd5237c51cde9605fb81da662c994160f2 100644 (file)
@@ -8,11 +8,11 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-zope-interface
-PKG_VERSION:=5.0.1
+PKG_VERSION:=5.0.2
 PKG_RELEASE:=1
 
 PYPI_NAME:=zope.interface
-PKG_HASH:=dd0bc4016ec9ffa6d327bf3ba2f044c3ff376880661e5cc38c622e1ae023076f
+PKG_HASH:=67267aa6764f488833f92d9d6889239af92bd80b4c99cc76e7f847f660e660fa
 
 PKG_LICENSE:=ZPL-2.1
 PKG_LICENSE_FILES:=LICENSE.txt
@@ -20,7 +20,6 @@ PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
 define Package/python-zope-interface/Default
@@ -31,35 +30,21 @@ define Package/python-zope-interface/Default
   URL:=https://github.com/zopefoundation/zope.interface
 endef
 
-define Package/python-zope-interface
-$(call Package/python-zope-interface/Default)
-  DEPENDS:=+PACKAGE_python-zope-interface:python-light
-  VARIANT:=python
-endef
-
 define Package/python3-zope-interface
 $(call Package/python-zope-interface/Default)
   DEPENDS:=+PACKAGE_python3-zope-interface:python3-light
   VARIANT:=python3
 endef
 
-define Package/python-zope-interface/description
+define Package/python3-zope-interface/description
 This package provides an implementation of "object interfaces" for
 Python. Interfaces are a mechanism for labeling objects as conforming to
 a given API or contract. So, this package can be considered as
 implementation of the Design By Contract methodology support in Python.
-endef
-
-define Package/python3-zope-interface/description
-$(call Package/python-zope-interface/description)
 .
 (Variant for Python3)
 endef
 
-$(eval $(call PyPackage,python-zope-interface))
-$(eval $(call BuildPackage,python-zope-interface))
-$(eval $(call BuildPackage,python-zope-interface-src))
-
 $(eval $(call Py3Package,python3-zope-interface))
 $(eval $(call BuildPackage,python3-zope-interface))
 $(eval $(call BuildPackage,python3-zope-interface-src))
diff --git a/lang/python/python/Config-python-light.in b/lang/python/python/Config-python-light.in
deleted file mode 100644 (file)
index c6c2041..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-menu "Configuration"
-
-config PYTHON_BLUETOOTH_SUPPORT
-       bool "Enable Bluetooth support"
-       default n
-
-endmenu
diff --git a/lang/python/python/Makefile b/lang/python/python/Makefile
deleted file mode 100644 (file)
index c90617f..0000000
+++ /dev/null
@@ -1,380 +0,0 @@
-#
-# Copyright (C) 2006-2016 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-# For PYTHON_VERSION
-include ../python-version.mk
-
-PKG_NAME:=python
-PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO)
-PKG_RELEASE:=2
-
-PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz
-PKG_SOURCE_URL:=https://www.python.org/ftp/python/$(PKG_VERSION)
-PKG_HASH:=4d43f033cdbd0aa7b7023c81b0e986fd11e653b5248dac9144d508f11812ba41
-
-PKG_LICENSE:=Python/2.0
-PKG_LICENSE_FILES:=LICENSE Doc/copyright.rst Doc/license.rst Modules/_ctypes/darwin/LICENSE Modules/_ctypes/libffi/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 ../python-host.mk
-
-# For PyPackage
-include ../python-package.mk
-
-PKG_FIXUP:=autoreconf
-PKG_INSTALL:=1
-PKG_BUILD_PARALLEL:=1
-HOST_BUILD_PARALLEL:=1
-
-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
-
-PKG_BUILD_DEPENDS:=python/host
-HOST_BUILD_DEPENDS:=bzip2/host expat/host
-
-include $(INCLUDE_DIR)/host-build.mk
-include $(INCLUDE_DIR)/package.mk
-
-define Package/python/Default
-  SUBMENU:=Python
-  SECTION:=lang
-  CATEGORY:=Languages
-  TITLE:=Python $(PYTHON_VERSION) programming language
-  URL:=https://www.python.org/
-endef
-
-define Package/python/Default/description
- Python is a dynamic object-oriented programming language that can be used
- for many kinds of software development. It offers strong support for
- integration with other languages and tools, comes with extensive standard
- libraries, and can be learned in a few days. Many Python programmers
- report substantial productivity gains and feel the language encourages
- the development of higher quality, more maintainable code.
-endef
-
-define Package/python-base
-$(call Package/python/Default)
-  TITLE:=Python $(PYTHON_VERSION) interpreter
-  DEPENDS:=+libpthread +zlib
-endef
-
-define Package/python-base/description
-  This package contains only the interpreter and the bare minimum
-  for the interpreter to start.
-endef
-
-define Package/python-light
-$(call Package/python/Default)
-  TITLE:=Python $(PYTHON_VERSION) light installation
-  DEPENDS:=+python-base +libffi +libbz2 +PYTHON_BLUETOOTH_SUPPORT:bluez-libs
-endef
-
-define Package/python-light/config
-  source "$(SOURCE)/Config-python-light.in"
-endef
-
-define Package/python-light/description
-  This package is essentially the python-base package plus
-  a few of the rarely used (and big) libraries stripped out
-  into separate packages.
-endef
-
-PYTHON_LIB_FILES_DEL:=
-PYTHON_PACKAGES:=
-PYTHON_PACKAGES_DEPENDS:=
-define PyBasePackage
-  PYTHON_PACKAGES+=$(1)
-  ifeq ($(3),)
-    PYTHON_PACKAGES_DEPENDS+=$(1)
-  endif
-  PYTHON_LIB_FILES_DEL+=$(2)
-  define PyPackage/$(1)/filespec
-    ifneq ($(2),)
-      $(subst $(space),$(newline),$(foreach lib_file,$(2),+|$(lib_file)))
-      -|/usr/lib/python$(PYTHON_VERSION)/*/test
-      -|/usr/lib/python$(PYTHON_VERSION)/*/tests
-    endif
-  endef
-  PyPackage/$(1)/install?=:
-endef
-
-include ./files/python-package-*.mk
-
-define Package/python
-$(call Package/python/Default)
-  DEPENDS:=+python-light $(foreach package,$(PYTHON_PACKAGES_DEPENDS),+$(package))
-endef
-
-define Package/python/description
-  This package contains the (almost) full Python install.
-  It's python-light + all other packages.
-endef
-
-MAKE_FLAGS+=\
-       CROSS_COMPILE=yes \
-       LD="$(TARGET_CC)" \
-       PGEN=pgen2
-
-EXTRA_CFLAGS+= \
-       -DNDEBUG -fno-inline
-EXTRA_LDFLAGS+= \
-       -L$(PKG_BUILD_DIR)
-
-ENABLE_IPV6:=
-ifeq ($(CONFIG_IPV6),y)
-       ENABLE_IPV6 += --enable-ipv6
-endif
-
-PYTHON_FOR_BUILD:= \
-       _PYTHON_PROJECT_BASE=$(PKG_BUILD_DIR) \
-       _PYTHON_HOST_PLATFORM=linux2 \
-       PYTHONPATH="$(PKG_BUILD_DIR)/Lib:$(PKG_BUILD_DIR)/build/lib.linux2-$(PYTHON_VERSION)" \
-       _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata \
-       $(HOST_PYTHON_BIN)
-
-DISABLE_BLUETOOTH:= \
-    ac_cv_header_bluetooth_bluetooth_h=no \
-    ac_cv_header_bluetooth_h=no
-
-CONFIGURE_ARGS+= \
-       --sysconfdir=/etc \
-       --enable-shared \
-       --without-cxx-main \
-       --with-threads \
-       --with-system-ffi \
-       --with-ensurepip=no \
-       --without-pymalloc \
-       $(if $(CONFIG_PYTHON_BLUETOOTH_SUPPORT),,$(DISABLE_BLUETOOTH)) \
-       PYTHON_FOR_BUILD="$(PYTHON_FOR_BUILD)" \
-       $(ENABLE_IPV6) \
-       CONFIG_SITE="$(PKG_BUILD_DIR)/config.site" \
-       OPT="$(TARGET_CFLAGS)"
-
-define Build/Prepare
-       $(call Build/Prepare/Default)
-       $(CP) ./files/config.site $(PKG_BUILD_DIR)/config.site
-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 \
-               --cache-dir "$(DL_DIR)/pip-cache" \
-               install \
-               --ignore-installed \
-               --root=$(PKG_BUILD_DIR)/install-setuptools \
-               --prefix=/usr \
-               $(PKG_BUILD_DIR)/Lib/ensurepip/_bundled/setuptools-$(PYTHON_SETUPTOOLS_VERSION)-py2.py3-none-any.whl
-       $(call PatchDir,$(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON_VERSION)/site-packages,./patches-setuptools,)
-endef
-endif # CONFIG_PACKAGE_python-setuptools
-
-ifdef CONFIG_PACKAGE_python-pip
-define Build/Compile/python-pip
-       $(HOST_PYTHON_PIP) \
-               --disable-pip-version-check \
-               --cache-dir "$(DL_DIR)/pip-cache" \
-               install \
-               --ignore-installed \
-               --root=$(PKG_BUILD_DIR)/install-pip \
-               --prefix=/usr \
-               $(PKG_BUILD_DIR)/Lib/ensurepip/_bundled/pip-$(PYTHON_PIP_VERSION)-py2.py3-none-any.whl
-       $(call PatchDir,$(PKG_BUILD_DIR)/install-pip/usr/lib/python$(PYTHON_VERSION)/site-packages,./patches-pip,)
-endef
-endif # CONFIG_PACKAGE_python-pip
-
-define Build/Compile
-       $(call Build/Compile/Default)
-       # Use host pip to install python-setuptools
-       $(call Build/Compile/python-setuptools)
-       $(call Build/Compile/python-pip)
-endef
-
-define Build/InstallDev
-       $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib $(1)/usr/lib/pkgconfig
-       $(INSTALL_DIR) $(2)/bin
-       $(INSTALL_DIR) $(1)/usr/lib/python$(PYTHON_VERSION)-openwrt
-       $(CP) \
-               $(PKG_INSTALL_DIR)/usr/include/python$(PYTHON_VERSION) \
-               $(1)/usr/include/
-       $(CP) \
-               $(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON_VERSION) \
-               $(PKG_INSTALL_DIR)/usr/lib/libpython$(PYTHON_VERSION).so* \
-               $(1)/usr/lib/
-       $(CP) \
-               $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/python*.pc \
-               $(1)/usr/lib/pkgconfig
-       $(INSTALL_BIN) \
-               ./files/python-config.in \
-               $(2)/bin/python$(PYTHON_VERSION)-config
-       $(SED) \
-               's|@EXENAME@|$(HOST_PYTHON_DIR)/bin/python$(PYTHON_VERSION)|' \
-               -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
-endef
-
-PYTHON_BASE_LIB_FILES:= \
-       /usr/lib/python$(PYTHON_VERSION)/_abcoll.py \
-       /usr/lib/python$(PYTHON_VERSION)/_sysconfigdata.py \
-       /usr/lib/python$(PYTHON_VERSION)/_weakrefset.py \
-       /usr/lib/python$(PYTHON_VERSION)/abc.py \
-       /usr/lib/python$(PYTHON_VERSION)/copy_reg.py \
-       /usr/lib/python$(PYTHON_VERSION)/genericpath.py \
-       /usr/lib/python$(PYTHON_VERSION)/linecache.py \
-       /usr/lib/python$(PYTHON_VERSION)/posixpath.py \
-       /usr/lib/python$(PYTHON_VERSION)/os.py \
-       /usr/lib/python$(PYTHON_VERSION)/re.py \
-       /usr/lib/python$(PYTHON_VERSION)/site.py \
-       /usr/lib/python$(PYTHON_VERSION)/sre_compile.py \
-       /usr/lib/python$(PYTHON_VERSION)/sre_constants.py \
-       /usr/lib/python$(PYTHON_VERSION)/sre_parse.py \
-       /usr/lib/python$(PYTHON_VERSION)/sysconfig.py \
-       /usr/lib/python$(PYTHON_VERSION)/stat.py \
-       /usr/lib/python$(PYTHON_VERSION)/traceback.py \
-       /usr/lib/python$(PYTHON_VERSION)/types.py \
-       /usr/lib/python$(PYTHON_VERSION)/UserDict.py \
-       /usr/lib/python$(PYTHON_VERSION)/warnings.py
-
-PYTHON_LIB_FILES_DEL+=$(PYTHON_BASE_LIB_FILES)
-
-define PyPackage/python-base/filespec
-+|/usr/bin/python$(PYTHON_VERSION)
-$(subst $(space),$(newline),$(foreach lib_file,$(PYTHON_BASE_LIB_FILES),+|$(lib_file)))
-endef
-
-define PyPackage/python-light/filespec
-+|/usr/lib/python$(PYTHON_VERSION)
--|/usr/lib/python$(PYTHON_VERSION)/distutils/cygwinccompiler.py
--|/usr/lib/python$(PYTHON_VERSION)/distutils/command/wininst*
--|/usr/lib/python$(PYTHON_VERSION)/ensurepip
--|/usr/lib/python$(PYTHON_VERSION)/idlelib
--|/usr/lib/python$(PYTHON_VERSION)/lib-tk
--|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_testcapi.so
--|/usr/lib/python$(PYTHON_VERSION)/pdb.doc
--|/usr/lib/python$(PYTHON_VERSION)/test
--|/usr/lib/python$(PYTHON_VERSION)/webbrowser.py
--|/usr/lib/python$(PYTHON_VERSION)/*/test
--|/usr/lib/python$(PYTHON_VERSION)/*/tests
--|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/readline.so
-$(subst $(space),$(newline),$(foreach lib_file,$(PYTHON_LIB_FILES_DEL),-|$(lib_file)))
-endef
-
-define PyPackage/python-base/install
-       $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib
-       $(LN) python$(PYTHON_VERSION) $(1)/usr/bin/python
-       $(LN) python$(PYTHON_VERSION) $(1)/usr/bin/python2
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpython$(PYTHON_VERSION).so* $(1)/usr/lib/
-endef
-
-PyPackage/python-light/install:=:
-PyPackage/python/install:=:
-
-define PyPackage/python/filespec
--|$(PYTHON_PKG_DIR)
-endef
-
-HOST_LDFLAGS += \
-       -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 \
-       --with-threads \
-       --prefix=$(HOST_PYTHON_DIR) \
-       --exec-prefix=$(HOST_PYTHON_DIR) \
-       --with-system-expat=$(STAGING_DIR_HOSTPKG) \
-       --with-ensurepip=upgrade \
-       CONFIG_SITE=
-
-define Host/Configure
-       $(SED) 's/^ENABLE_USER_SITE = None$$$$/ENABLE_USER_SITE = False/' $(HOST_BUILD_DIR)/Lib/site.py
-       $(call Host/Configure/Default)
-endef
-
-define Host/Compile
-       $(call Host/Compile/Default,python Parser/pgen sharedmods)
-endef
-
-define Host/Install
-       $(if $(wildcard $(HOST_PYTHON_PKG_DIR)/.setuptools_installed_$(PYTHON_SETUPTOOLS_VERSION)-$(PYTHON_SETUPTOOLS_PKG_RELEASE)),,
-               rm -rf \
-                       $(HOST_PYTHON_PKG_DIR)/easy_install.py \
-                       $(HOST_PYTHON_PKG_DIR)/pkg_resources \
-                       $(HOST_PYTHON_PKG_DIR)/setuptools \
-                       $(HOST_PYTHON_PKG_DIR)/setuptools-* \
-                       $(HOST_PYTHON_PKG_DIR)/.setuptools-patched* \
-                       $(HOST_PYTHON_PKG_DIR)/.setuptools_installed_*
-       )
-       $(if $(wildcard $(HOST_PYTHON_PKG_DIR)/.pip_installed_$(PYTHON_PIP_VERSION)-$(PYTHON_PIP_PKG_RELEASE)),,
-               rm -rf \
-                       $(HOST_PYTHON_PKG_DIR)/pip \
-                       $(HOST_PYTHON_PKG_DIR)/pip-* \
-                       $(HOST_PYTHON_PKG_DIR)/.pip-patched* \
-                       $(HOST_PYTHON_PKG_DIR)/.pip_installed_*
-       )
-       $(MAKE) -C $(HOST_BUILD_DIR) install
-       $(INSTALL_DIR) $(HOST_PYTHON_DIR)/bin/
-       $(INSTALL_BIN) $(HOST_BUILD_DIR)/Parser/pgen $(HOST_PYTHON_DIR)/bin/pgen2
-       $(if $(wildcard $(HOST_PYTHON_PKG_DIR)/.setuptools_installed_$(PYTHON_SETUPTOOLS_VERSION)-$(PYTHON_SETUPTOOLS_PKG_RELEASE)),,
-               $(call HostPatchDir,$(HOST_PYTHON_PKG_DIR),./patches-setuptools,)
-               touch $(HOST_PYTHON_PKG_DIR)/.setuptools_installed_$(PYTHON_SETUPTOOLS_VERSION)-$(PYTHON_SETUPTOOLS_PKG_RELEASE)
-       )
-       $(if $(wildcard $(HOST_PYTHON_PKG_DIR)/.pip_installed_$(PYTHON_PIP_VERSION)-$(PYTHON_PIP_PKG_RELEASE)),,
-               $(call HostPatchDir,$(HOST_PYTHON_PKG_DIR),./patches-pip,)
-               touch $(HOST_PYTHON_PKG_DIR)/.pip_installed_$(PYTHON_PIP_VERSION)-$(PYTHON_PIP_PKG_RELEASE)
-       )
-endef
-
-$(eval $(call HostBuild))
-
-$(foreach package, $(PYTHON_PACKAGES),  \
-       $(eval $(call PyPackage,$(package))) \
-       $(eval $(call BuildPackage,$(package))) \
-       $(eval $(call BuildPackage,$(package)-src)) \
-)
-
-$(eval $(call PyPackage,python-base))
-$(eval $(call PyPackage,python-light))
-$(eval $(call PyPackage,python))
-
-$(eval $(call BuildPackage,python-base))
-$(eval $(call BuildPackage,python-light))
-$(eval $(call BuildPackage,python))
-
-$(eval $(call BuildPackage,python-base-src))
-$(eval $(call BuildPackage,python-light-src))
diff --git a/lang/python/python/files/config.site b/lang/python/python/files/config.site
deleted file mode 100644 (file)
index cfa56b8..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#! /bin/sh
-#
-# Copyright (C) 2007-2014 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-ac_cv_file__dev_ptmx=yes
-ac_cv_file__dev_ptc=no
-ac_cv_buggy_getaddrinfo=no
-
diff --git a/lang/python/python/files/python-config.in b/lang/python/python/files/python-config.in
deleted file mode 100644 (file)
index c4a9c27..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-#!@EXENAME@
-
-import sys
-import os
-import getopt
-from distutils import sysconfig
-
-# start changes
-host_prefix = sysconfig.PREFIX
-
-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)
-
-try:
-    from _sysconfigdatatarget import build_time_vars
-    sysconfig._config_vars = {}
-    sysconfig._config_vars.update(build_time_vars)
-except ImportError:
-    print >>sys.stderr, "Could not import target data from %s" % (target_data_dir)
-    sys.exit(1)
-# end changes
-# plus .replace(host_prefix, target_prefix) below
-
-valid_opts = ['prefix', 'exec-prefix', 'includes', 'libs', 'cflags',
-              'ldflags', 'help']
-
-def exit_with_usage(code=1):
-    print >>sys.stderr, "Usage: %s [%s]" % (sys.argv[0],
-                                            '|'.join('--'+opt for opt in valid_opts))
-    sys.exit(code)
-
-try:
-    opts, args = getopt.getopt(sys.argv[1:], '', valid_opts)
-except getopt.error:
-    exit_with_usage()
-
-if not opts:
-    exit_with_usage()
-
-pyver = sysconfig.get_config_var('VERSION')
-getvar = sysconfig.get_config_var
-
-opt_flags = [flag for (flag, val) in opts]
-
-if '--help' in opt_flags:
-    exit_with_usage(code=0)
-
-for opt in opt_flags:
-    if opt == '--prefix':
-        #print sysconfig.PREFIX
-        print target_prefix
-
-    elif opt == '--exec-prefix':
-        #print sysconfig.EXEC_PREFIX
-        print target_prefix
-
-    elif opt in ('--includes', '--cflags'):
-        flags = ['-I' + sysconfig.get_python_inc(),
-                 '-I' + sysconfig.get_python_inc(plat_specific=True)]
-        if opt == '--cflags':
-            flags.extend(getvar('CFLAGS').split())
-        #print ' '.join(flags)
-        print ' '.join(flags).replace(host_prefix, target_prefix)
-
-    elif opt in ('--libs', '--ldflags'):
-        libs = ['-lpython' + pyver]
-        libs += getvar('LIBS').split()
-        libs += getvar('SYSLIBS').split()
-        # add the prefix/lib/pythonX.Y/config dir, but only if there is no
-        # shared library in prefix/lib/.
-        if opt == '--ldflags':
-            if not getvar('Py_ENABLE_SHARED'):
-                libs.insert(0, '-L' + getvar('LIBPL'))
-            if not getvar('PYTHONFRAMEWORK'):
-                libs.extend(getvar('LINKFORSHARED').split())
-        #print ' '.join(libs)
-        print ' '.join(libs).replace(host_prefix, target_prefix)
-
diff --git a/lang/python/python/files/python-package-codecs.mk b/lang/python/python/files/python-package-codecs.mk
deleted file mode 100644 (file)
index 7d3c615..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#
-# Copyright (C) 2006-2016 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Package/python-codecs
-$(call Package/python/Default)
-  TITLE:=Python $(PYTHON_VERSION) codecs + unicode support
-  DEPENDS:=+python-light
-endef
-
-$(eval $(call PyBasePackage,python-codecs, \
-       /usr/lib/python$(PYTHON_VERSION)/encodings \
-       /usr/lib/python$(PYTHON_VERSION)/lib-dynload/_codecs_cn.so \
-       /usr/lib/python$(PYTHON_VERSION)/lib-dynload/_codecs_hk.so \
-       /usr/lib/python$(PYTHON_VERSION)/lib-dynload/_codecs_iso2022.so \
-       /usr/lib/python$(PYTHON_VERSION)/lib-dynload/_codecs_jp.so \
-       /usr/lib/python$(PYTHON_VERSION)/lib-dynload/_codecs_kr.so \
-       /usr/lib/python$(PYTHON_VERSION)/lib-dynload/_codecs_tw.so \
-       /usr/lib/python$(PYTHON_VERSION)/lib-dynload/unicodedata.so \
-))
diff --git a/lang/python/python/files/python-package-compiler.mk b/lang/python/python/files/python-package-compiler.mk
deleted file mode 100644 (file)
index c840ce1..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-#
-# Copyright (C) 2006-2016 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Package/python-compiler
-$(call Package/python/Default)
-  TITLE:=Python $(PYTHON_VERSION) compiler module
-  DEPENDS:=+python-light
-endef
-
-$(eval $(call PyBasePackage,python-compiler, \
-       /usr/lib/python$(PYTHON_VERSION)/compiler \
-))
diff --git a/lang/python/python/files/python-package-ctypes.mk b/lang/python/python/files/python-package-ctypes.mk
deleted file mode 100644 (file)
index 5c34b7a..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# Copyright (C) 2006-2016 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Package/python-ctypes
-$(call Package/python/Default)
-  TITLE:=Python $(PYTHON_VERSION) ctypes module
-  DEPENDS:=+python-light
-endef
-
-$(eval $(call PyBasePackage,python-ctypes, \
-       /usr/lib/python$(PYTHON_VERSION)/ctypes \
-       /usr/lib/python$(PYTHON_VERSION)/lib-dynload/_ctypes.so \
-       /usr/lib/python$(PYTHON_VERSION)/lib-dynload/_ctypes_test.so \
-))
diff --git a/lang/python/python/files/python-package-db.mk b/lang/python/python/files/python-package-db.mk
deleted file mode 100644 (file)
index a257820..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# Copyright (C) 2006-2016 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Package/python-db
-$(call Package/python/Default)
-  TITLE:=Python $(PYTHON_VERSION) db module
-  DEPENDS:=+python-light +libdb47
-endef
-
-$(eval $(call PyBasePackage,python-db, \
-       /usr/lib/python$(PYTHON_VERSION)/bsddb \
-       /usr/lib/python$(PYTHON_VERSION)/lib-dynload/_bsddb.so \
-       /usr/lib/python$(PYTHON_VERSION)/lib-dynload/dbm.so \
-))
diff --git a/lang/python/python/files/python-package-decimal.mk b/lang/python/python/files/python-package-decimal.mk
deleted file mode 100644 (file)
index 578486d..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-#
-# Copyright (C) 2006-2016 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Package/python-decimal
-$(call Package/python/Default)
-  TITLE:=Python $(PYTHON_VERSION) decimal module
-  DEPENDS:=+python-light
-endef
-
-$(eval $(call PyBasePackage,python-decimal, \
-       /usr/lib/python$(PYTHON_VERSION)/decimal.py \
-))
diff --git a/lang/python/python/files/python-package-dev.mk b/lang/python/python/files/python-package-dev.mk
deleted file mode 100644 (file)
index 7c9e219..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-# Copyright (C) 2006-2016 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Package/python-dev
-$(call Package/python/Default)
-  TITLE:=Python $(PYTHON_VERSION) development files
-  DEPENDS:=+python +python-lib2to3
-endef
-
-define PyPackage/python-dev/install
-       $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/bin/python*config $(1)/usr/bin
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON_VERSION)/config/libpython$(PYTHON_VERSION).a $(1)/usr/lib
-endef
-
-$(eval $(call PyBasePackage,python-dev, \
-       /usr/lib/python$(PYTHON_VERSION)/config \
-       /usr/include/python$(PYTHON_VERSION) \
-       /usr/lib/pkgconfig \
-       , \
-       DO_NOT_ADD_TO_PACKAGE_DEPENDS \
-))
-
diff --git a/lang/python/python/files/python-package-distutils.mk b/lang/python/python/files/python-package-distutils.mk
deleted file mode 100644 (file)
index a139ddb..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-#
-# Copyright (C) 2006-2016 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Package/python-distutils
-$(call Package/python/Default)
-  TITLE:=Python $(PYTHON_VERSION) distutils
-  DEPENDS:=+python-light
-endef
-
-$(eval $(call PyBasePackage,python-distutils, \
-       /usr/lib/python$(PYTHON_VERSION)/distutils \
-))
diff --git a/lang/python/python/files/python-package-email.mk b/lang/python/python/files/python-package-email.mk
deleted file mode 100644 (file)
index 8c15583..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-#
-# Copyright (C) 2006-2016 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Package/python-email
-$(call Package/python/Default)
-  TITLE:=Python $(PYTHON_VERSION) email module
-  DEPENDS:=+python-light
-endef
-
-$(eval $(call PyBasePackage,python-email, \
-       /usr/lib/python$(PYTHON_VERSION)/email \
-))
diff --git a/lang/python/python/files/python-package-gdbm.mk b/lang/python/python/files/python-package-gdbm.mk
deleted file mode 100644 (file)
index 23c7a29..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-#
-# Copyright (C) 2006-2016 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Package/python-gdbm
-$(call Package/python/Default)
-  TITLE:=Python $(PYTHON_VERSION) gdbm module
-  DEPENDS:=+python-light +libgdbm
-endef
-
-$(eval $(call PyBasePackage,python-gdbm, \
-       /usr/lib/python$(PYTHON_VERSION)/lib-dynload/gdbm.so \
-))
diff --git a/lang/python/python/files/python-package-lib2to3.mk b/lang/python/python/files/python-package-lib2to3.mk
deleted file mode 100644 (file)
index 925cfe2..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# Copyright (C) 2006-2016 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Package/python-lib2to3
-$(call Package/python/Default)
-  TITLE:=Python $(PYTHON_VERSION) lib2to3 module
-  DEPENDS:=+python
-endef
-
-$(eval $(call PyBasePackage,python-lib2to3, \
-       /usr/lib/python$(PYTHON_VERSION)/lib2to3 \
-       , \
-       DO_NOT_ADD_TO_PACKAGE_DEPENDS \
-))
diff --git a/lang/python/python/files/python-package-logging.mk b/lang/python/python/files/python-package-logging.mk
deleted file mode 100644 (file)
index efef531..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-#
-# Copyright (C) 2006-2016 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Package/python-logging
-$(call Package/python/Default)
-  TITLE:=Python $(PYTHON_VERSION) logging module
-  DEPENDS:=+python-light
-endef
-
-$(eval $(call PyBasePackage,python-logging, \
-       /usr/lib/python$(PYTHON_VERSION)/logging \
-))
diff --git a/lang/python/python/files/python-package-multiprocessing.mk b/lang/python/python/files/python-package-multiprocessing.mk
deleted file mode 100644 (file)
index ccb55f5..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-#
-# Copyright (C) 2006-2016 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Package/python-multiprocessing
-$(call Package/python/Default)
-  TITLE:=Python $(PYTHON_VERSION) multiprocessing
-  DEPENDS:=+python-light
-endef
-
-$(eval $(call PyBasePackage,python-multiprocessing, \
-       /usr/lib/python$(PYTHON_VERSION)/multiprocessing \
-       /usr/lib/python$(PYTHON_VERSION)/lib-dynload/_multiprocessing.so \
-))
diff --git a/lang/python/python/files/python-package-ncurses.mk b/lang/python/python/files/python-package-ncurses.mk
deleted file mode 100644 (file)
index d952b50..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# Copyright (C) 2006-2016 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Package/python-ncurses
-$(call Package/python/Default)
-  TITLE:=Python $(PYTHON_VERSION) ncurses module
-  DEPENDS:=+python-light +libncurses
-endef
-
-$(eval $(call PyBasePackage,python-ncurses, \
-       /usr/lib/python$(PYTHON_VERSION)/curses \
-       /usr/lib/python$(PYTHON_VERSION)/lib-dynload/_curses.so \
-       /usr/lib/python$(PYTHON_VERSION)/lib-dynload/_curses_panel.so \
-))
diff --git a/lang/python/python/files/python-package-openssl.mk b/lang/python/python/files/python-package-openssl.mk
deleted file mode 100644 (file)
index dbf6fe1..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-#
-# Copyright (C) 2006-2016 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Package/python-openssl
-$(call Package/python/Default)
-  TITLE:=Python $(PYTHON_VERSION) SSL module
-  DEPENDS:=+python-light +libopenssl
-endef
-
-$(eval $(call PyBasePackage,python-openssl, \
-       /usr/lib/python$(PYTHON_VERSION)/lib-dynload/_hashlib.so \
-       /usr/lib/python$(PYTHON_VERSION)/lib-dynload/_ssl.so \
-))
diff --git a/lang/python/python/files/python-package-pip.mk b/lang/python/python/files/python-package-pip.mk
deleted file mode 100644 (file)
index 0a8b69a..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# Copyright (C) 2017 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Package/python-pip
-$(call Package/python/Default)
-  TITLE:=Python $(PYTHON_VERSION) pip module
-  VERSION:=$(PYTHON_PIP_VERSION)-$(PYTHON_PIP_PKG_RELEASE)
-  LICENSE:=MIT
-  LICENSE_FILES:=LICENSE.txt
-#  CPE_ID:=cpe:/a:python:pip # not currently handled this way by uscan
-  DEPENDS:=+python +python-setuptools +python-pip-conf
-endef
-
-define PyPackage/python-pip/install
-       $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib/python$(PYTHON_VERSION)/site-packages
-       $(CP) $(PKG_BUILD_DIR)/install-pip/usr/bin/* $(1)/usr/bin
-       $(CP) \
-               $(PKG_BUILD_DIR)/install-pip/usr/lib/python$(PYTHON_VERSION)/site-packages/pip \
-               $(PKG_BUILD_DIR)/install-pip/usr/lib/python$(PYTHON_VERSION)/site-packages/pip-$(PYTHON_PIP_VERSION).dist-info \
-               $(1)/usr/lib/python$(PYTHON_VERSION)/site-packages/
-endef
-
-$(eval $(call PyBasePackage,python-pip, \
-       , \
-       DO_NOT_ADD_TO_PACKAGE_DEPENDS \
-))
diff --git a/lang/python/python/files/python-package-pkg-resources.mk b/lang/python/python/files/python-package-pkg-resources.mk
deleted file mode 100644 (file)
index f0e819b..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# 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 \
-))
diff --git a/lang/python/python/files/python-package-pydoc.mk b/lang/python/python/files/python-package-pydoc.mk
deleted file mode 100644 (file)
index 1e3c385..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# Copyright (C) 2006-2016 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Package/python-pydoc
-$(call Package/python/Default)
-  TITLE:=Python $(PYTHON_VERSION) pydoc module
-  DEPENDS:=+python-light
-endef
-
-$(eval $(call PyBasePackage,python-pydoc, \
-       /usr/lib/python$(PYTHON_VERSION)/doctest.py \
-       /usr/lib/python$(PYTHON_VERSION)/pydoc.py \
-       /usr/lib/python$(PYTHON_VERSION)/pydoc_data \
-))
diff --git a/lang/python/python/files/python-package-setuptools.mk b/lang/python/python/files/python-package-setuptools.mk
deleted file mode 100644 (file)
index 305a515..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-#
-# Copyright (C) 2017 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Package/python-setuptools
-$(call Package/python/Default)
-  TITLE:=Python $(PYTHON_VERSION) setuptools module
-  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 +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/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 \
-               $(1)/usr/lib/python$(PYTHON_VERSION)/site-packages
-endef
-
-$(eval $(call PyBasePackage,python-setuptools, \
-       , \
-       DO_NOT_ADD_TO_PACKAGE_DEPENDS \
-))
diff --git a/lang/python/python/files/python-package-sqlite3.mk b/lang/python/python/files/python-package-sqlite3.mk
deleted file mode 100644 (file)
index 22a6fbc..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-#
-# Copyright (C) 2006-2016 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Package/python-sqlite3
-$(call Package/python/Default)
-  TITLE:=Python $(PYTHON_VERSION) sqlite3 module
-  DEPENDS:=+python-light +libsqlite3
-endef
-
-$(eval $(call PyBasePackage,python-sqlite3, \
-       /usr/lib/python$(PYTHON_VERSION)/lib-dynload/_sqlite3.so \
-       /usr/lib/python$(PYTHON_VERSION)/sqlite3 \
-))
diff --git a/lang/python/python/files/python-package-unittest.mk b/lang/python/python/files/python-package-unittest.mk
deleted file mode 100644 (file)
index 3c93f51..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-#
-# Copyright (C) 2006-2016 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Package/python-unittest
-$(call Package/python/Default)
-  TITLE:=Python $(PYTHON_VERSION) unittest module
-  DEPENDS:=+python-light
-endef
-
-$(eval $(call PyBasePackage,python-unittest, \
-       /usr/lib/python$(PYTHON_VERSION)/unittest \
-))
diff --git a/lang/python/python/files/python-package-xml.mk b/lang/python/python/files/python-package-xml.mk
deleted file mode 100644 (file)
index 28e734e..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-#
-# Copyright (C) 2006-2016 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Package/python-xml
-$(call Package/python/Default)
-  TITLE:=Python $(PYTHON_VERSION) xml libs
-  DEPENDS:=+python-light +libexpat
-endef
-
-$(eval $(call PyBasePackage,python-xml, \
-       /usr/lib/python$(PYTHON_VERSION)/xml \
-       /usr/lib/python$(PYTHON_VERSION)/xmllib.py \
-       /usr/lib/python$(PYTHON_VERSION)/xmlrpclib.py \
-       /usr/lib/python$(PYTHON_VERSION)/lib-dynload/_elementtree.so \
-       /usr/lib/python$(PYTHON_VERSION)/lib-dynload/pyexpat.so \
-))
diff --git a/lang/python/python/patches-setuptools/001-reproducible.patch b/lang/python/python/patches-setuptools/001-reproducible.patch
deleted file mode 100644 (file)
index 32edc56..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=848136
-https://sources.debian.org/patches/python-setuptools/40.8.0-1/reproducible.diff/
-
-Index: b/setuptools/command/easy_install.py
-===================================================================
---- a/setuptools/command/easy_install.py
-+++ b/setuptools/command/easy_install.py
-@@ -436,7 +436,7 @@ consider to install to another location,
-             for spec in self.args:
-                 self.easy_install(spec, not self.no_deps)
-             if self.record:
--                outputs = self.outputs
-+                outputs = list(sorted(self.outputs))
-                 if self.root:  # strip any package prefix
-                     root_len = len(self.root)
-                     for counter in range(len(outputs)):
diff --git a/lang/python/python/patches-setuptools/002-sorted-requires.patch b/lang/python/python/patches-setuptools/002-sorted-requires.patch
deleted file mode 100644 (file)
index 2ad4795..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=804249
-https://sources.debian.org/patches/python-setuptools/40.8.0-1/sorted-requires.diff/
-
-Index: b/setuptools/command/egg_info.py
-===================================================================
---- a/setuptools/command/egg_info.py
-+++ b/setuptools/command/egg_info.py
-@@ -621,7 +621,7 @@ def warn_depends_obsolete(cmd, basename,
- def _write_requirements(stream, reqs):
-     lines = yield_lines(reqs or ())
-     append_cr = lambda line: line + '\n'
--    lines = map(append_cr, lines)
-+    lines = map(append_cr, sorted(lines))
-     stream.writelines(lines)
diff --git a/lang/python/python/patches-setuptools/003-PKG-INFO-output-reproducible.patch b/lang/python/python/patches-setuptools/003-PKG-INFO-output-reproducible.patch
deleted file mode 100644 (file)
index 15f34dc..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=894215
-https://sources.debian.org/patches/python-setuptools/40.8.0-1/PKG-INFO-output-reproducible.diff/
-
---- a/setuptools/dist.py
-+++ b/setuptools/dist.py
-@@ -191,7 +191,7 @@ def write_pkg_file(self, file):
-             self.long_description_content_type
-         )
-     if self.provides_extras:
--        for extra in self.provides_extras:
-+        for extra in sorted(self.provides_extras):
-             write_field('Provides-Extra', extra)
diff --git a/lang/python/python/patches/001-enable-zlib.patch b/lang/python/python/patches/001-enable-zlib.patch
deleted file mode 100644 (file)
index 5802e99..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-From 6eeab87bc852481e599325549c854b701bf2e39f Mon Sep 17 00:00:00 2001
-From: Alexandru Ardelean <aa@ocedo.com>
-Date: Thu, 25 Sep 2014 18:18:29 +0300
-Subject: [PATCH] enable zlib
-
----
- Modules/Setup.dist | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/Modules/Setup.dist
-+++ b/Modules/Setup.dist
-@@ -464,7 +464,7 @@ GLHACK=-Dclear=__GLclear
- # Andrew Kuchling's zlib module.
- # This require zlib 1.1.3 (or later).
- # See http://www.gzip.org/zlib/
--#zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz
-+zlib zlibmodule.c -lz
- # Interface to the Expat XML parser
- # More information on Expat can be found at www.libexpat.org.
diff --git a/lang/python/python/patches/002-do-not-add-include-dirs-when-cross-compiling.patch b/lang/python/python/patches/002-do-not-add-include-dirs-when-cross-compiling.patch
deleted file mode 100644 (file)
index da48819..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
---- a/setup.py
-+++ b/setup.py
-@@ -543,7 +543,8 @@ class PyBuildExt(build_ext):
-                         add_dir_to_list(dir_list, directory)
-         if os.path.normpath(sys.prefix) != '/usr' \
--                and not sysconfig.get_config_var('PYTHONFRAMEWORK'):
-+                and not sysconfig.get_config_var('PYTHONFRAMEWORK') \
-+                and not cross_compiling:
-             # OSX note: Don't add LIBDIR and INCLUDEDIR to building a framework
-             # (PYTHONFRAMEWORK is set) to avoid # linking problems when
-             # building a framework with different architectures than
diff --git a/lang/python/python/patches/003-do-not-compile-tests-at-build.patch b/lang/python/python/patches/003-do-not-compile-tests-at-build.patch
deleted file mode 100644 (file)
index 6ea72a1..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
---- a/Makefile.pre.in
-+++ b/Makefile.pre.in
-@@ -1133,6 +1133,7 @@ libinstall:      build_all $(srcdir)/Lib/$(PL
-               done; \
-       done
-       $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt
-+ifeq (@COMPILE_ALL_TESTS@,yes)
-       if test -d $(DESTDIR)$(LIBDEST)/distutils/tests; then \
-               $(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \
-                       $(DESTDIR)$(LIBDEST)/distutils/tests ; \
-@@ -1159,6 +1160,7 @@ libinstall:      build_all $(srcdir)/Lib/$(PL
-               $(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
-+endif
- # Create the PLATDIR source directory, if one wasn't distributed..
- $(srcdir)/Lib/$(PLATDIR):
diff --git a/lang/python/python/patches/004-do-not-write-bytes-codes.patch b/lang/python/python/patches/004-do-not-write-bytes-codes.patch
deleted file mode 100644 (file)
index 06c265c..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/Python/pythonrun.c
-+++ b/Python/pythonrun.c
-@@ -71,7 +71,7 @@ int Py_InteractiveFlag; /* Needed by Py_
- int Py_InspectFlag; /* Needed to determine whether to exit at SystemExit */
- int Py_NoSiteFlag; /* Suppress 'import site' */
- int Py_BytesWarningFlag; /* Warn on comparison between bytearray and unicode */
--int Py_DontWriteBytecodeFlag; /* Suppress writing bytecode files (*.py[co]) */
-+int Py_DontWriteBytecodeFlag = 1; /* Suppress writing bytecode files (*.py[co]) */
- int Py_UseClassExceptionsFlag = 1; /* Needed by bltinmodule.c: deprecated */
- int Py_FrozenFlag; /* Needed by getpath.c */
- int Py_UnicodeFlag = 0; /* Needed by compile.c */
diff --git a/lang/python/python/patches/005-fix-bluetooth-support.patch b/lang/python/python/patches/005-fix-bluetooth-support.patch
deleted file mode 100644 (file)
index 6448f63..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
---- a/configure
-+++ b/configure
-@@ -7084,7 +7084,7 @@ sys/param.h sys/poll.h sys/random.h sys/
- sys/termio.h sys/time.h \
- sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
- sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
--bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h sys/sysmacros.h
-+linux/tipc.h spawn.h util.h alloca.h sys/sysmacros.h
- do :
-   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
- ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-@@ -7306,6 +7306,24 @@ fi
- fi
-+# bluetooth/bluetooth.h has been known to not compile with -std=c99.
-+# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
-+SAVE_CFLAGS=$CFLAGS
-+CFLAGS="-std=c99 $CFLAGS"
-+for ac_header in bluetooth/bluetooth.h
-+do :
-+  ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
-+if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_BLUETOOTH_BLUETOOTH_H 1
-+_ACEOF
-+
-+fi
-+
-+done
-+
-+CFLAGS=$SAVE_CFLAGS
-+
- # On Linux, netlink.h requires asm/types.h
- for ac_header in linux/netlink.h
- do :
---- a/configure.ac
-+++ b/configure.ac
-@@ -1739,10 +1739,17 @@ sys/param.h sys/poll.h sys/random.h sys/
- sys/termio.h sys/time.h \
- sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
- sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
--bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h sys/sysmacros.h)
-+linux/tipc.h spawn.h util.h alloca.h sys/sysmacros.h)
- AC_HEADER_DIRENT
- AC_HEADER_MAJOR
-+# bluetooth/bluetooth.h has been known to not compile with -std=c99.
-+# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
-+SAVE_CFLAGS=$CFLAGS
-+CFLAGS="-std=c99 $CFLAGS"
-+AC_CHECK_HEADERS(bluetooth/bluetooth.h)
-+CFLAGS=$SAVE_CFLAGS
-+
- # On Linux, netlink.h requires asm/types.h
- AC_CHECK_HEADERS(linux/netlink.h,,,[
- #ifdef HAVE_ASM_TYPES_H
diff --git a/lang/python/python/patches/006-remove-multi-arch-and-local-paths.patch b/lang/python/python/patches/006-remove-multi-arch-and-local-paths.patch
deleted file mode 100644 (file)
index 806b7af..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
---- a/setup.py
-+++ b/setup.py
-@@ -500,13 +500,8 @@ class PyBuildExt(build_ext):
-             os.unlink(tmpfile)
-     def detect_modules(self):
--        # Ensure that /usr/local is always used
--        if not cross_compiling:
--            add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
--            add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
-         if cross_compiling:
-             self.add_gcc_paths()
--        self.add_multiarch_paths()
-         # Add paths specified in the environment variables LDFLAGS and
-         # CPPFLAGS for header and library files.
diff --git a/lang/python/python/patches/007-distutils-do-not-adjust-path.patch b/lang/python/python/patches/007-distutils-do-not-adjust-path.patch
deleted file mode 100644 (file)
index 49fe926..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/Lib/distutils/command/build_scripts.py
-+++ b/Lib/distutils/command/build_scripts.py
-@@ -89,6 +89,7 @@ class build_scripts (Command):
-                     adjust = 1
-                     post_interp = match.group(1) or ''
-+            adjust = 0
-             if adjust:
-                 log.info("copying and adjusting %s -> %s", script,
-                          self.build_dir)
diff --git a/lang/python/python/patches/008-distutils-use-python-sysroot.patch b/lang/python/python/patches/008-distutils-use-python-sysroot.patch
deleted file mode 100644 (file)
index 4aeb7ff..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-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.
-
-The _python_sysroot variable is also used to prefix the LIBDIR value
-taken from the sysconfigdata module.
-
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-
---- a/Lib/distutils/sysconfig.py
-+++ b/Lib/distutils/sysconfig.py
-@@ -19,8 +19,13 @@ import sys
- from distutils.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)
-+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'))
-+else:
-+    PREFIX = os.path.normpath(sys.prefix)
-+    EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
- # Path to the base directory of the project. On Windows the binary may
- # live in project/PCBuild9.  If we're dealing with an x64 Windows build,
---- a/Lib/distutils/command/build_ext.py
-+++ b/Lib/distutils/command/build_ext.py
-@@ -240,7 +240,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('.')
diff --git a/lang/python/python/patches/009-do-not-use-dblib_dir-when-cross-compiling.patch b/lang/python/python/patches/009-do-not-use-dblib_dir-when-cross-compiling.patch
deleted file mode 100644 (file)
index a40aec8..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
---- a/setup.py
-+++ b/setup.py
-@@ -1129,6 +1129,7 @@ class PyBuildExt(build_ext):
-                         if db_setup_debug: print "db lib: ", dblib, "not found"
-         except db_found:
-+            rt_dblib_dir = None if cross_compiling else dblib_dir
-             if db_setup_debug:
-                 print "bsddb using BerkeleyDB lib:", db_ver, dblib
-                 print "bsddb lib dir:", dblib_dir, " inc dir:", db_incdir
-@@ -1143,7 +1144,7 @@ class PyBuildExt(build_ext):
-             exts.append(Extension('_bsddb', ['_bsddb.c'],
-                                   depends = ['bsddb.h'],
-                                   library_dirs=dblib_dir,
--                                  runtime_library_dirs=dblib_dir,
-+                                  runtime_library_dirs=rt_dblib_dir,
-                                   include_dirs=db_incs,
-                                   libraries=dblibs))
-         else:
-@@ -1354,10 +1355,11 @@ class PyBuildExt(build_ext):
-                             break
-                 elif cand == "bdb":
-                     if db_incs is not None:
-+                        rt_dblib_dir = None if cross_compiling else dblib_dir
-                         print "building dbm using bdb"
-                         dbmext = Extension('dbm', ['dbmmodule.c'],
-                                            library_dirs=dblib_dir,
--                                           runtime_library_dirs=dblib_dir,
-+                                           runtime_library_dirs=rt_dblib_dir,
-                                            include_dirs=db_incs,
-                                            define_macros=[
-                                                ('HAVE_BERKDB_H', None),
diff --git a/lang/python/python/patches/010-do-not-add-rt-lib-dirs-when-cross-compiling.patch b/lang/python/python/patches/010-do-not-add-rt-lib-dirs-when-cross-compiling.patch
deleted file mode 100644 (file)
index 925fa97..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/setup.py
-+++ b/setup.py
-@@ -509,8 +509,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).
-+        rt_lib_dirs = [] if cross_compiling else self.compiler.runtime_library_dirs
-         for env_var, arg_name, dir_list in (
--                ('LDFLAGS', '-R', self.compiler.runtime_library_dirs),
-+                ('LDFLAGS', '-R', rt_lib_dirs),
-                 ('LDFLAGS', '-L', self.compiler.library_dirs),
-                 ('CPPFLAGS', '-I', self.compiler.include_dirs)):
-             env_val = sysconfig.get_config_var(env_var)
diff --git a/lang/python/python/patches/012-add-support-source-date-epoch-pyc.patch b/lang/python/python/patches/012-add-support-source-date-epoch-pyc.patch
deleted file mode 100644 (file)
index 282a6fb..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/Lib/py_compile.py
-+++ b/Lib/py_compile.py
-@@ -108,6 +108,7 @@ def compile(file, cfile=None, dfile=None
-             timestamp = long(os.fstat(f.fileno()).st_mtime)
-         except AttributeError:
-             timestamp = long(os.stat(file).st_mtime)
-+        timestamp = long(os.getenv('SOURCE_DATE_EPOCH', timestamp))
-         codestring = f.read()
-     try:
-         codeobject = __builtin__.compile(codestring, dfile or file,'exec')
diff --git a/lang/python/python/patches/013-getbuildinfo-date-time-source-date-epoch.patch b/lang/python/python/patches/013-getbuildinfo-date-time-source-date-epoch.patch
deleted file mode 100644 (file)
index f6891d7..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
---- a/Makefile.pre.in
-+++ b/Makefile.pre.in
-@@ -634,6 +634,16 @@ regen-all: regen-opcode-targets regen-gr
- ############################################################################
- # Special rules for object files
-+DATE_FMT = %b %d %Y
-+TIME_FMT = %H:%M:%S
-+ifdef SOURCE_DATE_EPOCH
-+      BUILD_DATE ?= $(shell date -u -d "@$(SOURCE_DATE_EPOCH)" "+$(DATE_FMT)"  2>/dev/null || date -u -r "$(SOURCE_DATE_EPOCH)" "+$(DATE_FMT)" 2>/dev/null || date -u "+$(DATE_FMT)")
-+      BUILD_TIME ?= $(shell date -u -d "@$(SOURCE_DATE_EPOCH)" "+$(TIME_FMT)"  2>/dev/null || date -u -r "$(SOURCE_DATE_EPOCH)" "+$(TIME_FMT)" 2>/dev/null || date -u "+$(TIME_FMT)")
-+else
-+      BUILD_DATE ?= $(shell date "+$(DATE_FMT)")
-+      BUILD_TIME ?= $(shell date "+$(TIME_FMT)")
-+endif
-+
- Modules/getbuildinfo.o: $(PARSER_OBJS) \
-               $(OBJECT_OBJS) \
-               $(PYTHON_OBJS) \
-@@ -642,6 +652,8 @@ Modules/getbuildinfo.o: $(PARSER_OBJS) \
-               $(MODOBJS) \
-               $(srcdir)/Modules/getbuildinfo.c
-       $(CC) -c $(PY_CFLAGS) \
-+            -DDATE="\"$(BUILD_DATE)\"" \
-+            -DTIME="\"$(BUILD_TIME)\"" \
-             -DGITVERSION="\"`LC_ALL=C $(GITVERSION)`\"" \
-             -DGITTAG="\"`LC_ALL=C $(GITTAG)`\"" \
-             -DGITBRANCH="\"`LC_ALL=C $(GITBRANCH)`\"" \
diff --git a/lang/python/python/patches/021-compileall-add-recursion-option.patch b/lang/python/python/patches/021-compileall-add-recursion-option.patch
deleted file mode 100644 (file)
index 4a0485e..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
---- a/Lib/compileall.py
-+++ b/Lib/compileall.py
-@@ -152,10 +152,10 @@ def main():
-     """Script main program."""
-     import getopt
-     try:
--        opts, args = getopt.getopt(sys.argv[1:], 'lfqd:x:i:')
-+        opts, args = getopt.getopt(sys.argv[1:], 'lr:fqd:x:i:')
-     except getopt.error, msg:
-         print msg
--        print "usage: python compileall.py [-l] [-f] [-q] [-d destdir] " \
-+        print "usage: python compileall.py [-l] [-r recursion] [-f] [-q] [-d destdir] " \
-               "[-x regexp] [-i list] [directory|file ...]"
-         print
-         print "arguments: zero or more file and directory names to compile; " \
-@@ -164,6 +164,7 @@ def main():
-         print
-         print "options:"
-         print "-l: don't recurse into subdirectories"
-+        print "-r recursion: control the maximum recursion level"
-         print "-f: force rebuild even if timestamps are up-to-date"
-         print "-q: output only error messages"
-         print "-d destdir: directory to prepend to file paths for use in " \
-@@ -187,6 +188,7 @@ def main():
-     flist = None
-     for o, a in opts:
-         if o == '-l': maxlevels = 0
-+        if o == '-r': maxlevels = int(a)
-         if o == '-d': ddir = a
-         if o == '-f': force = 1
-         if o == '-q': quiet = 1
diff --git a/lang/python/python/patches/024-musl-find_library.patch b/lang/python/python/patches/024-musl-find_library.patch
deleted file mode 100644 (file)
index 70b5159..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-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
deleted file mode 100644 (file)
index 20d0310..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- 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/026-bpo-34585-Dont-do-runtime-test-to-get-float-byte-order-GH-9085.patch b/lang/python/python/patches/026-bpo-34585-Dont-do-runtime-test-to-get-float-byte-order-GH-9085.patch
deleted file mode 100644 (file)
index c72748d..0000000
+++ /dev/null
@@ -1,209 +0,0 @@
-From 2a9c3805ddedf282881ef7811a561c70b74f80b1 Mon Sep 17 00:00:00 2001
-From: Ross Burton <ross@burtonini.com>
-Date: Wed, 19 Sep 2018 07:25:48 +0100
-Subject: [PATCH] closes bpo-34585: Don't do runtime test to get float byte
- order. (GH-9085)
-
-Currently configure.ac uses AC_RUN_IFELSE to determine the byte order of doubles, but this silently fails under cross compilation and Python doesn't do floats properly.
-
-Instead, steal a macro from autoconf-archive which compiles code using magic doubles (which encode to ASCII) and grep for the representation in the binary.
-
-RFC because this doesn't yet handle the weird ancient ARMv4 OABI 'mixed-endian' encoding properly. This encoding is ancient and I don't believe the union of "Python 3.8 users" and "OABI users" has anything in. Should the support for this just be dropped too? Alternatively, someone will need to find an OABI toolchain to verify the encoding of the magic double.
----
- .../2018-09-18-16-28-31.bpo-34585.CGMu0h.rst  |  3 +
- configure.ac                                  | 76 +++--------------
- m4/ax_c_float_words_bigendian.m4              | 83 +++++++++++++++++++
- 3 files changed, 99 insertions(+), 63 deletions(-)
- create mode 100644 Misc/NEWS.d/next/Build/2018-09-18-16-28-31.bpo-34585.CGMu0h.rst
- create mode 100644 m4/ax_c_float_words_bigendian.m4
-
-diff --git a/Misc/NEWS.d/next/Build/2018-09-18-16-28-31.bpo-34585.CGMu0h.rst b/Misc/NEWS.d/next/Build/2018-09-18-16-28-31.bpo-34585.CGMu0h.rst
-new file mode 100644
-index 0000000000000..01318e6e46a32
---- /dev/null
-+++ b/Misc/NEWS.d/next/Build/2018-09-18-16-28-31.bpo-34585.CGMu0h.rst
-@@ -0,0 +1,3 @@
-+Check for floating-point byte order in configure.ac using compilation tests
-+instead of executing code, so that these checks work in cross-compiled
-+builds.
-diff --git a/configure.ac b/configure.ac
-index 03638f8ae9bc7..96331ec221be2 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -4206,74 +4206,24 @@ fi
- # * Check for various properties of floating point *
- # **************************************************
--AC_MSG_CHECKING(whether C doubles are little-endian IEEE 754 binary64)
--AC_CACHE_VAL(ac_cv_little_endian_double, [
--AC_RUN_IFELSE([AC_LANG_SOURCE([[
--#include <string.h>
--int main() {
--    double x = 9006104071832581.0;
--    if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
--        return 0;
--    else
--        return 1;
--}
--]])],
--[ac_cv_little_endian_double=yes],
--[ac_cv_little_endian_double=no],
--[ac_cv_little_endian_double=no])])
--AC_MSG_RESULT($ac_cv_little_endian_double)
--if test "$ac_cv_little_endian_double" = yes
--then
--  AC_DEFINE(DOUBLE_IS_LITTLE_ENDIAN_IEEE754, 1,
--  [Define if C doubles are 64-bit IEEE 754 binary format, stored
--   with the least significant byte first])
--fi
--
--AC_MSG_CHECKING(whether C doubles are big-endian IEEE 754 binary64)
--AC_CACHE_VAL(ac_cv_big_endian_double, [
--AC_RUN_IFELSE([AC_LANG_SOURCE([[
--#include <string.h>
--int main() {
--    double x = 9006104071832581.0;
--    if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
--        return 0;
--    else
--        return 1;
--}
--]])],
--[ac_cv_big_endian_double=yes],
--[ac_cv_big_endian_double=no],
--[ac_cv_big_endian_double=no])])
--AC_MSG_RESULT($ac_cv_big_endian_double)
--if test "$ac_cv_big_endian_double" = yes
-+AX_C_FLOAT_WORDS_BIGENDIAN
-+if test "$ax_cv_c_float_words_bigendian" = "yes"
- then
-   AC_DEFINE(DOUBLE_IS_BIG_ENDIAN_IEEE754, 1,
-   [Define if C doubles are 64-bit IEEE 754 binary format, stored
-    with the most significant byte first])
--fi
--
--# Some ARM platforms use a mixed-endian representation for doubles.
--# While Python doesn't currently have full support for these platforms
--# (see e.g., issue 1762561), we can at least make sure that float <-> string
--# conversions work.
--AC_MSG_CHECKING(whether C doubles are ARM mixed-endian IEEE 754 binary64)
--AC_CACHE_VAL(ac_cv_mixed_endian_double, [
--AC_RUN_IFELSE([AC_LANG_SOURCE([[
--#include <string.h>
--int main() {
--    double x = 9006104071832581.0;
--    if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
--        return 0;
--    else
--        return 1;
--}
--]])],
--[ac_cv_mixed_endian_double=yes],
--[ac_cv_mixed_endian_double=no],
--[ac_cv_mixed_endian_double=no])])
--AC_MSG_RESULT($ac_cv_mixed_endian_double)
--if test "$ac_cv_mixed_endian_double" = yes
-+elif test "$ax_cv_c_float_words_bigendian" = "no"
- then
-+  AC_DEFINE(DOUBLE_IS_LITTLE_ENDIAN_IEEE754, 1,
-+  [Define if C doubles are 64-bit IEEE 754 binary format, stored
-+   with the least significant byte first])
-+else
-+  # Some ARM platforms use a mixed-endian representation for doubles.
-+  # While Python doesn't currently have full support for these platforms
-+  # (see e.g., issue 1762561), we can at least make sure that float <-> string
-+  # conversions work.
-+  # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big
-+  # or little, then it must be this?
-   AC_DEFINE(DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754, 1,
-   [Define if C doubles are 64-bit IEEE 754 binary format, stored
-    in ARM mixed-endian order (byte order 45670123)])
-diff --git a/m4/ax_c_float_words_bigendian.m4 b/m4/ax_c_float_words_bigendian.m4
-new file mode 100644
-index 0000000000000..216b90d803187
---- /dev/null
-+++ b/m4/ax_c_float_words_bigendian.m4
-@@ -0,0 +1,83 @@
-+# ===============================================================================
-+#  https://www.gnu.org/software/autoconf-archive/ax_c_float_words_bigendian.html
-+# ===============================================================================
-+#
-+# SYNOPSIS
-+#
-+#   AX_C_FLOAT_WORDS_BIGENDIAN([ACTION-IF-TRUE], [ACTION-IF-FALSE], [ACTION-IF-UNKNOWN])
-+#
-+# DESCRIPTION
-+#
-+#   Checks the ordering of words within a multi-word float. This check is
-+#   necessary because on some systems (e.g. certain ARM systems), the float
-+#   word ordering can be different from the byte ordering. In a multi-word
-+#   float context, "big-endian" implies that the word containing the sign
-+#   bit is found in the memory location with the lowest address. This
-+#   implementation was inspired by the AC_C_BIGENDIAN macro in autoconf.
-+#
-+#   The endianness is detected by first compiling C code that contains a
-+#   special double float value, then grepping the resulting object file for
-+#   certain strings of ASCII values. The double is specially crafted to have
-+#   a binary representation that corresponds with a simple string. In this
-+#   implementation, the string "noonsees" was selected because the
-+#   individual word values ("noon" and "sees") are palindromes, thus making
-+#   this test byte-order agnostic. If grep finds the string "noonsees" in
-+#   the object file, the target platform stores float words in big-endian
-+#   order. If grep finds "seesnoon", float words are in little-endian order.
-+#   If neither value is found, the user is instructed to specify the
-+#   ordering.
-+#
-+# LICENSE
-+#
-+#   Copyright (c) 2008 Daniel Amelang <dan@amelang.net>
-+#
-+#   Copying and distribution of this file, with or without modification, are
-+#   permitted in any medium without royalty provided the copyright notice
-+#   and this notice are preserved. This file is offered as-is, without any
-+#   warranty.
-+
-+#serial 11
-+
-+AC_DEFUN([AX_C_FLOAT_WORDS_BIGENDIAN],
-+  [AC_CACHE_CHECK(whether float word ordering is bigendian,
-+                  ax_cv_c_float_words_bigendian, [
-+
-+ax_cv_c_float_words_bigendian=unknown
-+AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
-+
-+double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
-+
-+]])], [
-+
-+if grep noonsees conftest.$ac_objext >/dev/null ; then
-+  ax_cv_c_float_words_bigendian=yes
-+fi
-+if grep seesnoon conftest.$ac_objext >/dev/null ; then
-+  if test "$ax_cv_c_float_words_bigendian" = unknown; then
-+    ax_cv_c_float_words_bigendian=no
-+  else
-+    ax_cv_c_float_words_bigendian=unknown
-+  fi
-+fi
-+
-+])])
-+
-+case $ax_cv_c_float_words_bigendian in
-+  yes)
-+    m4_default([$1],
-+      [AC_DEFINE([FLOAT_WORDS_BIGENDIAN], 1,
-+                 [Define to 1 if your system stores words within floats
-+                  with the most significant word first])]) ;;
-+  no)
-+    $2 ;;
-+  *)
-+    m4_default([$3],
-+      [AC_MSG_ERROR([
-+
-+Unknown float word ordering. You need to manually preset
-+ax_cv_c_float_words_bigendian=no (or yes) according to your system.
-+
-+    ])]) ;;
-+esac
-+
-+])# AX_C_FLOAT_WORDS_BIGENDIAN
diff --git a/lang/python/python/patches/027-bpo-34585-run-autoconf-GH-9411-edited.patch b/lang/python/python/patches/027-bpo-34585-run-autoconf-GH-9411-edited.patch
deleted file mode 100644 (file)
index 137ed9a..0000000
+++ /dev/null
@@ -1,218 +0,0 @@
-From b3b8cb419e496629873fa7dda82a01863f58617a Mon Sep 17 00:00:00 2001
-From: Benjamin Peterson <benjamin@python.org>
-Date: Tue, 18 Sep 2018 23:49:05 -0700
-Subject: [PATCH] run autoconf (GH-9411)
-
-Follow up to 2a9c3805ddedf282881ef7811a561c70b74f80b1 (bpo-34585).
----
- aclocal.m4    |   1 +
- configure     | 146 ++++++++++++++++----------------------------------
- pyconfig.h.in |   4 ++
- 3 files changed, 51 insertions(+), 100 deletions(-)
-
-diff --git a/aclocal.m4 b/aclocal.m4
-index 6a24d8e6b9c00..030e6877de9f7 100644
---- a/aclocal.m4
-+++ b/aclocal.m4
-@@ -288,3 +288,4 @@ AS_VAR_COPY([$1], [pkg_cv_][$1])
- AS_VAR_IF([$1], [""], [$5], [$4])dnl
- ])dnl PKG_CHECK_VAR
-+m4_include([m4/ax_c_float_words_bigendian.m4])
-diff --git a/configure b/configure
-index 7b0c734b5e25e..38546d6ca7b40 100755
---- a/configure
-+++ b/configure
-@@ -13853,131 +13853,77 @@ fi
- # * Check for various properties of floating point *
- # **************************************************
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
--$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
--if ${ac_cv_little_endian_double+:} false; then :
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether float word ordering is bigendian" >&5
-+$as_echo_n "checking whether float word ordering is bigendian... " >&6; }
-+if ${ax_cv_c_float_words_bigendian+:} false; then :
-   $as_echo_n "(cached) " >&6
- else
--if test "$cross_compiling" = yes; then :
--  ac_cv_little_endian_double=no
--else
--  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+
-+ax_cv_c_float_words_bigendian=unknown
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
--#include <string.h>
--int main() {
--    double x = 9006104071832581.0;
--    if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
--        return 0;
--    else
--        return 1;
--}
--_ACEOF
--if ac_fn_c_try_run "$LINENO"; then :
--  ac_cv_little_endian_double=yes
--else
--  ac_cv_little_endian_double=no
--fi
--rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
--  conftest.$ac_objext conftest.beam conftest.$ac_ext
--fi
-+double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
--fi
--{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
--$as_echo "$ac_cv_little_endian_double" >&6; }
--if test "$ac_cv_little_endian_double" = yes
--then
-+_ACEOF
-+if ac_fn_c_try_compile "$LINENO"; then :
--$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
-+if grep noonsees conftest.$ac_objext >/dev/null ; then
-+  ax_cv_c_float_words_bigendian=yes
-+fi
-+if grep seesnoon conftest.$ac_objext >/dev/null ; then
-+  if test "$ax_cv_c_float_words_bigendian" = unknown; then
-+    ax_cv_c_float_words_bigendian=no
-+  else
-+    ax_cv_c_float_words_bigendian=unknown
-+  fi
- fi
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
--$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
--if ${ac_cv_big_endian_double+:} false; then :
--  $as_echo_n "(cached) " >&6
--else
--
--if test "$cross_compiling" = yes; then :
--  ac_cv_big_endian_double=no
--else
--  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
--/* end confdefs.h.  */
--
--#include <string.h>
--int main() {
--    double x = 9006104071832581.0;
--    if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
--        return 0;
--    else
--        return 1;
--}
--_ACEOF
--if ac_fn_c_try_run "$LINENO"; then :
--  ac_cv_big_endian_double=yes
--else
--  ac_cv_big_endian_double=no
- fi
--rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
--  conftest.$ac_objext conftest.beam conftest.$ac_ext
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_float_words_bigendian" >&5
-+$as_echo "$ax_cv_c_float_words_bigendian" >&6; }
--fi
-+case $ax_cv_c_float_words_bigendian in
-+  yes)
--{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
--$as_echo "$ac_cv_big_endian_double" >&6; }
--if test "$ac_cv_big_endian_double" = yes
--then
-+$as_echo "#define FLOAT_WORDS_BIGENDIAN 1" >>confdefs.h
-+ ;;
-+  no)
-+     ;;
-+  *)
-+    as_fn_error $? "
--$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
-+Unknown float word ordering. You need to manually preset
-+ax_cv_c_float_words_bigendian=no (or yes) according to your system.
--fi
-+    " "$LINENO" 5 ;;
-+esac
--# Some ARM platforms use a mixed-endian representation for doubles.
--# While Python doesn't currently have full support for these platforms
--# (see e.g., issue 1762561), we can at least make sure that float <-> string
--# conversions work.
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
--$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
--if ${ac_cv_mixed_endian_double+:} false; then :
--  $as_echo_n "(cached) " >&6
--else
--if test "$cross_compiling" = yes; then :
--  ac_cv_mixed_endian_double=no
--else
--  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
--/* end confdefs.h.  */
-+if test "$ax_cv_c_float_words_bigendian" = "yes"
-+then
--#include <string.h>
--int main() {
--    double x = 9006104071832581.0;
--    if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
--        return 0;
--    else
--        return 1;
--}
-+$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
--_ACEOF
--if ac_fn_c_try_run "$LINENO"; then :
--  ac_cv_mixed_endian_double=yes
--else
--  ac_cv_mixed_endian_double=no
--fi
--rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
--  conftest.$ac_objext conftest.beam conftest.$ac_ext
--fi
-+elif test "$ax_cv_c_float_words_bigendian" = "no"
-+then
--fi
-+$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
--{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
--$as_echo "$ac_cv_mixed_endian_double" >&6; }
--if test "$ac_cv_mixed_endian_double" = yes
--then
-+else
-+  # Some ARM platforms use a mixed-endian representation for doubles.
-+  # While Python doesn't currently have full support for these platforms
-+  # (see e.g., issue 1762561), we can at least make sure that float <-> string
-+  # conversions work.
-+  # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big
-+  # or little, then it must be this?
- $as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
-diff --git a/pyconfig.h.in b/pyconfig.h.in
-index 360f79994fafe..41e0479cad2e3 100644
---- a/pyconfig.h.in
-+++ b/pyconfig.h.in
-@@ -30,6 +30,10 @@
- /* Define if --enable-ipv6 is specified */
- #undef ENABLE_IPV6
-+/* Define to 1 if your system stores words within floats with the most
-+   significant word first */
-+#undef FLOAT_WORDS_BIGENDIAN
-+
- /* Define if flock needs to be linked with bsd library. */
- #undef FLOCK_NEEDS_LIBBSD
index 9c1078a36eb15cf3cbd006c3c2899d5a6194243a..c2e6a98b5a8481dfba81f62cc505b93a53fe4f77 100644 (file)
@@ -1,11 +1,11 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=asgiref
-PKG_VERSION:=3.2.5
+PKG_VERSION:=3.2.7
 PKG_RELEASE:=1
 
 PYPI_NAME:=asgiref
-PKG_HASH:=c8f49dd3b42edcc51d09dd2eea8a92b3cfc987ff7e6486be734b4d0cbfd5d315
+PKG_HASH:=8036f90603c54e93521e5777b2b9a39ba1bad05773fcf2d208f0299d1df58ce5
 
 PKG_MAINTAINER:=Peter Stadler <peter.stadler@student.uibk.ac.at>
 PKG_LICENSE:=BSD-3-Clause
index d20d19801a0497d13209c329ba197c78d3d50095..0f5621c9f7feb59b590348af3b57ba0e3061a769 100644 (file)
@@ -126,7 +126,7 @@ define Build/Compile/Py3Mod
 endef
 
 PYTHON3_PKG_SETUP_DIR ?=
-PYTHON3_PKG_SETUP_GLOABL_ARGS ?=
+PYTHON3_PKG_SETUP_GLOBAL_ARGS ?=
 PYTHON3_PKG_SETUP_ARGS ?= --single-version-externally-managed
 PYTHON3_PKG_SETUP_VARS ?=
 
index 120c083730fe152380b88d711ac80f04563fa1e3..db59f27394ab518caf8c48ac7f81c91615b82e4f 100644 (file)
@@ -13,7 +13,7 @@ PYTHON3_VERSION_MICRO:=2
 PYTHON3_VERSION:=$(PYTHON3_VERSION_MAJOR).$(PYTHON3_VERSION_MINOR)
 
 PYTHON3_SETUPTOOLS_PKG_RELEASE:=1
-PYTHON3_PIP_PKG_RELEASE:=1
+PYTHON3_PIP_PKG_RELEASE:=2
 
 PYTHON3_SETUPTOOLS_VERSION:=41.2.0
 PYTHON3_PIP_VERSION:=19.2.3
index a27d40a4e504dae7535afaa5bc504ab0106675e4..0182c99d824eb0c05df2c5ab59b59fa410eafcf4 100644 (file)
@@ -17,7 +17,8 @@ endef
 
 define Py3Package/python3-pip/install
        $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages
-       $(CP) $(PKG_BUILD_DIR)/install-pip/usr/bin/pip3* $(1)/usr/bin
+       $(CP) $(PKG_BUILD_DIR)/install-pip/usr/bin/pip$(PYTHON3_VERSION) $(1)/usr/bin
+       $(LN) pip$(PYTHON3_VERSION) $(1)/usr/bin/pip3
        $(CP) \
                $(PKG_BUILD_DIR)/install-pip/usr/lib/python$(PYTHON3_VERSION)/site-packages/pip \
                $(PKG_BUILD_DIR)/install-pip/usr/lib/python$(PYTHON3_VERSION)/site-packages/pip-$(PYTHON3_PIP_VERSION).dist-info \
index bf8119f6849594e423a82bc94ad5e29ca3bb9f65..0fa9f1a383fc99965979dc9e8377cf3f711da1f6 100644 (file)
@@ -20,7 +20,6 @@ PKG_LICENSE_FILES:=LICENSE
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
 define Package/ruamel-yaml/Default
@@ -31,13 +30,6 @@ define Package/ruamel-yaml/Default
   URL:=https://bitbucket.org/ruamel/yaml
 endef
 
-define Package/python-ruamel-yaml
-$(call Package/ruamel-yaml/Default)
-  DEPENDS:= \
-      +PACKAGE_python-ruamel-yaml:python-light
-  VARIANT:=python
-endef
-
 define Package/python3-ruamel-yaml
 $(call Package/ruamel-yaml/Default)
   DEPENDS:= \
@@ -45,20 +37,12 @@ $(call Package/ruamel-yaml/Default)
   VARIANT:=python3
 endef
 
-define Package/ruamel-yaml/description
-ruamel-yaml is a YAML parser/emitter that supports roundtrip preservation of comments, seq/map flow style, and map key order
-endef
-
 define Package/python3-ruamel-yaml/description
-$(call Package/ruamel-yaml/description)
+ruamel-yaml is a YAML parser/emitter that supports roundtrip preservation of comments, seq/map flow style, and map key order
 .
 (Variant for Python3)
 endef
 
-$(eval $(call PyPackage,python-ruamel-yaml))
-$(eval $(call BuildPackage,python-ruamel-yaml))
-$(eval $(call BuildPackage,python-ruamel-yaml-src))
-
 $(eval $(call Py3Package,python3-ruamel-yaml))
 $(eval $(call BuildPackage,python3-ruamel-yaml))
 $(eval $(call BuildPackage,python3-ruamel-yaml-src))
index cb351c53a3db630076001ed0101fac5365ce682d..88acb06f8a2e47083a6554becad0a1f6cb3163cd 100644 (file)
@@ -20,7 +20,6 @@ PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
 include ../python3-package.mk
 
 define Package/python-text-unidecode/Default
@@ -31,13 +30,6 @@ define Package/python-text-unidecode/Default
   URL:=https://github.com/kmike/text-unidecode/
 endef
 
-define Package/python-text-unidecode
-$(call Package/python-text-unidecode/Default)
-  DEPENDS:= \
-      +PACKAGE_python-text-unidecode:python-light
-  VARIANT:=python
-endef
-
 define Package/python3-text-unidecode
 $(call Package/python-text-unidecode/Default)
   DEPENDS:= \
@@ -45,20 +37,12 @@ $(call Package/python-text-unidecode/Default)
   VARIANT:=python3
 endef
 
-define Package/python-text-unidecode/description
-text-unidecode is the most basic port of the Text::Unidecode Perl library.
-endef
-
 define Package/python3-text-unidecode/description
-$(call Package/python-text-unidecode/description)
+text-unidecode is the most basic port of the Text::Unidecode Perl library.
 .
 (Variant for Python3)
 endef
 
-$(eval $(call PyPackage,python-text-unidecode))
-$(eval $(call BuildPackage,python-text-unidecode))
-$(eval $(call BuildPackage,python-text-unidecode-src))
-
 $(eval $(call Py3Package,python3-text-unidecode))
 $(eval $(call BuildPackage,python3-text-unidecode))
 $(eval $(call BuildPackage,python3-text-unidecode-src))
index 49e81e14383cdc54dc163ee55bf1137a6605ffa8..7afdd59c01dabec376ea8cdcf43ddb66f490a67c 100644 (file)
@@ -14,7 +14,6 @@ PKG_HASH:=96512aec74b90abb71f6b53898dd7fe47300cc940104c4f79148f0671f790101
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
 
-include ../python-package.mk
 include ../python3-package.mk
 
 define Package/python-vobject/Default
@@ -26,31 +25,18 @@ define Package/python-vobject/Default
   URL:=http://eventable.github.io/vobject/
 endef
 
-define Package/python-vobject
-$(call Package/python-vobject/Default)
-  DEPENDS:=+PACKAGE_python-vobject:python +PACKAGE_python-vobject:python-dateutil
-  VARIANT:=python
-endef
-
 define Package/python3-vobject
 $(call Package/python-vobject/Default)
   DEPENDS:=+PACKAGE_python3-vobject:python3 +PACKAGE_python3-vobject:python3-dateutil
   VARIANT:=python3
 endef
 
-define Package/python-vobject/description
-  vCard and vCalendar support for Python
-endef
-
 define Package/python3-vobject/description
-$(call Package/python-vobject/description)
+  vCard and vCalendar support for Python
 .
 (Variant for Python3)
 endef
 
-$(eval $(call PyPackage,python-vobject))
-$(eval $(call BuildPackage,python-vobject))
-$(eval $(call BuildPackage,python-vobject-src))
 $(eval $(call Py3Package,python3-vobject))
 $(eval $(call BuildPackage,python3-vobject))
 $(eval $(call BuildPackage,python3-vobject-src))
index 716b338fc724e9804776f994860a3c44203f3278..ccb1a45282845fc757dbd0d9cd2820e3409e3d9c 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=vala
-PKG_VERSION:=0.48.0
+PKG_VERSION:=0.48.2
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@GNOME/vala/0.48
-PKG_HASH:=0926b29614c82a67e36e95996e905ad052f7f7b02fe855b2d17bd14e155e10cc
+PKG_HASH:=f095b0e624b8f4e5a426028ac255e477fad8c3b4c8cbbdebda8d6cd95bf79477
 
 PKG_MAINTAINER:=
 PKG_LICENSE:=LGPL-2.1-or-later
@@ -44,5 +44,8 @@ HOST_CONFIGURE_ARGS += \
        --disable-valadoc \
        --without-cgraph
 
+HOST_LDFLAGS += \
+       -Wl,--rpath-link=$(STAGING_DIR_HOSTPKG)/lib
+
 $(eval $(call HostBuild))
 $(eval $(call BuildPackage,vala))
index f1bb01b0fcb41e954bf7595d2095a1163f9657ea..042b9f139709bf1c47faaa50dde00d3d566659a9 100644 (file)
@@ -64,7 +64,6 @@ This package provides the following run-time libraries:
  - log
  - math
  - program_options
- - python
  - python3
  - random
  - regex
@@ -80,10 +79,7 @@ There are many more header-only libraries supported by Boost.
 See more at http://www.boost.org/doc/libs/1_72_0/
 endef
 
-PKG_BUILD_DEPENDS:=boost/host PACKAGE_python:python PACKAGE_python3:python3
-
-include ../../lang/python/python-version.mk
-BOOST_PYTHON_VER=$(PYTHON_VERSION)
+PKG_BUILD_DEPENDS:=boost/host PACKAGE_python3:python3
 
 include ../../lang/python/python3-version.mk
 BOOST_PYTHON3_VER=$(PYTHON3_VERSION)
@@ -283,10 +279,10 @@ define Package/boost/config
 
                $(foreach lib,$(BOOST_LIBS), \
                        config PACKAGE_boost-$(lib)
-                       prompt "Boost $(lib) $(if $(findstring python,$(lib)),$(paren_left)v$(if $(findstring 3,$(lib)),$(BOOST_PYTHON3_VER),$(BOOST_PYTHON_VER))$(paren_right) ,)library."
+                       prompt "Boost $(lib) $(if $(findstring python3,$(lib)),$(paren_left)v$(BOOST_PYTHON3_VER)$(paren_right) ,)library."
                        default m if ALL
                        $(if $(findstring locale,$(lib)),depends on BUILD_NLS,)\
-                       $(if $(findstring python,$(lib)),depends on PACKAGE_$(lib),)\
+                       $(if $(findstring python3,$(lib)),depends on PACKAGE_python3,)\
                        $(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,)
@@ -346,7 +342,6 @@ $(eval $(call DefineBoostLibrary,log,system chrono date_time thread filesystem r
 $(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,python,,,PACKAGE_python))
 $(eval $(call DefineBoostLibrary,python3,,,PACKAGE_python3))
 $(eval $(call DefineBoostLibrary,random,system))
 $(eval $(call DefineBoostLibrary,regex))
@@ -425,7 +420,7 @@ define Build/Compile
                        $(if $(CONFIG_PACKAGE_boost-test),,--without-test) \
                        --without-python \
                        $(foreach lib,$(BOOST_LIBS), \
-                               $(if $(findstring python,$(lib)),, \
+                               $(if $(findstring python3,$(lib)),, \
                                        $(if $(CONFIG_PACKAGE_boost-$(lib)),, \
                                                $(if $(findstring wserialization,$(lib)),,--without-$(lib)) \
                                        ) \
@@ -437,32 +432,6 @@ define Build/Compile
                        $(if $(CONFIG_PACKAGE_boost-iostreams),-sNO_BZIP2=1 -sZLIB_INCLUDE=$(STAGING_DIR)/usr/include \
                                -sZLIB_LIBPATH=$(STAGING_DIR)/usr/lib) \
                        install ;\
-                       $(if $(CONFIG_PACKAGE_boost-python), \
-                               echo "using gcc : $(GCC_VERSION) : $(GNU_TARGET_NAME)-gcc : <compileflags>\"$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/python$(BOOST_PYTHON_VER)/ \" <cxxflags>\"$(TARGET_CXXFLAGS) $(EXTRA_CXXFLAGS)\" <linkflags>\"$(TARGET_LDFLAGS)\" ;" > \
-                                       tools/build/src/user-config.jam ; \
-                               echo "using python : $(BOOST_PYTHON_VER) : : $(STAGING_DIR)/usr/include/python$(BOOST_PYTHON_VER)/ : $(STAGING_DIR)/usr/lib/libpython$(BOOST_PYTHON_VER).so ;" >> \
-                                       tools/build/src/user-config.jam; \
-                               b2 -a \
-                                       $(CONFIGURE_ARGS) \
-                                       --ignore-site-config \
-                                       --toolset=gcc abi=$(BOOST_ABI) \
-                                       --disable-long-double \
-                                       $(if $(CONFIG_boost-variant-release), variant=release,) \
-                                       $(if $(CONFIG_boost-variant-debug), variant=debug,) \
-                                       $(if $(CONFIG_boost-variant-profile), variant=profile,) \
-                                       $(if $(CONFIG_boost-use-name-tags),--layout=tagged,--layout=system) \
-                                       $(if $(CONFIG_boost-build-type-complete),--build-type=complete,--build-type=minimal) \
-                                       $(if $(CONFIG_boost-shared-libs),link=shared,) \
-                                       $(if $(CONFIG_boost-static-libs),link=static,) \
-                                       $(if $(CONFIG_boost-static-and-shared-libs),link=static$(comma)shared,) \
-                                       $(if $(CONFIG_boost-runtime-shared),runtime-link=shared,) \
-                                       $(if $(CONFIG_boost-runtime-static),runtime-link=static,) \
-                                       $(if $(CONFIG_boost-runtime-static-and-shared),runtime-link=shared$(comma)static,) \
-                                       $(if $(CONFIG_boost-single-thread),threading=single,) \
-                                       threading=multi \
-                                       --with-python \
-                               install ;\
-                       ,) \
                        $(if $(CONFIG_PACKAGE_boost-python3), \
                                echo "using gcc : $(GCC_VERSION) : $(GNU_TARGET_NAME)-gcc : <compileflags>\"$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/python$(BOOST_PYTHON3_VER)/ \" <cxxflags>\"$(TARGET_CXXFLAGS) $(EXTRA_CXXFLAGS)\" <linkflags>\"$(TARGET_LDFLAGS)\" ;" > \
                                        tools/build/src/user-config.jam ; \
@@ -513,10 +482,7 @@ endef
 
 define Package/boost/Default/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(if $(findstring python,$(2)), $(if $(findstring 3,$(2)), \
-               $(CP) $(PKG_INSTALL_DIR)/lib/libboost_python3*.so* $(1)/usr/lib/ , \
-               $(CP) $(PKG_INSTALL_DIR)/lib/libboost_python2*.so* $(1)/usr/lib/ ), \
-       $(CP) $(PKG_INSTALL_DIR)/lib/libboost_$(2)*.so* $(1)/usr/lib/ )
+       $(CP) $(PKG_INSTALL_DIR)/lib/libboost_$(2)*.so* $(1)/usr/lib/
 endef
 
 define Package/boost-test/install
index b78253e3f88edf621facaee16c3597e4acc830d2..9bd3e379f997c735a85a0248d8c3a364ad33155d 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:=4
+PKG_RELEASE:=5
 
 # Use this for official releasees
 PKG_HASH:=51892570f18d1667d0da4d0908a091e41b41c20db9835765677109a3d150cd26
@@ -234,19 +234,6 @@ $(call Package/libelektra/Default-description)
 This package contains support for storing the key database as yaml files.
 endef
 
-
-define Package/libelektra-python2
-  $(call Package/libelektra/Default)
-  TITLE:=Elektra python2 plugin
-  DEPENDS:=+libelektra-core +python-light +libstdcpp
-endef
-
-define Package/libelektra-python2/description
-$(call Package/libelektra/Default-description)
-
-This package adds python2 support to elektra.
-endef
-
 define Package/libelektra-python3
   $(call Package/libelektra/Default)
   TITLE:=Elektra python3 plugin
@@ -304,7 +291,7 @@ CMAKE_OPTIONS = \
        -DKDB_DEFAULT_RESOLVER=resolver_fm_pb_b \
        -DKDB_DEFAULT_STORAGE=ini \
        -DENABLE_OPTIMIZATIONS=OFF \
-       -DPLUGINS="ALL;-multifile" \
+       -DPLUGINS="ALL;-multifile;-python2" \
        -DICONV_FIND_REQUIRED=ON \
        -DICONV_INCLUDE_DIR="$(ICONV_PREFIX)/include" \
        -DICONV_LIBRARY="$(ICONV_PREFIX)/lib"
@@ -409,11 +396,6 @@ define Package/libelektra-yamlcpp/install
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-yamlcpp.so $(1)/usr/lib/
 endef
 
-define Package/libelektra-python2/install
-       $(INSTALL_DIR) $(1)/usr/lib/
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-python2.so $(1)/usr/lib/
-endef
-
 define Package/libelektra-python3/install
        $(INSTALL_DIR) $(1)/usr/lib/
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-python.so $(1)/usr/lib/
@@ -451,7 +433,6 @@ $(eval $(call BuildPackage,libelektra-xerces))
 $(eval $(call BuildPackage,libelektra-yamlcpp))
 $(eval $(call BuildPackage,libelektra-xml))
 $(eval $(call BuildPackage,libelektra-yajl))
-$(eval $(call BuildPackage,libelektra-python2))
 $(eval $(call BuildPackage,libelektra-python3))
 $(eval $(call BuildPackage,libelektra-lua))
 $(eval $(call BuildPackage,libelektra-extra))
index 9271065acf56c16bcb6803acbdeffed3b60cccb0..62663a19209aedc8956a1c0c328b29e4e48716c5 100644 (file)
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gnutls
-PKG_VERSION:=3.6.12
+PKG_VERSION:=3.6.13
 PKG_RELEASE:=1
 PKG_USE_MIPS16:=0
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://www.gnupg.org/ftp/gcrypt/gnutls/v3.6
-PKG_HASH:=bfacf16e342949ffd977a9232556092c47164bd26e166736cf3459a870506c4b
+PKG_HASH:=32041df447d9f4644570cf573c9f60358e865637d69b7e59d1159b7240b52f38
 #PKG_FIXUP:=autoreconf gettext-version
 PKG_MAINTAINER:=Nikos Mavrogiannopoulos <nmav@gnutls.org>
 PKG_LICENSE:=LGPL-2.1-or-later
diff --git a/libs/jansson/Makefile b/libs/jansson/Makefile
deleted file mode 100644 (file)
index cea5132..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-#
-# Copyright (C) 2011-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:=jansson
-PKG_VERSION:=2.12
-PKG_RELEASE:=1
-PKG_LICENSE:=MIT
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=http://www.digip.org/jansson/releases/
-PKG_HASH:=645d72cc5dbebd4df608d33988e55aa42a7661039e19a379fcbe5c79d1aee1d2
-
-PKG_INSTALL:=1
-PKG_BUILD_PARALLEL:=1
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/jansson
-  SECTION:=libs
-  CATEGORY:=Libraries
-  TITLE:=Jansson library
-  URL:=http://www.digip.org/jansson/
-  MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
-endef
-
-define Package/jansson/description
-  Jansson is a C library for encoding, decoding and manipulating JSON data
-endef
-
-TARGET_CFLAGS += $(FPIC)
-TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib -lm
-
-define Build/InstallDev
-       $(INSTALL_DIR) $(1)/usr/{lib,include}
-       $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjansson* $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig
-       $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
-endef
-
-define Package/jansson/install
-       $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjansson*so* $(1)/usr/lib/
-endef
-
-$(eval $(call BuildPackage,jansson))
index 688cc45f8e4f2172fa358a0dd5629dce1ba15dfa..a3c5283499ea6d4f3842fb349e418c6a8248ceed 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libcap
 PKG_VERSION:=2.33
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@KERNEL/linux/libs/security/linux-privs/libcap2
@@ -84,14 +84,19 @@ TARGET_CFLAGS += $(if $(CONFIG_USE_MUSL),-Dpthread_yield=sched_yield)
 
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include/sys
-       $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
+       $(CP) $(PKG_INSTALL_DIR)/usr/include/sys/*.h $(1)/usr/include/sys/
        $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/lib/* $(1)/usr/lib/
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/lib/libcap.{so*,a} $(1)/usr/lib/
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/lib/libpsx.a $(1)/usr/lib/
        $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libcap.pc $(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
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libpsx.pc $(1)/usr/lib/pkgconfig/
+       $(SED) 's,exec_prefix=,exec_prefix=/usr,g' $(1)/usr/lib/pkgconfig/libpsx.pc
+       $(SED) 's,/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/libpsx.pc
+       $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/libpsx.pc
 endef
 
 define Package/libcap/install
index c1fb6de03088b7376e02602a2ee2925ebb235ed3..2545c78cf1dd701ea8dbd4aa033b402bd859ee9e 100644 (file)
@@ -2,17 +2,18 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libcgroup
 PKG_VERSION:=0.41
-PKG_RELEASE:=1
-PKG_LICENSE:=LGPL
-PKG_LICENSE_FILES:=COPYING
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=@SF/libcg
 PKG_HASH:=e4e38bdc7ef70645ce33740ddcca051248d56b53283c0dc6d404e17706f6fb51
+
 PKG_MAINTAINER:=Daniel Danzberger <daniel@dd-wrt.com>
+PKG_LICENSE:=LGPL-2.1-or-later
+PKG_LICENSE_FILES:=COPYING
 
+PKG_INSTALL:=1
 PKG_BUILD_PARALLEL:=1
-PKG_FIXUP:=autoreconf
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -20,7 +21,7 @@ define Package/libcgroup
   TITLE:=CGroup config and exec library
   SECTION:=libs
   CATEGORY:=Libraries
-  DEPENDS:=+musl-fts +@KERNEL_CGROUPS
+  DEPENDS:=+USE_MUSL:musl-fts +@KERNEL_CGROUPS
 endef
 
 define Package/cgroup-tools
@@ -33,27 +34,31 @@ define Package/libcgroup/description
   Helpers utils for working with cgroups.
 endef
 
-CONFIGURE_ARGS += --enable-tools \
-               --enable-shared \
-               --disable-daemon \
-               --disable-pam
+CONFIGURE_ARGS += \
+       --enable-tools \
+       --enable-shared \
+       --disable-daemon \
+       --disable-pam
+
+TARGET_LDFLAGS += $(if $(CONFIG_USE_MUSL),-lfts)
 
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib $(1)/usr/lib/pkgconfig
-       $(CP) $(PKG_BUILD_DIR)/include/libcgroup.h $(1)/usr/include
-       $(CP) $(PKG_BUILD_DIR)/include/libcgroup $(1)/usr/include
-       $(CP) $(PKG_BUILD_DIR)/src/.libs/libcgroup.so* $(1)/usr/lib
-       $(CP) $(PKG_BUILD_DIR)/libcgroup.pc $(1)/usr/lib/pkgconfig/
+       $(CP) $(PKG_INSTALL_DIR)/usr/include/libcgroup.h $(1)/usr/include
+       $(CP) $(PKG_INSTALL_DIR)/usr/include/libcgroup $(1)/usr/include
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcgroup.so* $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libcgroup.pc $(1)/usr/lib/pkgconfig/
 endef
 
 define Package/libcgroup/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_BUILD_DIR)/src/.libs/libcgroup.so* $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcgroup.so* $(1)/usr/lib
 endef
 
 define Package/cgroup-tools/install
-       $(INSTALL_DIR) $(1)/usr/bin
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/tools/.libs/* $(1)/usr/bin
+       $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin
 endef
 
 $(eval $(call BuildPackage,libcgroup))
diff --git a/libs/libcgroup/patches/0001-musl-fts-configure.patch b/libs/libcgroup/patches/0001-musl-fts-configure.patch
deleted file mode 100644 (file)
index f6079a6..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-diff --git a/configure.in b/configure.in
-index 75f4a51..f70b37c 100644
---- a/configure.in
-+++ b/configure.in
-@@ -193,6 +193,19 @@ if test x$with_pam = xtrue; then
-               header files!])])
- fi
-+AC_CHECK_LIB(
-+      [fts],
-+      [fts_open],
-+      [],
-+      [AC_MSG_ERROR([Cannot compile without fts!])]
-+)
-+
-+AC_CHECK_HEADERS(
-+      [fts.h],
-+      [],
-+      [AC_MSG_ERROR([Cannot compile without fts.h])]
-+)
-+
- AC_CONFIG_FILES([Makefile
-       tests/Makefile
-       tests/tools/testenv.sh
diff --git a/libs/libcgroup/patches/010-cdefs.patch b/libs/libcgroup/patches/010-cdefs.patch
new file mode 100644 (file)
index 0000000..c40cbb5
--- /dev/null
@@ -0,0 +1,240 @@
+--- a/include/libcgroup/config.h
++++ b/include/libcgroup/config.h
+@@ -5,12 +5,10 @@
+ #error "Only <libcgroup.h> should be included directly."
+ #endif
+-#ifndef SWIG
+-#include <features.h>
++#ifdef __cplusplus
++extern "C" {
+ #endif
+-__BEGIN_DECLS
+-
+ /**
+  * @defgroup group_config 5. Configuration
+  * @{
+@@ -107,6 +105,8 @@ int cgroup_config_create_template_group(
+  * @}
+  * @}
+  */
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+ #endif /*_LIBCGROUP_CONFIG_H*/
+--- a/include/libcgroup/error.h
++++ b/include/libcgroup/error.h
+@@ -5,12 +5,10 @@
+ #error "Only <libcgroup.h> should be included directly."
+ #endif
+-#ifndef SWIG
+-#include <features.h>
++#ifdef __cplusplus
++extern "C" {
+ #endif
+-__BEGIN_DECLS
+-
+ /**
+  * @defgroup group_errors 6. Error handling
+  * @{
+@@ -99,6 +97,8 @@ int cgroup_get_last_errno(void);
+  * @}
+  * @}
+  */
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+ #endif /* _LIBCGROUP_INIT_H */
+--- a/include/libcgroup/groups.h
++++ b/include/libcgroup/groups.h
+@@ -6,12 +6,13 @@
+ #endif
+ #ifndef SWIG
+-#include <features.h>
+ #include <sys/types.h>
+ #include <stdbool.h>
+ #endif
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ /**
+  * Flags for cgroup_delete_cgroup_ext().
+@@ -577,6 +578,8 @@ char *cgroup_get_cgroup_name(struct cgroup *cgroup);
+  */
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+ #endif /* _LIBCGROUP_GROUPS_H */
+--- a/include/libcgroup/init.h
++++ b/include/libcgroup/init.h
+@@ -5,12 +5,10 @@
+ #error "Only <libcgroup.h> should be included directly."
+ #endif
+-#ifndef SWIG
+-#include <features.h>
++#ifdef __cplusplus
++extern "C" {
+ #endif
+-__BEGIN_DECLS
+-
+ /**
+  * @defgroup group_init 1. Initialization
+  * @{
+@@ -58,6 +56,8 @@ int cgroup_get_subsys_mount_point(const char *controller, char **mount_point);
+  * @}
+  * @}
+  */
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+ #endif /* _LIBCGROUP_INIT_H */
+--- a/include/libcgroup/iterators.h
++++ b/include/libcgroup/iterators.h
+@@ -8,10 +8,11 @@
+ #ifndef SWIG
+ #include <sys/types.h>
+ #include <stdio.h>
+-#include <features.h>
+ #endif
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ /**
+  * @defgroup group_iterators 3. Iterators
+@@ -423,6 +424,8 @@ int cgroup_get_subsys_mount_point_end(void **handle);
+  * @}
+  */
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+ #endif /* _LIBCGROUP_ITERATORS_H */
+--- a/include/libcgroup/log.h
++++ b/include/libcgroup/log.h
+@@ -5,13 +5,11 @@
+ #error "Only <libcgroup.h> should be included directly."
+ #endif
+-#ifndef SWIG
+-#include <features.h>
+-#endif
+-
+ #include <stdarg.h>
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ /**
+  * @defgroup group_log 7. Logging
+@@ -142,6 +140,8 @@ extern int cgroup_parse_log_level_str(const char *levelstr);
+  * @}
+  * @}
+  */
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+ #endif /* _LIBCGROUP_LOG_H */
+--- a/include/libcgroup/tasks.h
++++ b/include/libcgroup/tasks.h
+@@ -8,11 +8,12 @@
+ #include <libcgroup/groups.h>
+ #ifndef SWIG
+-#include <features.h>
+ #include <stdbool.h>
+ #endif
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ /** Flags for cgroup_change_cgroup_uid_gid(). */
+ enum cgflags {
+@@ -204,6 +205,8 @@ int cgroup_register_unchanged_process(pid_t pid, int flags);
+  * @}
+  * @}
+  */
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+ #endif /* _LIBCGROUP_TASKS_H */
+--- a/src/daemon/cgrulesengd.h
++++ b/src/daemon/cgrulesengd.h
+@@ -15,9 +15,9 @@
+ #ifndef _CGRULESENGD_H
+ #define _CGRULESENGD_H
+-#include <features.h>
+-
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ #include "config.h"
+ #include "libcgroup.h"
+@@ -119,7 +119,9 @@ void cgre_flash_templates(int signum);
+  */
+ void cgre_catch_term(int signum);
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+ #endif /* _CGRULESENGD_H */
+--- a/src/libcgroup-internal.h
++++ b/src/libcgroup-internal.h
+@@ -16,7 +16,9 @@
+ #define __LIBCG_INTERNAL
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ #include "config.h"
+ #include <fts.h>
+@@ -279,6 +281,8 @@ extern void cgroup_dictionary_iterator_end(void **handle);
+  */
+ int cg_chmod_path(const char *path, mode_t mode, int owner_is_umask);
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+ #endif
index 2b410c2245194ed71338cd4d487ac66d4419b807..012eb4381f53012a2726805a7a0521f5e1cc6774 100644 (file)
@@ -8,19 +8,18 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libgd
-PKG_VERSION:=2.2.5
-PKG_RELEASE:=6
+PKG_VERSION:=2.3.0
+PKG_RELEASE:=3
 
 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_HASH:=ecd9155b9a417fb3f837f29e5966323796de247789163761dd72dbf83bfcac58
 
 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_CPE_ID:=cpe:/a:libgd:libgd
 
-CMAKE_INSTALL:=1
 PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
@@ -86,6 +85,7 @@ CMAKE_OPTIONS += \
        -DENABLE_JPEG=ON \
        -DENABLE_LIQ=OFF \
        -DENABLE_PNG=ON \
+       -DENABLE_TIFF=$(if $(CONFIG_LIBGD_TIFF),ON,OFF) \
        -DENABLE_WEBP=ON \
        -DENABLE_XPM=OFF \
        -DZLIB_INCLUDE_DIR="$(STAGING_DIR)/usr"
@@ -98,14 +98,6 @@ ifeq ($(BUILD_VARIANT),full)
 
 else
 
-ifdef CONFIG_LIBGD_TIFF
-       CMAKE_OPTIONS += \
-               -DENABLE_TIFF=ON
-else
-       CMAKE_OPTIONS += \
-               -DENABLE_TIFF=OFF
-endif
-
 ifdef CONFIG_LIBGD_FREETYPE
        CMAKE_OPTIONS += \
                -DFREETYPE_INCLUDE_DIRS=$(STAGING_DIR)/usr/include/freetype2/ \
@@ -117,6 +109,12 @@ endif
 
 endif
 
+define Build/InstallDev
+       $(call Build/InstallDev/cmake,$(1))
+       $(SED) 's,/usr/lib,$(STAGING_DIR)/usr/lib,g' $(1)/usr/lib/pkgconfig/gdlib.pc
+       $(SED) 's,/usr/include,$(STAGING_DIR)/include,g' $(1)/usr/lib/pkgconfig/gdlib.pc
+endef
+
 define Package/libgd/install
        $(INSTALL_DIR) $(1)/usr/lib
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgd.so* $(1)/usr/lib/
diff --git a/libs/libgd/patches/010-getlib.patch b/libs/libgd/patches/010-getlib.patch
new file mode 100644 (file)
index 0000000..00027e5
--- /dev/null
@@ -0,0 +1,61 @@
+From 635dd9a3065ed88e1741e6b963044b80e913f96a Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Tue, 24 Mar 2020 08:01:01 +0100
+Subject: [PATCH] distribute getlib.sh
+
+---
+ config/getlib.sh | 42 ++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 42 insertions(+)
+ create mode 100755 config/getlib.sh
+
+diff --git a/config/getlib.sh b/config/getlib.sh
+new file mode 100755
+index 0000000..4835cf6
+--- /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
+-- 
+2.25.1
+
index 3659feedaef703675c34adc9b7e92f92607bd49b..790ddd4c991e1da75106b80e01c694d8ff0886ef 100644 (file)
@@ -1,6 +1,6 @@
 --- a/src/CMakeLists.txt
 +++ b/src/CMakeLists.txt
-@@ -23,8 +23,6 @@ SET (LIBGD_SRC_FILES
+@@ -22,8 +22,6 @@ SET (LIBGD_SRC_FILES
        gd_io_dp.c
        gd_io_file.c
        gd_io_ss.c
@@ -9,7 +9,7 @@
        gd_jpeg.c
        gd_matrix.c
        gd_nnquant.c
-@@ -60,8 +58,6 @@ SET (LIBGD_SRC_FILES
+@@ -59,8 +57,6 @@ SET (LIBGD_SRC_FILES
        gdhelpers.c
        gdhelpers.h
        gdkanji.c
        gdtables.c
        gdxpm.c
        jisx0208.h
-@@ -175,5 +171,4 @@ install(FILES
+@@ -198,7 +194,6 @@ install(FILES
        gdfonts.h
        gdfontt.h
        gdfx.h
 -      gdpp.h
        DESTINATION include)
+ CONFIGURE_FILE(../config/gdlib.pc.cmake gdlib.pc @ONLY)
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
deleted file mode 100644 (file)
index f4af744..0000000
+++ /dev/null
@@ -1,135 +0,0 @@
-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/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
deleted file mode 100644 (file)
index 79e44e6..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-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")
index a1571ddaa6d1880101714f6284c95954280a8d7e..3e6fc6c97420062d090fa5da44c314f9698da727 100644 (file)
@@ -1,6 +1,6 @@
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -89,8 +89,6 @@
+@@ -94,8 +94,6 @@ else (USE_EXT_GD)
        GV_LT(VERSION GDLIB_LIB_VERSION)
        MESSAGE(STATUS "gd shared lib version ${GDLIB_LIB_SOVERSION} (${GDLIB_LIB_VERSION})")
  
diff --git a/libs/libgd/patches/300-gdlib.pc-cmake.patch b/libs/libgd/patches/300-gdlib.pc-cmake.patch
deleted file mode 100644 (file)
index fe1a726..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/config/gdlib.pc.cmake
-+++ b/config/gdlib.pc.cmake
-@@ -5,7 +5,7 @@ includedir=${prefix}/@CMAKE_INSTALL_INCL
- Name: gd
- Description: GD graphics library
--Version: @GDLIB_VERSION@
-+Version: @GD_VERSION@
- Cflags: -I${includedir}
- Libs.private: @LIBGD_DEP_LIBS@
- Libs: -L${libdir} -lgd
index fe9f18fe2d75412ff5ffde892a39a8febf27942d..4af400b0aa3b45a38ea0f97ccf71a248f9d96d6b 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libhttp-parser
-PKG_VERSION:=2.9.3
+PKG_VERSION:=2.9.4
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/nodejs/http-parser/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=8fa0ab8770fd8425a9b431fdbf91623c4d7a9cdb842b9339289bd2b0b01b0d3d
+PKG_HASH:=467b9e30fd0979ee301065e70f637d525c28193449e1b13fbcb1b1fab3ad224f
 PKG_BUILD_DIR:=$(BUILD_DIR)/http-parser-$(PKG_VERSION)
 
 PKG_MAINTAINER:=Ramanathan Sivagurunathan <ramzthecoder@gmail.com>, Hirokazu MORIKAWA <morikw2@gmail.com>
index c49ea3dc1e3a1501f1a57f027675ca3a00102b82..98290e065be3cd09332c0cee7769781274afac26 100644 (file)
@@ -3,7 +3,7 @@
 @@ -25,11 +25,7 @@
  SOMAJOR = 2
  SOMINOR = 9
- SOREV   = 3
+ SOREV   = 4
 -ifeq (darwin,$(PLATFORM))
 -SOEXT ?= dylib
 -SONAME ?= $(SOLIBNAME).$(SOMAJOR).$(SOMINOR).$(SOEXT)
index 74273738b6fa082ee24d3903c3c0d54426cb8828..14753fd1a4890d702ab4326ec96517915f2a77b2 100644 (file)
@@ -26,7 +26,6 @@ PKG_USE_MIPS16:=0
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/cmake.mk
-include $(TOPDIR)/feeds/packages/lang/python/python-package.mk
 include $(TOPDIR)/feeds/packages/lang/python/python3-package.mk
 
 CMAKE_OPTIONS=-DENABLEEXAMPLES=0 \
@@ -74,18 +73,6 @@ $(call Package/libmraa/Default/description)
 This package contains the Node.js libraries.
 endef
 
-define Package/libmraa-python
-  $(call Package/libmraa/Default)
-  TITLE:=Eclipse MRAA lowlevel IO Python library
-  DEPENDS:=+libmraa +python-light
-endef
-
-define Package/libmraa-python/description
-$(call Package/libmraa/Default/description)
-
-This package contains the Python libraries.
-endef
-
 define Package/libmraa-python3
   $(call Package/libmraa/Default)
   TITLE:=Eclipse MRAA lowlevel IO Python3 library
@@ -110,12 +97,6 @@ define Package/libmraa-node/install
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/mraa/* $(1)/usr/lib/node/mraa/
 endef
 
-define Package/libmraa-python/install
-       $(INSTALL_DIR) $(1)/usr/lib/python$(PYTHON_VERSION)/site-packages
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON_VERSION)/site-packages/* \
-               $(1)/usr/lib/python$(PYTHON_VERSION)/site-packages/
-endef
-
 define Package/libmraa-python3/install
        $(INSTALL_DIR) $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON3_VERSION)/site-packages/* \
@@ -124,5 +105,4 @@ endef
 
 $(eval $(call BuildPackage,libmraa))
 $(eval $(call BuildPackage,libmraa-node))
-$(eval $(call BuildPackage,libmraa-python))
 $(eval $(call BuildPackage,libmraa-python3))
index d967c0a78503c313ddc4ccb056bb8e81c9880fb6..6a689a04eb1ec87a461022b91b0faaacfdb6308e 100644 (file)
@@ -9,12 +9,12 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=libpfring
-PKG_VERSION:=7.4.0
-PKG_RELEASE:=2
+PKG_VERSION:=7.6.0
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/ntop/PF_RING/tar.gz/$(PKG_VERSION)?
-PKG_HASH:=e1c9cb44d8072854220f493c56fa5cba99a6b8336883939dc18b3e30c2954b68
+PKG_HASH:=8f1eb1c5a823984c0ab9e1f9b00b67755a729c17112f48ed618f7ffd717c52d7
 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/PF_RING-$(PKG_VERSION)
 
 PKG_MAINTAINER:=Banglang Huang <banglang.huang@foxmail.com>
index 6cfc6af3b47a8f32a026c73700428027e0c6222b..46856429e8af1c8a79f18a357af57a33437b9faa 100644 (file)
@@ -1,6 +1,6 @@
 --- a/userland/configure
 +++ b/userland/configure
-@@ -3718,12 +3718,6 @@ fi
+@@ -3861,12 +3861,6 @@ fi
  if test "$IS_FREEBSD" != "1" && test "$cross_compiling" != "yes" ; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if r/w locks are supported" >&5
  $as_echo_n "checking if r/w locks are supported... " >&6; }
@@ -13,7 +13,7 @@
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
-@@ -3736,7 +3730,7 @@ else
+@@ -3879,7 +3873,7 @@ else
  
  
  _ACEOF
@@ -22,7 +22,7 @@
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  $as_echo "yes" >&6; }
  cat >>confdefs.h <<_ACEOF
-@@ -3750,7 +3744,6 @@ $as_echo "no" >&6; }
+@@ -3893,7 +3887,6 @@ $as_echo "no" >&6; }
  fi
  rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
    conftest.$ac_objext conftest.beam conftest.$ac_ext
diff --git a/libs/libpfring/patches/0002-fix-march-native.patch b/libs/libpfring/patches/0002-fix-march-native.patch
deleted file mode 100644 (file)
index b8d6595..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/userland/configure
-+++ b/userland/configure
-@@ -3291,7 +3291,7 @@ SYS_LIBS=""
- VER=`cat ../kernel/linux/pf_ring.h | grep RING_VERSION | head -1 | cut -d '"' -f 2`
- MAJOR_VER=`cat ../kernel/linux/pf_ring.h | grep RING_VERSION | head -1 | cut -d '"' -f 2 | cut -d '.' -f 1`
--NATIVE=`$CC -c -Q -march=native --help=target| grep "march" | xargs | cut -d ' ' -f 2`
-+NATIVE=`$CC -c -Q --help=target| grep "march" | xargs | cut -d ' ' -f 2`
- if test -f "lib/libs/libpfring_zc_x86_64_$NATIVE.a"; then
-   CFLAGS="-march=native -mtune=native $CFLAGS"
-   LIBARCH="_$NATIVE"
diff --git a/libs/libpfring/patches/010-kernel-416.patch b/libs/libpfring/patches/010-kernel-416.patch
deleted file mode 100644 (file)
index 11bfc52..0000000
+++ /dev/null
@@ -1,729 +0,0 @@
-From 2aa76765ff367e9c9c49c7373f7e2f51fb10b399 Mon Sep 17 00:00:00 2001
-From: Alfredo Cardigliano <cardigliano@ntop.org>
-Date: Wed, 27 Feb 2019 15:35:37 +0000
-Subject: [PATCH] Replaced kernel hook with exported functions
-
----
- .../e1000e/e1000e-3.4.0.2-zc/src/netdev.c     |  30 +---
- .../fm10k/fm10k-0.23.5-zc/src/fm10k_pci.c     |  15 +-
- .../intel/i40e/i40e-2.4.6-zc/src/i40e_main.c  | 170 +++++++++---------
- .../intel/igb/igb-5.3.5.18-zc/src/igb_main.c  |  14 +-
- .../ixgbevf-4.5.1-zc/src/ixgbevf_main.c       |  16 +-
- kernel/linux/pf_ring.h                        |  85 +++------
- kernel/pf_ring.c                              | 115 +++---------
- 9 files changed, 154 insertions(+), 319 deletions(-)
-
-diff --git a/drivers/intel/e1000e/e1000e-3.4.0.2-zc/src/netdev.c b/drivers/intel/e1000e/e1000e-3.4.0.2-zc/src/netdev.c
-index e0a10f04..50fdc5a5 100644
---- a/drivers/intel/e1000e/e1000e-3.4.0.2-zc/src/netdev.c
-+++ b/drivers/intel/e1000e/e1000e-3.4.0.2-zc/src/netdev.c
-@@ -610,19 +610,15 @@ e1000_receive_skb(struct e1000_adapter *adapter,
- #ifdef HAVE_PF_RING
-       if (atomic_read(&adapter->pfring_zc.usage_counter) > 0) { /* act as direct driver-to-ring */
--              struct pfring_hooks *hook = (struct pfring_hooks *) netdev->pfring_ptr;
--        
--              if (hook && (hook->magic == PF_RING)) { /* PF_RING is alive */
--                      int rc;
-+              int rc;
--                      //printk(KERN_INFO "[PF_RING] %s driver -> pf_ring [len=%d]\n", netdev->name, skb->len);
-+              //printk(KERN_INFO "[PF_RING] %s driver -> pf_ring [len=%d]\n", netdev->name, skb->len);
--                      rc = hook->ring_handler(skb, 1, 1, -1, 1);
-+              rc = pfring_skb_ring_handler(skb, 1, 1, -1, 1);
-             
--                      if (rc > 0) { /* Packet handled by PF_RING */
--                              kfree_skb(skb);
--                              return rc; /* PF_RING has already freed the memory */
--                      }
-+              if (rc > 0) { /* Packet handled by PF_RING */
-+                      kfree_skb(skb);
-+                      return rc; /* PF_RING has already freed the memory */
-               }
-       }
- #endif
-@@ -4611,9 +4607,6 @@ static void e1000_configure(struct e1000_adapter *adapter)
- #ifdef HAVE_PF_RING
-       {
--      struct pfring_hooks *hook = (struct pfring_hooks*)adapter->netdev->pfring_ptr;
--
--      if (hook != NULL) {
-               u16     cache_line_size;
-               struct e1000_ring *rx_ring = adapter->rx_ring;
-               struct e1000_ring *tx_ring = adapter->tx_ring;
-@@ -4638,7 +4631,7 @@ static void e1000_configure(struct e1000_adapter *adapter)
-               tx_info.descr_packet_memory_tot_len = tx_ring->size;
-               // printk("%s(%d)=%lu\n", __FUNCTION__, i, adapter->netdev->mem_start);
--              hook->zc_dev_handler(add_device_mapping,
-+              pfring_zc_dev_handler(add_device_mapping,
- #ifdef ENABLE_RX_ZC
-                                    &rx_info,
- #else
-@@ -4667,8 +4660,6 @@ static void e1000_configure(struct e1000_adapter *adapter)
-               //printk(KERN_INFO "[PF_RING] %s(%s, rx_ring=%p, tx_ring=%p)\n", __FUNCTION__, adapter->netdev->name, rx_ring, tx_ring);
-       }
--
--      }
- #endif
- }
-@@ -5254,10 +5245,7 @@ void e1000e_down(struct e1000_adapter *adapter, bool reset)
- #ifdef HAVE_PF_RING
-       {
--      struct pfring_hooks *hook = (struct pfring_hooks*)adapter->netdev->pfring_ptr;
--
--      if (hook != NULL) {
--              hook->zc_dev_handler(remove_device_mapping,
-+              pfring_zc_dev_handler(remove_device_mapping,
-                                    NULL, // rx_info,
-                                    NULL, // tx_info,
-                                    NULL, /* Packet descriptors */
-@@ -5276,8 +5264,6 @@ void e1000e_down(struct e1000_adapter *adapter, bool reset)
-                                    NULL // notify_function_ptr
-                                    );
-       }
--
--      }
- #endif
- }
-diff --git a/drivers/intel/fm10k/fm10k-0.23.5-zc/src/fm10k_pci.c b/drivers/intel/fm10k/fm10k-0.23.5-zc/src/fm10k_pci.c
-index 041779c5..04e6e673 100644
---- a/drivers/intel/fm10k/fm10k-0.23.5-zc/src/fm10k_pci.c
-+++ b/drivers/intel/fm10k/fm10k-0.23.5-zc/src/fm10k_pci.c
-@@ -2104,11 +2104,7 @@ void fm10k_up(struct fm10k_intfc *interface)
- #ifdef HAVE_PF_RING
-       {
--      struct pfring_hooks *hook = (struct pfring_hooks*) interface->netdev->pfring_ptr;
--
--      if (hook != NULL) {
-               int i;
--
-               unsigned int buf_len = FM10K_RX_BUFSZ; /* TODO check the correct length (what about jumbo?) */
-               for (i = 0; i < interface->num_rx_queues; i++) {
-@@ -2129,7 +2125,7 @@ void fm10k_up(struct fm10k_intfc *interface)
-                       tx_info.packet_memory_slot_len      = buf_len;
-                       tx_info.descr_packet_memory_tot_len = tx_ring->size;
--                      hook->zc_dev_handler(add_device_mapping,
-+                      pfring_zc_dev_handler(add_device_mapping,
-                         &rx_info,
-                         &tx_info,
-                         rx_ring->desc,
-@@ -2150,8 +2146,6 @@ void fm10k_up(struct fm10k_intfc *interface)
-                       );
-               }
-       }
--
--      }
- #endif
- }
-@@ -2245,13 +2239,10 @@ void fm10k_down(struct fm10k_intfc *interface)
- #ifdef HAVE_PF_RING
-       {
--      struct pfring_hooks *hook = (struct pfring_hooks*)interface->netdev->pfring_ptr;
--
--      if (hook != NULL) {
-               int i;
-               for (i = 0; i < interface->num_rx_queues; i++) {
--                      hook->zc_dev_handler(remove_device_mapping,
-+                      pfring_zc_dev_handler(remove_device_mapping,
-                         NULL, // rx_info,
-                         NULL, // tx_info,
-                         NULL, /* Packet descriptors */
-@@ -2271,8 +2262,6 @@ void fm10k_down(struct fm10k_intfc *interface)
-                       );
-               }
-       }
--
--      }
- #endif
- }
-diff --git a/drivers/intel/i40e/i40e-2.4.6-zc/src/i40e_main.c b/drivers/intel/i40e/i40e-2.4.6-zc/src/i40e_main.c
-index a3f2201c..466a6964 100644
---- a/drivers/intel/i40e/i40e-2.4.6-zc/src/i40e_main.c
-+++ b/drivers/intel/i40e/i40e-2.4.6-zc/src/i40e_main.c
-@@ -6063,64 +6063,60 @@ static int i40e_up_complete(struct i40e_vsi *vsi)
- #ifdef HAVE_PF_RING
-       if (vsi->netdev) {
--              struct pfring_hooks *hook = (struct pfring_hooks*)vsi->netdev->pfring_ptr;
--
--              if (hook != NULL) {
--                      int i;
--                      u16 cache_line_size;
--                      struct i40e_pf *pf = vsi->back;
--
--                      pci_read_config_word(pf->pdev, I40E_PCI_DEVICE_CACHE_LINE_SIZE, &cache_line_size);
--                      cache_line_size &= 0x00FF;
--                      cache_line_size *= PCI_DEVICE_CACHE_LINE_SIZE_BYTES;
--                      if (cache_line_size == 0) cache_line_size = 64;
--
--                      //if (unlikely(enable_debug))  
--                              printk("[PF_RING-ZC] %s: attach %s [pf start=%llu len=%llu][cache_line_size=%u][MSIX %s]\n", __FUNCTION__,
--                                      vsi->netdev->name, pci_resource_start(pf->pdev, 0), pci_resource_len(pf->pdev, 0),
--                                      cache_line_size, (vsi->back->flags & I40E_FLAG_MSIX_ENABLED) ? "enabled" : "disabled");
--
--                      for (i = 0; i < vsi->num_queue_pairs; i++) {
--                              struct i40e_ring *rx_ring = vsi->rx_rings[i];
--                              struct i40e_ring *tx_ring = vsi->tx_rings[i];
--                              mem_ring_info rx_info = { 0 };
--                              mem_ring_info tx_info = { 0 };
--
--                              init_waitqueue_head(&rx_ring->pfring_zc.rx_tx.rx.packet_waitqueue);
--
--                              rx_info.num_queues = vsi->num_queue_pairs;
--                              rx_info.packet_memory_num_slots     = rx_ring->count;
--                              rx_info.packet_memory_slot_len      = ALIGN(rx_ring->rx_buf_len, cache_line_size);
--                              rx_info.descr_packet_memory_tot_len = rx_ring->size;
--                              rx_info.registers_index             = rx_ring->reg_idx;
--                              rx_info.stats_index                 = vsi->info.stat_counter_idx;
--                              rx_info.vector                      = rx_ring->q_vector->v_idx + vsi->base_vector;
-+              int i;
-+              u16 cache_line_size;
-+              struct i40e_pf *pf = vsi->back;
-+
-+              pci_read_config_word(pf->pdev, I40E_PCI_DEVICE_CACHE_LINE_SIZE, &cache_line_size);
-+              cache_line_size &= 0x00FF;
-+              cache_line_size *= PCI_DEVICE_CACHE_LINE_SIZE_BYTES;
-+              if (cache_line_size == 0) cache_line_size = 64;
-+
-+              //if (unlikely(enable_debug))  
-+                      printk("[PF_RING-ZC] %s: attach %s [pf start=%llu len=%llu][cache_line_size=%u][MSIX %s]\n", __FUNCTION__,
-+                              vsi->netdev->name, pci_resource_start(pf->pdev, 0), pci_resource_len(pf->pdev, 0),
-+                              cache_line_size, (vsi->back->flags & I40E_FLAG_MSIX_ENABLED) ? "enabled" : "disabled");
-+
-+              for (i = 0; i < vsi->num_queue_pairs; i++) {
-+                      struct i40e_ring *rx_ring = vsi->rx_rings[i];
-+                      struct i40e_ring *tx_ring = vsi->tx_rings[i];
-+                      mem_ring_info rx_info = { 0 };
-+                      mem_ring_info tx_info = { 0 };
-+
-+                      init_waitqueue_head(&rx_ring->pfring_zc.rx_tx.rx.packet_waitqueue);
-+
-+                      rx_info.num_queues = vsi->num_queue_pairs;
-+                      rx_info.packet_memory_num_slots     = rx_ring->count;
-+                      rx_info.packet_memory_slot_len      = ALIGN(rx_ring->rx_buf_len, cache_line_size);
-+                      rx_info.descr_packet_memory_tot_len = rx_ring->size;
-+                      rx_info.registers_index             = rx_ring->reg_idx;
-+                      rx_info.stats_index                 = vsi->info.stat_counter_idx;
-+                      rx_info.vector                      = rx_ring->q_vector->v_idx + vsi->base_vector;
-  
--                              tx_info.num_queues = vsi->num_queue_pairs;
--                              tx_info.packet_memory_num_slots     = tx_ring->count;
--                              tx_info.packet_memory_slot_len      = rx_info.packet_memory_slot_len;
--                              tx_info.descr_packet_memory_tot_len = tx_ring->size;
--                              tx_info.registers_index             = tx_ring->reg_idx;
--
--                              hook->zc_dev_handler(add_device_mapping,
--                                      &rx_info,
--                                      &tx_info,
--                                      rx_ring->desc, /* rx packet descriptors */
--                                      tx_ring->desc, /* tx packet descriptors */
--                                      (void *) pci_resource_start(pf->pdev, 0),
--                                      pci_resource_len(pf->pdev, 0),
--                                      rx_ring->queue_index, /* channel id */
--                                      rx_ring->netdev,
--                                      rx_ring->dev, /* for DMA mapping */
--                                      intel_i40e,
--                                      rx_ring->netdev->dev_addr,
--                                      &rx_ring->pfring_zc.rx_tx.rx.packet_waitqueue,
--                                      &rx_ring->pfring_zc.rx_tx.rx.interrupt_received,
--                                      (void *) rx_ring,
--                                      (void *) tx_ring,
--                                      wait_packet_function_ptr,
--                                      notify_function_ptr);
--                      }
-+                      tx_info.num_queues = vsi->num_queue_pairs;
-+                      tx_info.packet_memory_num_slots     = tx_ring->count;
-+                      tx_info.packet_memory_slot_len      = rx_info.packet_memory_slot_len;
-+                      tx_info.descr_packet_memory_tot_len = tx_ring->size;
-+                      tx_info.registers_index             = tx_ring->reg_idx;
-+
-+                      pfring_zc_dev_handler(add_device_mapping,
-+                              &rx_info,
-+                              &tx_info,
-+                              rx_ring->desc, /* rx packet descriptors */
-+                              tx_ring->desc, /* tx packet descriptors */
-+                              (void *) pci_resource_start(pf->pdev, 0),
-+                              pci_resource_len(pf->pdev, 0),
-+                              rx_ring->queue_index, /* channel id */
-+                              rx_ring->netdev,
-+                              rx_ring->dev, /* for DMA mapping */
-+                              intel_i40e,
-+                              rx_ring->netdev->dev_addr,
-+                              &rx_ring->pfring_zc.rx_tx.rx.packet_waitqueue,
-+                              &rx_ring->pfring_zc.rx_tx.rx.interrupt_received,
-+                              (void *) rx_ring,
-+                              (void *) tx_ring,
-+                              wait_packet_function_ptr,
-+                              notify_function_ptr);
-               }
-       }
- #endif
-@@ -6273,42 +6269,38 @@ void i40e_down(struct i40e_vsi *vsi)
- #ifdef HAVE_PF_RING
-       if (vsi->netdev) {
--              struct pfring_hooks *hook = (struct pfring_hooks*)vsi->netdev->pfring_ptr;
-               struct i40e_pf *pf = vsi->back;
-               struct i40e_pf    *adapter = i40e_netdev_to_pf(vsi->netdev);
-               int i;
--              if (hook != NULL) {
--                      
--                      //if (unlikely(enable_debug))
--                              printk("[PF_RING-ZC] %s: detach %s\n", __FUNCTION__, vsi->netdev->name);
--
--                      if (atomic_read(&adapter->pfring_zc.usage_counter) > 0)
--                              printk("[PF_RING-ZC] %s: detaching %s while in use\n", __FUNCTION__, vsi->netdev->name); 
--
--                      for (i = 0; i < vsi->num_queue_pairs; i++) {
--                              struct i40e_ring *rx_ring = vsi->rx_rings[i];
--                              struct i40e_ring *tx_ring = vsi->tx_rings[i];
--                              hook->zc_dev_handler(remove_device_mapping,
--                                      NULL, // rx_info,
--                                      NULL, // tx_info,
--                                      NULL, /* Packet descriptors */
--                                      NULL, /* Packet descriptors */
--                                      (void*)pci_resource_start(pf->pdev, 0),
--                                      pci_resource_len(pf->pdev, 0),
--                                      rx_ring->queue_index, /* Channel Id */
--                                      rx_ring->netdev,
--                                      rx_ring->dev, /* for DMA mapping */
--                                      intel_i40e,
--                                      rx_ring->netdev->dev_addr,
--                                      &rx_ring->pfring_zc.rx_tx.rx.packet_waitqueue,
--                                      &rx_ring->pfring_zc.rx_tx.rx.interrupt_received,
--                                      (void*)rx_ring,
--                                      (void*)tx_ring,
--                                      NULL, // wait_packet_function_ptr
--                                      NULL // notify_function_ptr
--                              );
--                      }
-+              //if (unlikely(enable_debug))
-+                      printk("[PF_RING-ZC] %s: detach %s\n", __FUNCTION__, vsi->netdev->name);
-+
-+              if (atomic_read(&adapter->pfring_zc.usage_counter) > 0)
-+                      printk("[PF_RING-ZC] %s: detaching %s while in use\n", __FUNCTION__, vsi->netdev->name); 
-+
-+              for (i = 0; i < vsi->num_queue_pairs; i++) {
-+                      struct i40e_ring *rx_ring = vsi->rx_rings[i];
-+                      struct i40e_ring *tx_ring = vsi->tx_rings[i];
-+                      pfring_zc_dev_handler(remove_device_mapping,
-+                              NULL, // rx_info,
-+                              NULL, // tx_info,
-+                              NULL, /* Packet descriptors */
-+                              NULL, /* Packet descriptors */
-+                              (void*)pci_resource_start(pf->pdev, 0),
-+                              pci_resource_len(pf->pdev, 0),
-+                              rx_ring->queue_index, /* Channel Id */
-+                              rx_ring->netdev,
-+                              rx_ring->dev, /* for DMA mapping */
-+                              intel_i40e,
-+                              rx_ring->netdev->dev_addr,
-+                              &rx_ring->pfring_zc.rx_tx.rx.packet_waitqueue,
-+                              &rx_ring->pfring_zc.rx_tx.rx.interrupt_received,
-+                              (void*)rx_ring,
-+                              (void*)tx_ring,
-+                              NULL, // wait_packet_function_ptr
-+                              NULL // notify_function_ptr
-+                      );
-               }
-       }
- #endif
-diff --git a/drivers/intel/igb/igb-5.3.5.18-zc/src/igb_main.c b/drivers/intel/igb/igb-5.3.5.18-zc/src/igb_main.c
-index 9965b52b..f5ea7912 100644
---- a/drivers/intel/igb/igb-5.3.5.18-zc/src/igb_main.c
-+++ b/drivers/intel/igb/igb-5.3.5.18-zc/src/igb_main.c
-@@ -1780,9 +1780,6 @@ static void igb_configure(struct igb_adapter *adapter)
- #ifdef HAVE_PF_RING
-       {
--      struct pfring_hooks *hook = (struct pfring_hooks*)adapter->netdev->pfring_ptr;
--
--      if(hook != NULL) {
-               int i;
-               u16 cache_line_size;
-@@ -1809,7 +1806,7 @@ static void igb_configure(struct igb_adapter *adapter)
-                       tx_info.packet_memory_slot_len = rx_info.packet_memory_slot_len;
-                       tx_info.descr_packet_memory_tot_len = tx_ring->size;
-                               
--                      hook->zc_dev_handler(add_device_mapping,
-+                      pfring_zc_dev_handler(add_device_mapping,
-                         &rx_info,
-                         &tx_info,
-                         rx_ring->desc, /* Packet descriptors */
-@@ -1830,8 +1827,6 @@ static void igb_configure(struct igb_adapter *adapter)
-                       );
-               }
-       }
--
--      }
- #endif
- }
-@@ -2155,13 +2150,10 @@ void igb_down(struct igb_adapter *adapter)
- #ifdef HAVE_PF_RING
-       {
--      struct pfring_hooks *hook = (struct pfring_hooks*)adapter->netdev->pfring_ptr;
--
--      if(hook != NULL) {
-               int i;
-               for (i = 0; i < adapter->num_rx_queues; i++) {
--                      hook->zc_dev_handler(remove_device_mapping,
-+                      pfring_zc_dev_handler(remove_device_mapping,
-                         NULL, // rx_info,
-                         NULL, // tx_info,
-                         NULL, /* Packet descriptors */
-@@ -2181,8 +2173,6 @@ void igb_down(struct igb_adapter *adapter)
-                       );
-               }
-       }
--
--      }
- #endif
- }
-diff --git a/kernel/linux/pf_ring.h b/kernel/linux/pf_ring.h
-index 17ea750a..1473ad84 100644
---- a/kernel/linux/pf_ring.h
-+++ b/kernel/linux/pf_ring.h
-@@ -37,9 +37,6 @@
- #define DEFAULT_MIN_PKT_QUEUED        128
- #define DEFAULT_POLL_WATERMARK_TIMEOUT  0
--/* Dirty hack I know, but what else shall I do man? */
--#define pfring_ptr ax25_ptr
--
- #define FILTERING_SAMPLING_RATIO       10
- /* Versioning */
-@@ -1285,63 +1282,31 @@ typedef struct {
- /* **************************************** */
--typedef void  (*handle_pfring_zc_dev)(zc_dev_operation operation,
--                                      mem_ring_info *rx_info,
--                                      mem_ring_info *tx_info,
--                                      void          *rx_descr_packet_memory,
--                                      void          *tx_descr_packet_memory,
--                                      void          *phys_card_memory,
--                                      u_int          phys_card_memory_len,
--                                      u_int channel_id,
--                                      struct net_device *dev,
--                                      struct device *hwdev,
--                                      zc_dev_model device_model,
--                                      u_char *device_address,
--                                      wait_queue_head_t *packet_waitqueue,
--                                      u_int8_t *interrupt_received,
--                                      void *rx_adapter_ptr, void *tx_adapter_ptr,
--                                      zc_dev_wait_packet wait_packet_function_ptr,
--                                      zc_dev_notify dev_notify_function_ptr);
--
--extern handle_pfring_zc_dev get_ring_zc_dev_handler(void);
--extern void set_ring_zc_dev_handler(handle_pfring_zc_dev the_zc_device_handler);
--extern void do_ring_zc_dev_handler(zc_dev_operation operation,
--                                     mem_ring_info *rx_info,
--                                     mem_ring_info *tx_info,
--                                     unsigned long *rx_packet_memory,
--                                     void          *rx_descr_packet_memory,
--                                     unsigned long *tx_packet_memory,
--                                     void          *tx_descr_packet_memory,
--                                     void          *phys_card_memory,
--                                     u_int          phys_card_memory_len,
--                                     u_int channel_id,
--                                     struct net_device *dev,
--                                     struct device *hwdev,
--                                     zc_dev_model device_model,
--                                     u_char *device_address,
--                                     wait_queue_head_t * packet_waitqueue,
--                                     u_int8_t * interrupt_received,
--                                     void *rx_adapter_ptr, void *tx_adapter_ptr,
--                                     zc_dev_wait_packet wait_packet_function_ptr,
--                                     zc_dev_notify dev_notify_function_ptr);
--
--typedef int (*handle_ring_skb)(struct sk_buff *skb, u_char recv_packet,
--                             u_char real_skb,
--                             int32_t channel_id,
--                             u_int32_t num_rx_channels);
--typedef int (*handle_ring_buffer)(struct net_device *dev,
--                                char *data, int len);
--
--/* Hack to jump from a device directly to PF_RING */
--struct pfring_hooks {
--  u_int32_t magic; /*
--                   It should be set to PF_RING
--                   and is MUST be the first one on this struct
--                 */
--  handle_ring_skb ring_handler;
--  handle_ring_buffer buffer_ring_handler;
--  handle_pfring_zc_dev zc_dev_handler;
--};
-+/* Exported functions - used by drivers */
-+
-+int pfring_skb_ring_handler(struct sk_buff *skb,
-+                          u_int8_t recv_packet,
-+                          u_int8_t real_skb /* 1=real skb, 0=faked skb */,
-+                          int32_t channel_id,
-+                          u_int32_t num_rx_channels);
-+
-+void pfring_zc_dev_handler(zc_dev_operation operation,
-+                         mem_ring_info *rx_info,
-+                         mem_ring_info *tx_info,
-+                         void          *rx_descr_packet_memory,
-+                         void          *tx_descr_packet_memory,
-+                         void          *phys_card_memory,
-+                         u_int          phys_card_memory_len,
-+                         u_int channel_id,
-+                         struct net_device *dev,
-+                         struct device *hwdev,
-+                         zc_dev_model device_model,
-+                         u_char *device_address,
-+                         wait_queue_head_t *packet_waitqueue,
-+                         u_int8_t *interrupt_received,
-+                         void *rx_adapter_ptr, void *tx_adapter_ptr,
-+                         zc_dev_wait_packet wait_packet_function_ptr,
-+                         zc_dev_notify dev_notify_function_ptr);
- /* *************************************************************** */
-diff --git a/kernel/pf_ring.c b/kernel/pf_ring.c
-index fb2e06e8..2fe65c36 100644
---- a/kernel/pf_ring.c
-+++ b/kernel/pf_ring.c
-@@ -381,10 +381,6 @@ static inline void ring_read_unlock_inbh(void)  { read_unlock(&ring_mgmt_lock);
- static struct proto_ops ring_ops;
- static struct proto ring_proto;
--static int skb_ring_handler(struct sk_buff *skb, u_char recv_packet,
--                          u_int8_t real_skb,
--                          int32_t channel_id, u_int32_t num_rx_channels);
--static int buffer_ring_handler(struct net_device *dev, char *data, int len);
- static int remove_from_cluster(struct sock *sock, struct pf_ring_socket *pfr);
- static int pfring_select_zc_dev(struct pf_ring_socket *pfr, zc_dev_mapping *mapping);
- static int pfring_get_zc_dev(struct pf_ring_socket *pfr);
-@@ -3854,7 +3850,7 @@ static struct sk_buff* defrag_skb(struct sk_buff *skb,
-       the ring due to lack of available space
- */
--static int skb_ring_handler(struct sk_buff *skb,
-+int pfring_skb_ring_handler(struct sk_buff *skb,
-                           u_int8_t recv_packet,
-                           u_int8_t real_skb /* 1=real skb, 0=faked skb */,
-                           /*
-@@ -4156,28 +4152,7 @@ static int skb_ring_handler(struct sk_buff *skb,
-   return(rc); /*  0 = packet not handled */
- }
--/* ********************************** */
--
--static int buffer_ring_handler(struct net_device *dev, char *data, int len)
--{
--  struct sk_buff skb;
--
--  skb.dev = dev;
--  skb.len = len;
--  skb.data = (u_char *) data;
--  skb.data_len = len;
--
--  /* BD - API changed for time keeping */
--#if(LINUX_VERSION_CODE < KERNEL_VERSION(4,10,0))
--  skb.tstamp.tv64 = 0;
--#else
--  skb.tstamp = 0;
--#endif
--
--  return(skb_ring_handler(&skb, 1, 0 /* fake skb */,
--                        -1 /* unknown: any channel */,
--                        UNKNOWN_NUM_RX_CHANNELS));
--}
-+EXPORT_SYMBOL(pfring_skb_ring_handler);
- /* ********************************** */
-@@ -4193,11 +4168,11 @@ static int packet_rcv(struct sk_buff *skb, struct net_device *dev,
-   if (skb->pkt_type == PACKET_OUTGOING && active_zc_socket[dev->ifindex] == 2)
-     return 0;
--  rc = skb_ring_handler(skb,
--                      skb->pkt_type != PACKET_OUTGOING,
--                      1 /* real_skb */,
--                      -1 /* unknown: any channel */,
--                        UNKNOWN_NUM_RX_CHANNELS);
-+  rc = pfring_skb_ring_handler(skb,
-+                             skb->pkt_type != PACKET_OUTGOING,
-+                             1 /* real_skb */,
-+                             1 /* unknown: any channel */,
-+                             UNKNOWN_NUM_RX_CHANNELS);
-   kfree_skb(skb);
-@@ -7609,23 +7584,23 @@ static int ring_getsockopt(struct socket *sock,
- /* ************************************* */
--void zc_dev_handler(zc_dev_operation operation,
--                      mem_ring_info *rx_info,
--                      mem_ring_info *tx_info,
--                      void          *rx_descr_packet_memory,
--                      void          *tx_descr_packet_memory,
--                      void          *phys_card_memory,
--                      u_int          phys_card_memory_len,
--                      u_int channel_id,
--                      struct net_device *dev,
--                      struct device *hwdev,
--                      zc_dev_model device_model,
--                      u_char *device_address,
--                      wait_queue_head_t *packet_waitqueue,
--                      u_int8_t *interrupt_received,
--                      void *rx_adapter_ptr, void *tx_adapter_ptr,
--                      zc_dev_wait_packet wait_packet_function_ptr,
--                      zc_dev_notify dev_notify_function_ptr)
-+void pfring_zc_dev_handler(zc_dev_operation operation,
-+                         mem_ring_info *rx_info,
-+                         mem_ring_info *tx_info,
-+                         void          *rx_descr_packet_memory,
-+                         void          *tx_descr_packet_memory,
-+                         void          *phys_card_memory,
-+                         u_int          phys_card_memory_len,
-+                         u_int channel_id,
-+                         struct net_device *dev,
-+                         struct device *hwdev,
-+                         zc_dev_model device_model,
-+                         u_char *device_address,
-+                         wait_queue_head_t *packet_waitqueue,
-+                         u_int8_t *interrupt_received,
-+                         void *rx_adapter_ptr, void *tx_adapter_ptr,
-+                         zc_dev_wait_packet wait_packet_function_ptr,
-+                         zc_dev_notify dev_notify_function_ptr)
- {
-   pf_ring_device *dev_ptr;
-@@ -7728,6 +7703,8 @@ void zc_dev_handler(zc_dev_operation operation,
-          zc_devices_list_size);
- }
-+EXPORT_SYMBOL(pfring_zc_dev_handler);
-+
- /* ************************************* */
- static int ring_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
-@@ -7807,15 +7784,6 @@ static struct proto ring_proto = {
- /* ************************************ */
--static struct pfring_hooks ring_hooks = {
--  .magic = PF_RING,
--  .ring_handler = skb_ring_handler,
--  .buffer_ring_handler = buffer_ring_handler,
--  .zc_dev_handler = zc_dev_handler,
--};
--
--/* ************************************ */
--
- void remove_device_from_proc(pf_ring_net *netns, pf_ring_device *dev_ptr) {
-   if (dev_ptr->proc_entry == NULL)
-     return;
-@@ -8078,7 +8046,6 @@ static int ring_notifier(struct notifier_block *this, unsigned long msg, void *d
-   struct net_device *dev = netdev_notifier_info_to_dev(data);
-   pf_ring_device *dev_ptr;
-   struct list_head *ptr, *tmp_ptr;
--  struct pfring_hooks *hook;
-   int if_name_clash = 0;
-   if(debug_on(2)) {
-@@ -8167,13 +8134,6 @@ static int ring_notifier(struct notifier_block *this, unsigned long msg, void *d
-     return NOTIFY_DONE;
-   }
--  hook = (struct pfring_hooks *) dev->pfring_ptr;
--  if(hook && (hook->magic != PF_RING)) {
--    printk("[PF_RING] %s %s: interface already in use by another socket not compatible with PF_RING\n",
--           __FUNCTION__, dev->name);
--    return NOTIFY_DONE;
--  }
--
-   switch (msg) {
-     case NETDEV_POST_INIT:
-     case NETDEV_PRE_UP:
-@@ -8181,7 +8141,7 @@ static int ring_notifier(struct notifier_block *this, unsigned long msg, void *d
-     case NETDEV_DOWN:
-       break;
-     case NETDEV_REGISTER:
--      debug_printk(2, "%s: [REGISTER][ifindex: %u pfring_ptr=%p hook=%p]\n", dev->name, dev->ifindex, dev->pfring_ptr, &ring_hooks);
-+      debug_printk(2, "%s: [REGISTER][ifindex: %u]\n", dev->name, dev->ifindex);
-       /* safety check */
-       list_for_each_safe(ptr, tmp_ptr, &ring_aware_device_list) {
-@@ -8194,7 +8154,6 @@ static int ring_notifier(struct notifier_block *this, unsigned long msg, void *d
-       }
-       if(!if_name_clash) {
--      dev->pfring_ptr = &ring_hooks;
-       if(add_device_to_ring_list(dev) != 0) {
-         printk("[PF_RING] Error in add_device_to_ring_list(%s)\n", dev->name);
-       }
-@@ -8202,13 +8161,9 @@ static int ring_notifier(struct notifier_block *this, unsigned long msg, void *d
-       break;
-     case NETDEV_UNREGISTER:
--      debug_printk(2, "%s: [UNREGISTER][ifindex: %u pfring_ptr=%p]\n", dev->name, dev->ifindex, dev->pfring_ptr);
-+      debug_printk(2, "%s: [UNREGISTER][ifindex: %u]\n", dev->name, dev->ifindex);
--      hook = (struct pfring_hooks *) dev->pfring_ptr;
--      if(hook && (hook->magic == PF_RING)) {
--      remove_device_from_ring_list(dev);
--      dev->pfring_ptr = NULL;
--      }
-+      remove_device_from_ring_list(dev);
-       /* We don't have to worry updating rules that might have used this
-        device (just removed) as reflection device. This because whenever
-        we set a rule with reflection, we do dev_put() so such device is
-@@ -8329,7 +8284,6 @@ static struct pernet_operations ring_net_ops = {
- static void __exit ring_exit(void)
- {
-   struct list_head *ptr, *tmp_ptr;
--  struct pfring_hooks *hook;
-   pf_ring_net *netns;
-   pfring_enabled = 0;
-@@ -8340,8 +8294,6 @@ static void __exit ring_exit(void)
-   list_for_each_safe(ptr, tmp_ptr, &ring_aware_device_list) {
-     pf_ring_device *dev_ptr = list_entry(ptr, pf_ring_device, device_list);
--    hook = (struct pfring_hooks *) dev_ptr->dev->pfring_ptr;
--
-     write_lock(&netns_lock);
-     netns = netns_lookup(dev_net(dev_ptr->dev));
-@@ -8351,15 +8303,6 @@ static void __exit ring_exit(void)
-     write_unlock(&netns_lock);
--    if (hook != NULL) {
--      if(hook->magic == PF_RING) {
--        debug_printk(2, "Unregister hook for %s\n", dev_ptr->device_name);
--        dev_ptr->dev->pfring_ptr = NULL; /* Unhook PF_RING */
--      }
--    } else {
--      printk("[PF_RING] PF_RING hook was not set for %s\n", dev_ptr->device_name);
--    }
--
-     list_del(ptr);
-     kfree(dev_ptr);
-   }
index 3134603428190e36eed9f78eb0e21aab1733f9c3..b2eba09a062e7cd23f576c9ed1052b7005a105bd 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libsearpc
 PKG_VERSION:=3.2.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/haiwen/libsearpc/tar.gz/v$(PKG_VERSION)?
@@ -25,7 +25,6 @@ PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/nls.mk
-include ../../lang/python/python-package.mk
 include ../../lang/python/python3-package.mk
 
 define Package/libsearpc
@@ -70,13 +69,9 @@ define Build/InstallDev
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/searpc-codegen.py $(1)/usr/bin/
 endef
 
-# Include Python 2 bindings in this package to maintain compatibility with previous versions
 define Package/libsearpc/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)/pysearpc
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsearpc.so* $(1)/usr/lib/
-       $(INSTALL_DATA) $(PKG_BUILD_DIR)/pysearpc/*.py $(1)$(PYTHON_PKG_DIR)/pysearpc/
-       rm -f $(1)$(PYTHON_PKG_DIR)/pysearpc/{pygencode,test_pysearpc}.py
 endef
 
 define Py3Build/Compile
index 0af8d34370a3a96812c25eaa4457423d9495a163..fdabc9b39db1a55a7358c83a63d27de4f5ad55d6 100644 (file)
@@ -7,22 +7,21 @@
 
 include $(TOPDIR)/rules.mk
 
-PKG_LICENSE:=LGPL-2.1-or-later BSD-2-Clause
-PKG_MAINTAINER:=Mislav Novakovic <mislav.novakovic@sartura.hr>
-
 PKG_NAME:=libssh
 PKG_VERSION:=0.9.3
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://www.libssh.org/files/0.9/
 PKG_HASH:=2c8b5f894dced58b3d629f16f3afa6562c20b4bdc894639163cf657833688f0c
 
+PKG_MAINTAINER:=Mislav Novakovic <mislav.novakovic@sartura.hr>
+PKG_LICENSE:=LGPL-2.1-or-later BSD-2-Clause
+PKG_LICENSE_FILES:=COPYING
 PKG_CPE_ID:=cpe:/a:libssh:libssh
 
 CMAKE_INSTALL:=1
 CMAKE_BINARY_SUBDIR:=build
-
 PKG_BUILD_PARALLEL:=1
 PKG_USE_MIPS16:=0
 
@@ -59,24 +58,8 @@ CMAKE_OPTIONS = \
        -UWITH_STACK_PROTECTOR \
        -DWITH_STACK_PROTECTOR=0 \
        -UWITH_STACK_PROTECTOR_STRONG \
-       -DWITH_STACK_PROTECTOR_STRONG=0
-
-ifeq ($(CONFIG_BIG_ENDIAN),y)
-CMAKE_OPTIONS += -DHAVE_WORDS_BIGENDIAN=1
-else
-CMAKE_OPTIONS += -DHAVE_WORDS_BIGENDIAN=0
-endif
-
-define Build/InstallDev
-       $(INSTALL_DIR) $(1)/usr/include/libssh/
-       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/libssh/* $(1)/usr/include/libssh/
-
-       $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libssh* $(1)/usr/lib/
-
-       $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
-       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/
-endef
+       -DWITH_STACK_PROTECTOR_STRONG=0 \
+       -DHAVE_WORDS_BIGENDIAN=$(if $(CONFIG_BIG_ENDIAN),1,0)
 
 define Package/libssh/install
        $(INSTALL_DIR) $(1)/usr/lib
diff --git a/libs/libssh/patches/0001-libcrypto-compat-add-extra-functions.patch b/libs/libssh/patches/0001-libcrypto-compat-add-extra-functions.patch
new file mode 100644 (file)
index 0000000..53ceebe
--- /dev/null
@@ -0,0 +1,73 @@
+From ce7de0261f0c1f1640da5673dd24939a37e33bd9 Mon Sep 17 00:00:00 2001
+From: Rosen Penev <rosenp@gmail.com>
+Date: Thu, 23 Jan 2020 18:53:06 -0800
+Subject: [PATCH 1/2] libcrypto-compat: add extra functions
+
+Changed the define to compare OPENSSL_API_COMPAT instead of version as
+OpenSSL can be compiled in different ways. One is to disable all
+deprecated APIs.
+
+Added extra functions. The next commit will switch to them.
+
+Signed-off-by: Rosen Penev <rosenp@gmail.com>
+---
+ src/libcrypto-compat.c | 14 ++++++++++++++
+ src/libcrypto-compat.h |  8 +++++++-
+ 2 files changed, 21 insertions(+), 1 deletion(-)
+
+diff --git a/src/libcrypto-compat.c b/src/libcrypto-compat.c
+index 048d1781..3604763f 100644
+--- a/src/libcrypto-compat.c
++++ b/src/libcrypto-compat.c
+@@ -280,6 +280,11 @@ void EVP_MD_CTX_free(EVP_MD_CTX *ctx)
+     OPENSSL_free(ctx);
+ }
++int EVP_CIPHER_CTX_reset(EVP_CIPHER_CTX *ctx)
++{
++      EVP_CIPHER_CTX_init(ctx);
++}
++
+ HMAC_CTX *HMAC_CTX_new(void)
+ {
+     HMAC_CTX *ctx = OPENSSL_zalloc(sizeof(HMAC_CTX));
+@@ -394,3 +399,12 @@ int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key)
+     }
+     return 1;
+ }
++
++const char *OpenSSL_version(int type)
++{
++    return SSLeay_version(type);
++}
++unsigned long OpenSSL_version_num(void)
++{
++    return SSLeay();
++}
+diff --git a/src/libcrypto-compat.h b/src/libcrypto-compat.h
+index bda0473e..44e14801 100644
+--- a/src/libcrypto-compat.h
++++ b/src/libcrypto-compat.h
+@@ -34,6 +34,8 @@ int EVP_MD_CTX_reset(EVP_MD_CTX *ctx);
+ EVP_MD_CTX *EVP_MD_CTX_new(void);
+ void EVP_MD_CTX_free(EVP_MD_CTX *ctx);
++int EVP_CIPHER_CTX_reset(EVP_CIPHER_CTX *ctx);
++
+ HMAC_CTX *HMAC_CTX_new(void);
+ int HMAC_CTX_reset(HMAC_CTX *ctx);
+ void HMAC_CTX_free(HMAC_CTX *ctx);
+@@ -44,6 +46,10 @@ 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);
++
++const char *OpenSSL_version(int type);
++unsigned long OpenSSL_version_num(void);
++
+ #endif /* OPENSSL_VERSION_NUMBER */
+ #endif /* LIBCRYPTO_COMPAT_H */
+-- 
+2.24.1
+
diff --git a/libs/libssh/patches/0002-libcrypto-remove-deprecated-API-usage.patch b/libs/libssh/patches/0002-libcrypto-remove-deprecated-API-usage.patch
new file mode 100644 (file)
index 0000000..7b0626d
--- /dev/null
@@ -0,0 +1,63 @@
+From 73f0e186964126c9e2bfba43488f543ace54746b Mon Sep 17 00:00:00 2001
+From: Rosen Penev <rosenp@gmail.com>
+Date: Thu, 23 Jan 2020 18:54:51 -0800
+Subject: [PATCH 2/2] libcrypto: remove deprecated API usage
+
+EVP_CIPHER_CTX_init was replaced with _reset.
+
+Removed EVP_CIPHER_CTX_cleanup. The successive _free call handles that.
+
+Removed old SSLeay function usage.
+
+Signed-off-by: Rosen Penev <rosenp@gmail.com>
+---
+ src/libcrypto.c | 9 ++++-----
+ 1 file changed, 4 insertions(+), 5 deletions(-)
+
+diff --git a/src/libcrypto.c b/src/libcrypto.c
+index b3792264..7ce7d93a 100644
+--- a/src/libcrypto.c
++++ b/src/libcrypto.c
+@@ -541,7 +541,7 @@ static int evp_cipher_set_encrypt_key(struct ssh_cipher_struct *cipher,
+     int rc;
+     evp_cipher_init(cipher);
+-    EVP_CIPHER_CTX_init(cipher->ctx);
++    EVP_CIPHER_CTX_reset(cipher->ctx);
+     rc = EVP_EncryptInit_ex(cipher->ctx, cipher->cipher, NULL, key, IV);
+     if (rc != 1){
+@@ -574,7 +574,7 @@ static int evp_cipher_set_decrypt_key(struct ssh_cipher_struct *cipher,
+     int rc;
+     evp_cipher_init(cipher);
+-    EVP_CIPHER_CTX_init(cipher->ctx);
++    EVP_CIPHER_CTX_reset(cipher->ctx);
+     rc = EVP_DecryptInit_ex(cipher->ctx, cipher->cipher, NULL, key, IV);
+     if (rc != 1){
+@@ -657,7 +657,6 @@ static void evp_cipher_decrypt(struct ssh_cipher_struct *cipher,
+ static void evp_cipher_cleanup(struct ssh_cipher_struct *cipher) {
+     if (cipher->ctx != NULL) {
+-        EVP_CIPHER_CTX_cleanup(cipher->ctx);
+         EVP_CIPHER_CTX_free(cipher->ctx);
+     }
+ }
+@@ -1481,11 +1480,11 @@ int ssh_crypto_init(void)
+     if (libcrypto_initialized) {
+         return SSH_OK;
+     }
+-    if (SSLeay() != OPENSSL_VERSION_NUMBER){
++    if (OpenSSL_version_num() != OPENSSL_VERSION_NUMBER){
+         SSH_LOG(SSH_LOG_WARNING, "libssh compiled with %s "
+             "headers, currently running with %s.",
+             OPENSSL_VERSION_TEXT,
+-            SSLeay_version(SSLeay())
++            OpenSSL_version(OpenSSL_version_num())
+         );
+     }
+ #ifdef CAN_DISABLE_AESNI
+-- 
+2.24.1
+
index 91f138d841eac6fa76175484ba271d73058803bc..6f3bc133b1f0688f29b10e12d2a177996c887452 100644 (file)
@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=talloc
 PKG_VERSION:=2.3.1
 MAJOR_VERSION:=2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://www.samba.org/ftp/talloc
@@ -19,8 +19,6 @@ PKG_LICENSE:=LGPL-3.0-or-later
 
 PKG_BUILD_PARALLEL:=0
 
-HOST_BUILD_DEPENDS:=python/host
-
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/kernel.mk
 
index d9b809e2d96690cfdb85daf3b5faf57265679c5e..b63b9d17fb8c0728d539585c7b83045e49e199ed 100644 (file)
@@ -27,7 +27,6 @@ PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/cmake.mk
-include $(TOPDIR)/feeds/packages/lang/python/python-package.mk
 include $(TOPDIR)/feeds/packages/lang/python/python3-package.mk
 
 UPM_MODULES:= \
@@ -75,7 +74,6 @@ define Package/libupm
   DEPENDS+=+libjpeg +libmodbus +openzwave
   DEPENDS+= $(foreach module, $(UPM_MODULES), +libupm-$(module))
   DEPENDS+= $(foreach module, $(UPM_MODULES), +libupm-$(module)-node)
-  DEPENDS+= $(foreach module, $(UPM_MODULES), +libupm-$(module)-python)
   DEPENDS+= $(foreach module, $(UPM_MODULES), +libupm-$(module)-python3)
 endef
 
@@ -95,14 +93,6 @@ define Package/libupm/install/Default-node
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/jsupm_$(2) $(1)/usr/lib/node/ ;
 endef
 
-define Package/libupm/install/Default-python
-       $(INSTALL_DIR) $(1)/usr/lib/python$(PYTHON_VERSION)/site-packages/upm
-       $(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/ ;
-endef
-
 define Package/libupm/install/Default-python3
        $(INSTALL_DIR) $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/upm
        $(CP) $(CMAKE_BINARY_DIR)/$(if $(filter interfaces, $(2)),,src/)$(2)/python$(PYTHON3_VERSION)/pyupm_$(2).py \
@@ -115,7 +105,6 @@ define Package/libupm/install
        $(foreach module, $(UPM_MODULES), \
                $(call Package/libupm/install/Default,$(1),$(module)) \
                $(call Package/libupm/install/Default-node,$(1),$(module)) \
-               $(call Package/libupm/install/Default-python,$(1),$(module)) \
                $(call Package/libupm/install/Default-python3,$(1),$(module)))
 endef
 
@@ -364,19 +353,6 @@ $(call Package/libupm/Default/description)
 This package contains $(1) sensor Node.js library
 endef
 
-define Package/libupm-$(1)-python
-  $(call Package/libupm/Default)
-  $(call UpmPackage/depends,$(1))
-  TITLE:=$(1) Python library
-  DEPENDS+=+libupm-$(1) +libmraa-python +python-light
-endef
-
-define Package/libupm-$(1)-python/description
-$(call Package/libupm/Default/description)
-
-This package contains $(1) sensor Python library
-endef
-
 define Package/libupm-$(1)-python3
   $(call Package/libupm/Default)
   $(call UpmPackage/depends,$(1))
@@ -396,9 +372,6 @@ endef
 define Package/libupm-$(1)-node/install
        $(call Package/libupm/install/Default-node,$$(1),$(1))
 endef
-define Package/libupm-$(1)-python/install
-       $(call Package/libupm/install/Default-python,$$(1),$(1))
-endef
 define Package/libupm-$(1)-python3/install
        $(call Package/libupm/install/Default-python3,$$(1),$(1))
 endef
@@ -409,5 +382,4 @@ $(foreach module, $(UPM_MODULES), \
        $(eval $(call UpmPackage,$(module))) \
        $(eval $(call BuildPackage,libupm-$(module))) \
        $(eval $(call BuildPackage,libupm-$(module)-node)) \
-       $(eval $(call BuildPackage,libupm-$(module)-python)) \
        $(eval $(call BuildPackage,libupm-$(module)-python3)))
index 39c3e0f1afadbcf6065fe0983310e9083e519f29..d4c23d5ca26e6ddc81c9b793e83e8e835a7df131 100644 (file)
@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libupnp
 PKG_VERSION:=1.8.6
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=@SF/pupnp
@@ -48,6 +48,25 @@ define Package/libupnp-sample/description
 TVcontrolpoint & tvdevice sample applications run inside /etc/upnp-tvdevice/
 endef
 
+CONFIGURE_ARGS += \
+       --enable-client \
+       --enable-device \
+       --enable-gena \
+       --enable-reuseaddr \
+       --enable-gena \
+       --enable-webserver \
+       --enable-ssdp \
+       --enable-soap \
+       --enable-tools \
+       --enable-blocking_tcp_connections \
+       --enable-samples \
+       --disable-debug \
+       --disable-optssdp \
+       --disable-unspecified_server \
+       --disable-open_ssl \
+       --disable-scriptsupport \
+       --disable-postwrite
+
 TARGET_CFLAGS += -flto
 TARGET_LDFLAGS += -flto
 
index 08b4dd245f8cc2ca7d549f4cf178b481a32752c2..59b1d3ee498b46aa8fc085faa2d36737e5c36e1a 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libuwsc
-PKG_VERSION:=3.3.2
+PKG_VERSION:=3.3.4
 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:=bae2cd13eda86876ebcf99a38a069f5e8c01717713d2fec25031051b9c47624b
+PKG_HASH:=ef789ff35e537e5191ec0d13f3e0df54187a54eace611e283ad4172d4411d08b
 
 PKG_MAINTAINER:=Jianhui Zhao <jianhuizhao329@gmail.com>
 PKG_LICENSE:=MIT
index a58b8ff0141468ad1442f02a049fdd70300fb903..21fc5b9c2ff53633d324fb66713b7234ffe708e9 100644 (file)
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=v4l-utils
 PKG_VERSION:=1.16.6
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://www.linuxtv.org/downloads/v4l-utils
diff --git a/libs/libv4l/patches/040-musl.patch b/libs/libv4l/patches/040-musl.patch
new file mode 100644 (file)
index 0000000..79dc5d2
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/utils/keytable/keytable.c
++++ b/utils/keytable/keytable.c
+@@ -1686,7 +1686,7 @@ static void test_event(struct rc_device *rc_dev, int fd)
+               for (i = 0; i < rd / sizeof(struct input_event); i++) {
+                       printf(_("%ld.%06ld: event type %s(0x%02x)"),
+-                              ev[i].time.tv_sec, ev[i].time.tv_usec,
++                              ev[i].input_event_sec, ev[i].input_event_usec,
+                               get_event_name(events_type, ev[i].type), ev[i].type);
+                       switch (ev[i].type) {
index 954b158246f35a13c3d83d0ea63e1ae68ab035c6..6361bcb47885e81ebd60f3d437790e6aae960502 100644 (file)
@@ -8,24 +8,22 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libxslt
-PKG_VERSION:=1.1.33
-PKG_RELEASE:=4
+PKG_VERSION:=1.1.34
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:= \
        http://xmlsoft.org/sources/ \
        ftp://fr.rpmfind.net/pub/libxml/
-PKG_HASH:=8e36605144409df979cab43d835002f63988f3dc94d5d3537c12796db90e38c8
+PKG_HASH:=98b1bd46d6792925ad2dfe9a87452ea2adebf69dcb9919ffd55bf926a7f93f7f
 
+PKG_MAINTAINER:=Jiri Slachta <jiri@slachta.eu>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=COPYING
 PKG_CPE_ID:=cpe:/a:xmlsoft:libxslt
 
-PKG_MAINTAINER:=Jiri Slachta <jiri@slachta.eu>
-
-PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
-
+PKG_BUILD_PARALLEL:=1
 HOST_BUILD_DEPENDS:=libxml2/host
 
 include $(INCLUDE_DIR)/package.mk
@@ -67,8 +65,7 @@ define Package/xsltproc/description
  XSLT XML transformation utility.
 endef
 
-CONFIGURE_ARGS+= \
-       --disable-silent-rules \
+CONFIGURE_ARGS += \
        --enable-shared \
        --enable-static \
        --without-python \
@@ -76,6 +73,18 @@ CONFIGURE_ARGS+= \
        --without-debug \
        --without-mem-debug \
        --without-debugger \
+       --without-profiler \
+       --without-plugins
+
+HOST_CONFIGURE_ARGS += \
+       --with-libxml-prefix=$(STAGING_DIR_HOSTPKG) \
+       --without-python \
+       --without-crypto \
+       --without-debug \
+       --without-mem-debug \
+       --without-debugger \
+       --without-profiler \
+       --without-plugins
 
 define Build/InstallDev/Xslt
        $(INSTALL_DIR) $(1)/usr/bin $(2)/bin $(1)/usr/include/libxslt \
@@ -129,16 +138,6 @@ define Build/InstallDev
         $(if $(CONFIG_PACKAGE_libexslt),$(call Build/InstallDev/Exslt,$(1),$(2)))
 endef
 
-HOST_CONFIGURE_ARGS+= \
-       --disable-silent-rules \
-       --enable-static \
-       --with-libxml-prefix=$(STAGING_DIR_HOSTPKG) \
-       --without-python \
-       --without-crypto \
-       --without-debug \
-       --without-mem-debug \
-       --without-debugger
-
 define Package/libxslt/install
        $(INSTALL_DIR) $(1)/usr/lib
        $(CP) \
diff --git a/libs/libxslt/patches/100-fix-cve-2019-11068.patch b/libs/libxslt/patches/100-fix-cve-2019-11068.patch
deleted file mode 100644 (file)
index 260f35d..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-From e03553605b45c88f0b4b2980adfbbb8f6fca2fd6 Mon Sep 17 00:00:00 2001
-From: Nick Wellnhofer <wellnhofer@aevum.de>
-Date: Sun, 24 Mar 2019 09:51:39 +0100
-Subject: [PATCH] Fix security framework bypass
-
-xsltCheckRead and xsltCheckWrite return -1 in case of error but callers
-don't check for this condition and allow access. With a specially
-crafted URL, xsltCheckRead could be tricked into returning an error
-because of a supposedly invalid URL that would still be loaded
-succesfully later on.
-
-Fixes #12.
-
-Thanks to Felix Wilhelm for the report.
----
- libxslt/documents.c | 18 ++++++++++--------
- libxslt/imports.c   |  9 +++++----
- libxslt/transform.c |  9 +++++----
- libxslt/xslt.c      |  9 +++++----
- 4 files changed, 25 insertions(+), 20 deletions(-)
-
-diff --git a/libxslt/documents.c b/libxslt/documents.c
-index 3f3a7312..4aad11bb 100644
---- a/libxslt/documents.c
-+++ b/libxslt/documents.c
-@@ -296,10 +296,11 @@ xsltLoadDocument(xsltTransformContextPtr ctxt, const xmlChar *URI) {
-       int res;
-       res = xsltCheckRead(ctxt->sec, ctxt, URI);
--      if (res == 0) {
--          xsltTransformError(ctxt, NULL, NULL,
--               "xsltLoadDocument: read rights for %s denied\n",
--                           URI);
-+      if (res <= 0) {
-+            if (res == 0)
-+                xsltTransformError(ctxt, NULL, NULL,
-+                     "xsltLoadDocument: read rights for %s denied\n",
-+                                 URI);
-           return(NULL);
-       }
-     }
-@@ -372,10 +373,11 @@ xsltLoadStyleDocument(xsltStylesheetPtr style, const xmlChar *URI) {
-       int res;
-       res = xsltCheckRead(sec, NULL, URI);
--      if (res == 0) {
--          xsltTransformError(NULL, NULL, NULL,
--               "xsltLoadStyleDocument: read rights for %s denied\n",
--                           URI);
-+      if (res <= 0) {
-+            if (res == 0)
-+                xsltTransformError(NULL, NULL, NULL,
-+                     "xsltLoadStyleDocument: read rights for %s denied\n",
-+                                 URI);
-           return(NULL);
-       }
-     }
-diff --git a/libxslt/imports.c b/libxslt/imports.c
-index 874870cc..3783b247 100644
---- a/libxslt/imports.c
-+++ b/libxslt/imports.c
-@@ -130,10 +130,11 @@ xsltParseStylesheetImport(xsltStylesheetPtr style, xmlNodePtr cur) {
-       int secres;
-       secres = xsltCheckRead(sec, NULL, URI);
--      if (secres == 0) {
--          xsltTransformError(NULL, NULL, NULL,
--               "xsl:import: read rights for %s denied\n",
--                           URI);
-+      if (secres <= 0) {
-+            if (secres == 0)
-+                xsltTransformError(NULL, NULL, NULL,
-+                     "xsl:import: read rights for %s denied\n",
-+                                 URI);
-           goto error;
-       }
-     }
-diff --git a/libxslt/transform.c b/libxslt/transform.c
-index 13793914..0636dbd0 100644
---- a/libxslt/transform.c
-+++ b/libxslt/transform.c
-@@ -3493,10 +3493,11 @@ xsltDocumentElem(xsltTransformContextPtr ctxt, xmlNodePtr node,
-      */
-     if (ctxt->sec != NULL) {
-       ret = xsltCheckWrite(ctxt->sec, ctxt, filename);
--      if (ret == 0) {
--          xsltTransformError(ctxt, NULL, inst,
--               "xsltDocumentElem: write rights for %s denied\n",
--                           filename);
-+      if (ret <= 0) {
-+            if (ret == 0)
-+                xsltTransformError(ctxt, NULL, inst,
-+                     "xsltDocumentElem: write rights for %s denied\n",
-+                                 filename);
-           xmlFree(URL);
-           xmlFree(filename);
-           return;
-diff --git a/libxslt/xslt.c b/libxslt/xslt.c
-index 780a5ad7..a234eb79 100644
---- a/libxslt/xslt.c
-+++ b/libxslt/xslt.c
-@@ -6763,10 +6763,11 @@ xsltParseStylesheetFile(const xmlChar* filename) {
-       int res;
-       res = xsltCheckRead(sec, NULL, filename);
--      if (res == 0) {
--          xsltTransformError(NULL, NULL, NULL,
--               "xsltParseStylesheetFile: read rights for %s denied\n",
--                           filename);
-+      if (res <= 0) {
-+            if (res == 0)
-+                xsltTransformError(NULL, NULL, NULL,
-+                     "xsltParseStylesheetFile: read rights for %s denied\n",
-+                                 filename);
-           return(NULL);
-       }
-     }
--- 
-2.18.1
-
diff --git a/libs/libxslt/patches/101-fix-cve-2019-13117.patch b/libs/libxslt/patches/101-fix-cve-2019-13117.patch
deleted file mode 100644 (file)
index 78ebb90..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-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
deleted file mode 100644 (file)
index b377f4b..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-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 0856aed2f7eebf2f1660347fb83563fd9c3f8bf9..605041027162d83cc6c168d720a57acd0d795184 100644 (file)
@@ -8,19 +8,19 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mtdev
-PKG_VERSION:=1.1.5
+PKG_VERSION:=1.1.6
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://bitmath.org/code/mtdev/
-PKG_HASH:=6677d5708a7948840de734d8b4675d5980d4561171c5a8e89e54adf7a13eba7f
+PKG_HASH:=15d7b28da8ac71d8bc8c9287c2045fd174267bc740bec10cfda332dc1204e0e0
 
+PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=COPYING
-PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
 
-PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
index 95a2ecd9bfec697cdefc298f69d641e87c7ccb93..e68d7397ee9ca4ae5060e8b2bd4db9a1035482d9 100644 (file)
@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=nspr
 PKG_VERSION:=4.25
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_MAINTAINER:=Lucian Cristian <lucian.cristian@gmail.com>
 PKG_LICENCE:=MPL-2.0
 
diff --git a/libs/nspr/patches/010-sgidefs.patch b/libs/nspr/patches/010-sgidefs.patch
new file mode 100644 (file)
index 0000000..2705a75
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/nspr/pr/include/md/_linux.cfg
++++ b/nspr/pr/include/md/_linux.cfg
+@@ -499,7 +499,7 @@
+ #elif defined(__mips__)
+ /* For _ABI64 */
+-#include <sgidefs.h>
++#include <asm/sgidefs.h>
+ #ifdef __MIPSEB__
+ #define IS_BIG_ENDIAN 1
index 352743d6b6ee1f1c64db442e3370dbcac04707c0..c4293e572d18af142417affad3b889f277332feb 100644 (file)
@@ -7,14 +7,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=nss
-PKG_VERSION:=3.50
+PKG_VERSION:=3.51
 PKG_RELEASE:=1
 
 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:=185df319775243f5f5daa9d49b7f9cc5f2b389435be3247c3376579bee063ba7
+PKG_HASH:=75348b3b3229362486c57a880db917da1f96ef4eb639dc9cc2ff17d72268459c
 
 PKG_MAINTAINER:=Lucian Cristian <lucian.cristian@gmail.com>
 PKG_LICENCE:=MPL-2.0
index b392fccac1fbcb60e247aa5255711d0483d7c1b2..de903d325d399ad1f9aacae9e0bc194d817c0fe5 100644 (file)
@@ -1,21 +1,19 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=rpcsvc-proto
-PKG_RELEASE:=2
+PKG_VERSION:=1.4.1
+PKG_RELEASE:=1
 
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/thkukuk/rpcsvc-proto.git
-PKG_SOURCE_DATE:=2020-01-16
-PKG_SOURCE_VERSION:=daba1f3aa715551bd83770053a15153f0e40d27f
-PKG_MIRROR_HASH:=38ac6ad69327d4498cebc5b97519210f0643a8c47a3a3409cbae01806631694b
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE_URL:=https://github.com/thkukuk/rpcsvc-proto/releases/download/v$(PKG_VERSION)
+PKG_HASH:=9429e143bb8dd33d34bf0663f571d4d4a1103e1afd7c49791b367b7ae1ef7f35
 
 PKG_MAINTAINER:=Andy Walsh <andy.walsh44+github@gmail.com>
 PKG_LICENSE:=BSD-3-clause
 PKG_LICENSE_FILES:=COPYING
 
-PKG_FIXUP:=autoreconf
-PKG_REMOVE_FILES:=autogen.sh
 PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
 
 HOST_BUILD_DEPENDS:=gettext-full/host
 PKG_BUILD_DEPENDS:=rpcsvc-proto/host
index 15000e3e28f17cf9787ccfe8a85cea00efa0b10a..a5a4fb899e8140cfaf193fbc9672aadd9c140036 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=dovecot
-PKG_VERSION:=2.3.9.3
+PKG_VERSION:=2.3.10
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://dovecot.org/releases/2.3
-PKG_HASH:=f89fb69423fc5bdc05955c8fc0607eab9e33511f9a643b721763db6156c49651
+PKG_HASH:=473184723d854a4d1dbd99c11a7b9f65156ca5fe6ecf85d9a44b5127e6f871c5
 
 PKG_MAINTAINER:=Lucian Cristian <lucian.cristian@gmail.com>
 PKG_LICENSE:=LGPL-2.1-only MIT BSD-3-Clause
diff --git a/mail/mailman/Makefile b/mail/mailman/Makefile
deleted file mode 100644 (file)
index d1c41ac..0000000
+++ /dev/null
@@ -1,129 +0,0 @@
-#
-# Copyright (C) 2014 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:=mailman
-PKG_VERSION:=2.1.29
-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-or-later
-PKG_LICENSE_FILES:=gnu-COPYING-GPL
-PKG_CPE_ID:=cpe:2.3:a:gnu:mailman
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/mailman
-  SECTION:=mail
-  CATEGORY:=Mail
-  TITLE:=The GNU Mailing List Manager
-  URL:=https://www.gnu.org/software/mailman/
-  DEPENDS:=+postfix +python +uhttpd +python-dns
-endef
-
-define Package/mailman/description
- Mailman is free software for managing electronic mail discussion and e-newsletter lists.
-endef
-
-prefix=/usr/local/mailman
-
-define Package/mailman/conffiles
-$(prefix)/Mailman/mm_cfg.py
-endef
-
-CONFIGURE_ARGS += \
-       --prefix="$(prefix)" \
-       --exec-prefix="$(prefix)" \
-       --with-username="root" \
-       --with-groupname="root" \
-       --with-mail-gid="nogroup" \
-       --with-cgi-gid="root" \
-       --without-permcheck \
-
-define Build/Compile
-endef
-
-define Package/mailman/install
-       $(INSTALL_DIR) $(1)$(prefix)
-       cd $(PKG_BUILD_DIR); $(MAKE) DESTDIR=$(1) install
-       $(INSTALL_DIR) $(1)/etc/init.d
-       $(INSTALL_BIN) ./files/mailman.init $(1)/etc/init.d/mailman
-       $(INSTALL_DIR) $(1)/usr/www
-       ln -s $(prefix)/cgi-bin/ $(1)/usr/www/mailman
-       ln -s $(prefix)/archives/public/ $(1)/usr/www/pipermail
-       ln -s $(prefix)/icons $(1)/usr/www/icons
-endef
-
-define Package/mailman/postinst
-#!/bin/sh
-# check if we are on real system
-if [ -z "$${IPKG_INSTROOT}" ]; then
-
- if [ `postconf alias_maps | grep -ci mailman` -eq 0 ]
- then
-  postconf -e "`postconf alias_maps`, cdb:$(prefix)/data/aliases"
- fi
- cd $(prefix)
- hostname=`cat /proc/sys/kernel/hostname`
- if [ ! -f data/aliases ]
- then
-  ./bin/genaliases
- fi
- newaliases
- if [ `grep -c DEFAULT_URL_HOST Mailman/mm_cfg.py` -eq 0 ]
- then
-  echo "DEFAULT_EMAIL_HOST = '$$hostname'" >> Mailman/mm_cfg.py
-  echo "DEFAULT_URL_HOST = '$$hostname'" >> Mailman/mm_cfg.py
-  echo "add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)" >> Mailman/mm_cfg.py
-  echo "QRUNNERS.remove(('NewsRunner',1))" >> Mailman/mm_cfg.py
- fi
- if [ `./bin/list_lists | grep -ci mailman` -eq 0 ]
- then
-  ./bin/newlist --urlhost=$$hostname --emailhost=$$hostname --quiet mailman root@$$hostname mailman
-  ./bin/config_list -i data/sitelist.cfg mailman
-  echo "NOTE: A default site-wide mailing list Mailman with password 'mailman' has been created. Please review it and change the password."
-  ./bin/mmsitepass mailman
-  echo "NOTE: The default site password 'mailman' has been created."
- fi
- # /etc/init.d/mailman enable
- if [ `ps | grep "mailman/bin/qrunner" | grep -cv grep` -gt 0 ]
- then
-  $(prefix)/bin/mailmanctl -q restart
- fi
- if [ `grep -c mailman /etc/config/uhttpd` -eq 0 ]
- then #we assume that the server is not configured yet, thus print out some help for the first time:
-  echo "NOTE: Please set the site password using $(prefix)/bin/mmsitepass <your-site-password>"
-  echo "Please add uhttpd config section to your /etc/config/uhttpd like this:"
-  echo "config uhttpd mailman"
-  echo "       list listen_http        0.0.0.0:80"
-  echo "       option home             /usr/www"
-  echo "       option cgi_prefix       /mailman"
-  echo "       no_symlinks             0"
-  echo "Don't forget to setup firewall for accessing this website!"
-  echo "To add a mailing list go to http://$$hostname/mailman/create."
- fi
-fi
-endef
-
-define Package/mailman/prerm
-#!/bin/sh
-# check if we are on real system
-if [ -z "$${IPKG_INSTROOT}" ]; then
-
- if [ `ps | grep "mailman/bin/qrunner" | grep -cv grep` -gt 0 ]
- then
-  $(prefix)/bin/mailmanctl stop
- fi
-fi
-endef
-
-$(eval $(call BuildPackage,mailman))
diff --git a/mail/mailman/files/mailman.init b/mail/mailman/files/mailman.init
deleted file mode 100644 (file)
index f68a456..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/sh /etc/rc.common
-# Copyright (C) 2014 OpenWrt.org
-
-START=50
-STOP=50
-
-PYTHON=/usr/bin/python
-MAILMANHOME=/usr/local/mailman
-MAILMANCTL=$MAILMANHOME/bin/mailmanctl
-
-start() {
-       #rm -f $MAILMANHOME/locks/*
-       $PYTHON $MAILMANCTL -s -q start
-}
-
-stop() {
-       $PYTHON $MAILMANCTL -q stop
-}
-
-restart() {
-       $PYTHON $MAILMANCTL -q restart
-}
diff --git a/mail/mailman/patches/100-postfix.patch b/mail/mailman/patches/100-postfix.patch
deleted file mode 100644 (file)
index 3189911..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/Mailman/Defaults.py.in
-+++ b/Mailman/Defaults.py.in
-@@ -506,7 +506,7 @@ SMTPLIB_DEBUG_LEVEL = 0
- # standard out (or send an email to the site list owner) for manual twiddling
- # of an /etc/aliases style file.  Use 'Postfix' if you are using the Postfix
- # MTA -- but then also see POSTFIX_STYLE_VIRTUAL_DOMAINS.
--MTA = 'Manual'
-+MTA = 'Postfix'
- # If you set MTA='Postfix', then you also want to set the following variable,
- # depending on whether you're using virtual domains in Postfix, and which
diff --git a/mail/mailman/patches/200-nohostdnspython.patch b/mail/mailman/patches/200-nohostdnspython.patch
deleted file mode 100644 (file)
index abadeb8..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
---- a/configure
-+++ b/configure
-@@ -2255,35 +2255,35 @@ fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $version" >&5
- $as_echo "$version" >&6; }
--# See if dnspython is installed.
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dnspython" >&5
--$as_echo_n "checking dnspython... " >&6; }
--
--cat > conftest.py <<EOF
--try:
--    import dns.resolver
--    res = 'ok'
--except ImportError:
--    res = 'no'
--fp = open("conftest.out", "w")
--fp.write("%s\n" % res)
--fp.close()
--EOF
--
--$PYTHON conftest.py
--havednspython=`cat conftest.out`
--rm -f conftest.out conftest.py
--if test "$havednspython" = "no"
--then
--    as_fn_error $? "
--
--***** dnspython not found. It is required for the new
--***** dmarc_moderation_action featurer. Get it from
--***** <http://www.dnspython.org/> or
--***** <https://pypi.python.org/pypi/dnspython/>" "$LINENO" 5
--fi
--{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $havednspython" >&5
--$as_echo "$havednspython" >&6; }
-+## See if dnspython is installed.
-+#{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dnspython" >&5
-+#$as_echo_n "checking dnspython... " >&6; }
-+#
-+#cat > conftest.py <<EOF
-+#try:
-+#    import dns.resolver
-+#    res = 'ok'
-+#except ImportError:
-+#    res = 'no'
-+#fp = open("conftest.out", "w")
-+#fp.write("%s\n" % res)
-+#fp.close()
-+#EOF
-+#
-+#$PYTHON conftest.py
-+#havednspython=`cat conftest.out`
-+#rm -f conftest.out conftest.py
-+#if test "$havednspython" = "no"
-+#then
-+#    as_fn_error $? "
-+#
-+#***** dnspython not found. It is required for the new
-+#***** dmarc_moderation_action featurer. Get it from
-+#***** <http://www.dnspython.org/> or
-+#***** <https://pypi.python.org/pypi/dnspython/>" "$LINENO" 5
-+#fi
-+#{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $havednspython" >&5
-+#$as_echo "$havednspython" >&6; }
- # Check the email package version.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's email package" >&5
diff --git a/mail/mailman/patches/300-targetpython.patch b/mail/mailman/patches/300-targetpython.patch
deleted file mode 100644 (file)
index 49957c0..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/configure
-+++ b/configure
-@@ -3957,6 +3957,8 @@ fi
- $as_echo "$URLHOST" >&6; }
- rm -f conftest.out conftest.py
-+PYTHON=/usr/bin/python
-+
- # Checks for libraries.
- for ac_func in strerror setregid syslog
diff --git a/mail/mailman/patches/400-modules.patch b/mail/mailman/patches/400-modules.patch
deleted file mode 100644 (file)
index 63cc8f9..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
---- a/Mailman/MailList.py
-+++ b/Mailman/MailList.py
-@@ -30,7 +30,7 @@ import re
- import shutil
- import socket
- import urllib
--import cPickle
-+import pickle as cPickle
- from cStringIO import StringIO
- from UserDict import UserDict
---- a/misc/paths.py.in
-+++ b/misc/paths.py.in
-@@ -71,14 +71,14 @@ sys.path.append(distdir)
- # In a normal interactive Python environment, the japanese.pth and korean.pth
- # files would be imported automatically.  But because we inhibit the importing
- # of the site module, we need to be explicit about importing these codecs.
--if not jaok:
--    import japanese
-+#if not jaok:
-+#    import japanese
- # As of KoreanCodecs 2.0.5, you had to do the second import to get the Korean
- # codecs installed, however leave the first import in there in case an upgrade
- # changes this.
--if not kook:
--    import korean
--    import korean.aliases
-+#if not kook:
-+#    import korean
-+#    import korean.aliases
- # Arabic and Hebrew (RFC-1556) encoding aliases. (temporary solution)
- import encodings.aliases
- encodings.aliases.aliases.update({
index 9769dc933425a1e19321543a5094b2307d875385..f7fd422906bdce05b6d1a0ad97bd21a183b20fc6 100644 (file)
@@ -5,13 +5,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=graphicsmagick
-PKG_VERSION:=1.3.34
+PKG_VERSION:=1.3.35
 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:=7e1904c924cc3574aecc7ca6879fc6cf01070859e3ca4a06182b3e0eb346a0c2
+PKG_HASH:=7fd0b49903eb35df4ab5ca76139ab3f023f47485a4913fbdcf5c642c6e5f01fc
 
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=Copyright.txt
index 063489d2460fd04ffba024b389e6ac05b599504e..283fa78a0b88f2030e8f7371850298773c7345d3 100644 (file)
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=grilo-plugins
 PKG_VERSION:=0.3.11
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
 PKG_LICENSE:=LGPLv2.1
@@ -17,7 +17,6 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@GNOME/grilo-plugins/0.3/
 PKG_HASH:=dde2e605b1994341c6bf012493e056b406b08571834dea3b3c671d5b8b1dcd73
 
-PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
 PKG_BUILD_DEPENDS:=meson/host
 
@@ -61,6 +60,7 @@ MESON_ARGS += \
        -Denable-thetvdb=no \
        -Denable-tmdb=no \
        -Denable-freebox=no \
+       --wrap-mode=nodownload
 
 define Package/grilo-plugins/install
        $(INSTALL_DIR) $(1)/usr/lib/grilo-0.3
index d20bad1f287bdac7ccbd330b4ab8fd2429863064..14263738ab166a0598e3771b636dcd0953ee0987 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=acme
 PKG_VERSION:=2.8.5
-PKG_RELEASE:=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)?
@@ -80,7 +80,7 @@ define Package/luci-app-acme
   SECTION:=luci
   CATEGORY:=LuCI
   TITLE:=ACME package - LuCI interface
-  DEPENDS:= lua luci-base luci-compat +acme
+  DEPENDS:= +luci-compat +acme
   SUBMENU:=3. Applications
   PKGARCH:=all
 endef
index 3c55ff9e89248fb2bc288f03b931f91f2acd846f..a1f149b04644a0210e2ee978920f063ff1fcdbb3 100644 (file)
@@ -1,12 +1,12 @@
 #
-# Copyright (c) 2015-2019 Dirk Brenken (dev@brenken.org)
+# Copyright (c) 2015-2020 Dirk Brenken (dev@brenken.org)
 # This is free software, licensed under the GNU General Public License v3.
 #
 
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=adblock
-PKG_VERSION:=3.8.15
+PKG_VERSION:=4.0.2
 PKG_RELEASE:=1
 PKG_LICENSE:=GPL-3.0-or-later
 PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
@@ -17,7 +17,7 @@ define Package/adblock
        SECTION:=net
        CATEGORY:=Network
        TITLE:=Powerful adblock script to block ad/abuse domains by using DNS
-       DEPENDS:=+jshn +jsonfilter
+       DEPENDS:=+jshn +jsonfilter +coreutils +coreutils-sort
        PKGARCH:=all
 endef
 
@@ -55,9 +55,11 @@ define Package/adblock/install
 
        $(INSTALL_DIR) $(1)/etc/adblock
        $(INSTALL_BIN) ./files/adblock.mail $(1)/etc/adblock
-       $(INSTALL_BIN) ./files/adblock.service $(1)/etc/adblock
+       $(INSTALL_BIN) ./files/adblock.monitor $(1)/etc/adblock
        $(INSTALL_CONF) ./files/adblock.blacklist $(1)/etc/adblock
        $(INSTALL_CONF) ./files/adblock.whitelist $(1)/etc/adblock
+       $(INSTALL_CONF) ./files/adblock.sources $(1)/etc/adblock
+       gzip -9 $(1)/etc/adblock/adblock.sources
 endef
 
 $(eval $(call BuildPackage,adblock))
index 84518aef6ccfcee503973e96f100043fc11b5059..aada8a0a123ecb3ed612ffbab5a11db4e316d7be 100644 (file)
 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):
-    * [adaway](https://adaway.org)
-        * Infrequent updates, approx. 400 entries (enabled by default)
-    * [adguard](https://adguard.com)
-        * Numerous updates on the same day, approx. 12.000 entries
-    * [bitcoin](https://github.com/hoshsadiq/adblock-nocoin-list)
-        * Infrequent updates, approx. 15 entries
-    * [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)
-    * [dshield](http://dshield.org)
-        * Daily updates, approx. 4.500 entries
-    * [hphosts](https://hosts-file.net)
-        * Monthly updates, approx. 50.000 entries
-    * [malwaredomains](http://malwaredomains.com)
-        * Daily updates, approx. 16.000 entries
-    * [malwaredomainlist](http://www.malwaredomainlist.com)
-        * Daily updates, approx. 1.500 entries
-    * [openphish](https://openphish.com)
-        * Numerous updates on the same day, approx. 1.800 entries
-    * [reg_cn](https://easylist-downloads.adblockplus.org/easylistchina+easylist.txt)
-        * 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
-    * [reg_de](https://easylist-downloads.adblockplus.org/easylistgermany+easylist.txt)
-        * 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
-    * [reg_nl](https://easylist-downloads.adblockplus.org/easylistdutch+easylist.txt)
-        * Regional blocklist for the Netherlands, weekly updates, approx. 1300 entries
-    * [reg_pl](http://adblocklist.org)
-        * 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
-    * [reg_ru](https://code.google.com/p/ruadlist)
-        * 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))
-    * [spam404](http://www.spam404.com)
-        * Infrequent updates, approx. 5.000 entries
-    * [sysctl/cameleon](http://sysctl.org/cameleon)
-        * 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))
-    * [whocares](https://someonewhocares.org)
-        * Weekly updates, approx. 12.000 entries
-    * [winhelp](http://winhelp2002.mvps.org)
-        * Infrequent updates, approx. 15.000 entries
-    * [winspy](https://github.com/crazy-max/WindowsSpyBlocker)
-        * Infrequent updates, approx. 120 entries
-    * [yoyo](http://pgl.yoyo.org/adservers)
-        * Weekly updates, approx. 2.500 entries (enabled by default)
+* Support of the following fully pre-configured domain blocklist sources (free for private usage, for commercial use please check their individual licenses)
+
+| Source              | Enabled | Size | Focus            | Information                                                      |
+| :------------------ | :-----: | :--- | :--------------- | :--------------------------------------------------------------- |
+| adaway              | x       | S    | mobile           | [Link](https://github.com/AdAway/adaway.github.io)               |
+| adguard             | x       | L    | general          | [Link](https://adguard.com)                                      |
+| andryou             |         | L    | compilation      | [Link](https://gitlab.com/andryou/block/-/blob/master/readme.md) |
+| anudeep             |         | M    | compilation      | [Link](https://github.com/anudeepND/blacklist)                   |
+| bitcoin             |         | S    | mining           | [Link](https://github.com/hoshsadiq/adblock-nocoin-list)         |
+| disconnect          | x       | S    | general          | [Link](https://disconnect.me)                                    |
+| dshield             |         | XL   | general          | [Link](https://dshield.org)                                      |
+| energized_blugo     |         | XL   | compilation      | [Link](https://github.com/EnergizedProtection/block)             |
+| energized_blu       |         | XL   | compilation      | [Link](https://github.com/EnergizedProtection/block)             |
+| energized_porn      |         | XXL  | compilation+porn | [Link](https://github.com/EnergizedProtection/block)             |
+| energized_unified   |         | XXL  | compilation      | [Link](https://github.com/EnergizedProtection/block)             |
+| malwaredomains      |         | M    | malware          | [Link](https://malwaredomains.com)                               |
+| malwarelist         |         | S    | malware          | [Link](https://www.malwaredomainlist.com)                        |
+| notracking          |         | XL   | tracking         | [Link](https://github.com/notracking/hosts-blocklists)           |
+| oisd_nl             |         | XXL  | general          | [Link](https://oisd.nl)                                          |
+| openphish           |         | S    | phishing         | [Link](https://openphish.com)                                    |
+| phishing_army       |         | S    | phishing         | [Link](https://phishing.army)                                    |
+| reg_cn              |         | M    | reg_china        | [Link](https://easylist.to)                                      |
+| reg_de              |         | M    | reg_germany      | [Link](https://easylist.to)                                      |
+| reg_es              |         | M    | reg_espania      | [Link](https://easylist.to)                                      |
+| reg_fi              |         | S    | reg_finland      | [Link](https://github.com/finnish-easylist-addition)             |
+| reg_id              |         | M    | reg_indonesia    | [Link](https://easylist.to)                                      |
+| reg_nl              |         | M    | reg_netherlands  | [Link](https://easylist.to)                                      |
+| reg_pl              |         | S    | reg_poland       | [Link](http://adblocklist.org)                                   |
+| reg_ro              |         | M    | reg_romania      | [Link](https://easylist.to)                                      |
+| reg_ru              |         | M    | reg_russia       | [Link](https://easylist.to)                                      |
+| shallalist          |         | L    | general          | [Link](https://www.shallalist.de)                                |
+| shallalist_porn     |         | XXL  | general+porn     | [Link](https://www.shallalist.de)                                |
+| smarttv             |         | S    | smarttv          | [Link](https://github.com/Perflyst/PiHoleBlocklist)              |
+| spam404             |         | S    | general          | [Link](https://github.com/Dawsey21)                              |
+| stevenblack         |         | L    | compilation      | [Link](https://github.com/StevenBlack/hosts)                     |
+| stopforumspam       |         | S    | spam             | [Link](https://www.stopforumspam.com)                            |
+| sysctl              |         | M    | general          | [Link](http://sysctl.org/cameleon)                               |
+| utcapitole          |         | L    | general          | [Link](https://dsi.ut-capitole.fr/blacklists/index_en.php)       |
+| utcapitole_porn     |         | XXL  | general+porn     | [Link](https://dsi.ut-capitole.fr/blacklists/index_en.php)       |
+| whocares            |         | M    | general          | [Link](https://someonewhocares.org)                              |
+| winhelp             |         | S    | general          | [Link](http://winhelp2002.mvps.org)                              |
+| winspy              |         | S    | win_telemetry    | [Link](https://github.com/crazy-max/WindowsSpyBlocker)           |
+| youtube             |         | M    | youtube          | [Link](https://github.com/kboghdady/youTube_ads_4_pi-hole)       |
+| yoyo                | x       | S    | general          | [Link](http://pgl.yoyo.org/adservers)                            |
+
+* List of supported and fully pre-configured adblock sources, already active sources are pre-selected.  
+  <b><em>To avoid OOM errors, please do not select too many lists!</em></b>  
+  List size information with the respective domain ranges as follows:  
+    • <b>S</b> (-10k), <b>M</b> (10k-30k) and <b>L</b> (30k-80k) should work for 128 MByte devices,  
+    • <b>XL</b> (80k-200k) should work for 256-512 MByte devices,  
+    • <b>XXL</b> (200k-) needs more RAM and Multicore support, e.g. x86 or raspberry devices.  
 * 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
+* Supports five different DNS backend formats: dnsmasq, unbound, named (bind), kresd or raw (e.g. used by dnscrypt-proxy)
+* Supports four different SSL-enabled download utilities: uclient-fetch, wget, curl or aria2c
+* Supports SafeSearch for google, bing, duckduckgo, yandex, youtube and pixabay
+* Fast downloads & list processing as they are handled in parallel running background jobs with multicore support
+* Supports 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
+* 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
+* Provides a 'DNS File Reset', where the generated DNS blocklist file will be purged after DNS backend loading to save storage space
+* Source parsing by fast & flexible regex rulesets, all rules and source information are placed in an external/compredd JSON file ('/etc/adblock/adblock.sources.gz') 
+* Overall duplicate removal in generated blocklist file 'adb_list.overall'
+* Additional local blacklist for manual overrides, located in '/etc/adblock/adblock.blacklist'
+* Additional local whitelist for manual overrides, located 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`)
-* 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)
-* 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
+* Procd based init system support ('start', 'stop', 'restart', 'reload', 'enable', 'disable', 'running', 'status', 'suspend',  'resume', 'query', 'report', 'list', 'timer')
+* Auto-Startup via procd network interface trigger or via classic time based startup
+* Suspend & Resume adblock temporarily without blocklist reloading
+* Provides comprehensive runtime information
+* Provides a detailed DNS Query Report with DNS related information about client requests, top (blocked) domains and more
+* Provides a powerful query function to quickly find blocked (sub-)domains, e.g. for whitelisting
+* Provides an easily configurable blocklist update scheduler called 'Refresh Timer'
+* Includes an option to generate an additional, restrictive '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
+* Includes an 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
+* Send notification E-Mails 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
+* Strong LuCI support, all relevant options are exposed to the web frontend
 
-## Installation & Usage
-### Prerequisites
-* [OpenWrt](https://openwrt.org), tested with the stable release series (19.07) and with the latest snapshot
+## Prerequisites
+* [OpenWrt](https://openwrt.org), tested with the stable release series (19.07.x) and with the latest rolling snapshot releases. On turris devices it has been successfully tested with TurrisOS 5.1.x  
+  <b>Please note:</b> Older OpenWrt releases like 18.06.x or 17.01.x are _not_ supported!  
+  <b>Please note:</b> Devices with less than 128 MByte RAM are _not_ supported!  
 * 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`
-
-### Installation of the core package
-* Install `adblock` (`opkg install adblock`)
+* A download utility with SSL support: 'wget', 'uclient-fetch' with one of the 'libustream-*' ssl libraries, 'aria2c' or 'curl' is required
+* Optional E-Mail notification support: for E-Mail notifications you need to install the additional 'msmtp' package
+* Optional DNS Query Report support: for DNS reporting you need to install the additional package 'tcpdump-mini' or 'tcpdump'
+* Optional support for gnu awk as alternative to the busybox default, install the additional package 'gawk'
 
-### 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
-
-### 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
+## Installation & Usage
+* Update your local opkg repository (_opkg update_)
+* Install 'adblock' (_opkg install adblock_). The adblock service is enabled by default
+* Install the LuCI companion package 'luci-app-adblock' (_opkg install luci-app-adblock_)
+* It's strongly recommended to use the LuCI frontend to easily configure all aspects of adblock, the application is located in LuCI under the 'Services' menu
+* Update from a former adblock version is easy. During the update a backup is made of the old configuration '/etc/config/adblock-backup' and replaced by the new config - that's all
 
-#### 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)
+## Adblock CLI Options
+* All important adblock functions are accessible via CLI as well.  
+<b>Please note:</b> The 'status' command in 19.07.x and TurrisOS is only available via 'status_service'
+<pre><code>
+/etc/init.d/adblock 
+Syntax: /etc/init.d/adblock [command]
 
-#### 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_dnsinstance` => set the relevant adblock enabled dnsmasq instance (int/default: '0', first dnsmasq instance)
-    * `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`)
+Available commands:
+       start   Start the service
+       stop    Stop the service
+       restart Restart the service
+       reload  Reload configuration files (or restart if service does not implement reload)
+       enable  Enable service autostart
+       disable Disable service autostart
+       running Check if service is running
+       status  Service status
+       suspend Suspend adblock processing
+       resume  Resume adblock processing
+       query   &lt;domain&gt; Query active blocklists and backups for a specific domain
+       report  [&lt;search&gt;] Print DNS statistics with an optional search parameter
+       list    [[&lt;add&gt;|&lt;remove&gt;] [source(s)]] List available adblock sources or add/remove them from config
+       timer   &lt;action&gt; &lt;hour&gt; [&lt;minute&gt;] [&lt;weekday&gt;] Set a cron based update interval
+</code></pre>
 
-#### Examples
-**Change default DNS backend to `unbound`:**
+## Adblock Config Options
+* Usually the auto pre-configured adblock setup works quite well and no manual overrides are needed
 
-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`.
+| Option            | Default                            | Description/Valid Values                                                                       |
+| :---------------- | :--------------------------------- | :--------------------------------------------------------------------------------------------- |
+| adb_enabled       | 1, enabled                         | set to 0 to disable the adblock service                                                        |
+| adb_srcarc        | -, /etc/adblock/adblock.sources.gz | full path to the used adblock source archive                                                   |
+| adb_srcfile       | -, /tmp/adb_sources.json           | full path to the used adblock source file, which has a higher precedence than the archive file |
+| adb_dns           | -, auto-detected                   | 'dnsmasq', 'unbound', 'named', 'kresd' or 'raw'                                                |
+| adb_fetchutil     | -, auto-detected                   | 'uclient-fetch', 'wget', 'curl' or 'aria2c'                                                    |
+| adb_fetchparm     | -, auto-detected                   | config options for the selected download utility                                               |
+| adb_trigger       | -, not set                         | trigger network interface or 'not set' to use a time-based startup                             |
+| adb_triggerdelay  | 2                                  | additional trigger delay in seconds before adblock processing begins                           |
+| adb_debug         | 0, disabled                        | set to 1 to enable the debug output                                                            |
+| adb_nice          | 0, standard prio.                  | valid nice level range 0-19 of the adblock processes                                           |
+| adb_forcedns      | 0, disabled                        | set to 1 to force DNS requests to the local resolver                                           |
+| adb_maxqueue      | 4                                  | size of the download queue to handle downloads & list processing in parallel                   |
+| adb_dnsdir        | -, auto-detected                   | path for the generated blocklist file 'adb_list.overall'                                       |
+| adb_dnstimeout    | 10                                 | timeout in seconds to wait for a successful DNS backend restart                                |
+| adb_dnsinstance   | 0, first instance                  | set to the relevant dns backend instance used by adblock (dnsmasq only)                        |
+| adb_dnsfilereset  | 0, disabled                        | set to 1 to purge the final DNS blocklist file after DNS backend loading                       |
+| adb_dnsflush      | 0, disabled                        | set to 1 to flush the DNS Cache before & after adblock processing                              |
+| adb_dnsinotify    | -, not set                         | set to 1 to prevent adblock triggered restarts for DNS backends with autoload functions        |
+| adb_dnsallow      | -, not set                         | set to 1 to disable selective DNS whitelisting (RPZ pass through)                              |
+| adb_lookupdomain  | example.com                        | external domain to check for a successful DNS backend restart or 'false' to disable this check |
+| adb_portlist      | 53 853 5353                        | space separated list of firewall ports which should be redirected locally                      |
+| adb_report        | 0, disabled                        | set to 1 to enable the background tcpdump gathering process for reporting                      |
+| adb_reportdir     | /tmp                               | path for DNS related report files                                                              |
+| adb_repiface      | -, auto-detected                   | name of the reporting interface or 'any' used by tcpdump                                       |
+| adb_replisten     | 53                                 | space separated list of reporting port(s) used by tcpdump                                      |
+| adb_repchunkcnt   | 5                                  | report chunk count used by tcpdump                                                             |
+| adb_repchunksize  | 1                                  | report chunk size used by tcpdump in MB                                                        |
+| adb_backup        | 1, enabled                         | set to 0 to disable the backup function                                                        |
+| adb_backupdir     | /tmp                               | path for adblock backups                                                                       |
+| adb_tmpbase       | /tmp                               | path for all adblock related runtime operations, e.g. downloading, sorting, merging etc.       |
+| adb_safesearch    | 0, disabled                        | set to 1 to enforce SafeSearch for google, bing, duckduckgo, yandex, youtube and pixabay       |
+| adb_safesearchmod | 0, disabled                        | set to 1 to enable moderate SafeSearch filters for youtube                                     |
+| adb_mail          | 0, disabled                        | set to 1 to enable notification E-Mails in case of a processing errors                         |
+| adb_mailreceiver  | -, not set                         | receiver address for adblock notification E-Mails                                              |
+| adb_mailsender    | no-reply@adblock                   | sender address for adblock notification E-Mails                                                |
+| adb_mailtopic     | adblock&nbsp;notification          | topic for adblock notification E-Mails                                                         |
+| adb_mailprofile   | adb_notify                         | mail profile used in 'msmtp' for adblock notification E-Mails                                  |
+| adb_mailcnt       | 0                                  | minimum domain count to trigger E-Mail notifications                                           |
+| adb_jail          | 0                                  | set to 1 to enable the additional, restrictive 'adb_list.jail' creation                        |
+| adb_jaildir       | /tmp                               | path for the generated jail list                                                               |
 
-**Change default DNS backend to `named` (bind):**
+## Examples
+**Change the DNS backend to 'unbound':**  
+No further configuration is needed, adblock deposits the final blocklist 'adb_list.overall' in '/var/lib/unbound' by default.
 
-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:
-```
+**Change the DNS backend to 'named' (bind):**  
+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"; };
-```
-* And at the end of the file add:
-```
+
+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; };
   };
-```
-
-**Change default DNS backend to `kresd`:**
+</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:**
+**Change the DNS backend to 'kresd':**  
+Adblock deposits the final blocklist 'adb_list.overall' in '/etc/kresd', no further configuration needed.  
+<b>Please note:</b> The knot-resolver (kresd) is only available on Turris devices and does not support the SafeSearch functionality yet.
 
-To use the email notification you have to install & configure the package `msmtp`.  
-Modify the file `/etc/msmtprc`:
-```
+**Enable E-Mail notification via 'msmtp':**  
+To use the email notification you have to install & configure the package 'msmtp'.  
+Modify the file '/etc/msmtprc':
+<pre><code>
 [...]
 defaults
 auth            on
@@ -212,157 +215,70 @@ port            587
 from            dev.adblock@gmail.com
 user            dev.adblock
 password        xxx
-```
-Finally enable email support and add a valid email address in LuCI.
-  
-**Receive adblock runtime information:**
+</code></pre>
+Finally enable E-Mail support and add a valid E-Mail receiver address in LuCI.
 
-```
-/etc/init.d/adblock status
+**Service status output:**  
+In LuCI you'll see the realtime status in the 'Runtime' section on the overview page.  
+To get the status in the CLI, just call _/etc/init.d/adblock status_ or _/etc/init.d/adblock status\_service_ (in 19.07 and TurrisOS):
+<pre><code>
+/etc/init.d/adblock status_service
 ::: adblock runtime information
   + adblock_status  : enabled
-  + adblock_version : 3.8.0
-  + overall_domains : 48359
-  + fetch_utility   : /bin/uclient-fetch (libustream-ssl)
-  + 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:**
-```
-/etc/init.d/adblock report
-:::
-::: Adblock DNS-Query Report
-:::
-  + Start   ::: 2018-12-19, 16:29:40
-  + End     ::: 2018-12-19, 16:45:08
-  + Total   ::: 42
-  + Blocked ::: 17 (40.48 %)
-:::
-::: Top 10 Clients
-  + 32       ::: 101.167.1.103
-  + 10       ::: abc1:abc1:abc0:0:abc1:abcb:abc5:abc3
-:::
-::: Top 10 Domains
-  + 7        ::: dns.msftncsi.com
-  + 4        ::: forum.openwrt.org
-  + 2        ::: outlook.office365.com
-  + 1        ::: www.google.com
-  + 1        ::: www.deepl.com
-  + 1        ::: safebrowsing.googleapis.com
-  + 1        ::: play.googleapis.com
-  + 1        ::: odc.officeapps.live.com
-  + 1        ::: login.microsoftonline.com
-  + 1        ::: test-my.sharepoint.com
-:::
-::: Top 10 Blocked Domains
-  + 4        ::: nexus.officeapps.live.com
-  + 4        ::: mobile.pipe.aria.microsoft.com
-  + 3        ::: watson.telemetry.microsoft.com
-  + 2        ::: v10.events.data.microsoft.com
-  + 2        ::: settings-win.data.microsoft.com
-  + 2        ::: nexusrules.officeapps.live.com
-[...]
-```
-  
-**Cronjob for regular block list updates (`/etc/crontabs/root`):**
-
-The following command as a cron job updates each individual block list from their source so that they hold the most current domains to block:
-```
-0 06 * * *    /etc/init.d/adblock reload
-```
-  
-**Blacklist entry (`/etc/adblock/adblock.blacklist`):**
+  + adblock_version : 4.0.2
+  + blocked_domains : 52420
+  + active_sources  : adaway adguard andryou bitcoin disconnect winspy yoyo 
+  + dns_backend     : kresd, /etc/kresd
+  + run_utils       : /usr/bin/curl, /bin/awk
+  + run_ifaces      : trigger: trm_wwan, report: br-lan
+  + run_directories : base: /tmp, backup: /tmp, report: /tmp, jail: /tmp
+  + run_flags       : backup: 1, reset: 0, flush: 0, force: 1, search: 0, report: 1, mail: 0, jail: 0
+  + last_run        : start, 0m 17s, 496/198/218, 03.04.2020 08:55:14
+  + system          : CZ.NIC Turris Mox Board, TurrisOS 5.1.0 81264ebb51991aa2d17489852854e3b5ec3f514d
+</code></pre>
+The 'last\_run' line includes the used start type, the run duration, the memory footprint after DNS backend loading (total/free/available) and the date/time of the last run.  
 
-```
-ads.example.com
-
-This entry blocks the following (sub)domains:
-  http://ads.example.com/foo.gif
-  http://server1.ads.example.com/foo.gif
-  https://ads.example.com:8000/
-
-This entry does not block:
-  http://ads.example.com.ua/foo.gif
-  http://example.com/
-```
-  
-**Whitelist entry (`/etc/adblock/adblock.whitelist`):**
-
-```
-here.com
-
-This entry removes the following (sub)domains from the blocklist:
-  maps.here.com
-  here.com
-
-This entry does not remove:
-  where.com
-  www.adwhere.com
-```
-  
-**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.
-```
-/etc/init.d/adblock query google.com
-:::
-::: results for domain 'google.com' in active blocklist
+**Edit, add new adblock sources:**  
+The adblock blocklist sources are stored in an external, compressed JSON file '/etc/adblock/adblock.sources.gz'. 
+This file is directly parsed in LuCI and accessible via CLI, just call _/etc/init.d/adblock list_:
+<pre><code>
+/etc/init.d/adblock list
+::: Available adblock sources
 :::
-  + 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
-  + video-stats.video.google.com
-  + [...]
-
-:::
-::: 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
-  + adb_list.adguard.gz           ssl-google-analytics.l.google.com
-  + adb_list.adguard.gz           [...]
-  + adb_list.disconnect.gz        pagead.l.google.com
-  + 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              [...]
-```
-
-**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'
-```
+    Name                 Enabled   Size   Focus               Info URL
+    ------------------------------------------------------------------
+  + adaway               x         S      mobile              https://adaway.org
+  + adguard              x         L      general             https://adguard.com
+  + andryou              x         L      compilation         https://gitlab.com/andryou/block/-/blob/master/readme.md
+  + bitcoin              x         S      mining              https://github.com/hoshsadiq/adblock-nocoin-list
+  + disconnect           x         S      general             https://disconnect.me
+  + dshield                        XL     general             https://www.dshield.org
+[...]
+  + winhelp                        S      general             http://winhelp2002.mvps.org
+  + winspy               x         S      win_telemetry       https://github.com/crazy-max/WindowsSpyBlocker
+  + yoyo                 x         S      general             https://pgl.yoyo.org
+</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.  
+To add new or edit existing sources extract the compressed JSON file _gunzip /etc/adblock/adblock.sources.gz_.  
+A valid JSON source object contains the following required information, e.g.:
+<pre><code>
+       [...]
+       "adaway": {
+               "url": "https://raw.githubusercontent.com/AdAway/adaway.github.io/master/hosts.txt",
+               "rule": "/^127\\.0\\.0\\.1[[:space:]]+([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}",
+               "size": "S",
+               "focus": "mobile",
+               "descurl": "https://github.com/AdAway/adaway.github.io"
+       },
+       [...]
+</code></pre>
+Add an unique object name, make the required changes to 'url', 'rule', 'size' and 'descurl' and finally compress the changed JSON file _gzip /etc/adblock/adblock.sources.gz_ to use the new source object in adblock.  
+<b>Please note:</b> if you're going to add new sources on your own, please make a copy of the default file and work with that copy further on, cause the default will be overwritten with every adblock update. To reference your copy set the option 'adb\_srcarc' which points by default to '/etc/adblock/adblock.sources.gz'  
+<b>Please note:</b> when adblock starts, it looks for the uncompressed 'adb\_srcfile', only if this file is not found the archive 'adb\_srcarc' is unpacked once and then the uncompressed file is used
 
 ## Support
-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>  
+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>
 
 Have fun!  
-Dirk  
+Dirk
+
index 084c1acbd3115ea163e194ab83bf1e9a47984d76..a7ad738ef9d8438f2ac4ed9216464c3065f25885 100644 (file)
 
 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_enabled '1'
        option adb_debug '0'
        option adb_forcedns '0'
+       option adb_safesearch '0'
+       option adb_dnsfilereset '0'
+       option adb_mail '0'
        option adb_report '0'
+       option adb_backup '1'
        option adb_maxqueue '4'
-
-config source 'adaway'
-       option adb_src 'https://adaway.org/hosts.txt'
-       option adb_src_rset '/^127\.0\.0\.1[[:space:]]+([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$2)}'
-       option adb_src_desc 'focus on mobile ads, infrequent updates, approx. 400 entries'
-       option enabled '1'
-
-config source 'adguard'
-       option adb_src 'https://filters.adtidy.org/windows/filters/15.txt'
-       option adb_src_rset 'BEGIN{FS=\"[/|^|\r]\"}/^\|\|([[:alnum:]_-]+\.)+[[:alpha:]]+[\/\^\r]+$/{print tolower(\$3)}'
-       option adb_src_desc 'combined adguard dns filter list, frequent updates, approx. 17.000 entries'
-       option enabled '0'
-
-config source 'bitcoin'
-       option adb_src 'https://raw.githubusercontent.com/hoshsadiq/adblock-nocoin-list/master/hosts.txt'
-       option adb_src_rset '/^0\.0\.0\.0[[:space:]]+([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$2)}'
-       option adb_src_desc 'focus on malicious bitcoin mining sites, infrequent updates, approx. 80 entries'
-       option enabled '0'
-
-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)}'
-       option adb_src_desc 'mozilla driven blocklist, numerous updates on the same day, approx. 4.700 entries'
-       option enabled '1'
-
-config source 'dshield'
-       option adb_src 'https://www.dshield.org/feeds/suspiciousdomains_Low.txt'
-       option adb_src_rset '/^([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}'
-       option adb_src_desc 'generic blocklist, daily updates, approx. 3.500 entries'
-       option enabled '0'
-
-config source 'hphosts'
-       option adb_src 'https://hosts-file.net/ad_servers.txt'
-       option adb_src_rset '/^127\.0\.0\.1[[:space:]]+([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|\$)+/{print tolower(\$2)}'
-       option adb_src_desc 'broad blocklist, monthly updates, approx. 19.200 entries'
-       option enabled '0'
-
-config source 'malware'
-       option adb_src 'https://mirror.espoch.edu.ec/malwaredomains/justdomains'
-       option adb_src_rset '/^([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}'
-       option adb_src_desc 'broad blocklist, daily updates, approx. 18.300 entries'
-       option enabled '0'
-
-config source 'malwarelist'
-       option adb_src 'http://www.malwaredomainlist.com/hostslist/hosts.txt'
-       option adb_src_rset '/^127\.0\.0\.1[[:space:]]+([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$2)}'
-       option adb_src_desc 'focus on malware, daily updates, approx. 1.200 entries'
-       option enabled '0'
-
-config source 'notracking'
-       option adb_src 'https://raw.githubusercontent.com/notracking/hosts-blocklists/master/dnscrypt-proxy/dnscrypt-proxy.blacklist.txt'
-       option adb_src_rset '/^([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}'
-       option adb_src_desc 'notrack domains, daily updates, approx. 60.000 entries'
-       option enabled '0'
-
-config source 'openphish'
-       option adb_src 'https://openphish.com/feed.txt'
-       option adb_src_rset 'BEGIN{FS=\"/\"}/^http[s]?:\/\/([[:alnum:]_-]+\.)+[[:alpha:]]+(\/|$)/{print tolower(\$3)}'
-       option adb_src_desc 'focus on phishing, numerous updates on the same day, approx. 2.400 entries'
-       option enabled '0'
-
-config source 'reg_cn'
-       option adb_src 'https://easylist-downloads.adblockplus.org/easylistchina+easylist.txt'
-       option adb_src_rset 'BEGIN{FS=\"[|^]\"}/^\|\|([[:alnum:]_-]+\.)+[[:alpha:]]+\^("\\\$third-party")?$/{print tolower(\$3)}'
-       option adb_src_desc 'focus on chinese ads plus generic easylist additions, daily updates, approx. 11.700 entries'
-       option enabled '0'
-
-config source 'reg_de'
-       option adb_src 'https://easylist-downloads.adblockplus.org/easylistgermany+easylist.txt'
-       option adb_src_rset 'BEGIN{FS=\"[|^]\"}/^\|\|([[:alnum:]_-]+\.)+[[:alpha:]]+\^("\\\$third-party")?$/{print tolower(\$3)}'
-       option adb_src_desc 'focus on german ads plus generic easylist additions, daily updates, approx. 9.200 entries'
-       option enabled '0'
-
-config source 'reg_id'
-       option adb_src 'https://easylist-downloads.adblockplus.org/abpindo+easylist.txt'
-       option adb_src_rset 'BEGIN{FS=\"[|^]\"}/^\|\|([[:alnum:]_-]+\.)+[[:alpha:]]+\^("\\\$third-party")?$/{print tolower(\$3)}'
-       option adb_src_desc 'focus on indonesian ads plus generic easylist additions, weekly updates, approx. 9.600 entries'
-       option enabled '0'
-
-config source 'reg_nl'
-       option adb_src 'https://easylist-downloads.adblockplus.org/easylistdutch+easylist.txt'
-       option adb_src_rset 'BEGIN{FS=\"[|^]\"}/^\|\|([[:alnum:]_-]+\.)+[[:alpha:]]+\^("\\\$third-party")?$/{print tolower(\$3)}'
-       option adb_src_desc 'focus on dutch ads plus generic easylist additions, weekly updates, approx. 9.400 entries'
-       option enabled '0'
-
-config source 'reg_pl'
-       option adb_src 'http://adblocklist.org/adblock-pxf-polish.txt'
-       option adb_src_rset 'BEGIN{FS=\"[|^]\"}/^\|\|([[:alnum:]_-]+\.)+[[:alpha:]]+\^("\\\$third-party")?$/{print tolower(\$3)}'
-       option adb_src_desc 'focus on polish ads, daily updates, approx. 90 entries'
-       option enabled '0'
-
-config source 'reg_ro'
-       option adb_src 'https://easylist-downloads.adblockplus.org/rolist+easylist.txt'
-       option adb_src_rset 'BEGIN{FS=\"[|^]\"}/^\|\|([[:alnum:]_-]+\.)+[[:alpha:]]+\^("\\\$third-party")?$/{print tolower(\$3)}'
-       option adb_src_desc 'focus on romanian ads plus generic easylist additions, weekly updates, approx. 9.400 entries'
-       option enabled '0'
-
-config source 'reg_ru'
-       option adb_src 'https://easylist-downloads.adblockplus.org/ruadlist+easylist.txt'
-       option adb_src_rset 'BEGIN{FS=\"[|^]\"}/^\|\|([[:alnum:]_-]+\.)+[[:alpha:]]+\^("\\\$third-party")?$/{print tolower(\$3)}'
-       option adb_src_desc 'focus on russian ads plus generic easylist additions, weekly updates, approx. 14.500 entries'
-       option enabled '0'
-
-config source 'shalla'
-       option adb_src 'http://www.shallalist.de/Downloads/shallalist.tar.gz'
-       option adb_src_rset '/^([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}'
-       option adb_src_desc 'huge blocklist archive subdivided in different categories, daily updates. Check http://www.shallalist.de/categories.html for more categories'
-       list adb_src_cat 'adv'
-       list adb_src_cat 'costtraps'
-       list adb_src_cat 'spyware'
-       list adb_src_cat 'tracker'
-       list adb_src_cat 'warez'
-       option enabled '0'
-
-config source 'spam404'
-       option adb_src 'https://raw.githubusercontent.com/Dawsey21/Lists/master/main-blacklist.txt'
-       option adb_src_rset '/^([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)+/{print tolower(\$1)}'
-       option adb_src_desc 'generic blocklist, infrequent updates, approx. 6.000 entries'
-       option enabled '0'
-
-config source 'sysctl'
-       option adb_src 'http://sysctl.org/cameleon/hosts'
-       option adb_src_rset '/^127\.0\.0\.1[[:space:]]+([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$2)}'
-       option adb_src_desc 'broad blocklist, weekly updates, approx. 16.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)}'
-       option adb_src_desc 'huge blocklist archive subdivided in different categories, daily updates. Check https://dsi.ut-capitole.fr/blacklists/index_en.php for more categories'
-       list adb_src_cat 'publicite'
-       list adb_src_cat 'cryptojacking'
-       list adb_src_cat 'ddos'
-       list adb_src_cat 'malware'
-       list adb_src_cat 'phishing'
-       list adb_src_cat 'warez'
-       option enabled '0'
-
-config source 'whocares'
-       option adb_src 'https://someonewhocares.org/hosts/hosts'
-       option adb_src_rset '/^127\.0\.0\.1[[:space:]]+([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$2)}'
-       option adb_src_desc 'broad blocklist, weekly updates, approx. 10.000 entries'
-       option enabled '0'
-
-config source 'winspy'
-       option adb_src 'https://raw.githubusercontent.com/crazy-max/WindowsSpyBlocker/master/data/hosts/spy.txt'
-       option adb_src_rset '/^0\.0\.0\.0[[:space:]]+([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$2)}'
-       option adb_src_desc 'focus on windows spy & telemetry domains, infrequent updates, approx. 300 entries'
-       option enabled '0'
-
-config source 'winhelp'
-       option adb_src 'http://winhelp2002.mvps.org/hosts.txt'
-       option adb_src_rset '/^0\.0\.0\.0[[:space:]]+([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$2)}'
-       option adb_src_desc 'broad blocklist, infrequent updates, approx. 13.000 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'
+       list adb_sources 'adaway'
+       list adb_sources 'adguard'
+       list adb_sources 'disconnect'
+       list adb_sources 'yoyo'
index 9928698705c7679131041ea087d88bd7c6f86350..c3fd46c83b0314c422b94a926414732e08e09d58 100755 (executable)
@@ -1,14 +1,17 @@
 #!/bin/sh /etc/rc.common
-#
+# Copyright (c) 2015-2020 Dirk Brenken (dev@brenken.org)
+# This is free software, licensed under the GNU General Public License v3.
 
 START=30
 USE_PROCD=1
 
-EXTRA_COMMANDS="suspend resume query report"
+EXTRA_COMMANDS="suspend resume query report list timer status_service"
 EXTRA_HELP="   suspend Suspend adblock processing
        resume  Resume adblock processing
-       query   <DOMAIN> Query active blocklists for specific domains
-       report  <SEARCH> Print dns query statistics with an optional search parameter"
+       query   <domain> Query active blocklists and backups for a specific domain
+       report  [<search>] Print DNS statistics with an optional search parameter
+       list    [[<add>|<remove>] [source(s)]] List available adblock sources or add/remove them from config
+       timer   <action> <hour> [<minute>] [<weekday>] Set a cron based update interval"
 
 adb_init="/etc/init.d/adblock"
 adb_script="/usr/bin/adblock.sh"
@@ -16,7 +19,8 @@ adb_pidfile="/var/run/adblock.pid"
 
 if [ -s "${adb_pidfile}" ] && { [ "${action}" = "start" ] || [ "${action}" = "stop" ] || \
        [ "${action}" = "restart" ] || [ "${action}" = "reload" ] || [ "${action}" = "report" ] || \
-       [ "${action}" = "suspend" ] || [ "${action}" = "resume" ] || [ "${action}" = "query" ]; }
+       [ "${action}" = "suspend" ] || [ "${action}" = "resume" ] || [ "${action}" = "query" ] || \
+       { [ "${action}" = "list" ] && [ -n "${1}" ]; }; }
 then
        exit 0
 fi
@@ -33,7 +37,7 @@ start_service()
        then
                if [ "${action}" = "boot" ]
                then
-                       if [ "$(uci_get adblock global adb_trigger)" != "timed" ]
+                       if [ -n "$(uci_get adblock global adb_trigger)" ]
                        then
                                return 0
                        fi
@@ -41,7 +45,7 @@ start_service()
                procd_open_instance "adblock"
                procd_set_param command "${adb_script}" "${@}"
                procd_set_param pidfile "${adb_pidfile}"
-               procd_set_param nice "$(uci_get adblock extra adb_nice "0")"
+               procd_set_param nice "$(uci_get adblock global adb_nice "0")"
                procd_set_param stdout 1
                procd_set_param stderr 1
                procd_close_instance
@@ -80,14 +84,104 @@ query()
 
 report()
 {
-       rc_procd "${adb_script}" report "${1:-"+"}" "${2:-"50"}" "${3:-"false"}" "${4:-"true"}"
+       rc_procd "${adb_script}" report "${1:-"+"}" "${2:-"50"}" "${3:-"true"}" "${4:-"cli"}"
+}
+
+list()
+{
+       local src_archive src_file src_enabled enabled name action="${1}"
+
+       if [ "${action}" = "add" ] || [ "${action}" = "remove" ]
+       then
+               shift
+               for name in "${@}"
+               do
+                       if [ "${action}" = "add" ]
+                       then
+                               if [ -z "$(uci_get adblock global adb_sources | grep -Fo "${name}")" ]
+                               then
+                                       uci_add_list adblock global adb_sources "${name}"
+                                       printf "%s\\n" "::: adblock source '${name}' added to config"
+                               fi
+                       else
+                               if [ -n "$(uci_get adblock global adb_sources | grep -Fo "${name}")" ]
+                               then
+                                       uci_remove_list adblock global adb_sources "${name}"
+                                       printf "%s\\n" "::: adblock source '${name}' removed from config"
+                               fi
+                       fi
+               done
+               if [ -n "$(uci -q changes adblock)" ]
+               then
+                       uci_commit adblock
+               fi
+       else
+               src_archive="$(uci_get adblock global adb_srcarc "/etc/adblock/adblock.sources.gz")"
+               src_file="$(uci_get adblock global adb_srcfile "/tmp/adb_sources.json")"
+               src_enabled="$(uci -q show adblock.global.adb_sources)"
+               if [ ! -r "${src_file}" ]
+               then
+                       if [ -r "${src_archive}" ]
+                       then
+                               zcat "${src_archive}" > "${src_file}"
+                       else
+                               printf "%s\\n" "::: adblock source archive '${src_archive}' not found"
+                       fi
+               fi
+               if [ -r "${src_file}" ]
+               then
+                       src_enabled="${src_enabled#*=}"
+                       src_enabled="${src_enabled//\'}"
+                       printf "%s\\n" "::: Available adblock sources"
+                       printf "%s\\n" ":::"
+                       printf "%-25s%-10s%-7s%-20s%s\\n" "    Name" "Enabled" "Size" "Focus" "Info URL"
+                       printf "%s\\n" "    ------------------------------------------------------------------"
+                       json_load_file "${src_file}"
+                       json_get_keys keylist
+                       for key in ${keylist}
+                       do
+                               json_select "${key}"
+                               json_get_var size "size"
+                               json_get_var focus "focus"
+                               json_get_var descurl "descurl"
+                               json_get_var url "url"
+                               json_get_var rule "rule"
+                               if [ -n "${url}" ] && [ -n "${rule}" ]
+                               then
+                                       if [ -n "$(printf "%s" "${src_enabled}" | grep -Fo "${key}")" ]
+                                       then
+                                               enabled="x"
+                                       else
+                                               enabled=" "
+                                       fi
+                                       src_enabled="${src_enabled/${key}}"
+                                       printf "  + %-21s%-10s%-7s%-20s%s\\n" "${key}" "${enabled}" "${size}" "${focus}" "${descurl}"
+                               else
+                                       src_enabled="${src_enabled} ${key}"
+                               fi
+                               json_select ..
+                       done
+                       if [ -n "${src_enabled// }" ]
+                       then
+                               printf "%s\\n" "    ----------------------------------------------"
+                               printf "%s\\n" "    Sources without valid configuration"
+                               printf "%s\\n" "    ----------------------------------------------"
+                               for key in ${src_enabled}
+                               do
+                                       printf "  - %s\\n" "${key}"
+                               done
+                       fi
+               else
+                       printf "%s\\n" "::: adblock source file '${src_file}' not found"
+               fi
+       fi
 }
 
 status_service()
 {
-       local key keylist value
-       local rtfile="$(uci_get adblock extra adb_rtfile "/tmp/adb_runtime.json")"
+       local key keylist value rtfile
 
+       rtfile="$(uci_get adblock global adb_rtfile "/tmp/adb_runtime.json")"
        if [ -s "${rtfile}" ]
        then
                printf "%s\\n" "::: adblock runtime information"
@@ -97,38 +191,62 @@ status_service()
                for key in ${keylist}
                do
                        json_get_var value "${key}"
-                       printf "  + %-15s : %s\\n" "${key}" "${value}"
+                       if [ "${key}" = "active_sources" ]
+                       then
+                               printf "  + %-15s : " "${key}"
+                               json_select "${key}"
+                               index=1
+                               while json_get_type status "${index}" && [ "${status}" = "object" ]
+                               do
+                                       json_get_values source "${index}"
+                                       printf "%s " "${source}"
+                                       index=$((index+1))
+                               done
+                               printf "\\n"
+                               json_select ".."
+                       else
+                               printf "  + %-15s : %s\\n" "${key}" "${value}"
+                       fi
                done
        else
                printf "%s\\n" "::: no adblock runtime information available"
        fi
 }
 
-service_triggers()
+timer()
 {
-       local trigger trigger_list="$(uci_get adblock global adb_trigger)"
-       local delay="$(uci_get adblock extra adb_triggerdelay "2")"
-       local type="$(uci_get adblock extra adb_starttype "start")"
+       local action="${1}" hour="${2}" minute="${3:-0}" weekday="${4:-"*"}"
 
-       PROCD_RELOAD_DELAY=$((delay*1000))
-       
-       if [ -z "${trigger_list}" ] && [ -r "/lib/functions/network.sh" ]
+       hour="${hour//[[:alpha:]]/}"
+       minute="${minute//[[:alpha:]]/}"
+       if [ -n "${action}" ] && [ -n "${hour}" ] && [ -n "${minute}" ] && [ -n "${weekday}" ] && \
+               [ "${hour}" -ge 0 ] && [ "${hour}" -le 23 ] && \
+               [ "${minute}" -ge 0 ] && [ "${minute}" -le 59 ]
        then
-               . "/lib/functions/network.sh"
-               network_find_wan trigger_list
+               if [ -r "/etc/crontabs/root" ]
+               then
+                       search="${adb_init//\//\\/}"
+                       search="${search//./\\.}"
+                       sed -i "/${search}/d" "/etc/crontabs/root"
+               fi
+               printf "%02d %02d %s\\n" "${minute}" "${hour}" "* * ${weekday} ${adb_init} ${action}" >> "/etc/crontabs/root"
+               /etc/init.d/cron restart
+       else
+               printf "%s\\n" "::: the refresh timer could not been updated"
        fi
+}
 
-       if [ -n "${trigger_list}" ]
+service_triggers()
+{
+       local trigger delay type
+
+       PROCD_RELOAD_DELAY=$((delay*1000))
+       trigger="$(uci_get adblock global adb_trigger)"
+       delay="$(uci_get adblock global adb_triggerdelay "2")"
+       type="$(uci_get adblock global adb_starttype "start")"
+       if [ -n "${trigger}" ]
        then
-               for trigger in ${trigger_list}
-               do
-                       if [ "${trigger}" != "none" ] && [ "${trigger}" != "timed" ]
-                       then
-                               procd_add_interface_trigger "interface.*.up" "${trigger}" "${adb_init}" "${type}"
-                       fi
-               done
-       else
-               procd_add_raw_trigger "interface.*.up" ${PROCD_RELOAD_DELAY} "${adb_init}" "${type}"
+               procd_add_interface_trigger "interface.*.up" "${trigger}" "${adb_init}" "${type}"
        fi
        procd_add_reload_trigger "adblock"
 }
index 4db5966bcf8f16644ba5ecdc59995c4a47a61575..ca9d206d14712cd7b1cc70b4578e43fbf558b4e5 100755 (executable)
@@ -1,11 +1,9 @@
 #!/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
-
+# Copyright (c) 2015-2020 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/>.
+
+# Please note: you have to manually install and configure the package 'msmtp' before using this script
 
 LC_ALL=C
 PATH="/usr/sbin:/usr/bin:/sbin:/bin"
@@ -13,11 +11,11 @@ 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")"
+       adb_debug="$(uci_get adblock global adb_debug "0")"
+       adb_mailsender="$(uci_get adblock global adb_mailsender "no-reply@adblock")"
+       adb_mailreceiver="$(uci_get adblock global adb_mailreceiver)"
+       adb_mailtopic="$(uci_get adblock global adb_mailtopic "adblock notification")"
+       adb_mailprofile="$(uci_get adblock global adb_mailprofile "adb_notify")"
 fi
 adb_ver="${1}"
 adb_mail="$(command -v msmtp)"
@@ -37,9 +35,9 @@ f_log()
        fi
 }
 
-if [ -z "${adb_mreceiver}" ]
+if [ -z "${adb_mailreceiver}" ]
 then
-       f_log "err" "please set the mail receiver with the 'adb_mreceiver' option"
+       f_log "err" "please set the mail receiver with the 'adb_mailreceiver' option"
        exit ${adb_rc}
 fi
 
@@ -48,7 +46,7 @@ then
        debug="--debug"
 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"
+adb_mailhead="From: ${adb_mailsender}\\nTo: ${adb_mailreceiver}\\nSubject: ${adb_mailtopic}\\nReply-to: ${adb_mailsender}\\nMime-Version: 1.0\\nContent-Type: text/html\\nContent-Disposition: inline\\n\\n"
 
 # info preparation
 #
@@ -64,19 +62,19 @@ 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>"
+adb_mailtext="<html><body><pre style='display:block;font-family:monospace;font-size:1rem;padding:20;background-color:#f3eee5;white-space:pre'>"
+adb_mailtext="${adb_mailtext}\\n<strong>++\\n++ System Information ++\\n++</strong>\\n${sys_info}"
+adb_mailtext="${adb_mailtext}\\n\\n<strong>++\\n++ Adblock Information ++\\n++</strong>\\n${adb_info}"
+adb_mailtext="${adb_mailtext}\\n\\n<strong>++\\n++ Logfile Information ++\\n++</strong>\\n${log_info}"
+adb_mailtext="${adb_mailtext}</pre></body></html>"
 
 # send mail
 #
-if [ -x "${adb_mail}" ] && [ -n "${adb_mreceiver}" ]
+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
+       printf "%b" "${adb_mailhead}${adb_mailtext}" 2>/dev/null | "${adb_mail}" ${debug} -a "${adb_mailprofile}" "${adb_mailreceiver}" >/dev/null 2>&1
        adb_rc=${?}
-       f_log "info" "mail sent to '${adb_mreceiver}' with rc '${adb_rc}'"
+       f_log "info" "mail sent to '${adb_mailreceiver}' with rc '${adb_rc}'"
 else
        f_log "err" "msmtp mail daemon not found"
 fi
diff --git a/net/adblock/files/adblock.monitor b/net/adblock/files/adblock.monitor
new file mode 100755 (executable)
index 0000000..7fe90c8
--- /dev/null
@@ -0,0 +1,37 @@
+#!/bin/sh
+# ubus monitor to trace dns backend events and conditionally restart adblock
+# Copyright (c) 2015-2020 Dirk Brenken (dev@brenken.org)
+# This is free software, licensed under the GNU General Public License v3.
+
+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)"
+adb_logger="$(command -v logger)"
+
+f_log()
+{
+       local class="${1}" log_msg="${2}"
+
+       if [ -x "${adb_logger}" ]
+       then
+               "${adb_logger}" -p "${class}" -t "adblock-${adb_ver}[${$}]" "${log_msg}"
+       else
+               printf "%s %s %s\\n" "${class}" "adblock-${adb_ver}[${$}]" "${log_msg}"
+       fi
+}
+
+if [ -x "${adb_ubus}" ] && [ -n "${adb_dns}" ]
+then
+       f_log "info" "ubus/adblock monitor 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
+       f_log "err" "can't start ubus/adblock monitor"
+fi
diff --git a/net/adblock/files/adblock.service b/net/adblock/files/adblock.service
deleted file mode 100755 (executable)
index 02397c2..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/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)"
-adb_logger="$(command -v logger)"
-
-f_log()
-{
-       local class="${1}" log_msg="${2}"
-
-       if [ -x "${adb_logger}" ]
-       then
-               "${adb_logger}" -p "${class}" -t "adblock-${adb_ver}[${$}]" "${log_msg}"
-       else
-               printf "%s %s %s\\n" "${class}" "adblock-${adb_ver}[${$}]" "${log_msg}"
-       fi
-}
-
-if [ -x "${adb_ubus}" ] && [ -n "${adb_dns}" ]
-then
-       f_log "info" "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
-       f_log "err" "can't start ubus/adblock service"
-fi
index bd53a248c69ec3572ada9fb424dc8ddee1cff5e1..ef19f85452a78d5c941af39f97df1c0d140576e2 100755 (executable)
 #!/bin/sh
 # dns based ad/abuse domain blocking
-# written by Dirk Brenken (dev@brenken.org)
-
+# Copyright (c) 2015-2020 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/>.
 
-# (s)hellcheck exceptions
-# shellcheck disable=1091 disable=2039 disable=2143 disable=2181 disable=2188
+# set (s)hellcheck exceptions
+# shellcheck disable=1091 disable=2016 disable=2039 disable=2086 disable=2143 disable=2181 disable=2188
 
 # set initial defaults
 #
-LC_ALL=C
-PATH="/usr/sbin:/usr/bin:/sbin:/bin"
-adb_ver="3.8.15"
-adb_basever=""
+export LC_ALL=C
+export PATH="/usr/sbin:/usr/bin:/sbin:/bin"
+set -o pipefail
+adb_ver="4.0.2"
 adb_enabled=0
 adb_debug=0
 adb_forcedns=0
 adb_maxqueue=4
-adb_mail=0
-adb_mcnt=0
-adb_trigger="wan"
+adb_dnsfilereset=0
+adb_dnsflush=0
+adb_dnstimeout=20
+adb_safesearch=0
+adb_safesearchmod=0
+adb_report=0
+adb_trigger=""
 adb_triggerdelay=0
-adb_backupdir="/tmp"
-adb_fetchutil="uclient-fetch"
-adb_dns="dnsmasq"
-adb_dnsvariant="nxdomain"
+adb_backup=1
+adb_mail=0
+adb_mailcnt=0
+adb_jail=0
+adb_dns=""
 adb_dnsprefix="adb_list"
-adb_dnsfile="${adb_dnsprefix}.overall"
-adb_dnsfilereset="false"
-adb_maxtld=100000
-adb_dnsflush=0
+adb_tmpbase="/tmp"
+adb_backupdir="/tmp"
+adb_reportdir="/tmp"
+adb_jaildir="/tmp"
+adb_pidfile="/var/run/adblock.pid"
 adb_blacklist="/etc/adblock/adblock.blacklist"
 adb_whitelist="/etc/adblock/adblock.whitelist"
-adb_rtfile="/tmp/adb_runtime.json"
-adb_sorttmpdir="/tmp"
+adb_ubusservice="/etc/adblock/adblock.monitor"
+adb_mailservice="/etc/adblock/adblock.mail"
+adb_dnsfile="${adb_dnsprefix}.overall"
+adb_dnsjail="${adb_dnsprefix}.jail"
+adb_srcarc="/etc/adblock/adblock.sources.gz"
+adb_srcfile="${adb_tmpbase}/adb_sources.json"
+adb_rtfile="${adb_tmpbase}/adb_runtime.json"
+adb_loggercmd="$(command -v logger)"
+adb_dumpcmd="$(command -v tcpdump)"
+adb_lookupcmd="$(command -v nslookup)"
+adb_fetchutil=""
 adb_portlist="53 853 5353"
-adb_report=0
-adb_repiface="br-lan"
+adb_repiface=""
 adb_replisten="53"
-adb_repdir="/tmp"
-adb_reputil="$(command -v tcpdump)"
 adb_repchunkcnt="5"
 adb_repchunksize="1"
-adb_logger="$(command -v logger)"
+adb_lookupdomain="example.com"
 adb_action="${1:-"start"}"
-adb_pidfile="/var/run/adblock.pid"
-adb_ubusservice="/etc/adblock/adblock.service"
-adb_mailservice="/etc/adblock/adblock.mail"
+adb_packages=""
 adb_sources=""
 adb_cnt=""
 
-# load adblock environment
+# load & check adblock environment
 #
 f_load()
 {
-       local dns_up cnt=0
-
-       # get system information
-       #
        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)}')"
+               "${adb_awk}" 'BEGIN{ORS=", "}{print $0}' | "${adb_awk}" '{print substr($0,1,length($0)-2)}')"
+       f_conf
+       if [ "${adb_action}" != "report" ]
+       then
+               f_dns
+               f_fetch
+       fi
 
-       # parse 'global' and 'extra' section by callback
-       #
-       config_cb()
-       {
-               local type="${1}"
-               if [ "${type}" = "adblock" ]
+       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 the config option 'adb_enabled' to '1' to use this service"
+               exit 0
+       fi
+}
+
+# check & set environment
+#
+f_env()
+{
+       adb_starttime="$(date "+%s")"
+       f_log "info" "adblock instance started ::: action: ${adb_action}, priority: ${adb_nice:-"0"}, pid: ${$}"
+       f_jsnup "running"
+       f_extconf
+       f_temp
+
+       if [ "${adb_dnsflush}" -eq 1 ]
+       then
+               printf "${adb_dnsheader}" > "${adb_dnsdir}/${adb_dnsfile}"
+               f_dnsup
+       fi
+
+       if [ ! -r "${adb_srcfile}" ]
+       then
+               if [ -r "${adb_srcarc}" ]
                then
-                       option_cb()
-                       {
-                               local option="${1}"
-                               local value="${2}"
-                               eval "${option}=\"${value}\""
-                       }
+                       zcat "${adb_srcarc}" > "${adb_srcfile}"
                else
-                       reset_cb
+                       f_log "err" "adblock source archive not found"
                fi
-       }
+       fi
+       if [ -r "${adb_srcfile}" ]
+       then
+               json_load_file "${adb_srcfile}"
+       else
+               f_log "err" "adblock source file not found"
+       fi
+}
 
-       # parse 'source' typed sections
-       #
-       parse_config()
-       {
-               local value opt section="${1}" options="enabled adb_src adb_src_rset adb_src_cat"
-               eval "adb_sources=\"${adb_sources} ${section}\""
-               for opt in ${options}
-               do
-                       config_get value "${section}" "${opt}"
-                       if [ -n "${value}" ]
+# load adblock config
+#
+f_conf()
+{
+       local cnt=0 cnt_max=10
+
+       if [ ! -r "/etc/config/adblock" ] || [ -n "$(uci -q show adblock.@source[0])" ]
+       then
+               if [ -r "/etc/config/adblock-opkg" ] && [ -z "$(uci -q show adblock-opkg.@source[0])" ]
+               then
+                       if [ -r "/etc/config/adblock" ]
                        then
-                               eval "${opt}_${section}=\"${value}\""
+                               cp -pf "/etc/config/adblock" "/etc/config/adblock-backup"
                        fi
-               done
-       }
+                       cp -pf "/etc/config/adblock-opkg" "/etc/config/adblock"
+                       f_log "info" "missing or old adblock config replaced with new valid default config"
+               else
+                       f_log "err" "unrecoverable adblock config error, please re-install the package via opkg with the '--force-reinstall --force-maintainer' options"
+               fi
+       fi
 
-       # load adblock config
-       #
+       config_cb()
+       {
+               option_cb()
+               {
+                       local option="${1}"
+                       local value="${2}"
+                       eval "${option}=\"${value}\""
+               }
+               list_cb()
+               {
+                       local option="${1}"
+                       local value="${2}"
+                       eval "${option}=\"$(printf "%s" "${adb_sources}") ${value}\""
+               }
+       }
        config_load adblock
-       config_foreach parse_config source
 
-       # version check
-       #
-       if [ -z "${adb_basever}" ] || [ "${adb_ver%.*}" != "${adb_basever}" ]
+       if [ -z "${adb_fetchutil}" ] || [ -z "${adb_dns}" ]
        then
-               f_log "info" "your adblock config seems to be too old, please update your config with the '--force-maintainer' opkg option"
-               f_rmtemp
-               exit 0
+               while [ -z "${adb_packages}" ] && [ "${cnt}" -le "${cnt_max}" ]
+               do
+                       adb_packages="$(opkg list-installed 2>/dev/null)"
+                       cnt=$((cnt+1))
+                       sleep 1
+               done
+               if [ -z "${adb_packages}" ]
+               then
+                       f_log "err" "local opkg package repository is not available, please set 'adb_fetchutil' and 'adb_dns' manually"
+               fi
        fi
+}
 
-       # set dns backend
-       #
-       case "${adb_dns}" in
-               "dnsmasq")
-                       adb_dnsinotify="${adb_dnsinotify:-"false"}"
-                       adb_dnsinstance="${adb_dnsinstance:-"0"}"
-                       adb_dnsuser="${adb_dnsuser:-"dnsmasq"}"
-                       adb_dnsdir="${adb_dnsdir:-"/tmp"}"
-                       adb_dnsheader=""
-                       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)" ]
+# load dns backend config
+#
+f_dns()
+{
+       local util utils dns_up cnt=0
+
+       if [ -z "${adb_dns}" ]
+       then
+               utils="knot-resolver named unbound dnsmasq raw"
+               for util in ${utils}
+               do
+                       if [ "${util}" = "raw" ] || [ -n "$(printf "%s" "${adb_packages}" | grep "^${util}")" ]
                        then
-                               adb_dnsdeny="awk '{print \"0.0.0.0\\t\"\$0\"\\n::\\t\"\$0\"\"}'"
-                               adb_dnsallow=""
+                               if [ "${util}" = "knot-resolver" ]
+                               then
+                                       util="kresd"
+                               fi
+                               if [ "${util}" = "raw" ] || [ -x "$(command -v "${util}")" ]
+                               then
+                                       adb_dns="${util}"
+                                       uci_set adblock global adb_dns "${util}"
+                                       f_uci "adblock"
+                                       break
+                               fi
                        fi
-               ;;
-               "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\"}'"
-               ;;
-               "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.\"}'"
-               ;;
-               "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.\"}'"
-               ;;
-       esac
+               done
+       elif [ "${adb_dns}" != "raw" ] && [ ! -x "$(command -v "${adb_dns}")" ]
+       then
+               unset adb_dns
+       fi
 
-       # status check
-       #
-       if [ "${adb_enabled}" -eq 0 ]
+       if [ -n "${adb_dns}" ]
        then
-               f_extconf
-               f_temp
-               f_rmdns
-               f_bgserv "stop"
-               f_jsnup "disabled"
-               f_log "info" "adblock is currently disabled, please set the config option 'adb_enabled' to '1' to use this service"
-               exit 0
+               case "${adb_dns}" in
+                       "dnsmasq")
+                               adb_dnsinotify="${adb_dnsinotify:-"0"}"
+                               adb_dnsinstance="${adb_dnsinstance:-"0"}"
+                               adb_dnsuser="${adb_dnsuser:-"dnsmasq"}"
+                               adb_dnsdir="${adb_dnsdir:-"/tmp/dnsmasq.d"}"
+                               adb_dnsheader="${adb_dnsheader}"
+                               adb_dnsdeny="${adb_dnsdeny:-"${adb_awk} '{print \"address=/\"\$0\"/\"}'"}"
+                               adb_dnsallow="${adb_dnsallow:-"${adb_awk} '{print \"local=/\"\$0\"/#\"}'"}"
+                               adb_dnssafesearch="${adb_dnssafesearch:-"${adb_awk} -v item=\"\$item\" '{print \"address=/\"\$0\"/\"item\"\"}'"}"
+                               adb_dnsstop="${adb_dnsstop:-"address=/#/"}"
+                       ;;
+                       "unbound")
+                               adb_dnsinotify="${adb_dnsinotify:-"0"}"
+                               adb_dnsinstance="${adb_dnsinstance:-"0"}"
+                               adb_dnsuser="${adb_dnsuser:-"unbound"}"
+                               adb_dnsdir="${adb_dnsdir:-"/var/lib/unbound"}"
+                               adb_dnsheader="${adb_dnsheader}"
+                               adb_dnsdeny="${adb_dnsdeny:-"${adb_awk} '{print \"local-zone: \\042\"\$0\"\\042 static\"}'"}"
+                               adb_dnsallow="${adb_dnsallow:-"${adb_awk} '{print \"local-zone: \\042\"\$0\"\\042 transparent\"}'"}"
+                               adb_dnssafesearch="${adb_dnssafesearch:-"${adb_awk} -v item=\"\$item\" '{type=\"AAAA\";if(match(item,/^([0-9]{1,3}\.){3}[0-9]{1,3}$/)){type=\"A\"}}{print \"local-data: \\042\"\$0\" \"type\" \"item\"\\042\"}'"}"
+                               adb_dnsstop="${adb_dnsstop:-"local-zone: \".\" static"}"
+                       ;;
+                       "named")
+                               adb_dnsinotify="${adb_dnsinotify:-"0"}"
+                               adb_dnsinstance="${adb_dnsinstance:-"0"}"
+                               adb_dnsuser="${adb_dnsuser:-"bind"}"
+                               adb_dnsdir="${adb_dnsdir:-"/var/lib/bind"}"
+                               adb_dnsheader="${adb_dnsheader:-"\$TTL 2h\n@ IN SOA localhost. root.localhost. (1 6h 1h 1w 2h)\n  IN NS  localhost.\n"}"
+                               adb_dnsdeny="${adb_dnsdeny:-"${adb_awk} '{print \"\"\$0\" CNAME .\\n*.\"\$0\" CNAME .\"}'"}"
+                               adb_dnsallow="${adb_dnsallow:-"${adb_awk} '{print \"\"\$0\" CNAME rpz-passthru.\\n*.\"\$0\" CNAME rpz-passthru.\"}'"}"
+                               adb_dnssafesearch="${adb_dnssafesearch:-"${adb_awk} -v item=\"\$item\" '{print \"\"\$0\" CNAME \"item\".\\n*.\"\$0\" CNAME \"item\".\"}'"}"
+                               adb_dnsstop="${adb_dnsstop:-"* CNAME ."}"
+                       ;;
+                       "kresd")
+                               adb_dnsinotify="${adb_dnsinotify:-"0"}"
+                               adb_dnsinstance="${adb_dnsinstance:-"0"}"
+                               adb_dnsuser="${adb_dnsuser:-"root"}"
+                               adb_dnsdir="${adb_dnsdir:-"/etc/kresd"}"
+                               adb_dnsheader="${adb_dnsheader:-"\$TTL 2h\n@ IN SOA localhost. root.localhost. (1 6h 1h 1w 2h)\n  IN NS  localhost.\n"}"
+                               adb_dnsdeny="${adb_dnsdeny:-"${adb_awk} '{print \"\"\$0\" CNAME .\\n*.\"\$0\" CNAME .\"}'"}"
+                               adb_dnsallow="${adb_dnsallow:-"${adb_awk} '{print \"\"\$0\" CNAME rpz-passthru.\\n*.\"\$0\" CNAME rpz-passthru.\"}'"}"
+                               adb_dnssafesearch="${adb_dnssafesearch:-"0"}"
+                               adb_dnsstop="${adb_dnsstop:-"* CNAME ."}"
+                       ;;
+                       "raw")
+                               adb_dnsinotify="${adb_dnsinotify:-"0"}"
+                               adb_dnsinstance="${adb_dnsinstance:-"0"}"
+                               adb_dnsuser="${adb_dnsuser:-"root"}"
+                               adb_dnsdir="${adb_dnsdir:-"/tmp"}"
+                               adb_dnsheader="${adb_dnsheader}"
+                               adb_dnsdeny="${adb_dnsdeny:-"0"}"
+                               adb_dnsallow="${adb_dnsallow:-"1"}"
+                               adb_dnssafesearch="${adb_dnssafesearch:-"0"}"
+                               adb_dnsstop="${adb_dnsstop:-"0"}"
+                       ;;
+               esac
        fi
 
-       # dns backend check
-       #
-       if [ -d "${adb_dnsdir}" ] && [ ! -f "${adb_dnsdir}/${adb_dnsfile}" ]
+       if [ "${adb_dns}" != "raw" ] && { [ -z "${adb_dns}" ] || [ ! -x "$(command -v "${adb_dns}")" ]; }
        then
-               printf "%s\\n" "${adb_dnsheader}" > "${adb_dnsdir}/${adb_dnsfile}"
+               f_log "err" "dns backend not found, please set 'adb_dns' manually"
        fi
 
-       if [ "${adb_action}" = "start" ] && [ "${adb_trigger}" = "timed" ]
+       if [ "${adb_dns}" != "raw" ] && { [ "${adb_dnsdir}" = "${adb_tmpbase}" ] || [ "${adb_dnsdir}" = "${adb_backupdir}" ] || \
+               [ "${adb_dnsdir}" = "${adb_reportdir}" ] || [ "${adb_dnsdir}" = "${adb_jaildir}" ]; }
        then
-               sleep "${adb_triggerdelay}"
+               f_log "err" "dns directory '${adb_dnsdir}' has been misconfigured, it must not point to the 'adb_tmpbase', 'adb_backupdir', 'adb_reportdir' or 'adb_jaildir'"
        fi
 
-       if [ "${adb_action}" != "stop" ]
+       if [ "${adb_action}" = "start" ] && [ -z "${adb_trigger}" ]
+       then
+               sleep ${adb_triggerdelay}
+       fi
+
+       if [ "${adb_dns}" != "raw" ] && [ "${adb_action}" != "stop" ]
        then
                while [ "${cnt}" -le 30 ]
                do
@@ -198,108 +291,139 @@ f_load()
                        cnt=$((cnt+1))
                done
 
-               if [ "${dns_up}" != "true" ] || [ -z "${adb_dns}" ] || [ ! -x "$(command -v "${adb_dns}")" ]
+               if [ -n "${adb_dnsdir}" ] && [ ! -d "${adb_dnsdir}" ]
                then
-                       f_log "err" "dns backend '${adb_dns}' not running or executable"
-               elif [ ! -d "${adb_dnsdir}" ]
+                       mkdir -p "${adb_dnsdir}"
+                       if [ "${?}" -eq 0 ]
+                       then
+                               f_log "info" "dns backend directory '${adb_dnsdir}' created"
+                       else
+                               f_log "err" "dns backend directory '${adb_dnsdir}' could not be created"
+                       fi
+               fi
+
+               if [ ! -f "${adb_dnsdir}/${adb_dnsfile}" ]
                then
-                       f_log "err" "dns backend directory '${adb_dnsdir}' not found"
+                       printf "${adb_dnsheader}" > "${adb_dnsdir}/${adb_dnsfile}"
                fi
-       fi
 
-       # inotify check
-       #
-       if [ "${adb_dnsinotify}" = "true" ]
-       then
-               if [ "${adb_dnsfilereset}" = "true" ]
+               if [ "${dns_up}" != "true" ]
                then
-                       adb_dnsfilereset="false"
+                       f_dnsup 4
+                       if [ "${rc}" -ne 0 ]
+                       then
+                               f_log "err" "dns backend '${adb_dns}' not running or executable"
+                       fi
+               fi
+
+               if [ "${adb_backup}" -eq 1 ] && [ -n "${adb_backupdir}" ] && [ ! -d "${adb_backupdir}" ]
+               then
+                       mkdir -p "${adb_backupdir}"
+                       if [ "${?}" -eq 0 ]
+                       then
+                               f_log "info" "backup directory '${adb_backupdir}' created"
+                       else
+                               f_log "err" "backup backend directory '${adb_backupdir}' could not be created"
+                       fi
+               fi
+
+               if [ -n "${adb_jaildir}" ] && [ ! -d "${adb_jaildir}" ]
+               then
+                       mkdir -p "${adb_jaildir}"
+                       if [ "${?}" -eq 0 ]
+                       then
+                               f_log "info" "jail directory '${adb_jaildir}' created"
+                       else
+                               f_log "err" "jail directory '${adb_jaildir}' could not be created"
+                       fi
                fi
-               f_log "info" "inotify is enabled for '${adb_dns}', adblock restart and file reset will be disabled"
        fi
+       f_log "debug" "f_dns    ::: dns: ${adb_dns}, dns_dir: ${adb_dnsdir}, dns_file: ${adb_dnsfile}, dns_user: ${adb_dnsuser}, dns_inotify: ${adb_dnsinotify}, dns_instance: ${adb_dnsinstance}, backup: ${adb_backup}, backup_dir: ${adb_backupdir}, jail_dir: ${adb_jaildir}"
 }
 
-# check & set environment
+# load fetch utility
 #
-f_env()
+f_fetch()
 {
-       local ssl_lib
-
-       f_log "info" "adblock instance started ::: action: ${adb_action}, priority: ${adb_nice:-"0"}, pid: ${$}"
-       f_jsnup "running"
-       f_extconf
+       local util utils cnt=0
 
-       # check backup directory
-       #
-       if [ ! -d "${adb_backupdir}" ]
+       if [ -z "${adb_fetchutil}" ]
        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 sort temp directory
-       #
-       if [ ! -d "${adb_sorttmpdir}" ]
+               utils="aria2c curl wget uclient-fetch"
+               for util in ${utils}
+               do
+                       if { [ "${util}" = "uclient-fetch" ] && [ -n "$(printf "%s" "${adb_packages}" | grep "^libustream-")" ]; } || \
+                               { [ "${util}" = "wget" ] && [ -n "$(printf "%s" "${adb_packages}" | grep "^wget -")" ]; } || \
+                               [ "${util}" = "curl" ] || [ "${util}" = "aria2c" ]
+                       then
+                               if [ -x "$(command -v "${util}")" ]
+                               then
+                                       adb_fetchutil="${util}"
+                                       uci_set adblock global adb_fetchutil "${util}"
+                                       f_uci "adblock"
+                                       break
+                               fi
+                       fi
+               done
+       elif [ ! -x "$(command -v "${adb_fetchutil}")" ]
        then
-               f_log "err" "sort temp directory '${adb_sorttmpdir}' does not exist/is not mounted yet, please create the directory or raise the 'adb_triggerdelay' to defer the adblock start"
+               unset adb_fetchutil
        fi
-
-       # check fetch utility
-       #
        case "${adb_fetchutil}" in
-               "uclient-fetch")
-                       if [ -f "/lib/libustream-ssl.so" ]
-                       then
-                               adb_fetchparm="${adb_fetchparm:-"--timeout=10 --no-check-certificate -O"}"
-                               ssl_lib="libustream-ssl"
-                       else
-                               adb_fetchparm="${adb_fetchparm:-"--timeout=10 -O"}"
-                       fi
-               ;;
-               "wget")
-                       adb_fetchparm="${adb_fetchparm:-"--no-cache --no-cookies --max-redirect=0 --timeout=10 --no-check-certificate -O"}"
-                       ssl_lib="built-in"
-               ;;
-               "wget-nossl")
-                       adb_fetchparm="${adb_fetchparm:-"--no-cache --no-cookies --max-redirect=0 --timeout=10 -O"}"
-               ;;
-               "busybox")
-                       adb_fetchparm="${adb_fetchparm:-"-O"}"
+               "aria2c")
+                       adb_fetchparm="${adb_fetchparm:-"--timeout=20 --allow-overwrite=true --auto-file-renaming=false --check-certificate=true --dir=" " -o"}"
                ;;
                "curl")
-                       adb_fetchparm="${adb_fetchparm:-"--connect-timeout 10 --silent --show-error --location --insecure -o"}"
-                       ssl_lib="built-in"
+                       adb_fetchparm="${adb_fetchparm:-"--connect-timeout 20 --silent --show-error --location -o"}"
                ;;
-               "aria2c")
-                       adb_fetchparm="${adb_fetchparm:-"--timeout=10 --allow-overwrite=true --auto-file-renaming=false --check-certificate=false -o"}"
-                       ssl_lib="built-in"
+               "uclient-fetch")
+                       adb_fetchparm="${adb_fetchparm:-"--timeout=20 -O"}"
+               ;;
+               "wget")
+                       adb_fetchparm="${adb_fetchparm:-"--no-cache --no-cookies --max-redirect=0 --timeout=20 -O"}"
                ;;
        esac
-       adb_fetchutil="$(command -v "${adb_fetchutil}")"
-
-       if [ ! -x "${adb_fetchutil}" ] || [ -z "${adb_fetchutil}" ] || [ -z "${adb_fetchparm}" ]
+       if [ -n "${adb_fetchutil}" ] && [ -n "${adb_fetchparm}" ]
        then
-               f_log "err" "download utility not found, please install 'uclient-fetch' with 'libustream-mbedtls' or the full 'wget' package"
+               adb_fetchutil="$(command -v "${adb_fetchutil}")"
+       else
+               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
-       adb_fetchinfo="${adb_fetchutil} (${ssl_lib:-"-"})"
-       f_temp
+       f_log "debug" "f_fetch  ::: fetch_util: ${adb_fetchutil:-"-"}, fetch_parm: ${adb_fetchparm:-"-"}"
 }
 
-# create temporary files and directories
+# create temporary files, directories and set dependent options
 #
 f_temp()
 {
-       if [ -d "/tmp" ] && [ -z "${adb_tmpdir}" ]
+       local cpu core cores
+
+       cpu="$(grep -c '^processor' /proc/cpuinfo 2>/dev/null)"
+       core="$(grep -cm1 '^core id' /proc/cpuinfo 2>/dev/null)"
+       if [ "${cpu}" -eq 0 ]
        then
-               adb_tmpdir="$(mktemp -p /tmp -d)"
-               adb_tmpfile="$(mktemp -p "${adb_tmpdir}" -tu)"
-       elif [ ! -d "/tmp" ]
+               cpu=1
+       fi
+       if [ "${core}" -eq 0 ]
        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"
+               core=1
        fi
-       if [ ! -f "${adb_pidfile}" ] || [ ! -s "${adb_pidfile}" ]
+       cores=$((cpu*core))
+
+       if [ -d "${adb_tmpbase}" ]
+       then
+               adb_tmpdir="$(mktemp -p "${adb_tmpbase}" -d)"
+               adb_tmpload="$(mktemp -p "${adb_tmpdir}" -tu)"
+               adb_tmpfile="$(mktemp -p "${adb_tmpdir}" -tu)"
+               adb_srtopts="--temporary-directory=${adb_tmpdir} --compress-program=gzip --batch-size=32 --parallel=${cores}"
+       else
+               f_log "err" "the temp base directory '${adb_tmpbase}' 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}"
        fi
+       f_log "debug" "f_temp   ::: tmp_base: ${adb_tmpbase:-"-"}, tmp_dir: ${adb_tmpdir:-"-"}, cores: ${cores:-"-"}, sort_options: ${adb_srtopts}, pid_file: ${adb_pidfile:-"-"}"
 }
 
 # remove temporary files and directories
@@ -310,30 +434,30 @@ f_rmtemp()
        then
                rm -rf "${adb_tmpdir}"
        fi
+       rm -f "${adb_srcfile}"
        > "${adb_pidfile}"
+       f_log "debug" "f_rmtemp ::: tmp_dir: ${adb_tmpdir:-"-"}, src_file: ${adb_srcfile:-"-"}, pid_file: ${adb_pidfile:-"-"}"
 }
 
-# remove dns related files, services and directories
+# remove dns related files
 #
 f_rmdns()
 {
-       local status dns_status rc
+       local status
 
        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}" ]
+       if [ "${adb_dns}" = "raw" ] || { [ -n "${adb_dns}" ] && [ -n "${status}" ]; }
        then
-               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 "${adb_backupdir}/${adb_dnsprefix}".*.gz 2>/dev/null
-               rc="${?}"
-               if [ "${rc}" -eq 0 ] && [ -n "${dns_status}" ]
+               if [ "${adb_backup}" -eq 1 ]
                then
-                       f_dnsup 4
+                       rm -f "${adb_backupdir}/${adb_dnsprefix}".*.gz
                fi
+               printf "${adb_dnsheader}" > "${adb_dnsdir}/${adb_dnsfile}"
+               f_dnsup 4
        fi
        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}"
+       f_log "debug" "f_rmdns  ::: dns: ${adb_dns}, status: ${status:-"-"}, dns_dir: ${adb_dnsdir}, dns_file: ${adb_dnsfile}, rt_file: ${adb_rtfile}, backup_dir: ${adb_backupdir:-"-"}"
 }
 
 # commit uci changes
@@ -344,7 +468,7 @@ f_uci()
 
        if [ -n "${config}" ]
        then
-               change="$(uci -q changes "${config}" | awk '{ORS=" "; print $0}')"
+               change="$(uci -q changes "${config}" | "${adb_awk}" '{ORS=" "; print $0}')"
                if [ -n "${change}" ]
                then
                        uci_commit "${config}"
@@ -352,8 +476,8 @@ f_uci()
                                "firewall")
                                        "/etc/init.d/firewall" reload >/dev/null 2>&1
                                ;;
-                               "dhcp"|"resolver")
-                                       printf "%s\\n" "${adb_dnsheader}" > "${adb_dnsdir}/${adb_dnsfile}"
+                               "resolver")
+                                       printf "${adb_dnsheader}" > "${adb_dnsdir}/${adb_dnsfile}"
                                        f_count
                                        f_jsnup "running"
                                        "/etc/init.d/${adb_dns}" reload >/dev/null 2>&1
@@ -364,24 +488,31 @@ f_uci()
        fi
 }
 
-# set/reset the global counter
+# get list counter
 #
 f_count()
 {
-       local mode="${1}"
+       local file mode="${1}" name="${2}"
 
        adb_cnt=0
        case "${mode}" in
                "blacklist")
-                       if [ -s "${adb_tmpfile}.blacklist" ]
+                       if [ -s "${adb_tmpfile}.${name}" ]
                        then
-                               adb_cnt="$(wc -l 2>/dev/null < "${adb_tmpfile}.blacklist")"
+                               adb_cnt="$(wc -l 2>/dev/null < "${adb_tmpfile}.${name}")"
                        fi
                ;;
                "whitelist")
-                       if [ -s "${adb_tmpdir}/tmp.raw.whitelist" ]
+                       if [ -s "${adb_tmpdir}/tmp.raw.${name}" ]
+                       then
+                               adb_cnt="$(wc -l 2>/dev/null < "${adb_tmpdir}/tmp.raw.${name}")"
+                               rm -f "${adb_tmpdir}/tmp.raw.${name}"
+                       fi
+               ;;
+               "safesearch")
+                       if [ -s "${adb_tmpdir}/tmp.safesearch.${name}" ]
                        then
-                               adb_cnt="$(wc -l 2>/dev/null < "${adb_tmpdir}/tmp.raw.whitelist")"
+                               adb_cnt="$(wc -l 2>/dev/null < "${adb_tmpdir}/tmp.safesearch.${name}")"
                        fi
                ;;
                "merge")
@@ -402,11 +533,18 @@ f_count()
                                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")))"
+                                       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)" ]; }
+                               for file in "${adb_tmpdir}/tmp.safesearch".*
+                               do
+                                       if [ -r "${file}" ]
+                                       then
+                                               adb_cnt=$((adb_cnt-$(wc -l 2>/dev/null < "${file}")))
+                                       fi
+                               done
+                               if [ -n "${adb_dnsheader}" ]
                                then
-                                       adb_cnt="$(((adb_cnt-$(printf "%s" "${adb_dnsheader}" | grep -c "^"))/2))"
+                                       adb_cnt=$(((adb_cnt-$(printf "${adb_dnsheader}" | grep -c "^"))/2))
                                fi
                        fi
                ;;
@@ -417,38 +555,21 @@ f_count()
 #
 f_extconf()
 {
-       local config port fwcfg
+       local config instance port fwcfg
 
        case "${adb_dns}" in
                "dnsmasq")
                        config="dhcp"
-                       if [ "${adb_dnsvariant}" = "nxdomain" ]
-                       then
-                               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
-                               if [ "${adb_enabled}" -eq 1 ] && [ -z "$(uci_get dhcp "@dnsmasq[${adb_dnsinstance}]" addnhosts | grep -Fo "${adb_dnsdir}/${adb_dnsfile}")" ]
+                       for instance in ${adb_dnsinstance}
+                       do
+                               if [ "${adb_enabled}" -eq 1 ] && [ -z "$(uci_get dhcp "@dnsmasq[${instance}]" confdir | grep -Fo "${adb_dnsdir}")" ]
                                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}")" ]
+                                       uci_set dhcp "@dnsmasq[${instance}]" confdir "${adb_dnsdir}"
+                               elif [ "${adb_enabled}" -eq 0 ] && [ -n "$(uci_get dhcp "@dnsmasq[${instance}]" confdir | grep -Fo "${adb_dnsdir}")" ]
                                then
-                                       uci_remove dhcp "@dnsmasq[${adb_dnsinstance}]" addnhosts
+                                       uci_remove dhcp "@dnsmasq[${instance}]" confdir
                                fi
-                       fi
+                       done
                ;;
                "kresd")
                        config="resolver"
@@ -501,52 +622,22 @@ f_extconf()
        f_uci "${config}"
 }
 
-# restart of the dns backend
+# restart dns backend
 #
 f_dnsup()
 {
-       local dns_service dns_up dns_pid dns_procfile cache_util cache_rc cnt=0 out_rc=4 in_rc="${1:-0}"
+       local dns_service dns_up dns_pid dns_procfile restart_rc cnt=0 out_rc=4 in_rc="${1:-0}"
 
-       if [ "${in_rc}" -eq 0 ] && [ "${adb_dnsinotify}" = "true" ]
+       if [ "${adb_dns}" = "raw" ] || { [ "${in_rc}" -eq 0 ] && [ "${adb_dnsinotify}" -eq 1 ]; }
        then
                out_rc=0
        else
-               if [ "${in_rc}" -eq 0 ] && [ "${adb_dnsflush}" -eq 0 ] && [ "${adb_enabled}" -eq 1 ]
-               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")
-                                       "/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
-               else
-                       "/etc/init.d/${adb_dns}" restart >/dev/null 2>&1
-               fi
-               sleep 5
-
-               while [ "${cnt}" -le 10 ]
+               "/etc/init.d/${adb_dns}" restart >/dev/null 2>&1
+               restart_rc="${?}"
+       fi
+       if [ "${restart_rc}" = "0" ]
+       then
+               while [ "${cnt}" -le "${adb_dnstimeout}" ]
                do
                        dns_service="$(ubus -S call service list "{\"name\":\"${adb_dns}\"}")"
                        dns_up="$(printf "%s" "${dns_service}" | jsonfilter -l1 -e "@[\"${adb_dns}\"].instances.*.running")"
@@ -554,33 +645,26 @@ f_dnsup()
                        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
-                               break
+                               if [ -x "${adb_lookupcmd}" ] && [ "${adb_lookupdomain}" != "false" ]
+                               then
+                                       "${adb_lookupcmd}" "${adb_lookupdomain}" >/dev/null 2>&1
+                                       if [ "${?}" -eq 0 ]
+                                       then
+                                               out_rc=0
+                                               break
+                                       fi
+                               else
+                                       sleep ${adb_dnstimeout}
+                                       cnt=${adb_dnstimeout}
+                                       out_rc=0
+                                       break
+                               fi
                        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}"
+       f_log "debug" "f_dnsup  ::: lookup_util: ${adb_lookupcmd:-"-"}, lookup_domain: ${adb_lookupdomain:-"-"}, restart_rc: ${restart_rc:-"-"}, dns_timeout: ${adb_dnstimeout}, dns_cnt: ${cnt}, in_rc: ${in_rc}, out_rc: ${out_rc}"
        return "${out_rc}"
 }
 
@@ -588,102 +672,230 @@ f_dnsup()
 #
 f_list()
 {
-       local hold file name out_rc mode="${1}" in_rc="${src_rc:-0}" cnt=1
+       local hold file rset item array safe_url safe_ips safe_cname safe_domains out_rc mode="${1}" src_name="${2:-"${src_name}"}" in_rc="${src_rc:-0}" cnt=1 ffiles="-maxdepth 1 -name ${adb_dnsprefix}.*.gz"
 
        case "${mode}" in
                "blacklist"|"whitelist")
-                       if [ "${mode}" = "blacklist" ] && [ -s "${adb_blacklist}" ]
+                       src_name="${mode}"
+                       if [ "${src_name}" = "blacklist" ] && [ -s "${adb_blacklist}" ]
                        then
-                               adb_blacklist_rset="/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}"
-                               awk "${adb_blacklist_rset}" "${adb_blacklist}" > "${adb_tmpfile}.${mode}"
+                               rset="/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}"
+                               "${adb_awk}" "${rset}" "${adb_blacklist}" | \
+                               "${adb_awk}" 'BEGIN{FS="."}{for(f=NF;f>1;f--)printf "%s.",$f;print $1}' > "${adb_tmpdir}/tmp.raw.${src_name}"
+                               sort ${adb_srtopts} -u "${adb_tmpdir}/tmp.raw.${src_name}" 2>/dev/null > "${adb_tmpfile}.${src_name}"
                                out_rc="${?}"
-                       elif [ "${mode}" = "whitelist" ] && [ -s "${adb_whitelist}" ]
+                               rm -f "${adb_tmpdir}/tmp.raw.${src_name}"
+                       elif [ "${src_name}" = "whitelist" ] && [ -s "${adb_whitelist}" ]
                        then
-                               adb_whitelist_rset="/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}"
-                               awk "${adb_whitelist_rset}" "${adb_whitelist}" > "${adb_tmpdir}/tmp.raw.${mode}"
+                               rset="/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}"
+                               "${adb_awk}" "${rset}" "${adb_whitelist}" > "${adb_tmpdir}/tmp.raw.${src_name}"
                                out_rc="${?}"
                                if [ "${out_rc}" -eq 0 ]
                                then
-                                       adb_whitelist_rset="/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{gsub(\"\\\\.\",\"\\\\.\",\$1);print tolower(\"^(|.*\\\\.)\"\$1\"$\")}"
-                                       awk "${adb_whitelist_rset}" "${adb_tmpdir}/tmp.raw.${mode}" > "${adb_tmpdir}/tmp.rem.${mode}"
+                                       rset="/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{gsub(\"\\\\.\",\"\\\\.\",\$1);print tolower(\"^(|.*\\\\.)\"\$1\"$\")}"
+                                       "${adb_awk}" "${rset}" "${adb_tmpdir}/tmp.raw.${src_name}" > "${adb_tmpdir}/tmp.rem.${src_name}"
                                        out_rc="${?}"
-                                       if [ "${out_rc}" -eq 0 ] && [ -n "${adb_dnsallow}" ]
+                                       if [ "${out_rc}" -eq 0 ] && [ "${adb_dnsallow}" != "1" ]
                                        then
-                                               eval "${adb_dnsallow}" "${adb_tmpdir}/tmp.raw.${mode}" > "${adb_tmpdir}/tmp.add.${mode}"
+                                               eval "${adb_dnsallow}" "${adb_tmpdir}/tmp.raw.${src_name}" > "${adb_tmpdir}/tmp.add.${src_name}"
                                                out_rc="${?}"
+                                               if [ "${out_rc}" -eq 0 ] && [ "${adb_jail}" = "1" ] && [ "${adb_dnssstop}" != "0" ]
+                                               then
+                                                       > "${adb_jaildir}/${adb_dnsjail}"
+                                                       if [ -n "${adb_dnsheader}" ]
+                                                       then
+                                                               printf "${adb_dnsheader}" >> "${adb_jaildir}/${adb_dnsjail}"
+                                                       fi
+                                                       cat "${adb_tmpdir}/tmp.add.${src_name}" >> "${adb_jaildir}/${adb_dnsjail}"
+                                                       printf "%s\n" "${adb_dnsstop}" >> "${adb_jaildir}/${adb_dnsjail}"
+                                               fi
                                        fi
                                fi
-                               rm -f "${adb_tmpdir}/tmp.raw.${mode}"
+                       fi
+               ;;
+               "safesearch")
+                       case "${src_name}" in
+                               "google")
+                                       rset="/^(\\.[[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{printf \"%s\n%s\n\",tolower(\"www\"\$1),tolower(substr(\$1,2,length(\$1)))}"
+                                       safe_url="https://www.google.com/supported_domains"
+                                       safe_ips="216.239.38.120 2001:4860:4802:32::78"
+                                       safe_cname="forcesafesearch.google.com"
+                                       safe_domains="${adb_tmpdir}/tmp.load.safesearch.${src_name}"
+                                       if [ "${adb_backup}" -eq 1 ] && [ -s "${adb_backupdir}/safesearch.${src_name}.gz" ]
+                                       then
+                                               zcat "${adb_backupdir}/safesearch.${src_name}.gz" > "${safe_domains}"
+                                               out_rc="${?}"
+                                       else
+                                               "${adb_fetchutil}" ${adb_fetchparm} "${safe_domains}" "${safe_url}" 2>/dev/null
+                                               out_rc="${?}"
+                                               if [ "${adb_backup}" -eq 1 ] && [ "${out_rc}" -eq 0 ]
+                                               then
+                                                       gzip -cf "${safe_domains}" > "${adb_backupdir}/safesearch.${src_name}.gz"
+                                               fi
+                                       fi
+                                       if [ "${out_rc}" -eq 0 ]
+                                       then
+                                               "${adb_awk}" "${rset}" "${safe_domains}" > "${adb_tmpdir}/tmp.raw.safesearch.${src_name}"
+                                               out_rc="${?}"
+                                       fi
+                               ;;
+                               "bing")
+                                       safe_ips="204.79.197.220 ::FFFF:CC4F:C5DC"
+                                       safe_cname="strict.bing.com"
+                                       safe_domains="www.bing.com"
+                                       printf "%s\n" ${safe_domains} > "${adb_tmpdir}/tmp.raw.safesearch.${src_name}"
+                                       out_rc="${?}"
+                               ;;
+                               "duckduckgo")
+                                       safe_ips="50.16.250.179 54.208.102.2 52.204.96.252"
+                                       safe_cname="safe.duckduckgo.com"
+                                       safe_domains="duckduckgo.com"
+                                       printf "%s\n" ${safe_domains} > "${adb_tmpdir}/tmp.raw.safesearch.${src_name}"
+                                       out_rc="${?}"
+                               ;;
+                               "pixabay")
+                                       safe_ips="104.18.82.97 2606:4700::6812:8d57 2606:4700::6812:5261"
+                                       safe_cname="safesearch.pixabay.com"
+                                       safe_domains="pixabay.com"
+                                       printf "%s\n" ${safe_domains} > "${adb_tmpdir}/tmp.raw.safesearch.${src_name}"
+                                       out_rc="${?}"
+                               ;;
+                               "yandex")
+                                       safe_ips="213.180.193.56"
+                                       safe_cname="familysearch.yandex.ru"
+                                       safe_domains="ya.ru yandex.ru yandex.com yandex.com.tr yandex.ua yandex.by yandex.ee yandex.lt yandex.lv yandex.md yandex.uz yandex.tm yandex.tj yandex.az"
+                                       printf "%s\n" ${safe_domains} > "${adb_tmpdir}/tmp.raw.safesearch.${src_name}"
+                                       out_rc="${?}"
+                               ;;
+                               "youtube")
+                                       if [ "${adb_safesearchmod}" -eq 0 ]
+                                       then
+                                               safe_ips="216.239.38.120 2001:4860:4802:32::78"
+                                               safe_cname="restrict.youtube.com"
+                                       else
+                                               safe_ips="216.239.38.119 2001:4860:4802:32::77"
+                                               safe_cname="restrictmoderate.youtube.com"
+                                       fi
+                                       safe_domains="www.youtube.com m.youtube.com youtubei.googleapis.com youtube.googleapis.com www.youtube-nocookie.com"
+                                       printf "%s\n" ${safe_domains} > "${adb_tmpdir}/tmp.raw.safesearch.${src_name}"
+                                       out_rc="${?}"
+                               ;;
+                       esac
+                       if [ "${out_rc}" -eq 0 ]
+                       then
+                               > "${adb_tmpdir}/tmp.safesearch.${src_name}"
+                               if [ "${adb_dns}" = "named" ] || [ "${adb_dns}" = "kresd" ]
+                               then
+                                       array="${safe_cname}"
+                               else
+                                       array="${safe_ips}"
+                               fi
+                               for item in ${array}
+                               do
+                                       eval "${adb_dnssafesearch}" "${adb_tmpdir}/tmp.raw.safesearch.${src_name}" >> "${adb_tmpdir}/tmp.safesearch.${src_name}"
+                                       if [ "${?}" -ne 0 ]
+                                       then
+                                               rm -f "${adb_tmpdir}/tmp.safesearch.${src_name}"
+                                               break
+                                       fi
+                               done
+                               out_rc="${?}"
+                               rm -f "${adb_tmpdir}/tmp.raw.safesearch.${src_name}"
                        fi
                ;;
                "backup")
-                       gzip -cf "${src_tmpfile}" 2>/dev/null > "${adb_backupdir}/${adb_dnsprefix}.${src_name}.gz"
-                       out_rc="${?}"
+                       (
+                               gzip -cf "${src_tmpfile}" > "${adb_backupdir}/${adb_dnsprefix}.${src_name}.gz"
+                               out_rc="${?}"
+                       )&
                ;;
                "restore")
                        if [ -n "${src_name}" ] && [ -s "${adb_backupdir}/${adb_dnsprefix}.${src_name}.gz" ]
                        then
-                               zcat "${adb_backupdir}/${adb_dnsprefix}.${src_name}.gz" 2>/dev/null > "${src_tmpfile}"
+                               zcat "${adb_backupdir}/${adb_dnsprefix}.${src_name}.gz" > "${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 ]
+                                       if [ -r "${file}" ]
                                        then
-                                               wait
+                                               name="${file##*/}"
+                                               name="${name%.*}"
+                                               zcat "${file}" > "${adb_tmpfile}.${name}" &
+                                               hold=$((cnt%adb_maxqueue))
+                                               if [ "${hold}" -eq 0 ]
+                                               then
+                                                       wait
+                                               fi
+                                               cnt=$((cnt+1))
                                        fi
-                                       cnt=$((cnt+1))
                                done
                                wait
                                out_rc="${?}"
+                       else
+                               out_rc=4
+                       fi
+                       if [ "${adb_action}" != "start" ] && [ "${adb_action}" != "resume" ] && [ -n "${src_name}" ] && [ "${out_rc}" -ne 0 ]
+                       then
+                               adb_sources="${adb_sources/${src_name}}"
                        fi
                ;;
                "remove")
-                       if [ -f "${adb_backupdir}/${adb_dnsprefix}.${src_name}.gz" ]
+                       if [ "${adb_backup}" -eq 1 ]
                        then
-                               rm -f "${adb_backupdir}/${adb_dnsprefix}.${src_name}.gz"
-                               out_rc="${?}"
+                               rm "${adb_backupdir}/${adb_dnsprefix}.${src_name}.gz" 2>/dev/null
                        fi
+                       out_rc="${?}"
+                       adb_sources="${adb_sources/${src_name}}"
                ;;
                "merge")
-                       > "${adb_tmpdir}/${adb_dnsfile}"
-                       for file in "${adb_tmpfile}".*
-                       do
-                               cat "${file}" 2>/dev/null >> "${adb_tmpdir}/${adb_dnsfile}"
-                               out_rc="${?}"
-                               if [ "${out_rc}" -ne 0 ]
+                       if [ "${adb_backup}" -eq 1 ]
+                       then
+                               for src_name in ${adb_sources}
+                               do
+                                       ffiles="${ffiles} -a ! -name ${adb_dnsprefix}.${src_name}.gz"
+                               done
+                               if [ "${adb_safesearch}" -eq 1 ] && [ "${adb_dnssafesearch}" != "0" ]
                                then
-                                       break
+                                       ffiles="${ffiles} -a ! -name safesearch.google.gz"
                                fi
-                       done
+                               find "${adb_backupdir}" ${ffiles} -print0 2>/dev/null | xargs -0 rm 2>/dev/null
+                       fi
+                       unset src_name
+                       sort ${adb_srtopts} -mu "${adb_tmpfile}".* 2>/dev/null > "${adb_tmpdir}/${adb_dnsfile}"
+                       out_rc="${?}"
                        rm -f "${adb_tmpfile}".*
                ;;
                "final")
-                       > "${adb_dnsdir}/${adb_dnsfile}"
+                       unset src_name
+                       if [ -n "${adb_dnsheader}" ]
+                       then
+                               printf "${adb_dnsheader}" > "${adb_dnsdir}/${adb_dnsfile}"
+                       else
+                               > "${adb_dnsdir}/${adb_dnsfile}"
+                       fi
                        if [ -s "${adb_tmpdir}/tmp.add.whitelist" ]
                        then
                                cat "${adb_tmpdir}/tmp.add.whitelist" >> "${adb_dnsdir}/${adb_dnsfile}"
                        fi
-                       if [ -s "${adb_tmpdir}/tmp.rem.whitelist" ]
+                       for file in "${adb_tmpdir}/tmp.safesearch".*
+                       do
+                               if [ -r "${file}" ]
+                               then
+                                       cat "${file}" >> "${adb_dnsdir}/${adb_dnsfile}"
+                               fi
+                       done
+                       if [ "${adb_dnsdeny}" != "0" ]
                        then
-                               egrep -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 [ -n "${adb_dnsheader}" ]
-                       then
-                               printf "%s\\n" "${adb_dnsheader}" | cat - "${adb_dnsdir}/${adb_dnsfile}" > "${adb_tmpdir}/${adb_dnsfile}"
-                               mv -f "${adb_tmpdir}/${adb_dnsfile}" "${adb_dnsdir}/${adb_dnsfile}"
+                       else
+                               mv "${adb_tmpdir}/${adb_dnsfile}" "${adb_dnsdir}/${adb_dnsfile}"
                        fi
                        out_rc="${?}"
                ;;
        esac
-       f_count "${mode}"
+       f_count "${mode}" "${src_name}"
        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}"
@@ -693,80 +905,39 @@ f_list()
 #
 f_tld()
 {
-       local cnt cnt_srt cnt_tld source="${1}" temp_tld="${1}.tld" tld_ok="false"
+       local cnt cnt_tld source="${1}" temp_tld="${1}.tld"
 
-       cnt="${adb_cnt}"
-       if [ "${adb_dnsvariant% *}" != "null" ] && [ "${adb_cnt}" -le "${adb_maxtld}" ]
+       "${adb_awk}" '{if(NR==1){tld=$NF};while(getline){if(index($NF,tld".")==0){print tld;tld=$NF}}print tld}' "${source}" | \
+       "${adb_awk}" 'BEGIN{FS="."}{for(f=NF;f>1;f--)printf "%s.",$f;print $1}' > "${temp_tld}"
+       if [ "${?}" -eq 0 ]
        then
-               awk 'BEGIN{FS="."}{for(f=NF;f>1;f--)printf "%s.",$f;print $1}' "${source}" > "${temp_tld}"
-               if [ "${?}" -eq 0 ]
-               then
-                       sort -T "${adb_sorttmpdir}" -u "${temp_tld}" > "${source}"
-                       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 ]
-                               then
-                                       awk 'BEGIN{FS="."}{for(f=NF;f>1;f--)printf "%s.",$f;print $1}' "${temp_tld}" > "${source}"
-                                       if [ "${?}" -eq 0 ]
-                                       then
-                                               rm -f "${temp_tld}"
-                                               cnt_tld="$(wc -l 2>/dev/null < "${source}")"
-                                               tld_ok="true"
-                                       fi
-                               fi
-                       fi
-               fi
+               mv -f "${temp_tld}" "${source}"
+               cnt_tld="$(wc -l 2>/dev/null < "${source}")"
        else
-               sort -T "${adb_sorttmpdir}" -u "${source}" > "${temp_tld}"
-               if [ "${?}" -eq 0 ]
-               then
-                       mv -f "${temp_tld}" "${source}"
-                       cnt_srt="$(wc -l 2>/dev/null < "${source}")"
-                       tld_ok="true"
-               fi
-       fi
-       if [ "${tld_ok}" = "false" ]
-       then
-               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}"
+               rm -f "${temp_tld}"
        fi
-       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}"
+       f_log "debug" "f_tld    ::: source: ${source}, cnt: ${adb_cnt:-"-"}, cnt_tld: ${cnt_tld:-"-"}"
 }
 
 # suspend/resume adblock processing
 #
 f_switch()
 {
-       local status done="false" mode="${1}"
+       local status list entry done="false" mode="${1}"
 
        json_load_file "${adb_rtfile}" >/dev/null 2>&1
        json_select "data" >/dev/null 2>&1
        json_get_var status "adblock_status"
        if [ "${mode}" = "suspend" ] && [ "${status}" = "enabled" ]
        then
-               f_jsnup "running"
-               f_temp
-               printf "%s\\n" "${adb_dnsheader}" > "${adb_dnsdir}/${adb_dnsfile}"
+               f_env
+               printf "${adb_dnsheader}" > "${adb_dnsdir}/${adb_dnsfile}"
                f_count
                done="true"
        elif [ "${mode}" = "resume" ] && [ "${status}" = "paused" ]
        then
-               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
+               f_env
+               f_main
                done="true"
        fi
        if [ "${done}" = "true" ]
@@ -774,41 +945,33 @@ f_switch()
                if [ "${mode}" = "suspend" ]
                then
                        f_bgserv "stop"
+                       f_dnsup
                fi
-               f_dnsup
                if [ "${mode}" = "resume" ]
                then
                        f_bgserv "start"
                fi
                f_jsnup "${mode}"
                f_log "info" "${mode} adblock processing"
-               f_rmtemp
        fi
+       f_rmtemp
 }
 
 # query blocklist for certain (sub-)domains
 #
 f_query()
 {
-       local search result prefix suffix field domain="${1}" tld="${1#*.}"
+       local search result prefix suffix field query_start query_end query_timeout=30 domain="${1}" tld="${1#*.}"
 
        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 input, please submit a single (sub-)domain :::"
        else
                case "${adb_dns}" in
                        "dnsmasq")
-                               if [ "${adb_dnsvariant}" = "nxdomain" ]
-                               then
-                                       prefix=".*[\\/\\.]"
-                                       suffix="(\\/)"
-                                       field=2
-                               elif [ "${adb_dnsvariant% *}" = "null" ]
-                               then
-                                       prefix="0\\..*[\\t\\.]"
-                                       suffix=""
-                                       field=2
-                               fi
+                               prefix=".*[\\/\\.]"
+                               suffix="(\\/)"
+                               field=2
                        ;;
                        "unbound")
                                prefix=".*[\"\\.]"
@@ -825,35 +988,56 @@ f_query()
                                suffix="( \\.)"
                                field=1
                        ;;
+                       "raw")
+                               prefix=".*[\\.]"
+                               suffix=""
+                               field=1
+                       ;;
                esac
-               if [ "${adb_dnsfilereset}" = "false" ]
+               query_start="$(date "+%s")"
+               if [ "${adb_dnsfilereset}" -eq 0 ]
                then
                        while [ "${domain}" != "${tld}" ]
                        do
                                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" ":::"
+                               result="$("${adb_awk}" -F '/|\"|\t| ' "/^(${search}|${prefix}+${search}.*${suffix})$/{i++;if(i<=9){printf \"  + %s\\n\",\$${field}}else if(i==10){printf \"  + %s\\n\",\"[...]\";exit}}" "${adb_dnsdir}/${adb_dnsfile}")"
+                               printf "%s\\n%s\\n%s\\n" ":::" "::: domain '${domain}' in active blocklist" ":::"
                                printf "%s\\n\\n" "${result:-"  - no match"}"
                                domain="${tld}"
                                tld="${domain#*.}"
                        done
                fi
-               if [ -d "${adb_backupdir}" ]
+               if [ "${adb_backup}" -eq 1 ] && [ -d "${adb_backupdir}" ]
                then
                        search="${1//[+*~%\$&\"\']/}"
                        search="${search//./\\.}"
-                       printf "%s\\n%s\\n%s\\n" ":::" "::: results for domain '${1}' in backups and black-/whitelist" ":::"
+                       printf "%s\\n%s\\n%s\\n" ":::" "::: 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}}"
+                                       zcat "${file}" 2>/dev/null | \
+                                       "${adb_awk}" 'BEGIN{FS="."}{for(f=NF;f>1;f--)printf "%s.",$f;print $1}' | "${adb_awk}" -v f="${file##*/}" "BEGIN{rc=1};/^($search|.*\\.${search})$/{i++;if(i<=3){printf \"  + %-30s%s\\n\",f,\$1;rc=0}else if(i==4){printf \"  + %-30s%s\\n\",f,\"[...]\"}};END{exit rc}"
                                else
-                                       awk -v f="${file##*/}" "/^($search|.*\\.${search})/{i++;{printf(\"  + %-30s%s\\n\",f,\$1)};if(i>=3){printf(\"  + %-30s%s\\n\",f,\"[...]\");exit}}" "${file}"
+                                       "${adb_awk}" -v f="${file##*/}" "BEGIN{rc=1};/^($search|.*\\.${search})$/{i++;if(i<=3){printf \"  + %-30s%s\\n\",f,\$1;rc=0}else if(i==4){printf \"  + %-30s%s\\n\",f,\"[...]\"}};END{exit rc}" "${file}"
+                               fi
+                               if [ "${?}" -eq 0 ]
+                               then
+                                       result="true"
+                                       query_end="$(date "+%s")"
+                                       if [ "$((query_end-query_start))" -gt "${query_timeout}" ]
+                                       then
+                                               printf "%s\\n\\n" "  - [...]"
+                                               break
+                                       fi
                                fi
                        done
+                       if [ "${result}" != "true" ]
+                       then
+                               printf "%s\\n\\n" "  - no match"
+                       fi
                fi
        fi
 }
@@ -862,11 +1046,22 @@ f_query()
 #
 f_jsnup()
 {
-       local run_time bg_pid status="${1:-"enabled"}"
+       local runtime utils memory bg_pid status="${1:-"enabled"}"
 
        case "${status}" in
                "enabled"|"error")
-                       run_time="$(/bin/date "+%d.%m.%Y %H:%M:%S")"
+                       adb_endtime="$(date "+%s")"
+                       memory="$("${adb_awk}" '/^MemTotal|^MemFree|^MemAvailable/{ORS="/"; print int($2/1000)}' "/proc/meminfo" 2>/dev/null | "${adb_awk}" '{print substr($0,1,length($0)-1)}')"
+                       if [ "$(( (adb_endtime-adb_starttime)/60 ))" -lt 60 ]
+                       then
+                               runtime="${adb_action}, $(( (adb_endtime-adb_starttime)/60 ))m $(( (adb_endtime-adb_starttime)%60 ))s, ${memory:-0}, $(date "+%d.%m.%Y %H:%M:%S")"
+                       else
+                               runtime="${adb_action}, n/a, ${memory:-0}, $(date "+%d.%m.%Y %H:%M:%S")"
+                       fi
+                       if [ "${status}" = "error" ]
+                       then
+                               adb_cnt=0
+                       fi
                ;;
                "suspend")
                        status="paused"
@@ -879,18 +1074,20 @@ f_jsnup()
        json_select "data" >/dev/null 2>&1
        if [ "${?}" -eq 0 ]
        then
-               if [ -z "${adb_fetchinfo}" ]
+               if [ -z "${adb_fetchutil}" ] || [ -z "${adb_awk}" ]
                then
-                       json_get_var adb_fetchinfo "fetch_utility"
+                       json_get_var utils "utilities"
+               else
+                       utils="${adb_fetchutil}, ${adb_awk}"
                fi
                if [ -z "${adb_cnt}" ]
                then
-                       json_get_var adb_cnt "overall_domains"
+                       json_get_var adb_cnt "blocked_domains"
                        adb_cnt="${adb_cnt%% *}"
                fi
-               if [ -z "${run_time}" ]
+               if [ -z "${runtime}" ]
                then
-                       json_get_var run_time "last_rundate"
+                       json_get_var runtime "last_run"
                fi
        fi
        > "${adb_rtfile}"
@@ -899,23 +1096,32 @@ f_jsnup()
        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}"
-       json_add_string "fetch_utility" "${adb_fetchinfo:-"-"}"
-       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_add_string "blocked_domains" "${adb_cnt:-0}"
+       json_add_array "active_sources"
+       for entry in ${adb_sources}
+       do
+               json_add_object
+               json_add_string "source" "${entry}"
+               json_close_object
+       done
+       json_close_array
+       json_add_string "dns_backend" "${adb_dns:-"-"}, ${adb_dnsdir:-"-"}"
+       json_add_string "run_utils" "${utils:-"-"}"
+       json_add_string "run_ifaces" "trigger: ${adb_trigger:-"-"}, report: ${adb_repiface:-"-"}"       
+       json_add_string "run_directories" "base: ${adb_tmpbase}, backup: ${adb_backupdir}, report: ${adb_reportdir}, jail: ${adb_jaildir}"
+       json_add_string "run_flags" "backup: ${adb_backup}, reset: ${adb_dnsfilereset}, flush: ${adb_dnsflush}, force: ${adb_forcedns}, search: ${adb_safesearch}, report: ${adb_report}, mail: ${adb_mail}, jail: ${adb_jail}"
+       json_add_string "last_run" "${runtime:-"-"}"
+       json_add_string "system" "${adb_sysver}"
        json_close_object
        json_dump > "${adb_rtfile}"
 
        if [ "${adb_mail}" -eq 1 ] && [ -x "${adb_mailservice}" ] && \
-               { [ "${status}" = "error" ] || { [ "${status}" = "enabled" ] && [ "${adb_cnt}" -le "${adb_mcnt}" ]; } }
+               { [ "${status}" = "error" ] || { [ "${status}" = "enabled" ] && [ "${adb_cnt}" -le "${adb_mailcnt}" ]; } }
        then
-               ("${adb_mailservice}" "${adb_ver}" >/dev/null 2>&1)&
+               ( "${adb_mailservice}" "${adb_ver}" >/dev/null 2>&1 )&
                bg_pid="${!}"
        fi
-       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:-"-"}"
+       f_log "debug" "f_jsnup  ::: status: ${status:-"-"}, cnt: ${adb_cnt}, mail: ${adb_mail}, mail_service: ${adb_mailservice}, mail_cnt: ${adb_mailcnt}, mail_pid: ${bg_pid:-"-"}"
 }
 
 # write to syslog
@@ -926,9 +1132,9 @@ f_log()
 
        if [ -n "${log_msg}" ] && { [ "${class}" != "debug" ] || [ "${adb_debug}" -eq 1 ]; }
        then
-               if [ -x "${adb_logger}" ]
+               if [ -x "${adb_loggercmd}" ]
                then
-                       "${adb_logger}" -p "${class}" -t "adblock-${adb_ver}[${$}]" "${log_msg}"
+                       "${adb_loggercmd}" -p "${class}" -t "adblock-${adb_ver}[${$}]" "${log_msg}"
                else
                        printf "%s %s %s\\n" "${class}" "adblock-${adb_ver}[${$}]" "${log_msg}"
                fi
@@ -948,9 +1154,9 @@ f_bgserv()
 {
        local bg_pid status="${1}"
 
-       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" ]
+       bg_pid="$(pgrep -f "^/bin/sh ${adb_ubusservice}.*|^/bin/ubus -S -M r -m invoke monitor|^grep -qF \"method\":\"set\",\"data\":\\{\"name\":\"${adb_dns}\"" | "${adb_awk}" '{ORS=" "; print $1}')"
+       if [ "${adb_dns}" != "raw" ] && [ -z "${bg_pid}" ] && [ "${status}" = "start" ] \
+               && [ -x "${adb_ubusservice}" ] && [ "${adb_dnsfilereset}" -eq 1 ]
        then
                ( "${adb_ubusservice}" "${adb_ver}" & )
        elif [ -n "${bg_pid}" ] && [ "${status}" = "stop" ] 
@@ -964,30 +1170,53 @@ f_bgserv()
 #
 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
+       local src_tmpload src_tmpfile src_name src_rset src_url src_log src_arc src_cat src_item src_list src_entries src_suffix src_rc entry keylist memory 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}"
+       memory="$("${adb_awk}" '/^MemTotal|^MemFree|^MemAvailable/{ORS="/"; print int($2/1000)}' "/proc/meminfo" 2>/dev/null | "${adb_awk}" '{print substr($0,1,length($0)-1)}')"
+       f_log "debug" "f_main   ::: memory: ${memory:-0}, max_queue: ${adb_maxqueue}, safe_search: ${adb_safesearch}, force_dns: ${adb_forcedns}, awk: ${adb_awk}"
+
+       # white- and blacklist preparation
+       #
+       list="blacklist whitelist"
+       for entry in ${list}
+       do
+               ( f_list "${entry}" "${entry}" )&
+       done
+
+       # safe search preparation
+       #
+       if [ "${adb_safesearch}" -eq 1 ] && [ "${adb_dnssafesearch}" != "0" ]
+       then
+               list="google bing duckduckgo pixabay yandex youtube"
+               for entry in ${list}
+               do
+                       ( f_list safesearch "${entry}" )&
+               done
+       fi
+       wait
 
        # 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}\}\")"
-               src_tmpload="${adb_tmpfile}.${src_name}.load"
-               src_tmpfile="${adb_tmpfile}.${src_name}.file"
+               json_select "${src_name}" >/dev/null 2>&1
+               if [ "${?}" -ne 0 ]
+               then
+                       adb_sources="${adb_sources/${src_name}}"
+                       continue
+               fi
+               json_get_var src_url "url" >/dev/null 2>&1
+               json_get_var src_rset "rule" >/dev/null 2>&1
+               json_get_values src_cat "categories" >/dev/null 2>&1
+               json_select ..
+               src_tmpload="${adb_tmpload}.${src_name}.load"
+               src_tmpsort="${adb_tmpload}.${src_name}.sort"
+               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" ] || [ -f "${src_url}" ] || [ -z "${src_url}" ] || [ -z "${src_rset}" ]
+               if [ -z "${src_url}" ] || [ -z "${src_rset}" ]
                then
                        f_list remove
                        continue
@@ -995,7 +1224,7 @@ f_main()
 
                # backup mode
                #
-               if [ "${adb_action}" = "start" ]
+               if [ "${adb_backup}" -eq 1 ] && { [ "${adb_action}" = "start" ] || [ "${adb_action}" = "resume" ]; }
                then
                        f_list restore
                        if [ "${?}" -eq 0 ] && [ -s "${src_tmpfile}" ]
@@ -1014,65 +1243,94 @@ f_main()
                                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\"\}\")"
+                                       unset src_entries
+                                       src_suffix="$(eval printf "%s" \"\$\{adb_src_suffix_${src_name}:-\"domains\"\}\")"
+                                       src_list="$(tar -tzf "${src_arc}" 2>/dev/null)"
                                        for src_item in ${src_cat}
                                        do
-                                               entry="$(printf "%s" "${list}" | grep -E "[\\^/]+${src_item}/${suffix}")"
-                                               if [ -n "${entry}" ]
-                                               then
-                                                       tar -xOzf "${src_arc}" "${entry}" >> "${src_tmpload}"
-                                                       src_rc="${?}"
-                                                       if [ "${src_rc}" -ne 0 ]
-                                                       then
-                                                               break
-                                                       fi
-                                               fi
+                                               src_entries="${src_entries} $(printf "%s" "${src_list}" | grep -E "${src_item}/${src_suffix}$")"
                                        done
+                                       if [ -n "${src_entries}" ]
+                                       then
+                                               tar -xOzf "${src_arc}" ${src_entries} 2>/dev/null > "${src_tmpload}"
+                                               src_rc="${?}"
+                                       fi
+                                       rm -f "${src_arc}"
                                else
-                                       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:-"-"}"
+                                       src_log="$(printf "%s" "${src_log}" | "${adb_awk}" '{ORS=" ";print $0}')"
+                                       f_log "info" "download of '${src_name}' failed, url: ${src_url}, rule: ${src_rset:-"-"}, categories: ${src_cat:-"-"}, rc: ${src_rc}, log: ${src_log:-"-"}"
                                fi
                                if [ "${src_rc}" -eq 0 ] && [ -s "${src_tmpload}" ]
                                then
-                                       rm -f "${src_arc}"
-                                       awk "${src_rset}" "${src_tmpload}" 2>/dev/null > "${src_tmpfile}"
+                                       if [ -s "${adb_tmpdir}/tmp.rem.whitelist" ]
+                                       then
+                                               "${adb_awk}" "${src_rset}" "${src_tmpload}" | \
+                                               grep -Evf "${adb_tmpdir}/tmp.rem.whitelist" | \
+                                               "${adb_awk}" 'BEGIN{FS="."}{for(f=NF;f>1;f--)printf "%s.",$f;print $1}' > "${src_tmpsort}"
+                                       else
+                                               "${adb_awk}" "${src_rset}" "${src_tmpload}" | \
+                                               "${adb_awk}" 'BEGIN{FS="."}{for(f=NF;f>1;f--)printf "%s.",$f;print $1}' > "${src_tmpsort}"
+                                       fi
+                                       rm -f "${src_tmpload}"
+                                       sort ${adb_srtopts} -u "${src_tmpsort}" 2>/dev/null > "${src_tmpfile}"
                                        src_rc="${?}"
+                                       rm -f "${src_tmpsort}"
                                        if [ "${src_rc}" -eq 0 ] && [ -s "${src_tmpfile}" ]
                                        then
-                                               rm -f "${src_tmpload}"
                                                f_list download
-                                               f_list backup
-                                       elif [ "${adb_action}" != "start" ]
+                                               if [ "${adb_backup}" -eq 1 ]
+                                               then
+                                                       f_list backup
+                                               fi
+                                       elif [ "${adb_backup}" -eq 1 ] && [ "${adb_action}" != "start" ]
                                        then
+                                               f_log "info" "archive preparation of '${src_name}' failed, categories: ${src_cat:-"-"}, entries: ${src_entries}, rc: ${src_rc}"
                                                f_list restore
+                                               rm -f "${src_tmpfile}"
                                        fi
-                               elif [ "${adb_action}" != "start" ]
+                               elif [ "${adb_backup}" -eq 1 ] && [ "${adb_action}" != "start" ]
                                then
+                                       f_log "info" "archive extraction of '${src_name}' failed, categories: ${src_cat:-"-"}, entries: ${src_entries}, rc: ${src_rc}"
                                        f_list restore
                                fi
                        )&
+                       continue
                else
                        (
                                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}" "${src_tmpload}" 2>/dev/null > "${src_tmpfile}"
+                                       if [ -s "${adb_tmpdir}/tmp.rem.whitelist" ]
+                                       then
+                                               "${adb_awk}" "${src_rset}" "${src_tmpload}" | \
+                                               grep -Evf "${adb_tmpdir}/tmp.rem.whitelist" | \
+                                               "${adb_awk}" 'BEGIN{FS="."}{for(f=NF;f>1;f--)printf "%s.",$f;print $1}' > "${src_tmpsort}"
+                                       else
+                                               "${adb_awk}" "${src_rset}" "${src_tmpload}" | \
+                                               "${adb_awk}" 'BEGIN{FS="."}{for(f=NF;f>1;f--)printf "%s.",$f;print $1}' > "${src_tmpsort}"
+                                       fi
+                                       rm -f "${src_tmpload}"
+                                       sort ${adb_srtopts} -u "${src_tmpsort}" 2>/dev/null > "${src_tmpfile}"
                                        src_rc="${?}"
+                                       rm -f "${src_tmpsort}"
                                        if [ "${src_rc}" -eq 0 ] && [ -s "${src_tmpfile}" ]
                                        then
-                                               rm -f "${src_tmpload}"
                                                f_list download
-                                               f_list backup
-                                       elif [ "${adb_action}" != "start" ]
+                                               if [ "${adb_backup}" -eq 1 ]
+                                               then
+                                                       f_list backup
+                                               fi
+                                       elif [ "${adb_backup}" -eq 1 ] && [ "${adb_action}" != "start" ]
                                        then
+                                               f_log "info" "preparation of '${src_name}' failed, rc: ${src_rc}"
                                                f_list restore
+                                               rm -f "${src_tmpfile}"
                                        fi
                                else
-                                       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" ]
+                                       src_log="$(printf "%s" "${src_log}" | "${adb_awk}" '{ORS=" ";print $0}')"
+                                       f_log "info" "download of '${src_name}' failed, url: ${src_url}, rule: ${src_rset:-"-"}, categories: ${src_cat:-"-"}, rc: ${src_rc}, log: ${src_log:-"-"}"
+                                       if [ "${adb_backup}" -eq 1 ] && [ "${adb_action}" != "start" ]
                                        then
                                                f_list restore
                                        fi
@@ -1087,7 +1345,6 @@ f_main()
                cnt=$((cnt+1))
        done
        wait
-       unset src_name
        f_list merge
 
        # tld compression and dns restart
@@ -1097,23 +1354,26 @@ f_main()
                f_tld "${adb_tmpdir}/${adb_dnsfile}"
                f_list final
        else
-               > "${adb_dnsdir}/${adb_dnsfile}"
+               printf "${adb_dnsheader}" > "${adb_dnsdir}/${adb_dnsfile}"
        fi
        chown "${adb_dnsuser}" "${adb_dnsdir}/${adb_dnsfile}" 2>/dev/null
        f_dnsup
        if [ "${?}" -eq 0 ]
        then
-               f_jsnup "enabled"
-               if [ "${adb_dnsfilereset}" = "true" ]
+               if [ "${adb_action}" != "resume" ]
+               then
+                       f_jsnup "enabled"
+               fi
+               if [ "${adb_dns}" != "raw" ] && [ "${adb_dnsfilereset}" -eq 1 ]
                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})"
+                       printf "${adb_dnsheader}" > "${adb_dnsdir}/${adb_dnsfile}"
+                       f_log "info" "blocklist with overall ${adb_cnt} blocked 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})"
+                       f_log "info" "blocklist with overall ${adb_cnt} blocked domains loaded successfully (${adb_sysver})"
                fi
        else
-               f_log "err" "dns backend restart with active blocklist failed"
+               f_log "err" "dns backend restart with adblock blocklist failed"
        fi
        f_rmtemp
 }
@@ -1122,19 +1382,19 @@ f_main()
 #
 f_report()
 {
-       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}"
+       local iface bg_pid status total start end blocked percent top_list top array item index hold ports cnt=0 search="${1}" count="${2}" process="${3}" print="${4}"
 
-       if [ "${adb_report}" -eq 1 ] && [ ! -x "${adb_reputil}" ]
+       if [ "${adb_report}" -eq 1 ] && [ ! -x "${adb_dumpcmd}" ]
        then
-               f_log "info" "Please install the package 'tcpdump' or 'tcpdump-mini' to use the adblock reporting feature!"
+               f_log "info" "Please install the package 'tcpdump' or 'tcpdump-mini' to use the reporting feature"
        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!"
+               f_log "info" "Please enable the 'DNS Report' option to use the reporting feature"
        fi
 
-       if [ -x "${adb_reputil}" ]
+       if [ -x "${adb_dumpcmd}" ]
        then
-               bg_pid="$(pgrep -f "^${adb_reputil}.*adb_report\\.pcap$" | awk '{ORS=" "; print $1}')"
+               bg_pid="$(pgrep -f "^${adb_dumpcmd}.*adb_report\\.pcap$" | "${adb_awk}" '{ORS=" "; print $1}')"
                if [ "${adb_report}" -eq 0 ] || { [ -n "${bg_pid}" ] && { [ "${adb_action}" = "stop" ] || [ "${adb_action}" = "restart" ]; } }
                then
                        if [ -n "${bg_pid}" ]
@@ -1149,7 +1409,7 @@ f_report()
                fi
        fi
 
-       if [ -x "${adb_reputil}" ] && [ "${adb_report}" -eq 1 ]
+       if [ -x "${adb_dumpcmd}" ] && [ "${adb_report}" -eq 1 ]
        then
                if [ -z "${bg_pid}" ] && [ "${adb_action}" != "report" ] && [ "${adb_action}" != "stop" ]
                then
@@ -1162,19 +1422,47 @@ 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}')"
+                       if [ -z "${adb_repiface}" ]
+                       then
+                               network_get_device iface "lan"
+                               if [ -n "${iface}" ]
+                               then
+                                       adb_repiface="${iface}"
+                               else
+                                       network_get_physdev iface "lan"
+                                       if [ -n "${iface}" ]
+                                       then
+                                               adb_repiface="${iface}"
+                                       fi
+                               fi
+                               if [ -n "${adb_repiface}" ]
+                               then
+                                       uci_set adblock global adb_repiface "${adb_repiface}"
+                                       f_uci "adblock"
+                               fi
+                       fi
+                       if [ -n "${adb_reportdir}" ] && [ ! -d "${adb_reportdir}" ]
+                       then
+                               mkdir -p "${adb_reportdir}"
+                               f_log "info" "report directory '${adb_reportdir}' created"
+                       fi
+                       if [ -n "${adb_repiface}" ] && [ -d "${adb_reportdir}" ]
+                       then
+                               ( "${adb_dumpcmd}" -nn -s0 -l -i ${adb_repiface} ${ports} -C${adb_repchunksize} -W${adb_repchunkcnt} -w "${adb_reportdir}/adb_report.pcap" >/dev/null 2>&1 & )
+                               bg_pid="$(pgrep -f "^${adb_dumpcmd}.*adb_report\\.pcap$" | "${adb_awk}" '{ORS=" "; print $1}')"
+                       else
+                               f_log "info" "Please set the name of the reporting network device 'adb_repiface' manually"
+                       fi
                fi
 
-               if [ "${adb_action}" = "report" ] && [ "${filter}" = "false" ]
+               if [ "${adb_action}" = "report" ] && [ "${process}" = "true" ]
                then
-                       > "${adb_repdir}/adb_report.raw"
-                       for file in "${adb_repdir}/adb_report.pcap"*
+                       > "${adb_reportdir}/adb_report.raw"
+                       for file in "${adb_reportdir}/adb_report.pcap"*
                        do
                                (
-                                       "${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"
+                                       "${adb_dumpcmd}" -tttt -r "${file}" 2>/dev/null | \
+                                               "${adb_awk}" -v cnt="${cnt}" '!/\.lan\. |PTR\? | SOA\? /&&/ 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",d,e,a,b,c}' >> "${adb_reportdir}/adb_report.raw"
                                )&
                                hold=$((cnt%adb_maxqueue))
                                if [ "${hold}" -eq 0 ]
@@ -1184,85 +1472,62 @@ f_report()
                                cnt=$((cnt+1))
                        done
                        wait
-
-                       if [ -s "${adb_repdir}/adb_report.raw" ]
+                       if [ -s "${adb_reportdir}/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 -T "${adb_sorttmpdir}" -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 -T "${adb_sorttmpdir}" -ur > "${adb_repdir}/adb_report"
+                               sort ${adb_srtopts} -k 3 -k 4 -k 5 -k 1 -ur "${adb_reportdir}/adb_report.raw" | \
+                                       "${adb_awk}" '{currA=($1+0);currB=$1;currC=substr($1,length($1),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}}' > "${adb_reportdir}/adb_report.srt"
                        fi
 
-                       if [ -s "${adb_repdir}/adb_report" ]
+                       if [ -s "${adb_reportdir}/adb_report.srt" ]
                        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 -T "${adb_sorttmpdir}" | uniq -c | sort -T "${adb_sorttmpdir}" -r | awk '{ORS=" ";if(NR<=10) printf("%s_%s ",$1,$2)}')"
-                               rep_domains="$(awk '{if($5!="NX")print $4}' "${adb_repdir}/adb_report" | sort -T "${adb_sorttmpdir}" | uniq -c | sort -T "${adb_sorttmpdir}" -r | awk '{ORS=" ";if(NR<=10)printf("%s_%s ",$1,$2)}')"
-                               rep_blocked="$(awk '{if($5=="NX")print $4}' "${adb_repdir}/adb_report" | sort -T "${adb_sorttmpdir}" | uniq -c | sort -T "${adb_sorttmpdir}" -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 "total" "${total}"
-                               json_add_string "blocked" "${blocked}"
-                               json_add_string "percent" "${percent}"
-                               json_close_array
-                               json_add_array "top_clients"
-                               for client in ${rep_clients}
-                               do
-                                       json_add_object
-                                       json_add_string "count" "${client%%_*}"
-                                       json_add_string "address" "${client#*_}"
-                                       json_close_object
-                               done
-                               json_close_array
-                               json_add_array "top_domains"
-                               for domain in ${rep_domains}
+                               start="$("${adb_awk}" 'END{printf "%s_%s",$1,$2}' "${adb_reportdir}/adb_report.srt")"
+                               end="$("${adb_awk}" 'NR==1{printf "%s_%s",$1,$2}' "${adb_reportdir}/adb_report.srt")"
+                               total="$(wc -l < "${adb_reportdir}/adb_report.srt")"
+                               blocked="$("${adb_awk}" '{if($5=="NX")cnt++}END{printf "%s",cnt}' "${adb_reportdir}/adb_report.srt")"
+                               percent="$("${adb_awk}" -v t="${total}" -v b="${blocked}" 'BEGIN{printf "%.2f%s",b/t*100,"%"}')"
+                               > "${adb_reportdir}/adb_report.json"
+                               printf "%s" "{ \"data\": { " >> "${adb_reportdir}/adb_report.json"
+                               printf "%s" "\"start_date\": \"${start%_*}\", " >> "${adb_reportdir}/adb_report.json"
+                               printf "%s" "\"start_time\": \"${start#*_}\", " >> "${adb_reportdir}/adb_report.json"
+                               printf "%s" "\"end_date\": \"${end%_*}\", " >> "${adb_reportdir}/adb_report.json"
+                               printf "%s" "\"end_time\": \"${end#*_}\", " >> "${adb_reportdir}/adb_report.json"
+                               printf "%s" "\"total\": \"${total}\", " >> "${adb_reportdir}/adb_report.json"
+                               printf "%s" "\"blocked\": \"${blocked}\", " >> "${adb_reportdir}/adb_report.json"
+                               printf "%s" "\"percent\": \"${percent}\", " >> "${adb_reportdir}/adb_report.json"
+
+                               top_list="top_clients top_domains top_blocked"
+                               for top in ${top_list}
                                do
-                                       json_add_object
-                                       json_add_string "count" "${domain%%_*}"
-                                       json_add_string "address" "${domain#*_}"
-                                       json_close_object
+                                       printf "%s" " \"${top}\": [ " >> "${adb_reportdir}/adb_report.json"
+                                       case "${top}" in
+                                               "top_clients")
+                                                       "${adb_awk}" '{print $3}' "${adb_reportdir}/adb_report.srt" | sort ${adb_srtopts} | uniq -c | \
+                                                               sort ${adb_srtopts} -nr | "${adb_awk}" '{ORS=" ";if(NR==1)printf "\{ \"count\": \"%s\", \"address\": \"%s\" }",$1,$2; else if(NR<10)printf ", \{ \"count\": \"%s\", \"address\": \"%s\" }",$1,$2}' >> "${adb_reportdir}/adb_report.json"
+                                               ;;
+                                               "top_domains")
+                                                       "${adb_awk}" '{if($5!="NX")print $4}' "${adb_reportdir}/adb_report.srt" | sort ${adb_srtopts} | uniq -c | \
+                                                               sort ${adb_srtopts} -nr | "${adb_awk}" '{ORS=" ";if(NR==1)printf "\{ \"count\": \"%s\", \"address\": \"%s\" }",$1,$2; else if(NR<10)printf ", \{ \"count\": \"%s\", \"address\": \"%s\" }",$1,$2}' >> "${adb_reportdir}/adb_report.json"
+                                               ;;
+                                               "top_blocked")
+                                                       "${adb_awk}" '{if($5=="NX")print $4}' "${adb_reportdir}/adb_report.srt" | sort ${adb_srtopts} | uniq -c | \
+                                                               sort ${adb_srtopts} -nr | "${adb_awk}" '{ORS=" ";if(NR==1)printf "\{ \"count\": \"%s\", \"address\": \"%s\" }",$1,$2; else if(NR<10)printf ", \{ \"count\": \"%s\", \"address\": \"%s\" }",$1,$2}' >> "${adb_reportdir}/adb_report.json"
+                                               ;;
+                                       esac
+                                       printf "%s" " ], " >> "${adb_reportdir}/adb_report.json"
                                done
-                               json_close_array
-                               json_add_array "top_blocked"
-                               for block in ${rep_blocked}
-                               do
-                                       json_add_object
-                                       json_add_string "count" "${block%%_*}"
-                                       json_add_string "address" "${block#*_}"
-                                       json_close_object
-                               done
-                               json_close_object
-                               json_dump > "${adb_repdir}/adb_report.json"
-                       fi
-                       rm -f "${adb_repdir}/adb_report.raw"
-               fi
-
-               if [ -s "${adb_repdir}/adb_report" ]
-               then
-                       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"
-                       if [ ! -s "${adb_repdir}/adb_report.final" ]
-                       then
-                               printf "%s\\t%s\\t%s\\t%s\\t%s\\n" "-" "-" "-" "-" "-" > "${adb_repdir}/adb_report.final"
+                               search="${search//./\\.}"
+                               search="${search//[+*~%\$&\"\' ]/}"
+                               "${adb_awk}" "BEGIN{i=0;printf \"%s\",\"\\\"requests\\\": [ \" }/(${search})/{i++;if(i==1)printf \"\{ \\\"date\\\": \\\"%s\\\", \\\"time\\\": \\\"%s\\\", \\\"client\\\": \\\"%s\\\", \\\"domain\\\": \\\"%s\\\", \\\"rc\\\": \\\"%s\\\" }\",\$1,\$2,\$3,\$4,\$5;else if(i<=${count})printf \", { \\\"date\\\": \\\"%s\\\", \\\"time\\\": \\\"%s\\\", \\\"client\\\": \\\"%s\\\", \\\"domain\\\": \\\"%s\\\", \\\"rc\\\": \\\"%s\\\" }\",\$1,\$2,\$3,\$4,\$5}END{printf \"%s\" \" \] } }\n\"}" "${adb_reportdir}/adb_report.srt" >> "${adb_reportdir}/adb_report.json"
                        fi
+                       rm -f "${adb_reportdir}/adb_report.raw" "${adb_reportdir}/adb_report.srt"
                fi
 
-               if [ "${print}" = "true" ]
+               if [ -s "${adb_reportdir}/adb_report.json" ]
                then
-                       if [ -s "${adb_repdir}/adb_report.json" ]
+                       if [ "${print}" = "cli" ]
                        then
                                printf "%s\\n%s\\n%s\\n" ":::" "::: Adblock DNS-Query Report" ":::"
-                               json_load_file "${adb_repdir}/adb_report.json"
+                               json_load_file "${adb_reportdir}/adb_report.json"
                                json_select "data"
                                json_get_keys keylist
                                for key in ${keylist}
@@ -1272,64 +1537,70 @@ f_report()
                                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})"
-                               json_select ".."
-                               if json_get_type status "top_clients" && [ "${status}" = "array" ]
-                               then
-                                       printf "%s\\n%s\\n%s\\n" ":::" "::: Top 10 Clients" ":::"
-                                       json_select "top_clients"
-                                       index=1
-                                       while json_get_type status "${index}" && [ "${status}" = "object" ]
-                                       do
-                                               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" ]
-                               then
-                                       printf "%s\\n%s\\n%s\\n" ":::" "::: Top 10 Domains" ":::"
-                                       json_select "top_domains"
-                                       index=1
-                                       while json_get_type status "${index}" && [ "${status}" = "object" ]
-                                       do
-                                               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" ]
-                               then
-                                       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" ]
-                                       do
-                                               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"
-                                       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" ":::"
+
+                               top_list="top_clients top_domains top_blocked requests"
+                               for top in ${top_list}
+                               do
+                                       case "${top}" in
+                                               "top_clients")
+                                                       item="::: Top 10 Clients"
+                                               ;;
+                                               "top_domains")
+                                                       item="::: Top 10 Domains"
+                                               ;;
+                                               "top_blocked")
+                                                       item="::: Top 10 Blocked Domains"
+                                               ;;
+                                       esac
+                                       if json_get_type status "${top}" && [ "${top}" != "requests" ] && [ "${status}" = "array" ]
+                                       then
+                                               printf "%s\\n%s\\n%s\\n" ":::" "${item}" ":::"
+                                               json_select "${top}"
+                                               index=1
+                                               while json_get_type status "${index}" && [ "${status}" = "object" ]
+                                               do
+                                                       json_get_values item "${index}"
+                                                       printf "  + %-9s::: %s\\n" ${item}
+                                                       index=$((index+1))
+                                               done
+                                       elif json_get_type status "${top}" && [ "${top}" = "requests" ] && [ "${status}" = "array" ]
+                                       then
+                                               printf "%s\\n%s\\n%s\\n" ":::" "::: Latest DNS Queries" ":::"
+                                               printf "%-15s%-15s%-45s%-50s%s\\n" "Date" "Time" "Client" "Domain" "Answer"
+                                               json_select "${top}"
+                                               index=1
+                                               while json_get_type status "${index}" && [ "${status}" = "object" ]
+                                               do
+                                                       json_get_values item "${index}"
+                                                       printf "%-15s%-15s%-45s%-50s%s\\n" ${item}
+                                                       index=$((index+1))
+                                               done
+                                       fi
+                                       json_select ".."
+                               done
+                       elif [ "${print}" = "json" ]
+                       then
+                               cat "${adb_reportdir}/adb_report.json"
                        fi
                fi
        fi
-       f_log "debug" "f_report ::: action: ${adb_action}, report: ${adb_report}, search: ${1}, count: ${2}, filter: ${3}, print: ${4}, reputil: ${adb_reputil}, repdir: ${adb_repdir}, repiface: ${adb_repiface}, replisten: ${adb_replisten}, repchunksize: ${adb_repchunksize}, repchunkcnt: ${adb_repchunkcnt}, bg_pid: ${bg_pid}"
+       f_log "debug" "f_report ::: action: ${adb_action}, report: ${adb_report}, search: ${1}, count: ${2}, process: ${3}, print: ${4}, dump_util: ${adb_dumpcmd}, repdir: ${adb_reportdir}, repiface: ${adb_repiface:-"-"}, replisten: ${adb_replisten}, repchunksize: ${adb_repchunksize}, repchunkcnt: ${adb_repchunkcnt}, bg_pid: ${bg_pid}"
 }
 
+# awk selection
+#
+adb_awk="$(command -v gawk)"
+if [ -z "${adb_awk}" ]
+then
+       adb_awk="$(command -v awk)"
+fi
+
 # source required system libraries
 #
-if [ -r "/lib/functions.sh" ] && [ -r "/usr/share/libubox/jshn.sh" ]
+if [ -r "/lib/functions.sh" ] && [ -r "/lib/functions/network.sh" ] && [ -r "/usr/share/libubox/jshn.sh" ]
 then
        . "/lib/functions.sh"
+       . "/lib/functions/network.sh"
        . "/usr/share/libubox/jshn.sh"
 else
        f_log "err" "system libraries not found"
@@ -1352,10 +1623,16 @@ case "${adb_action}" in
                f_main
        ;;
        "suspend")
-               f_switch suspend
+               if [ "${adb_dns}" != "raw" ]
+               then
+                       f_switch suspend
+               fi
        ;;
        "resume")
-               f_switch resume
+               if [ "${adb_dns}" != "raw" ]
+               then
+                       f_switch resume
+               fi
        ;;
        "report")
                f_report "${2}" "${3}" "${4}" "${5}"
diff --git a/net/adblock/files/adblock.sources b/net/adblock/files/adblock.sources
new file mode 100644 (file)
index 0000000..c012638
--- /dev/null
@@ -0,0 +1,294 @@
+{
+       "adaway": {
+               "url": "https://raw.githubusercontent.com/AdAway/adaway.github.io/master/hosts.txt",
+               "rule": "/^127\\.0\\.0\\.1[[:space:]]+([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}",
+               "size": "S",
+               "focus": "mobile",
+               "descurl": "https://github.com/AdAway/adaway.github.io"
+       },
+       "adguard": {
+               "url": "https://filters.adtidy.org/windows/filters/15.txt",
+               "rule": "BEGIN{FS=\"[\/|^|\\r]\"}/^\\|\\|([[:alnum:]_-]+\\.)+[[:alpha:]]+[\\/\\^\\r]+$/{print tolower($3)}",
+               "size": "L",
+               "focus": "general",
+               "descurl": "https://adguard.com"
+       },
+       "andryou": {
+               "url": "https://gitlab.com/andryou/block/raw/master/kouhai-compressed-domains",
+               "rule": "/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
+               "size": "L",
+               "focus": "compilation",
+               "descurl": "https://gitlab.com/andryou/block/-/blob/master/readme.md"
+       },
+       "anudeep": {
+               "url": "https://raw.githubusercontent.com/anudeepND/blacklist/master/adservers.txt",
+               "rule": "/^0\\.0\\.0\\.0[[:space:]]+([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}",
+               "size": "M",
+               "focus": "compilation",
+               "descurl": "https://github.com/anudeepND/blacklist"
+       },
+       "bitcoin": {
+               "url": "https://raw.githubusercontent.com/hoshsadiq/adblock-nocoin-list/master/hosts.txt",
+               "rule": "/^0\\.0\\.0\\.0[[:space:]]+([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}",
+               "size": "S",
+               "focus": "mining",
+               "descurl": "https://github.com/hoshsadiq/adblock-nocoin-list"
+       },
+       "disconnect": {
+               "url": "https://s3.amazonaws.com/lists.disconnect.me/simple_malvertising.txt",
+               "rule": "/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
+               "size": "S",
+               "focus": "general",
+               "descurl": "https://disconnect.me"
+       },
+       "dshield": {
+               "url": "https://www.dshield.org/feeds/suspiciousdomains_Low.txt",
+               "rule": "/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
+               "size": "XL",
+               "focus": "general",
+               "descurl": "https://www.dshield.org"
+       },
+       "energized_blugo": {
+               "url": "https://raw.githubusercontent.com/EnergizedProtection/block/master/bluGo/formats/domains.txt",
+               "rule": "/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
+               "size": "XL",
+               "focus": "compilation",
+               "descurl": "https://github.com/EnergizedProtection/block"
+       },
+       "energized_blu": {
+               "url": "https://raw.githubusercontent.com/EnergizedProtection/block/master/blu/formats/domains.txt",
+               "rule": "/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
+               "size": "XL",
+               "focus": "compilation",
+               "descurl": "https://github.com/EnergizedProtection/block"
+       },
+       "energized_porn": {
+               "url": "https://raw.githubusercontent.com/EnergizedProtection/block/master/porn/formats/domains.txt",
+               "rule": "/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
+               "size": "XXL",
+               "focus": "compilation+porn",
+               "descurl": "https://github.com/EnergizedProtection/block"
+       },
+       "energized_unified": {
+               "url": "https://raw.githubusercontent.com/EnergizedProtection/block/master/unified/formats/domains.txt",
+               "rule": "/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
+               "size": "XXL",
+               "focus": "compilation",
+               "descurl": "https://github.com/EnergizedProtection/block"
+       },
+       "malwaredomains": {
+               "url": "http://mirror.espoch.edu.ec/malwaredomains/justdomains",
+               "rule": "/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
+               "size": "M",
+               "focus": "malware",
+               "descurl": "https://www.malwaredomains.com"
+       },
+       "malwarelist": {
+               "url": "https://www.malwaredomainlist.com/hostslist/hosts.txt",
+               "rule": "/^127\\.0\\.0\\.1[[:space:]]+([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}",
+               "size": "S",
+               "focus": "malware",
+               "descurl": "https://www.malwaredomainlist.com"
+       },
+       "notracking": {
+               "url": "https://raw.githubusercontent.com/notracking/hosts-blocklists/master/dnscrypt-proxy/dnscrypt-proxy.blacklist.txt",
+               "rule": "/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
+               "size": "XL",
+               "focus": "tracking",
+               "descurl": "https://github.com/notracking/hosts-blocklists"
+       },
+       "oisd_nl": {
+               "url": "https://dbl.oisd.nl",
+               "rule": "/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
+               "size": "XXL",
+               "focus": "general",
+               "descurl": "https://oisd.nl"
+       },
+       "openphish": {
+               "url": "https://openphish.com/feed.txt",
+               "rule": "BEGIN{FS=\"\/\"}/^http[s]?:\\/\\/([[:alnum:]_-]+\\.)+[[:alpha:]]+(\\/|$)/{print tolower($3)}",
+               "size": "S",
+               "focus": "phishing",
+               "descurl": "https://openphish.com"
+       },
+       "phishing_army": {
+               "url": "https://phishing.army/download/phishing_army_blocklist_extended.txt",
+               "rule": "/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
+               "size": "S",
+               "focus": "phishing",
+               "descurl": "https://phishing.army"
+       },
+       "reg_cn": {
+               "url": "https://easylist-downloads.adblockplus.org/easylistchina+easylist.txt",
+               "rule": "BEGIN{FS=\"[|^]\"}/^\\|\\|([[:alnum:]_-]+\\.)+[[:alpha:]]+\\^(\\$third-party)?$/{print tolower($3)}",
+               "size": "M",
+               "focus": "reg_china",
+               "descurl": "https://easylist.to"
+       },
+       "reg_de": {
+               "url": "https://easylist-downloads.adblockplus.org/easylistgermany+easylist.txt",
+               "rule": "BEGIN{FS=\"[|^]\"}/^\\|\\|([[:alnum:]_-]+\\.)+[[:alpha:]]+\\^(\\$third-party)?$/{print tolower($3)}",
+               "size": "M",
+               "focus": "reg_germany",
+               "descurl": "https://easylist.to"
+       },
+       "reg_es": {
+               "url": "https://easylist-downloads.adblockplus.org/easylistspanish+easylist.txt",
+               "rule": "BEGIN{FS=\"[|^]\"}/^\\|\\|([[:alnum:]_-]+\\.)+[[:alpha:]]+\\^(\\$third-party)?$/{print tolower($3)}",
+               "size": "M",
+               "focus": "reg_spain",
+               "descurl": "https://easylist.to"
+       },
+       "reg_fi": {
+               "url": "https://raw.githubusercontent.com/finnish-easylist-addition/finnish-easylist-addition/master/Finland_adb.txt",
+               "rule": "BEGIN{FS=\"[|^]\"}/^\\|\\|([[:alnum:]_-]+\\.)+[[:alpha:]]+\\^(\\$third-party)?$/{print tolower($3)}",
+               "size": "S",
+               "focus": "reg_finland",
+               "descurl": "https://github.com/finnish-easylist-addition"
+       },
+       "reg_id": {
+               "url": "https://easylist-downloads.adblockplus.org/abpindo+easylist.txt",
+               "rule": "BEGIN{FS=\"[|^]\"}/^\\|\\|([[:alnum:]_-]+\\.)+[[:alpha:]]+\\^(\\$third-party)?$/{print tolower($3)}",
+               "size": "M",
+               "focus": "reg_indonesia",
+               "descurl": "https://easylist.to"
+       },
+       "reg_nl": {
+               "url": "https://easylist-downloads.adblockplus.org/easylistdutch+easylist.txt",
+               "rule": "BEGIN{FS=\"[|^]\"}/^\\|\\|([[:alnum:]_-]+\\.)+[[:alpha:]]+\\^(\\$third-party)?$/{print tolower($3)}",
+               "size": "M",
+               "focus": "reg_netherlands",
+               "descurl": "https://easylist.to"
+       },
+       "reg_pl": {
+               "url": "http://adblocklist.org/adblock-pxf-polish.txt",
+               "rule": "BEGIN{FS=\"[|^]\"}/^\\|\\|([[:alnum:]_-]+\\.)+[[:alpha:]]+\\^(\\$third-party)?$/{print tolower($3)}",
+               "size": "S",
+               "focus": "reg_poland",
+               "descurl": "http://adblocklist.org"
+       },
+       "reg_ro": {
+               "url": "https://easylist-downloads.adblockplus.org/rolist+easylist.txt",
+               "rule": "BEGIN{FS=\"[|^]\"}/^\\|\\|([[:alnum:]_-]+\\.)+[[:alpha:]]+\\^(\\$third-party)?$/{print tolower($3)}",
+               "size": "M",
+               "focus": "reg_romania",
+               "descurl": "https://easylist.to"
+       },
+       "reg_ru": {
+               "url": "https://easylist-downloads.adblockplus.org/ruadlist+easylist.txt",
+               "rule": "BEGIN{FS=\"[|^]\"}/^\\|\\|([[:alnum:]_-]+\\.)+[[:alpha:]]+\\^(\\$third-party)?$/{print tolower($3)}",
+               "size": "M",
+               "focus": "reg_russia",
+               "descurl": "https://easylist.to"
+       },
+       "shallalist": {
+               "url": "https://www.shallalist.de/Downloads/shallalist.tar.gz",
+               "rule": "/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
+               "categories": [
+                               "adv", "costtraps", "spyware", "tracker", "warez"
+               ],
+               "size": "L",
+               "focus": "general",
+               "descurl": "https://www.shallalist.de"
+       },
+       "shallalist_porn": {
+               "url": "https://www.shallalist.de/Downloads/shallalist.tar.gz",
+               "rule": "/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
+               "categories": [
+                               "adv", "costtraps", "porn", "spyware", "tracker", "warez"
+               ],
+               "size": "XXL",
+               "focus": "general+porn",
+               "descurl": "https://www.shallalist.de"
+       },
+       "smarttv": {
+               "url": "https://raw.githubusercontent.com/Perflyst/PiHoleBlocklist/master/SmartTV.txt",
+               "rule": "/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
+               "size": "S",
+               "focus": "smarttv",
+               "descurl": "https://github.com/Perflyst/PiHoleBlocklist"
+       },
+       "spam404": {
+               "url": "https://raw.githubusercontent.com/Dawsey21/Lists/master/main-blacklist.txt",
+               "rule": "/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
+               "size": "S",
+               "focus": "general",
+               "descurl": "https://github.com/Dawsey21"
+       },
+       "stevenblack": {
+               "url": "https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn-social/hosts",
+               "rule": "/^0\\.0\\.0\\.0[[:space:]]+([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}",
+               "size": "L",
+               "focus": "compilation",
+               "descurl": "https://github.com/StevenBlack/hosts"
+       },
+       "stopforumspam": {
+               "url": "https://www.stopforumspam.com/downloads/toxic_domains_whole.txt",
+               "rule": "/^[[:space:]]*([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
+               "size": "S",
+               "focus": "spam",
+               "descurl": "https://www.stopforumspam.com"
+       },
+       "sysctl": {
+               "url": "http://sysctl.org/cameleon/hosts",
+               "rule": "/^127\\.0\\.0\\.1[[:space:]]+([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}",
+               "size": "M",
+               "focus": "general",
+               "descurl": "http://sysctl.org/cameleon"
+       },
+       "utcapitole": {
+               "url": "https://dsi.ut-capitole.fr/blacklists/download/blacklists.tar.gz",
+               "rule": "/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
+               "categories": [
+                               "publicite", "bitcoin", "cryptojacking", "ddos", "malware", "phishing", "warez"
+               ],
+               "size": "L",
+               "focus": "general",
+               "descurl": "https://dsi.ut-capitole.fr/blacklists/index_en.php"
+       },
+       "utcapitole_porn": {
+               "url": "https://dsi.ut-capitole.fr/blacklists/download/blacklists.tar.gz",
+               "rule": "/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
+               "categories": [
+                               "adult", "publicite", "bitcoin", "cryptojacking", "ddos", "malware", "phishing", "warez"
+               ],
+               "size": "XXL",
+               "focus": "general+porn",
+               "descurl": "https://dsi.ut-capitole.fr/blacklists/index_en.php"
+       },
+       "whocares": {
+               "url": "https://someonewhocares.org/hosts/hosts",
+               "rule": "/^127\\.0\\.0\\.1[[:space:]]+([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}",
+               "size": "M",
+               "focus": "general",
+               "descurl": "https://someonewhocares.org"
+       },
+       "winhelp": {
+               "url": "http://winhelp2002.mvps.org/hosts.txt",
+               "rule": "/^0\\.0\\.0\\.0[[:space:]]+([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}",
+               "size": "S",
+               "focus": "general",
+               "descurl": "http://winhelp2002.mvps.org"
+       },
+       "winspy": {
+               "url": "https://raw.githubusercontent.com/crazy-max/WindowsSpyBlocker/master/data/hosts/spy.txt",
+               "rule": "/^0\\.0\\.0\\.0[[:space:]]+([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}",
+               "size": "S",
+               "focus": "win_telemetry",
+               "descurl": "https://github.com/crazy-max/WindowsSpyBlocker"
+       },
+       "youtube": {
+               "url": "https://raw.githubusercontent.com/kboghdady/youTube_ads_4_pi-hole/master/black.list",
+               "rule": "/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
+               "size": "M",
+               "focus": "youtube",
+               "descurl": "https://github.com/kboghdady/youTube_ads_4_pi-hole"
+       },
+       "yoyo": {
+               "url": "https://pgl.yoyo.org/adservers/serverlist.php?hostformat=nohtml&showintro=0&mimetype=plaintext",
+               "rule": "/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
+               "size": "S",
+               "focus": "general",
+               "descurl": "https://pgl.yoyo.org"
+       }
+}
index 6fcb2cc615fa3f5d37d1a64866a02f78ff341981..4547002a93bffd1511840ab29c8e30483ea7b664 100644 (file)
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=apache
-PKG_VERSION:=2.4.41
-PKG_RELEASE:=6
+PKG_VERSION:=2.4.43
+PKG_RELEASE:=1
 PKG_SOURCE_NAME:=httpd
 
 PKG_SOURCE:=$(PKG_SOURCE_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=@APACHE/httpd/
-PKG_HASH:=133d48298fe5315ae9366a0ec66282fa4040efa5d566174481077ade7d18ea40
+PKG_HASH:=a497652ab3fc81318cdc2a203090a999150d86461acff97c1065dc910fe10f43
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_NAME)-$(PKG_VERSION)
 
@@ -271,11 +271,6 @@ CONFIGURE_VARS += \
        ac_cv_gettid=yes \
        ap_cv_void_ptr_lt_long=no
 
-define Build/Prepare
-       $(call Build/Prepare/Default)
-       $(INSTALL_DATA) ./files/openwrt.layout $(PKG_BUILD_DIR)/config.layout
-endef
-
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/bin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/apxs $(1)/usr/bin
@@ -286,8 +281,6 @@ define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/share/apache2/build
        $(CP) $(PKG_INSTALL_DIR)/usr/share/apache2/build/* \
                                $(1)/usr/share/apache2/build
-       $(SED) 's%/usr/share/apache2/build%$(STAGING_DIR)/usr/share/apache2/build%' \
-               $(1)/usr/bin/apxs
        $(SED) 's%^prefix =.*%prefix = $(STAGING_DIR)/usr%' \
                $(1)/usr/share/apache2/build/config_vars.mk
 endef
diff --git a/net/apache/files/openwrt.layout b/net/apache/files/openwrt.layout
deleted file mode 100644 (file)
index 844c4f6..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-
-<Layout OpenWrt>
-    prefix:          /usr
-    exec_prefix:     ${prefix}
-    bindir:          ${prefix}/bin
-    sbindir:         ${prefix}/sbin
-    libdir:          ${prefix}/lib
-    libexecdir:      ${prefix}/lib+
-    mandir:          ${prefix}/share/man
-    sysconfdir:      /etc+
-    datadir:         ${prefix}/share+
-    installbuilddir: ${datadir}/build
-    errordir:        ${datadir}/error
-    iconsdir:        ${datadir}/icons
-    htdocsdir:       ${datadir}/htdocs
-    manualdir:       /usr/share/doc/apache2/manual
-    cgidir:          ${datadir}/cgi-bin
-    includedir:      ${prefix}/include+
-    localstatedir:   /var
-    runtimedir:      ${localstatedir}/run+
-    logfiledir:      ${localstatedir}/log+
-    proxycachedir:   ${localstatedir}/cache/apache2
-</Layout>
-
diff --git a/net/apache/patches/020-openssl-deprecated.patch b/net/apache/patches/020-openssl-deprecated.patch
deleted file mode 100644 (file)
index e583cde..0000000
+++ /dev/null
@@ -1,177 +0,0 @@
---- a/modules/ssl/mod_ssl.c
-+++ b/modules/ssl/mod_ssl.c
-@@ -328,6 +328,7 @@ static int modssl_is_prelinked(void)
- static apr_status_t ssl_cleanup_pre_config(void *data)
- {
-+#if MODSSL_USE_OPENSSL_PRE_1_1_API
-     /*
-      * Try to kill the internals of the SSL library.
-      */
-@@ -343,11 +344,9 @@ static apr_status_t ssl_cleanup_pre_config(void *data)
- #if OPENSSL_VERSION_NUMBER >= 0x1000200fL
- #ifndef OPENSSL_NO_COMP
-     SSL_COMP_free_compression_methods();
--#endif
- #endif
-     /* Usually needed per thread, but this parent process is single-threaded */
--#if MODSSL_USE_OPENSSL_PRE_1_1_API
- #if OPENSSL_VERSION_NUMBER >= 0x1000000fL
-     ERR_remove_thread_state(NULL);
- #else
-@@ -376,6 +375,7 @@ static apr_status_t ssl_cleanup_pre_config(void *data)
-      *       (when enabled) at this late stage in the game:
-      * CRYPTO_mem_leaks_fp(stderr);
-      */
-+#endif
-     return APR_SUCCESS;
- }
-@@ -400,14 +400,16 @@ static int ssl_hook_pre_config(apr_pool_t *pconf,
- #else
-     OPENSSL_malloc_init();
- #endif
-+#if MODSSL_USE_OPENSSL_PRE_1_1_API
-     ERR_load_crypto_strings();
-     SSL_load_error_strings();
-     SSL_library_init();
-+    OpenSSL_add_all_algorithms();
-+    OPENSSL_load_builtin_modules();
-+#endif
- #if HAVE_ENGINE_LOAD_BUILTIN_ENGINES
-     ENGINE_load_builtin_engines();
- #endif
--    OpenSSL_add_all_algorithms();
--    OPENSSL_load_builtin_modules();
-     if (OBJ_txt2nid("id-on-dnsSRV") == NID_undef) {
-         (void)OBJ_create("1.3.6.1.5.5.7.8.7", "id-on-dnsSRV",
---- a/modules/ssl/ssl_engine_init.c
-+++ b/modules/ssl/ssl_engine_init.c
-@@ -88,6 +88,8 @@ static int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g)
-     return 1;
- }
-+
-+#define OpenSSL_version_num   SSLeay
- #endif
- /*
-@@ -223,7 +225,7 @@ apr_status_t ssl_init_Module(apr_pool_t *p, apr_pool_t *plog,
-     apr_status_t rv;
-     apr_array_header_t *pphrases;
--    if (SSLeay() < MODSSL_LIBRARY_VERSION) {
-+    if (OpenSSL_version_num() < MODSSL_LIBRARY_VERSION) {
-         ap_log_error(APLOG_MARK, APLOG_WARNING, 0, base_server, APLOGNO(01882)
-                      "Init: this version of mod_ssl was compiled against "
-                      "a newer library (%s, version currently loaded is %s)"
---- a/modules/ssl/ssl_engine_io.c
-+++ b/modules/ssl/ssl_engine_io.c
-@@ -1255,9 +1255,9 @@ static apr_status_t ssl_io_filter_handshake(ssl_filter_ctx_t *filter_ctx)
-         if (dc->proxy->ssl_check_peer_expire != FALSE) {
-             if (!cert
-                 || (X509_cmp_current_time(
--                     X509_get_notBefore(cert)) >= 0)
-+                     X509_get0_notBefore(cert)) >= 0)
-                 || (X509_cmp_current_time(
--                     X509_get_notAfter(cert)) <= 0)) {
-+                     X509_get0_notAfter(cert)) <= 0)) {
-                 proxy_ssl_check_peer_ok = FALSE;
-                 ap_log_cerror(APLOG_MARK, APLOG_INFO, 0, c, APLOGNO(02004)
-                               "SSL Proxy: Peer certificate is expired");
---- a/modules/ssl/ssl_engine_log.c
-+++ b/modules/ssl/ssl_engine_log.c
-@@ -163,10 +163,10 @@ static void ssl_log_cert_error(const char *file, int line, int level,
-                 BIO_puts(bio, "(ERROR)");
-             BIO_puts(bio, " / notbefore: ");
--            ASN1_TIME_print(bio, X509_get_notBefore(cert));
-+            ASN1_TIME_print(bio, X509_get0_notBefore(cert));
-             BIO_puts(bio, " / notafter: ");
--            ASN1_TIME_print(bio, X509_get_notAfter(cert));
-+            ASN1_TIME_print(bio, X509_get0_notAfter(cert));
-             BIO_puts(bio, "]");
---- a/modules/ssl/ssl_engine_vars.c
-+++ b/modules/ssl/ssl_engine_vars.c
-@@ -495,13 +495,13 @@ static char *ssl_var_lookup_ssl_cert(apr_pool_t *p, request_rec *r, X509 *xs,
-         result = ssl_var_lookup_ssl_cert_serial(p, xs);
-     }
-     else if (strcEQ(var, "V_START")) {
--        result = ssl_var_lookup_ssl_cert_valid(p, X509_get_notBefore(xs));
-+        result = ssl_var_lookup_ssl_cert_valid(p, X509_getm_notBefore(xs));
-     }
-     else if (strcEQ(var, "V_END")) {
--        result = ssl_var_lookup_ssl_cert_valid(p, X509_get_notAfter(xs));
-+        result = ssl_var_lookup_ssl_cert_valid(p, X509_getm_notAfter(xs));
-     }
-     else if (strcEQ(var, "V_REMAIN")) {
--        result = ssl_var_lookup_ssl_cert_remain(p, X509_get_notAfter(xs));
-+        result = ssl_var_lookup_ssl_cert_remain(p, X509_getm_notAfter(xs));
-         resdup = FALSE;
-     }
-     else if (*var && strcEQ(var+1, "_DN")) {
---- a/modules/ssl/ssl_private.h
-+++ b/modules/ssl/ssl_private.h
-@@ -92,6 +92,8 @@
- #include <openssl/x509.h>
- #include <openssl/pem.h>
- #include <openssl/crypto.h>
-+#include <openssl/bn.h>
-+#include <openssl/dh.h>
- #include <openssl/evp.h>
- #include <openssl/rand.h>
- #include <openssl/x509v3.h>
-@@ -234,6 +236,10 @@
- #define BIO_get_shutdown(x)        (x->shutdown)
- #define BIO_set_shutdown(x,v)      (x->shutdown=v)
- #define DH_bits(x)                 (BN_num_bits(x->p))
-+#define X509_get0_notBefore        X509_get_notBefore
-+#define X509_get0_notAfter         X509_get_notAfter
-+#define X509_getm_notBefore        X509_get_notBefore
-+#define X509_getm_notAfter         X509_get_notAfter
- #else
- void init_bio_methods(void);
- void free_bio_methods(void);
---- a/support/ab.c
-+++ b/support/ab.c
-@@ -205,6 +205,10 @@ typedef STACK_OF(X509) X509_STACK_TYPE;
- #define SSL_CTX_set_max_proto_version(ctx, version) \
-    SSL_CTX_ctrl(ctx, SSL_CTRL_SET_MAX_PROTO_VERSION, version, NULL)
- #endif
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#define X509_get0_notBefore X509_get_notBefore
-+#define X509_get0_notAfter  X509_get_notAfter
-+#endif
- #endif
- #include <math.h>
-@@ -652,11 +656,11 @@ static void ssl_print_cert_info(BIO *bio, X509 *cert)
-     BIO_printf(bio, "Certificate version: %ld\n", X509_get_version(cert)+1);
-     BIO_printf(bio,"Valid from: ");
--    ASN1_UTCTIME_print(bio, X509_get_notBefore(cert));
-+    ASN1_UTCTIME_print(bio, X509_get0_notBefore(cert));
-     BIO_printf(bio,"\n");
-     BIO_printf(bio,"Valid to  : ");
--    ASN1_UTCTIME_print(bio, X509_get_notAfter(cert));
-+    ASN1_UTCTIME_print(bio, X509_get0_notAfter(cert));
-     BIO_printf(bio,"\n");
-     pk = X509_get_pubkey(cert);
-@@ -2634,8 +2638,10 @@ int main(int argc, const char * const argv[])
-     CRYPTO_malloc_init();
- #endif
- #endif
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
-     SSL_load_error_strings();
-     SSL_library_init();
-+#endif
-     bio_out=BIO_new_fp(stdout,BIO_NOCLOSE);
-     bio_err=BIO_new_fp(stderr,BIO_NOCLOSE);
index ea6838776ed083250333697aebed08bfe3e178f0..ddd3281f3815521fa5273ef3a7bbc8c104386bf7 100644 (file)
@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=atftp
 PKG_VERSION:=0.7.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/$(PKG_NAME)
diff --git a/net/atftp/patches/04-cdefs.patch b/net/atftp/patches/04-cdefs.patch
new file mode 100644 (file)
index 0000000..1d3f3e2
--- /dev/null
@@ -0,0 +1,22 @@
+--- a/argz.h
++++ b/argz.h
+@@ -39,6 +39,7 @@
+ #define _ARGZ_H       1
+ #include <features.h>
++#include <sys/cdefs.h>
+ #define __need_error_t
+ #include <errno.h>
+@@ -76,9 +77,9 @@ extern error_t argz_create_sep (__const char *__restrict __string,
+ /* Returns the number of strings in ARGZ.  */
+ extern size_t __argz_count (__const char *__argz, size_t __len)
+-     __THROW __attribute_pure__;
++     __THROW;
+ extern size_t argz_count (__const char *__argz, size_t __len)
+-     __THROW __attribute_pure__;
++     __THROW;
+ /* Puts pointers to each string in ARGZ into ARGV, which must be large enough
+    to hold them all.  */
diff --git a/net/boinc/Makefile b/net/boinc/Makefile
new file mode 100644 (file)
index 0000000..1efe723
--- /dev/null
@@ -0,0 +1,82 @@
+# Copyright 2020 by Christian Dreihsig and Steffen Möller
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=boinc
+PKG_VERSION:=7.16.5
+PKG_VERSION_SHORT:=$(shell echo $(PKG_VERSION)| cut -f1,2 -d.)
+PKG_RELEASE:=1
+
+PKG_SOURCE_DATE:=2020-02-25
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/BOINC/boinc/tar.gz/client_release/$(PKG_VERSION_SHORT)/$(PKG_VERSION)?
+PKG_HASH:=33db60991b253e717c6124cce4750ae7729eaab4e54ec718b9e37f87012d668a
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-client_release-$(PKG_VERSION_SHORT)-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Christian Dreihsig <christian.dreihsig@t-online.de>, Steffen Moeller <moeller@debian.org>
+PKG_LICENSE:=GPL-3.0-or-later
+PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:boinc_project:boinc
+
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=0
+PKG_FIXUP:=autoreconf
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/target.mk
+
+define Package/boinc
+  SECTION:=net
+  CATEGORY:=Network
+  TITLE:=BOINC client
+  DEPENDS:=+curl +bzip2 +libstdcpp +libopenssl +zlib
+  USERID:=boinc:boinc
+  URL:=https://github.com/BOINC/boinc/
+endef
+
+define Package/boinc/description
+  The Berkeley Open Infrastructure for Network Computing (BOINC) is a
+  software platform for distributed computing: several initiatives of
+  various scientific disciplines all compete for the idle time of
+  desktop computers. The developers' web site at the University of
+  Berkeley serves as a common portal to the otherwise independently run
+  projects.
+  This package provides the BOINC core client program that is
+  required to participate in any project that uses BOINC to control what
+  projects to join and to determine constraints for the computation
+  like the percentage of CPU time. OpenWrt does not
+  provide the graphical BOINC Manager, but you can connect to this
+  machine from the BOINC Manager of your desktop computer.
+endef
+
+CONFIGURE_ARGS += \
+       --disable-server --disable-manager --enable-client --enable-libraries \
+       --disable-boinczip --enable-install-headers --enable-dynamic-client-linkage \
+       --with-boinc-platform=$(REAL_GNU_TARGET_NAME) \
+       --with-boinc-alt-platform=$(ARCH)-$(BOARD)-$(DEVICE_TYPE)-openwrt-$(TARGET_SUFFIX)
+
+define Build/InstallDev
+       $(INSTALL_DIR) $(1)/usr/include/boinc
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/boinc/* $(1)/usr/include/boinc/
+       $(CP) $(PKG_BUILD_DIR)/*.h $(1)/usr/include/boinc/ # project_specific_defines.h, config.h, version.h, svn_version.h
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.a $(1)/usr/lib/
+endef
+
+define Package/boinc/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.{la,so}* $(1)/usr/lib/
+       $(INSTALL_DIR) $(1)/etc/init.d
+       $(INSTALL_BIN) ./files/boinc-client.init $(1)/etc/init.d/boinc-client
+       $(INSTALL_DIR) $(1)/opt/boinc
+       $(CP) ./files/global_prefs_override.xml $(1)/opt/boinc/global_prefs_override.xml
+       $(CP) ./files/remote_hosts.cfg $(1)/opt/boinc/remote_hosts.cfg
+endef
+
+$(eval $(call BuildPackage,boinc))
diff --git a/net/boinc/files/boinc-client.init b/net/boinc/files/boinc-client.init
new file mode 100755 (executable)
index 0000000..b225ebd
--- /dev/null
@@ -0,0 +1,44 @@
+#!/bin/sh /etc/rc.common
+
+USE_PROCD=1
+
+BOINCEXE_NAME=boinc_client
+BOINCDIR=/opt/boinc/
+BOINCUSR=boinc
+BOINCEXE_OPTS="--check_all_logins --redirectio --dir $BOINCDIR"
+PID_FILE="var/run/$BOINCEXE_NAME.pid"
+
+start_service() {
+   # First Check that BOINCDIR exists...
+   if ! [ -d "$BOINCDIR" ]; then
+      if ! mkdir -p $BOINCDIR 2>/dev/null ; then
+         echo "ERROR: $BOINCDIR doesn't exist and couldn't be created"
+         return 1
+      fi
+   fi
+
+   # ... and that it is accessible by boinc
+   BOINCDIR_OWNER="$(ls -ld $BOINCDIR | awk '{print $3}')"
+   if [ "$BOINCUSR" != "$BOINCDIR_OWNER" ] ; then
+      chown -R $BOINCUSR:$BOINCUSR $BOINCDIR
+      BOINCDIR_OWNER="$(ls -ld $BOINCDIR | awk '{print $3}')"
+
+      if [ "$BOINCUSR" != "$BOINCDIR_OWNER" ] ; then
+         echo "User boinc can't access $BOINC_DIR"
+         return 3
+      fi
+   fi
+
+   # now use procd to start boinc
+   procd_open_instance $BOINCEXE_NAME
+
+   procd_set_param command $BOINCEXE_NAME
+   procd_append_param command $BOINCEXE_OPTS
+   procd_set_param user $BOINCUSR
+   procd_set_param limits core="unlimited"
+   procd_set_param stdout 1
+   procd_set_param stderr 1
+   procd_set_param pidfile $PID_FILE
+
+   procd_close_instance
+}
diff --git a/net/boinc/files/global_prefs_override.xml b/net/boinc/files/global_prefs_override.xml
new file mode 100644 (file)
index 0000000..0554d41
--- /dev/null
@@ -0,0 +1,4 @@
+<global_preferences>
+   <max_ncpus_pct>50.000000</max_ncpus_pct>
+   <disk_interval>21600.000000</disk_interval>
+<global_preferences>
diff --git a/net/boinc/files/remote_hosts.cfg b/net/boinc/files/remote_hosts.cfg
new file mode 100644 (file)
index 0000000..943aa76
--- /dev/null
@@ -0,0 +1,8 @@
+# This file contains a list of hostnames or IP addresses (one per line)
+# of remote hosts, that are allowed to connect and to control the local
+# BOINC core client via GUI RPCs.
+# Lines beginning with a # or a ; are treated like comments and will be
+# ignored.
+#
+#host.example.com
+#192.168.0.180
index 82543d242725a6a852e1ac6663dc4e5eb0b84117..5c74d6b5ced06c9f444efcd10147025e68a92c78 100644 (file)
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=proto-bonding
-PKG_VERSION:=2020-03-03
+PKG_VERSION:=2020-03-30
 PKG_RELEASE:=1
 
 PKG_LICENSE:=GPL-2.0
index 5b106bc034adb06312e5190be68d71756d8e9c04..556d7c824efde362bb611fd357905a369d5894fd 100755 (executable)
@@ -73,7 +73,7 @@ proto_bonding_setup() {
        # Check for loaded kernel bonding driver (/sys/class/net/bonding_masters exists)
        [ -f "$BONDING_MASTERS" ] || {
                echo "$cfg" "setup: bonding_masters does not exist in sysfs (kernel module not loaded?)"
-               proto_notify_error "$cfg" "setup: bonding_masters does not exist in sysfs (kernel module not loaded?)"
+               proto_notify_error "$cfg" BONDING_MASTER_DOES_NOT_EXIST
                proto_block_restart "$cfg"
                return
        }
@@ -161,8 +161,8 @@ proto_bonding_setup() {
        for slave in $slaves; do
 
                if [ "$(cat /proc/net/dev |grep "$slave")" == "" ]; then
-                       echo "$cfg" "ERROR IN CONFIGURATION - $slave: No such device"
-                       proto_notify_error "$cfg" "ERROR IN CONFIGURATION - $slave: No such device"
+                       echo "$cfg" "No slave device $slave found"
+                       proto_notify_error "$cfg" NO_DEVICE
                        proto_block_restart "$cfg"
                        return
                fi
@@ -190,8 +190,8 @@ proto_bonding_setup() {
 
        # For static configuration we _MUST_ have an IP address
        [ -z "$ipaddr" ] && {
-               echo "$cfg" "INVALID LOCAL ADDRESS"
-               proto_notify_error "$cfg" "INVALID_LOCAL_ADDRESS"
+               echo "$cfg" "No local IP address defined"
+               proto_notify_error "$cfg" INVALID_LOCAL_ADDRESS
                proto_block_restart "$cfg"
                return
        }
@@ -208,7 +208,7 @@ proto_bonding_teardown() {
        # Check for loaded kernel bonding driver (/sys/class/net/bonding_masters exists)
        [ -f "$BONDING_MASTERS" ] || {
                echo "$cfg" "teardown: bonding_masters does not exist in sysfs (kernel module not loaded?)"
-               proto_notify_error "$cfg" "teardown: bonding_masters does not exist in sysfs (kernel module not loaded?)"
+               proto_notify_error "$cfg" BONDING_MASTER_DOES_NOT_EXIST
                proto_block_restart "$cfg"
                return
        }
index 4cef270c9e173cb236a360fbf7a4d23f904d1a1c..92c3f377aea08c322897b878daecfd8e198c96ed 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=clamav
-PKG_VERSION:=0.101.4
+PKG_VERSION:=0.102.2
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://www.clamav.net/downloads/production/
-PKG_HASH:=0bf094f0919d158a578421d66bc2569c8c8181233ba162bb51722f98c802bccd
+PKG_HASH:=89fcdcc0eba329ca84d270df09d2bb89ae55f5024b0c3bddb817512fb2c907d3
 
 PKG_MAINTAINER:=Marko Ratkaj <marko.ratkaj@sartura.hr> \
                Lucian Cristian <lucian.cristian@gmail.com>
@@ -97,6 +97,7 @@ define Package/clamav/install
        $(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/clamonacc $(1)/usr/sbin/
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/sigtool $(1)/usr/sbin/
 
        $(INSTALL_DIR) $(1)/usr/lib
diff --git a/net/clamav/patches/001-compile.patch b/net/clamav/patches/001-compile.patch
deleted file mode 100644 (file)
index 096d9cb..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/clamdscan/proto.c
-+++ b/clamdscan/proto.c
-@@ -59,6 +59,7 @@
- #include "shared/misc.h"
- #include "shared/clamdcom.h"
-+#include <sys/un.h>
- #include "proto.h"
- #include "client.h"
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
deleted file mode 100644 (file)
index 3564c31..0000000
+++ /dev/null
@@ -1,167 +0,0 @@
-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
-
diff --git a/net/clamav/patches/010-openssl-deprecated.patch b/net/clamav/patches/010-openssl-deprecated.patch
deleted file mode 100644 (file)
index fdc305c..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
---- a/libclamav/crypto.c
-+++ b/libclamav/crypto.c
-@@ -53,6 +53,10 @@
- #include <openssl/evp.h>
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#define X509_CRL_get0_nextUpdate X509_CRL_get_nextUpdate
-+#endif
-+
- #if !defined(_WIN32)
- #include <unistd.h>
- #endif
-@@ -132,12 +136,14 @@ time_t timegm(struct tm *t)
-  */
- int cl_initialize_crypto(void)
- {
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
-     SSL_load_error_strings();
-     SSL_library_init();
-     OpenSSL_add_all_digests();
-     OpenSSL_add_all_algorithms();
-     OpenSSL_add_all_ciphers();
-     ERR_load_crypto_strings();
-+#endif
-     return 0;
- }
-@@ -1140,7 +1146,7 @@ X509_CRL *cl_load_crl(const char *file)
-     if ((x)) {
-       ASN1_TIME *tme;
--      tme = X509_CRL_get_nextUpdate(x);
-+      tme = X509_CRL_get0_nextUpdate(x);
-       if (!tme || X509_cmp_current_time(tme) < 0) {
-               X509_CRL_free(x);
-               return NULL;
diff --git a/net/danish/Makefile b/net/danish/Makefile
deleted file mode 100644 (file)
index afaa02a..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-#
-# Copyright (C) 2017 Andrew McConachie
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=danish
-PKG_VERSION:=0.1
-PKG_RELEASE:=2
-PKG_MAINTAINER:=Andrew McConachie <andrew@depht.com>
-PKG_LICENSE:=GPL-3.0
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/smutt/danish.git
-PKG_SOURCE_VERSION:=f726656a4e37c46c037f61334ac48b35b7de25be
-PKG_MIRROR_HASH:=cb0b4bb7a210091d807ee8e4a2876865f32a9bf195836eb2e1edf6c5975d1130
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-
-include $(INCLUDE_DIR)/package.mk
-include ../../lang/python/python-package.mk
-
-define Package/danish
-       SECTION:=net
-       CATEGORY:=Network
-       SUBMENU:=IP Addresses and Names
-       TITLE:=A middle box implementation of RFC 6698 for HTTPS.
-       URL:=https://github.com/smutt/danish
-       DEPENDS:=+python +python-dns +python-pcapy +python-dpkt +kmod-ipt-filter +iptables-mod-filter
-endef
-
-define Package/danish/description
-  Danish is an experiment in middle-box DANE (RFC 6698) for HTTPS.
-  https://www.middlebox-dane.org/
-endef
-
-define Build/Compile
-       $(call Build/Compile/PyMod,,\
-               install --prefix=/usr --root="$(PKG_INSTALL_DIR)", \
-       )
-endef
-
-define Package/danish/install
-       $(INSTALL_DIR) $(1)/usr/sbin
-       $(CP) $(PKG_BUILD_DIR)/danish.py $(1)/usr/sbin/danish
-       $(INSTALL_DIR) $(1)/etc/config
-       $(CP) $(PKG_BUILD_DIR)/danish.conf $(1)/etc/config/danish 
-       $(INSTALL_DIR) $(1)/etc/init.d
-       $(CP) $(PKG_BUILD_DIR)/danish.init $(1)/etc/init.d/danish
-endef
-
-$(eval $(call BuildPackage,danish))
diff --git a/net/dawn/Makefile b/net/dawn/Makefile
new file mode 100644 (file)
index 0000000..06d4aba
--- /dev/null
@@ -0,0 +1,46 @@
+#
+# This software is licensed under the Public Domain.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=dawn
+PKG_SOURCE_DATE:=2020-03-29
+PKG_RELEASE:=1
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/berlin-open-wireless-lab/DAWN.git
+PKG_SOURCE_VERSION:=a25bb91f3751dea3a43ae3b3835a5a6bf7239259
+PKG_MIRROR_HASH:=7f60d026b15f6768a950d31007a247ad7bfb6c8a3b67bd938a1f345be62ca0c4
+
+PKG_MAINTAINER:=Nick Hainke <vincent@systemli.org>
+PKG_LICENSE:=GPL-2.0-only
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_BUILD_PARALLEL:=1
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+define Package/dawn
+  SECTION:=net
+  CATEGORY:=Network
+  TITLE:=Decentralized wifi controller
+  URL:=https://github.com/berlin-open-wireless-lab/DAWN.git
+  DEPENDS:=$(DRV_DEPENDS) +libubus +libubox +libblobmsg-json +libuci +libgcrypt +libiwinfo +umdns
+endef
+
+define Package/dawn/description
+  This package implements a decentralized wireless daemon.
+endef
+
+define Package/dawn/install
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dawn $(1)/usr/sbin/dawn
+       $(INSTALL_DIR) $(1)/etc/init.d
+       $(INSTALL_BIN) ./files/dawn.init $(1)/etc/init.d/dawn
+       $(INSTALL_DIR) $(1)/etc/config
+       $(INSTALL_CONF) ./files/dawn.config $(1)/etc/config/dawn
+endef
+
+$(eval $(call BuildPackage,dawn))
diff --git a/net/dawn/files/dawn.config b/net/dawn/files/dawn.config
new file mode 100644 (file)
index 0000000..24d80d2
--- /dev/null
@@ -0,0 +1,55 @@
+config network
+    option broadcast_ip         '10.0.0.255'
+    option broadcast_port       '1025'
+    option tcp_port             '1026'
+    option network_option       '2' # 0 udp broadcast, 1 mutlicast, 2 tcp
+    option shared_key           'Niiiiiiiiiiiiiik'
+    option iv                   'Niiiiiiiiiiiiiik'
+    option use_symm_enc         '1'
+    option collision_domain     '-1'     # enter here aps which are in the same collision domain
+    option bandwidth            '-1'     # enter network bandwidth
+
+config ordering
+    option sort_order           'cbfs'
+
+config hostapd
+    option hostapd_dir          '/var/run/hostapd'
+
+config times
+    option update_client        '10'
+    option denied_req_threshold '30'
+    option remove_client        '15'
+    option remove_probe         '30'
+    option remove_ap            '460'
+    option update_hostapd       '10'
+    option update_tcp_con       '10'
+    option update_chan_util     '5'
+
+config metric
+    option ap_weight            '0'
+    option ht_support           '0'
+    option vht_support          '0'
+    option no_ht_support        '0'
+    option no_vht_support       '0'
+    option rssi                 '10'
+    option low_rssi             '-500'
+    option freq                 '100' # some kind of band-steering
+    option chan_util            '0'
+    option max_chan_util        '-500'
+    option rssi_val             '-60'
+    option low_rssi_val         '-80'
+    option chan_util_val        '140'
+    option max_chan_util_val    '170'
+    option min_probe_count      '0'
+    option bandwith_threshold   '6'
+    option use_station_count    '1'
+    option max_station_diff     '1'
+    option eval_probe_req       '0'
+    option eval_auth_req        '0'     # no real reasoncode...
+    option eval_assoc_req       '0'     # just deny assocs...
+    option kicking              '0'
+    option deny_auth_reason     '1'     # unspecified
+    option deny_assoc_reason    '17'    # assoc rejected can't handle new station
+    option use_driver_recog     '1'
+    option min_number_to_kick   '3'
+    option chan_util_avg_period '3'
diff --git a/net/dawn/files/dawn.init b/net/dawn/files/dawn.init
new file mode 100755 (executable)
index 0000000..bccca66
--- /dev/null
@@ -0,0 +1,46 @@
+#!/bin/sh /etc/rc.common
+USE_PROCD=1
+
+START=50
+STOP=50
+
+PROG=/usr/sbin/dawn
+NAME=dawn
+
+reload_service()
+{
+       if service_running; then
+               ubus call dawn reload_config
+       else
+               start
+       fi
+}
+
+service_triggers()
+{
+       procd_add_reload_trigger "dawn"
+}
+
+start_service()
+{
+       local _tcp_buffer
+       config_load dawn
+       load_tcp_port() {
+               config_get _tcp_buffer "$1" tcp_port
+       }
+       config_foreach load_tcp_port network
+       
+       touch /tmp/dawn_mac_list
+
+       echo "Starting Service..."
+       procd_open_instance
+       procd_set_param command $PROG
+       procd_set_param stdout 0 # here it is possible to remove the debug output...
+       procd_set_param stderr 1
+       procd_add_mdns "dawn" "tcp" "${_tcp_buffer}"
+       procd_close_instance
+       echo "Dawn instance started!"
+       echo "UMDNS with port ${_tcp_buffer}"
+}
+
index 73e6cd7f3f5fa9e102d9bfdc52763b750088865d..6f064e742c2c1fa680e9d0b01c408d061259c8b1 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=dnscrypt-proxy2
-PKG_VERSION:=2.0.39
+PKG_VERSION:=2.0.42
 PKG_RELEASE:=1
 
 PKG_SOURCE:=dnscrypt-proxy-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/DNSCrypt/dnscrypt-proxy/tar.gz/$(PKG_VERSION)?
-PKG_HASH:=c943c74c0894bb51336529e733ca3811dffdb914a59b9707c63a327f2c8ff835
+PKG_HASH:=c000ca4e159c6606cb3476ea9e34ed64b5c46c710d70cc5651f14f1125c8d352
 PKG_BUILD_DIR:=$(BUILD_DIR)/dnscrypt-proxy-$(PKG_VERSION)
 
 PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>
index 62dbe21fbe8ca7dbcba6dad4259829f03e92a9fb..ef32b33ccd93db81eada3be253805405de0dc264 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=freeradius3
 PKG_VERSION:=release_3_0_20
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/FreeRADIUS/freeradius-server/archive
@@ -30,7 +30,6 @@ PKG_CONFIG_DEPENDS := \
 CFLAGS += $(FPIC)
 
 include $(INCLUDE_DIR)/package.mk
-include $(TOPDIR)/feeds/packages/lang/python/python-package.mk
 include $(TOPDIR)/feeds/packages/lang/python/python3-package.mk
 
 define Package/freeradius3/config
@@ -342,16 +341,6 @@ define Package/freeradius3-mod-preprocess/conffiles
 /etc/freeradius3/mods-enabled/preprocess
 endef
 
-define Package/freeradius3-mod-python
-  $(call Package/freeradius3/Default)
-  DEPENDS:=freeradius3 +python
-  TITLE:=Python module
-endef
-
-define Package/freeradius3-mod-python/conffiles
-/etc/freeradius3/mods-available/python
-endef
-
 define Package/freeradius3-mod-python3
   $(call Package/freeradius3/Default)
   DEPENDS:=freeradius3 +python3
@@ -512,6 +501,7 @@ CONFIGURE_ARGS+= \
        --without-rlm_opendirectory \
        --without-rlm_pam \
        --without-rlm_perl \
+       --without-rlm_python \
        --without-rlm_redis \
        --without-rlm_rediswho \
        --without-rlm_rest \
@@ -577,19 +567,6 @@ else
   CONFIGURE_ARGS+= --without-rlm_eap_pwd
 endif
 
-ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius3-mod-python),)
-  CFLAGS+= -fPIC
-  CONFIGURE_ARGS+= \
-               --with-rlm_python \
-               --with-rlm-python-include-dir="$(PYTHON_INC_DIR)" \
-               --with-rlm-python-lib-dir="$(PYTHON_LIB_DIR)"
-  CONFIGURE_VARS+= \
-               OPENWRTTARGET_PY_PREFIX="$(PYTHON_DIR)" \
-               OPENWRTTARGET_PY_SYS_VERSION="$(PYTHON_VERSION)"
-else
-  CONFIGURE_ARGS+= --without-rlm_python
-endif
-
 ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius3-mod-python3),)
   CFLAGS+= -fPIC
   CONFIGURE_ARGS+= \
@@ -789,8 +766,6 @@ $(eval $(call BuildPlugin,freeradius3-mod-mschap,rlm_mschap,))
 $(eval $(call BuildPlugin,freeradius3-mod-pap,rlm_pap,))
 $(eval $(call BuildPlugin,freeradius3-mod-passwd,rlm_passwd,))
 $(eval $(call BuildPlugin,freeradius3-mod-preprocess,rlm_preprocess,))
-$(eval $(call PyPackage,freeradius3-mod-python))
-$(eval $(call BuildPlugin,freeradius3-mod-python,rlm_python,))
 $(eval $(call Py3Package,freeradius3-mod-python3))
 $(eval $(call BuildPlugin,freeradius3-mod-python3,rlm_python3,))
 $(eval $(call BuildPlugin,freeradius3-mod-radutmp,rlm_radutmp,))
index 20aa5c507780ca75e66d8139521c694be6993c11..c1f1c74f9b6cd9695b9ba71f32b3b6230f556eec 100644 (file)
@@ -1,43 +1,3 @@
---- a/src/modules/rlm_python/configure
-+++ b/src/modules/rlm_python/configure
-@@ -2928,15 +2928,15 @@ fi
-       if test x$fail = x; then
--              PY_PREFIX=`${PYTHON_BIN} -c 'import sys ; print(sys.prefix)'`
-+              PY_PREFIX="$OPENWRTTARGET_PY_PREFIX"
-               { $as_echo "$as_me:${as_lineno-$LINENO}: Python sys.prefix \"${PY_PREFIX}\"" >&5
- $as_echo "$as_me: Python sys.prefix \"${PY_PREFIX}\"" >&6;}
--              PY_EXEC_PREFIX=`${PYTHON_BIN} -c 'import sys ; print(sys.exec_prefix)'`
-+              PY_EXEC_PREFIX="$OPENWRTTARGET_PY_PREFIX"
-               { $as_echo "$as_me:${as_lineno-$LINENO}: Python sys.exec_prefix \"${PY_EXEC_PREFIX}\"" >&5
- $as_echo "$as_me: Python sys.exec_prefix \"${PY_EXEC_PREFIX}\"" >&6;}
--              PY_SYS_VERSION=`${PYTHON_BIN} -c 'import sys ; print(sys.version[0:3])'`
-+              PY_SYS_VERSION="$OPENWRTTARGET_PY_SYS_VERSION"
-               { $as_echo "$as_me:${as_lineno-$LINENO}: Python sys.version \"${PY_SYS_VERSION}\"" >&5
- $as_echo "$as_me: Python sys.version \"${PY_SYS_VERSION}\"" >&6;}
---- a/src/modules/rlm_python/configure.ac
-+++ b/src/modules/rlm_python/configure.ac
-@@ -65,13 +65,13 @@ if test x$with_[]modname != xno; then
-       )
-       if test x$fail = x; then
--              PY_PREFIX=`${PYTHON_BIN} -c 'import sys ; print(sys.prefix)'`
-+              PY_PREFIX="$OPENWRTTARGET_PY_PREFIX"
-               AC_MSG_NOTICE([Python sys.prefix \"${PY_PREFIX}\"])
--              PY_EXEC_PREFIX=`${PYTHON_BIN} -c 'import sys ; print(sys.exec_prefix)'`
-+              PY_EXEC_PREFIX="$OPENWRTTARGET_PY_PREFIX"
-               AC_MSG_NOTICE([Python sys.exec_prefix \"${PY_EXEC_PREFIX}\"])
--              PY_SYS_VERSION=`${PYTHON_BIN} -c 'import sys ; print(sys.version[[0:3]])'`
-+              PY_SYS_VERSION="$OPENWRTTARGET_PY_SYS_VERSION"
-               AC_MSG_NOTICE([Python sys.version \"${PY_SYS_VERSION}\"])
-               if test "x$PY_LIB_DIR" = "x"; then
 --- a/src/modules/rlm_python3/configure
 +++ b/src/modules/rlm_python3/configure
 @@ -2928,15 +2928,15 @@ fi
index c35f333b1cf59808a0b1acce37fa1722f27875a0..1e6cdc8def5ec86e7b3e1cc4242ca1c2089e5bc5 100644 (file)
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 PKG_NAME:=frr
 PKG_VERSION:=7.3
-PKG_RELEASE:=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
@@ -82,7 +82,7 @@ endef
 define Package/frr-libfrr
   $(call Package/frr/Default)
   TITLE:=zebra library
-  DEPENDS+=+librt +libjson-c +libyang +FRR_OPENSSL:libopenssl
+  DEPENDS+=+librt +libatomic +libjson-c +libyang +FRR_OPENSSL:libopenssl
   CONFLICTS:=quagga-libzebra
 endef
 
@@ -144,6 +144,8 @@ define Package/frr-libfrr/conffiles
 /etc/frr/
 endef
 
+TARGET_LDFLAGS += -latomic
+
 define Build/Prepare
        $(Build/Prepare/Default)
        mkdir -p $(PKG_BUILD_DIR)/build
index 36001edaaf452a29568ce975c9d5ba006d63cb82..9724dfff1cabee73aabae795bd0ad9cecc504843 100644 (file)
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=haproxy
-PKG_VERSION:=2.1.3
+PKG_VERSION:=2.1.4
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://www.haproxy.org/download/2.1/src
-PKG_HASH:=bb678e550374d0d9d9312885fb9d270b501dae9e3b336f0a4379c667dae00b59
+PKG_HASH:=51030ff696d7067162b4d24d354044293aecfbb36d7acc2f840c8d928bfe91cd
 
 PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>, \
                Christian Lachner <gladiac@gmail.com>
index 9fb53789332f909f3f65d29f3a62f7d619982380..2edb44e3ba7b492f671bf04d88d943b4f51d5e02 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 CLONEURL=https://git.haproxy.org/git/haproxy-2.1.git
-BASE_TAG=v2.1.3
+BASE_TAG=v2.1.4
 TMP_REPODIR=tmprepo
 PATCHESDIR=patches
 
diff --git a/net/haproxy/patches/000-BUG-MINOR-protocol_buffer-Wrong-maximum-shifting.patch b/net/haproxy/patches/000-BUG-MINOR-protocol_buffer-Wrong-maximum-shifting.patch
new file mode 100644 (file)
index 0000000..71b6277
--- /dev/null
@@ -0,0 +1,56 @@
+commit c7a203a6c75e4efff5f3d5d675d925f11b47dba1
+Author: Frédéric Lécaille <flecaille@haproxy.com>
+Date:   Thu Apr 2 14:24:31 2020 +0200
+
+    BUG/MINOR: protocol_buffer: Wrong maximum shifting.
+    
+    This patch fixes a bad stop condition when decoding a protocol buffer variable integer
+    whose maximum lenghts are 10, shifting a uint64_t value by more than 63.
+    
+    Thank you to Ilya for having reported this issue.
+    
+    Must be backported to 2.1 and 2.0.
+    
+    (cherry picked from commit 876ed55d9b8d0c298b6cac1003ec365a19bf7aad)
+    Signed-off-by: Willy Tarreau <w@1wt.eu>
+
+diff --git a/include/proto/protocol_buffers.h b/include/proto/protocol_buffers.h
+index 69f0bdf81..0426d83d2 100644
+--- a/include/proto/protocol_buffers.h
++++ b/include/proto/protocol_buffers.h
+@@ -158,7 +158,7 @@ protobuf_varint(uint64_t *val, unsigned char *pos, size_t len)
+               shift += 7;
+               /* The maximum length in bytes of a 64-bit encoded value is 10. */
+-              if (shift > 70)
++              if (shift > 63)
+                       return 0;
+       }
+@@ -194,7 +194,7 @@ protobuf_decode_varint(uint64_t *val, unsigned char **pos, size_t *len)
+               shift += 7;
+               /* The maximum length in bytes of a 64-bit encoded value is 10. */
+-              if (shift > 70)
++              if (shift > 63)
+                       return 0;
+       }
+@@ -227,7 +227,7 @@ protobuf_skip_varint(unsigned char **pos, size_t *len, size_t vlen)
+               shift += 7;
+               /* The maximum length in bytes of a 64-bit encoded value is 10. */
+-              if (shift > 70)
++              if (shift > 63)
+                       return 0;
+       }
+@@ -263,7 +263,7 @@ protobuf_varint_getlen(unsigned char *pos, size_t len)
+               shift += 7;
+               /* The maximum length in bytes of a 64-bit encoded value is 10. */
+-              if (shift > 70)
++              if (shift > 63)
+                       return -1;
+       }
diff --git a/net/haproxy/patches/000-OPENWRT-add-uclibc-support.patch b/net/haproxy/patches/000-OPENWRT-add-uclibc-support.patch
deleted file mode 100644 (file)
index 3a22ebb..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
---- a/Makefile
-+++ b/Makefile
-@@ -339,6 +339,15 @@ ifeq ($(TARGET),linux-glibc)
-     USE_ACCEPT4 USE_LINUX_SPLICE USE_PRCTL USE_THREAD_DUMP 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/001-OPENWRT-add-uclibc-support.patch b/net/haproxy/patches/001-OPENWRT-add-uclibc-support.patch
new file mode 100644 (file)
index 0000000..ddec134
--- /dev/null
@@ -0,0 +1,18 @@
+--- a/Makefile
++++ b/Makefile
+@@ -342,6 +342,15 @@ ifeq ($(TARGET),linux-glibc)
+     USE_ACCEPT4 USE_LINUX_SPLICE USE_PRCTL USE_THREAD_DUMP 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.
index d38bec3cd624e6474f1889ea6d092a7501021cd6..ac543fbbc6081d37b26a0eec00d15c8a8dea20e4 100644 (file)
@@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=jool
-PKG_VERSION:=4.0.7
+PKG_VERSION:=4.0.8
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/NICMx/Jool/releases/download/v$(PKG_VERSION)
-PKG_HASH:=3ea1b8ab7435de4776405ccf83c936b2028f20f860b7d0a462d39e4524564363
+PKG_HASH:=73dd65a14feedc8bd0f650d3316bca346474c8420d60b48ca95bd1ca8846f1d4
 
 PKG_MAINTAINER:=
 PKG_LICENSE:=GPL-2.0-only
index 72ce46b9cf6bd1c04a7cce9a67a879ed1a703009..1f4b58ac4dfc9e3dc8862c90bdb1c3f853673d7b 100644 (file)
@@ -9,12 +9,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=kea
-PKG_VERSION:=1.6.0
-PKG_RELEASE:=7
+PKG_VERSION:=1.6.2
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://ftp.isc.org/isc/kea/$(PKG_VERSION)
-PKG_HASH:=44ed48c729e4618fffcf0086529b469f7232990983187b2f71fce89f1ac6e270
+PKG_HASH:=2af7336027143c3e98d8d1d44165b2c2cbb0252a92bd88f6dd4d2c6adb69d7b5
 
 PKG_MAINTAINER:=BangLang Huang<banglang.huang@foxmail.com>, Rosy Song<rosysong@rosinson.com>
 PKG_LICENSE:=MPL-2.0
@@ -149,7 +149,6 @@ HOST_CONFIGURE_ARGS += \
        --with-log4cplus="$(STAGING_DIR_HOSTPKG)" \
        --with-openssl="$(STAGING_DIR_HOST)" \
        --enable-boost-headers-only \
-       --enable-static-link \
        --enable-generate-messages
 
 HOST_LDFLAGS += \
index b174a2c06259496f1126ced2d84b2500f585f900..511ab69aef5aae9c329d15d85f036c1ae1499468 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=kismet
 PKG_VERSION:=2016-07-R1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_LICENSE:=LGPLv2.1
 PKG_CPE_ID:=cpe:/a:kismet:kismet
diff --git a/net/kismet/patches/030-libcxx.patch b/net/kismet/patches/030-libcxx.patch
new file mode 100644 (file)
index 0000000..128a9d1
--- /dev/null
@@ -0,0 +1,53 @@
+--- a/packetsource_wext.cc
++++ b/packetsource_wext.cc
+@@ -405,7 +405,7 @@ void PacketSource_Wext::OpenWpaSupplicant() {
+               wpa_local.sun_family = AF_UNIX;
+               snprintf(wpa_local.sun_path, sizeof(wpa_local.sun_path), 
+                                "%s", wpa_local_path.c_str());
+-              if (bind(wpa_sock, (struct sockaddr *) &wpa_local, sizeof(wpa_local)) < 0) {
++              if (::bind(wpa_sock, (struct sockaddr *) &wpa_local, sizeof(wpa_local)) < 0) {
+                       _MSG("Source '" + parent + "' failed to bind local socket for "
+                                "wpa_supplicant, disabling scan_wpa: " + string(strerror(errno)),
+                                MSGFLAG_PRINTERROR);
+--- a/tcpclient.cc
++++ b/tcpclient.cc
+@@ -75,7 +75,7 @@ int TcpClient::Connect(const char *in_remotehost, short int in_port,
+     local_sock.sin_addr.s_addr = htonl(INADDR_ANY);
+     local_sock.sin_port = htons(0);
+-    if (bind(cli_fd, (struct sockaddr *) &local_sock, sizeof(local_sock)) < 0) {
++    if (::bind(cli_fd, (struct sockaddr *) &local_sock, sizeof(local_sock)) < 0) {
+         snprintf(errstr, 1024, "TCP client bind() failed: %s", strerror(errno));
+         globalreg->messagebus->InjectMessage(errstr, MSGFLAG_ERROR);
+               close(cli_fd);
+@@ -170,7 +170,7 @@ int TcpClient::ConnectSync(const char *in_remotehost, short int in_port,
+     local_sock.sin_addr.s_addr = htonl(INADDR_ANY);
+     local_sock.sin_port = htons(0);
+-    if (bind(cli_fd, (struct sockaddr *) &local_sock, sizeof(local_sock)) < 0) {
++    if (::bind(cli_fd, (struct sockaddr *) &local_sock, sizeof(local_sock)) < 0) {
+         snprintf(errstr, 1024, "TCP client bind() failed: %s", strerror(errno));
+         globalreg->messagebus->InjectMessage(errstr, MSGFLAG_ERROR);
+               close(cli_fd);
+--- a/tcpserver.cc
++++ b/tcpserver.cc
+@@ -84,7 +84,7 @@ int TcpServer::EnableServer() {
+     }
+     // Bind the socket
+-    if (bind(serv_fd, (struct sockaddr *) &serv_sock, sizeof(serv_sock)) < 0) {
++    if (::bind(serv_fd, (struct sockaddr *) &serv_sock, sizeof(serv_sock)) < 0) {
+         snprintf(errstr, STATUS_MAX, "TCP server bind() failed: %s",
+                  strerror(errno));
+         globalreg->messagebus->InjectMessage(errstr, MSGFLAG_ERROR);
+--- a/unixdomainserver.cc
++++ b/unixdomainserver.cc
+@@ -64,7 +64,7 @@ int UnixDomainServer::EnableServer() {
+     }
+     // Bind the socket
+-    if (bind(serv_fd, (struct sockaddr *) &serv_sock, sizeof(serv_sock)) < 0) {
++    if (::bind(serv_fd, (struct sockaddr *) &serv_sock, sizeof(serv_sock)) < 0) {
+         _MSG("Unix domain server bind() failed: " + string(strerror(errno)),
+              MSGFLAG_ERROR);
+         return -1;
index 029c77065071982523aab6bb3dcb26115e734d42..2752fd997ebee1f94647c0fbf3ae78cd830ffbcf 100644 (file)
@@ -7,12 +7,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libreswan
-PKG_VERSION:=3.30
+PKG_VERSION:=3.31
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://download.libreswan.org/
-PKG_HASH:=9c880ba2d8f3a430cda4b3064d51d1caffb3597573f7d693eba043930b279caf
+PKG_HASH:=4ad9732b30d07a9f4b838fb5580fa11b7b65e073bf97665591ee611bc2d6b8f3
 
 PKG_MAINTAINER:=Lucian Cristian <lucian.cristian@gmail.com>
 PKG_LICENSE:=GPL-2.0-or-later
index d3cbf2981cff07744af7c1a70d32138a7ae9c1a1..5d03cdce61bc3eed85fb6f4a4b829ffdc4c550db 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=miniupnpd
 PKG_VERSION:=2.1.20191006
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE_URL:=https://miniupnp.tuxfamily.org/files
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
index 01434e9153304ae78b13a6c4c7808424da891808..d90c290a717ba0711a9fe322208237cbfdfd9ab3 100644 (file)
@@ -78,6 +78,7 @@ upnpd() {
        config_get serial_number config serial_number
        config_get model_number config model_number
        config_get uuid config uuid
+       config_get use_stun config use_stun 0
        config_get stun_host config stun_host
        config_get stun_port config stun_port
        config_get notify_interval config notify_interval
index 78e0ec2b954ff3730f68754636430165dfcd33ec..bafbaabd3637c81bccae0222e2b8ab836c8ee9c8 100644 (file)
@@ -21,7 +21,7 @@ include $(INCLUDE_DIR)/package.mk
 define Package/nft-qos
   SECTION:=utils
   CATEGORY:=Base system
-  DEPENDS:=+nftables +kmod-nft-netdev +kmod-nft-bridge
+  DEPENDS:=+kmod-nft-netdev +kmod-nft-bridge +nftables
   TITLE:=QoS scripts over nftables
   PKGARCH:=all
 endef
index 898374825c5dc5ddaa9d9a4c853cbeca7ac1f6e2..46c0479816577937b98dc9b6aa4d7512610e4cf8 100644 (file)
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=nmap
-PKG_VERSION:=7.70
-PKG_RELEASE:=2
+PKG_VERSION:=7.80
+PKG_RELEASE:=1
 PKG_MAINTAINER:=Nuno Goncalves <nunojpg@gmail.com>
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://nmap.org/dist/
-PKG_HASH:=847b068955f792f4cc247593aca6dc3dc4aae12976169873247488de147a6e18
-PKG_LICENSE:=GPL-2.0
+PKG_HASH:=fcfa5a0e42099e12e4bf7a68ebe6fde05553383a682e816a7ec9256ab4773faa
+PKG_LICENSE:=GPL-2.0-only
 PKG_LICENSE_FILES:=COPYING
 PKG_CPE_ID:=cpe:/a:nmap:nmap
 
+PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
+include ../../lang/python/python3-package.mk
 
 NMAP_DEPENDS:=+libpcap +libstdcpp +zlib +libpcre
 NCAT_DEPENDS:=+libpcap
 NPING_DEPENDS:=+libpcap +libpthread +libstdcpp
-NDIFF_DEPENDS:=+python
 
 define Package/nmap/default
   SUBMENU:=NMAP Suite
   SECTION:=net
   CATEGORY:=Network
-  URL:=http://nmap.org/
+  URL:=https://nmap.org/
 endef
 
 define Package/nmap
@@ -54,6 +55,13 @@ $(call Package/nmap/default)
   TITLE:=Nmap (with OpenSSL support)
 endef
 
+define Package/nmap-full
+$(call Package/nmap/default)
+  DEPENDS:=$(NMAP_DEPENDS) +libopenssl +liblua5.3 +libssh2
+  VARIANT:=full
+  TITLE:=Nmap (with OpenSSL and scripting support)
+endef
+
 define Package/ncat
 $(call Package/nmap/default)
   DEPENDS:=$(NCAT_DEPENDS)
@@ -68,6 +76,13 @@ $(call Package/nmap/default)
   TITLE:=Ncat (with OpenSSL support)
 endef
 
+define Package/ncat-full
+$(call Package/nmap/default)
+  DEPENDS:=$(NCAT_DEPENDS) +libopenssl +liblua5.3
+  VARIANT:=full
+  TITLE:=Ncat (with OpenSSL and scripting support)
+endef
+
 define Package/nping
 $(call Package/nmap/default)
   DEPENDS:=$(NPING_DEPENDS)
@@ -75,42 +90,82 @@ $(call Package/nmap/default)
   TITLE:=Network packet generation tool / ping utility
 endef
 
+define Package/nping-ssl
+$(call Package/nmap/default)
+  DEPENDS:=$(NPING_DEPENDS) +libopenssl
+  VARIANT:=ssl
+  TITLE:=Nping (with OpenSSL support)
+endef
+
 define Package/ndiff
 $(call Package/nmap/default)
-  DEPENDS:=$(NDIFF_DEPENDS)
-  VARIANT:=nossl
+  DEPENDS:=+python3-light +python3-xml
+  VARIANT:=python3
   TITLE:=Utility to compare the results of Nmap scans
 endef
 
 CONFIGURE_ARGS += \
        --with-libdnet=included \
-       --with-libpcre="$(STAGING_DIR)/usr" \
+       --with-liblinear=included \
        --with-libpcap="$(STAGING_DIR)/usr" \
-       --without-liblua \
+       --with-libpcre="$(STAGING_DIR)/usr" \
+       --with-libz="$(STAGING_DIR)/usr" \
+       --with-ncat \
+       --without-localdirs \
+       --without-ndiff \
+       --without-nmap-update \
+       --without-subversion \
        --without-zenmap
+       # --with-libnbase=included
+       # --with-libnsock=included
+       # --without-apr
+
+ifeq ($(BUILD_VARIANT),full)
+  CONFIGURE_ARGS += \
+       --with-liblua="$(STAGING_DIR)/usr" \
+       --with-libssh2="$(STAGING_DIR)/usr" \
+       --with-openssl="$(STAGING_DIR)/usr" \
+       --without-nping
+
+else ifeq ($(BUILD_VARIANT),ssl)
+  CONFIGURE_ARGS += \
+       --with-nping \
+       --with-openssl="$(STAGING_DIR)/usr" \
+       --without-liblua \
+       --without-libssh2
+
+else  # nossl
+  CONFIGURE_ARGS += \
+       --with-nping \
+       --without-liblua \
+       --without-libssh2 \
+       --without-openssl
+endif
 
 CONFIGURE_VARS += \
-       ac_cv_dnet_bsd_bpf=no \
-       CXXFLAGS="$$$$CXXFLAGS -fno-builtin"
+       ac_cv_dnet_bsd_bpf=no
+
+PYTHON3_PKG_SETUP_DIR:=ndiff
+PYTHON3_PKG_SETUP_ARGS:=
 
-ifeq ($(BUILD_VARIANT),ssl)
-       CONFIGURE_ARGS += --with-openssl="$(STAGING_DIR)/usr" --without-libssh2
-else
-       CONFIGURE_ARGS += --without-openssl
+ifeq ($(BUILD_VARIANT),python3)
+  Build/Configure:=:
+  Build/Install:=:
 endif
 
 define Package/nmap/install
        $(INSTALL_DIR) $(1)/usr/bin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nmap $(1)/usr/bin/
        $(INSTALL_DIR) $(1)/usr/share/nmap
-       $(CP) $(PKG_INSTALL_DIR)/usr/share/nmap/* $(1)/usr/share/nmap/
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/nmap/nmap* $(1)/usr/share/nmap/
 endef
 
-define Package/nmap-ssl/install
-       $(INSTALL_DIR) $(1)/usr/bin
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nmap $(1)/usr/bin/
-       $(INSTALL_DIR) $(1)/usr/share/nmap
-       $(CP) $(PKG_INSTALL_DIR)/usr/share/nmap/* $(1)/usr/share/nmap/
+Package/nmap-ssl/install=$(Package/nmap/install)
+
+define Package/nmap-full/install
+       $(call Package/nmap/install,$(1))
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/nmap/nse_main.lua $(1)/usr/share/nmap/
+       $(CP) $(PKG_INSTALL_DIR)/usr/share/nmap/{nselib,scripts} $(1)/usr/share/nmap/
 endef
 
 define Package/ncat/install
@@ -119,26 +174,34 @@ define Package/ncat/install
 endef
 
 define Package/ncat-ssl/install
-       $(INSTALL_DIR) $(1)/usr/bin
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ncat $(1)/usr/bin/
+       $(call Package/ncat/install,$(1))
        $(INSTALL_DIR) $(1)/usr/share/ncat
-       $(CP) $(PKG_INSTALL_DIR)/usr/share/ncat/ca-bundle.crt $(1)/usr/share/ncat/
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/ncat/ca-bundle.crt $(1)/usr/share/ncat/
 endef
 
-define Package/ndiff/install
-       $(INSTALL_DIR) $(1)/usr/bin
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ndiff $(1)/usr/bin/
-endef
+Package/ncat-full/install=$(Package/ncat-ssl/install)
 
 define Package/nping/install
        $(INSTALL_DIR) $(1)/usr/bin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nping $(1)/usr/bin/
 endef
 
+Package/nping-ssl/install=$(Package/nping/install)
+
+define Py3Package/ndiff/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ndiff $(1)/usr/bin/
+endef
 
 $(eval $(call BuildPackage,nmap))
 $(eval $(call BuildPackage,nmap-ssl))
+$(eval $(call BuildPackage,nmap-full))
 $(eval $(call BuildPackage,ncat))
 $(eval $(call BuildPackage,ncat-ssl))
+$(eval $(call BuildPackage,ncat-full))
 $(eval $(call BuildPackage,nping))
+$(eval $(call BuildPackage,nping-ssl))
+
+$(eval $(call Py3Package,ndiff))
 $(eval $(call BuildPackage,ndiff))
+$(eval $(call BuildPackage,ndiff-src))
diff --git a/net/nmap/patches/010-Avoid-using-namespace-std-causing-name-conflicts.patch b/net/nmap/patches/010-Avoid-using-namespace-std-causing-name-conflicts.patch
new file mode 100644 (file)
index 0000000..400ea1a
--- /dev/null
@@ -0,0 +1,135 @@
+From ea4e2d6657103a2c3d6f543a1a8619eb4d4472c8 Mon Sep 17 00:00:00 2001
+From: dmiller <dmiller@e0a8ed71-7df4-0310-8962-fdc924857419>
+Date: Mon, 30 Dec 2019 04:03:03 +0000
+Subject: [PATCH] Avoid 'using namespace std' causing name conflicts. Fixes
+ #1363, fixes #1867
+
+---
+ CHANGELOG            | 4 ++++
+ nping/EchoServer.cc  | 2 +-
+ nping/EchoServer.h   | 4 +---
+ nping/NEPContext.h   | 3 +--
+ nping/NpingTargets.h | 4 +---
+ nping/ProbeMode.h    | 2 --
+ nping/nping.cc       | 1 -
+ nping/utils.h        | 2 --
+ 8 files changed, 8 insertions(+), 14 deletions(-)
+
+diff --git a/nping/EchoServer.cc b/nping/EchoServer.cc
+index ccdcf9c2d0..a824340cd2 100644
+--- a/nping/EchoServer.cc
++++ b/nping/EchoServer.cc
+@@ -199,7 +199,7 @@ NEPContext *EchoServer::getClientContext(nsock_iod iod){
+   * the context could not be found.  */
+ int EchoServer::destroyClientContext(clientid_t clnt){
+   bool deleted=false;
+-  vector<NEPContext>::iterator it;
++  std::vector<NEPContext>::iterator it;
+   /* Iterate through the context array and delete the one that belongs to clnt */
+   for ( it=this->client_ctx.begin(); it<this->client_ctx.end(); it++){
+       if(it->getIdentifier()==clnt){
+diff --git a/nping/EchoServer.h b/nping/EchoServer.h
+index c3dece6341..c9fee6de9e 100644
+--- a/nping/EchoServer.h
++++ b/nping/EchoServer.h
+@@ -136,15 +136,13 @@
+ #include <vector>
+ #include "NEPContext.h"
+-using namespace std;
+-
+ #define LISTEN_QUEUE_SIZE 10
+ class EchoServer  {
+     private:
+         /* Attributes */
+-        vector<NEPContext> client_ctx;
++        std::vector<NEPContext> client_ctx;
+         clientid_t client_id_count;
+         /* Methods */
+diff --git a/nping/NEPContext.h b/nping/NEPContext.h
+index 5e470d7551..32b8be48d6 100644
+--- a/nping/NEPContext.h
++++ b/nping/NEPContext.h
+@@ -135,7 +135,6 @@
+ #include "nsock.h"
+ #include "EchoHeader.h"
+ #include <vector>
+-using namespace std;
+ /* SERVER STATE MACHINE                                                       */
+ /*                      _                                                     */
+@@ -204,7 +203,7 @@ class NEPContext {
+         u8 client_nonce[NONCE_LEN];
+         bool server_nonce_set;
+         bool client_nonce_set;
+-        vector<fspec_t> fspecs;
++        std::vector<fspec_t> fspecs;
+         struct sockaddr_storage clnt_addr;
+         u8 *generateKey(int key_type, size_t *final_len);
+diff --git a/nping/NpingTargets.h b/nping/NpingTargets.h
+index 61bb356f39..3a9a2145af 100644
+--- a/nping/NpingTargets.h
++++ b/nping/NpingTargets.h
+@@ -137,8 +137,6 @@
+ #include "NpingTarget.h"
+ #include <vector>
+-using namespace std;
+-
+ #define MAX_NPING_HOSTNAME_LEN 512    /**< Max length for named hosts */
+ class NpingTargets {
+@@ -176,7 +174,7 @@ class NpingTargets {
+     /* TODO: Make private */
+     NpingTarget *currenths;
+-    vector<NpingTarget *> Targets;
++    std::vector<NpingTarget *> Targets;
+ }; /* End of class NpingTargets */
+diff --git a/nping/ProbeMode.h b/nping/ProbeMode.h
+index aa86939e02..313776d862 100644
+--- a/nping/ProbeMode.h
++++ b/nping/ProbeMode.h
+@@ -135,11 +135,9 @@
+ #include "nping.h"
+ #include "nsock.h"
+-#include <vector>
+ #include "NpingTarget.h"
+ #include "utils_net.h"
+ #include "utils.h"
+-using namespace std;
+ #define PKT_TYPE_TCP_CONNECT  1
+ #define PKT_TYPE_UDP_NORMAL   2
+diff --git a/nping/nping.cc b/nping/nping.cc
+index 9de151a7be..40df912a88 100644
+--- a/nping/nping.cc
++++ b/nping/nping.cc
+@@ -150,7 +150,6 @@
+ #include <signal.h>
+ #include <time.h>
+-using namespace std;
+ NpingOps o;
+ EchoClient ec;
+ EchoServer es;
+diff --git a/nping/utils.h b/nping/utils.h
+index c3516cf29f..5de6b64b89 100644
+--- a/nping/utils.h
++++ b/nping/utils.h
+@@ -143,8 +143,6 @@
+ #endif
+ #include "global_structures.h"
+-#include <vector>
+-using namespace std;
+ /* Function prototypes */
+ bool contains(const char *source, const char *substring);
diff --git a/net/nmap/patches/010-cxx.patch b/net/nmap/patches/010-cxx.patch
deleted file mode 100644 (file)
index 8007b60..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
---- a/nmap_error.cc
-+++ b/nmap_error.cc
-@@ -135,6 +135,7 @@
- #include "xml.h"
- #include <errno.h>
-+#include <time.h>
- extern NmapOps o;
---- a/nping/EchoServer.cc
-+++ b/nping/EchoServer.cc
-@@ -131,6 +131,7 @@
- #include "EchoServer.h"
- #include "EchoHeader.h"
- #include "NEPContext.h"
-+#include <ctime>
- #include <vector>
- #include "nsock.h"
- #include "output.h"
-@@ -281,12 +282,12 @@ int EchoServer::nep_listen_socket(){
-         server_addr6.sin6_len = sizeof(struct sockaddr_in6);
-     #endif
-     /* Bind to local address and the specified port */
--    if( bind(master_sd, (struct sockaddr *)&server_addr6, sizeof(server_addr6)) != 0 ){
-+    if( ::bind(master_sd, (struct sockaddr *)&server_addr6, sizeof(server_addr6)) != 0 ){
-         nping_warning(QT_3, "Failed to bind to source address %s. Trying to bind to port %d...", IPtoa(server_addr6.sin6_addr), port);
-         /* If the bind failed for the supplied address, just try again with in6addr_any */
-         if( o.spoofSource() ){
-             server_addr6.sin6_addr = in6addr_any;
--            if( bind(master_sd, (struct sockaddr *)&server_addr6, sizeof(server_addr6)) != 0 ){
-+            if( ::bind(master_sd, (struct sockaddr *)&server_addr6, sizeof(server_addr6)) != 0 ){
-                 nping_fatal(QT_3, "Could not bind to port %d (%s).", port, strerror(errno));
-             }else{ 
-                 nping_print(VB_1, "Server bound to port %d", port);
-@@ -319,12 +320,12 @@ int EchoServer::nep_listen_socket(){
- #endif
-     /* Bind to local address and the specified port */
--    if( bind(master_sd, (struct sockaddr *)&server_addr4, sizeof(server_addr4)) != 0 ){
-+    if( ::bind(master_sd, (struct sockaddr *)&server_addr4, sizeof(server_addr4)) != 0 ){
-         nping_warning(QT_3, "Failed to bind to source address %s. Trying to bind to port %d...", IPtoa(server_addr4.sin_addr), port);
-         /* If the bind failed for the supplied address, just try again with in6addr_any */
-         if( o.spoofSource() ){
-             server_addr4.sin_addr.s_addr=INADDR_ANY;
--            if( bind(master_sd, (struct sockaddr *)&server_addr4, sizeof(server_addr4)) != 0 ){
-+            if( ::bind(master_sd, (struct sockaddr *)&server_addr4, sizeof(server_addr4)) != 0 ){
-                 nping_fatal(QT_3, "Could not bind to port %d (%s).", port, strerror(errno));
-             }else{
-                 nping_print(VB_1, "Server bound to port %d", port);
---- a/osscan.cc
-+++ b/osscan.cc
-@@ -151,6 +151,7 @@
- #endif
- #include <algorithm>
-+#include <ctime>
- #include <list>
- #include <set>
---- a/osscan2.cc
-+++ b/osscan2.cc
-@@ -145,6 +145,7 @@
- #include "struct_ip.h"
-+#include <ctime>
- #include <list>
- #include <math.h>
---- a/service_scan.cc
-+++ b/service_scan.cc
-@@ -173,6 +173,7 @@
- #endif
- #include <algorithm>
-+#include <ctime>
- #include <list>
- extern NmapOps o;
diff --git a/net/nmap/patches/020-Python3-port-of-ndiff.patch b/net/nmap/patches/020-Python3-port-of-ndiff.patch
new file mode 100644 (file)
index 0000000..ccf09c6
--- /dev/null
@@ -0,0 +1,1715 @@
+From: Bryan Quigley <bryan.quigley@canonical.com>
+Date: Sat, 2 Nov 2019 21:06:44 -0700
+Subject: Python3 port of ndiff
+
+Ported all python scrips in ndiff/ except setup.py
+
+Some hints on cmp taken from #1484
+
+Minor tweaks to Makefile to support python3, but unsure if
+there is a better way to do that.
+
+Seperated .travis.yml commands for easier debugging where it breaks.
+
+This closes the easy half of #1176
+
+Resolves: #1484
+---
+ .travis.yml                   |   8 +-
+ Makefile.in                   |   6 +-
+ ndiff/ndiff.py                | 495 +++++++++++++++++++++---------------------
+ ndiff/ndifftest.py            |  94 ++++----
+ ndiff/scripts/ndiff           |  14 +-
+ ndiff/setup.py                |  34 +--
+ ndiff/test-scans/anonymize.py |  18 +-
+ 7 files changed, 337 insertions(+), 332 deletions(-)
+ mode change 100644 => 100755 ndiff/setup.py
+
+diff --git a/.travis.yml b/.travis.yml
+index 145ebc6..9bb50d6 100644
+--- a/.travis.yml
++++ b/.travis.yml
+@@ -4,7 +4,13 @@ compiler:
+   - clang
+ # Change this to your needs
+ sudo: false
+-script: mkdir /tmp/n && ./configure $SSL_FLAG $LUA_FLAG --prefix=/tmp/n && make && make check && make install && /tmp/n/bin/nmap -A localhost
++script:
++  - "mkdir /tmp/n"
++  - "./configure $SSL_FLAG $LUA_FLAG --prefix=/tmp/n"
++  - "make"
++  - "make check"
++  - "make install"
++  - "/tmp/n/bin/nmap -A localhost"
+ env:
+   - SSL_FLAG="--without-openssl" LUA_FLAG="--without-liblua"
+diff --git a/Makefile.in b/Makefile.in
+index 7ac5ae5..a0152f4 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -35,6 +35,7 @@ ZENMAPDIR = @ZENMAPDIR@
+ NDIFFDIR = @NDIFFDIR@
+ NPINGDIR = @NPINGDIR@
+ PYTHON = @PYTHON@
++PYTHON3 = /usr/bin/env python3
+ DEFS = @DEFS@ -DNMAP_PLATFORM=\"$(NMAP_PLATFORM)\" -DNMAPDATADIR=\"$(nmapdatadir)\"
+ # With GCC, add extra security checks to source code.
+ # http://gcc.gnu.org/ml/gcc-patches/2004-09/msg02055.html
+@@ -368,6 +369,7 @@ tests/check_dns: $(OBJS)
+ # this as the location of the interpreter whenever we're not doing a
+ # local installation.
+ DEFAULT_PYTHON_PATH = /usr/bin/env python
++DEFAULT_PYTHON3_PATH = /usr/bin/env python3
+ build-zenmap: $(ZENMAPDIR)/setup.py $(ZENMAPDIR)/zenmapCore/Version.py
+ # When DESTDIR is defined, assume we're building an executable
+@@ -388,7 +390,7 @@ install-zenmap: $(ZENMAPDIR)/setup.py
+       ln -sf zenmap $(DESTDIR)$(bindir)/xnmap
+ build-ndiff:
+-      cd $(NDIFFDIR) && $(PYTHON) setup.py build $(if $(DESTDIR),--executable "$(DEFAULT_PYTHON_PATH)")
++      cd $(NDIFFDIR) && $(PYTHON) setup.py build $(if $(DESTDIR),--executable "$(DEFAULT_PYTHON3_PATH)")
+ build-nping: $(NPINGDIR)/Makefile build-nbase build-nsock build-netutil $(NPINGDIR)/nping.h @DNET_BUILD@ @PCAP_BUILD@
+       @cd $(NPINGDIR) && $(MAKE)
+@@ -458,7 +460,7 @@ check-ncat:
+       @cd $(NCATDIR) && $(MAKE) check
+ check-ndiff:
+-      @cd $(NDIFFDIR) && $(PYTHON) ndifftest.py
++      @cd $(NDIFFDIR) && $(PYTHON3) ndifftest.py
+ check-nsock:
+       @cd $(NSOCKDIR)/src && $(MAKE) check
+diff --git a/ndiff/ndiff.py b/ndiff/ndiff.py
+index 043273f..abbd1c5 100755
+--- a/ndiff/ndiff.py
++++ b/ndiff/ndiff.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # Ndiff
+ #
+@@ -26,11 +26,11 @@ xml.__path__ = [x for x in xml.__path__ if "_xmlplus" not in x]
+ import xml.sax
+ import xml.sax.saxutils
+ import xml.dom.minidom
+-from StringIO import StringIO
++from io import StringIO
+ verbose = False
+-NDIFF_XML_VERSION = u"1"
++NDIFF_XML_VERSION = "1"
+ class OverrideEntityResolver(xml.sax.handler.EntityResolver):
+@@ -78,35 +78,35 @@ class Scan(object):
+     def write_nmaprun_open(self, writer):
+         attrs = {}
+         if self.scanner is not None:
+-            attrs[u"scanner"] = self.scanner
++            attrs["scanner"] = self.scanner
+         if self.args is not None:
+-            attrs[u"args"] = self.args
++            attrs["args"] = self.args
+         if self.start_date is not None:
+-            attrs[u"start"] = "%d" % time.mktime(self.start_date.timetuple())
+-            attrs[u"startstr"] = self.start_date.strftime(
++            attrs["start"] = "%d" % time.mktime(self.start_date.timetuple())
++            attrs["startstr"] = self.start_date.strftime(
+                     "%a %b %d %H:%M:%S %Y")
+         if self.version is not None:
+-            attrs[u"version"] = self.version
+-        writer.startElement(u"nmaprun", attrs)
++            attrs["version"] = self.version
++        writer.startElement("nmaprun", attrs)
+     def write_nmaprun_close(self, writer):
+-        writer.endElement(u"nmaprun")
++        writer.endElement("nmaprun")
+     def nmaprun_to_dom_fragment(self, document):
+         frag = document.createDocumentFragment()
+-        elem = document.createElement(u"nmaprun")
++        elem = document.createElement("nmaprun")
+         if self.scanner is not None:
+-            elem.setAttribute(u"scanner", self.scanner)
++            elem.setAttribute("scanner", self.scanner)
+         if self.args is not None:
+-            elem.setAttribute(u"args", self.args)
++            elem.setAttribute("args", self.args)
+         if self.start_date is not None:
+             elem.setAttribute(
+-                    u"start", "%d" % time.mktime(self.start_date.timetuple()))
++                    "start", "%d" % time.mktime(self.start_date.timetuple()))
+             elem.setAttribute(
+-                    u"startstr",
++                    "startstr",
+                     self.start_date.strftime("%a %b %d %H:%M:%S %Y"))
+         if self.version is not None:
+-            elem.setAttribute(u"version", self.version)
++            elem.setAttribute("version", self.version)
+         frag.appendChild(elem)
+         return frag
+@@ -136,17 +136,17 @@ class Host(object):
+     def format_name(self):
+         """Return a human-readable identifier for this host."""
+-        address_s = u", ".join(a.s for a in sorted(self.addresses))
+-        hostname_s = u", ".join(sorted(self.hostnames))
++        address_s = ", ".join(a.s for a in sorted(self.addresses))
++        hostname_s = ", ".join(sorted(self.hostnames))
+         if len(hostname_s) > 0:
+             if len(address_s) > 0:
+-                return u"%s (%s)" % (hostname_s, address_s)
++                return "%s (%s)" % (hostname_s, address_s)
+             else:
+                 return hostname_s
+         elif len(address_s) > 0:
+             return address_s
+         else:
+-            return u"<no name>"
++            return "<no name>"
+     def add_port(self, port):
+         self.ports[port.spec] = port
+@@ -163,46 +163,46 @@ class Host(object):
+         return state is None or state in self.extraports
+     def extraports_string(self):
+-        list = [(count, state) for (state, count) in self.extraports.items()]
++        locallist = [(count, state) for (state, count) in list(self.extraports.items())]
+         # Reverse-sort by count.
+-        list.sort(reverse=True)
+-        return u", ".join(
+-                [u"%d %s ports" % (count, state) for (count, state) in list])
++        locallist.sort(reverse=True)
++        return ", ".join(
++                ["%d %s ports" % (count, state) for (count, state) in locallist])
+     def state_to_dom_fragment(self, document):
+         frag = document.createDocumentFragment()
+         if self.state is not None:
+-            elem = document.createElement(u"status")
+-            elem.setAttribute(u"state", self.state)
++            elem = document.createElement("status")
++            elem.setAttribute("state", self.state)
+             frag.appendChild(elem)
+         return frag
+     def hostname_to_dom_fragment(self, document, hostname):
+         frag = document.createDocumentFragment()
+-        elem = document.createElement(u"hostname")
+-        elem.setAttribute(u"name", hostname)
++        elem = document.createElement("hostname")
++        elem.setAttribute("name", hostname)
+         frag.appendChild(elem)
+         return frag
+     def extraports_to_dom_fragment(self, document):
+         frag = document.createDocumentFragment()
+-        for state, count in self.extraports.items():
+-            elem = document.createElement(u"extraports")
+-            elem.setAttribute(u"state", state)
+-            elem.setAttribute(u"count", unicode(count))
++        for state, count in list(self.extraports.items()):
++            elem = document.createElement("extraports")
++            elem.setAttribute("state", state)
++            elem.setAttribute("count", str(count))
+             frag.appendChild(elem)
+         return frag
+     def os_to_dom_fragment(self, document, os):
+         frag = document.createDocumentFragment()
+-        elem = document.createElement(u"osmatch")
+-        elem.setAttribute(u"name", os)
++        elem = document.createElement("osmatch")
++        elem.setAttribute("name", os)
+         frag.appendChild(elem)
+         return frag
+     def to_dom_fragment(self, document):
+         frag = document.createDocumentFragment()
+-        elem = document.createElement(u"host")
++        elem = document.createElement("host")
+         if self.state is not None:
+             elem.appendChild(self.state_to_dom_fragment(document))
+@@ -211,13 +211,13 @@ class Host(object):
+             elem.appendChild(addr.to_dom_fragment(document))
+         if len(self.hostnames) > 0:
+-            hostnames_elem = document.createElement(u"hostnames")
++            hostnames_elem = document.createElement("hostnames")
+             for hostname in self.hostnames:
+                 hostnames_elem.appendChild(
+                         self.hostname_to_dom_fragment(document, hostname))
+             elem.appendChild(hostnames_elem)
+-        ports_elem = document.createElement(u"ports")
++        ports_elem = document.createElement("ports")
+         ports_elem.appendChild(self.extraports_to_dom_fragment(document))
+         for port in sorted(self.ports.values()):
+             if not self.is_extraports(port.state):
+@@ -226,13 +226,13 @@ class Host(object):
+             elem.appendChild(ports_elem)
+         if len(self.os) > 0:
+-            os_elem = document.createElement(u"os")
++            os_elem = document.createElement("os")
+             for os in self.os:
+                 os_elem.appendChild(self.os_to_dom_fragment(document, os))
+             elem.appendChild(os_elem)
+         if len(self.script_results) > 0:
+-            hostscript_elem = document.createElement(u"hostscript")
++            hostscript_elem = document.createElement("hostscript")
+             for sr in self.script_results:
+                 hostscript_elem.appendChild(sr.to_dom_fragment(document))
+             elem.appendChild(hostscript_elem)
+@@ -246,7 +246,7 @@ class Address(object):
+         self.s = s
+     def __eq__(self, other):
+-        return self.__cmp__(other) == 0
++        return self.sort_key() == other.sort_key()
+     def __ne__(self, other):
+         return not self.__eq__(other)
+@@ -254,8 +254,8 @@ class Address(object):
+     def __hash__(self):
+         return hash(self.sort_key())
+-    def __cmp__(self, other):
+-        return cmp(self.sort_key(), other.sort_key())
++    def __lt__(self, other):
++        return self.sort_key() < other.sort_key()
+     def __str__(self):
+         return str(self.s)
+@@ -264,21 +264,21 @@ class Address(object):
+         return self.s
+     def new(type, s):
+-        if type == u"ipv4":
++        if type == "ipv4":
+             return IPv4Address(s)
+-        elif type == u"ipv6":
++        elif type == "ipv6":
+             return IPv6Address(s)
+-        elif type == u"mac":
++        elif type == "mac":
+             return MACAddress(s)
+         else:
+-            raise ValueError(u"Unknown address type %s." % type)
++            raise ValueError("Unknown address type %s." % type)
+     new = staticmethod(new)
+     def to_dom_fragment(self, document):
+         frag = document.createDocumentFragment()
+-        elem = document.createElement(u"address")
+-        elem.setAttribute(u"addr", self.s)
+-        elem.setAttribute(u"addrtype", self.type)
++        elem = document.createElement("address")
++        elem.setAttribute("addr", self.s)
++        elem.setAttribute("addrtype", self.type)
+         frag.appendChild(elem)
+         return frag
+@@ -287,21 +287,21 @@ class Address(object):
+ class IPv4Address(Address):
+-    type = property(lambda self: u"ipv4")
++    type = property(lambda self: "ipv4")
+     def sort_key(self):
+         return (0, self.s)
+ class IPv6Address(Address):
+-    type = property(lambda self: u"ipv6")
++    type = property(lambda self: "ipv6")
+     def sort_key(self):
+         return (1, self.s)
+ class MACAddress(Address):
+-    type = property(lambda self: u"mac")
++    type = property(lambda self: "mac")
+     def sort_key(self):
+         return (2, self.s)
+@@ -320,28 +320,25 @@ class Port(object):
+     def state_string(self):
+         if self.state is None:
+-            return u"unknown"
++            return "unknown"
+         else:
+-            return unicode(self.state)
++            return str(self.state)
+     def spec_string(self):
+-        return u"%d/%s" % self.spec
++        return "%d/%s" % self.spec
+-    def __cmp__(self, other):
+-        d = cmp(self.spec, other.spec)
+-        if d != 0:
+-            return d
+-        return cmp((self.spec, self.service, self.script_results),
+-            (other.spec, other.service, other.script_results))
++    def __lt__(self, other):
++        return (self.spec, self.service, self.script_results) < (
++            other.spec, other.service, other.script_results)
+     def to_dom_fragment(self, document):
+         frag = document.createDocumentFragment()
+-        elem = document.createElement(u"port")
+-        elem.setAttribute(u"portid", unicode(self.spec[0]))
+-        elem.setAttribute(u"protocol", self.spec[1])
++        elem = document.createElement("port")
++        elem.setAttribute("portid", str(self.spec[0]))
++        elem.setAttribute("protocol", self.spec[1])
+         if self.state is not None:
+-            state_elem = document.createElement(u"state")
+-            state_elem.setAttribute(u"state", self.state)
++            state_elem = document.createElement("state")
++            state_elem.setAttribute("state", self.state)
+             elem.appendChild(state_elem)
+         elem.appendChild(self.service.to_dom_fragment(document))
+         for sr in self.script_results:
+@@ -385,7 +382,7 @@ class Service(object):
+         if len(parts) == 0:
+             return None
+         else:
+-            return u"/".join(parts)
++            return "/".join(parts)
+     def version_string(self):
+         """Get a string like in the VERSION column of Nmap output."""
+@@ -395,17 +392,17 @@ class Service(object):
+         if self.version is not None:
+             parts.append(self.version)
+         if self.extrainfo is not None:
+-            parts.append(u"(%s)" % self.extrainfo)
++            parts.append("(%s)" % self.extrainfo)
+         if len(parts) == 0:
+             return None
+         else:
+-            return u" ".join(parts)
++            return " ".join(parts)
+     def to_dom_fragment(self, document):
+         frag = document.createDocumentFragment()
+-        elem = document.createElement(u"service")
+-        for attr in (u"name", u"product", u"version", u"extrainfo", u"tunnel"):
++        elem = document.createElement("service")
++        for attr in ("name", "product", "version", "extrainfo", "tunnel"):
+             v = getattr(self, attr)
+             if v is None:
+                 continue
+@@ -435,53 +432,53 @@ class ScriptResult(object):
+         result = []
+         lines = self.output.splitlines()
+         if len(lines) > 0:
+-            lines[0] = self.id + u": " + lines[0]
++            lines[0] = self.id + ": " + lines[0]
+         for line in lines[:-1]:
+-            result.append(u"|  " + line)
++            result.append("|  " + line)
+         if len(lines) > 0:
+-            result.append(u"|_ " + lines[-1])
++            result.append("|_ " + lines[-1])
+         return result
+     def to_dom_fragment(self, document):
+         frag = document.createDocumentFragment()
+-        elem = document.createElement(u"script")
+-        elem.setAttribute(u"id", self.id)
+-        elem.setAttribute(u"output", self.output)
++        elem = document.createElement("script")
++        elem.setAttribute("id", self.id)
++        elem.setAttribute("output", self.output)
+         frag.appendChild(elem)
+         return frag
+ def format_banner(scan):
+     """Format a startup banner more or less like Nmap does."""
+-    scanner = u"Nmap"
+-    if scan.scanner is not None and scan.scanner != u"nmap":
++    scanner = "Nmap"
++    if scan.scanner is not None and scan.scanner != "nmap":
+         scanner = scan.scanner
+     parts = [scanner]
+     if scan.version is not None:
+         parts.append(scan.version)
+-    parts.append(u"scan")
++    parts.append("scan")
+     if scan.start_date is not None:
+-        parts.append(u"initiated %s" % scan.start_date.strftime(
++        parts.append("initiated %s" % scan.start_date.strftime(
+             "%a %b %d %H:%M:%S %Y"))
+     if scan.args is not None:
+-        parts.append(u"as: %s" % scan.args)
+-    return u" ".join(parts)
++        parts.append("as: %s" % scan.args)
++    return " ".join(parts)
+ def print_script_result_diffs_text(title, script_results_a, script_results_b,
+         script_result_diffs, f=sys.stdout):
+-    table = Table(u"*")
++    table = Table("*")
+     for sr_diff in script_result_diffs:
+         sr_diff.append_to_port_table(table)
+     if len(table) > 0:
+-        print >> f
++        print(file=f)
+         if len(script_results_b) == 0:
+-            print >> f, u"-%s:" % title
++            print("-%s:" % title, file=f)
+         elif len(script_results_a) == 0:
+-            print >> f, u"+%s:" % title
++            print("+%s:" % title, file=f)
+         else:
+-            print >> f, u" %s:" % title
+-        print >> f, table
++            print(" %s:" % title, file=f)
++        print(table, file=f)
+ def script_result_diffs_to_dom_fragment(elem, script_results_a,
+@@ -489,13 +486,13 @@ def script_result_diffs_to_dom_fragment(elem, script_results_a,
+     if len(script_results_a) == 0 and len(script_results_b) == 0:
+         return document.createDocumentFragment()
+     elif len(script_results_b) == 0:
+-        a_elem = document.createElement(u"a")
++        a_elem = document.createElement("a")
+         for sr in script_results_a:
+             elem.appendChild(sr.to_dom_fragment(document))
+         a_elem.appendChild(elem)
+         return a_elem
+     elif len(script_results_a) == 0:
+-        b_elem = document.createElement(u"b")
++        b_elem = document.createElement("b")
+         for sr in script_results_b:
+             elem.appendChild(sr.to_dom_fragment(document))
+         b_elem.appendChild(elem)
+@@ -581,10 +578,10 @@ class ScanDiffText(ScanDiff):
+         banner_a = format_banner(self.scan_a)
+         banner_b = format_banner(self.scan_b)
+         if banner_a != banner_b:
+-            print >> self.f, u"-%s" % banner_a
+-            print >> self.f, u"+%s" % banner_b
++            print("-%s" % banner_a, file=self.f)
++            print("+%s" % banner_b, file=self.f)
+         elif verbose:
+-            print >> self.f, u" %s" % banner_a
++            print(" %s" % banner_a, file=self.f)
+     def output_pre_scripts(self, pre_script_result_diffs):
+         print_script_result_diffs_text("Pre-scan script results",
+@@ -597,7 +594,7 @@ class ScanDiffText(ScanDiff):
+             post_script_result_diffs, self.f)
+     def output_host_diff(self, h_diff):
+-        print >> self.f
++        print(file=self.f)
+         h_diff.print_text(self.f)
+     def output_ending(self):
+@@ -622,8 +619,8 @@ class ScanDiffXML(ScanDiff):
+     def output_beginning(self):
+         self.writer.startDocument()
+-        self.writer.startElement(u"nmapdiff", {u"version": NDIFF_XML_VERSION})
+-        self.writer.startElement(u"scandiff", {})
++        self.writer.startElement("nmapdiff", {"version": NDIFF_XML_VERSION})
++        self.writer.startElement("scandiff", {})
+         if self.nmaprun_differs():
+             self.writer.frag_a(
+@@ -636,7 +633,7 @@ class ScanDiffXML(ScanDiff):
+     def output_pre_scripts(self, pre_script_result_diffs):
+         if len(pre_script_result_diffs) > 0 or verbose:
+-            prescript_elem = self.document.createElement(u"prescript")
++            prescript_elem = self.document.createElement("prescript")
+             frag = script_result_diffs_to_dom_fragment(
+                 prescript_elem, self.scan_a.pre_script_results,
+                 self.scan_b.pre_script_results, pre_script_result_diffs,
+@@ -646,7 +643,7 @@ class ScanDiffXML(ScanDiff):
+     def output_post_scripts(self, post_script_result_diffs):
+         if len(post_script_result_diffs) > 0 or verbose:
+-            postscript_elem = self.document.createElement(u"postscript")
++            postscript_elem = self.document.createElement("postscript")
+             frag = script_result_diffs_to_dom_fragment(
+                 postscript_elem, self.scan_a.post_script_results,
+                 self.scan_b.post_script_results, post_script_result_diffs,
+@@ -660,8 +657,8 @@ class ScanDiffXML(ScanDiff):
+         frag.unlink()
+     def output_ending(self):
+-        self.writer.endElement(u"scandiff")
+-        self.writer.endElement(u"nmapdiff")
++        self.writer.endElement("scandiff")
++        self.writer.endElement("nmapdiff")
+         self.writer.endDocument()
+@@ -719,9 +716,9 @@ class HostDiff(object):
+         self.cost += os_cost
+         extraports_a = tuple((count, state)
+-                for (state, count) in self.host_a.extraports.items())
++                for (state, count) in list(self.host_a.extraports.items()))
+         extraports_b = tuple((count, state)
+-                for (state, count) in self.host_b.extraports.items())
++                for (state, count) in list(self.host_b.extraports.items()))
+         if extraports_a != extraports_b:
+             self.extraports_changed = True
+             self.cost += 1
+@@ -747,69 +744,69 @@ class HostDiff(object):
+         # Names and addresses.
+         if self.id_changed:
+             if host_a.state is not None:
+-                print >> f, u"-%s:" % host_a.format_name()
++                print("-%s:" % host_a.format_name(), file=f)
+             if self.host_b.state is not None:
+-                print >> f, u"+%s:" % host_b.format_name()
++                print("+%s:" % host_b.format_name(), file=f)
+         else:
+-            print >> f, u" %s:" % host_a.format_name()
++            print(" %s:" % host_a.format_name(), file=f)
+         # State.
+         if self.state_changed:
+             if host_a.state is not None:
+-                print >> f, u"-Host is %s." % host_a.state
++                print("-Host is %s." % host_a.state, file=f)
+             if host_b.state is not None:
+-                print >> f, u"+Host is %s." % host_b.state
++                print("+Host is %s." % host_b.state, file=f)
+         elif verbose:
+-            print >> f, u" Host is %s." % host_b.state
++            print(" Host is %s." % host_b.state, file=f)
+         # Extraports.
+         if self.extraports_changed:
+             if len(host_a.extraports) > 0:
+-                print >> f, u"-Not shown: %s" % host_a.extraports_string()
++                print("-Not shown: %s" % host_a.extraports_string(), file=f)
+             if len(host_b.extraports) > 0:
+-                print >> f, u"+Not shown: %s" % host_b.extraports_string()
++                print("+Not shown: %s" % host_b.extraports_string(), file=f)
+         elif verbose:
+             if len(host_a.extraports) > 0:
+-                print >> f, u" Not shown: %s" % host_a.extraports_string()
++                print(" Not shown: %s" % host_a.extraports_string(), file=f)
+         # Port table.
+-        port_table = Table(u"** * * *")
++        port_table = Table("** * * *")
+         if host_a.state is None:
+-            mark = u"+"
++            mark = "+"
+         elif host_b.state is None:
+-            mark = u"-"
++            mark = "-"
+         else:
+-            mark = u" "
+-        port_table.append((mark, u"PORT", u"STATE", u"SERVICE", u"VERSION"))
++            mark = " "
++        port_table.append((mark, "PORT", "STATE", "SERVICE", "VERSION"))
+         for port in self.ports:
+             port_diff = self.port_diffs[port]
+             port_diff.append_to_port_table(port_table, host_a, host_b)
+         if len(port_table) > 1:
+-            print >> f, port_table
++            print(port_table, file=f)
+         # OS changes.
+         if self.os_changed or verbose:
+             if len(host_a.os) > 0:
+                 if len(host_b.os) > 0:
+-                    print >> f, u" OS details:"
++                    print(" OS details:", file=f)
+                 else:
+-                    print >> f, u"-OS details:"
++                    print("-OS details:", file=f)
+             elif len(host_b.os) > 0:
+-                print >> f, u"+OS details:"
++                print("+OS details:", file=f)
+             # os_diffs is a list of 5-tuples returned by
+             # difflib.SequenceMatcher.
+             for op, i1, i2, j1, j2 in self.os_diffs:
+                 if op == "replace" or op == "delete":
+                     for i in range(i1, i2):
+-                        print >> f, "-  %s" % host_a.os[i]
++                        print("-  %s" % host_a.os[i], file=f)
+                 if op == "replace" or op == "insert":
+                     for i in range(j1, j2):
+-                        print >> f, "+  %s" % host_b.os[i]
++                        print("+  %s" % host_b.os[i], file=f)
+                 if op == "equal":
+                     for i in range(i1, i2):
+-                        print >> f, "   %s" % host_a.os[i]
++                        print("   %s" % host_a.os[i], file=f)
+         print_script_result_diffs_text("Host script results",
+             host_a.script_results, host_b.script_results,
+@@ -820,32 +817,32 @@ class HostDiff(object):
+         host_b = self.host_b
+         frag = document.createDocumentFragment()
+-        hostdiff_elem = document.createElement(u"hostdiff")
++        hostdiff_elem = document.createElement("hostdiff")
+         frag.appendChild(hostdiff_elem)
+         if host_a.state is None or host_b.state is None:
+             # The host is missing in one scan. Output the whole thing.
+             if host_a.state is not None:
+-                a_elem = document.createElement(u"a")
++                a_elem = document.createElement("a")
+                 a_elem.appendChild(host_a.to_dom_fragment(document))
+                 hostdiff_elem.appendChild(a_elem)
+             elif host_b.state is not None:
+-                b_elem = document.createElement(u"b")
++                b_elem = document.createElement("b")
+                 b_elem.appendChild(host_b.to_dom_fragment(document))
+                 hostdiff_elem.appendChild(b_elem)
+             return frag
+-        host_elem = document.createElement(u"host")
++        host_elem = document.createElement("host")
+         # State.
+         if host_a.state == host_b.state:
+             if verbose:
+                 host_elem.appendChild(host_a.state_to_dom_fragment(document))
+         else:
+-            a_elem = document.createElement(u"a")
++            a_elem = document.createElement("a")
+             a_elem.appendChild(host_a.state_to_dom_fragment(document))
+             host_elem.appendChild(a_elem)
+-            b_elem = document.createElement(u"b")
++            b_elem = document.createElement("b")
+             b_elem.appendChild(host_b.state_to_dom_fragment(document))
+             host_elem.appendChild(b_elem)
+@@ -854,31 +851,31 @@ class HostDiff(object):
+         addrset_b = set(host_b.addresses)
+         for addr in sorted(addrset_a.intersection(addrset_b)):
+             host_elem.appendChild(addr.to_dom_fragment(document))
+-        a_elem = document.createElement(u"a")
++        a_elem = document.createElement("a")
+         for addr in sorted(addrset_a - addrset_b):
+             a_elem.appendChild(addr.to_dom_fragment(document))
+         if a_elem.hasChildNodes():
+             host_elem.appendChild(a_elem)
+-        b_elem = document.createElement(u"b")
++        b_elem = document.createElement("b")
+         for addr in sorted(addrset_b - addrset_a):
+             b_elem.appendChild(addr.to_dom_fragment(document))
+         if b_elem.hasChildNodes():
+             host_elem.appendChild(b_elem)
+         # Host names.
+-        hostnames_elem = document.createElement(u"hostnames")
++        hostnames_elem = document.createElement("hostnames")
+         hostnameset_a = set(host_a.hostnames)
+         hostnameset_b = set(host_b.hostnames)
+         for hostname in sorted(hostnameset_a.intersection(hostnameset_b)):
+             hostnames_elem.appendChild(
+                     host_a.hostname_to_dom_fragment(document, hostname))
+-        a_elem = document.createElement(u"a")
++        a_elem = document.createElement("a")
+         for hostname in sorted(hostnameset_a - hostnameset_b):
+             a_elem.appendChild(
+                     host_a.hostname_to_dom_fragment(document, hostname))
+         if a_elem.hasChildNodes():
+             hostnames_elem.appendChild(a_elem)
+-        b_elem = document.createElement(u"b")
++        b_elem = document.createElement("b")
+         for hostname in sorted(hostnameset_b - hostnameset_a):
+             b_elem.appendChild(
+                     host_b.hostname_to_dom_fragment(document, hostname))
+@@ -887,15 +884,15 @@ class HostDiff(object):
+         if hostnames_elem.hasChildNodes():
+             host_elem.appendChild(hostnames_elem)
+-        ports_elem = document.createElement(u"ports")
++        ports_elem = document.createElement("ports")
+         # Extraports.
+         if host_a.extraports == host_b.extraports:
+             ports_elem.appendChild(host_a.extraports_to_dom_fragment(document))
+         else:
+-            a_elem = document.createElement(u"a")
++            a_elem = document.createElement("a")
+             a_elem.appendChild(host_a.extraports_to_dom_fragment(document))
+             ports_elem.appendChild(a_elem)
+-            b_elem = document.createElement(u"b")
++            b_elem = document.createElement("b")
+             b_elem.appendChild(host_b.extraports_to_dom_fragment(document))
+             ports_elem.appendChild(b_elem)
+         # Port list.
+@@ -911,18 +908,18 @@ class HostDiff(object):
+         # OS changes.
+         if self.os_changed or verbose:
+-            os_elem = document.createElement(u"os")
++            os_elem = document.createElement("os")
+             # os_diffs is a list of 5-tuples returned by
+             # difflib.SequenceMatcher.
+             for op, i1, i2, j1, j2 in self.os_diffs:
+                 if op == "replace" or op == "delete":
+-                    a_elem = document.createElement(u"a")
++                    a_elem = document.createElement("a")
+                     for i in range(i1, i2):
+                         a_elem.appendChild(host_a.os_to_dom_fragment(
+                             document, host_a.os[i]))
+                     os_elem.appendChild(a_elem)
+                 if op == "replace" or op == "insert":
+-                    b_elem = document.createElement(u"b")
++                    b_elem = document.createElement("b")
+                     for i in range(j1, j2):
+                         b_elem.appendChild(host_b.os_to_dom_fragment(
+                             document, host_b.os[i]))
+@@ -936,7 +933,7 @@ class HostDiff(object):
+         # Host script changes.
+         if len(self.script_result_diffs) > 0 or verbose:
+-            hostscript_elem = document.createElement(u"hostscript")
++            hostscript_elem = document.createElement("hostscript")
+             host_elem.appendChild(script_result_diffs_to_dom_fragment(
+                 hostscript_elem, host_a.script_results,
+                 host_b.script_results, self.script_result_diffs,
+@@ -989,38 +986,38 @@ class PortDiff(object):
+             self.port_b.service.version_string()]
+         if a_columns == b_columns:
+             if verbose or self.script_result_diffs > 0:
+-                table.append([u" "] + a_columns)
++                table.append([" "] + a_columns)
+         else:
+             if not host_a.is_extraports(self.port_a.state):
+-                table.append([u"-"] + a_columns)
++                table.append(["-"] + a_columns)
+             if not host_b.is_extraports(self.port_b.state):
+-                table.append([u"+"] + b_columns)
++                table.append(["+"] + b_columns)
+         for sr_diff in self.script_result_diffs:
+             sr_diff.append_to_port_table(table)
+     def to_dom_fragment(self, document):
+         frag = document.createDocumentFragment()
+-        portdiff_elem = document.createElement(u"portdiff")
++        portdiff_elem = document.createElement("portdiff")
+         frag.appendChild(portdiff_elem)
+         if (self.port_a.spec == self.port_b.spec and
+                 self.port_a.state == self.port_b.state):
+-            port_elem = document.createElement(u"port")
+-            port_elem.setAttribute(u"portid", unicode(self.port_a.spec[0]))
+-            port_elem.setAttribute(u"protocol", self.port_a.spec[1])
++            port_elem = document.createElement("port")
++            port_elem.setAttribute("portid", str(self.port_a.spec[0]))
++            port_elem.setAttribute("protocol", self.port_a.spec[1])
+             if self.port_a.state is not None:
+-                state_elem = document.createElement(u"state")
+-                state_elem.setAttribute(u"state", self.port_a.state)
++                state_elem = document.createElement("state")
++                state_elem.setAttribute("state", self.port_a.state)
+                 port_elem.appendChild(state_elem)
+             if self.port_a.service == self.port_b.service:
+                 port_elem.appendChild(
+                         self.port_a.service.to_dom_fragment(document))
+             else:
+-                a_elem = document.createElement(u"a")
++                a_elem = document.createElement("a")
+                 a_elem.appendChild(
+                         self.port_a.service.to_dom_fragment(document))
+                 port_elem.appendChild(a_elem)
+-                b_elem = document.createElement(u"b")
++                b_elem = document.createElement("b")
+                 b_elem.appendChild(
+                         self.port_b.service.to_dom_fragment(document))
+                 port_elem.appendChild(b_elem)
+@@ -1028,10 +1025,10 @@ class PortDiff(object):
+                 port_elem.appendChild(sr_diff.to_dom_fragment(document))
+             portdiff_elem.appendChild(port_elem)
+         else:
+-            a_elem = document.createElement(u"a")
++            a_elem = document.createElement("a")
+             a_elem.appendChild(self.port_a.to_dom_fragment(document))
+             portdiff_elem.appendChild(a_elem)
+-            b_elem = document.createElement(u"b")
++            b_elem = document.createElement("b")
+             b_elem.appendChild(self.port_b.to_dom_fragment(document))
+             portdiff_elem.appendChild(b_elem)
+@@ -1086,13 +1083,13 @@ class ScriptResultDiff(object):
+             for op, i1, i2, j1, j2 in diffs.get_opcodes():
+                 if op == "replace" or op == "delete":
+                     for k in range(i1, i2):
+-                        table.append_raw(u"-" + a_lines[k])
++                        table.append_raw("-" + a_lines[k])
+                 if op == "replace" or op == "insert":
+                     for k in range(j1, j2):
+-                        table.append_raw(u"+" + b_lines[k])
++                        table.append_raw("+" + b_lines[k])
+                 if op == "equal":
+                     for k in range(i1, i2):
+-                        table.append_raw(u" " + a_lines[k])
++                        table.append_raw(" " + a_lines[k])
+     def to_dom_fragment(self, document):
+         frag = document.createDocumentFragment()
+@@ -1102,11 +1099,11 @@ class ScriptResultDiff(object):
+             frag.appendChild(self.sr_a.to_dom_fragment(document))
+         else:
+             if self.sr_a is not None:
+-                a_elem = document.createElement(u"a")
++                a_elem = document.createElement("a")
+                 a_elem.appendChild(self.sr_a.to_dom_fragment(document))
+                 frag.appendChild(a_elem)
+             if self.sr_b is not None:
+-                b_elem = document.createElement(u"b")
++                b_elem = document.createElement("b")
+                 b_elem.appendChild(self.sr_b.to_dom_fragment(document))
+                 frag.appendChild(b_elem)
+         return frag
+@@ -1120,7 +1117,7 @@ class Table(object):
+         copied to the output."""
+         self.widths = []
+         self.rows = []
+-        self.prefix = u""
++        self.prefix = ""
+         self.padding = []
+         j = 0
+         while j < len(template) and template[j] != "*":
+@@ -1145,7 +1142,7 @@ class Table(object):
+         for i in range(len(row)):
+             if row[i] is None:
+-                s = u""
++                s = ""
+             else:
+                 s = str(row[i])
+             if i == len(self.widths):
+@@ -1167,7 +1164,7 @@ class Table(object):
+         for row in self.rows:
+             parts = [self.prefix]
+             i = 0
+-            if isinstance(row, basestring):
++            if isinstance(row, str):
+                 # A raw string.
+                 lines.append(row)
+             else:
+@@ -1176,13 +1173,13 @@ class Table(object):
+                     if i < len(self.padding):
+                         parts.append(self.padding[i])
+                     i += 1
+-                lines.append(u"".join(parts).rstrip())
+-        return u"\n".join(lines)
++                lines.append("".join(parts).rstrip())
++        return "\n".join(lines)
+ def warn(str):
+     """Print a warning to stderr."""
+-    print >> sys.stderr, str
++    print(str, file=sys.stderr)
+ class NmapContentHandler(xml.sax.handler.ContentHandler):
+@@ -1200,22 +1197,22 @@ class NmapContentHandler(xml.sax.handler.ContentHandler):
+         self.current_port = None
+         self._start_elem_handlers = {
+-            u"nmaprun": self._start_nmaprun,
+-            u"host": self._start_host,
+-            u"status": self._start_status,
+-            u"address": self._start_address,
+-            u"hostname": self._start_hostname,
+-            u"extraports": self._start_extraports,
+-            u"port": self._start_port,
+-            u"state": self._start_state,
+-            u"service": self._start_service,
+-            u"script": self._start_script,
+-            u"osmatch": self._start_osmatch,
+-            u"finished": self._start_finished,
++            "nmaprun": self._start_nmaprun,
++            "host": self._start_host,
++            "status": self._start_status,
++            "address": self._start_address,
++            "hostname": self._start_hostname,
++            "extraports": self._start_extraports,
++            "port": self._start_port,
++            "state": self._start_state,
++            "service": self._start_service,
++            "script": self._start_script,
++            "osmatch": self._start_osmatch,
++            "finished": self._start_finished,
+         }
+         self._end_elem_handlers = {
+-            u'host': self._end_host,
+-            u'port': self._end_port,
++            'host': self._end_host,
++            'port': self._end_port,
+         }
+     def parent_element(self):
+@@ -1245,68 +1242,68 @@ class NmapContentHandler(xml.sax.handler.ContentHandler):
+     def _start_nmaprun(self, name, attrs):
+         assert self.parent_element() is None
+         if "start" in attrs:
+-            start_timestamp = int(attrs.get(u"start"))
++            start_timestamp = int(attrs.get("start"))
+             self.scan.start_date = datetime.datetime.fromtimestamp(
+                     start_timestamp)
+-        self.scan.scanner = attrs.get(u"scanner")
+-        self.scan.args = attrs.get(u"args")
+-        self.scan.version = attrs.get(u"version")
++        self.scan.scanner = attrs.get("scanner")
++        self.scan.args = attrs.get("args")
++        self.scan.version = attrs.get("version")
+     def _start_host(self, name, attrs):
+-        assert self.parent_element() == u"nmaprun"
++        assert self.parent_element() == "nmaprun"
+         self.current_host = Host()
+         self.scan.hosts.append(self.current_host)
+     def _start_status(self, name, attrs):
+-        assert self.parent_element() == u"host"
++        assert self.parent_element() == "host"
+         assert self.current_host is not None
+-        state = attrs.get(u"state")
++        state = attrs.get("state")
+         if state is None:
+             warn(u'%s element of host %s is missing the "state" attribute; '
+-                    'assuming \unknown\.' % (
++                    r'assuming \unknown\.' % (
+                         name, self.current_host.format_name()))
+             return
+         self.current_host.state = state
+     def _start_address(self, name, attrs):
+-        assert self.parent_element() == u"host"
++        assert self.parent_element() == "host"
+         assert self.current_host is not None
+-        addr = attrs.get(u"addr")
++        addr = attrs.get("addr")
+         if addr is None:
+-            warn(u'%s element of host %s is missing the "addr" '
++            warn('%s element of host %s is missing the "addr" '
+                     'attribute; skipping.' % (
+                         name, self.current_host.format_name()))
+             return
+-        addrtype = attrs.get(u"addrtype", u"ipv4")
++        addrtype = attrs.get("addrtype", "ipv4")
+         self.current_host.add_address(Address.new(addrtype, addr))
+     def _start_hostname(self, name, attrs):
+-        assert self.parent_element() == u"hostnames"
++        assert self.parent_element() == "hostnames"
+         assert self.current_host is not None
+-        hostname = attrs.get(u"name")
++        hostname = attrs.get("name")
+         if hostname is None:
+-            warn(u'%s element of host %s is missing the "name" '
++            warn('%s element of host %s is missing the "name" '
+                     'attribute; skipping.' % (
+                         name, self.current_host.format_name()))
+             return
+         self.current_host.add_hostname(hostname)
+     def _start_extraports(self, name, attrs):
+-        assert self.parent_element() == u"ports"
++        assert self.parent_element() == "ports"
+         assert self.current_host is not None
+-        state = attrs.get(u"state")
++        state = attrs.get("state")
+         if state is None:
+-            warn(u'%s element of host %s is missing the "state" '
++            warn('%s element of host %s is missing the "state" '
+                     'attribute; assuming "unknown".' % (
+                         name, self.current_host.format_name()))
+             state = None
+         if state in self.current_host.extraports:
+-            warn(u'Duplicate extraports state "%s" in host %s.' % (
++            warn('Duplicate extraports state "%s" in host %s.' % (
+                 state, self.current_host.format_name()))
+-        count = attrs.get(u"count")
++        count = attrs.get("count")
+         if count is None:
+-            warn(u'%s element of host %s is missing the "count" '
++            warn('%s element of host %s is missing the "count" '
+                     'attribute; assuming 0.' % (
+                         name, self.current_host.format_name()))
+             count = 0
+@@ -1314,99 +1311,99 @@ class NmapContentHandler(xml.sax.handler.ContentHandler):
+             try:
+                 count = int(count)
+             except ValueError:
+-                warn(u"Can't convert extraports count \"%s\" "
++                warn("Can't convert extraports count \"%s\" "
+                         "to an integer in host %s; assuming 0." % (
+-                            attrs[u"count"], self.current_host.format_name()))
++                            attrs["count"], self.current_host.format_name()))
+                 count = 0
+         self.current_host.extraports[state] = count
+     def _start_port(self, name, attrs):
+-        assert self.parent_element() == u"ports"
++        assert self.parent_element() == "ports"
+         assert self.current_host is not None
+-        portid_str = attrs.get(u"portid")
++        portid_str = attrs.get("portid")
+         if portid_str is None:
+-            warn(u'%s element of host %s missing the "portid" '
++            warn('%s element of host %s missing the "portid" '
+                     'attribute; skipping.' % (
+                         name, self.current_host.format_name()))
+             return
+         try:
+             portid = int(portid_str)
+         except ValueError:
+-            warn(u"Can't convert portid \"%s\" to an integer "
++            warn("Can't convert portid \"%s\" to an integer "
+                     "in host %s; skipping port." % (
+                         portid_str, self.current_host.format_name()))
+             return
+-        protocol = attrs.get(u"protocol")
++        protocol = attrs.get("protocol")
+         if protocol is None:
+-            warn(u'%s element of host %s missing the "protocol" '
++            warn('%s element of host %s missing the "protocol" '
+                     'attribute; skipping.' % (
+                         name, self.current_host.format_name()))
+             return
+         self.current_port = Port((portid, protocol))
+     def _start_state(self, name, attrs):
+-        assert self.parent_element() == u"port"
++        assert self.parent_element() == "port"
+         assert self.current_host is not None
+         if self.current_port is None:
+             return
+         if "state" not in attrs:
+-            warn(u'%s element of port %s is missing the "state" '
++            warn('%s element of port %s is missing the "state" '
+                     'attribute; assuming "unknown".' % (
+                         name, self.current_port.spec_string()))
+             return
+-        self.current_port.state = attrs[u"state"]
++        self.current_port.state = attrs["state"]
+         self.current_host.add_port(self.current_port)
+     def _start_service(self, name, attrs):
+-        assert self.parent_element() == u"port"
++        assert self.parent_element() == "port"
+         assert self.current_host is not None
+         if self.current_port is None:
+             return
+-        self.current_port.service.name = attrs.get(u"name")
+-        self.current_port.service.product = attrs.get(u"product")
+-        self.current_port.service.version = attrs.get(u"version")
+-        self.current_port.service.extrainfo = attrs.get(u"extrainfo")
+-        self.current_port.service.tunnel = attrs.get(u"tunnel")
++        self.current_port.service.name = attrs.get("name")
++        self.current_port.service.product = attrs.get("product")
++        self.current_port.service.version = attrs.get("version")
++        self.current_port.service.extrainfo = attrs.get("extrainfo")
++        self.current_port.service.tunnel = attrs.get("tunnel")
+     def _start_script(self, name, attrs):
+         result = ScriptResult()
+-        result.id = attrs.get(u"id")
++        result.id = attrs.get("id")
+         if result.id is None:
+-            warn(u'%s element missing the "id" attribute; skipping.' % name)
++            warn('%s element missing the "id" attribute; skipping.' % name)
+             return
+-        result.output = attrs.get(u"output")
++        result.output = attrs.get("output")
+         if result.output is None:
+-            warn(u'%s element missing the "output" attribute; skipping.'
++            warn('%s element missing the "output" attribute; skipping.'
+                     % name)
+             return
+-        if self.parent_element() == u"prescript":
++        if self.parent_element() == "prescript":
+             self.scan.pre_script_results.append(result)
+-        elif self.parent_element() == u"postscript":
++        elif self.parent_element() == "postscript":
+             self.scan.post_script_results.append(result)
+-        elif self.parent_element() == u"hostscript":
++        elif self.parent_element() == "hostscript":
+             self.current_host.script_results.append(result)
+-        elif self.parent_element() == u"port":
++        elif self.parent_element() == "port":
+             self.current_port.script_results.append(result)
+         else:
+-            warn(u"%s element not inside prescript, postscript, hostscript, "
++            warn("%s element not inside prescript, postscript, hostscript, "
+                     "or port element; ignoring." % name)
+             return
+     def _start_osmatch(self, name, attrs):
+-        assert self.parent_element() == u"os"
++        assert self.parent_element() == "os"
+         assert self.current_host is not None
+         if "name" not in attrs:
+-            warn(u'%s element of host %s is missing the "name" '
++            warn('%s element of host %s is missing the "name" '
+                     'attribute; skipping.' % (
+                         name, self.current_host.format_name()))
+             return
+-        self.current_host.os.append(attrs[u"name"])
++        self.current_host.os.append(attrs["name"])
+     def _start_finished(self, name, attrs):
+-        assert self.parent_element() == u"runstats"
++        assert self.parent_element() == "runstats"
+         if "time" in attrs:
+-            end_timestamp = int(attrs.get(u"time"))
++            end_timestamp = int(attrs.get("time"))
+             self.scan.end_date = datetime.datetime.fromtimestamp(end_timestamp)
+     def _end_host(self, name):
+@@ -1425,23 +1422,23 @@ class XMLWriter (xml.sax.saxutils.XMLGenerator):
+     def frag(self, frag):
+         for node in frag.childNodes:
+-            node.writexml(self.f, newl=u"\n")
++            node.writexml(self.f, newl="\n")
+     def frag_a(self, frag):
+-        self.startElement(u"a", {})
++        self.startElement("a", {})
+         for node in frag.childNodes:
+-            node.writexml(self.f, newl=u"\n")
+-        self.endElement(u"a")
++            node.writexml(self.f, newl="\n")
++        self.endElement("a")
+     def frag_b(self, frag):
+-        self.startElement(u"b", {})
++        self.startElement("b", {})
+         for node in frag.childNodes:
+-            node.writexml(self.f, newl=u"\n")
+-        self.endElement(u"b")
++            node.writexml(self.f, newl="\n")
++        self.endElement("b")
+ def usage():
+-    print u"""\
++    print("""\
+ Usage: %s [option] FILE1 FILE2
+ Compare two Nmap XML files and display a list of their differences.
+ Differences include host state changes, port state changes, and changes to
+@@ -1451,7 +1448,7 @@ service and OS detection.
+   -v, --verbose  also show hosts and ports that haven't changed.
+   --text         display output in text format (default)
+   --xml          display output in XML format\
+-""" % sys.argv[0]
++""" % sys.argv[0])
+ EXIT_EQUAL = 0
+ EXIT_DIFFERENT = 1
+@@ -1459,8 +1456,8 @@ EXIT_ERROR = 2
+ def usage_error(msg):
+-    print >> sys.stderr, u"%s: %s" % (sys.argv[0], msg)
+-    print >> sys.stderr, u"Try '%s -h' for help." % sys.argv[0]
++    print("%s: %s" % (sys.argv[0], msg), file=sys.stderr)
++    print("Try '%s -h' for help." % sys.argv[0], file=sys.stderr)
+     sys.exit(EXIT_ERROR)
+@@ -1471,7 +1468,7 @@ def main():
+     try:
+         opts, input_filenames = getopt.gnu_getopt(
+                 sys.argv[1:], "hv", ["help", "text", "verbose", "xml"])
+-    except getopt.GetoptError, e:
++    except getopt.GetoptError as e:
+         usage_error(e.msg)
+     for o, a in opts:
+         if o == "-h" or o == "--help":
+@@ -1481,15 +1478,15 @@ def main():
+             verbose = True
+         elif o == "--text":
+             if output_format is not None and output_format != "text":
+-                usage_error(u"contradictory output format options.")
++                usage_error("contradictory output format options.")
+             output_format = "text"
+         elif o == "--xml":
+             if output_format is not None and output_format != "xml":
+-                usage_error(u"contradictory output format options.")
++                usage_error("contradictory output format options.")
+             output_format = "xml"
+     if len(input_filenames) != 2:
+-        usage_error(u"need exactly two input filenames.")
++        usage_error("need exactly two input filenames.")
+     if output_format is None:
+         output_format = "text"
+@@ -1502,8 +1499,8 @@ def main():
+         scan_a.load_from_file(filename_a)
+         scan_b = Scan()
+         scan_b.load_from_file(filename_b)
+-    except IOError, e:
+-        print >> sys.stderr, u"Can't open file: %s" % str(e)
++    except IOError as e:
++        print("Can't open file: %s" % str(e), file=sys.stderr)
+         sys.exit(EXIT_ERROR)
+     if output_format == "text":
+diff --git a/ndiff/ndifftest.py b/ndiff/ndifftest.py
+index 2fa4ae0..27fc525 100755
+--- a/ndiff/ndifftest.py
++++ b/ndiff/ndifftest.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # Unit tests for Ndiff.
+@@ -22,7 +22,7 @@ for x in dir(ndiff):
+ sys.dont_write_bytecode = dont_write_bytecode
+ del dont_write_bytecode
+-import StringIO
++import io
+ class scan_test(unittest.TestCase):
+@@ -52,7 +52,7 @@ class scan_test(unittest.TestCase):
+         scan.load_from_file("test-scans/single.xml")
+         host = scan.hosts[0]
+         self.assertEqual(len(host.ports), 5)
+-        self.assertEqual(host.extraports.items(), [("filtered", 95)])
++        self.assertEqual(list(host.extraports.items()), [("filtered", 95)])
+     def test_extraports_multi(self):
+         """Test that the correct number of known ports is returned when there
+@@ -68,9 +68,9 @@ class scan_test(unittest.TestCase):
+         """Test that nmaprun information is recorded."""
+         scan = Scan()
+         scan.load_from_file("test-scans/empty.xml")
+-        self.assertEqual(scan.scanner, u"nmap")
+-        self.assertEqual(scan.version, u"4.90RC2")
+-        self.assertEqual(scan.args, u"nmap -oX empty.xml -p 1-100")
++        self.assertEqual(scan.scanner, "nmap")
++        self.assertEqual(scan.version, "4.90RC2")
++        self.assertEqual(scan.args, "nmap -oX empty.xml -p 1-100")
+     def test_addresses(self):
+         """Test that addresses are recorded."""
+@@ -84,7 +84,7 @@ class scan_test(unittest.TestCase):
+         scan = Scan()
+         scan.load_from_file("test-scans/simple.xml")
+         host = scan.hosts[0]
+-        self.assertEqual(host.hostnames, [u"scanme.nmap.org"])
++        self.assertEqual(host.hostnames, ["scanme.nmap.org"])
+     def test_os(self):
+         """Test that OS information is recorded."""
+@@ -99,7 +99,7 @@ class scan_test(unittest.TestCase):
+         scan.load_from_file("test-scans/complex.xml")
+         host = scan.hosts[0]
+         self.assertTrue(len(host.script_results) > 0)
+-        self.assertTrue(len(host.ports[(22, u"tcp")].script_results) > 0)
++        self.assertTrue(len(host.ports[(22, "tcp")].script_results) > 0)
+ # This test is commented out because Nmap XML doesn't store any information
+ # about down hosts, not even the fact that they are down. Recovering the list
+@@ -128,16 +128,16 @@ class host_test(unittest.TestCase):
+     def test_format_name(self):
+         h = Host()
+-        self.assertTrue(isinstance(h.format_name(), basestring))
+-        h.add_address(IPv4Address(u"127.0.0.1"))
+-        self.assertTrue(u"127.0.0.1" in h.format_name())
++        self.assertTrue(isinstance(h.format_name(), str))
++        h.add_address(IPv4Address("127.0.0.1"))
++        self.assertTrue("127.0.0.1" in h.format_name())
+         h.add_address(IPv6Address("::1"))
+-        self.assertTrue(u"127.0.0.1" in h.format_name())
+-        self.assertTrue(u"::1" in h.format_name())
+-        h.add_hostname(u"localhost")
+-        self.assertTrue(u"127.0.0.1" in h.format_name())
+-        self.assertTrue(u"::1" in h.format_name())
+-        self.assertTrue(u"localhost" in h.format_name())
++        self.assertTrue("127.0.0.1" in h.format_name())
++        self.assertTrue("::1" in h.format_name())
++        h.add_hostname("localhost")
++        self.assertTrue("127.0.0.1" in h.format_name())
++        self.assertTrue("::1" in h.format_name())
++        self.assertTrue("localhost" in h.format_name())
+     def test_empty_get_port(self):
+         h = Host()
+@@ -197,8 +197,8 @@ class host_test(unittest.TestCase):
+         h = s.hosts[0]
+         self.assertEqual(len(h.ports), 5)
+         self.assertEqual(len(h.extraports), 1)
+-        self.assertEqual(h.extraports.keys()[0], u"filtered")
+-        self.assertEqual(h.extraports.values()[0], 95)
++        self.assertEqual(list(h.extraports.keys())[0], "filtered")
++        self.assertEqual(list(h.extraports.values())[0], 95)
+         self.assertEqual(h.state, "up")
+@@ -241,13 +241,13 @@ class port_test(unittest.TestCase):
+     """Test the Port class."""
+     def test_spec_string(self):
+         p = Port((10, "tcp"))
+-        self.assertEqual(p.spec_string(), u"10/tcp")
++        self.assertEqual(p.spec_string(), "10/tcp")
+         p = Port((100, "ip"))
+-        self.assertEqual(p.spec_string(), u"100/ip")
++        self.assertEqual(p.spec_string(), "100/ip")
+     def test_state_string(self):
+         p = Port((10, "tcp"))
+-        self.assertEqual(p.state_string(), u"unknown")
++        self.assertEqual(p.state_string(), "unknown")
+ class service_test(unittest.TestCase):
+@@ -255,47 +255,47 @@ class service_test(unittest.TestCase):
+     def test_compare(self):
+         """Test that services with the same contents compare equal."""
+         a = Service()
+-        a.name = u"ftp"
+-        a.product = u"FooBar FTP"
+-        a.version = u"1.1.1"
+-        a.tunnel = u"ssl"
++        a.name = "ftp"
++        a.product = "FooBar FTP"
++        a.version = "1.1.1"
++        a.tunnel = "ssl"
+         self.assertEqual(a, a)
+         b = Service()
+-        b.name = u"ftp"
+-        b.product = u"FooBar FTP"
+-        b.version = u"1.1.1"
+-        b.tunnel = u"ssl"
++        b.name = "ftp"
++        b.product = "FooBar FTP"
++        b.version = "1.1.1"
++        b.tunnel = "ssl"
+         self.assertEqual(a, b)
+-        b.name = u"http"
++        b.name = "http"
+         self.assertNotEqual(a, b)
+         c = Service()
+         self.assertNotEqual(a, c)
+     def test_tunnel(self):
+         serv = Service()
+-        serv.name = u"http"
+-        serv.tunnel = u"ssl"
+-        self.assertEqual(serv.name_string(), u"ssl/http")
++        serv.name = "http"
++        serv.tunnel = "ssl"
++        self.assertEqual(serv.name_string(), "ssl/http")
+     def test_version_string(self):
+         serv = Service()
+-        serv.product = u"FooBar"
++        serv.product = "FooBar"
+         self.assertTrue(len(serv.version_string()) > 0)
+         serv = Service()
+-        serv.version = u"1.2.3"
++        serv.version = "1.2.3"
+         self.assertTrue(len(serv.version_string()) > 0)
+         serv = Service()
+-        serv.extrainfo = u"misconfigured"
++        serv.extrainfo = "misconfigured"
+         self.assertTrue(len(serv.version_string()) > 0)
+         serv = Service()
+-        serv.product = u"FooBar"
+-        serv.version = u"1.2.3"
++        serv.product = "FooBar"
++        serv.version = "1.2.3"
+         # Must match Nmap output.
+         self.assertEqual(serv.version_string(),
+-                u"%s %s" % (serv.product, serv.version))
+-        serv.extrainfo = u"misconfigured"
++                "%s %s" % (serv.product, serv.version))
++        serv.extrainfo = "misconfigured"
+         self.assertEqual(serv.version_string(),
+-                u"%s %s (%s)" % (serv.product, serv.version, serv.extrainfo))
++                "%s %s (%s)" % (serv.product, serv.version, serv.extrainfo))
+ class ScanDiffSub(ScanDiff):
+@@ -703,7 +703,7 @@ class scan_diff_xml_test(unittest.TestCase):
+         a.load_from_file("test-scans/empty.xml")
+         b = Scan()
+         b.load_from_file("test-scans/simple.xml")
+-        f = StringIO.StringIO()
++        f = io.StringIO()
+         self.scan_diff = ScanDiffXML(a, b, f)
+         self.scan_diff.output()
+         self.xml = f.getvalue()
+@@ -712,8 +712,8 @@ class scan_diff_xml_test(unittest.TestCase):
+     def test_well_formed(self):
+         try:
+             document = xml.dom.minidom.parseString(self.xml)
+-        except Exception, e:
+-            self.fail(u"Parsing XML diff output caused the exception: %s"
++        except Exception as e:
++            self.fail("Parsing XML diff output caused the exception: %s"
+                     % str(e))
+@@ -739,8 +739,8 @@ def host_apply_diff(host, diff):
+         host.os = diff.host_b.os[:]
+     if diff.extraports_changed:
+-        for state in host.extraports.keys():
+-            for port in host.ports.values():
++        for state in list(host.extraports.keys()):
++            for port in list(host.ports.values()):
+                 if port.state == state:
+                     del host.ports[port.spec]
+         host.extraports = diff.host_b.extraports.copy()
+diff --git a/ndiff/scripts/ndiff b/ndiff/scripts/ndiff
+index 8517c07..4671e73 100755
+--- a/ndiff/scripts/ndiff
++++ b/ndiff/scripts/ndiff
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # Ndiff
+ #
+@@ -67,15 +67,15 @@ if INSTALL_LIB is not None and is_secure_dir(INSTALL_LIB):
+ try:
+     import ndiff
+-except ImportError, e:
+-    print >> sys.stderr, """\
++except ImportError as e:
++    print("""\
+ Could not import the ndiff module: %s.
+-I checked in these directories:""" % repr(e.message)
++I checked in these directories:""" % repr(e), file=sys.stderr)
+     for dir in sys.path:
+-        print >> sys.stderr, "    %s" % dir
+-    print >> sys.stderr, """\
++        print("    %s" % dir, file=sys.stderr)
++    print("""\
+ If you installed Ndiff in another directory, you may have to add the
+-modules directory to the PYTHONPATH environment variable."""
++modules directory to the PYTHONPATH environment variable.""", file=sys.stderr)
+     sys.exit(1)
+ import ndiff
+diff --git a/ndiff/setup.py b/ndiff/setup.py
+old mode 100644
+new mode 100755
+index b5e254c..c49bcf3
+--- a/ndiff/setup.py
++++ b/ndiff/setup.py
+@@ -94,7 +94,7 @@ class checked_install(distutils.command.install.install):
+         self.saved_prefix = sys.prefix
+         try:
+             distutils.command.install.install.finalize_options(self)
+-        except distutils.errors.DistutilsPlatformError, e:
++        except distutils.errors.DistutilsPlatformError as e:
+             raise distutils.errors.DistutilsPlatformError(str(e) + """
+ Installing your distribution's python-dev package may solve this problem.""")
+@@ -155,13 +155,13 @@ Installing your distribution's python-dev package may solve this problem.""")
+ #!/usr/bin/env python
+ import errno, os, os.path, sys
+-print 'Uninstall %(name)s'
++print('Uninstall %(name)s')
+ answer = raw_input('Are you sure that you want to uninstall '
+     '%(name)s (yes/no) ')
+ if answer != 'yes' and answer != 'y':
+-    print 'Not uninstalling.'
++    print('Not uninstalling.')
+     sys.exit(0)
+ """ % {'name': APP_NAME}
+@@ -177,8 +177,8 @@ if answer != 'yes' and answer != 'y':
+                     # This should never happen (everything gets installed
+                     # inside the root), but if it does, be safe and don't
+                     # delete anything.
+-                    uninstaller += ("print '%s was not installed inside "
+-                        "the root %s; skipping.'\n" % (output, self.root))
++                    uninstaller += ("print('%s was not installed inside "
++                        "the root %s; skipping.')\n" % (output, self.root))
+                     continue
+                 output = path_strip_prefix(output, self.root)
+                 assert os.path.isabs(output)
+@@ -202,24 +202,24 @@ for path in INSTALLED_FILES:
+         dirs.append(path)
+ # Delete the files.
+ for file in files:
+-    print "Removing '%s'." % file
++    print("Removing '%s'." % file)
+     try:
+         os.remove(file)
+-    except OSError, e:
+-        print >> sys.stderr, '  Error: %s.' % str(e)
++    except OSError as e:
++        print('  Error: %s.' % str(e), file=sys.stderr)
+ # Delete the directories. First reverse-sort the normalized paths by
+ # length so that child directories are deleted before their parents.
+ dirs = [os.path.normpath(dir) for dir in dirs]
+ dirs.sort(key = len, reverse = True)
+ for dir in dirs:
+     try:
+-        print "Removing the directory '%s'." % dir
++        print("Removing the directory '%s'." % dir)
+         os.rmdir(dir)
+-    except OSError, e:
++    except OSError as e:
+         if e.errno == errno.ENOTEMPTY:
+-            print "Directory '%s' not empty; not removing." % dir
++            print("Directory '%s' not empty; not removing." % dir)
+         else:
+-            print >> sys.stderr, str(e)
++            print(str(e), file=sys.stderr)
+ """
+         uninstaller_file = open(uninstaller_filename, 'w')
+@@ -227,7 +227,7 @@ for dir in dirs:
+         uninstaller_file.close()
+         # Set exec bit for uninstaller
+-        mode = ((os.stat(uninstaller_filename)[ST_MODE]) | 0555) & 07777
++        mode = ((os.stat(uninstaller_filename)[ST_MODE]) | 0o555) & 0o7777
+         os.chmod(uninstaller_filename, mode)
+     def write_installed_files(self):
+@@ -242,7 +242,7 @@ for dir in dirs:
+         try:
+             for output in self.get_installed_files():
+                 assert "\n" not in output
+-                print >> f, output
++                print(output, file=f)
+         finally:
+             f.close()
+@@ -266,7 +266,7 @@ class my_uninstall(distutils.cmd.Command):
+         # Read the list of installed files.
+         try:
+             f = open(INSTALLED_FILES_NAME, "r")
+-        except IOError, e:
++        except IOError as e:
+             if e.errno == errno.ENOENT:
+                 log.error("Couldn't open the installation record '%s'. "
+                         "Have you installed yet?" % INSTALLED_FILES_NAME)
+@@ -289,7 +289,7 @@ class my_uninstall(distutils.cmd.Command):
+             try:
+                 if not self.dry_run:
+                     os.remove(file)
+-            except OSError, e:
++            except OSError as e:
+                 log.error(str(e))
+         # Delete the directories. First reverse-sort the normalized paths by
+         # length so that child directories are deleted before their parents.
+@@ -300,7 +300,7 @@ class my_uninstall(distutils.cmd.Command):
+                 log.info("Removing the directory '%s'." % dir)
+                 if not self.dry_run:
+                     os.rmdir(dir)
+-            except OSError, e:
++            except OSError as e:
+                 if e.errno == errno.ENOTEMPTY:
+                     log.info("Directory '%s' not empty; not removing." % dir)
+                 else:
+diff --git a/ndiff/test-scans/anonymize.py b/ndiff/test-scans/anonymize.py
+index 9ba612a..fd251fe 100755
+--- a/ndiff/test-scans/anonymize.py
++++ b/ndiff/test-scans/anonymize.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # Anonymize an Nmap XML file, replacing host name and IP addresses with random
+ # anonymous ones. Anonymized names will be consistent between runs of the
+@@ -20,20 +20,20 @@ r = random.Random()
+ def hash(s):
+-    digest = hashlib.sha512(s).hexdigest()
++    digest = hashlib.sha512(s.encode()).hexdigest()
+     return int(digest, 16)
+ def anonymize_mac_address(addr):
+     r.seed(hash(addr))
+     nums = (0, 0, 0) + tuple(r.randrange(256) for i in range(3))
+-    return u":".join(u"%02X" % x for x in nums)
++    return ":".join("%02X" % x for x in nums)
+ def anonymize_ipv4_address(addr):
+     r.seed(hash(addr))
+     nums = (10,) + tuple(r.randrange(256) for i in range(3))
+-    return u".".join(unicode(x) for x in nums)
++    return ".".join(str(x) for x in nums)
+ def anonymize_ipv6_address(addr):
+@@ -41,7 +41,7 @@ def anonymize_ipv6_address(addr):
+     # RFC 4193.
+     nums = (0xFD00 + r.randrange(256),)
+     nums = nums + tuple(r.randrange(65536) for i in range(7))
+-    return u":".join("%04X" % x for x in nums)
++    return ":".join("%04X" % x for x in nums)
+ # Maps to memoize address and host name conversions.
+ hostname_map = {}
+@@ -54,11 +54,11 @@ def anonymize_hostname(name):
+     LETTERS = "acbdefghijklmnopqrstuvwxyz"
+     r.seed(hash(name))
+     length = r.randrange(5, 10)
+-    prefix = u"".join(r.sample(LETTERS, length))
++    prefix = "".join(r.sample(LETTERS, length))
+     num = r.randrange(1000)
+-    hostname_map[name] = u"%s-%d.example.com" % (prefix, num)
++    hostname_map[name] = "%s-%d.example.com" % (prefix, num)
+     if VERBOSE:
+-        print >> sys.stderr, "Replace %s with %s" % (name, hostname_map[name])
++        print("Replace %s with %s" % (name, hostname_map[name]), file=sys.stderr)
+     return hostname_map[name]
+ mac_re = re.compile(r'\b([0-9a-fA-F]{2}:){5}[0-9a-fA-F]{2}\b')
+@@ -78,7 +78,7 @@ def anonymize_address(addr):
+     else:
+         assert False
+     if VERBOSE:
+-        print >> sys.stderr, "Replace %s with %s" % (addr, address_map[addr])
++        print("Replace %s with %s" % (addr, address_map[addr]), file=sys.stderr)
+     return address_map[addr]
diff --git a/net/obfsproxy/Makefile b/net/obfsproxy/Makefile
deleted file mode 100644 (file)
index 2cc600d..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-#
-# Copyright (C) 2006-2016 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=obfsproxy
-PKG_VERSION:=0.2.13
-PKG_RELEASE:=3
-
-PYPI_NAME:=$(PKG_NAME)
-PKG_HASH:=1e26c2faef1cfcf856ddf60e9647058a7c78fb0d47f05b58a0f847ed7cc41a66
-
-PKG_LICENSE:=BSD-3-Clause
-PKG_LICENSE_FILES:=LICENSE
-PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
-
-include ../../lang/python/pypi.mk
-include $(INCLUDE_DIR)/package.mk
-include ../../lang/python/python-package.mk
-
-define Package/obfsproxy
-  SECTION:=net
-  CATEGORY:=Network
-  TITLE:=A pluggable transport proxy written in Python
-  URL:=https://gitweb.torproject.org/pluggable-transports/obfsproxy.git/
-  DEPENDS:= \
-      +python-light \
-      +python-crypto \
-      +python-pyptlib \
-      +python-setuptools \
-      +python-twisted \
-      +python-yaml
-  VARIANT:=python
-endef
-
-define Package/obfsproxy/description
-obfsproxy is a tool that attempts to circumvent censorship, by
-transforming the Tor traffic between the client and the bridge. This
-way, censors, who usually monitor traffic between the client and the
-bridge, will see innocent-looking transformed traffic instead of the
-actual Tor traffic.
-endef
-
-define Package/obfsproxy/conffiles
-/etc/config/obfsproxy
-endef
-
-define PyPackage/obfsproxy/install
-       $(INSTALL_DIR) $(1)/usr/bin
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/obfsproxy $(1)/usr/bin/
-       $(INSTALL_DIR) $(1)/etc/config
-       $(INSTALL_CONF) ./files/obfsproxy.conf $(1)/etc/config/obfsproxy
-       $(INSTALL_DIR) $(1)/etc/init.d
-       $(INSTALL_BIN) ./files/obfsproxy.init $(1)/etc/init.d/obfsproxy
-endef
-
-$(eval $(call PyPackage,obfsproxy))
-$(eval $(call BuildPackage,obfsproxy))
-$(eval $(call BuildPackage,obfsproxy-src))
diff --git a/net/obfsproxy/files/obfsproxy.conf b/net/obfsproxy/files/obfsproxy.conf
deleted file mode 100644 (file)
index 1eed142..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-# To use Obfsproxy with Tor, follow the instructions at:
-#
-# https://www.torproject.org/projects/obfsproxy-instructions.html.en
-#
-# instead of setting up a separate instance of Obfsproxy.
-
-config obfsproxy 'obfsproxy'
-       # Set to 1 to enable this instance
-       option enabled 0
-
-       # One of: managed, dummy, b64, obfs2, obfs3, scramblesuit
-       option transport 'scramblesuit'
-
-       # Shared secret / password
-       # For obfs2 (as the shared secret parameter) and scramblesuit only
-       option password 'EXAMPLEPASSWORDNOTREAL'
-
-       # One of: server, ext_server, client, socks
-       option mode 'socks'
-
-       # Destination address
-       # Required for all modes except 'socks'
-       #option dest_host '0.0.0.0'
-       #option dest_port '80'
-
-       # Extended ORPort authentication cookie file location
-       # Required for 'ext_server' mode
-       #option ext_cookie_file ''
-
-       # Listener address
-       option listen_host '127.0.0.1'
-       option listen_port '8080'
-
-       # Set to log to a file instead of syslog
-       #option log_file '/var/log/obfsproxy.log'
-
-       # Minimum logging severity
-       # One of: error, warning, info, debug
-       #option log_min_severity 'info'
-
-       # Set to 1 to disable logging
-       #option no_log 0
-
-       # Set to 1 to disable safe (scrubbed address) logging
-       #option no_safe_logging 0
-
-       # Run as a different user
-       #option user 'nobody'
-
-       # Outgoing proxy
-       # proxy_scheme is one of: socks4a, socks5, http
-       # txsocksx is required for socks4a or socks5
-       #option proxy_scheme ''
-       #option proxy_username ''
-       #option proxy_password ''
-       #option proxy_host ''
-       #option proxy_port ''
diff --git a/net/obfsproxy/files/obfsproxy.init b/net/obfsproxy/files/obfsproxy.init
deleted file mode 100644 (file)
index 4901c07..0000000
+++ /dev/null
@@ -1,158 +0,0 @@
-#!/bin/sh /etc/rc.common
-# Copyright (C) 2016 OpenWrt.org
-
-START=80
-STOP=20
-USE_PROCD=1
-
-PROG=/usr/bin/obfsproxy
-
-append_arg() {
-       local cfg="$1"
-       local var="$2"
-       local opt="$3"
-       local def="$4"
-       local val
-
-       config_get val "$cfg" "$var"
-       [ -n "$val" -o -n "$def" ] && procd_append_param command "$opt" "${val:-$def}"
-}
-
-append_bool() {
-       local cfg="$1"
-       local var="$2"
-       local opt="$3"
-       local def="$4"
-       local val
-
-       config_get_bool val "$cfg" "$var" "$def"
-       [ "$val" = 1 ] && procd_append_param command "$opt"
-}
-
-append_plain() {
-       procd_append_param command "$1"
-}
-
-append_param() {
-       local cfg="$1"
-       local var="$2"
-       local opt="$3"
-       local def="$4"
-       local val
-
-       config_get val "$cfg" "$var"
-       [ -n "$val" -o -n "$def" ] && procd_append_param "$opt" "${val:-$def}"
-}
-
-append_proxy_spec() {
-       local cfg="$1"
-       local scheme_var="$2"
-       local username_var="$3"
-       local password_var="$4"
-       local host_var="$5"
-       local port_var="$6"
-       local opt="$7"
-       local def="$8"
-       local scheme
-       local username
-       local password
-       local host
-       local port
-       local login
-       local val
-
-       config_get scheme "$cfg" "$scheme_var"
-       config_get username "$cfg" "$username_var"
-       config_get password "$cfg" "$password_var"
-       config_get host "$cfg" "$host_var"
-       config_get port "$cfg" "$port_var"
-       [ "$username" ] && login="$username${password:+:$password}@"
-       [ -n "$scheme" -a -n "$host" -a -n "$port" ] && val="$scheme://$login$host:$port"
-       [ -n "$val" -o -n "$def" ] && procd_append_param command "$opt" "${val:-$def}"
-}
-
-append_host_port() {
-       local cfg="$1"
-       local host_var="$2"
-       local port_var="$3"
-       local opt="$4"
-       local def="$5"
-       local host
-       local port
-       local val
-
-       config_get host "$cfg" "$host_var"
-       config_get port "$cfg" "$port_var"
-       [ -n "$host" -a -n "$port" ] && val="$host:$port"
-       [ -n "$val" -o -n "$def" ] && {
-               [ "$opt" ] && procd_append_param command "$opt"
-               procd_append_param command "${val:-$def}"
-       }
-}
-
-start_instance() {
-       local cfg="$1"
-       local lib_dir="/var/lib/obfsproxy/$cfg"
-       local redirect=0
-       local enabled
-       local user
-       local transport
-       local password
-       local log_min_severity
-
-       config_get_bool enabled "$cfg" 'enabled' '0'
-       [ "$enabled" = 0 ] && return 1
-
-       config_get user "$cfg" 'user' 'root'
-       config_get transport "$cfg" 'transport'
-       [ "$transport" = "scramblesuit" ] && config_get password "$cfg" 'password'
-
-       [ -d "$lib_dir" ] || {
-               mkdir -m 0755 -p "$lib_dir/data"
-               chmod -R 0700 "$lib_dir"
-       }
-       [ "$password" ] && {
-               echo "$password" > "$lib_dir/secret"
-               chmod 0600 "$lib_dir/secret"
-       }
-       chown -R "$user:" "$lib_dir"
-
-       config_get log_min_severity "$cfg" 'log_min_severity'
-       [ "$log_min_severity" = "debug" ] && redirect=1
-
-       procd_open_instance
-
-       procd_set_param command "$PROG" --data-dir "$lib_dir/data" --syslog "obfsproxy($cfg)"
-
-       append_arg "$cfg" log_file "--log-file"
-       append_arg "$cfg" log_min_severity "--log-min-severity"
-       append_bool "$cfg" no_log "--no-log"
-       append_bool "$cfg" no_safe_logging "--no-safe-logging"
-       append_proxy_spec "$cfg" proxy_scheme proxy_username proxy_password proxy_host proxy_port "--proxy"
-
-       append_param "$cfg" transport command
-       [ "$transport" = "obfs2" ] && append_arg "$cfg" password "--shared-secret"
-       [ "$password" ] && procd_append_param command "--password-file" "$lib_dir/secret"
-
-       append_param "$cfg" mode command
-       append_host_port "$cfg" dest_host dest_port "--dest"
-       append_arg "$cfg" ext_cookie_file "--ext-cookie-file"
-
-       append_host_port "$cfg" listen_host listen_port
-
-       procd_set_param respawn
-       procd_set_param stdout $redirect
-       procd_set_param stderr $redirect
-       append_param "$cfg" user user
-
-       procd_close_instance
-}
-
-service_triggers() {
-       procd_add_reload_trigger obfsproxy
-}
-
-start_service() {
-       config_load obfsproxy
-       config_foreach start_instance obfsproxy
-}
diff --git a/net/obfsproxy/patches/001-exclude-tests.patch b/net/obfsproxy/patches/001-exclude-tests.patch
deleted file mode 100644 (file)
index 445c554..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/setup.py b/setup.py
-index 2353a29..9d2a9a9 100644
---- a/setup.py
-+++ b/setup.py
-@@ -21,7 +21,7 @@ setup(
-     version=versioneer.get_version(),
-     cmdclass=versioneer.get_cmdclass(),
--    packages = find_packages(),
-+    packages = find_packages(exclude=['*.test', '*.test.*']),
-     entry_points = {
-         'console_scripts': [
-             'obfsproxy = obfsproxy.pyobfsproxy:run'
diff --git a/net/obfsproxy/patches/002-fix-python-path.patch b/net/obfsproxy/patches/002-fix-python-path.patch
deleted file mode 100644 (file)
index 4a8f9ac..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-diff --git a/setup.py b/setup.py
-index 2353a29..8d3d56d 100644
---- a/setup.py
-+++ b/setup.py
-@@ -27,6 +27,11 @@ setup(
-             'obfsproxy = obfsproxy.pyobfsproxy:run'
-             ]
-         },
-+    options = {
-+        'build_scripts': {
-+            'executable': '/usr/bin/python'
-+            },
-+        },
-     install_requires = [
-         'setuptools',
diff --git a/net/obfsproxy/patches/003-remove-argparse-dependency-test.patch b/net/obfsproxy/patches/003-remove-argparse-dependency-test.patch
deleted file mode 100644 (file)
index 20fe481..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/setup.py b/setup.py
-index 2353a29..e04c5f5 100644
---- a/setup.py
-+++ b/setup.py
-@@ -32,7 +32,6 @@ setup(
-         'setuptools',
-         'PyCrypto',
-         'Twisted',
--        'argparse',
-         'pyptlib >= 0.0.6',
-         'pyyaml'
-         ],
diff --git a/net/obfsproxy/patches/004-add-syslog-support.patch b/net/obfsproxy/patches/004-add-syslog-support.patch
deleted file mode 100644 (file)
index b7240cb..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-diff --git a/obfsproxy/common/log.py b/obfsproxy/common/log.py
-index bb30296..79193d2 100644
---- a/obfsproxy/common/log.py
-+++ b/obfsproxy/common/log.py
-@@ -1,5 +1,6 @@
- """obfsproxy logging code"""
- import logging
-+import logging.handlers
- import sys
- from twisted.python import log
-@@ -50,6 +51,18 @@ class ObfsLogger(object):
-         self.obfslogger.addHandler(log_handler)
-+    def set_syslog(self, progname):
-+        """Set up our logger so that it starts logging to syslog instead."""
-+
-+        # remove the default handler, and add the SysLogHandler:
-+        self.obfslogger.removeHandler(self.default_handler)
-+
-+        log_handler = logging.handlers.SysLogHandler(address='/dev/log')
-+        formatter = logging.Formatter(progname + "[%(process)d]: %(message)s")
-+        log_handler.setFormatter(formatter)
-+
-+        self.obfslogger.addHandler(log_handler)
-+
-     def set_log_severity(self, sev_string):
-         """Update our minimum logging severity to 'sev_string'."""
-diff --git a/obfsproxy/pyobfsproxy.py b/obfsproxy/pyobfsproxy.py
-index 4a2faf6..eaf8a44 100755
---- a/obfsproxy/pyobfsproxy.py
-+++ b/obfsproxy/pyobfsproxy.py
-@@ -42,6 +42,7 @@ def set_up_cli_parsing():
-     parser.add_argument('-v', '--version', action='version', version=__version__)
-     parser.add_argument('--log-file', help='set logfile')
-+    parser.add_argument('--syslog', metavar='PROGNAME', help='use syslog')
-     parser.add_argument('--log-min-severity',
-                         choices=['error', 'warning', 'info', 'debug'],
-                         help='set minimum logging severity (default: %(default)s)')
-@@ -110,6 +111,8 @@ def consider_cli_args(args):
-     if args.log_file:
-         log.set_log_file(args.log_file)
-+    elif args.syslog:
-+        log.set_syslog(args.syslog)
-     if args.log_min_severity:
-         log.set_log_severity(args.log_min_severity)
-     if args.no_log:
index aca8b7afc62961cb09635c3d0ffad5062ce423e1..4268bf95e9e3765ecd270a49c3626317b26673fb 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=openfortivpn
-PKG_VERSION:=1.10.0
+PKG_VERSION:=1.13.2
 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_HASH:=998fb2b071cdfe3255c2f953cafc6e1496778f9a71dd5aa560b924a44636df87
 
 PKG_MAINTAINER:=Lucian Cristian <lucian.cristian@gmail.com>
 PKG_LICENSE:=GPL-3.0-or-later OpenSSL
@@ -44,6 +44,8 @@ endef
 CONFIGURE_ARGS += \
        --enable-proc \
        --with-rt_dst="yes" \
+       --disable-resolvconf \
+       --with-resolvconf=DISABLED \
        --with-pppd="/usr/sbin/pppd"
 
 TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
index cbd12a3c5082a8a6c104bdf6da0f0794c0a3bebd..17d1d83a5537145f880b5b236666dd6981138eb6 100644 (file)
@@ -8,14 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=openssh
-PKG_VERSION:=8.1p1
-PKG_RELEASE:=1
+PKG_VERSION:=8.2p1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/ \
-               https://ftp.spline.de/pub/OpenBSD/OpenSSH/portable/ \
-               https://anorien.csc.warwick.ac.uk/pub/OpenBSD/OpenSSH/portable/
-PKG_HASH:=02f5dbef3835d0753556f973cd57b4c19b6b1f6cd24c03445e23ac77ca1b93ff
+               https://ftp.spline.de/pub/OpenBSD/OpenSSH/portable/
+PKG_HASH:=43925151e6cf6cee1450190c0e9af4dc36b41c12737619edff8bcebdff64e671
 
 PKG_LICENSE:=BSD ISC
 PKG_LICENSE_FILES:=LICENCE
index 680da400129d3fbda4c2f78d57b5be5698914dcc..c8aa1aeb0efa551af74719de8061bc84fbbc2a81 100644 (file)
@@ -8,7 +8,7 @@ USE_PROCD=1
 PROG=/usr/sbin/sshd
 
 start_service() {
-       for type in rsa ecdsa ed25519
+       for type in rsa ed25519
        do
                # check for keys
                key=/etc/ssh/ssh_host_${type}_key
index 06186b5cc50dd6f52c385f208b1ac56389a3fb7b..09ff2b4a79347ac508e045ce78b48f6ed51f5db4 100644 (file)
@@ -57,7 +57,7 @@ ifeq ($(if $(call ovs_kmod_is_intree,$(1)),$(ovs_kmod_intree_not_supported)),)
      CATEGORY:=Kernel modules
      SUBMENU:=Network Support
      TITLE:=$(ovs_kmod_$(1)_title)
-     DEPENDS:=$(ovs_kmod_$(1)_depends) $(if $(call ovs_kmod_is_intree,$(1)),@DEVEL)
+     DEPENDS:=$(ovs_kmod_$(1)_depends) $(if $(call ovs_kmod_is_intree,$(1)),@IPV6 @DEVEL)
      PROVIDES:=$(call ovs_kmod_package_provides,$(1))
      KCONFIG:=$(ovs_kmod_$(1)_kconfig)
      FILES:=$(ovs_kmod_$(1)_files)
@@ -272,6 +272,8 @@ endif
 TARGET_CFLAGS += -flto -std=gnu99
 MAKE_VARS += PYTHONPATH="$(HOST_PYTHON3PATH)"
 
+override CONFIG_AUTOREMOVE=
+
 $(foreach p,$(ovs_kmod_packages),\
   $(eval $(call KernelPackage,$(p)))\
 )
index 5deb9d6735ca4d1464c10ffb968369b00e10408c..f20054f3434d6e278addd4295b35f68652272bb2 100644 (file)
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=pagekitec
-PKG_REV:=0.91.200218
+PKG_REV:=0.91.200311
 PKG_VERSION:=$(PKG_REV)C
 PKG_RELEASE:=1
 PKG_LICENSE:=Apache-2.0
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_MIRROR_HASH:=2f560ae679775758b1b5e5f69cd4d82afa28339ee8ab6ee9e4af11daa6f8be77
+PKG_MIRROR_HASH:=3546e1b4b69eb8e4b914d2161cfaced8b6b81e0a978d95411bae25f3adea754f
 PKG_SOURCE_URL:=https://github.com/pagekite/libpagekite.git
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_VERSION:=v$(PKG_REV)
index 71ea238b5a9f74b206221cf03c87aae5514617b5..189c6c45372763f6fdb86e4f1b1be334c84e258e 100755 (executable)
@@ -21,6 +21,7 @@ add_instance() {
        procd_open_instance
        procd_set_param command $APP
        procd_append_param command -s
+       procd_append_param command -Y json:/tmp/pagekite.status.json
        [ $static -eq 1 ] && procd_append_param command -S
        [ $simple_http -eq 1 ] && procd_append_param command 80 http $kitename 0 $kitesecret
        [ $simple_ssh -eq 1 ] && procd_append_param command 22 raw-22 $kitename 0 $kitesecret
diff --git a/net/pagekitec/patches/01-Omit-redundant-times-when-logging-to-syslog.patch b/net/pagekitec/patches/01-Omit-redundant-times-when-logging-to-syslog.patch
deleted file mode 100644 (file)
index 53c658b..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-From 7b4587818564aa667f868249e9a8f1dc1d095fd3 Mon Sep 17 00:00:00 2001
-From: "Bjarni R. Einarsson" <bre@klaki.net>
-Date: Tue, 25 Feb 2020 16:10:11 +0000
-Subject: [PATCH] Omit redundant times when logging to syslog
-
----
- libpagekite/pklogging.c | 19 ++++++++++++++-----
- 1 file changed, 14 insertions(+), 5 deletions(-)
-
-diff --git a/libpagekite/pklogging.c b/libpagekite/pklogging.c
-index cf353f8..6129c30 100644
---- a/libpagekite/pklogging.c
-+++ b/libpagekite/pklogging.c
-@@ -55,16 +55,25 @@ int pk_log(int level, const char* fmt, ...)
- #else
-     struct timeval t;
-     char tsbuf[30];
-+# ifdef HAVE_DS_LOG_FORMAT
-     gettimeofday(&t, NULL);
-     strftime(tsbuf, sizeof(tsbuf), "%Y-%m-%d %H:%M:%S", localtime(&t.tv_sec));
--# ifdef HAVE_DS_LOG_FORMAT
-     len = snprintf(output, 4000, "[%s.%03d][%x] ",
-                            tsbuf, (int)t.tv_usec / 1000, (int) pthread_self());
- # else
--    len = sprintf(output, "t=%s.%03d; ts=%x; tid=%x; ll=%x; msg=",
--                          tsbuf, (int)t.tv_usec / 1000,
--                          (int) time(0), (int) pthread_self(),
--                          logged_lines++);
-+    if (log_file != NULL) {
-+      gettimeofday(&t, NULL);
-+      strftime(tsbuf, sizeof(tsbuf), "%Y-%m-%d %H:%M:%S", localtime(&t.tv_sec));
-+      len = sprintf(output, "t=%s.%03d; ts=%x; tid=%x; ll=%x; msg=",
-+                            tsbuf, (int)t.tv_usec / 1000,
-+                            (int) time(0), (int) pthread_self(),
-+                            logged_lines++);
-+    }
-+    else {
-+      /* For syslog, we omit the times, syslog handles that. */
-+      len = sprintf(output, "tid=%x; ll=%x; msg=",
-+                            (int) pthread_self(), logged_lines++);
-+    }
- # endif
- #endif
-     va_start(args, fmt);
index aee3f2a3d86f4ace456023ff5b2bd7d6845f6b41..fe80565e8fc91b4e8dea2b7f3e310030f7a8379b 100644 (file)
@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=pdns
 PKG_VERSION:=4.2.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://downloads.powerdns.com/releases/
diff --git a/net/pdns/patches/200-openssl-deprecated.patch b/net/pdns/patches/200-openssl-deprecated.patch
new file mode 100644 (file)
index 0000000..cc6544b
--- /dev/null
@@ -0,0 +1,20 @@
+--- a/pdns/opensslsigners.cc
++++ b/pdns/opensslsigners.cc
+@@ -29,6 +29,7 @@
+ #if defined(HAVE_LIBCRYPTO_ED25519) || defined(HAVE_LIBCRYPTO_ED448)
+ #include <openssl/evp.h>
+ #endif
++#include <openssl/bn.h>
+ #include <openssl/sha.h>
+ #include <openssl/rand.h>
+ #include <openssl/rsa.h>
+--- a/pdns/pkcs11signers.cc
++++ b/pdns/pkcs11signers.cc
+@@ -15,6 +15,7 @@
+ #include "pdns/lock.hh"
+ #ifdef HAVE_LIBCRYPTO_ECDSA
++#include <openssl/bn.h>
+ #include <openssl/ec.h>
+ #endif
index a001e47edc6787516aa4dd61b9e816b4dc6408f5..0dce495c36b76566d7aa01bb193fd841c5b16866 100644 (file)
@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=port-mirroring
 PKG_VERSION:=1.4.4
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/mmaraya/port-mirroring/tar.gz/v$(PKG_VERSION)?
diff --git a/net/port-mirroring/patches/020-time.patch b/net/port-mirroring/patches/020-time.patch
new file mode 100644 (file)
index 0000000..224ed27
--- /dev/null
@@ -0,0 +1,20 @@
+--- a/src/main.c
++++ b/src/main.c
+@@ -252,7 +252,7 @@ void packet_handler_ex(const struct pcap_pkthdr* header, const u_char* pkt_data,
+         if (handle == NULL || pcap_sendpacket(handle, pkt_data, header->len) != 0)
+         {
+             //error detected
+-            long nowTime;
++            time_t nowTime;
+             time(&nowTime);
+             if (nowTime - cfg.init_time > ERRTIMEOUT && header->len < 1500)
+             {
+@@ -282,7 +282,7 @@ void packet_handler_ex(const struct pcap_pkthdr* header, const u_char* pkt_data,
+             if (handle == NULL || pcap_sendpacket(handle, buf, header->len) != 0)
+             {
+                 //error detected
+-                long nowTime;
++                time_t nowTime;
+                 time(&nowTime);
+                 if (nowTime - cfg.init_time > ERRTIMEOUT && header->len < 1500)
+                 {
index 529843451e6afc3c887ba9e1e07faadc9ccd5a54..b31e5f6734ca47e8f907a4bcac107dc2a18eb350 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=prosody
 PKG_VERSION:=0.11.3
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://prosody.im/downloads/source
index 322c3d2b1385a66d153e6c325f88977ec2426e55..9829862d238303259768b2996326d290c1124aeb 100644 (file)
@@ -23,7 +23,8 @@ start_service() {
        }
 
        [ -d /var/log/prosody ] && {
-               chown -R prosody:prosody /etc/prosody
+               chown -R root:prosody /etc/prosody
+               chown -R prosody:prosody /etc/prosody/data
        }
 
        [ -f /sbin/paxctl ] && {
index 81a2d078f9ac5ddbf669dafc51773cb33ac3563a..a95529e6eed6ed0a05b1287c58856d49397c1992 100644 (file)
@@ -9,13 +9,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=reaver
-PKG_VERSION:=1.6.5
+PKG_VERSION:=1.6.6
 PKG_RELEASE:=1
 PKG_MAINTAINER:=Yousong Zhou <yszhou4tech@gmail.com>
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://github.com/t6x/reaver-wps-fork-t6x/releases/download/v$(PKG_VERSION)
-PKG_HASH:=342e9d265cf459bd2387205b73a63d1fc7582e268f0e9aec20613f3ec11b6a6b
+PKG_HASH:=e329a0da0b6dd888916046535ff86a6aa144644561937954e560bb1810ab6702
 
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=docs/LICENSE
@@ -23,6 +23,7 @@ PKG_LICENSE_FILES:=docs/LICENSE
 PKG_USE_MIPS16:=0
 PKG_AUTOMAKE_PATHS:=src
 PKG_FIXUP:=autoreconf
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 CONFIGURE_PATH:=src
index 623855a9c2b8c3bfe6bbf0ec76316a8204af42d5..6615f0efa2e5febb0dd10ca2f0b036b51936469a 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=seafile-ccnet
 PKG_VERSION:=7.1.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/haiwen/ccnet-server/tar.gz/v$(PKG_VERSION)-server?
@@ -28,7 +28,6 @@ PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/nls.mk
-include ../../lang/python/python-package.mk
 include ../../lang/python/python3-package.mk
 
 define Package/seafile-ccnet
@@ -74,12 +73,9 @@ CONFIGURE_ARGS += \
        --enable-python \
        --with-mysql="$(STAGING_DIR)/usr/bin/mysql_config"
 
-# Include Python 2 bindings in this package to maintain compatibility with previous versions
 define Package/seafile-ccnet/install
        $(INSTALL_DIR) $(1)/usr/{lib,libexec}
-       $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)/ccnet
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/libexec/
-       $(INSTALL_DATA) $(PKG_BUILD_DIR)/python/ccnet/*.py $(1)$(PYTHON_PKG_DIR)/ccnet/
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libccnet.so* $(1)/usr/lib/
 endef
 
index 140c4783d341f23a39f7a69e0b448dbf64542161..d52d5ec6e587d7f14ed597b1e63eac1604513377 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=seafile-server
 PKG_VERSION:=7.1.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/haiwen/seafile-server/tar.gz/v$(PKG_VERSION)-server?
@@ -28,7 +28,6 @@ PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/nls.mk
-include ../../lang/python/python-package.mk
 include ../../lang/python/python3-package.mk
 
 # Check that the actual Makefile version-relase match the above.
@@ -127,7 +126,7 @@ CONFIGURE_ARGS += \
        --enable-python \
        --with-mysql="$(STAGING_DIR)/usr/bin/mysql_config"
 
-# This is required as python[3]-package.mk overrides the default setting of having interlinking enabled
+# This is required as python3-package.mk overrides the default setting of having interlinking enabled
 ifdef CONFIG_USE_MIPS16
   TARGET_CFLAGS += -minterlink-mips16
 endif
@@ -162,10 +161,8 @@ SEAFILE_SERVER_PYTHON_SCRIPTS:= \
        setup-seafile-mysql.py \
        sqlite2mysql.py
 
-# Include Python 2 bindings in this package to maintain compatibility with previous versions
 define Package/seafile-server/install
        $(INSTALL_DIR) $(1)/usr/{bin,libexec}
-       $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)/{seafile,seaserv}
        $(INSTALL_DIR) $(1)/usr/share/seafile/seafile-server
        $(INSTALL_DIR) $(1)/etc/{config,init.d,seafile}
        $(INSTALL_DIR) $(1)/lib/upgrade/keep.d
@@ -174,9 +171,6 @@ define Package/seafile-server/install
                $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$$$$bin $(1)/usr/libexec/ ; \
        done
 
-       $(INSTALL_DATA) $(PKG_BUILD_DIR)/python/seafile/*.py $(1)$(PYTHON_PKG_DIR)/seafile/
-       $(INSTALL_DATA) $(PKG_BUILD_DIR)/python/seaserv/*.py $(1)$(PYTHON_PKG_DIR)/seaserv/
-
        for sh in $(SEAFILE_SERVER_SHELL_SCRIPTS) ; do \
                $(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/$$$$sh $(1)/usr/bin/$$$${sh%.sh} ; \
        done
@@ -201,7 +195,6 @@ endef
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include/seafile
        $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
-       $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
        $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/seafile/*.h $(1)/usr/include/seafile/
        $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libseafile.pc $(1)/usr/lib/pkgconfig/
 endef
index 7ec31df1b303659b2b52d57106c93a3391fefa08..fc38682a0ebeec0100e3d3b9c5302fd3900f7b72 100644 (file)
@@ -10,19 +10,18 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=shorewall-core
 PKG_MAJOR_MINOR_VERSION:=5.2
-PKG_BUGFIX_MAJOR_VERSION:=3
-PKG_BUGFIX_MINOR_VERSION:=.7
+PKG_BUGFIX_MAJOR_VERSION:=4
+PKG_BUGFIX_MINOR_VERSION:=
 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_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)/ \
+PKG_SOURCE_URL:=http://shorewall.org/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
        http://slovakia.shorewall.net/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
-       http://shorewall.de/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
-       http://www.shorewall.com.au/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/
+       http://www.shorewall.no/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
+       http://france.shorewall.net/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_HASH:=9c713ecb67603bd1b46648e31ff3f9e8a7af40187b4853feb6170738b1fd613a
+PKG_HASH:=792290534e7599214f3707d7c6dc3fb6ade0a3ed360ead05a2d599eeace11671
 
 PKG_MAINTAINER:=Willem van den Akker <wvdakker@wilsoft.nl>
 PKG_LICENSE:=GPL-2.0-or-later
index aeb75797167a0ceefb1b313f56b2065b7fc544cb..2391c0db21bcf3f5599be1ac6c290137ae3fc908 100644 (file)
@@ -1,8 +1,8 @@
-Index: shorewall-core-5.1.7.2/lib.common
+Index: shorewall-core-5.2.4/lib.common
 ===================================================================
---- shorewall-core-5.1.7.2.orig/lib.common     2017-10-11 08:01:06.191862789 +0200
-+++ shorewall-core-5.1.7.2/lib.common  2017-10-11 08:01:06.187863006 +0200
-@@ -345,7 +345,7 @@
+--- shorewall-core-5.2.4.orig/lib.common       2020-03-25 22:16:13.640263032 +0100
++++ shorewall-core-5.2.4/lib.common    2020-03-25 22:16:13.640263032 +0100
+@@ -347,7 +347,7 @@
  
      if [ -z "$MODULESDIR" ]; then
        uname=$(uname -r)
@@ -11,7 +11,7 @@ Index: shorewall-core-5.1.7.2/lib.common
        if [ -n "$extras" ]; then
            for directory in $(split "$extras"); do
                MODULESDIR="$MODULESDIR:/lib/modules/$uname/$directory"
-@@ -399,7 +399,7 @@
+@@ -401,7 +401,7 @@
  
      if [ -z "$MODULESDIR" ]; then
        uname=$(uname -r)
index ff23b1d3ba018b50ebb63abb0c2a8e9d90c6efcc..3766064b7cfebd247b30ada98aabb6353fcf4859 100644 (file)
@@ -10,19 +10,18 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=shorewall-lite
 PKG_MAJOR_MINOR_VERSION:=5.2
-PKG_BUGFIX_MAJOR_VERSION:=3
-PKG_BUGFIX_MINOR_VERSION:=.7
+PKG_BUGFIX_MAJOR_VERSION:=4
+PKG_BUGFIX_MINOR_VERSION:=
 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_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)/ \
+PKG_SOURCE_URL:=http://shorewall.org/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
        http://slovakia.shorewall.net/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
-       http://shorewall.de/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
-       http://www.shorewall.com.au/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/
+       http://www.shorewall.no/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
+       http://france.shorewall.net/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_HASH:=2ba1000f46b959d87ce2ae1c841dda1fb89698e7e85fafade1a8752648c44dea
+PKG_HASH:=1d2cbb64a3c983dc46ca1dc1e6975abb22e721b0f14a36ce3b29225f72b06a59
 
 PKG_MAINTAINER:=Willem van den Akker <wvdakker@wilsoft.nl>
 PKG_LICENSE:=GPL-2.0-or-later
index a134c07982336474badab8ae81f8a57ce2ad4303..b276a0823bf2e745980438e0d6ede8848d70d39a 100644 (file)
@@ -10,19 +10,18 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=shorewall
 PKG_MAJOR_MINOR_VERSION:=5.2
-PKG_BUGFIX_MAJOR_VERSION:=3
-PKG_BUGFIX_MINOR_VERSION:=.7
+PKG_BUGFIX_MAJOR_VERSION:=4
+PKG_BUGFIX_MINOR_VERSION:=
 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_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)/ \
+PKG_SOURCE_URL:=http://shorewall.org/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
        http://slovakia.shorewall.net/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
-       http://shorewall.de/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
-       http://www.shorewall.com.au/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/
+       http://www.shorewall.no/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
+       http://france.shorewall.net/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_HASH:=1d2f412d2189b01742d8837baa3a9de27ab84ab657eace34840312fb7ca3b4a7
+PKG_HASH:=fd53cc2db7f879c4e22c430ce146125ec81d373485f1ea6dfef90ee28a07104d
 
 PKG_MAINTAINER:=Willem van den Akker <wvdakker@wilsoft.nl>
 PKG_LICENSE:=GPL-2.0-or-later
index 924187cbee22b5bafc1e44560a38ac67fdee7c9b..7803741682a63672a0b82088412a898ad0a58935 100644 (file)
@@ -10,19 +10,18 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=shorewall6-lite
 PKG_MAJOR_MINOR_VERSION:=5.2
-PKG_BUGFIX_MAJOR_VERSION:=3
-PKG_BUGFIX_MINOR_VERSION:=.7
+PKG_BUGFIX_MAJOR_VERSION:=4
+PKG_BUGFIX_MINOR_VERSION:=
 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_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)/ \
+PKG_SOURCE_URL:=http://shorewall.org/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
        http://slovakia.shorewall.net/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
-       http://shorewall.de/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
-       http://www.shorewall.com.au/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/
+       http://www.shorewall.no/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
+       http://france.shorewall.net/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_HASH:=14d603222b434980fbe3776f028e0bef7873196c23f8070563320bcd9d508659
+PKG_HASH:=376896152bb2f31cf5533988f3506395dde980842c5d9f123857d895c21a1768
 
 PKG_MAINTAINER:=Willem van den Akker <wvdakker@wilsoft.nl>
 PKG_LICENSE:=GPL-2.0-or-later
index e40f82d6d3645df5af7c33ddae7fb5e24b0ffbb9..107f47afd7bbf7eba4fa3204c0e248cbf25e8b25 100644 (file)
@@ -10,19 +10,18 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=shorewall6
 PKG_MAJOR_MINOR_VERSION:=5.2
-PKG_BUGFIX_MAJOR_VERSION:=3
-PKG_BUGFIX_MINOR_VERSION:=.7
+PKG_BUGFIX_MAJOR_VERSION:=4
+PKG_BUGFIX_MINOR_VERSION:=
 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_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)/ \
+PKG_SOURCE_URL:=http://shorewall.org/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
        http://slovakia.shorewall.net/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
-       http://shorewall.de/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
-       http://www.shorewall.com.au/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/
+       http://www.shorewall.no/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
+       http://france.shorewall.net/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_HASH:=a74379e0ddabe263a12945cdfc21f615930a5f258b55efb2b9a50fb035e84d87
+PKG_HASH:=3da28c71b8c5fe9935cfb8eacb260fdf31d57f5ebf6ba8f3e87956e56d3e5cc9
 
 PKG_MAINTAINER:=Willem van den Akker <wvdakker@wilsoft.nl>
 PKG_LICENSE:=GPL-2.0-or-later
index e15edd9c325c4abaa5278ce7959ea4bfbfa322c3..062fdff6e66376510615badf6d904a0e4095e0a4 100644 (file)
@@ -5,8 +5,8 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=simple-adblock
-PKG_VERSION:=1.8.2
-PKG_RELEASE:=2
+PKG_VERSION:=1.8.3
+PKG_RELEASE:=1
 PKG_MAINTAINER:=Stan Grishin <stangri@melmac.net>
 PKG_LICENSE:=GPL-3.0-or-later
 
@@ -55,12 +55,6 @@ define Package/simple-adblock/postinst
        # check if we are on real system
        if [ -z "$${IPKG_INSTROOT}" ]; then
                /etc/init.d/simple-adblock enable
-               while uci -q del ucitrack.@simple-adblock[-1]; do :; done
-               uci -q batch <<-EOF >/dev/null
-                       add ucitrack simple-adblock
-                       set ucitrack.@simple-adblock[0].init='simple-adblock'
-                       commit ucitrack
-       EOF
        fi
        exit 0
 endef
@@ -69,12 +63,7 @@ define Package/simple-adblock/prerm
        #!/bin/sh
        # check if we are on real system
        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 fba8126f071d8dfdaf4a2f65b312c33eddbe19ce..8582f9e16422ba27e278775b8e13d5d8a8ff81ee 100644 (file)
@@ -130,6 +130,7 @@ In the Web UI the ```simple-adblock``` settings are split into ```basic``` and `
 |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.|
+||dns_instance|string|0|String of space-separated DNSMASQ instance numbers (or '*' for all) to be affected by the service. 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.|
@@ -149,10 +150,10 @@ 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.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. This setting also allows you to configure which DNSMASQ instances would be affected by AdBlocking via ```dns_instance``` option.|
 |```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.|
+|```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. This setting also allows you to configure which DNSMASQ instances would be affected by AdBlocking via ```dns_instance``` option.|
 |```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
@@ -178,6 +179,14 @@ For most of the [DNS Resolution Options](#dns-resolution-option) to work, your l
       - 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.
+  5. If you are running a wireguard "server" on your router and remote clients connect to it, the AdBlocking may not work properly for your remote clients until you add the following to ```/etc/network``` (credit to [dibdot](https://forum.openwrt.org/t/wireguard-and-adblock/49351/6)):
+
+      ```sh
+      config route
+        option interface 'wg0'
+        option target '192.168.1.0'
+        option netmask '255.255.255.0'
+      ```
 
 ## Documentation / Discussion
 
index 2378188c5c69324a3ebaca2cc5a25ea7237a04f2..083374fd061152ef868551686077a5d366724a46 100644 (file)
@@ -11,63 +11,60 @@ config simple-adblock 'config'
        option parallel_downloads '1'
        option debug '0'
        option compressed_cache '0'
-  list whitelist_domain 'raw.githubusercontent.com'
+       list whitelist_domain 'raw.githubusercontent.com'
 
 # 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'
+       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'
+#      list blacklist_domains_url 'https://www.dshield.org/feeds/suspiciousdomains_High.txt'
 
 # File size: 12.0K
-  list blacklist_domains_url 'https://ssl.bblck.me/blacklists/domain-list.txt'
+       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'
+       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'
+       list blacklist_domains_url 'https://s3.amazonaws.com/lists.disconnect.me/simple_malvertising.txt'
 
 # File size: 60.0K
-# use just one of the dshield.org blocklists
-#  list blacklist_domains_url 'https://dshield.org/feeds/suspiciousdomains_Medium.txt'
+# use just one of the www.dshield.org blocklists
+       list blacklist_domains_url 'https://www.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'
+# use just one of the www.dshield.org blocklists
+#      list blacklist_domains_url 'https://www.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'
+#      list blacklist_domains_url 'https://mirror1.malwaredomains.com/files/justdomains'
 
 # File size: 16.0K
-  list blacklist_hosts_url 'https://adaway.org/hosts.txt'
-  
+       list blacklist_hosts_url 'https://adaway.org/hosts.txt'
+       
 # File size: 20.0K
-  list blacklist_hosts_url 'https://raw.githubusercontent.com/hoshsadiq/adblock-nocoin-list/master/hosts.txt'
+       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'
+       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'
+       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
 # blocklist may block some video-streaming content
-#  list blacklist_hosts_url 'https://raw.githubusercontent.com/jawz101/MobileAdTrackers/master/hosts'
+#      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'
+       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'
+       list blacklist_hosts_url 'https://someonewhocares.org/hosts/hosts'
 
 # File size: 624.0K
 # blocklist too big for most routers
@@ -75,12 +72,12 @@ config simple-adblock 'config'
 
 # File size: 1.7M
 # blocklist too big for most routers
-#  list blacklist_hosts_url 'https://hosts-file.net/ad_servers.txt'
+#      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'
+#      list blacklist_hosts_url 'https://hostsfile.mine.nu/Hosts'
 
 # site was down on last check
-#  list blacklist_domains_url 'http://support.it-mate.co.uk/downloads/hosts.txt'
+#      list blacklist_domains_url 'http://support.it-mate.co.uk/downloads/hosts.txt'
 
index 0b8e2d8bc098d340909b0b10aa031b4c88536dc2..6dc495d04d98ec6aa85a360a5733422869eb30f1 100644 (file)
@@ -1,5 +1,5 @@
 #!/bin/sh
 
 if [ "$ACTION" = "ifup" ]; then
-  sleep 10 && /etc/init.d/simple-adblock start hotplug &
+       sleep 10 && /etc/init.d/simple-adblock start hotplug &
 fi
index 7272af73704bdebaa36cac1db36404f4f7f73ee7..47935b30eed49b2a27a533f09cdbebfb7c8dd92a 100644 (file)
@@ -8,11 +8,11 @@ export START=94
 export USE_PROCD=1
 export LC_ALL=C
 
-export EXTRA_COMMANDS='check dl killcache sizes status'
+export EXTRA_COMMANDS='check dl killcache sizes show'
 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'
+       dl      Force-downloads all enabled block-list
+       sizes   Displays the file-sizes of enabled block-lists
+       show    Shows the service last-run status'
 
 readonly packageName='simple-adblock'
 readonly serviceName="$packageName $PKG_VERSION"
@@ -41,6 +41,8 @@ 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 sharedMemoryError="/dev/shm/$packageName-error"
+readonly sharedMemoryOutput="/dev/shm/$packageName-output"
 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'
@@ -50,17 +52,55 @@ 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"
+
+readonly messageSuccess='Success'
+readonly messageFail='Fail'
+readonly messageDownloading='Downloading'
+readonly messageReloading='Reloading'
+readonly messageRestarting='Restarting'
+readonly messageStarting='Starting'
+readonly messageForceReloading='Force-Reloading'
+readonly messageProcessing='Processing'
+readonly messageStopped='Stopped'
+getStatusText() {
+       local _ret
+       case "$1" in
+               statusNoInstall) _ret="$serviceName is not installed or not found";;
+               statusStopped) _ret="Stopped";;
+               statusStarting) _ret="Starting";;
+               statusRestarting) _ret="Restarting";;
+               statusForceReloading) _ret="Force Reloading";;
+               statusDownloading) _ret="Downloading";;
+               statusError) _ret="Error";;
+               statusWarning) _ret="Warning";;
+               statusFail) _ret="Fail";;
+               statusSuccess) _ret="Success";;
+       esac
+       printf "%b" "$_ret"
+}
+getErrorText() {
+       local _ret
+       case "$1" in
+               errorOutputFileCreate) _ret="failed to create $outputFile file";;
+               errorFailDNSReload) _ret="failed to restart/reload DNS resolver";;
+               errorSharedMemory) _ret="failed to access shared memory";;
+               errorSorting) _ret="failed to sort data file";;
+               errorOptimization) _ret="failed to optimize data file";;
+               errorWhitelistProcessing) _ret="failed to process whitelist";;
+               errorDataFileFormatting) _ret="failed to format data file";;
+               errorMovingDataFile) _ret="failed to move data file '${A_TMP}' to '${outputFile}'";;
+               errorCreatingCompressedCache) _ret="failed to create compressed cache";;
+               errorRemovingTempFiles) _ret="failed to remove temporary files";;
+               errorRestoreCompressedCache) _ret="failed to unpack compressed cache";;
+               errorRestoreCache) _ret="failed to move '$outputCache' to '$outputFile'";;
+               errorOhSnap) _ret="failed to create blocklist or restart DNS resolver";;
+               errorStopping) _ret="failed to stop $serviceName";;
+               errorDNSReload) _ret="failed to reload/restart DNS resolver";;
+               errorDownloadingList) _ret="failed to download";;
+               errorParsingList) _ret="failed to parse";;
+       esac
+       printf "%b" "$_ret"
+}
 
 create_lock() { [ -e "$PIDFile" ] && return 1; touch "$PIDFile"; }
 remove_lock() { [ -e "$PIDFile" ] && rm -f "$PIDFile"; }
@@ -69,8 +109,8 @@ 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() { printf "%b" "$1" | sed -e "s/$(printf "%b" "$2")/$(printf "%b" "$3")/g"; }
-str_contains() { test "$1" != "$(str_replace "$1" "$2" '')"; }
+str_replace() { printf "%b" "$1" | sed -e "s/$(printf "%b" "$2")/$(printf "%b" "$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"; }
@@ -89,7 +129,7 @@ output() {
                if [ $((verbosity & $1)) -gt 0 ] || [ "$verbosity" = "$1" ]; then shift; else return 0; fi
        fi
        [ -t 1 ] && printf "%b" "$1"
-       msg="$(printf "%s" "$(str_replace "$1" "$serviceName " "service ")" | sed 's|\\033\[[0-9]\?;\?[0-9]\?[0-9]\?m||g')";
+       msg="${1//$serviceName /service }";
        if [ "$(printf "%b" "$msg" | wc -l)" -gt 0 ]; then
                [ -s "$sharedMemoryOutput" ] && memmsg="$(cat "$sharedMemoryOutput")"
                logger -t "${packageName:-service} [$$]" "$(printf "%b" "${memmsg}${msg}")"
@@ -100,7 +140,7 @@ output() {
 }
 
 export serviceEnabled forceDNS parallelDL debug allowIDN compressedCache     
-export targetDNS bootDelay dlTimeout curlRetry verbosity led dnsInstance
+export targetDNS bootDelay dlTimeout curlRetry verbosity=1 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
@@ -192,12 +232,15 @@ load_package_config() {
        . /lib/functions/network.sh
        . /usr/share/libubox/jshn.sh
        # Prefer curl because it supports the file: scheme.
-       if [ -x /usr/bin/curl ] ; then
+       if [ -x /usr/bin/curl ]; then
                dl_command="curl --insecure --retry $curlRetry --connect-timeout $dlTimeout --silent"
                dl_flag="-o"
-       else
+       elif wget -V 2>/dev/null | grep -q "+ssl"; then
                dl_command="wget --no-check-certificate --timeout $dlTimeout -q"
                dl_flag="-O"
+       else
+               dl_command="uclient-fetch --no-check-certificate --timeout $dlTimeout -q"
+               dl_flag="-O"
        fi
        led="${led:+/sys/class/leds/$led}"
 }
@@ -256,60 +299,67 @@ is_enabled() {
        output "$_ERROR_: $serviceName failed to discover WAN gateway.\\n"; return 1;
 }
 
+dnsmasqOps() {
+       local cfg="$1" param="$2"
+       case "$param" in
+               dnsmasq.addnhosts)
+                       if [ "$(uci -q get dhcp."$cfg".serversfile)" = "$serversFile" ]; then
+                               uci -q del dhcp."$cfg".serversfile
+                       fi
+                       if ! uci -q get dhcp."$cfg".addnhosts | grep -q "$addnhostsFile"; then
+                               uci add_list dhcp."$cfg".addnhosts="$addnhostsFile"
+                       fi
+                       ;;
+               dnsmasq.conf|dnsmasq.ipset|unbound.adb_list|cleanup)
+                       uci -q del_list dhcp."$cfg".addnhosts="$addnhostsFile"
+                       if [ "$(uci -q get dhcp."$cfg".serversfile)" = "$serversFile" ]; then
+                               uci -q del dhcp."$cfg".serversfile
+                       fi
+                       ;;
+               dnsmasq.servers)
+                       uci -q del_list dhcp."$cfg".addnhosts="$addnhostsFile"
+                       if [ "$(uci -q get dhcp."$cfg".serversfile)" != "$serversFile" ]; then
+                               uci set dhcp."$cfg".serversfile="$serversFile"
+                       fi
+                       ;;
+       esac
+}
+
 dnsOps() {
-       local param output_text
+       local param output_text i
        case $1 in
                on_start)
                        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"
+                               tmpfs set status "statusFail"
+                               tmpfs add error "errorOutputFileCreate"
+                               output "$_ERROR_: $(getErrorText 'errorOutputFileCreate')!\\n"
                                return 1
                        fi
+
+                       config_load 'dhcp'
+                       if [ "$dnsInstance" = "*" ]; then
+                               config_foreach dnsmasqOps 'dnsmasq' "$targetDNS"
+                       elif [ -n "$dnsInstance" ]; then
+                               for i in $dnsInstance; do
+                                       dnsmasqOps "@dnsmasq[$i]" "$targetDNS"
+                               done
+                       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
+                               dnsmasq.addnhosts|dnsmasq.servers)
                                        param=dnsmasq_hup
                                        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
+                               dnsmasq.conf|dnsmasq.ipset)
                                        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_hup
-                                       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
@@ -324,14 +374,14 @@ dnsOps() {
                        output 2 "$output_text "
                        tmpfs set message "$output_text"
                        if eval "$param"; then
-                               tmpfs set status "$statusSuccess"
+                               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"
+                               tmpfs set status "statusFail"
+                               tmpfs add error "errorDNSReload"
+                               output "$_ERROR_: $(getErrorText 'errorDNSReload')!\\n"
                                return 1
                        fi
                        ;;
@@ -374,8 +424,8 @@ dnsOps() {
 }
 
 tmpfs() {
-       local action="$1" instance="$2" value="$3" 
-       local status message error stats 
+       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']")"
@@ -389,13 +439,13 @@ tmpfs() {
                get)
                        case "$instance" in
                                status)
-                                       echo "$status"; return;;
+                                       printf "%b" "$status"; return;;
                                message) 
-                                       echo "$message"; return;;
+                                       printf "%b" "$message"; return;;
                                error) 
-                                       echo "$error"; return;;
+                                       printf "%b" "$error"; return;;
                                stats) 
-                                       echo "$stats"; return;;
+                                       printf "%b" "$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"
@@ -404,7 +454,7 @@ tmpfs() {
                                        elif [ "$curRestart" != "$readRestart" ]; then
                                                ret='restart'
                                        fi
-                                       echo "$ret"
+                                       printf "%b" "$ret"
                                        return;;
                        esac
                        ;;
@@ -413,8 +463,8 @@ tmpfs() {
                                status)
                                        [ -n "$status" ] && status="$status $value" || status="$value";;
                                message) 
-                                       [ -n "$message" ] && message="${message} ${value}" || message="$value";;
-                               error) 
+                                       [ -n "$message" ] && message="$message $value" || message="$value";;
+                               error)
                                        [ -n "$error" ] && error="$error $value" || error="$value";;
                                stats) 
                                        [ -n "$stats" ] && stats="$stats $value" || stats="$value";;
@@ -457,17 +507,17 @@ tmpfs() {
                        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"
+       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
 }
 
@@ -520,7 +570,7 @@ fw3Ops() {
                        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_ipset_rule;;
                                *)
                                        uci -q del firewall.simple_adblock_dns_redirect
                                        uci -q del firewall.simple_adblock_ipset
@@ -622,13 +672,13 @@ process_url() {
        if ! $dl_command "$1" $dl_flag "$R_TMP" 2>/dev/null || [ ! -s "$R_TMP" ]; then
                output 1 "$_FAIL_"
                output 2 "[DL] $type $label $__FAIL__\\n"
-               echo "Error: downloading '${1}'." >> "$sharedMemoryError"
+               echo "errorDownloadingList=${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"
+                       echo "errorParsingList=${1}" >> "$sharedMemoryError"
                else
                        cat "${R_TMP}" >> "$D_TMP"
                        output 1 "$_OK_"
@@ -642,7 +692,9 @@ process_url() {
 download_lists() {
        local hf w_filter j=0 R_TMP
 
-       tmpfs set message "${statusDownloading}..."
+       tmpfs set message "${messageDownloading}..."
+       tmpfs set status "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 resolver... '
@@ -683,9 +735,13 @@ download_lists() {
                done
        fi
        wait
-       [ -s "$sharedMemoryError" ] && tmpfs add error "$(cat "$sharedMemoryError")"
-       rm -f "$sharedMemoryError"
        output 1 '\n'
+       if [ -s "$sharedMemoryError" ]; then
+               while IFS= read -r line; do
+                       tmpfs add error "$line"
+               done < "$sharedMemoryError"
+               rm -f "$sharedMemoryError"
+       fi
 
        [ -n "$blacklist_domains" ] && for hf in ${blacklist_domains}; do echo "$hf" | sed "$domainsFilter" >> $B_TMP; done
        whitelist_domains="${whitelist_domains}
@@ -696,30 +752,30 @@ $(cat $A_TMP)"
 
        output 1 'Processing downloads '
        output 2 'Sorting combined list '
-       tmpfs set message "$statusProcessing: sorting combined list"
+       tmpfs set message "$messageProcessing: 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.'
+                       tmpfs add error "errorSorting"
                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.'
+                       tmpfs add error "errorSorting"
                fi
        fi
 
        if [ "$targetDNS" = 'dnsmasq.conf' ] || \
-          [ "$targetDNS" = 'dnsmasq.ipset' ] || \
-          [ "$targetDNS" = 'dnsmasq.servers' ] || \
+                [ "$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"
+               tmpfs set message "$messageProcessing: 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
@@ -729,25 +785,25 @@ $(cat $A_TMP)"
                                                        output_ok
                                                else
                                                        output_failn
-                                                       tmpfs add error 'Error: Data file optimization.'
+                                                       tmpfs add error "errorOptimization"
                                                        mv "$A_TMP" "$B_TMP"
                                                fi
                                        else
                                                output_failn
-                                               tmpfs add error 'Error: Data file optimization.'
+                                               tmpfs add error "errorOptimization"
                                        fi
                                else
                                        output_failn
-                                       tmpfs add error 'Error: Data file optimization.'
+                                       tmpfs add error "errorOptimization"
                                        mv "$A_TMP" "$B_TMP"
                                fi
                        else
                                output_failn
-                               tmpfs add error 'Error: Data file optimization.'
+                               tmpfs add error "errorOptimization"
                        fi
                else
                        output_failn
-                       tmpfs add error 'Error: Data file optimization.'
+                       tmpfs add error "errorOptimization"
                        mv "$A_TMP" "$B_TMP"
                fi
        else
@@ -755,22 +811,22 @@ $(cat $A_TMP)"
        fi
 
        output 2 'Whitelisting domains '
-       tmpfs set message "$statusProcessing: whitelisting domains"
+       tmpfs set message "$messageProcessing: whitelisting domains"
        if sed -i "$w_filter" "$B_TMP"; then
                output_ok
        else
                output_failn
-               tmpfs add error 'Error: Whitelist processing.'
+               tmpfs add error "errorWhitelistProcessing"
        fi
 
        output 2 'Formatting merged file '
-       tmpfs set message "$statusProcessing: formatting merged file"
+       tmpfs set message "$messageProcessing: 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.'
+                       tmpfs add error "errorDataFileFormatting"
                fi
        else
                case "$targetDNS" in
@@ -780,7 +836,7 @@ $(cat $A_TMP)"
                                        output_ok
                                else
                                        output_failn
-                                       tmpfs add error 'Error: Data file formatting.'
+                                       tmpfs add error "errorDataFileFormatting"
                                fi
                                ;;
                esac
@@ -789,51 +845,51 @@ $(cat $A_TMP)"
        case "$targetDNS" in
                dnsmasq.addnhosts)
                        output 2 'Creating DNSMASQ addnhosts file '
-                       tmpfs set message "$statusProcessing: creating DNSMASQ addnhosts file"
+                       tmpfs set message "$messageProcessing: creating DNSMASQ addnhosts file"
                        ;;
                dnsmasq.conf)
                        output 2 'Creating DNSMASQ config file '
-                       tmpfs set message "$statusProcessing: creating DNSMASQ config file"
+                       tmpfs set message "$messageProcessing: creating DNSMASQ config file"
                        ;;
                dnsmasq.ipset)
                        output 2 'Creating DNSMASQ ipset file '
-                       tmpfs set message "$statusProcessing: creating DNSMASQ ipset file"
+                       tmpfs set message "$messageProcessing: creating DNSMASQ ipset file"
                        ;;
                dnsmasq.servers)
                        output 2 'Creating DNSMASQ servers file '
-                       tmpfs set message "$statusProcessing: creating DNSMASQ servers file"
+                       tmpfs set message "$messageProcessing: creating DNSMASQ servers file"
                        ;;
                unbound.adb_list)
                        output 2 'Creating Unbound adb_list file '
-                       tmpfs set message "$statusProcessing: creating Unbound adb_list file"
+                       tmpfs set message "$messageProcessing: 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}'."
+               tmpfs add error "errorMovingDataFile"
        fi
        if [ "$compressedCache" -gt 0 ]; then
                output 2 'Creating compressed cache '
-               tmpfs set message "$statusProcessing: creating compressed cache"
+               tmpfs set message "$messageProcessing: creating compressed cache"
                if cacheOps 'createGzip'; then
                        output_ok
                else
                        output_failn
-                       tmpfs add error 'Error: creating compressed cache.'
+                       tmpfs add error "errorCreatingCompressedCache"
                fi
        else
                rm -f "$outputGzip"
        fi
        output 2 'Removing temporary files '
-       tmpfs set message "$statusProcessing: removing temporary files"
+       tmpfs set message "$messageProcessing: 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.'
+               tmpfs add error "errorRemovingTempFiles"
        fi
        output 1 '\n'
 }
@@ -849,7 +905,7 @@ boot() {
 
 start_service() {
        is_enabled 'on_start' || return 1
-       local action status error message stats
+       local action status error message stats c
        if ! create_lock; then
                output 3 "$serviceName: another instance is starting up "; output_fail
                return 0
@@ -869,8 +925,8 @@ start_service() {
                action='restore'
        elif [ "$action" = 'restart' ] || [ "$1" = 'restart' ]; then
                action='restart'
-       elif [ -s "$outputFile" ] && [ -n "$status" ] && [ -z "$error" ]; then
-               if [ "$1" != 'hotplug' ]; then status; fi
+       elif [ -s "$outputFile" ] && [ "$status" = "statusSuccess" ] && [ -z "$error" ]; then
+               [ "$1" != 'hotplug' ] && showstatus
                exit 0
        else
                action='download'
@@ -941,7 +997,7 @@ start_service() {
        if [ "$action" = 'restore' ]; then
                output 0 "Starting $serviceName... "
                output 3 "Starting $serviceName...\\n"
-               tmpfs set status "$statusStarting"
+               tmpfs set status "statusStarting"
                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.'
@@ -949,7 +1005,8 @@ start_service() {
                                output_okn
                        else
                                output_fail
-                               output "$_ERROR_: $serviceName failed to unpack compressed cache!\\n"
+                               tmpfs add error "errorRestoreCompressedCache"
+                               output "$_ERROR_: $(getErrorText 'errorRestoreCompressedCache')!\\n"
                                action='download'
                        fi
                fi
@@ -959,9 +1016,10 @@ start_service() {
                        if cacheOps 'restore'; then 
                                output_okn
                                dnsOps 'on_start'
-                       else 
+                       else
                                output_fail
-                               output "$_ERROR_: $serviceName failed to move '$outputCache' to '$outputFile'!\\n"
+                               tmpfs add error "errorRestoreCache"
+                               output "$_ERROR_: $(getErrorText 'errorRestoreCache')!\\n"
                                action='download'
                        fi
                fi
@@ -971,11 +1029,11 @@ start_service() {
                        if [ -s "$outputFile" ] || cacheOps 'test' || cacheOps 'testGzip'; then
                                output 0 "Force-reloading $serviceName... "
                                output 3 "Force-reloading $serviceName...\\n"
-                               tmpfs set status "$statusForceReloading"
+                               tmpfs set status "statusForceReloading"
                        else
                                output 0 "Starting $serviceName... "
                                output 3 "Starting $serviceName...\\n"
-                               tmpfs set status "$statusStarting"
+                               tmpfs set status "statusStarting"
                        fi
                        download_lists
                        dnsOps 'on_start'
@@ -983,30 +1041,28 @@ start_service() {
                restart)
                        output 0 "Restarting $serviceName... "
                        output 3 "Restarting $serviceName...\\n"
-                       tmpfs set status "$statusRestarting"
+                       tmpfs set status "statusRestarting"
                        dnsOps 'on_start'
                ;;
                start)
                        output 0 "Starting $serviceName... "
                        output 3 "Starting $serviceName...\\n"
-                       tmpfs set status "$statusStarting"
+                       tmpfs set status "statusStarting"
                        dnsOps 'on_start'
                ;;
        esac
-       if [ -s "$outputFile" ] && [ "$(tmpfs get status)" != "$statusFail" ]; then
+       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
+               tmpfs set status "statusSuccess"
+               c="$(wc -l < "$outputFile")"
+               tmpfs set stats "$serviceName is blocking $c domains (with ${targetDNS})"
+               showstatus
        else
                output 0 "$__FAIL__\\n";
-               tmpfs set status "$statusFail"
-               tmpfs add error 'Error: Failed to create blocklist or restart DNS resolver.'
+               tmpfs set status "statusFail"
+               tmpfs add error "errorOhSnap"
+               showstatus
        fi
        remove_lock
 }
@@ -1018,23 +1074,48 @@ 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"
+       config_load 'dhcp'
+       config_foreach dnsmasqOps 'dnsmasq' 'cleanup'
+       uci -q commit 'dhcp'
        return 0
 }
 
-status_service() {
-       local status="$(tmpfs get status)" error="$(tmpfs get error)" message="$(tmpfs get message)"
-       if [ -n "$status" ] && [ -n "$message" ]; then
-               status="${status}: $message"
+show() { showstatus; }
+status_service() { showstatus; }
+showstatus() {
+       local status="$(tmpfs get status)"
+       local message="$(tmpfs get message)"
+       local error="$(tmpfs get error)"
+       local stats="$(tmpfs get stats)"
+       local c url
+       if [ "$status" = "statusSuccess" ]; then
+               output "$stats "; output_okn;
+       else
+               [ -n "$status" ] && status="$(getStatusText "$status")"
+               if [ -n "$status" ] && [ -n "$message" ]; then 
+                       status="${status}: $message"
+               fi
+               [ -n "$status" ] && output "$serviceName $status\\n"
+       fi
+       if [ -n "$error" ]; then
+               for c in $error; do
+                       url="${c##*=}"
+                       c="${c%=*}"
+                       case "$c" in
+                               errorDownloadingList|errorParsingList)
+                                       output "$_ERROR_: $(getErrorText "$c") $url!\\n";;
+                               *)
+                                       output "$_ERROR_: $(getErrorText "$c")!\\n";;
+                       esac
+                       let n=n+1
+               done
        fi
-       [ -n "$status" ] && output "$serviceName $status\\n"
-       [ -n "$error" ] && output "$error\\n"
 }
 
 stop_service() {
@@ -1045,18 +1126,22 @@ stop_service() {
                cacheOps 'create'
                if dnsOps 'on_stop'; then
                        led_off "$led"
-                       output 0 "$__OK__\\n"; output_okn
-                       tmpfs set status "$statusStopped"
+                       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"
+                       output 0 "$__FAIL__\\n"; output_fail;
+                       tmpfs set status "statusFail"
+                       tmpfs add error "errorStopping"
+                       output "$_ERROR_: $(getErrorText 'errorStopping')!\\n"
                fi
        fi
 }
 
+service_triggers() {
+       procd_add_reload_trigger 'simple-adblock'
+}
+
 check() {
        load_package_config
        local string="$1" 
index cf379ce7080f6ae7f70bd7bfa04e357c5ba6a701..3e966e4956178e4df104b4a19882594666eca358 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=softflowd
 PKG_VERSION:=1.0.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/irino/softflowd/tar.gz/softflowd-$(PKG_VERSION)?
diff --git a/net/softflowd/patches/020-uid.patch b/net/softflowd/patches/020-uid.patch
new file mode 100644 (file)
index 0000000..fe2ea7c
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/common.h
++++ b/common.h
+@@ -179,7 +179,7 @@ struct ip6_ext {
+ /* following lines are copy from unistd.h in Linux for avoidance warnings in compilation */
+ #if defined(HAVE_SETRESGID) && !defined(_GNU_SOURCE)
+-extern int setresgid (__uid_t __ruid, __uid_t __euid, __uid_t __suid);
++extern int setresgid (uid_t __ruid, uid_t __euid, uid_t __suid);
+ #endif
+ #if defined(HAVE_SETRESUID) && !defined(_GNU_SOURCE)
+ extern int setresuid (__uid_t __ruid, __uid_t __euid, __uid_t __suid);
index bab74678ee941ea91f16c6316ea540a9850f0d60..23462d45cc47dce0b1e7658f779edb6d568d2d26 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=sqm-scripts
 PKG_SOURCE_VERSION:=ab763cba8b1516b3afa99760e0ca884f8b8d93b8
 PKG_VERSION:=1.4.0
-PKG_RELEASE:=5
+PKG_RELEASE:=7
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/tohojo/sqm-scripts
@@ -24,8 +24,9 @@ include $(INCLUDE_DIR)/package.mk
 define Package/sqm-scripts
   SECTION:=net
   CATEGORY:=Base system
-  DEPENDS:=+tc +kmod-sched-core +kmod-sched-cake +kmod-ifb +iptables \
-       +iptables-mod-ipopt +iptables-mod-conntrack-extra
+  DEPENDS:=+tc +kmod-sched-core +kmod-ifb +iptables \
+       +iptables-mod-ipopt +iptables-mod-conntrack-extra \
+       +!LINUX_4_14:kmod-sched-cake +LINUX_4_14:kmod-sched-cake-oot
   TITLE:=SQM Scripts (QoS)
   PKGARCH:=all
 endef
@@ -43,34 +44,4 @@ define Package/sqm-scripts/install
        make -C $(PKG_BUILD_DIR) DESTDIR=$(1) PLATFORM=openwrt install
 endef
 
-define Package/luci-app-sqm
-  SECTION:=luci
-  CATEGORY:=LuCI
-  TITLE:=SQM Scripts - LuCI interface
-  PKGARCH:=all
-  DEPENDS:=+luci-compat +sqm-scripts
-  SUBMENU:=3. Applications
-endef
-
-define Package/luci-app-sqm/description
-       Luci interface for the SQM scripts queue management configuration package.
-endef
-
-define Package/luci-app-sqm/install
-       $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR=$(1) PLATFORM=openwrt install-luci
-       $(INSTALL_DIR) $(1)/etc/uci-defaults
-       $(INSTALL_BIN) ./files/luci-app-sqm.defaults $(1)/etc/uci-defaults
-endef
-
-define Package/luci-app-sqm/postrm
-#!/bin/sh
-which uci > /dev/null || exit 0
-uci -q get ucitrack.@sqm[0] > /dev/null && {
-  uci delete ucitrack.@sqm[0]
-  uci del_list ucitrack.@firewall[0].affects=sqm
-  uci commit
-} || exit 0
-endef
-
 $(eval $(call BuildPackage,sqm-scripts))
-$(eval $(call BuildPackage,luci-app-sqm))
diff --git a/net/sqm-scripts/files/luci-app-sqm.defaults b/net/sqm-scripts/files/luci-app-sqm.defaults
deleted file mode 100644 (file)
index 117a117..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-uci -q get ucitrack.@sqm[0] >/dev/null || {
-       uci add ucitrack sqm > /dev/null
-       uci set ucitrack.@sqm[0].init=sqm
-       uci add_list ucitrack.@firewall[0].affects=sqm
-       uci commit
-}
index 6340a4abc5e4ad4856a4dd81f3a8548bcd32aed7..9b4c33678c18b48ddc727dfb81e44576bc54ee20 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=strongswan
 PKG_VERSION:=5.8.2
-PKG_RELEASE:=1
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://download.strongswan.org/ https://download2.strongswan.org/
@@ -447,17 +447,12 @@ CONFIGURE_ARGS+= \
 EXTRA_LDFLAGS+= -Wl,-rpath-link,$(STAGING_DIR)/usr/lib
 
 define Package/strongswan/conffiles
-/etc/ipsec.d/
-/etc/ipsec.conf
-/etc/ipsec.secrets
-/etc/ipsec.user
 /etc/strongswan.conf
 /etc/strongswan.d/
 endef
 
 define Package/strongswan/install
        $(INSTALL_DIR) $(1)/etc
-       $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/ipsec.conf $(1)/etc/
        $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/strongswan.conf $(1)/etc/
        $(INSTALL_DIR) $(1)/usr/lib/ipsec
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/ipsec/libstrongswan.so.* $(1)/usr/lib/ipsec/
@@ -497,8 +492,16 @@ define Package/strongswan-charon-cmd/install
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/charon-cmd $(1)/usr/sbin/
 endef
 
+define Package/strongswan-ipsec/conffiles
+/etc/ipsec.d/
+/etc/ipsec.conf
+/etc/ipsec.secrets
+/etc/ipsec.user
+endef
+
 define Package/strongswan-ipsec/install
-       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_DIR) $(1)/etc/ $(1)/usr/sbin
+       $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/ipsec.conf $(1)/etc/
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ipsec $(1)/usr/sbin/
 endef
 
@@ -516,6 +519,10 @@ define Package/strongswan-scepclient/install
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ipsec/scepclient $(1)/usr/lib/ipsec/
 endef
 
+define Package/strongswan-swanctl/conffiles
+/etc/swanctl/
+endef
+
 define Package/strongswan-swanctl/install
        $(INSTALL_DIR) $(1)/etc/swanctl/{bliss,ecdsa,pkcs{12,8},private,pubkey,rsa}
        $(INSTALL_DIR) $(1)/etc/swanctl/x509{,aa,ac,ca,crl,ocsp}
index 1b5f83ef2fdbffdd7949cf4d620f9892e88f6d62..89a4bd0c95e10b4a3e4a7ed9a1ea0a3ad4d52a3e 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=tinyproxy
 PKG_VERSION:=1.10.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://github.com/tinyproxy/tinyproxy/releases/download/$(PKG_VERSION)
index 3c1a48fc556cb9091ab53d8cfcaffe86356a6086..1feac669c3d1433ed78404e8a72f0740e4822c2e 100644 (file)
@@ -2,8 +2,10 @@
 # Copyright (C) 2008-2011 OpenWrt.org
 
 START=50
+USE_PROCD=1
 
 CFGFILE=/var/etc/tinyproxy.conf
+PROG=/usr/bin/tinyproxy
 
 section_enabled() {
        local enabled
@@ -11,74 +13,6 @@ section_enabled() {
        [ "$enabled" -gt 0 ]
 }
 
-start() {
-       config_load 'tinyproxy'
-       config_foreach start_proxy 'tinyproxy'
-}
-
-stop() {
-       service_stop /usr/sbin/tinyproxy
-}
-
-start_proxy() {
-       section_enabled "$1" || return 1
-
-       mkdir -p /var/etc
-       chmod 0755 /var/etc
-       {
-       echo '### AUTOGENERATED CONFIGURATION'
-       echo '### DO NOT EDIT'
-       echo '### SEE /etc/config/tinyproxy INSTEAD'
-       echo ''
-
-       proxy_atom "$1" User
-       proxy_atom "$1" Group
-       proxy_atom "$1" Port 8888
-       proxy_atom "$1" Listen
-       proxy_atom "$1" Bind
-       proxy_atom "$1" Timeout
-
-       proxy_string "$1" ErrorFile_400 "ErrorFile 400"
-       proxy_string "$1" ErrorFile_403 "ErrorFile 403"
-       proxy_string "$1" ErrorFile_404 "ErrorFile 404"
-       proxy_string "$1" ErrorFile_408 "ErrorFile 408"
-       proxy_string "$1" ErrorFile_503 "ErrorFile 503"
-
-       proxy_string "$1" DefaultErrorFile
-       proxy_string "$1" StatHost StatHost 127.0.0.1
-       proxy_string "$1" StatFile
-       proxy_string "$1" LogFile
-
-       proxy_flag "$1" Syslog
-
-       proxy_atom "$1" LogLevel
-
-       proxy_flag "$1" XTinyproxy
-
-       proxy_atom "$1" MaxClients
-       proxy_atom "$1" MinSpareServers
-       proxy_atom "$1" MaxSpareServers
-       proxy_atom "$1" StartServers
-       proxy_atom "$1" MaxRequestsPerChild
-       proxy_list "$1" Allow
-
-       proxy_string "$1" ViaProxyName
-       proxy_string "$1" Filter
-
-       proxy_flag "$1" FilterURLs
-       proxy_flag "$1" FilterExtended
-       proxy_flag "$1" FilterCaseSensitive
-       proxy_flag "$1" FilterDefaultDeny Yes No
-
-       proxy_list "$1" Anonymous '"'
-       proxy_list "$1" ConnectPort
-
-       config_foreach write_upstream upstream
-       } > "$CFGFILE"
-
-       service_start /usr/sbin/tinyproxy -c "$CFGFILE"
-}
-
 write_upstream() {
        local type
        local via
@@ -144,3 +78,71 @@ proxy_list() {
                done
        }
 }
+
+start_proxy() {
+       section_enabled "$1" || return 1
+
+       mkdir -p /var/etc
+       chmod 0755 /var/etc
+       {
+       echo '### AUTOGENERATED CONFIGURATION'
+       echo '### DO NOT EDIT'
+       echo '### SEE /etc/config/tinyproxy INSTEAD'
+       echo ''
+
+       proxy_atom "$1" User
+       proxy_atom "$1" Group
+       proxy_atom "$1" Port 8888
+       proxy_atom "$1" Listen
+       proxy_atom "$1" Bind
+       proxy_atom "$1" Timeout
+
+       proxy_string "$1" ErrorFile_400 "ErrorFile 400"
+       proxy_string "$1" ErrorFile_403 "ErrorFile 403"
+       proxy_string "$1" ErrorFile_404 "ErrorFile 404"
+       proxy_string "$1" ErrorFile_408 "ErrorFile 408"
+       proxy_string "$1" ErrorFile_503 "ErrorFile 503"
+
+       proxy_string "$1" DefaultErrorFile
+       proxy_string "$1" StatHost StatHost 127.0.0.1
+       proxy_string "$1" StatFile
+       proxy_string "$1" LogFile
+
+       proxy_flag "$1" Syslog
+
+       proxy_atom "$1" LogLevel
+
+       proxy_flag "$1" XTinyproxy
+
+       proxy_atom "$1" MaxClients
+       proxy_atom "$1" MinSpareServers
+       proxy_atom "$1" MaxSpareServers
+       proxy_atom "$1" StartServers
+       proxy_atom "$1" MaxRequestsPerChild
+       proxy_list "$1" Allow
+
+       proxy_string "$1" ViaProxyName
+       proxy_string "$1" Filter
+
+       proxy_flag "$1" FilterURLs
+       proxy_flag "$1" FilterExtended
+       proxy_flag "$1" FilterCaseSensitive
+       proxy_flag "$1" FilterDefaultDeny Yes No
+
+       proxy_list "$1" Anonymous '"'
+       proxy_list "$1" ConnectPort
+
+       config_foreach write_upstream upstream
+       } > "$CFGFILE"
+
+       procd_open_instance
+       procd_set_param command "$PROG"
+       procd_append_param command -c "$CFGFILE"
+       procd_append_param command -d
+       procd_close_instance
+}
+
+start_service() {
+       config_load 'tinyproxy'
+       config_foreach start_proxy 'tinyproxy'
+}
index f9f980af9d039777910ee3350748a03bc8524bd1..cad225e01b1c87c350d8ffbfd79c69f4d01e5ef1 100644 (file)
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=tor
-PKG_VERSION:=0.4.2.6
-PKG_RELEASE:=3
+PKG_VERSION:=0.4.2.7
+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:=0500102433849bbe3231c590973d126c2d2d6b3943b4b9f9962bdb108436e6c4
+PKG_HASH:=06a1d835ddf382f6bca40a62e8fb40b71b2f73d56f0d53523c8bd5caf9b3026d
 PKG_MAINTAINER:=Hauke Mehrtens <hauke@hauke-m.de> \
                Peter Wagner <tripolar@gmx.at>
 PKG_LICENSE_FILES:=LICENSE
index 5fcb5b973f52120ce94d4fd7de3d52d4369732c1..6425334125658688ca44e7aa01b70fb95d21453f 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=transmission
 PKG_VERSION:=2.94
-PKG_RELEASE:=15
+PKG_RELEASE:=16
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@GITHUB/transmission/transmission-releases/master
index 9f0f7958de331a06ccde06674392a719ce022f3a..1af3bedde228063c287667e5c8807524a65d7013 100644 (file)
@@ -2,6 +2,7 @@
 # Copyright (C) 2010-2015 OpenWrt.org
 
 START=99
+STOP=10
 USE_PROCD=1
 PROG="/usr/bin/transmission-daemon"
 
index f446529ffa52c7742e7cc2800186096a7446e9bf..8a77f7a56583ad654a8302002ee1174972706427 100644 (file)
@@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=vpn-policy-routing
 PKG_VERSION:=0.2.1
-PKG_RELEASE:=3
+PKG_RELEASE:=7
 PKG_LICENSE:=GPL-3.0-or-later
 PKG_MAINTAINER:=Stan Grishin <stangri@melmac.net>
 
index f2b8c8f3653e7d748f7abeafe2af720b0749945c..84fd6f8af96b92b317134bd685c9426d5999c455 100644 (file)
@@ -144,7 +144,7 @@ As per screenshots above, in the Web UI the ```vpn-policy-routing``` configurati
 |Advanced|supported_interface|list/string||Allows to specify the space-separated list of interface names (in lower case) to be explicitly supported by the ```vpn-policy-routing``` service. Can be useful if your OpenVPN tunnels have dev option other than tun\* or tap\*.|
 |Advanced|ignored_interface|list/string||Allows to specify the space-separated list of interface names (in lower case) to be ignored by the ```vpn-policy-routing``` service. Can be useful if running both VPN server and VPN client on the router.|
 |Advanced|boot_timeout|number|30|Allows to specify the time (in seconds) for ```vpn-policy-routing``` service to wait for WAN gateway discovery on boot. Can be useful on devices with ADSL modem built in.|
-|Advanced|iptables_rule_option|append/insert|append|Allows to specify the iptables parameter for rules: ```-A``` for ```append``` and ```-I``` for ```insert```. Append is generally speaking more compatible with other packages/firewall rules. Recommended to change to ```insert``` only to improve compatibility with the ```mwan3``` package.|
+|Advanced|iptables_rule_option|append/insert|append|Allows to specify the iptables parameter for rules: ```-A``` for ```append``` and ```-I``` for ```insert```. Append is generally speaking more compatible with other packages/firewall rules. Recommended to change to ```insert``` only to enable compatibility with the ```mwan3``` package.|
 |Advanced|iprule_enabled|boolean|0|Add an ```ip rule```, not an ```iptables``` entry for policies with just the local address. Use with caution to manipulate policies priorities.|
 |Advanced|icmp_interface|string||Set the default ICMP protocol interface (interface name in lower case). Use with caution.|
 |Advanced|append_src_rules|string||Append local IP Tables rules. Can be used to exclude local IP addresses from destinations for policies with local address set.|
@@ -179,7 +179,7 @@ The ```src_addr```, ```src_port```, ```dest_addr``` and ```dest_port``` options
 |src_port||List of space-separated local/source ports or port-ranges.|
 |dest_addr||List of space-separated remote/target IP addresses, CIDRs or hostnames/domain names.|
 |dest_port||List of space-separated remote/target ports or port-ranges.|
-|proto|all|Policy protocol, can be any valid protocol from ```/etc/protocols``` for CLI/uci or can be selected from the values set in ```webui_supported_protocol```. To display the ```Protocol``` column for policies in the WebUI, make sure to select ```Enabled``` for ```Show Protocol Column``` in the ```Web UI``` tab.|
+|proto|auto|Policy protocol, can be any valid protocol from ```/etc/protocols``` for CLI/uci or can be selected from the values set in ```webui_supported_protocol```. To display the ```Protocol``` column for policies in the WebUI, make sure to select ```Enabled``` for ```Show Protocol Column``` in the ```Web UI``` tab.<br/>Special cases: ```auto``` will try to intelligently insert protocol-agnostic policy and fall back to TCP/UDP if the protocol must be selected for specific policy; ```all``` will always insert a protocol-agnostic policy (which may fail depending on the policy).|
 |chain|PREROUTING|Policy chain, can be either ```PREROUTING```, ```FORWARDING```, ```INPUT``` or ```OUTPUT```. This setting is case-sensitive. To display the ```Chain``` column for policies in the WebUI, make sure to select ```Enabled``` for ```Show Chain Column``` in the ```Web UI``` tab.|
 
 ### Custom User Files Include Options
@@ -482,7 +482,7 @@ config vpn-policy-routing 'config'
 config policy
   option name 'Wireguard Server'
   option interface 'wan'
-  option proto 'tcp'
+  option proto 'udp'
   option src_port '61820'
   option chain 'OUTPUT'
 ```
@@ -810,7 +810,7 @@ If you want to target traffic using HTTP/3 protocol, you can use the ```AUTO```
 
 Some browsers, 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) have [DNS-over-HTTPS proxy](https://en.wikipedia.org/wiki/DNS_over_HTTPS) built-in. Their requests to web-sites cannot be affected if the ```dnsmasq.ipset``` is set for the ```dest_ipset``` option. To fix this, you can try either of the following:
 
-  1. Disable the DNS-over-HTTPS support in your browser and use the OpenWrt's [net/https-dns-proxy](https://github.com/openwrt/packages/tree/master/net/https-dns-proxy) package and set it up either [manually](https://openwrt.org/docs/guide-user/services/dns/doh_dnsmasq_https-dns-proxy?s[]=https&s[]=dns&s[]=proxy) or auto-magically with [https-dns-proxy luci app](https://github.com/openwrt/luci/tree/master/applications/luci-app-https_dns_proxy). You can then continue to use ```dnsmasq.ipset``` setting for the ```dest_ipset``` in VPN Policy Routing.
+  1. Disable the DNS-over-HTTPS support in your browser and use the OpenWrt's [net/https-dns-proxy](https://github.com/openwrt/packages/tree/master/net/https-dns-proxy) package with optional [https-dns-proxy luci app](https://github.com/openwrt/luci/tree/master/applications/luci-app-https_dns_proxy). You can then continue to use ```dnsmasq.ipset``` setting for the ```dest_ipset``` in VPN Policy Routing.
 
   2. Continue using DNS-over-HTTPS in your browser (which, by the way, also limits your options for router-level AdBlocking as described [in ```dnsmasq.ipset``` option description here](https://github.com/openwrt/packages/tree/master/net/simple-adblock/files#dns-resolution-option)), you than would either have to disable the  ```dest_ipset``` or switch it to ```ipset```. Please note, you will lose all the benefits of [```dnsmasq.ipset```](#use-dnsmasq-ipset) option.
 
@@ -843,4 +843,4 @@ WARNING: while paste.ee uploads are unlisted/not indexed at the web-site, they a
 
 ## Thanks
 
-I'd like to thank everyone who helped create, test and troubleshoot this service. Without contributions from [@hnyman](https://github.com/hnyman), [@dibdot](https://github.com/dibdot), [@danrl](https://github.com/danrl), [@tohojo](https://github.com/tohojo), [@cybrnook](https://github.com/cybrnook), [@nidstigator](https://github.com/nidstigator), [@AndreBL](https://github.com/AndreBL) and [@dz0ny](https://github.com/dz0ny) and rigorous testing/bugreporting by [@dziny](https://github.com/dziny), [@bluenote73](https://github.com/bluenote73), [@buckaroo](https://github.com/pgera), [@Alexander-r](https://github.com/Alexander-r), [n8v8R](https://github.com/n8v8R) and [psherman](https://forum.openwrt.org/u/psherman) it wouldn't have been possible. Wireguard/IPv6 support is courtesy of [Mullvad](https://www.mullvad.net), [IVPN](https://www.ivpn.net/) and [WireVPN](https://www.wirevpn.net).
+I'd like to thank everyone who helped create, test and troubleshoot this service. Without contributions from [@hnyman](https://github.com/hnyman), [@dibdot](https://github.com/dibdot), [@danrl](https://github.com/danrl), [@tohojo](https://github.com/tohojo), [@cybrnook](https://github.com/cybrnook), [@nidstigator](https://github.com/nidstigator), [@AndreBL](https://github.com/AndreBL), [@dz0ny](https://github.com/dz0ny), rigorous testing/bugreporting by [@dziny](https://github.com/dziny), [@bluenote73](https://github.com/bluenote73), [@buckaroo](https://github.com/pgera), [@Alexander-r](https://github.com/Alexander-r), [n8v8R](https://github.com/n8v8R), [psherman](https://forum.openwrt.org/u/psherman), multiple contributions from [dl12345](https://github.com/dl12345), [trendy](https://forum.openwrt.org/u/trendy) and feedback from other OpenWrt users it wouldn't have been possible. Wireguard/IPv6 support is courtesy of [Mullvad](https://www.mullvad.net), [IVPN](https://www.ivpn.net/) and [WireVPN](https://www.wirevpn.net).
index 06aaa2c28ecf46f06454cf44adddea9474d30737..0d90432e1744394418391a5d0350f1706c14ea60 100755 (executable)
@@ -1,7 +1,6 @@
 #!/bin/sh /etc/rc.common
 # Copyright 2017-2019 Stan Grishin (stangri@melmac.net)
-# shellcheck disable=SC2039
-# shellcheck disable=SC1091
+# shellcheck disable=SC2039,SC1091,SC2018,SC2019
 PKG_VERSION='dev-test'
 
 export START=94
@@ -40,6 +39,9 @@ output_failn() { output 1 "$_FAIL_\\n"; output 2 "$__FAIL__\\n"; }
 # str_contains() { [ "$1" != "$(str_replace "$1" "$2" "")" ]; }
 # shellcheck disable=SC2018,SC2019
 str_to_lower() { echo "$1" | tr 'A-Z' 'a-z'; }
+str_extras_to_underscore() { echo "$1" | tr '[\. ~`!@#$%^&*()\+/,<>?//;:]' '_'; }
+str_extras_to_space() { echo "$1" | tr ';{}' ' '; }
+
 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
@@ -272,7 +274,7 @@ ips() {
        else
                if [[ -z "$appendix" && -z "$remoteIpset" ]] || \
                         [[ -n "$appendix" && "$localIpset" -eq 0 ]]; then
-                       return 1
+                       return 1
                fi
        fi
 
@@ -316,7 +318,7 @@ insert_tor_policy() {
        [ -n "$lport" ] && param="$param -p tcp -m multiport --sport ${lport//-/:}"
        [ -n "$raddr" ] && param="$param -d $raddr"
        [ -n "$rport" ] && param="$param -p $proto -m multiport --dport ${rport//-/:}"
-       [ -n "$comment" ] && param="$param -m comment --comment $(echo "$comment" | tr '[\. ~`!@#$%^&*()\+/,<>?//;:]' '_')"
+       [ -n "$comment" ] && param="$param -m comment --comment $(str_extras_to_underscore "$comment")"
 # Here be dragons
        return 0
 }
@@ -334,15 +336,11 @@ insert_policy() {
                return 0
        fi
 
-       if [ -z "$proto" ] || [ "$proto" = 'all' ]; then
-               if [ -z "${lport}${raddr}${rport}" ] && [ -n "$laddr" ]; then
-                       proto='all'
-               elif [ -z "${laddr}${lport}${rport}" ] && [ -n "$raddr" ]; then
-                       proto='all'
-               elif [ -n "$lport" ] || [ -n "$rport" ]; then 
+       if [ -z "$proto" ]; then
+               if [ -n "$lport" ] || [ -n "$rport" ]; then 
                        proto='tcp udp'
                else
-                       proto='tcp'
+                       proto='all'
                fi
        fi
 
@@ -406,7 +404,7 @@ insert_policy() {
                        param="$param -m multiport $valueNeg --dport ${value//-/:}"
                fi
 
-               [ -n "$comment" ] && param="$param -m comment --comment $(echo "$comment" | tr '[\. ~`!@#$%^&*()\+/,<>?//;:]' '_')"
+               [ -n "$comment" ] && param="$param -m comment --comment $(str_extras_to_underscore "$comment")"
                ipt "$param" || processPolicyError="${processPolicyError}${_ERROR_}: iptables $param\\n"
        done
        return 0
@@ -415,16 +413,16 @@ insert_policy() {
 r_process_policy(){
        local comment="$1" iface="$2" laddr="$3" lport="$4" raddr="$5" rport="$6" proto="$7" chain="$8" resolved_laddr resolved_raddr i ipsFailFlag
        if [ "${laddr//[ ;\{\}]/}" != "$laddr" ]; then
-               for i in $(echo "$laddr" | tr ';{}' ' '); do [ -n "$i" ] && r_process_policy "$comment" "$iface" "$i" "$lport" "$raddr" "$rport" "$proto" "$chain"; done
+               for i in $(str_extras_to_space "$laddr"); do [ -n "$i" ] && r_process_policy "$comment" "$iface" "$i" "$lport" "$raddr" "$rport" "$proto" "$chain"; done
                return 0
        elif [ "${lport//[ ;\{\}]/}" != "$lport" ]; then
-               for i in $(echo "$lport" | tr ';{}' ' '); do [ -n "$i" ] && r_process_policy "$comment" "$iface" "$laddr" "$i" "$raddr" "$rport" "$proto" "$chain"; done
+               for i in $(str_extras_to_space "$lport"); do [ -n "$i" ] && r_process_policy "$comment" "$iface" "$laddr" "$i" "$raddr" "$rport" "$proto" "$chain"; done
                return 0
        elif [ "${raddr//[ ;\{\}]/}" != "$raddr" ]; then
-               for i in $(echo "$raddr" | tr ';{}' ' '); do [ -n "$i" ] && r_process_policy "$comment" "$iface" "$laddr" "$lport" "$i" "$rport" "$proto" "$chain"; done
+               for i in $(str_extras_to_space "$raddr"); do [ -n "$i" ] && r_process_policy "$comment" "$iface" "$laddr" "$lport" "$i" "$rport" "$proto" "$chain"; done
                return 0
        elif [ "${rport//[ ;\{\}]/}" != "$rport" ]; then
-               for i in $(echo "$rport" | tr ';{}' ' '); do [ -n "$i" ] && r_process_policy "$comment" "$iface" "$laddr" "$lport" "$raddr" "$i" "$proto" "$chain"; done
+               for i in $(str_extras_to_space "$rport"); do [ -n "$i" ] && r_process_policy "$comment" "$iface" "$laddr" "$lport" "$raddr" "$i" "$proto" "$chain"; done
                return 0
        fi
 
@@ -495,8 +493,8 @@ process_policy(){
        config_get_bool enabled "$1" 'enabled' 1
 
        [ "$enabled" -gt 0 ] || return 0
+       proto="$(str_to_lower "$proto")"
        [ "$proto" = 'auto' ] && unset proto
-       [ "$proto" = 'AUTO' ] && unset proto
 
        comment="${comment:-$name}"
        output 2 "Routing '$comment' via $iface "
@@ -504,7 +502,7 @@ process_policy(){
        if [ -z "$comment" ]; then
                errorSummary="${errorSummary}${_ERROR_}: Policy name is empty\\n"
                output_fail; return 1;
-       fi
+       fi
        if [ -z "${laddr}${lport}${raddr}${rport}" ]; then
                errorSummary="${errorSummary}${_ERROR_}: Policy '$comment' missing all IPs/ports\\n"
                output_fail; return 1;
@@ -575,7 +573,7 @@ table_create(){
                        fi
                done
                ip -4 route flush cache || ipv4_error=1
-               ip -4 rule add fwmark "$mark" table "$tid" || ipv4_error=1
+               ip -4 rule add fwmark "${mark}/${fwMask}" table "$tid" || ipv4_error=1
        fi
 
        if [ "$ipv6Enabled" -ne 0 ]; then
@@ -588,7 +586,7 @@ table_create(){
                                done
                        fi
                        ip -6 route flush cache || ipv6_error=1
-                       ip -6 rule add fwmark "$mark" table "$tid" || ipv6_error=1
+                       ip -6 rule add fwmark "${mark}/${fwMask}" table "$tid" || ipv6_error=1
                fi
        fi
 
@@ -778,7 +776,7 @@ start_service() {
                done
 
                if [ "$modprobeStatus" -gt 0 ] && ! is_chaos_calmer; then
-                       errorSummary="${errorSummary}${_ERROR_}: Failed to load kernel modules\\n"
+                       errorSummary="${errorSummary}${_ERROR_}: Failed to load kernel modules\\n"
                fi
 
                for i in PREROUTING FORWARD INPUT OUTPUT; do
@@ -806,7 +804,7 @@ start_service() {
                [ "$dnsmasqNewHash" != "$dnsmasqStoredHash" ] && dnsmasq_restart
 
                if [ -z "$gatewaySummary" ]; then
-                       errorSummary="${errorSummary}${_ERROR_}: failed to set up any gateway\\n"
+                       errorSummary="${errorSummary}${_ERROR_}: failed to set up any gateway\\n"
                else
                        output "$serviceName started with gateways:\\n${gatewaySummary}"
                        [ -n "$errorSummary" ] && output "${errorSummary}"
@@ -886,6 +884,7 @@ service_triggers() {
 }
 
 input() { local data; while read -r data; do echo "$data" | tee -a /var/${packageName}-support; done; }
+status_service() { support "$@"; }
 support() {
        local dist vers out id s param status set_d set_p tableCount i=0 dev dev6
        is_enabled
index b9d7d764105c0ce6ad3779c3f23f2ca0fe3bc4c7..b893ff38bb5ada14f7afe7847cfaea802c6a1055 100644 (file)
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=wifidog-ng
-PKG_VERSION:=2.0.1
+PKG_VERSION:=2.0.2
 PKG_RELEASE:=1
 
 PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)
@@ -16,7 +16,7 @@ PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)
 PKG_LICENSE:=LGPL-2.1
 PKG_LICENSE_FILES:=LICENSE
 
-PKG_MAINTAINER:=Jianhui Zhao <jianhuizhao329@gmail.com>
+PKG_MAINTAINER:=Jianhui Zhao <zhaojh329@gmail.com>
 
 include $(INCLUDE_DIR)/package.mk
 
index 3ccad8438016474cfa3cd0858a8d5ec0756798d9..c692d9ea3ef5cf80f6fd3787be11bfc37d552c62 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  Copyright (C) 2017 jianhui zhao <jianhuizhao329@gmail.com>
+ *  Copyright (C) 2017 jianhui zhao <zhaojh329@gmail.com>
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License version 2 as
@@ -9,6 +9,7 @@
 #include <linux/uaccess.h>
 #include <linux/inetdevice.h>
 #include <linux/seq_file.h>
+#include <linux/version.h>
 
 #include "config.h"
 
@@ -20,6 +21,9 @@ static int update_gw_interface(const char *interface)
     int ret = 0;
     struct net_device *dev;
     struct in_device *in_dev;
+#if LINUX_VERSION_CODE > KERNEL_VERSION(5, 2, 21)
+    const struct in_ifaddr *ifa;
+#endif
 
     dev = dev_get_by_name(&init_net, interface);
     if (!dev) {
@@ -36,15 +40,25 @@ static int update_gw_interface(const char *interface)
         goto QUIT;
     }
 
+#if LINUX_VERSION_CODE > KERNEL_VERSION(5, 2, 21)
+    in_dev_for_each_ifa_rcu(ifa, in_dev) {
+        if (ifa->ifa_flags & IFA_F_SECONDARY)
+            continue;
+#else
     for_primary_ifa(in_dev) {
+#endif
         conf.interface_ipaddr = ifa->ifa_local;
         conf.interface_mask = ifa->ifa_mask;
         conf.interface_broadcast = ifa->ifa_broadcast;
 
         pr_info("Found ip from %s: %pI4\n", interface, &conf.interface_ipaddr);
         break;
+#if LINUX_VERSION_CODE > KERNEL_VERSION(5, 2, 21)
+    }
+#else
     } endfor_ifa(in_dev)
-    
+#endif
+
 QUIT:   
     dev_put(dev);
 
index a7414affa2463fcdbcf6d4b0cdcb155d6af6087b..60bde1a480685cd8174d4ac1acd7e2946a4c794d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  Copyright (C) 2017 jianhui zhao <jianhuizhao329@gmail.com>
+ *  Copyright (C) 2017 jianhui zhao <zhaojh329@gmail.com>
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License version 2 as
index afb1b038ed6a8be41378860742d0a39aed832410..ac17078e558a3393c090009ae210ef3d22034a0d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  Copyright (C) 2017 jianhui zhao <jianhuizhao329@gmail.com>
+ *  Copyright (C) 2017 jianhui zhao <zhaojh329@gmail.com>
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License version 2 as
@@ -14,7 +14,9 @@
 #include <linux/tcp.h>
 #include <linux/udp.h>
 #include <net/netfilter/nf_nat.h>
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 1, 0)
 #include <net/netfilter/nf_nat_l3proto.h>
+#endif
 
 #include "utils.h"
 #include "config.h"
@@ -85,7 +87,11 @@ static u32 wifidog_hook(void *priv, struct sk_buff *skb, const struct nf_hook_st
     if (ct->status & IPS_HIJACKED) {
         if (is_allowed_mac(skb, state)) {
             /* Avoid duplication of authentication */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 0)
             nf_reset(skb);
+#else
+            nf_reset_ct(skb);
+#endif
             nf_ct_kill(ct);
         }
         return NF_ACCEPT;
@@ -149,7 +155,9 @@ static int __init wifidog_init(void)
     if (ret)
         return ret;
 
-#if LINUX_VERSION_CODE > KERNEL_VERSION(4, 17, 19)
+#if LINUX_VERSION_CODE > KERNEL_VERSION(5, 0, 21)
+    ret = nf_nat_ipv4_register_fn(&init_net, &wifidog_ops);
+#elif 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);
@@ -174,7 +182,9 @@ static void __exit wifidog_exit(void)
 {
     deinit_config();
 
-#if LINUX_VERSION_CODE > KERNEL_VERSION(4, 17, 19)
+#if LINUX_VERSION_CODE > KERNEL_VERSION(5, 0, 21)
+    nf_nat_ipv4_unregister_fn(&init_net, &wifidog_ops);
+#elif 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);
@@ -188,5 +198,5 @@ static void __exit wifidog_exit(void)
 module_init(wifidog_init);
 module_exit(wifidog_exit);
 
-MODULE_AUTHOR("jianhui zhao <jianhuizhao329@gmail.com>");
+MODULE_AUTHOR("jianhui zhao <zhaojh329@gmail.com>");
 MODULE_LICENSE("GPL");
index 5f7aa08c47920b000ad70b24fa4596dc8ed8c05f..816bacb464a9075bc9f454471e049c92a6f71feb 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  Copyright (C) 2017 jianhui zhao <jianhuizhao329@gmail.com>
+ *  Copyright (C) 2017 jianhui zhao <zhaojh329@gmail.com>
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License version 2 as
index 222c792e6e0911ef53c6991f4db6c8c21c0815e1..b0cfe331ea091d75d44f0f80a8c79b983fc3dcf8 100644 (file)
@@ -1,7 +1,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=wsdd2
-PKG_RELEASE:=5
+PKG_RELEASE:=6
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/Andy2244/wsdd2.git
index 24595e0f361dd633b727c250ba017314e220fd24..ee60eee2d80bd49d26b986ea1ed241fe97ff979e 100644 (file)
@@ -5,8 +5,8 @@ USE_PROCD=1
 
 SMB_CONF=""
 BIND_IF_PARM=""
-NB_PARM=""
-WG_PARM=""
+NB_PARM="$(cat /proc/sys/kernel/hostname)"
+WG_PARM="WORKGROUP"
 BI_PARM=""
 
 start_service() {
@@ -17,67 +17,61 @@ start_service() {
                SMB_CONF="/etc/ksmbd/smb.conf"
        fi
 
-       if [ -e /etc/samba/smb.conf ]; then
+       [ -e /etc/samba/smb.conf ] && {
                if [ -e /etc/init.d/samba4 ] && /etc/init.d/samba4 running; then
                        SMB_CONF="/etc/samba/smb.conf"
                elif [ -e /etc/init.d/samba ] && /etc/init.d/samba running; then
                        SMB_CONF="/etc/samba/smb.conf"
                fi
-       fi
-       
-       if [ -z "$SMB_CONF" ]; then
+       }
+
+       [ -z "$SMB_CONF" ] && {
                logger -p daemon.error -t 'wsdd2' "samba36/4 or ksmbd is not running, can't start wsdd2!"
                exit 1
-       fi
-       
+       }
+
        local nb_name
        nb_name="$(grep -i 'netbios name' $SMB_CONF | awk -F'=' '{print $2}' | tr -d ' \n')"
-       if [ -n "$nb_name" ]; then
-               NB_PARM="-N $nb_name"
-       else
-               local hostname
-               hostname="$(cat /proc/sys/kernel/hostname)"
-               NB_PARM="-N $hostname"
-       fi
+       [ -n "$nb_name" ] && NB_PARM="$nb_name"
 
        local wg_name
        wg_name="$(grep -i 'workgroup' $SMB_CONF | awk -F'=' '{print $2}' | tr -d ' \n')"
-       if [ -n "$wg_name" ]; then
-               WG_PARM="-G $wg_name"
-       else
-               WG_PARM="-G WORKGROUP"
-       fi
+       [ -n "$wg_name" ] && WG_PARM="$wg_name"
 
        # resolve lan interface (BUG: No multi-interface binds atm)
        local ifname
-       if network_get_device ifname lan; then
-               BIND_IF_PARM="-i $ifname"
-       fi
+       network_get_device ifname lan
 
        local board_vendor
        local board_model
        local board_sku
 
-       if [ -e /tmp/sysinfo/board_name ]; then
-               board_vendor="$(cat /tmp/sysinfo/board_name | awk -F',' '{print $1}' | tr ' ' '_' | tr -d ' \n')"
-               board_sku="$(cat /tmp/sysinfo/board_name | awk -F',' '{print $2}' | tr ' ' '_' | tr -d ' \n')"
-       fi
-       if [ -e /tmp/sysinfo/model ]; then
-               board_model="$(cat /tmp/sysinfo/model | tr ' ' '_' | tr -d ' \n')"
-       fi
-       if [ -n "$board_vendor" ] && [ -n "$board_model" ]; then
+       [ -e /tmp/sysinfo/board_name ] && {
+               board_vendor="$(awk -F',' '{print $1}' /tmp/sysinfo/board_name | tr ' ' '_' | tr -d ' \n')"
+               board_sku="$(awk -F',' '{print $2}' /tmp/sysinfo/board_name | tr ' ' '_' | tr -d ' \n')"
+       }
+
+       [ -e /tmp/sysinfo/model ] && {
+               board_model="$(awk -F':' '{print $1}' /tmp/sysinfo/model | tr ' ' '_' | tr -d ' \n')"
+       }
+
+       [ -n "$board_vendor" ] && [ -n "$board_model" ] && {
                if [ -n "$board_sku" ]; then
-                       BI_PARM="-b vendor:$board_vendor,model:$board_model,sku:$board_sku"
+                       BI_PARM="vendor:$board_vendor,model:$board_model,sku:$board_sku"
                else
-                       BI_PARM="-b vendor:$board_vendor,model:$board_model"
+                       BI_PARM="vendor:$board_vendor,model:$board_model"
                fi
-       fi
+       }
 
        procd_open_instance
-    procd_set_param command /usr/bin/wsdd2 -w $BIND_IF_PARM $NB_PARM $WG_PARM $BI_PARM
-    procd_set_param respawn
-    procd_set_param file $SMB_CONF
-    procd_close_instance
+       procd_set_param command /usr/bin/wsdd2
+       [ -n "$ifname" ] && procd_append_param command -i "$ifname"
+       procd_append_param command -N "$NB_PARM"
+       procd_append_param command -G "$WG_PARM"
+       procd_append_param command -b "$BI_PARM"
+       procd_set_param respawn
+       procd_set_param file "$SMB_CONF"
+       procd_close_instance
 }
 
 service_triggers() {
index a107d369576c5e68085bc96f6cf7eae5573b5ecd..cad40d7855c2751f0b5c38dd7fa43b9fb9a2c6c5 100644 (file)
@@ -1,12 +1,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=yggdrasil
-PKG_VERSION:=0.3.13
+PKG_VERSION:=0.3.14
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/yggdrasil-network/yggdrasil-go/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=ba2149024152c4df65e68722e7d4d1050fec71907904a7bdf9757159d94cd83d
+PKG_HASH:=e8579a04bf289434e7b8caaf621e2c0b853e83cc06f136c4f9e4bfc667df5a27
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-go-$(PKG_VERSION)
 
 PKG_MAINTAINER:=William Fleurant <meshnet@protonmail.com>
index 14a9d6fe89250d86056ffb36497945e3444b56fd..4baee00d3193ceb1cc3616d2e8ecf908998cbff7 100644 (file)
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=zerotier
 PKG_VERSION:=1.4.6
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/zerotier/ZeroTierOne/tar.gz/$(PKG_VERSION)?
diff --git a/net/zerotier/patches/020-musl.patch b/net/zerotier/patches/020-musl.patch
new file mode 100644 (file)
index 0000000..755eb51
--- /dev/null
@@ -0,0 +1,25 @@
+--- a/osdep/OSUtils.hpp
++++ b/osdep/OSUtils.hpp
+@@ -37,9 +37,6 @@
+ #include <sys/time.h>
+ #include <sys/stat.h>
+ #include <arpa/inet.h>
+-#ifdef __LINUX__
+-#include <sys/syscall.h>
+-#endif
+ #endif
+ #ifndef OMIT_JSON_SUPPORT
+@@ -211,11 +208,8 @@ public:
+               return (int64_t)( ((tmp.QuadPart - 116444736000000000LL) / 10000L) + st.wMilliseconds );
+ #else
+               struct timeval tv;
+-#ifdef __LINUX__
+-              syscall(SYS_gettimeofday,&tv,0); /* fix for musl libc broken gettimeofday bug */
+-#else
+               gettimeofday(&tv,(struct timezone *)0);
+-#endif
++
+               return ( (1000LL * (int64_t)tv.tv_sec) + (int64_t)(tv.tv_usec / 1000) );
+ #endif
+       };
index 9dc7aad302b7cb9d969401082afc06bd838a1b18..8e911f910460109da1b3d99f654eb6daa018c65f 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=forked-daapd
 PKG_VERSION:=27.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://github.com/ejurgensen/$(PKG_NAME)/releases/download/$(PKG_VERSION)/
diff --git a/sound/forked-daapd/patches/010-errno.patch b/sound/forked-daapd/patches/010-errno.patch
new file mode 100644 (file)
index 0000000..b7fee52
--- /dev/null
@@ -0,0 +1,10 @@
+--- a/src/websocket.c
++++ b/src/websocket.c
+@@ -25,6 +25,7 @@
+ #ifdef HAVE_PTHREAD_NP_H
+ # include <pthread_np.h>
+ #endif
++#include <errno.h>
+ #include <stdbool.h>
+ #include <stdio.h>
+ #include <string.h>
index 4977d92279de3b1aa65c0cafa63e7656f1cbc64e..9691122401fbe312b8fab235ff38a17d515e6206 100644 (file)
@@ -6,12 +6,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mpd
-PKG_VERSION:=0.21.20
-PKG_RELEASE:=2
+PKG_VERSION:=0.21.22
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://www.musicpd.org/download/mpd/0.21/
-PKG_HASH:=422ef0a996d961f3ebc6856395f3a855b45fa0059910e878fb98281007e510e1
+PKG_HASH:=565687d1899b585350cd66b603e46e5b79affc0a0e36d96d8953c6ccc6f69ba2
 
 PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
 PKG_LICENSE:=GPL-2.0-or-later
diff --git a/sound/mpd/patches/010-treewide-use-boost-lround-when-std-round-is-unavaila.patch b/sound/mpd/patches/010-treewide-use-boost-lround-when-std-round-is-unavaila.patch
deleted file mode 100644 (file)
index 20bda35..0000000
+++ /dev/null
@@ -1,227 +0,0 @@
-From 769cd0ee9f0cf8ceb026aa751b5d4a390bb5dbdc Mon Sep 17 00:00:00 2001
-From: Rosen Penev <rosenp@gmail.com>
-Date: Sun, 2 Feb 2020 21:21:57 -0800
-Subject: [PATCH] treewide: use boost::lround when std::round is unavailable
-
-This is the case with uClibc-ng currently.
-
-Signed-off-by: Rosen Penev <rosenp@gmail.com>
----
- src/Stats.cxx                             |  4 +--
- src/command/PlayerCommands.cxx            |  5 ++-
- src/decoder/plugins/FaadDecoderPlugin.cxx |  3 +-
- src/mixer/plugins/WinmmMixerPlugin.cxx    |  2 +-
- src/output/plugins/HaikuOutputPlugin.cxx  |  3 +-
- src/pcm/PcmMix.cxx                           |  5 ++-
- src/player/CrossFade.cxx                  |  5 ++-
- src/util/Math.hxx                         | 41 +++++++++++++++++++++++
- 8 files changed, 52 insertions(+), 16 deletions(-)
- create mode 100644 src/util/Math.hxx
-
-diff --git a/src/Stats.cxx b/src/Stats.cxx
-index 2208312d7..7467a3a17 100644
---- a/src/Stats.cxx
-+++ b/src/Stats.cxx
-@@ -29,9 +29,9 @@
- #include "system/Clock.hxx"
- #include "Log.hxx"
- #include "time/ChronoUtil.hxx"
-+#include "util/Math.hxx"
- #include <chrono>
--#include <cmath>
- #ifndef _WIN32
- /**
-@@ -121,7 +121,7 @@ stats_print(Response &r, const Partition &partition)
- #else
-                (unsigned)std::chrono::duration_cast<std::chrono::seconds>(std::chrono::steady_clock::now() - start_time).count(),
- #endif
--               std::lround(partition.pc.GetTotalPlayTime().count()));
-+               lround(partition.pc.GetTotalPlayTime().count()));
- #ifdef ENABLE_DATABASE
-       const Database *db = partition.instance.GetDatabase();
-diff --git a/src/command/PlayerCommands.cxx b/src/command/PlayerCommands.cxx
-index 7f3b4f296..4acb8f2ad 100644
---- a/src/command/PlayerCommands.cxx
-+++ b/src/command/PlayerCommands.cxx
-@@ -34,13 +34,12 @@
- #include "util/StringBuffer.hxx"
- #include "util/ScopeExit.hxx"
- #include "util/Exception.hxx"
-+#include "util/Math.hxx"
- #ifdef ENABLE_DATABASE
- #include "db/update/Service.hxx"
- #endif
--#include <cmath>
--
- #define COMMAND_STATUS_STATE            "state"
- #define COMMAND_STATUS_REPEAT           "repeat"
- #define COMMAND_STATUS_SINGLE           "single"
-@@ -154,7 +153,7 @@ handle_status(Client &client, gcc_unused Request args, Response &r)
-       if (pc.GetCrossFade() > FloatDuration::zero())
-               r.Format(COMMAND_STATUS_CROSSFADE ": %lu\n",
--                       std::lround(pc.GetCrossFade().count()));
-+                       lround(pc.GetCrossFade().count()));
-       if (pc.GetMixRampDelay() > FloatDuration::zero())
-               r.Format(COMMAND_STATUS_MIXRAMPDELAY ": %f\n",
-diff --git a/src/decoder/plugins/FaadDecoderPlugin.cxx b/src/decoder/plugins/FaadDecoderPlugin.cxx
-index 983103e0e..e1c9576d3 100644
---- a/src/decoder/plugins/FaadDecoderPlugin.cxx
-+++ b/src/decoder/plugins/FaadDecoderPlugin.cxx
-@@ -26,11 +26,11 @@
- #include "util/ScopeExit.hxx"
- #include "util/ConstBuffer.hxx"
- #include "util/Domain.hxx"
-+#include "util/Math.hxx"
- #include "Log.hxx"
- #include <neaacdec.h>
--#include <cmath>
- #include <exception>
- #include <assert.h>
-diff --git a/src/mixer/plugins/WinmmMixerPlugin.cxx b/src/mixer/plugins/WinmmMixerPlugin.cxx
-index 9661d6551..905e650ef 100644
---- a/src/mixer/plugins/WinmmMixerPlugin.cxx
-+++ b/src/mixer/plugins/WinmmMixerPlugin.cxx
-@@ -20,13 +20,13 @@
- #include "mixer/MixerInternal.hxx"
- #include "output/OutputAPI.hxx"
- #include "output/plugins/WinmmOutputPlugin.hxx"
-+#include "util/Math.hxx"
- #include <mmsystem.h>
- #include <stdexcept>
- #include <assert.h>
--#include <math.h>
- #include <windows.h>
- class WinmmMixer final : public Mixer {
-diff --git a/src/output/plugins/HaikuOutputPlugin.cxx b/src/output/plugins/HaikuOutputPlugin.cxx
-index 952fb0c2f..01240aca9 100644
---- a/src/output/plugins/HaikuOutputPlugin.cxx
-+++ b/src/output/plugins/HaikuOutputPlugin.cxx
-@@ -22,6 +22,7 @@
- #include "../OutputAPI.hxx"
- #include "mixer/MixerList.hxx"
- #include "util/Domain.hxx"
-+#include "util/Math.hxx"
- #include "system/Error.hxx"
- #include "Log.hxx"
-@@ -37,8 +38,6 @@
- #include <StringList.h>
- #include <SoundPlayer.h>
--#include <cmath>
--
- #include <string.h>
- #define UTF8_PLAY "\xE2\x96\xB6"
-diff --git a/src/pcm/PcmMix.cxx b/src/pcm/PcmMix.cxx
-index 17e34b005..59179f54e 100644
---- a/src/pcm/PcmMix.cxx
-+++ b/src/pcm/PcmMix.cxx
-@@ -22,11 +22,10 @@
- #include "Clamp.hxx"
- #include "Traits.hxx"
- #include "util/Clamp.hxx"
-+#include "util/Math.hxx"
- #include "PcmDither.cxx" // including the .cxx file to get inlined templates
--#include <cmath>
--
- #include <assert.h>
- template<SampleFormat F, class Traits=SampleTraits<F>>
-@@ -225,7 +224,7 @@ pcm_mix(PcmDither &dither, void *buffer1, const void *buffer2, size_t size,
-       s = sin(M_PI_2 * portion1);
-       s *= s;
--      int vol1 = std::lround(s * PCM_VOLUME_1S);
-+      int vol1 = lround(s * PCM_VOLUME_1S);
-       vol1 = Clamp<int>(vol1, 0, PCM_VOLUME_1S);
-       return pcm_add_vol(dither, buffer1, buffer2, size,
-diff --git a/src/player/CrossFade.cxx b/src/player/CrossFade.cxx
-index ce86d3f0a..8a91516f1 100644
---- a/src/player/CrossFade.cxx
-+++ b/src/player/CrossFade.cxx
-@@ -23,10 +23,9 @@
- #include "AudioFormat.hxx"
- #include "util/NumberParser.hxx"
- #include "util/Domain.hxx"
-+#include "util/Math.hxx"
- #include "Log.hxx"
--#include <cmath>
--
- #include <assert.h>
- static constexpr Domain cross_fade_domain("cross_fade");
-@@ -112,7 +111,7 @@ CrossFadeSettings::Calculate(SignedSongTime total_time,
-       if (mixramp_delay <= FloatDuration::zero() ||
-           !mixramp_start || !mixramp_prev_end) {
--              chunks = std::lround(duration / chunk_duration);
-+              chunks = lround(duration / chunk_duration);
-       } else {
-               /* Calculate mixramp overlap. */
-               const auto mixramp_overlap_current =
-diff --git a/src/util/Math.hxx b/src/util/Math.hxx
-new file mode 100644
-index 000000000..bd856f5a9
---- /dev/null
-+++ b/src/util/Math.hxx
-@@ -0,0 +1,41 @@
-+/*
-+ * Copyright (C) 2018 Max Kellermann <max.kellermann@gmail.com>
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions
-+ * are met:
-+ *
-+ * - Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ *
-+ * - Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the
-+ * distribution.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE
-+ * FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
-+ * OF THE POSSIBILITY OF SUCH DAMAGE.
-+ */
-+
-+#ifndef MATH_HXX
-+#define MATH_HXX
-+
-+#ifdef __UCLIBC__
-+#include <boost/math/special_functions/round.hpp>
-+using boost::math::lround;
-+#else
-+#include <cmath>
-+using std::lround;
-+#endif
-+
-+#endif
diff --git a/sound/mpd/patches/020-fix-incorrect-rounding.patch b/sound/mpd/patches/020-fix-incorrect-rounding.patch
deleted file mode 100644 (file)
index 80e7a6c..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-From ab5183cbc45818114cc4c226ace299a1fb917ab0 Mon Sep 17 00:00:00 2001
-From: Rosen Penev <rosenp@gmail.com>
-Date: Sun, 2 Feb 2020 16:34:09 -0800
-Subject: [PATCH] [clang-tidy] fix incorrect rounding
-
-Found with bugprone-incorrect-roundings
-
-Signed-off-by: Rosen Penev <rosenp@gmail.com>
----
- src/decoder/plugins/WavpackDecoderPlugin.cxx | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/decoder/plugins/WavpackDecoderPlugin.cxx b/src/decoder/plugins/WavpackDecoderPlugin.cxx
-index 77751167f..97824de75 100644
---- a/src/decoder/plugins/WavpackDecoderPlugin.cxx
-+++ b/src/decoder/plugins/WavpackDecoderPlugin.cxx
-@@ -26,6 +26,7 @@
- #include "fs/Path.hxx"
- #include "util/Macros.hxx"
- #include "util/Alloc.hxx"
-+#include "util/Math.hxx"
- #include "util/ScopeExit.hxx"
- #include "util/RuntimeError.hxx"
-@@ -265,8 +266,7 @@ wavpack_decode(DecoderClient &client, WavpackContext *wpc, bool can_seek)
-               if (samples_got == 0)
-                       break;
--              int bitrate = (int)(WavpackGetInstantBitrate(wpc) / 1000 +
--                                  0.5);
-+              int bitrate = lround(WavpackGetInstantBitrate(wpc) / 1000);
-               format_samples(chunk, samples_got * audio_format.channels);
-               cmd = client.SubmitData(nullptr, chunk,
diff --git a/sound/mpd/patches/030-volume_mapping-get-rid-of-exp10-workaround.patch b/sound/mpd/patches/030-volume_mapping-get-rid-of-exp10-workaround.patch
deleted file mode 100644 (file)
index efa245e..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-From 6b3250a3fb4a854d19980868ed187ca21f0e5ed8 Mon Sep 17 00:00:00 2001
-From: Rosen Penev <rosenp@gmail.com>
-Date: Mon, 3 Feb 2020 15:26:50 -0800
-Subject: [PATCH] volume_mapping: get rid of exp10 workaround
-
-exp10 is a GNU function, is not part of C++, and is not available
-everywhere.
-
-pow(10,x) is an alternative that works just as well.
-
-Signed-off-by: Rosen Penev <rosenp@gmail.com>
----
- src/mixer/plugins/volume_mapping.c | 11 +++--------
- 1 file changed, 3 insertions(+), 8 deletions(-)
-
-diff --git a/src/mixer/plugins/volume_mapping.c b/src/mixer/plugins/volume_mapping.c
-index 61a7138af..beecce640 100644
---- a/src/mixer/plugins/volume_mapping.c
-+++ b/src/mixer/plugins/volume_mapping.c
-@@ -34,11 +34,6 @@
- #include <stdbool.h>
- #include "volume_mapping.h"
--#ifdef __UCLIBC__
--/* 10^x = 10^(log e^x) = (e^x)^log10 = e^(x * log 10) */
--#define exp10(x) (exp((x) * log(10)))
--#endif /* __UCLIBC__ */
--
- #define MAX_LINEAR_DB_SCALE   24
- static inline bool use_linear_dB_scale(long dBmin, long dBmax)
-@@ -111,9 +106,9 @@ static double get_normalized_volume(snd_mixer_elem_t *elem,
-       if (use_linear_dB_scale(min, max))
-               return (value - min) / (double)(max - min);
--      normalized = exp10((value - max) / 6000.0);
-+      normalized = pow(10, (value - max) / 6000.0);
-       if (min != SND_CTL_TLV_DB_GAIN_MUTE) {
--              min_norm = exp10((min - max) / 6000.0);
-+              min_norm = pow(10, (min - max) / 6000.0);
-               normalized = (normalized - min_norm) / (1 - min_norm);
-       }
-@@ -159,7 +154,7 @@ static int set_normalized_volume(snd_mixer_elem_t *elem,
-       }
-       if (min != SND_CTL_TLV_DB_GAIN_MUTE) {
--              min_norm = exp10((min - max) / 6000.0);
-+              min_norm = pow(10, (min - max) / 6000.0);
-               volume = volume * (1 - min_norm) + min_norm;
-       }
-       value = lrint_dir(6000.0 * log10(volume), dir) + max;
diff --git a/sound/mpd/patches/040-treewide-get-rid-of-C-math-function-usage.patch b/sound/mpd/patches/040-treewide-get-rid-of-C-math-function-usage.patch
deleted file mode 100644 (file)
index 27cbaa3..0000000
+++ /dev/null
@@ -1,162 +0,0 @@
-From 2a8e7c50743ec6a20c7bd9c8e84ccd36d59e69ad Mon Sep 17 00:00:00 2001
-From: Rosen Penev <rosenp@gmail.com>
-Date: Mon, 3 Feb 2020 15:50:46 -0800
-Subject: [PATCH] treewide: get rid of C math function usage
-
-Boost does not seem to offer an overload for lrint.
-
-Signed-off-by: Rosen Penev <rosenp@gmail.com>
----
- src/ReplayGainGlobal.cxx                    | 2 +-
- src/ReplayGainInfo.cxx                      | 3 +--
- src/decoder/Bridge.cxx                      | 5 +++--
- src/decoder/plugins/MpcdecDecoderPlugin.cxx | 3 +--
- src/mixer/plugins/AlsaMixerPlugin.cxx       | 3 +--
- src/mixer/plugins/SoftwareMixerPlugin.cxx   | 5 +++--
- src/util/Math.hxx                           | 6 ++++++
- 7 files changed, 16 insertions(+), 11 deletions(-)
-
-diff --git a/src/ReplayGainGlobal.cxx b/src/ReplayGainGlobal.cxx
-index 741381dcb..01ba8769d 100644
---- a/src/ReplayGainGlobal.cxx
-+++ b/src/ReplayGainGlobal.cxx
-@@ -21,11 +21,11 @@
- #include "ReplayGainConfig.hxx"
- #include "config/Param.hxx"
- #include "config/Data.hxx"
-+#include "util/Math.hxx"
- #include "util/RuntimeError.hxx"
- #include <assert.h>
- #include <stdlib.h>
--#include <math.h>
- static float
- ParsePreamp(const char *s)
-diff --git a/src/ReplayGainInfo.cxx b/src/ReplayGainInfo.cxx
-index a0685507a..76713aded 100644
---- a/src/ReplayGainInfo.cxx
-+++ b/src/ReplayGainInfo.cxx
-@@ -19,8 +19,7 @@
- #include "ReplayGainInfo.hxx"
- #include "ReplayGainConfig.hxx"
--
--#include <math.h>
-+#include "util/Math.hxx"
- float
- ReplayGainTuple::CalculateScale(const ReplayGainConfig &config) const noexcept
-diff --git a/src/decoder/Bridge.cxx b/src/decoder/Bridge.cxx
-index 27d1a577a..7f9ffe02d 100644
---- a/src/decoder/Bridge.cxx
-+++ b/src/decoder/Bridge.cxx
-@@ -31,11 +31,11 @@
- #include "Log.hxx"
- #include "input/InputStream.hxx"
- #include "util/ConstBuffer.hxx"
-+#include "util/Math.hxx"
- #include "util/StringBuffer.hxx"
- #include <assert.h>
- #include <string.h>
--#include <math.h>
- DecoderBridge::~DecoderBridge()
- {
-@@ -591,7 +592,7 @@ DecoderBridge::SubmitReplayGain(const ReplayGainInfo *new_replay_gain_info) noex
-                       const auto &tuple = new_replay_gain_info->Get(rgm);
-                       const auto scale =
-                               tuple.CalculateScale(dc.replay_gain_config);
--                      dc.replay_gain_db = 20.0 * log10f(scale);
-+                      dc.replay_gain_db = 20.0 * std::log10(scale);
-               }
-               replay_gain_info = *new_replay_gain_info;
-diff --git a/src/decoder/plugins/MpcdecDecoderPlugin.cxx b/src/decoder/plugins/MpcdecDecoderPlugin.cxx
-index c19aee75c..4e9ef798e 100644
---- a/src/decoder/plugins/MpcdecDecoderPlugin.cxx
-+++ b/src/decoder/plugins/MpcdecDecoderPlugin.cxx
-@@ -26,6 +26,7 @@
- #include "util/Domain.hxx"
- #include "util/Macros.hxx"
- #include "util/Clamp.hxx"
-+#include "util/Math.hxx"
- #include "util/ScopeExit.hxx"
- #include "Log.hxx"
-@@ -33,8 +34,6 @@
- #include <exception>
--#include <math.h>
--
- struct mpc_decoder_data {
-       InputStream &is;
-       DecoderClient *client;
-diff --git a/src/mixer/plugins/AlsaMixerPlugin.cxx b/src/mixer/plugins/AlsaMixerPlugin.cxx
-index e3d774194..4b916319b 100644
---- a/src/mixer/plugins/AlsaMixerPlugin.cxx
-+++ b/src/mixer/plugins/AlsaMixerPlugin.cxx
-@@ -26,6 +26,7 @@
- #include "event/Call.hxx"
- #include "util/ASCII.hxx"
- #include "util/Domain.hxx"
-+#include "util/Math.hxx"
- #include "util/RuntimeError.hxx"
- #include "Log.hxx"
-@@ -35,8 +36,6 @@ extern "C" {
- #include <alsa/asoundlib.h>
--#include <math.h>
--
- #define VOLUME_MIXER_ALSA_DEFAULT             "default"
- #define VOLUME_MIXER_ALSA_CONTROL_DEFAULT     "PCM"
- static constexpr unsigned VOLUME_MIXER_ALSA_INDEX_DEFAULT = 0;
-diff --git a/src/mixer/plugins/SoftwareMixerPlugin.cxx b/src/mixer/plugins/SoftwareMixerPlugin.cxx
-index c394a9628..9c48279f9 100644
---- a/src/mixer/plugins/SoftwareMixerPlugin.cxx
-+++ b/src/mixer/plugins/SoftwareMixerPlugin.cxx
-@@ -22,8 +22,9 @@
- #include "filter/plugins/VolumeFilterPlugin.hxx"
- #include "pcm/Volume.hxx"
-+#include <cmath>
-+
- #include <assert.h>
--#include <math.h>
- class SoftwareMixer final : public Mixer {
-       Filter *filter = nullptr;
-@@ -73,7 +74,7 @@ PercentVolumeToSoftwareVolume(unsigned volume) noexcept
-       if (volume >= 100)
-               return PCM_VOLUME_1;
-       else if (volume > 0)
--              return pcm_float_to_volume((exp(volume / 25.0) - 1) /
-+              return pcm_float_to_volume((std::exp(volume / 25.0) - 1) /
-                                          (54.5981500331F - 1));
-       else
-               return 0;
-diff --git a/src/util/Math.hxx b/src/util/Math.hxx
-index bd856f5a9..2206b045f 100644
---- a/src/util/Math.hxx
-+++ b/src/util/Math.hxx
-@@ -31,10 +31,16 @@
- #define MATH_HXX
- #ifdef __UCLIBC__
-+#include <boost/math/special_functions/pow.hpp>
- #include <boost/math/special_functions/round.hpp>
-+using boost::math::iround;
-+using boost::math::pow;
- using boost::math::lround;
-+#define lrint iround
- #else
- #include <cmath>
-+using std::pow;
-+using std::lrint;
- using std::lround;
- #endif
diff --git a/utils/bcm27xx-eeprom/Makefile b/utils/bcm27xx-eeprom/Makefile
new file mode 100644 (file)
index 0000000..6ea5c33
--- /dev/null
@@ -0,0 +1,58 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=bcm27xx-eeprom
+PKG_VERSION:=a9ca308223c1d0426b9ab320696b95954078c3b4
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/raspberrypi/rpi-eeprom/tar.gz/$(PKG_VERSION)?
+PKG_HASH:=072dbbd4b53c2c0b5764ff628f63cc8d679a99cfe84d8f50acea06922084515e
+
+PKG_LICENSE:=BSD-3-Clause Custom
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
+
+include $(INCLUDE_DIR)/package.mk
+
+TAR_OPTIONS:=--strip-components 1 $(TAR_OPTIONS)
+TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS)
+
+define Package/bcm27xx-eeprom
+  SECTION:=utils
+  CATEGORY:=Utilities
+  DEPENDS:=bcm27xx-userland +blkid +pciutils +python3-light
+  TITLE:=BCM27xx EEPROM tools
+endef
+
+define Package/bcm27xx-eeprom/description
+  BCM27xx EEPROM tools.
+endef
+
+define Build/Compile
+       true
+endef
+
+define Package/bcm27xx-eeprom/conffiles
+/etc/bcm27xx-eeprom.conf
+endef
+
+define Package/bcm27xx-eeprom/install
+       $(INSTALL_DIR) $(1)/etc
+       $(INSTALL_CONF) $(PKG_BUILD_DIR)/rpi-eeprom-update-default $(1)/etc/bcm27xx-eeprom.conf
+
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/rpi-eeprom-config $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/rpi-eeprom-update $(1)/usr/bin
+
+       $(INSTALL_DIR) $(1)/lib/firmware/raspberrypi/bootloader
+       $(CP) $(PKG_BUILD_DIR)/firmware/release-notes.md $(1)/lib/firmware/raspberrypi/bootloader
+
+       $(INSTALL_DIR) $(1)/lib/firmware/raspberrypi/bootloader/critical
+       $(CP) $(PKG_BUILD_DIR)/firmware/critical/ $(1)/lib/firmware/raspberrypi/bootloader/
+
+       $(INSTALL_DIR) $(1)/lib/firmware/raspberrypi/bootloader/stable
+       $(CP) $(PKG_BUILD_DIR)/firmware/stable/ $(1)/lib/firmware/raspberrypi/bootloader/
+endef
+
+$(eval $(call BuildPackage,bcm27xx-eeprom))
diff --git a/utils/bcm27xx-eeprom/patches/0001-rpi-eeprom-update-OpenWrt-defaults.patch b/utils/bcm27xx-eeprom/patches/0001-rpi-eeprom-update-OpenWrt-defaults.patch
new file mode 100644 (file)
index 0000000..2f923bc
--- /dev/null
@@ -0,0 +1,48 @@
+From da37f7b051fe6833e25e78184cc9217dd4379187 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= <noltari@gmail.com>
+Date: Mon, 23 Mar 2020 10:10:55 +0100
+Subject: [PATCH] rpi-eeprom-update: OpenWrt defaults
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
+---
+ rpi-eeprom-update         | 6 +++---
+ rpi-eeprom-update-default | 5 +++--
+ 2 files changed, 6 insertions(+), 5 deletions(-)
+
+--- a/rpi-eeprom-update
++++ b/rpi-eeprom-update
+@@ -24,14 +24,14 @@ else
+ fi
+ # May be used to select beta or stable releases instead of the default critical updates.
+-FIRMWARE_RELEASE_STATUS=${FIRMWARE_RELEASE_STATUS:-critical}
++FIRMWARE_RELEASE_STATUS=${FIRMWARE_RELEASE_STATUS:-stable}
+ FIRMWARE_IMAGE_DIR=${FIRMWARE_IMAGE_DIR:-${FIRMWARE_ROOT}/${FIRMWARE_RELEASE_STATUS}}
+-FIRMWARE_BACKUP_DIR=${FIRMWARE_BACKUP_DIR:-/var/lib/raspberrypi/bootloader/backup}
++FIRMWARE_BACKUP_DIR=${FIRMWARE_BACKUP_DIR:-${FIRMWARE_ROOT}/backup}
+ ENABLE_VL805_UPDATES=${ENABLE_VL805_UPDATES:-1}
+ USE_FLASHROM=${USE_FLASHROM:-0}
+ RECOVERY_BIN=${RECOVERY_BIN:-${FIRMWARE_ROOT}/${FIRMWARE_RELEASE_STATUS}/recovery.bin}
+ BOOTFS=${BOOTFS:-/boot}
+-VCMAILBOX=${VCMAILBOX:-/opt/vc/bin/vcmailbox}
++VCMAILBOX=${VCMAILBOX:-/usr/bin/vcmailbox}
+ EXIT_SUCCESS=0
+ EXIT_UPDATE_REQUIRED=1
+--- a/rpi-eeprom-update-default
++++ b/rpi-eeprom-update-default
+@@ -1,8 +1,9 @@
+ FIRMWARE_ROOT=/lib/firmware/raspberrypi/bootloader
+-FIRMWARE_RELEASE_STATUS="critical"
++FIRMWARE_RELEASE_STATUS="stable"
+ FIRMWARE_IMAGE_DIR="${FIRMWARE_ROOT}/${FIRMWARE_RELEASE_STATUS}"
+-FIRMWARE_BACKUP_DIR="/var/lib/raspberrypi/bootloader/backup"
++FIRMWARE_BACKUP_DIR="${FIRMWARE_ROOT}/backup"
+ BOOTFS=/boot
+ USE_FLASHROM=0
+ EEPROM_CONFIG_HOOK=
++VCMAILBOX=/usr/bin/vcmailbox
diff --git a/utils/bcm27xx-eeprom/patches/0002-rpi-eeprom-config-switch-to-Python-3.patch b/utils/bcm27xx-eeprom/patches/0002-rpi-eeprom-config-switch-to-Python-3.patch
new file mode 100644 (file)
index 0000000..fc2c894
--- /dev/null
@@ -0,0 +1,21 @@
+From 869a29ec65a0985670a259f4820df4fafc22c971 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= <noltari@gmail.com>
+Date: Wed, 25 Mar 2020 10:14:34 +0100
+Subject: [PATCH] rpi-eeprom-config: switch to Python 3
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
+---
+ rpi-eeprom-config | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/rpi-eeprom-config
++++ b/rpi-eeprom-config
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python
++#!/usr/bin/python3
+ # rpi-eeprom-config
+ # Utility for reading and writing the configuration file in the
diff --git a/utils/bcm27xx-eeprom/patches/0003-rpi-eeprom-update-change-default-include-path.patch b/utils/bcm27xx-eeprom/patches/0003-rpi-eeprom-update-change-default-include-path.patch
new file mode 100644 (file)
index 0000000..63e99ce
--- /dev/null
@@ -0,0 +1,44 @@
+From 6674d49dea0104031b3f54df4c7a356dc4307bb2 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= <noltari@gmail.com>
+Date: Wed, 25 Mar 2020 20:58:35 +0100
+Subject: [PATCH] rpi-eeprom-update: change default include path
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
+---
+ rpi-eeprom-update | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+--- a/rpi-eeprom-update
++++ b/rpi-eeprom-update
+@@ -6,8 +6,8 @@ set -e
+ script_dir=$(cd "$(dirname "$0")" && pwd)
+-if [ -f /etc/default/rpi-eeprom-update ]; then
+-   . /etc/default/rpi-eeprom-update
++if [ -f /etc/bcm27xx-eeprom.conf ]; then
++   . /etc/bcm27xx-eeprom.conf
+ fi
+ LOCAL_MODE=0
+@@ -323,7 +323,7 @@ The system should then boot normally.
+ If /boot does not correspond to the boot partition on the sd-card and this
+ is not a NOOBS system then the mount point for BOOTFS should be defined
+-in /etc/default/rpi-eeprom-update by defining the BOOTFS variable.
++in /etc/bcm27xx-eeprom.conf by defining the BOOTFS variable.
+ A backup of the current EEPROM config file is written to ${FIRMWARE_BACKUP_DIR}
+ before applying the update.
+@@ -345,7 +345,7 @@ Options:
+    -u Install the specified VL805 (USB EEPROM) image file.
+ Environment:
+-Environment variables should be defined in /etc/default/rpi-eeprom-update
++Environment variables should be defined in /etc/bcm27xx-eeprom.conf
+ EEPROM_CONFIG_HOOK
index 3f4eb83698c6ef43bb7c02046a6a51fc76e3afa5..4639baedce599cfef3fc11b1250e1fa247d65b06 100644 (file)
@@ -79,6 +79,7 @@ COLLECTD_PLUGINS_DISABLED:= \
        notify_email \
        notify_nagios \
        numa \
+       onewire \
        openldap \
        openvz \
        oracle \
@@ -170,7 +171,6 @@ COLLECTD_PLUGINS_SELECTED:= \
        ntpd \
        nut \
        olsrd \
-       onewire \
        openvpn \
        ping \
        postgresql \
@@ -306,11 +306,6 @@ ifneq ($(CONFIG_PACKAGE_collectd-mod-modbus),)
   CONFIGURE_ARGS+= --with-libmodbus="$(STAGING_DIR)/usr"
 endif
 
-# exception: mod-onewire needs libow-capi
-ifneq ($(CONFIG_PACKAGE_collectd-mod-onewire),)
-  CONFIGURE_ARGS+= --with-libowcapi="$(STAGING_DIR)/usr"
-endif
-
 # exception: mod-rrdtool needs rrdtool-1.0.x
 ifneq ($(CONFIG_PACKAGE_collectd-mod-rrdtool),)
   CONFIGURE_ARGS+= --with-librrd="$(STAGING_DIR)/usr/lib/rrdtool-1.0"
@@ -413,7 +408,6 @@ $(eval $(call BuildPlugin,nginx,nginx status input,nginx,+PACKAGE_collectd-mod-n
 $(eval $(call BuildPlugin,ntpd,NTP daemon status input,ntpd,))
 $(eval $(call BuildPlugin,nut,UPS monitoring input,nut,+PACKAGE_collectd-mod-nut:nut-common))
 $(eval $(call BuildPlugin,olsrd,OLSRd status input,olsrd,))
-$(eval $(call BuildPlugin,onewire,onewire sensor input,onewire,+PACKAGE_collectd-mod-onewire:libow-capi @BROKEN))
 $(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))
index 0bd9a4754e41485a840c4b0af73ceac9c5cb5047..8f0c51ba47cfe1dfac3ada3b00d16025aab6a77d 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=evtest
 PKG_VERSION:=1.34
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://cgit.freedesktop.org/evtest/snapshot
diff --git a/utils/evtest/patches/020-Fix-build-on-32bit-arches-with-64bit-time_t.patch b/utils/evtest/patches/020-Fix-build-on-32bit-arches-with-64bit-time_t.patch
new file mode 100644 (file)
index 0000000..1473ba7
--- /dev/null
@@ -0,0 +1,43 @@
+From 648f5c1a9e07843e185782d207bc1bcbe6586f6e Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 30 Nov 2019 11:58:58 -0800
+Subject: [PATCH] Fix build on 32bit arches with 64bit time_t
+
+time element is deprecated on new input_event structure in kernel's
+input.h [1]
+
+[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=152194fe9c3f
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ evtest.c | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/evtest.c b/evtest.c
+index be5e42c..d00437f 100644
+--- a/evtest.c
++++ b/evtest.c
+@@ -62,6 +62,11 @@
+ #include <unistd.h>
+ #include <limits.h> /* PATH_MAX */
++#ifndef input_event_sec
++#define input_event_sec time.tv_sec
++#define input_event_usec time.tv_usec
++#endif
++
+ #define BITS_PER_LONG (sizeof(long) * 8)
+ #define NBITS(x) ((((x)-1)/BITS_PER_LONG)+1)
+ #define OFF(x)  ((x)%BITS_PER_LONG)
+@@ -1141,7 +1146,7 @@ static int print_events(int fd)
+                       type = ev[i].type;
+                       code = ev[i].code;
+-                      printf("Event: time %ld.%06ld, ", ev[i].time.tv_sec, ev[i].time.tv_usec);
++                      printf("Event: time %ld.%06ld, ", ev[i].input_event_sec, ev[i].input_event_usec);
+                       if (type == EV_SYN) {
+                               if (code == SYN_MT_REPORT)
+-- 
+2.25.1
+
index cfb22d0e584fd1bac7a2d36dc69a5ed6e916ff46..7281a180e3092f36efadf0292f055836eca7c56d 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gammu
 PKG_VERSION:=1.41.0
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://dl.cihar.com/gammu/releases
@@ -24,7 +24,6 @@ CMAKE_INSTALL:=1
 PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
-include $(INCLUDE_DIR)/nls.mk
 include $(INCLUDE_DIR)/cmake.mk
 
 define Package/gammu
@@ -32,22 +31,14 @@ define Package/gammu
        CATEGORY:=Utilities
        TITLE:=Cell phone/modem SMS and control tool
        URL:=https://wammu.eu/gammu/
-       DEPENDS:=+libpthread +libcurl +glib2 $(ICONV_DEPENDS) $(INTL_DEPENDS)
+       DEPENDS:=+libpthread +libcurl +glib2
        DEPENDS+=+PACKAGE_bluez-libs:bluez-libs
        DEPENDS+=+PACKAGE_libmariadb:libmariadb +PACKAGE_unixodbc:unixodbc +PACKAGE_libpq:libpq
        DEPENDS+=+PACKAGE_libusb-1.0:libusb-1.0
 endef
 
-CMAKE_OPTIONS += -DWITH_LibDBI:BOOL=OFF
-ifneq ($(INTL_FULL),)
-CMAKE_OPTIONS += -DLIBINTL_INCLUDE_DIRS:PATH=$(INTL_PREFIX)/include
-CMAKE_OPTIONS += -DLIBINTL_LIBRARIES:STRING=intl
-endif
-ifneq ($(ICONV_FULL),)
-CMAKE_OPTIONS += -DDISABLE_ICONV=OFF
-CMAKE_OPTIONS += -DICONV_INCLUDE_DIRS:PATH=$(ICONV_PREFIX)/include
-CMAKE_OPTIONS += -DICONV_LIBRARIES:STRING=iconv
-endif
+CMAKE_OPTIONS += \
+       -DWITH_LibDBI:BOOL=OFF
 
 define Package/gammu/install
        $(INSTALL_DIR) $(1)/usr/bin
index 37232457770b5e79f90aee8694a8dddcd2e6a0ac..a022697d9bdcca0e972e4562285e12fd547c1001 100755 (executable)
@@ -13,73 +13,74 @@ start_instance() {
        local conffile="$CONFPFX-$conf.conf"
 
        config_get_bool item "$conf" enabled 0
-       [ $item = 0 ] && return
+       [ "$item" = 0 ] && return
 
-       echo -e "; don't edit. instead look into /etc/config/gammu\n[gammu]\n" > $conffile
+       {
+       printf "; don't edit. instead look into /etc/config/gammu\n[gammu]\n\n"
 
        config_get item "$conf" device
        [ -z "$item" ] && return
-       echo "device = $item" >> $conffile
+       echo "device = $item"
 
        config_get item "$conf" connection
        [ -z "$item" ] && return
-       echo "connection = $item" >> $conffile
+       echo "connection = $item"
 
        config_get item "$conf" logfile
        [ -z "$item" ] && item=syslog
-       echo "logfile = $item" >> $conffile
+       echo "logfile = $item"
 
-       echo -e "\n[smsd]\nphoneid = $conf\nservice = files\nlogfile = $item" >> $conffile
-       echo -e "checkbattery = 0\nhangupcalls = 1" >> $conffile
+       printf "\n[smsd]\nphoneid = %s\nservice = files\nlogfile = %s\n" "$conf" "$item"
+       printf "checkbattery = 0\nhangupcalls = 1\n"
 
        config_get item "$conf" pin
-       [ -n "$item" ] && echo "pin = $item" >> $conffile
-
+       [ -n "$item" ] && echo "pin = $item"
        config_get item "$conf" phonecode
-       [ -n "$item" ] && echo "phonecode = $item" >> $conffile
+       [ -n "$item" ] && echo "phonecode = $item"
 
        config_get item "$conf" send
-       [ -n "$item" ] && echo "send = $item" >> $conffile
+       [ -n "$item" ] && echo "send = $item"
 
        config_get item "$conf" receive
-       [ -n "$item" ] && echo "receive = $item" >> $conffile
+       [ -n "$item" ] && echo "receive = $item"
 
        config_get item "$conf" timeout
-       [ -n "$item" ] && echo "commtimeout = $item" >> $conffile
+       [ -n "$item" ] && echo "commtimeout = $item"
 
        config_get item "$conf" sleep
-       [ -n "$item" ] && echo "loopsleep = $item" >> $conffile
+       [ -n "$item" ] && echo "loopsleep = $item"
 
        config_get item "$conf" report
-       [ -n "$item" ] && echo "deliveryreport = $item" >> $conffile
+       [ -n "$item" ] && echo "deliveryreport = $item"
 
        config_get item "$conf" onreceive
-       [ -n "$item" ] && echo "runonreceive = $item" >> $conffile
+       [ -n "$item" ] && echo "runonreceive = $item"
 
        config_get item "$conf" onerror
-       [ -n "$item" ] && echo "runonfailure = $item" >> $conffile
+       [ -n "$item" ] && echo "runonfailure = $item"
 
        config_get item "$conf" spool
        [ -z "$item" ] && item=/var/sms
-       [ ! -d $item ] && {
-         mkdir $item
-         mkdir $item/inbox
-         mkdir $item/outbox
-         mkdir $item/sent
-         mkdir $item/error
+       [ -d "$item" ] || {
+         mkdir "$item"
+         mkdir "$item/inbox"
+         mkdir "$item/outbox"
+         mkdir "$item/sent"
+         mkdir "$item/error"
        }
-       echo -e "inboxpath = $item/inbox/\noutboxpath = $item/outbox/" >> $conffile
-       echo -e "sentsmspath = $item/sent/\nerrorsmspath = $item/error/" >> $conffile
+       printf "inboxpath = %s/inbox/\noutboxpath = %s/outbox/\n" "$item" "$item"
+       printf "sentsmspath = %s/sent/\nerrorsmspath = %s/error/\n" "$item" "$item"
+       } > "$conffile"
 
        config_get item "$conf" allow
        [ -n "$item" ] && {
          local data
          local allowfile=$CONFPFX-$conf.allow
          for data in $item ; do
-           echo $data >> $allowfile
+           echo $data >> "$allowfile"
          done
 
-         echo "includenumbersfile = $allowfile" >> $conffile
+         echo "includenumbersfile = $allowfile" >> "$conffile"
        }
 
        config_get item "$conf" deny
@@ -87,18 +88,18 @@ start_instance() {
          local data
          local denyfile=$CONFPFX-$conf.deny
          for data in $item ; do
-           echo $data >> $denyfile
+           echo $data >> "$denyfile"
          done
 
-         echo "excludenumbersfile = $denyfile" >> $conffile
+         echo "excludenumbersfile = $denyfile" >> "$conffile"
        }
 
        procd_open_instance
 
        config_get_bool item "$conf" respawn 0
-       [ $item != 0 ] && procd_set_param respawn
+       [ "$item" = 0 ] || procd_set_param respawn
 
-       procd_set_param command $PROG --config=$conffile
+       procd_set_param command $PROG --config="$conffile"
 
        config_get item "$conf" pidfile
        [ -n "$item" ] && procd_append_param command --pid=$item
diff --git a/utils/gammu/patches/001-iconv-disabling-option.patch b/utils/gammu/patches/001-iconv-disabling-option.patch
deleted file mode 100644 (file)
index 9cc4315..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
---- a/cmake/FindIconv.cmake
-+++ b/cmake/FindIconv.cmake
-@@ -9,10 +9,10 @@
- include(CheckCCompilerFlag)
- include(CheckCSourceCompiles)
--IF (ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
-+IF(NOT DISABLE_ICONV AND ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
-   # Already in cache, be silent
-   SET(ICONV_FIND_QUIETLY TRUE)
--ENDIF (ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
-+ENDIF(NOT DISABLE_ICONV AND ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
- IF(APPLE)
-     FIND_PATH(ICONV_INCLUDE_DIR iconv.h
---- a/configure
-+++ b/configure
-@@ -33,6 +33,7 @@ Usage: ./configure [options]
- --enable-backup     enable backup support
- --enable-win32      enable mingw crosscomilation
- --enable-protection enable compile time protections
-+--disable-iconv     disable iconv support
- --without-gnapplet  disable installation of gnapplet
- --without-completion disable installation of bash completion script
-@@ -57,6 +58,7 @@ CMAKE_CROSS=
- CMAKE_PROTECTION=
- CMAKE_GNAP=
- CMAKE_COMPLETE=
-+CMAKE_ICONV=
- # process command line
- while [ "$#" -gt 0 ] ; do
-@@ -91,6 +93,12 @@ while [ "$#" -gt 0 ] ; do
-         --disable-protection)
-             CMAKE_PROTECTION="-DENABLE_PROTECTION=OFF"
-             ;;
-+        --enable-iconv)
-+            CMAKE_ICONV="-DDISABLE_ICONV=OFF"
-+            ;;
-+        --disable-iconv)
-+            CMAKE_ICONV="-DDISABLE_ICONV=ON"
-+            ;;
-         --enable-debug)
-             CMAKE_DEBUG="-DCMAKE_BUILD_TYPE=Debug"
-             ;;
-@@ -139,4 +147,4 @@ fi
- cd "$BUILD_DIR"
- # invoke cmake to do configuration
--cmake $SOURCE_DIR $CMAKE_PREFIX $CMAKE_SHARED $CMAKE_DEBUG $CMAKE_BACKUP $CMAKE_CROSS $CMAKE_PROTECTION $CMAKE_GNAP $CMAKE_COMPLETE
-+cmake $SOURCE_DIR $CMAKE_PREFIX $CMAKE_SHARED $CMAKE_DEBUG $CMAKE_BACKUP $CMAKE_CROSS $CMAKE_PROTECTION $CMAKE_GNAP $CMAKE_COMPLETE $CMAKE_ICONV
diff --git a/utils/gammu/patches/003-cmake-cross-toolchain.patch b/utils/gammu/patches/003-cmake-cross-toolchain.patch
deleted file mode 100644 (file)
index 30a749b..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
---- /dev/null
-+++ b/cmake/Toolchain-cross.cmake
-@@ -0,0 +1,5 @@
-+# search for programs in the build host directories
-+SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
-+# for libraries and headers in the target directories
-+SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
-+SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
---- a/configure
-+++ b/configure
-@@ -27,6 +27,7 @@ Usage: ./configure [options]
- --help|-h           shows this help
- --prefix=<path>     installation prefix
-+--cross-root=<path> cross-compilation prefix
- --enable-shared     enables shared build
- --enable-debug      enables debug build
- --enable-tiger      enables Mac OS X 10.4 (Tiger) build
-@@ -51,6 +52,7 @@ BUILD_DIR="$SOURCE_DIR/build-configure"
- # cmake parameters
- CMAKE_PREFIX=
-+CMAKE_ROOT=
- CMAKE_SHARED=
- CMAKE_DEBUG=
- CMAKE_BACKUP=
-@@ -69,6 +71,10 @@ while [ "$#" -gt 0 ] ; do
-         --prefix=*)
-             CMAKE_PREFIX="-DCMAKE_INSTALL_PREFIX=${1##--prefix=}"
-             ;;
-+        --cross-root=*)
-+            CMAKE_ROOT="-DCMAKE_TOOLCHAIN_FILE=$SOURCE_DIR/cmake/Toolchain-cross.cmake"
-+            echo "SET(CMAKE_FIND_ROOT_PATH ${1##--cross-root=})" >> $SOURCE_DIR/cmake/Toolchain-cross.cmake
-+            ;;
-         --enable-backup)
-             CMAKE_BACKUP="-DWITH_BACKUP=ON"
-             ;;
-@@ -147,4 +153,4 @@ fi
- cd "$BUILD_DIR"
- # invoke cmake to do configuration
--cmake $SOURCE_DIR $CMAKE_PREFIX $CMAKE_SHARED $CMAKE_DEBUG $CMAKE_BACKUP $CMAKE_CROSS $CMAKE_PROTECTION $CMAKE_GNAP $CMAKE_COMPLETE $CMAKE_ICONV
-+cmake $SOURCE_DIR $CMAKE_ROOT $CMAKE_PREFIX $CMAKE_SHARED $CMAKE_DEBUG $CMAKE_BACKUP $CMAKE_CROSS $CMAKE_PROTECTION $CMAKE_GNAP $CMAKE_COMPLETE $CMAKE_ICONV
diff --git a/utils/gammu/patches/004-cmake_libdbi_optional.patch b/utils/gammu/patches/004-cmake_libdbi_optional.patch
deleted file mode 100644 (file)
index 0067ad1..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
---- a/configure
-+++ b/configure
-@@ -37,6 +37,7 @@ Usage: ./configure [options]
- --disable-iconv     disable iconv support
- --without-gnapplet  disable installation of gnapplet
- --without-completion disable installation of bash completion script
-+--without-libdbi      disable libdbi support
- All enable params have their disable counterparts.
-@@ -61,6 +62,7 @@ CMAKE_PROTECTION=
- CMAKE_GNAP=
- CMAKE_COMPLETE=
- CMAKE_ICONV=
-+CMAKE_LIBDBI=
- # process command line
- while [ "$#" -gt 0 ] ; do
-@@ -117,6 +119,9 @@ while [ "$#" -gt 0 ] ; do
-         --without-completion)
-             CMAKE_COMPLETE="-DINSTALL_BASH_COMPLETION=OFF"
-             ;;
-+        --without-libdbi)
-+            CMAKE_LIBDBI="-DWITH_LibDBI=OFF"
-+            ;;
-         --build=*)
-             ;;
-         --disable-dependency-tracking)
-@@ -153,4 +158,4 @@ fi
- cd "$BUILD_DIR"
- # invoke cmake to do configuration
--cmake $SOURCE_DIR $CMAKE_ROOT $CMAKE_PREFIX $CMAKE_SHARED $CMAKE_DEBUG $CMAKE_BACKUP $CMAKE_CROSS $CMAKE_PROTECTION $CMAKE_GNAP $CMAKE_COMPLETE $CMAKE_ICONV
-+cmake $SOURCE_DIR $CMAKE_ROOT $CMAKE_PREFIX $CMAKE_SHARED $CMAKE_DEBUG $CMAKE_BACKUP $CMAKE_CROSS $CMAKE_PROTECTION $CMAKE_GNAP $CMAKE_COMPLETE $CMAKE_ICONV $CMAKE_LIBDBI
index 4c5b59f9465729f01660b6213dfbde463792c1ab..a31571176ba0c4a747e9485a2f36e076f9d7fcd0 100644 (file)
@@ -9,18 +9,16 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=hfsprogs
 PKG_VERSION:=332.25
-PKG_RELEASE:=3
-
-PKG_LICENSE:=GPL-3.0-or-later
-PKG_LICENSE_FILES:=COPYING
-
-PKG_MAINTAINER:=
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz
 PKG_SOURCE_URL:=http://archive.ubuntu.com/ubuntu/pool/universe/h/$(PKG_NAME)
-PKG_BUILD_DIR:=$(BUILD_DIR)/diskdev_cmds-$(PKG_VERSION)
 PKG_HASH:=74c9aeca899ed7f4bf155c65fc45bf0f250c0f6d57360ea953b1d536d9aa45e6
-PKG_LICENSE:=APSL 2.0
+PKG_BUILD_DIR:=$(BUILD_DIR)/diskdev_cmds-$(PKG_VERSION)
+
+PKG_MAINTAINER:=
+PKG_LICENSE:=APSL-2.0
+PKG_LICENSE_FILES:=COPYING
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/nls.mk
diff --git a/utils/hfsprogs/patches/020-cdefs.patch b/utils/hfsprogs/patches/020-cdefs.patch
new file mode 100644 (file)
index 0000000..0610df7
--- /dev/null
@@ -0,0 +1,30 @@
+--- a/fsck_hfs.tproj/fsck_hfs.h
++++ b/fsck_hfs.tproj/fsck_hfs.h
+@@ -24,6 +24,7 @@
+ #include "cache.h"
++#include <sys/cdefs.h>
+ const extern char     *cdevname;              /* name of device being checked */
+ extern char   *progname;
+--- a/newfs_hfs.tproj/makehfs.c
++++ b/newfs_hfs.tproj/makehfs.c
+@@ -28,6 +28,7 @@
+ */
++#include <sys/cdefs.h>
+ #include <sys/param.h>
+ #include <sys/types.h>
+ #include <sys/time.h>
+--- a/newfs_hfs.tproj/newfs_hfs.c
++++ b/newfs_hfs.tproj/newfs_hfs.c
+@@ -34,6 +34,7 @@
+ #include <syslog.h>
+ #include <unistd.h>
++#include <sys/cdefs.h>
+ #include <sys/ioctl.h>
+ #include <sys/mount.h>
+ #include <sys/param.h>
index 58c5ff86d5e6a1e7fa849804caa7b5bd4ffa1149..3880063605a7cacb71130ce63e14c0f3ca1b1b16 100644 (file)
@@ -23,7 +23,6 @@ PKG_BUILD_PARALLEL:=1
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-i2c-tools-$(PKG_VERSION)
 
 include $(INCLUDE_DIR)/package.mk
-include ../../lang/python/python-package.mk
 include ../../lang/python/python3-package.mk
 
 PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xJf $(DL_DIR)/$(PKG_SOURCE)
@@ -50,23 +49,13 @@ define Package/i2c-tools
   VARIANT:=bin
 endef
 
-define Package/python-smbus
-  $(call Package/i2c/Default)
-  SUBMENU:=Python
-  SECTION:=lang
-  CATEGORY:=Languages
-  TITLE:=Python bindings for the SMBUS
-  DEPENDS:=+PACKAGE_python-smbus:libi2c +PACKAGE_python-smbus:python-light
-  VARIANT:=python
-endef
-
 define Package/python3-smbus
   $(call Package/i2c/Default)
   SUBMENU:=Python
   SECTION:=lang
   CATEGORY:=Languages
   TITLE:=Python bindings for the SMBUS
-  DEPENDS:=+PACKAGE_python3-smbus:libi2c +PACKAGE_python3-smbus:python3-light
+  DEPENDS:=+libi2c +python3-light
   VARIANT:=python3
 endef
 
@@ -79,10 +68,6 @@ define Package/i2c-tools/description
  were originally part of the lm-sensors package.
 endef
 
-define Package/python-smbus/description
- This package contain the python bindings for Linux SMBus access through i2c-dev.
-endef
-
 define Package/python3-smbus/description
  This package contain the Python3 bindings for Linux SMBus access through i2c-dev.
 endef
@@ -106,10 +91,7 @@ endef
 
 endif # ifeq
 
-PYTHON_PKG_SETUP_ARGS:=
 PYTHON3_PKG_SETUP_ARGS:=
-
-PYTHON_PKG_SETUP_DIR:=py-smbus
 PYTHON3_PKG_SETUP_DIR:=py-smbus
 
 define Package/libi2c/install
@@ -128,7 +110,5 @@ endef
 
 $(eval $(call BuildPackage,libi2c))
 $(eval $(call BuildPackage,i2c-tools))
-$(eval $(call PyPackage,python-smbus))
-$(eval $(call BuildPackage,python-smbus))
 $(eval $(call Py3Package,python3-smbus))
 $(eval $(call BuildPackage,python3-smbus))
index 4076749af7ec37df16b5f70ce0a64e9e12ddce7f..b7d374a7c22730a52f2809889cf34201176655bb 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=nano
-PKG_VERSION:=4.8
+PKG_VERSION:=4.9.1
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@GNU/nano
-PKG_HASH:=c348f61c68ab1d573b308398212a09cd68c60fbee20f01a5bd4b50071a258e63
+PKG_HASH:=52cd5a0cefaa6be199bf1a8f5295e2ef1f787f9533d1ab9ed1e52d3a242aba6c
 
 PKG_LICENSE:=GPL-3.0-or-later
 PKG_LICENSE_FILES:=COPYING
index bffc10b54479d5e33b02aee25db2a09db6829372..82bf64e1d2375a181171ab2b0e8257583f39c234 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=qemu
 PKG_VERSION:=4.2.0
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_HASH:=d3481d4108ce211a053ef15be69af1bdd9dde1510fda80d92be0f6c3e98768f0
 PKG_SOURCE_URL:=http://download.qemu.org/
index d2e9823c4f36670aee147e5c269dcb3ce2f39455..e3c29dc12557ae36d937479255156e31c9d4d67d 100644 (file)
@@ -1,7 +1,7 @@
 From d4fcdea769a4629c874ebe1801d83e854c94d5e4 Mon Sep 17 00:00:00 2001
 From: Yousong Zhou <yszhou4tech@gmail.com>
 Date: Sat, 24 Feb 2018 13:43:19 +0800
-Subject: [PATCH 1/5] configure: allow disable fortify_source
+Subject: [PATCH] configure: allow disable fortify_source
 
 Tell build system of qemu to not add _FORTIFY_SOURCE options and let the
 OpenWrt base build system decide flavor of fortify_source to use
index cdd8b3d01caaa0b8c304e72514116e9b9b8bbe48..2bc6446bf1ae4009434c180716010848990a2a93 100644 (file)
@@ -1,8 +1,7 @@
 From 2a6ab8342245c8dc2a09478d8eb0292e2dbcecf2 Mon Sep 17 00:00:00 2001
 From: Yousong Zhou <yszhou4tech@gmail.com>
 Date: Tue, 2 Apr 2019 06:31:31 +0000
-Subject: [PATCH 2/5] configure: allow enabling/disabling libudev from command
- line
+Subject: [PATCH] configure: allow enabling/disabling libudev from command line
 
 ---
  configure | 4 ++++
index 8ac16c6a70c1ac02592c86869fdb4b78e934efba..bedf363c5dabe2a2acc7b4589cff103bbb7f7d88 100644 (file)
@@ -1,8 +1,8 @@
 From 296215421441b73bc6eb487f1d4e7e15e0510a77 Mon Sep 17 00:00:00 2001
 From: Yousong Zhou <yszhou4tech@gmail.com>
 Date: Fri, 7 Feb 2020 03:02:44 +0800
-Subject: [PATCH 3/5] configure: enable guest_agent no matter whether softmmu
is enabled
+Subject: [PATCH] configure: enable guest_agent no matter whether softmmu is
+ enabled
 
 guest_agent as a tool to be run on guest machines does not depend on
 whether there is a softmmu is to be built at this configure/make run
index 8b85b5dde1638cf47ecf567d63054fea048a2f76..c7b2f92ae288a6636b36d85771b151dc6b77d2bd 100644 (file)
@@ -1,7 +1,7 @@
 From 3ac531a6bdeecbe40741a76f1dc2b7fa6c11f8ef Mon Sep 17 00:00:00 2001
 From: Yousong Zhou <yszhou4tech@gmail.com>
 Date: Sat, 24 Feb 2018 13:45:25 +0800
-Subject: [PATCH 4/5] disas: fix compilation failure when isnan is a macro
+Subject: [PATCH] disas: fix compilation failure when isnan is a macro
 
 ---
  disas/libvixl/vixl/utils.h | 16 +++++++++++-----
index 02dca03cf96bfadec47523b286aa161b845904fb..a3846b373af3398b055887b88c2bf391ba1c0aca 100644 (file)
@@ -1,8 +1,7 @@
 From b6223a90ebbb5729e41b4fcb3bc9ac309ec04784 Mon Sep 17 00:00:00 2001
 From: Yousong Zhou <yszhou4tech@gmail.com>
 Date: Sat, 24 Feb 2018 13:46:31 +0800
-Subject: [PATCH 5/5] pc-bios: fix compilation when $(AS) is actually gcc
- driver
+Subject: [PATCH] pc-bios: fix compilation when $(AS) is actually gcc driver
 
 ---
  pc-bios/optionrom/Makefile | 4 ++--
diff --git a/utils/qemu/patches/0006-util-mmap-alloc-fix-missing-MAP_SYNC.patch b/utils/qemu/patches/0006-util-mmap-alloc-fix-missing-MAP_SYNC.patch
new file mode 100644 (file)
index 0000000..53eaf08
--- /dev/null
@@ -0,0 +1,50 @@
+From f385b623c14b5208df88b0be479a9ab30ab68c72 Mon Sep 17 00:00:00 2001
+From: Yousong Zhou <yszhou4tech@gmail.com>
+Date: Mon, 30 Mar 2020 12:48:58 +0800
+Subject: [PATCH] util/mmap-alloc: fix missing MAP_SYNC
+
+Quote musl-libc commit 9b57db3f958 ("add MAP_SYNC and
+MAP_SHARED_VALIDATE from linux v4.15")
+
+ > for synchronous page faults, new in linux commit
+ > 1c9725974074a047f6080eecc62c50a8e840d050 and
+ > b6fb293f2497a9841d94f6b57bd2bb2cd222da43
+ > note that only targets that use asm-generic/mman.h have this new
+ > flag defined, so undef it on other targets (mips*, powerpc*).
+
+Fixes 119906afa5c ("util/mmap-alloc: support MAP_SYNC in
+qemu_ram_mmap()")
+
+Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
+---
+ util/mmap-alloc.c | 10 +++++++---
+ 1 file changed, 7 insertions(+), 3 deletions(-)
+
+diff --git a/util/mmap-alloc.c b/util/mmap-alloc.c
+index 27dcccd8ec..e133e38d21 100644
+--- a/util/mmap-alloc.c
++++ b/util/mmap-alloc.c
+@@ -12,9 +12,6 @@
+ #ifdef CONFIG_LINUX
+ #include <linux/mman.h>
+-#else  /* !CONFIG_LINUX */
+-#define MAP_SYNC              0x0
+-#define MAP_SHARED_VALIDATE   0x0
+ #endif /* CONFIG_LINUX */
+ #include "qemu/osdep.h"
+@@ -27,6 +24,13 @@
+ #include <sys/vfs.h>
+ #endif
++#ifndef MAP_SYNC
++#define MAP_SYNC              0x0
++#endif
++#ifndef MAP_SHARED_VALIDATE
++#define MAP_SHARED_VALIDATE   0x0
++#endif
++
+ size_t qemu_fd_getpagesize(int fd)
+ {
+ #ifdef CONFIG_LINUX
diff --git a/utils/quota/Makefile b/utils/quota/Makefile
new file mode 100644 (file)
index 0000000..a67b4eb
--- /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:=quota
+PKG_VERSION:=4.05
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=@SF/linuxquota
+PKG_HASH:=ef3b5b5d1014ed1344b46c1826145e20cbef8db967b522403c9a060761cf7ab9
+
+PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
+PKG_LICENSE:=GPL-2.0-or-later
+PKG_LICENSE_FILES:=COPYING
+
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/quota
+  SECTION:=utils
+  CATEGORY:=Utilities
+  TITLE:= quota
+  URL:=https://sourceforge.net/projects/linuxquota/
+endef
+
+define Package/quota/description
+  Utility for managing Linux filesystem quotas
+endef
+
+CONFIGURE_ARGS += \
+       --disable-ext2direct
+
+define Package/quota/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/
+endef
+
+$(eval $(call BuildPackage,quota))
index 31fa5318e051c6f3f6e9dd7376f5c5b5cc5577ea..0c77160f1d74be54905070c55aaa7ffe04e975e3 100644 (file)
@@ -7,18 +7,19 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=rtl_433
-PKG_VERSION:=18.12
+PKG_VERSION:=20.02
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/merbanan/rtl_433/tar.gz/$(PKG_VERSION)?
-PKG_HASH:=8d9a0d57155430b03d299effd48b43b7e072f49868485f0fc79294a28402d654
+PKG_HASH:=4f114017ede02d3038c449cf7d25cc82eecda5960e5229cc229774681a9ad80b
 
 PKG_MAINTAINER:=Jasper Scholte <NightNL@outlook.com>
-PKG_LICENSE:=GPLv2
+PKG_LICENSE:=GPL-2.0-or-later
 PKG_LICENSE_FILES:=COPYING
 
 CMAKE_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/cmake.mk
diff --git a/utils/rtl_433/patches/010-gnu-source.patch b/utils/rtl_433/patches/010-gnu-source.patch
deleted file mode 100644 (file)
index 3626558..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -50,7 +50,7 @@ if (("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" MATCHES
-     ADD_DEFINITIONS(-std=c99)
-     ADD_DEFINITIONS(-pedantic)
-     # for strdup, setenv
--    ADD_DEFINITIONS(-D_POSIX_C_SOURCE=200809)
-+    ADD_DEFINITIONS(-D_GNU_SOURCE)
-     #http://gcc.gnu.org/wiki/Visibility
-     add_definitions(-fvisibility=hidden)
index 4fb8c976b274d0f12f1ce3533c0e7753413e26b6..252387294f2d576fdce7ddc2e8c66534c7bf5457 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=rtty
-PKG_VERSION:=7.1.2
+PKG_VERSION:=7.1.3
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL=https://github.com/zhaojh329/rtty/releases/download/v$(PKG_VERSION)
-PKG_HASH:=6faafe75d82edbcfe154da5f1ffc0ddfd14dd88a2315f19aeed7f2631df96f41
+PKG_HASH:=e10ee2048a29e18e6b21c77cb9cf7772eb95646e69567f8b40e85b816d93a3fa
 CMAKE_INSTALL:=1
 
 PKG_LICENSE:=MIT
index 11a2efff56f197e6d91bfe03cbf996940b8f8658..4a0e781da3a7cdea2a945a5a718c6c7b72d7030a 100644 (file)
@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=syncthing
 PKG_VERSION:=1.4.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=syncthing-source-v$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/syncthing/syncthing/releases/download/v$(PKG_VERSION)
@@ -32,6 +32,7 @@ define Package/syncthing
   DEPENDS:=$(GO_ARCH_DEPENDS)
   SECTION:=utils
   CATEGORY:=Utilities
+  USERID:=syncthing:syncthing
 endef
 
 GO_PKG_LDFLAGS_X:=\
index 427c8c5b12f7f584a71b5660e86c89ebccbf5ac3..291675d40da14fa1700f1f260038d1d45953c53b 100644 (file)
@@ -3,5 +3,24 @@ config syncthing 'syncthing'
        option enabled '0'
 
        option gui_address 'http://127.0.0.1:8384'
-       option home '/etc/syncthing/'
+
+       # Use internal flash for evaluation purpouses. Use external storage
+       #   for production.
+       # This filesystem must either support ownership/attributes or
+       #   be readable/writable by the user specified in
+       #   'option user'.
+       # Consult syslog if things go wrong.
+       option home '/etc/syncthing'
+
+       # Changes to "niceness"/macprocs are not picked up by "reload_config"
+       #   nor by "restart": the service has to be stopped/started
+       #   for those to take effect
+       option nice '19'
+
+       # 0 to match the number of CPUs (default)
+       # >0 to explicitly specify concurrency
+       option macprocs '0'
+
+       # Running as 'root' is possible, but not recommended
+       option user 'syncthing'
 
index 443ef4f359ab04b94d2e4ef085fad7518fc69adc..f77aad8ae54852dfa4a7b3b53fce4effca98d4ce 100755 (executable)
@@ -4,29 +4,66 @@ START=90
 STOP=10
 
 USE_PROCD=1
-NICEPRIO=19
 
 PROG=/usr/bin/syncthing
 
+service_triggers()
+{
+  procd_add_reload_trigger "syncthing"
+}
+
 start_service() {
-    [ -d /var/syncthing/ ] || mkdir /var/syncthing/
-
-    local gui_address home enabled
-    config_load "syncthing"
-
-    # The first version had the service enabled by default,
-    #   so preserving the old behaviour
-    config_get_bool enabled syncthing enabled 1
-    [ "$enabled" -gt 0 ] || return 0
-
-    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_set_param nice "$NICEPRIO"
-    procd_close_instance
+  local gui_address home enabled nice macprocs user
+  config_load "syncthing"
+
+  # Some of the default values below might not match the defaults
+  #   in /etc/config/syncthing: the reason is to remain backwards
+  #   compatible with the older versions of this service as it
+  #   evolves.
+
+  config_get_bool enabled syncthing enabled 1
+  [ "$enabled" -gt 0 ] || return 0
+
+  config_get user syncthing user 'root'
+  config_get gui_address syncthing gui_address "http://127.0.0.1:8384"
+  config_get home syncthing home "/etc/syncthing"
+
+  # For backwards compatibility
+  IDX_DB=$(readlink -n "$home"/index-v0.14.0.db)
+  if [ ! -z "$IDX_DB" ]; then
+    [ -d "$IDX_DB" ] || mkdir -p "$IDX_DB"
+
+    # A separate step to handle an upgrade use case
+    [ -d "$IDX_DB" ] && chown -R $user:$user "$IDX_DB"
+  fi
+
+  [ -d "$home" ] || mkdir -p "$home"
+  # A separate step to handle an upgrade use case
+  [ -d "$home" ] && chown -R $user:$user "$home"
+
+  # Changes to "niceness"/macprocs are not picked up by "reload_config"
+  #   nor by "restart": the service has to be stopped/started
+  #   for it to take effect
+  config_get nice syncthing nice "0"
+
+  config_get macprocs syncthing macprocs 0
+  if [ $macprocs -le 0 ]; then
+    # Default to the number of cores in this case
+    macprocs=$(grep -c ^processor /proc/cpuinfo)
+  fi
+
+  procd_open_instance
+  procd_set_param command "$PROG"
+  procd_set_param file /etc/config/syncthing
+  procd_set_param env GOMAXPROCS="$macprocs" STNOUPGRADE=1
+  procd_append_param command -gui-address="$gui_address"
+  procd_append_param command -home="$home"
+  procd_append_param command -no-browser
+  procd_set_param nice "$nice"
+  procd_set_param term_timeout 15
+  procd_set_param user "$user"
+  procd_set_param respawn
+  procd_set_param stdout 1
+  procd_set_param stderr 1
+  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
deleted file mode 120000 (symlink)
index 3bfbcfa..0000000
+++ /dev/null
@@ -1 +0,0 @@
-/var/syncthing/
\ No newline at end of file
index 012c77d5916c8abe215b2e89cbe7e39d64f8b41a..d3a9fd635863b28635f8c8062c40d82ee6d9fad9 100644 (file)
@@ -9,12 +9,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=xz
-PKG_VERSION:=5.2.4
-PKG_RELEASE:=5
+PKG_VERSION:=5.2.5
+PKG_RELEASE:=1
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@SF/lzmautils
-PKG_HASH:=3313fd2a95f43d88e44264e6b015e7d03053e681860b0d5d3f9baca79c57b7bf
+PKG_HASH:=3e1e518ffc912f86608a8cb35e4bd41ad1aec210df2a47aaa1f95e7f5576ef56
 
 PKG_MAINTAINER:=
 PKG_LICENSE:=Public-Domain LGPL-2.1-or-later GPL-2.0-or-later GPL-3.0-or-later
diff --git a/utils/yunbridge/Makefile b/utils/yunbridge/Makefile
deleted file mode 100644 (file)
index 24dbc9c..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-#
-# Copyright (C) 2006-2011 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:=yunbridge
-PKG_VERSION:=1.6.0
-PKG_RELEASE:=1
-
-PKG_SOURCE_URL:=https://codeload.github.com/arduino/YunBridge/tar.gz/$(PKG_VERSION)?
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=9e5ffc7a0d0cc2c92e972e425adcc49b77cf39da075d31728e7755d316d910d8
-PKG_BUILD_DIR:=$(BUILD_DIR)/YunBridge-$(PKG_VERSION)
-
-PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>
-PKG_LICENSE:=GPL-2.0
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/yunbridge
-  SECTION:=utils
-  CATEGORY:=Utilities
-  TITLE:=Arduino YUN bridge library
-  URL:=http://arduino.cc/
-  DEPENDS:=+python
-endef
-
-define Package/yunbridge/description
-  Arduino YUN bridge library
-endef
-
-define Build/Compile
-       true
-endef
-
-define Package/yunbridge/install
-       mkdir -p $(1)/usr/lib/python2.7/bridge
-       $(CP) $(PKG_BUILD_DIR)/bridge/*.py $(1)/usr/lib/python2.7/bridge/
-       $(CP) ./files/* $(1)
-endef
-
-$(eval $(call BuildPackage,yunbridge))
diff --git a/utils/yunbridge/files/etc/config/yunbridge b/utils/yunbridge/files/etc/config/yunbridge
deleted file mode 100644 (file)
index fe8dd28..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-config bridge config
-       option socket_timeout 5
-       option secure_rest_api false
-
-       # remove this line to activae the yunbridge
-       option disabled 1
diff --git a/utils/yunbridge/files/etc/init.d/yunbridge b/utils/yunbridge/files/etc/init.d/yunbridge
deleted file mode 100755 (executable)
index 4b48220..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/sh /etc/rc.common
-# Copyright (C) 2013 OpenWrt.org
-
-# start after and stop before networking
-START=20
-STOP=89
-
-USE_PROCD=1
-
-service_triggers()
-{
-       procd_add_reload_trigger "yunbridge"
-}
-
-start_service()
-{
-       [ "$(uci -q get yunbridge.config.disabled)" = "1" ] && return 0
-       procd_open_instance
-       procd_set_param command "/sbin/yunbridge"
-       procd_set_param respawn
-       procd_close_instance
-}
diff --git a/utils/yunbridge/files/sbin/yunbridge b/utils/yunbridge/files/sbin/yunbridge
deleted file mode 100755 (executable)
index c8e4812..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-stty -F /dev/ttyS0 2500000 clocal cread cs8 -cstopb -parenb
-exec < /dev/ttyS0
-exec > /dev/ttyS0
-exec 2> /dev/ttyS0
-askfirst bin/ash --login
diff --git a/utils/yunbridge/files/usr/bin/pretty-wifi-info.lua b/utils/yunbridge/files/usr/bin/pretty-wifi-info.lua
deleted file mode 100755 (executable)
index d91817a..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-#!/usr/bin/lua
-
-local function get_basic_net_info(network, iface, accumulator)
-  local net = network:get_network(iface)
-  local device = net and net:get_interface()
-
-  if device then
-    accumulator["uptime"] = net:uptime()
-    accumulator["iface"] = device:name()
-    accumulator["mac"] = device:mac()
-    accumulator["rx_bytes"] = device:rx_bytes()
-    accumulator["tx_bytes"] = device:tx_bytes()
-    accumulator["ipaddrs"] = {}
-
-    for _, ipaddr in ipairs(device:ipaddrs()) do
-      accumulator.ipaddrs[#accumulator.ipaddrs + 1] = {
-        addr = ipaddr:host():string(),
-        netmask = ipaddr:mask():string()
-      }
-    end
-  end
-end
-
-local function get_wifi_info(network, iface, accumulator)
-  local net = network:get_wifinet(iface)
-
-  if net then
-    local dev = net:get_device()
-    if dev then
-      accumulator["mode"] = net:active_mode()
-      accumulator["ssid"] = net:active_ssid()
-      accumulator["encryption"] = net:active_encryption()
-      accumulator["quality"] = net:signal_percent()
-    end
-  end
-end
-
-local function collect_wifi_info()
-  local network = require"luci.model.network".init()
-  local accumulator = {}
-  get_basic_net_info(network, "lan", accumulator)
-  get_wifi_info(network, "wlan0", accumulator)
-  return accumulator
-end
-
-local info = collect_wifi_info()
-
-print("Current WiFi configuration")
-if info.ssid then
-  print("SSID: " .. info.ssid)
-end
-if info.mode then
-  print("Mode: " .. info.mode)
-end
-if info.quality then
-  print("Signal: " .. info.quality .. "%")
-end
-if info.encryption then
-  print("Encryption method: " .. info.encryption)
-end
-if info.iface then
-  print("Interface name: " .. info.iface)
-end
-if info.uptime then
-  print("Active for: " .. math.floor(info.uptime / 60) .. " minutes")
-end
-if #info.ipaddrs > 0 then
-  print("IP address: " .. info.ipaddrs[1].addr .. "/" .. info.ipaddrs[1].netmask)
-end
-if info.mac then
-  print("MAC address: " .. info.mac)
-end
-if info.rx_bytes and info.tx_bytes then
-  print("RX/TX: " .. math.floor(info.rx_bytes / 1024) .. "/" .. math.floor(info.tx_bytes / 1024) .. " KBs")
-end
diff --git a/utils/yunbridge/files/usr/lib/lua/luci/controller/arduino/index.lua b/utils/yunbridge/files/usr/lib/lua/luci/controller/arduino/index.lua
deleted file mode 100644 (file)
index 8d3b7eb..0000000
+++ /dev/null
@@ -1,414 +0,0 @@
---[[
-This file is part of YunWebUI.
-
-YunWebUI 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.
-
-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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-
-As a special exception, you may use this file as part of a free software
-library without restriction.  Specifically, if other files instantiate
-templates or use macros or inline functions from this file, or you compile
-this file and link it with other files to produce an executable, this
-file does not by itself cause the resulting executable to be covered by
-the GNU General Public License.  This exception does not however
-invalidate any other reasons why the executable file might be covered by
-the GNU General Public License.
-
-Copyright 2013 Arduino LLC (http://www.arduino.cc/)
-]]
-
-module("luci.controller.arduino.index", package.seeall)
-
-local function not_nil_or_empty(value)
-  return value and value ~= ""
-end
-
-local function get_first(cursor, config, type, option)
-  return cursor:get_first(config, type, option)
-end
-
-local function set_first(cursor, config, type, option, value)
-  cursor:foreach(config, type, function(s)
-    if s[".type"] == type then
-      cursor:set(config, s[".name"], option, value)
-    end
-  end)
-end
-
-
-local function to_key_value(s)
-  local parts = luci.util.split(s, ":")
-  parts[1] = luci.util.trim(parts[1])
-  parts[2] = luci.util.trim(parts[2])
-  return parts[1], parts[2]
-end
-
-function http_error(code, text)
-  luci.http.prepare_content("text/plain")
-  luci.http.status(code)
-  if text then
-    luci.http.write(text)
-  end
-end
-
-function index()
-  function luci.dispatcher.authenticator.arduinoauth(validator, accs, default)
-    require("luci.controller.arduino.index")
-
-    local user = luci.http.formvalue("username")
-    local pass = luci.http.formvalue("password")
-    local basic_auth = luci.http.getenv("HTTP_AUTHORIZATION")
-
-    if user and validator(user, pass) then
-      return user
-    end
-
-    if basic_auth and basic_auth ~= "" then
-      local decoded_basic_auth = nixio.bin.b64decode(string.sub(basic_auth, 7))
-      user = string.sub(decoded_basic_auth, 0, string.find(decoded_basic_auth, ":") - 1)
-      pass = string.sub(decoded_basic_auth, string.find(decoded_basic_auth, ":") + 1)
-    end
-
-    if user then
-      if #pass ~= 64 and validator(user, pass) then
-        return user
-      elseif #pass == 64 then
-        local uci = luci.model.uci.cursor()
-        uci:load("yunbridge")
-        local stored_encrypted_pass = uci:get_first("yunbridge", "bridge", "password")
-        if pass == stored_encrypted_pass then
-          return user
-        end
-      end
-    end
-
-    luci.http.header("WWW-Authenticate", "Basic realm=\"yunbridge\"")
-    luci.http.status(401)
-
-    return false
-  end
-
-  local function make_entry(path, target, title, order)
-    local page = entry(path, target, title, order)
-    page.leaf = true
-    return page
-  end
-
-  -- web panel
-  local webpanel = entry({ "webpanel" }, alias("webpanel", "go_to_homepage"), _("%s Web Panel") % luci.sys.hostname(), 10)
-  webpanel.sysauth = "root"
-  webpanel.sysauth_authenticator = "arduinoauth"
-
-  make_entry({ "webpanel", "go_to_homepage" }, call("go_to_homepage"), nil)
-
-  --api security level
-  local uci = luci.model.uci.cursor()
-  uci:load("yunbridge")
-  local secure_rest_api = uci:get_first("yunbridge", "bridge", "secure_rest_api")
-  local rest_api_sysauth = false
-  if secure_rest_api == "true" then
-    rest_api_sysauth = webpanel.sysauth
-  end
-
-  --storage api
-  local data_api = node("data")
-  data_api.sysauth = rest_api_sysauth
-  data_api.sysauth_authenticator = webpanel.sysauth_authenticator
-  make_entry({ "data", "get" }, call("storage_send_request"), nil).sysauth = rest_api_sysauth
-  make_entry({ "data", "put" }, call("storage_send_request"), nil).sysauth = rest_api_sysauth
-  make_entry({ "data", "delete" }, call("storage_send_request"), nil).sysauth = rest_api_sysauth
-  local mailbox_api = node("mailbox")
-  mailbox_api.sysauth = rest_api_sysauth
-  mailbox_api.sysauth_authenticator = webpanel.sysauth_authenticator
-  make_entry({ "mailbox" }, call("build_bridge_mailbox_request"), nil).sysauth = rest_api_sysauth
-
-  --plain socket endpoint
-  local plain_socket_endpoint = make_entry({ "arduino" }, call("board_plain_socket"), nil)
-  plain_socket_endpoint.sysauth = rest_api_sysauth
-  plain_socket_endpoint.sysauth_authenticator = webpanel.sysauth_authenticator
-end
-
-function go_to_homepage()
-  luci.http.redirect("/index.html")
-end
-
-local function build_bridge_request(command, params)
-
-  local bridge_request = {
-    command = command
-  }
-
-  if command == "raw" then
-    params = table.concat(params, "/")
-    if not_nil_or_empty(params) then
-      bridge_request["data"] = params
-    end
-    return bridge_request
-  end
-
-  if command == "get" then
-    if not_nil_or_empty(params[1]) then
-      bridge_request["key"] = params[1]
-    end
-    return bridge_request
-  end
-
-  if command == "put" and not_nil_or_empty(params[1]) and params[2] then
-    bridge_request["key"] = params[1]
-    bridge_request["value"] = params[2]
-    return bridge_request
-  end
-
-  if command == "delete" and not_nil_or_empty(params[1]) then
-    bridge_request["key"] = params[1]
-    return bridge_request
-  end
-
-  return nil
-end
-
-local function extract_jsonp_param(query_string)
-  if not not_nil_or_empty(query_string) then
-    return nil
-  end
-
-  local qs_parts = string.split(query_string, "&")
-  for idx, value in ipairs(qs_parts) do
-    if string.find(value, "jsonp") == 1 or string.find(value, "callback") == 1 then
-      return string.sub(value, string.find(value, "=") + 1)
-    end
-  end
-end
-
-local function parts_after(url_part)
-  local url = luci.http.getenv("PATH_INFO")
-  local url_after_part = string.find(url, "/", string.find(url, url_part) + 1)
-  if not url_after_part then
-    return {}
-  end
-  return luci.util.split(string.sub(url, url_after_part + 1), "/")
-end
-
-function storage_send_request()
-  local method = luci.http.getenv("REQUEST_METHOD")
-  local jsonp_callback = extract_jsonp_param(luci.http.getenv("QUERY_STRING"))
-  local parts = parts_after("data")
-  local command = parts[1]
-  if not command or command == "" then
-    luci.http.status(404)
-    return
-  end
-  local params = {}
-  for idx, param in ipairs(parts) do
-    if idx > 1 and not_nil_or_empty(param) then
-      table.insert(params, param)
-    end
-  end
-
-  -- TODO check method?
-  local bridge_request = build_bridge_request(command, params)
-  if not bridge_request then
-    luci.http.status(403)
-    return
-  end
-
-  local uci = luci.model.uci.cursor()
-  uci:load("yunbridge")
-  local socket_timeout = uci:get_first("yunbridge", "bridge", "socket_timeout", 5)
-
-  local sock, code, msg = nixio.connect("127.0.0.1", 5700)
-  if not sock then
-    code = code or ""
-    msg = msg or ""
-    http_error(500, "nil socket, " .. code .. " " .. msg)
-    return
-  end
-
-  sock:setopt("socket", "sndtimeo", socket_timeout)
-  sock:setopt("socket", "rcvtimeo", socket_timeout)
-  sock:setopt("tcp", "nodelay", 1)
-
-  local json = require("luci.json")
-
-  sock:write(json.encode(bridge_request))
-  sock:writeall("\n")
-
-  local response_text = {}
-  while true do
-    local bytes = sock:recv(4096)
-    if bytes and #bytes > 0 then
-      table.insert(response_text, bytes)
-    end
-
-    local json_response = json.decode(table.concat(response_text))
-    if json_response then
-      sock:close()
-      luci.http.status(200)
-      if jsonp_callback then
-        luci.http.prepare_content("application/javascript")
-        luci.http.write(jsonp_callback)
-        luci.http.write("(")
-        luci.http.write_json(json_response)
-        luci.http.write(");")
-      else
-        luci.http.prepare_content("application/json")
-        luci.http.write(json.encode(json_response))
-      end
-      return
-    end
-
-    if not bytes or #response_text == 0 then
-      sock:close()
-      http_error(500, "Empty response")
-      return
-    end
-  end
-
-  sock:close()
-end
-
-function board_plain_socket()
-  local function send_response(response_text, jsonp_callback)
-    if not response_text then
-      luci.http.status(500)
-      return
-    end
-
-    local rows = luci.util.split(response_text, "\r\n")
-    if #rows == 1 or string.find(rows[1], "Status") ~= 1 then
-      luci.http.prepare_content("text/plain")
-      luci.http.status(200)
-      luci.http.write(response_text)
-      return
-    end
-
-    local body_start_at_idx = -1
-    local content_type = "text/plain"
-    for idx, row in ipairs(rows) do
-      if row == "" then
-        body_start_at_idx = idx
-        break
-      end
-
-      local key, value = to_key_value(row)
-      if string.lower(key) == "status" then
-        luci.http.status(tonumber(value))
-      elseif string.lower(key) == "content-type" then
-        content_type = value
-      else
-        luci.http.header(key, value)
-      end
-    end
-
-    local response_body = table.concat(rows, "\r\n", body_start_at_idx + 1)
-    if content_type == "application/json" and jsonp_callback then
-      local json = require("luci.json")
-      luci.http.prepare_content("application/javascript")
-      luci.http.write(jsonp_callback)
-      luci.http.write("(")
-      luci.http.write_json(json.decode(response_body))
-      luci.http.write(");")
-    else
-      luci.http.prepare_content(content_type)
-      luci.http.write(response_body)
-    end
-  end
-
-  local method = luci.http.getenv("REQUEST_METHOD")
-  local jsonp_callback = extract_jsonp_param(luci.http.getenv("QUERY_STRING"))
-  local parts = parts_after("arduino")
-  local params = {}
-  for idx, param in ipairs(parts) do
-    if not_nil_or_empty(param) then
-      table.insert(params, param)
-    end
-  end
-
-  if #params == 0 then
-    luci.http.status(404)
-    return
-  end
-
-  params = table.concat(params, "/")
-
-  local uci = luci.model.uci.cursor()
-  uci:load("yunbridge")
-  local socket_timeout = uci:get_first("yunbridge", "bridge", "socket_timeout", 5)
-
-  local sock, code, msg = nixio.connect("127.0.0.1", 5555)
-  if not sock then
-    code = code or ""
-    msg = msg or ""
-    http_error(500, "Could not connect to YunServer " .. code .. " " .. msg)
-    return
-  end
-
-  sock:setopt("socket", "sndtimeo", socket_timeout)
-  sock:setopt("socket", "rcvtimeo", socket_timeout)
-  sock:setopt("tcp", "nodelay", 1)
-
-  sock:write(params)
-  sock:writeall("\r\n")
-
-  local response_text = sock:readall()
-  sock:close()
-
-  send_response(response_text, jsonp_callback)
-end
-
-function build_bridge_mailbox_request()
-  local method = luci.http.getenv("REQUEST_METHOD")
-  local jsonp_callback = extract_jsonp_param(luci.http.getenv("QUERY_STRING"))
-  local parts = parts_after("mailbox")
-  local params = {}
-  for idx, param in ipairs(parts) do
-    if not_nil_or_empty(param) then
-      table.insert(params, param)
-    end
-  end
-
-  if #params == 0 then
-    luci.http.status(400)
-    return
-  end
-
-  local bridge_request = build_bridge_request("raw", params)
-  if not bridge_request then
-    luci.http.status(403)
-    return
-  end
-
-  local uci = luci.model.uci.cursor()
-  uci:load("yunbridge")
-  local socket_timeout = uci:get_first("yunbridge", "bridge", "socket_timeout", 5)
-
-  local sock, code, msg = nixio.connect("127.0.0.1", 5700)
-  if not sock then
-    code = code or ""
-    msg = msg or ""
-    http_error(500, "nil socket, " .. code .. " " .. msg)
-    return
-  end
-
-  sock:setopt("socket", "sndtimeo", socket_timeout)
-  sock:setopt("socket", "rcvtimeo", socket_timeout)
-  sock:setopt("tcp", "nodelay", 1)
-
-  local json = require("luci.json")
-
-  sock:write(json.encode(bridge_request))
-  sock:writeall("\n")
-  sock:close()
-
-  luci.http.status(200)
-end
diff --git a/utils/yunbridge/files/usr/lib/lua/luci/sha256.lua b/utils/yunbridge/files/usr/lib/lua/luci/sha256.lua
deleted file mode 100644 (file)
index b5e2dea..0000000
+++ /dev/null
@@ -1,199 +0,0 @@
---
---  Code merged by gravityscore at http://pastebin.com/gsFrNjbt
---
---  Adaptation of the Secure Hashing Algorithm (SHA-244/256)
---  Found Here: http://lua-users.org/wiki/SecureHashAlgorithm
---  
---  Using an adapted version of the bit library
---  Found Here: https://bitbucket.org/Boolsheet/bslf/src/1ee664885805/bit.lua
---  
-
-module("luci.sha256", package.seeall)
-
-local MOD = 2 ^ 32
-local MODM = MOD - 1
-
-local function memoize(f)
-  local mt = {}
-  local t = setmetatable({}, mt)
-  function mt:__index(k)
-    local v = f(k)
-    t[k] = v
-    return v
-  end
-
-  return t
-end
-
-local function make_bitop_uncached(t, m)
-  local function bitop(a, b)
-    local res, p = 0, 1
-    while a ~= 0 and b ~= 0 do
-      local am, bm = a % m, b % m
-      res = res + t[am][bm] * p
-      a = (a - am) / m
-      b = (b - bm) / m
-      p = p * m
-    end
-    res = res + (a + b) * p
-    return res
-  end
-
-  return bitop
-end
-
-local function make_bitop(t)
-  local op1 = make_bitop_uncached(t, 2 ^ 1)
-  local op2 = memoize(function(a) return memoize(function(b) return op1(a, b) end) end)
-  return make_bitop_uncached(op2, 2 ^ (t.n or 1))
-end
-
-local bxor1 = make_bitop({ [0] = { [0] = 0, [1] = 1 }, [1] = { [0] = 1, [1] = 0 }, n = 4 })
-
-local function bxor(a, b, c, ...)
-  local z = nil
-  if b then
-    a = a % MOD
-    b = b % MOD
-    z = bxor1(a, b)
-    if c then z = bxor(z, c, ...) end
-    return z
-  elseif a then return a % MOD
-  else return 0
-  end
-end
-
-local function band(a, b, c, ...)
-  local z
-  if b then
-    a = a % MOD
-    b = b % MOD
-    z = ((a + b) - bxor1(a, b)) / 2
-    if c then z = bit32_band(z, c, ...) end
-    return z
-  elseif a then return a % MOD
-  else return MODM
-  end
-end
-
-local function bnot(x) return (-1 - x) % MOD end
-
-local function rshift1(a, disp)
-  if disp < 0 then return lshift(a, -disp) end
-  return math.floor(a % 2 ^ 32 / 2 ^ disp)
-end
-
-local function rshift(x, disp)
-  if disp > 31 or disp < -31 then return 0 end
-  return rshift1(x % MOD, disp)
-end
-
-local function lshift(a, disp)
-  if disp < 0 then return rshift(a, -disp) end
-  return (a * 2 ^ disp) % 2 ^ 32
-end
-
-local function rrotate(x, disp)
-  x = x % MOD
-  disp = disp % 32
-  local low = band(x, 2 ^ disp - 1)
-  return rshift(x, disp) + lshift(low, 32 - disp)
-end
-
-local k = {
-  0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5,
-  0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,
-  0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3,
-  0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,
-  0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc,
-  0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,
-  0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7,
-  0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,
-  0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13,
-  0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,
-  0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3,
-  0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,
-  0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5,
-  0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,
-  0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,
-  0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2,
-}
-
-local function str2hexa(s)
-  return (string.gsub(s, ".", function(c) return string.format("%02x", string.byte(c)) end))
-end
-
-local function num2s(l, n)
-  local s = ""
-  for i = 1, n do
-    local rem = l % 256
-    s = string.char(rem) .. s
-    l = (l - rem) / 256
-  end
-  return s
-end
-
-local function s232num(s, i)
-  local n = 0
-  for i = i, i + 3 do n = n * 256 + string.byte(s, i) end
-  return n
-end
-
-local function preproc(msg, len)
-  local extra = 64 - ((len + 9) % 64)
-  len = num2s(8 * len, 8)
-  msg = msg .. "\128" .. string.rep("\0", extra) .. len
-  assert(#msg % 64 == 0)
-  return msg
-end
-
-local function initH256(H)
-  H[1] = 0x6a09e667
-  H[2] = 0xbb67ae85
-  H[3] = 0x3c6ef372
-  H[4] = 0xa54ff53a
-  H[5] = 0x510e527f
-  H[6] = 0x9b05688c
-  H[7] = 0x1f83d9ab
-  H[8] = 0x5be0cd19
-  return H
-end
-
-local function digestblock(msg, i, H)
-  local w = {}
-  for j = 1, 16 do w[j] = s232num(msg, i + (j - 1) * 4) end
-  for j = 17, 64 do
-    local v = w[j - 15]
-    local s0 = bxor(rrotate(v, 7), rrotate(v, 18), rshift(v, 3))
-    v = w[j - 2]
-    w[j] = w[j - 16] + s0 + w[j - 7] + bxor(rrotate(v, 17), rrotate(v, 19), rshift(v, 10))
-  end
-
-  local a, b, c, d, e, f, g, h = H[1], H[2], H[3], H[4], H[5], H[6], H[7], H[8]
-  for i = 1, 64 do
-    local s0 = bxor(rrotate(a, 2), rrotate(a, 13), rrotate(a, 22))
-    local maj = bxor(band(a, b), band(a, c), band(b, c))
-    local t2 = s0 + maj
-    local s1 = bxor(rrotate(e, 6), rrotate(e, 11), rrotate(e, 25))
-    local ch = bxor(band(e, f), band(bnot(e), g))
-    local t1 = h + s1 + ch + k[i] + w[i]
-    h, g, f, e, d, c, b, a = g, f, e, d + t1, c, b, a, t1 + t2
-  end
-
-  H[1] = band(H[1] + a)
-  H[2] = band(H[2] + b)
-  H[3] = band(H[3] + c)
-  H[4] = band(H[4] + d)
-  H[5] = band(H[5] + e)
-  H[6] = band(H[6] + f)
-  H[7] = band(H[7] + g)
-  H[8] = band(H[8] + h)
-end
-
-function sha256(msg)
-  msg = preproc(msg, #msg)
-  local H = initH256({})
-  for i = 1, #msg, 64 do digestblock(msg, i, H) end
-  return str2hexa(num2s(H[1], 4) .. num2s(H[2], 4) .. num2s(H[3], 4) .. num2s(H[4], 4) ..
-          num2s(H[5], 4) .. num2s(H[6], 4) .. num2s(H[7], 4) .. num2s(H[8], 4))
-end
\ No newline at end of file
diff --git a/utils/yunbridge/patches/000-scripts.patch b/utils/yunbridge/patches/000-scripts.patch
deleted file mode 100644 (file)
index 46f21bd..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
---- a/bridge/packet.py
-+++ b/bridge/packet.py
-@@ -93,12 +93,12 @@
-     
-   def run(self, data):
-     if data[0] != 'X':
--      call(['/usr/bin/blink-start', '100'])
-+      #call(['/usr/bin/blink-start', '100'])
-       return chr(1)
-     if data[1:4] != '100':
--      call(['/usr/bin/blink-start', '100'])
-+      #call(['/usr/bin/blink-start', '100'])
-       return chr(2)
--    call(['/usr/bin/blink-stop'])
-+    #call(['/usr/bin/blink-stop'])
-     return chr(0) + '160' # send the actual bridge version
-     
- class PacketReader: