- image: docker.io/openwrtorg/packages-cci:v1.0.2
environment:
- SDK_HOST: "downloads.openwrt.org"
- - SDK_PATH: "snapshots/targets/ar71xx/generic"
- - SDK_FILE: "openwrt-sdk-ar71xx-generic_*.Linux-x86_64.tar.xz"
+ - SDK_PATH: "snapshots/targets/ath79/generic"
+ - SDK_FILE: "openwrt-sdk-ath79-generic_*.Linux-x86_64.tar.xz"
- BRANCH: "master"
steps:
- checkout:
EOF
cat feeds.conf
./scripts/feeds update -a > /dev/null
- ./scripts/feeds install -a > /dev/null
make defconfig > /dev/null
# enable BUILD_LOG
sed -i 's/# CONFIG_BUILD_LOG is not set/CONFIG_BUILD_LOG=y/' .config
- run:
- name: Download source, check package, compile
+ name: Install & download source, check package, compile
working_directory: ~/build_dir
command: |
set +o pipefail
echo_blue "=== Found new/modified packages: $PKGS"
for PKG in $PKGS ; do
+ echo_blue "===+ Install: $PKG"
+ ./scripts/feeds install "$PKG"
+
echo_blue "===+ Download: $PKG"
make "package/$PKG/download" V=s
* Convenience macros for popular mirrors are defined. Using these macros will make your package downloads more robust by mapping to a list of possible source mirrors for archive availability.
- @SF - Sourceforge (downloads.sourceforge.net) with 5 retries due to re-directs
- @GITHUB - Github (raw.githubusercontent.com) with 5 retries due to re-directs
- - @GNU - 8 regional servers
+ - @GNU - 8 regional servers
- @GNOME - 8 regional servers
- @SAVANNAH - 8 regional servers
- @APACHE - 8 regional servers
* Provide an up-to-date Copyright notice or **none**. Copyright should not be assigned to OpenWrt unless you are explicitly requested by or working under contract to OpenWrt. Assigning a Copyright to yourself or organization you represent is acceptable.
* A (PKG_)MAINTAINER definition listing either yourself and/or another person responsible for this package (E.g.: PKG_MAINTAINER:= Joe D. Hacker `<jdh@jdhs-email-provider.org`>). Listing multiple maintainers is encouraged in order to keep the package active and up-to-date. Leaving this blank will also be accepted, however the review process may not be as quick as one with a maintainer.
* A PKG_LICENSE tag declaring the main license of the package.
- (E.g.: PKG_LICENSE:=GPL-2.0+) Please use SPDX identifiers if possible (see list at the bottom).
+ (E.g.: PKG_LICENSE:=GPL-2.0-or-later) Please use SPDX identifiers if possible (see list at the bottom).
* An optional PKG_LICENSE_FILES tag including the filenames of the license-files in the source-package.
(E.g.: PKG_LICENSE_FILES:=COPYING)
* PKG_RELEASE should be initially set to 1 or reset to 1 if the software version is changed. You should increment it if the package itself has changed. For example, modifying a support script, changing configure options like --disable* or --enable* switches, or if you changed something in the package which causes the resulting binaries to be different. Changes like correcting md5sums, changing mirror URLs, adding a maintainer field or updating a comment or copyright year in a Makefile do not require a change to PKG_RELEASE.
* Have a useful description prefixed with the package name
(E.g.: "foopkg: Add libzot dependency")
* Include Signed-off-by tag in the commit comments.
- See: [Sign your work](https://openwrt.org/docs/guide-developer/submittingpatches-tomerge?s[]=sign#sign_your_work)
+ See: [Sign your work](https://openwrt.org/submitting-patches#sign_your_work)
### Advice on pull requests:
* If you are unsure if your change is suitable, please use a pull request.
### Common LICENSE tags (short list)
-(Complete list can be found at: <http://spdx.org/licenses>)
+(Complete list can be found at: <https://spdx.org/licenses>)
| Full Name | Identifier |
|---|:---|
|Apache License 1.1|Apache-1.1|
|Apache License 2.0|Apache-2.0|
|Artistic License 1.0|Artistic-1.0|
-|Artistic License 1.0 (Perl)|Artistic-1.0-Perl|
|Artistic License 1.0 w/clause 8|Artistic-1.0-cl8|
+|Artistic License 1.0 (Perl)|Artistic-1.0-Perl|
|Artistic License 2.0|Artistic-2.0|
-|BSD 2-clause "Simplified" License|BSD-2-Clause|
-|BSD 2-clause FreeBSD License|BSD-2-Clause-FreeBSD|
-|BSD 2-clause NetBSD License|BSD-2-Clause-NetBSD|
-|BSD 3-clause "New" or "Revised" License|BSD-3-Clause|
-|BSD 3-clause Clear License|BSD-3-Clause-Clear|
-|BSD 4-clause "Original" or "Old" License|BSD-4-Clause|
-|BSD Protection License|BSD-Protection|
+|BSD 2-Clause "Simplified" License|BSD-2-Clause|
+|BSD 2-Clause FreeBSD License|BSD-2-Clause-FreeBSD|
+|BSD 2-Clause NetBSD License|BSD-2-Clause-NetBSD|
+|BSD 3-Clause "New" or "Revised" License|BSD-3-Clause|
|BSD with attribution|BSD-3-Clause-Attribution|
+|BSD 3-Clause Clear License|BSD-3-Clause-Clear|
+|BSD 4-Clause "Original" or "Old" License|BSD-4-Clause|
|BSD-4-Clause (University of California-Specific)|BSD-4-Clause-UC|
-|GNU General Public License v1.0 only|GPL-1.0|
-|GNU General Public License v1.0 or later|GPL-1.0+|
-|GNU General Public License v2.0 only|GPL-2.0|
-|GNU General Public License v2.0 or later|GPL-2.0+|
-|GNU General Public License v3.0 only|GPL-3.0|
-|GNU General Public License v3.0 or later|GPL-3.0+|
-|GNU Lesser General Public License v2.1 only|LGPL-2.1|
-|GNU Lesser General Public License v2.1 or later|LGPL-2.1+|
-|GNU Lesser General Public License v3.0 only|LGPL-3.0|
-|GNU Lesser General Public License v3.0 or later|LGPL-3.0+|
-|GNU Library General Public License v2 only|LGPL-2.0|
-|GNU Library General Public License v2 or later|LGPL-2.0+|
+|BSD Protection License|BSD-Protection|
+|GNU General Public License v1.0 only|GPL-1.0-only|
+|GNU General Public License v1.0 or later|GPL-1.0-or-later|
+|GNU General Public License v2.0 only|GPL-2.0-only|
+|GNU General Public License v2.0 or later|GPL-2.0-or-later|
+|GNU General Public License v3.0 only|GPL-3.0-only|
+|GNU General Public License v3.0 or later|GPL-3.0-or-later|
+|GNU Lesser General Public License v2.1 only|LGPL-2.1-only|
+|GNU Lesser General Public License v2.1 or later|LGPL-2.1-or-later|
+|GNU Lesser General Public License v3.0 only|LGPL-3.0-only|
+|GNU Lesser General Public License v3.0 or later|LGPL-3.0-or-later|
+|GNU Library General Public License v2 only|LGPL-2.0-only|
+|GNU Library General Public License v2 or later|LGPL-2.0-or-later|
|Fair License|Fair|
|ISC License|ISC|
|MIT License|MIT|
--- /dev/null
+diff --git a/Makefile b/Makefile
+index 3bf5929..e065577 100644
+--- a/Makefile
++++ b/Makefile
+@@ -32,7 +32,7 @@ VERS = $(shell ./atop -V 2>/dev/null| sed -e 's/^[^ ]* //' -e 's/ .*//')
+ all: atop atopsar atopacctd atopconvert
+
+ atop: atop.o $(ALLMODS) Makefile
+- $(CC) -c version.c
++ $(CC) $(CFLAGS) -c version.c
+ $(CC) atop.o $(ALLMODS) -o atop -lncurses -lz -lm -lrt $(LDFLAGS)
+
+ atopsar: atop
+@@ -45,7 +45,7 @@ atopconvert: atopconvert.o
+ $(CC) atopconvert.o -o atopconvert -lz $(LDFLAGS)
+
+ netlink.o: netlink.c
+- $(CC) -I. -Wall -c netlink.c
++ $(CC) $(CFLAGS) -I. -Wall -c netlink.c
+
+ clean:
+ rm -f *.o atop atopacctd atopconvert
include $(TOPDIR)/rules.mk
PKG_NAME:=netdata
-PKG_VERSION:=1.11.1
-PKG_RELEASE:=1
-PKG_MAINTAINER:=
+PKG_VERSION:=1.14.0
+PKG_RELEASE:=2
+
+PKG_MAINTAINER:=Josef Schlehofer <pepe.schlehofer@gmail.com>, Daniel Engberg <daniel.engberg.lists@pyret.net>
PKG_LICENSE:=GPL-3.0+
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:my-netdata:netdata
PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/netdata/netdata/releases/download/v$(PKG_VERSION)
-PKG_HASH:=0150b2a060da0e5cc844bd9540d6704cd352c434ea1bb9d5268131830a815736
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)_rolling
+PKG_HASH:=f3768f6927e3712dce73794c6943a12f4454410c872eb3dfd19af4f52296187a
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-v$(PKG_VERSION)
PKG_INSTALL:=1
PKG_FIXUP:=autoreconf
netdata is a highly optimized Linux daemon providing real-time performance
monitoring for Linux systems, applications and SNMP devices over the web.
- If you want to use Python plugins install python3, python3-yaml and
- python3-urllib3 however urllib3 isn't packaged yet (needs a PR on GitHub)
+ If you want to use Python plugins install python3, python3-yaml and
+ python3-urllib3
endef
TARGET_CFLAGS := $(filter-out -O%,$(TARGET_CFLAGS))
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/netdata $(1)/usr/sbin
$(INSTALL_DIR) $(1)/usr/share/netdata
$(CP) $(PKG_INSTALL_DIR)/usr/share/netdata $(1)/usr/share
- rm -rf $(1)/usr/share/netdata/web/images
rm $(1)/usr/share/netdata/web/demo*html
rm $(1)/usr/share/netdata/web/fonts/*.svg
rm $(1)/usr/share/netdata/web/fonts/*.ttf
rm $(1)/usr/share/netdata/web/fonts/*.woff
+ rm $(1)/usr/share/netdata/web/images/*.png
+ rm $(1)/usr/share/netdata/web/images/*.gif
+ rm $(1)/usr/share/netdata/web/images/*.ico
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/netdata.init $(1)/etc/init.d/netdata
endef
APPBINARY=/usr/sbin/netdata
CONFIGFILE=/etc/netdata/netdata.conf
- start_service() {
+start_service() {
mkdir -m 0755 -p /var/cache/netdata
chown nobody /var/cache/netdata
mkdir -m 0755 -p /var/lib/netdata
procd_set_param file $CONFIGFILE
procd_set_param respawn
procd_close_instance
- }
+}
--- a/collectors/python.d.plugin/python.d.plugin.in
+++ b/collectors/python.d.plugin/python.d.plugin.in
-@@ -1,6 +1,4 @@
+@@ -1,10 +1,4 @@
-#!/usr/bin/env bash
--'''':; exec "$(command -v python || command -v python3 || command -v python2 ||
+-'''':;
+-if [[ "$OSTYPE" == "darwin"* ]]; then
+- export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
+-fi
+-exec "$(command -v python || command -v python3 || command -v python2 ||
-echo "ERROR python IS NOT AVAILABLE IN THIS SYSTEM")" "$0" "$@" # '''
+#!/usr/bin/python3
-
+
# -*- coding: utf-8 -*-
# Description:
include $(TOPDIR)/rules.mk
PKG_NAME:=sudo
-PKG_VERSION:=1.8.26
+PKG_VERSION:=1.8.27
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://www.sudo.ws/dist
-PKG_HASH:=40da219a6f0341ccb22d04a98988e27f09b831d2561b14c6154067a49ef3fee2
+PKG_HASH:=7beb68b94471ef56d8a1036dbcdc09a7b58a949a68ffce48b83f837dd33e2ec0
+PKG_MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
PKG_LICENSE:=ISC
PKG_LICENSE_FILES:=doc/LICENSE
PKG_CPE_ID:=cpe:/a:todd_miller:sudo
CATEGORY:=Administration
TITLE:=Delegate authority to run commands
URL:=https://www.sudo.ws/
- MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
endef
define Package/sudo/description
include $(TOPDIR)/rules.mk
PKG_NAME:=syslog-ng
-PKG_VERSION:=3.19.1
-PKG_RELEASE:=2
+PKG_VERSION:=3.22.1
+PKG_RELEASE:=1
-PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
+PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>
PKG_LICENSE:=LGPL-2.1+
PKG_LICENSE_FILES:=COPYING
PKG_CPE_ID:=cpe:/a:balabit:syslog-ng
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/balabit/syslog-ng/releases/download/$(PKG_NAME)-$(PKG_VERSION)/
-PKG_HASH:=5cf931a9d7bead0e6d9a2c65eee8f6005a005878f59aa280f3c4294257ed5178
+PKG_HASH:=0656443776fa554320cb81bbebeac72bdf871298dd2ebef7413c393aec4d74c8
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
endef
CONFIGURE_ARGS += \
+ --disable-snmp-dest \
$(call autoconf_bool,CONFIG_IPV6,ipv6) \
--disable-tcp-wrapper \
--disable-spoof-source \
--disable-redis \
--disable-dependency-tracking \
--disable-python \
+ --disable-geoip2 \
--disable-java \
--disable-java-modules \
--with-librabbitmq-client=no \
# OpenWrt syslog-ng.conf specific file
# which collects all local logs into a single file called /var/log/messages.
# More details about these settings can be found here:
-# https://www.syslog-ng.com/technical-documents/doc/syslog-ng-open-source-edition/3.16/release-notes/global-options
+# https://www.syslog-ng.com/technical-documents/list/syslog-ng-open-source-edition
-@version: 3.19
+@version: 3.22
@include "scl.conf"
@include "/etc/syslog-ng.d/" # Put any customization files in this directory
#!/bin/sh /etc/rc.common
-# Copyright (C) 2006-2016 OpenWrt.org
+# Copyright (C) 2006-2019 OpenWrt.org
START=50
start_service() {
[ -f /etc/syslog-ng.conf ] || return 1
procd_open_instance
- procd_set_param command /usr/sbin/syslog-ng
+ procd_set_param command /usr/sbin/syslog-ng --foreground
procd_close_instance
}
-
-reload_service() {
- stop
- start
-}
include $(TOPDIR)/rules.mk
PKG_NAME:=zabbix
-PKG_VERSION:=4.0.3
-PKG_RELEASE:=1
+PKG_VERSION:=4.0.6
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=6b3d3b23c72a7af1958dc0938a566be03f0424cb44df5b2a9f487428f32d0463
PKG_SOURCE_URL:=@SF/zabbix
+PKG_HASH:=2890851b3a4b0f70f69ef754aa0d07070b42440f56d280113a9474bc4ed75e5b
+PKG_MAINTAINER:=Etienne CHAMPETIER <champetier.etienne@gmail.com>
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING
PKG_CPE_ID:=cpe:/a:zabbix:zabbix
define Package/zabbix/Default
SECTION:=admin
CATEGORY:=Administration
+ SUBMENU:=zabbix
TITLE:=Zabbix
URL:=https://www.zabbix.com/
- SUBMENU:=zabbix
- MAINTAINER:=Etienne CHAMPETIER <champetier.etienne@gmail.com>
USERID:=zabbix=53:zabbix=53
DEPENDS += $(ICONV_DEPENDS) +libpcre +zlib +ZABBIX_GNUTLS:libgnutls +ZABBIX_OPENSSL:libopenssl
endef
$(if $(CONFIG_ZABBIX_POSTGRESQL),--with-postgresql) \
--with-libevent=$(STAGING_DIR)/usr/include/libevent \
--with-libpcre=$(STAGING_DIR)/usr/include \
+ --with-zlib=$(STAGING_DIR)/usr/include \
$(if $(CONFIG_ZABBIX_GNUTLS),--with-gnutls="$(STAGING_DIR)/usr") \
$(if $(CONFIG_ZABBIX_OPENSSL),--with-openssl="$(STAGING_DIR)/usr")
### Option: LogFileSize
# Maximum size of log file in MB.
# 0 - disable automatic log rotation.
-@@ -116,6 +113,7 @@ Server=127.0.0.1
+@@ -117,6 +114,7 @@ Server=127.0.0.1
# Range: 0-100
# Default:
# StartAgents=3
##### Active checks related
-@@ -131,8 +129,6 @@ Server=127.0.0.1
+@@ -132,8 +130,6 @@ Server=127.0.0.1
# Default:
# ServerActive=
### Option: Hostname
# Unique, case sensitive hostname.
# Required for active checks and must match hostname as configured on the server.
-@@ -142,8 +138,6 @@ ServerActive=127.0.0.1
+@@ -143,8 +139,6 @@ ServerActive=127.0.0.1
# Default:
# Hostname=
### Option: HostnameItem
# Item used for generating Hostname if it is undefined. Ignored if Hostname is defined.
# Does not support UserParameters or aliases.
-@@ -261,8 +255,8 @@ Hostname=Zabbix server
+@@ -262,8 +256,8 @@ Hostname=Zabbix server
# Include=
# Include=/usr/local/etc/zabbix_agentd.userparams.conf
--- a/src/libs/zbxcommon/str.c
+++ b/src/libs/zbxcommon/str.c
-@@ -52,7 +52,7 @@ static const char help_message_footer[]
+@@ -54,7 +54,7 @@ static const char help_message_footer[]
void version(void)
{
printf("%s (Zabbix) %s\n", title_message, ZABBIX_VERSION);
- printf("Revision %s %s, compilation time: %s %s\n\n", ZABBIX_REVISION, ZABBIX_REVDATE, __DATE__, __TIME__);
+ printf("Revision %s %s\n\n", ZABBIX_REVISION, ZABBIX_REVDATE);
puts(copyright_message);
- }
-
+ #if defined(HAVE_POLARSSL) || defined(HAVE_GNUTLS) || defined(HAVE_OPENSSL)
+ printf("\n");
--- /dev/null
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=asu
+PKG_VERSION:=0.2.3
+PKG_RELEASE=2
+
+PKG_LICENSE:=GPL-3.0
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/a/asu/
+PKG_HASH:=e60027cd531cc5b9b20d3321acc06fdf0cdd894004919800575b8235343ba8ef
+
+PKG_BUILD_DEPENDS:=python3
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+include $(INCLUDE_DIR)/package.mk
+include ../../lang/python/python3-package.mk
+
+IMAGEBUILDER_DEPENDS:= \
+ @x86_64 +bash +bzip2 +coreutils +coreutils-stat +diffutils +file \
+ +gawk +gcc +getopt +git +git-http +libncurses +make +patch +perl \
+ +perlbase-attributes +perlbase-findbin +perlbase-getopt \
+ +perlbase-thread +python-light +tar +unzip +wget +xz +xzdiff \
+ +xzgrep +xzless +xz-utils +zlib-dev
+
+define Package/asu
+ SECTION:=devel
+ CATEGORY:=Development
+ TITLE:=attended sysupgrade image server
+ MAINTAINER:=Paul Spooren <paul@spooren.de>
+ URL:=http://github.com/aparcar/gsoc17-attended-sysupgrade/
+ DEPENDS:=$(IMAGEBUILDER_DEPENDS) +pgsql-server +psqlodbcw \
+ +python3-ctypes +python3-distutils +python3-flask \
+ +gunicorn +python3-openssl +python3-pyodbc +python3-yaml \
+ +libustream-mbedtls +ca-certificates +gnupg
+ USERID:=asu:asu
+ VARIANT:=python3
+endef
+
+define Package/asu/description
+ Build server to deliver OpenWrt/LEDE sysupgrade images
+endef
+
+define Py3Package/asu/install
+ $(INSTALL_DIR) $(1)/etc/uci-defaults
+ $(INSTALL_BIN) ./files/asu.defaults $(1)/etc/uci-defaults/99-asu
+ $(INSTALL_DIR) $(1)/etc/init.d
+ $(INSTALL_BIN) ./files/asu.init $(1)/etc/init.d/asu
+ $(INSTALL_DIR) $(1)/etc/asu
+ $(INSTALL_CONF) $(PKG_BUILD_DIR)/asu/utils/config.yml.default $(1)/etc/asu/config.yml
+endef
+
+$(eval $(call Py3Package,asu))
+$(eval $(call BuildPackage,asu))
--- /dev/null
+#!/bin/sh
+
+asu_password=$(dd if=/dev/urandom bs=16 count=1 2>/dev/null | sha256sum | cut -d' ' -f1)
+asu_tables="$(ls -1 /usr/lib/python*/site-packages/asu/utils/tables.sql | head -n 1)"
+
+uci -q batch <<EOF
+ del postgresql.asu
+ set postgresql.asu=postgres-db
+ set postgresql.asu.name=asu
+ set postgresql.asu.user=asu
+ set postgresql.asu.pass='$asu_password'
+ set postgresql.asu.script='$asu_tables'
+ commit postgresql
+EOF
+
+sed -i "s/database_user.*/database_user: asu/" /etc/asu/config.yml
+sed -i "s/database_pass.*/database_pass: $asu_password/" /etc/asu/config.yml
+
+cp -r /usr/lib/python*/site-packages/asu/utils/distributions /etc/asu/
+
+chown -R root:asu /etc/asu
+chmod -R g+rX /etc/asu
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=99
+STOP=01
+
+USE_PROCD=1
+PROG=/usr/bin/flask
+
+start_service() {
+ . /lib/functions/postgresql.sh
+
+ local pgdata=$(uci get postgresql.config.PGDATA)
+ local i=0
+
+ while ! pg_server_ready "$pgdata"; do
+ sleep 1
+ [ $((i++)) -gt 30 ] && return 1
+ done
+
+ i=0
+ while ! pg_test_db asu asu; do
+ sleep 1
+ [ $((i++)) -gt 30 ] && return 1
+ done
+
+ FLASK_APP=asu $PROG loaddb
+
+ procd_open_instance asu_main
+ procd_set_param user asu
+ procd_set_param group asu
+ procd_set_param command gunicorn asu:app
+ procd_close_instance
+
+ procd_open_instance main_worker
+ procd_set_param user asu
+ procd_set_param group asu
+ procd_set_param env FLASK_APP=asu
+ procd_set_param command $PROG run_worker
+ procd_close_instance
+}
PKG_NAME:=diffutils
PKG_VERSION:=3.7
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@GNU/diffutils
DEPENDS:=+USE_GLIBC:librt
TITLE:=diffutils
URL:=http://www.gnu.org/software/diffutils/
+ ALTERNATIVES:=\
+ 200:/usr/bin/cmp:/usr/bin/gnu-cmp \
+ 200:/usr/bin/diff:/usr/bin/gnu-diff \
+
endef
define Package/diffutils/description
define Package/diffutils/install
$(INSTALL_DIR) $(1)/usr/bin
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{sdiff,diff3,diff,cmp} $(1)/usr/bin/
-endef
-
-define Package/diffutils/preinst
-#!/bin/sh
-for x in sdiff diff3 diff cmp; do
- [ -L "$${IPKG_INSTROOT}/usr/bin/$$x" ] && rm -f "$${IPKG_INSTROOT}/usr/bin/$$x"
-done
-exit 0
-endef
-
-define Package/diffutils/postrm
-#!/bin/sh
-for x in sdiff diff3 diff cmp; do
- /bin/busybox $$x -h 2>&1 | grep -q BusyBox && ln -sf ../../bin/busybox /usr/bin/$$x
-done
-exit 0
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{sdiff,diff3} $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/diff $(1)/usr/bin/gnu-diff
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/cmp $(1)/usr/bin/gnu-cmp
endef
$(eval $(call BuildPackage,diffutils))
include $(TOPDIR)/rules.mk
PKG_NAME:=lttng-tools
-PKG_VERSION:=2.6.0
+PKG_VERSION:=2.10.6
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://lttng.org/files/$(PKG_NAME)/
-PKG_HASH:=128166445126d76da7d9f42a56dec12716732a1ed697a6cfdf40c9e135384f32
+PKG_HASH:=f05df52bbebf8ce88d1b29e9e98cfc957d2ed738a345118018237ebdb581537c
+PKG_MAINTAINER:=
PKG_LICENSE:=LGPL-2.1 GPL-2.0
PKG_LICENSE_FILES:=COPYING
-PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org>
-PKG_FIXUP:=autoreconf
PKG_USE_MIPS16:=0
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
DEPENDS:= +lttng-ust +libpopt +libxml2
endef
-CONFIGURE_ARGS += --disable-kmod
+TARGET_CFLAGS += $(FPIC)
-TARGET_LDFLAGS += -lurcu-bp
-
-MAKE_FLAGS += V="$(V)"
+CONFIGURE_ARGS += \
+ --enable-epoll \
+ --without-kmod \
+ --without-pic
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
--- /dev/null
+From e0212fb3278ca54ac6d3beecf990297670f2612f Mon Sep 17 00:00:00 2001
+From: Kai Kang <kai.kang@windriver.com>
+Date: Thu, 13 Dec 2018 10:55:36 +0800
+Subject: [PATCH] Fix: compile fails for x32 arch
+
+It fails to compile for x32 arch:
+
+| .../src/common/utils.c: Assembler messages:
+| .../src/common/utils.c:1026: Error: register type mismatch for `bsr'
+| .../src/common/utils.c:1028: Error: operand type mismatch for `movq'
+
+Add macro check that not to define that fls_u64() for x32.
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+---
+ src/bin/lttng/utils.c | 2 +-
+ src/common/utils.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/bin/lttng/utils.c b/src/bin/lttng/utils.c
+index 0e96ef0c3..5c79c8c7e 100644
+--- a/src/bin/lttng/utils.c
++++ b/src/bin/lttng/utils.c
+@@ -158,7 +158,7 @@ unsigned int fls_u32(uint32_t x)
+ #define HAS_FLS_U32
+ #endif
+
+-#if defined(__x86_64)
++#if defined(__x86_64) && !defined(__ILP32__)
+ static inline
+ unsigned int fls_u64(uint64_t x)
+ {
+diff --git a/src/common/utils.c b/src/common/utils.c
+index 08139e5e2..3c3899819 100644
+--- a/src/common/utils.c
++++ b/src/common/utils.c
+@@ -1223,7 +1223,7 @@ static inline unsigned int fls_u32(uint32_t x)
+ #define HAS_FLS_U32
+ #endif
+
+-#if defined(__x86_64)
++#if defined(__x86_64) && !defined(__ILP32__)
+ static inline
+ unsigned int fls_u64(uint64_t x)
+ {
--- /dev/null
+From 10e8001ad876d8cb3b5a17c7492e713bbc047975 Mon Sep 17 00:00:00 2001
+From: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
+Date: Thu, 28 Mar 2019 18:31:29 -0400
+Subject: [PATCH] Fix: getgrnam is not MT-Safe, use getgrnam_r
+
+Running the test suite under a Yocto musl build resulted in musl
+coredump due to double freeing.
+
+We get the following backtraces:
+
+0 a_crash () at ./arch/x86_64/atomic_arch.h:108
+1 unmap_chunk (self=<optimized out>) at src/malloc/malloc.c:515
+2 free (p=<optimized out>) at src/malloc/malloc.c:526
+3 0x00007f46d9dc3849 in __getgrent_a (f=f@entry=0x7f46d9d1f7e0, gr=gr@entry=0x7f46d9e24460 <gr>, line=line@entry=0x7f46d9e26058 <line>, size=size@entry=0x7f46d92db550, mem=mem@entry=0x7f46d9e26050 <mem>, nmem=nmem@entry=0x7f46d92db558, res=0x7f46d92db548) at src/passwd/getgrent_a.c:45
+4 0x00007f46d9dc2e6b in __getgr_a (name=0x487242 "tracing", gid=gid@entry=0, gr=gr@entry=0x7f46d9e24460 <gr>, buf=buf@entry=0x7f46d9e26058 <line>, size=size@entry=0x7f46d92db550, mem=mem@entry=0x7f46d9e26050 <mem>, nmem=0x7f46d92db558, res=0x7f46d92db548) at src/passwd/getgr_a.c:30
+5 0x00007f46d9dc3733 in getgrnam (name=<optimized out>) at src/passwd/getgrent.c:37
+6 0x0000000000460b29 in utils_get_group_id (name=<optimized out>) at ../../../lttng-tools-2.10.6/src/common/utils.c:1241
+7 0x000000000044ee69 in thread_manage_health (data=<optimized out>) at ../../../../lttng-tools-2.10.6/src/bin/lttng-sessiond/main.c:4115
+8 0x00007f46d9de1541 in start (p=<optimized out>) at src/thread/pthread_create.c:195
+9 0x00007f46d9dee661 in __clone () at src/thread/x86_64/clone.s:22
+
+From another run:
+
+0 a_crash () at ./arch/x86_64/atomic_arch.h:108
+1 unmap_chunk (self=<optimized out>) at src/malloc/malloc.c:515
+2 free (p=<optimized out>) at src/malloc/malloc.c:526
+3 0x00007f5abc210849 in __getgrent_a (f=f@entry=0x7f5abc2733e0, gr=gr@entry=0x7f5abc271460 <gr>, line=line@entry=0x7f5abc273058 <line>, size=size@entry=0x7f5abaef5510, mem=mem@entry=0x7f5abc273050 <mem>, nmem=nmem@entry=0x7f5abaef5518, res=0x7f5abaef5508) at src/passwd/getgrent_a.c:45
+4 0x00007f5abc20fe6b in __getgr_a (name=0x487242 "tracing", gid=gid@entry=0, gr=gr@entry=0x7f5abc271460 <gr>, buf=buf@entry=0x7f5abc273058 <line>, size=size@entry=0x7f5abaef5510, mem=mem@entry=0x7f5abc273050 <mem>, nmem=0x7f5abaef5518, res=0x7f5abaef5508) at src/passwd/getgr_a.c:30
+5 0x00007f5abc210733 in getgrnam (name=<optimized out>) at src/passwd/getgrent.c:37
+6 0x0000000000460b29 in utils_get_group_id (name=<optimized out>) at ../../../lttng-tools-2.10.6/src/common/utils.c:1241
+7 0x000000000042dee4 in notification_channel_socket_create () at ../../../../lttng-tools-2.10.6/src/bin/lttng-sessiond/notification-thread.c:238
+8 init_thread_state (state=0x7f5abaef5560, handle=0x7f5abbf9be40) at ../../../../lttng-tools-2.10.6/src/bin/lttng-sessiond/notification-thread.c:375
+9 thread_notification (data=0x7f5abbf9be40) at ../../../../lttng-tools-2.10.6/src/bin/lttng-sessiond/notification-thread.c:495
+10 0x00007f5abc22e541 in start (p=<optimized out>) at src/thread/pthread_create.c:195
+11 0x00007f5abc23b661 in __clone () at src/thread/x86_64/clone.s:22
+
+The problem was easily reproducible (~6 crash on ~300 runs). A prototype fix
+using mutex around the getgrnam yielded no crash in over 1000 runs. This
+patch yielded the same results as the prototype fix.
+
+Unfortunately we cannot rely on a mutex in liblttng-ctl since we cannot
+enforce the locking for the application using the lib.
+
+Use getgrnam_r instead.
+
+The previous implementation of utils_get_group_id returned the gid of
+the root group (0) on error/not found. lttng_check_tracing_group needs
+to know if an error/not found occured, returning the root group is not
+enough. We now return the gid via the passed parameter. The caller is
+responsible for either defaulting to the root group or propagating the
+error.
+
+We also do not want to warn when used in liblttng-ctl context. We might
+want to move the warning elsewhere in the future. For now, pass a bool
+if we need to warn or not.
+
+Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
+---
+ src/bin/lttng-consumerd/health-consumerd.c | 10 ++-
+ src/bin/lttng-relayd/health-relayd.c | 20 ++++--
+ src/bin/lttng-sessiond/main.c | 24 +++++--
+ src/bin/lttng-sessiond/notification-thread.c | 10 ++-
+ src/common/utils.c | 75 +++++++++++++++++---
+ src/common/utils.h | 4 +-
+ src/lib/lttng-ctl/lttng-ctl.c | 8 +--
+ 7 files changed, 122 insertions(+), 29 deletions(-)
+
+diff --git a/src/bin/lttng-consumerd/health-consumerd.c b/src/bin/lttng-consumerd/health-consumerd.c
+index 1e2f31e4..6045401a 100644
+--- a/src/bin/lttng-consumerd/health-consumerd.c
++++ b/src/bin/lttng-consumerd/health-consumerd.c
+@@ -184,8 +184,14 @@ void *thread_manage_health(void *data)
+ is_root = !getuid();
+ if (is_root) {
+ /* lttng health client socket path permissions */
+- ret = chown(health_unix_sock_path, 0,
+- utils_get_group_id(tracing_group_name));
++ gid_t gid;
++
++ ret = utils_get_group_id(tracing_group_name, true, &gid);
++ if (ret) {
++ gid = 0; /* Default to root group. */
++ }
++
++ ret = chown(health_unix_sock_path, 0, gid);
+ if (ret < 0) {
+ ERR("Unable to set group on %s", health_unix_sock_path);
+ PERROR("chown");
+diff --git a/src/bin/lttng-relayd/health-relayd.c b/src/bin/lttng-relayd/health-relayd.c
+index ba996621..962e88c4 100644
+--- a/src/bin/lttng-relayd/health-relayd.c
++++ b/src/bin/lttng-relayd/health-relayd.c
+@@ -105,8 +105,14 @@ static int create_lttng_rundir_with_perm(const char *rundir)
+ int is_root = !getuid();
+
+ if (is_root) {
+- ret = chown(rundir, 0,
+- utils_get_group_id(tracing_group_name));
++ gid_t gid;
++
++ ret = utils_get_group_id(tracing_group_name, true, &gid);
++ if (ret) {
++ gid = 0; /* Default to root group.*/
++ }
++
++ ret = chown(rundir, 0, gid);
+ if (ret < 0) {
+ ERR("Unable to set group on %s", rundir);
+ PERROR("chown");
+@@ -256,8 +262,14 @@ void *thread_manage_health(void *data)
+ is_root = !getuid();
+ if (is_root) {
+ /* lttng health client socket path permissions */
+- ret = chown(health_unix_sock_path, 0,
+- utils_get_group_id(tracing_group_name));
++ gid_t gid;
++
++ ret = utils_get_group_id(tracing_group_name, true, &gid);
++ if (ret) {
++ gid = 0; /* Default to root group */
++ }
++
++ ret = chown(health_unix_sock_path, 0, gid);
+ if (ret < 0) {
+ ERR("Unable to set group on %s", health_unix_sock_path);
+ PERROR("chown");
+diff --git a/src/bin/lttng-sessiond/main.c b/src/bin/lttng-sessiond/main.c
+index fa6fa483..49307064 100644
+--- a/src/bin/lttng-sessiond/main.c
++++ b/src/bin/lttng-sessiond/main.c
+@@ -4112,8 +4112,14 @@ static void *thread_manage_health(void *data)
+
+ if (is_root) {
+ /* lttng health client socket path permissions */
+- ret = chown(config.health_unix_sock_path.value, 0,
+- utils_get_group_id(config.tracing_group_name.value));
++ gid_t gid;
++
++ ret = utils_get_group_id(config.tracing_group_name.value, true, &gid);
++ if (ret) {
++ gid = 0; /* Default to root group */
++ }
++
++ ret = chown(config.health_unix_sock_path.value, 0, &gid);
+ if (ret < 0) {
+ ERR("Unable to set group on %s", config.health_unix_sock_path.value);
+ PERROR("chown");
+@@ -5238,7 +5244,10 @@ static int set_permissions(char *rundir)
+ int ret;
+ gid_t gid;
+
+- gid = utils_get_group_id(config.tracing_group_name.value);
++ ret = utils_get_group_id(config.tracing_group_name.value, true, &gid);
++ if (ret) {
++ gid = 0; /* Default to root group */
++ }
+
+ /* Set lttng run dir */
+ ret = chown(rundir, 0, gid);
+@@ -5349,7 +5358,14 @@ static int set_consumer_sockets(struct consumer_data *consumer_data)
+ goto error;
+ }
+ if (is_root) {
+- ret = chown(path, 0, utils_get_group_id(config.tracing_group_name.value));
++ gid_t gid;
++
++ ret = utils_get_group_id(config.tracing_group_name.value, true, &gid);
++ if (ret) {
++ gid = 0; /* Default to root group */
++ }
++
++ ret = chown(path, 0, gid);
+ if (ret < 0) {
+ ERR("Unable to set group on %s", path);
+ PERROR("chown");
+diff --git a/src/bin/lttng-sessiond/notification-thread.c b/src/bin/lttng-sessiond/notification-thread.c
+index 92ac597f..18a264d9 100644
+--- a/src/bin/lttng-sessiond/notification-thread.c
++++ b/src/bin/lttng-sessiond/notification-thread.c
+@@ -235,8 +235,14 @@ int notification_channel_socket_create(void)
+ }
+
+ if (getuid() == 0) {
+- ret = chown(sock_path, 0,
+- utils_get_group_id(config.tracing_group_name.value));
++ gid_t gid;
++
++ ret = utils_get_group_id(config.tracing_group_name.value, true, &gid);
++ if (ret) {
++ gid = 0; /* Default to root group. */
++ }
++
++ ret = chown(sock_path, 0, gid);
+ if (ret) {
+ ERR("Failed to set the notification channel socket's group");
+ ret = -1;
+diff --git a/src/common/utils.c b/src/common/utils.c
+index c0bb031e..778bc00f 100644
+--- a/src/common/utils.c
++++ b/src/common/utils.c
+@@ -1231,24 +1231,77 @@ size_t utils_get_current_time_str(const char *format, char *dst, size_t len)
+ }
+
+ /*
+- * Return the group ID matching name, else 0 if it cannot be found.
++ * Return 0 on success and set *gid to the group_ID matching the passed name.
++ * Else -1 if it cannot be found or an error occurred.
+ */
+ LTTNG_HIDDEN
+-gid_t utils_get_group_id(const char *name)
++int utils_get_group_id(const char *name, bool warn, gid_t *gid)
+ {
+- struct group *grp;
++ static volatile int warn_once;
+
+- grp = getgrnam(name);
+- if (!grp) {
+- static volatile int warn_once;
++ int ret;
++ long sys_len;
++ size_t len;
++ struct group grp;
++ struct group *result;
++ char *buffer = NULL;
+
+- if (!warn_once) {
+- WARN("No tracing group detected");
+- warn_once = 1;
++ /* Get the system limit if it exists */
++ sys_len = sysconf(_SC_GETGR_R_SIZE_MAX);
++ if (sys_len == -1) {
++ len = 1024;
++ } else {
++ len = (size_t) sys_len;
++ }
++
++ buffer = malloc(len);
++ if (!buffer) {
++ PERROR("getgrnam_r malloc");
++ ret = -1;
++ goto error;
++ }
++
++ while ((ret = getgrnam_r(name, &grp, buffer, len, &result)) == ERANGE)
++ {
++ /* Buffer is not big enough, increase its size. */
++ size_t new_len = 2 * len;
++ char *new_buffer = NULL;
++ if (new_len < len) {
++ ERR("getgrnam_r buffer size overflow");
++ ret = -1;
++ goto error;
++ }
++ len = new_len;
++ new_buffer = realloc(buffer, len);
++ if (!new_buffer) {
++ PERROR("getgrnam_r realloc");
++ ret = -1;
++ goto error;
+ }
+- return 0;
++ buffer = new_buffer;
++ }
++ if (ret != 0) {
++ PERROR("getgrnam_r");
++ ret = -1;
++ goto error;
++ }
++
++ /* Group not found. */
++ if (!result) {
++ ret = -1;
++ goto error;
++ }
++
++ *gid = result->gr_gid;
++ ret = 0;
++
++error:
++ free(buffer);
++ if (ret && warn && !warn_once) {
++ WARN("No tracing group detected");
++ warn_once = 1;
+ }
+- return grp->gr_gid;
++ return ret;
+ }
+
+ /*
+diff --git a/src/common/utils.h b/src/common/utils.h
+index 18f19ef1..9c72431d 100644
+--- a/src/common/utils.h
++++ b/src/common/utils.h
+@@ -22,6 +22,8 @@
+ #include <unistd.h>
+ #include <stdint.h>
+ #include <getopt.h>
++#include <stdbool.h>
++#include <sys/types.h>
+
+ #define KIBI_LOG2 10
+ #define MEBI_LOG2 20
+@@ -52,7 +54,7 @@ int utils_get_count_order_u64(uint64_t x);
+ char *utils_get_home_dir(void);
+ char *utils_get_user_home_dir(uid_t uid);
+ size_t utils_get_current_time_str(const char *format, char *dst, size_t len);
+-gid_t utils_get_group_id(const char *name);
++int utils_get_group_id(const char *name, bool warn, gid_t *gid);
+ char *utils_generate_optstring(const struct option *long_options,
+ size_t opt_count);
+ int utils_create_lock_file(const char *filepath);
+diff --git a/src/lib/lttng-ctl/lttng-ctl.c b/src/lib/lttng-ctl/lttng-ctl.c
+index 2d84aad9..561b0bcf 100644
+--- a/src/lib/lttng-ctl/lttng-ctl.c
++++ b/src/lib/lttng-ctl/lttng-ctl.c
+@@ -208,15 +208,13 @@ end:
+ LTTNG_HIDDEN
+ int lttng_check_tracing_group(void)
+ {
+- struct group *grp_tracing; /* no free(). See getgrnam(3) */
+- gid_t *grp_list;
++ gid_t *grp_list, tracing_gid;
+ int grp_list_size, grp_id, i;
+ int ret = -1;
+ const char *grp_name = tracing_group;
+
+ /* Get GID of group 'tracing' */
+- grp_tracing = getgrnam(grp_name);
+- if (!grp_tracing) {
++ if (utils_get_group_id(grp_name, false, &tracing_gid)) {
+ /* If grp_tracing is NULL, the group does not exist. */
+ goto end;
+ }
+@@ -241,7 +239,7 @@ int lttng_check_tracing_group(void)
+ }
+
+ for (i = 0; i < grp_list_size; i++) {
+- if (grp_list[i] == grp_tracing->gr_gid) {
++ if (grp_list[i] == tracing_gid) {
+ ret = 1;
+ break;
+ }
+--
+2.17.1
+
+++ /dev/null
---- a/src/common/compat/poll.h
-+++ b/src/common/compat/poll.h
-@@ -55,6 +55,10 @@ static inline void __lttng_poll_free(voi
- #include <features.h>
- #include <common/compat/fcntl.h>
-
-+#ifndef __GLIBC_PREREQ
-+#define __GLIBC_PREREQ(maj, min) (0)
-+#endif
-+
- /* See man epoll(7) for this define path */
- #define COMPAT_EPOLL_PROC_PATH "/proc/sys/fs/epoll/max_user_watches"
-
---- a/src/common/runas.h
-+++ b/src/common/runas.h
-@@ -21,6 +21,7 @@
-
- #include <unistd.h>
- #include <pthread.h>
-+#include <sys/stat.h>
-
- int run_as_mkdir_recursive(const char *path, mode_t mode, uid_t uid, gid_t gid);
- int run_as_mkdir(const char *path, mode_t mode, uid_t uid, gid_t gid);
+++ /dev/null
---- a/src/common/mi-lttng.h
-+++ b/src/common/mi-lttng.h
-@@ -49,133 +49,133 @@ struct mi_lttng_version {
- };
-
- /* Strings related to command */
--const char * const mi_lttng_element_command;
--const char * const mi_lttng_element_command_action;
--const char * const mi_lttng_element_command_add_context;
--const char * const mi_lttng_element_command_calibrate;
--const char * const mi_lttng_element_command_create;
--const char * const mi_lttng_element_command_destroy;
--const char * const mi_lttng_element_command_disable_channel;
--const char * const mi_lttng_element_command_disable_event;
--const char * const mi_lttng_element_command_enable_channels;
--const char * const mi_lttng_element_command_enable_event;
--const char * const mi_lttng_element_command_list;
--const char * const mi_lttng_element_command_load;
--const char * const mi_lttng_element_command_name;
--const char * const mi_lttng_element_command_output;
--const char * const mi_lttng_element_command_save;
--const char * const mi_lttng_element_command_set_session;
--const char * const mi_lttng_element_command_snapshot;
--const char * const mi_lttng_element_command_snapshot_add;
--const char * const mi_lttng_element_command_snapshot_del;
--const char * const mi_lttng_element_command_snapshot_list;
--const char * const mi_lttng_element_command_snapshot_record;
--const char * const mi_lttng_element_command_start;
--const char * const mi_lttng_element_command_stop;
--const char * const mi_lttng_element_command_success;
--const char * const mi_lttng_element_command_version;
-+extern const char * const mi_lttng_element_command;
-+extern const char * const mi_lttng_element_command_action;
-+extern const char * const mi_lttng_element_command_add_context;
-+extern const char * const mi_lttng_element_command_calibrate;
-+extern const char * const mi_lttng_element_command_create;
-+extern const char * const mi_lttng_element_command_destroy;
-+extern const char * const mi_lttng_element_command_disable_channel;
-+extern const char * const mi_lttng_element_command_disable_event;
-+extern const char * const mi_lttng_element_command_enable_channels;
-+extern const char * const mi_lttng_element_command_enable_event;
-+extern const char * const mi_lttng_element_command_list;
-+extern const char * const mi_lttng_element_command_load;
-+extern const char * const mi_lttng_element_command_name;
-+extern const char * const mi_lttng_element_command_output;
-+extern const char * const mi_lttng_element_command_save;
-+extern const char * const mi_lttng_element_command_set_session;
-+extern const char * const mi_lttng_element_command_snapshot;
-+extern const char * const mi_lttng_element_command_snapshot_add;
-+extern const char * const mi_lttng_element_command_snapshot_del;
-+extern const char * const mi_lttng_element_command_snapshot_list;
-+extern const char * const mi_lttng_element_command_snapshot_record;
-+extern const char * const mi_lttng_element_command_start;
-+extern const char * const mi_lttng_element_command_stop;
-+extern const char * const mi_lttng_element_command_success;
-+extern const char * const mi_lttng_element_command_version;
-
- /* Strings related to version command */
--const char * const mi_lttng_element_version;
--const char * const mi_lttng_element_version_commit;
--const char * const mi_lttng_element_version_description;
--const char * const mi_lttng_element_version_license;
--const char * const mi_lttng_element_version_major;
--const char * const mi_lttng_element_version_minor;
--const char * const mi_lttng_element_version_patch_level;
--const char * const mi_lttng_element_version_str;
--const char * const mi_lttng_element_version_web;
-+extern const char * const mi_lttng_element_version;
-+extern const char * const mi_lttng_element_version_commit;
-+extern const char * const mi_lttng_element_version_description;
-+extern const char * const mi_lttng_element_version_license;
-+extern const char * const mi_lttng_element_version_major;
-+extern const char * const mi_lttng_element_version_minor;
-+extern const char * const mi_lttng_element_version_patch_level;
-+extern const char * const mi_lttng_element_version_str;
-+extern const char * const mi_lttng_element_version_web;
-
- /* String related to a lttng_event_field */
--const char * const mi_lttng_element_event_field;
--const char * const mi_lttng_element_event_fields;
-+extern const char * const mi_lttng_element_event_field;
-+extern const char * const mi_lttng_element_event_fields;
-
- /* String related to lttng_event_context */
--const char * const mi_lttng_context_type_perf_counter;
--const char * const mi_lttng_context_type_perf_cpu_counter;
--const char * const mi_lttng_context_type_perf_thread_counter;
-+extern const char * const mi_lttng_context_type_perf_counter;
-+extern const char * const mi_lttng_context_type_perf_cpu_counter;
-+extern const char * const mi_lttng_context_type_perf_thread_counter;
-
- /* String related to lttng_event_perf_counter_ctx */
--const char * const mi_lttng_element_perf_counter_context;
-+extern const char * const mi_lttng_element_perf_counter_context;
-
- /* Strings related to pid */
--const char * const mi_lttng_element_pids;
--const char * const mi_lttng_element_pid;
--const char * const mi_lttng_element_pid_id;
-+extern const char * const mi_lttng_element_pids;
-+extern const char * const mi_lttng_element_pid;
-+extern const char * const mi_lttng_element_pid_id;
-
- /* Strings related to save command */
--const char * const mi_lttng_element_save;
-+extern const char * const mi_lttng_element_save;
-
- /* Strings related to load command */
--const char * const mi_lttng_element_load;
-+extern const char * const mi_lttng_element_load;
-
- /* General element of mi_lttng */
--const char * const mi_lttng_element_empty;
--const char * const mi_lttng_element_id;
--const char * const mi_lttng_element_nowrite;
--const char * const mi_lttng_element_success;
--const char * const mi_lttng_element_type_enum;
--const char * const mi_lttng_element_type_float;
--const char * const mi_lttng_element_type_integer;
--const char * const mi_lttng_element_type_other;
--const char * const mi_lttng_element_type_string;
-+extern const char * const mi_lttng_element_empty;
-+extern const char * const mi_lttng_element_id;
-+extern const char * const mi_lttng_element_nowrite;
-+extern const char * const mi_lttng_element_success;
-+extern const char * const mi_lttng_element_type_enum;
-+extern const char * const mi_lttng_element_type_float;
-+extern const char * const mi_lttng_element_type_integer;
-+extern const char * const mi_lttng_element_type_other;
-+extern const char * const mi_lttng_element_type_string;
-
- /* String related to loglevel */
--const char * const mi_lttng_loglevel_str_alert;
--const char * const mi_lttng_loglevel_str_crit;
--const char * const mi_lttng_loglevel_str_debug;
--const char * const mi_lttng_loglevel_str_debug_function;
--const char * const mi_lttng_loglevel_str_debug_line;
--const char * const mi_lttng_loglevel_str_debug_module;
--const char * const mi_lttng_loglevel_str_debug_process;
--const char * const mi_lttng_loglevel_str_debug_program;
--const char * const mi_lttng_loglevel_str_debug_system;
--const char * const mi_lttng_loglevel_str_debug_unit;
--const char * const mi_lttng_loglevel_str_emerg;
--const char * const mi_lttng_loglevel_str_err;
--const char * const mi_lttng_loglevel_str_info;
--const char * const mi_lttng_loglevel_str_notice;
--const char * const mi_lttng_loglevel_str_unknown;
--const char * const mi_lttng_loglevel_str_warning;
-+extern const char * const mi_lttng_loglevel_str_alert;
-+extern const char * const mi_lttng_loglevel_str_crit;
-+extern const char * const mi_lttng_loglevel_str_debug;
-+extern const char * const mi_lttng_loglevel_str_debug_function;
-+extern const char * const mi_lttng_loglevel_str_debug_line;
-+extern const char * const mi_lttng_loglevel_str_debug_module;
-+extern const char * const mi_lttng_loglevel_str_debug_process;
-+extern const char * const mi_lttng_loglevel_str_debug_program;
-+extern const char * const mi_lttng_loglevel_str_debug_system;
-+extern const char * const mi_lttng_loglevel_str_debug_unit;
-+extern const char * const mi_lttng_loglevel_str_emerg;
-+extern const char * const mi_lttng_loglevel_str_err;
-+extern const char * const mi_lttng_loglevel_str_info;
-+extern const char * const mi_lttng_loglevel_str_notice;
-+extern const char * const mi_lttng_loglevel_str_unknown;
-+extern const char * const mi_lttng_loglevel_str_warning;
-
- /* String related to loglevel JUL */
--const char * const mi_lttng_loglevel_str_jul_all;
--const char * const mi_lttng_loglevel_str_jul_config;
--const char * const mi_lttng_loglevel_str_jul_fine;
--const char * const mi_lttng_loglevel_str_jul_finer;
--const char * const mi_lttng_loglevel_str_jul_finest;
--const char * const mi_lttng_loglevel_str_jul_info;
--const char * const mi_lttng_loglevel_str_jul_off;
--const char * const mi_lttng_loglevel_str_jul_severe;
--const char * const mi_lttng_loglevel_str_jul_warning;
-+extern const char * const mi_lttng_loglevel_str_jul_all;
-+extern const char * const mi_lttng_loglevel_str_jul_config;
-+extern const char * const mi_lttng_loglevel_str_jul_fine;
-+extern const char * const mi_lttng_loglevel_str_jul_finer;
-+extern const char * const mi_lttng_loglevel_str_jul_finest;
-+extern const char * const mi_lttng_loglevel_str_jul_info;
-+extern const char * const mi_lttng_loglevel_str_jul_off;
-+extern const char * const mi_lttng_loglevel_str_jul_severe;
-+extern const char * const mi_lttng_loglevel_str_jul_warning;
-
- /* String related to loglevel Log4j */
--const char * const mi_lttng_loglevel_str_log4j_off;
--const char * const mi_lttng_loglevel_str_log4j_fatal;
--const char * const mi_lttng_loglevel_str_log4j_error;
--const char * const mi_lttng_loglevel_str_log4j_warn;
--const char * const mi_lttng_loglevel_str_log4j_info;
--const char * const mi_lttng_loglevel_str_log4j_debug;
--const char * const mi_lttng_loglevel_str_log4j_trace;
--const char * const mi_lttng_loglevel_str_log4j_all;
-+extern const char * const mi_lttng_loglevel_str_log4j_off;
-+extern const char * const mi_lttng_loglevel_str_log4j_fatal;
-+extern const char * const mi_lttng_loglevel_str_log4j_error;
-+extern const char * const mi_lttng_loglevel_str_log4j_warn;
-+extern const char * const mi_lttng_loglevel_str_log4j_info;
-+extern const char * const mi_lttng_loglevel_str_log4j_debug;
-+extern const char * const mi_lttng_loglevel_str_log4j_trace;
-+extern const char * const mi_lttng_loglevel_str_log4j_all;
-
- /* String related to loglevel type */
--const char * const mi_lttng_loglevel_type_all;
--const char * const mi_lttng_loglevel_type_range;
--const char * const mi_lttng_loglevel_type_single;
--const char * const mi_lttng_loglevel_type_unknown;
-+extern const char * const mi_lttng_loglevel_type_all;
-+extern const char * const mi_lttng_loglevel_type_range;
-+extern const char * const mi_lttng_loglevel_type_single;
-+extern const char * const mi_lttng_loglevel_type_unknown;
-
- /* Sting related to lttng_calibrate */
--const char * const mi_lttng_element_calibrate;
--const char * const mi_lttng_element_calibrate_function;
-+extern const char * const mi_lttng_element_calibrate;
-+extern const char * const mi_lttng_element_calibrate_function;
-
- /* String related to a lttng_snapshot */
--const char * const mi_lttng_element_snapshot_ctrl_url;
--const char * const mi_lttng_element_snapshot_data_url;
--const char * const mi_lttng_element_snapshot_max_size;
--const char * const mi_lttng_element_snapshot_n_ptr;
--const char * const mi_lttng_element_snapshot_session_name;
--const char * const mi_lttng_element_snapshots;
-+extern const char * const mi_lttng_element_snapshot_ctrl_url;
-+extern const char * const mi_lttng_element_snapshot_data_url;
-+extern const char * const mi_lttng_element_snapshot_max_size;
-+extern const char * const mi_lttng_element_snapshot_n_ptr;
-+extern const char * const mi_lttng_element_snapshot_session_name;
-+extern const char * const mi_lttng_element_snapshots;
-
- /* Utility string function */
- const char *mi_lttng_loglevel_string(int value, enum lttng_domain_type domain);
---- a/src/common/config/config-session-abi.h
-+++ b/src/common/config/config-session-abi.h
-@@ -18,95 +18,95 @@
- #ifndef CONFIG_SESSION_INTERNAL_H
- #define CONFIG_SESSION_INTERNAL_H
-
--const char * const config_element_channel;
--const char * const config_element_channels;
--const char * const config_element_domain;
--const char * const config_element_domains;
--const char * const config_element_event;
--const char * const config_element_events;
--const char * const config_element_context;
--const char * const config_element_contexts;
--const char * const config_element_attributes;
--const char * const config_element_exclusion;
--const char * const config_element_exclusions;
--const char * const config_element_function_attributes;
--const char * const config_element_probe_attributes;
--const char * const config_element_symbol_name;
--const char * const config_element_address;
--const char * const config_element_offset;
--const char * const config_element_name;
--const char * const config_element_enabled;
--const char * const config_element_overwrite_mode;
--const char * const config_element_subbuf_size;
--const char * const config_element_num_subbuf;
--const char * const config_element_switch_timer_interval;
--const char * const config_element_read_timer_interval;
--const char * const config_element_output;
--const char * const config_element_output_type;
--const char * const config_element_tracefile_size;
--const char * const config_element_tracefile_count;
--const char * const config_element_live_timer_interval;
--const char * const config_element_type;
--const char * const config_element_buffer_type;
--const char * const config_element_session;
--const char * const config_element_sessions;
--const char * const config_element_perf;
--const char * const config_element_config;
--const char * const config_element_started;
--const char * const config_element_snapshot_mode;
--const char * const config_element_loglevel;
--const char * const config_element_loglevel_type;
--const char * const config_element_filter;
--const char * const config_element_snapshot_outputs;
--const char * const config_element_consumer_output;
--const char * const config_element_destination;
--const char * const config_element_path;
--const char * const config_element_net_output;
--const char * const config_element_control_uri;
--const char * const config_element_data_uri;
--const char * const config_element_max_size;
--
--const char * const config_domain_type_kernel;
--const char * const config_domain_type_ust;
--const char * const config_domain_type_jul;
--const char * const config_domain_type_log4j;
--
--const char * const config_buffer_type_per_pid;
--const char * const config_buffer_type_per_uid;
--const char * const config_buffer_type_global;
--
--const char * const config_overwrite_mode_discard;
--const char * const config_overwrite_mode_overwrite;
--
--const char * const config_output_type_splice;
--const char * const config_output_type_mmap;
--
--const char * const config_loglevel_type_all;
--const char * const config_loglevel_type_range;
--const char * const config_loglevel_type_single;
--
--const char * const config_event_type_all;
--const char * const config_event_type_tracepoint;
--const char * const config_event_type_probe;
--const char * const config_event_type_function;
--const char * const config_event_type_function_entry;
--const char * const config_event_type_noop;
--const char * const config_event_type_syscall;
--const char * const config_event_type_kprobe;
--const char * const config_event_type_kretprobe;
--
--const char * const config_event_context_pid;
--const char * const config_event_context_procname;
--const char * const config_event_context_prio;
--const char * const config_event_context_nice;
--const char * const config_event_context_vpid;
--const char * const config_event_context_tid;
--const char * const config_event_context_vtid;
--const char * const config_event_context_ppid;
--const char * const config_event_context_vppid;
--const char * const config_event_context_pthread_id;
--const char * const config_event_context_hostname;
--const char * const config_event_context_ip;
--const char * const config_event_context_perf_thread_counter;
-+extern const char * const config_element_channel;
-+extern const char * const config_element_channels;
-+extern const char * const config_element_domain;
-+extern const char * const config_element_domains;
-+extern const char * const config_element_event;
-+extern const char * const config_element_events;
-+extern const char * const config_element_context;
-+extern const char * const config_element_contexts;
-+extern const char * const config_element_attributes;
-+extern const char * const config_element_exclusion;
-+extern const char * const config_element_exclusions;
-+extern const char * const config_element_function_attributes;
-+extern const char * const config_element_probe_attributes;
-+extern const char * const config_element_symbol_name;
-+extern const char * const config_element_address;
-+extern const char * const config_element_offset;
-+extern const char * const config_element_name;
-+extern const char * const config_element_enabled;
-+extern const char * const config_element_overwrite_mode;
-+extern const char * const config_element_subbuf_size;
-+extern const char * const config_element_num_subbuf;
-+extern const char * const config_element_switch_timer_interval;
-+extern const char * const config_element_read_timer_interval;
-+extern const char * const config_element_output;
-+extern const char * const config_element_output_type;
-+extern const char * const config_element_tracefile_size;
-+extern const char * const config_element_tracefile_count;
-+extern const char * const config_element_live_timer_interval;
-+extern const char * const config_element_type;
-+extern const char * const config_element_buffer_type;
-+extern const char * const config_element_session;
-+extern const char * const config_element_sessions;
-+extern const char * const config_element_perf;
-+extern const char * const config_element_config;
-+extern const char * const config_element_started;
-+extern const char * const config_element_snapshot_mode;
-+extern const char * const config_element_loglevel;
-+extern const char * const config_element_loglevel_type;
-+extern const char * const config_element_filter;
-+extern const char * const config_element_snapshot_outputs;
-+extern const char * const config_element_consumer_output;
-+extern const char * const config_element_destination;
-+extern const char * const config_element_path;
-+extern const char * const config_element_net_output;
-+extern const char * const config_element_control_uri;
-+extern const char * const config_element_data_uri;
-+extern const char * const config_element_max_size;
-+
-+extern const char * const config_domain_type_kernel;
-+extern const char * const config_domain_type_ust;
-+extern const char * const config_domain_type_jul;
-+extern const char * const config_domain_type_log4j;
-+
-+extern const char * const config_buffer_type_per_pid;
-+extern const char * const config_buffer_type_per_uid;
-+extern const char * const config_buffer_type_global;
-+
-+extern const char * const config_overwrite_mode_discard;
-+extern const char * const config_overwrite_mode_overwrite;
-+
-+extern const char * const config_output_type_splice;
-+extern const char * const config_output_type_mmap;
-+
-+extern const char * const config_loglevel_type_all;
-+extern const char * const config_loglevel_type_range;
-+extern const char * const config_loglevel_type_single;
-+
-+extern const char * const config_event_type_all;
-+extern const char * const config_event_type_tracepoint;
-+extern const char * const config_event_type_probe;
-+extern const char * const config_event_type_function;
-+extern const char * const config_event_type_function_entry;
-+extern const char * const config_event_type_noop;
-+extern const char * const config_event_type_syscall;
-+extern const char * const config_event_type_kprobe;
-+extern const char * const config_event_type_kretprobe;
-+
-+extern const char * const config_event_context_pid;
-+extern const char * const config_event_context_procname;
-+extern const char * const config_event_context_prio;
-+extern const char * const config_event_context_nice;
-+extern const char * const config_event_context_vpid;
-+extern const char * const config_event_context_tid;
-+extern const char * const config_event_context_vtid;
-+extern const char * const config_event_context_ppid;
-+extern const char * const config_event_context_vppid;
-+extern const char * const config_event_context_pthread_id;
-+extern const char * const config_event_context_hostname;
-+extern const char * const config_event_context_ip;
-+extern const char * const config_event_context_perf_thread_counter;
-
- #endif /* CONFIG_SESSION_INTERNAL_H */
PKG_NAME:=make
PKG_VERSION:=4.2.1
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_SOURCE_URL:=@GNU/make
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/make $(1)/usr/bin/
endef
+CONFIGURE_VARS += ac_cv_lib_elf_elf_begin=no
+
# provide gnumake.h at build time for other packages
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
--- /dev/null
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=cifsd
+PKG_RELEASE:=1
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/cifsd-team/cifsd.git
+PKG_SOURCE_DATE:=2019-07-12
+PKG_SOURCE_VERSION:=f2cfe8cb40493a5f77144543bc486bfdb8aa61e2
+PKG_MIRROR_HASH:=fd6a3bec5953fa30b87a6e12e2c6666844ad66096afa7de421689f5769626a36
+
+PKG_MAINTAINER:=Andy Walsh <andy.walsh44+github@gmail.com>
+PKG_LICENSE:=GPL-2.0-or-later
+PKG_LICENSE_FILES:=COPYING
+
+include $(INCLUDE_DIR)/kernel.mk
+include $(INCLUDE_DIR)/package.mk
+
+define KernelPackage/fs-cifsd
+ SUBMENU:=Filesystems
+ TITLE:=CIFS/SMB kernel server support
+ URL:=https://github.com/cifsd-team/cifsd
+ FILES:=$(PKG_BUILD_DIR)/cifsd.ko
+ DEPENDS:= \
+ +kmod-nls-base \
+ +kmod-nls-utf8 \
+ +kmod-crypto-md4 \
+ +kmod-crypto-md5 \
+ +kmod-crypto-hmac \
+ +kmod-crypto-ecb \
+ +kmod-crypto-des \
+ +kmod-crypto-sha256 \
+ +kmod-crypto-cmac \
+ +kmod-crypto-sha512 \
+ +kmod-crypto-aead \
+ +kmod-crypto-ccm
+endef
+
+define KernelPackage/fs-cifsd/description
+ Kernel module for a CIFS/SMBv2,3 fileserver.
+endef
+
+# broken atm (needs CONFIG_KEYS=y)
+#EXTRA_CFLAGS+=-DCONFIG_CIFSD_ACL
+
+define Build/Compile
+ $(KERNEL_MAKE) SUBDIRS="$(PKG_BUILD_DIR)" \
+ EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
+ CONFIG_CIFS_SERVER=m \
+ modules
+endef
+
+$(eval $(call KernelPackage,fs-cifsd))
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=pf-ring
-PKG_VERSION:=7.2.0
+PKG_VERSION:=7.4.0
PKG_RELEASE:=1
-PKG_MAINTAINER:=Banglang Huang <banglang.huang@foxmail.com>
-PKG_LICENSE:=GPL-2.0
+PKG_MAINTAINER:=Banglang Huang <banglang.huang@foxmail.com>
+PKG_LICENSE:=GPL-2.0-only
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/ntop/PF_RING/tar.gz/$(PKG_VERSION)?
-PKG_HASH:=5d349ac37a6ece5966bf606a6f131d628b98d88654c2f502d3c4b8bbf6ef9796
-
+PKG_HASH:=e1c9cb44d8072854220f493c56fa5cba99a6b8336883939dc18b3e30c2954b68
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/PF_RING-$(PKG_VERSION)
+PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
--- /dev/null
+#
+# Copyright (C) 2019 Jerônimo Cordoni Pellegrini <j_p@aleph0.info>
+#
+# This file is free software, licensed under the GNU General Public License v3
+# or later.
+# See /LICENSE for details
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=chicken-scheme-interpreter
+PKG_VERSION=5.1.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=chicken-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://code.call-cc.org/releases/$(PKG_VERSION)/
+PKG_HASH:=5c1101a8d8faabfd500ad69101e0c7c8bd826c68970f89c270640470e7b84b4b
+PKG_BUILD_DIR:=$(BUILD_DIR)/chicken-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Jeronimo Pellegrini <j_p@aleph0.info>
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=LICENSE
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/chicken-scheme-interpreter
+ SECTION:=lang
+ CATEGORY:=Languages
+ TITLE:=Chicken Scheme
+ URL:=https://call-cc.org
+ ABI_VERSION:=11
+endef
+
+define Package/chicken-scheme-interpreter/description
+ Chicken is an implementation of the Scheme language. It is portable, efficient, and supports
+ the R5RS and R7RS (work in progress) standards, and many extensions.
+ Chicken can be used as a scripting language to automate tasks.
+ This package contains the interpreter, 'csi', only --
+ the compiler and the package installer are not included because they depend on a C compiler.
+ For more information, please refer to the Chicken Scheme website at https://call-cc.org.
+endef
+
+MAKE_FLAGS += PLATFORM=linux C_COMPILER=$(TARGET_CC) LINKER=$(TARGET_CC) PREFIX=/usr C_COMPILER_OPTIMIZATION_OPTIONS="$(TARGET_CFLAGS)"
+
+# not installed:
+# - csc and chicken, the compiler
+# - the include dir (only useful with the compiler)
+# - install, uninstall, status, and chicken-do, which deal with modules (installation of more modules depends on the compiler)
+# - profiler
+# - feathers, the debugger
+# - libchicken.a, the static library
+define Package/chicken-scheme-interpreter/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_DIR) $(1)/usr/lib/chicken/$(ABI_VERSION)
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/csi $(1)/usr/bin/
+ $(CP) $(PKG_BUILD_DIR)/libchicken.so.$(ABI_VERSION) $(1)/usr/lib/
+ $(CP) $(PKG_BUILD_DIR)/libchicken.so $(1)/usr/lib/
+ $(CP) $(PKG_BUILD_DIR)/*.import.so $(1)/usr/lib/chicken/$(ABI_VERSION)/
+ $(CP) $(PKG_BUILD_DIR)/types.db $(1)/usr/lib/chicken/$(ABI_VERSION)/
+endef
+
+$(eval $(call BuildPackage,chicken-scheme-interpreter))
+
URL:=http://dkolf.de/src/dkjson-lua.fsl/home
MAINTAINER:=Lars Gierth <larsg@systemli.org>
DEPENDS:=+lua
+ PKGARCH:=all
endef
define Package/dkjson/description
PKG_NAME:=erlang
PKG_VERSION:=21.0
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_SOURCE:=otp_src_$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:= http://www.erlang.org/download/
--- /dev/null
+--- a/lib/crypto/c_src/crypto.c
++++ b/lib/crypto/c_src/crypto.c
+@@ -41,6 +41,7 @@
+ #include <openssl/des.h>
+ #endif /* #ifndef OPENSSL_NO_DES */
+ /* #include <openssl/idea.h> This is not supported on the openssl OTP requires */
++#include <openssl/dh.h>
+ #include <openssl/dsa.h>
+ #include <openssl/rsa.h>
+ #include <openssl/aes.h>
+@@ -177,7 +178,7 @@
+ #endif
+
+ #if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,1,0)
+-# ifndef HAS_LIBRESSL
++# if !defined(OPENSSL_NO_CHACHA) || !defined(OPENSSL_NO_POLY1305)
+ # define HAVE_CHACHA20_POLY1305
+ # endif
+ #endif
+@@ -197,8 +198,10 @@
+ /* If OPENSSL_NO_EC is set, there will be an error in ec.h included from engine.h
+ So if EC is disabled, you can't use Engine either....
+ */
++#if !defined(OPENSSL_NO_ENGINE)
+ # define HAS_ENGINE_SUPPORT
+ #endif
++#endif
+
+
+ #if defined(HAS_ENGINE_SUPPORT)
+@@ -910,7 +913,11 @@ static void engine_ctx_dtor(ErlNifEnv* env, struct engine_ctx* ctx) {
+
+ static int verify_lib_version(void)
+ {
++#if OPENSSL_VERSION_NUMBER < PACKED_OPENSSL_VERSION_PLAIN(1,1,0)
+ const unsigned long libv = SSLeay();
++#else
++ const unsigned long libv = OpenSSL_version_num();
++#endif
+ const unsigned long hdrv = OPENSSL_VERSION_NUMBER;
+
+ # define MAJOR_VER(V) ((unsigned long)(V) >> (7*4))
+@@ -1166,12 +1173,14 @@ static int initialize(ErlNifEnv* env, ERL_NIF_TERM load_info)
+ funcp = &get_crypto_callbacks;
+ #endif
+
++#if OPENSSL_VERSION_NUMBER < PACKED_OPENSSL_VERSION_PLAIN(1,1,0)
+ #ifdef OPENSSL_THREADS
+ enif_system_info(&sys_info, sizeof(sys_info));
+ if (sys_info.scheduler_threads > 1) {
+ nlocks = CRYPTO_num_locks();
+ }
+ /* else no need for locks */
++#endif
+ #endif
+
+ ccb = (*funcp)(nlocks);
+@@ -1183,15 +1192,21 @@ static int initialize(ErlNifEnv* env, ERL_NIF_TERM load_info)
+
+ CRYPTO_set_mem_functions(ccb->crypto_alloc, ccb->crypto_realloc, ccb->crypto_free);
+
++#if OPENSSL_VERSION_NUMBER < PACKED_OPENSSL_VERSION_PLAIN(1,1,0)
+ #ifdef OPENSSL_THREADS
+ if (nlocks > 0) {
+ CRYPTO_set_locking_callback(ccb->locking_function);
++#if OPENSSL_VERSION_NUMBER < 0x10000000
+ CRYPTO_set_id_callback(ccb->id_function);
++#else
++ CRYPTO_THREADID_set_callback(ccb->id_function);
++#endif
+ CRYPTO_set_dynlock_create_callback(ccb->dyn_create_function);
+ CRYPTO_set_dynlock_lock_callback(ccb->dyn_lock_function);
+ CRYPTO_set_dynlock_destroy_callback(ccb->dyn_destroy_function);
+ }
+ #endif /* OPENSSL_THREADS */
++#endif
+
+ init_digest_types(env);
+ init_cipher_types(env);
+@@ -1391,7 +1406,11 @@ static ERL_NIF_TERM info_lib(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]
+
+ static const char libname[] = "OpenSSL";
+ unsigned name_sz = strlen(libname);
++#if OPENSSL_VERSION_NUMBER < PACKED_OPENSSL_VERSION_PLAIN(1,1,0)
+ const char* ver = SSLeay_version(SSLEAY_VERSION);
++#else
++ const char* ver = OpenSSL_version(OPENSSL_VERSION);
++#endif
+ unsigned ver_sz = strlen(ver);
+ ERL_NIF_TERM name_term, ver_term;
+ int ver_num = OPENSSL_VERSION_NUMBER;
+--- a/lib/crypto/c_src/crypto_callback.c
++++ b/lib/crypto/c_src/crypto_callback.c
+@@ -83,7 +83,7 @@ static void crypto_free(void* ptr CCB_FILE_LINE_ARGS)
+ enif_free(ptr);
+ }
+
+-
++#if OPENSSL_VERSION_NUMBER < 0x10100000
+ #ifdef OPENSSL_THREADS /* vvvvvvvvvvvvvvv OPENSSL_THREADS vvvvvvvvvvvvvvvv */
+
+ static ErlNifRWLock** lock_vec = NULL; /* Static locks used by openssl */
+@@ -115,10 +115,17 @@ static void locking_function(int mode, int n, const char *file, int line)
+ locking(mode, lock_vec[n]);
+ }
+
++#if OPENSSL_VERSION_NUMBER < 0x10000000
+ static unsigned long id_function(void)
+ {
+ return (unsigned long) enif_thread_self();
+ }
++#else
++static void id_function(CRYPTO_THREADID *id)
++{
++ CRYPTO_THREADID_set_numeric(id, (unsigned long) enif_thread_self());
++}
++#endif
+
+ /* Dynamic locking, not used by current openssl version (0.9.8)
+ */
+@@ -136,6 +143,7 @@ static void dyn_destroy_function(struct CRYPTO_dynlock_value *ptr, const char *f
+ }
+
+ #endif /* ^^^^^^^^^^^^^^^^^^^^^^ OPENSSL_THREADS ^^^^^^^^^^^^^^^^^^^^^^ */
++#endif
+
+ DLLEXPORT struct crypto_callbacks* get_crypto_callbacks(int nlocks)
+ {
+@@ -146,7 +154,8 @@ DLLEXPORT struct crypto_callbacks* get_crypto_callbacks(int nlocks)
+ &crypto_alloc,
+ &crypto_realloc,
+ &crypto_free,
+-
++
++#if OPENSSL_VERSION_NUMBER < 0x10100000
+ #ifdef OPENSSL_THREADS
+ &locking_function,
+ &id_function,
+@@ -154,9 +163,11 @@ DLLEXPORT struct crypto_callbacks* get_crypto_callbacks(int nlocks)
+ &dyn_lock_function,
+ &dyn_destroy_function
+ #endif /* OPENSSL_THREADS */
++#endif
+ };
+
+ if (!is_initialized) {
++#if OPENSSL_VERSION_NUMBER < 0x10100000
+ #ifdef OPENSSL_THREADS
+ if (nlocks > 0) {
+ int i;
+@@ -169,6 +180,7 @@ DLLEXPORT struct crypto_callbacks* get_crypto_callbacks(int nlocks)
+ if (lock_vec[i]==NULL) return NULL;
+ }
+ }
++#endif
+ #endif
+ is_initialized = 1;
+ }
+--- a/lib/crypto/c_src/crypto_callback.h
++++ b/lib/crypto/c_src/crypto_callback.h
+@@ -34,9 +34,15 @@ struct crypto_callbacks
+ void (*crypto_free)(void* ptr CCB_FILE_LINE_ARGS);
+
+ /* openssl callbacks */
++#if OPENSSL_VERSION_NUMBER < 0x10100000
+ #ifdef OPENSSL_THREADS
+ void (*locking_function)(int mode, int n, const char *file, int line);
++ #if OPENSSL_VERSION_NUMBER < 0x10000000
+ unsigned long (*id_function)(void);
++ #else
++ void (*id_function)(CRYPTO_THREADID *id);
++ #endif
++#endif
+ struct CRYPTO_dynlock_value* (*dyn_create_function)(const char *file,
+ int line);
+ void (*dyn_lock_function)(int mode, struct CRYPTO_dynlock_value* ptr,
+--- a/lib/crypto/c_src/otp_test_engine.c
++++ b/lib/crypto/c_src/otp_test_engine.c
+@@ -42,8 +42,10 @@
+ && !defined(OPENSSL_NO_EC) \
+ && !defined(OPENSSL_NO_ECDH) \
+ && !defined(OPENSSL_NO_ECDSA)
++#if !defined(OPENSSL_NO_ENGINE)
+ # define HAVE_EC
+ #endif
++#endif
+
+ #if defined(HAVE_EC)
+ /* If OPENSSL_NO_EC is set, there will be an error in ec.h included from engine.h
+++ /dev/null
---- a/lib/crypto/c_src/crypto.c
-+++ b/lib/crypto/c_src/crypto.c
-@@ -41,6 +41,7 @@
- #include <openssl/des.h>
- #endif /* #ifndef OPENSSL_NO_DES */
- /* #include <openssl/idea.h> This is not supported on the openssl OTP requires */
-+#include <openssl/dh.h>
- #include <openssl/dsa.h>
- #include <openssl/rsa.h>
- #include <openssl/aes.h>
-@@ -197,8 +198,10 @@
- /* If OPENSSL_NO_EC is set, there will be an error in ec.h included from engine.h
- So if EC is disabled, you can't use Engine either....
- */
-+#if !defined(OPENSSL_NO_ENGINE)
- # define HAS_ENGINE_SUPPORT
- #endif
-+#endif
-
-
- #if defined(HAS_ENGINE_SUPPORT)
-@@ -1186,7 +1189,11 @@ static int initialize(ErlNifEnv* env, ERL_NIF_TERM load_info)
- #ifdef OPENSSL_THREADS
- if (nlocks > 0) {
- CRYPTO_set_locking_callback(ccb->locking_function);
-+#if OPENSSL_VERSION_NUMBER < 0x10000000
- CRYPTO_set_id_callback(ccb->id_function);
-+#else
-+ CRYPTO_THREADID_set_callback(ccb->id_function);
-+#endif
- CRYPTO_set_dynlock_create_callback(ccb->dyn_create_function);
- CRYPTO_set_dynlock_lock_callback(ccb->dyn_lock_function);
- CRYPTO_set_dynlock_destroy_callback(ccb->dyn_destroy_function);
---- a/lib/crypto/c_src/crypto_callback.c
-+++ b/lib/crypto/c_src/crypto_callback.c
-@@ -115,10 +115,17 @@ static void locking_function(int mode, int n, const char *file, int line)
- locking(mode, lock_vec[n]);
- }
-
-+#if OPENSSL_VERSION_NUMBER < 0x10000000
- static unsigned long id_function(void)
- {
- return (unsigned long) enif_thread_self();
- }
-+#else
-+static void id_function(CRYPTO_THREADID *id)
-+{
-+ CRYPTO_THREADID_set_numeric(id, (unsigned long) enif_thread_self());
-+}
-+#endif
-
- /* Dynamic locking, not used by current openssl version (0.9.8)
- */
---- a/lib/crypto/c_src/crypto_callback.h
-+++ b/lib/crypto/c_src/crypto_callback.h
-@@ -36,7 +36,11 @@ struct crypto_callbacks
- /* openssl callbacks */
- #ifdef OPENSSL_THREADS
- void (*locking_function)(int mode, int n, const char *file, int line);
-+ #if OPENSSL_VERSION_NUMBER < 0x10000000
- unsigned long (*id_function)(void);
-+ #else
-+ void (*id_function)(CRYPTO_THREADID *id);
-+ #endif
- struct CRYPTO_dynlock_value* (*dyn_create_function)(const char *file,
- int line);
- void (*dyn_lock_function)(int mode, struct CRYPTO_dynlock_value* ptr,
---- a/lib/crypto/c_src/otp_test_engine.c
-+++ b/lib/crypto/c_src/otp_test_engine.c
-@@ -42,8 +42,10 @@
- && !defined(OPENSSL_NO_EC) \
- && !defined(OPENSSL_NO_ECDH) \
- && !defined(OPENSSL_NO_ECDSA)
-+#if !defined(OPENSSL_NO_ENGINE)
- # define HAVE_EC
- #endif
-+#endif
-
- #if defined(HAVE_EC)
- /* If OPENSSL_NO_EC is set, there will be an error in ec.h included from engine.h
+++ /dev/null
-#
-# Copyright (C) 2018 Jeffery To
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=golang-github-agl-ed25519
-PKG_RELEASE:=1
-
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/agl/ed25519.git
-PKG_SOURCE_VERSION:=5312a61534124124185d41f09206b9fef1d88403
-PKG_SOURCE_DATE:=20170117
-PKG_MIRROR_HASH:=be9e9223e7a15f4c12d9f652f5a50a59c01fd1f87ee73bea0ebfd661b5a7ca9c
-
-PKG_LICENSE:=BSD-3-Clause
-PKG_LICENSE_FILES:=LICENSE
-PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
-
-PKG_BUILD_DEPENDS:=golang/host
-PKG_BUILD_PARALLEL:=1
-
-GO_PKG:=github.com/agl/ed25519
-GO_PKG_SOURCE_ONLY:=1
-
-include $(INCLUDE_DIR)/package.mk
-include ../golang-package.mk
-
-define Package/golang-github-agl-ed25519-dev
-$(call GoPackage/GoSubMenu)
- TITLE:=Ed25519 signature algorithm for Go
- URL:=https://github.com/agl/ed25519
- DEPENDS:=$(GO_ARCH_DEPENDS) \
- +golang-golang-x-crypto-dev
- PKGARCH:=all
-endef
-
-define Package/golang-github-agl-ed25519-dev/description
-Ed25519 is a public-key signature system based on elliptic-curve
-cryptography.
-endef
-
-$(eval $(call GoSrcPackage,golang-github-agl-ed25519-dev))
-$(eval $(call BuildPackage,golang-github-agl-ed25519-dev))
+++ /dev/null
-#
-# Copyright (C) 2018 Jeffery To
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=golang-github-dchest-siphash
-PKG_VERSION:=1.2.1
-PKG_RELEASE:=1
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://codeload.github.com/dchest/siphash/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=90c5e8ba62b64b2f76ed58c87dd50456171610049bef51fd71bc593c1744fad2
-PKG_BUILD_DIR:=$(BUILD_DIR)/siphash-$(PKG_VERSION)
-
-PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
-PKG_LICENSE:=CC0-1.0
-PKG_LICENSE_FILES:=README.md
-
-PKG_BUILD_DEPENDS:=golang/host
-PKG_BUILD_PARALLEL:=1
-
-GO_PKG:=github.com/dchest/siphash
-GO_PKG_SOURCE_ONLY:=1
-
-include $(INCLUDE_DIR)/package.mk
-include ../golang-package.mk
-
-define Package/golang-github-dchest-siphash-dev
-$(call GoPackage/GoSubMenu)
- TITLE:=Go implementation of SipHash-2-4
- URL:=https://github.com/dchest/siphash
- DEPENDS:=$(GO_ARCH_DEPENDS)
- PKGARCH:=all
-endef
-
-define Package/golang-github-dchest-siphash-dev/description
-SipHash-2-4 is a pseudorandom function (a.k.a. keyed hash function)
-optimized for speed on short messages.
-endef
-
-$(eval $(call GoSrcPackage,golang-github-dchest-siphash-dev))
-$(eval $(call BuildPackage,golang-github-dchest-siphash-dev))
+++ /dev/null
-#
-# Copyright (C) 2018 Jeffery To
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=golang-golang-x-crypto
-PKG_RELEASE:=1
-
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/golang/crypto.git
-PKG_SOURCE_VERSION:=a49355c7e3f8fe157a85be2f77e6e269a0f89602
-PKG_SOURCE_DATE:=20180620
-PKG_MIRROR_HASH:=80b16b203736ac56883d0610edbc5981eb78f15b7b35d11b5ca639f7c3814214
-
-PKG_LICENSE:=BSD-3-Clause
-PKG_LICENSE_FILES:=LICENSE
-PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
-
-PKG_BUILD_DEPENDS:=golang/host
-PKG_BUILD_PARALLEL:=1
-
-GO_PKG:=golang.org/x/crypto
-GO_PKG_SOURCE_ONLY:=1
-
-include $(INCLUDE_DIR)/package.mk
-include ../golang-package.mk
-
-define Package/golang-golang-x-crypto-dev
-$(call GoPackage/GoSubMenu)
- TITLE:=Go supplementary cryptography libraries
- URL:=https://godoc.org/golang.org/x/crypto
- DEPENDS:=$(GO_ARCH_DEPENDS) \
- +golang-golang-x-net-dev \
- +golang-golang-x-sys-dev
- PKGARCH:=all
-endef
-
-define Package/golang-golang-x-crypto-dev/description
-Supplementary Go cryptography libraries.
-endef
-
-$(eval $(call GoSrcPackage,golang-golang-x-crypto-dev))
-$(eval $(call BuildPackage,golang-golang-x-crypto-dev))
+++ /dev/null
-#
-# Copyright (C) 2018 Jeffery To
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=golang-golang-x-net
-PKG_RELEASE:=1
-
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/golang/net.git
-PKG_SOURCE_VERSION:=afe8f62b1d6bbd81f31868121a50b06d8188e1f9
-PKG_SOURCE_DATE:=20180620
-PKG_MIRROR_HASH:=9a8bb3bf21ea60121d7e87f1bd1af9effbdcd908f758be99457653172d13eb1e
-
-PKG_LICENSE:=BSD-3-Clause
-PKG_LICENSE_FILES:=LICENSE
-PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
-
-PKG_BUILD_DEPENDS:=golang/host
-PKG_BUILD_PARALLEL:=1
-
-GO_PKG:=golang.org/x/net
-# exclude http2/h2i to break circular dependency with golang-golang-x-crypto-dev
-# since there are no other binaries, can skip compilation
-GO_PKG_SOURCE_ONLY:=1
-
-include $(INCLUDE_DIR)/package.mk
-include ../golang-package.mk
-
-define Package/golang-golang-x-net-dev
-$(call GoPackage/GoSubMenu)
- TITLE:=Go supplementary network libraries
- URL:=https://godoc.org/golang.org/x/net
- DEPENDS:=$(GO_ARCH_DEPENDS) +golang-golang-x-text-dev
- PKGARCH:=all
-endef
-
-define Package/golang-golang-x-net-dev/description
-Supplementary Go networking libraries.
-endef
-
-# http2/testdata/draft-ietf-httpbis-http2.xml is a non-free document
-# http2/z_spec_test.go uses http2/testdata/draft-ietf-httpbis-http2.xml
-define Package/golang-golang-x-net-dev/install
- $(call GoPackage/Package/Install/Src,$(1))
-
- rm -f $(1)$(GO_PKG_PATH)/src/$(GO_PKG)/http2/testdata/draft-ietf-httpbis-http2.xml
- rmdir $(1)$(GO_PKG_PATH)/src/$(GO_PKG)/http2/testdata/
-
- rm -f $(1)$(GO_PKG_PATH)/src/$(GO_PKG)/http2/z_spec_test.go
-endef
-
-$(eval $(call GoSrcPackage,golang-golang-x-net-dev))
-$(eval $(call BuildPackage,golang-golang-x-net-dev))
+++ /dev/null
-#
-# Copyright (C) 2018 Jeffery To
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=golang-golang-x-sys
-PKG_RELEASE:=1
-
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/golang/sys.git
-PKG_SOURCE_VERSION:=63fc586f45fe72d95d5240a5d5eb95e6503907d3
-PKG_SOURCE_DATE:=20180621
-PKG_MIRROR_HASH:=3afe7936fb9fb291ef9b9cfa88f51576cdc19abbd34240232ce284958ac7dbaf
-
-PKG_LICENSE:=BSD-3-Clause
-PKG_LICENSE_FILES:=LICENSE
-PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
-
-PKG_BUILD_DEPENDS:=golang/host
-PKG_BUILD_PARALLEL:=1
-
-GO_PKG:=golang.org/x/sys
-GO_PKG_SOURCE_ONLY:=1
-
-include $(INCLUDE_DIR)/package.mk
-include ../golang-package.mk
-
-define Package/golang-golang-x-sys-dev
-$(call GoPackage/GoSubMenu)
- TITLE:=Go packages for interaction with the OS
- URL:=https://godoc.org/golang.org/x/sys
- DEPENDS:=$(GO_ARCH_DEPENDS)
- PKGARCH:=all
-endef
-
-define Package/golang-golang-x-sys-dev/description
-Supplementary Go packages for low-level interactions with the operating
-system.
-endef
-
-$(eval $(call GoSrcPackage,golang-golang-x-sys-dev))
-$(eval $(call BuildPackage,golang-golang-x-sys-dev))
+++ /dev/null
-#
-# Copyright (C) 2018 Jeffery To
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=golang-golang-x-text
-PKG_RELEASE:=1
-
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/golang/text.git
-PKG_SOURCE_VERSION:=5cec4b58c438bd98288aeb248bab2c1840713d21
-PKG_SOURCE_DATE:=20180520
-PKG_MIRROR_HASH:=6c541a59f32f57afa54a2216045ddf16a077f8fe2e823fbbe77723eca04ddddb
-
-PKG_LICENSE:=BSD-3-Clause
-PKG_LICENSE_FILES:=LICENSE
-PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
-
-PKG_BUILD_DEPENDS:=golang/host
-PKG_BUILD_PARALLEL:=1
-
-GO_PKG:=golang.org/x/text
-# exclude gotext (and message/pipeline) to avoid dependency on golang.org/x/tools
-# since there are no other binaries, can skip compilation
-GO_PKG_SOURCE_ONLY:=1
-
-include $(INCLUDE_DIR)/package.mk
-include ../golang-package.mk
-
-define Package/golang-golang-x-text-dev
-$(call GoPackage/GoSubMenu)
- TITLE:=Go text processing support
- URL:=https://godoc.org/golang.org/x/text
- DEPENDS:=$(GO_ARCH_DEPENDS)
- PKGARCH:=all
-endef
-
-define Package/golang-golang-x-text-dev/description
-Supplementary Go libraries for text processing, many involving Unicode.
-endef
-
-$(eval $(call GoSrcPackage,golang-golang-x-text-dev))
-$(eval $(call BuildPackage,golang-golang-x-text-dev))
# files are installed:
#
# * Files with one of these extensions:
-# .go, .c, .cc, .h, .hh, .proto, .s
+# .go, .c, .cc, .cpp, .h, .hh, .hpp, .proto, .s
#
# * Files in any 'testdata' directory
#
+# * go.mod and go.sum, in any directory
+#
# e.g. GO_PKG_INSTALL_EXTRA:=example.toml marshal_test.toml
#
#
# not necessary.
#
# e.g. GO_PKG_GO_GENERATE:=1
+#
+#
+# GO_PKG_GCFLAGS - list of arguments, default empty
+#
+# Additional go tool compile arguments to use when building targets.
+#
+# e.g. GO_PKG_GCFLAGS:=-N -l
+#
+#
+# GO_PKG_LDFLAGS - list of arguments, default empty
+#
+# Additional go tool link arguments to use when building targets.
+#
+# e.g. GO_PKG_LDFLAGS:=-s -w
+#
+#
+# GO_PKG_LDFLAGS_X - list of string variable definitions, default empty
+#
+# Each definition will be passed as the parameter to the -X go tool
+# link argument, i.e. -ldflags "-X importpath.name=value"
+#
+# e.g. GO_PKG_LDFLAGS_X:=main.Version=$(PKG_VERSION) main.BuildStamp=$(SOURCE_DATE_EPOCH)
# Credit for this package build process (GoPackage/Build/Configure and
# GoPackage/Build/Compile) belong to Debian's dh-golang completely.
-# https://anonscm.debian.org/cgit/pkg-go/packages/dh-golang.git
+# https://salsa.debian.org/go-team/packages/dh-golang
# for building packages, not user code
CATEGORY:=Languages
endef
-define GoPackage/Environment
+define GoPackage/Environment/Default
GOOS=$(GO_OS) \
GOARCH=$(GO_ARCH) \
GO386=$(GO_386) \
CGO_CXXFLAGS="$(filter-out $(GO_CFLAGS_TO_REMOVE),$(TARGET_CXXFLAGS))"
endef
+GoPackage/Environment=$(call GoPackage/Environment/Default,)
+
# false if directory does not exist
GoPackage/is_dir_not_empty=$$$$($(FIND) $(1) -maxdepth 0 -type d \! -empty 2>/dev/null)
sed 's|^\./||') ; \
\
if [ "$(GO_PKG_INSTALL_ALL)" != 1 ]; then \
- code=$$$$(echo "$$$$files" | grep '\.\(c\|cc\|go\|h\|hh\|proto\|s\)$$$$') ; \
+ code=$$$$(echo "$$$$files" | grep '\.\(c\|cc\|cpp\|go\|h\|hh\|hpp\|proto\|s\)$$$$') ; \
testdata=$$$$(echo "$$$$files" | grep '\(^\|/\)testdata/') ; \
+ gomod=$$$$(echo "$$$$files" | grep '\(^\|/\)go\.\(mod\|sum\)$$$$') ; \
\
for pattern in $(GO_PKG_INSTALL_EXTRA); do \
extra=$$$$(echo "$$$$extra"; echo "$$$$files" | grep "$$$$pattern") ; \
done ; \
\
- files=$$$$(echo "$$$$code"; echo "$$$$testdata"; echo "$$$$extra") ; \
+ files=$$$$(echo "$$$$code"; echo "$$$$testdata"; echo "$$$$gomod"; echo "$$$$extra") ; \
files=$$$$(echo "$$$$files" | grep -v '^[[:space:]]*$$$$' | sort -u) ; \
fi ; \
\
+ IFS=$$$$'\n' ; \
+ \
echo "Copying files from $(PKG_BUILD_DIR) into $(GO_PKG_BUILD_DIR)/src/$(GO_PKG)" ; \
for file in $$$$files; do \
echo $$$$file ; \
if [ "$(GO_PKG_SOURCE_ONLY)" != 1 ]; then \
echo "Building targets" ; \
case $(GO_ARCH) in \
- arm) installsuffix="-installsuffix v$(GO_ARM)" ;; \
- mips|mipsle) installsuffix="-installsuffix $(GO_MIPS)" ;; \
- mips64|mips64le) installsuffix="-installsuffix $(GO_MIPS64)" ;; \
+ arm) installsuffix="v$(GO_ARM)" ;; \
+ mips|mipsle) installsuffix="$(GO_MIPS)" ;; \
+ mips64|mips64le) installsuffix="$(GO_MIPS64)" ;; \
esac ; \
trimpath="all=-trimpath=$(GO_PKG_BUILD_DIR)" ; \
ldflags="all=-linkmode external -extldflags '$(TARGET_LDFLAGS)'" ; \
+ pkg_gcflags="$(GO_PKG_GCFLAGS)" ; \
+ pkg_ldflags="$(GO_PKG_LDFLAGS)" ; \
+ for def in $(GO_PKG_LDFLAGS_X); do \
+ pkg_ldflags="$$$$pkg_ldflags -X $$$$def" ; \
+ done ; \
go install \
- $$$$installsuffix \
+ $$$${installsuffix:+-installsuffix $$$$installsuffix} \
-gcflags "$$$$trimpath" \
-asmflags "$$$$trimpath" \
-ldflags "$$$$ldflags" \
-v \
+ $$$${pkg_gcflags:+-gcflags "$$$$pkg_gcflags"} \
+ $$$${pkg_ldflags:+-ldflags "$$$$pkg_ldflags"} \
$(1) \
$$$$targets ; \
retval=$$$$? ; \
+++ /dev/null
-#
-# Copyright (C) 2018 Jeffery To
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=golang-torproject-pluggable-transports-goptlib
-PKG_RELEASE:=1
-
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://git.torproject.org/pluggable-transports/goptlib.git
-PKG_SOURCE_VERSION:=7d56ec4f381e8b1aedfda360594e35a5731b5337
-PKG_SOURCE_DATE:=20180320
-PKG_MIRROR_HASH:=ec28d8882e031046efd561764e1b9119376844a1c3d4941e038cfbe32e60b058
-
-PKG_LICENSE:=CC0-1.0
-PKG_LICENSE_FILES:=COPYING
-PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
-
-PKG_BUILD_DEPENDS:=golang/host
-PKG_BUILD_PARALLEL:=1
-
-GO_PKG:=git.torproject.org/pluggable-transports/goptlib.git
-GO_PKG_SOURCE_ONLY:=1
-
-include $(INCLUDE_DIR)/package.mk
-include ../golang-package.mk
-
-define Package/golang-torproject-pluggable-transports-goptlib-dev
-$(call GoPackage/GoSubMenu)
- TITLE:=Tor pluggable transports library for Go
- URL:=https://gitweb.torproject.org/pluggable-transports/goptlib.git/
- DEPENDS:=$(GO_ARCH_DEPENDS)
- PKGARCH:=all
-endef
-
-define Package/golang-torproject-pluggable-transports-goptlib-dev/description
-goptlib is a library for writing Tor pluggable transports in Go.
-endef
-
-$(eval $(call GoSrcPackage,golang-torproject-pluggable-transports-goptlib-dev))
-$(eval $(call BuildPackage,golang-torproject-pluggable-transports-goptlib-dev))
unexport \
- GOARCH GOBIN GOCACHE GODEBUG GOHOSTARCH GOOS GOPATH GORACE GOROOT GOTMPDIR GCCGO \
+ GOARCH GOBIN GOCACHE GOFLAGS GOHOSTARCH GOOS GOPATH GORACE GOROOT GOTMPDIR GCCGO \
+ GOGC GODEBUG GOMAXPROCS GOTRACEBACK \
CGO_ENABLED \
CGO_CFLAGS CGO_CFLAGS_ALLOW CGO_CFLAGS_DISALLOW \
CGO_CPPFLAGS CGO_CPPFLAGS_ALLOW CGO_CPPFLAGS_DISALLOW \
CGO_FFLAGS CGO_FFLAGS_ALLOW CGO_FFLAGS_DISALLOW \
CGO_LDFLAGS CGO_LDFLAGS_ALLOW CGO_LDFLAGS_DISALLOW \
GOARM GO386 GOMIPS GOMIPS64 \
+ GO111MODULE \
GOROOT_FINAL GO_EXTLINK_ENABLED GIT_ALLOW_PROTOCOL \
CC_FOR_TARGET CXX_FOR_TARGET GO_DISTFLAGS GO_GCFLAGS GO_LDFLAGS GOBUILDTIMELOGFILE GOROOT_BOOTSTRAP \
BOOT_GO_GCFLAGS GOEXPERIMENT GOBOOTSTRAP_TOOLEXEC
endif
-GO_VERSION_MAJOR_MINOR:=1.11
-GO_VERSION_PATCH:=5
+GO_VERSION_MAJOR_MINOR:=1.12
+GO_VERSION_PATCH:=6
PKG_SOURCE:=go$(PKG_VERSION).src.tar.gz
PKG_SOURCE_URL:=$(GO_SOURCE_URLS)
-PKG_HASH:=bc1ef02bb1668835db1390a2e478dcbccb5dd16911691af9d75184bbe5aa943e
+PKG_HASH:=c96c5ccc7455638ae1a8b7498a030fe653731c8391c5f8e79590bce72f92b4ca
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
TITLE:=json4lua
URL:=https://github.com/amrhassan/json4lua
DEPENDS:=+lua +luasocket
+ PKGARCH:=all
endef
define Package/json4lua/description
include $(TOPDIR)/rules.mk
PKG_NAME:=ldbus
-PKG_RELEASE:=2
-PKG_MIRROR_HASH:=0e39a80e126a77a937226e49ae0246e1fd4600a03dee6bdee5ac822963a234e1
+PKG_SOURCE_DATE:=2019-03-25
+PKG_SOURCE_VERSION:=345d820b0f34bd35ea01dae633d35ea3cf7faf2a
+PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
-PKG_SOURCE_VERSION:=f4a1464e915a2313c80fb40c5c40b0bee7583677
-PKG_SOURCE_DATE:=2017-10-03
PKG_SOURCE_URL=https://github.com/daurnimator/ldbus
+PKG_MIRROR_HASH:=c0f5d1b34bc8b82d0f70bad23ecaca10ef84730c2c3ea318673b5a941f4dfc85
+
PKG_MAINTAINER:=Enrico Mioso <mrkiko.rs@gmail.com>
PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
PKG_BUILD_DEPENDS:=luarocks/host
CFLAGS="$(TARGET_CFLAGS)" \
LDFLAGS="$(TARGET_LDFLAGS)"
-define Package/ldbus/install
- $(INSTALL_DIR) $(1)/usr/lib/lua
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/ldbus.so $(1)/usr/lib/lua
-endef
-
define Build/Compile
cd $(PKG_BUILD_DIR) && \
luarocks make --pack-binary-rock ldbus-scm-0.rockspec \
+ LUA_LIBDIR=$(STAGING_DIR)/usr/lib/lua \
+ LUA_PKGNAME=lua5.1 \
DBUS_INCDIR=$(STAGING_DIR)/usr/include/dbus-1.0/ \
DBUS_ARCH_INCDIR=$(STAGING_DIR)/usr/lib/dbus-1.0/include \
DBUS_LIBDIR=$(STAGING_DIR)/usr/lib \
CC="$(TARGET_CC)" LD="$(TARGET_CC)"
endef
+define Package/ldbus/install
+ $(INSTALL_DIR) $(1)/usr/lib/lua
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/ldbus.so $(1)/usr/lib/lua
+endef
+
$(eval $(call BuildPackage,ldbus))
TITLE:=lua-bencode
URL:=https://bitbucket.org/wilhelmy/lua-bencode
DEPENDS:=+lua
+ PKGARCH:=all
endef
define Package/lua-bencode/description
--- /dev/null
+#
+# Copyright (C) 2019 Jianhui Zhao
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=lua-ev
+PKG_RELEASE:=1
+
+PKG_SOURCE_URL=https://github.com/brimworks/lua-ev.git
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_DATE=2015-8-4
+PKG_SOURCE_VERSION:=339426fbe528f11cb3cd1af69a88f06bba367981
+PKG_MIRROR_HASH:=fe138f05845d549998443628e1b63e07d797977548a30e75305085cca4b25567
+
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=
+
+PKG_MAINTAINER:=Jianhui Zhao <jianhuizhao329@gmail.com>
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+define Package/lua-ev
+ SUBMENU:=Lua
+ SECTION:=lang
+ CATEGORY:=Languages
+ TITLE:=lua-ev
+ URL:=https://github.com/brimworks/lua-ev
+ DEPENDS:=+lua +libev
+endef
+
+define Package/lua-ev/description
+ Lua integration with libev.
+endef
+
+define Package/lua-ev/install
+ $(INSTALL_DIR) $(1)/usr/lib/lua
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/ev.so $(1)/usr/lib/lua
+endef
+
+$(eval $(call BuildPackage,lua-ev))
PKG_SOURCE:=lua-libmodbus-$(PKG_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=lua-libmodbus-$(PKG_VERSION)
-PKG_SOURCE_URL:=https://codeload.github.com/remakeelectric/lua-libmodbus/tar.gz/v$(PKG_VERSION)?
+PKG_SOURCE_URL:=https://codeload.github.com/etactica/lua-libmodbus/tar.gz/v$(PKG_VERSION)?
PKG_HASH:=90aff3a2cfe7f91f167ad4ea00f55c2aa86cf2aef93d022e3b2cf906a1791254
PKG_SOURCE_VERSION:=v$(PKG_VERSION)
SECTION:=lang
CATEGORY:=Languages
TITLE:=lua-libmodbus
- URL:=https://github.com/remakeelectric/lua-libmodbus
+ URL:=https://github.com/etactica/lua-libmodbus
DEPENDS:=+liblua +libmodbus
endef
TITLE:=Lua-MobDebug
URL:=https://github.com/pkulchenko/MobDebug
DEPENDS:=+lua
+ PKGARCH:=all
endef
define Package/lua-mobdebug/description
TITLE:=Lua WSAPI
URL:=https://keplerproject.github.io/wsapi/
DEPENDS:= +lua
+ PKGARCH:=all
endef
define Package/lua-wsapi/Default/description
TITLE:=Xavante Web Server
URL:=https://keplerproject.github.io/xavante/
DEPENDS:= +lua
+ PKGARCH:=all
endef
define Package/lua-xavante/description
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_MIRROR_HASH:=23b4883aeb4fb90b2d0f338659f33a631f9df7a7e67c54115775a77d4ac3cc59
+PKG_MIRROR_HASH:=f109017711dd77d74a39bd1c0975be7edf726da0265f16496ea468481fac0b85
PKG_SOURCE_URL:=https://github.com/keplerproject/luafilesystem.git
PKG_SOURCE_VERSION:=de87218e9798c4dd1a40d65403d99e9e82e1cfa0
PKG_SOURCE_PROTO:=git
PKG_NAME:=luajit
PKG_VERSION:=2.1.0-beta3
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=LuaJIT-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://luajit.org/download
CATEGORY:=Languages
TITLE:=LuaJIT
URL:=https://www.luajit.org
- DEPENDS:=@(i386||x86_64||arm||armeb||powerpc||mips||mipsel)
+ DEPENDS:=@(i386||x86_64||arm||armeb||aarch64||powerpc||mips||mipsel)
endef
define Package/luajit/description
endef
ifeq ($(HOST_ARCH),x86_64)
- ifeq ($(CONFIG_x86_64),)
+ ifeq ($(CONFIG_ARCH_64BIT),)
HOST_BITS := -m32
endif
endif
CROSS="$(TARGET_CROSS)" \
DPREFIX=$(PKG_INSTALL_DIR)/usr \
PREFIX=/usr \
+ TARGET_SYS=Linux \
TARGET_CFLAGS="$(TARGET_CFLAGS)"
rm -rf $(PKG_INSTALL_DIR)
mkdir -p $(PKG_INSTALL_DIR)
$(MAKE) -C $(PKG_BUILD_DIR) \
DPREFIX=$(PKG_INSTALL_DIR)/usr \
PREFIX=/usr \
+ TARGET_SYS=Linux \
install
endef
CC="$(TARGET_CC)" \
LUA="$(STAGING_DIR_HOSTPKG)/bin/lua" \
LUAC="$(STAGING_DIR_HOSTPKG)/bin/luac" \
+ LUA_FLAGS= \
+ LUA_LIBS=-llua \
OPT_FLAGS="$(TARGET_CFLAGS) -Dpthread_yield=sched_yield"
endef
PKG_NAME:=luarocks
PKG_VERSION:=2.2.2
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_MIRROR_HASH:=e4cf874c9bce34a5accd41daaf51a3213763b8b6f7f658ca4d13a70a7ddb1c0c
do \
sed "1d" src/bin/$$f > src/bin/$$f.bak ;\
- echo "#!$(LUA_BINDIR)/lua$(LUA_SUFFIX)" > src/bin/$$f ;\
-+ echo "#!/usr/bin/env lua" > src/bin/$$f ;\
++ echo "#!/usr/bin/env lua5.1" > src/bin/$$f ;\
echo "package.path = [[$(LUADIR)/?.lua;]]..package.path" | sed "s,//,/,g" >> src/bin/$$f ;\
cat src/bin/$$f.bak >> src/bin/$$f ;\
chmod +x src/bin/$$f ;\
include $(TOPDIR)/rules.mk
PKG_NAME:=luasec
-PKG_VERSION:=0.7
+PKG_VERSION:=0.8
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/brunoos/luasec/tar.gz/luasec-$(PKG_VERSION)?
-PKG_HASH:=2176e95b1d2a72a3235ede5d2aa9838050feee55dade8fdbde4be7fdc66f3a31
+PKG_HASH:=80ef0f41e146c4c4914c910c992043e46f284b134574061556f040ac738f7d27
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_NAME)-$(PKG_VERSION)
MAINTAINER:=W. Michael Petullo <mike@flyn.org>
define Build/Configure
endef
+TARGET_CFLAGS += $(FPIC)
+TARGET_LDFLAGS += $(FPIC)
+
MAKE_FLAGS += \
- INCDIR="$(TARGET_CPPFLAGS) -I." \
- LIBDIR="$(TARGET_LDFLAGS) -L./luasocket" \
+ LD="$(TARGET_CC)" \
+ INC_PATH="" \
+ LIB_PATH="" \
LUACPATH="$(PKG_INSTALL_DIR)/usr/lib/lua" \
LUAPATH="$(PKG_INSTALL_DIR)/usr/lib/lua"
+++ /dev/null
-From 8212b89f1a04023b431d2fc9bc12aca02394698f Mon Sep 17 00:00:00 2001
-From: Bruno Silvestre <bruno.silvestre@gmail.com>
-Date: Fri, 29 Jun 2018 14:02:39 -0300
-Subject: [PATCH 1/3] Using 'const SSL_METHOD*'
-
-This change was introduced in OpenSSL 1.0.0.
-Start droping 0.9.8 code.
----
- src/context.c | 10 ++--------
- 1 file changed, 2 insertions(+), 8 deletions(-)
-
-diff --git a/src/context.c b/src/context.c
-index a2b5ae5..b9e8cda 100644
---- a/src/context.c
-+++ b/src/context.c
-@@ -29,12 +29,6 @@
- #include "ec.h"
- #endif
-
--#if (OPENSSL_VERSION_NUMBER >= 0x1000000fL)
--typedef const SSL_METHOD LSEC_SSL_METHOD;
--#else
--typedef SSL_METHOD LSEC_SSL_METHOD;
--#endif
--
- /*--------------------------- Auxiliary Functions ----------------------------*/
-
- /**
-@@ -68,7 +62,7 @@ static int set_option_flag(const char *opt, unsigned long *flag)
- /**
- * Find the protocol.
- */
--static LSEC_SSL_METHOD* str2method(const char *method)
-+static const SSL_METHOD* str2method(const char *method)
- {
- if (!strcmp(method, "any")) return SSLv23_method();
- if (!strcmp(method, "sslv23")) return SSLv23_method(); // deprecated
-@@ -287,7 +281,7 @@ static int create(lua_State *L)
- {
- p_context ctx;
- const char *str_method;
-- LSEC_SSL_METHOD *method;
-+ const SSL_METHOD *method;
-
- str_method = luaL_checkstring(L, 1);
- method = str2method(str_method);
---
-2.19.1
-
+++ /dev/null
-From 89bdc6148cd8cffb1483f4fc0aa14d636f8f5b4f Mon Sep 17 00:00:00 2001
-From: Bruno Silvestre <bruno.silvestre@gmail.com>
-Date: Fri, 29 Jun 2018 14:06:51 -0300
-Subject: [PATCH 2/3] Removing SSLv3 support
-
----
- src/config.c | 5 -----
- src/context.c | 3 ---
- 2 files changed, 8 deletions(-)
-
-diff --git a/src/config.c b/src/config.c
-index ce74997..6939fca 100644
---- a/src/config.c
-+++ b/src/config.c
-@@ -32,11 +32,6 @@ LSEC_API int luaopen_ssl_config(lua_State *L)
- lua_pushstring(L, "protocols");
- lua_newtable(L);
-
--#ifndef OPENSSL_NO_SSL3
-- lua_pushstring(L, "sslv3");
-- lua_pushboolean(L, 1);
-- lua_rawset(L, -3);
--#endif
- lua_pushstring(L, "tlsv1");
- lua_pushboolean(L, 1);
- lua_rawset(L, -3);
-diff --git a/src/context.c b/src/context.c
-index b9e8cda..d8fc8b6 100644
---- a/src/context.c
-+++ b/src/context.c
-@@ -66,9 +66,6 @@ static const SSL_METHOD* str2method(const char *method)
- {
- if (!strcmp(method, "any")) return SSLv23_method();
- if (!strcmp(method, "sslv23")) return SSLv23_method(); // deprecated
--#ifndef OPENSSL_NO_SSL3
-- if (!strcmp(method, "sslv3")) return SSLv3_method();
--#endif
- if (!strcmp(method, "tlsv1")) return TLSv1_method();
- #if (OPENSSL_VERSION_NUMBER >= 0x1000100fL)
- if (!strcmp(method, "tlsv1_1")) return TLSv1_1_method();
---
-2.19.1
-
+++ /dev/null
-From 28e247dbc53b95acf9cb716f99f13aadc4d38651 Mon Sep 17 00:00:00 2001
-From: Bruno Silvestre <bruno.silvestre@gmail.com>
-Date: Mon, 2 Jul 2018 10:31:45 -0300
-Subject: [PATCH 3/3] Removing deprecated methods to select the protocol
-
-Using TLS_method(), SSL_set_min_proto_version() and
-SSL_set_max_proto_version().
----
- src/context.c | 46 ++++++++++++++++++++++++++++++++++++++++++++--
- 1 file changed, 44 insertions(+), 2 deletions(-)
-
-diff --git a/src/context.c b/src/context.c
-index d8fc8b6..d1377f1 100644
---- a/src/context.c
-+++ b/src/context.c
-@@ -59,11 +59,46 @@ static int set_option_flag(const char *opt, unsigned long *flag)
- return 0;
- }
-
-+#if (OPENSSL_VERSION_NUMBER >= 0x1010000fL)
-+
- /**
- * Find the protocol.
- */
--static const SSL_METHOD* str2method(const char *method)
-+static const SSL_METHOD* str2method(const char *method, int *vmin, int *vmax)
- {
-+ if (!strcmp(method, "any") || !strcmp(method, "sslv23")) {
-+ *vmin = TLS1_VERSION;
-+ *vmax = TLS1_2_VERSION;
-+ return TLS_method();
-+ }
-+ else if (!strcmp(method, "tlsv1")) {
-+ *vmin = TLS1_VERSION;
-+ *vmax = TLS1_VERSION;
-+ return TLS_method();
-+ }
-+ else if (!strcmp(method, "tlsv1_1")) {
-+ *vmin = TLS1_1_VERSION;
-+ *vmax = TLS1_1_VERSION;
-+ return TLS_method();
-+ }
-+ else if (!strcmp(method, "tlsv1_2")) {
-+ *vmin = TLS1_2_VERSION;
-+ *vmax = TLS1_2_VERSION;
-+ return TLS_method();
-+ }
-+
-+ return NULL;
-+}
-+
-+#else
-+
-+/**
-+ * Find the protocol.
-+ */
-+static const SSL_METHOD* str2method(const char *method, int *vmin, int *vmax)
-+{
-+ (void)vmin;
-+ (void)vmax;
- if (!strcmp(method, "any")) return SSLv23_method();
- if (!strcmp(method, "sslv23")) return SSLv23_method(); // deprecated
- if (!strcmp(method, "tlsv1")) return TLSv1_method();
-@@ -74,6 +109,8 @@ static const SSL_METHOD* str2method(const char *method)
- return NULL;
- }
-
-+#endif
-+
- /**
- * Prepare the SSL handshake verify flag.
- */
-@@ -279,9 +316,10 @@ static int create(lua_State *L)
- p_context ctx;
- const char *str_method;
- const SSL_METHOD *method;
-+ int vmin, vmax;
-
- str_method = luaL_checkstring(L, 1);
-- method = str2method(str_method);
-+ method = str2method(str_method, &vmin, &vmax);
- if (!method) {
- lua_pushnil(L);
- lua_pushfstring(L, "invalid protocol (%s)", str_method);
-@@ -301,6 +339,10 @@ static int create(lua_State *L)
- ERR_reason_error_string(ERR_get_error()));
- return 2;
- }
-+#if (OPENSSL_VERSION_NUMBER >= 0x1010000fL)
-+ SSL_CTX_set_min_proto_version(ctx->context, vmin);
-+ SSL_CTX_set_max_proto_version(ctx->context, vmax);
-+#endif
- ctx->mode = LSEC_MODE_INVALID;
- ctx->L = L;
- luaL_getmetatable(L, "SSL:Context");
---
-2.19.1
-
-diff --git a/src/Makefile b/src/Makefile
-index 9be2f14..93d1dc4 100644
--- a/src/Makefile
+++ b/src/Makefile
+@@ -15,8 +15,8 @@ WARN=-Wall -pedantic
+ BSD_CFLAGS=-O2 -fPIC $(WARN) $(INCDIR) $(DEFS)
+ BSD_LDFLAGS=-O -fPIC -shared $(LIBDIR)
+
+-LNX_CFLAGS=-O2 -fPIC $(WARN) $(INCDIR) $(DEFS)
+-LNX_LDFLAGS=-O -fPIC -shared $(LIBDIR)
++LNX_CFLAGS=$(INCDIR) $(DEFS)
++LNX_LDFLAGS=-shared $(LIBDIR)
+
+ MAC_ENV=env MACOSX_DEPLOYMENT_TARGET='$(MACVER)'
+ MAC_CFLAGS=-O2 -fno-common $(WARN) $(INCDIR) $(DEFS)
@@ -33,10 +33,10 @@ LDFLAGS += $(MYLDFLAGS)
all:
TITLE:=LuaSOAP
URL:=https://github.com/tomasguisasola/luasoap
DEPENDS:=+lua +luaexpat +luasec +luasocket
+ PKGARCH:=all
endef
define Package/luasoap/description
PKG_NAME:=luasocket
PKG_SOURCE_VERSION:=6d5e40c324c84d9c1453ae88e0ad5bdd0a631448
PKG_VERSION:=3.0-rc1-20130909
-PKG_RELEASE:=4
+PKG_RELEASE:=5
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_MIRROR_HASH:=d2fa075d8bd026c41e0eb1a634ac2ad8115dee8abb070720e8e91fab51f86ee4
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR)/ \
LIBDIR="$(TARGET_LDFLAGS)" \
- CC="$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -std=gnu99" \
+ CC="$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(FPIC)" \
LD="$(TARGET_CROSS)ld -shared" \
all
endef
--- /dev/null
+--- a/src/makefile
++++ b/src/makefile
+@@ -163,9 +163,8 @@ DEF_linux=-DLUASOCKET_$(DEBUG) -DLUA_$(COMPAT)_MODULE \
+ -DLUASOCKET_API='__attribute__((visibility("default")))' \
+ -DUNIX_API='__attribute__((visibility("default")))' \
+ -DMIME_API='__attribute__((visibility("default")))'
+-CFLAGS_linux= -I$(LUAINC) $(DEF) -pedantic -Wall -Wshadow -Wextra \
+- -Wimplicit -O2 -ggdb3 -fpic -fvisibility=hidden
+-LDFLAGS_linux=-O -shared -fpic -o
++CFLAGS_linux= -I$(LUAINC) $(DEF) -fvisibility=hidden
++LDFLAGS_linux=-shared -o
+ LD_linux=gcc
+ SOCKET_linux=usocket.o
+
TARGET_CPPFLAGS += -DLUA_USE_LINUX
ifeq ($(BUILD_VARIANT),mysql)
- TARGET_CPPFLAGS += -I$(STAGING_DIR)/usr/include/mysql
- TARGET_LDFLAGS += -L$(STAGING_DIR)/usr/lib/mysql -lmysqlclient -lz
+ MAKE_FLAGS += DRIVER_INCS_mysql='-I$(STAGING_DIR)/usr/include/mysql' \
+ DRIVER_LIBS_mysql='$(TARGET_LDFLAGS) -L$(STAGING_DIR)/usr/lib/mysql -lmysqlclient -lz'
endif
ifeq ($(BUILD_VARIANT),postgres)
- TARGET_LDFLAGS += -lpq
+ MAKE_FLAGS += DRIVER_LIBS_postgres='$(TARGET_LDFLAGS) -lpq'
endif
ifeq ($(BUILD_VARIANT),sqlite3)
- TARGET_LDFLAGS += -lsqlite3 -lpthread
+ MAKE_FLAGS += DRIVER_LIBS_sqlite='$(TARGET_LDFLAGS) -lsqlite3 -lpthread'
endif
MAKE_FLAGS += \
- DRIVER_INCS="$(TARGET_CPPFLAGS)" \
- DRIVER_LIBS="$(TARGET_LDFLAGS)" \
CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
$(BUILD_VARIANT)
SECTION:=lang
CATEGORY:=Languages
TITLE:=Lua ZeroMQ binding
- URL:=https://github.com/moteus/lzmq/
+ URL:=https://github.com/zeromq/lzmq
DEPENDS:= +lua +libzmq
endef
PKG_NPM_NAME:=arduino-firmata
PKG_NAME:=node-$(PKG_NPM_NAME)
PKG_VERSION:=0.3.4
-PKG_RELEASE:=2
+PKG_RELEASE:=3
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/shokai/node-arduino-firmata.git
-PKG_MIRROR_HASH:=1aef93dc704ea771b9eab51cb64103533f829aee5b2886ad55d173adf3f11ede
-PKG_SOURCE_VERSION:=v0.3.4
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION)
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
+PKG_SOURCE:=$(PKG_NPM_NAME)-$(PKG_VERSION).tgz
+PKG_SOURCE_URL:=https://registry.npmjs.org/$(PKG_NPM_NAME)/-/
+PKG_HASH:=d7157e02867eae82887cb5e17b90c963fe7489bacd464110bfd20c672b8d5a98
PKG_BUILD_DEPENDS:=node/host
-PKG_NODE_VERSION:=`$(STAGING_DIR_HOSTPKG)/bin/node --version`
+PKG_USE_MIPS16:=0
-PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>
+PKG_MAINTAINER:=Hirokazu MORIKAWA <morikw2@gmail.com>
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE.txt
SUBMENU:=Node.js
SECTION:=lang
CATEGORY:=Languages
- TITLE:=Node.js package to access serial ports for reading and writing
- URL:=https://www.npmjs.org/package/serialport
+ TITLE:=Arduino Firmata implementation for Node.js
+ URL:=https://www.npmjs.com/package/arduino-firmata
DEPENDS:=+node +node-npm +node-serialport
endef
define Package/node-arduino-firmata/description
- Node.js package to access serial ports for reading and writing OR Welcome your robotic JavaScript overlords. Better yet, program them!
+ Arduino Firmata protocol (http://firmata.org) implementation on Node.js.
endef
-define Build/Prepare
- /bin/tar xzf $(DL_DIR)/$(PKG_SOURCE) -C $(PKG_BUILD_DIR) --strip-components 1
- $(Build/Patch)
-endef
+TAR_OPTIONS+= --strip-components 1
+TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS)
-EXTRA_LDFLAGS="-L$(TOOLCHAIN_DIR)/lib/ -Wl,-rpath-link $(TOOLCHAIN_DIR)/lib/" \
+NODEJS_CPU:=$(subst powerpc,ppc,$(subst aarch64,arm64,$(subst x86_64,x64,$(subst i386,ia32,$(ARCH)))))
define Build/Compile
- cd $(PKG_BUILD_DIR) ; \
+ $(MAKE_VARS) \
$(MAKE_FLAGS) \
- npm_config_arch=$(CONFIG_ARCH) \
- npm_config_nodedir=$(BUILD_DIR)/node-$(PKG_NODE_VERSION)/ \
- npm_config_cache=$(BUILD_DIR)/node-$(PKG_NODE_VERSION)/npm-cache \
- PREFIX="$(PKG_INSTALL_DIR)/usr/" \
- npm install -g `npm pack $(PKG_BUILD_DIR) | tail -n 1`
+ npm_config_arch=$(NODEJS_CPU) \
+ npm_config_target_arch=$(NODEJS_CPU) \
+ npm_config_build_from_source=true \
+ npm_config_nodedir=$(STAGING_DIR)/usr/ \
+ npm_config_prefix=$(PKG_INSTALL_DIR)/usr/ \
+ npm_config_cache=$(TMP_DIR)/npm-cache \
+ npm_config_tmp=$(TMP_DIR)/npm-tmp \
+ npm install -g $(PKG_BUILD_DIR)
+ rm -rf $(TMP_DIR)/npm-tmp
+ rm -rf $(TMP_DIR)/npm-cache
endef
define Package/node-arduino-firmata/install
- mkdir -p $(1)/usr/lib/node
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/. $(1)/usr/lib/node
- rm -rf $(1)/usr/lib/node/arduino-firmata/node_modules/serialport/ \
- $(1)/usr/lib/node/arduino-firmata/patches \
- $(1)/usr/lib/node/arduino-firmata/.p* \
- $(1)/usr/lib/node/arduino-firmata/.quilt* \
- $(1)/usr/lib/node/arduino-firmata/.built* \
- $(1)/usr/lib/node/arduino-firmata/.config*
- # Strip PKG_BUILD_DIR from useless metadata inserted by npm install
- # https://github.com/npm/npm/issues/10393
- # https://github.com/npm/npm/issues/12110
- find $(1)/usr/lib/node -name package.json -exec sed -i -e 's,$(PKG_BUILD_DIR),,g' {} +
+ $(INSTALL_DIR) $(1)/usr/lib/node/$(PKG_NPM_NAME)
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/$(PKG_NPM_NAME)/{package.json,README.md} \
+ $(1)/usr/lib/node/$(PKG_NPM_NAME)/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/$(PKG_NPM_NAME)/{tests,*.txt} \
+ $(1)/usr/lib/node/$(PKG_NPM_NAME)/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/$(PKG_NPM_NAME)/{node_modules,lib} \
+ $(1)/usr/lib/node/$(PKG_NPM_NAME)/
$(CP) ./files/* $(1)/
endef
$(eval $(call BuildPackage,node-arduino-firmata))
-
(function() {
'use strict';
- var ArduinoFirmata, SerialPort, debug, events, exports, serialport,
- extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
- hasProp = {}.hasOwnProperty;
+ var ArduinoFirmata, debug, events, exports, serialport;
events = require('eventemitter2');
- SerialPort = (serialport = require('serialport')).SerialPort;
+ serialport = require('serialport');
debug = require('debug')('arduino-firmata');
- exports = module.exports = ArduinoFirmata = (function(superClass) {
- extend(ArduinoFirmata, superClass);
-
- ArduinoFirmata.Status = {
- CLOSE: 0,
- OPEN: 1
- };
-
- ArduinoFirmata.INPUT = 0;
-
- ArduinoFirmata.OUTPUT = 1;
-
- ArduinoFirmata.ANALOG = 2;
-
- ArduinoFirmata.PWM = 3;
-
- ArduinoFirmata.SERVO = 4;
-
- ArduinoFirmata.SHIFT = 5;
-
- ArduinoFirmata.I2C = 6;
-
- ArduinoFirmata.LOW = 0;
-
- ArduinoFirmata.HIGH = 1;
-
- ArduinoFirmata.MAX_DATA_BYTES = 32;
-
- ArduinoFirmata.DIGITAL_MESSAGE = 0x90;
-
- ArduinoFirmata.ANALOG_MESSAGE = 0xE0;
-
- ArduinoFirmata.REPORT_ANALOG = 0xC0;
-
- ArduinoFirmata.REPORT_DIGITAL = 0xD0;
-
- ArduinoFirmata.SET_PIN_MODE = 0xF4;
-
- ArduinoFirmata.REPORT_VERSION = 0xF9;
-
- ArduinoFirmata.SYSTEM_RESET = 0xFF;
-
- ArduinoFirmata.START_SYSEX = 0xF0;
-
- ArduinoFirmata.END_SYSEX = 0xF7;
-
- ArduinoFirmata.list = function(callback) {
- return serialport.list(function(err, ports) {
- var devices, j, len, port;
- if (err) {
- return callback(err);
- }
- devices = [];
- for (j = 0, len = ports.length; j < len; j++) {
- port = ports[j];
- if (/usb|acm|com\d+/i.test(port.comName)) {
- devices.push(port.comName);
+ exports = module.exports = ArduinoFirmata = (function() {
+ class ArduinoFirmata extends events.EventEmitter2 {
+ static list(callback) {
+ return serialport.list(function(err, ports) {
+ var devices, j, len, port;
+ if (err) {
+ return callback(err);
}
- }
- return callback(null, devices);
- });
- };
-
- function ArduinoFirmata() {
- this.status = ArduinoFirmata.Status.CLOSE;
- this.wait_for_data = 0;
- this.execute_multi_byte_command = 0;
- this.multi_byte_channel = 0;
- this.stored_input_data = [];
- this.parsing_sysex = false;
- this.sysex_bytes_read = 0;
- this.digital_output_data = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
- this.digital_input_data = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
- this.analog_input_data = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
- this.boardVersion = null;
- }
-
- ArduinoFirmata.prototype.isOldArduinoDevice = function() {
- return /usbserial|USB/.test(this.serialport_name);
- };
+ devices = [];
+ for (j = 0, len = ports.length; j < len; j++) {
+ port = ports[j];
+ if (/usb|acm|com|ama\d+/i.test(port.comName)) {
+ devices.push(port.comName);
+ }
+ }
+ return callback(null, devices);
+ });
+ }
- ArduinoFirmata.prototype.connect = function(serialport_name, opts) {
- this.serialport_name = serialport_name;
- if (opts == null) {
- opts = {
- baudrate: 57600
- };
+ constructor() {
+ super();
+ this.status = ArduinoFirmata.Status.CLOSE;
+ this.wait_for_data = 0;
+ this.execute_multi_byte_command = 0;
+ this.multi_byte_channel = 0;
+ this.stored_input_data = [];
+ this.parsing_sysex = false;
+ this.sysex_bytes_read = 0;
+ this.digital_output_data = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
+ this.digital_input_data = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
+ this.analog_input_data = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
+ this.boardVersion = null;
}
- opts.parser = serialport.parsers.raw;
- if (!this.serialport_name) {
- ArduinoFirmata.list((function(_this) {
- return function(err, devices) {
- return _this.connect(devices[0], opts);
- };
- })(this));
- return this;
+
+ isOldArduinoDevice() {
+ return /usbserial|USB/.test(this.serialport_name);
}
- this.once('boardReady', function() {
- var io_init_wait;
- debug('boardReady');
- io_init_wait = this.isOldArduinoDevice() ? (debug("old arduino device found " + this.serialport_name), 3000) : (debug("new arduino device found " + this.serialport_name), 100);
- debug("wait " + io_init_wait + "(msec)");
- return setTimeout((function(_this) {
- return function() {
+
+ connect(serialport_name, opts = {
+ baudRate: 57600
+ }) {
+ this.serialport_name = serialport_name;
+ opts.parser = serialport.parsers.raw;
+ if (!this.serialport_name) {
+ ArduinoFirmata.list((err, devices) => {
+ return this.connect(devices[0], opts);
+ });
+ return this;
+ }
+ this.once('boardReady', function() {
+ var io_init_wait;
+ debug('boardReady');
+ io_init_wait = this.isOldArduinoDevice() ? (debug(`old arduino device found ${this.serialport_name}`), 3000) : (debug(`new arduino device found ${this.serialport_name}`), 100);
+ debug(`wait ${io_init_wait}(msec)`);
+ return setTimeout(() => {
var i, j, k;
for (i = j = 0; j < 6; i = ++j) {
- _this.write([ArduinoFirmata.REPORT_ANALOG | i, 1]);
+ this.write([ArduinoFirmata.REPORT_ANALOG | i, 1]);
}
for (i = k = 0; k < 2; i = ++k) {
- _this.write([ArduinoFirmata.REPORT_DIGITAL | i, 1]);
+ this.write([ArduinoFirmata.REPORT_DIGITAL | i, 1]);
}
debug('init IO ports');
- return _this.emit('connect');
- };
- })(this), io_init_wait);
- });
- this.serialport = new SerialPort(this.serialport_name, opts);
- this.serialport.once('open', (function(_this) {
- return function() {
+ return this.emit('connect');
+ }, io_init_wait);
+ });
+ this.serialport = new serialport(this.serialport_name, opts);
+ this.serialport.once('open', () => {
var cid;
- cid = setInterval(function() {
+ cid = setInterval(() => {
debug('request REPORT_VERSION');
- return _this.write([ArduinoFirmata.REPORT_VERSION]);
+ return this.write([ArduinoFirmata.REPORT_VERSION]);
}, 500);
- _this.once('boardVersion', function(version) {
+ this.once('boardVersion', (version) => {
clearInterval(cid);
- _this.status = ArduinoFirmata.Status.OPEN;
- return _this.emit('boardReady');
+ this.status = ArduinoFirmata.Status.OPEN;
+ return this.emit('boardReady');
});
- return _this.serialport.on('data', function(data) {
+ return this.serialport.on('data', (data) => {
var byte, j, len, results;
results = [];
for (j = 0, len = data.length; j < len; j++) {
byte = data[j];
- results.push(_this.process_input(byte));
+ results.push(this.process_input(byte));
}
return results;
});
- };
- })(this));
- return this;
- };
+ });
+ return this;
+ }
- ArduinoFirmata.prototype.isOpen = function() {
- return this.status === ArduinoFirmata.Status.OPEN;
- };
+ isOpen() {
+ return this.status === ArduinoFirmata.Status.OPEN;
+ }
- ArduinoFirmata.prototype.close = function(callback) {
- this.status = ArduinoFirmata.Status.CLOSE;
- return this.serialport.close(callback);
- };
+ close(callback) {
+ this.status = ArduinoFirmata.Status.CLOSE;
+ return this.serialport.close(callback);
+ }
- ArduinoFirmata.prototype.reset = function(callback) {
- return this.write([ArduinoFirmata.SYSTEM_RESET], callback);
- };
+ reset(callback) {
+ return this.write([ArduinoFirmata.SYSTEM_RESET], callback);
+ }
- ArduinoFirmata.prototype.write = function(bytes, callback) {
- return this.serialport.write(bytes, callback);
- };
+ write(bytes, callback) {
+ return this.serialport.write(bytes, callback);
+ }
- ArduinoFirmata.prototype.sysex = function(command, data, callback) {
- var write_data;
- if (data == null) {
- data = [];
+ sysex(command, data = [], callback) {
+ var write_data;
+ //# http://firmata.org/wiki/V2.1ProtocolDetails#Sysex_Message_Format
+ data = data.map(function(i) {
+ return i & 0b1111111; // 7bit
+ });
+ write_data = [ArduinoFirmata.START_SYSEX, command].concat(data, [ArduinoFirmata.END_SYSEX]);
+ return this.write(write_data, callback);
}
- data = data.map(function(i) {
- return i & 0x7f;
- });
- write_data = [ArduinoFirmata.START_SYSEX, command].concat(data, [ArduinoFirmata.END_SYSEX]);
- return this.write(write_data, callback);
- };
- ArduinoFirmata.prototype.pinMode = function(pin, mode, callback) {
- switch (mode) {
- case true:
- mode = ArduinoFirmata.OUTPUT;
- break;
- case false:
- mode = ArduinoFirmata.INPUT;
+ pinMode(pin, mode, callback) {
+ switch (mode) {
+ case true:
+ mode = ArduinoFirmata.OUTPUT;
+ break;
+ case false:
+ mode = ArduinoFirmata.INPUT;
+ }
+ return this.write([ArduinoFirmata.SET_PIN_MODE, pin, mode], callback);
}
- return this.write([ArduinoFirmata.SET_PIN_MODE, pin, mode], callback);
- };
- ArduinoFirmata.prototype.digitalWrite = function(pin, value, callback) {
- var port_num;
- this.pinMode(pin, ArduinoFirmata.OUTPUT);
- port_num = (pin >>> 3) & 0x0F;
- if (value === 0 || value === false) {
- this.digital_output_data[port_num] &= ~(1 << (pin & 0x07));
- } else {
- this.digital_output_data[port_num] |= 1 << (pin & 0x07);
+ digitalWrite(pin, value, callback) {
+ var port_num;
+ this.pinMode(pin, ArduinoFirmata.OUTPUT);
+ port_num = (pin >>> 3) & 0x0F;
+ if (value === 0 || value === false) {
+ this.digital_output_data[port_num] &= ~(1 << (pin & 0x07));
+ } else {
+ this.digital_output_data[port_num] |= 1 << (pin & 0x07);
+ }
+ return this.write([ArduinoFirmata.DIGITAL_MESSAGE | port_num, this.digital_output_data[port_num] & 0x7F, this.digital_output_data[port_num] >>> 7], callback);
}
- return this.write([ArduinoFirmata.DIGITAL_MESSAGE | port_num, this.digital_output_data[port_num] & 0x7F, this.digital_output_data[port_num] >>> 7], callback);
- };
- ArduinoFirmata.prototype.analogWrite = function(pin, value, callback) {
- value = Math.floor(value);
- this.pinMode(pin, ArduinoFirmata.PWM);
- return this.write([ArduinoFirmata.ANALOG_MESSAGE | (pin & 0x0F), value & 0x7F, value >>> 7], callback);
- };
+ analogWrite(pin, value, callback) {
+ value = Math.floor(value);
+ this.pinMode(pin, ArduinoFirmata.PWM);
+ return this.write([ArduinoFirmata.ANALOG_MESSAGE | (pin & 0x0F), value & 0x7F, value >>> 7], callback);
+ }
- ArduinoFirmata.prototype.servoWrite = function(pin, angle, callback) {
- this.pinMode(pin, ArduinoFirmata.SERVO);
- return this.write([ArduinoFirmata.ANALOG_MESSAGE | (pin & 0x0F), angle & 0x7F, angle >>> 7], callback);
- };
+ servoWrite(pin, angle, callback) {
+ this.pinMode(pin, ArduinoFirmata.SERVO);
+ return this.write([ArduinoFirmata.ANALOG_MESSAGE | (pin & 0x0F), angle & 0x7F, angle >>> 7], callback);
+ }
- ArduinoFirmata.prototype.digitalRead = function(pin) {
- return ((this.digital_input_data[pin >>> 3] >>> (pin & 0x07)) & 0x01) > 0;
- };
+ digitalRead(pin) {
+ return ((this.digital_input_data[pin >>> 3] >>> (pin & 0x07)) & 0x01) > 0;
+ }
- ArduinoFirmata.prototype.analogRead = function(pin) {
- return this.analog_input_data[pin];
- };
+ analogRead(pin) {
+ return this.analog_input_data[pin];
+ }
- ArduinoFirmata.prototype.process_input = function(input_data) {
- var analog_value, command, diff, i, j, old_analog_value, results, stat, sysex_command, sysex_data;
- if (this.parsing_sysex) {
- if (input_data === ArduinoFirmata.END_SYSEX) {
- this.parsing_sysex = false;
- sysex_command = this.stored_input_data[0];
- sysex_data = this.stored_input_data.slice(1, this.sysex_bytes_read);
- return this.emit('sysex', {
- command: sysex_command,
- data: sysex_data
- });
- } else {
- this.stored_input_data[this.sysex_bytes_read] = input_data;
- return this.sysex_bytes_read += 1;
- }
- } else if (this.wait_for_data > 0 && input_data < 128) {
- this.wait_for_data -= 1;
- this.stored_input_data[this.wait_for_data] = input_data;
- if (this.execute_multi_byte_command !== 0 && this.wait_for_data === 0) {
- switch (this.execute_multi_byte_command) {
- case ArduinoFirmata.DIGITAL_MESSAGE:
- input_data = (this.stored_input_data[0] << 7) + this.stored_input_data[1];
- diff = this.digital_input_data[this.multi_byte_channel] ^ input_data;
- this.digital_input_data[this.multi_byte_channel] = input_data;
- if (this.listeners('digitalChange').length > 0) {
- results = [];
- for (i = j = 0; j <= 13; i = ++j) {
- if (((0x01 << i) & diff) > 0) {
- stat = (input_data & diff) > 0;
- results.push(this.emit('digitalChange', {
- pin: i + this.multi_byte_channel * 8,
- value: stat,
- old_value: !stat
- }));
- } else {
- results.push(void 0);
+ process_input(input_data) {
+ var analog_value, command, diff, i, j, old_analog_value, results, stat, sysex_command, sysex_data;
+ if (this.parsing_sysex) {
+ if (input_data === ArduinoFirmata.END_SYSEX) {
+ this.parsing_sysex = false;
+ sysex_command = this.stored_input_data[0];
+ sysex_data = this.stored_input_data.slice(1, this.sysex_bytes_read);
+ return this.emit('sysex', {
+ command: sysex_command,
+ data: sysex_data
+ });
+ } else {
+ this.stored_input_data[this.sysex_bytes_read] = input_data;
+ return this.sysex_bytes_read += 1;
+ }
+ } else if (this.wait_for_data > 0 && input_data < 128) {
+ this.wait_for_data -= 1;
+ this.stored_input_data[this.wait_for_data] = input_data;
+ if (this.execute_multi_byte_command !== 0 && this.wait_for_data === 0) {
+ switch (this.execute_multi_byte_command) {
+ case ArduinoFirmata.DIGITAL_MESSAGE:
+ input_data = (this.stored_input_data[0] << 7) + this.stored_input_data[1];
+ diff = this.digital_input_data[this.multi_byte_channel] ^ input_data;
+ this.digital_input_data[this.multi_byte_channel] = input_data;
+ if (this.listeners('digitalChange').length > 0) {
+ results = [];
+ for (i = j = 0; j <= 13; i = ++j) {
+ if (((0x01 << i) & diff) > 0) {
+ stat = (input_data & diff) > 0;
+ results.push(this.emit('digitalChange', {
+ pin: i + this.multi_byte_channel * 8,
+ value: stat,
+ old_value: !stat
+ }));
+ } else {
+ results.push(void 0);
+ }
}
+ return results;
+ }
+ break;
+ case ArduinoFirmata.ANALOG_MESSAGE:
+ analog_value = (this.stored_input_data[0] << 7) + this.stored_input_data[1];
+ old_analog_value = this.analogRead(this.multi_byte_channel);
+ this.analog_input_data[this.multi_byte_channel] = analog_value;
+ if (old_analog_value !== analog_value) {
+ return this.emit('analogChange', {
+ pin: this.multi_byte_channel,
+ value: analog_value,
+ old_value: old_analog_value
+ });
}
- return results;
- }
- break;
- case ArduinoFirmata.ANALOG_MESSAGE:
- analog_value = (this.stored_input_data[0] << 7) + this.stored_input_data[1];
- old_analog_value = this.analogRead(this.multi_byte_channel);
- this.analog_input_data[this.multi_byte_channel] = analog_value;
- if (old_analog_value !== analog_value) {
- return this.emit('analogChange', {
- pin: this.multi_byte_channel,
- value: analog_value,
- old_value: old_analog_value
- });
- }
- break;
- case ArduinoFirmata.REPORT_VERSION:
- this.boardVersion = this.stored_input_data[1] + "." + this.stored_input_data[0];
- return this.emit('boardVersion', this.boardVersion);
+ break;
+ case ArduinoFirmata.REPORT_VERSION:
+ this.boardVersion = `${this.stored_input_data[1]}.${this.stored_input_data[0]}`;
+ return this.emit('boardVersion', this.boardVersion);
+ }
}
- }
- } else {
- if (input_data < 0xF0) {
- command = input_data & 0xF0;
- this.multi_byte_channel = input_data & 0x0F;
} else {
- command = input_data;
- }
- if (command === ArduinoFirmata.START_SYSEX) {
- this.parsing_sysex = true;
- return this.sysex_bytes_read = 0;
- } else if (command === ArduinoFirmata.DIGITAL_MESSAGE || command === ArduinoFirmata.ANALOG_MESSAGE || command === ArduinoFirmata.REPORT_VERSION) {
- this.wait_for_data = 2;
- return this.execute_multi_byte_command = command;
+ if (input_data < 0xF0) {
+ command = input_data & 0xF0;
+ this.multi_byte_channel = input_data & 0x0F;
+ } else {
+ command = input_data;
+ }
+ if (command === ArduinoFirmata.START_SYSEX) {
+ this.parsing_sysex = true;
+ return this.sysex_bytes_read = 0;
+ } else if (command === ArduinoFirmata.DIGITAL_MESSAGE || command === ArduinoFirmata.ANALOG_MESSAGE || command === ArduinoFirmata.REPORT_VERSION) {
+ this.wait_for_data = 2;
+ return this.execute_multi_byte_command = command;
+ }
}
}
+
+ };
+
+ ArduinoFirmata.Status = {
+ CLOSE: 0,
+ OPEN: 1
};
+ ArduinoFirmata.INPUT = 0;
+
+ ArduinoFirmata.OUTPUT = 1;
+
+ ArduinoFirmata.ANALOG = 2;
+
+ ArduinoFirmata.PWM = 3;
+
+ ArduinoFirmata.SERVO = 4;
+
+ ArduinoFirmata.SHIFT = 5;
+
+ ArduinoFirmata.I2C = 6;
+
+ ArduinoFirmata.LOW = 0;
+
+ ArduinoFirmata.HIGH = 1;
+
+ ArduinoFirmata.MAX_DATA_BYTES = 32;
+
+ ArduinoFirmata.DIGITAL_MESSAGE = 0x90; // send data for a digital port
+
+ ArduinoFirmata.ANALOG_MESSAGE = 0xE0; // send data for an analog pin (or PWM)
+
+ ArduinoFirmata.REPORT_ANALOG = 0xC0; // enable analog input by pin
+
+ ArduinoFirmata.REPORT_DIGITAL = 0xD0; // enable digital input by port
+
+ ArduinoFirmata.SET_PIN_MODE = 0xF4; // set a pin to INPUT/OUTPUT/PWM/etc
+
+ ArduinoFirmata.REPORT_VERSION = 0xF9; // report firmware version
+
+ ArduinoFirmata.SYSTEM_RESET = 0xFF; // reset from MIDI
+
+ ArduinoFirmata.START_SYSEX = 0xF0; // start a MIDI SysEx message
+
+ ArduinoFirmata.END_SYSEX = 0xF7; // end a MIDI SysEx message
+
return ArduinoFirmata;
- })(events.EventEmitter2);
+ }).call(this);
}).call(this);
PKG_NPM_NAME:=cylon
PKG_NAME:=node-$(PKG_NPM_NAME)
+PKG_SRC_NAME:=$(PKG_NPM_NAME)-firmata
PKG_VERSION:=0.24.0
-PKG_RELEASE:=2
+PKG_RELEASE:=3
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/hybridgroup/cylon-firmata.git
-PKG_SOURCE_VERSION:=a930f8446f23ec2cb28aadeff54b79ab7704e3a0
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION)
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
-PKG_MIRROR_HASH:=dceb75539d32f402db0a5f68f2c7e2b52e5547a5ac2dec875d34fd3cc95cce00
+PKG_SOURCE:=$(PKG_SRC_NAME)-$(PKG_VERSION).tgz
+PKG_SOURCE_URL:=https://registry.npmjs.org/$(PKG_SRC_NAME)/-/
+PKG_HASH:=06ac7a8e2e6012577d2f4b043af766bf28a1d3e2a0d50e46629dab4f0bb65104
+PKG_SOURCE_SUBDIR:=$(PKG_SRC_NAME)-$(PKG_VERSION)
PKG_BUILD_DEPENDS:=node/host
-PKG_NODE_VERSION:=`$(STAGING_DIR_HOSTPKG)/bin/node --version`
+PKG_USE_MIPS16:=0
-PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>
+PKG_MAINTAINER:=Hirokazu MORIKAWA <morikw2@gmail.com>
PKG_LICENSE:=Apache-2.0
PKG_LICENSE_FILES:=LICENSE
SECTION:=lang
CATEGORY:=Languages
TITLE:=CylonJS - $(1)
- URL:=https://www.npmjs.org/package/cylon
+ URL:=https://www.npmjs.org/package/cylon-firmata
DEPENDS:=+node +node-npm $(2)
endef
endef
define Package/node-cylon/description
- JavaScript Robotics, By Your Command Next generation robotics framework with support for 36 different platforms Get Started
+ JavaScript Robotics, By Your Command Next generation robotics framework with support for 36 different platforms Get Started
endef
-define Build/Prepare
- /bin/tar xzf $(DL_DIR)/$(PKG_SOURCE) -C $(PKG_BUILD_DIR) --strip-components 1
- $(Build/Patch)
-endef
+TAR_OPTIONS+= --strip-components 1
+TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS)
-EXTRA_LDFLAGS="-L$(TOOLCHAIN_DIR)/lib/ -Wl,-rpath-link $(TOOLCHAIN_DIR)/lib/" \
+NODEJS_CPU:=$(subst powerpc,ppc,$(subst aarch64,arm64,$(subst x86_64,x64,$(subst i386,ia32,$(ARCH)))))
define Build/Compile
- cd $(PKG_BUILD_DIR) ; \
+ $(MAKE_VARS) \
$(MAKE_FLAGS) \
- npm_config_arch=$(CONFIG_ARCH) \
- npm_config_nodedir=$(BUILD_DIR)/node-$(PKG_NODE_VERSION)/ \
- npm_config_cache=$(BUILD_DIR)/node-$(PKG_NODE_VERSION)/npm-cache \
- PREFIX="$(PKG_INSTALL_DIR)/usr/" \
- npm install -g `npm pack $(PKG_BUILD_DIR) | tail -n 1`
+ npm_config_arch=$(NODEJS_CPU) \
+ npm_config_target_arch=$(NODEJS_CPU) \
+ npm_config_build_from_source=true \
+ npm_config_nodedir=$(STAGING_DIR)/usr/ \
+ npm_config_prefix=$(PKG_INSTALL_DIR)/usr/ \
+ npm_config_cache=$(TMP_DIR)/npm-cache \
+ npm_config_tmp=$(TMP_DIR)/npm-tmp \
+ npm install -g $(PKG_BUILD_DIR)
+ rm -rf $(TMP_DIR)/npm-tmp
+ rm -rf $(TMP_DIR)/npm-cache
endef
define Package/node-cylon/install
- mkdir -p $(1)/usr/lib/node/cylon
+ $(INSTALL_DIR) $(1)/usr/lib/node/cylon
$(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/cylon-firmata/node_modules/cylon/* $(1)/usr/lib/node/cylon/
endef
define Package/node-cylon-i2c/install
- mkdir -p $(1)/usr/lib/node/cylon-i2c
+ $(INSTALL_DIR) $(1)/usr/lib/node/cylon-i2c
$(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/cylon-firmata/node_modules/cylon-i2c/* $(1)/usr/lib/node/cylon-i2c/
endef
define Package/node-cylon-gpio/install
- mkdir -p $(1)/usr/lib/node/cylon-gpio
+ $(INSTALL_DIR) $(1)/usr/lib/node/cylon-gpio
$(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/cylon-firmata/node_modules/cylon-gpio/* $(1)/usr/lib/node/cylon-gpio/
endef
define Package/node-cylon-firmata/install
- mkdir -p $(1)/usr/lib/node/cylon-firmata
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/cylon-firmata/{index.js,lib,LICENSE,package.json,README.md,RELEASES.md,spec} $(1)/usr/lib/node/cylon-firmata/
- # Strip PKG_BUILD_DIR from useless metadata inserted by npm install
- # https://github.com/npm/npm/issues/10393
- # https://github.com/npm/npm/issues/12110
- find $(1)/usr/lib/node -name package.json -exec sed -i -e 's,$(PKG_BUILD_DIR),,g' {} +
+ $(INSTALL_DIR) $(1)/usr/lib/node/cylon-firmata
+ $(CP) $(PKG_BUILD_DIR)/{package.json,LICENSE,*.md} \
+ $(1)/usr/lib/node/cylon-firmata/
+ $(CP) $(PKG_BUILD_DIR)/{docs,examples,*.js} \
+ $(1)/usr/lib/node/cylon-firmata/
+ $(CP) $(PKG_BUILD_DIR)/{lib,spec} \
+ $(1)/usr/lib/node/cylon-firmata/
endef
$(eval $(call BuildPackage,node-cylon))
$(eval $(call BuildPackage,node-cylon-i2c))
$(eval $(call BuildPackage,node-cylon-gpio))
$(eval $(call BuildPackage,node-cylon-firmata))
-
include $(TOPDIR)/rules.mk
-PKG_NPM_NAME:=hid
-PKG_NAME:=node-$(PKG_NPM_NAME)
-PKG_VERSION:=0.7.2
-PKG_RELEASE:=2
+PKG_NPM_NAME:=node-hid
+PKG_NAME:=$(PKG_NPM_NAME)
+PKG_VERSION:=0.7.9
+PKG_RELEASE:=1
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/node-hid/node-hid.git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=v0.7.2
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
-PKG_MIRROR_HASH:=ede801a26a23290ab76d64ab636c3c3e2788030bb830af7006d37444c2a7b2c4
+PKG_SOURCE:=$(PKG_NPM_NAME)-$(PKG_VERSION).tgz
+PKG_SOURCE_URL:=https://registry.npmjs.org/$(PKG_NPM_NAME)/-/
+PKG_HASH:=a13710ebff0a2d0e60e08442db192a4e891db89d535306d461b8a95ede7dbd90
PKG_BUILD_DEPENDS:=node/host
-PKG_NODE_VERSION:=`$(STAGING_DIR_HOSTPKG)/bin/node --version`
+PKG_USE_MIPS16:=0
-PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>
-PKG_LICENSE:=Custom
+PKG_MAINTAINER:=Hirokazu MORIKAWA <morikw2@gmail.com>
+PKG_LICENSE:=MIT or X11
PKG_LICENSE_FILES:=
include $(INCLUDE_DIR)/package.mk
CATEGORY:=Languages
TITLE:=Node.js package to access HID devices
URL:=https://github.com/node-hid/node-hid
- DEPENDS:=+node +node-npm +libusb-1.0 +hidapi +libstdcpp +libudev-fbsd
+ DEPENDS:=+node +node-npm +libusb-1.0 +hidapi +libudev-fbsd
endef
define Package/node-hid/description
Node.js package to access HID devices
endef
-CPU:=$(subst x86_64,x64,$(subst i386,ia32,$(ARCH)))
+TAR_OPTIONS+= --strip-components 1
+TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS)
-EXTRA_CFLAGS+=-I$(STAGING_DIR)/usr/include/libusb-1.0
+NODEJS_CPU:=$(subst powerpc,ppc,$(subst aarch64,arm64,$(subst x86_64,x64,$(subst i386,ia32,$(ARCH)))))
+TMPNPM:=$(shell mktemp -u XXXXXXXXXX)
+
+TARGET_CFLAGS+=$(FPIC) -I$(STAGING_DIR)/usr/include/libusb-1.0
define Build/Compile
git init $(PKG_BUILD_DIR)
- cd $(PKG_BUILD_DIR) ; \
$(MAKE_VARS) \
$(MAKE_FLAGS) \
- npm_config_arch=$(CONFIG_ARCH) \
- npm_config_nodedir=$(BUILD_DIR)/node-$(PKG_NODE_VERSION)/ \
- npm_config_cache=$(BUILD_DIR)/node-$(PKG_NODE_VERSION)/npm-cache \
- PREFIX="$(PKG_INSTALL_DIR)/usr/" \
- npm install --build-from-source --target_arch=$(CPU) -g \
- `npm pack $(PKG_BUILD_DIR) | tail -n 1`
+ npm_config_arch=$(NODEJS_CPU) \
+ npm_config_target_arch=$(NODEJS_CPU) \
+ npm_config_build_from_source=true \
+ npm_config_nodedir=$(STAGING_DIR)/usr/ \
+ npm_config_prefix=$(PKG_INSTALL_DIR)/usr/ \
+ npm_config_cache=$(TMP_DIR)/npm-cache-$(TMPNPM) \
+ npm_config_tmp=$(TMP_DIR)/npm-tmp-$(TMPNPM) \
+ npm install -g $(PKG_BUILD_DIR)
+ rm -rf $(TMP_DIR)/npm-tmp-$(TMPNPM)
+ rm -rf $(TMP_DIR)/npm-cache-$(TMPNPM)
endef
define Package/node-hid/install
- mkdir -p $(1)/usr/lib/node/node-hid/
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/. $(1)/usr/lib/node/
- $(RM) -rf $(1)/usr/lib/node/node-hid/patches \
- $(1)/usr/lib/node/node-hid/.p* \
- $(1)/usr/lib/node/node-hid/.quilt* \
- $(1)/usr/lib/node/node-hid/.built* \
- $(1)/usr/lib/node/node-hid/.config*
- # Strip PKG_BUILD_DIR from useless metadata inserted by npm install
- # https://github.com/npm/npm/issues/10393
- # https://github.com/npm/npm/issues/12110
- find $(1)/usr/lib/node -name package.json -exec sed -i -e 's,$(PKG_BUILD_DIR),,g' {} +
+ $(INSTALL_DIR) $(1)/usr/lib/node/$(PKG_NPM_NAME)
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/$(PKG_NPM_NAME)/{package.json,*.md} \
+ $(1)/usr/lib/node/$(PKG_NPM_NAME)/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/$(PKG_NPM_NAME)/{binding.gyp,*.js} \
+ $(1)/usr/lib/node/$(PKG_NPM_NAME)/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/$(PKG_NPM_NAME)/{node_modules,src} \
+ $(1)/usr/lib/node/$(PKG_NPM_NAME)/
+ $(INSTALL_DIR) $(1)/usr/lib/node/$(PKG_NPM_NAME)/build/Release
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/$(PKG_NPM_NAME)/build/Release/HID.node \
+ $(1)/usr/lib/node/$(PKG_NPM_NAME)/build/Release/
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(LN) ../lib/node/node-hid/src/show-devices.js $(1)/usr/bin/hid-showdevices
endef
$(eval $(call BuildPackage,node-hid))
-
--- /dev/null
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NPM_NAME:=homebridge
+PKG_NAME:=node-$(PKG_NPM_NAME)
+PKG_VERSION:=0.4.50
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NPM_NAME)-$(PKG_VERSION).tgz
+PKG_SOURCE_URL:=http://registry.npmjs.org/$(PKG_NPM_NAME)/-/
+PKG_HASH:=85541254b44c0b70e38ed5e49a9c6a68a20467b99fe0ff3703ca9fc422ce879c
+
+PKG_BUILD_DEPENDS:=node/host
+PKG_USE_MIPS16:=0
+
+PKG_MAINTAINER:=Hirokazu MORIKAWA <morikw2@gmail.com>
+PKG_LICENSE:=ISC Apache-2.0
+PKG_LICENSE_FILES:=LICENSE
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/node-homebridge
+ SUBMENU:=Node.js
+ SECTION:=lang
+ CATEGORY:=Languages
+ TITLE:=Node.js HomeKit Server
+ URL:=https://www.npmjs.org/package/homebridge
+ DEPENDS:=+node +node-npm
+ USERID:=homebridge:homebridge
+endef
+
+define Package/node-homebridge/description
+ Homebridge is a lightweight Node.js server you can run on your home network that emulates the iOS HomeKit API
+endef
+
+NODEJS_CPU:=$(subst powerpc,ppc,$(subst aarch64,arm64,$(subst x86_64,x64,$(subst i386,ia32,$(ARCH)))))
+TMPNPM:=$(shell mktemp -u XXXXXXXXXX)
+
+TARGET_CFLAGS+=$(FPIC)
+
+define Build/Prepare
+ $(INSTALL_DIR) $(PKG_BUILD_DIR)
+endef
+
+define Build/Compile
+ $(MAKE_VARS) \
+ $(MAKE_FLAGS) \
+ npm_config_arch=$(NODEJS_CPU) \
+ npm_config_target_arch=$(NODEJS_CPU) \
+ npm_config_build_from_source=true \
+ npm_config_nodedir=$(STAGING_DIR)/usr/ \
+ npm_config_prefix=$(PKG_INSTALL_DIR)/usr/ \
+ npm_config_cache=$(TMP_DIR)/npm-cache-$(TMPNPM) \
+ npm_config_tmp=$(TMP_DIR)/npm-tmp-$(TMPNPM) \
+ npm install -g $(DL_DIR)/$(PKG_SOURCE)
+ rm -rf $(TMP_DIR)/npm-tmp-$(TMPNPM)
+ rm -rf $(TMP_DIR)/npm-cache-$(TMPNPM)
+endef
+
+define Package/node-homebridge/install
+ $(INSTALL_DIR) $(1)/usr/lib/node
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/* $(1)/usr/lib/node/
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(LN) ../lib/node/homebridge/bin/homebridge $(1)/usr/bin/homebridge
+ $(INSTALL_DIR) $(1)/etc/init.d
+ $(INSTALL_BIN) ./files/homebridge.init $(1)/etc/init.d/homebridge
+endef
+
+$(eval $(call BuildPackage,node-homebridge))
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=98
+USE_PROCD=1
+
+start_service() {
+ [ -d /usr/share/homebridge ] || {
+ mkdir -m 0755 -p /usr/share/homebridge
+ chmod 0700 /usr/share/homebridge
+ chown homebridge:homebridge /usr/share/homebridge
+ }
+ procd_open_instance
+ procd_set_param command /usr/bin/homebridge -U /usr/share/homebridge
+ procd_set_param user homebridge
+ procd_set_param stdout 1
+ procd_set_param stderr 1
+ procd_close_instance
+}
PKG_NPM_NAME:=mozilla-iot-gateway
PKG_NAME:=node-$(PKG_NPM_NAME)
-PKG_VERSION:=0.6.1
-PKG_RELEASE:=1
-PKG_REV:=2bcdf4866872b1e8992ee70ff6fc65566d6288d8
+PKG_VERSION:=0.8.1
+PKG_RELEASE:=2
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/mozilla-iot/gateway.git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=$(PKG_REV)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_MIRROR_HASH:=c424b6f5f011c0cceb455458c855854395d47e902fd4ec2d63564c5e736d4fcd
+PKG_SOURCE_URL:=https://codeload.github.com/mozilla-iot/gateway/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=f407732b9c1d020aa79e9d0b12f1b97e82691d6f58def2df067f790f4f640e30
PKG_BUILD_DEPENDS:=node/host openzwave
SUBMENU:=Node.js
SECTION:=lang
CATEGORY:=Languages
- TITLE:=Things Gateway by Mozilla
+ TITLE:=WebThings Gateway by Mozilla
URL:=https://iot.mozilla.org/gateway/
DEPENDS:= +libpthread +node +node-npm +libopenzwave +openzwave-config +python +python3-light +python3-pip +openssl-util
DEPENDS+= +MOIT_enable-plugin-support:git-http
CPU:=$(subst powerpc,ppc,$(subst aarch64,arm64,$(subst x86_64,x64,$(subst i386,ia32,$(ARCH)))))
+TARGET_CFLAGS+=$(FPIC)
+
define Build/Compile
$(MAKE_VARS) \
$(MAKE_FLAGS) \
define Package/node-mozilla-iot-gateway/install
$(INSTALL_DIR) $(1)/opt/mozilla-iot/gateway/
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/things-gateway/* $(1)/opt/mozilla-iot/gateway
- $(STAGING_DIR_HOSTPKG)/bin/npm --prefix=$(1)/opt/mozilla-iot/gateway install $(1)/opt/mozilla-iot/gateway
-
- # Clean up of old build files that confuse OpenWrt's dependency checker
- $(RM) -r $(1)/opt/mozilla-iot/gateway/node_modules/sqlite3/lib/binding/node-v57-linux-x64
- $(RM) -r $(1)/opt/mozilla-iot/gateway/node_modules/ursa-optional/build/Release/ursaNative.node
- $(RM) -r $(1)/opt/mozilla-iot/gateway/node_modules/ursa-optional/build/Release/obj.target/ursaNative.node
-
- $(INSTALL_DIR) $(1)/opt/mozilla-iot/gateway/node_modules/sqlite3/lib/binding/node-v57-linux-$(CPU)/
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/things-gateway/node_modules/sqlite3/lib/binding/node-v57-linux-$(CPU)/node_sqlite3.node \
- $(1)/opt/mozilla-iot/gateway/node_modules/sqlite3/lib/binding/node-v57-linux-$(CPU)/
-
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/webthings-gateway/* $(1)/opt/mozilla-iot/gateway
+ $(MAKE_VARS) \
+ $(MAKE_FLAGS) \
+ $(STAGING_DIR_HOSTPKG)/bin/npm --prefix=$(1)/opt/mozilla-iot/gateway install \
+ --build-from-source --target_arch=$(CPU) $(1)/opt/mozilla-iot/gateway
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/mozilla-iot-gateway.init $(1)/etc/init.d/mozilla-iot-gateway
endef
--- /dev/null
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NPM_SCOPE:=serialport
+PKG_NPM_NAME:=bindings
+PKG_NAME:=node-$(PKG_NPM_SCOPE)-$(PKG_NPM_NAME)
+PKG_VERSION:=2.0.8
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NPM_NAME)-$(PKG_VERSION).tgz
+PKG_SOURCE_URL:=https://registry.npmjs.org/@$(PKG_NPM_SCOPE)/$(PKG_NPM_NAME)/-/
+PKG_HASH:=2e0d0ca6168ba104fe60692e33c76ec44ff9533bf7b657dfc6e00da410728df4
+
+PKG_BUILD_DEPENDS:=node/host
+PKG_USE_MIPS16:=0
+
+PKG_MAINTAINER:=Hirokazu MORIKAWA <morikw2@gmail.com>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/node-serialport-bindings
+ SUBMENU:=Node.js
+ SECTION:=lang
+ CATEGORY:=Languages
+ TITLE:=SerialPort Bindings
+ URL:=https://www.npmjs.com/package/@serialport/bindings
+ DEPENDS:=+node
+endef
+
+define Package/node-serialport-bindings/description
+ The Binding is how Node-SerialPort talks to the underlying system. By default, we auto detect Windows, Linux and OS X, and load the appropriate module for your system. You can assign SerialPort.Binding to any binding you like.
+endef
+
+TAR_OPTIONS+= --strip-components 1
+TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS)
+
+NODEJS_CPU:=$(subst powerpc,ppc,$(subst aarch64,arm64,$(subst x86_64,x64,$(subst i386,ia32,$(ARCH)))))
+TMPNPM:=$(shell mktemp -u XXXXXXXXXX)
+
+TARGET_CFLAGS+=$(FPIC)
+TARGET_CPPFLAGS+=$(FPIC)
+
+define Build/Compile
+ $(MAKE_VARS) \
+ $(MAKE_FLAGS) \
+ npm_config_arch=$(NODEJS_CPU) \
+ npm_config_target_arch=$(NODEJS_CPU) \
+ npm_config_build_from_source=true \
+ npm_config_nodedir=$(STAGING_DIR)/usr/ \
+ npm_config_prefix=$(PKG_INSTALL_DIR)/usr/ \
+ npm_config_cache=$(TMP_DIR)/npm-cache-$(TMPNPM) \
+ npm_config_tmp=$(TMP_DIR)/npm-tmp-$(TMPNPM) \
+ npm install -g --build-from-source $(PKG_BUILD_DIR)
+ rm -rf $(TMP_DIR)/npm-tmp-$(TMPNPM)
+ rm -rf $(TMP_DIR)/npm-cache-$(TMPNPM)
+endef
+
+define Package/node-serialport-bindings/install
+ $(INSTALL_DIR) $(1)/usr/lib/node/@$(PKG_NPM_SCOPE)/$(PKG_NPM_NAME)
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/@$(PKG_NPM_SCOPE)/$(PKG_NPM_NAME)/{package.json,LICENSE,*.md} \
+ $(1)/usr/lib/node/@$(PKG_NPM_SCOPE)/$(PKG_NPM_NAME)
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/@$(PKG_NPM_SCOPE)/$(PKG_NPM_NAME)/{node_modules,lib} \
+ $(1)/usr/lib/node/@$(PKG_NPM_SCOPE)/$(PKG_NPM_NAME)
+ $(INSTALL_DIR) $(1)/usr/lib/node/@$(PKG_NPM_SCOPE)/$(PKG_NPM_NAME)/build/Release
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/@$(PKG_NPM_SCOPE)/$(PKG_NPM_NAME)/build/Release/bindings.node \
+ $(1)/usr/lib/node/@$(PKG_NPM_SCOPE)/$(PKG_NPM_NAME)/build/Release/
+endef
+
+$(eval $(call BuildPackage,node-serialport-bindings))
--- /dev/null
+--- a/src/serialport_linux.cpp
++++ b/src/serialport_linux.cpp
+@@ -1,8 +1,13 @@
+ #if defined(__linux__)
+
+ #include <sys/ioctl.h>
++#if defined(__powerpc__) || defined(__powerpc64__)
++#include <asm-generic/ioctls.h>
++#include <asm-generic/termbits.h>
++#else
+ #include <asm/ioctls.h>
+ #include <asm/termbits.h>
++#endif
+
+ // Uses the termios2 interface to set nonstandard baud rates
+ int linuxSetCustomBaudRate(const int fd, const unsigned int baudrate) {
PKG_NPM_NAME:=serialport
PKG_NAME:=node-$(PKG_NPM_NAME)
-PKG_VERSION:=6.1.1
+PKG_VERSION:=7.1.5
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NPM_NAME)-$(PKG_VERSION).tgz
-PKG_SOURCE_URL:=http://registry.npmjs.org/$(PKG_NPM_NAME)/-/
-PKG_HASH:=b58c326d217fb0af1639e4ea834d9fca4be16934c486499e2ddac6e52b8dd560
+PKG_SOURCE_URL:=https://registry.npmjs.org/$(PKG_NPM_NAME)/-/
+PKG_HASH:=96996a97a5ba9cb2ad5fc5b249e2f653657e9c2bd6a45c8188ad64a76bf93340
PKG_BUILD_DEPENDS:=node/host
-PKG_NODE_VERSION:=`$(STAGING_DIR_HOSTPKG)/bin/node --version`
+PKG_USE_MIPS16:=0
-PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>
-PKG_LICENSE:=Custom
+PKG_MAINTAINER:=Hirokazu MORIKAWA <morikw2@gmail.com>
+PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
SUBMENU:=Node.js
SECTION:=lang
CATEGORY:=Languages
- TITLE:=Node.js package to access serial ports for reading and writing
- URL:=https://www.npmjs.org/package/serialport
- DEPENDS:=+node +node-npm
+ TITLE:=Node.js package to access serial ports
+ URL:=https://serialport.io/
+ DEPENDS:=+node +node-npm +node-serialport-bindings
endef
define Package/node-serialport/description
Node.js package to access serial ports for reading and writing OR Welcome your robotic JavaScript overlords. Better yet, program them!
endef
-define Build/Prepare
- /bin/tar xzf $(DL_DIR)/$(PKG_SOURCE) -C $(PKG_BUILD_DIR) --strip-components 1
- $(Build/Patch)
-endef
+TAR_OPTIONS+= --strip-components 1
+TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS)
-CPU:=$(subst x86_64,x64,$(subst i386,ia32,$(ARCH)))
+NODEJS_CPU:=$(subst powerpc,ppc,$(subst aarch64,arm64,$(subst x86_64,x64,$(subst i386,ia32,$(ARCH)))))
+TMPNPM:=$(shell mktemp -u XXXXXXXXXX)
-EXTRA_LDFLAGS="-L$(TOOLCHAIN_DIR)/lib/ -Wl,-rpath-link $(TOOLCHAIN_DIR)/lib/" \
+TARGET_CFLAGS+=$(FPIC)
define Build/Compile
- cd $(PKG_BUILD_DIR) ; \
+ $(MAKE_VARS) \
$(MAKE_FLAGS) \
- npm_config_arch=$(CONFIG_ARCH) \
- npm_config_nodedir=$(BUILD_DIR)/node-$(PKG_NODE_VERSION)/ \
- npm_config_cache=$(BUILD_DIR)/node-$(PKG_NODE_VERSION)/npm-cache \
- PREFIX="$(PKG_INSTALL_DIR)/usr/" \
- npm install --build-from-source --target_arch=$(CPU) -g \
- `npm pack $(PKG_BUILD_DIR) | tail -n 1`
+ npm_config_arch=$(NODEJS_CPU) \
+ npm_config_target_arch=$(NODEJS_CPU) \
+ npm_config_build_from_source=true \
+ npm_config_nodedir=$(STAGING_DIR)/usr/ \
+ npm_config_prefix=$(PKG_INSTALL_DIR)/usr/ \
+ npm_config_cache=$(TMP_DIR)/npm-cache-$(TMPNPM) \
+ npm_config_tmp=$(TMP_DIR)/npm-tmp-$(TMPNPM) \
+ npm install -g --build-from-source $(PKG_BUILD_DIR)
+ rm -rf $(TMP_DIR)/npm-tmp-$(TMPNPM)
+ rm -rf $(TMP_DIR)/npm-cache-$(TMPNPM)
endef
define Package/node-serialport/install
- mkdir -p $(1)/usr/lib/node/
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/* $(1)/usr/lib/node/
- $(RM) -rf $(1)/usr/lib/node/node-hid/patches \
- $(1)/usr/lib/node/node-hid/.p* \
- $(1)/usr/lib/node/node-hid/.quilt* \
- $(1)/usr/lib/node/node-hid/.built* \
- $(1)/usr/lib/node/node-hid/.config*
- # Strip PKG_BUILD_DIR from useless metadata inserted by npm install
- # https://github.com/npm/npm/issues/10393
- # https://github.com/npm/npm/issues/12110
- find $(1)/usr/lib/node -name package.json -exec sed -i -e 's,$(PKG_BUILD_DIR),,g' {} +
+ $(INSTALL_DIR) $(1)/usr/lib/node/$(PKG_NPM_NAME)
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/$(PKG_NPM_NAME)/{package.json,LICENSE,*.md} \
+ $(1)/usr/lib/node/$(PKG_NPM_NAME)/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/$(PKG_NPM_NAME)/test.js \
+ $(1)/usr/lib/node/$(PKG_NPM_NAME)/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/$(PKG_NPM_NAME)/{node_modules,lib} \
+ $(1)/usr/lib/node/$(PKG_NPM_NAME)/
endef
$(eval $(call BuildPackage,node-serialport))
-
--- /dev/null
+--- a/package.json
++++ b/package.json
+@@ -41,7 +41,6 @@
+ ],
+ "dependencies": {
+ "@serialport/binding-mock": "^2.0.5",
+- "@serialport/bindings": "^2.0.8",
+ "@serialport/parser-byte-length": "^2.0.2",
+ "@serialport/parser-cctalk": "^2.0.2",
+ "@serialport/parser-delimiter": "^2.0.2",
include $(TOPDIR)/rules.mk
PKG_NAME:=node
-PKG_VERSION:=v8.14.1
-PKG_RELEASE:=1
+PKG_VERSION:=v8.16.0
+PKG_RELEASE:=2
PKG_SOURCE:=node-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://nodejs.org/dist/${PKG_VERSION}
-PKG_HASH:=b1df87803ddffb76fc6739f025f69f6b8288514fcd2f278f0d675ac3d52a6b9b
+PKG_HASH:=3515e8e01568a5dc4dff3d91a76ebc6724f5fa2fbb58b4b0c5da7b178a2f7340
HOST_BUILD_DEPENDS:=python/host
PKG_BUILD_DEPENDS:=python/host
SUBMENU:=Node.js
TITLE:=Node.js is a platform built on Chrome's JavaScript runtime
URL:=https://nodejs.org/
- DEPENDS:=@(HAS_FPU||KERNEL_MIPS_FPU_EMULATOR) +libstdcpp +libopenssl +zlib +libnghttp2 +libuv +libhttp-parser +USE_UCLIBC:libpthread +USE_UCLIBC:librt +NODEJS_ICU:icu
+ DEPENDS:=@(HAS_FPU||KERNEL_MIPS_FPU_EMULATOR) @!arc @!armeb \
+ +libstdcpp +libopenssl +zlib +libnghttp2 +libuv +libhttp-parser \
+ +NODEJS_ICU:icu
endef
define Package/node/description
endef
define Package/node/config
- menu "Module Selection"
+ if PACKAGE_node
config NODEJS_ICU
bool "enable i18n features"
default n
- endmenu
+ endif
endef
NODEJS_CPU:=$(subst powerpc,ppc,$(subst aarch64,arm64,$(subst x86_64,x64,$(subst i386,ia32,$(ARCH)))))
BIO_get_mem_ptr(bio, &mem);
info->Set(context, env->valid_to_string(),
String::NewFromUtf8(env->isolate(), mem->data,
-@@ -6194,8 +6208,12 @@ void TimingSafeEqual(const FunctionCallbackInfo<Value>& args) {
+@@ -6191,8 +6205,12 @@ void TimingSafeEqual(const FunctionCallbackInfo<Value>& args) {
}
void InitCryptoOnce() {
// --openssl-config=...
if (!openssl_config.empty()) {
-@@ -6217,10 +6235,10 @@ void InitCryptoOnce() {
+@@ -6214,10 +6232,10 @@ void InitCryptoOnce() {
}
}
--- /dev/null
+--- a/deps/v8/src/libsampler/sampler.cc
++++ b/deps/v8/src/libsampler/sampler.cc
+@@ -456,8 +456,12 @@
+ reinterpret_cast<void*>(ucontext->uc_mcontext.regs->gpr[PT_R1]);
+ state->fp =
+ reinterpret_cast<void*>(ucontext->uc_mcontext.regs->gpr[PT_R31]);
+-#else
++#elif V8_TARGET_ARCH_32_BIT
+ // Some C libraries, notably Musl, define the regs member as a void pointer
++ state->pc = reinterpret_cast<void*>(ucontext->uc_mcontext.gregs[32]);
++ state->sp = reinterpret_cast<void*>(ucontext->uc_mcontext.gregs[1]);
++ state->fp = reinterpret_cast<void*>(ucontext->uc_mcontext.gregs[31]);
++#else
+ state->pc = reinterpret_cast<void*>(ucontext->uc_mcontext.gp_regs[32]);
+ state->sp = reinterpret_cast<void*>(ucontext->uc_mcontext.gp_regs[1]);
+ state->fp = reinterpret_cast<void*>(ucontext->uc_mcontext.gp_regs[31]);
--- /dev/null
+--- a/configure
++++ b/configure
+@@ -60,7 +60,7 @@
+
+ valid_os = ('win', 'mac', 'solaris', 'freebsd', 'openbsd', 'linux',
+ 'android', 'aix')
+-valid_arch = ('arm', 'arm64', 'ia32', 'mips', 'mipsel', 'mips64el', 'ppc',
++valid_arch = ('arm', 'arm64', 'ia32', 'mips', 'mipsel', 'mips64', 'mips64el', 'ppc',
+ 'ppc64', 'x32','x64', 'x86', 'x86_64', 's390', 's390x')
+ valid_arm_float_abi = ('soft', 'softfp', 'hard')
+ valid_arm_fpu = ('vfp', 'vfpv3', 'vfpv3-d16', 'neon')
+@@ -795,6 +795,9 @@
+ if rtn == 'mipsel' and '_LP64' in k:
+ rtn = 'mips64el'
+
++ if rtn == 'mips' and '_LP64' in k:
++ rtn = 'mips64'
++
+ return rtn
+
+
+@@ -877,7 +880,7 @@
+
+ if target_arch == 'arm':
+ configure_arm(o)
+- elif target_arch in ('mips', 'mipsel', 'mips64el'):
++ elif target_arch in ('mips', 'mipsel', 'mips64', 'mips64el'):
+ configure_mips(o)
+
+ if flavor == 'aix':
include $(TOPDIR)/rules.mk
PKG_NAME:=perl-cgi
-PKG_VERSION:=4.40
+PKG_VERSION:=4.42
PKG_RELEASE:=1
-PKG_SOURCE_URL:=http://www.cpan.org/authors/id/L/LE/LEEJO
+PKG_SOURCE_URL:=https://www.cpan.org/authors/id/L/LE/LEEJO
PKG_SOURCE:=CGI-$(PKG_VERSION).tar.gz
-PKG_HASH:=10efff3061b3c31a33b3cc59f955aef9c88d57d12dbac46389758cef92f24f56
+PKG_HASH:=11d308e7dad2312d65747a7fdec5d0c22024c28df5e882e829ca1553482024e7
-PKG_LICENSE:=GPL Artistic-2.0
+PKG_LICENSE:=Artistic-2.0
PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>, \
Philip Prindeville <philipp@redfish-solutions.com>
SECTION:=lang
CATEGORY:=Languages
TITLE:=Handle Common Gateway Interface requests and responses
- URL:=http://search.cpan.org/dist/CGI/
+ URL:=https://search.cpan.org/dist/CGI/
DEPENDS:=perl +perl-html-parser +perlbase-base +perlbase-config +perlbase-encode +perlbase-essential +perlbase-file +perlbase-if +perlbase-utf8
endef
include $(TOPDIR)/rules.mk
PKG_NAME:=perl-device-usb
-PKG_VERSION:=0.36
+PKG_VERSION:=0.37
PKG_RELEASE:=1
-PKG_SOURCE_URL:=http://www.cpan.org/authors/id/G/GW/GWADEJ/
+PKG_SOURCE_URL:=https://www.cpan.org/authors/id/G/GW/GWADEJ/
PKG_SOURCE:=Device-USB-$(PKG_VERSION).tar.gz
-PKG_HASH:=fac2eb4f9e8db08b46d734ba8a2076598f974c274a91b248613fcecd7c9fc175
+PKG_HASH:=0dd58d9c627b3c539d07263a7b96e1de2adea3a4ddb118cdd45aa638f8702e49
PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
SECTION:=lang
CATEGORY:=Languages
TITLE:=libusb library wrapper
- URL:=http://search.cpan.org/dist/Device-USB/
+ URL:=https://search.cpan.org/dist/Device-USB/
DEPENDS:=perl +libusb-compat +perl-inline +perl-inline-c +perlbase-essential +perlbase-test
endef
+++ /dev/null
-Subject: Just assume libusb is out there
- Makefile.PL should not try to check for libusb in a given list of directories
- as the compiler might look in other places as well.
-Origin: vendor
-Bug-Debian: http://bugs.debian.org/639677
-Forwarded: not-needed
-From: Ansgar Burchardt <ansgar@debian.org>
-Reviewed-by: gregor herrmann <gregoa@debian.org>
-Last-Update: 2013-10-28
-
---- libdevice-usb-perl.orig/Makefile.PL
-+++ libdevice-usb-perl/Makefile.PL
-@@ -21,7 +21,7 @@
- }
- }
-
--unless(header_found())
-+unless(1 || header_found())
- {
- die <<"END";
- ERROR: Can't find usb.h header.
-@@ -36,7 +36,7 @@
- END
- }
-
--unless(lib_found())
-+unless(1 || lib_found())
- {
- die <<"END";
- ERROR: Can't find libusb library.
--- /dev/null
+Subject: Just assume libusb is out there
+ Makefile.PL should not try to check for libusb in a given list of directories
+ as the compiler might look in other places as well.
+Origin: vendor
+Bug-Debian: http://bugs.debian.org/639677
+Forwarded: not-needed
+From: Ansgar Burchardt <ansgar@debian.org>
+Reviewed-by: gregor herrmann <gregoa@debian.org>
+Last-Update: 2013-10-28
+
+--- libdevice-usb-perl.orig/Makefile.PL
++++ libdevice-usb-perl/Makefile.PL
+@@ -21,7 +21,7 @@
+ }
+ }
+
+-unless(header_found())
++unless(1 || header_found())
+ {
+ die <<"END";
+ ERROR: Can't find usb.h header.
+@@ -36,7 +36,7 @@
+ END
+ }
+
+-unless(lib_found())
++unless(1 || lib_found())
+ {
+ die <<"END";
+ ERROR: Can't find libusb library.
@@ -15,6 +15,7 @@ use Inline (
($ENV{LIBUSB_INCDIR} ? ( INC => "-I\"$ENV{LIBUSB_INCDIR}\"" ) : () ),
NAME => 'Device::USB',
- VERSION => '0.36',
+ VERSION => '0.37',
+ PREFIX => 'deviceusb_',
);
include $(TOPDIR)/rules.mk
PKG_NAME:=perl-inline
-PKG_VERSION:=0.80
+PKG_VERSION:=0.82
PKG_RELEASE:=1
-PKG_SOURCE_URL:=http://www.cpan.org/authors/id/I/IN/INGY
PKG_SOURCE:=Inline-$(PKG_VERSION).tar.gz
-PKG_HASH:=7e2bd984b1ebd43e336b937896463f2c6cb682c956cbd2c311a464363d2ccef6
+PKG_SOURCE_URL:=https://cpan.metacpan.org/authors/id/T/TI/TINITA
+PKG_HASH:=1af94a8e95e4ba4545592341c47d8d1dc45b01822b877f7d3095a438566e874b
-PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
+PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
+PKG_LICENSE_FILES:=LICENSE
PKG_BUILD_DIR:=$(BUILD_DIR)/perl/Inline-$(PKG_VERSION)
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/perl/Inline-$(PKG_VERSION)
SECTION:=lang
CATEGORY:=Languages
TITLE:=Write subroutines in other languages
- URL:=http://search.cpan.org/dist/Inline/
+ URL:=https://search.cpan.org/dist/Inline/
DEPENDS:=perl +perlbase-base +perlbase-config +perlbase-cwd +perlbase-digest +perlbase-essential +perlbase-fcntl +perlbase-file
endef
include $(TOPDIR)/rules.mk
PKG_NAME:=perl-parse-recdescent
-PKG_VERSION:=1.967013
+PKG_VERSION:=1.967015
PKG_RELEASE:=1
-PKG_SOURCE_URL:=http://www.cpan.org/authors/id/J/JT/JTBRAUN
+PKG_SOURCE_URL:=https://www.cpan.org/authors/id/J/JT/JTBRAUN
PKG_SOURCE:=Parse-RecDescent-$(PKG_VERSION).tar.gz
-PKG_HASH:=226590d3850cd1678deb0190d5207b3477fb9070a8ca6f18d8999daf44485930
+PKG_HASH:=1943336a4cb54f1788a733f0827c0c55db4310d5eae15e542639c9dd85656e37
PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
include $(TOPDIR)/rules.mk
PKG_NAME:=perl-text-csv_xs
-PKG_VERSION:=1.37
+PKG_VERSION:=1.39
PKG_RELEASE:=1
PKG_SOURCE_URL:=https://www.cpan.org/authors/id/H/HM/HMBRAND/
PKG_SOURCE:=Text-CSV_XS-$(PKG_VERSION).tgz
-PKG_HASH:=20e16da9c38b0938f308c01d954f49d2c6922bac0d2d979bf2ad483fe7476ba2
+PKG_HASH:=aa4e424eaf68bea0d0e8c16b961c942b64926e6183ce1dbbc6c799eafb0a9ebd
PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
PKG_MAINTAINER:=Philip Prindeville <philipp@redfish-solutions.com>
CATEGORY:=Languages
TITLE:=The Perl intepreter
URL:=http://www.perl.com/
- DEPENDS:=+USE_GLIBC:libbsd +PERL_THREADS:libpthread
+ DEPENDS:=+USE_GLIBC:libbsd +PERL_THREADS:libpthread @!arc
endef
define Package/perl/description
PECL_LONGNAME:=Extended HTTP Support
PKG_VERSION:=3.2.0
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_HASH:=6fb7f038365fb1f3302f1b7e7d6b55d5c422bdea36057b1efe02bbe6ad3cc01b
PKG_NAME:=php7-pecl-http
PECL_cv_HAVE_LIBCURL_SecureTransport=no \
PECL_cv_HAVE_LIBCURL_GSKit=no \
PECL_cv_HAVE_LIBCURL_PolarSSL=no \
- PECL_cv_HAVE_LIBCURL_WolfSSL=$(if $(CONFIG_LIBCURL_CYASSL),yes,no) \
+ PECL_cv_HAVE_LIBCURL_WolfSSL=$(if $(CONFIG_LIBCURL_WOLFSSL),yes,no) \
PECL_cv_HAVE_LIBCURL_mbedTLS=$(if $(CONFIG_LIBCURL_MBEDTLS),yes,no) \
PECL_cv_HAVE_LIBCURL_axTLS=no \
PECL_cv_LIBCURL_TLSAUTH_SRP=$(if $(CONFIG_LIBCURL_TLS_SRP),yes,no) \
PECL_NAME:=mcrypt
PECL_LONGNAME:=Bindings for the libmcrypt library
-PKG_VERSION:=1.0.1
+PKG_VERSION:=1.0.2
PKG_RELEASE:=1
-PKG_HASH:=a3b0e5493b5cd209ab780ee54733667293d369e6b7052b4a7dab9dd0def46ac6
+PKG_HASH:=4d21dd20bfdc3cf4d43c967abdd137224f9c56258ca28ee0bc66ce130e01cae4
PKG_NAME:=php7-pecl-mcrypt
PKG_SOURCE:=$(PECL_NAME)-$(PKG_VERSION).tgz
--- /dev/null
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PECL_NAME:=redis
+PECL_LONGNAME:=PHP extension for interfacing with Redis
+
+PKG_VERSION:=4.3.0
+PKG_RELEASE:=1
+PKG_HASH:=c0f04cec349960a842b60920fb8a433656e2e494eaed6e663397d67102a51ba2
+
+PKG_NAME:=php7-pecl-redis
+PKG_SOURCE:=$(PECL_NAME)-$(PKG_VERSION).tgz
+PKG_SOURCE_URL:=http://pecl.php.net/get/
+
+PKG_MAINTAINER:=Michael Heimpold <mhei@heimpold.de>
+
+PKG_LICENSE:=PHPv3.01
+PKG_LICENSE_FILES:=COPYING
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/pecl-php7/$(PECL_NAME)-$(PKG_VERSION)
+PKG_BUILD_PARALLEL:=1
+
+PKG_FIXUP:=autoreconf
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/nls.mk
+include ../php7/pecl.mk
+
+CONFIGURE_ARGS+= \
+ --enable-redis \
+ --disable-redis-igbinary \
+ --disable-redis-lzf
+
+$(eval $(call PECLPackage,$(PECL_NAME),$(PECL_LONGNAME),+php7-mod-hash +php7-mod-session,25))
+$(eval $(call BuildPackage,$(PKG_NAME)))
include $(TOPDIR)/rules.mk
PKG_NAME:=php
-PKG_VERSION:=7.2.15
+PKG_VERSION:=7.2.19
PKG_RELEASE:=1
PKG_MAINTAINER:=Michael Heimpold <mhei@heimpold.de>
PKG_LICENSE:=PHPv3.01
PKG_LICENSE_FILES:=LICENSE
+PKG_CPE_ID:=cpe:/a:php:php
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=http://www.php.net/distributions/
-PKG_HASH:=75e90012faef700dffb29311f3d24fa25f1a5e0f70254a9b8d5c794e25e938ce
+PKG_HASH:=4ffa2404a88d60e993a9fe69f829ebec3eb1e006de41b6048ce5e91bbeaa9282
PKG_FIXUP:=libtool autoreconf
PKG_BUILD_PARALLEL:=1
local port
config_get_bool enabled "$section" 'enabled' 0
- config_get port "$section" 'port' 1026
+ config_get port "$section" 'port'
[ $enabled -gt 0 ] || return 1
PHP_FCGI_CHILDREN='' \
- service_start /usr/bin/php-fcgi -b $port
+ service_start /usr/bin/php-fcgi ${port:+-b $port}
}
start() {
+From: Debian PHP Maintainers <team+pkg-php@tracker.debian.org>
+Date: Thu, 7 Mar 2019 19:36:30 +0000
+Subject: Add-support-for-use-of-the-system-timezone-database
+
+# License: MIT
+# http://opensource.org/licenses/MIT
+
# License: MIT
# http://opensource.org/licenses/MIT
than embedding a copy. Discussed upstream but was not desired.
History:
+r17: adapt for autotool change in 7.2.16RC1
+r16: adapt for timelib 2017.06 (in 7.2.3RC1)
r15: adapt for timelib 2017.05beta7 (in 7.2.0RC1)
r14: improve check for valid tz file
r13: adapt for upstream changes to use PHP allocator
r3: fix a crash if /usr/share/zoneinfo doesn't exist (Raphael Geissert)
r2: add filesystem trawl to set up name alias index
r1: initial revision
+---
+ ext/date/config0.m4 | 13 ++
+ ext/date/lib/parse_tz.c | 536 +++++++++++++++++++++++++++++++++++++++++++++++-
+ 2 files changed, 546 insertions(+), 3 deletions(-)
-diff -up ./ext/date/lib/parse_tz.c.systzdata ./ext/date/lib/parse_tz.c
---- ./ext/date/lib/parse_tz.c.systzdata 2017-08-22 09:40:38.000000000 +0200
-+++ ./ext/date/lib/parse_tz.c 2017-08-22 12:16:00.370298079 +0200
+diff --git a/ext/date/config0.m4 b/ext/date/config0.m4
+index e464156..00dae8b 100644
+--- a/ext/date/config0.m4
++++ b/ext/date/config0.m4
+@@ -10,6 +10,19 @@ io.h
+ dnl Check for strtoll, atoll
+ AC_CHECK_FUNCS(strtoll atoll)
+
++PHP_ARG_WITH(system-tzdata, for use of system timezone data,
++[ --with-system-tzdata[=DIR] to specify use of system timezone data],
++no, no)
++
++if test "$PHP_SYSTEM_TZDATA" != "no"; then
++ AC_DEFINE(HAVE_SYSTEM_TZDATA, 1, [Define if system timezone data is used])
++
++ if test "$PHP_SYSTEM_TZDATA" != "yes"; then
++ AC_DEFINE_UNQUOTED(HAVE_SYSTEM_TZDATA_PREFIX, "$PHP_SYSTEM_TZDATA",
++ [Define for location of system timezone data])
++ fi
++fi
++
+ PHP_DATE_CFLAGS="-I@ext_builddir@/lib -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -DHAVE_TIMELIB_CONFIG_H=1"
+ timelib_sources="lib/astro.c lib/dow.c lib/parse_date.c lib/parse_tz.c
+ lib/timelib.c lib/tm2unixtime.c lib/unixtime2tm.c lib/parse_iso_intervals.c lib/interval.c"
+diff --git a/ext/date/lib/parse_tz.c b/ext/date/lib/parse_tz.c
+index 960e528..501b09e 100644
+--- a/ext/date/lib/parse_tz.c
++++ b/ext/date/lib/parse_tz.c
@@ -25,8 +25,21 @@
#include "timelib.h"
#include "timelib_private.h"
#if (defined(__APPLE__) || defined(__APPLE_CC__)) && (defined(__BIG_ENDIAN__) || defined(__LITTLE_ENDIAN__))
# if defined(__LITTLE_ENDIAN__)
-@@ -67,6 +80,11 @@ static int read_php_preamble(const unsig
+@@ -67,6 +80,11 @@ static int read_php_preamble(const unsigned char **tzf, timelib_tzinfo *tz)
{
uint32_t version;
/* read ID */
version = (*tzf)[3] - '0';
*tzf += 4;
-@@ -374,7 +392,429 @@ void timelib_dump_tzinfo(timelib_tzinfo
+@@ -374,7 +392,429 @@ void timelib_dump_tzinfo(timelib_tzinfo *tz)
}
}
+ }
+
+ for (l = li[hash]; l; l = l->next) {
-+ if (strcasecmp(l->name, name) == 0)
++ if (timelib_strcasecmp(l->name, name) == 0)
+ return l;
+ }
+
+{
+ const timelib_tzdb_index_entry *alpha = first, *beta = second;
+
-+ return strcasecmp(alpha->id, beta->id);
++ return timelib_strcasecmp(alpha->id, beta->id);
+}
+
+
+static int inmem_seek_to_tz_position(const unsigned char **tzf, char *timezone, const timelib_tzdb *tzdb)
{
int left = 0, right = tzdb->index_size - 1;
- #ifdef HAVE_SETLOCALE
-@@ -419,9 +859,48 @@ static int seek_to_tz_position(const uns
+
+@@ -400,9 +840,48 @@ static int seek_to_tz_position(const unsigned char **tzf, char *timezone, const
return 0;
}
+#endif
}
- const timelib_tzdb_index_entry *timelib_timezone_identifiers_list(timelib_tzdb *tzdb, int *count)
-@@ -433,7 +912,30 @@ const timelib_tzdb_index_entry *timelib_
+ const timelib_tzdb_index_entry *timelib_timezone_identifiers_list(const timelib_tzdb *tzdb, int *count)
+@@ -414,7 +893,30 @@ const timelib_tzdb_index_entry *timelib_timezone_identifiers_list(const timelib_
int timelib_timezone_id_is_valid(char *timezone, const timelib_tzdb *tzdb)
{
const unsigned char *tzf;
}
static int skip_64bit_preamble(const unsigned char **tzf, timelib_tzinfo *tz)
-@@ -475,12 +977,14 @@ static timelib_tzinfo* timelib_tzinfo_ct
+@@ -456,12 +958,14 @@ static timelib_tzinfo* timelib_tzinfo_ctor(char *name)
timelib_tzinfo *timelib_parse_tzfile(char *timezone, const timelib_tzdb *tzdb, int *error_code)
{
const unsigned char *tzf;
tmp = timelib_tzinfo_ctor(timezone);
version = read_preamble(&tzf, tmp, &type);
-@@ -503,6 +1007,29 @@ timelib_tzinfo *timelib_parse_tzfile(cha
+@@ -484,6 +988,29 @@ timelib_tzinfo *timelib_parse_tzfile(char *timezone, const timelib_tzdb *tzdb, i
timelib_tzinfo_dtor(tmp);
return NULL;
}
if (version == 2 || version == 3) {
if (!skip_64bit_preamble(&tzf, tmp)) {
/* 64 bit preamble is not in place */
-@@ -520,6 +1047,9 @@ timelib_tzinfo *timelib_parse_tzfile(cha
+@@ -501,6 +1028,9 @@ timelib_tzinfo *timelib_parse_tzfile(char *timezone, const timelib_tzdb *tzdb, i
} else {
set_default_location_and_comments(&tzf, tmp);
}
} else {
*error_code = TIMELIB_ERROR_NO_SUCH_TIMEZONE;
tmp = NULL;
-diff -up ./ext/date/lib/timelib.m4.systzdata ./ext/date/lib/timelib.m4
---- ./ext/date/lib/timelib.m4.systzdata 2017-08-22 09:40:38.000000000 +0200
-+++ ./ext/date/lib/timelib.m4 2017-08-22 11:32:29.357799927 +0200
-@@ -81,3 +81,16 @@ io.h
-
- dnl Check for strtoll, atoll
- AC_CHECK_FUNCS(strtoll atoll strftime gettimeofday)
-+
-+PHP_ARG_WITH(system-tzdata, for use of system timezone data,
-+[ --with-system-tzdata[=DIR] to specify use of system timezone data],
-+no, no)
-+
-+if test "$PHP_SYSTEM_TZDATA" != "no"; then
-+ AC_DEFINE(HAVE_SYSTEM_TZDATA, 1, [Define if system timezone data is used])
-+
-+ if test "$PHP_SYSTEM_TZDATA" != "yes"; then
-+ AC_DEFINE_UNQUOTED(HAVE_SYSTEM_TZDATA_PREFIX, "$PHP_SYSTEM_TZDATA",
-+ [Define for location of system timezone data])
-+ fi
-+fi
index cbe6e91..1999c83 100644
--- a/ext/date/php_date.c
+++ b/ext/date/php_date.c
-@@ -1003,6 +1003,23 @@ static char* guess_timezone(const timelib_tzdb *tzdb)
+@@ -1016,6 +1016,23 @@ static char* guess_timezone(const timelib_tzdb *tzdb)
DATEG(timezone_valid) = 1;
return DATEG(default_timezone);
}
*aix*)
--- a/sapi/cgi/cgi_main.c
+++ b/sapi/cgi/cgi_main.c
-@@ -2427,9 +2427,9 @@ consult the installation file that came
+@@ -2442,9 +2442,9 @@ consult the installation file that came
SG(request_info).no_headers = 1;
}
#if ZEND_DEBUG
--- a/ext/opcache/ZendAccelerator.c
+++ b/ext/opcache/ZendAccelerator.c
-@@ -2456,11 +2456,6 @@ static void accel_gen_system_id(void)
+@@ -2484,11 +2484,6 @@ static void accel_gen_system_id(void)
PHP_MD5Update(&context, PHP_VERSION, sizeof(PHP_VERSION)-1);
PHP_MD5Update(&context, ZEND_EXTENSION_BUILD_ID, sizeof(ZEND_EXTENSION_BUILD_ID)-1);
PHP_MD5Update(&context, ZEND_BIN_ID, sizeof(ZEND_BIN_ID)-1);
c = digest[i] >> 4;
--- a/sapi/litespeed/lsapi_main.c
+++ b/sapi/litespeed/lsapi_main.c
-@@ -1034,9 +1034,9 @@ static int cli_main( int argc, char * ar
+@@ -1057,9 +1057,9 @@ static int cli_main( int argc, char * ar
case 'v':
if (php_request_startup() != FAILURE) {
#if ZEND_DEBUG
index b7e4835..7b6c0aa 100644
--- a/ext/opcache/config.m4
+++ b/ext/opcache/config.m4
-@@ -11,127 +11,13 @@ if test "$PHP_OPCACHE" != "no"; then
- AC_DEFINE(HAVE_MPROTECT, 1, [Define if you have mprotect() function])
- ])
+@@ -28,127 +28,13 @@ if test "$PHP_OPCACHE" != "no"; then
+
+ AC_CHECK_HEADERS([unistd.h sys/uio.h])
- AC_MSG_CHECKING(for sysvipc shared memory support)
- AC_TRY_RUN([
])
PHP_NEW_EXTENSION(fileinfo, fileinfo.c $libmagic_sources, $ext_shared,,-I@ext_srcdir@/libmagic)
---- a/ext/opcache/config.m4
-+++ b/ext/opcache/config.m4
-@@ -232,6 +232,10 @@ int main() {
- flock_type=unknown
- AC_MSG_CHECKING(for struct flock layout)
-
-+dnl cross-compiling for Linux
-+flock_type=linux
-+AC_DEFINE([HAVE_FLOCK_LINUX], [], [Struct flock is Linux-type])
-+
- if test "$flock_type" = "unknown"; then
- AC_TRY_RUN([
- #include <fcntl.h>
--- a/configure.ac 2016-09-20 22:26:38.000000000 +0200
+++ b/configure.ac 2016-09-20 22:42:30.380101556 +0200
-@@ -1448,13 +1448,13 @@
+@@ -1454,13 +1454,13 @@
INLINE_CFLAGS="$INLINE_CFLAGS $standard_libtool_flag"
CXXFLAGS="$CXXFLAGS $standard_libtool_flag \$(PROF_FLAGS)"
index cb95d86..a63354f 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -1443,7 +1443,7 @@ PHP_ADD_SOURCES(main, main.c snprintf.c spprintf.c php_sprintf.c \
+@@ -1478,7 +1478,7 @@ PHP_ADD_SOURCES(main, main.c snprintf.c spprintf.c php_sprintf.c \
php_ini.c SAPI.c rfc1867.c php_content_types.c strlcpy.c \
strlcat.c explicit_bzero.c mergesort.c reentrancy.c php_variables.c php_ticks.c \
network.c php_open_temporary_file.c \
index 6cbb18b..71cf491 100644
--- a/win32/build/config.w32
+++ b/win32/build/config.w32
-@@ -244,7 +244,8 @@ ADD_FLAG("CFLAGS_BD_ZEND", "/D ZEND_ENABLE_STATIC_TSRMLS_CACHE=1");
+@@ -241,7 +241,8 @@ ADD_FLAG("CFLAGS_BD_ZEND", "/D ZEND_ENABLE_STATIC_TSRMLS_CACHE=1");
ADD_SOURCES("main", "main.c snprintf.c spprintf.c getopt.c fopen_wrappers.c \
php_scandir.c php_ini.c SAPI.c rfc1867.c php_content_types.c strlcpy.c \
strlcat.c mergesort.c reentrancy.c php_variables.c php_ticks.c network.c \
-commit 31e53f07c26e5ac75ec2c2d99497439323dbdaf7
-Author: Philip Prindeville <philipp@redfish-solutions.com>
-Date: Wed Jan 24 18:47:19 2018 -0700
-
- Be consistent in clearing out in php_iconv_string()
-
- Also, don't bother checking returned point in error case since it
- will always be NULL (and not require free()ing, obviously).
-
-diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c
-index 35dafd4..4289242 100644
---- a/ext/iconv/iconv.c
-+++ b/ext/iconv/iconv.c
-@@ -559,6 +559,8 @@ PHP_ICONV_API php_iconv_err_t php_iconv_string(const char *in_p, size_t in_len,
- size_t result;
- zend_string *ret, *out_buffer;
-
-+ *out = NULL;
-+
- /*
- This is not the right way to get output size...
- This is not space efficient for large text.
-
commit 3763c8f1645983b5abc37c60597e1ecc1bf89019
Author: Philip Prindeville <philipp@redfish-solutions.com>
Date: Thu Jan 25 14:18:00 2018 -0700
index 4289242..807bb14 100644
--- a/ext/iconv/iconv.c
+++ b/ext/iconv/iconv.c
-@@ -697,6 +697,7 @@ PHP_ICONV_API php_iconv_err_t php_iconv_string(const char *in_p, size_t in_len,
+@@ -699,6 +699,7 @@ PHP_ICONV_API php_iconv_err_t php_iconv_string(const char *in_p, size_t in_len,
iconv_close(cd);
if (result == (size_t)(-1)) {
switch (errno) {
case EINVAL:
retval = PHP_ICONV_ERR_ILLEGAL_CHAR;
-@@ -713,7 +714,6 @@ PHP_ICONV_API php_iconv_err_t php_iconv_string(const char *in_p, size_t in_len,
+@@ -715,7 +716,6 @@ PHP_ICONV_API php_iconv_err_t php_iconv_string(const char *in_p, size_t in_len,
default:
/* other error */
return PHP_ICONV_ERR_UNKNOWN;
}
}
-@@ -986,9 +986,6 @@ static php_iconv_err_t _php_iconv_strpos(size_t *pretval,
+@@ -988,9 +988,6 @@ static php_iconv_err_t _php_iconv_strpos(size_t *pretval,
err = php_iconv_string(ndl, ndl_nbytes, &ndl_buf, GENERIC_SUPERSET_NAME, enc);
if (err != PHP_ICONV_ERR_SUCCESS) {
return err;
}
-@@ -2465,9 +2462,6 @@ PHP_NAMED_FUNCTION(php_if_iconv)
+@@ -2494,9 +2491,6 @@ PHP_NAMED_FUNCTION(php_if_iconv)
if (err == PHP_ICONV_ERR_SUCCESS && out_buffer != NULL) {
RETVAL_STR(out_buffer);
} else {
--- /dev/null
+--- a/ext/ftp/php_ftp.c
++++ b/ext/ftp/php_ftp.c
+@@ -320,12 +320,14 @@ static void ftp_destructor_ftpbuf(zend_resource *rsrc)
+ PHP_MINIT_FUNCTION(ftp)
+ {
+ #ifdef HAVE_FTP_SSL
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ SSL_library_init();
+ OpenSSL_add_all_ciphers();
+ OpenSSL_add_all_digests();
+ OpenSSL_add_all_algorithms();
+
+ SSL_load_error_strings();
++#endif
+ #endif
+
+ le_ftpbuf = zend_register_list_destructors_ex(ftp_destructor_ftpbuf, NULL, le_ftpbuf_name, module_number);
+--- a/ext/openssl/openssl.c
++++ b/ext/openssl/openssl.c
+@@ -683,6 +683,12 @@ static const unsigned char *ASN1_STRING_get0_data(const ASN1_STRING *asn1)
+ return M_ASN1_STRING_data(asn1);
+ }
+
++#define OpenSSL_version OpenSSL_version
++#define OPENSSL_VERSION OPENSSL_VERSION
++#define X509_getm_notBefore X509_get_notBefore
++#define X509_getm_notAfter X509_get_notAfter
++#define EVP_CIPHER_CTX_reset EVP_CIPHER_CTX_cleanup
++
+ #if PHP_OPENSSL_API_VERSION < 0x10002
+
+ static int X509_get_signature_nid(const X509 *x)
+@@ -1587,7 +1593,7 @@ PHP_MINFO_FUNCTION(openssl)
+ {
+ php_info_print_table_start();
+ php_info_print_table_row(2, "OpenSSL support", "enabled");
+- php_info_print_table_row(2, "OpenSSL Library Version", SSLeay_version(SSLEAY_VERSION));
++ php_info_print_table_row(2, "OpenSSL Library Version", OpenSSL_version(OPENSSL_VERSION));
+ php_info_print_table_row(2, "OpenSSL Header Version", OPENSSL_VERSION_TEXT);
+ php_info_print_table_row(2, "Openssl default config", default_ssl_conf_filename);
+ php_info_print_table_end();
+@@ -2361,11 +2367,11 @@ PHP_FUNCTION(openssl_x509_parse)
+ add_assoc_string(return_value, "serialNumberHex", hex_serial);
+ OPENSSL_free(hex_serial);
+
+- php_openssl_add_assoc_asn1_string(return_value, "validFrom", X509_get_notBefore(cert));
+- php_openssl_add_assoc_asn1_string(return_value, "validTo", X509_get_notAfter(cert));
++ php_openssl_add_assoc_asn1_string(return_value, "validFrom", X509_getm_notBefore(cert));
++ php_openssl_add_assoc_asn1_string(return_value, "validTo", X509_getm_notAfter(cert));
+
+- add_assoc_long(return_value, "validFrom_time_t", php_openssl_asn1_time_to_time_t(X509_get_notBefore(cert)));
+- add_assoc_long(return_value, "validTo_time_t", php_openssl_asn1_time_to_time_t(X509_get_notAfter(cert)));
++ add_assoc_long(return_value, "validFrom_time_t", php_openssl_asn1_time_to_time_t(X509_getm_notBefore(cert)));
++ add_assoc_long(return_value, "validTo_time_t", php_openssl_asn1_time_to_time_t(X509_getm_notAfter(cert)));
+
+ tmpstr = (char *)X509_alias_get0(cert, NULL);
+ if (tmpstr) {
+@@ -3455,8 +3461,8 @@ PHP_FUNCTION(openssl_csr_sign)
+ php_openssl_store_errors();
+ goto cleanup;
+ }
+- X509_gmtime_adj(X509_get_notBefore(new_cert), 0);
+- X509_gmtime_adj(X509_get_notAfter(new_cert), 60*60*24*(long)num_days);
++ X509_gmtime_adj(X509_getm_notBefore(new_cert), 0);
++ X509_gmtime_adj(X509_getm_notAfter(new_cert), 60*60*24*(long)num_days);
+ i = X509_set_pubkey(new_cert, key);
+ if (!i) {
+ php_openssl_store_errors();
+@@ -6072,7 +6078,7 @@ PHP_FUNCTION(openssl_seal)
+
+ /* allocate one byte extra to make room for \0 */
+ buf = emalloc(data_len + EVP_CIPHER_CTX_block_size(ctx));
+- EVP_CIPHER_CTX_cleanup(ctx);
++ EVP_CIPHER_CTX_reset(ctx);
+
+ if (EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) <= 0 ||
+ !EVP_SealUpdate(ctx, buf, &len1, (unsigned char *)data, (int)data_len) ||
+@@ -6622,7 +6628,7 @@ PHP_FUNCTION(openssl_encrypt)
+ if (free_iv) {
+ efree(iv);
+ }
+- EVP_CIPHER_CTX_cleanup(cipher_ctx);
++ EVP_CIPHER_CTX_reset(cipher_ctx);
+ EVP_CIPHER_CTX_free(cipher_ctx);
+ }
+ /* }}} */
+@@ -6709,7 +6715,7 @@ PHP_FUNCTION(openssl_decrypt)
+ if (base64_str) {
+ zend_string_release(base64_str);
+ }
+- EVP_CIPHER_CTX_cleanup(cipher_ctx);
++ EVP_CIPHER_CTX_reset(cipher_ctx);
+ EVP_CIPHER_CTX_free(cipher_ctx);
+ }
+ /* }}} */
+--- a/ext/openssl/xp_ssl.c
++++ b/ext/openssl/xp_ssl.c
+@@ -56,8 +56,21 @@
+ #define HAVE_SSL3 1
+ #endif
+
++#if PHP_OPENSSL_API_VERSION >= 0x10100
++#define HAVE_TLS 1
++#endif
++
++#ifndef OPENSSL_NO_TLS1_METHOD
++#define HAVE_TLS1 1
++#endif
++
++#ifndef OPENSSL_NO_TLS1_1_METHOD
+ #define HAVE_TLS11 1
++#endif
++
++#ifndef OPENSSL_NO_TLS1_2_METHOD
+ #define HAVE_TLS12 1
++#endif
+
+ #ifndef OPENSSL_NO_ECDH
+ #define HAVE_ECDH 1
+@@ -78,9 +91,10 @@
+ #define STREAM_CRYPTO_IS_CLIENT (1<<0)
+ #define STREAM_CRYPTO_METHOD_SSLv2 (1<<1)
+ #define STREAM_CRYPTO_METHOD_SSLv3 (1<<2)
+-#define STREAM_CRYPTO_METHOD_TLSv1_0 (1<<3)
+-#define STREAM_CRYPTO_METHOD_TLSv1_1 (1<<4)
+-#define STREAM_CRYPTO_METHOD_TLSv1_2 (1<<5)
++#define STREAM_CRYPTO_METHOD_TLS (1<<3)
++#define STREAM_CRYPTO_METHOD_TLSv1_0 (1<<4)
++#define STREAM_CRYPTO_METHOD_TLSv1_1 (1<<5)
++#define STREAM_CRYPTO_METHOD_TLSv1_2 (1<<6)
+
+ /* Simplify ssl context option retrieval */
+ #define GET_VER_OPT(name) \
+@@ -960,9 +974,23 @@ static const SSL_METHOD *php_openssl_select_crypto_method(zend_long method_value
+ php_error_docref(NULL, E_WARNING,
+ "SSLv3 unavailable in the OpenSSL library against which PHP is linked");
+ return NULL;
++#endif
++ } else if (method_value == STREAM_CRYPTO_METHOD_TLS) {
++#ifdef HAVE_TLS
++ return is_client ? TLS_client_method() : TLS_server_method();
++#else
++ php_error_docref(NULL, E_WARNING,
++ "TLS unavailable in the OpenSSL library against which PHP is linked");
++ return NULL;
+ #endif
+ } else if (method_value == STREAM_CRYPTO_METHOD_TLSv1_0) {
++#ifdef HAVE_TLS1
+ return is_client ? TLSv1_client_method() : TLSv1_server_method();
++#else
++ php_error_docref(NULL, E_WARNING,
++ "TLSv1 unavailable in the OpenSSL library against which PHP is linked");
++ return NULL;
++#endif
+ } else if (method_value == STREAM_CRYPTO_METHOD_TLSv1_1) {
+ #ifdef HAVE_TLS11
+ return is_client ? TLSv1_1_client_method() : TLSv1_1_server_method();
+@@ -1014,9 +1042,11 @@ static int php_openssl_get_crypto_method_ctx_flags(int method_flags) /* {{{ */
+ ssl_ctx_options |= SSL_OP_NO_SSLv3;
+ }
+ #endif
++#ifdef HAVE_TLS1
+ if (!(method_flags & STREAM_CRYPTO_METHOD_TLSv1_0)) {
+ ssl_ctx_options |= SSL_OP_NO_TLSv1;
+ }
++#endif
+ #ifdef HAVE_TLS11
+ if (!(method_flags & STREAM_CRYPTO_METHOD_TLSv1_1)) {
+ ssl_ctx_options |= SSL_OP_NO_TLSv1_1;
include $(TOPDIR)/rules.mk
PKG_NAME:=Flask
-PKG_VERSION:=1.0.2
+PKG_VERSION:=1.0.3
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/F/Flask
-PKG_HASH:=2271c0070dbcb5275fad4a82e29f23ab92682dc45f9dfbc22c02ba9b9322ce48
-PKG_BUILD_DEPENDS:=python python3
+PKG_HASH:=ad7c6d841e64296b962296c2c2dabc6543752985727af86a975072dea984b6f3
+
+PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
-PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
-
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-$(PKG_NAME)-$(PKG_VERSION)
-PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
include $(INCLUDE_DIR)/package.mk
include ../python3-package.mk
SECTION:=lang
CATEGORY:=Languages
SUBMENU:=Python
- URL:=http://github.com/pallets/flask/
TITLE:=python3-flask
+ URL:=https://github.com/pallets/flask/
DEPENDS:=+python3-asyncio +python3-click +python3-codecs +python3-decimal \
- +python3-itsdangerous +python3-jinja2 +python3-light +python3-logging \
- +python3-markupsafe +python3-multiprocessing +python3-werkzeug
+ +python3-itsdangerous +python3-jinja2 +python3 +python3-logging \
+ +python3-markupsafe +python3-multiprocessing +python3-setuptools \
+ +python3-werkzeug
VARIANT:=python3
endef
include $(TOPDIR)/rules.mk
PKG_NAME:=Jinja2
-PKG_VERSION:=2.10
+PKG_VERSION:=2.10.1
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/J/Jinja2
-PKG_HASH:=f84be1bb0040caca4cea721fcbbbbd61f9be9464ca236387158b0feea01914a4
-PKG_BUILD_DEPENDS:=python3
+PKG_HASH:=065c4f02ebe7f7cf559e49ee5a95fb800a9e4528727aec6f24402a5374c65013
+
+PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
-PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
-
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-$(PKG_NAME)-$(PKG_VERSION)
-PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
include $(INCLUDE_DIR)/package.mk
include ../python3-package.mk
SECTION:=lang
CATEGORY:=Languages
SUBMENU:=Python
+ TITLE:=Jinja2
URL:=http://jinja.pocoo.org/
- TITLE:=python3-jinja2
- DEPENDS:=+python3-light
+ DEPENDS:=+python3-light +python3-markupsafe
VARIANT:=python3
endef
$(eval $(call Py3Package,python3-jinja2))
$(eval $(call BuildPackage,python3-jinja2))
+$(eval $(call BuildPackage,python3-jinja2-src))
include $(TOPDIR)/rules.mk
PKG_NAME:=MarkupSafe
-PKG_VERSION:=1.1.0
+PKG_VERSION:=1.1.1
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/M/MarkupSafe
-PKG_HASH:=4e97332c9ce444b0c2c38dd22ddc61c743eb208d916e4265a2a3b575bdccb1d3
+PKG_HASH:=29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b
PKG_BUILD_DEPENDS:=python python3
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
# Python packages folder
+:warning: **Python 2 will soon be unsupported and removed from the feed - [see below](#python-2-end-of-life)** :warning:
+
## Table of contents
1. [Description](#description)
-2. [Introduction](#introduction)
-3. [Build considerations](#build-considerations)
-4. [General folder structure](#general-folder-structure)
-5. [Building a Python[3] package](#building-a-python3-package)
+2. [Python 2 end-of-life](#python-2-end-of-life)
+ 1. [Transition policy / schedule](#transition-policy--schedule)
+3. [Introduction](#introduction)
+4. [Using Python[3] in external/other package feeds](#using-python3-in-externalother-package-feeds)
+5. [Build considerations](#build-considerations)
+6. [General folder structure](#general-folder-structure)
+7. [Building a Python[3] package](#building-a-python3-package)
1. [PKG_BUILD_DIR](#pkg_build_dir)
2. [PKG_UNPACK](#pkg_unpack)
3. [Include python[3]-package.mk](#include-python3-packagemk)
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
+
## 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).
If more packages (than the ones packaged here) are needed, they can be downloaded via [pip or pip3](https://pip.pypa.io). Note that the versions of `pip` & `setuptools` [available in this repo] are the ones that are packaged inside the Python & Python3 packages (yes, Python & Python3 come packaged with `pip` & `setuptools`).
+## Using Python[3] in external/other package feeds
+
+In the feeds.conf (or feeds.conf.default file, whatever is preferred), the packages repo should be present.
+
+Example
+```
+src-git packages https://git.openwrt.org/feed/packages.git
+src-git luci https://git.openwrt.org/project/luci.git
+src-git routing https://git.openwrt.org/feed/routing.git
+src-git telephony https://git.openwrt.org/feed/telephony.git
+#
+#
+src-git someotherfeed https://github.com/<github-user>/<some-other-package>
+```
+
+Assuming that there are Python packages in the `<some-other-package>`, they should include `python[3]-package.mk` like this:
+```
+include $(TOPDIR)/feeds/packages/lang/python/python-package.mk
+include $(TOPDIR)/feeds/packages/lang/python/python3-package.mk
+```
+
+Same rules apply for `python[3]-package.mk` as the Python packages in this repo.
+And if only 1 of `python-package.mk` or `python3-package.mk` is needed, then only the needed mk file should be included (though it's not an issue if both are included).
+
+**One important consideration:**: if the local name is not `packages`, it's something else, like `openwrt-packages`. And in `feeds.conf[.default]` it's:
+```
+src-git openwrt-packages https://git.openwrt.org/feed/packages.git
+```
+
+Then, the inclusions also change:
+```
+include $(TOPDIR)/feeds/openwrt-packages/lang/python/python-package.mk
+include $(TOPDIR)/feeds/openwrt-packages/lang/python/python3-package.mk
+```
+
+Each maintainer[s] of external packages feeds is responsible for the local name, and relative inclusion path back to this feed (which is named `packages` by default).
+
+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)
+
+# 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)
+else
+$(error found multiple python-package.mk files in the feeds)
+endif
+else
+$(info found python-package.mk at $(PYTHON_PACKAGE_MK))
+endif
+
+include $(PYTHON_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.
+
## 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.
```
Some considerations here (based on the example above):
-* be sure to make sure that `DEPENDS` are correct for both variants; as seen in the example above, `python-codecs` is needed only for `python-lxml` ; that's because `python3-codecs` doesn't exist and is included in `python3-base` ; most of the times they are similar, sometimes they are not
+* be sure to make sure that `DEPENDS` are correct for both variants; as seen in the example above, `python-codecs` is needed only for `python-lxml` (see **[note-encodings](#note-encodings)**)
* consider adding conditional DEPENDS for each variant ; so for each Python[3] package add `+PACKAGE_python-lxml:<dep>` as seen in the above example ; the reason for this is build-time reduction ; if you want to build Python3 only packages, this won't build Python & Python packages + dependencies ; this is a known functionality of OpenWrt build deps
- * there is an exception to the above consideration: if adding `+PACKAGE_python-lxml` conditional deps creates circular dependencies [for some weird reason], then this can be omitted
+ * 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/python3-<something>` & `Package/python3-<something>` ; this convention makes things easier to follow, though it could work without naming things this this
+* 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
If a user wishes to ship source code, adding 2 more lines creates 2 more packages that ship Python source code:
```
$(eval $(call PyPackage,python-lxml))
-$(eval $(call PyPackage,python-lxml-src))
$(eval $(call BuildPackage,python-lxml))
+$(eval $(call BuildPackage,python-lxml-src))
$(eval $(call Py3Package,python3-lxml))
-$(eval $(call Py3Package,python3-lxml-src))
$(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.
Some packages need custom build rules (because they do).
-For building, if a user specifies a `PyBuild/Compile` & `Py3Build/Compile` rule, this will be used to build/compile the package, instead of the default one defined in `python[3]-package.mk`.
+The default package build and install processes are defined in `python[3]-package.mk`.
+
+#### Building
+
+The default build process calls `setup.py install` inside the directory where the Python source package is extracted (`PKG_BUILD_DIR`). This "installs" the Python package to an intermediate location (`PKG_INSTALL_DIR`) where it is used by the default install process.
+
+There are several Makefile variables that can be used to customize this process (all optional):
+
+* `PYTHON_PKG_SETUP_DIR` / `PYTHON3_PKG_SETUP_DIR`: Path where `setup.py` can be found, relative to the package directory (`PKG_BUILD_DIR`).
+ Default: empty value (`setup.py` is in the package directory)
+* `PYTHON_PKG_SETUP_VARS` / `PYTHON3_PKG_SETUP_VARS`: Additional environment variables to set for the call to `setup.py`. Should be in the form of `VARIABLE1=value VARIABLE2=value ...`.
+ Default: empty value
+* `PYTHON_PKG_SETUP_GLOBAL_ARGS` / `PYTHON3_PKG_SETUP_GLOBAL_ARGS`: Additional command line arguments to pass to `setup.py`, before / in front of the `install` command.
+ Default: empty value
+* `PYTHON_PKG_SETUP_ARGS` / `PYTHON3_PKG_SETUP_ARGS`: Additional command line arguments to pass to `setup.py`, after the `install` command.
+ Default: `--single-version-externally-managed`
+
+Conceptually, these variables are used in this way (using a Python 2 package as an example):
+
+```
+cd $(PKG_BUILD_DIR)/$(PYTHON_PKG_SETUP_DIR)
+$(PYTHON_PKG_SETUP_VARS) python setup.py $(PYTHON_PKG_SETUP_GLOBAL_ARGS) install $(PYTHON_PKG_SETUP_ARGS)
+```
+
+The default build process can be completely overridden by defining custom `PyBuild/Compile` & `Py3Build/Compile` rules in the package Makefile.
+
+#### Installing
+
+The default install process copies some/all of the files from `PKG_INSTALL_DIR`, placed there by the build process, to a location passed to the install rule as the first argument (`$(1)`). The OpenWrt build system will then take those files and create the actual .ipk package archives.
+
+This default process uses 2 build rules:
+* `PyPackage/<package>/filespec` & `Py3Package/<package>/filespec` which are Python library files relative to `/usr/lib/pythonX.Y` ; by default this is `/usr/lib/python$(PYTHON[3]_VERSION)/site-packages` (`PYTHON[3]_PKG_DIR`) ; most Python[3] packages generate files that get installed in this sub-folder
+* `PyPackage/<package>/install` & `Py3Package/<package>/install` is similar to `Package/<package>/install` ; these allow binary (or other files) to be installed on the target
-For installing files on the target, 2 build rules are used:
-* `PyPackage/$(1)/filespec` & `Py3Package/$(1)/filespec` which are Python library files relative to `/usr/lib/pythonX.Y` ; by default this is `/usr/lib/python$(PYTHON[3]_VERSION)/site-packages` ; most Python[3] packages generate files that get installed in this sub-folder
-* `PyPackage/$(1)/install` & `Py3Package/$(1)/install` is similar to `Package/$(1)/install` ; these allow binary (or other files) to be installed on the target
+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/$(1)/install` build rule, which gets picked up by the build system. Both can be used together (they are not mutually exclusive), and provide a good enough flexibility for specifying Python[3] packages.
+The `PyPackage/<package>/filespec` & `Py3Package/<package>/filespec` rules contain one or more lines of the following format (whitespace added for clarity):
+
+```
+<one of: +-=> | <file/directory path> | <file permissions>
+```
+
+The initial character controls the action that will be taken:
+
+* `+`: Install the given path. If the path is a directory, all files and subdirectories inside are installed.
+ * If file permissions is specified (optional), then the file or directory (and all files and subdirectories) are assigned the given permissions; if omitted, then the file or directory retains its original permissions.
+* `-`: Remove the given path. Useful when most of a directory should be installed except for a few files or subdirectories.
+ * File permissions is not used / ignored in this case.
+* `=`: Assign the given file permissions to the given path. File permissions is required in this case.
+
+As mentioned, the default `PyPackage/<package>/filespec` & `Py3Package/<package>/filespec` install `PYTHON[3]_PKG_DIR`:
+
+```
+define PyPackage/python-example/filespec
++|$(PYTHON_PKG_DIR)
+endef
+```
+
+If there is an `examples` directory and `test_*.py` files that can be omitted to save space, this can be specified as:
+
+```
+define PyPackage/python-example/filespec
++|$(PYTHON_PKG_DIR)
+-|$(PYTHON_PKG_DIR)/examples
+-|$(PYTHON_PKG_DIR)/test_*.py
+endef
+```
### Host-side Python packages for build
include $(TOPDIR)/rules.mk
PKG_NAME:=Werkzeug
-PKG_VERSION:=0.14.1
+PKG_VERSION:=0.15.2
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/W/Werkzeug
-PKG_HASH:=c3fd7a7d41976d9f44db327260e263132466836cef6f91512889ed60ad26557c
+PKG_HASH:=0a73e8bb2ff2feecfc5d56e6f458f5b99290ef34f565ffb2665801ff7de6af7a
PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
PKG_LICENSE:=BSD-3-Clause
include $(TOPDIR)/rules.mk
PKG_NAME:=bcrypt
-PKG_VERSION:=3.1.5
+PKG_VERSION:=3.1.7
PKG_RELEASE:=1
PKG_SOURCE:=bcrypt-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:= https://files.pythonhosted.org/packages/source/b/$(PKG_NAME)
-PKG_HASH:=136243dc44e5bab9b61206bd46fff3018bd80980b1a1dfbab64a22ff5745957f
+PKG_HASH:=0b0069c752ec14172c5f78208f1863d7ad6755a6fae6fe76ec2c80d13be41e42
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-bcrypt-$(PKG_VERSION)
+PKG_MAINTAINER:=Daniel Dickinson <cshored@thecshore.com>
PKG_LICENSE:=Apache-2.0
PKG_LICENSE_FILES:=LICENSE
-PKG_MAINTAINER:=Daniel Dickinson <cshored@thecshore.com>
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-bcrypt-$(PKG_VERSION)
+PKG_BUILD_DEPENDS:=libffi/host
+HOST_PYTHON_PACKAGE_BUILD_DEPENDS:="cffi>=1.1"
+HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:="cffi>=1.1"
include $(INCLUDE_DIR)/package.mk
-
include ../python-package.mk
include ../python3-package.mk
SECTION:=lang
CATEGORY:=Languages
SUBMENU:=Python
+ TITLE:=Modern password hashing
URL:=https://github.com/pyca/bcrypt/
endef
define Package/python-bcrypt
$(call Package/bcrypt/Default)
- TITLE:=BCrypt
- DEPENDS+=+PACKAGE_python-bcrypt:python +PACKAGE_python-bcrypt:python-cffi \
- +PACKAGE_python-bcrypt:python-six
+ DEPENDS:= \
+ +PACKAGE_python-bcrypt:python \
+ +PACKAGE_python-bcrypt:python-cffi \
+ +PACKAGE_python-bcrypt:python-six
VARIANT:=python
endef
define Package/python3-bcrypt
$(call Package/bcrypt/Default)
- TITLE:=BCrypt
- DEPENDS+=+PACKAGE_python3-bcrypt:python3 +PACKAGE_python3-bcrypt:python3-cffi \
- +PACKAGE_python3-bcrypt:python3-six
+ DEPENDS:= \
+ +PACKAGE_python3-bcrypt:python3 \
+ +PACKAGE_python3-bcrypt:python3-cffi \
+ +PACKAGE_python3-bcrypt:python3-six
VARIANT:=python3
endef
define Package/python-bcrypt/description
-Good password hashing for your software and your servers
+ Good password hashing for your software and your servers.
endef
define Package/python3-bcrypt/description
endef
$(eval $(call PyPackage,python-bcrypt))
-$(eval $(call Py3Package,python3-bcrypt))
-
$(eval $(call BuildPackage,python-bcrypt))
$(eval $(call BuildPackage,python-bcrypt-src))
+
+$(eval $(call Py3Package,python3-bcrypt))
$(eval $(call BuildPackage,python3-bcrypt))
$(eval $(call BuildPackage,python3-bcrypt-src))
+++ /dev/null
-#
-# Copyright (C) 2007-2017 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=chardet
-PKG_VERSION:=3.0.4
-PKG_RELEASE:=1
-PKG_LICENSE:=LGPL-2.1
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0d4a3cf93462473795d18e9535498c8f929d/
-PKG_HASH:=84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae
-
-include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
-
-define Package/chardet
- SUBMENU:=Python
- SECTION:=lang
- CATEGORY:=Languages
- MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
- TITLE:=Universal encoding detector for Python 2 and 3
- URL:=https://github.com/chardet/chardet
- DEPENDS:=+python
-endef
-
-define Package/chardet/description
- Universal encoding detector for Python 2 and 3
-endef
-
-define Build/Compile
- $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
-endef
-
-define Package/chardet/install
- $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
- $(INSTALL_DIR) $(1)/usr/bin
- $(CP) \
- $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
- $(1)$(PYTHON_PKG_DIR)
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/chardetect \
- $(1)/usr/bin
- # fix python exec path in scripts
- sed -i 's/#!.*/#!\/usr\/bin\/python/g' $(1)/usr/bin/chardetect
-endef
-
-$(eval $(call BuildPackage,chardet))
--- /dev/null
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=click-log
+PKG_VERSION:=0.3.2
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Karel Kočí <cynerd@email.cz>
+
+PKG_SOURCE_URL:=https://codeload.github.com/click-contrib/click-log/tar.gz/$(PKG_VERSION)?
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_HASH:=16babb66a2ebf22c37c1cf38753a84e6027eb8991fcf9a8487971591b8ca9812
+PKG_LICENSE:=MIT
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-click-log
+ SECTION:=lang
+ CATEGORY:=Languages
+ SUBMENU:=Python
+ URL:=http://github.com/mitsuhiko/click
+ TITLE:=python3-click-log
+ DEPENDS:=+python3-click
+ VARIANT:=python3
+endef
+
+define Package/python3-click-log/description
+ Simple and beautiful logging for click applications
+endef
+
+$(eval $(call Py3Package,python3-click-log))
+$(eval $(call BuildPackage,python3-click-log))
+$(eval $(call BuildPackage,python3-click-log-src))
include $(TOPDIR)/rules.mk
PKG_NAME:=click
-PKG_VERSION:=6.7
+PKG_VERSION:=7.0
PKG_RELEASE:=1
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/95/d9/c3336b6b5711c3ab9d1d3a80f1a3e2afeb9d8c02a7166462f6cc96570897/
-PKG_HASH:=f15516df478d5a56180fbf80e68f206010e6d160fc39fa508b65e035fd75130b
-PKG_BUILD_DEPENDS:=python python3
+PKG_SOURCE:=Click-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/c/click
+PKG_HASH:=5b94b49521f6456670fdb30cd82a4eca9412788a93fa6dd6df72c94d5a8ff2d7
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/Click-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
-PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
-
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-$(PKG_NAME)-$(PKG_VERSION)
-PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
include $(INCLUDE_DIR)/package.mk
include ../python3-package.mk
SECTION:=lang
CATEGORY:=Languages
SUBMENU:=Python
- URL:=http://github.com/mitsuhiko/click
- TITLE:=python3-click
+ TITLE:=Click
+ URL:=https://palletsprojects.com/p/click/
DEPENDS:=+python3-light
VARIANT:=python3
endef
define Package/python3-click/description
-A simple wrapper around optparse for powerful command line utilities.
+ Composable command line interface toolkit
endef
$(eval $(call Py3Package,python3-click))
$(eval $(call BuildPackage,python3-click))
+$(eval $(call BuildPackage,python3-click-src))
PKG_NAME:=django-appconf
PKG_VERSION:=1.0.2
-PKG_RELEASE:=1
-PKG_LICENSE:=BSD-3-Clause
+PKG_RELEASE:=4
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/34/b9/d07195652ab494b026f7cb0341dd6e5f2e6e39be177abe05e2cec8bd46e4/
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/d/$(PKG_NAME)/
PKG_HASH:=6a4d9aea683b4c224d97ab8ee11ad2d29a37072c0c6c509896dd9857466fb261
+PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-$(PKG_NAME)-$(PKG_VERSION)
+
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
+include ../python3-package.mk
-define Package/django-appconf
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+define Package/$(PKG_NAME)/Default
SUBMENU:=Python
SECTION:=lang
CATEGORY:=Languages
- MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
- TITLE:=A helper class for handling configuration defaults of packaged apps gracefully.
- URL:=http://django-appconf.readthedocs.org/
- DEPENDS:=+python +django
+ TITLE:=Helper class for handling config defaults
+ URL:=https://$(PKG_NAME).readthedocs.io
+endef
+
+define Package/python-$(PKG_NAME)
+$(call Package/$(PKG_NAME)/Default)
+ DEPENDS:= \
+ +PACKAGE_python-$(PKG_NAME):python \
+ +PACKAGE_python-$(PKG_NAME):python-django
+ VARIANT:=python
endef
-define Package/django-appconf/description
- A helper class for handling configuration defaults of packaged apps gracefully.
+define Package/python-$(PKG_NAME)/description
+ A helper class for handling configuration defaults of packaged apps gracefully
endef
-define Build/Compile
- $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
+define Package/python3-$(PKG_NAME)
+$(call Package/$(PKG_NAME)/Default)
+ DEPENDS:= \
+ +PACKAGE_python3-$(PKG_NAME):python3 \
+ +PACKAGE_python3-$(PKG_NAME):python3-django
+ VARIANT:=python3
endef
-define Package/django-appconf/install
- $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
- $(CP) \
- $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
- $(1)$(PYTHON_PKG_DIR)
+define Package/python3-$(PKG_NAME)/description
+$(call define Package/python-$(PKG_NAME)/description)
+.
+(Variant for Python3)
endef
-$(eval $(call BuildPackage,django-appconf))
+$(eval $(call PyPackage,python-$(PKG_NAME)))
+$(eval $(call BuildPackage,python-$(PKG_NAME)))
+$(eval $(call BuildPackage,python-$(PKG_NAME)-src))
+
+$(eval $(call Py3Package,python3-$(PKG_NAME)))
+$(eval $(call BuildPackage,python3-$(PKG_NAME)))
+$(eval $(call BuildPackage,python3-$(PKG_NAME)-src))
PKG_NAME:=django-compressor
PKG_VERSION:=2.2
-PKG_RELEASE:=1
-PKG_LICENSE:=MIT
+PKG_RELEASE:=5
PKG_SOURCE:=django_compressor-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/82/76/1355459f90714517c52f264aa7245b52e59a273ec16e8f8d505fa6c342f8/
-PKG_BUILD_DIR:=$(BUILD_DIR)/django_compressor-$(PKG_VERSION)/
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/d/$(PKG_NAME)/
PKG_HASH:=9616570e5b08e92fa9eadc7a1b1b49639cce07ef392fc27c74230ab08075b30f
+PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-$(PKG_NAME)-$(PKG_VERSION)
+
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
+include ../python3-package.mk
-define Package/django-compressor
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+define Package/$(PKG_NAME)/Default
SUBMENU:=Python
SECTION:=lang
CATEGORY:=Languages
- MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
- TITLE:=Compresses linked and inline JavaScript or CSS into single cached files.
- URL:=http://django-compressor.readthedocs.org/
- DEPENDS:=+python +django
+ TITLE:=Compress CSS/JS into single cached files
+ URL:=https://$(PKG_NAME).readthedocs.io
+endef
+
+define Package/python-$(PKG_NAME)
+$(call Package/$(PKG_NAME)/Default)
+ DEPENDS:= \
+ +PACKAGE_python-$(PKG_NAME):python \
+ +PACKAGE_python-$(PKG_NAME):python-django \
+ +PACKAGE_python-$(PKG_NAME):python-django-appconf \
+ +PACKAGE_python-$(PKG_NAME):python-rcssmin
+ VARIANT:=python
endef
-define Package/django-compressor/description
+define Package/python-$(PKG_NAME)/description
Compresses linked and inline JavaScript or CSS into single cached files.
+ Note that the JavaScript filter is not being installed as a dependency.
+ You'll need to build the rjsmin module (it is not par of the openwrt standard
+ feeds) to use JavaScript functionality.
endef
-define Build/Compile
- $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
+define Package/python3-$(PKG_NAME)
+$(call Package/$(PKG_NAME)/Default)
+ DEPENDS:= \
+ +PACKAGE_python3-$(PKG_NAME):python3 \
+ +PACKAGE_python3-$(PKG_NAME):python3-django \
+ +PACKAGE_python3-$(PKG_NAME):python3-django-appconf \
+ +PACKAGE_python3-$(PKG_NAME):python3-rcssmin
+ VARIANT:=python3
endef
-define Package/django-compressor/install
- $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
- $(CP) \
- $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
- $(1)$(PYTHON_PKG_DIR)
+define Package/python3-$(PKG_NAME)/description
+$(call define Package/python-$(PKG_NAME)/description)
+.
+(Variant for Python3)
endef
-$(eval $(call BuildPackage,django-compressor))
+$(eval $(call PyPackage,python-$(PKG_NAME)))
+$(eval $(call BuildPackage,python-$(PKG_NAME)))
+$(eval $(call BuildPackage,python-$(PKG_NAME)-src))
+
+$(eval $(call Py3Package,python3-$(PKG_NAME)))
+$(eval $(call BuildPackage,python3-$(PKG_NAME)))
+$(eval $(call BuildPackage,python3-$(PKG_NAME)-src))
PKG_NAME:=django-constance
PKG_VERSION:=2.3.1
-PKG_RELEASE:=1
+PKG_RELEASE:=3
PKG_LICENSE:=BSD-3-Clause
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/d/django-constance
PKG_HASH:=a49735063b2c30015d2e52a90609ea9798da722ed070f091de51714758a5d018
+PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-django-constance-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
+include ../python3-package.mk
+
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
-define Package/django-constance
+define Package/python-django-constance/Default
SUBMENU:=Python
SECTION:=lang
CATEGORY:=Languages
- MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
TITLE:=Django live settings with pluggable backends, including Redis.
URL:=https://github.com/jazzband/django-constance
- DEPENDS:=+python +django
endef
-define Package/django-constance/description
+define Package/python-django-constance
+$(call Package/python-django-constance/Default)
+ DEPENDS:= \
+ +PACKAGE_python-django-constance:python \
+ +PACKAGE_python-django-constance:python-django
+ VARIANT:=python
+endef
+
+define Package/python-django-constance/description
Django live settings with pluggable backends, including Redis.
endef
-define Build/Compile
- $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
+define Package/python3-django-constance
+$(call Package/python-django-constance/Default)
+ DEPENDS:= \
+ +PACKAGE_python3-django-constance:python3 \
+ +PACKAGE_python3-django-constance:python3-django
+ VARIANT:=python3
endef
-define Package/django-constance/install
- $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
- $(CP) \
- $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
- $(1)$(PYTHON_PKG_DIR)
+define Package/python3-django-constance/description
+$(call define Package/python-django-constance/description)
+.
+(Variant for Python3)
endef
-$(eval $(call BuildPackage,django-constance))
+$(eval $(call PyPackage,python-django-constance))
+$(eval $(call BuildPackage,python-django-constance))
+$(eval $(call Py3Package,python3-django-constance))
+$(eval $(call BuildPackage,python3-django-constance))
#
-# Copyright (C) 2007-2016 OpenWrt.org
-#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
PKG_NAME:=django-formtools
PKG_VERSION:=2.1
-PKG_RELEASE:=2
-PKG_LICENSE:=BSD-3-Clause
+PKG_RELEASE:=5
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/d/${PKG_NAME}
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/d/$(PKG_NAME)/
PKG_HASH:=7703793f1675aa6e871f9fed147e8563816d7a5b9affdc5e3459899596217f7c
+PKG_MAINTAINER:=Eneas U de Queiroz <cotequeiroz@gmail.com>
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-$(PKG_NAME)-$(PKG_VERSION)
+
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
+include ../python3-package.mk
+
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
-define Package/django-formtools
+define Package/$(PKG_NAME)/Default
SUBMENU:=Python
SECTION:=lang
CATEGORY:=Languages
- MAINTAINER:=Eneas U de Queiroz <cote2004-github@yahoo.com>
- TITLE:=A set of high-level abstractions for Django forms
- URL:=https://django-formtools.readthedocs.io/en/latest/
- DEPENDS:=+python +django
+ TITLE:=High-level abstractions for Django forms
+ URL:=https://$(PKG_NAME).readthedocs.io
+endef
+
+define Package/python-$(PKG_NAME)
+$(call Package/$(PKG_NAME)/Default)
+ DEPENDS:= \
+ +PACKAGE_python-$(PKG_NAME):python \
+ +PACKAGE_python-$(PKG_NAME):python-django
VARIANT:=python
endef
-define Package/django-formtools/description
+define Package/python-$(PKG_NAME)/description
Django "formtools" is a set of high-level abstractions for Django forms.
Currently for form previews and multi-step forms.
endef
-$(eval $(call PyPackage,django-formtools))
-$(eval $(call BuildPackage,django-formtools))
-$(eval $(call BuildPackage,django-formtools-src))
+define Package/python3-$(PKG_NAME)
+$(call Package/$(PKG_NAME)/Default)
+ DEPENDS:= \
+ +PACKAGE_python3-$(PKG_NAME):python3 \
+ +PACKAGE_python3-$(PKG_NAME):python3-django
+ VARIANT:=python3
+endef
+
+define Package/python3-$(PKG_NAME)/description
+$(call define Package/python-$(PKG_NAME)/description)
+.
+(Variant for Python3)
+endef
+
+$(eval $(call PyPackage,python-$(PKG_NAME)))
+$(eval $(call BuildPackage,python-$(PKG_NAME)))
+$(eval $(call BuildPackage,python-$(PKG_NAME)-src))
+
+$(eval $(call Py3Package,python3-$(PKG_NAME)))
+$(eval $(call BuildPackage,python3-$(PKG_NAME)))
+$(eval $(call BuildPackage,python3-$(PKG_NAME)-src))
PKG_NAME:=django-jsonfield
PKG_VERSION:=1.0.1
-PKG_RELEASE:=1
-PKG_LICENSE:=BSD-3-Clause
+PKG_RELEASE:=4
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/e4/b2/a079f0a2218e0eb7892edbf404e0bbfbb281a6bbf06966b775f5142ed159/
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/d/$(PKG_NAME)/
PKG_HASH:=6c0afd5554739365b55d86e285cf966cc3a45682fff963463364ea1f6511ca3e
+PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-$(PKG_NAME)-$(PKG_VERSION)
+
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
+include ../python3-package.mk
-define Package/django-jsonfield
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+define Package/$(PKG_NAME)/Default
SUBMENU:=Python
SECTION:=lang
CATEGORY:=Languages
- MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
TITLE:=JSONField for django models
- URL:=https://github.com/bradjasper/django-jsonfield
- DEPENDS:=+python +django
+ URL:=https://github.com/adamchainz/django-jsonfield
+endef
+
+define Package/python-$(PKG_NAME)
+$(call Package/$(PKG_NAME)/Default)
+ DEPENDS:= \
+ +PACKAGE_python-$(PKG_NAME):python \
+ +PACKAGE_python-$(PKG_NAME):python-django
+ VARIANT:=python
endef
-define Package/django-jsonfield/description
+define Package/python-$(PKG_NAME)/description
JSONField for django models
endef
-define Build/Compile
- $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
+define Package/python3-$(PKG_NAME)
+$(call Package/$(PKG_NAME)/Default)
+ DEPENDS:= \
+ +PACKAGE_python3-$(PKG_NAME):python3 \
+ +PACKAGE_python3-$(PKG_NAME):python3-django
+ VARIANT:=python3
endef
-define Package/django-jsonfield/install
- $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
- $(CP) \
- $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
- $(1)$(PYTHON_PKG_DIR)
+define Package/python3-$(PKG_NAME)/description
+$(call define Package/python-$(PKG_NAME)/description)
+.
+(Variant for Python3)
endef
-$(eval $(call BuildPackage,django-jsonfield))
+$(eval $(call PyPackage,python-$(PKG_NAME)))
+$(eval $(call BuildPackage,python-$(PKG_NAME)))
+$(eval $(call BuildPackage,python-$(PKG_NAME)-src))
+
+$(eval $(call Py3Package,python3-$(PKG_NAME)))
+$(eval $(call BuildPackage,python3-$(PKG_NAME)))
+$(eval $(call BuildPackage,python3-$(PKG_NAME)-src))
PKG_NAME:=django-picklefield
PKG_VERSION:=1.1.0
-PKG_RELEASE:=1
-PKG_LICENSE:=MIT
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/d/django-picklefield
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/d/$(PKG_NAME)/
PKG_HASH:=ce7fee5c6558fe5dc8924993d994ccde75bb75b91cd82787cbd4c92b95a69f9c
+PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-$(PKG_NAME)-$(PKG_VERSION)
+
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
+include ../python3-package.mk
-define Package/django-picklefield
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+define Package/$(PKG_NAME)/Default
SUBMENU:=Python
SECTION:=lang
CATEGORY:=Languages
- MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
TITLE:=Pickled object field for Django
- URL:=https://github.com/gintas/django-picklefield
- DEPENDS:=+python +django
+ URL:=https://github.com/gintas/django-picklefield/
+endef
+
+define Package/python-$(PKG_NAME)
+$(call Package/$(PKG_NAME)/Default)
+ DEPENDS:= \
+ +PACKAGE_python-$(PKG_NAME):python \
+ +PACKAGE_python-$(PKG_NAME):python-django
+ VARIANT:=python
endef
-define Package/django-picklefield/description
+define Package/python-$(PKG_NAME)/description
Pickled object field for Django
endef
-define Build/Compile
- $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
+define Package/python3-$(PKG_NAME)
+$(call Package/$(PKG_NAME)/Default)
+ DEPENDS:= \
+ +PACKAGE_python3-$(PKG_NAME):python3 \
+ +PACKAGE_python3-$(PKG_NAME):python3-django
+ VARIANT:=python3
endef
-define Package/django-picklefield/install
- $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
- $(CP) \
- $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
- $(1)$(PYTHON_PKG_DIR)
+define Package/python3-$(PKG_NAME)/description
+$(call define Package/python-$(PKG_NAME)/description)
+.
+(Variant for Python3)
endef
-$(eval $(call BuildPackage,django-picklefield))
+$(eval $(call PyPackage,python-$(PKG_NAME)))
+$(eval $(call BuildPackage,python-$(PKG_NAME)))
+$(eval $(call BuildPackage,python-$(PKG_NAME)-src))
+
+$(eval $(call Py3Package,python3-$(PKG_NAME)))
+$(eval $(call BuildPackage,python3-$(PKG_NAME)))
+$(eval $(call BuildPackage,python3-$(PKG_NAME)-src))
PKG_NAME:=django-postoffice
PKG_VERSION:=3.1.0
-PKG_RELEASE:=1
-PKG_LICENSE:=MIT
+PKG_RELEASE:=4
PKG_SOURCE:=django-post_office-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/d/django-post_office
PKG_HASH:=827937a944fe47cea393853069cd9315d080298c8ddb0faf787955d6aa51a030
-PKG_BUILD_DIR:=$(BUILD_DIR)/django-post_office-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE.txt
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-$(PKG_NAME)-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
+include ../python3-package.mk
-define Package/django-postoffice
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+define Package/$(PKG_NAME)/Default
SUBMENU:=Python
SECTION:=lang
CATEGORY:=Languages
- MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
- TITLE:=A Django app to monitor and send mail asynchronously, complete with template support.
- URL:=https://github.com/ui/django-postoffice
- DEPENDS:=+python +django +django-jsonfield
+ TITLE:=A Django app to monitor and send mail asynchronously
+ URL:=https://github.com/ui/django-post_office
+endef
+
+define Package/python-$(PKG_NAME)
+$(call Package/$(PKG_NAME)/Default)
+ DEPENDS:= \
+ +PACKAGE_python-$(PKG_NAME):python \
+ +PACKAGE_python-$(PKG_NAME):python-django \
+ +PACKAGE_python-$(PKG_NAME):python-django-jsonfield
+ VARIANT:=python
endef
-define Package/django-postoffice/description
- A Django app to monitor and send mail asynchronously, complete with template support.
+define Package/python-$(PKG_NAME)/description
+ A Django app to monitor and send mail asynchronously, complete with template
+ support
endef
-define Build/Compile
- $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
+define Package/python3-$(PKG_NAME)
+$(call Package/$(PKG_NAME)/Default)
+ DEPENDS:= \
+ +PACKAGE_python3-$(PKG_NAME):python3 \
+ +PACKAGE_python3-$(PKG_NAME):python3-django \
+ +PACKAGE_python3-$(PKG_NAME):python3-django-jsonfield
+ VARIANT:=python3
endef
-define Package/django-postoffice/install
- $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
- $(CP) \
- $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
- $(1)$(PYTHON_PKG_DIR)
+define Package/python3-$(PKG_NAME)/description
+$(call define Package/python-$(PKG_NAME)/description)
+.
+(Variant for Python3)
endef
-$(eval $(call BuildPackage,django-postoffice))
+$(eval $(call PyPackage,python-$(PKG_NAME)))
+$(eval $(call BuildPackage,python-$(PKG_NAME)))
+$(eval $(call BuildPackage,python-$(PKG_NAME)-src))
+
+$(eval $(call Py3Package,python3-$(PKG_NAME)))
+$(eval $(call BuildPackage,python3-$(PKG_NAME)))
+$(eval $(call BuildPackage,python3-$(PKG_NAME)-src))
#
-# Copyright (C) 2007-2016 OpenWrt.org
-#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
PKG_NAME:=django-ranged-response
PKG_VERSION:=0.2.0
-PKG_RELEASE:=2
-PKG_LICENSE:=MIT
+PKG_RELEASE:=5
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/d/${PKG_NAME}
PKG_HASH:=f71fff352a37316b9bead717fc76e4ddd6c9b99c4680cdf4783b9755af1cf985
+PKG_MAINTAINER:=Eneas U de Queiroz <cotequeiroz@gmail.com>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-$(PKG_NAME)-$(PKG_VERSION)
+
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
+include ../python3-package.mk
+
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
-define Package/django-ranged-response
+define Package/$(PKG_NAME)/Default
SUBMENU:=Python
SECTION:=lang
CATEGORY:=Languages
- MAINTAINER:=Eneas U de Queiroz <cote2004-github@yahoo.com>
- TITLE:=Modified Django FileResponse that adds Content-Range headers.
+ TITLE:=Add Content-Range: to FileResponse
URL:=https://github.com/wearespindle/django-ranged-fileresponse
- DEPENDS:=+python +django
+endef
+
+define Package/python-$(PKG_NAME)
+$(call Package/$(PKG_NAME)/Default)
+ DEPENDS:= \
+ +PACKAGE_python-$(PKG_NAME):python \
+ +PACKAGE_python-$(PKG_NAME):python-django
VARIANT:=python
endef
-define Package/django-ranged-response/description
+define Package/python-$(PKG_NAME)/description
Modified Django FileResponse that adds Content-Range headers.
endef
-$(eval $(call PyPackage,django-ranged-response))
-$(eval $(call BuildPackage,django-ranged-response))
-$(eval $(call BuildPackage,django-ranged-response-src))
+define Package/python3-$(PKG_NAME)
+$(call Package/$(PKG_NAME)/Default)
+ DEPENDS:= \
+ +PACKAGE_python3-$(PKG_NAME):python3 \
+ +PACKAGE_python3-$(PKG_NAME):python3-django
+ VARIANT:=python3
+endef
+
+define Package/python3-$(PKG_NAME)/description
+$(call define Package/python-$(PKG_NAME)/description)
+.
+(Variant for Python3)
+endef
+
+$(eval $(call PyPackage,python-$(PKG_NAME)))
+$(eval $(call BuildPackage,python-$(PKG_NAME)))
+$(eval $(call BuildPackage,python-$(PKG_NAME)-src))
+
+$(eval $(call Py3Package,python3-$(PKG_NAME)))
+$(eval $(call BuildPackage,python3-$(PKG_NAME)))
+$(eval $(call BuildPackage,python3-$(PKG_NAME)-src))
PKG_NAME:=django-restframework
PKG_VERSION:=3.9.0
-PKG_RELEASE:=1
-PKG_LICENSE:=BSD-3-Clause
+PKG_RELEASE:=4
PKG_SOURCE:=djangorestframework-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/d/djangorestframework
PKG_HASH:=607865b0bb1598b153793892101d881466bd5a991de12bd6229abb18b1c86136
-PKG_BUILD_DIR:=$(BUILD_DIR)/djangorestframework-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=LICENSE.md
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-$(PKG_NAME)-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
+include ../python3-package.mk
-define Package/django-restframework
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+define Package/$(PKG_NAME)/Default
SUBMENU:=Python
SECTION:=lang
CATEGORY:=Languages
- MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
TITLE:=Web APIs for Django, made easy.
URL:=https://www.django-rest-framework.org
- DEPENDS:=+python +django
endef
-define Package/django-restframework/description
+define Package/python-$(PKG_NAME)
+$(call Package/$(PKG_NAME)/Default)
+ DEPENDS:= \
+ +PACKAGE_python-$(PKG_NAME):python \
+ +PACKAGE_python-$(PKG_NAME):python-django
+ VARIANT:=python
+endef
+
+define Package/python-$(PKG_NAME)/description
Web APIs for Django, made easy.
endef
-define Build/Compile
- $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
+define Package/python3-$(PKG_NAME)
+$(call Package/$(PKG_NAME)/Default)
+ DEPENDS:= \
+ +PACKAGE_python3-$(PKG_NAME):python3 \
+ +PACKAGE_python3-$(PKG_NAME):python3-django
+ VARIANT:=python3
endef
-define Package/django-restframework/install
- $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
- $(CP) \
- $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
- $(1)$(PYTHON_PKG_DIR)
+define Package/python3-$(PKG_NAME)/description
+$(call define Package/python-$(PKG_NAME)/description)
+.
+(Variant for Python3)
endef
-$(eval $(call BuildPackage,django-restframework))
+$(eval $(call PyPackage,python-$(PKG_NAME)))
+$(eval $(call BuildPackage,python-$(PKG_NAME)))
+$(eval $(call BuildPackage,python-$(PKG_NAME)-src))
+
+$(eval $(call Py3Package,python3-$(PKG_NAME)))
+$(eval $(call BuildPackage,python3-$(PKG_NAME)))
+$(eval $(call BuildPackage,python3-$(PKG_NAME)-src))
include $(TOPDIR)/rules.mk
PKG_NAME:=django-simple-captcha
-PKG_VERSION:=0.5.9
-PKG_RELEASE:=2
+PKG_VERSION:=0.5.11
+PKG_RELEASE:=4
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/mbi/django-simple-captcha/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=7ca26a4f48e14e5f8be022c0dc099ef98980f3fc99f403ca565ab1f3addaee5b
+
+PKG_MAINTAINER:=Eneas U de Queiroz <cotequeiroz@gmail.com>
PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).zip
-PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/d/${PKG_NAME}
-PKG_HASH:=0c30a14f02502119fd1a4d308dd5d2b899d0f4284825a396bbb010afd904754a
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-$(PKG_NAME)-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
+include ../python3-package.mk
+
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
-define Package/django-simple-captcha
+define Package/$(PKG_NAME)/Default
SUBMENU:=Python
SECTION:=lang
CATEGORY:=Languages
- MAINTAINER:=Eneas U de Queiroz <cote2004-github@yahoo.com>
- TITLE:=A very simple, yet powerful, Django captcha application
+ TITLE:=Simple Django captcha application
URL:=https://github.com/mbi/django-simple-captcha
- DEPENDS:=+python +python-six +django +pillow +django-ranged-response
+endef
+
+define Package/python-$(PKG_NAME)
+$(call Package/$(PKG_NAME)/Default)
+ DEPENDS:= \
+ +PACKAGE_python-$(PKG_NAME):python \
+ +PACKAGE_python-$(PKG_NAME):python-six \
+ +PACKAGE_python-$(PKG_NAME):python-django \
+ +PACKAGE_python-$(PKG_NAME):python-pillow \
+ +PACKAGE_python-$(PKG_NAME):python-django-ranged-response
VARIANT:=python
endef
-define Package/django-simple-captcha/description
+define Package/python-$(PKG_NAME)/description
Django Simple Captcha is an extremely simple, yet highly customizable Django
application to add captcha images to any Django form.
endef
-$(eval $(call PyPackage,django-simple-captcha))
-$(eval $(call BuildPackage,django-simple-captcha))
-$(eval $(call BuildPackage,django-simple-captcha-src))
+define Package/python3-$(PKG_NAME)
+$(call Package/$(PKG_NAME)/Default)
+ DEPENDS:= \
+ +PACKAGE_python3-$(PKG_NAME):python3 \
+ +PACKAGE_python3-$(PKG_NAME):python3-six \
+ +PACKAGE_python3-$(PKG_NAME):python3-django \
+ +PACKAGE_python3-$(PKG_NAME):python3-pillow \
+ +PACKAGE_python3-$(PKG_NAME):python3-django-ranged-response
+ VARIANT:=python3
+endef
+
+define Package/python3-$(PKG_NAME)/description
+$(call define Package/python-$(PKG_NAME)/description)
+.
+(Variant for Python3)
+endef
+
+$(eval $(call PyPackage,python-$(PKG_NAME)))
+$(eval $(call BuildPackage,python-$(PKG_NAME)))
+$(eval $(call BuildPackage,python-$(PKG_NAME)-src))
+
+$(eval $(call Py3Package,python3-$(PKG_NAME)))
+$(eval $(call BuildPackage,python3-$(PKG_NAME)))
+$(eval $(call BuildPackage,python3-$(PKG_NAME)-src))
PKG_NAME:=django-statici18n
PKG_VERSION:=1.8.2
-PKG_RELEASE:=1
-PKG_LICENSE:=BSD-3-Clause
+PKG_RELEASE:=4
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/d/django-statici18n
PKG_HASH:=ba9eeb3c4517027922645999359f8335fbb9fea04c457123cfbd6b4a36cbeda4
+PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-$(PKG_NAME)-$(PKG_VERSION)
+
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
+include ../python3-package.mk
-define Package/django-statici18n
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+define Package/$(PKG_NAME)/Default
SUBMENU:=Python
SECTION:=lang
CATEGORY:=Languages
- MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
- TITLE:=A Django app that provides helper for generating JavaScript catalog to static files.
- URL:=https://django-statici18n.readthedocs.org/
- DEPENDS:=+python +django
+ TITLE:=Helper for generating JavaScript catalog to static files
+ URL:=https://$(PKG_NAME).readthedocs.io
+endef
+
+define Package/python-$(PKG_NAME)
+$(call Package/$(PKG_NAME)/Default)
+ DEPENDS:= \
+ +PACKAGE_python-$(PKG_NAME):python \
+ +PACKAGE_python-$(PKG_NAME):python-django
+ VARIANT:=python
endef
-define Package/django-statici18n/description
+define Package/python-$(PKG_NAME)/description
A Django app that provides helper for generating JavaScript catalog to static files.
endef
-define Build/Compile
- $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
+define Package/python3-$(PKG_NAME)
+$(call Package/$(PKG_NAME)/Default)
+ DEPENDS:= \
+ +PACKAGE_python3-$(PKG_NAME):python3 \
+ +PACKAGE_python3-$(PKG_NAME):python3-django
+ VARIANT:=python3
endef
-define Package/django-statici18n/install
- $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
- $(CP) \
- $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
- $(1)$(PYTHON_PKG_DIR)
+define Package/python3-$(PKG_NAME)/description
+$(call define Package/python-$(PKG_NAME)/description)
+.
+(Variant for Python3)
endef
-$(eval $(call BuildPackage,django-statici18n))
+$(eval $(call PyPackage,python-$(PKG_NAME)))
+$(eval $(call BuildPackage,python-$(PKG_NAME)))
+$(eval $(call BuildPackage,python-$(PKG_NAME)-src))
+
+$(eval $(call Py3Package,python3-$(PKG_NAME)))
+$(eval $(call BuildPackage,python3-$(PKG_NAME)))
+$(eval $(call BuildPackage,python3-$(PKG_NAME)-src))
#
-# Copyright (C) 2007-2016 OpenWrt.org
-#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
PKG_NAME:=django-webpack-loader
PKG_VERSION:=0.6.0
-PKG_RELEASE:=2
-PKG_LICENSE:=MIT
+PKG_RELEASE:=5
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/d/${PKG_NAME}
PKG_HASH:=60bab6b9a037a5346fad12d2a70a6bc046afb33154cf75ed640b93d3ebd5f520
+PKG_MAINTAINER:=Eneas U de Queiroz <cotequeiroz@gmail.com>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-$(PKG_NAME)-$(PKG_VERSION)
+
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
+include ../python3-package.mk
+
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
-define Package/django-webpack-loader
+define Package/$(PKG_NAME)/Default
SUBMENU:=Python
SECTION:=lang
CATEGORY:=Languages
- MAINTAINER:=Eneas U de Queiroz <cote2004-github@yahoo.com>
- TITLE:=Transparently use webpack with django
+ TITLE:=Transparently use webpack in django
URL:=https://github.com/owais/django-webpack-loader
- DEPENDS:=+python +django
+endef
+
+define Package/python-$(PKG_NAME)
+$(call Package/$(PKG_NAME)/Default)
+ DEPENDS:= \
+ +PACKAGE_python-$(PKG_NAME):python \
+ +PACKAGE_python-$(PKG_NAME):python-django
VARIANT:=python
endef
-define Package/django-webpack-loader/description
+define Package/python-$(PKG_NAME)/description
Use webpack to generate your static bundles without django’s staticfiles or opaque wrappers.
endef
-$(eval $(call PyPackage,django-webpack-loader))
-$(eval $(call BuildPackage,django-webpack-loader))
-$(eval $(call BuildPackage,django-webpack-loader-src))
+define Package/python3-$(PKG_NAME)
+$(call Package/$(PKG_NAME)/Default)
+ DEPENDS:= \
+ +PACKAGE_python3-$(PKG_NAME):python3 \
+ +PACKAGE_python3-$(PKG_NAME):python3-django
+ VARIANT:=python3
+endef
+
+define Package/python3-$(PKG_NAME)/description
+$(call define Package/python-$(PKG_NAME)/description)
+.
+(Variant for Python3)
+endef
+
+$(eval $(call PyPackage,python-$(PKG_NAME)))
+$(eval $(call BuildPackage,python-$(PKG_NAME)))
+$(eval $(call BuildPackage,python-$(PKG_NAME)-src))
+
+$(eval $(call Py3Package,python3-$(PKG_NAME)))
+$(eval $(call BuildPackage,python3-$(PKG_NAME)))
+$(eval $(call BuildPackage,python3-$(PKG_NAME)-src))
PKG_NAME:=django
PKG_VERSION:=1.11.17
-PKG_RELEASE=1
+PKG_RELEASE=4
PKG_SOURCE:=Django-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/D/Django
PKG_HASH:=a787ee66f4b4cf8ed753661cabcec603989677fa3a107fcb7f15511a44bdb483
PKG_BUILD_DIR=$(BUILD_DIR)/Django-$(PKG_VERSION)
-PKG_MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
+PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE LICENSE.python
PKG_CPE_ID:=cpe:/a:djangoproject:django
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-django-$(PKG_VERSION)
+
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
+include ../python3-package.mk
+
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
-define Package/django
- SUBMENU:=Python
- SECTION:=lang
- CATEGORY:=Languages
- TITLE:=The web framework for perfectionists with deadlines.
- URL:=https://www.djangoproject.com/
- DEPENDS:=+python
+define Package/django/Default
+ SUBMENU:=Python
+ SECTION:=lang
+ CATEGORY:=Languages
+ TITLE:=The web framework for perfectionists with deadlines.
+ URL:=https://www.djangoproject.com/
endef
-define Package/django/description
- The web framework for perfectionists with deadlines.
+define Package/python-django
+$(call Package/django/Default)
+ DEPENDS:= \
+ +PACKAGE_python-django:python \
+ +PACKAGE_python-django:python-pytz
+ VARIANT:=python
endef
-define Build/Compile
- $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
+define Package/python-django/description
+ The web framework for perfectionists with deadlines.
endef
-define Build/InstallDev
- $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
- $(INSTALL_DIR) $(1)/usr/bin
- $(CP) \
- $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
- $(1)$(PYTHON_PKG_DIR)
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/django-admin.py \
- $(1)/usr/bin
+define Package/python3-django
+$(call Package/django/Default)
+ DEPENDS:= \
+ +PACKAGE_python3-django:python3 \
+ +PACKAGE_python3-django:python3-pytz
+ VARIANT:=python3
endef
-define Package/django/install
- $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
- $(INSTALL_DIR) $(1)/usr/bin
- $(CP) \
- $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
- $(1)$(PYTHON_PKG_DIR)
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/django-admin.py \
- $(1)/usr/bin
- # fix python exec path
- sed -i 's/#!.*/#!\/usr\/bin\/python/g' $(1)/usr/bin/django-admin.py
+define Package/python3-django/description
+$(call Package/python-django/description)
+.
+(Variant for Python3)
endef
-$(eval $(call BuildPackage,django))
+$(eval $(call PyPackage,python-django))
+$(eval $(call BuildPackage,python-django))
+
+$(eval $(call Py3Package,python3-django))
+$(eval $(call BuildPackage,python3-django))
+++ /dev/null
-#
-# Copyright (C) 2007-2016 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=et_xmlfile
-PKG_VERSION:=1.0.1
-PKG_RELEASE:=1
-PKG_LICENSE:=MIT
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://pypi.python.org/packages/source/e/et_xmlfile/
-PKG_HASH:=614d9722d572f6246302c4491846d2c393c199cfa4edc9af593437691683335b
-
-include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
-
-define Package/et_xmlfile
- SUBMENU:=Python
- SECTION:=lang
- CATEGORY:=Languages
- MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
- TITLE:=An implementation of lxml.xmlfile for the standard library
- URL:=https://bitbucket.org/openpyxl/et_xmlfile
- DEPENDS:=+python
-endef
-
-define Package/et_xmlfile/description
- An implementation of lxml.xmlfile for the standard library
-endef
-
-define Build/Compile
- $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
-endef
-
-define Package/et_xmlfile/install
- $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
- $(CP) \
- $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
- $(1)$(PYTHON_PKG_DIR)
-endef
-
-$(eval $(call BuildPackage,et_xmlfile))
PKG_NAME:=flup
PKG_VERSION:=1.0.3
-PKG_RELEASE:=1
-PKG_LICENSE:=BSD-3-Clause
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/f/flup
PKG_HASH:=5eb09f26eb0751f8380d8ac43d1dfb20e1d42eca0fa45ea9289fa532a79cd159
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-flup-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=PKG-INFO
+
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
+include ../python3-package.mk
-define Package/flup
- SUBMENU:=Python
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+define Package/flup/Default
SECTION:=lang
CATEGORY:=Languages
- MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
+ SUBMENU:=Python
TITLE:=Random assortment of WSGI servers
URL:=https://www.saddi.com/software/flup/
- DEPENDS:=+python
endef
-define Package/flup/description
- Random assortment of WSGI servers
+define Package/python-flup
+$(call Package/flup/Default)
+ DEPENDS+= \
+ +PACKAGE_python-flup:python-light \
+ +PACKAGE_python-flup:python-logging
+ VARIANT:=python
endef
-define Build/Compile
- $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
+define Package/python3-flup
+$(call Package/flup/Default)
+ DEPENDS+= \
+ +PACKAGE_python3-flup:python3-light \
+ +PACKAGE_python3-flup:python3-logging
+ VARIANT:=python3
endef
-define Package/flup/install
- $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
- $(CP) \
- $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
- $(1)$(PYTHON_PKG_DIR)
+define Package/python-flup/description
+ Random assortment of WSGI servers.
endef
-$(eval $(call BuildPackage,flup))
+define Package/python3-flup/description
+$(call Package/python-flup/description)
+.
+(Variant for Python3)
+endef
+
+$(eval $(call PyPackage,python-flup))
+$(eval $(call BuildPackage,python-flup))
+$(eval $(call BuildPackage,python-flup-src))
+
+$(eval $(call Py3Package,python3-flup))
+$(eval $(call BuildPackage,python3-flup))
+$(eval $(call BuildPackage,python3-flup-src))
PKG_NAME:=gunicorn
PKG_VERSION:=19.9.0
-PKG_RELEASE=1
+PKG_RELEASE=2
PKG_LICENSE:=MIT
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/g/gunicorn
PKG_HASH:=fa2662097c66f920f53f70621c6c58ca4a3c4d3434205e608e121b5b3b71f4f3
+PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
SECTION:=lang
CATEGORY:=Languages
TITLE:=WSGI HTTP Server for UNIX
- MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
URL:=https://gunicorn.org
DEPENDS:=+python +python-setuptools
endef
PKG_NAME:=itsdangerous
PKG_VERSION:=1.1.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/i/itsdangerous
PKG_HASH:=321b033d07f2a4136d3ec762eac9f16a10ccd60f53c0c91af90217ace7ba1f19
-PKG_BUILD_DEPENDS:=python python3
+
+PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
-PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
-
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-$(PKG_NAME)-$(PKG_VERSION)
-PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
include $(INCLUDE_DIR)/package.mk
include ../python3-package.mk
SECTION:=lang
CATEGORY:=Languages
SUBMENU:=Python
- URL:=http://github.com/mitsuhiko/itsdangerous
- TITLE:=python3-itsdangerous
+ TITLE:=ItsDangerous
+ URL:=https://palletsprojects.com/p/itsdangerous/
DEPENDS:=+python3-light
VARIANT:=python3
endef
define Package/python3-itsdangerous/description
-Various helpers to pass trusted data to untrusted environments and back.
+ Various helpers to pass trusted data to untrusted environments and back.
endef
$(eval $(call Py3Package,python3-itsdangerous))
$(eval $(call BuildPackage,python3-itsdangerous))
+$(eval $(call BuildPackage,python3-itsdangerous-src))
+
+++ /dev/null
-#
-# Copyright (C) 2007-2017 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=jdcal
-PKG_VERSION:=1.4
-PKG_RELEASE:=1
-PKG_LICENSE:=BSD-3-Clause
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/j/jdcal
-PKG_HASH:=ea0a5067c5f0f50ad4c7bdc80abad3d976604f6fb026b0b3a17a9d84bb9046c9
-
-include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
-
-define Package/jdcal
- SUBMENU:=Python
- SECTION:=lang
- CATEGORY:=Languages
- MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
- TITLE:=Julian dates from proleptic Gregorian and Julian calendars.
- URL:=https://github.com/phn/jdcal
- DEPENDS:=+python
-endef
-
-define Package/jdcal/description
- Julian dates from proleptic Gregorian and Julian calendars.
-endef
-
-define Build/Compile
- $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
-endef
-
-define Package/jdcal/install
- $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
- $(CP) \
- $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
- $(1)$(PYTHON_PKG_DIR)
-endef
-
-$(eval $(call BuildPackage,jdcal))
include $(TOPDIR)/rules.mk
-PKG_NAME:=openpyxl
-PKG_VERSION:=2.5.9
+PKG_NAME:=python-openpyxl
+PKG_VERSION:=2.6.2
PKG_RELEASE:=1
+
+PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENCE.rst
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE:=openpyxl-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/o/openpyxl
-PKG_HASH:=022c0f3fa1e873cc0ba20651c54dd5e6276fc4ff150b4060723add4fc448645e
+PKG_HASH:=1d2af392cef8c8227bd2ac3ebe3a28b25aba74fd4fa473ce106065f0b73bfe2e
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-openpyxl-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
+include ../python3-package.mk
-define Package/openpyxl
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+define Package/python-openpyxl/Default
SUBMENU:=Python
SECTION:=lang
CATEGORY:=Languages
- MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
TITLE:=A Python library to read/write Excel 2010 xlsx/xlsm files
URL:=https://openpyxl.readthedocs.org/
- DEPENDS:=+python +django
endef
-define Package/openpyxl/description
- A Python library to read/write Excel 2010 xlsx/xlsm files
+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 Build/Compile
- $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
+define Package/python3-openpyxl
+ $(call Package/python-openpyxl/Default)
+ DEPENDS:= \
+ +PACKAGE_python3-openpyxl:python3 \
+ +PACKAGE_python3-openpyxl:python3-defusedxml \
+ +PACKAGE_python3-openpyxl:python3-et_xmlfile \
+ +PACKAGE_python3-openpyxl:python3-jdcal
+ VARIANT:=python3
endef
-define Package/openpyxl/install
- $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
- $(CP) \
- $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
- $(1)$(PYTHON_PKG_DIR)
+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)
+.
+(Variant for Python3)
endef
-$(eval $(call BuildPackage,openpyxl))
+$(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))
include $(TOPDIR)/rules.mk
PKG_NAME:=pillow
-PKG_VERSION:=5.3.0
+PKG_VERSION:=6.1.0
PKG_RELEASE:=1
PKG_SOURCE:=Pillow-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/P/Pillow
-PKG_HASH:=2ea3517cd5779843de8a759c2349a3cd8d3893e03ab47053b66d5ec6f8bc4f93
-PKG_BUILD_DIR:=$(BUILD_DIR)/Pillow-$(PKG_VERSION)
+PKG_HASH:=0804f77cb1e9b6dbd37601cee11283bba39a8d44b9ddb053400c58e0c0d7d9de
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-Pillow-$(PKG_VERSION)
-PKG_LICENSE:=CUSTOM
+PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
+PKG_LICENSE:=HPND
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
+include ../python3-package.mk
-define Package/pillow
- SUBMENU:=Python
- SECTION:=lang
- CATEGORY:=Languages
- TITLE:=The friendly PIL fork
- MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
- URL:=https://python-pillow.org/
- DEPENDS:=+python +libfreetype +libjpeg +zlib +libtiff
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+define Package/python-pillow/Default
+ SUBMENU:=Python
+ SECTION:=lang
+ CATEGORY:=Languages
+ TITLE:=The friendly PIL fork
+ URL:=https://python-pillow.org/
+ DEPENDS:=+libfreetype +libjpeg +libtiff +zlib
+endef
+
+define Package/python-pillow
+$(call Package/python-pillow/Default)
+ DEPENDS+=+PACKAGE_python-pillow:python
+ VARIANT:=python
endef
-define Package/pillow/description
- The friendly PIL fork
+define Package/python-pillow/description
+ The friendly PIL fork
endef
-define Build/Compile
- $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
+define Package/python3-pillow
+$(call Package/python-pillow/Default)
+ DEPENDS+=+PACKAGE_python3-pillow:python3
+ VARIANT:=python3
endef
-define Package/pillow/install
- $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
- $(CP) \
- $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
- $(1)$(PYTHON_PKG_DIR)/
+define Package/python3-pillow/description
+$(call Package/python-pillow/description)
+.
+(Variant for Python3)
endef
-$(eval $(call BuildPackage,pillow))
+PYTHON3_PKG_SETUP_GLOBAL_ARGS += build_ext \
+ --enable-zlib \
+ --enable-jpeg \
+ --enable-tiff \
+ --enable-freetype \
+ --disable-lcms \
+ --disable-webp \
+ --disable-webpmux \
+ --disable-jpeg2000 \
+ --disable-imagequant \
+ --disable-platform-guessing
+
+PYTHON_PKG_SETUP_GLOBAL_ARGS:=$(PYTHON3_PKG_SETUP_GLOBAL_ARGS)
+
+$(eval $(call PyPackage,python-pillow))
+$(eval $(call BuildPackage,python-pillow))
+$(eval $(call BuildPackage,python-pillow-src))
+
+$(eval $(call Py3Package,python3-pillow))
+$(eval $(call BuildPackage,python3-pillow))
+$(eval $(call BuildPackage,python3-pillow-src))
+++ /dev/null
-diff --git a/setup.py b/setup.py
-index 15d81e4..ee6dba6 100755
---- a/setup.py
-+++ b/setup.py
-@@ -136,12 +136,12 @@ except (ImportError, OSError):
-
- NAME = 'Pillow'
- PILLOW_VERSION = get_version()
--JPEG_ROOT = None
-+JPEG_ROOT = os.path.join(os.environ['STAGING_DIR'], "/usr/lib")
- JPEG2K_ROOT = None
--ZLIB_ROOT = None
-+ZLIB_ROOT = os.path.join(os.environ['STAGING_DIR'], "/usr/lib")
- IMAGEQUANT_ROOT = None
--TIFF_ROOT = None
--FREETYPE_ROOT = None
-+TIFF_ROOT = os.path.join(os.environ['STAGING_DIR'], "/usr/lib")
-+FREETYPE_ROOT = os.path.join(os.environ['STAGING_DIR'], "/usr/lib")
- LCMS_ROOT = None
-
-
-@@ -289,159 +289,6 @@ class pil_build_ext(build_ext):
- _add_directory(library_dirs, os.path.join(prefix, "lib"))
- _add_directory(include_dirs, os.path.join(prefix, "include"))
-
-- #
-- # add platform directories
--
-- if self.disable_platform_guessing:
-- pass
--
-- elif sys.platform == "cygwin":
-- # pythonX.Y.dll.a is in the /usr/lib/pythonX.Y/config directory
-- _add_directory(library_dirs,
-- os.path.join("/usr/lib", "python%s" %
-- sys.version[:3], "config"))
--
-- elif sys.platform == "darwin":
-- # attempt to make sure we pick freetype2 over other versions
-- _add_directory(include_dirs, "/sw/include/freetype2")
-- _add_directory(include_dirs, "/sw/lib/freetype2/include")
-- # fink installation directories
-- _add_directory(library_dirs, "/sw/lib")
-- _add_directory(include_dirs, "/sw/include")
-- # darwin ports installation directories
-- _add_directory(library_dirs, "/opt/local/lib")
-- _add_directory(include_dirs, "/opt/local/include")
--
-- # if Homebrew is installed, use its lib and include directories
-- try:
-- prefix = subprocess.check_output(['brew', '--prefix']).strip(
-- ).decode('latin1')
-- except Exception:
-- # Homebrew not installed
-- prefix = None
--
-- ft_prefix = None
--
-- if prefix:
-- # add Homebrew's include and lib directories
-- _add_directory(library_dirs, os.path.join(prefix, 'lib'))
-- _add_directory(include_dirs, os.path.join(prefix, 'include'))
-- ft_prefix = os.path.join(prefix, 'opt', 'freetype')
--
-- if ft_prefix and os.path.isdir(ft_prefix):
-- # freetype might not be linked into Homebrew's prefix
-- _add_directory(library_dirs, os.path.join(ft_prefix, 'lib'))
-- _add_directory(include_dirs,
-- os.path.join(ft_prefix, 'include'))
-- else:
-- # fall back to freetype from XQuartz if
-- # Homebrew's freetype is missing
-- _add_directory(library_dirs, "/usr/X11/lib")
-- _add_directory(include_dirs, "/usr/X11/include")
--
-- elif sys.platform.startswith("linux"):
-- arch_tp = (plat.processor(), plat.architecture()[0])
-- # This should be correct on debian derivatives.
-- if os.path.exists('/etc/debian_version'):
-- # If this doesn't work, don't just silently patch
-- # downstream because it's going to break when people
-- # try to build pillow from source instead of
-- # installing from the system packages.
-- self.add_multiarch_paths()
--
-- elif arch_tp == ("x86_64", "32bit"):
-- # Special Case: 32-bit build on 64-bit machine.
-- _add_directory(library_dirs, "/usr/lib/i386-linux-gnu")
-- else:
-- libdirs = {
-- 'x86_64': ["/lib64", "/usr/lib64",
-- "/usr/lib/x86_64-linux-gnu"],
-- '64bit': ["/lib64", "/usr/lib64",
-- "/usr/lib/x86_64-linux-gnu"],
-- 'i386': ["/usr/lib/i386-linux-gnu"],
-- 'i686': ["/usr/lib/i386-linux-gnu"],
-- '32bit': ["/usr/lib/i386-linux-gnu"],
-- 'aarch64': ["/usr/lib64", "/usr/lib/aarch64-linux-gnu"],
-- 'arm': ["/usr/lib/arm-linux-gnueabi"],
-- 'armv71': ["/usr/lib/arm-linux-gnueabi"],
-- 'armv7l': ["/usr/lib"],
-- 'ppc64': ["/usr/lib64", "/usr/lib/ppc64-linux-gnu",
-- "/usr/lib/powerpc64-linux-gnu"],
-- 'ppc64le': ["/usr/lib64"],
-- 'ppc': ["/usr/lib/ppc-linux-gnu",
-- "/usr/lib/powerpc-linux-gnu"],
-- 's390x': ["/usr/lib64", "/usr/lib/s390x-linux-gnu"],
-- 's390': ["/usr/lib/s390-linux-gnu"],
-- }
--
-- for platform_ in arch_tp:
-- dirs = libdirs.get(platform_, None)
-- if not dirs:
-- continue
-- for path in dirs:
-- _add_directory(library_dirs, path)
-- break
--
-- else:
-- raise ValueError(
-- "Unable to identify Linux platform: `%s`" % platform_)
--
-- # termux support for android.
-- # system libraries (zlib) are installed in /system/lib
-- # headers are at $PREFIX/include
-- # user libs are at $PREFIX/lib
-- if os.environ.get('ANDROID_ROOT', None):
-- _add_directory(library_dirs,
-- os.path.join(os.environ['ANDROID_ROOT'],
-- 'lib'))
--
-- elif sys.platform.startswith("gnu"):
-- self.add_multiarch_paths()
--
-- elif sys.platform.startswith("freebsd"):
-- _add_directory(library_dirs, "/usr/local/lib")
-- _add_directory(include_dirs, "/usr/local/include")
--
-- elif sys.platform.startswith("netbsd"):
-- _add_directory(library_dirs, "/usr/pkg/lib")
-- _add_directory(include_dirs, "/usr/pkg/include")
--
-- elif sys.platform.startswith("sunos5"):
-- _add_directory(library_dirs, "/opt/local/lib")
-- _add_directory(include_dirs, "/opt/local/include")
--
-- # FIXME: check /opt/stuff directories here?
--
-- # standard locations
-- if not self.disable_platform_guessing:
-- _add_directory(library_dirs, "/usr/local/lib")
-- _add_directory(include_dirs, "/usr/local/include")
--
-- _add_directory(library_dirs, "/usr/lib")
-- _add_directory(include_dirs, "/usr/include")
-- # alpine, at least
-- _add_directory(library_dirs, "/lib")
--
-- # on Windows, look for the OpenJPEG libraries in the location that
-- # the official installer puts them
-- if sys.platform == "win32":
-- program_files = os.environ.get('ProgramFiles', '')
-- best_version = (0, 0)
-- best_path = None
-- for name in os.listdir(program_files):
-- if name.startswith('OpenJPEG '):
-- version = tuple(int(x) for x in
-- name[9:].strip().split('.'))
-- if version > best_version:
-- best_version = version
-- best_path = os.path.join(program_files, name)
--
-- if best_path:
-- _dbg('Adding %s to search list', best_path)
-- _add_directory(library_dirs, os.path.join(best_path, 'lib'))
-- _add_directory(include_dirs,
-- os.path.join(best_path, 'include'))
--
- #
- # insert new dirs *before* default libs, to avoid conflicts
- # between Python PYD stub libs and real libraries
#
-# Copyright (C) 2007-2016 OpenWrt.org
-#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
PKG_NAME:=pyjwt
PKG_VERSION:=1.7.1
PKG_RELEASE:=1
+
+PKG_MAINTAINER:=Eneas U de Queiroz <cote2004-github@yahoo.com>
PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
PKG_SOURCE:=PyJWT-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/P/PyJWT
PKG_HASH:=8d59a976fb773f3e6a39c85636357c4f0e242707394cadadd9814f5cbaa20e96
+
PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-PyJWT-$(PKG_VERSION)
-PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
include ../python3-package.mk
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
define Package/python-pyjwt/Default
SUBMENU:=Python
SECTION:=lang
CATEGORY:=Languages
- MAINTAINER:=Eneas U de Queiroz <cote2004-github@yahoo.com>
TITLE:=JSON Web Token implementation in Python
URL:=http://github.com/jpadilla/pyjwt
endef
include $(TOPDIR)/rules.mk
PKG_NAME:=pyodbc
-PKG_VERSION:=4.0.24
-PKG_RELEASE:=1
+PKG_VERSION:=4.0.26
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/pyodbc
-PKG_HASH:=4326abb737dec36156998d52324921673d30f575e1e0998f0c5edd7de20e61d4
+PKG_HASH:=e52700b5d24a846483b5ab80acd9153f8e593999c9184ffea11596288fb33de3
PKG_BUILD_DEPENDS:=python python3 unixodbc
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE.txt
PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-$(PKG_NAME)-$(PKG_VERSION)
PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+PKG_BUILD_DEPENDS:=unixodbc/host
+
+include $(INCLUDE_DIR)/uclibc++.mk
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
include ../python3-package.mk
CATEGORY:=Languages
SUBMENU:=Python
URL:=https://github.com/mkleehammer/pyodbc
- DEPENDS:=+unixodbc +libstdcpp
+ DEPENDS:=+unixodbc $(CXX_DEPENDS)
endef
define Package/python-pyodbc
--- /dev/null
+#
+# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/)
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=aiohttp-cors
+PKG_VERSION:=0.7.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=aiohttp-cors-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/a/aiohttp_cors/
+PKG_HASH:=4d39c6d7100fd9764ed1caf8cebf0eb01bf5e3f24e2e073fda6234bc48b19f5d
+
+PKG_MAINTAINER:=Josef Schlehofer <pepe.schlehofer@gmail.com>
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=LICENSE
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-aiohttp-cors
+ SECTION:=lang
+ CATEGORY:=Languages
+ SUBMENU:=Python
+ TITLE:=CORS support for aiohttp
+ URL:=https://github.com/aio-libs/aiohttp-cors
+ DEPENDS:= \
+ +python3-aiohttp \
+ +python3-light
+ VARIANT:=python3
+endef
+
+define Package/python3-aiohttp-cors/description
+ Implements Cross Origin Resource Sharing (CORS) support for aiohttp asyncio-powered asynchronous HTTP server.
+endef
+
+$(eval $(call Py3Package,python3-aiohttp-cors))
+$(eval $(call BuildPackage,python3-aiohttp-cors))
+$(eval $(call BuildPackage,python3-aiohttp-cors-src))
--- /dev/null
+#
+# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/)
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=aiohttp
+PKG_VERSION:=3.5.4
+PKG_RELEASE:=1
+
+PKG_SOURCE:=aiohttp-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/a/aiohttp/
+PKG_HASH:=9c4c83f4fa1938377da32bc2d59379025ceeee8e24b89f72fcbccd8ca22dc9bf
+
+PKG_MAINTAINER:=Josef Schlehofer <pepe.schlehofer@gmail.com>
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=LICENSE
+PKG_CPE_ID:=cpe:/a:aio-libs_project:aiohttp
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-aiohttp
+ SECTION:=lang
+ CATEGORY:=Languages
+ SUBMENU:=Python
+ TITLE:=Async http client/server framework (asyncio)
+ URL:=https://github.com/aio-libs/aiohttp
+ DEPENDS:= \
+ +python3-light \
+ +python3-attrs \
+ +python3-chardet \
+ +python3-multidict \
+ +python3-async-timeout \
+ +python3-yarl \
+ +python3-logging \
+ +python3-codecs \
+ +python3-cgi \
+ +python3-openssl
+ VARIANT:=python3
+endef
+
+define Package/python3-aiohttp/description
+Asynchronous HTTP client/server framework for asyncio and Python3
+endef
+
+$(eval $(call Py3Package,python3-aiohttp))
+$(eval $(call BuildPackage,python3-aiohttp))
+$(eval $(call BuildPackage,python3-aiohttp-src))
--- /dev/null
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-appdirs
+PKG_VERSION:=1.4.3
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Karel Kočí <cynerd@email.cz>
+
+PKG_SOURCE_URL:=https://pypi.python.org/packages/source/a/appdirs/
+PKG_SOURCE:=appdirs-$(PKG_VERSION).tar.gz
+PKG_HASH:=9e5896d1372858f8dd3344faf4e5014d21849c756c8d5701f78f8a103b372d92
+PKG_LICENSE:=MIT
+PKG_BUILD_DIR:=$(BUILD_DIR)/appdirs-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-appdirs
+ SECTION:=lang
+ CATEGORY:=Languages
+ SUBMENU:=Python
+ URL:=https://github.com/ActiveState/appdirs
+ TITLE:=python3-appdirs
+ DEPENDS:=+python3-light
+ VARIANT:=python3
+endef
+
+define Package/python-appdirs/description
+ The Universal Character Encoding Detector
+endef
+
+$(eval $(call Py3Package,python3-appdirs))
+$(eval $(call BuildPackage,python3-appdirs))
+$(eval $(call BuildPackage,python3-appdirs-src))
--- /dev/null
+#
+# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/)
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-astral
+PKG_VERSION:=1.10.1
+PKG_RELEASE:=1
+
+PKG_SOURCE:=astral-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/a/astral/
+PKG_HASH:=d2a67243c4503131c856cafb1b1276de52a86e5b8a1d507b7e08bee51cb67bf1
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-astral-$(PKG_VERSION)
+
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=LICENSE
+PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>
+
+include $(INCLUDE_DIR)/package.mk
+include ../python-package.mk
+include ../python3-package.mk
+
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+define Package/python-astral/Default
+ SECTION:=lang
+ CATEGORY:=Languages
+ SUBMENU:=Python
+ TITLE:=Calculations for the position of the sun and moon
+ URL:=https://github.com/sffjunkie/astral
+endef
+
+define Package/python-astral
+$(call Package/python-astral/Default)
+ DEPENDS+= \
+ +PACKAGE_python-astral:python-light \
+ +PACKAGE_python-astral:python-pytz
+ VARIANT:=python
+endef
+
+define Package/python3-astral
+$(call Package/python-astral/Default)
+ DEPENDS+= \
+ +PACKAGE_python3-astral:python3-light \
+ +PACKAGE_python3-astral:python3-pytz
+ VARIANT:=python3
+endef
+
+define Package/python-astral/description
+Astral is a python module for calculating the times of various aspects of the sun and moon.
+endef
+
+define Package/python3-astral/description
+$(call Package/python-astral/description)
+.
+(Variant for Python3)
+endef
+
+$(eval $(call PyPackage,python-astral))
+$(eval $(call BuildPackage,python-astral))
+$(eval $(call BuildPackage,python-astral-src))
+
+$(eval $(call Py3Package,python3-astral))
+$(eval $(call BuildPackage,python3-astral))
+$(eval $(call BuildPackage,python3-astral-src))
--- /dev/null
+#
+# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/)
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=async-timeout
+PKG_VERSION:=3.0.1
+PKG_RELEASE:=1
+
+PKG_SOURCE:=async-timeout-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/a/async-timeout/
+PKG_HASH:=0c3c816a028d47f659d6ff5c745cb2acf1f966da1fe5c19c77a70282b25f4c5f
+
+PKG_MAINTAINER:=Josef Schlehofer <pepe.schlehofer@gmail.com>
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=LICENSE
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-async-timeout
+ SECTION:=lang
+ CATEGORY:=Languages
+ SUBMENU:=Python
+ TITLE:=Timeout context manager for asyncio programs
+ URL:=https://github.com/aio-libs/async-timeout
+ DEPENDS:= \
+ +python3-light \
+ +python3-asyncio
+ VARIANT:=python3
+endef
+
+define Package/python3-async-timeout/description
+Timeout context manager for asyncio programs
+endef
+
+$(eval $(call Py3Package,python3-async-timeout))
+$(eval $(call BuildPackage,python3-async-timeout))
+$(eval $(call BuildPackage,python3-async-timeout-src))
include $(TOPDIR)/rules.mk
PKG_NAME:=python-attrs
-PKG_VERSION:=18.2.0
+PKG_VERSION:=19.1.0
PKG_RELEASE:=1
PKG_SOURCE:=attrs-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/a/attrs
-PKG_HASH:=10cbf6e27dbce8c30807caf056c8eb50917e0eaafe86347671b57254006c3e69
+PKG_HASH:=f0b870f674851ecbfbbbd364d6b5cbdff9dcedbc7f3f5e18a6891057f21fe399
PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-attrs-$(PKG_VERSION)
SECTION:=lang
CATEGORY:=Languages
SUBMENU:=Python
- URL:=http://www.attrs.org/
+ TITLE:=Classes Without Boilerplate
+ URL:=https://www.attrs.org/
endef
define Package/python-attrs
$(call Package/python-attrs/Default)
- TITLE:=Classes Without Boilerplate
DEPENDS:=+PACKAGE_python-attrs:python-light
VARIANT:=python
endef
define Package/python3-attrs
$(call Package/python-attrs/Default)
- TITLE:=Classes Without Boilerplate
DEPENDS:=+PACKAGE_python3-attrs:python3-light
VARIANT:=python3
endef
PKG_NAME:=python-automat
PKG_VERSION:=0.7.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=Automat-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/A/Automat
PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+PYTHON_PKG_SETUP_VARS:= \
+ PKG_VERSION="$(PKG_VERSION)"
+PYTHON3_PKG_SETUP_VARS:= \
+ PKG_VERSION="$(PKG_VERSION)"
+
define Package/python-automat/Default
SECTION:=lang
CATEGORY:=Languages
SUBMENU:=Python
+ TITLE:=Concise, idiomatic finite-state automata
URL:=https://github.com/glyph/Automat
endef
define Package/python-automat
$(call Package/python-automat/Default)
- TITLE:=Concise, idiomatic finite-state automata
DEPENDS:= \
+PACKAGE_python-automat:python-light \
+PACKAGE_python-automat:python-attrs \
define Package/python3-automat
$(call Package/python-automat/Default)
- TITLE:=Concise, idiomatic finite-state automata
DEPENDS:= \
+PACKAGE_python3-automat:python3-light \
+PACKAGE_python3-automat:python3-attrs \
-|$(PYTHON3_PKG_DIR)/automat/_visualize.py
endef
-define PyBuild/Compile
- $(call Build/Compile/PyMod,, \
- install --prefix="/usr" --root="$(PKG_INSTALL_DIR)", \
- PKG_VERSION="$(PKG_VERSION)" \
- )
-endef
-
-define Py3Build/Compile
- $(call Build/Compile/Py3Mod,, \
- install --prefix="/usr" --root="$(PKG_INSTALL_DIR)", \
- PKG_VERSION="$(PKG_VERSION)" \
- )
-endef
-
$(eval $(call PyPackage,python-automat))
$(eval $(call BuildPackage,python-automat))
$(eval $(call BuildPackage,python-automat-src))
--- /dev/null
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=awscli
+PKG_VERSION:=1.16.75
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/a/awscli
+PKG_HASH:=8d96ec0de325ea8271cc6aa95b7392bbf548ec4aabd3ffbcdc0619b64edd4a45
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-awscli-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Daniel Danzberger <daniel@dd-wrt.com>
+PKG_LICENSE:=MIT
+
+include $(INCLUDE_DIR)/package.mk
+include ../python-package.mk
+include ../python3-package.mk
+
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+define Package/python-awscli/Default
+ SUBMENU:=Python
+ SECTION:=lang
+ CATEGORY:=Languages
+ TITLE:=awscli
+ URL:=https://github.com/aws/aws-cli
+endef
+
+define Package/python-awscli
+$(call Package/python-awscli/Default)
+ DEPENDS:=+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 \
+ +PACKAGE_python3-awscli:python3-yaml \
+ +PACKAGE_python3-awscli:python3-pyasn1 \
+ +PACKAGE_python3-awscli:python3-botocore \
+ +PACKAGE_python3-awscli:python3-rsa \
+ +PACKAGE_python3-awscli:python3-colorama \
+ +PACKAGE_python3-awscli:python3-docutils \
+ +PACKAGE_python3-awscli:python3-s3transfer
+ VARIANT:=python3
+endef
+
+define Package/python-awscli/description
+This package provides a unified command line interface to Amazon Web Services.
+endef
+
+define Package/python3-awscli/description
+$(call Package/python-awscli/description)
+.
+(Variant for Python3)
+endef
+
+$(eval $(call PyPackage,python-awscli))
+$(eval $(call BuildPackage,python-awscli))
+$(eval $(call BuildPackage,python-awscli-src))
+
+$(eval $(call Py3Package,python3-awscli))
+$(eval $(call BuildPackage,python3-awscli))
+$(eval $(call BuildPackage,python3-awscli-src))
--- /dev/null
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=boto3
+PKG_VERSION:=1.9.135
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/b/boto3
+PKG_HASH:=5e5805992e873e5687b5ef3b4c56c386ccb4df1c3364f8b8601d289e2f275be1
+PKG_BUILD_DIR:=$(BUILD_DIR)/boto3-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Daniel Danzberger <daniel@dd-wrt.com>
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=LICENSE
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-boto3
+ SUBMENU:=Python
+ SECTION:=lang
+ CATEGORY:=Languages
+ TITLE:=AWS SDK for Python (Boto3)
+ URL:=https://aws.amazon.com/sdk-for-python/
+ DEPENDS:=+python3 \
+ +python3-jmespath \
+ +python3-botocore \
+ +python3-s3transfer
+ VARIANT:=python3
+endef
+
+define Package/python3-boto3/description
+Boto3 is the Amazon Web Services (AWS) Software Development Kit (SDK) for Python,
+which allows Python developers to write software that makes use of services like Amazon S3 and Amazon EC2.
+endef
+
+$(eval $(call Py3Package,python3-boto3))
+$(eval $(call BuildPackage,python3-boto3))
+$(eval $(call BuildPackage,python3-boto3-src))
--- /dev/null
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=botocore
+PKG_VERSION:=1.12.66
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/b/botocore
+PKG_HASH:=25c39ecc71356287cf79d66981ec77deca374e28043b19b2f818d48aa34272a1
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-botocore-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Daniel Danzberger <daniel@dd-wrt.com>
+PKG_LICENSE:=MIT
+
+include $(INCLUDE_DIR)/package.mk
+include ../python-package.mk
+include ../python3-package.mk
+
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+define Package/python-botocore/Default
+ SUBMENU:=Python
+ SECTION:=lang
+ CATEGORY:=Languages
+ TITLE:=botocore
+ URL:=https://github.com/boto/botocore
+endef
+
+define Package/python-botocore
+$(call Package/python-botocore/Default)
+ DEPENDS:=+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 \
+ +PACKAGE_python3-botocore:python3-urllib3 \
+ +PACKAGE_python3-botocore:python3-docutils \
+ +PACKAGE_python3-botocore:python3-dateutil \
+ +PACKAGE_python3-botocore:python3-jmespath \
+ +PACKAGE_python3-botocore:python3-requests
+ VARIANT:=python3
+endef
+
+define Package/python-botocore/description
+A low-level interface to a growing number of Amazon Web Services.
+The botocore package is the foundation for the AWS CLI as well as boto3.
+endef
+
+define Package/python3-botocore/description
+$(call Package/python-botocore/description)
+.
+(Variant for Python3)
+endef
+
+$(eval $(call PyPackage,python-botocore))
+$(eval $(call BuildPackage,python-botocore))
+$(eval $(call BuildPackage,python-botocore-src))
+
+$(eval $(call Py3Package,python3-botocore))
+$(eval $(call BuildPackage,python3-botocore))
+$(eval $(call BuildPackage,python3-botocore-src))
#
-# Copyright (C) 2007-2016 OpenWrt.org
-#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=python-certifi
-PKG_VERSION:=2018.11.29
+PKG_VERSION:=2019.6.16
PKG_RELEASE:=1
+
+PKG_MAINTAINER:=Eneas U de Queiroz <cote2004-github@yahoo.com>
PKG_LICENSE:=MPL-2.0
+PKG_LICENSE_FILES:=LICENSE
PKG_SOURCE:=certifi-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/c/certifi
-PKG_HASH:=47f9c83ef4c0c621eaef743f133f09fa8a74a9b75f037e8624f83bd1b6626cb7
+PKG_HASH:=945e3ba63a0b9f577b1395204e13c3a231f9bc0223888be653286534e5873695
+
PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-certifi-$(PKG_VERSION)
-PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
include ../python3-package.mk
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
define Package/python-certifi/Default
SUBMENU:=Python
SECTION:=lang
CATEGORY:=Languages
- MAINTAINER:=Eneas U de Queiroz <cote2004-github@yahoo.com>
- TITLE:=Python package for providing Mozilla's CA Bundle.
+ TITLE:=Python package for Mozilla's CA Bundle
URL:=http://certifi.io/
endef
include $(TOPDIR)/rules.mk
PKG_NAME:=python-cffi
-PKG_VERSION:=1.11.5
+PKG_VERSION:=1.12.3
PKG_RELEASE:=1
PKG_SOURCE:=cffi-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.io/packages/source/c/cffi
-PKG_HASH:=e90f17980e6ab0f3c2f3730e56d1fe9bcba1891eeea58966e89d352492cc74f4
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/c/cffi
+PKG_HASH:=041c81822e9f84b1d9c401182e174996f0bae9991f33725d059b771744290774
PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-cffi-$(PKG_VERSION)
PKG_LICENSE_FILES:=LICENSE
PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>, Alexandru Ardelean <ardeleanalex@gmail.com>
-PKG_BUILD_DEPENDS:=libffi/host
-
-HOST_PYTHON_PACKAGE_BUILD_DEPENDS:="cffi==$(PKG_VERSION)"
-HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:="cffi==$(PKG_VERSION)"
-
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
include ../python3-package.mk
SECTION:=lang
CATEGORY:=Languages
SUBMENU:=Python
- URL:=http://cffi.readthedocs.org/
+ TITLE:=C Foreign Function Interface
+ URL:=https://cffi.readthedocs.org/
DEPENDS:=+libffi
endef
define Package/python-cffi
$(call Package/python-cffi/Default)
- TITLE:=python-cffi
- DEPENDS+=+PACKAGE_python-cffi:python-light +PACKAGE_python-cffi:python-pycparser
+ DEPENDS+= \
+ +PACKAGE_python-cffi:python-light \
+ +PACKAGE_python-cffi:python-pycparser
VARIANT:=python
endef
define Package/python3-cffi
$(call Package/python-cffi/Default)
- TITLE:=python3-cffi
- DEPENDS+=+PACKAGE_python3-cffi:python3-light +PACKAGE_python3-cffi:python3-pycparser
+ DEPENDS+= \
+ +PACKAGE_python3-cffi:python3-light \
+ +PACKAGE_python3-cffi:python3-pycparser
VARIANT:=python3
endef
--- /dev/null
+#
+# Copyright (C) 2007-2017 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-chardet
+PKG_VERSION:=3.0.4
+PKG_RELEASE:=2
+PKG_LICENSE:=LGPL-2.1
+
+PKG_SOURCE:=chardet-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://pypi.python.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0d4a3cf93462473795d18e9535498c8f929d/
+PKG_HASH:=84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-chardet-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+include ../python-package.mk
+include ../python3-package.mk
+
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+define Package/python-chardet/Default
+ SUBMENU:=Python
+ SECTION:=lang
+ CATEGORY:=Languages
+ MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
+ URL:=https://github.com/chardet/chardet
+endef
+
+define Package/python-chardet
+$(call Package/python-chardet/Default)
+ TITLE:=Universal encoding detector for Python 2
+ DEPENDS:=+PACKAGE_python-chardet:python
+ VARIANT:=python
+endef
+
+define Package/python3-chardet
+$(call Package/python-chardet/Default)
+ TITLE:=Universal encoding detector for Python3
+ DEPENDS:=+PACKAGE_python3-chardet:python3-light
+ VARIANT:=python3
+endef
+
+define Package/python-chardet/description
+ Universal encoding detector for Python 2 and 3
+endef
+
+define Package/python3-chardet/description
+$(call Package/python-chardet/description)
+.
+(Variant for Python3)
+endef
+
+define Py3Package/python3-chardet/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
+ for bin in $(1)/usr/bin/*; do \
+ mv $$$$bin $$$${bin}3 ; \
+ done
+endef
+
+$(eval $(call PyPackage,python-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))
--- /dev/null
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=colorama
+PKG_VERSION:=0.4.1
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/c/colorama
+PKG_HASH:=05eed71e2e327246ad6b38c540c4a3117230b19679b875190486ddd2d721422d
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-colorama-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Daniel Danzberger <daniel@dd-wrt.com>
+PKG_LICENSE:=MIT
+
+include $(INCLUDE_DIR)/package.mk
+include ../python-package.mk
+include ../python3-package.mk
+
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+define Package/python-colorama/Default
+ SUBMENU:=Python
+ SECTION:=lang
+ CATEGORY:=Languages
+ TITLE:=colorama
+ URL:=https://github.com/tartley/colorama
+endef
+
+define Package/python-colorama
+$(call Package/python-colorama/Default)
+ DEPENDS:=+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
+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))
SECTION:=lang
CATEGORY:=Languages
SUBMENU:=Python
+ TITLE:=Symbolic constants in Python
URL:=https://github.com/twisted/constantly
endef
define Package/python-constantly
$(call Package/python-constantly/Default)
- TITLE:=Symbolic constants in Python
DEPENDS:=+PACKAGE_python-constantly:python-light
VARIANT:=python
endef
define Package/python3-constantly
$(call Package/python-constantly/Default)
- TITLE:=Symbolic constants in Python
DEPENDS:=+PACKAGE_python3-constantly:python3-light
VARIANT:=python3
endef
--- /dev/null
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-contextlib2
+PKG_VERSION:=0.5.5
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Karel Kočí <cynerd@email.cz>
+
+PKG_SOURCE_URL:=https://pypi.python.org/packages/source/c/contextlib2/
+PKG_SOURCE:=contextlib2-$(PKG_VERSION).tar.gz
+PKG_HASH:=509f9419ee91cdd00ba34443217d5ca51f5a364a404e1dce9e8979cea969ca48
+PKG_BUILD_DIR:=$(BUILD_DIR)/contextlib2-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-contextlib2
+ SECTION:=lang
+ CATEGORY:=Languages
+ SUBMENU:=Python
+ URL:=http://contextlib2.readthedocs.org
+ TITLE:=python3-contextlib2
+ DEPENDS:=+python3-light
+ VARIANT:=python3
+endef
+
+define Package/python-contextlib2/description
+ contextlib2 is a backport of the standard library’s contextlib module to earlier Python versions.
+endef
+
+$(eval $(call Py3Package,python3-contextlib2))
+$(eval $(call BuildPackage,python3-contextlib2))
+$(eval $(call BuildPackage,python3-contextlib2-src))
PKG_NAME:=python-crypto
PKG_VERSION:=2.6.1
-PKG_RELEASE:=3
+PKG_RELEASE:=4
PKG_SOURCE:=pycrypto-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/pycrypto
PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+PYTHON_PKG_SETUP_ARGS:=
+PYTHON_PKG_SETUP_VARS:= \
+ CONFIG_BIG_ENDIAN="$(CONFIG_BIG_ENDIAN)"
+
+PYTHON3_PKG_SETUP_ARGS:=
+PYTHON3_PKG_SETUP_VARS:= \
+ CONFIG_BIG_ENDIAN="$(CONFIG_BIG_ENDIAN)"
+
define Package/python-crypto/Default
SECTION:=lang-python
CATEGORY:=Languages
SUBMENU:=Python
+ TITLE:=Python Cryptography Toolkit
URL:=https://www.dlitz.net/software/pycrypto/
+ DEPENDS:=+libgmp
endef
define Package/python-crypto
$(call Package/python-crypto/Default)
- TITLE:=python-crypto
- DEPENDS:=+libgmp +PACKAGE_python-crypto:python
+ DEPENDS+=+PACKAGE_python-crypto:python
VARIANT:=python
endef
define Package/python3-crypto
$(call Package/python-crypto/Default)
- TITLE:=python3-crypto
- DEPENDS:=+libgmp +PACKAGE_python3-crypto:python3
+ DEPENDS+=+PACKAGE_python3-crypto:python3
VARIANT:=python3
endef
(Variant for Python3)
endef
-define PyBuild/Compile
- $(call Build/Compile/PyMod,,\
- install --prefix=/usr --root=$(PKG_INSTALL_DIR),\
- CONFIG_BIG_ENDIAN="$(CONFIG_BIG_ENDIAN)" \
- )
-endef
-
-define Py3Build/Compile
- $(call Build/Compile/Py3Mod,,\
- install --prefix=/usr --root=$(PKG_INSTALL_DIR),\
- CONFIG_BIG_ENDIAN="$(CONFIG_BIG_ENDIAN)" \
- )
-endef
-
$(eval $(call PyPackage,python-crypto))
$(eval $(call BuildPackage,python-crypto))
$(eval $(call BuildPackage,python-crypto-src))
--- /dev/null
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-cryptodome
+PKG_VERSION:=3.8.2
+PKG_RELEASE:=1
+
+PKG_SOURCE:=pycryptodome-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/pycryptodome
+PKG_HASH:=5bc40f8aa7ba8ca7f833ad2477b9d84e1bfd2630b22a46d9bbd221982f8c3ac0
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-cryptodome-$(PKG_VERSION)
+
+PKG_LICENSE:=BSD-2-Clause
+PKG_LICENSE_FILES:=LICENSE.rst
+PKG_MAINTAINER:=Richard Yu <yurichard3839@gmail.com>
+
+include $(INCLUDE_DIR)/package.mk
+include ../python-package.mk
+include ../python3-package.mk
+
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+PYTHON_PKG_SETUP_ARGS:=
+PYTHON_PKG_SETUP_VARS:= \
+ CONFIG_BIG_ENDIAN="$(CONFIG_BIG_ENDIAN)"
+
+PYTHON3_PKG_SETUP_ARGS:=
+PYTHON3_PKG_SETUP_VARS:= \
+ CONFIG_BIG_ENDIAN="$(CONFIG_BIG_ENDIAN)"
+
+define Package/python-cryptodome/Default
+ SECTION:=lang-python
+ CATEGORY:=Languages
+ SUBMENU:=Python
+ TITLE:=A self-contained cryptographic library for Python
+ URL:=https://www.pycryptodome.org/
+ DEPENDS:=+libgmp
+endef
+
+define Package/python-cryptodome
+$(call Package/python-cryptodome/Default)
+ DEPENDS+=+PACKAGE_python-cryptodome:python
+ VARIANT:=python
+ CONFLICTS:=python-crypto
+endef
+
+define Package/python3-cryptodome
+$(call Package/python-cryptodome/Default)
+ DEPENDS+=+PACKAGE_python3-cryptodome:python3
+ VARIANT:=python3
+ CONFLICTS:=python3-crypto
+endef
+
+define Package/python-cryptodome/description
+PyCryptodome is a self-contained Python package of low-level
+cryptographic primitives.
+endef
+
+define Package/python3-cryptodome/description
+$(call Package/python-cryptodome/description)
+.
+(Variant for Python3)
+endef
+
+$(eval $(call PyPackage,python-cryptodome))
+$(eval $(call BuildPackage,python-cryptodome))
+$(eval $(call BuildPackage,python-cryptodome-src))
+
+$(eval $(call Py3Package,python3-cryptodome))
+$(eval $(call BuildPackage,python3-cryptodome))
+$(eval $(call BuildPackage,python3-cryptodome-src))
--- /dev/null
+--- a/lib/Crypto/Math/_IntegerGMP.py
++++ b/lib/Crypto/Math/_IntegerGMP.py
+@@ -92,7 +92,7 @@ gmp_defs = """typedef unsigned long UNIX_ULONG;
+ int __gmpz_divisible_ui_p (const mpz_t n, UNIX_ULONG d);
+ """
+
+-lib = load_lib("gmp", gmp_defs)
++lib = load_lib("libgmp.so.10", gmp_defs)
+ implementation = {"library": "gmp", "api": backend}
+
+ if hasattr(lib, "__mpir_version"):
--- /dev/null
+--- a/setup.py
++++ b/setup.py
+@@ -293,6 +293,9 @@ package_data = {
+ ],
+ }
+
++packages = [i for i in packages if not i.startswith('Crypto.SelfTest')]
++package_data = {k: v for k, v in package_data.items() if not k.startswith('Crypto.SelfTest')}
++
+ ext_modules = [
+ # Hash functions
+ Extension("Crypto.Hash._MD2",
--- /dev/null
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-cryptodomex
+PKG_VERSION:=3.8.2
+PKG_RELEASE:=1
+
+PKG_SOURCE:=pycryptodomex-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/pycryptodomex
+PKG_HASH:=e50b15af6bbdc6b5f8bd70d818cb846b15303ffa6c371b799db561a403a21607
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-cryptodomex-$(PKG_VERSION)
+
+PKG_LICENSE:=BSD-2-Clause
+PKG_LICENSE_FILES:=LICENSE.rst
+PKG_MAINTAINER:=Richard Yu <yurichard3839@gmail.com>
+
+include $(INCLUDE_DIR)/package.mk
+include ../python-package.mk
+include ../python3-package.mk
+
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+PYTHON_PKG_SETUP_ARGS:=
+PYTHON_PKG_SETUP_VARS:= \
+ CONFIG_BIG_ENDIAN="$(CONFIG_BIG_ENDIAN)"
+
+PYTHON3_PKG_SETUP_ARGS:=
+PYTHON3_PKG_SETUP_VARS:= \
+ CONFIG_BIG_ENDIAN="$(CONFIG_BIG_ENDIAN)"
+
+define Package/python-cryptodomex/Default
+ SECTION:=lang-python
+ CATEGORY:=Languages
+ SUBMENU:=Python
+ TITLE:=A self-contained cryptographic library for Python
+ URL:=https://www.pycryptodome.org/
+ DEPENDS:=+libgmp
+endef
+
+define Package/python-cryptodomex
+$(call Package/python-cryptodomex/Default)
+ DEPENDS+=+PACKAGE_python-cryptodomex:python
+ VARIANT:=python
+endef
+
+define Package/python3-cryptodomex
+$(call Package/python-cryptodomex/Default)
+ DEPENDS+=+PACKAGE_python3-cryptodomex:python3
+ VARIANT:=python3
+endef
+
+define Package/python-cryptodomex/description
+PyCryptodome is a self-contained Python package of low-level
+cryptographic primitives.
+endef
+
+define Package/python3-cryptodomex/description
+$(call Package/python-cryptodomex/description)
+.
+(Variant for Python3)
+endef
+
+$(eval $(call PyPackage,python-cryptodomex))
+$(eval $(call BuildPackage,python-cryptodomex))
+$(eval $(call BuildPackage,python-cryptodomex-src))
+
+$(eval $(call Py3Package,python3-cryptodomex))
+$(eval $(call BuildPackage,python3-cryptodomex))
+$(eval $(call BuildPackage,python3-cryptodomex-src))
--- /dev/null
+--- a/lib/Cryptodome/Math/_IntegerGMP.py
++++ b/lib/Cryptodome/Math/_IntegerGMP.py
+@@ -92,7 +92,7 @@ gmp_defs = """typedef unsigned long UNIX_ULONG;
+ int __gmpz_divisible_ui_p (const mpz_t n, UNIX_ULONG d);
+ """
+
+-lib = load_lib("gmp", gmp_defs)
++lib = load_lib("libgmp.so.10", gmp_defs)
+ implementation = {"library": "gmp", "api": backend}
+
+ if hasattr(lib, "__mpir_version"):
--- /dev/null
+--- a/setup.py
++++ b/setup.py
+@@ -293,6 +293,9 @@ package_data = {
+ ],
+ }
+
++packages = [i for i in packages if not i.startswith('Crypto.SelfTest')]
++package_data = {k: v for k, v in package_data.items() if not k.startswith('Crypto.SelfTest')}
++
+ ext_modules = [
+ # Hash functions
+ Extension("Crypto.Hash._MD2",
include $(TOPDIR)/rules.mk
PKG_NAME:=python-cryptography
-PKG_VERSION:=2.4.2
-PKG_RELEASE:=1
+PKG_VERSION:=2.7
+PKG_RELEASE:=2
PKG_SOURCE:=cryptography-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:= https://files.pythonhosted.org/packages/source/c/cryptography
-PKG_HASH:=05a6052c6a9f17ff78ba78f8e6eb1d777d25db3b763343a1ae89a7a8670386dd
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/c/cryptography
+PKG_HASH:=e6347742ac8f35ded4a46ff835c60e68c22a536a8ae5c4422966d06946b6d4c6
PKG_LICENSE:=Apache-2.0 BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE.APACHE LICENSE.BSD
PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>, Alexandru Ardelean <ardeleanalex@gmail.com>
PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-cryptography-$(PKG_VERSION)
+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 $(INCLUDE_DIR)/package.mk
include ../python-package.mk
SECTION:=lang
CATEGORY:=Languages
SUBMENU:=Python
+ TITLE:=Cryptographic recipes and primitives
URL:=https://github.com/pyca/cryptography
DEPENDS:=+libopenssl
endef
define Package/python-cryptography
$(call Package/python-cryptography/Default)
- TITLE:=python-cryptography
DEPENDS+= \
+PACKAGE_python-cryptography:python \
+PACKAGE_python-cryptography:python-cffi \
+PACKAGE_python-cryptography:python-enum34 \
- +PACKAGE_python-cryptography:python-idna \
+PACKAGE_python-cryptography:python-ipaddress \
+PACKAGE_python-cryptography:python-asn1crypto \
+PACKAGE_python-cryptography:python-six
define Package/python3-cryptography
$(call Package/python-cryptography/Default)
- TITLE:=python3-cryptography
DEPENDS+= \
+PACKAGE_python3-cryptography:python3 \
+PACKAGE_python3-cryptography:python3-cffi \
- +PACKAGE_python3-cryptography:python3-idna \
+PACKAGE_python3-cryptography:python3-asn1crypto \
+PACKAGE_python3-cryptography:python3-six
VARIANT:=python3
+++ /dev/null
-From e7a6229b332969d621aaf25f3fc5cdd99e3c9072 Mon Sep 17 00:00:00 2001
-From: Rosen Penev <rosenp@gmail.com>
-Date: Sun, 18 Nov 2018 18:04:01 -0800
-Subject: [PATCH] Adjust DTLS check (#4593)
-
-OpenSSL defines these even with OPENSSL_NO_DTLS.
----
- src/_cffi_src/openssl/ssl.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/_cffi_src/openssl/ssl.py b/src/_cffi_src/openssl/ssl.py
-index c921dbee..f0b8939c 100644
---- a/src/_cffi_src/openssl/ssl.py
-+++ b/src/_cffi_src/openssl/ssl.py
-@@ -709,7 +709,7 @@ static const long TLS_ST_BEFORE = 0;
- static const long TLS_ST_OK = 0;
- #endif
-
--#if defined(OPENSSL_NO_DTLS) || CRYPTOGRAPHY_OPENSSL_LESS_THAN_102
-+#if CRYPTOGRAPHY_OPENSSL_LESS_THAN_102
- static const long Cryptography_HAS_GENERIC_DTLS_METHOD = 0;
- const SSL_METHOD *(*DTLS_method)(void) = NULL;
- const SSL_METHOD *(*DTLS_server_method)(void) = NULL;
--- /dev/null
+From eec1f066476eccf7135af0a4cfef9e1c883795b3 Mon Sep 17 00:00:00 2001
+From: Paul Kehrer <paul.l.kehrer@gmail.com>
+Date: Mon, 25 Feb 2019 10:55:16 +0800
+Subject: [PATCH] remove NPN bindings -- you should be using ALPN!
+
+pyOpenSSL consumed these, but we've marked it as deprecated and it
+already handles the case where the bindings are not available.
+---
+ src/_cffi_src/openssl/ssl.py | 16 ----------------
+ 1 file changed, 16 deletions(-)
+
+diff --git a/src/_cffi_src/openssl/ssl.py b/src/_cffi_src/openssl/ssl.py
+index da21f3ce90..0e8610f988 100644
+--- a/src/_cffi_src/openssl/ssl.py
++++ b/src/_cffi_src/openssl/ssl.py
+@@ -431,25 +431,9 @@
+
+ long SSL_session_reused(SSL *);
+
+-void SSL_CTX_set_next_protos_advertised_cb(SSL_CTX *,
+- int (*)(SSL *,
+- const unsigned char **,
+- unsigned int *,
+- void *),
+- void *);
+-void SSL_CTX_set_next_proto_select_cb(SSL_CTX *,
+- int (*)(SSL *,
+- unsigned char **,
+- unsigned char *,
+- const unsigned char *,
+- unsigned int,
+- void *),
+- void *);
+ int SSL_select_next_proto(unsigned char **, unsigned char *,
+ const unsigned char *, unsigned int,
+ const unsigned char *, unsigned int);
+-void SSL_get0_next_proto_negotiated(const SSL *,
+- const unsigned char **, unsigned *);
+
+ int sk_SSL_CIPHER_num(Cryptography_STACK_OF_SSL_CIPHER *);
+ const SSL_CIPHER *sk_SSL_CIPHER_value(Cryptography_STACK_OF_SSL_CIPHER *, int);
--- /dev/null
+From d7293d64d503fcbde442d69a3e11c55bf6f1374a Mon Sep 17 00:00:00 2001
+From: Paul Kehrer <paul.l.kehrer@gmail.com>
+Date: Mon, 25 Feb 2019 11:05:46 +0800
+Subject: [PATCH] set Cryptography_HAS_NEXTPROTONEG to 0 for pyOpenSSL
+
+we can remove this symbol in like...5 years.
+---
+ src/_cffi_src/openssl/ssl.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/_cffi_src/openssl/ssl.py b/src/_cffi_src/openssl/ssl.py
+index 0e8610f988..e3a7790ee1 100644
+--- a/src/_cffi_src/openssl/ssl.py
++++ b/src/_cffi_src/openssl/ssl.py
+@@ -623,7 +623,7 @@
+ static const long Cryptography_HAS_SSL_OP_MSIE_SSLV2_RSA_PADDING = 1;
+ static const long Cryptography_HAS_SSL_OP_NO_TICKET = 1;
+ static const long Cryptography_HAS_SSL_SET_SSL_CTX = 1;
+-static const long Cryptography_HAS_NEXTPROTONEG = 1;
++static const long Cryptography_HAS_NEXTPROTONEG = 0;
+
+ /* SSL_get0_param was added in OpenSSL 1.0.2. */
+ #if CRYPTOGRAPHY_OPENSSL_LESS_THAN_102 && !CRYPTOGRAPHY_LIBRESSL_27_OR_GREATER
--- /dev/null
+From b0b50b6bbbdf3abadc70b64c56e25b872721a7f3 Mon Sep 17 00:00:00 2001
+From: Paul Kehrer <paul.l.kehrer@gmail.com>
+Date: Mon, 25 Feb 2019 11:12:10 +0800
+Subject: [PATCH] remove another NPN related definition
+
+---
+ src/_cffi_src/openssl/ssl.py | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/src/_cffi_src/openssl/ssl.py b/src/_cffi_src/openssl/ssl.py
+index e3a7790ee1..f98f576838 100644
+--- a/src/_cffi_src/openssl/ssl.py
++++ b/src/_cffi_src/openssl/ssl.py
+@@ -139,8 +139,6 @@
+ static const long TLS_ST_BEFORE;
+ static const long TLS_ST_OK;
+
+-static const long OPENSSL_NPN_NEGOTIATED;
+-
+ typedef ... SSL_METHOD;
+ typedef ... SSL_CTX;
+
include $(TOPDIR)/rules.mk
PKG_NAME:=pycurl
-PKG_VERSION:=7.43.0.2
+PKG_VERSION:=7.43.0.3
PKG_RELEASE:=1
+
+PKG_SOURCE:=pycurl-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/pycurl
+PKG_HASH:=6f08330c5cf79fa8ef68b9912b9901db7ffd34b63e225dce74db56bb21deda8e
+
PKG_MAINTAINER:=Waldemar Konik <informatyk74@interia.pl>
PKG_LICENSE:=LGPL-2.1
-PKG_LICENSE_FILE=COPYING-LGPL
+PKG_LICENSE_FILES:=COPYING-LGPL
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://dl.bintray.com/pycurl/pycurl/
-PKG_HASH:=0f0cdfc7a92d4f2a5c44226162434e34f7d6967d3af416a6f1448649c09a25a4
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-curl-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
+include ../python3-package.mk
-define Package/python-curl
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+define Package/python-curl/Default
CATEGORY:=Languages
SECTION:=lang
SUBMENU:=Python
TITLE:=Python module interface to the cURL library
URL:=http://pycurl.io/
- DEPENDS:=+python +libcurl
+ DEPENDS:=+libcurl
+endef
+
+define Package/python-curl
+$(call Package/python-curl/Default)
+ DEPENDS+=+PACKAGE_python-curl:python
+ VARIANT:=python
endef
define Package/python-curl/description
-Python module interface to the cURL library.
+PycURL is a Python interface to libcurl, the multiprotocol file transfer library.
endef
-define Build/Compile
- $(call Build/Compile/PyMod,,install --with-openssl --prefix=/usr --root=$(PKG_INSTALL_DIR))
+define Package/python3-curl
+$(call Package/python-curl/Default)
+ DEPENDS+=+PACKAGE_python3-curl:python3
+ VARIANT:=python3
endef
-define Package/python-curl/install
- $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
- $(CP) \
- $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
- $(1)$(PYTHON_PKG_DIR)
+define Package/python3-curl/description
+$(call Package/python-curl/description)
+.
+(Variant for Python3)
endef
+PYTHON_PKG_SETUP_ARGS:=
+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))
--- /dev/null
+From 9b400b32eb3673ab525f12f41a2ff3e4e3bfcccb Mon Sep 17 00:00:00 2001
+From: Eneas U de Queiroz <cotequeiroz@gmail.com>
+Date: Fri, 28 Jun 2019 11:05:20 -0300
+Subject: [PATCH] Add locking support to wolfSSL
+
+This takes advantage of wolfSSL openssl compatibility layer, so all
+that that's needed are library detection, and inclusion of specific
+headers.
+WolfSSL must be built with --enable-opensslextra to enable the required
+API, and that's being checked at build time, with a warning if disabled.
+
+Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
+
+diff --git a/setup.py b/setup.py
+index 3be0fcb..d4303b0 100644
+--- a/setup.py
++++ b/setup.py
+@@ -143,6 +143,7 @@ class ExtensionConfiguration(object):
+ return {
+ '--with-openssl': self.using_openssl,
+ '--with-ssl': self.using_openssl,
++ '--with-wolfssl': self.using_wolfssl,
+ '--with-gnutls': self.using_gnutls,
+ '--with-nss': self.using_nss,
+ '--with-mbedtls': self.using_mbedtls,
+@@ -163,7 +164,7 @@ class ExtensionConfiguration(object):
+
+ if 'PYCURL_SSL_LIBRARY' in os.environ:
+ ssl_lib = os.environ['PYCURL_SSL_LIBRARY']
+- if ssl_lib in ['openssl', 'gnutls', 'nss', 'mbedtls']:
++ if ssl_lib in ['openssl', 'wolfssl', 'gnutls', 'nss', 'mbedtls']:
+ ssl_lib_detected = ssl_lib
+ getattr(self, 'using_%s' % ssl_lib)()
+ else:
+@@ -188,6 +189,10 @@ class ExtensionConfiguration(object):
+ self.using_openssl()
+ ssl_lib_detected = 'openssl'
+ break
++ if arg[2:] == 'wolfssl':
++ self.using_wolfssl()
++ ssl_lib_detected = 'wolfssl'
++ break
+ if arg[2:] == 'gnutls':
+ self.using_gnutls()
+ ssl_lib_detected = 'gnutls'
+@@ -506,6 +511,11 @@ manually. For other SSL backends please ignore this message.''')
+ self.libraries.append('ssl')
+ self.define_macros.append(('HAVE_CURL_SSL', 1))
+
++ def using_wolfssl(self):
++ self.define_macros.append(('HAVE_CURL_WOLFSSL', 1))
++ self.libraries.append('wolfssl')
++ self.define_macros.append(('HAVE_CURL_SSL', 1))
++
+ def using_gnutls(self):
+ self.define_macros.append(('HAVE_CURL_GNUTLS', 1))
+ self.libraries.append('gnutls')
+@@ -572,6 +582,7 @@ def strip_pycurl_options(argv):
+ PRETTY_SSL_LIBS = {
+ # setup.py may be detecting BoringSSL properly, need to test
+ 'openssl': 'OpenSSL/LibreSSL/BoringSSL',
++ 'wolfssl': 'wolfSSL',
+ 'gnutls': 'GnuTLS',
+ 'nss': 'NSS',
+ 'mbedtls': 'mbedTLS',
+@@ -902,6 +913,7 @@ PycURL Unix options:
+ --with-gnutls libcurl is linked against GnuTLS
+ --with-nss libcurl is linked against NSS
+ --with-mbedtls libcurl is linked against mbedTLS
++ --with-wolfssl libcurl is linked against wolfSSL
+ '''
+
+ windows_help = '''\
+diff --git a/src/module.c b/src/module.c
+index 909cdfe..23387ec 100644
+--- a/src/module.c
++++ b/src/module.c
+@@ -351,6 +351,8 @@ initpycurl(void)
+ } else if (!strncmp(vi->ssl_version, "OpenSSL/", 8) || !strncmp(vi->ssl_version, "LibreSSL/", 9) ||
+ !strncmp(vi->ssl_version, "BoringSSL", 9)) {
+ runtime_ssl_lib = "openssl";
++ } else if (!strncmp(vi->ssl_version, "wolfSSL/", 8)) {
++ runtime_ssl_lib = "wolfssl";
+ } else if (!strncmp(vi->ssl_version, "GnuTLS/", 7)) {
+ runtime_ssl_lib = "gnutls";
+ } else if (!strncmp(vi->ssl_version, "NSS/", 4)) {
+diff --git a/src/pycurl.h b/src/pycurl.h
+index 2294cb8..092387f 100644
+--- a/src/pycurl.h
++++ b/src/pycurl.h
+@@ -164,6 +164,28 @@ pycurl_inet_ntop (int family, void *addr, char *string, size_t string_size);
+ # include <openssl/ssl.h>
+ # include <openssl/err.h>
+ # define COMPILE_SSL_LIB "openssl"
++# elif defined(HAVE_CURL_WOLFSSL)
++# include <wolfssl/options.h>
++# if defined(OPENSSL_EXTRA)
++# define HAVE_CURL_OPENSSL
++# define PYCURL_NEED_SSL_TSL
++# define PYCURL_NEED_OPENSSL_TSL
++# include <wolfssl/openssl/ssl.h>
++# include <wolfssl/openssl/err.h>
++# else
++# ifdef _MSC_VER
++# pragma message(\
++ "libcurl was compiled with wolfSSL, but the library was built without " \
++ "--enable-opensslextra; thus no SSL crypto locking callbacks will be set, " \
++ "which may cause random crashes on SSL requests")
++# else
++# warning \
++ "libcurl was compiled with wolfSSL, but the library was built without " \
++ "--enable-opensslextra; thus no SSL crypto locking callbacks will be set, " \
++ "which may cause random crashes on SSL requests"
++# endif
++# endif
++# define COMPILE_SSL_LIB "wolfssl"
+ # elif defined(HAVE_CURL_GNUTLS)
+ # include <gnutls/gnutls.h>
+ # if GNUTLS_VERSION_NUMBER <= 0x020b00
+@@ -195,7 +217,7 @@ pycurl_inet_ntop (int family, void *addr, char *string, size_t string_size);
+ /* since we have no crypto callbacks for other ssl backends,
+ * no reason to require users match those */
+ # define COMPILE_SSL_LIB "none/other"
+-# endif /* HAVE_CURL_OPENSSL || HAVE_CURL_GNUTLS || HAVE_CURL_NSS || HAVE_CURL_MBEDTLS */
++# endif /* HAVE_CURL_OPENSSL || HAVE_CURL_WOLFSSL || HAVE_CURL_GNUTLS || HAVE_CURL_NSS || HAVE_CURL_MBEDTLS */
+ #else
+ # define COMPILE_SSL_LIB "none/other"
+ #endif /* HAVE_CURL_SSL */
PKG_NAME:=python-dateutil
PKG_VERSION:=2.7.5
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_LICENSE:=BSD-2-Clause
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/python-dateutil
PKG_HASH:=88f9287c0174266bb0d8cedd395cfba9c58e87e5ad86b2ce58859bc11be3cf02
PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-dateutil-$(PKG_VERSION)
+PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
include $(INCLUDE_DIR)/package.mk
SUBMENU:=Python
SECTION:=lang
CATEGORY:=Languages
- MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
TITLE:=Extensions to the standard Python datetime module
URL:=https://dateutil.readthedocs.org/
endef
--- /dev/null
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-decorator
+PKG_VERSION:=4.3.2
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Karel Kočí <cynerd@email.cz>
+
+PKG_SOURCE_URL:=https://codeload.github.com/micheles/decorator/tar.gz/$(PKG_VERSION)?
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_HASH:=c053ec881270608a5aef624a45a7700ec76ceca9d96689506411e1f319085380
+PKG_BUILD_DIR:=$(BUILD_DIR)/decorator-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-decorator
+ SECTION:=lang
+ CATEGORY:=Languages
+ SUBMENU:=Python
+ URL:=https://github.com/micheles/decorator
+ TITLE:=python3-decodator
+ DEPENDS:=+python3-light
+ VARIANT:=python3
+endef
+
+$(eval $(call Py3Package,python3-decorator))
+$(eval $(call BuildPackage,python3-decorator))
+$(eval $(call BuildPackage,python3-decorator-src))
--- /dev/null
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-defusedxml
+PKG_VERSION:=0.6.0
+PKG_RELEASE:=2
+
+PKG_MAINTAINER:=Eneas U de Queiroz <cote2004-github@yahoo.com>
+PKG_LICENSE:=Python-2.0
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_SOURCE:=defusedxml-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/d/defusedxml
+PKG_HASH:=f684034d135af4c6cbb949b8a4d2ed61634515257a67299e5f940fbaa34377f5
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-defusedxml-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+include ../python-package.mk
+include ../python3-package.mk
+
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+define Package/python-defusedxml/Default
+ SUBMENU:=Python
+ SECTION:=lang
+ CATEGORY:=Languages
+ TITLE:=XML bomb protection for Python
+ 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:= \
+ +PACKAGE_python3-defusedxml:python3-light \
+ +PACKAGE_python3-defusedxml:python3-xml
+ VARIANT:=python3
+endef
+
+define Package/python-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))
include $(TOPDIR)/rules.mk
PKG_NAME:=python-dns
-PKG_RELEASE:=2
-PKG_VERSION:=1.15.0
-PKG_SOURCE_URL:=http://www.dnspython.org/kits/$(PKG_VERSION)
-PKG_HASH:=11598ae5735746e63921f8eebdfdee4a2e7d0ba842ebd57ba02682d4aed8244b
+PKG_VERSION:=1.16.0
+PKG_RELEASE:=1
+
PKG_SOURCE:=dnspython-$(PKG_VERSION).tar.gz
-PKG_MAINTAINER:=Denis Shulyaka <Shulyaka@gmail.com>
+PKG_SOURCE_URL:=http://www.dnspython.org/kits/1.16.0/
+PKG_HASH:=4bf5c5c12a4478ee7860ab176659cf64c4899ee76752d826b082f8af723c5cf9
+
PKG_LICENSE:=ISC
PKG_LICENSE_FILES:=LICENSE
-PKG_BUILD_DIR:=$(BUILD_DIR)/dnspython-$(PKG_VERSION)
+PKG_MAINTAINER:=Josef Schlehofer <pepe.schlehofer@gmail.com>
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-dnspython-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
+include ../python3-package.mk
+
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+define Package/python-dns/Default
+ SUBMENU:=Python
+ SECTION:=lang
+ CATEGORY:=Languages
+ TITLE:=dnspython
+ URL:=http://www.dnspython.org/
+endef
define Package/python-dns
- SECTION:=language-python
- CATEGORY:=Languages
- SUBMENU:=Python
- TITLE:=dnspython
- URL:=http://www.dnspython.org/
- DEPENDS:=+python
+$(call Package/python-dns/Default)
+ DEPENDS:=+PACKAGE_python-dns:python
+ VARIANT:=python
endef
define Package/python-dns/description
dnspython is a DNS toolkit for Python. It supports almost all record types. It can be used for queries, zone transfers, and dynamic updates. It supports TSIG authenticated messages and EDNS0.
endef
-define Build/Compile
- $(call Build/Compile/PyMod,,\
- install --prefix=/usr --root="$(PKG_INSTALL_DIR)" \
- )
+define Package/python3-dns
+$(call Package/python-dns/Default)
+ DEPENDS:=+PACKAGE_python3-dns:python3
+ VARIANT:=python3
+endef
+
+define Package/python3-dns/description
+$(call Package/python-dns/description)
+.
+(Variant for Python3)
endef
$(eval $(call PyPackage,python-dns))
$(eval $(call BuildPackage,python-dns))
+$(eval $(call BuildPackage,python-dns-src))
+$(eval $(call Py3Package,python3-dns))
+$(eval $(call BuildPackage,python3-dns))
+$(eval $(call BuildPackage,python3-dns-src))
--- /dev/null
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=docutils
+PKG_VERSION:=0.14
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/d/docutils
+PKG_HASH:=51e64ef2ebfb29cae1faa133b3710143496eca21c530f3f71424d77687764274
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-docutils-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Daniel Danzberger <daniel@dd-wrt.com>
+PKG_LICENSE:=MIT
+
+include $(INCLUDE_DIR)/package.mk
+include ../python-package.mk
+include ../python3-package.mk
+
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+define Package/python-docutils/Default
+ SUBMENU:=Python
+ SECTION:=lang
+ CATEGORY:=Languages
+ TITLE:=docutils
+ URL:=http://docutils.sourceforge.net
+endef
+
+define Package/python-docutils
+$(call Package/python-docutils/Default)
+ DEPENDS:=+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
+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))
PKG_NAME:=python-enum34
PKG_VERSION:=1.1.6
-PKG_RELEASE:=3
+PKG_RELEASE:=4
PKG_SOURCE:=enum34-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/bf/3e/31d502c25302814a7c2f1d3959d2a3b3f78e509002ba91aea64993936876
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/e/enum34
PKG_HASH:=8ad8c4783bf61ded74527bffb48ed9b54166685e4230386a9ed9b1279e2df5b1
PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-enum34-$(PKG_VERSION)
SECTION:=lang
CATEGORY:=Languages
SUBMENU:=Python
- URL:=https://pypi.python.org/pypi/enum34/
+ TITLE:=Backported Python 3.4 enum
+ URL:=https://bitbucket.org/stoneleaf/enum34
endef
define Package/python-enum34
$(call Package/python-enum34/Default)
- TITLE:=python-enum34
DEPENDS:=+PACKAGE_python-enum34:python-light
VARIANT:=python
endef
--- /dev/null
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-et_xmlfile
+PKG_VERSION:=1.0.1
+PKG_RELEASE:=1
+
+PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>, Eneas U de Queiroz <cote2004-github@yahoo.com>
+PKG_LICENSE:=MIT
+
+PKG_SOURCE:=et_xmlfile-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/e/et_xmlfile
+PKG_HASH:=614d9722d572f6246302c4491846d2c393c199cfa4edc9af593437691683335b
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-et_xmlfile-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+include ../python-package.mk
+include ../python3-package.mk
+
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+define Package/python-et_xmlfile/Default
+ SUBMENU:=Python
+ SECTION:=lang
+ CATEGORY:=Languages
+ TITLE:=Low memory library for creating large XML files.
+ 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:= \
+ +python3-light \
+ +python3-lxml
+ VARIANT:=python3
+endef
+
+define Package/python-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))
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=python-evdev
-PKG_VERSION:=1.1.2
+PKG_VERSION:=1.2.0
PKG_RELEASE:=1
PKG_LICENSE:=BSD-3-Clause
PKG_SOURCE:=evdev-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/e/evdev
-PKG_HASH:=2dd67291be20e70643e8ef6f2381efc10e0c6e44a32abb3c1db74996ea3b0351
+PKG_HASH:=b03f5e1be5b4a5327494a981b831d251a142b09e8778eda1a8b53eba91100166
PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-evdev-$(PKG_VERSION)
(Variant for Python3)
endef
-define PyBuild/Compile
- $(call Build/Compile/PyMod,, build \
- build_ecodes --evdev-headers="$(LINUX_DIR)/include/uapi/linux/input.h:$(LINUX_DIR)/include/uapi/linux/input-event-codes.h" \
- build_ext \
- install --root="$(PKG_INSTALL_DIR)" --prefix="/usr")
-endef
+LINUX_EVDEV_HEADERS="$(LINUX_DIR)/include/uapi/linux/input.h:$(LINUX_DIR)/include/uapi/linux/input-event-codes.h"
-define Py3Build/Compile
- $(call Build/Compile/Py3Mod,, build \
- build_ecodes --evdev-headers="$(LINUX_DIR)/include/uapi/linux/input.h:$(LINUX_DIR)/include/uapi/linux/input-event-codes.h" \
- build_ext \
- install --root="$(PKG_INSTALL_DIR)" --prefix="/usr")
-endef
+PYTHON3_PKG_SETUP_GLOBAL_ARGS:= \
+ build build_ecodes \
+ --evdev-headers="$(LINUX_EVDEV_HEADERS)" \
+ build_ext
+
+PYTHON_PKG_SETUP_GLOBAL_ARGS:=$(PYTHON3_PKG_SETUP_GLOBAL_ARGS)
$(eval $(call PyPackage,python-evdev))
$(eval $(call BuildPackage,python-evdev))
--- /dev/null
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=futures
+PKG_VERSION:=3.2.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/f/futures
+PKG_HASH:=9ec02aa7d674acb8618afb127e27fde7fc68994c0437ad759fa094a574adb265
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-futures-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Daniel Danzberger <daniel@dd-wrt.com>
+PKG_LICENSE:=MIT
+
+include $(INCLUDE_DIR)/package.mk
+include ../python-package.mk
+
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+define Package/python-futures
+ SUBMENU:=Python
+ SECTION:=lang
+ CATEGORY:=Languages
+ TITLE:=futures
+ URL:=https://github.com/agronholm/pythonfutures
+ DEPENDS:=+python
+ VARIANT:=python
+endef
+
+define Package/python-futures/description
+ This is a backport of the concurrent.futures standard library module to Python 2.
+ It should not be installed on Python 3, although there should be no harm in doing so,
+ as the standard library takes precedence over third party libraries.
+endef
+
+$(eval $(call PyPackage,python-futures))
+$(eval $(call BuildPackage,python-futures))
+$(eval $(call BuildPackage,python-futures-src))
PKG_NAME:=python-gmpy2
PKG_VERSION:=2.0.8
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_SOURCE:=gmpy2-$(PKG_VERSION).zip
-PKG_SOURCE_URL:=https://pypi.python.org/packages/90/f4/9a2e384b325b69bc5827b9a6510a8fb4a51698c915c06a3f25a86458892a
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/g/gmpy2
PKG_HASH:=dd233e3288b90f21b0bb384bcc7a7e73557bb112ccf0032ad52aa614eb373d3f
PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-gmpy2-$(PKG_VERSION)
PKG_UNPACK:=unzip -q -d $(PKG_BUILD_DIR) $(DL_DIR)/$(PKG_SOURCE); mv -f $(PKG_BUILD_DIR)/gmpy2-$(PKG_VERSION)/* $(PKG_BUILD_DIR)
+PYTHON_PKG_SETUP_ARGS:=--nompfr
+PYTHON3_PKG_SETUP_ARGS:=--nompfr
+
define Package/python-gmpy2/Default
SECTION:=lang
CATEGORY:=Languages
SUBMENU:=Python
- URL:=http://code.google.com/p/gmpy/
+ TITLE:=GMP/MPIR, MPFR, and MPC interface
+ URL:=https://github.com/aleaxit/gmpy
+ DEPENDS:=+libgmp
endef
define Package/python-gmpy2
$(call Package/python-gmpy2/Default)
- TITLE:=python-gmpy2
- DEPENDS:=+libgmp +PACKAGE_python-gmpy2:python-light
+ DEPENDS+=+PACKAGE_python-gmpy2:python-light
VARIANT:=python
endef
define Package/python3-gmpy2
$(call Package/python-gmpy2/Default)
- TITLE:=python3-gmpy2
- DEPENDS:=+libgmp +PACKAGE_python3-gmpy2:python3-light
+ DEPENDS+=+PACKAGE_python3-gmpy2:python3-light
VARIANT:=python3
endef
(Variant for Python3)
endef
-define PyBuild/Compile
- $(call Build/Compile/PyMod,,install --prefix="/usr" --root="$(PKG_INSTALL_DIR)" --nompfr)
-endef
-
-define Py3Build/Compile
- $(call Build/Compile/Py3Mod,,install --prefix="/usr" --root="$(PKG_INSTALL_DIR)" --nompfr)
-endef
-
$(eval $(call PyPackage,python-gmpy2))
$(eval $(call BuildPackage,python-gmpy2))
+$(eval $(call BuildPackage,python-gmpy2-src))
$(eval $(call Py3Package,python3-gmpy2))
$(eval $(call BuildPackage,python3-gmpy2))
+$(eval $(call BuildPackage,python3-gmpy2-src))
include $(TOPDIR)/rules.mk
PKG_NAME:=python-gnupg
-PKG_VERSION:=0.4.3
-PKG_RELEASE:=2
+PKG_VERSION:=0.4.4
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/python-gnupg
-PKG_HASH:=2d158dfc6b54927752b945ebe57e6a0c45da27747fa3b9ae66eccc0d2147ac0d
+PKG_HASH:=45daf020b370bda13a1429c859fcdff0b766c0576844211446f9266cae97fb0e
PKG_LICENSE:=GPL-3.0+
PKG_LICENSE_FILES:=LICENSE
# Note: I shamelessly copied this from Yousong's logic (from python-packages);
HOST_PYTHON_PIP:=$(STAGING_DIR_HOSTPKG)/bin/pip$(PYTHON_VERSION)
-define host_python_pip_install
- $(call host_python_settings) \
- $(HOST_PYTHON_PIP) install \
- --root=$(1) \
- --prefix=$(2) \
- $(3)
-endef
-define host_python_pip_install_host
-$(call host_python_pip_install,$(STAGING_DIR_HOSTPKG),"",$(1))
+# $(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
include $(TOPDIR)/rules.mk
PKG_NAME:=python-hyperlink
-PKG_VERSION:=18.0.0
+PKG_VERSION:=19.0.0
PKG_RELEASE:=1
PKG_SOURCE:=hyperlink-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/h/hyperlink
-PKG_HASH:=f01b4ff744f14bc5d0a22a6b9f1525ab7d6312cb0ff967f59414bbac52f0a306
+PKG_HASH:=4288e34705da077fada1111a24a0aa08bb1e76699c9ce49876af722441845654
PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-hyperlink-$(PKG_VERSION)
SECTION:=lang
CATEGORY:=Languages
SUBMENU:=Python
+ TITLE:=Pure-Python immutable URLs
URL:=https://github.com/python-hyper/hyperlink
endef
define Package/python-hyperlink
$(call Package/python-hyperlink/Default)
- TITLE:=Pure-Python immutable URLs
DEPENDS:= \
+PACKAGE_python-hyperlink:python-light \
+PACKAGE_python-hyperlink:python-idna
define Package/python3-hyperlink
$(call Package/python-hyperlink/Default)
- TITLE:=Pure-Python immutable URLs
DEPENDS:= \
+PACKAGE_python3-hyperlink:python3-light \
+PACKAGE_python3-hyperlink:python3-idna
PKG_NAME:=python-idna
PKG_VERSION:=2.8
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=idna-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/i/idna
PKG_HASH:=c357b3f628cf53ae2c4c05627ecc484553142ca23264e593d327bcde5e9c3407
+
PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-idna-$(PKG_VERSION)
-PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>, Alexandru Ardelean <ardeleanalex@gmail.com>
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE.rst
+PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>, Alexandru Ardelean <ardeleanalex@gmail.com>
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
SECTION:=lang
CATEGORY:=Languages
SUBMENU:=Python
+ TITLE:=IDNA library
URL:=https://github.com/kjd/idna
endef
define Package/python-idna
$(call Package/python-idna/Default)
- TITLE:=python-idna
- DEPENDS:=+PACKAGE_python-idna:python-light +PACKAGE_python-idna:python-codecs
+ DEPENDS:= \
+ +PACKAGE_python-idna:python-light \
+ +PACKAGE_python-idna:python-codecs
VARIANT:=python
endef
define Package/python3-idna
$(call Package/python-idna/Default)
- TITLE:=python3-idna
- DEPENDS:=+PACKAGE_python3-idna:python3-light +PACKAGE_python3-idna:python3-codecs
+ DEPENDS:= \
+ +PACKAGE_python3-idna:python3-light \
+ +PACKAGE_python3-idna:python3-codecs
VARIANT:=python3
endef
--- /dev/null
+#
+# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/)
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-ifaddr
+PKG_VERSION:=0.1.6
+PKG_RELEASE:=1
+
+PKG_SOURCE:=ifaddr-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/i/ifaddr/
+PKG_HASH:=c19c64882a7ad51a394451dabcbbed72e98b5625ec1e79789924d5ea3e3ecb93
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/ifaddr-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Josef Schlehofer <pepe.schlehofer@gmail.com>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE.txt
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-ifaddr
+ SECTION:=lang
+ CATEGORY:=Languages
+ SUBMENU:=Python
+ TITLE:=Enumerate IP addresses on network adapters
+ URL:=https://github.com/pydron/ifaddr
+ DEPENDS:= \
+ +python3-light \
+ +python3-ctypes
+ VARIANT:=python3
+endef
+
+define Package/python3-ifaddr/description
+ ifaddr is a small Python library that allows you to find all the IPv4 and IPv6 addresses of the computer.
+endef
+
+$(eval $(call Py3Package,python3-ifaddr))
+$(eval $(call BuildPackage,python3-ifaddr))
+$(eval $(call BuildPackage,python3-ifaddr-src))
SECTION:=lang
CATEGORY:=Languages
SUBMENU:=Python
+ TITLE:=Versions your Python projects
URL:=https://github.com/twisted/incremental
endef
define Package/python-incremental
$(call Package/python-incremental/Default)
- TITLE:=Versions your Python projects
DEPENDS:=+PACKAGE_python-incremental:python-light
VARIANT:=python
endef
define Package/python3-incremental
$(call Package/python-incremental/Default)
- TITLE:=Versions your Python projects
DEPENDS:=+PACKAGE_python3-incremental:python3-light
VARIANT:=python3
endef
--- /dev/null
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-influxdb
+PKG_VERSION:=5.2.2
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Karel Kočí <cynerd@email.cz>
+
+PKG_SOURCE_URL:=https://pypi.python.org/packages/source/i/influxdb/
+PKG_SOURCE:=influxdb-$(PKG_VERSION).tar.gz
+PKG_HASH:=afeff28953a91b4ea1aebf9b5b8258a4488d0e49e2471db15ea43fd2c8533143
+PKG_LICENSE:=MIT
+PKG_BUILD_DIR:=$(BUILD_DIR)/influxdb-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-influxdb
+ SECTION:=lang
+ CATEGORY:=Languages
+ SUBMENU:=Python
+ URL:=https://github.com/influxdb/influxdb-python
+ TITLE:=python3-influxdb
+ DEPENDS:=+python3-requests +python3-pytz +python3-six +python3-dateutil
+ VARIANT:=python3
+endef
+
+define Package/python3-influxdb/description
+ Python client for InfluxDB
+endef
+
+$(eval $(call Py3Package,python3-influxdb))
+$(eval $(call BuildPackage,python3-influxdb))
+$(eval $(call BuildPackage,python3-influxdb-src))
--- /dev/null
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-intelhex
+PKG_VERSION:=2.2.1
+PKG_RELEASE:=1
+
+PKG_SOURCE:=intelhex-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/i/intelhex/
+PKG_HASH:=009d8511e0d50639230c39af9607deee771cf026f67ef7507a8c3fd4fa927832
+PKG_BUILD_DIR:=$(BUILD_DIR)/intelhex-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Karel Kočí <cynerd@email.cz>
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=LICENSE.txt
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-intelhex
+ SECTION:=lang
+ CATEGORY:=Languages
+ SUBMENU:=Python
+ TITLE:=python3-intelhex
+ URL:=https://github.com/bialix/intelhex
+ DEPENDS:=+python3-light
+ VARIANT:=python3
+endef
+
+define Package/python3-intelhex/description
+ This work implements an intelhex Python library to read, write, create from
+ scratch and manipulate data from Intel HEX file format.
+endef
+
+PYTHON3_PKG_SETUP_ARGS:=
+
+$(eval $(call Py3Package,python3-intelhex))
+$(eval $(call BuildPackage,python3-intelhex))
+$(eval $(call BuildPackage,python3-intelhex-src))
SECTION:=lang
CATEGORY:=Languages
SUBMENU:=Python
+ TITLE:=Python 3.3+'s ipaddress
URL:=https://github.com/phihag/ipaddress
endef
define Package/python-ipaddress
$(call Package/python-ipaddress/Default)
- TITLE:=Python 3.3+'s ipaddress
DEPENDS:=+PACKAGE_python-ipaddress:python-light
VARIANT:=python
endef
--- /dev/null
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-jdcal
+PKG_VERSION:=1.4.1
+PKG_RELEASE:=1
+
+PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>, Eneas U de Queiroz <cote2004-github@yahoo.com>
+PKG_LICENSE:=BSD-2-Clause
+PKG_LICENSE_FILES:=LICENSE.txt
+
+PKG_SOURCE:=jdcal-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/j/jdcal
+PKG_HASH:=472872e096eb8df219c23f2689fc336668bdb43d194094b5cc1707e1640acfc8
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-jdcal-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+include ../python-package.mk
+include ../python3-package.mk
+
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+define Package/python-jdcal/Default
+ SUBMENU:=Python
+ SECTION:=lang
+ CATEGORY:=Languages
+ TITLE:=Julian dates from proleptic Gregorian and Julian calendars
+ 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)
+.
+(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))
--- /dev/null
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=jmespath
+PKG_VERSION:=0.9.3
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/j/jmespath
+PKG_HASH:=6a81d4c9aa62caf061cb517b4d9ad1dd300374cd4706997aff9cd6aedd61fc64
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-jmespath-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Daniel Danzberger <daniel@dd-wrt.com>
+PKG_LICENSE:=MIT
+
+include $(INCLUDE_DIR)/package.mk
+include ../python-package.mk
+include ../python3-package.mk
+
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+define Package/python-jmespath/Default
+ SUBMENU:=Python
+ SECTION:=lang
+ CATEGORY:=Languages
+ TITLE:=jmespath
+ URL:=https://github.com/jmespath/jmespath.py
+endef
+
+define Package/python-jmespath
+$(call Package/python-jmespath/Default)
+ DEPENDS:=+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
+ 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))
--- /dev/null
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-jsonpath-ng
+PKG_VERSION:=1.4.3
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Karel Kočí <cynerd@email.cz>
+
+PKG_SOURCE_URL:=https://pypi.python.org/packages/source/j/jsonpath-ng/
+PKG_SOURCE:=jsonpath-ng-$(PKG_VERSION).tar.gz
+PKG_HASH:=b1fc75b877e9b2f46845a455fbdcfb0f0d9c727c45c19a745d02db620a9ef0be
+PKG_BUILD_DIR:=$(BUILD_DIR)/jsonpath-ng-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-jsonpath-ng
+ SECTION:=lang
+ CATEGORY:=Languages
+ SUBMENU:=Python
+ URL:=https://github.com/h2non/jsonpath-ng
+ TITLE:=python3-jsonpath-ng
+ DEPENDS:=+python3-ply +python3-six +python3-decorator
+ VARIANT:=python3
+endef
+
+$(eval $(call Py3Package,python3-jsonpath-ng))
+$(eval $(call BuildPackage,python3-jsonpath-ng))
+$(eval $(call BuildPackage,python3-jsonpath-ng-src))
include $(TOPDIR)/rules.mk
PKG_NAME:=python-lxml
-PKG_VERSION:=4.3.0
+PKG_VERSION:=4.3.1
PKG_RELEASE:=1
PKG_SOURCE:=lxml-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/l/lxml
-PKG_HASH:=d1e111b3ab98613115a208c1017f266478b0ab224a67bc8eac670fa0bad7d488
+PKG_HASH:=da5e7e941d6e71c9c9a717c93725cda0708c2474f532e3680ac5e39ec57d224d
PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-lxml-$(PKG_VERSION)
PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
--- /dev/null
+#
+# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/)
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-markdown
+PKG_VERSION:=3.1.1
+PKG_RELEASE:=1
+
+PKG_SOURCE:=Markdown-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/m/markdown/
+PKG_HASH:=2e50876bcdd74517e7b71f3e7a76102050edec255b3983403f1a63e7c8a41e7a
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/Markdown-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=LICENSE.md
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-markdown
+ SECTION:=lang
+ CATEGORY:=Languages
+ SUBMENU:=Python
+ TITLE:=Markdown implementation in Python
+ URL:=https://python-markdown.github.io/
+ DEPENDS:= \
+ +python3-light \
+ +python3-setuptools \
+ +python3-logging
+ VARIANT:=python3
+endef
+
+define Package/python3-markdown/description
+ A fast and complete Python implementation of Markdown.
+endef
+
+$(eval $(call Py3Package,python3-markdown))
+$(eval $(call BuildPackage,python3-markdown))
+$(eval $(call BuildPackage,python3-markdown-src))
--- /dev/null
+#
+# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/)
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=multidict
+PKG_VERSION:=4.5.2
+PKG_RELEASE:=1
+
+PKG_SOURCE:=multidict-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/m/multidict/
+PKG_HASH:=024b8129695a952ebd93373e45b5d341dbb87c17ce49637b34000093f243dd4f
+
+PKG_MAINTAINER:=Josef Schlehofer <pepe.schlehofer@gmail.com>
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=LICENSE
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-multidict
+ SECTION:=lang
+ CATEGORY:=Languages
+ SUBMENU:=Python
+ TITLE:=multidict implementation
+ URL:=https://github.com/aio-libs/multidict
+ DEPENDS:= \
+ +python3-light \
+ +python3-attrs
+ VARIANT:=python3
+endef
+
+define Package/python3-multidict/description
+Multidict is dict-like collection of key-value pairs where key might be occurred more than once in the container.
+endef
+
+$(eval $(call Py3Package,python3-multidict))
+$(eval $(call BuildPackage,python3-multidict))
+$(eval $(call BuildPackage,python3-multidict-src))
PKG_NAME:=python-mysql
PKG_VERSION:=1.3.14
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_LICENSE:=GPL-2.0
PKG_SOURCE:=mysqlclient-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/m/mysqlclient
PKG_HASH:=3981ae9ce545901a36a8b7aed76ed02960a429f75dc53b7ad77fb2f9ab7cd56b
PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-mysql-$(PKG_VERSION)
+PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
SECTION:=lang
CATEGORY:=Languages
URL:=https://pypi.python.org/project/mysqlclient
- MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
endef
define Package/python-mysql
--- /dev/null
+#
+# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/)
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-netdisco
+PKG_VERSION:=2.6.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=netdisco-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/n/netdisco
+PKG_HASH:=2b3aca14a1807712a053f11fd80dc251dd821ee4899aefece515287981817762
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/netdisco-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Josef Schlehofer <pepe.schlehofer@gmail.com>
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=LICENSE.md
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-netdisco
+ SECTION:=lang
+ CATEGORY:=Languages
+ SUBMENU:=Python
+ TITLE:=Discover devices on your local network
+ URL:=https://github.com/home-assistant/netdisco
+ DEPENDS:= \
+ +python3-light \
+ +python3-requests \
+ +python3-zeroconf
+ VARIANT:=python3
+endef
+
+define Package/python3-netdisco/description
+ NetDisco is a Python 3 library to discover local devices and services.
+ It allows to scan on demand or offer a service that will scan the network in the background in a set interval.
+endef
+
+$(eval $(call Py3Package,python3-netdisco))
+$(eval $(call BuildPackage,python3-netdisco))
+$(eval $(call BuildPackage,python3-netdisco-src))
#
-# Copyright (C) 2007-2016 OpenWrt.org
-#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=python-oauthlib
-PKG_VERSION:=2.1.0
-PKG_RELEASE:=2
+PKG_VERSION:=3.0.2
+PKG_RELEASE:=1
+
+PKG_MAINTAINER:=Eneas U de Queiroz <cotequeiroz@gmail.com>
PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=LICENSE
PKG_SOURCE:=oauthlib-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/o/oauthlib
-PKG_HASH:=ac35665a61c1685c56336bda97d5eefa246f1202618a1d6f34fccb1bdd404162
+PKG_HASH:=b4d99ae8ccfb7d33ba9591b59355c64eef5241534aa3da2e4c0435346b84bc8e
PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-oauthlib-$(PKG_VERSION)
-PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
include ../python3-package.mk
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
define Package/python-oauthlib/Default
SUBMENU:=Python
SECTION:=lang
CATEGORY:=Languages
- MAINTAINER:=Eneas U de Queiroz <cote2004-github@yahoo.com>
- TITLE:=A generic, spec-compliant, thorough implementation of the OAuth request-signing logic
+ TITLE:=OAuth request-signing logic for Python
URL:=https://github.com/oauthlib/oauthlib
endef
endef
define Package/python-oauthlib/description
- A generic, spec-compliant, thorough implementation of the OAuth request-signing logic for Python
+ A generic, spec-compliant, thorough implementation of the OAuth request-signing
+ logic for Python
endef
define Package/python3-oauthlib/description
)
}
+delete_empty_dirs() {
+ local dst_dir="$1"
+ if [ -d "$dst_dir/usr" ] ; then
+ find "$dst_dir/usr" -empty -type d -delete
+ fi
+}
+
ver="$1"
src_dir="$2"
dst_dir="$3"
mode="$5"
filespec="$6"
+SED="${SED:-sed -e}"
+
+find "$src_dir" -name "*.exe" -delete
+
process_filespec "$src_dir" "$dst_dir" "$filespec" || {
echo "process filespec error-ed"
exit 1
}
+usr_bin_dir="$dst_dir/usr/bin"
+
+if [ -d "$usr_bin_dir" ] ; then
+ $SED "1"'!'"b;s,^#"'!'".*python.*,#"'!'"/usr/bin/python${ver}," -i --follow-symlinks $usr_bin_dir/*
+fi
+
if [ "$mode" == "sources" ] ; then
# Copy only python source files
- find $dst_dir -not -type d -not -name "*\.py" | xargs rm -f
+ find "$dst_dir" -not -type d -not -name "*.py" -delete
- # Delete empty folders (if the case)
- if [ -d "$dst_dir/usr" ] ; then
- find $dst_dir/usr -type d | xargs rmdir --ignore-fail-on-non-empty
- rmdir --ignore-fail-on-non-empty $dst_dir/usr
- fi
+ delete_empty_dirs "$dst_dir"
exit 0
fi
legacy=
[ "$ver" == "3" ] && legacy="-b"
+# default max recursion is 10
+max_recursion_level=20
# XXX [So that you won't goof as I did]
# Note: Yes, I tried to use the -O & -OO flags here.
# So, we just stuck to un-optimized byte-codes,
# which is still way better/faster than running
# Python sources all the time.
-$python -m compileall $legacy -d '/' $dst_dir || {
+$python -m compileall -r "$max_recursion_level" $legacy -d '/' "$dst_dir" || {
echo "python -m compileall err-ed"
exit 1
}
# Delete source files and pyc [ un-optimized bytecode files ]
# We may want to make this optimization thing configurable later, but not sure atm
-find $dst_dir -type f -name "*\.py" | xargs rm -f
+find "$dst_dir" -type f -name "*.py" -delete
-# Delete empty folders (if the case)
-if [ -d "$dst_dir/usr" ] ; then
- find $dst_dir/usr -type d | xargs rmdir --ignore-fail-on-non-empty
- rmdir --ignore-fail-on-non-empty $dst_dir/usr
-fi
+delete_empty_dirs "$dst_dir"
exit 0
define Package/$(1)-src
$(call Package/$(1))
DEPENDS:=
+ CONFLICTS:=
+ PROVIDES:=
+ EXTRA_DEPENDS:=
TITLE+= (sources)
+ USERID:=
endef
define Package/$(1)-src/description
$(call shexport,PyPackage/$(1)/filespec)
define Package/$(1)/install
- $(call PyPackage/$(1)/install,$$(1))
- find $(PKG_INSTALL_DIR) -name "*\.exe" | xargs rm -f
+ $$(call PyPackage/$(1)/install,$$(1))
+ SED="$(SED)" \
$(SHELL) $(python_mk_path)python-package-install.sh "2" \
"$(PKG_INSTALL_DIR)" "$$(1)" \
"$(HOST_PYTHON_BIN)" "$$(2)" \
cd $(PKG_BUILD_DIR)/$(strip $(1)), \
./setup.py $(2), \
$(3))
- find $(PKG_INSTALL_DIR) -name "*\.exe" | xargs rm -f
endef
-PYTHON_PKG_SETUP_ARGS:=--single-version-externally-managed
-PYTHON_PKG_SETUP_VARS:=
+PYTHON_PKG_SETUP_DIR ?=
+PYTHON_PKG_SETUP_GLOBAL_ARGS ?=
+PYTHON_PKG_SETUP_ARGS ?= --single-version-externally-managed
+PYTHON_PKG_SETUP_VARS ?=
define PyBuild/Compile/Default
- $(foreach pkg,$(HOST_PYTHON_PACKAGE_BUILD_DEPENDS),
- $(call host_python_pip_install_host,$(pkg))
+ $(if $(HOST_PYTHON_PACKAGE_BUILD_DEPENDS),
+ $(call Build/Compile/HostPyPipInstall,$(HOST_PYTHON_PACKAGE_BUILD_DEPENDS))
)
- $(call Build/Compile/PyMod,, \
+ $(call Build/Compile/PyMod, \
+ $(PYTHON_PKG_SETUP_DIR), \
+ $(PYTHON_PKG_SETUP_GLOBAL_ARGS) \
install --prefix="/usr" --root="$(PKG_INSTALL_DIR)" \
$(PYTHON_PKG_SETUP_ARGS), \
$(PYTHON_PKG_SETUP_VARS) \
PKG_NAME:=python-packages
PKG_VERSION:=1.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_MAINTAINER:=Yousong Zhou <yszhou4tech@gmail.com>
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)
--prefix=$(2) \
--ignore-installed \
--no-compile \
- $(if $(CONFIG_PACKAGE_python-packages-index-url), --index-url $(CONFIG_PACKAGE_python-packages-index-url)) \
+ $(if $(CONFIG_PACKAGE_python-packages-index-url), --index-url "$(CONFIG_PACKAGE_python-packages-index-url)") \
$(if $(CONFIG_PACKAGE_python-packages-pip-opts), $(CONFIG_PACKAGE_python-packages-pip-opts)) \
HOST_PYTHON_PIP_INSTALL_HOST:=$(call HOST_PYTHON_PIP_INSTALL,$(STAGING_DIR_HOSTPKG),"")
--- /dev/null
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-paho-mqtt
+PKG_VERSION:=1.4.0
+PKG_RELEASE:=1
+PKG_LICENSE:=Eclipse Public License v1.0 / Eclipse Distribution License v1.0
+PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>, Alexandru Ardelean <ardeleanalex@gmail.com>
+
+PKG_SOURCE:=paho-mqtt-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/25/63/db25e62979c2a716a74950c9ed658dce431b5cb01fde29eb6cba9489a904
+PKG_HASH:=e440a052b46d222e184be3be38676378722072fcd4dfd2c8f509fb861a7b0b79
+PKG_BUILD_DIR:=$(BUILD_DIR)/paho-mqtt-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-paho-mqtt
+ SECTION:=lang
+ CATEGORY:=Languages
+ SUBMENU:=Python
+ TITLE:=python3-paho-mqtt
+ URL:=http://eclipse.org/paho
+ DEPENDS:=+python3-light
+ VARIANT:=python3
+endef
+
+define Package/python3-paho-mqtt/description
+ MQTT version 3.1/3.1.1 client class
+endef
+
+$(eval $(call Py3Package,python3-paho-mqtt))
+$(eval $(call BuildPackage,python3-paho-mqtt))
+$(eval $(call BuildPackage,python3-paho-mqtt-src))
PKG_NAME:=python-parsley
PKG_VERSION:=1.3
-PKG_RELEASE:=3
+PKG_RELEASE:=4
PKG_SOURCE:=Parsley-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/source/P/Parsley
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/P/Parsley
PKG_HASH:=9444278d47161d5f2be76a767809a3cbe6db4db822f46a4fd7481d4057208d41
PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-parsley-$(PKG_VERSION)
PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+PYTHON_PKG_SETUP_ARGS:=
+PYTHON3_PKG_SETUP_ARGS:=
+
define Package/python-parsley/Default
SECTION:=lang
CATEGORY:=Languages
SUBMENU:=Python
+ TITLE:=Parsing and pattern matching
URL:=http://launchpad.net/parsley
endef
define Package/python-parsley
$(call Package/python-parsley/Default)
- TITLE:=python-parsley
DEPENDS:=+PACKAGE_python-parsley:python-light
VARIANT:=python
endef
define Package/python3-parsley
$(call Package/python-parsley/Default)
- TITLE:=python3-parsley
DEPENDS:=+PACKAGE_python3-parsley:python3-light
VARIANT:=python3
endef
(Variant for Python3)
endef
-define PyBuild/Compile
- $(call Build/Compile/PyMod,,install --prefix="/usr" --root="$(PKG_INSTALL_DIR)")
-endef
-
-define Py3Build/Compile
- $(call Build/Compile/Py3Mod,,install --prefix="/usr" --root="$(PKG_INSTALL_DIR)")
-endef
-
$(eval $(call PyPackage,python-parsley))
$(eval $(call BuildPackage,python-parsley))
$(eval $(call BuildPackage,python-parsley-src))
PKG_NAME:=python-pcapy
PKG_VERSION:=0.11.4
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=pcapy-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/pcapy
PKG_MAINTAINER:=Andrew McConachie <andrew@depht.com>
PKG_LICENSE:=Apache-1.1
+include $(INCLUDE_DIR)/uclibc++.mk
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
SUBMENU:=Python
TITLE:=python-pcapy
URL:=https://www.coresecurity.com/corelabs-research/open-source-tools/pcapy
- DEPENDS:=+python +libpcap +libstdcpp
+ DEPENDS:=+python +libpcap $(CXX_DEPENDS)
endef
define Package/python-pcapy/description
--- /dev/null
+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
SECTION:=lang
CATEGORY:=Languages
SUBMENU:=Python
+ TITLE:=lex and yacc for Python
URL:=http://www.dabeaz.com/ply/
endef
define Package/python-ply
$(call Package/python-ply/Default)
- TITLE:=lex and yacc for Python
DEPENDS:=+PACKAGE_python-ply:python-light
VARIANT:=python
endef
define Package/python3-ply
$(call Package/python-ply/Default)
- TITLE:=lex and yacc for Python
DEPENDS:=+PACKAGE_python3-ply:python3-light
VARIANT:=python3
endef
include $(TOPDIR)/rules.mk
PKG_NAME:=python-pyasn1-modules
-PKG_VERSION:=0.2.3
+PKG_VERSION:=0.2.5
PKG_RELEASE:=1
PKG_SOURCE:=pyasn1-modules-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/pyasn1-modules
-PKG_HASH:=d14fcb29dabecba3d7b360bf72327c26c385248a5d603cf6be5f566ce999b261
+PKG_HASH:=ef721f68f7951fab9b0404d42590f479e30d9005daccb1699b0a51bb4177db96
PKG_LICENSE:=BSD-2-Clause
PKG_LICENSE_FILES:=LICENSE.txt
SECTION:=lang
CATEGORY:=Languages
SUBMENU:=Python
- URL:=http://sourceforge.net/projects/pyasn1/
+ TITLE:=Collection of ASN.1 modules
+ URL:=https://github.com/etingof/pyasn1-modules
endef
define Package/python-pyasn1-modules
$(call Package/python-pyasn1-modules/Default)
- TITLE:=python-pyasn1-modules
- VARIANT:=python
DEPENDS:= \
+PACKAGE_python-pyasn1-modules:python-light \
+PACKAGE_python-pyasn1-modules:python-pyasn1
+ VARIANT:=python
endef
define Package/python3-pyasn1-modules
$(call Package/python-pyasn1-modules/Default)
- TITLE:=python3-pyasn1-modules
- VARIANT:=python3
DEPENDS:= \
+PACKAGE_python3-pyasn1-modules:python3-light \
+PACKAGE_python3-pyasn1-modules:python3-pyasn1
+ VARIANT:=python3
endef
define Package/python-pyasn1-modules/description
SECTION:=lang
CATEGORY:=Languages
SUBMENU:=Python
+ TITLE:=ASN.1 library for Python
URL:=https://github.com/etingof/pyasn1
endef
define Package/python-pyasn1
$(call Package/python-pyasn1/Default)
- TITLE:=ASN.1 library for Python
DEPENDS:=+PACKAGE_python-pyasn1:python-light
VARIANT:=python
endef
define Package/python3-pyasn1
$(call Package/python-pyasn1/Default)
- TITLE:=ASN.1 library for Python
DEPENDS:=+PACKAGE_python3-pyasn1:python3-light
VARIANT:=python3
endef
PKG_NAME:=python-pycparser
PKG_VERSION:=2.19
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=pycparser-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/pycparser
PKG_HASH:=a988718abfad80b6b157acce7bf130a30876d27603738ac39f140993246b25b3
+
PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-pycparser-$(PKG_VERSION)
PKG_LICENSE:=BSD-3-Clause
SECTION:=lang
CATEGORY:=Languages
SUBMENU:=Python
+ TITLE:=C parser in Python
URL:=https://github.com/eliben/pycparser
endef
define Package/python-pycparser
$(call Package/python-pycparser/Default)
- TITLE:=python-pycparser
- DEPENDS:=+PACKAGE_python-pycparser:python-light +PACKAGE_python-pycparser:python-ply
+ DEPENDS:= \
+ +PACKAGE_python-pycparser:python-light \
+ +PACKAGE_python-pycparser:python-ply
VARIANT:=python
endef
define Package/python3-pycparser
$(call Package/python-pycparser/Default)
- TITLE:=python3-pycparser
- DEPENDS:=+PACKAGE_python3-pycparser:python3-light +PACKAGE_python3-pycparser:python3-ply
+ DEPENDS:= \
+ +PACKAGE_python3-pycparser:python3-light \
+ +PACKAGE_python3-pycparser:python3-ply
VARIANT:=python3
endef
include $(TOPDIR)/rules.mk
PKG_NAME:=python-pyopenssl
-PKG_VERSION:=18.0.0
-PKG_RELEASE:=1
+PKG_VERSION:=19.0.0
+PKG_RELEASE:=2
PKG_SOURCE:=pyOpenSSL-$(PKG_VERSION).tar.gz
-
-PKG_SOURCE_URL:=https://pypi.io/packages/source/p/pyOpenSSL
-PKG_HASH:=6488f1423b00f73b7ad5167885312bb0ce410d3312eb212393795b53c8caa580
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/pyOpenSSL
+PKG_HASH:=aeca66338f6de19d1aa46ed634c3b9ae519a64b458f8468aec688e7e3c20f200
PKG_LICENSE:=Apache-2.0
PKG_LICENSE_FILES:=LICENSE
SECTION:=lang
CATEGORY:=Languages
SUBMENU:=Python
- URL:=https://github.com/pyca/pyopenssl
+ TITLE:=OpenSSL wrapper
+ URL:=https://pyopenssl.org/
endef
define Package/python-pyopenssl
$(call Package/python-pyopenssl/Default)
- TITLE:=python-pyopenssl
- VARIANT:=python
DEPENDS:= \
+PACKAGE_python-pyopenssl:python-light \
+PACKAGE_python-pyopenssl:python-cryptography \
+PACKAGE_python-pyopenssl:python-six
+ VARIANT:=python
endef
define Package/python3-pyopenssl
$(call Package/python-pyopenssl/Default)
- TITLE:=python3-pyopenssl
- VARIANT:=python3
DEPENDS:= \
+PACKAGE_python3-pyopenssl:python3-light \
+PACKAGE_python3-pyopenssl:python3-cryptography \
+PACKAGE_python3-pyopenssl:python3-six
+ VARIANT:=python3
endef
define Package/python-pyopenssl/description
--- /dev/null
+#
+# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/)
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=pyotp
+PKG_VERSION:=2.2.7
+PKG_RELEASE:=1
+
+PKG_SOURCE:=pyotp-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/pyotp
+PKG_HASH:=be0ffeabddaa5ee53e7204e7740da842d070cf69168247a3d0c08541b84de602
+
+PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-pyotp
+ SUBMENU:=Python
+ SECTION:=lang
+ CATEGORY:=Languages
+ TITLE:=Python One-Time Password Library
+ URL:=https://github.com/pyauth/pyotp
+ DEPENDS:=+python3-light
+ VARIANT:=python3
+endef
+
+define Package/python3-pyotp/description
+ PyOTP is a Python library for generating and verifying one-time passwords.
+ It can be used to implement two-factor (2FA) or multi-factor (MFA) authentication methods
+ in web applications and in other systems that require users to log in.
+endef
+
+$(eval $(call Py3Package,python3-pyotp))
+$(eval $(call BuildPackage,python3-pyotp))
+$(eval $(call BuildPackage,python3-pyotp-src))
PKG_NAME:=python-pyptlib
PKG_VERSION:=0.0.6
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_SOURCE:=pyptlib-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/source/p/pyptlib
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/pyptlib
PKG_HASH:=b98472e3d9e8f4689d3913ca8f89afa5e6cc5383dcd8686987606166f9dac607
PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-pyptlib-$(PKG_VERSION)
SECTION:=lang
CATEGORY:=Languages
SUBMENU:=Python
- URL:=https://pypi.python.org/pypi/pyptlib
+ TITLE:=Pluggable Transports for Tor
+ URL:=https://pypi.org/project/pyptlib/
endef
define Package/python-pyptlib
$(call Package/python-pyptlib/Default)
- TITLE:=python-pyptlib
DEPENDS:=+PACKAGE_python-pyptlib:python-light
VARIANT:=python
endef
define Package/python-pyserial
$(call Package/python-pyserial/Default)
TITLE:=python-pyserial
- DEPENDS:=+python-light
+ DEPENDS:=+PACKAGE_python-pyserial:python-light
VARIANT:=python
endef
define Package/python3-pyserial
$(call Package/python-pyserial/Default)
TITLE:=python3-pyserial
- DEPENDS:=+python3-light
+ DEPENDS:=+PACKAGE_python3-pyserial:python3-light
VARIANT:=python3
endef
--- /dev/null
+#
+# Copyright (C) 2007-2019 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-pytz
+PKG_VERSION:=2019.1
+PKG_RELEASE:=2
+
+PKG_SOURCE:=pytz-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/pytz
+PKG_HASH:=d747dd3d23d77ef44c6a3526e274af6efeb0a6f1afd5a69ba4d5be4098c8e141
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-pytz-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE.txt
+
+include $(INCLUDE_DIR)/package.mk
+include ../python-package.mk
+include ../python3-package.mk
+
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+define Package/python-pytz/Default
+ SUBMENU:=Python
+ SECTION:=lang
+ CATEGORY:=Languages
+ 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
+ DEPENDS:=+PACKAGE_python3-pytz:python3-light
+ VARIANT:=python3
+endef
+
+define Package/python-pytz/description
+ World timezone definitions, modern and historical
+endef
+
+define Package/python3-pytz/description
+$(call Package/python-pytz/description)
+.
+(Variant for Python3)
+endef
+
+$(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))
#
-# Copyright (C) 2007-2016 OpenWrt.org
-#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=python-qrcode
-PKG_VERSION:=6.0
-PKG_RELEASE:=1
-PKG_LICENSE:=BSD-3-Clause
+PKG_VERSION:=6.1
+PKG_RELEASE:=2
PKG_SOURCE:=qrcode-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/8d/b6/beed3d50e1047a2aa6437d3a653e5f31feb7f4de8bc054299dc205682e41
-PKG_HASH:=037b0db4c93f44586e37f84c3da3f763874fcac85b2974a69a98e399ac78e1bf
-PKG_BUILD_DIR:=$(BUILD_DIR)/qrcode-$(PKG_VERSION)
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/q/qrcode/
+PKG_HASH:=505253854f607f2abf4d16092c61d4e9d511a3b4392e60bff957a68592b04369
+
+PKG_MAINTAINER:=Eneas U de Queiroz <cotequeiroz@gmail.com>
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-qrcode-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
+include ../python3-package.mk
-define Package/python-qrcode
- SUBMENU:=Python
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+define Package/python-qrcode/Default
SECTION:=lang
CATEGORY:=Languages
- MAINTAINER:=Eneas U de Queiroz <cote2004-github@yahoo.com>
+ SUBMENU:=Python
TITLE:=QR Code image generator
URL:=https://github.com/lincolnloop/python-qrcode
- DEPENDS:=+python +python-six
+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 Build/Compile
- $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
+define Package/python3-qrcode
+$(call Package/python-qrcode/Default)
+ DEPENDS:= \
+ +PACKAGE_python3-qrcode:python3 \
+ +PACKAGE_python3-qrcode:python3-setuptools \
+ +PACKAGE_python3-qrcode:python3-six \
+ +PACKAGE_python3-qrcode:python3-pillow
+ VARIANT:=python3
endef
-define Package/python-qrcode/install
- $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
- $(CP) \
- $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
- $(1)$(PYTHON_PKG_DIR)
+define Package/python3-qrcode/description
+$(call Package/python-qrcode/description)
+.
+(Variant for Python3)
endef
+$(eval $(call PyPackage,python-qrcode))
$(eval $(call BuildPackage,python-qrcode))
+$(eval $(call BuildPackage,python-qrcode-src))
+
+$(eval $(call Py3Package,python3-qrcode))
+$(eval $(call BuildPackage,python3-qrcode))
+$(eval $(call BuildPackage,python3-qrcode-src))
--- /dev/null
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-rcssmin
+PKG_VERSION:=1.0.6
+PKG_RELEASE=1
+
+PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>, Eneas U de Queiroz <cote2004-github@yahoo.com>
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_SOURCE:=rcssmin-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/r/rcssmin
+PKG_HASH:=ca87b695d3d7864157773a61263e5abb96006e9ff0e021eff90cbe0e1ba18270
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-rcssmin-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+include ../python-package.mk
+include ../python3-package.mk
+
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+define Package/python-rcssmin/Default
+ SUBMENU:=Python
+ SECTION:=lang
+ CATEGORY:=Languages
+ TITLE:=Fast CSS minifier for Python
+ 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:= \
+ +PACKAGE_python3-rcssmin:python3-light
+ VARIANT:=python3
+endef
+
+define Package/python-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))
#
-# Copyright (C) 2007-2016 OpenWrt.org
-#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=python-requests-oauthlib
-PKG_VERSION:=1.0.0
+PKG_VERSION:=1.2.0
PKG_RELEASE:=2
+
+PKG_MAINTAINER:=Eneas U de Queiroz <cote2004-github@yahoo.com>
PKG_LICENSE:=ISC
+PKG_LICENSE_FILES:=LICENSE
PKG_SOURCE:=requests-oauthlib-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/r/requests-oauthlib
-PKG_HASH:=8886bfec5ad7afb391ed5443b1f697c6f4ae98d0e5620839d8b4499c032ada3f
-PKG_BUILD_DIR:=$(BUILD_DIR)/requests-oauthlib-$(PKG_VERSION)
+PKG_HASH:=bd6533330e8748e94bf0b214775fed487d309b8b8fe823dc45641ebcd9a32f57
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-requests-oauthlib-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
+include ../python3-package.mk
-define Package/python-requests-oauthlib
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+define Package/python-requests-oauthlib/Default
SUBMENU:=Python
SECTION:=lang
CATEGORY:=Languages
- MAINTAINER:=Eneas U de Queiroz <cote2004-github@yahoo.com>
- TITLE:=OAuthlib authentication support for Requests.
+ TITLE:=OAuthlib auth for Requests
URL:=https://github.com/requests/requests-oauthlib
- DEPENDS:=+python +python-requests +python-oauthlib +python-cryptography +python-pyjwt
+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:= \
+ +PACKAGE_python3-requests-oauthlib:python3 \
+ +PACKAGE_python3-requests-oauthlib:python3-oauthlib \
+ +PACKAGE_python3-requests-oauthlib:python3-requests
+ VARIANT:=python3
+endef
+
define Package/python-requests-oauthlib/description
- This project provides first-class OAuth library support for Requests.
+ 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))
#
-# Copyright (C) 2007-2016 OpenWrt.org
+# Copyright (C) 2007-2019 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
PKG_NAME:=python-requests
-PKG_VERSION:=2.21.0
+PKG_VERSION:=2.22.0
PKG_RELEASE:=1
+
+PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>, Alexandru Ardelean <ardeleanalex@gmail.com>
PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=LICENSE
+PKG_CPE_ID:=cpe:/a:python-requests:requests
PKG_SOURCE:=requests-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/r/requests
-PKG_HASH:=502a824f31acdacb3a35b6690b5fbf0bc41d63a24a45c4004352b0242707598e
-PKG_BUILD_DIR:=$(BUILD_DIR)/requests-$(PKG_VERSION)
+PKG_HASH:=11e007a8a2aa0323f5a921e9e6a2d7e4e67d9877e85773fba9ba6419025cbeb4
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-requests-$(PKG_VERSION)
PKG_CPE_ID:=cpe:/a:python-requests:requests
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
+include ../python3-package.mk
-define Package/python-requests
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+define Package/python-requests/Default
SUBMENU:=Python
SECTION:=lang
CATEGORY:=Languages
- MAINTAINER:=Eneas U de Queiroz <cote2004-github@yahoo.com>
TITLE:=HTTP library for Python
- URL:=http://python-requests.org/
- DEPENDS:=+python +chardet +python-idna +python-urllib3 +python-certifi
+ 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:= \
+ +PACKAGE_python3-requests:python3-light \
+ +PACKAGE_python3-requests:python3-chardet \
+ +PACKAGE_python3-requests:python3-idna \
+ +PACKAGE_python3-requests:python3-urllib3 \
+ +PACKAGE_python3-requests:python3-certifi
+ VARIANT:=python3
+endef
+
define Package/python-requests/description
- Requests is the only Non-GMO HTTP library for Python, safe for human consumption.
+ Requests is the only Non-GMO HTTP library for Python, safe for human consumption
+endef
+
+define Package/python3-requests/description
+$(call Package/python-requests/description)
+.
+(Variant for Python3)
endef
$(eval $(call PyPackage,python-requests))
$(eval $(call BuildPackage,python-requests))
$(eval $(call BuildPackage,python-requests-src))
+
+$(eval $(call Py3Package,python3-requests))
+$(eval $(call BuildPackage,python3-requests))
+$(eval $(call BuildPackage,python3-requests-src))
--- /dev/null
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=rsa
+PKG_VERSION:=4.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/r/rsa
+PKG_HASH:=1a836406405730121ae9823e19c6e806c62bbad73f890574fff50efa4122c487
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-rsa-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Daniel Danzberger <daniel@dd-wrt.com>
+PKG_LICENSE:=MIT
+
+include $(INCLUDE_DIR)/package.mk
+include ../python-package.mk
+include ../python3-package.mk
+
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+define Package/python-rsa/Default
+ SUBMENU:=Python
+ SECTION:=lang
+ CATEGORY:=Languages
+ TITLE:=rsa
+ URL:=https://stuvel.eu/rsa
+endef
+
+define Package/python-rsa
+$(call Package/python-rsa/Default)
+ DEPENDS:=+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
+ 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))
--- /dev/null
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=s3transfer
+PKG_VERSION:=0.2.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/s/s3transfer
+PKG_HASH:=f23d5cb7d862b104401d9021fc82e5fa0e0cf57b7660a1331425aab0c691d021
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-s3transfer-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Daniel Danzberger <daniel@dd-wrt.com>
+PKG_LICENSE:=MIT
+
+include $(INCLUDE_DIR)/package.mk
+include ../python-package.mk
+include ../python3-package.mk
+
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+define Package/python-s3transfer/Default
+ SECTION:=lang
+ CATEGORY:=Languages
+ SUBMENU:=Python
+ TITLE:=s3transfer
+ URL:=https://github.com/boto/s3transfer
+endef
+
+define Package/python-s3transfer
+$(call Package/python-s3transfer/Default)
+ DEPENDS:= \
+ +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:= \
+ +PACKAGE_python3-s3transfer:python3 \
+ +PACKAGE_python3-s3transfer:python3-botocore
+ VARIANT:=python3
+endef
+
+define Package/python-s3transfer/description
+S3transfer is a Python library for managing Amazon S3 transfers.
+endef
+
+define Package/python3-s3transfer/description
+$(call Package/python-s3transfer/description)
+.
+(Variant for Python3)
+endef
+
+$(eval $(call PyPackage,python-s3transfer))
+$(eval $(call BuildPackage,python-s3transfer))
+$(eval $(call BuildPackage,python-s3transfer-src))
+
+$(eval $(call Py3Package,python3-s3transfer))
+$(eval $(call BuildPackage,python3-s3transfer))
+$(eval $(call BuildPackage,python3-s3transfer-src))
--- /dev/null
+#
+# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/)
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-schedule
+PKG_VERSION:=0.6.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=schedule-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/s/schedule/
+PKG_HASH:=f9fb5181283de4db6e701d476dd01b6a3dd81c38462a54991ddbb9d26db857c9
+PKG_BUILD_DIR:=$(BUILD_DIR)/schedule-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE.txt
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-schedule
+ SECTION:=lang
+ CATEGORY:=Languages
+ SUBMENU:=Python
+ TITLE:=Job scheduling for humans
+ URL:=https://github.com/dbader/schedule
+ DEPENDS:=+python3-light +python3-logging
+ VARIANT:=python3
+endef
+
+define Package/python3-schedule/description
+ An in-process scheduler for periodic jobs that uses the builder pattern for configuration.
+ The Schedule lets you run Python functions (or any other callable)
+ periodically at predetermined intervals using a simple, human-friendly syntax.
+endef
+
+$(eval $(call Py3Package,python3-schedule))
+$(eval $(call BuildPackage,python3-schedule))
+$(eval $(call BuildPackage,python3-schedule-src))
--- /dev/null
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-schema
+PKG_VERSION:=0.7.0
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Karel Kočí <cynerd@email.cz>
+
+PKG_SOURCE_URL:=https://codeload.github.com/keleshev/schema/tar.gz/v$(PKG_VERSION)?
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_HASH:=6c6da2154c0f63025127a1ecb3b2f07b95ec8dd029663fc74ab2e972bf770c72
+PKG_BUILD_DIR:=$(BUILD_DIR)/schema-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-schema
+ SECTION:=lang
+ CATEGORY:=Languages
+ SUBMENU:=Python
+ URL:=https://github.com/keleshev/schema
+ TITLE:=python3-schema
+ DEPENDS:=+python3-light +python3-contextlib2
+ VARIANT:=python3
+endef
+
+define Package/python3-schema/description
+ Schema validation just got Pythonic
+endef
+
+$(eval $(call Py3Package,python3-schema))
+$(eval $(call BuildPackage,python3-schema))
+$(eval $(call BuildPackage,python3-schema-src))
--- /dev/null
+#
+# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/)
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-sentry-sdk
+PKG_VERSION:=0.10.1
+PKG_RELEASE:=1
+
+PKG_SOURCE:=sentry-sdk-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/s/sentry-sdk/
+PKG_HASH:=7e24f3ec1f4c909306d1b97373fe5caa942f54009acdcfa4d1ee6671f626bbe9
+PKG_BUILD_DIR:=$(BUILD_DIR)/sentry-sdk-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>
+PKG_LICENSE:=BSD-2-Clause
+PKG_LICENSE_FILES:=LICENSE
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-sentry-sdk
+ SECTION:=lang
+ CATEGORY:=Languages
+ SUBMENU:=Python
+ TITLE:=Python Client for Sentry
+ URL:=https://github.com/getsentry/sentry-python
+ DEPENDS:= \
+ +python3-certifi \
+ +python3-light \
+ +python3-logging \
+ +python3-urllib3
+ VARIANT:=python3
+endef
+
+define Package/python3-sentry-sdk/description
+ Python Sentry-Python is an SDK for Sentry.
+endef
+
+$(eval $(call Py3Package,python3-sentry-sdk))
+$(eval $(call BuildPackage,python3-sentry-sdk))
+$(eval $(call BuildPackage,python3-sentry-sdk-src))
PKG_SOURCE:=service_identity-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/s/service_identity
PKG_HASH:=0858a54aabc5b459d1aafa8a518ed2081a285087f349fe3e55197989232e2e2d
+
PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-service-identity-$(PKG_VERSION)
PKG_LICENSE:=MIT
SECTION:=lang
CATEGORY:=Languages
SUBMENU:=Python
- URL:=https://github.com/pyca/service_identity
+ TITLE:=Service identity verification
+ URL:=https://service-identity.readthedocs.io/
endef
define Package/python-service-identity
$(call Package/python-service-identity/Default)
- TITLE:=python-service-identity
DEPENDS:= \
+PACKAGE_python-service-identity:python-light \
+PACKAGE_python-service-identity:python-attrs \
define Package/python3-service-identity
$(call Package/python-service-identity/Default)
- TITLE:=python3-service-identity
DEPENDS:= \
+PACKAGE_python3-service-identity:python3-light \
+PACKAGE_python3-service-identity:python3-attrs \
--- /dev/null
+#
+# Copyright (C) 2007-2017 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-simplejson
+PKG_VERSION:=3.16.0
+PKG_RELEASE:=1
+PKG_LICENSE:=MIT
+
+PKG_SOURCE:=simplejson-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/s/simplejson
+PKG_HASH:=b1f329139ba647a9548aa05fb95d046b4a677643070dc2afc05fa2e975d09ca5
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-simplejson-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+include ../python-package.mk
+include ../python3-package.mk
+
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+define Package/python-simplejson/Default
+ SUBMENU:=Python
+ SECTION:=lang
+ CATEGORY:=Languages
+ MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
+ URL:=https://simplejson.readthedocs.org/
+endef
+
+define Package/python-simplejson
+$(call Package/python-simplejson/Default)
+ TITLE:=Simple, fast, extensible JSON encoder/decoder for Python 2
+ DEPENDS:=+PACKAGE_python-simplejson:python-light
+ VARIANT:=python
+endef
+
+define Package/python3-simplejson
+$(call Package/python-simplejson/Default)
+ TITLE:=Simple, fast, extensible JSON encoder/decoder for Python3
+ DEPENDS:=+PACKAGE_python3-simplejson:python3-light
+ VARIANT:=python3
+endef
+
+define Package/python-simplejson/description
+ Simple, fast, extensible JSON encoder/decoder for Python
+endef
+
+define Package/python3-simplejson/description
+$(call Package/python-simplejson/description)
+.
+(Variant for Python3)
+endef
+
+$(eval $(call PyPackage,python-simplejson))
+$(eval $(call BuildPackage,python-simplejson))
+$(eval $(call BuildPackage,python-simplejson-src))
+
+$(eval $(call Py3Package,python3-simplejson))
+$(eval $(call BuildPackage,python3-simplejson))
+$(eval $(call BuildPackage,python3-simplejson-src))
PKG_NAME:=python-six
PKG_VERSION:=1.12.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=six-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/s/six
PKG_HASH:=d16a0141ec1a18405cd4ce8b4613101da75da0e9a7aec5bdd4fa804d0e0eba73
+
PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-six-$(PKG_VERSION)
-PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>, Alexandru Ardelean <ardeleanalex@gmail.com>
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE
+PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>, Alexandru Ardelean <ardeleanalex@gmail.com>
-HOST_BUILD_DEPENDS:=python/host
+HOST_BUILD_DEPENDS:=python3/host
include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/package.mk
SECTION:=lang
CATEGORY:=Languages
SUBMENU:=Python
+ TITLE:=Python 2 and 3 compatibility library
URL:=https://github.com/benjaminp/six
endef
define Package/python-six
$(call Package/python-six/Default)
- TITLE:=python-six
DEPENDS:=+PACKAGE_python-six:python-light
VARIANT:=python
endef
define Package/python3-six
$(call Package/python-six/Default)
- TITLE:=python3-six
DEPENDS:=+PACKAGE_python3-six:python3-light
VARIANT:=python3
endef
endef
define Host/Compile
- $(call Build/Compile/HostPyMod,,install --prefix="" --root="$(STAGING_DIR_HOSTPKG)")
+ $(call Build/Compile/HostPy3Mod,,install --prefix="" --root="$(STAGING_DIR_HOSTPKG)")
endef
Host/Install:=
--- /dev/null
+#
+# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/)
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-slugify
+PKG_VERSION:=3.0.2
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/python-slugify/
+PKG_HASH:=57163ffb345c7e26063435a27add1feae67fa821f1ef4b2f292c25847575d758
+
+PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-slugify
+ SECTION:=lang
+ CATEGORY:=Languages
+ SUBMENU:=Python
+ TITLE:=Slugify application that handles Unicode
+ URL:=https://github.com/un33k/python-slugify
+ DEPENDS+= \
+ +python3-light \
+ +python3-codecs \
+ +python3-setuptools \
+ +python3-text-unidecode
+ VARIANT:=python3
+endef
+
+define Package/python3-slugify/description
+A Python slugify application that handles unicode.
+endef
+
+$(eval $(call Py3Package,python3-slugify))
+$(eval $(call BuildPackage,python3-slugify))
+$(eval $(call BuildPackage,python3-slugify-src))
--- /dev/null
+#
+# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/)
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-sqlalchemy
+PKG_VERSION:=1.3.5
+PKG_RELEASE:=1
+
+PKG_SOURCE:=SQLAlchemy-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/S/SQLAlchemy/
+PKG_HASH:=c30925d60af95443458ebd7525daf791f55762b106049ae71e18f8dd58084c2f
+PKG_BUILD_DIR:=$(BUILD_DIR)/SQLAlchemy-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-sqlalchemy
+ SECTION:=lang
+ CATEGORY:=Languages
+ SUBMENU:=Python
+ TITLE:=Database Abstraction Library
+ URL:=https://www.sqlalchemy.org
+ DEPENDS:= \
+ +python3-light \
+ +python3-urllib \
+ +python3-decimal \
+ +python3-logging
+ VARIANT:=python3
+endef
+
+define Package/python3-sqlalchemy/description
+ SQLAlchemy is the Python SQL toolkit and Object Relational Mapper
+ that gives application developers the full power and flexibility of SQL.
+ SQLAlchemy provides a full suite of well known enterprise-level persistence patterns,
+ designed for efficient and high-performing database access,
+ adapted into a simple and Pythonic domain language.
+endef
+
+$(eval $(call Py3Package,python3-sqlalchemy))
+$(eval $(call BuildPackage,python3-sqlalchemy))
+$(eval $(call BuildPackage,python3-sqlalchemy-src))
--- /dev/null
+#
+# Copyright (C) 2006-2011, 2015-2018 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-twisted
+PKG_VERSION:=19.2.1
+PKG_RELEASE:=1
+
+PKG_SOURCE:=Twisted-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/T/Twisted
+PKG_HASH:=fa2c04c2d68a9be7fc3975ba4947f653a57a656776f24be58ff0fe4b9aaf3e52
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-twisted-$(PKG_VERSION)
+PKG_BUILD_DEPENDS:=libtirpc
+
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
+
+include $(INCLUDE_DIR)/package.mk
+include ../python-package.mk
+include ../python3-package.mk
+
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xjf $(DL_DIR)/$(PKG_SOURCE)
+
+define Package/python-twisted/Default
+ SECTION:=lang
+ CATEGORY:=Languages
+ SUBMENU:=Python
+ TITLE:=Asynchronous networking framework
+ URL:=https://twistedmatrix.com/
+endef
+
+define Package/python-twisted
+$(call Package/python-twisted/Default)
+ DEPENDS:= \
+ +PACKAGE_python-twisted:python-light \
+ +PACKAGE_python-twisted:python-attrs \
+ +PACKAGE_python-twisted:python-automat \
+ +PACKAGE_python-twisted:python-constantly \
+ +PACKAGE_python-twisted:python-incremental \
+ +PACKAGE_python-twisted:python-hyperlink \
+ +PACKAGE_python-twisted:python-setuptools \
+ +PACKAGE_python-twisted:python-zope-interface
+ VARIANT:=python
+endef
+
+define Package/python3-twisted
+$(call Package/python-twisted/Default)
+ DEPENDS:= \
+ +PACKAGE_python3-twisted:python3-light \
+ +PACKAGE_python3-twisted:python3-attrs \
+ +PACKAGE_python3-twisted:python3-automat \
+ +PACKAGE_python3-twisted:python3-constantly \
+ +PACKAGE_python3-twisted:python3-incremental \
+ +PACKAGE_python3-twisted:python3-hyperlink \
+ +PACKAGE_python3-twisted:python3-setuptools \
+ +PACKAGE_python3-twisted:python3-zope-interface
+ VARIANT:=python3
+endef
+
+define Package/python-twisted/description
+Twisted is a networking engine written in Python, supporting numerous
+protocols. It contains a web server, numerous chat clients, chat servers,
+mail servers, and more.
+endef
+
+define Package/python3-twisted/description
+$(call Package/python-twisted/description)
+.
+(Variant for Python3)
+endef
+
+define PyPackage/python-twisted/filespec
++|$(PYTHON_PKG_DIR)
+-|$(PYTHON_PKG_DIR)/twisted/conch/scripts/tkconch.py
+endef
+
+define Py3Package/python3-twisted/filespec
++|$(PYTHON3_PKG_DIR)
+-|$(PYTHON3_PKG_DIR)/twisted/conch/scripts/tkconch.py
+endef
+
+define Py3Package/python3-twisted/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
+ for bin in $(1)/usr/bin/*; do \
+ mv $$$$bin $$$${bin}3 ; \
+ done
+endef
+
+$(eval $(call PyPackage,python-twisted))
+$(eval $(call BuildPackage,python-twisted))
+$(eval $(call BuildPackage,python-twisted-src))
+
+$(eval $(call Py3Package,python3-twisted))
+$(eval $(call BuildPackage,python3-twisted))
+$(eval $(call BuildPackage,python3-twisted-src))
--- /dev/null
+--- a/src/twisted/python/_setup.py
++++ b/src/twisted/python/_setup.py
+@@ -147,7 +147,6 @@ _CONSOLE_SCRIPTS = [
+ "conch = twisted.conch.scripts.conch:run",
+ "mailmail = twisted.mail.scripts.mailmail:run",
+ "pyhtmlizer = twisted.scripts.htmlizer:run",
+- "tkconch = twisted.conch.scripts.tkconch:run",
+ "trial = twisted.scripts.trial:run",
+ "twist = twisted.application.twist._twist:Twist.main",
+ "twistd = twisted.scripts.twistd:run",
+--- a/src/twisted/python/twisted-completion.zsh
++++ b/src/twisted/python/twisted-completion.zsh
+@@ -1,4 +1,4 @@
+-#compdef twist twistd trial conch cftp ckeygen pyhtmlizer tkconch
++#compdef twist twistd trial conch cftp ckeygen pyhtmlizer
+ #
+ # This is the ZSH completion file for Twisted commands. It calls the current
+ # command-line with the special "--_shell-completion" option which is handled
--- /dev/null
+--- a/src/twisted/python/_setup.py
++++ b/src/twisted/python/_setup.py
+@@ -173,11 +173,6 @@ class ConditionalExtension(Extension, ob
+ # The C extensions used for Twisted.
+ _EXTENSIONS = [
+ ConditionalExtension(
+- "twisted.test.raiser",
+- sources=["src/twisted/test/raiser.c"],
+- condition=lambda _: _isCPython),
+-
+- ConditionalExtension(
+ "twisted.internet.iocpreactor.iocpsupport",
+ sources=[
+ "src/twisted/internet/iocpreactor/iocpsupport/iocpsupport.c",
+@@ -241,12 +236,11 @@ def getSetupArgs(extensions=_EXTENSIONS)
+ "incremental >= 16.10.1",
+ "Automat >= 0.3.0",
+ "hyperlink >= 17.1.1",
+- "PyHamcrest >= 1.9.0",
+ "attrs >= 17.4.0",
+ ]
+
+ arguments.update(dict(
+- packages=find_packages("src"),
++ packages=find_packages("src", exclude=["*.test", "*.test.*"]),
+ use_incremental=True,
+ setup_requires=["incremental >= 16.10.1"],
+ install_requires=requirements,
+@@ -256,7 +250,7 @@ def getSetupArgs(extensions=_EXTENSIONS)
+ cmdclass=command_classes,
+ include_package_data=True,
+ exclude_package_data={
+- "": ["*.c", "*.h", "*.pxi", "*.pyx", "build.bat"],
++ "": ["*.c", "*.h", "*.pxi", "*.pyx", "build.bat", "test/*"],
+ },
+ zip_safe=False,
+ extras_require=_EXTRAS_REQUIRE,
PKG_NAME:=python-txsocksx
PKG_VERSION:=1.15.0.2
-PKG_RELEASE:=2
+PKG_RELEASE:=4
PKG_SOURCE:=txsocksx-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/source/t/txsocksx
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/t/txsocksx
PKG_HASH:=4f79b5225ce29709bfcee45e6f726e65b70fd6f1399d1898e54303dbd6f8065f
PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-txsocksx-$(PKG_VERSION)
PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+PYTHON_PKG_SETUP_VARS:= \
+ PKG_VERSION="$(PKG_VERSION)"
+
define Package/python-txsocksx/Default
SECTION:=lang
CATEGORY:=Languages
SUBMENU:=Python
+ TITLE:=SOCKS client endpoints for Twisted
URL:=https://github.com/habnabit/txsocksx
endef
define Package/python-txsocksx
$(call Package/python-txsocksx/Default)
- TITLE:=python-txsocksx
DEPENDS:= \
+PACKAGE_python-txsocksx:python-light \
+PACKAGE_python-txsocksx:python-parsley \
- +PACKAGE_python-txsocksx:twisted
+ +PACKAGE_python-txsocksx:python-twisted
VARIANT:=python
endef
greater.
endef
-define PyBuild/Compile
- $(call Build/Compile/PyMod,, \
- install --prefix="/usr" --root="$(PKG_INSTALL_DIR)", \
- PKG_VERSION="$(PKG_VERSION)" \
- )
-endef
-
$(eval $(call PyPackage,python-txsocksx))
$(eval $(call BuildPackage,python-txsocksx))
$(eval $(call BuildPackage,python-txsocksx-src))
include $(TOPDIR)/rules.mk
PKG_NAME:=python-urllib3
-PKG_VERSION:=1.24.1
+PKG_VERSION:=1.25.3
PKG_RELEASE:=1
+
+PKG_MAINTAINER:=Josef Schlehofer <pepe.schlehofer@gmail.com>
PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE.txt
+PKG_CPE_ID:=cpe:/a:urllib3_project:urllib3
PKG_SOURCE:=urllib3-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/u/urllib3
-PKG_HASH:=de9529817c93f27c8ccbfead6985011db27bd0ddfcdb2d86f3f663385c6a9c22
-PKG_BUILD_DIR:=$(BUILD_DIR)/urllib3-$(PKG_VERSION)
+PKG_HASH:=dbe59173209418ae49d485b87d1681aefa36252ee85884c31346debd19463232
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-urllib3-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
+include ../python3-package.mk
-define Package/python-urllib3
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+define Package/python-urllib3/Default
SUBMENU:=Python
SECTION:=lang
CATEGORY:=Languages
- MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
- TITLE:=HTTP library with thread-safe connection pooling, file post, and more.
+ TITLE:=Sanity-friendly HTTP client
URL:=https://urllib3.readthedocs.io/
- DEPENDS:=+python
+endef
+
+define Package/python-urllib3
+$(call Package/python-urllib3/Default)
+ DEPENDS:=+PACKAGE_python-urllib3:python
+ VARIANT:=python
endef
define Package/python-urllib3/description
HTTP library with thread-safe connection pooling, file post, and more.
endef
-define Build/Compile
- $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
+define Package/python3-urllib3
+$(call Package/python-urllib3/Default)
+ DEPENDS:=+PACKAGE_python3-urllib3:python3
+ VARIANT:=python3
endef
-define Package/python-urllib3/install
- $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
- $(CP) \
- $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
- $(1)$(PYTHON_PKG_DIR)
+define Package/python3-urllib3/description
+$(call Package/python-urllib3/description)
+.
+(Variant for Python3)
endef
+$(eval $(call PyPackage,python-urllib3))
$(eval $(call BuildPackage,python-urllib3))
+$(eval $(call BuildPackage,python-urllib3-src))
+
+$(eval $(call Py3Package,python3-urllib3))
+$(eval $(call BuildPackage,python3-urllib3))
+$(eval $(call BuildPackage,python3-urllib3-src))
#
PYTHON_VERSION:=2.7
-PYTHON_VERSION_MICRO:=15
+PYTHON_VERSION_MICRO:=16
-PYTHON_SETUPTOOLS_PKG_RELEASE:=2
+PYTHON_SETUPTOOLS_PKG_RELEASE:=3
PYTHON_PIP_PKG_RELEASE:=2
-PYTHON_SETUPTOOLS_VERSION:=39.0.1
-PYTHON_PIP_VERSION:=9.0.3
+PYTHON_SETUPTOOLS_VERSION:=40.6.2
+PYTHON_PIP_VERSION:=18.1
--- /dev/null
+#
+# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/)
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=voluptuous-serialize
+PKG_VERSION:=2.1.0
+PKG_RELEASE:=2
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/v/voluptuous-serialize/
+PKG_HASH:=d30fef4f1aba251414ec0b315df81a06da7bf35201dcfb1f6db5253d738a154f
+
+PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=COPYING
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-voluptuous-serialize
+ SECTION:=lang
+ CATEGORY:=Languages
+ SUBMENU:=Python
+ TITLE:=Python Voluptuous Serialize
+ URL:=https://github.com/balloob/voluptuous-serialize
+ DEPENDS:= \
+ +python3-light \
+ +python3-voluptuous
+ VARIANT:=python3
+endef
+
+define Package/python3-voluptuous-serialize/description
+Convert Voluptuous schemas to dictionaries so they can be serialized.
+endef
+
+$(eval $(call Py3Package,python3-voluptuous-serialize))
+$(eval $(call BuildPackage,python3-voluptuous-serialize))
+$(eval $(call BuildPackage,python3-voluptuous-serialize-src))
--- /dev/null
+#
+# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/)
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-voluptuous
+PKG_VERSION:=0.11.5
+PKG_RELEASE:=1
+
+PKG_SOURCE:=voluptuous-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/v/voluptuous/
+PKG_HASH:=567a56286ef82a9d7ae0628c5842f65f516abcb496e74f3f59f1d7b28df314ef
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-voluptuous-$(PKG_VERSION)
+
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=COPYING
+PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>
+
+include $(INCLUDE_DIR)/package.mk
+include ../python-package.mk
+include ../python3-package.mk
+
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+define Package/python-voluptuous/Default
+ SECTION:=lang
+ CATEGORY:=Languages
+ SUBMENU:=Python
+ TITLE:=Data validation library
+ URL:=https://github.com/alecthomas/voluptuous
+endef
+
+define Package/python-voluptuous
+$(call Package/python-voluptuous/Default)
+ DEPENDS:= \
+ +PACKAGE_python-voluptuous:python-light
+ VARIANT:=python
+endef
+
+define Package/python3-voluptuous
+$(call Package/python-voluptuous/Default)
+ DEPENDS:= \
+ +PACKAGE_python3-voluptuous:python3-light
+ VARIANT:=python3
+endef
+
+define Package/python-voluptuous/description
+It is primarily intended for validating data coming into Python as JSON, YAML, etc.
+endef
+
+define Package/python3-voluptuous/description
+$(call Package/python-voluptuous/description)
+.
+(Variant for Python3)
+endef
+
+$(eval $(call PyPackage,python-voluptuous))
+$(eval $(call BuildPackage,python-voluptuous))
+$(eval $(call BuildPackage,python-voluptuous-src))
+
+$(eval $(call Py3Package,python3-voluptuous))
+$(eval $(call BuildPackage,python3-voluptuous))
+$(eval $(call BuildPackage,python3-voluptuous-src))
+
include $(TOPDIR)/rules.mk
PKG_NAME:=PyYAML
-PKG_VERSION:=3.13
+PKG_VERSION:=5.1.1
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/source/P/PyYAML
-PKG_HASH:=3ef3092145e9b70e3ddd2c7ad59bdd0252a94dfe3949721633e41344de00a6bf
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/P/PyYAML
+PKG_HASH:=b4bb4d3f5e232425e25dda21c070ce05168a786ac9eda43768ab7f3ac2770955
+PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>
PKG_LICENSE:=MIT
-PKG_LICENSE_FILES:=COPYING
-PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org>
+PKG_LICENSE_FILES:=LICENSE
+PKG_CPE_ID:=cpe:/a:pyyaml_project:pyyaml
PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-$(PKG_NAME)-$(PKG_VERSION)
-PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
include ../python3-package.mk
+PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
define Package/python-yaml/Default
- SUBMENU:=Python
SECTION:=lang
CATEGORY:=Languages
- URL:=https://pyyaml.org/wiki/PyYAML
+ SUBMENU:=Python
+ TITLE:=YAML parser and emitter for Python
+ URL:=https://github.com/yaml/pyyaml
DEPENDS:=+libyaml
endef
define Package/python-yaml
$(call Package/python-yaml/Default)
- TITLE:=YAML parser and emitter for Python
- DEPENDS+=+PACKAGE_python-yaml:python-light +PACKAGE_python-yaml:python-codecs
+ DEPENDS+= \
+ +PACKAGE_python-yaml:python-light \
+ +PACKAGE_python-yaml:python-codecs
VARIANT:=python
endef
define Package/python3-yaml
$(call Package/python-yaml/Default)
- TITLE:=YAML parser and emitter for Python3
DEPENDS+=+PACKAGE_python3-yaml:python3-light
VARIANT:=python3
endef
-define PyBuild/Compile
- $(call Build/Compile/PyMod,,\
- --with-libyaml install --prefix="$(PKG_INSTALL_DIR)/usr" \
- )
+define Package/python-yaml/description
+ PyYAML is a YAML parser and emitter for the Python programming language.
endef
-define Py3Build/Compile
- $(call Build/Compile/Py3Mod,,\
- --with-libyaml install --prefix="$(PKG_INSTALL_DIR)/usr" \
- )
+define Package/python3-yaml/description
+$(call Package/python-yaml/description)
+.
+(Variant for Python3)
endef
+PYTHON_PKG_SETUP_GLOBAL_ARGS:=--with-libyaml
+PYTHON_PKG_SETUP_ARGS:=
+PYTHON3_PKG_SETUP_GLOBAL_ARGS:=--with-libyaml
+PYTHON3_PKG_SETUP_ARGS:=
+
$(eval $(call PyPackage,python-yaml))
$(eval $(call BuildPackage,python-yaml))
+$(eval $(call BuildPackage,python-yaml-src))
+
$(eval $(call Py3Package,python3-yaml))
$(eval $(call BuildPackage,python3-yaml))
+$(eval $(call BuildPackage,python3-yaml-src))
--- /dev/null
+#
+# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/)
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=yarl
+PKG_VERSION:=1.3.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=yarl-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/y/yarl/
+PKG_HASH:=024ecdc12bc02b321bc66b41327f930d1c2c543fa9a561b39861da9388ba7aa9
+
+PKG_MAINTAINER:=Josef Schlehofer <pepe.schlehofer@gmail.com>
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=LICENSE
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-yarl
+ SECTION:=lang
+ CATEGORY:=Languages
+ SUBMENU:=Python
+ TITLE:=Yet another URL library
+ URL:=https://github.com/aio-libs/yarl
+ DEPENDS:= \
+ +python3-light \
+ +python3-multidict \
+ +python3-urllib \
+ +python3-idna
+ VARIANT:=python3
+endef
+
+define Package/python3-yarl/description
+Yet another URL library
+endef
+
+$(eval $(call Py3Package,python3-yarl))
+$(eval $(call BuildPackage,python3-yarl))
+$(eval $(call BuildPackage,python3-yarl-src))
--- /dev/null
+#
+# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/)
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-zeroconf
+PKG_VERSION:=0.23.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=zeroconf-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://pypi.python.org/packages/source/z/zeroconf/
+PKG_HASH:=e0c333b967c48f8b2e5cc94a1d4d28893023fb06dfd797ee384a94cdd1d0eef5
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/zeroconf-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Josef Schlehofer <pepe.schlehofer@gmail.com>
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=COPYING
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-zeroconf
+ SUBMENU:=Python
+ SECTION:=lang
+ CATEGORY:=Languages
+ TITLE:=Multicast DNS Service Discovery Library
+ URL:=https://github.com/jstasiak/python-zeroconf
+ DEPENDS:= \
+ +python3-light \
+ +python3-logging \
+ +python3-ifaddr
+ VARIANT:=python3
+endef
+
+define Package/python3-zeroconf/description
+ Pure Python Multicast DNS Service Discovery Library (Bonjour/Avahi compatible)
+endef
+
+$(eval $(call Py3Package,python3-zeroconf))
+$(eval $(call BuildPackage,python3-zeroconf))
+$(eval $(call BuildPackage,python3-zeroconf-src))
SECTION:=lang
CATEGORY:=Languages
SUBMENU:=Python
+ TITLE:=Interfaces for Python
URL:=https://github.com/zopefoundation/zope.interface
endef
define Package/python-zope-interface
$(call Package/python-zope-interface/Default)
- TITLE:=Interfaces for Python
DEPENDS:=+PACKAGE_python-zope-interface:python-light
VARIANT:=python
endef
define Package/python3-zope-interface
$(call Package/python-zope-interface/Default)
- TITLE:=Interfaces for Python
DEPENDS:=+PACKAGE_python3-zope-interface:python3-light
VARIANT:=python3
endef
PKG_NAME:=python
PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO)
-PKG_RELEASE:=4
+PKG_RELEASE:=7
PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://www.python.org/ftp/python/$(PKG_VERSION)
-PKG_HASH:=22d9b1ac5b26135ad2b8c2901a9413537e08749a753356ee913c84dbd2df5574
+PKG_HASH:=f222ef602647eecb6853681156d32de4450a2c39f4de93bd5b20235f2e660ed7
-PKG_LICENSE:=PSF
-PKG_LICENSE_FILES:=LICENSE Modules/_ctypes/libffi_msvc/LICENSE Modules/_ctypes/darwin/LICENSE Modules/_ctypes/libffi/LICENSE Modules/_ctypes/libffi_osx/LICENSE Tools/pybench/LICENSE
+PKG_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
CATEGORY:=Languages
TITLE:=Python $(PYTHON_VERSION) programming language
URL:=https://www.python.org/
- MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
endef
define Package/python/Default/description
-|/usr/lib/python$(PYTHON_VERSION)/*/tests
endif
endef
+ PyPackage/$(1)/install?=:
endef
include ./files/python-package-*.mk
ifdef CONFIG_PACKAGE_python-setuptools
define Build/Compile/python-setuptools
- $(STAGING_DIR_HOSTPKG)/bin/pip install \
+ $(HOST_PYTHON_PIP) \
+ --disable-pip-version-check \
+ --cache-dir "$(DL_DIR)/pip-cache" \
+ install \
--ignore-installed \
- --root=$(PKG_BUILD_DIR)/install-setuptools --prefix=. \
+ --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
- $(STAGING_DIR_HOSTPKG)/bin/pip install \
+ $(HOST_PYTHON_PIP) \
+ --disable-pip-version-check \
+ --cache-dir "$(DL_DIR)/pip-cache" \
+ install \
--ignore-installed \
- --root=$(PKG_BUILD_DIR)/install-pip --prefix=. \
+ --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
endef
define Build/InstallDev
- $(INSTALL_DIR) $(1)/usr/include/ $(1)/usr/lib/ $(1)/usr/lib/pkgconfig
- $(INSTALL_DIR) $(1)/usr/lib/python$(PYTHON_VERSION)/
+ $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib $(1)/usr/lib/pkgconfig
+ $(INSTALL_DIR) $(2)/bin
+ $(INSTALL_DIR) $(1)/usr/lib/python$(PYTHON_VERSION)-openwrt
$(CP) \
$(PKG_INSTALL_DIR)/usr/include/python$(PYTHON_VERSION) \
$(1)/usr/include/
$(CP) \
- $(HOST_PYTHON_LIB_DIR) \
+ $(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON_VERSION) \
$(PKG_INSTALL_DIR)/usr/lib/libpython$(PYTHON_VERSION).so* \
$(1)/usr/lib/
$(CP) \
- $(HOST_PYTHON_DIR)/lib/pkgconfig/python.pc \
- $(HOST_PYTHON_DIR)/lib/pkgconfig/python2.pc \
- $(HOST_PYTHON_DIR)/lib/pkgconfig/python-$(PYTHON_VERSION).pc \
+ $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/python*.pc \
$(1)/usr/lib/pkgconfig
+ $(INSTALL_BIN) \
+ ./files/python-config.in \
+ $(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)/config \
- $(1)/usr/lib/python$(PYTHON_VERSION)/
+ $(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON_VERSION)/_sysconfigdata.py \
+ $(1)/usr/lib/python$(PYTHON_VERSION)-openwrt/_sysconfigdatatarget.py
endef
PYTHON_BASE_LIB_FILES:= \
$(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
--prefix=$(HOST_PYTHON_DIR) \
--exec-prefix=$(HOST_PYTHON_DIR) \
--with-system-expat=$(STAGING_DIR_HOSTPKG) \
- --with-ensurepip=install \
+ --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))
--- /dev/null
+#!@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)
+
$(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
- # Adjust shebang to proper python location on target
- sed "1s@.*@#\!/usr/bin/python$(PYTHON_VERSION)@" -i $(PKG_BUILD_DIR)/install-pip/bin/*
- $(CP) $(PKG_BUILD_DIR)/install-pip/bin/* $(1)/usr/bin
+ $(CP) $(PKG_BUILD_DIR)/install-pip/usr/bin/* $(1)/usr/bin
$(CP) \
- $(PKG_BUILD_DIR)/install-pip/lib/python$(PYTHON_VERSION)/site-packages/pip \
- $(PKG_BUILD_DIR)/install-pip/lib/python$(PYTHON_VERSION)/site-packages/pip-$(PYTHON_PIP_VERSION).dist-info \
+ $(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
$(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
endef
define PyPackage/python-setuptools/install
$(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib/python$(PYTHON_VERSION)/site-packages
- # Adjust shebang to proper python location on target
- sed "1s@.*@#\!/usr/bin/python$(PYTHON_VERSION)@" -i $(PKG_BUILD_DIR)/install-setuptools/bin/*
- $(CP) $(PKG_BUILD_DIR)/install-setuptools/bin/* $(1)/usr/bin
+ $(CP) $(PKG_BUILD_DIR)/install-setuptools/usr/bin/* $(1)/usr/bin
$(CP) \
- $(PKG_BUILD_DIR)/install-setuptools/lib/python$(PYTHON_VERSION)/site-packages/pkg_resources \
- $(PKG_BUILD_DIR)/install-setuptools/lib/python$(PYTHON_VERSION)/site-packages/setuptools \
- $(PKG_BUILD_DIR)/install-setuptools/lib/python$(PYTHON_VERSION)/site-packages/setuptools-$(PYTHON_SETUPTOOLS_VERSION).dist-info \
- $(PKG_BUILD_DIR)/install-setuptools/lib/python$(PYTHON_VERSION)/site-packages/easy_install.py \
+ $(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON_VERSION)/site-packages/pkg_resources \
+ $(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON_VERSION)/site-packages/setuptools \
+ $(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON_VERSION)/site-packages/setuptools-$(PYTHON_SETUPTOOLS_VERSION).dist-info \
+ $(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON_VERSION)/site-packages/easy_install.py \
$(1)/usr/lib/python$(PYTHON_VERSION)/site-packages
endef
--- /dev/null
+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)):
--- /dev/null
+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)
+
+
--- /dev/null
+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)
+
+
+zlib zlibmodule.c -lz
# Interface to the Expat XML parser
- #
+ # More information on Expat can be found at www.libexpat.org.
--- a/configure
+++ b/configure
-@@ -7077,7 +7077,7 @@ sys/param.h sys/poll.h sys/random.h sys/
+@@ -7084,7 +7084,7 @@ sys/param.h sys/poll.h sys/random.h sys/
sys/termio.h sys/time.h \
sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-@@ -7299,6 +7299,24 @@ fi
+@@ -7306,6 +7306,24 @@ fi
fi
do :
--- a/configure.ac
+++ b/configure.ac
-@@ -1732,10 +1732,17 @@ sys/param.h sys/poll.h sys/random.h sys/
+@@ -1739,10 +1739,17 @@ sys/param.h sys/poll.h sys/random.h sys/
sys/termio.h sys/time.h \
sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
-diff --git a/Modules/_ssl.c b/Modules/_ssl.c
-index a96c419260..c80437eef7 100644
--- a/Modules/_ssl.c
+++ b/Modules/_ssl.c
-@@ -1586,7 +1586,7 @@ static PyObject *PySSL_version(PySSLSocket *self)
+@@ -1590,7 +1590,7 @@ static PyObject *PySSL_version(PySSLSocket *self)
return PyUnicode_FromString(version);
}
static PyObject *PySSL_selected_npn_protocol(PySSLSocket *self) {
const unsigned char *out;
unsigned int outlen;
-@@ -2114,7 +2114,7 @@ static PyMethodDef PySSLMethods[] = {
+@@ -2118,7 +2118,7 @@ static PyMethodDef PySSLMethods[] = {
PySSL_peercert_doc},
{"cipher", (PyCFunction)PySSL_cipher, METH_NOARGS},
{"version", (PyCFunction)PySSL_version, METH_NOARGS},
+++ /dev/null
-From 18b20bad75b4ff0486940fba4ec680e96e70f3a2 Mon Sep 17 00:00:00 2001
-From: Christian Heimes <christian@python.org>
-Date: Tue, 18 Sep 2018 15:13:09 +0200
-Subject: [PATCH] [2.7] bpo-34623: Use XML_SetHashSalt in _elementtree
- (GH-9146) (GH-9394)
-
-The C accelerated _elementtree module now initializes hash randomization
-salt from _Py_HashSecret instead of libexpat's default CPRNG.
-
-Signed-off-by: Christian Heimes <christian@python.org>
-
-https://bugs.python.org/issue34623.
-(cherry picked from commit cb5778f00ce48631c7140f33ba242496aaf7102b)
-
-Co-authored-by: Christian Heimes <christian@python.org>
-
-
-
-https://bugs.python.org/issue34623
----
- Include/pyexpat.h | 4 +++-
- .../next/Security/2018-09-10-16-05-39.bpo-34623.Ua9jMv.rst | 2 ++
- Modules/_elementtree.c | 5 +++++
- Modules/pyexpat.c | 5 +++++
- 4 files changed, 15 insertions(+), 1 deletion(-)
- create mode 100644 Misc/NEWS.d/next/Security/2018-09-10-16-05-39.bpo-34623.Ua9jMv.rst
-
-diff --git a/Include/pyexpat.h b/Include/pyexpat.h
-index 5340ef5fa3..3fc5fa54da 100644
---- a/Include/pyexpat.h
-+++ b/Include/pyexpat.h
-@@ -3,7 +3,7 @@
-
- /* note: you must import expat.h before importing this module! */
-
--#define PyExpat_CAPI_MAGIC "pyexpat.expat_CAPI 1.0"
-+#define PyExpat_CAPI_MAGIC "pyexpat.expat_CAPI 1.1"
- #define PyExpat_CAPSULE_NAME "pyexpat.expat_CAPI"
-
- struct PyExpat_CAPI
-@@ -43,6 +43,8 @@ struct PyExpat_CAPI
- XML_Parser parser, XML_UnknownEncodingHandler handler,
- void *encodingHandlerData);
- void (*SetUserData)(XML_Parser parser, void *userData);
-+ /* might be none for expat < 2.1.0 */
-+ int (*SetHashSalt)(XML_Parser parser, unsigned long hash_salt);
- /* always add new stuff to the end! */
- };
-
-diff --git a/Misc/NEWS.d/next/Security/2018-09-10-16-05-39.bpo-34623.Ua9jMv.rst b/Misc/NEWS.d/next/Security/2018-09-10-16-05-39.bpo-34623.Ua9jMv.rst
-new file mode 100644
-index 0000000000..31ad92ef85
---- /dev/null
-+++ b/Misc/NEWS.d/next/Security/2018-09-10-16-05-39.bpo-34623.Ua9jMv.rst
-@@ -0,0 +1,2 @@
-+The C accelerated _elementtree module now initializes hash randomization
-+salt from _Py_HashSecret instead of libexpat's default CSPRNG.
-diff --git a/Modules/_elementtree.c b/Modules/_elementtree.c
-index f7f992dd3a..b38e0ab329 100644
---- a/Modules/_elementtree.c
-+++ b/Modules/_elementtree.c
-@@ -2574,6 +2574,11 @@ xmlparser(PyObject* self_, PyObject* args, PyObject* kw)
- PyErr_NoMemory();
- return NULL;
- }
-+ /* expat < 2.1.0 has no XML_SetHashSalt() */
-+ if (EXPAT(SetHashSalt) != NULL) {
-+ EXPAT(SetHashSalt)(self->parser,
-+ (unsigned long)_Py_HashSecret.prefix);
-+ }
-
- ALLOC(sizeof(XMLParserObject), "create expatparser");
-
-diff --git a/Modules/pyexpat.c b/Modules/pyexpat.c
-index 2b4d31293c..1f8c0d70a5 100644
---- a/Modules/pyexpat.c
-+++ b/Modules/pyexpat.c
-@@ -2042,6 +2042,11 @@ MODULE_INITFUNC(void)
- capi.SetProcessingInstructionHandler = XML_SetProcessingInstructionHandler;
- capi.SetUnknownEncodingHandler = XML_SetUnknownEncodingHandler;
- capi.SetUserData = XML_SetUserData;
-+#if XML_COMBINED_VERSION >= 20100
-+ capi.SetHashSalt = XML_SetHashSalt;
-+#else
-+ capi.SetHashSalt = NULL;
-+#endif
-
- /* export using capsule */
- capi_object = PyCapsule_New(&capi, PyExpat_CAPSULE_NAME, NULL);
---
-2.19.1
-
+++ /dev/null
-From 10be1d3f802b874914b2a13eb41407c7a582d9b3 Mon Sep 17 00:00:00 2001
-From: "Miss Islington (bot)"
- <31488909+miss-islington@users.noreply.github.com>
-Date: Fri, 21 Sep 2018 21:57:00 -0700
-Subject: [PATCH] [2.7] bpo-34623: Mention CVE-2018-14647 in news entry
- (GH-9482) (GH-9490)
-
-https://bugs.python.org/issue34623
-(cherry picked from commit 026337a7101369297c8083047d2f3c6fc9dd1e2b)
-
-
-Co-authored-by: Christian Heimes <christian@python.org>
-
-
-https://bugs.python.org/issue34623
----
- .../next/Security/2018-09-10-16-05-39.bpo-34623.Ua9jMv.rst | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/Misc/NEWS.d/next/Security/2018-09-10-16-05-39.bpo-34623.Ua9jMv.rst b/Misc/NEWS.d/next/Security/2018-09-10-16-05-39.bpo-34623.Ua9jMv.rst
-index 31ad92ef85..cbaa4b7506 100644
---- a/Misc/NEWS.d/next/Security/2018-09-10-16-05-39.bpo-34623.Ua9jMv.rst
-+++ b/Misc/NEWS.d/next/Security/2018-09-10-16-05-39.bpo-34623.Ua9jMv.rst
-@@ -1,2 +1,2 @@
--The C accelerated _elementtree module now initializes hash randomization
--salt from _Py_HashSecret instead of libexpat's default CSPRNG.
-+CVE-2018-14647: The C accelerated _elementtree module now initializes hash
-+randomization salt from _Py_HashSecret instead of libexpat's default CSPRNG.
---
-2.19.1
-
-diff --git a/Lib/lib2to3/refactor.py b/Lib/lib2to3/refactor.py
-index 7841b99..1e0d3b3 100644
--- a/Lib/lib2to3/refactor.py
+++ b/Lib/lib2to3/refactor.py
-@@ -37,6 +37,12 @@ def get_all_fix_names(fixer_pkg, remove_prefix=True):
+@@ -40,6 +40,12 @@ def get_all_fix_names(fixer_pkg, remove_prefix=True):
if remove_prefix:
name = name[4:]
fix_names.append(name[:-3])
--- /dev/null
+From 3e3669c9c41a27e1466e2c28b3906e3dd0ce3e7e Mon Sep 17 00:00:00 2001
+From: Steve Dower <steve.dower@python.org>
+Date: Thu, 7 Mar 2019 08:25:22 -0800
+Subject: [PATCH] bpo-36216: Add check for characters in netloc that normalize
+ to separators (GH-12201)
+
+---
+ Doc/library/urlparse.rst | 20 ++++++++++++++++
+ Lib/test/test_urlparse.py | 24 +++++++++++++++++++
+ Lib/urlparse.py | 17 +++++++++++++
+ .../2019-03-06-09-38-40.bpo-36216.6q1m4a.rst | 3 +++
+ 4 files changed, 64 insertions(+)
+ create mode 100644 Misc/NEWS.d/next/Security/2019-03-06-09-38-40.bpo-36216.6q1m4a.rst
+
+diff --git a/Doc/library/urlparse.rst b/Doc/library/urlparse.rst
+index 22249da54fbb..0989c88c3022 100644
+--- a/Doc/library/urlparse.rst
++++ b/Doc/library/urlparse.rst
+@@ -119,12 +119,22 @@ The :mod:`urlparse` module defines the following functions:
+ See section :ref:`urlparse-result-object` for more information on the result
+ object.
+
++ Characters in the :attr:`netloc` attribute that decompose under NFKC
++ normalization (as used by the IDNA encoding) into any of ``/``, ``?``,
++ ``#``, ``@``, or ``:`` will raise a :exc:`ValueError`. If the URL is
++ decomposed before parsing, or is not a Unicode string, no error will be
++ raised.
++
+ .. versionchanged:: 2.5
+ Added attributes to return value.
+
+ .. versionchanged:: 2.7
+ Added IPv6 URL parsing capabilities.
+
++ .. versionchanged:: 2.7.17
++ Characters that affect netloc parsing under NFKC normalization will
++ now raise :exc:`ValueError`.
++
+
+ .. function:: parse_qs(qs[, keep_blank_values[, strict_parsing[, max_num_fields]]])
+
+@@ -232,11 +242,21 @@ The :mod:`urlparse` module defines the following functions:
+ See section :ref:`urlparse-result-object` for more information on the result
+ object.
+
++ Characters in the :attr:`netloc` attribute that decompose under NFKC
++ normalization (as used by the IDNA encoding) into any of ``/``, ``?``,
++ ``#``, ``@``, or ``:`` will raise a :exc:`ValueError`. If the URL is
++ decomposed before parsing, or is not a Unicode string, no error will be
++ raised.
++
+ .. versionadded:: 2.2
+
+ .. versionchanged:: 2.5
+ Added attributes to return value.
+
++ .. versionchanged:: 2.7.17
++ Characters that affect netloc parsing under NFKC normalization will
++ now raise :exc:`ValueError`.
++
+
+ .. function:: urlunsplit(parts)
+
+diff --git a/Lib/test/test_urlparse.py b/Lib/test/test_urlparse.py
+index 4e1ded73c266..73b0228ea8e3 100644
+--- a/Lib/test/test_urlparse.py
++++ b/Lib/test/test_urlparse.py
+@@ -1,4 +1,6 @@
+ from test import test_support
++import sys
++import unicodedata
+ import unittest
+ import urlparse
+
+@@ -624,6 +626,28 @@ def test_portseparator(self):
+ self.assertEqual(urlparse.urlparse("http://www.python.org:80"),
+ ('http','www.python.org:80','','','',''))
+
++ def test_urlsplit_normalization(self):
++ # Certain characters should never occur in the netloc,
++ # including under normalization.
++ # Ensure that ALL of them are detected and cause an error
++ illegal_chars = u'/:#?@'
++ hex_chars = {'{:04X}'.format(ord(c)) for c in illegal_chars}
++ denorm_chars = [
++ c for c in map(unichr, range(128, sys.maxunicode))
++ if (hex_chars & set(unicodedata.decomposition(c).split()))
++ and c not in illegal_chars
++ ]
++ # Sanity check that we found at least one such character
++ self.assertIn(u'\u2100', denorm_chars)
++ self.assertIn(u'\uFF03', denorm_chars)
++
++ for scheme in [u"http", u"https", u"ftp"]:
++ for c in denorm_chars:
++ url = u"{}://netloc{}false.netloc/path".format(scheme, c)
++ print "Checking %r" % url
++ with self.assertRaises(ValueError):
++ urlparse.urlsplit(url)
++
+ def test_main():
+ test_support.run_unittest(UrlParseTestCase)
+
+diff --git a/Lib/urlparse.py b/Lib/urlparse.py
+index f7c2b032b097..54eda08651ab 100644
+--- a/Lib/urlparse.py
++++ b/Lib/urlparse.py
+@@ -165,6 +165,21 @@ def _splitnetloc(url, start=0):
+ delim = min(delim, wdelim) # use earliest delim position
+ return url[start:delim], url[delim:] # return (domain, rest)
+
++def _checknetloc(netloc):
++ if not netloc or not isinstance(netloc, unicode):
++ return
++ # looking for characters like \u2100 that expand to 'a/c'
++ # IDNA uses NFKC equivalence, so normalize for this check
++ import unicodedata
++ netloc2 = unicodedata.normalize('NFKC', netloc)
++ if netloc == netloc2:
++ return
++ _, _, netloc = netloc.rpartition('@') # anything to the left of '@' is okay
++ for c in '/?#@:':
++ if c in netloc2:
++ raise ValueError("netloc '" + netloc2 + "' contains invalid " +
++ "characters under NFKC normalization")
++
+ def urlsplit(url, scheme='', allow_fragments=True):
+ """Parse a URL into 5 components:
+ <scheme>://<netloc>/<path>?<query>#<fragment>
+@@ -193,6 +208,7 @@ def urlsplit(url, scheme='', allow_fragments=True):
+ url, fragment = url.split('#', 1)
+ if '?' in url:
+ url, query = url.split('?', 1)
++ _checknetloc(netloc)
+ v = SplitResult(scheme, netloc, url, query, fragment)
+ _parse_cache[key] = v
+ return v
+@@ -216,6 +232,7 @@ def urlsplit(url, scheme='', allow_fragments=True):
+ url, fragment = url.split('#', 1)
+ if '?' in url:
+ url, query = url.split('?', 1)
++ _checknetloc(netloc)
+ v = SplitResult(scheme, netloc, url, query, fragment)
+ _parse_cache[key] = v
+ return v
+diff --git a/Misc/NEWS.d/next/Security/2019-03-06-09-38-40.bpo-36216.6q1m4a.rst b/Misc/NEWS.d/next/Security/2019-03-06-09-38-40.bpo-36216.6q1m4a.rst
+new file mode 100644
+index 000000000000..1e1ad92c6feb
+--- /dev/null
++++ b/Misc/NEWS.d/next/Security/2019-03-06-09-38-40.bpo-36216.6q1m4a.rst
+@@ -0,0 +1,3 @@
++Changes urlsplit() to raise ValueError when the URL contains characters that
++decompose under IDNA encoding (NFKC-normalization) into characters that
++affect how the URL is parsed.
+\ No newline at end of file
--- /dev/null
+From 06b5ee585d6e76bdbb4002f642d864d860cbbd2b Mon Sep 17 00:00:00 2001
+From: Steve Dower <steve.dower@python.org>
+Date: Tue, 12 Mar 2019 08:23:33 -0700
+Subject: [PATCH] bpo-36216: Only print test messages when verbose
+
+---
+ Lib/test/test_urlparse.py | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/Lib/test/test_urlparse.py b/Lib/test/test_urlparse.py
+index 73b0228ea8e3..1830d0b28688 100644
+--- a/Lib/test/test_urlparse.py
++++ b/Lib/test/test_urlparse.py
+@@ -644,7 +644,8 @@ def test_urlsplit_normalization(self):
+ for scheme in [u"http", u"https", u"ftp"]:
+ for c in denorm_chars:
+ url = u"{}://netloc{}false.netloc/path".format(scheme, c)
+- print "Checking %r" % url
++ if test_support.verbose:
++ print "Checking %r" % url
+ with self.assertRaises(ValueError):
+ urlparse.urlsplit(url)
+
--- /dev/null
+diff --git a/Lib/compileall.py b/Lib/compileall.py
+index 5cfa8bed3f..8716c9c0ca 100644
+--- a/Lib/compileall.py
++++ b/Lib/compileall.py
+@@ -152,10 +152,10 @@ def main():
+ """Script main program."""
+ import getopt
+ try:
+- opts, args = getopt.getopt(sys.argv[1:], 'lfqd:x:i:')
++ opts, args = getopt.getopt(sys.argv[1:], 'lr:fqd:x:i:')
+ except getopt.error, msg:
+ print msg
+- print "usage: python compileall.py [-l] [-f] [-q] [-d destdir] " \
++ print "usage: python compileall.py [-l] [-r recursion] [-f] [-q] [-d destdir] " \
+ "[-x regexp] [-i list] [directory|file ...]"
+ print
+ print "arguments: zero or more file and directory names to compile; " \
+@@ -164,6 +164,7 @@ def main():
+ print
+ print "options:"
+ print "-l: don't recurse into subdirectories"
++ print "-r recursion: control the maximum recursion level"
+ print "-f: force rebuild even if timestamps are up-to-date"
+ print "-q: output only error messages"
+ print "-d destdir: directory to prepend to file paths for use in " \
+@@ -187,6 +188,7 @@ def main():
+ flist = None
+ for o, a in opts:
+ if o == '-l': maxlevels = 0
++ if o == '-r': maxlevels = int(a)
+ if o == '-d': ddir = a
+ if o == '-f': force = 1
+ if o == '-q': quiet = 1
--- /dev/null
+From 8af9afdb2938f3d993eaea549c7bc5fbe75bb7e7 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
+Date: Tue, 7 May 2019 17:28:47 +0200
+Subject: [PATCH 1/2] bpo-30458: Disallow control chars in http URLs.
+ (GH-12755) (GH-13154)
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Disallow control chars in http URLs in urllib2.urlopen. This
+addresses a potential security problem for applications that do not
+sanity check their URLs where http request headers could be injected.
+
+Disable https related urllib tests on a build without ssl (GH-13032)
+These tests require an SSL enabled build. Skip these tests when
+python is built without SSL to fix test failures.
+
+Use httplib.InvalidURL instead of ValueError as the new error case's
+exception. (GH-13044)
+
+Backport Co-Authored-By: Miro Hrončok <miro@hroncok.cz>
+
+(cherry picked from commit 7e200e0763f5b71c199aaf98bd5588f291585619)
+
+Notes on backport to Python 2.7:
+
+* test_urllib tests urllib.urlopen() which quotes the URL and so is
+ not vulerable to HTTP Header Injection.
+* Add tests to test_urllib2 on urllib2.urlopen().
+* Reject non-ASCII characters: range 0x80-0xff.
+---
+ Lib/httplib.py | 16 +++++
+ Lib/test/test_urllib.py | 31 +++++++++
+ Lib/test/test_urllib2.py | 63 ++++++++++++++++---
+ Lib/test/test_xmlrpc.py | 8 ++-
+ .../2019-04-10-08-53-30.bpo-30458.51E-DA.rst | 1 +
+ 5 files changed, 111 insertions(+), 8 deletions(-)
+ create mode 100644 Misc/NEWS.d/next/Security/2019-04-10-08-53-30.bpo-30458.51E-DA.rst
+
+diff --git a/Lib/httplib.py b/Lib/httplib.py
+index 60a8fb4e355f..1b41c346e090 100644
+--- a/Lib/httplib.py
++++ b/Lib/httplib.py
+@@ -247,6 +247,16 @@
+ _is_legal_header_name = re.compile(r'\A[^:\s][^:\r\n]*\Z').match
+ _is_illegal_header_value = re.compile(r'\n(?![ \t])|\r(?![ \t\n])').search
+
++# These characters are not allowed within HTTP URL paths.
++# See https://tools.ietf.org/html/rfc3986#section-3.3 and the
++# https://tools.ietf.org/html/rfc3986#appendix-A pchar definition.
++# Prevents CVE-2019-9740. Includes control characters such as \r\n.
++# Restrict non-ASCII characters above \x7f (0x80-0xff).
++_contains_disallowed_url_pchar_re = re.compile('[\x00-\x20\x7f-\xff]')
++# Arguably only these _should_ allowed:
++# _is_allowed_url_pchars_re = re.compile(r"^[/!$&'()*+,;=:@%a-zA-Z0-9._~-]+$")
++# We are more lenient for assumed real world compatibility purposes.
++
+ # We always set the Content-Length header for these methods because some
+ # servers will otherwise respond with a 411
+ _METHODS_EXPECTING_BODY = {'PATCH', 'POST', 'PUT'}
+@@ -927,6 +937,12 @@ def putrequest(self, method, url, skip_host=0, skip_accept_encoding=0):
+ self._method = method
+ if not url:
+ url = '/'
++ # Prevent CVE-2019-9740.
++ match = _contains_disallowed_url_pchar_re.search(url)
++ if match:
++ raise InvalidURL("URL can't contain control characters. %r "
++ "(found at least %r)"
++ % (url, match.group()))
+ hdr = '%s %s %s' % (method, url, self._http_vsn_str)
+
+ self._output(hdr)
+diff --git a/Lib/test/test_urllib.py b/Lib/test/test_urllib.py
+index 1ce9201c0693..bdc6e78f8678 100644
+--- a/Lib/test/test_urllib.py
++++ b/Lib/test/test_urllib.py
+@@ -9,6 +9,10 @@
+ import sys
+ import mimetools
+ import tempfile
++try:
++ import ssl
++except ImportError:
++ ssl = None
+
+ from test import test_support
+ from base64 import b64encode
+@@ -257,6 +261,33 @@ def test_url_fragment(self):
+ finally:
+ self.unfakehttp()
+
++ @unittest.skipUnless(ssl, "ssl module required")
++ def test_url_with_control_char_rejected(self):
++ for char_no in range(0, 0x21) + range(0x7f, 0x100):
++ char = chr(char_no)
++ schemeless_url = "//localhost:7777/test%s/" % char
++ self.fakehttp(b"HTTP/1.1 200 OK\r\n\r\nHello.")
++ try:
++ # urllib quotes the URL so there is no injection.
++ resp = urllib.urlopen("http:" + schemeless_url)
++ self.assertNotIn(char, resp.geturl())
++ finally:
++ self.unfakehttp()
++
++ @unittest.skipUnless(ssl, "ssl module required")
++ def test_url_with_newline_header_injection_rejected(self):
++ self.fakehttp(b"HTTP/1.1 200 OK\r\n\r\nHello.")
++ host = "localhost:7777?a=1 HTTP/1.1\r\nX-injected: header\r\nTEST: 123"
++ schemeless_url = "//" + host + ":8080/test/?test=a"
++ try:
++ # urllib quotes the URL so there is no injection.
++ resp = urllib.urlopen("http:" + schemeless_url)
++ self.assertNotIn(' ', resp.geturl())
++ self.assertNotIn('\r', resp.geturl())
++ self.assertNotIn('\n', resp.geturl())
++ finally:
++ self.unfakehttp()
++
+ def test_read_bogus(self):
+ # urlopen() should raise IOError for many error codes.
+ self.fakehttp('''HTTP/1.1 401 Authentication Required
+diff --git a/Lib/test/test_urllib2.py b/Lib/test/test_urllib2.py
+index 6d24d5ddf83c..d13f86f68bae 100644
+--- a/Lib/test/test_urllib2.py
++++ b/Lib/test/test_urllib2.py
+@@ -1,5 +1,5 @@
+ import unittest
+-from test import test_support
++from test import support
+ from test import test_urllib
+
+ import os
+@@ -15,6 +15,9 @@
+ except ImportError:
+ ssl = None
+
++from test.test_urllib import FakeHTTPMixin
++
++
+ # XXX
+ # Request
+ # CacheFTPHandler (hard to write)
+@@ -683,7 +686,7 @@ def test_file(self):
+ h = urllib2.FileHandler()
+ o = h.parent = MockOpener()
+
+- TESTFN = test_support.TESTFN
++ TESTFN = support.TESTFN
+ urlpath = sanepathname2url(os.path.abspath(TESTFN))
+ towrite = "hello, world\n"
+ urls = [
+@@ -1154,7 +1157,7 @@ def test_basic_auth_with_unquoted_realm(self):
+ opener.add_handler(auth_handler)
+ opener.add_handler(http_handler)
+ msg = "Basic Auth Realm was unquoted"
+- with test_support.check_warnings((msg, UserWarning)):
++ with support.check_warnings((msg, UserWarning)):
+ self._test_basic_auth(opener, auth_handler, "Authorization",
+ realm, http_handler, password_manager,
+ "http://acme.example.com/protected",
+@@ -1262,7 +1265,7 @@ def _test_basic_auth(self, opener, auth_handler, auth_header,
+ self.assertEqual(len(http_handler.requests), 1)
+ self.assertFalse(http_handler.requests[0].has_header(auth_header))
+
+-class MiscTests(unittest.TestCase):
++class MiscTests(unittest.TestCase, FakeHTTPMixin):
+
+ def test_build_opener(self):
+ class MyHTTPHandler(urllib2.HTTPHandler): pass
+@@ -1317,6 +1320,52 @@ def test_unsupported_algorithm(self):
+ "Unsupported digest authentication algorithm 'invalid'"
+ )
+
++ @unittest.skipUnless(ssl, "ssl module required")
++ def test_url_with_control_char_rejected(self):
++ for char_no in range(0, 0x21) + range(0x7f, 0x100):
++ char = chr(char_no)
++ schemeless_url = "//localhost:7777/test%s/" % char
++ self.fakehttp(b"HTTP/1.1 200 OK\r\n\r\nHello.")
++ try:
++ # We explicitly test urllib.request.urlopen() instead of the top
++ # level 'def urlopen()' function defined in this... (quite ugly)
++ # test suite. They use different url opening codepaths. Plain
++ # urlopen uses FancyURLOpener which goes via a codepath that
++ # calls urllib.parse.quote() on the URL which makes all of the
++ # above attempts at injection within the url _path_ safe.
++ escaped_char_repr = repr(char).replace('\\', r'\\')
++ InvalidURL = httplib.InvalidURL
++ with self.assertRaisesRegexp(
++ InvalidURL, "contain control.*" + escaped_char_repr):
++ urllib2.urlopen("http:" + schemeless_url)
++ with self.assertRaisesRegexp(
++ InvalidURL, "contain control.*" + escaped_char_repr):
++ urllib2.urlopen("https:" + schemeless_url)
++ finally:
++ self.unfakehttp()
++
++ @unittest.skipUnless(ssl, "ssl module required")
++ def test_url_with_newline_header_injection_rejected(self):
++ self.fakehttp(b"HTTP/1.1 200 OK\r\n\r\nHello.")
++ host = "localhost:7777?a=1 HTTP/1.1\r\nX-injected: header\r\nTEST: 123"
++ schemeless_url = "//" + host + ":8080/test/?test=a"
++ try:
++ # We explicitly test urllib.request.urlopen() instead of the top
++ # level 'def urlopen()' function defined in this... (quite ugly)
++ # test suite. They use different url opening codepaths. Plain
++ # urlopen uses FancyURLOpener which goes via a codepath that
++ # calls urllib.parse.quote() on the URL which makes all of the
++ # above attempts at injection within the url _path_ safe.
++ InvalidURL = httplib.InvalidURL
++ with self.assertRaisesRegexp(
++ InvalidURL, r"contain control.*\\r.*(found at least . .)"):
++ urllib2.urlopen("http:" + schemeless_url)
++ with self.assertRaisesRegexp(InvalidURL, r"contain control.*\\n"):
++ urllib2.urlopen("https:" + schemeless_url)
++ finally:
++ self.unfakehttp()
++
++
+
+ class RequestTests(unittest.TestCase):
+
+@@ -1412,14 +1461,14 @@ def test_HTTPError_interface_call(self):
+
+ def test_main(verbose=None):
+ from test import test_urllib2
+- test_support.run_doctest(test_urllib2, verbose)
+- test_support.run_doctest(urllib2, verbose)
++ support.run_doctest(test_urllib2, verbose)
++ support.run_doctest(urllib2, verbose)
+ tests = (TrivialTests,
+ OpenerDirectorTests,
+ HandlerTests,
+ MiscTests,
+ RequestTests)
+- test_support.run_unittest(*tests)
++ support.run_unittest(*tests)
+
+ if __name__ == "__main__":
+ test_main(verbose=True)
+diff --git a/Lib/test/test_xmlrpc.py b/Lib/test/test_xmlrpc.py
+index 36b3be67fd6b..90ccb30716ff 100644
+--- a/Lib/test/test_xmlrpc.py
++++ b/Lib/test/test_xmlrpc.py
+@@ -659,7 +659,13 @@ def test_dotted_attribute(self):
+ def test_partial_post(self):
+ # Check that a partial POST doesn't make the server loop: issue #14001.
+ conn = httplib.HTTPConnection(ADDR, PORT)
+- conn.request('POST', '/RPC2 HTTP/1.0\r\nContent-Length: 100\r\n\r\nbye')
++ conn.send('POST /RPC2 HTTP/1.0\r\n'
++ 'Content-Length: 100\r\n\r\n'
++ 'bye HTTP/1.1\r\n'
++ 'Host: %s:%s\r\n'
++ 'Accept-Encoding: identity\r\n'
++ 'Content-Length: 0\r\n\r\n'
++ % (ADDR, PORT))
+ conn.close()
+
+ class SimpleServerEncodingTestCase(BaseServerTestCase):
+diff --git a/Misc/NEWS.d/next/Security/2019-04-10-08-53-30.bpo-30458.51E-DA.rst b/Misc/NEWS.d/next/Security/2019-04-10-08-53-30.bpo-30458.51E-DA.rst
+new file mode 100644
+index 000000000000..47cb899df1af
+--- /dev/null
++++ b/Misc/NEWS.d/next/Security/2019-04-10-08-53-30.bpo-30458.51E-DA.rst
+@@ -0,0 +1 @@
++Address CVE-2019-9740 by disallowing URL paths with embedded whitespace or control characters through into the underlying http client request. Such potentially malicious header injection URLs now cause an httplib.InvalidURL exception to be raised.
+
+From 9f8ae2a2e4b836fe3136e84e55b8de62cb40904f Mon Sep 17 00:00:00 2001
+From: Victor Stinner <vstinner@redhat.com>
+Date: Mon, 20 May 2019 16:53:15 +0200
+Subject: [PATCH 2/2] Address Gregory's comments
+
+---
+ Lib/test/test_urllib.py | 6 ------
+ Lib/test/test_urllib2.py | 14 +++++++-------
+ 2 files changed, 7 insertions(+), 13 deletions(-)
+
+diff --git a/Lib/test/test_urllib.py b/Lib/test/test_urllib.py
+index bdc6e78f8678..d7778d4194f3 100644
+--- a/Lib/test/test_urllib.py
++++ b/Lib/test/test_urllib.py
+@@ -9,10 +9,6 @@
+ import sys
+ import mimetools
+ import tempfile
+-try:
+- import ssl
+-except ImportError:
+- ssl = None
+
+ from test import test_support
+ from base64 import b64encode
+@@ -261,7 +257,6 @@ def test_url_fragment(self):
+ finally:
+ self.unfakehttp()
+
+- @unittest.skipUnless(ssl, "ssl module required")
+ def test_url_with_control_char_rejected(self):
+ for char_no in range(0, 0x21) + range(0x7f, 0x100):
+ char = chr(char_no)
+@@ -274,7 +269,6 @@ def test_url_with_control_char_rejected(self):
+ finally:
+ self.unfakehttp()
+
+- @unittest.skipUnless(ssl, "ssl module required")
+ def test_url_with_newline_header_injection_rejected(self):
+ self.fakehttp(b"HTTP/1.1 200 OK\r\n\r\nHello.")
+ host = "localhost:7777?a=1 HTTP/1.1\r\nX-injected: header\r\nTEST: 123"
+diff --git a/Lib/test/test_urllib2.py b/Lib/test/test_urllib2.py
+index d13f86f68bae..9531818e16b2 100644
+--- a/Lib/test/test_urllib2.py
++++ b/Lib/test/test_urllib2.py
+@@ -1,5 +1,5 @@
+ import unittest
+-from test import support
++from test import test_support
+ from test import test_urllib
+
+ import os
+@@ -686,7 +686,7 @@ def test_file(self):
+ h = urllib2.FileHandler()
+ o = h.parent = MockOpener()
+
+- TESTFN = support.TESTFN
++ TESTFN = test_support.TESTFN
+ urlpath = sanepathname2url(os.path.abspath(TESTFN))
+ towrite = "hello, world\n"
+ urls = [
+@@ -1157,7 +1157,7 @@ def test_basic_auth_with_unquoted_realm(self):
+ opener.add_handler(auth_handler)
+ opener.add_handler(http_handler)
+ msg = "Basic Auth Realm was unquoted"
+- with support.check_warnings((msg, UserWarning)):
++ with test_support.check_warnings((msg, UserWarning)):
+ self._test_basic_auth(opener, auth_handler, "Authorization",
+ realm, http_handler, password_manager,
+ "http://acme.example.com/protected",
+@@ -1350,7 +1350,7 @@ def test_url_with_newline_header_injection_rejected(self):
+ host = "localhost:7777?a=1 HTTP/1.1\r\nX-injected: header\r\nTEST: 123"
+ schemeless_url = "//" + host + ":8080/test/?test=a"
+ try:
+- # We explicitly test urllib.request.urlopen() instead of the top
++ # We explicitly test urllib2.urlopen() instead of the top
+ # level 'def urlopen()' function defined in this... (quite ugly)
+ # test suite. They use different url opening codepaths. Plain
+ # urlopen uses FancyURLOpener which goes via a codepath that
+@@ -1461,14 +1461,14 @@ def test_HTTPError_interface_call(self):
+
+ def test_main(verbose=None):
+ from test import test_urllib2
+- support.run_doctest(test_urllib2, verbose)
+- support.run_doctest(urllib2, verbose)
++ test_support.run_doctest(test_urllib2, verbose)
++ test_support.run_doctest(urllib2, verbose)
+ tests = (TrivialTests,
+ OpenerDirectorTests,
+ HandlerTests,
+ MiscTests,
+ RequestTests)
+- support.run_unittest(*tests)
++ test_support.run_unittest(*tests)
+
+ if __name__ == "__main__":
+ test_main(verbose=True)
--- /dev/null
+From 8f99cc799e4393bf1112b9395b2342f81b3f45ef Mon Sep 17 00:00:00 2001
+From: push0ebp <push0ebp@shl-MacBook-Pro.local>
+Date: Thu, 14 Feb 2019 02:05:46 +0900
+Subject: [PATCH 1/6] bpo-35907: Avoid file reading as disallowing the
+ unnecessary URL scheme in urllib
+
+---
+ Lib/test/test_urllib.py | 12 ++++++++++++
+ Lib/urllib.py | 5 ++++-
+ 2 files changed, 16 insertions(+), 1 deletion(-)
+
+diff --git a/Lib/test/test_urllib.py b/Lib/test/test_urllib.py
+index 1ce9201c0693..e5f210e62a18 100644
+--- a/Lib/test/test_urllib.py
++++ b/Lib/test/test_urllib.py
+@@ -1023,6 +1023,18 @@ def open_spam(self, url):
+ "spam://c:|windows%/:=&?~#+!$,;'@()*[]|/path/"),
+ "//c:|windows%/:=&?~#+!$,;'@()*[]|/path/")
+
++ def test_local_file_open(self):
++ class DummyURLopener(urllib.URLopener):
++ def open_local_file(self, url):
++ return url
++ self.assertEqual(DummyURLopener().open(
++ 'local-file://example'), '//example')
++ self.assertEqual(DummyURLopener().open(
++ 'local_file://example'), '//example')
++ self.assertRaises(IOError, urllib.urlopen,
++ 'local-file://example')
++ self.assertRaises(IOError, urllib.urlopen,
++ 'local_file://example')
+
+ # Just commented them out.
+ # Can't really tell why keep failing in windows and sparc.
+diff --git a/Lib/urllib.py b/Lib/urllib.py
+index d85504a5cb7e..a24e9a5c68fb 100644
+--- a/Lib/urllib.py
++++ b/Lib/urllib.py
+@@ -203,7 +203,10 @@ def open(self, fullurl, data=None):
+ name = 'open_' + urltype
+ self.type = urltype
+ name = name.replace('-', '_')
+- if not hasattr(self, name):
++
++ # bpo-35907: # disallow the file reading with the type not allowed
++ if not hasattr(self, name) or \
++ (self == _urlopener and name == 'open_local_file'):
+ if proxy:
+ return self.open_unknown_proxy(proxy, fullurl, data)
+ else:
+
+From b86392511acd4cd30dc68711fa22f9f93228715a Mon Sep 17 00:00:00 2001
+From: "blurb-it[bot]" <blurb-it[bot]@users.noreply.github.com>
+Date: Wed, 13 Feb 2019 17:21:11 +0000
+Subject: [PATCH 2/6] =?UTF-8?q?=F0=9F=93=9C=F0=9F=A4=96=20Added=20by=20blu?=
+ =?UTF-8?q?rb=5Fit.?=
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+---
+ .../NEWS.d/next/Library/2019-02-13-17-21-10.bpo-35907.ckk2zg.rst | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 Misc/NEWS.d/next/Library/2019-02-13-17-21-10.bpo-35907.ckk2zg.rst
+
+diff --git a/Misc/NEWS.d/next/Library/2019-02-13-17-21-10.bpo-35907.ckk2zg.rst b/Misc/NEWS.d/next/Library/2019-02-13-17-21-10.bpo-35907.ckk2zg.rst
+new file mode 100644
+index 000000000000..8118a5f40583
+--- /dev/null
++++ b/Misc/NEWS.d/next/Library/2019-02-13-17-21-10.bpo-35907.ckk2zg.rst
+@@ -0,0 +1 @@
++Avoid file reading as disallowing the unnecessary URL scheme in urllib.urlopen
+\ No newline at end of file
+
+From f20a31c7364fecdd3197e0180a5857e23aa15065 Mon Sep 17 00:00:00 2001
+From: SH <push0ebp@gmail.com>
+Date: Fri, 17 May 2019 02:31:18 +0900
+Subject: [PATCH 3/6] Update 2019-02-13-17-21-10.bpo-35907.ckk2zg.rst
+
+Add prefix "CVE-2019-9948: "
+---
+ .../next/Library/2019-02-13-17-21-10.bpo-35907.ckk2zg.rst | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Misc/NEWS.d/next/Library/2019-02-13-17-21-10.bpo-35907.ckk2zg.rst b/Misc/NEWS.d/next/Library/2019-02-13-17-21-10.bpo-35907.ckk2zg.rst
+index 8118a5f40583..bb187d8d65a5 100644
+--- a/Misc/NEWS.d/next/Library/2019-02-13-17-21-10.bpo-35907.ckk2zg.rst
++++ b/Misc/NEWS.d/next/Library/2019-02-13-17-21-10.bpo-35907.ckk2zg.rst
+@@ -1 +1 @@
+-Avoid file reading as disallowing the unnecessary URL scheme in urllib.urlopen
+\ No newline at end of file
++CVE-2019-9948: Avoid file reading as disallowing the unnecessary URL scheme in urllib.urlopen
+
+From 179a5f75f1121dab271fe8f90eb35145f9dcbbda Mon Sep 17 00:00:00 2001
+From: Sihoon Lee <push0ebp@gmail.com>
+Date: Fri, 17 May 2019 02:41:06 +0900
+Subject: [PATCH 4/6] Update test_urllib.py and urllib.py\nchange assertEqual
+ into assertRasies in DummyURLopener test, and simplify mitigation
+
+---
+ Lib/test/test_urllib.py | 11 +++--------
+ Lib/urllib.py | 4 ++--
+ 2 files changed, 5 insertions(+), 10 deletions(-)
+
+diff --git a/Lib/test/test_urllib.py b/Lib/test/test_urllib.py
+index e5f210e62a18..1e23dfb0bb16 100644
+--- a/Lib/test/test_urllib.py
++++ b/Lib/test/test_urllib.py
+@@ -1027,14 +1027,9 @@ def test_local_file_open(self):
+ class DummyURLopener(urllib.URLopener):
+ def open_local_file(self, url):
+ return url
+- self.assertEqual(DummyURLopener().open(
+- 'local-file://example'), '//example')
+- self.assertEqual(DummyURLopener().open(
+- 'local_file://example'), '//example')
+- self.assertRaises(IOError, urllib.urlopen,
+- 'local-file://example')
+- self.assertRaises(IOError, urllib.urlopen,
+- 'local_file://example')
++ for url in ('local_file://example', 'local-file://example'):
++ self.assertRaises(IOError, DummyURLopener().open, url)
++ self.assertRaises(IOError, urllib.urlopen, url)
+
+ # Just commented them out.
+ # Can't really tell why keep failing in windows and sparc.
+diff --git a/Lib/urllib.py b/Lib/urllib.py
+index a24e9a5c68fb..39b834054e9e 100644
+--- a/Lib/urllib.py
++++ b/Lib/urllib.py
+@@ -203,10 +203,10 @@ def open(self, fullurl, data=None):
+ name = 'open_' + urltype
+ self.type = urltype
+ name = name.replace('-', '_')
+-
++
+ # bpo-35907: # disallow the file reading with the type not allowed
+ if not hasattr(self, name) or \
+- (self == _urlopener and name == 'open_local_file'):
++ getattr(self, name) == self.open_local_file:
+ if proxy:
+ return self.open_unknown_proxy(proxy, fullurl, data)
+ else:
+
+From 3cda03c00109f9c1ae0df1760ecd60915cef105e Mon Sep 17 00:00:00 2001
+From: SH <push0ebp@gmail.com>
+Date: Tue, 21 May 2019 22:21:15 +0900
+Subject: [PATCH 5/6] Update urllib.py
+
+Modify the object to string in check method name.
+---
+ Lib/urllib.py | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/Lib/urllib.py b/Lib/urllib.py
+index 39b834054e9e..0bf5f4d5a21b 100644
+--- a/Lib/urllib.py
++++ b/Lib/urllib.py
+@@ -205,8 +205,7 @@ def open(self, fullurl, data=None):
+ name = name.replace('-', '_')
+
+ # bpo-35907: # disallow the file reading with the type not allowed
+- if not hasattr(self, name) or \
+- getattr(self, name) == self.open_local_file:
++ if not hasattr(self, name) or name == 'open_local_file':
+ if proxy:
+ return self.open_unknown_proxy(proxy, fullurl, data)
+ else:
+
+From 8b7d7abff8c633e29a8f10bbf9cc7d9e656b0eec Mon Sep 17 00:00:00 2001
+From: SH <push0ebp@gmail.com>
+Date: Wed, 22 May 2019 03:48:56 +0900
+Subject: [PATCH 6/6] Update urllib.py
+
+Fix typo
+---
+ Lib/urllib.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Lib/urllib.py b/Lib/urllib.py
+index 0bf5f4d5a21b..156879dd0a14 100644
+--- a/Lib/urllib.py
++++ b/Lib/urllib.py
+@@ -204,7 +204,7 @@ def open(self, fullurl, data=None):
+ self.type = urltype
+ name = name.replace('-', '_')
+
+- # bpo-35907: # disallow the file reading with the type not allowed
++ # bpo-35907: disallow the file reading with the type not allowed
+ if not hasattr(self, name) or name == 'open_local_file':
+ if proxy:
+ return self.open_unknown_proxy(proxy, fullurl, data)
include $(TOPDIR)/rules.mk
PKG_NAME:=python3-bottle
-PKG_VERSION:=0.12.13
+PKG_VERSION:=0.12.17
PKG_RELEASE:=1
-PKG_LICENSE:=MIT
-PKG_MAINTAINER:=Luka Perkov <luka@openwrt.org>
-
PKG_SOURCE:=bottle-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/b/bottle
-PKG_HASH:=39b751aee0b167be8dffb63ca81b735bbf1dd0905b3bc42761efedee8f123355
+PKG_HASH:=e9eaa412a60cc3d42ceb42f58d15864d9ed1b92e9d630b8130c871c5bb16107c
PKG_BUILD_DIR:=$(BUILD_DIR)/bottle-$(PKG_VERSION)
-PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+PKG_CPE_ID:=cpe:/a:bottlepy:bottle
include $(INCLUDE_DIR)/package.mk
include ../python3-package.mk
SECTION:=lang
CATEGORY:=Languages
SUBMENU:=Python
- TITLE:=Bottle is a fast, simple and lightweight WSGI micro web-framework for Python
+ TITLE:=Fast and simple WSGI-framework for small web-applications
URL:=https://bottlepy.org
DEPENDS:=+python3
+ VARIANT:=python3
endef
define Package/python3-bottle/description
Python Standard Library.
endef
-define Build/Configure
-endef
-
-define Build/Compile
-endef
-
-define Package/python3-bottle/install
- $(INSTALL_DIR) $(1)$(PYTHON3_PKG_DIR)
- $(CP) $(PKG_BUILD_DIR)/bottle.py $(1)$(PYTHON3_PKG_DIR)
-endef
-
+$(eval $(call Py3Package,python3-bottle))
$(eval $(call BuildPackage,python3-bottle))
+$(eval $(call BuildPackage,python3-bottle-src))
--- /dev/null
+#
+# Copyright (C) 2019 CZ.NIC z.s.p.o. (http://www.nic.cz/)
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=Flask-Login
+PKG_VERSION:=0.4.1
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/f/flask-login/
+PKG_HASH:=c815c1ac7b3e35e2081685e389a665f2c74d7e077cb93cecabaea352da4752ec
+
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-flask-login
+ SECTION:=lang
+ CATEGORY:=Languages
+ SUBMENU:=Python
+ TITLE:=User session management plugin for Flask
+ URL:=https://github.com/maxcountryman/flask-login
+ DEPENDS:=+python3-light +python3-flask
+ VARIANT:=python3
+endef
+
+define Package/python3-flask-login/description
+ Flask-Login provides user session management for Flask.
+ It handles the common tasks of logging in, logging out,
+ and remembering your users’ sessions over extended periods of time.
+endef
+
+$(eval $(call Py3Package,python3-flask-login))
+$(eval $(call BuildPackage,python3-flask-login))
+$(eval $(call BuildPackage,python3-flask-login-src))
# Note: I shamelessly copied this from Yousong's logic (from python-packages);
HOST_PYTHON3_PIP:=$(STAGING_DIR_HOSTPKG)/bin/pip$(PYTHON3_VERSION)
-define host_python3_pip_install
- $(call host_python3_settings) \
- $(HOST_PYTHON3_PIP) install \
- --root=$(1) \
- --prefix=$(2) \
- $(3)
-endef
-define host_python3_pip_install_host
-$(call host_python3_pip_install,$(STAGING_DIR_HOSTPKG),"",$(1))
+# $(1) => packages to install
+define Build/Compile/HostPy3PipInstall
+ $(call host_python3_settings) \
+ $(HOST_PYTHON3_PIP) \
+ --disable-pip-version-check \
+ --cache-dir "$(DL_DIR)/pip-cache" \
+ install \
+ $(1)
endef
# $(1) => build subdir
--- /dev/null
+#
+# Copyright (C) 2019 CZ.NIC z.s.p.o. (http://www.nic.cz/)
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=maxminddb
+PKG_VERSION:=1.4.1
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/m/maxminddb/
+PKG_HASH:=df1451bcd848199905ac0de4631b3d02d6a655ad28ba5e5a4ca29a23358db712
+
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=LICENSE
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-maxminddb
+ SECTION:=lang
+ CATEGORY:=Languages
+ SUBMENU:=Python
+ TITLE:=Reader for the MaxMind DB format
+ URL:=https://dev.maxmind.com/
+ DEPENDS:=+python3-light +libmaxminddb
+ VARIANT:=python3
+endef
+
+define Package/python3-maxminddb/description
+ Module for reading MaxMind DB files
+endef
+
+$(eval $(call Py3Package,python3-maxminddb))
+$(eval $(call BuildPackage,python3-maxminddb))
+$(eval $(call BuildPackage,python3-maxminddb-src))
--- /dev/null
+#
+# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/)
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python3-netifaces
+PKG_VERSION:=0.10.9
+PKG_RELEASE:=1
+
+PKG_SOURCE:=netifaces-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/n/netifaces/
+PKG_HASH:=2dee9ffdd16292878336a58d04a20f0ffe95555465fee7c9bd23b3490ef2abf3
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/netifaces-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Josef Schlehofer <pepe.schlehofer@gmail.com>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-netifaces
+ SECTION:=lang
+ CATEGORY:=Languages
+ SUBMENU:=Python
+ TITLE:=Portable network interface information
+ URL:=https://github.com/al45tair/netifaces
+ DEPENDS:=+python3-light
+ VARIANT:=python3
+endef
+
+define Package/python3-netifaces/description
+ Portable network interface information.
+endef
+
+$(eval $(call Py3Package,$(PKG_NAME)))
+$(eval $(call BuildPackage,$(PKG_NAME)))
+$(eval $(call BuildPackage,$(PKG_NAME)-src))
define Package/$(1)-src
$(call Package/$(1))
DEPENDS:=
+ CONFLICTS:=
+ PROVIDES:=
+ EXTRA_DEPENDS:=
TITLE+= (sources)
+ USERID:=
endef
define Package/$(1)-src/description
$(call shexport,Py3Package/$(1)/filespec)
define Package/$(1)/install
- $(call Py3Package/$(1)/install,$$(1))
- find $(PKG_INSTALL_DIR) -name "*\.exe" | xargs rm -f
+ $$(call Py3Package/$(1)/install,$$(1))
+ SED="$(SED)" \
$(SHELL) $(python3_mk_path)python-package-install.sh "3" \
"$(PKG_INSTALL_DIR)" "$$(1)" \
"$(HOST_PYTHON3_BIN)" "$$(2)" \
cd $(PKG_BUILD_DIR)/$(strip $(1)), \
./setup.py $(2), \
$(3))
- find $(PKG_INSTALL_DIR) -name "*\.exe" | xargs rm -f
endef
-PYTHON3_PKG_SETUP_ARGS:=--single-version-externally-managed
-PYTHON3_PKG_SETUP_VARS:=
+PYTHON3_PKG_SETUP_DIR ?=
+PYTHON3_PKG_SETUP_GLOABL_ARGS ?=
+PYTHON3_PKG_SETUP_ARGS ?= --single-version-externally-managed
+PYTHON3_PKG_SETUP_VARS ?=
define Py3Build/Compile/Default
- $(foreach pkg,$(HOST_PYTHON3_PACKAGE_BUILD_DEPENDS),
- $(call host_python3_pip_install_host,$(pkg))
+ $(if $(HOST_PYTHON3_PACKAGE_BUILD_DEPENDS),
+ $(call Build/Compile/HostPy3PipInstall,$(HOST_PYTHON3_PACKAGE_BUILD_DEPENDS))
)
- $(call Build/Compile/Py3Mod,, \
+ $(call Build/Compile/Py3Mod, \
+ $(PYTHON3_PKG_SETUP_DIR), \
+ $(PYTHON3_PKG_SETUP_GLOBAL_ARGS) \
install --prefix="/usr" --root="$(PKG_INSTALL_DIR)" \
$(PYTHON3_PKG_SETUP_ARGS), \
$(PYTHON3_PKG_SETUP_VARS) \
--- /dev/null
+#
+# Copyright (C) 2019 Yousong Zhou <yszhou4tech@gmail.com>
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python3-packages
+PKG_VERSION:=1.0
+PKG_RELEASE:=1
+
+PKG_MAINTAINER:=Yousong Zhou <yszhou4tech@gmail.com>
+
+#
+# NOTE: move the host module installation to Host/Compile when
+# HOST_CONFIG_DEPENDS is supported
+#
+# NOTE: PKG_CONFIG_DEPENDS cannot correctly track changes of string type config
+# options, so you may want to do manual cleanup on config change.
+#
+PKG_CONFIG_DEPENDS:= \
+ CONFIG_PACKAGE_python3-packages-list-host \
+ CONFIG_PACKAGE_python3-packages-list \
+ CONFIG_PACKAGE_python3-packages-list-cleanup \
+ CONFIG_PACKAGE_python3-packages-envs \
+ CONFIG_PACKAGE_python3-packages-extra-deps \
+ CONFIG_PACKAGE_python3-packages-index-url \
+ CONFIG_PACKAGE_python3-packages-pip-opts \
+
+PKG_BUILD_DEPENDS:=python3 python3/host
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-host.mk
+include ../python3-package.mk
+
+define Package/python3-packages
+ SUBMENU:=Python
+ SECTION:=lang
+ CATEGORY:=Languages
+ TITLE:=A dummy package for packaging python3 modules with pip
+ DEPENDS:=@DEVEL +python3
+endef
+
+define Package/python3-packages/config
+if PACKAGE_python3-packages
+config PACKAGE_python3-packages-list-host
+ string "List of python3 packages to install on host"
+config PACKAGE_python3-packages-list
+ string "List of python3 packages to install on target"
+config PACKAGE_python3-packages-list-cleanup
+ string "List of python3 packages to cleanup to avoid clash with existing packages"
+config PACKAGE_python3-packages-envs
+ string "Extra environment variables to pass on to pip and its children on target build"
+config PACKAGE_python3-packages-extra-deps
+ string "List of deps fulfilled but not tracked by the build system"
+config PACKAGE_python3-packages-index-url
+ string "Index URL passed to pip with --index-url"
+config PACKAGE_python3-packages-pip-opts
+ string "Additional arguments to pip command line"
+endif
+endef
+
+CONFIG_PACKAGE_python3-packages-list-host:=$(call qstrip,$(CONFIG_PACKAGE_python3-packages-list-host))
+CONFIG_PACKAGE_python3-packages-list:=$(call qstrip,$(CONFIG_PACKAGE_python3-packages-list))
+CONFIG_PACKAGE_python3-packages-list-cleanup:=$(call qstrip,$(CONFIG_PACKAGE_python3-packages-list-cleanup))
+CONFIG_PACKAGE_python3-packages-envs:=$(call qstrip,$(CONFIG_PACKAGE_python3-packages-envs))
+CONFIG_PACKAGE_python3-packages-extra-deps:=$(call qstrip,$(CONFIG_PACKAGE_python3-packages-extra-deps))
+CONFIG_PACKAGE_python3-packages-index-url:=$(call qstrip,$(CONFIG_PACKAGE_python3-packages-index-url))
+CONFIG_PACKAGE_python3-packages-pip-opts:=$(call qstrip,$(CONFIG_PACKAGE_python3-packages-pip-opts))
+
+decr=$(word $(1),0 1 2 3 4 5 6 7 8 9 10)
+recur=$(if $(subst 0,,$(2)),$(call recur,$(1),$(call decr,$(2)),$(call $(1)$(2),$(3))),$(3))
+_req2dir1=$(subst >,gt,$(1))
+_req2dir2=$(subst <,lt,$(1))
+_req2dir3=$(subst >=,geq,$(1))
+_req2dir4=$(subst <=,leq,$(1))
+_req2dir5=$(subst ://,:::,$(1))
+_req2dir6=$(subst *,_,$(1))
+_req2dir7=$(subst ?,_,$(1))
+req2dir=$(call recur,_req2dir,7,$(1))
+
+# --ignore-installed, it may happen that host pip will ignore target install if
+# it was already installed as host module, e.g. cffi deps of cryptograph
+#
+# --no-build-isolation, this is a new addition in pip3 and is needed when build
+# depends on host modules
+HOST_PYTHON3_PIP_INSTALL=$(HOST_PYTHON3_PIP) install \
+ --root=$(1) \
+ --prefix=$(2) \
+ --ignore-installed \
+ --no-build-isolation \
+ --no-compile \
+ $(if $(CONFIG_PACKAGE_python3-packages-index-url), --index-url "$(CONFIG_PACKAGE_python3-packages-index-url)") \
+ $(if $(CONFIG_PACKAGE_python3-packages-pip-opts), $(CONFIG_PACKAGE_python3-packages-pip-opts)) \
+
+HOST_PYTHON3_PIP_INSTALL_HOST:=$(call HOST_PYTHON3_PIP_INSTALL,$(STAGING_DIR_HOSTPKG),"")
+HOST_PYTHON3_PIP_INSTALL_TARGET=$(call HOST_PYTHON3_PIP_INSTALL,$(PKG_INSTALL_DIR)/$(call req2dir,$(pkg)),/usr)
+HOST_PYTHON3_PIP_INSTALL_CLEANUP:=$(call HOST_PYTHON3_PIP_INSTALL,$(PKG_INSTALL_DIR)/_cleanup,/usr)
+
+define Build/Compile
+ $(foreach pkg,$(CONFIG_PACKAGE_python3-packages-list-host),
+ $(call Build/Compile/HostPy3RunHost,,$(HOST_PYTHON3_PIP_INSTALL_HOST) $(pkg))
+ )
+ $(foreach pkg,$(CONFIG_PACKAGE_python3-packages-list),
+ $(call Build/Compile/HostPy3RunTarget,,$(call HOST_PYTHON3_PIP_INSTALL_TARGET,$(pkg)) $(pkg),$(CONFIG_PACKAGE_python3-packages-envs))
+ )
+ $(foreach pkg,$(CONFIG_PACKAGE_python3-packages-list-cleanup),
+ $(call Build/Compile/HostPy3RunTarget,,$(HOST_PYTHON3_PIP_INSTALL_CLEANUP) $(pkg),$(CONFIG_PACKAGE_python3-packages-envs))
+ )
+endef
+
+define Package/python3-packages/install
+ $(foreach pkg,$(CONFIG_PACKAGE_python3-packages-list),
+ $(CP) "$(PKG_INSTALL_DIR)/$(call req2dir,$(pkg))"/* $(1)
+ )
+
+ find "$(PKG_INSTALL_DIR)/_cleanup" -mindepth 1 -depth | while read sf; do \
+ tf="$$$${sf#$(PKG_INSTALL_DIR)/_cleanup/}"; \
+ tf="$(1)/$$$$tf"; \
+ if [ -f "$$$$tf" -o -L "$$$$tf" ]; then \
+ rm -vf "$$$$tf"; \
+ elif [ -d "$$$$tf" ]; then \
+ rmdir -v -p "$$$$tf" || true; \
+ fi \
+ done
+endef
+
+define Package/python3-packages/extra_provides
+ echo $(CONFIG_PACKAGE_python3-packages-extra-deps) | tr ' ' '\n'
+endef
+
+$(eval $(call BuildPackage,python3-packages))
--- /dev/null
+This package allows users to package python3 modules without creating package
+Makefiles for each individual module and their dependencies. It provides a
+way making packaging python3 packages faster and may also facilitate the process
+of developing Makefiles for new python3 packages
+
+This is a raw DEVEL only package. Using it may entails a lot of implementation
+details and you may need to resolve target dependencies and package details on
+your own
+
+- Third party python3 packages may depend on features not included in e.g.
+ python3-light
+- Some python3 modules may require host install of another module to progress,
+ e.g. target cryptography requires host cffi
+- Some python3 modules have external C library dependencies, e.g. pyOpenSSL
+ requires openssl libs
+- Some packages may have an autoconf configure script whose arguments we
+ cannot control with pip and has to be passed on (hacked) by overriding some
+ environment variables
+
+## How it works
+
+1. Install host modules required for building target modules
+2. Install each target module to separate directories
+3. Install another copy of modules for cleanup purposes to make list of
+ installed files to be removed from target modules installed in step 2
+
+Why should it be so
+
+1. Installing target cryptography requires host installation of cffi module
+2. cryptography requires setuptools and pip will install its own copy with
+ --ignore-installed. When PACKAGE_python3-setuptools is also selected, opkg
+ will complain of data file clashes if it was not removed here.
+
+Pip will handle dependency requirements of python3 modules, but external
+dependencies like c libraries has to be prepared by the build system. The
+issue is that there is currently no way to express such dependencies, thus may
+cause build failure, e.g. pycrypto requires the presence of libgmp to build
+successfully.
+
+## Tips
+
+If something goes wrong, we can add additional arguments to pip command
+line to check the detailed build process. Some useful arguments may be
+
+- -v, for verbose output. Repeat this option if the current level of
+ verbosity is not enough
+- --no-clean, for preserving pip build dir on build failure
+
+## Examples
+
+tornado (python-only module)
+
+ CONFIG_PACKAGE_python3-packages=y
+ CONFIG_PACKAGE_python3-packages-list="tornado==6.0.2"
+
+cryptography (requires installation of host modules and cleanup on target modules)
+
+ CONFIG_PACKAGE_python3-packages=y
+ CONFIG_PACKAGE_python3-packages-list-host="cffi"
+ CONFIG_PACKAGE_python3-packages-list="cryptography"
+ CONFIG_PACKAGE_python3-packages-list-cleanup="setuptools"
+
+pycrypto 2.7a1 (python module with autoconf configure script; depends on
+libgmp; broken wmmintrin.h). 2.6.1 does not work because of a flaw in
+the setup.py hardcoding host include directory
+
+ CONFIG_PACKAGE_libgmp=y
+ CONFIG_PACKAGE_python3-packages=y
+ CONFIG_PACKAGE_python3-packages-list="https://github.com/dlitz/pycrypto/archive/v2.7a1.tar.gz"
+ CONFIG_PACKAGE_python3-packages-envs="ac_cv_header_wmmintrin_h=no build_alias=$(GNU_HOST_NAME) host_alias=$(GNU_TARGET_NAME) target_alias=$(GNU_TARGET_NAME)"
+ CONFIG_PACKAGE_python3-packages-extra-deps="libgmp.so.10"
+
--- /dev/null
+#
+# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/)
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python3-pyroute2
+PKG_VERSION:=0.5.6
+PKG_RELEASE:=1
+
+PKG_SOURCE:=pyroute2-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/pyroute2
+PKG_HASH:=deae0e6191a04c3ee213c6fae6ed779602ef5da5ca5e2fa533f27bc04326bfbe
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/pyroute2-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Martin Matějek <martin.matejek@nic.cz>
+PKG_LICENSE:=GPL-2.0-or-later Apache-2.0
+PKG_LICENSE_FILES:=LICENSE.GPL.v2 LICENSE.Apache.v2
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-pyroute2
+ SUBMENU:=Python
+ SECTION:=lang
+ CATEGORY:=Languages
+ TITLE:=Python netlink library
+ URL:=https://github.com/svinota/pyroute2
+ DEPENDS:= \
+ +python3-light \
+ +python3-distutils \
+ +python3-logging \
+ +python3-multiprocessing \
+ +python3-sqlite3 \
+ +python3-ctypes
+ VARIANT:=python3
+endef
+
+define Package/python3-pyroute2/description
+ Pyroute2 is a pure Python netlink library.
+ The library was started as an RTNL protocol implementation,
+ but now it supports many netlink protocols.
+endef
+
+PYTHON3_PKG_SETUP_ARGS:=
+
+$(eval $(call Py3Package,$(PKG_NAME)))
+$(eval $(call BuildPackage,$(PKG_NAME)))
+$(eval $(call BuildPackage,$(PKG_NAME)-src))
--- /dev/null
+#
+# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/)
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python3-unidecode
+PKG_VERSION:=1.1.1
+PKG_RELEASE:=1
+
+PKG_SOURCE:=Unidecode-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/u/unidecode/
+PKG_HASH:=2b6aab710c2a1647e928e36d69c21e76b453cd455f4e2621000e54b2a9b8cce8
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/Unidecode-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>
+PKG_LICENSE:=GPL-2.0-or-later
+PKG_LICENSE_FILES:=LICENSE
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-unidecode
+ SECTION:=lang
+ CATEGORY:=Languages
+ SUBMENU:=Python
+ TITLE:=ASCII transliterations of Unicode text
+ URL:=https://github.com/avian2/unidecode
+ DEPENDS:=+python3-light
+ VARIANT:=python3
+endef
+
+define Package/python-unidecode/description
+ Unidecode, lossy ASCII transliterations of Unicode text
+endef
+
+$(eval $(call Py3Package,$(PKG_NAME)))
+$(eval $(call BuildPackage,$(PKG_NAME)))
+$(eval $(call BuildPackage,$(PKG_NAME)-src))
# Note: keep in sync with setuptools & pip
PYTHON3_VERSION_MAJOR:=3
PYTHON3_VERSION_MINOR:=7
-PYTHON3_VERSION_MICRO:=2
+PYTHON3_VERSION_MICRO:=4
PYTHON3_VERSION:=$(PYTHON3_VERSION_MAJOR).$(PYTHON3_VERSION_MINOR)
PYTHON3_SETUPTOOLS_PKG_RELEASE:=1
PYTHON3_PIP_PKG_RELEASE:=1
-PYTHON3_SETUPTOOLS_VERSION:=40.6.2
-PYTHON3_PIP_VERSION:=18.1
+PYTHON3_SETUPTOOLS_VERSION:=40.8.0
+PYTHON3_PIP_VERSION:=19.0.3
PYTHON_VERSION_MICRO:=$(PYTHON3_VERSION_MICRO)
PKG_NAME:=python3
-PKG_RELEASE:=3
+PKG_RELEASE:=1
PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO)
PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://www.python.org/ftp/python/$(PKG_VERSION)
-PKG_HASH:=d83fe8ce51b1bb48bbcf0550fd265b9a75cdfdfa93f916f9e700aef8444bf1bb
+PKG_HASH:=fb799134b868199930b75f26678f18932214042639cd52b16da7fd134cd9b13f
-PKG_LICENSE:=PSF
-PKG_LICENSE_FILES:=LICENSE Modules/_ctypes/libffi_msvc/LICENSE Modules/_ctypes/darwin/LICENSE Modules/_ctypes/libffi/LICENSE Modules/_ctypes/libffi_osx/LICENSE Tools/pybench/LICENSE
+PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>, Jeffery To <jeffery.to@gmail.com>
+PKG_LICENSE:=Python/2.0
+PKG_LICENSE_FILES:=LICENSE Doc/copyright.rst Doc/license.rst Modules/_ctypes/darwin/LICENSE Modules/_ctypes/libffi_osx/LICENSE Modules/expat/COPYING
+PKG_CPE_ID:=cpe:/a:python:python
# This file provides the necsessary host build variables
include ../python3-host.mk
CATEGORY:=Languages
TITLE:=Python $(PYTHON_VERSION) programming language
URL:=https://www.python.org/
- MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
endef
define Package/python3/Default/description
-|/usr/lib/python$(PYTHON_VERSION)/*/tests
endif
endef
+ Py3Package/$(1)/install?=:
endef
include ./files/python3-package-*.mk
ifdef CONFIG_PACKAGE_python3-setuptools
define Build/Compile/python3-setuptools
- $(STAGING_DIR_HOSTPKG)/bin/pip3 install \
+ $(HOST_PYTHON3_PIP) \
+ --disable-pip-version-check \
+ --cache-dir "$(DL_DIR)/pip-cache" \
+ install \
--ignore-installed \
- --root=$(PKG_BUILD_DIR)/install-setuptools --prefix=. \
+ --root=$(PKG_BUILD_DIR)/install-setuptools \
+ --prefix=/usr \
$(PKG_BUILD_DIR)/Lib/ensurepip/_bundled/setuptools-$(PYTHON3_SETUPTOOLS_VERSION)-py2.py3-none-any.whl
+ $(call PatchDir,$(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON3_VERSION)/site-packages,./patches-setuptools,)
endef
endif # CONFIG_PACKAGE_python3-setuptools
ifdef CONFIG_PACKAGE_python3-pip
define Build/Compile/python3-pip
- $(STAGING_DIR_HOSTPKG)/bin/pip3 install \
+ $(HOST_PYTHON3_PIP) \
+ --disable-pip-version-check \
+ --cache-dir "$(DL_DIR)/pip-cache" \
+ install \
--ignore-installed \
- --root=$(PKG_BUILD_DIR)/install-pip --prefix=. \
+ --root=$(PKG_BUILD_DIR)/install-pip \
+ --prefix=/usr \
$(PKG_BUILD_DIR)/Lib/ensurepip/_bundled/pip-$(PYTHON3_PIP_VERSION)-py2.py3-none-any.whl
+ $(call PatchDir,$(PKG_BUILD_DIR)/install-pip/usr/lib/python$(PYTHON3_VERSION)/site-packages,./patches-pip,)
endef
endif # CONFIG_PACKAGE_python3-pip
endef
define Build/InstallDev
- $(INSTALL_DIR) $(1)/usr/include/ $(1)/usr/lib/
- $(INSTALL_DIR) $(1)/usr/lib/python$(PYTHON_VERSION)/
- $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+ $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib $(1)/usr/lib/pkgconfig
+ $(INSTALL_DIR) $(2)/bin
$(CP) \
$(PKG_INSTALL_DIR)/usr/include/python$(PYTHON_VERSION) \
$(1)/usr/include/
$(CP) \
- $(HOST_PYTHON3_LIB_DIR) \
+ $(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON_VERSION) \
$(PKG_INSTALL_DIR)/usr/lib/libpython$(PYTHON_VERSION).so* \
$(1)/usr/lib/
$(CP) \
- $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/python3.pc \
- $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/python-$(PYTHON3_VERSION).pc \
+ $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/python*.pc \
$(1)/usr/lib/pkgconfig
- $(CP) \
- $(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON_VERSION)/config-$(PYTHON_VERSION) \
- $(1)/usr/lib/python$(PYTHON_VERSION)/
+ $(INSTALL_BIN) \
+ $(PKG_INSTALL_DIR)/usr/bin/python$(PYTHON_VERSION)-config \
+ $(2)/bin/
+ $(SED) \
+ 's|^prefix_real=.*$$$$|prefix_real="$(PYTHON3_DIR)"|' \
+ $(2)/bin/python$(PYTHON_VERSION)-config
endef
PYTHON3_BASE_LIB_FILES:= \
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libpython$(PYTHON_VERSION).so* $(1)/usr/lib/
endef
+Py3Package/python3-light/install:=:
+Py3Package/python3/install:=:
+
define Py3Package/python3/filespec
-|$(PYTHON3_PKG_DIR)
endef
--prefix=$(HOST_PYTHON3_DIR) \
--exec-prefix=$(HOST_PYTHON3_DIR) \
--with-system-expat=$(STAGING_DIR_HOSTPKG) \
- --with-ensurepip=install \
+ --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
+$(HOST_MAKE_VARS) $(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) python Parser/pgen
+$(HOST_MAKE_VARS) $(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) sharedmods
endef
define Host/Install
+ $(if $(wildcard $(HOST_PYTHON3_PKG_DIR)/.setuptools_installed_$(PYTHON3_SETUPTOOLS_VERSION)-$(PYTHON3_SETUPTOOLS_PKG_RELEASE)),,
+ rm -rf \
+ $(HOST_PYTHON3_PKG_DIR)/easy_install.py \
+ $(HOST_PYTHON3_PKG_DIR)/pkg_resources \
+ $(HOST_PYTHON3_PKG_DIR)/setuptools \
+ $(HOST_PYTHON3_PKG_DIR)/setuptools-* \
+ $(HOST_PYTHON3_PKG_DIR)/.setuptools-patched* \
+ $(HOST_PYTHON3_PKG_DIR)/.setuptools_installed_*
+ )
+ $(if $(wildcard $(HOST_PYTHON3_PKG_DIR)/.pip_installed_$(PYTHON3_PIP_VERSION)-$(PYTHON3_PIP_PKG_RELEASE)),,
+ rm -rf \
+ $(HOST_PYTHON3_PKG_DIR)/pip \
+ $(HOST_PYTHON3_PKG_DIR)/pip-* \
+ $(HOST_PYTHON3_PKG_DIR)/.pip-patched* \
+ $(HOST_PYTHON3_PKG_DIR)/.pip_installed_*
+ )
$(MAKE) -C $(HOST_BUILD_DIR) install
$(INSTALL_DIR) $(HOST_PYTHON3_DIR)/bin/
$(INSTALL_BIN) $(HOST_BUILD_DIR)/Parser/pgen $(HOST_PYTHON3_DIR)/bin/pgen3
+ $(if $(wildcard $(HOST_PYTHON3_PKG_DIR)/.setuptools_installed_$(PYTHON3_SETUPTOOLS_VERSION)-$(PYTHON3_SETUPTOOLS_PKG_RELEASE)),,
+ $(call HostPatchDir,$(HOST_PYTHON3_PKG_DIR),./patches-setuptools,)
+ touch $(HOST_PYTHON3_PKG_DIR)/.setuptools_installed_$(PYTHON3_SETUPTOOLS_VERSION)-$(PYTHON3_SETUPTOOLS_PKG_RELEASE)
+ )
+ $(if $(wildcard $(HOST_PYTHON3_PKG_DIR)/.pip_installed_$(PYTHON3_PIP_VERSION)-$(PYTHON3_PIP_PKG_RELEASE)),,
+ $(call HostPatchDir,$(HOST_PYTHON3_PKG_DIR),./patches-pip,)
+ touch $(HOST_PYTHON3_PKG_DIR)/.pip_installed_$(PYTHON3_PIP_VERSION)-$(PYTHON3_PIP_PKG_RELEASE)
+ )
endef
$(eval $(call HostBuild))
$(call Package/python3/Default)
TITLE:=Python $(PYTHON3_VERSION) pip module
VERSION:=$(PYTHON3_PIP_VERSION)-$(PYTHON3_PIP_PKG_RELEASE)
+ LICENSE:=MIT
+ LICENSE_FILES:=LICENSE.txt
+# CPE_ID:=cpe:/a:python:pip # not currently handled this way by uscan
DEPENDS:=+python3 +python3-setuptools +python-pip-conf
endef
-define Package/python3-pip/install
+define Py3Package/python3-pip/install
$(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages
- # Adjust shebang to proper python location on target
- sed "1s@.*@#\!/usr/bin/python$(PYTHON3_VERSION)@" -i $(PKG_BUILD_DIR)/install-pip/bin/*
- $(CP) $(PKG_BUILD_DIR)/install-pip/bin/pip3* $(1)/usr/bin
+ $(CP) $(PKG_BUILD_DIR)/install-pip/usr/bin/pip3* $(1)/usr/bin
$(CP) \
- $(PKG_BUILD_DIR)/install-pip/lib/python$(PYTHON3_VERSION)/site-packages/pip \
- $(PKG_BUILD_DIR)/install-pip/lib/python$(PYTHON3_VERSION)/site-packages/pip-$(PYTHON3_PIP_VERSION).dist-info \
+ $(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 \
$(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/
- find $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/ -name __pycache__ | xargs rm -rf
+ find $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/ -path '*/__pycache__/*' -delete
+ find $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/ -type d -name __pycache__ -delete
endef
$(eval $(call Py3BasePackage,python3-pip, \
$(call Package/python3/Default)
TITLE:=Python $(PYTHON3_VERSION) setuptools module
VERSION:=$(PYTHON3_SETUPTOOLS_VERSION)-$(PYTHON3_SETUPTOOLS_PKG_RELEASE)
+ LICENSE:=MIT
+ LICENSE_FILES:=LICENSE
+# CPE_ID:=cpe:/a:python:setuptools # not currently handled this way by uscan
DEPENDS:=+python3
endef
define Py3Package/python3-setuptools/install
$(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages
- # Adjust shebang to proper python location on target
- sed "1s@.*@#\!/usr/bin/python$(PYTHON3_VERSION)@" -i $(PKG_BUILD_DIR)/install-setuptools/bin/*
- $(CP) $(PKG_BUILD_DIR)/install-setuptools/bin/easy_install-* $(1)/usr/bin
+ $(CP) $(PKG_BUILD_DIR)/install-setuptools/usr/bin/easy_install-* $(1)/usr/bin
$(LN) easy_install-$(PYTHON3_VERSION) $(1)/usr/bin/easy_install-3
$(CP) \
- $(PKG_BUILD_DIR)/install-setuptools/lib/python$(PYTHON3_VERSION)/site-packages/pkg_resources \
- $(PKG_BUILD_DIR)/install-setuptools/lib/python$(PYTHON3_VERSION)/site-packages/setuptools \
- $(PKG_BUILD_DIR)/install-setuptools/lib/python$(PYTHON3_VERSION)/site-packages/setuptools-$(PYTHON3_SETUPTOOLS_VERSION).dist-info \
- $(PKG_BUILD_DIR)/install-setuptools/lib/python$(PYTHON3_VERSION)/site-packages/easy_install.py \
+ $(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON3_VERSION)/site-packages/pkg_resources \
+ $(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON3_VERSION)/site-packages/setuptools \
+ $(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON3_VERSION)/site-packages/setuptools-$(PYTHON3_SETUPTOOLS_VERSION).dist-info \
+ $(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON3_VERSION)/site-packages/easy_install.py \
$(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages
- find $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/ -name __pycache__ | xargs rm -rf
+ find $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/ -path '*/__pycache__/*' -delete
+ find $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/ -type d -name __pycache__ -delete
endef
$(eval $(call Py3BasePackage,python3-setuptools, \
--- /dev/null
+#
+# Copyright (C) 2019 Alexandru Ardelean <ardeleanalex@gmail.com>
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Package/python3-urllib
+$(call Package/python3/Default)
+ TITLE:=Python $(PYTHON3_VERSION) URL library module
+ DEPENDS:=+python3-light +python3-email
+endef
+
+$(eval $(call Py3BasePackage,python3-urllib, \
+ /usr/lib/python$(PYTHON3_VERSION)/urllib \
+))
--- /dev/null
+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)):
--- /dev/null
+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)
+
+
--- /dev/null
+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)
+
+
+zlib zlibmodule.c -lz
# Interface to the Expat XML parser
- #
+ # More information on Expat can be found at www.libexpat.org.
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
-@@ -1381,6 +1381,7 @@ libinstall: build_all $(srcdir)/Modules/
+@@ -1391,6 +1391,7 @@ libinstall: build_all $(srcdir)/Modules/
$(INSTALL_DATA) `cat pybuilddir.txt`/_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH).py \
$(DESTDIR)$(LIBDEST); \
$(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt
if test -d $(DESTDIR)$(LIBDEST)/distutils/tests; then \
$(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \
$(DESTDIR)$(LIBDEST)/distutils/tests ; \
-@@ -1416,6 +1417,7 @@ libinstall: build_all $(srcdir)/Modules/
+@@ -1426,6 +1427,7 @@ libinstall: build_all $(srcdir)/Modules/
$(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
$(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt
--- a/setup.py
+++ b/setup.py
-@@ -537,16 +537,9 @@ class PyBuildExt(build_ext):
+@@ -581,16 +581,9 @@ class PyBuildExt(build_ext):
os.unlink(tmpfile)
def detect_modules(self):
--- /dev/null
+From e359a7a3c4f9e70360a068bef19c95938fdacede Mon Sep 17 00:00:00 2001
+From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+Date: Wed, 23 Dec 2015 11:33:14 +0100
+Subject: [PATCH] Adjust library/header paths for cross-compilation
+
+When cross-compiling third-party extensions, the get_python_inc() or
+get_python_lib() can be called, to return the path to headers or
+libraries. However, they use the sys.prefix of the host Python, which
+returns incorrect paths when cross-compiling (paths pointing to host
+headers and libraries).
+
+In order to fix this, we introduce the _python_sysroot, _python_prefix
+and _python_exec_prefix variables, that allow to override these
+values, and get correct header/library paths when cross-compiling
+third-party Python modules.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+---
+ Lib/distutils/command/build_ext.py | 5 ++++-
+ Lib/distutils/sysconfig.py | 15 +++++++++++----
+ 2 files changed, 15 insertions(+), 5 deletions(-)
+
+--- a/Lib/distutils/command/build_ext.py
++++ b/Lib/distutils/command/build_ext.py
+@@ -234,7 +234,10 @@ class build_ext(Command):
+ if (sysconfig.get_config_var('Py_ENABLE_SHARED')):
+ if not sysconfig.python_build:
+ # building third party extensions
+- self.library_dirs.append(sysconfig.get_config_var('LIBDIR'))
++ libdir = sysconfig.get_config_var('LIBDIR')
++ if "_python_sysroot" in os.environ:
++ libdir = os.environ.get("_python_sysroot") + libdir
++ self.library_dirs.append(libdir)
+ else:
+ # building python standard extensions
+ self.library_dirs.append('.')
+--- a/Lib/distutils/sysconfig.py
++++ b/Lib/distutils/sysconfig.py
+@@ -17,10 +17,17 @@ import sys
+ from .errors import DistutilsPlatformError
+
+ # These are needed in a couple of spots, so just compute them once.
+-PREFIX = os.path.normpath(sys.prefix)
+-EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
+-BASE_PREFIX = os.path.normpath(sys.base_prefix)
+-BASE_EXEC_PREFIX = os.path.normpath(sys.base_exec_prefix)
++if "_python_sysroot" in os.environ:
++ _sysroot=os.environ.get('_python_sysroot')
++ PREFIX = os.path.normpath(_sysroot + os.environ.get('_python_prefix'))
++ EXEC_PREFIX = os.path.normpath(_sysroot + os.environ.get('_python_exec_prefix'))
++ BASE_PREFIX = PREFIX
++ BASE_EXEC_PREFIX = EXEC_PREFIX
++else:
++ PREFIX = os.path.normpath(sys.prefix)
++ EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
++ BASE_PREFIX = os.path.normpath(sys.base_prefix)
++ BASE_EXEC_PREFIX = os.path.normpath(sys.base_exec_prefix)
+
+ # Path to the base directory of the project. On Windows the binary may
+ # live in project/PCbuild/win32 or project/PCbuild/amd64.
--- a/setup.py
+++ b/setup.py
-@@ -547,8 +547,9 @@ class PyBuildExt(build_ext):
+@@ -591,8 +591,9 @@ class PyBuildExt(build_ext):
# directly since an inconsistently reproducible issue comes up where
# the environment variable is not set even though the value were passed
# into configure and stored in the Makefile (issue found on OS X 10.3).
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
-@@ -743,6 +743,16 @@ regen-all: regen-opcode regen-opcode-tar
+@@ -753,6 +753,16 @@ regen-all: regen-opcode regen-opcode-tar
############################################################################
# Special rules for object files
Modules/getbuildinfo.o: $(PARSER_OBJS) \
$(OBJECT_OBJS) \
$(PYTHON_OBJS) \
-@@ -750,6 +760,8 @@ Modules/getbuildinfo.o: $(PARSER_OBJS) \
+@@ -760,6 +770,8 @@ Modules/getbuildinfo.o: $(PARSER_OBJS) \
$(MODOBJS) \
$(srcdir)/Modules/getbuildinfo.c
$(CC) -c $(PY_CORE_CFLAGS) \
--- a/configure
+++ b/configure
-@@ -14962,7 +14962,7 @@ $as_echo_n "checking ABIFLAGS... " >&6;
+@@ -15273,7 +15273,7 @@ $as_echo_n "checking ABIFLAGS... " >&6;
$as_echo "$ABIFLAGS" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
$as_echo_n "checking SOABI... " >&6; }
--- a/configure.ac
+++ b/configure.ac
-@@ -4665,7 +4665,7 @@ AC_SUBST(SOABI)
+@@ -4736,7 +4736,7 @@ AC_SUBST(SOABI)
AC_MSG_CHECKING(ABIFLAGS)
AC_MSG_RESULT($ABIFLAGS)
AC_MSG_CHECKING(SOABI)
--- a/setup.py
+++ b/setup.py
-@@ -354,6 +354,7 @@ class PyBuildExt(build_ext):
+@@ -398,6 +398,7 @@ class PyBuildExt(build_ext):
print("Failed to build these modules:")
print_three_column(failed)
print()
--- a/Lib/distutils/sysconfig.py
+++ b/Lib/distutils/sysconfig.py
-@@ -421,6 +421,7 @@ def _init_posix():
+@@ -446,6 +446,7 @@ def _init_posix():
platform=sys.platform,
multiarch=getattr(sys.implementation, '_multiarch', ''),
))
global _config_vars
--- a/Lib/sysconfig.py
+++ b/Lib/sysconfig.py
-@@ -337,6 +337,7 @@ def get_makefile_filename():
+@@ -344,6 +344,7 @@ def get_makefile_filename():
def _get_sysconfigdata_name():
abi=sys.abiflags,
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
-@@ -1390,7 +1390,7 @@ libinstall: build_all $(srcdir)/Modules/
+@@ -1400,7 +1400,7 @@ libinstall: build_all $(srcdir)/Modules/
esac; \
done; \
done
$(DESTDIR)$(LIBDEST); \
$(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt
ifeq (@COMPILE_ALL_TESTS@,yes)
-@@ -1525,7 +1525,7 @@ sharedinstall: sharedmods
+@@ -1545,7 +1545,7 @@ sharedinstall: sharedmods
--install-scripts=$(BINDIR) \
--install-platlib=$(DESTSHARED) \
--root=$(DESTDIR)/
# Here are a couple of targets for MacOSX again, to install a full
--- a/configure
+++ b/configure
-@@ -14981,7 +14981,7 @@ LDVERSION='$(VERSION)$(ABIFLAGS)'
+@@ -15292,7 +15292,7 @@ LDVERSION='$(VERSION)$(ABIFLAGS)'
$as_echo "$LDVERSION" >&6; }
LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
--- a/configure.ac
+++ b/configure.ac
-@@ -4682,7 +4682,7 @@ AC_MSG_RESULT($LDVERSION)
+@@ -4753,7 +4753,7 @@ AC_MSG_RESULT($LDVERSION)
dnl define LIBPL after ABIFLAGS and LDVERSION is defined.
AC_SUBST(PY_ENABLE_SHARED)
-diff --git a/Lib/lib2to3/refactor.py b/Lib/lib2to3/refactor.py
-index 7841b99..1e0d3b3 100644
--- a/Lib/lib2to3/refactor.py
+++ b/Lib/lib2to3/refactor.py
-@@ -37,6 +37,12 @@ def get_all_fix_names(fixer_pkg, remove_prefix=True):
+@@ -37,6 +37,12 @@ def get_all_fix_names(fixer_pkg, remove_
if remove_prefix:
name = name[4:]
fix_names.append(name[:-3])
+++ /dev/null
-#
-# Copyright (C) 2007-2018 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=pytz
-PKG_VERSION:=2018.9
-PKG_RELEASE:=1
-PKG_LICENSE:=MIT
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/pytz
-PKG_HASH:=d5f05e487007e29e03409f9398d074e158d920d36eb82eaf66fb1136b0c5374c
-
-PKG_BUILD_DEPENDS:=python/host
-HOST_BUILD_DEPENDS:=python/host
-
-include $(INCLUDE_DIR)/host-build.mk
-include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
-
-define Package/pytz
- SUBMENU:=Python
- SECTION:=lang
- CATEGORY:=Languages
- MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
- TITLE:=World timezone definitions, modern and historical
- URL:=https://sourceforge.net/projects/pytz/
- DEPENDS:=+python
-endef
-
-define Package/pytz/description
- World timezone definitions, modern and historical
-endef
-
-define Build/Compile
- $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
-endef
-
-define Host/Compile
- $(call Build/Compile/HostPyMod,,install --prefix="" --root="$(STAGING_DIR_HOSTPKG)")
-endef
-
-Host/Install:=
-
-define Package/pytz/install
- $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
- $(CP) \
- $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
- $(1)$(PYTHON_PKG_DIR)
-endef
-
-$(eval $(call HostBuild))
-$(eval $(call BuildPackage,pytz))
+++ /dev/null
-#
-# Copyright (C) 2007-2016 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=rcssmin
-PKG_VERSION:=1.0.6
-PKG_RELEASE=2
-PKG_LICENSE:=Apache-2.0
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/r/rcssmin
-PKG_HASH:=ca87b695d3d7864157773a61263e5abb96006e9ff0e021eff90cbe0e1ba18270
-
-include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
-
-define Package/rcssmin
- SUBMENU:=Python
- SECTION:=lang
- CATEGORY:=Languages
- TITLE:=Fast CSS minifier for Python
- MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
- URL:=http://opensource.perlig.de/rcssmin/
- DEPENDS:=+python
-endef
-
-define Package/rcssmin/description
- Fast CSS minifier for Python
-endef
-
-define Build/Compile
- $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
-endef
-
-define Build/InstallDev
- $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
- $(CP) \
- $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
- $(1)$(PYTHON_PKG_DIR)
-endef
-
-define Package/rcssmin/install
- $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
- $(CP) \
- $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
- $(1)$(PYTHON_PKG_DIR)
-endef
-
-$(eval $(call BuildPackage,rcssmin))
--- /dev/null
+#
+# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/)
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=ruamel-yaml
+PKG_VERSION:=0.15.97
+PKG_RELEASE:=1
+
+PKG_SOURCE:=ruamel.yaml-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/r/ruamel.yaml/
+PKG_HASH:=17dbf6b7362e7aee8494f7a0f5cffd44902a6331fe89ef0853b855a7930ab845
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-ruamel.yaml-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+
+include $(INCLUDE_DIR)/package.mk
+include ../python-package.mk
+include ../python3-package.mk
+
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+define Package/ruamel-yaml/Default
+ SECTION:=lang
+ CATEGORY:=Languages
+ SUBMENU:=Python
+ TITLE:=YAML 1.2 loader/dumper package for Python
+ URL:=https://bitbucket.org/ruamel/yaml
+endef
+
+define Package/python-ruamel-yaml
+$(call Package/ruamel-yaml/Default)
+ DEPENDS:= \
+ +PACKAGE_python-ruamel-yaml:python-light
+ VARIANT:=python
+endef
+
+define Package/python3-ruamel-yaml
+$(call Package/ruamel-yaml/Default)
+ DEPENDS:= \
+ +PACKAGE_python3-ruamel-yaml:python3-light
+ VARIANT:=python3
+endef
+
+define Package/ruamel-yaml/description
+ruamel-yaml is a YAML parser/emitter that supports roundtrip preservation of comments, seq/map flow style, and map key order
+endef
+
+define Package/python3-ruamel-yaml/description
+$(call Package/ruamel-yaml/description)
+.
+(Variant for Python3)
+endef
+
+$(eval $(call PyPackage,python-ruamel-yaml))
+$(eval $(call BuildPackage,python-ruamel-yaml))
+$(eval $(call BuildPackage,python-ruamel-yaml-src))
+
+$(eval $(call Py3Package,python3-ruamel-yaml))
+$(eval $(call BuildPackage,python3-ruamel-yaml))
+$(eval $(call BuildPackage,python3-ruamel-yaml-src))
+++ /dev/null
-#
-# Copyright (C) 2007-2017 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=simplejson
-PKG_VERSION:=3.16.0
-PKG_RELEASE:=1
-PKG_LICENSE:=MIT
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/s/simplejson
-PKG_HASH:=b1f329139ba647a9548aa05fb95d046b4a677643070dc2afc05fa2e975d09ca5
-
-include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
-
-define Package/simplejson
- SUBMENU:=Python
- SECTION:=lang
- CATEGORY:=Languages
- MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
- TITLE:=Simple, fast, extensible JSON encoder/decoder for Python
- URL:=https://simplejson.readthedocs.org/
- DEPENDS:=+python
-endef
-
-define Package/simplejson/description
- Simple, fast, extensible JSON encoder/decoder for Python
-endef
-
-define Build/Compile
- $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
-endef
-
-define Package/simplejson/install
- $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
- $(CP) \
- $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
- $(1)$(PYTHON_PKG_DIR)
-endef
-
-$(eval $(call BuildPackage,simplejson))
--- /dev/null
+#
+# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/)
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-text-unidecode
+PKG_VERSION:=1.2
+PKG_RELEASE:=1
+
+PKG_SOURCE:=text-unidecode-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/t/text-unidecode/
+PKG_HASH:=5a1375bb2ba7968740508ae38d92e1f889a0832913cb1c447d5e2046061a396d
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-text-unidecode-$(PKG_VERSION)
+
+PKG_LICENSE:=Artistic-1.0-cl8
+PKG_LICENSE_FILES:=LICENSE
+PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>
+
+include $(INCLUDE_DIR)/package.mk
+include ../python-package.mk
+include ../python3-package.mk
+
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+define Package/python-text-unidecode/Default
+ SECTION:=lang
+ CATEGORY:=Languages
+ SUBMENU:=Python
+ TITLE:=The most basic Text::Unidecode port
+ URL:=https://github.com/kmike/text-unidecode/
+endef
+
+define Package/python-text-unidecode
+$(call Package/python-text-unidecode/Default)
+ DEPENDS:= \
+ +PACKAGE_python-text-unidecode:python-light
+ VARIANT:=python
+endef
+
+define Package/python3-text-unidecode
+$(call Package/python-text-unidecode/Default)
+ DEPENDS:= \
+ +PACKAGE_python3-text-unidecode:python3-light
+ VARIANT:=python3
+endef
+
+define Package/python-text-unidecode/description
+text-unidecode is the most basic port of the Text::Unidecode Perl library.
+endef
+
+define Package/python3-text-unidecode/description
+$(call Package/python-text-unidecode/description)
+.
+(Variant for Python3)
+endef
+
+$(eval $(call PyPackage,python-text-unidecode))
+$(eval $(call BuildPackage,python-text-unidecode))
+$(eval $(call BuildPackage,python-text-unidecode-src))
+
+$(eval $(call Py3Package,python3-text-unidecode))
+$(eval $(call BuildPackage,python3-text-unidecode))
+$(eval $(call BuildPackage,python3-text-unidecode-src))
+++ /dev/null
-#
-# Copyright (C) 2006-2011, 2015-2018 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=twisted
-PKG_VERSION:=18.9.0
-PKG_RELEASE:=1
-
-PKG_SOURCE:=Twisted-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/T/Twisted
-PKG_HASH:=294be2c6bf84ae776df2fc98e7af7d6537e1c5e60a46d33c3ce2a197677da395
-
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-twisted-$(PKG_VERSION)
-PKG_BUILD_DEPENDS:=libtirpc
-
-PKG_LICENSE:=MIT
-PKG_LICENSE_FILES:=LICENSE
-PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
-
-include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
-
-PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xjf $(DL_DIR)/$(PKG_SOURCE)
-
-define Package/twisted/Default
- SUBMENU:=Python
- SECTION:=lang
- CATEGORY:=Languages
- URL:=http://twistedmatrix.com/
-endef
-
-define Package/twisted
-$(call Package/twisted/Default)
- TITLE:=Python networking engine
- DEPENDS:= \
- +PACKAGE_twisted:python-light \
- +PACKAGE_twisted:python-attrs \
- +PACKAGE_twisted:python-automat \
- +PACKAGE_twisted:python-constantly \
- +PACKAGE_twisted:python-incremental \
- +PACKAGE_twisted:python-hyperlink \
- +PACKAGE_twisted:python-zope-interface
- VARIANT:=python
-endef
-
-define Package/twisted/description
-Twisted is a networking engine written in Python, supporting numerous
-protocols. It contains a web server, numerous chat clients, chat servers,
-mail servers, and more.
-endef
-
-define PyPackage/twisted/filespec
-+|/usr/bin
-+|$(PYTHON_PKG_DIR)
--|$(PYTHON_PKG_DIR)/twisted/conch/scripts/tkconch.py
-endef
-
-$(eval $(call PyPackage,twisted))
-$(eval $(call BuildPackage,twisted))
-$(eval $(call BuildPackage,twisted-src))
+++ /dev/null
---- a/src/twisted/python/_setup.py
-+++ b/src/twisted/python/_setup.py
-@@ -144,7 +144,6 @@ _CONSOLE_SCRIPTS = [
- "conch = twisted.conch.scripts.conch:run",
- "mailmail = twisted.mail.scripts.mailmail:run",
- "pyhtmlizer = twisted.scripts.htmlizer:run",
-- "tkconch = twisted.conch.scripts.tkconch:run",
- "trial = twisted.scripts.trial:run",
- "twist = twisted.application.twist._twist:Twist.main",
- "twistd = twisted.scripts.twistd:run",
---- a/src/twisted/python/twisted-completion.zsh
-+++ b/src/twisted/python/twisted-completion.zsh
-@@ -1,4 +1,4 @@
--#compdef twist twistd trial conch cftp ckeygen pyhtmlizer tkconch
-+#compdef twist twistd trial conch cftp ckeygen pyhtmlizer
- #
- # This is the ZSH completion file for Twisted commands. It calls the current
- # command-line with the special "--_shell-completion" option which is handled
+++ /dev/null
---- a/src/twisted/python/_setup.py
-+++ b/src/twisted/python/_setup.py
-@@ -169,11 +169,6 @@ class ConditionalExtension(Extension, object):
-
- # The C extensions used for Twisted.
- _EXTENSIONS = [
-- ConditionalExtension(
-- "twisted.test.raiser",
-- sources=["src/twisted/test/raiser.c"],
-- condition=lambda _: _isCPython),
--
- ConditionalExtension(
- "twisted.internet.iocpreactor.iocpsupport",
- sources=[
-@@ -238,12 +233,11 @@ def getSetupArgs(extensions=_EXTENSIONS):
- "incremental >= 16.10.1",
- "Automat >= 0.3.0",
- "hyperlink >= 17.1.1",
-- "PyHamcrest >= 1.9.0",
- "attrs >= 17.4.0",
- ]
-
- arguments.update(dict(
-- packages=find_packages("src"),
-+ packages=find_packages("src", exclude=["*.test", "*.test.*"]),
- use_incremental=True,
- setup_requires=["incremental >= 16.10.1"],
- install_requires=requirements,
-@@ -253,7 +247,7 @@ def getSetupArgs(extensions=_EXTENSIONS):
- cmdclass=command_classes,
- include_package_data=True,
- exclude_package_data={
-- "": ["*.c", "*.h", "*.pxi", "*.pyx", "build.bat"],
-+ "": ["*.c", "*.h", "*.pxi", "*.pyx", "build.bat", "test/*"],
- },
- zip_safe=False,
- extras_require=_EXTRAS_REQUIRE,
--- /dev/null
+#
+# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/)
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-xmltodict
+PKG_VERSION:=0.12.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=xmltodict-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/x/xmltodict/
+PKG_HASH:=50d8c638ed7ecb88d90561beedbf720c9b4e851a9fa6c47ebd64e99d166d8a21
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/xmltodict-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Josef Schlehofer <pepe.schlehofer@gmail.com>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-xmltodict
+ SECTION:=lang
+ CATEGORY:=Languages
+ SUBMENU:=Python
+ TITLE:=Work with XML like JSON
+ URL:=https://github.com/martinblech/xmltodict
+ DEPENDS:= \
+ +python3-light \
+ +python3-xml \
+ +python3-urllib
+ VARIANT:=python3
+endef
+
+define Package/python3-xmltodict/description
+ xmltodict is a Python module that makes working with XML feel like you are working with JSON.
+endef
+
+$(eval $(call Py3Package,python3-xmltodict))
+$(eval $(call BuildPackage,python3-xmltodict))
+$(eval $(call BuildPackage,python3-xmltodict-src))
include $(TOPDIR)/rules.mk
PKG_NAME:=ruby
-PKG_VERSION:=2.5.3
+PKG_VERSION:=2.6.3
PKG_RELEASE:=1
# First two numbes
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://cache.ruby-lang.org/pub/ruby/$(PKG_ABI_VERSION)/
-PKG_HASH:=1cc9d0359a8ea35fc6111ec830d12e60168f3b9b305a3c2578357d360fcf306f
+PKG_HASH:=11a83f85c03d3f0fc9b8a9b6cad1b2674f26c5aaa43ba858d4b0fcc2b54171e1
PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
PKG_LICENSE:=BSD-2-Clause
PKG_LICENSE_FILES:=COPYING
SECTION:=libs
CATEGORY:=Libraries
TITLE+= (shared library)
- DEPENDS+= +libpthread +librt +libgmp
+ DEPENDS+= +libpthread +librt +libgmp +zlib
ABI_VERSION:=$(PKG_ABI_VERSION)
endef
define Package/libruby/install
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libruby.so.* $(1)/usr/lib/
endef
+define Package/ruby-dev
+$(call Package/ruby/Default)
+ TITLE+= (dev files)
+ DEPENDS:=+libruby
+endef
+define Package/ruby-dev/description
+ Header files for compiling extension modules for the Ruby $(PKG_ABI_VERSION)
+endef
+define Package/ruby-dev/install
+ $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib $(1)/usr/lib/pkgconfig
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/ruby-$(PKG_ABI_VERSION) $(1)/usr/include/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libruby.so $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/ruby-$(PKG_ABI_VERSION).pc $(1)/usr/lib/pkgconfig/
+endef
+
RUBY_STDLIB :=
define Package/ruby-stdlib
$(call Package/ruby/Default)
define Package/ruby-bigdecimal/files
/usr/lib/ruby/$(PKG_ABI_VERSION)/*/bigdecimal.so
+/usr/lib/ruby/$(PKG_ABI_VERSION)/*/bigdecimal/
/usr/lib/ruby/$(PKG_ABI_VERSION)/bigdecimal/
+/usr/lib/ruby/$(PKG_ABI_VERSION)/bigdecimal.rb
/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/bigdecimal-*.gemspec
endef
+define Package/ruby-bundler/files
+/usr/lib/ruby/$(PKG_ABI_VERSION)/bundler.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/bundler/
+/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/bundler-*/
+/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/bundler-*.gemspec
+endef
+
define Package/ruby-cgi/files
/usr/lib/ruby/$(PKG_ABI_VERSION)/cgi
/usr/lib/ruby/$(PKG_ABI_VERSION)/cgi.rb
define Package/ruby-csv/files
/usr/lib/ruby/$(PKG_ABI_VERSION)/csv.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/csv/
/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/csv-*.gemspec
endef
/usr/lib/ruby/$(PKG_ABI_VERSION)/profile.rb
/usr/lib/ruby/$(PKG_ABI_VERSION)/profiler.rb
/usr/lib/ruby/$(PKG_ABI_VERSION)/debug.rb
-/usr/lib/ruby/$(PKG_ABI_VERSION)/tracer.rb
/usr/lib/ruby/$(PKG_ABI_VERSION)/benchmark.rb
/usr/lib/ruby/$(PKG_ABI_VERSION)/*/objspace.so
endef
/usr/lib/ruby/$(PKG_ABI_VERSION)/*/enc/euc_jp.so
endef
+define Package/ruby-e2mmap/files
+/usr/lib/ruby/$(PKG_ABI_VERSION)/e2mmap.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/e2mmap/
+/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/e2mmap-*.gemspec
+endef
+
define Package/ruby-enc-extra/files
/usr/lib/ruby/$(PKG_ABI_VERSION)/*/enc
endef
define Package/ruby-fileutils/files
/usr/lib/ruby/$(PKG_ABI_VERSION)/fileutils.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/fileutils/
/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/fileutils-*.gemspec
endef
+define Package/ruby-forwardable/files
+/usr/lib/ruby/$(PKG_ABI_VERSION)/forwardable.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/forwardable
+/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/forwardable-*.gemspec
+endef
+
define Package/ruby-gdbm/files
/usr/lib/ruby/$(PKG_ABI_VERSION)/*/gdbm.so
/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/gdbm-*.gemspec
define Package/ruby-irb/files
/usr/lib/ruby/$(PKG_ABI_VERSION)/irb
/usr/lib/ruby/$(PKG_ABI_VERSION)/irb.rb
+/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/irb-*/
+/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/irb-*.gemspec
endef
define Package/ruby-irb/install
$(INSTALL_DIR) $(1)/usr/bin
/usr/lib/ruby/$(PKG_ABI_VERSION)/logger.rb
/usr/lib/ruby/$(PKG_ABI_VERSION)/syslog/logger.rb
/usr/lib/ruby/$(PKG_ABI_VERSION)/*/syslog.so
+/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/logger-*.gemspec
endef
-define Package/ruby-math/files
-/usr/lib/ruby/$(PKG_ABI_VERSION)/prime.rb
+define Package/ruby-matrix/files
/usr/lib/ruby/$(PKG_ABI_VERSION)/matrix.rb
/usr/lib/ruby/$(PKG_ABI_VERSION)/matrix
+/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/matrix-*.gemspec
endef
define Package/ruby-minitest/files
/usr/lib/ruby/$(PKG_ABI_VERSION)/English.rb
/usr/lib/ruby/$(PKG_ABI_VERSION)/abbrev.rb
/usr/lib/ruby/$(PKG_ABI_VERSION)/base64.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/coverage.rb
/usr/lib/ruby/$(PKG_ABI_VERSION)/delegate.rb
-/usr/lib/ruby/$(PKG_ABI_VERSION)/e2mmap.rb
/usr/lib/ruby/$(PKG_ABI_VERSION)/expect.rb
/usr/lib/ruby/$(PKG_ABI_VERSION)/getoptlong.rb
/usr/lib/ruby/$(PKG_ABI_VERSION)/open3.rb
-/usr/lib/ruby/$(PKG_ABI_VERSION)/ostruct.rb
/usr/lib/ruby/$(PKG_ABI_VERSION)/securerandom.rb
/usr/lib/ruby/$(PKG_ABI_VERSION)/set.rb
/usr/lib/ruby/$(PKG_ABI_VERSION)/shellwords.rb
define Package/ruby-multithread/files
/usr/lib/ruby/$(PKG_ABI_VERSION)/monitor.rb
/usr/lib/ruby/$(PKG_ABI_VERSION)/timeout.rb
-/usr/lib/ruby/$(PKG_ABI_VERSION)/thwait.rb
-/usr/lib/ruby/$(PKG_ABI_VERSION)/mutex_m.rb
-/usr/lib/ruby/$(PKG_ABI_VERSION)/sync.rb
/usr/lib/ruby/$(PKG_ABI_VERSION)/*/io/wait.so
/usr/lib/ruby/$(PKG_ABI_VERSION)/*/io/nonblock.so
endef
+define Package/ruby-mutex_m/files
+/usr/lib/ruby/$(PKG_ABI_VERSION)/mutex_m.rb
+/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/mutex_m-*.gemspec
+endef
+
define Package/ruby-net/files
/usr/lib/ruby/$(PKG_ABI_VERSION)/open-uri.rb
/usr/lib/ruby/$(PKG_ABI_VERSION)/net/*
/usr/lib/ruby/$(PKG_ABI_VERSION)/optparse
endef
+define Package/ruby-ostruct/files
+/usr/lib/ruby/$(PKG_ABI_VERSION)/ostruct.rb
+/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/ostruct-*.gemspec
+endef
+
define Package/ruby-patterns/files
/usr/lib/ruby/$(PKG_ABI_VERSION)/observer.rb
/usr/lib/ruby/$(PKG_ABI_VERSION)/singleton.rb
-/usr/lib/ruby/$(PKG_ABI_VERSION)/forwardable.rb
-/usr/lib/ruby/$(PKG_ABI_VERSION)/forwardable
endef
define Package/ruby-powerassert/files
/usr/lib/ruby/$(PKG_ABI_VERSION)/prettyprint.rb
endef
+define Package/ruby-prime/files
+/usr/lib/ruby/$(PKG_ABI_VERSION)/prime.rb
+/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/prime-*.gemspec
+endef
+
define Package/ruby-pstore/files
/usr/lib/ruby/$(PKG_ABI_VERSION)/pstore.rb
endef
define Package/ruby-rexml/files
/usr/lib/ruby/$(PKG_ABI_VERSION)/rexml
+/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/rexml-*.gemspec
endef
define Package/ruby-rinda/files
define Package/ruby-rss/files
/usr/lib/ruby/$(PKG_ABI_VERSION)/rss
/usr/lib/ruby/$(PKG_ABI_VERSION)/rss.rb
+/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/rss-*.gemspec
endef
define Package/ruby-scanf/files
define Package/ruby-shell/files
/usr/lib/ruby/$(PKG_ABI_VERSION)/shell.rb
/usr/lib/ruby/$(PKG_ABI_VERSION)/shell
+/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/shell-*.gemspec
endef
define Package/ruby-socket/files
/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/strscan-*.gemspec
endef
+define Package/ruby-sync/files
+/usr/lib/ruby/$(PKG_ABI_VERSION)/sync.rb
+/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/sync-*.gemspec
+endef
+
define Package/ruby-testunit/files
/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/test-unit-*.gemspec
/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/test-unit-*
/usr/lib/ruby/$(PKG_ABI_VERSION)/time.rb
endef
+define Package/ruby-thwait/files
+/usr/lib/ruby/$(PKG_ABI_VERSION)/thwait.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/thwait/
+/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/thwait-*.gemspec
+endef
+
+define Package/ruby-tracer/files
+/usr/lib/ruby/$(PKG_ABI_VERSION)/tracer.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/tracer/
+/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/tracer-*.gemspec
+endef
+
define Package/ruby-unicodenormalize/files
/usr/lib/ruby/$(PKG_ABI_VERSION)/unicode_normalize
endef
$(eval $(call BuildPackage,libruby))
$(eval $(call BuildPackage,ruby))
+$(eval $(call BuildPackage,ruby-dev))
$(eval $(call RubyBuildPackage,bigdecimal,Arbitrary-precision decimal floating-point library,))
+$(eval $(call RubyBuildPackage,bundler,Manage dependencies,))
$(eval $(call RubyBuildPackage,cgi,CGI support toolkit,+ruby-filelib +ruby-pstore +ruby-stringio))
$(eval $(call RubyBuildPackage,cmath,Trigonometric and transcendental functions for complex numbers,))
-$(eval $(call RubyBuildPackage,csv,CSV Reading and Writing,+ruby-date +ruby-enc +ruby-misc +ruby-patterns +ruby-stringio))
+$(eval $(call RubyBuildPackage,csv,CSV Reading and Writing,+ruby-date +ruby-forwardable +ruby-misc +ruby-stringio +ruby-strscan))
$(eval $(call RubyBuildPackage,date,Comparable module for handling dates,))
$(eval $(call RubyBuildPackage,dbm,Wrapper for the UNIX-style Database Manager Library,+libdb47))
-$(eval $(call RubyBuildPackage,debuglib,debug library,+ruby-misc +ruby-prettyprint))
+$(eval $(call RubyBuildPackage,debuglib,debug library,+ruby-misc +ruby-prettyprint +ruby-tracer))
$(eval $(call RubyBuildPackage,did-you-mean,did you mean? experience,+ruby-misc))
$(eval $(call RubyBuildPackage,digest,Digest Library,+RUBY_DIGEST_USE_OPENSSL:libopenssl))
$(eval $(call RubyBuildPackage,drb,distributed object system,+ruby-filelib +ruby-ipaddr +ruby-patterns))
+$(eval $(call RubyBuildPackage,e2mmap,custom exceptions with specific messages,))
$(eval $(call RubyBuildPackage,enc,character re-coding library charset (small subset),))
$(eval $(call RubyBuildPackage,enc-extra,character re-coding library charset (extra subset),+ruby-enc))
$(eval $(call RubyBuildPackage,erb,(embedded interpreter),+ruby-cgi +ruby-strscan))
-$(eval $(call RubyBuildPackage,etc,Access to information typically stored in UNIX /etc directory,))
+$(eval $(call RubyBuildPackage,etc,Access info typically stored in /etc,))
$(eval $(call RubyBuildPackage,fcntl,Loads constants defined in the OS fcntl.h C header file,))
$(eval $(call RubyBuildPackage,fiddle,Libffi wrapper for Ruby,+libffi))
$(eval $(call RubyBuildPackage,filelib,file utils library,+ruby-fileutils +ruby-misc))
-$(eval $(call RubyBuildPackage,fileutils,File utility methods for copying moving removing etc,+ruby-enc +ruby-etc))
+$(eval $(call RubyBuildPackage,fileutils,File utility methods for copying moving removing etc,+ruby-enc +ruby-etc +ruby-rbconfig))
+$(eval $(call RubyBuildPackage,forwardable,delegation of methods to a object,))
$(eval $(call RubyBuildPackage,gdbm,Ruby extension for GNU dbm,+libgdbm))
-$(eval $(call RubyBuildPackage,gems,gems packet management,+ruby-net +ruby-rdoc))
+$(eval $(call RubyBuildPackage,gems,gems packet management,))
$(eval $(call RubyBuildPackage,io-console,Console interface,))
$(eval $(call RubyBuildPackage,ipaddr,Set of methods to manipulate an IP address,+ruby-socket))
-$(eval $(call RubyBuildPackage,irb,(interactive shell),+ruby-debuglib +ruby-filelib))
-$(eval $(call RubyBuildPackage,json,JSON Implementation for Ruby,+ruby-date +ruby-misc))
+$(eval $(call RubyBuildPackage,irb,(interactive shell),))
+$(eval $(call RubyBuildPackage,json,JSON Implementation for Ruby,+ruby-date +ruby-ostruct))
$(eval $(call RubyBuildPackage,logger,logger and syslog library,+ruby-multithread))
-$(eval $(call RubyBuildPackage,math,math library,+ruby-patterns +ruby-misc))
-$(eval $(call RubyBuildPackage,minitest,Gem minitest,+ruby-gems))
+$(eval $(call RubyBuildPackage,matrix,implementation of Matrix and Vector classes,+ruby-e2mmap))
+$(eval $(call RubyBuildPackage,minitest,Gem minitest,+ruby-mutex_m))
$(eval $(call RubyBuildPackage,misc,standard libraries subset (miscellaneous files),))
-$(eval $(call RubyBuildPackage,mkmf,makefile library,+ruby-filelib +ruby-optparse +ruby-rbconfig))
+$(eval $(call RubyBuildPackage,mkmf,makefile library,+ruby-filelib +ruby-optparse))
$(eval $(call RubyBuildPackage,multithread,multithread library,+ruby-misc))
+$(eval $(call RubyBuildPackage,mutex_m,extend objects to be handled like a Mutex,))
$(eval $(call RubyBuildPackage,net,Network Protocols Library,+ruby-time +ruby-digest +ruby-filelib +ruby-socket +ruby-stringio +ruby-strscan +ruby-uri))
$(eval $(call RubyBuildPackage,net-telnet,telnet client,+ruby-net))
$(eval $(call RubyBuildPackage,nkf,Network Kanji Filter,+ruby-enc))
-$(eval $(call RubyBuildPackage,openssl,SSL TLS and general purpose cryptography,+ruby-enc +ruby-multithread +ruby-stringio +libopenssl))
+$(eval $(call RubyBuildPackage,openssl,SSL TLS and general purpose cryptography,+ruby-enc +ruby-ipaddr +ruby-stringio +libopenssl))
+$(eval $(call RubyBuildPackage,ostruct,build custom data structures,))
$(eval $(call RubyBuildPackage,optparse,command-line option analysis,+ruby-misc +ruby-time))
$(eval $(call RubyBuildPackage,patterns,design patterns implementation,))
$(eval $(call RubyBuildPackage,powerassert,Gem power_assert,+ruby-prettyprint +ruby-ripper))
$(eval $(call RubyBuildPackage,prettyprint,PrettyPrint library,+ruby-etc))
+$(eval $(call RubyBuildPackage,prime,Prime numbers and factorization library,+ruby-forwardable +ruby-patterns))
$(eval $(call RubyBuildPackage,pstore,file based persistence,+ruby-digest +ruby-enc))
$(eval $(call RubyBuildPackage,psych,YAML parser and emitter,+ruby-bigdecimal +ruby-date +ruby-enc +ruby-stringio +ruby-strscan +libyaml))
$(eval $(call RubyBuildPackage,racc,LALR parser generator,))
-$(eval $(call RubyBuildPackage,rake,Rake (make replacement),+ruby-fileutils +ruby-multithread +ruby-optparse +ruby-patterns +ruby-rbconfig))
+$(eval $(call RubyBuildPackage,rake,Rake (make replacement),+ruby-fileutils +ruby-multithread +ruby-optparse +ruby-ostruct +ruby-patterns))
$(eval $(call RubyBuildPackage,rbconfig,RbConfig,))
$(eval $(call RubyBuildPackage,rdoc,RDoc produces HTML and command-line documentation for Ruby projects,+ruby-debuglib +ruby-did-you-mean +ruby-erb +ruby-json +ruby-racc +ruby-rake +ruby-ripper +ruby-yaml +ruby-zlib))
$(eval $(call RubyBuildPackage,readline,support for readline,+libncurses +libreadline))
-$(eval $(call RubyBuildPackage,rexml,XML toolkit,+ruby-enc +ruby-misc +ruby-patterns +ruby-stringio))
-$(eval $(call RubyBuildPackage,rinda,Linda paradigm implementation,+ruby-drb))
+$(eval $(call RubyBuildPackage,rexml,XML toolkit,+ruby-enc +ruby-forwardable +ruby-misc +ruby-stringio +ruby-strscan))
+$(eval $(call RubyBuildPackage,rinda,Linda paradigm implementation,+ruby-drb +ruby-forwardable))
$(eval $(call RubyBuildPackage,ripper,script parser,))
$(eval $(call RubyBuildPackage,rss,RSS toolkit,+ruby-net +ruby-nkf +ruby-rexml))
$(eval $(call RubyBuildPackage,scanf,Implementation of the C function scanf(3),))
$(eval $(call RubyBuildPackage,sdbm,simple file-based key-value dbm implementation,))
-$(eval $(call RubyBuildPackage,shell,idiomatic Ruby interface,+ruby-patterns +ruby-multithread))
-$(eval $(call RubyBuildPackage,socket,socket support,+ruby-multithread))
+$(eval $(call RubyBuildPackage,shell,idiomatic Ruby interface,+ruby-e2mmap +ruby-forwardable +ruby-sync))
+$(eval $(call RubyBuildPackage,socket,socket support,+ruby-misc +ruby-multithread))
$(eval $(call RubyBuildPackage,stringio,Pseudo `IO` class from/to `String`,))
$(eval $(call RubyBuildPackage,strscan,Lexical scanning operations on a String,))
+$(eval $(call RubyBuildPackage,sync,two-phase lock with a counter,))
$(eval $(call RubyBuildPackage,testunit,Gem test-unit,+ruby-csv +ruby-erb +ruby-optparse +ruby-powerassert +ruby-rexml +ruby-yaml))
$(eval $(call RubyBuildPackage,time,Extends Time with additional methods for parsing and converting Times,+ruby-date))
+$(eval $(call RubyBuildPackage,thwait,Watches for termination of multiple threads,+ruby-e2mmap))
+$(eval $(call RubyBuildPackage,tracer,Outputs a source level execution trace of a Ruby program,))
$(eval $(call RubyBuildPackage,unicodenormalize,String additions for Unicode normalization,+ruby-enc +ruby-enc-extra))
$(eval $(call RubyBuildPackage,uri,library to handle URI,+ruby-enc))
-$(eval $(call RubyBuildPackage,webrick,HTTP server toolkit,+ruby-erb +ruby-net +ruby-patterns +ruby-rbconfig))
+$(eval $(call RubyBuildPackage,webrick,HTTP server toolkit,+ruby-erb +ruby-net +ruby-patterns))
$(eval $(call RubyBuildPackage,xmlrpc,XML-RPC toolkit,+ruby-rexml +ruby-webrick))
$(eval $(call RubyBuildPackage,yaml,YAML toolkit,+ruby-dbm +ruby-pstore +ruby-psych))
-$(eval $(call RubyBuildPackage,zlib,compression/decompression library interface,+zlib))
+$(eval $(call RubyBuildPackage,zlib,compression/decompression library interface,))
$(eval $(call BuildPackage,ruby-stdlib))
$(eval $(call HostBuild))
--- /dev/null
+From 74f94b3e6ebf15b76f3b357e754095412b006e94 Mon Sep 17 00:00:00 2001
+From: nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>
+Date: Fri, 8 Feb 2019 07:22:55 +0000
+Subject: [PATCH] configure.ac: check finite,isinf,isnan as macros first
+
+[ruby-core:91487] [Bug #15595]
+
+git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67036 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
+---
+ aclocal.m4 | 1 +
+ configure.ac | 13 ++++---------
+ tool/m4/ruby_replace_funcs.m4 | 13 +++++++++++++
+ 3 files changed, 18 insertions(+), 9 deletions(-)
+ create mode 100644 tool/m4/ruby_replace_funcs.m4
+
+--- a/aclocal.m4
++++ b/aclocal.m4
+@@ -35,6 +35,7 @@ m4_include([tool/m4/ruby_func_attribute.
+ m4_include([tool/m4/ruby_mingw32.m4])
+ m4_include([tool/m4/ruby_prepend_option.m4])
+ m4_include([tool/m4/ruby_prog_gnu_ld.m4])
++m4_include([tool/m4/ruby_replace_funcs.m4])
+ m4_include([tool/m4/ruby_replace_type.m4])
+ m4_include([tool/m4/ruby_rm_recursive.m4])
+ m4_include([tool/m4/ruby_setjmp_type.m4])
+--- a/configure.ac
++++ b/configure.ac
+@@ -946,9 +946,6 @@ main()
+ ac_cv_func_fsync=yes
+ ac_cv_func_seekdir=yes
+ ac_cv_func_telldir=yes
+- ac_cv_func_isinf=yes
+- ac_cv_func_isnan=yes
+- ac_cv_func_finite=yes
+ ac_cv_func_lchown=yes
+ ac_cv_func_link=yes
+ ac_cv_func_readlink=yes
+@@ -999,9 +996,6 @@ main()
+ [netbsd*], [ LIBS="-lm $LIBS"
+ ],
+ [dragonfly*], [ LIBS="-lm $LIBS"
+- # isinf() and isnan() are macros on DragonFly.
+- ac_cv_func_isinf=yes
+- ac_cv_func_isnan=yes
+ ],
+ [aix*],[ LIBS="-lm $LIBS"
+ ac_cv_func_round=no
+@@ -1724,11 +1718,8 @@ AC_REPLACE_FUNCS(dup2)
+ AC_REPLACE_FUNCS(erf)
+ AC_REPLACE_FUNCS(explicit_bzero)
+ AC_REPLACE_FUNCS(ffs)
+-AC_REPLACE_FUNCS(finite)
+ AC_REPLACE_FUNCS(flock)
+ AC_REPLACE_FUNCS(hypot)
+-AC_REPLACE_FUNCS(isinf)
+-AC_REPLACE_FUNCS(isnan)
+ AC_REPLACE_FUNCS(lgamma_r)
+ AC_REPLACE_FUNCS(memmove)
+ AC_REPLACE_FUNCS(nan)
+@@ -1741,6 +1732,10 @@ AC_REPLACE_FUNCS(strlcpy)
+ AC_REPLACE_FUNCS(strstr)
+ AC_REPLACE_FUNCS(tgamma)
+
++RUBY_REPLACE_FUNC([finite], [@%:@include <math.h>])
++RUBY_REPLACE_FUNC([isinf], [@%:@include <math.h>])
++RUBY_REPLACE_FUNC([isnan], [@%:@include <math.h>])
++
+ # for missing/setproctitle.c
+ AS_CASE(["$target_os"],
+ [aix* | k*bsd*-gnu | kopensolaris*-gnu | linux* | darwin*], [AC_DEFINE(SPT_TYPE,SPT_REUSEARGV)],
+--- /dev/null
++++ b/tool/m4/ruby_replace_funcs.m4
+@@ -0,0 +1,13 @@
++# -*- Autoconf -*-
++dnl RUBY_REPLACE_FUNC [func] [included]
++AC_DEFUN([RUBY_REPLACE_FUNC], [dnl
++ AC_CHECK_DECL([$1],dnl
++ [AC_DEFINE(AS_TR_CPP(HAVE_[$1]))],dnl
++ [AC_REPLACE_FUNCS($1)],dnl
++ [$2])dnl
++])
++
++dnl RUBY_REPLACE_FUNCS [funcs] [included]
++AC_DEFUN([RUBY_REPLACE_FUNCS] [dnl
++ m4_map_args_w([$1], [RUBY_REPLACE_FUNC(], [), [$2]])dnl
++])
builder/xchar json/pure simplecov win32/sspi rdoc/markdown/literals_1_8 enumerator win32/resolv rbtree
nqxml/streamingparser nqxml/treeparser xmlscan/parser xmlscan/scanner xmltreebuilder xml/parser xmlparser xml/encoding-ja xmlencoding-ja
iconv uconv win32ole gettext/po_parser gettext/mo libxml psych.jar psych_jars jar-dependencies thread minitest/proveit
- bundler pry
+ bundler pry bcrypt net/http/pipeline capistrano/version rubygems/builder rubygems/format diff/lcs graphviz
}
builtin_enc=[
}
-echo " Installed in Staging Packages"
+set -e
: ${1:?First arg is staging_dir}
: ${2:?Second and following args are ruby ipkg packages}
STAGING_DIR=$1; shift
+(cd "$STAGING_DIR" )
+if ! [ -e "$1" ]; then
+ echo "$1 does not exist!"
+ exit 1
+fi
+printf '%-62s %-62s\n' "Installed in Staging" "From Packages Files"
diff -d -y <(list_staging_files "$STAGING_DIR") <(list_ipkg_files "$@")
TITLE:=uuid
URL:=https://github.com/Tieske/uuid
DEPENDS:=+lua +luasocket
+ PKGARCH:=all
endef
define Package/uuid/description
PKG_NAME:=apr
PKG_VERSION:=1.6.5
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=@APACHE/apr/
PKG_HASH:=a67ca9fcf9c4ff59bce7f428a323c8b5e18667fdea7b0ebad47d194371b0a105
+
PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>
-PKG_LICENSE:=Apache License
+PKG_LICENSE:=Apache-2.0
PKG_FIXUP:=autoreconf
PKG_REMOVE_FILES:=aclocal.m4 build/ltmain.sh
endef
TARGET_CFLAGS += $(FPIC)
-TARGET_CPPFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
CONFIGURE_ARGS += \
+ --without-pic \
--with-devrandom=/dev/urandom \
- --disable-dso \
$(call autoconf_bool,CONFIG_IPV6,ipv6)
# XXX: ac_cv_sizeof_struct_iovec=1 is just to trick configure
CONFIGURE_VARS += \
ac_cv_sizeof_struct_iovec=1 \
ac_cv_struct_rlimit=yes \
- apr_cv_process_shared_works=no \
- apr_cv_mutex_robust_shared=no \
+ ac_cv_func_sem_open=yes \
+ ac_cv_func_pthread_mutexattr_setpshared=yes \
+ apr_cv_mutex_robust_shared=yes \
apr_cv_tcp_nodelay_with_cork=yes \
- apr_cv_use_lfs64=yes \
- LDFLAGS="$$$$LDFLAGS -lpthread" \
+ apr_cv_sock_cloexec=yes \
+ apr_cv_process_shared_works=yes \
+ apr_cv_mutex_recursive=yes \
+ apr_cv_epoll_create1=yes \
+ apr_cv_epoll=yes \
+ apr_cv_dup3=yes \
+ apr_cv_accept4=yes
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/bin $(1)/usr/include/apr-1 $(1)/usr/lib $(1)/usr/lib/pkgconfig $(1)/usr/share/build-1
include/private/apr_escape_test_char.h
DISTCLEAN_TARGETS = config.cache config.log config.status \
include/apr.h include/arch/unix/apr_private.h \
-@@ -135,9 +134,9 @@ tools/gen_test_char.lo: tools/gen_test_c
+@@ -138,9 +137,9 @@ tools/gen_test_char.lo: tools/gen_test_c
$(APR_MKDIR) tools
$(LT_COMPILE)
# See /LICENSE for more information.
#
-#
+#
# Original Boost 1.51 Makefile by Mirko Vogt <mirko@openwrt.org>
# Dude, this "boost" is really one of the most crude stuff I ported yet.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=boost
-PKG_VERSION:=1.69.0
-PKG_SOURCE_VERSION:=1_69_0
-PKG_RELEASE:=1
+PKG_VERSION:=1.70.0
+PKG_SOURCE_VERSION:=1_70_0
+PKG_RELEASE:=7
PKG_SOURCE:=$(PKG_NAME)_$(PKG_SOURCE_VERSION).tar.bz2
PKG_SOURCE_URL:=@SF/$(PKG_NAME)/$(PKG_NAME)/$(PKG_VERSION) https://dl.bintray.com/boostorg/release/$(PKG_VERSION)/source/
+PKG_HASH:=430ae8354789de4fd19ee52f3b1f739e1fba576f0aded0897c3c2bc00fb38778
+
+PKG_MAINTAINER:=Carlos M. Ferreira <carlosmf.pt@gmail.com>
+PKG_LICENSE:=BSL-1.0
+PKG_LICENSE_FILES:=LICENSE_1_0.txt
+
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)_$(PKG_SOURCE_VERSION)
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)_$(PKG_SOURCE_VERSION)
-PKG_HASH:=8f32d4617390d1c2d16f26a27ab60d97807b35440d45891fa340fc2648b04406
-PKG_LICENSE:=Boost Software License <http://www.boost.org/users/license.html>
-PKG_MAINTAINER:=Carlos M. Ferreira <carlosmf.pt@gmail.com>
PKG_BUILD_PARALLEL:=1
PKG_USE_MIPS16:=0
SECTION:=libs
CATEGORY:=Libraries
TITLE:=Boost C++ source library
- URL:=http://www.boost.org
+ URL:=https://www.boost.org
DEPENDS:=+libstdcpp +libpthread +librt
endef
define Package/boost/description
-This package provides the Boost v1.69.0 libraries.
+This package provides the Boost v1.70.0 libraries.
Boost is a set of free, peer-reviewed, portable C++ source libraries.
-----------------------------------------------------------------------------
- chrono
- container
- context
- - contract
+ - contract
- coroutine (Deprecated - use Coroutine2)
- - coroutine2 (Requires GCC v5 and up)
- date_time
- wave
There are many more header-only libraries supported by Boost.
-See more at http://www.boost.org/doc/libs/1_69_0/
+See more at http://www.boost.org/doc/libs/1_70_0/
endef
PKG_BUILD_DEPENDS:=boost/host PACKAGE_python:python PACKAGE_python3:python3
cannot be redefined by another shared library or executable. This mode is
not supported on some platforms, for example OS X.
-> Hidden:
- - Hidden symbols are not exported from shared libraries and cannot be
+ - Hidden symbols are not exported from shared libraries and cannot be
redefined by a different shared library or executable loaded in a process.
In this mode, public symbols have to be explicitly marked in the source code
to be exported from shared libraries. This is the recommended mode.
config boost-compile-visibility-global
bool "Global"
-
+
config boost-compile-visibility-protected
bool "Protected"
-
+
config boost-compile-visibility-hidden
bool "Hidden"
endchoice
config boost-shared-libs
bool "Shared"
-
+
config boost-static-libs
bool "Static"
-
+
config boost-static-and-shared-libs
bool "Both"
endchoice
- Not available if Shared libs are to be built.
-> Use both runtimes.
- Not available if Shared libs are to be built.
- - Two separate versions of Boost are built, linking each to a different runtime.
+ - Two separate versions of Boost are built, linking each to a different runtime.
- This option requires "Use tagged names" option to be active.
config boost-runtime-shared
bool "Shared"
config boost-runtime-static
- depends on @(!boost-shared-libs&&!boost-static-and-shared-libs)
- bool "Static"
+ depends on !boost-shared-libs&&!boost-static-and-shared-libs
+ bool "Static"
config boost-runtime-static-and-shared
- depends on @(boost-use-name-tags&&!boost-shared-libs&&!boost-static-and-shared-libs)
+ depends on boost-use-name-tags&&!boost-shared-libs&&!boost-static-and-shared-libs
bool "Both"
endchoice
Chooses which boost variant should be selected:
-> Release: Optimizes Boost for release.
- Optimization: Speed; Debug Symbols: Off; Inlining: Full; Runtime Debugging: Off.
- -> Debug:
+ -> Debug:
- Optimization: Off; Debug Symbols: On; Inlining: Off; Runtime Debugging: On.
-> Profile:
- Profiling: On; Debug Symbols: On.
config boost-use-name-tags
bool "Use tagged names."
- help
+ help
Add name tags the lib files, to diferentiate each library version:
"-mt" for multi-threading.
"-d" for debugging.
default n
config boost-single-thread
- depends on @boost-use-name-tags
+ depends on boost-use-name-tags
bool "Single thread Support."
- help
+ help
Compile Boost libraries in single-thread mode.
default n
-
+
config boost-build-type-complete
- depends on @boost-use-name-tags
+ depends on boost-use-name-tags
bool "Complete Boost Build."
- help
+ help
Builds both release and debug libs. It will take much longer to compile.
default n
endmenu
select PACKAGE_boost-test
config boost-coroutine2
- depends on !@GCC_VERSION_4_8
+ depends on !GCC_VERSION_4_8
bool "Boost couroutine2 support."
select PACKAGE_boost-coroutine
default n
$(eval $(call DefineBoostLibrary,fiber,coroutine filesystem,,!boost-fiber-exclude))
$(eval $(call DefineBoostLibrary,filesystem,system,))
$(eval $(call DefineBoostLibrary,graph,regex,))
-$(eval $(call DefineBoostLibrary,iostreams,,+zlib +liblzma +libbz2))
+$(eval $(call DefineBoostLibrary,iostreams,,+zlib +liblzma +libbz2 +zstd))
$(eval $(call DefineBoostLibrary,locale,system,$(ICONV_DEPENDS),BUILD_NLS))
$(eval $(call DefineBoostLibrary,log,system chrono date_time thread filesystem regex,))
$(eval $(call DefineBoostLibrary,math,,))
define Host/Compile
# b2 does not provide a configure-script nor a Makefile
( cd $(HOST_BUILD_DIR)/tools/build/src/engine ; ./build.sh gcc )
+
+ ( cd $(HOST_BUILD_DIR) ; \
+ ./bootstrap.sh --prefix=$(STAGING_DIR_HOSTPKG) \
+ --with-libraries=atomic,chrono,date_time,filesystem,headers,thread,system ;\
+ ./b2 --ignore-site-config install )
endef
CONFIGURE_PREFIX:=$(PKG_INSTALL_DIR)
TARGET_CFLAGS += \
$(if $(CONFIG_SOFT_FLOAT),-DBOOST_NO_FENV_H) -fPIC
-EXTRA_CXXFLAGS += $(if $(CONFIG_GCC_VERSION_4_8),-std=gnu++11,-std=gnu++14)
+EXTRA_CXXFLAGS += $(if $(CONFIG_GCC_USE_VERSION_5),-std=gnu++14,-std=gnu++17)
ifneq ($(findstring mips,$(ARCH)),)
BOOST_ABI = o32
comma := ,
define Build/Compile
- $(info Selected Boost API $(BOOST_ABI) for architecture $(ARCH) and cpu $(CONFIG_CPU_TYPE) $(if $(CONFIG_CPU_SUBTYPE),and cpu subtype $(CONFIG_CPU_SUBTYPE),))
+ $(info Selected Boost API $(BOOST_ABI) for architecture $(ARCH) and cpu type $(CONFIG_CPU_TYPE) $(if $(CONFIG_CPU_SUBTYPE),and cpu subtype $(CONFIG_CPU_SUBTYPE),))
( cd $(PKG_BUILD_DIR) ; \
- echo "using gcc : $(ARCH) : $(GNU_TARGET_NAME)-gcc : <compileflags>\"$(TARGET_CFLAGS)\" <cxxflags>\"$(TARGET_CXXFLAGS) $(EXTRA_CXXFLAGS)\" <linkflags>\"$(TARGET_LDFLAGS)\" ;" > \
+ echo "using gcc : $(GCC_VERSION) : $(GNU_TARGET_NAME)-gcc : <compileflags>\"$(TARGET_CFLAGS)\" <cxxflags>\"$(TARGET_CXXFLAGS) $(EXTRA_CXXFLAGS)\" <linkflags>\"$(TARGET_LDFLAGS)\" ;" > \
tools/build/src/user-config.jam ; \
b2 \
$(CONFIGURE_ARGS) \
--ignore-site-config \
- --toolset=gcc-$(ARCH) abi=$(BOOST_ABI) \
+ --toolset=gcc abi=$(BOOST_ABI) \
--disable-long-double \
$(if $(CONFIG_boost-compile-visibility-global), visibility=global,) \
$(if $(CONFIG_boost-compile-visibility-protected), visibility=protected,) \
-sZLIB_LIBPATH=$(STAGING_DIR)/usr/lib) \
install ;\
$(if $(CONFIG_PACKAGE_boost-python), \
- echo "using gcc : $(ARCH) : $(GNU_TARGET_NAME)-gcc : <compileflags>\"$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/python$(BOOST_PYTHON_VER)/ \" <cxxflags>\"$(TARGET_CXXFLAGS) $(EXTRA_CXXFLAGS)\" <linkflags>\"$(TARGET_LDFLAGS)\" ;" > \
+ echo "using gcc : $(GCC_VERSION) : $(GNU_TARGET_NAME)-gcc : <compileflags>\"$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/python$(BOOST_PYTHON_VER)/ \" <cxxflags>\"$(TARGET_CXXFLAGS) $(EXTRA_CXXFLAGS)\" <linkflags>\"$(TARGET_LDFLAGS)\" ;" > \
tools/build/src/user-config.jam ; \
echo "using python : $(BOOST_PYTHON_VER) : : $(STAGING_DIR)/usr/include/python$(BOOST_PYTHON_VER)/ : $(STAGING_DIR)/usr/lib/libpython$(BOOST_PYTHON_VER).so ;" >> \
tools/build/src/user-config.jam; \
b2 -a \
$(CONFIGURE_ARGS) \
--ignore-site-config \
- --toolset=gcc-$(ARCH) abi=$(BOOST_ABI) \
+ --toolset=gcc abi=$(BOOST_ABI) \
--disable-long-double \
$(if $(CONFIG_boost-variant-release), variant=release,) \
$(if $(CONFIG_boost-variant-debug), variant=debug,) \
install ;\
,) \
$(if $(CONFIG_PACKAGE_boost-python3), \
- echo "using gcc : $(ARCH) : $(GNU_TARGET_NAME)-gcc : <compileflags>\"$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/python$(BOOST_PYTHON3_VER)/ \" <cxxflags>\"$(TARGET_CXXFLAGS) $(EXTRA_CXXFLAGS)\" <linkflags>\"$(TARGET_LDFLAGS)\" ;" > \
+ echo "using gcc : $(GCC_VERSION) : $(GNU_TARGET_NAME)-gcc : <compileflags>\"$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/python$(BOOST_PYTHON3_VER)/ \" <cxxflags>\"$(TARGET_CXXFLAGS) $(EXTRA_CXXFLAGS)\" <linkflags>\"$(TARGET_LDFLAGS)\" ;" > \
tools/build/src/user-config.jam ; \
echo "using python : $(BOOST_PYTHON3_VER) : : $(STAGING_DIR)/usr/include/python$(BOOST_PYTHON3_VER)/ : $(STAGING_DIR)/usr/lib/libpython$(BOOST_PYTHON3_VER).so ;" >> \
tools/build/src/user-config.jam; \
b2 -a \
$(CONFIGURE_ARGS) \
--ignore-site-config \
- --toolset=gcc-$(ARCH) abi=$(BOOST_ABI) \
+ --toolset=gcc abi=$(BOOST_ABI) \
--disable-long-double \
$(if $(CONFIG_boost-variant-release), variant=release,) \
$(if $(CONFIG_boost-variant-debug), variant=debug,) \
# copies _all_ header files - independent of <--with-library>-argument above
$(INSTALL_DIR) $(1)/usr/lib
- # copies all compiled archive and shared object files
- $(CP) -v $(PKG_INSTALL_DIR)/lib/*.{a,so*} $(1)/usr/lib/
+ # copies all cmake files, compiled archive and shared object files
+ $(CP) -v $(PKG_INSTALL_DIR)/lib/{*.{a,so*},cmake} $(1)/usr/lib/ || :
endef
define Host/Install
define BuildBoostLibrary
define Package/boost-$(1)/install
- $(call Package/boost/Default/install,$$(1),$(1))
+ $(call Package/boost/Default/install,$$(1),$(1))
endef
$$(eval $$(call BuildPackage,boost-$(1)))
--- /dev/null
+--- a/boost/asio/detail/impl/eventfd_select_interrupter.ipp
++++ b/boost/asio/detail/impl/eventfd_select_interrupter.ipp
+@@ -23,11 +23,11 @@
+ #include <sys/stat.h>
+ #include <sys/types.h>
+ #include <fcntl.h>
+-#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
++#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 2
+ # include <asm/unistd.h>
+-#else // __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
++#else // __GLIBC__ == 2 && __GLIBC_MINOR__ < 2
+ # include <sys/eventfd.h>
+-#endif // __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
++#endif // __GLIBC__ == 2 && __GLIBC_MINOR__ < 2
+ #include <boost/asio/detail/cstdint.hpp>
+ #include <boost/asio/detail/eventfd_select_interrupter.hpp>
+ #include <boost/asio/detail/throw_error.hpp>
+@@ -46,14 +46,14 @@ eventfd_select_interrupter::eventfd_sele
+
+ void eventfd_select_interrupter::open_descriptors()
+ {
+-#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
++#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 2
+ write_descriptor_ = read_descriptor_ = syscall(__NR_eventfd, 0);
+ if (read_descriptor_ != -1)
+ {
+ ::fcntl(read_descriptor_, F_SETFL, O_NONBLOCK);
+ ::fcntl(read_descriptor_, F_SETFD, FD_CLOEXEC);
+ }
+-#else // __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
++#else // __GLIBC__ == 2 && __GLIBC_MINOR__ < 2
+ # if defined(EFD_CLOEXEC) && defined(EFD_NONBLOCK)
+ write_descriptor_ = read_descriptor_ =
+ ::eventfd(0, EFD_CLOEXEC | EFD_NONBLOCK);
+@@ -70,7 +70,7 @@ void eventfd_select_interrupter::open_de
+ ::fcntl(read_descriptor_, F_SETFD, FD_CLOEXEC);
+ }
+ }
+-#endif // __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
++#endif // __GLIBC__ == 2 && __GLIBC_MINOR__ < 2
+
+ if (read_descriptor_ == -1)
+ {
--- /dev/null
+From cbdb354a274c8ab51a15dd43eafd02c2b6a576f0 Mon Sep 17 00:00:00 2001
+From: Edward Catmur <edward.catmur@mavensecurities.com>
+Date: Wed, 17 Apr 2019 15:05:37 +0100
+Subject: [PATCH 1/2] Copy variant cvref when determining result type
+
+Ensures that we can e.g. call apply_visitor on a lvalue variant
+---
+ boost/variant/detail/apply_visitor_unary.hpp | 9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
+
+--- a/boost/variant/detail/apply_visitor_unary.hpp
++++ b/boost/variant/detail/apply_visitor_unary.hpp
+@@ -23,6 +23,7 @@
+ # include <boost/mpl/size.hpp>
+ # include <boost/utility/declval.hpp>
+ # include <boost/core/enable_if.hpp>
++# include <boost/type_traits/copy_cv_ref.hpp>
+ # include <boost/type_traits/remove_reference.hpp>
+ # include <boost/variant/detail/has_result_type.hpp>
+ #endif
+@@ -85,7 +86,7 @@ namespace detail { namespace variant {
+ // This class serves only metaprogramming purposes. none of its methods must be called at runtime!
+ template <class Visitor, class Variant>
+ struct result_multideduce1 {
+- typedef typename Variant::types types;
++ typedef typename remove_reference<Variant>::type::types types;
+ typedef typename boost::mpl::begin<types>::type begin_it;
+ typedef typename boost::mpl::advance<
+ begin_it, boost::mpl::int_<boost::mpl::size<types>::type::value - 1>
+@@ -95,14 +96,14 @@ struct result_multideduce1 {
+ struct deduce_impl {
+ typedef typename boost::mpl::next<It>::type next_t;
+ typedef typename boost::mpl::deref<It>::type value_t;
+- typedef decltype(true ? boost::declval< Visitor& >()( boost::declval< value_t >() )
++ typedef decltype(true ? boost::declval< Visitor& >()( boost::declval< copy_cv_ref_t< value_t, Variant > >() )
+ : boost::declval< typename deduce_impl<next_t>::type >()) type;
+ };
+
+ template <class Dummy>
+ struct deduce_impl<last_it, Dummy> {
+ typedef typename boost::mpl::deref<last_it>::type value_t;
+- typedef decltype(boost::declval< Visitor& >()( boost::declval< value_t >() )) type;
++ typedef decltype(boost::declval< Visitor& >()( boost::declval< copy_cv_ref_t< value_t, Variant > >() )) type;
+ };
+
+ typedef typename deduce_impl<begin_it>::type type;
+@@ -132,7 +133,7 @@ inline decltype(auto) apply_visitor(Visi
+ boost::detail::variant::has_result_type<Visitor>
+ >::type* = 0)
+ {
+- boost::detail::variant::result_wrapper1<Visitor, typename remove_reference<Visitable>::type> cpp14_vis(::boost::forward<Visitor>(visitor));
++ boost::detail::variant::result_wrapper1<Visitor, Visitable> cpp14_vis(::boost::forward<Visitor>(visitor));
+ return ::boost::forward<Visitable>(visitable).apply_visitor(cpp14_vis);
+ }
+
+--- a/libs/variant/test/const_ref_apply_visitor.cpp
++++ b/libs/variant/test/const_ref_apply_visitor.cpp
+@@ -217,6 +217,44 @@ void test_cpp14_visitor(const variant_ty
+ #endif
+ }
+
++void test_cpp14_visitor(variant_type& test_var)
++{
++ std::cout << "Testing lvalue visitable for c++14\n";
++
++ BOOST_TEST(boost::apply_visitor([](auto& v) { return lvalue_rvalue_detector()(v); }, test_var) == "lvalue reference");
++}
++
++void test_cpp14_mutable_visitor(variant_type& test_var)
++{
++ std::cout << "Testing lvalue visitable for c++14 with inline mutable lambda\n";
++
++ BOOST_TEST(boost::apply_visitor([](auto& v) mutable -> auto { return lvalue_rvalue_detector()(v); }, test_var) == "lvalue reference");
++}
++
++void test_cpp14_visitor(variant_type& test_var, variant_type& test_var2)
++{
++ std::cout << "Testing lvalue visitable for c++14\n";
++
++ BOOST_TEST(boost::apply_visitor([](auto& v, auto& vv) { return lvalue_rvalue_detector()(v, vv); }, test_var, test_var2)
++ == "lvalue reference, lvalue reference");
++}
++
++void test_cpp14_visitor(variant_type& test_var, variant_type& test_var2, variant_type& test_var3)
++{
++#if !defined(BOOST_VARIANT_DO_NOT_USE_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_HDR_TUPLE)
++ std::cout << "Testing lvalue visitable for c++14\n";
++
++ auto result = boost::apply_visitor([](auto& v, auto& t, auto& p) { return lvalue_rvalue_detector()(v, t, p); },
++ test_var, test_var2, test_var3);
++ std::cout << "result: " << result << std::endl;
++ BOOST_TEST(result == "lvalue reference, lvalue reference, lvalue reference");
++#else
++ (void)test_var;
++ (void)test_var2;
++ (void)test_var3;
++#endif
++}
++
+ void test_cpp14_visitor(variant_type&& test_var)
+ {
+ std::cout << "Testing rvalue visitable for c++14\n";
+@@ -333,8 +371,14 @@ void run_cpp14_mixed_tests()
+ void run_cpp14_tests()
+ {
+ #ifndef BOOST_NO_CXX14_DECLTYPE_AUTO
++ variant_type const c1(10), c2(20), c3(30);
+ variant_type v1(10), v2(20), v3(30);
+
++ test_cpp14_visitor(c1);
++ test_cpp14_mutable_visitor(c1);
++ test_cpp14_visitor(c2, c3);
++ test_cpp14_visitor(c1, c2, c3);
++
+ test_cpp14_visitor(v1);
+ test_cpp14_mutable_visitor(v1);
+ test_cpp14_visitor(v2, v3);
--- /dev/null
+--- a/boost/math/tools/roots.hpp
++++ b/boost/math/tools/roots.hpp
+@@ -665,8 +665,8 @@ namespace detail
+ inline T discriminant(T const & a, T const & b, T const & c)
+ {
+ T w = 4*a*c;
+- T e = std::fma(-c, 4*a, w);
+- T f = std::fma(b, b, -w);
++ T e = fma(-c, 4*a, w);
++ T f = fma(b, b, -w);
+ return f + e;
+ }
+ }
+@@ -674,7 +674,6 @@ namespace detail
+ template<class T>
+ auto quadratic_roots(T const& a, T const& b, T const& c)
+ {
+- using std::copysign;
+ using std::sqrt;
+ if constexpr (std::is_integral<T>::value)
+ {
--- /dev/null
+#
+# Copyright (C) 2019 rosysong@rosinson.com
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=botan
+PKG_VERSION:=2.10.0
+PKG_RELEASE:=3
+PKG_MAINTAINER:=BangLang Huang <banglang.huang@foxmail.com>
+
+PKG_SOURCE:=Botan-$(PKG_VERSION).tgz
+PKG_BUILD_DIR:=$(BUILD_DIR)/Botan-$(PKG_VERSION)
+PKG_SOURCE_URL:=https://botan.randombit.net/releases/
+PKG_HASH:=88481997578c27924724fea76610d43d9f59c99edfe561d41803bbc98871ad31
+
+PKG_USE_MIPS16:=0
+PKG_LICENSE:=BSD-2-Clause
+PKG_LICENSE_FILES:=license.txt
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/botan/Default
+ SUBMENU:=SSL
+ TITLE:=Crypto and TLS for C++11
+ URL:=https://botan.randombit.net
+endef
+
+define Package/botan/Default/description
+ Botan (Japanese for peony) is a cryptography library written in C++11 and
+ released under the permissive Simplified BSD license.
+endef
+
+define Package/libbotan
+ $(call Package/botan/Default)
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE+= (library)
+ ABI_VERSION:=$(PKG_VERSION)-$(PKG_RELEASE)
+ DEPENDS:=+libstdcpp +libpthread @!arc
+endef
+
+define Package/libbotan/description
+ $(call Package/botan/Default/description)
+ This package contains the botan library.
+endef
+
+CONFIGURE_CMD = ./configure.py
+
+CONFIGURE_ARGS = \
+ --cpu="$(ARCH)" \
+ --cc-bin="$(TOOLCHAIN_DIR)/bin/$(TARGET_CXX)" \
+ --program-suffix="" \
+ --prefix=$(CONFIGURE_PREFIX) \
+ --exec-prefix=$(CONFIGURE_PREFIX) \
+ --bindir=$(CONFIGURE_PREFIX)/bin \
+ --sbindir=$(CONFIGURE_PREFIX)/sbin \
+ --libexecdir=$(CONFIGURE_PREFIX)/lib \
+ --sysconfdir=/etc \
+ --datadir=$(CONFIGURE_PREFIX)/share \
+ --localstatedir=/var \
+ --mandir=$(CONFIGURE_PREFIX)/man \
+ --infodir=$(CONFIGURE_PREFIX)/info \
+ --optimize-for-size \
+ $(DISABLE_IPV6)
+
+ifeq ($(CONFIG_SOFT_FLOAT),y)
+CONFIGURE_ARGS += --disable-neon
+endif
+
+TARGET_LDFLAGS += \
+ -Wl,--gc-sections,--as-needed \
+ -lpthread
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/include
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/botan* $(1)/usr/include/
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.so* $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.a $(1)/usr/lib/
+endef
+
+define Package/libbotan/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.so* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,libbotan))
--- /dev/null
+#
+# Copyright (C) 2019 CZ.NIC z.s.p.o. (http://www.nic.cz/)
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+#
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=czmq
+PKG_VERSION:=4.2.0
+PKG_RELEASE:=2
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://github.com/zeromq/czmq/releases/download/v$(PKG_VERSION)/
+PKG_HASH:=cfab29c2b3cc8a845749758a51e1dd5f5160c1ef57e2a41ea96e4c2dcc8feceb
+
+PKG_INSTALL:=1
+PKG_FIXUP:=autoreconf
+
+PKG_LICENSE:=MPLv2
+PKG_LICENSE_FILES:=LICENSE
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+
+PKG_ABI_VERSION:=4
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/autotools.mk
+
+define Package/czmq
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=CZMQ High-level C binding for ZeroMQ
+ URL:=http://czmq.zeromq.org
+ ABI_VERSION:=$(PKG_ABI_VERSION)
+ DEPENDS:=+libzmq +libuuid +libpcre +libmicrohttpd +liblz4 +libcurl
+endef
+
+define Package/czmq/description
+ High-level C binding for ZeroMQ which is high-performance asynchronous messaging
+ library, aimed at use in distributed or concurrent applications.
+endef
+
+TARGET_CFLAGS += --std=c99
+CONFIGURE_ARGS += --without-docs
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
+ $(INSTALL_DIR) $(1)/usr/include
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/
+endef
+
+define Package/czmq/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/zmakecert $(1)/usr/bin/zmakecert
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libczmq.so.$(PKG_VERSION) $(1)/usr/lib/
+ $(LN) /usr/lib/libczmq.so.$(PKG_VERSION) $(1)/usr/lib/libczmq.so
+ $(LN) /usr/lib/libczmq.so.$(PKG_VERSION) $(1)/usr/lib/libczmq.so.$(PKG_ABI_VERSION)
+endef
+
+$(eval $(call BuildPackage,czmq))
include $(TOPDIR)/rules.mk
PKG_NAME:=dtc
-PKG_VERSION:=1.4.7
+PKG_VERSION:=1.5.0
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_HASH:=6643e8f00ff86350f465bb54b2185058b5b1b7bac01a0842c81a52b86589cde7
+PKG_HASH:=c672e443c9f7e39f5a7c8e602da6777f9ad55ad70de87de300a43828c8050172
PKG_SOURCE_URL:=@KERNEL/software/utils/dtc
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=GPL
$(CP) $(PKG_INSTALL_DIR)/lib/libfdt*.so* $(1)/usr/lib
endef
-TARGET_CFLAGS += \
- $(FPIC)
-
# NO_PYTHON is for disabling pylibfdt
MAKE_FLAGS += \
PREFIX= \
NO_PYTHON=1 \
- CFLAGS="$(TARGET_CFLAGS)"
+ NO_VALGRIND=1 \
+ NO_YAML=1 \
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/lib
--- /dev/null
+--- a/Makefile.orig 2019-03-15 03:55:48.407966162 +0000
++++ b/Makefile 2019-03-15 03:56:01.320976021 +0000
+@@ -15,10 +15,10 @@ EXTRAVERSION =
+ LOCAL_VERSION =
+ CONFIG_LOCALVERSION =
+
+-CPPFLAGS = -I libfdt -I .
++CPPFLAGS += -I libfdt -I .
+ WARNINGS = -Wall -Wpointer-arith -Wcast-qual -Wnested-externs \
+ -Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls -Wshadow
+-CFLAGS = -g -Os $(SHAREDLIB_CFLAGS) -Werror $(WARNINGS)
++CFLAGS += $(SHAREDLIB_CFLAGS) -Werror $(WARNINGS)
+
+ BISON = bison
+ LEX = flex
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE.md
PKG_VERSION:=0.8.21
-PKG_RELEASE:=1
+PKG_RELEASE:=3
# Use this for official releasees
PKG_HASH:=51892570f18d1667d0da4d0908a091e41b41c20db9835765677109a3d150cd26
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/cmake.mk
+include $(INCLUDE_DIR)/nls.mk
define Package/libelektra/Default
SECTION:=libs
define Package/libelektra-plugins
$(call Package/libelektra/Default)
TITLE:=Useful elektra plugins
- DEPENDS:=+libelektra-core
+ DEPENDS:=+libelektra-core $(ICONV_DEPENDS)
endef
define CONTENT_ELEKTRA_PLUGINS_TEXT
-DKDB_DEFAULT_RESOLVER=resolver_fm_pb_b \
-DKDB_DEFAULT_STORAGE=ini \
-DENABLE_OPTIMIZATIONS=OFF \
- -DPLUGINS="ALL;-multifile"
+ -DPLUGINS="ALL;-multifile" \
+ -DICONV_FIND_REQUIRED=ON \
+ -DICONV_INCLUDE_DIR="$(ICONV_PREFIX)/include" \
+ -DICONV_LIBRARY="$(ICONV_PREFIX)/lib"
CMAKE_HOST_OPTIONS = \
-DCMAKE_SKIP_RPATH=FALSE \
--- /dev/null
+--- a/src/plugins/crypto/openssl_operations.c
++++ b/src/plugins/crypto/openssl_operations.c
+@@ -25,6 +25,10 @@
+ #include <stdlib.h>
+ #include <string.h>
+
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#define EVP_CIPHER_CTX_reset EVP_CIPHER_CTX_cleanup
++#endif
++
+ #define KEY_BUFFER_SIZE (ELEKTRA_CRYPTO_SSL_KEYSIZE + ELEKTRA_CRYPTO_SSL_BLOCKSIZE)
+
+ /*
+@@ -144,8 +148,10 @@ int elektraCryptoOpenSSLInit (Key * errorKey ELEKTRA_UNUSED)
+ // initialize OpenSSL according to
+ // https://wiki.openssl.org/index.php/Library_Initialization
+ pthread_mutex_lock (&mutex_ssl);
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ OpenSSL_add_all_algorithms ();
+ ERR_load_crypto_strings ();
++#endif
+ pthread_mutex_unlock (&mutex_ssl);
+ return 1;
+ }
+@@ -246,8 +252,8 @@ void elektraCryptoOpenSSLHandleDestroy (elektraCryptoHandle * handle)
+ if (handle)
+ {
+ pthread_mutex_lock (&mutex_ssl);
+- EVP_CIPHER_CTX_cleanup (handle->encrypt);
+- EVP_CIPHER_CTX_cleanup (handle->decrypt);
++ EVP_CIPHER_CTX_reset (handle->encrypt);
++ EVP_CIPHER_CTX_reset (handle->decrypt);
+ EVP_CIPHER_CTX_free (handle->encrypt);
+ EVP_CIPHER_CTX_free (handle->decrypt);
+ pthread_mutex_unlock (&mutex_ssl);
PKG_NAME:=faad2
PKG_VERSION:=2.8.8
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/faac/faad2-src/$(PKG_NAME)-2.8.0
CONFIGURE_ARGS+= -nfp
endif
-ifeq ($(CONFIG_USE_UCLIBC),y)
- CONFIGURE_VARS+= CPPFLAGS="-fno-builtin-cos -fno-builtin-sin -fno-builtin-log"
-endif
-
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include
--- /dev/null
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=fbthrift
+PKG_VERSION:=2019.06.10.00
+PKG_RELEASE:=2
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/facebook/fbthrift/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=0897c66564a2742b24dd6ae77812b42987c3493944d1d5d40d4005d71deb7cb5
+
+PKG_MAINTAINER:=Amol Bhave <ambhave@fb.com>
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=LICENSE
+
+HOST_BUILD_DEPENDS:=libmstch/host
+PKG_BUILD_DEPENDS:=fbthrift/host
+
+HOST_BUILD_PARALLEL:=1
+PKG_BUILD_PARALLEL:=1
+CMAKE_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+define Package/fbthrift
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=Facebook's branch of Apache Thrift, including a new C++ server.
+ DEPENDS:=+libwangle +libfmt +librsocket-cpp
+endef
+
+define Package/fbthrift/description
+ Facebook's branch of Apache Thrift, including a new C++ server.
+endef
+
+CMAKE_HOST_OPTIONS += \
+ -DBoost_NO_BOOST_CMAKE=ON \
+ -DCMAKE_SKIP_RPATH=FALSE \
+ -DCMAKE_INSTALL_RPATH="${STAGING_DIR_HOSTPKG}/lib" \
+ -Dcompiler_only=ON
+
+CMAKE_OPTIONS += \
+ -DBoost_NO_BOOST_CMAKE=ON \
+ -DBUILD_SHARED_LIBS=ON \
+ -DCMAKE_POSITION_INDEPENDENT_CODE=ON \
+ -Dlib_only=ON \
+ -DTHRIFT1="$(STAGING_DIR_HOSTPKG)/bin/thrift1" \
+ -DTHRIFT_COMPILER_INCLUDE="$(STAGING_DIR_HOSTPKG)/include/"
+
+define Package/fbthrift/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.so* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,fbthrift))
+$(eval $(call HostBuild))
--- /dev/null
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=fbzmq
+PKG_VERSION:=2019.06.10.00
+PKG_RELEASE:=3
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/facebook/fbzmq/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=9bb9b2bd42951fa3458b5d6d25f3364c14a7efa3b78bef68a6c00ee6fcba5813
+
+PKG_MAINTAINER:=Amol Bhave <ambhave@fb.com>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+
+CMAKE_SOURCE_SUBDIR:=fbzmq
+PKG_BUILD_PARALLEL:=1
+CMAKE_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+define Package/fbzmq
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=Facebook ZeroMQ wrappers.
+ DEPENDS:=+fbthrift +libzmq +libsigar
+endef
+
+define Package/fbzmq/description
+ Facebook ZeroMQ wrappers.
+endef
+
+CMAKE_OPTIONS += \
+ -DCMAKE_POSITION_INDEPENDENT_CODE=ON \
+ -DBUILD_TESTS=OFF \
+ -DBUILD_SHARED_LIBS=ON \
+ -DTHRIFT1="$(STAGING_DIR_HOSTPKG)/bin/thrift1" \
+ -DTHRIFT_COMPILER_INCLUDE="$(STAGING_DIR_HOSTPKG)/include/"
+
+TARGET_CXXFLAGS += -faligned-new
+
+define Package/fbzmq/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfbzmq.so* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,fbzmq))
--- /dev/null
+--- a/fbzmq/zmq/Message.cpp
++++ b/fbzmq/zmq/Message.cpp
+@@ -35,7 +35,7 @@ Message::allocate(size_t size) noexcept {
+ if (rc != 0) {
+ return folly::makeUnexpected(Error());
+ }
+- return std::move(msg);
++ return msg;
+ }
+
+ folly::Expected<Message, Error>
+@@ -58,7 +58,7 @@ Message::wrapBuffer(std::unique_ptr<folly::IOBuf> buf) noexcept {
+ delete ptr;
+ return folly::makeUnexpected(Error());
+ }
+- return std::move(msg);
++ return msg;
+ }
+
+ Message&
+--- a/fbzmq/zmq/Socket.cpp
++++ b/fbzmq/zmq/Socket.cpp
+@@ -449,7 +449,7 @@ SocketImpl::recv(int flags) const noexcept {
+ while (true) {
+ const int n = zmq_msg_recv(&(msg.msg_), ptr_, flags);
+ if (n >= 0) {
+- return std::move(msg);
++ return msg;
+ }
+
+ const int err = zmq_errno();
include $(TOPDIR)/rules.mk
PKG_NAME:=fcgi
-PKG_VERSION:=2.4.1
+PKG_VERSION:=2.4.2
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)2-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/FastCGI-Archives/fcgi2/tar.gz/$(PKG_VERSION)?
-PKG_HASH:=53cc36624bb92a88e3d5a3d696282e1af24b280c3f275604123d9c6d407173e2
+PKG_HASH:=1fe83501edfc3a7ec96bb1e69db3fd5ea1730135bd73ab152186fd0b437013bc
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)2-$(PKG_VERSION)
PKG_MAINTAINER:=Jacob Siverskog <jacob@teenageengineering.com>
server specific APIs.
endef
+TARGET_CXXFLAGS += -fno-rtti -flto
+TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
+
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/fastcgi.h $(1)/usr/include/
-diff --git a/include/fcgio.h b/include/fcgio.h
-index 20d222a..92eda3c 100644
--- a/include/fcgio.h
+++ b/include/fcgio.h
@@ -77,10 +77,10 @@ protected:
// Use a buffer. The only reasons that a buffer would be useful is
// to support the use of the unget()/putback() or seek() methods. Using
-diff --git a/libfcgi/fcgio.cpp b/libfcgi/fcgio.cpp
-index 5a54c11..e57b622 100644
--- a/libfcgi/fcgio.cpp
+++ b/libfcgi/fcgio.cpp
-@@ -89,7 +89,7 @@ int fcgi_streambuf::sync()
+@@ -86,7 +86,7 @@ int fcgi_streambuf::sync()
}
// uflow() removes the char, underflow() doesn't
{
if (this->bufsize)
{
-@@ -103,7 +103,7 @@ int fcgi_streambuf::uflow()
+@@ -100,7 +100,7 @@ int fcgi_streambuf::uflow()
}
}
+++ /dev/null
-diff --git a/Makefile.am b/Makefile.am
-index b35f7f3..c34a274 100755
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -4,7 +4,7 @@
- # $Id: Makefile.am,v 1.8 2003/11/02 21:42:47 robs Exp $
- #
-
--SUBDIRS = libfcgi cgi-fcgi examples include
-+SUBDIRS = libfcgi cgi-fcgi include
-
- include_HEADERS = fcgi_config.h
-
+++ /dev/null
-diff --git a/libfcgi/fcgio.cpp b/libfcgi/fcgio.cpp
-index 5a54c11..9ecca45 100644
---- a/libfcgi/fcgio.cpp
-+++ b/libfcgi/fcgio.cpp
-@@ -23,6 +23,7 @@
- #endif
-
- #include <limits.h>
-+#include <stdio.h>
- #include "fcgio.h"
-
- using std::streambuf;
+++ /dev/null
-From 78fac26891fe7494355021dbac109b807b8c6d53 Mon Sep 17 00:00:00 2001
-From: Joachim Nilsson <troglobit@gmail.com>
-Date: Mon, 14 May 2018 15:40:43 +0200
-Subject: [PATCH] Convert AM_INIT_AUTOMAKE() --> AC_INIT() and trigger non-GNU
- project
-
-Converts from old-style configure syntax with AM_INIT_AUTOMAKE to
-AC_INIT and enable "foreign" mode, i.e. non-GNU conformant tree
-to avoid copying in COPYING and other files when autogen.sh runs.
-
-Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
----
- configure.in | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/configure.in b/configure.in
-index 2f72645..c5fbc4b 100755
---- a/configure.in
-+++ b/configure.in
-@@ -4,8 +4,8 @@ dnl This file is an input file used by the GNU "autoconf" program to
- dnl generate the file "configure", which is run during the build
- dnl to configure the system for the local environment.
-
--AC_INIT
--AM_INIT_AUTOMAKE(fcgi, 2.4.1-SNAP-0910052249)
-+AC_INIT(fcgi, 2.4.1-SNAP-0910052249)
-+AM_INIT_AUTOMAKE([1.11 foreign])
-
- AM_CONFIG_HEADER(fcgi_config.h)
-
---
-2.20.0
-
include $(TOPDIR)/rules.mk
PKG_NAME:=file
-PKG_VERSION:=5.35
+PKG_VERSION:=5.37
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://src.fedoraproject.org/lookaside/pkgs/file/ \
http://download.openpkg.org/components/cache/file/ \
ftp://ftp.astron.com/pub/file/
-PKG_HASH:=30c45e817440779be7aac523a905b123cba2a6ed0bf4f5439e1e99ba940b5546
+PKG_HASH:=e9c13967f7dd339a3c241b7710ba093560b9a33013491318e88e6b8b57bae07f
PKG_LICENSE:=BSD-2c
PKG_LICENSE_FILES:=COPYING
DEPENDS:=+zlib
endef
+TARGET_CFLAGS += $(FPIC)
+TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
+
CONFIGURE_ARGS += \
--enable-shared \
--enable-static \
- --disable-libseccomp
+ --disable-libseccomp \
+ --disable-rpath \
+ --disable-warnings \
+ --without-pic
MAKE_PATH := src
-TARGET_CFLAGS += $(FPIC)
-
define Build/Compile/magic
( cd $(PKG_BUILD_DIR)/magic/Magdir; \
for f in `ls`; do \
include $(TOPDIR)/rules.mk
PKG_NAME:=freetype
-PKG_VERSION:=2.9.1
-PKG_RELEASE:=2
+PKG_VERSION:=2.10.1
+PKG_RELEASE:=1
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@SF/freetype
-PKG_HASH:=db8d87ea720ea9d5edc5388fc7a0497bb11ba9fe972245e0f7f4c7e8b1e1e84d
+PKG_HASH:=16dbfa488a21fe827dc27eaf708f42f7aa3bb997d745d31a19781628c36ba26f
-PKG_LICENSE:=FTL GPL-2.0 MIT ZLIB
-PKG_LICENSE_FILES:=docs/LICENSE.TXT docs/FTL.TXT docs/GPLv2.TXT src/bdf/README src/pcf/README src/gzip/zlib.h
+PKG_LICENSE:=FTL GPL-2.0-only MIT ZLIB GPL-3.0-or-later
+PKG_LICENSE_FILES:=docs/LICENSE.TXT docs/FTL.TXT docs/GPLv2.TXT src/bdf/README src/pcf/README src/gzip/zlib.h builds/unix/config.sub builds/unix/config.guess builds/unix/libtool
PKG_CPE_ID:=cpe:/a:freetype:freetype2
PKG_MAINTAINER:=Val Kulkov <val.kulkov@gmail.com>
include $(TOPDIR)/rules.mk
PKG_NAME:=gdbm
-PKG_VERSION:=1.11
+PKG_VERSION:=1.18.1
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@GNU/gdbm
-PKG_HASH:=8d912f44f05d0b15a4a5d96a76f852e905d051bb88022fcdfd98b43be093e3c3
+PKG_HASH:=86e613527e5dba544e73208f42b78b7c022d4fa5a6d5498bf18c8d6f745b91dc
-PKG_LICENSE:=GPL-3.0+
-PKG_LICENSE_FILES:=COPYING
PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
+PKG_LICENSE:=GPL-3.0-or-later
+PKG_LICENSE_FILES:=COPYING
-PKG_FIXUP:=autoreconf gettext-version
-PKG_REMOVE_FILES:=Makefile compat/Makefile doc/Makefile export/Makefile src/Makefile tests/Makefile
+PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=0
-
PKG_BUILD_DEPENDS:=gettext-full/host
include $(INCLUDE_DIR)/package.mk
SECTION:=libs
CATEGORY:=Libraries
TITLE:=GNU database manager
- URL:=http://www.gnu.org/software/gdbm/
+ URL:=https://www.gnu.org/software/gdbm/
endef
define Package/libgdbm/description
works similar to the standard UNIX dbm routines.
endef
-TARGET_CFLAGS += $(FPIC)
-
CONFIGURE_ARGS += \
--enable-shared \
- --enable-static \
+ --enable-static
define Build/Compile
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
include $(TOPDIR)/rules.mk
PKG_NAME:=getdns
-PKG_VERSION:=1.5.0
-PKG_RELEASE:=1
+PKG_VERSION:=1.5.2
+PKG_RELEASE:=2
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://getdnsapi.net/dist/
-PKG_HASH:=577182c3ace919ee70cee5629505581a10dc530bd53fe5c241603ea91c84fa84
+PKG_HASH:=1826a6a221ea9e9301f2c1f5d25f6f5588e841f08b967645bf50c53b970694c0
PKG_FIXUP:=autoreconf
define Package/getdns/install
$(INSTALL_DIR) $(1)/usr/lib
- $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libgetdns.so.* $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgetdns.so.* $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/getdns_query $(1)/usr/sbin/getdns_query
endef
PKG_NAME:=glib2
PKG_VERSION:=2.58.3
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=glib-$(PKG_VERSION).tar.xz
PKG_BUILD_DIR:=$(BUILD_DIR)/glib-$(PKG_VERSION)
--- /dev/null
+From d8f8f4d637ce43f8699ba94c9b7648beda0ca174 Mon Sep 17 00:00:00 2001
+From: Ondrej Holy <oholy@redhat.com>
+Date: Thu, 23 May 2019 10:41:53 +0200
+Subject: [PATCH] gfile: Limit access to files when copying
+
+file_copy_fallback creates new files with default permissions and
+set the correct permissions after the operation is finished. This
+might cause that the files can be accessible by more users during
+the operation than expected. Use G_FILE_CREATE_PRIVATE for the new
+files to limit access to those files.
+---
+ gio/gfile.c | 11 ++++++-----
+ 1 file changed, 6 insertions(+), 5 deletions(-)
+
+diff --git a/gio/gfile.c b/gio/gfile.c
+index 24b136d80..74b58047c 100644
+--- a/gio/gfile.c
++++ b/gio/gfile.c
+@@ -3284,12 +3284,12 @@ file_copy_fallback (GFile *source,
+ out = (GOutputStream*)_g_local_file_output_stream_replace (_g_local_file_get_filename (G_LOCAL_FILE (destination)),
+ FALSE, NULL,
+ flags & G_FILE_COPY_BACKUP,
+- G_FILE_CREATE_REPLACE_DESTINATION,
+- info,
++ G_FILE_CREATE_REPLACE_DESTINATION |
++ G_FILE_CREATE_PRIVATE, info,
+ cancellable, error);
+ else
+ out = (GOutputStream*)_g_local_file_output_stream_create (_g_local_file_get_filename (G_LOCAL_FILE (destination)),
+- FALSE, 0, info,
++ FALSE, G_FILE_CREATE_PRIVATE, info,
+ cancellable, error);
+ }
+ else if (flags & G_FILE_COPY_OVERWRITE)
+@@ -3297,12 +3297,13 @@ file_copy_fallback (GFile *source,
+ out = (GOutputStream *)g_file_replace (destination,
+ NULL,
+ flags & G_FILE_COPY_BACKUP,
+- G_FILE_CREATE_REPLACE_DESTINATION,
++ G_FILE_CREATE_REPLACE_DESTINATION |
++ G_FILE_CREATE_PRIVATE,
+ cancellable, error);
+ }
+ else
+ {
+- out = (GOutputStream *)g_file_create (destination, 0, cancellable, error);
++ out = (GOutputStream *)g_file_create (destination, G_FILE_CREATE_PRIVATE, cancellable, error);
+ }
+
+ if (!out)
+--
+2.21.0
+
bool "enable DTLS heartbeat support"
default y
-config GNUTLS_OPENPGP
- bool "enable OPENPGP authentication support"
- default n
-
config GNUTLS_SRP
bool "enable SRP authentication support"
default n
include $(TOPDIR)/rules.mk
PKG_NAME:=gnutls
-PKG_VERSION:=3.6.5
-PKG_RELEASE:=1
+PKG_VERSION:=3.6.8
+PKG_RELEASE:=2
PKG_USE_MIPS16:=0
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://www.gnupg.org/ftp/gcrypt/gnutls/v3.6
-PKG_HASH:=073eced3acef49a3883e69ffd5f0f0b5f46e2760ad86eddc6c0866df4e7abb35
+PKG_HASH:=aa81944e5635de981171772857e72be231a7e0f559ae0292d2737de475383e83
#PKG_FIXUP:=autoreconf gettext-version
PKG_MAINTAINER:=Nikos Mavrogiannopoulos <nmav@gnutls.org>
PKG_LICENSE:=LGPLv2.1+
PKG_CPE_ID:=cpe:/a:gnu:gnutls
PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
PKG_LIBTOOL_PATHS:=. lib
-PKG_CHECK_FORMAT_SECURITY:=0
PKG_CONFIG_DEPENDS:= \
CONFIG_GNUTLS_ALPN \
CONFIG_GNUTLS_EXT_LIBTASN1 \
CONFIG_GNUTLS_HEARTBEAT \
CONFIG_GNUTLS_OCSP \
- CONFIG_GNUTLS_OPENPGP \
CONFIG_GNUTLS_PKCS11 \
CONFIG_GNUTLS_PSK \
CONFIG_GNUTLS_SRP \
define Package/libgnutls
$(call Package/gnutls/Default)
TITLE+= (library)
- DEPENDS+= +libnettle +!LIBNETTLE_MINI:libgmp +GNUTLS_EXT_LIBTASN1:libtasn1 +GNUTLS_PKCS11:p11-kit +GNUTLS_CRYPTODEV:kmod-cryptodev
+ DEPENDS+= +libnettle +!LIBNETTLE_MINI:libgmp +GNUTLS_EXT_LIBTASN1:libtasn1 +GNUTLS_PKCS11:p11-kit +GNUTLS_CRYPTODEV:kmod-cryptodev +libatomic
endef
define Package/libgnutls/description
CONFIGURE_ARGS+= \
--enable-shared \
--enable-static \
+ --disable-doc \
+ --disable-gcc-warnings \
+ --disable-guile \
--disable-rpath \
+ --disable-seccomp-tests \
+ --disable-tests \
+ --disable-valgrind-tests \
+ \
--disable-libdane \
- --with-included-unistring \
- --disable-guile \
- --disable-nls \
- --without-idn \
- --without-zlib \
+ --disable-ssl2-support \
+ --disable-ssl3-support \
--enable-local-libopts \
- --disable-doc \
- --disable-tests \
+ --without-idn \
--with-default-trust-store-dir=/etc/ssl/certs/ \
- --disable-crywrap \
- --with-librt-prefix="$(LIBRT_ROOT_DIR)/"
+ --with-included-unistring \
+ --with-librt-prefix="$(LIBRT_ROOT_DIR)/" \
+ --with-pic
ifneq ($(CONFIG_GNUTLS_EXT_LIBTASN1),y)
CONFIGURE_ARGS += --with-included-libtasn1
CONFIGURE_ARGS += --disable-psk-authentication
endif
-ifneq ($(CONFIG_GNUTLS_OPENPGP),y)
-CONFIGURE_ARGS += --disable-openpgp-authentication
-endif
-
ifneq ($(CONFIG_GNUTLS_ANON),y)
CONFIGURE_ARGS += --disable-anon-authentication
endif
CONFIGURE_ARGS += --enable-cryptodev
endif
-TARGET_CFLAGS += $(FPIC)
-
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib/pkgconfig
$(CP) \
--- /dev/null
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=google-authenticator-libpam
+PKG_VERSION:=1.06
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/google/google-authenticator-libpam/tar.gz/$(PKG_VERSION)?
+PKG_HASH:=52f03ec746e8deb1af37911697d096f0fa87583491b7cc460cdf09a6ef0d6b06
+
+PKG_MAINTAINER:=Lucian Cristian <lucian.cristian@gmail.com>
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_BUILD_PARALLEL:=1
+PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/google-authenticator-libpam
+ SECTION:=libs
+ CATEGORY:=Libraries
+ DEPENDS:=+libpam +libqrencode
+ TITLE:=Google Authenticator PAM module
+ URL:=https://github.com/google/google-authenticator-libpam
+endef
+
+define Package/google-authenticator-libpam/description
+ Google Authenticator PAM module
+endef
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/lib/security
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/security/* $(1)/lib/security/
+endef
+
+define Package/libpam-google-authenticator/install
+ $(INSTALL_DIR) $(1)/usr/lib/security
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/security/*.so* \
+ $(1)/usr/lib/security/
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/sbin/
+endef
+
+$(eval $(call BuildPackage,google-authenticator-libpam))
PKG_NAME:=hiredis
PKG_VERSION:=0.14.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/redis/hiredis/tar.gz/v$(PKG_VERSION)?
--- /dev/null
+commit f96d9f9d2e3ba39352035e6ac26463243484d404
+Author: Sebastian Kemper <sebastian_ml@gmx.net>
+Date: Sun Jan 13 19:25:52 2019 +0100
+
+ Setup .pc file to allow use for cross-compiling
+
+ The Makefile is currently creating the pkg-config file using static lib
+ and include dir statements. Change that so that projects that
+ cross-compile hiredis can use pkg-config to setup other programs
+ depending on it.
+
+ Note: these projects (like OpenWrt) call pkg-config with arguments to
+ overwrite some variables in the .pc file, namely:
+
+ --define-variable=prefix=<...>
+ --define-variable=exec_prefix=<...>
+
+ Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
+
+diff --git a/Makefile b/Makefile
+index 07b8a83..14d21de 100644
+--- a/Makefile
++++ b/Makefile
+@@ -166,8 +166,8 @@ $(PKGCONFNAME): hiredis.h
+ @echo "Generating $@ for pkgconfig..."
+ @echo prefix=$(PREFIX) > $@
+ @echo exec_prefix=\$${prefix} >> $@
+- @echo libdir=$(PREFIX)/$(LIBRARY_PATH) >> $@
+- @echo includedir=$(PREFIX)/$(INCLUDE_PATH) >> $@
++ @echo libdir=\$${exec_prefix}/$(LIBRARY_PATH) >> $@
++ @echo includedir=\$${prefix}/$(INCLUDE_PATH) >> $@
+ @echo >> $@
+ @echo Name: hiredis >> $@
+ @echo Description: Minimalistic C client library for Redis. >> $@
PKG_NAME:=hwloc
PKG_VERSION:=2.0.3
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://download.open-mpi.org/release/$(PKG_NAME)/v2.0
SECTION:=libs
CATEGORY:=Libraries
TITLE+= libraries
+ DEPENDS+=+libpciaccess
endef
define Package/libhwloc/description
PKG_NAME:=ibrcommon
PKG_VERSION:=1.0.1
-PKG_RELEASE:=6
+PKG_RELEASE:=7
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.ibr.cs.tu-bs.de/projects/ibr-dtn/releases
PKG_INSTALL:=1
PKG_FIXUP:=libtool
+include $(INCLUDE_DIR)/uclibc++.mk
include $(INCLUDE_DIR)/package.mk
define Package/ibrcommon
SECTION:=libs
CATEGORY:=Libraries
- DEPENDS:=+libstdcpp +libpthread +librt +libnl +libopenssl
+ DEPENDS:=$(CXX_DEPENDS) +librt +libnl +libopenssl
TITLE:=IBR Common C++ Library
endef
PKG_NAME:=ibrdtn
PKG_VERSION:=1.0.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.ibr.cs.tu-bs.de/projects/ibr-dtn/releases
PKG_INSTALL:=1
PKG_FIXUP:=libtool
+include $(INCLUDE_DIR)/uclibc++.mk
include $(INCLUDE_DIR)/package.mk
define Package/ibrdtn
--- /dev/null
+From 199c86591edc7e82b92903efecadc4f69ea63370 Mon Sep 17 00:00:00 2001
+From: Johannes Morgenroth <jm@m-network.de>
+Date: Tue, 1 Jan 2019 11:25:50 +0100
+Subject: [PATCH] Add operator!=() to Bundle::block_elem
+
+Alternative implementations of libstdcpp as uclibc++ use it in
+the algorithm implemenetations.
+---
+ ibrdtn/data/Bundle.h | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/ibrdtn/data/Bundle.h b/ibrdtn/data/Bundle.h
+index 036a2a6fb..9bbc066d7 100644
+--- a/ibrdtn/data/Bundle.h
++++ b/ibrdtn/data/Bundle.h
+@@ -69,6 +69,9 @@ namespace dtn
+ bool operator==(const dtn::data::block_t &type) const {
+ return (**this) == type;
+ }
++ bool operator!=(const dtn::data::block_t &type) const {
++ return !((**this) == type);
++ }
+ };
+
+ typedef std::list<block_elem> block_list;
--- /dev/null
+From 6945698778caf7cdaace9ce8dae82162dbe2ee9f Mon Sep 17 00:00:00 2001
+From: Johannes Morgenroth <jm@m-network.de>
+Date: Thu, 3 Jan 2019 07:26:51 +0100
+Subject: [PATCH] Use const iterator in const function of MemoryBundleSet
+
+---
+ ibrdtn/data/MemoryBundleSet.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/ibrdtn/data/MemoryBundleSet.cpp b/ibrdtn/data/MemoryBundleSet.cpp
+index 987342e6d..b67fdd393 100644
+--- a/ibrdtn/data/MemoryBundleSet.cpp
++++ b/ibrdtn/data/MemoryBundleSet.cpp
+@@ -134,7 +134,7 @@ namespace dtn
+ // the bundles set. This happen if the MemoryBundleSet gets deserialized.
+ if (!_consistent) return true;
+
+- bundle_set::iterator iter = _bundles.find(dtn::data::MetaBundle::create(bundle));
++ bundle_set::const_iterator iter = _bundles.find(dtn::data::MetaBundle::create(bundle));
+ return (iter != _bundles.end());
+ }
+
--- /dev/null
+From 1395d849d73147319ee422d2ce34de0bcb90e6f8 Mon Sep 17 00:00:00 2001
+From: Johannes Morgenroth <jm@m-network.de>
+Date: Thu, 3 Jan 2019 07:34:14 +0100
+Subject: [PATCH] Use std::streamoff instead of std::streampos
+
+---
+ ibrdtn/data/BundleMerger.cpp | 2 +-
+ ibrdtn/data/Dictionary.cpp | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/ibrdtn/data/BundleMerger.cpp b/ibrdtn/data/BundleMerger.cpp
+index 1cd20c522..b71a0849b 100644
+--- a/ibrdtn/data/BundleMerger.cpp
++++ b/ibrdtn/data/BundleMerger.cpp
+@@ -119,7 +119,7 @@ namespace dtn
+ }
+
+ ibrcommon::BLOB::iostream stream = c._blob.iostream();
+- (*stream).seekp(obj.fragmentoffset.get<std::streampos>());
++ (*stream).seekp(obj.fragmentoffset.get<std::streamoff>());
+
+ const dtn::data::PayloadBlock &p = obj.find<dtn::data::PayloadBlock>();
+ const Length plength = p.getLength();
+diff --git a/ibrdtn/data/Dictionary.cpp b/ibrdtn/data/Dictionary.cpp
+index 6299e66f3..208f90488 100644
+--- a/ibrdtn/data/Dictionary.cpp
++++ b/ibrdtn/data/Dictionary.cpp
+@@ -154,11 +154,11 @@ namespace dtn
+ {
+ char buffer[1024];
+
+- _bytestream.seekg(scheme.get<std::streampos>());
++ _bytestream.seekg(scheme.get<std::streamoff>());
+ _bytestream.get(buffer, 1024, '\0');
+ std::string scheme_str(buffer);
+
+- _bytestream.seekg(ssp.get<std::streampos>());
++ _bytestream.seekg(ssp.get<std::streamoff>());
+ _bytestream.get(buffer, 1024, '\0');
+ std::string ssp_str(buffer);
+
--- /dev/null
+From a5b9c2feeaabbd90c9734c5d865d471eed0d5e3a Mon Sep 17 00:00:00 2001
+From: Rosen Penev <rosenp@gmail.com>
+Date: Thu, 28 Mar 2019 01:55:15 -0700
+Subject: [PATCH] Add operator!=() to BundleID and MetaBundle
+
+Needed for uClibc++.
+
+Signed-off-by: Rosen Penev <rosenp@gmail.com>
+---
+ ibrdtn/data/Bundle.cpp | 10 ++++++++++
+ ibrdtn/data/Bundle.h | 2 ++
+ 2 files changed, 12 insertions(+)
+
+diff --git a/ibrdtn/data/Bundle.cpp b/ibrdtn/data/Bundle.cpp
+index f515860..943544e 100644
+--- a/ibrdtn/data/Bundle.cpp
++++ b/ibrdtn/data/Bundle.cpp
+@@ -71,11 +71,21 @@ namespace dtn
+ return other == (const PrimaryBlock&)(*this);
+ }
+
++ bool Bundle::operator!=(const BundleID& other) const
++ {
++ return other != (const PrimaryBlock&)(*this);
++ }
++
+ bool Bundle::operator==(const MetaBundle& other) const
+ {
+ return other == (const PrimaryBlock&)(*this);
+ }
+
++ bool Bundle::operator!=(const MetaBundle& other) const
++ {
++ return other != (const PrimaryBlock&)(*this);
++ }
++
+ bool Bundle::operator!=(const Bundle& other) const
+ {
+ return (const PrimaryBlock&)(*this) != (const PrimaryBlock&)other;
+diff --git a/ibrdtn/data/Bundle.h b/ibrdtn/data/Bundle.h
+index 9bbc066..6a4ea47 100644
+--- a/ibrdtn/data/Bundle.h
++++ b/ibrdtn/data/Bundle.h
+@@ -97,7 +97,9 @@ namespace dtn
+ virtual ~Bundle();
+
+ bool operator==(const BundleID& other) const;
++ bool operator!=(const BundleID& other) const;
+ bool operator==(const MetaBundle& other) const;
++ bool operator!=(const MetaBundle& other) const;
+
+ bool operator==(const Bundle& other) const;
+ bool operator!=(const Bundle& other) const;
include $(TOPDIR)/rules.mk
PKG_NAME:=icu4c
-PKG_VERSION:=63.1
-PKG_RELEASE:=1
+MAJOR_VERSION:=64
+MINOR_VERSION:=2
+PKG_VERSION:=$(MAJOR_VERSION).$(MINOR_VERSION)
+PKG_RELEASE:=2
-PKG_SOURCE:=$(PKG_NAME)-63_1-src.tgz
-PKG_SOURCE_URL:=http://download.icu-project.org/files/$(PKG_NAME)/$(PKG_VERSION)
-PKG_HASH:=05c490b69454fce5860b7e8e2821231674af0a11d7ef2febea9a32512998cb9d
+PKG_SOURCE:=$(PKG_NAME)-$(MAJOR_VERSION)_$(MINOR_VERSION)-src.tgz
+PKG_SOURCE_URL:=https://github.com/unicode-org/icu/releases/download/release-$(MAJOR_VERSION)-$(MINOR_VERSION)
+PKG_HASH:=627d5d8478e6d96fc8c90fed4851239079a561a6a8b9e48b0892f24e82d31d6c
PKG_LICENSE:=ICU-1.8.1+
PKG_LICENSE_FILES:=LICENSE
+PKG_CPE_ID:=cpe:/a:icu-project:international_components_for_unicode
PKG_MAINTAINER:=Hirokazu MORIKAWA <morikw2@gmail.com>
--enable-dyload \
--prefix=$(STAGING_DIR_HOSTPKG)
+define Build/Prepare
+ $(call Build/Prepare/Default)
+ mkdir -p $(PKG_BUILD_DIR)/data/out
+endef
+
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(INSTALL_DIR) $(1)/usr/lib
--- /dev/null
+--- a/runConfigureICU
++++ b/runConfigureICU
+@@ -239,8 +239,8 @@
+ THE_COMP="the GNU C++"
+ CC=gcc; export CC
+ CXX=g++; export CXX
+- RELEASE_CFLAGS='-O3'
+- RELEASE_CXXFLAGS='-O3'
++ RELEASE_CFLAGS=' '
++ RELEASE_CXXFLAGS=' '
+ DEBUG_CFLAGS='-g'
+ DEBUG_CXXFLAGS='-g'
+ ;;
--- /dev/null
+From cb5cf996d123014a2420c853c4db60e4500973b1 Mon Sep 17 00:00:00 2001
+From: Rosen Penev <rosenp@gmail.com>
+Date: Mon, 1 Apr 2019 04:52:32 -0700
+Subject: [PATCH] Add big endian ARM support (#92)
+
+This fixes compilation on such platforms.
+---
+ double-conversion/utils.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/source/i18n/double-conversion-utils.h b/source/i18n/double-conversion-utils.h
+index 1e44fca..b715c65 100644
+--- a/18n/double-conversion-utils.h
++++ b/i18n/double-conversion-utils.h
+@@ -99,7 +99,7 @@ int main(int argc, char** argv) {
+ defined(_POWER) || defined(_ARCH_PPC) || defined(_ARCH_PPC64) || \
+ defined(__sparc__) || defined(__sparc) || defined(__s390__) || \
+ defined(__SH4__) || defined(__alpha__) || \
+- defined(_MIPS_ARCH_MIPS32R2) || \
++ defined(_MIPS_ARCH_MIPS32R2) || defined(__ARMEB__) || \
+ defined(__AARCH64EL__) || defined(__aarch64__) || defined(__AARCH64EB__) || \
+ defined(__riscv) || \
+ defined(__or1k__) || defined(__arc__) || \
--- /dev/null
+--- a/i18n/decimfmt.cpp
++++ b/i18n/decimfmt.cpp
+@@ -1812,7 +1812,7 @@ bool DecimalFormat::fastFormatDouble(double input, UnicodeString& output) const
+ return false;
+ }
+ if (std::isnan(input)
+- || std::trunc(input) != input
++ || trunc(input) != input
+ || input <= INT32_MIN
+ || input > INT32_MAX) {
+ return false;
+--- a/i18n/number_decimalquantity.cpp
++++ b/i18n/number_decimalquantity.cpp
+@@ -446,7 +446,7 @@ void DecimalQuantity::_setToDoubleFast(double n) {
+ for (; i <= -22; i += 22) n /= 1e22;
+ n /= DOUBLE_MULTIPLIERS[-i];
+ }
+- auto result = static_cast<int64_t>(std::round(n));
++ auto result = static_cast<int64_t>(round(n));
+ if (result != 0) {
+ _setToLong(result);
+ scale -= fracLength;
--- /dev/null
+#
+# Author: Tibor Dudlák
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=jose
+PKG_VERSION:=10
+PKG_RELEASE:=2
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=https://github.com/latchset/$(PKG_NAME)/releases/download/v$(PKG_VERSION)/
+PKG_HASH:=5c9cdcfb535c4d9f781393d7530521c72b1dd81caa9934cab6dd752cc7efcd72
+
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
+
+PKG_FIXUP:=autoreconf
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libjose
+ SECTION:=libs
+ TITLE:=Provides a full crypto stack including key generation, signing and encryption.
+ DEPENDS:=+zlib +jansson +libopenssl +libpthread
+ URL:=https://github.com/latchset/jose
+ MAINTAINER:=Tibor Dudlák <tibor.dudlak@gmail.com>
+endef
+
+define Package/jose
+ SECTION:=utils
+ TITLE:=Provides a full crypto stack including key generation, signing and encryption.
+ DEPENDS:=+libjose
+ URL:=https://github.com/latchset/jose
+ MAINTAINER:=Tibor Dudlák <tibor.dudlak@gmail.com>
+endef
+
+define Package/jose/description
+ jose is a command line utility for performing various tasks on JSON
+ Object Signing and Encryption (JOSE) objects. José provides a full
+ crypto stack including key generation, signing and encryption.
+endef
+
+define Package/libjose/description
+ libjose is a library for performing various tasks on JSON
+ Object Signing and Encryption (JOSE) objects. José provides a full
+ crypto stack including key generation, signing and encryption.
+endef
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(INSTALL_DIR) $(1)/usr/include
+ $(INSTALL_DIR) $(1)/usr/include/$(PKG_NAME)
+ $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib$(PKG_NAME).so* $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/$(PKG_NAME)/*.h $(1)/usr/include/$(PKG_NAME)
+ $(CP) $(PKG_BUILD_DIR)/*.pc $(1)/usr/lib/pkgconfig
+endef
+
+define Package/libjose/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib$(PKG_NAME).so* $(1)/usr/lib/
+endef
+
+define Package/jose/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME) $(1)/usr/bin/
+endef
+
+$(eval $(call BuildPackage,libjose))
+$(eval $(call BuildPackage,jose))
--- /dev/null
+From 198f7207427ad7f569aa3592ea16e2bb400db040 Mon Sep 17 00:00:00 2001
+From: Nathaniel McCallum <npmccallum@redhat.com>
+Date: Fri, 29 Sep 2017 14:49:57 -0400
+Subject: [PATCH] Fix minor FILE* leak
+
+---
+ cmd/jwe/pwd.h | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/cmd/jwe/pwd.h b/cmd/jwe/pwd.h
+index 0b5be54..2f021eb 100644
+--- a/cmd/jwe/pwd.h
++++ b/cmd/jwe/pwd.h
+@@ -57,8 +57,10 @@ jwe_getpass(const char *prompt)
+ nf.c_lflag &= ~ECHO;
+ nf.c_lflag |= ECHONL;
+
+- if (tcsetattr(fileno(tty), TCSANOW, &nf) != 0)
++ if (tcsetattr(fileno(tty), TCSANOW, &nf) != 0) {
++ fclose(tty);
+ return NULL;
++ }
+
+ fprintf(tty, "%s", prompt);
+
+@@ -72,6 +74,7 @@ jwe_getpass(const char *prompt)
+ }
+
+ tcsetattr(fileno(tty), TCSANOW, &of);
++ fclose(tty);
+ return pwd;
+ }
+ #endif
--- /dev/null
+--- a/lib/openssl/compat.h
++++ b/lib/openssl/compat.h
+@@ -17,6 +17,7 @@
+
+ #pragma once
+
++#include <openssl/bn.h>
+ #include <openssl/hmac.h>
+ #include <openssl/ec.h>
+ #include <openssl/ecdsa.h>
+--- a/lib/openssl/misc.c
++++ b/lib/openssl/misc.c
+@@ -185,6 +185,8 @@ add_entity(json_t *root, json_t *obj, const char *plural, ...)
+ static void __attribute__((constructor))
+ constructor(void)
+ {
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ OpenSSL_add_all_algorithms();
++#endif
+ RAND_poll();
+ }
PKG_NAME:=ldns
PKG_VERSION:=1.7.0
-PKG_RELEASE:=4
+PKG_RELEASE:=5
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.nlnetlabs.nl/downloads/ldns
$(CP) $(PKG_INSTALL_DIR)/usr/include/ldns $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libldns.{a,so*} $(1)/usr/lib/
+ $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+ $(CP) $(PKG_BUILD_DIR)/packaging/libldns.pc $(1)/usr/lib/pkgconfig
endef
define Package/libldns/install
include $(TOPDIR)/rules.mk
PKG_NAME:=libaio
-PKG_VERSION:=0.3.111
+PKG_VERSION:=0.3.112
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://releases.pagure.org/libaio
-PKG_HASH:=62cf871ad8fd09eb3418f00aca7a7d449299b8e1de31c65f28bf6a2ef1fa502a
-PKG_MAINTAINER:=Steven Barth <cyrus@openwrt.org>
-PKG_LICENSE:=LGPL-2.1
+PKG_HASH:=ab0462f2c9d546683e5147b1ce9c195fe95d07fac5bf362f6c01637955c3b492
-PKG_ASLR_PIE:=1
-PKG_BUILD_PARALLEL:=1
+PKG_MAINTAINER:=Rosen Penev <rosenp@gmail.com>
+PKG_LICENSE:=LGPL-2.1-only
+PKG_LICENSE_FILES:=COPYING
+PKG_BUILD_PARALLEL:=1
PKG_USE_MIPS16:=0
+PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
URL:=http://lse.sourceforge.net/io/aio.html
endef
-define Build/Configure
-endef
-
-LIBAIO_CFLAGS:=-nostdlib -nostartfiles -I. $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(FPIC)
-
-define Build/Compile
- $(MAKE) -C $(PKG_BUILD_DIR) \
- $(TARGET_CONFIGURE_OPTS) \
- ARCH="$(ARCH)" \
- CC="$(TARGET_CROSS)gcc" \
- LD="$(TARGET_CROSS)ld" \
- CFLAGS="$(LIBAIO_CFLAGS)" \
- all
- $(MAKE) -C $(PKG_BUILD_DIR) \
- prefix="$(PKG_INSTALL_DIR)/usr" \
- install
-endef
-
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/libaio.h $(1)/usr/include/
+#endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */
--- a/src/libaio.h
+++ b/src/libaio.h
-@@ -71,6 +71,7 @@ typedef enum io_iocb_cmd {
+@@ -72,6 +72,7 @@ typedef enum io_iocb_cmd {
/* big endian, 64 bits */
#elif defined(__powerpc64__) || defined(__s390x__) || \
#define KERNEL_RW_POINTER ((void *)0x10100000)
--- a/src/libaio.h
+++ b/src/libaio.h
-@@ -51,7 +51,8 @@ typedef enum io_iocb_cmd {
+@@ -52,7 +52,8 @@ typedef enum io_iocb_cmd {
/* little endian, 32 bits */
#if defined(__i386__) || (defined(__arm__) && !defined(__ARMEB__)) || \
defined(__cris__) || (defined(__riscv) && __riscv_xlen == 32) || \
(defined(__GNUC__) && defined(__BYTE_ORDER__) && \
__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ && __SIZEOF_LONG__ == 4)
-@@ -83,6 +84,7 @@ typedef enum io_iocb_cmd {
+@@ -84,6 +85,7 @@ typedef enum io_iocb_cmd {
/* big endian, 32 bits */
#elif defined(__PPC__) || defined(__s390__) || \
(defined(__arm__) && defined(__ARMEB__)) || \
--- a/src/libaio.h
+++ b/src/libaio.h
-@@ -52,7 +52,8 @@ typedef enum io_iocb_cmd {
+@@ -53,7 +53,8 @@ typedef enum io_iocb_cmd {
/* little endian, 32 bits */
#if defined(__i386__) || (defined(__arm__) && !defined(__ARMEB__)) || \
(defined(__sh__) && defined(__LITTLE_ENDIAN__)) || \
defined(__cris__) || (defined(__riscv) && __riscv_xlen == 32) || \
(defined(__GNUC__) && defined(__BYTE_ORDER__) && \
__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ && __SIZEOF_LONG__ == 4)
-@@ -62,6 +63,7 @@ typedef enum io_iocb_cmd {
+@@ -63,6 +64,7 @@ typedef enum io_iocb_cmd {
/* little endian, 64 bits */
#elif defined(__ia64__) || defined(__x86_64__) || defined(__alpha__) || \
(defined(__aarch64__) && defined(__AARCH64EL__)) || \
(defined(__riscv) && __riscv_xlen == 64) || \
(defined(__GNUC__) && defined(__BYTE_ORDER__) && \
-@@ -74,6 +76,7 @@ typedef enum io_iocb_cmd {
+@@ -75,6 +77,7 @@ typedef enum io_iocb_cmd {
#elif defined(__powerpc64__) || defined(__s390x__) || \
(defined(__hppa__) && defined(__arch64__)) || \
(defined(__sparc__) && defined(__arch64__)) || \
PKG_NAME:=libarchive
PKG_VERSION:=3.3.3
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://www.libarchive.org/downloads
--- /dev/null
+From 65a23f5dbee4497064e9bb467f81138a62b0dae1 Mon Sep 17 00:00:00 2001
+From: Daniel Axtens <dja@axtens.net>
+Date: Tue, 1 Jan 2019 16:01:40 +1100
+Subject: [PATCH] 7zip: fix crash when parsing certain archives
+
+Fuzzing with CRCs disabled revealed that a call to get_uncompressed_data()
+would sometimes fail to return at least 'minimum' bytes. This can cause
+the crc32() invocation in header_bytes to read off into invalid memory.
+
+A specially crafted archive can use this to cause a crash.
+
+An ASAN trace is below, but ASAN is not required - an uninstrumented
+binary will also crash.
+
+==7719==ERROR: AddressSanitizer: SEGV on unknown address 0x631000040000 (pc 0x7fbdb3b3ec1d bp 0x7ffe77a51310 sp 0x7ffe77a51150 T0)
+==7719==The signal is caused by a READ memory access.
+ #0 0x7fbdb3b3ec1c in crc32_z (/lib/x86_64-linux-gnu/libz.so.1+0x2c1c)
+ #1 0x84f5eb in header_bytes (/tmp/libarchive/bsdtar+0x84f5eb)
+ #2 0x856156 in read_Header (/tmp/libarchive/bsdtar+0x856156)
+ #3 0x84e134 in slurp_central_directory (/tmp/libarchive/bsdtar+0x84e134)
+ #4 0x849690 in archive_read_format_7zip_read_header (/tmp/libarchive/bsdtar+0x849690)
+ #5 0x5713b7 in _archive_read_next_header2 (/tmp/libarchive/bsdtar+0x5713b7)
+ #6 0x570e63 in _archive_read_next_header (/tmp/libarchive/bsdtar+0x570e63)
+ #7 0x6f08bd in archive_read_next_header (/tmp/libarchive/bsdtar+0x6f08bd)
+ #8 0x52373f in read_archive (/tmp/libarchive/bsdtar+0x52373f)
+ #9 0x5257be in tar_mode_x (/tmp/libarchive/bsdtar+0x5257be)
+ #10 0x51daeb in main (/tmp/libarchive/bsdtar+0x51daeb)
+ #11 0x7fbdb27cab96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310
+ #12 0x41dd09 in _start (/tmp/libarchive/bsdtar+0x41dd09)
+
+This was primarly done with afl and FairFuzz. Some early corpus entries
+may have been generated by qsym.
+---
+ libarchive/archive_read_support_format_7zip.c | 8 +-------
+ 1 file changed, 1 insertion(+), 7 deletions(-)
+
+diff --git a/libarchive/archive_read_support_format_7zip.c b/libarchive/archive_read_support_format_7zip.c
+index bccbf8966..b6d1505d3 100644
+--- a/libarchive/archive_read_support_format_7zip.c
++++ b/libarchive/archive_read_support_format_7zip.c
+@@ -2964,13 +2964,7 @@ get_uncompressed_data(struct archive_read *a, const void **buff, size_t size,
+ if (zip->codec == _7Z_COPY && zip->codec2 == (unsigned long)-1) {
+ /* Copy mode. */
+
+- /*
+- * Note: '1' here is a performance optimization.
+- * Recall that the decompression layer returns a count of
+- * available bytes; asking for more than that forces the
+- * decompressor to combine reads by copying data.
+- */
+- *buff = __archive_read_ahead(a, 1, &bytes_avail);
++ *buff = __archive_read_ahead(a, minimum, &bytes_avail);
+ if (bytes_avail <= 0) {
+ archive_set_error(&a->archive,
+ ARCHIVE_ERRNO_FILE_FORMAT,
--- /dev/null
+From 8312eaa576014cd9b965012af51bc1f967b12423 Mon Sep 17 00:00:00 2001
+From: Daniel Axtens <dja@axtens.net>
+Date: Tue, 1 Jan 2019 17:10:49 +1100
+Subject: [PATCH] iso9660: Fail when expected Rockridge extensions is missing
+
+A corrupted or malicious ISO9660 image can cause read_CE() to loop
+forever.
+
+read_CE() calls parse_rockridge(), expecting a Rockridge extension
+to be read. However, parse_rockridge() is structured as a while
+loop starting with a sanity check, and if the sanity check fails
+before the loop has run, the function returns ARCHIVE_OK without
+advancing the position in the file. This causes read_CE() to retry
+indefinitely.
+
+Make parse_rockridge() return ARCHIVE_WARN if it didn't read an
+extension. As someone with no real knowledge of the format, this
+seems more apt than ARCHIVE_FATAL, but both the call-sites escalate
+it to a fatal error immediately anyway.
+
+Found with a combination of AFL, afl-rb (FairFuzz) and qsym.
+---
+ libarchive/archive_read_support_format_iso9660.c | 11 ++++++++++-
+ 1 file changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/libarchive/archive_read_support_format_iso9660.c b/libarchive/archive_read_support_format_iso9660.c
+index 28acfefbb..bad8f1dfe 100644
+--- a/libarchive/archive_read_support_format_iso9660.c
++++ b/libarchive/archive_read_support_format_iso9660.c
+@@ -2102,6 +2102,7 @@ parse_rockridge(struct archive_read *a, struct file_info *file,
+ const unsigned char *p, const unsigned char *end)
+ {
+ struct iso9660 *iso9660;
++ int entry_seen = 0;
+
+ iso9660 = (struct iso9660 *)(a->format->data);
+
+@@ -2257,8 +2258,16 @@ parse_rockridge(struct archive_read *a, struct file_info *file,
+ }
+
+ p += p[2];
++ entry_seen = 1;
++ }
++
++ if (entry_seen)
++ return (ARCHIVE_OK);
++ else {
++ archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
++ "Tried to parse Rockridge extensions, but none found");
++ return (ARCHIVE_WARN);
+ }
+- return (ARCHIVE_OK);
+ }
+
+ static int
PKG_NAME:=libartnet
PKG_VERSION:=1.1.2
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/OpenLightingProject/libartnet/releases/download/1.1.2
PKG_HASH:=19cdda434e208a81ddd138377f11046364438e40e34542ae101d6aa3fcaec696
PKG_MAINTAINER:=Martijn Zilverschoon <martijn@friedzombie.com>
-
PKG_LICENSE:=GPL-2.1
PKG_LICENSE_FILES:=COPYING
+PKG_INSTALL:=1
+
include $(INCLUDE_DIR)/package.mk
define Package/libartnet
SECTION:=libs
CATEGORY:=Libraries
TITLE:=Libartnet is an implementation of the ArtNet protocol.
- URL:=http://www.openlighting.org/libartnet-main/
+ URL:=https://www.openlighting.org/libartnet-main/
endef
define Package/libartnet/description
transmission of DMX and related data over IP networks.
endef
-define Build/Configure
- $(call Build/Configure/Default)
-endef
-
-define Build/Compile
- $(MAKE) -C $(PKG_BUILD_DIR) \
- DESTDIR="$(PKG_INSTALL_DIR)" \
- all install
-endef
-
define Build/InstallDev
mkdir -p $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/artnet $(1)/usr/include/
-diff --git a/artnet/transmit.c b/artnet/transmit.c
-index ce19b11..e882db9 100644
--- a/artnet/transmit.c
+++ b/artnet/transmit.c
@@ -163,7 +163,7 @@ int artnet_tx_tod_data(node n, int id) {
while (remaining > 0) {
- memset(&tod.data.toddata.tod,0x00, ARTNET_MAX_UID_COUNT);
-+ memset(&tod.data.toddata.tod,0x00, ARTNET_MAX_UID_COUNT * sizeof(tod.data.toddata.tod));
++ memset(&tod.data.toddata.tod,0x00, sizeof(tod.data.toddata.tod));
lim = min(ARTNET_MAX_UID_COUNT, remaining);
tod.data.toddata.blockCount = bloc++;
tod.data.toddata.uidCount = lim;
include $(TOPDIR)/rules.mk
PKG_NAME:=libcap
-PKG_VERSION:=2.26
+PKG_VERSION:=2.27
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@KERNEL/linux/libs/security/linux-privs/libcap2
-PKG_HASH:=b630b7c484271b3ba867680d6a14b10a86cfa67247a14631b14c06731d5a458b
+PKG_HASH:=dac1792d0118bee6aae6ba7fb93ff1602c6a9bda812fd63916eee1435b9c486a
PKG_MAINTAINER:=Paul Wassi <p.wassi@gmx.at>
PKG_LICENSE:=GPL-2.0
--- /dev/null
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libcgroup
+PKG_VERSION:=0.41
+PKG_RELEASE:=1
+PKG_LICENSE:=LGPL
+PKG_LICENSE_FILES:=COPYING
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=@SF/libcg
+PKG_HASH:=e4e38bdc7ef70645ce33740ddcca051248d56b53283c0dc6d404e17706f6fb51
+PKG_MAINTAINER:=Daniel Danzberger <daniel@dd-wrt.com>
+
+PKG_BUILD_PARALLEL:=1
+PKG_FIXUP:=autoreconf
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libcgroup
+ TITLE:=CGroup config and exec library
+ SECTION:=libs
+ CATEGORY:=Libraries
+ DEPENDS:=+musl-fts +@KERNEL_CGROUPS
+endef
+
+define Package/cgroup-tools
+ TITLE:=CGroup config and exec tools
+ DEPENDS:=+libcgroup
+ CATEGORY:=Utilities
+endef
+
+define Package/libcgroup/description
+ Helpers utils for working with cgroups.
+endef
+
+CONFIGURE_ARGS += --enable-tools \
+ --enable-shared \
+ --disable-daemon \
+ --disable-pam
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib $(1)/usr/lib/pkgconfig
+ $(CP) $(PKG_BUILD_DIR)/include/libcgroup.h $(1)/usr/include
+ $(CP) $(PKG_BUILD_DIR)/include/libcgroup $(1)/usr/include
+ $(CP) $(PKG_BUILD_DIR)/src/.libs/libcgroup.so* $(1)/usr/lib
+ $(CP) $(PKG_BUILD_DIR)/libcgroup.pc $(1)/usr/lib/pkgconfig/
+endef
+
+define Package/libcgroup/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_BUILD_DIR)/src/.libs/libcgroup.so* $(1)/usr/lib
+endef
+
+define Package/cgroup-tools/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/tools/.libs/* $(1)/usr/bin
+endef
+
+$(eval $(call BuildPackage,libcgroup))
+$(eval $(call BuildPackage,cgroup-tools))
--- /dev/null
+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
include $(TOPDIR)/rules.mk
PKG_NAME:=libcoap
-PKG_VERSION:=v4.1.2
+PKG_VERSION:=4.2.0
PKG_RELEASE:=1
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/obgm/libcoap
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)
-PKG_SOURCE_VERSION:=fa5248603049ddf95cc84608aad569120763bf2b
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_MIRROR_HASH:=0ab4bc9569a78904743cc3074fd1c0fc9c78c85fd510fef5145dd872523619e6
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/obgm/libcoap/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=9523e38da6ee8b2a8f5ce83ded64107dd1e514c7ad00cd74ccfe3454b679c271
PKG_MAINTAINER:=Anton Glukhov <anton.a.glukhov@gmail.com>
PKG_LICENSE:=GPL-2.0+ BSD-2-Clause
PKG_LICENSE_FILES:=COPYING LICENSE.GPL LICENSE.BSD
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
-
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
SECTION:=libs
CATEGORY:=Libraries
TITLE:=CoAP (RFC 7252) library
- URL:=http://libcoap.net/
+ URL:=https://libcoap.net/
+ ABI_VERSION:=2
endef
define Package/libcoap/description
CONFIGURE_ARGS += \
--enable-examples \
- --disable-documentation
-
-ifeq ($(CONFIG_BIG_ENDIAN),y)
-TARGET_CFLAGS += -DWORDS_BIGENDIAN
-endif
+ --disable-documentation \
+ --disable-doxygen \
+ --disable-dtls \
+ --disable-gcov \
+ --disable-tests
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
define Package/libcoap/install
$(INSTALL_DIR) $(1)/usr/lib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcoap-1.so* $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcoap-$(ABI_VERSION).so* $(1)/usr/lib/
endef
define Package/coap-client/install
include $(TOPDIR)/rules.mk
PKG_NAME:=cups
-PKG_VERSION:=2.2.10
+PKG_VERSION:=2.2.11
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-source.tar.gz
PKG_SOURCE_URL:=https://github.com/apple/cups/releases/download/v$(PKG_VERSION)/
-PKG_HASH:=77c8b2b3bb7fe8b5fbfffc307f2c817b2d7ec67b657f261a1dd1c61ab81205bb
+PKG_HASH:=f58010813fd6903f690cdb0c0b91e4d1bc9e5b9570c28734229ba3ed2908b76c
PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=LICENSE.txt
include $(TOPDIR)/rules.mk
PKG_NAME:=libdaq
-PKG_VERSION:=2.0.6
-PKG_RELEASE:=2
+PKG_VERSION:=2.2.2
+PKG_RELEASE:=1
-PKG_SOURCE_URL:=https://www.snort.org/downloads/snort/ \
- @SF/snort
+PKG_SOURCE_URL:=https://www.snort.org/downloads/snortplus/
PKG_SOURCE:=daq-$(PKG_VERSION).tar.gz
-PKG_HASH:=d41da5f7793e66044e6927dd868c0525e7ee4ec1a3515bf74ef9a30cd9273af0
+PKG_HASH:=7cd818cabb1ad35360e83076e54775f07165ee71407dc672d147e27d3cd37f7b
PKG_BUILD_DIR:=$(BUILD_DIR)/daq-$(PKG_VERSION)
PKG_LICENSE:=GPL-2.0
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
+PKG_INSTALL:=1
+
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk
--with-libpcap-includes="$(STAGING_DIR)/usr/include" \
--with-libpcap-libraries="$(STAGING_DIR)/usr/lib" \
-define Build/Compile
- $(MAKE) $(MAKE_FLAGS) -C $(PKG_BUILD_DIR)
-endef
-
-define Build/Install
- $(MAKE) $(MAKE_FLAGS) -C $(PKG_BUILD_DIR) install DESTDIR=$(PKG_INSTALL_DIR)
-endef
-
define Build/InstallDev
$(INSTALL_DIR) $(STAGING_DIR)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(STAGING_DIR)/usr/include/
---- a/configure
-+++ b/configure
-@@ -13552,10 +13552,11 @@ if ${daq_cv_libpcap_version_1x+:} false;
+diff -u --recursive daq-2.2.2-vanilla/configure daq-2.2.2/configure
+--- daq-2.2.2-vanilla/configure 2017-07-05 15:58:03.000000000 -0400
++++ daq-2.2.2/configure 2018-09-01 17:18:56.774898034 -0400
+@@ -13244,10 +13244,11 @@
else
if test "$cross_compiling" = yes; then :
---- a/os-daq-modules/daq_ipfw.c
-+++ b/os-daq-modules/daq_ipfw.c
+diff -u --recursive daq-2.2.2-vanilla/os-daq-modules/daq_ipfw.c daq-2.2.2/os-daq-modules/daq_ipfw.c
+--- daq-2.2.2-vanilla/os-daq-modules/daq_ipfw.c 2017-02-08 17:04:18.000000000 -0500
++++ daq-2.2.2/os-daq-modules/daq_ipfw.c 2018-09-01 17:21:10.608181841 -0400
@@ -23,10 +23,10 @@
#include <stdlib.h>
#include <string.h>
#include <netinet/in.h>
#include <sys/socket.h>
---- a/os-daq-modules/daq_ipq.c
-+++ b/os-daq-modules/daq_ipq.c
+diff -u --recursive daq-2.2.2-vanilla/os-daq-modules/daq_ipq.c daq-2.2.2/os-daq-modules/daq_ipq.c
+--- daq-2.2.2-vanilla/os-daq-modules/daq_ipq.c 2017-02-08 17:04:18.000000000 -0500
++++ daq-2.2.2/os-daq-modules/daq_ipq.c 2018-09-01 17:21:23.162208457 -0400
@@ -24,10 +24,10 @@
#include <stdio.h>
#include <stdlib.h>
#include <netinet/ip.h>
---- a/os-daq-modules/daq_nfq.c
-+++ b/os-daq-modules/daq_nfq.c
+diff -u --recursive daq-2.2.2-vanilla/os-daq-modules/daq_nfq.c daq-2.2.2/os-daq-modules/daq_nfq.c
+--- daq-2.2.2-vanilla/os-daq-modules/daq_nfq.c 2017-02-08 17:04:18.000000000 -0500
++++ daq-2.2.2/os-daq-modules/daq_nfq.c 2018-09-01 17:21:35.202233988 -0400
@@ -24,10 +24,10 @@
#include <stdio.h>
#include <stdlib.h>
include $(TOPDIR)/rules.mk
PKG_NAME:=libdmapsharing
-PKG_VERSION:=3.9.4
+PKG_VERSION:=3.9.7
PKG_RELEASE:=1
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
PKG_SOURCE:=libdmapsharing-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://www.flyn.org/projects/libdmapsharing/
-PKG_HASH:=fbb8eb272a3d659f534050cce190a72a02599f892f517de99a8a71984dd16ee2
+PKG_HASH:=745f4dc0b00db3e40721d041c883d813489814eaad3ca0f9ffb091e7e1acfa88
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
include $(TOPDIR)/rules.mk
PKG_NAME:=libdouble-conversion
-PKG_VERSION:=3.1.1
-PKG_RELEASE:=1
+PKG_VERSION:=3.1.5
+PKG_RELEASE:=2
PKG_SOURCE:=double-conversion-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/google/double-conversion/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=c49a6b3fa9c917f827b156c8e0799ece88ae50440487a99fc2f284cfd357a5b9
+PKG_HASH:=a63ecb93182134ba4293fd5f22d6e08ca417caafa244afaa751cbfddf6415b13
+
+HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/double-conversion-$(PKG_VERSION)
PKG_BUILD_DIR:=$(BUILD_DIR)/double-conversion-$(PKG_VERSION)
PKG_MAINTAINER:=
PKG_LICENSE:=BSD-3c
PKG_LICENSE_FILES:=COPYING LICENSE
+CMAKE_INSTALL:=1
+
include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/cmake.mk
define Package/libdouble-conversion
endef
CMAKE_OPTIONS += \
- -DBUILD_SHARED_LIBS=ON \
- -DBUILD_TESTING=OFF
-
-define Build/InstallDev
- $(INSTALL_DIR) \
- $(1)/usr/lib \
- $(1)/usr/include/double-conversion
-
- $(CP) \
- $(PKG_INSTALL_DIR)/usr/include/* \
- $(1)/usr/include/
-
- $(INSTALL_DATA) \
- $(PKG_INSTALL_DIR)/usr/lib/lib*.so* \
- $(1)/usr/lib/
-endef
+ -DBUILD_SHARED_LIBS=ON \
+ -DBUILD_TESTING=OFF
define Package/libdouble-conversion/install
- $(INSTALL_DIR) \
- $(1)/usr/lib
-
- $(INSTALL_DATA) \
- $(PKG_INSTALL_DIR)/usr/lib/lib*.so* \
- $(1)/usr/lib/
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.so* $(1)/usr/lib/
endef
$(eval $(call BuildPackage,libdouble-conversion))
+$(eval $(call HostBuild))
include $(TOPDIR)/rules.mk
PKG_NAME:=libdrm
-PKG_VERSION:=2.4.70
+PKG_VERSION:=2.4.97
PKG_RELEASE:=1
-PKG_SOURCE_URL:=http://dri.freedesktop.org/libdrm
+PKG_SOURCE_URL:=https://dri.freedesktop.org/libdrm
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_HASH:=b17d4b39ed97ca0e4cffa0db06ff609e617bac94646ec38e8e0579d530540e7b
+PKG_HASH:=77d0ccda3e10d6593398edb70b1566bfe1a23a39bd3da98ace2147692eadd123
PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
+
+PKG_MAINTAINER:=Lucian Cristian <lucian.cristian@gmail.com>
include $(INCLUDE_DIR)/package.mk
define Package/libdrm
SECTION:=libs
CATEGORY:=Libraries
- DEPENDS:=
+ DEPENDS:=+libpciaccess
TITLE:=libdrm
- URL:=http://dri.freedesktop.org/
+ URL:=https://dri.freedesktop.org/
+endef
+
+define Package/libdrm/description
+ LIBDRM is the cross-driver middleware which allows user-space applications
+ (such as Mesa and 2D drivers) to communicate with the Kernel by the means
+ of the DRI protocol.
endef
CONFIGURE_ARGS += \
--disable-udev \
--enable-kms \
- --disable-intel \
- --disable-radeon \
- --disable-amdgpu \
- --disable-nouveau \
- --disable-vmwgfx \
--disable-omap-experimental-api \
--disable-exynos-experimental-api \
- --disable-freedreno \
- --disable-freedreno-kgsl \
--disable-tegra-experimental-api \
- --disable-vc4 \
--disable-cairo-tests \
--disable-manpages \
--disable-valgrind
+++ /dev/null
---- a/configure 2016-07-23 15:19:06.000000000 +0200
-+++ b/configure 2016-08-27 01:11:02.440530337 +0200
-@@ -13334,98 +13334,6 @@
- fi
- fi
-
--pkg_failed=no
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREADSTUBS" >&5
--$as_echo_n "checking for PTHREADSTUBS... " >&6; }
--
--if test -n "$PTHREADSTUBS_CFLAGS"; then
-- pkg_cv_PTHREADSTUBS_CFLAGS="$PTHREADSTUBS_CFLAGS"
-- elif test -n "$PKG_CONFIG"; then
-- if test -n "$PKG_CONFIG" && \
-- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pthread-stubs\""; } >&5
-- ($PKG_CONFIG --exists --print-errors "pthread-stubs") 2>&5
-- ac_status=$?
-- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-- test $ac_status = 0; }; then
-- pkg_cv_PTHREADSTUBS_CFLAGS=`$PKG_CONFIG --cflags "pthread-stubs" 2>/dev/null`
-- test "x$?" != "x0" && pkg_failed=yes
--else
-- pkg_failed=yes
--fi
-- else
-- pkg_failed=untried
--fi
--if test -n "$PTHREADSTUBS_LIBS"; then
-- pkg_cv_PTHREADSTUBS_LIBS="$PTHREADSTUBS_LIBS"
-- elif test -n "$PKG_CONFIG"; then
-- if test -n "$PKG_CONFIG" && \
-- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pthread-stubs\""; } >&5
-- ($PKG_CONFIG --exists --print-errors "pthread-stubs") 2>&5
-- ac_status=$?
-- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-- test $ac_status = 0; }; then
-- pkg_cv_PTHREADSTUBS_LIBS=`$PKG_CONFIG --libs "pthread-stubs" 2>/dev/null`
-- test "x$?" != "x0" && pkg_failed=yes
--else
-- pkg_failed=yes
--fi
-- else
-- pkg_failed=untried
--fi
--
--
--
--if test $pkg_failed = yes; then
-- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
--$as_echo "no" >&6; }
--
--if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-- _pkg_short_errors_supported=yes
--else
-- _pkg_short_errors_supported=no
--fi
-- if test $_pkg_short_errors_supported = yes; then
-- PTHREADSTUBS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "pthread-stubs" 2>&1`
-- else
-- PTHREADSTUBS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "pthread-stubs" 2>&1`
-- fi
-- # Put the nasty error message in config.log where it belongs
-- echo "$PTHREADSTUBS_PKG_ERRORS" >&5
--
-- as_fn_error $? "Package requirements (pthread-stubs) were not met:
--
--$PTHREADSTUBS_PKG_ERRORS
--
--Consider adjusting the PKG_CONFIG_PATH environment variable if you
--installed software in a non-standard prefix.
--
--Alternatively, you may set the environment variables PTHREADSTUBS_CFLAGS
--and PTHREADSTUBS_LIBS to avoid the need to call pkg-config.
--See the pkg-config man page for more details." "$LINENO" 5
--elif test $pkg_failed = untried; then
-- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
--$as_echo "no" >&6; }
-- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
--$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
--as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
--is in your PATH or set the PKG_CONFIG environment variable to the full
--path to pkg-config.
--
--Alternatively, you may set the environment variables PTHREADSTUBS_CFLAGS
--and PTHREADSTUBS_LIBS to avoid the need to call pkg-config.
--See the pkg-config man page for more details.
--
--To get pkg-config, see <http://pkg-config.freedesktop.org/>.
--See \`config.log' for more details" "$LINENO" 5; }
--else
-- PTHREADSTUBS_CFLAGS=$pkg_cv_PTHREADSTUBS_CFLAGS
-- PTHREADSTUBS_LIBS=$pkg_cv_PTHREADSTUBS_LIBS
-- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
--$as_echo "yes" >&6; }
--
--fi
--
--
-
- pkgconfigdir=${libdir}/pkgconfig
-
include $(TOPDIR)/rules.mk
PKG_NAME:=libevhtp
-PKG_VERSION:=1.1.6
-PKG_RELEASE:=3
-PKG_LICENSE:=BSD-3-Clause
+PKG_VERSION:=1.2.18
+PKG_RELEASE:=2
+# This package is building a static library, used by seafile-server
+# Every time the built library changes (metadata changes are exempt),
+# seafile-server needs a release bump to ensure the update is used.
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/criticalstack/libevhtp/tar.gz/$(PKG_VERSION)?
-PKG_HASH:=725dd0a32237b2a097cdc2003d09278a082ccce310aaba7441a5fd8fa8f26635
+PKG_HASH:=316ede0d672be3ae6fe489d4ac1c8c53a1db7d4fe05edaff3c7c853933e02795
+
+PKG_MAINTAINER:=Eneas U de Queiroz <cote2004-github@yahoo.com>
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=LICENSE
-PKG_INSTALL:=1
+CMAKE_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
define Package/libevhtp
SECTION:=libs
CATEGORY:=Libraries
TITLE:=A more flexible replacement for libevent's httpd API
- MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
- URL:=https://github.com/ellzey/libevhtp
- DEPENDS:=+libevent2 +libevent2-openssl +libevent2-pthreads +libopenssl +libpthread
+ URL:=https://github.com/criticalstack/libevhtp
+ DEPENDS:=+libevent2 +libevent2-openssl +libevent2-pthreads +oniguruma
endef
define Package/libevhtp/description
meaning the developer never thought of it being used for creating a full-fledged HTTP service.
endef
-include $(INCLUDE_DIR)/cmake.mk
-
define Build/InstallDev
- $(INSTALL_DIR) $(1)/usr/{include,lib}
- $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
+ $(call Build/InstallDev/cmake,$(1))
+ $(SED) 's,^\(include\|lib\)dir=,\0$(STAGING_DIR)/usr/\1,' "$(1)/usr/lib/pkgconfig/evhtp.pc"
endef
$(eval $(call BuildPackage,libevhtp))
--- /dev/null
+--- a/evhtp.c
++++ b/evhtp.c
+@@ -2863,7 +2863,7 @@ htp__accept_cb_(struct evconnlistener * serv, int fd, struct sockaddr * s, int s
+ } /* htp__accept_cb_ */
+
+ #ifndef EVHTP_DISABLE_SSL
+-#ifndef EVHTP_DISABLE_EVTHR
++#if !defined(EVHTP_DISABLE_EVTHR) && (OPENSSL_VERSION_NUMBER < 0x10100000L)
+
+ #ifndef WIN32
+ #define _HTP_tid (unsigned long)pthread_self()
+@@ -4575,7 +4575,7 @@ htp__use_threads_(evhtp_t * htp,
+ htp->thread_init_cb = init_cb;
+ htp->thread_exit_cb = exit_cb;
+
+-#ifndef EVHTP_DISABLE_SSL
++#if !defined(EVHTP_DISABLE_EVTHR) && (OPENSSL_VERSION_NUMBER < 0x10100000L)
+ evhtp_ssl_use_threads();
+ #endif
+
+@@ -4723,7 +4723,7 @@ evhtp_set_post_accept_cb(evhtp_t * htp, evhtp_post_accept_cb cb, void * arg)
+ }
+
+ #ifndef EVHTP_DISABLE_SSL
+-#ifndef EVHTP_DISABLE_EVTHR
++#if !defined(EVHTP_DISABLE_EVTHR) && (OPENSSL_VERSION_NUMBER < 0x10100000L)
+ int
+ evhtp_ssl_use_threads(void)
+ {
+++ /dev/null
-diff -rupN libevhtp-1.2.9.orig/htparse/htparse.c libevhtp-1.2.9/htparse/htparse.c
---- libevhtp-1.2.9.orig/htparse/htparse.c 2014-03-23 12:50:50.000000000 +0100
-+++ libevhtp-1.2.9/htparse/htparse.c 2014-12-09 01:12:22.242001241 +0100
-@@ -197,6 +197,7 @@ static const char * method_strmap[] = {
-
- #define _MIN_READ(a, b) ((a) < (b) ? (a) : (b))
-
-+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
- #define _str3_cmp(m, c0, c1, c2, c3) \
- *(uint32_t *)m == ((c3 << 24) | (c2 << 16) | (c1 << 8) | c0)
-
-@@ -226,6 +227,37 @@ static const char * method_strmap[] = {
- *(uint32_t *)m == ((c3 << 24) | (c2 << 16) | (c1 << 8) | c0) \
- && ((uint32_t *)m)[1] == ((c7 << 24) | (c6 << 16) | (c5 << 8) | c4) \
- && m[8] == c8
-+#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
-+#define _str3_cmp(m, c0, c1, c2, c3) \
-+ *(uint32_t *)m == ((c0 << 24) | (c1 << 16) | (c2 << 8) | c3)
-+
-+#define _str3Ocmp(m, c0, c1, c2, c3) \
-+ *(uint32_t *)m == ((c0 << 24) | (c1 << 16) | (c2 << 8) | c3)
-+
-+#define _str4cmp(m, c0, c1, c2, c3) \
-+ *(uint32_t *)m == ((c0 << 24) | (c1 << 16) | (c2 << 8) | c3)
-+
-+#define _str5cmp(m, c0, c1, c2, c3, c4) \
-+ *(uint32_t *)m == ((c0 << 24) | (c1 << 16) | (c2 << 8) | c3) \
-+ && m[4] == c4
-+
-+#define _str6cmp(m, c0, c1, c2, c3, c4, c5) \
-+ *(uint32_t *)m == ((c0 << 24) | (c1 << 16) | (c2 << 8) | c3) \
-+ && (((uint32_t *)m)[1] & 0xffff0000) == ((c4 << 24) | c5 << 16)
-+
-+#define _str7_cmp(m, c0, c1, c2, c3, c4, c5, c6, c7) \
-+ *(uint32_t *)m == ((c0 << 24) | (c1 << 16) | (c2 << 8) | c3) \
-+ && ((uint32_t *)m)[1] == ((c4 << 24) | (c5 << 16) | (c6 << 8) | c7)
-+
-+#define _str8cmp(m, c0, c1, c2, c3, c4, c5, c6, c7) \
-+ *(uint32_t *)m == ((c0 << 24) | (c1 << 16) | (c2 << 8) | c3) \
-+ && ((uint32_t *)m)[1] == ((c4 << 24) | (c5 << 16) | (c6 << 8) | c7)
-+
-+#define _str9cmp(m, c0, c1, c2, c3, c4, c5, c6, c7, c8) \
-+ *(uint32_t *)m == ((c0 << 24) | (c1 << 16) | (c2 << 8) | c3) \
-+ && ((uint32_t *)m)[1] == ((c4 << 24) | (c5 << 16) | (c6 << 8) | c7) \
-+ && m[8] == c8
-+#endif
-
- #define __HTPARSE_GENHOOK(__n) \
- static inline int hook_ ## __n ## _run(htparser * p, htparse_hooks * hooks) { \
+++ /dev/null
---- a/evhtp.c
-+++ b/evhtp.c
-@@ -1686,16 +1686,15 @@ _evhtp_ssl_thread_lock(int mode, int typ
- #endif
- static void
- _evhtp_ssl_delete_scache_ent(evhtp_ssl_ctx_t * ctx, evhtp_ssl_sess_t * sess) {
-- evhtp_t * htp;
-- evhtp_ssl_cfg_t * cfg;
-- unsigned char * sid;
-- unsigned int slen;
-+ evhtp_t * htp;
-+ evhtp_ssl_cfg_t * cfg;
-+ evhtp_ssl_data_t * sid;
-+ unsigned int slen;
-
- htp = (evhtp_t *)SSL_CTX_get_app_data(ctx);
- cfg = htp->ssl_cfg;
-
-- sid = sess->session_id;
-- slen = sess->session_id_length;
-+ sid = (evhtp_ssl_data_t *)SSL_SESSION_get_id(sess, &slen);
-
- if (cfg->scache_del) {
- (cfg->scache_del)(htp, sid, slen);
-@@ -1706,14 +1705,17 @@ static int
- _evhtp_ssl_add_scache_ent(evhtp_ssl_t * ssl, evhtp_ssl_sess_t * sess) {
- evhtp_connection_t * connection;
- evhtp_ssl_cfg_t * cfg;
-- unsigned char * sid;
-+ evhtp_ssl_data_t * sid;
- int slen;
-
- connection = (evhtp_connection_t *)SSL_get_app_data(ssl);
-- cfg = connection->htp->ssl_cfg;
-+ if (connection->htp == NULL)
-+ {
-+ return 0; /* We cannot get the ssl_cfg */
-+ }
-
-- sid = sess->session_id;
-- slen = sess->session_id_length;
-+ cfg = connection->htp->ssl_cfg;
-+ sid = (evhtp_ssl_data_t *)SSL_SESSION_get_id(sess, &slen);
-
- SSL_set_timeout(sess, cfg->scache_timeout);
-
-@@ -1725,7 +1727,7 @@ _evhtp_ssl_add_scache_ent(evhtp_ssl_t *
- }
-
- static evhtp_ssl_sess_t *
--_evhtp_ssl_get_scache_ent(evhtp_ssl_t * ssl, unsigned char * sid, int sid_len, int * copy) {
-+_evhtp_ssl_get_scache_ent(evhtp_ssl_t * ssl, evhtp_ssl_data_t * sid, int sid_len, int * copy) {
- evhtp_connection_t * connection;
- evhtp_ssl_cfg_t * cfg;
- evhtp_ssl_sess_t * sess;
-@@ -1767,12 +1769,12 @@ _evhtp_ssl_servername(evhtp_ssl_t * ssl,
- connection->vhost_via_sni = 1;
-
- SSL_set_SSL_CTX(ssl, evhtp_vhost->ssl_ctx);
-- SSL_set_options(ssl, SSL_CTX_get_options(ssl->ctx));
-+ SSL_set_options(ssl, SSL_CTX_get_options(SSL_get_SSL_CTX(ssl)));
-
- if ((SSL_get_verify_mode(ssl) == SSL_VERIFY_NONE) ||
- (SSL_num_renegotiations(ssl) == 0)) {
-- SSL_set_verify(ssl, SSL_CTX_get_verify_mode(ssl->ctx),
-- SSL_CTX_get_verify_callback(ssl->ctx));
-+ SSL_set_verify(ssl, SSL_CTX_get_verify_mode(SSL_get_SSL_CTX(ssl)),
-+ SSL_CTX_get_verify_callback(SSL_get_SSL_CTX(ssl)));
- }
-
- return SSL_TLSEXT_ERR_OK;
-@@ -3017,15 +3019,21 @@ evhtp_ssl_init(evhtp_t * htp, evhtp_ssl_
- return -1;
- }
-
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
- SSL_library_init();
- SSL_load_error_strings();
-+#endif
- RAND_poll();
-
- STACK_OF(SSL_COMP) * comp_methods = SSL_COMP_get_compression_methods();
- sk_SSL_COMP_zero(comp_methods);
-
- htp->ssl_cfg = cfg;
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
- htp->ssl_ctx = SSL_CTX_new(SSLv23_server_method());
-+#else
-+ htp->ssl_ctx = SSL_CTX_new(TLS_server_method());
-+#endif
-
- #if OPENSSL_VERSION_NUMBER >= 0x10000000L
- SSL_CTX_set_options(htp->ssl_ctx, SSL_MODE_RELEASE_BUFFERS);
-@@ -3062,7 +3070,11 @@ evhtp_ssl_init(evhtp_t * htp, evhtp_ssl_
- SSL_CTX_set_verify(htp->ssl_ctx, cfg->verify_peer, cfg->x509_verify_cb);
-
- if (cfg->x509_chk_issued_cb != NULL) {
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
- htp->ssl_ctx->cert_store->check_issued = cfg->x509_chk_issued_cb;
-+#else
-+ X509_STORE_set_check_issued(SSL_CTX_get_cert_store(htp->ssl_ctx), cfg->x509_chk_issued_cb);
-+#endif
- }
-
- if (cfg->verify_depth) {
---- a/evhtp.h
-+++ b/evhtp.h
-@@ -34,6 +34,11 @@ typedef SSL evhtp_
- typedef SSL_CTX evhtp_ssl_ctx_t;
- typedef X509 evhtp_x509_t;
- typedef X509_STORE_CTX evhtp_x509_store_ctx_t;
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+typedef unsigned char evhtp_ssl_data_t;
-+#else
-+typedef const unsigned char evhtp_ssl_data_t;
-+#endif
- #else
- typedef void evhtp_ssl_sess_t;
- typedef void evhtp_ssl_t;
-@@ -154,9 +159,9 @@ typedef int (*evhtp_headers_iterator)(ev
- typedef int (*evhtp_ssl_verify_cb)(int pre_verify, evhtp_x509_store_ctx_t * ctx);
- typedef int (*evhtp_ssl_chk_issued_cb)(evhtp_x509_store_ctx_t * ctx, evhtp_x509_t * x, evhtp_x509_t * issuer);
-
--typedef int (*evhtp_ssl_scache_add)(evhtp_connection_t * connection, unsigned char * sid, int sid_len, evhtp_ssl_sess_t * sess);
--typedef void (*evhtp_ssl_scache_del)(evhtp_t * htp, unsigned char * sid, int sid_len);
--typedef evhtp_ssl_sess_t * (*evhtp_ssl_scache_get)(evhtp_connection_t * connection, unsigned char * sid, int sid_len);
-+typedef int (*evhtp_ssl_scache_add)(evhtp_connection_t * connection, evhtp_ssl_data_t * sid, int sid_len, evhtp_ssl_sess_t * sess);
-+typedef void (*evhtp_ssl_scache_del)(evhtp_t * htp, evhtp_ssl_data_t * sid, int sid_len);
-+typedef evhtp_ssl_sess_t * (*evhtp_ssl_scache_get)(evhtp_connection_t * connection, evhtp_ssl_data_t * sid, int sid_len);
- typedef void * (*evhtp_ssl_scache_init)(evhtp_t *);
-
- #define EVHTP_VERSION "1.1.6"
+++ /dev/null
-diff --git a/evhtp.c b/evhtp.c
-index 24687be..b646925 100644
---- a/evhtp.c
-+++ b/evhtp.c
-@@ -1667,9 +1667,9 @@ _evhtp_accept_cb(evserv_t * serv, int fd, struct sockaddr * s, int sl, void * ar
-
- #ifndef EVHTP_DISABLE_SSL
- #ifndef EVHTP_DISABLE_EVTHR
--static unsigned long
--_evhtp_ssl_get_thread_id(void) {
-- return (unsigned long)pthread_self();
-+static void
-+_evhtp_ssl_get_thread_id(CRYPTO_THREADID *id) {
-+ CRYPTO_THREADID_set_numeric(id, (unsigned long)pthread_self());
- }
-
- static void
-@@ -2999,7 +2999,7 @@ evhtp_ssl_use_threads(void) {
- pthread_mutex_init(&(ssl_locks[i]), NULL);
- }
-
-- CRYPTO_set_id_callback(_evhtp_ssl_get_thread_id);
-+ CRYPTO_THREADID_set_callback(_evhtp_ssl_get_thread_id);
- CRYPTO_set_locking_callback(_evhtp_ssl_thread_lock);
-
- return 0;
include $(TOPDIR)/rules.mk
PKG_NAME:=libextractor
-PKG_VERSION:=1.8
-PKG_RELEASE:=1
+PKG_VERSION:=1.9
+PKG_RELEASE:=2
# ToDo:
# - package missing optional dependencies: libexiv2, gsf, librpm, smf, tidy
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@GNU/$(PKG_NAME)
-PKG_HASH:=e235a4aa2623fe458f8fcf1dcbb5be4f03df509aacec86a1de1fc7fcca582cfc
+PKG_HASH:=f08f257d26c5e9b503f068d6753c8e55cb76f47f73a81da6ed2bba3de3fee2ff
-PKG_LICENSE:=GPL-3.0
+PKG_LICENSE:=GPL-3.0-or-later
PKG_LICENSE_FILES:=COPYING
PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
--- /dev/null
+diff --git a/src/common/le_architecture.h b/src/common/le_architecture.h
+index b863ddb..713acdd 100644
+--- a/src/common/le_architecture.h
++++ b/src/common/le_architecture.h
+@@ -26,6 +26,8 @@
+ \r
+ #if WINDOWS\r
+ #include <sys/param.h> /* #define BYTE_ORDER */\r
++#else\r
++#include <byteswap.h>\r
+ #endif\r
+ \r
+ /* This is copied directly from GNUnet headers */\r
--- /dev/null
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libfizz
+PKG_VERSION:=2019.06.10.00
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/facebookincubator/fizz/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=29a9b2d020b70b83bf27fa6332c07c4ae9cca3b82c5ac9214220a815d7f1fe7f
+PKG_BUILD_DIR:=$(BUILD_DIR)/fizz-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Amol Bhave <ambhave@fb.com>
+PKG_LICENSE:=BSD
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_BUILD_PARALLEL:=1
+CMAKE_SOURCE_SUBDIR:=fizz
+CMAKE_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+define Package/libfizz
+ SECTION:=libs
+ CATEGORY:=Libraries
+ DEPENDS:=+libfolly
+ TITLE:=C++14 implementation of the TLS-1.3 standard
+ URL:=https://github.com/facebookincubator/fizz
+endef
+
+define Package/libfizz/description
+ C++14 implementation of the TLS-1.3 standard.
+ Fizz currently supports TLS 1.3 drafts 28, 26 (both wire-compatible with the final specification), and 23.
+endef
+
+CMAKE_OPTIONS += \
+ -DBUILD_EXAMPLES=OFF \
+ -DBUILD_SHARED_LIBS=ON
+
+define Package/libfizz/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfizz.so* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,libfizz))
--- /dev/null
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libfolly
+PKG_VERSION:=2019.06.10.00
+PKG_RELEASE:=2
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/facebook/folly/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=afecd68815a83865d95a3a6b861abe8096beefae45c89566e0d510279b631b57
+PKG_BUILD_DIR:=$(BUILD_DIR)/folly-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Amol Bhave <ambhave@fb.com>
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_BUILD_PARALLEL:=1
+CMAKE_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+define Package/libfolly
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=An open-source C++ library developed and used at Facebook.
+ URL:=https://github.com/facebook/folly
+ DEPENDS:=+boost +boost-context +boost-date_time +boost-filesystem +boost-program_options +boost-regex \
+ +libopenssl +libdouble-conversion +libevent2 +glog +libsodium +libaio +libatomic \
+ +libbz2 +zlib +libzstd +liblzma +liblz4 +PACKAGE_libunwind:libunwind
+endef
+
+define Package/libfolly/description
+ An open-source C++ library developed and used at Facebook.
+ Folly (acronymed loosely after Facebook Open Source Library) is a library of
+ C++14 components designed with practicality and efficiency in mind.
+ Folly contains a variety of core library components used extensively at Facebook.
+ This package includes the shared library.
+endef
+
+CMAKE_OPTIONS += \
+ -DCMAKE_POSITION_INDEPENDENT_CODE=ON \
+ -DCXX_STD=gnu++14 \
+ -DFOLLY_HAVE_UNALIGNED_ACCESS_EXITCODE=OFF \
+ -DFOLLY_HAVE_LINUX_VDSO_EXITCODE=OFF \
+ -DFOLLY_HAVE_WCHAR_SUPPORT_EXITCODE=OFF \
+ -DHAVE_VSNPRINTF_ERRORS_EXITCODE=OFF \
+ -DFOLLY_HAVE_XSI_STRERROR_R_EXITCODE=0 \
+ -DBUILD_SHARED_LIBS=ON
+
+define Package/libfolly/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfolly*.so* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,libfolly))
--- /dev/null
+Index: folly-2019.05.06.00/CMakeLists.txt
+===================================================================
+--- folly-2019.05.06.00.orig/CMakeLists.txt
++++ folly-2019.05.06.00/CMakeLists.txt
+@@ -109,17 +109,19 @@ configure_file(
+ auto_sources(files "*.cpp" "RECURSE" "${FOLLY_DIR}")
+ auto_sources(hfiles "*.h" "RECURSE" "${FOLLY_DIR}")
+
++string(REPLACE + \\+ FOLLY_DIR_ESCAPED ${FOLLY_DIR})
++
+ # Exclude tests, benchmarks, and other standalone utility executables from the
+ # library sources. Test sources are listed separately below.
+ REMOVE_MATCHES_FROM_LISTS(files hfiles
+ MATCHES
+- "^${FOLLY_DIR}/build/"
+- "^${FOLLY_DIR}/experimental/exception_tracer/"
+- "^${FOLLY_DIR}/experimental/pushmi/"
+- "^${FOLLY_DIR}/futures/exercises/"
+- "^${FOLLY_DIR}/logging/example/"
+- "^${FOLLY_DIR}/(.*/)?test/"
+- "^${FOLLY_DIR}/tools/"
++ "^${FOLLY_DIR_ESCAPED}/build/"
++ "^${FOLLY_DIR_ESCAPED}/experimental/exception_tracer/"
++ "^${FOLLY_DIR_ESCAPED}/experimental/pushmi/"
++ "^${FOLLY_DIR_ESCAPED}/futures/exercises/"
++ "^${FOLLY_DIR_ESCAPED}/logging/example/"
++ "^${FOLLY_DIR_ESCAPED}/(.*/)?test/"
++ "^${FOLLY_DIR_ESCAPED}/tools/"
+ "Benchmark.cpp$"
+ "Test.cpp$"
+ )
+@@ -169,7 +171,7 @@ list(APPEND hfiles
+ if (NOT FOLLY_USE_SYMBOLIZER)
+ REMOVE_MATCHES_FROM_LISTS(files hfiles
+ MATCHES
+- "^${FOLLY_DIR}/experimental/symbolizer/"
++ "^${FOLLY_DIR_ESCAPED}/experimental/symbolizer/"
+ )
+ list(REMOVE_ITEM files
+ ${FOLLY_DIR}/SingletonStackTrace.cpp
--- /dev/null
+Index: folly-2019.05.06.00/folly/stats/detail/BufferedStat-defs.h
+===================================================================
+--- folly-2019.05.06.00.orig/folly/stats/detail/BufferedStat-defs.h
++++ folly-2019.05.06.00/folly/stats/detail/BufferedStat-defs.h
+@@ -74,7 +74,6 @@ void BufferedStat<DigestT, ClockT>::doUp
+ TimePoint now,
+ const std::unique_lock<SharedMutex>& g,
+ UpdateMode updateMode) {
+- DCHECK(g.owns_lock());
+ // Check that no other thread has performed the slide after the check
+ auto oldExpiry = expiry_.load(std::memory_order_relaxed).tp;
+ if (now > oldExpiry || updateMode == UpdateMode::Now) {
--- /dev/null
+--- a/folly/CachelinePadded.h
++++ b/folly/CachelinePadded.h
+@@ -35,10 +35,6 @@ namespace folly {
+ */
+ template <typename T>
+ class CachelinePadded {
+- static_assert(
+- alignof(T) <= max_align_v,
+- "CachelinePadded does not support over-aligned types.");
+-
+ public:
+ template <typename... Args>
+ explicit CachelinePadded(Args&&... args)
+--- a/folly/external/farmhash/farmhash.cpp
++++ b/folly/external/farmhash/farmhash.cpp
+@@ -181,6 +181,7 @@
+
+ #undef bswap_32
+ #undef bswap_64
++#undef _BYTESWAP_H
+ #include <byteswap.h>
+
+ #endif
--- /dev/null
+--- a/folly/portability/Asm.h
++++ b/folly/portability/Asm.h
+@@ -38,7 +38,7 @@ inline void asm_volatile_pause() {
+ ::_mm_pause();
+ #elif defined(__i386__) || FOLLY_X64
+ asm volatile("pause");
+-#elif FOLLY_AARCH64 || defined(__arm__)
++#elif FOLLY_AARCH64 || (defined(__arm__) && !(__ARM_ARCH < 7))
+ asm volatile("yield");
+ #elif FOLLY_PPC64
+ asm volatile("or 27,27,27");
--- /dev/null
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libfstrm
+PKG_VERSION:=0.5.0
+PKG_RELEASE:=3
+
+PKG_SOURCE:=fstrm-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://dl.farsightsecurity.com/dist/fstrm/
+PKG_HASH:=10ee7792a86face1d2271dc591652ab8c7af6976883887c69fdb11f10da135fc
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/fstrm-$(PKG_VERSION)
+
+PKG_MAINTAINER:=James Taylor <james@jtaylor.id.au>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_FIXUP:=autoreconf
+PKG_BUILD_PARALLEL:=1
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libfstrm
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=C implementation of the Frame Streams data transport protocol
+ URL:=https://github.com/farsightsec/fstrm
+endef
+
+define Package/libfstrm/description
+fstrm is an optimized C implementation of Frame Streams that includes a fast,
+ lockless circular queue implementation and exposes library interfaces for
+ setting up a dedicated Frame Streams I/O thread and asynchronously submitting
+ data frames for transport from worker threads. It was originally written to
+ facilitate the addition of high speed binary logging to DNS servers written
+ in C using the dnstap log format.
+endef
+
+CONFIGURE_ARGS+= \
+ --disable-programs
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/include
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
+
+ $(INSTALL_DIR) $(1)/usr/include/fstrm
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/fstrm/*.h $(1)/usr/include/fstrm/
+
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfstrm.{a,so*} $(1)/usr/lib/
+
+ $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libfstrm.pc $(1)/usr/lib/pkgconfig/
+endef
+
+define Package/libfstrm/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfstrm.so* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,libfstrm))
PKG_NAME:=libftdi
PKG_VERSION:=0.20
-PKG_RELEASE:=4
+PKG_RELEASE:=5
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.intra2net.com/en/developer/libftdi/download/
The library is linked with your program in userspace, no kernel driver required.
endef
+CMAKE_OPTIONS += -DBoost_NO_BOOST_CMAKE=ON
+
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/
$(CP) $(PKG_INSTALL_DIR)/usr/include/ftdi.h $(1)/usr/include/
PKG_NAME:=libftdi1
PKG_VERSION:=1.4
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://www.intra2net.com/en/developer/libftdi/download/
PKG_INSTALL:=1
PKG_USE_MIPS16:=0
-CMAKE_OPTIONS:=-DBUILD_TESTS=OFF
-
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
read. Otherwise, you will still get the old values.
endef
+CMAKE_OPTIONS:= \
+ -DBUILD_TESTS=OFF \
+ -DBoost_NO_BOOST_CMAKE=ON
+
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/libftdi1/
$(CP) $(PKG_INSTALL_DIR)/usr/include/libftdi1/ftdi.h $(1)/usr/include/libftdi1/
include $(TOPDIR)/rules.mk
PKG_NAME:=libgabe
-PKG_VERSION:=0.99
+PKG_VERSION:=1.0
PKG_RELEASE:=1
-PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/schanzen/libgabe/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=2a8c151a90c9ad8eaad073c8ad1482d66875e3433b0b4fd1e08424c0fc89e877
+PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
PKG_LICENSE:=GPLv2
PKG_LICENSE_FILES:=COPYING
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_URL:=https://github.com/schanzen/libgabe.git
-PKG_SOURCE_VERSION:=f72c594eaed35d5a506e8f6c091200a73e17e702
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.xz
-PKG_MIRROR_HASH:=cc5527f7976d904d6c50f40612c5b3d0617342cfc8cf856434a305cfb42e27ff
-
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
$(INSTALL_DIR) $(1)/usr/include/
$(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib/
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
endef
define Package/libgabe/install
-# static library only
+ $(INSTALL_DIR) $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
endef
$(eval $(call BuildPackage,libgabe))
--- /dev/null
+From 9a0e73c5f6cbcf825eced89d26273a24f7266522 Mon Sep 17 00:00:00 2001
+From: "Schanzenbach, Martin" <martin.schanzenbach@aisec.fraunhofer.de>
+Date: Sun, 30 Sep 2018 20:38:37 +0200
+Subject: [PATCH] shared library
+
+---
+ Makefile.in | 13 ++++++-------
+ 1 file changed, 6 insertions(+), 7 deletions(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index f23bf90..c8c19fa 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -18,13 +18,12 @@ LDFLAGS = @LDFLAGS@ \
+
+ DISTNAME = @PACKAGE_TARNAME@-@PACKAGE_VERSION@
+
+-all: libgabe.a TAGS
++all: libgabe.so TAGS
+
+ # compilation and library making
+
+-libgabe.a: core.o misc.o
+- rm -f $@
+- ar rc $@ $^
++libgabe.so: core.o misc.o
++ $(CC) -shared -o $@ $^
+
+ # test: test.o libgabe.a
+ # $(CC) -o $@ $(LDFLAGS) $^
+@@ -44,14 +43,14 @@ dist: AUTHORS COPYING INSTALL NEWS README \
+ tar zc $(DISTNAME) > $(DISTNAME).tar.gz
+ rm -rf $(DISTNAME)
+
+-install: libgabe.a gabe.h
++install: libgabe.so gabe.h
+ $(top_srcdir)/mkinstalldirs -m 755 $(DESTDIR)$(libdir)
+ $(top_srcdir)/mkinstalldirs -m 755 $(DESTDIR)$(includedir)
+- $(top_srcdir)/install-sh -m 755 libgabe.a $(DESTDIR)$(libdir)
++ $(top_srcdir)/install-sh -m 755 libgabe.so $(DESTDIR)$(libdir)
+ $(top_srcdir)/install-sh -m 644 gabe.h $(DESTDIR)$(includedir)
+
+ uninstall:
+- /bin/rm -f $(DESTDIR)$(libdir)/libgabe.a
++ /bin/rm -f $(DESTDIR)$(libdir)/libgabe.so
+ /bin/rm -f $(DESTDIR)$(includedir)/gabe.h
+
+ # development and meta stuff
+--
+2.17.1
+
--- /dev/null
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=gflags
+PKG_VERSION:=2.2.2
+PKG_RELEASE:=3
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/gflags/gflags/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=34af2f15cf7367513b352bdcd2493ab14ce43692d2dcd9dfc499492966c64dcf
+
+PKG_MAINTAINER:=Amol Bhave <ambhave@fb.com>
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=COPYING.txt
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+PKG_BUILD_PARALLEL:=1
+HOST_BUILD_PARALLEL:=1
+CMAKE_OPTIONS:= \
+ -DGFLAGS_BUILD_SHARED_LIBS=ON \
+ -DGFLAGS_BUILD_STATIC_LIBS=ON
+CMAKE_INSTALL:=1
+
+define Package/gflags
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=C++ library that implements commandline flags processing
+ DEPENDS:=+libstdcpp +libpthread
+ URL:=https://github.com/gflags/gflags
+endef
+
+define Package/gflags/description
+ The gflags package contains a C++ library that implements commandline flags
+ processing. It includes built-in support for standard types such as string and
+ the ability to define flags in the source file in which they are used.
+endef
+
+define Package/gflags/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgflags.so* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,gflags))
+$(eval $(call HostBuild))
include $(TOPDIR)/rules.mk
PKG_NAME:=glog
-PKG_VERSION:=0.3.5
+PKG_VERSION:=0.4.0
PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/google/glog/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=7580e408a2c0b5a89ca214739978ce6ff480b5e7d8d7698a2aa92fadc484d1e0
+PKG_HASH:=f28359aeba12f30d73d9e4711ef356dc842886968112162bc73002645139c39c
PKG_LICENSE:=BSD-3-Clause
-PKG_LICENSE_FILE:=COPYING
+PKG_LICENSE_FILES:=COPYING
PKG_FIXUP:=autoreconf
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
+PKG_BUILD_DEPENDS:=libgflags
+
include $(INCLUDE_DIR)/package.mk
define Package/glog
SECTION:=libs
CATEGORY:=Libraries
TITLE:=C++ implementation of the Google logging module
- DEPENDS:= +libstdcpp +libpthread
+ DEPENDS:= +libstdcpp +libpthread +gflags
URL:=https://github.com/google/glog
MAINTAINER:=Amir Sabbaghi <amir@pichak.co>
endef
--- /dev/null
+Index: glog-0.4.0/src/symbolize_unittest.cc
+===================================================================
+--- glog-0.4.0.orig/src/symbolize_unittest.cc
++++ glog-0.4.0/src/symbolize_unittest.cc
+@@ -401,7 +401,7 @@ int main(int argc, char **argv) {
+ FLAGS_logtostderr = true;
+ InitGoogleLogging(argv[0]);
+ InitGoogleTest(&argc, argv);
+-#if defined(HAVE_SYMBOLIZE)
++#if defined(HAVE_SYMBOLIZE) && defined(HAVE_STACKTRACE)
+ # if defined(__ELF__)
+ // We don't want to get affected by the callback interface, that may be
+ // used to install some callback function at InitGoogle() time.
include $(TOPDIR)/rules.mk
PKG_NAME:=libgpg-error
-PKG_VERSION:=1.34
-PKG_RELEASE:=1
+PKG_VERSION:=1.36
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=https://ftp.bit.nl/mirror/gnupg/ \
- https://ftp.nluug.nl/security/gnupg/ \
- http://ring.ksc.gr.jp/archives/net/gnupg/libgpg-error/ \
- https://www.gnupg.org/ftp/gcrypt/libgpg-error/
-PKG_HASH:=0680799dee71b86b2f435efb825391eb040ce2704b057f6bd3dcc47fbc398c81
+PKG_SOURCE_URL:=https://mirrors.dotsrc.org/gcrypt/libgpg-error \
+ http://ring.ksc.gr.jp/archives/net/gnupg/libgpg-error \
+ https://www.gnupg.org/ftp/gcrypt/libgpg-error
+PKG_HASH:=babd98437208c163175c29453f8681094bcaf92968a15cafb1a276076b33c97c
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
-PKG_LICENSE:=LGPL-2.1+
+PKG_LICENSE:=LGPL-2.1-or-later
PKG_LICENSE_FILES:=COPYING
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
-
PKG_FIXUP:=autoreconf
include $(INCLUDE_DIR)/package.mk
--- a/configure.ac
+++ b/configure.ac
-@@ -74,6 +74,18 @@ AM_SILENT_RULES
+@@ -74,6 +74,21 @@ AM_SILENT_RULES
AC_CANONICAL_HOST
AB_INIT
+ arm-openwrt-linux-gnu|armeb-openwrt-linux-gnu)
+ host=arm-unknown-linux-gnueabi
+ ;;
++ mips64-openwrt-linux-gnu)
++ host=mips64el-unknown-linux-gnuabi64
++ ;;
+ *)
+ host=$(echo $host | sed 's/openwrt/unknown/g')
+ ;;
--- /dev/null
+From: Mylene Josserand <mylene.josserand at bootlin.com>
+
+DesignWare ARC Processors are a family of 32-bit CPUs from Synopsys.
+This change allows us to build for and use libgpg-error on ARC cores.
+
+These values were obtained from a test application executed on ARC
+in simulation this way:
+
+1. Instructions for cross-compilation used are here:
+ http://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgpg-error.git;a=blob;f=README
+
+2. Commands used on host:
+ # build="$(build-aux/config.guess)"
+ # ./configure --prefix=build/tmp-uclibc/sysroots/nsimhs/usr/ --host=arc-oe-linux-uclibc --build=$build
+ # cd src
+ # make gen-posix-lock-obj
+
+3. Commands used on target:
+ # ./gen-posix-lock-obj
+
+Signed-off-by: Mylene Josserand <mylene.josserand at bootlin.com>
+Signed-off-by: Alexey Brodkin <abrodkin at synopsys.com>
+---
+ src/Makefile.am | 1 +
+ .../lock-obj-pub.arc-unknown-linux-gnu.h | 23 +++++++++++++++++++
+ 2 files changed, 24 insertions(+)
+ create mode 100644 src/syscfg/lock-obj-pub.arc-unknown-linux-gnu.h
+
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 380ea7c09c04..bd00961c2f27 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -48,6 +48,7 @@ lock_obj_pub = \
+ syscfg/lock-obj-pub.aarch64-unknown-linux-gnu_ilp32.h \
+ syscfg/lock-obj-pub.aarch64-apple-darwin.h \
+ syscfg/lock-obj-pub.alpha-unknown-linux-gnu.h \
++ syscfg/lock-obj-pub.arc-unknown-linux-gnu.h \
+ syscfg/lock-obj-pub.arm-unknown-linux-androideabi.h \
+ syscfg/lock-obj-pub.arm-unknown-linux-gnueabi.h \
+ syscfg/lock-obj-pub.arm-apple-darwin.h \
+diff --git a/src/syscfg/lock-obj-pub.arc-unknown-linux-gnu.h b/src/syscfg/lock-obj-pub.arc-unknown-linux-gnu.h
+new file mode 100644
+index 000000000000..3b1a8fadf8a7
+--- /dev/null
++++ b/src/syscfg/lock-obj-pub.arc-unknown-linux-gnu.h
+@@ -0,0 +1,23 @@
++## lock-obj-pub.arc-oe-linux-uclibc.h
++## File created by gen-posix-lock-obj - DO NOT EDIT
++## To be included by mkheader into gpg-error.h
++
++typedef struct
++{
++ long _vers;
++ union {
++ volatile char _priv[24];
++ long _x_align;
++ long *_xp_align;
++ } u;
++} gpgrt_lock_t;
++
++#define GPGRT_LOCK_INITIALIZER {1,{{0,0,0,0,0,0,0,0, \
++ 0,0,0,0,0,0,0,0, \
++ 0,0,0,0,0,0,0,0}}}
++##
++## Local Variables:
++## mode: c
++## buffer-read-only: t
++## End:
++##
+--
+2.17.1
--- /dev/null
+From 7865041c77f4f7005282f10f9b6666b19072fbdf Mon Sep 17 00:00:00 2001
+From: NIIBE Yutaka <gniibe@fsij.org>
+Date: Mon, 15 Apr 2019 15:10:44 +0900
+Subject: [PATCH] awk: Prepare for Gawk 5.0.
+
+* src/Makefile.am: Use pkg_namespace (instead of namespace).
+* src/mkerrnos.awk: Likewise.
+* lang/cl/mkerrcodes.awk: Don't escape # in regexp.
+* src/mkerrcodes.awk, src/mkerrcodes1.awk, src/mkerrcodes2.awk: Ditto.
+
+--
+
+In Gawk 5.0, regexp routines are replaced by Gnulib implementation,
+which only allows escaping specific characters.
+
+GnuPG-bug-id: 4459
+Reported-by: Marius Schamschula
+Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
+---
+ lang/cl/mkerrcodes.awk | 2 +-
+ src/Makefile.am | 2 +-
+ src/mkerrcodes.awk | 2 +-
+ src/mkerrcodes1.awk | 2 +-
+ src/mkerrcodes2.awk | 2 +-
+ src/mkerrnos.awk | 2 +-
+ src/mkstrtable.awk | 10 +++++-----
+ 7 files changed, 11 insertions(+), 11 deletions(-)
+
+diff --git a/lang/cl/mkerrcodes.awk b/lang/cl/mkerrcodes.awk
+index ae29043..9a1fc18 100644
+--- a/lang/cl/mkerrcodes.awk
++++ b/lang/cl/mkerrcodes.awk
+@@ -122,7 +122,7 @@ header {
+ }
+
+ !header {
+- sub (/\#.+/, "");
++ sub (/#.+/, "");
+ sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
+
+ if (/^$/)
+diff --git a/src/Makefile.am b/src/Makefile.am
+index ce1b882..f2590cb 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -293,7 +293,7 @@ code-from-errno.h: mkerrcodes$(EXEEXT_FOR_BUILD) Makefile
+
+ errnos-sym.h: Makefile mkstrtable.awk errnos.in
+ $(AWK) -f $(srcdir)/mkstrtable.awk -v textidx=2 -v nogettext=1 \
+- -v prefix=GPG_ERR_ -v namespace=errnos_ \
++ -v prefix=GPG_ERR_ -v pkg_namespace=errnos_ \
+ $(srcdir)/errnos.in >$@
+
+
+diff --git a/src/mkerrcodes.awk b/src/mkerrcodes.awk
+index 46d436c..e9c857c 100644
+--- a/src/mkerrcodes.awk
++++ b/src/mkerrcodes.awk
+@@ -85,7 +85,7 @@ header {
+ }
+
+ !header {
+- sub (/\#.+/, "");
++ sub (/#.+/, "");
+ sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
+
+ if (/^$/)
+diff --git a/src/mkerrcodes1.awk b/src/mkerrcodes1.awk
+index a771a73..4578e29 100644
+--- a/src/mkerrcodes1.awk
++++ b/src/mkerrcodes1.awk
+@@ -81,7 +81,7 @@ header {
+ }
+
+ !header {
+- sub (/\#.+/, "");
++ sub (/#.+/, "");
+ sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
+
+ if (/^$/)
+diff --git a/src/mkerrcodes2.awk b/src/mkerrcodes2.awk
+index ea58503..188f7a4 100644
+--- a/src/mkerrcodes2.awk
++++ b/src/mkerrcodes2.awk
+@@ -91,7 +91,7 @@ header {
+ }
+
+ !header {
+- sub (/\#.+/, "");
++ sub (/#.+/, "");
+ sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
+
+ if (/^$/)
+diff --git a/src/mkerrnos.awk b/src/mkerrnos.awk
+index f79df66..15b1aad 100644
+--- a/src/mkerrnos.awk
++++ b/src/mkerrnos.awk
+@@ -83,7 +83,7 @@ header {
+ }
+
+ !header {
+- sub (/\#.+/, "");
++ sub (/#.+/, "");
+ sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
+
+ if (/^$/)
+diff --git a/src/mkstrtable.awk b/src/mkstrtable.awk
+index c9de9c1..285e45f 100644
+--- a/src/mkstrtable.awk
++++ b/src/mkstrtable.awk
+@@ -77,7 +77,7 @@
+ #
+ # The variable prefix can be used to prepend a string to each message.
+ #
+-# The variable namespace can be used to prepend a string to each
++# The variable pkg_namespace can be used to prepend a string to each
+ # variable and macro name.
+
+ BEGIN {
+@@ -102,7 +102,7 @@ header {
+ print "/* The purpose of this complex string table is to produce";
+ print " optimal code with a minimum of relocations. */";
+ print "";
+- print "static const char " namespace "msgstr[] = ";
++ print "static const char " pkg_namespace "msgstr[] = ";
+ header = 0;
+ }
+ else
+@@ -110,7 +110,7 @@ header {
+ }
+
+ !header {
+- sub (/\#.+/, "");
++ sub (/#.+/, "");
+ sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
+
+ if (/^$/)
+@@ -150,7 +150,7 @@ END {
+ else
+ print " gettext_noop (\"" last_msgstr "\");";
+ print "";
+- print "static const int " namespace "msgidx[] =";
++ print "static const int " pkg_namespace "msgidx[] =";
+ print " {";
+ for (i = 0; i < coded_msgs; i++)
+ print " " pos[i] ",";
+@@ -158,7 +158,7 @@ END {
+ print " };";
+ print "";
+ print "static GPG_ERR_INLINE int";
+- print namespace "msgidxof (int code)";
++ print pkg_namespace "msgidxof (int code)";
+ print "{";
+ print " return (0 ? 0";
+
+--
+2.21.0
+
include $(TOPDIR)/rules.mk
PKG_NAME:=libgphoto2
-PKG_VERSION:=2.5.22
+PKG_VERSION:=2.5.23
PKG_RELEASE:=1
PORT_VERSION:=0.12.0
PKG_MAINTAINER:=Leonardo Medici <leonardo_medici@me.com>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=@SF/gphoto
-PKG_HASH:=15d7327aa9a986af1e1dbfd8f15ba81352b67450d30e44562ce768ff9435ce58
+PKG_HASH:=d8af23364aa40fd8607f7e073df74e7ace05582f4ba13f1724d12d3c97e8852d
PKG_LICENSE:=LGPL-2.1
PKG_LICENSE_FILES:=COPYING
--enable-shared \
--enable-static \
--disable-rpath \
- --with-camlibs="all" \
+ --with-camlibs="all,outdated" \
--with-gdlib=no \
--with-libexif=no \
--with-libusb=no \
include $(TOPDIR)/rules.mk
PKG_NAME:=libgpiod
-PKG_VERSION:=1.2
+PKG_VERSION:=1.3
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@KERNEL/software/libs/libgpiod/
-PKG_HASH:=b6b9079c933f7c8524815437937dda6b795a16141bca202a9eec70ba5844b5ba
+PKG_HASH:=6ec837f23e8f2196e5976dec4ac81403170830075e7f33ede1394eaf67f2e962
PKG_LICENSE:=LGPL-2.1+
PKG_LICENSE_FILES:=COPYING
CATEGORY:=Libraries
URL:=https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git
TITLE:=Library for interacting with Linux's GPIO character device
- DEPENDS:=@GPIO_SUPPORT @(LINUX_4_9||LINUX_4_14)
+ DEPENDS:=@GPIO_SUPPORT
endef
define Package/libgpiod/description
include $(TOPDIR)/rules.mk
PKG_NAME:=libhttp-parser
-PKG_VERSION:=2.8.1
+PKG_VERSION:=2.9.2
PKG_RELEASE:=1
-PKG_MAINTAINER:=Ramanathan Sivagurunathan <ramzthecoder@gmail.com>
-PKG_LICENSE:=MIT
-PKG_LICENSE_FILES:=LICENSE-MIT
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/nodejs/http-parser/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=51615f68b8d67eadfd2482decc63b3e55d749ce0055502bbb5b0032726d22d96
+PKG_HASH:=5199500e352584852c95c13423edc5f0cb329297c81dd69c3c8f52a75496da08
PKG_BUILD_DIR:=$(BUILD_DIR)/http-parser-$(PKG_VERSION)
+PKG_MAINTAINER:=Ramanathan Sivagurunathan <ramzthecoder@gmail.com>, Hirokazu MORIKAWA <morikw2@gmail.com>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE-MIT
+
+PKG_BUILD_PARALLEL:=1
+PKG_INSTALL:=1
+
include $(INCLUDE_DIR)/package.mk
define Package/libhttp-parser
endef
define Package/libhttp-parser/description
- A parser for HTTP messages written in C. It parses both requests and responses.
+ A parser for HTTP messages written in C. It parses both requests and responses.
The parser is designed to be used in performance HTTP applications.
It does not make any syscalls nor allocations, it does not buffer data,
it can be interrupted at anytime. Depending on your architecture,
(in a web server that is per connection).
endef
-define Build/Compile
- $(call Build/Compile/Default, library)
-endef
+MAKE_FLAGS+=library
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
- $(INSTALL_DATA) $(PKG_BUILD_DIR)/http_parser.h $(1)/usr/include/
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/local/include/http_parser.h $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
- $(INSTALL_DATA) $(PKG_BUILD_DIR)/libhttp_parser.so.* $(1)/usr/lib/
- ( cd $(1)/usr/lib ; \
- ln -s libhttp_parser.so.$(PKG_VERSION) libhttp_parser.so ; \
- ln -s libhttp_parser.so.$(PKG_VERSION) libhttp_parser.so.2.8 )
+ $(CP) $(PKG_INSTALL_DIR)/usr/local/lib/libhttp_parser.so* $(1)/usr/lib/
endef
define Package/libhttp-parser/install
$(INSTALL_DIR) $(1)/usr/lib
- $(CP) $(PKG_BUILD_DIR)/libhttp_parser.so.* $(1)/usr/lib/
- ( cd $(1)/usr/lib ; \
- ln -s libhttp_parser.so.$(PKG_VERSION) libhttp_parser.so ; \
- ln -s libhttp_parser.so.$(PKG_VERSION) libhttp_parser.so.2.8 )
+ $(CP) $(PKG_INSTALL_DIR)/usr/local/lib/libhttp_parser.so* $(1)/usr/lib/
endef
$(eval $(call BuildPackage,libhttp-parser))
include $(TOPDIR)/rules.mk
PKG_NAME:=libimobiledevice
-PKG_VERSION:=1.2.1
-PKG_RELEASE:=2
+PKG_SOURCE_DATE:=2019-02-16
+PKG_SOURCE_VERSION:=0584aa90c93ff6ce46927b8d67887cb987ab9545
+PKG_RELEASE:=1
-PKG_MAINTAINER:=Lukasz Baj <l.baj@radytek.com>
+PKG_MAINTAINER:=
PKG_LICENSE:=LGPL-2.1+
PKG_LICENSE_FILES:=COPYING.LESSER
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/libimobiledevice/libimobiledevice.git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=13bf235cac2201747de11652cf14fe2714ca0718
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
-PKG_MIRROR_HASH:=4e8892b27f20216f86d69b36ad2229fca87cdf0a10f8d3e145d01841a492562a
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_DATE).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/libimobiledevice/libimobiledevice/tar.gz/$(PKG_SOURCE_VERSION)?
+PKG_HASH:=286e294aad60ef04a39ce70512a0e816415167c982f3e6c2988d9a6b8c5ee29b
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_SOURCE_VERSION)
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk
-include ../../lang/python/python-package.mk
define Package/libimobiledevice/Default
TITLE:=A library that talks to Apple devices.
- URL:=http://www.libimobiledevice.org/
+ URL:=https://www.libimobiledevice.org/
endef
define Package/libimobiledevice/Default/description
This package contains the libimobiledevice utilities.
endef
-CONFIGURE_VARS += \
- libusbmuxd_CFLAGS="-I$(STAGING_DIR)/usr/include" \
- libusbmuxd_LIBS="-L$(STAGING_DIR)/usr/lib -lusbmuxd" \
- openssl_CFLAGS=" " \
- openssl_LIBS="-L$(STAGING_DIR)/usr/lib -lssl -lcrypto"
-
-CONFIGURE_ARGS += \
- --without-cython \
- --disable-largefile
-
-TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib
+CONFIGURE_VARS += ac_cv_sys_file_offset_bits=64
+CONFIGURE_ARGS += --without-cython
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
--- /dev/null
+--- a/common/userpref.c
++++ b/common/userpref.c
+@@ -37,6 +37,7 @@
+ #include <unistd.h>
+ #include <usbmuxd.h>
+ #ifdef HAVE_OPENSSL
++#include <openssl/bn.h>
+ #include <openssl/pem.h>
+ #include <openssl/rsa.h>
+ #include <openssl/x509.h>
+@@ -73,6 +74,11 @@ const ASN1_ARRAY_TYPE pkcs1_asn1_tab[] = {
+ };
+ #endif
+
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#define X509_set1_notBefore X509_set_notBefore
++#define X509_set1_notAfter X509_set_notAfter
++#endif
++
+ #ifdef WIN32
+ #define DIR_SEP '\\'
+ #define DIR_SEP_S "\\"
+@@ -420,9 +426,9 @@ userpref_error_t pair_record_generate_keys_and_certs(plist_t pair_record, key_da
+ /* set key validity */
+ ASN1_TIME* asn1time = ASN1_TIME_new();
+ ASN1_TIME_set(asn1time, time(NULL));
+- X509_set_notBefore(root_cert, asn1time);
++ X509_set1_notBefore(root_cert, asn1time);
+ ASN1_TIME_set(asn1time, time(NULL) + (60 * 60 * 24 * 365 * 10));
+- X509_set_notAfter(root_cert, asn1time);
++ X509_set1_notAfter(root_cert, asn1time);
+ ASN1_TIME_free(asn1time);
+
+ /* use root public key for root cert */
+@@ -453,9 +459,9 @@ userpref_error_t pair_record_generate_keys_and_certs(plist_t pair_record, key_da
+ /* set key validity */
+ ASN1_TIME* asn1time = ASN1_TIME_new();
+ ASN1_TIME_set(asn1time, time(NULL));
+- X509_set_notBefore(host_cert, asn1time);
++ X509_set1_notBefore(host_cert, asn1time);
+ ASN1_TIME_set(asn1time, time(NULL) + (60 * 60 * 24 * 365 * 10));
+- X509_set_notAfter(host_cert, asn1time);
++ X509_set1_notAfter(host_cert, asn1time);
+ ASN1_TIME_free(asn1time);
+
+ /* use host public key for host cert */
+@@ -533,9 +539,9 @@ userpref_error_t pair_record_generate_keys_and_certs(plist_t pair_record, key_da
+
+ ASN1_TIME* asn1time = ASN1_TIME_new();
+ ASN1_TIME_set(asn1time, time(NULL));
+- X509_set_notBefore(dev_cert, asn1time);
++ X509_set1_notBefore(dev_cert, asn1time);
+ ASN1_TIME_set(asn1time, time(NULL) + (60 * 60 * 24 * 365 * 10));
+- X509_set_notAfter(dev_cert, asn1time);
++ X509_set1_notAfter(dev_cert, asn1time);
+ ASN1_TIME_free(asn1time);
+
+ EVP_PKEY* pkey = EVP_PKEY_new();
+--- a/src/idevice.c
++++ b/src/idevice.c
+@@ -36,6 +36,7 @@
+ #include <usbmuxd.h>
+ #ifdef HAVE_OPENSSL
+ #include <openssl/err.h>
++#include <openssl/rsa.h>
+ #include <openssl/ssl.h>
+
+ #else
+@@ -49,6 +50,10 @@
+
+ #ifdef HAVE_OPENSSL
+
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#define TLS_method TLSv1_method
++#endif
++
+ #if OPENSSL_VERSION_NUMBER < 0x10002000L
+ static void SSL_COMP_free_compression_methods(void)
+ {
+@@ -721,7 +726,7 @@ LIBIMOBILEDEVICE_API idevice_error_t idevice_connection_enable_ssl(idevice_conne
+ }
+ BIO_set_fd(ssl_bio, (int)(long)connection->data, BIO_NOCLOSE);
+
+- SSL_CTX *ssl_ctx = SSL_CTX_new(TLSv1_method());
++ SSL_CTX *ssl_ctx = SSL_CTX_new(TLS_method());
+ if (ssl_ctx == NULL) {
+ debug_info("ERROR: Could not create SSL context.");
+ BIO_free(ssl_bio);
PKG_NAME:=libinput
PKG_VERSION:=1.7.3
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=http://www.freedesktop.org/software/libinput/
--- /dev/null
+--- a/src/libinput.h
++++ b/src/libinput.h
+@@ -29,6 +29,7 @@
+ extern "C" {
+ #endif
+
++#include <stdarg.h>
+ #include <stdlib.h>
+ #include <stdint.h>
+ #include <libudev.h>
PKG_NAME:=jpeg
PKG_VERSION:=9c
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)src.v$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.ijg.org/files
$(CP) $(PKG_INSTALL_DIR)/usr/include/j{config,error,morecfg}.h $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libjpeg.{a,so*} $(1)/usr/lib/
+ $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libjpeg.pc $(1)/usr/lib/pkgconfig/
endef
define Package/libjpeg/install
include $(TOPDIR)/rules.mk
PKG_NAME:=liblo
-PKG_VERSION:=0.29
+PKG_VERSION:=0.30
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/liblo
-PKG_HASH:=ace1b4e234091425c150261d1ca7070cece48ee3c228a5612d048116d864c06a
+PKG_HASH:=30a7c9de49a25ed7f2425a7a7415f5b14739def62431423d3419ea26fb978d1b
+PKG_MAINTAINER:=
PKG_LICENSE:=LGPL-2.1+
PKG_LICENSE_FILES:=COPYING
-PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org>
PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
DEPENDS:= +liblo
endef
-TARGET_CFLAGS += \
- -Wno-error=maybe-uninitialized \
-
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/lo $(1)/usr/include/
+++ /dev/null
---- a/src/server.c
-+++ b/src/server.c
-@@ -48,7 +48,7 @@
- #include <netdb.h>
- #include <sys/socket.h>
- #ifdef HAVE_POLL
--#include <sys/poll.h>
-+#include <poll.h>
- #endif
- #include <sys/un.h>
- #include <arpa/inet.h>
--- /dev/null
+config LZ4_OPTIMIZE_SPEED
+ bool "Optimize for speed"
+ depends on PACKAGE_liblz4
+ help
+ This enables additional optimization and
+ increases performance considerably at
+ the expense of binary size.
include $(TOPDIR)/rules.mk
-# Although liblz4 exports a major.minor.patch version, it isn't always
-# incremented for new releases. Check the NEWS file and instead use a
-# release tag when appropriate. (eg: PKG_VERSION:=r131)
PKG_NAME:=liblz4
-PKG_VERSION:=v1.7.5
+PKG_VERSION:=1.9.1
PKG_RELEASE:=1
-PKG_LICENSE:=BSD-2-Clause
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/lz4/lz4/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=f8377c89dad5c9f266edc0be9b73595296ecafd5bfa1000de148096c50052dc4
+PKG_BUILD_DIR:=$(BUILD_DIR)/lz4-$(PKG_VERSION)
+
PKG_MAINTAINER:=Darik Horn <dajhorn@vanadac.com>
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_MIRROR_HASH:=afb362b970816e06dac4997d26dd7d2cdb83168510228d174d25b1044b271e18
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_URL:=https://github.com/lz4/lz4.git
-PKG_SOURCE_VERSION:=$(PKG_VERSION)
+PKG_BUILD_PARALLEL:=1
+CMAKE_INSTALL:=1
+CMAKE_SOURCE_SUBDIR:=contrib/cmake_unofficial
include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+define Package/lz4/Default
+ SUBMENU:=Compression
+ URL:=https://www.lz4.org/
+endef
define Package/liblz4
- SECTION:=libs
- CATEGORY:=Libraries
- TITLE:=Extremely fast compression
- URL:=http://www.lz4.org/
+$(call Package/lz4/Default)
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=Extremely fast compression
+ LICENSE:=BSD-2-Clause
+ LICENSE_FILES:=LICENSE lib/LICENSE
+ ABI_VERSION:=$(firstword $(subst .,$(space),$(PKG_VERSION)))
+ MENU:=1
endef
define Package/liblz4/description
even faster decoder. This package provides the liblz4 shared library.
endef
-TARGET_CFLAGS += $(FPIC)
+define Package/liblz4/config
+ source "$(SOURCE)/Config.in"
+endef
-define Build/Compile
- $(MAKE) -C "$(PKG_BUILD_DIR)/lib" $(MAKE_INSTALL_FLAGS) \
- CC="$(TARGET_CC)" \
- CFLAGS="$(TARGET_CFLAGS)" \
- PREFIX="$(CONFIGURE_PREFIX)" \
- install
+define Package/lz4
+$(call Package/lz4/Default)
+ SECTION:=utils
+ CATEGORY:=Utilities
+ TITLE:=Extremely fast compression
+ LICENSE:=GPL-2.0-or-later
+ LICENSE_FILES:=LICENSE programs/COPYING
+ DEPENDS:=+liblz4
endef
-define Build/InstallDev
- $(CP) $(PKG_INSTALL_DIR)/* $(1)/
+define Package/lz4/description
+ LZ4 - Fast real-time compression algorithm.
+ This package provides the lz4 binaries.
endef
+CMAKE_OPTIONS += \
+ -DCMAKE_INSTALL_MANDIR=/dev/null \
+ -DLZ4_BUILD_LEGACY_LZ4C=OFF
+
+ifeq ($(CONFIG_LZ4_OPTIMIZE_SPEED),y)
+ TARGET_CFLAGS := $(filter-out -O%,$(TARGET_CFLAGS)) -O3
+endif
+
+TARGET_CFLAGS += $(FPIC) -ffunction-sections -fdata-sections -flto
+TARGET_LDFLAGS += -Wl,--gc-sections
+
define Package/liblz4/install
$(INSTALL_DIR) $(1)/usr/lib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblz4.so* $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblz4.so.$(ABI_VERSION)* $(1)/usr/lib/
+endef
+
+define Package/lz4/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/{lz4,lz4cat,unlz4} $(1)/usr/bin/
endef
$(eval $(call BuildPackage,liblz4))
+$(eval $(call BuildPackage,lz4))
--- /dev/null
+#
+# Copyright (C) 2019 CZ.NIC z.s.p.o. (http://www.nic.cz/)
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libmaxminddb
+PKG_VERSION:=1.3.2
+PKG_RELEASE=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://github.com/maxmind/libmaxminddb/releases/download/$(PKG_VERSION)/
+PKG_HASH:=e6f881aa6bd8cfa154a44d965450620df1f714c6dc9dd9971ad98f6e04f6c0f0
+
+PKG_INSTALL:=1
+PKG_FIXUP:=autoreconf
+PKG_BUILD_PARALLEL:=1
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libmaxminddb
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=A library for working with MaxMind DB files
+ URL:=https://maxmind.github.io/libmaxminddb/
+endef
+
+define Package/libmaxminddb/description
+ The libmaxminddb library provides functions for working MaxMind DB files.
+endef
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/include/
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
+ $(INSTALL_DIR) $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmaxminddb.{a,so*} $(1)/usr/lib/
+endef
+
+define Package/libmaxminddb/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mmdblookup $(1)/usr/bin/
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmaxminddb.so* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,libmaxminddb))
PKG_NAME:=libmicrohttpd
PKG_VERSION:=0.9.62
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_MAINTAINER:=Alexander Couzens <lynxis@fe80.eu>
PKG_LICENSE:=LGPL-2.1
PKG_LICENSE_FILES:=COPYING
URL:=http://www.gnu.org/software/libmicrohttpd/
endef
-define Package/libmicrohttpd
+define Package/libmicrohttpd-no-ssl
$(call Package/libmicrohttpd/default)
VARIANT:=nossl
- CONFLICTS:=libmicrohttpd-ssl
+ DEFAULT_VARIANT:=1
+ PROVIDES:=libmicrohttpd
endef
define Package/libmicrohttpd-ssl
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libmicrohttpd.pc $(1)/usr/lib/pkgconfig/
endef
-define Package/libmicrohttpd/install
+define Package/libmicrohttpd-no-ssl/install
$(INSTALL_DIR) $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libmicrohttpd.so* $(1)/usr/lib/
endef
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libmicrohttpd.so* $(1)/usr/lib/
endef
-$(eval $(call BuildPackage,libmicrohttpd))
+$(eval $(call BuildPackage,libmicrohttpd-no-ssl))
$(eval $(call BuildPackage,libmicrohttpd-ssl))
PKG_NAME:=libmodbus
PKG_VERSION:=3.1.4
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://libmodbus.org/releases
--- /dev/null
+From 1c5d969f46ccd5333f602dfbe2b0a1295650b9b0 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?St=C3=A9phane=20Raimbault?= <stephane.raimbault@gmail.com>
+Date: Wed, 25 Oct 2017 20:35:47 +0200
+Subject: [PATCH 1/2] Only set SER_RS485_ENABLED bit of existing RS485 settings
+
+Thanks to @JCWren
+---
+ src/modbus-rtu.c | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/src/modbus-rtu.c b/src/modbus-rtu.c
+index 8d9f386..f2911d6 100644
+--- a/src/modbus-rtu.c
++++ b/src/modbus-rtu.c
+@@ -909,9 +909,13 @@ int modbus_rtu_set_serial_mode(modbus_t *ctx, int mode)
+ #if HAVE_DECL_TIOCSRS485
+ modbus_rtu_t *ctx_rtu = ctx->backend_data;
+ struct serial_rs485 rs485conf;
+- memset(&rs485conf, 0x0, sizeof(struct serial_rs485));
+
+ if (mode == MODBUS_RTU_RS485) {
++ // Get
++ if (ioctl(ctx->s, TIOCGRS485, &rs485conf) < 0) {
++ return -1;
++ }
++ // Set
+ rs485conf.flags = SER_RS485_ENABLED;
+ if (ioctl(ctx->s, TIOCSRS485, &rs485conf) < 0) {
+ return -1;
+@@ -923,6 +927,10 @@ int modbus_rtu_set_serial_mode(modbus_t *ctx, int mode)
+ /* Turn off RS485 mode only if required */
+ if (ctx_rtu->serial_mode == MODBUS_RTU_RS485) {
+ /* The ioctl call is avoided because it can fail on some RS232 ports */
++ if (ioctl(ctx->s, TIOCGRS485, &rs485conf) < 0) {
++ return -1;
++ }
++ rs485conf.flags &= ~SER_RS485_ENABLED;
+ if (ioctl(ctx->s, TIOCSRS485, &rs485conf) < 0) {
+ return -1;
+ }
+--
+2.21.0
+
--- /dev/null
+From 91a1d74f76c64e7b35bfb10114e1a4a6ff351656 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?St=C3=A9phane=20Raimbault?= <stephane.raimbault@gmail.com>
+Date: Thu, 26 Oct 2017 11:10:31 +0200
+Subject: [PATCH 2/2] Oops fix OR on RS485 settings (1c5d969)
+
+---
+ src/modbus-rtu.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/modbus-rtu.c b/src/modbus-rtu.c
+index f2911d6..190298e 100644
+--- a/src/modbus-rtu.c
++++ b/src/modbus-rtu.c
+@@ -916,7 +916,7 @@ int modbus_rtu_set_serial_mode(modbus_t *ctx, int mode)
+ return -1;
+ }
+ // Set
+- rs485conf.flags = SER_RS485_ENABLED;
++ rs485conf.flags |= SER_RS485_ENABLED;
+ if (ioctl(ctx->s, TIOCSRS485, &rs485conf) < 0) {
+ return -1;
+ }
+--
+2.21.0
+
define Package/libmraa
$(call Package/libmraa/Default)
TITLE:=Intel IoT lowlevel IO C/C++ library
- DEPENDS:=+libstdcpp +libjson-c
+ DEPENDS:=+libstdcpp +libjson-c @!arc @!armeb @!powerpc
endef
define Package/libmraa/description
--- /dev/null
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libmstch
+PKG_VERSION:=1.0.2
+PKG_RELEASE:=2
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/no1msd/mstch/tar.gz/$(PKG_VERSION)?
+PKG_HASH:=811ed61400d4e9d4f9ae0f7679a2ffd590f0b3c06b16f2798e1f89ab917cba6c
+PKG_BUILD_DIR:=$(BUILD_DIR)/mstch-$(PKG_VERSION)
+HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/mstch-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Amol Bhave <ambhave@fb.com>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+
+HOST_BUILD_DEPENDS:=boost/host
+PKG_BUILD_PARALLEL:=1
+CMAKE_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+define Package/libmstch
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=Complete implementation of {{mustache}} templates using modern C++
+ DEPENDS:=+boost +boost-container
+ URL:=https://github.com/no1msd/mstch
+endef
+
+define Package/libmstch/description
+ mstch is a complete implementation of {{mustache}} templates using modern C++
+endef
+
+CMAKE_OPTIONS += \
+ -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE
+
+$(eval $(call BuildPackage,libmstch))
+$(eval $(call HostBuild))
PKG_NAME:=libnatpmp
PKG_VERSION:=20150609
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://miniupnp.tuxfamily.org/files
PKG_HASH:=e1aa9c4c4219bc06943d6b2130f664daee213fb262fcb94dd355815b8f4536b0
-PKG_MAINTAINER:=Hauke Mehrtens <hauke@hauke-m.de>
-PKG_LICENSE:=BSD-3c
+
+PKG_MAINTAINER:=Rosen Penev <rosenp@gmail.com>
+PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
-PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
+CMAKE_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
define Package/libnatpmp/Default
TITLE:=NAT Port Mapping Protocol (NAT-PMP)
- URL:=http://miniupnp.free.fr/libnatpmp.html
+ URL:=https://miniupnp.tuxfamily.org/libnatpmp.html
endef
define Package/libnatpmp/Default/description
SECTION:=libs
CATEGORY:=Libraries
TITLE+= library
+ ABI_VERSION:=1
endef
define Package/libnatpmp/description
This package contains the natpmp client.
endef
-MAKE_FLAGS += \
- COPTS="$(TARGET_CFLAGS)" \
- PREFIX="$(PKG_INSTALL_DIR)" \
- OS="Linux"
-
-define Build/InstallDev
- $(INSTALL_DIR) $(1)/usr/include
- $(CP) $(PKG_INSTALL_DIR)/usr/include/declspec.h $(1)/usr/include/
- $(CP) $(PKG_INSTALL_DIR)/usr/include/natpmp.h $(1)/usr/include/
- $(INSTALL_DIR) $(1)/usr/lib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnatpmp*.{so*,a} $(1)/usr/lib/
-endef
-
define Package/libnatpmp/install
$(INSTALL_DIR) $(1)/usr/lib
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libnatpmp.so.* $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnatpmp.so.* $(1)/usr/lib/
endef
define Package/natpmpc/install
+++ /dev/null
---- a/Makefile
-+++ b/Makefile
-@@ -56,7 +56,7 @@ else
- endif
- endif
-
--HEADERS = natpmp.h
-+HEADERS = natpmp.h declspec.h
-
- EXECUTABLES = testgetgateway natpmpc-shared natpmpc-static
-
--- /dev/null
+--- /dev/null
++++ b/CMakeLists.txt
+@@ -0,0 +1,50 @@
++cmake_minimum_required(VERSION 2.8.12)
++
++if(POLICY CMP0048)
++ cmake_policy(SET CMP0048 NEW)
++endif()
++
++project(natpmp C)
++
++set (NATPMP_VERSION 20150609)
++set (NATPMP_API_VERSION 1)
++
++set (NATPMP_SOURCES
++ natpmp.c
++ getgateway.c
++)
++
++if (WIN32)
++ set (NATPMP_SOURCES ${NATPMP_SOURCES} wingettimeofday.c)
++endif (WIN32)
++
++# Library itself
++add_library(natpmp SHARED ${NATPMP_SOURCES})
++set_target_properties (natpmp PROPERTIES OUTPUT_NAME "natpmp")
++set_target_properties (natpmp PROPERTIES VERSION ${NATPMP_VERSION})
++set_target_properties (natpmp PROPERTIES SOVERSION ${NATPMP_API_VERSION})
++target_compile_definitions(natpmp PRIVATE -DENABLE_STRNATPMPERR)
++target_include_directories(natpmp PUBLIC ${CMAKE_CURRENT_LIST_DIR})
++
++if (WIN32)
++ target_link_libraries(natpmp PUBLIC ws2_32 Iphlpapi)
++ target_compile_definitions(natpmp PUBLIC -DNATPMP_STATICLIB)
++endif (WIN32)
++
++install(TARGETS natpmp
++ RUNTIME DESTINATION bin
++ LIBRARY DESTINATION lib${LIB_SUFFIX}
++ ARCHIVE DESTINATION lib${LIB_SUFFIX})
++
++# Executables
++add_executable(natpmpc natpmpc.c)
++target_link_libraries(natpmpc natpmp)
++
++install(FILES natpmpc DESTINATION bin)
++
++add_executable(testgetgateway
++ testgetgateway.c
++ getgateway.c)
++target_link_libraries(testgetgateway natpmp)
++
++install(FILES natpmp.h DESTINATION include)
include $(TOPDIR)/rules.mk
PKG_NAME:=libndpi
-PKG_VERSION:=2.6
+PKG_VERSION:=2.8
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/ntop/nDPI/tar.gz/$(PKG_VERSION)?
-PKG_HASH:=efdfb68940385b18079920330528978765dc2a90c8163d10f63301bddadbf91e
+PKG_HASH:=f98def4d0e43818317b20e2887ce500b2d6a5a9c8ddb28cf57ae51caae0f33cc
PKG_BUILD_DIR:=$(BUILD_DIR)/nDPI-$(PKG_VERSION)
PKG_MAINTAINER:=Banglang Huang <banglang.huang@foxmail.com>
PKG_LICENSE_FILES:=COPYING
PKG_FIXUP:=autoreconf
+PKG_REMOVE_FILES:=autogen.sh
PKG_BUILD_DEPENDS:=libpcap
PKG_BUILD_PARALLEL:=1
-PKG_INSTALL:=1
include $(INCLUDE_DIR)/uclibc++.mk
include $(INCLUDE_DIR)/package.mk
Based on OpenDPI it includes ntop extensions.
endef
-define Build/Configure
- ( cd $(PKG_BUILD_DIR); ./autogen.sh )
- $(call Build/Configure/Default)
+define Build/Prepare
+ $(PKG_UNPACK)
+ $(Build/Patch)
+ mv $(PKG_BUILD_DIR)/configure.seed $(PKG_BUILD_DIR)/configure.ac
+ $(SED) "s/@NDPI_MAJOR@/2/g" \
+ -e "s/@NDPI_MINOR@/8/g" \
+ -e "s/@NDPI_PATCH@/0/g" \
+ -e "s/@NDPI_VERSION_SHORT@/2.8.0/g" \
+ $(PKG_BUILD_DIR)/configure.ac
endef
define Build/InstallDev
- $(INSTALL_DIR) $(1)/usr/include/
- $(CP) \
- $(PKG_INSTALL_DIR)/usr/local/include/ndpi \
- $(1)/usr/include/
+ $(INSTALL_DIR) $(1)/usr/include/ndpi
+ $(CP) $(PKG_BUILD_DIR)/src/include/*.h \
+ $(1)/usr/include/ndpi/
$(INSTALL_DIR) $(1)/usr/lib
- $(CP) \
- $(PKG_INSTALL_DIR)/usr/local/lib/libndpi.so* \
+ $(CP) $(PKG_BUILD_DIR)/src/lib/libndpi.so* \
$(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
- $(CP) \
- $(PKG_INSTALL_DIR)/usr/libdata/pkgconfig/libndpi.pc \
+ $(CP) $(PKG_BUILD_DIR)/libndpi.pc \
$(1)/usr/lib/pkgconfig/
endef
define Package/libndpi/install
$(INSTALL_DIR) $(1)/usr/lib/
- $(CP) \
- $(PKG_INSTALL_DIR)/usr/local/lib/libndpi.so* \
+ $(CP) $(PKG_BUILD_DIR)/src/lib/libndpi.so* \
$(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/bin/
- $(CP) \
- $(PKG_INSTALL_DIR)/usr/local/bin/ndpiReader \
+ $(CP) $(PKG_BUILD_DIR)/example/ndpiReader \
$(1)/usr/bin/
endef
PKG_NAME:=libnetconf2
PKG_VERSION:=0.12-r1
-PKG_RELEASE:=2
-
-PKG_LICENSE:=BSD-3-Clause
-PKG_MAINTAINER:=Mislav Novakovic <mislav.novakovic@sartura.hr>
+PKG_RELEASE:=4
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/CESNET/libnetconf2/tar.gz/v$(PKG_VERSION)?
PKG_HASH:=86269d3f1bc85bb17d8823d214f9a676ee3b14ee18a0b87a230380df8503e8f5
-CMAKE_INSTALL:=1
+PKG_MAINTAINER:=Mislav Novakovic <mislav.novakovic@sartura.hr>
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=LICENSE
PKG_BUILD_PARALLEL:=1
-PKG_INSTALL:=1
+CMAKE_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
SECTION:=libs
CATEGORY:=Libraries
TITLE:=NETCONF library
- URL:=$(PKG_SOURCE_URL)
+ URL:=https://github.com/CESNET/libnetconf2
DEPENDS:= +libyang +libssh +libopenssl +libpthread
endef
-DCMAKE_INSTALL_PREFIX:PATH=/usr \
-DCMAKE_BUILD_TYPE:STRING=Release
-define Build/InstallDev
- $(INSTALL_DIR) $(1)/usr/include/libnetconf2
- $(CP) $(PKG_INSTALL_DIR)/usr/include/libnetconf2/*.h $(1)/usr/include/libnetconf2/
- $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
-
- $(INSTALL_DIR) $(1)/usr/lib
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libnetconf2.so* $(1)/usr/lib/
-
- $(INSTALL_DIR) $(1)/usr/include/libnetconf2
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/include/libnetconf2/* $(1)/usr/include/libnetconf2/
-
- $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
- $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libnetconf2.pc $(1)/usr/lib/pkgconfig/
-endef
-
define Package/libnetconf2/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libnetconf2.so* $(1)/usr/lib/
--- /dev/null
+--- a/src/session.c
++++ b/src/session.c
+@@ -1372,11 +1372,11 @@ tls_thread_id_func(CRYPTO_THREADID *tid)
+ static void
+ nc_tls_init(void)
+ {
++#if OPENSSL_VERSION_NUMBER < 0x10100000L // < 1.1.0
+ SSL_load_error_strings();
+ ERR_load_BIO_strings();
+ SSL_library_init();
+
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L // < 1.1.0
+ int i;
+
+ tls_locks = malloc(CRYPTO_num_locks() * sizeof *tls_locks);
+@@ -1400,6 +1400,7 @@ nc_tls_init(void)
+ static void
+ nc_tls_destroy(void)
+ {
++#if OPENSSL_VERSION_NUMBER < 0x10100000L // < 1.1.0
+ FIPS_mode_set(0);
+ CRYPTO_cleanup_all_ex_data();
+ nc_thread_destroy();
+@@ -1411,7 +1412,6 @@ nc_tls_destroy(void)
+ SSL_COMP_free_compression_methods();
+ #endif
+
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L // < 1.1.0
+ int i;
+
+ CRYPTO_THREADID_set_callback(NULL);
+@@ -1434,13 +1434,13 @@ nc_tls_destroy(void)
+ static void
+ nc_ssh_tls_init(void)
+ {
++#if OPENSSL_VERSION_NUMBER < 0x10100000L // < 1.1.0
+ SSL_load_error_strings();
+ ERR_load_BIO_strings();
+ SSL_library_init();
+
+ nc_ssh_init();
+
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L // < 1.1.0
+ CRYPTO_set_dynlock_create_callback(tls_dyn_create_func);
+ CRYPTO_set_dynlock_lock_callback(tls_dyn_lock_func);
+ CRYPTO_set_dynlock_destroy_callback(tls_dyn_destroy_func);
+@@ -1450,6 +1450,7 @@ nc_ssh_tls_init(void)
+ static void
+ nc_ssh_tls_destroy(void)
+ {
++#if OPENSSL_VERSION_NUMBER < 0x10100000L // < 1.1.0
+ ERR_free_strings();
+ #if OPENSSL_VERSION_NUMBER < 0x10002000L // < 1.0.2
+ sk_SSL_COMP_free(SSL_COMP_get_compression_methods());
+@@ -1459,7 +1460,6 @@ nc_ssh_tls_destroy(void)
+
+ nc_ssh_destroy();
+
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L // < 1.1.0
+ CRYPTO_set_dynlock_create_callback(NULL);
+ CRYPTO_set_dynlock_lock_callback(NULL);
+ CRYPTO_set_dynlock_destroy_callback(NULL);
+--- a/src/session_client_tls.c
++++ b/src/session_client_tls.c
+@@ -29,6 +29,10 @@
+ #include "session_client_ch.h"
+ #include "libnetconf.h"
+
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#define X509_STORE_CTX_get_by_subject X509_STORE_get_by_subject
++#endif
++
+ struct nc_client_context *nc_client_context_location(void);
+ int nc_session_new_ctx( struct nc_session *session, struct ly_ctx *ctx);
+
+@@ -74,7 +78,7 @@ tlsauth_verify_callback(int preverify_ok, X509_STORE_CTX *x509_ctx)
+ store_ctx = X509_STORE_CTX_new();
+ obj = X509_OBJECT_new();
+ X509_STORE_CTX_init(store_ctx, opts->crl_store, NULL, NULL);
+- rc = X509_STORE_get_by_subject(store_ctx, X509_LU_CRL, subject, obj);
++ rc = X509_STORE_CTX_get_by_subject(store_ctx, X509_LU_CRL, subject, obj);
+ X509_STORE_CTX_free(store_ctx);
+ crl = X509_OBJECT_get0_X509_CRL(obj);
+ if (rc > 0 && crl) {
+@@ -113,7 +117,7 @@ tlsauth_verify_callback(int preverify_ok, X509_STORE_CTX *x509_ctx)
+ store_ctx = X509_STORE_CTX_new();
+ obj = X509_OBJECT_new();
+ X509_STORE_CTX_init(store_ctx, opts->crl_store, NULL, NULL);
+- rc = X509_STORE_get_by_subject(store_ctx, X509_LU_CRL, issuer, obj);
++ rc = X509_STORE_CTX_get_by_subject(store_ctx, X509_LU_CRL, issuer, obj);
+ X509_STORE_CTX_free(store_ctx);
+ crl = X509_OBJECT_get0_X509_CRL(obj);
+ if (rc > 0 && crl) {
+@@ -169,7 +173,7 @@ tlsauth_verify_callback(int preverify_ok, X509_STORE_CTX *x509_ctx)
+ * the current certificate in order to verify it's integrity */
+ memset((char *)&obj, 0, sizeof obj);
+ X509_STORE_CTX_init(&store_ctx, opts->crl_store, NULL, NULL);
+- rc = X509_STORE_get_by_subject(&store_ctx, X509_LU_CRL, subject, &obj);
++ rc = X509_STORE_CTX_get_by_subject(&store_ctx, X509_LU_CRL, subject, &obj);
+ X509_STORE_CTX_cleanup(&store_ctx);
+ crl = obj.data.crl;
+ if (rc > 0 && crl) {
+@@ -207,7 +211,7 @@ tlsauth_verify_callback(int preverify_ok, X509_STORE_CTX *x509_ctx)
+ * the current certificate in order to check for revocation */
+ memset((char *)&obj, 0, sizeof obj);
+ X509_STORE_CTX_init(&store_ctx, opts->crl_store, NULL, NULL);
+- rc = X509_STORE_get_by_subject(&store_ctx, X509_LU_CRL, issuer, &obj);
++ rc = X509_STORE_CTX_get_by_subject(&store_ctx, X509_LU_CRL, issuer, &obj);
+ X509_STORE_CTX_cleanup(&store_ctx);
+ crl = obj.data.crl;
+ if (rc > 0 && crl) {
+--- a/src/session_server_tls.c
++++ b/src/session_server_tls.c
+@@ -28,6 +28,10 @@
+ #include "session_server_ch.h"
+ #include "libnetconf.h"
+
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#define X509_STORE_CTX_get_by_subject X509_STORE_get_by_subject
++#endif
++
+ struct nc_server_tls_opts tls_ch_opts;
+ pthread_mutex_t tls_ch_opts_lock = PTHREAD_MUTEX_INITIALIZER;
+ extern struct nc_server_opts server_opts;
+@@ -563,7 +567,7 @@ nc_tlsclb_verify(int preverify_ok, X509_STORE_CTX *x509_ctx)
+ store_ctx = X509_STORE_CTX_new();
+ obj = X509_OBJECT_new();
+ X509_STORE_CTX_init(store_ctx, opts->crl_store, NULL, NULL);
+- rc = X509_STORE_get_by_subject(store_ctx, X509_LU_CRL, subject, obj);
++ rc = X509_STORE_CTX_get_by_subject(store_ctx, X509_LU_CRL, subject, obj);
+ X509_STORE_CTX_free(store_ctx);
+ crl = X509_OBJECT_get0_X509_CRL(obj);
+ if (rc > 0 && crl) {
+@@ -616,7 +620,7 @@ nc_tlsclb_verify(int preverify_ok, X509_STORE_CTX *x509_ctx)
+ store_ctx = X509_STORE_CTX_new();
+ obj = X509_OBJECT_new();
+ X509_STORE_CTX_init(store_ctx, opts->crl_store, NULL, NULL);
+- rc = X509_STORE_get_by_subject(store_ctx, X509_LU_CRL, issuer, obj);
++ rc = X509_STORE_CTX_get_by_subject(store_ctx, X509_LU_CRL, issuer, obj);
+ X509_STORE_CTX_free(store_ctx);
+ crl = X509_OBJECT_get0_X509_CRL(obj);
+ if (rc > 0 && crl) {
+@@ -776,7 +780,7 @@ nc_tlsclb_verify(int preverify_ok, X509_STORE_CTX *x509_ctx)
+ * the current certificate in order to verify it's integrity */
+ memset((char *)&obj, 0, sizeof(obj));
+ X509_STORE_CTX_init(&store_ctx, opts->crl_store, NULL, NULL);
+- rc = X509_STORE_get_by_subject(&store_ctx, X509_LU_CRL, subject, &obj);
++ rc = X509_STORE_CTX_get_by_subject(&store_ctx, X509_LU_CRL, subject, &obj);
+ X509_STORE_CTX_cleanup(&store_ctx);
+ crl = obj.data.crl;
+ if (rc > 0 && crl) {
+@@ -828,7 +832,7 @@ nc_tlsclb_verify(int preverify_ok, X509_STORE_CTX *x509_ctx)
+ * the current certificate in order to check for revocation */
+ memset((char *)&obj, 0, sizeof(obj));
+ X509_STORE_CTX_init(&store_ctx, opts->crl_store, NULL, NULL);
+- rc = X509_STORE_get_by_subject(&store_ctx, X509_LU_CRL, issuer, &obj);
++ rc = X509_STORE_CTX_get_by_subject(&store_ctx, X509_LU_CRL, issuer, &obj);
+ X509_STORE_CTX_cleanup(&store_ctx);
+ crl = obj.data.crl;
+ if (rc > 0 && crl) {
include $(TOPDIR)/rules.mk
PKG_NAME:=libp11
-PKG_VERSION:=0.4.9
+PKG_VERSION:=0.4.10
PKG_RELEASE:=1
PKG_SOURCE_URL:=https://github.com/OpenSC/libp11/releases/download/$(PKG_NAME)-$(PKG_VERSION)/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=9d1c76d74c21ca224f96204982097ebc6b956f645b2b0b5f9c502a20e9ffcfd8
+PKG_HASH:=639ea43c3341e267214b712e1e5e12397fd2d350899e673dd1220f3c6b8e3db4
PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
PKG_LICENSE:=LGPL-2.1+
CATEGORY:=Libraries
TITLE:=PKCS#11 wrapper library
URL:=https://www.opensc-project.org/opensc/wiki/libp11
- DEPENDS:=+libopenssl
+ DEPENDS:=+libopenssl +@OPENSSL_ENGINE
CONFLICTS:=engine_pkcs11
endef
--- a/src/Makefile.am
+++ b/src/Makefile.am
-@@ -49,13 +49,6 @@ pkcs11_la_LIBADD = $(libp11_la_OBJECTS) $(OPENSSL_LIBS)
+@@ -49,13 +49,6 @@ pkcs11_la_LIBADD = $(libp11_la_OBJECTS)
pkcs11_la_LDFLAGS = $(AM_LDFLAGS) -module -shared -shrext $(SHARED_EXT) \
-avoid-version -export-symbols "$(srcdir)/pkcs11.exports"
mylibdir=$(libdir)
--- a/src/Makefile.in
+++ b/src/Makefile.in
-@@ -872,7 +872,7 @@ distdir: $(DISTFILES)
+@@ -899,7 +899,7 @@ distdir-am: $(DISTFILES)
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) config.h
installdirs:
-@@ -944,7 +944,7 @@ install-dvi-am:
+@@ -988,7 +988,7 @@ install-dvi-am:
install-exec-am: install-enginesexecLTLIBRARIES install-libLTLIBRARIES
@$(NORMAL_INSTALL)
install-html: install-html-am
install-html-am:
-@@ -989,7 +989,7 @@ uninstall-am: uninstall-enginesexecLTLIBRARIES \
-
+@@ -1051,14 +1051,14 @@ uninstall-am: uninstall-enginesexecLTLIB
.MAKE: all check-am install-am install-exec-am install-strip
--.PHONY: CTAGS GTAGS TAGS all all-am check check-am check-local clean \
-+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \
- clean-enginesexecLTLIBRARIES clean-generic \
+ .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am \
+- check-local clean clean-enginesexecLTLIBRARIES clean-generic \
++ clean clean-enginesexecLTLIBRARIES clean-generic \
clean-libLTLIBRARIES clean-libtool cscopelist-am ctags \
ctags-am distclean distclean-compile distclean-generic \
-@@ -997,7 +997,7 @@ uninstall-am: uninstall-enginesexecLTLIBRARIES \
+ distclean-hdr distclean-libtool distclean-tags distdir dvi \
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-dvi install-dvi-am \
install-enginesexecLTLIBRARIES install-exec install-exec-am \
--- /dev/null
+# Copyright (C) 2019 Lucian Cristian <lucian.cristian@gmail.com>
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libpciaccess
+PKG_VERSION:=0.14
+PKG_RELEASE:=1
+
+PKG_SOURCE_URL:=https://www.x.org/releases/individual/lib/
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_HASH:=3df543e12afd41fea8eac817e48cbfde5aed8817b81670a4e9e493bb2f5bf2a4
+
+PKG_BUILD_PARALLEL:=1
+PKG_INSTALL:=1
+
+PKG_MAINTAINER:= Lucian Cristian <lucian.cristian@gmail.com>
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libpciaccess
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=Generic PCI access library
+ URL:=https://xorg.freedesktop.org/
+endef
+
+TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
+
+CONFIGURE_ARGS += \
+ --prefix=/usr
+
+define Build/InstallDev
+ $(INSTALL_DIR) \
+ $(1)/usr/include \
+ $(1)/usr/lib
+
+ $(CP) \
+ $(PKG_INSTALL_DIR)/usr/include/* \
+ $(1)/usr/include/
+
+ $(CP) \
+ $(PKG_INSTALL_DIR)/usr/lib/{pkgconfig,*.so*} \
+ $(1)/usr/lib/
+endef
+
+define Package/libpciaccess/install
+ $(INSTALL_DIR) \
+ $(1)/usr/lib
+
+ $(CP) \
+ $(PKG_INSTALL_DIR)/usr/lib/*.so* \
+ $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,libpciaccess))
--- /dev/null
+From b6df5202306bd71158b482f25ca2e6919645d4dd Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 4 Jun 2015 20:55:06 -0700
+Subject: [PATCH 4/4] Don't include sys/io.h on arm
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ src/linux_sysfs.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/linux_sysfs.c b/src/linux_sysfs.c
+index 3f95e53..1e3aad3 100644
+--- a/src/linux_sysfs.c
++++ b/src/linux_sysfs.c
+@@ -50,7 +50,7 @@
+ #include <dirent.h>
+ #include <errno.h>
+
+-#if defined(__i386__) || defined(__x86_64__) || defined(__arm__)
++#if defined(__i386__) || defined(__x86_64__)
+ #include <sys/io.h>
+ #else
+ #define inb(x) -1
+--
+2.1.4
+
include $(TOPDIR)/rules.mk
PKG_NAME:=libpng
-PKG_VERSION:=1.6.36
+PKG_VERSION:=1.6.37
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@SF/libpng
-PKG_HASH:=eceb924c1fa6b79172fdfd008d335f0e59172a86a66481e09d4089df872aa319
+PKG_HASH:=505e70834d35383537b6491e7ae8641f1a4bed1876dbfe361201fc80868d88ca
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
PKG_LICENSE:=Libpng GPL-2.0+ BSD-3-Clause
include $(TOPDIR)/rules.mk
PKG_NAME:=libpsl
-PKG_VERSION:=0.20.2
-PKG_RELEASE:=3
+PKG_VERSION:=0.21.0
+PKG_RELEASE:=1
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/rockdaboot/libpsl/releases/download/$(PKG_NAME)-$(PKG_VERSION)/
-PKG_HASH:=f8fd0aeb66252dfcc638f14d9be1e2362fdaf2ca86bde0444ff4d5cc961b560f
+PKG_HASH:=41bd1c75a375b85c337b59783f5deb93dbb443fb0a52d257f403df7bd653ee12
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
--- /dev/null
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=re2
+PKG_VERSION:=2019-06-01
+PKG_RELEASE:=2
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/google/re2/tar.gz/$(PKG_VERSION)?
+PKG_HASH:=02b7d73126bd18e9fbfe5d6375a8bb13fadaf8e99e48cbb062e4500fc18e8e2e
+
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=LICENSE
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+PKG_BUILD_PARALLEL:=1
+HOST_BUILD_PARALLEL:=1
+CMAKE_OPTIONS:= \
+ -DBUILD_SHARED_LIBS=$(if $(CONFIG_RE2_SHARED),ON,OFF)
+CMAKE_INSTALL:=1
+
+define Package/re2
+ SECTION:=libs
+ CATEGORY:=Libraries
+ DEPENDS:=+libstdcpp
+ TITLE:=RE2 is a fast, safe, thread-friendly alternative to backtracking regular expression engines like those used in PCRE, Perl, and Python. It is a C++ library.
+ URL:=https://github.com/google/re2
+ MAINTAINER:=Amol Bhave <ambhave@fb.com>
+endef
+
+define Package/re2/config
+ choice
+ prompt "Compile RE2 library."
+ default RE2_SHARED
+ help
+ Choose which version to compile.
+ -> Shared:
+ - Only Shared lib will be compiled.
+ -> Static:
+ - Only Static lib will be compiled.
+
+ config RE2_SHARED
+ bool "Shared"
+
+ config RE2_STATIC
+ bool "Static"
+ endchoice
+endef
+
+define Package/re2/description
+ RE2 is a fast, safe, thread-friendly alternative to backtracking regular
+ expression engines like those used in PCRE, Perl, and Python.
+ It is a C++ library.
+endef
+
+define Package/re2/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libre2.so* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,re2))
+$(eval $(call HostBuild))
--- /dev/null
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=librsocket-cpp
+PKG_SOURCE_DATE:=2019-06-11
+PKG_SOURCE_VERSION:=741f817fd519e0610cddb5783aae812355e19435
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_DATE).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/rsocket/rsocket-cpp/tar.gz/$(PKG_SOURCE_VERSION)?
+PKG_HASH:=56886deba0f3594b4a430b1f515c90a138800b8e387440e6b8bf728d660f457a
+PKG_BUILD_DIR:=$(BUILD_DIR)/rsocket-cpp-$(PKG_SOURCE_VERSION)
+
+PKG_MAINTAINER:=Amol Bhave <ambhave@fb.com>
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_BUILD_PARALLEL:=1
+CMAKE_BINARY_SUBDIR:=builddir
+CMAKE_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+define Package/librsocket-cpp
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=C++ implementation of RSocket
+ DEPENDS:=+libyarpl
+endef
+
+define Package/libyarpl
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=yarpl: Yet Another Reactive Programming Library
+ DEPENDS:=+libfolly
+endef
+
+define Package/librsocket-cpp/description
+ C++ implementation of RSocket, and Application protocol providing Reactive Streams semantics
+endef
+
+define Package/libyarpl/description
+ C++ implementation of reactive functional programming including both Observable and Flowable types.
+endef
+
+CMAKE_OPTIONS += \
+ -DBUILD_BENCHMARKS=OFF \
+ -DBUILD_EXAMPLES=OFF \
+ -DBUILD_TESTS=OFF \
+ -DBUILD_SHARED_LIBS=ON
+
+define Package/librsocket-cpp/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libReactiveSocket.so* $(1)/usr/lib/
+endef
+
+define Package/libyarpl/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libyarpl*.so* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,librsocket-cpp))
+$(eval $(call BuildPackage,libyarpl))
--- /dev/null
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -67,7 +67,6 @@
+ if (RSOCKET_ASAN)
+ set(ASAN_FLAGS -fsanitize=address,undefined)
+ endif ()
+- set(EXTRA_LINK_FLAGS ${EXTRA_LINK_FLAGS} -fuse-ld=gold)
+
+ elseif (${CMAKE_CXX_COMPILER_ID} MATCHES Clang)
+ if (RSOCKET_ASAN)
--- /dev/null
+--- a/yarpl/Refcounted.h
++++ b/yarpl/Refcounted.h
+@@ -42,7 +42,7 @@ std::shared_ptr<T> atomic_exchange(
+ auto refptr = ar->ref.lock();
+ auto old = std::move(*refptr);
+ *refptr = std::move(r);
+- return std::move(old);
++ return old;
+ }
+
+ template <typename T>
PKG_NAME:=libsearpc
PKG_VERSION:=3.1.0
-PKG_RELEASE=1
+PKG_RELEASE=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/haiwen/libsearpc/tar.gz/v$(PKG_VERSION)?
PKG_HASH:=cbd86d3c37b54ca2060ca537a07940fe3e98498abf345b2f3e1cec488230231a
+PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
PKG_LICENSE:=GPL-3.0
PKG_LICENSE_FILES:=LICENSE.txt
SECTION:=libs
CATEGORY:=Libraries
TITLE:=Seafile RPC Library
- MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
URL:=https://seafile.com
DEPENDS:=+glib2 +jansson +python $(ICONV_DEPENDS)
endef
include $(TOPDIR)/rules.mk
PKG_NAME:=libseccomp
-PKG_VERSION:=2.3.3
+PKG_VERSION:=2.4.1
PKG_RELEASE:=1
PKG_USE_MIPS16:=0
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/seccomp/libseccomp/releases/download/v$(PKG_VERSION)/
-PKG_HASH:=7fc28f4294cc72e61c529bedf97e705c3acf9c479a8f1a3028d4cd2ca9f3b155
+PKG_HASH:=1ca3735249af66a1b2f762fe6e710fcc294ad7185f1cc961e5bd83f9988006e8
PKG_MAINTAINER:=Nikos Mavrogiannopoulos <nmav@gnutls.org>
PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
+# This is done instead of DEPENDS:=@!arc to avoid a recursive dependency when
+# the library is conditionally selected by util/lxc.
+define Package/libseccomp/config
+ depends on !arc
+endef
define Package/libseccomp/Default
SUBMENU:=
define Package/libseccomp
$(call Package/libseccomp/Default)
TITLE+= (library)
- DEPENDS+=
+endef
+
+define Package/scmp_sys_resolver
+$(call Package/libseccomp/Default)
+ TITLE+= scmp_sys_resolver
+ DEPENDS+= libseccomp
endef
define Package/libseccomp/description
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libseccomp.so.* $(1)/usr/lib/
endef
+define Package/scmp_sys_resolver/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/scmp_sys_resolver $(1)/usr/bin/
+endef
+
$(eval $(call BuildPackage,libseccomp))
+$(eval $(call BuildPackage,scmp_sys_resolver))
include $(TOPDIR)/rules.mk
PKG_NAME:=libshout
-PKG_VERSION:=2.4.1
-PKG_RELEASE:=3
+PKG_VERSION:=2.4.3
+PKG_RELEASE:=1
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://downloads.us.xiph.org/releases/libshout/
-PKG_HASH:=f3acb8dec26f2dbf6df778888e0e429a4ce9378a9d461b02a7ccbf2991bbf24d
+PKG_SOURCE_URL:=https://downloads.us.xiph.org/releases/libshout/
+PKG_HASH:=0d8af55d1141bf90710bcd41a768c9cc5adb251502a0af1dd22c8da215d40dfe
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
-PKG_LICENSE:=LGPL-2.0+
+PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
+PKG_LICENSE:=LGPL-2.0-or-later
PKG_LICENSE_FILES:=COPYING
-PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org>, \
- Ted Hess <thess@kitschensync.net>
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
CONFIGURE_ARGS += \
--enable-shared \
--enable-static \
- --disable-speex
+ --disable-speex \
+ --without-pic
ifeq ($(BUILD_VARIANT),notheora)
CONFIGURE_ARGS += --disable-theora
endif
ifeq ($(BUILD_VARIANT),nossl)
- CONFIGURE_ARGS += --disable-theora --with-openssl="no"
+ CONFIGURE_ARGS += --disable-theora --without-openssl
endif
CONFIGURE_VARS += \
VORBIS_CFLAGS="-I$(STAGING_DIR)/usr/include/tremor/" \
VORBIS_LIBS="$(TARGET_LDFLAGS) -lvorbisidec" \
-TARGET_CFLAGS += $(FPIC) -Wl,-rpath-link="$(STAGING_DIR)/usr/lib"
+TARGET_CFLAGS += $(FPIC)
PACKAGE_CONFIG_FILE=shout$(if $(findstring $(BUILD_VARIANT),full),-full).pc
--- a/src/codec_vorbis.c
+++ b/src/codec_vorbis.c
-@@ -28,7 +28,7 @@
+@@ -29,7 +29,7 @@
#endif
#include <stdlib.h>
+++ /dev/null
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -3,14 +3,14 @@
- AUTOMAKE_OPTIONS = 1.6 foreign
- ACLOCAL_AMFLAGS = -I m4
-
--SUBDIRS = include src examples doc win32
-+SUBDIRS = include src
-
- EXTRA_DIST = INSTALL m4/shout.m4 m4/acx_pthread.m4 \
- m4/ogg.m4 m4/vorbis.m4 m4/xiph_compiler.m4 m4/xiph_net.m4 \
- m4/xiph_types.m4 libshout.ckport
-
- docdir = $(datadir)/doc/$(PACKAGE)
--doc_DATA = COPYING NEWS README examples/example.c examples/nonblocking.c
-+doc_DATA = COPYING README
-
- m4datadir = $(datadir)/aclocal
- m4data_DATA = m4/shout.m4
+++ /dev/null
-diff --git a/src/tls.c b/src/tls.c
-index 4562c73..f946946 100644
---- a/src/tls.c
-+++ b/src/tls.c
-@@ -63,12 +63,16 @@ static inline int tls_setup(shout_tls_t *tls)
- {
- SSL_METHOD *meth;
-
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
- SSL_library_init();
- SSL_load_error_strings();
- SSLeay_add_all_algorithms();
- SSLeay_add_ssl_algorithms();
-
- meth = TLSv1_client_method();
-+#else
-+ meth = TLS_client_method();
-+#endif
- if (!meth)
- goto error;
-
--- /dev/null
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libsigar
+PKG_SOURCE_DATE:=2017-02-21
+PKG_SOURCE_VERSION:=a6c61edf8c64e013411e8c9d753165cd03102c6e
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_DATE).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/boundary/sigar/tar.gz/$(PKG_SOURCE_VERSION)?
+PKG_HASH:=5232f0fa994ab60ad4622364fad0297c0054e04f0cfec9c586b14e33bbc387da
+PKG_BUILD_DIR:=$(BUILD_DIR)/sigar-$(PKG_SOURCE_VERSION)
+
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILE:=LICENSE
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+PKG_BUILD_PARALLEL:=1
+CMAKE_INSTALL:=1
+
+define Package/libsigar
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=System Information Gatherer And Reporter
+ URL:=https://github.com/boundary/sigar
+ DEPENDS:=+libtirpc
+ MAINTAINER:=Amol Bhave <ambhave@fb.com>
+endef
+
+define Package/libsigar/description
+ System Information Gatherer And Reporter
+endef
+
+define Package/libsigar/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsigar.so* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,libsigar))
SECTION:=libs
CATEGORY:=Libraries
TITLE:=typesafe callback system for standard C++
- URL:=http://libsigc.sourceforge.net/
+ URL:=https://libsigcplusplus.github.io/libsigcplusplus/
DEPENDS:=+libstdcpp
endef
#
-# Copyright (C) 2007-2018 OpenWrt.org
+# Copyright (C) 2007-2019 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/erikd/libsndfile.git
-PKG_SOURCE_DATE:=2019-01-10
-PKG_SOURCE_VERSION:=58c64581407f5547a84292a10933e16c03e4956d
-PKG_MIRROR_HASH:=e78509db376c6194bb9e356bd792658124b7970789ce22afa4fbf4545f61a3a9
+PKG_SOURCE_DATE:=2019-04-21
+PKG_SOURCE_VERSION:=25824cb914fb3b79e18f31fb861e218c84be7d34
+PKG_MIRROR_HASH:=9b3beef70003456ff297ce50ecd5cb1d066ca98f10f6363562431d773b3fcb3d
PKG_LICENSE:=LGPLv2.1
PKG_LICENSE_FILES:=COPYING
include $(TOPDIR)/rules.mk
PKG_NAME:=libsodium
-PKG_VERSION:=1.0.17
+PKG_VERSION:=1.0.18
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://download.libsodium.org/libsodium/releases \
https://github.com/jedisct1/libsodium/releases/download/$(PKG_VERSION)
-PKG_HASH:=0cc3dae33e642cc187b5ceb467e0ad0e1b51dcba577de1190e9ffa17766ac2b1
-
-PKG_FIXUP:=libtool autoreconf
-PKG_USE_MIPS16:=0
-PKG_INSTALL:=1
+PKG_HASH:=6f504490b342a4f8a4c4a02fc9b866cbef8622d5df4e5452b46be121e46636c1
PKG_MAINTAINER:=Damiano Renfer <damiano.renfer@gmail.com>
PKG_LICENSE:=ISC
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_USE_MIPS16:=0
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
CATEGORY:=Libraries
TITLE:=P(ortable|ackageable) NaCl-based crypto library
URL:=https://github.com/jedisct1/libsodium
- MAINTAINER:=Damiano Renfer <damiano.renfer@gmail.com>
endef
define Package/libsodium/description
CONFIGURE_ARGS+= \
--disable-ssp \
- $(if $(CONFIG_LIBSODIUM_MINIMAL),--enable-minimal=yes,--enable-minimal=no)
+ $(if $(CONFIG_LIBSODIUM_MINIMAL),--enable,--disable)-minimal
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/sodium
PKG_NAME:=libsoup
PKG_VERSION:=2.65.1
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@GNOME/$(PKG_NAME)/2.65
endef
CONFIGURE_ARGS += \
+ --disable-debug \
--disable-glibtest \
--disable-gtk-doc-html \
+ --disable-introspection \
--disable-more-warnings \
--disable-vala \
--without-apache-httpd \
--without-gnome \
- --without-gssapi
+ --without-gssapi \
+ --without-ntlm-auth
define package/libsoup/decription
Libsoup is an HTTP library implementation in C
PKG_NAME:=libssh
PKG_VERSION:=0.7.6
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://www.libssh.org/files/0.7/
--- /dev/null
+--- a/src/dh.c
++++ b/src/dh.c
+@@ -131,11 +131,15 @@ int ssh_get_random(void *where, int len, int strong){
+
+ return 1;
+ #elif defined HAVE_LIBCRYPTO
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ if (strong) {
+ return RAND_bytes(where,len);
+ } else {
+ return RAND_pseudo_bytes(where,len);
+ }
++#else
++ return RAND_bytes(where,len);
++#endif
+ #endif
+
+ /* never reached */
+@@ -198,7 +202,9 @@ int ssh_crypto_init(void) {
+ }
+ bignum_bin2bn(p_group14_value, P_GROUP14_LEN, p_group14);
+
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ OpenSSL_add_all_algorithms();
++#endif
+
+ #endif
+
+@@ -219,8 +225,10 @@ void ssh_crypto_finalize(void) {
+ #ifdef HAVE_LIBGCRYPT
+ gcry_control(GCRYCTL_TERM_SECMEM);
+ #elif defined HAVE_LIBCRYPTO
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ EVP_cleanup();
+ CRYPTO_cleanup_all_ex_data();
++#endif
+ #endif
+ ssh_crypto_initialized=0;
+ }
--- /dev/null
+--- a/src/threads.c
++++ b/src/threads.c
+@@ -106,6 +106,8 @@ static int libgcrypt_thread_init(void){
+
+ static void **libcrypto_mutexes;
+
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
++
+ static void libcrypto_lock_callback(int mode, int i, const char *file, int line){
+ (void)file;
+ (void)line;
+@@ -160,6 +162,16 @@ static void libcrypto_thread_finalize(void){
+
+ }
+
++#else
++
++static int libcrypto_thread_init(void){
++ return SSH_OK;
++}
++
++static void libcrypto_thread_finalize(void){
++}
++#endif
++
+ #endif
+
+ /** @internal
include $(TOPDIR)/rules.mk
PKG_NAME:=libssh2
-PKG_VERSION:=1.8.0
-PKG_RELEASE:=3
+PKG_VERSION:=1.8.2
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://www.libssh2.org/download
-PKG_HASH:=39f34e2f6835f4b992cafe8625073a88e5a28ba78f83e8099610a7b3af4676d4
+PKG_HASH:=088307d9f6b6c4b8c13f34602e8ff65d21c2dc4d55284dfe15d502c4ee190d67
PKG_FIXUP:=autoreconf
PKG_LICENSE:=BSD
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:libssh2:libssh2
PKG_CONFIG_DEPENDS:= \
CONFIG_LIBSSH2_MBEDTLS \
PKG_NAME:=libstrophe
PKG_VERSION:=0.9.2
-PKG_RELEASE=1
+PKG_RELEASE=2
PKG_LICENSE:=GPL-3.0
PKG_LICENSE_FILES:=COPYING
$(CP) $(PKG_INSTALL_DIR)/usr/include/ $(1)/usr/
$(INSTALL_DIR) $(1)/usr/lib/
+ $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libstrophe.{la,a,so*} $(1)/usr/lib/
+ $(CP) \
+ $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libstrophe.pc \
+ $(1)/usr/lib/pkgconfig/
endef
define Package/libstrophe/install
PKG_NAME:=libtasn1
PKG_VERSION:=4.13
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@GNU/$(PKG_NAME)
PKG_HASH:=7e528e8c317ddd156230c4e31d082cd13e7ddeb7a54824be82632209550c8cca
+
+PKG_MAINTAINER:=Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
PKG_LICENSE:=LGPLv2.1+
PKG_LICENSE_FILES:=COPYING.LIB
SECTION:=libs
CATEGORY:=Libraries
TITLE:=An ASN.1 and DER structures manipulation library
- MAINTAINER:=Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
URL:=https://www.gnu.org/software/libtasn1/
endef
Distinguish Encoding Rules (DER) manipulation.
endef
-TARGET_CFLAGS += $(FPIC)
+TARGET_LDFLAGS += -Wl,--gc-sections
CONFIGURE_ARGS += \
- --enable-shared \
- --disable-gcc-warnings \
- --enable-static
+ --disable-doc \
+ --disable-gcc-warnings \
+ --disable-ld-version-script \
+ --disable-valgrind-tests
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/bin
PKG_NAME:=libtins
PKG_VERSION:=4.0
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_MAINTAINER:= Steven Hessing <steven.hessing@gmail.com>
endef
define Package/libtins/install
- $(INSTALL_DIR) $(1)/usr/lib
- $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libtins.so.* $(1)/usr/lib/
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtins.so.* $(1)/usr/lib/
endef
$(eval $(call BuildPackage,libtins))
PKG_NAME:=libtorrent
PKG_VERSION:=0.13.7
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/rakshasa/libtorrent/tar.gz/v$(PKG_VERSION)?
PKG_HASH:=86b4b1753385aaddf9e59ad94f1292eee5102139eb57520e84d1af2f04693708
+PKG_MAINTAINER:=Rosen Penev <rosenp@gmail.com>
+PKG_LICENSE:=GPL-2.0-or-later
+PKG_LICENSE_FILES:=COPYING
+
PKG_FIXUP:=autoreconf
-PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
TITLE:=Rakshasa's BitTorrent library
URL:=https://rakshasa.github.io/rtorrent/
DEPENDS:=+libopenssl +libsigcxx +zlib
- MAINTAINER:=Rosen Penev <rosenp@gmail.com>
endef
define Package/libtorrent/description
official client.
endef
-TARGET_LDFLAGS += $(LIBGCC_S)
-
-CONFIGURE_ARGS+= \
+CONFIGURE_ARGS += \
--enable-shared \
--enable-static \
--enable-aligned \
- --disable-debug \
--enable-openssl \
+ --disable-debug \
--disable-instrumentation \
+ --with-epoll \
--with-zlib=$(STAGING_DIR)/usr \
- --disable-ipv6
+ --without-kqueue \
+ $(DISABLE_IPV6)
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
include $(TOPDIR)/rules.mk
PKG_NAME:=libuhttpd
-PKG_VERSION:=2.2.1
+PKG_VERSION:=2.2.2
PKG_RELEASE:=2
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=v$(PKG_VERSION)
PKG_SOURCE_URL=https://github.com/zhaojh329/libuhttpd.git
-PKG_MIRROR_HASH:=e6b3d540a0d32a77739ab6b028ded46fbf4997d241fabb578ef1f212581eea33
+PKG_MIRROR_HASH:=98f217238160489468fafe8c643b7f96f168c80000ee07d3ca808d54f4c6a608
CMAKE_INSTALL:=1
PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_SOURCE_SUBDIR)
define Package/libuhttpd/default/install
$(INSTALL_DIR) $(1)/usr/lib/ $(1)/usr/lib/lua/
- $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libuhttpd.so* $(1)/usr/lib/
- $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/lua/uhttpd.so* $(1)/usr/lib/lua/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libuhttpd.so* $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/lua/uhttpd.so* $(1)/usr/lib/lua/
endef
Package/libuhttpd-nossl/install = $(Package/libuhttpd/default/install)
include $(TOPDIR)/rules.mk
PKG_NAME:=libupm
-PKG_VERSION:=1.7.1
+PKG_VERSION:=2.0.0
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/intel-iot-devkit/upm/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=b253742b01146f4b86e20714aa24e75ca1e9d46629eab9aa8db070ce94cf3619
+PKG_HASH:=7dd2f4165b71e071d100b58d6a392f3cf57b0f257c82ffabf49e931b5ed6bc23
PKG_BUILD_DIR:=$(BUILD_DIR)/upm-$(PKG_VERSION)
PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>, Hirokazu MORIKAWA <morikw2@gmail.com>
PKG_LICENSE_FILES:=LICENSE
CMAKE_INSTALL:=1
+CMAKE_BINARY_SUBDIR:=build
PKG_USE_MIPS16:=0
+PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
adxrs610 am2315 apa102 apds9002 apds9930 at42qt1070 bh1749 bh1750 bh1792 biss0001 bma220 \
bma250e bmg160 bmi160 bmm150 bmp280 bmpx8x bmx055 bno055 button buzzer cjq4435 collision \
cwlsxxa dfrec dfrorp dfrph ds1307 ds1808lc ds18b20 ds2413 ecezo ecs1030 \
- ehr eldriver electromagnet emg enc03r flex gas gp2y0a gprs grove grovecollision groveehr \
- groveeldriver groveelectromagnet groveemg grovegprs grovegsr grovelinefinder grovemd \
- grovemoisture groveo2 grovescam grovespeaker groveultrasonic grovevdiv grovewater grovewfs \
+ ehr eldriver electromagnet emg enc03r flex gas gp2y0a gprs \
gsr guvas12d h3lis331dl hcsr04 hdc1000 hdxxvxta hka5 hlg150h hm11 hmc5883l hmtrp hp20x \
ht9170 htu21d hx711 ili9341 ims ina132 interfaces isd1820 itg3200 jhd1313m1 joystick12 kx122 \
kxcjk1013 kxtj3 l298 l3gd20 lcd lcdks lcm1602 ldt0028 led lidarlitev3 light linefinder lis2ds12 \
veml6070 water waterlevel wfs wheelencoder wt5001 xbee yg1006 zfm20 \
vcap t3311 hwxpxx h803x ozw curieimu
# (require libbacnet) tb7300 t8100 e50hx bacnetmstp
+# (require libtinyb) 2jciebu01_ble 2jciebu01_usb
define Package/libupm/Default
SECTION:=libs
define Package/libupm/install/Default-python
$(INSTALL_DIR) $(1)/usr/lib/python$(PYTHON_VERSION)/site-packages/upm
- $(CP) $(PKG_BUILD_DIR)/src/$(2)/python$(PYTHON_VERSION)/pyupm_$(2).py \
+ $(CP) $(CMAKE_BINARY_DIR)/$(if $(filter interfaces, $(2)),,src/)$(2)/python$(PYTHON_VERSION)/pyupm_$(2).py \
$(1)/usr/lib/python$(PYTHON_VERSION)/site-packages/upm/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON_VERSION)/site-packages/upm/_pyupm_$(2).so \
$(1)/usr/lib/python$(PYTHON_VERSION)/site-packages/upm/ ;
define Package/libupm/install/Default-python3
$(INSTALL_DIR) $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/upm
- $(CP) $(PKG_BUILD_DIR)/src/$(2)/python$(PYTHON3_VERSION)/pyupm_$(2).py \
+ $(CP) $(CMAKE_BINARY_DIR)/$(if $(filter interfaces, $(2)),,src/)$(2)/python$(PYTHON3_VERSION)/pyupm_$(2).py \
$(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/upm/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON3_VERSION)/site-packages/upm/_pyupm_$(2).so \
$(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/upm/ ;
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -225,14 +225,7 @@ include(GNUInstallDirs)
+@@ -231,14 +231,7 @@
set (LIB_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}" CACHE PATH "Installation path for libraries")
# Make a version file containing the current version from git.
-# If git_describe fails, use a dirty version
-if (${VERSION} MATCHES -NOTFOUND)
- set (VERSION "v1.7.1")
++ set (VERSION "v2.0.0")
- message (WARNING "Failed to retrieve UPM version with 'git describe' (using "
- "${VERSION}). Check that git is installed and this is a valid git repo.")
-endif ()
-+set (VERSION "v1.7.1")
message (STATUS "UPM Version ${VERSION}")
--- /dev/null
+diff -urN a/src/bma250e/bma250e.cxx b/src/bma250e/bma250e.cxx
+--- a/src/bma250e/bma250e.cxx 2019-05-09 00:06:25.000000000 +0900
++++ b/src/bma250e/bma250e.cxx 2019-05-13 16:43:04.344536227 +0900
+@@ -195,35 +195,35 @@
+ fifoConfig(mode, axes);
+ }
+ if(tok.substr(0, 20) == "setInterruptEnable0:") {
+- u_int8_t bits = (u_int8_t)std::stoul(tok.substr(20), nullptr, 0);
++ uint8_t bits = (uint8_t)std::stoul(tok.substr(20), nullptr, 0);
+ setInterruptEnable0(bits);
+ }
+ if(tok.substr(0, 20) == "setInterruptEnable1:") {
+- u_int8_t bits = (u_int8_t)std::stoul(tok.substr(20), nullptr, 0);
++ uint8_t bits = (uint8_t)std::stoul(tok.substr(20), nullptr, 0);
+ setInterruptEnable1(bits);
+ }
+ if(tok.substr(0, 20) == "setInterruptEnable2:") {
+- u_int8_t bits = (u_int8_t)std::stoul(tok.substr(20), nullptr, 0);
++ uint8_t bits = (uint8_t)std::stoul(tok.substr(20), nullptr, 0);
+ setInterruptEnable2(bits);
+ }
+ if(tok.substr(0, 17) == "setInterruptMap0:") {
+- u_int8_t bits = (u_int8_t)std::stoul(tok.substr(17), nullptr, 0);
++ uint8_t bits = (uint8_t)std::stoul(tok.substr(17), nullptr, 0);
+ setInterruptMap0(bits);
+ }
+ if(tok.substr(0, 17) == "setInterruptMap1:") {
+- u_int8_t bits = (u_int8_t)std::stoul(tok.substr(17), nullptr, 0);
++ uint8_t bits = (uint8_t)std::stoul(tok.substr(17), nullptr, 0);
+ setInterruptMap1(bits);
+ }
+ if(tok.substr(0, 17) == "setInterruptMap2:") {
+- u_int8_t bits = (u_int8_t)std::stoul(tok.substr(17), nullptr, 0);
++ uint8_t bits = (uint8_t)std::stoul(tok.substr(17), nullptr, 0);
+ setInterruptMap2(bits);
+ }
+ if(tok.substr(0, 16) == "setInterruptSrc:") {
+- u_int8_t bits = (u_int8_t)std::stoul(tok.substr(16), nullptr, 0);
++ uint8_t bits = (uint8_t)std::stoul(tok.substr(16), nullptr, 0);
+ setInterruptSrc(bits);
+ }
+ if(tok.substr(0, 26) == "setInterruptOutputControl:") {
+- u_int8_t bits = (u_int8_t)std::stoul(tok.substr(26), nullptr, 0);
++ uint8_t bits = (uint8_t)std::stoul(tok.substr(26), nullptr, 0);
+ setInterruptOutputControl(bits);
+ }
+ if(tok.substr(0, 26) == "setInterruptLatchBehavior:") {
+diff -urN a/src/bmg160/bmg160.cxx b/src/bmg160/bmg160.cxx
+--- a/src/bmg160/bmg160.cxx 2019-05-09 00:06:25.000000000 +0900
++++ b/src/bmg160/bmg160.cxx 2019-05-13 16:44:25.516304666 +0900
+@@ -173,23 +173,23 @@
+ fifoConfig(mode, axes);
+ }
+ if(tok.substr(0, 20) == "setInterruptEnable0:") {
+- u_int8_t bits = (u_int8_t)std::stoul(tok.substr(20), nullptr, 0);
++ uint8_t bits = (uint8_t)std::stoul(tok.substr(20), nullptr, 0);
+ setInterruptEnable0(bits);
+ }
+ if(tok.substr(0, 17) == "setInterruptMap0:") {
+- u_int8_t bits = (u_int8_t)std::stoul(tok.substr(17), nullptr, 0);
++ uint8_t bits = (uint8_t)std::stoul(tok.substr(17), nullptr, 0);
+ setInterruptMap0(bits);
+ }
+ if(tok.substr(0, 17) == "setInterruptMap1:") {
+- u_int8_t bits = (u_int8_t)std::stoul(tok.substr(17), nullptr, 0);
++ uint8_t bits = (uint8_t)std::stoul(tok.substr(17), nullptr, 0);
+ setInterruptMap1(bits);
+ }
+ if(tok.substr(0, 16) == "setInterruptSrc:") {
+- u_int8_t bits = (u_int8_t)std::stoul(tok.substr(16), nullptr, 0);
++ uint8_t bits = (uint8_t)std::stoul(tok.substr(16), nullptr, 0);
+ setInterruptSrc(bits);
+ }
+ if(tok.substr(0, 26) == "setInterruptOutputControl:") {
+- u_int8_t bits = (u_int8_t)std::stoul(tok.substr(26), nullptr, 0);
++ uint8_t bits = (uint8_t)std::stoul(tok.substr(26), nullptr, 0);
+ setInterruptOutputControl(bits);
+ }
+ if(tok.substr(0, 26) == "setInterruptLatchBehavior:") {
+diff -urN a/src/bmm150/bmm150.cxx b/src/bmm150/bmm150.cxx
+--- a/src/bmm150/bmm150.cxx 2019-05-09 00:06:25.000000000 +0900
++++ b/src/bmm150/bmm150.cxx 2019-05-13 16:45:03.228197100 +0900
+@@ -170,19 +170,19 @@
+ setOpmode(opmode);
+ }
+ if(tok.substr(0, 19) == "setInterruptEnable:") {
+- u_int8_t bits = (u_int8_t)std::stoul(tok.substr(19), nullptr, 0);
++ uint8_t bits = (uint8_t)std::stoul(tok.substr(19), nullptr, 0);
+ setInterruptEnable(bits);
+ }
+ if(tok.substr(0, 19) == "setInterruptConfig:") {
+- u_int8_t bits = (u_int8_t)std::stoul(tok.substr(19), nullptr, 0);
++ uint8_t bits = (uint8_t)std::stoul(tok.substr(19), nullptr, 0);
+ setInterruptConfig(bits);
+ }
+ if(tok.substr(0, 17) == "setRepetitionsXY:") {
+- u_int8_t reps = (u_int8_t)std::stoul(tok.substr(17), nullptr, 0);
++ uint8_t reps = (uint8_t)std::stoul(tok.substr(17), nullptr, 0);
+ setRepetitionsXY(reps);
+ }
+ if(tok.substr(0, 16) == "setRepetitionsZ:") {
+- u_int8_t reps = (u_int8_t)std::stoul(tok.substr(16), nullptr, 0);
++ uint8_t reps = (uint8_t)std::stoul(tok.substr(16), nullptr, 0);
+ setRepetitionsZ(reps);
+ }
+ if(tok.substr(0, 14) == "setPresetMode:") {
PKG_NAME:=libupnp
PKG_VERSION:=1.8.4
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=@SF/pupnp
TVcontrolpoint & tvdevice sample applications run inside /etc/upnp-tvdevice/
endef
-TARGET_CFLAGS += -flto
+TARGET_CFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -flto
TARGET_LDFLAGS += -flto
CONFIGURE_VARS += ac_cv_lib_compat_ftime=no
include $(TOPDIR)/rules.mk
PKG_NAME:=liburcu
-PKG_VERSION:=0.9.5
+PKG_VERSION:=0.11.1
PKG_RELEASE:=1
PKG_MAINTAINER:=Daniel Salzman <daniel.salzman@nic.cz>
-PKG_LICENSE:=LGPL-2.1 GPL-2.0 GPL-3.0 MIT
+PKG_LICENSE:=LGPL-2.1-or-later GPL-2.0-or-later MIT
+PKG_LICENSE_FILES:=lgpl-2.1.txt gpl-2.0.txt lgpl-relicensing.txt
PKG_SOURCE:=userspace-rcu-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://lttng.org/files/urcu/
-PKG_HASH:=d948250f1b365f052b29a4c017b7d67066c905f6ab529892cc6bc35c503a38a6
-
+PKG_HASH:=92b9971bf3f1c443edd6c09e7bf5ff3b43531e778841f16377a812c8feeb3350
PKG_BUILD_DIR:=$(BUILD_DIR)/userspace-rcu-$(PKG_VERSION)
+
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
PKG_USE_MIPS16:=0
CATEGORY:=Libraries
TITLE:=User-space Read-Copy-Update library
URL:=https://lttng.org/
- DEPENDS:=+libpthread
+ DEPENDS:=+libpthread @!arc
endef
define Package/liburcu/description
include $(TOPDIR)/rules.mk
PKG_NAME:=libusbmuxd
-PKG_VERSION:=1.1.0
-PKG_RELEASE:=2
+PKG_SOURCE_DATE:=2019-03-23
+PKG_SOURCE_VERSION:=873252dc8b4e469c7dc692064ac616104fca5f65
+PKG_RELEASE:=1
PKG_MAINTAINER:=Lukasz Baj <l.baj@radytek.com>
PKG_LICENSE:=LGPL-2.1+
PKG_LICENSE_FILES:=COPYING.LGPLv2.1
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/libimobiledevice/libusbmuxd.git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=4397b3376dc4e4cb1c991d0aed61ce6482614196
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
-PKG_MIRROR_HASH:=e145b567cdefb1d2536f3eec863769c77474ce9a5d9c4c81ab0a75dc6fe3056a
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_DATE).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/libimobiledevice/libusbmuxd/tar.gz/$(PKG_SOURCE_VERSION)?
+PKG_HASH:=47e39ce87b05ca873c16efaa517247aa9db137625dd910d566fb3cd99b4a1d18
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_SOURCE_VERSION)
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
define Package/libusbmuxd/Default
TITLE:=USB multiplexing daemon
- URL:=http://www.libimobiledevice.org/
+ URL:=https://www.libimobiledevice.org/
endef
define Package/libusbmuxd/Default/description
This package contains the libusbmuxd utilities.
endef
-TARGET_CFLAGS += $(FPIC)
+CONFIGURE_ARGS += --with-pic
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
include $(TOPDIR)/rules.mk
PKG_NAME:=libuv
-PKG_VERSION:=1.24.1
+PKG_VERSION:=1.29.1
PKG_RELEASE:=1
PKG_LICENSE_FILES:=LICENSE
PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://dist.libuv.org/dist/v$(PKG_VERSION)/
-PKG_HASH:=3dd3eeb7b00214b0226da55b38898d3f9481d0cf744d42faf82771e0f19f2b0a
+PKG_HASH:=1486043da5ccaf86d451a5fe93920c5b66770b132d92b6d0a15d636346ca570c
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-v$(PKG_VERSION)
PKG_BUILD_PARALLEL:=1
include $(TOPDIR)/rules.mk
PKG_NAME:=libuwsc
-PKG_VERSION:=3.2.0
+PKG_VERSION:=3.3.2
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL=https://codeload.github.com/zhaojh329/libuwsc/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=24433f952faead4ace902f93895c02ebe0646c3a32487d7e94a0e47674349973
+PKG_SOURCE_URL=https://github.com/zhaojh329/libuwsc/releases/download/v$(PKG_VERSION)
+PKG_HASH:=bae2cd13eda86876ebcf99a38a069f5e8c01717713d2fec25031051b9c47624b
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
PKG_MAINTAINER:=Jianhui Zhao <jianhuizhao329@gmail.com>
-PKG_LICENSE:=LGPL-2.1
+PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE
PKG_BUILD_PARALLEL:=1
CMAKE_INSTALL:=1
+PKG_CONFIG_DEPENDS:= \
+ CONFIG_LIBUWSC_openssl_LUA_BINDING \
+ CONFIG_LIBUWSC_wolfssl_LUA_BINDING \
+ CONFIG_LIBUWSC_mbedtls_LUA_BINDING \
+ CONFIG_LIBUWSC_nossl_LUA_BINDING
+
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
define Package/libuwsc/Default
- TITLE:=A lightweight WebSocket client library based on libev
SECTION:=libs
CATEGORY:=Libraries
SUBMENU:=Networking
+ TITLE:=A lightweight WebSocket client library based on libev
URL:=https://github.com/zhaojh329/libuwsc
DEPENDS:=+libev $(2)
VARIANT:=$(1)
Package/libuwsc-mbedtls=$(call Package/libuwsc/Default,mbedtls,+PACKAGE_libuwsc-mbedtls:libmbedtls)
Package/libuwsc-nossl=$(call Package/libuwsc/Default,nossl)
+define Package/libuwsc/config
+menu "Configuration"
+ depends on PACKAGE_libuwsc-$(1)
+
+config LIBUWSC_$(1)_LUA_BINDING
+ bool
+ default n
+ prompt "Lua binding for libuwsc"
+endmenu
+endef
+
+Package/libuwsc-openssl/config=$(call Package/libuwsc/config,openssl)
+Package/libuwsc-wolfssl/config=$(call Package/libuwsc/config,wolfssl)
+Package/libuwsc-mbedtls/config=$(call Package/libuwsc/config,mbedtls)
+Package/libuwsc-nossl/config=$(call Package/libuwsc/config,nossl)
+
ifeq ($(BUILD_VARIANT),openssl)
CMAKE_OPTIONS += -DUWSC_USE_OPENSSL=ON
else ifeq ($(BUILD_VARIANT),wolfssl)
CMAKE_OPTIONS += -DUWSC_SSL_SUPPORT=OFF
endif
+ifneq ($(CONFIG_LIBUWSC_$(BUILD_VARIANT)_LUA_BINDING),)
+ CMAKE_OPTIONS += -DUWSC_LUA_SUPPORT=ON
+endif
+
define Package/libuwsc-$(BUILD_VARIANT)/install
- $(INSTALL_DIR) $(1)/usr/lib/
+ $(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libuwsc.so* $(1)/usr/lib/
+ifneq ($(CONFIG_LIBUWSC_$(BUILD_VARIANT)_LUA_BINDING),)
+ $(INSTALL_DIR) $(1)/usr/lib/lua
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/lua/uwsc.so $(1)/usr/lib/lua
+endif
endef
$(eval $(call BuildPackage,libuwsc-openssl))
--- /dev/null
+Index: libuwsc-3.3.1/cmake/Modules/FindLua.cmake
+===================================================================
+--- /dev/null
++++ libuwsc-3.3.1/cmake/Modules/FindLua.cmake
+@@ -0,0 +1,18 @@
++# - Try to find lua
++# Once done this will define
++# LUA_FOUND - System has lua
++# LUA_INCLUDE_DIR - The lua include directories
++# LUA_LIBRARY - The libraries needed to use lua
++
++find_path(LUA_INCLUDE_DIR lua.h)
++find_library(LUA_LIBRARY lua)
++
++include(FindPackageHandleStandardArgs)
++# handle the QUIETLY and REQUIRED arguments and set LUA_FOUND to TRUE
++# if all listed variables are TRUE and the requested version matches.
++find_package_handle_standard_args(Lua REQUIRED_VARS
++ LUA_LIBRARY LUA_INCLUDE_DIR
++ VERSION_VAR LUA_VERSION)
++
++mark_as_advanced(LUA_INCLUDE_DIR LUA_LIBRARY)
++
include $(TOPDIR)/rules.mk
PKG_NAME:=v4l-utils
-PKG_VERSION:=1.16.3
+PKG_VERSION:=1.16.5
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://www.linuxtv.org/downloads/v4l-utils
-PKG_HASH:=7c5c0d49c130cf65d384f28e9f3a53c5f7d17bf18740c48c40810e0fbbed5b54
+PKG_HASH:=ed80242510385017a1dc566e17a285a77222bb301f5bc19386badfcc2c19df1b
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
PKG_LICENSE:=GPL-2.0 LGPL-2.1
define Package/libv4l/Default
TITLE:=Video 4 Linux
- URL:=http://www.linuxtv.org/
+ URL:=https://www.linuxtv.org/
endef
define Package/libv4l/Default/description
SECTION:=utils
CATEGORY:=Utilities
TITLE+= utilities
- DEPENDS := +libv4l $(CXX_DEPENDS) $(ICONV_DEPENDS)
+ DEPENDS := +libv4l $(CXX_DEPENDS) $(ICONV_DEPENDS) $(INTL_DEPENDS)
endef
define Package/v4l-utils/description
TARGET_LDFLAGS += -largp -Wl,--gc-sections
CONFIGURE_ARGS+= \
+ --disable-bpf \
--disable-doxygen-doc \
--disable-libdvbv5 \
--disable-qv4l2 \
--- a/configure.ac
+++ b/configure.ac
-@@ -283,16 +283,9 @@ else
+@@ -309,16 +309,9 @@ else
AC_MSG_WARN(ALSA library not available)
fi
--- /dev/null
+POSIX says that behavior when subopts list is empty is undefined.
+musl libs will set value to NULL which leads to crash.
+
+Simply avoid getsubopt, since we cannot rely on it.
+
+diff --git a/utils/v4l2-ctl/v4l2-ctl-common.cpp b/utils/v4l2-ctl/v4l2-ctl-common.cpp
+index 3ea6cd3..291fb3e 100644
+--- a/utils/v4l2-ctl/v4l2-ctl-common.cpp
++++ b/utils/v4l2-ctl/v4l2-ctl-common.cpp
+@@ -692,16 +692,17 @@ static bool parse_subset(char *optarg)
+
+ static bool parse_next_subopt(char **subs, char **value)
+ {
+- static char *const subopts[] = {
+- NULL
+- };
+- int opt = getsubopt(subs, subopts, value);
++ char *p = *subs;
++ *value = *subs;
+
+- if (opt < 0 || *value)
+- return false;
+- fprintf(stderr, "No value given to suboption <%s>\n",
+- subopts[opt]);
+- return true;
++ while (*p && *p != ',')
++ p++;
++
++ if (*p)
++ *p++ = '\0';
++
++ *subs = p;
++ return false;
+ }
+
+ void common_cmd(int ch, char *optarg)
include $(TOPDIR)/rules.mk
PKG_NAME:=libvpx
-PKG_VERSION:=1.7.0
+PKG_VERSION:=1.8.0
PKG_RELEASE:=1
PKG_REV:=v$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_REV).tar.gz
-PKG_MIRROR_HASH:=be50ff18464d614a08726597ecbd72d1f11ec69ec04df2d9acdf646ecd9adcca
+PKG_MIRROR_HASH:=caf53ffff549fefb14d8d054db014c6394e1955d199b80dc985ef6098bd4213d
PKG_SOURCE_URL:=https://chromium.googlesource.com/webm/libvpx
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=$(PKG_REV)
endef
CONFIGURE_ARGS = \
- --target=generic-gnu \
- --prefix=$(CONFIGURE_PREFIX) \
- --libdir=/usr/lib \
- --enable-static \
- --enable-shared \
- --disable-examples \
- --disable-docs \
- --disable-unit-tests \
+ --target=generic-gnu \
+ --prefix=$(CONFIGURE_PREFIX) \
+ --libdir=/usr/lib \
+ --enable-static \
+ --enable-shared \
+ --disable-examples \
+ --disable-docs \
+ --disable-unit-tests \
# Add --enable-small as openwrt gcc flags are overwritten
ifneq ($(findstring -Os,$(TARGET_CFLAGS)),)
# libvpx expects gcc as linker but uses $LD if provided
# However, OpenWRT defines LD as *-uclibc-ld and not *-gcc
-CONFIGURE_VARS += \
- CROSS=$(GNU_TARGET_NAME) \
- LD="$(TARGET_CC)" \
-
-MAKE_FLAGS += \
- LD="$(TARGET_CC)" \
+CONFIGURE_VARS := $(filter-out LD=%,$(CONFIGURE_VARS)) LD="$(TARGET_CC)" \
+ CROSS=$(GNU_TARGET_NAME)
+MAKE_FLAGS := $(filter-out LD=%,$(MAKE_FLAGS)) LD="$(TARGET_CC)"
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/vpx/
--- /dev/null
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libwangle
+PKG_VERSION:=2019.06.10.00
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/facebook/wangle/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=3721c003aa5fce889699b0301705eced7a0ea4ab2e7e12af543dab3493ba8be9
+PKG_BUILD_DIR:=$(BUILD_DIR)/wangle-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Amol Bhave <ambhave@fb.com>
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_BUILD_PARALLEL:=1
+CMAKE_SOURCE_SUBDIR:=wangle
+CMAKE_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+define Package/libwangle
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=Wangle: C++ networking library
+ DEPENDS:=+libfizz
+endef
+
+define Package/libwangle/description
+ Wangle is a framework providing a set of common client/server abstractions for building services in a consistent, modular, and composable way.
+ This package includes the shared library.
+endef
+
+CMAKE_OPTIONS:= \
+ -DBUILD_SHARED_LIBS=ON
+
+define Package/libwangle/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libwangle.so* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,libwangle))
include $(TOPDIR)/rules.mk
PKG_NAME:=x264
-PKG_VERSION:=snapshot-20181006-2245
+PKG_VERSION:=snapshot-20190324-2245
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://download.videolan.org/x264/snapshots/
PKG_MAINTAINER:=Adrian Panella <ianchi74@outlook.com>
-PKG_HASH:=eae60e969958c0759554d5e338dea9b91f1f1fe85d9523c152c2259d8546f469
+PKG_HASH:=68010057edaadffc7593933d13084e8d32e041c42b17c089513d88c917f2ad54
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING
-PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
-TARGET_CFLAGS:=$(filter-out -O%,$(TARGET_CFLAGS)) -std=gnu99 -fPIC -O3 -ffast-math -I.
-MAKE_FLAGS+= LD="$(TARGET_CC) -o"
+TARGET_CFLAGS:=$(filter-out -O%,$(TARGET_CFLAGS))
+MAKE_FLAGS:=$(filter-out LD=%,$(MAKE_FLAGS)) LD="$(TARGET_CC) -o"
-# ARM ASM depends on ARM1156 or later, blacklist earlier or incompatible cores
-# AMD Geode LX and i486 do not have SSE
-CPU_ASM_BLACKLIST:=geode i486 arm920t arm926ej-s arm1136j-s arm1176jzf-s fa526 mpcore xscale \
- 464fp mips32 24kc 34kc 74kc octeon mips64
+# Instead of blacklisting a boatload of platforms just enable
+# optimization where it makes sense (matters) ie ARMv7+ and x86_64
-ifneq ($(CONFIG_SOFT_FLOAT)$(findstring $(call qstrip,$(CONFIG_CPU_TYPE)),$(CPU_ASM_BLACKLIST)),)
- CONFIGURE_VARS+= AS=
- MAKE_FLAGS+= AS=
- CONFIGURE_ARGS += --disable-asm
-else
+ifneq ($(findstring cortex-a,$(CPU_TYPE)),)
CONFIGURE_ARGS += --enable-lto
-ifneq ($(CONFIG_TARGET_x86),)
-ifeq ($(CONFIG_NASM),y)
- CONFIGURE_VARS+= AS=nasm
- MAKE_FLAGS+= AS=nasm
-else
- CONFIGURE_VARS+= AS=
- MAKE_FLAGS+= AS=
- CONFIGURE_ARGS += --disable-asm
-endif
-endif
+ else
+ ifneq ($(CONFIG_TARGET_x86_64),)
+ CONFIGURE_ARGS += --enable-lto
+ ifeq ($(CONFIG_NASM),y)
+ CONFIGURE_VARS+= AS=nasm
+ MAKE_FLAGS+= AS=nasm
+ endif
+ else
+ CONFIGURE_ARGS += --disable-asm
+ endif
endif
CONFIGURE_ARGS += \
+ --disable-cli \
--enable-shared \
+ --disable-opencl \
--enable-pic \
- --enable-strip \
- --disable-cli \
--disable-avs \
--disable-ffms \
+ --disable-gpac \
--disable-lsmash
define Package/libx264
--- /dev/null
+From 66b120079fb21ed38cab0900c63360b0a7853eaa Mon Sep 17 00:00:00 2001
+From: Christopher Larson <chris_larson@mentor.com>
+Date: Tue, 13 Dec 2016 14:22:32 -0700
+Subject: [PATCH] Fix X32 build by disabling asm
+
+This applies gentoo's x32 patch, adjusted slightly, which disables asm support
+for x32 as well as correcting -m.
+
+Debian has a different patch which does the same, and there's a superior yet
+out of date patch series on the x264 list which keeps asm support enabled, but
+doesn't successfully build at this time, and my assembly is very rusty.
+
+Upstream-Status: Pending
+Signed-off-by: Christopher Larson <chris_larson@mentor.com>
+---
+ configure | 14 ++++++++++++--
+ 1 file changed, 12 insertions(+), 2 deletions(-)
+
+--- a/configure
++++ b/configure
+@@ -736,7 +736,13 @@ case $host_cpu in
+ AS_EXT=".asm"
+ ASFLAGS="$ASFLAGS -DARCH_X86_64=1 -I\$(SRCPATH)/common/x86/"
+ stack_alignment=16
+- [ $compiler = GNU ] && CFLAGS="-m64 $CFLAGS" && LDFLAGS="-m64 $LDFLAGS"
++ if [ $compiler = GNU ]; then
++ if cpp_check "" "" "__ILP32__" ; then
++ CFLAGS="-mx32 $CFLAGS" && LDFLAGS="-mx32 $LDFLAGS"
++ else
++ CFLAGS="-m64 $CFLAGS" && LDFLAGS="-m64 $LDFLAGS"
++ fi
++ fi
+ if [ "$SYS" = MACOSX ]; then
+ ASFLAGS="$ASFLAGS -f macho64 -DPREFIX"
+ if cc_check '' "-arch x86_64"; then
+@@ -755,7 +761,11 @@ case $host_cpu in
+ RCFLAGS="--target=pe-x86-64 $RCFLAGS"
+ fi
+ else
+- ASFLAGS="$ASFLAGS -f elf64"
++ if cpp_check "" "" "__ILP32__" ; then
++ asm=no
++ else
++ ASFLAGS="$ASFLAGS -f elf64"
++ fi
+ fi
+ ;;
+ powerpc*)
--- /dev/null
+From a72bf499a0674fc75eedf15008b424e28f67e4bd Mon Sep 17 00:00:00 2001
+From: Andrei Gherzan <andrei@gherzan.ro>
+Date: Fri, 2 Feb 2018 15:10:08 +0200
+Subject: [PATCH] dont default to cortex-a9 with neon
+
+-march flag is not in CFLAGS so this will always default to
+ -mcpu=cortex-a8 -mfpu=neon.
+
+Upstream-Status: Pending
+
+Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+---
+ configure | 3 ---
+ 1 file changed, 3 deletions(-)
+
+--- a/configure
++++ b/configure
+@@ -940,9 +940,6 @@ if [ $asm = auto -a \( $ARCH = X86 -o $A
+ fi
+
+ if [ $asm = auto -a $ARCH = ARM ] ; then
+- # set flags so neon is built by default
+- [ $compiler == CL ] || echo $CFLAGS | grep -Eq '(-mcpu|-march|-mfpu)' || CFLAGS="$CFLAGS -mcpu=cortex-a8 -mfpu=neon"
+-
+ cc_check '' '' '__asm__("add r0, r1, r2");' && define HAVE_ARM_INLINE_ASM
+ if [ $compiler = CL ] && cpp_check '' '' 'defined(_M_ARM) && _M_ARM >= 7' ; then
+ define HAVE_ARMV6
include $(TOPDIR)/rules.mk
PKG_NAME:=xerces-c
-PKG_MAIN_VER:=3.2
PKG_VERSION:=3.2.2
-PKG_RELEASE:=1
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@APACHE/xerces/c/3/sources
PKG_HASH:=6daca3b23364d8d883dc77a73f681242f69389e3564543287ed3d073007e0a8e
-PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
+PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
PKG_LICENSE:=Apache-2.0
PKG_LICENSE_FILES:=LICENSE
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
-include $(INCLUDE_DIR)/uclibc++.mk
include $(INCLUDE_DIR)/nls.mk
include $(INCLUDE_DIR)/package.mk
-CONFIGURE_ARGS += \
- --disable-pretty-make \
- --enable-transcoder-iconv \
- --enable-netaccessor-socket \
- --enable-msgloader-inmemory
-
-TARGET_LDFLAGS += \
- -lm
-
-define Package/libxerces-c
+define Package/libxerces-c/Default
SECTION:=libs
CATEGORY:=Libraries
TITLE:=Validating XML parser library for C++
- URL:=http://xerces.apache.org/
- DEPENDS:=$(CXX_DEPENDS) $(ICONV_DEPENDS) +libc +libpthread
+ URL:=https://xerces.apache.org/
+endef
+
+define Package/libxerces-c
+$(call Package/libxerces-c/Default)
+ DEPENDS:=$(ICONV_DEPENDS) +libstdcpp
endef
define Package/libxerces-c-samples
- SECTION:=libs
- CATEGORY:=Libraries
- TITLE:=Validating XML parser library for C++ (samples)
- URL:=http://xerces.apache.org/
- DEPENDS:=+libxerces-c
+$(call Package/libxerces-c/Default)
+ TITLE+= (samples)
+ DEPENDS+=+libxerces-c
endef
define Package/libxerces-c/description
Validating XML parser library for C++ (samples)
endef
+CONFIGURE_ARGS += \
+ --disable-rpath \
+ --enable-msgloader-inmemory \
+ --enable-netaccessor-socket \
+ --enable-transcoder-iconv \
+ --with-pic
+
+TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
+
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/xercesc/
$(CP) $(PKG_INSTALL_DIR)/usr/include/xercesc/* $(1)/usr/include/xercesc/
$(INSTALL_DIR) $(1)/usr/lib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/{libxerces-c.a,libxerces-c-$(PKG_MAIN_VER).so,libxerces-c.so} $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/{*.a,*.so} $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/xerces-c.pc $(1)/usr/lib/pkgconfig/xerces-c.pc
endef
define Package/libxerces-c/install
$(INSTALL_DIR) $(1)/usr/lib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/{libxerces-c-$(PKG_MAIN_VER).so,libxerces-c.so} $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so $(1)/usr/lib/
endef
define Package/libxerces-c-samples/install
--- a/configure.ac
+++ b/configure.ac
-@@ -194,7 +194,7 @@ AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#
+@@ -228,7 +228,7 @@ AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#
]
)
AC_MSG_CHECKING([for wcsrtombs])
#include <string.h>]],
[[
mbstate_t st;
-@@ -216,7 +216,7 @@ else
+@@ -250,7 +250,7 @@ else
]
)
AC_MSG_CHECKING([for mbsrtowcs])
PKG_NAME:=libxml2
PKG_VERSION:=2.9.9
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://xmlsoft.org/sources/
A library for manipulating XML and HTML resources.
endef
+define Package/libxml2-dev
+ SECTION:=devel
+ CATEGORY:=Development
+ SUBMENU:=Libraries
+ TITLE:=Development files for libxml2
+ URL:=http://xmlsoft.org/
+ DEPENDS:=+libxml2
+endef
+
+define Package/libxml2-dev/description
+ A library for manipulating XML and HTML resources.
+
+ This package contains the headers and xml2-config binary.
+endef
+
+define Package/libxml2-utils
+ SECTION:=utils
+ CATEGORY:=Utilities
+ TITLE:=XML command line utilities (xmllint...)
+ URL:=http://xmlsoft.org/
+ DEPENDS:=+libxml2
+endef
+
+define Package/libxml2-utils/description
+ This package contains the binaries xmllint and xmlcatalog
+ from libxml2, a library for manipulating XML and HTML resources.
+endef
+
TARGET_CFLAGS += $(FPIC)
CONFIGURE_ARGS += \
define Package/libxml2/install
$(INSTALL_DIR) $(1)/usr/lib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxml2.so* $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxml2.so.* $(1)/usr/lib/
+endef
+
+define Package/libxml2-dev/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/xml2-config $(1)/usr/bin/
+ $(SED) "s,$(STAGING_DIR),,g" $(1)/usr/bin/xml2-config
+
+ $(INSTALL_DIR) $(1)/usr/include/
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
+
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxml2.so $(1)/usr/lib/
+
+ $(INSTALL_DIR) $(1)/usr/lib/{cmake,pkgconfig}
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/{cmake,pkgconfig} $(1)/usr/lib/
+ $(SED) "s,$(STAGING_DIR),,g" $(1)/usr/lib/pkgconfig/*.pc
+
+ $(INSTALL_DIR) $(1)/usr/share/aclocal
+ $(CP) $(PKG_INSTALL_DIR)/usr/share/aclocal/* $(1)/usr/share/aclocal
+endef
+
+define Package/libxml2-utils/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/xmllint $(1)/usr/bin/
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/xmlcatalog $(1)/usr/bin/
endef
define Host/Install
$(eval $(call HostBuild))
$(eval $(call BuildPackage,libxml2))
+$(eval $(call BuildPackage,libxml2-dev))
+$(eval $(call BuildPackage,libxml2-utils))
PKG_NAME:=libxslt
PKG_VERSION:=1.1.33
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:= \
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:xmlsoft:libxslt
PKG_MAINTAINER:=Jiri Slachta <jiri@slachta.eu>
--- /dev/null
+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
+
--- /dev/null
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libyubikey
+PKG_VERSION:=1.13
+PKG_RELEASE:=1
+
+PKG_SOURCE:=libyubikey-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://developers.yubico.com/yubico-c/Releases
+PKG_HASH:=04edd0eb09cb665a05d808c58e1985f25bb7c5254d2849f36a0658ffc51c3401
+PKG_MAINTAINER:=Stuart B. Wilkins <stuwilkins@mac.com>
+PKG_LICENSE_FILES:=COPYING
+PKG_LICENSE:=BSD-2-Clause
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/libyubikey-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libyubikey
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=The Yuibco yubikey c library
+ URL:=https://developers.yubico.com/yubico-c/
+endef
+
+define Package/libyubikey/description
+ The c library for the yubikey from Yubico
+endef
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(STAGING_DIR)/usr/include
+ $(CP) $(PKG_BUILD_DIR)/yubikey.h $(STAGING_DIR)/usr/include
+ $(INSTALL_DIR) $(STAGING_DIR)/usr/lib
+ $(CP) $(PKG_BUILD_DIR)/.libs/libyubikey.so* $(STAGING_DIR)/usr/lib
+endef
+
+CONFIGURE_ARGS += \
+ --enable-shared \
+ --disable-static
+
+define Package/libyubikey/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/modhex $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/ykgenerate $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/ykparse $(1)/usr/bin/
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_BUILD_DIR)/.libs/libyubikey.so.* $(1)/usr/lib
+endef
+
+$(eval $(call BuildPackage,libyubikey))
--- /dev/null
+#
+# Copyright (C) 2019 Banglang Huang <banglang.huang@foxmail.com>
+# Copyright (C) 2019 Rosy Song <rosysong@rosinson.com>
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=log4cplus
+PKG_VERSION:=2.0.4
+PKG_RELEASE:=2
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE_URL:=@SF/$(PKG_NAME)
+PKG_HASH:=faf15f3651e2d0f9f9cf2c1bfcb38ec4962f22f4a671410453a27c0976da5e36
+
+PKG_MAINTAINER:=BangLang Huang <banglang.huang@foxmail.com>, Rosy Song <rosysong@rosinson.com>
+PKG_LICENSE:=BSD-2-Clause Apache-2.0
+PKG_LICENSE_FILES:=LICENSE
+
+HOST_BUILD_PARALLEL:=1
+PKG_BUILD_PARALLEL:=1
+CMAKE_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+define Package/log4cplus
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=A simple to use C++ logging API
+ URL:=https://sourceforge.net/p/log4cplus/wiki/Home/
+ DEPENDS:=+libstdcpp
+endef
+
+define Package/log4cplus/description
+ log4cplus is a simple to use C++11 logging API providing thread--safe,
+ flexible, and arbitrarily granular control over log management and
+ configuration. It is modeled after the Java log4j API.
+endef
+
+CMAKE_OPTIONS += \
+ -DLOG4CPLUS_BUILD_LOGGINGSERVER:BOOL=OFF \
+ -DLOG4CPLUS_BUILD_TESTING:BOOL=OFF \
+ -DUNICODE:BOOL=OFF \
+ -DWITH_ICONV:BOOL=OFF
+
+TARGET_CFLAGS += -flto
+TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
+
+define Package/log4cplus/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblog4cplus*.so* $(1)/usr/lib
+endef
+
+$(eval $(call BuildPackage,log4cplus))
+$(eval $(call HostBuild))
PKG_NAME:=loudmouth
PKG_VERSION:=1.5.3
-PKG_RELEASE:=3
+PKG_RELEASE:=4
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/mcabber/loudmouth/tar.gz/$(PKG_VERSION)?
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/nls.mk
define Package/loudmouth
SECTION:=libs
include $(TOPDIR)/rules.mk
PKG_NAME:=lttng-ust
-PKG_VERSION:=2.6.1
+PKG_VERSION:=2.10.3
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://lttng.org/files/$(PKG_NAME)/
-PKG_HASH:=a75c3ea6cbfa3a89107a2141b27ebabf13964e628855566571f09459bbbc8cb3
+PKG_HASH:=9e8420f90d5f963f7aa32bc6d44adc1e491136f687c69ffb7a3075d33b40852b
+PKG_MAINTAINER:=
PKG_LICENSE:=LGPL-2.1 GPL-2.0
PKG_LICENSE_FILES:=COPYING
-PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org>
PKG_FIXUP:=autoreconf
PKG_USE_MIPS16:=0
DEPENDS:= +liburcu +libuuid +librt
endef
+TARGET_CFLAGS += $(FPIC)
+
+CONFIGURE_ARGS += \
+ --without-pic
+
+CONFIGURE_VARS += \
+ ac_cv_prog_BUILD_GEN_TP_EXAMPLES=no
+
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/lttng $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblttng-ust*.{a,so*} $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblttng-ust*.so* $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/lttng-ust.pc $(1)/usr/lib/pkgconfig/
endef
--- a/Makefile.am
+++ b/Makefile.am
-@@ -20,8 +20,6 @@ if BUILD_JAVA_AGENT
- SUBDIRS += liblttng-ust-java-agent
+@@ -26,8 +26,6 @@ SUBDIRS += python-lttngust \
+ liblttng-ust-python-agent
endif
-SUBDIRS += tests doc
+++ /dev/null
---- a/configure.ac
-+++ b/configure.ac
-@@ -350,7 +350,14 @@ AC_ARG_WITH([lttng-system-rundir],
- AC_DEFINE_UNQUOTED([LTTNG_SYSTEM_RUNDIR], ["$lttng_system_rundir"],
- [LTTng system runtime directory])
-
--AM_PATH_PYTHON([2.7],BUILD_GEN_TP_EXAMPLES=1,[:])
-+AC_ARG_ENABLE([examples],
-+ [AS_HELP_STRING([--enable-examples],[build examples [default=no]])],
-+ [enable_examples=$enableval],
-+ [enable_examples=no]
-+)
-+if test "x$enable_examples" = "xyes"; then
-+ AM_PATH_PYTHON([2.7],BUILD_GEN_TP_EXAMPLES=1,[:])
-+fi
- AM_CONDITIONAL([BUILD_GEN_TP_EXAMPLES], [test $BUILD_GEN_TP_EXAMPLES], [Build examples requiring lttng-gen-tp])
-
- AC_CONFIG_FILES([
--- /dev/null
+#
+# Copyright (C) 2019 CZ.NIC z.s.p.o. (http://www.nic.cz/)
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=measurement-kit
+PKG_VERSION:=0.10.4
+PKG_RELEASE=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/measurement-kit/measurement-kit/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=6ca0d9e7a9c1ff0ea8713bf59fde9f87365acdc4b784a5a4bb3f35a77bc4b775
+
+PKG_INSTALL:=1
+PKG_FIXUP:=autoreconf
+PKG_BUILD_PARALLEL:=1
+
+PKG_LICENSE:=BSD-2-Clause
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/measurement-kit
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=library for open network measurement
+ URL:=https://measurement-kit.github.io/
+ DEPENDS:=+libstdcpp +libcurl +libevent2-pthreads +libevent2-extra +libevent2-openssl +libevent2-core +libmaxminddb +ca-bundle
+endef
+
+define Package/measurement-kit/description
+ Measurement Kit is a C++14 library that implements open network measurement methodologies (performance, censorship, etc.)
+endef
+
+CONFIGURE_ARGS+= --with-ca-bundle=/etc/ssl/cert.pem
+
+define Build/Configure
+ ( cd $(PKG_BUILD_DIR); ./autogen.sh )
+ $(call Build/Configure/Default)
+endef
+
+define Package/measurement-kit/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/measurement_kit $(1)/usr/bin/
+endef
+
+$(eval $(call BuildPackage,measurement-kit))
--- /dev/null
+--- a/autogen.sh
++++ b/autogen.sh
+@@ -3,7 +3,7 @@
+ set -e
+ export LC_ALL=C # Stable sorting regardless of the locale
+
+-. script/autogen.d/ca-bundle
++#. script/autogen.d/ca-bundle
+ . script/autogen.d/geoip
+
+ no_geoip=0
+@@ -82,7 +82,7 @@ gen_executables noinst_PROGRAMS example
+ gen_executables ALL_TESTS test libtest_main.la >> include.am
+
+ if [ $no_geoip -ne 1 ]; then
+- autogen_get_ca_bundle
++ #autogen_get_ca_bundle
+ autogen_get_geoip
+ fi
+
--- /dev/null
+--- a/script/autogen.d/geoip
++++ b/script/autogen.d/geoip
+@@ -5,13 +5,13 @@ autogen_get_geoip() {
+ echo "* Fetching geoip databases"
+ base=https://geolite.maxmind.com/download/geoip/database
+ if [ ! -f "country.mmdb" ]; then
+- curl -fsSLO $base/GeoLite2-Country.tar.gz
++ command -v curl && curl -fsSLO $base/GeoLite2-Country.tar.gz || wget $base/GeoLite2-Country.tar.gz
+ tar -xf GeoLite2-Country.tar.gz
+ mv GeoLite2-Country_20??????/GeoLite2-Country.mmdb country.mmdb
+ rm -rf GeoLite2-Country_20??????
+ fi
+ if [ ! -f "asn.mmdb" ]; then
+- curl -fsSLO $base/GeoLite2-ASN.tar.gz
++ command -v curl && curl -fsSLO $base/GeoLite2-ASN.tar.gz || wget $base/GeoLite2-ASN.tar.gz
+ tar -xf GeoLite2-ASN.tar.gz
+ mv GeoLite2-ASN_20??????/GeoLite2-ASN.mmdb asn.mmdb
+ rm -rf GeoLite2-ASN_20??????
--- /dev/null
+#
+# Copyright (C) 2006-2011 OpenWrt.org
+# Copyright (C) 2011 SMBPhone Inc.
+# Copyright (C) 2019 Jeffery To
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=newt
+PKG_VERSION:=0.52.21
+PKG_RELEASE:=2
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://releases.pagure.org/newt
+PKG_HASH:=265eb46b55d7eaeb887fca7a1d51fe115658882dfe148164b6c49fccac5abb31
+
+PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
+PKG_LICENSE:=LGPL-2.0-only
+PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:fedorahosted:newt
+
+PKG_BUILD_PARALLEL:=1
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/nls.mk
+include ../../lang/python/python3-package.mk
+
+define Package/newt/Default
+ TITLE:=Newt
+ URL:=https://pagure.io/newt
+endef
+
+define Package/newt/Default/description
+ Newt is a programming library for color text mode, widget based user
+ interfaces. Newt can be used to add stacked windows, entry widgets,
+ checkboxes, radio buttons, labels, plain text fields, scrollbars, etc.,
+ to text mode user interfaces. Newt is based on the slang library.
+endef
+
+define Package/libnewt
+$(call Package/newt/Default)
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE+= library
+ DEPENDS:=+libslang2 $(INTL_DEPENDS)
+endef
+
+define Package/libnewt/description
+$(call Package/newt/Default/description)
+endef
+
+define Package/whiptail
+$(call Package/newt/Default)
+ SECTION:=utils
+ CATEGORY:=Utilities
+ TITLE:=Display dialog boxes from shell scripts
+ DEPENDS:=+libnewt +libpopt +libslang2
+endef
+
+define Package/whiptail/description
+ A lightweight replacement for the dialog command (dialog boxes from shell
+ scripts), based on libnewt.
+endef
+
+define Package/python3-newt
+$(call Package/newt/Default)
+ SECTION:=lang
+ CATEGORY:=Languages
+ SUBMENU:=Python
+ TITLE+= module for Python
+ DEPENDS:=+libnewt +python3-light
+ VARIANT:=python3
+endef
+
+define Package/python3-newt/description
+$(call Package/newt/Default/description)
+
+ This is the Newt module for Python 3.
+endef
+
+CONFIGURE_ARGS+= \
+ --enable-largefile \
+ --with-python=python$(PYTHON3_VERSION) \
+ --without-tcl \
+ --without-gpm-support \
+ --with-colorsfile=/etc/newt/palette
+
+CONFIGURE_VARS += $(if $(CONFIG_BUILD_NLS),ac_cv_lib_c_gettext=no)
+
+MAKE_VARS+= PYTHON_CONFIG_PATH="$(STAGING_DIR)/host/bin"
+
+Build/Compile=$(call Build/Compile/Default,)
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/include
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/newt.h $(1)/usr/include/
+
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnewt.{a,so*} $(1)/usr/lib/
+
+ $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libnewt.pc $(1)/usr/lib/pkgconfig/
+endef
+
+define Package/libnewt/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnewt.so* $(1)/usr/lib/
+endef
+
+define Package/whiptail/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/whiptail $(1)/usr/bin/
+endef
+
+# Don't install files from usr/bin
+Py3Package/python3-newt/install:=:
+
+$(eval $(call BuildPackage,libnewt))
+$(eval $(call BuildPackage,whiptail))
+
+$(eval $(call Py3Package,python3-newt))
+$(eval $(call BuildPackage,python3-newt))
+$(eval $(call BuildPackage,python3-newt-src))
--- /dev/null
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -84,12 +84,7 @@ showkey: showkey.o $(LIBNEWT)
+
+ _snack.$(SOEXT): snack.c $(LIBNEWTSH)
+ @[ -n "$(PYTHONVERS)" ] && for ver in $(PYTHONVERS); do \
+- pyconfig=$$ver-config; \
+- if ! $$pyconfig --cflags > /dev/null 2>&1 && \
+- python-config --cflags > /dev/null 2>&1; then \
+- echo $$pyconfig not found, using python-config; \
+- pyconfig=python-config; \
+- fi; \
++ pyconfig=$(PYTHON_CONFIG_PATH)/$$ver-config; \
+ mkdir -p $$ver; \
+ PCFLAGS=`$$pyconfig --cflags`; \
+ PIFLAGS=`$$pyconfig --includes`; \
+@@ -109,7 +104,7 @@ whiptcl.$(SOEXT): $(WHIPTCLOBJS) $(LIBNE
+ $(CC) -shared $(SHCFLAGS) $(LDFLAGS) -o whiptcl.$(SOEXT) $(WHIPTCLOBJS) -L. -lnewt $(LIBTCL) -lpopt $(LIBS)
+
+ $(LIBNEWT): $(LIBOBJS)
+- ar rv $@ $^
++ $(AR) rv $@ $^
+
+ newt.o $(SHAREDDIR)/newt.o: newt.c Makefile
+
--- /dev/null
+Author: Alastair McKinstry <mckinstry@debian.org>
+Description: newtInit() should only be called once
+Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=557960
+Forwarded: no
+Last-Updated: 2014-06-11
+
+--- a/snack.c
++++ b/snack.c
+@@ -377,10 +377,15 @@ static snackWidget * snackWidgetNew (voi
+ }
+
+ static PyObject * initScreen(PyObject * s, PyObject * args) {
++ static int init_newt = 1;
+ suspend.cb = NULL;
+ suspend.data = NULL;
+
+ newtInit();
++ if (init_newt) {
++ newtInit();
++ init_newt = 0;
++ }
+ newtCls();
+
+ Py_INCREF(Py_None);
--- /dev/null
+Author: Thomas Viehmann <tv@beamnet.de>
+Description: Fix for python memory handling
+Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=445392
+Last-Updated: 2014-06-11
+Forwarded: no
+
+--- a/snack.c
++++ b/snack.c
+@@ -366,7 +366,7 @@ static PyTypeObject snackWidgetType = {
+ static snackWidget * snackWidgetNew (void) {
+ snackWidget * widget;
+
+- widget = PyObject_NEW(snackWidget, &snackWidgetType);
++ widget = PyObject_New(snackWidget, &snackWidgetType);
+ if (!widget)
+ return NULL;
+
+@@ -937,7 +937,7 @@ static snackForm * formCreate(PyObject *
+ if (help == Py_None)
+ help = NULL;
+
+- form = PyObject_NEW(snackForm, &snackFormType);
++ form = PyObject_New(snackForm, &snackFormType);
+ form->fo = newtForm(NULL, help, 0);
+
+ return form;
+@@ -949,7 +949,7 @@ static snackGrid * gridCreate(PyObject *
+
+ if (!PyArg_ParseTuple(args, "ii", &cols, &rows)) return NULL;
+
+- grid = PyObject_NEW(snackGrid, &snackGridType);
++ grid = PyObject_New(snackGrid, &snackGridType);
+ grid->grid = newtCreateGrid(cols, rows);
+
+ return grid;
--- /dev/null
+#
+# Copyright (C) 2019 Lucian Cristian
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=nspr
+PKG_VERSION:=4.21
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Lucian Cristian <lucian.cristian@gmail.com>
+PKG_LICENCE:=MPL-2.0
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:= \
+ https://download.cdn.mozilla.net/pub/$(PKG_NAME)/releases/v$(PKG_VERSION)/src/ \
+ https://archive.mozilla.org/pub/$(PKG_NAME)/releases/v$(PKG_VERSION)/src/
+PKG_HASH:=15ea32c7b100217b6e3193bc03e77f485d9bf7504051443ba9ce86d1c17c6b5a
+
+PKG_BUILD_PARALLEL:=1
+PKG_INSTALL:=1
+PKG_FIXUP:=autoreconf
+
+include $(INCLUDE_DIR)/package.mk
+
+CONFIGURE_PATH = ./nspr
+MAKE_PATH = ./nspr
+PKG_AUTOMAKE_PATHS = $(PKG_BUILD_DIR)/nspr
+LBITS = $(shell $(TARGET_CC) -dM -E - </dev/null | grep -q "__LP64__" && echo 64 || echo 32)
+
+ifeq ($(LBITS),64)
+ conf=--enable-64bit
+endif
+
+export MUSL=$(if $(CONFIG_LIBC_USE_GLIBC),0,1)
+TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
+
+CONFIGURE_ARGS += \
+ --build=$(GNU_HOST_NAME) \
+ --host=$(GNU_HOST_NAME) \
+ --target=$(REAL_GNU_TARGET_NAME) \
+ --disable-debug \
+ --with-pthreads \
+ $(if $(CONFIG_IPV6),--enable-ipv6,--disable-ipv6) \
+ $(conf)
+
+define Build/Compile
+ CROSS_COMPILE=1 CFLAGS="-DXP_UNIX $(HOST_CFLAGS)" LDFLAGS="" CC="$(HOSTCC)" \
+ $(MAKE) -C $(PKG_BUILD_DIR)/nspr/config
+ $(call Build/Compile/Default)
+endef
+
+define Package/nspr
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=Netscape Portable Runtime (NSPR)
+ URL:=https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSPR
+ DEPENDS:=+libpthread
+endef
+
+define Package/nspr/description
+ Netscape Portable Runtime (NSPR) provides a platform-neutral API for system
+ level and libc-like functions. The API is used in the Mozilla clients, many
+ of Red Hat's and Oracle's server applications, and other software offerings.
+endef
+
+define Build/InstallDev
+ $(INSTALL_DIR) \
+ $(1)/usr/include \
+ $(1)/usr/lib/ \
+ $(1)/usr/lib/pkgconfig/ \
+ $(1)/usr/share/aclocal/
+
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/nspr $(1)/usr/include/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/aclocal/* $(1)/usr/share/aclocal/
+endef
+
+define Package/nspr/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,nspr))
--- /dev/null
+From 8a592e4ead4ed6befe6044da3dd2dc7523c33905 Mon Sep 17 00:00:00 2001
+From: Mingli Yu <Mingli.Yu@windriver.com>
+Date: Fri, 16 Nov 2018 13:52:49 +0800
+Subject: [PATCH] Makefile.in: remove _BUILD_STRING and _BUILD_TIME
+
+Remove _BUILD_STRING and _BUILD_TIME to avoid
+adding timestamp to _pl_bld.h which can result
+in adding timestamp in library file such as
+libnspr4.so.
+ $ readelf --wide --decompress --hex-dump=.rodata libnspr4.so
+ [snip]
+ 0x00004000 32303138 2d31312d 31352030 353a3439 2018-11-15 05:49
+ [snip]
+
+Upstream-Status: Pending
+
+Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
+---
+ lib/ds/Makefile.in | 8 +-------
+ lib/libc/src/Makefile.in | 8 +-------
+ lib/prstreams/Makefile.in | 8 +-------
+ pr/src/Makefile.in | 8 +-------
+ 4 files changed, 4 insertions(+), 28 deletions(-)
+
+diff --git a/lib/ds/Makefile.in b/lib/ds/Makefile.in
+index e737791..b578476 100644
+--- a/nspr/lib/ds/Makefile.in
++++ b/nspr/lib/ds/Makefile.in
+@@ -114,13 +114,7 @@ GARBAGE += $(TINC)
+
+ $(TINC):
+ @$(MAKE_OBJDIR)
+- @$(ECHO) '#define _BUILD_STRING "$(SH_DATE)"' > $(TINC)
+- @if test ! -z "$(SH_NOW)"; then \
+- $(ECHO) '#define _BUILD_TIME $(SH_NOW)$(SUF)' >> $(TINC); \
+- else \
+- true; \
+- fi
+- @$(ECHO) '#define _PRODUCTION "$(PROD)"' >> $(TINC)
++ @$(ECHO) '#define _PRODUCTION "$(PROD)"' > $(TINC)
+
+
+ $(OBJDIR)/plvrsion.$(OBJ_SUFFIX): plvrsion.c $(TINC)
+diff --git a/lib/libc/src/Makefile.in b/lib/libc/src/Makefile.in
+index e8a6d9f..978ed28 100644
+--- a/nspr/lib/libc/src/Makefile.in
++++ b/nspr/lib/libc/src/Makefile.in
+@@ -116,13 +116,7 @@ GARBAGE += $(TINC)
+
+ $(TINC):
+ @$(MAKE_OBJDIR)
+- @$(ECHO) '#define _BUILD_STRING "$(SH_DATE)"' > $(TINC)
+- @if test ! -z "$(SH_NOW)"; then \
+- $(ECHO) '#define _BUILD_TIME $(SH_NOW)$(SUF)' >> $(TINC); \
+- else \
+- true; \
+- fi
+- @$(ECHO) '#define _PRODUCTION "$(PROD)"' >> $(TINC)
++ @$(ECHO) '#define _PRODUCTION "$(PROD)"' > $(TINC)
+
+
+ $(OBJDIR)/plvrsion.$(OBJ_SUFFIX): plvrsion.c $(TINC)
+diff --git a/lib/prstreams/Makefile.in b/lib/prstreams/Makefile.in
+index aeb2944..f318097 100644
+--- a/nspr/lib/prstreams/Makefile.in
++++ b/nspr/lib/prstreams/Makefile.in
+@@ -116,13 +116,7 @@ endif
+
+ $(TINC):
+ @$(MAKE_OBJDIR)
+- @$(ECHO) '#define _BUILD_STRING "$(SH_DATE)"' > $(TINC)
+- @if test ! -z "$(SH_NOW)"; then \
+- $(ECHO) '#define _BUILD_TIME $(SH_NOW)$(SUF)' >> $(TINC); \
+- else \
+- true; \
+- fi
+- @$(ECHO) '#define _PRODUCTION "$(PROD)"' >> $(TINC)
++ @$(ECHO) '#define _PRODUCTION "$(PROD)"' > $(TINC)
+
+
+ $(OBJDIR)/plvrsion.$(OBJ_SUFFIX): plvrsion.c $(TINC)
+diff --git a/pr/src/Makefile.in b/pr/src/Makefile.in
+index 19c5a69..b4ac31c 100644
+--- a/nspr/pr/src/Makefile.in
++++ b/nspr/pr/src/Makefile.in
+@@ -326,13 +326,7 @@ GARBAGE += $(TINC)
+
+ $(TINC):
+ @$(MAKE_OBJDIR)
+- @$(ECHO) '#define _BUILD_STRING "$(SH_DATE)"' > $(TINC)
+- @if test ! -z "$(SH_NOW)"; then \
+- $(ECHO) '#define _BUILD_TIME $(SH_NOW)$(SUF)' >> $(TINC); \
+- else \
+- true; \
+- fi
+- @$(ECHO) '#define _PRODUCTION "$(PROD)"' >> $(TINC)
++ @$(ECHO) '#define _PRODUCTION "$(PROD)"' > $(TINC)
+
+
+ $(OBJDIR)/prvrsion.$(OBJ_SUFFIX): prvrsion.c $(TINC)
+--
+2.7.4
+
--- /dev/null
+From 6cb5b0be8837222a1e01745f2cf57cd0e593186d Mon Sep 17 00:00:00 2001
+From: Antoine Tenart <antoine.tenart@free-electrons.com>
+Date: Mon, 23 Oct 2017 10:28:20 +0200
+Subject: [PATCH] Add ARC support
+
+[Alexey: Rebased on top of other patches like RiscV, NIOS2 etc].
+
+Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
+Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
+
+Upstream-Status: Submitted [ https://bugzilla.mozilla.org/show_bug.cgi?id=1492378 ]
+---
+ pr/include/md/_linux.cfg | 45 ++++++++++++++++++++++++++++++++++++++++
+ pr/include/md/_linux.h | 2 ++
+ 2 files changed, 47 insertions(+)
+
+diff --git a/pr/include/md/_linux.cfg b/pr/include/md/_linux.cfg
+index fec8525378dc..5f4fa0eac783 100644
+--- a/nspr/pr/include/md/_linux.cfg
++++ b/nspr/pr/include/md/_linux.cfg
+@@ -1157,6 +1157,51 @@
+ #define PR_BYTES_PER_WORD_LOG2 3
+ #define PR_BYTES_PER_DWORD_LOG2 3
+
++#elif defined(__arc__)
++
++#define IS_LITTLE_ENDIAN 1
++#undef IS_BIG_ENDIAN
++
++#define PR_BYTES_PER_BYTE 1
++#define PR_BYTES_PER_SHORT 2
++#define PR_BYTES_PER_INT 4
++#define PR_BYTES_PER_INT64 8
++#define PR_BYTES_PER_LONG 4
++#define PR_BYTES_PER_FLOAT 4
++#define PR_BYTES_PER_DOUBLE 8
++#define PR_BYTES_PER_WORD 4
++#define PR_BYTES_PER_DWORD 8
++
++#define PR_BITS_PER_BYTE 8
++#define PR_BITS_PER_SHORT 16
++#define PR_BITS_PER_INT 32
++#define PR_BITS_PER_INT64 64
++#define PR_BITS_PER_LONG 32
++#define PR_BITS_PER_FLOAT 32
++#define PR_BITS_PER_DOUBLE 64
++#define PR_BITS_PER_WORD 32
++
++#define PR_BITS_PER_BYTE_LOG2 3
++#define PR_BITS_PER_SHORT_LOG2 4
++#define PR_BITS_PER_INT_LOG2 5
++#define PR_BITS_PER_INT64_LOG2 6
++#define PR_BITS_PER_LONG_LOG2 5
++#define PR_BITS_PER_FLOAT_LOG2 5
++#define PR_BITS_PER_DOUBLE_LOG2 6
++#define PR_BITS_PER_WORD_LOG2 5
++
++#define PR_ALIGN_OF_SHORT 2
++#define PR_ALIGN_OF_INT 4
++#define PR_ALIGN_OF_LONG 4
++#define PR_ALIGN_OF_INT64 4
++#define PR_ALIGN_OF_FLOAT 4
++#define PR_ALIGN_OF_DOUBLE 4
++#define PR_ALIGN_OF_POINTER 4
++#define PR_ALIGN_OF_WORD 4
++
++#define PR_BYTES_PER_WORD_LOG2 2
++#define PR_BYTES_PER_DWORD_LOG2 3
++
+ #else
+
+ #error "Unknown CPU architecture"
+diff --git a/pr/include/md/_linux.h b/pr/include/md/_linux.h
+index 8e04fad479a1..628b1217e9c8 100644
+--- a/nspr/pr/include/md/_linux.h
++++ b/nspr/pr/include/md/_linux.h
+@@ -63,6 +63,8 @@
+ #define _PR_SI_ARCHITECTURE "riscv32"
+ #elif defined(__riscv) && (__riscv_xlen == 64)
+ #define _PR_SI_ARCHITECTURE "riscv64"
++#elif defined(__arc__)
++#define _PR_SI_ARCHITECTURE "arc"
+ #else
+ #error "Unknown CPU architecture"
+ #endif
+--
+2.17.1
+
--- /dev/null
+--- a/nspr/config/config.mk 2017-10-31 13:13:22.692343122 +0200
++++ b/nspr/config/config.mk 2017-10-31 13:13:58.758016378 +0200
+@@ -126,6 +126,9 @@
+
+ ifeq ($(USE_IPV6),1)
+ DEFINES += -D_PR_INET6
++ifeq ($(MUSL),1)
++CFLAGS += -D_PR_POLL_AVAILABLE -D_PR_HAVE_OFF64_T -D_PR_INET6 -D_PR_HAVE_INET_NTOP -D_PR_HAVE_GETHOSTBYNAME2 -D_PR_HAVE_GETADDRINFO -D_PR_INET6_PROBE
++endif
+ endif
+
+ ifeq ($(MOZ_UNICODE),1)
+--- a/nspr/config/Makefile.in 2019-03-31 13:44:56.919871810 +0300
++++ b/nspr/config/Makefile.in 2019-03-31 13:45:21.560545948 +0300
+@@ -30,7 +30,7 @@
+
+ # This version hasn't been ported for us; the one in mozilla/config has
+ ifneq ($(OS_ARCH),OS2)
+-CSRCS += nsinstall.c
++#CSRCS += nsinstall.c
+
+ PLSRCS = nfspwd.pl
+ endif
--- /dev/null
+#
+# Copyright (C) 2019 Lucian Cristian
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=nss
+PKG_VERSION:=3.44.1
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Lucian Cristian <lucian.cristian@gmail.com>
+PKG_LICENCE:=MPL-2.0
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:= \
+ https://download.cdn.mozilla.net/pub/security/$(PKG_NAME)/releases/NSS_$(subst .,_,$(PKG_VERSION))_RTM/src \
+ https://archive.mozilla.org/pub/security/$(PKG_NAME)/releases/NSS_$(subst .,_,$(PKG_VERSION))_RTM/src
+PKG_HASH:=fce4cb80c989cde35416ecbe55920856015a35151c4f21be64470e4dd4de12f8
+
+PKG_BUILD_PARALLEL:=0
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libnss
+ SECTION:=libs
+ SUBMENU:=SSL
+ CATEGORY:=Libraries
+ TITLE:=Mozilla's SSL and TLS implementation
+ URL:=https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS
+ DEPENDS:=+libpthread +libsqlite3 +nspr
+endef
+
+define Package/nss-utils
+ SECTION:=utils
+ CATEGORY:=Utilities
+ TITLE:=Utilities for Mozilla's SSL and TLS implementation
+ URL:=https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS
+ DEPENDS:=+libnss
+endef
+
+define Package/libnss/description
+ Network Security Services (NSS) is a set of libraries designed to support
+ cross-platform development of security-enabled client and server applications.
+ Applications built with NSS can support SSL v2 and v3, TLS, PKCS 5, PKCS 7,
+ PKCS 11, PKCS 12, S/MIME, X.509 v3 certificates, and other security standards.
+endef
+
+CONFIGURE_PATH = ./nss
+MAKE_PATH = ./nss
+
+LBITS = $(shell $(TARGET_CC) -dM -E - </dev/null | grep -q "__LP64__" && echo 64 || echo 32)
+
+ifeq ($(LBITS),64)
+ export USE_64=1
+endif
+
+TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
+
+export CROSS_COMPILE=1
+export BUILD_OPT=1
+export NATIVE_CC=$(HOSTCC)
+export NATIVE_FLAGS=$(HOST_CFLAGS)
+export NSDISTMODE=copy
+export NSS_ENABLE_WERROR=0
+export NSS_DISABLE_GTESTS=1
+export NSS_USE_SYSTEM_SQLITE=1
+export OS_TARGET=Linux
+export OS_ARCH=Linux
+export OS_TEST=$(ARCH)
+export CPU_ARCH=$(ARCH)
+export fpic=$(FPIC)
+export NSPR_INCLUDE_DIR=$(STAGING_DIR)/usr/include/nspr
+export SEED_ONLY_DEV_URANDOM=1
+export OS_REL_CFLAGS=$(TARGET_CFLAGS)
+export NS_USE_GCC=1
+export FREEBL_NO_DEPEND=1
+#size optimisation, seems to not impact speed
+export NSS_DISABLE_DBM=1
+export NSS_PKIX_NO_LDAP=1
+export ALLOW_OPT_CODE_SIZE=1
+export OPT_CODE_SIZE=1
+
+#native compile nsinstall
+define Build/Prepare
+ $(call Build/Prepare/Default)
+ USE_NATIVE=1 OS_REL_CFLAGS="$(HOST_CFLAGS)" LDFLAGS="$(HOST_LDFLAGS)" CC="$(HOSTCC)" \
+ $(MAKE) -C $(PKG_BUILD_DIR)/nss/coreconf/nsinstall
+# $(if $(CONFIG_LIBC_USE_GLIBC),, \
+# $(SED) '/-DHAVE_SYS_CDEFS_H/d' $(PKG_BUILD_DIR)/nss/lib/dbm/config/config.mk)
+endef
+
+define Package/libnss/conffiles
+/etc/pki/nssdb
+endef
+
+define Build/InstallDev
+ $(INSTALL_DIR) \
+ $(1)/usr/include/nss \
+ $(1)/usr/lib \
+ $(1)/usr/lib/pkgconfig
+ $(CP) $(PKG_BUILD_DIR)/dist/private/nss/*.h \
+ $(1)/usr/include/nss/
+ $(CP) $(PKG_BUILD_DIR)/dist/public/nss/*.h \
+ $(1)/usr/include/nss/
+ $(CP) $(PKG_BUILD_DIR)/dist/build_dir/lib/*.so \
+ $(1)/usr/lib/
+ $(CP) $(PKG_BUILD_DIR)/nss/config/*.pc \
+ $(1)/usr/lib/pkgconfig/
+endef
+
+define Package/nss-utils/install
+ $(INSTALL_DIR) \
+ $(1)/usr/bin
+ $(CP) $(PKG_BUILD_DIR)/dist/build_dir/bin/certutil $(1)/usr/bin
+ $(CP) $(PKG_BUILD_DIR)/dist/build_dir/bin/pk12util $(1)/usr/bin
+endef
+
+#for now pack only libreswan needed libs
+define Package/libnss/install
+ $(INSTALL_DIR) \
+ $(1)/usr/lib \
+ $(1)/etc/pki/nssdb \
+ $(1)/etc/ipsec.d
+
+ $(CP) $(PKG_BUILD_DIR)/dist/build_dir/lib/libfreebl3.so $(1)/usr/lib/
+ $(CP) $(PKG_BUILD_DIR)/dist/build_dir/lib/libnss3.so $(1)/usr/lib/
+ $(CP) $(PKG_BUILD_DIR)/dist/build_dir/lib/libnssutil3.so $(1)/usr/lib/
+ $(CP) $(PKG_BUILD_DIR)/dist/build_dir/lib/libsmime3.so $(1)/usr/lib/
+ $(CP) $(PKG_BUILD_DIR)/dist/build_dir/lib/libsoftokn3.so $(1)/usr/lib/
+ $(CP) $(PKG_BUILD_DIR)/dist/build_dir/lib/libssl3.so $(1)/usr/lib/
+# Pprovide databases with a blank certificate
+ $(CP) ./files/blank-cert9.db $(1)/etc/pki/nssdb/cert9.db
+ $(CP) ./files/blank-key4.db $(1)/etc/pki/nssdb/key4.db
+ $(CP) ./files/system-pkcs11.txt $(1)/etc/pki/nssdb/pkcs11.txt
+ ln -s /etc/pki/nssdb/cert9.db $(1)/etc/ipsec.d/cert9.db
+ ln -s /etc/pki/nssdb/key4.db $(1)/etc/ipsec.d/key4.db
+ ln -s /etc/pki/nssdb/pkcs11.txt $(1)/etc/ipsec.d/pkcs11.txt
+endef
+
+$(eval $(call BuildPackage,nss-utils))
+$(eval $(call BuildPackage,libnss))
--- /dev/null
+library=
+name=NSS Internal PKCS #11 Module
+parameters=configdir='sql:/etc/pki/nssdb' certPrefix='' keyPrefix='' secmod='secmod.db' flags= updatedir='' updateCertPrefix='' updateKeyPrefix='' updateid='' updateTokenDescription=''
+NSS=Flags=internal,critical trustOrder=75 cipherOrder=100 slotParams=(1={slotFlags=[ECC,RSA,DSA,DH,RC2,RC4,DES,RANDOM,SHA1,MD5,MD2,SSL,TLS,AES,Camellia,SEED,SHA256,SHA512] askpw=any timeout=30})
+
--- /dev/null
+Submitted By: DJ Lucas <dj_AT_linuxfromscratch_DOT_org>
+Date: 2016-12-27
+Initial Package Version: 3.12.4
+Upstream Status: Not applicable
+Origin: Self, rediffed for nss-3.28.
+Description: Adds auto-generated nss.pc and nss-config script, and
+ allows building without nspr in the source tree.
+ For 3.40.1, Requires: updated to nspr >= 4.20.
+
+diff -Naurp nss-3.28-orig/nss/Makefile nss-3.28/nss/Makefile
+--- nss-3.28-orig/nss/Makefile 2016-12-21 05:56:27.000000000 -0600
++++ nss-3.28/nss/Makefile 2016-12-26 22:24:52.695146032 -0600
+@@ -46,7 +46,7 @@ include $(CORE_DEPTH)/coreconf/rules.mk
+ # (7) Execute "local" rules. (OPTIONAL). #
+ #######################################################################
+
+-nss_build_all: build_nspr all latest
++nss_build_all: all latest
+
+ nss_clean_all: clobber_nspr clobber
+
+diff -Naurp nss-3.28-orig/nss/config/Makefile nss-3.28/nss/config/Makefile
+--- nss-3.28-orig/nss/config/Makefile 1969-12-31 18:00:00.000000000 -0600
++++ nss-3.28/nss/config/Makefile 2016-12-26 22:20:40.008205774 -0600
+@@ -0,0 +1,40 @@
++CORE_DEPTH = ..
++DEPTH = ..
++
++include $(CORE_DEPTH)/coreconf/config.mk
++
++NSS_MAJOR_VERSION = `grep "NSS_VMAJOR" ../lib/nss/nss.h | awk '{print $$3}'`
++NSS_MINOR_VERSION = `grep "NSS_VMINOR" ../lib/nss/nss.h | awk '{print $$3}'`
++NSS_PATCH_VERSION = `grep "NSS_VPATCH" ../lib/nss/nss.h | awk '{print $$3}'`
++PREFIX = /usr
++
++all: export libs
++
++export:
++ # Create the nss.pc file
++ mkdir -p $(DIST)/lib/pkgconfig
++ sed -e "s,@prefix@,$(PREFIX)," \
++ -e "s,@exec_prefix@,\$${prefix}," \
++ -e "s,@libdir@,\$${prefix}/lib," \
++ -e "s,@includedir@,\$${prefix}/include/nss," \
++ -e "s,@NSS_MAJOR_VERSION@,$(NSS_MAJOR_VERSION),g" \
++ -e "s,@NSS_MINOR_VERSION@,$(NSS_MINOR_VERSION)," \
++ -e "s,@NSS_PATCH_VERSION@,$(NSS_PATCH_VERSION)," \
++ nss.pc.in > nss.pc
++ chmod 0644 nss.pc
++ ln -sf ../../../../nss/config/nss.pc $(DIST)/lib/pkgconfig
++
++ # Create the nss-config script
++ mkdir -p $(DIST)/bin
++ sed -e "s,@prefix@,$(PREFIX)," \
++ -e "s,@NSS_MAJOR_VERSION@,$(NSS_MAJOR_VERSION)," \
++ -e "s,@NSS_MINOR_VERSION@,$(NSS_MINOR_VERSION)," \
++ -e "s,@NSS_PATCH_VERSION@,$(NSS_PATCH_VERSION)," \
++ nss-config.in > nss-config
++ chmod 0755 nss-config
++ ln -sf ../../../nss/config/nss-config $(DIST)/bin
++
++libs:
++
++dummy: all export libs
++
+diff -Naurp nss-3.28-orig/nss/config/nss-config.in nss-3.28/nss/config/nss-config.in
+--- nss-3.28-orig/nss/config/nss-config.in 1969-12-31 18:00:00.000000000 -0600
++++ nss-3.28/nss/config/nss-config.in 2016-12-26 22:20:40.008205774 -0600
+@@ -0,0 +1,153 @@
++#!/bin/sh
++
++prefix=@prefix@
++
++major_version=@NSS_MAJOR_VERSION@
++minor_version=@NSS_MINOR_VERSION@
++patch_version=@NSS_PATCH_VERSION@
++
++usage()
++{
++ cat <<EOF
++Usage: nss-config [OPTIONS] [LIBRARIES]
++Options:
++ [--prefix[=DIR]]
++ [--exec-prefix[=DIR]]
++ [--includedir[=DIR]]
++ [--libdir[=DIR]]
++ [--version]
++ [--libs]
++ [--cflags]
++Dynamic Libraries:
++ nss
++ nssutil
++ smime
++ ssl
++ softokn
++EOF
++ exit $1
++}
++
++if test $# -eq 0; then
++ usage 1 1>&2
++fi
++
++lib_nss=yes
++lib_nssutil=yes
++lib_smime=yes
++lib_ssl=yes
++lib_softokn=yes
++
++while test $# -gt 0; do
++ case "$1" in
++ -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
++ *) optarg= ;;
++ esac
++
++ case $1 in
++ --prefix=*)
++ prefix=$optarg
++ ;;
++ --prefix)
++ echo_prefix=yes
++ ;;
++ --exec-prefix=*)
++ exec_prefix=$optarg
++ ;;
++ --exec-prefix)
++ echo_exec_prefix=yes
++ ;;
++ --includedir=*)
++ includedir=$optarg
++ ;;
++ --includedir)
++ echo_includedir=yes
++ ;;
++ --libdir=*)
++ libdir=$optarg
++ ;;
++ --libdir)
++ echo_libdir=yes
++ ;;
++ --version)
++ echo ${major_version}.${minor_version}.${patch_version}
++ ;;
++ --cflags)
++ echo_cflags=yes
++ ;;
++ --libs)
++ echo_libs=yes
++ ;;
++ nss)
++ lib_nss=yes
++ ;;
++ nssutil)
++ lib_nssutil=yes
++ ;;
++ smime)
++ lib_smime=yes
++ ;;
++ ssl)
++ lib_ssl=yes
++ ;;
++ softokn)
++ lib_softokn=yes
++ ;;
++ *)
++ usage 1 1>&2
++ ;;
++ esac
++ shift
++done
++
++# Set variables that may be dependent upon other variables
++if test -z "$exec_prefix"; then
++ exec_prefix=`pkg-config --variable=exec_prefix nss`
++fi
++if test -z "$includedir"; then
++ includedir=`pkg-config --variable=includedir nss`
++fi
++if test -z "$libdir"; then
++ libdir=`pkg-config --variable=libdir nss`
++fi
++
++if test "$echo_prefix" = "yes"; then
++ echo $prefix
++fi
++
++if test "$echo_exec_prefix" = "yes"; then
++ echo $exec_prefix
++fi
++
++if test "$echo_includedir" = "yes"; then
++ echo $includedir
++fi
++
++if test "$echo_libdir" = "yes"; then
++ echo $libdir
++fi
++
++if test "$echo_cflags" = "yes"; then
++ echo -I$includedir
++fi
++
++if test "$echo_libs" = "yes"; then
++ libdirs="-L$libdir"
++ if test -n "$lib_nss"; then
++ libdirs="$libdirs -lnss${major_version}"
++ fi
++ if test -n "$lib_nssutil"; then
++ libdirs="$libdirs -lnssutil${major_version}"
++ fi
++ if test -n "$lib_smime"; then
++ libdirs="$libdirs -lsmime${major_version}"
++ fi
++ if test -n "$lib_ssl"; then
++ libdirs="$libdirs -lssl${major_version}"
++ fi
++ if test -n "$lib_softokn"; then
++ libdirs="$libdirs -lsoftokn${major_version}"
++ fi
++ echo $libdirs
++fi
++
+diff -Naurp nss-3.28-orig/nss/config/nss.pc.in nss-3.28/nss/config/nss.pc.in
+--- nss-3.28-orig/nss/config/nss.pc.in 1969-12-31 18:00:00.000000000 -0600
++++ nss-3.28/nss/config/nss.pc.in 2016-12-26 22:22:53.300694346 -0600
+@@ -0,0 +1,12 @@
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++libdir=@libdir@
++includedir=@includedir@
++
++Name: NSS
++Description: Network Security Services
++Version: @NSS_MAJOR_VERSION@.@NSS_MINOR_VERSION@.@NSS_PATCH_VERSION@
++Requires: nspr >= 4.20
++Libs: -L@libdir@ -lnss@NSS_MAJOR_VERSION@ -lnssutil@NSS_MAJOR_VERSION@ -lsmime@NSS_MAJOR_VERSION@ -lssl@NSS_MAJOR_VERSION@ -lsoftokn@NSS_MAJOR_VERSION@
++Cflags: -I${includedir}
++
+diff -Naurp nss-3.28-orig/nss/manifest.mn nss-3.28/nss/manifest.mn
+--- nss-3.28-orig/nss/manifest.mn 2016-12-21 05:56:27.000000000 -0600
++++ nss-3.28/nss/manifest.mn 2016-12-26 22:24:12.278991843 -0600
+@@ -10,4 +10,4 @@ IMPORTS = nspr20/v4.8 \
+
+ RELEASE = nss
+
+-DIRS = coreconf lib cmd cpputil gtests
++DIRS = coreconf lib cmd cpputil gtests config
--- /dev/null
+--- a/nss/coreconf/arch.mk 2019-04-01 22:20:32.470080052 +0300
++++ b/nss/coreconf/arch.mk 2019-04-01 22:21:01.730987548 +0300
+@@ -20,13 +20,13 @@
+ # Macros for getting the OS architecture
+ #
+
+-OS_ARCH := $(subst /,_,$(shell uname -s))
++OS_ARCH ?= $(subst /,_,$(shell uname -s))
+
+ #
+ # Attempt to differentiate between sparc and x86 Solaris
+ #
+
+-OS_TEST := $(shell uname -m)
++OS_TEST ?= $(shell uname -m)
+ ifeq ($(OS_TEST),i86pc)
+ OS_RELEASE := $(shell uname -r)_$(OS_TEST)
+ else
--- /dev/null
+--- a/nss/lib/dbm/src/dirent.h 2017-10-19 17:15:14.797053528 +0300
++++ b/nss/lib/dbm/src/dirent.h 2017-10-19 17:15:26.156310432 +0300
+@@ -30,7 +30,7 @@
+ #define MAXNAMLEN FILENAME_MAX
+
+ #else
+-#include <param.h>
++#include <sys/param.h>
+ #endif
+ #endif
+
+--- a/nss/coreconf/rules.mk 2019-03-31 22:39:06.741609534 +0300
++++ b/nss/coreconf/rules.mk 2019-03-31 22:36:13.260356949 +0300
+@@ -261,7 +261,7 @@
+ ifeq (,$(filter-out _WIN%,$(NS_USE_GCC)_$(OS_TARGET)))
+ $(AR) $(subst /,\\,$(OBJS))
+ else
+- $(AR) $(OBJS)
++ $(AR) rcs $@ $(OBJS)
+ endif
+ $(RANLIB) $@
+
+--- a/nss/coreconf/arch.mk 2019-03-31 23:38:34.374931416 +0300
++++ b/nss/coreconf/arch.mk 2019-03-31 23:38:44.667236102 +0300
+@@ -305,7 +305,7 @@
+ OBJDIR_NAME_COMPILER = $(COMPILER_TAG)
+ endif
+ OBJDIR_NAME_BASE = $(OS_TARGET)$(OS_RELEASE)$(CPU_TAG)$(OBJDIR_NAME_COMPILER)$(LIBC_TAG)$(IMPL_STRATEGY)$(OBJDIR_TAG)
+-OBJDIR_NAME = $(OBJDIR_NAME_BASE).OBJ
++OBJDIR_NAME = build_dir
+
+
+ ifeq (,$(filter-out WIN%,$(OS_TARGET)))
+--- a/nss/coreconf/Linux.mk 2019-04-01 10:08:59.129269177 +0300
++++ b/nss/coreconf/Linux.mk 2019-04-01 10:09:15.557782574 +0300
+@@ -139,6 +139,7 @@
+ DEFINES += -D_REENTRANT
+ endif
+
++ifndef USE_NATIVE
+ DSO_CFLAGS = -fPIC
+ DSO_LDOPTS = -shared $(ARCHFLAG) -Wl,--gc-sections
+ # The linker on Red Hat Linux 7.2 and RHEL 2.1 (GNU ld version 2.11.90.0.8)
+@@ -149,6 +150,7 @@
+ ZDEFS_FLAG = -Wl,-z,defs
+ DSO_LDOPTS += $(if $(findstring 2.11.90.0.8,$(shell ld -v)),,$(ZDEFS_FLAG))
+ LDFLAGS += $(ARCHFLAG) -z noexecstack
++endif
+
+ # On Maemo, we need to use the -rpath-link flag for even the standard system
+ # library directories.
+--- a/nss/coreconf/Linux.mk 2019-04-01 23:10:19.091912203 +0300
++++ b/nss/coreconf/Linux.mk 2019-04-06 14:07:13.499169075 +0300
+@@ -140,7 +140,7 @@
+ endif
+
+ ifndef USE_NATIVE
+-DSO_CFLAGS = -fPIC
++DSO_CFLAGS = $(fpic)
+ DSO_LDOPTS = -shared $(ARCHFLAG) -Wl,--gc-sections
+ # The linker on Red Hat Linux 7.2 and RHEL 2.1 (GNU ld version 2.11.90.0.8)
+ # incorrectly reports undefined references in the libraries we link with, so
+--- a/nss/coreconf/Linux.mk 2019-04-06 20:25:36.431663894 +0300
++++ b/nss/coreconf/Linux.mk 2019-04-06 20:26:23.397129525 +0300
+@@ -107,11 +107,6 @@
+ endif
+
+ ifdef BUILD_OPT
+-ifeq (11,$(ALLOW_OPT_CODE_SIZE)$(OPT_CODE_SIZE))
+- OPTIMIZER = -Os
+-else
+- OPTIMIZER = -O2
+-endif
+ ifdef MOZ_DEBUG_SYMBOLS
+ ifdef MOZ_DEBUG_FLAGS
+ OPTIMIZER += $(MOZ_DEBUG_FLAGS)
+--- a/nss/coreconf/UNIX.mk 2019-04-06 20:34:24.284157646 +0300
++++ b/nss/coreconf/UNIX.mk 2019-04-06 20:34:34.760485327 +0300
+@@ -10,7 +10,6 @@
+ LDOPTS += -L$(SOURCE_LIB_DIR)
+
+ ifdef BUILD_OPT
+- OPTIMIZER += -O
+ DEFINES += -UDEBUG -DNDEBUG
+ else
+ OPTIMIZER += -g
--- /dev/null
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=oniguruma
+PKG_VERSION:=6.9.2
+PKG_RELEASE:=1
+
+PKG_SOURCE:=onig-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/kkos/oniguruma/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=3b568a9050839e7828b2f2d5bc9cd3650979b6b54a080f54c515320dddda06b0
+
+PKG_MAINTAINER:=Eneas U de Queiroz <cote2004-github@yahoo.com.br>
+PKG_LICENSE:=BSD-2-Clause
+PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:oniguruma_project:oniguruma
+
+PKG_INSTALL:=1
+PKG_FIXUP:=autoreconf
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/oniguruma
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=Regular expression library for different character encodings
+ URL:=https://github.com/kkos/oniguruma
+ DEPENDS:=
+ ABI_VERSION:=5
+endef
+
+define Package/oniguruma/description
+ Oniguruma is a modern and flexible regular expressions library.
+ It encompasses features from different regular expression implementations that
+ traditionally exist in different languages.
+
+ Character encoding can be specified per regular expression object.
+endef
+
+define Package/oniguruma/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libonig.so.$(ABI_VERSION) $(1)/usr/lib/
+endef
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/{include,lib}
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
+ $(SED) 's,/usr,$(STAGING_DIR)/usr,g' $(1)/usr/lib/pkgconfig/oniguruma.pc
+endef
+
+$(eval $(call BuildPackage,oniguruma))
PKG_NAME:=opencv
PKG_VERSION:=3.1.0
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).zip
PKG_SOURCE_URL:=http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/$(PKG_VERSION)/
--- /dev/null
+--- a/3rdparty/ippicv/downloader.cmake
++++ b/3rdparty/ippicv/downloader.cmake
+@@ -64,7 +64,7 @@ function(_icv_downloader)
+ if(DEFINED ENV{OPENCV_ICV_URL})
+ set(OPENCV_ICV_URL $ENV{OPENCV_ICV_URL})
+ else()
+- set(OPENCV_ICV_URL "https://raw.githubusercontent.com/Itseez/opencv_3rdparty/${IPPICV_BINARIES_COMMIT}/ippicv")
++ set(OPENCV_ICV_URL "https://raw.githubusercontent.com/opencv/opencv_3rdparty/${IPPICV_BINARIES_COMMIT}/ippicv")
+ endif()
+ endif()
+
PKG_NAME:=openldap
PKG_VERSION:=2.4.47
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
PKG_SOURCE_URL:=https://gpl.savoirfairelinux.net/pub/mirrors/openldap/openldap-release/ \
PKG_CONFIG_DEPENDS := \
CONFIG_OPENLDAP_DEBUG \
+ CONFIG_OPENLDAP_CRYPT \
CONFIG_OPENLDAP_MONITOR \
CONFIG_OPENLDAP_DB47 \
CONFIG_OPENLDAP_ICU
help
Enable debugging information. This option must be enabled
for the loglevel directive to work.
+ config OPENLDAP_CRYPT
+ bool "Crypt(3) passwords support"
+ default n
+ help
+ With crypt(3) password storage scheme enabled, OpenLDAP can
+ receive and store SHA-256 and SHA-512 password hashes from
+ Samba AD-DC. If this option is disabled, synchronization of
+ passwords between Samba AD-DC (v4.5 and above) and OpenLDAP
+ requires use of cleartext passwords.
+ To enable crypt(3) password synchronization functionality:
+ 1. Re-include crypt(3) support in OpenWRT by enabling 'Include
+ crypt() support for SHA256, SHA512 and Blowfish ciphers' option
+ in "Advanced configuration options (for developers)" ->
+ "Toolchain Options".
+ 2. Provision AD-DC with 'password hash userPassword schemes'
+ option. For more information, see smb.conf manpage for details
+ on 'password hash userPassword schemes'.
+ 3. Use a script to synchronize passwords from AD-DC to
+ OpenLDAP. See samba-tool manpage for 'user syncpasswords'.
config OPENLDAP_MONITOR
bool "Enable monitor backend"
default n
--disable-relay
+ifdef CONFIG_OPENLDAP_CRYPT
+ CONFIGURE_ARGS+= --enable-crypt
+else
+ CONFIGURE_ARGS+= --disable-crypt
+endif
+
ifdef CONFIG_OPENLDAP_MONITOR
CONFIGURE_ARGS+= --enable-monitor
else
include $(TOPDIR)/rules.mk
PKG_NAME:=opus
-PKG_VERSION:=1.3
+PKG_VERSION:=1.3.1
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://archive.mozilla.org/pub/opus
-PKG_HASH:=4f3d69aefdf2dbaf9825408e452a8a414ffc60494c70633560700398820dc550
+PKG_HASH:=65b58e1e25b2a114157014736a3d9dfeaad8d41be1c8179866f144a2fb44ff9d
PKG_MAINTAINER:=Ted Hess <thess@kitchensync.net>, Ian Leonard <antonlacon@gmail.com>
PKG_LICENSE:=BSD-3-Clause
include $(TOPDIR)/rules.mk
PKG_NAME:=p11-kit
-PKG_VERSION:=0.23.14
-PKG_RELEASE:=1
-PKG_MAINTAINER:=Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
+PKG_VERSION:=0.23.16.1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=1cb9fa6d237539f25f62f4c3d4ec71a1c8e0772957ec45ec5af92134129e0d70
-PKG_SOURCE_URL:=https://github.com/p11-glue/$(PKG_NAME)/releases/download/$(PKG_VERSION)
+PKG_SOURCE_URL:=https://github.com/p11-glue/p11-kit/releases/download/$(PKG_VERSION)
+PKG_HASH:=4b34e92ae36fa493e0d94366c767f06d5f9951e3d8581d10fd935d738db1574d
+
+PKG_MAINTAINER:=Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=COPYING
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
way that they are discoverable.
endef
+TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
+
CONFIGURE_ARGS+= \
+ --disable-debug \
+ --disable-rpath \
+ --disable-trust-module \
--without-libffi \
- --disable-trust-module
+ --without-systemd
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/p11-kit-1/p11-kit/
--- /dev/null
+--- a/common/compat.c
++++ b/common/compat.c
+@@ -97,8 +97,12 @@
+ #include <unistd.h>
+
+ #if defined (HAVE_PROGRAM_INVOCATION_SHORT_NAME) && !HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
++#ifdef __UCLIBC__
++extern const char *program_invocation_short_name;
++#else
+ extern char *program_invocation_short_name;
+ #endif
++#endif
+
+ #if defined (HAVE___PROGNAME) && !HAVE_DECL___PROGNAME
+ extern char *__progname;
include $(TOPDIR)/rules.mk
PKG_NAME:=pcre
-PKG_VERSION:=8.42
-PKG_RELEASE:=2
+PKG_VERSION:=8.43
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=@SF/$(PKG_NAME)
-PKG_HASH:=2cd04b7c887808be030254e8d77de11d3fe9d4505c39d4b15d2664ffe8bf9301
+PKG_HASH:=91e762520003013834ac1adb4a938d53b22a216341c061b0cf05603b290faf6b
PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>
PKG_LICENSE:=BSD-3-Clause
SECTION:=libs
CATEGORY:=Libraries
URL:=https://www.pcre.org/
+ DEPENDS:=$(CXX_DEPENDS)
endef
define Package/libpcre
define Package/libpcrecpp
$(call Package/libpcre/default)
TITLE:=C++ wrapper for Perl Compatible Regular Expression library
- DEPENDS:=+libpcre $(CXX_DEPENDS)
+ DEPENDS:=+libpcre
endef
TARGET_CFLAGS += $(FPIC)
--enable-unicode-properties \
--enable-pcre16 \
--with-match-limit-recursion=16000 \
+ --enable-cpp
-ifneq ($(CONFIG_PACKAGE_libpcrecpp),)
- CONFIGURE_ARGS+= --enable-cpp
-else
- CONFIGURE_ARGS+= --disable-cpp
-endif
MAKE_FLAGS += \
CFLAGS="$(TARGET_CFLAGS)"
include $(TOPDIR)/rules.mk
PKG_NAME:=pixman
-PKG_VERSION:=0.36.0
+PKG_VERSION:=0.38.4
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=1ca19c8d4d37682adfbc42741d24977903fec1169b4153ec05bb690d4acf9fae
+PKG_HASH:=da66d6fd6e40aee70f7bd02e4f8f76fc3f006ec879d346bae6a723025cfbdde7
PKG_SOURCE_URL:=https://www.cairographics.org/releases
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=COPYING
PKG_NAME:=poco
PKG_VERSION:=1.9.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://pocoproject.org/releases/$(PKG_NAME)-$(PKG_VERSION)
CATEGORY:=Libraries
TITLE:=Poco C++ libraries
URL:=https://www.pocoproject.org/
- DEPENDS:=+libstdcpp +libpthread +librt
+ DEPENDS:=+libstdcpp +libpthread +librt @!arc
MAINTAINER:=Jean-Michel Julien <jean-michel.julien@trilliantinc.com>
endef
include $(TOPDIR)/rules.mk
PKG_NAME:=postgresql
-PKG_VERSION:=9.6.11
+PKG_VERSION:=11.3
PKG_RELEASE:=1
PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
PKG_LICENSE:=PostgreSQL
http://ftp.postgresql.org/pub/source/v$(PKG_VERSION) \
ftp://ftp.postgresql.org/pub/source/v$(PKG_VERSION)
-PKG_HASH:=38250adc69a1e8613fb926c894cda1d01031391a03648894b9a6e13ff354a530
+PKG_HASH:=2a85e082fc225944821dfd23990e32dfcd2284c19060864b0ad4ca537d30522d
PKG_USE_MIPS16:=0
PKG_FIXUP:=autoreconf
PKG_MACRO_PATHS:=config
-PKG_BUILD_DEPENDS += readline/host postgresql/host
+PKG_BUILD_DEPENDS:=postgresql/host
PKG_INSTALL:=1
include $(INCLUDE_DIR)/host-build.mk
pg_dump \
pg_dumpall \
pg_isready \
- pg_receivexlog \
pg_recvlogical \
- pg_resetxlog \
+ pg_resetwal \
pg_restore \
pg_standby \
pg_upgrade \
- pg_xlogdump \
postgres \
initdb
PGSQL_CLI_EXTRA_BIN := \
clusterdb \
createdb \
- createlang \
createuser \
dropdb \
- droplang \
dropuser \
pgbench \
reindexdb \
PGSQL_CONFIG_VARS:= \
pgac_cv_snprintf_long_long_int_format="%lld" \
- pgac_cv_snprintf_size_t_support=yes
+ pgac_cv_snprintf_size_t_support=yes \
+ USE_DEV_URANDOM=1 \
+ ZIC=zic
ifeq ($(CONFIG_USE_UCLIBC),y)
# PostgreSQL does not build against uClibc with locales
--without-python \
--without-readline \
--without-tcl \
+ --without-systemd \
--with-zlib="yes" \
--enable-depend
--without-perl \
--without-python \
--without-tcl \
+ --without-systemd \
--with-zlib="yes" \
--enable-depend \
$(if $(CONFIG_arc),--disable-spinlocks)
-# Need a native ecpg, pg_config and zic for build
+# Need a native zic and pg_config for build
define Host/Compile
- $(MAKE) -C $(HOST_BUILD_DIR)/src/bin/pg_config CC="$(HOSTCC)"
- $(MAKE) -C $(HOST_BUILD_DIR)/src/interfaces/ecpg/preproc CC="$(HOSTCC)"
- $(MAKE) -C $(HOST_BUILD_DIR)/src/timezone CC="$(HOSTCC)"
+ +$(HOST_MAKE_VARS) MAKELEVEL=0 $(MAKE) -C $(HOST_BUILD_DIR)/src/bin/pg_config CC="$(HOSTCC)"
+ +$(HOST_MAKE_VARS) MAKELEVEL=0 $(MAKE) -C $(HOST_BUILD_DIR)/src/timezone CC="$(HOSTCC)"
endef
define Host/Install
$(INSTALL_BIN) $(HOST_BUILD_DIR)/src/port/libpgport.a $(STAGING_DIR_HOSTPKG)/lib/
$(INSTALL_BIN) $(HOST_BUILD_DIR)/src/bin/pg_config/pg_config $(STAGING_DIR_HOSTPKG)/lib/
$(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/bin/
- $(INSTALL_BIN) $(HOST_BUILD_DIR)/src/interfaces/ecpg/preproc/ecpg $(STAGING_DIR_HOSTPKG)/bin/
$(INSTALL_BIN) $(HOST_BUILD_DIR)/src/timezone/zic $(STAGING_DIR_HOSTPKG)/bin/
endef
-define Build/Configure
- $(Build/Configure/Default)
- $(SED) 's@ECPG = ../../preproc/ecpg@ECPG = $(STAGING_DIR_HOSTPKG)/bin/ecpg@' $(PKG_BUILD_DIR)/src/interfaces/ecpg/test/Makefile.regress
+define Build/Compile
+ $(MAKE) -C $(PKG_BUILD_DIR) MAKELEVEL=0 all contrib
endef
# because PROFILE means something else in the project Makefile
+diff --git a/configure.in b/configure.in
+index 9082c5b..2c04edc 100644
--- a/configure.in
+++ b/configure.in
-@@ -25,7 +25,7 @@ recommended. You can remove the check f
- your responsibility whether the result works or not.])])
- AC_COPYRIGHT([Copyright (c) 1996-2016, PostgreSQL Global Development Group])
- AC_CONFIG_SRCDIR([src/backend/access/common/heaptuple.c])
--AC_CONFIG_AUX_DIR(config)
-+AC_CONFIG_AUX_DIR([config])
- AC_PREFIX_DEFAULT(/usr/local/pgsql)
- AC_SUBST(configure_args, [$ac_configure_args])
+@@ -2283,36 +2283,6 @@ if test "$with_python" = yes; then
+ CPPFLAGS=$ac_save_CPPFLAGS
+ fi
+-#
+-# Check for DocBook and tools
+-#
+-PGAC_PATH_XMLLINT
+-PGAC_CHECK_DOCBOOK(4.2)
+-PGAC_PATH_PROGS(DBTOEPUB, dbtoepub)
+-PGAC_PATH_PROGS(XSLTPROC, xsltproc)
+-PGAC_PATH_PROGS(FOP, fop)
+-
+-#
+-# Check for test tools
+-#
+-if test "$enable_tap_tests" = yes; then
+- # Check for necessary modules, unless user has specified the "prove" to use;
+- # in that case it's her responsibility to have a working configuration.
+- # (prove might be part of a different Perl installation than perl, eg on
+- # MSys, so the result of AX_PROG_PERL_MODULES could be irrelevant anyway.)
+- if test -z "$PROVE"; then
+- # Test::More and Time::HiRes are supposed to be part of core Perl,
+- # but some distros omit them in a minimal installation.
+- AX_PROG_PERL_MODULES([IPC::Run Test::More=0.87 Time::HiRes], ,
+- [AC_MSG_ERROR([Additional Perl modules are required to run TAP tests])])
+- fi
+- # Now make sure we know where prove is
+- PGAC_PATH_PROGS(PROVE, prove)
+- if test -z "$PROVE"; then
+- AC_MSG_ERROR([prove not found])
+- fi
+-fi
+-
+ # Thread testing
+
+ # We have to run the thread test near the end so we have all our symbols
include $(TOPDIR)/rules.mk
PKG_NAME:=libprotobuf-c
-PKG_VERSION:=1.3.1
+PKG_VERSION:=1.3.2
PKG_RELEASE:=1
PKG_SOURCE:=protobuf-c-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/protobuf-c/protobuf-c/releases/download/v$(PKG_VERSION)
-PKG_HASH:=51472d3a191d6d7b425e32b612e477c06f73fe23e07f6a6a839b11808e9d2267
+PKG_HASH:=53f251f14c597bdb087aecf0b63630f434d73f5a10fc1ac545073597535b9e74
PKG_BUILD_DIR:=$(BUILD_DIR)/protobuf-c-$(PKG_VERSION)
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/protobuf-c-$(PKG_VERSION)
PKG_MAINTAINER:=Rosen Penev <rosenp@gmail.com>
-PKG_LICENSE:=BSD-2c
+PKG_LICENSE:=BSD-2-Clause
+PKG_LICENSE_FILES:=LICENSE
PKG_BUILD_DEPENDS:=protobuf-c/host
HOST_BUILD_DEPENDS:=protobuf/host
include $(TOPDIR)/rules.mk
PKG_NAME:=protobuf
-PKG_VERSION:=3.5.1
+PKG_VERSION:=3.8.0
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-cpp-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/google/protobuf/releases/download/v$(PKG_VERSION)
-PKG_HASH:=c28dba8782da2cfea1e11c61d335958c31a9c1bc553063546af9cbe98f204092
+PKG_HASH:=ddc96d83f3b7417da53bce2510b94ad2796465ef8763f7a4e82089157efe97aa
+PKG_MAINTAINER:=Ken Keys <kkeys@caida.org>
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
PKG_BUILD_DEPENDS:=protobuf/host
-PKG_USE_MIPS16:=0# MIPS16 prevents protobuf's usage of the 'sync' asm-opcode
-
+PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
CATEGORY:=Libraries
TITLE:=A structured data encoding library
URL:=https://github.com/google/protobuf
- DEPENDS:=+zlib +libpthread +libstdcpp
- MAINTAINER:=Ken Keys <kkeys@caida.org>
+ DEPENDS:=+zlib +libpthread +libatomic +libstdcpp
endef
define Package/protobuf
PKG_NAME:=pthsem
PKG_VERSION:=2.0.8
-PKG_RELEASE:=5
-
-PKG_MAINTAINER:=Othmar Truniger <github@truniger.ch>
-PKG_LICENSE:=LGPL-2.1+
-PKG_LICENSE_FILES:=COPYING
+PKG_RELEASE:=6
PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.auto.tuwien.ac.at/~mkoegler/pth/
PKG_HASH:=4024cafdd5d4bce2b1778a6be5491222c3f6e7ef1e43971264c451c0012c5c01
+PKG_MAINTAINER:=Othmar Truniger <github@truniger.ch>
+PKG_LICENSE:=LGPL-2.1-or-later
+PKG_LICENSE_FILES:=COPYING
+
PKG_FIXUP:=autoreconf
PKG_BUILD_PARALLEL:=1
PKG_FORTIFY_SOURCE:=0
# The musl libc provides a proper implementation of sigaltstack() so
# prevent configure from wrongly assuming a broken Linux platform
-ifeq ($(CONFIG_USE_MUSL),y)
+ifneq ($(CONFIG_USE_GLIBC),y)
CONFIGURE_VARS += \
ac_cv_check_sjlj=ssjlj
endif
PKG_NAME:=quasselc
PKG_SOURCE_DATE:=2017-01-11
PKG_SOURCE_VERSION:=a0a1e6bd87d3eac68b5369972d1c2035cfe47e94
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_DATE).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/phhusson/QuasselC/tar.gz/$(PKG_SOURCE_VERSION)?
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/nls.mk
MAKE_FLAGS += prefix=$(STAGING_DIR)/usr libdir=$(STAGING_DIR)/usr/lib includedir=$(STAGING_DIR)/usr/include
MAKE_INSTALL_FLAGS += prefix=/usr libdir=/usr/lib includedir=/usr/include
--- /dev/null
+#
+# Copyright (C) 2006-2011 Openwrt.org
+# Copyright (C) 2011 SMBPhone Inc.
+# Copyright (C) 2019 Jeffery To
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=slang
+PKG_VERSION:=2.3.2
+PKG_RELEASE:=3
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=https://www.jedsoft.org/releases/slang \
+ https://www.jedsoft.org/releases/slang/old
+PKG_HASH:=fc9e3b0fc4f67c3c1f6d43c90c16a5c42d117b8e28457c5b46831b8b5d3ae31a
+
+PKG_LICENSE:=GPL-2.0+
+PKG_LICENSE_FILES:=COPYING
+PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
+
+PKG_BUILD_PARALLEL:=0
+
+SLANG_MODULES:= base64 chksum csv fcntl fork histogram iconv json onig pcre \
+ png rand select slsmg socket stats sysconf termios varray zlib
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/nls.mk
+
+define Package/libslang2/Default
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=S-Lang Programmer's Library
+ URL:=https://www.jedsoft.org/slang/
+endef
+
+define Package/libslang2/Default/description
+ Multi-platform programmer's library providing facilities for interactive
+ applications. Includes such things as display/screen management,
+ keyboard input, keymaps, etc. Includes the embeddable S-Lang interpreter.
+endef
+
+define Package/libslang2
+$(call Package/libslang2/Default)
+ DEPENDS:=+terminfo
+endef
+
+define Package/libslang2/description
+$(call Package/libslang2/Default/description)
+endef
+
+define Package/libslang2-modules
+$(call Package/libslang2/Default)
+ TITLE+= (all modules)
+ DEPENDS:=$(foreach mod,$(SLANG_MODULES),+libslang2-mod-$(mod))
+endef
+
+define Package/libslang2-modules/description
+$(call Package/libslang2/Default/description)
+
+ This installs all of S-Lang's bundled modules.
+endef
+
+define Package/libslang2-mod-iconv
+$(call Package/libslang2/Default)
+ TITLE+= (iconv module)
+ DEPENDS:=$(ICONV_DEPENDS)
+endef
+
+define Package/libslang2-mod-onig
+$(call Package/libslang2/Default)
+ TITLE+= (onig module)
+ DEPENDS:=+oniguruma
+endef
+
+define Package/libslang2-mod-pcre
+$(call Package/libslang2/Default)
+ TITLE+= (pcre module)
+ DEPENDS:=+libpcre
+endef
+
+define Package/libslang2-mod-png
+$(call Package/libslang2/Default)
+ TITLE+= (png module)
+ DEPENDS:=+libpng
+endef
+
+define Package/libslang2-mod-zlib
+$(call Package/libslang2/Default)
+ TITLE+= (zlib module)
+ DEPENDS:=+zlib
+endef
+
+define Package/slsh
+ SECTION:=lang
+ CATEGORY:=Languages
+ TITLE:=S-Lang shell
+ URL:=https://www.jedsoft.org/slang/slsh.html
+ DEPENDS:=+libslang2 +libslang2-modules
+endef
+
+define Package/slsh/description
+ This is a shell which is mostly just a wrapper around the S-Lang Interpreter,
+ which is part of the S-Lang Library.
+endef
+
+TARGET_CFLAGS+= $(FPIC)
+
+CONFIGURE_ARGS+= \
+ --enable-largefile \
+ --enable-warnings \
+ --with-terminfo=default \
+ --with-readline=slang \
+ --with-iconv="$(ICONV_PREFIX)" \
+ --with-onig="$(STAGING_DIR)/usr" \
+ --with-pcre="$(STAGING_DIR)/usr" \
+ --with-png="$(STAGING_DIR)/usr" \
+ --with-z="$(STAGING_DIR)/usr" \
+ --without-x
+
+define Build/Compile
+ $(call Build/Compile/Default,)
+ $(call Build/Compile/Default,static)
+endef
+
+# Default install last, so that the dynamic slsh is installed
+define Build/Install
+ $(call Build/Install/Default,install-static)
+ $(call Build/Install/Default,)
+endef
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/include
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
+
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libslang.{a,so*} $(1)/usr/lib/
+
+ $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/slang.pc $(1)/usr/lib/pkgconfig/
+endef
+
+define Package/libslang2/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libslang.so* $(1)/usr/lib/
+endef
+
+Package/libslang2-modules/install:=:
+
+define Package/slsh/install
+ $(INSTALL_DIR) $(1)/etc
+ $(CP) $(PKG_INSTALL_DIR)/etc/slsh.rc $(1)/etc/
+
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/slsh $(1)/usr/bin/
+
+ $(INSTALL_DIR) $(1)/usr/share
+ $(CP) $(PKG_INSTALL_DIR)/usr/share/slsh/ $(1)/usr/share/
+endef
+
+define BuildModule
+ ifndef Package/libslang2-mod-$(1)
+ define Package/libslang2-mod-$(1)
+ $$(call Package/libslang2/Default)
+ TITLE+= ($(1) module)
+ endef
+ endif
+
+ define Package/libslang2-mod-$(1)/description
+ $$(call Package/libslang2/Default/description)
+
+ This contains the $(1) module.
+ endef
+
+ define Package/libslang2-mod-$(1)/install
+ $$(INSTALL_DIR) $$(1)/usr/lib/slang/v2/modules
+ $$(CP) $$(PKG_INSTALL_DIR)/usr/lib/slang/v2/modules/$(1)-module.so $$(1)/usr/lib/slang/v2/modules/
+ endef
+
+ $$(eval $$(call BuildPackage,libslang2-mod-$(1)))
+endef
+
+$(foreach mod,$(SLANG_MODULES),$(eval $(call BuildModule,$(mod))))
+
+$(eval $(call BuildPackage,libslang2))
+$(eval $(call BuildPackage,libslang2-modules))
+$(eval $(call BuildPackage,slsh))
--- /dev/null
+--- a/configure
++++ b/configure
+@@ -7029,7 +7029,7 @@ TERMCAP=-ltermcap
+
+ for terminfo_dir in $JD_Terminfo_Dirs
+ do
+- if test -d $terminfo_dir
++ if true
+ then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ $as_echo "yes" >&6; }
--- /dev/null
+--- a/src/Makefile.in
++++ b/src/Makefile.in
+@@ -73,7 +73,7 @@ INSTALL_DATA = @INSTALL_DATA@
+ MKINSDIR = @CONFIG_DIR@/autoconf/mkinsdir.sh
+ RM = rm -f
+ RM_R = rm -rf
+-AR_CR = ar cr
++AR_CR = $(AR) cr
+ RMDIR = rmdir
+ LN = /bin/ln -sf
+ CP = cp
include $(TOPDIR)/rules.mk
PKG_NAME:=speexdsp
-PKG_VERSION:=1.2rc3
+PKG_VERSION:=1.2.0
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://downloads.us.xiph.org/releases/speex/
-PKG_HASH:=4ae688600039f5d224bdf2e222d2fbde65608447e4c2f681585e4dca6df692f1
+PKG_SOURCE_URL:=https://downloads.us.xiph.org/releases/speex/
+PKG_HASH:=682042fc6f9bee6294ec453f470dadc26c6ff29b9c9e9ad2ffc1f4312fd64771
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
help
Enable the session extension (default no).
-config SQLITE3_THREADSAFE
- bool "Thread-safe library"
- default y
- help
- Build a thread-safe library.
-
endmenu
include $(TOPDIR)/rules.mk
PKG_NAME:=sqlite
-PKG_VERSION:=3260000
-PKG_RELEASE:=3
+PKG_VERSION:=3270200
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-autoconf-$(PKG_VERSION).tar.gz
-PKG_HASH:=5daa6a3fb7d1e8c767cd59c4ded8da6e4b00c61d3b466d0685e35c4dd6d7bf5d
-PKG_SOURCE_URL:=https://www.sqlite.org/2018/
+PKG_HASH:=50c39e85ea28b5ecfdb3f9e860afe9ba606381e21836b2849efca6a0bfe6ef6e
+PKG_SOURCE_URL:=https://www.sqlite.org/2019/
PKG_LICENSE:=PUBLICDOMAIN
PKG_LICENSE_FILES:=
CONFIG_SQLITE3_LIBEDIT \
CONFIG_SQLITE3_READLINE \
CONFIG_SQLITE3_RTREE \
- CONFIG_SQLITE3_SESSION \
- CONFIG_SQLITE3_THREADSAFE
+ CONFIG_SQLITE3_SESSION
include $(INCLUDE_DIR)/package.mk
--disable-static-shell \
--enable-shared \
--enable-static \
+ --enable-threadsafe \
$(if $(CONFIG_SQLITE3_DYNAMIC_EXTENSIONS),--enable-dynamic-extensions,--disable-dynamic-extensions) \
$(if $(CONFIG_SQLITE3_FTS3),--enable-fts3,--disable-fts3) \
$(if $(CONFIG_SQLITE3_FTS3),--enable-fts4,--disable-fts4) \
$(if $(CONFIG_SQLITE3_FTS3),--enable-fts5,--disable-fts5) \
$(if $(CONFIG_SQLITE3_JSON1),--enable-json1,--disable-json1) \
$(if $(CONFIG_SQLITE3_RTREE),--enable-rtree,--disable-rtree) \
- $(if $(CONFIG_SQLITE3_SESSION),--enable-session,--disable-session) \
- $(if $(CONFIG_SQLITE3_THREADSAFE),--enable-threadsafe,--disable-threadsafe)
+ $(if $(CONFIG_SQLITE3_SESSION),--enable-session,--disable-session)
ifeq ($(CONFIG_SQLITE3_LIBEDIT),y)
CONFIGURE_ARGS+=--disable-readline
--- /dev/null
+--- a/sqlite3.c
++++ b/sqlite3.c
+@@ -13920,12 +13920,13 @@ typedef INT16_TYPE LogEst;
+ ** at run-time.
+ */
+ #ifndef SQLITE_BYTEORDER
+-# if defined(i386) || defined(__i386__) || defined(_M_IX86) || \
+- defined(__x86_64) || defined(__x86_64__) || defined(_M_X64) || \
+- defined(_M_AMD64) || defined(_M_ARM) || defined(__x86) || \
+- defined(__arm__) || defined(_M_ARM64)
++# if defined(i386) || defined(__i386__) || defined(_M_IX86) || \
++ defined(__x86_64) || defined(__x86_64__) || defined(_M_X64) || \
++ defined(_M_AMD64) || defined(_M_ARM) || defined(__x86) || \
++ defined(__ARMEL__) || defined(__AARCH64EL__) || defined(_M_ARM64)
+ # define SQLITE_BYTEORDER 1234
+-# elif defined(sparc) || defined(__ppc__)
++# elif defined(sparc) || defined(__ppc__) || \
++ defined(__ARMEB__) || defined(__AARCH64EB__)
+ # define SQLITE_BYTEORDER 4321
+ # else
+ # define SQLITE_BYTEORDER 0
PKG_NAME:=tcp_wrappers
PKG_VERSION:=7.6
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=ftp://ftp.porcupine.org/pub/security
MAINTAINER:=Peter Wagner <tripolar@gmx.at>
endef
-TARGET_CFLAGS += $(FPIC)
+TARGET_CFLAGS += $(FPIC) -Wall
ifeq ($(CONFIG_USE_MUSL),)
TARGET_EXTRA_LIBS:=LIBS=-lnsl
--- /dev/null
+diff -u tcp_wrappers_7.6.orig/clean_exit.c tcp_wrappers_7.6/clean_exit.c
+--- tcp_wrappers_7.6.orig/clean_exit.c 1994-12-29 03:42:20.000000000 +1100
++++ tcp_wrappers_7.6/clean_exit.c 2017-11-14 22:50:48.000000000 +1100
+@@ -9,10 +9,11 @@
+ */
+
+ #ifndef lint
+-static char sccsid[] = "@(#) clean_exit.c 1.4 94/12/28 17:42:19";
++static char sccsid[] __attribute__((__unused__)) = "@(#) clean_exit.c 1.4 94/12/28 17:42:19";
+ #endif
+
+ #include <stdio.h>
++#include <unistd.h>
+
+ extern void exit();
+
+diff -u tcp_wrappers_7.6.orig/diag.c tcp_wrappers_7.6/diag.c
+--- tcp_wrappers_7.6.orig/diag.c 1994-12-29 03:42:20.000000000 +1100
++++ tcp_wrappers_7.6/diag.c 2017-11-14 22:51:09.000000000 +1100
+@@ -10,7 +10,7 @@
+ */
+
+ #ifndef lint
+-static char sccsid[] = "@(#) diag.c 1.1 94/12/28 17:42:20";
++static char sccsid[] __attribute__((__unused__)) = "@(#) diag.c 1.1 94/12/28 17:42:20";
+ #endif
+
+ /* System libraries */
+diff -u tcp_wrappers_7.6.orig/eval.c tcp_wrappers_7.6/eval.c
+--- tcp_wrappers_7.6.orig/eval.c 1995-01-31 05:51:46.000000000 +1100
++++ tcp_wrappers_7.6/eval.c 2017-11-14 22:51:50.000000000 +1100
+@@ -19,7 +19,7 @@
+ */
+
+ #ifndef lint
+-static char sccsid[] = "@(#) eval.c 1.3 95/01/30 19:51:45";
++static char sccsid[] __attribute__((__unused__)) = "@(#) eval.c 1.3 95/01/30 19:51:45";
+ #endif
+
+ /* System libraries. */
+diff -u tcp_wrappers_7.6.orig/fakelog.c tcp_wrappers_7.6/fakelog.c
+--- tcp_wrappers_7.6.orig/fakelog.c 1994-12-29 03:42:22.000000000 +1100
++++ tcp_wrappers_7.6/fakelog.c 2017-11-14 22:52:07.000000000 +1100
+@@ -6,7 +6,7 @@
+ */
+
+ #ifndef lint
+-static char sccsid[] = "@(#) fakelog.c 1.3 94/12/28 17:42:21";
++static char sccsid[] __attribute__((__unused__)) = "@(#) fakelog.c 1.3 94/12/28 17:42:21";
+ #endif
+
+ #include <stdio.h>
+@@ -17,7 +17,7 @@
+
+ /* ARGSUSED */
+
+-openlog(name, logopt, facility)
++void openlog(name, logopt, facility)
+ char *name;
+ int logopt;
+ int facility;
+@@ -27,7 +27,7 @@
+
+ /* vsyslog - format one record */
+
+-vsyslog(severity, fmt, ap)
++void vsyslog(severity, fmt, ap)
+ int severity;
+ char *fmt;
+ va_list ap;
+@@ -43,7 +43,7 @@
+
+ /* VARARGS */
+
+-VARARGS(syslog, int, severity)
++void VARARGS(syslog, int, severity)
+ {
+ va_list ap;
+ char *fmt;
+@@ -56,7 +56,7 @@
+
+ /* closelog - dummy */
+
+-closelog()
++void closelog()
+ {
+ /* void */
+ }
+diff -u tcp_wrappers_7.6.orig/fix_options.c tcp_wrappers_7.6/fix_options.c
+--- tcp_wrappers_7.6.orig/fix_options.c 2017-11-13 09:29:08.000000000 +1100
++++ tcp_wrappers_7.6/fix_options.c 2017-11-14 22:52:22.000000000 +1100
+@@ -6,7 +6,7 @@
+ */
+
+ #ifndef lint
+-static char sccsid[] = "@(#) fix_options.c 1.6 97/04/08 02:29:19";
++static char sccsid[] __attribute__((__unused__)) = "@(#) fix_options.c 1.6 97/04/08 02:29:19";
+ #endif
+
+ #include <sys/types.h>
+@@ -29,14 +29,14 @@
+
+ /* fix_options - get rid of IP-level socket options */
+
+-fix_options(request)
+-struct request_info *request;
++void fix_options(request)
++struct request_info *request;
+ {
+ #ifdef IP_OPTIONS
+ unsigned char optbuf[BUFFER_SIZE / 3], *cp;
+ char lbuf[BUFFER_SIZE], *lp;
+ #if !defined(__GLIBC__)
+- int optsize = sizeof(optbuf), ipproto;
++ unsigned int optsize = sizeof(optbuf), ipproto;
+ #else /* __GLIBC__ */
+ size_t optsize = sizeof(optbuf);
+ int ipproto;
+diff -u tcp_wrappers_7.6.orig/fromhost.c tcp_wrappers_7.6/fromhost.c
+--- tcp_wrappers_7.6.orig/fromhost.c 1994-12-29 03:42:24.000000000 +1100
++++ tcp_wrappers_7.6/fromhost.c 2017-11-14 22:52:33.000000000 +1100
+@@ -11,7 +11,7 @@
+ */
+
+ #ifndef lint
+-static char sccsid[] = "@(#) fromhost.c 1.17 94/12/28 17:42:23";
++static char sccsid[] __attribute__((__unused__)) = "@(#) fromhost.c 1.17 94/12/28 17:42:23";
+ #endif
+
+ #if defined(TLI) || defined(PTX) || defined(TLI_SEQUENT)
+diff -u tcp_wrappers_7.6.orig/hosts_access.c tcp_wrappers_7.6/hosts_access.c
+--- tcp_wrappers_7.6.orig/hosts_access.c 2017-11-13 09:29:25.000000000 +1100
++++ tcp_wrappers_7.6/hosts_access.c 2017-11-14 22:52:48.000000000 +1100
+@@ -18,7 +18,7 @@
+ */
+
+ #ifndef lint
+-static char sccsid[] = "@(#) hosts_access.c 1.21 97/02/12 02:13:22";
++static char sccsid[] __attribute__((__unused__)) = "@(#) hosts_access.c 1.21 97/02/12 02:13:22";
+ #endif
+
+ /* System libraries. */
+diff -u tcp_wrappers_7.6.orig/hosts_ctl.c tcp_wrappers_7.6/hosts_ctl.c
+--- tcp_wrappers_7.6.orig/hosts_ctl.c 1994-12-29 03:42:28.000000000 +1100
++++ tcp_wrappers_7.6/hosts_ctl.c 2017-11-14 22:53:01.000000000 +1100
+@@ -12,7 +12,7 @@
+ */
+
+ #ifndef lint
+-static char sccsid[] = "@(#) hosts_ctl.c 1.4 94/12/28 17:42:27";
++static char sccsid[] __attribute__((__unused__)) = "@(#) hosts_ctl.c 1.4 94/12/28 17:42:27";
+ #endif
+
+ #include <stdio.h>
+diff -u tcp_wrappers_7.6.orig/inetcf.c tcp_wrappers_7.6/inetcf.c
+--- tcp_wrappers_7.6.orig/inetcf.c 1997-02-12 12:13:24.000000000 +1100
++++ tcp_wrappers_7.6/inetcf.c 2017-11-14 22:53:11.000000000 +1100
+@@ -6,7 +6,7 @@
+ */
+
+ #ifndef lint
+-static char sccsid[] = "@(#) inetcf.c 1.7 97/02/12 02:13:23";
++static char sccsid[] __attribute__((__unused__)) = "@(#) inetcf.c 1.7 97/02/12 02:13:23";
+ #endif
+
+ #include <sys/types.h>
+@@ -14,6 +14,7 @@
+ #include <stdio.h>
+ #include <errno.h>
+ #include <string.h>
++#include <stdlib.h>
+
+ extern int errno;
+ extern void exit();
+@@ -21,6 +22,8 @@
+ #include "tcpd.h"
+ #include "inetcf.h"
+
++extern int check_path(char *, struct stat *);
++
+ /*
+ * Network configuration files may live in unusual places. Here are some
+ * guesses. Shorter names follow longer ones.
+diff -u tcp_wrappers_7.6.orig/misc.c tcp_wrappers_7.6/misc.c
+--- tcp_wrappers_7.6.orig/misc.c 2017-11-13 09:29:25.000000000 +1100
++++ tcp_wrappers_7.6/misc.c 2017-11-14 22:53:23.000000000 +1100
+@@ -5,7 +5,7 @@
+ */
+
+ #ifndef lint
+-static char sccsic[] = "@(#) misc.c 1.2 96/02/11 17:01:29";
++static char sccsid[] __attribute__((__unused__)) = "@(#) misc.c 1.2 96/02/11 17:01:29";
+ #endif
+
+ #include <sys/types.h>
+diff -u tcp_wrappers_7.6.orig/myvsyslog.c tcp_wrappers_7.6/myvsyslog.c
+--- tcp_wrappers_7.6.orig/myvsyslog.c 1994-12-29 03:42:34.000000000 +1100
++++ tcp_wrappers_7.6/myvsyslog.c 2017-11-14 22:53:35.000000000 +1100
+@@ -8,7 +8,7 @@
+ */
+
+ #ifndef lint
+-static char sccsid[] = "@(#) myvsyslog.c 1.1 94/12/28 17:42:33";
++static char sccsid[] __attribute__((__unused__)) = "@(#) myvsyslog.c 1.1 94/12/28 17:42:33";
+ #endif
+
+ #ifdef vsyslog
+diff -u tcp_wrappers_7.6.orig/options.c tcp_wrappers_7.6/options.c
+--- tcp_wrappers_7.6.orig/options.c 2017-11-13 09:29:08.000000000 +1100
++++ tcp_wrappers_7.6/options.c 2017-11-14 22:53:50.000000000 +1100
+@@ -29,7 +29,7 @@
+ */
+
+ #ifndef lint
+-static char sccsid[] = "@(#) options.c 1.17 96/02/11 17:01:31";
++static char sccsid[] __attribute__((__unused__)) = "@(#) options.c 1.17 96/02/11 17:01:31";
+ #endif
+
+ /* System libraries. */
+@@ -47,6 +47,8 @@
+ #include <ctype.h>
+ #include <setjmp.h>
+ #include <string.h>
++#include <stdlib.h>
++#include <unistd.h>
+
+ #ifndef MAXPATHNAMELEN
+ #define MAXPATHNAMELEN BUFSIZ
+@@ -108,21 +110,21 @@
+ /* List of known keywords. Add yours here. */
+
+ static struct option option_table[] = {
+- "user", user_option, NEED_ARG,
+- "group", group_option, NEED_ARG,
+- "umask", umask_option, NEED_ARG,
+- "linger", linger_option, NEED_ARG,
+- "keepalive", keepalive_option, 0,
+- "spawn", spawn_option, NEED_ARG | EXPAND_ARG,
+- "twist", twist_option, NEED_ARG | EXPAND_ARG | USE_LAST,
+- "rfc931", rfc931_option, OPT_ARG,
+- "setenv", setenv_option, NEED_ARG | EXPAND_ARG,
+- "nice", nice_option, OPT_ARG,
+- "severity", severity_option, NEED_ARG,
+- "allow", allow_option, USE_LAST,
+- "deny", deny_option, USE_LAST,
+- "banners", banners_option, NEED_ARG,
+- 0,
++ { "user", user_option, NEED_ARG },
++ { "group", group_option, NEED_ARG },
++ { "umask", umask_option, NEED_ARG },
++ { "linger", linger_option, NEED_ARG },
++ { "keepalive", keepalive_option, 0 },
++ { "spawn", spawn_option, NEED_ARG | EXPAND_ARG },
++ { "twist", twist_option, NEED_ARG | EXPAND_ARG | USE_LAST },
++ { "rfc931", rfc931_option, OPT_ARG },
++ { "setenv", setenv_option, NEED_ARG | EXPAND_ARG },
++ { "nice", nice_option, OPT_ARG },
++ { "severity", severity_option, NEED_ARG },
++ { "allow", allow_option, USE_LAST },
++ { "deny", deny_option, USE_LAST },
++ { "banners", banners_option, NEED_ARG },
++ { 0 },
+ };
+
+ /* process_options - process access control options */
+@@ -447,88 +449,88 @@
+
+ static struct syslog_names log_fac[] = {
+ #ifdef LOG_KERN
+- "kern", LOG_KERN,
++ { "kern", LOG_KERN },
+ #endif
+ #ifdef LOG_USER
+- "user", LOG_USER,
++ { "user", LOG_USER },
+ #endif
+ #ifdef LOG_MAIL
+- "mail", LOG_MAIL,
++ { "mail", LOG_MAIL },
+ #endif
+ #ifdef LOG_DAEMON
+- "daemon", LOG_DAEMON,
++ { "daemon", LOG_DAEMON },
+ #endif
+ #ifdef LOG_AUTH
+- "auth", LOG_AUTH,
++ { "auth", LOG_AUTH },
+ #endif
+ #ifdef LOG_LPR
+- "lpr", LOG_LPR,
++ { "lpr", LOG_LPR },
+ #endif
+ #ifdef LOG_NEWS
+- "news", LOG_NEWS,
++ { "news", LOG_NEWS },
+ #endif
+ #ifdef LOG_UUCP
+- "uucp", LOG_UUCP,
++ { "uucp", LOG_UUCP },
+ #endif
+ #ifdef LOG_CRON
+- "cron", LOG_CRON,
++ { "cron", LOG_CRON },
+ #endif
+ #ifdef LOG_FTP
+- "ftp", LOG_FTP,
++ { "ftp", LOG_FTP },
+ #endif
+ #ifdef LOG_LOCAL0
+- "local0", LOG_LOCAL0,
++ { "local0", LOG_LOCAL0 },
+ #endif
+ #ifdef LOG_LOCAL1
+- "local1", LOG_LOCAL1,
++ { "local1", LOG_LOCAL1 },
+ #endif
+ #ifdef LOG_LOCAL2
+- "local2", LOG_LOCAL2,
++ { "local2", LOG_LOCAL2 },
+ #endif
+ #ifdef LOG_LOCAL3
+- "local3", LOG_LOCAL3,
++ { "local3", LOG_LOCAL3 },
+ #endif
+ #ifdef LOG_LOCAL4
+- "local4", LOG_LOCAL4,
++ { "local4", LOG_LOCAL4 },
+ #endif
+ #ifdef LOG_LOCAL5
+- "local5", LOG_LOCAL5,
++ { "local5", LOG_LOCAL5 },
+ #endif
+ #ifdef LOG_LOCAL6
+- "local6", LOG_LOCAL6,
++ { "local6", LOG_LOCAL6 },
+ #endif
+ #ifdef LOG_LOCAL7
+- "local7", LOG_LOCAL7,
++ { "local7", LOG_LOCAL7 },
+ #endif
+- 0,
++ { 0 },
+ };
+
+ static struct syslog_names log_sev[] = {
+ #ifdef LOG_EMERG
+- "emerg", LOG_EMERG,
++ { "emerg", LOG_EMERG },
+ #endif
+ #ifdef LOG_ALERT
+- "alert", LOG_ALERT,
++ { "alert", LOG_ALERT },
+ #endif
+ #ifdef LOG_CRIT
+- "crit", LOG_CRIT,
++ { "crit", LOG_CRIT },
+ #endif
+ #ifdef LOG_ERR
+- "err", LOG_ERR,
++ { "err", LOG_ERR },
+ #endif
+ #ifdef LOG_WARNING
+- "warning", LOG_WARNING,
++ { "warning", LOG_WARNING },
+ #endif
+ #ifdef LOG_NOTICE
+- "notice", LOG_NOTICE,
++ { "notice", LOG_NOTICE },
+ #endif
+ #ifdef LOG_INFO
+- "info", LOG_INFO,
++ { "info", LOG_INFO },
+ #endif
+ #ifdef LOG_DEBUG
+- "debug", LOG_DEBUG,
++ { "debug", LOG_DEBUG },
+ #endif
+- 0,
++ { 0 },
+ };
+
+ /* severity_map - lookup facility or severity value */
+@@ -589,7 +591,7 @@
+ if (src[0] == 0)
+ return (0);
+
+- while (ch = *src) {
++ while ((ch = *src)) {
+ if (ch == ':') {
+ if (*++src == 0)
+ tcpd_warn("rule ends in \":\"");
+diff -u tcp_wrappers_7.6.orig/patchlevel.h tcp_wrappers_7.6/patchlevel.h
+--- tcp_wrappers_7.6.orig/patchlevel.h 1997-03-22 05:27:24.000000000 +1100
++++ tcp_wrappers_7.6/patchlevel.h 2017-11-14 22:54:15.000000000 +1100
+@@ -1,3 +1,3 @@
+ #ifndef lint
+-static char patchlevel[] = "@(#) patchlevel 7.6 97/03/21 19:27:23";
++static char patchlevel[] __attribute__((__unused__)) = "@(#) patchlevel 7.6 97/03/21 19:27:23";
+ #endif
+diff -u tcp_wrappers_7.6.orig/percent_m.c tcp_wrappers_7.6/percent_m.c
+--- tcp_wrappers_7.6.orig/percent_m.c 2017-11-13 09:29:08.000000000 +1100
++++ tcp_wrappers_7.6/percent_m.c 2017-11-14 22:54:31.000000000 +1100
+@@ -5,7 +5,7 @@
+ */
+
+ #ifndef lint
+-static char sccsid[] = "@(#) percent_m.c 1.1 94/12/28 17:42:37";
++static char sccsid[] __attribute__((__unused__)) = "@(#) percent_m.c 1.1 94/12/28 17:42:37";
+ #endif
+
+ #include <stdio.h>
+@@ -27,7 +27,7 @@
+ char *bp = obuf;
+ char *cp = ibuf;
+
+- while (*bp = *cp)
++ while ((*bp = *cp))
+ if (*cp == '%' && cp[1] == 'm') {
+ #ifdef HAVE_STRERROR
+ strcpy(bp, strerror(errno));
+diff -u tcp_wrappers_7.6.orig/percent_x.c tcp_wrappers_7.6/percent_x.c
+--- tcp_wrappers_7.6.orig/percent_x.c 1994-12-29 03:42:38.000000000 +1100
++++ tcp_wrappers_7.6/percent_x.c 2017-11-14 22:54:40.000000000 +1100
+@@ -11,7 +11,7 @@
+ */
+
+ #ifndef lint
+-static char sccsid[] = "@(#) percent_x.c 1.4 94/12/28 17:42:37";
++static char sccsid[] __attribute__((__unused__)) = "@(#) percent_x.c 1.4 94/12/28 17:42:37";
+ #endif
+
+ /* System libraries. */
+@@ -19,6 +19,7 @@
+ #include <stdio.h>
+ #include <syslog.h>
+ #include <string.h>
++#include <unistd.h>
+
+ extern void exit();
+
+diff -u tcp_wrappers_7.6.orig/refuse.c tcp_wrappers_7.6/refuse.c
+--- tcp_wrappers_7.6.orig/refuse.c 1994-12-29 03:42:40.000000000 +1100
++++ tcp_wrappers_7.6/refuse.c 2017-11-14 22:54:50.000000000 +1100
+@@ -8,7 +8,7 @@
+ */
+
+ #ifndef lint
+-static char sccsid[] = "@(#) refuse.c 1.5 94/12/28 17:42:39";
++static char sccsid[] __attribute__((__unused__)) = "@(#) refuse.c 1.5 94/12/28 17:42:39";
+ #endif
+
+ /* System libraries. */
+diff -u tcp_wrappers_7.6.orig/rfc931.c tcp_wrappers_7.6/rfc931.c
+--- tcp_wrappers_7.6.orig/rfc931.c 2017-11-13 09:29:08.000000000 +1100
++++ tcp_wrappers_7.6/rfc931.c 2017-11-14 22:54:58.000000000 +1100
+@@ -10,7 +10,7 @@
+ */
+
+ #ifndef lint
+-static char sccsid[] = "@(#) rfc931.c 1.10 95/01/02 16:11:34";
++static char sccsid[] __attribute__((__unused__)) = "@(#) rfc931.c 1.10 95/01/02 16:11:34";
+ #endif
+
+ /* System libraries. */
+@@ -23,6 +23,7 @@
+ #include <setjmp.h>
+ #include <signal.h>
+ #include <string.h>
++#include <unistd.h>
+
+ /* Local stuff. */
+
+@@ -152,7 +153,7 @@
+ * protocol, not part of the data.
+ */
+
+- if (cp = strchr(user, '\r'))
++ if ((cp = strchr(user, '\r')))
+ *cp = 0;
+ result = user;
+ }
+diff -u tcp_wrappers_7.6.orig/safe_finger.c tcp_wrappers_7.6/safe_finger.c
+--- tcp_wrappers_7.6.orig/safe_finger.c 2017-11-13 09:29:08.000000000 +1100
++++ tcp_wrappers_7.6/safe_finger.c 2017-11-14 22:55:08.000000000 +1100
+@@ -15,7 +15,7 @@
+ */
+
+ #ifndef lint
+-static char sccsid[] = "@(#) safe_finger.c 1.4 94/12/28 17:42:41";
++static char sccsid[] __attribute__((__unused__)) = "@(#) safe_finger.c 1.4 94/12/28 17:42:41";
+ #endif
+
+ /* System libraries */
+@@ -27,6 +27,10 @@
+ #include <ctype.h>
+ #include <pwd.h>
+ #include <syslog.h>
++#include <fcntl.h>
++#include <stdlib.h>
++#include <sys/wait.h>
++#include <unistd.h>
+
+ extern void exit();
+
+@@ -45,6 +49,8 @@
+ int allow_severity = SEVERITY;
+ int deny_severity = LOG_WARNING;
+
++int pipe_stdin();
++
+ void cleanup(sig)
+ int sig;
+ {
+@@ -52,7 +58,7 @@
+ exit(0);
+ }
+
+-main(argc, argv)
++int main(argc, argv)
+ int argc;
+ char **argv;
+ {
+diff -u tcp_wrappers_7.6.orig/scaffold.c tcp_wrappers_7.6/scaffold.c
+--- tcp_wrappers_7.6.orig/scaffold.c 2017-11-13 09:29:21.000000000 +1100
++++ tcp_wrappers_7.6/scaffold.c 2017-11-14 22:55:32.000000000 +1100
+@@ -5,7 +5,7 @@
+ */
+
+ #ifndef lint
+-static char sccs_id[] = "@(#) scaffold.c 1.6 97/03/21 19:27:24";
++static char sccsid[] __attribute__((__unused__)) = "@(#) scaffold.c 1.6 97/03/21 19:27:24";
+ #endif
+
+ /* System libraries. */
+diff -u tcp_wrappers_7.6.orig/shell_cmd.c tcp_wrappers_7.6/shell_cmd.c
+--- tcp_wrappers_7.6.orig/shell_cmd.c 1994-12-29 03:42:44.000000000 +1100
++++ tcp_wrappers_7.6/shell_cmd.c 2017-11-14 22:55:45.000000000 +1100
+@@ -9,7 +9,7 @@
+ */
+
+ #ifndef lint
+-static char sccsid[] = "@(#) shell_cmd.c 1.5 94/12/28 17:42:44";
++static char sccsid[] __attribute__((__unused__)) = "@(#) shell_cmd.c 1.5 94/12/28 17:42:44";
+ #endif
+
+ /* System libraries. */
+@@ -20,6 +20,9 @@
+ #include <stdio.h>
+ #include <syslog.h>
+ #include <string.h>
++#include <fcntl.h>
++#include <sys/wait.h>
++#include <unistd.h>
+
+ extern void exit();
+
+diff -u tcp_wrappers_7.6.orig/socket.c tcp_wrappers_7.6/socket.c
+--- tcp_wrappers_7.6.orig/socket.c 2017-11-13 09:29:08.000000000 +1100
++++ tcp_wrappers_7.6/socket.c 2017-11-14 22:55:57.000000000 +1100
+@@ -16,7 +16,7 @@
+ */
+
+ #ifndef lint
+-static char sccsid[] = "@(#) socket.c 1.15 97/03/21 19:27:24";
++static char sccsid[] __attribute__((__unused__)) = "@(#) socket.c 1.15 97/03/21 19:27:24";
+ #endif
+
+ /* System libraries. */
+@@ -77,7 +77,7 @@
+ static struct sockaddr_in client;
+ static struct sockaddr_in server;
+ #if !defined (__GLIBC__)
+- int len;
++ unsigned int len;
+ #else /* __GLIBC__ */
+ size_t len;
+ #endif /* __GLIBC__ */
+@@ -229,7 +229,7 @@
+ char buf[BUFSIZ];
+ struct sockaddr_in sin;
+ #if !defined(__GLIBC__)
+- int size = sizeof(sin);
++ unsigned int size = sizeof(sin);
+ #else /* __GLIBC__ */
+ size_t size = sizeof(sin);
+ #endif /* __GLIBC__ */
+diff -u tcp_wrappers_7.6.orig/tcpd.c tcp_wrappers_7.6/tcpd.c
+--- tcp_wrappers_7.6.orig/tcpd.c 1996-02-12 03:01:33.000000000 +1100
++++ tcp_wrappers_7.6/tcpd.c 2017-11-14 22:56:09.000000000 +1100
+@@ -11,7 +11,7 @@
+ */
+
+ #ifndef lint
+-static char sccsid[] = "@(#) tcpd.c 1.10 96/02/11 17:01:32";
++static char sccsid[] __attribute__((__unused__)) = "@(#) tcpd.c 1.10 96/02/11 17:01:32";
+ #endif
+
+ /* System libraries. */
+@@ -24,6 +24,7 @@
+ #include <stdio.h>
+ #include <syslog.h>
+ #include <string.h>
++#include <unistd.h>
+
+ #ifndef MAXPATHNAMELEN
+ #define MAXPATHNAMELEN BUFSIZ
+@@ -38,10 +39,12 @@
+ #include "patchlevel.h"
+ #include "tcpd.h"
+
++extern void fix_options(struct request_info *);
++
+ int allow_severity = SEVERITY; /* run-time adjustable */
+ int deny_severity = LOG_WARNING; /* ditto */
+
+-main(argc, argv)
++int main(argc, argv)
+ int argc;
+ char **argv;
+ {
+diff -u tcp_wrappers_7.6.orig/tcpd.h tcp_wrappers_7.6/tcpd.h
+--- tcp_wrappers_7.6.orig/tcpd.h 2017-11-13 09:29:25.000000000 +1100
++++ tcp_wrappers_7.6/tcpd.h 2017-11-14 22:36:40.000000000 +1100
+@@ -182,10 +182,10 @@
+
+ #ifdef __STDC__
+ extern void tcpd_warn(char *, ...); /* report problem and proceed */
+-extern void tcpd_jump(char *, ...); /* report problem and jump */
++extern void tcpd_jump(char *, ...) __attribute__((__noreturn__)); /* report problem and jump */
+ #else
+ extern void tcpd_warn();
+-extern void tcpd_jump();
++extern void tcpd_jump() __attribute__((__noreturn__));
+ #endif
+
+ struct tcpd_context {
+diff -u tcp_wrappers_7.6.orig/tcpdchk.c tcp_wrappers_7.6/tcpdchk.c
+--- tcp_wrappers_7.6.orig/tcpdchk.c 2017-11-13 09:29:08.000000000 +1100
++++ tcp_wrappers_7.6/tcpdchk.c 2017-11-14 22:56:21.000000000 +1100
+@@ -15,7 +15,7 @@
+ */
+
+ #ifndef lint
+-static char sccsid[] = "@(#) tcpdchk.c 1.8 97/02/12 02:13:25";
++static char sccsid[] __attribute__((__unused__)) = "@(#) tcpdchk.c 1.8 97/02/12 02:13:25";
+ #endif
+
+ /* System libraries. */
+@@ -30,6 +30,7 @@
+ #include <errno.h>
+ #include <netdb.h>
+ #include <string.h>
++#include <unistd.h>
+
+ extern int errno;
+ extern void exit();
+@@ -199,13 +200,15 @@
+ char sv_list[BUFLEN]; /* becomes list of daemons */
+ char *cl_list; /* becomes list of requests */
+ char *sh_cmd; /* becomes optional shell command */
++#ifndef PROCESS_OPTIONS
+ char buf[BUFSIZ];
++#endif
+ int verdict;
+ struct tcpd_context saved_context;
+
+ saved_context = tcpd_context; /* stupid compilers */
+
+- if (fp = fopen(table, "r")) {
++ if ((fp = fopen(table, "r"))) {
+ tcpd_context.file = table;
+ tcpd_context.line = 0;
+ while (xgets(sv_list, sizeof(sv_list), fp)) {
+@@ -331,7 +334,7 @@
+ clients = 0;
+ } else {
+ clients++;
+- if (host = split_at(cp + 1, '@')) { /* user@host */
++ if ((host = split_at(cp + 1, '@'))) { /* user@host */
+ check_user(cp);
+ check_host(host);
+ } else {
+@@ -446,7 +449,7 @@
+ } else if (errno != ENOENT) {
+ tcpd_warn("open %s: %m", pat);
+ }
+- } else if (mask = split_at(pat, '/')) { /* network/netmask */
++ } else if ((mask = split_at(pat, '/'))) { /* network/netmask */
+ if (dot_quad_addr(pat) == INADDR_NONE
+ || dot_quad_addr(mask) == INADDR_NONE)
+ tcpd_warn("%s/%s: bad net/mask pattern", pat, mask);
+diff -u tcp_wrappers_7.6.orig/tcpdmatch.c tcp_wrappers_7.6/tcpdmatch.c
+--- tcp_wrappers_7.6.orig/tcpdmatch.c 1996-02-12 03:01:36.000000000 +1100
++++ tcp_wrappers_7.6/tcpdmatch.c 2017-11-14 22:56:40.000000000 +1100
+@@ -14,7 +14,7 @@
+ */
+
+ #ifndef lint
+-static char sccsid[] = "@(#) tcpdmatch.c 1.5 96/02/11 17:01:36";
++static char sccsid[] __attribute__((__unused__)) = "@(#) tcpdmatch.c 1.5 96/02/11 17:01:36";
+ #endif
+
+ /* System libraries. */
+@@ -29,6 +29,8 @@
+ #include <syslog.h>
+ #include <setjmp.h>
+ #include <string.h>
++#include <stdlib.h>
++#include <unistd.h>
+
+ extern void exit();
+ extern int optind;
+diff -u tcp_wrappers_7.6.orig/tli.c tcp_wrappers_7.6/tli.c
+--- tcp_wrappers_7.6.orig/tli.c 1997-03-22 05:27:26.000000000 +1100
++++ tcp_wrappers_7.6/tli.c 2017-11-14 22:56:50.000000000 +1100
+@@ -15,7 +15,7 @@
+ */
+
+ #ifndef lint
+-static char sccsid[] = "@(#) tli.c 1.15 97/03/21 19:27:25";
++static char sccsid[] __attribute__((__unused__)) = "@(#) tli.c 1.15 97/03/21 19:27:25";
+ #endif
+
+ #ifdef TLI
+diff -u tcp_wrappers_7.6.orig/try-from.c tcp_wrappers_7.6/try-from.c
+--- tcp_wrappers_7.6.orig/try-from.c 1994-12-29 03:42:55.000000000 +1100
++++ tcp_wrappers_7.6/try-from.c 2017-11-14 22:56:59.000000000 +1100
+@@ -11,7 +11,7 @@
+ */
+
+ #ifndef lint
+-static char sccsid[] = "@(#) try-from.c 1.2 94/12/28 17:42:55";
++static char sccsid[] __attribute__((__unused__)) = "@(#) try-from.c 1.2 94/12/28 17:42:55";
+ #endif
+
+ /* System libraries. */
+@@ -37,7 +37,7 @@
+ int allow_severity = SEVERITY; /* run-time adjustable */
+ int deny_severity = LOG_WARNING; /* ditto */
+
+-main(argc, argv)
++int main(argc, argv)
+ int argc;
+ char **argv;
+ {
+diff -u tcp_wrappers_7.6.orig/update.c tcp_wrappers_7.6/update.c
+--- tcp_wrappers_7.6.orig/update.c 1994-12-29 03:42:56.000000000 +1100
++++ tcp_wrappers_7.6/update.c 2017-11-14 22:57:09.000000000 +1100
+@@ -14,7 +14,7 @@
+ */
+
+ #ifndef lint
+-static char sccsid[] = "@(#) update.c 1.1 94/12/28 17:42:56";
++static char sccsid[] __attribute__((__unused__)) = "@(#) update.c 1.1 94/12/28 17:42:56";
+ #endif
+
+ /* System libraries */
+@@ -22,6 +22,7 @@
+ #include <stdio.h>
+ #include <syslog.h>
+ #include <string.h>
++#include <unistd.h>
+
+ /* Local stuff. */
+
PKG_NAME:=tiff
PKG_VERSION:=4.0.10
-PKG_RELEASE:=2
+PKG_RELEASE:=4
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://download.osgeo.org/libtiff
endef
define Build/InstallDev
- $(INSTALL_DIR) $(1)/usr/{lib,include}
+ $(INSTALL_DIR) $(1)/usr/{lib,include} $(1)/usr/lib/pkgconfig
$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib* $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc $(1)/usr/lib/pkgconfig/
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
$(if $(CONFIG_PACKAGE_libtiffxx), $(call Build/InstallDev/hxx,$(1)))
endef
--- /dev/null
+From 802d3cbf3043be5dce5317e140ccb1c17a6a2d39 Mon Sep 17 00:00:00 2001
+From: Thomas Bernard <miniupnp@free.fr>
+Date: Tue, 29 Jan 2019 11:21:47 +0100
+Subject: [PATCH] TIFFWriteDirectoryTagTransferfunction() : fix NULL
+ dereferencing
+
+http://bugzilla.maptools.org/show_bug.cgi?id=2833
+
+we must check the pointer is not NULL before memcmp() the memory
+---
+ libtiff/tif_dirwrite.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/libtiff/tif_dirwrite.c b/libtiff/tif_dirwrite.c
+index c15a28db..ef30c869 100644
+--- a/libtiff/tif_dirwrite.c
++++ b/libtiff/tif_dirwrite.c
+@@ -1893,12 +1893,14 @@ TIFFWriteDirectoryTagTransferfunction(TIFF* tif, uint32* ndir, TIFFDirEntry* dir
+ n=3;
+ if (n==3)
+ {
+- if (!_TIFFmemcmp(tif->tif_dir.td_transferfunction[0],tif->tif_dir.td_transferfunction[2],m*sizeof(uint16)))
++ if (tif->tif_dir.td_transferfunction[2] == NULL ||
++ !_TIFFmemcmp(tif->tif_dir.td_transferfunction[0],tif->tif_dir.td_transferfunction[2],m*sizeof(uint16)))
+ n=2;
+ }
+ if (n==2)
+ {
+- if (!_TIFFmemcmp(tif->tif_dir.td_transferfunction[0],tif->tif_dir.td_transferfunction[1],m*sizeof(uint16)))
++ if (tif->tif_dir.td_transferfunction[1] == NULL ||
++ !_TIFFmemcmp(tif->tif_dir.td_transferfunction[0],tif->tif_dir.td_transferfunction[1],m*sizeof(uint16)))
+ n=1;
+ }
+ if (n==0)
+--
+2.18.1
+
--- /dev/null
+From 0c74a9f49b8d7a36b17b54a7428b3526d20f88a8 Mon Sep 17 00:00:00 2001
+From: Scott Gayou <github.scott@gmail.com>
+Date: Wed, 23 Jan 2019 15:03:53 -0500
+Subject: [PATCH] Fix for simple memory leak that was assigned CVE-2019-6128.
+
+pal2rgb failed to free memory on a few errors. This was reported
+here: http://bugzilla.maptools.org/show_bug.cgi?id=2836.
+---
+ tools/pal2rgb.c | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/tools/pal2rgb.c b/tools/pal2rgb.c
+index 01d8502e..9492f1cf 100644
+--- a/tools/pal2rgb.c
++++ b/tools/pal2rgb.c
+@@ -118,12 +118,14 @@ main(int argc, char* argv[])
+ shortv != PHOTOMETRIC_PALETTE) {
+ fprintf(stderr, "%s: Expecting a palette image.\n",
+ argv[optind]);
++ (void) TIFFClose(in);
+ return (-1);
+ }
+ if (!TIFFGetField(in, TIFFTAG_COLORMAP, &rmap, &gmap, &bmap)) {
+ fprintf(stderr,
+ "%s: No colormap (not a valid palette image).\n",
+ argv[optind]);
++ (void) TIFFClose(in);
+ return (-1);
+ }
+ bitspersample = 0;
+@@ -131,11 +133,14 @@ main(int argc, char* argv[])
+ if (bitspersample != 8) {
+ fprintf(stderr, "%s: Sorry, can only handle 8-bit images.\n",
+ argv[optind]);
++ (void) TIFFClose(in);
+ return (-1);
+ }
+ out = TIFFOpen(argv[optind+1], "w");
+- if (out == NULL)
++ if (out == NULL) {
++ (void) TIFFClose(in);
+ return (-2);
++ }
+ cpTags(in, out);
+ TIFFGetField(in, TIFFTAG_IMAGEWIDTH, &imagewidth);
+ TIFFGetField(in, TIFFTAG_IMAGELENGTH, &imagelength);
+--
+2.18.1
+
PKG_NAME:=vips
PKG_VERSION:=8.7.4
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/libvips/libvips/releases/download/v$(PKG_VERSION)
--- /dev/null
+Description: Make the build reproducible
+Author: Chris Lamb <lamby@debian.org>
+Reviewed-By: Laszlo Boszormenyi (GCS) <gcs@debian.org>
+Last-Update: 2018-07-24
+
+--- vips-8.6.4.orig/configure.ac
++++ vips-8.6.4/configure.ac
+@@ -26,7 +26,11 @@ VIPS_MAJOR_VERSION=vips_major_version()
+ VIPS_MINOR_VERSION=vips_minor_version()
+ VIPS_MICRO_VERSION=vips_micro_version()
+ VIPS_VERSION=vips_version()
+-VIPS_VERSION_STRING=$VIPS_VERSION-`date -u -r ChangeLog`
++if test "x$SOURCE_DATE_EPOCH" = "x"; then
++ VIPS_VERSION_STRING=$VIPS_VERSION-`date -u -r ChangeLog`
++else
++ VIPS_VERSION_STRING=$VIPS_VERSION-`LC_ALL=C date --utc --date="@$SOURCE_DATE_EPOCH"`
++fi
+
+ # libtool library versioning ... not user-visible (except as part of the
+ # library file name) and does not correspond to major/minor/micro above
include $(TOPDIR)/rules.mk
PKG_NAME:=yaml
-PKG_VERSION:=0.2.1
+PKG_VERSION:=0.2.2
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://pyyaml.org/download/libyaml/
-PKG_HASH:=78281145641a080fb32d6e7a87b9c0664d611dcb4d542e90baf731f51cbb59cd
+PKG_HASH:=4a9100ab61047fd9bd395bcef3ce5403365cafd55c1e0d0299cde14958e47be9
+PKG_MAINTAINER:=
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=COPYING
-PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org>
-PKG_FIXUP:=autoreconf
-PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
--- /dev/null
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=yubico-pam
+PKG_VERSION:=2.26
+PKG_RELEASE:=1
+
+PKG_SOURCE:=pam_yubico-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://developers.yubico.com/yubico-pam/Releases
+PKG_HASH:=2de96495963fefd72b98243952ca5d5ec513e702c596e54bc667ef6b5e252966
+PKG_MAINTAINER:=Stuart B. Wilkins <stuwilkins@mac.com>
+PKG_BUILD_DEPENDS:=ykclient ykpers libyubikey libpam curl
+PKG_LICENSE_FILES:=COPYING
+PKG_LICENSE:=BSD-2-Clause
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/pam_yubico-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/yubico-pam
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=The Yuibco PAM module
+ URL:=https://developers.yubico.com/yubico-pam/
+ DEPENDS:=+ykclient +ykpers +libyubikey +libpam +curl
+endef
+
+define Package/yubico-pam/description
+ The Yubico PAM module provides an easy way to integrate the YubiKey
+ into your existing user authentication infrastructure.
+endef
+
+CONFIGURE_VARS += YKPERS_CFLAGS=-I$(STAGING_DIR)/usr/include \
+ YKPERS_LIBS=-L$(STAGING_DIR)/usr/lib \
+ LDFLAGS="-Wl,-rpath-link,$(STAGING_DIR)/usr/lib \
+ -L$(STAGING_DIR)/usr/lib"
+
+CONFIGURE_ARGS += --without-ldap \
+ --enable-shared \
+ --disable-static \
+
+define Build/Compile
+ $(call Build/Compile/Default, \
+ LDFLAGS="-L$(STAGING_DIR)/usr/lib -lykpers-1")
+endef
+
+define Package/yubico-pam/install
+ $(INSTALL_DIR) $(1)/lib/security
+ $(CP) $(PKG_BUILD_DIR)/.libs/pam_yubico.so* $(1)/lib/security
+endef
+
+$(eval $(call BuildPackage,yubico-pam,+ykclient,+ykpers,+libyubikey))
PKG_NAME:=zeromq
PKG_VERSION:=4.1.6
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_MAINTAINER:=Dirk Chang <dirk@kooiot.com>
PKG_LICENSE:=GPL-3.0+
PKG_LICENSE_FILES:=LICENCE.txt
--- a/src/metadata.hpp
+++ b/src/metadata.hpp
-@@ -41,7 +41,7 @@ namespace zmq
+@@ -41,7 +41,11 @@ namespace zmq
{
public:
-- typedef std::map <std::string, const std::string> dict_t;
++#ifdef __UCLIBCXX_MAJOR__
+ typedef std::map <std::string, std::string> dict_t;
++#else
+ typedef std::map <std::string, const std::string> dict_t;
++#endif
metadata_t (const dict_t &dict);
virtual ~metadata_t ();
--- a/src/stream_engine.cpp
+++ b/src/stream_engine.cpp
-@@ -208,7 +208,7 @@ void zmq::stream_engine_t::plug (io_thread_t *io_thread_,
+@@ -208,7 +208,11 @@ void zmq::stream_engine_t::plug (io_thread_t *io_thread_,
// Compile metadata.
typedef metadata_t::dict_t properties_t;
properties_t properties;
-- properties.insert(std::make_pair("Peer-Address", peer_address));
++#ifdef __UCLIBCXX_MAJOR__
+ properties.insert(std::make_pair<std::string, std::string>("Peer-Address", peer_address));
++#else
+ properties.insert(std::make_pair("Peer-Address", peer_address));
++#endif
zmq_assert (metadata == NULL);
metadata = new (std::nothrow) metadata_t (properties);
}
-@@ -815,7 +815,7 @@ void zmq::stream_engine_t::mechanism_ready ()
+@@ -815,7 +815,11 @@ void zmq::stream_engine_t::mechanism_ready ()
// If we have a peer_address, add it to metadata
if (!peer_address.empty()) {
-- properties.insert(std::make_pair("Peer-Address", peer_address));
++#ifdef __UCLIBCXX_MAJOR__
+ properties.insert(std::make_pair<std::string, std::string>("Peer-Address", peer_address));
++#else
+ properties.insert(std::make_pair("Peer-Address", peer_address));
++#endif
}
// Add ZAP properties.
+++ /dev/null
---- a/src/mtrie.cpp
-+++ b/src/mtrie.cpp
-@@ -27,11 +27,11 @@
- along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
--#include <stdlib.h>
--
- #include <new>
- #include <algorithm>
-
-+#include <stdlib.h>
-+
- #include "platform.hpp"
- #if defined ZMQ_HAVE_WINDOWS
- #include "windows.hpp"
---- a/src/raw_encoder.cpp
-+++ b/src/raw_encoder.cpp
-@@ -27,6 +27,11 @@
- along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-+#include <basic_definitions>
-+#include <exception>
-+#include <cstddef>
-+#include <algorithm>
-+
- #include "encoder.hpp"
- #include "raw_encoder.hpp"
- #include "likely.hpp"
---- a/src/trie.cpp
-+++ b/src/trie.cpp
-@@ -27,11 +27,11 @@
- along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
--#include <stdlib.h>
--
- #include <new>
- #include <algorithm>
-
-+#include <stdlib.h>
-+
- #include "platform.hpp"
- #if defined ZMQ_HAVE_WINDOWS
- #include "windows.hpp"
---- a/src/encoder.hpp
-+++ b/src/encoder.hpp
-@@ -39,7 +39,6 @@
- #include <stddef.h>
- #include <string.h>
- #include <stdlib.h>
--#include <algorithm>
-
- #include "err.hpp"
- #include "msg.hpp"
---- a/src/v1_encoder.cpp
-+++ b/src/v1_encoder.cpp
-@@ -27,6 +27,11 @@
- along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-+#include <basic_definitions>
-+#include <exception>
-+#include <cstddef>
-+#include <algorithm>
-+
- #include "encoder.hpp"
- #include "v1_encoder.hpp"
- #include "likely.hpp"
---- a/src/v2_encoder.cpp
-+++ b/src/v2_encoder.cpp
-@@ -27,6 +27,11 @@
- along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-+#include <basic_definitions>
-+#include <exception>
-+#include <cstddef>
-+#include <algorithm>
-+
- #include "v2_protocol.hpp"
- #include "v2_encoder.hpp"
- #include "likely.hpp"
PKG_NAME:=bogofilter
PKG_VERSION:=1.2.4
-PKG_RELEASE:=4
+PKG_RELEASE:=5
PKG_LICENSE:=GPLv2
PKG_LICENSE_FILES:=COPYING
--with-libdb-prefix=$(STAGING_DIR) \
--with-included-gsl
+define Package/bogofilter/conffiles
+/etc/bogofilter.cf
+endef
+
define Package/bogofilter/install
$(INSTALL_DIR) $(1)/etc/ \
$(1)/usr/bin \
include $(TOPDIR)/rules.mk
PKG_NAME:=dovecot
-PKG_VERSION:=2.3.4.1
+PKG_VERSION:=2.3.6
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://www.dovecot.org/releases/2.3
-PKG_HASH:=b8873e2ce5c33e58963bb7a8d2ff8427c09dbfdd63e13a0b0f4502864043aa07
-PKG_LICENSE:=LGPL-2.1 MIT BSD-3-Clause Unique
+PKG_HASH:=ed1d8dc1beeae9c6c73deac73a62ef19fe9262fbffd86604a3f690452f5536c7
+PKG_LICENSE:=LGPL-2.1-only MIT BSD-3-Clause
PKG_LICENSE_FILES:=COPYING COPYING.LGPL COPYING.MIT
PKG_MAINTAINER:=Lucian Cristian <lucian.cristian@gmail.com>
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
# iconv is needed when compiling with MySQL support. iconv will also be used by
--without-lzma \
--without-lz4 \
--without-sodium \
+ --without-docs \
$(if $(CONFIG_DOVECOT_GSSAPI),--with-gssapi=yes,--with-gssapi=no) \
$(if $(CONFIG_DOVECOT_LDAP),--with-ldap=yes,--with-ldap=no) \
$(if $(CONFIG_DOVECOT_MYSQL),--with-mysql=yes,--with-mysql=no) \
lib_cv_va_copy=yes \
lib_cv_va_copy=yes \
lib_cv___va_copy=yes \
- lib_cv_va_val_copy=yes
+ lib_cv_va_val_copy=yes \
+ ac_cv_prog_KRB5CONFIG="krb5-config"
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib
define Package/dovecot/install
$(INSTALL_DIR) $(1)/etc/init.d \
$(1)/etc/dovecot \
- $(1)/usr/share/doc/dovecot \
$(1)/usr/lib/dovecot \
$(1)/usr/libexec/dovecot \
$(1)/usr/bin \
$(1)/usr/sbin
- $(CP) $(PKG_INSTALL_DIR)/etc/dovecot/* $(1)/etc/dovecot/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/dovecot/* $(1)/usr/lib/dovecot/
$(CP) $(PKG_INSTALL_DIR)/usr/libexec/dovecot/* $(1)/usr/libexec/dovecot/
- $(CP) $(PKG_INSTALL_DIR)/usr/share/doc/dovecot/example-config $(1)/usr/share/doc/dovecot/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/doveconf $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/
$(INSTALL_BIN) ./files/dovecot.init $(1)/etc/init.d/dovecot
-diff --git a/src/lib-dcrypt/dcrypt-openssl.c b/src/lib-dcrypt/dcrypt-openssl.c
-index c2dbd30..201ab40 100644
--- a/src/lib-dcrypt/dcrypt-openssl.c
+++ b/src/lib-dcrypt/dcrypt-openssl.c
@@ -20,6 +20,7 @@
#include "dcrypt.h"
#include "dcrypt-private.h"
-diff --git a/src/lib-ssl-iostream/iostream-openssl-context.c b/src/lib-ssl-iostream/iostream-openssl-context.c
-index e3c902e..ad6a9c1 100644
+--- a/src/lib-ssl-iostream/dovecot-openssl-common.c
++++ b/src/lib-ssl-iostream/dovecot-openssl-common.c
+@@ -63,9 +63,11 @@ void dovecot_openssl_common_global_ref(void)
+ /*i_warning("CRYPTO_set_mem_functions() was called too late");*/
+ }
+
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ SSL_library_init();
+ SSL_load_error_strings();
+ OpenSSL_add_all_algorithms();
++#endif
+ }
+
+ bool dovecot_openssl_common_global_unref(void)
+@@ -79,6 +81,7 @@ bool dovecot_openssl_common_global_unref(void)
+ ENGINE_finish(dovecot_openssl_engine);
+ dovecot_openssl_engine = NULL;
+ }
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ /* OBJ_cleanup() is called automatically by EVP_cleanup() in
+ newer versions. Doesn't hurt to call it anyway. */
+ OBJ_cleanup();
+@@ -100,6 +103,7 @@ bool dovecot_openssl_common_global_unref(void)
+ ERR_free_strings();
+ #ifdef HAVE_OPENSSL_CLEANUP
+ OPENSSL_cleanup();
++#endif
+ #endif
+ return FALSE;
+ }
--- a/src/lib-ssl-iostream/iostream-openssl-context.c
+++ b/src/lib-ssl-iostream/iostream-openssl-context.c
@@ -6,6 +6,9 @@
#include <openssl/x509.h>
#include <openssl/pem.h>
#include <openssl/ssl.h>
+@@ -510,8 +513,10 @@ ssl_proxy_ctx_set_crypto_params(SSL_CTX *ssl_ctx,
+ int nid;
+ const char *curve_name;
+ #endif
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ if (SSL_CTX_need_tmp_RSA(ssl_ctx) != 0)
+ SSL_CTX_set_tmp_rsa_callback(ssl_ctx, ssl_gen_rsa_key);
++#endif
+ if (set->dh == NULL || *set->dh == '\0')
+ SSL_CTX_set_tmp_dh_callback(ssl_ctx, ssl_tmp_dh_callback);
+ #ifdef HAVE_ECDH
#ifdef HAVE_SSL_NEW_MEM_FUNCS
static void *dovecot_openssl_malloc(size_t size, const char *u0 ATTR_UNUSED, int u1 ATTR_UNUSED)
-@@ -75,17 +78,21 @@ bool dovecot_openssl_common_global_unref(void)
+@@ -77,10 +80,12 @@ bool dovecot_openssl_common_global_unref(void)
if (--openssl_init_refcount > 0)
return TRUE;
dovecot_openssl_engine = NULL;
}
+#endif
+ #if OPENSSL_VERSION_NUMBER < 0x10100000L
/* OBJ_cleanup() is called automatically by EVP_cleanup() in
newer versions. Doesn't hurt to call it anyway. */
- OBJ_cleanup();
+@@ -88,7 +93,9 @@ bool dovecot_openssl_common_global_unref(void)
#ifdef HAVE_SSL_COMP_FREE_COMPRESSION_METHODS
SSL_COMP_free_compression_methods();
#endif
EVP_cleanup();
CRYPTO_cleanup_all_ex_data();
#ifdef HAVE_OPENSSL_AUTO_THREAD_DEINIT
-@@ -107,6 +114,7 @@ bool dovecot_openssl_common_global_unref(void)
+@@ -111,6 +118,7 @@ bool dovecot_openssl_common_global_unref(void)
int dovecot_openssl_common_global_set_engine(const char *engine,
const char **error_r)
{
if (dovecot_openssl_engine != NULL)
return 1;
-@@ -128,5 +136,6 @@ int dovecot_openssl_common_global_set_engine(const char *engine,
+@@ -132,5 +140,6 @@ int dovecot_openssl_common_global_set_engine(const char *engine,
dovecot_openssl_engine = NULL;
return -1;
}
include $(TOPDIR)/rules.mk
PKG_NAME:=fdm
-PKG_VERSION:=1.9
-PKG_RELEASE:=4
-PKG_LICENSE:=BSD-2-Clause
+PKG_VERSION:=2.0
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/nicm/fdm/releases/download/$(PKG_VERSION)
-PKG_HASH:=16416c38a9a7e32d187220cc5ae61a51463d5e4e47419c5c513f422523d39914
+PKG_HASH:=06b28cb6b792570bc61d7e29b13d2af46b92fea77e058b2b17e11e8f7ed0cea4
-PKG_FIXUP:=autoreconf
+PKG_MAINTAINER:=Dmitry V. Zimin <pfzim@mail.ru>
+PKG_LICENSE:=BSD-2-Clause
+PKG_FIXUP:=autoreconf
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
CATEGORY:=Mail
TITLE:=fetch mail and deliver
URL:=https://github.com/nicm/fdm
- MAINTAINER:=Dmitry V. Zimin <pfzim@mail.ru>
MENU:=1
DEPENDS:=+tdb +zlib +libopenssl +FDM_WITH_PCRE:libpcre
USERID:=_fdm=99:_fdm=99
endef
ifdef CONFIG_FDM_WITH_PCRE
- EXTRA_CFLAGS := -DPCRE
- EXTRA_LDFLAGS += -lpcre
+ CONFIGURE_ARGS += --enable-pcre
endif
-MAKE_FLAGS += \
- PREFIX="/usr" \
- $(if $(CONFIG_FDM_WITH_PCRE),PCRE=1)
-
define Package/fdm/config
source "$(SOURCE)/Config.in"
endef
+++ /dev/null
-From eb7461e4ceab14020b3a129d826e4ee86f9da8c6 Mon Sep 17 00:00:00 2001
-From: Nicholas Marriott <nicholas.marriott@gmail.com>
-Date: Tue, 26 Jun 2018 12:19:25 +0100
-Subject: [PATCH] Compat fixes from Rosen Penev.
-
----
- Makefile.am | 6 +
- compat/base64.c | 317 ++++++++++++++++++++++++++++++++++++++++++++++++
- fdm.h | 18 +++
- 3 files changed, 343 insertions(+), 2 deletions(-)
- create mode 100644 compat/base64.c
-
-diff --git a/Makefile.am b/Makefile.am
-index a4ebbf3..fb25d33 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -110,6 +110,9 @@ dist_fdm_SOURCES = \
- lex.c
-
- nodist_fdm_SOURCES =
-+if NO_B64_NTOP
-+nodist_fdm_SOURCES += compat/base64.c
-+endif
- if NO_STRLCAT
- nodist_fdm_SOURCES += compat/strlcat.c
- endif
-diff --git a/compat/base64.c b/compat/base64.c
-new file mode 100644
-index 0000000..4e44d6a
---- /dev/null
-+++ b/compat/base64.c
-@@ -0,0 +1,317 @@
-+/* $OpenBSD: base64.c,v 1.8 2015/01/16 16:48:51 deraadt Exp $ */
-+
-+/*
-+ * Copyright (c) 1996 by Internet Software Consortium.
-+ *
-+ * Permission to use, copy, modify, and distribute this software for any
-+ * purpose with or without fee is hereby granted, provided that the above
-+ * copyright notice and this permission notice appear in all copies.
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
-+ * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
-+ * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
-+ * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
-+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
-+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
-+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-+ * SOFTWARE.
-+ */
-+
-+/*
-+ * Portions Copyright (c) 1995 by International Business Machines, Inc.
-+ *
-+ * International Business Machines, Inc. (hereinafter called IBM) grants
-+ * permission under its copyrights to use, copy, modify, and distribute this
-+ * Software with or without fee, provided that the above copyright notice and
-+ * all paragraphs of this notice appear in all copies, and that the name of IBM
-+ * not be used in connection with the marketing of any product incorporating
-+ * the Software or modifications thereof, without specific, written prior
-+ * permission.
-+ *
-+ * To the extent it has a right to do so, IBM grants an immunity from suit
-+ * under its patents, if any, for the use, sale or manufacture of products to
-+ * the extent that such products are used for performing Domain Name System
-+ * dynamic updates in TCP/IP networks by means of the Software. No immunity is
-+ * granted for any product per se or for any other function of any product.
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES,
-+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-+ * PARTICULAR PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL,
-+ * DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING
-+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN
-+ * IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES.
-+ */
-+
-+#include <sys/types.h>
-+#include <sys/socket.h>
-+#include <netinet/in.h>
-+#include <arpa/inet.h>
-+#include <arpa/nameser.h>
-+
-+#include <ctype.h>
-+#include <resolv.h>
-+#include <stdio.h>
-+
-+#include <stdlib.h>
-+#include <string.h>
-+
-+#include "fdm.h"
-+
-+static const char Base64[] =
-+ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
-+static const char Pad64 = '=';
-+
-+/* (From RFC1521 and draft-ietf-dnssec-secext-03.txt)
-+ The following encoding technique is taken from RFC 1521 by Borenstein
-+ and Freed. It is reproduced here in a slightly edited form for
-+ convenience.
-+
-+ A 65-character subset of US-ASCII is used, enabling 6 bits to be
-+ represented per printable character. (The extra 65th character, "=",
-+ is used to signify a special processing function.)
-+
-+ The encoding process represents 24-bit groups of input bits as output
-+ strings of 4 encoded characters. Proceeding from left to right, a
-+ 24-bit input group is formed by concatenating 3 8-bit input groups.
-+ These 24 bits are then treated as 4 concatenated 6-bit groups, each
-+ of which is translated into a single digit in the base64 alphabet.
-+
-+ Each 6-bit group is used as an index into an array of 64 printable
-+ characters. The character referenced by the index is placed in the
-+ output string.
-+
-+ Table 1: The Base64 Alphabet
-+
-+ Value Encoding Value Encoding Value Encoding Value Encoding
-+ 0 A 17 R 34 i 51 z
-+ 1 B 18 S 35 j 52 0
-+ 2 C 19 T 36 k 53 1
-+ 3 D 20 U 37 l 54 2
-+ 4 E 21 V 38 m 55 3
-+ 5 F 22 W 39 n 56 4
-+ 6 G 23 X 40 o 57 5
-+ 7 H 24 Y 41 p 58 6
-+ 8 I 25 Z 42 q 59 7
-+ 9 J 26 a 43 r 60 8
-+ 10 K 27 b 44 s 61 9
-+ 11 L 28 c 45 t 62 +
-+ 12 M 29 d 46 u 63 /
-+ 13 N 30 e 47 v
-+ 14 O 31 f 48 w (pad) =
-+ 15 P 32 g 49 x
-+ 16 Q 33 h 50 y
-+
-+ Special processing is performed if fewer than 24 bits are available
-+ at the end of the data being encoded. A full encoding quantum is
-+ always completed at the end of a quantity. When fewer than 24 input
-+ bits are available in an input group, zero bits are added (on the
-+ right) to form an integral number of 6-bit groups. Padding at the
-+ end of the data is performed using the '=' character.
-+
-+ Since all base64 input is an integral number of octets, only the
-+ -------------------------------------------------
-+ following cases can arise:
-+
-+ (1) the final quantum of encoding input is an integral
-+ multiple of 24 bits; here, the final unit of encoded
-+ output will be an integral multiple of 4 characters
-+ with no "=" padding,
-+ (2) the final quantum of encoding input is exactly 8 bits;
-+ here, the final unit of encoded output will be two
-+ characters followed by two "=" padding characters, or
-+ (3) the final quantum of encoding input is exactly 16 bits;
-+ here, the final unit of encoded output will be three
-+ characters followed by one "=" padding character.
-+ */
-+
-+int
-+b64_ntop(src, srclength, target, targsize)
-+ u_char const *src;
-+ size_t srclength;
-+ char *target;
-+ size_t targsize;
-+{
-+ size_t datalength = 0;
-+ u_char input[3];
-+ u_char output[4];
-+ int i;
-+
-+ while (2 < srclength) {
-+ input[0] = *src++;
-+ input[1] = *src++;
-+ input[2] = *src++;
-+ srclength -= 3;
-+
-+ output[0] = input[0] >> 2;
-+ output[1] = ((input[0] & 0x03) << 4) + (input[1] >> 4);
-+ output[2] = ((input[1] & 0x0f) << 2) + (input[2] >> 6);
-+ output[3] = input[2] & 0x3f;
-+
-+ if (datalength + 4 > targsize)
-+ return (-1);
-+ target[datalength++] = Base64[output[0]];
-+ target[datalength++] = Base64[output[1]];
-+ target[datalength++] = Base64[output[2]];
-+ target[datalength++] = Base64[output[3]];
-+ }
-+
-+ /* Now we worry about padding. */
-+ if (0 != srclength) {
-+ /* Get what's left. */
-+ input[0] = input[1] = input[2] = '\0';
-+ for (i = 0; i < srclength; i++)
-+ input[i] = *src++;
-+
-+ output[0] = input[0] >> 2;
-+ output[1] = ((input[0] & 0x03) << 4) + (input[1] >> 4);
-+ output[2] = ((input[1] & 0x0f) << 2) + (input[2] >> 6);
-+
-+ if (datalength + 4 > targsize)
-+ return (-1);
-+ target[datalength++] = Base64[output[0]];
-+ target[datalength++] = Base64[output[1]];
-+ if (srclength == 1)
-+ target[datalength++] = Pad64;
-+ else
-+ target[datalength++] = Base64[output[2]];
-+ target[datalength++] = Pad64;
-+ }
-+ if (datalength >= targsize)
-+ return (-1);
-+ target[datalength] = '\0'; /* Returned value doesn't count \0. */
-+ return (datalength);
-+}
-+
-+/* skips all whitespace anywhere.
-+ converts characters, four at a time, starting at (or after)
-+ src from base - 64 numbers into three 8 bit bytes in the target area.
-+ it returns the number of data bytes stored at the target, or -1 on error.
-+ */
-+
-+int
-+b64_pton(src, target, targsize)
-+ char const *src;
-+ u_char *target;
-+ size_t targsize;
-+{
-+ int tarindex, state, ch;
-+ u_char nextbyte;
-+ char *pos;
-+
-+ state = 0;
-+ tarindex = 0;
-+
-+ while ((ch = (unsigned char)*src++) != '\0') {
-+ if (isspace(ch)) /* Skip whitespace anywhere. */
-+ continue;
-+
-+ if (ch == Pad64)
-+ break;
-+
-+ pos = strchr(Base64, ch);
-+ if (pos == 0) /* A non-base64 character. */
-+ return (-1);
-+
-+ switch (state) {
-+ case 0:
-+ if (target) {
-+ if (tarindex >= targsize)
-+ return (-1);
-+ target[tarindex] = (pos - Base64) << 2;
-+ }
-+ state = 1;
-+ break;
-+ case 1:
-+ if (target) {
-+ if (tarindex >= targsize)
-+ return (-1);
-+ target[tarindex] |= (pos - Base64) >> 4;
-+ nextbyte = ((pos - Base64) & 0x0f) << 4;
-+ if (tarindex + 1 < targsize)
-+ target[tarindex+1] = nextbyte;
-+ else if (nextbyte)
-+ return (-1);
-+ }
-+ tarindex++;
-+ state = 2;
-+ break;
-+ case 2:
-+ if (target) {
-+ if (tarindex >= targsize)
-+ return (-1);
-+ target[tarindex] |= (pos - Base64) >> 2;
-+ nextbyte = ((pos - Base64) & 0x03) << 6;
-+ if (tarindex + 1 < targsize)
-+ target[tarindex+1] = nextbyte;
-+ else if (nextbyte)
-+ return (-1);
-+ }
-+ tarindex++;
-+ state = 3;
-+ break;
-+ case 3:
-+ if (target) {
-+ if (tarindex >= targsize)
-+ return (-1);
-+ target[tarindex] |= (pos - Base64);
-+ }
-+ tarindex++;
-+ state = 0;
-+ break;
-+ }
-+ }
-+
-+ /*
-+ * We are done decoding Base-64 chars. Let's see if we ended
-+ * on a byte boundary, and/or with erroneous trailing characters.
-+ */
-+
-+ if (ch == Pad64) { /* We got a pad char. */
-+ ch = (unsigned char)*src++; /* Skip it, get next. */
-+ switch (state) {
-+ case 0: /* Invalid = in first position */
-+ case 1: /* Invalid = in second position */
-+ return (-1);
-+
-+ case 2: /* Valid, means one byte of info */
-+ /* Skip any number of spaces. */
-+ for (; ch != '\0'; ch = (unsigned char)*src++)
-+ if (!isspace(ch))
-+ break;
-+ /* Make sure there is another trailing = sign. */
-+ if (ch != Pad64)
-+ return (-1);
-+ ch = (unsigned char)*src++; /* Skip the = */
-+ /* Fall through to "single trailing =" case. */
-+ /* FALLTHROUGH */
-+
-+ case 3: /* Valid, means two bytes of info */
-+ /*
-+ * We know this char is an =. Is there anything but
-+ * whitespace after it?
-+ */
-+ for (; ch != '\0'; ch = (unsigned char)*src++)
-+ if (!isspace(ch))
-+ return (-1);
-+
-+ /*
-+ * Now make sure for cases 2 and 3 that the "extra"
-+ * bits that slopped past the last full byte were
-+ * zeros. If we don't check them, they become a
-+ * subliminal channel.
-+ */
-+ if (target && tarindex < targsize &&
-+ target[tarindex] != 0)
-+ return (-1);
-+ }
-+ } else {
-+ /*
-+ * We ended by seeing the end of the string. Make sure we
-+ * have no partial bytes lying around.
-+ */
-+ if (state != 0)
-+ return (-1);
-+ }
-+
-+ return (tarindex);
-+}
-diff --git a/fdm.h b/fdm.h
-index 5de799c..abc52e0 100644
---- a/fdm.h
-+++ b/fdm.h
-@@ -84,6 +84,18 @@ extern char *__progname;
- #define INFTIM -1
- #endif
-
-+#ifndef WAIT_ANY
-+#define WAIT_ANY -1
-+#endif
-+
-+#ifndef GLOB_BRACE
-+#define GLOB_BRACE 0
-+#endif
-+
-+#ifndef ACCESSPERMS
-+#define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO)
-+#endif
-+
- #ifndef __dead
- #define __dead __attribute__ ((__noreturn__))
- #endif
-@@ -707,6 +719,12 @@ size_t strlcpy(char *, const char *, size_t);
- size_t strlcat(char *, const char *, size_t);
- #endif
-
-+#ifndef HAVE_B64_NTOP
-+/* base64.c */
-+int b64_ntop(src, srclength, target, targsize);
-+int b64_pton(src, target, targsize);
-+#endif
-+
- /* shm.c */
- char *shm_path(struct shm *);
- void *shm_create(struct shm *, size_t);
---
-2.17.1
-
--- /dev/null
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -123,6 +123,3 @@ endif
+ if NO_STRTONUM
+ nodist_fdm_SOURCES += compat/strtonum.c
+ endif
+-if NO_B64_NTOP
+-nodist_fdm_SOURCES += compat/base64.c
+-endif
-From f6c656c5c0368b2fb4284af0484c3bedfc7ae42c Mon Sep 17 00:00:00 2001
+From 3aa079c4885d89257c5033b4992011511b603150 Mon Sep 17 00:00:00 2001
From: Rosen Penev <rosenp@gmail.com>
Date: Tue, 26 Jun 2018 14:14:34 -0700
Subject: [PATCH] Fix compile with OpenSSL 1.1.0
OpenSSL 1.1.0 deprecared SSL_library_init and SSL_load_error_strings.
They're part of OPENSSL_init_ssl now.
---
- fdm.c | 5 +++++
- 1 file changed, 5 insertions(+)
+ fdm.c | 2 ++
+ 1 file changed, 2 insertions(+)
diff --git a/fdm.c b/fdm.c
-index cdf8383..9355b91 100644
+index cdf8383..6721bbd 100644
--- a/fdm.c
+++ b/fdm.c
-@@ -717,8 +717,13 @@ retry:
+@@ -717,8 +717,10 @@ retry:
}
conf.lock_file = lock;
-+
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
SSL_library_init();
SSL_load_error_strings();
-+#else
-+ OPENSSL_init_ssl(0, NULL);
+#endif
/* Filter account list. */
+++ /dev/null
-From 070cee8d1efba1ca260777a204fba7cdfe676ca5 Mon Sep 17 00:00:00 2001
-From: Nicholas Marriott <nicholas.marriott@gmail.com>
-Date: Tue, 17 Jan 2017 23:14:03 +0000
-Subject: [PATCH] Look for OPENSSL_init_ssl, from Tomasz Miasko.
-
----
- configure.ac | 7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index 5793c2d..161040c 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -93,11 +93,16 @@ if test "x$found_libcrypto" = xno; then
- AC_MSG_ERROR("libcrypto not found")
- fi
- AC_SEARCH_LIBS(
-- SSL_library_init,
-+ OPENSSL_init_ssl,
- [ssl],
- found_libssl=yes,
- found_libssl=no
- )
-+AC_SEARCH_LIBS(
-+ SSL_library_init,
-+ [ssl],
-+ found_libssl=yes
-+)
- if test "x$found_libssl" = xno; then
- AC_MSG_ERROR("libssl not found")
- fi
include $(TOPDIR)/rules.mk
PKG_NAME:=msmtp
-PKG_VERSION:=1.8.2
-PKG_RELEASE:=1
+PKG_VERSION:=1.8.4
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://marlam.de/msmtp/releases
-PKG_HASH:=d1185c1969ed00d0e2c57dbcd5eb09a9f82156042b21309d558f761978a58793
+PKG_HASH:=e5dd7fe95bc8e2f5eea3e4894ec9628252f30bd700a7fd1a568b10efa91129f7
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
PKG_MAINTAINER:=Rosen Penev <rosenp@gmail.com>
PKG_LICENSE:=GPL-3.0+
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:marlam:msmtp
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
--without-macosx-keyring \
--without-msmtpd
-ifneq ($(CONFIG_USE_UCLIBC),)
- CONFIGURE_ARGS += --disable-gai-idn
-endif
-
-MAKE_FLAGS :=
-
ifeq ($(BUILD_VARIANT),ssl)
- CONFIGURE_ARGS += \
- --with-tls=gnutls
-endif
-
-ifeq ($(BUILD_VARIANT),nossl)
- CONFIGURE_ARGS += \
- --with-tls=no
+ CONFIGURE_ARGS += --with-tls=gnutls
+else
+ CONFIGURE_ARGS += --without-tls
endif
define Package/msmtp/install
include $(TOPDIR)/rules.mk
PKG_NAME:=mutt
-PKG_VERSION:=1.11.2
+PKG_VERSION:=1.12.1
PKG_RELEASE:=1
-PKG_SOURCE_URL:=ftp://ftp.mutt.org/pub/mutt/ \
- https://bitbucket.org/mutt/mutt/downloads/
+PKG_SOURCE_URL:=https://bitbucket.org/mutt/mutt/downloads/ \
+ http://ftp.mutt.org/pub/mutt/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=da5cd4c39f228914d3933d8cf3a017c8271fdd9b9d81c6e4fc42ad22e1a28723
+PKG_HASH:=01c565406ec4ffa85db90b45ece2260b25fac3646cc063bbc20a242c6ed4210c
PKG_MAINTAINER:=Phil Eichinger <phil@zankapfel.net>
-PKG_LICENSE:=GPL-2.0+
+PKG_LICENSE:=GPL-2.0-or-later
PKG_LICENSE_FILES:=GPL
PKG_FIXUP:=autoreconf
include $(TOPDIR)/rules.mk
PKG_NAME:=dovecot-pigeonhole
-PKG_VERSION_PLUGIN:=0.5.4
+PKG_VERSION_PLUGIN:=0.5.5
PKG_VERSION_DOVECOT:=$(shell make --no-print-directory -C ../dovecot/ val.PKG_VERSION V=s)
PKG_VERSION:=$(PKG_VERSION_DOVECOT)-$(PKG_VERSION_PLUGIN)
-PKG_RELEASE:=4
+PKG_RELEASE:=1
DOVECOT_VERSION:=2.3
PKG_SOURCE:=dovecot-$(DOVECOT_VERSION)-pigeonhole-$(PKG_VERSION_PLUGIN).tar.gz
PKG_SOURCE_URL:=https://pigeonhole.dovecot.org/releases/$(DOVECOT_VERSION)
-PKG_HASH:=547999e67a001abc5e654c7e35653d3fe057fa9a47a24257e39a79c41ef08516
+PKG_HASH:=cbaa106e1c2b23824420efdd6a9f8572c64c8dccf75a3101a899b6ddb25149a5
PKG_LICENSE:=LGPL-2.1
PKG_LICENSE_FILES:=COPYING COPYING.LGPL
include $(TOPDIR)/rules.mk
PKG_NAME:=postfix
-PKG_RELEASE:=3
-PKG_VERSION:=3.3.2
+PKG_RELEASE:=1
+PKG_VERSION:=3.4.6
PKG_SOURCE_URL:= \
https://cdn.postfix.johnriley.me/mirrors/postfix-release/official/ \
- ftp://ftp.porcupine.org/mirrors/postfix-release/official/
+ http://ftp.porcupine.org/mirrors/postfix-release/official/
-PKG_HASH:=3c93f31eee49a58e592c31e62a058701cadde11e8e066ea441da19fddad7b35b
+PKG_HASH:=d674a9b40602ee30420ee7ff93c3600e8913eeb2ea9bfb0ac1d140dac5dbe326
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_MAINTAINER:=Denis Shulyaka <Shulyaka@gmail.com>
PKG_LICENSE:=IPL-1.0
-diff -rupN postfix-2.8.1/src/smtpd/smtpd_check.c postfix-2.8.1_patched/src/smtpd/smtpd_check.c
---- postfix-2.8.1/src/smtpd/smtpd_check.c 2011-01-04 22:03:50.000000000 +0300
-+++ postfix-2.8.1_patched/src/smtpd/smtpd_check.c 2011-03-06 19:35:39.000000000 +0300
-@@ -5322,7 +5322,7 @@ char *smtpd_check_queue(SMTPD_STATE *s
+--- a/src/smtpd/smtpd_check.c
++++ b/src/smtpd/smtpd_check.c
+@@ -5325,7 +5325,7 @@ char *smtpd_check_queue(SMTPD_STATE *state)
*/
#define BLOCKS(x) ((x) / fsbuf.block_size)
+++ /dev/null
---- a/src/posttls-finger/posttls-finger.c
-+++ b/src/posttls-finger/posttls-finger.c
-@@ -374,7 +374,9 @@
- #include <tls.h>
-
- #ifdef USE_TLS
-+#ifndef OPENSSL_NO_ENGINE
- #include <openssl/engine.h>
-+#endif
- #endif
-
- /*
-@@ -1524,7 +1526,9 @@ static void ssl_cleanup(void)
- #else
- ERR_remove_state(0); /* Deprecated with OpenSSL 1.0.0 */
- #endif
-+#ifndef OPENSSL_NO_ENGINE
- ENGINE_cleanup();
-+#endif
- CONF_modules_unload(1);
- ERR_free_strings();
- EVP_cleanup();
-diff -Naur postfix-2.10.2/conf/post-install postfix-2.10.2_patched/conf/post-install
---- postfix-2.10.2/conf/post-install 2013-06-13 18:07:46.000000000 +0400
-+++ postfix-2.10.2_patched/conf/post-install 2013-11-19 21:17:49.572820573 +0400
-@@ -366,10 +366,10 @@
+--- a/conf/post-install
++++ b/conf/post-install
+@@ -366,10 +366,10 @@ test -f $config_directory/main.cf && {
# Sanity checks
case $setgid_group in
no) echo $0: Error: setgid_group no longer accepts \"no\" values. 1>&2
-@@ -377,7 +377,7 @@
+@@ -377,7 +377,7 @@ case $setgid_group in
esac
for path in "$daemon_directory" "$command_directory" "$queue_directory" \
"$meta_directory"
do
case "$path" in
-@@ -386,7 +386,7 @@
+@@ -386,7 +386,7 @@ do
esac
done
do
case "$path" in
/*) ;;
-diff -Naur postfix-2.10.2/postfix-install postfix-2.10.2_patched/postfix-install
---- postfix-2.10.2/postfix-install 2012-05-22 23:40:29.000000000 +0400
-+++ postfix-2.10.2_patched/postfix-install 2013-11-19 21:12:20.694160734 +0400
-@@ -563,13 +563,13 @@
+--- a/postfix-install
++++ b/postfix-install
+@@ -563,13 +563,13 @@ case "$setgid_group" in
exit 1;;
esac
for path in "$html_directory" "$readme_directory" "$shlib_directory"
do
-@@ -582,7 +582,7 @@
+@@ -582,7 +582,7 @@ do
done
for path in "$daemon_directory" "$data_directory" "$command_directory" "$queue_directory" \
"$meta_directory"
do
case "$path" in
-@@ -789,8 +789,8 @@
+@@ -789,8 +789,8 @@ do
compare_or_replace $mode "$owner" "$group" html/$file \
$HTML_DIRECTORY/$file || exit 1;;
'$manpage_directory')
---- a/src/util/dict_db.c 2017-07-16 16:56:00.819659962 +0300
-+++ b/src/util/dict_db.c 2017-07-16 16:58:31.011401358 +0300
-@@ -740,8 +740,8 @@
+--- a/src/util/dict_db.c
++++ b/src/util/dict_db.c
+@@ -750,8 +750,8 @@ static DICT *dict_db_open(const char *class, const char *path, int open_flags,
msg_fatal("create DB database: %m");
if (db == 0)
msg_panic("db_create null result");
-diff -Naur postfix-2.11.1/src/util/sys_defs.h postfix-2.11.1.patched/src/util/sys_defs.h
---- postfix-2.11.1/src/util/sys_defs.h 2013-09-30 00:51:55.000000000 +0400
-+++ postfix-2.11.1.patched/src/util/sys_defs.h 2014-09-29 03:11:48.962277971 +0400
-@@ -759,9 +759,8 @@
+--- a/src/util/sys_defs.h
++++ b/src/util/sys_defs.h
+@@ -760,9 +760,8 @@ extern int initgroups(const char *, int);
#define INTERNAL_LOCK MYFLOCK_STYLE_FLOCK
#define DEF_MAILBOX_LOCK "fcntl, dotlock" /* RedHat >= 4.x */
#define HAS_FSYNC
---- a/makedefs 2016-01-28 12:30:14.444082390 -0500
-+++ b/makedefs 2016-01-28 13:44:02.092006512 -0500
-@@ -213,7 +213,7 @@ error() {
+--- a/makedefs
++++ b/makedefs
+@@ -215,7 +215,7 @@ error() {
case $# in
# Officially supported usage.
RELEASE=`(uname -r) 2>/dev/null`
# No ${x%%y} support in Solaris 11 /bin/sh
RELEASE_MAJOR=`expr "$RELEASE" : '\([0-9]*\)'` || exit 1
-@@ -227,6 +227,15 @@ case $# in
+@@ -229,6 +229,15 @@ case $# in
esac
case "$SYSTEM.$RELEASE" in
--- a/src/posttls-finger/posttls-finger.c
+++ b/src/posttls-finger/posttls-finger.c
-@@ -318,6 +318,7 @@
+@@ -342,6 +342,7 @@
#include <sys/un.h>
#include <netinet/in.h>
#include <arpa/inet.h>
-diff -Naur postfix-2.11.1/postfix-install postfix-2.11.1.patched/postfix-install
---- postfix-2.11.1/postfix-install 2014-10-05 20:43:58.598876904 +0400
-+++ postfix-2.11.1.patched/postfix-install 2014-10-05 20:47:36.076700082 +0400
-@@ -861,23 +861,23 @@
+--- a/postfix-install
++++ b/postfix-install
+@@ -861,23 +861,23 @@ do
esac
done
-diff -Naur postfix-2.11.1/conf/main.cf postfix-2.11.1.patched/conf/main.cf
---- postfix-2.11.1/conf/main.cf 2013-12-24 18:57:25.000000000 +0400
-+++ postfix-2.11.1.patched/conf/main.cf 2014-10-05 21:35:53.427534410 +0400
-@@ -40,43 +40,8 @@
+--- a/conf/main.cf
++++ b/conf/main.cf
+@@ -40,43 +40,8 @@ compatibility_level = 2
#
#soft_bounce = no
# The default_privs parameter specifies the default rights used by
# the local delivery agent for delivery to external file or command.
# These rights are used in the absence of a recipient user context.
-@@ -632,45 +597,4 @@
+@@ -632,45 +597,4 @@ debugger_command =
# -dmS $process_name gdb $daemon_directory/$process_name
# $process_id & sleep 1
-diff -Naur postfix-2.11.1/conf/post-install postfix-2.11.1.patched/conf/post-install
---- postfix-2.11.1/conf/post-install 2014-10-05 20:43:58.597876946 +0400
-+++ postfix-2.11.1.patched/conf/post-install 2014-10-11 16:28:01.258874097 +0400
-@@ -326,7 +326,7 @@
+--- a/conf/post-install
++++ b/conf/post-install
+@@ -326,7 +326,7 @@ fake_fmt() {
case `uname -s` in
HP-UX*) FMT=cat;;
SunOS*) FMT=fake_fmt;;
-diff -Naur a/conf/post-install b/conf/post-install
---- a/conf/post-install 2015-12-28 00:00:45.000000000 +0000
-+++ b/conf/post-install 2017-08-01 22:42:30.476896711 +0000
-@@ -566,15 +566,16 @@
+--- a/conf/post-install
++++ b/conf/post-install
+@@ -566,15 +566,16 @@ test -n "$create" && {
then
set_permission=1
fi
--- /dev/null
+From 4fe5b1f216f1643080299bdb35e07f07b9c2caae Mon Sep 17 00:00:00 2001
+From: Rosen Penev <rosenp@gmail.com>
+Date: Thu, 2 May 2019 22:28:57 -0700
+Subject: [PATCH] dns_lookup: Fix compilation with uClibc-ng
+
+uClibc-ng does not have res_send or res_nsend. ifdef the entire function.
+---
+ src/dns/dns_lookup.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/src/dns/dns_lookup.c b/src/dns/dns_lookup.c
+index 1ea98b3..d7771d4 100644
+--- a/src/dns/dns_lookup.c
++++ b/src/dns/dns_lookup.c
+@@ -311,6 +311,10 @@ typedef struct DNS_REPLY {
+ static int dns_res_query(const char *name, int class, int type,
+ unsigned char *answer, int anslen)
+ {
++#ifdef __UCLIBC__
++ msg_info("dns_res_query() is not supported under uClibc");
++ return 0;
++#else
+ unsigned char msg_buf[MAX_DNS_QUERY_SIZE];
+ HEADER *reply_header = (HEADER *) answer;
+ int len;
+@@ -369,6 +373,7 @@ static int dns_res_query(const char *name, int class, int type,
+ }
+ return (len);
+ }
++#endif
+ }
+
+ /* dns_res_search - res_search() that can return negative replies */
+--
+2.17.1
+
PKG_NAME:=ssmtp
PKG_VERSION:=2.64
-PKG_RELEASE:=5
+PKG_RELEASE:=6
PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
PKG_LICENSE:=GPL-2.0+
--- /dev/null
+--- a/ssmtp.c
++++ b/ssmtp.c
+@@ -1046,8 +1046,10 @@ int smtp_open(char *host, int port)
+ /* Init SSL stuff */
+ SSL_CTX *ctx = NULL;
+ X509 *server_cert;
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ SSL_load_error_strings();
+ SSLeay_add_ssl_algorithms();
++#endif
+ ctx = SSL_CTX_new(SSLv23_client_method());
+ if(!ctx) {
+ log_event(LOG_ERR, "No SSL support initiated\n");
include $(TOPDIR)/rules.mk
PKG_NAME:=crtmpserver
-PKG_REV:=b6fdcdb953d1e99c48a0c37a8c80f2cad2db443b
-PKG_VERSION:=2012-07-18+git-$(PKG_REV)
-PKG_RELEASE:=4
+PKG_SOURCE_DATE:=2015-10-04
+PKG_SOURCE_VERSION:=b866fffca37c3b967a8878499cd2b91aa2587f34
+PKG_RELEASE:=2
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://codeload.github.com/j0sh/crtmpserver/tar.gz/$(PKG_REV)?
-PKG_HASH:=e210eeb99d39334e7beb0a1be27dcf23d1f851383f87cf63d7fb98209ef96cee
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_REV)
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_DATE).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/shiretu/crtmpserver/tar.gz/$(PKG_SOURCE_VERSION)?
+PKG_HASH:=3744bef060129fda6f7902eb64f566b0d5049864dc542b2882c550b083ef82aa
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_SOURCE_VERSION)
PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>
PKG_LICENSE:=GPL-3.0
+PKG_LICENSE_FILES:=LICENSE
PKG_BUILD_PARALLEL:=1
-include $(INCLUDE_DIR)/uclibc++.mk
include $(INCLUDE_DIR)/package.mk
define Package/crtmpserver
SECTION:=multimedia
CATEGORY:=Multimedia
- DEPENDS:=$(CXX_DEPENDS) +libopenssl +liblua
+ DEPENDS:=+libstdcpp +libopenssl +liblua
TITLE:=C++ RTMP Server
endef
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/builders/make/output/dynamic/crtmpserver $(1)/usr/bin/
$(INSTALL_DIR) $(1)/usr/lib/crtmpserver
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/builders/make/output/dynamic/*.so $(1)/usr/lib/crtmpserver/
+ $(CP) $(PKG_BUILD_DIR)/builders/make/output/dynamic/*.so $(1)/usr/lib/crtmpserver/
$(foreach app,flvplayback samplefactory admin stresstest appselector vptests applestreamingclient proxypublish, \
$(INSTALL_DIR) $(1)/usr/lib/crtmpserver/$(app); \
$(INSTALL_BIN) $(PKG_BUILD_DIR)/builders/make/output/dynamic/applications/$(app)/lib$(app).so \
+++ /dev/null
---- a/builders/make/compile.mk
-+++ b/builders/make/compile.mk
-@@ -72,7 +72,7 @@ TINYXML_OBJS = $(TINYXML_SRCS:.cpp=.tiny
-
- #common
- COMMON_INCLUDE=$(LUA_INCLUDE) $(TINYXML_INCLUDE) $(SSL_INCLUDE) -I$(PROJECT_BASE_PATH)/sources/common/include
--COMMON_LIBS=$(SSL_LIB) -L$(OUTPUT_DYNAMIC) -llua -ltinyxml
-+COMMON_LIBS=$(SSL_LIB) -L$(OUTPUT_DYNAMIC) -llua -ltinyxml -lcrypt
- COMMON_SRCS = $(shell find $(PROJECT_BASE_PATH)/sources/common/src -type f -name "*.cpp")
- COMMON_OBJS = $(COMMON_SRCS:.cpp=.common.o)
-
+++ /dev/null
---- a/builders/make/linux.mk
-+++ b/builders/make/linux.mk
-@@ -31,8 +31,8 @@ OPTIMIZATIONS = -O3
- COMPILE_FLAGS = $(FPIC) $(OPTIMIZATIONS) $(CFLAGS)
-
- #linking flags
--dynamic_lib_flags = $(FPIC) $(OPTIMIZATIONS) -Wl,-soname,$(DYNAMIC_LIB_PREFIX)$(1)$(DYNAMIC_LIB_SUFIX) -Wl,-rpath,"\$$ORIGIN"
--dynamic_exec_flags = $(FPIC) $(OPTIMIZATIONS) -Wl,-rpath,"\$$ORIGIN"
-+dynamic_lib_flags = $(FPIC) $(OPTIMIZATIONS) -Wl,-soname,$(DYNAMIC_LIB_PREFIX)$(1)$(DYNAMIC_LIB_SUFIX) -Wl,-rpath,/usr/lib/crtmpserver
-+dynamic_exec_flags = $(FPIC) $(OPTIMIZATIONS) -Wl,-rpath,/usr/lib/crtmpserver
-
- #compile switches
- PLATFORM_DEFINES = \
-- the application will also be known by that names. It is optional
--aliases=
--{
-@@ -89,13 +89,6 @@ configuration=
+@@ -87,13 +87,6 @@ configuration=
+ port=1935,
+ protocol="inboundRtmp"
},
- {
- ip="0.0.0.0",
+- {
+- ip="0.0.0.0",
- port=8081,
- protocol="inboundRtmps",
- sslKey="server.key",
- sslCert="server.crt"
- },
-- {
-- ip="0.0.0.0",
+ {
+ ip="0.0.0.0",
port=8080,
- protocol="inboundRtmpt"
- },
-@@ -184,6 +177,7 @@ configuration=
+@@ -206,6 +199,7 @@ configuration=
name="samplefactory",
description="asdsadasdsa",
protocol="dynamiclinklibrary",
--- /dev/null
+--- a/sources/common/src/utils/logging/syslogloglocation.cpp
++++ b/sources/common/src/utils/logging/syslogloglocation.cpp
+@@ -35,8 +35,6 @@ SyslogLogLocation::SyslogLogLocation(Variant &configuration, string identifier,
+ _priorities[_WARNING_] = LOG_WARNING;
+ _priorities[_ERROR_] = LOG_ERR;
+ _priorities[_FATAL_] = LOG_ERR;
+- _priorities[_PROD_ACCESS_] = LOG_ERR;
+- _priorities[_PROD_ERROR_] = LOG_ERR;
+ _specificLevel = specificLevel;
+ _enforceLoggerName = (_configuration[CONF_LOG_APPENDER_NAME] != "");
+ _pDefualtFormatter = NULL;
+++ /dev/null
---- a/builders/make/linux.mk
-+++ b/builders/make/linux.mk
-@@ -38,7 +38,7 @@ dynamic_exec_flags = $(FPIC) $(OPTIMIZAT
- PLATFORM_DEFINES = \
- -DLINUX \
- -DLITTLE_ENDIAN_BYTE_ALIGNED \
-- -DNET_EPOLL
-+ -DNET_SELECT
-
- SSL_BASE=/usr/local
-
+++ /dev/null
---- a/builders/make/compile.mk
-+++ b/builders/make/compile.mk
-@@ -58,7 +58,7 @@ DEFINES = $(PLATFORM_DEFINES) $(FEATURES
-
- #library paths
- SSL_INCLUDE=-I$(SSL_BASE)/include
--SSL_LIB=-L$(SSL_BASE)/lib -lssl -lcrypto
-+SSL_LIB=-L$(SSL_BASE)/lib -lssl -lcrypto -ldl
-
- #lua
- LUA_INCLUDE=-I$(PROJECT_BASE_PATH)/3rdparty/lua-dev
-@@ -72,25 +72,25 @@ TINYXML_OBJS = $(TINYXML_SRCS:.cpp=.tiny
-
- #common
- COMMON_INCLUDE=$(LUA_INCLUDE) $(TINYXML_INCLUDE) $(SSL_INCLUDE) -I$(PROJECT_BASE_PATH)/sources/common/include
--COMMON_LIBS=$(SSL_LIB) -L$(OUTPUT_DYNAMIC) -llua -ltinyxml -lcrypt
-+COMMON_LIBS=$(SSL_LIB) -L$(OUTPUT_DYNAMIC) $(PROJECT_BASE_PATH)/builders/make/output/dynamic/liblua.so -ltinyxml -lcrypt -ldl
- COMMON_SRCS = $(shell find $(PROJECT_BASE_PATH)/sources/common/src -type f -name "*.cpp")
- COMMON_OBJS = $(COMMON_SRCS:.cpp=.common.o)
-
- #thelib
- THELIB_INCLUDE=$(COMMON_INCLUDE) -I$(PROJECT_BASE_PATH)/sources/thelib/include
--THELIB_LIBS=$(COMMON_LIBS) -L$(OUTPUT_DYNAMIC) -lcommon
-+THELIB_LIBS=$(COMMON_LIBS) -L$(OUTPUT_DYNAMIC) -lcommon -ldl
- THELIB_SRCS = $(shell find $(PROJECT_BASE_PATH)/sources/thelib/src -type f -name "*.cpp")
- THELIB_OBJS = $(THELIB_SRCS:.cpp=.thelib.o)
-
- #tests
- TESTS_INCLUDE=$(THELIB_INCLUDE) -I$(PROJECT_BASE_PATH)/sources/tests/include
--TESTS_LIBS=$(THELIB_LIBS) -L$(OUTPUT_DYNAMIC) -lthelib
-+TESTS_LIBS=$(THELIB_LIBS) -L$(OUTPUT_DYNAMIC) -lthelib -ldl
- TESTS_SRCS=$(shell find $(PROJECT_BASE_PATH)/sources/tests/src -type f -name "*.cpp")
- TESTS_OBJS=$(TESTS_SRCS:.cpp=.tests.o)
-
- #crtmpserver
- CRTMPSERVER_INCLUDE=$(THELIB_INCLUDE) -I$(PROJECT_BASE_PATH)/sources/crtmpserver/include
--CRTMPSERVER_LIBS=$(THELIB_LIBS) -L$(OUTPUT_DYNAMIC) -lthelib
-+CRTMPSERVER_LIBS=$(THELIB_LIBS) -L$(OUTPUT_DYNAMIC) -lthelib -ldl
- CRTMPSERVER_SRCS=$(shell find $(PROJECT_BASE_PATH)/sources/crtmpserver/src -type f -name "*.cpp")
- CRTMPSERVER_OBJS_DYNAMIC=$(CRTMPSERVER_SRCS:.cpp=.crtmpserver_dynamic.o)
- CRTMPSERVER_OBJS_STATIC=$(CRTMPSERVER_SRCS:.cpp=.crtmpserver_static.o)
+++ /dev/null
---- a/sources/common/src/utils/logging/fileloglocation.cpp
-+++ b/sources/common/src/utils/logging/fileloglocation.cpp
-@@ -17,6 +17,7 @@
- * along with crtmpserver. If not, see <http://www.gnu.org/licenses/>.
- */
-
-+#include <ctime>
-
- #include "utils/logging/fileloglocation.h"
- #include "utils/lua/luautils.h"
--- /dev/null
+--- a/builders/make/apps.mk
++++ b/builders/make/apps.mk
+@@ -110,6 +110,6 @@ vptests: thelib $(VPTESTS_OBJS)
+ %.vptests.o: %.cpp
+ $(CXXCOMPILER) $(COMPILE_FLAGS) $(DEFINES) $(VPTESTS_INCLUDE) -c $< -o $@
+
+-ALL_APPS_OBJS= $(ADMIN_OBJS) $(APPLESTREAMINGCLIENT_OBJS) $(APPSELECTOR_OBJS) $(FLVPLAYBACK_OBJS) $(PROXYPUBLISH_OBJS) $(SAMPLEFACTORY_OBJS) $(STRESSTEST_OBJS) $(VPTESTS_OBJS)
+-ACTIVE_APPS= -DHAS_APP_ADMIN -DHAS_APP_APPLESTREAMINGCLIENT -DHAS_APP_APPSELECTOR -DHAS_APP_FLVPLAYBACK -DHAS_APP_PROXYPUBLISH -DHAS_APP_SAMPLEFACTORY -DHAS_APP_STRESSTEST -DHAS_APP_VPTESTS
+-applications: thelib admin applestreamingclient appselector flvplayback proxypublish samplefactory stresstest vptests
++ALL_APPS_OBJS= $(ADMIN_OBJS) $(APPSELECTOR_OBJS) $(FLVPLAYBACK_OBJS) $(PROXYPUBLISH_OBJS) $(SAMPLEFACTORY_OBJS) $(STRESSTEST_OBJS) $(VPTESTS_OBJS)
++ACTIVE_APPS= -DHAS_APP_ADMIN -DHAS_APP_APPSELECTOR -DHAS_APP_FLVPLAYBACK -DHAS_APP_PROXYPUBLISH -DHAS_APP_SAMPLEFACTORY -DHAS_APP_STRESSTEST -DHAS_APP_VPTESTS
++applications: thelib admin appselector flvplayback proxypublish samplefactory stresstest vptests
+++ /dev/null
---- a/3rdparty/tinyxml/tinyxml.h
-+++ b/3rdparty/tinyxml/tinyxml.h
-@@ -39,6 +39,7 @@ distribution.
- #include <string>
- #include <iostream>
- #include <sstream>
-+#include "lstate.h"
- using namespace std;
-
- // Help out windows:
+++ /dev/null
---- a/builders/make/apps.mk
-+++ b/builders/make/apps.mk
-@@ -110,6 +110,6 @@ vptests: thelib $(VPTESTS_OBJS)
- %.vptests.o: %.cpp
- $(CXXCOMPILER) $(COMPILE_FLAGS) $(DEFINES) $(VPTESTS_INCLUDE) -c $< -o $@
-
--ALL_APPS_OBJS= $(ADMIN_OBJS) $(APPLESTREAMINGCLIENT_OBJS) $(APPSELECTOR_OBJS) $(FLVPLAYBACK_OBJS) $(PROXYPUBLISH_OBJS) $(SAMPLEFACTORY_OBJS) $(STRESSTEST_OBJS) $(VPTESTS_OBJS)
--ACTIVE_APPS= -DHAS_APP_ADMIN -DHAS_APP_APPLESTREAMINGCLIENT -DHAS_APP_APPSELECTOR -DHAS_APP_FLVPLAYBACK -DHAS_APP_PROXYPUBLISH -DHAS_APP_SAMPLEFACTORY -DHAS_APP_STRESSTEST -DHAS_APP_VPTESTS
--applications: thelib admin applestreamingclient appselector flvplayback proxypublish samplefactory stresstest vptests
-+ALL_APPS_OBJS= $(ADMIN_OBJS) $(APPSELECTOR_OBJS) $(FLVPLAYBACK_OBJS) $(PROXYPUBLISH_OBJS) $(SAMPLEFACTORY_OBJS) $(STRESSTEST_OBJS) $(VPTESTS_OBJS)
-+ACTIVE_APPS= -DHAS_APP_ADMIN -DHAS_APP_APPSELECTOR -DHAS_APP_FLVPLAYBACK -DHAS_APP_PROXYPUBLISH -DHAS_APP_SAMPLEFACTORY -DHAS_APP_STRESSTEST -DHAS_APP_VPTESTS
-+applications: thelib admin appselector flvplayback proxypublish samplefactory stresstest vptests
--- /dev/null
+--- a/sources/thelib/include/protocols/ts/basetsappprotocolhandler.h
++++ b/sources/thelib/include/protocols/ts/basetsappprotocolhandler.h
+@@ -18,7 +18,7 @@
+ */
+
+
+-#if defined HAS_PROTOCOL_TS && defined HAS_MEDIA_TS
++#if defined HAS_PROTOCOL_TS || defined HAS_MEDIA_TS
+ #ifndef _BASETSAPPPROTOCOLHANDLER_H
+ #define _BASETSAPPPROTOCOLHANDLER_H
+
+++ /dev/null
---- a/sources/common/include/platform/linux/max.h
-+++ b/sources/common/include/platform/linux/max.h
-@@ -21,87 +21,7 @@
- #ifndef _MAX_H
- #define _MAX_H
-
--#ifdef UINT64_MAX
--#undef UINT64_MAX
--#endif
--
--#ifdef INT64_MAX
--#undef INT64_MAX
--#endif
--
--#ifdef UINT32_MAX
--#undef UINT32_MAX
--#endif
--
--#ifdef INT32_MAX
--#undef INT32_MAX
--#endif
--
--#ifdef UINT16_MAX
--#undef UINT16_MAX
--#endif
--
--#ifdef INT16_MAX
--#undef INT16_MAX
--#endif
--
--#ifdef UINT8_MAX
--#undef UINT8_MAX
--#endif
--
--#ifdef INT8_MAX
--#undef INT8_MAX
--#endif
--
--
--
--#ifndef UINT64_MAX
--#define UINT64_MAX ((uint64_t)(0xffffffffffffffffULL))
--#endif
--
--#ifndef INT64_MAX
--#define INT64_MAX ((int64_t)(0x7fffffffffffffffLL))
--#endif
--
--#ifndef INT64_MIN
--#define INT64_MIN ((int64_t)(0x8000000000000000LL))
--#endif
--
--#ifndef UINT32_MAX
--#define UINT32_MAX ((uint32_t)(0xffffffffUL))
--#endif
--
--#ifndef INT32_MAX
--#define INT32_MAX ((int32_t)(0x7fffffffL))
--#endif
--
--#ifndef INT32_MIN
--#define INT32_MIN ((int32_t)(0x80000000L))
--#endif
--
--#ifndef UINT16_MAX
--#define UINT16_MAX ((uint16_t)(0xffff))
--#endif
--
--#ifndef INT16_MAX
--#define INT16_MAX ((int16_t)(0x7fff))
--#endif
--
--#ifndef INT16_MIN
--#define INT16_MIN ((int16_t)(0x8000))
--#endif
--
--#ifndef UINT8_MAX
--#define UINT8_MAX ((uint8_t)(0xff))
--#endif
--
--#ifndef INT8_MAX
--#define INT8_MAX ((int8_t)(0x7f))
--#endif
--
--#ifndef INT8_MIN
--#define INT8_MIN ((int8_t)(0x80))
--#endif
-+#include <stdint.h>
-
- #endif /* _MAX_H */
- #endif /* LINUX */
delete[] _pIV;
delete[] _pKey;
}
-@@ -60,11 +59,9 @@ bool InboundAESProtocol::Initialize(Vari
+@@ -60,11 +59,9 @@ bool InboundAESProtocol::Initialize(Variant ¶meters) {
_inputBuffer.IgnoreAll();
_tempBuffer.IgnoreAll();
return true;
}
-@@ -105,14 +102,14 @@ bool InboundAESProtocol::SignalInputData
+@@ -105,14 +102,14 @@ bool InboundAESProtocol::SignalInputData(IOBuffer &buffer) {
int decryptedFinalSize = 0;
uint32_t padding = 0;
};
DLLEXP void InitRC4Encryption(uint8_t *secretKey, uint8_t *pubKeyIn, uint8_t *pubKeyOut,
+--- /dev/null
++++ b/sources/common/include/utils/misc/libcrypto-compat.h
+@@ -0,0 +1,26 @@
++#ifndef LIBCRYPTO_COMPAT_H
++#define LIBCRYPTO_COMPAT_H
++
++#include <openssl/opensslv.h>
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
++
++#include <openssl/bn.h>
++#include <openssl/dh.h>
++#include <openssl/evp.h>
++#include <openssl/hmac.h>
++
++int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g);
++void DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key);
++int DH_set_length(DH *dh, long length);
++
++EVP_MD_CTX *EVP_MD_CTX_new(void);
++void EVP_MD_CTX_free(EVP_MD_CTX *ctx);
++#define EVP_MD_CTX_reset EVP_MD_CTX_cleanup
++
++HMAC_CTX *HMAC_CTX_new(void);
++void HMAC_CTX_free(HMAC_CTX *ctx);
++#define HMAC_CTX_reset HMAC_CTX_cleanup
++
++#endif /* OPENSSL_VERSION_NUMBER */
++
++#endif /* LIBCRYPTO_COMPAT_H */
--- a/sources/common/src/utils/misc/crypto.cpp
+++ b/sources/common/src/utils/misc/crypto.cpp
@@ -35,6 +35,7 @@ DHWrapper::~DHWrapper() {
- Cleanup();
- return false;
+ goto return_error;
- }
-
-- //4. Set the key length
-- _pDH->length = _bitsCount;
++ }
++
+ //4. Set internal p and g
+ if (DH_set0_pqg(_pDH, p, NULL, g) != 1) {
+ FATAL("Unable to set internal p and g");
+ goto return_error;
-+ }
+ }
+ p = g = NULL;
-- //5. Generate private and public key
+- //4. Set the key length
+- _pDH->length = _bitsCount;
+ //5. Set the key length
+ if (DH_set_length(_pDH, _bitsCount) != 1) {
+ FATAL("Unable to set length");
+ goto return_error;
+ }
-+
+
+- //5. Generate private and public key
+ //6. Generate private and public key
if (DH_generate_key(_pDH) != 1) {
FATAL("Unable to generate DH public/private keys");
}
bool DHWrapper::CopyPublicKey(uint8_t *pDst, int32_t dstLength) {
-@@ -90,7 +102,9 @@ bool DHWrapper::CopyPublicKey(uint8_t *p
+@@ -90,7 +102,9 @@ bool DHWrapper::CopyPublicKey(uint8_t *pDst, int32_t dstLength) {
return false;
}
}
bool DHWrapper::CopyPrivateKey(uint8_t *pDst, int32_t dstLength) {
-@@ -99,7 +113,9 @@ bool DHWrapper::CopyPrivateKey(uint8_t *
+@@ -99,7 +113,9 @@ bool DHWrapper::CopyPrivateKey(uint8_t *pDst, int32_t dstLength) {
return false;
}
}
bool DHWrapper::CreateSharedKey(uint8_t *pPeerPublicKey, int32_t length) {
-@@ -153,14 +169,6 @@ bool DHWrapper::CopySharedKey(uint8_t *p
+@@ -153,14 +169,6 @@ bool DHWrapper::CopySharedKey(uint8_t *pDst, int32_t dstLength) {
void DHWrapper::Cleanup() {
if (_pDH != NULL) {
int32_t keySize = BN_num_bytes(pNum);
if ((keySize <= 0) || (dstLength <= 0) || (keySize > dstLength)) {
FATAL("CopyPublicKey failed due to either invalid DH state or invalid call");
-@@ -197,20 +205,21 @@ void InitRC4Encryption(uint8_t *secretKe
+@@ -197,20 +205,21 @@ void InitRC4Encryption(uint8_t *secretKey, uint8_t *pubKeyIn, uint8_t *pubKeyOut
uint8_t digest[SHA256_DIGEST_LENGTH];
unsigned int digestLen = 0;
RC4_set_key(rc4keyIn, 16, digest);
}
-@@ -220,14 +229,17 @@ string md5(string source, bool textResul
+@@ -220,14 +229,17 @@ string md5(string source, bool textResult) {
}
string md5(uint8_t *pBuffer, uint32_t length, bool textResult) {
if (textResult) {
string result = "";
-@@ -244,12 +256,12 @@ void HMACsha256(const void *pData, uint3
+@@ -259,12 +271,12 @@ void HMACsha256(const void *pData, uint32_t dataLength,
const void *pKey, uint32_t keyLength, void *pResult) {
unsigned int digestLen;
o_assert(digestLen == 32);
}
---- a/sources/thelib/src/protocols/ssl/basesslprotocol.cpp
-+++ b/sources/thelib/src/protocols/ssl/basesslprotocol.cpp
-@@ -211,6 +211,7 @@ string BaseSSLProtocol::GetSSLErrors() {
-
- string BaseSSLProtocol::DumpBIO(BIO *pBIO) {
- string formatString;
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
- formatString = "method: %p\n";
- formatString += "callback: %p\n";
- formatString += "cb_arg: %p\n";
-@@ -240,6 +241,39 @@ string BaseSSLProtocol::DumpBIO(BIO *pBI
- pBIO->references,
- (int64_t) pBIO->num_read,
- (int64_t) pBIO->num_write);
-+#else
-+// Some of these are problematic in openssl >= 1.1, since
-+// the BIO struct is opaque.
-+ formatString = "method: %s\n";
-+ formatString += "callback: %p\n";
-+ formatString += "cb_arg: %p\n";
-+ formatString += "init: %d\n";
-+ formatString += "shutdown: %d\n";
-+ formatString += "flags: %d\n";
-+ formatString += "retry_reason: %d\n";
-+ formatString += "num: %d\n";
-+ formatString += "ptr: %p\n";
-+ formatString += "next_bio: %p\n";
-+ formatString += "prev_bio: %s\n";
-+ formatString += "references: %s\n";
-+ formatString += "num_read: %"PRId64"\n";
-+ formatString += "num_write: %"PRId64;
-+ return format(formatString,
-+ BIO_method_name(pBIO),
-+ BIO_get_callback(pBIO),
-+ BIO_get_callback_arg(pBIO),
-+ BIO_get_init(pBIO),
-+ BIO_get_shutdown(pBIO),
-+ BIO_get_flags(pBIO),
-+ BIO_get_retry_reason(pBIO),
-+ BIO_get_fd(pBIO, NULL),
-+ BIO_get_data(pBIO),
-+ BIO_next(pBIO),
-+ "unknown", //prev_bio
-+ "unknown", //references
-+ BIO_number_read(pBIO),
-+ BIO_number_written(pBIO));
-+#endif
+@@ -397,8 +409,8 @@ string unhex(const uint8_t *pBuffer, uint32_t length) {
}
- void BaseSSLProtocol::InitRandGenerator() {
---- /dev/null
-+++ b/sources/common/include/utils/misc/libcrypto-compat.h
-@@ -0,0 +1,25 @@
-+#ifndef LIBCRYPTO_COMPAT_H
-+#define LIBCRYPTO_COMPAT_H
-+
-+#include <openssl/opensslv.h>
+ void CleanupSSL() {
+-#ifndef NO_SSL_ENGINE_CLEANUP
+- ERR_remove_state(0);
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+
-+#include <openssl/dh.h>
-+#include <openssl/evp.h>
-+#include <openssl/hmac.h>
-+
-+int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g);
-+void DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key);
-+int DH_set_length(DH *dh, long length);
-+
-+EVP_MD_CTX *EVP_MD_CTX_new(void);
-+void EVP_MD_CTX_free(EVP_MD_CTX *ctx);
-+#define EVP_MD_CTX_reset EVP_MD_CTX_cleanup
-+
-+HMAC_CTX *HMAC_CTX_new(void);
-+void HMAC_CTX_free(HMAC_CTX *ctx);
-+#define HMAC_CTX_reset HMAC_CTX_cleanup
-+
-+#endif /* OPENSSL_VERSION_NUMBER */
-+
-+#endif /* LIBCRYPTO_COMPAT_H */
++ ERR_remove_thread_state(NULL);
+ ENGINE_cleanup();
+ CONF_modules_unload(1);
+ ERR_free_strings();
--- /dev/null
+++ b/sources/common/src/utils/misc/libcrypto-compat.cpp
@@ -0,0 +1,90 @@
+}
+
+#endif /* OPENSSL_VERSION_NUMBER */
+--- a/sources/thelib/src/protocols/ssl/basesslprotocol.cpp
++++ b/sources/thelib/src/protocols/ssl/basesslprotocol.cpp
+@@ -43,6 +43,7 @@ BaseSSLProtocol::~BaseSSLProtocol() {
+ bool BaseSSLProtocol::Initialize(Variant ¶meters) {
+ //1. Initialize the SSL library
+ if (!_libraryInitialized) {
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ //3. This is the first time we use the library. So we have to
+ //initialize it first
+ SSL_library_init();
+@@ -55,6 +56,7 @@ bool BaseSSLProtocol::Initialize(Variant ¶meters) {
+ OpenSSL_add_all_algorithms();
+ OpenSSL_add_all_ciphers();
+ OpenSSL_add_all_digests();
++#endif
+
+ //initialize the random numbers generator
+ InitRandGenerator();
+@@ -211,6 +213,7 @@ string BaseSSLProtocol::GetSSLErrors() {
+
+ string BaseSSLProtocol::DumpBIO(BIO *pBIO) {
+ string formatString;
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ formatString = "method: %p\n";
+ formatString += "callback: %p\n";
+ formatString += "cb_arg: %p\n";
+@@ -240,6 +243,39 @@ string BaseSSLProtocol::DumpBIO(BIO *pBIO) {
+ pBIO->references,
+ (int64_t) pBIO->num_read,
+ (int64_t) pBIO->num_write);
++#else
++// Some of these are problematic in openssl >= 1.1, since
++// the BIO struct is opaque.
++ formatString = "method: %s\n";
++ formatString += "callback: %p\n";
++ formatString += "cb_arg: %p\n";
++ formatString += "init: %d\n";
++ formatString += "shutdown: %d\n";
++ formatString += "flags: %d\n";
++ formatString += "retry_reason: %d\n";
++ formatString += "num: %d\n";
++ formatString += "ptr: %p\n";
++ formatString += "next_bio: %p\n";
++ formatString += "prev_bio: %s\n";
++ formatString += "references: %s\n";
++ formatString += "num_read: %"PRId64"\n";
++ formatString += "num_write: %"PRId64;
++ return format(STR(formatString),
++ BIO_method_name(pBIO),
++ BIO_get_callback(pBIO),
++ BIO_get_callback_arg(pBIO),
++ BIO_get_init(pBIO),
++ BIO_get_shutdown(pBIO),
++ BIO_get_flags(pBIO),
++ BIO_get_retry_reason(pBIO),
++ BIO_get_fd(pBIO, NULL),
++ BIO_get_data(pBIO),
++ BIO_next(pBIO),
++ "unknown", //prev_bio
++ "unknown", //references
++ BIO_number_read(pBIO),
++ BIO_number_written(pBIO));
++#endif
+ }
+
+ void BaseSSLProtocol::InitRandGenerator() {
+--- a/sources/thelib/src/protocols/ssl/outboundsslprotocol.cpp
++++ b/sources/thelib/src/protocols/ssl/outboundsslprotocol.cpp
+@@ -33,7 +33,7 @@ bool OutboundSSLProtocol::InitGlobalContext(Variant ¶meters) {
+ _pGlobalSSLContext = _pGlobalContexts[hash];
+ if (_pGlobalSSLContext == NULL) {
+ //2. prepare the global ssl context
+- _pGlobalSSLContext = SSL_CTX_new(TLSv1_method());
++ _pGlobalSSLContext = SSL_CTX_new(SSLv23_method());
+ if (_pGlobalSSLContext == NULL) {
+ FATAL("Unable to create global SSL context");
+ return false;
+++ /dev/null
---- a/sources/common/src/utils/misc/crypto.cpp
-+++ b/sources/common/src/utils/misc/crypto.cpp
-@@ -350,6 +350,7 @@ string unhex(string source) {
- return result;
- }
-
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
- void CleanupSSL() {
- ERR_remove_state(0);
- ENGINE_cleanup();
-@@ -358,3 +359,4 @@ void CleanupSSL() {
- EVP_cleanup();
- CRYPTO_cleanup_all_ex_data();
- }
-+#endif
---- a/sources/crtmpserver/src/crtmpserver.cpp
-+++ b/sources/crtmpserver/src/crtmpserver.cpp
-@@ -298,8 +298,10 @@ void Cleanup() {
- delete gRs.pConfigFile;
- gRs.pConfigFile = NULL;
-
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
- WARN("Doing final OpenSSL cleanup");
- CleanupSSL();
-+#endif
-
- WARN("Shutting down the logger leaving you in the dark. Bye bye... :(");
- Logger::Free(true);
---- a/sources/thelib/src/protocols/ssl/basesslprotocol.cpp
-+++ b/sources/thelib/src/protocols/ssl/basesslprotocol.cpp
-@@ -43,6 +43,7 @@ BaseSSLProtocol::~BaseSSLProtocol() {
- bool BaseSSLProtocol::Initialize(Variant ¶meters) {
- //1. Initialize the SSL library
- if (!_libraryInitialized) {
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
- //3. This is the first time we use the library. So we have to
- //initialize it first
- SSL_library_init();
-@@ -55,6 +56,7 @@ bool BaseSSLProtocol::Initialize(Variant ¶meters) {
- OpenSSL_add_all_algorithms();
- OpenSSL_add_all_ciphers();
- OpenSSL_add_all_digests();
-+#endif
-
- //initialize the random numbers generator
- InitRandGenerator();
#
-# Copyright (C) 2017-2018 Ian Leonard <antonlacon@gmail.com>
+# Copyright (C) 2017-2019 Ian Leonard <antonlacon@gmail.com>
# Copyright (C) 2018 Ted Hess <thess@kitschensync.net>
#
# This is free software, licensed under the GNU General Public License v2.
include $(TOPDIR)/rules.mk
PKG_NAME:=ffmpeg
-PKG_VERSION:=3.2.12
-PKG_RELEASE:=5
+PKG_VERSION:=3.4.6
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://ffmpeg.org/releases/
-PKG_HASH:=8985cea7b1b3b2e0e2b2a8ac6187a7fb022fe8aa9d35101760a000205c59c412
+PKG_HASH:=3572279cb139d9e39dcfbc23edf438ff5311ec3fc5d0dcb3558e49591e5cb83e
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>, \
Ian Leonard <antonlacon@gmail.com>
else ifneq ($(findstring powerpc,$(CONFIG_ARCH)),)
FFMPEG_CONFIGURE+= \
--disable-altivec
-# libavcode/mips/aacdec_mips.c build problem
-else ifneq ($(findstring 24kf,$(CONFIG_CPU_TYPE)),)
+endif
+
+# libavcodec/mips/aacdec_mips.c build problem
+# XXX: disable use of assembly on MIPS. Patches welcome.
+ifneq ($(findstring mips,$(CONFIG_ARCH)),)
FFMPEG_CONFIGURE+= \
- --disable-inline-asm
+ --disable-asm --disable-inline-asm
endif
# selectively disable optimizations according to arch/cpu type
ifneq ($(CONFIG_TARGET_x86),)
ifeq ($(CONFIG_NASM),y)
- # Set yasmexe to anything but YASM/NASM (ffmpeg configure will then find NASM correctly)
- # Newer ffmpeg packages will use --enable-x86asm (with NASM default)
- FFMPEG_CONFIGURE += --yasmexe=xyzzy
+ FFMPEG_CONFIGURE += --enable-x86asm
else
- FFMPEG_CONFIGURE += --disable-yasm
+ FFMPEG_CONFIGURE += --disable-x86asm
endif
endif
$(CP) $(PKG_INSTALL_DIR)/usr/bin/ffprobe $(1)/usr/bin/
endef
+Package/ffprobe-custom/install = $(Package/ffprobe/install)
+
define Package/ffserver/install
$(INSTALL_DIR) $(1)/usr/bin
$(CP) $(PKG_INSTALL_DIR)/usr/bin/ffserver $(1)/usr/bin/
endef
+Package/ffserver-custom/install = $(Package/ffserver/install)
+
define Package/libffmpeg-custom/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{avcodec,avdevice,avformat,avutil}.so.* $(1)/usr/lib/
--- /dev/null
+From 9969fbafe2c83aee196c115acdaafbb623727927 Mon Sep 17 00:00:00 2001
+From: Bernd Kuhls <bernd.kuhls@t-online.de>
+Date: Mon, 28 Jan 2019 21:55:19 +0100
+Subject: package/ffmpeg: fix build with libfdk-aac 2.0.0
+
+Add upstream patches to fix
+http://autobuild.buildroot.net/results/909/9097a2b190f4032ff51eda531f4379a99da5181a/
+
+after fdk-aac was bumped to 2.0.0:
+https://git.buildroot.net/buildroot/commit/package/fdk-aac?id=31ff32824a4f3d09351367c3418b5605f9c40521
+
+Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
+---
+ ...dk-aacenc-Fix-building-with-libfdk-aac-v2.patch | 100 +++++++++++++++++++++
+ ...Consistently-use-a-proper-version-check-m.patch | 99 ++++++++++++++++++++
+ ...-libfdk-aac-Don-t-use-defined-in-a-define.patch | 72 +++++++++++++++
+ 3 files changed, 271 insertions(+)
+ create mode 100644 package/ffmpeg/0002-libfdk-aacenc-Fix-building-with-libfdk-aac-v2.patch
+ create mode 100644 package/ffmpeg/0003-libfdk-aac-Consistently-use-a-proper-version-check-m.patch
+ create mode 100644 package/ffmpeg/0004-libfdk-aac-Don-t-use-defined-in-a-define.patch
+
+(limited to 'package')
+
+diff --git a/package/ffmpeg/0002-libfdk-aacenc-Fix-building-with-libfdk-aac-v2.patch b/package/ffmpeg/0002-libfdk-aacenc-Fix-building-with-libfdk-aac-v2.patch
+new file mode 100644
+index 0000000000..3f452242fa
+--- /dev/null
++++ b/package/ffmpeg/0002-libfdk-aacenc-Fix-building-with-libfdk-aac-v2.patch
+@@ -0,0 +1,100 @@
++From c60fb550302878aba7e86037451f7996e8069289 Mon Sep 17 00:00:00 2001
++From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin@martin.st>
++Date: Fri, 31 Aug 2018 14:25:30 +0300
++Subject: [PATCH] libfdk-aacenc: Fix building with libfdk-aac v2
++MIME-Version: 1.0
++Content-Type: text/plain; charset=UTF-8
++Content-Transfer-Encoding: 8bit
++
++When flushing the encoder, we now need to provide non-null buffer
++parameters for everything, even if they are unused.
++
++The encoderDelay parameter has been replaced by two, nDelay and
++nDelayCore.
++
++Downloaded from
++http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=141c960e21d2860e354f9b90df136184dd00a9a8
++
++Signed-off-by: Martin Storsjö <martin@martin.st>
++[Bernd: rebased for ffmpeg 3.4.5]
++Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
++---
++ libavcodec/libfdk-aacenc.c | 34 +++++++++++++++++++++++++---------
++ 1 file changed, 25 insertions(+), 9 deletions(-)
++
++diff --git a/libavcodec/libfdk-aacenc.c b/libavcodec/libfdk-aacenc.c
++index 0e2051b468..f5adb407ed 100644
++--- a/libavcodec/libfdk-aacenc.c
+++++ b/libavcodec/libfdk-aacenc.c
++@@ -26,6 +26,11 @@
++ #include "audio_frame_queue.h"
++ #include "internal.h"
++
+++#define FDKENC_VER_AT_LEAST(vl0, vl1) \
+++ (defined(AACENCODER_LIB_VL0) && \
+++ ((AACENCODER_LIB_VL0 > vl0) || \
+++ (AACENCODER_LIB_VL0 == vl0 && AACENCODER_LIB_VL1 >= vl1)))
+++
++ typedef struct AACContext {
++ const AVClass *class;
++ HANDLE_AACENCODER handle;
++@@ -286,7 +291,11 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)
++ }
++
++ avctx->frame_size = info.frameLength;
+++#if FDKENC_VER_AT_LEAST(4, 0)
+++ avctx->initial_padding = info.nDelay;
+++#else
++ avctx->initial_padding = info.encoderDelay;
+++#endif
++ ff_af_queue_init(avctx, &s->afq);
++
++ if (avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER) {
++@@ -319,28 +328,35 @@ static int aac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
++ int out_buffer_size, out_buffer_element_size;
++ void *in_ptr, *out_ptr;
++ int ret;
+++ uint8_t dummy_buf[1];
++ AACENC_ERROR err;
++
++ /* handle end-of-stream small frame and flushing */
++ if (!frame) {
+++ /* Must be a non-null pointer, even if it's a dummy. We could use
+++ * the address of anything else on the stack as well. */
+++ in_ptr = dummy_buf;
+++ in_buffer_size = 0;
+++
++ in_args.numInSamples = -1;
++ } else {
++- in_ptr = frame->data[0];
++- in_buffer_size = 2 * avctx->channels * frame->nb_samples;
++- in_buffer_element_size = 2;
+++ in_ptr = frame->data[0];
+++ in_buffer_size = 2 * avctx->channels * frame->nb_samples;
++
++- in_args.numInSamples = avctx->channels * frame->nb_samples;
++- in_buf.numBufs = 1;
++- in_buf.bufs = &in_ptr;
++- in_buf.bufferIdentifiers = &in_buffer_identifier;
++- in_buf.bufSizes = &in_buffer_size;
++- in_buf.bufElSizes = &in_buffer_element_size;
+++ in_args.numInSamples = avctx->channels * frame->nb_samples;
++
++ /* add current frame to the queue */
++ if ((ret = ff_af_queue_add(&s->afq, frame)) < 0)
++ return ret;
++ }
++
+++ in_buffer_element_size = 2;
+++ in_buf.numBufs = 1;
+++ in_buf.bufs = &in_ptr;
+++ in_buf.bufferIdentifiers = &in_buffer_identifier;
+++ in_buf.bufSizes = &in_buffer_size;
+++ in_buf.bufElSizes = &in_buffer_element_size;
+++
++ /* The maximum packet size is 6144 bits aka 768 bytes per channel. */
++ if ((ret = ff_alloc_packet2(avctx, avpkt, FFMAX(8192, 768 * avctx->channels), 0)) < 0)
++ return ret;
++--
++2.20.1
++
+diff --git a/package/ffmpeg/0003-libfdk-aac-Consistently-use-a-proper-version-check-m.patch b/package/ffmpeg/0003-libfdk-aac-Consistently-use-a-proper-version-check-m.patch
+new file mode 100644
+index 0000000000..c358a045d1
+--- /dev/null
++++ b/package/ffmpeg/0003-libfdk-aac-Consistently-use-a-proper-version-check-m.patch
+@@ -0,0 +1,99 @@
++From 48be4c81e0ad081edab65e133e6e1bdec7de3b55 Mon Sep 17 00:00:00 2001
++From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin@martin.st>
++Date: Tue, 4 Sep 2018 08:29:37 +0300
++Subject: [PATCH] libfdk-aac: Consistently use a proper version check macro for
++ detecting features
++MIME-Version: 1.0
++Content-Type: text/plain; charset=UTF-8
++Content-Transfer-Encoding: 8bit
++
++libfdk-aac: Consistently use a proper version check macro for detecting features
++
++The previous version checks checked explicitly for the version
++where the version define was added to the installed headers,
++making an "#ifdef AACDECODER_LIB_VL0" enough. Now that we have
++a need for more diverse version checks than this, convert all checks
++to such checks.
++
++Downloaded from
++http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=ffb9b7a6bab6c6bfd3dd9a7c32e3724209824999
++
++Signed-off-by: Martin Storsjö <martin@martin.st>
++Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
++---
++ libavcodec/libfdk-aacdec.c | 13 ++++++++-----
++ libavcodec/libfdk-aacenc.c | 6 +++---
++ 2 files changed, 11 insertions(+), 8 deletions(-)
++
++diff --git a/libavcodec/libfdk-aacdec.c b/libavcodec/libfdk-aacdec.c
++index 2857b9453f..ef51184ebd 100644
++--- a/libavcodec/libfdk-aacdec.c
+++++ b/libavcodec/libfdk-aacdec.c
++@@ -25,9 +25,12 @@
++ #include "avcodec.h"
++ #include "internal.h"
++
++-/* The version macro is introduced the same time as the setting enum was
++- * changed, so this check should suffice. */
++-#ifndef AACDECODER_LIB_VL0
+++#define FDKDEC_VER_AT_LEAST(vl0, vl1) \
+++ (defined(AACDECODER_LIB_VL0) && \
+++ ((AACDECODER_LIB_VL0 > vl0) || \
+++ (AACDECODER_LIB_VL0 == vl0 && AACDECODER_LIB_VL1 >= vl1)))
+++
+++#if !FDKDEC_VER_AT_LEAST(2, 5) // < 2.5.10
++ #define AAC_PCM_MAX_OUTPUT_CHANNELS AAC_PCM_OUTPUT_CHANNELS
++ #endif
++
++@@ -72,7 +75,7 @@ static const AVOption fdk_aac_dec_options[] = {
++ OFFSET(drc_level), AV_OPT_TYPE_INT, { .i64 = -1}, -1, 127, AD, NULL },
++ { "drc_heavy", "Dynamic Range Control: heavy compression, where [1] is on (RF mode) and [0] is off",
++ OFFSET(drc_heavy), AV_OPT_TYPE_INT, { .i64 = -1}, -1, 1, AD, NULL },
++-#ifdef AACDECODER_LIB_VL0
+++#if FDKDEC_VER_AT_LEAST(2, 5) // 2.5.10
++ { "level_limit", "Signal level limiting", OFFSET(level_limit), AV_OPT_TYPE_INT, { .i64 = 0 }, -1, 1, AD },
++ #endif
++ { NULL }
++@@ -293,7 +296,7 @@ static av_cold int fdk_aac_decode_init(AVCodecContext *avctx)
++ }
++ }
++
++-#ifdef AACDECODER_LIB_VL0
+++#if FDKDEC_VER_AT_LEAST(2, 5) // 2.5.10
++ if (aacDecoder_SetParam(s->handle, AAC_PCM_LIMITER_ENABLE, s->level_limit) != AAC_DEC_OK) {
++ av_log(avctx, AV_LOG_ERROR, "Unable to set in signal level limiting in the decoder\n");
++ return AVERROR_UNKNOWN;
++diff --git a/libavcodec/libfdk-aacenc.c b/libavcodec/libfdk-aacenc.c
++index f5adb407ed..91dcb5a1b9 100644
++--- a/libavcodec/libfdk-aacenc.c
+++++ b/libavcodec/libfdk-aacenc.c
++@@ -156,7 +156,7 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)
++ case 6: mode = MODE_1_2_2_1; sce = 2; cpe = 2; break;
++ /* The version macro is introduced the same time as the 7.1 support, so this
++ should suffice. */
++-#ifdef AACENCODER_LIB_VL0
+++#if FDKENC_VER_AT_LEAST(3, 4) // 3.4.12
++ case 8:
++ sce = 2;
++ cpe = 3;
++@@ -291,7 +291,7 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)
++ }
++
++ avctx->frame_size = info.frameLength;
++-#if FDKENC_VER_AT_LEAST(4, 0)
+++#if FDKENC_VER_AT_LEAST(4, 0) // 4.0.0
++ avctx->initial_padding = info.nDelay;
++ #else
++ avctx->initial_padding = info.encoderDelay;
++@@ -412,7 +412,7 @@ static const uint64_t aac_channel_layout[] = {
++ AV_CH_LAYOUT_4POINT0,
++ AV_CH_LAYOUT_5POINT0_BACK,
++ AV_CH_LAYOUT_5POINT1_BACK,
++-#ifdef AACENCODER_LIB_VL0
+++#if FDKENC_VER_AT_LEAST(3, 4) // 3.4.12
++ AV_CH_LAYOUT_7POINT1_WIDE_BACK,
++ AV_CH_LAYOUT_7POINT1,
++ #endif
++--
++2.20.1
++
+diff --git a/package/ffmpeg/0004-libfdk-aac-Don-t-use-defined-in-a-define.patch b/package/ffmpeg/0004-libfdk-aac-Don-t-use-defined-in-a-define.patch
+new file mode 100644
+index 0000000000..30357b91e1
+--- /dev/null
++++ b/package/ffmpeg/0004-libfdk-aac-Don-t-use-defined-in-a-define.patch
+@@ -0,0 +1,72 @@
++From 452746d80fdaaaf1b546860eb78449c6de3678d7 Mon Sep 17 00:00:00 2001
++From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin@martin.st>
++Date: Wed, 12 Sep 2018 20:03:12 +0300
++Subject: [PATCH] libfdk-aac: Don't use defined() in a #define
++MIME-Version: 1.0
++Content-Type: text/plain; charset=UTF-8
++Content-Transfer-Encoding: 8bit
++
++libfdk-aac: Don't use defined() in a #define
++
++MSVC expands the preprocessor directives differently, making the
++version check fail in the previous form.
++
++Clang can warn about this with -Wexpansion-to-defined (not currently
++enabled by default):
++warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined]
++
++Downloaded from
++http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=2a9e1c122eed66be1b26b747342b848300b226c7
++
++Signed-off-by: Martin Storsjö <martin@martin.st>
++Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
++---
++ libavcodec/libfdk-aacdec.c | 9 ++++++---
++ libavcodec/libfdk-aacenc.c | 9 ++++++---
++ 2 files changed, 12 insertions(+), 6 deletions(-)
++
++diff --git a/libavcodec/libfdk-aacdec.c b/libavcodec/libfdk-aacdec.c
++index ef51184ebd..0fbab36463 100644
++--- a/libavcodec/libfdk-aacdec.c
+++++ b/libavcodec/libfdk-aacdec.c
++@@ -25,10 +25,13 @@
++ #include "avcodec.h"
++ #include "internal.h"
++
+++#ifdef AACDECODER_LIB_VL0
++ #define FDKDEC_VER_AT_LEAST(vl0, vl1) \
++- (defined(AACDECODER_LIB_VL0) && \
++- ((AACDECODER_LIB_VL0 > vl0) || \
++- (AACDECODER_LIB_VL0 == vl0 && AACDECODER_LIB_VL1 >= vl1)))
+++ ((AACDECODER_LIB_VL0 > vl0) || \
+++ (AACDECODER_LIB_VL0 == vl0 && AACDECODER_LIB_VL1 >= vl1))
+++#else
+++#define FDKDEC_VER_AT_LEAST(vl0, vl1) 0
+++#endif
++
++ #if !FDKDEC_VER_AT_LEAST(2, 5) // < 2.5.10
++ #define AAC_PCM_MAX_OUTPUT_CHANNELS AAC_PCM_OUTPUT_CHANNELS
++diff --git a/libavcodec/libfdk-aacenc.c b/libavcodec/libfdk-aacenc.c
++index 91dcb5a1b9..8349e56dcb 100644
++--- a/libavcodec/libfdk-aacenc.c
+++++ b/libavcodec/libfdk-aacenc.c
++@@ -26,10 +26,13 @@
++ #include "audio_frame_queue.h"
++ #include "internal.h"
++
+++#ifdef AACENCODER_LIB_VL0
++ #define FDKENC_VER_AT_LEAST(vl0, vl1) \
++- (defined(AACENCODER_LIB_VL0) && \
++- ((AACENCODER_LIB_VL0 > vl0) || \
++- (AACENCODER_LIB_VL0 == vl0 && AACENCODER_LIB_VL1 >= vl1)))
+++ ((AACENCODER_LIB_VL0 > vl0) || \
+++ (AACENCODER_LIB_VL0 == vl0 && AACENCODER_LIB_VL1 >= vl1))
+++#else
+++#define FDKENC_VER_AT_LEAST(vl0, vl1) 0
+++#endif
++
++ typedef struct AACContext {
++ const AVClass *class;
++--
++2.20.1
++
+--
+cgit v1.2.1
+
include $(TOPDIR)/rules.mk
PKG_NAME:=gphoto2
-PKG_VERSION:=2.5.20
+PKG_VERSION:=2.5.23
PKG_RELEASE:=1
PKG_MAINTAINER:=Leonardo Medici <leonardo_medici@me.com>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=@SF/gphoto
-PKG_HASH:=a36f03b50a8f040f185cbc757f957f03dc05a9210907199e6919ef3f970248f6
+PKG_HASH:=df87092100e7766c9d0a4323217c91908a9c891c0d3670ebf40b76903be458d1
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING
include $(TOPDIR)/rules.mk
PKG_NAME:=graphicsmagick
-PKG_VERSION:=1.3.31
+PKG_VERSION:=1.3.32
PKG_RELEASE:=1
PKG_BUILD_DIR:=$(BUILD_DIR)/GraphicsMagick-$(PKG_VERSION)
PKG_SOURCE:=GraphicsMagick-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=@SF/graphicsmagick
-PKG_HASH:=69ee4ac6a49a818098f47f51c4f430ca9bb2493cb3594f322eb211b8aeb71f41
+PKG_HASH:=d1f70bc6d41de922199ce6b0a04af7b3492b2fc4a2be6ee24e0af4e15250db0a
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=Copyright.txt
--without-zstd \
--without-x
+TARGET_CFLAGS += -flto
+
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(CP) \
include $(TOPDIR)/rules.mk
PKG_NAME:=gst1-libav
-PKG_VERSION:=1.14.4
+PKG_VERSION:=1.16.0
PKG_RELEASE:=1
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org> \
PKG_SOURCE:=gst-libav-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://gstreamer.freedesktop.org/src/gst-libav
-PKG_HASH:=dfd78591901df7853eab7e56a86c34a1b03635da0d3d56b89aa577f1897865da
+PKG_HASH:=dfac119043a9cfdcacd7acde77f674ab172cf2537b5812be52f49e9cddc53d9a
PKG_LICENSE:=GPL-2.0 LGPL-2.0
PKG_LICENSE_FILES:=COPYING COPYING.LIB
LIBAV_CONFIGURE_PARSERS:=$(call FILTER_CONFIG,PARSER,parser,$(LIBAV_PARSERS))
LIBAV_CONFIGURE_PROTOCOLS:=$(call FILTER_CONFIG,PROTOCOL,protocol,$(LIBAV_PROTOCOLS))
-# Strip off FPU notation
-REAL_CPU_TYPE:=$(firstword $(subst +, ,$(CONFIG_CPU_TYPE)))
+# Hack to build on mips64.
+ifneq ($(findstring octeonplus,$(CONFIG_CPU_TYPE)),)
+ REAL_CPU_TYPE:=octeon+
+else
+ # Strip off FPU notation.
+ REAL_CPU_TYPE:=$(firstword $(subst +, ,$(CONFIG_CPU_TYPE)))
+endif
CONFIGURE_ARGS += \
+ --disable-Bsymbolic \
+ --disable-fatal-warnings \
+ --disable-glib-asserts \
+ --disable-gobject-cast-checks \
+ --disable-gtk-doc-html \
+ --disable-valgrind \
--without-system-libav \
+ --with-pic \
--with-libav-extra-configure=" \
$(if $(REAL_CPU_TYPE),--cpu=$(call qstrip,$(REAL_CPU_TYPE)),) \
--disable-bsfs \
--disable-programs \
--disable-devices \
+ --disable-debug \
+ --disable-doc \
+ --disable-extra-warnings \
+ --disable-htmlpages \
+ --disable-manpages \
+ --disable-podpages \
+ --disable-txtpages \
+ --disable-runtime-cpudetect \
--disable-encoders \
$(LIBAV_CONFIGURE_ENCODERS) \
--disable-decoders \
--disable-fma4 \
--disable-avx2 \
--disable-inline-asm \
- --disable-yasm"
-
-TARGET_CFLAGS += -D_GNU_SOURCE
-
-TARGET_LDFLAGS += $(FPIC)
+ --disable-x86asm"
define Package/gst1-libav/install
$(INSTALL_DIR) $(1)/usr/lib/gstreamer-$(GST_VERSION)
include $(TOPDIR)/rules.mk
PKG_NAME:=gst1-plugins-bad
-PKG_VERSION:=1.14.4
+PKG_VERSION:=1.16.0
PKG_RELEASE:=1
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org> \
PKG_BUILD_DIR:=$(BUILD_DIR)/gst-plugins-bad-$(PKG_VERSION)
PKG_SOURCE:=gst-plugins-bad-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=http://gstreamer.freedesktop.org/src/gst-plugins-bad/
-PKG_HASH:=910b4e0e2e897e8b6d06767af1779d70057c309f67292f485ff988d087aa0de5
+PKG_HASH:=22139de35626ada6090bdfa3423b27b7fc15a0198331d25c95e6b12cb1072b05
PKG_FIXUP:=autoreconf
+PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
GST_VERSION:=1.0
CONFIGURE_ARGS += \
+ --disable-Bsymbolic \
--disable-debug \
--disable-examples \
- --disable-nls \
+ --disable-fatal-warnings \
+ --disable-glib-asserts \
+ --disable-gobject-cast-checks \
+ --disable-gtk-doc-html \
+ --disable-introspection \
+ --disable-valgrind \
+ --disable-rpath \
\
--disable-directsound \
--disable-directdraw \
--disable-zbar \
--disable-srtp \
\
+ --without-html-dir \
--without-libiconv-prefix \
--without-libintl-prefix \
--with-libgcrypt-prefix="$(STAGING_DIR)/usr" \
- --without-x \
-
-TARGET_CFLAGS+= -std=gnu99
-
-EXTRA_LDFLAGS+= \
- -Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
- $(if $(ICONV_FULL),-liconv) \
-
+ --with-pic
define Package/gst1-plugins-bad/install
/bin/true
+++ /dev/null
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -2,11 +2,11 @@ DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc
-
- SUBDIRS = \
- gst-libs gst sys ext pkgconfig \
-- m4 common docs tests tools
-+ m4 common docs tools
-
- DIST_SUBDIRS = \
- gst gst-libs sys ext pkgconfig \
-- m4 common docs tests tools
-+ m4 common docs tools
-
- EXTRA_DIST = \
- depcomp \
---- a/configure.ac
-+++ b/configure.ac
-@@ -2600,24 +2600,6 @@ sys/vdpau/Makefile
- sys/wasapi/Makefile
- sys/winks/Makefile
- sys/winscreencap/Makefile
--tests/Makefile
--tests/check/Makefile
--tests/files/Makefile
--tests/examples/Makefile
--tests/examples/avsamplesink/Makefile
--tests/examples/camerabin2/Makefile
--tests/examples/codecparsers/Makefile
--tests/examples/compositor/Makefile
--tests/examples/directfb/Makefile
--tests/examples/audiomixmatrix/Makefile
--tests/examples/ipcpipeline/Makefile
--tests/examples/mpegts/Makefile
--tests/examples/mxf/Makefile
--tests/examples/opencv/Makefile
--tests/examples/uvch264/Makefile
--tests/examples/waylandsink/Makefile
--tests/examples/webrtc/Makefile
--tests/icles/Makefile
- ext/voamrwbenc/Makefile
- ext/voaacenc/Makefile
- ext/assrender/Makefile
+++ /dev/null
---- a/ext/dtls/gstdtlsagent.c
-+++ b/ext/dtls/gstdtlsagent.c
-@@ -124,11 +124,11 @@ _gst_dtls_init_openssl (void)
- }
-
- GST_INFO_OBJECT (NULL, "initializing openssl %lx", OPENSSL_VERSION_NUMBER);
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
- SSL_library_init ();
- SSL_load_error_strings ();
- ERR_load_BIO_strings ();
-
--#if OPENSSL_VERSION_NUMBER < 0x10100000L
- {
- gint i;
- gint num_locks;
-@@ -197,7 +197,7 @@ gst_dtls_agent_init (GstDtlsAgent * self)
- SSL_CTX_set_cipher_list (priv->ssl_context,
- "ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH");
- SSL_CTX_set_read_ahead (priv->ssl_context, 1);
--#if OPENSSL_VERSION_NUMBER >= 0x1000200fL
-+#if (OPENSSL_VERSION_NUMBER >= 0x1000200fL) && (OPENSSL_VERSION_NUMBER < 0x10100000L)
- SSL_CTX_set_ecdh_auto (priv->ssl_context, 1);
- #endif
- }
---- a/ext/dtls/gstdtlscertificate.c
-+++ b/ext/dtls/gstdtlscertificate.c
-@@ -45,8 +45,15 @@
- #endif
- #endif
-
-+#include <openssl/bn.h>
-+#include <openssl/rsa.h>
- #include <openssl/ssl.h>
-
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#define X509_getm_notBefore X509_get_notBefore
-+#define X509_getm_notAfter X509_get_notAfter
-+#endif
-+
- GST_DEBUG_CATEGORY_STATIC (gst_dtls_certificate_debug);
- #define GST_CAT_DEFAULT gst_dtls_certificate_debug
-
-@@ -240,8 +247,8 @@ init_generated (GstDtlsCertificate * self)
-
- X509_set_version (priv->x509, 2);
- ASN1_INTEGER_set (X509_get_serialNumber (priv->x509), 0);
-- X509_gmtime_adj (X509_get_notBefore (priv->x509), 0);
-- X509_gmtime_adj (X509_get_notAfter (priv->x509), 31536000L); /* A year */
-+ X509_gmtime_adj (X509_getm_notBefore (priv->x509), 0);
-+ X509_gmtime_adj (X509_getm_notAfter (priv->x509), 31536000L); /* A year */
- X509_set_pubkey (priv->x509, priv->private_key);
-
- name = X509_get_subject_name (priv->x509);
include $(TOPDIR)/rules.mk
PKG_NAME:=gst1-plugins-base
-PKG_VERSION:=1.14.4
+PKG_VERSION:=1.16.0
PKG_RELEASE:=1
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org> \
PKG_BUILD_DIR:=$(BUILD_DIR)/gst-plugins-base-$(PKG_VERSION)
PKG_SOURCE:=gst-plugins-base-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://gstreamer.freedesktop.org/src/gst-plugins-base
-PKG_HASH:=ca6139490e48863e7706d870ff4e8ac9f417b56f3b9e4b3ce490c13b09a77461
+PKG_HASH:=4093aa7b51e28fb24dfd603893fead8d1b7782f088b05ed0f22a21ef176fb5ae
PKG_CONFIG_DEPENDS:= \
CONFIG_PACKAGE_gst1-mod-alsa \
CONFIG_PACKAGE_libgst1app \
PKG_FIXUP:=autoreconf
+PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
CONFIGURE_ARGS += \
--disable-debug \
--disable-examples \
+ --disable-fatal-warnings \
+ --disable-glib-asserts \
+ --disable-gobject-cast-checks \
+ --disable-gtk-doc-html \
+ --disable-introspection \
+ --disable-rpath \
+ --disable-valgrind \
+ --without-html-dir \
+ --with-pic \
\
$(call GST_COND_SELECT,alsa) \
$(call GST_COND_SELECT,app) \
$(call GST_COND_SELECT,audioresample) \
$(call GST_COND_SELECT,audiotestsrc) \
--disable-cdparanoia \
- --disable-freetypetest \
$(call GST_COND_SELECT,gio) \
--disable-libvisual \
$(call GST_COND_SELECT,ogg) \
\
--without-libiconv-prefix \
--without-libintl-prefix \
- --without-x \
\
--with-audioresample-format=int \
-EXTRA_LDFLAGS+= \
- -Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
- $(if $(ICONV_FULL),-liconv) \
-
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/gstreamer-$(GST_VERSION)
( cd $(PKG_INSTALL_DIR); $(CP) \
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -13,7 +13,6 @@ SUBDIRS = \
+diff -u --recursive gst-plugins-base-1.15.2-vanilla/configure.ac gst-plugins-base-1.15.2/configure.ac
+--- gst-plugins-base-1.15.2-vanilla/configure.ac 2019-02-26 06:39:03.000000000 -0500
++++ gst-plugins-base-1.15.2/configure.ac 2019-03-16 13:30:18.212618930 -0400
+@@ -1044,7 +1044,6 @@
+ docs/libs/Makefile
+ docs/plugins/Makefile
+ docs/version.entities
+-po/Makefile.in
+ common/Makefile
+ common/m4/Makefile
+ m4/Makefile
+diff -u --recursive gst-plugins-base-1.15.2-vanilla/Makefile.am gst-plugins-base-1.15.2/Makefile.am
+--- gst-plugins-base-1.15.2-vanilla/Makefile.am 2019-01-26 13:51:01.000000000 -0500
++++ gst-plugins-base-1.15.2/Makefile.am 2019-03-16 13:30:03.006572636 -0400
+@@ -13,7 +13,6 @@
tools \
tests \
docs \
common \
m4
-@@ -24,7 +23,6 @@ DIST_SUBDIRS = \
+@@ -24,7 +23,6 @@
gst sys ext \
tools \
tests \
common \
m4
---- a/configure.ac
-+++ b/configure.ac
-@@ -1030,7 +1030,6 @@ docs/Makefile
- docs/libs/Makefile
- docs/plugins/Makefile
- docs/version.entities
--po/Makefile.in
- common/Makefile
- common/m4/Makefile
- m4/Makefile
+++ /dev/null
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -11,7 +11,6 @@ SUBDIRS = \
- gst-libs \
- gst sys $(SUBDIRS_EXT) \
- tools \
-- tests \
- docs \
- common \
- m4
-@@ -22,7 +21,6 @@ DIST_SUBDIRS = \
- gst-libs \
- gst sys ext \
- tools \
-- tests \
- common \
- m4
-
---- a/configure.ac
-+++ b/configure.ac
-@@ -992,40 +992,6 @@ pkgconfig/gstreamer-gl.pc
- pkgconfig/gstreamer-gl-uninstalled.pc
- pkgconfig/gstreamer-plugins-base.pc
- pkgconfig/gstreamer-plugins-base-uninstalled.pc
--tests/Makefile
--tests/check/Makefile
--tests/examples/Makefile
--tests/examples/app/Makefile
--tests/examples/audio/Makefile
--tests/examples/decodebin_next/Makefile
--tests/examples/dynamic/Makefile
--tests/examples/encoding/Makefile
--tests/examples/fft/Makefile
--tests/examples/gio/Makefile
--tests/examples/gl/Makefile
--tests/examples/gl/generic/Makefile
--tests/examples/gl/generic/cube/Makefile
--tests/examples/gl/generic/doublecube/Makefile
--tests/examples/gl/generic/recordgraphic/Makefile
--tests/examples/gl/generic/cubeyuv/Makefile
--tests/examples/gl/qt/Makefile
--tests/examples/gl/gtk/Makefile
--tests/examples/gl/gtk/fxtest/Makefile
--tests/examples/gl/gtk/3dvideo/Makefile
--tests/examples/gl/gtk/switchvideooverlay/Makefile
--tests/examples/gl/gtk/filternovideooverlay/Makefile
--tests/examples/gl/gtk/filtervideooverlay/Makefile
--tests/examples/gl/cocoa/Makefile
--tests/examples/gl/sdl/Makefile
--tests/examples/gl/clutter/Makefile
--tests/examples/overlay/Makefile
--tests/examples/seek/Makefile
--tests/examples/snapshot/Makefile
--tests/examples/playback/Makefile
--tests/examples/playrec/Makefile
--tests/files/Makefile
--tests/icles/Makefile
--tests/icles/playback/Makefile
- docs/Makefile
- docs/libs/Makefile
- docs/plugins/Makefile
+++ /dev/null
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -11,13 +11,11 @@ SUBDIRS = \
- gst-libs \
- gst sys $(SUBDIRS_EXT) \
- tools \
-- docs \
- common \
- m4
-
- DIST_SUBDIRS = \
- pkgconfig \
-- docs \
- gst-libs \
- gst sys ext \
- tools \
---- a/configure.ac
-+++ b/configure.ac
-@@ -992,10 +992,6 @@ pkgconfig/gstreamer-gl.pc
- pkgconfig/gstreamer-gl-uninstalled.pc
- pkgconfig/gstreamer-plugins-base.pc
- pkgconfig/gstreamer-plugins-base-uninstalled.pc
--docs/Makefile
--docs/libs/Makefile
--docs/plugins/Makefile
--docs/version.entities
- common/Makefile
- common/m4/Makefile
- m4/Makefile
include $(TOPDIR)/rules.mk
PKG_NAME:=gst1-plugins-good
-PKG_VERSION:=1.14.4
+PKG_VERSION:=1.16.0
PKG_RELEASE:=1
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org> \
PKG_BUILD_DIR:=$(BUILD_DIR)/gst-plugins-good-$(PKG_VERSION)
PKG_SOURCE:=gst-plugins-good-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://gstreamer.freedesktop.org/src/gst-plugins-good/
-PKG_HASH:=5f8b553260cb0aac56890053d8511db1528d53cae10f0287cfce2cb2acc70979
+PKG_HASH:=654adef33380d604112f702c2927574cfc285e31307b79e584113858838bb0fd
PKG_CONFIG_DEPENDS:= \
CONFIG_PACKAGE_gst1-mod-lame \
CONFIG_PACKAGE_gst1-mod-mpg123 \
PKG_FIXUP:=autoreconf
+PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
$(call GST_COND_SELECT,lame) \
$(call GST_COND_SELECT,mpg123) \
\
+ --disable-Bsymbolic \
--disable-debug \
--disable-examples \
+ --disable-fatal-warnings \
+ --disable-glib-asserts \
+ --disable-gobject-cast-checks \
+ --disable-gtk-doc-html \
+ --disable-rpath \
+ --disable-valgrind \
\
--disable-aalib \
--disable-annodex \
--disable-y4m \
--disable-zlib \
\
+ --without-gudev \
+ --without-libv4l2 \
--without-libiconv-prefix \
- --without-libintl-prefix \
- --without-x \
-
-EXTRA_LDFLAGS+= \
- -Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
- $(if $(ICONV_FULL),-liconv) \
-
+ --without-libintl-prefix
define Package/gst1-plugins-good/install
/bin/true
+++ /dev/null
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -2,7 +2,6 @@ DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc
-
- ALWAYS_SUBDIRS = \
- gst sys ext \
-- tests \
- docs \
- common \
- m4 \
---- a/configure.ac
-+++ b/configure.ac
-@@ -1292,22 +1292,6 @@ sys/osxvideo/Makefile
- sys/v4l2/Makefile
- sys/waveform/Makefile
- sys/ximage/Makefile
--tests/Makefile
--tests/check/Makefile
--tests/examples/Makefile
--tests/examples/audiofx/Makefile
--tests/examples/cairo/Makefile
--tests/examples/equalizer/Makefile
--tests/examples/gtk/Makefile
--tests/examples/jack/Makefile
--tests/examples/level/Makefile
--tests/examples/rtp/Makefile
--tests/examples/rtsp/Makefile
--tests/examples/shapewipe/Makefile
--tests/examples/spectrum/Makefile
--tests/examples/v4l2/Makefile
--tests/files/Makefile
--tests/icles/Makefile
- common/Makefile
- common/m4/Makefile
- m4/Makefile
+++ /dev/null
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -2,7 +2,6 @@ DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc
-
- ALWAYS_SUBDIRS = \
- gst sys ext \
-- docs \
- common \
- m4 \
- pkgconfig
---- a/configure.ac
-+++ b/configure.ac
-@@ -1295,9 +1295,6 @@ sys/ximage/Makefile
- common/Makefile
- common/m4/Makefile
- m4/Makefile
--docs/Makefile
--docs/plugins/Makefile
--docs/version.entities
- pkgconfig/Makefile
- pkgconfig/gstreamer-plugins-good-uninstalled.pc
- )
include $(TOPDIR)/rules.mk
PKG_NAME:=gst1-plugins-ugly
-PKG_VERSION:=1.14.4
+PKG_VERSION:=1.16.0
PKG_RELEASE:=1
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org> \
PKG_BUILD_DIR:=$(BUILD_DIR)/gst-plugins-ugly-$(PKG_VERSION)
PKG_SOURCE:=gst-plugins-ugly-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://gstreamer.freedesktop.org/src/gst-plugins-ugly
-PKG_HASH:=ac02d837f166c35ff6ce0738e281680d0b90052cfb1f0255dcf6aaca5f0f6d23
+PKG_HASH:=e30964c5f031c32289e0b25e176c3c95a5737f2052dfc81d0f7427ef0233a4c2
PKG_CONFIG_DEPENDS:= \
CONFIG_PACKAGE_gst1-mod-asf \
CONFIG_PACKAGE_gst1-mod-mpeg2dec \
PKG_FIXUP:=autoreconf
+PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
CONFIGURE_ARGS += \
--disable-debug \
--disable-examples \
+ --disable-fatal-warnings \
+ --disable-glib-asserts \
+ --disable-gobject-cast-checks \
+ --disable-gtk-doc-html \
+ --disable-valgrind \
+ --disable-rpath \
\
--disable-a52dec \
--disable-amrnb \
\
--without-libiconv-prefix \
--without-libintl-prefix \
-
-EXTRA_LDFLAGS+= \
- -Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
- $(if $(ICONV_FULL),-liconv) \
-
+ --with-pic
define Package/gst1-plugins-ugly/install
/bin/true
+++ /dev/null
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -1,7 +1,7 @@
- DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc
-
- SUBDIRS = \
-- gst-libs gst ext docs m4 tests common pkgconfig
-+ gst-libs gst ext docs m4 common pkgconfig
-
- EXTRA_DIST = \
- depcomp \
---- a/configure.ac
-+++ b/configure.ac
-@@ -423,9 +423,6 @@ ext/x264/Makefile
- docs/Makefile
- docs/plugins/Makefile
- docs/version.entities
--tests/Makefile
--tests/check/Makefile
--tests/files/Makefile
- m4/Makefile
- pkgconfig/Makefile
- pkgconfig/gstreamer-plugins-ugly-uninstalled.pc
+++ /dev/null
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -1,7 +1,7 @@
- DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc
-
- SUBDIRS = \
-- gst-libs gst ext docs m4 common pkgconfig
-+ gst-libs gst ext m4 common pkgconfig
-
- EXTRA_DIST = \
- depcomp \
---- a/configure.ac
-+++ b/configure.ac
-@@ -420,9 +420,6 @@ ext/dvdread/Makefile
- ext/mpeg2dec/Makefile
- ext/sidplay/Makefile
- ext/x264/Makefile
--docs/Makefile
--docs/plugins/Makefile
--docs/version.entities
- m4/Makefile
- pkgconfig/Makefile
- pkgconfig/gstreamer-plugins-ugly-uninstalled.pc
include $(TOPDIR)/rules.mk
PKG_NAME:=gstreamer1
-PKG_VERSION:=1.14.4
+PKG_VERSION:=1.16.0
PKG_RELEASE:=2
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org> \
PKG_BUILD_DIR:=$(BUILD_DIR)/gstreamer-$(PKG_VERSION)
PKG_SOURCE:=gstreamer-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://gstreamer.freedesktop.org/src/gstreamer
-PKG_HASH:=f94f6696c5f05a3b3a9183e39c5f5c0b779f75a04c0efa497e7920afa985ffc7
+PKG_HASH:=0e8e2f7118be437cba879353970cf83c2acced825ecb9275ba05d9186ef07c00
PKG_FIXUP:=autoreconf
PKG_REMOVE_FILES:=autogen.sh aclocal.m4
+PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
CONFIGURE_ARGS += \
--enable-static \
+ --disable-Bsymbolic \
--disable-benchmarks \
+ --disable-debug \
--disable-examples \
--disable-failing-tests \
--disable-fatal-warnings \
--disable-introspection \
+ --disable-glib-asserts \
+ --disable-gobject-cast-checks \
--disable-gst-tracer-hooks \
+ --disable-gst-debug \
--disable-gtk-doc-html \
+ --disable-rpath \
--disable-tests \
--disable-valgrind \
--without-dw \
--without-libintl-prefix \
--without-unwind
-EXTRA_LDFLAGS+= \
- -Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
- $(if $(ICONV_FULL),-liconv)
-
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/gstreamer-$(GST_VERSION)
( cd $(PKG_INSTALL_DIR); $(CP) \
data
--- a/configure.ac
+++ b/configure.ac
-@@ -1086,7 +1086,6 @@ libs/gst/net/Makefile
+@@ -1108,7 +1108,6 @@ libs/gst/net/Makefile
plugins/Makefile
plugins/elements/Makefile
plugins/tracers/Makefile
+++ /dev/null
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -7,7 +7,7 @@ aclocaldir = $(datadir)/aclocal
- aclocal_DATA = gst-element-check-1.0.m4
-
- SUBDIRS = pkgconfig \
-- gst libs plugins tests \
-+ gst libs plugins \
- docs \
- m4 \
- common \
-@@ -19,7 +19,7 @@ endif
-
- # These are all the possible subdirs
- DIST_SUBDIRS = pkgconfig \
-- gst libs plugins tools tests \
-+ gst libs plugins tools \
- docs \
- m4 \
- common \
---- a/configure.ac
-+++ b/configure.ac
-@@ -1086,20 +1086,6 @@ libs/gst/net/Makefile
- plugins/Makefile
- plugins/elements/Makefile
- plugins/tracers/Makefile
--tests/Makefile
--tests/benchmarks/Makefile
--tests/check/Makefile
--tests/misc/Makefile
--tests/examples/Makefile
--tests/examples/adapter/Makefile
--tests/examples/controller/Makefile
--tests/examples/stepping/Makefile
--tests/examples/helloworld/Makefile
--tests/examples/memory/Makefile
--tests/examples/netclock/Makefile
--tests/examples/ptp/Makefile
--tests/examples/streamiddemux/Makefile
--tests/examples/streams/Makefile
- tools/Makefile
- common/Makefile
- common/m4/Makefile
+++ /dev/null
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -8,7 +8,6 @@ aclocal_DATA = gst-element-check-1.0.m4
-
- SUBDIRS = pkgconfig \
- gst libs plugins \
-- docs \
- m4 \
- common \
- data
-@@ -20,7 +19,6 @@ endif
- # These are all the possible subdirs
- DIST_SUBDIRS = pkgconfig \
- gst libs plugins tools \
-- docs \
- m4 \
- common \
- data
---- a/configure.ac
-+++ b/configure.ac
-@@ -1089,12 +1089,6 @@ plugins/tracers/Makefile
- tools/Makefile
- common/Makefile
- common/m4/Makefile
--docs/Makefile
--docs/gst/Makefile
--docs/gst/gstreamer.types
--docs/libs/Makefile
--docs/plugins/Makefile
--docs/version.entities
- m4/Makefile
- pkgconfig/Makefile
- stamp.h
--- a/gst/gstplugin.c
+++ b/gst/gstplugin.c
-@@ -776,15 +776,8 @@ _priv_gst_plugin_load_file_for_registry (const gchar * filename,
+@@ -777,15 +777,8 @@ _priv_gst_plugin_load_file_for_registry (const gchar * filename,
goto return_error;
}
--- /dev/null
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=imagemagick
+PKG_VERSION:=7.0.8
+PKG_REVISION:=49
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Val Kulkov <val.kulkov@gmail.com>
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_REVISION).tar.gz
+PKG_SOURCE_URL:=http://github.com/ImageMagick/ImageMagick/archive/$(PKG_VERSION)-$(PKG_REVISION)
+PKG_HASH:=53f7963bbe81520e799e9e178a13757890ed43bc9faf2e86fae1cf58aea28575
+PKG_BUILD_DIR:=$(BUILD_DIR)/ImageMagick-$(PKG_VERSION)-$(PKG_REVISION)
+
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_USE_MIPS16:=0
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/imagemagick/Default
+ SECTION:=multimedia
+ CATEGORY:=Multimedia
+ TITLE:=Image manipulation tools
+ URL:=https://www.imagemagick.org/
+endef
+
+define Package/imagemagick
+ $(call Package/imagemagick/Default)
+ DEPENDS:=+libltdl +libpthread +zlib +libfreetype +libpng +libjpeg +libtiff
+endef
+
+define Package/imagemagick/description
+ImageMagick is a free and open-source software suite for displaying,
+converting, and editing raster image and vector image files.
+NOTE: this package may not be suitable for many embedded devices because
+of its large size. Consider using extroot or alternatively consider
+graphicsmagick which is smaller but similar in functionality.
+endef
+
+define Package/imagemagick/conffiles
+/etc/ImageMagick-7/colors.xml
+/etc/ImageMagick-7/delegates.xml
+/etc/ImageMagick-7/log.xml
+/etc/ImageMagick-7/mime.xml
+/etc/ImageMagick-7/policy.xml
+/etc/ImageMagick-7/quantization-table.xml
+/etc/ImageMagick-7/thresholds.xml
+/etc/ImageMagick-7/type-apple.xml
+/etc/ImageMagick-7/type-dejavu.xml
+/etc/ImageMagick-7/type-ghostscript.xml
+/etc/ImageMagick-7/type-urw-base35.xml
+/etc/ImageMagick-7/type-windows.xml
+/etc/ImageMagick-7/type.xml
+endef
+
+CONFIGURE_ARGS += \
+ --enable-shared \
+ --disable-static \
+ --disable-docs \
+ --enable-dependency-tracking \
+ --with-modules \
+ --with-threads \
+ --with-ltdl \
+ --with-zlib \
+ --disable-hdri \
+ --with-quantum-depth=8 \
+ --disable-deprecated \
+ --disable-cipher \
+ --without-bzlib \
+ --without-autotrace \
+ --without-djvu \
+ --without-dps \
+ --without-fftw \
+ --without-flif \
+ --without-fpx \
+ --without-fontconfig \
+ --without-gslib \
+ --without-gvc \
+ --without-heic \
+ --without-jbig \
+ --without-lcms \
+ --without-lqr \
+ --without-lzma \
+ --without-magick-plus-plus \
+ --without-openexr \
+ --without-openjp2 \
+ --without-raqm \
+ --without-raw \
+ --without-webp \
+ --without-x \
+ --without-zstd \
+ --without-gslib \
+ --without-gvc \
+ --without-pango \
+ --without-perl \
+ --without-rsvg \
+ --without-wmf \
+ --without-xml \
+ --with-freetype \
+ --with-jpeg \
+ --with-png \
+ --with-tiff
+
+TARGET_CFLAGS += -flto
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/include
+ $(CP) \
+ $(PKG_INSTALL_DIR)/usr/include/* \
+ $(1)/usr/include/
+
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) \
+ $(PKG_INSTALL_DIR)/usr/lib/*.so* \
+ $(1)/usr/lib/
+
+ $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+ $(INSTALL_DATA) \
+ $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \
+ $(1)/usr/lib/pkgconfig/
+endef
+
+IMlibdir:=usr/lib/ImageMagick-$(PKG_VERSION)
+define Package/imagemagick/install
+ $(INSTALL_DIR) $(1)/etc $(1)/usr/bin $(1)/$(IMlibdir)
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so.* $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
+ $(RM) $(1)/usr/bin/*-config
+ $(CP) $(PKG_INSTALL_DIR)/etc/ImageMagick-* $(1)/etc/
+ $(CP) $(PKG_INSTALL_DIR)/$(IMlibdir)/* $(1)/$(IMlibdir)/
+endef
+
+$(eval $(call BuildPackage,imagemagick))
include $(TOPDIR)/rules.mk
PKG_NAME:=minidlna
-PKG_VERSION:=1.2.1
-PKG_RELEASE:=3
+PKG_RELEASE:=1
-PKG_SOURCE_URL:=@SF/minidlna
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=67388ba23ab0c7033557a32084804f796aa2a796db7bb2b770fb76ac2a742eec
+PKG_SOURCE_URL=git://minidlna.git.sourceforge.net/gitroot/minidlna/minidlna
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_DATE:=2018-04-10
+PKG_SOURCE_VERSION:=799e6cf505ec470b2bf0ae4118143380aa16b837
+PKG_MIRROR_HASH:=67cc817e671de99e5a3f5ed237f89e22470f1de94819bcaba86c0ba821104af5
PKG_LICENSE:=GPL-2.0 BSD-3-Clause
PKG_LICENSE_FILES:=COPYING LICENCE.miniupnpd
DEPENDS:= +libpthread +libexif +libjpeg +libsqlite3 +libffmpeg \
+libid3tag +libflac +libvorbis +libuuid \
$(ICONV_DEPENDS) $(INTL_DEPENDS)
+ USERID:=minidlna:minidlna
endef
define Package/minidlna/description
config minidlna config
- option 'enabled' '1'
+ option 'enabled' '0'
+ option user 'minidlna'
option port '8200'
option interface 'br-lan'
option friendly_name 'OpenWrt DLNA Server'
option db_dir '/var/run/minidlna'
- option log_dir '/var/log'
+ option log_dir '/var/log/minidlna'
option inotify '1'
option enable_tivo '0'
option wide_links '0'
SERVICE_USE_PID=1
SERVICE_PID_FILE=/var/run/minidlna/minidlna.pid
-MINIDLNA_CONFIG_FILE="/tmp/minidlna.conf"
+MINIDLNA_CONFIG_FILE="/var/etc/minidlna.conf"
minidlna_cfg_append() {
echo "$1" >> "$MINIDLNA_CONFIG_FILE"
minidlna_cfg_add_media_dir() {
local val=$1
-
minidlna_cfg_append "media_dir=$val"
}
local port
local interface
- config_get port $cfg port
- config_get interface $cfg interface
+ config_get port "$cfg" port
+ config_get interface "$cfg" interface
[ -z "$interface" -o -t "$port" ] && return 1
+ mkdir -p /var/etc
echo "# this file is generated automatically, don't edit" > "$MINIDLNA_CONFIG_FILE"
minidlna_cfg_append "port=$port"
minidlna_cfg_append "network_interface=$interface"
- minidlna_cfg_addstr $cfg friendly_name
- minidlna_cfg_addstr $cfg db_dir
- minidlna_cfg_addstr $cfg log_dir
- minidlna_cfg_addstr $cfg log_level 'error'
- minidlna_cfg_addbool $cfg inotify '1'
- minidlna_cfg_addbool $cfg enable_tivo '0'
- minidlna_cfg_addbool $cfg wide_links '0'
- minidlna_cfg_addbool $cfg strict_dlna '0'
- minidlna_cfg_addstr $cfg album_art_names
- minidlna_cfg_addstr $cfg presentation_url
- minidlna_cfg_addstr $cfg notify_interval '900'
- minidlna_cfg_addstr $cfg serial '12345678'
- minidlna_cfg_addstr $cfg model_number '1'
- minidlna_cfg_addstr $cfg minissdpsocket
- minidlna_cfg_addstr $cfg root_container '.'
+ minidlna_cfg_addstr "$cfg" friendly_name
+ minidlna_cfg_addstr "$cfg" user
+ minidlna_cfg_addstr "$cfg" db_dir
+ minidlna_cfg_addstr "$cfg" log_dir
+ minidlna_cfg_addstr "$cfg" log_level 'error'
+ minidlna_cfg_addbool "$cfg" inotify '1'
+ minidlna_cfg_addbool "$cfg" enable_tivo '0'
+ minidlna_cfg_addbool "$cfg" wide_links '0'
+ minidlna_cfg_addbool "$cfg" strict_dlna '0'
+ minidlna_cfg_addstr "$cfg" album_art_names
+ minidlna_cfg_addstr "$cfg" presentation_url
+ minidlna_cfg_addstr "$cfg" notify_interval '900'
+ minidlna_cfg_addstr "$cfg" serial '12345678'
+ minidlna_cfg_addstr "$cfg" model_number '1'
+ minidlna_cfg_addstr "$cfg" minissdpsocket
+ minidlna_cfg_addstr "$cfg" root_container '.'
config_list_foreach "$cfg" "media_dir" minidlna_cfg_add_media_dir
return 0
local enabled
local db_dir
local log_dir
+ local user
config_load 'minidlna'
config_get_bool enabled config 'enabled' '0'
minidlna_create_config config || return 1
config_get db_dir config 'db_dir' '/var/run/minidlna'
- config_get log_dir config 'log_dir' '/var/log'
+ config_get log_dir config 'log_dir' '/var/log/minidlna'
+ config_get user config 'user' 'root'
+
+ mkdir -m 0755 -p "$db_dir" "$log_dir"
+ chown -R "$user" "$db_dir" "$log_dir"
- mkdir -m 0755 -p $db_dir
- mkdir -m 0755 -p $log_dir
service_start /usr/bin/minidlna -f "$MINIDLNA_CONFIG_FILE"
}
--- /dev/null
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -17,7 +17,7 @@
+
+ AM_CFLAGS = -Wall -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 @STATIC_CFLAGS@
+
+-SUBDIRS=po
++SUBDIRS=
+
+ sbin_PROGRAMS = minidlnad
+ check_PROGRAMS = testupnpdescgen
+--- a/configure.ac
++++ b/configure.ac
+@@ -647,6 +647,8 @@ case "$target_os" in
+ esac
+
+
+-AC_OUTPUT([ po/Makefile.in
+-Makefile
+-])
++# AC_OUTPUT([ po/Makefile.in
++# Makefile
++# ])
++AC_CONFIG_FILES([Makefile])
++AC_OUTPUT
+++ /dev/null
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -17,7 +17,7 @@
-
- AM_CFLAGS = -Wall -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 @STATIC_CFLAGS@
-
--SUBDIRS=po
-+SUBDIRS=
-
- sbin_PROGRAMS = minidlnad
- check_PROGRAMS = testupnpdescgen
---- a/configure.ac
-+++ b/configure.ac
-@@ -644,6 +644,8 @@ case "$target_os" in
- esac
-
-
--AC_OUTPUT([ po/Makefile.in
--Makefile
--])
-+# AC_OUTPUT([ po/Makefile.in
-+# Makefile
-+# ])
-+AC_CONFIG_FILES([Makefile])
-+AC_OUTPUT
--- /dev/null
+From d297624e533d6d4274c750e3769749c3d7f121c8 Mon Sep 17 00:00:00 2001
+From: Daniel Kamil Kozar <dkk089@gmail.com>
+Date: Sat, 15 Dec 2018 16:34:30 +0100
+Subject: [PATCH] Mark all instances of magic_container_s as const
+
+---
+ containers.c | 38 +++++++++++++++++++-------------------
+ containers.h | 6 +++---
+ scanner.c | 2 +-
+ upnpsoap.c | 6 +++---
+ 4 files changed, 26 insertions(+), 26 deletions(-)
+
+--- a/containers.c
++++ b/containers.c
+@@ -25,23 +25,23 @@
+
+ #define NINETY_DAYS "7776000"
+
+-const char *music_id = MUSIC_ID;
+-const char *music_all_id = MUSIC_ALL_ID;
+-const char *music_genre_id = MUSIC_GENRE_ID;
+-const char *music_artist_id = MUSIC_ARTIST_ID;
+-const char *music_album_id = MUSIC_ALBUM_ID;
+-const char *music_plist_id = MUSIC_PLIST_ID;
+-const char *music_dir_id = MUSIC_DIR_ID;
+-const char *video_id = VIDEO_ID;
+-const char *video_all_id = VIDEO_ALL_ID;
+-const char *video_dir_id = VIDEO_DIR_ID;
+-const char *image_id = IMAGE_ID;
+-const char *image_all_id = IMAGE_ALL_ID;
+-const char *image_date_id = IMAGE_DATE_ID;
+-const char *image_camera_id = IMAGE_CAMERA_ID;
+-const char *image_dir_id = IMAGE_DIR_ID;
++static const char *music_id = MUSIC_ID;
++static const char *music_all_id = MUSIC_ALL_ID;
++static const char *music_genre_id = MUSIC_GENRE_ID;
++static const char *music_artist_id = MUSIC_ARTIST_ID;
++static const char *music_album_id = MUSIC_ALBUM_ID;
++static const char *music_plist_id = MUSIC_PLIST_ID;
++static const char *music_dir_id = MUSIC_DIR_ID;
++static const char *video_id = VIDEO_ID;
++static const char *video_all_id = VIDEO_ALL_ID;
++static const char *video_dir_id = VIDEO_DIR_ID;
++static const char *image_id = IMAGE_ID;
++static const char *image_all_id = IMAGE_ALL_ID;
++static const char *image_date_id = IMAGE_DATE_ID;
++static const char *image_camera_id = IMAGE_CAMERA_ID;
++static const char *image_dir_id = IMAGE_DIR_ID;
+
+-struct magic_container_s magic_containers[] =
++const struct magic_container_s magic_containers[] =
+ {
+ /* Alternate root container */
+ { NULL,
+@@ -124,7 +124,7 @@ struct magic_container_s magic_container
+ { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0 }
+ };
+
+-struct magic_container_s *
++const struct magic_container_s *
+ in_magic_container(const char *id, int flags, const char **real_id)
+ {
+ size_t len;
+@@ -154,7 +154,7 @@ in_magic_container(const char *id, int f
+ return NULL;
+ }
+
+-struct magic_container_s *
++const struct magic_container_s *
+ check_magic_container(const char *id, int flags)
+ {
+ int i;
+--- a/containers.h
++++ b/containers.h
+@@ -30,7 +30,7 @@ struct magic_container_s {
+ int required_flags;
+ };
+
+-extern struct magic_container_s magic_containers[];
++extern const struct magic_container_s magic_containers[];
+
+-struct magic_container_s *in_magic_container(const char *id, int flags, const char **real_id);
+-struct magic_container_s *check_magic_container(const char *id, int flags);
++const struct magic_container_s *in_magic_container(const char *id, int flags, const char **real_id);
++const struct magic_container_s *check_magic_container(const char *id, int flags);
+--- a/scanner.c
++++ b/scanner.c
+@@ -587,7 +587,7 @@ CreateDatabase(void)
+ }
+ for( i=0; magic_containers[i].objectid_match; i++ )
+ {
+- struct magic_container_s *magic = &magic_containers[i];
++ const struct magic_container_s *magic = &magic_containers[i];
+ if (!magic->name)
+ continue;
+ if( sql_get_int_field(db, "SELECT 1 from OBJECTS where OBJECT_ID = '%s'", magic->objectid_match) == 0 )
+--- a/upnpsoap.c
++++ b/upnpsoap.c
+@@ -800,7 +800,7 @@ add_res(char *size, char *duration, char
+ }
+
+ static int
+-get_child_count(const char *object, struct magic_container_s *magic)
++get_child_count(const char *object, const struct magic_container_s *magic)
+ {
+ int ret;
+
+@@ -1292,7 +1292,7 @@ BrowseContentDirectory(struct upnphttp *
+ "<Result>"
+ "<DIDL-Lite"
+ CONTENT_DIRECTORY_SCHEMAS;
+- struct magic_container_s *magic;
++ const struct magic_container_s *magic;
+ char *zErrMsg = NULL;
+ char *sql, *ptr;
+ struct Response args;
+@@ -1807,7 +1807,7 @@ SearchContentDirectory(struct upnphttp *
+ "<Result>"
+ "<DIDL-Lite"
+ CONTENT_DIRECTORY_SCHEMAS;
+- struct magic_container_s *magic;
++ const struct magic_container_s *magic;
+ char *zErrMsg = NULL;
+ char *sql, *ptr;
+ struct Response args;
--- /dev/null
+From e0065b8343bc963a89556449e00f1d20086cc1f1 Mon Sep 17 00:00:00 2001
+From: Daniel Kamil Kozar <dkk089@gmail.com>
+Date: Sat, 15 Dec 2018 16:26:37 +0100
+Subject: [PATCH] Wrap container definitions into a structure
+
+---
+ containers.c | 25 +++++++++++++++++++++++++
+ containers.h | 8 ++++++++
+ scanner.c | 33 ++++++---------------------------
+ 3 files changed, 39 insertions(+), 27 deletions(-)
+
+--- a/containers.c
++++ b/containers.c
+@@ -23,6 +23,31 @@
+ #include "containers.h"
+ #include "log.h"
+
++const struct container_s containers[] = {
++ { "0","-1", "root" },
++ { MUSIC_ID, "0", "Music" },
++ { MUSIC_ALL_ID, MUSIC_ID, "All Music" },
++ { MUSIC_GENRE_ID, MUSIC_ID, "Genre" },
++ { MUSIC_ARTIST_ID, MUSIC_ID, "Artist" },
++ { MUSIC_ALBUM_ID, MUSIC_ID, "Album" },
++ { MUSIC_DIR_ID, MUSIC_ID, "Folders" },
++ { MUSIC_PLIST_ID, MUSIC_ID, "Playlists" },
++
++ { VIDEO_ID, "0", "Video" },
++ { VIDEO_ALL_ID, VIDEO_ID, "All Video" },
++ { VIDEO_DIR_ID, VIDEO_ID, "Folders" },
++
++ { IMAGE_ID, "0", "Pictures" },
++ { IMAGE_ALL_ID, IMAGE_ID, "All Pictures" },
++ { IMAGE_DATE_ID, IMAGE_ID, "Date Taken" },
++ { IMAGE_CAMERA_ID, IMAGE_ID, "Camera" },
++ { IMAGE_DIR_ID, IMAGE_ID, "Folders" },
++
++ { BROWSEDIR_ID, "0", "Browse Folders" },
++
++ { 0, 0, 0 }
++};
++
+ #define NINETY_DAYS "7776000"
+
+ static const char *music_id = MUSIC_ID;
+--- a/containers.h
++++ b/containers.h
+@@ -16,6 +16,14 @@
+ * along with MiniDLNA. If not, see <http://www.gnu.org/licenses/>.
+ */
+
++struct container_s {
++ const char *object_id;
++ const char *parent_id;
++ const char *name;
++};
++
++extern const struct container_s containers[];
++
+ struct magic_container_s {
+ const char *name;
+ const char *objectid_match;
+--- a/scanner.c
++++ b/scanner.c
+@@ -529,30 +529,7 @@ insert_file(const char *name, const char
+ int
+ CreateDatabase(void)
+ {
+- int ret, i;
+- const char *containers[] = { "0","-1", "root",
+- MUSIC_ID, "0", _("Music"),
+- MUSIC_ALL_ID, MUSIC_ID, _("All Music"),
+- MUSIC_GENRE_ID, MUSIC_ID, _("Genre"),
+- MUSIC_ARTIST_ID, MUSIC_ID, _("Artist"),
+- MUSIC_ALBUM_ID, MUSIC_ID, _("Album"),
+- MUSIC_DIR_ID, MUSIC_ID, _("Folders"),
+- MUSIC_PLIST_ID, MUSIC_ID, _("Playlists"),
+-
+- VIDEO_ID, "0", _("Video"),
+- VIDEO_ALL_ID, VIDEO_ID, _("All Video"),
+- VIDEO_DIR_ID, VIDEO_ID, _("Folders"),
+-
+- IMAGE_ID, "0", _("Pictures"),
+- IMAGE_ALL_ID, IMAGE_ID, _("All Pictures"),
+- IMAGE_DATE_ID, IMAGE_ID, _("Date Taken"),
+- IMAGE_CAMERA_ID, IMAGE_ID, _("Camera"),
+- IMAGE_DIR_ID, IMAGE_ID, _("Folders"),
+-
+- BROWSEDIR_ID, "0", _("Browse Folders"),
+- 0 };
+-
+- ret = sql_exec(db, create_objectTable_sqlite);
++ int ret = sql_exec(db, create_objectTable_sqlite);
+ if( ret != SQLITE_OK )
+ goto sql_failed;
+ ret = sql_exec(db, create_detailTable_sqlite);
+@@ -576,16 +553,18 @@ CreateDatabase(void)
+ ret = sql_exec(db, "INSERT into SETTINGS values ('UPDATE_ID', '0')");
+ if( ret != SQLITE_OK )
+ goto sql_failed;
+- for( i=0; containers[i]; i=i+3 )
++ for( int i=0; containers[i].name; ++i )
+ {
++ const struct container_s *c = &containers[i];
++ const char *name = _(c->name);
+ ret = sql_exec(db, "INSERT into OBJECTS (OBJECT_ID, PARENT_ID, DETAIL_ID, CLASS, NAME)"
+ " values "
+ "('%s', '%s', %lld, 'container.storageFolder', '%q')",
+- containers[i], containers[i+1], GetFolderMetadata(containers[i+2], NULL, NULL, NULL, 0), containers[i+2]);
++ c->object_id, c->parent_id, GetFolderMetadata(name, NULL, NULL, NULL, 0), name);
+ if( ret != SQLITE_OK )
+ goto sql_failed;
+ }
+- for( i=0; magic_containers[i].objectid_match; i++ )
++ for( int i=0; magic_containers[i].objectid_match; i++ )
+ {
+ const struct magic_container_s *magic = &magic_containers[i];
+ if (!magic->name)
--- /dev/null
+From be9de8b2e0864b46498496af9ffdc31c0e7b764a Mon Sep 17 00:00:00 2001
+From: Daniel Kamil Kozar <dkk089@gmail.com>
+Date: Sun, 16 Dec 2018 14:21:58 +0100
+Subject: [PATCH] Reduce duplication in sql.c
+
+---
+ sql.c | 166 ++++++++++++++++++++--------------------------------------
+ 1 file changed, 58 insertions(+), 108 deletions(-)
+
+--- a/sql.c
++++ b/sql.c
+@@ -65,122 +65,72 @@ sql_get_table(sqlite3 *db, const char *s
+ return ret;
+ }
+
++#define sql_get_field(type, column_get_fn) \
++ va_list ap;\
++ int counter, result;\
++ char *sql;\
++ type ret;\
++ sqlite3_stmt *stmt;\
++ \
++ va_start(ap, fmt);\
++ sql = sqlite3_vmprintf(fmt, ap);\
++ va_end(ap);\
++\
++ /*DPRINTF(E_DEBUG, L_DB_SQL, "sql: %s\n", sql); */ \
++\
++ switch (sqlite3_prepare_v2(db, sql, -1, &stmt, NULL))\
++ {\
++ case SQLITE_OK:\
++ break;\
++ default:\
++ DPRINTF(E_ERROR, L_DB_SQL, "prepare failed: %s\n%s\n", sqlite3_errmsg(db), sql);\
++ sqlite3_free(sql);\
++ return -1;\
++ }\
++\
++ for (counter = 0;\
++ ((result = sqlite3_step(stmt)) == SQLITE_BUSY || result == SQLITE_LOCKED) && counter < 2;\
++ counter++) {\
++ /* While SQLITE_BUSY has a built in timeout,\
++ * SQLITE_LOCKED does not, so sleep */\
++ if (result == SQLITE_LOCKED)\
++ sleep(1);\
++ }\
++\
++ switch (result)\
++ {\
++ case SQLITE_DONE:\
++ /* no rows returned */\
++ ret = 0;\
++ break;\
++ case SQLITE_ROW:\
++ if (sqlite3_column_type(stmt, 0) == SQLITE_NULL)\
++ {\
++ ret = 0;\
++ break;\
++ }\
++ ret = column_get_fn(stmt, 0);\
++ break;\
++ default:\
++ DPRINTF(E_WARN, L_DB_SQL, "%s: step failed: %s\n%s\n", __func__, sqlite3_errmsg(db), sql);\
++ ret = -1;\
++ break;\
++ }\
++ sqlite3_free(sql);\
++ sqlite3_finalize(stmt);\
++\
++ return ret;
++
+ int
+ sql_get_int_field(sqlite3 *db, const char *fmt, ...)
+ {
+- va_list ap;
+- int counter, result;
+- char *sql;
+- int ret;
+- sqlite3_stmt *stmt;
+-
+- va_start(ap, fmt);
+- sql = sqlite3_vmprintf(fmt, ap);
+- va_end(ap);
+-
+- //DPRINTF(E_DEBUG, L_DB_SQL, "sql: %s\n", sql);
+-
+- switch (sqlite3_prepare_v2(db, sql, -1, &stmt, NULL))
+- {
+- case SQLITE_OK:
+- break;
+- default:
+- DPRINTF(E_ERROR, L_DB_SQL, "prepare failed: %s\n%s\n", sqlite3_errmsg(db), sql);
+- sqlite3_free(sql);
+- return -1;
+- }
+-
+- for (counter = 0;
+- ((result = sqlite3_step(stmt)) == SQLITE_BUSY || result == SQLITE_LOCKED) && counter < 2;
+- counter++) {
+- /* While SQLITE_BUSY has a built in timeout,
+- * SQLITE_LOCKED does not, so sleep */
+- if (result == SQLITE_LOCKED)
+- sleep(1);
+- }
+-
+- switch (result)
+- {
+- case SQLITE_DONE:
+- /* no rows returned */
+- ret = 0;
+- break;
+- case SQLITE_ROW:
+- if (sqlite3_column_type(stmt, 0) == SQLITE_NULL)
+- {
+- ret = 0;
+- break;
+- }
+- ret = sqlite3_column_int(stmt, 0);
+- break;
+- default:
+- DPRINTF(E_WARN, L_DB_SQL, "%s: step failed: %s\n%s\n", __func__, sqlite3_errmsg(db), sql);
+- ret = -1;
+- break;
+- }
+- sqlite3_free(sql);
+- sqlite3_finalize(stmt);
+-
+- return ret;
++ sql_get_field(int, sqlite3_column_int)
+ }
+
+ int64_t
+ sql_get_int64_field(sqlite3 *db, const char *fmt, ...)
+ {
+- va_list ap;
+- int counter, result;
+- char *sql;
+- int64_t ret;
+- sqlite3_stmt *stmt;
+-
+- va_start(ap, fmt);
+- sql = sqlite3_vmprintf(fmt, ap);
+- va_end(ap);
+-
+- //DPRINTF(E_DEBUG, L_DB_SQL, "sql: %s\n", sql);
+-
+- switch (sqlite3_prepare_v2(db, sql, -1, &stmt, NULL))
+- {
+- case SQLITE_OK:
+- break;
+- default:
+- DPRINTF(E_ERROR, L_DB_SQL, "prepare failed: %s\n%s\n", sqlite3_errmsg(db), sql);
+- sqlite3_free(sql);
+- return -1;
+- }
+-
+- for (counter = 0;
+- ((result = sqlite3_step(stmt)) == SQLITE_BUSY || result == SQLITE_LOCKED) && counter < 2;
+- counter++) {
+- /* While SQLITE_BUSY has a built in timeout,
+- * SQLITE_LOCKED does not, so sleep */
+- if (result == SQLITE_LOCKED)
+- sleep(1);
+- }
+-
+- switch (result)
+- {
+- case SQLITE_DONE:
+- /* no rows returned */
+- ret = 0;
+- break;
+- case SQLITE_ROW:
+- if (sqlite3_column_type(stmt, 0) == SQLITE_NULL)
+- {
+- ret = 0;
+- break;
+- }
+- ret = sqlite3_column_int64(stmt, 0);
+- break;
+- default:
+- DPRINTF(E_WARN, L_DB_SQL, "%s: step failed: %s\n%s\n", __func__, sqlite3_errmsg(db), sql);
+- ret = -1;
+- break;
+- }
+- sqlite3_free(sql);
+- sqlite3_finalize(stmt);
+-
+- return ret;
++ sql_get_field(int64_t, sqlite3_column_int64)
+ }
+
+ char *
--- /dev/null
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=minisatip
+PKG_RELEASE:=1
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/catalinii/minisatip.git
+PKG_SOURCE_VERSION:=b9fcb51b207f3b26b32b9b7c0e633cffea82274d
+PKG_SOURCE_DATE:=2019-07-08
+PKG_MIRROR_HASH:=468ef84a491a6c7601e683cf166d95a97ea5e617d98b44e0d3393b194b28f692
+
+PKG_MAINTAINER:=Daniel Kucera <github@danman.eu>
+PKG_LICENSE:=GPL-2.0-or-later
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/minisatip
+ TITLE:=SATIP server
+ URL:=https://github.com/catalinii/minisatip
+ SECTION:=multimedia
+ CATEGORY:=Multimedia
+ DEPENDS:=+MINISATIP_AES:libopenssl
+endef
+
+define Package/minisatip/config
+ if PACKAGE_minisatip
+
+ config MINISATIP_AES
+ bool "OpenSSL (AES as part of DVBAPI)"
+ default n
+
+ config MINISATIP_CLIENT
+ bool "SatIP Client"
+ default y
+
+ endif
+endef
+
+ifeq ($(CONFIG_MINISATIP_AES),)
+ CONFIGURE_ARGS += --disable-dvbaes
+endif
+
+ifeq ($(CONFIG_MINISATIP_CLIENT),)
+ CONFIGURE_ARGS += --disable-satipc
+endif
+
+define Package/minisatip/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/minisatip $(1)/usr/bin/
+ $(INSTALL_DIR) $(1)/usr/share/minisatip/html/
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/html/* $(1)/usr/share/minisatip/html
+ $(INSTALL_DIR) $(1)/etc/init.d
+ $(INSTALL_BIN) ./files/minisatip.init $(1)/etc/init.d/minisatip
+endef
+
+$(eval $(call BuildPackage,minisatip))
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+USE_PROCD=1
+START=99
+
+start_service() {
+ procd_open_instance minisatip
+ procd_set_param command /usr/bin/minisatip -f -R /usr/share/minisatip/html
+
+ procd_set_param respawn
+
+ procd_set_param stdout 1
+ procd_set_param stderr 1
+ procd_close_instance
+}
+
include $(TOPDIR)/rules.mk
PKG_NAME:=mjpg-streamer
-PKG_VERSION:=2018-04-14
-PKG_RELEASE:=1
+PKG_VERSION:=2018-10-25
+PKG_RELEASE:=2
PKG_MAINTAINER:=Roger D <rogerdammit@gmail.com>, \
Ted Hess <thess@kitschensync.net>
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/jacksonliam/mjpg-streamer.git
-PKG_SOURCE_VERSION:=821c330ea6bbb5fbed98d48e00aac156e923161b
+PKG_SOURCE_VERSION:=ddb69b7b4f114f3c2ca01adf55712792ca8aed43
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_MIRROR_HASH:=f95e54bc95c808b9867bbca364e58b6c7e08cb26613205f8d87450ab9c899942
+PKG_MIRROR_HASH:=d87ebff5de0c17a35a5b81adad5aa234bc70fe2bb17d1c6277c726845dc043bb
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=LICENSE
option led 'auto'
option www '/www/webcam'
option port '8080'
+ #option listen_ip '192.168.1.1'
option username 'openwrt'
option password 'openwrt'
config_get port "$s" 'port'
[ -n "$port" ] && output_arg="${output_arg} --port $port"
+ config_get listen_ip "$s" 'listen_ip'
+ [ -n "$listen_ip" ] && output_arg="${output_arg} --listen $listen_ip"
+
config_get www "$s" 'www'
[ -n "$www" ] && output_arg="${output_arg} --www $www"
[ -n "$username" ] && [ -n "$password" ] && output_arg="${output_arg} --credentials $username:$password"
fi
+ if [ "x$output" = 'xfile' ]; then
+ output_arg="output_file.so"
+
+ config_get folder "$s" 'folder'
+ [ -n "$folder" ] && output_arg="${output_arg} --folder $folder"
+
+ config_get delay "$s" 'delay'
+ [ -n "$delay" ] && output_arg="${output_arg} --delay $delay"
+
+ config_get link "$s" 'link'
+ [ -n "$link" ] && output_arg="${output_arg} --link $link"
+
+ config_get ringbuffer "$s" 'ringbuffer'
+ [ -n "$ringbuffer" ] && output_arg="${output_arg} --size $ringbuffer"
+
+ config_get exceed "$s" 'exceed'
+ [ -n "$exceed" ] && output_arg="${output_arg} --exceed $exceed"
+
+ config_get command "$s" 'command'
+ [ -n "$command" ] && output_arg="${output_arg} --command $command"
+
+ fi
+
if [ -z "$output_arg" ]; then
error "unsuported output option '$output' in section '$s'"
return 1
add_subdirectory(plugins/output_udp)
-add_subdirectory(plugins/output_viewer)
+#add_subdirectory(plugins/output_viewer)
-
+ add_subdirectory(plugins/output_zmqserver)
+
#
# mjpg_streamer executable
@@ -49,8 +49,7 @@ set (MJPG_STREAMER_PLUGIN_INSTALL_PATH "
# Global dependencies
#
-
+
-find_library(JPEG_LIB jpeg)
-
+#find_library(JPEG_LIB jpeg)
-
+
#
# Input plugins
--- a/plugins/input_uvc/CMakeLists.txt
+++ b/plugins/input_uvc/CMakeLists.txt
-@@ -8,27 +8,27 @@ if (PLUGIN_INPUT_UVC)
-
+@@ -9,27 +9,27 @@ if (PLUGIN_INPUT_UVC)
add_definitions(-DLINUX -D_GNU_SOURCE)
-- find_library(V4L2_LIB v4l2)
-+# find_library(V4L2_LIB v4l2)
+ find_library(V4L2_LIB v4l2)
+- find_library(JPEG_LIB jpeg)
++# find_library(JPEG_LIB jpeg)
- if (V4L2_LIB)
- add_definitions(-DUSE_LIBV4L2)
- endif (V4L2_LIB)
+# if (V4L2_LIB)
-+# add_definitions(-DUSE_LIBV4L2)
++# add_definitions(-DUSE_LIBV4L2)
+# endif (V4L2_LIB)
- if (NOT JPEG_LIB)
PKG_NAME:=tvheadend
PKG_VERSION:=4.0.10
-PKG_RELEASE:=3
+PKG_RELEASE:=4
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/tvheadend/tvheadend/tar.gz/v$(PKG_VERSION)?
--disable-libav \
--enable-bundle
-TARGET_CFLAGS += -Wno-error=pointer-compare
-
define Build/Prepare
$(call Build/Prepare/Default)
echo 'Tvheadend $(shell echo $(PKG_SOURCE_VERSION) | sed "s/^v//")~openwrt$(PKG_RELEASE)' \
--- /dev/null
+diff --git a/Makefile b/Makefile
+index 8c5e380..baef144 100644
+--- a/Makefile
++++ b/Makefile
+@@ -28,7 +28,7 @@ PROG := $(BUILDDIR)/tvheadend
+ #
+
+ CFLAGS += -g -O2 -Wunused-result
+-CFLAGS += -Wall -Werror -Wwrite-strings -Wno-deprecated-declarations
++#CFLAGS += -Wall -Werror -Wwrite-strings -Wno-deprecated-declarations
+ CFLAGS += -Wmissing-prototypes
+ CFLAGS += -fms-extensions -funsigned-char -fno-strict-aliasing
+ CFLAGS += -D_FILE_OFFSET_BITS=64
include $(TOPDIR)/rules.mk
PKG_NAME:=v4l2rtspserver
-PKG_VERSION:=0.1.1
+PKG_VERSION:=0.1.6
PKG_RELEASE:=1
#cannot use codeload as this uses submodules
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/mpromonet/v4l2rtspserver
PKG_SOURCE_VERSION:=v$(PKG_VERSION)
-PKG_MIRROR_HASH:=3e3c106b41562be010ba2132903ebf9cdc75a2caceca468b10e2cd0d2939e940
+PKG_MIRROR_HASH:=9e076d2ecac08d5cbd0af7cfaa355e077e03fe35be73259ae7f520e2ef4243f8
+
+LIVE555_VERSION:=2019.02.03
+LIVE555_HASH:=1c938d91553eff224c7a860f8f38b3256028704b474a3fc6bcf2eddc42268710
+LIVE555_FILE:=live.$(LIVE555_VERSION).tar.gz
PKG_MAINTAINER:=Roger Dammit <rogerdammit@gmail.com>
PKG_LICENSE:=Unlicense
PKG_LICENSE_FILES:=LICENSE
-LIVE555_VERSION:=2018.12.14
-LIVE555_HASH:=8dc31f76909602c3c07c8f876237e6ab7ac674d00f1bb065eda20e719f772a47
-LIVE555_FILE:=live.$(LIVE555_VERSION).tar.gz
-
PKG_BUILD_PARALLEL:=1
CMAKE_INSTALL:=1
TARGET_CXXFLAGS += -fno-rtti
TARGET_LDFLAGS += -Wl,--gc-sections
-define Build/Prepare
- $(Build/Prepare/Default)
-
- ## need to compile some dependencies so that cmake will find them
-
- # build live555
- $(eval $(call Download,live555))
+CMAKE_OPTIONS += -DALSA=OFF -DLIVE555CFLAGS="-DSOCKLEN_T=socklen_t -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DLOCALE_NOT_USED -DNO_SSTREAM=1 -DALLOW_RTSP_SERVER_PORT_REUSE=1"
- mkdir -p $(PKG_BUILD_DIR)/live555
- $(TAR) -xf $(DL_DIR)/$(LIVE555_FILE) --strip=1 -C $(PKG_BUILD_DIR)/live555
- $(CP) files/config.openwrt $(PKG_BUILD_DIR)/live555
- ( cd $(PKG_BUILD_DIR)/live555; ./genMakefiles openwrt )
- +$(MAKE_VARS) $(MAKE) $(MAKE_FLAGS) -C $(PKG_BUILD_DIR)/live555
- $(MAKE_VARS) $(MAKE) $(MAKE_FLAGS) -C $(PKG_BUILD_DIR)/live555 PREFIX="$(STAGING_DIR)/usr/" install
-
- # build v4l2wrapper
- +$(MAKE_VARS) $(MAKE) $(MAKE_FLAGS) -C $(PKG_BUILD_DIR)/v4l2wrapper
- $(CP) $(PKG_BUILD_DIR)/v4l2wrapper/libv4l2wrapper.a $(PKG_BUILD_DIR)
-
- # cmake patches (these are very hacky and should be a lot cleaner)
-
- # prevent root path override
- $(SED) 's/SET(CMAKE_FIND_ROOT_PATH/#SET(CMAKE_FIND_ROOT_PATH/' $(PKG_BUILD_DIR)/CMakeLists.txt
-
- # set search path for v4l2wrapper to current build dir
- $(SED) 's/V4L2WRAPPER_LIBRARY libv4l2wrapper.a/V4L2WRAPPER_LIBRARY libv4l2wrapper.a PATHS "." NO_CMAKE_FIND_ROOT_PATH/' $(PKG_BUILD_DIR)/CMakeLists.txt
+define Build/Prepare
+ $(Build/Prepare/Default)
- # disable ALSA
- $(SED) 's/find_package(ALSA QUIET)//' $(PKG_BUILD_DIR)/CMakeLists.txt
+ # download live555
+ $(eval $(call Download,live555))
+ mkdir -p $(PKG_BUILD_DIR)/live
+ $(TAR) -xf $(DL_DIR)/$(LIVE555_FILE) --strip=1 -C $(PKG_BUILD_DIR)/live
endef
+
define Package/v4l2rtspserver/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/v4l2rtspserver-$(PKG_VERSION) $(1)/usr/bin/
+++ /dev/null
-COMPILE_OPTS = $(INCLUDES) -DSOCKLEN_T=socklen_t -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DLOCALE_NOT_USED -DNO_SSTREAM=1 -DALLOW_RTSP_SERVER_PORT_REUSE=1
-C = c
-C_COMPILER = $(GCC)
-CFLAGS += $(COMPILE_OPTS)
-C_FLAGS = $(CFLAGS)
-CPP = cpp
-CPLUSPLUS_COMPILER = $(AS) # optimizations are only in AR apparently, so use instead of CXX
-CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall -DBSD=1
-CPLUSPLUS_FLAGS += $(CPPFLAGS) -fexceptions
-OBJ = o
-LINK = $(CXX) -o
-LINK_OPTS = -L. $(LDFLAGS)
-CONSOLE_LINK_OPTS = $(LINK_OPTS)
-LIBRARY_LINK = $(AR) cr
-LIBRARY_LINK_OPTS =
-LIB_SUFFIX = a
-LIBS_FOR_CONSOLE_APPLICATION = $(CXXLIBS)
-LIBS_FOR_GUI_APPLICATION = $(LIBS_FOR_CONSOLE_APPLICATION)
-EXE =
config_get path "$s" 'path'
config_get format "$s" 'format'
- # pull out resolution width and height from string
- local w="$(echo $resolution | cut -d'x' -f1)"
- local h="$(echo $resolution | cut -d'x' -f2)"
-
# make sure format is uppercase
format="$(echo $format | tr a-z A-Z)"
args="$args -P $port"
args="$args -u ${path}"
args="$args -F $fps"
- args="$args -W $w"
- args="$args -H $h"
- args="$args -f$format"
+ args="$args -G ${resolution}"
+ if [ ! -z "$format" ]; then
+ args="$args -f$format"
+ fi
args="$args -c" # fixes issue with corrupt frames with H264
if [ -n "$username" ]; then
+++ /dev/null
-From 9977cc5a4b35809bed04be543cf38e32d8f175c5 Mon Sep 17 00:00:00 2001
-From: Rosen Penev <rosenp@gmail.com>
-Date: Sat, 15 Dec 2018 15:02:34 -0800
-Subject: [PATCH] Add a few missing headers
-
-Helps to compile with alternative c++ libraries.
----
- inc/DeviceSource.h | 2 ++
- inc/MemoryBufferSink.h | 1 +
- 2 files changed, 3 insertions(+)
-
-diff --git a/inc/DeviceSource.h b/inc/DeviceSource.h
-index 7d4aa18..0e2f996 100755
---- a/inc/DeviceSource.h
-+++ b/inc/DeviceSource.h
-@@ -18,6 +18,8 @@
- #include <iostream>
- #include <iomanip>
-
-+#include <pthread.h>
-+
- // live555
- #include <liveMedia.hh>
-
-diff --git a/inc/MemoryBufferSink.h b/inc/MemoryBufferSink.h
-index 97e1db1..fc6de20 100644
---- a/inc/MemoryBufferSink.h
-+++ b/inc/MemoryBufferSink.h
-@@ -12,6 +12,7 @@
- #pragma once
-
- #include <map>
-+#include <string>
-
- #include "MediaSink.hh"
-
---
-2.20.1
-
+++ /dev/null
-From 6e569797c0691d7fb2ba72952f81806d0477ca03 Mon Sep 17 00:00:00 2001
-From: Michel Promonet <michel.promonet@free.fr>
-Date: Tue, 11 Dec 2018 08:25:35 +0100
-Subject: [PATCH] replace std::stoi with atoi
-
----
- src/ServerMediaSubsession.cpp | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/ServerMediaSubsession.cpp b/src/ServerMediaSubsession.cpp
-index c90555e..9ac9a76 100755
---- a/src/ServerMediaSubsession.cpp
-+++ b/src/ServerMediaSubsession.cpp
-@@ -99,7 +99,7 @@ RTPSink* BaseServerMediaSubsession::createSink(UsageEnvironment& env, Groupsock
- getline(is, sampleRate, '/');
- std::string channels("2");
- getline(is, channels);
-- videoSink = SimpleRTPSink::createNew(env, rtpGroupsock,rtpPayloadTypeIfDynamic, std::stoi(sampleRate), "audio", "L16", std::stoi(channels), True, False);
-+ videoSink = SimpleRTPSink::createNew(env, rtpGroupsock,rtpPayloadTypeIfDynamic, atoi(sampleRate), "audio", "L16", atoi(channels), True, False);
- }
- return videoSink;
- }
---
-2.20.1
-
+++ /dev/null
-From be6dc4592e91841cfe593d88bfe8a8f068671c74 Mon Sep 17 00:00:00 2001
-From: Michel Promonet <michel.promonet@free.fr>
-Date: Tue, 11 Dec 2018 08:34:14 +0100
-Subject: [PATCH] fix build
-
----
- src/ServerMediaSubsession.cpp | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/ServerMediaSubsession.cpp b/src/ServerMediaSubsession.cpp
-index 9ac9a76..a8b0bb3 100755
---- a/src/ServerMediaSubsession.cpp
-+++ b/src/ServerMediaSubsession.cpp
-@@ -99,7 +99,7 @@ RTPSink* BaseServerMediaSubsession::createSink(UsageEnvironment& env, Groupsock
- getline(is, sampleRate, '/');
- std::string channels("2");
- getline(is, channels);
-- videoSink = SimpleRTPSink::createNew(env, rtpGroupsock,rtpPayloadTypeIfDynamic, atoi(sampleRate), "audio", "L16", atoi(channels), True, False);
-+ videoSink = SimpleRTPSink::createNew(env, rtpGroupsock,rtpPayloadTypeIfDynamic, atoi(sampleRate.c_str()), "audio", "L16", atoi(channels.c_str()), True, False);
- }
- return videoSink;
- }
---
-2.20.1
-
+++ /dev/null
-From f732d44c2bc47e6eccf65e5eb3160734f11e5d3e Mon Sep 17 00:00:00 2001
-From: Rosen Penev <rosenp@gmail.com>
-Date: Thu, 27 Dec 2018 20:16:59 -0800
-Subject: [PATCH] Switch Makefile to compile with g++
-
-With this change I managed to get OpenWrt to compile with uclibcxx
-instead of libstdcpp.
-
-Made CXX adjustable by the shell as OpenWrt needs to override this.
-It also has its own ar.
-
-EXTRA_CXXFLAGS seems to be the proper variable based on usage in the
-OpenWrt tree.
----
- Makefile | 12 ++++++------
- 1 file changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/Makefile b/Makefile
-index 51aaa37..f05bf0d 100644
---- a/v4l2wrapper/Makefile
-+++ b/v4l2wrapper/Makefile
-@@ -1,12 +1,12 @@
--CFLAGS = -W -Wall -pthread -g -pipe $(CFLAGS_EXTRA)
--CFLAGS += -I inc
-+CXXFLAGS ?= -W -Wall -pthread -g -pipe $(EXTRA_CXXFLAGS)
-+CXXFLAGS += -I inc
- RM = rm -rf
--CC = $(CROSS)gcc
--AR = $(CROSS)ar
-+CXX ?= $(CROSS)g++
-+AR ?= $(CROSS)ar
- PREFIX?=/usr
-
- ifneq ($(wildcard $(SYSROOT)$(PREFIX)/include/log4cpp/Category.hh),)
--CFLAGS += -DHAVE_LOG4CPP -I $(SYSROOT)$(PREFIX)/include
-+CXXFLAGS += -DHAVE_LOG4CPP -I $(SYSROOT)$(PREFIX)/include
- endif
-
- V4L2WRAPPER_CPP:=$(wildcard src/*.cpp)
-@@ -17,7 +17,7 @@ V4L2WRAPPER_OBJ:=$(V4L2WRAPPER_CPP:%.cpp=%.o)
- all: libv4l2wrapper.a
-
- %.o: %.cpp
-- $(CC) -c -o $@ $< $(CFLAGS)
-+ $(CXX) -c -o $@ $< $(CXXFLAGS)
-
- libv4l2wrapper.a: $(V4L2WRAPPER_OBJ)
- $(AR) rcs $@ $^
---
-2.20.1
-
include $(TOPDIR)/rules.mk
PKG_NAME:=youtube-dl
-PKG_VERSION:=2019.02.08
+PKG_VERSION:=2019.7.12
PKG_RELEASE:=1
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://codeload.github.com/rg3/youtube-dl/tar.gz/$(PKG_VERSION)?
-PKG_HASH:=76696c31507613ad629f50932dfd124b3f6f13c86e0d6fa8b61342307a490a21
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE:=youtube_dl-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/y/youtube_dl/
+PKG_HASH:=0bba12de913c4aa31052faa3e21c641973554ab0ab1f6d45d5609598e08e5f7a
+PKG_BUILD_DIR:=$(BUILD_DIR)/youtube_dl-$(PKG_VERSION)
+PKG_MAINTAINER:=Adrian Panella <ianchi74@outlook.com>, Josef Schlehofer <pepe.schlehofer@gmail.com>
PKG_LICENSE:=Unlicense
PKG_LICENSE_FILES:=LICENSE
-PKG_MAINTAINER:=Adrian Panella <ianchi74@outlook.com>, Josef Schlehofer <pepe.schlehofer@gmail.com>
-
-PKG_BUILD_DEPENDS:=python/host zip/host
include $(INCLUDE_DIR)/package.mk
+include ../../lang/python/python3-package.mk
define Package/youtube-dl
SECTION:=multimedia
CATEGORY:=Multimedia
- TITLE:=utility to download videos from YouTube.com
- DEPENDS:=+python-openssl +python-email +python-xml +python-codecs +python-ctypes +ca-certificates
- URL:=https://youtube-dl.org
+ TITLE:=Utility to download videos from YouTube.com
+ URL:=https://yt-dl.org
+ DEPENDS:= \
+ +ca-certificates \
+ +python3 \
+ +python3-email \
+ +python3-xml \
+ +python3-codecs \
+ +python3-ctypes \
+ +python3-setuptools
+ VARIANT:=python3
endef
define Package/youtube-dl/description
youtube-dl is a small command-line program to download videos
- from YouTube.com and a few more sites.
- It requires the Python interpreter.
-endef
-
-define Package/youtube-dl/install
- $(INSTALL_DIR) $(1)/usr/bin
-
- python -m compileall $(PKG_BUILD_DIR)/youtube_dl/
- cd $(PKG_BUILD_DIR) && zip --quiet youtube-dl-c.zip youtube_dl/*.pyc youtube_dl/*/*.pyc
- cd $(PKG_BUILD_DIR) && zip --quiet --junk-paths youtube-dl-c.zip youtube_dl/__main__.pyc
- echo '#!/usr/bin/env python' > $(PKG_BUILD_DIR)/youtube-dl-c
- cat $(PKG_BUILD_DIR)/youtube-dl-c.zip >> $(PKG_BUILD_DIR)/youtube-dl-c
-
- $(INSTALL_BIN) -T $(PKG_BUILD_DIR)/youtube-dl-c $(1)/usr/bin/youtube-dl
+ from YouTube.com and other video sites.
+ It requires the Python3 interpreter.
endef
+$(eval $(call Py3Package,youtube-dl))
$(eval $(call BuildPackage,youtube-dl))
+$(eval $(call BuildPackage,youtube-dl-src))
+++ /dev/null
-diff --git a/Makefile b/Makefile
-index 4a62f44..fee93e8 100644
---- a/Makefile
-+++ b/Makefile
-@@ -85,12 +85,12 @@ supportedsites:
- $(PYTHON) devscripts/make_supportedsites.py docs/supportedsites.md
-
- README.txt: README.md
-- pandoc -f $(MARKDOWN) -t plain README.md -o README.txt
-+# pandoc -f $(MARKDOWN) -t plain README.md -o README.txt
-
- youtube-dl.1: README.md
-- $(PYTHON) devscripts/prepare_manpage.py youtube-dl.1.temp.md
-- pandoc -s -f $(MARKDOWN) -t man youtube-dl.1.temp.md -o youtube-dl.1
-- rm -f youtube-dl.1.temp.md
-+# $(PYTHON) devscripts/prepare_manpage.py youtube-dl.1.temp.md
-+# pandoc -s -f $(MARKDOWN) -t man youtube-dl.1.temp.md -o youtube-dl.1
-+# rm -f youtube-dl.1.temp.md
-
- youtube-dl.bash-completion: youtube_dl/*.py youtube_dl/*/*.py devscripts/bash-completion.in
- $(PYTHON) devscripts/bash-completion.py
PKG_NAME:=Netopeer2
PKG_VERSION:=0.7-r1
-PKG_RELEASE:=2
-
-PKG_LICENSE:=BSD-3-Clause
-PKG_MAINTAINER:=Mislav Novakovic <mislav.novakovic@sartura.hr>
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/CESNET/Netopeer2/tar.gz/v$(PKG_VERSION)?
PKG_HASH:=040013d1e315c62c496b704475665165578c374ffb387cbbff422cf8898d3a12
-CMAKE_INSTALL:=1
+PKG_MAINTAINER:=Mislav Novakovic <mislav.novakovic@sartura.hr>
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=LICENSE
PKG_BUILD_PARALLEL:=1
-PKG_INSTALL:=1
+CMAKE_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
SECTION:=utils
CATEGORY:=Utilities
TITLE:=NETCONF server
- URL:=$(PKG_SOURCE_URL)
+ URL:=https://github.com/CESNET/Netopeer2
DEPENDS:=+libcurl +libpthread +libyang +libnetconf2 +netopeer2-keystored +libsysrepo +sysrepocfg +sysrepoctl +sysrepo
MENU:=1
endef
SECTION:=utils
CATEGORY:=Utilities
TITLE:=Netopeer2 cli tool
- URL:=$(PKG_SOURCE_URL)
+ URL:=https://github.com/CESNET/Netopeer2
DEPENDS:=+libpthread +libyang +libnetconf2 +libopenssl
endef
SECTION:=utils
CATEGORY:=Utilities
TITLE:=Netopeer2 key store management
- URL:=$(PKG_SOURCE_URL)
+ URL:=https://github.com/CESNET/Netopeer2
DEPENDS:=+libopenssl +libsysrepo +sysrepo +sysrepocfg +sysrepoctl +SSH_KEYS:openssh-keygen
MENU:=1
endef
--- /dev/null
+--- a/cli/commands.c
++++ b/cli/commands.c
+@@ -1659,7 +1659,11 @@ parse_cert(const char *name, const char *path)
+ BIO_printf(bio_out, "\n");
+
+ BIO_printf(bio_out, "Valid until: ");
++#if OPENSSL_VERSION_NUMBER < 0x10100000L // < 1.1.0
+ ASN1_TIME_print(bio_out, X509_get_notAfter(cert));
++#else
++ ASN1_TIME_print(bio_out, X509_get0_notAfter(cert));
++#endif
+ BIO_printf(bio_out, "\n");
+
+ has_san = 0;
include $(TOPDIR)/rules.mk
PKG_NAME:=acme
-PKG_VERSION:=2.7.9
-PKG_RELEASE:=7
-PKG_LICENSE:=GPLv3
+PKG_VERSION:=2.8.1
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/Neilpang/acme.sh/tar.gz/$(PKG_VERSION)?
-PKG_HASH:=25f8eef1a53584e3ebc653e1ae7763362ca97c40bb476ab7fee01aa50fa3a101
+PKG_HASH:=4fc55b2112058e563616893fefb56c5ff4895a7e6327e9f8416797fdc44d98e3
PKG_BUILD_DIR:=$(BUILD_DIR)/acme.sh-$(PKG_VERSION)
+
PKG_MAINTAINER:=Toke Høiland-Jørgensen <toke@toke.dk>
+PKG_LICENSE:=GPL-3.0-only
+PKG_LICENSE_FILES:=LICENSE.md
LUCI_DIR:=/usr/lib/lua/luci
define Package/acme
SECTION:=net
CATEGORY:=Network
- DEPENDS:=+curl +ca-bundle +openssl-util +socat
+ DEPENDS:=+wget +ca-bundle +openssl-util +socat
TITLE:=ACME (Letsencrypt) client
+ URL:=https://acme.sh
+ PKGARCH:=all
endef
define Package/acme/description
CATEGORY:=Network
DEPENDS:=+acme
TITLE:=DNS API integration for ACME (Letsencrypt) client
+ PKGARCH:=all
endef
define Package/acme-dnsapi/description
TITLE:=ACME package - LuCI interface
DEPENDS:= lua luci-base +acme
SUBMENU:=3. Applications
+ PKGARCH:=all
endef
define Package/luci-app-acme/description
]]--
-local ipkg = require "luci.model.ipkg"
+local fs = require "nixio.fs"
-local nginx_presence = ipkg.installed("nginx-all-module") or ipkg.installed("nginx-ssl") or false
-
-local uhttpd_presence = ipkg.installed("uhttpd") or false
+local nginx_presence = fs.access("/usr/sbin/nginx") or false
+local uhttpd_presence = fs.access("/usr/sbin/uhttpd") or false
m = Map("acme", translate("ACME certificates"),
translate("This configures ACME (Letsencrypt) automatic certificate installation. " ..
iptables -D input_rule -p tcp --dport 80 -j ACCEPT -m comment --comment "ACME" 2>/dev/null
ip6tables -D input_rule -p tcp --dport 80 -j ACCEPT -m comment --comment "ACME" 2>/dev/null
- if [ -e /etc/init.d/uhttpd ] && ( [ -n "$UHTTPD_LISTEN_HTTP" ] || [ $UPDATE_UHTTPD -eq 1 ] ); then
+ if [ -e /etc/init.d/uhttpd ] && ( [ -n "$UHTTPD_LISTEN_HTTP" ] || [ "$UPDATE_UHTTPD" -eq 1 ] ); then
if [ -n "$UHTTPD_LISTEN_HTTP" ]; then
uci set uhttpd.main.listen_http="$UHTTPD_LISTEN_HTTP"
UHTTPD_LISTEN_HTTP=
/etc/init.d/uhttpd reload
fi
- if [ -e /etc/init.d/nginx ] && ( [ "$NGINX_WEBSERVER" -eq 1 ] || [ $UPDATE_NGINX -eq 1 ] ); then
+ if [ -e /etc/init.d/nginx ] && ( [ "$NGINX_WEBSERVER" -eq 1 ] || [ "$UPDATE_NGINX" -eq 1 ] ); then
NGINX_WEBSERVER=0
/etc/init.d/nginx restart
fi
[ -n "$webroot" ] || [ -n "$dns" ] || pre_checks "$main_domain" || return 1
log "Running ACME for $main_domain"
-
+
handle_credentials() {
local credential="$1"
eval export $credential
PKG_NAME:=aggregate
PKG_VERSION:=1.6
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://ftp.isc.org/isc/aggregate/
--- /dev/null
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -25,8 +25,9 @@
+ INSTALL = @INSTALL@
+ DEFS = @DEFS@
+ LIBS = @LIBS@
+-CFLAGS = -O
+-LDFLAGS = -s
++CFLAGS = @CFLAGS@
++CPPFLAGS = @CPPFLAGS@
++LDFLAGS = @LDFLAGS@
+ prefix = @prefix@
+
+ SHELL = /bin/sh
PKG_NAME:=aircrack-ng
PKG_VERSION:=1.5.2
-PKG_RELEASE:=1
+PKG_RELEASE:=$(PKG_SOURCE_VERSION)
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=LICENSE
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://codeload.github.com/aircrack-ng/aircrack-ng/tar.gz/$(PKG_VERSION)?
-PKG_HASH:=7e03f9828495a3a1a781ad79e41805971bf7347c092df852820232bca866a19b
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/aircrack-ng/aircrack-ng.git
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE_VERSION:=42f2b48d7f46b39e0d5d2f2a64cbf63f87416a70
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
+PKG_MIRROR_HASH:=17893e05278635675a77a3cb0927202ec4df2fc9a742689a7a88e4a8f27a69b6
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
CONFIG_AIRCRACK_NG_HWLOC \
CONFIG_AIRCRACK_NG_SQLITE3
+include $(INCLUDE_DIR)/uclibc++.mk
include $(INCLUDE_DIR)/package.mk
define Package/aircrack-ng
SECTION:=net
CATEGORY:=Network
- DEPENDS:=+AIRCRACK_NG_HWLOC:libhwloc +libpcap +libpcre +libpthread +libstdcpp
+ DEPENDS:=+AIRCRACK_NG_HWLOC:libhwloc +libpcap +libpcre +libpthread $(CXX_DEPENDS)
DEPENDS += +AIRCRACK_NG_OPENSSL:libopenssl
DEPENDS += +AIRCRACK_NG_GCRYPT:libgcrypt
DEPENDS += +AIRCRACK_NG_SQLITE3:libsqlite3
Bash script designed to turn wireless cards into monitor mode.
endef
+define Build/Prepare
+ $(call Build/Prepare/Default)
+ echo "$(PKG_VERSION)_rev$(PKG_SOURCE_VERSION)" > $(PKG_BUILD_DIR)/VERSION
+endef
+
CONFIGURE_ARGS += \
--disable-silent-rules \
--enable-shared \
\
PYTHON=$(PYTHON) \
\
- $(if $(CONFIG_AIRCRACK_NG_OPENSSL),--with-openssl,--without-openssl) \
+ $(if $(CONFIG_AIRCRACK_NG_OPENSSL),,--without-openssl) \
$(if $(CONFIG_AIRCRACK_NG_GCRYPT),--with-gcrypt,--without-gcrypt) \
$(if $(CONFIG_AIRCRACK_NG_HWLOC),--enable-hwloc,--disable-hwloc) \
- $(if $(CONFIG_AIRCRACK_NG_SQLITE3),--with-sqlite3,--without-sqlite3)
+ $(if $(CONFIG_AIRCRACK_NG_SQLITE3),--with-sqlite3=$(STAGING_DIR)/usr,--without-sqlite3)
TARGET_CFLAGS += -Wall -Wextra -ffunction-sections -fdata-sections
PKG_NAME:=apcupsd
PKG_VERSION:=3.14.14
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_MAINTAINER:=Othmar Truniger <github@truniger.ch>
PKG_LICENSE:=GPL-2.0
URL:=http://www.apcupsd.org/
endef
+CONFIGURE_VARS += SHUTDOWN=/sbin/halt
+
define Build/Configure
$(CP) $(SCRIPT_DIR)/config.* $(PKG_BUILD_DIR)/autoconf/
$(call Build/Configure/Default, \
APCPID=/var/run/apcupsd.pid
APCUPSD=/usr/sbin/apcupsd
-SHUTDOWN=/sbin/shutdown
+SHUTDOWN=/sbin/halt
SCRIPTSHELL=/bin/sh
SCRIPTDIR=/etc/apcupsd
WALL=true
;;
doreboot)
echo "UPS ${2} initiating Reboot Sequence" | ${WALL}
- ${SHUTDOWN} -r now "apcupsd UPS ${2} initiated reboot"
+ echo "apcupsd UPS ${2} initiated reboot" && /sbin/reboot
;;
doshutdown)
echo "UPS ${2} initiated Shutdown Sequence" | ${WALL}
- ${SHUTDOWN} -h now "apcupsd UPS ${2} initiated shutdown"
+ echo "apcupsd UPS ${2} initiated shutdown" && /sbin/halt
;;
annoyme)
echo "Power problems with UPS ${2}. Please logoff." | ${WALL}
--- /dev/null
+--- a/Makefile.orig 2019-04-04 18:19:45.007668656 +0200
++++ a/Makefile 2019-04-04 18:23:00.723165465 +0200
+@@ -1,6 +1,6 @@
+ topdir:=.
+
+-SUBDIRS=src platforms doc
++SUBDIRS=src platforms
+ include autoconf/targets.mak
+
+ # Force platforms/ to build after src/
--- /dev/null
+#
+# Copyright (C) 2018 Dengfeng Liu
+#
+# This is free software, licensed under the GNU General Public License v3.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=apfree-wifidog
+PKG_VERSION:=3.11.1716
+PKG_RELEASE=1
+
+PKG_LICENSE:=GPL-3.0-or-later
+PKG_LICENSE_FILES:=COPYING
+
+PKG_MAINTAINER:=Dengfeng Liu <liudf0716@gmail.com>
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/liudf0716/apfree_wifidog.git
+PKG_SOURCE_VERSION:=$(PKG_VERSION)
+PKG_MIRROR_HASH:=76eda57e40b919091281305344bc57fc732a779d7944f57bd5de87914ba127d1
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+define Package/apfree-wifidog
+ SUBMENU:=Captive Portals
+ SECTION:=net
+ CATEGORY:=Network
+ DEPENDS:=+zlib +iptables-mod-extra +iptables-mod-ipopt +kmod-ipt-nat +iptables-mod-nat-extra \
+ +libjson-c +ipset +libip4tc +libevent2 +libevent2-openssl +libuci +px5g
+ TITLE:=Apfree's wireless captive portal solution
+ URL:=https://github.com/liudf0716/apfree_wifidog
+endef
+
+define Package/apfree-wifidog/description
+ The ApFree Wifidog project is a complete and embeddable captive portal
+ solution for wireless community groups or individuals who wish to open a free
+ Hotspot while still preventing abuse of their Internet connection.
+ It's enhanced wifidog
+endef
+
+define Package/apfree-wifidog/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/wifidogx $(1)/usr/bin/wifidogx
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/wdctlx $(1)/usr/bin/wdctlx
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) ./files/wdping $(1)/usr/sbin/
+ $(INSTALL_DIR) $(1)/etc
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/wifidog-msg.html $(1)/etc/
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/wifidog-redir.html $(1)/etc/
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/wifidog-redir.html.front $(1)/etc/
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/wifidog-redir.html.rear $(1)/etc/
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/authserver-offline.html $(1)/etc/
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/internet-offline.html $(1)/etc/
+ $(INSTALL_DIR) $(1)/etc/init.d
+ $(INSTALL_BIN) ./files/wifidogx.init $(1)/etc/init.d/wifidogx
+ $(INSTALL_DIR) $(1)/etc/config
+ $(CP) ./files/wifidogx.conf $(1)/etc/config/wifidogx
+endef
+
+$(eval $(call BuildPackage,apfree-wifidog))
--- /dev/null
+![ApFreeWiFiDog](https://github.com/liudf0716/apfree_wifidog/blob/master/logo.png)
+
+
+[![license][1]][2]
+[![PRs Welcome][3]][4]
+[![Issue Welcome][5]][6]
+[![Release Version][7]][8]
+[![OpenWRT][11]][12]
+[![Join the QQ Group][15]][16]
+
+
+[1]: https://img.shields.io/badge/license-GPLV3-brightgreen.svg?style=plastic
+[2]: https://github.com/liudf0716/apfree_wifidog/blob/master/COPYING
+[3]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=plastic
+[4]: https://github.com/liudf0716/apfree_wifidog/pulls
+[5]: https://img.shields.io/badge/Issues-welcome-brightgreen.svg?style=plastic
+[6]: https://github.com/liudf0716/apfree_wifidog/issues/new
+[7]: https://img.shields.io/badge/release-3.11.1716-red.svg?style=plastic
+[8]: https://github.com/liudf0716/apfree_wifidog/releases
+[11]: https://img.shields.io/badge/Platform-%20OpenWRT%7C%20LEDE%20-brightgreen.svg?style=plastic
+[12]: https://github.com/KunTengRom/kunteng-lede-17.01.4
+[13]: https://img.shields.io/badge/KunTeng-Inside-blue.svg?style=plastic
+[14]: https://www.kunteng.org.cn
+[15]: https://img.shields.io/badge/chat-qq%20group-brightgreen.svg
+[16]: https://jq.qq.com/?_wv=1027&k=4ADDSev
+
+## ApFree WiFiDog: A high performance captive portal solution for HTTP(s)
+
+ApFree WiFiDog is a high performance captive portal solution for HTTP(s), which mainly used in ([LEDE](https://github.com/lede-project/source)&[Openwrt](https://github.com/openwrt/openwrt)) platform.
+
+
+**[中文介绍](https://github.com/liudf0716/apfree_wifidog/blob/master/README_ZH.md)**
+
+## Enhancement of apfree-wifidog
+
+In fact, the title should be why we choose apfree-wifidog, the reason was the following:
+
+> Stable
+
+apfree-wifidog was widely used in tens of thousands device, which were running in business scene. In order to improve its stable, we rewrite all iptables rule by api instead of fork call, which will easily cause deadlock in multithread-fork running environment. we also re-write the code and replace libhttpd (which unmaitained for years) with libevent
+
+> Performance
+
+apfree-wifidog's http request-response is more quick, u can find statistic data in our test document
+
+> HTTPs redirect
+
+apfree-wifidog support https redirect, in current internet environment, captive portal solution without supporting https redirect will become unsuitable gradually
+
+
+> More features
+
+apfree-wifidog support mac temporary-pass, ip,domain,pan-domain,white-mac,black-mac rule and etc. all these rules can be applied without restarting wifidog
+
+> MQTT support
+
+by enable mqtt support, u can remotely deliver such as trusted ip, domian and pan-domain rules to apfree wifidog
+
+> Compitable with wifidog protocol
+
+u don't need to modify your wifidog authentication server to adapt apfree-wifidog; if u have pression on server-side, apfree wifidog's improved protocol can greatly relieve it, which disabled by default
+
+
+## Getting started
+
+before starting apfree-wifidog, we must know how to configure it. apfree-wifidog use OpenWrt standard uci config system, all your apfree-wifidog configure information stored in `/etc/confg/wifidogx`, which will be parsed by `/etc/init.d/wifidogx` to /tmp/wifidog.conf, apfree-wifidog's real configure file is `/tmp/wifidog.conf`
+
+The default apfree-wifidog UCI configuration file like this:
+
+```
+config wifidog
+ option gateway_interface 'br-lan'
+ option auth_server_hostname 'wifidog.kunteng.org.cn'
+ option auth_server_port 443
+ option auth_server_path '/wifidog/'
+ option check_interval 60
+ option client_timeout 5
+ option apple_cna 1
+ option thread_number 5
+ option wired_passed 0
+ option enable 0
+```
+
+> auth_server_hostname was apfree-wifidog auth server, it can be domain or ip; wifidog.kunteng.org.cn is a free auth server we provided, it was also [open source](https://github.com/wificoin-project/wwas)
+
+> apple_cna 1 apple captive detect deceive; 2 apple captive detect deceive to disallow portal page appear
+
+> wired_passed means whether LAN access devices need to auth or not, value 1 means no need to auth
+
+> enable means whether start apfree-wifidog when we executed `/etc/init.d/wifidogx start`, if u wanted to start apfree-wifidog, you must set enable to 1 before executing `/etc/init.d/wifidogx start`
+
+### How to support https redirect
+
+In order to support https redirect, apfree-wifidog need x509 pem cert and private key, u can generate youself like this:
+
+```
+PX5G_BIN="/usr/sbin/px5g"
+OPENSSL_BIN="/usr/bin/openssl"
+APFREE_CERT="/etc/apfree.crt"
+APFREE_KEY="/etc/apfree.key"
+
+generate_keys() {
+ local days bits country state location commonname
+
+ # Prefer px5g for certificate generation (existence evaluated last)
+ local GENKEY_CMD=""
+ local UNIQUEID=$(dd if=/dev/urandom bs=1 count=4 | hexdump -e '1/1 "%02x"')
+ [ -x "$OPENSSL_BIN" ] && GENKEY_CMD="$OPENSSL_BIN req -x509 -sha256 -outform pem -nodes"
+ [ -x "$PX5G_BIN" ] && GENKEY_CMD="$PX5G_BIN selfsigned -pem"
+ [ -n "$GENKEY_CMD" ] && {
+ $GENKEY_CMD \
+ -days ${days:-730} -newkey rsa:${bits:-2048} -keyout "${APFREE_KEY}.new" -out "${APFREE_CERT}.new" \
+ -subj /C="${country:-CN}"/ST="${state:-localhost}"/L="${location:-Unknown}"/O="${commonname:-ApFreeWiFidog}$UNIQUEID"/CN="${commonname:-ApFreeWiFidog}"
+ sync
+ mv "${APFREE_KEY}.new" "${APFREE_KEY}"
+ mv "${APFREE_CERT}.new" "${APFREE_CERT}"
+ }
+}
+
+```
+
+or when u start `/etc/init.d/wifidogx start`, it will generate it automatically
+
+
+For more information, please refer to the upstream [project page](https://github.com/liudf0716/apfree_wifidog)
--- /dev/null
+#!/bin/sh
+IP=$1
+[ -x /usr/sbin/fping ] && {
+ fping -t 100 -c 1 $IP &> /dev/null && echo 1 || echo 0
+} || {
+ ping -w 1 -c 1 $IP &> /dev/null && echo 1 || echo 0
+}
--- /dev/null
+config wifidog
+ option gateway_interface 'br-lan'
+ option auth_server_hostname 'change wifidog.kunteng.org.cn to your auth server domain or ip'
+ option auth_server_port 443
+ option auth_server_path '/wifidog/'
+ option check_interval 60
+ option client_timeout 5
+ option wired_passed 0
+ option disabled 1
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2018 Dengfeng Liu
+
+. /lib/functions/network.sh
+
+START=99
+
+USE_PROCD=1
+PROG=/usr/bin/wifidogx
+CONFIGFILE=/tmp/wifidogx.conf
+
+EXTRA_COMMANDS="status"
+EXTRA_HELP=" status Print the status of the service"
+
+PX5G_BIN="/usr/sbin/px5g"
+OPENSSL_BIN="/usr/bin/openssl"
+APFREE_CERT="/etc/apfree.crt"
+APFREE_KEY="/etc/apfree.key"
+
+generate_keys() {
+ local days bits country state location commonname
+ local UNIQUEID GENKEY_CMD
+
+ # Prefer px5g for certificate generation (existence evaluated last)
+ UNIQUEID=$(hexdump -n 4 -e '4/1 "%02x" "\n"' /dev/urandom)
+ [ -x "$OPENSSL_BIN" ] && GENKEY_CMD="$OPENSSL_BIN req -x509 -sha256 -outform pem -nodes"
+ [ -x "$PX5G_BIN" ] && GENKEY_CMD="$PX5G_BIN selfsigned -pem"
+ [ -n "$GENKEY_CMD" ] && {
+ $GENKEY_CMD \
+ -days "${days:-720}" -newkey rsa:"${bits:-2048}" -keyout "${APFREE_KEY}.new" -out "${APFREE_CERT}.new" \
+ -subj /C="${country:-CN}"/ST="${state:-Beijing}"/L="${location:-Unknown}"/O="${commonname:-ApFreeWiFidog}$UNIQUEID"/CN="${commonname:-ApFreeWiFidog}"
+ sync
+ mv "${APFREE_KEY}.new" "${APFREE_KEY}"
+ mv "${APFREE_CERT}.new" "${APFREE_CERT}"
+ }
+}
+
+service_trigger() {
+ procd_add_reload_trigger "wifidogx"
+}
+
+echo_firewall_rule() {
+ echo " FirewallRule $1"
+}
+
+prepare_mqtt_conf() {
+ local cfg=$1
+ local serveraddr
+ local serverport
+
+ config_get serveraddr "$cfg" "serveraddr"
+ config_get serverport "$cfg" "serverport"
+ [ -z "${serveraddr}" -o -z "${serverport}" ] && return 1
+
+ cat <<-EOF >>${CONFIGFILE}
+ MQTT {
+ ServerAddr ${serveraddr}
+ ServerPort ${serverport}
+ }
+ EOF
+}
+
+prepare_wifidog_conf() {
+ local cfg=$1
+ local enable
+ local gateway_id
+ local gateway_interface
+ local auth_server_hostname
+ local auth_server_path
+ local auth_server_path_login
+ local auth_server_path_portal
+ local auth_server_path_msg
+ local auth_server_path_ping
+ local auth_server_path_auth
+ local delta_traffic
+ local check_interval
+ local client_timeout
+ local trusted_domains
+ local js_filter
+ local trusted_maclist
+ local untrusted_maclist
+ local pool_mode
+ local thread_number
+ local queue_size
+ local wired_passed
+ local trusted_iplist
+ local trusted_pan_domains
+ local proxy_port
+ local no_auth
+ local apple_cna
+ local update_domain_interval
+ local dns_timeout
+ local default_gateway_id
+ local external_interface
+ local auth_server_port
+
+ [ -f ${CONFIGFILE} ] && rm -f ${CONFIGFILE}
+
+ config_get enable "${cfg}" "disabled" 0
+ [ "${enable}" = "0" ] || {
+ echo "wifidogx disabled in /etc/config/wifidogx file, please set disabled to 0 to enable it" >&2
+ return
+ }
+
+ default_gateway_id=$(sed -e 's/://g' /sys/class/net/br-lan/address)
+
+ network_get_device external_interface wan
+
+ config_get gateway_id "${cfg}" "gateway_id" "${default_gateway_id}"
+ config_get gateway_interface "${cfg}" "gateway_interface" "br-lan"
+ config_get auth_server_hostname "${cfg}" "auth_server_hostname"
+ config_get auth_server_port "${cfg}" "auth_server_port" "80"
+ config_get auth_server_path "${cfg}" "auth_server_path" "/wifidog/"
+ config_get auth_server_path_login "${cfg}" "auth_server_path_login"
+ config_get auth_server_path_portal "${cfg}" "auth_server_path_portal"
+ config_get auth_server_path_msg "${cfg}" "auth_server_path_msg"
+ config_get auth_server_path_ping "${cfg}" "auth_server_path_ping"
+ config_get auth_server_path_auth "${cfg}" "auth_server_path_auth"
+ config_get delta_traffic "${cfg}" "delta_traffic"
+ config_get check_interval "${cfg}" "check_interval" "60"
+ config_get js_filter "${cfg}" "js_filter" 1
+ config_get client_timeout "${cfg}" "client_timeout" "5"
+ config_get trusted_domains "${cfg}" "trusted_domains"
+ config_get trusted_maclist "${cfg}" "trusted_maclist"
+ config_get untrusted_maclist "${cfg}" "untrusted_maclist"
+ config_get pool_mode "${cfg}" "pool_mode" 0
+ config_get thread_number "${cfg}" "thread_number" 20
+ config_get queue_size "${cfg}" "queue_size" 200
+ config_get wired_passed "${cfg}" "wired_passed" 1
+ config_get trusted_iplist "${cfg}" "trusted_iplist"
+ config_get trusted_pan_domains "${cfg}" "trusted_pan_domains"
+ config_get proxy_port "${cfg}" "proxy_port"
+ config_get no_auth "${cfg}" "no_auth"
+ config_get apple_cna "${cfg}" "bypass_apple_cna"
+ config_get update_domain_interval "${cfg}" "update_domain_interval"
+ config_get dns_timeout "${cfg}" "dns_timeout"
+
+ local set_auth_server_path_login
+ local set_auth_server_path_portal
+ local set_auth_server_path_msg
+ local set_auth_server_path_ping
+ local set_auth_server_path_auth
+ local set_delta_traffic
+ local set_trusted_maclist
+ local set_untrusted_maclist
+ local set_trusted_domains
+ local set_trusted_iplist
+ local set_trusted_pan_domains
+ local set_proxy_port
+ local set_no_auth
+ local set_firewall_rule_global
+ local set_firewall_rule_validating_users
+ local set_firewall_rule_known_users
+ local set_firewall_rule_auth_is_down
+ local set_firewall_rule_unknown_users
+ local set_firewall_rule_locked_users
+ local set_apple_cna
+ local set_update_domain_interval
+ local set_dns_timeout
+
+ set_auth_server_path_login=$([ -n "$auth_server_path_login" ] && echo " LoginScriptPathFragment $auth_server_path_login")
+ set_auth_server_path_portal=$([ -n "$auth_server_path_portal" ] && echo " PortalScriptPathFragment $auth_server_path_portal")
+ set_auth_server_path_msg=$([ -n "$auth_server_path_msg" ] && echo " MsgScriptPathFragment $auth_server_path_msg")
+ set_auth_server_path_ping=$([ -n "$auth_server_path_ping" ] && echo " PingScriptPathFragment $auth_server_path_ping")
+ set_auth_server_path_auth=$([ -n "$auth_server_path_auth" ] && echo " AuthScriptPathFragment $auth_server_path_auth")
+ set_delta_traffic=$([ -n "$delta_traffic" ] && echo "DeltaTraffic $delta_traffic")
+ set_trusted_maclist=$([ -n "$trusted_maclist" ] && echo "TrustedMACList $trusted_maclist")
+ set_untrusted_maclist=$([ -n "$untrusted_maclist" ] && echo "UntrustedMACList $untrusted_maclist")
+ set_trusted_domains=$([ -n "$trusted_domains" ] && echo "TrustedDomains $trusted_domains")
+ set_trusted_iplist=$([ -n "$trusted_iplist" ] && echo "TrustedIpList $trusted_iplist")
+ set_trusted_pan_domains=$([ -n "$trusted_pan_domains" ] && echo "TrustedPanDomains $trusted_pan_domains")
+ set_proxy_port=$([ -n "$proxy_port" ] && echo "Proxyport $proxy_port")
+ set_no_auth=$([ -n "$no_auth" ] && echo "NoAuth $no_auth")
+ set_firewall_rule_global=$(config_list_foreach "$cfg" "firewall_rule_global" echo_firewall_rule)
+ set_firewall_rule_validating_users=$(config_list_foreach "$cfg" "firewall_rule_validating_users" echo_firewall_rule)
+ set_firewall_rule_known_users=$(config_list_foreach "$cfg" "firewall_rule_known_users" echo_firewall_rule)
+ set_firewall_rule_auth_is_down=$(config_list_foreach "$cfg" "firewall_rule_auth_is_down" echo_firewall_rule)
+ set_firewall_rule_unknown_users=$(config_list_foreach "$cfg" "firewall_rule_unknown_users" echo_firewall_rule)
+ set_firewall_rule_locked_users=$(config_list_foreach "$cfg" "firewall_rule_locked_users" echo_firewall_rule)
+ set_apple_cna=$([ -n "$apple_cna" ] && echo "BypassAppleCNA $apple_cna")
+ set_update_domain_interval=$([ -n "$update_domain_interval" ] && echo "UpdateDomainInterval $update_domain_interval")
+ set_dns_timeout=$([ -n "$dns_timeout" ] && echo "DNSTimeout $dns_timeout")
+
+ cat <<-EOF >$CONFIGFILE
+ GatewayID $gateway_id
+ GatewayInterface $gateway_interface
+ Externalinterface $external_interface
+
+ AuthServer {
+ Hostname $auth_server_hostname
+ HTTPPort $auth_server_port
+ Path $auth_server_path
+ $set_auth_server_path_login
+ $set_auth_server_path_portal
+ $set_auth_server_path_msg
+ $set_auth_server_path_ping
+ $set_auth_server_path_auth
+ }
+
+ $set_delta_traffic
+ CheckInterval $check_interval
+ ClientTimeout $client_timeout
+ JsFilter $js_filter
+ WiredPassed $wired_passed
+ $set_trusted_domains
+ $set_untrusted_maclist
+ $set_trusted_maclist
+ $set_trusted_iplist
+ $set_trusted_pan_domains
+ $set_proxy_port
+ $set_no_auth
+ $set_apple_cna
+ $set_update_domain_interval
+ $set_dns_timeout
+
+ FirewallRuleSet global {
+ $set_firewall_rule_global
+ }
+
+ FirewallRuleSet validating-users {
+ $set_firewall_rule_validating_users
+ FirewallRule allow to 0.0.0.0/0
+ }
+
+ FirewallRuleSet known-users {
+ $set_firewall_rule_known_users
+ FirewallRule allow to 0.0.0.0/0
+ }
+
+ FirewallRuleSet auth-is-down {
+ $set_firewall_rule_auth_is_down
+ }
+
+ FirewallRuleSet unknown-users {
+ $set_firewall_rule_unknown_users
+ FirewallRule allow udp port 53
+ FirewallRule allow tcp port 53
+ FirewallRule allow udp port 67
+ FirewallRule allow tcp port 67
+ }
+
+ FirewallRuleSet locked-users {
+ $set_firewall_rule_locked_users
+ FirewallRule block to 0.0.0.0/0
+ }
+EOF
+}
+
+init_config() {
+ config_load wifidogx
+ config_foreach prepare_wifidog_conf wifidog
+
+ [ ! -f ${CONFIGFILE} ] && {
+ echo "no wifidogx.conf, exit..." >&2
+ exit
+ }
+
+ [ -s "${APFREE_CERT}" -a -s "${APFREE_KEY}" ] || {
+ generate_keys
+ }
+
+ [ -s ${APFREE_KEY} -a -s ${APFREE_CERT} ] || {
+ echo "no cert or key, exit..." >&2
+ exit
+ }
+
+ config_foreach prepare_mqtt_conf mqtt
+
+ sed -i -e '/^$/d' ${CONFIGFILE}
+}
+
+start_service() {
+ init_config
+
+ procd_open_instance
+ # -f: run in foreground
+ procd_set_param command $PROG -c $CONFIGFILE -f -d 0
+ procd_set_param respawn # respawn automatically if something died
+ procd_set_param file $CONFIGFILE
+ procd_close_instance
+}
+
+status() {
+ /usr/bin/wdctlx status
+}
include $(TOPDIR)/rules.mk
PKG_NAME:=apinger
-PKG_VERSION:=0.6.1
-PKG_RELEASE=$(PKG_SOURCE_VERSION)
+PKG_SOURCE_DATE:=2015-04-09
+PKG_SOURCE_VERSION:=78eb328721ba1a10571c19df95acd
+PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/Jajcus/apinger.git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=c7da72f7ec26eedd7fd8d224c0e10787b204f94e
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
-PKG_MIRROR_HASH:=c6739bef32568877ad63dbfa8e34b617a287e225a0344d4c41ba891e1f25d487
+PKG_SOURCE_URL:=https://github.com/Jajcus/apinger
+PKG_MIRROR_HASH:=4ada1330fc5d0adc0216d141f5e3b494df7a4c6500bbffce1efeab3d58684f7e
PKG_MAINTAINER:=Alex Samorukov <samm@os2.kiev.ua>
-PKG_LICENSE:= GPL-2.0
+PKG_LICENSE:=GPL-2.0-only
+PKG_REMOVE_FILES:=autogen.sh
PKG_FIXUP:=autoreconf
-PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=0
include $(INCLUDE_DIR)/package.mk
CATEGORY:=Network
TITLE:=Tool which monitors various IP devices by simple ICMP echo requests
URL:=https://github.com/Jajcus/apinger
- PKG_MAINTAINER:=Alex Samorukov <samm@os2.kiev.ua>
endef
define Package/apinger/description
/etc/apinger.conf
endef
-define Build/Configure
- $(call Build/Configure/Default)
-endef
-
define Package/apinger/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/apinger $(1)/usr/sbin/
+++ /dev/null
---- apinger-0.6.1/acinclude.m4 2003-10-21 12:44:48.000000000 +0000
-+++ apinger-0.6.1/acinclude.m4 2015-04-08 15:27:37.451903960 +0000
-@@ -39,9 +39,7 @@
- [$jk_inet_includes
- $jk_icmp_includes])
-
--AC_CHECK_MEMBERS([struct icmp.icmp_type, struct icmp.icmp_code,\
--struct icmp.icmp_cksum, struct icmp.icmp_seq,\
--struct icmp.icmp_id],[],
-+AC_CHECK_MEMBERS([struct icmp.icmp_type, struct icmp.icmp_code,struct icmp.icmp_cksum, struct icmp.icmp_seq,struct icmp.icmp_id],[],
- AC_MSG_ERROR(struct icmp not defined or not compatible),
- [$jk_inet_includes
- $jk_icmp_includes])
---- apinger-0.6.1/src/apinger.conf.orig 2015-04-08 16:05:24.558919722 +0000
-+++ apinger-0.6.1/src/apinger.conf 2015-04-08 16:07:47.089170236 +0000
-@@ -9,7 +9,7 @@
+--- a/src/apinger.conf
++++ b/src/apinger.conf
+@@ -8,7 +8,7 @@
## User and group the pinger should run as
user "nobody"
---- apinger-0.6.1/Makefile.am.orig 2015-04-08 16:47:40.999990050 +0000
-+++ apinger-0.6.1/Makefile.am 2015-04-08 16:48:07.565220137 +0000
+--- a/Makefile.am
++++ b/Makefile.am
@@ -1,7 +1,7 @@
EXTRA_DIST = autogen.sh TODO BUGS
--- /dev/null
+--- a/configure.ac
++++ b/configure.ac
+@@ -23,7 +23,7 @@ AC_HEADER_SYS_WAIT
+ AC_CHECK_HEADERS([arpa/inet.h errno.h malloc.h \
+ stddef.h stdlib.h string.h sys/socket.h \
+ sys/time.h syslog.h unistd.h time.h \
+- assert.h sys/poll.h signal.h pwd.h grp.h stdarg.h\
++ assert.h poll.h signal.h pwd.h grp.h stdarg.h\
+ limits.h sys/wait.h sched.h sys/ioctl.h sys/uio.h])
+ AC_HEADER_TIME
+
+--- a/src/apinger.c
++++ b/src/apinger.c
+@@ -33,8 +33,8 @@
+ #ifdef HAVE_SYS_WAIT_H
+ # include <sys/wait.h>
+ #endif
+-#ifdef HAVE_SYS_POLL_H
+-# include <sys/poll.h>
++#ifdef HAVE_POLL_H
++# include <poll.h>
+ #endif
+ #ifdef HAVE_ARPA_INET_H
+ # include <arpa/inet.h>
PKG_NAME:=aria2
PKG_VERSION:=1.34.0
-PKG_RELEASE:=5
+PKG_RELEASE:=6
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://github.com/aria2/aria2/releases/download/release-$(PKG_VERSION)/
append_header() {
local h="$1"
[ -n "$h" ] && \
- echo "header=\"${h}\"" >>"$config_file_tmp"
+ echo "header=\"$h\"" >>"$config_file_tmp"
}
aria2_validate() {
- uci_validate_section "$NAME" aria2 "$1" \
+ uci_load_validate "$NAME" aria2 "$1" "$2" \
'enabled:bool:0' \
'enable_logging:bool' \
'enable_proxy:bool' \
'all_proxy_user:string' \
'auto_save_interval:range(0,600)' \
'bt_enable_lpd:or("true","false")' \
+ 'bt_detach_seed_only:or("true","false")' \
+ 'bt_load_saved_metadata:or("true","false")' \
+ 'bt_prioritize_piece:string' \
'bt_max_open_files:uinteger' \
'bt_max_peers:uinteger' \
'bt_remove_unselected_file:or("true","false")' \
'ca_certificate:file' \
'certificate:file' \
'check_certificate:or("true","false"):true' \
+ 'check_integrity:or("true","false")' \
'connect_timeout:uinteger' \
'dht_listen_port:string' \
'dir:string' \
aria2_start() {
local section="$1"
- aria2_validate "$section" || { _err "Validation failed."; return 1; }
+ [ "$2" = "0" ] || { _err "Validation failed."; return 1; }
- [ "$enabled" = "1" ] || { _info "Instance \"${section}\" disabled."; return 1; }
- [ -n "$dir" ] || { _err "Please set downlod dir."; return 1; }
- [ -d "$dir" ] || { _err "Please create downlod dir first."; return 1; }
+ [ "$enabled" = "1" ] || { _info "Instance \"$section\" disabled."; return 1; }
+ [ -n "$dir" ] || { _err "Please set download dir."; return 1; }
+ [ -d "$dir" ] || { _err "Please create download dir first."; return 1; }
- config_file="${config_dir}/${NAME}.conf.${section}"
- config_file_tmp="${config_dir}/${NAME}.conf.tmp"
- session_file="${config_dir}/${NAME}.session.${section}"
+ config_file="$config_dir/$NAME.conf.$section"
+ config_file_tmp="$config_dir/$NAME.conf.tmp"
+ session_file="$config_dir/$NAME.session.$section"
_make_dir "$config_dir" || {
- _err "Can't create config dir: ${config_dir}"
+ _err "Can't create config dir: $config_dir"
return 1
}
_create_file "$session_file" "$config_file" "$config_file_tmp" || {
- _err "Can't create files: ${session_file}, ${config_file}, ${config_file_tmp}"
+ _err "Can't create files: $session_file, $config_file, $config_file_tmp"
return 1
}
# create tmp file
cat >"$config_file_tmp" <<-EOF
- # Auto generated file, changes to this file will lost.
+ # Auto generated file, changes to this file will be lost.
EOF
- append_setting "dir=${dir}"
+ append_setting "dir=$dir"
append_setting "enable-rpc=true"
append_setting "rpc-allow-origin-all=true"
append_setting "rpc-listen-all=true"
append_setting "quiet=true"
append_setting "continue=true"
- append_setting "input-file=${session_file}"
- append_setting "save-session=${session_file}"
+ append_setting "input-file=$session_file"
+ append_setting "save-session=$session_file"
if [ -z "$enable_logging" ]; then
append_options "log" "log_level"
log_dir="$(dirname "$log")"
_make_dir "$log_dir" || {
- _err "Can't create log dir: ${log_dir}"
+ _err "Can't create log dir: $log_dir"
return 1
}
# create or clear log file
echo >"$log"
- append_setting "log=${log}"
+ append_setting "log=$log"
append_options "log_level"
fi
unset_auth_method() {
uci -q batch <<-EOF
- set ${NAME}.${section}.rpc_auth_method=""
+ set $NAME.$section.rpc_auth_method=""
commit $NAME
EOF
}
if [ -z "$rpc_auth_method" ]; then
if [ -n "$rpc_secret" ]; then
- append_setting "rpc-secret=${rpc_secret}"
+ append_setting "rpc-secret=$rpc_secret"
elif [ -n "$rpc_user" ]; then
- append_setting "rpc-user=${rpc_user}"
- append_setting "rpc-passwd=${rpc_passwd}"
+ append_setting "rpc-user=$rpc_user"
+ append_setting "rpc-passwd=$rpc_passwd"
else
- _info "It is recommand to set RPC secret."
+ _info "It is recommended to set RPC secret."
fi
elif [ "$rpc_auth_method" = "token" ]; then
if [ -n "$rpc_secret" ]; then
- append_setting "rpc-secret=${rpc_secret}"
+ append_setting "rpc-secret=$rpc_secret"
else
unset_auth_method
fi
elif [ "$rpc_auth_method" = "user_pass" ]; then
if [ -n "$rpc_user" ]; then
- append_setting "rpc-user=${rpc_user}"
- append_setting "rpc-passwd=${rpc_passwd}"
+ append_setting "rpc-user=$rpc_user"
+ append_setting "rpc-passwd=$rpc_passwd"
else
_info "Please set RPC user."
unset_auth_method
fi
if [ ."$enable_dht" = ."true" ]; then
- dht_file="${config_dir}/dht.dat.${section}"
+ dht_file="$config_dir/dht.dat.$section"
_create_file "$dht_file" || {
- _err "Can't create DHT file: ${dht_file}"
+ _err "Can't create DHT file: $dht_file"
return 1
}
append_setting "enable-dht=true"
- append_setting "dht-file-path=${dht_file}"
+ append_setting "dht-file-path=$dht_file"
fi
if [ ."$enable_dht6" = ."true" ] && [ ."$disable_ipv6" != ."true" ]; then
- dht6_file="${config_dir}/dht6.dat.${section}"
+ dht6_file="$config_dir/dht6.dat.$section"
_create_file "$dht6_file" || {
- _err "Can't create DHT6 file: ${dht6_file}"
+ _err "Can't create DHT6 file: $dht6_file"
return 1
}
append_setting "enable-dht6=true"
- append_setting "dht-file-path6=${dht6_file}"
+ append_setting "dht-file-path6=$dht6_file"
fi
if [ -n "$bt_tracker" ]; then
if [ -z "$bt_tracker_list" ]; then
bt_tracker_list="$t"
else
- bt_tracker_list="${bt_tracker_list},${t}"
+ bt_tracker_list="$bt_tracker_list,$t"
fi
done
- append_setting "bt-tracker=${bt_tracker_list}"
+ append_setting "bt-tracker=$bt_tracker_list"
fi
append_options "auto_save_interval" "bt_enable_lpd" "bt_max_open_files" "bt_max_peers" \
- "bt_remove_unselected_file" "bt_request_peer_speed_limit" "bt_save_metadata" "bt_seed_unverified" \
- "bt_stop_timeout" "certificate" "connect_timeout" "dht_listen_port" "disable_ipv6" "disk_cache" \
- "enable_peer_exchange" "event_poll" "file_allocation" "follow_torrent" "force_save" "http_accept_gzip" \
- "http_no_cache" "listen_port" "lowest_speed_limit" "max_concurrent_downloads" "max_connection_per_server" \
+ "bt_remove_unselected_file" "bt_request_peer_speed_limit" "bt_prioritize_piece" \
+ "bt_stop_timeout" "bt_detach_seed_only" "bt_save_metadata" "bt_load_saved_metadata" \
+ "bt_seed_unverified" "certificate" "check_integrity" "connect_timeout" "dht_listen_port" \
+ "disable_ipv6" "disk_cache" "enable_peer_exchange" "event_poll" "file_allocation" \
+ "follow_torrent" "force_save" "http_accept_gzip" "http_no_cache" "listen_port" \
+ "lowest_speed_limit" "max_concurrent_downloads" "max_connection_per_server" \
"max_download_limit" "max_overall_download_limit" "max_overall_upload_limit" "max_tries" \
"max_upload_limit" "min_split_size" "pause" "pause_metadata" "peer_id_prefix" "private_key" \
"retry_wait" "rpc_listen_port" "save_session_interval" "seed_ratio" "seed_time" "split" "timeout" \
if [ -n "$user" ]; then
if ( user_exists "$user" && _change_owner "$user" "$config_dir" "$log" ); then
- _info "Aria2 will run with user '${user}'."
+ _info "Aria2 will run with user '$user'."
if [ "$user" != "root" ]; then
- _info "Please make sure user '${user}' has write access to download dir: ${dir}"
+ _info "Please make sure user '$user' has write access to download dir: $dir"
fi
else
- _info "Set run user to '${user}' failed, default user will be used."
+ _info "Setting run user to '$user' failed, default user will be used."
user=
fi
fi
- procd_open_instance "${NAME}.${section}"
+ procd_open_instance "$NAME.$section"
procd_set_param command "$PROG"
- procd_append_param command --conf-path="${config_file}"
+ procd_append_param command --conf-path="$config_file"
procd_set_param respawn
procd_set_param stdout 1
[ -n "$user" ] && \
procd_set_param user "$user"
- procd_add_jail "${NAME}.${section}" log
+ procd_add_jail "$NAME.$section" log
procd_add_jail_mount "$config_file"
procd_add_jail_mount_rw "$dir" "$config_dir" "$log"
procd_close_instance
service_triggers() {
procd_add_reload_trigger "$NAME"
+ procd_add_validation aria2_validate
}
start_service() {
config_load "$NAME"
- config_foreach aria2_start "aria2"
+ config_foreach aria2_validate "aria2" aria2_start
}
include $(TOPDIR)/rules.mk
PKG_NAME:=ariang
+PKG_VERSION:=1.1.1
PKG_RELEASE:=1
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/mayswind/AriaNg-DailyBuild
-PKG_MIRROR_HASH:=9d1dff6762d61a8a1f26c32d7933248a613c2597de7006d3bdae7e18a86e1d20
-PKG_SOURCE_DATE:=2018-11-21
-PKG_SOURCE_VERSION:=f40f5a7880ba0cb84d3ea93a667287d38eaec93b
+PKG_SOURCE_URL:=https://codeload.github.com/mayswind/AriaNg-DailyBuild/tar.gz/$(PKG_VERSION)?
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_HASH:=48f3f737a6a79ab140f6bc75b0b6fd377ccbb75c7b7260b38ad4e64dee97d9e8
+PKG_BUILD_DIR:=$(BUILD_DIR)/AriaNg-DailyBuild-$(PKG_VERSION)
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE
SUBMENU:=Download Manager
DEPENDS:=+aria2
TITLE:=AriaNg webui
- URL:=https://github.com/mayswind/AriaNg
+ URL:=https://ariang.mayswind.net
PKGARCH:=all
endef
include $(TOPDIR)/rules.mk
PKG_NAME:=banip
-PKG_VERSION:=0.1.0
+PKG_VERSION:=0.1.4
PKG_RELEASE:=1
PKG_LICENSE:=GPL-3.0+
PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
config banip 'extra'
option ban_debug '0'
option ban_backup '0'
- option ban_maxqueue '8'
+ option ban_maxqueue '4'
config source 'whitelist'
option ban_src '/etc/banip/banip.whitelist'
config source 'sslbl'
option ban_src 'https://sslbl.abuse.ch/blacklist/sslipblacklist.csv'
option ban_src_desc 'SSL Blacklist by abuse.ch (IPv4)'
- option ban_src_rset 'BEGIN{FS=\",\"}/^(([0-9]{1,3}\.){3}[0-9]{1,3},).*/{print \"add sslbl \"\$1}'
+ option ban_src_rset 'BEGIN{FS=\",\"}/(([0-9]{1,3}\.){3}[0-9]{1,3},).*/{print \"add sslbl \"\$2}'
option ban_src_settype 'ip'
option ban_src_ruletype 'src'
option ban_src_on '0'
do
procd_add_interface_trigger "interface.*.up" "${iface}" "${ban_init}" start
done
- procd_add_reload_trigger "banip" "firewall"
+ procd_add_reload_trigger "banip"
}
#
LC_ALL=C
PATH="/usr/sbin:/usr/bin:/sbin:/bin"
-ban_ver="0.1.0"
+ban_ver="0.1.4"
ban_sysver="unknown"
ban_enabled=0
ban_automatic="1"
+ban_sources=""
ban_iface=""
ban_debug=0
ban_backup=0
ban_backupboot=0
ban_backupdir="/mnt"
-ban_maxqueue=8
+ban_maxqueue=4
ban_fetchutil="uclient-fetch"
ban_ip="$(command -v ip)"
ban_ipt="$(command -v iptables)"
# check status
#
- if [ ${ban_enabled} -eq 0 ]
+ if [ "${ban_enabled}" -eq 0 ]
then
f_jsnup disabled
f_ipset destroy
if [ -z "${ban_tmpdir}" ]
then
ban_tmpdir="$(mktemp -p /tmp -d)"
- ban_tmpload="$(mktemp -p ${ban_tmpdir} -tu)"
- ban_tmpfile="$(mktemp -p ${ban_tmpdir} -tu)"
+ ban_tmpload="$(mktemp -p "${ban_tmpdir}" -tu)"
+ ban_tmpfile="$(mktemp -p "${ban_tmpdir}" -tu)"
fi
if [ ! -s "${ban_pidfile}" ]
{
if [ -d "${ban_backupdir}" ]
then
- rm -f "${ban_backupdir}/banIP."*.gz
+ rm -f "${ban_backupdir}"/banIP.*.gz
fi
}
if [ "${src_name##*_}" = "6" ]
then
- rc="$("${ban_ipt6}" "${timeout}" -C ${rule} 2>/dev/null; printf '%u' ${?})"
-
- if ([ ${rc} -ne 0 ] && ([ "${action}" = "-A" ] || [ "${action}" = "-I" ])) \
- || ([ ${rc} -eq 0 ] && [ "${action}" = "-D" ])
+ if [ -x "${ban_ipt6}" ]
then
- "${ban_ipt6}" "${timeout}" "${action}" ${rule}
+ rc="$("${ban_ipt6}" "${timeout}" -C ${rule} 2>/dev/null; printf '%u' ${?})"
+
+ if { [ "${rc}" -ne 0 ] && { [ "${action}" = "-A" ] || [ "${action}" = "-I" ]; } } || \
+ { [ "${rc}" -eq 0 ] && [ "${action}" = "-D" ]; }
+ then
+ "${ban_ipt6}" "${timeout}" "${action}" ${rule}
+ fi
fi
else
- rc="$("${ban_ipt}" "${timeout}" -C ${rule} 2>/dev/null; printf '%u' ${?})"
-
- if ([ ${rc} -ne 0 ] && ([ "${action}" = "-A" ] || [ "${action}" = "-I" ])) \
- || ([ ${rc} -eq 0 ] && [ "${action}" = "-D" ])
+ if [ -x "${ban_ipt}" ]
then
- "${ban_ipt}" "${timeout}" "${action}" ${rule}
+ rc="$("${ban_ipt}" "${timeout}" -C ${rule} 2>/dev/null; printf '%u' ${?})"
+
+ if { [ "${rc}" -ne 0 ] && { [ "${action}" = "-A" ] || [ "${action}" = "-I" ]; } } || \
+ { [ "${rc}" -eq 0 ] && [ "${action}" = "-D" ]; }
+ then
+ "${ban_ipt}" "${timeout}" "${action}" ${rule}
+ fi
fi
fi
}
f_iptrule "-D" "${ban_chain} -o ${dev} -m conntrack --ctstate NEW -m set --match-set ${src_name} dst -j ${target_dst}"
done
- if [ -z "${rm}" ] && [ ${cnt} -gt 0 ]
+ if [ -z "${rm}" ] && [ "${cnt}" -gt 0 ]
then
if [ "${src_ruletype}" != "dst" ]
then
done
fi
else
- if [ -n "$("${ban_ipset}" -n list "${src_name}" 2>/dev/null)" ]
+ if [ -x "${ban_ipset}" ] && [ -n "$("${ban_ipset}" -q -n list "${src_name}")" ]
then
- "${ban_ipset}" destroy "${src_name}"
+ "${ban_ipset}" -q destroy "${src_name}"
fi
fi
}
if [ "${src_name%_6*}" = "whitelist" ]
then
- target_src="ACCEPT"
- target_dst="ACCEPT"
+ target_src="RETURN"
+ target_dst="RETURN"
action="-I"
fi
f_log "debug" "f_ipset ::: name: ${src_name:-"-"}, mode: ${mode:-"-"}"
;;
initial)
- if [ -z "$("${ban_ipt}" "${timeout}" -nL "${ban_chain}" 2>/dev/null)" ]
+ if [ -x "${ban_ipt}" ] && [ -z "$("${ban_ipt}" "${timeout}" -nL "${ban_chain}" 2>/dev/null)" ]
then
"${ban_ipt}" "${timeout}" -N "${ban_chain}"
+ elif [ -x "${ban_ipt}" ]
+ then
+ src_name="ruleset"
+ ruleset="${ban_wan_input_chain:-"input_wan_rule"} ${ban_wan_forward_chain:-"forwarding_wan_rule"} ${ban_lan_input_chain:-"input_lan_rule"} ${ban_lan_forward_chain:-"forwarding_lan_rule"}"
+ for rule in ${ruleset}
+ do
+ f_iptrule "-D" "${rule} -j ${ban_chain}"
+ done
fi
- if [ -z "$("${ban_ipt6}" "${timeout}" -nL "${ban_chain}" 2>/dev/null)" ]
+ if [ -x "${ban_ipt6}" ] && [ -z "$("${ban_ipt6}" "${timeout}" -nL "${ban_chain}" 2>/dev/null)" ]
then
"${ban_ipt6}" "${timeout}" -N "${ban_chain}"
+ elif [ -x "${ban_ipt6}" ]
+ then
+ src_name="ruleset_6"
+ ruleset_6="${ban_wan_input_chain_6:-"input_wan_rule"} ${ban_wan_forward_chain_6:-"forwarding_wan_rule"} ${ban_lan_input_chain_6:-"input_lan_rule"} ${ban_lan_forward_chain_6:-"forwarding_lan_rule"}"
+ for rule in ${ruleset_6}
+ do
+ f_iptrule "-D" "${rule} -j ${ban_chain}"
+ done
fi
-
- src_name="ruleset"
- ruleset="${ban_wan_input_chain:-"input_wan_rule"} ${ban_wan_forward_chain:-"forwarding_wan_rule"} ${ban_lan_input_chain:-"input_lan_rule"} ${ban_lan_forward_chain:-"forwarding_lan_rule"}"
- for rule in ${ruleset}
- do
- f_iptrule "-D" "${rule} -j ${ban_chain}"
- done
-
- src_name="ruleset_6"
- ruleset_6="${ban_wan_input_chain_6:-"input_wan_rule"} ${ban_wan_forward_chain_6:-"forwarding_wan_rule"} ${ban_lan_input_chain_6:-"input_lan_rule"} ${ban_lan_forward_chain_6:-"forwarding_lan_rule"}"
- for rule in ${ruleset_6}
- do
- f_iptrule "-D" "${rule} -j ${ban_chain}"
- done
-
- f_log "debug" "f_ipset ::: name: -, mode: ${mode:-"-"}, chain: ${ban_chain:-"-"}, ruleset: ${ruleset}, ruleset_6: ${ruleset_6}"
+ f_log "debug" "f_ipset ::: name: -, mode: ${mode:-"-"}, chain: ${ban_chain:-"-"}, ruleset: ${ruleset:-"-"}, ruleset_6: ${ruleset_6:-"-"}"
;;
create)
cnt="$(wc -l 2>/dev/null < "${tmp_file}")"
- cnt_cidr="$(grep -F "/" "${tmp_file}" | wc -l)"
- cnt_ip="$(( cnt - cnt_cidr ))"
- size="$(( cnt / 4 ))"
+ cnt_cidr="$(grep -cF "/" "${tmp_file}")"
+ cnt_ip="$((cnt-cnt_cidr))"
+ size="$((cnt/4))"
- if [ ${cnt} -gt 0 ]
+ if [ "${cnt}" -gt 0 ]
then
- if [ -z "$("${ban_ipset}" -n list "${src_name}" 2>/dev/null)" ]
+ if [ -x "${ban_ipset}" ] && [ -z "$("${ban_ipset}" -q -n list "${src_name}")" ]
then
- "${ban_ipset}" create "${src_name}" hash:"${src_settype}" hashsize "${size}" maxelem 262144 family "${src_setipv}" counters
+ "${ban_ipset}" -q create "${src_name}" hash:"${src_settype}" hashsize "${size}" maxelem 262144 family "${src_setipv}" counters
else
- "${ban_ipset}" flush "${src_name}"
+ "${ban_ipset}" -q flush "${src_name}"
fi
-
"${ban_ipset}" -! restore < "${tmp_file}"
printf "%s\n" "1" > "${tmp_set}"
printf "%s\n" "${cnt}" > "${tmp_cnt}"
fi
f_iptadd
end_ts="$(date +%s)"
- f_log "debug" "f_ipset ::: name: ${src_name:-"-"}, mode: ${mode:-"-"}, settype: ${src_settype:-"-"}, setipv: "${src_setipv}", ruletype: ${src_ruletype:-"-"}, count(sum/ip/cidr): ${cnt:-0}/${cnt_ip:-0}/${cnt_cidr:-0}, time(s): $(( end_ts - start_ts ))"
+ f_log "debug" "f_ipset ::: name: ${src_name:-"-"}, mode: ${mode:-"-"}, settype: ${src_settype:-"-"}, setipv: ${src_setipv:-"-"}, ruletype: ${src_ruletype:-"-"}, count(sum/ip/cidr): ${cnt:-0}/${cnt_ip:-0}/${cnt_cidr:-0}, time: $((end_ts-start_ts))"
;;
refresh)
- if [ -n "$("${ban_ipset}" -n list "${src_name}" 2>/dev/null)" ]
+ ban_rc=4
+ if [ -x "${ban_ipset}" ] && [ -n "$("${ban_ipset}" -q -n list "${src_name}")" ]
then
- "${ban_ipset}" save "${src_name}" > "${tmp_file}"
+ "${ban_ipset}" -q save "${src_name}" > "${tmp_file}"
if [ -s "${tmp_file}" ]
then
- cnt="$(( $(wc -l 2>/dev/null < "${tmp_file}") - 1 ))"
- cnt_cidr="$(grep -F "/" "${tmp_file}" | wc -l)"
- cnt_ip="$(( cnt - cnt_cidr ))"
+ ban_rc=0
+ cnt="$(($(wc -l 2>/dev/null < "${tmp_file}")-1))"
+ cnt_cidr="$(grep -cF "/" "${tmp_file}")"
+ cnt_ip="$((cnt-cnt_cidr))"
printf "%s\n" "1" > "${tmp_set}"
printf "%s\n" "${cnt}" > "${tmp_cnt}"
fi
f_iptadd
fi
end_ts="$(date +%s)"
- f_log "debug" "f_ipset ::: name: ${src_name:-"-"}, mode: ${mode:-"-"}, count: ${cnt:-0}/${cnt_ip:-0}/${cnt_cidr:-0}, time(s): $(( end_ts - start_ts ))"
+ f_log "debug" "f_ipset ::: name: ${src_name:-"-"}, mode: ${mode:-"-"}, count: ${cnt:-0}/${cnt_ip:-0}/${cnt_cidr:-0}, time: $((end_ts-start_ts)), rc: ${ban_rc}"
;;
flush)
f_iptadd "remove"
- if [ -n "$("${ban_ipset}" -n list "${src_name}" 2>/dev/null)" ]
+ if [ -x "${ban_ipset}" ] && [ -n "$("${ban_ipset}" -q -n list "${src_name}")" ]
then
- "${ban_ipset}" flush "${src_name}"
- "${ban_ipset}" destroy "${src_name}"
+ "${ban_ipset}" -q flush "${src_name}"
+ "${ban_ipset}" -q destroy "${src_name}"
fi
-
f_log "debug" "f_ipset ::: name: ${src_name:-"-"}, mode: ${mode:-"-"}"
;;
destroy)
- if [ -n "$("${ban_ipt}" "${timeout}" -nL "${ban_chain}" 2>/dev/null)" ]
+ if [ -x "${ban_ipt}" ] && [ -x "${ban_ipt_save}" ] && [ -x "${ban_ipt_restore}" ] && \
+ [ -n "$("${ban_ipt}" "${timeout}" -nL "${ban_chain}" 2>/dev/null)" ]
then
"${ban_ipt_save}" | grep -v -- "-j ${ban_chain}" | "${ban_ipt_restore}"
"${ban_ipt}" "${timeout}" -F "${ban_chain}"
"${ban_ipt}" "${timeout}" -X "${ban_chain}"
fi
- if [ -n "$("${ban_ipt6}" "${timeout}" -nL "${ban_chain}" 2>/dev/null)" ]
+ if [ -x "${ban_ipt6}" ] && [ -x "${ban_ipt6_save}" ] && [ -x "${ban_ipt6_restore}" ] && \
+ [ -n "$("${ban_ipt6}" "${timeout}" -nL "${ban_chain}" 2>/dev/null)" ]
then
"${ban_ipt6_save}" | grep -v -- "-j ${ban_chain}" | "${ban_ipt6_restore}"
"${ban_ipt6}" "${timeout}" -F "${ban_chain}"
for source in ${ban_sources}
do
- if [ -n "$("${ban_ipset}" -n list "${source}" 2>/dev/null)" ]
+ if [ -x "${ban_ipset}" ] && [ -n "$("${ban_ipset}" -q -n list "${source}")" ]
then
- "${ban_ipset}" destroy "${source}"
+ "${ban_ipset}" -q destroy "${source}"
fi
done
-
f_log "debug" "f_ipset ::: name: ${src_name:-"-"}, mode: ${mode:-"-"}"
;;
esac
{
local class="${1}" log_msg="${2}"
- if [ -n "${log_msg}" ] && ([ "${class}" != "debug" ] || [ ${ban_debug} -eq 1 ])
+ if [ -n "${log_msg}" ] && { [ "${class}" != "debug" ] || [ "${ban_debug}" -eq 1 ]; }
then
logger -p "${class}" -t "banIP-[${ban_ver}]" "${log_msg}"
if [ "${class}" = "err" ]
#
f_main()
{
- local start_ts end_ts ip tmp_raw tmp_cnt tmp_setcnt tmp_load tmp_file entry list suffix mem_total mem_free cnt=1
+ local pid pid_list start_ts end_ts ip tmp_raw tmp_cnt tmp_load tmp_file mem_total mem_free cnt=1
local src_name src_on src_url src_rset src_setipv src_settype src_ruletype src_cat src_log src_addon
- local pid pid_list log_content="$(logread -e "dropbear")"
- local wan_input wan_forward lan_input lan_forward target_src target_dst
+ local wan_input wan_forward lan_input lan_forward target_src target_dst log_content
+ log_content="$(logread -e "dropbear")"
mem_total="$(awk '/^MemTotal/ {print int($2/1000)}' "/proc/meminfo" 2>/dev/null)"
mem_free="$(awk '/^MemFree/ {print int($2/1000)}' "/proc/meminfo" 2>/dev/null)"
f_log "debug" "f_main ::: fetch_util: ${ban_fetchinfo:-"-"}, fetch_parm: ${ban_fetchparm:-"-"}, interface(s): ${ban_iface:-"-"}, device(s): ${ban_dev:-"-"}, all_devices: ${ban_dev_all:-"-"}, backup: ${ban_backup:-"-"}, backup_boot: ${ban_backupboot:-"-"}, backup_dir: ${ban_backupdir:-"-"}, mem_total: ${mem_total:-0}, mem_free: ${mem_free:-0}, max_queue: ${ban_maxqueue}"
#
for src_name in ${ban_sources}
do
+ unset src_on
if [ "${src_name##*_}" = "6" ]
then
- src_on="$(eval printf '%s' \"\${ban_src_on_6_${src_name%_6*}\}\")"
- src_url="$(eval printf '%s' \"\${ban_src_6_${src_name%_6*}\}\")"
- src_rset="$(eval printf '%s' \"\${ban_src_rset_6_${src_name%_6*}\}\")"
- src_setipv="inet6"
- wan_input="${ban_wan_input_chain_6:-"input_wan_rule"}"
- wan_forward="${ban_wan_forward_chain_6:-"forwarding_wan_rule"}"
- lan_input="${ban_lan_input_chain_6:-"input_lan_rule"}"
- lan_forward="${ban_lan_forward_chain_6:-"forwarding_lan_rule"}"
- target_src="${ban_target_src_6:-"DROP"}"
- target_dst="${ban_target_dst_6:-"REJECT"}"
+ if [ -x "${ban_ipt6}" ]
+ then
+ src_on="$(eval printf '%s' \"\${ban_src_on_6_${src_name%_6*}\}\")"
+ src_url="$(eval printf '%s' \"\${ban_src_6_${src_name%_6*}\}\")"
+ src_rset="$(eval printf '%s' \"\${ban_src_rset_6_${src_name%_6*}\}\")"
+ src_setipv="inet6"
+ wan_input="${ban_wan_input_chain_6:-"input_wan_rule"}"
+ wan_forward="${ban_wan_forward_chain_6:-"forwarding_wan_rule"}"
+ lan_input="${ban_lan_input_chain_6:-"input_lan_rule"}"
+ lan_forward="${ban_lan_forward_chain_6:-"forwarding_lan_rule"}"
+ target_src="${ban_target_src_6:-"DROP"}"
+ target_dst="${ban_target_dst_6:-"REJECT"}"
+ fi
else
- src_on="$(eval printf '%s' \"\${ban_src_on_${src_name}\}\")"
- src_url="$(eval printf '%s' \"\${ban_src_${src_name}\}\")"
- src_rset="$(eval printf '%s' \"\${ban_src_rset_${src_name}\}\")"
- src_setipv="inet"
- wan_input="${ban_wan_input_chain:-"input_wan_rule"}"
- wan_forward="${ban_wan_forward_chain:-"forwarding_wan_rule"}"
- lan_input="${ban_lan_input_chain:-"input_lan_rule"}"
- lan_forward="${ban_lan_forward_chain:-"forwarding_lan_rule"}"
- target_src="${ban_target_src:-"DROP"}"
- target_dst="${ban_target_dst:-"REJECT"}"
+ if [ -x "${ban_ipt}" ]
+ then
+ src_on="$(eval printf '%s' \"\${ban_src_on_${src_name}\}\")"
+ src_url="$(eval printf '%s' \"\${ban_src_${src_name}\}\")"
+ src_rset="$(eval printf '%s' \"\${ban_src_rset_${src_name}\}\")"
+ src_setipv="inet"
+ wan_input="${ban_wan_input_chain:-"input_wan_rule"}"
+ wan_forward="${ban_wan_forward_chain:-"forwarding_wan_rule"}"
+ lan_input="${ban_lan_input_chain:-"input_lan_rule"}"
+ lan_forward="${ban_lan_forward_chain:-"forwarding_lan_rule"}"
+ target_src="${ban_target_src:-"DROP"}"
+ target_dst="${ban_target_dst:-"REJECT"}"
+ fi
fi
src_settype="$(eval printf '%s' \"\${ban_src_settype_${src_name%_6*}\}\")"
src_ruletype="$(eval printf '%s' \"\${ban_src_ruletype_${src_name%_6*}\}\")"
#
f_log "debug" "f_main ::: name: ${src_name}, src_on: ${src_on:-"-"}"
- if [ "${src_on}" != "1" ] || [ -z "${src_url}" ] || [ -z "${src_rset}" ] ||\
- [ -z "${src_settype}" ] || [ -z "${src_ruletype}" ]
+ if [ -z "${src_on}" ] || [ "${src_on}" != "1" ] || [ -z "${src_url}" ] || \
+ [ -z "${src_rset}" ] || [ -z "${src_settype}" ] || [ -z "${src_ruletype}" ]
then
f_ipset flush
f_ipset remove
continue
elif [ "${ban_action}" = "refresh" ]
then
+ start_ts="$(date +%s)"
f_ipset refresh
- continue
+ if [ ${ban_rc} -eq 0 ]
+ then
+ continue
+ fi
fi
# download queue processing
if [ ${ban_rc} -eq 0 ]
then
- awk "${src_rset}" "${tmp_load}" 2>/dev/null | sort -u > "${tmp_file}"
+ awk "${src_rset}" "${tmp_load}" 2>/dev/null > "${tmp_file}"
ban_rc=${?}
if [ ${ban_rc} -eq 0 ]
then
f_ipset refresh
fi
) &
- hold=$(( cnt % ban_maxqueue ))
- if [ ${hold} -eq 0 ]
+ hold="$((cnt%ban_maxqueue))"
+ if [ "${hold}" -eq 0 ]
then
wait
fi
- cnt=$(( cnt + 1 ))
+ cnt="$((cnt+1))"
done
wait
- if [ ${ban_rc} -eq 0 ]
+ if [ "${ban_rc}" -eq 0 ]
then
- for cnt in $(cat ${ban_tmpfile}.*.setcnt 2>/dev/null)
+ for cnt in $(cat "${ban_tmpfile}".*.setcnt 2>/dev/null)
do
- ban_setcnt=$(( ban_setcnt + cnt ))
+ ban_setcnt="$((ban_setcnt+cnt))"
done
- for cnt in $(cat ${ban_tmpfile}.*.cnt 2>/dev/null)
+ for cnt in $(cat "${ban_tmpfile}".*.cnt 2>/dev/null)
do
- ban_cnt=$(( ban_cnt + cnt ))
+ ban_cnt="$((ban_cnt+cnt))"
done
f_log "info" "${ban_setcnt} IPSets with overall ${ban_cnt} IPs/Prefixes loaded successfully (${ban_sysver})"
fi
#
f_jsnup()
{
- local rundate="$(/bin/date "+%d.%m.%Y %H:%M:%S")" mode="normal mode" status="${1:-"enabled"}"
+ local rundate mode status="${1:-"enabled"}"
+ rundate="$(/bin/date "+%d.%m.%Y %H:%M:%S")"
+ mode="normal mode"
ban_cntinfo="${ban_setcnt} IPSets with overall ${ban_cnt} IPs/Prefixes"
- if [ ${ban_backupboot} -eq 1 ]
+ if [ "${ban_backupboot}" -eq 1 ]
then
mode="backup mode"
fi
URL:=https://github.com/dtaht/ceropackages-3.10
MAINTAINER:=Toke Høiland-Jørgensen <toke@toke.dk>
DEPENDS:=+ipset
+ PKGARCH:=all
endef
define Package/bcp38/description
if PACKAGE_bind-server
-config BIND_ENABLE_FILTER_AAAA
- bool
- default y
- prompt "Enable filtering of AAAA records returned to the client"
- help
- BIND 9 has an option to filter AAAA (IPv6 address) records
- returned to the client based on the transport used for the
- query, and other filtering conditions. This filtering does
- not affect the recursive queries made by the server (if
- any) as a result of the client request.
-
- Additional details are available at
- https://kb.isc.org/article/AA-00576/0/Filter-AAAA-option-in-BIND-9-.html
-
config BIND_LIBJSON
bool
default n
libxml2 is required to report server statistics in XML
format. Building with libjson support will require the
libxml2 package to be installed as well.
-
-config BIND_ENABLE_EDDSA
- bool
- default n
- prompt "Include Edwards Curve DNSSEC signature support"
- help
- Enable BIND support for Edwards Curve DNSSEC signing algorithms
- described in RFC 8080.
-
- Note that this requires OpenSSL 1.1, which is not currently
- the available in OpenWRT, so it is disabled by default.
endif
include $(TOPDIR)/rules.mk
PKG_NAME:=bind
-PKG_VERSION:=9.12.3-P1
+PKG_VERSION:=9.14.3
PKG_RELEASE:=1
USERID:=bind=57:bind=57
PKG_MAINTAINER:=Noah Meyerhans <frodo@morgul.net>
PKG_LICENSE := MPL-2.0
+PKG_CPE_ID:=cpe:/a:isc:bind
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:= \
https://www.mirrorservice.org/sites/ftp.isc.org/isc/bind9/$(PKG_VERSION) \
https://ftp.isc.org/isc/bind9/$(PKG_VERSION)
-PKG_HASH:=6cb79389d787368af27f01c65a9fa09be1fd062eda37c94819a1a0178d5ded73
+PKG_HASH:=ce878aabcf01b61ed114522c32fff9e268b02da55b3c248349860bc3d0c8bdfa
PKG_FIXUP:=autoreconf
PKG_REMOVE_FILES:=aclocal.m4 libtool.m4
PKG_BUILD_PARALLEL:=1
PKG_CONFIG_DEPENDS := \
- CONFIG_BIND_ENABLE_FILTER_AAAA \
CONFIG_BIND_LIBJSON \
CONFIG_BIND_LIBXML2
define Package/bind-libs
SECTION:=libs
CATEGORY:=Libraries
- DEPENDS:=+libopenssl +zlib
+ DEPENDS:=+libopenssl +zlib +libpthread +libatomic
TITLE:=bind shared libraries
URL:=https://www.isc.org/software/bind
ifdef CONFIG_BIND_LIBJSON
source "$(SOURCE)/Config.in"
endef
+define Package/bind-server-filter-aaaa
+ $(call Package/bind-server)
+ DEPENDS:=+bind-server
+ TITLE+= filter AAAA plugin
+endef
+
define Package/bind-client
$(call Package/bind/Default)
TITLE+= dynamic DNS client
export BUILD_CC="$(TARGET_CC)"
+TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
+
CONFIGURE_ARGS += \
- --enable-ipv6=$(if $(CONFIG_IPV6),yes,no) \
- --with-randomdev="/dev/urandom" \
- --disable-threads \
--disable-linux-caps \
--with-openssl="$(STAGING_DIR)/usr" \
--with-libtool \
--without-lmdb \
- --enable-epoll=yes \
- --with-gost=no \
- --with-gssapi=no \
- --with-ecdsa=$(if $(CONFIG_OPENSSL_WITH_EC),yes,no) \
- --with-eddsa=$(if $(CONFIG_BIND_ENABLE_EDDSA),yes,no) \
- --with-readline=no \
- --enable-atomic=no \
+ --enable-epoll \
+ --without-gssapi \
+ --without-readline \
+ --without-python \
--sysconfdir=/etc/bind
-ifdef CONFIG_BIND_ENABLE_FILTER_AAAA
- CONFIGURE_ARGS += \
- --enable-filter-aaaa
-endif
-
ifdef CONFIG_BIND_LIBJSON
CONFIGURE_ARGS += \
--with-libjson="$(STAGING_DIR)/usr"
else
CONFIGURE_ARGS += \
- --with-libjson=no
+ --without-libjson
endif
ifdef CONFIG_BIND_LIBXML2
--with-libxml2="$(STAGING_DIR)/usr"
else
CONFIGURE_ARGS += \
- --with-libxml2=no
+ --without-libxml2
endif
CONFIGURE_VARS += \
/etc/bind/named.conf
endef
+define Package/bind-server-filter-aaaa/install
+ $(INSTALL_DIR) $(1)/usr/lib/named
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/named/filter-aaaa.so $(1)/usr/lib/named
+endef
+
define Package/bind-client/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nsupdate $(1)/usr/bin/
$(eval $(call BuildPackage,bind-libs))
$(eval $(call BuildPackage,bind-server))
+$(eval $(call BuildPackage,bind-server-filter-aaaa))
$(eval $(call BuildPackage,bind-client))
$(eval $(call BuildPackage,bind-tools))
$(eval $(call BuildPackage,bind-rndc))
top_srcdir = @top_srcdir@
SUBDIRS = named rndc dig delv dnssec tools nsupdate check confgen \
-- @NZD_TOOLS@ @PYTHON_TOOLS@ @PKCS11_TOOLS@ tests
-+ @NZD_TOOLS@ @PYTHON_TOOLS@ @PKCS11_TOOLS@
+- @NZD_TOOLS@ @PYTHON_TOOLS@ @PKCS11_TOOLS@ plugins tests
++ @NZD_TOOLS@ @PYTHON_TOOLS@ @PKCS11_TOOLS@ plugins
TARGETS =
@BIND9_MAKE_RULES@
+++ /dev/null
---- a/configure.in
-+++ b/configure.in
-@@ -182,26 +182,11 @@ esac
- #
- AC_CONFIG_FILES([make/rules make/includes])
-
--AC_PATH_PROG(AR, ar)
--ARFLAGS="cruv"
--AC_SUBST(AR)
--AC_SUBST(ARFLAGS)
--
- # The POSIX ln(1) program. Non-POSIX systems may substitute
- # "copy" or something.
- LN=ln
- AC_SUBST(LN)
-
--case "$AR" in
-- "")
-- AC_MSG_ERROR([
--ar program not found. Please fix your PATH to include the directory in
--which ar resides, or set AR in the environment with the full path to ar.
--])
--
-- ;;
--esac
--
- #
- # Etags.
- #
include $(TOPDIR)/rules.mk
PKG_NAME:=bitlbee
-PKG_VERSION:=3.5.1
-PKG_RELEASE:=2
+PKG_VERSION:=3.6
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://get.bitlbee.org/src/ \
- http://distcache.FreeBSD.org/local-distfiles/brix/
-PKG_HASH:=9636d7fd89ebb3756c13a9a3387736ca6d56ccf66ec0580d512f07b21db0fa69
+PKG_SOURCE_URL:=https://get.bitlbee.org/src
+PKG_HASH:=9f15de46f29b46bf1e39fc50bdf4515e71b17f551f3955094c5da792d962107e
PKG_MAINTAINER:=Nikil Mehta <nikil.mehta@gmail.com>
-PKG_LICENSE:=GPL-2.0
+PKG_LICENSE:=GPL-2.0-or-later
PKG_LICENSE_FILES:=COPYING
PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk
CATEGORY:=Network
SUBMENU:=Instant Messaging
TITLE:=An IRC to other chat networks gateway
- URL:=http://www.bitlbee.org/
+ URL:=https://www.bitlbee.org/
DEPENDS:=+glib2 +libopenssl $(ICONV_DEPENDS) $(INTL_DEPENDS)
endef
$(call Build/Install/Default,install install-etc)
endef
-define Package/bitlbee/install
+define Package/bitlbee/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/bitlbee $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/etc/bitlbee
+++ /dev/null
---- a/lib/ssl_openssl.c
-+++ b/lib/ssl_openssl.c
-@@ -64,11 +64,17 @@ void ssl_init(void)
- {
- const SSL_METHOD *meth;
-
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
- SSL_library_init();
-
- meth = SSLv23_client_method();
- ssl_ctx = SSL_CTX_new(meth);
- SSL_CTX_set_options(ssl_ctx, SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3);
-+#else
-+ meth = TLS_client_method();
-+ ssl_ctx = SSL_CTX_new(meth);
-+ SSL_CTX_set_min_proto_version(ssl_ctx, TLS1_VERSION);
-+#endif
-
- initialized = TRUE;
- }
-@@ -300,20 +306,20 @@ size_t ssl_des3_encrypt(const unsigned c
- const unsigned char *iv, unsigned char **res)
- {
- int output_length = 0;
-- EVP_CIPHER_CTX ctx;
-+ EVP_CIPHER_CTX *ctx;
-
- *res = g_new0(unsigned char, 72);
-
- /* Don't set key or IV because we will modify the parameters */
-- EVP_CIPHER_CTX_init(&ctx);
-- EVP_CipherInit_ex(&ctx, EVP_des_ede3_cbc(), NULL, NULL, NULL, 1);
-- EVP_CIPHER_CTX_set_key_length(&ctx, key_len);
-- EVP_CIPHER_CTX_set_padding(&ctx, 0);
-+ ctx = EVP_CIPHER_CTX_new();
-+ EVP_CipherInit_ex(ctx, EVP_des_ede3_cbc(), NULL, NULL, NULL, 1);
-+ EVP_CIPHER_CTX_set_key_length(ctx, key_len);
-+ EVP_CIPHER_CTX_set_padding(ctx, 0);
- /* We finished modifying parameters so now we can set key and IV */
-- EVP_CipherInit_ex(&ctx, NULL, NULL, key, iv, 1);
-- EVP_CipherUpdate(&ctx, *res, &output_length, input, input_len);
-- EVP_CipherFinal_ex(&ctx, *res, &output_length);
-- EVP_CIPHER_CTX_cleanup(&ctx);
-+ EVP_CipherInit_ex(ctx, NULL, NULL, key, iv, 1);
-+ EVP_CipherUpdate(ctx, *res, &output_length, input, input_len);
-+ EVP_CipherFinal_ex(ctx, *res, &output_length);
-+ EVP_CIPHER_CTX_free(ctx);
- //EVP_cleanup();
-
- return output_length;
CATEGORY:=Network
TITLE:=Link Aggregation (Channel Bonding) proto handler
DEPENDS:=+kmod-bonding
+ PKGARCH:=all
endef
define Package/proto-bonding/description
PKG_NAME:=bridge-utils
PKG_VERSION:=1.6
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@KERNEL/linux/utils/net/$(PKG_NAME)
CATEGORY:=Base system
TITLE:=Ethernet bridging configuration utility
URL:=http://www.linuxfromscratch.org/blfs/view/svn/basicnet/bridge-utils.html
+ ALTERNATIVES:=300:/usr/sbin/brctl:/usr/libexec/bridge-utils-brctl
endef
define Package/bridge/description
--with-linux-headers="$(LINUX_DIR)" \
define Package/bridge/install
- $(INSTALL_DIR) $(1)/usr/sbin
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/brctl/brctl $(1)/usr/sbin
-endef
-
-define Package/bridge/prerm
-#!/bin/sh
-$${IPKG_INSTROOT}/bin/busybox brctl -h 2>&1 | grep -q BusyBox && \
-ln -sf ../../bin/busybox $${IPKG_INSTROOT}/usr/sbin/brctl
-exit 0
+ $(INSTALL_DIR) $(1)/usr/libexec
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/brctl/brctl $(1)/usr/libexec/bridge-utils-brctl
endef
$(eval $(call BuildPackage,bridge))
include $(TOPDIR)/rules.mk
PKG_NAME:=cgi-io
-PKG_RELEASE:=5
+PKG_RELEASE:=6
PKG_LICENSE:=GPL-2.0+
$(INSTALL_DIR) $(1)/usr/libexec $(1)/www/cgi-bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/cgi-io $(1)/usr/libexec
$(LN) ../../usr/libexec/cgi-io $(1)/www/cgi-bin/cgi-upload
- $(LN) ../../usr/libexec/cgi-io $(1)/www/cgi-bin/cgi-download
+ $(LN) ../../usr/libexec/cgi-io $(1)/www/cgi-bin/cgi-backup
endef
$(eval $(call BuildPackage,cgi-io))
include $(TOPDIR)/rules.mk
PKG_NAME:=chrony
-PKG_VERSION:=3.4
+PKG_VERSION:=3.5
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://download.tuxfamily.org/chrony/
-PKG_HASH:=af77e47c2610a7e55c8af5b89a8aeff52d9a867dd5983d848b52d374bc0e6b9f
+PKG_HASH:=4e02795b1260a4ec51e6ace84149036305cc9fc340e65edb9f8452aa611339b5
PKG_MAINTAINER:=Miroslav Lichvar <mlichvar0@gmail.com>
PKG_LICENSE:=GPL-2.0
+++ /dev/null
-diff --git a/sysincl.h b/sysincl.h
-index a9e4da0..e2a6e78 100644
---- a/sysincl.h
-+++ b/sysincl.h
-@@ -80,4 +80,8 @@
- #include <sys/random.h>
- #endif
-
-+#if defined(LINUX) && !defined(IP_FREEBIND)
-+#define IP_FREEBIND 15
-+#endif
-+
- #endif /* GOT_SYSINCL_H */
+++ /dev/null
---- a/hash_intmd5.c
-+++ b/hash_intmd5.c
-@@ -29,6 +29,7 @@
- #include "sysincl.h"
- #include "hash.h"
- #include "memory.h"
-+#include "util.h"
-
- #include "md5.c"
-
include $(TOPDIR)/rules.mk
PKG_NAME:=cifs-utils
-PKG_VERSION:=6.8
+PKG_VERSION:=6.9
PKG_RELEASE:=1
-PKG_SOURCE_URL:=https://download.samba.org/pub/linux-cifs/cifs-utils/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_HASH:=e7d1f6050c43f21f82cd77e288eb756755effd22f0c310fc2c525df9d41dff79
+PKG_SOURCE_URL:=https://download.samba.org/pub/linux-cifs/cifs-utils/
+PKG_HASH:=18d8f1bf92c13c4d611502dbd6759e3a766ddc8467ec8a2eda3f589e40b9ac9c
PKG_MAINTAINER:=Florian Fainelli <florian@openwrt.org>
PKG_LICENSE:=GPL-3.0
PKG_LICENSE_FILES:=COPYING
-PKG_FIXUP:=libtool
-
include $(INCLUDE_DIR)/package.mk
define Package/cifsmount
CATEGORY:=Network
DEPENDS:=+kmod-fs-cifs
TITLE:=CIFS mount utilities
- URL:=http://wiki.samba.org/index.php/LinuxCIFS_utils
+ URL:=https://wiki.samba.org/index.php/LinuxCIFS_utils
endef
-TARGET_CFLAGS += -Wno-error
+TARGET_CFLAGS += $(FPIC) -ffunction-sections -flto
+TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
CONFIGURE_ARGS += \
- --exec-prefix=/usr \
- --prefix=/ \
- --with-libcap=no \
--disable-cifsupcall \
--disable-cifscreds \
--disable-cifsidmap \
--disable-cifsacl \
--disable-pam \
+ --disable-pie \
+ --disable-relro \
--disable-systemd \
- --disable-man
+ --disable-man \
+ --without-libcap
define Package/cifsmount/install
$(INSTALL_DIR) $(1)/usr/sbin
--- /dev/null
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=cifsd-tools
+PKG_RELEASE:=1
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/cifsd-team/cifsd-tools.git
+PKG_SOURCE_DATE:=2019-07-05
+PKG_SOURCE_VERSION:=539fa21a8dd427a8ca2dc13c9a5a1c975be96d3c
+PKG_MIRROR_HASH:=8c1b22d9926112a7e8ec94a3f731639a3789bef1aeb447f0bd7c41a1884e4dc5
+
+PKG_MAINTAINER:=Andy Walsh <andy.walsh44+github@gmail.com>
+PKG_LICENSE:=GPL-2.0-or-later
+PKG_LICENSE_FILES:=COPYING
+
+PKG_INSTALL:=1
+PKG_FIXUP:=autoreconf
+PKG_REMOVE_FILES:=autogen.sh aclocal.m4
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/nls.mk
+
+define Package/cifsd-tools
+ SECTION:=net
+ CATEGORY:=Network
+ SUBMENU:=Filesystem
+ TITLE:=Kernel CIFS/SMB server support and userspace tools
+ URL:=https://github.com/cifsd-team/cifsd-tools
+ DEPENDS:=+kmod-fs-cifsd +glib2 +libnl-core +libnl-genl
+endef
+
+define Package/cifsd-tools/description
+ Userspace tools (cifsd, cifsadmin) for the CIFS/SMB kernel fileserver.
+ The config file location is /etc/cifs/smb.conf
+endef
+
+define Package/cifsd-tools/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcifsdtools.so* $(1)/usr/lib/
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{cifsadmin,cifsd} $(1)/usr/sbin/
+ $(INSTALL_DIR) $(1)/etc/config $(1)/etc/cifs $(1)/etc/init.d
+ $(INSTALL_CONF) ./files/cifsd.config $(1)/etc/config/cifsd
+ $(INSTALL_DATA) ./files/smb.conf.template $(1)/etc/cifs/
+ $(INSTALL_BIN) ./files/cifsd.init $(1)/etc/init.d/cifsd
+ # copy examples until we have a wiki page
+ $(INSTALL_DATA) ./files/cifsd.config.example $(1)/etc/cifs/
+ $(INSTALL_DATA) ./files/smb.conf.help $(1)/etc/cifs/
+endef
+
+define Package/cifsd-tools/conffiles
+/etc/config/cifsd
+/etc/cifs/smb.conf.template
+/etc/cifs/smb.conf
+/etc/cifs/cifsdpwd.db
+endef
+
+$(eval $(call BuildPackage,cifsd-tools))
--- /dev/null
+config globals
+ option 'description' 'Cifsd on OpenWrt'
--- /dev/null
+config globals
+ option 'description' 'Cifsd on OpenWrt'
+
+config share
+ option name 'testshare'
+ option path '/tmp'
+ option guest_ok 'yes'
+ option create_mask '0666'
+ option dir_mask '0777'
+ option writeable 'yes'
+ option force_root '1'
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=98
+USE_PROCD=1
+
+CIFSD_IFACE=""
+
+smb_header()
+{
+ config_get CIFSD_IFACE $1 interface "lan"
+
+ # resolve interfaces
+ local interfaces=$(
+ . /lib/functions/network.sh
+
+ local net
+ for net in $CIFSD_IFACE; do
+ local device
+ network_is_up $net || continue
+ network_get_device device "$net"
+ echo -n "${device:-$net} "
+ done
+ )
+
+ local workgroup description
+ local hostname="$(cat /proc/sys/kernel/hostname)"
+
+ config_get workgroup $1 workgroup "WORKGROUP"
+ config_get description $1 description "Cifsd on OpenWrt"
+
+ sed -e "s#|NAME|#$hostname#g" \
+ -e "s#|WORKGROUP|#$workgroup#g" \
+ -e "s#|DESCRIPTION|#$description#g" \
+ -e "s#|INTERFACES|#$interfaces#g" \
+ /etc/cifs/smb.conf.template > /var/etc/cifs/smb.conf
+
+ [ -e /etc/cifs/smb.conf ] || ln -nsf /var/etc/cifs/smb.conf /etc/cifs/smb.conf
+
+ if [ ! -L /etc/cifs/smb.conf ]; then
+ logger -t 'cifsd' "Local custom /etc/cifs/smb.conf file detected, all UCI/Luci config settings are ignored!"
+ fi
+}
+
+smb_add_share()
+{
+ local name
+ local path
+ local comment
+ local users
+ local create_mask
+ local dir_mask
+ local browseable
+ local read_only
+ local writeable
+ local guest_ok
+ local force_root
+ local write_list
+ local read_list
+ local hide_dot_files
+ local veto_files
+
+ config_get name $1 name
+ config_get path $1 path
+ config_get comment $1 comment
+ config_get users $1 users
+ config_get create_mask $1 create_mask
+ config_get dir_mask $1 dir_mask
+ config_get browseable $1 browseable
+ config_get read_only $1 read_only
+ config_get writeable $1 writeable
+ config_get guest_ok $1 guest_ok
+ config_get_bool force_root $1 force_root 0
+ config_get write_list $1 write_list
+ config_get read_list $1 read_list
+ config_get_bool hide_dot_files $1 hide_dot_files 0
+ config_get veto_files $1 veto_files
+
+ [ -z "$name" -o -z "$path" ] && return
+
+ echo -e "\n[$name]\n\tpath = $path" >> /var/etc/cifs/smb.conf
+ [ -n "$comment" ] && echo -e "\tcomment = $comment" >> /var/etc/cifs/smb.conf
+
+ if [ "$force_root" -eq 1 ]; then
+ echo -e "\tforce user = root" >> /var/etc/cifs/smb.conf
+ echo -e "\tforce group = root" >> /var/etc/cifs/smb.conf
+ else
+ [ -n "$users" ] && echo -e "\tvalid users = $users" >> /var/etc/cifs/smb.conf
+ fi
+
+ [ -n "$create_mask" ] && echo -e "\tcreate mask = $create_mask" >> /var/etc/cifs/smb.conf
+ [ -n "$dir_mask" ] && echo -e "\tdirectory mask = $dir_mask" >> /var/etc/cifs/smb.conf
+
+ [ -n "$browseable" ] && echo -e "\tbrowseable = $browseable" >> /var/etc/cifs/smb.conf
+ [ -n "$read_only" ] && echo -e "\tread only = $read_only" >> /var/etc/cifs/smb.conf
+ [ -n "$writeable" ] && echo -e "\twriteable = $writeable" >> /var/etc/cifs/smb.conf
+ [ -n "$guest_ok" ] && echo -e "\tguest ok = $guest_ok" >> /var/etc/cifs/smb.conf
+
+ [ -n "$write_list" ] && echo -e "\twrite list = $write_list" >> /var/etc/cifs/smb.conf
+ [ -n "$read_list" ] && echo -e "\tread list = $read_list" >> /var/etc/cifs/smb.conf
+
+ [ "$hide_dot_files" -eq 1 ] && echo -e "\thide dot files = yes" >> /var/etc/cifs/smb.conf
+ [ -n "$veto_files" ] && echo -e "\tveto files = $veto_files" >> /var/etc/cifs/smb.conf
+}
+
+init_config()
+{
+ mkdir -p /var/etc/cifs
+
+ config_load cifsd
+ # allow copy&paste from samba UCI configs (we dont have a cifsd wiki yet)
+ config_foreach smb_header globals
+ config_foreach smb_header samba
+ config_foreach smb_add_share share
+ config_foreach smb_add_share sambashare
+}
+
+service_triggers()
+{
+ PROCD_RELOAD_DELAY=2000
+
+ procd_add_reload_trigger "dhcp" "system" "cifsd"
+
+ local i
+ for i in $CIFSD_IFACE; do
+ procd_add_reload_interface_trigger $i
+ done
+}
+
+start_service()
+{
+ init_config
+
+ if [ ! -e /etc/cifs/smb.conf ]; then
+ logger -t 'cifsd' "missing config /etc/cifs/smb.conf, needs to-be created manually!"
+ exit 1
+ fi
+
+ [ -f /tmp/cifsd.lock ] && rm /tmp/cifsd.lock
+
+ # try remove again before start
+ if (lsmod | grep cifsd &>/dev/null); then
+ rmmod cifsd &>/dev/null
+ fi
+ modprobe cifsd 2>/dev/null
+ if ! (lsmod | grep cifsd &>/dev/null); then
+ logger -t 'cifsd' "modprobe of cifsd module failed, cant start cifsd!"
+ exit 1
+ fi
+
+ logger -t 'cifsd' "Starting CIFS/SMB userspace service."
+ procd_open_instance
+ procd_set_param command /usr/sbin/cifsd --n
+ procd_close_instance
+}
--- /dev/null
+;******************************************************************************
+; File to define cifsd configuration parameters which are comparable with
+; samba's ones
+;
+; Supported [global] level parameters list:
+; - server string
+; This controls what string will show up in browse lists next
+; to the machine name
+; - workgroup
+; This controls what workgroup your server will appear to be
+; in when queried by clients
+; - netbios name
+; This sets the NetBIOS name by which a SMB server is known.
+; By default it is the same as the first component of the host's
+; DNS name. If a machine is a browse server or logon server this
+; name (or the first component of the hosts DNS name) will be
+; the name that these services are advertised under.
+; - server min protocol
+; This setting controls the minimum protocol version that the
+; server will allow the client to use.
+; - server max protocol
+; The value of the parameter (a string) is the highest protocol
+; level that will be supported by the server.
+; - server signing
+; This controls whether the client is allowed or required to use
+; SMB1 and SMB2 signing. Possible values are default, auto,
+; mandatory and disabled.
+; - guest account
+; This is a username which will be used for access to services
+; which are specified as guest ok.
+; - max active sessions
+; This option allows the number of simultaneous connections to
+; a service to be limited.
+; - ipc timeout
+; This option specifies the number of seconds server will wait
+; for the userspace to reply to heartbeat frames. If user space
+; is down for more than `ipc timeout` seconds the server will
+; reset itself - close all sessions and all TCP connections.
+; - restrict anonymous
+; The setting of this parameter determines whether user and
+; group list information is returned for an anonymous connection.
+; - map to guest
+; This parameter can take four different values, which tell cifsd
+; what to do with user login requests.(bad user
+; - bind interfaces only
+; This global parameter allows the cifsd admin to limit what
+; interfaces on a machine will serve SMB requests.
+; - interfaces
+; This option allows you to override the default network
+; interfaces list that cifsd will use for browsing. The option
+; takes only list of interface name.
+; - deadtime
+; The value of the parameter (a decimal integer) represents
+; the number of minutes of inactivity before a connection is
+; considered dead, and it is disconnected. The deadtime only
+; takes effect if the number of open files is zero.
+;
+; Supported [share] level parameters list:
+; - comment
+; comment string to associate with the new share
+; - path
+; This parameter specifies a directory to which the user of the
+; service is to be given access.
+; - guest ok
+; If this parameter is yes for a service, then no password is
+; required to connect to the service.
+; - read only
+; If this parameter is yes, then users of a service may not
+; create or modify files in the service's directory.
+; - browseable
+; This controls whether this share is seen in the list of
+; available shares in a net view and in the browse list.
+; - write ok
+; - writeable
+; Inverted synonym for read only.
+; - store dos attributes
+; If this parameter is set cifsd attempts to first read DOS
+; attributes (SYSTEM, HIDDEN, ARCHIVE or READ-ONLY) from a
+; filesystem extended attribute, before mapping DOS attributes
+; to UNIX permission bits (such as occurs with map hidden and
+; map readonly).
+; - oplocks
+; This boolean option tells cifsd whether to issue oplocks
+; (opportunistic locks) to file open requests on this share.
+; - create mask
+; When a file is created, the necessary permissions are calculated
+; according to the mapping from DOS modes to UNIX permissions, and
+; the resulting UNIX mode is then bit-wise 'AND'ed with this
+; parameter.
+; - directory mask
+; This parameter is the octal modes which are used when converting
+; DOS modes to UNIX modes when creating UNIX directories.
+; - force group
+; This specifies a UNIX group name that will be assigned as
+; the default primary group for all users connecting to this
+; service.
+; - force user
+; This specifies a UNIX user name that will be assigned as
+; the default user for all users connecting to this service.
+; - hide dot files
+; This is a boolean parameter that controls whether files starting
+; with a dot appear as hidden files.
+; - hosts allow
+; This parameter is a comma, space, or tab delimited set of hosts
+; which are permitted to access a service
+; - hosts deny
+; The opposite of allow hosts - hosts listed here are NOT
+; permitted access to services unless the specific services have
+; their own lists to override this one. Where the lists conflict,
+; the allow list takes precedence.
+; - valid users
+; This is a list of users that should be allowed to login to this
+; service
+; - invalid users
+; This is a list of users that should not be allowed to login to
+; this service.
+; - read list
+; This is a list of users that are given read-only access to
+; a service.
+; - write list
+; This is a list of users that are given read-write access to
+; a service.
+; - max connections
+; This option allows the number of simultaneous connections to
+; a service to be limited.
+; - veto files
+; This is a list of files and directories that are neither visible
+; nor accessible.
+;
+; Veto any files containing the word Security,
+; any ending in .tmp, and any directory containing the
+; word root.
+; veto files = /*Security*/*.tmp/*root*/
+;
+; Veto the Apple specific files that a NetAtalk server
+; creates.
+; veto files = /.AppleDouble/.bin/.AppleDesktop/Network Trash Folder/
+;
+;
+; Rules to update this file:
+; - Every [share] definition should start on new line
+; - Every parameter should be indented with single tab
+; - There should be single spaces around equal (eg: " = ")
+; - Multiple parameters should be separated with comma
+; eg: "invalid users = usr1,usr2,usr3"
+;
+; Make sure to configure the server after making changes to this file.
+;******************************************************************************
+
+[global]
+ server string = CIFSD on OpenWrt
+ netbios name = CIFSD
+ map to guest = Bad User
+
+[share]
+ comment = content server share
+ path = /mnt
+ guest ok = yes
+ create mask = 0777
+ directory mask = 0777
--- /dev/null
+[global]
+ netbios name = |NAME|
+ server string = |DESCRIPTION|
+ workgroup = |WORKGROUP|
+ interfaces = |INTERFACES|
+ bind interfaces only = yes
+ ipc timeout = 8
+ deadtime = 15
+ map to guest = Bad User
include $(TOPDIR)/rules.mk
PKG_NAME:=clamav
-PKG_VERSION:=0.101.1
+PKG_VERSION:=0.101.2
PKG_RELEASE:=2
-PKG_LICENSE:=GPL-2.0
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://www.clamav.net/downloads/production/
+PKG_HASH:=0a12ebdf6ff7a74c0bde2bdc2b55cae33449e6dd953ec90824a9e01291277634
+
PKG_MAINTAINER:=Marko Ratkaj <marko.ratkaj@sartura.hr> \
Lucian Cristian <lucian.cristian@gmail.com>
+PKG_LICENSE:=GPL-2.0
+PKG_LICENSE_FILES:=COPYING*
PKG_CPE_ID:=cpe:/a:clamav:clamav
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://www.clamav.net/downloads/production/
-PKG_HASH:=fa368fa9b2f57638696150c7d108b06dec284e8d8e3b8e702c784947c01fb806
-
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
define Package/clamav/conffiles
endef
+CONFIGURE_ARGS += \
+ --sysconfdir=/etc/clamav/ \
+ --enable-milter \
+ --disable-bzip2 \
+ --disable-check \
+ --disable-clamdtop \
+ --disable-rpath \
+ --disable-xml \
+ --disable-zlib-vcheck \
+ --with-user=nobody \
+ --with-group=nogroup \
+ --with-libcurl="$(STAGING_DIR)/usr/" \
+ --with-libjson="$(STAGING_DIR)/usr/" \
+ --with-openssl="$(STAGING_DIR)/usr/" \
+ --with-pcre="$(STAGING_DIR)/usr/" \
+ --with-zlib="$(STAGING_DIR)/usr/" \
+ --without-xml \
+ --without-iconv \
+ --without-libncurses-prefix
+
CONFIGURE_VARS += \
- INCLUDES="" \
- CXXFLAGS="$$$$CXXFLAGS -fno-rtti" \
- $(if $(CONFIG_USE_MUSL),LIBS="-lpthread -lfts",LIBS="-lpthread") \
-
-define Build/Configure
- $(call Build/Configure/Default, \
- --sysconfdir=/etc/clamav/ \
- --prefix=/usr/ \
- --exec-prefix=/usr/ \
- --enable-milter \
- --with-xml=no \
- --disable-bzip2 \
- --with-user nobody \
- --with-group nogroup \
- --with-pcre="$(STAGING_DIR)/usr/" \
- --with-openssl="$(STAGING_DIR)/usr/" \
- --with-zlib="$(STAGING_DIR)/usr/" \
- --disable-zlib-vcheck \
- --disable-clamdtop \
- )
-endef
+ ax_cv_uname_syscall=yes \
+ ac_cv_c_mmap_private=yes \
+ have_cv_gai=yes \
+ ac_cv_sys_file_offset_bits=no
-define Build/Compile
- $(MAKE) -C $(PKG_BUILD_DIR) \
- DESTDIR="$(PKG_INSTALL_DIR)" \
- all install
-endef
+CONFIGURE_VARS += $(if $(CONFIG_IPV6),have_cv_ipv6=yes)
+
+TARGET_CXXFLAGS += -ffunction-sections -fdata-sections -fno-rtti -flto
+TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed $(if $(CONFIG_USE_MUSL),-lfts)
define Package/clamav/install
$(INSTALL_DIR) $(1)/usr/sbin
include $(TOPDIR)/rules.mk
PKG_NAME:=conserver
-PKG_VERSION:=8.2.2
-PKG_RELEASE:=2
+PKG_VERSION:=8.2.4
+PKG_RELEASE:=1
PKG_MAINTAINER:=Bjørn Mork <bjorn@mork.no>
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/conserver/conserver.git
-PKG_SOURCE_VERSION:=v$(PKG_VERSION)
+PKG_SOURCE_URL:=https://codeload.github.com/conserver/conserver/tar.gz/v$(PKG_VERSION)?
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_MIRROR_HASH:=27d92e6c04e97cd0884774eace0b44f30087695927bcce8addc11dba9c090d7c
+PKG_HASH:=8d8b263d9531ebb827257bd67baf9200cac4fb7ffbe033122686e39ca42cddd6
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
CONFIGURE_ARGS += \
--with-openssl \
+ $(if $(CONFIG_IPV6),--with-ipv6) \
--sysconfdir=/etc/conserver \
--with-port=3109 \
--with-logfile=/var/log/conserver/server.log
+define Build/Prepare
+ $(call Build/Prepare/Default)
+ $(CP) ./files/config.sub $(PKG_BUILD_DIR)/
+ $(CP) ./files/config.guess $(PKG_BUILD_DIR)/
+endef
+
define Package/conserver/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/conserver $(1)/usr/sbin/
--- /dev/null
+#! /bin/sh
+# Attempt to guess a canonical system name.
+# Copyright 1992-2019 Free Software Foundation, Inc.
+
+timestamp='2019-03-04'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, see <https://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that
+# program. This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
+#
+# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
+#
+# You can get the latest version of this script from:
+# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
+#
+# Please send patches to <config-patches@gnu.org>.
+
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Options:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright 1992-2019 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help" >&2
+ exit 1 ;;
+ * )
+ break ;;
+ esac
+done
+
+if test $# != 0; then
+ echo "$me: too many arguments$help" >&2
+ exit 1
+fi
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+tmp=
+# shellcheck disable=SC2172
+trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15
+
+set_cc_for_build() {
+ : "${TMPDIR=/tmp}"
+ # shellcheck disable=SC2039
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; }
+ dummy=$tmp/dummy
+ case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in
+ ,,) echo "int x;" > "$dummy.c"
+ for driver in cc gcc c89 c99 ; do
+ if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
+ CC_FOR_BUILD="$driver"
+ break
+ fi
+ done
+ if test x"$CC_FOR_BUILD" = x ; then
+ CC_FOR_BUILD=no_compiler_found
+ fi
+ ;;
+ ,,*) CC_FOR_BUILD=$CC ;;
+ ,*,*) CC_FOR_BUILD=$HOST_CC ;;
+ esac
+}
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+if test -f /.attbin/uname ; then
+ PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+case "$UNAME_SYSTEM" in
+Linux|GNU|GNU/*)
+ # If the system lacks a compiler, then just pick glibc.
+ # We could probably try harder.
+ LIBC=gnu
+
+ set_cc_for_build
+ cat <<-EOF > "$dummy.c"
+ #include <features.h>
+ #if defined(__UCLIBC__)
+ LIBC=uclibc
+ #elif defined(__dietlibc__)
+ LIBC=dietlibc
+ #else
+ LIBC=gnu
+ #endif
+ EOF
+ eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`"
+
+ # If ldd exists, use it to detect musl libc.
+ if command -v ldd >/dev/null && \
+ ldd --version 2>&1 | grep -q ^musl
+ then
+ LIBC=musl
+ fi
+ ;;
+esac
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
+ *:NetBSD:*:*)
+ # NetBSD (nbsd) targets should (where applicable) match one or
+ # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
+ # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
+ # switched to ELF, *-*-netbsd* would select the old
+ # object file format. This provides both forward
+ # compatibility and a consistent mechanism for selecting the
+ # object file format.
+ #
+ # Note: NetBSD doesn't particularly care about the vendor
+ # portion of the name. We always set it to "unknown".
+ sysctl="sysctl -n hw.machine_arch"
+ UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
+ "/sbin/$sysctl" 2>/dev/null || \
+ "/usr/sbin/$sysctl" 2>/dev/null || \
+ echo unknown)`
+ case "$UNAME_MACHINE_ARCH" in
+ armeb) machine=armeb-unknown ;;
+ arm*) machine=arm-unknown ;;
+ sh3el) machine=shl-unknown ;;
+ sh3eb) machine=sh-unknown ;;
+ sh5el) machine=sh5le-unknown ;;
+ earmv*)
+ arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
+ endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'`
+ machine="${arch}${endian}"-unknown
+ ;;
+ *) machine="$UNAME_MACHINE_ARCH"-unknown ;;
+ esac
+ # The Operating System including object format, if it has switched
+ # to ELF recently (or will in the future) and ABI.
+ case "$UNAME_MACHINE_ARCH" in
+ earm*)
+ os=netbsdelf
+ ;;
+ arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+ set_cc_for_build
+ if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ELF__
+ then
+ # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+ # Return netbsd for either. FIX?
+ os=netbsd
+ else
+ os=netbsdelf
+ fi
+ ;;
+ *)
+ os=netbsd
+ ;;
+ esac
+ # Determine ABI tags.
+ case "$UNAME_MACHINE_ARCH" in
+ earm*)
+ expr='s/^earmv[0-9]/-eabi/;s/eb$//'
+ abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"`
+ ;;
+ esac
+ # The OS release
+ # Debian GNU/NetBSD machines have a different userland, and
+ # thus, need a distinct triplet. However, they do not need
+ # kernel version information, so it can be replaced with a
+ # suitable tag, in the style of linux-gnu.
+ case "$UNAME_VERSION" in
+ Debian*)
+ release='-gnu'
+ ;;
+ *)
+ release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2`
+ ;;
+ esac
+ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+ # contains redundant information, the shorter form:
+ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+ echo "$machine-${os}${release}${abi-}"
+ exit ;;
+ *:Bitrig:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
+ echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE"
+ exit ;;
+ *:OpenBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+ echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE"
+ exit ;;
+ *:LibertyBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
+ echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE"
+ exit ;;
+ *:MidnightBSD:*:*)
+ echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE"
+ exit ;;
+ *:ekkoBSD:*:*)
+ echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE"
+ exit ;;
+ *:SolidBSD:*:*)
+ echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE"
+ exit ;;
+ macppc:MirBSD:*:*)
+ echo powerpc-unknown-mirbsd"$UNAME_RELEASE"
+ exit ;;
+ *:MirBSD:*:*)
+ echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE"
+ exit ;;
+ *:Sortix:*:*)
+ echo "$UNAME_MACHINE"-unknown-sortix
+ exit ;;
+ *:Redox:*:*)
+ echo "$UNAME_MACHINE"-unknown-redox
+ exit ;;
+ mips:OSF1:*.*)
+ echo mips-dec-osf1
+ exit ;;
+ alpha:OSF1:*:*)
+ case $UNAME_RELEASE in
+ *4.0)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+ ;;
+ *5.*)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+ ;;
+ esac
+ # According to Compaq, /usr/sbin/psrinfo has been available on
+ # OSF/1 and Tru64 systems produced since 1995. I hope that
+ # covers most systems running today. This code pipes the CPU
+ # types through head -n 1, so we only detect the type of CPU 0.
+ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+ case "$ALPHA_CPU_TYPE" in
+ "EV4 (21064)")
+ UNAME_MACHINE=alpha ;;
+ "EV4.5 (21064)")
+ UNAME_MACHINE=alpha ;;
+ "LCA4 (21066/21068)")
+ UNAME_MACHINE=alpha ;;
+ "EV5 (21164)")
+ UNAME_MACHINE=alphaev5 ;;
+ "EV5.6 (21164A)")
+ UNAME_MACHINE=alphaev56 ;;
+ "EV5.6 (21164PC)")
+ UNAME_MACHINE=alphapca56 ;;
+ "EV5.7 (21164PC)")
+ UNAME_MACHINE=alphapca57 ;;
+ "EV6 (21264)")
+ UNAME_MACHINE=alphaev6 ;;
+ "EV6.7 (21264A)")
+ UNAME_MACHINE=alphaev67 ;;
+ "EV6.8CB (21264C)")
+ UNAME_MACHINE=alphaev68 ;;
+ "EV6.8AL (21264B)")
+ UNAME_MACHINE=alphaev68 ;;
+ "EV6.8CX (21264D)")
+ UNAME_MACHINE=alphaev68 ;;
+ "EV6.9A (21264/EV69A)")
+ UNAME_MACHINE=alphaev69 ;;
+ "EV7 (21364)")
+ UNAME_MACHINE=alphaev7 ;;
+ "EV7.9 (21364A)")
+ UNAME_MACHINE=alphaev79 ;;
+ esac
+ # A Pn.n version is a patched version.
+ # A Vn.n version is a released version.
+ # A Tn.n version is a released field test version.
+ # A Xn.n version is an unreleased experimental baselevel.
+ # 1.2 uses "1.2" for uname -r.
+ echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`"
+ # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
+ exitcode=$?
+ trap '' 0
+ exit $exitcode ;;
+ Amiga*:UNIX_System_V:4.0:*)
+ echo m68k-unknown-sysv4
+ exit ;;
+ *:[Aa]miga[Oo][Ss]:*:*)
+ echo "$UNAME_MACHINE"-unknown-amigaos
+ exit ;;
+ *:[Mm]orph[Oo][Ss]:*:*)
+ echo "$UNAME_MACHINE"-unknown-morphos
+ exit ;;
+ *:OS/390:*:*)
+ echo i370-ibm-openedition
+ exit ;;
+ *:z/VM:*:*)
+ echo s390-ibm-zvmoe
+ exit ;;
+ *:OS400:*:*)
+ echo powerpc-ibm-os400
+ exit ;;
+ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+ echo arm-acorn-riscix"$UNAME_RELEASE"
+ exit ;;
+ arm*:riscos:*:*|arm*:RISCOS:*:*)
+ echo arm-unknown-riscos
+ exit ;;
+ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+ echo hppa1.1-hitachi-hiuxmpp
+ exit ;;
+ Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+ # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+ if test "`(/bin/universe) 2>/dev/null`" = att ; then
+ echo pyramid-pyramid-sysv3
+ else
+ echo pyramid-pyramid-bsd
+ fi
+ exit ;;
+ NILE*:*:*:dcosx)
+ echo pyramid-pyramid-svr4
+ exit ;;
+ DRS?6000:unix:4.0:6*)
+ echo sparc-icl-nx6
+ exit ;;
+ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+ case `/usr/bin/uname -p` in
+ sparc) echo sparc-icl-nx7; exit ;;
+ esac ;;
+ s390x:SunOS:*:*)
+ echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
+ exit ;;
+ sun4H:SunOS:5.*:*)
+ echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
+ exit ;;
+ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+ echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
+ exit ;;
+ i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+ echo i386-pc-auroraux"$UNAME_RELEASE"
+ exit ;;
+ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+ set_cc_for_build
+ SUN_ARCH=i386
+ # If there is a compiler, see if it is configured for 64-bit objects.
+ # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+ # This test works for both compilers.
+ if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
+ if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ SUN_ARCH=x86_64
+ fi
+ fi
+ echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
+ exit ;;
+ sun4*:SunOS:6*:*)
+ # According to config.sub, this is the proper way to canonicalize
+ # SunOS6. Hard to guess exactly what SunOS6 will be like, but
+ # it's likely to be more like Solaris than SunOS4.
+ echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
+ exit ;;
+ sun4*:SunOS:*:*)
+ case "`/usr/bin/arch -k`" in
+ Series*|S4*)
+ UNAME_RELEASE=`uname -v`
+ ;;
+ esac
+ # Japanese Language versions have a version number like `4.1.3-JL'.
+ echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`"
+ exit ;;
+ sun3*:SunOS:*:*)
+ echo m68k-sun-sunos"$UNAME_RELEASE"
+ exit ;;
+ sun*:*:4.2BSD:*)
+ UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+ test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3
+ case "`/bin/arch`" in
+ sun3)
+ echo m68k-sun-sunos"$UNAME_RELEASE"
+ ;;
+ sun4)
+ echo sparc-sun-sunos"$UNAME_RELEASE"
+ ;;
+ esac
+ exit ;;
+ aushp:SunOS:*:*)
+ echo sparc-auspex-sunos"$UNAME_RELEASE"
+ exit ;;
+ # The situation for MiNT is a little confusing. The machine name
+ # can be virtually everything (everything which is not
+ # "atarist" or "atariste" at least should have a processor
+ # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
+ # to the lowercase version "mint" (or "freemint"). Finally
+ # the system name "TOS" denotes a system which is actually not
+ # MiNT. But MiNT is downward compatible to TOS, so this should
+ # be no problem.
+ atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint"$UNAME_RELEASE"
+ exit ;;
+ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint"$UNAME_RELEASE"
+ exit ;;
+ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+ echo m68k-atari-mint"$UNAME_RELEASE"
+ exit ;;
+ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+ echo m68k-milan-mint"$UNAME_RELEASE"
+ exit ;;
+ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+ echo m68k-hades-mint"$UNAME_RELEASE"
+ exit ;;
+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+ echo m68k-unknown-mint"$UNAME_RELEASE"
+ exit ;;
+ m68k:machten:*:*)
+ echo m68k-apple-machten"$UNAME_RELEASE"
+ exit ;;
+ powerpc:machten:*:*)
+ echo powerpc-apple-machten"$UNAME_RELEASE"
+ exit ;;
+ RISC*:Mach:*:*)
+ echo mips-dec-mach_bsd4.3
+ exit ;;
+ RISC*:ULTRIX:*:*)
+ echo mips-dec-ultrix"$UNAME_RELEASE"
+ exit ;;
+ VAX*:ULTRIX*:*:*)
+ echo vax-dec-ultrix"$UNAME_RELEASE"
+ exit ;;
+ 2020:CLIX:*:* | 2430:CLIX:*:*)
+ echo clipper-intergraph-clix"$UNAME_RELEASE"
+ exit ;;
+ mips:*:*:UMIPS | mips:*:*:RISCos)
+ set_cc_for_build
+ sed 's/^ //' << EOF > "$dummy.c"
+#ifdef __cplusplus
+#include <stdio.h> /* for printf() prototype */
+ int main (int argc, char *argv[]) {
+#else
+ int main (argc, argv) int argc; char *argv[]; {
+#endif
+ #if defined (host_mips) && defined (MIPSEB)
+ #if defined (SYSTYPE_SYSV)
+ printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_SVR4)
+ printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+ printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0);
+ #endif
+ #endif
+ exit (-1);
+ }
+EOF
+ $CC_FOR_BUILD -o "$dummy" "$dummy.c" &&
+ dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+ SYSTEM_NAME=`"$dummy" "$dummyarg"` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo mips-mips-riscos"$UNAME_RELEASE"
+ exit ;;
+ Motorola:PowerMAX_OS:*:*)
+ echo powerpc-motorola-powermax
+ exit ;;
+ Motorola:*:4.3:PL8-*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:Power_UNIX:*:*)
+ echo powerpc-harris-powerunix
+ exit ;;
+ m88k:CX/UX:7*:*)
+ echo m88k-harris-cxux7
+ exit ;;
+ m88k:*:4*:R4*)
+ echo m88k-motorola-sysv4
+ exit ;;
+ m88k:*:3*:R3*)
+ echo m88k-motorola-sysv3
+ exit ;;
+ AViiON:dgux:*:*)
+ # DG/UX returns AViiON for all architectures
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ]
+ then
+ if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \
+ [ "$TARGET_BINARY_INTERFACE"x = x ]
+ then
+ echo m88k-dg-dgux"$UNAME_RELEASE"
+ else
+ echo m88k-dg-dguxbcs"$UNAME_RELEASE"
+ fi
+ else
+ echo i586-dg-dgux"$UNAME_RELEASE"
+ fi
+ exit ;;
+ M88*:DolphinOS:*:*) # DolphinOS (SVR3)
+ echo m88k-dolphin-sysv3
+ exit ;;
+ M88*:*:R3*:*)
+ # Delta 88k system running SVR3
+ echo m88k-motorola-sysv3
+ exit ;;
+ XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+ echo m88k-tektronix-sysv3
+ exit ;;
+ Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+ echo m68k-tektronix-bsd
+ exit ;;
+ *:IRIX*:*:*)
+ echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`"
+ exit ;;
+ ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
+ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+ i*86:AIX:*:*)
+ echo i386-ibm-aix
+ exit ;;
+ ia64:AIX:*:*)
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
+ fi
+ echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV"
+ exit ;;
+ *:AIX:2:3)
+ if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+ set_cc_for_build
+ sed 's/^ //' << EOF > "$dummy.c"
+ #include <sys/systemcfg.h>
+
+ main()
+ {
+ if (!__power_pc())
+ exit(1);
+ puts("powerpc-ibm-aix3.2.5");
+ exit(0);
+ }
+EOF
+ if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"`
+ then
+ echo "$SYSTEM_NAME"
+ else
+ echo rs6000-ibm-aix3.2.5
+ fi
+ elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+ echo rs6000-ibm-aix3.2.4
+ else
+ echo rs6000-ibm-aix3.2
+ fi
+ exit ;;
+ *:AIX:*:[4567])
+ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+ if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then
+ IBM_ARCH=rs6000
+ else
+ IBM_ARCH=powerpc
+ fi
+ if [ -x /usr/bin/lslpp ] ; then
+ IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
+ awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
+ else
+ IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
+ fi
+ echo "$IBM_ARCH"-ibm-aix"$IBM_REV"
+ exit ;;
+ *:AIX:*:*)
+ echo rs6000-ibm-aix
+ exit ;;
+ ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*)
+ echo romp-ibm-bsd4.4
+ exit ;;
+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
+ echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to
+ exit ;; # report: romp-ibm BSD 4.3
+ *:BOSX:*:*)
+ echo rs6000-bull-bosx
+ exit ;;
+ DPX/2?00:B.O.S.:*:*)
+ echo m68k-bull-sysv3
+ exit ;;
+ 9000/[34]??:4.3bsd:1.*:*)
+ echo m68k-hp-bsd
+ exit ;;
+ hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+ echo m68k-hp-bsd4.4
+ exit ;;
+ 9000/[34678]??:HP-UX:*:*)
+ HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
+ case "$UNAME_MACHINE" in
+ 9000/31?) HP_ARCH=m68000 ;;
+ 9000/[34]??) HP_ARCH=m68k ;;
+ 9000/[678][0-9][0-9])
+ if [ -x /usr/bin/getconf ]; then
+ sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+ case "$sc_cpu_version" in
+ 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
+ 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
+ 532) # CPU_PA_RISC2_0
+ case "$sc_kernel_bits" in
+ 32) HP_ARCH=hppa2.0n ;;
+ 64) HP_ARCH=hppa2.0w ;;
+ '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20
+ esac ;;
+ esac
+ fi
+ if [ "$HP_ARCH" = "" ]; then
+ set_cc_for_build
+ sed 's/^ //' << EOF > "$dummy.c"
+
+ #define _HPUX_SOURCE
+ #include <stdlib.h>
+ #include <unistd.h>
+
+ int main ()
+ {
+ #if defined(_SC_KERNEL_BITS)
+ long bits = sysconf(_SC_KERNEL_BITS);
+ #endif
+ long cpu = sysconf (_SC_CPU_VERSION);
+
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+ case CPU_PA_RISC2_0:
+ #if defined(_SC_KERNEL_BITS)
+ switch (bits)
+ {
+ case 64: puts ("hppa2.0w"); break;
+ case 32: puts ("hppa2.0n"); break;
+ default: puts ("hppa2.0"); break;
+ } break;
+ #else /* !defined(_SC_KERNEL_BITS) */
+ puts ("hppa2.0"); break;
+ #endif
+ default: puts ("hppa1.0"); break;
+ }
+ exit (0);
+ }
+EOF
+ (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"`
+ test -z "$HP_ARCH" && HP_ARCH=hppa
+ fi ;;
+ esac
+ if [ "$HP_ARCH" = hppa2.0w ]
+ then
+ set_cc_for_build
+
+ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
+ # generating 64-bit code. GNU and HP use different nomenclature:
+ #
+ # $ CC_FOR_BUILD=cc ./config.guess
+ # => hppa2.0w-hp-hpux11.23
+ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+ # => hppa64-hp-hpux11.23
+
+ if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
+ grep -q __LP64__
+ then
+ HP_ARCH=hppa2.0w
+ else
+ HP_ARCH=hppa64
+ fi
+ fi
+ echo "$HP_ARCH"-hp-hpux"$HPUX_REV"
+ exit ;;
+ ia64:HP-UX:*:*)
+ HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
+ echo ia64-hp-hpux"$HPUX_REV"
+ exit ;;
+ 3050*:HI-UX:*:*)
+ set_cc_for_build
+ sed 's/^ //' << EOF > "$dummy.c"
+ #include <unistd.h>
+ int
+ main ()
+ {
+ long cpu = sysconf (_SC_CPU_VERSION);
+ /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+ true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
+ results, however. */
+ if (CPU_IS_PA_RISC (cpu))
+ {
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+ default: puts ("hppa-hitachi-hiuxwe2"); break;
+ }
+ }
+ else if (CPU_IS_HP_MC68K (cpu))
+ puts ("m68k-hitachi-hiuxwe2");
+ else puts ("unknown-hitachi-hiuxwe2");
+ exit (0);
+ }
+EOF
+ $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo unknown-hitachi-hiuxwe2
+ exit ;;
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*)
+ echo hppa1.1-hp-bsd
+ exit ;;
+ 9000/8??:4.3bsd:*:*)
+ echo hppa1.0-hp-bsd
+ exit ;;
+ *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+ echo hppa1.0-hp-mpeix
+ exit ;;
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*)
+ echo hppa1.1-hp-osf
+ exit ;;
+ hp8??:OSF1:*:*)
+ echo hppa1.0-hp-osf
+ exit ;;
+ i*86:OSF1:*:*)
+ if [ -x /usr/sbin/sysversion ] ; then
+ echo "$UNAME_MACHINE"-unknown-osf1mk
+ else
+ echo "$UNAME_MACHINE"-unknown-osf1
+ fi
+ exit ;;
+ parisc*:Lites*:*:*)
+ echo hppa1.1-hp-lites
+ exit ;;
+ C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+ echo c1-convex-bsd
+ exit ;;
+ C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+ echo c34-convex-bsd
+ exit ;;
+ C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+ echo c38-convex-bsd
+ exit ;;
+ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+ echo c4-convex-bsd
+ exit ;;
+ CRAY*Y-MP:*:*:*)
+ echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*[A-Z]90:*:*:*)
+ echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \
+ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+ -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*TS:*:*:*)
+ echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*T3E:*:*:*)
+ echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*SV1:*:*:*)
+ echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ *:UNICOS/mp:*:*)
+ echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+ FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
+ FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
+ FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'`
+ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ 5000:UNIX_System_V:4.*:*)
+ FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
+ FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
+ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+ echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE"
+ exit ;;
+ sparc*:BSD/OS:*:*)
+ echo sparc-unknown-bsdi"$UNAME_RELEASE"
+ exit ;;
+ *:BSD/OS:*:*)
+ echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE"
+ exit ;;
+ arm:FreeBSD:*:*)
+ UNAME_PROCESSOR=`uname -p`
+ set_cc_for_build
+ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_PCS_VFP
+ then
+ echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabi
+ else
+ echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabihf
+ fi
+ exit ;;
+ *:FreeBSD:*:*)
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ case "$UNAME_PROCESSOR" in
+ amd64)
+ UNAME_PROCESSOR=x86_64 ;;
+ i386)
+ UNAME_PROCESSOR=i586 ;;
+ esac
+ echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
+ exit ;;
+ i*:CYGWIN*:*)
+ echo "$UNAME_MACHINE"-pc-cygwin
+ exit ;;
+ *:MINGW64*:*)
+ echo "$UNAME_MACHINE"-pc-mingw64
+ exit ;;
+ *:MINGW*:*)
+ echo "$UNAME_MACHINE"-pc-mingw32
+ exit ;;
+ *:MSYS*:*)
+ echo "$UNAME_MACHINE"-pc-msys
+ exit ;;
+ i*:PW*:*)
+ echo "$UNAME_MACHINE"-pc-pw32
+ exit ;;
+ *:Interix*:*)
+ case "$UNAME_MACHINE" in
+ x86)
+ echo i586-pc-interix"$UNAME_RELEASE"
+ exit ;;
+ authenticamd | genuineintel | EM64T)
+ echo x86_64-unknown-interix"$UNAME_RELEASE"
+ exit ;;
+ IA64)
+ echo ia64-unknown-interix"$UNAME_RELEASE"
+ exit ;;
+ esac ;;
+ i*:UWIN*:*)
+ echo "$UNAME_MACHINE"-pc-uwin
+ exit ;;
+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+ echo x86_64-pc-cygwin
+ exit ;;
+ prep*:SunOS:5.*:*)
+ echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
+ exit ;;
+ *:GNU:*:*)
+ # the GNU system
+ echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`"
+ exit ;;
+ *:GNU/*:*:*)
+ # other systems with GNU libc and userland
+ echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC"
+ exit ;;
+ *:Minix:*:*)
+ echo "$UNAME_MACHINE"-unknown-minix
+ exit ;;
+ aarch64:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ aarch64_be:Linux:*:*)
+ UNAME_MACHINE=aarch64_be
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ alpha:Linux:*:*)
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+ EV5) UNAME_MACHINE=alphaev5 ;;
+ EV56) UNAME_MACHINE=alphaev56 ;;
+ PCA56) UNAME_MACHINE=alphapca56 ;;
+ PCA57) UNAME_MACHINE=alphapca56 ;;
+ EV6) UNAME_MACHINE=alphaev6 ;;
+ EV67) UNAME_MACHINE=alphaev67 ;;
+ EV68*) UNAME_MACHINE=alphaev68 ;;
+ esac
+ objdump --private-headers /bin/sh | grep -q ld.so.1
+ if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ arc:Linux:*:* | arceb:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ arm*:Linux:*:*)
+ set_cc_for_build
+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_EABI__
+ then
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ else
+ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_PCS_VFP
+ then
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi
+ else
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf
+ fi
+ fi
+ exit ;;
+ avr32*:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ cris:Linux:*:*)
+ echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
+ exit ;;
+ crisv32:Linux:*:*)
+ echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
+ exit ;;
+ e2k:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ frv:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ hexagon:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ i*86:Linux:*:*)
+ echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
+ exit ;;
+ ia64:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ k1om:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ m32r*:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ m68*:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ mips:Linux:*:* | mips64:Linux:*:*)
+ set_cc_for_build
+ IS_GLIBC=0
+ test x"${LIBC}" = xgnu && IS_GLIBC=1
+ sed 's/^ //' << EOF > "$dummy.c"
+ #undef CPU
+ #undef mips
+ #undef mipsel
+ #undef mips64
+ #undef mips64el
+ #if ${IS_GLIBC} && defined(_ABI64)
+ LIBCABI=gnuabi64
+ #else
+ #if ${IS_GLIBC} && defined(_ABIN32)
+ LIBCABI=gnuabin32
+ #else
+ LIBCABI=${LIBC}
+ #endif
+ #endif
+
+ #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
+ CPU=mipsisa64r6
+ #else
+ #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
+ CPU=mipsisa32r6
+ #else
+ #if defined(__mips64)
+ CPU=mips64
+ #else
+ CPU=mips
+ #endif
+ #endif
+ #endif
+
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ MIPS_ENDIAN=el
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ MIPS_ENDIAN=
+ #else
+ MIPS_ENDIAN=
+ #endif
+ #endif
+EOF
+ eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'`"
+ test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; }
+ ;;
+ mips64el:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ openrisc*:Linux:*:*)
+ echo or1k-unknown-linux-"$LIBC"
+ exit ;;
+ or32:Linux:*:* | or1k*:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ padre:Linux:*:*)
+ echo sparc-unknown-linux-"$LIBC"
+ exit ;;
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+ echo hppa64-unknown-linux-"$LIBC"
+ exit ;;
+ parisc:Linux:*:* | hppa:Linux:*:*)
+ # Look for CPU level
+ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+ PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;;
+ PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;;
+ *) echo hppa-unknown-linux-"$LIBC" ;;
+ esac
+ exit ;;
+ ppc64:Linux:*:*)
+ echo powerpc64-unknown-linux-"$LIBC"
+ exit ;;
+ ppc:Linux:*:*)
+ echo powerpc-unknown-linux-"$LIBC"
+ exit ;;
+ ppc64le:Linux:*:*)
+ echo powerpc64le-unknown-linux-"$LIBC"
+ exit ;;
+ ppcle:Linux:*:*)
+ echo powerpcle-unknown-linux-"$LIBC"
+ exit ;;
+ riscv32:Linux:*:* | riscv64:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ s390:Linux:*:* | s390x:Linux:*:*)
+ echo "$UNAME_MACHINE"-ibm-linux-"$LIBC"
+ exit ;;
+ sh64*:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ sh*:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ sparc:Linux:*:* | sparc64:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ tile*:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ vax:Linux:*:*)
+ echo "$UNAME_MACHINE"-dec-linux-"$LIBC"
+ exit ;;
+ x86_64:Linux:*:*)
+ echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
+ exit ;;
+ xtensa*:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ i*86:DYNIX/ptx:4*:*)
+ # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+ # earlier versions are messed up and put the nodename in both
+ # sysname and nodename.
+ echo i386-sequent-sysv4
+ exit ;;
+ i*86:UNIX_SV:4.2MP:2.*)
+ # Unixware is an offshoot of SVR4, but it has its own version
+ # number series starting with 2...
+ # I am not positive that other SVR4 systems won't match this,
+ # I just have to hope. -- rms.
+ # Use sysv4.2uw... so that sysv4* matches it.
+ echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION"
+ exit ;;
+ i*86:OS/2:*:*)
+ # If we were able to find `uname', then EMX Unix compatibility
+ # is probably installed.
+ echo "$UNAME_MACHINE"-pc-os2-emx
+ exit ;;
+ i*86:XTS-300:*:STOP)
+ echo "$UNAME_MACHINE"-unknown-stop
+ exit ;;
+ i*86:atheos:*:*)
+ echo "$UNAME_MACHINE"-unknown-atheos
+ exit ;;
+ i*86:syllable:*:*)
+ echo "$UNAME_MACHINE"-pc-syllable
+ exit ;;
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
+ echo i386-unknown-lynxos"$UNAME_RELEASE"
+ exit ;;
+ i*86:*DOS:*:*)
+ echo "$UNAME_MACHINE"-pc-msdosdjgpp
+ exit ;;
+ i*86:*:4.*:*)
+ UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'`
+ if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+ echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL"
+ else
+ echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL"
+ fi
+ exit ;;
+ i*86:*:5:[678]*)
+ # UnixWare 7.x, OpenUNIX and OpenServer 6.
+ case `/bin/uname -X | grep "^Machine"` in
+ *486*) UNAME_MACHINE=i486 ;;
+ *Pentium) UNAME_MACHINE=i586 ;;
+ *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+ esac
+ echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}"
+ exit ;;
+ i*86:*:3.2:*)
+ if test -f /usr/options/cb.name; then
+ UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+ echo "$UNAME_MACHINE"-pc-isc"$UNAME_REL"
+ elif /bin/uname -X 2>/dev/null >/dev/null ; then
+ UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+ (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+ (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+ && UNAME_MACHINE=i586
+ (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+ && UNAME_MACHINE=i686
+ (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+ && UNAME_MACHINE=i686
+ echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL"
+ else
+ echo "$UNAME_MACHINE"-pc-sysv32
+ fi
+ exit ;;
+ pc:*:*:*)
+ # Left here for compatibility:
+ # uname -m prints for DJGPP always 'pc', but it prints nothing about
+ # the processor, so we play safe by assuming i586.
+ # Note: whatever this is, it MUST be the same as what config.sub
+ # prints for the "djgpp" host, or else GDB configure will decide that
+ # this is a cross-build.
+ echo i586-pc-msdosdjgpp
+ exit ;;
+ Intel:Mach:3*:*)
+ echo i386-pc-mach3
+ exit ;;
+ paragon:*:*:*)
+ echo i860-intel-osf1
+ exit ;;
+ i860:*:4.*:*) # i860-SVR4
+ if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+ echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4
+ else # Add other i860-SVR4 vendors below as they are discovered.
+ echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4
+ fi
+ exit ;;
+ mini*:CTIX:SYS*5:*)
+ # "miniframe"
+ echo m68010-convergent-sysv
+ exit ;;
+ mc68k:UNIX:SYSTEM5:3.51m)
+ echo m68k-convergent-sysv
+ exit ;;
+ M680?0:D-NIX:5.3:*)
+ echo m68k-diab-dnix
+ exit ;;
+ M68*:*:R3V[5678]*:*)
+ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+ OS_REL=''
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
+ 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4; exit; } ;;
+ NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+ OS_REL='.3'
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
+ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
+ m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+ echo m68k-unknown-lynxos"$UNAME_RELEASE"
+ exit ;;
+ mc68030:UNIX_System_V:4.*:*)
+ echo m68k-atari-sysv4
+ exit ;;
+ TSUNAMI:LynxOS:2.*:*)
+ echo sparc-unknown-lynxos"$UNAME_RELEASE"
+ exit ;;
+ rs6000:LynxOS:2.*:*)
+ echo rs6000-unknown-lynxos"$UNAME_RELEASE"
+ exit ;;
+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
+ echo powerpc-unknown-lynxos"$UNAME_RELEASE"
+ exit ;;
+ SM[BE]S:UNIX_SV:*:*)
+ echo mips-dde-sysv"$UNAME_RELEASE"
+ exit ;;
+ RM*:ReliantUNIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ RM*:SINIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ *:SINIX-*:*:*)
+ if uname -p 2>/dev/null >/dev/null ; then
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ echo "$UNAME_MACHINE"-sni-sysv4
+ else
+ echo ns32k-sni-sysv
+ fi
+ exit ;;
+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says <Richard.M.Bartel@ccMail.Census.GOV>
+ echo i586-unisys-sysv4
+ exit ;;
+ *:UNIX_System_V:4*:FTX*)
+ # From Gerald Hewes <hewes@openmarket.com>.
+ # How about differentiating between stratus architectures? -djm
+ echo hppa1.1-stratus-sysv4
+ exit ;;
+ *:*:*:FTX*)
+ # From seanf@swdc.stratus.com.
+ echo i860-stratus-sysv4
+ exit ;;
+ i*86:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo "$UNAME_MACHINE"-stratus-vos
+ exit ;;
+ *:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo hppa1.1-stratus-vos
+ exit ;;
+ mc68*:A/UX:*:*)
+ echo m68k-apple-aux"$UNAME_RELEASE"
+ exit ;;
+ news*:NEWS-OS:6*:*)
+ echo mips-sony-newsos6
+ exit ;;
+ R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+ if [ -d /usr/nec ]; then
+ echo mips-nec-sysv"$UNAME_RELEASE"
+ else
+ echo mips-unknown-sysv"$UNAME_RELEASE"
+ fi
+ exit ;;
+ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
+ echo powerpc-be-beos
+ exit ;;
+ BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
+ echo powerpc-apple-beos
+ exit ;;
+ BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
+ echo i586-pc-beos
+ exit ;;
+ BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
+ echo i586-pc-haiku
+ exit ;;
+ x86_64:Haiku:*:*)
+ echo x86_64-unknown-haiku
+ exit ;;
+ SX-4:SUPER-UX:*:*)
+ echo sx4-nec-superux"$UNAME_RELEASE"
+ exit ;;
+ SX-5:SUPER-UX:*:*)
+ echo sx5-nec-superux"$UNAME_RELEASE"
+ exit ;;
+ SX-6:SUPER-UX:*:*)
+ echo sx6-nec-superux"$UNAME_RELEASE"
+ exit ;;
+ SX-7:SUPER-UX:*:*)
+ echo sx7-nec-superux"$UNAME_RELEASE"
+ exit ;;
+ SX-8:SUPER-UX:*:*)
+ echo sx8-nec-superux"$UNAME_RELEASE"
+ exit ;;
+ SX-8R:SUPER-UX:*:*)
+ echo sx8r-nec-superux"$UNAME_RELEASE"
+ exit ;;
+ SX-ACE:SUPER-UX:*:*)
+ echo sxace-nec-superux"$UNAME_RELEASE"
+ exit ;;
+ Power*:Rhapsody:*:*)
+ echo powerpc-apple-rhapsody"$UNAME_RELEASE"
+ exit ;;
+ *:Rhapsody:*:*)
+ echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE"
+ exit ;;
+ *:Darwin:*:*)
+ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+ set_cc_for_build
+ if test "$UNAME_PROCESSOR" = unknown ; then
+ UNAME_PROCESSOR=powerpc
+ fi
+ if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then
+ if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ case $UNAME_PROCESSOR in
+ i386) UNAME_PROCESSOR=x86_64 ;;
+ powerpc) UNAME_PROCESSOR=powerpc64 ;;
+ esac
+ fi
+ # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
+ if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_PPC >/dev/null
+ then
+ UNAME_PROCESSOR=powerpc
+ fi
+ fi
+ elif test "$UNAME_PROCESSOR" = i386 ; then
+ # Avoid executing cc on OS X 10.9, as it ships with a stub
+ # that puts up a graphical alert prompting to install
+ # developer tools. Any system running Mac OS X 10.7 or
+ # later (Darwin 11 and later) is required to have a 64-bit
+ # processor. This is not true of the ARM version of Darwin
+ # that Apple uses in portable devices.
+ UNAME_PROCESSOR=x86_64
+ fi
+ echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE"
+ exit ;;
+ *:procnto*:*:* | *:QNX:[0123456789]*:*)
+ UNAME_PROCESSOR=`uname -p`
+ if test "$UNAME_PROCESSOR" = x86; then
+ UNAME_PROCESSOR=i386
+ UNAME_MACHINE=pc
+ fi
+ echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE"
+ exit ;;
+ *:QNX:*:4*)
+ echo i386-pc-qnx
+ exit ;;
+ NEO-*:NONSTOP_KERNEL:*:*)
+ echo neo-tandem-nsk"$UNAME_RELEASE"
+ exit ;;
+ NSE-*:NONSTOP_KERNEL:*:*)
+ echo nse-tandem-nsk"$UNAME_RELEASE"
+ exit ;;
+ NSR-*:NONSTOP_KERNEL:*:*)
+ echo nsr-tandem-nsk"$UNAME_RELEASE"
+ exit ;;
+ NSV-*:NONSTOP_KERNEL:*:*)
+ echo nsv-tandem-nsk"$UNAME_RELEASE"
+ exit ;;
+ NSX-*:NONSTOP_KERNEL:*:*)
+ echo nsx-tandem-nsk"$UNAME_RELEASE"
+ exit ;;
+ *:NonStop-UX:*:*)
+ echo mips-compaq-nonstopux
+ exit ;;
+ BS2000:POSIX*:*:*)
+ echo bs2000-siemens-sysv
+ exit ;;
+ DS/*:UNIX_System_V:*:*)
+ echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE"
+ exit ;;
+ *:Plan9:*:*)
+ # "uname -m" is not consistent, so use $cputype instead. 386
+ # is converted to i386 for consistency with other x86
+ # operating systems.
+ # shellcheck disable=SC2154
+ if test "$cputype" = 386; then
+ UNAME_MACHINE=i386
+ else
+ UNAME_MACHINE="$cputype"
+ fi
+ echo "$UNAME_MACHINE"-unknown-plan9
+ exit ;;
+ *:TOPS-10:*:*)
+ echo pdp10-unknown-tops10
+ exit ;;
+ *:TENEX:*:*)
+ echo pdp10-unknown-tenex
+ exit ;;
+ KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+ echo pdp10-dec-tops20
+ exit ;;
+ XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+ echo pdp10-xkl-tops20
+ exit ;;
+ *:TOPS-20:*:*)
+ echo pdp10-unknown-tops20
+ exit ;;
+ *:ITS:*:*)
+ echo pdp10-unknown-its
+ exit ;;
+ SEI:*:*:SEIUX)
+ echo mips-sei-seiux"$UNAME_RELEASE"
+ exit ;;
+ *:DragonFly:*:*)
+ echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
+ exit ;;
+ *:*VMS:*:*)
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ case "$UNAME_MACHINE" in
+ A*) echo alpha-dec-vms ; exit ;;
+ I*) echo ia64-dec-vms ; exit ;;
+ V*) echo vax-dec-vms ; exit ;;
+ esac ;;
+ *:XENIX:*:SysV)
+ echo i386-pc-xenix
+ exit ;;
+ i*86:skyos:*:*)
+ echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`"
+ exit ;;
+ i*86:rdos:*:*)
+ echo "$UNAME_MACHINE"-pc-rdos
+ exit ;;
+ i*86:AROS:*:*)
+ echo "$UNAME_MACHINE"-pc-aros
+ exit ;;
+ x86_64:VMkernel:*:*)
+ echo "$UNAME_MACHINE"-unknown-esx
+ exit ;;
+ amd64:Isilon\ OneFS:*:*)
+ echo x86_64-unknown-onefs
+ exit ;;
+ *:Unleashed:*:*)
+ echo "$UNAME_MACHINE"-unknown-unleashed"$UNAME_RELEASE"
+ exit ;;
+esac
+
+# No uname command or uname output not recognized.
+set_cc_for_build
+cat > "$dummy.c" <<EOF
+#ifdef _SEQUENT_
+#include <sys/types.h>
+#include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+ /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
+ I don't know.... */
+ printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+ printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+ "4"
+#else
+ ""
+#endif
+ ); exit (0);
+#endif
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+ int version;
+ version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+ if (version < 4)
+ printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+ else
+ printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+ exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+ printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+ printf ("ns32k-encore-mach\n"); exit (0);
+#else
+ printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+ printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+ printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+ printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+ struct utsname un;
+
+ uname(&un);
+ if (strncmp(un.version, "V2", 2) == 0) {
+ printf ("i386-sequent-ptx2\n"); exit (0);
+ }
+ if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+ printf ("i386-sequent-ptx1\n"); exit (0);
+ }
+ printf ("i386-sequent-ptx\n"); exit (0);
+#endif
+
+#if defined (vax)
+#if !defined (ultrix)
+#include <sys/param.h>
+#if defined (BSD)
+#if BSD == 43
+ printf ("vax-dec-bsd4.3\n"); exit (0);
+#else
+#if BSD == 199006
+ printf ("vax-dec-bsd4.3reno\n"); exit (0);
+#else
+ printf ("vax-dec-bsd\n"); exit (0);
+#endif
+#endif
+#else
+ printf ("vax-dec-bsd\n"); exit (0);
+#endif
+#else
+ printf ("vax-dec-ultrix\n"); exit (0);
+#endif
+#endif
+#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
+#if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
+#include <signal.h>
+#if defined(_SIZE_T_) /* >= ULTRIX4 */
+ printf ("mips-dec-ultrix4\n"); exit (0);
+#else
+#if defined(ULTRIX3) || defined(ultrix3) || defined(SIGLOST)
+ printf ("mips-dec-ultrix3\n"); exit (0);
+#endif
+#endif
+#endif
+#endif
+
+#if defined (alliant) && defined (i860)
+ printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+ exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
+
+# Apollos put the system type in the environment.
+test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; }
+
+echo "$0: unable to guess system type" >&2
+
+case "$UNAME_MACHINE:$UNAME_SYSTEM" in
+ mips:Linux | mips64:Linux)
+ # If we got here on MIPS GNU/Linux, output extra information.
+ cat >&2 <<EOF
+
+NOTE: MIPS GNU/Linux systems require a C compiler to fully recognize
+the system type. Please install a C compiler and try again.
+EOF
+ ;;
+esac
+
+cat >&2 <<EOF
+
+This script (version $timestamp), has failed to recognize the
+operating system you are using. If your script is old, overwrite *all*
+copies of config.guess and config.sub with the latest versions from:
+
+ https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
+and
+ https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
+
+If $0 has already been updated, send the following data and any
+information you think might be pertinent to config-patches@gnu.org to
+provide the necessary information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo = `(hostinfo) 2>/dev/null`
+/bin/universe = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = "$UNAME_MACHINE"
+UNAME_RELEASE = "$UNAME_RELEASE"
+UNAME_SYSTEM = "$UNAME_SYSTEM"
+UNAME_VERSION = "$UNAME_VERSION"
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
--- /dev/null
+#! /bin/sh
+# Configuration validation subroutine script.
+# Copyright 1992-2019 Free Software Foundation, Inc.
+
+timestamp='2019-01-05'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, see <https://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that
+# program. This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
+
+
+# Please send patches to <config-patches@gnu.org>.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# You can get the latest version of this script from:
+# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support. The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
+
+Canonicalize a configuration name.
+
+Options:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright 1992-2019 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help" >&2
+ exit 1 ;;
+
+ *local*)
+ # First pass through any local machine types.
+ echo "$1"
+ exit ;;
+
+ * )
+ break ;;
+ esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+ exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+ exit 1;;
+esac
+
+# Split fields of configuration type
+# shellcheck disable=SC2162
+IFS="-" read field1 field2 field3 field4 <<EOF
+$1
+EOF
+
+# Separate into logical components for further validation
+case $1 in
+ *-*-*-*-*)
+ echo Invalid configuration \`"$1"\': more than four components >&2
+ exit 1
+ ;;
+ *-*-*-*)
+ basic_machine=$field1-$field2
+ os=$field3-$field4
+ ;;
+ *-*-*)
+ # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two
+ # parts
+ maybe_os=$field2-$field3
+ case $maybe_os in
+ nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc \
+ | linux-newlib* | linux-musl* | linux-uclibc* | uclinux-uclibc* \
+ | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \
+ | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \
+ | storm-chaos* | os2-emx* | rtmk-nova*)
+ basic_machine=$field1
+ os=$maybe_os
+ ;;
+ android-linux)
+ basic_machine=$field1-unknown
+ os=linux-android
+ ;;
+ *)
+ basic_machine=$field1-$field2
+ os=$field3
+ ;;
+ esac
+ ;;
+ *-*)
+ # A lone config we happen to match not fitting any pattern
+ case $field1-$field2 in
+ decstation-3100)
+ basic_machine=mips-dec
+ os=
+ ;;
+ *-*)
+ # Second component is usually, but not always the OS
+ case $field2 in
+ # Prevent following clause from handling this valid os
+ sun*os*)
+ basic_machine=$field1
+ os=$field2
+ ;;
+ # Manufacturers
+ dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \
+ | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \
+ | unicom* | ibm* | next | hp | isi* | apollo | altos* \
+ | convergent* | ncr* | news | 32* | 3600* | 3100* \
+ | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \
+ | ultra | tti* | harris | dolphin | highlevel | gould \
+ | cbm | ns | masscomp | apple | axis | knuth | cray \
+ | microblaze* | sim | cisco \
+ | oki | wec | wrs | winbond)
+ basic_machine=$field1-$field2
+ os=
+ ;;
+ *)
+ basic_machine=$field1
+ os=$field2
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ *)
+ # Convert single-component short-hands not valid as part of
+ # multi-component configurations.
+ case $field1 in
+ 386bsd)
+ basic_machine=i386-pc
+ os=bsd
+ ;;
+ a29khif)
+ basic_machine=a29k-amd
+ os=udi
+ ;;
+ adobe68k)
+ basic_machine=m68010-adobe
+ os=scout
+ ;;
+ alliant)
+ basic_machine=fx80-alliant
+ os=
+ ;;
+ altos | altos3068)
+ basic_machine=m68k-altos
+ os=
+ ;;
+ am29k)
+ basic_machine=a29k-none
+ os=bsd
+ ;;
+ amdahl)
+ basic_machine=580-amdahl
+ os=sysv
+ ;;
+ amiga)
+ basic_machine=m68k-unknown
+ os=
+ ;;
+ amigaos | amigados)
+ basic_machine=m68k-unknown
+ os=amigaos
+ ;;
+ amigaunix | amix)
+ basic_machine=m68k-unknown
+ os=sysv4
+ ;;
+ apollo68)
+ basic_machine=m68k-apollo
+ os=sysv
+ ;;
+ apollo68bsd)
+ basic_machine=m68k-apollo
+ os=bsd
+ ;;
+ aros)
+ basic_machine=i386-pc
+ os=aros
+ ;;
+ aux)
+ basic_machine=m68k-apple
+ os=aux
+ ;;
+ balance)
+ basic_machine=ns32k-sequent
+ os=dynix
+ ;;
+ blackfin)
+ basic_machine=bfin-unknown
+ os=linux
+ ;;
+ cegcc)
+ basic_machine=arm-unknown
+ os=cegcc
+ ;;
+ convex-c1)
+ basic_machine=c1-convex
+ os=bsd
+ ;;
+ convex-c2)
+ basic_machine=c2-convex
+ os=bsd
+ ;;
+ convex-c32)
+ basic_machine=c32-convex
+ os=bsd
+ ;;
+ convex-c34)
+ basic_machine=c34-convex
+ os=bsd
+ ;;
+ convex-c38)
+ basic_machine=c38-convex
+ os=bsd
+ ;;
+ cray)
+ basic_machine=j90-cray
+ os=unicos
+ ;;
+ crds | unos)
+ basic_machine=m68k-crds
+ os=
+ ;;
+ da30)
+ basic_machine=m68k-da30
+ os=
+ ;;
+ decstation | pmax | pmin | dec3100 | decstatn)
+ basic_machine=mips-dec
+ os=
+ ;;
+ delta88)
+ basic_machine=m88k-motorola
+ os=sysv3
+ ;;
+ dicos)
+ basic_machine=i686-pc
+ os=dicos
+ ;;
+ djgpp)
+ basic_machine=i586-pc
+ os=msdosdjgpp
+ ;;
+ ebmon29k)
+ basic_machine=a29k-amd
+ os=ebmon
+ ;;
+ es1800 | OSE68k | ose68k | ose | OSE)
+ basic_machine=m68k-ericsson
+ os=ose
+ ;;
+ gmicro)
+ basic_machine=tron-gmicro
+ os=sysv
+ ;;
+ go32)
+ basic_machine=i386-pc
+ os=go32
+ ;;
+ h8300hms)
+ basic_machine=h8300-hitachi
+ os=hms
+ ;;
+ h8300xray)
+ basic_machine=h8300-hitachi
+ os=xray
+ ;;
+ h8500hms)
+ basic_machine=h8500-hitachi
+ os=hms
+ ;;
+ harris)
+ basic_machine=m88k-harris
+ os=sysv3
+ ;;
+ hp300)
+ basic_machine=m68k-hp
+ ;;
+ hp300bsd)
+ basic_machine=m68k-hp
+ os=bsd
+ ;;
+ hp300hpux)
+ basic_machine=m68k-hp
+ os=hpux
+ ;;
+ hppaosf)
+ basic_machine=hppa1.1-hp
+ os=osf
+ ;;
+ hppro)
+ basic_machine=hppa1.1-hp
+ os=proelf
+ ;;
+ i386mach)
+ basic_machine=i386-mach
+ os=mach
+ ;;
+ vsta)
+ basic_machine=i386-pc
+ os=vsta
+ ;;
+ isi68 | isi)
+ basic_machine=m68k-isi
+ os=sysv
+ ;;
+ m68knommu)
+ basic_machine=m68k-unknown
+ os=linux
+ ;;
+ magnum | m3230)
+ basic_machine=mips-mips
+ os=sysv
+ ;;
+ merlin)
+ basic_machine=ns32k-utek
+ os=sysv
+ ;;
+ mingw64)
+ basic_machine=x86_64-pc
+ os=mingw64
+ ;;
+ mingw32)
+ basic_machine=i686-pc
+ os=mingw32
+ ;;
+ mingw32ce)
+ basic_machine=arm-unknown
+ os=mingw32ce
+ ;;
+ monitor)
+ basic_machine=m68k-rom68k
+ os=coff
+ ;;
+ morphos)
+ basic_machine=powerpc-unknown
+ os=morphos
+ ;;
+ moxiebox)
+ basic_machine=moxie-unknown
+ os=moxiebox
+ ;;
+ msdos)
+ basic_machine=i386-pc
+ os=msdos
+ ;;
+ msys)
+ basic_machine=i686-pc
+ os=msys
+ ;;
+ mvs)
+ basic_machine=i370-ibm
+ os=mvs
+ ;;
+ nacl)
+ basic_machine=le32-unknown
+ os=nacl
+ ;;
+ ncr3000)
+ basic_machine=i486-ncr
+ os=sysv4
+ ;;
+ netbsd386)
+ basic_machine=i386-pc
+ os=netbsd
+ ;;
+ netwinder)
+ basic_machine=armv4l-rebel
+ os=linux
+ ;;
+ news | news700 | news800 | news900)
+ basic_machine=m68k-sony
+ os=newsos
+ ;;
+ news1000)
+ basic_machine=m68030-sony
+ os=newsos
+ ;;
+ necv70)
+ basic_machine=v70-nec
+ os=sysv
+ ;;
+ nh3000)
+ basic_machine=m68k-harris
+ os=cxux
+ ;;
+ nh[45]000)
+ basic_machine=m88k-harris
+ os=cxux
+ ;;
+ nindy960)
+ basic_machine=i960-intel
+ os=nindy
+ ;;
+ mon960)
+ basic_machine=i960-intel
+ os=mon960
+ ;;
+ nonstopux)
+ basic_machine=mips-compaq
+ os=nonstopux
+ ;;
+ os400)
+ basic_machine=powerpc-ibm
+ os=os400
+ ;;
+ OSE68000 | ose68000)
+ basic_machine=m68000-ericsson
+ os=ose
+ ;;
+ os68k)
+ basic_machine=m68k-none
+ os=os68k
+ ;;
+ paragon)
+ basic_machine=i860-intel
+ os=osf
+ ;;
+ parisc)
+ basic_machine=hppa-unknown
+ os=linux
+ ;;
+ pw32)
+ basic_machine=i586-unknown
+ os=pw32
+ ;;
+ rdos | rdos64)
+ basic_machine=x86_64-pc
+ os=rdos
+ ;;
+ rdos32)
+ basic_machine=i386-pc
+ os=rdos
+ ;;
+ rom68k)
+ basic_machine=m68k-rom68k
+ os=coff
+ ;;
+ sa29200)
+ basic_machine=a29k-amd
+ os=udi
+ ;;
+ sei)
+ basic_machine=mips-sei
+ os=seiux
+ ;;
+ sequent)
+ basic_machine=i386-sequent
+ os=
+ ;;
+ sps7)
+ basic_machine=m68k-bull
+ os=sysv2
+ ;;
+ st2000)
+ basic_machine=m68k-tandem
+ os=
+ ;;
+ stratus)
+ basic_machine=i860-stratus
+ os=sysv4
+ ;;
+ sun2)
+ basic_machine=m68000-sun
+ os=
+ ;;
+ sun2os3)
+ basic_machine=m68000-sun
+ os=sunos3
+ ;;
+ sun2os4)
+ basic_machine=m68000-sun
+ os=sunos4
+ ;;
+ sun3)
+ basic_machine=m68k-sun
+ os=
+ ;;
+ sun3os3)
+ basic_machine=m68k-sun
+ os=sunos3
+ ;;
+ sun3os4)
+ basic_machine=m68k-sun
+ os=sunos4
+ ;;
+ sun4)
+ basic_machine=sparc-sun
+ os=
+ ;;
+ sun4os3)
+ basic_machine=sparc-sun
+ os=sunos3
+ ;;
+ sun4os4)
+ basic_machine=sparc-sun
+ os=sunos4
+ ;;
+ sun4sol2)
+ basic_machine=sparc-sun
+ os=solaris2
+ ;;
+ sun386 | sun386i | roadrunner)
+ basic_machine=i386-sun
+ os=
+ ;;
+ sv1)
+ basic_machine=sv1-cray
+ os=unicos
+ ;;
+ symmetry)
+ basic_machine=i386-sequent
+ os=dynix
+ ;;
+ t3e)
+ basic_machine=alphaev5-cray
+ os=unicos
+ ;;
+ t90)
+ basic_machine=t90-cray
+ os=unicos
+ ;;
+ toad1)
+ basic_machine=pdp10-xkl
+ os=tops20
+ ;;
+ tpf)
+ basic_machine=s390x-ibm
+ os=tpf
+ ;;
+ udi29k)
+ basic_machine=a29k-amd
+ os=udi
+ ;;
+ ultra3)
+ basic_machine=a29k-nyu
+ os=sym1
+ ;;
+ v810 | necv810)
+ basic_machine=v810-nec
+ os=none
+ ;;
+ vaxv)
+ basic_machine=vax-dec
+ os=sysv
+ ;;
+ vms)
+ basic_machine=vax-dec
+ os=vms
+ ;;
+ vxworks960)
+ basic_machine=i960-wrs
+ os=vxworks
+ ;;
+ vxworks68)
+ basic_machine=m68k-wrs
+ os=vxworks
+ ;;
+ vxworks29k)
+ basic_machine=a29k-wrs
+ os=vxworks
+ ;;
+ xbox)
+ basic_machine=i686-pc
+ os=mingw32
+ ;;
+ ymp)
+ basic_machine=ymp-cray
+ os=unicos
+ ;;
+ *)
+ basic_machine=$1
+ os=
+ ;;
+ esac
+ ;;
+esac
+
+# Decode 1-component or ad-hoc basic machines
+case $basic_machine in
+ # Here we handle the default manufacturer of certain CPU types. It is in
+ # some cases the only manufacturer, in others, it is the most popular.
+ w89k)
+ cpu=hppa1.1
+ vendor=winbond
+ ;;
+ op50n)
+ cpu=hppa1.1
+ vendor=oki
+ ;;
+ op60c)
+ cpu=hppa1.1
+ vendor=oki
+ ;;
+ ibm*)
+ cpu=i370
+ vendor=ibm
+ ;;
+ orion105)
+ cpu=clipper
+ vendor=highlevel
+ ;;
+ mac | mpw | mac-mpw)
+ cpu=m68k
+ vendor=apple
+ ;;
+ pmac | pmac-mpw)
+ cpu=powerpc
+ vendor=apple
+ ;;
+
+ # Recognize the various machine names and aliases which stand
+ # for a CPU type and a company and sometimes even an OS.
+ 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+ cpu=m68000
+ vendor=att
+ ;;
+ 3b*)
+ cpu=we32k
+ vendor=att
+ ;;
+ bluegene*)
+ cpu=powerpc
+ vendor=ibm
+ os=cnk
+ ;;
+ decsystem10* | dec10*)
+ cpu=pdp10
+ vendor=dec
+ os=tops10
+ ;;
+ decsystem20* | dec20*)
+ cpu=pdp10
+ vendor=dec
+ os=tops20
+ ;;
+ delta | 3300 | motorola-3300 | motorola-delta \
+ | 3300-motorola | delta-motorola)
+ cpu=m68k
+ vendor=motorola
+ ;;
+ dpx2*)
+ cpu=m68k
+ vendor=bull
+ os=sysv3
+ ;;
+ encore | umax | mmax)
+ cpu=ns32k
+ vendor=encore
+ ;;
+ elxsi)
+ cpu=elxsi
+ vendor=elxsi
+ os=${os:-bsd}
+ ;;
+ fx2800)
+ cpu=i860
+ vendor=alliant
+ ;;
+ genix)
+ cpu=ns32k
+ vendor=ns
+ ;;
+ h3050r* | hiux*)
+ cpu=hppa1.1
+ vendor=hitachi
+ os=hiuxwe2
+ ;;
+ hp3k9[0-9][0-9] | hp9[0-9][0-9])
+ cpu=hppa1.0
+ vendor=hp
+ ;;
+ hp9k2[0-9][0-9] | hp9k31[0-9])
+ cpu=m68000
+ vendor=hp
+ ;;
+ hp9k3[2-9][0-9])
+ cpu=m68k
+ vendor=hp
+ ;;
+ hp9k6[0-9][0-9] | hp6[0-9][0-9])
+ cpu=hppa1.0
+ vendor=hp
+ ;;
+ hp9k7[0-79][0-9] | hp7[0-79][0-9])
+ cpu=hppa1.1
+ vendor=hp
+ ;;
+ hp9k78[0-9] | hp78[0-9])
+ # FIXME: really hppa2.0-hp
+ cpu=hppa1.1
+ vendor=hp
+ ;;
+ hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+ # FIXME: really hppa2.0-hp
+ cpu=hppa1.1
+ vendor=hp
+ ;;
+ hp9k8[0-9][13679] | hp8[0-9][13679])
+ cpu=hppa1.1
+ vendor=hp
+ ;;
+ hp9k8[0-9][0-9] | hp8[0-9][0-9])
+ cpu=hppa1.0
+ vendor=hp
+ ;;
+ i*86v32)
+ cpu=`echo "$1" | sed -e 's/86.*/86/'`
+ vendor=pc
+ os=sysv32
+ ;;
+ i*86v4*)
+ cpu=`echo "$1" | sed -e 's/86.*/86/'`
+ vendor=pc
+ os=sysv4
+ ;;
+ i*86v)
+ cpu=`echo "$1" | sed -e 's/86.*/86/'`
+ vendor=pc
+ os=sysv
+ ;;
+ i*86sol2)
+ cpu=`echo "$1" | sed -e 's/86.*/86/'`
+ vendor=pc
+ os=solaris2
+ ;;
+ j90 | j90-cray)
+ cpu=j90
+ vendor=cray
+ os=${os:-unicos}
+ ;;
+ iris | iris4d)
+ cpu=mips
+ vendor=sgi
+ case $os in
+ irix*)
+ ;;
+ *)
+ os=irix4
+ ;;
+ esac
+ ;;
+ miniframe)
+ cpu=m68000
+ vendor=convergent
+ ;;
+ *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*)
+ cpu=m68k
+ vendor=atari
+ os=mint
+ ;;
+ news-3600 | risc-news)
+ cpu=mips
+ vendor=sony
+ os=newsos
+ ;;
+ next | m*-next)
+ cpu=m68k
+ vendor=next
+ case $os in
+ nextstep* )
+ ;;
+ ns2*)
+ os=nextstep2
+ ;;
+ *)
+ os=nextstep3
+ ;;
+ esac
+ ;;
+ np1)
+ cpu=np1
+ vendor=gould
+ ;;
+ op50n-* | op60c-*)
+ cpu=hppa1.1
+ vendor=oki
+ os=proelf
+ ;;
+ pa-hitachi)
+ cpu=hppa1.1
+ vendor=hitachi
+ os=hiuxwe2
+ ;;
+ pbd)
+ cpu=sparc
+ vendor=tti
+ ;;
+ pbb)
+ cpu=m68k
+ vendor=tti
+ ;;
+ pc532)
+ cpu=ns32k
+ vendor=pc532
+ ;;
+ pn)
+ cpu=pn
+ vendor=gould
+ ;;
+ power)
+ cpu=power
+ vendor=ibm
+ ;;
+ ps2)
+ cpu=i386
+ vendor=ibm
+ ;;
+ rm[46]00)
+ cpu=mips
+ vendor=siemens
+ ;;
+ rtpc | rtpc-*)
+ cpu=romp
+ vendor=ibm
+ ;;
+ sde)
+ cpu=mipsisa32
+ vendor=sde
+ os=${os:-elf}
+ ;;
+ simso-wrs)
+ cpu=sparclite
+ vendor=wrs
+ os=vxworks
+ ;;
+ tower | tower-32)
+ cpu=m68k
+ vendor=ncr
+ ;;
+ vpp*|vx|vx-*)
+ cpu=f301
+ vendor=fujitsu
+ ;;
+ w65)
+ cpu=w65
+ vendor=wdc
+ ;;
+ w89k-*)
+ cpu=hppa1.1
+ vendor=winbond
+ os=proelf
+ ;;
+ none)
+ cpu=none
+ vendor=none
+ ;;
+ leon|leon[3-9])
+ cpu=sparc
+ vendor=$basic_machine
+ ;;
+ leon-*|leon[3-9]-*)
+ cpu=sparc
+ vendor=`echo "$basic_machine" | sed 's/-.*//'`
+ ;;
+
+ *-*)
+ # shellcheck disable=SC2162
+ IFS="-" read cpu vendor <<EOF
+$basic_machine
+EOF
+ ;;
+ # We use `pc' rather than `unknown'
+ # because (1) that's what they normally are, and
+ # (2) the word "unknown" tends to confuse beginning users.
+ i*86 | x86_64)
+ cpu=$basic_machine
+ vendor=pc
+ ;;
+ # These rules are duplicated from below for sake of the special case above;
+ # i.e. things that normalized to x86 arches should also default to "pc"
+ pc98)
+ cpu=i386
+ vendor=pc
+ ;;
+ x64 | amd64)
+ cpu=x86_64
+ vendor=pc
+ ;;
+ # Recognize the basic CPU types without company name.
+ *)
+ cpu=$basic_machine
+ vendor=unknown
+ ;;
+esac
+
+unset -v basic_machine
+
+# Decode basic machines in the full and proper CPU-Company form.
+case $cpu-$vendor in
+ # Here we handle the default manufacturer of certain CPU types in canonical form. It is in
+ # some cases the only manufacturer, in others, it is the most popular.
+ craynv-unknown)
+ vendor=cray
+ os=${os:-unicosmp}
+ ;;
+ c90-unknown | c90-cray)
+ vendor=cray
+ os=${os:-unicos}
+ ;;
+ fx80-unknown)
+ vendor=alliant
+ ;;
+ romp-unknown)
+ vendor=ibm
+ ;;
+ mmix-unknown)
+ vendor=knuth
+ ;;
+ microblaze-unknown | microblazeel-unknown)
+ vendor=xilinx
+ ;;
+ rs6000-unknown)
+ vendor=ibm
+ ;;
+ vax-unknown)
+ vendor=dec
+ ;;
+ pdp11-unknown)
+ vendor=dec
+ ;;
+ we32k-unknown)
+ vendor=att
+ ;;
+ cydra-unknown)
+ vendor=cydrome
+ ;;
+ i370-ibm*)
+ vendor=ibm
+ ;;
+ orion-unknown)
+ vendor=highlevel
+ ;;
+ xps-unknown | xps100-unknown)
+ cpu=xps100
+ vendor=honeywell
+ ;;
+
+ # Here we normalize CPU types with a missing or matching vendor
+ dpx20-unknown | dpx20-bull)
+ cpu=rs6000
+ vendor=bull
+ os=${os:-bosx}
+ ;;
+
+ # Here we normalize CPU types irrespective of the vendor
+ amd64-*)
+ cpu=x86_64
+ ;;
+ blackfin-*)
+ cpu=bfin
+ os=linux
+ ;;
+ c54x-*)
+ cpu=tic54x
+ ;;
+ c55x-*)
+ cpu=tic55x
+ ;;
+ c6x-*)
+ cpu=tic6x
+ ;;
+ e500v[12]-*)
+ cpu=powerpc
+ os=$os"spe"
+ ;;
+ mips3*-*)
+ cpu=mips64
+ ;;
+ ms1-*)
+ cpu=mt
+ ;;
+ m68knommu-*)
+ cpu=m68k
+ os=linux
+ ;;
+ m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*)
+ cpu=s12z
+ ;;
+ openrisc-*)
+ cpu=or32
+ ;;
+ parisc-*)
+ cpu=hppa
+ os=linux
+ ;;
+ pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+ cpu=i586
+ ;;
+ pentiumpro-* | p6-* | 6x86-* | athlon-* | athalon_*-*)
+ cpu=i686
+ ;;
+ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+ cpu=i686
+ ;;
+ pentium4-*)
+ cpu=i786
+ ;;
+ pc98-*)
+ cpu=i386
+ ;;
+ ppc-* | ppcbe-*)
+ cpu=powerpc
+ ;;
+ ppcle-* | powerpclittle-*)
+ cpu=powerpcle
+ ;;
+ ppc64-*)
+ cpu=powerpc64
+ ;;
+ ppc64le-* | powerpc64little-*)
+ cpu=powerpc64le
+ ;;
+ sb1-*)
+ cpu=mipsisa64sb1
+ ;;
+ sb1el-*)
+ cpu=mipsisa64sb1el
+ ;;
+ sh5e[lb]-*)
+ cpu=`echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/'`
+ ;;
+ spur-*)
+ cpu=spur
+ ;;
+ strongarm-* | thumb-*)
+ cpu=arm
+ ;;
+ tx39-*)
+ cpu=mipstx39
+ ;;
+ tx39el-*)
+ cpu=mipstx39el
+ ;;
+ x64-*)
+ cpu=x86_64
+ ;;
+ xscale-* | xscalee[bl]-*)
+ cpu=`echo "$cpu" | sed 's/^xscale/arm/'`
+ ;;
+
+ # Recognize the canonical CPU Types that limit and/or modify the
+ # company names they are paired with.
+ cr16-*)
+ os=${os:-elf}
+ ;;
+ crisv32-* | etraxfs*-*)
+ cpu=crisv32
+ vendor=axis
+ ;;
+ cris-* | etrax*-*)
+ cpu=cris
+ vendor=axis
+ ;;
+ crx-*)
+ os=${os:-elf}
+ ;;
+ neo-tandem)
+ cpu=neo
+ vendor=tandem
+ ;;
+ nse-tandem)
+ cpu=nse
+ vendor=tandem
+ ;;
+ nsr-tandem)
+ cpu=nsr
+ vendor=tandem
+ ;;
+ nsv-tandem)
+ cpu=nsv
+ vendor=tandem
+ ;;
+ nsx-tandem)
+ cpu=nsx
+ vendor=tandem
+ ;;
+ s390-*)
+ cpu=s390
+ vendor=ibm
+ ;;
+ s390x-*)
+ cpu=s390x
+ vendor=ibm
+ ;;
+ tile*-*)
+ os=${os:-linux-gnu}
+ ;;
+
+ *)
+ # Recognize the canonical CPU types that are allowed with any
+ # company name.
+ case $cpu in
+ 1750a | 580 \
+ | a29k \
+ | aarch64 | aarch64_be \
+ | abacus \
+ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \
+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \
+ | alphapca5[67] | alpha64pca5[67] \
+ | am33_2.0 \
+ | amdgcn \
+ | arc | arceb \
+ | arm | arm[lb]e | arme[lb] | armv* \
+ | avr | avr32 \
+ | asmjs \
+ | ba \
+ | be32 | be64 \
+ | bfin | bs2000 \
+ | c[123]* | c30 | [cjt]90 | c4x \
+ | c8051 | clipper | craynv | csky | cydra \
+ | d10v | d30v | dlx | dsp16xx \
+ | e2k | elxsi | epiphany \
+ | f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \
+ | h8300 | h8500 \
+ | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | hexagon \
+ | i370 | i*86 | i860 | i960 | ia16 | ia64 \
+ | ip2k | iq2000 \
+ | k1om \
+ | le32 | le64 \
+ | lm32 \
+ | m32c | m32r | m32rle \
+ | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \
+ | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \
+ | m88110 | m88k | maxq | mb | mcore | mep | metag \
+ | microblaze | microblazeel \
+ | mips | mipsbe | mipseb | mipsel | mipsle \
+ | mips16 \
+ | mips64 | mips64eb | mips64el \
+ | mips64octeon | mips64octeonel \
+ | mips64orion | mips64orionel \
+ | mips64r5900 | mips64r5900el \
+ | mips64vr | mips64vrel \
+ | mips64vr4100 | mips64vr4100el \
+ | mips64vr4300 | mips64vr4300el \
+ | mips64vr5000 | mips64vr5000el \
+ | mips64vr5900 | mips64vr5900el \
+ | mipsisa32 | mipsisa32el \
+ | mipsisa32r2 | mipsisa32r2el \
+ | mipsisa32r6 | mipsisa32r6el \
+ | mipsisa64 | mipsisa64el \
+ | mipsisa64r2 | mipsisa64r2el \
+ | mipsisa64r6 | mipsisa64r6el \
+ | mipsisa64sb1 | mipsisa64sb1el \
+ | mipsisa64sr71k | mipsisa64sr71kel \
+ | mipsr5900 | mipsr5900el \
+ | mipstx39 | mipstx39el \
+ | mmix \
+ | mn10200 | mn10300 \
+ | moxie \
+ | mt \
+ | msp430 \
+ | nds32 | nds32le | nds32be \
+ | nfp \
+ | nios | nios2 | nios2eb | nios2el \
+ | none | np1 | ns16k | ns32k | nvptx \
+ | open8 \
+ | or1k* \
+ | or32 \
+ | orion \
+ | picochip \
+ | pdp10 | pdp11 | pj | pjl | pn | power \
+ | powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \
+ | pru \
+ | pyramid \
+ | riscv | riscv32 | riscv64 \
+ | rl78 | romp | rs6000 | rx \
+ | score \
+ | sh | shl \
+ | sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \
+ | sh[1234]e[lb] | sh[12345][lb]e | sh[23]ele | sh64 | sh64le \
+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \
+ | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \
+ | spu \
+ | tahoe \
+ | tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \
+ | tron \
+ | ubicom32 \
+ | v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \
+ | vax \
+ | visium \
+ | w65 | wasm32 \
+ | we32k \
+ | x86 | x86_64 | xc16x | xgate | xps100 \
+ | xstormy16 | xtensa* \
+ | ymp \
+ | z8k | z80)
+ ;;
+
+ *)
+ echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2
+ exit 1
+ ;;
+ esac
+ ;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $vendor in
+ digital*)
+ vendor=dec
+ ;;
+ commodore*)
+ vendor=cbm
+ ;;
+ *)
+ ;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x$os != x ]
+then
+case $os in
+ # First match some system type aliases that might get confused
+ # with valid system types.
+ # solaris* is a basic system type, with this one exception.
+ auroraux)
+ os=auroraux
+ ;;
+ bluegene*)
+ os=cnk
+ ;;
+ solaris1 | solaris1.*)
+ os=`echo $os | sed -e 's|solaris1|sunos4|'`
+ ;;
+ solaris)
+ os=solaris2
+ ;;
+ unixware*)
+ os=sysv4.2uw
+ ;;
+ gnu/linux*)
+ os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+ ;;
+ # es1800 is here to avoid being matched by es* (a different OS)
+ es1800*)
+ os=ose
+ ;;
+ # Some version numbers need modification
+ chorusos*)
+ os=chorusos
+ ;;
+ isc)
+ os=isc2.2
+ ;;
+ sco6)
+ os=sco5v6
+ ;;
+ sco5)
+ os=sco3.2v5
+ ;;
+ sco4)
+ os=sco3.2v4
+ ;;
+ sco3.2.[4-9]*)
+ os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+ ;;
+ sco3.2v[4-9]* | sco5v6*)
+ # Don't forget version if it is 3.2v4 or newer.
+ ;;
+ scout)
+ # Don't match below
+ ;;
+ sco*)
+ os=sco3.2v2
+ ;;
+ psos*)
+ os=psos
+ ;;
+ # Now accept the basic system types.
+ # The portable systems comes first.
+ # Each alternative MUST end in a * to match a version number.
+ # sysv* is not here because it comes later, after sysvr4.
+ gnu* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
+ | *vms* | esix* | aix* | cnk* | sunos | sunos[34]*\
+ | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
+ | sym* | kopensolaris* | plan9* \
+ | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
+ | aos* | aros* | cloudabi* | sortix* \
+ | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
+ | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \
+ | knetbsd* | mirbsd* | netbsd* \
+ | bitrig* | openbsd* | solidbsd* | libertybsd* \
+ | ekkobsd* | kfreebsd* | freebsd* | riscix* | lynxos* \
+ | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
+ | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
+ | udi* | eabi* | lites* | ieee* | go32* | aux* | hcos* \
+ | chorusrdb* | cegcc* | glidix* \
+ | cygwin* | msys* | pe* | moss* | proelf* | rtems* \
+ | midipix* | mingw32* | mingw64* | linux-gnu* | linux-android* \
+ | linux-newlib* | linux-musl* | linux-uclibc* \
+ | uxpv* | beos* | mpeix* | udk* | moxiebox* \
+ | interix* | uwin* | mks* | rhapsody* | darwin* \
+ | openstep* | oskit* | conix* | pw32* | nonstopux* \
+ | storm-chaos* | tops10* | tenex* | tops20* | its* \
+ | os2* | vos* | palmos* | uclinux* | nucleus* \
+ | morphos* | superux* | rtmk* | windiss* \
+ | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \
+ | skyos* | haiku* | rdos* | toppers* | drops* | es* \
+ | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
+ | midnightbsd* | amdhsa* | unleashed* | emscripten*)
+ # Remember, each alternative MUST END IN *, to match a version number.
+ ;;
+ qnx*)
+ case $cpu in
+ x86 | i*86)
+ ;;
+ *)
+ os=nto-$os
+ ;;
+ esac
+ ;;
+ hiux*)
+ os=hiuxwe2
+ ;;
+ nto-qnx*)
+ ;;
+ nto*)
+ os=`echo $os | sed -e 's|nto|nto-qnx|'`
+ ;;
+ sim | xray | os68k* | v88r* \
+ | windows* | osx | abug | netware* | os9* \
+ | macos* | mpw* | magic* | mmixware* | mon960* | lnews*)
+ ;;
+ linux-dietlibc)
+ os=linux-dietlibc
+ ;;
+ linux*)
+ os=`echo $os | sed -e 's|linux|linux-gnu|'`
+ ;;
+ lynx*178)
+ os=lynxos178
+ ;;
+ lynx*5)
+ os=lynxos5
+ ;;
+ lynx*)
+ os=lynxos
+ ;;
+ mac*)
+ os=`echo "$os" | sed -e 's|mac|macos|'`
+ ;;
+ opened*)
+ os=openedition
+ ;;
+ os400*)
+ os=os400
+ ;;
+ sunos5*)
+ os=`echo "$os" | sed -e 's|sunos5|solaris2|'`
+ ;;
+ sunos6*)
+ os=`echo "$os" | sed -e 's|sunos6|solaris3|'`
+ ;;
+ wince*)
+ os=wince
+ ;;
+ utek*)
+ os=bsd
+ ;;
+ dynix*)
+ os=bsd
+ ;;
+ acis*)
+ os=aos
+ ;;
+ atheos*)
+ os=atheos
+ ;;
+ syllable*)
+ os=syllable
+ ;;
+ 386bsd)
+ os=bsd
+ ;;
+ ctix* | uts*)
+ os=sysv
+ ;;
+ nova*)
+ os=rtmk-nova
+ ;;
+ ns2)
+ os=nextstep2
+ ;;
+ nsk*)
+ os=nsk
+ ;;
+ # Preserve the version number of sinix5.
+ sinix5.*)
+ os=`echo $os | sed -e 's|sinix|sysv|'`
+ ;;
+ sinix*)
+ os=sysv4
+ ;;
+ tpf*)
+ os=tpf
+ ;;
+ triton*)
+ os=sysv3
+ ;;
+ oss*)
+ os=sysv3
+ ;;
+ svr4*)
+ os=sysv4
+ ;;
+ svr3)
+ os=sysv3
+ ;;
+ sysvr4)
+ os=sysv4
+ ;;
+ # This must come after sysvr4.
+ sysv*)
+ ;;
+ ose*)
+ os=ose
+ ;;
+ *mint | mint[0-9]* | *MiNT | MiNT[0-9]*)
+ os=mint
+ ;;
+ zvmoe)
+ os=zvmoe
+ ;;
+ dicos*)
+ os=dicos
+ ;;
+ pikeos*)
+ # Until real need of OS specific support for
+ # particular features comes up, bare metal
+ # configurations are quite functional.
+ case $cpu in
+ arm*)
+ os=eabi
+ ;;
+ *)
+ os=elf
+ ;;
+ esac
+ ;;
+ nacl*)
+ ;;
+ ios)
+ ;;
+ none)
+ ;;
+ *-eabi)
+ ;;
+ *)
+ echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system. Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $cpu-$vendor in
+ score-*)
+ os=elf
+ ;;
+ spu-*)
+ os=elf
+ ;;
+ *-acorn)
+ os=riscix1.2
+ ;;
+ arm*-rebel)
+ os=linux
+ ;;
+ arm*-semi)
+ os=aout
+ ;;
+ c4x-* | tic4x-*)
+ os=coff
+ ;;
+ c8051-*)
+ os=elf
+ ;;
+ clipper-intergraph)
+ os=clix
+ ;;
+ hexagon-*)
+ os=elf
+ ;;
+ tic54x-*)
+ os=coff
+ ;;
+ tic55x-*)
+ os=coff
+ ;;
+ tic6x-*)
+ os=coff
+ ;;
+ # This must come before the *-dec entry.
+ pdp10-*)
+ os=tops20
+ ;;
+ pdp11-*)
+ os=none
+ ;;
+ *-dec | vax-*)
+ os=ultrix4.2
+ ;;
+ m68*-apollo)
+ os=domain
+ ;;
+ i386-sun)
+ os=sunos4.0.2
+ ;;
+ m68000-sun)
+ os=sunos3
+ ;;
+ m68*-cisco)
+ os=aout
+ ;;
+ mep-*)
+ os=elf
+ ;;
+ mips*-cisco)
+ os=elf
+ ;;
+ mips*-*)
+ os=elf
+ ;;
+ or32-*)
+ os=coff
+ ;;
+ *-tti) # must be before sparc entry or we get the wrong os.
+ os=sysv3
+ ;;
+ sparc-* | *-sun)
+ os=sunos4.1.1
+ ;;
+ pru-*)
+ os=elf
+ ;;
+ *-be)
+ os=beos
+ ;;
+ *-ibm)
+ os=aix
+ ;;
+ *-knuth)
+ os=mmixware
+ ;;
+ *-wec)
+ os=proelf
+ ;;
+ *-winbond)
+ os=proelf
+ ;;
+ *-oki)
+ os=proelf
+ ;;
+ *-hp)
+ os=hpux
+ ;;
+ *-hitachi)
+ os=hiux
+ ;;
+ i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+ os=sysv
+ ;;
+ *-cbm)
+ os=amigaos
+ ;;
+ *-dg)
+ os=dgux
+ ;;
+ *-dolphin)
+ os=sysv3
+ ;;
+ m68k-ccur)
+ os=rtu
+ ;;
+ m88k-omron*)
+ os=luna
+ ;;
+ *-next)
+ os=nextstep
+ ;;
+ *-sequent)
+ os=ptx
+ ;;
+ *-crds)
+ os=unos
+ ;;
+ *-ns)
+ os=genix
+ ;;
+ i370-*)
+ os=mvs
+ ;;
+ *-gould)
+ os=sysv
+ ;;
+ *-highlevel)
+ os=bsd
+ ;;
+ *-encore)
+ os=bsd
+ ;;
+ *-sgi)
+ os=irix
+ ;;
+ *-siemens)
+ os=sysv4
+ ;;
+ *-masscomp)
+ os=rtu
+ ;;
+ f30[01]-fujitsu | f700-fujitsu)
+ os=uxpv
+ ;;
+ *-rom68k)
+ os=coff
+ ;;
+ *-*bug)
+ os=coff
+ ;;
+ *-apple)
+ os=macos
+ ;;
+ *-atari*)
+ os=mint
+ ;;
+ *-wrs)
+ os=vxworks
+ ;;
+ *)
+ os=none
+ ;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer. We pick the logical manufacturer.
+case $vendor in
+ unknown)
+ case $os in
+ riscix*)
+ vendor=acorn
+ ;;
+ sunos*)
+ vendor=sun
+ ;;
+ cnk*|-aix*)
+ vendor=ibm
+ ;;
+ beos*)
+ vendor=be
+ ;;
+ hpux*)
+ vendor=hp
+ ;;
+ mpeix*)
+ vendor=hp
+ ;;
+ hiux*)
+ vendor=hitachi
+ ;;
+ unos*)
+ vendor=crds
+ ;;
+ dgux*)
+ vendor=dg
+ ;;
+ luna*)
+ vendor=omron
+ ;;
+ genix*)
+ vendor=ns
+ ;;
+ clix*)
+ vendor=intergraph
+ ;;
+ mvs* | opened*)
+ vendor=ibm
+ ;;
+ os400*)
+ vendor=ibm
+ ;;
+ ptx*)
+ vendor=sequent
+ ;;
+ tpf*)
+ vendor=ibm
+ ;;
+ vxsim* | vxworks* | windiss*)
+ vendor=wrs
+ ;;
+ aux*)
+ vendor=apple
+ ;;
+ hms*)
+ vendor=hitachi
+ ;;
+ mpw* | macos*)
+ vendor=apple
+ ;;
+ *mint | mint[0-9]* | *MiNT | MiNT[0-9]*)
+ vendor=atari
+ ;;
+ vos*)
+ vendor=stratus
+ ;;
+ esac
+ ;;
+esac
+
+echo "$cpu-$vendor-$os"
+exit
+
+# Local variables:
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
+++ /dev/null
---- a/conserver/cutil.h
-+++ b/conserver/cutil.h
-@@ -7,6 +7,8 @@
- #include <stdarg.h>
- #if HAVE_OPENSSL
- # include <openssl/ssl.h>
-+# include <openssl/bn.h>
-+# include <openssl/dh.h>
- # include <openssl/err.h>
- # if OPENSSL_VERSION_NUMBER < 0x10100000L
- # define TLS_method SSLv23_method
config COOVACHILLI_NOSSL
bool "No SSL support"
-config COOVACHILLI_CYASSL
- bool "CyaSSL"
+config COOVACHILLI_WOLFSSL
+ bool "wolfSSL"
config COOVACHILLI_OPENSSL
bool "OpenSSL"
PKG_NAME:=coova-chilli
PKG_VERSION:=1.4
-PKG_MAINTAINER:=Jaehoon You <teslamint@gmail.com>
-PKG_LICENSE:=GPL-2.0+
-PKG_LICENSE_FILES:=COPYING
-PKG_RELEASE:=7
+PKG_RELEASE:=10
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/coova/coova-chilli/tar.gz/$(PKG_VERSION)?
PKG_HASH:=987647a4c8efe7b1e2d7108d56068e3bd7830d326680f0eaa2c705e4c59c46d9
+PKG_MAINTAINER:=Jaehoon You <teslamint@gmail.com>
+PKG_LICENSE:=GPL-2.0-or-later
+PKG_LICENSE_FILES:=COPYING
+
+PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=0
-PKG_CONFIG_DEPENDS := \
+PKG_CONFIG_DEPENDS:= \
COOVACHILLI_MINIPORTAL \
COOVACHILLI_REDIR \
COOVACHILLI_USERAGENT \
COOVACHILLI_UAMDOMAINFILE \
COOVACHILLI_LARGELIMITS \
COOVACHILLI_NOSSL \
- COOVACHILLI_CYASSL \
+ COOVACHILLI_WOLFSSL \
COOVACHILLI_OPENSSL
include $(INCLUDE_DIR)/package.mk
SUBMENU:=Captive Portals
SECTION:=net
CATEGORY:=Network
- DEPENDS:=+kmod-tun +librt +COOVACHILLI_CYASSL:libcyassl +COOVACHILLI_OPENSSL:libopenssl
+ DEPENDS:=+kmod-tun +librt +COOVACHILLI_WOLFSSL:libwolfssl +COOVACHILLI_OPENSSL:libopenssl
TITLE:=Wireless LAN HotSpot controller (Coova Chilli Version)
URL:=https://coova.github.io/
MENU:=1
DISABLE_NLS=
-TARGET_CFLAGS += $(FPIC)
+TARGET_CFLAGS += $(FPIC) -Wno-address-of-packed-member
CONFIGURE_VARS += \
ARCH="$(LINUX_KARCH)" \
$(if $(CONFIG_COOVACHILLI_LARGELIMITS),--enable,--disable)-largelimits \
$(if $(CONFIG_COOVACHILLI_UAMDOMAINFILE),--enable,--disable)-uamdomainfile \
$(if $(CONFIG_IPV6),--with,--without)-ipv6 \
- $(if $(CONFIG_COOVACHILLI_CYASSL),--with,--without)-cyassl \
+ $(if $(CONFIG_COOVACHILLI_WOLFSSL),--with,--without)-cyassl \
$(if $(CONFIG_COOVACHILLI_OPENSSL),--with,--without)-openssl \
$(if $(CONFIG_PACKAGE_kmod-ipt-coova),--with-nfcoova) \
)
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_DATA) files/chilli.config $(1)/etc/config/chilli
$(INSTALL_DIR) $(1)/lib/firewall
- $(CP) files/chilli.firewall $(1)/lib/firewall/chilli.sh
endef
$(eval $(call BuildPackage,coova-chilli))
# Script executed after network interface has been brought up.
# Executed with the following parameters: <devicename> <ip address>
# <mask>
- # Normally you do not need to uncomment this option.
- #option ipup /etc/chilli.ipup
+ # Normally you do not need to modify this option.
+ option ipup /etc/chilli/up.sh
# Script executed after network interface has been taken down.
# Executed with the following parameters: <devicename> <ip address>
# <mask>
- # Normally you do not need to uncomment this option.
- #option ipdown /etc/chilli.ipdown
+ # Normally you do not need to modify this option.
+ option ipdown /etc/chilli/down.sh
# Radius parameters
+++ /dev/null
-#!/bin/sh
-
-chilli_firewall() {
- local cfg="$1"
-
- local network ifname tun
-
- config_get network "$cfg" network
-
- . /lib/functions/network.sh
- network_get_device ifname ${network:-lan}
-
- if [ "$ifname" = "" ]
- then
- config_get ifname "$cfg" dhcpif
- fi
-
- config_get tun "$cfg" tundev
-
- for n in ACCEPT DROP REJECT
- do
- iptables -F zone_${network}_${n}
- iptables -I zone_${network}_${n} -i $tun -j $n
- iptables -I zone_${network}_${n} -o $tun -j $n
- done
-
- iptables -D forward -i ${ifname} -j zone_${network}_forward
- iptables -A forward -i ${ifname} -j DROP
- iptables -A forward -i $tun -j zone_${network}_forward
-
- iptables -D input -i ${ifname} -j zone_${network}
- iptables -A input -i $tun -j zone_${network}
-
- iptables -I zone_${network} -p tcp --dport 3990 -j ACCEPT
- iptables -I zone_${network} -p tcp --dport 3991 -j ACCEPT
-}
-
-chilli_post_core_cb() {
- config_load chilli
- config_foreach chilli_firewall chilli
-}
--- /dev/null
+--- a/src/ms_chap.c
++++ b/src/ms_chap.c
+@@ -96,18 +96,18 @@ MakeKey(u_char *key, u_char *des_key)
+ des_key[6] = Get7Bits(key, 42);
+ des_key[7] = Get7Bits(key, 49);
+
+- des_set_odd_parity((des_cblock *)des_key);
++ DES_set_odd_parity((DES_cblock *)des_key);
+ }
+
+ static void /* IN 8 octets IN 7 octest OUT 8 octets */
+ DesEncrypt(u_char *clear, u_char *key, u_char *cipher)
+ {
+- des_cblock des_key;
+- des_key_schedule key_schedule;
++ DES_cblock des_key;
++ DES_key_schedule key_schedule;
+
+ MakeKey(key, des_key);
+- des_set_key(&des_key, key_schedule);
+- des_ecb_encrypt((des_cblock *)clear, (des_cblock *)cipher, key_schedule, 1);
++ DES_set_key(&des_key, &key_schedule);
++ DES_ecb_encrypt((DES_cblock *)clear, (DES_cblock *)cipher, &key_schedule, 1);
+ }
+
+ #define LENGTH 20
+--- a/src/ssl.c
++++ b/src/ssl.c
+@@ -35,11 +35,13 @@ openssl_env * initssl() {
+ if (openssl_init == 0) {
+ openssl_init = 1;
+ #ifdef HAVE_OPENSSL
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ if (_options.debug) {
+ SSL_load_error_strings();
+ }
+ SSL_library_init();
+ OpenSSL_add_all_algorithms();
++#endif
+ #else
+ matrixSslOpen();
+ syslog(LOG_DEBUG, "%s(%d): MatrixSslOpen()", __FUNCTION__, __LINE__);
+@@ -55,11 +57,13 @@ openssl_env * initssl_cli() {
+ if (openssl_init == 0) {
+ openssl_init = 1;
+ #ifdef HAVE_OPENSSL
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ if (_options.debug) {
+ SSL_load_error_strings();
+ }
+ SSL_library_init();
+ OpenSSL_add_all_algorithms();
++#endif
+ #else
+ matrixSslOpen();
+ syslog(LOG_DEBUG, "%s(%d): MatrixSslOpen()", __FUNCTION__, __LINE__);
+@@ -132,7 +136,7 @@ _openssl_env_init(openssl_env *env, char *engine, int server) {
+ if (_options.sslciphers) {
+ SSL_CTX_set_cipher_list(env->ctx, _options.sslciphers);
+ }
+-#ifdef HAVE_OPENSSL_ENGINE
++#ifndef OPENSSL_NO_ENGINE
+ if (engine) {
+ retry:
+ if ((env->engine = ENGINE_by_id(engine)) == NULL) {
+@@ -609,7 +613,7 @@ openssl_env_free(openssl_env *env) {
+ #endif
+ #ifdef HAVE_OPENSSL
+ if (env->ctx) SSL_CTX_free(env->ctx);
+-#ifdef HAVE_OPENSSL_ENGINE
++#ifndef OPENSSL_NO_ENGINE
+ if (env->engine) ENGINE_free(env->engine);
+ #endif
+ #endif
+--- a/src/ssl.h
++++ b/src/ssl.h
+@@ -41,6 +41,7 @@ typedef struct {
+ #include <openssl/ssl.h>
+ #include <openssl/pem.h>
+ #include <openssl/engine.h>
++#include <openssl/err.h>
+ #elif HAVE_CYASSL
+ #include <stdio.h>
+ #include <stdlib.h>
--- /dev/null
+--- a/configure.ac
++++ b/configure.ac
+@@ -397,7 +397,7 @@ AC_ARG_WITH([cyassl],
+ [AS_HELP_STRING([--with-cyassl], [enable support for cyassl])],[],[with_cyassl=no])
+
+ AS_IF([test x"$with_cyassl" != xno],
+- [AC_CHECK_LIB([cyassl], [CyaSSL_Init],
++ [AC_CHECK_LIB([cyassl], [wolfSSL_Init],
+ [AC_SUBST([LIBSSL], ["-lcyassl"])
+ AC_DEFINE([HAVE_CYASSL], [1],
+ [Define if you have cyassl])
+--- a/src/ippool.c
++++ b/src/ippool.c
+@@ -35,6 +35,7 @@ int ippool_print(int fd, struct ippool_t *this) {
+ char * sep = "-- %-15s ------------------------------------------------------------\n";
+
+ #define ERR 0
++#undef USED /* defined in <wolfssl/wolfcrypt/integer.h> */
+ #define USED 1
+ #define FREE 2
+ #define LIST 3
+--- a/src/md5.h
++++ b/src/md5.h
+@@ -35,7 +35,6 @@
+ #define MD5Update MD5_Update
+ #define MD5Final MD5_Final
+
+-typedef struct CYASSL_MD5_CTX MD5_CTX;
+ #else
+
+ struct MD5Context {
+--- a/src/ssl.c
++++ b/src/ssl.c
+@@ -131,7 +131,7 @@ _openssl_env_init(openssl_env *env, char *engine, int server) {
+ */
+ const long options = SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3 | SSL_OP_NO_COMPRESSION;
+ env->meth = SSLv23_method();
+- env->ctx = SSL_CTX_new(env->meth);
++ env->ctx = SSL_CTX_new((void *)env->meth);
+ SSL_CTX_set_options(env->ctx, options);
+ if (_options.sslciphers) {
+ SSL_CTX_set_cipher_list(env->ctx, _options.sslciphers);
+--- a/src/ssl.h
++++ b/src/ssl.h
+@@ -48,6 +48,8 @@ typedef struct {
+ #include <time.h>
+ #include <string.h>
+
++#define OPENSSL_NO_ENGINE
++#include <cyassl/options.h>
+ #include <cyassl/ssl.h>
+ #include <cyassl/openssl/bio.h>
+ #include <cyassl/openssl/crypto.h>
--- /dev/null
+--- a/src/redir.c
++++ b/src/redir.c
+@@ -3358,14 +3358,17 @@ int redir_main(struct redir_t *redir,
+ }
+
+ #define redir_memcopy(msgtype) \
++ do { \
+ redir_challenge(challenge); \
+ redir_chartohex(challenge, hexchal, REDIR_MD5LEN); \
+ msg.mtype = msgtype; \
+ memcpy(conn.s_state.redir.uamchal, challenge, REDIR_MD5LEN); \
+- if (_options.debug) syslog(LOG_DEBUG, "%s(%d): ---->>> resetting challenge: %s", __FUNCTION__, __LINE__, hexchal)
++ if (_options.debug) syslog(LOG_DEBUG, "%s(%d): ---->>> resetting challenge: %s", __FUNCTION__, __LINE__, hexchal); \
++ } while (0)
+
+ #ifdef USING_IPC_UNIX
+ #define redir_msg_send(msgopt) \
++ do { \
+ msg.mdata.opt = msgopt; \
+ memcpy(&msg.mdata.address, address, sizeof(msg.mdata.address)); \
+ memcpy(&msg.mdata.baddress, baddress, sizeof(msg.mdata.baddress)); \
+@@ -3375,9 +3378,11 @@ int redir_main(struct redir_t *redir,
+ syslog(LOG_ERR, "%s: write() failed! msgfd=%d type=%ld len=%d", \
+ strerror(errno), redir->msgfd, msg.mtype, (int)sizeof(msg.mdata)); \
+ return redir_main_exit(&socket, forked, rreq); \
+- }
++ } \
++ } while (0)
+ #else
+ #define redir_msg_send(msgopt) \
++ do { \
+ msg.mdata.opt = msgopt; \
+ memcpy(&msg.mdata.address, address, sizeof(msg.mdata.address)); \
+ memcpy(&msg.mdata.baddress, baddress, sizeof(msg.mdata.baddress)); \
+@@ -3387,7 +3392,8 @@ int redir_main(struct redir_t *redir,
+ syslog(LOG_ERR, "%s: msgsnd() failed! msgid=%d type=%ld len=%d", \
+ strerror(errno), redir->msgid, msg.mtype, (int)sizeof(msg.mdata)); \
+ return redir_main_exit(&socket, forked, rreq); \
+- }
++ } \
++ } while (0)
+ #endif
+
+ /*
PKG_VERSION:=2.7.8
# Release == build
# increase on changes of services files or tld_names.dat
-PKG_RELEASE:=6
+PKG_RELEASE:=11
PKG_LICENSE:=GPL-2.0
PKG_MAINTAINER:=
. /lib/functions/network.sh
# GLOBAL VARIABLES #
-VERSION="2.7.8-6"
+VERSION="2.7.8-11"
SECTION_ID="" # hold config's section name
VERBOSE=0 # default mode is log to console, but easily changed with parameter
MYPROG=$(basename $0) # my program call name
# $2 Name of Variable to store script to
# $3 Name of Variable to store service answer to
get_service_data() {
+ local __FILE __SERVICE __DATA __ANSWER __URL __SCRIPT __PIPE
+
[ $# -ne 3 ] && write_log 12 "Error calling 'get_service_data()' - wrong number of parameters"
__FILE="/etc/ddns/services" # IPv4
[ $use_ipv6 -ne 0 ] && __FILE="/etc/ddns/services_ipv6" # IPv6
# workaround with variables; pipe create subshell with no give back of variable content
- mkfifo pipe_$$
+ __PIPE="$ddns_rundir/pipe_$$"
+ mkfifo "$__PIPE"
+
# only grep without # or whitespace at linestart | remove "
-# grep -v -E "(^#|^[[:space:]]*$)" $__FILE | sed -e s/\"//g > pipe_$$ &
- sed '/^#/d; /^[ \t]*$/d; s/\"//g' $__FILE > pipe_$$ &
+ sed '/^#/d; /^[ \t]*$/d; s/\"//g' "$__FILE" > "$__PIPE" &
while read __SERVICE __DATA __ANSWER; do
if [ "$__SERVICE" = "$service_name" ]; then
eval "$1=\"$__URL\""
eval "$2=\"$__SCRIPT\""
eval "$3=\"$__ANSWER\""
- rm pipe_$$
+ rm "$__PIPE"
return 0
fi
- done < pipe_$$
- rm pipe_$$
+ done < "$__PIPE"
+ rm "$__PIPE"
eval "$1=\"\"" # no service match clear variables
eval "$2=\"\""
}
# extract IP address
if [ -n "$BIND_HOST" -o -n "$KNOT_HOST" ]; then # use BIND host or Knot host if installed
- __IPV4=$(cat $DATFILE | awk -F "address " '/has address/ {print $2; exit}' )
- __IPV6=$(cat $DATFILE | awk -F "address " '/has IPv6/ {print $2; exit}' )
+ __IPV4="$(awk -F "address " '/has address/ {print $2; exit}' "$DATFILE")"
+ __IPV6="$(awk -F "address " '/has IPv6/ {print $2; exit}' "$DATFILE")"
elif [ -n "$DRILL" ]; then # use drill if installed
- __IPV4=$(cat $DATFILE | awk '/^'"$lookup_host"'/ {print $5}' | grep -m 1 -o "$IPV4_REGEX")
- __IPV6=$(cat $DATFILE | awk '/^'"$lookup_host"'/ {print $5}' | grep -m 1 -o "$IPV6_REGEX")
+ __IPV4="$(awk '/^'"$__HOST"'/ {print $5}' "$DATFILE" | grep -m 1 -o "$IPV4_REGEX")"
+ __IPV6="$(awk '/^'"$__HOST"'/ {print $5}' "$DATFILE" | grep -m 1 -o "$IPV6_REGEX")"
elif [ -n "$HOSTIP" ]; then # use hostip if installed
- __IPV4=$(cat $DATFILE | grep -m 1 -o "$IPV4_REGEX")
- __IPV6=$(cat $DATFILE | grep -m 1 -o "$IPV6_REGEX")
+ __IPV4="$(grep -m 1 -o "$IPV4_REGEX" "$DATFILE")"
+ __IPV6="$(grep -m 1 -o "$IPV6_REGEX" "$DATFILE")"
else # use BusyBox nslookup
- __IPV4=$(cat $DATFILE | sed -ne "/^Name:/,\$ { s/^Address[0-9 ]\{0,\}: \($IPV4_REGEX\).*$/\\1/p }")
- __IPV6=$(cat $DATFILE | sed -ne "/^Name:/,\$ { s/^Address[0-9 ]\{0,\}: \($IPV6_REGEX\).*$/\\1/p }")
+ __IPV4="$(sed -ne "/^Name:/,\$ { s/^Address[0-9 ]\{0,\}: \($IPV4_REGEX\).*$/\\1/p }" "$DATFILE")"
+ __IPV6="$(sed -ne "/^Name:/,\$ { s/^Address[0-9 ]\{0,\}: \($IPV6_REGEX\).*$/\\1/p }" "$DATFILE")"
fi
}
# lets prefer GNU Wget because it does all for us - IPv4/IPv6/HTTPS/PROXY/force IP version
if [ -n "$WGET_SSL" -a $USE_CURL -eq 0 ]; then # except global option use_curl is set to "1"
- __PROG="$WGET_SSL -nv -t 1 -O $DATFILE -o $ERRFILE" # non_verbose no_retry outfile errfile
+ __PROG="$WGET_SSL --hsts-file=/tmp/.wget-hsts -nv -t 1 -O $DATFILE -o $ERRFILE" # non_verbose no_retry outfile errfile
# force network/ip to use for communication
if [ -n "$bind_network" ]; then
local __BINDIP
"ddo.jp" "http://free.ddo.jp/dnsupdate.php?dn=[DOMAIN]&pw=[PASSWORD]&ip=[IP]"
-"desec.io" "http://update.dedyn.io/?username=[USERNAME]&password=[PASSWORD]&hostname=[DOMAIN]&myipv4=[IP]" "good|nochg"
+"desec.io" "http://update.dedyn.io/update?username=[USERNAME]&password=[PASSWORD]&hostname=[DOMAIN]&myipv4=[IP]" "good|nochg"
"dhis.org" "http://[USERNAME]:[PASSWORD]@is.dhis.org/"
"he.net" "http://[DOMAIN]:[PASSWORD]@dyn.dns.he.net/nic/update?hostname=[DOMAIN]&myip=[IP]" "good|nochg"
+"inwx.de" "http://[USERNAME]:[PASSWORD]@dyndns.inwx.com/nic/update?myip=[IP]" "good|nochg"
+
"joker.com" "http://svc.joker.com/nic/update?username=[USERNAME]&password=[PASSWORD]&myip=[IP]&hostname=[DOMAIN]" "good|nochg"
"loopia.se" "http://[USERNAME]:[PASSWORD]@dns.loopia.se/XDynDNSServer/XDynDNS.php?system=custom&hostname=[DOMAIN]&myip=[IP]" "good|nochg"
# "ddnss.de" "http://[USERNAME]:[PASSWORD]@ip6.ddnss.de/upd.php?host=[DOMAIN]&ip6=[IP]" "good|nochg"
"ddnss.de" "http://ip6.ddnss.de/upd.php?user=[USERNAME]&pwd=[PASSWORD]&host=[DOMAIN]&ip6=[IP]" "good|nochg"
-"desec.io" "http://update.dedyn.io/?username=[USERNAME]&password=[PASSWORD]&hostname=[DOMAIN]&myipv6=[IP]" "good|nochg"
+"desec.io" "http://update.dedyn.io/update?username=[USERNAME]&password=[PASSWORD]&hostname=[DOMAIN]&myipv6=[IP]" "good|nochg"
"dhis.org" "http://[USERNAME]:[PASSWORD]@is.dhis.org/"
"duiadns.net" "http://ip.duiadns.net/dynamic.duia?host=[DOMAIN]&password=[PASSWORD]&ip6=[IP]"
"dyn.com" "http://[USERNAME]:[PASSWORD]@members.dyndns.org/nic/update?hostname=[DOMAIN]&myip=[IP]" "good|nochg"
+
"dyndns.org" "http://[USERNAME]:[PASSWORD]@members.dyndns.org/nic/update?hostname=[DOMAIN]&myip=[IP]" "good|nochg"
"dynu.com" "http://api.dynu.com/nic/update?hostname=[DOMAIN]&myipv6=[IP]&username=[USERNAME]&password=[PASSWORD]"
"he.net" "http://[DOMAIN]:[PASSWORD]@dyn.dns.he.net/nic/update?hostname=[DOMAIN]&myip=[IP]" "good|nochg"
+"inwx.de" "http://[USERNAME]:[PASSWORD]@dyndns.inwx.com/nic/update?myipv6=[IP]" "good|nochg"
+
"loopia.se" "http://[USERNAME]:[PASSWORD]@dns.loopia.se/XDynDNSServer/XDynDNS.php?system=custom&hostname=[DOMAIN]&myip=[IP]" "good|nochg"
"mydns.jp" "http://www.mydns.jp/directip.html?MID=[USERNAME]&PWD=[PASSWORD]&IPV6ADDR=[IP]"
# used variables
local __HOST __DOMAIN __TYPE __URLBASE __PRGBASE __RUNPROG __DATA __IPV6 __ZONEID __RECID __PROXIED
local __URLBASE="https://api.cloudflare.com/client/v4"
+local __TTL=120
# split __HOST __DOMAIN from $domain
# given data:
__PRGBASE="$__PRGBASE --header 'X-Auth-Email: $username' "
__PRGBASE="$__PRGBASE --header 'X-Auth-Key: $password' "
__PRGBASE="$__PRGBASE --header 'Content-Type: application/json' "
-# __PRGBASE="$__PRGBASE --header 'Accept: application/json' "
# read zone id for registered domain.TLD
__RUNPROG="$__PRGBASE --request GET '$__URLBASE/zones?name=$__DOMAIN'"
# use file to work around " needed for json
cat > $DATFILE << EOF
-{"id":"$__ZONEID","type":"$__TYPE","name":"$__HOST","content":"$__IP","proxied":$__PROXIED}
+{"id":"$__ZONEID","type":"$__TYPE","name":"$__HOST","content":"$__IP","ttl":$__TTL,"proxied":$__PROXIED}
EOF
# let's complete transfer command
--- /dev/null
+#!/bin/sh
+#
+# script to determine and return SLAAC ipv6 address using prefix from a locally configured interface and the MAC address of the device
+# (c) 2018 Keve Mueller <keve at keve dot hu>
+#
+# activated inside /etc/config/ddns by setting
+#
+# option ip_source 'script'
+# option ip_script '/usr/lib/ddns/slaac_sample.sh br-lan AA:BB:CC:DD:EE:FF'
+#
+# the script is executed (not parsed) inside get_local_ip() function
+# of /usr/lib/ddns/dynamic_dns_functions.sh
+#
+# useful when this box is the only DDNS client in the network and other clients use SLAAC
+# so no need to install ddns client on every "internal" box
+#
+# NB: this will not catch the actual IPV6 used by the host when it is configured to use temporary addresses
+
+#NB: we need a valid MAC address that is fully expanded with leading zeroes on all positions
+format_eui_64() {
+ local macaddr="$1"
+ echo ${macaddr:0:1}$(echo ${macaddr:1:1}|tr 0123456789abcdefABCDEF 23016745ab89efcd89efcd)${macaddr:3:2}:${macaddr:6:2}ff:fe${macaddr:9:2}:${macaddr:12:2}${macaddr:15:2}
+}
+
+# expand :: in an ipv6 address specification to the appropriate series of 0:
+# result will have 8 ipv6 fragments separated by single colon
+# NB: input must be a valid IPv6 address, e.g. ::1
+# NB: numbers are not prepended with leading zeroes
+expand_ipv6_colons() {
+ local ipv6=$1
+# we need :: to be in the middle, so prepend a 0 if the input starts with : and append 0 if it ends with it
+ if [ "${ipv6:0:1}" = ":" ]; then ipv6=0${ipv6}; fi
+ if [ "${ipv6: -1:1}" = ":" ]; then ipv6=${ipv6}0; fi
+# retain only the real colons
+ local colons=${ipv6//::|[0123456789abcdefABCDEF]/}
+# count them
+ local num_colons=${#colons}
+ local filler=":0:0:0:0:0:0:"
+# replace the :: with the appropriate substring from filler
+ local ipv6_x=${ipv6/::/${filler:0:(7-$num_colons)*2-1}}
+ echo $ipv6_x
+}
+
+# obtain the first ipv6 address of the device passed in $1
+addr_net=$(ip -6 -o addr show dev $1 scope global up | cut -d" " -f 7 | head -1)
+#addr_net=$1
+addr=${addr_net%/*}
+# TODO: we assume /64 subnet
+# get the first 64 bits of the address
+prefix=$(expand_ipv6_colons $addr | cut -d: -f -4)
+# compute the SLAAC 64 bits from the MAC
+suffix=$(format_eui_64 "$2")
+
+echo -n $prefix:$suffix
+exit 0
+
+#echo "Should never come here" >&2
+#exit 2
+
include $(TOPDIR)/rules.mk
PKG_NAME:=dhcpcd
-PKG_VERSION:=7.0.8
+PKG_VERSION:=7.2.2
PKG_RELEASE:=1
PKG_SOURCE_URL:=ftp://roy.marples.name/pub/dhcpcd \
http://roy.marples.name/downloads/dhcpcd
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_HASH:=96968e883369ab4afd11eba9dfd9bb109f5dfff65b2814ce6c432f36362dc9b5
+PKG_HASH:=3db7ff18cba9274da1d2176fb3c7cbe23926a8e58d5c8e244ad55c62d38ba09e
PKG_LICENSE:=BSD-2c
PKG_LICENSE_FILES:=
include $(TOPDIR)/rules.mk
PKG_NAME:=dmapd
-PKG_VERSION:=0.0.79
+PKG_VERSION:=0.0.82
PKG_RELEASE:=1
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://www.flyn.org/projects/dmapd
-PKG_HASH:=3edd9e31961751317d35c5d4b1f8c7f52b0d4968c8850fbb03da778c8fcb0ce0
+PKG_HASH:=7dc1a10d6c1363491492f159f7864d57194384b8007013088ca3b6c220e9e3f6
PKG_FIXUP:=autoreconf
-PKG_INSTALL:=2
+PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk
USERID:=dmapd=56:dmapd=56
endef
-define Package/dmapd/decription
+define Package/dmapd/description
Dmapd is a DMAP server
endef
+CONFIGURE_ARGS += \
+ --disable-check
+
define Package/dmapd/conffiles
/etc/dmapd.conf
endef
-TARGET_LDFLAGS+=\
- -Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
-
define Package/dmapd/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_DIR) $(1)/etc/init.d
+diff --git a/configure.ac b/configure.ac
+index d14e193..645b341 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -233,7 +233,13 @@ else
- AM_CONDITIONAL(USE_LIBDB, false)
- fi
+@@ -192,18 +192,18 @@ AM_CONDITIONAL(USE_GSTREAMER, test x"$HAVE_GSTREAMER" = "xyes")
+ AC_SUBST(GSTREAMER_CFLAGS)
+ AC_SUBST(GSTREAMER_LIBS)
--PKG_CHECK_MODULES([CHECK], [check >= 0.9.4],have_check=yes,have_check=no)
-+dnl Test if --enable-unit-test given
-+AC_ARG_ENABLE(unit-test, [AC_HELP_STRING([--enable-unit-test],[enable unit test])])
-+if test "x$enable_unit_test" = "xyes" ; then
-+ PKG_CHECK_MODULES([CHECK], [check >= 0.9.4],have_check=yes,have_check=no)
+-dnl Check for check
+-PKG_CHECK_MODULES(CHECK, check >= 0.9.4, HAVE_CHECK=yes, HAVE_CHECK=no)
+-
+-if test x"$HAVE_CHECK" = "xyes"; then
+- AC_DEFINE(HAVE_CHECK, 1, [Define if check support is enabled])
++dnl Check for check, which dmapd uses for its unit tests
++AC_ARG_ENABLE(check, [ --disable-check do not build check support], enable_check=$enableval, enable_check=yes)
++if test x$enable_check = xyes; then
++ PKG_CHECK_MODULES([CHECK], [check >= 0.9.4],have_check=yes,have_check=no)
++ AM_CONDITIONAL(USE_CHECK, test x"$have_check" = "xyes")
++ if test "x$have_check" = "xyes"; then
++ AC_DEFINE(HAVE_CHECK, 1, [Define if check support is enabled])
++ fi
+else
-+ have_check=no
-+fi
- AM_CONDITIONAL(HAVE_CHECK, test x"$have_check" = "xyes")
++ AM_CONDITIONAL(USE_CHECK, false)
+ fi
+-AM_CONDITIONAL(USE_CHECK, test x"$HAVE_CHECK" = "xyes")
+-
+-AC_SUBST(CHECK_CFLAGS)
+-AC_SUBST(CHECK_LIBS)
+-
AM_CONDITIONAL(FLYN, test "$FLYN")
+
+ AC_OUTPUT([
include $(TOPDIR)/rules.mk
PKG_NAME:=dnscrypt-proxy
-PKG_VERSION:=1.9.5
-PKG_RELEASE:=8
+PKG_SOURCE_DATE:=2018-11-22
+PKG_SOURCE_VERSION:=f61ca76a852cf56e399a458f9e002886b1b049f0
+PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_SOURCE_VERSION:=f71ca699aa3399f0c103c1f13ce1a86f9ce9638c
PKG_SOURCE_URL:=https://github.com/dyne/dnscrypt-proxy
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_MIRROR_HASH:=a3a52f7f85b390184695db688c9837bf51cf25c4cb2c1093bb315640dbd2a54f
-
-PKG_FIXUP:=autoreconf
-PKG_INSTALL:=1
+PKG_MIRROR_HASH:=1de8d9913aea4528920dbc6fcd4769a7ab70f7c1c73abba39e68e07376cbb395
PKG_MAINTAINER:=Damiano Renfer <damiano.renfer@gmail.com>
PKG_LICENSE:=ISC
+PKG_LICENSE_FILES:=COPYING
+
+PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
PKG_CONFIG_DEPENDS:= \
CONFIG_DNSCRYPT_ENABLE_PLUGINS
CATEGORY:=Network
SUBMENU:=IP Addresses and Names
URL:=https://github.com/dyne/dnscrypt-proxy
- MAINTAINER:=Damiano Renfer <damiano.renfer@gmail.com>
endef
define Package/dnscrypt-proxy
define Package/dnscrypt-proxy-resolvers
$(call Package/dnscrypt-proxy/Default)
TITLE:=Package with current list of dnscrypt-proxy resolvers
- VERSION:=$(PKG_VERSION)+git-20171001-2d43be3-$(PKG_RELEASE)
endef
define Package/dnscrypt-proxy-resolvers/description
--- /dev/null
+--- a/src/proxy/app.c
++++ b/src/proxy/app.c
+@@ -391,7 +391,7 @@ dnscrypt_proxy_main(int argc, char *argv[])
+ }
+ logger_noformat(&proxy_context, LOG_NOTICE, "Starting " PACKAGE_STRING);
+ sodium_mlock(&proxy_context, sizeof proxy_context);
+- randombytes_set_implementation(&randombytes_salsa20_implementation);
++ randombytes_set_implementation(&randombytes_internal_implementation);
+
+ #ifdef PLUGINS
+ if (plugin_support_context_load(app_context.dcps_context) != 0) {
--- /dev/null
+#
+# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/)
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=dnscrypt-proxy2
+PKG_VERSION:=2.0.25
+PKG_RELEASE:=1
+
+PKG_SOURCE:=dnscrypt-proxy-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/jedisct1/dnscrypt-proxy/tar.gz/$(PKG_VERSION)?
+PKG_HASH:=774696004c9e306e1723b4cbbe66a961128a335543d318d0786492ce69b906fa
+PKG_BUILD_DIR:=$(BUILD_DIR)/dnscrypt-proxy-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>
+PKG_LICENSE:=ISC
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_BUILD_DEPENDS:=golang/host
+PKG_BUILD_PARALLEL:=1
+PKG_USE_MIPS16:=0
+
+GO_PKG:=github.com/jedisct1/dnscrypt-proxy
+
+include $(INCLUDE_DIR)/package.mk
+include ../../lang/golang/golang-package.mk
+
+define Package/dnscrypt-proxy2
+ SECTION:=net
+ CATEGORY:=Network
+ TITLE:=Flexible DNS proxy with encrypted DNS protocols
+ URL:=https://github.com/jedisct1/dnscrypt-proxy
+ DEPENDS:=$(GO_ARCH_DEPENDS) +ca-bundle
+ CONFLICTS:=dnscrypt-proxy
+endef
+
+define Package/dnscrypt-proxy2/install
+ $(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR))
+
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/sbin/
+
+ $(INSTALL_DIR) $(1)/etc/dnscrypt-proxy2
+ $(INSTALL_CONF) $(PKG_BUILD_DIR)/dnscrypt-proxy/example-dnscrypt-proxy.toml $(1)/etc/dnscrypt-proxy2/dnscrypt-proxy.toml
+ $(INSTALL_CONF) ./files/blacklist.txt $(1)/etc/dnscrypt-proxy2/blacklist.txt
+
+ $(INSTALL_DIR) $(1)/etc/init.d
+ $(INSTALL_BIN) ./files/dnscrypt-proxy.init $(1)/etc/init.d/dnscrypt-proxy
+
+ sed -i "s/^listen_addresses = .*/listen_addresses = ['127.0.0.53:53']/" $(1)/etc/dnscrypt-proxy2/dnscrypt-proxy.toml
+ sed -i "s/^ # blacklist_file = 'blacklist.txt'/blacklist_file = 'blacklist.txt'/" $(1)/etc/dnscrypt-proxy2/dnscrypt-proxy.toml
+endef
+
+define Package/dnscrypt-proxy2/description
+ A flexible DNS proxy, with support for modern encrypted DNS protocols
+ such as DNSCrypt v2 and DNS-over-HTTPS.
+endef
+
+define Package/dnscrypt-proxy2/conffiles
+/etc/dnscrypt-proxy2/dnscrypt-proxy.toml
+endef
+
+define Package/golang-github-jedisct1-dnscrypt-proxy2-dev
+$(call Package/dnscrypt-proxy2)
+$(call GoPackage/GoSubMenu)
+ TITLE+= (source files)
+ PKGARCH:=all
+endef
+
+define Package/golang-github-jedisct1-dnscrypt-proxy2-dev/description
+$(call Package/dnscrypt-proxy2/description)
+
+ This package provides the source files for the client/bridge program.
+endef
+
+$(eval $(call GoBinPackage,dnscrypt-proxy2))
+$(eval $(call BuildPackage,dnscrypt-proxy2))
+$(eval $(call GoSrcPackage,golang-github-jedisct1-dnscrypt-proxy2-dev))
+$(eval $(call BuildPackage,golang-github-jedisct1-dnscrypt-proxy2-dev))
--- /dev/null
+
+###########################
+# Blacklist #
+###########################
+
+## Rules for name-based query blocking, one per line
+##
+## Example of valid patterns:
+##
+## ads.* | matches anything with an "ads." prefix
+## *.example.com | matches example.com and all names within that zone such as www.example.com
+## example.com | identical to the above
+## =example.com | block example.com but not *.example.com
+## *sex* | matches any name containing that substring
+## ads[0-9]* | matches "ads" followed by one or more digits
+## ads*.example* | *, ? and [] can be used anywhere, but prefixes/suffixes are faster
+
+ad.*
+ads.*
+banner.*
+banners.*
+creatives.*
+oas.*
+oascentral.*
+stats.*
+tag.*
+telemetry.*
+tracker.*
+*.local
+eth0.me
+*.workgroup
+
+*.test
+*.onion
+*.localhost
+*.local
+*.invalid
+*.bind
+*.lan
+*.internal
+*.intranet
+*.private
+*.workgroup
+
+*.10.in-addr.arpa
+*.16.172.in-addr.arpa
+*.168.192.in-addr.arpa
+*.254.169.in-addr.arpa
+*.d.f.ip6.arpa
+
+## Time-based rules
+
+# *.youtube.* @time-to-sleep
+# facebook.com @work
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+USE_PROCD=1
+
+# starts before dnsmasq starts
+START=18
+# stops before networking stops
+STOP=89
+
+PROG=/usr/sbin/dnscrypt-proxy
+CONFIGFILE=/etc/dnscrypt-proxy2/dnscrypt-proxy.toml
+
+start_service() {
+ procd_open_instance
+ procd_set_param command "$PROG" -config "$CONFIGFILE"
+ procd_set_param file "$CONFIGFILE"
+ procd_set_param stdout 1
+ procd_set_param stderr 1
+ procd_set_param respawn ${respawn_threshold:-3600} ${respawn_timeout:-5} ${respawn_retry:-5}
+ procd_close_instance
+}
--- /dev/null
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=dnsdist
+PKG_VERSION:=1.3.3
+PKG_RELEASE:=3
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=https://downloads.powerdns.com/releases/
+PKG_HASH:=9fb24f9032025955169f3c6e9b0a05b6aa9d6441ec47da08d22de1c1aa23e8cf
+
+PKG_MAINTAINER:=James Taylor <james@jtaylor.id.au>
+PKG_LICENSE:=GPL-2.0-only
+PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:powerdns:dnsdist
+
+PKG_INSTALL:=1
+
+PKG_CONFIG_DEPENDS:= \
+ CONFIG_DNSDIST_GNUTLS \
+ CONFIG_DNSDIST_OPENSSL
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/dnsdist/config
+comment "SSL support"
+
+choice
+ prompt "Selected SSL library"
+ default DNSDIST_OPENSSSL
+
+ config DNSDIST_OPENSSL
+ bool "OpenSSL"
+
+ config DNSDIST_GNUTLS
+ bool "GnuTLS"
+
+ config DNSDIST_NOSSL
+ bool "No SSL support"
+
+endchoice
+endef
+
+define Package/dnsdist
+ SECTION:=net
+ CATEGORY:=Network
+ SUBMENU:=IP Addresses and Names
+ TITLE:=dnsdist DNS-, DOS- and abuse-aware loadbalancer
+ DEPENDS:=+DNSDIST_OPENSSL:libopenssl +DNSDIST_GNUTLS:libgnutls +protobuf +re2 +libedit +libfstrm +libsodium +lua +boost +libnetsnmp +libatomic
+ URL:=https://dnsdist.org/
+endef
+
+define Package/dnsdist/description
+ dnsdist is a highly DNS-, DoS- and abuse-aware loadbalancer. Its goal in life
+ is to route traffic to the best server, delivering top performance to legitimate
+ users while shunting or blocking abusive traffic.
+endef
+
+define Package/dnsdist/conffiles
+/etc/dnsdist.conf
+/etc/config/dnsdist
+/etc/init.d/dnsdist
+endef
+
+CONFIGURE_ARGS+= \
+ --enable-dnscrypt \
+ $(if $(CONFIG_DNSDIST_NOSSL),,--enable-dns-over-tls) \
+ --enable-fstrm \
+ --enable-libsodium \
+ --enable-protobuf \
+ --enable-re2 \
+ --with-lua=lua \
+ --with-net-snmp \
+ $(if $(CONFIG_DNSDIST_GNUTLS),--enable,--disable)-gnutls \
+ $(if $(CONFIG_DNSDIST_OPENSSL),--enable,--disable)-libssl
+
+define Package/dnsdist/install
+ $(INSTALL_DIR) $(1)/etc
+ $(INSTALL_CONF) ./files/dnsdist.conf $(1)/etc/dnsdist.conf
+ $(INSTALL_DIR) $(1)/etc/config
+ $(INSTALL_CONF) ./files/dnsdist.config $(1)/etc/config/dnsdist
+ $(INSTALL_DIR) $(1)/etc/init.d
+ $(INSTALL_BIN) ./files/dnsdist.init $(1)/etc/init.d/dnsdist
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/dnsdist $(1)/usr/bin/
+endef
+
+$(eval $(call BuildPackage,dnsdist))
--- /dev/null
+config 'dnsdist' 'general'
+ option enabled '0'
--- /dev/null
+#!/bin/sh /etc/rc.common
+START=99
+
+USE_PROCD=1
+
+start_service() {
+ config_load dnsdist
+ local cfg=general
+ local enabled
+
+ config_get_bool enabled "$cfg" 'enabled' 1
+
+ [ $enabled -gt 0 ] || return 1
+
+ procd_open_instance
+ procd_set_param command dnsdist --supervised -C /etc/dnsdist.conf
+ procd_set_param file /etc/dnsdist.conf
+ procd_set_param respawn
+ procd_close_instance
+}
--- /dev/null
+From d73bc006c62e4340ab56dd4baba5bc8eb8e1db49 Mon Sep 17 00:00:00 2001
+From: Remi Gacogne <remi.gacogne@powerdns.com>
+Date: Mon, 13 May 2019 16:01:06 +0200
+Subject: [PATCH] SNMP: Use net-snmp-config --netsnmp-agent-libs instead of
+ --agent-libs
+
+---
+ m4/pdns_with_net_snmp.m4 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/m4/pdns_with_net_snmp.m4 b/m4/pdns_with_net_snmp.m4
+index 8040672e6c..2da80c75fc 100644
+--- a/m4/pdns_with_net_snmp.m4
++++ b/m4/pdns_with_net_snmp.m4
+@@ -10,7 +10,7 @@ AC_DEFUN([PDNS_WITH_NET_SNMP], [
+ AS_IF([test "x$with_net_snmp" != "xno"], [
+ AS_IF([test "x$with_net_snmp" = "xyes" -o "x$with_net_snmp" = "xauto"], [
+ AC_CHECK_PROG([NET_SNMP_CFLAGS], [net-snmp-config], [`net-snmp-config --cflags`])
+- AC_CHECK_PROG([NET_SNMP_LIBS], [net-snmp-config], [`net-snmp-config --agent-libs`])
++ AC_CHECK_PROG([NET_SNMP_LIBS], [net-snmp-config], [`net-snmp-config --netsnmp-agent-libs`])
+ AC_CHECK_DECLS([snmp_select_info2], [ : ], [ : ],
+ [AC_INCLUDES_DEFAULT
+ #include <net-snmp/net-snmp-config.h>
--- /dev/null
+--- a/m4/pdns_check_os.m4
++++ b/m4/pdns_check_os.m4
+@@ -35,16 +35,21 @@
+ AM_CONDITIONAL([HAVE_LINUX], [test "x$have_linux" = "xyes"])
+ AM_CONDITIONAL([HAVE_SOLARIS], [test "x$have_solaris" = "xyes"])
+
+- case "$host" in
+- mips* | powerpc-* )
+- AC_MSG_CHECKING([whether the linker accepts -latomic])
+- LDFLAGS="-latomic $LDFLAGS"
+- AC_LINK_IFELSE([m4_default([],[AC_LANG_PROGRAM()])],
+- [AC_MSG_RESULT([yes])],
+- [AC_MSG_ERROR([Unable to link against libatomic, cannot continue])]
+- )
+- ;;
+- esac
++ AC_MSG_CHECKING([whether -latomic is needed for __atomic builtins])
++ AC_LINK_IFELSE(
++ [AC_LANG_PROGRAM([[#include <stdint.h>]],
++ [[uint64_t val = 0; __atomic_add_fetch(&val, 1, __ATOMIC_RELAXED);]]
++ )],
++ [AC_MSG_RESULT([no])],
++ [LIBS="$LIBS -latomic"
++ AC_LINK_IFELSE(
++ [AC_LANG_PROGRAM([[#include <stdint.h>]],
++ [[uint64_t val = 0; __atomic_add_fetch(&val, 1, __ATOMIC_RELAXED);]]
++ )],
++ [AC_MSG_RESULT([yes])],
++ [AC_MSG_FAILURE([libatomic needed, but linking with -latomic failed, cannot continue])]
++ )]
++ )
+
+ AC_SUBST(THREADFLAGS)
+ AC_SUBST([DYNLINKFLAGS], [-export-dynamic])
--- /dev/null
+--- a/tcpiohandler.cc
++++ b/tcpiohandler.cc
+@@ -369,8 +369,10 @@ public:
+ }
+
+ if (s_users.fetch_add(1) == 0) {
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ ERR_load_crypto_strings();
+ OpenSSL_add_ssl_algorithms();
++#endif
+ openssl_thread_setup();
+
+ s_ticketsKeyIndex = SSL_CTX_get_ex_new_index(0, nullptr, nullptr, nullptr, nullptr);
+@@ -439,6 +441,7 @@ public:
+ d_tlsCtx.reset();
+
+ if (s_users.fetch_sub(1) == 1) {
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ ERR_free_strings();
+
+ EVP_cleanup();
+@@ -448,6 +451,7 @@ public:
+ CONF_modules_unload(1);
+
+ CRYPTO_cleanup_all_ex_data();
++#endif
+ openssl_thread_cleanup();
+ }
+ }
SUBMENU:=wireless
DEPENDS:=+lua +libubus-lua +libuci-lua +libubox-lua +luci-lib-nixio
TITLE:=Dynamic access point manager
+ PKGARCH:=all
endef
define Package/dynapoint/description
PKG_NAME:=e2guardian
PKG_VERSION:=3.2.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_LICENSE:=GPL-2.0
PKG_MAINTAINER:=Luka Perkov <luka@openwrt.org>
GROUPCONFIG="/tmp/e2guardian/e2guardianf1.conf"
validate_e2guardian_section() {
- uci_validate_section e2guardian e2guardian "${1}" \
+ uci_load_validate e2guardian e2guardian "$1" "$2" \
'accessdeniedaddress:string' \
'bannediplist:string' \
'contentscanexceptions:string' \
'weightedphrasemode:range(0,2)'
}
-start_service() {
-
- local accessdeniedaddress bannediplist contentscanexceptions contentscanner contentscannertimeout \
- createlistcachefiles custombannedflashfile custombannedimagefile deletedownloadedtempfiles \
- downloadmanager exceptioniplist filecachedir loglocation \
- filtergroups filtergroupslist filterip filterports forcequicksearch forwardedfor hexdecodecontent \
- initialtrickledelay ipcfilename ipipcfilename language languagedir logadblocks logchildprocesshandling \
- logclienthostnames logconnectionhandlingerrors logexceptionhits logfileformat loglevel loguseragent \
- maxagechildren maxchildren maxcontentfilecachescansize maxcontentfiltersize maxcontentramcachescansize \
- maxips maxsparechildren maxuploadsize minchildren minsparechildren nodaemon nologger \
- pcontimeout perroomdirectory phrasefiltermode prefercachedlists preforkchildren preservecase proxyexchange \
- proxyip proxyport proxytimeout recheckreplacedurls reverseaddresslookups reverseclientiplookups scancleancache \
- showweightedfound softrestart trickledelay urlcacheage urlcachenumber urlipcfilename usecustombannedflash \
- usecustombannedimage usexforwardedfor weightedphrasemode
-
- validate_e2guardian_section e2guardian || {
+start_e2guardian_instance() {
+
+ [ "$2" = 0 ] || {
echo "validation failed"
return 1
}
}
+start_service()
+{
+ validate_e2guardian_section e2guardian start_e2guardian_instance
+}
+
stop_service()
{
PID=`cat /tmp/e2guardian/e2guardian.pid`
include $(TOPDIR)/rules.mk
PKG_NAME:=fping
-PKG_VERSION:=4.1
+PKG_VERSION:=4.2
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://fping.org/dist/
-PKG_HASH:=2733e2a18cc2b5b935c4e3b5b84ccf2080c38043f1864d7c43326e8048ddab73
+PKG_SOURCE_URL:=https://fping.org/dist/
+PKG_HASH:=7d339674b6a95aae1d8ad487ff5056fd95b474c3650938268f6a905c3771b64a
PKG_MAINTAINER:=Nikil Mehta <nikil.mehta@gmail.com>
PKG_LICENSE:=BSD-4-Clause
SECTION:=net
CATEGORY:=Network
TITLE:=sends ICMP ECHO_REQUEST packets to network hosts
- URL:=http://fping.org/
+ URL:=https://fping.org/
endef
include $(TOPDIR)/rules.mk
PKG_NAME:=freeradius3
-PKG_VERSION:=release_3_0_17
+PKG_VERSION:=release_3_0_19
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/FreeRADIUS/freeradius-server/archive
-PKG_HASH:=5b2382f08c0d9d064298281c1fb8348fc13df76550ce7a5cfc47ea91361fad91
+PKG_HASH:=34c50ac47a683b13eae1a02f2d0263c0bd51a83f01b99c02c5fe25df07a1ee77
-PKG_MAINTAINER:=Lucile Quirion <lucile.quirion@savoirfairelinux.com>
+PKG_MAINTAINER:=
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYRIGHT LICENSE
define Package/freeradius3/Default
SECTION:=net
CATEGORY:=Network
- URL:=http://freeradius.org/
+ URL:=https://freeradius.org/
SUBMENU:=FreeRADIUS (version 3)
endef
define Package/freeradius3-common
$(call Package/freeradius3/Default)
TITLE:=common files
- DEPENDS:=+USE_GLIBC:libpthread +FREERADIUS3_OPENSSL:libopenssl +libcap +libpcap +libncurses +PACKAGE_libpcre:libpcre +libreadline +libtalloc
+ DEPENDS:=+USE_GLIBC:libpthread +FREERADIUS3_OPENSSL:libopenssl +libcap +libpcap +libncurses +libpcre +libreadline +libtalloc +libatomic
endef
define Package/freeradius3-default
/etc/freeradius3/mods-enabled/realm
endef
-# SQL support has not been ported
+define Package/freeradius3-mod-sql
+ $(call Package/freeradius3/Default)
+ DEPENDS:=freeradius3
+ TITLE:=Radius generic SQL front-end
+endef
+
+define Package/freeradius3-mod-sql/conffiles
+/etc/freeradius3/mods-available/sql
+endef
+
+define Package/freeradius3-mod-sql-mysql
+ $(call Package/freeradius3/Default)
+ DEPENDS:=freeradius3-mod-sql +libmysqlclient
+ TITLE:=Radius MySQL back-end drivers
+endef
+
+define Package/freeradius3-mod-sql-mysql/conffiles
+/etc/freeradius3/mods-config/sql/main/mysql
+endef
+
+define Package/freeradius3-mod-sql-null
+ $(call Package/freeradius3/Default)
+ DEPENDS:=freeradius3-mod-sql
+ TITLE:=Radius Dummy SQL back-end drivers
+endef
+
+define Package/freeradius3-mod-sql-postgresql
+ $(call Package/freeradius3/Default)
+ DEPENDS:=freeradius3-mod-sql +libpq
+ TITLE:=Radius PostgreSQL back-end drivers
+endef
+
+define Package/freeradius3-mod-sql-postgresql/conffiles
+/etc/freeradius3/mods-config/sql/main/postgresql
+endef
+
+define Package/freeradius3-mod-sql-sqlite
+ $(call Package/freeradius3/Default)
+ DEPENDS:=freeradius3-mod-sql +libsqlite3
+ TITLE:=Radius SQLite back-end drivers
+endef
+
+define Package/freeradius3-mod-sql-sqlite/conffiles
+/etc/freeradius3/mods-config/sql/main/sqlite
+endef
+
+define Package/freeradius3-mod-sqlcounter
+ $(call Package/freeradius3/Default)
+ DEPENDS:=+freeradius3-mod-sql
+ TITLE:=Packet counter using accounting records written into an SQL database
+endef
+
+define Package/freeradius3-mod-sqlcounter/conffiles
+/etc/freeradius3/mods-config/sql/counter
+/etc/freeradius3/mods-available/sqlcounter
+endef
+
+define Package/freeradius3-mod-sqlippool
+ $(call Package/freeradius3/Default)
+ DEPENDS:=+freeradius3-mod-sql
+ TITLE:=Radius SQL Based IP Pool module
+endef
+
+define Package/freeradius3-mod-sqlippool/conffiles
+/etc/freeradius3/mods-config/sql/ippool
+/etc/freeradius3/mods-config/sql/ippool-dhcp
+/etc/freeradius3/mods-available/dhcp_sqlippool
+/etc/freeradius3/mods-available/sqlippool
+endef
define Package/freeradius3-mod-radutmp
$(call Package/freeradius3/Default)
TITLE:=Misc. client utilities
endef
+# This is a workaround for a bug in configure.ac, that does not check
+# for the openss/rand.h header. Setting the macro is safe for openwrt,
+# and faster than rebuilding configure.
+# This has been fixed upstream in the 3.0.x branch, and should not be
+# needed in a future release.
+EXTRA_CFLAGS+= -DHAVE_OPENSSL_RAND_H
+
CONFIGURE_ARGS+= \
--libdir=/usr/lib/freeradius3 \
--libexecdir=/usr/lib/freeradius3 \
--without-rlm_ruby \
--without-rlm_securid \
--without-rlm_smsotp \
- --without-rlm_sql \
--without-rlm_sql_db2 \
--without-rlm_sql_firebird \
--without-rlm_sql_freetds \
--without-rlm_sql_iodbc \
- --without-rlm_sql_mysql \
--without-rlm_sql_oracle \
- --without-rlm_sql_postgresql \
- --without-rlm_sql_sqlite \
--without-rlm_sql_unixodbc \
- --without-rlm_sqlcounter \
- --without-rlm_sqlhpwippool \
- --without-rlm_sqlippool \
--without-rlm_unbound \
--without-rlm_yubikey \
+CONFIGURE_LIBS+= -latomic
+
PKG_DICTIONARIES:= \
compat \
freeradius freeradius.internal \
CONFIGURE_ARGS+= --without-rlm_eap_pwd
endif
+ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius3-mod-sql),)
+ CONFIGURE_ARGS+= --with-rlm_sql
+else
+ CONFIGURE_ARGS+= --without-rlm_sql
+endif
+
+ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius3-mod-sql-mysql),)
+ CONFIGURE_ARGS+= \
+ --with-rlm_sql_mysql \
+ --with-mysql-include-dir="$(STAGING_DIR)/usr/include/mysql"
+else
+ CONFIGURE_ARGS+= --without-rlm_sql_mysql
+endif
+
+ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius3-mod-sql-postgresql),)
+ CONFIGURE_ARGS+= --with-rlm_sql_postgresql
+else
+ CONFIGURE_ARGS+= --without-rlm_sql_postgresql
+endif
+
+ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius3-mod-sql-sqlite),)
+ CONFIGURE_ARGS+= --with-rlm_sql_sqlite
+else
+ CONFIGURE_ARGS+= --without-rlm_sql_sqlite
+endif
+
+ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius3-mod-sqlcounter),)
+ CONFIGURE_ARGS+= --with-rlm_sqlcounter
+else
+ CONFIGURE_ARGS+= --without-rlm_sqlcounter
+endif
+
+ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius3-mod-sqlippool),)
+ CONFIGURE_ARGS+= --with-rlm_sqlippool
+else
+ CONFIGURE_ARGS+= --without-rlm_sqlippool
+endif
+
ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius3-mod-radutmp),)
CONFIGURE_ARGS+= --with-rlm_radutmp
else
$(eval $(call BuildPlugin,freeradius3-mod-preprocess,rlm_preprocess,))
$(eval $(call BuildPlugin,freeradius3-mod-radutmp,rlm_radutmp,))
$(eval $(call BuildPlugin,freeradius3-mod-realm,rlm_realm,))
+$(eval $(call BuildPlugin,freeradius3-mod-sql,rlm_sql,))
+$(eval $(call BuildPlugin,freeradius3-mod-sql-mysql,rlm_sql_mysql,))
+$(eval $(call BuildPlugin,freeradius3-mod-sql-null,rlm_sql_null,))
+$(eval $(call BuildPlugin,freeradius3-mod-sql-postgresql,rlm_sql_postgresql,))
+$(eval $(call BuildPlugin,freeradius3-mod-sql-sqlite,rlm_sql_sqlite,))
+$(eval $(call BuildPlugin,freeradius3-mod-sqlcounter,rlm_sqlcounter,))
+$(eval $(call BuildPlugin,freeradius3-mod-sqlippool,rlm_sqlippool,))
$(eval $(call BuildPlugin,freeradius3-mod-unix,rlm_unix,))
$(eval $(call BuildPackage,freeradius3-utils))
mkdir -p /var/db/radacct
procd_open_instance
- procd_set_param command $PROG -f
+ procd_set_param command $PROG -s
procd_set_param env LD_LIBRARY_PATH=/usr/lib/freeradius3
[ -n "$IPADDR" ] && procd_append_param command -i $IPADDR
[ -n "$OPTIONS" ] && procd_append_param command $OPTIONS
return state;
}
-@@ -3151,7 +3151,7 @@ post_ca:
+@@ -3277,7 +3277,7 @@ post_ca:
/*
* Callbacks, etc. for session resumption.
*/
/*
* Cache sessions on disk if requested.
*/
-@@ -3221,7 +3221,7 @@ post_ca:
+@@ -3347,7 +3347,7 @@ post_ca:
/*
* Setup session caching
*/
--- /dev/null
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=frp
+PKG_VERSION:=0.27.0
+PKG_RELEASE:=2
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/fatedier/frp/tar.gz/v${PKG_VERSION}?
+PKG_HASH:=5d2efd5d924c7a7f84a9f2838de6ab9b7d5ca070ab243edd404a5ca80237607c
+
+PKG_MAINTAINER:=Richard Yu <yurichard3839@gmail.com>
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_BUILD_DEPENDS:=golang/host
+PKG_BUILD_PARALLEL:=1
+PKG_USE_MIPS16:=0
+
+GO_PKG:=github.com/fatedier/frp
+GO_PKG_BUILD_PKG:=github.com/fatedier/frp/cmd/...
+
+include $(INCLUDE_DIR)/package.mk
+include ../../lang/golang/golang-package.mk
+
+define Package/frp/template
+ SECTION:=net
+ CATEGORY:=Network
+ SUBMENU:=Web Servers/Proxies
+ TITLE:=frp - fast reverse proxy
+ URL:=https://github.com/fatedier/frp
+ DEPENDS:=$(GO_ARCH_DEPENDS)
+endef
+
+define Package/frpc
+ $(call Package/frp/template)
+ TITLE+= (client)
+endef
+
+define Package/frps
+ $(call Package/frp/template)
+ TITLE+= (server)
+endef
+
+define Package/frp/description
+ frp is a fast reverse proxy to help you expose a local server behind
+ a NAT or firewall to the internet.
+endef
+Package/frpc/description = $(Package/frp/description)
+Package/frps/description = $(Package/frp/description)
+
+define Package/frp/install
+ $(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR))
+
+ $(INSTALL_DIR) $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(2) $(1)/usr/bin/
+ $(INSTALL_DIR) $(1)/etc/frp/$(2).d/
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/conf/$(2)_full.ini $(1)/etc/frp/$(2).d/
+ $(INSTALL_DIR) $(1)/etc/config/
+ $(INSTALL_CONF) ./files/$(2).config $(1)/etc/config/$(2)
+ $(INSTALL_DIR) $(1)/etc/init.d/
+ $(INSTALL_BIN) ./files/$(2).init $(1)/etc/init.d/$(2)
+endef
+
+define Package/frpc/install
+ $(call Package/frp/install,$(1),frpc)
+endef
+
+define Package/frps/install
+ $(call Package/frp/install,$(1),frps)
+endef
+
+$(eval $(call GoBinPackage,frpc))
+$(eval $(call BuildPackage,frpc))
+$(eval $(call GoBinPackage,frps))
+$(eval $(call BuildPackage,frps))
--- /dev/null
+config init
+ option stdout 1
+ option stderr 1
+ option user frpc
+ option group frpc
+ option respawn 1
+# OS environments pass to frp for config file template, see
+# https://github.com/fatedier/frp#configuration-file-template
+# list env 'ENV_NAME=value'
+# Config files include in temporary config file.
+# list conf_inc '/etc/frp/frps.d/frpc_full.ini'
+
+config conf 'common'
+ option server_addr 127.0.0.1
+ option server_port 7000
+# List options with name="_" will be directly appended to config file
+# list _ '# Key-A=Value-A'
+
+config conf 'ssh'
+ option type tcp
+ option local_ip 127.0.0.1
+ option local_port 22
+ option remote_port 6000
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=99
+USE_PROCD=1
+
+NAME=frpc
+PROG=/usr/bin/$NAME
+
+_err() {
+ echo "$*" >&2
+ logger -p daemon.err -t "$NAME" "$*"
+}
+
+config_cb() {
+ [ $# -eq 0 ] && return
+
+ local type="$1"
+ local name="$2"
+ if [ "$type" = "conf" ]; then
+ echo "[$name]" >> "$conf_file"
+ option_cb() {
+ local option="$1"
+ local value="$2"
+ echo "$option = $value" >> "$conf_file"
+ }
+ list_cb() {
+ local name="$1"
+ local value="$2"
+ [ "$name" = "_" ] && echo "$value" >> "$conf_file"
+ }
+ else
+ [ "$type" = "init" ] && init_cfg="$name"
+ option_cb() { return 0; }
+ list_cb() { return 0; }
+ fi
+}
+
+start_service() {
+ local init_cfg=" "
+ local conf_file="/var/etc/$NAME.ini"
+
+ > "$conf_file"
+ config_load "$NAME"
+
+ local stdout stderr user group respawn env conf_inc
+ uci_validate_section "$NAME" init "$init_cfg" \
+ 'stdout:bool:1' \
+ 'stderr:bool:1' \
+ 'user:string' \
+ 'group:string' \
+ 'respawn:bool:1' \
+ 'env:list(string)' \
+ 'conf_inc:list(string)'
+
+ local err=$?
+ [ $err -ne 0 ] && {
+ _err "uci_validate_section returned $err"
+ return 1
+ }
+
+ [ -n "$conf_inc" ] && config_list_foreach "$init_cfg" conf_inc cat >> "$conf_file"
+
+ procd_open_instance
+ procd_set_param command "$PROG" -c "$conf_file"
+ procd_set_param stdout $stdout
+ procd_set_param stderr $stderr
+ [ -n "$user" ] && procd_set_param user "$user"
+ [ -n "$group" ] && procd_set_param group "$group"
+ [ $respawn -eq 1 ] && procd_set_param respawn
+ [ -n "$env" ] && config_list_foreach "$init_cfg" env "procd_append_param env"
+ procd_close_instance
+}
--- /dev/null
+config init
+ option stdout 1
+ option stderr 1
+ option user frps
+ option group frps
+ option respawn 1
+# OS environments pass to frp for config file template, see
+# https://github.com/fatedier/frp#configuration-file-template
+# list env 'ENV_NAME=value'
+# Config files include in temporary config file.
+# list conf_inc '/etc/frp/frps.d/frps_full.ini'
+
+config conf 'common'
+ option bind_port 7000
+# List options with name="_" will be directly appended to config file
+# list _ '# Key-A=Value-A'
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=99
+USE_PROCD=1
+
+NAME=frps
+PROG=/usr/bin/$NAME
+
+_err() {
+ echo "$*" >&2
+ logger -p daemon.err -t "$NAME" "$*"
+}
+
+config_cb() {
+ [ $# -eq 0 ] && return
+
+ local type="$1"
+ local name="$2"
+ if [ "$type" = "conf" ]; then
+ echo "[$name]" >> "$conf_file"
+ option_cb() {
+ local option="$1"
+ local value="$2"
+ echo "$option = $value" >> "$conf_file"
+ }
+ list_cb() {
+ local name="$1"
+ local value="$2"
+ [ "$name" = "_" ] && echo "$value" >> "$conf_file"
+ }
+ else
+ [ "$type" = "init" ] && init_cfg="$name"
+ option_cb() { return 0; }
+ list_cb() { return 0; }
+ fi
+}
+
+start_service() {
+ local init_cfg=" "
+ local conf_file="/var/etc/$NAME.ini"
+
+ > "$conf_file"
+ config_load "$NAME"
+
+ local stdout stderr user group respawn env conf_inc
+ uci_validate_section "$NAME" init "$init_cfg" \
+ 'stdout:bool:1' \
+ 'stderr:bool:1' \
+ 'user:string' \
+ 'group:string' \
+ 'respawn:bool:1' \
+ 'env:list(string)' \
+ 'conf_inc:list(string)'
+
+ local err=$?
+ [ $err -ne 0 ] && {
+ _err "uci_validate_section returned $err"
+ return 1
+ }
+
+ [ -n "$conf_inc" ] && config_list_foreach "$init_cfg" conf_inc cat >> "$conf_file"
+
+ procd_open_instance
+ procd_set_param command "$PROG" -c "$conf_file"
+ procd_set_param stdout $stdout
+ procd_set_param stderr $stderr
+ [ -n "$user" ] && procd_set_param user "$user"
+ [ -n "$group" ] && procd_set_param group "$group"
+ [ $respawn -eq 1 ] && procd_set_param respawn
+ [ -n "$env" ] && config_list_foreach "$init_cfg" env "procd_append_param env"
+ procd_close_instance
+}
include $(TOPDIR)/rules.mk
-PKG_LICENSE:=ASL-2.0
-PKG_MAINTAINER:=Mislav Novakovic <mislav.novakovic@sartura.hr>
-
PKG_NAME:=go-ethereum
-PKG_VERSION:=1.8.21
-PKG_RELEASE:=1
+PKG_VERSION:=1.8.27
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/ethereum/go-ethereum/tar.gz/v${PKG_VERSION}?
-PKG_HASH:=736028b4babd44d67a70a4a7883a06e97263449805c8c067b7dfd77e9fa94299
+PKG_HASH:=45d264106991d0e2a4c34ac5d6539fc9460c768fc70588ea38a25f467039ece8
+
+PKG_MAINTAINER:=Mislav Novakovic <mislav.novakovic@sartura.hr>
+PKG_LICENSE:=GPL-3 LGPL-3
+PKG_LICENSE_FILES:=COPYING COPYING.LESSER
PKG_BUILD_DEPENDS:=golang/host
PKG_BUILD_PARALLEL:=1
--- /dev/null
+From 39bd2609ca730b3b628003b3f938aed7d49132ab Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= <peterke@gmail.com>
+Date: Thu, 28 Feb 2019 14:53:44 +0200
+Subject: [PATCH] crypto/bn256/cloudflare: pull in upstream fix for Go 1.12 R18
+
+---
+ crypto/bn256/cloudflare/mul_arm64.h | 32 ++++++++++++++---------------
+ 1 file changed, 16 insertions(+), 16 deletions(-)
+
+diff --git a/crypto/bn256/cloudflare/mul_arm64.h b/crypto/bn256/cloudflare/mul_arm64.h
+index 75d52217311..d405eb8f728 100644
+--- a/crypto/bn256/cloudflare/mul_arm64.h
++++ b/crypto/bn256/cloudflare/mul_arm64.h
+@@ -12,7 +12,7 @@
+ UMULH R1, R8, c4 \
+ ADCS ZR, c4 \
+ \
+- MUL R2, R5, R25 \
++ MUL R2, R5, R1 \
+ UMULH R2, R5, R26 \
+ MUL R2, R6, R0 \
+ ADDS R0, R26 \
+@@ -24,13 +24,13 @@
+ ADCS R0, R29 \
+ UMULH R2, R8, c5 \
+ ADCS ZR, c5 \
+- ADDS R25, c1 \
++ ADDS R1, c1 \
+ ADCS R26, c2 \
+ ADCS R27, c3 \
+ ADCS R29, c4 \
+ ADCS ZR, c5 \
+ \
+- MUL R3, R5, R25 \
++ MUL R3, R5, R1 \
+ UMULH R3, R5, R26 \
+ MUL R3, R6, R0 \
+ ADDS R0, R26 \
+@@ -42,13 +42,13 @@
+ ADCS R0, R29 \
+ UMULH R3, R8, c6 \
+ ADCS ZR, c6 \
+- ADDS R25, c2 \
++ ADDS R1, c2 \
+ ADCS R26, c3 \
+ ADCS R27, c4 \
+ ADCS R29, c5 \
+ ADCS ZR, c6 \
+ \
+- MUL R4, R5, R25 \
++ MUL R4, R5, R1 \
+ UMULH R4, R5, R26 \
+ MUL R4, R6, R0 \
+ ADDS R0, R26 \
+@@ -60,7 +60,7 @@
+ ADCS R0, R29 \
+ UMULH R4, R8, c7 \
+ ADCS ZR, c7 \
+- ADDS R25, c3 \
++ ADDS R1, c3 \
+ ADCS R26, c4 \
+ ADCS R27, c5 \
+ ADCS R29, c6 \
+@@ -69,15 +69,15 @@
+ #define gfpReduce() \
+ \ // m = (T * N') mod R, store m in R1:R2:R3:R4
+ MOVD ·np+0(SB), R17 \
+- MOVD ·np+8(SB), R18 \
++ MOVD ·np+8(SB), R25 \
+ MOVD ·np+16(SB), R19 \
+ MOVD ·np+24(SB), R20 \
+ \
+ MUL R9, R17, R1 \
+ UMULH R9, R17, R2 \
+- MUL R9, R18, R0 \
++ MUL R9, R25, R0 \
+ ADDS R0, R2 \
+- UMULH R9, R18, R3 \
++ UMULH R9, R25, R3 \
+ MUL R9, R19, R0 \
+ ADCS R0, R3 \
+ UMULH R9, R19, R4 \
+@@ -86,9 +86,9 @@
+ \
+ MUL R10, R17, R21 \
+ UMULH R10, R17, R22 \
+- MUL R10, R18, R0 \
++ MUL R10, R25, R0 \
+ ADDS R0, R22 \
+- UMULH R10, R18, R23 \
++ UMULH R10, R25, R23 \
+ MUL R10, R19, R0 \
+ ADCS R0, R23 \
+ ADDS R21, R2 \
+@@ -97,7 +97,7 @@
+ \
+ MUL R11, R17, R21 \
+ UMULH R11, R17, R22 \
+- MUL R11, R18, R0 \
++ MUL R11, R25, R0 \
+ ADDS R0, R22 \
+ ADDS R21, R3 \
+ ADCS R22, R4 \
+@@ -107,19 +107,19 @@
+ \
+ \ // m * N
+ loadModulus(R5,R6,R7,R8) \
+- mul(R17,R18,R19,R20,R21,R22,R23,R24) \
++ mul(R17,R25,R19,R20,R21,R22,R23,R24) \
+ \
+ \ // Add the 512-bit intermediate to m*N
+- MOVD ZR, R25 \
++ MOVD ZR, R0 \
+ ADDS R9, R17 \
+- ADCS R10, R18 \
++ ADCS R10, R25 \
+ ADCS R11, R19 \
+ ADCS R12, R20 \
+ ADCS R13, R21 \
+ ADCS R14, R22 \
+ ADCS R15, R23 \
+ ADCS R16, R24 \
+- ADCS ZR, R25 \
++ ADCS ZR, R0 \
+ \
+ \ // Our output is R21:R22:R23:R24. Reduce mod p if necessary.
+ SUBS R5, R21, R10 \
include $(TOPDIR)/rules.mk
PKG_NAME:=git
-PKG_VERSION:=2.20.1
+PKG_VERSION:=2.22.0
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@KERNEL/software/scm/git/
-PKG_HASH:=9d2e91e2faa2ea61ba0a70201d023b36f54d846314591a002c610ea2ab81c3e9
+PKG_HASH:=159e4b599f8af4612e70b666600a3139541f8bacc18124daf2cbe8d1b934f29f
PKG_INSTALL:=1
PKG_FIXUP:=autoreconf
--- /dev/null
+From fa37195d8378ac958d1f9bd884b47bd73730040e Mon Sep 17 00:00:00 2001
+From: Rosen Penev <rosenp@gmail.com>
+Date: Thu, 27 Dec 2018 09:58:07 -0800
+Subject: [PATCH] imap-send: Fix compilation without deprecated OpenSSL APIs
+
+Initialization in OpenSSL has been deprecated in version 1.1. This makes
+compilation fail when deprecated APIs for OpenSSL are compile-time
+disabled.
+
+Signed-off-by: Rosen Penev <rosenp@gmail.com>
+---
+ imap-send.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/imap-send.c b/imap-send.c
+index b4eb886e2..877a4e368 100644
+--- a/imap-send.c
++++ b/imap-send.c
+@@ -284,8 +284,10 @@ static int ssl_socket_connect(struct imap_socket *sock, int use_tls_only, int ve
+ int ret;
+ X509 *cert;
+
++#if (OPENSSL_VERSION_NUMBER < 0x10100000L)
+ SSL_library_init();
+ SSL_load_error_strings();
++#endif
+
+ meth = SSLv23_method();
+ if (!meth) {
+--
+2.20.1
+
PKG_NAME:=gitolite
PKG_VERSION:=3.6.11
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_HASH:=2166a61b14de19e605b14f4a13a070fbfd5ecd247b6fd725108f111198a2c121
SECTION:=net
CATEGORY:=Network
SUBMENU:=Version Control Systems
- DEPENDS:=+perlbase-essential +perlbase-sys +perlbase-data +perlbase-digest +perlbase-env +perlbase-time +git +perlbase-findbin +perlbase-storable +perlbase-text +perlbase-getopt +perlbase-utf8 +openssh-keygen +openssh-server +openssh-moduli perl
+ DEPENDS:= \
+ +git \
+ +perlbase-essential \
+ +perlbase-data \
+ +perlbase-digest \
+ +perlbase-env \
+ +perlbase-findbin \
+ +perlbase-getopt \
+ +perlbase-mime \
+ +perlbase-storable \
+ +perlbase-sys \
+ +perlbase-text \
+ +perlbase-time \
+ +perlbase-utf8 \
+
TITLE:=Easy administration of git repositories
URL:=http://gitolite.com/gitolite
MAINTAINER:=Daniel Dickinson <cshored@thecshore.com>
endef
define Package/gitolite/description
- Gitolite is a system for managing access to git repositories. Note you will need to make
- sure dropbear does not interfere with OpenSSH as gitolite depends on feature not in
- dropbear (to my knowledge).
- See https://openwrt.org/docs/guide-user/services/gitolite for a guide on installation.
+ Gitolite is a system for managing access to git repositories.
+ See https://openwrt.org/docs/guide-user/services/gitolite for a guide
+ to installation.
+ NB: You will need an SSH server to use gitolite: dropbear is now sufficient
+ for gitolite purposes.
endef
define Package/gitolite/postinst
--- /dev/null
+Author: Daniel F. Dickinson <cshored@thecshore.com>
+Date: Sun Jan 27 01:04:25 2019 -0500
+
+gitolite: Eliminate the need for ssh-keygen dependency
+
+ Previously gitolite used ssh-keygen to generate fingerprints
+ from OpenSSH keys to ensure non-duplication of keys when
+ processing them to create / manage user ssh access to the
+ git repositories. This ends up depending on openssl,
+ which is large and unnecessary when we are running on an
+ embedded distro such as OpenWrt.
+
+Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
+Index: gitolite-3.6.11/src/lib/Gitolite/Common.pm
+===================================================================
+--- gitolite-3.6.11.orig/src/lib/Gitolite/Common.pm
++++ gitolite-3.6.11/src/lib/Gitolite/Common.pm
+@@ -26,6 +26,8 @@ package Gitolite::Common;
+ use Exporter 'import';
+ use File::Path qw(mkpath);
+ use File::Temp qw(tempfile);
++use MIME::Base64 qw(decode_base64);
++use Digest::SHA qw(sha256_base64);
+ use Carp qw(carp cluck croak confess);
+
+ use strict;
+@@ -352,43 +352,82 @@ sub logger_plus_stderr {
+ }
+
+ # ----------------------------------------------------------------------
++# Decode OpenSSH key
++# If the key cannot be parsed it will be undef
++# Returns (algorithm_name, algo_data1, algo_data2, ...)
++sub ssh_decode_key($) {
++ my $key = shift;
++ my $keydata = decode_base64($key);
++ my @keyparts = ();
++ my $partlen;
++ my $algorithm;
++ my $data;
++ my $pos = 0;
++ $partlen = unpack('N', substr $keydata, $pos, 4) or return undef;
++ $algorithm = substr $keydata, $pos + 4, $partlen or return undef;
++ $pos = $pos + 4 + $partlen;
++ while ( $pos <= length($keydata) ) {
++ $partlen = unpack('N', substr $keydata, $pos, 4) or last;
++ $data = unpack('s>*', substr $keydata, $pos + 4, 4) or last;
++ $pos = $pos + 4 + $partlen;
++ push @keyparts, $data;
++ }
++ return ( $algorithm, @keyparts );
++}
++
++# ----------------------------------------------------------------------
++# Parse OpenSSH line
++# If the file cannot be parsed it will be undef
++# Returns (restrictions, algorithm, PEMkey, comment)
++sub ssh_parse_line($) {
++ my $ssh_line = shift;
++ my @ssh_parts = split / /, $ssh_line, 5;
++ if (scalar @ssh_parts < 4) {
++ @ssh_parts = ('', @ssh_parts);
++ }
++ if (scalar @ssh_parts > 4) {
++ @ssh_parts = @ssh_parts[0,3]
++ }
++ if (scalar @ssh_parts < 4) {
++ @ssh_parts = undef;
++ }
++ return ( @ssh_parts );
++}
++
++# ----------------------------------------------------------------------
++# Get the SSH fingerprint of a line of text
++# If the fingerprint cannot be parsed, it will be undef
++# In a scalar context, returns the fingerprint
++# In a list context, returns (fingerprint, output) where output
++# is the parsed input line (less algorithm)
++sub ssh_fingerprint_line($) {
++ my $ssh_line = shift;
++ my @parsed_line = ssh_parse_line($ssh_line) or return undef;
++ my @ssh_parts = ssh_decode_key($parsed_line[2]) or return undef;
++ ( $parsed_line[1] eq $ssh_parts[0] ) or die "algorithm mismatch: $parsed_line[1] vs. $ssh_parts[0]";
++ my $fp = sha256_base64(join(' ', @ssh_parts[1,-1]));
++ return wantarray ? ($fp, join(' ', @ssh_parts[1,-1])) : $fp;
++}
++
++# ----------------------------------------------------------------------
+ # Get the SSH fingerprint of a file
+ # If the fingerprint cannot be parsed, it will be undef
+ # In a scalar context, returns the fingerprint
+ # In a list context, returns (fingerprint, output) where output
+-# is the raw output of the ssh-keygen command
+-sub ssh_fingerprint_file {
++# is the raw input line
++sub ssh_fingerprint_file($) {
+ my $in = shift;
+ -f $in or die "file not found: $in\n";
+ my $fh;
+- open( $fh, "ssh-keygen -l -f $in |" ) or die "could not fork: $!\n";
++ open( $fh, $in ) or die "could not open $in: $!\n";
+ my $output = <$fh>;
+ chomp $output;
+- # dbg("fp = $fp");
+ close $fh;
+ # Return a valid fingerprint or undef
+- my $fp = undef;
+- if($output =~ /((?:MD5:)?(?:[0-9a-f]{2}:){15}[0-9a-f]{2})/i or
+- $output =~ m{((?:RIPEMD|SHA)\d+:[A-Za-z0-9+/=]+)}i) {
+- $fp = $1;
+- }
++ my $fp = ssh_fingerprint_line($output);
+ return wantarray ? ($fp, $output) : $fp;
+ }
+
+-# Get the SSH fingerprint of a line of text
+-# If the fingerprint cannot be parsed, it will be undef
+-# In a scalar context, returns the fingerprint
+-# In a list context, returns (fingerprint, output) where output
+-# is the raw output of the ssh-keygen command
+-sub ssh_fingerprint_line {
+- my ( $fh, $fn ) = tempfile();
+- print $fh shift() . "\n";
+- close $fh;
+- my ($fp,$output) = ssh_fingerprint_file($fn);
+- unlink $fn;
+- return wantarray ? ($fp,$output) : $fp;
+-}
+-
+ # ----------------------------------------------------------------------
+
+ # bare-minimum subset of 'Tsh' (see github.com/sitaramc/tsh)
--- /dev/null
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=gnunet-fuse
+
+PKG_VERSION:=0.11.0
+PKG_RELEASE:=1
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=@GNU/gnunet
+PKG_HASH:=4ddf258336c9ce111fe71372aad0bfd792311f6d92753c29293b2cca1fe3bf16
+
+PKG_LICENSE:=GPL-3.0
+PKG_LICENSE_FILES:=COPYING
+PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
+
+PKG_BUILD_PARALLEL:=1
+PKG_FIXUP:=gettext-version
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/nls.mk
+
+define Package/gnunet-fuse
+ SECTION:=net
+ CATEGORY:=Network
+ TITLE:=GNUnet filesystem mount via FUSE
+ URL:=https://www.gnunet.org/
+ DEPENDS:=gnunet +gnunet-fs +libfuse
+endef
+
+CONFIGURE_ARGS+= \
+ --with-libiconv-prefix="$(ICONV_PREFIX)" \
+ --with-libintl-prefix="$(INTL_PREFIX)" \
+ --with-gnunet="$(STAGING_DIR)/usr"
+
+define Package/gnunet-fuse/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gnunet-fuse $(1)/usr/bin
+endef
+
+$(eval $(call BuildPackage,gnunet-fuse))
--- /dev/null
+--- a/src/fuse/mutex.c
++++ b/src/fuse/mutex.c
+@@ -71,8 +71,13 @@ GNUNET_mutex_create (int isRecursive)
+ if (isRecursive)
+ {
+ #if LINUX
++#if defined(__UCLIBC__) || defined(__GLIBC__)
+ GNUNET_assert (0 == pthread_mutexattr_setkind_np
+ (&attr, PTHREAD_MUTEX_RECURSIVE_NP));
++#else
++ GNUNET_assert (0 == pthread_mutexattr_settype
++ (&attr, PTHREAD_MUTEX_RECURSIVE));
++#endif
+ #elif SOMEBSD || GNUNET_freeBSD || GNUNET_freeBSD5
+ GNUNET_assert (0 == pthread_mutexattr_setkind_np
+ (&attr, PTHREAD_MUTEX_RECURSIVE));
+@@ -84,11 +89,16 @@ GNUNET_mutex_create (int isRecursive)
+ else
+ {
+ #if LINUX
++#if defined(__UCLIBC__) || defined(__GLIBC__)
+ GNUNET_assert (0 == pthread_mutexattr_setkind_np
+ (&attr, PTHREAD_MUTEX_ERRORCHECK_NP));
+ #else
+ GNUNET_assert (0 == pthread_mutexattr_settype
+ (&attr, PTHREAD_MUTEX_ERRORCHECK));
++#endif
++#else
++ GNUNET_assert (0 == pthread_mutexattr_settype
++ (&attr, PTHREAD_MUTEX_ERRORCHECK));
+ #endif
+ }
+ mut = GNUNET_new (struct GNUNET_Mutex);
--- /dev/null
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=gnunet-secushare
+
+PKG_SOURCE_VERSION:=81939cb93670efcee8e99884d10d2676b02edba9
+PKG_SOURCE_DATE:=20190228
+PKG_MIRROR_HASH:=64a0fb7ad6a515559360de71df85dde152f55a60585668f15114bc1f55cf2742
+PKG_RELEASE:=3
+PKG_SOURCE_URL:=https://gnunet.org/git/gnunet-secushare.git
+PKG_SOURCE_PROTO:=git
+PKG_LICENSE:=GPL-3.0
+PKG_LICENSE_FILES:=COPYING
+PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
+
+PKG_BUILD_PARALLEL:=1
+PKG_FIXUP:=gettext-version
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/nls.mk
+
+define Package/gnunet-secushare
+ SECTION:=net
+ CATEGORY:=Network
+ TITLE:=GNUnet Secushare
+ URL:=https://www.secushare.org/
+ DEPENDS:=gnunet +gnunet-reclaim
+endef
+
+define Package/gnunet-secushare-mysql
+ SECTION:=net
+ CATEGORY:=Network
+ TITLE:=GNUnet Secushare (mySQL)
+ URL:=https://www.secushare.org/
+ DEPENDS:=gnunet +gnunet-secushare +gnunet-mysql
+endef
+
+define Package/gnunet-secushare-pgsql
+ SECTION:=net
+ CATEGORY:=Network
+ TITLE:=GNUnet Secushare (PostgreSQL)
+ URL:=https://www.secushare.org/
+ DEPENDS:=gnunet +gnunet-secushare +gnunet-pgsql
+endef
+
+define Package/gnunet-secushare-sqlite
+ SECTION:=net
+ CATEGORY:=Network
+ TITLE:=GNUnet Secushare (SQLite)
+ URL:=https://www.secushare.org/
+ DEPENDS:=gnunet +gnunet-secushare +gnunet-sqlite
+endef
+
+
+CONFIGURE_ARGS+= \
+ --with-libiconv-prefix="$(ICONV_PREFIX)" \
+ --with-libintl-prefix="$(INTL_PREFIX)" \
+ --with-gnunet="$(STAGING_DIR)/usr" \
+ $(if $(CONFIG_PACKAGE_$(PKG_NAME)-mysql),--with-mysql="$(STAGING_DIR)/usr",--without-mysql) \
+ $(if $(CONFIG_PACKAGE_$(PKG_NAME)-pgsql),--with-postgresql="$(STAGING_DIR)/usr/bin/pg_config",--without-postgresql) \
+ $(if $(CONFIG_PACKAGE_$(PKG_NAME)-sqlite),--with-sqlite="$(STAGING_DIR)/usr",--without-sqlite) \
+ --enable-testing \
+ --disable-testruns \
+ --enable-experimental
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/include/gnunet $(1)/usr/lib/pkgconfig
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.{la,so}* $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc $(1)/usr/lib/pkgconfig
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/gnunet/*.h $(1)/usr/include/gnunet
+endef
+
+define Package/gnunet-secushare/install
+ $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib/gnunet $(1)/usr/lib/gnunet-secushare/libexec
+ $(INSTALL_DIR) $(1)/usr/share/gnunet-secushare/config.d $(1)/usr/share/gnunet/config.d
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gnunet-multicast $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gnunet-social $(1)/usr/bin
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/gnunet-secushare/libexec/* $(1)/usr/lib/gnunet-secushare/libexec/
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/gnunet-secushare/config.d/* $(1)/usr/share/gnunet-secushare/config.d
+endef
+
+define Package/gnunet-secushare-mysql/install
+ $(INSTALL_DIR) $(1)/usr/lib/gnunet
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/gnunet/libgnunet_plugin_psycstore_mysql.so* $(1)/usr/lib/gnunet/
+ $(INSTALL_DIR) $(1)/etc/uci-defaults
+ $(INSTALL_BIN) ./files/gnunet-secushare-mysql.defaults $(1)/etc/uci-defaults/gnunet-secushare-mysql
+endef
+
+define Package/gnunet-secushare-pgsql/install
+ $(INSTALL_DIR) $(1)/usr/lib/gnunet
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/gnunet/libgnunet_plugin_psycstore_postgres.so* $(1)/usr/lib/gnunet/
+ $(INSTALL_DIR) $(1)/etc/uci-defaults
+ $(INSTALL_BIN) ./files/gnunet-secushare-pgsql.defaults $(1)/etc/uci-defaults/gnunet-secushare-pgsql
+endef
+
+define Package/gnunet-secushare-sqlite/install
+ $(INSTALL_DIR) $(1)/usr/lib/gnunet
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/gnunet/libgnunet_plugin_psycstore_sqlite.so* $(1)/usr/lib/gnunet/
+ $(INSTALL_DIR) $(1)/etc/uci-defaults
+ $(INSTALL_BIN) ./files/gnunet-secushare-sqlite.defaults $(1)/etc/uci-defaults/gnunet-secushare-sqlite
+endef
+
+$(eval $(call BuildPackage,gnunet-secushare))
+$(eval $(call BuildPackage,gnunet-secushare-mysql))
+$(eval $(call BuildPackage,gnunet-secushare-pgsql))
+$(eval $(call BuildPackage,gnunet-secushare-sqlite))
--- /dev/null
+#!/bin/sh
+
+uci -q get gnunet.psycstore || uci set gnunet.psycstore=gnunet-config
+
+uci -q batch <<EOF
+ set gnunet.psycstore.DATABASE=mysql
+ commit gnunet
+EOF
--- /dev/null
+#!/bin/sh
+
+uci -q get gnunet.psycstore || uci set gnunet.psycstore=gnunet-config
+
+uci -q batch <<EOF
+ set gnunet.psycstore.DATABASE=postgres
+ commit gnunet
+EOF
--- /dev/null
+#!/bin/sh
+
+uci -q get gnunet.psycstore || uci set gnunet.psycstore=gnunet-config
+
+uci -q batch <<EOF
+ del gnunet.psycstore_sqlite
+ set gnunet.psycstore_sqlite=gnunet-config
+ set gnunet.psycstore_sqlite.FILENAME=/etc/gnunet/psycstore.sqlite
+ set gnunet.psycstore.DATABASE=sqlite
+ commit gnunet
+EOF
include $(TOPDIR)/rules.mk
PKG_NAME:=gnunet
-PKG_SOURCE_VERSION:=d80214febe4e0e4cc64dddc74e990b3c5ca8a5df
-PKG_MIRROR_HASH:=12d6f8e8c9e17217db16fbb89d023f50dcf54b8ec1959c4a248880be9b11ef3c
-PKG_VERSION:=0.10.2-git-20190128-$(PKG_SOURCE_VERSION)
+PKG_VERSION:=0.11.5
PKG_RELEASE:=2
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_URL:=https://gnunet.org/git/gnunet.git
-PKG_SOURCE_PROTO:=git
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=@GNU/gnunet
+PKG_HASH:=98e0355ff0627bf88112b3b92a7522e98c0ae6071fc45efda5a33daed28199b3
PKG_LICENSE:=AGPL-3.0
PKG_LICENSE_FILES:=COPYING
define Package/gnunet
$(call Package/gnunet/Default)
TITLE+= - a peer-to-peer framework focusing on security
- DEPENDS:=+libgcrypt +libgpg-error +libidn2 +libltdl +libunistring +librt +zlib \
- $(ICONV_DEPENDS) $(INTL_DEPENDS)
+ DEPENDS:=+libatomic +libgcrypt +libgpg-error +libidn2 +libltdl +libunistring \
+ +librt +zlib $(ICONV_DEPENDS) $(INTL_DEPENDS)
USERID:=gnunet=958:gnunet=958
MENU:=1
endef
( if [ "$(PLUGIN_$(1))" ]; then \
$(INSTALL_DIR) $$(1)/usr/lib/gnunet ; \
for plug in $(PLUGIN_$(1)); do \
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/gnunet/libgnunet_plugin_$$$$$$$$plug*.so $$(1)/usr/lib/gnunet ; \
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/gnunet/libgnunet_plugin_$$$$$$$$plug*.so $$(1)/usr/lib/gnunet ; \
done \
fi )
$(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib/gnunet/libexec
$(INSTALL_DIR) $(1)/usr/share/gnunet/config.d $(1)/usr/share/gnunet/hellos
- ( for bin in arm ats cadet core config ecc identity nat nat-auto nat-server nse \
- peerinfo revocation scalarproduct scrypt statistics transport uri; do \
+ ( for bin in arm ats ats-new cadet core config ecc identity nat nat-auto nat-server nse \
+ peerinfo peerstore revocation scalarproduct scrypt statistics transport uri; do \
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gnunet-$$$$bin $(1)/usr/bin/ ; \
done )
- ( for lib in arm ats block blockgroup cadet core datacache dht \
- dns dnsparser fragmentation friends hello identity natauto natnew nse \
- nt peerinfo regexblock regex revocation scalarproduct set \
- statistics transport util; do \
+ ( for lib in arm ats atsapplication atstransport block blockgroup cadet \
+ core datacache dht dns dnsparser fragmentation friends hello \
+ identity natauto natnew nse nt peerinfo peerstore regexblock regex revocation \
+ scalarproduct set statistics transport transportaddress transportapplication \
+ transportcommunicator transportcore transportmonitor util; do \
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libgnunet$$$$lib.so* $(1)/usr/lib/ ; \
done )
- ( for plug in ats_proportional block_dht block_regex block_revocation transport_unix; do \
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/gnunet/libgnunet_plugin_$$$$plug*.so $(1)/usr/lib/gnunet ; \
+ ( for plug in ats_proportional ats2_simple block_dht block_regex block_revocation transport_unix; do \
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/gnunet/libgnunet_plugin_$$$$plug*.so $(1)/usr/lib/gnunet ; \
done )
( for lex in daemon-topology helper-nat-client \
- helper-nat-server service-arm service-ats service-cadet \
+ helper-nat-server service-arm service-ats service-ats-new service-cadet \
service-core service-dht service-identity service-nat service-nat-auto \
- service-nse service-peerinfo service-regex \
+ service-nse service-peerinfo service-peerstore service-regex \
service-revocation service-scalarproduct-alice \
service-scalarproduct-bob service-scalarproduct-ecc-alice \
service-scalarproduct-ecc-bob service-set service-statistics \
- service-transport; do \
+ service-transport timeout; do \
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/gnunet/libexec/gnunet-$$$$lex $(1)/usr/lib/gnunet/libexec ; \
done )
- ( for conf in arm ats cadet core datacache dht identity identity-provider \
- nat nat-auto nse peerinfo regex revocation scalarproduct \
- set statistics topology transport util; do \
+ ( for conf in arm ats cadet communicator-unix core datacache dht identity \
+ identity-provider nat nat-auto nse peerinfo peerstore regex revocation \
+ scalarproduct set statistics topology transport util; do \
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/gnunet/config.d/$$$$conf.conf $(1)/usr/share/gnunet/config.d ; \
done )
$(CP) $(PKG_INSTALL_DIR)/usr/include/gnunet/*.h $(1)/usr/include/gnunet
endef
+BIN_auction:=auction-create auction-info auction-join
+LIBEXEC_auction:=service-auction
+CONF_auction:=auction
+DEPENDS_auction:=+gnunet-reclaim +jansson
+
DEPENDS_conversation:=+gnunet-gns +libgst1app +libgst1audio +libgstreamer1 +glib2 +pulseaudio-daemon +libopus +libogg
BIN_conversation:=conversation conversation-test
LIB_conversation:=conversation microphone speaker
PLUGIN_transport-wlan:=transport_wlan
LIBEXEC_transport-wlan:=helper-transport-wlan
-PLUGIN_transport-xt:=transport_xt
-
-PLUGIN_transport-xu:=transport_xu
DEPENDS_experiments:=+libglpk
PLUGIN_experiments:=ats_mlp ats_ril
LIBEXEC_dv:=service-dv
CONF_dv:=dv
-DEPENDS_fs:=+gnunet-datastore +gnunet-peerstore +libextractor
+DEPENDS_fs:=+gnunet-datastore +libextractor
BIN_fs:=auto-share directory download fs publish unindex search
LIB_fs:=fs
PLUGIN_fs:=block_fs
DEPENDS_gns:=+gnunet-vpn +iptables-mod-extra
USERID_gns:=gnunet=958:gnunetdns=452
-BIN_gns:=gns gns-import.sh namecache namestore resolver zoneimport
+BIN_gns:=gns gns-import.sh namecache namestore resolver zoneimport
LIB_gns:=gns gnsrecord namecache namestore
PLUGIN_gns:=block_dns block_gns gnsrecord_conversation gnsrecord_dns gnsrecord_gns
LIBEXEC_gns:=dns2gns helper-dns service-dns service-gns service-namecache service-namestore service-resolver service-zonemaster
LIBEXEC_datastore:=service-datastore
CONF_datastore:=datastore
-BIN_peerstore:=peerstore
-LIB_peerstore:=peerstore
-LIBEXEC_peerstore:=service-peerstore
-CONF_peerstore:=peerstore
-DEPENDS_rest:=+gnunet-gns +gnunet-social +libmicrohttpd-ssl +jansson
+DEPENDS_reclaim:=+gnunet-gns +gnunet-sqlite +libpbc +libgabe
+BIN_reclaim:=credential reclaim
+LIB_reclaim:=consensus credential abe reclaim reclaimattribute secretsharing
+LIBEXEC_reclaim:=service-consensus service-credential service-reclaim service-secretsharing
+CONF_reclaim:=consensus credential reclaim secretsharing
+PLUGIN_reclaim:=block_consensus gnsrecord_credential gnsrecord_reclaim reclaim_attribute_gnuid
+
+DEPENDS_rest:=+gnunet-gns +gnunet-reclaim +libmicrohttpd-ssl +jansson
LIB_rest:=rest json
PLUGIN_rest:=rest_copying rest_gns rest_identity rest_namestore rest_peerinfo rest_openid_connect rest_reclaim
LIBEXEC_rest:=rest-server
LIBEXEC_rps:=service-rps
CONF_rps:=rps
-DEPENDS_social:=+gnunet-gns +libmicrohttpd-ssl +jansson +libpbc +libgabe
-BIN_social:=credential identity-token multicast reclaim social
-LIB_social:=abe consensus credential identityprovider multicast psyc psycstore psycutil reclaim reclaimattribute secretsharing social
-LIBEXEC_social:=service-consensus service-credential service-evil-consensus service-identity-provider service-multicast service-psyc service-psycstore service-reclaim service-secretsharing service-social
-CONF_social:=consensus credential multicast psyc psycstore reclaim secretsharing social
-PLUGIN_social:=block_consensus gnsrecord_credential gnsrecord_reclaim reclaim_attribute_gnuid
-
PLUGIN_dhtcache-heap:=datacache_heap
CONFLICTS_dhtcache-heap:=gnunet-dhtcache-pgsql gnunet-dhtcache-sqlite
DEPENDS_gns-flat:=+gnunet-gns
PLUGIN_gns-flat:=namecache_flat namestore_heap
-DEPENDS_peerstore-flat:=+gnunet-peerstore
PLUGIN_peerstore-flat:=peerstore_flat
DEPENDS_fs-heap:=+gnunet-datastore
DEPENDS_mysql:=+libmysqlclient
LIB_mysql:=mysql my
-DEPENDS_social-mysql:=+gnunet-mysql +gnunet-social
-PLUGIN_social-mysql:=psycstore_mysql
-CONFLICTS_social-mysql:=gnunet-social-sqlite
DEPENDS_fs-mysql:=+gnunet-mysql +gnunet-datastore
PLUGIN_fs-mysql:=datastore_mysql
PLUGIN_gns-pgsql:=namecache_postgres namestore_postgres
CONFLICTS_gns-pgsql:=gnunet-gns-sqlite gnunet-gns-flat
-DEPENDS_social-pgsql:=+gnunet-pgsql +gnunet-social
-PLUGIN_social-pgsql:=psycstore_postgres
-CONFLICTS_social-pgsql:=gnunet-social-sqlite gnunet-social-mysql
DEPENDS_sqlite:=+libsqlite3
LIB_sqlite:=sq
PLUGIN_gns-sqlite:=namecache_sqlite namestore_sqlite
CONFLICTS_gns-sqlite:=gnunet-gns-flat
-DEPENDS_peerstore-sqlite:=+gnunet-peerstore +gnunet-sqlite
+DEPENDS_peerstore-sqlite:=+gnunet-sqlite
PLUGIN_peerstore-sqlite:=peerstore_sqlite
CONFLICTS_peerstore-sqlite:=gnunet-peerstore-flat
DEPENDS_fs-sqlite:=+gnunet-datastore +gnunet-sqlite
PLUGIN_fs-sqlite:=datastore_sqlite
-DEPENDS_social-sqlite:=+gnunet-social +gnunet-sqlite
-PLUGIN_social-sqlite:=psycstore_sqlite reclaim_sqlite
DEPENDS_utils:=+certtool +openssl-util
$(eval $(call PostInstFixSUIDPerms,gnunet-vpn))
$(eval $(call BuildPackage,gnunet))
+$(eval $(call BuildComponent,auction,auction components,))
$(eval $(call BuildComponent,conversation,conversation component,))
$(eval $(call BuildComponent,curl,cURL wrapper component,))
$(eval $(call BuildComponent,datastore,data storage components,))
$(eval $(call BuildComponent,gns,name resolution components,y))
$(eval $(call BuildComponent,gns-proxy,gns-proxy component,))
$(eval $(call BuildComponent,hostlist,HTTP bootstrap hostlist client and server,y))
-$(eval $(call BuildComponent,peerstore,peerstore local persistency component,))
+$(eval $(call BuildComponent,reclaim,reclaim identity-provider subsystem,))
$(eval $(call BuildComponent,rest,REST interface,))
$(eval $(call BuildComponent,rps,RPS routing component,y))
-$(eval $(call BuildComponent,social,social components,))
$(eval $(call BuildComponent,namestore-fcfsd,first-come-first-serve registration server,))
$(eval $(call BuildComponent,dhtcache-heap,heap-based dhtcache plugin,y))
$(eval $(call BuildComponent,fs-heap,heap-based filesharing plugin,))
$(eval $(call BuildComponent,peerstore-flat,flat storage peerstore plugin,))
$(eval $(call BuildComponent,mysql,mySQL backend,))
$(eval $(call BuildComponent,fs-mysql,mySQL filesharing plugins,))
-$(eval $(call BuildComponent,social-mysql,mySQL social plugins,))
$(eval $(call BuildComponent,pgsql,PostgreSQL backend,))
$(eval $(call BuildComponent,dhtcache-pgsql,PostgreSQL dhtcache plugin,))
$(eval $(call BuildComponent,fs-pgsql,PostgreSQL filesharing plugin,))
$(eval $(call BuildComponent,gns-pgsql,PostgreSQL GNS plugins,))
-$(eval $(call BuildComponent,social-pgsql,PostgreSQL social plugin,))
$(eval $(call BuildComponent,sqlite,libsqlite3 backend,))
$(eval $(call BuildComponent,dhtcache-sqlite,libsqlite3 dhtcache plugin,))
$(eval $(call BuildComponent,fs-sqlite,libsqlite3 filesharing plugin,))
$(eval $(call BuildComponent,gns-sqlite,libsqlite3 gns plugins,))
$(eval $(call BuildComponent,peerstore-sqlite,libsqlite3 peerstore plugin,))
-$(eval $(call BuildComponent,social-sqlite,libsqlite3 social plugins,))
$(eval $(call BuildComponent,transport-bluetooth,bluetooth transport,))
$(eval $(call BuildComponent,transport-http_client,HTTP/HTTPS client transport,y))
$(eval $(call BuildComponent,transport-http_server,HTTP/HTTPS server transport,))
$(eval $(call BuildComponent,transport-tcp,TCP transport,y))
$(eval $(call BuildComponent,transport-udp,UDP transport,y))
$(eval $(call BuildComponent,transport-wlan,WLAN transport,y))
-$(eval $(call BuildComponent,transport-xt,xt transport,))
-$(eval $(call BuildComponent,transport-xu,xu transport,))
$(eval $(call BuildComponent,utils,administration utililties,))
$(eval $(call BuildComponent,vpn,vpn components,y))
+++ /dev/null
-#!/bin/sh
-
-uci -q get gnunet.psycstore || uci set gnunet.psycstore=gnunet-config
-
-uci -q batch <<EOF
- set gnunet.psycstore.DATABASE=postgres
- commit gnunet
-EOF
+++ /dev/null
-#!/bin/sh
-
-uci -q get gnunet.psycstore || uci set gnunet.psycstore=gnunet-config
-
-uci -q batch <<EOF
- del gnunet.psycstore_sqlite
- set gnunet.psycstore_sqlite=gnunet-config
- set gnunet.psycstore_sqlite.FILENAME=/etc/gnunet/psycstore.sqlite
- set gnunet.psycstore.DATABASE=sqlite
- commit gnunet
-EOF
include $(TOPDIR)/rules.mk
PKG_NAME:=gnurl
-PKG_VERSION:=7.63.0
+PKG_VERSION:=7.65.1
PKG_RELEASE:=1
PKG_SOURCE_URL:=https://ftp.gnu.org/gnu/gnunet
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=d435d9e35d6d1afda3a2a66db9f364d18a9f199d5f7b70e7296cd863bcf4c497
+PKG_HASH:=37bb87993f9219f4c76195031f1b0311afde157a1b852d54f570e3195ad7af01
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=COPYING
include $(TOPDIR)/rules.mk
PKG_NAME:=haproxy
-PKG_VERSION:=1.8.17
-PKG_RELEASE:=2
-
-PKG_SOURCE:=haproxy-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://www.haproxy.org/download/1.8/src/
-PKG_HASH:=7b789b177875afdd5ddeff058e7efde73aa895dc2dcf728b464358635ae3948e
+PKG_VERSION:=2.0.1
+PKG_RELEASE:=1
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://www.haproxy.org/download/2.0/src
+PKG_HASH:=9975c475ba6f19aac4b665d8705f7b9f7911df7fc316ba7b9efd6fe263181eb1
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
-PKG_LICENSE:=GPL-2.0
-MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>, \
+
+PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>, \
Christian Lachner <gladiac@gmail.com>
+PKG_LICENSE:=GPL-2.0-only
+PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
endef
define Package/haproxy
- DEPENDS+= +libpcre +libltdl +zlib +libpthread +libopenssl +libncursesw +libreadline +libatomic
+ DEPENDS+= +libpcre +libltdl +zlib +libpthread +libopenssl +libncurses +libreadline +libatomic
TITLE+= (with SSL support)
VARIANT:=ssl
$(call Package/haproxy/Default)
This package is built with SSL and LUA support.
endef
-define Package/haproxy/config
- select CONFIG_OPENSSL_WITH_DEPRECATED
- $(call Package/haproxy/Default/config)
-endef
-
define Package/haproxy-nossl
TITLE+= (without SSL support)
VARIANT:=nossl
ENABLE_REGPARM:=n
ifeq ($(CONFIG_TARGET_x86),y)
- ENABLE_REGPARM:=y
+ ENABLE_REGPARM:=y
endif
-LINUX_TARGET:=linux2628
+ifeq ($(CONFIG_USE_UCLIBC),y)
+ LINUX_TARGET:=linux-uclibc
+else
+ LINUX_TARGET:=linux-glibc
+endif
ifeq ($(BUILD_VARIANT),ssl)
ADDON+=USE_OPENSSL=1
CC="$(TARGET_CC)" \
PCREDIR="$(STAGING_DIR)/usr/" \
SMALL_OPTS="-DBUFSIZE=16384 -DMAXREWRITE=1030 -DSYSTEM_MAXCONN=165530" \
- USE_LINUX_TPROXY=1 USE_LINUX_SPLICE=1 USE_TFO=1 \
- USE_ZLIB=yes USE_PCRE=1 USE_PCRE_JIT=1 USE_GETADDRINFO=1 \
+ USE_LINUX_TPROXY=1 USE_LINUX_SPLICE=1 USE_TFO=1 USE_NS=1 \
+ USE_ZLIB=1 USE_PCRE=1 USE_PCRE_JIT=1 USE_GETADDRINFO=1 \
+ USE_THREAD=1 USE_PTHREAD_PSHARED=1 \
VERSION="$(PKG_VERSION)" SUBVERS="-$(PKG_RELEASE)" \
VERDATE="$(shell date -d @$(SOURCE_DATE_EPOCH) '+%Y/%m/%d')" IGNOREGIT=1 \
$(ADDON) \
- CFLAGS="$(TARGET_CFLAGS)" \
+ CFLAGS="$(TARGET_CFLAGS) -fno-strict-aliasing -Wdeclaration-after-statement -fwrapv -Wno-format-truncation -Wno-unused-label -Wno-sign-compare -Wno-unused-parameter -Wno-old-style-declaration -Wno-ignored-qualifiers -Wno-clobbered -Wno-missing-field-initializers -Wno-implicit-fallthrough -Wno-stringop-overflow -Wno-cast-function-type -Wtype-limits -Wshift-negative-value -Wshift-overflow=2 -Wduplicated-cond -Wnull-dereference" \
LD="$(TARGET_CC)" \
- LDFLAGS="$(TARGET_LDFLAGS) -latomic"
+ LDFLAGS="$(TARGET_LDFLAGS) -latomic" \
+ EXTRA_OBJS="contrib/prometheus-exporter/service-prometheus.o"
$(MAKE_VARS) $(MAKE) -C $(PKG_BUILD_DIR) \
DESTDIR="$(PKG_INSTALL_DIR)" \
$(MAKE_VARS) $(MAKE) -C $(PKG_BUILD_DIR)/contrib/halog \
DESTDIR="$(PKG_INSTALL_DIR)" \
$(MAKE_FLAGS) \
+ OPTIMIZE="$(TARGET_CFLAGS)" \
ADDLIB="-lcrypto" \
halog
endef
-# Example configuration file for HAProxy 1.3, refer to the url below for
+# Example configuration file for HAProxy 2.0, refer to the url below for
# a full documentation and examples for configuration:
-# http://haproxy.1wt.eu/download/1.3/doc/configuration.txt
+# https://cbonte.github.io/haproxy-dconv/2.0/configuration.html
# Global parameters
# limits like number of open file descriptors. Default is 1.
#nbproc 2
+# Default parameters
+defaults
+ # Default timeouts
+ timeout connect 5000ms
+ timeout client 50000ms
+ timeout server 50000ms
+
# Example HTTP proxy listener
listen my_http_proxy
# Round robin load balancing over two servers on port 123 forcing
# the address 192.168.1.1 and port 25 as source.
balance roundrobin
- #use next line for transparent proxy, so the servers can see the
- #original ip-address and remove source keyword in server definition
- #source 0.0.0.0 usesrc clientip
+ #use next line for transparent proxy, so the servers can see the
+ #original ip-address and remove source keyword in server definition
+ #source 0.0.0.0 usesrc clientip
server server01 192.168.1.10:123 source 192.168.1.1:25
server server02 192.168.1.20:123 source 192.168.1.1:25
#!/bin/sh
if [ "$ACTION" = add ]; then
-
/etc/init.d/haproxy enabled && \
/etc/init.d/haproxy start
fi
STOP=80
SERVICE_USE_PID=1
+EXTRA_COMMANDS="check"
HAPROXY_BIN="/usr/sbin/haproxy"
HAPROXY_CONFIG="/etc/haproxy.cfg"
}
reload() {
- $HAPROXY_BIN -D -q -f $HAPROXY_CONFIG -p $HAPROXY_PID -sf $(cat $HAPROXY_PID | tr "\n" " ")
- #$HAPROXY_BIN -D -q -f $HAPROXY_CONFIG -p $HAPROXY_PID -sf $(cat $HAPROXY_PID)
+ $HAPROXY_BIN -D -q -f $HAPROXY_CONFIG -p $HAPROXY_PID -sf $(cat $HAPROXY_PID)
+}
+
+check() {
+ $HAPROXY_BIN -c -q -V -f $HAPROXY_CONFIG
}
#!/bin/bash
-CLONEURL=http://git.haproxy.org/git/haproxy-1.8.git
-BASE_TAG=v1.8.17
+CLONEURL=http://git.haproxy.org/git/haproxy-2.0.git
+BASE_TAG=v2.0.1
TMP_REPODIR=tmprepo
PATCHESDIR=patches
--- /dev/null
+commit 1bd140ea3fab97ccd37adf9d0c106d52af9e53fa
+Author: William Lallemand <wlallemand@haproxy.com>
+Date: Mon Jul 1 10:56:15 2019 +0200
+
+ BUG/MINOR: mworker/cli: don't output a \n before the response
+
+ When using a level lower than admin on the master CLI, a \n is output
+ before the response, this is caused by the response of the "operator" or
+ "user" that are sent before the actual command.
+
+ To fix this problem we introduce the flag APPCTX_CLI_ST1_NOLF which ask
+ a command response to not be followed by the final \n.
+ This patch made a special case with the command operator and user
+ followed by a - so they are not followed by \n.
+
+ This patch must be backported to 2.0 and 1.9.
+
+ (cherry picked from commit ad03288e6b28d816abb443cf8c6d984a72bb91a6)
+ Signed-off-by: William Lallemand <wlallemand@haproxy.org>
+
+diff --git a/include/types/applet.h b/include/types/applet.h
+index c9e02d17..1f3a4983 100644
+--- a/include/types/applet.h
++++ b/include/types/applet.h
+@@ -50,6 +50,7 @@ struct applet {
+
+ #define APPCTX_CLI_ST1_PROMPT (1 << 0)
+ #define APPCTX_CLI_ST1_PAYLOAD (1 << 1)
++#define APPCTX_CLI_ST1_NOLF (1 << 2)
+
+ /* Context of a running applet. */
+ struct appctx {
+diff --git a/src/cli.c b/src/cli.c
+index 44ddc7bf..9a9f80f9 100644
+--- a/src/cli.c
++++ b/src/cli.c
+@@ -821,7 +821,7 @@ static void cli_io_handler(struct appctx *appctx)
+ prompt = "\n> ";
+ }
+ else {
+- if (!(appctx->st1 & APPCTX_CLI_ST1_PAYLOAD))
++ if (!(appctx->st1 & (APPCTX_CLI_ST1_PAYLOAD|APPCTX_CLI_ST1_NOLF)))
+ prompt = "\n";
+ }
+
+@@ -848,6 +848,8 @@ static void cli_io_handler(struct appctx *appctx)
+
+ /* switch state back to GETREQ to read next requests */
+ appctx->st0 = CLI_ST_GETREQ;
++ /* reactivate the \n at the end of the response for the next command */
++ appctx->st1 &= ~APPCTX_CLI_ST1_NOLF;
+ }
+ }
+
+@@ -1442,6 +1444,10 @@ static int cli_parse_show_lvl(char **args, char *payload, struct appctx *appctx,
+ /* parse and set the CLI level dynamically */
+ static int cli_parse_set_lvl(char **args, char *payload, struct appctx *appctx, void *private)
+ {
++ /* this will ask the applet to not output a \n after the command */
++ if (!strcmp(args[1], "-"))
++ appctx->st1 |= APPCTX_CLI_ST1_NOLF;
++
+ if (!strcmp(args[0], "operator")) {
+ if (!cli_has_level(appctx, ACCESS_LVL_OPER)) {
+ return 1;
+@@ -2097,11 +2103,11 @@ int pcli_parse_request(struct stream *s, struct channel *req, char **errmsg, int
+ if (pcli_has_level(s, ACCESS_LVL_ADMIN)) {
+ goto end;
+ } else if (pcli_has_level(s, ACCESS_LVL_OPER)) {
+- ci_insert_line2(req, 0, "operator", strlen("operator"));
+- ret += strlen("operator") + 2;
++ ci_insert_line2(req, 0, "operator -", strlen("operator -"));
++ ret += strlen("operator -") + 2;
+ } else if (pcli_has_level(s, ACCESS_LVL_USER)) {
+- ci_insert_line2(req, 0, "user", strlen("user"));
+- ret += strlen("user") + 2;
++ ci_insert_line2(req, 0, "user -", strlen("user -"));
++ ret += strlen("user -") + 2;
+ }
+ }
+ end:
+++ /dev/null
-commit 6648ff0cccee04a6a0c0e64050151b5d6c5bac51
-Author: Jarno Huuskonen <jarno.huuskonen@uef.fi>
-Date: Fri Jan 4 14:05:02 2019 +0200
-
- DOC: http-request cache-use / http-response cache-store expects cache name
-
- Adds missing cache name option to http-request cache-use and
- http-response cache-store documentation.
-
- Also adds optional if/unless condition to
- 10.2.2. Proxy section: http-request cache-use / http-response cache-store
-
- (cherry picked from commit 251a6b72a8b6f0a4b167f6a2960e422d682aed80)
- Signed-off-by: Willy Tarreau <w@1wt.eu>
- (cherry picked from commit 5376f6af9239fdf8a79b6c912387de12e3c9d6cd)
- [wla: no http-request/response section in 1.8]
- Signed-off-by: William Lallemand <wlallemand@haproxy.org>
-
-diff --git a/doc/configuration.txt b/doc/configuration.txt
-index 4f999e25..712e56e2 100644
---- a/doc/configuration.txt
-+++ b/doc/configuration.txt
-@@ -17157,13 +17157,13 @@ max-age <seconds>
- 10.2.2. Proxy section
- ---------------------
-
--http-request cache-use <name>
-+http-request cache-use <name> [ { if | unless } <condition> ]
- Try to deliver a cached object from the cache <name>. This directive is also
- mandatory to store the cache as it calculates the cache hash. If you want to
- use a condition for both storage and delivering that's a good idea to put it
- after this one.
-
--http-response cache-store <name>
-+http-response cache-store <name> [ { if | unless } <condition> ]
- Store an http-response within the cache. The storage of the response headers
- is done at this step, which means you can use others http-response actions
- to modify headers before or after the storage of the response. This action
+++ /dev/null
-commit a64e5574e40e3e0819c82e35a7e3d2fa65febc73
-Author: Willy Tarreau <w@1wt.eu>
-Date: Fri Jan 11 19:38:25 2019 +0100
-
- BUG/MAJOR: cache: fix confusion between zero and uninitialized cache key
-
- The cache uses the first 32 bits of the uri's hash as the key to reference
- the object in the cache. It makes a special case of the value zero to mean
- that the object is not in the cache anymore. The problem is that when an
- object hashes as zero, it's still inserted but the eb32_delete() call is
- skipped, resulting in the object still being chained in the memory area
- while the block has been reclaimed and used for something else. Then when
- objects which were chained below it (techically any object since zero is
- at the root) are deleted, the walk through the upper object may encounter
- corrupted values where valid pointers were expected.
-
- But while this should only happen statically once on 4 billion, the problem
- gets worse when the cache-use conditions don't match the cache-store ones,
- because cache-store runs with an uninitialized key, which can create objects
- that will never be found by the lookup code, or worse, entries with a zero
- key preventing eviction of the tree node and resulting in a crash. It's easy
- to accidently end up on such a config because the request rules generally
- can't be used to decide on the response :
-
- http-request cache-use cache if { path_beg /images }
- http-response cache-store cache
-
- In this test, mixing traffic with /images/$RANDOM and /foo/$RANDOM will
- result in random keys being inserted, some of them possibly being zero,
- and crashes will quickly happen.
-
- The fix consists in 1) always initializing the transaction's cache_hash
- to zero, and 2) never storing a response for which the hash has not been
- calculated, as indicated by the value zero.
-
- It is worth noting that objects hashing as value zero will never be cached,
- but given that there's only one chance among 4 billion that this happens,
- this is totally harmless.
-
- This fix must be backported to 1.9 and 1.8.
-
- (cherry picked from commit c9036c00044a8d81561113886ecec9a9ce71bd3b)
- Signed-off-by: Willy Tarreau <w@1wt.eu>
- (cherry picked from commit 5a6279fcc16da479304bcabc1705e8653f274337)
- Signed-off-by: William Lallemand <wlallemand@haproxy.org>
-
-diff --git a/src/cache.c b/src/cache.c
-index 667cede3..3d8ed241 100644
---- a/src/cache.c
-+++ b/src/cache.c
-@@ -400,7 +400,7 @@ enum act_return http_action_store_cache(struct act_rule *rule, struct proxy *px,
- struct cache *cache = (struct cache *)rule->arg.act.p[0];
- struct shared_context *shctx = shctx_ptr(cache);
- struct cache_entry *object;
--
-+ unsigned int key = *(unsigned int *)txn->cache_hash;
-
- /* Don't cache if the response came from a cache */
- if ((obj_type(s->target) == OBJ_TYPE_APPLET) &&
-@@ -420,6 +420,10 @@ enum act_return http_action_store_cache(struct act_rule *rule, struct proxy *px,
- if (txn->meth != HTTP_METH_GET)
- goto out;
-
-+ /* cache key was not computed */
-+ if (!key)
-+ goto out;
-+
- /* cache only 200 status code */
- if (txn->status != 200)
- goto out;
-@@ -478,7 +482,7 @@ enum act_return http_action_store_cache(struct act_rule *rule, struct proxy *px,
-
- cache_ctx->first_block = first;
-
-- object->eb.key = (*(unsigned int *)&txn->cache_hash);
-+ object->eb.key = key;
- memcpy(object->hash, txn->cache_hash, sizeof(object->hash));
- /* Insert the node later on caching success */
-
-diff --git a/src/proto_http.c b/src/proto_http.c
-index 7e4a8351..29a1083a 100644
---- a/src/proto_http.c
-+++ b/src/proto_http.c
-@@ -8210,6 +8210,7 @@ void http_init_txn(struct stream *s)
-
- txn->flags = 0;
- txn->status = -1;
-+ *(unsigned int *)txn->cache_hash = 0;
-
- txn->cookie_first_date = 0;
- txn->cookie_last_date = 0;
--- /dev/null
+commit aa2ecea6f711f50192476b26a5b1d767108bd761
+Author: Olivier Houchard <ohouchard@haproxy.com>
+Date: Fri Jun 28 14:10:33 2019 +0200
+
+ BUG/MEDIUM: ssl: Don't attempt to set alpn if we're not using SSL.
+
+ Checks use ssl_sock_set_alpn() to set the ALPN if check-alpn is used, however
+ check-alpn failed to check if the connection was indeed using SSL, and thus,
+ would crash if check-alpn was used on a non-SSL connection. Fix this by
+ making sure the connection uses SSL before attempting to set the ALPN.
+
+ This should be backported to 2.0 and 1.9.
+
+ (cherry picked from commit e488ea865a433d93efcb14c0c602918070c6b208)
+ Signed-off-by: Willy Tarreau <w@1wt.eu>
+
+diff --git a/src/ssl_sock.c b/src/ssl_sock.c
+index 05240063..c9fffbec 100644
+--- a/src/ssl_sock.c
++++ b/src/ssl_sock.c
+@@ -6411,6 +6411,9 @@ void ssl_sock_set_alpn(struct connection *conn, const unsigned char *alpn, int l
+ #ifdef TLSEXT_TYPE_application_layer_protocol_negotiation
+ struct ssl_sock_ctx *ctx = conn->xprt_ctx;
+
++ if (!ssl_sock_is_ssl(conn))
++ return;
++
+ SSL_set_alpn_protos(ctx->ssl, alpn, len);
+ #endif
+ }
--- /dev/null
+commit 9fa93f6220a374f724491fd781d44d31f307671f
+Author: Christopher Faulet <cfaulet@haproxy.com>
+Date: Fri Jun 28 17:41:42 2019 +0200
+
+ BUG/MEDIUM: mux-h1: Always release H1C if a shutdown for writes was reported
+
+ We must take care of this when the stream is detached from the
+ connection. Otherwise, on the server side, the connexion is inserted in the list
+ of idle connections of the session. But when reused, because the shutdown for
+ writes was already catched, nothing is sent to the server and the session is
+ blocked with a freezed connection.
+
+ This patch must be backported to 2.0 and 1.9. It is related to the issue #136
+ reported on Github.
+
+ (cherry picked from commit 3ac0f43020e1cd77198020201e4e482a1c2ef8ac)
+ Signed-off-by: Willy Tarreau <w@1wt.eu>
+
+diff --git a/src/mux_h1.c b/src/mux_h1.c
+index 3d2bd8b8..e497e6f6 100644
+--- a/src/mux_h1.c
++++ b/src/mux_h1.c
+@@ -2192,9 +2192,9 @@ static void h1_detach(struct conn_stream *cs)
+ }
+ }
+
+- /* We don't want to close right now unless the connection is in error */
+- if ((h1c->flags & (H1C_F_CS_ERROR|H1C_F_CS_SHUTDOWN|H1C_F_UPG_H2C)) ||
+- (h1c->conn->flags & CO_FL_ERROR) || !h1c->conn->owner)
++ /* We don't want to close right now unless the connection is in error or shut down for writes */
++ if ((h1c->flags & (H1C_F_CS_ERROR|H1C_F_CS_SHUTW_NOW|H1C_F_CS_SHUTDOWN|H1C_F_UPG_H2C)) ||
++ (h1c->conn->flags & (CO_FL_ERROR|CO_FL_SOCK_WR_SH)) || !h1c->conn->owner)
+ h1_release(h1c);
+ else {
+ tasklet_wakeup(h1c->wait_event.tasklet);
+++ /dev/null
-commit 9f01534cd68de78c74b50d7b8def07a72c2a3b49
-Author: Olivier Houchard <ohouchard@haproxy.com>
-Date: Wed Jan 2 18:46:41 2019 +0100
-
- BUG/MEDIUM: ssl: Disable anti-replay protection and set max data with 0RTT.
-
- When using early data, disable the OpenSSL anti-replay protection, and set
- the max amount of early data we're ready to accept, based on the size of
- buffers, or early data won't work with the released OpenSSL 1.1.1.
-
- This should be backported to 1.8.
-
- (cherry picked from commit 51088ce68fee0bae52118d6823873417046f9efe)
- Signed-off-by: Willy Tarreau <w@1wt.eu>
- (cherry picked from commit 6703b633078b6bae12395ee3e310427b37965d68)
- Signed-off-by: William Lallemand <wlallemand@haproxy.org>
-
-diff --git a/src/ssl_sock.c b/src/ssl_sock.c
-index 24ccc4b1..11655533 100644
---- a/src/ssl_sock.c
-+++ b/src/ssl_sock.c
-@@ -3821,6 +3821,10 @@ ssl_sock_initial_ctx(struct bind_conf *bind_conf)
- SSL_CTX_set_select_certificate_cb(ctx, ssl_sock_switchctx_cbk);
- SSL_CTX_set_tlsext_servername_callback(ctx, ssl_sock_switchctx_err_cbk);
- #elif (OPENSSL_VERSION_NUMBER >= 0x10101000L)
-+ if (bind_conf->ssl_conf.early_data) {
-+ SSL_CTX_set_options(ctx, SSL_OP_NO_ANTI_REPLAY);
-+ SSL_CTX_set_max_early_data(ctx, global.tune.bufsize - global.tune.maxrewrite);
-+ }
- SSL_CTX_set_client_hello_cb(ctx, ssl_sock_switchctx_cbk, NULL);
- SSL_CTX_set_tlsext_servername_callback(ctx, ssl_sock_switchctx_err_cbk);
- #else
--- /dev/null
+commit afc313e6cd4be32f3c3d212e875d4dbcef8a0c70
+Author: Willy Tarreau <w@1wt.eu>
+Date: Mon Jul 1 07:51:29 2019 +0200
+
+ BUG/MEDIUM: checks: unblock signals in external checks
+
+ As discussed in issue #140, processes are forked with signals blocked
+ resulting in haproxy's kill being ignored. This happens when the command
+ takes more time to complete than the configured check timeout or interval.
+ Just calling "sleep 30" every second makes the problem obvious.
+
+ The fix simply consists in unblocking the signals in the child after the
+ fork. It needs to be backported to all stable branches containing external
+ checks and where signals are blocked on startup. It's unclear when it
+ started, but the following config exhibits the issue :
+
+ global
+ external-check
+
+ listen www
+ bind :8001
+ timeout client 5s
+ timeout server 5s
+ timeout connect 5s
+ option external-check
+ external-check command "$PWD/sleep10.sh"
+ server local 127.0.0.1:80 check inter 200
+
+ $ cat sleep10.sh
+ #!/bin/sh
+ exec /bin/sleep 10
+
+ The "sleep" processes keep accumulating for 10 seconds and stabilize
+ around 25 when the bug is present. Just issuing "killall sleep" has no
+ effect on them, and stopping haproxy leaves these processes behind.
+
+ (cherry picked from commit 2df8cad0fea2d1a4ca8dd58f384df3c3c3f5d7ee)
+ Signed-off-by: Willy Tarreau <w@1wt.eu>
+
+diff --git a/src/checks.c b/src/checks.c
+index c175a752..e31eb173 100644
+--- a/src/checks.c
++++ b/src/checks.c
+@@ -1997,6 +1997,7 @@ static int connect_proc_chk(struct task *t)
+
+ environ = check->envp;
+ extchk_setenv(check, EXTCHK_HAPROXY_SERVER_CURCONN, ultoa_r(s->cur_sess, buf, sizeof(buf)));
++ haproxy_unblock_signals();
+ execvp(px->check_command, check->argv);
+ ha_alert("Failed to exec process for external health check: %s. Aborting.\n",
+ strerror(errno));
+++ /dev/null
-commit aca7e5aed7e036489ccc83d925103e94653b8670
-Author: Olivier Houchard <ohouchard@haproxy.com>
-Date: Tue Jan 8 15:35:32 2019 +0100
-
- DOC: Be a bit more explicit about allow-0rtt security implications.
-
- Document a bit better than allow-0rtt can trivially be used for replay attacks,
- and so should only be used when it's safe to replay a request.
-
- This should probably be backported to 1.8 and 1.9.
-
- (cherry picked from commit 69752964944ef9c8dc03477ee95bc7d149a72089)
- Signed-off-by: Willy Tarreau <w@1wt.eu>
- (cherry picked from commit bb0df71201ad5b2d0cec514773d244275e5240df)
- Signed-off-by: William Lallemand <wlallemand@haproxy.org>
-
-diff --git a/doc/configuration.txt b/doc/configuration.txt
-index 712e56e2..72b769a4 100644
---- a/doc/configuration.txt
-+++ b/doc/configuration.txt
-@@ -10483,7 +10483,10 @@ accept-proxy
-
- allow-0rtt
- Allow receiving early data when using TLSv1.3. This is disabled by default,
-- due to security considerations.
-+ due to security considerations. Because it is vulnerable to replay attacks,
-+ you should only allow if for requests that are safe to replay, ie requests
-+ that are idempotent. You can use the "wait-for-handshake" action for any
-+ request that wouldn't be safe with early data.
-
- alpn <protocols>
- This enables the TLS ALPN extension and advertises the specified protocol
+++ /dev/null
-commit 30cd01cbfd40201f3abe246216a85c69352aa79c
-Author: Emeric Brun <ebrun@haproxy.com>
-Date: Thu Jan 10 10:51:13 2019 +0100
-
- BUG/MEDIUM: ssl: missing allocation failure checks loading tls key file
-
- This patch fixes missing allocation checks loading tls key file
- and avoid memory leak in some error cases.
-
- This patch should be backport on branches 1.9 and 1.8
-
- (cherry picked from commit 09852f70e0ed0f23cf9287b1ce55bb6a60112f32)
- Signed-off-by: Willy Tarreau <w@1wt.eu>
- (cherry picked from commit a1dc55a63cfbc8f440b72b6def3957bf1fad12b2)
- Signed-off-by: William Lallemand <wlallemand@haproxy.org>
-
-diff --git a/src/ssl_sock.c b/src/ssl_sock.c
-index 11655533..7884c411 100644
---- a/src/ssl_sock.c
-+++ b/src/ssl_sock.c
-@@ -7627,15 +7627,36 @@ static int bind_parse_tls_ticket_keys(char **args, int cur_arg, struct proxy *px
- }
-
- keys_ref = malloc(sizeof(*keys_ref));
-+ if (!keys_ref) {
-+ if (err)
-+ memprintf(err, "'%s' : allocation error", args[cur_arg+1]);
-+ return ERR_ALERT | ERR_FATAL;
-+ }
-+
- keys_ref->tlskeys = malloc(TLS_TICKETS_NO * sizeof(struct tls_sess_key));
-+ if (!keys_ref->tlskeys) {
-+ free(keys_ref);
-+ if (err)
-+ memprintf(err, "'%s' : allocation error", args[cur_arg+1]);
-+ return ERR_ALERT | ERR_FATAL;
-+ }
-
- if ((f = fopen(args[cur_arg + 1], "r")) == NULL) {
-+ free(keys_ref->tlskeys);
-+ free(keys_ref);
- if (err)
- memprintf(err, "'%s' : unable to load ssl tickets keys file", args[cur_arg+1]);
- return ERR_ALERT | ERR_FATAL;
- }
-
- keys_ref->filename = strdup(args[cur_arg + 1]);
-+ if (!keys_ref->filename) {
-+ free(keys_ref->tlskeys);
-+ free(keys_ref);
-+ if (err)
-+ memprintf(err, "'%s' : allocation error", args[cur_arg+1]);
-+ return ERR_ALERT | ERR_FATAL;
-+ }
-
- while (fgets(thisline, sizeof(thisline), f) != NULL) {
- int len = strlen(thisline);
-@@ -7647,6 +7668,9 @@ static int bind_parse_tls_ticket_keys(char **args, int cur_arg, struct proxy *px
- thisline[--len] = 0;
-
- if (base64dec(thisline, len, (char *) (keys_ref->tlskeys + i % TLS_TICKETS_NO), sizeof(struct tls_sess_key)) != sizeof(struct tls_sess_key)) {
-+ free(keys_ref->filename);
-+ free(keys_ref->tlskeys);
-+ free(keys_ref);
- if (err)
- memprintf(err, "'%s' : unable to decode base64 key on line %d", args[cur_arg+1], i + 1);
- fclose(f);
-@@ -7656,6 +7680,9 @@ static int bind_parse_tls_ticket_keys(char **args, int cur_arg, struct proxy *px
- }
-
- if (i < TLS_TICKETS_NO) {
-+ free(keys_ref->filename);
-+ free(keys_ref->tlskeys);
-+ free(keys_ref);
- if (err)
- memprintf(err, "'%s' : please supply at least %d keys in the tls-tickets-file", args[cur_arg+1], TLS_TICKETS_NO);
- fclose(f);
--- /dev/null
+commit 52131680c42ddbfa6f2b5d109ffc79c28f44e42a
+Author: Christopher Faulet <cfaulet@haproxy.com>
+Date: Thu Jun 27 17:40:14 2019 +0200
+
+ BUG/MINOR: mux-h1: Skip trailers for non-chunked outgoing messages
+
+ Unlike H1, H2 messages may contains trailers while the header "Content-Length"
+ is set. Indeed, because of the framed structure of HTTP/2, it is no longer
+ necessary to use the chunked transfer encoding. So Trailing HEADERS frames,
+ after all DATA frames, may be added on messages with an explicit content length.
+
+ But in H1, it is impossible to have trailers on non-chunked messages. So when
+ outgoing messages are formatted by the H1 multiplexer, if the message is not
+ chunked, all trailers must be dropped.
+
+ This patch must be backported to 2.0 and 1.9. However, the patch will have to be
+ adapted for the 1.9.
+
+ (cherry picked from commit 5433a0b0215c791b4165bddd360a254fa141c6e9)
+ Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
+
+diff --git a/src/mux_h1.c b/src/mux_h1.c
+index e497e6f6..e7d769b4 100644
+--- a/src/mux_h1.c
++++ b/src/mux_h1.c
+@@ -1696,7 +1696,9 @@ static size_t h1_process_output(struct h1c *h1c, struct buffer *buf, size_t coun
+ goto done;
+ }
+ else if (type == HTX_BLK_EOT || type == HTX_BLK_TLR) {
+- if (!chunk_memcat(&tmp, "0\r\n", 3))
++ /* If the message is not chunked, never
++ * add the last chunk. */
++ if ((h1m->flags & H1_MF_CHNK) && !chunk_memcat(&tmp, "0\r\n", 3))
+ goto copy;
+ goto trailers;
+ }
+@@ -1715,6 +1717,11 @@ static size_t h1_process_output(struct h1c *h1c, struct buffer *buf, size_t coun
+ goto error;
+ trailers:
+ h1m->state = H1_MSG_TRAILERS;
++ /* If the message is not chunked, ignore
++ * trailers. It may happen with H2 messages. */
++ if (!(h1m->flags & H1_MF_CHNK))
++ break;
++
+ if (type == HTX_BLK_EOT) {
+ if (!chunk_memcat(&tmp, "\r\n", 2))
+ goto copy;
+++ /dev/null
-commit 98f9549fa466e3b73a04f17dbc05fd88427c72f4
-Author: Willy Tarreau <w@1wt.eu>
-Date: Mon Jan 14 15:17:46 2019 +0100
-
- BUG/MINOR: backend: don't use url_param_name as a hint for BE_LB_ALGO_PH
-
- At a few places in the code we used to rely on this variable to guess
- what LB algo was in place. This is wrong because if the defaults section
- presets "balance url_param foo" and a backend uses "balance roundrobin",
- these locations will still see this url_param_name set and consider it.
- The harm is limited, as this only causes the beginning of the request
- body to be buffered. And in general this is a bad practice which prevents
- us from cleaning the lbprm stuff. Let's explicitly check the LB algo
- instead.
-
- This may be backported to all currently maintained versions.
-
- (cherry picked from commit 089eaa0ba73913187e93d52c3ea34faa01fd8f9c)
- Signed-off-by: Willy Tarreau <w@1wt.eu>
- (cherry picked from commit 70d1744bb41daab4110071e4855504b6dc47bda9)
- [wla: no htx in 1.8]
- Signed-off-by: William Lallemand <wlallemand@haproxy.org>
-
-diff --git a/src/proto_http.c b/src/proto_http.c
-index 29a1083a..5dc562ff 100644
---- a/src/proto_http.c
-+++ b/src/proto_http.c
-@@ -3935,7 +3935,8 @@ int http_process_request(struct stream *s, struct channel *req, int an_bit)
- * that parameter. This will be done in another analyser.
- */
- if (!(s->flags & (SF_ASSIGNED|SF_DIRECT)) &&
-- s->txn->meth == HTTP_METH_POST && s->be->url_param_name != NULL &&
-+ s->txn->meth == HTTP_METH_POST &&
-+ (s->be->lbprm.algo & BE_LB_ALGO) == BE_LB_ALGO_PH &&
- (msg->flags & (HTTP_MSGF_CNT_LEN|HTTP_MSGF_TE_CHNK))) {
- channel_dont_connect(req);
- req->analysers |= AN_REQ_HTTP_BODY;
--- /dev/null
+commit 33d58b51e0f1bf68603aa86c9125ae75d6964454
+Author: Christopher Faulet <cfaulet@haproxy.com>
+Date: Mon Jul 1 16:17:30 2019 +0200
+
+ BUG/MINOR: mux-h1: Don't return the empty chunk on HEAD responses
+
+ HEAD responses must not have any body payload. But, because of a bug, for chunk
+ reponses, the empty chunk was always added.
+
+ This patch fixes the Github issue #146. It must be backported to 2.0 and 1.9.
+
+ (cherry picked from commit b8fc304e8f996f0d9835e4d6524ef8961d3be076)
+ Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
+
+diff --git a/src/mux_h1.c b/src/mux_h1.c
+index e7d769b4..37cc8252 100644
+--- a/src/mux_h1.c
++++ b/src/mux_h1.c
+@@ -1682,6 +1682,8 @@ static size_t h1_process_output(struct h1c *h1c, struct buffer *buf, size_t coun
+ h1m->flags |= (H1_MF_NO_PHDR|H1_MF_CLEAN_CONN_HDR);
+ h1s->flags &= ~H1S_F_HAVE_O_CONN;
+ }
++ else if ((h1m->flags & H1_MF_RESP) && h1s->meth == HTTP_METH_HEAD)
++ h1m->state = H1_MSG_DONE;
+ else
+ h1m->state = H1_MSG_DATA;
+ break;
+++ /dev/null
-commit a5027f804144536f79829443b33e6c19c32b690a
-Author: Willy Tarreau <w@1wt.eu>
-Date: Mon Jan 14 16:29:52 2019 +0100
-
- BUG/MINOR: backend: balance uri specific options were lost across defaults
-
- The "balance uri" options "whole", "len" and "depth" were not properly
- inherited from the defaults sections. In addition, "whole" and "len"
- were not even reset when parsing "uri", meaning that 2 subsequent
- "balance uri" statements would not have the expected effect as the
- options from the first one would remain for the second one.
-
- This may be backported to all maintained versions.
-
- (cherry picked from commit 602a499da5e81d6b4cfe8410f0fc6d53c1e06745)
- Signed-off-by: Willy Tarreau <w@1wt.eu>
- (cherry picked from commit f00758fde5961e3bebc508852faeee4d9d80b0e0)
- [wla: cfg_parse_listen() is still in cfgparse.c in 1.8]
- Signed-off-by: William Lallemand <wlallemand@haproxy.org>
-
-diff --git a/src/backend.c b/src/backend.c
-index 87327f19..4c4044a6 100644
---- a/src/backend.c
-+++ b/src/backend.c
-@@ -1516,6 +1516,8 @@ int backend_parse_balance(const char **args, char **err, struct proxy *curproxy)
- curproxy->lbprm.algo |= BE_LB_ALGO_UH;
-
- curproxy->uri_whole = 0;
-+ curproxy->uri_len_limit = 0;
-+ curproxy->uri_dirs_depth1 = 0;
-
- while (*args[arg]) {
- if (!strcmp(args[arg], "len")) {
-diff --git a/src/cfgparse.c b/src/cfgparse.c
-index 94f29637..91bb802e 100644
---- a/src/cfgparse.c
-+++ b/src/cfgparse.c
-@@ -2844,7 +2844,10 @@ int cfg_parse_listen(const char *file, int linenum, char **args, int kwm)
-
- if (defproxy.url_param_name)
- curproxy->url_param_name = strdup(defproxy.url_param_name);
-- curproxy->url_param_len = defproxy.url_param_len;
-+ curproxy->url_param_len = defproxy.url_param_len;
-+ curproxy->uri_whole = defproxy.uri_whole;
-+ curproxy->uri_len_limit = defproxy.uri_len_limit;
-+ curproxy->uri_dirs_depth1 = defproxy.uri_dirs_depth1;
-
- if (defproxy.hh_name)
- curproxy->hh_name = strdup(defproxy.hh_name);
--- /dev/null
+--- a/Makefile
++++ b/Makefile
+@@ -327,6 +327,15 @@ ifeq ($(TARGET),linux-glibc)
+ USE_GETADDRINFO)
+ endif
+
++# For linux >= 2.6.28 and uclibc
++ifeq ($(TARGET),linux-uclibc)
++ set_target_defaults = $(call default_opts, \
++ USE_POLL USE_TPROXY USE_DL USE_RT USE_NETFILTER \
++ USE_CPU_AFFINITY USE_THREAD USE_EPOLL USE_FUTEX USE_LINUX_TPROXY \
++ USE_ACCEPT4 USE_LINUX_SPLICE USE_PRCTL USE_THREAD_DUMP USE_NS USE_TFO \
++ USE_GETADDRINFO)
++endif
++
+ # Solaris 8 and above
+ ifeq ($(TARGET),solaris)
+ # We also enable getaddrinfo() which works since solaris 8.
+++ /dev/null
-commit 7c6a6149a91d2e240a5a63f981c5d07d681df725
-Author: Willy Tarreau <w@1wt.eu>
-Date: Mon Jan 14 17:07:39 2019 +0100
-
- BUG/MINOR: backend: BE_LB_LKUP_CHTREE is a value, not a bit
-
- There are a few instances where the lookup algo is tested against
- BE_LB_LKUP_CHTREE using a binary "AND" operation while this macro
- is a value among a set, and not a bit. The test happens to work
- because the value is exactly 4 and no bit overlaps with the other
- possible values but this is a latent bug waiting for a new LB algo
- to appear to strike. At the moment the only other algo sharing a bit
- with it is the "first" algo which is never supported in the same code
- places.
-
- This fix should be backported to maintained versions for safety if it
- passes easily, otherwise it's not important as it will not fix any
- visible issue.
-
- (cherry picked from commit 6c30be52da3d949a8dd6fb5e2de7319c031e656e)
- Signed-off-by: Willy Tarreau <w@1wt.eu>
- (cherry picked from commit 48147c424680b7e887fb176662d58d87baa16098)
- Signed-off-by: William Lallemand <wlallemand@haproxy.org>
-
-diff --git a/src/backend.c b/src/backend.c
-index 4c4044a6..0cf14cfd 100644
---- a/src/backend.c
-+++ b/src/backend.c
-@@ -183,7 +183,7 @@ static struct server *get_server_sh(struct proxy *px, const char *addr, int len,
- if ((px->lbprm.algo & BE_LB_HASH_MOD) == BE_LB_HMOD_AVAL)
- h = full_hash(h);
- hash_done:
-- if (px->lbprm.algo & BE_LB_LKUP_CHTREE)
-+ if ((px->lbprm.algo & BE_LB_LKUP) == BE_LB_LKUP_CHTREE)
- return chash_get_server_hash(px, h, avoid);
- else
- return map_get_server_hash(px, h);
-@@ -236,7 +236,7 @@ static struct server *get_server_uh(struct proxy *px, char *uri, int uri_len, co
- if ((px->lbprm.algo & BE_LB_HASH_MOD) == BE_LB_HMOD_AVAL)
- hash = full_hash(hash);
- hash_done:
-- if (px->lbprm.algo & BE_LB_LKUP_CHTREE)
-+ if ((px->lbprm.algo & BE_LB_LKUP) == BE_LB_LKUP_CHTREE)
- return chash_get_server_hash(px, hash, avoid);
- else
- return map_get_server_hash(px, hash);
-@@ -293,7 +293,7 @@ static struct server *get_server_ph(struct proxy *px, const char *uri, int uri_l
- if ((px->lbprm.algo & BE_LB_HASH_MOD) == BE_LB_HMOD_AVAL)
- hash = full_hash(hash);
-
-- if (px->lbprm.algo & BE_LB_LKUP_CHTREE)
-+ if ((px->lbprm.algo & BE_LB_LKUP) == BE_LB_LKUP_CHTREE)
- return chash_get_server_hash(px, hash, avoid);
- else
- return map_get_server_hash(px, hash);
-@@ -367,7 +367,7 @@ static struct server *get_server_ph_post(struct stream *s, const struct server *
- if ((px->lbprm.algo & BE_LB_HASH_MOD) == BE_LB_HMOD_AVAL)
- hash = full_hash(hash);
-
-- if (px->lbprm.algo & BE_LB_LKUP_CHTREE)
-+ if ((px->lbprm.algo & BE_LB_LKUP) == BE_LB_LKUP_CHTREE)
- return chash_get_server_hash(px, hash, avoid);
- else
- return map_get_server_hash(px, hash);
-@@ -463,7 +463,7 @@ static struct server *get_server_hh(struct stream *s, const struct server *avoid
- if ((px->lbprm.algo & BE_LB_HASH_MOD) == BE_LB_HMOD_AVAL)
- hash = full_hash(hash);
- hash_done:
-- if (px->lbprm.algo & BE_LB_LKUP_CHTREE)
-+ if ((px->lbprm.algo & BE_LB_LKUP) == BE_LB_LKUP_CHTREE)
- return chash_get_server_hash(px, hash, avoid);
- else
- return map_get_server_hash(px, hash);
-@@ -507,7 +507,7 @@ static struct server *get_server_rch(struct stream *s, const struct server *avoi
- if ((px->lbprm.algo & BE_LB_HASH_MOD) == BE_LB_HMOD_AVAL)
- hash = full_hash(hash);
- hash_done:
-- if (px->lbprm.algo & BE_LB_LKUP_CHTREE)
-+ if ((px->lbprm.algo & BE_LB_LKUP) == BE_LB_LKUP_CHTREE)
- return chash_get_server_hash(px, hash, avoid);
- else
- return map_get_server_hash(px, hash);
-@@ -615,7 +615,7 @@ int assign_server(struct stream *s)
- case BE_LB_LKUP_CHTREE:
- case BE_LB_LKUP_MAP:
- if ((s->be->lbprm.algo & BE_LB_KIND) == BE_LB_KIND_RR) {
-- if (s->be->lbprm.algo & BE_LB_LKUP_CHTREE)
-+ if ((s->be->lbprm.algo & BE_LB_LKUP) == BE_LB_LKUP_CHTREE)
- srv = chash_get_next_server(s->be, prev_srv);
- else
- srv = map_get_server_rr(s->be, prev_srv);
-@@ -691,7 +691,7 @@ int assign_server(struct stream *s)
- * back to round robin on the map.
- */
- if (!srv) {
-- if (s->be->lbprm.algo & BE_LB_LKUP_CHTREE)
-+ if ((s->be->lbprm.algo & BE_LB_LKUP) == BE_LB_LKUP_CHTREE)
- srv = chash_get_next_server(s->be, prev_srv);
- else
- srv = map_get_server_rr(s->be, prev_srv);
--- /dev/null
+--- a/include/common/openssl-compat.h
++++ b/include/common/openssl-compat.h
+@@ -217,7 +217,8 @@ static inline int EVP_PKEY_base_id(EVP_PKEY *pkey)
+ #define TLSEXT_signature_ecdsa 3
+ #endif
+
+-#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || (LIBRESSL_VERSION_NUMBER < 0x20700000L)
++#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || \
++ (defined(LIBRESSL_VERSION_NUMBER) && (LIBRESSL_VERSION_NUMBER < 0x20700000L))
+ #define X509_getm_notBefore X509_get_notBefore
+ #define X509_getm_notAfter X509_get_notAfter
+ #endif
+++ /dev/null
-commit 93b3994091b5bd17b43c9d91ecae470d33157e25
-Author: Tim Duesterhus <tim@bastelstu.be>
-Date: Fri Jan 4 00:11:59 2019 +0100
-
- BUG/MINOR: stick_table: Prevent conn_cur from underflowing
-
- When using the peers feature a race condition could prevent
- a connection from being properly counted. When this connection
- exits it is being "uncounted" nonetheless, leading to a possible
- underflow (-1) of the conn_curr stick table entry in the following
- scenario :
-
- - Connect to peer A (A=1, B=0)
- - Peer A sends 1 to B (A=1, B=1)
- - Kill connection to A (A=0, B=1)
- - Connect to peer B (A=0, B=2)
- - Peer A sends 0 to B (A=0, B=0)
- - Peer B sends 0/2 to A (A=?, B=0)
- - Kill connection to B (A=?, B=-1)
- - Peer B sends -1 to A (A=-1, B=-1)
-
- This fix may be backported to all supported branches.
-
- (cherry picked from commit 8b87c01c4d59247d9fb51a38cd12d5d94324b6a4)
- Signed-off-by: Willy Tarreau <w@1wt.eu>
- (cherry picked from commit 4ceecc8a4ee6f46f20c7729056e14af5a8757121)
- Signed-off-by: William Lallemand <wlallemand@haproxy.org>
-
-diff --git a/include/proto/session.h b/include/proto/session.h
-index f48c0d4f..7265f5a7 100644
---- a/include/proto/session.h
-+++ b/include/proto/session.h
-@@ -59,7 +59,8 @@ static inline void session_store_counters(struct session *sess)
- if (ptr) {
- HA_RWLOCK_WRLOCK(STK_SESS_LOCK, &ts->lock);
-
-- stktable_data_cast(ptr, conn_cur)--;
-+ if (stktable_data_cast(ptr, conn_cur) > 0)
-+ stktable_data_cast(ptr, conn_cur)--;
-
- HA_RWLOCK_WRUNLOCK(STK_SESS_LOCK, &ts->lock);
-
-diff --git a/include/proto/stream.h b/include/proto/stream.h
-index 8521957e..c9bcac37 100644
---- a/include/proto/stream.h
-+++ b/include/proto/stream.h
-@@ -104,7 +104,8 @@ static inline void stream_store_counters(struct stream *s)
- if (ptr) {
- HA_RWLOCK_WRLOCK(STK_SESS_LOCK, &ts->lock);
-
-- stktable_data_cast(ptr, conn_cur)--;
-+ if (stktable_data_cast(ptr, conn_cur) > 0)
-+ stktable_data_cast(ptr, conn_cur)--;
-
- HA_RWLOCK_WRUNLOCK(STK_SESS_LOCK, &ts->lock);
-
-@@ -142,7 +143,8 @@ static inline void stream_stop_content_counters(struct stream *s)
- if (ptr) {
- HA_RWLOCK_WRLOCK(STK_SESS_LOCK, &ts->lock);
-
-- stktable_data_cast(ptr, conn_cur)--;
-+ if (stktable_data_cast(ptr, conn_cur) > 0)
-+ stktable_data_cast(ptr, conn_cur)--;
-
- HA_RWLOCK_WRUNLOCK(STK_SESS_LOCK, &ts->lock);
-
+++ /dev/null
-commit 1c95076d881b7508a8d0819b1cfd642e364b255c
-Author: Jérôme Magnin <jmagnin@haproxy.com>
-Date: Sun Jan 20 11:27:40 2019 +0100
-
- BUG/MINOR: server: don't always trust srv_check_health when loading a server state
-
- When we load health values from a server state file, make sure what we assign
- to srv->check.health actually matches the state we restore.
-
- This should be backported as far as 1.6.
-
- (cherry picked from commit f57afa453a685cfd92b7a27ef6e6035cb384ff57)
- Signed-off-by: Willy Tarreau <w@1wt.eu>
- (cherry picked from commit 75455a0b78ce4ac723698df26c014b38467843b1)
- Signed-off-by: William Lallemand <wlallemand@haproxy.org>
-
-diff --git a/src/server.c b/src/server.c
-index a86db3db..28414780 100644
---- a/src/server.c
-+++ b/src/server.c
-@@ -2843,16 +2843,37 @@ static void srv_update_state(struct server *srv, int version, char **params)
- HA_SPIN_LOCK(SERVER_LOCK, &srv->lock);
- /* recover operational state and apply it to this server
- * and all servers tracking this one */
-+ srv->check.health = srv_check_health;
- switch (srv_op_state) {
- case SRV_ST_STOPPED:
- srv->check.health = 0;
- srv_set_stopped(srv, "changed from server-state after a reload", NULL);
- break;
- case SRV_ST_STARTING:
-+ /* If rise == 1 there is no STARTING state, let's switch to
-+ * RUNNING
-+ */
-+ if (srv->check.rise == 1) {
-+ srv->check.health = srv->check.rise + srv->check.fall - 1;
-+ srv_set_running(srv, "", NULL);
-+ break;
-+ }
-+ if (srv->check.health < 1 || srv->check.health >= srv->check.rise)
-+ srv->check.health = srv->check.rise - 1;
- srv->next_state = srv_op_state;
- break;
- case SRV_ST_STOPPING:
-- srv->check.health = srv->check.rise + srv->check.fall - 1;
-+ /* If fall == 1 there is no STOPPING state, let's switch to
-+ * STOPPED
-+ */
-+ if (srv->check.fall == 1) {
-+ srv->check.health = 0;
-+ srv_set_stopped(srv, "changed from server-state after a reload", NULL);
-+ break;
-+ }
-+ if (srv->check.health < srv->check.rise ||
-+ srv->check.health > srv->check.rise + srv->check.fall - 2)
-+ srv->check.health = srv->check.rise;
- srv_set_stopping(srv, "changed from server-state after a reload", NULL);
- break;
- case SRV_ST_RUNNING:
-@@ -2906,7 +2927,6 @@ static void srv_update_state(struct server *srv, int version, char **params)
- srv->last_change = date.tv_sec - srv_last_time_change;
- srv->check.status = srv_check_status;
- srv->check.result = srv_check_result;
-- srv->check.health = srv_check_health;
-
- /* Only case we want to apply is removing ENABLED flag which could have been
- * done by the "disable health" command over the stats socket
+++ /dev/null
-commit 7a74ffef9f356304b46ab862858cead85d451b5f
-Author: Christopher Faulet <cfaulet@haproxy.com>
-Date: Mon Jan 21 14:15:50 2019 +0100
-
- BUG/MINOR: check: Wake the check task if the check is finished in wake_srv_chk()
-
- With tcp-check, the result of the check is set by the function tcpcheck_main()
- from the I/O layer. So it is important to wake up the check task to handle the
- result and finish the check. Otherwise, we will wait the task timeout to handle
- the result of a tcp-check, delaying the next check by as much.
-
- This patch also fixes a problem about email alerts reported by PiBa-NL (Pieter)
- on the ML [1] on all versions since the 1.6. So this patch must be backported
- from 1.9 to 1.6.
-
- [1] https://www.mail-archive.com/haproxy@formilux.org/msg32190.html
-
- (cherry picked from commit 774c486cece942570b6a9d16afe236a16ee12079)
- Signed-off-by: Willy Tarreau <w@1wt.eu>
- (cherry picked from commit 3722dfbbfadf8f83f82feb3e67fbe482a5c94840)
- Signed-off-by: William Lallemand <wlallemand@haproxy.org>
-
-diff --git a/src/checks.c b/src/checks.c
-index 74958b2d..e04f1146 100644
---- a/src/checks.c
-+++ b/src/checks.c
-@@ -1403,12 +1403,13 @@ static int wake_srv_chk(struct conn_stream *cs)
- }
-
- if (check->result != CHK_RES_UNKNOWN) {
-- /* We're here because nobody wants to handle the error, so we
-- * sure want to abort the hard way.
-- */
-+ /* Check complete or aborted. If connection not yet closed do it
-+ * now and wake the check task up to be sure the result is
-+ * handled ASAP. */
- conn_sock_drain(conn);
- cs_close(cs);
- ret = -1;
-+ task_wakeup(check->task, TASK_WOKEN_IO);
- }
-
- HA_SPIN_UNLOCK(SERVER_LOCK, &check->server->lock);
+++ /dev/null
-commit b68a427a236e7b9b0cf8b1c4a5360d960cdf9458
-Author: Dirkjan Bussink <d.bussink@gmail.com>
-Date: Mon Jan 21 09:35:03 2019 -0800
-
- BUG/MEDIUM: ssl: Fix handling of TLS 1.3 KeyUpdate messages
-
- In OpenSSL 1.1.1 TLS 1.3 KeyUpdate messages will trigger the callback
- that is used to verify renegotiation is disabled. This means that these
- KeyUpdate messages fail. In OpenSSL 1.1.1 a better mechanism is
- available with the SSL_OP_NO_RENEGOTIATION flag that disables any TLS
- 1.2 and earlier negotiation.
-
- So if this SSL_OP_NO_RENEGOTIATION flag is available, instead of having
- a manual check, trust OpenSSL and disable the check. This means that TLS
- 1.3 KeyUpdate messages will work properly.
-
- Reported-By: Adam Langley <agl@imperialviolet.org>
- (cherry picked from commit 526894ff3925d272c13e57926aa6b5d9d8ed5ee3)
- [wt: gh issue #24; Needs to be backported till 1.8]
- Signed-off-by: Willy Tarreau <w@1wt.eu>
- (cherry picked from commit 062c5a190d50c4aa9c5bde88c8c5c85c5f15fc7b)
- Signed-off-by: William Lallemand <wlallemand@haproxy.org>
-
-diff --git a/src/ssl_sock.c b/src/ssl_sock.c
-index 7884c411..7736c324 100644
---- a/src/ssl_sock.c
-+++ b/src/ssl_sock.c
-@@ -1406,6 +1406,10 @@ void ssl_sock_infocbk(const SSL *ssl, int where, int ret)
- BIO *write_bio;
- (void)ret; /* shut gcc stupid warning */
-
-+#ifndef SSL_OP_NO_RENEGOTIATION
-+ /* Please note that BoringSSL defines this macro to zero so don't
-+ * change this to #if and do not assign a default value to this macro!
-+ */
- if (where & SSL_CB_HANDSHAKE_START) {
- /* Disable renegotiation (CVE-2009-3555) */
- if ((conn->flags & (CO_FL_CONNECTED | CO_FL_EARLY_SSL_HS | CO_FL_EARLY_DATA)) == CO_FL_CONNECTED) {
-@@ -1413,6 +1417,7 @@ void ssl_sock_infocbk(const SSL *ssl, int where, int ret)
- conn->err_code = CO_ER_SSL_RENEG;
- }
- }
-+#endif
-
- if ((where & SSL_CB_ACCEPT_LOOP) == SSL_CB_ACCEPT_LOOP) {
- if (!(conn->xprt_st & SSL_SOCK_ST_FL_16K_WBFSIZE)) {
-@@ -3806,6 +3811,11 @@ ssl_sock_initial_ctx(struct bind_conf *bind_conf)
- options |= SSL_OP_NO_TICKET;
- if (bind_conf->ssl_options & BC_SSL_O_PREF_CLIE_CIPH)
- options &= ~SSL_OP_CIPHER_SERVER_PREFERENCE;
-+
-+#ifdef SSL_OP_NO_RENEGOTIATION
-+ options |= SSL_OP_NO_RENEGOTIATION;
-+#endif
-+
- SSL_CTX_set_options(ctx, options);
-
- #if (OPENSSL_VERSION_NUMBER >= 0x1010000fL) && !defined(OPENSSL_NO_ASYNC)
+++ /dev/null
-commit 2e405726a0c6be6617905522bde9038f75e623c4
-Author: Willy Tarreau <w@1wt.eu>
-Date: Wed Jan 23 10:02:15 2019 +0100
-
- DOC: mention the effect of nf_conntrack_tcp_loose on src/dst
-
- On rare occasions the logs may report inverted src/dst when using
- conntrack with this sysctl. Add a mention for it in the doc. More
- info here :
-
- https://www.spinics.net/lists/netdev/msg544878.html
-
- (cherry picked from commit 64ded3db2c686bad582cf9bb9fcabf21cb4becb7)
- Signed-off-by: Willy Tarreau <w@1wt.eu>
- (cherry picked from commit 037f9ac4a2cc4b344859af1cff7b30d5ecabe9e0)
- Signed-off-by: William Lallemand <wlallemand@haproxy.org>
-
-diff --git a/doc/configuration.txt b/doc/configuration.txt
-index 72b769a4..bc8ae4f8 100644
---- a/doc/configuration.txt
-+++ b/doc/configuration.txt
-@@ -13822,7 +13822,12 @@ dst : ip
- which is the address the client connected to. It can be useful when running
- in transparent mode. It is of type IP and works on both IPv4 and IPv6 tables.
- On IPv6 tables, IPv4 address is mapped to its IPv6 equivalent, according to
-- RFC 4291.
-+ RFC 4291. When the incoming connection passed through address translation or
-+ redirection involving connection tracking, the original destination address
-+ before the redirection will be reported. On Linux systems, the source and
-+ destination may seldom appear reversed if the nf_conntrack_tcp_loose sysctl
-+ is set, because a late response may reopen a timed out connection and switch
-+ what is believed to be the source and the destination.
-
- dst_conn : integer
- Returns an integer value corresponding to the number of currently established
-@@ -14127,7 +14132,13 @@ src : ip
- behind a proxy. However if the "accept-proxy" or "accept-netscaler-cip" bind
- directive is used, it can be the address of a client behind another
- PROXY-protocol compatible component for all rule sets except
-- "tcp-request connection" which sees the real address.
-+ "tcp-request connection" which sees the real address. When the incoming
-+ connection passed through address translation or redirection involving
-+ connection tracking, the original destination address before the redirection
-+ will be reported. On Linux systems, the source and destination may seldom
-+ appear reversed if the nf_conntrack_tcp_loose sysctl is set, because a late
-+ response may reopen a timed out connection and switch what is believed to be
-+ the source and the destination.
-
- Example:
- # add an HTTP header in requests with the originating address' country
+++ /dev/null
---- a/src/ssl_sock.c
-+++ b/src/ssl_sock.c
-@@ -39,6 +39,7 @@
- #include <netdb.h>
- #include <netinet/tcp.h>
-
-+#include <openssl/bn.h>
- #include <openssl/crypto.h>
- #include <openssl/ssl.h>
- #include <openssl/x509.h>
-@@ -60,6 +61,17 @@
- #include <openssl/async.h>
- #endif
-
-+#ifndef OPENSSL_VERSION
-+#define OPENSSL_VERSION SSLEAY_VERSION
-+#define OpenSSL_version(x) SSLeay_version(x)
-+#define OpenSSL_version_num SSLeay
-+#endif
-+
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#define X509_getm_notBefore X509_get_notBefore
-+#define X509_getm_notAfter X509_get_notAfter
-+#endif
-+
- #include <import/lru.h>
- #include <import/xxhash.h>
-
-@@ -217,7 +229,7 @@ static struct {
- .capture_cipherlist = 0,
- };
-
--#ifdef USE_THREAD
-+#if defined(USE_THREAD) && (OPENSSL_VERSION_NUMBER < 0x10100000L)
-
- static HA_RWLOCK_T *ssl_rwlocks;
-
-@@ -1716,8 +1728,8 @@ ssl_sock_do_create_cert(const char *servername, struct bind_conf *bind_conf, SSL
- ASN1_INTEGER_set(X509_get_serialNumber(newcrt), HA_ATOMIC_ADD(&ssl_ctx_serial, 1));
-
- /* Set duration for the certificate */
-- if (!X509_gmtime_adj(X509_get_notBefore(newcrt), (long)-60*60*24) ||
-- !X509_gmtime_adj(X509_get_notAfter(newcrt),(long)60*60*24*365))
-+ if (!X509_gmtime_adj(X509_getm_notBefore(newcrt), (long)-60*60*24) ||
-+ !X509_gmtime_adj(X509_getm_notAfter(newcrt),(long)60*60*24*365))
- goto mkcert_error;
-
- /* set public key in the certificate */
-@@ -6299,7 +6311,7 @@ smp_fetch_ssl_x_notafter(const struct arg *args, struct sample *smp, const char
- goto out;
-
- smp_trash = get_trash_chunk();
-- if (ssl_sock_get_time(X509_get_notAfter(crt), smp_trash) <= 0)
-+ if (ssl_sock_get_time(X509_getm_notAfter(crt), smp_trash) <= 0)
- goto out;
-
- smp->data.u.str = *smp_trash;
-@@ -6399,7 +6411,7 @@ smp_fetch_ssl_x_notbefore(const struct arg *args, struct sample *smp, const char
- goto out;
-
- smp_trash = get_trash_chunk();
-- if (ssl_sock_get_time(X509_get_notBefore(crt), smp_trash) <= 0)
-+ if (ssl_sock_get_time(X509_getm_notBefore(crt), smp_trash) <= 0)
- goto out;
-
- smp->data.u.str = *smp_trash;
-@@ -8976,10 +8988,12 @@ static void __ssl_sock_init(void)
- #endif
-
- xprt_register(XPRT_SSL, &ssl_sock);
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
- SSL_library_init();
-+#endif
- cm = SSL_COMP_get_compression_methods();
- sk_SSL_COMP_zero(cm);
--#ifdef USE_THREAD
-+#if defined(USE_THREAD) && (OPENSSL_VERSION_NUMBER < 0x10100000L)
- ssl_locking_init();
- #endif
- #if (OPENSSL_VERSION_NUMBER >= 0x1000200fL && !defined OPENSSL_NO_TLSEXT && !defined OPENSSL_IS_BORINGSSL && !defined LIBRESSL_VERSION_NUMBER)
-@@ -9008,8 +9022,8 @@ static void __ssl_sock_init(void)
- #else /* OPENSSL_IS_BORINGSSL */
- OPENSSL_VERSION_TEXT
- "\nRunning on OpenSSL version : %s%s",
-- SSLeay_version(SSLEAY_VERSION),
-- ((OPENSSL_VERSION_NUMBER ^ SSLeay()) >> 8) ? " (VERSIONS DIFFER!)" : "");
-+ OpenSSL_version(OPENSSL_VERSION),
-+ ((OPENSSL_VERSION_NUMBER ^ OpenSSL_version_num()) >> 8) ? " (VERSIONS DIFFER!)" : "");
- #endif
- memprintf(&ptr, "%s\nOpenSSL library supports TLS extensions : "
- #if OPENSSL_VERSION_NUMBER < 0x00907000L
-@@ -9100,12 +9114,14 @@ static void __ssl_sock_deinit(void)
- }
- #endif
-
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
- ERR_remove_state(0);
- ERR_free_strings();
-
- EVP_cleanup();
-+#endif
-
--#if OPENSSL_VERSION_NUMBER >= 0x00907000L
-+#if OPENSSL_VERSION_NUMBER >= 0x00907000L && OPENSSL_VERSION_NUMBER < 0x10100000L
- CRYPTO_cleanup_all_ex_data();
- #endif
- }
--- /dev/null
+#
+# Copyright (C) 2019 Andreas Nilsen <adde88@gmail.com>
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=hcxdumptool
+PKG_VERSION:=5.1.7
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/zerbea/hcxdumptool/tar.gz/$(PKG_VERSION)?
+PKG_HASH:=6ac996a506cb312a5f1c5987f30a4a80c793993908750f69f2df51056f961269
+
+PKG_MAINTAINER:=Andreas Nilsen <adde88@gmail.com>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=license.txt
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/hcxdumptool
+ SECTION:=net
+ CATEGORY:=Network
+ DEPENDS:=+libpcap
+ TITLE:=hcxdumptool
+ URL:=https://github.com/ZerBea/hcxdumptool
+ SUBMENU:=wireless
+endef
+
+define Package/hcxdumptool/description
+ Small tool to capture packets from wlan devices. After capturing, upload
+ the "uncleaned" cap here (https://wpa-sec.stanev.org/?submit)
+ to see if your ap or the client is vulnerable by using common wordlists.
+ Convert the cap to hccapx and/or to WPA-PMKID-PBKDF2 hashline (16800) with hcxpcaptool (hcxtools)
+ and check if wlan-key or plainmasterkey was transmitted unencrypted.
+endef
+
+define Build/Compile
+ $(MAKE) -C $(PKG_BUILD_DIR)/ \
+ $(TARGET_CONFIGURE_OPTS) \
+ CFLAGS="$(TARGET_CFLAGS)"
+endef
+
+define Package/hcxdumptool/install
+ $(INSTALL_DIR) $(1)/sbin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/hcxdumptool $(1)/sbin/
+endef
+
+$(eval $(call BuildPackage,hcxdumptool))
--- /dev/null
+#
+# Copyright (C) 2019 Andreas Nilsen <adde88@gmail.com>
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=hcxtools
+PKG_VERSION:=5.1.6
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/zerbea/hcxtools/tar.gz/$(PKG_VERSION)?
+PKG_HASH:=19d2800c6f9339dd552ebc3e7195860f208a9856340b4db1aeaeb4a234557ca6
+
+PKG_MAINTAINER:=Andreas Nilsen <adde88@gmail.com>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=license.txt
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/hcxtools
+ SECTION:=net
+ CATEGORY:=Network
+ DEPENDS:=+libpthread +libpcap +zlib +libcurl +libopenssl
+ TITLE:=hcxtools
+ URL:=https://github.com/ZerBea/hcxtools
+ SUBMENU:=wireless
+endef
+
+define Package/hcxtools/description
+ Set of tools convert packets from captures (h = hash, c = capture, convert and calculate candidates, x = different hashtypes)
+ for the use with latest hashcat or John the Ripper.
+endef
+
+define Build/Compile
+ $(MAKE) -C $(PKG_BUILD_DIR)/ \
+ $(TARGET_CONFIGURE_OPTS) \
+ CFLAGS="$(TARGET_CFLAGS)"
+endef
+
+define Package/hcxtools/install
+ $(INSTALL_DIR) $(1)/sbin
+ $(INSTALL_DIR) $(1)/etc
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/wlanwkp2hcx $(1)/sbin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/wlanpmk2hcx $(1)/sbin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/wlanhcxmnc $(1)/sbin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/wlanhcx2essid $(1)/sbin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/wlanjohn2hcx $(1)/sbin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/hcxpcaptool $(1)/sbin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/wlanhcx2john $(1)/sbin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/hcxpsktool $(1)/sbin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/wlancow2hcxpmk $(1)/sbin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/wlanhcxinfo $(1)/sbin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/hcxhash2cap $(1)/sbin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/hcxhashcattool $(1)/sbin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/wlanhashhcx $(1)/sbin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/wlancap2wpasec $(1)/sbin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/wlanhc2hcx $(1)/sbin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/hcxwltool $(1)/sbin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/whoismac $(1)/sbin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/wlancap2wpasec $(1)/sbin/
+endef
+
+$(eval $(call BuildPackage,hcxtools))
include $(TOPDIR)/rules.mk
PKG_NAME:=i2pd
-PKG_VERSION:=2.22.0
+PKG_VERSION:=2.24.0
PKG_RELEASE:=1
PKG_BUILD_PARALLEL:=1
-PKG_SOURCE_URL:=https://codeload.github.com/PurpleI2P/i2pd/tar.gz/$(PKG_VERSION)?
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=6547d7a560482c5eda9106ae19267bc8afbb6af48fed3bebf423ade28103e173
-PKG_LICENSE:=BSD-3-clause
+PKG_SOURCE_URL:=https://codeload.github.com/PurpleI2P/i2pd/tar.gz/$(PKG_VERSION)?
+PKG_HASH:=809b37100f0f176432b01ab6edee96dc62b0f65d5bf7531e008a87117e742566
+
+PKG_MAINTAINER:=David Yang <mmyangfl@gmail.com>
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
TITLE:=full-featured C++ implementation of I2P client
URL:=https://github.com/PurpleI2P/i2pd
USERID:=i2pd:i2pd
- MAINTAINER:=David Yang <mmyangfl@gmail.com>
endef
define Package/i2pd/description
endef
define Package/i2pd/conffiles
+ /etc/config/i2pd
/etc/i2pd/i2pd.conf
- /etc/i2pd/subscriptions.txt
/etc/i2pd/tunnels.conf
endef
$(INSTALL_BIN) $(PKG_BUILD_DIR)/i2pd $(1)/usr/sbin
$(INSTALL_DIR) $(1)/usr/share/i2pd
$(CP) $(PKG_BUILD_DIR)/contrib/certificates $(1)/usr/share/i2pd
+ $(INSTALL_DIR) $(1)/etc/config
+ $(INSTALL_CONF) ./files/i2pd.config $(1)/etc/config/i2pd
$(INSTALL_DIR) $(1)/etc/i2pd
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/contrib/i2pd.conf $(1)/etc/i2pd
+ $(INSTALL_CONF) $(PKG_BUILD_DIR)/contrib/i2pd.conf $(1)/etc/i2pd
$(SED) ' \
s/127.0.0.1/192.168.1.1/g; \
s/datadir = \/var\/lib/datadir = \/etc/ \
' $(1)/etc/i2pd/i2pd.conf
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/contrib/subscriptions.txt $(1)/etc/i2pd
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/contrib/tunnels.conf $(1)/etc/i2pd
+ $(INSTALL_CONF) $(PKG_BUILD_DIR)/contrib/tunnels.conf $(1)/etc/i2pd
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/i2pd.init $(1)/etc/init.d/i2pd
endef
--- /dev/null
+config i2pd
+ # Set where i2pd should store its data (netDB, certificates, addresses, etc)
+ # By default we store it in RAM so no data is written to ROM.
+ # IMPORTANT!
+ # Data is consistently rewritten. DO NOT POINT IT TO INNER ROM. Flash will
+ # die.
+ option data_dir '/var/lib/i2pd'
+
+ # If you don't store i2pd data permanently, you can still choose to store only
+ # addressbook. If not, i2pd will be forced to do HTTP reseeding reseeding on
+ # every start. Storing addressbook may be useful if HTTP reseeding is not
+ # possible or blocked (by censorship).
+ # Even addressbook doesn't take up too much space, extroot is still strongly
+ # recommended to avoid flash wear-out.
+ #option addressbook_dir '/etc/i2pd/addressbook'
START=90
STOP=10
+# default params
PROG=/usr/sbin/i2pd
USER="i2pd"
GROUP="i2pd"
PIDFILE=/var/run/i2pd.pid
-DATADIR=/var/lib/i2pd
+#DATADIR=/var/lib/i2pd
+CONFFILE=/etc/i2pd/i2pd.conf
+
+. /lib/functions.sh
+
start_service() {
- ## RAM
- if [ ! -d $DATADIR ]; then
- mkdir -p $DATADIR
- ln -s /usr/share/i2pd/certificates $DATADIR/certificates
- ln -s /etc/i2pd/tunnels.conf $DATADIR/tunnels.conf
- # for peoples who not possible to use http reseeding
- ln -s /etc/i2pd/addressbook $DATADIR/addressbook
+ local data_dir
+ local addressbook_dir
+
+ config_load i2pd
+
+ config_get data_dir i2pd data_dir
+ config_get addressbook_dir i2pd addressbook_dir
+
+ ## Setting up data dir
+ if [ ! -d "$data_dir" ]; then
+ mkdir -p "$data_dir"
+ ln -s /usr/share/i2pd/certificates "$data_dir/certificates"
+ ln -s /etc/i2pd/tunnels.conf "$data_dir/tunnels.conf"
+ if [ -n "$addressbook_dir" ]; then
+ if [ ! -d "$addressbook_dir" ]; then
+ mkdir -p "$addressbook_dir"
+ fi
+ ln -s "$addressbook_dir" "$data_dir/addressbook"
+ fi
fi
## We need permissions
- chown $USER:$GROUP $DATADIR
- touch $PIDFILE
- chown $USER:adm $PIDFILE
+ chown "$USER:$GROUP" "$data_dir"
+ chown "$USER:$GROUP" "$addressbook_dir"
+ touch "$PIDFILE"
+ chown "$USER:adm" "$PIDFILE"
procd_open_instance
- procd_set_param command $PROG --service --conf=/etc/i2pd/i2pd.conf --pidfile $PIDFILE
+ procd_set_param command "$PROG" --service --conf="$CONFFILE" --pidfile "$PIDFILE"
## Don't know about i2pd user's HOME
- procd_set_param env HOME=$DATADIR
+ procd_set_param env "HOME=$DATADIR"
procd_set_param limits nofile=4096
procd_set_param stdout 1
procd_set_param stderr 1
- procd_set_param user $USER
- procd_set_param pidfile $PIDFILE
+ procd_set_param user "$USER"
+ procd_set_param pidfile "$PIDFILE"
procd_close_instance
}
PKG_NAME:=ibrdtn-tools
PKG_VERSION:=1.0.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.ibr.cs.tu-bs.de/projects/ibr-dtn/releases
PKG_INSTALL:=1
+include $(INCLUDE_DIR)/uclibc++.mk
include $(INCLUDE_DIR)/package.mk
define Package/ibrdtn-tools
PKG_NAME:=ibrdtnd
PKG_VERSION:=1.0.1
-PKG_RELEASE:=2
+PKG_RELEASE:=4
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.ibr.cs.tu-bs.de/projects/ibr-dtn/releases
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
+include $(INCLUDE_DIR)/uclibc++.mk
include $(INCLUDE_DIR)/package.mk
define Package/ibrdtnd
--- /dev/null
+--- a/src/routing/SchedulingBundleIndex.cpp
++++ b/src/routing/SchedulingBundleIndex.cpp
+@@ -28,7 +28,7 @@ namespace dtn
+ void SchedulingBundleIndex::remove(const dtn::data::BundleID &id)
+ {
+ ibrcommon::MutexLock l(_index_mutex);
+- for (priority_index::const_iterator iter = _priority_index.begin(); iter != _priority_index.end(); ++iter)
++ for (priority_index::iterator iter = _priority_index.begin(); iter != _priority_index.end(); ++iter)
+ {
+ const dtn::data::MetaBundle &b = (*iter);
+ if (id == (const dtn::data::BundleID&)b) {
+--- a/src/storage/MemoryBundleStorage.cpp
++++ b/src/storage/MemoryBundleStorage.cpp
+@@ -217,7 +217,7 @@ namespace dtn
+ ibrcommon::MutexLock l(_bundleslock);
+
+ // search for the bundle in the bundle list
+- const bundle_list::const_iterator iter = find(_bundles.begin(), _bundles.end(), id);
++ const bundle_list::iterator iter = find(_bundles.begin(), _bundles.end(), id);
+
+ // if no bundle was found throw an exception
+ if (iter == _bundles.end()) throw NoBundleFoundException();
+--- a/src/storage/MetaStorage.cpp
++++ b/src/storage/MetaStorage.cpp
+@@ -66,7 +66,7 @@ namespace dtn
+ {
+ std::set<dtn::data::EID> ret;
+
+- for (dtn::data::BundleList::const_iterator iter = begin(); iter != end(); ++iter)
++ for (const_iterator iter = begin(); iter != end(); ++iter)
+ {
+ const dtn::data::MetaBundle &bundle = (*iter);
+
--- /dev/null
+--- a/src/security/SecurityCertificateManager.cpp
++++ b/src/security/SecurityCertificateManager.cpp
+@@ -23,6 +23,7 @@
+ #include "Configuration.h"
+
+ #include <cstdlib>
++#include <cstring>
+
+ #include <ibrcommon/Logger.h>
+ #include <ibrcommon/ssl/TLSStream.h>
+--- a/src/security/SecurityManager.cpp
++++ b/src/security/SecurityManager.cpp
+@@ -28,6 +28,7 @@
+ #include <ibrdtn/security/PayloadConfidentialBlock.h>
+ #include <ibrdtn/security/ExtensionSecurityBlock.h>
+ #include <ibrcommon/Logger.h>
++#include <cstring>
+
+ #ifdef __DEVELOPMENT_ASSERTIONS__
+ #include <cassert>
--- /dev/null
+--- a/src/security/SecurityKeyManager.cpp
++++ b/src/security/SecurityKeyManager.cpp
+@@ -29,6 +29,7 @@
+ #include <fstream>
+ #include <fcntl.h>
+
++#include <openssl/bn.h>
+ #include <openssl/pem.h>
+ #include <openssl/rsa.h>
+ #include <openssl/err.h>
+--- a/src/security/exchange/DHProtocol.cpp
++++ b/src/security/exchange/DHProtocol.cpp
+@@ -28,6 +28,7 @@
+ #include <ibrcommon/ssl/HMacStream.h>
+ #include <ibrcommon/Logger.h>
+
++#include <openssl/dh.h>
+ #include <openssl/rand.h>
+ #include <openssl/pem.h>
+ #include "openssl_compat.h"
include $(TOPDIR)/rules.mk
PKG_NAME:=inadyn
-PKG_VERSION:=2.3.1
-PKG_RELEASE:=2
-PKG_MAINTAINER:=
-PKG_LICENSE:=GPL-2.0
-PKG_LICENSE_FILES:=COPYING
+PKG_VERSION:=2.5
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://github.com/troglobit/inadyn/releases/download/v$(PKG_VERSION)
-PKG_HASH:=81c942db6eab27fa16e868175bdb7aff963eeee06d48bc5443e0dcd6f7c2da40
+PKG_HASH:=4a9ad208671f62912428413da0282450b2d2c4da38f3c95c4ac975d048c41fcd
+
+PKG_MAINTAINER:=
+PKG_LICENSE:=GPL-2.0
+PKG_LICENSE_FILES:=COPYING
-PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
/etc/inadyn.conf
endef
-CONFIGURE_ARGS += --enable-shared --disable-static --enable-openssl
+TARGET_CFLAGS += $(FPIC)
+
+CONFIGURE_ARGS += \
+ --enable-shared \
+ --disable-static \
+ --enable-openssl \
+ --without-pic
define Package/inadyn/install
$(INSTALL_DIR) $(1)/etc
$(INSTALL_DIR) $(1)/usr/sbin
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/inadyn $(1)/usr/sbin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/inadyn $(1)/usr/sbin/
endef
$(eval $(call BuildPackage,inadyn))
+++ /dev/null
---- a/src/openssl.c
-+++ b/src/openssl.c
-@@ -25,17 +25,21 @@
-
- int ssl_init(void)
- {
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
- SSL_library_init();
- SSL_load_error_strings();
- OpenSSL_add_all_algorithms();
-+#endif
-
- return 0;
- }
-
- void ssl_exit(void)
- {
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
- ERR_free_strings();
- EVP_cleanup();
-+#endif
- }
-
- static int verify_callback(int preverify_ok, X509_STORE_CTX *ctx)
PKG_NAME:=iodine
PKG_VERSION:=0.7.0
-PKG_RELEASE:=3
+PKG_RELEASE:=4
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://code.kryo.se/iodine/
/* daemon(3) exists only in 4.4BSD or later, and in GNU libc */
-#if !defined(ANDROID) && !defined(WINDOWS32) && !(defined(BSD) && (BSD >= 199306)) && !defined(__GLIBC__)
-+#ifdef __UCLIBC__
++#ifdef __NO_DAEMON__
static int daemon(int nochdir, int noclose)
{
int fd, i;
PKG_NAME:=iotivity
PKG_VERSION:=1.2.1
-PKG_RELEASE=1
+PKG_RELEASE:=2
PKG_SOURCE:=${PKG_NAME}-${PKG_VERSION}.tar.gz
PKG_SOURCE_URL:=http://mirrors.kernel.org/${PKG_NAME}/${PKG_VERSION}/
--- /dev/null
+From 26c2798188497da22e0a70efebc47991dd755db2 Mon Sep 17 00:00:00 2001
+From: Philippe Coval <philippe.coval@osg.samsung.com>
+Date: Wed, 28 Jun 2017 04:54:05 +0200
+Subject: [PATCH] resource: Include functional header for g++-7.1.0
+
+It was tested on yocto poky master on iotivity-1.2.1 (and later):
+
+ resource/include/OCUtilities.h: \
+ In function 'OCStackResult OC::nil_guard(PtrT&&, FnT&&, ParamTs&& ...)':
+ resource/include/OCUtilities.h:85:21: \
+ error: 'bind' is not a member of 'std'
+ return std::bind(fn, p, std::ref(params)...)();
+
+ resource/include/OCApi.h: At global scope:
+ resource/include/OCApi.h:362:18: \
+ error: 'function' in namespace 'std' does not name a template type
+ typedef std::function<void(std::shared_ptr<OCResource>)> FindCallback;
+
+Change-Id: Ie1cab497c33fde394f77490a1d636eb36a563396
+Origin: https://gerrit.iotivity.org/gerrit/#/c/21069/
+Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
+Reviewed-on: https://gerrit.iotivity.org/gerrit/21067
+Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
+Tested-by: jenkins-iotivity <jenkins@iotivity.org>
+---
+ resource/include/OCApi.h | 2 --
+ resource/include/OCUtilities.h | 1 +
+ 2 files changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/resource/include/OCApi.h b/resource/include/OCApi.h
+index 4e14f29cc..af9721554 100644
+--- a/resource/include/OCApi.h
++++ b/resource/include/OCApi.h
+@@ -27,9 +27,7 @@
+ #include <map>
+ #include <memory>
+ #include <iterator>
+-#if defined(_MSC_VER)
+ #include <functional>
+-#endif
+
+ #include "octypes.h"
+ #include "OCHeaderOption.h"
+diff --git a/resource/include/OCUtilities.h b/resource/include/OCUtilities.h
+index 85039d0c1..f1c93045f 100644
+--- a/resource/include/OCUtilities.h
++++ b/resource/include/OCUtilities.h
+@@ -26,6 +26,7 @@
+ #include <memory>
+ #include <utility>
+ #include <exception>
++#include <functional>
+
+ #include <OCException.h>
+ #include <StringConstants.h>
+--
+2.17.1
+
include $(TOPDIR)/rules.mk
PKG_NAME:=irssi
-PKG_VERSION:=1.2.0
+PKG_VERSION:=1.2.1
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_SOURCE_URL:=https://github.com/irssi/irssi/releases/download/1.2.0/
-PKG_HASH:=1643fca1d8b35e5a5d7b715c9c889e1e9cdb7e578e06487901ea959e6ab3ebe5
+PKG_SOURCE_URL:=https://github.com/irssi/irssi/releases/download/1.2.1/
+PKG_HASH:=5466a1ed9612cfa707d9a37d60b29d027b4ac7d83c74ceb1a410e2b59edba92c
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING
-
PKG_CPE_ID:=cpe:/a:irssi:irssi
PKG_FIXUP:=autoreconf
+PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
Irssi is a terminal based IRC client for UNIX systems.
endef
+TARGET_LDFLAGS += -Wl,--gc-sections
+
CONFIGURE_ARGS += \
- --with-perl=no \
- --with-glib-prefix="$(STAGING_DIR)/usr" \
- --with-ssl="$(STAGING_DIR)/usr" \
+ --disable-glibtest \
--with-textui \
--without-bot \
- --disable-proxy
-
-EXTRA_CFLAGS+=$(TARGET_CPPFLAGS)
-EXTRA_LDFLAGS+=-lncurses
+ --without-perl \
+ --without-proxy
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/irssi
--- /dev/null
+From cff1385b398b59c74c535d6c0cd9deec561101fd Mon Sep 17 00:00:00 2001
+From: Rosen Penev <rosenp@gmail.com>
+Date: Fri, 15 Feb 2019 15:02:34 -0800
+Subject: [PATCH] Fix finding OpenSSL when 1.1 with deprecated APIs disabled
+
+SSL_library_init is a deprecated function. OPENSSL_init_ssl is not in 1.0.2.
+SSL_CTX_new is in both.
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index e8290dfd..8dde6095 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -319,7 +319,7 @@ PKG_CHECK_MODULES([OPENSSL], [openssl], [
+ CFLAGS="$CFLAGS $OPENSSL_CFLAGS"
+ LIBS="$LIBS $OPENSSL_LIBS"
+ ], [
+- AC_CHECK_LIB([ssl], [SSL_library_init], [
++ AC_CHECK_LIB([ssl], [SSL_CTX_new], [
+ LIBS="$LIBS -lssl -lcrypto"
+ ], [
+ AC_MSG_ERROR([The OpenSSL library was not found])
+--
+2.17.1
+
--- /dev/null
+#
+# Copyright (C) 2019 Banglang Huang <banglang.huang@foxmail.com>
+# Copyright (C) 2019 Rosy Song <rosysong@rosinson.com>
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=kea
+PKG_VERSION:=1.5.0
+PKG_RELEASE:=5
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://ftp.isc.org/isc/kea/$(PKG_VERSION)
+PKG_HASH:=edce4fab68ca7af607cf7f5bc86596e04fe0ef4b8e88906e339cdefcf21daaec
+
+PKG_MAINTAINER:=BangLang Huang<banglang.huang@foxmail.com>, Rosy Song<rosysong@rosinson.com>
+PKG_LICENSE:=MPL-2.0
+PKG_LICENSE_FILES:=COPYING
+
+HOST_BUILD_DEPENDS:=boost/host log4cplus/host openssl
+PKG_BUILD_DEPENDS:=kea/host
+HOST_BUILD_PARALLEL:=1
+PKG_BUILD_PARALLEL:=1
+
+PKG_INSTALL:=1
+PKG_FIXUP:=autoreconf
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
+
+define Package/kea/Default
+ SECTION:=net
+ CATEGORY:=Network
+ SUBMENU:=IP Addresses and Names
+ TITLE:=ISC Kea
+ URL:=https://www.isc.org/kea
+endef
+
+define Package/kea/description
+ Kea is an open source DHCPv4/DHCPv6 server being developed by Internet
+ Systems Consortium. Kea is a high-performance, extensible DHCP server
+ engine that is designed to be easily modified and extended with hooks
+ libraries. It provides DHCPv4 and DHCPv6 servers, a dynamic DNS update
+ module, a portable DHCP library, libdhcp++, control agent that provides
+ management REST interface, and a DHCP benchmarking tool, perfdhcp.
+endef
+
+define Package/kea-libs
+ $(call Package/kea/Default)
+ TITLE+= Libraries
+ DEPENDS:=+libopenssl +log4cplus \
+ +boost +boost-python3 +boost-system
+endef
+
+define Package/kea-dhcp4
+ $(call Package/kea/Default)
+ TITLE+= DHCP Server v4
+ DEPENDS:=+kea-libs
+endef
+
+define Package/kea-dhcp6
+ $(call Package/kea/Default)
+ TITLE+= DHCP Server v6
+ DEPENDS:=@IPV6 +kea-libs
+endef
+
+define Package/kea-dhcp-ddns
+ $(call Package/kea/Default)
+ TITLE+= DHCP - DDNS
+ DEPENDS:=+kea-libs
+endef
+
+define Package/kea-admin
+ $(call Package/kea/Default)
+ TITLE+= Admin
+ DEPENDS:= +kea-libs +python3
+endef
+
+define Package/kea-ctrl
+ $(call Package/kea/Default)
+ TITLE+= Control
+ DEPENDS:= +kea-dhcp4 +IPV6:kea-dhcp6 \
+ +kea-dhcp-ddns
+endef
+
+define Package/kea-lfc
+ $(call Package/kea/Default)
+ TITLE+= lfc
+ DEPENDS:=+kea-libs
+endef
+
+define Package/kea-perfdhcp
+ $(call Package/kea/Default)
+ TITLE+= perfdhcp
+ DEPENDS:=+kea-libs
+endef
+
+HOST_CONFIGURE_ARGS += \
+ --with-boost-include="$(STAGING_DIR_HOSTPKG)" \
+ --with-log4cplus="$(STAGING_DIR_HOSTPKG)" \
+ --with-openssl="$(STAGING_DIR)/usr" \
+ --enable-boost-headers-only \
+ --enable-static-link
+
+HOST_LDFLAGS += \
+ -Wl,--gc-sections,--as-needed
+
+CONFIGURE_ARGS += \
+ --with-boost-include="$(STAGING_DIR)/usr" \
+ --with-log4cplus="$(STAGING_DIR)/usr" \
+ --with-openssl="$(STAGING_DIR)/usr" \
+ --without-pic \
+ $(if $(CONFIG_PACKAGE_kea-perfdhcp),--enable-perfdhcp,)
+
+CONFIGURE_VARS += \
+ cross_compiling="yes"
+
+TARGET_CXXFLAGS += \
+ $(FPIC) \
+ -fdata-sections \
+ -ffunction-sections
+
+TARGET_LDFLAGS += \
+ -Wl,--gc-sections,--as-needed
+
+# Only compile the kea-msg-compiler which we need for
+# package compilation
+define Host/Compile
+ +$(HOST_MAKE_VARS) \
+ $(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR)/src/lib/exceptions $(HOST_MAKE_FLAGS)
+ +$(HOST_MAKE_VARS) \
+ $(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR)/src/lib/util $(HOST_MAKE_FLAGS)
+ +$(HOST_MAKE_VARS) \
+ $(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR)/src/lib/log $(HOST_MAKE_FLAGS)
+endef
+
+define Host/Install
+ $(INSTALL_BIN) $(HOST_BUILD_DIR)/src/lib/log/compiler/kea-msg-compiler \
+ $(STAGING_DIR_HOSTPKG)/bin/
+endef
+
+define Build/Compile
+ $(INSTALL_DIR) $(PKG_BUILD_DIR)/src/lib/log/compiler
+ $(INSTALL_BIN) $(STAGING_DIR_HOSTPKG)/bin/kea-msg-compiler \
+ $(PKG_BUILD_DIR)/src/lib/log/compiler/
+ $(call Build/Compile/Default)
+endef
+
+define Package/kea-libs/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
+endef
+
+define Package/kea-dhcp4/install
+ $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/kea
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kea-dhcp4 $(1)/usr/sbin/kea-dhcp4
+ $(CP) $(PKG_INSTALL_DIR)/etc/kea/kea-dhcp4.conf $(1)/etc/kea/
+endef
+
+define Package/kea-dhcp6/install
+ $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/kea
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kea-dhcp6 $(1)/usr/sbin/kea-dhcp6
+ $(CP) $(PKG_INSTALL_DIR)/etc/kea/kea-dhcp6.conf $(1)/etc/kea/
+endef
+
+define Package/kea-dhcp-ddns/install
+ $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/kea
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kea-dhcp-ddns $(1)/usr/sbin/kea-dhcp-ddns
+ $(CP) $(PKG_INSTALL_DIR)/etc/kea/kea-dhcp-ddns.conf $(1)/etc/kea/
+endef
+
+define Package/kea-admin/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kea-admin $(1)/usr/sbin/kea-admin
+endef
+
+define Package/kea-ctrl/install
+ $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/kea
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/keactrl $(1)/usr/sbin/keactrl
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kea-ctrl-agent $(1)/usr/sbin/kea-ctrl-agent
+ $(CP) $(PKG_INSTALL_DIR)/etc/kea/keactrl.conf $(1)/etc/kea/
+ $(CP) $(PKG_INSTALL_DIR)/etc/kea/kea-ctrl-agent.conf $(1)/etc/kea/
+ $(CP) $(PKG_INSTALL_DIR)/etc/kea/kea-netconf.conf $(1)/etc/kea/
+endef
+
+define Package/kea-lfc/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kea-lfc $(1)/usr/sbin/kea-lfc
+endef
+
+define Package/kea-perfdhcp/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/perfdhcp $(1)/usr/sbin/perfdhcp
+endef
+
+$(eval $(call HostBuild))
+$(eval $(call BuildPackage,kea-libs))
+$(eval $(call BuildPackage,kea-dhcp4))
+$(eval $(call BuildPackage,kea-dhcp6))
+$(eval $(call BuildPackage,kea-dhcp-ddns))
+$(eval $(call BuildPackage,kea-admin))
+$(eval $(call BuildPackage,kea-ctrl))
+$(eval $(call BuildPackage,kea-lfc))
+$(eval $(call BuildPackage,kea-perfdhcp))
--- /dev/null
+--- a/configure.ac
++++ b/configure.ac
+@@ -580,10 +580,10 @@ AC_TRY_COMPILE([
+ AC_MSG_RESULT(no))
+
+ AC_MSG_CHECKING(for usuable C++11 regex)
+-AC_TRY_RUN([
++AC_TRY_COMPILE([
+ #include <regex>
+-#include <iostream>
+-int main() {
++#include <iostream>],
++[int main() {
+ const std::regex regex(".*");
+ const std::string string = "This should match!";
+ const auto result = std::regex_search(string, regex);
--- /dev/null
+--- a/m4macros/ax_crypto.m4
++++ b/m4macros/ax_crypto.m4
+@@ -454,7 +454,7 @@ EOF
+ dnl Check availability of SHA-2
+ AC_MSG_CHECKING([support of SHA-2])
+ LIBS_SAVED=${LIBS}
+- LIBS="$LIBS $CRYPTO_LIBS"
++ LIBS="$LIBS $CRYPTO_LIBS -lpthread"
+ CPPFLAGS_SAVED=${CPPFLAGS}
+ CPPFLAGS="$CRYPTO_INCLUDES $CPPFLAGS"
+ AC_LINK_IFELSE(
--- /dev/null
+--- a/src/bin/admin/Makefile.am
++++ b/src/bin/admin/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ # Install kea-admin in sbin.
+ sbin_SCRIPTS = kea-admin
+--- a/src/bin/agent/Makefile.am
++++ b/src/bin/agent/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += -I$(top_srcdir)/src/bin -I$(top_builddir)/src/bin
+--- a/src/bin/d2/Makefile.am
++++ b/src/bin/d2/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += -I$(top_srcdir)/src/bin -I$(top_builddir)/src/bin
+--- a/src/bin/dhcp4/Makefile.am
++++ b/src/bin/dhcp4/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += -I$(top_srcdir)/src/bin -I$(top_builddir)/src/bin
+--- a/src/bin/dhcp6/Makefile.am
++++ b/src/bin/dhcp6/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += -I$(top_srcdir)/src/bin -I$(top_builddir)/src/bin
+--- a/src/bin/keactrl/Makefile.am
++++ b/src/bin/keactrl/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ # Install keactrl in sbin and the keactrl.conf required by the keactrl
+ # in etc. keactrl will look for its configuration file in the etc folder.
+--- a/src/bin/lfc/Makefile.am
++++ b/src/bin/lfc/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += -I$(top_srcdir)/src/bin -I$(top_builddir)/src/bin
+--- a/src/bin/netconf/Makefile.am
++++ b/src/bin/netconf/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += -I$(top_srcdir)/src/bin -I$(top_builddir)/src/bin
+--- a/src/bin/perfdhcp/Makefile.am
++++ b/src/bin/perfdhcp/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += -I$(top_srcdir)/src/bin -I$(top_builddir)/src/bin
+--- a/src/bin/shell/Makefile.am
++++ b/src/bin/shell/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ pkgpython_PYTHON = kea_conn.py kea_connector2.py kea_connector3.py
+
+--- a/src/hooks/dhcp/high_availability/Makefile.am
++++ b/src/hooks/dhcp/high_availability/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/hooks/dhcp/lease_cmds/Makefile.am
++++ b/src/hooks/dhcp/lease_cmds/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/hooks/dhcp/stat_cmds/Makefile.am
++++ b/src/hooks/dhcp/stat_cmds/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/hooks/dhcp/user_chk/Makefile.am
++++ b/src/hooks/dhcp/user_chk/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/lib/asiodns/Makefile.am
++++ b/src/lib/asiodns/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/lib/asiolink/Makefile.am
++++ b/src/lib/asiolink/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . testutils tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/lib/cc/Makefile.am
++++ b/src/lib/cc/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/lib/cfgrpt/Makefile.am
++++ b/src/lib/cfgrpt/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CXXFLAGS = $(KEA_CXXFLAGS)
+--- a/src/lib/config/Makefile.am
++++ b/src/lib/config/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/lib/config_backend/Makefile.am
++++ b/src/lib/config_backend/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/lib/cql/Makefile.am
++++ b/src/lib/cql/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . testutils tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES) $(CQL_CPPFLAGS)
+--- a/src/lib/cryptolink/Makefile.am
++++ b/src/lib/cryptolink/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES) $(CRYPTO_CFLAGS) $(CRYPTO_INCLUDES)
+--- a/src/lib/database/Makefile.am
++++ b/src/lib/database/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . testutils tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/lib/dhcp/Makefile.am
++++ b/src/lib/dhcp/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/lib/dhcp_ddns/Makefile.am
++++ b/src/lib/dhcp_ddns/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/lib/dhcpsrv/Makefile.am
++++ b/src/lib/dhcpsrv/Makefile.am
+@@ -1,6 +1,6 @@
+ AUTOMAKE_OPTIONS = subdir-objects
+
+-SUBDIRS = . testutils tests benchmarks
++SUBDIRS = . benchmarks
+
+ dhcp_data_dir = @localstatedir@/@PACKAGE@
+ kea_lfc_location = @prefix@/sbin/kea-lfc
+--- a/src/lib/dns/Makefile.am
++++ b/src/lib/dns/Makefile.am
+@@ -1,6 +1,6 @@
+ AUTOMAKE_OPTIONS = subdir-objects
+
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/lib/eval/Makefile.am
++++ b/src/lib/eval/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/lib/exceptions/Makefile.am
++++ b/src/lib/exceptions/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CXXFLAGS=$(KEA_CXXFLAGS)
+--- a/src/lib/hooks/Makefile.am
++++ b/src/lib/hooks/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/lib/http/Makefile.am
++++ b/src/lib/http/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/lib/log/Makefile.am
++++ b/src/lib/log/Makefile.am
+@@ -2,7 +2,6 @@ SUBDIRS = interprocess .
+ if !CROSS_COMPILING
+ SUBDIRS += compiler
+ endif
+-SUBDIRS += tests
+
+ AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/lib/log/interprocess/Makefile.am
++++ b/src/lib/log/interprocess/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += -DLOCKFILE_DIR=\"$(localstatedir)/run/$(PACKAGE_NAME)\"
+--- a/src/lib/mysql/Makefile.am
++++ b/src/lib/mysql/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . testutils tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES) $(MYSQL_CPPFLAGS)
+--- a/src/lib/pgsql/Makefile.am
++++ b/src/lib/pgsql/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . testutils tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES) $(PGSQL_CPPFLAGS)
+--- a/src/lib/process/Makefile.am
++++ b/src/lib/process/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . testutils tests
++SUBDIRS = .
+ dhcp_data_dir = @localstatedir@/@PACKAGE@
+ AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
+ AM_CPPFLAGS += -DDATA_DIR="\"$(dhcp_data_dir)\""
+--- a/src/lib/stats/Makefile.am
++++ b/src/lib/stats/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/lib/util/Makefile.am
++++ b/src/lib/util/Makefile.am
+@@ -1,6 +1,6 @@
+ AUTOMAKE_OPTIONS = subdir-objects
+
+-SUBDIRS = . io unittests tests python threads
++SUBDIRS = . io python threads
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/lib/util/threads/Makefile.am
++++ b/src/lib/util/threads/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+ AM_CXXFLAGS = $(KEA_CXXFLAGS)
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+--- a/src/lib/yang/Makefile.am
++++ b/src/lib/yang/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . testutils pretests tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES) $(SYSREPO_CPPFLAGS)
--- /dev/null
+--- a/src/lib/cryptolink/openssl_link.cc
++++ b/src/lib/cryptolink/openssl_link.cc
+@@ -79,7 +79,7 @@ CryptoLink::initialize() {
+
+ std::string
+ CryptoLink::getVersion() {
+- return (SSLeay_version(SSLEAY_VERSION));
++ return (OpenSSL_version(OPENSSL_VERSION));
+ }
+
+ } // namespace cryptolink
--- /dev/null
+if PACKAGE_keepalived
+
+menu "Configuration"
+
+config KEEPALIVED_BFD
+ bool
+ default n
+ prompt "Enable BFD support"
+ help
+ Builds support for BFD
+
+config KEEPALIVED_SHA1
+ bool
+ default y
+ prompt "Enable SHA1 support in genhash"
+ help
+ Builds support for using SHA1 with genhash
+
+config KEEPALIVED_LVS
+ bool
+ default y
+ prompt "Enable IPVS support"
+ help
+ Builds support for IPVS
+
+config KEEPALIVED_LVS_SYNCD
+ depends on KEEPALIVED_LVS
+ bool
+ default y
+ prompt "Enable IPVS syncd daemon control"
+ help
+ Builds support for configuring IPVS syncd daemon
+
+config KEEPALIVED_LVS_64BIT_STATS
+ depends on KEEPALIVED_LVS
+ bool
+ default y
+ prompt "Enable IPVS 64 bit stats"
+ help
+ Builds support for IPVS 64 bit stats
+
+config KEEPALIVED_FWMARK
+ depends on KEEPALIVED_LVS
+ bool
+ default y
+ prompt "Enable support for setting FWMARK on sockets"
+ help
+ Builds support for setting firewall mark on checker sockets
+
+config KEEPALIVED_SNMP_CHECKER
+ depends on KEEPALIVED_LVS
+ bool
+ default n
+ prompt "Enable SNMP support for checker (LVS)"
+ help
+ Builds support for using SNMP with LVS
+
+config KEEPALIVED_VRRP
+ bool
+ default y
+ prompt "Enable VRRP support"
+ help
+ Builds support for VRRP
+
+config KEEPALIVED_IPTABLES
+ depends on KEEPALIVED_VRRP
+ bool
+ default y
+ prompt "Enable iptables for VIP filtering"
+ help
+ Builds support for using iptables/ipsets for filtering packets
+ to VIPs
+
+config KEEPALIVED_SNMP_VRRP
+ depends on KEEPALIVED_VRRP
+ bool
+ default n
+ prompt "Enable SNMP support for VRRP"
+ help
+ Builds support for using SNMP with VRRP
+
+config KEEPALIVED_SNMP_RFC2
+ depends on KEEPALIVED_VRRP
+ bool
+ default n
+ prompt "Enable SNMP support for VRRPv2 (RFC2787)"
+ help
+ Builds support for using RFC2787 SNMP support for VRRPv2
+
+config KEEPALIVED_SNMP_RFC3
+ depends on KEEPALIVED_VRRP
+ bool
+ default n
+ prompt "Enable SNMP support for VRRPv3 (RFC6527)"
+ help
+ Builds support for using RFC6527 SNMP support for VRRPv3
+
+config KEEPALIVED_SNMP_REPLY_V3_FOR_V2
+ depends on KEEPALIVED_SNMP_RFC3
+ bool
+ default n
+ prompt "Enable SNMP v3 responses for VRRPv2 instances"
+ help
+ Builds support for using SNMP v3 responses for VRRPv2 instances
+
+config KEEPALIVED_DBUS
+ depends on KEEPALIVED_VRRP
+ bool
+ default n
+ prompt "Enable DBus support"
+ help
+ Builds support for using DBus with VRRP
+
+config KEEPALIVED_JSON
+ depends on KEEPALIVED_VRRP
+ bool
+ default n
+ prompt "Enable JSON support with VRRP"
+ help
+ Builds support for using JSON output for VRRP
+
+config KEEPALIVED_VRRP_AUTH
+ depends on KEEPALIVED_VRRP
+ bool
+ default y
+ prompt "Enable (removed) VRRPv2 authentication"
+ help
+ Builds support for using (removed) VRRPv2 authentication
+ Note: authentication was removed from the VRRPv2 specification
+ by RFC3768 in 2004.
+ Use of this option is non-compliant and can cause problems.
+ Avoid using if possible, except when using unicast, where it
+ can be helpful.
+
+config KEEPALIVED_CHECKSUM_COMPAT
+ depends on KEEPALIVED_VRRP
+ bool
+ default y
+ prompt "Enable checksum compatibility"
+ help
+ Builds support for interworking with instances using
+ old(incorrect) checksum method
+
+config KEEPALIVED_ROUTES
+ depends on KEEPALIVED_VRRP
+ bool
+ default y
+ prompt "Enable support for VRRP instances managing routes and rules"
+ help
+ Builds support for VRRP instances adding and removing IP
+ routes and rules
+
+config KEEPALIVED_LINKBEAT
+ depends on KEEPALIVED_VRRP
+ bool
+ default y
+ prompt "Enable support for linkbeat"
+ help
+ Builds support for using linkbeat polling to monitor the state
+ of interfaces
+
+endmenu
+
+endif # PACKAGE_keepalived
include $(TOPDIR)/rules.mk
PKG_NAME:=keepalived
-PKG_VERSION:=2.0.10
+PKG_VERSION:=2.0.16
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://www.keepalived.org/software
-PKG_HASH:=40e0e55afed9ca313d621a9c5878579696fafb5504dab521aadaf20ba6e7f597
+PKG_SOURCE_URL:=https://www.keepalived.org/software
+PKG_HASH:=f0c7dc86147a286913c1c2c918f557735016285d25779d4d2fce5732fcb888df
PKG_CPE_ID:=cpe:/a:keepalived:keepalived
PKG_LICENSE:=GPL-2.0+
PKG_MAINTAINER:=Ben Kelly <ben@benjii.net> \
Florian Eckert <fe@dev.tdt.de>
+PKG_CONFIG_DEPENDS += \
+ KEEPALIVED_VRRP \
+ KEEPALIVED_LVS \
+ KEEPALIVED_IPTABLES \
+ KEEPALIVED_BFD \
+ KEEPALIVED_SNMP_VRRP \
+ KEEPALIVED_SNMP_CHECKER \
+ KEEPALIVED_SNMP_RFC2 \
+ KEEPALIVED_SNMP_RFC3 \
+ KEEPALIVED_SNMP_REPLY_V3_FOR_V2 \
+ KEEPALIVED_DBUS \
+ KEEPALIVED_JSON \
+ KEEPALIVED_ROUTES \
+ IPV6
+
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/kernel.mk
+define Package/keepalived/config
+ source "$(SOURCE)/Config.in"
+endef
+
+# specifying +(IPV6&&KEEPALIVED_IPTABLES) in the DEPENDS definition doesn't work
+ifeq ($(CONFIG_KEEPALIVED_IPTABLES)$(CONFIG_IPV6),yy)
+ KEEPALIVED_DEPENDS_LIBIP6TC=+libip6tc
+endif
+
+# The +kmod-nf-ipvs line should be +KEEPALIVED_LVS:kmod-nf-ipvs,
+# but make menuconfig then reports :error: recursive dependency detected!
+# !!FIXME DEPENDS:= +KEEPALIVED_LVS:kmod-nf-ipvs
define Package/keepalived
SECTION:=net
CATEGORY:=Network
- TITLE:=Failover and monitoring daemon for LVS clusters
+ TITLE:=VRRP with failover and monitoring daemon for LVS clusters
URL:=http://www.keepalived.org/
DEPENDS:= \
- +libopenssl \
- +libip4tc \
- +IPV6:libip6tc \
- +libxtables \
- +kmod-macvlan \
+ +libnl-genl \
+libmagic \
- +libnl-route \
- +libnfnetlink \
- +kmod-nf-ipvs
+ +KEEPALIVED_VRRP:kmod-macvlan \
+ +KEEPALIVED_VRRP:libnl-route \
+ +KEEPALIVED_VRRP:libnfnetlink \
+ +KEEPALIVED_SHA1:libopenssl \
+ +KEEPALIVED_IPTABLES:libip4tc \
+ $(KEEPALIVED_DEPENDS_LIBIP6TC) \
+ +KEEPALIVED_IPTABLES:libxtables \
+ +KEEPALIVED_IPTABLES:libipset \
+ +(KEEPALIVED_SNMP_VRRP||KEEPALIVED_SNMP_CHECKER||KEEPALIVED_SNMP_RFC2||KEEPALIVED_SNMP_RFC3):libnetsnmp \
+ +KEEPALIVED_JSON:libjson-c \
+ +KEEPALIVED_DBUS:glib2
endef
define Package/keepalived/description
- Failover and monitoring daemon for Linux Virtual Server (LVS) clusters.
+ VRRP with failover and monitoring daemon for Linux Virtual Server (LVS) clusters.
endef
define Package/keepalived/conffiles
endef
CONFIGURE_ARGS+= \
- --disable-libipset \
- --disable-libnl \
- --enable-sha1 \
- --disable-snmp \
- --with-kernel-dir="$(LINUX_DIR)/$(LINUX_UAPI_DIR)" \
- --with-init=SYSV
+ --with-init=SYSV \
+ --disable-nftables
+
+ifeq ($(CONFIG_KEEPALIVED_VRRP),)
+CONFIGURE_ARGS += \
+ --disable-vrrp
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_LVS),)
+CONFIGURE_ARGS += \
+ --disable-lvs
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_BFD),y)
+CONFIGURE_ARGS += \
+ --enable-bfd
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_SHA1),y)
+CONFIGURE_ARGS += \
+ --enable-sha1
+endif
+
+
+ifeq ($(CONFIG_KEEPALIVED_VRRP),y)
+ifeq ($(CONFIG_KEEPALIVED_IPTABLES),)
+CONFIGURE_ARGS += \
+ --disable-iptables
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_IPSETS),)
+CONFIGURE_ARGS += \
+ --disable-libipset-dynamic
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_SNMP_VRRP),y)
+CONFIGURE_ARGS += \
+ --enable-snmp-vrrp
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_SNMP_RFC2),y)
+CONFIGURE_ARGS += \
+ --enable-snmp-rfcv2
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_SNMP_RFC3),y)
+CONFIGURE_ARGS += \
+ --enable-snmp-rfcv3
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_SNMP_RFC3),y)
+ifeq ($(CONFIG_KEEPALIVED_SNMP_REPLY_V3_FOR_V2),)
+CONFIGURE_ARGS += \
+ --disable-snmp-reply-v3-for-v2
+endif
+endif # CONFIG_KEEPALIVED_SNMP_RFC3
+
+ifeq ($(CONFIG_KEEPALIVED_JSON),y)
+CONFIGURE_ARGS += \
+ --enable-json
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_VRRP_AUTH),)
+CONFIGURE_ARGS += \
+ --disable-vrrp-auth
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_CHECKSUM_COMPAT),)
+CONFIGURE_ARGS += \
+ --disable-checksum-compat
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_DBUS),y)
+CONFIGURE_ARGS += \
+ --enable-dbus
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_LINKBEAT),)
+CONFIGURE_ARGS += \
+ --disable-linkbeat
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_ROUTES),)
+CONFIGURE_ARGS += \
+ --disable-routes
+endif
+endif # CONFIG_KEEPALIVED_VRRP
-MAKE_FLAGS += \
- STRIP="/bin/true" \
+
+ifeq ($(CONFIG_KEEPALIVED_LVS),y)
+ifeq ($(CONFIG_KEEPALIVED_LVS_SYNCD),)
+CONFIGURE_ARGS += \
+ --disable-lvs-syncd
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_LVS_64BIT_STATS),)
+CONFIGURE_ARGS += \
+ --disable-lvs-64bit-stats
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_FWMARK),)
+CONFIGURE_ARGS += \
+ --disable-fwmark
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_SNMP_CHECKER),y)
+CONFIGURE_ARGS += \
+ --enable-snmp-checker
+endif
+
+endif # CONFIG_KEEPALIVED_LVS
+
+
+MAKE_FLAGS += STRIP="/bin/true"
+TARGET_CFLAGS += -I$(LINUX_DIR)
define Package/keepalived/install
$(INSTALL_DIR) $(1)/usr/sbin
- $(CP) $(PKG_INSTALL_DIR)/usr/sbin/keepalived $(1)/usr/sbin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/keepalived \
+ $(1)/usr/sbin/
+
$(INSTALL_DIR) $(1)/usr/bin
- $(CP) $(PKG_INSTALL_DIR)/usr/bin/genhash $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/genhash \
+ $(1)/usr/bin/
+
$(INSTALL_DIR) $(1)/etc/keepalived
- $(CP) $(PKG_INSTALL_DIR)/etc/keepalived/keepalived.conf $(1)/etc/keepalived/
+ $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/keepalived/keepalived.conf \
+ $(1)/etc/keepalived/
+
$(INSTALL_DIR) $(1)/etc/init.d
- $(INSTALL_BIN) ./files/keepalived.init $(1)/etc/init.d/keepalived
+ $(INSTALL_BIN) ./files/keepalived.init \
+ $(1)/etc/init.d/keepalived
+
$(INSTALL_DIR) $(1)/etc/config
- $(INSTALL_CONF) ./files/keepalived.config $(1)/etc/config/keepalived
+ $(INSTALL_CONF) ./files/keepalived.config \
+ $(1)/etc/config/keepalived
+
$(INSTALL_DIR) $(1)/etc
- $(INSTALL_CONF) ./files/keepalived.user $(1)/etc/keepalived.user
+ $(INSTALL_CONF) ./files/keepalived.user \
+ $(1)/etc/keepalived.user
+
$(INSTALL_DIR) $(1)/etc/hotplug.d/keepalived
- $(INSTALL_DATA) ./files/hotplug-user $(1)/etc/hotplug.d/keepalived/01-user
+ $(INSTALL_DATA) ./files/hotplug-user \
+ $(1)/etc/hotplug.d/keepalived/01-user
+
+ifneq ($(CONFIG_KEEPALIVED_SNMP_VRRP)$(CONFIG_KEEPALIVED_SNMP_CHECKER)$(CONFIG_KEEPALIVED_SNMP_RFC2)$(CONFIG_KEEPALIVED_SNMP_RFC3),)
+ $(INSTALL_DIR) $(1)/usr/share/snmp/mibs
+endif
+
+ifneq ($(CONFIG_KEEPALIVED_SNMP_VRRP)$(CONFIG_KEEPALIVED_SNMP_CHECKER),)
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/snmp/mibs/KEEPALIVED-MIB.txt \
+ $(1)/usr/share/snmp/mibs/KEEPALIVED-MIB.txt
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_SNMP_RFC2),y)
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/snmp/mibs/VRRP-MIB.txt \
+ $(1)/usr/share/snmp/mibs/VRRP-MIB.txt
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_SNMP_RFC3),y)
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/snmp/mibs/VRRPv3-MIB.txt \
+ $(1)/usr/share/snmp/mibs/VRRPv3-MIB.txt
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_DBUS),y)
+ $(INSTALL_DIR) $(1)/etc/dbus-1/system.d
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/dbus-1/system.d/org.keepalived.Vrrp1.conf \
+ $(1)/etc/dbus-1/system.d/org.keepalived.Vrrp1.conf
+
+ $(INSTALL_DIR) $(1)/usr/share/dbus-1/interfaces
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/dbus-1/interfaces/org.keepalived.Vrrp1.Instance.xml \
+ $(1)/usr/share/dbus-1/interfaces/org.keepalived.Vrrp1.Instance.xml
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/dbus-1/interfaces/org.keepalived.Vrrp1.Vrrp.xml \
+ $(1)/usr/share/dbus-1/interfaces/org.keepalived.Vrrp1.Vrrp.xml
+endif
+
endef
$(eval $(call BuildPackage,keepalived))
# option vrrp_mcast_group4 "224.0.0.18" # optional, default 224.0.0.18
# option vrrp_mcast_group6 "f02::12" # optional, default ff02::12
# option linkbeat_use_polling "1"
+# option vrrp_startup_delay "5"
#config ipaddress
# option name "ipaddress0"
config_get notification_email $1 notification_email
print_list_indent notification_email
- print_elems_indent $1 $INDENT_1 notification_email_from smtp_server smtp_connect_timeout \
- router_id vrrp_mcast_group4 vrrp_mcast_group6
+ print_elems_indent $1 $INDENT_1 \
+ notification_email_from \
+ smtp_server \
+ smtp_connect_timeout \
+ router_id \
+ vrrp_mcast_group4 \
+ vrrp_mcast_group6 \
+ vrrp_startup_delay
}
print_ipaddress_indent() {
include $(TOPDIR)/rules.mk
PKG_NAME:=knot
-PKG_VERSION:=2.7.6
+PKG_VERSION:=2.8.2
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://secure.nic.cz/files/knot-dns/
-PKG_HASH:=a1cb1877f04f7c2549c977c2658cfafd07c7e0e924f8e8aa8d4ae4b707f697a2
+PKG_HASH:=00d24361a2406392c508904fad943536bae6369981686b4951378fc1c9a5a137
PKG_MAINTAINER:=Daniel Salzman <daniel.salzman@nic.cz>
PKG_LICENSE:=GPL-3.0 LGPL-2.0 0BSD BSD-3-Clause OLDAP-2.8
Usage: /usr/share/knot/runtests.sh
endef
+export KNOT_VERSION_FORMAT=release
+
CONFIGURE_ARGS += \
--enable-recvmmsg=no \
--disable-fastparser \
$(INSTALL_DIR) $(1)/usr/share/knot
$(INSTALL_BIN) ./files/runtests.sh $(1)/usr/share/knot/
- $(INSTALL_DIR) $(1)/usr/share/knot/tap
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/tests/tap/runtests $(1)/usr/share/knot/tap/
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/tests/tap/libtap.sh $(1)/usr/share/knot/tap/
+ $(INSTALL_DIR) $(1)/usr/share/knot/tap
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/tests/tap/.libs/runtests $(1)/usr/share/knot/tap/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/tests/tap/libtap.sh $(1)/usr/share/knot/tap/
$(INSTALL_DIR) $(1)/usr/share/knot/tests
find $(PKG_BUILD_DIR)/tests/$$$${module}/.libs -maxdepth 1 -executable -type f | \
xargs -I{} basename {} | \
xargs -I{} $(INSTALL_BIN) -T $(PKG_BUILD_DIR)/tests/$$$${module}/.libs/{} \
- $(1)/usr/share/knot/tests/$$$${module}_{}; \
+ $(1)/usr/share/knot/tests/$$$${module}_{}; \
done
endef
-ZSCANNER_TOOL="$BUILD"/zscanner-tool
+ZSCANNER_TOOL="$SOURCE"/zscanner-tool
- plan 80
+ plan 84
include $(TOPDIR)/rules.mk
PKG_NAME:=krb5
-PKG_VERSION:=1.16.2
-PKG_RELEASE:=1
+PKG_VERSION:=1.17
+PKG_RELEASE:=2
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
PKG_LICENSE_FILES:=NOTICE
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://web.mit.edu/kerberos/dist/krb5/1.16
-PKG_HASH:=9f721e1fe593c219174740c71de514c7228a97d23eb7be7597b2ae14e487f027
+PKG_SOURCE_URL:=https://web.mit.edu/kerberos/dist/krb5/1.17
+PKG_HASH:=5a6e2284a53de5702d3dc2be3b9339c963f9b5397d3fbbc53beb249380a781f5
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
TITLE:=Kerberos 5 Server
endef
+define Package/krb5-server-extras
+ $(call Package/krb5/Default)
+ DEPENDS:=+krb5-libs +libpthread
+ TITLE:=Kerberos 5 Admin Server
+endef
+
define Package/krb5-client
$(call Package/krb5/Default)
DEPENDS:=+krb5-libs
define Package/krb5-server/install
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/krb5kdc $(1)/etc/init.d/krb5kdc
-# $(INSTALL_DIR) $(1)/usr/bin
-# $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/sclient $(1)/usr/bin
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kadmin.local $(1)/usr/sbin
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kadmind $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kdb5_util $(1)/usr/sbin
-# $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kprop $(1)/usr/sbin
-# $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kpropd $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/krb5kdc $(1)/usr/sbin
-# $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/sim_server $(1)/usr/sbin
+endef
+
+define Package/krb5-server-extras/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kadmind $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kprop $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kpropd $(1)/usr/sbin
+endef
+
+define Package/krb5-server/postinst
+mkdir -p $${IPKG_INSTROOT}/etc/krb5kdc
+touch $${IPKG_INSTROOT}/etc/krb5kdc/kadm5.acl
endef
$(eval $(call BuildPackage,krb5-libs))
$(eval $(call BuildPackage,krb5-server))
+$(eval $(call BuildPackage,krb5-server-extras))
$(eval $(call BuildPackage,krb5-client))
[ -f /etc/krb5kdc/principal ] || ( echo; echo ) | kdb5_util create -s
/usr/sbin/krb5kdc
- /usr/sbin/kadmind
+ [ -x /usr/sbin/kadmind ] && /usr/sbin/kadmind
}
stop() {
killall krb5kdc 2> /dev/null
- killall kadmind 2> /dev/null
+ [ -x /usr/sbin/kadmind ] && killall kadmind 2> /dev/null
}
PKG_NAME:=lcdringer
PKG_VERSION:=0.0.3
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
+PKG_FIXUP:=autoreconf
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk
--- /dev/null
+--- a/configure.ac
++++ b/configure.ac
+@@ -87,9 +87,6 @@ fi
+ AC_SUBST(GSTREAMER_CFLAGS)
+ AC_SUBST(GSTREAMER_LIBS)
+
+-PKG_CHECK_MODULES([CHECK], [check >= 0.9.4],have_check=yes,have_check=no)
+-AM_CONDITIONAL(HAVE_CHECK, test x"$have_check" = "xyes")
+-
+ AM_PROG_VALAC([0.11.4])
+ AM_CONDITIONAL(HAVE_VALAC, test -x "$VALAC")
+
--- /dev/null
+#
+# Copyright (C) 2019 Lucian Cristian <lucian.cristian@gmail.com>
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libreswan
+PKG_VERSION:=3.29
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://download.libreswan.org/
+PKG_HASH:=d60e4160f43272b6307b697a13f79f56b5ec2bca61d83097ddadd8586a58ab3e
+
+PKG_LICENSE:=GPL-2.0
+PKG_MAINTAINER:=Lucian Cristian <lucian.cristian@gmail.com>
+
+PKG_BUILD_PARALLEL:=1
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libreswan/Default
+ TITLE:=Libreswan
+ URL:=https://libreswan.org/
+endef
+
+define Package/libreswan/Default/description
+ Libreswan is a free software implementation of the most widely supported and
+ standardized VPN protocol based on ("IPsec") and the Internet Key Exchange
+ ("IKE"). These standards are produced and maintained by the Internet
+ Engineering Task Force ("IETF").
+endef
+
+define Package/libreswan
+$(call Package/libreswan/Default)
+ SUBMENU:=VPN
+ SECTION:=net
+ CATEGORY:=Network
+ DEPENDS:= +IPV6:kmod-ip6-vti +IPV6:kmod-ipsec6 +ip-full +iptables-mod-ipsec \
+ +kmod-crypto-aead +kmod-crypto-authenc +kmod-crypto-gcm \
+ +kmod-crypto-hash +kmod-crypto-rng +kmod-ip-vti +kmod-ipsec \
+ +kmod-ipsec4 +kmod-ipt-ipsec +libevent2 +libevent2-pthreads \
+ +libldns +librt +libunbound-heavy +nss-utils +nspr
+ PROVIDES:=openswan
+ CONFLICTS:=strongswan
+ TITLE+= IPsec Server
+endef
+
+define Package/libreswan/description
+$(call Package/libreswan/Default/description)
+ Libreswan is a free software implementation of the most widely supported and
+ standardized VPN protocol based on ("IPsec") and the Internet Key Exchange
+ ("IKE"). These standards are produced and maintained by the Internet
+ Engineering Task Force ("IETF").
+endef
+
+define Package/libreswan/conffiles
+/etc/ipsec.d
+/etc/ipsec.conf
+/etc/ipsec.secrets
+endef
+
+MAKE_FLAGS+= \
+ WERROR_CFLAGS=" " \
+ USE_LINUX_AUDIT=false \
+ USE_LABELED_IPSEC=false \
+ USE_NM=false \
+ USE_LIBCURL=false \
+ USE_GLIBC_KERN_FLIP_HEADERS=true \
+ USE_XAUTHPAM=false \
+ USE_FIPSCHECK=false \
+ USE_LIBCAP_NG=false \
+ USE_SYSTEMD_WATCHDOG=false \
+ USE_SECCOMP=false\
+ INC_USRLOCAL="/usr" \
+ FINALRUNDIR="/var/run/pluto" \
+ ARCH="$(LINUX_KARCH)" \
+
+define Build/Prepare
+ $(call Build/Prepare/Default)
+ $(SED) 's,include $$$$(top_srcdir)/mk/manpages.mk,,g' \
+ $(PKG_BUILD_DIR)/mk/program.mk
+endef
+
+define Build/Compile
+ $(call Build/Compile/Default,all)
+endef
+
+define Package/libreswan/install
+ $(INSTALL_DIR) \
+ $(1)/etc/init.d \
+ $(1)/etc/ipsec.d/policies \
+ $(1)/usr/libexec/ipsec \
+ $(1)/usr/sbin
+
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ipsec \
+ $(1)/usr/sbin/ipsec
+ $(INSTALL_BIN) ./files/ipsec.init $(1)/etc/init.d/ipsec
+ $(INSTALL_DATA) ./files/ipsec.conf $(1)/etc/ipsec.conf
+ $(INSTALL_DATA) ./files/ipsec.secrets $(1)/etc/ipsec.secrets
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/ipsec.d/policies/* \
+ $(1)/etc/ipsec.d/policies/
+ $(CP) $(PKG_INSTALL_DIR)/usr/libexec/ipsec/* \
+ $(1)/usr/libexec/ipsec/
+endef
+
+$(eval $(call BuildPackage,libreswan))
--- /dev/null
+config setup
+ # needed when using PSK only. Not needed for X.509 based servers
+ uniqueids=no
+ virtual_private=%v4:10.0.0.0/8,%v4:192.168.0.0/16,%v4:172.16.0.0/12,%v4:25.0.0.0/8,%v4:100.64.0.0/10,%v4:!100.64.0.0/24
+
+conn ikev1
+ authby=secret
+ pfs=no
+ auto=add
+ rekey=no
+ left=%defaultroute
+ right=%any
+ ikev2=never
+ type=transport
+ leftprotoport=17/1701
+ rightprotoport=17/%any
+ dpddelay=15
+ dpdtimeout=30
+ dpdaction=clear
+
+conn ikev1-nat
+ also=ikev1
+ rightsubnet=vhost:%priv
+
+# include /etc/ipsec.d/*.conf
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=90
+STOP=10
+
+#USE_PROCD=1
+
+. $IPKG_INSTROOT/lib/functions.sh
+
+EXTRA_COMMANDS=status
+EXTRA_HELP=" status Show the status of the service"
+
+# Check that networking is up.
+[ "${NETWORKING}" = "no" ] && exit 6
+
+if [ $(id -u) -ne 0 ]; then
+ echo "permission denied (must be superuser)" | \
+ logger -s -p daemon.error -t ipsec_setup 2>&1
+ exit 4
+fi
+
+# where the private directory and the config files are
+IPSEC_EXECDIR="${IPSEC_EXECDIR-/usr/libexec/ipsec}"
+IPSEC_SBINDIR="${IPSEC_SBINDIR-/usr/sbin}"
+IPSEC_CONF="${IPSEC_CONF-/etc/ipsec.conf}"
+unset PLUTO_OPTIONS
+
+rundir=/var/run/pluto
+plutopid=${rundir}/pluto.pid
+plutoctl=${rundir}/pluto.ctl
+lockdir=/var/lock
+lockfile=${lockdir}/ipsec
+ipsecversion=/proc/net/ipsec_version
+kamepfkey=/proc/net/pfkey
+
+# /etc/resolv.conf related paths
+LIBRESWAN_RESOLV_CONF=${rundir}/libreswan-resolv-conf-backup
+ORIG_RESOLV_CONF=/etc/resolv.conf
+
+# misc setup
+umask 022
+
+# standardize PATH, and export it for everything else's benefit
+PATH="${IPSEC_SBINDIR}":/sbin:/usr/sbin:/usr/local/bin:/bin:/usr/bin
+export PATH
+
+mkdir -p ${rundir}
+chmod 700 ${rundir}
+
+verify_config() {
+ [ -f ${IPSEC_CONF} ] || exit 6
+ config_error=$(ipsec addconn --config ${IPSEC_CONF} --checkconfig 2>&1)
+ RETVAL=$?
+ if [ ${RETVAL} -gt 0 ]; then
+ echo "Configuration error - the following error occurred:"
+ echo ${config_error}
+ echo "IKE daemon status was not modified"
+ exit ${RETVAL}
+ fi
+}
+
+start() {
+ echo -n "Starting pluto IKE daemon for IPsec: "
+ ipsec _stackmanager start
+ # pluto searches the current directory, so this is required for making it selinux compliant
+ cd /
+ # Create nss db or convert from old format to new sql format
+ ipsec --checknss
+ # Enable nflog if configured
+ ipsec --checknflog > /dev/null
+ # This script will enter an endless loop to ensure pluto restarts on crash
+ ipsec _plutorun --config ${IPSEC_CONF} --nofork ${PLUTO_OPTIONS} & [ -d ${lockdir} ] || mkdir -p ${lockdir}
+ touch ${lockfile}
+ # Because _plutorun starts pluto at background we need to make sure pluto is started
+ # before we know if start was successful or not
+ for waitsec in 1 2 3 4 5; do
+ if status >/dev/null; then
+ RETVAL=0
+ break
+ else
+ echo -n "."
+ sleep 1
+ RETVAL=1
+ fi
+ done
+ if [ ${RETVAL} -ge 1 ]; then
+ rm -f ${lockfile}
+ fi
+ echo
+ return ${RETVAL}
+}
+
+stop() {
+ if [ -e ${plutoctl} ]; then
+ echo "Shutting down pluto IKE daemon"
+ ipsec whack --shutdown 2>/dev/null
+ # don't use seq, might not exist on embedded
+ for waitsec in 1 2 3 4 5 6 7 8 9 10; do
+ if [ -s ${plutopid} ]; then
+ echo -n "."
+ sleep 1
+ else
+ break
+ fi
+ done
+ echo
+ rm -f ${plutoctl} # we won't be using this anymore
+ fi
+ if [ -s ${plutopid} ]; then
+ # pluto did not die peacefully
+ pid=$(cat ${plutopid})
+ if [ -d /proc/${pid} ]; then
+ kill -TERM ${pid}
+ RETVAL=$?
+ sleep 5;
+ if [ -d /proc/${pid} ]; then
+ kill -KILL ${pid}
+ RETVAL=$?
+ fi
+ if [ ${RETVAL} -ne 0 ]; then
+ echo "Kill failed - removing orphaned ${plutopid}"
+ fi
+ else
+ echo "Removing orphaned ${plutopid}"
+ fi
+ rm -f ${plutopid}
+ fi
+
+ ipsec _stackmanager stop
+ ipsec --stopnflog > /dev/null
+
+ # cleaning up backup resolv.conf
+ if [ -e ${LIBRESWAN_RESOLV_CONF} ]; then
+ if grep 'Libreswan' ${ORIG_RESOLV_CONF} > /dev/null 2>&1; then
+ cp ${LIBRESWAN_RESOLV_CONF} ${ORIG_RESOLV_CONF}
+ fi
+ rm -f ${LIBRESWAN_RESOLV_CONF}
+ fi
+
+ rm -f ${lockfile}
+ return ${RETVAL}
+}
+
+restart() {
+ verify_config
+ stop
+ start
+ return $?
+}
+
+status() {
+ local RC
+ if [ -f ${plutopid} ]; then
+ if [ -r ${plutopid} ]; then
+ pid=$(cat ${plutopid})
+ if [ -n "$pid" -a -d /proc/${pid} ]; then
+ RC=0 # running
+ else
+ RC=1 # not running but pid exists
+ fi
+ else
+ RC=4 # insufficient privileges
+ fi
+ fi
+ if [ -z "${RC}" ]; then
+ if [ -f ${lockfile} ]; then
+ RC=2
+ else
+ RC=3
+ fi
+ fi
+ case "${RC}" in
+ 0)
+ echo "ipsec: pluto (pid ${pid}) is running..."
+ return 0
+ ;;
+ 1)
+ echo "ipsec: pluto dead but pid file exits"
+ return 1
+ ;;
+ 2)
+ echo "ipsec: pluto dead but subsys locked"
+ return 2
+ ;;
+ 4)
+ echo "ipsec: pluto status unknown due to insufficient privileges."
+ return 4
+ ;;
+ esac
+ echo "ipsec: pluto is stopped"
+ return 3
+}
+
+condrestart() {
+ verify_config
+ RETVAL=$?
+ if [ -f ${lockfile} ]; then
+ restart
+ RETVAL=$?
+ fi
+ return ${RETVAL}
+}
+
+version() {
+ ipsec version
+ return $?
+}
--- /dev/null
+# Unlike older openswan, this file does NOT contain any X.509 related
+# information such as private key :RSA statements as these now reside
+# in the NSS database. See:
+#
+# https://libreswan.org/wiki/Using_NSS_with_libreswan
+# https://libreswan.org/wiki/Migrating_from_Openswan
+
+# A.B.C.D %any : PSK "SsEeCcRrEeTt"
+: PSK "SsEeCcRrEeTt"
+# include /etc/ipsec.d/*.secrets
--- /dev/null
+From 9126ec99ca9e136666cbba5b48a8a02cb11350e0 Mon Sep 17 00:00:00 2001
+From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
+Date: Mon, 15 Oct 2018 11:16:54 -0400
+Subject: [PATCH] Automatically detect whether Curve25519 is available in NSS
+ for USE_DH31
+
+currently, USE_DH31 defaults to true.
+
+On some platforms, where older versions of NSS are in use, this should
+default to false.
+
+This patch automatically detects such systems and disables USE_DH31 on
+those platforms.
+
+It produces some amount of noise on stderr about CURVE_25519 during
+the build on those older platforms, but that seems ok to me, since
+those platforms should know that they're missing a modern feature.
+
+If you prefer less noise, i'd be happy with any modification that does
+a similar sort of autodetection.
+
+diff --git a/mk/userland-cflags.mk b/mk/userland-cflags.mk
+index d0a88b1aa1..7d88874b1c 100644
+--- a/mk/userland-cflags.mk
++++ b/mk/userland-cflags.mk
+@@ -240,7 +240,7 @@ ifeq ($(USE_DH24),true)
+ USERLAND_CFLAGS += -DUSE_DH24
+ endif
+
+-USE_DH31 ?= true
++USE_DH31 ?= $(shell if printf '\#include <secoidt.h>\nint main() { return SEC_OID_CURVE25519; }\n'| $(CC) -x c $$(pkg-config --cflags nss) -o /dev/null -; then echo true; else echo false; fi )
+ ifeq ($(USE_DH31),true)
+ USERLAND_CFLAGS += -DUSE_DH31
+ endif
include $(TOPDIR)/rules.mk
PKG_NAME:=lighttpd
-PKG_VERSION:=1.4.49
-PKG_RELEASE:=5
+PKG_VERSION:=1.4.53
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://download.lighttpd.net/lighttpd/releases-1.4.x
-PKG_HASH:=aedf49d7127d9e4c0ea56618e9e945a17674dc46a37ac7990120f87dd939ce09
+PKG_HASH:=3bdfce1cf3e9650a556a8c26fb15342c5717c63f530c54693db632b0371dcb78
PKG_LICENSE:=BSD-3c
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:lighttpd:lighttpd
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
TITLE:=$(2) module
endef
+ define Package/lighttpd-mod-$(1)/conffiles
+/etc/lighttpd/conf.d/$(4)-$(1).conf
+ endef
+
ifneq ($(SDK)$(CONFIG_PACKAGE_lighttpd-mod-$(1)),)
define Package/lighttpd-mod-$(1)/install
$(INSTALL_DIR) $$(1)/usr/lib/lighttpd
+++ /dev/null
-diff --git a/src/rand.c b/src/rand.c
-index 10cd025..63fbb0d 100644
---- a/src/rand.c
-+++ b/src/rand.c
-@@ -226,7 +226,9 @@ int li_rand_bytes (unsigned char *buf, int num)
- void li_rand_cleanup (void)
- {
- #ifdef USE_OPENSSL_CRYPTO
-+ #if OPENSSL_VERSION_NUMBER < 0x10100000L
- RAND_cleanup();
-+ #endif
- #endif
- safe_memclear(xsubi, sizeof(xsubi));
- }
+++ /dev/null
-From 72f2c7559a1cd75b6d86e72358b4b78cdeefa5f4 Mon Sep 17 00:00:00 2001
-From: yangfl <yangfl@users.noreply.github.com>
-Date: Fri, 1 Feb 2019 15:05:32 +0800
-Subject: [PATCH] Disable auto loading mod_authn_file
-
-Which will cause openwrt/packages#7737
----
- src/configfile.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/configfile.c b/src/configfile.c
-index 1b2651b9..29bb2aa4 100644
---- a/src/configfile.c
-+++ b/src/configfile.c
-@@ -482,9 +482,9 @@ static int config_insert(server *srv) {
- * existing lighttpd 1.4.x configs */
- if (contains_mod_auth) {
- if (append_mod_authn_file) {
-- ds = data_string_init();
-+ /* ds = data_string_init();
- buffer_copy_string_len(ds->value, CONST_STR_LEN("mod_authn_file"));
-- array_insert_unique(srv->srvconf.modules, (data_unset *)ds);
-+ array_insert_unique(srv->srvconf.modules, (data_unset *)ds); */
- }
- if (append_mod_authn_ldap) {
- #if defined(HAVE_LDAP_H) && defined(HAVE_LBER_H) && defined(HAVE_LIBLDAP) && defined(HAVE_LIBLBER)
---
-2.20.1
-
include $(TOPDIR)/rules.mk
PKG_NAME:=linknx
-PKG_VERSION:=0.0.1.36
-PKG_RELEASE:=1
-
-PKG_MAINTAINER:=Othmar Truniger <github@truniger.ch>
-PKG_LICENSE:=GPL-2.0+
+PKG_VERSION:=0.0.1.37
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-${PKG_VERSION}.tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/linknx/linknx/tar.gz/$(PKG_VERSION)?
-PKG_HASH:=e271ae32e2b68dff67864812c67e891d361f02960777bfb13f199dee0884f38f
+PKG_HASH:=3c3aaf8c409538153b15f5fb975a4485e58c4820cfea289a3f20777ba69782ab
-PKG_BUILD_DEPENDS:=argp-standalone
-PKG_FORTIFY_SOURCE:=1
+PKG_MAINTAINER:=Othmar Truniger <github@truniger.ch>
+PKG_LICENSE:=GPL-2.0-or-later
+PKG_LICENSE_FILES:=LICENSE
+PKG_BUILD_DEPENDS:=USE_UCLIBC:argp-standalone USE_MUSL:argp-standalone
PKG_FIXUP:=autoreconf
+include $(INCLUDE_DIR)/uclibc++.mk
include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/nls.mk
define Package/linknx
SECTION:=net
CATEGORY:=Network
TITLE:=KNX home automation platform
URL:=https://github.com/linknx/linknx
- DEPENDS:=+pthsem +lua +luac +libstdcpp +libcurl +libesmtp
+ DEPENDS:=+pthsem +lua +luac +libcurl +libesmtp $(CXX_DEPENDS) $(ICONV_DEPENDS)
endef
CONFIGURE_ARGS+= \
--- /dev/null
+From 8c025865f7cc57761d2227b897ba3980090391c2 Mon Sep 17 00:00:00 2001
+From: Rosen Penev <rosenp@gmail.com>
+Date: Mon, 24 Jun 2019 14:13:34 -0700
+Subject: [PATCH] Use AM_ICONV for properly supporting libiconv
+
+AM_ICONV does multiple things like checking the function parameters to
+avoid const problems.
+---
+ configure.ac | 1 +
+ src/Makefile.am | 2 +-
+ src/objectcontroller.cpp | 2 +-
+ 3 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 22f242c..23582cb 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -10,6 +10,7 @@ PKG_CONFIG=`which pkg-config`
+ AC_PROG_CXX
+ AC_PROG_CC
+ AC_PROG_RANLIB
++AM_ICONV
+ AC_CHECK_PTHSEM(2.0.4,yes,yes,no)
+ AC_CHECK_HEADER(argp.h,,[AC_MSG_ERROR([argp_parse not found])])
+ AC_SEARCH_LIBS(argp_parse,argp,,[AC_MSG_ERROR([argp_parse not found])])
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 6a4f493..6e0dc03 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -7,5 +7,5 @@ B64_CFLAGS=
+ B64_LIBS=
+ endif
+ AM_CPPFLAGS=-I$(top_srcdir)/include -I$(top_srcdir)/ticpp $(B64_CFLAGS) $(PTH_CPPFLAGS) $(LIBCURL_CPPFLAGS) $(LOG4CPP_CFLAGS) $(LUA_CFLAGS) $(MYSQL_CFLAGS) $(ESMTP_CFLAGS)
+-linknx_LDADD=$(top_srcdir)/ticpp/libticpp.a $(B64_LIBS) $(PTH_LDFLAGS) $(PTH_LIBS) $(LIBCURL) $(LOG4CPP_LIBS) $(LUA_LIBS) $(MYSQL_LIBS) $(ESMTP_LIBS) -lm
++linknx_LDADD=$(top_srcdir)/ticpp/libticpp.a $(LIBICONV) $(B64_LIBS) $(PTH_LDFLAGS) $(PTH_LIBS) $(LIBCURL) $(LOG4CPP_LIBS) $(LUA_LIBS) $(MYSQL_LIBS) $(ESMTP_LIBS) -lm
+ linknx_SOURCES=linknx.cpp logger.cpp ruleserver.cpp objectcontroller.cpp eibclient.c threads.cpp timermanager.cpp persistentstorage.cpp xmlserver.cpp smsgateway.cpp emailgateway.cpp knxconnection.cpp services.cpp suncalc.cpp luacondition.cpp ioport.cpp ruleserver.h objectcontroller.h threads.h timermanager.h persistentstorage.h xmlserver.h smsgateway.h emailgateway.h knxconnection.h services.h suncalc.h luacondition.h ioport.h logger.h
+diff --git a/src/objectcontroller.cpp b/src/objectcontroller.cpp
+index fb2fc3a..7622491 100644
+--- a/src/objectcontroller.cpp
++++ b/src/objectcontroller.cpp
+@@ -2925,7 +2925,7 @@ std::string StringObjectValue::transcode(const std::string &source, const std::s
+ iconv_t conversionDescriptor = iconv_open((targetEncoding + "//TRANSLIT").c_str(), sourceEncoding.c_str());
+ char cSource[source.size()];
+ memcpy(cSource, source.c_str(), source.size() + 1);
+- char *sourceStart = &cSource[0];
++ ICONV_CONST char *sourceStart = &cSource[0];
+ size_t sourceLength = source.size();
+ const size_t targetLength = source.size() * 5; // Should be pretty enough even in worst cases.
+ char targetChars[targetLength];
+
PKG_NAME:=linuxptp
PKG_VERSION:=2.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
-PKG_MAINTAINER:=Wojciech Dubowik <Wojciech.Dubowik@neratec.com>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
PKG_SOURCE_URL:=@SF/$(PKG_NAME)/v$(PKG_VERSION)
PKG_HASH:=0a24d9401e87d4af023d201e234d91127d82c350daad93432106284aa9459c7d
+PKG_MAINTAINER:=Wojciech Dubowik <Wojciech.Dubowik@neratec.com>
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING
SUBMENU:=Time Synchronization
TITLE:=Linux Precision Time Protocol (PTP) daemon
URL:=http://linuxptp.sourceforge.net/
- DEPENDS:=@!USE_UCLIBC +librt
endef
define Package/linuxptp/description
--- /dev/null
+# libloragw configuration
+
+if PACKAGE_libloragw
+
+config SX1301_SPI_PATH
+ string "SPI Dev Path"
+ default /dev/spidev0.0
+
+config SX1301_SPI_SPEED
+ string "SPI Speed (Hz)"
+ default 8000000
+
+endif
--- /dev/null
+#
+# Copyright (C) 2019 Xue Liu <liuxuenetmail@gmail>
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=lora-gateway-hal
+PKG_VERSION:=5.0.1
+PKG_RELEASE:=2
+
+PKG_SOURCE_URL:=https://codeload.github.com/Lora-net/lora_gateway/tar.gz/v$(PKG_VERSION)?
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_HASH:=1a0447d5e8183d08e6dce5f739f6872b9c57824b98f4078830d5ee21b15782c1
+PKG_MAINTAINER:=Xue Liu <liuxuenetmail@gmail.com>
+PKG_LICENSE_FILES:=LICENSE
+PKG_BUILD_DIR:=$(BUILD_DIR)/lora_gateway-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+define Package/libloragw
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=Driver/HAL library for Semtech SX1301
+ URL:=https://www.semtech.com/products/wireless-rf/lora-gateways/sx1301
+ DEPENDS:=+kmod-spi-dev @(!PACKAGE_lora-picogw-hal)
+endef
+
+define Package/libloragw/description
+ Driver/HAL library for Semtech SX1301 multi-channel modem and
+ SX1257/SX1255 RF transceivers.
+endef
+
+define Package/libloragw/config
+ source "$(SOURCE)/Config.in"
+endef
+
+define Package/libloragw-tests
+ SECTION:=net
+ CATEGORY:=Network
+ SUBMENU:=LoRaWAN
+ TITLE:=Test programs for libloragw to check functionality
+ DEPENDS:=+libloragw
+endef
+
+define Package/libloragw-utils
+ SECTION:=net
+ CATEGORY:=Network
+ SUBMENU:=LoRaWAN
+ TITLE:=Utility programs for libloragw
+ DEPENDS:=+libloragw
+endef
+
+CMAKE_OPTIONS += \
+ -DSPI_DEV_PATH:FILEPATH=$(CONFIG_SX1301_SPI_PATH) \
+ -DSPI_SPEED:STRING=$(CONFIG_SX1301_SPI_SPEED) \
+ -Dlora_gateway_build_shared_libs=ON
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/include/libloragw
+ $(CP) $(PKG_BUILD_DIR)/libloragw/inc/loragw_* $(1)/usr/include/libloragw
+ $(CP) $(PKG_BUILD_DIR)/libloragw/config.h $(1)/usr/include/libloragw
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_BUILD_DIR)/libloragw/libloragw.so* $(1)/usr/lib/
+ $(LN) libloragw.so.0 $(1)/usr/lib/libloragw.so
+ $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+ $(CP) $(PKG_BUILD_DIR)/loragw.pc $(1)/usr/lib/pkgconfig/
+endef
+
+define Package/libloragw/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_BUILD_DIR)/libloragw/libloragw.so.* $(1)/usr/lib/
+endef
+
+define Package/libloragw-tests/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/libloragw/test* $(1)/usr/sbin
+endef
+
+define Package/libloragw-utils/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/util_lbt_test $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/util_pkt_logger $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/util_spectral_scan $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/util_tx_continuous $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/util_spi_stress $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/util_tx_test $(1)/usr/sbin
+endef
+
+$(eval $(call BuildPackage,libloragw))
+$(eval $(call BuildPackage,libloragw-tests))
+$(eval $(call BuildPackage,libloragw-utils))
--- /dev/null
+From d49e5ea2988b2086c7deaa40d3e077531e449844 Mon Sep 17 00:00:00 2001
+From: Xue Liu <liuxuenetmail@gmail.com>
+Date: Thu, 21 Feb 2019 00:27:42 +0100
+Subject: [PATCH 1/3] - add cmake support
+
+Signed-off-by: Xue Liu <liuxuenetmail@gmail.com>
+---
+ CMakeLists.txt | 77 +++++++++++++++
+ cmake/loragw-config.cmake | 1 +
+ libloragw/CMakeLists.txt | 150 ++++++++++++++++++++++++++++++
+ libloragw/loragw.pc.in | 10 ++
+ libloragw/loragw_config.h.in | 14 +++
+ util_lbt_test/CMakeLists.txt | 23 +++++
+ util_pkt_logger/CMakeLists.txt | 29 ++++++
+ util_spectral_scan/CMakeLists.txt | 23 +++++
+ util_spi_stress/CMakeLists.txt | 23 +++++
+ util_tx_continuous/CMakeLists.txt | 23 +++++
+ util_tx_test/CMakeLists.txt | 23 +++++
+ 11 files changed, 396 insertions(+)
+ create mode 100644 CMakeLists.txt
+ create mode 100644 cmake/loragw-config.cmake
+ create mode 100644 libloragw/CMakeLists.txt
+ create mode 100644 libloragw/loragw.pc.in
+ create mode 100644 libloragw/loragw_config.h.in
+ create mode 100644 util_lbt_test/CMakeLists.txt
+ create mode 100644 util_pkt_logger/CMakeLists.txt
+ create mode 100644 util_spectral_scan/CMakeLists.txt
+ create mode 100644 util_spi_stress/CMakeLists.txt
+ create mode 100644 util_tx_continuous/CMakeLists.txt
+ create mode 100644 util_tx_test/CMakeLists.txt
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+new file mode 100644
+index 0000000..b112150
+--- /dev/null
++++ b/CMakeLists.txt
+@@ -0,0 +1,77 @@
++# -- Minimum required version
++cmake_minimum_required (VERSION 3.2)
++
++# -- Project name
++project (lora_gateway)
++
++# -- Various includes
++include (CMakePackageConfigHelpers)
++include (GNUInstallDirs)
++include (CheckFunctionExists)
++
++# -- set c99 standard default
++set(CMAKE_C_STANDARD 99)
++
++# -- options for shared lib (defaults off)
++option(lora_gateway_build_shared_libs "build as a shared library" OFF)
++set(BUILD_SHARED_LIBS ${lora_gateway_build_shared_libs})
++
++# -- Required to build
++set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
++set(THREADS_PREFER_PTHREAD_FLAG TRUE)
++find_package(Threads REQUIRED)
++
++# -- Versioning with git tag
++if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git)
++ execute_process(
++ COMMAND git describe --tags --always
++ WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
++ OUTPUT_VARIABLE "lora_gateway_VERSION"
++ ERROR_QUIET
++ OUTPUT_STRIP_TRAILING_WHITESPACE)
++ if(lora_gateway_VERSION STREQUAL "")
++ set(lora_gateway_VERSION 0)
++ endif(lora_gateway_VERSION STREQUAL "")
++ message( STATUS "Git full version: ${lora_gateway_VERSION}" )
++ execute_process(
++ COMMAND /bin/bash -c "git describe --tags --abbrev=0 | cut --delimiter='v' --fields=2"
++ WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
++ OUTPUT_VARIABLE "lora_gateway_VERSION_SHORT"
++ ERROR_QUIET
++ OUTPUT_STRIP_TRAILING_WHITESPACE)
++ if(lora_gateway_VERSION_SHORT STREQUAL "")
++ set(lora_gateway_VERSION_SHORT 0)
++ endif(lora_gateway_VERSION_SHORT STREQUAL "")
++ message( STATUS "Git version: ${lora_gateway_VERSION_SHORT}" )
++else(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git)
++ set(lora_gateway_VERSION_SHORT 0)
++ set(lora_gateway_VERSION 0)
++endif(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git)
++
++# when building, don't use the install RPATH already
++# (but later on when installing)
++SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
++if (NOT (${CMAKE_INSTALL_PREFIX} STREQUAL "/usr" ) )
++ SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
++endif()
++
++# -- add the core library
++add_subdirectory(libloragw)
++
++# -- add util_lbt_test
++add_subdirectory(util_lbt_test)
++
++# -- add util_pkt_logger
++add_subdirectory(util_pkt_logger)
++
++# -- add util_pkt_logger
++add_subdirectory(util_spectral_scan)
++
++# -- add util_spi_stress
++add_subdirectory(util_spi_stress)
++
++# -- add util_tx_continuous
++add_subdirectory(util_tx_continuous)
++
++# -- add util_tx_test
++add_subdirectory(util_tx_test)
+diff --git a/cmake/loragw-config.cmake b/cmake/loragw-config.cmake
+new file mode 100644
+index 0000000..ee8687b
+--- /dev/null
++++ b/cmake/loragw-config.cmake
+@@ -0,0 +1 @@
++include("${CMAKE_CURRENT_LIST_DIR}/loragw-targets.cmake")
+diff --git a/libloragw/CMakeLists.txt b/libloragw/CMakeLists.txt
+new file mode 100644
+index 0000000..b2102ae
+--- /dev/null
++++ b/libloragw/CMakeLists.txt
+@@ -0,0 +1,150 @@
++set(TARGET loragw)
++
++add_library(${TARGET} "")
++
++# -- add additional debug options
++# Set the DEBUG_* to 1 to activate debug mode in individual modules.
++# Warning: that makes the module *very verbose*, do not use for production
++option(DEBUG_AUX "Active debug mode in AUX module" OFF)
++option(DEBUG_SPI "Active debug mode in SPI module" OFF)
++option(DEBUG_REG "Active debug mode in REG module" OFF)
++option(DEBUG_HAL "Active debug mode in HAL module" OFF)
++option(DEBUG_GPIO "Active debug mode in GPIO module" OFF)
++option(DEBUG_LBT "Active debug mode in LBT module" OFF)
++option(DEBUG_GPS "Active debug mode in GPS module" OFF)
++
++message("-- Build with debug AUX: ${DEBUG_AUX}")
++message("-- Build with debug SPI: ${DEBUG_SPI}")
++message("-- Build with debug REG: ${DEBUG_REG}")
++message("-- Build with debug HAL: ${DEBUG_HAL}")
++message("-- Build with debug GPIO: ${DEBUG_GPIO}")
++message("-- Build with debug LBT: ${DEBUG_LBT}")
++message("-- Build with debug GPS: ${DEBUG_GPS}")
++
++# -- add the compile options
++target_compile_options(
++ ${TARGET}
++ PRIVATE
++ -Werror
++ -Wall
++ -Wextra
++)
++
++target_sources(${TARGET}
++ PRIVATE
++ ${CMAKE_CURRENT_LIST_DIR}/src/loragw_aux.c
++ ${CMAKE_CURRENT_LIST_DIR}/src/loragw_fpga.c
++ ${CMAKE_CURRENT_LIST_DIR}/src/loragw_gps.c
++ ${CMAKE_CURRENT_LIST_DIR}/src/loragw_hal.c
++ ${CMAKE_CURRENT_LIST_DIR}/src/loragw_lbt.c
++ ${CMAKE_CURRENT_LIST_DIR}/src/loragw_radio.c
++ ${CMAKE_CURRENT_LIST_DIR}/src/loragw_reg.c
++ ${CMAKE_CURRENT_LIST_DIR}/src/loragw_spi.native.c
++)
++
++# -- add the public headers
++set (${TARGET}_PUBLIC_HEADERS
++ ${CMAKE_CURRENT_LIST_DIR}/inc/loragw_aux.h
++ ${CMAKE_CURRENT_LIST_DIR}/inc/loragw_fpga.h
++ ${CMAKE_CURRENT_LIST_DIR}/inc/loragw_gps.h
++ ${CMAKE_CURRENT_LIST_DIR}/inc/loragw_hal.h
++ ${CMAKE_CURRENT_LIST_DIR}/inc/loragw_lbt.h
++ ${CMAKE_CURRENT_LIST_DIR}/inc/loragw_radio.h
++ ${CMAKE_CURRENT_LIST_DIR}/inc/loragw_reg.h
++)
++
++target_include_directories(${TARGET}
++ PRIVATE
++ ${CMAKE_CURRENT_LIST_DIR}
++ ${CMAKE_CURRENT_LIST_DIR}/inc
++ PUBLIC
++ $<INSTALL_INTERFACE:include>
++ $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
++ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/inc>
++)
++
++configure_file(${CMAKE_CURRENT_LIST_DIR}/${TARGET}_config.h.in "${CMAKE_CURRENT_BINARY_DIR}/config.h" @ONLY)
++
++target_link_libraries(${TARGET}
++ PUBLIC
++ Threads::Threads
++ m
++)
++
++set_target_properties(${TARGET} PROPERTIES VERSION ${lora_gateway_VERSION_SHORT})
++set_target_properties(${TARGET} PROPERTIES SOVERSION ${lora_gateway_VERSION_SHORT})
++set_target_properties(${TARGET} PROPERTIES PUBLIC_HEADER "${CMAKE_CURRENT_BINARY_DIR}/config.h;${${TARGET}_PUBLIC_HEADERS}")
++
++# -- add the install targets
++install (TARGETS ${TARGET}
++ EXPORT ${TARGET}_targets
++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT shlib
++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
++ PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${TARGET}
++ INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${TARGET}
++)
++
++# -- add pkg config file
++configure_file ("${CMAKE_CURRENT_LIST_DIR}/${TARGET}.pc.in" "${PROJECT_BINARY_DIR}/${TARGET}.pc" @ONLY)
++install (FILES ${PROJECT_BINARY_DIR}/${TARGET}.pc DESTINATION lib/pkgconfig)
++
++# -- write cmake package config file
++write_basic_package_version_file(
++ "${CMAKE_CURRENT_BINARY_DIR}/${TARGET}/${TARGET}-config-version.cmake"
++ VERSION ${lora_gateway_VERSION}
++ COMPATIBILITY AnyNewerVersion
++)
++
++export(EXPORT ${TARGET}_targets
++ FILE "${CMAKE_CURRENT_BINARY_DIR}/${TARGET}/${TARGET}-targets.cmake"
++ NAMESPACE Semtech::
++)
++
++configure_file(${PROJECT_SOURCE_DIR}/cmake/${TARGET}-config.cmake
++ "${CMAKE_CURRENT_BINARY_DIR}/${TARGET}/${TARGET}-config.cmake"
++ COPYONLY
++)
++
++set(ConfigPackageLocation lib/cmake/${TARGET})
++
++install(EXPORT ${TARGET}_targets
++ FILE ${TARGET}-targets.cmake
++ NAMESPACE Semtech::
++ DESTINATION ${ConfigPackageLocation}
++)
++
++install(
++ FILES ${PROJECT_SOURCE_DIR}/cmake/${TARGET}-config.cmake "${CMAKE_CURRENT_BINARY_DIR}/${TARGET}/${TARGET}-config-version.cmake"
++ DESTINATION ${ConfigPackageLocation}
++ COMPONENT Devel
++)
++
++# -- add test programs
++foreach(TEST test_loragw_spi test_loragw_gps test_loragw_reg test_loragw_hal test_loragw_cal)
++ add_executable(${TEST} "")
++
++ target_sources(${TEST}
++ PRIVATE
++ ${CMAKE_CURRENT_LIST_DIR}/tst/${TEST}.c
++ )
++
++ target_include_directories(${TEST}
++ PRIVATE
++ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
++ $<INSTALL_INTERFACE:include>
++ ${CMAKE_CURRENT_LIST_DIR}/inc
++ ${CMAKE_CURRENT_BINARY_DIR}
++ )
++
++ target_link_libraries(${TEST}
++ PRIVATE
++ loragw
++ )
++
++ install (
++ TARGETS ${TEST}
++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
++ )
++
++endforeach()
++
+diff --git a/libloragw/loragw.pc.in b/libloragw/loragw.pc.in
+new file mode 100644
+index 0000000..01bb3cf
+--- /dev/null
++++ b/libloragw/loragw.pc.in
+@@ -0,0 +1,10 @@
++prefix=@CMAKE_INSTALL_PREFIX@
++exec_prefix=${prefix}/bin
++includedir=${prefix}/include/libloragw
++libdir=${prefix}/lib
++
++Name: LIBLORAGW
++Description: BLANK_TEXT
++Version: @lora_gateway_VERSION@
++Cflags: -I${includedir}
++Libs: -L${libdir} -lloragw
+diff --git a/libloragw/loragw_config.h.in b/libloragw/loragw_config.h.in
+new file mode 100644
+index 0000000..76ad35a
+--- /dev/null
++++ b/libloragw/loragw_config.h.in
+@@ -0,0 +1,14 @@
++#ifndef _LORAGW_CONFIGURATION_H
++#define _LORAGW_CONFIGURATION_H
++
++#define LIBLORAGW_VERSION "@lora_gateway_VERSION_SHORT@"
++
++#cmakedefine01 DEBUG_AUX
++#cmakedefine01 DEBUG_SPI
++#cmakedefine01 DEBUG_REG
++#cmakedefine01 DEBUG_HAL
++#cmakedefine01 DEBUG_GPS
++#cmakedefine01 DEBUG_GPIO
++#cmakedefine01 DEBUG_LBT
++
++#endif
+diff --git a/util_lbt_test/CMakeLists.txt b/util_lbt_test/CMakeLists.txt
+new file mode 100644
+index 0000000..f184b82
+--- /dev/null
++++ b/util_lbt_test/CMakeLists.txt
+@@ -0,0 +1,23 @@
++
++add_executable(util_lbt_test "")
++target_sources(util_lbt_test
++ PRIVATE
++ ${CMAKE_CURRENT_LIST_DIR}/src/util_lbt_test.c
++)
++
++target_link_libraries(util_lbt_test
++ PUBLIC
++ loragw
++)
++
++set_target_properties(util_lbt_test PROPERTIES
++ RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
++)
++
++# add the install targets
++install (
++ TARGETS util_lbt_test
++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT shlib
++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
++)
+diff --git a/util_pkt_logger/CMakeLists.txt b/util_pkt_logger/CMakeLists.txt
+new file mode 100644
+index 0000000..82cfc86
+--- /dev/null
++++ b/util_pkt_logger/CMakeLists.txt
+@@ -0,0 +1,29 @@
++
++add_executable(util_pkt_logger "")
++target_sources(util_pkt_logger
++ PRIVATE
++ ${CMAKE_CURRENT_LIST_DIR}/src/util_pkt_logger.c
++ ${CMAKE_CURRENT_LIST_DIR}/src/parson.c
++)
++
++target_include_directories(util_pkt_logger
++ PRIVATE
++ ${CMAKE_CURRENT_LIST_DIR}/inc
++)
++
++target_link_libraries(util_pkt_logger
++ PUBLIC
++ loragw
++)
++
++set_target_properties(util_pkt_logger PROPERTIES
++ RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
++)
++
++# add the install targets
++install (
++ TARGETS util_pkt_logger
++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT shlib
++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
++)
+diff --git a/util_spectral_scan/CMakeLists.txt b/util_spectral_scan/CMakeLists.txt
+new file mode 100644
+index 0000000..3cec2a9
+--- /dev/null
++++ b/util_spectral_scan/CMakeLists.txt
+@@ -0,0 +1,23 @@
++
++add_executable(util_spectral_scan "")
++target_sources(util_spectral_scan
++ PRIVATE
++ ${CMAKE_CURRENT_LIST_DIR}/src/util_spectral_scan.c
++)
++
++target_link_libraries(util_spectral_scan
++ PUBLIC
++ loragw
++)
++
++set_target_properties(util_spectral_scan PROPERTIES
++ RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
++)
++
++# add the install targets
++install (
++ TARGETS util_spectral_scan
++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT shlib
++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
++)
+diff --git a/util_spi_stress/CMakeLists.txt b/util_spi_stress/CMakeLists.txt
+new file mode 100644
+index 0000000..d5f0eea
+--- /dev/null
++++ b/util_spi_stress/CMakeLists.txt
+@@ -0,0 +1,23 @@
++
++add_executable(util_spi_stress "")
++target_sources(util_spi_stress
++ PRIVATE
++ ${CMAKE_CURRENT_LIST_DIR}/src/util_spi_stress.c
++)
++
++target_link_libraries(util_spi_stress
++ PUBLIC
++ loragw
++)
++
++set_target_properties(util_spi_stress PROPERTIES
++ RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
++)
++
++# add the install targets
++install (
++ TARGETS util_spi_stress
++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT shlib
++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
++)
+diff --git a/util_tx_continuous/CMakeLists.txt b/util_tx_continuous/CMakeLists.txt
+new file mode 100644
+index 0000000..97c70e5
+--- /dev/null
++++ b/util_tx_continuous/CMakeLists.txt
+@@ -0,0 +1,23 @@
++
++add_executable(util_tx_continuous "")
++target_sources(util_tx_continuous
++ PRIVATE
++ ${CMAKE_CURRENT_LIST_DIR}/src/util_tx_continuous.c
++)
++
++target_link_libraries(util_tx_continuous
++ PUBLIC
++ loragw
++)
++
++set_target_properties(util_tx_continuous PROPERTIES
++ RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
++)
++
++# add the install targets
++install (
++ TARGETS util_tx_continuous
++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT shlib
++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
++)
+diff --git a/util_tx_test/CMakeLists.txt b/util_tx_test/CMakeLists.txt
+new file mode 100644
+index 0000000..6cc0e04
+--- /dev/null
++++ b/util_tx_test/CMakeLists.txt
+@@ -0,0 +1,23 @@
++
++add_executable(util_tx_test "")
++target_sources(util_tx_test
++ PRIVATE
++ ${CMAKE_CURRENT_LIST_DIR}/src/util_tx_test.c
++)
++
++target_link_libraries(util_tx_test
++ PUBLIC
++ loragw
++)
++
++set_target_properties(util_tx_test PROPERTIES
++ RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
++)
++
++# add the install targets
++install (
++ TARGETS util_tx_test
++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT shlib
++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
++)
+--
+2.20.1
+
--- /dev/null
+From ea2a7752295ab734464c2877e1f484a9bf08d58d Mon Sep 17 00:00:00 2001
+From: Xue Liu <liuxuenetmail@gmail.com>
+Date: Sun, 24 Feb 2019 01:03:48 +0100
+Subject: [PATCH 2/3] - add preprocessing for SPI_DEV_PATH and SPI_SPEED
+
+Signed-off-by: Xue Liu <liuxuenetmail@gmail.com>
+---
+ libloragw/src/loragw_spi.native.c | 11 +++++++++--
+ 1 file changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/libloragw/src/loragw_spi.native.c b/libloragw/src/loragw_spi.native.c
+index c01ed1c..fe251e3 100644
+--- a/libloragw/src/loragw_spi.native.c
++++ b/libloragw/src/loragw_spi.native.c
+@@ -53,8 +53,15 @@ Maintainer: Sylvain Miermont
+
+ #define READ_ACCESS 0x00
+ #define WRITE_ACCESS 0x80
+-#define SPI_SPEED 8000000
+-#define SPI_DEV_PATH "/dev/spidev0.0"
++
++#ifndef SPI_SPEED
++#error SPI_SPEED is not defined
++#endif
++
++#ifndef SPI_DEV_PATH
++#error SPI_DEV_PATH is not defined
++#endif
++
+ //#define SPI_DEV_PATH "/dev/spidev32766.0"
+
+ /* -------------------------------------------------------------------------- */
+--
+2.20.1
+
--- /dev/null
+From 81cd227c04ccb615cffaaa7b6372affb7964df2e Mon Sep 17 00:00:00 2001
+From: Xue Liu <liuxuenetmail@gmail.com>
+Date: Sun, 24 Feb 2019 01:04:29 +0100
+Subject: [PATCH 3/3] - add SPI_DEV_PATH and SPI_SPEED to cmake
+
+Signed-off-by: Xue Liu <liuxuenetmail@gmail.com>
+---
+ libloragw/CMakeLists.txt | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/libloragw/CMakeLists.txt b/libloragw/CMakeLists.txt
+index b2102ae..32abf51 100644
+--- a/libloragw/CMakeLists.txt
++++ b/libloragw/CMakeLists.txt
+@@ -13,6 +13,9 @@ option(DEBUG_GPIO "Active debug mode in GPIO module" OFF)
+ option(DEBUG_LBT "Active debug mode in LBT module" OFF)
+ option(DEBUG_GPS "Active debug mode in GPS module" OFF)
+
++set(SPI_DEV_PATH "/dev/spidev0.0" CACHE FILEPATH "Path of spi-dev")
++set(SPI_SPEED 8000000 CACHE STRING "SPI clock frequency")
++
+ message("-- Build with debug AUX: ${DEBUG_AUX}")
+ message("-- Build with debug SPI: ${DEBUG_SPI}")
+ message("-- Build with debug REG: ${DEBUG_REG}")
+@@ -20,6 +23,8 @@ message("-- Build with debug HAL: ${DEBUG_HAL}")
+ message("-- Build with debug GPIO: ${DEBUG_GPIO}")
+ message("-- Build with debug LBT: ${DEBUG_LBT}")
+ message("-- Build with debug GPS: ${DEBUG_GPS}")
++message("-- Build with SPI_DEV_PATH: ${SPI_DEV_PATH}")
++message("-- Build with SPI_SPEED: ${SPI_SPEED}")
+
+ # -- add the compile options
+ target_compile_options(
+@@ -28,6 +33,8 @@ target_compile_options(
+ -Werror
+ -Wall
+ -Wextra
++ -DSPI_DEV_PATH="${SPI_DEV_PATH}"
++ -DSPI_SPEED=${SPI_SPEED}
+ )
+
+ target_sources(${TARGET}
+--
+2.20.1
+
include $(TOPDIR)/rules.mk
PKG_NAME:=mDNSResponder
-PKG_VERSION:=878.200.35
-PKG_RELEASE:=1
+PKG_VERSION:=IETF104
+PKG_RELEASE:=2
PKG_SOURCE:=mDNSResponder-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://opensource.apple.com/tarballs/mDNSResponder/
-PKG_HASH:=e777b4d7dbf5eb1552cb80090ad1ede319067ab6e45e3990d68aabf6e8b3f5a0
+PKG_SOURCE_URL:=https://opensource.apple.com/tarballs/mDNSResponder/IETF/
+PKG_HASH:=b3a76fd35cf2d561546c2fbeaea1e5998b7e04b8330afb918ea5fbdeb202162c
PKG_MAINTAINER:=
PKG_LICENSE:=Apache-2.0
+++ /dev/null
---- a/Clients/Makefile
-+++ b/Clients/Makefile
-@@ -27,6 +27,8 @@
-
- #############################################################################
-
-+CC = @cc
-+
- # On OS X the dns_sd library functions are included in libSystem, which is implicitly linked with every executable
- # If /usr/lib/libSystem.dylib exists, then we're on OS X, so we don't need also to link the "dns_sd" shared library
- ifneq "$(wildcard /usr/lib/libSystem.dylib)" ""
-@@ -46,10 +48,10 @@ build:
- mkdir build
-
- build/dns-sd: build dns-sd.c ClientCommon.c
-- $(CC) $(filter %.c %.o, $+) $(LIBS) -I../mDNSShared -Wall -o $@
-+ $(CC) $(CFLAGS) $(filter %.c %.o, $+) $(LIBS) -I../mDNSShared -Wall -o $@
-
- build/dns-sd64: build dns-sd.c ClientCommon.c
-- $(CC) $(filter %.c %.o, $+) $(LIBS) -I../mDNSShared -Wall -o $@ -m64
-+ $(CC) $(CFLAGS) $(filter %.c %.o, $+) $(LIBS) -I../mDNSShared -Wall -o $@ -m64
-
- # Note, we can make a 'fat' version of dns-sd using 'lipo', as shown below, but we
- # don't, because we don't want or need a 'fat' version of dns-sd, because it will
---- a/mDNSPosix/Makefile
-+++ b/mDNSPosix/Makefile
-@@ -54,11 +54,12 @@ COREDIR = ../mDNSCore
- SHAREDDIR ?= ../mDNSShared
- JDK = /usr/jdk
-
--CC = @cc
-+CC = @gcc
- BISON = @bison
- FLEX = @flex
- ST = @strip
--LD = ld -shared
-+LD = @ld
-+SOOPTS = -shared
- CP = cp
- RM = rm
- LN = ln -s -f
-@@ -92,7 +93,7 @@ CFLAGS_DEBUG = -O0 -DMDNS_DEBUGMSGS=0
- CFLAGS_OS = -DNOT_HAVE_DAEMON -DNOT_HAVE_SA_LEN -DNOT_HAVE_SOCKLEN_T -DNOT_HAVE_IF_NAMETOINDEX \
- -DLOG_PERROR=0 -D_XPG4_2 -D__EXTENSIONS__ -DHAVE_BROKEN_RECVIF_NAME -DTARGET_OS_SOLARIS
- CC = gcc
--LD = gcc -shared
-+LD = gcc
- LINKOPTS = -lsocket -lnsl -lresolv
- JAVACFLAGS_OS += -I$(JDK)/include/solaris
- ifneq ($(DEBUG),1)
-@@ -149,7 +150,8 @@ -D__MAC_OS_X_VERSION_MIN_REQUIRED=__MAC_OS_X_VERSION_10_4 \
- -DHAVE_STRLCPY=1 \
- -D__APPLE_USE_RFC_2292 #-Wunreachable-code
- CC = gcc
--LD = $(CC) -dynamiclib
-+LD = $(CC)
-+SOOPTS= -dynamiclib
- LINKOPTS = -lSystem
- LDSUFFIX = dylib
- JDK = /System/Library/Frameworks/JavaVM.framework/Home
-@@ -172,8 +174,9 @@ NSSLIBFILE := $(NSSLIBNAME)-$(NSSVERSIO
- NSSLINKNAME := $(NSSLIBNAME).so.2
- NSSINSTPATH := /lib
-
--# If not otherwise defined, we install into /usr/lib and /usr/include
-+# If not otherwise defined, we install into /usr/lib, /usr/include and /etc
- # and our startup script is called mdns (e.g. /etc/init.d/mdns)
-+ETCBASE?=/etc
- INSTBASE?=/usr
- STARTUPSCRIPTNAME?=mdns
-
-@@ -259,7 +262,7 @@ libdns_sd: setup $(BUILDDIR)/libdns_sd.$
- CLIENTLIBOBJS = $(OBJDIR)/dnssd_clientlib.c.so.o $(OBJDIR)/dnssd_clientstub.c.so.o $(OBJDIR)/dnssd_ipc.c.so.o
-
- $(BUILDDIR)/libdns_sd.$(LDSUFFIX): $(CLIENTLIBOBJS)
-- @$(LD) $(LINKOPTS) -o $@ $+
-+ @$(LD) $(SOOPTS) $(LINKOPTS) -o $@ $+
- @$(STRIP) $@
-
- Clients: setup libdns_sd ../Clients/build/dns-sd
-@@ -294,7 +297,7 @@ InstalledManPages: $(MANPATH)/man8/mdnsd
- InstalledClients: $(INSTBASE)/bin/dns-sd
- @echo $+ " installed"
-
--InstalledNSS: $(NSSINSTPATH)/$(NSSLINKNAME) /etc/nss_mdns.conf $(MANPATH)/man5/nss_mdns.conf.5 $(MANPATH)/man8/libnss_mdns.8
-+InstalledNSS: $(NSSINSTPATH)/$(NSSLINKNAME) $(ETCBASE)/nss_mdns.conf $(MANPATH)/man5/nss_mdns.conf.5 $(MANPATH)/man8/libnss_mdns.8
- @echo $+ " installed"
-
- # Note: If daemon already installed, we make sure it's stopped before overwriting it
-@@ -347,19 +350,21 @@ $(INSTBASE)/bin/dns-sd: ../Clients/build
-
- $(NSSINSTPATH)/$(NSSLINKNAME): $(NSSINSTPATH)/$(NSSLIBFILE)
- $(LN) $< $@
-- ldconfig
-+ifdef LDCONFIG
-+ $(LDCONFIG)
-+endif
-
- $(NSSINSTPATH)/$(NSSLIBFILE): $(BUILDDIR)/$(NSSLIBFILE)
- $(CP) $< $@
- chmod 444 $@
-
--/etc/nss_mdns.conf: nss_mdns.conf
-+$(ETCBASE)/nss_mdns.conf: nss_mdns.conf
- $(CP) $< $@
- chmod 444 $@
- # Check the nsswitch.conf file.
- # If 'mdns' does not already appear on the "hosts:" line, then add it right before 'dns'
-- cp -f /etc/nsswitch.conf /etc/nsswitch.conf.pre-mdns
-- sed -e '/mdns/!s/^\(hosts:.*\)dns\(.*\)/\1mdns dns\2/' /etc/nsswitch.conf.pre-mdns > /etc/nsswitch.conf
-+ -[ -f $(ETCBASE)/nsswitch.conf ] && cp -f $(ETCBASE)/nsswitch.conf $(ETCBASE)/nsswitch.conf.pre-mdns
-+ -[ -f $(ETCBASE)/nsswitch.conf ] && sed -e '/mdns/!s/^\(hosts:.*\)dns\(.*\)/\1mdns dns\2/' $(ETCBASE)/nsswitch.conf.pre-mdns > $(ETCBASE)/nsswitch.conf
-
- #############################################################################
--- /dev/null
+--- a/mDNSShared/PlatformCommon.c
++++ b/mDNSShared/PlatformCommon.c
+@@ -43,6 +43,10 @@
+ typedef unsigned int socklen_t;
+ #endif
+
++#ifndef TCP_NOTSENT_LOWAT
++#define TCP_NOTSENT_LOWAT 25
++#endif
++
+ #if MDNS_MALLOC_DEBUGGING
+ // We ONLY want this for malloc debugging--on a running production system we want to deal with
+ // malloc failures, not just die. There is a small performance penalty for enabling these options
+++ /dev/null
-diff --git a/Clients/Makefile b/Clients/Makefile
-index 383af31..925c20e 100755
---- a/Clients/Makefile
-+++ b/Clients/Makefile
-@@ -36,7 +36,7 @@ TARGETS = build/dns-sd build/dns-sd64
- LIBS =
- else
- TARGETS = build/dns-sd
--LIBS = -L../mDNSPosix/build/prod/ -ldns_sd
-+LIBS ?= -L../mDNSPosix/build/prod/ -ldns_sd
- endif
-
- all: $(TARGETS)
-diff --git a/mDNSPosix/PosixDaemon.c b/mDNSPosix/PosixDaemon.c
-index 88b3292..e86a6c7 100644
---- a/mDNSPosix/PosixDaemon.c
-+++ b/mDNSPosix/PosixDaemon.c
-@@ -37,6 +37,11 @@
- #include <fcntl.h>
- #include <pwd.h>
- #include <sys/types.h>
-+#ifdef __linux__
-+#include <sys/capability.h> /* !!! We require libcap-dev for this. Oh well. */
-+/* prctl is required to enable inheriting of capabilities across setuid */
-+#include <sys/prctl.h>
-+#endif /* __linux__ */
-
- #if __APPLE__
- #undef daemon
-@@ -184,16 +189,50 @@ int main(int argc, char **argv)
-
- Reconfigure(&mDNSStorage);
-
-+#ifdef __linux__
-+ /*
-+ * SO_BINDTODEVICE is privileged operation; however, we can get
-+ * around it using capabilities instead of remaining root.
-+ */
-+ if (mStatus_NoError == err)
-+ {
-+ if (prctl(PR_SET_KEEPCAPS, 1, 0, 0, 0) < 0)
-+ perror("prctl PR_SET_KEEPCAPS");
-+ }
-+#endif /* __linux__ */
-+
- // Now that we're finished with anything privileged, switch over to running as "nobody"
- if (mStatus_NoError == err)
- {
- const struct passwd *pw = getpwnam("nobody");
- if (pw != NULL)
-+ {
- setuid(pw->pw_uid);
-+#ifdef __linux__
-+ struct __user_cap_header_struct ch;
-+ struct __user_cap_data_struct cd[_LINUX_CAPABILITY_U32S_3];
-+
-+ memset(&ch, 0, sizeof(ch));
-+ ch.version = _LINUX_CAPABILITY_VERSION_3;
-+ ch.pid = getpid();
-+ memset(&cd[0], 0, sizeof(cd));
-+ /* CAP_NET_RAW is required to use SO_BINDTODEVICE */
-+ int caps = CAP_TO_MASK(CAP_NET_RAW);
-+ cd[0].permitted = caps;
-+ cd[0].effective = caps;
-+ if (capset(&ch, &cd[0]) < 0)
-+ perror("capset");
-+#endif /* __linux__ */
-+ }
- else
- LogMsg("WARNING: mdnsd continuing as root because user \"nobody\" does not exist");
- }
-
-+#ifdef __linux__
-+ if (mStatus_NoError == err)
-+ err = mDNSPlatformPosixRefreshInterfaceList(&mDNSStorage);
-+#endif /* __linux__ */
-+
- if (mStatus_NoError == err)
- err = MainLoop(&mDNSStorage);
-
-diff --git a/mDNSPosix/mDNSPosix.c b/mDNSPosix/mDNSPosix.c
-index 6effa12..7c1d6eb 100755
---- a/mDNSPosix/mDNSPosix.c
-+++ b/mDNSPosix/mDNSPosix.c
-@@ -733,6 +741,29 @@ mDNSlocal int SetupSocket(struct sockaddr *intfAddr, mDNSIPPort port, int interf
- if (err < 0) { err = errno; perror("setsockopt - IP_MULTICAST_TTL"); }
- }
-
-+#ifdef __linux__
-+#ifdef SO_BINDTODEVICE
-+ if (err == 0 && interfaceIndex)
-+ {
-+ char ifname[IFNAMSIZ];
-+ if (if_indextoname(interfaceIndex, ifname))
-+ {
-+ err = setsockopt(*sktPtr, SOL_SOCKET, SO_BINDTODEVICE, ifname, strlen(ifname));
-+ if (err < 0)
-+ {
-+ err = errno;
-+ perror("setsockopt - SO_BINDTODEVICE");
-+ }
-+ }
-+ else
-+ {
-+ err = errno;
-+ perror("if_indextoname");
-+ }
-+ }
-+#endif /* SO_BINDTODEVICE */
-+#endif /* __linux__ */
-+
- // And start listening for packets
- if (err == 0)
- {
-@@ -814,6 +845,29 @@ mDNSlocal int SetupSocket(struct sockaddr *intfAddr, mDNSIPPort port, int interf
- if (err < 0) { err = errno; perror("setsockopt - IPV6_MULTICAST_HOPS"); }
- }
-
-+#ifdef __linux__
-+#ifdef SO_BINDTODEVICE
-+ if (err == 0 && interfaceIndex)
-+ {
-+ char ifname[IFNAMSIZ];
-+ if (if_indextoname(interfaceIndex, ifname))
-+ {
-+ err = setsockopt(*sktPtr, SOL_SOCKET, SO_BINDTODEVICE, ifname, strlen(ifname));
-+ if (err < 0)
-+ {
-+ err = errno;
-+ perror("setsockopt - SO_BINDTODEVICE");
-+ }
-+ }
-+ else
-+ {
-+ err = errno;
-+ perror("if_indextoname");
-+ }
-+ }
-+#endif /* SO_BINDTODEVICE */
-+#endif /* __linux__ */
-+
- // And start listening for packets
- if (err == 0)
- {
-@@ -958,19 +1017,14 @@ mDNSlocal int SetupInterfaceList(mDNS *const m)
- int err = 0;
- struct ifi_info *intfList = get_ifi_info(AF_INET, mDNStrue);
- struct ifi_info *firstLoopback = NULL;
-+ struct ifi_info **p = &intfList;
-
- assert(m != NULL);
- debugf("SetupInterfaceList");
-
-- if (intfList == NULL) err = ENOENT;
--
- #if HAVE_IPV6
-- if (err == 0) /* Link the IPv6 list to the end of the IPv4 list */
-- {
-- struct ifi_info **p = &intfList;
-- while (*p) p = &(*p)->ifi_next;
-- *p = get_ifi_info(AF_INET6, mDNStrue);
-- }
-+ while (*p) p = &(*p)->ifi_next;
-+ *p = get_ifi_info(AF_INET6, mDNStrue);
- #endif
-
- if (err == 0)
-@@ -1046,7 +1100,7 @@ mDNSlocal mStatus OpenIfNotifySocket(int *pFD)
- /* Subscribe the socket to Link & IP addr notifications. */
- mDNSPlatformMemZero(&snl, sizeof snl);
- snl.nl_family = AF_NETLINK;
-- snl.nl_groups = RTMGRP_LINK | RTMGRP_IPV4_IFADDR;
-+ snl.nl_groups = RTMGRP_LINK | RTMGRP_IPV4_IFADDR | RTMGRP_IPV6_IFADDR;
- ret = bind(sock, (struct sockaddr *) &snl, sizeof snl);
- if (0 == ret)
- *pFD = sock;
-@@ -1124,11 +1178,18 @@ mDNSlocal mDNSu32 ProcessRoutingNotification(int sd)
- PrintNetLinkMsg(pNLMsg);
- #endif
-
-+ // this result isn't used anywhere as a number, just as
-+ // non-zero - however, I have seen devices with more than 32
-+ // interfaces at some point..
-+ // (on Linux, every tunnel increases index for example)
-+
- // Process the NetLink message
- if (pNLMsg->nlmsg_type == RTM_GETLINK || pNLMsg->nlmsg_type == RTM_NEWLINK)
-- result |= 1 << ((struct ifinfomsg*) NLMSG_DATA(pNLMsg))->ifi_index;
-+ result |= 1;
-+ // << ((struct ifinfomsg*) NLMSG_DATA(pNLMsg))->ifi_index;
- else if (pNLMsg->nlmsg_type == RTM_DELADDR || pNLMsg->nlmsg_type == RTM_NEWADDR)
-- result |= 1 << ((struct ifaddrmsg*) NLMSG_DATA(pNLMsg))->ifa_index;
-+ result |= 1;
-+ // << ((struct ifaddrmsg*) NLMSG_DATA(pNLMsg))->ifa_index;
-
- // Advance pNLMsg to the next message in the buffer
- if ((pNLMsg->nlmsg_flags & NLM_F_MULTI) != 0 && pNLMsg->nlmsg_type != NLMSG_DONE)
-@@ -1299,8 +1360,12 @@ mDNSexport mStatus mDNSPlatformInit(mDNS *const m)
- if (err == mStatus_NoError) err = SetupSocket(&sa, zeroIPPort, 0, &m->p->unicastSocket6);
- #endif
-
-+ // In Linux case, we can't set up sockets with different owner -
-+ // it blows up SO_REUSEPORT. So we do this step bit later.
-+#ifndef __linux__
- // Tell mDNS core about the network interfaces on this machine.
- if (err == mStatus_NoError) err = SetupInterfaceList(m);
-+#endif /* !__linux__ */
-
- // Tell mDNS core about DNS Servers
- mDNS_Lock(m);
-diff --git a/mDNSPosix/mDNSUNP.c b/mDNSPosix/mDNSUNP.c
-index b392fc7..f551ad5 100755
---- a/mDNSPosix/mDNSUNP.c
-+++ b/mDNSPosix/mDNSUNP.c
-@@ -63,6 +63,7 @@
- #if defined(AF_INET6) && HAVE_IPV6 && HAVE_LINUX
- #include <netdb.h>
- #include <arpa/inet.h>
-+#include <linux/if_addr.h>
-
- /* Converts a prefix length to IPv6 network mask */
- void plen_to_mask(int plen, char *addr) {
-@@ -127,6 +128,8 @@
- nitems = fscanf(fp, ifnameFmt, ifname);
- if (nitems != 1) break;
-
-+ if (flags & IFA_F_DEPRECATED) continue;
-+
- if (strcmp(lastname, ifname) == 0) {
- if (doaliases == 0)
- continue; /* already processed this interface */
-diff --git a/mDNSShared/dnsextd_parser.y b/mDNSShared/dnsextd_parser.y
-index 18c5990..d4b63ce 100644
---- a/mDNSShared/dnsextd_parser.y
-+++ b/mDNSShared/dnsextd_parser.y
-@@ -15,6 +15,8 @@
- * limitations under the License.
- */
-
-+%parse-param { void *context }
-+
- %{
- #include <stdio.h>
- #include <stdlib.h>
-@@ -23,7 +25,7 @@
- #include "DebugServices.h"
- #include "dnsextd.h"
-
--void yyerror( const char* error );
-+void yyerror( void *context, const char* error );
- int yylex(void);
-
-
-@@ -409,7 +419,7 @@ int yywrap(void);
-
- extern int yylineno;
-
--void yyerror( const char *str )
-+void yyerror( void *context, const char *str )
- {
- fprintf( stderr,"%s:%d: error: %s\n", g_filename, yylineno, str );
- }
+++ /dev/null
---- a/Clients/dns-sd.c
-+++ b/Clients/dns-sd.c
-@@ -2281,7 +2281,7 @@ Fail:
-
- // NOT static -- otherwise the compiler may optimize it out
- // The "@(#) " pattern is a special prefix the "what" command looks for
--const char VersionString_SCCS[] = "@(#) dns-sd " STRINGIFY(mDNSResponderVersion) " (" __DATE__ " " __TIME__ ")";
-+const char VersionString_SCCS[] = "@(#) dns-sd " STRINGIFY(mDNSResponderVersion);
-
- #if _BUILDING_XCODE_PROJECT_
- // If the process crashes, then this string will be magically included in the automatically-generated crash log
---- a/mDNSPosix/PosixDaemon.c
-+++ b/mDNSPosix/PosixDaemon.c
-@@ -290,9 +290,9 @@ asm (".desc ___crashreporter_info__, 0x1
-
- // For convenience when using the "strings" command, this is the last thing in the file
- #if mDNSResponderVersion > 1
--mDNSexport const char mDNSResponderVersionString_SCCS[] = "@(#) mDNSResponder-" STRINGIFY(mDNSResponderVersion) " (" __DATE__ " " __TIME__ ")";
-+mDNSexport const char mDNSResponderVersionString_SCCS[] = "@(#) mDNSResponder-" STRINGIFY(mDNSResponderVersion);
- #elif MDNS_VERSIONSTR_NODTS
- mDNSexport const char mDNSResponderVersionString_SCCS[] = "@(#) mDNSResponder (Engineering Build)";
- #else
--mDNSexport const char mDNSResponderVersionString_SCCS[] = "@(#) mDNSResponder (Engineering Build) (" __DATE__ " " __TIME__ ")";
-+mDNSexport const char mDNSResponderVersionString_SCCS[] = "@(#) mDNSResponder (Engineering Build)";
- #endif
---- a/mDNSShared/Java/JNISupport.c
-+++ b/mDNSShared/Java/JNISupport.c
-@@ -1069,4 +1069,4 @@ exit:
-
- // NOT static -- otherwise the compiler may optimize it out
- // The "@(#) " pattern is a special prefix the "what" command looks for
--const char VersionString_SCCS[] = "@(#) libjdns_sd " STRINGIFY(mDNSResponderVersion) " (" __DATE__ " " __TIME__ ")";
-+const char VersionString_SCCS[] = "@(#) libjdns_sd " STRINGIFY(mDNSResponderVersion);
---- a/mDNSShared/dnsextd.c
-+++ b/mDNSShared/dnsextd.c
-@@ -3136,7 +3136,7 @@ mDNS mDNSStorage;
-
- // For convenience when using the "strings" command, this is the last thing in the file
- // The "@(#) " pattern is a special prefix the "what" command looks for
--const char mDNSResponderVersionString_SCCS[] = "@(#) dnsextd " STRINGIFY(mDNSResponderVersion) " (" __DATE__ " " __TIME__ ")";
-+const char mDNSResponderVersionString_SCCS[] = "@(#) dnsextd " STRINGIFY(mDNSResponderVersion);
-
- #if _BUILDING_XCODE_PROJECT_
- // If the process crashes, then this string will be magically included in the automatically-generated crash log
---- a/mDNSShared/dnssd_clientlib.c
-+++ b/mDNSShared/dnssd_clientlib.c
-@@ -363,4 +363,4 @@ DNSServiceErrorType DNSSD_API TXTRecordG
-
- // NOT static -- otherwise the compiler may optimize it out
- // The "@(#) " pattern is a special prefix the "what" command looks for
--const char VersionString_SCCS_libdnssd[] DNSSD_USED = "@(#) libdns_sd " STRINGIFY(mDNSResponderVersion) " (" __DATE__ " " __TIME__ ")";
-+const char VersionString_SCCS_libdnssd[] DNSSD_USED = "@(#) libdns_sd " STRINGIFY(mDNSResponderVersion);
include $(TOPDIR)/rules.mk
PKG_NAME:=memcached
-PKG_VERSION:=1.5.2
+PKG_VERSION:=1.5.14
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://memcached.org/files
-PKG_HASH:=9ac93113bdb5d037e79c61277386564ac2e5e31d49e594f11e554e4c149b7245
+PKG_SOURCE_URL:=https://memcached.org/files
+PKG_HASH:=9c5bdf29a780fb6c6f7c9eaaeeda0583efdf663193758c3e316c969a510af2a9
PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>
-
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=COPYING
CATEGORY:=Network
DEPENDS:=+libevent2 +libpthread
TITLE:=The high-performance, distributed memory object caching system
- URL:=http://memcached.org/
+ URL:=https://memcached.org/
endef
define Package/memcached/description
--disable-coverage \
--disable-sasl
-TARGET_CFLAGS += \
- -std=gnu99
-
-TARGET_LDFLAGS = \
- -L$(STAGING_DIR)/usr/lib/libevent -L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib
-
define Package/memcached/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/memcached $(1)/usr/bin/
+++ /dev/null
-Index: memcached-1.4.26/memcached.c
-===================================================================
---- memcached-1.4.26.orig/memcached.c
-+++ memcached-1.4.26/memcached.c
-@@ -13,6 +13,10 @@
- * Anatoly Vorobey <mellon@pobox.com>
- * Brad Fitzpatrick <brad@danga.com>
- */
-+#ifndef __need_IOV_MAX
-+#define __need_IOV_MAX
-+#endif
-+
- #include "memcached.h"
- #include <sys/stat.h>
- #include <sys/socket.h>
-@@ -30,9 +34,6 @@
- #define _P1003_1B_VISIBLE
- #endif
- /* need this to get IOV_MAX on some platforms. */
--#ifndef __need_IOV_MAX
--#define __need_IOV_MAX
--#endif
- #include <pwd.h>
- #include <sys/mman.h>
- #include <fcntl.h>
PKG_NAME:=mini_snmpd
PKG_VERSION:=1.4-rc1
-PKG_RELEASE:=3
+PKG_RELEASE:=4
PKG_MAINTAINER:=Marcin Jurkowski <marcin1j@gmail.com>
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING
PROG=/usr/bin/mini_snmpd
NAME=mini_snmpd
+global_respawn_threshold=
+global_respawn_timeout=
+global_respawn_retry=
+
_log() {
- logger -p daemon.info -t mini_snmpd "$@"
+ logger -p daemon.info -t mini_snmpd "$@"
}
_err() {
- logger -p daemon.err -t mini_snmpd "$@"
+ logger -p daemon.err -t mini_snmpd "$@"
}
-# mini_snmpd 1.3+ now starts later in the game. Expects filesystems monitored to be already mounted, or wont pass args to mini_snmpd
+# mini_snmpd 1.3+ now starts later in the game. Expects filesystems monitored to be already mounted, or wont pass args to mini_snmpd
# and at least configuration entry for network physical interface defined in /etc/config/network
# It handles network interfaces not yet present (e.g. ppp) but will statfs() the root/wrong filesystem if device not mounted
# Tip: complex scripts run faster without in openwrt if you stop busybox forking and searching for applets. Faster bootups
# CONFIG_BUSYBOX_CONFIG_FEATURE_SH_NOFORK
-# CONFIG_BUSYBOX_CONFIG_FEATURE_PREFER_APPLETS
-# BUSYBOX_CONFIG_ASH_OPTIMIZE_FOR_SIZE [=n]
+# CONFIG_BUSYBOX_CONFIG_FEATURE_PREFER_APPLETS
+# BUSYBOX_CONFIG_ASH_OPTIMIZE_FOR_SIZE [=n]
# CONFIG_BUSYBOX_CONFIG_ASH_CMDCMD
mini_snmpd_validation="enabled:bool:0 \
append_disk() {
local disk="$1" disk_count
[ -z $disk_count ] && disk_count=0
- if grep -qF "$disk" /proc/mounts ; then
+ if grep -qF "$disk" /proc/mounts; then
# check the fileystem is mountpoint, and directory search permissions available for statfs()
# presence as a directory -d test done is already done by uci_validate_section()
[ -x "$disk" ] || {
_err "$cfg: mountpoint $disk for snmp monitoring EACCES error. Check permissions, ignoring"
return 1
}
- if [ $disk_count -lt 4 ] ; then
+ if [ $disk_count -lt 4 ]; then
append disks_arg "$disk" ','
disk_count=$((disk_count++))
else
[ -z $netdev_count ] && netdev_count=0
# for the purposes of snmp monitoring it doesn't need to be up, it just needs to exist in /proc/net/dev
network_get_device netdev "$name"
- if [ -n "$netdev" ] && grep -qF "$netdev" /proc/net/dev ]; then
+ if [ -n "$netdev" ] && grep -qF "$netdev" /proc/net/dev ]; then
[ $netdev_count -ge 4 ] && {
_err "$cfg: too many network interfaces configured, ignoring $name"
return
}
- netdev_count=$((netdev_count++))
- if [ -n "$interfaces_arg" ]; then
+ netdev_count=$((netdev_count++))
+ if [ -n "$interfaces_arg" ]; then
append interfaces_arg "$netdev" ','
- else
+ else
append interfaces_arg "$netdev"
fi
else
config_get listen_interface "$cfg" listen_interface
# If the interface is up & instance is running we'll watch at the instance level and only restart that instance if it's bound interface changes
# Regardless of ubus knowing about an interface (in the case it's not yet configured)
- [ -n "$listen_interface" ] && trigger_interfaces="${listen_interface} ${trigger_interfaces} "
+ [ -n "$listen_interface" ] && trigger_interfaces="$listen_interface $trigger_interfaces"
# Restart daemon if one of monitored interfaces changes
config_get reload_interfaces "$cfg" interfaces
-
}
validate_mini_snmpd_section() {
# validate a mini_snmpd instance in uci config file mini_snmpd
# http://luci.subsignal.org/trac/wiki/Documentation/Datatypes ubox/validate/validate.c
- uci_validate_section mini_snmpd mini_snmpd "${1}" $mini_snmpd_validation
+ uci_load_validate mini_snmpd mini_snmpd "$1" "$2" $mini_snmpd_validation
}
service_triggers() {
- config_load 'mini_snmpd'
- procd_open_trigger
- procd_add_config_trigger "config.change" "mini_snmpd" /etc/init.d/mini_snmpd reload
- config_foreach watch_interfaces 'mini_snmpd'
+ config_load 'mini_snmpd'
+ procd_open_trigger
+ procd_add_config_trigger "config.change" "mini_snmpd" /etc/init.d/mini_snmpd reload
+ config_foreach watch_interfaces 'mini_snmpd'
# this only watches interfaces for which there is no running instance due to interface down / not in ubus
# hence start not reload, this trigger will not affect running instances as another start will not change their procd command arguments
# or stop the already running process
- [ -n "$trigger_interfaces" ] & {
- for n in $trigger_interfaces ; do
+ [ -n "$trigger_interfaces" ] && {
+ for n in $trigger_interfaces; do
procd_add_interface_trigger "interface.*" $n /etc/init.d/mini_snmpd start
- done
- }
+ done
+ }
[ -n "$reload_interfaces" ] && {
for n in $reload_interfaces; do
procd_add_reload_interface_trigger $n
done
}
- procd_close_trigger
+ procd_close_trigger
procd_add_validation validate_mini_snmpd_section
}
start_instance() {
local cfg validation_failed validation_err disks_arg interfaces_arg
- cfg="$1"
- #uci_validate_section should unset undefined variables from other instances
- #however defining uci variables as local will scope them to this instance
- #"local variables are also visible to functions called by the parent function" so it's good practice
- local enabled ipv6 debug auth community contact location listen_interface \
- udp_port tcp_port vendor_oid mib_timeout
- local disks="" interfaces=""
- validate_mini_snmpd_section "$cfg" 2>/dev/null || validation_failed=1
- [ "$enabled" == 1 ] || {
- _log "instance:$cfg disabled not starting"
+ cfg="$1"
+ [ "$2" = 0 ] || validation_failed=1
+ [ "$enabled" == 1 ] || {
+ _log "instance:$cfg disabled not starting"
return 1
}
-
+
local listen_interface_json listen_interface_ip listen_interface_device listen_interface_up
[ -n "$listen_interface" ] && {
if [ "$ipv6" = 1 ]; then
network_get_physdev listen_interface_device "$listen_interface"
}
- [ $validation_failed ] && {
+ [ $validation_failed ] && {
_err "validation of $NAME configuration for $cfg instance failed, all tests should be within constraints"
_err "please edit the configuration values below using [l]uci "
validation_err=`/sbin/validate_data mini_snmpd mini_snmpd "$cfg" $mini_snmpd_validation 2>&1 | sed '/with\ false$/!d;s/validates\ as\ /needs\ to\ be\ /;s/with\ false//' `
- _err "${validation_err}"
+ _err "$validation_err"
return 1
}
config_list_foreach "$cfg" 'disks' append_disk
_err "$cfg: you haven't sucessfully configured any mountpoints or disks for this instance, not starting"
return 1
}
-
+
+ [ -z "$respawn_threshold$respawn_timeout$respawn_retry" ] && {
+ respawn_threshold=$global_respawn_threshold
+ respawn_timeout=$global_respawn_timeout
+ respawn_retry=$global_respawn_retry
+ }
+ [ -z "$global_respawn_threshold$global_respawn_timeout$global_respawn_retry" ] && {
+ global_respawn_threshold=$respawn_threshold
+ global_respawn_timeout=$respawn_timeout
+ global_respawn_retry=$respawn_retry
+ }
+
procd_open_instance
procd_set_param command "$PROG" -n
- procd_set_param stdout "1"
+ procd_set_param stdout "1"
procd_set_param stderr "1"
# don't the like default respawn values? you can override through uci.
- # vars left as global so you only need to do it in the first mini_snmpd instance
+ # vars saved as global so you only need to do it in the first mini_snmpd instance
procd_set_param respawn ${respawn_threshold:-3600} ${respawn_timeout:-10} ${respawn_retry:-1}
# this monitors ubus changes
[ -n "$listen_interface" ] && {
#procd_open_trigger
- #procd_add_interface_trigger "interface.*" $listen_interface /etc/init.d/mini_snmpd reload
+ #procd_add_interface_trigger "interface.*" $listen_interface /etc/init.d/mini_snmpd reload
#procd_close_trigger
procd_add_reload_interface_trigger $listen_interface #or use shorthand of above
}
# this re-starts the daemon if a properly configured network interface is changed whilst it is already running
- # igmpproxy has this as well as "procd_set_param netdev"
-
- append_arg "-c" "$community"
- append_arg "-L" "${location}"
- append_arg "-C" "${contact}"
- append_arg "-p" $udp_port
- append_arg "-P" $tcp_port
- append_arg "-V" "${vendor_oid}"
- append_arg "-t" $mib_timeout
-
- [ "$ipv6" = 1 ] && procd_append_param command "-6"
+ # igmpproxy has this as well as "procd_set_param netdev"
+
+ append_arg "-c" "$community"
+ append_arg "-L" "$location"
+ append_arg "-C" "$contact"
+ append_arg "-p" $udp_port
+ append_arg "-P" $tcp_port
+ append_arg "-V" "$vendor_oid"
+ append_arg "-t" $mib_timeout
+
+ [ "$ipv6" = 1 ] && procd_append_param command "-6"
[ "$debug" = 1 ] && procd_append_param command "-v"
- # uci_validate_section() aka /sbin/validate_data can only cast default values not defined in /etc/config/* to string
+ # uci_validate_section() aka /sbin/validate_data can only cast default values not defined in /etc/config/* to string
# e.g. ="1" however it sets bools defined in /etc/config/* to =1 / =0
[ "$auth" = 1 -o "$auth" = "1" ] && procd_append_param command "-a"
[ -n "$disks_arg" ] && procd_append_param command "-d" "$disks_arg"
. /lib/functions/network.sh
config_load 'mini_snmpd'
- config_foreach start_instance 'mini_snmpd'
+ config_foreach validate_mini_snmpd_section 'mini_snmpd' start_instance
}
-
include $(TOPDIR)/rules.mk
PKG_NAME:=miniupnpc
-PKG_VERSION:=2.1
-PKG_RELEASE:=1
+PKG_VERSION:=2.1.20190408
+PKG_RELEASE:=2
-PKG_SOURCE_URL:=https://miniupnp.tuxfamily.org/files
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=e19fb5e01ea5a707e2a8cb96f537fbd9f3a913d53d804a3265e3aeab3d2064c6
+PKG_SOURCE_URL:=https://miniupnp.tuxfamily.org/files
+PKG_HASH:=a0c46bcf6065d6351a8fa6a0a18dc57d10a16908dbb470908fd2e423511514ec
+
PKG_MAINTAINER:=Steven Barth <cyrus@openwrt.org>
+PKG_LICENSE:=BSD-3c
+PKG_LICENSE_FILES:=LICENSE
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
define Package/miniupnpc/Default
TITLE:=Lightweight UPnP
TITLE+= library
endef
-TARGET_CFLAGS += $(FPIC)
+CMAKE_OPTIONS += -DUPNPC_BUILD_TESTS=OFF
-MAKE_FLAGS += \
- OS="Linux" \
+TARGET_CFLAGS += $(FPIC)
+TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/miniupnpc
define Package/miniupnpc/install
$(INSTALL_DIR) $(1)/usr/bin
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/upnpc $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/upnpc-shared $(1)/usr/bin/upnpc
$(INSTALL_BIN) $(PKG_BUILD_DIR)/listdevices $(1)/usr/bin/
endef
define Package/libminiupnpc/install
$(INSTALL_DIR) $(1)/usr/lib
- $(INSTALL_BIN) \
- $(PKG_INSTALL_DIR)/usr/lib/libminiupnpc.so.* \
- $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libminiupnpc.so.* $(1)/usr/lib/
endef
$(eval $(call BuildPackage,miniupnpc))
--- /dev/null
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -38,12 +38,6 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
+ target_compile_definitions(miniupnpc-private INTERFACE _DARWIN_C_SOURCE)
+ endif ()
+
+-# Set compiler specific build flags
+-if (CMAKE_COMPILER_IS_GNUCC AND NOT CMAKE_SYSTEM_NAME STREQUAL "AmigaOS")
+- set(CMAKE_POSITION_INDEPENDENT_CODE ON)
+- target_compile_options(miniupnpc-private INTERFACE -Wall)
+-endif ()
+-
+ # Suppress noise warnings
+ if (MSVC)
+ target_compile_definitions(miniupnpc-private INTERFACE _CRT_SECURE_NO_WARNINGS)
+++ /dev/null
---- a/Makefile
-+++ b/Makefile
-@@ -186,8 +186,8 @@ installpythonmodule3: pythonmodule3
- MAKE=$(MAKE) python3 setup.py install
-
- validateminixml: minixmlvalid
-- @echo "minixml validation test"
-- ./minixmlvalid
-+ @echo "(skipping) minixml validation test"
-+# ./minixmlvalid
- touch $@
-
- validateminiwget: testminiwget minihttptestserver testminiwget.sh
--- /dev/null
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -66,6 +66,7 @@ set (MINIUPNPC_SOURCES
+ connecthostport.c
+ portlistingparse.c
+ receivedata.c
++ listdevices.c
+ connecthostport.h
+ igd_desc_parse.h
+ minisoap.h
+@@ -142,6 +143,10 @@ if (UPNPC_BUILD_SHARED)
+ add_executable (upnpc-shared upnpc.c)
+ target_link_libraries (upnpc-shared PRIVATE libminiupnpc-shared)
+ target_include_directories(upnpc-shared PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
++
++ add_executable (listdevices listdevices.c)
++ target_link_libraries (listdevices PRIVATE libminiupnpc-shared)
++ target_include_directories(listdevices PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
+ endif ()
+ endif ()
+
include $(TOPDIR)/rules.mk
PKG_NAME:=miniupnpd
-PKG_VERSION:=2.1.20180706
-PKG_RELEASE:=1
+PKG_VERSION:=2.1.20190408
+PKG_RELEASE:=2
PKG_SOURCE_URL:=https://miniupnp.tuxfamily.org/files
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=fc2d2fd044d8c3f8d02b63d70489bb35ece836a4fc1b6386865ac8fbe8d8b006
+PKG_HASH:=4175d588f600e2877503c781c5d75320dfce572669fcab7604434b07ec5c0d5d
PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/version.mk
echo "$(VERSION_NUMBER)" | tr '() ' '_' >$(PKG_BUILD_DIR)/os.openwrt
endef
-TARGET_CFLAGS := $(filter-out -O%,$(TARGET_CFLAGS))
-TARGET_CFLAGS += -flto -ffunction-sections -fdata-sections -O2
-TARGET_LDFLAGS += $(FPIC) -flto -Wl,--gc-sections
+TARGET_CFLAGS += $(FPIC) -flto
+TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
+
MAKE_FLAGS += \
TARGET_OPENWRT=1 TEST=0 LIBS="" \
CC="$(TARGET_CC) -DIPTABLES_143 -lip4tc -luuid \
+ if grep uuid_generate /usr/include/uuid/uuid.h > /dev/null 2>&1 ; then
+ echo "#define LIB_UUID" >> ${CONFIGFILE}
+ fi
-+ ;;
++ ;;
+esac
# set V6SOCKETS_ARE_V6ONLY to 0 if it was not set above
if [ -z "$V6SOCKETS_ARE_V6ONLY" ] ; then
--- a/Makefile.linux
+++ b/Makefile.linux
-@@ -74,7 +74,10 @@ CPPFLAGS += -DIPTABLES_143
+@@ -77,7 +77,10 @@ CPPFLAGS += -DIPTABLES_143
endif
CFLAGS += $(shell $(PKG_CONFIG) --cflags libiptc)
LDFLAGS += $(shell $(PKG_CONFIG) --libs-only-L libiptc)
LDFLAGS += $(shell $(PKG_CONFIG) --libs-only-other libiptc)
else
-@@ -154,6 +157,8 @@ LDLIBS += $(shell $(PKG_CONFIG) --static
+@@ -157,6 +160,8 @@ LDLIBS += $(shell $(PKG_CONFIG) --static
LDLIBS += $(shell $(PKG_CONFIG) --static --libs-only-l libnetfilter_conntrack)
endif # ($(TEST),1)
LDLIBS += $(shell $(PKG_CONFIG) --static --libs-only-l libssl)
TEST := $(shell $(PKG_CONFIG) --exists uuid && echo 1)
-@@ -162,6 +167,7 @@ LDLIBS += $(shell $(PKG_CONFIG) --static
+@@ -165,6 +170,7 @@ LDLIBS += $(shell $(PKG_CONFIG) --static
else
$(info please install uuid-dev package / libuuid)
endif # ($(TEST),1)
+endif # ($(TARGET_OPENWRT,)
- TESTUPNPDESCGENOBJS = testupnpdescgen.o upnpdescgen.o
-
+ GLIBC_VERSION := $(shell ldd --version | head -n 1 | sed 's/^.* //')
+ GLIBC_VERSION_MAJOR = $(shell echo $(GLIBC_VERSION) | cut -f 1 -d . )
--- /dev/null
+--- a/Makefile.linux
++++ b/Makefile.linux
+@@ -23,16 +23,16 @@
+ #
+ #CFLAGS = -O -g -DDEBUG
+ CFLAGS ?= -Os
+-CFLAGS += -fno-strict-aliasing
+-CFLAGS += -fno-common
+-CFLAGS += -fstack-protector -fPIE
+-CFLAGS += -D_FORTIFY_SOURCE=2
++#CFLAGS += -fno-strict-aliasing
++#CFLAGS += -fno-common
++#CFLAGS += -fstack-protector -fPIE
++#CFLAGS += -D_FORTIFY_SOURCE=2
+ CPPFLAGS += -D_GNU_SOURCE
+ CFLAGS += -Wall
+ CFLAGS += -Wextra -Wstrict-prototypes -Wdeclaration-after-statement
+ #CFLAGS += -Wno-missing-field-initializers
+ #CFLAGS += -ansi # iptables headers does use typeof which is a gcc extension
+-LDFLAGS += -Wl,-z,now -Wl,-z,relro -pie
++LDFLAGS ?= -Wl,-z,now -Wl,-z,relro -pie
+ CC ?= gcc
+ RM = rm -f
+ INSTALL = install
include $(TOPDIR)/rules.mk
PKG_NAME:=mosquitto
-PKG_VERSION:=1.5.6
+PKG_VERSION:=1.6.3
PKG_RELEASE:=1
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE.txt
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://mosquitto.org/files/source/
-PKG_HASH:=d5bdc13cc668350026376d57fc14de10aaee029f6840707677637d15e0751a40
+PKG_HASH:=9ef5cc75f4fe31d7bf50654ddf4728ad9e1ae2e5609a4b42ecbbcb4a209ed17e
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
append_if "$1" max_queued_bytes
append_if "$1" max_queued_messages
append_if "$1" message_size_limit
- append_if "$1" passwd_file
+ append_if "$1" password_file
append_if "$1" pid_file
append_if "$1" psk_file
append_optional_bool "$1" queue_qos0_messages
--- /dev/null
+menu "Configuration"
+ depends on PACKAGE_mstpd
+
+config MSTPD_RTNL_RCV_BUFSIZE
+ int "Netlink receive buffer size"
+ default 262144
+
+config MSTPD_RTNL_SND_BUFSIZE
+ int "Netlink send buffer size"
+ default 262144
+
+endmenu
--- /dev/null
+#
+# Copyright (C) 2019 Alexandru Ardelean <ardeleanalex@gmail.com>
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=mstpd
+PKG_VERSION:=0.0.8
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/mstpd/mstpd/tar.gz/$(PKG_VERSION)?
+PKG_HASH:=dd6492039368efff0bd13b3f9c8bb32d859ebfe258a70ef23b2163c4b6c35f0c
+
+PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
+PKG_LICENSE:=GPL-2.0-or-later
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_FIXUP:=autoreconf
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/mstpd
+ SECTION:=net
+ CATEGORY:=Network
+ TITLE:=Multiple Spanning Tree Protocol daemon
+ URL:=https://github.com/mstpd/mstpd
+endef
+
+define Package/mstpd/description
+ Multiple Spanning Tree Protocol daemon.
+ Implements MSTP which is not implemented yet in the Linux kernel.
+endef
+
+define Package/mstpd/config
+ source "$(SOURCE)/Config.in"
+endef
+
+TARGET_CFLAGS += \
+ -DRTNL_RCV_BUFSIZE=$(CONFIG_MSTPD_RTNL_RCV_BUFSIZE) \
+ -DRTNL_SND_BUFSIZE=$(CONFIG_MSTPD_RTNL_SND_BUFSIZE)
+
+MAKE_VARS+=MODE=prod
+
+define Package/mstpd/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/mstpd $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/mstpctl $(1)/usr/sbin
+ $(INSTALL_DIR) $(1)/etc/init.d/
+ $(INSTALL_BIN) ./files/etc/init.d/mstpd.init $(1)/etc/init.d/mstpd
+ $(INSTALL_DIR) $(1)/sbin
+ $(INSTALL_BIN) ./files/sbin/bridge-stp $(1)/sbin
+endef
+
+$(eval $(call BuildPackage,mstpd))
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+# shellcheck disable=SC2034 # foo appears unused. Verify it or export it.
+
+START=25
+STOP=99
+
+MSTPCTL="/usr/sbin/mstpctl"
+MSTPD="/usr/sbin/mstpd"
+
+USE_PROCD=1
+
+mstpd_get_bridges() {
+ "$MSTPCTL" showbridge | grep -v "^ " | cut -d " " -f 1 2>/dev/null
+}
+
+# mstpd log levels
+# LOG_LEVEL_NONE 0
+# LOG_LEVEL_ERROR 1
+# LOG_LEVEL_INFO 2
+# LOG_LEVEL_DEBUG 3
+# LOG_LEVEL_STATE_MACHINE_TRANSITION 4
+# LOG_LEVEL_MAX 100
+
+config_bridge_port_mstpd() {
+ local config="$1"
+ local index=$2 # FIXME: maybe remove index later
+ local name=$3
+
+ [ -n "$index" -a -n "$name" ] || return 0
+
+ config_get br_index "$config" br_index
+ [ -n "$br_index" ] || return 0
+ [ "$index" = "$br_index" ] || return 0
+
+ config_get port_name "$config" name
+ [ -n "$port_name" ] || return 0
+
+ for opt in bpduguard; do
+ config_get $opt "$config" $opt
+ eval optval=\$$opt
+ [ -z "$optval" ] || "$MSTPCTL" "set$opt" "$name" "$port_name" "$optval"
+ done
+}
+
+config_bridge_mstpd() {
+ local config="$1"
+ local optval=
+ local name=
+ local enable=
+ local mstid=0 # for the moment, using only MSTID
+
+ config_get index "$config" index
+ [ -n "$index" ] || return 1
+
+ # Get bridge name
+ config_get name "$config" name
+ [ -n "$name" ] || return 0
+
+ config_get enable "$config" enable
+ if [ "$enable" != "1" ] ; then
+ return 0
+ fi
+
+ list_contains MSTPD_PREINSTALLED_BRIDGES "$name" || \
+ "$MSTPCTL" addbridge "$name"
+ # All options here have 'set$opt' equivalent calls in mstpd,
+ # hence this trick with the loop
+ for opt in maxage fdelay maxhops hello ageing forcevers txholdcount; do
+ config_get $opt "$config" "$opt"
+ eval optval=\$$opt
+ [ -z "$optval" ] || "$MSTPCTL" set$opt "$name" "$optval"
+ done
+ config_get treeprio "$config" treeprio
+ [ -z "$treeprio" ] || $MSTPCTL settreeprio "$name" "$mstid" "$treeprio"
+ config_foreach config_bridge_port_mstpd bridge_port "$index" "$name"
+ CONFIGURED_BRIDGES="$CONFIGURED_BRIDGES $name"
+ export CONFIGURED_BRIDGES
+}
+
+start_service() {
+ procd_open_instance
+ procd_set_param command $MSTPD
+ procd_append_param command -v 2
+ procd_append_param command -d # don't daemonize, procd will handle that for us
+ procd_append_param command -s # print to syslog
+
+ # set auto respawn behavior
+ procd_set_param respawn
+
+ # reload config on respawn
+ procd_open_trigger
+ procd_add_raw_trigger "instance.start" 2000 "/etc/init.d/mstpd" "reload"
+ procd_close_trigger
+
+ procd_close_instance
+}
+
+service_running() {
+ pgrep mstpd >/dev/null 2>&1
+}
+
+reload_service() {
+ if ! running ; then
+ start
+ return
+ fi
+
+ unset CONFIGURED_BRIDGES
+ MSTPD_PREINSTALLED_BRIDGES="$(mstpd_get_bridges)"
+ export MSTPD_PREINSTALLED_BRIDGES
+
+ config_load 'mstpd'
+ config_foreach config_bridge_mstpd bridge
+
+ for bridge in $(mstpd_get_bridges) ; do
+ list_contains CONFIGURED_BRIDGES "$bridge" || \
+ $MSTPCTL delbridge "$bridge"
+ done
+ # return 0 (success) here, otherwise, and endless restart loop will occur from procd
+ # because the last return code may be mstpctl failing
+ return 0
+}
+
--- /dev/null
+#!/bin/sh
+
+# Dummy file ; don't do anything ;
+# Returning success here, tells the kernel to allow
+# a userspace module to handle STP states
+#
+# Meanwhile, procd will start mstpd, and all will be well
+
+exit 0
include $(TOPDIR)/rules.mk
PKG_NAME:=mwan3
-PKG_VERSION:=2.7.10
+PKG_VERSION:=2.8.0
PKG_RELEASE:=1
PKG_MAINTAINER:=Florian Eckert <fe@dev.tdt.de>
PKG_LICENSE:=GPLv2
fi
mwan3_set_policies_iptables
mwan3_set_user_rules
- mwan3_flush_conntrack $INTERFACE $DEVICE "ifup"
;;
ifdown)
mwan3_set_iface_hotplug_state $INTERFACE "offline"
mwan3_track_signal $INTERFACE $DEVICE
mwan3_set_policies_iptables
mwan3_set_user_rules
- mwan3_flush_conntrack $INTERFACE $DEVICE "ifdown"
;;
esac
mwan3_unlock "$ACTION" "mwan3rtmon"
fi
+config_get enabled $INTERFACE enabled 0
+[ "${enabled}" = "0" ] || {
+ mwan3_flush_conntrack "$INTERFACE" "$ACTION"
+}
+
exit 0
--- /dev/null
+#!/bin/sh
+
+. /lib/functions.sh
+
+mwan3_migrate_flush_conntrack() {
+ local iface="$1"
+
+ config_get value "${iface}" flush_conntrack
+ case $value in
+ always)
+ uci_remove mwan3 "$iface" flush_conntrack
+ uci_add_list mwan3 "$iface" flush_conntrack ifup
+ uci_add_list mwan3 "$iface" flush_conntrack ifdown
+ ;;
+ never)
+ uci_remove mwan3 "$iface" flush_conntrack
+ ;;
+ esac
+
+ uci_commit mwan3
+}
+
+config_load mwan3
+config_foreach mwan3_migrate_flush_conntrack interface
+
+exit 0
MMX_UNREACHABLE=""
MM_UNREACHABLE=""
+# return true(=0) if has any mwan3 interface enabled
+# otherwise return false
mwan3_rtmon_ipv4()
{
local tid=1
return $ret
}
+# return true(=0) if has any mwan3 interface enabled
+# otherwise return false
mwan3_rtmon_ipv6()
{
local tid=1
mwan3_flush_conntrack()
{
- local flush_conntrack
+ local interface="$1"
+ local action="$2"
- config_get flush_conntrack $1 flush_conntrack never
+ handle_flush() {
+ local flush_conntrack="$1"
+ local action="$2"
+
+ if [ "$action" = "$flush_conntrack" ]; then
+ echo f > ${CONNTRACK_FILE}
+ $LOG info "Connection tracking flushed for interface '$interface' on action '$action'"
+ fi
+ }
if [ -e "$CONNTRACK_FILE" ]; then
- case $flush_conntrack in
- ifup)
- [ "$3" = "ifup" ] && {
- echo f > ${CONNTRACK_FILE}
- $LOG info "connection tracking flushed on interface $1 ($2) $3"
- }
- ;;
- ifdown)
- [ "$3" = "ifdown" ] && {
- echo f > ${CONNTRACK_FILE}
- $LOG info "connection tracking flushed on interface $1 ($2) $3"
- }
- ;;
- always)
- echo f > ${CONNTRACK_FILE}
- $LOG info "connection tracking flushed on interface $1 ($2) $3"
- ;;
- never)
- $LOG info "connection tracking not flushed on interface $1 ($2) $3"
- ;;
- esac
- else
- $LOG warning "connection tracking not enabled"
+ config_list_foreach "$interface" flush_conntrack handle_flush "$action"
fi
}
local iface_select="${2}"
local running="0"
local age=0
- local uptime=0
- local downtime=0
- local pid device time_p time_n time_u time_d
+ local online=0
+ local offline=0
+ local up="0"
+ local enabled pid device time_p time_n time_u time_d
network_get_device device $1
let age=time_n-time_p
}
- time_u="$(cat "$MWAN3TRACK_STATUS_DIR/${iface}/UPTIME")"
+ time_u="$(cat "$MWAN3TRACK_STATUS_DIR/${iface}/ONLINE")"
[ -z "${time_u}" ] || [ "${time_u}" = "0" ] || {
time_n="$(get_uptime)"
- let uptime=time_n-time_u
+ let online=time_n-time_u
}
- time_d="$(cat "$MWAN3TRACK_STATUS_DIR/${iface}/DOWNTIME")"
+ time_d="$(cat "$MWAN3TRACK_STATUS_DIR/${iface}/OFFLINE")"
[ -z "${time_d}" ] || [ "${time_d}" = "0" ] || {
time_n="$(get_uptime)"
- let downtime=time_n-time_d
+ let offline=time_n-time_d
}
+ local uptime="0"
+
+ config_get enabled "$iface" enabled 0
+ network_get_uptime uptime "$iface"
+ network_is_up "$iface" && up="1"
+
json_add_object "${iface}"
json_add_int age "$age"
+ json_add_int online "${online}"
+ json_add_int offline "${offline}"
json_add_int uptime "${uptime}"
- json_add_int downtime "${downtime}"
json_add_int "score" "$(cat "$MWAN3TRACK_STATUS_DIR/${iface}/SCORE")"
json_add_int "lost" "$(cat "$MWAN3TRACK_STATUS_DIR/${iface}/LOST")"
json_add_int "turn" "$(cat "$MWAN3TRACK_STATUS_DIR/${iface}/TURN")"
json_add_string "status" "$(cat "$MWAN3TRACK_STATUS_DIR/${iface}/STATUS")"
+ json_add_boolean "enabled" "${enabled}"
json_add_boolean "running" "${running}"
+ json_add_boolean "up" "${up}"
json_add_array "track_ip"
for file in $MWAN3TRACK_STATUS_DIR/${iface}/*; do
track="${file#*/TRACK_}"
sleep 3
while true; do
mwan3_lock "service" "mwan3rtmon"
- [ mwan3_remon_ipv4 = "1" ] || \
- [ mwan3_rtmon_ipv6 = "1" ] && break
+ mwan3_rtmon_ipv4 || mwan3_rtmon_ipv6
+ ret=$?
mwan3_unlock "service" "mwan3rtmon"
+ [ "$ret" = "0" ] || break
[ "$rtmon_interval" = "0" ] && break
sleep "$rtmon_interval" &
wait
done
- mwan3_unlock "service" "mwan3rtmon"
}
main "$@"
if [ "$STATUS" = "offline" ]; then
echo "offline" > /var/run/mwan3track/$1/STATUS
- echo "0" > /var/run/mwan3track/$1/UPTIME
- echo "$(get_uptime)" > /var/run/mwan3track/$1/DOWNTIME
+ echo "0" > /var/run/mwan3track/$1/ONLINE
+ echo "$(get_uptime)" > /var/run/mwan3track/$1/OFFLINE
score=0
else
echo "online" > /var/run/mwan3track/$1/STATUS
- echo "0" > /var/run/mwan3track/$1/DOWNTIME
- echo "$(get_uptime)" > /var/run/mwan3track/$1/UPTIME
+ echo "0" > /var/run/mwan3track/$1/OFFLINE
+ echo "$(get_uptime)" > /var/run/mwan3track/$1/ONLINE
env -i ACTION="connected" INTERFACE="$1" DEVICE="$2" /sbin/hotplug-call iface
fi
while true; do
if [ $score -eq $up ]; then
echo "offline" > /var/run/mwan3track/$1/STATUS
- echo "0" > /var/run/mwan3track/$1/UPTIME
- echo "$(get_uptime)" > /var/run/mwan3track/$1/DOWNTIME
- $LOG notice "Interface $1 ($2) is offline"
env -i ACTION=ifdown INTERFACE=$1 DEVICE=$2 /sbin/hotplug-call iface
- env -i ACTION="disconnected" INTERFACE="$1" DEVICE="$2" /sbin/hotplug-call iface
score=0
fi
else
if [ "${IFDOWN_EVENT}" -eq 1 ]; then
echo "offline" > /var/run/mwan3track/$1/STATUS
- echo "$(get_uptime)" > /var/run/mwan3track/$1/DOWNTIME
- echo "0" > /var/run/mwan3track/$1/UPTIME
+ echo "$(get_uptime)" > /var/run/mwan3track/$1/OFFLINE
+ echo "0" > /var/run/mwan3track/$1/ONLINE
$LOG notice "Interface $1 ($2) is offline"
env -i ACTION="disconnected" INTERFACE="$1" DEVICE="$2" /sbin/hotplug-call iface
score=0
include $(TOPDIR)/rules.mk
PKG_NAME:=nbd
-PKG_VERSION:=3.16.2
+PKG_VERSION:=3.19
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@SF/nbd
-PKG_HASH:=422f62bdf6e6b973bd82083dc52b6577396fe00aa6607837ac464e476124155b
+PKG_HASH:=b4466412f13e057659f25d35e1e8e181afd62c7179bff22a6add81445ecb8690
PKG_LICENSE:=GPL-2.0+
PKG_MAINTAINER:=Marcin Jurkowski <marcin1j@gmail.com>
CONFIGURE_ARGS += \
--disable-glibtest \
- --without-gnutls
+ --without-gnutls \
+ --without-libnl \
+ --with-syslog
TARGET_CFLAGS += --std=gnu99 -DNODAEMON
+++ /dev/null
---- a/configure.ac
-+++ b/configure.ac
-@@ -210,7 +210,11 @@ dnl ;;
- dnl esac
- dnl fi
-
--PKG_CHECK_MODULES(GnuTLS, [gnutls >= 2.12.0],[HAVE_GNUTLS=1],[HAVE_GNUTLS=0])
-+AC_ARG_WITH([gnutls], AS_HELP_STRING([--with-gnutls], [Build with GnuTLS]))
-+AS_IF([test "x$with_gnutls" = "xyes"], [
-+ PKG_CHECK_MODULES(GnuTLS, [gnutls >= 2.12.0],[HAVE_GNUTLS=1],[HAVE_GNUTLS=0])
-+])
-+
- if test x$HAVE_GNUTLS = x1; then
- AC_DEFINE(HAVE_GNUTLS, 1, [Define to 1 if you have a GnuTLS version of 2.12 or above])
- else
+++ /dev/null
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -35,7 +35,7 @@ nbd_client_CFLAGS = $(client_flags) @Gnu
- nbd_client_LDADD = $(client_libs) @GnuTLS_LIBS@
- else
- nbd_client_SOURCES = $(client_srcs)
--nbd_client_CFLAGS = $(client_flags)
-+nbd_client_CFLAGS = $(client_flags) -DNOTLS -DPROG_NAME='"nbd-client"'
- nbd_client_LDADD = $(client_libs)
- endif
- endif
$(call Package/net-snmp/Default)
SECTION:=libs
CATEGORY:=Libraries
- DEPENDS:=+libnl-tiny
+ DEPENDS:=+libnl-tiny +libpci
TITLE:=Open source SNMP implementation (libraries)
endef
host/hr_system \
ieee802dot11 \
if-mib/ifXTable \
+ ip-mib/inetNetToMediaTable \
mibII/at \
mibII/icmp \
mibII/ifTable \
hardware \
host \
if-mib \
+ ip-mib \
mibII \
notification \
notification-log-mib \
--without-zlib \
--with-nl \
$(call autoconf_bool,CONFIG_IPV6,ipv6) \
+ --disable-perl-cc-checks \
+ --disable-embedded-perl \
+ --without-perl-modules
CONFIGURE_VARS += \
ac_cv_header_netlink_netlink_h=yes \
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://gitlab.com/netify.ai/public/netify-agent.git
-PKG_SOURCE_DATE:=2019-01-03
-PKG_SOURCE_VERSION:=v2.87
-#PKG_SOURCE_VERSION:=e846598bbe26eb6d631f1eda922c7141245f48e3
-PKG_MIRROR_HASH:=05af5b4e48ccfccf60cfb3c0b08c8bb3987d8957f17723520da4488798a7b68d
+PKG_SOURCE_DATE:=2019-06-06
+PKG_SOURCE_VERSION:=v2.88
+#PKG_SOURCE_VERSION:=367ddd2fca4b2edd5e71145e2adea1b58f750214
+PKG_MIRROR_HASH:=8ead41dc074a71626609bced1d584f8df87e39f5ad76dcca76021c1737150089
include $(INCLUDE_DIR)/package.mk
Netify Agent
============
-Copyright ©2015-2018 eGloo Incorporated ([www.egloo.ca](https://www.egloo.ca))
+Copyright ©2015-2019 eGloo Incorporated ([www.egloo.ca](https://www.egloo.ca))
-Deep-Packet Inspection Server
------------------------------
+Network Intelligence - Simplified
+---------------------------------
-The [Netify Agent](https://www.netify.ai/) is a deep-packet inspection server. The Agent is built on top of [nDPI](http://www.ntop.org/products/deep-packet-inspection/ndpi/) (formerly OpenDPI) to detect network protocols and applications. These detections can be saved locally, served over a UNIX or TCP socket, and/or "pushed" (via HTTP POSTs) to a remote third-party server. Flow metadata, network statistics, and detection classifications are stored using JSON encoding.
+The [Netify Agent](https://www.netify.ai/) is a deep-packet inspection server. The Agent is built on top of [nDPI](http://www.ntop.org/products/deep-packet-inspection/ndpi/) (formerly OpenDPI) to detect network protocols and applications. Detections can be saved locally, served over a UNIX or TCP socket, and/or "pushed" (via HTTP POSTs) to a remote third-party server. Flow metadata, network statistics, and detection classifications are stored using JSON encoding.
Optionally, the Netify Agent can be coupled with a [Netify Cloud](https://www.netify.ai/) subscription for further cloud processing, historical storage, machine-learning analysis, event notifications, device detection/identification, along with the option (on supported platforms) to take an active role in policing/bandwidth-shaping specific network protocols and applications.
- [Fedora](http://software.opensuse.org/download.html?project=home%3Aegloo&package=netifyd)
- [Ubuntu](http://software.opensuse.org/download.html?project=home%3Aegloo&package=netifyd)
+Developer Documentation
+-----------------------
+
+Further developer documentation can be found [here](https://www.netify.ai/developer/netify-agent).
+
Configuring/Building From Source
--------------------------------
-# Copyright (C) 2009-2016 OpenWrt.org
+# Copyright (C) 2009-2019 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
PKG_NAME:=nfs-kernel-server
-PKG_VERSION:=2.3.3
-PKG_RELEASE:=2
-PKG_HASH:=3c8c63611c7e78b7a3b2f8a28b9928a5b5e66d5e9ad09a1e54681508884320a4
+PKG_VERSION:=2.4.1
+PKG_RELEASE:=1
+PKG_HASH:=1a21bf8e8b8864d54d114aa7b0e87e48ec87a5d861de0c03c20e35f7e3c67721
PKG_SOURCE_URL:=@SF/nfs
PKG_SOURCE:=nfs-utils-$(PKG_VERSION).tar.xz
PKG_BUILD_DIR:=$(BUILD_DIR)/nfs-utils-$(PKG_VERSION)
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
-PKG_BUILD_DEPENDS:=$(PKG_NAME)/host
+PKG_BUILD_DEPENDS:=$(PKG_NAME)/host libevent2
HOST_BUILD_DEPENDS:=libtirpc/host
PKG_CONFIG_DEPENDS:= \
include $(INCLUDE_DIR)/package.mk
define Package/nfs-kernel-server/Default
- SECTION:=net
- CATEGORY:=Network
- SUBMENU:=Filesystem
- DEPENDS:=+libwrap +libblkid +libuuid +libtirpc
- URL:=http://nfs.sourceforge.net/
- MAINTAINER:=Peter Wagner <tripolar@gmx.at>
+ SECTION:=net
+ CATEGORY:=Network
+ SUBMENU:=Filesystem
+ DEPENDS:=+libwrap +libblkid +libuuid +libtirpc
+ URL:=http://nfs.sourceforge.net/
+ MAINTAINER:=Peter Wagner <tripolar@gmx.at>
endef
define Package/nfs-kernel-server
- $(call Package/nfs-kernel-server/Default)
- TITLE:=Kernel NFS server support
- DEPENDS+= +kmod-fs-nfsd +kmod-fs-nfs +NFS_KERNEL_SERVER_V4:kmod-fs-nfs-v4 +rpcbind +NFS_KERNEL_SERVER_V4:nfs-utils-libs +NFS_KERNEL_SERVER_V4:libkeyutils +NFS_KERNEL_SERVER_V4:libdevmapper
+ $(call Package/nfs-kernel-server/Default)
+ TITLE:=Kernel NFS server support
+ DEPENDS+= +kmod-fs-nfsd +kmod-fs-nfs +NFS_KERNEL_SERVER_V4:kmod-fs-nfs-v4 +rpcbind +NFS_KERNEL_SERVER_V4:nfs-utils-libs +NFS_KERNEL_SERVER_V4:libkeyutils +NFS_KERNEL_SERVER_V4:libdevmapper
+ USERID:=nfs:nfs
endef
define Package/nfs-kernel-server/description
- Kernel NFS server support
+Kernel NFS server support
endef
define Package/nfs-kernel-server/config
- source "$(SOURCE)/Config.in"
+ source "$(SOURCE)/Config.in"
endef
define Package/nfs-kernel-server-utils
- $(call Package/nfs-kernel-server/Default)
- TITLE:=NFS server utils
- DEPENDS:=nfs-kernel-server
+ $(call Package/nfs-kernel-server/Default)
+ TITLE:=NFS server utils
+ DEPENDS:=nfs-kernel-server
endef
define Package/nfs-kernel-server-utils/description
- NFS server utils
+NFS server utils
endef
define Package/nfs-kernel-server/conffiles
endef
define Package/nfs-utils/Default
- $(call Package/nfs-kernel-server/Default)
- SECTION:=utils
- CATEGORY:=Utilities
- DEPENDS+= +libevent2 +NFS_KERNEL_SERVER_V4:libkeyutils +NFS_KERNEL_SERVER_V4:libdevmapper
- URL:=http://nfs.sourceforge.net/
- MAINTAINER:=Peter Wagner <tripolar@gmx.at>
+ $(call Package/nfs-kernel-server/Default)
+ SECTION:=utils
+ CATEGORY:=Utilities
+ DEPENDS+= +NFS_KERNEL_SERVER_V4:libkeyutils +NFS_KERNEL_SERVER_V4:libdevmapper
+ URL:=http://nfs.sourceforge.net/
+ MAINTAINER:=Peter Wagner <tripolar@gmx.at>
endef
define Package/nfs-utils
- $(call Package/nfs-utils/Default)
- TITLE:=updated mount utility (includes nfs4)
+ $(call Package/nfs-utils/Default)
+ TITLE:=updated mount utility (includes nfs4)
endef
define Package/nfs-utils/description
- Updated mount.nfs command - allows mounting nfs4 volumes
+Updated mount.nfs command - allows mounting nfs4 volumes
endef
define Package/nfs-utils-libs
- $(call Package/nfs-utils/Default)
- TITLE:=libraries provided by nfs-utils
+ $(call Package/nfs-utils/Default)
+ TITLE:=libraries provided by nfs-utils
endef
define Package/nfs-utils-libs/description
- Libraries provided by nfs-utils
+Libraries provided by nfs-utils
endef
TARGET_CFLAGS += -Wno-error=implicit-function-declaration \
--disable-nfsdcltrack \
--enable-shared \
--enable-static \
+ --with-rpcgen=internal \
$(if $(CONFIG_NFS_KERNEL_SERVER_V4),--enable,--disable)-nfsv4 \
$(if $(CONFIG_NFS_KERNEL_SERVER_V4),--enable,--disable)-nfsv41
ifeq ($(CONFIG_IPV6),n)
-CONFIGURE_ARGS += --disable-ipv6
+ CONFIGURE_ARGS += --disable-ipv6
endif
CONFIGURE_VARS += \
--disable-gss \
--disable-nfsv4 \
--disable-nfsv41 \
- --without-tcp-wrappers
+ --without-tcp-wrappers \
+ --with-rpcgen=internal
HOST_CONFIGURE_VARS += \
ac_cv_lib_event_event_dispatch=yes \
define Package/nfs-utils-libs/install
$(INSTALL_DIR) $(1)/usr/lib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnfsidmap.so* $(1)/usr/lib/
+ $(if $(CONFIG_NFS_KERNEL_SERVER_V4),$(CP) $(PKG_INSTALL_DIR)/usr/lib/libnfsidmap.so* $(1)/usr/lib/,)
endef
$(eval $(call HostBuild))
NFS_D=/var/lib/nfs
RECOVERY_D=$NFS_D/v4recovery
LOCK_D=/var/lib/nfs/sm
+VAR_NFS=/var/lib/nfs
start_service() {
grep -q /proc/fs/nfsd /proc/mounts || \
mkdir -p $LOCK_D
touch $NFS_D/rmtab
+ mkdir -p $VAR_NFS
+ chown nfs:nfs $VAR_NFS
+
sysctl -w fs.nfs.nlm_tcpport=32777 fs.nfs.nlm_udpport=32777 > /dev/null
procd_open_instance
procd_close_instance
/usr/sbin/exportfs -r
- /usr/sbin/rpc.nfsd
+ /usr/sbin/rpc.nfsd --grace-time 10
procd_open_instance
procd_set_param command /usr/sbin/rpc.mountd -p 32780 -F
+++ /dev/null
---- a/support/misc/file.c
-+++ b/support/misc/file.c
-@@ -27,6 +27,7 @@
- #include <dirent.h>
- #include <stdlib.h>
- #include <stdbool.h>
-+#include <limits.h>
-
- #include "xlog.h"
- #include "misc.h"
--- /dev/null
+--- a/support/nfsidmap/libnfsidmap.c
++++ b/support/nfsidmap/libnfsidmap.c
+@@ -89,6 +89,10 @@ gid_t nobody_gid = (gid_t)-1;
+ #define NFS4DNSTXTREC "_nfsv4idmapdomain"
+ #endif
+
++#ifndef NS_MAXMSG
++#define NS_MAXMSG 65535
++#endif
++
+ /* Default logging fuction */
+ static void default_logger(const char *fmt, ...)
+ {
include $(TOPDIR)/rules.mk
PKG_NAME:=nft-qos
-PKG_VERSION:=1.0.4
+PKG_VERSION:=1.0.6
PKG_RELEASE:=1
PKG_LICENSE:=GPL-2.0
CATEGORY:=Base system
DEPENDS:=+nftables +kmod-nft-netdev +kmod-nft-bridge
TITLE:=QoS scripts over nftables
+ PKGARCH:=all
endef
define Package/nft-qos/description
. /lib/nft-qos/core.sh
+qosdef_validate_dynamic() {
+ uci_load_validate nft-qos default "$1" "$2" \
+ 'limit_enable:bool:0' \
+ 'limit_type:maxlength(8)' \
+ 'dynamic_bw_up:uinteger:100' \
+ 'dynamic_bw_down:uinteger:100'
+}
+
# return average rate for dhcp leases
qosdef_dynamic_rate() { # <bandwidth>
local c=0 c6=0
# init dynamic qos
qosdef_init_dynamic() {
- local dynamic_bw_up dynamic_bw_down limit_enable limit_type
local hook_ul="prerouting" hook_dl="postrouting"
- uci_validate_section nft-qos default default \
- 'limit_enable:bool:0' \
- 'limit_type:maxlength(8)' \
- 'dynamic_bw_up:uinteger:100' \
- 'dynamic_bw_down:uinteger:100'
-
- [ $? -ne 0 ] && {
+ [ "$2" = 0 ] || {
logger -t nft-qos-dynamic "validation failed"
return 1
}
P1=""; P2=""; P3=""; P4=""; P5=""; P6="";
P7=""; P8=""; P9=""; P10=""; P11="";
+qosdef_validate_priority() {
+ uci_load_validate nft-qos default "$1" "$2" \
+ 'priority_enable:bool:0' \
+ 'priority_netdev:maxlength(8)'
+}
+
_qosdef_handle_protox() { # <priority> <rule>
case "$1" in
-400) P1="$P1""$2";;
# init traffic priority
qosdef_init_priority() {
- local priority_enable priority_netdev ifname="br-lan"
+ local ifname="br-lan"
- uci_validate_section nft-qos default default \
- 'priority_enable:bool:0' \
- 'priority_netdev:maxlength(8)'
-
- [ $? -ne 0 ] && {
+ [ "$2" = 0 ] || {
logger -t nft-qos-priority "validation failed"
return 1
}
;;
wan*) network_get_device ifname "$priority_netdev" || \
ifname="$(uci_get network.$priority_netdev.ifname)"
+ ;;
esac
qosdef_appendx "table netdev nft-qos-priority {\n"
. /lib/nft-qos/core.sh
+qosdef_validate_static() {
+ uci_load_validate nft-qos default "$1" "$2" \
+ 'limit_enable:bool:0' \
+ 'limit_type:maxlength(8)' \
+ 'static_unit_dl:string:kbytes' \
+ 'static_unit_ul:string:kbytes' \
+ 'static_rate_dl:uinteger:50' \
+ 'static_rate_ul:uinteger:50'
+}
+
# append rule for static qos
qosdef_append_rule_sta() { # <section> <operator> <default-unit> <default-rate>
local ipaddr unit rate
# static limit rate init
qosdef_init_static() {
- local unit_dl unit_ul rate_dl rate_ul
- local limit_enable limit_type hook_ul="prerouting" hook_dl="postrouting"
-
- uci_validate_section nft-qos default default \
- 'limit_enable:bool:0' \
- 'limit_type:maxlength(8)' \
- 'static_unit_dl:string:kbytes' \
- 'static_unit_ul:string:kbytes' \
- 'static_rate_dl:uinteger:50' \
- 'static_rate_ul:uinteger:50'
+ local hook_ul="prerouting" hook_dl="postrouting"
- [ $? -ne 0 ] && {
+ [ "$2" = 0 ] || {
logger -t nft-qos-static "validation failed"
return 1
}
}
qosdef_appendx "table $NFT_QOS_INET_FAMILY nft-qos-static {\n"
- qosdef_append_chain_sta $hook_ul upload upload $unit_ul $rate_ul
- qosdef_append_chain_sta $hook_dl download download $unit_dl $rate_dl
+ qosdef_append_chain_sta $hook_ul upload upload $static_unit_ul $static_rate_ul
+ qosdef_append_chain_sta $hook_dl download download $static_unit_dl $static_rate_dl
qosdef_appendx "}\n"
}
NFT_QOS_DYNAMIC_ON=
-qosdef_validate_section_dynamic() {
- local limit_enable limit_type
-
- uci_validate_section nft-qos default default \
- 'limit_enable:bool:0' \
- 'limit_type:maxlength(8)'
-
+qosdef_check_if_dynamic() {
[ $limit_enable -eq 1 -a \
"$limit_type" = "dynamic" ] && \
NFT_QOS_DYNAMIC_ON="y"
case "$ACTION" in
add | update | remove)
- qosdef_validate_section_dynamic
+ qosdef_validate_dynamic default qosdef_check_if_dynamic
[ -z "$NFT_QOS_DYNAMIC_ON" ] && return
qosdef_init_env
qosdef_flush_dynamic
qosdef_init_header
- qosdef_init_dynamic
+ qosdef_validate_dynamic default qosdef_init_dynamic
qosdef_init_done
qosdef_start
;;
# Traffic Priority Samples :
#
# protocol : tcp, udp, udplite, sctp, dccp, tcp is default
-# priority : integer between 1-11, 1 is default
-# service : you can input a integer or service name, e.g. '22', '11-22', 'telnet', 'ssh, http, ftp', etc
+# priority : integer between 1-11, 1 is default and the highest
+# service : you can input a integer or service name,
+# e.g. '22', '11-22', 'telnet', 'ssh, http, ftp', etc
#
#config priority
# option protocol 'tcp'
service_triggers() {
procd_add_reload_trigger nft-qos
+
+ procd_open_validate
+ qosdef_validate_dynamic
+ qosdef_validate_static
+ qosdef_validate_priority
+ procd_close_validate
}
start_service() {
qosdef_init_header
qosdef_init_monitor
- qosdef_init_dynamic
- qosdef_init_static
- qosdef_init_priority
+ qosdef_validate_dynamic default qosdef_init_dynamic
+ qosdef_validate_static default qosdef_init_static
+ qosdef_validate_priority default qosdef_init_priority
qosdef_init_done
qosdef_start
}
include $(TOPDIR)/rules.mk
PKG_NAME:=nginx
-PKG_VERSION:=1.15.8
+PKG_VERSION:=1.16.0
PKG_RELEASE:=1
PKG_SOURCE:=nginx-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://nginx.org/download/
-PKG_HASH:=a8bdafbca87eb99813ae4fcac1ad0875bf725ce19eb265d28268c309b2b40787
+PKG_HASH:=4fd376bad78797e7f18094a00f0f1088259326436b537eb5af69b01be2ca1345
PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de> \
Ansuel Smith <ansuelsmth@gmail.com>
CONFIG_NGINX_STREAM_SSL_PREREAD_MODULE \
CONFIG_NGINX_RTMP_MODULE \
CONFIG_NGINX_TS_MODULE \
+ CONFIG_OPENSSL_ENGINE \
+ CONFIG_OPENSSL_WITH_NPN
include $(INCLUDE_DIR)/package.mk
SUBMENU:=Web Servers/Proxies
TITLE:=Nginx web server
URL:=http://nginx.org/
- DEPENDS:=+NGINX_PCRE:libpcre +(NGINX_SSL||NGINX_HTTP_CACHE||NGINX_HTTP_AUTH_BASIC):libopenssl \
+ DEPENDS:=+NGINX_PCRE:libpcre +NGINX_SSL:libopenssl \
+NGINX_HTTP_GZIP:zlib +NGINX_LUA:liblua +libpthread +NGINX_DAV:libexpat
endef
endef
Package/nginx-ssl/description = $(Package/nginx/description) \
- This varian is compiled with SSL support enabled. To enable additional module \
+ This variant is compiled with SSL support enabled. To enable additional module \
select them in the nginx default configuration menu.
define Package/nginx-all-module
endef
Package/nginx-all-module/description = $(Package/nginx/description) \
- This varian is compiled with ALL module selected.
+ This variant is compiled with ALL module selected.
define Package/nginx/config
source "$(SOURCE)/Config.in"
include $(TOPDIR)/rules.mk
PKG_NAME:=nlbwmon
-PKG_RELEASE:=2
+PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/jow-/nlbwmon.git
-PKG_SOURCE_DATE:=2017-12-05
-PKG_SOURCE_VERSION:=75accd647459a8a4167f9baa402d116cad41caa9
-PKG_MIRROR_HASH:=821572fdd11bba4a62ecea0b0ddee24645d2ceccdfe7a83dfe5f5edea433ef02
+PKG_SOURCE_DATE:=2019-06-06
+PKG_SOURCE_VERSION:=4574e6e80e3a5ab8de65886baa0d563dfee589ff
+PKG_MIRROR_HASH:=559a8b04e8942c83e31a6a5e2576a5308fdc16349ed29e0b2d9fc182d715976d
CMAKE_INSTALL:=1
# Name and release number of this package
PKG_NAME:=noddos
-PKG_RELEASE:=2
-PKG_LICENSE:=GPLv3
-PKG_MAINTAINER:=Steven Hessing <steven.hessing@gmail.com>
+PKG_VERSION:=0.5.5
+PKG_RELEASE:=4
-PKG_SOURCE_VERSION:=0.5.5
-PKG_SOURCE_URL:=https://github.com/noddos/noddos/releases/download/v$(PKG_SOURCE_VERSION)/
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.xz
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE_URL:=https://github.com/noddos/noddos/releases/download/v$(PKG_VERSION)/
PKG_HASH:=1f5be0c1015b0407036eecc8449d60d2abcacec442bba55db85fc32e89f754db
-PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)-$(PKG_SOURCE_VERSION)
+PKG_MAINTAINER:=Steven Hessing <steven.hessing@gmail.com>
+PKG_LICENSE:=GPL-3.0-or-later
+PKG_LICENSE_FILES:=LICENSE.md
+PKG_BUILD_PARALLEL:=1
CMAKE_INSTALL:=1
+
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
CATEGORY:=Network
TITLE:=noddos -- device-aware cloud-powered firewall
URL:=https://www.noddos.io/
- DEPENDS:=+libstdcpp +libnetfilter-conntrack +libcurl +libopenssl +openssl-util +ca-bundle +ca-certificates +wget +bzip2 +libtins +ipset +libpthread +libyaml-cpp
+ DEPENDS:=+libstdcpp +libnetfilter-conntrack +libcurl +libopenssl +openssl-util +ca-bundle +wget +bzip2 +libtins +ipset +libpthread +libyaml-cpp
endef
define Package/noddos/description
--- /dev/null
+From 5200105f412ceefa0784bf914aa215146fd067b0 Mon Sep 17 00:00:00 2001
+From: Eneas U de Queiroz <cote2004-github@yahoo.com>
+Date: Wed, 26 Dec 2018 16:45:47 -0200
+Subject: [PATCH] Ipset.cxx: update libipset API to version 7
+
+Old API compatibility was kept with a compatibility shim.
+
+Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
+
+diff --git a/src/Ipset.cxx b/src/Ipset.cxx
+index 9333fe6..da97f93 100644
+--- a/src/Ipset.cxx
++++ b/src/Ipset.cxx
+@@ -90,23 +90,19 @@ void Ipset::Open (const std::string inIpsetName, std::string inIpsetType, bool i
+ isIpsetv4 = inisIpsetv4;
+ ipset_load_types();
+
+- struct ipset_session *session = ipset_session_init(printf);
++ struct ipset_session *session = noddos_ipset_session_init();
+ if (session == nullptr) {
+ syslog (LOG_ERR, "Ipset: Cannot initialize ipset session.");
+ ipset_session_fini(session);
+ throw std::runtime_error ("Cannot initialize ipset session.");
+ }
+
+- if (ipset_envopt_parse(session, IPSET_ENV_EXIST, NULL) < 0) {
+- syslog (LOG_ERR, "Ipset: Can't set environment option.");
+- ipset_session_fini(session);
+- throw std::runtime_error ("Can't set environment option.");
+- }
++ ipset_envopt_set(session, IPSET_ENV_EXIST);
+ int r = ipset_session_data_set(session, IPSET_SETNAME, ipsetName.c_str());
+ if ( r < 0) {
+- syslog (LOG_ERR, "Ipset: Can't set setname %s: %s", ipsetName.c_str(), ipset_session_error(session));
++ syslog (LOG_ERR, "Ipset: Can't set setname %s: %s", ipsetName.c_str(), ipset_session_report_msg(session));
+ ipset_session_fini(session);
+- throw std::runtime_error("Can't set setname " + ipsetName + ": " + ipset_session_error(session));
++ throw std::runtime_error("Can't set setname " + ipsetName + ": " + ipset_session_report_msg(session));
+ } else if (r > 0) {
+ if (Debug == true) {
+ syslog (LOG_DEBUG, "Ipset: Not creating set %s as it already exists", ipsetName.c_str());
+@@ -115,27 +111,27 @@ void Ipset::Open (const std::string inIpsetName, std::string inIpsetType, bool i
+ return;
+ }
+ if (ipset_session_data_set(session, IPSET_OPT_TYPENAME, ipsetType.c_str()) < 0) {
+- syslog (LOG_ERR, "Ipset: Can't set setname %s to type %s: %s", ipsetName.c_str(), ipsetType.c_str(), ipset_session_error(session));
++ syslog (LOG_ERR, "Ipset: Can't set setname %s to type %s: %s", ipsetName.c_str(), ipsetType.c_str(), ipset_session_report_msg(session));
+ ipset_session_fini(session);
+- throw std::runtime_error("Can't set type " + ipsetType + ": " + ipset_session_error(session));
++ throw std::runtime_error("Can't set type " + ipsetType + ": " + ipset_session_report_msg(session));
+ }
+ const struct ipset_type *type = ipset_type_get(session, IPSET_CMD_CREATE);
+ if (type == NULL) {
+- syslog (LOG_ERR, "Ipset: Can't set create ip %s: %s", ipsetName.c_str(), ipset_session_error(session));
++ syslog (LOG_ERR, "Ipset: Can't set create ip %s: %s", ipsetName.c_str(), ipset_session_report_msg(session));
+ ipset_session_fini(session);
+- throw std::runtime_error("Can't create ipset " + ipsetName + ": " + ipset_session_error(session));
++ throw std::runtime_error("Can't create ipset " + ipsetName + ": " + ipset_session_report_msg(session));
+ }
+
+ uint32_t timeout = 0; /* default to infinity */
+ if (ipset_session_data_set(session, IPSET_OPT_TIMEOUT, &timeout) < 0) {
+- syslog (LOG_ERR, "Ipset: Can't set setname %s to timeout %d: %s", ipsetName.c_str(), timeout, ipset_session_error(session));
++ syslog (LOG_ERR, "Ipset: Can't set setname %s to timeout %d: %s", ipsetName.c_str(), timeout, ipset_session_report_msg(session));
+ ipset_session_fini(session);
+- throw std::runtime_error("Can't set time-out " + ipsetName + ": " + ipset_session_error(session));
++ throw std::runtime_error("Can't set time-out " + ipsetName + ": " + ipset_session_report_msg(session));
+ }
+ if (ipset_session_data_set(session, IPSET_OPT_TYPE, type)) {
+- syslog (LOG_ERR, "Ipset: Can't set setname %s option type: %s", ipsetName.c_str(), ipset_session_error(session));
++ syslog (LOG_ERR, "Ipset: Can't set setname %s option type: %s", ipsetName.c_str(), ipset_session_report_msg(session));
+ ipset_session_fini(session);
+- throw std::runtime_error("Can't set ipset type: " + ipsetName + ": " + ipset_session_error(session));
++ throw std::runtime_error("Can't set ipset type: " + ipsetName + ": " + ipset_session_report_msg(session));
+ }
+ uint8_t family = 0;
+ if (ipsetType == "hash:ip" && isIpsetv4 == true) {
+@@ -149,20 +145,20 @@ void Ipset::Open (const std::string inIpsetName, std::string inIpsetType, bool i
+ throw std::invalid_argument("Unknown ipset data type " + ipsetType);
+ }
+ if (ipset_session_data_set(session, IPSET_OPT_FAMILY, &family) < 0) {
+- syslog (LOG_ERR, "Ipset: Can't set setname %s address family %d: %s", ipsetName.c_str(), family, ipset_session_error(session));
++ syslog (LOG_ERR, "Ipset: Can't set setname %s address family %d: %s", ipsetName.c_str(), family, ipset_session_report_msg(session));
+ ipset_session_fini(session);
+- throw std::runtime_error("Cannot set ipset family: " + ipsetName + ": " + ipset_session_error(session));
++ throw std::runtime_error("Cannot set ipset family: " + ipsetName + ": " + ipset_session_report_msg(session));
+ }
+
+ if (ipset_cmd(session, IPSET_CMD_CREATE, /*lineno*/ 0) != 0) {
+- syslog (LOG_ERR, "Ipset: Can't create setname %s: %s", ipsetName.c_str(), ipset_session_error(session));
++ syslog (LOG_ERR, "Ipset: Can't create setname %s: %s", ipsetName.c_str(), ipset_session_report_msg(session));
+ ipset_session_fini(session);
+- throw std::runtime_error("Failed to create ipset " + ipsetName + ": " + ipset_session_error(session));
++ throw std::runtime_error("Failed to create ipset " + ipsetName + ": " + ipset_session_report_msg(session));
+ }
+ if (ipset_commit(session) < 0) {
+- syslog (LOG_ERR, "Ipset: Can't commit for setname %s: %s", ipsetName.c_str(), ipset_session_error(session));
++ syslog (LOG_ERR, "Ipset: Can't commit for setname %s: %s", ipsetName.c_str(), ipset_session_report_msg(session));
+ ipset_session_fini(session);
+- throw std::runtime_error("Can't call ipset_commit for " + ipsetName + ": " + ipset_session_error(session));
++ throw std::runtime_error("Can't call ipset_commit for " + ipsetName + ": " + ipset_session_report_msg(session));
+ }
+ ipset_session_fini(session);
+ }
+@@ -173,33 +169,29 @@ bool Ipset::ipset_exec(enum ipset_cmd cmd) {
+ if (Debug == true) {
+ syslog(LOG_DEBUG, "Ipset: received command %d for ipset %s", cmd, ipsetName.c_str());
+ }
+- struct ipset_session *session = ipset_session_init(printf);
++ struct ipset_session *session = noddos_ipset_session_init();
+ if (session == nullptr) {
+ syslog (LOG_ERR, "Ipset: Cannot initialize ipset session.");
+ ipset_session_fini(session);
+ throw std::runtime_error ("Cannot initialize ipset session.");
+ }
+
+- if (ipset_envopt_parse(session, IPSET_ENV_EXIST, NULL) < 0) {
+- syslog (LOG_ERR, "Ipset: Can't set environment option.");
+- ipset_session_fini(session);
+- throw std::runtime_error ("Can't set environment option.");
+- }
++ ipset_envopt_set(session, IPSET_ENV_EXIST);
+ if (ipset_session_data_set(session, IPSET_SETNAME, ipsetName.c_str()) < 0) {
+- syslog (LOG_ERR, "Ipset: Can't set setname %s: %s", ipsetName.c_str(), ipset_session_error(session));
++ syslog (LOG_ERR, "Ipset: Can't set setname %s: %s", ipsetName.c_str(), ipset_session_report_msg(session));
+ ipset_session_fini(session);
+- throw std::runtime_error("Can't set setname " + ipsetName + ": " + ipset_session_error(session));
++ throw std::runtime_error("Can't set setname " + ipsetName + ": " + ipset_session_report_msg(session));
+ }
+
+ if (ipset_cmd(session, cmd, 0) != 0) {
+ ipset_session_fini(session);
+- syslog (LOG_ERR, "Ipset: Can't exec ipset cmd for setname %s: %s", ipsetName.c_str(), ipset_session_error(session));
+- throw std::runtime_error("Can't exec ipset cmd for " + ipsetName + ": " + ipset_session_error(session));
++ syslog (LOG_ERR, "Ipset: Can't exec ipset cmd for setname %s: %s", ipsetName.c_str(), ipset_session_report_msg(session));
++ throw std::runtime_error("Can't exec ipset cmd for " + ipsetName + ": " + ipset_session_report_msg(session));
+ }
+ if (ipset_commit(session) < 0) {
+- syslog (LOG_ERR, "Ipset: Can't commit for setname %s: %s", ipsetName.c_str(), ipset_session_error(session));
++ syslog (LOG_ERR, "Ipset: Can't commit for setname %s: %s", ipsetName.c_str(), ipset_session_report_msg(session));
+ ipset_session_fini(session);
+- throw std::runtime_error("Can't call ipset_commit for " + ipsetName + ": " + ipset_session_error(session));
++ throw std::runtime_error("Can't call ipset_commit for " + ipsetName + ": " + ipset_session_report_msg(session));
+ }
+ ipset_session_fini(session);
+ return true;
+@@ -210,61 +202,57 @@ bool Ipset::ipset_exec(enum ipset_cmd cmd, const Tins::IPv4Address &inIpAddress
+ if (Debug == true) {
+ syslog(LOG_DEBUG, "Ipset: received command %d for IP address %s for ipset %s", cmd, inIpAddress.to_string().c_str(), ipsetName.c_str());
+ }
+- struct ipset_session *session = ipset_session_init(printf);
++ struct ipset_session *session = noddos_ipset_session_init();
+ if (session == nullptr) {
+ syslog (LOG_ERR, "Ipset: Cannot initialize ipset session.");
+ ipset_session_fini(session);
+ throw std::runtime_error ("Cannot initialize ipset session.");
+ }
+
+- if (ipset_envopt_parse(session, IPSET_ENV_EXIST, NULL) < 0) {
+- syslog (LOG_ERR, "Ipset: Can't set environment option.");
+- ipset_session_fini(session);
+- throw std::runtime_error ("Can't set environment option.");
+- }
++ ipset_envopt_set(session, IPSET_ENV_EXIST);
+ if (ipset_session_data_set(session, IPSET_SETNAME, ipsetName.c_str()) < 0) {
+- syslog (LOG_ERR, "Ipset: Can't set setname %s: %s", ipsetName.c_str(), ipset_session_error(session));
++ syslog (LOG_ERR, "Ipset: Can't set setname %s: %s", ipsetName.c_str(), ipset_session_report_msg(session));
+ ipset_session_fini(session);
+- throw std::runtime_error("Can't set setname " + ipsetName + ": " + ipset_session_error(session));
++ throw std::runtime_error("Can't set setname " + ipsetName + ": " + ipset_session_report_msg(session));
+ }
+ const struct ipset_type *type = ipset_type_get(session, cmd);
+ if (type == NULL) {
+- syslog (LOG_ERR, "Ipset: Can't get type for set %s: %s", ipsetName.c_str(), ipset_session_error(session));
++ syslog (LOG_ERR, "Ipset: Can't get type for set %s: %s", ipsetName.c_str(), ipset_session_report_msg(session));
+ ipset_session_fini(session);
+- throw std::runtime_error("Can't get type for set " + ipsetName + ": " + ipset_session_error(session));
++ throw std::runtime_error("Can't get type for set " + ipsetName + ": " + ipset_session_report_msg(session));
+ }
+
+ uint8_t family = NFPROTO_IPV4;
+ if (ipset_session_data_set(session, IPSET_OPT_FAMILY, &family) < 0) {
+- syslog (LOG_ERR, "Ipset: Can't set session data to IPv4 family for set %s: %s", ipsetName.c_str(), ipset_session_error(session));
++ syslog (LOG_ERR, "Ipset: Can't set session data to IPv4 family for set %s: %s", ipsetName.c_str(), ipset_session_report_msg(session));
+ ipset_session_fini(session);
+- throw std::runtime_error("Can't set session data for " + ipsetName + " to the IPv4 family, error: " + ipset_session_error(session));
++ throw std::runtime_error("Can't set session data for " + ipsetName + " to the IPv4 family, error: " + ipset_session_report_msg(session));
+ }
+ struct in_addr sin;
+ inet_aton (inIpAddress.to_string().c_str(), &sin);
+ if (ipset_session_data_set(session, IPSET_OPT_IP, &sin) < 0) {
+- syslog (LOG_ERR, "Can't set session data to the IPv4 address for setname %s: %s", ipsetName.c_str(), ipset_session_error(session));
++ syslog (LOG_ERR, "Can't set session data to the IPv4 address for setname %s: %s", ipsetName.c_str(), ipset_session_report_msg(session));
+ ipset_session_fini(session);
+- throw std::runtime_error("Can't set session data to the IPv4 address for setname " + ipsetName + ", error: " + ipset_session_error(session));
++ throw std::runtime_error("Can't set session data to the IPv4 address for setname " + ipsetName + ", error: " + ipset_session_report_msg(session));
+ }
+
+ if (timeout) {
+ if (ipset_session_data_set(session, IPSET_OPT_TIMEOUT, &timeout) != 0) {
+- syslog (LOG_ERR, "Ipset: Can't set timeout for setname %s: %s", ipsetName.c_str(), ipset_session_error(session));
++ syslog (LOG_ERR, "Ipset: Can't set timeout for setname %s: %s", ipsetName.c_str(), ipset_session_report_msg(session));
+ ipset_session_fini(session);
+- throw std::runtime_error("Can't set timeout for " + ipsetName + ": " + ipset_session_error(session));
++ throw std::runtime_error("Can't set timeout for " + ipsetName + ": " + ipset_session_report_msg(session));
+ return false;
+ }
+ }
+ if (ipset_cmd(session, cmd, 0) != 0) {
+ ipset_session_fini(session);
+- syslog (LOG_ERR, "Ipset: Can't exec ipset cmd for setname %s: %s", ipsetName.c_str(), ipset_session_error(session));
+- throw std::runtime_error("Can't exec ipset cmd for " + ipsetName + ": " + ipset_session_error(session));
++ syslog (LOG_ERR, "Ipset: Can't exec ipset cmd for setname %s: %s", ipsetName.c_str(), ipset_session_report_msg(session));
++ throw std::runtime_error("Can't exec ipset cmd for " + ipsetName + ": " + ipset_session_report_msg(session));
+ }
+ if (ipset_commit(session) < 0) {
+- syslog (LOG_ERR, "Ipset: Can't commit for setname %s: %s", ipsetName.c_str(), ipset_session_error(session));
++ syslog (LOG_ERR, "Ipset: Can't commit for setname %s: %s", ipsetName.c_str(), ipset_session_report_msg(session));
+ ipset_session_fini(session);
+- throw std::runtime_error("Can't call ipset_commit for " + ipsetName + ": " + ipset_session_error(session));
++ throw std::runtime_error("Can't call ipset_commit for " + ipsetName + ": " + ipset_session_report_msg(session));
+ }
+ ipset_session_fini(session);
+ return true;
+@@ -274,61 +262,57 @@ bool Ipset::ipset_exec(enum ipset_cmd cmd, const Tins::IPv6Address &inIpAddress
+ if (Debug == true) {
+ syslog(LOG_DEBUG, "Ipset: received command %d for IP address %s for ipset %s", cmd, inIpAddress.to_string().c_str(), ipsetName.c_str());
+ }
+- struct ipset_session *session = ipset_session_init(printf);
++ struct ipset_session *session = noddos_ipset_session_init();
+ if (session == nullptr) {
+ syslog (LOG_ERR, "Ipset: Cannot initialize ipset session.");
+ ipset_session_fini(session);
+ throw std::runtime_error ("Cannot initialize ipset session.");
+ }
+
+- if (ipset_envopt_parse(session, IPSET_ENV_EXIST, NULL) < 0) {
+- syslog (LOG_ERR, "Ipset: Can't set environment option.");
+- ipset_session_fini(session);
+- throw std::runtime_error ("Can't set environment option.");
+- }
++ ipset_envopt_set(session, IPSET_ENV_EXIST);
+ if (ipset_session_data_set(session, IPSET_SETNAME, ipsetName.c_str()) < 0) {
+- syslog (LOG_ERR, "Ipset: Can't set setname %s: %s", ipsetName.c_str(), ipset_session_error(session));
++ syslog (LOG_ERR, "Ipset: Can't set setname %s: %s", ipsetName.c_str(), ipset_session_report_msg(session));
+ ipset_session_fini(session);
+- throw std::runtime_error("Can't set setname " + ipsetName + ": " + ipset_session_error(session));
++ throw std::runtime_error("Can't set setname " + ipsetName + ": " + ipset_session_report_msg(session));
+ }
+ const struct ipset_type *type = ipset_type_get(session, cmd);
+ if (type == NULL) {
+- syslog (LOG_ERR, "Ipset: Can't get type for set %s: %s", ipsetName.c_str(), ipset_session_error(session));
++ syslog (LOG_ERR, "Ipset: Can't get type for set %s: %s", ipsetName.c_str(), ipset_session_report_msg(session));
+ ipset_session_fini(session);
+- throw std::runtime_error("Can't get type for set " + ipsetName + ": " + ipset_session_error(session));
++ throw std::runtime_error("Can't get type for set " + ipsetName + ": " + ipset_session_report_msg(session));
+ }
+
+ uint8_t family = NFPROTO_IPV6;
+ if (ipset_session_data_set(session, IPSET_OPT_FAMILY, &family) < 0) {
+- syslog (LOG_ERR, "Ipset: Can't set session data to IPv6 family for set %s: %s", ipsetName.c_str(), ipset_session_error(session));
++ syslog (LOG_ERR, "Ipset: Can't set session data to IPv6 family for set %s: %s", ipsetName.c_str(), ipset_session_report_msg(session));
+ ipset_session_fini(session);
+- throw std::runtime_error("Can't set session data for " + ipsetName + " to the IPv6 family, error: " + ipset_session_error(session));
++ throw std::runtime_error("Can't set session data for " + ipsetName + " to the IPv6 family, error: " + ipset_session_report_msg(session));
+ }
+
+ unsigned char buf[sizeof(struct in6_addr)];
+ int s = inet_pton(AF_INET6, inIpAddress.to_string().c_str(), buf);
+ if (ipset_session_data_set(session, IPSET_OPT_IP, &buf) < 0) {
+- syslog (LOG_ERR, "Ipset: Can't set session data to the IPv4 address for setname %s: %s", ipsetName.c_str(), ipset_session_error(session));
++ syslog (LOG_ERR, "Ipset: Can't set session data to the IPv4 address for setname %s: %s", ipsetName.c_str(), ipset_session_report_msg(session));
+ ipset_session_fini(session);
+- throw std::runtime_error("Can't set session data to the IPv4 address for setname " + ipsetName + ", error: " + ipset_session_error(session));
++ throw std::runtime_error("Can't set session data to the IPv4 address for setname " + ipsetName + ", error: " + ipset_session_report_msg(session));
+ }
+
+ if (timeout) {
+ if (ipset_session_data_set(session, IPSET_OPT_TIMEOUT, &timeout) != 0) {
+- syslog (LOG_ERR, "Ipset: Can't set timeout for setname %s: %s", ipsetName.c_str(), ipset_session_error(session));
++ syslog (LOG_ERR, "Ipset: Can't set timeout for setname %s: %s", ipsetName.c_str(), ipset_session_report_msg(session));
+ ipset_session_fini(session);
+- throw std::runtime_error("Can't set timeout for " + ipsetName + ": " + ipset_session_error(session));
++ throw std::runtime_error("Can't set timeout for " + ipsetName + ": " + ipset_session_report_msg(session));
+ }
+ }
+ if (ipset_cmd(session, cmd, 0) != 0) {
+- syslog (LOG_ERR, "Ipset: Can't exec ipset cmd for setname %s: %s", ipsetName.c_str(), ipset_session_error(session));
++ syslog (LOG_ERR, "Ipset: Can't exec ipset cmd for setname %s: %s", ipsetName.c_str(), ipset_session_report_msg(session));
+ ipset_session_fini(session);
+- throw std::runtime_error("Can't exec ipset cmd for " + ipsetName + ": " + ipset_session_error(session));
++ throw std::runtime_error("Can't exec ipset cmd for " + ipsetName + ": " + ipset_session_report_msg(session));
+ }
+ if (ipset_commit(session) < 0) {
+- syslog (LOG_ERR, "Ipset: Can't commit for setname %s: %s", ipsetName.c_str(), ipset_session_error(session));
++ syslog (LOG_ERR, "Ipset: Can't commit for setname %s: %s", ipsetName.c_str(), ipset_session_report_msg(session));
+ ipset_session_fini(session);
+- throw std::runtime_error("Can't call ipset_commit for " + ipsetName + ": " + ipset_session_error(session));
++ throw std::runtime_error("Can't call ipset_commit for " + ipsetName + ": " + ipset_session_report_msg(session));
+ }
+ ipset_session_fini(session);
+ return true;
+@@ -338,50 +322,46 @@ bool Ipset::ipset_exec(enum ipset_cmd cmd, const std::string Mac, time_t timeout
+ if (Debug == true) {
+ syslog(LOG_DEBUG, "Ipset: received command %d for MAC address %s for ipset %s", cmd, Mac.c_str(), ipsetName.c_str());
+ }
+- struct ipset_session *session = ipset_session_init(printf);
++ struct ipset_session *session = noddos_ipset_session_init();
+ if (session == nullptr) {
+ syslog (LOG_ERR, "Ipset: Cannot initialize ipset session.");
+ ipset_session_fini(session);
+ throw std::runtime_error ("Cannot initialize ipset session.");
+ }
+
+- if (ipset_envopt_parse(session, IPSET_ENV_EXIST, NULL) < 0) {
+- syslog (LOG_ERR, "Ipset: Can't set environment option.");
+- ipset_session_fini(session);
+- throw std::runtime_error ("Can't set environment option.");
+- }
++ ipset_envopt_set(session, IPSET_ENV_EXIST);
+ if (ipset_session_data_set(session, IPSET_SETNAME, ipsetName.c_str()) < 0) {
+- syslog (LOG_ERR, "Ipset: Can't set setname %s: %s", ipsetName.c_str(), ipset_session_error(session));
++ syslog (LOG_ERR, "Ipset: Can't set setname %s: %s", ipsetName.c_str(), ipset_session_report_msg(session));
+ ipset_session_fini(session);
+- throw std::runtime_error("Can't set setname " + ipsetName + ": " + ipset_session_error(session));
++ throw std::runtime_error("Can't set setname " + ipsetName + ": " + ipset_session_report_msg(session));
+ }
+ const struct ipset_type *type = ipset_type_get(session, cmd);
+ if (type == NULL) {
+- syslog (LOG_ERR, "Ipset: Can't get type for set %s: %s", ipsetName.c_str(), ipset_session_error(session));
++ syslog (LOG_ERR, "Ipset: Can't get type for set %s: %s", ipsetName.c_str(), ipset_session_report_msg(session));
+ ipset_session_fini(session);
+- throw std::runtime_error("Can't get type for set " + ipsetName + ": " + ipset_session_error(session));
++ throw std::runtime_error("Can't get type for set " + ipsetName + ": " + ipset_session_report_msg(session));
+ }
+ if (ipset_parse_elem(session, (ipset_opt)type->last_elem_optional, Mac.c_str()) < 0) {
+- syslog (LOG_ERR, "Ipset: Can't call ipset_parse_elem for %s: %s ", ipsetName.c_str(), ipset_session_error(session));
++ syslog (LOG_ERR, "Ipset: Can't call ipset_parse_elem for %s: %s ", ipsetName.c_str(), ipset_session_report_msg(session));
+ ipset_session_fini(session);
+- throw std::runtime_error("Can't call ipset_parse_elem for ipset " + ipsetName + ": " + ipset_session_error(session));
++ throw std::runtime_error("Can't call ipset_parse_elem for ipset " + ipsetName + ": " + ipset_session_report_msg(session));
+ }
+ if (timeout) {
+ if (ipset_session_data_set(session, IPSET_OPT_TIMEOUT, &timeout) != 0) {
+- syslog (LOG_ERR, "Ipset: Can't set timeout for setname %s: %s", ipsetName.c_str(), ipset_session_error(session));
++ syslog (LOG_ERR, "Ipset: Can't set timeout for setname %s: %s", ipsetName.c_str(), ipset_session_report_msg(session));
+ ipset_session_fini(session);
+- throw std::runtime_error("Can't set timeout for " + ipsetName + ": " + ipset_session_error(session));
++ throw std::runtime_error("Can't set timeout for " + ipsetName + ": " + ipset_session_report_msg(session));
+ }
+ }
+ if (ipset_cmd(session, cmd, 0) != 0) {
+- syslog (LOG_ERR, "Ipset: Can't exec ipset cmd for setname %s: %s", ipsetName.c_str(), ipset_session_error(session));
++ syslog (LOG_ERR, "Ipset: Can't exec ipset cmd for setname %s: %s", ipsetName.c_str(), ipset_session_report_msg(session));
+ ipset_session_fini(session);
+- throw std::runtime_error("Can't exec ipset cmd for " + ipsetName + ": " + ipset_session_error(session));
++ throw std::runtime_error("Can't exec ipset cmd for " + ipsetName + ": " + ipset_session_report_msg(session));
+ }
+ if (ipset_commit(session) < 0) {
+- syslog (LOG_ERR, "Ipset: Can't commit for setname %s: %s", ipsetName.c_str(), ipset_session_error(session));
++ syslog (LOG_ERR, "Ipset: Can't commit for setname %s: %s", ipsetName.c_str(), ipset_session_report_msg(session));
+ ipset_session_fini(session);
+- throw std::runtime_error("Can't call ipset_commit for " + ipsetName + ": " + ipset_session_error(session));
++ throw std::runtime_error("Can't call ipset_commit for " + ipsetName + ": " + ipset_session_report_msg(session));
+ }
+ ipset_session_fini(session);
+ return true;
+diff --git a/src/Ipset.h b/src/Ipset.h
+index 2c5f7b2..eb180da 100644
+--- a/src/Ipset.h
++++ b/src/Ipset.h
+@@ -41,6 +41,31 @@
+
+ #include "MacAddress.h"
+
++#if IPSET_PROTOCOL < 7
++/* compatibility shims */
++
++inline void ipset_envopt_set(struct ipset_session *session, enum ipset_envopt opt)
++{
++ ipset_envopt_parse(session, opt, NULL);
++}
++
++inline const char * ipset_session_report_msg(const struct ipset_session *session)
++{
++ return ipset_session_error(session);
++}
++
++static inline struct ipset_session *noddos_ipset_session_init(void)
++{
++ return ipset_session_init(printf);
++}
++
++#else
++
++static inline struct ipset_session *noddos_ipset_session_init(void)
++{
++ return ipset_session_init(NULL, NULL);
++}
++#endif
+
+ std::string getIpsetUuid (std::string inUuid);
+ std::string getIpsetName (std::string inUuid, bool inSrc, bool inIpv4 = true);
+@@ -99,23 +124,19 @@ public:
+ }
+ bool Exists() {
+ try {
+- struct ipset_session *session = ipset_session_init(printf);
++ struct ipset_session *session = noddos_ipset_session_init();
+ if (session == nullptr) {
+ syslog (LOG_ERR, "Ipset: Cannot initialize ipset session.");
+ ipset_session_fini(session);
+ throw std::runtime_error ("Cannot initialize ipset session.");
+ }
+
+- if (ipset_envopt_parse(session, IPSET_ENV_EXIST, NULL) < 0) {
+- syslog (LOG_ERR, "Ipset: Can't set environment option.");
+- ipset_session_fini(session);
+- throw std::runtime_error ("Can't set environment option.");
+- }
++ ipset_envopt_set(session, IPSET_ENV_EXIST);
+ int r = ipset_session_data_set(session, IPSET_SETNAME, ipsetName.c_str());
+ if (ipset_commit(session) < 0) {
+- syslog (LOG_ERR, "Ipset: Can't commit for setname %s: %s", ipsetName.c_str(), ipset_session_error(session));
++ syslog (LOG_ERR, "Ipset: Can't commit for setname %s: %s", ipsetName.c_str(), ipset_session_report_msg(session));
+ ipset_session_fini(session);
+- throw std::runtime_error("Can't call ipset_commit for " + ipsetName + ": " + ipset_session_error(session));
++ throw std::runtime_error("Can't call ipset_commit for " + ipsetName + ": " + ipset_session_report_msg(session));
+ }
+ ipset_session_fini(session);
+ return r == 0;
--- /dev/null
+From eb1730afff9377a5f167d0738ad0b3aeba9634d0 Mon Sep 17 00:00:00 2001
+From: Eneas U de Queiroz <cote2004-github@yahoo.com>
+Date: Tue, 19 Mar 2019 18:27:10 -0300
+Subject: [PATCH] getnoddosdeviceprofiles: wget timestamping check
+
+Check if the --timestamping option is available to avoid an error in
+openwrt when wget is handled by uclient-fetch.
+
+Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
+
+diff --git a/tools/getnoddosdeviceprofiles b/tools/getnoddosdeviceprofiles
+index 337e351..174034f 100755
+--- a/tools/getnoddosdeviceprofiles
++++ b/tools/getnoddosdeviceprofiles
+@@ -86,7 +86,12 @@ fi
+ # That's also why we don't delete the downloaded file
+ if [ "$WGET" != "" ]
+ then
+- GETURL="$WGET --quiet --timestamping"
++ GETURL="$WGET --quiet"
++ # Make sure wget accepts --timestamping
++ if wget --help 2>&1 | egrep timestamping > /dev/null
++ then
++ GETURL="$GETURL --timestamping"
++ fi
+ else
+ if [ "$CURL" != "" ]
+ then
--- /dev/null
+--- a/src/opensslfingerprint.cxx
++++ b/src/opensslfingerprint.cxx
+@@ -73,9 +73,11 @@ std::string getCertFingerprint(const std::string certfile, const bool Debug = fa
+ // closes file
+ close(fd);
+
++#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER)
+ // initialize OpenSSL
+ SSL_load_error_strings();
+ SSL_library_init();
++#endif
+
+ // creates BIO buffer
+ BIO * bio = BIO_new_mem_buf(buff, len);
PKG_NAME:=ntpclient
PKG_VERSION:=2015_365
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://doolittle.icarus.com/ntpclient
unset COUNT
unset INTERFACE_GLOBAL
-NTPC=`which ntpclient`
+NTPC=$(command -v ntpclient)
check_server() {
local hostname
load_settings() {
local interval
local count
- local iface
-
+ local interface
+
config_get interval $1 interval
config_get count $1 count
config_get interface $1 interface
-
+
[ -n "$count" ] && COUNT=$count
[ -n "$interval" ] && INTERVAL=$interval
[ -n "$interface" ] && INTERFACE_GLOBAL=$interface
config_load ntpclient
config_foreach load_settings ntpclient
-NTP_RUNNING=`ps | grep $NTPC | grep -v grep`
+NTP_RUNNING=$(busybox ps | grep $NTPC | grep -v grep)
case "${ACTION:-ifup}" in
ifup)
- [ -z "$NTP_RUNNING" ] && start_ntpclient
+ [ -z "$NTP_RUNNING" ] && start_ntpclient
;;
ifdown)
- [ -n "$NTP_RUNNING" ] && stop_ntpclient
+ [ -n "$NTP_RUNNING" ] && stop_ntpclient
;;
esac
include $(TOPDIR)/rules.mk
PKG_NAME:=ntp
-PKG_VERSION:=4.2.8p12
-PKG_RELEASE:=1
+PKG_VERSION:=4.2.8p13
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/
-PKG_HASH:=709b222b5013d77d26bfff532b5ea470a8039497ef29d09363931c036cb30454
+PKG_HASH:=288772cecfcd9a53694ffab108d1825a31ba77f3a8466b0401baeca3bc232a38
PKG_LICENSE:=Unique
PKG_LICENSE_FILES:=COPYRIGHT html/copyright.html
+PKG_CPE_ID:=cpe:/a:ntp:ntp
PKG_FIXUP:=autoreconf
PKG_LIBTOOL_PATHS:=. sntp
PROG=/sbin/ntpd
HOTPLUG_HELPER=/usr/sbin/ntpd.hotplug-helper
-config_file=/var/run/ntpd.conf
+config_file=/var/etc/ntpd.conf
trunc() {
echo -n "" > $config_file
}
validate_ntp_section() {
- uci_validate_section system timeserver "${1}" \
+ uci_load_validate system timeserver "$1" "$2" \
'server:list(host)' 'enabled:bool:1' 'enable_server:bool:0' \
'interface:list(string)'
}
-start_service() {
- local server enabled enable_server interface intf
+start_ntpd_instance() {
+ local intf i
- validate_ntp_section ntp || {
+ [ "$2" = 0 ] || {
echo "validation failed"
return 1
}
procd_set_param command $HOTPLUG_HELPER
procd_close_instance
}
+
+start_service() {
+ validate_ntp_section ntp start_ntpd_instance
+}
+
+service_triggers() {
+ procd_add_reload_trigger "system"
+ procd_add_validation validate_ntp_section
+}
START=60
-STEP_SERVERS="0.openwrt.pool.ntp.org 1.openwrt.pool.ntp.org 2.openwrt.pool.ntp.org"
+DEFAULT_SERVERS="0.openwrt.pool.ntp.org 1.openwrt.pool.ntp.org 2.openwrt.pool.ntp.org"
+CFG_SERVERS=$(uci -q get system.ntp.server)
+STEP_SERVERS=${CFG_SERVERS:-$DEFAULT_SERVERS}
TIMEOUT="2" # in seconds
start() {
PKG_NAME:=nut
PKG_VERSION:=2.7.4
-PKG_RELEASE:=15
+PKG_RELEASE:=16
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.networkupstools.org/source/2.7/
}
build_config() {
- local runas=nutmon
mkdir -m 0750 -p "$(dirname "$UPSMON_C")"
config_load nut_monitor
}
start_service() {
+ local runas=nutmon
local havemon havems
build_config
return 0
}
-restart() {
- trap '' TERM
- stop "$@"
- sleep 2
- trap - TERM
- start "$@"
-}
-
reload_service() {
if pgrep upsmon >/dev/null 2>/dev/null; then
+ local runas=nutmon
build_config
/usr/sbin/upsmon -c reload
else
fi
}
+stop_service() {
+ upsmon -c stop
+}
+
service_triggers() {
config_load nut_monitor
interface_triggers "add_trigger"
include $(TOPDIR)/rules.mk
PKG_NAME:=obfs4proxy
-PKG_VERSION:=0.0.7
+PKG_VERSION:=0.0.11
PKG_RELEASE:=1
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://git.torproject.org/pluggable-transports/obfs4.git
-PKG_SOURCE_VERSION:=8256fac93c2cf79742725e3aaced5bbe3380fd32
-PKG_SOURCE_DATE:=20161115
-PKG_MIRROR_HASH:=9c504337f7a2b46310083224cf0998fc7645f8af5d50657cf74358d39916eddc
+PKG_SOURCE:=obfs4-$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=https://gitlab.com/yawning/obfs4/-/archive/$(PKG_NAME)-$(PKG_VERSION)/
+PKG_HASH:=b0964479300a3ea899a4354fdeb5196e52544554f8edf6190142cddd1072526c
+PKG_BUILD_DIR:=$(BUILD_DIR)/obfs4-$(PKG_NAME)-$(PKG_VERSION)
PKG_LICENSE:=BSD-2-Clause
PKG_LICENSE_FILES:=LICENSE
PKG_BUILD_PARALLEL:=1
PKG_USE_MIPS16:=0
-GO_PKG:=git.torproject.org/pluggable-transports/obfs4.git
+GO_PKG:=gitlab.com/yawning/obfs4.git
include $(INCLUDE_DIR)/package.mk
include ../../lang/golang/golang-package.mk
define Package/obfs4proxy/Default
TITLE:=A Tor pluggable transport proxy, implementing obfs4
- URL:=https://gitweb.torproject.org/pluggable-transports/obfs4.git/
+ URL:=https://gitlab.com/yawning/obfs4
DEPENDS:=$(GO_ARCH_DEPENDS)
endef
CATEGORY:=Network
endef
-define Package/golang-torproject-pluggable-transports-obfs4-dev
+define Package/golang-gitlab-yawning-obfs4-dev
$(call Package/obfs4proxy/Default)
$(call GoPackage/GoSubMenu)
TITLE+= (source files)
- DEPENDS+= \
- +golang-github-agl-ed25519-dev \
- +golang-github-dchest-siphash-dev \
- +golang-golang-x-crypto-dev \
- +golang-golang-x-net-dev \
- +golang-torproject-pluggable-transports-goptlib-dev
PKGARCH:=all
endef
program.
endef
-define Package/golang-torproject-pluggable-transports-obfs4-dev/description
+define Package/golang-gitlab-yawning-obfs4-dev/description
$(call Package/obfs4proxy/Default/description)
This package provides the source files for the client/bridge program.
$(eval $(call GoBinPackage,obfs4proxy))
$(eval $(call BuildPackage,obfs4proxy))
-
-$(eval $(call GoSrcPackage,golang-torproject-pluggable-transports-obfs4-dev))
-$(eval $(call BuildPackage,golang-torproject-pluggable-transports-obfs4-dev))
+$(eval $(call GoSrcPackage,golang-gitlab-yawning-obfs4-dev))
+$(eval $(call BuildPackage,golang-gitlab-yawning-obfs4-dev))
+++ /dev/null
-From af4824cb0b2c36a0eba4bc1590eb0737302e992e Mon Sep 17 00:00:00 2001
-From: Yawning Angel <yawning@schwanenlied.me>
-Date: Wed, 10 Jan 2018 15:11:44 +0000
-Subject: Bug 24793: Send the correct authorization HTTP header for basic auth.
-
-Apparently I didn't test the "connect via HTTP(s)" proxy with
-authentication at all when I added that functionality, so it has been
-broken for years.
-
-This should fix it now.
----
- obfs4proxy/proxy_http.go | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/obfs4proxy/proxy_http.go b/obfs4proxy/proxy_http.go
-index 6f11790..a5c2100 100644
---- a/obfs4proxy/proxy_http.go
-+++ b/obfs4proxy/proxy_http.go
-@@ -29,6 +29,7 @@ package main
-
- import (
- "bufio"
-+ "encoding/base64"
- "fmt"
- "net"
- "net/http"
-@@ -90,7 +91,9 @@ func (s *httpProxy) Dial(network, addr string) (net.Conn, error) {
- }
- req.Close = false
- if s.haveAuth {
-- req.SetBasicAuth(s.username, s.password)
-+ // SetBasicAuth doesn't quite do what is appropriate, because
-+ // the correct header is `Proxy-Authorization`.
-+ req.Header.Set("Proxy-Authorization", base64.StdEncoding.EncodeToString([]byte(s.username + ":" + s.password)))
- }
- req.Header.Set("User-Agent", "")
-
---
-cgit v1.1
-
PKG_NAME:=obfsproxy
PKG_VERSION:=0.2.13
-PKG_RELEASE:=1
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/source/o/obfsproxy
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/o/obfsproxy
PKG_HASH:=1e26c2faef1cfcf856ddf60e9647058a7c78fb0d47f05b58a0f847ed7cc41a66
PKG_LICENSE:=BSD-3-Clause
include ../../lang/python/python-package.mk
define Package/obfsproxy
- SECTION:=net
- CATEGORY:=Network
- TITLE:=A pluggable transport proxy written in Python
- URL:=https://www.torproject.org/projects/obfsproxy.html.en
- DEPENDS:=+python-light +python-crypto +python-pyptlib +python-setuptools +python-yaml +twisted
+ SECTION:=net
+ CATEGORY:=Network
+ TITLE:=A pluggable transport proxy written in Python
+ URL:=https://gitweb.torproject.org/pluggable-transports/obfsproxy.git/
+ DEPENDS:= \
+ +python-light \
+ +python-crypto \
+ +python-pyptlib \
+ +python-setuptools \
+ +python-twisted \
+ +python-yaml
+ VARIANT:=python
endef
define Package/obfsproxy/description
/etc/config/obfsproxy
endef
-define Build/Compile
- $(call Build/Compile/PyMod,,install --prefix="/usr" --root="$(PKG_INSTALL_DIR)")
-endef
-
define PyPackage/obfsproxy/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/obfsproxy $(1)/usr/bin/
$(eval $(call PyPackage,obfsproxy))
$(eval $(call BuildPackage,obfsproxy))
+$(eval $(call BuildPackage,obfsproxy-src))
include $(TOPDIR)/rules.mk
PKG_NAME:=ocserv
-PKG_VERSION:=0.12.2
+PKG_VERSION:=0.12.4
PKG_RELEASE:=1
PKG_USE_MIPS16:=0
PKG_BUILD_DIR :=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=ftp://ftp.infradead.org/pub/ocserv/
-PKG_HASH:=71ccf1dfe9e13a05d9dc1104256cad6ff91e7b7d8c07a02398842ce018a3897d
+PKG_HASH:=05c01effa8a7c2f022616fcb62bade4df51aa7f0035248671da12819d62cb185
PKG_LICENSE:=GPLv2+
PKG_LICENSE_FILES:=COPYING
PKG_NAME:=ola
PKG_VERSION:=0.10.7
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/OpenLightingProject/ola/tar.gz/$(PKG_VERSION)?
--- /dev/null
+From d311970864a2338d63ce3c22a46bb9ec4bb26bfe Mon Sep 17 00:00:00 2001
+From: Peter Newman <peterjnewman@gmail.com>
+Date: Fri, 8 Mar 2019 15:43:50 +0000
+Subject: [PATCH] Attempt to fix Protobuf 3.7 builds
+
+---
+ configure.ac | 3 +++
+ protoc/StrUtil.cpp | 10 ++++++++++
+ 2 files changed, 13 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index 9824609b4..4f782847c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -803,6 +803,9 @@ AS_IF([test "${enable_rdm_tests}" = "yes"],
+ AS_IF([test "x$build_java_libs" = xyes],
+ [PROTOBUF_SUPPORT([2.4.0])],
+ [PROTOBUF_SUPPORT([2.3.0])])
++# Version 3.7 and above of protoc require some additional includes
++AC_CHECK_HEADERS([google/protobuf/io/strtod.h google/protobuf/stubs/logging.h \
++ google/protobuf/stubs/stl_util.h])
+
+
+ # Doxygen
+diff --git a/protoc/StrUtil.cpp b/protoc/StrUtil.cpp
+index 85891a6a4..2914e82f1 100644
+--- a/protoc/StrUtil.cpp
++++ b/protoc/StrUtil.cpp
+@@ -41,6 +41,16 @@
+
+ #include "protoc/StrUtil.h"
+
++#ifdef HAVE_GOOGLE_PROTOBUF_IO_STRTOD_H
++#include <google/protobuf/io/strtod.h>
++#endif // HAVE_GOOGLE_PROTOBUF_IO_STRTOD_H
++#ifdef HAVE_GOOGLE_PROTOBUF_STUBS_LOGGING_H
++#include <google/protobuf/stubs/logging.h>
++#endif // HAVE_GOOGLE_PROTOBUF_STUBS_LOGGING_H
++#ifdef HAVE_GOOGLE_PROTOBUF_STUBS_STL_UTIL_H
++#include <google/protobuf/stubs/stl_util.h>
++#endif // HAVE_GOOGLE_PROTOBUF_STUBS_STL_UTIL_H
++
+ #ifdef _WIN32
+ // MSVC has only _snprintf, not snprintf.
+ //
--- /dev/null
+From 409a82f0e35fc33627f16180af7ba8a617347c8e Mon Sep 17 00:00:00 2001
+From: Peter Newman <peterjnewman@gmail.com>
+Date: Sat, 9 Mar 2019 14:08:01 +0000
+Subject: [PATCH] Add the missing config.h include
+
+---
+ protoc/StrUtil.cpp | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/protoc/StrUtil.cpp b/protoc/StrUtil.cpp
+index 2914e82f1..d300b71e8 100644
+--- a/protoc/StrUtil.cpp
++++ b/protoc/StrUtil.cpp
+@@ -41,6 +41,11 @@
+
+ #include "protoc/StrUtil.h"
+
++#if HAVE_CONFIG_H
++#include <config.h>
++#endif // HAVE_CONFIG_H
++
++// Required for Protobuf 3.7 onwards
+ #ifdef HAVE_GOOGLE_PROTOBUF_IO_STRTOD_H
+ #include <google/protobuf/io/strtod.h>
+ #endif // HAVE_GOOGLE_PROTOBUF_IO_STRTOD_H
--- /dev/null
+--- a/protoc/CppFileGenerator.cpp
++++ b/protoc/CppFileGenerator.cpp
+@@ -223,9 +223,9 @@
+ printer->Print(
+ "namespace {\n"
+ "\n"
+- "GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);\n"
++ "::google::protobuf::internal::once_flag protobuf_AssignDescriptors_once_;\n"
+ "inline void protobuf_AssignDescriptorsOnce() {\n"
+- " ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_,"
++ " ::google::protobuf::internal::call_once(protobuf_AssignDescriptors_once_,"
+ "\n"
+ " &$assigndescriptorsname$);\n"
+ "}\n"
include $(TOPDIR)/rules.mk
PKG_NAME:=oor
-PKG_VERSION:=1.2.2
+PKG_VERSION:=1.3.0
PKG_RELEASE:=1
PKG_SOURCE_URL=https://github.com/OpenOverlayRouter/oor/releases/download/$(PKG_VERSION)/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_MD5SUM:=6702348fa314c2691f28c7e71337bb84
+PKG_HASH:=e2bee73611984f0412798f4b72145f4f00037a9e874d3c2168a49e1bf49e4809
PKG_LICENSE:=Apache-2.0
PKG_LICENSE_FILES:=LICENSE
include $(TOPDIR)/rules.mk
PKG_NAME:=openconnect
-PKG_VERSION:=8.01
-PKG_RELEASE:=1
-PKG_USE_MIPS16:=0
+PKG_VERSION:=8.03
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=ftp://ftp.infradead.org/pub/openconnect/
-PKG_HASH:=48868a4f99c81a7474d87fbabb41b8eaa7d32b54771c9f23a7aea72d9cd626fd
-PKG_LICENSE:=LGPLv2.1+
+PKG_HASH:=908cff9b1ce266b6bb7f969a7f62723543ab94719ba3c95a150fe3894cbc9ef2
+
+PKG_LICENSE:=LGPL-2.1-or-later
+PKG_LICENSE_FILES:=COPYING.LGPL
PKG_CONFIG_DEPENDS:= \
CONFIG_OPENCONNECT_GNUTLS \
CONFIG_OPENCONNECT_OPENSSL \
+PKG_USE_MIPS16:=0
include $(INCLUDE_DIR)/package.mk
DEPENDS:=+libxml2 +kmod-tun +resolveip +vpnc-scripts +OPENCONNECT_OPENSSL:libopenssl +OPENCONNECT_OPENSSL:p11-kit +OPENCONNECT_OPENSSL:libp11 +OPENCONNECT_GNUTLS:libgnutls +OPENCONNECT_GNUTLS:libtasn1 +OPENCONNECT_STOKEN:libstoken
TITLE:=OpenConnect VPN client (Cisco AnyConnect and Juniper/Pulse compatible)
MAINTAINER:=Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
- URL:=http://www.infradead.org/openconnect/
+ URL:=https://www.infradead.org/openconnect/
SUBMENU:=VPN
endef
+++ /dev/null
-From 03ecd34e0137b3f0bf0d2fc3ab7f7d8b3682785e Mon Sep 17 00:00:00 2001
-From: Yousong Zhou <yszhou4tech@gmail.com>
-Date: Thu, 14 Dec 2017 18:03:35 +0800
-Subject: [PATCH] Fix compilation with libp11 version >= 0.4.7
-
-libp11 0.4.7 renamed then dropped macro definition in commits
-
- 4f0fce4: Error reporting fixes
- e4c641b: PKCS11 errors separated into P11 and CKR
-
-This change assumes that libp11 will restore compatibility by bringing
-back old forms of macro definition
-
-Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
----
- openssl-pkcs11.c | 18 ++++++++++++++++++
- 1 file changed, 18 insertions(+)
-
-diff --git a/openssl-pkcs11.c b/openssl-pkcs11.c
-index 61da123..ba7e491 100644
---- a/openssl-pkcs11.c
-+++ b/openssl-pkcs11.c
-@@ -30,6 +30,24 @@
- #include <libp11.h>
- #include <p11-kit/pkcs11.h>
-
-+#ifndef ERR_LIB_PKCS11
-+# if defined(ERR_LIB_CKR)
-+# define ERR_LIB_PKCS11 ERR_LIB_CKR
-+# elif defined(ERR_LIB_USER)
-+# define ERR_LIB_PKCS11 ERR_LIB_USER
-+# else
-+# error undefined macro ERR_LIB_PKCS11
-+# endif
-+#endif
-+
-+#ifndef PKCS11_F_PKCS11_LOGIN
-+# if defined(CKR_F_PKCS11_LOGIN)
-+# define PKCS11_F_PKCS11_LOGIN CKR_F_PKCS11_LOGIN
-+# else
-+# error undefined macro PKCS11_F_PKCS11_LOGIN
-+# endif
-+#endif
-+
- static PKCS11_CTX *pkcs11_ctx(struct openconnect_info *vpninfo)
- {
- PKCS11_CTX *ctx;
---
-1.8.3.1
-
--- /dev/null
+From 460c060dda115bc8066bb4b955453c673459b6cc Mon Sep 17 00:00:00 2001
+From: Rosen Penev <rosenp@gmail.com>
+Date: Sun, 9 Jun 2019 23:36:53 -0700
+Subject: [PATCH] Fix compilation without deprecated OpenSSL 1.1 APIs
+
+Initialization and deinitialization is deprecated.
+
+Signed-off-by: Rosen Penev <rosenp@gmail.com>
+---
+ library.c | 4 ++++
+ openssl.c | 2 ++
+ tests/bad_dtls_test.c | 4 ++++
+ 3 files changed, 10 insertions(+)
+
+diff --git a/library.c b/library.c
+index 0e3d05e6..e45e93a2 100644
+--- a/library.c
++++ b/library.c
+@@ -38,6 +38,10 @@
+ #include "gnutls.h"
+ #endif
+
++#if defined(OPENCONNECT_OPENSSL)
++#include <openssl/bio.h>
++#endif
++
+ struct openconnect_info *openconnect_vpninfo_new(const char *useragent,
+ openconnect_validate_peer_cert_vfn validate_peer_cert,
+ openconnect_write_new_config_vfn write_new_config,
+diff --git a/openssl.c b/openssl.c
+index 2b1f07bd..e505f49a 100644
+--- a/openssl.c
++++ b/openssl.c
+@@ -1879,10 +1879,12 @@ int openconnect_init_ssl(void)
+ if (ret)
+ return ret;
+ #endif
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+ SSL_library_init();
+ ERR_clear_error();
+ SSL_load_error_strings();
+ OpenSSL_add_all_algorithms();
++#endif
+ return 0;
+ }
+
+diff --git a/tests/bad_dtls_test.c b/tests/bad_dtls_test.c
+index ac8d3f1e..c123c8f8 100644
+--- a/tests/bad_dtls_test.c
++++ b/tests/bad_dtls_test.c
+@@ -752,8 +752,10 @@ int main(int argc, char *argv[])
+ int ret;
+ int i;
+
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+ SSL_library_init();
+ SSL_load_error_strings();
++#endif
+
+ RAND_bytes(session_id, sizeof(session_id));
+ RAND_bytes(master_secret, sizeof(master_secret));
+@@ -910,8 +912,10 @@ int main(int argc, char *argv[])
+ printf("Cisco BadDTLS test: FAILED\n");
+ }
+
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+ ERR_free_strings();
+ EVP_cleanup();
++#endif
+
+ return testresult?0:1;
+ }
+--
+2.17.1
+
--- /dev/null
+From afb6442533dc7475ed61642c3f5b295db1e6f561 Mon Sep 17 00:00:00 2001
+From: Rosen Penev <rosenp@gmail.com>
+Date: Sun, 9 Jun 2019 23:40:21 -0700
+Subject: [PATCH] Fix DTLS bug when lacking deprecated APIs
+
+HAVE_DTLS12 is for DTLSv1_method. This causes dtls_method to be NULL and
+crash.
+
+[dwmw2: Rework it quite a bit more]
+
+Signed-off-by: Rosen Penev <rosenp@gmail.com>
+Signed-off-by: David Woodhouse <dwmw2@infradead.org>
+---
+ configure.ac | 17 ++++++++++++++---
+ openssl-dtls.c | 49 ++++++++++++++++++++++++++-----------------------
+ 2 files changed, 40 insertions(+), 26 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 02096c51..f7557933 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -455,11 +455,22 @@ case "$ssl_library" in
+ AC_DEFINE(HAVE_DTLS1_STOP_TIMER, [1], [OpenSSL has dtls1_stop_timer() function])],
+ [AC_MSG_RESULT(no)])
+
+- AC_MSG_CHECKING([for DTLSv1_2_client_method() in OpenSSL])
++ # DTLS_client_method() and DTLSv1_2_client_method() were both added between
++ # OpenSSL v1.0.1 and v1.0.2. DTLSV1.2_client_method() was later deprecated
++ # in v1.1.0 so we use DTLS_client_method() as our check for DTLSv1.2 support
++ # and that's what we actually use in openssl-dtls.c too.
++ AC_MSG_CHECKING([for DTLS_client_method() in OpenSSL])
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <openssl/ssl.h>],
+- [DTLSv1_2_client_method();])],
++ [DTLS_client_method();])],
+ [AC_MSG_RESULT(yes)
+- AC_DEFINE(HAVE_DTLS12, [1], [OpenSSL has DTLSv1_2_client_method() function])],
++ AC_DEFINE(HAVE_DTLS12, [1], [OpenSSL has DTLS_client_method() function])],
++ [AC_MSG_RESULT(no)])
++
++ AC_MSG_CHECKING([for SSL_CTX_set_min_proto_version() in OpenSSL])
++ AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <openssl/ssl.h>],
++ [SSL_CTX_set_min_proto_version((void *)0, 0);])],
++ [AC_MSG_RESULT(yes)
++ AC_DEFINE(HAVE_SSL_CTX_PROTOVER, [1], [OpenSSL has SSL_CTX_set_min_proto_version() function])],
+ [AC_MSG_RESULT(no)])
+
+ AC_CHECK_FUNC(HMAC_CTX_copy,
+diff --git a/openssl-dtls.c b/openssl-dtls.c
+index 5086440f..9e3c5d46 100644
+--- a/openssl-dtls.c
++++ b/openssl-dtls.c
+@@ -332,6 +332,7 @@ int start_dtls_handshake(struct openconnect_info *vpninfo, int dtls_fd)
+ const char *cipher = vpninfo->dtls_cipher;
+
+ #ifdef HAVE_DTLS12
++ /* These things should never happen unless they're supported */
+ if (vpninfo->cisco_dtls12) {
+ dtlsver = DTLS1_2_VERSION;
+ } else if (!strcmp(cipher, "OC-DTLS1_2-AES128-GCM")) {
+@@ -349,16 +350,16 @@ int start_dtls_handshake(struct openconnect_info *vpninfo, int dtls_fd)
+
+ if (!vpninfo->dtls_ctx) {
+ #ifdef HAVE_DTLS12
++ /* If we can use SSL_CTX_set_min_proto_version, do so. */
+ dtls_method = DTLS_client_method();
+ #endif
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
++#ifndef HAVE_SSL_CTX_PROTOVER
++ /* If !HAVE_DTLS12, dtlsver *MUST* be DTLS1_BAD_VER because it's set
++ * at the top of the function and nothing can change it. */
+ if (dtlsver == DTLS1_BAD_VER)
+ dtls_method = DTLSv1_client_method();
+-#ifdef HAVE_DTLS12
+- else if (dtlsver == DTLS1_2_VERSION)
+- dtls_method = DTLSv1_2_client_method();
+-#endif
+ #endif
++
+ vpninfo->dtls_ctx = SSL_CTX_new(dtls_method);
+ if (!vpninfo->dtls_ctx) {
+ vpn_progress(vpninfo, PRG_ERR,
+@@ -367,24 +368,26 @@ int start_dtls_handshake(struct openconnect_info *vpninfo, int dtls_fd)
+ vpninfo->dtls_attempt_period = 0;
+ return -EINVAL;
+ }
+- if (dtlsver) {
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+- if (dtlsver == DTLS1_BAD_VER)
+- SSL_CTX_set_options(vpninfo->dtls_ctx, SSL_OP_CISCO_ANYCONNECT);
+-#else
+- if (!SSL_CTX_set_min_proto_version(vpninfo->dtls_ctx, dtlsver) ||
+- !SSL_CTX_set_max_proto_version(vpninfo->dtls_ctx, dtlsver)) {
+- vpn_progress(vpninfo, PRG_ERR,
+- _("Set DTLS CTX version failed\n"));
+- openconnect_report_ssl_errors(vpninfo);
+- SSL_CTX_free(vpninfo->dtls_ctx);
+- vpninfo->dtls_ctx = NULL;
+- vpninfo->dtls_attempt_period = 0;
+- return -EINVAL;
+- }
++#ifdef HAVE_SSL_CTX_PROTOVER
++ if (dtlsver &&
++ (!SSL_CTX_set_min_proto_version(vpninfo->dtls_ctx, dtlsver) ||
++ !SSL_CTX_set_max_proto_version(vpninfo->dtls_ctx, dtlsver))) {
++ vpn_progress(vpninfo, PRG_ERR,
++ _("Set DTLS CTX version failed\n"));
++ openconnect_report_ssl_errors(vpninfo);
++ SSL_CTX_free(vpninfo->dtls_ctx);
++ vpninfo->dtls_ctx = NULL;
++ vpninfo->dtls_attempt_period = 0;
++ return -EINVAL;
++ }
++#else /* !HAVE_SSL_CTX_PROTOVER */
++ /* If we used the legacy version-specific methods, we need the special
++ * way to make TLSv1_client_method() do DTLS1_BAD_VER. */
++ if (dtlsver == DTLS1_BAD_VER)
++ SSL_CTX_set_options(vpninfo->dtls_ctx, SSL_OP_CISCO_ANYCONNECT);
+ #endif
+ #if defined (HAVE_DTLS12) && !defined(OPENSSL_NO_PSK)
+- } else {
++ if (!dtlsver) {
+ SSL_CTX_set_psk_client_callback(vpninfo->dtls_ctx, psk_callback);
+ /* For PSK we override the DTLS master secret with one derived
+ * from the HTTPS session. */
+@@ -401,9 +404,9 @@ int start_dtls_handshake(struct openconnect_info *vpninfo, int dtls_fd)
+ }
+ /* For SSL_CTX_set_cipher_list() */
+ cipher = "PSK";
+-
+-#endif
+ }
++#endif /* OPENSSL_NO_PSK */
++
+ /* If we don't readahead, then we do short reads and throw
+ away the tail of data packets. */
+ SSL_CTX_set_read_ahead(vpninfo->dtls_ctx, 1);
+--
+2.17.1
+
--- /dev/null
+From 97cafd182f5a5c2d13f57d7faeac8432aea9bbf8 Mon Sep 17 00:00:00 2001
+From: David Woodhouse <dwmw2@infradead.org>
+Date: Mon, 10 Jun 2019 12:34:43 +0100
+Subject: [PATCH] Disable encrypt-then-mac where possible with DTLS and OpenSSL
+
+There is pain here. Just don't bother.
+
+Signed-off-by: David Woodhouse <dwmw2@infradead.org>
+---
+ openssl-dtls.c | 12 +++++++++++-
+ 1 file changed, 11 insertions(+), 1 deletion(-)
+
+diff --git a/openssl-dtls.c b/openssl-dtls.c
+index 9e3c5d46..646bf71c 100644
+--- a/openssl-dtls.c
++++ b/openssl-dtls.c
+@@ -406,7 +406,17 @@ int start_dtls_handshake(struct openconnect_info *vpninfo, int dtls_fd)
+ cipher = "PSK";
+ }
+ #endif /* OPENSSL_NO_PSK */
+-
++#ifdef SSL_OP_NO_ENCRYPT_THEN_MAC
++ /* I'm fairly sure I wasn't lying when I said I had tested
++ * https://github.com/openssl/openssl/commit/e23d5071ec4c7aa6bb2b
++ * against GnuTLS both with and without EtM in 2016.
++ * Nevertheless, in 2019 it seems to be failing to negotiate
++ * at least for DTLS1_BAD_VER against ocserv with GnuTLS 3.6.7.
++ * Just turn it off. Real Cisco servers don't do it for
++ * DTLS1_BAD_VER, and we should be using GCM ciphersuites in
++ * newer versions of DTLS anyway so it's irrelevant. */
++ SSL_CTX_set_options(vpninfo->dtls_ctx, SSL_OP_NO_ENCRYPT_THEN_MAC);
++#endif
+ /* If we don't readahead, then we do short reads and throw
+ away the tail of data packets. */
+ SSL_CTX_set_read_ahead(vpninfo->dtls_ctx, 1);
+--
+2.17.1
+
--- /dev/null
+#
+# Copyright (C) 2019 - Lucian Cristian <lucian.cristian@gmail.com>
+#
+# This is free software, licensed under the GNU General Public License v3.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=openfortivpn
+PKG_VERSION:=1.10.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/adrienverge/openfortivpn/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=d6ea0c84c0cf811530073fa19865334bb42ab10a780157fe95c4efb3476ad58d
+
+PKG_MAINTAINER:=Lucian Cristian <lucian.cristian@gmail.com>
+PKG_LICENSE:=GPL-3.0-or-later OpenSSL
+PKG_LICENSE_FILES:=LICENSE LICENSE.OpenSSL
+
+PKG_BUILD_PARALLEL:=1
+PKG_INSTALL:=1
+
+PKG_FIXUP:=autoreconf
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/openfortivpn
+ SUBMENU:=VPN
+ SECTION:=net
+ CATEGORY:=Network
+ TITLE:=Fortinet SSL VPN client
+ URL:=https://github.com/adrienverge/openfortivpn
+ DEPENDS:=+ppp +libopenssl
+endef
+
+define Package/openfortivpn/description
+ An open implementation of Fortinet's proprietary PPP+SSL VPN solution
+ It spawns a pppd process and operates the communication between the gateway and this process.
+ It is compatible with Fortinet VPNs.
+endef
+
+CONFIGURE_ARGS += \
+ --enable-proc \
+ --with-rt_dst="yes" \
+ --with-pppd="/usr/sbin/pppd"
+
+TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
+
+define Package/openfortivpn/conffiles
+/etc/config/openfortivpn
+endef
+
+define Package/openfortivpn/install
+ $(INSTALL_DIR) \
+ $(1)/usr/sbin \
+ $(1)/etc/config \
+ $(1)/etc/init.d
+
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/openfortivpn $(1)/usr/sbin/
+ $(INSTALL_DATA) ./files/openfortivpn.config $(1)/etc/config/openfortivpn
+ $(INSTALL_BIN) ./files/openfortivpn.init $(1)/etc/init.d/openfortivpn
+endef
+
+$(eval $(call BuildPackage,openfortivpn))
--- /dev/null
+config service 'openfortivpn'
+ option 'enabled' '0'
+ option 'host' 'vpn-gateway'
+ option 'port' '10443'
+ option 'set_routes' '0'
+ option 'set_dns' '0'
+ option 'pppd_use_peerdns' '0'
+ option 'username' 'foo'
+ option 'password' 'bar'
+config 'certs'
+# example X509 certificate sha256 sum, trust only defined one(s)!
+ option 'trusted_cert' 'e46d4aff08ba6914e64daa85bc6112a422fa7ce16631bff0b592a28556f993db'
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=99
+USE_PROCD=1
+BIN=/usr/sbin/openfortivpn
+CONFIG=/var/etc/openfortivpn.config
+
+
+validate_certs_section() {
+ uci_load_validate openfortivpn certs "$1" "$2" \
+ 'trusted_cert:string'
+}
+
+validate_openfortivpn_section() {
+ uci_load_validate openfortivpn service "$1" "$2" \
+ 'enabled:uinteger' \
+ 'host:string' \
+ 'port:uinteger' \
+ 'username:string' \
+ 'password:string' \
+ 'set_routes:uinteger' \
+ 'set_dns:uinteger' \
+ 'pppd_use_peerdns:uinteger'
+}
+
+setup_certs() {
+ [ "$2" = 0 ] || {
+ echo "validation failed"
+ return 1
+ }
+
+ [ -n "$trusted_cert" ] || return 0
+ echo "trusted-cert = $trusted_cert" >> $CONFIG
+}
+
+setup_config() {
+ [ "$2" = 0 ] || {
+ echo "validation failed"
+ return 1
+ }
+
+ [ "$enabled" -eq 0 ] && return 1
+
+ mkdir -p /var/etc
+ echo '# auto-generated config file from /etc/config/openfortivpn' > $CONFIG
+
+ [ -n "$host" ] && echo "host = $host" >> $CONFIG
+ [ -n "$port" ] && echo "port = $port" >> $CONFIG
+ [ -n "$username" ] && echo "username = $username" >> $CONFIG
+ [ -n "$password" ] && echo "password = $password" >> $CONFIG
+ [ -n "$set_routes" ] && echo "set-routes = $set_routes" >> $CONFIG
+ [ -n "$set_dns" ] && echo "set-dns = $set_dns" >> $CONFIG
+ [ -n "$pppd_use_peerdns" ] && echo "pppd-use-peerdns = $pppd_use_peerdns" >> $CONFIG
+ return 0
+}
+
+start_service() {
+ config_load openfortivpn
+ validate_openfortivpn_section openfortivpn setup_config || return
+ config_foreach validate_certs_section certs setup_certs
+
+ procd_open_instance
+ procd_set_param stderr 1
+ procd_set_param command $BIN -c $CONFIG --use-syslog
+ procd_close_instance
+}
+
+service_triggers () {
+ procd_add_reload_trigger "openfortivpn"
+
+ procd_open_validate
+ validate_openfortivpn_section
+ validate_certs_section
+ procd_close_validate
+}
include $(TOPDIR)/rules.mk
PKG_NAME:=openssh
-PKG_VERSION:=7.9p1
-PKG_RELEASE:=4
+PKG_VERSION:=8.0p1
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/ \
https://ftp.spline.de/pub/OpenBSD/OpenSSH/portable/ \
https://anorien.csc.warwick.ac.uk/pub/OpenBSD/OpenSSH/portable/
-PKG_HASH:=6b4b3ba2253d84ed3771c8050728d597c91cfce898713beb7b64a305b6f11aad
+PKG_HASH:=bd943879e69498e8031eb6b7f44d08cdc37d59a7ab689aa0b437320c3481fd68
PKG_LICENSE:=BSD ISC
PKG_LICENSE_FILES:=LICENCE
define Package/openssh-sftp-server
$(call Package/openssh/Default)
TITLE+= SFTP server
- # Strip dependencies to avoid pulling in OpenSSL etc.
- DEPENDS:=
endef
define Package/openssh-sftp-server/description
--without-pam
endif
-ifeq ($(CONFIG_OPENSSL_ENGINE_CRYPTO),y)
+ifeq ($(CONFIG_OPENSSL_ENGINE),y)
CONFIGURE_ARGS+= \
--with-ssl-engine
endif
endif
define Build/Compile
- $(MAKE) -C $(PKG_BUILD_DIR) \
- DESTDIR="$(PKG_INSTALL_DIR)" \
- LIBS="" \
- sftp-server
$(MAKE) -C $(PKG_BUILD_DIR) \
DESTDIR="$(PKG_INSTALL_DIR)" \
STRIP_OPT="" \
PROG=/usr/sbin/sshd
start_service() {
- for type in rsa ecdsa ed25519; do {
+ for type in rsa ecdsa ed25519
+ do
# check for keys
key=/etc/ssh/ssh_host_${type}_key
[ ! -f $key ] && {
/usr/bin/ssh-keygen -N '' -t $type -f $key 2>&- >&-
}
}
- }; done
+ done
mkdir -m 0700 -p /var/empty
- local lport=`grep ^Port /etc/ssh/sshd_config | cut -d " " -f 2`
- [ -z $lport ] && lport=22
+ local lport=$(awk '/^Port / { print $2; exit }' /etc/ssh/sshd_config)
+ [ -z "$lport" ] && lport=22
procd_open_instance
procd_add_mdns "ssh" "tcp" "$lport"
shutdown() {
local pid
- local pids
- local pid_mine
stop
# kill active clients
- pid_mine="$$"
- pids="$(pidof sshd)"
- for pid in $pids; do
- [ "$pid" = "$pid_mine" ] && continue
+ for pid in $(pidof sshd)
+ do
+ [ "$pid" == "$$" ] && continue
[ -e "/proc/$pid/stat" ] && kill $pid
done
}
+++ /dev/null
-From 6010c0303a422a9c5fa8860c061bf7105eb7f8b2 Mon Sep 17 00:00:00 2001
-From: "djm@openbsd.org" <djm@openbsd.org>
-Date: Fri, 16 Nov 2018 03:03:10 +0000
-Subject: [PATCH] upstream: disallow empty incoming filename or ones that refer
- to the
-
-current directory; based on report/patch from Harry Sintonen
-
-OpenBSD-Commit-ID: f27651b30eaee2df49540ab68d030865c04f6de9
----
- scp.c | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/scp.c b/scp.c
-index 60682c687..4f3fdcd3d 100644
---- a/scp.c
-+++ b/scp.c
-@@ -1,4 +1,4 @@
--/* $OpenBSD: scp.c,v 1.197 2018/06/01 04:31:48 dtucker Exp $ */
-+/* $OpenBSD: scp.c,v 1.198 2018/11/16 03:03:10 djm Exp $ */
- /*
- * scp - secure remote copy. This is basically patched BSD rcp which
- * uses ssh to do the data transfer (instead of using rcmd).
-@@ -1106,7 +1106,8 @@ sink(int argc, char **argv)
- SCREWUP("size out of range");
- size = (off_t)ull;
-
-- if ((strchr(cp, '/') != NULL) || (strcmp(cp, "..") == 0)) {
-+ if (*cp == '\0' || strchr(cp, '/') != NULL ||
-+ strcmp(cp, ".") == 0 || strcmp(cp, "..") == 0) {
- run_err("error: unexpected filename: %s", cp);
- exit(1);
- }
+++ /dev/null
-From 91b777c7064d9d91a1433a42b0bb31592388d1b4 Mon Sep 17 00:00:00 2001
-From: Eneas U de Queiroz <cote2004-github@yahoo.com>
-Date: Tue, 9 Oct 2018 16:17:42 -0300
-Subject: [PATCH] fix compilation with openssl built without ECC
-
-ECDSA code in openssh-compat.h and libressl-api-compat.c needs to be
-guarded by OPENSSL_HAS_ECC
-
-Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
-
-diff --git a/openbsd-compat/libressl-api-compat.c b/openbsd-compat/libressl-api-compat.c
-index de3e64a6..ae00ff59 100644
---- a/openbsd-compat/libressl-api-compat.c
-+++ b/openbsd-compat/libressl-api-compat.c
-@@ -152,7 +152,9 @@
- #include <openssl/dsa.h>
- #include <openssl/rsa.h>
- #include <openssl/evp.h>
-+#ifdef OPENSSL_HAS_ECC
- #include <openssl/ecdsa.h>
-+#endif
- #include <openssl/dh.h>
-
- #ifndef HAVE_DSA_GET0_PQG
-@@ -417,6 +419,7 @@ DSA_SIG_set0(DSA_SIG *sig, BIGNUM *r, BIGNUM *s)
- }
- #endif /* HAVE_DSA_SIG_SET0 */
-
-+#ifdef OPENSSL_HAS_ECC
- #ifndef HAVE_ECDSA_SIG_GET0
- void
- ECDSA_SIG_get0(const ECDSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps)
-@@ -442,6 +445,7 @@ ECDSA_SIG_set0(ECDSA_SIG *sig, BIGNUM *r, BIGNUM *s)
- return 1;
- }
- #endif /* HAVE_ECDSA_SIG_SET0 */
-+#endif /* OPENSSL_HAS_ECC */
-
- #ifndef HAVE_DH_GET0_PQG
- void
-diff --git a/openbsd-compat/openssl-compat.h b/openbsd-compat/openssl-compat.h
-index 9e0264c0..6a525f28 100644
---- a/openbsd-compat/openssl-compat.h
-+++ b/openbsd-compat/openssl-compat.h
-@@ -24,7 +24,9 @@
- #include <openssl/evp.h>
- #include <openssl/rsa.h>
- #include <openssl/dsa.h>
-+#ifdef OPENSSL_HAS_ECC
- #include <openssl/ecdsa.h>
-+#endif
- #include <openssl/dh.h>
-
- int ssh_compatible_openssl(long, long);
-@@ -161,6 +163,7 @@ void DSA_SIG_get0(const DSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps);
- int DSA_SIG_set0(DSA_SIG *sig, BIGNUM *r, BIGNUM *s);
- #endif /* DSA_SIG_SET0 */
-
-+#ifdef OPENSSL_HAS_ECC
- #ifndef HAVE_ECDSA_SIG_GET0
- void ECDSA_SIG_get0(const ECDSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps);
- #endif /* HAVE_ECDSA_SIG_GET0 */
-@@ -168,6 +171,7 @@ void ECDSA_SIG_get0(const ECDSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps);
- #ifndef HAVE_ECDSA_SIG_SET0
- int ECDSA_SIG_set0(ECDSA_SIG *sig, BIGNUM *r, BIGNUM *s);
- #endif /* HAVE_ECDSA_SIG_SET0 */
-+#endif /* OPENSSL_HAS_ECC */
-
- #ifndef HAVE_DH_GET0_PQG
- void DH_get0_pqg(const DH *dh, const BIGNUM **p, const BIGNUM **q,
+++ /dev/null
-From edfc2e18ef069ba600c8f4632ce1e3dc94a0669a Mon Sep 17 00:00:00 2001
-From: Eneas U de Queiroz <cote2004-github@yahoo.com>
-Date: Fri, 19 Oct 2018 10:04:24 -0300
-Subject: [PATCH 2/2] Fix OPENSSL_init_crypto call for openssl < 1.1
-
-Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
-
-diff --git a/openbsd-compat/openssl-compat.c b/openbsd-compat/openssl-compat.c
-index 8b4a3627..590b66d1 100644
---- a/openbsd-compat/openssl-compat.c
-+++ b/openbsd-compat/openssl-compat.c
-@@ -76,7 +76,7 @@ ssh_OpenSSL_add_all_algorithms(void)
- ENGINE_load_builtin_engines();
- ENGINE_register_all_complete();
-
--#if OPENSSL_VERSION_NUMBER < 0x10001000L
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
- OPENSSL_config(NULL);
- #else
- OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS |
+++ /dev/null
-From 11b88754cadcad0ba79b4ffcc127223248dccb54 Mon Sep 17 00:00:00 2001
-From: "dtucker@openbsd.org" <dtucker@openbsd.org>
-Date: Wed, 23 Jan 2019 08:01:46 +0000
-Subject: upstream: Sanitize scp filenames via snmprintf. To do this we move
-
-the progressmeter formatting outside of signal handler context and have the
-atomicio callback called for EINTR too. bz#2434 with contributions from djm
-and jjelen at redhat.com, ok djm@
-
-OpenBSD-Commit-ID: 1af61c1f70e4f3bd8ab140b9f1fa699481db57d8
-
-CVE-2019-6109
-
-Origin: backport, https://anongit.mindrot.org/openssh.git/commit/?id=8976f1c4b2721c26e878151f52bdf346dfe2d54c
-Bug-Debian: https://bugs.debian.org/793412
-Last-Update: 2019-02-08
-
-Patch-Name: sanitize-scp-filenames-via-snmprintf.patch
----
- atomicio.c | 20 ++++++++++++++-----
- progressmeter.c | 53 ++++++++++++++++++++++---------------------------
- progressmeter.h | 3 ++-
- scp.c | 1 +
- sftp-client.c | 16 ++++++++-------
- 5 files changed, 51 insertions(+), 42 deletions(-)
-
-diff --git a/atomicio.c b/atomicio.c
-index f854a06f5..d91bd7621 100644
---- a/atomicio.c
-+++ b/atomicio.c
-@@ -1,4 +1,4 @@
--/* $OpenBSD: atomicio.c,v 1.28 2016/07/27 23:18:12 djm Exp $ */
-+/* $OpenBSD: atomicio.c,v 1.29 2019/01/23 08:01:46 dtucker Exp $ */
- /*
- * Copyright (c) 2006 Damien Miller. All rights reserved.
- * Copyright (c) 2005 Anil Madhavapeddy. All rights reserved.
-@@ -65,9 +65,14 @@ atomicio6(ssize_t (*f) (int, void *, size_t), int fd, void *_s, size_t n,
- res = (f) (fd, s + pos, n - pos);
- switch (res) {
- case -1:
-- if (errno == EINTR)
-+ if (errno == EINTR) {
-+ /* possible SIGALARM, update callback */
-+ if (cb != NULL && cb(cb_arg, 0) == -1) {
-+ errno = EINTR;
-+ return pos;
-+ }
- continue;
-- if (errno == EAGAIN || errno == EWOULDBLOCK) {
-+ } else if (errno == EAGAIN || errno == EWOULDBLOCK) {
- #ifndef BROKEN_READ_COMPARISON
- (void)poll(&pfd, 1, -1);
- #endif
-@@ -122,9 +127,14 @@ atomiciov6(ssize_t (*f) (int, const struct iovec *, int), int fd,
- res = (f) (fd, iov, iovcnt);
- switch (res) {
- case -1:
-- if (errno == EINTR)
-+ if (errno == EINTR) {
-+ /* possible SIGALARM, update callback */
-+ if (cb != NULL && cb(cb_arg, 0) == -1) {
-+ errno = EINTR;
-+ return pos;
-+ }
- continue;
-- if (errno == EAGAIN || errno == EWOULDBLOCK) {
-+ } else if (errno == EAGAIN || errno == EWOULDBLOCK) {
- #ifndef BROKEN_READV_COMPARISON
- (void)poll(&pfd, 1, -1);
- #endif
-diff --git a/progressmeter.c b/progressmeter.c
-index fe9bf52e4..add462dde 100644
---- a/progressmeter.c
-+++ b/progressmeter.c
-@@ -1,4 +1,4 @@
--/* $OpenBSD: progressmeter.c,v 1.45 2016/06/30 05:17:05 dtucker Exp $ */
-+/* $OpenBSD: progressmeter.c,v 1.46 2019/01/23 08:01:46 dtucker Exp $ */
- /*
- * Copyright (c) 2003 Nils Nordman. All rights reserved.
- *
-@@ -31,6 +31,7 @@
-
- #include <errno.h>
- #include <signal.h>
-+#include <stdarg.h>
- #include <stdio.h>
- #include <string.h>
- #include <time.h>
-@@ -39,6 +40,7 @@
- #include "progressmeter.h"
- #include "atomicio.h"
- #include "misc.h"
-+#include "utf8.h"
-
- #define DEFAULT_WINSIZE 80
- #define MAX_WINSIZE 512
-@@ -61,7 +63,7 @@ static void setscreensize(void);
- void refresh_progress_meter(void);
-
- /* signal handler for updating the progress meter */
--static void update_progress_meter(int);
-+static void sig_alarm(int);
-
- static double start; /* start progress */
- static double last_update; /* last progress update */
-@@ -74,6 +76,7 @@ static long stalled; /* how long we have been stalled */
- static int bytes_per_second; /* current speed in bytes per second */
- static int win_size; /* terminal window size */
- static volatile sig_atomic_t win_resized; /* for window resizing */
-+static volatile sig_atomic_t alarm_fired;
-
- /* units for format_size */
- static const char unit[] = " KMGT";
-@@ -126,9 +129,17 @@ refresh_progress_meter(void)
- off_t bytes_left;
- int cur_speed;
- int hours, minutes, seconds;
-- int i, len;
- int file_len;
-
-+ if ((!alarm_fired && !win_resized) || !can_output())
-+ return;
-+ alarm_fired = 0;
-+
-+ if (win_resized) {
-+ setscreensize();
-+ win_resized = 0;
-+ }
-+
- transferred = *counter - (cur_pos ? cur_pos : start_pos);
- cur_pos = *counter;
- now = monotime_double();
-@@ -158,16 +169,11 @@ refresh_progress_meter(void)
-
- /* filename */
- buf[0] = '\0';
-- file_len = win_size - 35;
-+ file_len = win_size - 36;
- if (file_len > 0) {
-- len = snprintf(buf, file_len + 1, "\r%s", file);
-- if (len < 0)
-- len = 0;
-- if (len >= file_len + 1)
-- len = file_len;
-- for (i = len; i < file_len; i++)
-- buf[i] = ' ';
-- buf[file_len] = '\0';
-+ buf[0] = '\r';
-+ snmprintf(buf+1, sizeof(buf)-1 , &file_len, "%*s",
-+ file_len * -1, file);
- }
-
- /* percent of transfer done */
-@@ -228,22 +234,11 @@ refresh_progress_meter(void)
-
- /*ARGSUSED*/
- static void
--update_progress_meter(int ignore)
-+sig_alarm(int ignore)
- {
-- int save_errno;
--
-- save_errno = errno;
--
-- if (win_resized) {
-- setscreensize();
-- win_resized = 0;
-- }
-- if (can_output())
-- refresh_progress_meter();
--
-- signal(SIGALRM, update_progress_meter);
-+ signal(SIGALRM, sig_alarm);
-+ alarm_fired = 1;
- alarm(UPDATE_INTERVAL);
-- errno = save_errno;
- }
-
- void
-@@ -259,10 +254,9 @@ start_progress_meter(const char *f, off_t filesize, off_t *ctr)
- bytes_per_second = 0;
-
- setscreensize();
-- if (can_output())
-- refresh_progress_meter();
-+ refresh_progress_meter();
-
-- signal(SIGALRM, update_progress_meter);
-+ signal(SIGALRM, sig_alarm);
- signal(SIGWINCH, sig_winch);
- alarm(UPDATE_INTERVAL);
- }
-@@ -286,6 +280,7 @@ stop_progress_meter(void)
- static void
- sig_winch(int sig)
- {
-+ signal(SIGWINCH, sig_winch);
- win_resized = 1;
- }
-
-diff --git a/progressmeter.h b/progressmeter.h
-index bf179dca6..8f6678060 100644
---- a/progressmeter.h
-+++ b/progressmeter.h
-@@ -1,4 +1,4 @@
--/* $OpenBSD: progressmeter.h,v 1.3 2015/01/14 13:54:13 djm Exp $ */
-+/* $OpenBSD: progressmeter.h,v 1.4 2019/01/23 08:01:46 dtucker Exp $ */
- /*
- * Copyright (c) 2002 Nils Nordman. All rights reserved.
- *
-@@ -24,4 +24,5 @@
- */
-
- void start_progress_meter(const char *, off_t, off_t *);
-+void refresh_progress_meter(void);
- void stop_progress_meter(void);
-diff --git a/scp.c b/scp.c
-index 7163d33dc..80308573c 100644
---- a/scp.c
-+++ b/scp.c
-@@ -593,6 +593,7 @@ scpio(void *_cnt, size_t s)
- off_t *cnt = (off_t *)_cnt;
-
- *cnt += s;
-+ refresh_progress_meter();
- if (limit_kbps > 0)
- bandwidth_limit(&bwlimit, s);
- return 0;
-diff --git a/sftp-client.c b/sftp-client.c
-index 4986d6d8d..2bc698f86 100644
---- a/sftp-client.c
-+++ b/sftp-client.c
-@@ -101,7 +101,9 @@ sftpio(void *_bwlimit, size_t amount)
- {
- struct bwlimit *bwlimit = (struct bwlimit *)_bwlimit;
-
-- bandwidth_limit(bwlimit, amount);
-+ refresh_progress_meter();
-+ if (bwlimit != NULL)
-+ bandwidth_limit(bwlimit, amount);
- return 0;
- }
-
-@@ -121,8 +123,8 @@ send_msg(struct sftp_conn *conn, struct sshbuf *m)
- iov[1].iov_base = (u_char *)sshbuf_ptr(m);
- iov[1].iov_len = sshbuf_len(m);
-
-- if (atomiciov6(writev, conn->fd_out, iov, 2,
-- conn->limit_kbps > 0 ? sftpio : NULL, &conn->bwlimit_out) !=
-+ if (atomiciov6(writev, conn->fd_out, iov, 2, sftpio,
-+ conn->limit_kbps > 0 ? &conn->bwlimit_out : NULL) !=
- sshbuf_len(m) + sizeof(mlen))
- fatal("Couldn't send packet: %s", strerror(errno));
-
-@@ -138,8 +140,8 @@ get_msg_extended(struct sftp_conn *conn, struct sshbuf *m, int initial)
-
- if ((r = sshbuf_reserve(m, 4, &p)) != 0)
- fatal("%s: buffer error: %s", __func__, ssh_err(r));
-- if (atomicio6(read, conn->fd_in, p, 4,
-- conn->limit_kbps > 0 ? sftpio : NULL, &conn->bwlimit_in) != 4) {
-+ if (atomicio6(read, conn->fd_in, p, 4, sftpio,
-+ conn->limit_kbps > 0 ? &conn->bwlimit_in : NULL) != 4) {
- if (errno == EPIPE || errno == ECONNRESET)
- fatal("Connection closed");
- else
-@@ -157,8 +159,8 @@ get_msg_extended(struct sftp_conn *conn, struct sshbuf *m, int initial)
-
- if ((r = sshbuf_reserve(m, msg_len, &p)) != 0)
- fatal("%s: buffer error: %s", __func__, ssh_err(r));
-- if (atomicio6(read, conn->fd_in, p, msg_len,
-- conn->limit_kbps > 0 ? sftpio : NULL, &conn->bwlimit_in)
-+ if (atomicio6(read, conn->fd_in, p, msg_len, sftpio,
-+ conn->limit_kbps > 0 ? &conn->bwlimit_in : NULL)
- != msg_len) {
- if (errno == EPIPE)
- fatal("Connection closed");
+++ /dev/null
-From 125924e47db3713a85a70e0f8d6c23818d2ea054 Mon Sep 17 00:00:00 2001
-From: "djm@openbsd.org" <djm@openbsd.org>
-Date: Sat, 26 Jan 2019 22:41:28 +0000
-Subject: upstream: check in scp client that filenames sent during
-
-remote->local directory copies satisfy the wildcard specified by the user.
-
-This checking provides some protection against a malicious server
-sending unexpected filenames, but it comes at a risk of rejecting wanted
-files due to differences between client and server wildcard expansion rules.
-
-For this reason, this also adds a new -T flag to disable the check.
-
-reported by Harry Sintonen
-fix approach suggested by markus@;
-has been in snaps for ~1wk courtesy deraadt@
-
-OpenBSD-Commit-ID: 00f44b50d2be8e321973f3c6d014260f8f7a8eda
-
-CVE-2019-6111
-
-Origin: backport, https://anongit.mindrot.org/openssh.git/commit/?id=391ffc4b9d31fa1f4ad566499fef9176ff8a07dc
-Last-Update: 2019-02-08
-
-Patch-Name: check-filenames-in-scp-client.patch
----
- scp.1 | 12 +++++++++++-
- scp.c | 37 +++++++++++++++++++++++++++++--------
- 2 files changed, 40 insertions(+), 9 deletions(-)
-
-diff --git a/scp.1 b/scp.1
-index 0e5cc1b2d..397e77091 100644
---- a/scp.1
-+++ b/scp.1
-@@ -18,7 +18,7 @@
- .Nd secure copy (remote file copy program)
- .Sh SYNOPSIS
- .Nm scp
--.Op Fl 346BCpqrv
-+.Op Fl 346BCpqrTv
- .Op Fl c Ar cipher
- .Op Fl F Ar ssh_config
- .Op Fl i Ar identity_file
-@@ -208,6 +208,16 @@ to use for the encrypted connection.
- The program must understand
- .Xr ssh 1
- options.
-+.It Fl T
-+Disable strict filename checking.
-+By default when copying files from a remote host to a local directory
-+.Nm
-+checks that the received filenames match those requested on the command-line
-+to prevent the remote end from sending unexpected or unwanted files.
-+Because of differences in how various operating systems and shells interpret
-+filename wildcards, these checks may cause wanted files to be rejected.
-+This option disables these checks at the expense of fully trusting that
-+the server will not send unexpected filenames.
- .It Fl v
- Verbose mode.
- Causes
-diff --git a/scp.c b/scp.c
-index 1971c80cd..035037bcc 100644
---- a/scp.c
-+++ b/scp.c
-@@ -94,6 +94,7 @@
- #include <dirent.h>
- #include <errno.h>
- #include <fcntl.h>
-+#include <fnmatch.h>
- #include <limits.h>
- #include <locale.h>
- #include <pwd.h>
-@@ -383,14 +384,14 @@ void verifydir(char *);
- struct passwd *pwd;
- uid_t userid;
- int errs, remin, remout;
--int pflag, iamremote, iamrecursive, targetshouldbedirectory;
-+int Tflag, pflag, iamremote, iamrecursive, targetshouldbedirectory;
-
- #define CMDNEEDS 64
- char cmd[CMDNEEDS]; /* must hold "rcp -r -p -d\0" */
-
- int response(void);
- void rsource(char *, struct stat *);
--void sink(int, char *[]);
-+void sink(int, char *[], const char *);
- void source(int, char *[]);
- void tolocal(int, char *[]);
- void toremote(int, char *[]);
-@@ -429,8 +430,9 @@ main(int argc, char **argv)
- addargs(&args, "-oRemoteCommand=none");
- addargs(&args, "-oRequestTTY=no");
-
-- fflag = tflag = 0;
-- while ((ch = getopt(argc, argv, "dfl:prtvBCc:i:P:q12346S:o:F:")) != -1)
-+ fflag = Tflag = tflag = 0;
-+ while ((ch = getopt(argc, argv,
-+ "dfl:prtTvBCc:i:P:q12346S:o:F:")) != -1) {
- switch (ch) {
- /* User-visible flags. */
- case '1':
-@@ -509,9 +511,13 @@ main(int argc, char **argv)
- setmode(0, O_BINARY);
- #endif
- break;
-+ case 'T':
-+ Tflag = 1;
-+ break;
- default:
- usage();
- }
-+ }
- argc -= optind;
- argv += optind;
-
-@@ -542,7 +548,7 @@ main(int argc, char **argv)
- }
- if (tflag) {
- /* Receive data. */
-- sink(argc, argv);
-+ sink(argc, argv, NULL);
- exit(errs != 0);
- }
- if (argc < 2)
-@@ -800,7 +806,7 @@ tolocal(int argc, char **argv)
- continue;
- }
- free(bp);
-- sink(1, argv + argc - 1);
-+ sink(1, argv + argc - 1, src);
- (void) close(remin);
- remin = remout = -1;
- }
-@@ -976,7 +982,7 @@ rsource(char *name, struct stat *statp)
- (sizeof(type) != 4 && sizeof(type) != 8))
-
- void
--sink(int argc, char **argv)
-+sink(int argc, char **argv, const char *src)
- {
- static BUF buffer;
- struct stat stb;
-@@ -992,6 +998,7 @@ sink(int argc, char **argv)
- unsigned long long ull;
- int setimes, targisdir, wrerrno = 0;
- char ch, *cp, *np, *targ, *why, *vect[1], buf[2048], visbuf[2048];
-+ char *src_copy = NULL, *restrict_pattern = NULL;
- struct timeval tv[2];
-
- #define atime tv[0]
-@@ -1016,6 +1023,17 @@ sink(int argc, char **argv)
- (void) atomicio(vwrite, remout, "", 1);
- if (stat(targ, &stb) == 0 && S_ISDIR(stb.st_mode))
- targisdir = 1;
-+ if (src != NULL && !iamrecursive && !Tflag) {
-+ /*
-+ * Prepare to try to restrict incoming filenames to match
-+ * the requested destination file glob.
-+ */
-+ if ((src_copy = strdup(src)) == NULL)
-+ fatal("strdup failed");
-+ if ((restrict_pattern = strrchr(src_copy, '/')) != NULL) {
-+ *restrict_pattern++ = '\0';
-+ }
-+ }
- for (first = 1;; first = 0) {
- cp = buf;
- if (atomicio(read, remin, cp, 1) != 1)
-@@ -1120,6 +1138,9 @@ sink(int argc, char **argv)
- run_err("error: unexpected filename: %s", cp);
- exit(1);
- }
-+ if (restrict_pattern != NULL &&
-+ fnmatch(restrict_pattern, cp, 0) != 0)
-+ SCREWUP("filename does not match request");
- if (targisdir) {
- static char *namebuf;
- static size_t cursize;
-@@ -1157,7 +1178,7 @@ sink(int argc, char **argv)
- goto bad;
- }
- vect[0] = xstrdup(np);
-- sink(1, vect);
-+ sink(1, vect, src);
- if (setimes) {
- setimes = 0;
- if (utimes(vect[0], tv) < 0)
#
# Copyright (C) 2013 Julius Schulz-Zander <julius@net.t-labs.tu-berlin.de>
# Copyright (C) 2014-2017 OpenWrt.org
-# Copyright (C) 2018 Yousong Zhou <yszhou4tech@gmail.com>
+# Copyright (C) 2018-2019 Yousong Zhou <yszhou4tech@gmail.com>
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
# - Check and update kmod dependencies when necessary (runtime module load check in the least)
#
PKG_NAME:=openvswitch
-PKG_VERSION:=2.10.1
-PKG_RELEASE:=1
+PKG_VERSION:=2.11.1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://www.openvswitch.org/releases/
-PKG_HASH:=4f93c764295952848a924271250d7c6a6a53747d0019ef6ff880aa8ea6897c80
+PKG_HASH:=c1296ae44a7b176150915e33bc497cc0a7a02caeba84ea43ce9b6a2509d9b5dc
PKG_LICENSE:=Apache-2.0
PKG_LICENSE_FILES:=LICENSE
-PKG_BUILD_DEPENDS:=python/host python-six/host
+PKG_BUILD_DEPENDS+=python3/host python-six/host
PKG_USE_MIPS16:=0
PKG_BUILD_PARALLEL:=1
PKG_FIXUP:=autoreconf
PKG_MAINTAINER:=Yousong Zhou <yszhou4tech@gmail.com>
include $(INCLUDE_DIR)/package.mk
-include ../../lang/python/python-host.mk
+include ../../lang/python/python3-host.mk
include ../../lang/python/python-package.mk
+include ../../lang/python/python3-package.mk
ovs_kmod_packages:=
ovs_kmod_intree_kernel_patchver_min:=3.10
-ovs_kmod_intree_kernel_patchver_max:=4.15
+ovs_kmod_intree_kernel_patchver_max:=4.18
ovs_kmod_intree_not_supported:=$(strip $(call kernel_patchver_lt,$(ovs_kmod_intree_kernel_patchver_min))$(call kernel_patchver_gt,$(ovs_kmod_intree_kernel_patchver_max)))
ovs_kmod_intree_dir:=$(PKG_BUILD_DIR)/datapath/linux
ovs_kmod_upstream_dir:=$(LINUX_DIR)/net/openvswitch
ovs_kmod_upstream_name=kmod-$(call ovs_kmod_package_name,$(patsubst %-intree,%,$(1)))
ovs_kmod_package_provides=$(call ovs_kmod_upstream_name,$(1))
define OvsKmodPackageTemplate
+ifeq ($(if $(call ovs_kmod_is_intree,$(1)),$(ovs_kmod_intree_not_supported)),)
define KernelPackage/$(call ovs_kmod_package_name,$(1))
SECTION:=kernel
CATEGORY:=Kernel modules
SUBMENU:=Network Support
TITLE:=$(ovs_kmod_$(1)_title)
- DEPENDS:=$(ovs_kmod_$(1)_depends) $(if $(call ovs_kmod_is_intree,$(1)),@DEVEL $(if $(ovs_kmod_intree_not_supported),@BROKEN))
+ DEPENDS:=$(ovs_kmod_$(1)_depends) $(if $(call ovs_kmod_is_intree,$(1)),@DEVEL)
PROVIDES:=$(call ovs_kmod_package_provides,$(1))
KCONFIG:=$(ovs_kmod_$(1)_kconfig)
FILES:=$(ovs_kmod_$(1)_files)
endef
ovs_kmod_packages+=$(call ovs_kmod_package_name,$(1))
+endif
endef
ovs_kmod_openvswitch_title:=Open vSwitch kernel datapath (upstream)
ovs_kmod_openvswitch_kconfig:=CONFIG_OPENVSWITCH
ovs_kmod_openvswitch_depends:=\
- +kmod-lib-crc32c +kmod-mpls \
- +kmod-nf-nat +IPV6:kmod-nf-nat6 \
- +kmod-nf-conntrack +IPV6:kmod-nf-conntrack6
+ +kmod-lib-crc32c \
+ +kmod-nf-nat \
+ +IPV6:kmod-nf-nat6 \
+ +kmod-nf-conntrack \
+ +IPV6:kmod-nf-conntrack6 \
+ +(!LINUX_4_9&&!LINUX_4.14):kmod-nsh \
+ +(!LINUX_4_9&&!LINUX_4.14):kmod-ipt-conntrack-extra \
+
ovs_kmod_openvswitch_files:=$(ovs_kmod_upstream_dir)/openvswitch.ko
$(eval $(call OvsKmodPackageTemplate,openvswitch))
# enabled and selected on its own
#
ovs_kmod_openvswitch-intree_title:=Open vSwitch kernel datapath (in tree)
-ovs_kmod_openvswitch-intree_depends:=$(ovs_kmod_openvswitch_depends) +kmod-gre +IPV6:kmod-gre6
+ovs_kmod_openvswitch-intree_depends:=\
+ +kmod-lib-crc32c \
+ +kmod-nf-nat \
+ +IPV6:kmod-nf-nat6 \
+ +kmod-nf-conntrack \
+ +IPV6:kmod-nf-conntrack6 \
+ +kmod-gre +IPV6:kmod-gre6 \
+
ovs_kmod_openvswitch-intree_files:= $(ovs_kmod_intree_dir)/openvswitch.ko
$(eval $(call OvsKmodPackageTemplate,openvswitch-intree))
URL:=https://www.openvswitch.org
TITLE:=$(ovs_$(1)_title)
HIDDEN:=$(ovs_$(1)_hidden)
- DEPENDS:=$(ovs_$(1)_depends) +libunbound
+ DEPENDS:=$(ovs_$(1)_depends) +libatomic +libunbound
endef
define Package/$(call ovs_package_name,$(1))/install
$(eval $(call OvsPackageTemplate,python))
+ovs_python3_title:=Open vSwitch (Python3 library)
+ovs_python3_hidden:=
+ovs_python3_depends:=+PACKAGE_openvswitch-python3:python3 +PACKAGE_openvswitch-python3:python3-six
+define ovs_python3_install
+ $$(INSTALL_DIR) $$(1)$$(PYTHON3_PKG_DIR)
+ $$(CP) $$(PKG_INSTALL_DIR)/usr/share/openvswitch/python/ovs $$(1)$$(PYTHON3_PKG_DIR)
+endef
+$(eval $(call OvsPackageTemplate,python3))
+
+
CONFIGURE_ARGS+= \
--enable-ndebug \
--enable-shared \
CONFIGURE_VARS += \
ovs_cv_flake8=no \
- ovs_cv_python3=no \
+ ovs_cv_python=$(PYTHON3) \
+ ovs_cv_python_host=$(HOST_PYTHON3_BIN) \
ovs_cv_sphinx=no \
- ovs_cv_python=$(PYTHON) \
- ovs_cv_python_host=$(HOST_PYTHON_BIN) \
+ ovs_cv_python2=no \
KARCH=$(LINUX_KARCH) \
ovs_intree_kmod_configs:=CONFIG_PACKAGE_kmod-openvswitch-intree
ovs_intree_kmod_enabled:=$(strip $(foreach c,$(ovs_intree_kmod_configs),$($(c))))
PKG_CONFIG_DEPENDS+=$(ovs_intree_kmod_configs)
ifneq ($(ovs_intree_kmod_enabled),)
- CONFIGURE_ARGS += --with-linux=$(LINUX_DIR)
+ ifeq ($(ovs_kmod_intree_not_supported),)
+ CONFIGURE_ARGS += --with-linux=$(LINUX_DIR)
+ else
+ $(warning XXX: openvswitch: intree kmods selected but not supported)
+ endif
endif
TARGET_CFLAGS += -flto -std=gnu99
-MAKE_VARS += PYTHONPATH="$(HOST_PYTHONPATH)"
+MAKE_VARS += PYTHONPATH="$(HOST_PYTHON3PATH)"
$(foreach p,$(ovs_kmod_packages),\
$(eval $(call KernelPackage,$(p)))\
+++ /dev/null
---- a/configure.ac
-+++ b/configure.ac
-@@ -122,7 +122,6 @@ OVS_CHECK_SOCKET_LIBS
- OVS_CHECK_XENSERVER_VERSION
- OVS_CHECK_GROFF
- OVS_CHECK_TLS
--OVS_CHECK_ATOMIC_LIBS
- OVS_CHECK_GCC4_ATOMICS
- OVS_CHECK_ATOMIC_ALWAYS_LOCK_FREE(1)
- OVS_CHECK_ATOMIC_ALWAYS_LOCK_FREE(2)
---- a/lib/netdev-linux.c
-+++ b/lib/netdev-linux.c
-@@ -39,7 +39,9 @@
- #include <netpacket/packet.h>
- #include <net/if.h>
- #include <net/if_arp.h>
-+#if defined(__UCLIBC__) || defined(__GLIBC__)
- #include <net/if_packet.h>
-+#endif
- #include <net/route.h>
- #include <poll.h>
- #include <stdlib.h>
---- a/lib/ovs-atomic.h
-+++ b/lib/ovs-atomic.h
-@@ -320,7 +320,7 @@
- #include "util.h"
-
- #define IN_OVS_ATOMIC_H
-- #if __CHECKER__
-+ #if 1
- /* sparse doesn't understand some GCC extensions we use. */
- #include "ovs-atomic-pthreads.h"
- #elif __has_extension(c_atomic)
--- /dev/null
+From bfcee43923a4bb07954f6648bde1abdcbfa5d95f Mon Sep 17 00:00:00 2001
+From: Helmut Schaa <helmut.schaa@googlemail.com>
+Date: Wed, 8 Jan 2014 13:48:49 +0100
+Subject: [PATCH 1/5] netdev-linux: Let interface flag survive internal port
+ setup
+
+Due to a race condition when bringing up an internal port on Linux
+some interface flags (e.g. IFF_MULTICAST) are falsely reset. This
+happens because netlink events may be processed after the according
+netdev has been brought up (which sets interface flags).
+
+Fix this by reading the interface flags just before updating them
+if they have not been updated by from the kernel yet.
+
+Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
+---
+ lib/netdev-linux.c | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c
+index 25d037cb6..ba1427986 100644
+--- a/lib/netdev-linux.c
++++ b/lib/netdev-linux.c
+@@ -3117,7 +3117,13 @@ update_flags(struct netdev_linux *netdev, enum netdev_flags off,
+ unsigned int old_flags, new_flags;
+ int error = 0;
+
+- old_flags = netdev->ifi_flags;
++ if (!(netdev->cache_valid & VALID_DRVINFO)) {
++ /* Most likely the debvice flags are not in sync yet, fetch them now */
++ get_flags(&netdev->up, &old_flags);
++ } else {
++ old_flags = netdev->ifi_flags;
++ }
++
+ *old_flagsp = iff_to_nd_flags(old_flags);
+ new_flags = (old_flags & ~nd_to_iff_flags(off)) | nd_to_iff_flags(on);
+ if (new_flags != old_flags) {
--- /dev/null
+From e881c50ff537d4b34c10227360589f83d90ce373 Mon Sep 17 00:00:00 2001
+From: Yousong Zhou <zhouyousong@yunionyun.com>
+Date: Tue, 21 Aug 2018 12:21:05 +0000
+Subject: [PATCH 2/5] python: separate host/target python for cross-compile
+
+At the moment, python-six is a requirement for openvswitch python
+library on target machine.
+
+Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
+---
+ Makefile.am | 2 +-
+ m4/openvswitch.m4 | 2 ++
+ 2 files changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index ff1f94b48..417f53230 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -60,7 +60,7 @@ endif
+ # foo/__init__.pyc will cause Python to ignore foo.py.
+ run_python = \
+ PYTHONPATH=$(top_srcdir)/python$(psep)$$PYTHONPATH \
+- PYTHONDONTWRITEBYTECODE=yes $(PYTHON)
++ PYTHONDONTWRITEBYTECODE=yes $(PYTHON_HOST)
+
+ ALL_LOCAL =
+ BUILT_SOURCES =
+diff --git a/m4/openvswitch.m4 b/m4/openvswitch.m4
+index 41042c98e..4a5f0a84a 100644
+--- a/m4/openvswitch.m4
++++ b/m4/openvswitch.m4
+@@ -449,7 +449,9 @@ AC_DEFUN([OVS_CHECK_PYTHON],
+ fi])
+ AC_SUBST([PYTHON])
+ PYTHON=$ovs_cv_python
++ PYTHON_HOST=$ovs_cv_python_host
+ AC_SUBST([HAVE_PYTHON])
++ AM_MISSING_PROG([PYTHON_HOST], [python])
+ HAVE_PYTHON=yes
+ AM_CONDITIONAL([HAVE_PYTHON], [test "$HAVE_PYTHON" = yes])])
+
--- /dev/null
+From b65652ff441c4236b51f037a76147331c1ffd5fd Mon Sep 17 00:00:00 2001
+From: Yousong Zhou <yszhou4tech@gmail.com>
+Date: Wed, 14 Mar 2018 16:44:13 +0800
+Subject: [PATCH 3/5] ovs-lib: fix install_dir()
+
+The command "install" is not available in OpenWrt by default
+
+Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
+---
+ utilities/ovs-lib.in | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/utilities/ovs-lib.in b/utilities/ovs-lib.in
+index 9a0af2e82..68ab3f250 100644
+--- a/utilities/ovs-lib.in
++++ b/utilities/ovs-lib.in
+@@ -159,7 +159,10 @@ install_dir () {
+ [ "${OVS_USER##*:}" != "" ] && INSTALL_GROUP="${OVS_USER##*:}"
+
+ if test ! -d "$DIR"; then
+- install -d -m "$INSTALL_MODE" -o "$INSTALL_USER" -g "$INSTALL_GROUP" "$DIR"
++ mkdir -p "$DIR"
++ chmod "$INSTALL_MODE" "$DIR"
++ chown "$INSTALL_USER" "$DIR"
++ chgrp "$INSTALL_GROUP" "$DIR"
+ restorecon "$DIR" >/dev/null 2>&1
+ fi
+ }
--- /dev/null
+From 2f9075aca5f54b8d0c14517c408f162985fb1b18 Mon Sep 17 00:00:00 2001
+From: Yousong Zhou <zhouyousong@yunionyun.com>
+Date: Tue, 21 Aug 2018 13:02:21 +0000
+Subject: [PATCH 4/5] build: disable building tests
+
+Signed-off-by: Yousong Zhou <zhouyousong@yunionyun.com>
+---
+ Makefile.am | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 417f53230..3fc630f33 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -480,7 +480,6 @@ include m4/automake.mk
+ include lib/automake.mk
+ include ofproto/automake.mk
+ include utilities/automake.mk
+-include tests/automake.mk
+ include include/automake.mk
+ include third-party/automake.mk
+ include debian/automake.mk
--- /dev/null
+From b89f391203c4420eb454cb321e799a64de809f52 Mon Sep 17 00:00:00 2001
+From: Yousong Zhou <zhouyousong@yunionyun.com>
+Date: Fri, 3 May 2019 15:03:24 +0000
+Subject: [PATCH 5/5] datapath: conntrack: fix include for
+ IP6_DEFRAG_CONNTRACK_IN
+
+The enum definition is now inside include/net/ipv6_frag.h since upstream commit
+70b095c ("ipv6: remove dependency of nf_defrag_ipv6 on ipv6 module") which was
+backported to stable trees (4.9, 4.14, 4.19) only these days.
+
+The error message
+
+ CC [M] /opt/buildbot/slaves/lede-slave-tah/mipsel_24kc/build/sdk/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/openvswitch-2.11.0/datapath/linux/conntrack.o
+ /opt/buildbot/slaves/lede-slave-tah/mipsel_24kc/build/sdk/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/openvswitch-2.11.0/datapath/linux/conntrack.c: In function 'handle_fragments':
+ /opt/buildbot/slaves/lede-slave-tah/mipsel_24kc/build/sdk/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/openvswitch-2.11.0/datapath/linux/conntrack.c:554:8: error: variable 'user' has initializer but incomplete type
+ enum ip6_defrag_users user = IP6_DEFRAG_CONNTRACK_IN + zone;
+ ^~~~~~~~~~~~~~~~
+ /opt/buildbot/slaves/lede-slave-tah/mipsel_24kc/build/sdk/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/openvswitch-2.11.0/datapath/linux/conntrack.c:554:32: error: 'IP6_DEFRAG_CONNTRACK_IN' undeclared (first use in this function); did you mean 'IP_DEFRAG_CONNTRACK_IN'?
+ enum ip6_defrag_users user = IP6_DEFRAG_CONNTRACK_IN + zone;
+ ^~~~~~~~~~~~~~~~~~~~~~~
+ IP_DEFRAG_CONNTRACK_IN
+ /opt/buildbot/slaves/lede-slave-tah/mipsel_24kc/build/sdk/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/openvswitch-2.11.0/datapath/linux/conntrack.c:554:32: note: each undeclared identifier is reported only once for each function it appears in
+ /opt/buildbot/slaves/lede-slave-tah/mipsel_24kc/build/sdk/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/openvswitch-2.11.0/datapath/linux/conntrack.c:554:25: error: storage size of 'user' isn't known
+ enum ip6_defrag_users user = IP6_DEFRAG_CONNTRACK_IN + zone;
+ ^~~~
+ /opt/buildbot/slaves/lede-slave-tah/mipsel_24kc/build/sdk/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/openvswitch-2.11.0/datapath/linux/conntrack.c:554:25: warning: unused variable 'user' [-Wunused-variable]
+ scripts/Makefile.build:326: recipe for target '/opt/buildbot/slaves/lede-slave-tah/mipsel_24kc/build/sdk/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/openvswitch-2.11.0/datapath/linux/conntrack.o' failed
+
+Reference: https://github.com/openwrt/packages/issues/8548#issuecomment-488871090
+Signed-off-by: Yousong Zhou <zhouyousong@yunionyun.com>
+---
+ datapath/conntrack.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/datapath/conntrack.c b/datapath/conntrack.c
+index a7dc9e0c3..69bda5a9c 100644
+--- a/datapath/conntrack.c
++++ b/datapath/conntrack.c
+@@ -31,6 +31,7 @@
+ #include <net/netfilter/nf_conntrack_seqadj.h>
+ #include <net/netfilter/nf_conntrack_zones.h>
+ #include <net/netfilter/ipv6/nf_defrag_ipv6.h>
++#include <net/ipv6_frag.h>
+
+ #ifdef CONFIG_NF_NAT_NEEDED
+ #include <linux/netfilter/nf_nat.h>
+++ /dev/null
-From e4ac9741a99866976322c21605b312bc27633c92 Mon Sep 17 00:00:00 2001
-From: Helmut Schaa <helmut.schaa@googlemail.com>
-Date: Wed, 8 Jan 2014 13:48:33 +0100
-Subject: [PATCH 100/107] netdev-linux: Use unsigned int for ifi_flags
-
-ifi_flags is unsigned, the local equivalents should do the same.
-
-Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
----
- lib/netdev-linux.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c
-index e16ea58a0..5ada9a21f 100644
---- a/lib/netdev-linux.c
-+++ b/lib/netdev-linux.c
-@@ -3115,7 +3115,7 @@ update_flags(struct netdev_linux *netdev, enum netdev_flags off,
- enum netdev_flags on, enum netdev_flags *old_flagsp)
- OVS_REQUIRES(netdev->mutex)
- {
-- int old_flags, new_flags;
-+ unsigned int old_flags, new_flags;
- int error = 0;
-
- old_flags = netdev->ifi_flags;
+++ /dev/null
-From 9f4775d9a2541e8128ea99f3b02925cc1ee05374 Mon Sep 17 00:00:00 2001
-From: Helmut Schaa <helmut.schaa@googlemail.com>
-Date: Wed, 8 Jan 2014 13:48:49 +0100
-Subject: [PATCH 101/107] netdev-linux: Let interface flag survive internal
- port setup
-
-Due to a race condition when bringing up an internal port on Linux
-some interface flags (e.g. IFF_MULTICAST) are falsely reset. This
-happens because netlink events may be processed after the according
-netdev has been brought up (which sets interface flags).
-
-Fix this by reading the interface flags just before updating them
-if they have not been updated by from the kernel yet.
-
-Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
----
- lib/netdev-linux.c | 8 +++++++-
- 1 file changed, 7 insertions(+), 1 deletion(-)
-
-diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c
-index 5ada9a21f..bb8275cfa 100644
---- a/lib/netdev-linux.c
-+++ b/lib/netdev-linux.c
-@@ -3118,7 +3118,13 @@ update_flags(struct netdev_linux *netdev, enum netdev_flags off,
- unsigned int old_flags, new_flags;
- int error = 0;
-
-- old_flags = netdev->ifi_flags;
-+ if (!(netdev->cache_valid & VALID_DRVINFO)) {
-+ /* Most likely the debvice flags are not in sync yet, fetch them now */
-+ get_flags(&netdev->up, &old_flags);
-+ } else {
-+ old_flags = netdev->ifi_flags;
-+ }
-+
- *old_flagsp = iff_to_nd_flags(old_flags);
- new_flags = (old_flags & ~nd_to_iff_flags(off)) | nd_to_iff_flags(on);
- if (new_flags != old_flags) {
+++ /dev/null
-From e451d74788c73e8679e6a2268185a08901ac7f8c Mon Sep 17 00:00:00 2001
-From: Yousong Zhou <zhouyousong@yunionyun.com>
-Date: Tue, 21 Aug 2018 12:21:05 +0000
-Subject: [PATCH 102/107] python: separate host/target python for cross-compile
-
-At the moment, python-six is a requirement for openvswitch python
-library on target machine.
-
-Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
----
- Makefile.am | 2 +-
- m4/openvswitch.m4 | 2 ++
- 2 files changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index 788972804..cd90cc176 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -60,7 +60,7 @@ endif
- # foo/__init__.pyc will cause Python to ignore foo.py.
- run_python = \
- PYTHONPATH=$(top_srcdir)/python$(psep)$$PYTHONPATH \
-- PYTHONDONTWRITEBYTECODE=yes $(PYTHON)
-+ PYTHONDONTWRITEBYTECODE=yes $(PYTHON_HOST)
-
- ALL_LOCAL =
- BUILT_SOURCES =
-diff --git a/m4/openvswitch.m4 b/m4/openvswitch.m4
-index 5743f83ce..acb6b140e 100644
---- a/m4/openvswitch.m4
-+++ b/m4/openvswitch.m4
-@@ -449,7 +449,9 @@ AC_DEFUN([OVS_CHECK_PYTHON],
- fi])
- AC_SUBST([PYTHON])
- PYTHON=$ovs_cv_python
-+ PYTHON_HOST=$ovs_cv_python_host
- AC_SUBST([HAVE_PYTHON])
-+ AM_MISSING_PROG([PYTHON_HOST], [python])
- HAVE_PYTHON=yes
- AM_CONDITIONAL([HAVE_PYTHON], [test "$HAVE_PYTHON" = yes])])
-
+++ /dev/null
-From 6b9732c8851c5466f2a363d88b5acae320801efe Mon Sep 17 00:00:00 2001
-From: Yousong Zhou <yszhou4tech@gmail.com>
-Date: Wed, 14 Mar 2018 16:40:01 +0800
-Subject: [PATCH 103/107] ovs-ctl: fix setting hostname
-
-The command "hostname" is not available in OpenWrt by default.
-
-The other thing to note is that currently kernel.hostname is not a fully
-qualitied name
-
-Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
----
- utilities/ovs-ctl.in | 4 +---
- 1 file changed, 1 insertion(+), 3 deletions(-)
-
-diff --git a/utilities/ovs-ctl.in b/utilities/ovs-ctl.in
-index 43c8f32b7..6203ecff5 100755
---- a/utilities/ovs-ctl.in
-+++ b/utilities/ovs-ctl.in
-@@ -36,9 +36,7 @@ insert_mod_if_required () {
- }
-
- set_hostname () {
-- # 'hostname -f' needs network connectivity to work. So we should
-- # call this only after ovs-vswitchd is running.
-- ovs_vsctl set Open_vSwitch . external-ids:hostname="$(hostname -f)"
-+ ovs_vsctl set Open_vSwitch . external-ids:hostname="$(sysctl -n kernel.hostname)"
- }
-
- set_system_ids () {
+++ /dev/null
-From 940441e2982cb35765830060e8203e5dd1a0f967 Mon Sep 17 00:00:00 2001
-From: Yousong Zhou <yszhou4tech@gmail.com>
-Date: Wed, 14 Mar 2018 16:44:13 +0800
-Subject: [PATCH 104/107] ovs-lib: fix install_dir()
-
-The command "install" is not available in OpenWrt by default
-
-Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
----
- utilities/ovs-lib.in | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/utilities/ovs-lib.in b/utilities/ovs-lib.in
-index 090a14434..f2a30e065 100644
---- a/utilities/ovs-lib.in
-+++ b/utilities/ovs-lib.in
-@@ -159,7 +159,10 @@ install_dir () {
- [ "${OVS_USER##*:}" != "" ] && INSTALL_GROUP="${OVS_USER##*:}"
-
- if test ! -d "$DIR"; then
-- install -d -m "$INSTALL_MODE" -o "$INSTALL_USER" -g "$INSTALL_GROUP" "$DIR"
-+ mkdir -p "$DIR"
-+ chmod "$INSTALL_MODE" "$DIR"
-+ chown "$INSTALL_USER" "$DIR"
-+ chgrp "$INSTALL_GROUP" "$DIR"
- restorecon "$DIR" >/dev/null 2>&1
- fi
- }
+++ /dev/null
-From d0cad5ac122aca722dc2013c1f53fda44c477cf2 Mon Sep 17 00:00:00 2001
-From: Yousong Zhou <zhouyousong@yunionyun.com>
-Date: Tue, 21 Aug 2018 13:02:21 +0000
-Subject: [PATCH 105/107] build: disable building tests
-
-Signed-off-by: Yousong Zhou <zhouyousong@yunionyun.com>
----
- Makefile.am | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index cd90cc176..2e9e50f3a 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -477,7 +477,6 @@ include m4/automake.mk
- include lib/automake.mk
- include ofproto/automake.mk
- include utilities/automake.mk
--include tests/automake.mk
- include include/automake.mk
- include third-party/automake.mk
- include debian/automake.mk
+++ /dev/null
-From 2a59f2b60e8a22dc93d48c511b5c4255b429ff66 Mon Sep 17 00:00:00 2001
-From: Yousong Zhou <zhouyousong@yunionyun.com>
-Date: Wed, 5 Sep 2018 12:32:54 +0000
-Subject: [PATCH 106/107] ovs-save: compatible with busybox ip command
-
-Busybox ip command will have exit code 1 for `ip -V` or `ip help` etc.,
-use `ip rule list` to cover both iproute2 and busybox ip command
-
-Signed-off-by: Yousong Zhou <zhouyousong@yunionyun.com>
----
- utilities/ovs-save | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/utilities/ovs-save b/utilities/ovs-save
-index ea8fb6a45..72d460df4 100755
---- a/utilities/ovs-save
-+++ b/utilities/ovs-save
-@@ -38,7 +38,7 @@ EOF
- }
-
- save_interfaces () {
-- if (ip -V) > /dev/null 2>&1; then :; else
-+ if (ip rule list) > /dev/null 2>&1; then :; else
- echo "$0: ip not found in $PATH" >&2
- exit 1
- fi
+++ /dev/null
-From 1e859f407b94a0f549fc41fceec11ca12653878b Mon Sep 17 00:00:00 2001
-From: Yousong Zhou <zhouyousong@yunionyun.com>
-Date: Thu, 6 Sep 2018 11:48:20 +0000
-Subject: [PATCH 107/107] datapath: use KARCH when building linux datapath
- modules
-
-Signed-off-by: Yousong Zhou <zhouyousong@yunionyun.com>
----
- datapath/linux/Makefile.main.in | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/datapath/linux/Makefile.main.in b/datapath/linux/Makefile.main.in
-index 7d18253be..039485d16 100644
---- a/datapath/linux/Makefile.main.in
-+++ b/datapath/linux/Makefile.main.in
-@@ -68,10 +68,10 @@ ifeq (,$(wildcard $(CONFIG_FILE)))
- endif
-
- default:
-- $(MAKE) -C $(KSRC) M=$(builddir) modules
-+ $(MAKE) -C $(KSRC) $(if @KARCH@,ARCH=@KARCH@) M=$(builddir) modules
-
- modules_install:
-- $(MAKE) -C $(KSRC) M=$(builddir) modules_install
-+ $(MAKE) -C $(KSRC) $(if @KARCH@,ARCH=@KARCH@) M=$(builddir) modules_install
- depmod `sed -n 's/#define UTS_RELEASE "\([^"]*\)"/\1/p' $(KSRC)/include/generated/utsrelease.h`
- endif
-
--- /dev/null
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=ostiary
+PKG_VERSION:=4.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://ingles.homeunix.net/software/ost/latest/
+PKG_HASH:=1b6a0a8a17fd3aa0f6511cdda81558d54f11023a0c953201ddaaef35f56a82c4
+
+PKG_MAINTAINER:=Chris Geraghty <cgretski@hotmail.com>
+PKG_LICENSE:=GPL-2.0-only
+PKG_LICENSE_FILES:=COPYING
+
+PKG_BUILD_PARALLEL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/ostiary
+ SECTION:=base
+ CATEGORY:=Network
+ TITLE:=Secure remote execution utility
+ URL:=http://ingles.homeunix.net/software/ost/index.html
+endef
+
+define Package/ostiary/description
+ Replay-resistent predefined remote-command trigger
+endef
+
+define Package/ostiary/conffiles
+/etc/ostiary.cfg
+endef
+
+MAKE_FLAGS += all
+
+define Package/ostiary/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/ostiaryd $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/ostclient $(1)/usr/bin/
+ $(INSTALL_DIR) $(1)/etc
+ $(INSTALL_CONF) $(PKG_BUILD_DIR)/tests/ostiary.cfg $(1)/etc/ostiary.cfg
+ $(INSTALL_DIR) $(1)/etc/init.d
+ $(INSTALL_BIN) ./files/ostiaryd.init $(1)/etc/init.d/ostiary
+endef
+
+
+$(eval $(call BuildPackage,ostiary))
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=99
+STOP=85
+
+USE_PROCD=1
+
+start_service()
+{
+
+ procd_open_instance
+ procd_set_param command /usr/bin/ostiaryd -c /etc/ostiary.cfg
+ procd_close_instance
+}
+
+
+reload_service() {
+ procd_send_signal ostiaryd
+}
PKG_NAME:=p910nd
PKG_VERSION:=0.97
-PKG_RELEASE:=6
+PKG_RELEASE:=7
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=@SF/p910nd
config p910nd
option device /dev/usb/lp0
+ # Actual TCP port is 9100 plus this value
+ # Valid values are 0,1,2
option port 0
option bidirectional 1
option enabled 0
+
+ # mDNS support - see Bonjour Printing Specification for details concerning the values
+ # Be aware that you can only advertise one printer on this host via mDNS
+ # Set to 1 to enable
+ option mdns 0
+ # Human-readable printer make and model
+ option mdns_ty 'My Printer Manufacturer/Model'
+ # Human-readable location
+ option mdns_note 'Basement'
+ # Post-Script product string, including parenthesis
+ option mdns_product ''
+ # IEEE-1284 Device ID MANUFACTURER/MFG string
+ option mdns_mfg ''
+ # IEEE-1284 Device ID MODEL/MDL string
+ option mdns_mdl ''
+ # IEEE-1284 Device ID COMMAND SET/CMD string
+ option mdns_cmd ''
procd_open_instance $name
procd_set_param command /usr/sbin/p910nd $args
procd_set_param respawn
+
+ config_get_bool "mdns" "$section" "mdns" '0'
+ config_get mdns_note "$section" mdns_note
+ config_get mdns_ty "$section" mdns_ty
+ config_get mdns_product "$section" mdns_product
+ config_get mdns_mfg "$section" mdns_mfg
+ config_get mdns_mdl "$section" mdns_mdl
+ config_get mdns_cmd "$section" mdns_cmd
+ [ "$mdns" -gt 0 ] && procd_add_mdns "pdl-datastream" "tcp" "$((port+9100))" "note=$mdns_note" "ty=$mdns_ty" "product=$mdns_product" "usb_MFG=$mdns_mfg" "usb_MDL=$mdns_mdl" "usb_CMD=$mdns_cmd"
+
procd_close_instance
fi
}
PKG_NAME:=pagekitec
PKG_REV:=0.91.171102
PKG_VERSION:=$(PKG_REV)C
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_LICENSE:=Apache-2.0
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
define Package/libpagekite/install
$(INSTALL_DIR) $(1)/usr/lib
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libpagekite.so* $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpagekite.so* $(1)/usr/lib
endef
define Package/pagekitec/install
--- /dev/null
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=pdns-recursor
+PKG_VERSION:=4.1.14
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=https://downloads.powerdns.com/releases/
+PKG_HASH:=7fceb8fa3bea693aad49d137c801bb3ecc15525cc5a7dc84380321546e87bf14
+
+PKG_MAINTAINER:=James Taylor <james@jtaylor.id.au>
+PKG_LICENCE:=GPL-2.0-only
+PKG_LICENCE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:powerdns:recursor
+
+PKG_INSTALL:=1
+PKG_FIXUP:=autoreconf
+PKG_BUILD_PARALLEL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/pdns-recursor
+ SECTION:=net
+ CATEGORY:=Network
+ SUBMENU:=IP Addresses and Names
+ USERID:=pdns:pdns
+ TITLE:=PowerDNS Recursor
+ DEPENDS:=+boost +boost-context +libatomic +liblua +libopenssl +protobuf
+ URL:=https://www.powerdns.com/recursor.html
+endef
+
+define Package/pdns-recursor/description
+ High-performance resolving name server, utilizing multiple
+ processor and including Lua scripting capabilities.
+endef
+
+define Package/pdns-recursor/conffiles
+/etc/powerdns/pdns-recursor.conf
+/etc/init.d/pdns-recursor
+endef
+
+CONFIGURE_ARGS+= \
+ --sysconfdir=/etc/powerdns \
+ --with-lua \
+ --without-luajit \
+ --disable-libsodium \
+ --with-protobuf \
+ --without-net-snmp \
+ --disable-silent-rules
+
+define Package/pdns-recursor/install
+ $(INSTALL_DIR) $(1)/etc/powerdns
+ $(INSTALL_CONF) ./files/recursor.conf-dist $(1)/etc/powerdns/
+ $(INSTALL_DIR) $(1)/etc/init.d
+ $(INSTALL_BIN) ./files/pdns-recursor.init $(1)/etc/init.d/pdns-recursor
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rec_control $(1)/usr/bin/
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pdns_recursor $(1)/usr/sbin/
+endef
+
+$(eval $(call BuildPackage,pdns-recursor))
--- /dev/null
+#!/bin/sh /etc/rc.common
+START=99
+
+USE_PROCD=1
+
+start_service() {
+ [ -e /etc/powerdns/recursor.conf ] || return 1
+
+ procd_open_instance
+ procd_set_param command /usr/sbin/pdns_recursor --daemon=no
+ procd_set_param file /etc/powerdns/recursor.conf
+ procd_set_param respawn
+ procd_close_instance
+}
--- /dev/null
+# Autogenerated configuration file template
+#################################
+# allow-from If set, only allow these comma separated netmasks to recurse
+#
+# allow-from=127.0.0.0/8, 10.0.0.0/8, 100.64.0.0/10, 169.254.0.0/16, 192.168.0.0/16, 172.16.0.0/12, ::1/128, fc00::/7, fe80::/10
+
+#################################
+# allow-from-file If set, load allowed netmasks from this file
+#
+# allow-from-file=
+
+#################################
+# any-to-tcp Answer ANY queries with tc=1, shunting to TCP
+#
+# any-to-tcp=no
+
+#################################
+# api-config-dir Directory where REST API stores config and zones
+#
+# api-config-dir=
+
+#################################
+# api-key Static pre-shared authentication key for access to the REST API
+#
+# api-key=
+
+#################################
+# api-logfile Location of the server logfile (used by the REST API)
+#
+# api-logfile=/var/log/pdns.log
+
+#################################
+# api-readonly Disallow data modification through the REST API when set
+#
+# api-readonly=no
+
+#################################
+# auth-zones Zones for which we have authoritative data, comma separated domain=file pairs
+#
+# auth-zones=
+
+#################################
+# carbon-interval Number of seconds between carbon (graphite) updates
+#
+# carbon-interval=30
+
+#################################
+# carbon-ourname If set, overrides our reported hostname for carbon stats
+#
+# carbon-ourname=
+
+#################################
+# carbon-server If set, send metrics in carbon (graphite) format to this server IP address
+#
+# carbon-server=
+
+#################################
+# chroot switch to chroot jail
+#
+# chroot=
+
+#################################
+# client-tcp-timeout Timeout in seconds when talking to TCP clients
+#
+# client-tcp-timeout=2
+
+#################################
+# config-dir Location of configuration directory (recursor.conf)
+#
+# config-dir=/usr/local/etc
+
+#################################
+# config-name Name of this virtual configuration - will rename the binary image
+#
+# config-name=
+
+#################################
+# cpu-map Thread to CPU mapping, space separated thread-id=cpu1,cpu2..cpuN pairs
+#
+# cpu-map=
+
+#################################
+# daemon Operate as a daemon
+#
+# daemon=no
+
+#################################
+# delegation-only Which domains we only accept delegations from
+#
+# delegation-only=
+
+#################################
+# disable-packetcache Disable packetcache
+#
+# disable-packetcache=no
+
+#################################
+# disable-real-memory-usage Disable expensive real-memory-usage metric
+#
+# disable-real-memory-usage=no
+
+#################################
+# disable-syslog Disable logging to syslog, useful when running inside a supervisor that logs stdout
+#
+# disable-syslog=no
+
+#################################
+# distribution-load-factor The load factor used when PowerDNS is distributing queries to worker threads
+#
+# distribution-load-factor=0.0
+
+#################################
+# dnssec DNSSEC mode: off/process-no-validate (default)/process/log-fail/validate
+#
+# dnssec=process-no-validate
+
+#################################
+# dnssec-log-bogus Log DNSSEC bogus validations
+#
+# dnssec-log-bogus=no
+
+#################################
+# dont-query If set, do not query these netmasks for DNS data
+#
+# dont-query=127.0.0.0/8, 10.0.0.0/8, 100.64.0.0/10, 169.254.0.0/16, 192.168.0.0/16, 172.16.0.0/12, ::1/128, fc00::/7, fe80::/10, 0.0.0.0/8, 192.0.0.0/24, 192.0.2.0/24, 198.51.100.0/24, 203.0.113.0/24, 240.0.0.0/4, ::/96, ::ffff:0:0/96, 100::/64, 2001:db8::/32
+
+#################################
+# ecs-cache-limit-ttl Minimum TTL to cache ECS response
+#
+# ecs-cache-limit-ttl=0
+
+#################################
+# ecs-ipv4-bits Number of bits of IPv4 address to pass for EDNS Client Subnet
+#
+# ecs-ipv4-bits=24
+
+#################################
+# ecs-ipv4-cache-bits Maximum number of bits of IPv4 mask to cache ECS response
+#
+# ecs-ipv4-cache-bits=24
+
+#################################
+# ecs-ipv6-bits Number of bits of IPv6 address to pass for EDNS Client Subnet
+#
+# ecs-ipv6-bits=56
+
+#################################
+# ecs-ipv6-cache-bits Maximum number of bits of IPv6 mask to cache ECS response
+#
+# ecs-ipv6-cache-bits=56
+
+#################################
+# ecs-scope-zero-address Address to send to whitelisted authoritative servers for incoming queries with ECS prefix-length source of 0
+#
+# ecs-scope-zero-address=
+
+#################################
+# edns-outgoing-bufsize Outgoing EDNS buffer size
+#
+# edns-outgoing-bufsize=1680
+
+#################################
+# edns-subnet-whitelist List of netmasks and domains that we should enable EDNS subnet for
+#
+# edns-subnet-whitelist=
+
+#################################
+# entropy-source If set, read entropy from this file
+#
+# entropy-source=/dev/urandom
+
+#################################
+# etc-hosts-file Path to 'hosts' file
+#
+# etc-hosts-file=/etc/hosts
+
+#################################
+# export-etc-hosts If we should serve up contents from /etc/hosts
+#
+# export-etc-hosts=off
+
+#################################
+# export-etc-hosts-search-suffix Also serve up the contents of /etc/hosts with this suffix
+#
+# export-etc-hosts-search-suffix=
+
+#################################
+# forward-zones Zones for which we forward queries, comma separated domain=ip pairs
+#
+# forward-zones=
+
+#################################
+# forward-zones-file File with (+)domain=ip pairs for forwarding
+#
+# forward-zones-file=
+
+#################################
+# forward-zones-recurse Zones for which we forward queries with recursion bit, comma separated domain=ip pairs
+#
+# forward-zones-recurse=
+
+#################################
+# gettag-needs-edns-options If EDNS Options should be extracted before calling the gettag() hook
+#
+# gettag-needs-edns-options=no
+
+#################################
+# hint-file If set, load root hints from this file
+#
+# hint-file=
+
+#################################
+# include-dir Include *.conf files from this directory
+#
+# include-dir=
+
+#################################
+# latency-statistic-size Number of latency values to calculate the qa-latency average
+#
+# latency-statistic-size=10000
+
+#################################
+# local-address IP addresses to listen on, separated by spaces or commas. Also accepts ports.
+#
+# local-address=127.0.0.1
+
+#################################
+# local-port port to listen on
+#
+# local-port=53
+
+#################################
+# log-common-errors If we should log rather common errors
+#
+# log-common-errors=no
+
+#################################
+# log-rpz-changes Log additions and removals to RPZ zones at Info level
+#
+# log-rpz-changes=no
+
+#################################
+# log-timestamp Print timestamps in log lines, useful to disable when running with a tool that timestamps stdout already
+#
+# log-timestamp=yes
+
+#################################
+# logging-facility Facility to log messages as. 0 corresponds to local0
+#
+# logging-facility=
+
+#################################
+# loglevel Amount of logging. Higher is more. Do not set below 3
+#
+# loglevel=6
+
+#################################
+# lowercase-outgoing Force outgoing questions to lowercase
+#
+# lowercase-outgoing=no
+
+#################################
+# lua-config-file More powerful configuration options
+#
+# lua-config-file=
+
+#################################
+# lua-dns-script Filename containing an optional 'lua' script that will be used to modify dns answers
+#
+# lua-dns-script=
+
+#################################
+# max-cache-entries If set, maximum number of entries in the main cache
+#
+# max-cache-entries=1000000
+
+#################################
+# max-cache-ttl maximum number of seconds to keep a cached entry in memory
+#
+# max-cache-ttl=86400
+
+#################################
+# max-mthreads Maximum number of simultaneous Mtasker threads
+#
+# max-mthreads=2048
+
+#################################
+# max-negative-ttl maximum number of seconds to keep a negative cached entry in memory
+#
+# max-negative-ttl=3600
+
+#################################
+# max-packetcache-entries maximum number of entries to keep in the packetcache
+#
+# max-packetcache-entries=500000
+
+#################################
+# max-qperq Maximum outgoing queries per query
+#
+# max-qperq=50
+
+#################################
+# max-recursion-depth Maximum number of internal recursion calls per query, 0 for unlimited
+#
+# max-recursion-depth=40
+
+#################################
+# max-tcp-clients Maximum number of simultaneous TCP clients
+#
+# max-tcp-clients=128
+
+#################################
+# max-tcp-per-client If set, maximum number of TCP sessions per client (IP address)
+#
+# max-tcp-per-client=0
+
+#################################
+# max-tcp-queries-per-connection If set, maximum number of TCP queries in a TCP connection
+#
+# max-tcp-queries-per-connection=0
+
+#################################
+# max-total-msec Maximum total wall-clock time per query in milliseconds, 0 for unlimited
+#
+# max-total-msec=7000
+
+#################################
+# max-udp-queries-per-round Maximum number of UDP queries processed per recvmsg() round, before returning back to normal processing
+#
+# max-udp-queries-per-round=10000
+
+#################################
+# minimum-ttl-override Set under adverse conditions, a minimum TTL
+#
+# minimum-ttl-override=0
+
+#################################
+# network-timeout Wait this number of milliseconds for network i/o
+#
+# network-timeout=1500
+
+#################################
+# no-shuffle Don't change
+#
+# no-shuffle=off
+
+#################################
+# non-local-bind Enable binding to non-local addresses by using FREEBIND / BINDANY socket options
+#
+# non-local-bind=no
+
+#################################
+# nsec3-max-iterations Maximum number of iterations allowed for an NSEC3 record
+#
+# nsec3-max-iterations=2500
+
+#################################
+# packetcache-servfail-ttl maximum number of seconds to keep a cached servfail entry in packetcache
+#
+# packetcache-servfail-ttl=60
+
+#################################
+# packetcache-ttl maximum number of seconds to keep a cached entry in packetcache
+#
+# packetcache-ttl=3600
+
+#################################
+# pdns-distributes-queries If PowerDNS itself should distribute queries over threads
+#
+# pdns-distributes-queries=yes
+
+#################################
+# processes Launch this number of processes (EXPERIMENTAL, DO NOT CHANGE)
+#
+# processes=1
+
+#################################
+# query-local-address Source IP address for sending queries
+#
+# query-local-address=0.0.0.0
+
+#################################
+# query-local-address6 Source IPv6 address for sending queries. IF UNSET, IPv6 WILL NOT BE USED FOR OUTGOING QUERIES
+#
+# query-local-address6=
+
+#################################
+# quiet Suppress logging of questions and answers
+#
+# quiet=
+
+#################################
+# reuseport Enable SO_REUSEPORT allowing multiple recursors processes to listen to 1 address
+#
+# reuseport=no
+
+#################################
+# root-nx-trust If set, believe that an NXDOMAIN from the root means the TLD does not exist
+#
+# root-nx-trust=yes
+
+#################################
+# security-poll-suffix Domain name from which to query security update notifications
+#
+# security-poll-suffix=secpoll.powerdns.com.
+
+#################################
+# serve-rfc1918 If we should be authoritative for RFC 1918 private IP space
+#
+# serve-rfc1918=yes
+
+#################################
+# server-down-max-fails Maximum number of consecutive timeouts (and unreachables) to mark a server as down ( 0 => disabled )
+#
+# server-down-max-fails=64
+
+#################################
+# server-down-throttle-time Number of seconds to throttle all queries to a server after being marked as down
+#
+# server-down-throttle-time=60
+
+#################################
+# server-id Returned when queried for 'id.server' TXT or NSID, defaults to hostname
+#
+# server-id=
+
+#################################
+# setgid If set, change group id to this gid for more security
+#
+# setgid=
+
+#################################
+# setuid If set, change user id to this uid for more security
+#
+# setuid=
+
+#################################
+# signature-inception-skew Allow the signture inception to be off by this number of seconds
+#
+# signature-inception-skew=0
+
+#################################
+# single-socket If set, only use a single socket for outgoing queries
+#
+# single-socket=off
+
+#################################
+# snmp-agent If set, register as an SNMP agent
+#
+# snmp-agent=no
+
+#################################
+# snmp-master-socket If set and snmp-agent is set, the socket to use to register to the SNMP master
+#
+# snmp-master-socket=
+
+#################################
+# soa-minimum-ttl Don't change
+#
+# soa-minimum-ttl=0
+
+#################################
+# socket-dir Where the controlsocket will live, /var/run when unset and not chrooted
+#
+# socket-dir=
+
+#################################
+# socket-group Group of socket
+#
+# socket-group=
+
+#################################
+# socket-mode Permissions for socket
+#
+# socket-mode=
+
+#################################
+# socket-owner Owner of socket
+#
+# socket-owner=
+
+#################################
+# spoof-nearmiss-max If non-zero, assume spoofing after this many near misses
+#
+# spoof-nearmiss-max=20
+
+#################################
+# stack-size stack size per mthread
+#
+# stack-size=200000
+
+#################################
+# statistics-interval Number of seconds between printing of recursor statistics, 0 to disable
+#
+# statistics-interval=1800
+
+#################################
+# stats-ringbuffer-entries maximum number of packets to store statistics for
+#
+# stats-ringbuffer-entries=10000
+
+#################################
+# tcp-fast-open Enable TCP Fast Open support on the listening sockets, using the supplied numerical value as the queue size
+#
+# tcp-fast-open=0
+
+#################################
+# threads Launch this number of threads
+#
+# threads=2
+
+#################################
+# trace if we should output heaps of logging. set to 'fail' to only log failing domains
+#
+# trace=off
+
+#################################
+# udp-truncation-threshold Maximum UDP response size before we truncate
+#
+# udp-truncation-threshold=1680
+
+#################################
+# use-incoming-edns-subnet Pass along received EDNS Client Subnet information
+#
+# use-incoming-edns-subnet=no
+
+#################################
+# version-string string reported on version.pdns or version.bind
+#
+# version-string=PowerDNS Recursor 4.1.13 (built Jun 14 2019 10:58:59 by xreaper@nimbus.for-no-reason.net)
+
+#################################
+# webserver Start a webserver (for REST API)
+#
+# webserver=no
+
+#################################
+# webserver-address IP Address of webserver to listen on
+#
+# webserver-address=127.0.0.1
+
+#################################
+# webserver-allow-from Webserver access is only allowed from these subnets
+#
+# webserver-allow-from=127.0.0.1,::1
+
+#################################
+# webserver-password Password required for accessing the webserver
+#
+# webserver-password=
+
+#################################
+# webserver-port Port of webserver to listen on
+#
+# webserver-port=8082
+
+#################################
+# write-pid Write a PID file
+#
+# write-pid=yes
--- /dev/null
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -357,12 +357,6 @@
+ pubsuffix.cc: $(srcdir)/effective_tld_names.dat
+ $(AM_V_GEN)./mkpubsuffixcc
+
+-## Config file
+-sysconf_DATA = recursor.conf-dist
+-
+-recursor.conf-dist: pdns_recursor
+- $(AM_V_GEN)./pdns_recursor --config > $@
+-
+ ## Manpages
+ MANPAGES=pdns_recursor.1 \
+ rec_control.1
--- /dev/null
+--- a/m4/pdns_check_os.m4
++++ b/m4/pdns_check_os.m4
+@@ -35,16 +35,21 @@
+ AM_CONDITIONAL([HAVE_LINUX], [test "x$have_linux" = "xyes"])
+ AM_CONDITIONAL([HAVE_SOLARIS], [test "x$have_solaris" = "xyes"])
+
+- case "$host" in
+- mips* | powerpc-* )
+- AC_MSG_CHECKING([whether the linker accepts -latomic])
+- LDFLAGS="-latomic $LDFLAGS"
+- AC_LINK_IFELSE([m4_default([],[AC_LANG_PROGRAM()])],
+- [AC_MSG_RESULT([yes])],
+- [AC_MSG_ERROR([Unable to link against libatomic, cannot continue])]
+- )
+- ;;
+- esac
++ AC_MSG_CHECKING([whether -latomic is needed for __atomic builtins])
++ AC_LINK_IFELSE(
++ [AC_LANG_PROGRAM([[#include <stdint.h>]],
++ [[uint64_t val = 0; __atomic_add_fetch(&val, 1, __ATOMIC_RELAXED);]]
++ )],
++ [AC_MSG_RESULT([no])],
++ [LIBS="$LIBS -latomic"
++ AC_LINK_IFELSE(
++ [AC_LANG_PROGRAM([[#include <stdint.h>]],
++ [[uint64_t val = 0; __atomic_add_fetch(&val, 1, __ATOMIC_RELAXED);]]
++ )],
++ [AC_MSG_RESULT([yes])],
++ [AC_MSG_FAILURE([libatomic needed, but linking with -latomic failed, cannot continue])]
++ )]
++ )
+
+ AC_SUBST(THREADFLAGS)
+ AC_SUBST([DYNLINKFLAGS], [-export-dynamic])
--- /dev/null
+--- a/build-aux/gen-version
++++ b/build-aux/gen-version
+@@ -1,39 +1,4 @@
+ #!/bin/sh
+-VERSION="unknown"
+-
+-DIRTY=""
+-git status | grep -q clean || DIRTY='.dirty'
+-
+-# Special environment variable to signal that we are building a release, as this
+-# has consequences for the version number.
+-if [ "${IS_RELEASE}" = "YES" ]; then
+- TAG="$(git describe --tags --exact-match 2> /dev/null | cut -d- -f 2-)"
+- if [ -n "${TAG}" ]; then
+- # We're on a tag
+- echo "${TAG}${DIRTY}" > .version
+- printf "${TAG}${DIRTY}"
+- exit 0
+- fi
+- echo 'This is not a tag, either tag this commit or do not set $IS_RELEASE' >&2
+- exit 1
+-fi
+-
+-#
+-# Generate the version number based on the branch
+-#
+-if [ ! -z "$(git rev-parse --abbrev-ref HEAD 2> /dev/null)" ]; then
+- if $(git rev-parse --abbrev-ref HEAD | grep -q 'rel/'); then
+- REL_TYPE="$(git rev-parse --abbrev-ref HEAD | cut -d/ -f 2 | cut -d- -f 1)"
+- VERSION="$(git describe --match=${REL_TYPE}-* --tags --dirty=.dirty | cut -d- -f 2-)"
+- else
+- GIT_VERSION=$(git show --no-patch --format=format:%h HEAD)
+- BRANCH=".$(git rev-parse --abbrev-ref HEAD | perl -p -e 's/[^[:alnum:]]//g;')"
+- [ "${BRANCH}" = ".master" ] && BRANCH=''
+- VERSION="0.0${BRANCH}.${PDNS_BUILD_NUMBER}g${GIT_VERSION}${DIRTY}"
+- fi
+- echo "$VERSION" > .version
+-elif [ -f .version ]; then
+- VERSION="$(cat .version)"
+-fi
++VERSION="$(cat .version)"
+
+ printf $VERSION
--- /dev/null
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=pdns
+PKG_VERSION:=4.1.10
+PKG_RELEASE:=2
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=https://downloads.powerdns.com/releases/
+PKG_HASH:=5a46cfde92caaaa2e85af9a15acb9ad81b56f4c8a8255c457e6938d8c0cb15c7
+
+PKG_MAINTAINER:=James Taylor <james@jtaylor.id.au>
+PKG_LICENCE:=GPL-2.0-only
+PKG_LICENCE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:powerdns:authoritative_server
+
+PKG_FIXUP:=autoreconf
+
+PKG_INSTALL:=1
+
+PKG_BUILD_PARALLEL:=1
+
+PKG_BUILD_DEPENDS:=unixodbc/host
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/pdns/Default
+ SECTION:=net
+ CATEGORY:=Network
+ SUBMENU:=IP Addresses and Names
+ TITLE:=PowerDNS Authoritative Server
+ DEPENDS:=+libatomic
+ URL:=https://www.powerdns.com/auth.html
+endef
+
+define Package/pdns/description
+ PowerDNS is a versatile nameserver which supports a large number
+ of different backends ranging from simple zonefiles to relational
+ databases and load balancing/failover algorithms.
+ PowerDNS tries to emphasize speed and security.
+
+ This is the authoritative nameserver that answers questions about
+ domains that it knows about. You also need at least one backend installed to
+ serve data.
+endef
+
+PDNS_BACKENDS =
+
+define Package/pdns-backends
+$(call Package/pdns/Default)
+ TITLE+= (all backends)
+ DEPENDS+= $(PDNS_DEPENDS)
+ HIDDEN:=1
+endef
+
+define Package/pdns-backends/description
+ This meta package contains only dependencies for PowerDNS backends.
+endef
+
+# Create a meta-package of dependent backends (for ALL)
+define Package/pdns-backends/install
+ true
+endef
+
+define Package/pdns-tools
+ $(call Package/pdns/Default)
+ TITLE:=Tools for DNS debugging by PowerDNS
+ DEPENDS+=+boost +boost-program_options +libopenssl +p11-kit +protobuf
+endef
+
+define Package/pdns-tools/description
+ PowerDNS is a versatile nameserver which supports a large number
+ of different backends ranging from simple zonefiles to relational
+ databases and load balancing/failover algorithms.
+ PowerDNS tries to emphasize speed and security.
+
+ This package contains several tools to debug DNS issues. These tools do not
+ require any part of the PowerDNS server components to work.
+
+ * dnsbulktest: A resolver stress-tester
+ * dnsgram: Show per 5-second statistics to study intermittent resolver issues
+ * dnsreplay: Replay a pcap with DNS queries
+ * dnsscan: Prints the query-type amounts in a pcap
+ * dnsscope: Calculates statistics without replaying traffic
+ * dnstcpbench: Perform TCP benchmarking of DNS servers
+ * dnswasher: Clean a pcap of identifying IP information
+ * ixplore: Explore diffs from IXFRs
+ * nsec3dig: Calculate the correctness of NSEC3 proofs
+ * saxfr: AXFR zones and show extra information
+endef
+
+define Package/pdns
+ $(call Package/pdns/Default)
+ DEPENDS+=+boost +boost-program_options +liblua +libopenssl +libsodium +libsqlite3 +p11-kit
+endef
+
+define Package/pdns/config
+ menu "Select PowerDNS backends"
+ depends on PACKAGE_pdns
+ comment "PowerDNS backends"
+
+ $(foreach backend,$(PDNS_BACKENDS), \
+ config PACKAGE_pdns-backend-$(backend)
+ prompt "$(PDNS_BACKEND_$(backend)_DESC) backend"
+ default m if ALL
+ )
+ endmenu
+endef
+
+
+# 1: short name
+# 2: dependencies on other PowerDNS libraries (short name)
+# 3: dependencies on other packages
+# 4: conditional/inward dependencies
+define DefinePdnsBackend
+ PDNS_DEPENDS+= +pdns-backend-$(1)
+ PKG_CONFIG_DEPENDS+= CONFIG_PACKAGE_pdns-backend$(1)
+
+ PDNS_BACKENDS+= $(1)
+
+ PDNS_BACKEND_$(1)_DESC=$(if $(5),$(5),$(1))
+ PDNS_BACKEND_$(1)_LIB=$(if $(4),$(4),$(1))
+
+ define Package/pdns-backend-$(1)
+ $(call Package/pdns/Default)
+ TITLE+= ($(1))
+ DEPENDS+= pdns $$(foreach backend,$(2),+pdns-backend-$$(backend)) $(3)
+ HIDDEN:=1
+ endef
+
+ define Package/pdns-backend-$(1)/description
+ PowerDNS is a versatile nameserver which supports a large number
+ of different backends ranging from simple zonefiles to relational
+ databases and load balancing/failover algorithms.
+ PowerDNS tries to emphasize speed and security.
+
+ This package contains the $(if $(5),$(5),$(1)) backend for the PowerDNS nameserver.
+ endef
+endef
+
+$(eval $(call DefinePdnsBackend,mysql,,libmysqlclient,gmysql,MySQL))
+$(eval $(call DefinePdnsBackend,odbc,,unixodbc,godbc,ODBC))
+$(eval $(call DefinePdnsBackend,pgsql,,libpq,gpgsql,PostgreSQL))
+$(eval $(call DefinePdnsBackend,sqlite3,,libsqlite3,gsqlite3,SQLite 3))
+$(eval $(call DefinePdnsBackend,ldap,,libopenldap krb5-libs,,OpenLDAP))
+$(eval $(call DefinePdnsBackend,lua,,lua liblua,,Lua))
+$(eval $(call DefinePdnsBackend,mydns,,libmysqlclient,,MyDNS))
+$(eval $(call DefinePdnsBackend,pipe,,,,Pipe))
+$(eval $(call DefinePdnsBackend,remote,,,,Remote))
+
+define Package/pdns/conffiles
+/etc/powerdns/pdns.conf
+/etc/init.d/pdns
+endef
+
+CONFIGURE_ARGS+= \
+ --sysconfdir=/etc/powerdns \
+ --libdir=/usr/lib/powerdns \
+ --with-dynmodules="$(foreach backend,$(PDNS_BACKENDS),$(if $(CONFIG_PACKAGE_pdns-backend-$(backend)),$(PDNS_BACKEND_$(backend)_LIB),))" \
+ --with-modules="bind random" \
+ --with-mysql-lib=$(STAGING_DIR)/usr \
+ --with-mysql-includes=$(STAGING_DIR)/usr \
+ $(if $(CONFIG_PACKAGE_pdns-tools),--enable-tools,) \
+ --with-protobuf \
+ --enable-libsodium \
+ --enable-experimental-pkcs11
+
+define Package/pdns/install
+ $(INSTALL_DIR) $(1)/etc/powerdns
+ $(INSTALL_CONF) ./files/pdns.conf-dist $(1)/etc/powerdns/pdns.conf-dist
+ $(INSTALL_DIR) $(1)/etc/init.d
+ $(INSTALL_BIN) ./files/pdns.init $(1)/etc/init.d/pdns
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/pdns_control $(1)/usr/bin/
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/pdnsutil $(1)/usr/bin/
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/zone2sql $(1)/usr/bin/
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/zone2json $(1)/usr/bin/
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(CP) $(PKG_INSTALL_DIR)/usr/sbin/pdns_server $(1)/usr/sbin/
+endef
+
+define Package/pdns/Default/install
+ $(INSTALL_DIR) $(1)/usr/lib/powerdns/pdns
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/powerdns/pdns/lib$(PDNS_BACKEND_$(2)_LIB)backend.so $(1)/usr/lib/powerdns/pdns/
+endef
+
+define Package/pdns-tools/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/calidns $(1)/usr/bin/
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/dnsbulktest $(1)/usr/bin/
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/dnsgram $(1)/usr/bin/
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/dnspcap2protobuf $(1)/usr/bin/
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/dnsreplay $(1)/usr/bin/
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/dnsscan $(1)/usr/bin/
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/dnsscope $(1)/usr/bin/
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/dnstcpbench $(1)/usr/bin/
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/dnswasher $(1)/usr/bin/
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/dumresp $(1)/usr/bin/
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/ixplore $(1)/usr/bin/
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/nproxy $(1)/usr/bin/
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/nsec3dig $(1)/usr/bin/
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/pdns_notify $(1)/usr/bin/
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/saxfr $(1)/usr/bin/
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/sdig $(1)/usr/bin/
+endef
+
+define BuildPdnsBackend
+ define Package/pdns-backend-$(1)/install
+ $(call Package/pdns/Default/install,$$(1),$(1))
+ endef
+
+ $$(eval $$(call BuildPackage,pdns-backend-$(1)))
+endef
+
+$(foreach backend,$(PDNS_BACKENDS),$(eval $(call BuildPdnsBackend,$(backend))))
+$(eval $(call BuildPackage,pdns))
+$(eval $(call BuildPackage,pdns-tools))
--- /dev/null
+# Autogenerated configuration file template
+#################################
+# 8bit-dns Allow 8bit dns queries
+#
+# 8bit-dns=no
+
+#################################
+# allow-axfr-ips Allow zonetransfers only to these subnets
+#
+# allow-axfr-ips=127.0.0.0/8,::1
+
+#################################
+# allow-dnsupdate-from A global setting to allow DNS updates from these IP ranges.
+#
+# allow-dnsupdate-from=127.0.0.0/8,::1
+
+#################################
+# allow-notify-from Allow AXFR NOTIFY from these IP ranges. If empty, drop all incoming notifies.
+#
+# allow-notify-from=0.0.0.0/0,::/0
+
+#################################
+# allow-unsigned-notify Allow unsigned notifications for TSIG secured domains
+#
+# allow-unsigned-notify=yes
+
+#################################
+# allow-unsigned-supermaster Allow supermasters to create zones without TSIG signed NOTIFY
+#
+# allow-unsigned-supermaster=yes
+
+#################################
+# also-notify When notifying a domain, also notify these nameservers
+#
+# also-notify=
+
+#################################
+# any-to-tcp Answer ANY queries with tc=1, shunting to TCP
+#
+# any-to-tcp=yes
+
+#################################
+# api Enable/disable the REST API (including HTTP listener)
+#
+# api=no
+
+#################################
+# api-key Static pre-shared authentication key for access to the REST API
+#
+# api-key=
+
+#################################
+# api-logfile Location of the server logfile (used by the REST API)
+#
+# api-logfile=/var/log/pdns.log
+
+#################################
+# api-readonly Disallow data modification through the REST API when set
+#
+# api-readonly=no
+
+#################################
+# axfr-lower-serial Also AXFR a zone from a master with a lower serial
+#
+# axfr-lower-serial=no
+
+#################################
+# cache-ttl Seconds to store packets in the PacketCache
+#
+# cache-ttl=20
+
+#################################
+# carbon-interval Number of seconds between carbon (graphite) updates
+#
+# carbon-interval=30
+
+#################################
+# carbon-ourname If set, overrides our reported hostname for carbon stats
+#
+# carbon-ourname=
+
+#################################
+# carbon-server If set, send metrics in carbon (graphite) format to this server IP address
+#
+# carbon-server=
+
+#################################
+# chroot If set, chroot to this directory for more security
+#
+# chroot=
+
+#################################
+# config-dir Location of configuration directory (pdns.conf)
+#
+# config-dir=/usr/local/etc
+
+#################################
+# config-name Name of this virtual configuration - will rename the binary image
+#
+# config-name=
+
+#################################
+# control-console Debugging switch - don't use
+#
+# control-console=no
+
+#################################
+# daemon Operate as a daemon
+#
+# daemon=no
+
+#################################
+# default-ksk-algorithm Default KSK algorithm
+#
+# default-ksk-algorithm=ecdsa256
+
+#################################
+# default-ksk-size Default KSK size (0 means default)
+#
+# default-ksk-size=0
+
+#################################
+# default-soa-edit Default SOA-EDIT value
+#
+# default-soa-edit=
+
+#################################
+# default-soa-edit-signed Default SOA-EDIT value for signed zones
+#
+# default-soa-edit-signed=
+
+#################################
+# default-soa-mail mail address to insert in the SOA record if none set in the backend
+#
+# default-soa-mail=
+
+#################################
+# default-soa-name name to insert in the SOA record if none set in the backend
+#
+# default-soa-name=a.misconfigured.powerdns.server
+
+#################################
+# default-ttl Seconds a result is valid if not set otherwise
+#
+# default-ttl=3600
+
+#################################
+# default-zsk-algorithm Default ZSK algorithm
+#
+# default-zsk-algorithm=
+
+#################################
+# default-zsk-size Default ZSK size (0 means default)
+#
+# default-zsk-size=0
+
+#################################
+# direct-dnskey Fetch DNSKEY RRs from backend during DNSKEY synthesis
+#
+# direct-dnskey=no
+
+#################################
+# disable-axfr Disable zonetransfers but do allow TCP queries
+#
+# disable-axfr=no
+
+#################################
+# disable-axfr-rectify Disable the rectify step during an outgoing AXFR. Only required for regression testing.
+#
+# disable-axfr-rectify=no
+
+#################################
+# disable-syslog Disable logging to syslog, useful when running inside a supervisor that logs stdout
+#
+# disable-syslog=no
+
+#################################
+# disable-tcp Do not listen to TCP queries
+#
+# disable-tcp=no
+
+#################################
+# distributor-threads Default number of Distributor (backend) threads to start
+#
+# distributor-threads=3
+
+#################################
+# dname-processing If we should support DNAME records
+#
+# dname-processing=no
+
+#################################
+# dnssec-key-cache-ttl Seconds to cache DNSSEC keys from the database
+#
+# dnssec-key-cache-ttl=30
+
+#################################
+# dnsupdate Enable/Disable DNS update (RFC2136) support. Default is no.
+#
+# dnsupdate=no
+
+#################################
+# do-ipv6-additional-processing Do AAAA additional processing
+#
+# do-ipv6-additional-processing=yes
+
+#################################
+# domain-metadata-cache-ttl Seconds to cache domain metadata from the database
+#
+# domain-metadata-cache-ttl=60
+
+#################################
+# edns-subnet-processing If we should act on EDNS Subnet options
+#
+# edns-subnet-processing=no
+
+#################################
+# entropy-source If set, read entropy from this file
+#
+# entropy-source=/dev/urandom
+
+#################################
+# expand-alias Expand ALIAS records
+#
+# expand-alias=no
+
+#################################
+# forward-dnsupdate A global setting to allow DNS update packages that are for a Slave domain, to be forwarded to the master.
+#
+# forward-dnsupdate=yes
+
+#################################
+# forward-notify IP addresses to forward received notifications to regardless of master or slave settings
+#
+# forward-notify=
+
+#################################
+# guardian Run within a guardian process
+#
+# guardian=no
+
+#################################
+# include-dir Include *.conf files from this directory
+#
+# include-dir=
+
+#################################
+# launch Which backends to launch and order to query them in
+#
+# launch=
+
+#################################
+# load-modules Load this module - supply absolute or relative path
+#
+# load-modules=
+
+#################################
+# local-address Local IP addresses to which we bind
+#
+# local-address=0.0.0.0
+
+#################################
+# local-address-nonexist-fail Fail to start if one or more of the local-address's do not exist on this server
+#
+# local-address-nonexist-fail=yes
+
+#################################
+# local-ipv6 Local IP address to which we bind
+#
+# local-ipv6=::
+
+#################################
+# local-ipv6-nonexist-fail Fail to start if one or more of the local-ipv6 addresses do not exist on this server
+#
+# local-ipv6-nonexist-fail=yes
+
+#################################
+# local-port The port on which we listen
+#
+# local-port=53
+
+#################################
+# log-dns-details If PDNS should log DNS non-erroneous details
+#
+# log-dns-details=no
+
+#################################
+# log-dns-queries If PDNS should log all incoming DNS queries
+#
+# log-dns-queries=no
+
+#################################
+# log-timestamp Print timestamps in log lines
+#
+# log-timestamp=yes
+
+#################################
+# logging-facility Log under a specific facility
+#
+# logging-facility=
+
+#################################
+# loglevel Amount of logging. Higher is more. Do not set below 3
+#
+# loglevel=4
+
+#################################
+# lua-axfr-script Script to be used to edit incoming AXFRs
+#
+# lua-axfr-script=
+
+#################################
+# lua-dnsupdate-policy-script Lua script with DNS update policy handler
+#
+# lua-dnsupdate-policy-script=
+
+#################################
+# lua-prequery-script Lua script with prequery handler (DO NOT USE)
+#
+# lua-prequery-script=
+
+#################################
+# master Act as a master
+#
+# master=no
+
+#################################
+# max-cache-entries Maximum number of entries in the query cache
+#
+# max-cache-entries=1000000
+
+#################################
+# max-ent-entries Maximum number of empty non-terminals in a zone
+#
+# max-ent-entries=100000
+
+#################################
+# max-nsec3-iterations Limit the number of NSEC3 hash iterations
+#
+# max-nsec3-iterations=500
+
+#################################
+# max-packet-cache-entries Maximum number of entries in the packet cache
+#
+# max-packet-cache-entries=1000000
+
+#################################
+# max-queue-length Maximum queuelength before considering situation lost
+#
+# max-queue-length=5000
+
+#################################
+# max-signature-cache-entries Maximum number of signatures cache entries
+#
+# max-signature-cache-entries=
+
+#################################
+# max-tcp-connection-duration Maximum time in seconds that a TCP DNS connection is allowed to stay open.
+#
+# max-tcp-connection-duration=0
+
+#################################
+# max-tcp-connections Maximum number of TCP connections
+#
+# max-tcp-connections=20
+
+#################################
+# max-tcp-connections-per-client Maximum number of simultaneous TCP connections per client
+#
+# max-tcp-connections-per-client=0
+
+#################################
+# max-tcp-transactions-per-conn Maximum number of subsequent queries per TCP connection
+#
+# max-tcp-transactions-per-conn=0
+
+#################################
+# module-dir Default directory for modules
+#
+# module-dir=/usr/local/lib/pdns
+
+#################################
+# negquery-cache-ttl Seconds to store negative query results in the QueryCache
+#
+# negquery-cache-ttl=60
+
+#################################
+# no-shuffle Set this to prevent random shuffling of answers - for regression testing
+#
+# no-shuffle=off
+
+#################################
+# non-local-bind Enable binding to non-local addresses by using FREEBIND / BINDANY socket options
+#
+# non-local-bind=no
+
+#################################
+# only-notify Only send AXFR NOTIFY to these IP addresses or netmasks
+#
+# only-notify=0.0.0.0/0,::/0
+
+#################################
+# out-of-zone-additional-processing Do out of zone additional processing
+#
+# out-of-zone-additional-processing=yes
+
+#################################
+# outgoing-axfr-expand-alias Expand ALIAS records during outgoing AXFR
+#
+# outgoing-axfr-expand-alias=no
+
+#################################
+# overload-queue-length Maximum queuelength moving to packetcache only
+#
+# overload-queue-length=0
+
+#################################
+# prevent-self-notification Don't send notifications to what we think is ourself
+#
+# prevent-self-notification=yes
+
+#################################
+# query-cache-ttl Seconds to store query results in the QueryCache
+#
+# query-cache-ttl=20
+
+#################################
+# query-local-address Source IP address for sending queries
+#
+# query-local-address=0.0.0.0
+
+#################################
+# query-local-address6 Source IPv6 address for sending queries
+#
+# query-local-address6=::
+
+#################################
+# query-logging Hint backends that queries should be logged
+#
+# query-logging=no
+
+#################################
+# queue-limit Maximum number of milliseconds to queue a query
+#
+# queue-limit=1500
+
+#################################
+# receiver-threads Default number of receiver threads to start
+#
+# receiver-threads=1
+
+#################################
+# resolver Use this resolver for ALIAS and the internal stub resolver
+#
+# resolver=no
+
+#################################
+# retrieval-threads Number of AXFR-retrieval threads for slave operation
+#
+# retrieval-threads=2
+
+#################################
+# reuseport Enable higher performance on compliant kernels by using SO_REUSEPORT allowing each receiver thread to open its own socket
+#
+# reuseport=no
+
+#################################
+# security-poll-suffix Domain name from which to query security update notifications
+#
+# security-poll-suffix=secpoll.powerdns.com.
+
+#################################
+# server-id Returned when queried for 'id.server' TXT or NSID, defaults to hostname - disabled or custom
+#
+# server-id=
+
+#################################
+# setgid If set, change group id to this gid for more security
+#
+# setgid=
+
+#################################
+# setuid If set, change user id to this uid for more security
+#
+# setuid=
+
+#################################
+# signing-threads Default number of signer threads to start
+#
+# signing-threads=3
+
+#################################
+# slave Act as a slave
+#
+# slave=no
+
+#################################
+# slave-cycle-interval Schedule slave freshness checks once every .. seconds
+#
+# slave-cycle-interval=60
+
+#################################
+# slave-renotify If we should send out notifications for slaved updates
+#
+# slave-renotify=no
+
+#################################
+# soa-expire-default Default SOA expire
+#
+# soa-expire-default=604800
+
+#################################
+# soa-minimum-ttl Default SOA minimum ttl
+#
+# soa-minimum-ttl=3600
+
+#################################
+# soa-refresh-default Default SOA refresh
+#
+# soa-refresh-default=10800
+
+#################################
+# soa-retry-default Default SOA retry
+#
+# soa-retry-default=3600
+
+#################################
+# socket-dir Where the controlsocket will live, /var/run when unset and not chrooted
+#
+# socket-dir=
+
+#################################
+# tcp-control-address If set, PowerDNS can be controlled over TCP on this address
+#
+# tcp-control-address=
+
+#################################
+# tcp-control-port If set, PowerDNS can be controlled over TCP on this address
+#
+# tcp-control-port=53000
+
+#################################
+# tcp-control-range If set, remote control of PowerDNS is possible over these networks only
+#
+# tcp-control-range=127.0.0.0/8, 10.0.0.0/8, 192.168.0.0/16, 172.16.0.0/12, ::1/128, fe80::/10
+
+#################################
+# tcp-control-secret If set, PowerDNS can be controlled over TCP after passing this secret
+#
+# tcp-control-secret=
+
+#################################
+# tcp-fast-open Enable TCP Fast Open support on the listening sockets, using the supplied numerical value as the queue size
+#
+# tcp-fast-open=0
+
+#################################
+# tcp-idle-timeout Maximum time in seconds that a TCP DNS connection is allowed to stay open while being idle
+#
+# tcp-idle-timeout=5
+
+#################################
+# traceback-handler Enable the traceback handler (Linux only)
+#
+# traceback-handler=yes
+
+#################################
+# trusted-notification-proxy IP address of incoming notification proxy
+#
+# trusted-notification-proxy=
+
+#################################
+# udp-truncation-threshold Maximum UDP response size before we truncate
+#
+# udp-truncation-threshold=1680
+
+#################################
+# version-string PowerDNS version in packets - full, anonymous, powerdns or custom
+#
+# version-string=full
+
+#################################
+# webserver Start a webserver for monitoring (api=yes also enables the HTTP listener)
+#
+# webserver=no
+
+#################################
+# webserver-address IP Address of webserver/API to listen on
+#
+# webserver-address=127.0.0.1
+
+#################################
+# webserver-allow-from Webserver/API access is only allowed from these subnets
+#
+# webserver-allow-from=127.0.0.1,::1
+
+#################################
+# webserver-password Password required for accessing the webserver
+#
+# webserver-password=
+
+#################################
+# webserver-port Port of webserver/API to listen on
+#
+# webserver-port=8081
+
+#################################
+# webserver-print-arguments If the webserver should print arguments
+#
+# webserver-print-arguments=no
+
+#################################
+# write-pid Write a PID file
+#
+# write-pid=yes
+
+#################################
+# xfr-max-received-mbytes Maximum number of megabytes received from an incoming XFR
+#
+# xfr-max-received-mbytes=100
--- /dev/null
+#!/bin/sh /etc/rc.common
+START=99
+
+USE_PROCD=1
+
+start_service() {
+ [ -e /etc/powerdns/pdns.conf ] || return 1
+
+ procd_open_instance
+ procd_set_param command /usr/sbin/pdns_server --daemon=no --guardian=no
+ procd_set_param file /etc/powerdns/pdns.conf
+ procd_set_param respawn
+ procd_close_instance
+}
--- /dev/null
+--- a/pdns/Makefile.am
++++ b/pdns/Makefile.am
+@@ -54,7 +54,8 @@
+ bindparser.h \
+ named.conf.parsertest \
+ delaypipe.hh delaypipe.cc \
+- pdns.service.in
++ pdns.service.in \
++ lua_hpp.mk
+
+ BUILT_SOURCES = \
+ bind-dnssec.schema.sqlite3.sql.h \
+@@ -109,6 +108,12 @@
+
+ endif
+
++if !HAVE_LUA_HPP
++BUILT_SOURCES += lua.hpp
++nodist_pdns_server_SOURCES = lua.hpp
++CLEANFILES += lua.hpp
++endif
++
+ EXTRA_PROGRAMS = \
+ calidns \
+ comfun \
+@@ -1303,3 +1305,7 @@
+ pdns.service \
+ pdns@.service
+ endif
++
++if !HAVE_LUA_HPP
++include lua_hpp.mk
++endif
+--- /dev/null
++++ b/pdns/lua_hpp.mk
+@@ -0,0 +1,6 @@
++lua.hpp:
++ $(AM_V_GEN)echo 'extern "C" {' > $@
++ @echo '#include "lua.h"' >> $@
++ @echo '#include "lualib.h"' >> $@
++ @echo '#include "lauxlib.h"' >> $@
++ @echo '}' >> $@
+--- a/modules/luabackend/Makefile.am
++++ b/modules/luabackend/Makefile.am
+@@ -15,5 +15,15 @@
+ slave.cc \
+ supermaster.cc
+
++if !HAVE_LUA_HPP
++BUILT_SOURCES = lua.hpp
++nodist_libluabackend_la_SOURCES = lua.hpp
++CLEANFILES = lua.hpp
++endif
++
+ libluabackend_la_LDFLAGS = -module -avoid-version
+ libluabackend_la_LIBADD = $(LUA_LIBS)
++
++if !HAVE_LUA_HPP
++include ../../pdns/lua_hpp.mk
++endif
--- /dev/null
+--- a/pdns/Makefile.am
++++ b/pdns/Makefile.am
+@@ -68,11 +68,9 @@
+ backends/gsql/gsqlbackend.gcda \
+ backends/gsql/gsqlbackend.gcno \
+ backends/gsql/gsqlbackend.gcov \
+- dnsmessage.pb.cc dnsmessage.pb.h \
+- pdns.conf-dist
++ dnsmessage.pb.cc dnsmessage.pb.h
+
+ noinst_SCRIPTS = pdns.init
+-sysconf_DATA = pdns.conf-dist
+
+ sbin_PROGRAMS = pdns_server
+ bin_PROGRAMS = \
+@@ -1124,9 +1122,6 @@
+ endif
+ endif
+
+-pdns.conf-dist: pdns_server
+- $(AM_V_GEN)./pdns_server --no-config --config 2>/dev/null > $@
+-
+ testrunner_SOURCES = \
+ arguments.cc \
+ auth-caches.cc auth-caches.hh \
--- /dev/null
+--- a/m4/pdns_check_os.m4
++++ b/m4/pdns_check_os.m4
+@@ -35,16 +35,21 @@
+ AM_CONDITIONAL([HAVE_LINUX], [test "x$have_linux" = "xyes"])
+ AM_CONDITIONAL([HAVE_SOLARIS], [test "x$have_solaris" = "xyes"])
+
+- case "$host" in
+- mips* | powerpc-* )
+- AC_MSG_CHECKING([whether the linker accepts -latomic])
+- LDFLAGS="-latomic $LDFLAGS"
+- AC_LINK_IFELSE([m4_default([],[AC_LANG_PROGRAM()])],
+- [AC_MSG_RESULT([yes])],
+- [AC_MSG_ERROR([Unable to link against libatomic, cannot continue])]
+- )
+- ;;
+- esac
++ AC_MSG_CHECKING([whether -latomic is needed for __atomic builtins])
++ AC_LINK_IFELSE(
++ [AC_LANG_PROGRAM([[#include <stdint.h>]],
++ [[uint64_t val = 0; __atomic_add_fetch(&val, 1, __ATOMIC_RELAXED);]]
++ )],
++ [AC_MSG_RESULT([no])],
++ [LIBS="$LIBS -latomic"
++ AC_LINK_IFELSE(
++ [AC_LANG_PROGRAM([[#include <stdint.h>]],
++ [[uint64_t val = 0; __atomic_add_fetch(&val, 1, __ATOMIC_RELAXED);]]
++ )],
++ [AC_MSG_RESULT([yes])],
++ [AC_MSG_FAILURE([libatomic needed, but linking with -latomic failed, cannot continue])]
++ )]
++ )
+
+ AC_SUBST(THREADFLAGS)
+ AC_SUBST([DYNLINKFLAGS], [-export-dynamic])
--- /dev/null
+--- a/build-aux/gen-version
++++ b/build-aux/gen-version
+@@ -1,39 +1,4 @@
+ #!/bin/sh
+-VERSION="unknown"
+-
+-DIRTY=""
+-git status | grep -q clean || DIRTY='.dirty'
+-
+-# Special environment variable to signal that we are building a release, as this
+-# has consequences for the version number.
+-if [ "${IS_RELEASE}" = "YES" ]; then
+- TAG="$(git describe --tags --exact-match 2> /dev/null | cut -d- -f 2-)"
+- if [ -n "${TAG}" ]; then
+- # We're on a tag
+- echo "${TAG}${DIRTY}" > .version
+- printf "${TAG}${DIRTY}"
+- exit 0
+- fi
+- echo 'This is not a tag, either tag this commit or do not set $IS_RELEASE' >&2
+- exit 1
+-fi
+-
+-#
+-# Generate the version number based on the branch
+-#
+-if [ ! -z "$(git rev-parse --abbrev-ref HEAD 2> /dev/null)" ]; then
+- if $(git rev-parse --abbrev-ref HEAD | grep -q 'rel/'); then
+- REL_TYPE="$(git rev-parse --abbrev-ref HEAD | cut -d/ -f 2 | cut -d- -f 1)"
+- VERSION="$(git describe --match=${REL_TYPE}-* --tags --dirty=.dirty | cut -d- -f 2-)"
+- else
+- GIT_VERSION=$(git show --no-patch --format=format:%h HEAD)
+- BRANCH=".$(git rev-parse --abbrev-ref HEAD | perl -p -e 's/[^[:alnum:]]//g;')"
+- [ "${BRANCH}" = ".master" ] && BRANCH=''
+- VERSION="0.0${BRANCH}.${PDNS_BUILD_NUMBER}g${GIT_VERSION}${DIRTY}"
+- fi
+- echo "$VERSION" > .version
+-elif [ -f .version ]; then
+- VERSION="$(cat .version)"
+-fi
++VERSION="$(cat .version)"
+
+ printf $VERSION
--- /dev/null
+From 7ac0df2a59ddd6e92ede2bca590ec0c76eb67559 Mon Sep 17 00:00:00 2001
+From: James Taylor <james@jtaylor.id.au>
+Date: Tue, 25 Jun 2019 19:33:04 +1000
+Subject: [PATCH] auth: make sure we really are using glibc
+
+Make sure we're using glibc and not uclibc pretending to be glibc
+---
+ pdns/receiver.cc | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/pdns/receiver.cc b/pdns/receiver.cc
+index e6686787b3..209db7af89 100644
+--- a/pdns/receiver.cc
++++ b/pdns/receiver.cc
+@@ -354,7 +354,7 @@ static int guardian(int argc, char **argv)
+ }
+ }
+
+-#ifdef __GLIBC__
++#if defined(__GLIBC__) && !defined(__UCLIBC__)
+ #include <execinfo.h>
+ static void tbhandler(int num)
+ {
+@@ -386,7 +386,7 @@ int main(int argc, char **argv)
+ s_programname="pdns";
+ s_starttime=time(0);
+
+-#ifdef __GLIBC__
++#if defined(__GLIBC__) && !defined(__UCLIBC__)
+ signal(SIGSEGV,tbhandler);
+ signal(SIGFPE,tbhandler);
+ signal(SIGABRT,tbhandler);
+@@ -450,7 +450,7 @@ int main(int argc, char **argv)
+
+ // we really need to do work - either standalone or as an instance
+
+-#ifdef __GLIBC__
++#if defined(__GLIBC__) && !defined(__UCLIBC__)
+ if(!::arg().mustDo("traceback-handler")) {
+ g_log<<Logger::Warning<<"Disabling traceback handler"<<endl;
+ signal(SIGSEGV,SIG_DFL);
#
-# Copyright (c) 2015 OpenWrt.org
+# Copyright (c) 2019 OpenWrt.org
#
# This is free software, licensed under the BSD 2-Clause License.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=port-mirroring
-PKG_VERSION:=1.4.3
-PKG_RELEASE:=1
+PKG_VERSION:=1.4.4
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/mmaraya/port-mirroring/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=90603163fb086cc586a711e066360ccfa5b4735f67586e8f9254e93f3bebb97e
+PKG_HASH:=9fb259d24cee4fe1bed1a51c49e52a8eb05b692ba1b5debb75fdf54957cc8ed1
PKG_MAINTAINER:=Mike Maraya <mike.maraya@gmail.com>
PKG_LICENSE:=BSD-2-Clause
+++ /dev/null
-diff --git a/include/config.h b/include/config.h
-index 5212c69..ac948ba 100644
---- a/include/config.h
-+++ b/include/config.h
-@@ -1,69 +1,69 @@
--/* \r
-- * Copyright (c) 2015 Mike Maraya <mike[dot]maraya[at]gmail[dot]com>\r
-- * All rights reserved.\r
-- *\r
-- * This file is subject to the terms and conditions defined in\r
-- * https://github.com/mmaraya/port-mirroring/blob/master/LICENSE,\r
-- * which is part of this software package.\r
-- *\r
-- */\r
--\r
--#ifndef PORT_MIRRORING_UTIL_H_\r
--#define PORT_MIRRORING_UTIL_H_\r
--\r
--#include <errno.h>\r
--#include <net/if.h>\r
--#include <netinet/in.h>\r
--#include <stdint.h>\r
--#include <stdio.h>\r
--#include <stdlib.h>\r
--#include <string.h>\r
--#include <syslog.h>\r
--#include <linux/limits.h>\r
--\r
--#define OPTION_MAX 254 /* max value for program options */\r
--#define TIMEBUF 32 /* max timestamp length RFC3339 */\r
--#define SRC_MAX 4 /* maxium number of source network interfaces */\r
--#define PFE_MAX 80 /* maximum length of packet filter expression */\r
--#define MACADDRLEN 6 /* length of a MAC address */\r
--\r
--// port-mirroring configuration bit flags\r
--#define PM_DAEMON 0x01 /* run as background process */\r
--#define PM_DEBUG 0x02 /* display debugging messages to console */\r
--#define PM_TZSP 0x04 /* send packets using TaZmen Sniffer Protocol */\r
--#define PM_DST_IF 0x08 /* destination is a network interface */\r
--#define PM_DST_IP 0x10 /* destination is an internet protocol address */\r
--#define PM_PROMISC 0x20 /* place source interface in promiscuous mode */\r
--#define PM_SYSLOG 0x40 /* log messages to syslog facility */\r
--\r
--// if no configuration file is specified, look through these in order\r
--#define CFG_PATH_1 "/etc/config/port-mirroring"\r
--#define CFG_PATH_2 "/etc/port-mirroring"\r
--#define CFG_PATH_3 "port-mirroring.conf"\r
--\r
--// default program id file\r
--#define PID_PATH "/var/run/port-mirroring.pid"\r
--\r
--// program-wide configuration settings and variables\r
--struct pm_cfg\r
--{\r
-- char *cfg_file; /* path to configuration file */\r
-- uint8_t flags; /* boolean setting bitmask */\r
-- char src[SRC_MAX][IFNAMSIZ]; /* source network interfaces */\r
-- char dst_if[IFNAMSIZ]; /* destination network interface */\r
-- in_addr_t dst_ip; /* destination IP address */\r
-- char pfe[PFE_MAX]; /* tcpdump packet filter expression */\r
-- char *pid_file; /* path to process id file */\r
-- int src_count; /* number of source ports */\r
-- char src_mac[MACADDRLEN]; /* source MAC address */\r
-- char dst_mac[MACADDRLEN]; /* destination MAC address */\r
-- time_t init_time; /* used to check for timeouts */\r
-- int packet_count; /* number of packets processed */\r
--};\r
--\r
--void find_cfg(struct pm_cfg *cfg);\r
--char * printMACStr(const char *mac);\r
--char * getUCIItem(char *buf, char *item);\r
--int getUCIConf(char *buf, char *option, char *value);\r
--\r
--#endif // PORT_MIRRORING_UTIL_H_\r
-+/*
-+ * Copyright (c) 2015 Mike Maraya <mike[dot]maraya[at]gmail[dot]com>
-+ * All rights reserved.
-+ *
-+ * This file is subject to the terms and conditions defined in
-+ * https://github.com/mmaraya/port-mirroring/blob/master/LICENSE,
-+ * which is part of this software package.
-+ *
-+ */
-+
-+#ifndef PORT_MIRRORING_UTIL_H_
-+#define PORT_MIRRORING_UTIL_H_
-+
-+#include <errno.h>
-+#include <net/if.h>
-+#include <netinet/in.h>
-+#include <stdint.h>
-+#include <stdio.h>
-+#include <stdlib.h>
-+#include <string.h>
-+#include <syslog.h>
-+#include <linux/limits.h>
-+
-+#define OPTION_MAX 254 /* max value for program options */
-+#define TIMEBUF 32 /* max timestamp length RFC3339 */
-+#define SRC_MAX 4 /* maxium number of source network interfaces */
-+#define PFE_MAX 80 /* maximum length of packet filter expression */
-+#define MACADDRLEN 6 /* length of a MAC address */
-+
-+// port-mirroring configuration bit flags
-+#define PM_DAEMON 0x01 /* run as background process */
-+#define PM_DEBUG 0x02 /* display debugging messages to console */
-+#define PM_TZSP 0x04 /* send packets using TaZmen Sniffer Protocol */
-+#define PM_DST_IF 0x08 /* destination is a network interface */
-+#define PM_DST_IP 0x10 /* destination is an internet protocol address */
-+#define PM_PROMISC 0x20 /* place source interface in promiscuous mode */
-+#define PM_SYSLOG 0x40 /* log messages to syslog facility */
-+
-+// if no configuration file is specified, look through these in order
-+#define CFG_PATH_1 "/etc/config/port-mirroring"
-+#define CFG_PATH_2 "/etc/port-mirroring"
-+#define CFG_PATH_3 "port-mirroring.conf"
-+
-+// default program id file
-+#define PID_PATH "/var/run/port-mirroring.pid"
-+
-+// program-wide configuration settings and variables
-+struct pm_cfg
-+{
-+ char *cfg_file; /* path to configuration file */
-+ uint8_t flags; /* boolean setting bitmask */
-+ char src[SRC_MAX][IFNAMSIZ]; /* source network interfaces */
-+ char dst_if[IFNAMSIZ]; /* destination network interface */
-+ in_addr_t dst_ip; /* destination IP address */
-+ char pfe[PFE_MAX]; /* tcpdump packet filter expression */
-+ char *pid_file; /* path to process id file */
-+ int src_count; /* number of source ports */
-+ char src_mac[MACADDRLEN]; /* source MAC address */
-+ char dst_mac[MACADDRLEN]; /* destination MAC address */
-+ time_t init_time; /* used to check for timeouts */
-+ int packet_count; /* number of packets processed */
-+};
-+
-+void find_cfg(struct pm_cfg *cfg);
-+char * printMACStr(const char *mac);
-+char * getUCIItem(char *buf, char *item);
-+int getUCIConf(char *buf, char *option, char *value);
-+
-+#endif // PORT_MIRRORING_UTIL_H_
--- /dev/null
+--- a/src/main.c
++++ b/src/main.c
+@@ -90,7 +90,7 @@ int loadCfg(const char *fpath)
+ }
+ else
+ {
+- snprintf(cfg.dst_if, IFNAMSIZ, "%s", value);
++ strncpy(cfg.dst_if, value, IFNAMSIZ);
+ cfg.flags |= PM_DST_IF;
+ }
+ }
+@@ -104,7 +104,7 @@ int loadCfg(const char *fpath)
+ }
+ else if (strcmp(option, "filter") == 0)
+ {
+- snprintf(cfg.pfe, PFE_MAX, "%s", value);
++ strncpy(cfg.pfe, value, PFE_MAX);
+ }
+ else if (strcmp(option, "promiscuous") == 0)
+ {
+++ /dev/null
-diff --git a/include/config.h b/include/config.h
-index ac948ba..da93160 100644
---- a/include/config.h
-+++ b/include/config.h
-@@ -19,6 +19,7 @@
- #include <stdlib.h>
- #include <string.h>
- #include <syslog.h>
-+#include <time.h>
- #include <linux/limits.h>
-
- #define OPTION_MAX 254 /* max value for program options */
CATEGORY:=Network
TITLE:=PPPoSSH (Point-to-Point Protocol over SSH)
DEPENDS:=+ppp +resolveip @(PACKAGE_dropbear||PACKAGE_openssh-client)
+ PKGARCH:=all
endef
define Package/pppossh/description
PKG_NAME:=pptpd
PKG_VERSION:=1.4.0
-PKG_RELEASE:=3
+PKG_RELEASE:=5
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/poptop
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
-PKG_MAINTAINER:=Luka Perkov <luka@openwrt.org>
-
include $(INCLUDE_DIR)/package.mk
define Package/pptpd
OPTIONS_PPTP=/var/etc/options.pptpd
validate_login_section() {
- uci_validate_section pptpd login "${1}" \
+ uci_load_validate pptpd login "$1" "$2" \
'username:string' \
- 'password:string'
+ 'password:string' \
+ 'remoteip:string'
}
validate_pptpd_section() {
- uci_validate_section pptpd service "${1}" \
+ uci_load_validate pptpd service "$1" "$2" \
'enabled:uinteger' \
'localip:string' \
'remoteip:string' \
}
setup_login() {
- validate_login_section "${1}" || {
+ [ "$2" = 0 ] || {
echo "validation failed"
return 1
}
- [ -n "${username}" ] || return 0
- [ -n "${password}" ] || return 0
+ [ -n "$username" ] || return 0
+ [ -n "$password" ] || return 0
+ [ -n "$remoteip" ] || remoteip=*
- echo "${username} pptp-server ${password} *" >> $CHAP_SECRETS
+ echo "$username pptp-server $password $remoteip" >> $CHAP_SECRETS
}
setup_config() {
- local enabled localip remoteip mppe
-
- validate_pptpd_section "${1}" || {
+ [ "$2" = 0 ] || {
echo "validation failed"
return 1
}
start_service() {
config_load pptpd
- setup_config pptpd || return
- config_foreach setup_login login
+ validate_pptpd_section pptpd setup_config || return
+ config_foreach validate_login_section login setup_login
ln -sfn $CHAP_SECRETS /etc/ppp/chap-secrets
procd_set_param command $BIN -c $CONFIG --fg -o $OPTIONS_PPTP
procd_close_instance
}
+
+service_triggers () {
+ procd_add_reload_trigger "pptpd"
+
+ procd_open_validate
+ validate_pptpd_section
+ validate_login_section
+ procd_close_validate
+}
include $(TOPDIR)/rules.mk
PKG_NAME:=privoxy
-PKG_VERSION:=3.0.26
-PKG_RELEASE:=4
+PKG_VERSION:=3.0.28
+PKG_RELEASE:=1
PKG_SOURCE:=privoxy-$(PKG_VERSION)-stable-src.tar.gz
PKG_SOURCE_URL:=@SF/ijbswa
-PKG_HASH:=57e415b43ee5dfdca74685cc034053eaae962952fdabd086171551a86abf9cd8
+PKG_HASH:=b5d78cc036aaadb3b7cf860e9d598d7332af468926a26e2d56167f1cb6f2824a
PKG_BUILD_DIR:=$(BUILD_DIR)/privoxy-$(PKG_VERSION)-stable
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
include $(TOPDIR)/rules.mk
PKG_NAME:=prosody
-PKG_VERSION:=0.9.12
-PKG_RELEASE:=1
+PKG_VERSION:=0.11.2
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://prosody.im/downloads/source
-PKG_HASH:=1a59a322b71928a21985522aa00d0eab3552208d7bf9ecb318542a1b2fee3e8d
+PKG_SOURCE_URL:=https://prosody.im/downloads/source
+PKG_HASH:=8911f6dc29b9e0c4edf9e61dc23fa22d77bc42c4caf28b809ab843b2f08e4831
PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>
PKG_LICENSE:=MIT/X11
+PKG_BUILD_DEPENDS:=lua/host
+PKG_CPE_ID:=cpe:/a:prosody:prosody
+HOST_BUILD_DEPENDS:=$(PKG_BUILD_DEPENDS)
PKG_INSTALL:=1
SECTION:=net
CATEGORY:=Network
SUBMENU:=Instant Messaging
- DEPENDS:=+luafilesystem +libidn +luaexpat +luasec +libopenssl +libidn +liblua
+ DEPENDS:=+luafilesystem +libidn +luaexpat +luasec +libopenssl +libidn +liblua +luabitop
TITLE:=XMPP server
- URL:=http://prosody.im/
+ URL:=https://prosody.im/
USERID:=prosody=54:prosody=54
endef
/etc/prosody/prosody.cfg.lua
endef
-TARGET_CFLAGS += $(FPIC)
-
-TARGET_LDFLAGS += -L$(STAGING_DIR)/usr/lib
+TARGET_CFLAGS += $(FPIC) -std=gnu99
+TARGET_LDFLAGS += -shared
+MAKE_FLAGS += LD="$(TARGET_CC)"
define Build/Configure
# this is *NOT* GNU autoconf stuff
(cd $(PKG_BUILD_DIR); ./configure \
--prefix=/usr \
- --with-lua="$(STAGING_DIR_HOSTPKG)/bin" \
+ --with-lua="$(STAGING_DIR_HOSTPKG)" \
--with-lua-include="$(STAGING_DIR)/usr/include" \
--with-lua-lib="$(STAGING_DIR)/usr/lib" \
--cflags="$(TARGET_CFLAGS)" \
- --ldflags="$(TARGET_LDFLAGS) -llua -lm -ldl -shared" \
+ --ldflags="$(TARGET_LDFLAGS)" \
--c-compiler="$(CC)" \
- --linker="$(LD)" \
--datadir="/etc/prosody/data" \
)
endef
-# LDFLAGS="$(TARGET_LDFLAGS) -llua -lm -ldl" \
-
-MAKE_FLAGS += \
- CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -std=gnu99" \
- PREFIX="/usr" \
define Package/prosody/install
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/prosody/prosody.version $(1)/usr/lib/prosody/
$(INSTALL_DIR) $(1)/usr/lib/prosody/core
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/core/*.lua $(1)/usr/lib/prosody/core/
- $(INSTALL_DIR) $(1)/usr/lib/prosody/fallbacks
+ #$(INSTALL_DIR) $(1)/usr/lib/prosody/fallbacks
#$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/fallbacks/*.lua $(1)/usr/lib/prosody/fallbacks/
$(INSTALL_DIR) $(1)/usr/lib/prosody/modules
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/modules/*.lua $(1)/usr/lib/prosody/modules/
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/modules/mod_s2s/*.lua $(1)/usr/lib/prosody/modules/mod_s2s/
$(INSTALL_DIR) $(1)/usr/lib/prosody/modules/muc
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/modules/muc/*.lua $(1)/usr/lib/prosody/modules/muc/
- $(INSTALL_DIR) $(1)/usr/lib/prosody/modules/storage
- $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/modules/storage/*.lua $(1)/usr/lib/prosody/modules/storage/
+ $(INSTALL_DIR) $(1)/usr/lib/prosody/modules/mod_pubsub
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/modules/mod_pubsub/*.lua $(1)/usr/lib/prosody/modules/mod_pubsub/
+ $(INSTALL_DIR) $(1)/usr/lib/prosody/modules/mod_mam
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/modules/mod_mam/*.lua $(1)/usr/lib/prosody/modules/mod_mam/
+ #$(INSTALL_DIR) $(1)/usr/lib/prosody/modules/storage
+ #$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/modules/storage/*.lua $(1)/usr/lib/prosody/modules/storage/
$(INSTALL_DIR) $(1)/usr/lib/prosody/net
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/net/*.lua $(1)/usr/lib/prosody/net/
$(INSTALL_DIR) $(1)/usr/lib/prosody/net/http
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/net/http/*.lua $(1)/usr/lib/prosody/net/http/
+ $(INSTALL_DIR) $(1)/usr/lib/prosody/net/resolvers
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/net/resolvers/*.lua $(1)/usr/lib/prosody/net/resolvers/
+ $(INSTALL_DIR) $(1)/usr/lib/prosody/net/websocket
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/net/websocket/*.lua $(1)/usr/lib/prosody/net/websocket/
$(INSTALL_DIR) $(1)/usr/lib/prosody/util
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/util/*.lua $(1)/usr/lib/prosody/util/
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/prosody/util/*.so $(1)/usr/lib/prosody/util/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/prosody/util/*.so $(1)/usr/lib/prosody/util/
$(INSTALL_DIR) $(1)/usr/lib/prosody/util/sasl
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/util/sasl/*.lua $(1)/usr/lib/prosody/util/sasl/
- #$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/prosody/util/sasl/*.so $(1)/usr/lib/prosody/util/sasl/
+ #$(CP) $(PKG_INSTALL_DIR)/usr/lib/prosody/util/sasl/*.so $(1)/usr/lib/prosody/util/sasl/
endef
define Package/prosody/postinst
paxctl -v /usr/bin/ > /dev/null 2>&1
[ $$? -ne 0 ] && {
cp /usr/bin/lua /tmp
- paxctl -c -m /tmp/lua > /dev/null 2>&1
+ paxctl -c -m /tmp/lua > /dev/null 2>&1
cp -f /tmp/lua /usr/bin/lua
}
}
-- Prosody Example Configuration File
--
-- Information on configuring Prosody can be found on our
--- website at http://prosody.im/doc/configure
+-- website at https://prosody.im/doc/configure
--
-- Tip: You can check that the syntax of this file is correct
--- when you have finished by running: luac -p prosody.cfg.lua
+-- when you have finished by running this command:
+-- prosodyctl check config
-- If there are any errors, it will let you know what and where
-- they are, otherwise it will keep quiet.
--
-- This is a (by default, empty) list of accounts that are admins
-- for the server. Note that you must create the accounts separately
--- (see http://prosody.im/doc/creating_accounts for info)
+-- (see https://prosody.im/doc/creating_accounts for info)
-- Example: admins = { "user1@example.com", "user2@example.net" }
admins = { }
-- Enable use of libevent for better performance under high load
--- For more information see: http://prosody.im/doc/libevent
---use_libevent = true;
+-- For more information see: https://prosody.im/doc/libevent
+--use_libevent = true
+
+-- Prosody will always look in its source directory for modules, but
+-- this option allows you to specify additional locations where Prosody
+-- will look for modules first. For community modules, see https://modules.prosody.im/
+--plugin_paths = {}
-- This is the list of modules Prosody will load on startup.
-- It looks for mod_modulename.lua in the plugins folder, so make sure that exists too.
"disco"; -- Service discovery
-- Not essential, but recommended
+ "carbons"; -- Keep multiple clients in sync
+ "pep"; -- Enables users to publish their avatar, mood, activity, playing music and more
"private"; -- Private XML storage (for room bookmarks, etc.)
- "vcard"; -- Allow users to set vCards
- --"privacy"; -- Support privacy lists
- --"compression"; -- Stream compression
+ "blocklist"; -- Allow users to block communications with other users
+ "vcard4"; -- User profiles (stored in PEP)
+ "vcard_legacy"; -- Conversion between legacy vCard and PEP Avatar, vcard
-- Nice to have
- "legacyauth"; -- Legacy authentication. Only used by some old clients and bots.
"version"; -- Replies to server version requests
"uptime"; -- Report how long server has been running
"time"; -- Let others know the time here on this server
"ping"; -- Replies to XMPP pings with pongs
- "pep"; -- Enables users to publish their mood, activity, playing music and more
"register"; -- Allow users to register on this server using a client and change passwords
- "adhoc"; -- Support for "ad-hoc commands" that can be executed with an XMPP client
+ --"mam"; -- Store messages in an archive and allow users to access it
+ --"csi_simple"; -- Simple Mobile optimizations
-- Admin interfaces
"admin_adhoc"; -- Allows administration via an XMPP client that supports ad-hoc commands
--"admin_telnet"; -- Opens telnet console interface on localhost port 5582
- -- Other specific functionality
- "posix"; -- POSIX functionality, sends server to background, enables syslog, etc.
+ -- HTTP modules
--"bosh"; -- Enable BOSH clients, aka "Jabber over HTTP"
- --"httpserver"; -- Serve static files from a directory over HTTP
+ --"websocket"; -- XMPP over WebSockets
+ --"http_files"; -- Serve static files from a directory over HTTP
+
+ -- Other specific functionality
+ --"limits"; -- Enable bandwidth limiting for XMPP connections
--"groups"; -- Shared roster support
+ --"server_contact_info"; -- Publish contact information for this service
--"announce"; -- Send announcement to all online users
--"welcome"; -- Welcome users who register accounts
--"watchregistrations"; -- Alert admins of registrations
--"motd"; -- Send a message to users when they log in
-};
+ --"legacyauth"; -- Legacy authentication. Only used by some old clients and bots.
+ --"proxy65"; -- Enables a file transfer proxy service which clients behind NAT can use
+}
--- These modules are auto-loaded, should you
--- (for some mad reason) want to disable
--- them then uncomment them below
+-- These modules are auto-loaded, but should you want
+-- to disable them then uncomment them here:
modules_disabled = {
- -- "presence"; -- Route user/contact status information
- -- "message"; -- Route messages
- -- "iq"; -- Route info queries
-- "offline"; -- Store offline messages
-};
+ -- "c2s"; -- Handle client connections
+ -- "s2s"; -- Handle server-to-server connections
+ -- "posix"; -- POSIX functionality, sends server to background, enables syslog, etc.
+}
-- Disable account creation by default, for security
--- For more information see http://prosody.im/doc/creating_accounts
-allow_registration = false;
+-- For more information see https://prosody.im/doc/creating_accounts
+allow_registration = false
+
+-- Force clients to use encrypted connections? This option will
+-- prevent clients from authenticating unless they are using encryption.
+
+c2s_require_encryption = true
+
+-- Force servers to use encrypted connections? This option will
+-- prevent servers from authenticating unless they are using encryption.
+
+s2s_require_encryption = true
+
+-- Force certificate authentication for server-to-server connections?
--- Only allow encrypted streams? Encryption is already used when
--- available. These options will cause Prosody to deny connections that
--- are not encrypted. Note that some servers do not support s2s
--- encryption or have it disabled, including gmail.com and Google Apps
--- domains.
+s2s_secure_auth = false
---c2s_require_encryption = false
---s2s_require_encryption = false
+-- Some servers have invalid or self-signed certificates. You can list
+-- remote domains here that will not be required to authenticate using
+-- certificates. They will be authenticated using DNS instead, even
+-- when s2s_secure_auth is enabled.
+
+--s2s_insecure_domains = { "insecure.example" }
+
+-- Even if you disable s2s_secure_auth, you can still require valid
+-- certificates for some domains by specifying a list here.
+
+--s2s_secure_domains = { "jabber.org" }
-- Select the authentication backend to use. The 'internal' providers
-- use Prosody's configured data storage to store the authentication data.
--- To allow Prosody to offer secure authentication mechanisms to clients, the
--- default provider stores passwords in plaintext. If you do not trust your
--- server please see http://prosody.im/doc/modules/mod_auth_internal_hashed
--- for information about using the hashed backend.
--- See http://prosody.im/doc/authentication for other possibilities including
--- Cyrus SASL.
-authentication = "internal_plain"
+authentication = "internal_hashed"
-- Select the storage backend to use. By default Prosody uses flat files
-- in its configured data directory, but it also supports more backends
-- through modules. An "sql" backend is included by default, but requires
--- additional dependencies. See http://prosody.im/doc/storage for more info.
+-- additional dependencies. See https://prosody.im/doc/storage for more info.
--storage = "sql" -- Default is "internal"
--sql = { driver = "MySQL", database = "prosody", username = "prosody", password = "secret", host = "localhost" }
--sql = { driver = "PostgreSQL", database = "prosody", username = "prosody", password = "secret", host = "localhost" }
+-- Archiving configuration
+-- If mod_mam is enabled, Prosody will store a copy of every message. This
+-- is used to synchronize conversations between multiple clients, even if
+-- they are offline. This setting controls how long Prosody will keep
+-- messages in the archive before removing them.
+
+archive_expires_after = "1w" -- Remove archived messages after 1 week
+
+-- You can also configure messages to be stored in-memory only. For more
+-- archiving options, see https://prosody.im/doc/modules/mod_mam
+
-- Logging configuration
-- For advanced logging see http://prosody.im/doc/logging
log = {
-- "*console"; -- Log to the console, useful for debugging with daemonize=false
}
+-- Uncomment to enable statistics
+-- For more info see https://prosody.im/doc/statistics
+-- statistics = "internal"
+
-- Pidfile, used by prosodyctl and the init.d script
pidfile = "/var/run/prosody/prosody.pid"
prosody_user = "prosody"
prosody_group = "prosody"
+-- Certificates
+-- Every virtual host and component needs a certificate so that clients and
+-- servers can securely verify its identity. Prosody will automatically load
+-- certificates/keys from the directory specified here.
+-- For more information, including how to use 'prosodyctl' to auto-import certificates
+-- (from e.g. Let's Encrypt) see https://prosody.im/doc/certificates
+
+-- Location of directory to find certificates in (relative to main config file):
+--certificates = "certs"
+
+-- HTTPS currently only supports a single certificate, specify it here:
+--https_certificate = "certs/localhost.crt"
+
----------- Virtual hosts -----------
-- You need to add a VirtualHost entry for each domain you wish Prosody to serve.
-- Settings under each VirtualHost entry apply *only* to that host.
---Set up a MUC (multi-user chat) room server on conference.example.com:
--Component "conference.example.com" "muc"
-
-- Set up a SOCKS5 bytestream proxy for server-proxied file transfers:
--Component "proxy.example.com" "proxy65"
+--- Store MUC messages in an archive and allow users to access it
+--modules_enabled = { "muc_mam" }
---Set up an external component (default component port is 5347)
--
include $(TOPDIR)/rules.mk
PKG_NAME:=ptunnel-ng
-PKG_VERSION:=1.32
+PKG_VERSION:=1.42
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/lnslbrty/ptunnel-ng/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=0e51f6fa2fb5b11e9cd5303e450a4e236e4688560ad2a14b0b6e01e9fc2970db
+PKG_HASH:=5ee6b101e4e252ea98e3337da6542d73b7f33de49a89014276cc98a70142ab10
PKG_LICENSE:=BSD-3
PKG_LICENSE_FILES:=COPYING
CONFIGURE_ARGS += \
--disable-pcap \
- --disable-selinux
+ --disable-selinux \
+ --with-rngdev=/dev/urandom
define Package/ptunnel-ng/install
$(INSTALL_DIR) $(1)/usr/sbin
PKG_NAME:=quassel-irssi
PKG_SOURCE_DATE:=2017-11-30
PKG_SOURCE_VERSION:=079be662dde374a383646256108a4974c2bc7796
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_DATE).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/phhusson/quassel-irssi/tar.gz/$(PKG_SOURCE_VERSION)?
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/nls.mk
MAKE_PATH := core
MAKE_VARS += SYSTEM_QUASSELC=1 IRSSI_CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" IRSSI_INCLUDE=$(STAGING_DIR)/usr/include/irssi
endif
-CFLAGS=-std=gnu11 -Wall -Wextra -Werror -g -O2 $(IRSSI_CFLAGS) $(QUASSELC_FLAGS) -Wmissing-prototypes -Wmissing-declarations
-+CFLAGS+=-std=gnu11 -Wall -Wextra -Werror -g $(IRSSI_CFLAGS) $(QUASSELC_FLAGS) -Wmissing-prototypes -Wmissing-declarations
++CFLAGS+=-std=gnu11 -Wall -Wextra -g $(IRSSI_CFLAGS) $(QUASSELC_FLAGS) -Wmissing-prototypes -Wmissing-declarations
CFLAGS += $(SSL_CFLAGS)
LDFLAGS+= $(SSL_LDLAGS)
PKG_NAME:=radicale
PKG_VERSION:=1.1.6
-PKG_RELEASE:=2
-PKG_MAINTAINER:=
+PKG_RELEASE:=3
+
+PKG_SOURCE:=Radicale-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/R/Radicale
+PKG_HASH:=c007198ea45ef797344672c681d4c13f8b4aa85c15c41a1156225767a405c92b
+PKG_BUILD_DIR:=$(BUILD_DIR)/Radicale-$(PKG_VERSION)
+
+PKG_MAINTAINER:=
PKG_LICENSE:=GPL-3.0
PKG_LICENSE_FILES:=COPYING
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL=https://github.com/Kozea/Radicale
-PKG_SOURCE_VERSION:=7568ec39f09a753217fb2d525c5f8db64f4d98f4
-PKG_MIRROR_HASH:=73de51e296479f860d4d8cd383a6aa34e8c702d9fca63b0499c7fcc2e794e6df
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_SOURCE_SUBDIR=$(PKG_NAME)-$(PKG_VERSION)
-
include $(INCLUDE_DIR)/package.mk
-include ../../lang/python/python-package.mk
include ../../lang/python/python3-package.mk
-# no default dependencies
-PKG_DEFAULT_DEPENDS:=
-
-define Package/radicale/Default
+define Package/radicale
SECTION:=net
CATEGORY:=Network
SUBMENU:=Web Servers/Proxies
- URL:=http://radicale.org/
TITLE:=Radicale CalDAV/CardDAV server
- PKGARCH:=all
+ URL:=https://radicale.org/
+ DEPENDS:= \
+ +python3-light \
+ +python3-codecs \
+ +python3-logging \
+ +python3-openssl \
+ +python3-urllib \
+ +python3-xml
USERID:=radicale=5232:radicale=5232
-endef
-define Package/radicale-py2
- $(call Package/radicale/Default)
- TITLE+= (Python 2)
- VARIANT:=2
- DEPENDS:=+python-logging +python-openssl +python-xml +python-codecs
-endef
-define Package/radicale-py3
- $(call Package/radicale/Default)
- TITLE+= (Python 3)
- VARIANT:=3
- DEPENDS:=+python3-logging +python3-openssl +python3-xml +python3-codecs +python3-email
-endef
-
-# shown in LuCI package description
-define Package/radicale-py2/description
-Radicale CalDAV/CardDAV server (Python 2) - Homepage: http://radicale.org/
-endef
-define Package/radicale-py3/description
-Radicale CalDAV/CardDAV server (Python 3) - Homepage: http://radicale.org/
+ PROVIDES:=radicale-py2 radicale-py3
+ VARIANT:=python3
endef
-# shown in make menuconfig <Help>
-define Package/radicale-py2/config
- help
- The Radicale Project is a CalDAV (calendar) and CardDAV (contact) server.
- It aims to be a light solution, easy to use, easy to install, easy to configure.
- As a consequence, it requires few software dependances and is pre-configured to work out-of-the-box.
- !!! Will install and use Python $(VARIANT) !!!
- .
- Version : $(PKG_VERSION)
- Homepage: http://radicale.org/
+define Package/radicale/description
+ The Radicale Project is a CalDAV (calendar) and CardDAV (contact) server. It
+ aims to be a light solution, easy to use, easy to install, easy to configure.
+ As a consequence, it requires few software dependances and is pre-configured to
+ work out-of-the-box.
endef
-Package/radicale-py3/config = $(Package/radicale-py2/config)
-define Package/radicale-py2/conffiles
+define Package/radicale/conffiles
/etc/config/radicale
/etc/radicale/users
/etc/radicale/rights
endef
-Package/radicale-py3/conffiles = $(Package/radicale-py2/conffiles)
-define Build/Configure
- # nothing to configure
-endef
-define Build/Compile
- # nothing to compile
-endef
-
-define Package/radicale-py2/preinst
- #!/bin/sh
- [ -n "$${IPKG_INSTROOT}" ] && exit 0 # if run within buildroot exit
-
- # stop service if PKG_UPGRADE
- [ "$${PKG_UPGRADE}" = "1" ] && /etc/init.d/radicale stop >/dev/null 2>&1
-
- exit 0 # suppress errors from stop command
-endef
-define Package/radicale-py3/preinst
-$(call Package/radicale-py2/preinst)
-endef
-
-define Package/radicale/inst_all
+define Py3Package/radicale/install
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/radicale.init $(1)/etc/init.d/radicale
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_CONF) ./files/radicale.config $(1)/etc/config/radicale
- $(INSTALL_DIR) $(1)/lib/upgrade/keep.d
- $(INSTALL_DATA) ./files/radicale.upgrade $(1)/lib/upgrade/keep.d/radicale
-
$(INSTALL_DIR) $(1)/etc/radicale/ssl
$(INSTALL_DATA) ./files/config.template $(1)/etc/radicale/config.template
$(INSTALL_DATA) ./files/logging.template $(1)/etc/radicale/logging.template
$(INSTALL_DATA) ./files/radicale.rights $(1)/etc/radicale/rights
$(INSTALL_DIR) $(1)/usr/bin
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/radicale $(1)/usr/bin/
-endef
-define Package/radicale-py2/install
- $(call Package/radicale/inst_all, $(1))
- $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)/radicale
- $(CP) $(PKG_BUILD_DIR)/radicale/* $(1)$(PYTHON_PKG_DIR)/radicale
-endef
-define Package/radicale-py3/install
- $(call Package/radicale/inst_all, $(1))
- $(INSTALL_DIR) $(1)$(PYTHON3_PKG_DIR)/radicale
- $(CP) $(PKG_BUILD_DIR)/radicale/* $(1)$(PYTHON3_PKG_DIR)/radicale
-endef
-
-define Package/radicale-py2/postinst
- #!/bin/sh
- # patch /usr/bin/radicale force run using python2
- /bin/sed -i 's/python/python2/' $${IPKG_INSTROOT}/usr/bin/radicale
-endef
-define Package/radicale-py3/postinst
- #!/bin/sh
- # patch /usr/bin/radicale force run using python3
- /bin/sed -i 's/python/python3/' $${IPKG_INSTROOT}/usr/bin/radicale
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/radicale $(1)/usr/bin/
endef
-$(eval $(call BuildPackage,radicale-py2))
-$(eval $(call BuildPackage,radicale-py3))
+$(eval $(call Py3Package,radicale))
+$(eval $(call BuildPackage,radicale))
+$(eval $(call BuildPackage,radicale-src))
+++ /dev/null
-/etc/config/radicale
-/etc/radicale/users
-/etc/radicale/rights
-
--- /dev/null
+#
+# Copyright (C) 2019 rosysong@rosinson.com
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=rosy-file-server
+PKG_VERSION:=1.0.0
+PKG_RELEASE:=1
+PKG_LICENSE:=GPL-2.0
+
+PKG_MAINTAINER:=Rosy Song <rosysong@rosinson.com>
+
+PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/rosy-file-server
+ SUBMENU:=File Transfer
+ SECTION:=net
+ CATEGORY:=Network
+ TITLE:=Rosy File Server over HTTP
+ PKGARCH:=all
+endef
+
+define Package/rosy-file-server/description
+ This package is a configuration management for luci-app-rosy-file-server.
+endef
+
+define Package/rosy-file-server/conffiles
+/etc/config/rosy-file-server
+endef
+
+define Build/Prepare
+endef
+
+define Build/Configure
+endef
+
+define Build/Compile
+endef
+
+define Package/rosy-file-server/install
+ $(INSTALL_DIR) $(1)/etc/init.d $(1)/etc/config
+ $(INSTALL_BIN) ./files/rosyfs.init $(1)/etc/init.d/rosyfs
+ $(INSTALL_CONF) ./files/rosyfs.config $(1)/etc/config/rosyfs
+endef
+
+$(eval $(call BuildPackage,rosy-file-server))
--- /dev/null
+#
+# Copyright (C) 2019 rosysong@rosinson.com
+#
+
+config rosyfs default
+
+ # Web title
+ option title 'Rosy File Server'
+
+ # Path to share
+ option target '/www'
+
+ option disabled '0'
--- /dev/null
+#!/bin/sh /etc/rc.common
+#
+# Copyright (C) 2019 rosysong@rosinson.com
+#
+
+START=99
+USE_PROCD=1
+SHARE_PATH=/www/rosyfs-share
+
+service_triggers() {
+ procd_add_reload_trigger rosyfs
+}
+
+start_service() {
+ config_load rosyfs
+ config_get disabled default disabled '0'
+ config_get target default target ''
+
+ [ $disabled -eq 1 ] && return
+
+ [ -n "$target" -a ! "$(readlink $SHARE_PATH)" = "$target" ] && {
+ rm -f $SHARE_PATH
+ ln -s $target $SHARE_PATH
+ }
+}
+
+stop_service() {
+ rm -f $SHARE_PATH
+}
PKG_NAME:=rpcbind
PKG_VERSION:=1.2.5
-PKG_RELEASE:=1
+PKG_RELEASE:=4
PKG_SOURCE_URL:=@SF/rpcbind
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_MAINTAINER:=Andy Walsh <andy.walsh44+github@gmail.com>
PKG_LICENSE:=BSD-3-Clause
+PKG_CPE_ID:=cpe:/a:rpcbind_project:rpcbind
PKG_FIXUP:=autoreconf
PKG_REMOVE_FILES:=autogen.sh aclocal.m4
PKG_CONFIG_DEPENDS:= \
CONFIG_RPCBIND_LIBWRAP \
- CONFIG_RPCBIND_WARMSTARTS
+ CONFIG_RPCBIND_RMTCALLS
include $(INCLUDE_DIR)/package.mk
config RPCBIND_LIBWRAP
bool "Enable libwrap (TCP wrappers) support."
default y
-
- config RPCBIND_WARMSTARTS
- bool "Enable warmstarts support"
- default y
+ config RPCBIND_RMTCALLS
+ bool "Enable broadcast discovery support of rpc services."
help
- The warmstart feature saves RPC registrations on termination.
+ Services such as Kodi (via libnfs) use this functionality to discover available NFS shares on the network.
+ default y
+
+
endif
endef
CONFIGURE_ARGS += \
--with-rpcuser=rpc \
- --without-systemdsystemunitdir
+ --without-systemdsystemunitdir \
+ --enable-warmstarts
ifeq ($(CONFIG_RPCBIND_LIBWRAP),y)
CONFIGURE_ARGS += --enable-libwrap
else
CONFIGURE_ARGS += --disable-libwrap
endif
-ifeq ($(CONFIG_RPCBIND_WARMSTARTS),y)
- CONFIGURE_ARGS += --enable-warmstarts
+
+ifeq ($(CONFIG_RPCBIND_RMTCALLS),y)
+ CONFIGURE_ARGS += --enable-rmtcalls
+else
+ CONFIGURE_ARGS += --disable-rmtcalls
endif
+
define Package/rpcbind/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rpcinfo $(1)/usr/bin/
--- /dev/null
+Submitted By: Ken Moffat <ken at linuxfromscratch dot org>
+Date: 2017-05-29
+Initial Package Version: 0.2.4 (also affects earlier versions)
+Upstream Status: Unknown
+Origin: Guido Vranken
+Description: Fixes CVE-2017-8779 (DOS by remote attackers - memory consumption
+without subsequent free).
+
+diff --git a/src/rpcb_svc_com.c b/src/rpcb_svc_com.c
+index 5862c26..e11f61b 100644
+--- a/src/rpcb_svc_com.c
++++ b/src/rpcb_svc_com.c
+@@ -48,6 +48,7 @@
+ #include <rpc/rpc.h>
+ #include <rpc/rpcb_prot.h>
+ #include <rpc/svc_dg.h>
++#include <rpc/rpc_com.h>
+ #include <netconfig.h>
+ #include <errno.h>
+ #include <syslog.h>
+@@ -432,7 +433,7 @@ rpcbproc_taddr2uaddr_com(void *arg, struct svc_req *rqstp /*__unused*/,
+ static bool_t
+ xdr_encap_parms(XDR *xdrs, struct encap_parms *epp)
+ {
+- return (xdr_bytes(xdrs, &(epp->args), (u_int *) &(epp->arglen), ~0));
++ return (xdr_bytes(xdrs, &(epp->args), (u_int *) &(epp->arglen), RPC_MAXDATASIZE));
+ }
+
+ /*
--- /dev/null
+From 0bc1c0ae7ce61a7ac8a8e9a9b2086268f011abf0 Mon Sep 17 00:00:00 2001
+From: Steve Dickson <steved@redhat.com>
+Date: Tue, 9 Oct 2018 09:19:50 -0400
+Subject: [PATCH 1/1] rpcinfo: Fix stack buffer overflow
+
+*** buffer overflow detected ***: rpcinfo terminated
+======= Backtrace: =========
+/lib64/libc.so.6(+0x721af)[0x7ff24c4451af]
+/lib64/libc.so.6(__fortify_fail+0x37)[0x7ff24c4ccdc7]
+/lib64/libc.so.6(+0xf8050)[0x7ff24c4cb050]
+rpcinfo(+0x435f)[0xef3be2635f]
+rpcinfo(+0x1c62)[0xef3be23c62]
+/lib64/libc.so.6(__libc_start_main+0xf5)[0x7ff24c3f36e5]
+rpcinfo(+0x2739)[0xef3be24739]
+======= Memory map: ========
+...
+The patch below fixes it.
+
+Reviewed-by: Chuck Lever <chuck.lever@oracle.com>
+Signed-off-by: Thomas Blume <thomas.blume@suse.com>
+Signed-off-by: Steve Dickson <steved@redhat.com>
+---
+ src/rpcinfo.c | 23 +++++++++++++++++------
+ 1 file changed, 17 insertions(+), 6 deletions(-)
+
+diff --git a/src/rpcinfo.c b/src/rpcinfo.c
+index 9b46864..cfdba88 100644
+--- a/src/rpcinfo.c
++++ b/src/rpcinfo.c
+@@ -973,6 +973,7 @@ rpcbdump (dumptype, netid, argc, argv)
+ (" program version(s) netid(s) service owner\n");
+ for (rs = rs_head; rs; rs = rs->next)
+ {
++ size_t netidmax = sizeof(buf) - 1;
+ char *p = buf;
+
+ printf ("%10ld ", rs->prog);
+@@ -985,12 +986,22 @@ rpcbdump (dumptype, netid, argc, argv)
+ }
+ printf ("%-10s", buf);
+ buf[0] = '\0';
+- for (nl = rs->nlist; nl; nl = nl->next)
+- {
+- strcat (buf, nl->netid);
+- if (nl->next)
+- strcat (buf, ",");
+- }
++
++ for (nl = rs->nlist; nl; nl = nl->next)
++ {
++ strncat (buf, nl->netid, netidmax);
++ if (strlen (nl->netid) < netidmax)
++ netidmax -= strlen(nl->netid);
++ else
++ break;
++
++ if (nl->next && netidmax > 1)
++ {
++ strncat (buf, ",", netidmax);
++ netidmax --;
++ }
++ }
++
+ printf ("%-32s", buf);
+ rpc = getrpcbynumber (rs->prog);
+ if (rpc)
+--
+1.8.3.1
+
PKG_NAME:=rsync
PKG_VERSION:=3.1.3
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://download.samba.org/pub/rsync/src
PKG_HASH:=55cc554efec5fdaad70de921cd5a5eeb6c29a95524c715f3bbf849235b0800c0
+
PKG_MAINTAINER:=Maxim Storchak <m.storchak@gmail.com>
-PKG_LICENSE:=GPL-3.0
+PKG_LICENSE:=GPL-3.0-or-later
PKG_LICENSE_FILES:=COPYING
PKG_INSTALL:=1
SUBMENU:=File Transfer
TITLE:=Fast remote file copy program (like rcp)
DEPENDS:=+libpopt +RSYNC_xattr:libattr +RSYNC_acl:libacl +RSYNC_zlib:zlib
- URL:=http://rsync.samba.org/
+ URL:=https://rsync.samba.org/
MENU:=1
endef
CONFIGURE_ARGS+= --disable-ipv6
endif
+CONFIGURE_VARS += rsync_cv_HAVE_GETTIMEOFDAY_TZ=yes
+
define Package/rsyncd
SECTION:=net
CATEGORY:=Network
SUBMENU:=File Transfer
TITLE:=Rsync daemon
DEPENDS:=+rsync
- URL:=http://rsync.samba.org/
+ URL:=https://rsync.samba.org/
endef
define Package/rsync/description
PKG_NAME:=rsyslog
PKG_VERSION:=8.39.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://www.rsyslog.com/files/download/rsyslog/
CATEGORY:=Network
TITLE:=Enhanced system logging and kernel message trapping daemons
URL:=https://www.rsyslog.com/
- DEPENDS:=+libestr +libfastjson +libuuid +zlib +USE_UCLIBC:libpthread +USE_UCLIBC:librt
+ DEPENDS:=+libestr +libfastjson +libuuid +zlib
endef
define Package/rsyslog/conffiles
PKG_NAME:=rtorrent
PKG_VERSION:=0.9.7
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/rakshasa/rtorrent/releases/download/v$(PKG_VERSION)
PKG_HASH:=5d9842fe48c9582fbea2c7bf9f51412c1ccbba07d059b257039ad53b863fe8bb
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
-PKG_LICENSE:=GPL-2.0
+PKG_MAINTAINER:=Rosen Penev <rosenp@gmail.com>
+PKG_LICENSE:=GPL-2.0-or-later
PKG_LICENSE_FILES:=COPYING
PKG_FIXUP:=autoreconf
-PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
-
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
+PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
SECTION:=net
CATEGORY:=Network
TITLE:=BitTorrent client for ncurses
- URL:=http://libtorrent.rakshasa.no/
- DEPENDS:=+libcurl +libtorrent +libncursesw +libsigcxx +libpthread
- MAINTAINER:=Rosen Penev <rosenp@gmail.com>
+ URL:=https://github.com/rakshasa/rtorrent
+ DEPENDS:=+libcurl +libtorrent +libncurses +libsigcxx +libpthread
endef
define Package/rtorrent/Default/description
This package is built with xmlrpc support
endef
-TARGET_LDFLAGS += -lz -lpthread -Wl,-rpath-link=$(STAGING_DIR)/usr/lib
-
-CONFIGURE_ARGS+= \
+CONFIGURE_ARGS += \
--enable-shared \
--disable-static \
--disable-debug \
- --disable-ipv6
+ --with-libcurl="$(STAGING_DIR)/usr" \
+ --with-ncurses \
+ $(if $(CONFIG_IPV6),--enable,--disable)-ipv6
ifeq ($(BUILD_VARIANT),rpc)
- CONFIGURE_ARGS += \
- --with-xmlrpc-c
+CONFIGURE_ARGS += --with-xmlrpc-c
endif
-
define Package/rtorrent/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rtorrent $(1)/usr/bin/
config SAMBA4_SERVER_ACL
bool "ACL support (xattr)"
depends on PACKAGE_samba4-server
- select PACKAGE_acl
help
installs: sharesec
modules: vfs_acl_xattr vfs_acl_tdb vfs_posixacl
Extended access control list support
default n
-config SAMBA4_SERVER_AD_DC
- bool "Active Directory Domain Controller support (requires krb5-server) (EXPERIMENTAL)"
- depends on PACKAGE_samba4-server
- select PACKAGE_python-base
- select PACKAGE_python-crypto
- select PACKAGE_libopenssl
- select PACKAGE_libgnutls
- select PACKAGE_libopenldap
- help
- installs: samba (meta-daemon) python-crypt ntlm_auth
- scripts: samba-tool
-
- Run as a Active Directory Domain Controller
- see: https://wiki.samba.org/index.php/Setting_up_Samba_as_an_Active_Directory_Domain_Controller
- HINT: see section (# Using the Domain Controller as a File Server)
- NOTE: Extroot is recommend for this setup, as it is not optimized to run completely from RAM/tempfs!
- default n
-
config SAMBA4_SERVER_AVAHI
bool "Avahi support"
depends on PACKAGE_samba4-server
select SAMBA4_SERVER_VFS
- select PACKAGE_libavahi-client
help
Announce Samba resources via DNS/DNS-SD using the Avahi daemon, for Linux/Mac clients.
default y
WSD (Web Services for Devices) replaces the functionality of NetBIOS and is provided by the wsdd2 package (selected by default).
Note: As of Windows 10 Fall Creators Update (1709) NetBIOS isn't supported unless the old SMB1 feature is reinstalled (not recommended).
Network shares can be directly accessed via network paths '\\hostname\sharename' and mounted via 'map network drive' without NetBIOS or WSD.
- default n
+ default y
config SAMBA4_SERVER_WINBIND
bool "Winbind support"
depends on PACKAGE_samba4-server
- depends on SAMBA4_SERVER_AD_DC
help
installs: winbindd (daemon) wbinfo
include $(TOPDIR)/rules.mk
PKG_NAME:=samba
-PKG_VERSION:=4.9.4
+PKG_VERSION:=4.10.6
PKG_RELEASE:=2
PKG_MAINTAINER:=Andy Walsh <andy.walsh44+github@gmail.com>
PKG_LICENSE:=GPL-3.0-only
PKG_LICENSE_FILES:=COPYING
-PKG_SOURCE_URL:=https://download.samba.org/pub/samba/stable/
+PKG_SOURCE_URL:=https://ftp.heanet.ie/mirrors/ftp.samba.org/stable/ \
+ https://ftp.gwdg.de/pub/samba/stable/ \
+ https://ftp.riken.jp/net/samba/samba/stable/ \
+ http://www.nic.funet.fi/index/samba/pub/samba/stable/ \
+ http://samba.mirror.bit.nl/samba/ftp/stable/ \
+ https://download.samba.org/pub/samba/stable/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=6d98a8d8bcccbe788e4bbb406362e6676311aca711a3f3cc9b3a404bb9ff0b4f
+PKG_HASH:=9efbeb52db1203dc779b118f1c48c161e569f7a6af5101e745497ee6296eef42
-# Buildroot bug? Can't add target deps via '+SAMBA4_SERVER_AD_DC:python-crypto' (as work-around we select via config.in)
-PKG_BUILD_DEPENDS:=SAMBA4_SERVER_AD_DC:python-crypto nfs-kernel-server/host
+# samba4=(asn1_compile) e2fsprogs=(compile_et) nfs-kernel-server=(rpcgen)
+HOST_BUILD_DEPENDS:=python3/host nfs-kernel-server/host e2fsprogs/host
+PKG_BUILD_DEPENDS:=samba4/host
PKG_CONFIG_DEPENDS:= \
CONFIG_SAMBA4_SERVER_NETBIOS \
CONFIG_PACKAGE_kmod-fs-xfs
include $(INCLUDE_DIR)/package.mk
+include $(TOPDIR)/feeds/packages/lang/python/python3-package.mk
+include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/kernel.mk
include $(INCLUDE_DIR)/version.mk
define Package/samba4-libs
$(call Package/samba4/Default)
TITLE+= libs
- DEPENDS:= +zlib +libtirpc +krb5-libs +libpopt \
+ DEPENDS:= +zlib +libtirpc +libpopt +libcomerr +libtasn1 +libopenssl +libreadline \
+PACKAGE_libcap:libcap +PACKAGE_libpthread:libpthread +PACKAGE_libnettle:libnettle \
+PACKAGE_libgcrypt:libgcrypt +PACKAGE_libpam:libpam +PACKAGE_dbus:dbus +PACKAGE_libavahi-client:libavahi-client \
+SAMBA4_SERVER_VFS:attr \
+SAMBA4_SERVER_ACL:acl +SAMBA4_SERVER_ACL:attr \
+SAMBA4_SERVER_AVAHI:libavahi-client \
- +SAMBA4_SERVER_AD_DC:python-base +SAMBA4_SERVER_AD_DC:libopenssl +SAMBA4_SERVER_AD_DC:libgnutls +SAMBA4_SERVER_AD_DC:libopenldap +SAMBA4_SERVER_AD_DC:jansson +SAMBA4_SERVER_AD_DC:libarchive
+ +SAMBA4_SERVER_AD_DC:python3-base +SAMBA4_SERVER_AD_DC:python3-crypto +SAMBA4_SERVER_AD_DC:libgnutls +SAMBA4_SERVER_AD_DC:libopenldap +SAMBA4_SERVER_AD_DC:jansson +SAMBA4_SERVER_AD_DC:libarchive
endef
define Package/samba4-server
endef
define Package/samba4-server/description
- installs: smbd (daemon) smbpasswd pdbedit testparm
+ installs: smbd, nmbd (daemon) smbpasswd pdbedit testparm
- This provides the basic fileserver service and is the minimum needed to serve file shares.
- HINT: https://fitzcarraldoblog.wordpress.com/2016/10/17/a-correct-method-of-configuring-samba-for-browsing-smb-shares-in-a-home-network/
+ This provides the basic fileserver service and is the minimum needed to serve file shares.
+ HINT: https://fitzcarraldoblog.wordpress.com/2016/10/17/a-correct-method-of-configuring-samba-for-browsing-smb-shares-in-a-home-network/
endef
+# BUG: We cant add DEPENDS:= +SAMBA4_SERVER_AD_DC:python-crypto, so this only happens here via select!
define Package/samba4-server/config
select PACKAGE_wsdd2
source "$(SOURCE)/Config.in"
CPP="$(TARGET_CROSS)cpp"
CONFIGURE_CMD = ./buildtools/bin/waf
+HOST_CONFIGURE_CMD = ./buildtools/bin/waf
# Strip options that WAF configure script does not recognize
CONFIGURE_ARGS:=$(filter-out \
- --host=% \
- --build=% \
- --program-suffix=% \
+ --target=% \
+ --host=% \
+ --build=% \
+ --program-prefix=% \
+ --program-suffix=% \
--disable-nls \
--disable-ipv6 \
, $(CONFIGURE_ARGS))
+HOST_CONFIGURE_ARGS:=$(filter-out \
+ --target=% \
+ --host=% \
+ --build=% \
+ --program-prefix=% \
+ --program-suffix=% \
+ --disable-nls \
+ --disable-ipv6 \
+ , $(HOST_CONFIGURE_ARGS))
+
+# Waf needs the "configure" argument
+CONFIGURE_ARGS:=configure $(CONFIGURE_ARGS)
+HOST_CONFIGURE_ARGS:=configure $(HOST_CONFIGURE_ARGS)
+
CONFIGURE_ARGS += \
--hostcc="$(HOSTCC)" \
--cross-compile \
--without-regedit \
--without-gpgme
+HOST_CONFIGURE_ARGS += \
+ --hostcc="$(HOSTCC)" \
+ --disable-cups \
+ --disable-iprint \
+ --disable-cephfs \
+ --disable-fault-handling \
+ --disable-glusterfs \
+ --disable-rpath \
+ --disable-rpath-install \
+ --disable-rpath-private-install \
+ --enable-fhs \
+ --without-automount \
+ --without-iconv \
+ --without-lttng \
+ --without-ntvfs-fileserver \
+ --without-pam \
+ --without-systemd \
+ --without-utmp \
+ --without-dmapi \
+ --without-fam \
+ --without-gettext \
+ --without-regedit \
+ --without-gpgme
+
+HOST_CONFIGURE_ARGS += --disable-avahi --without-quotas --without-acl-support --without-winbind \
+ --without-ad-dc --without-json --without-libarchive --disable-python --nopyc --nopyo \
+ --disable-gnutls --without-dnsupdate --without-ads --without-ldap
+HOST_CONFIGURE_VARS += python_LDFLAGS="" python_LIBDIR=""
+
# Optional AES-NI support - https://lists.samba.org/archive/samba-technical/2017-September/122738.html
# Support for Nettle wasn't comitted
ifdef CONFIG_TARGET_x86_64
--with-piddir=/var/run \
--with-privatedir=/etc/samba
-CONFIGURE_ARGS += \
- --with-system-mitkrb5 "$(STAGING_DIR)/usr" \
- --with-system-mitkdc=/usr/sbin/krb5kdc
-
- ## embedded-heimdal
- # --bundled-libraries=talloc,tevent,tdb,ldb,com_err,cmocka,roken,wind,hx509,asn1,heimbase,hcrypto,krb5,gssapi,heimntlm,hdb,kdc,NONE
-
ifeq ($(CONFIG_SAMBA4_SERVER_AVAHI),y)
CONFIGURE_ARGS += --enable-avahi
else
else
CONFIGURE_ARGS += --without-acl-support
endif
+#BUG: We fail to get a wortking "python embedded interpreter" for AD_DC mode, seems mixed host/target libs.
ifeq ($(CONFIG_SAMBA4_SERVER_AD_DC),y)
- CONFIGURE_ARGS += --enable-gnutls --with-dnsupdate --with-ads --with-ldap --with-experimental-mit-ad-dc
- TARGET_CFLAGS := -I$(STAGING_DIR)/usr/include/python2.7 $(TARGET_CFLAGS)
+ CONFIGURE_ARGS += --enable-gnutls --with-dnsupdate --with-ads --with-ldap
+ TARGET_CFLAGS := -I$(PYTHON3_INC_DIR) $(TARGET_CFLAGS)
else
- CONFIGURE_ARGS += --without-ad-dc --without-json-audit --without-libarchive --disable-python --nopyc --nopyo --disable-gnutls --without-dnsupdate --without-ads --without-ldap
+ CONFIGURE_ARGS += --without-ad-dc --without-json --without-libarchive --disable-python --nopyc --nopyo --nopycache \
+ --disable-gnutls --without-dnsupdate --without-ads --without-ldap
CONFIGURE_VARS += \
python_LDFLAGS="" \
python_LIBDIR=""
SAMBA4_PDB_MODULES :=pdb_smbpasswd,pdb_tdbsam,
SAMBA4_AUTH_MODULES :=auth_builtin,auth_sam,auth_unix,auth_script,
SAMBA4_VFS_MODULES :=vfs_default,
+SAMBA4_VFS_MODULES_SHARED :=
ifeq ($(CONFIG_SAMBA4_SERVER_VFS),y)
- SAMBA4_VFS_MODULES :=$(SAMBA4_VFS_MODULES)vfs_fruit,vfs_shadow_copy2,vfs_recycle,vfs_fake_perms,vfs_readonly,vfs_cap,vfs_offline,vfs_crossrename,vfs_catia,vfs_streams_xattr,vfs_xattr_tdb,
+ SAMBA4_VFS_MODULES_SHARED :=$(SAMBA4_VFS_MODULES_SHARED)vfs_fruit,vfs_shadow_copy2,vfs_recycle,vfs_fake_perms,vfs_readonly,vfs_cap,vfs_offline,vfs_crossrename,vfs_catia,vfs_streams_xattr,vfs_xattr_tdb,
ifeq ($(CONFIG_PACKAGE_kmod-fs-btrfs),y)
- SAMBA4_VFS_MODULES :=$(SAMBA4_VFS_MODULES)vfs_btrfs,
+ SAMBA4_VFS_MODULES_SHARED :=$(SAMBA4_VFS_MODULES_SHARED)vfs_btrfs,
endif
endif
ifeq ($(CONFIG_SAMBA4_SERVER_VFSX),y)
- SAMBA4_VFS_MODULES :=$(SAMBA4_VFS_MODULES)vfs_virusfilter,vfs_shell_snap,vfs_commit,vfs_worm,vfs_aio_fork,vfs_aio_pthread,vfs_netatalk,vfs_dirsort,vfs_fileid,
+ SAMBA4_VFS_MODULES_SHARED :=$(SAMBA4_VFS_MODULES_SHARED)vfs_virusfilter,vfs_shell_snap,vfs_commit,vfs_worm,vfs_aio_fork,vfs_aio_pthread,vfs_netatalk,vfs_dirsort,vfs_fileid,
ifeq ($(CONFIG_PACKAGE_kmod-fs-xfs),y)
- SAMBA4_VFS_MODULES :=$(SAMBA4_VFS_MODULES)vfs_linux_xfs_sgid,
+ SAMBA4_VFS_MODULES_SHARED :=$(SAMBA4_VFS_MODULES_SHARED)vfs_linux_xfs_sgid,
endif
endif
ifeq ($(CONFIG_SAMBA4_SERVER_QUOTAS),y)
- SAMBA4_VFS_MODULES :=$(SAMBA4_VFS_MODULES)vfs_default_quota,
+ SAMBA4_VFS_MODULES_SHARED :=$(SAMBA4_VFS_MODULES_SHARED)vfs_default_quota,
endif
ifeq ($(CONFIG_SAMBA4_SERVER_ACL),y)
- SAMBA4_VFS_MODULES :=$(SAMBA4_VFS_MODULES)vfs_posixacl,vfs_acl_xattr,vfs_acl_tdb,
+ SAMBA4_VFS_MODULES :=$(SAMBA4_VFS_MODULES)vfs_posixacl,
+ SAMBA4_VFS_MODULES_SHARED :=$(SAMBA4_VFS_MODULES_SHARED)vfs_acl_xattr,vfs_acl_tdb,
# vfs_zfsacl needs https://github.com/zfsonlinux/zfs/tree/master/include/sys/zfs_acl.h
# vfs_nfs4acl_xattr needs https://github.com/notriddle/libdrpc/blob/master/rpc/xdr.h
endif
ifeq ($(CONFIG_SAMBA4_SERVER_AD_DC),y)
- SAMBA4_PDB_MODULES :=$(SAMBA4_PDB_MODULES)pdb_samba_dsdb,
+ SAMBA4_PDB_MODULES :=$(SAMBA4_PDB_MODULES)pdb_samba_dsdb,pdb_ldapsam,
SAMBA4_AUTH_MODULES :=$(SAMBA4_AUTH_MODULES)auth_samba4,
- SAMBA4_VFS_MODULES :=$(SAMBA4_VFS_MODULES)vfs_audit,vfs_extd_audit,vfs_full_audit,
+ SAMBA4_VFS_MODULES_SHARED :=$(SAMBA4_VFS_MODULES_SHARED)vfs_audit,vfs_extd_audit,vfs_full_audit,
endif
ifeq ($(CONFIG_SAMBA4_SERVER_WINBIND),y)
- SAMBA4_IDMAP_MODULES :=$(SAMBA4_IDMAP_MODULES)idmap_passdb,idmap_nss,idmap_tdb,idmap_tdb2,idmap_script,nss_info_template,
- SAMBA4_IDMAP_MODULES_SHARED :=$(SAMBA4_IDMAP_MODULES_SHARED)idmap_autorid,idmap_rid,idmap_ad,idmap_rfc2307,
+ SAMBA4_IDMAP_MODULES :=$(SAMBA4_IDMAP_MODULES)idmap_tdb,idmap_passdb,idmap_nss,nss_info_template,
+ SAMBA4_IDMAP_MODULES_SHARED :=$(SAMBA4_IDMAP_MODULES_SHARED)idmap_autorid,idmap_rid,idmap_hash,idmap_tdb2,idmap_script,
+ifeq ($(CONFIG_SAMBA4_SERVER_AD_DC),y)
+ SAMBA4_IDMAP_MODULES_SHARED :=$(SAMBA4_IDMAP_MODULES_SHARED)idmap_ad,idmap_ldap,idmap_rfc2307,
# idmap_ad needs --with-ads
# idmap_rfc2307 needs ldap headers
+endif
SAMBA4_AUTH_MODULES :=$(SAMBA4_AUTH_MODULES)auth_winbind,
endif
-SAMBA4_MODULES :=${SAMBA4_AUTH_MODULES}${SAMBA4_PDB_MODULES}${SAMBA4_IDMAP_MODULES}${SAMBA4_VFS_MODULES}
-SAMBA4_MODULES_SHARDED :=${SAMBA4_IDMAP_MODULES_SHARED}
+SAMBA4_MODULES :=${SAMBA4_VFS_MODULES}${SAMBA4_AUTH_MODULES}${SAMBA4_PDB_MODULES}${SAMBA4_IDMAP_MODULES}
+SAMBA4_MODULES_SHARDED :=${SAMBA4_VFS_MODULES_SHARED}${SAMBA4_IDMAP_MODULES_SHARED}
CONFIGURE_ARGS += \
--with-static-modules=$(SAMBA4_MODULES)!DEFAULT,!FORCED \
--with-shared-modules=$(SAMBA4_MODULES_SHARDED)!DEFAULT,!FORCED
+HOST_CONFIGURE_ARGS += \
+ --with-static-modules=!DEFAULT,!FORCED \
+ --with-shared-modules=!DEFAULT,!FORCED
+
# Setup build/install targets
# CONFIG_PACKAGE_samba4-server
BUILD_TARGETS_SERVER :=smbd/smbd,smbpasswd,pdbedit,testparm
BUILD_TARGETS_SERVER :=$(BUILD_TARGETS_SERVER),nmbd
endif
ifeq ($(CONFIG_SAMBA4_SERVER_AD_DC),y)
- BUILD_TARGETS_SERVER :=$(BUILD_TARGETS_SERVER),samba,nsstest,ntlm_auth
+ BUILD_TARGETS_SERVER :=$(BUILD_TARGETS_SERVER),samba,nsstest,ntlm_auth,samba4kinit,samba4kgetcred,samba4kpasswd,samba4ktutil
endif
ifeq ($(CONFIG_SAMBA4_SERVER_WINBIND),y)
BUILD_TARGETS_SERVER :=$(BUILD_TARGETS_SERVER),winbindd,wbinfo,winbind_krb5_locator
# CONFIG_PACKAGE_samba4-client
BUILD_TARGETS_CLIENT :=client/smbclient,client/cifsdd
# CONFIG_PACKAGE_samba4-admin
-BUILD_TARGETS_ADMIN :=net,smbcontrol,profiles,rpcclient,smbcacls,smbcquotas
+BUILD_TARGETS_ADMIN :=net,smbcontrol,profiles,rpcclient,smbcacls,smbcquotas,eventlogadm
# CONFIG_PACKAGE_samba4-utils
BUILD_TARGETS_UTILS :=smbstatus,smbtree,smbget,mvxattr,nmblookup
# lib bundling
# NOTE: bundle + make private, we want to avoid version configuration (build, link) conflicts
-CONFIGURE_ARGS += --builtin-libraries=talloc,tevent,texpect,tdb,ldb,tdr,cmocka,replace
-#CONFIGURE_ARGS += --nonshared-binary=$(BUILD_TARGETS_SERVER)
+CONFIGURE_ARGS += --builtin-libraries=talloc,tevent,tevent-util,texpect,tdb,ldb,tdr,cmocka
+HOST_CONFIGURE_ARGS += --builtin-libraries=replace --nonshared-binary=asn1_compile
+
ifeq ($(CONFIG_SAMBA4_SERVER_AD_DC),y)
-CONFIGURE_ARGS += --bundled-libraries=talloc,tevent,texpect,tdb,ldb,tdr,cmocka,replace,pytalloc-util,pyldb-util,NONE
+CONFIGURE_ARGS += --bundled-libraries=talloc,tevent,tevent-util,texpect,tdb,ldb,tdr,cmocka,replace,pytalloc-util,pyldb-util,roken,wind,hx509,asn1,heimbase,hcrypto,krb5,gssapi,heimntlm,hdb,kdc,NONE
else
-CONFIGURE_ARGS += --bundled-libraries=talloc,tevent,texpect,tdb,ldb,tdr,cmocka,replace,NONE
+CONFIGURE_ARGS += --bundled-libraries=talloc,tevent,tevent-util,texpect,tdb,ldb,tdr,cmocka,replace,roken,wind,hx509,asn1,heimbase,hcrypto,krb5,gssapi,heimntlm,hdb,kdc,NONE
endif
-CONFIGURE_ARGS += --private-libraries=talloc,tevent,texpect,tdb,ldb,tdr,cmocka,replace
+# BUG: --private-libraries, Does not work for System possible libs, will not get "samba4" suffix!
+CONFIGURE_ARGS += --private-libraries=talloc,tevent,tevent-util,texpect,tdb,ldb,tdr,cmocka,replace
+# CONFIGURE_ARGS += --disable-symbol-versions
+
+define Host/Configure
+ if [ $(CONFIG_SAMBA4_SERVER_AD_DC) = "y" ]; then \
+ echo "Config error: SAMBA4_SERVER_AD_DC config option is broken atm!"; \
+ echo "Last AD_DC version that builds is here: https://github.com/Andy2244/openwrt-extra/tree/samba-4.9 "; \
+ exit 1; \
+ fi
+ $(call Host/Configure/Default)
+endef
+
+define Host/Compile
+ (cd $(HOST_BUILD_DIR); \
+ ./buildtools/bin/waf build \
+ --targets=asn1_compile \
+ )
+endef
+
+define Host/Install
+ $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/bin/
+ $(INSTALL_BIN) $(HOST_BUILD_DIR)/bin/asn1_compile $(STAGING_DIR_HOSTPKG)/bin/
+endef
define Build/Prepare
$(Build/Prepare/Default)
echo 'Checking uname version type: "$(VERSION_DIST) Linux-$(LINUX_VERSION) $(shell date +%Y-%m-%d)"' >> $(PKG_BUILD_DIR)/cross-answers.txt
# NOTE: For some unknown reason this answer is not needed on some hosts/distros, yet needed on others?
echo 'Checking whether POSIX capabilities are available: OK' >> $(PKG_BUILD_DIR)/cross-answers.txt
- $(call Build/Configure/Default,configure)
+ $(call Build/Configure/Default)
endef
# BUG: We need to use "waf install --targets=" otherwise a "make install" or "waf install" will retrigger a full recompile of all possible targets!
+# BUG: Samba4-10 "waf install --destdir" is not working, bins are not installed!
define Build/Compile
(cd $(PKG_BUILD_DIR); \
- ./buildtools/bin/waf install -j$(shell nproc) \
- --targets=$(SAMBA4_MODULES)$(SAMBA4_MODULES_SHARDED)$(BUILD_TARGETS_SERVER),$(BUILD_TARGETS_UTILS),$(BUILD_TARGETS_ADMIN),$(BUILD_TARGETS_CLIENT) \
+ ./buildtools/bin/waf install \
+ --jobs=$(shell nproc) \
--destdir="$(PKG_INSTALL_DIR)" \
+ --targets=$(SAMBA4_MODULES)$(SAMBA4_MODULES_SHARDED)$(BUILD_TARGETS_SERVER),$(BUILD_TARGETS_UTILS),$(BUILD_TARGETS_ADMIN),$(BUILD_TARGETS_CLIENT) \
)
endef
define Package/samba4-libs/install
$(INSTALL_DIR) $(1)/usr/lib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/samba/*.so* $(1)/usr/lib/
+ $(CP) -L $(PKG_BUILD_DIR)/bin/shared/*.so* $(1)/usr/lib/
+ $(CP) -L $(PKG_BUILD_DIR)/bin/shared/private/*.so* $(1)/usr/lib/
+
+ $(INSTALL_DIR) $(1)/usr/lib/samba/vfs $(1)/usr/lib/samba/idmap $(1)/usr/lib/samba/ldb $(1)/usr/lib/samba/krb5
+ if [ -d $(PKG_BUILD_DIR)/bin/modules/idmap ]; then \
+ $(CP) -L $(PKG_BUILD_DIR)/bin/modules/idmap $(1)/usr/lib/samba/; \
+ fi
+ if [ -d $(PKG_BUILD_DIR)/bin/modules/vfs ]; then \
+ $(CP) -L $(PKG_BUILD_DIR)/bin/modules/vfs $(1)/usr/lib/samba/; \
+ fi
+ if [ -d $(PKG_BUILD_DIR)/bin/modules/krb5 ]; then \
+ $(CP) -L $(PKG_BUILD_DIR)/bin/modules/krb5 $(1)/usr/lib/samba/; \
+ fi
+ifeq ($(CONFIG_SAMBA4_SERVER_AD_DC),y)
+ $(INSTALL_DIR) $(1)/usr/lib/python3
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/python3 $(1)/usr/lib/
+endif
endef
define Package/samba4-client/install
$(INSTALL_DIR) $(1)/usr/bin
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{smbclient,cifsdd} $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/{smbclient,cifsdd} $(1)/usr/bin/
endef
define Package/samba4-admin/install
$(INSTALL_DIR) $(1)/usr/bin
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{net,smbcontrol,profiles,rpcclient,smbcacls,smbcquotas} $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/{net,smbcontrol,profiles,rpcclient,smbcacls,smbcquotas} $(1)/usr/bin/
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/eventlogadm $(1)/usr/sbin/
endef
define Package/samba4-utils/install
$(INSTALL_DIR) $(1)/usr/bin
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{smbstatus,smbtree,smbget,mvxattr,nmblookup} $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/{smbstatus,smbtree,smbget,mvxattr,nmblookup} $(1)/usr/bin/
endef
define Package/samba4-server/install
- $(INSTALL_DIR) $(1)/usr/lib/samba
- if [ -d $(PKG_INSTALL_DIR)/usr/lib/samba/idmap ]; then \
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/samba/idmap $(1)/usr/lib/samba/; \
- fi
- if [ -d $(PKG_INSTALL_DIR)/usr/lib/samba/auth ]; then \
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/samba/auth $(1)/usr/lib/samba/; \
- fi
- if [ -d $(PKG_INSTALL_DIR)/usr/lib/samba/vfs ]; then \
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/samba/vfs $(1)/usr/lib/samba/; \
- fi
- if [ -d $(PKG_INSTALL_DIR)/usr/lib/samba/pdb ]; then \
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/samba/pdb $(1)/usr/lib/samba/; \
- fi
$(INSTALL_DIR) $(1)/usr/bin
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{smbpasswd,pdbedit,testparm} $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/{smbpasswd,pdbedit,testparm} $(1)/usr/bin/
$(INSTALL_DIR) $(1)/usr/sbin
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/smbd $(1)/usr/sbin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/smbd $(1)/usr/sbin/
ifeq ($(CONFIG_SAMBA4_SERVER_AD_DC),y)
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/python2.7 $(1)/usr/lib/
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{samba-tool,ntlm_auth,smbtar} $(1)/usr/bin/
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{samba,samba-gpupdate,samba_dnsupdate,samba_kcc,samba_spnupdate,samba_upgradedns} $(1)/usr/sbin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/{samba-tool,ntlm_auth,smbtar} $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/{samba,samba-gpupdate,samba_dnsupdate,samba_kcc,samba_spnupdate,samba_upgradedns} $(1)/usr/sbin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/{samba4kinit,samba4kgetcred,samba4kpasswd,samba4ktutil} $(1)/usr/bin/
endif
ifeq ($(CONFIG_SAMBA4_SERVER_NETBIOS),y)
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/nmbd $(1)/usr/sbin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/nmbd $(1)/usr/sbin/
endif
ifeq ($(CONFIG_SAMBA4_SERVER_WINBIND),y)
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/wbinfo $(1)/usr/bin/
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/winbindd $(1)/usr/sbin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/wbinfo $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/winbindd $(1)/usr/sbin/
endif
ifeq ($(CONFIG_SAMBA4_SERVER_ACL),y)
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/sharesec $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/sharesec $(1)/usr/bin/
endif
$(INSTALL_DIR) $(1)/etc/config $(1)/etc/samba $(1)/etc/init.d
- $(INSTALL_DATA) ./files/samba.config $(1)/etc/config/samba4
+ $(INSTALL_CONF) ./files/samba.config $(1)/etc/config/samba4
$(INSTALL_DATA) ./files/smb.conf.template $(1)/etc/samba
$(INSTALL_BIN) ./files/samba.init $(1)/etc/init.d/samba4
endef
/etc/samba/idmap.ldb
/etc/samba/lmhosts
/etc/nsswitch.conf
+/etc/krb5.conf
endef
+$(eval $(call HostBuild))
$(eval $(call BuildPackage,samba4-libs))
$(eval $(call BuildPackage,samba4-server))
$(eval $(call BuildPackage,samba4-client))
EOT
}
- [ -L /etc/samba/smb.conf ] || ln -nsf /var/etc/smb.conf /etc/samba/smb.conf
+ [ -e /etc/samba/smb.conf ] || ln -nsf /var/etc/smb.conf /etc/samba/smb.conf
+
+ if ! [ -L /etc/samba/smb.conf ]; then
+ logger -t 'samba4-server' "Local custom /etc/samba/smb.conf file detected, all luci/config settings are ignored!"
+ fi
+
}
smb_add_share() {
local dir_mask
local browseable
local read_only
+ local writeable
local guest_ok
local guest_only
local inherit_owner
local timemachine
local timemachine_maxsize
local force_root
+ local write_list
+ local read_list
config_get name $1 name
config_get path $1 path
config_get dir_mask $1 dir_mask
config_get browseable $1 browseable
config_get read_only $1 read_only
+ config_get writeable $1 writeable
config_get guest_ok $1 guest_ok
config_get guest_only $1 guest_only
config_get inherit_owner $1 inherit_owner
config_get_bool timemachine $1 timemachine 0
config_get timemachine_maxsize $1 timemachine_maxsize
config_get_bool force_root $1 force_root 0
+ config_get write_list $1 write_list
+ config_get read_list $1 read_list
[ -z "$name" -o -z "$path" ] && return
[ -n "$browseable" ] && echo -e "\tbrowseable = $browseable" >> /var/etc/smb.conf
[ -n "$read_only" ] && echo -e "\tread only = $read_only" >> /var/etc/smb.conf
+ [ -n "$writeable" ] && echo -e "\twriteable = $writeable" >> /var/etc/smb.conf
[ -n "$guest_ok" ] && echo -e "\tguest ok = $guest_ok" >> /var/etc/smb.conf
[ -n "$guest_only" ] && echo -e "\tguest only = $guest_only" >> /var/etc/smb.conf
[ -n "$inherit_owner" ] && echo -e "\tinherit owner = $inherit_owner" >> /var/etc/smb.conf
-
+
+ [ -n "$write_list" ] && echo -e "\twrite list = $write_list" >> /var/etc/smb.conf
+ [ -n "$read_list" ] && echo -e "\tread list = $read_list" >> /var/etc/smb.conf
+
if [ "$MACOS" -eq 1 ]; then
vfs_objects="catia fruit streams_xattr $vfs_objects"
echo -e "\tfruit:encoding = native" >> /var/etc/smb.conf
--- /dev/null
+From a197e0cafb276a9b732f914b1f679ebb487b47f1 Mon Sep 17 00:00:00 2001
+From: pinglin <pinglin@synology.com>
+Date: Tue, 19 Mar 2019 20:46:27 +0800
+Subject: [PATCH] cross_compile argument doesn't apply
+
+reproduce:
+ ./configure --cross-compile --cross-answers=XXX
+
+The output log now will show correct cross-answers.
+---
+ third_party/waf/waflib/Context.py | 20 ++++++++++++++++++--
+ third_party/waf/waflib/Tools/c_config.py | 11 +++++++----
+ 2 files changed, 25 insertions(+), 6 deletions(-)
+
+diff --git a/third_party/waf/waflib/Context.py b/third_party/waf/waflib/Context.py
+index 3222fb1551c..d1c87512095 100644
+--- a/third_party/waf/waflib/Context.py
++++ b/third_party/waf/waflib/Context.py
+@@ -359,8 +359,16 @@ class Context(ctx):
+
+ encoding = kw.pop('decode_as', default_encoding)
+
++ exec_args = kw.pop('exec_args', [])
++ if isinstance(cmd, str):
++ cmd = [cmd] + exec_args
++ elif isinstance(cmd, list):
++ cmd = cmd + exec_args
+ try:
+- ret, out, err = Utils.run_process(cmd, kw, cargs)
++ if exec_args:
++ ret, out, err = Utils.run_regular_process(cmd, kw, cargs)
++ else:
++ ret, out, err = Utils.run_process(cmd, kw, cargs)
+ except Exception as e:
+ raise Errors.WafError('Execution failure: %s' % str(e), ex=e)
+
+@@ -438,8 +446,16 @@ class Context(ctx):
+
+ encoding = kw.pop('decode_as', default_encoding)
+
++ exec_args = kw.pop('exec_args', [])
++ if isinstance(cmd, str):
++ cmd = [cmd] + exec_args
++ elif isinstance(cmd, list):
++ cmd = cmd + exec_args
+ try:
+- ret, out, err = Utils.run_process(cmd, kw, cargs)
++ if exec_args:
++ ret, out, err = Utils.run_regular_process(cmd, kw, cargs)
++ else:
++ ret, out, err = Utils.run_process(cmd, kw, cargs)
+ except Exception as e:
+ raise Errors.WafError('Execution failure: %s' % str(e), ex=e)
+
+diff --git a/third_party/waf/waflib/Tools/c_config.py b/third_party/waf/waflib/Tools/c_config.py
+index 76082152cd9..25e468b0844 100644
+--- a/third_party/waf/waflib/Tools/c_config.py
++++ b/third_party/waf/waflib/Tools/c_config.py
+@@ -660,20 +660,23 @@ class test_exec(Task.Task):
+ """
+ color = 'PINK'
+ def run(self):
++ exec_args = Utils.to_list(self.generator.exec_args)
++
+ if getattr(self.generator, 'rpath', None):
+ if getattr(self.generator, 'define_ret', False):
+- self.generator.bld.retval = self.generator.bld.cmd_and_log([self.inputs[0].abspath()])
++ self.generator.bld.retval = self.generator.bld.cmd_and_log([self.inputs[0].abspath()], exec_args=exec_args)
+ else:
+- self.generator.bld.retval = self.generator.bld.exec_command([self.inputs[0].abspath()])
++ self.generator.bld.retval = self.generator.bld.exec_command([self.inputs[0].abspath()], exec_args=exec_args)
+ else:
+ env = self.env.env or {}
+ env.update(dict(os.environ))
+ for var in ('LD_LIBRARY_PATH', 'DYLD_LIBRARY_PATH', 'PATH'):
+ env[var] = self.inputs[0].parent.abspath() + os.path.pathsep + env.get(var, '')
++
+ if getattr(self.generator, 'define_ret', False):
+- self.generator.bld.retval = self.generator.bld.cmd_and_log([self.inputs[0].abspath()], env=env)
++ self.generator.bld.retval = self.generator.bld.cmd_and_log([self.inputs[0].abspath()], env=env, exec_args=exec_args)
+ else:
+- self.generator.bld.retval = self.generator.bld.exec_command([self.inputs[0].abspath()], env=env)
++ self.generator.bld.retval = self.generator.bld.exec_command([self.inputs[0].abspath()], env=env, exec_args=exec_args)
+
+ @feature('test_exec')
+ @after_method('apply_link')
+--
+2.17.1
+
--- /dev/null
+From f68bd76eab9a6e93b42f396a81aed64f65b99d1c Mon Sep 17 00:00:00 2001
+From: pinglin <pinglin@synology.com>
+Date: Mon, 25 Mar 2019 20:43:54 +0800
+Subject: [PATCH] fix rpath error, this commit related to the previous one
+
+---
+ buildtools/wafsamba/samba_waf18.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/buildtools/wafsamba/samba_waf18.py b/buildtools/wafsamba/samba_waf18.py
+index cc310fbf512..47acc5b3c06 100644
+--- a/buildtools/wafsamba/samba_waf18.py
++++ b/buildtools/wafsamba/samba_waf18.py
+@@ -220,7 +220,7 @@ def CHECK_LIBRARY_SUPPORT(conf, rpath=False, version_script=False, msg=None):
+ args = conf.SAMBA_CROSS_ARGS(msg=msg)
+ env = dict(os.environ)
+ env['LD_LIBRARY_PATH'] = self.inputs[0].parent.abspath() + os.pathsep + env.get('LD_LIBRARY_PATH', '')
+- self.generator.bld.cmd_and_log([self.inputs[0].abspath()] + args, env=env)
++ self.generator.bld.cmd_and_log([self.inputs[0].abspath()] + args, env=env, exec_args=args)
+ o.post()
+ bld(rule=run_app, source=o.link_task.outputs[0])
+
+--
+2.17.1
+
--- /dev/null
+From 41eeabcb0175659aebf6d480c43fb64310f37d9c Mon Sep 17 00:00:00 2001
+From: Andrew Bartlett <abartlet@samba.org>
+Date: Wed, 20 Mar 2019 13:57:50 +1300
+Subject: [PATCH] build: Allow build when --disable-gnutls is set
+
+BUG: https://bugzilla.samba.org/show_bug.cgi?id=13844
+
+Signed-off-by: Andrew Bartlett <abartlet@samba.org>
+---
+ lib/mscat/wscript | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/lib/mscat/wscript b/lib/mscat/wscript
+index 7ca9ef567ee..4d1f752a3c1 100644
+--- a/lib/mscat/wscript
++++ b/lib/mscat/wscript
+@@ -12,7 +12,11 @@ def configure(conf):
+ if not conf.find_program('asn1Parser', var='ASN1PARSER'):
+ Logs.warn('WARNING: ans1Parser hasn\'t been found! Please install it (e.g. libtasn1-bin)')
+
+- conf.CHECK_FUNCS_IN('gnutls_pkcs7_get_embedded_data_oid', 'gnutls')
++ # GnuTLS is currently able to be disabled
++ if conf.env.enable_gnutls:
++ conf.CHECK_FUNCS_IN('gnutls_pkcs7_get_embedded_data_oid', 'gnutls')
++ else:
++ Logs.warn('WARNING: gnutls disabled so dumpmscat will not be built')
+
+ def build(bld):
+ if (bld.CONFIG_SET('HAVE_LIBTASN1') and
+--
+2.11.0
+
--- /dev/null
+--- a/lib/replace/replace.h
++++ b/lib/replace/replace.h
+@@ -162,10 +162,6 @@
+ #include <bsd/unistd.h>
+ #endif
+
+-#ifdef HAVE_UNISTD_H
+-#include <unistd.h>
+-#endif
+-
+ #ifdef HAVE_STRING_H
+ #include <string.h>
+ #endif
}
- priv_path = private_path("msg.sock");
-+ priv_path = lock_path("msg.sock");
++ priv_path = lock_path(talloc_tos(), "msg.sock");
if (priv_path == NULL) {
return NT_STATUS_NO_MEMORY;
}
msg_ctx->msg_dgm_ref = messaging_dgm_ref(
msg_ctx, msg_ctx->event_ctx, &msg_ctx->id.unique_id,
- private_path("msg.sock"), lck_path,
-+ lock_path("msg.sock"), lck_path,
++ lock_path(talloc_tos(), "msg.sock"), lck_path,
messaging_recv_cb, msg_ctx, &ret);
if (msg_ctx->msg_dgm_ref == NULL) {
+++ /dev/null
-Some modules such as dynamic library maybe cann't be imported while cross compile,
-we just check whether does the module exist.
-
-Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com>
-
---- a/buildtools/wafsamba/samba_bundled.py
-+++ b/buildtools/wafsamba/samba_bundled.py
-@@ -2,6 +2,7 @@
-
- import sys
- import Build, Options, Logs
-+import imp, os
- from Configure import conf
- from samba_utils import TO_LIST
-
-@@ -249,17 +250,32 @@ def CHECK_BUNDLED_SYSTEM_PYTHON(conf, li
- # versions
- minversion = minimum_library_version(conf, libname, minversion)
-
-- try:
-- m = __import__(modulename)
-- except ImportError:
-- found = False
-- else:
-+ # Find module in PYTHONPATH
-+ stuff = imp.find_module(modulename, [os.environ["PYTHONPATH"]])
-+ if stuff:
- try:
-- version = m.__version__
-- except AttributeError:
-+ m = imp.load_module(modulename, stuff[0], stuff[1], stuff[2])
-+ except ImportError:
- found = False
-+
-+ if conf.env.CROSS_COMPILE:
-+ # Some modules such as dynamic library maybe cann't be imported
-+ # while cross compile, we just check whether the module exist
-+ Logs.warn('Cross module[%s] has been found, but can not be loaded.' % (stuff[1]))
-+ found = True
- else:
-- found = tuplize_version(version) >= tuplize_version(minversion)
-+ try:
-+ version = m.__version__
-+ except AttributeError:
-+ found = False
-+ else:
-+ found = tuplize_version(version) >= tuplize_version(minversion)
-+ finally:
-+ if stuff[0]:
-+ stuff[0].close()
-+ else:
-+ found = False
-+
- if not found and not conf.LIB_MAY_BE_BUNDLED(libname):
- Logs.error('ERROR: Python module %s of version %s not found, and bundling disabled' % (libname, minversion))
- sys.exit(1)
+++ /dev/null
---- a/libcli/smbreadline/wscript_configure
-+++ b/libcli/smbreadline/wscript_configure
-@@ -1,11 +1,13 @@
- #!/usr/bin/env python
-
-
--conf.CHECK_HEADERS('readline.h history.h readline/readline.h readline/history.h')
--for termlib in ['ncurses', 'curses', 'termcap', 'terminfo', 'termlib', 'tinfo']:
-- if conf.CHECK_FUNCS_IN('tgetent', termlib):
-- conf.env['READLINE_TERMLIB'] = termlib
-- break
-+#conf.CHECK_HEADERS('readline.h history.h readline/readline.h readline/history.h')
-+#for termlib in ['ncurses', 'curses', 'termcap', 'terminfo', 'termlib', 'tinfo']:
-+# if conf.CHECK_FUNCS_IN('tgetent', termlib):
-+# conf.env['READLINE_TERMLIB'] = termlib
-+# break
-+
-+conf.undefine('HAVE_READLINE_READLINE_H')
-
- #
- # Check if we need to work around readline/readline.h
--- /dev/null
+--- a/lib/crypto/wscript_configure
++++ b/lib/crypto/wscript_configure
+@@ -2,11 +2,11 @@
+ import Options
+ import Utils
+
+-if not conf.CHECK_FUNCS_IN('MD5Init', 'bsd', headers='bsd/md5.h',
+- checklibc=True):
+- conf.CHECK_FUNCS_IN('MD5Init', 'md5', headers='sys/md5.h',
+- checklibc=True)
+- conf.CHECK_FUNCS_IN('MD5Init', 'md', headers='sys/md5.h',
++# if not conf.CHECK_FUNCS_IN('MD5Init', 'bsd', headers='bsd/md5.h',
++ # checklibc=True):
++conf.CHECK_FUNCS_IN('MD5Init', 'md5', headers='sys/md5.h',
++ checklibc=True)
++conf.CHECK_FUNCS_IN('MD5Init', 'md', headers='sys/md5.h',
+ checklibc=True)
+ conf.CHECK_FUNCS_IN('CC_MD5_Init', '', headers='CommonCrypto/CommonDigest.h',
+ checklibc=True)
+--- a/lib/replace/wscript
++++ b/lib/replace/wscript
+@@ -340,22 +340,13 @@ def configure(conf):
+
+ conf.CHECK_FUNCS('prctl dirname basename')
+
+- strlcpy_in_bsd = False
++ # Not checking for libbsd
++ conf.CHECK_FUNCS('strlcpy strlcat')
++ conf.CHECK_FUNCS('getpeereid')
++ conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h')
++ conf.CHECK_FUNCS('setproctitle_init')
+
+- # libbsd on some platforms provides strlcpy and strlcat
+- if not conf.CHECK_FUNCS('strlcpy strlcat'):
+- if conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h',
+- checklibc=True):
+- strlcpy_in_bsd = True
+- if not conf.CHECK_FUNCS('getpeereid'):
+- conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h')
+- if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'):
+- conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h')
+- if not conf.CHECK_FUNCS('setproctitle_init'):
+- conf.CHECK_FUNCS_IN('setproctitle_init', 'bsd', headers='sys/types.h bsd/unistd.h')
+-
+- if not conf.CHECK_FUNCS('closefrom'):
+- conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h')
++ conf.CHECK_FUNCS('closefrom')
+
+ conf.CHECK_CODE('''
+ struct ucred cred;
+@@ -698,9 +689,6 @@ def configure(conf):
+
+ # look for a method of finding the list of network interfaces
+ for method in ['HAVE_IFACE_GETIFADDRS', 'HAVE_IFACE_AIX', 'HAVE_IFACE_IFCONF', 'HAVE_IFACE_IFREQ']:
+- bsd_for_strlcpy = ''
+- if strlcpy_in_bsd:
+- bsd_for_strlcpy = ' bsd'
+ if conf.CHECK_CODE('''
+ #define %s 1
+ #define NO_CONFIG_H 1
+@@ -713,7 +701,7 @@ def configure(conf):
+ #include "test/getifaddrs.c"
+ ''' % method,
+ method,
+- lib='nsl socket' + bsd_for_strlcpy,
++ lib='nsl socket',
+ addmain=False,
+ execute=True):
+ break
+@@ -761,7 +749,6 @@ def build(bld):
+ break
+
+ extra_libs = ''
+- if bld.CONFIG_SET('HAVE_LIBBSD'): extra_libs += ' bsd'
+
+ bld.SAMBA_SUBSYSTEM('LIBREPLACE_HOSTCC',
+ REPLACE_HOSTCC_SOURCE,
+++ /dev/null
---- a/lib/crypto/wscript_configure
-+++ b/lib/crypto/wscript_configure
-@@ -2,11 +2,11 @@
- import Options
- import Utils
-
--if not conf.CHECK_FUNCS_IN('MD5Init', 'bsd', headers='bsd/md5.h',
-- checklibc=True):
-- conf.CHECK_FUNCS_IN('MD5Init', 'md5', headers='sys/md5.h',
-- checklibc=True)
-- conf.CHECK_FUNCS_IN('MD5Init', 'md', headers='sys/md5.h',
-+# if not conf.CHECK_FUNCS_IN('MD5Init', 'bsd', headers='bsd/md5.h',
-+ # checklibc=True):
-+conf.CHECK_FUNCS_IN('MD5Init', 'md5', headers='sys/md5.h',
-+ checklibc=True)
-+conf.CHECK_FUNCS_IN('MD5Init', 'md', headers='sys/md5.h',
- checklibc=True)
- conf.CHECK_FUNCS_IN('CC_MD5_Init', '', headers='CommonCrypto/CommonDigest.h',
- checklibc=True)
---- a/lib/replace/wscript
-+++ b/lib/replace/wscript
-@@ -340,22 +340,13 @@ def configure(conf):
-
- conf.CHECK_FUNCS('prctl dirname basename')
-
-- strlcpy_in_bsd = False
-+ # Not checking for libbsd
-+ conf.CHECK_FUNCS('strlcpy strlcat')
-+ conf.CHECK_FUNCS('getpeereid')
-+ conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h')
-+ conf.CHECK_FUNCS('setproctitle_init')
-
-- # libbsd on some platforms provides strlcpy and strlcat
-- if not conf.CHECK_FUNCS('strlcpy strlcat'):
-- if conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h',
-- checklibc=True):
-- strlcpy_in_bsd = True
-- if not conf.CHECK_FUNCS('getpeereid'):
-- conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h')
-- if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'):
-- conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h')
-- if not conf.CHECK_FUNCS('setproctitle_init'):
-- conf.CHECK_FUNCS_IN('setproctitle_init', 'bsd', headers='sys/types.h bsd/unistd.h')
--
-- if not conf.CHECK_FUNCS('closefrom'):
-- conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h')
-+ conf.CHECK_FUNCS('closefrom')
-
- conf.CHECK_CODE('''
- struct ucred cred;
-@@ -698,9 +689,6 @@ def configure(conf):
-
- # look for a method of finding the list of network interfaces
- for method in ['HAVE_IFACE_GETIFADDRS', 'HAVE_IFACE_AIX', 'HAVE_IFACE_IFCONF', 'HAVE_IFACE_IFREQ']:
-- bsd_for_strlcpy = ''
-- if strlcpy_in_bsd:
-- bsd_for_strlcpy = ' bsd'
- if conf.CHECK_CODE('''
- #define %s 1
- #define NO_CONFIG_H 1
-@@ -713,7 +701,7 @@ def configure(conf):
- #include "test/getifaddrs.c"
- ''' % method,
- method,
-- lib='nsl socket' + bsd_for_strlcpy,
-+ lib='nsl socket',
- addmain=False,
- execute=True):
- break
-@@ -761,7 +749,6 @@ def build(bld):
- break
-
- extra_libs = ''
-- if bld.CONFIG_SET('HAVE_LIBBSD'): extra_libs += ' bsd'
-
- bld.SAMBA_SUBSYSTEM('LIBREPLACE_HOSTCC',
- REPLACE_HOSTCC_SOURCE,
--- /dev/null
+--- a/source3/modules/vfs_fruit.c 2019-07-09
++++ b/source3/modules/vfs_fruit.c 2019-07-09
+@@ -6995,12 +6995,12 @@ static bool fruit_tmsize_do_dirent(vfs_h
+ return true;
+ }
+
+- if (bandsize > SIZE_MAX/nbands) {
+- DBG_ERR("tmsize overflow: bandsize [%zu] nbands [%zu]\n",
+- bandsize, nbands);
+- return false;
+- }
+- tm_size = bandsize * nbands;
++ // if (bandsize > SIZE_MAX/nbands) {
++ // DBG_ERR("tmsize overflow: bandsize [%zu] nbands [%zu]\n",
++ // bandsize, nbands);
++ // return false;
++ // }
++ tm_size = (off_t)bandsize * (off_t)nbands;
+
+ if (state->total_size + tm_size < state->total_size) {
+ DBG_ERR("tmsize overflow: bandsize [%zu] nbands [%zu]\n",
include $(TOPDIR)/rules.mk
PKG_NAME:=scapy
-PKG_VERSION:=2.4.0
+PKG_VERSION:=2.4.2
PKG_RELEASE:=1
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=PKG-INFO
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/secdev/scapy/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=3836c62c33dd3f7c1ae30f5c2c1ab8078e4e32f5bf9c8be758dbaafe1c6a580e
+PKG_HASH:=141ee386cf6f296e8c9fae94a40a5386ac2d9bfa43a3870b13f575200c46b5f8
include $(INCLUDE_DIR)/package.mk
-include ../../lang/python/python-package.mk
+include ../../lang/python/python3-package.mk
define Package/scapy
SECTION:=net
TITLE:=Interactive packet manipulation tool and network scanner
MAINTAINER:=W. Michael Petullo <mike@flyn.org>
URL:=https://scapy.net/
- DEPENDS:=+python
+ DEPENDS:=+python3
endef
define Package/scapy/description
endef
define Build/Compile
- $(call Build/Compile/PyMod,., \
+ $(call Build/Compile/Py3Mod,., \
install --prefix="/usr" --root="$(PKG_INSTALL_DIR)", \
)
endef
define Package/scapy/install
- $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
+ $(INSTALL_DIR) $(1)$(PYTHON3_PKG_DIR)
$(INSTALL_DIR) $(1)/usr/bin
$(CP) \
- $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
- $(1)$(PYTHON_PKG_DIR)/
+ $(PKG_INSTALL_DIR)$(PYTHON3_PKG_DIR)/* \
+ $(1)$(PYTHON3_PKG_DIR)/
$(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin
endef
PKG_NAME:=seafile-ccnet
PKG_VERSION:=6.3.4
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_LICENSE:=GPL-3.0
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/haiwen/ccnet-server/tar.gz/v$(PKG_VERSION)-server?
PKG_HASH:=ab3d5bda728f87c71929a6247c9f74c5209b9b8e44bafa77db91e8de590ec6ef
PKG_BUILD_DIR:=$(BUILD_DIR)/ccnet-server-$(PKG_VERSION)-server
+PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
SECTION:=net
CATEGORY:=Network
TITLE:=Seafile server - ccnet component
- MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
URL:=http://seafile.com/
DEPENDS:=+libsearpc +libevent2 +libopenssl \
+glib2 +python +libzdb +libuuid \
PKG_NAME:=seafile-seahub
PKG_VERSION:=6.3.4
-PKG_RELEASE:=1
-PKG_LICENSE:=Apache-2.0
+PKG_RELEASE:=7
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/haiwen/seahub/tar.gz/v$(PKG_VERSION)-server?
PKG_HASH:=53a9efdb6791fd3a2a191e89cb0f133632056046ec08adbb2ad72088e6161430
-PKG_BUILD_DIR:=$(BUILD_DIR)/seahub-$(PKG_VERSION)-server
-PKG_BUILD_DEPENDS:=pytz/host
+PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=LICENSE.txt
+
+HOST_PYTHON_PACKAGE_BUILD_DEPENDS:="django>=1.11"
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/seahub-$(PKG_VERSION)-server
include $(INCLUDE_DIR)/package.mk
include ../../lang/python/python-package.mk
+SEAFILE_PYTHON_DEPENDS:= \
+ simplejson chardet dateutil mysql pytz qrcode requests requests-oauthlib \
+ django django-constance django-appconf django-compressor django-formtools \
+ django-jsonfield django-picklefield django-postoffice django-restframework \
+ pillow django-simple-captcha django-statici18n django-webpack-loader
+
define Package/seafile-seahub
- SECTION:=net
- CATEGORY:=Network
- TITLE:=Seafile server - seahub component
- MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
- URL:=https://seafile.com/
- DEPENDS:=+simplejson +python +pillow +chardet +django +django-appconf \
- +django-compressor +django-constance +django-formtools +django-jsonfield \
- +django-picklefield +django-postoffice +django-restframework \
- +django-simple-captcha +django-statici18n +django-webpack-loader +et_xmlfile \
- +flup +gunicorn +jdcal +openpyxl +python-dateutil +python-mysql \
- +python-qrcode +python-requests +python-requests-oauthlib +pytz +rcssmin
+ SECTION:=net
+ CATEGORY:=Network
+ TITLE:=Seafile server - seahub component
+ URL:=https://seafile.com/
+ DEPENDS:=+python \
+ +python-flup +gunicorn +openpyxl \
+ $(foreach dep,$(SEAFILE_PYTHON_DEPENDS),+python-$(dep))
endef
define Build/Configure
endef
+MAKE_VARS += \
+ PYTHON="$(HOST_PYTHON_BIN)" \
+ DJANGO_ADMIN_PY="$(STAGING_DIR_HOSTPKG)/bin/django-admin"
+
define Build/Compile
+ $(call Build/Compile/HostPyPipInstall,$(HOST_PYTHON_PACKAGE_BUILD_DEPENDS))
$(call Build/Compile/Default,locale)
endef
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,6 @@
-+include $(TOPDIR)/rules.mk
-+include $(TOPDIR)/feeds/packages/lang/python/python-package.mk
++PYTHON ?= python
++DJANGO_ADMIN_PY ?= django-admin.py
+
PROJECT=seahub
locale:
@echo "--> Compile locales"
- django-admin.py compilemessages
-+ $(call HostPython,,$(STAGING_DIR)/usr/bin/django-admin.py compilemessages)
++ $(DJANGO_ADMIN_PY) compilemessages
@echo ""
uglify:
statici18n:
@echo "--> Generate JS locale files in static/scripts/i18n"
- python manage.py compilejsi18n
-+ $(call HostPython,,manage.py compilejsi18n)
++ $(PYTHON) manage.py compilejsi18n
collectstatic:
@echo "--> Collect django static files to media/assets"
rm -rf media/assets 2> /dev/null
- python manage.py collectstatic --noinput -i admin -i termsandconditions -i app -i sysadmin-app -i build.js
-+ $(call HostPython,,manage.py collectstatic --noinput -i admin -i termsandconditions -i app -i sysadmin-app -i build.js)
++ $(PYTHON) manage.py collectstatic --noinput -i admin -i termsandconditions -i app -i sysadmin-app -i build.js
compressstatic:
@echo "--> Compress static files(css) to media/CACHE"
rm -rf media/CACHE 2> /dev/null
- python manage.py compress
-+ $(call HostPython,,manage.py compress)
++ $(PYTHON) manage.py compress
clean:
@echo '--> Cleaning media/static cache & dist'
config SEAFILE_CONSOLE_SUPPORT
bool "Enable seafile server console"
default n
-
-config SEAFILE_RIAK_SUPPORT
- bool "Enable support for riak backend"
- default n
endmenu
PKG_NAME:=seafile-server
PKG_VERSION:=6.3.4
-PKG_RELEASE:=1
+PKG_RELEASE:=6
PKG_LICENSE:=GPL-3.0
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/haiwen/seafile-server/tar.gz/v$(PKG_VERSION)-server?
PKG_HASH:=1ba4c641bad8d7592fd2592827e81470c88b8e802707d2b1e6d551c16d0da100
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-server
+PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
include $(INCLUDE_DIR)/nls.mk
include ../../lang/python/python-package.mk
+# Check that the actual Makefile version-relase match the above.
+$(eval $(shell awk '/^PKG_VERSION.*=/ { print "SEAHUB_" $$$$0 }' ../seafile-seahub/Makefile))
+ifneq ($(PKG_VERSION),$(SEAHUB_PKG_VERSION))
+ $(error $(if $(SEAHUB_PKG_VERSION), \
+ Version mismatch between seafile-seahub ($(SEAHUB_PKG_VERSION)) and \
+ seafile-server ($(PKG_VERSION)), \
+ Could not get PKG_VERSION from seafile-seahub Makefile))
+endif
+
define Package/seafile-server
SECTION:=net
CATEGORY:=Network
TITLE:=Seafile server
- MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
URL:=https://seafile.com/
DEPENDS:=+libarchive +libopenssl +glib2 +libsearpc +seafile-ccnet +seafile-seahub +sqlite3-cli +python-mysql +python-urllib3 \
- +jansson +libevent2 +libevent2-openssl +zlib +libzdb +libsqlite3 +libmysqlclient \
+ +jansson +libevent2 +libevent2-openssl +zlib +libzdb +libsqlite3 +libmysqlclient +oniguruma \
+libpthread +libuuid +bash +procps-ng +procps-ng-pkill +SEAFILE_FUSE_SUPPORT:libfuse $(ICONV_DEPENDS)
- EXTRA_DEPENDS:=seafile-seahub (=6.3.4-1)
MENU:=1
endef
Open source cloud storage with advanced features on privacy protection and teamwork.
endef
-CONFIGURE_ARGS += --disable-client \
- --enable-server \
- --enable-python \
- --disable-static-build \
- --disable-server-pkg
+CONFIGURE_ARGS += --enable-python
ifeq ($(CONFIG_SEAFILE_FUSE_SUPPORT),y)
CONFIGURE_ARGS += --enable-fuse
CONFIGURE_ARGS += --disable-console
endif
-ifeq ($(CONFIG_SEAFILE_RIAK_SUPPORT),y)
- CONFIGURE_ARGS += --enable-riak
-else
- CONFIGURE_ARGS += --disable-riak
-endif
-
PKG_BUILD_DEPENDS:=vala/host libevhtp
# This is required as python-package.mk overrides the default setting of having interlinking enabled
TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib -liconv \
-L$(STAGING_DIR)/usr/lib/mysql -lmysqlclient -lz -levent_openssl -levent
+ifdef CONFIG_GCC_LIBSSP
+TARGET_LDFLAGS += -lssp
+endif
+
define Package/seafile-server/conffiles
/etc/config/seafile
endef
+From 115a4583deb9ae11adbc419ea87c990d0b8572fe Mon Sep 17 00:00:00 2001
+From: Joffrey Darcq <j-off@live.fr>
+Date: Sat, 28 Apr 2018 22:27:28 +0200
+Subject: [PATCH 1/2] fix django version 1.11
+
+---
+ tools/seafile-admin | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
diff --git a/tools/seafile-admin b/tools/seafile-admin
-index 495ceab..72b6a07 100755
+index 5e3658b..38e7288 100755
--- a/tools/seafile-admin
+++ b/tools/seafile-admin
-@@ -502,7 +502,7 @@ def init_seahub():
+@@ -518,10 +518,10 @@ def init_seahub():
+
+
+ def check_django_version():
+- '''Requires django 1.8'''
++ '''Requires django 1.11'''
+ import django
+- if django.VERSION[0] != 1 or django.VERSION[1] != 8:
+- error('Django 1.8 is required')
++ if django.VERSION[0] != 1 or django.VERSION[1] != 11:
++ error('Django 1.11 is required')
+ del django
+
+
+
+From bf69ff1cf1080081eae5d8115842c26468746736 Mon Sep 17 00:00:00 2001
+From: Joffrey Darcq <j-off@live.fr>
+Date: Sun, 3 Jun 2018 15:51:54 +0200
+Subject: [PATCH 2/2] fix django version 1.11
+
+---
+ tools/seafile-admin | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/tools/seafile-admin b/tools/seafile-admin
+index 38e7288..c16aab6 100755
+--- a/tools/seafile-admin
++++ b/tools/seafile-admin
+@@ -499,8 +499,8 @@ def init_seahub():
# create seahub_settings.py
create_seahub_settings_py()
- argv = [PYTHON, 'manage.py', 'syncdb']
+- # Set proper PYTHONPATH before run django syncdb command
+ argv = [PYTHON, 'manage.py', 'migrate']
- # Set proper PYTHONPATH before run django syncdb command
++ # Set proper PYTHONPATH before run django migrate command
env = get_seahub_env()
-@@ -512,7 +512,7 @@ def init_seahub():
+ print
+@@ -509,7 +509,7 @@ def init_seahub():
print
if run_argv(argv, cwd=seahub_dir, env=env) != 0:
--- /dev/null
+Author: David Barbion <davidb@230ruedubac.fr>
+Description: Use shared object for libevhtp
+Forwarded: https://github.com/haiwen/seafile-server/pull/12
+
+Index: seafile-server/configure.ac
+===================================================================
+--- seafile-server.orig/configure.ac
++++ seafile-server/configure.ac
+@@ -218,6 +218,10 @@ PKG_CHECK_MODULES(LIBEVENT, [libevent >=
+ AC_SUBST(LIBEVENT_CFLAGS)
+ AC_SUBST(LIBEVENT_LIBS)
+
++PKG_CHECK_MODULES(LIBEVHTP, [evhtp])
++AC_SUBST(LIBEVHTP_CFLAGS)
++AC_SUBST(LIBEVHTP_LIBS)
++
+ PKG_CHECK_MODULES(ZLIB, [zlib >= $ZLIB_REQUIRED])
+ AC_SUBST(ZLIB_CFLAGS)
+ AC_SUBST(ZLIB_LIBS)
+Index: seafile-server/server/Makefile.am
+===================================================================
+--- seafile-server.orig/server/Makefile.am
++++ seafile-server/server/Makefile.am
+@@ -13,6 +13,7 @@ AM_CFLAGS = -DPKGDATADIR=\"$(pkgdatadir)
+ @GLIB2_CFLAGS@ \
+ @MSVC_CFLAGS@ \
+ @LIBARCHIVE_CFLAGS@ \
++ @LIBEVHTP_CFLAGS@ \
+ -Wall
+
+ bin_PROGRAMS = seaf-server
+@@ -114,7 +115,7 @@ seaf_server_SOURCES = \
+
+ seaf_server_LDADD = @CCNET_LIBS@ \
+ $(top_builddir)/lib/libseafile_common.la \
+- @GLIB2_LIBS@ @GOBJECT_LIBS@ @SSL_LIBS@ @LIB_RT@ @LIB_UUID@ -lsqlite3 @LIBEVENT_LIBS@ -levhtp \
++ -lonig @GLIB2_LIBS@ @GOBJECT_LIBS@ @SSL_LIBS@ @LIB_RT@ @LIB_UUID@ -lsqlite3 @LIBEVENT_LIBS@ @LIBEVHTP_LIBS@ \
+ $(top_builddir)/common/cdc/libcdc.la \
+ $(top_builddir)/common/db-wrapper/libdbwrapper.la \
+ @SEARPC_LIBS@ @JANSSON_LIBS@ ${LIB_WS32} @ZLIB_LIBS@ \
--- /dev/null
+Author: Alexandre Rossi <alexandre.rossi@gmail.com>
+Description: Fix download stalling on recent libevhtp
+ A while ago[1], evhtp_request_pause() behavior changed: it now disables
+ both read and write events. seafile-server would then stall.
+ .
+ [1] https://github.com/criticalstack/libevhtp/commit/6cd89466fd6bd76c5b8624be65af5893afe3e40c
+ [2] https://github.com/haiwen/seafile/issues/1119
+Forwarded: no
+
+Index: seafile-server/server/access-file.c
+===================================================================
+--- seafile-server.orig/server/access-file.c 2018-02-01 12:23:53.209308343 +0100
++++ seafile-server/server/access-file.c 2018-02-01 12:23:53.205308288 +0100
+@@ -618,7 +618,7 @@
+ /* Block any new request from this connection before finish
+ * handling this request.
+ */
+- evhtp_request_pause (req);
++ bufferevent_disable(bev, EV_READ);
+
+ /* Kick start data transfer by sending out http headers. */
+ evhtp_send_reply_start(req, EVHTP_RES_OK);
+@@ -967,7 +967,7 @@
+ /* Block any new request from this connection before finish
+ * handling this request.
+ */
+- evhtp_request_pause (req);
++ bufferevent_disable(bev, EV_READ);
+
+ /* Kick start data transfer by sending out http headers. */
+ evhtp_send_reply_start(req, EVHTP_RES_PARTIAL);
+@@ -1032,7 +1032,7 @@
+ /* Block any new request from this connection before finish
+ * handling this request.
+ */
+- evhtp_request_pause (req);
++ bufferevent_disable(bev, EV_READ);
+
+ /* Kick start data transfer by sending out http headers. */
+ evhtp_send_reply_start(req, EVHTP_RES_OK);
+@@ -1365,7 +1365,7 @@
+ /* Block any new request from this connection before finish
+ * handling this request.
+ */
+- evhtp_request_pause (req);
++ bufferevent_disable(bev, EV_READ);
+
+ /* Kick start data transfer by sending out http headers. */
+ evhtp_send_reply_start(req, EVHTP_RES_OK);
+Index: seafile-server/server/upload-file.c
+===================================================================
+--- seafile-server.orig/server/upload-file.c 2018-02-01 12:23:53.209308343 +0100
++++ seafile-server/server/upload-file.c 2018-02-01 12:25:14.542400155 +0100
+@@ -2054,6 +2054,7 @@
+ if (res != EVHTP_RES_OK) {
+ /* Don't receive any data before the connection is closed. */
+ //evhtp_request_pause (req);
++ // or for later evhtp bufferevent_disable(evhtp_request_get_bev(req), EV_READ);
+
+ /* Set keepalive to 0. This will cause evhtp to close the
+ * connection after sending the reply.
+@@ -2271,6 +2272,7 @@
+ err:
+ /* Don't receive any data before the connection is closed. */
+ //evhtp_request_pause (req);
++ // or for later evhtp bufferevent_disable(evhtp_request_get_bev(req), EV_READ);
+
+ /* Set keepalive to 0. This will cause evhtp to close the
+ * connection after sending the reply.
--- /dev/null
+Author: Alexandre Rossi <alexandre.rossi@gmail.com>
+Description: Take into account libevhtp API changes
+Forwarded: no
+
+Index: seafile-server/server/upload-file.c
+===================================================================
+--- seafile-server.orig/server/upload-file.c 2018-02-01 12:25:52.666911934 +0100
++++ seafile-server/server/upload-file.c 2018-02-01 12:27:37.812323399 +0100
+@@ -2059,7 +2059,7 @@
+ /* Set keepalive to 0. This will cause evhtp to close the
+ * connection after sending the reply.
+ */
+- req->keepalive = 0;
++ req->flags &= ~EVHTP_REQ_FLAG_KEEPALIVE;
+
+ fsm->state = RECV_ERROR;
+ }
+@@ -2260,8 +2260,8 @@
+ }
+
+ /* Set up per-request hooks, so that we can read file data piece by piece. */
+- evhtp_set_hook (&req->hooks, evhtp_hook_on_read, upload_read_cb, fsm);
+- evhtp_set_hook (&req->hooks, evhtp_hook_on_request_fini, upload_finish_cb, fsm);
++ evhtp_request_set_hook (req, evhtp_hook_on_read, upload_read_cb, fsm);
++ evhtp_request_set_hook (req, evhtp_hook_on_request_fini, upload_finish_cb, fsm);
+ /* Set arg for upload_cb or update_cb. */
+ req->cbarg = fsm;
+
+@@ -2277,7 +2277,7 @@
+ /* Set keepalive to 0. This will cause evhtp to close the
+ * connection after sending the reply.
+ */
+- req->keepalive = 0;
++ req->flags &= ~EVHTP_REQ_FLAG_KEEPALIVE;
+ send_error_reply (req, EVHTP_RES_BADREQ, err_msg);
+
+ g_free (repo_id);
+@@ -2346,38 +2346,32 @@
+
+ cb = evhtp_set_regex_cb (htp, "^/upload/.*", upload_cb, NULL);
+ /* upload_headers_cb() will be called after evhtp parsed all http headers. */
+- evhtp_set_hook(&cb->hooks, evhtp_hook_on_headers, upload_headers_cb, NULL);
++ evhtp_callback_set_hook(cb, evhtp_hook_on_headers, upload_headers_cb, NULL);
+
+ cb = evhtp_set_regex_cb (htp, "^/upload-api/.*", upload_api_cb, NULL);
+- evhtp_set_hook(&cb->hooks, evhtp_hook_on_headers, upload_headers_cb, NULL);
++ evhtp_callback_set_hook(cb, evhtp_hook_on_headers, upload_headers_cb, NULL);
+
+ cb = evhtp_set_regex_cb (htp, "^/upload-raw-blks-api/.*",
+ upload_raw_blks_api_cb, NULL);
+- evhtp_set_hook(&cb->hooks, evhtp_hook_on_headers, upload_headers_cb, NULL);
++ evhtp_callback_set_hook(cb, evhtp_hook_on_headers, upload_headers_cb, NULL);
+
+ cb = evhtp_set_regex_cb (htp, "^/upload-blks-api/.*", upload_blks_api_cb, NULL);
+- evhtp_set_hook(&cb->hooks, evhtp_hook_on_headers, upload_headers_cb, NULL);
+-
+- /* cb = evhtp_set_regex_cb (htp, "^/upload-blks-aj/.*", upload_blks_ajax_cb, NULL); */
+- /* evhtp_set_hook(&cb->hooks, evhtp_hook_on_headers, upload_headers_cb, NULL); */
++ evhtp_callback_set_hook(cb, evhtp_hook_on_headers, upload_headers_cb, NULL);
+
+ cb = evhtp_set_regex_cb (htp, "^/upload-aj/.*", upload_ajax_cb, NULL);
+- evhtp_set_hook(&cb->hooks, evhtp_hook_on_headers, upload_headers_cb, NULL);
++ evhtp_callback_set_hook(cb, evhtp_hook_on_headers, upload_headers_cb, NULL);
+
+ cb = evhtp_set_regex_cb (htp, "^/update/.*", update_cb, NULL);
+- evhtp_set_hook(&cb->hooks, evhtp_hook_on_headers, upload_headers_cb, NULL);
++ evhtp_callback_set_hook(cb, evhtp_hook_on_headers, upload_headers_cb, NULL);
+
+ cb = evhtp_set_regex_cb (htp, "^/update-api/.*", update_api_cb, NULL);
+- evhtp_set_hook(&cb->hooks, evhtp_hook_on_headers, upload_headers_cb, NULL);
++ evhtp_callback_set_hook(cb, evhtp_hook_on_headers, upload_headers_cb, NULL);
+
+ cb = evhtp_set_regex_cb (htp, "^/update-blks-api/.*", update_blks_api_cb, NULL);
+- evhtp_set_hook(&cb->hooks, evhtp_hook_on_headers, upload_headers_cb, NULL);
+-
+- /* cb = evhtp_set_regex_cb (htp, "^/update-blks-aj/.*", update_blks_ajax_cb, NULL); */
+- /* evhtp_set_hook(&cb->hooks, evhtp_hook_on_headers, upload_headers_cb, NULL); */
++ evhtp_callback_set_hook(cb, evhtp_hook_on_headers, upload_headers_cb, NULL);
+
+ cb = evhtp_set_regex_cb (htp, "^/update-aj/.*", update_ajax_cb, NULL);
+- evhtp_set_hook(&cb->hooks, evhtp_hook_on_headers, upload_headers_cb, NULL);
++ evhtp_callback_set_hook(cb, evhtp_hook_on_headers, upload_headers_cb, NULL);
+
+ evhtp_set_regex_cb (htp, "^/upload_progress.*", upload_progress_cb, NULL);
+
PKG_NAME:=ser2net
PKG_VERSION:=3.5.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/ser2net
SECTION:=net
CATEGORY:=Network
TITLE:=Serial to Network Proxy
- URL:=http://sourceforge.net/projects/ser2net/
- DEPENDS:=+USE_UCLIBC:libpthread +USE_UCLIBC:librt
+ URL:=https://sourceforge.net/projects/ser2net/
endef
define Package/ser2net/description
#
-# Copyright (C) 2017-2018 Yousong Zhou <yszhou4tech@gmail.com>
+# Copyright (C) 2017-2019 Yousong Zhou <yszhou4tech@gmail.com>
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
# - check if default mode has changed from being tcp_only
#
PKG_NAME:=shadowsocks-libev
-PKG_VERSION:=3.2.3
-PKG_RELEASE:=4
+PKG_VERSION:=3.3.0
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/shadowsocks/shadowsocks-libev/releases/download/v$(PKG_VERSION)
-PKG_HASH:=2befc27b1cc62af0450702343d17e347936f0d4e3d4b04ba9246c4f9b409b742
+PKG_HASH:=9732f8b8f02ffeea261bcf15fbf104f826012f74dbee99d016b75f0894a39649
PKG_MAINTAINER:=Yousong Zhou <yszhou4tech@gmail.com>
PKG_INSTALL:=1
PKG_USE_MIPS16:=0
PKG_BUILD_PARALLEL:=1
+PKG_BUILD_DEPENDS:=c-ares pcre
include $(INCLUDE_DIR)/package.mk
SUBMENU:=Web Servers/Proxies
TITLE:=shadowsocks-libev $(1)
URL:=https://github.com/shadowsocks/shadowsocks-libev
- DEPENDS:=+libcares +libev +libmbedtls +libpcre +libpthread +libsodium +shadowsocks-libev-config +zlib
+ DEPENDS:=+libev +libmbedtls +libpthread +libsodium +shadowsocks-libev-config $(DEPENDS_$(1))
endef
define Package/shadowsocks-libev-$(1)/install
endef
+DEPENDS_ss-local = +libpcre
+DEPENDS_ss-server = +libcares +libpcre
+
SHADOWSOCKS_COMPONENTS:=ss-local ss-redir ss-tunnel ss-server
define shadowsocks-libev/templates
$(foreach component,$(SHADOWSOCKS_COMPONENTS),
--disable-assert \
--disable-ssp \
+TARGET_CFLAGS += -flto
+TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
+
$(eval $(call BuildPackage,shadowsocks-libev-config))
$(eval $(call BuildPackage,shadowsocks-libev-ss-rules))
$(foreach component,$(SHADOWSOCKS_COMPONENTS), \
-## components
+Skip to [recipes](#recipes) for quick setup instructions
+
+# components
`ss-local` provides SOCKS5 proxy with UDP associate support.
`ss-server`, the "ss server" in the above diagram
-## uci
+# uci
Option names are the same as those used in json config files. Check `validate_xxx` func definition of the [service script](files/shadowsocks-libev.init) and shadowsocks-libev's own documentation for supported options and expected value types. A [sample config file](files/shadowsocks-libev.config) is also provided for reference.
Section type `ss_local`, `ss_redir`, `ss_tunnel` are for specification of shadowsocks-libev components. They share mostly a common set of options like `local_port`, `verbose`, `fast_open`, `timeout`, etc.
+Plugin options should be specified in `server` section and will be inherited by other compoenents referring to it.
+
We can have multiple instances of component and `server` sections. The relationship between them is many-to-one. This will have the following implications
- It's possible to have both `ss_local` and `ss_redir` referring to the same `server` definition
Note also that `src_ips_xx` and `dst_ips_xx` actually also accepts cidr network representation. Option names are retained in its current form for backward compatibility coniderations
-## notes and faq
+# incompatible changes
+
+| Commit date | Commit ID | Subject | Comment |
+| ----------- | --------- | ------- | ------- |
+| 2019-05-09 | afe7d3424 | shadowsocks-libev: move plugin options to server section | This is a revision against c19e949 committed 2019-05-06 |
+| 2017-07-02 | b61af9703 | shadowsocks-libev: rewrite | Packaging of shadowsocks-libev was rewritten from scratch |
+
+# notes and faq
Useful paths and commands for debugging
ss-redir needs to open a new socket and setsockopt IP_TRANSPARENT when sending udp reply to client. This requires `CAP_NET_ADMIN` and as such the process cannot run as `nobody`
ss-local, ss-redir, etc. supports specifying an array of remote ss server, but supporting this in uci seems to be overkill. The workaround can be defining multiple `server` sections and multiple `ss-redir` instances with `reuse_port` enabled
+
+# recipes
+
+## forward all
+
+This will setup firewall rules to forward almost all incoming tcp/udp and locally generated tcp traffic (excluding those to private addresses like 192.168.0.0/16 etc.) through remote shadowsocks server
+
+Install components.
+Retry each command till it succeed
+
+ opkg install shadowsocks-libev-ss-redir
+ opkg install shadowsocks-libev-ss-rules
+ opkg install shadowsocks-libev-ss-tunnel
+
+Edit uci config `/etc/config/shadowsocks-libev`.
+Replace `config server 'sss0'` section with parameters of your own remote shadowsocks server.
+As for other options, change them only when you know the effect.
+
+ config server 'sss0'
+ option disabled 0
+ option server '_sss_addr_'
+ option server_port '_sss_port_'
+ option password '********'
+ option method 'aes-256-cfb'
+
+ config ss_tunnel
+ option disabled 0
+ option server 'sss0'
+ option local_address '0.0.0.0'
+ option local_port '8053'
+ option tunnel_address '8.8.8.8:53'
+ option mode 'tcp_and_udp'
+
+ config ss_redir ssr0
+ option disabled 0
+ option server 'sss0'
+ option local_address '0.0.0.0'
+ option local_port '1100'
+ option mode 'tcp_and_udp'
+ option reuse_port 1
+
+ config ss_rules 'ss_rules'
+ option disabled 0
+ option redir_tcp 'ssr0'
+ option redir_udp 'ssr0'
+ option src_default 'checkdst'
+ option dst_default 'forward'
+ option local_default 'forward'
+
+Restart shadowsocks-libev components
+
+ /etc/init.d/shadowsocks-libev restart
+
+Check if things are in place
+
+ iptables-save | grep ss_rules
+ netstat -lntp | grep -E '8053|1100'
+ ps ww | grep ss-
+
+Edit `/etc/config/dhcp`, add a line to the first dnsmasq section like the following to let it use local tunnel endpoint for upstream dns query
+
+ config dnsmasq
+ ...
+ list server '127.0.0.1#8053'
+
+Restart dnsmasq
+
+ /etc/init.d/dnsmasq restart
+
+Check network on your computer
+
+ nslookup www.google.com
+ curl -vv https://www.google.com
#!/bin/sh /etc/rc.common
#
-# Copyright (C) 2017 Yousong Zhou <yszhou4tech@gmail.com>
+# Copyright (C) 2017-2019 Yousong Zhou <yszhou4tech@gmail.com>
#
# This is free software, licensed under the GNU General Public License v3.
# See /LICENSE for more information.
ss_confdir=/var/etc/shadowsocks-libev
ss_bindir=/usr/bin
-q='"'
-
-ss_mkjson() {
- echo "{" >"$confjson"
- if ss_mkjson_ "$@" >>$confjson; then
- sed -i -e '/^\s*$/d' -e '2,$s/^/\t/' -e '$s/,$//' "$confjson"
- echo "}" >>"$confjson"
- else
- rm -f "$confjson"
- return 1
- fi
-}
-
-ss_mkjson_() {
- local func
-
- for func in "$@"; do
- "$func" || return 1
- done
-}
ss_mkjson_server_conf() {
local cfgserver
ss_mkjson_server_conf_() {
[ -n "$server_port" ] || return 1
- password="${password//\"/\\\"}"
- cat <<-EOF
- ${server:+${q}server${q}: ${q}$server${q},}
- "server_port": $server_port,
- ${method:+${q}method${q}: ${q}$method${q},}
- ${key:+${q}key${q}: ${q}$key${q},}
- ${password:+${q}password${q}: ${q}$password${q},}
- EOF
-}
-
-ss_mkjson_common_conf() {
- [ "$ipv6_first" = 0 ] && ipv6_first=false || ipv6_first=true
- [ "$fast_open" = 0 ] && fast_open=false || fast_open=true
- [ "$reuse_port" = 0 ] && reuse_port=false || reuse_port=true
- cat <<-EOF
- "use_syslog": true,
- "ipv6_first": $ipv6_first,
- "fast_open": $fast_open,
- "reuse_port": $reuse_port,
- ${local_address:+${q}local_address${q}: ${q}$local_address${q},}
- ${local_port:+${q}local_port${q}: $local_port,}
- ${mode:+${q}mode${q}: ${q}$mode${q},}
- ${mtu:+${q}mtu${q}: $mtu,}
- ${timeout:+${q}timeout${q}: $timeout,}
- ${user:+${q}user${q}: ${q}$user${q},}
- EOF
+ [ -z "$server" ] || json_add_string server "$server"
+ json_add_int server_port "$server_port"
+ [ -z "$method" ] || json_add_string method "$method"
+ [ -z "$key" ] || json_add_string key "$key"
+ [ -z "$password" ] || json_add_string password "$password"
+ [ -z "$plugin" ] || json_add_string plugin "$plugin"
+ [ -z "$plugin_opts" ] || json_add_string plugin_opts "$plugin_opts"
}
ss_mkjson_ss_local_conf() {
ss_mkjson_ss_tunnel_conf() {
ss_mkjson_server_conf || return 1
[ -n "$tunnel_address" ] || return 1
- cat <<-EOF
- ${tunnel_address:+${q}tunnel_address${q}: ${q}$tunnel_address${q},}
- EOF
+ json_add_string tunnel_address "$tunnel_address"
}
ss_xxx() {
[ -x "$bin" ] || return
eval "$("validate_${cfgtype}_section" "$cfg" ss_validate_mklocal)"
- "validate_${cfgtype}_section" "$cfg" || return 1
+ "validate_${cfgtype}_section" "$cfg" || return
[ "$disabled" = 0 ] || return
- if ss_mkjson \
- ss_mkjson_common_conf \
- ss_mkjson_${cfgtype}_conf \
- ; then
- procd_open_instance "$cfgtype.$cfg"
- procd_set_param command "$bin" -c "$confjson"
- [ "$verbose" = 0 ] || procd_append_param command -v
- [ "$no_delay" = 0 ] || procd_append_param command --no-delay
- [ -z "$bind_address" ] || procd_append_param command -b "$bind_address"
- procd_set_param file "$confjson"
- procd_set_param respawn
- procd_close_instance
- ss_rules_cb
- fi
+ json_init
+ ss_mkjson_${cfgtype}_conf || return
+ json_add_boolean use_syslog 1
+ json_add_boolean ipv6_first "$ipv6_first"
+ json_add_boolean fast_open "$fast_open"
+ json_add_boolean reuse_port "$reuse_port"
+ json_add_boolean no_delay "$no_delay"
+ [ -z "$local_address" ] || json_add_string local_address "$local_address"
+ [ -z "$local_port" ] || json_add_int local_port "$local_port"
+ [ -z "$mode" ] || json_add_string mode "$mode"
+ [ -z "$mtu" ] || json_add_int mtu "$mtu"
+ [ -z "$timeout" ] || json_add_int timeout "$timeout"
+ [ -z "$user" ] || json_add_string user "$user"
+ json_dump -i >"$confjson"
+
+ procd_open_instance "$cfgtype.$cfg"
+ procd_set_param command "$bin" -c "$confjson"
+ [ "$verbose" = 0 ] || procd_append_param command -v
+ [ -z "$bind_address" ] || procd_append_param command -b "$bind_address"
+ procd_set_param file "$confjson"
+ procd_set_param respawn
+ procd_close_instance
+ ss_rules_cb
}
ss_rules_cb() {
[ -x "$bin" ] || return 1
"$bin" -f
- "$bin" -f -6
+ "$bin" -6 -f
config_get cfgtype "$cfg" TYPE
[ "$cfgtype" = ss_rules ] || return 1
stop_service() {
local bin="$ss_bindir/ss-rules"
- [ -x "$bin" ] && "$bin" -f
+ [ -x "$bin" ] && {
+ "$bin" -f
+ "$bin" -6 -f
+ }
rm -rf "$ss_confdir"
}
'server_port:port' \
'password:string' \
'key:string' \
- "method:or($stream_methods, $aead_methods)"
+ "method:or($stream_methods, $aead_methods)" \
+ 'plugin:string' \
+ 'plugin_opts:string'
}
validate_common_client_options_() {
}
if [ "$1" = "-6" ]; then
- if ! ip6tables -t nat -L -n >/dev/null; then
- __errmsg "Skipping ipv6. Please install ip6tables-mod-nat"
+ if ! ip6tables -t nat -L -n &>/dev/null; then
+ __errmsg "Skipping ipv6. Requires ip6tables-mod-nat"
exit 1
fi
o_use_ipv6=1; shift
:ss_rules_local_out -
-I OUTPUT 1 -p tcp -j ss_rules_local_out
-A ss_rules_local_out -m set --match-set ss_rules${o_af}_dst_bypass_ dst -j RETURN
- -A ss_rules_local_out -p tcp $o_ipt_extra -j $local_target -m comment --comment "local_default: $o_local_default"
+ -A ss_rules_local_out $o_ipt_extra -j $local_target
COMMIT
EOF
}
:ss_rules_forward -
$(ss_rules_iptchains_mkprerules "$proto")
-A ss_rules_pre_src -m set --match-set ss_rules${o_af}_dst_bypass_ dst -j RETURN
- -A ss_rules_pre_src -p $proto $o_ipt_extra -j ss_rules_src
+ -A ss_rules_pre_src $o_ipt_extra -j ss_rules_src
-A ss_rules_src -m set --match-set ss_rules${o_af}_src_bypass src -j RETURN
-A ss_rules_src -m set --match-set ss_rules${o_af}_src_forward src -j ss_rules_forward
-A ss_rules_src -m set --match-set ss_rules${o_af}_src_checkdst src -j ss_rules_dst
- -A ss_rules_src -j $src_default_target -m comment --comment "src_default: $o_src_default"
+ -A ss_rules_src -j $src_default_target
-A ss_rules_dst -m set --match-set ss_rules${o_af}_dst_bypass dst -j RETURN
-A ss_rules_dst -m set --match-set ss_rules${o_af}_dst_forward dst -j ss_rules_forward
$recentrst_addset_rules
- -A ss_rules_dst -j $dst_default_target -m comment --comment "dst_default: $o_dst_default"
+ -A ss_rules_dst -j $dst_default_target
$forward_rules
COMMIT
$recentrst_mangle_rules
PKG_NAME:=shorewall-core
PKG_MAJOR_MINOR_VERSION:=5.2
-PKG_BUGFIX_MAJOR_VERSION:=1
-PKG_BUGFIX_MINOR_VERSION:=.4
+PKG_BUGFIX_MAJOR_VERSION:=3
+PKG_BUGFIX_MINOR_VERSION:=.3
PKG_VERSION:=$(PKG_MAJOR_MINOR_VERSION).$(PKG_BUGFIX_MAJOR_VERSION)$(PKG_BUGFIX_MINOR_VERSION)
PKG_DIRECTORY:=$(PKG_MAJOR_MINOR_VERSION).$(PKG_BUGFIX_MAJOR_VERSION)
PKG_RELEASE:=1
http://shorewall.de/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
http://www.shorewall.com.au/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_HASH:=48195c9e4f9ecd75014a36219e4c7b8c15bff36d149284bc6ac29696b475971d
+PKG_HASH:=e516c56b416181c325dfee68d0bbf38685f89ec0b6bc9c25c6c98ffabbf3e2bd
PKG_MAINTAINER:=Willem van den Akker <wvdakker@wilsoft.nl>
PKG_LICENSE:=GPL-2.0+
PKG_NAME:=shorewall-lite
PKG_MAJOR_MINOR_VERSION:=5.2
-PKG_BUGFIX_MAJOR_VERSION:=1
-PKG_BUGFIX_MINOR_VERSION:=.4
+PKG_BUGFIX_MAJOR_VERSION:=3
+PKG_BUGFIX_MINOR_VERSION:=.3
PKG_VERSION:=$(PKG_MAJOR_MINOR_VERSION).$(PKG_BUGFIX_MAJOR_VERSION)$(PKG_BUGFIX_MINOR_VERSION)
PKG_DIRECTORY:=$(PKG_MAJOR_MINOR_VERSION).$(PKG_BUGFIX_MAJOR_VERSION)
PKG_RELEASE:=1
http://shorewall.de/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
http://www.shorewall.com.au/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_HASH:=d322121f03a2d6c0845f46a3f1a7d98f9fb0660e6d65b30622154799682ec55f
+PKG_HASH:=3ac7affab434a7bc39d229aeadbefc845d5568d7402ad3546e0c1e429acc2de9
PKG_MAINTAINER:=Willem van den Akker <wvdakker@wilsoft.nl>
PKG_LICENSE:=GPL-2.0+
#!/bin/sh
-# should restart shorewall when an interface comes up
+DEVICE=${DEVICE:-$(/sbin/uci -p /var/state get network."$INTERFACE".ifname)}
case "$ACTION" in
ifup)
- /etc/init.d/shorewall-lite restart
+ if [ "$INTERFACE" = "lan" ]; then
+ /usr/sbin/shorewall -l start
+ elif [ "${INTERFACE:0:3}" = "wan" ] &&
+ [ "${INTERFACE:$((${#INTERFACE}-2)):2}" != "_6" ]; then
+ /etc/shorewall-lite/state/firewall enable "$DEVICE"
+ fi
;;
ifdown)
- # might need to restore some routing
- /etc/init.d/shorewall-lite restart
+ if [ "${INTERFACE:0:3}" = "wan" ]; then
+ /etc/shorewall-lite/state/firewall disable "$DEVICE"
+ fi
;;
-esac
\ No newline at end of file
+esac
PKG_NAME:=shorewall
PKG_MAJOR_MINOR_VERSION:=5.2
-PKG_BUGFIX_MAJOR_VERSION:=1
-PKG_BUGFIX_MINOR_VERSION:=.4
+PKG_BUGFIX_MAJOR_VERSION:=3
+PKG_BUGFIX_MINOR_VERSION:=.3
PKG_VERSION:=$(PKG_MAJOR_MINOR_VERSION).$(PKG_BUGFIX_MAJOR_VERSION)$(PKG_BUGFIX_MINOR_VERSION)
PKG_DIRECTORY:=$(PKG_MAJOR_MINOR_VERSION).$(PKG_BUGFIX_MAJOR_VERSION)
PKG_RELEASE:=1
http://shorewall.de/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
http://www.shorewall.com.au/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_HASH:=420ba5a66b348990388131cdc3821f79d87f00fd1266c904a701b8a5823756e0
+PKG_HASH:=6bb832d557f9646b62af1b60db6d8b693756403ea5d23c10db96013dd40547cd
PKG_MAINTAINER:=Willem van den Akker <wvdakker@wilsoft.nl>
PKG_LICENSE:=GPL-2.0+
#!/bin/sh
-# should restart shorewall when an interface comes up
+DEVICE=${DEVICE:-$(/sbin/uci -p /var/state get network."$INTERFACE".ifname)}
case "$ACTION" in
ifup)
- /etc/init.d/shorewall restart
+ if [ "$INTERFACE" = "lan" ]; then
+ /usr/sbin/shorewall start
+ elif [ "${INTERFACE:0:3}" = "wan" ] &&
+ [ "${INTERFACE:$((${#INTERFACE}-2)):2}" != "_6" ]; then
+ /etc/shorewall/state/firewall enable "$DEVICE"
+ fi
;;
ifdown)
- # might need to restore some routing
- /etc/init.d/shorewall restart
+ if [ "${INTERFACE:0:3}" = "wan" ]; then
+ /etc/shorewall/state/firewall disable "$DEVICE"
+ fi
;;
esac
PKG_NAME:=shorewall6-lite
PKG_MAJOR_MINOR_VERSION:=5.2
-PKG_BUGFIX_MAJOR_VERSION:=1
-PKG_BUGFIX_MINOR_VERSION:=.4
+PKG_BUGFIX_MAJOR_VERSION:=3
+PKG_BUGFIX_MINOR_VERSION:=.3
PKG_VERSION:=$(PKG_MAJOR_MINOR_VERSION).$(PKG_BUGFIX_MAJOR_VERSION)$(PKG_BUGFIX_MINOR_VERSION)
PKG_DIRECTORY:=$(PKG_MAJOR_MINOR_VERSION).$(PKG_BUGFIX_MAJOR_VERSION)
PKG_RELEASE:=1
http://shorewall.de/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
http://www.shorewall.com.au/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_HASH:=6dad347b2202334b9da44b316a25273cdb28401623a6fd0c6bba9c7731e0a280
+PKG_HASH:=34c7ddb7f9901f7a74374f17cd1740a4059195a560401a461363e24c7e55b99f
PKG_MAINTAINER:=Willem van den Akker <wvdakker@wilsoft.nl>
PKG_LICENSE:=GPL-2.0+
#!/bin/sh
-# should restart shorewall when an interface comes up
+DEVICE=${DEVICE:-$(/sbin/uci -p /var/state get network."$INTERFACE".ifname)}
case "$ACTION" in
ifup)
- /etc/init.d/shorewall6-lite restart
+ if [ "$INTERFACE" = "lan" ]; then
+ /usr/sbin/shorewall -6 -l start
+ elif [ "${INTERFACE:0:3}" = "wan" ] &&
+ [ "${INTERFACE:$((${#INTERFACE}-2)):2}" != "_6" ]; then
+ /etc/shorewall6-lite/state/firewall enable "$DEVICE"
+ fi
;;
ifdown)
- # might need to restore some routing
- /etc/init.d/shorewall6-lite restart
+ if [ "${INTERFACE:0:3}" = "wan" ]; then
+ /etc/shorewall6-lite/state/firewall disable "$DEVICE"
+ fi
;;
-esac
\ No newline at end of file
+esac
PKG_NAME:=shorewall6
PKG_MAJOR_MINOR_VERSION:=5.2
-PKG_BUGFIX_MAJOR_VERSION:=1
-PKG_BUGFIX_MINOR_VERSION:=.4
+PKG_BUGFIX_MAJOR_VERSION:=3
+PKG_BUGFIX_MINOR_VERSION:=.3
PKG_VERSION:=$(PKG_MAJOR_MINOR_VERSION).$(PKG_BUGFIX_MAJOR_VERSION)$(PKG_BUGFIX_MINOR_VERSION)
PKG_DIRECTORY:=$(PKG_MAJOR_MINOR_VERSION).$(PKG_BUGFIX_MAJOR_VERSION)
PKG_RELEASE:=1
http://shorewall.de/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
http://www.shorewall.com.au/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_HASH:=eaf6b55c8e9801c89114371dbda37f635ad95cba35519b94b7536c1c7ecb53fa
+PKG_HASH:=f620107bd19f8df573ca249720506bcc5fa99db72f191ba04060f2a74c251a56
PKG_MAINTAINER:=Willem van den Akker <wvdakker@wilsoft.nl>
PKG_LICENSE:=GPL-2.0+
#!/bin/sh
-# should restart shorewall when an interface comes up
+DEVICE=${DEVICE:-$(/sbin/uci -p /var/state get network."$INTERFACE".ifname)}
case "$ACTION" in
ifup)
- /etc/init.d/shorewall6 restart
+ if [ "$INTERFACE" = "lan" ]; then
+ /usr/sbin/shorewall -6 start
+ elif [ "${INTERFACE:0:3}" = "wan" ] &&
+ [ "${INTERFACE:$((${#INTERFACE}-2)):2}" != "_6" ]; then
+ /etc/shorewall6/state/firewall enable "$DEVICE"
+ fi
;;
ifdown)
- # might need to restore some routing
- /etc/init.d/shorewall6 restart
+ if [ "${INTERFACE:0:3}" = "wan" ]; then
+ /etc/shorewall6/state/firewall disable "$DEVICE"
+ fi
;;
esac
include $(TOPDIR)/rules.mk
PKG_NAME:=simple-adblock
-PKG_VERSION:=1.6.3
-PKG_RELEASE:=5
-PKG_LICENSE:=GPL-3.0+
+PKG_VERSION:=1.7.0
+PKG_RELEASE:=1
PKG_MAINTAINER:=Stan Grishin <stangri@melmac.net>
+PKG_LICENSE:=GPL-3.0-or-later
include $(INCLUDE_DIR)/package.mk
# Simple AdBlock
+
A simple DNSMASQ-based AdBlocking service for OpenWrt/LEDE Project. Loosely based on [bole5's](https://forum.openwrt.org/profile.php?id=45571) idea with major performance improvements, added features and Web UI (as a separate package); inspired by @dibdot's innovation.
## Features
+
- Supports OpenWrt Designated Driver and LEDE Project.
- Super-fast due to the nature of supported block lists and backgrounding of already downloaded data while next list is downloading.
- Supports both hosts files and domains lists for blocking (to keep it lean and fast).
- Blocks ads served over https.
- Proudly made in Canada, using locally-sourced electrons.
-If you want a more robust AdBlocking, supporting free memory detection and complex block lists, check out [@dibdot's adblock](https://github.com/openwrt/packages/tree/master/net/adblock/files).
-
+If you want a more robust AdBlocking, supporting free memory detection and complex block lists, supporting IDN, check out [@dibdot's adblock](https://github.com/openwrt/packages/tree/master/net/adblock/files).
## Screenshot (luci-app-simple-adblock)
-![screenshot](https://raw.githubusercontent.com/stangri/openwrt_packages/master/screenshots/simple-adblock/screenshot06.png "screenshot")
+![screenshot](https://raw.githubusercontent.com/stangri/openwrt_packages/master/screenshots/simple-adblock/screenshot06.png "screenshot")
## Requirements
+
This service requires the following packages to be installed on your router: ```dnsmasq``` or ```dnsmasq-full``` and either ```ca-certificates```, ```wget``` and ```libopenssl``` (for OpenWrt 15.05.1) or ```uclient-fetch``` and ```libustream-mbedtls``` (for OpenWrt DD trunk and all LEDE Project builds). Additionally installation of ```coreutils-sort``` is highly recommended as it speeds up blocklist processing.
To satisfy the requirements for connect to your router via ssh and run the following commands:
-###### OpenWrt 15.05.1
+
+### OpenWrt 15.05.1 Requirements
+
```sh
opkg update; opkg install ca-certificates wget libopenssl coreutils-sort dnsmasq
```
-###### LEDE Project 17.01.x and OpenWrt 18.xx or later
+### LEDE Project 17.01.x and OpenWrt 18.xx or later Requirements
+
```sh
opkg update; opkg install uclient-fetch libustream-mbedtls coreutils-sort dnsmasq
```
-###### IPv6 Support
+### IPv6 Support
+
For IPv6 support additionally install ```ip6tables-mod-nat``` and ```kmod-ipt-nat6``` packages from Web UI or run the following in the command line:
+
```sh
opkg update; opkg install ip6tables-mod-nat kmod-ipt-nat6
```
-###### Speed up blocklist processing with coreutils-sort
+### Speed up blocklist processing with coreutils-sort
+
The ```coreutils-sort``` is an optional, but recommended package as it speeds up sorting and removing duplicates from the merged list dramatically. If opkg complains that it can't install ```coreutils-sort``` because /usr/bin/sort is already provided by busybox, you can run ```opkg --force-overwrite install coreutils-sort```.
+## Unmet dependencies
-#### Unmet dependencies
If you are running a development (trunk/snapshot) build of OpenWrt/LEDE Project on your router and your build is outdated (meaning that packages of the same revision/commit hash are no longer available and when you try to satisfy the [requirements](#requirements) you get errors), please flash either current LEDE release image or current development/snapshot image.
-
## How to install
+
Install ```simple-adblock``` and ```luci-app-simple-adblock``` packages from Web UI or run the following in the command line:
+
```sh
opkg update; opkg install simple-adblock luci-app-simple-adblock
```
If ```simple-adblock``` and ```luci-app-simple-adblock``` packages are not found in the official feed/repo for your version of OpenWrt/LEDE Project, you will need to [add a custom repo to your router](#add-custom-repo-to-your-router) first.
+### Add custom repo to your router
-#### Add custom repo to your router
If your router is not set up with the access to repository containing these packages you will need to add custom repository to your router by connecting to your router via ssh and running the following commands:
-###### OpenWrt 15.05.1
+#### OpenWrt 15.05.1 Instructions
+
```sh
opkg update; opkg install ca-certificates wget libopenssl
echo -e -n 'untrusted comment: LEDE usign key of Stan Grishin\nRWR//HUXxMwMVnx7fESOKO7x8XoW4/dRidJPjt91hAAU2L59mYvHy0Fa\n' > /tmp/stangri-repo.pub && opkg-key add /tmp/stangri-repo.pub
! grep -q 'stangri_repo' /etc/opkg/customfeeds.conf && echo 'src/gz stangri_repo https://raw.githubusercontent.com/stangri/openwrt-repo/master' >> /etc/opkg/customfeeds.conf
opkg update
+opkg install simple-adblock luci-app-simple-adblock
```
-###### LEDE Project and OpenWrt 18.xx or later
+#### LEDE Project 17.01.x and OpenWrt 18.06.x Instructions
+
```sh
opkg update
opkg list-installed | grep -q uclient-fetch || opkg install uclient-fetch
echo -e -n 'untrusted comment: LEDE usign key of Stan Grishin\nRWR//HUXxMwMVnx7fESOKO7x8XoW4/dRidJPjt91hAAU2L59mYvHy0Fa\n' > /tmp/stangri-repo.pub && opkg-key add /tmp/stangri-repo.pub
! grep -q 'stangri_repo' /etc/opkg/customfeeds.conf && echo 'src/gz stangri_repo https://raw.githubusercontent.com/stangri/openwrt-repo/master' >> /etc/opkg/customfeeds.conf
opkg update
+opkg install simple-adblock luci-app-simple-adblock
```
+## Default Settings
-#### Default Settings
Default configuration has service disabled (use Web UI to enable/start service or run ```uci set simple-adblock.config.enabled=1```) and selected ad/malware lists suitable for routers with 64Mb RAM. The configuration file has lists in descending order starting with biggest ones, comment out or delete the lists you don't want or your router can't handle.
-
## How to customize
+
You can use Web UI (found in Services/Simple AdBlock) to add/remove/edit links to:
+
- hosts files (127.0.0.1 or 0.0.0.0 followed by space and domain name per line) to be blocked.
- domains lists (one domain name per line) to be blocked.
- domains lists (one domain name per line) to be whitelisted. It is useful if you want to run simple-adblock on multiple routers and maintain one centralized whitelist which you can publish on a web-server.
-Please note that these lists **have** to include either ```http://``` or ```https://``` prefix. Some of the top block lists (both hosts files and domains lists) suitable for routers with at least 8MB RAM are used in the default simple-adblock installation.
+Please note that these lists **have** to include either ```http://``` or ```https://``` (or, if ```curl``` is installed the ```file://```) prefix. Some of the top block lists (both hosts files and domains lists) suitable for routers with at least 8MB RAM are used in the default simple-adblock installation.
You can also use Web UI to add individual domains to be blocked or whitelisted.
If you want to use CLI to customize simple-adblock config, you can probably figure out how to do it by looking at the contents of ```/etc/config/simple-adblock``` or output of the ```uci show simple-adblock``` command.
+## How to use
+
+Once the service is enabled in the [config file](#default-settings), run ```/etc/init.d/simple-adblock start``` to start the service. Either ```/etc/init.d/simple-adblock restart``` or ```/etc/init.d/simple-adblock reload``` will only restart the service and/or re-donwload the lists if there were relevant changes in the config file since the last successful start. Had the previous start resulted in any error, either ```/etc/init.d/simple-adblock start```, ```/etc/init.d/simple-adblock restart``` or ```/etc/init.d/simple-adblock reload``` will attempt to re-download the lists.
+
+If you want to force simple-adblock to re-download the lists, run ```/etc/init.d/simple-adblock download```.
+
+If you want to check if the specific domain (or part of the domain name) is being blocked, run ```/etc/init.d/simple-adblock check test-domain.com```.
+
## How does it work
+
This service downloads (and processes in the background, removing comments and other useless data) lists of hosts and domains to be blocked, combines those lists into one big block list, removes duplicates and sorts it and then removes your whitelisted domains from the block list before converting to to dnsmasq-compatible file and restarting dnsmasq. The result of the process is that dnsmasq returns "domain not found" for the blocked domains.
If you specify ```google.com``` as a domain to be whitelisted, you will have access to ```google.com```, ```www.google.com```, ```analytics.google.com```, but not fake domains like ```email-google.com``` or ```drive.google.com.verify.signin.normandeassociation.com``` for example. If you only want to allow ```www.google.com``` while blocking all other ```google.com``` subdomains, just specify ```www.google.com``` as domain to be whitelisted.
In general, whatever domain is specified to be whitelisted; it, along with with its subdomains will be whitelisted, but not any fake domains containing it.
## Documentation / Discussion
+
Please head [LEDE Project Forum](https://forum.lede-project.org/t/simple-adblock-fast-lean-and-fully-uci-luci-configurable-adblocking/1327/) for discussion of this package.
-## What's New
-1.5.8:
-- Better start/stop/reload logic.
-- Better uninstall logic.
-- Better start/stop/reload from Web UI.
-- New command-line ```check``` command.
-
-1.5.7:
-- Much stricter filters for hosts and domains lists resulting in better garbage removal.
-- Better handling of service start/enable from Web UI and enabled flag management.
-- Implemented support to set one of the router LEDs on/off based on the AdBlocking status.
-- Fixed the output bug when verbosity=1.
-- No longer using enabled in config file, Simple AdBlocking Web UI now enables/disables service directly.
-- Reworked console/system log output logic and formatting.
-- Processes already downloaded lists in the background while downloading next list from config, dramatically increasing overall speed.
-
-1.0.0:
-- Initial release
+## Thanks
+
+I'd like to thank everyone who helped create, test and troubleshoot this service. Special thanks to [@hnyman](https://github.com/hnyman) for general package/luci guidance, [@dibdot](https://github.com/dibdot) for general guidance and block-list optimization code and [@ckuethe](https://github.com/ckuethe) for the curl support, non-ASCII filtering and compressed cache code.
\ No newline at end of file
option enabled '0'
option verbosity '2'
option force_dns '1'
- option hosts_file '/var/dnsmasq.d/simple-adblock'
+ option led 'none'
+ option boot_delay '120'
+ option download_timeout '10'
+ option parallel_downloads '1'
+ option debug '0'
+ option allow_non_ascii '0'
+ option compressed_cache '0'
list whitelist_domain 'raw.githubusercontent.com'
# list blacklist_hosts_url 'http://support.it-mate.co.uk/downloads/hosts.txt'
-# list blacklist_hosts_url 'http://hostsfile.mine.nu/Hosts'
-# list blacklist_hosts_url 'http://hosts-file.net/.\ad_servers.txt'
-# list blacklist_hosts_url 'http://sysctl.org/cameleon/hosts.win'
+# list blacklist_hosts_url 'https://hostsfile.mine.nu/Hosts'
+# list blacklist_hosts_url 'https://hosts-file.net/ad_servers.txt'
+# list blacklist_hosts_url 'http://sysctl.org/cameleon/hosts'
list blacklist_hosts_url 'http://www.mvps.org/winhelp2002/hosts.txt'
- list blacklist_hosts_url 'http://pgl.yoyo.org/as/serverlist.php?hostformat=hosts&showintro=1&mimetype=plaintext'
- list blacklist_hosts_url 'http://www.malwaredomainlist.com/hostslist/hosts.txt'
+ list blacklist_hosts_url 'https://pgl.yoyo.org/as/serverlist.php?hostformat=hosts&showintro=1&mimetype=plaintext'
+ list blacklist_hosts_url 'https://www.malwaredomainlist.com/hostslist/hosts.txt'
list blacklist_hosts_url 'https://adaway.org/hosts.txt'
- list blacklist_hosts_url 'http://someonewhocares.org/hosts/hosts'
+ list blacklist_hosts_url 'https://someonewhocares.org/hosts/hosts'
list blacklist_hosts_url 'https://raw.githubusercontent.com/hoshsadiq/adblock-nocoin-list/master/hosts.txt'
list blacklist_hosts_url 'https://zeustracker.abuse.ch/blocklist.php?download=hostfile'
- list blacklist_domains_url 'http://mirror1.malwaredomains.com/files/justdomains'
+ list blacklist_domains_url 'https://mirror1.malwaredomains.com/files/justdomains'
list blacklist_domains_url 'https://s3.amazonaws.com/lists.disconnect.me/simple_malvertising.txt'
list blacklist_domains_url 'https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt'
list blacklist_domains_url 'https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt'
list blacklist_domains_url 'https://ransomwaretracker.abuse.ch/downloads/RW_DOMBL.txt'
list blacklist_domains_url 'https://ssl.bblck.me/blacklists/domain-list.txt'
- list blacklist_domains_url 'http://dshield.org/feeds/suspiciousdomains_High.txt'
-# list blacklist_domains_url 'http://dshield.org/feeds/suspiciousdomains_Medium.txt'
-# list blacklist_domains_url 'http://dshield.org/feeds/suspiciousdomains_Low.txt'
+ list blacklist_domains_url 'https://dshield.org/feeds/suspiciousdomains_High.txt'
+# list blacklist_domains_url 'https://dshield.org/feeds/suspiciousdomains_Medium.txt'
+# list blacklist_domains_url 'https://dshield.org/feeds/suspiciousdomains_Low.txt'
#!/bin/sh
-if [[ "$ACTION" == "ifup" ]]; then
+if [ "$ACTION" = "ifup" ]; then
sleep 10 && /etc/init.d/simple-adblock start &
fi
#!/bin/sh /etc/rc.common
-# TLD optimization written by Dirk Brenken (dev@brenken.org)
PKG_VERSION=
export START=94
export USE_PROCD=1
+export LC_ALL=C
+
+export EXTRA_COMMANDS="check dl killcache status"
+export EXTRA_HELP=" check Checks if specified domain is found in current blacklist
+ dl Force-redownloads all the lists, even if the last download was successful and no config changes were made
+ status Shows the service last-run status"
-readonly packageName='simple-adblock'
+readonly packageName="simple-adblock"
readonly serviceName="$packageName $PKG_VERSION"
-readonly PID="/var/run/${packageName}.pid"
readonly dnsmasqFile="/var/dnsmasq.d/${packageName}"
-export EXTRA_COMMANDS="check killcache"
-export EXTRA_HELP=" check Checks if specified domain is found in current blacklist"
-
-readonly A_TMP='/var/simple-adblock.hosts.a.tmp'
-readonly B_TMP='/var/simple-adblock.hosts.b.tmp'
-readonly CACHE_TMP='/var/simple-adblock.cache'
-readonly h_filter='/localhost/d;/^#/d;/^[^0-9]/d;s/^0\.0\.0\.0.//;s/^127\.0\.0\.1.//;s/[[:space:]]*#.*$//;s/[[:cntrl:]]$//;s/[[:space:]]//g;/[`~!@#\$%\^&\*()=+;:"'\'',<>?/\|[{}]/d;/]/d;/\./!d;/^$/d;'
-readonly d_filter='/^#/d;s/[[:space:]]*#.*$//;s/[[:space:]]*$//;s/[[:cntrl:]]$//;/[[:space:]]/d;/[`~!@#\$%\^&\*()=+;:"'\'',<>?/\|[{}]/d;/]/d;/\./!d;/^$/d;'
+readonly compressedCacheFile="/etc/${packageName}.gz"
+readonly A_TMP="/var/simple-adblock.hosts.a.tmp"
+readonly B_TMP="/var/simple-adblock.hosts.b.tmp"
+readonly cacheFile="/var/run/${packageName}.cache"
+readonly PIDFile="/var/run/${packageName}.pid"
+readonly JsonFile="/var/run/${packageName}.json"
+readonly h_filter='/localhost/d;/^#/d;/^[^0-9]/d;s/^0\.0\.0\.0.//;s/^127\.0\.0\.1.//;s/[[:space:]]*#.*$//;s/[[:cntrl:]]$//;s/[[:space:]]//g;/[`~!@#\$%\^&\*()=+;:"'\'',<>?/\|[{}]/d;/]/d;/\./!d;/^$/d;/[^[:alnum:]_.-]/d;'
+readonly d_filter='/^#/d;s/[[:space:]]*#.*$//;s/[[:space:]]*$//;s/[[:cntrl:]]$//;/[[:space:]]/d;/[`~!@#\$%\^&\*()=+;:"'\'',<>?/\|[{}]/d;/]/d;/\./!d;/^$/d;/[^[:alnum:]_.-]/d;'
readonly f_filter='s|^|local=/|;s|$|/|'
readonly checkmark='\xe2\x9c\x93'
readonly xmark='\xe2\x9c\x97'
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'
-create_lock() { [ -e "$PID" ] && return 1; touch "$PID"; }
-remove_lock() { [ -e "$PID" ] && rm -f "$PID"; rm -f /var/simple-adblock_tmp_* >/dev/null 2>&1; }
+create_lock() { [ -e "$PIDFile" ] && return 1; touch "$PIDFile"; }
+remove_lock() { [ -e "$PIDFile" ] && rm -f "$PIDFile"; } # rm -f /var/simple-adblock_tmp_* >/dev/null 2>&1; }
trap remove_lock EXIT
-output_ok() { case $verbosity in 1) output 1 "$_OK_";; 2) output 2 "$__OK__\n";; esac; }
-output_okn() { case $verbosity in 1) output 1 "$_OK_\n";; 2) output 2 "$__OK__\n";; esac; }
-output_fail() { case $verbosity in 1) output 1 "$_FAIL_";; 2) output 2 "$__FAIL__\n";; esac; }
-output_failn() { case $verbosity in 1) output 1 "$_FAIL_\n";; 2) output 2 "$__FAIL__\n";; esac; }
+output_ok() { case $verbosity in 1) output 1 "$_OK_";; 2) output 2 "$__OK__\\n";; esac; }
+output_okn() { case $verbosity in 1) output 1 "$_OK_\\n";; 2) output 2 "$__OK__\\n";; esac; }
+output_fail() { case $verbosity in 1) output 1 "$_FAIL_";; 2) output 2 "$__FAIL__\\n";; esac; }
+output_failn() { case $verbosity in 1) output 1 "$_FAIL_\\n";; 2) output 2 "$__FAIL__\\n";; esac; }
export logmsg
output() {
# Can take a single parameter (text) to be output at any verbosity
# Or target verbosity level and text to be output at specifc verbosity
- if [[ $# -ne 1 ]]; then
- [[ ! $((verbosity & $1)) -gt 0 ]] && return 0 || shift
+ if [ $# -ne 1 ]; then
+ if [ ! $((verbosity & $1)) -gt 0 ]; then return 0; else shift; fi
fi
- [[ -t 1 ]] && echo -e -n "$1" # if we're running in console, echo text
- # strip text of ASCII control characters and send completed lines to log
+ [ -t 1 ] && echo -e -n "$1"
local msg=$(echo -n "${1/$serviceName /service }" | sed 's|\\033\[[0-9]\?;\?[0-9]\?[0-9]\?m||g');
- if [[ $(echo -e -n "$msg" | wc -l) -gt 0 ]]; then
- logger -t "${packageName:-service} [$$]" "$(echo -e -n ${logmsg}${msg})"
- logmsg=''
+ if [ "$(echo -e -n "$msg" | wc -l)" -gt 0 ]; then
+ logger -t "${packageName:-service} [$$]" "$(echo -e -n "${logmsg}${msg}")"
+ logmsg=""
else
- logmsg=${logmsg}${msg}
+ logmsg="${logmsg}${msg}"
fi
}
-led_on(){ [[ -n "${1}" && -e "${1}/trigger" ]] && echo "default-on" > "${1}/trigger" 2>&1; }
-led_off(){ [[ -n "${1}" && -e "${1}/trigger" ]] && echo "none" > "${1}/trigger" 2>&1; }
-boot() { load_package_config; ( sleep $bootDelay && rc_procd start_service && rc_procd service_triggers | cat & ); }
+led_on(){ if [ -n "${1}" ] && [ -e "${1}/trigger" ]; then echo "default-on" > "${1}/trigger" 2>&1; fi; }
+led_off(){ if [ -n "${1}" ] && [ -e "${1}/trigger" ]; then echo "none" > "${1}/trigger" 2>&1; fi; }
+testCompressedCache(){ [ "$compressedCache" -gt 0 ] && gzip -t -c $compressedCacheFile; }
+boot() { load_package_config; ( sleep "$bootDelay" && rc_procd start_service && rc_procd service_triggers | cat & ); }
-export serviceEnabled verbosity forceDNS debug led wan_if wan_gw wanphysdev bootDelay dl_command serviceStatus
+export serviceEnabled
+export forceDNS
+export parallelDL
+export debug
+export allowNonAscii
+export compressedCache
+export bootDelay
+export dlTimeout
+export verbosity
+export led
+export whitelist_domains
+export blacklist_domains
+export whitelist_domains_urls
+export blacklist_domains_urls
+export blacklist_hosts_urls
+export wan_if wan_gw wanphysdev dl_command serviceStatus dl_flag
+export dlStatus
load_package_config() {
config_load "$packageName"
- config_get_bool serviceEnabled 'config' 'enabled' 1
- config_get_bool forceDNS 'config' 'force_dns' 1
- config_get_bool debug 'config' 'debug' 0
- config_get bootDelay 'config' 'boot_delay' '120'
- config_get dlTimeout 'config' 'download_timeout' '20'
- config_get verbosity 'config' 'verbosity' '2'
- config_get led 'config' 'led'
- if [ -z "${verbosity##*[!0-9]*}" ] || [ $verbosity -lt 0 ] || [ $verbosity -gt 2 ]; then
+ config_get_bool serviceEnabled "config" "enabled" 1
+ config_get_bool forceDNS "config" "force_dns" 1
+ config_get_bool parallelDL "config" "parallel_downloads" 1
+ config_get_bool debug "config" "debug" 0
+ config_get_bool allowNonAscii "config" "allow_non_ascii" 0
+ config_get_bool compressedCache "config" "compressed_cache" 0
+ config_get bootDelay "config" "boot_delay" "120"
+ config_get dlTimeout "config" "download_timeout" "20"
+ config_get verbosity "config" "verbosity" "2"
+ config_get led "config" "led"
+ config_get whitelist_domains "config" "whitelist_domain"
+ config_get blacklist_domains "config" "blacklist_domain"
+ config_get whitelist_domains_urls "config" "whitelist_domains_url"
+ config_get blacklist_domains_urls "config" "blacklist_domains_url"
+ config_get blacklist_hosts_urls "config" "blacklist_hosts_url"
+
+ if [ -z "${verbosity##*[!0-9]*}" ] || [ "$verbosity" -lt 0 ] || [ "$verbosity" -gt 2 ]; then
verbosity=1
fi
- source /lib/functions/network.sh
- dl_command="wget --no-check-certificate --timeout $dlTimeout -qO-"
+ . /lib/functions/network.sh
+ . /usr/share/libubox/jshn.sh
+ # Prefer curl because it supports the file: scheme.
+ if [ -x /usr/bin/curl ] ; then
+ dl_command="curl --insecure --connect-timeout $dlTimeout --silent"
+ dl_flag="-o"
+ else
+ dl_command="wget --no-check-certificate --timeout $dlTimeout -q"
+ dl_flag="-O"
+ fi
led="${led:+/sys/class/leds/$led}"
}
is_enabled() {
- local sleepCount=1
load_package_config
if [ "$debug" -ne 0 ]; then
set -x
fi
- if [ $serviceEnabled -eq 0 ]; then
- if [ "$1" == "on_start" ]; then
- output "$packageName is currently disabled.\n"
- output "Run the following commands before starting service again:\n"
- output "uci set $packageName.config.enabled='1'; uci commit;\n"
+ if [ "$serviceEnabled" -eq 0 ]; then
+ if [ "$1" = "on_start" ]; then
+ output "$packageName is currently disabled.\\n"
+ output "Run the following commands before starting service again:\\n"
+ output "uci set $packageName.config.enabled='1'; uci commit;\\n"
fi
return 1
fi
- network_flush_cache; network_find_wan wan_if; network_get_gateway wan_gw $wan_if;
+ [ ! -d ${dnsmasqFile%/*} ] && mkdir -p ${dnsmasqFile%/*}
+ testCompressedCache && return 0
+ network_flush_cache; network_find_wan wan_if; network_get_gateway wan_gw "$wan_if";
[ -n "$wan_gw" ] && return 0
- output "$_ERROR_: $serviceName failed to discover WAN gateway.\n"; return 1;
+ output "$_ERROR_: $serviceName failed to discover WAN gateway.\\n"; return 1;
}
dnsmasq_kill() { killall -q -HUP dnsmasq; }
reload_dnsmasq() {
case $1 in
on_start)
- if [ -s $dnsmasqFile ]; then
- output 3 'Restarting dnsmasq '
+ if [ -s "$dnsmasqFile" ]; then
+ output 3 "Restarting DNSMASQ "
+ tmpfs set message "restarting DNSMASQ"
if dnsmasq_restart; then
+ tmpfs set status "$statusSuccess"
led_on "$led"
output_okn
- else
+ else
output_failn
- output "$_ERROR_: $serviceName failed to restart dnsmasq!\n"
- serviceStatus="${serviceStatus:-'DNSMASQ restart error'}"
+ tmpfs set status "$statusFail"
+ tmpfs add error "DNSMASQ restart error"
+ output "$_ERROR_: $serviceName failed to restart DNSMASQ!\\n"
return 1
fi
else
- output "$_ERROR_: $serviceName failed to create its data file!\n"
- serviceStatus="${serviceStatus:-'Failed to create data file'}"
+ tmpfs set status "$statusFail"
+ tmpfs add error "Failed to create $dnsmasqFile file."
+ output "$_ERROR_: $serviceName failed to create its data file!\\n"
return 1
fi
;;
on_stop)
- [ -f $dnsmasqFile ] && mv $dnsmasqFile $CACHE_TMP
- output 3 'Restarting dnsmasq '
+ [ -f $dnsmasqFile ] && mv $dnsmasqFile $cacheFile
+ output 3 "Restarting dnsmasq "
if dnsmasq_restart; then
led_off "$led"
output_okn
- output "$serviceName stopped.\n"
+ output "$serviceName stopped.\\n"
+ tmpfs set status "$statusStopped"
+ tmpfs del message
+ tmpfs del error
return 0
else
output_failn;
- output "$_ERROR_: $serviceName failed to restart dnsmasq!\n"
+ tmpfs set status "$statusFail"
+ tmpfs add error "DNSMASQ restart error on stop"
+ output "$_ERROR_: $serviceName failed to restart DNSMASQ on stop !\\n"
return 1
fi
;;
esac
}
-ubus_status(){
- case "$1" in
+tmpfs(){
+ local action="$1" instance="$2" value="$3"
+ local status message error stats
+ local readReload readRestart curReload curRestart ret
+ if [ -s "$JsonFile" ]; then
+ status="$(jsonfilter -i $JsonFile -l1 -e "@['data']['status']")"
+ message="$(jsonfilter -i $JsonFile -l1 -e "@['data']['message']")"
+ error="$(jsonfilter -i $JsonFile -l1 -e "@['data']['error']")"
+ stats="$(jsonfilter -i $JsonFile -l1 -e "@['data']['stats']")"
+ readReload="$(jsonfilter -i $JsonFile -l1 -e "@['data']['reload']")"
+ readRestart="$(jsonfilter -i $JsonFile -l1 -e "@['data']['restart']")"
+ fi
+ case "$action" in
+ get)
+ case "$instance" in
+ status)
+ echo "$status"; return;;
+ message)
+ echo "$message"; return;;
+ error)
+ echo "$error"; return;;
+ stats)
+ echo "$stats"; return;;
+ triggers)
+ curReload="$allowNonAscii $parallelDL $debug $dlTimeout $whitelist_domains $blacklist_domains $whitelist_domains_urls $blacklist_domains_urls $blacklist_hosts_urls"
+ curRestart="$compressedCache $forceDNS $led"
+ if [ "$curReload" != "$readReload" ]; then
+ ret="download"
+ elif [ "$curRestart" != "$readRestart" ]; then
+ ret="restart"
+ fi
+ echo "$ret"
+ return;;
+ esac
+ ;;
add)
- ubus_status set "$(ubus_status get)${2}"
+ case "$instance" in
+ status)
+ [ -n "$status" ] && status="$status $value" || status="$value";;
+ message)
+ [ -n "$message" ] && message="${message} ${value}" || message="$value";;
+ error)
+ [ -n "$error" ] && error="$error $value" || error="$value";;
+ stats)
+ [ -n "$stats" ] && stats="$stats $value" || stats="$value";;
+ esac
;;
- del | set)
- ubus call service set "{ \"name\": \"${packageName}\", \"instances\": { \"status\": { \"command\": [ \"\" ], \"data\": { \"status\": \"${2}\" }}}}"
- # ubus call service set "{ \"name\": \"${packageName}\", \"instances\": { \"status\": { \"data\": { \"status\": \"${2}\" }}}}"
+ del)
+ case "$instance" in
+ status)
+ unset status;;
+ message)
+ unset message;;
+ error)
+ unset error;;
+ stats)
+ unset stats;;
+ triggers)
+ unset readReload; unset readRestart;;
+ esac
;;
- get)
- echo "$(ubus call service list "{\"name\": \"${packageName}\"}" | jsonfilter -l1 -e "@['${packageName}']['instances']['status']['data']['status']")"
+ set)
+ case "$instance" in
+ status)
+ status="$value";;
+ message)
+ message="$value";;
+ error)
+ error="$value";;
+ stats)
+ stats="$value";;
+ triggers)
+ readReload="$allowNonAscii $parallelDL $debug $dlTimeout $whitelist_domains $blacklist_domains $whitelist_domains_urls $blacklist_domains_urls $blacklist_hosts_urls"
+ readRestart="$compressedCache $forceDNS $led"
+ ;;
+ esac
;;
esac
+ json_init
+ json_add_object "data"
+ json_add_string version "$PKG_VERSION"
+ json_add_string status "$status"
+ json_add_string message "$message"
+ json_add_string error "$error"
+ json_add_string stats "$stats"
+ json_add_string reload "$readReload"
+ json_add_string restart "$readRestart"
+ json_close_object
+ json_dump > "$JsonFile"
+ sync
}
-is_chaos_calmer() { ubus -S call system board | grep -q 'Chaos Calmer'; }
+is_chaos_calmer() { ubus -S call system board | grep -q "Chaos Calmer"; }
remove_fw3_redirect() {
- config_get name "$1" 'name'
- if [[ -n "$name" && "$name" != "${name//simple_adblock}" ]]; then
+ local name
+ config_get name "$1" "name"
+ if [ -n "$name" ] && [ "$name" != "${name//simple_adblock}" ]; then
uci -q del "firewall.$1"
fi
}
fw3_setup() {
- config_load 'firewall'
- config_foreach remove_fw3_redirect 'redirect'
- if [ "$1" == "start" ]; then
+ config_load "firewall"
+ config_foreach remove_fw3_redirect "redirect"
+ if [ "$1" = "start" ]; then
uci -q add firewall redirect >/dev/null 2>&1
- uci -q set firewall.@redirect[-1].name='simple_adblock_dns_hijack'
- uci -q set firewall.@redirect[-1].target='DNAT'
- uci -q set firewall.@redirect[-1].src='lan'
- uci -q set firewall.@redirect[-1].proto='tcpudp'
- uci -q set firewall.@redirect[-1].src_dport='53'
- uci -q set firewall.@redirect[-1].dest_port='53'
+ uci -q set firewall.@redirect[-1].name="simple_adblock_dns_hijack"
+ uci -q set firewall.@redirect[-1].target="DNAT"
+ uci -q set firewall.@redirect[-1].src="lan"
+ uci -q set firewall.@redirect[-1].proto="tcpudp"
+ uci -q set firewall.@redirect[-1].src_dport="53"
+ uci -q set firewall.@redirect[-1].dest_port="53"
uci -q set firewall.@redirect[-1].dest_ip="$ip"
- uci -q set firewall.@redirect[-1].reflection='0'
+ uci -q set firewall.@redirect[-1].reflection="0"
fi
-
if [ -n "$(uci changes firewall)" ]; then
uci -q commit firewall
/etc/init.d/firewall restart >/dev/null 2>&1
process_url() {
local label type D_TMP R_TMP
- [[ -n "$1" && -n "$2" && -n "$3" ]] || return 1
-# ping -W5 -c1 "$(echo $1 | awk -F '/' '{print $3}')" 1>/dev/null 2>/dev/null || { output_fail; return 1; }
- if [ "$2" == "hosts" ]; then
- label="Hosts: $(echo $1 | cut -d'/' -f3)" filter="$h_filter"
+ if [ -z "$1" ] || [ -z "$2" ] || [ -z "$3" ]; then return 1; fi
+ label="${1##*//}"; label="${label%%/*}";
+ if [ "$2" = "hosts" ]; then
+ label="Hosts: $label"; filter="$h_filter";
else
- label="Domains: $(echo $1 | cut -d'/' -f3)" filter="$d_filter"
+ label="Domains: $label"; filter="$d_filter";
fi
- if [ "$3" == "blocked" ]; then
- type='Blocked'; D_TMP="$B_TMP";
+ if [ "$3" = "blocked" ]; then
+ type="Blocked"; D_TMP="$B_TMP";
else
- type='Allowed'; D_TMP="$A_TMP";
+ type="Allowed"; D_TMP="$A_TMP";
fi
- while [[ -z "$R_TMP" || -e "$R_TMP" ]]; do
- R_TMP="/var/${packageName}_tmp_$(head -c40 /dev/urandom 2>/dev/null | tr -dc 'A-Za-z0-9' 2>/dev/null)"
+ while [ -z "$R_TMP" ] || [ -e "$R_TMP" ]; do
+ R_TMP="$(mktemp -u -q -t ${packageName}_tmp.XXXXXXXX)"
done
- touch "$R_TMP"
- if ! $dl_command "$1" > "$R_TMP" 2>/dev/null; then
- output 2 "[DL] $type $label $__FAIL__\n"
+ if ! $dl_command "$1" $dl_flag "$R_TMP" 2>/dev/null || [ ! -s "$R_TMP" ]; then
+ output 2 "[DL] $type $label $__FAIL__\\n"
output 1 "$_FAIL_"
- ubus_status add '-'
- return 1
+# tmpfs add message "-"
+ dlStatus="${dlStatus}-"
+ tmpfs add error "Error downloading ${1}."
+ return 0
fi
sed -i "$filter" "$R_TMP"
- cat "$R_TMP" >> "$D_TMP"
- rm -f "$R_TMP" >/dev/null 2>/dev/null
- output 2 "[DL] $type $label $__OK__\n"
+ cat "${R_TMP}" >> "$D_TMP"
+ rm -f "${R_TMP}" >/dev/null 2>/dev/null
+ output 2 "[DL] $type $label $__OK__\\n"
output 1 "$_OK_"
- ubus_status add '+'
+# tmpfs add message "+"
+ dlStatus="${dlStatus}+"
return 0
}
download_lists() {
- local i hf w_filter whitelist_domains blacklist_domains whitelist_domains_urls blacklist_domains_urls blacklist_hosts_urls j=0
- config_get whitelist_domains 'config' 'whitelist_domain'
- config_get blacklist_domains 'config' 'blacklist_domain'
- config_get whitelist_domains_urls 'config' 'whitelist_domains_url'
- config_get blacklist_domains_urls 'config' 'blacklist_domains_url'
- config_get blacklist_hosts_urls 'config' 'blacklist_hosts_url'
+ local i hf w_filter j=0 R_TMP
- ubus_status set 'Reloading '
- [ ! -d ${dnsmasqFile%/*} ] && mkdir -p ${dnsmasqFile%/*}
- for i in $A_TMP $B_TMP $CACHE_TMP $dnsmasqFile; do [ -f $i ] && rm -f $i; done
+ tmpfs set message "${statusDownloading}..."
+ for i in $A_TMP $B_TMP $cacheFile $dnsmasqFile; do [ -f $i ] && rm -f $i; done
if [ "$(awk '/^MemFree/ {print int($2/1000)}' "/proc/meminfo")" -lt 32 ]; then
- output 3 'Low free memory, restarting dnsmasq...'
- reload_dnsmasq 'quiet' && output_okn || output_failn
+ output 3 "Low free memory, restarting dnsmasq..."
+ if reload_dnsmasq "quiet"; then output_okn; else output_failn; fi
fi
touch $A_TMP; touch $B_TMP;
- output 1 'Downloading lists '
+ output 1 "Downloading lists "
+ unset dlStatus
if [ -n "$blacklist_hosts_urls" ]; then
for hf in ${blacklist_hosts_urls}; do
- process_url "$hf" 'hosts' 'blocked' &
+ if [ "$parallelDL" -gt 0 ]; then
+ process_url "$hf" "hosts" "blocked" &
+ else
+ process_url "$hf" "hosts" "blocked"
+ fi
done
fi
if [ -n "$blacklist_domains_urls" ]; then
for hf in ${blacklist_domains_urls}; do
- process_url "$hf" 'domains' 'blocked' &
+ if [ "$parallelDL" -gt 0 ]; then
+ process_url "$hf" "domains" "blocked" &
+ else
+ process_url "$hf" "domains" "blocked"
+ fi
done
fi
if [ -n "$whitelist_domains_urls" ]; then
for hf in ${whitelist_domains_urls}; do
- process_url "$hf" 'domains' 'allowed' &
+ if [ "$parallelDL" -gt 0 ]; then
+ process_url "$hf" "domains" "allowed" &
+ else
+ process_url "$hf" "domains" "allowed"
+ fi
done
fi
wait
- i="$(ubus_status get)"
- [ "${i//-}" != "$i" ] && serviceStatus="${serviceStatus:-'Download error'}" || unset serviceStatus
- i="${i//Reloading }"
- i="${i//-/$xmark}"
- i="${i//+/$checkmark}"
- [ "$verbosity" == "1" ] && logmsg="${logmsg}${i}"
- output 1 '\n'
+ dlStatus="${dlStatus//-/$xmark}"
+ dlStatus="${dlStatus//+/$checkmark}"
+ [ "$verbosity" = "1" ] && logmsg="${logmsg}${dlStatus}"
+ output 1 "\\n"
[ -n "$blacklist_domains" ] && for hf in ${blacklist_domains}; do echo "$hf" | sed "$d_filter" >> $B_TMP; done
- whitelist_domains="${whitelist_domains}"$'\n'"$(cat $A_TMP)"
- [ -n "$whitelist_domains" ] && for hf in ${whitelist_domains}; do hf=$(echo $hf | sed 's/\./\\./g'); w_filter="$w_filter/^${hf}$/d;/\\.${hf}$/d;"; done
+ whitelist_domains="${whitelist_domains}
+$(cat $A_TMP)"
+ [ -n "$whitelist_domains" ] && for hf in ${whitelist_domains}; do hf=$(echo "$hf" | sed 's/\./\\./g'); w_filter="$w_filter/^${hf}$/d;/\\.${hf}$/d;"; done
if [ -s $B_TMP ]; then
- output 1 'Processing downloads '
- output 2 'Sorting combined list '
- if sort $B_TMP | uniq > $A_TMP; then
- output_ok
- else
- output_fail
- serviceStatus="${serviceStatus:-'Sorting error'}"
- fi
- output 2 'Optimizing combined list '
- if awk -F "." '{for(f=NF;f>1;f--)printf "%s.",$f;print $1}' "$A_TMP" > "$B_TMP"; then
- if sort "$B_TMP" > "$A_TMP"; then
- if awk '{if(NR==1){tld=$NF};while(getline){if($NF!~tld"\\."){print tld;tld=$NF}}print tld}' "$A_TMP" > "$B_TMP"; then
- if awk -F "." '{for(f=NF;f>1;f--)printf "%s.",$f;print $1}' "$B_TMP" > "$A_TMP"; then
- if sort "$A_TMP" | uniq > "$B_TMP"; then
- output_ok
- else
- output_fail
- serviceStatus="${serviceStatus:-'Data file optimization error'}"
- mv $A_TMP $B_TMP
- fi
+ output 1 "Processing downloads "
+ output 2 "Sorting combined list "
+ tmpfs set message "$statusProcessing: sorting combined list"
+ if sort $B_TMP | uniq > $A_TMP; then
+ output_ok
+ else
+ output_fail
+ tmpfs add error "Sorting error."
+ fi
+
+# TLD optimization written by Dirk Brenken (dev@brenken.org)
+ output 2 "Optimizing combined list "
+ tmpfs set message "$statusProcessing: optimizing combined list"
+ if awk -F "." '{for(f=NF;f>1;f--)printf "%s.",$f;print $1}' "$A_TMP" > "$B_TMP"; then
+ if sort "$B_TMP" > "$A_TMP"; then
+ if awk '{if(NR==1){tld=$NF};while(getline){if($NF!~tld"\\."){print tld;tld=$NF}}print tld}' "$A_TMP" > "$B_TMP"; then
+ if awk -F "." '{for(f=NF;f>1;f--)printf "%s.",$f;print $1}' "$B_TMP" > "$A_TMP"; then
+ if sort "$A_TMP" | uniq > "$B_TMP"; then
+ output_ok
else
output_fail
- serviceStatus="${serviceStatus:-'Data file optimization error'}"
+ tmpfs add error "Data file optimization error."
+ mv $A_TMP $B_TMP
fi
else
output_fail
- serviceStatus="${serviceStatus:-'Data file optimization error'}"
- mv $A_TMP $B_TMP
+ tmpfs add error "Data file optimization error."
fi
else
output_fail
- serviceStatus="${serviceStatus:-'Data file optimization error'}"
+ tmpfs add error "Data file optimization error."
+ mv $A_TMP $B_TMP
fi
else
output_fail
- serviceStatus="${serviceStatus:-'Data file optimization error'}"
- mv $A_TMP $B_TMP
- fi
- output 2 'Whitelisting domains '
- if sed -i "$w_filter" $B_TMP; then
- output_ok
- else
- output_fail
- serviceStatus="${serviceStatus:-'Whitelist processing error'}"
+ tmpfs add error "Data file optimization error."
fi
- output 2 'Formatting merged file '
+ else
+ output_fail
+ tmpfs add error "Data file optimization error."
+ mv $A_TMP $B_TMP
+ fi
+
+ output 2 "Whitelisting domains "
+ tmpfs set message "$statusProcessing: whitelisting domains"
+ if sed -i "$w_filter" $B_TMP; then
+ output_ok
+ else
+ output_fail
+ tmpfs add error "Whitelist processing error."
+ fi
+ output 2 "Formatting merged file "
+ tmpfs set message "$statusProcessing: formatting merged file"
+ if [ "$allowNonAscii" -gt 0 ]; then
if sed "$f_filter" $B_TMP > $A_TMP; then
output_ok
else
output_fail
- serviceStatus="${serviceStatus:-'Data file formatting error'}"
+ tmpfs add error "Data file formatting error."
fi
- output 2 'Creating dnsmasq config '
- if mv $A_TMP $dnsmasqFile; then
+ else
+ if sed "$f_filter" $B_TMP | grep -E -v '[^a-zA-Z0-9=/.-]' > $A_TMP; then
output_ok
else
output_fail
- serviceStatus="${serviceStatus:-'Error moving data file'}"
+ tmpfs add error "Data file formatting error."
fi
- output 2 'Removing temporary files '
- rm -f /var/simple-adblock_tmp_* >/dev/null 2>&1;
- for i in $A_TMP $B_TMP $CACHE_TMP; do if [ -s $i ]; then rm -f $i || j=1; fi; done
- if [ $j -eq 0 ]; then
+ fi
+
+ output 2 "Creating DNSMASQ config "
+ tmpfs set message "$statusProcessing: creating DNSMASQ blocklist"
+ if mv $A_TMP $dnsmasqFile; then
+ output_ok
+ else
+ output_fail
+ tmpfs add error "Error moving data file ${A_TMP} to ${dnsmasqFile}."
+ fi
+
+ if [ "$compressedCache" -gt 0 ]; then
+ output 2 "Creating compressed cache "
+ tmpfs set message "$statusProcessing: creating compressed cache"
+ R_TMP="$(mktemp -u -q -t ${packageName}_tmp.XXXXXXXX)"
+ if gzip < "$dnsmasqFile" > "$R_TMP"; then
+ mv "$R_TMP" "$compressedCacheFile"
output_ok
else
output_fail
- serviceStatus="${serviceStatus:-'Error removing temporary files'}"
+ rm -f "$R_TMP"
+ tmpfs add error "Error creating compressed cache."
fi
- output 1 '\n'
+ else
+ rm -f "$compressedCacheFile" >/dev/null 2>&1
+ fi
+
+ output 2 "Removing temporary files "
+ tmpfs set message "$statusProcessing: removing temporary files"
+ rm -f "/tmp/${packageName}_tmp.*" >/dev/null 2>&1
+ for i in $A_TMP $B_TMP $cacheFile; do if [ -s $i ]; then rm -f $i || j=1; fi; done
+ if [ $j -eq 0 ]; then
+ output_ok
+ else
+ output_fail
+ tmpfs add error "Error removing temporary files."
+ fi
+ output 1 "\\n"
fi
}
start_service() {
- local ip status
+ is_enabled "on_start" || return 1
+ local ip status error action="$(tmpfs get triggers)"
if create_lock; then
- is_enabled 'on_start' || return 1
- procd_open_instance
+ tmpfs set triggers
+ procd_open_instance "main"
procd_set_param command /bin/true
procd_set_param stdout 1
procd_set_param stderr 1
- network_get_ipaddr ip 'lan'
- if [[ $forceDNS -ne 0 && -n "$ip" ]]; then
+ network_get_ipaddr ip "lan"
+ if [ "$forceDNS" -ne 0 ] && [ -n "$ip" ]; then
if is_chaos_calmer; then
- fw3_setup 'start'
+ fw3_setup "start"
else
procd_open_data
json_add_array firewall
json_add_object ""
json_add_string type redirect
- json_add_string target 'DNAT'
- json_add_string src 'lan'
- json_add_string proto 'tcpudp'
- json_add_string src_dport '53'
- json_add_string dest_port '53'
+ json_add_string target "DNAT"
+ json_add_string src "lan"
+ json_add_string dest "lan"
+ json_add_string proto "tcpudp"
+ json_add_string src_dport "53"
+ json_add_string dest_port "53"
json_add_string dest_ip "$ip"
- json_add_string name 'simple_adblock_dns_hijack'
- json_add_string reflection '0'
+ json_add_string name "simple-adblock-dns-hijack"
+ json_add_string reflection "0"
json_close_object
json_close_array
procd_close_data
fi
fi
procd_close_instance
- status="$(ubus_status get)"
- if [ -s "$CACHE_TMP" ] && [ "$1" != "reload" ]; then
- output "Starting $serviceName...\n"
- output 3 'Found existing data file, reusing it '
- mv $CACHE_TMP $dnsmasqFile && output_okn || output_failn
- reload_dnsmasq 'on_start' || serviceStatus="${serviceStatus:-'DNSMASQ restart error'}"
- elif [ "$1" == "reload" ] || [ "$status" == "${status//Success}" ]; then
- output "Reloading $serviceName...\n"
- download_lists
- reload_dnsmasq 'on_start' || serviceStatus="${serviceStatus:-'DNSMASQ restart error'}"
- elif [ ! -s "$dnsmasqFile" ]; then
- output "Starting $serviceName...\n"
- download_lists
- reload_dnsmasq 'on_start' || serviceStatus="${serviceStatus:-'DNSMASQ restart error'}"
- fi
- if [ -s "$dnsmasqFile" ]; then
- if [ -z "$serviceStatus" ]; then
- output "$serviceName is blocking $(wc -l < $dnsmasqFile) domains "; output_okn;
- serviceStatus="Success: $(wc -l < $dnsmasqFile) domains blocked"
- else
- output "$serviceName is blocking $(wc -l < $dnsmasqFile) domains with error: $serviceStatus "; output_failn;
- serviceStatus="$(wc -l < $dnsmasqFile) domains blocked with error: $serviceStatus"
+ status="$(tmpfs get status)"
+ error="$(tmpfs get error)"
+ tmpfs del status
+ tmpfs del message
+ tmpfs del error
+ tmpfs del stats
+
+ case "$1" in
+ download) action="download";;
+ restart|*)
+ if [ ! -s "$dnsmasqFile" ] && [ ! -s "$cacheFile" ] && ! testCompressedCache; then
+ action="download"
+ fi
+ if [ -n "$error" ]; then
+ action="download"
+ fi
+ action="${action:-$1}"
+ ;;
+ esac
+
+ case $action in
+ download)
+ if [ -s "$dnsmasqFile" ] || [ -s "$cacheFile" ] || testCompressedCache; then
+ output "Force-reloading $serviceName...\\n"
+ tmpfs set status "$statusForceReloading"
+ else
+ output "Starting $serviceName...\\n"
+ tmpfs set status "$statusStarting"
+ fi
+ download_lists
+ reload_dnsmasq "on_start"
+ ;;
+ restart|*)
+ if [ "$action" == "restart" ]; then
+ output "Retarting $serviceName...\\n"
+ tmpfs set status "$statusRestarting"
+ else
+ output "Starting $serviceName...\\n"
+ tmpfs set status "$statusStarting"
+ fi
+ if testCompressedCache && [ ! -s "$cacheFile" ] && [ ! -s "$dnsmasqFile" ]; then
+ output 3 "Found compressed cache file, unpacking it "
+ tmpfs set message "found compressed cache file, unpacking it."
+ if gzip -dc < "${compressedCacheFile}" > "$cacheFile"; then
+ output_okn
+ else
+ output_failn
+ output "$_ERROR_: $serviceName failed to unpack compressed cache!\\n"
+ tmpfs add error "failed to unpack compressed cache!"
+ return 1
+ fi
+ fi
+ if [ -s "$cacheFile" ] && [ ! -s "$dnsmasqFile" ]; then
+ output 3 "Found cache file, reusing it "
+ tmpfs set message "found cache file, reusing it."
+ if mv "$cacheFile" "$dnsmasqFile"; then
+ output_okn
+ else
+ output_failn
+ tmpfs add error "Error moving $cacheFile to $dnsmasqFile."
+ fi
+ fi
+ reload_dnsmasq "on_start"
+ ;;
+ esac
+
+ if [ -s "$dnsmasqFile" ] && [ "$(tmpfs get status)" != "$statusFail" ]; then
+ output "$serviceName is blocking $(wc -l < $dnsmasqFile) domains "; output_okn;
+ tmpfs del message
+ tmpfs set status "$statusSuccess: $(wc -l < $dnsmasqFile) domains blocked."
+ if [ -n "$(tmpfs get error)" ]; then
+ output "$_ERROR_: $(tmpfs get error)\\n"
fi
+ else
+ tmpfs set status "$statusFail"
+ tmpfs add error "Failed to create DNSMASQ blocklist."
fi
- [ -n "$serviceStatus" ] && ubus_status set "$serviceStatus"
remove_lock
else
output "$serviceName: another instance is starting up "; output_failn;
}
service_started() { procd_set_config_changed firewall; }
-reload_service() { start_service 'reload'; }
-killcache() { [ -s $CACHE_TMP ] && rm -f $CACHE_TMP >/dev/null 2>/dev/null; }
+service_stopped() { procd_set_config_changed firewall; }
+restart_service() { rc_procd stop_service "restart"; rc_procd start_service "restart"; }
+reload_service() { restart_service; }
+restart() { restart_service; }
+reload() { restart_service; }
+dl() { rc_procd stop_service "restart"; rc_procd start_service "download"; }
+killcache() { [ -s $cacheFile ] && rm -f $cacheFile >/dev/null 2>/dev/null; [ -s $compressedCacheFile ] && rm -f $compressedCacheFile >/dev/null 2>/dev/null; }
+status() {
+ local status
+ if [ -n "$(tmpfs get status)" ]; then
+ status="$(tmpfs get status)"
+ fi
+ if [ -n "$status" ] && [ -n "$(tmpfs get message)" ]; then
+ status="${status}: $(tmpfs get message)"
+ fi
+ [ -n "$status" ] && output "$serviceName $status\\n"
+ [ -n "$(tmpfs get error)" ] && output "$_ERROR_: $(tmpfs get error)\\n"
+}
stop_service() {
load_package_config
- if [ $serviceEnabled -gt 0 ]; then
- output "Stopping $serviceName...\n"
- reload_dnsmasq 'on_stop'
+ if [ "$serviceEnabled" -gt 0 ]; then
+ if [ -z "$1" ] && [ -s "$dnsmasqFile" ]; then
+ [ -s "$dnsmasqFile" ] && mv "$dnsmasqFile" "$cacheFile" >/dev/null 2>/dev/null
+ output "Stopping $serviceName...\\n"
+ tmpfs del triggers
+ reload_dnsmasq "on_stop"
+ fi
else
- reload_dnsmasq 'quiet'
+ [ -s "$dnsmasqFile" ] && mv "$dnsmasqFile" "$cacheFile" >/dev/null 2>/dev/null
+ reload_dnsmasq "quiet"
+ fi
+ if is_chaos_calmer; then
+ fw3_setup "stop"
fi
- ubus_status set 'Stopped'
- procd_set_config_changed firewall
}
check() {
load_package_config
local string="$1"
- if [ ! -f $dnsmasqFile ]; then
+ if [ ! -f "$dnsmasqFile" ]; then
echo "No local blacklist ($dnsmasqFile) found."
elif [ -z "$string" ]; then
- echo "Usage: /etc/init.d/${packageName} check 'domain'"
- elif grep -m1 -q $string $dnsmasqFile; then
- echo "Found $(grep $string $dnsmasqFile | wc -l) matches for $string in $dnsmasqFile:"
- grep $string $dnsmasqFile | sed 's|local=/||;s|/$||;'
+ echo "Usage: /etc/init.d/${packageName} check domain"
+ elif grep -m1 -q "$string" "$dnsmasqFile"; then
+ echo "Found $(grep -c "$string" "$dnsmasqFile") matches for $string in $dnsmasqFile:"
+ grep "$string" "$dnsmasqFile" | sed 's|local=/||;s|/$||;'
else
echo "The $string is not found in current blacklist."
fi
--- /dev/null
+#
+# Copyright (C) 2019 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=smcroute
+PKG_VERSION:=2.4.4
+PKG_RELEASE:=1
+PKG_LICENSE:=GPL-2.0-or-later
+PKG_LICENSE_FILES:=COPYING
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE_URL:=https://github.com/troglobit/smcroute/releases/download/$(PKG_VERSION)
+PKG_HASH:=431be94c46646767f69c85fee445277b7e765a55177d3ee29522416cfe2cc067
+
+PKG_FIXUP:=autoreconf
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/smcroute
+ SECTION:=net
+ CATEGORY:=Network
+ SUBMENU:=Routing and Redirection
+ TITLE:=Static Multicast Routing Daemon
+ URL:=http://troglobit.com/smcroute.html
+ MAINTAINER:=Moritz Warning <moritzwarning@web.de>
+endef
+
+define Package/smcroute/description
+ SMCRoute is a command line tool to manipulate the multicast routes of the Linux kernel.
+endef
+
+define Package/smcroute/conffiles
+ /etc/smcroute.conf
+endef
+
+CONFIGURE_ARGS += \
+ --without-libcap
+
+define Package/smcroute/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_DIR) $(1)/etc/init.d/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/smcrouted $(1)/usr/sbin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/smcroutectl $(1)/usr/bin/
+ $(INSTALL_CONF) $(PKG_BUILD_DIR)/smcroute.conf $(1)/etc
+ $(INSTALL_BIN) ./files/smcroute.init $(1)/etc/init.d/smcroute
+endef
+
+$(eval $(call BuildPackage,smcroute))
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=99
+USE_PROCD=1
+PROG=/usr/sbin/smcrouted
+
+start_service() {
+ procd_open_instance
+ procd_set_param command $PROG -n
+ procd_set_param stderr 1
+ procd_set_param stdout 1
+ procd_close_instance
+}
PKG_NAME:=snort
PKG_VERSION:=2.9.11.1
-PKG_RELEASE:=7
+PKG_RELEASE:=8
PKG_LICENSE:=GPL-2.0
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
PROG=/usr/bin/snort
validate_snort_section() {
- uci_validate_section snort snort "${1}" \
+ uci_load_validate snort snort "$1" "$2" \
'config_file:string' \
'interface:string'
}
-start_service() {
- local config_file interface
-
- validate_snort_section snort || {
+start_snort_instance() {
+ [ "$2" = 0 ] || {
echo "validation failed"
return 1
}
procd_open_instance
procd_set_param command $PROG "-q" "--daq-dir" "/usr/lib/daq/" "-i" "$interface" "-c" "$config_file" "-s" "-N"
- procd_set_param file $CONFIGFILE
+ procd_set_param file $config_file
procd_set_param respawn
procd_close_instance
}
+start_service()
+{
+ validate_snort_section snort start_snort_instance
+}
+
stop_service()
{
service_stop ${PROG}
-]])],
-[have_daq_ext_modflow="yes"],
-[have_daq_ext_modflow="no"])
-+have_daq_ext_modflow="no"
++have_daq_ext_modflow="yes"
AC_MSG_RESULT($have_daq_ext_modflow)
if test "x$have_daq_ext_modflow" = "xyes"; then
CCONFIGFLAGS="${CCONFIGFLAGS} -DHAVE_DAQ_EXT_MODFLOW"
-]])],
-[have_daq_data_channel_flags="yes"],
-[have_daq_data_channel_flags="no"])
-+have_daq_data_channel_flags="no"
++have_daq_data_channel_flags="yes"
AC_MSG_RESULT($have_daq_data_channel_flags)
if test "x$have_daq_data_channel_flags" = "xyes"; then
CCONFIGFLAGS="${CCONFIGFLAGS} -DHAVE_DAQ_DATA_CHANNEL_PARAMS"
-]])],
-[have_daq_data_channel_separate_ip_versions="yes"],
-[have_daq_data_channel_separate_ip_versions="no"])
-+have_daq_data_channel_separate_ip_versions="no"
++have_daq_data_channel_separate_ip_versions="yes"
AC_MSG_RESULT($have_daq_data_channel_separate_ip_versions)
if test "x$have_daq_data_channel_separate_ip_versions" = "xyes"; then
CCONFIGFLAGS="${CCONFIGFLAGS} -DHAVE_DAQ_DATA_CHANNEL_SEPARATE_IP_VERSIONS"
--- /dev/null
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=snort3
+PKG_VERSION:=3.0.0-beta
+PKG_VERSION_SHORT:=3.0.0
+PKG_RELEASE:=3
+
+PKG_LICENSE:=GPL-2.0
+PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
+
+PKG_SOURCE:=snort-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://www.snort.org/downloads/snortplus/
+PKG_HASH:=ea4079c551002e4d83586f05b3ecdae72706a46ec223339b87ce60f7ae30b8a2
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)/snort-$(PKG_VERSION_SHORT)
+PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+define Package/snort3
+ SUBMENU:=Firewall
+ SECTION:=net
+ CATEGORY:=Network
+ DEPENDS:=+libstdcpp +libdaq +libdnet +libopenssl +libpcap +libpcre +libpthread +libuuid +zlib +libhwloc +libtirpc +luajit
+ TITLE:=Lightweight Network Intrusion Detection System
+ URL:=http://www.snort.org/
+ MENU:=1
+endef
+
+define Package/snort3/description
+ Snort is an open source network intrusion detection and prevention system.
+ It is capable of performing real-time traffic analysis, alerting, blocking
+ and packet logging on IP networks. It utilizes a combination of protocol
+ analysis and pattern matching in order to detect anomalies, misuse and
+ attacks.
+endef
+
+CMAKE_OPTIONS += \
+ -DENABLE_STATIC_DAQ:BOOL=NO \
+ -DENABLE_COREFILES:BOOL=NO \
+ -DENABLE_GDB:BOOL=NO \
+ -DMAKE_DOC:BOOL=NO \
+ -DMAKE_HTML_DOC:BOOL=NO \
+ -DMAKE_PDF_DOC:BOOL=NO \
+ -DMAKE_TEXT_DOC:BOOL=NO \
+ -DHAVE_LZMA=OFF
+
+TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/tirpc
+TARGET_LDFLAGS += -ltirpc
+
+define Package/snort3/conffiles
+/etc/config/snort
+endef
+
+define Package/snort3/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) \
+ $(PKG_INSTALL_DIR)/usr/bin/snort \
+ $(1)/usr/bin/
+
+ $(INSTALL_BIN) \
+ $(PKG_INSTALL_DIR)/usr/bin/u2{boat,spewfoo} \
+ $(1)/usr/bin/
+
+ $(INSTALL_DIR) $(1)/usr/lib/snort
+ $(CP) \
+ $(PKG_INSTALL_DIR)/usr/lib/snort/daqs/daq_hext.so \
+ $(1)/usr/lib/snort/
+
+ $(CP) \
+ $(PKG_INSTALL_DIR)/usr/lib/snort/daqs/daq_file.so \
+ $(1)/usr/lib/snort/
+
+ $(INSTALL_DIR) $(1)/usr/share/lua
+ $(CP) \
+ $(PKG_INSTALL_DIR)/usr/include/snort/lua/snort_plugin.lua \
+ $(1)/usr/share/lua/
+
+ $(CP) \
+ $(PKG_INSTALL_DIR)/usr/include/snort/lua/snort_config.lua \
+ $(1)/usr/share/lua/
+
+ $(INSTALL_DIR) $(1)/etc/snort
+
+ $(INSTALL_DIR) $(1)/etc/init.d
+ $(INSTALL_BIN) \
+ ./files/snort.init \
+ $(1)/etc/init.d/snort
+
+ $(INSTALL_DIR) $(1)/etc/config
+ $(INSTALL_CONF) \
+ ./files/snort.config \
+ $(1)/etc/config/snort
+endef
+
+$(eval $(call BuildPackage,snort3))
--- /dev/null
+config snort 'snort'
+ option config_dir '/etc/snort/etc/'
+ option alert_module 'alert_syslog'
+ option interface 'eth0'
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=99
+STOP=10
+
+USE_PROCD=1
+PROG=/usr/bin/snort
+
+validate_snort_section() {
+ uci_validate_section snort snort "${1}" \
+ 'config_dir:string' \
+ 'alert_module:string' \
+ 'interface:string'
+}
+
+start_service() {
+ local config_file interface
+
+ validate_snort_section snort || {
+ echo "validation failed"
+ return 1
+ }
+
+ procd_open_instance
+ procd_set_param command $PROG -q --daq-dir /usr/lib/daq/ -i "$interface" -c "$config_dir/snort.lua" -A "$alert_module"
+ procd_set_param env SNORT_LUA_PATH="$config_dir"
+ procd_set_param file $CONFIGFILE
+ procd_set_param respawn
+ procd_close_instance
+}
+
+stop_service()
+{
+ service_stop ${PROG}
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "snort"
+ procd_add_validation validate_snort_section
+}
--- /dev/null
+diff -u --recursive snort-3.0.0-vanilla/daqs/daq_file.c snort-3.0.0/daqs/daq_file.c
+--- snort-3.0.0-vanilla/daqs/daq_file.c 2018-08-28 02:01:02.000000000 -0400
++++ snort-3.0.0/daqs/daq_file.c 2019-03-28 23:03:25.292770141 -0400
+@@ -33,7 +33,7 @@
+
+ #include <sys/types.h>
+ #include <sys/time.h>
+-#include <sys/unistd.h>
++#include <unistd.h>
+
+ #include <daq_api.h>
+ #include <sfbpf_dlt.h>
+diff -u --recursive snort-3.0.0-vanilla/daqs/daq_hext.c snort-3.0.0/daqs/daq_hext.c
+--- snort-3.0.0-vanilla/daqs/daq_hext.c 2018-08-28 02:01:02.000000000 -0400
++++ snort-3.0.0/daqs/daq_hext.c 2019-03-28 22:54:15.738207157 -0400
+@@ -35,7 +35,7 @@
+ #include <arpa/inet.h>
+ #include <sys/types.h>
+ #include <sys/time.h>
+-#include <sys/unistd.h>
++#include <unistd.h>
+ #include <sys/socket.h>
+
+ #include <daq_api.h>
+diff -u --recursive snort-3.0.0-vanilla/src/network_inspectors/appid/service_plugins/service_rpc.cc snort-3.0.0/src/network_inspectors/appid/service_plugins/service_rpc.cc
+--- snort-3.0.0-vanilla/src/network_inspectors/appid/service_plugins/service_rpc.cc 2018-08-28 02:01:02.000000000 -0400
++++ snort-3.0.0/src/network_inspectors/appid/service_plugins/service_rpc.cc 2019-03-28 22:32:04.211783669 -0400
+@@ -27,6 +27,7 @@
+
+ #include <netdb.h>
+
++#include <tirpc/rpc/rpcent.h>
+ #if defined(__FreeBSD__) || defined(__OpenBSD__)
+ #include <rpc/rpc.h>
+ #elif defined(__sun)
+diff -u --recursive snort-3.0.0-vanilla/src/utils/util.cc snort-3.0.0/src/utils/util.cc
+--- snort-3.0.0-vanilla/src/utils/util.cc 2018-08-28 02:01:02.000000000 -0400
++++ snort-3.0.0/src/utils/util.cc 2019-03-28 22:16:16.860942230 -0400
+@@ -605,13 +605,8 @@
+ {
+ static THREAD_LOCAL char buf[128];
+
+-#if (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE < 200112L && \
+- defined(_XOPEN_SOURCE) && _XOPEN_SOURCE < 600) || _GNU_SOURCE
+- return strerror_r(errnum, buf, sizeof(buf));
+-#else
+ (void)strerror_r(errnum, buf, sizeof(buf));
+ return buf;
+-#endif
+ }
+
+ char* snort_strndup(const char* src, size_t dst_size)
--- /dev/null
+diff -u --recursive snort-3.0.0-vanilla/cmake/include_libraries.cmake snort-3.0.0/cmake/include_libraries.cmake
+--- snort-3.0.0-vanilla/cmake/include_libraries.cmake 2018-08-28 02:01:02.000000000 -0400
++++ snort-3.0.0/cmake/include_libraries.cmake 2019-04-18 21:25:25.627070082 -0400
+@@ -14,7 +14,6 @@
+ endif (ENABLE_UNIT_TESTS)
+
+ # optional libraries
+-find_package(LibLZMA QUIET)
+ find_package(Asciidoc QUIET)
+ find_package(DBLATEX QUIET)
+ find_package(Ruby QUIET 1.8.7)
include $(TOPDIR)/rules.mk
PKG_NAME:=socat
-PKG_VERSION:=1.7.3.2
-PKG_RELEASE:=5
+PKG_VERSION:=1.7.3.3
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://www.dest-unreach.org/socat/download
-PKG_HASH:=e3561f808739383eb10fada1e5d4f26883f0311b34fd0af7837d0c95ef379251
+PKG_HASH:=0dd63ffe498168a4aac41d307594c5076ff307aa0ac04b141f8f1cec6594d04a
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
PKG_VERSION:=4.28-9669
PKG_VERREL:=beta
PKG_VERDATE:=2018.09.11
-PKG_RELEASE:=1
+PKG_RELEASE:=3
PKG_SOURCE:=softether-src-v$(PKG_VERSION)-$(PKG_VERREL).tar.gz
PKG_SOURCE_URL:=http://www.softether-download.com/files/softether/v$(PKG_VERSION)-$(PKG_VERREL)-$(PKG_VERDATE)-tree/Source_Code/
$(if $(CONFIG_OPENSSL_WITH_SSL3),,-DSSL_OP_NO_SSLv3) \
$(if $(filter mips mipsel,$(ARCH)),-minterlink-mips16)
+TARGET_LDFLAGS += \
+ -liconv
+
# Select 32 or 64 bit Makefile for target build depending on 64bit config symbol
MAKE_FLAGS += \
-f src/makefiles/linux_$(if $(CONFIG_ARCH_64BIT),64,32)bit.mak
--- /dev/null
+--- a/src/makefiles/linux_64bit.mak
++++ b/src/makefiles/linux_64bit.mak
+@@ -29,9 +29,9 @@ OPTIONS_COMPILE_DEBUG=-D_DEBUG -DDEBUG -DUNIX -DUNIX_LINUX -DCPU_64 -D_REENTRANT
+
+ OPTIONS_LINK_DEBUG=-g -fsigned-char -m64 -lm -ldl -lrt -lpthread -lssl -lcrypto -lreadline -lncurses -lz
+
+-OPTIONS_COMPILE_RELEASE=-DNDEBUG -DVPN_SPEED -DUNIX -DUNIX_LINUX -DCPU_64 -D_REENTRANT -DREENTRANT -D_THREAD_SAFE -D_THREADSAFE -DTHREAD_SAFE -DTHREADSAFE -D_FILE_OFFSET_BITS=64 -I./src/ -I./src/Cedar/ -I./src/Mayaqua/ -O2 -fsigned-char -m64
++OPTIONS_COMPILE_RELEASE=-DNDEBUG -DVPN_SPEED -DUNIX -DUNIX_LINUX -DCPU_64 -D_REENTRANT -DREENTRANT -D_THREAD_SAFE -D_THREADSAFE -DTHREAD_SAFE -DTHREADSAFE -D_FILE_OFFSET_BITS=64 -I./src/ -I./src/Cedar/ -I./src/Mayaqua/ -O2 -fsigned-char
+
+-OPTIONS_LINK_RELEASE=-O2 -fsigned-char -m64 -lm -ldl -lrt -lpthread -lssl -lcrypto -lreadline -lncurses -lz
++OPTIONS_LINK_RELEASE=-O2 -fsigned-char -lm -ldl -lrt -lpthread -lssl -lcrypto -lreadline -lncurses -lz
+
+ INSTALL_BINDIR=/usr/bin/
+ INSTALL_VPNSERVER_DIR=/usr/vpnserver/
--- /dev/null
+diff --git a/src/Mayaqua/Encrypt.c b/src/Mayaqua/Encrypt.c
+index f3b3908..06b7fea 100644
+--- a/src/Mayaqua/Encrypt.c
++++ b/src/Mayaqua/Encrypt.c
+@@ -129,6 +129,7 @@
+ #include <openssl/rand.h>\r
+ #include <openssl/engine.h>\r
+ #include <openssl/bio.h>\r
++#include <openssl/bn.h>\r
+ #include <openssl/x509.h>\r
+ #include <openssl/pkcs7.h>\r
+ #include <openssl/pkcs12.h>\r
+@@ -137,6 +138,7 @@
+ #include <openssl/md4.h>\r
+ #include <openssl/hmac.h>\r
+ #include <openssl/sha.h>\r
++#include <openssl/rsa.h>\r
+ #include <openssl/des.h>\r
+ #include <openssl/aes.h>\r
+ #include <openssl/dh.h>\r
+@@ -634,7 +636,7 @@ UINT CipherProcess(CIPHER *c, void *iv, void *dest, void *src, UINT size)
+ return 0;\r
+ }\r
+ \r
+- if (EVP_CipherFinal(c->Ctx, ((UCHAR *)dest) + (UINT)r, &r2) == 0)\r
++ if (EVP_CipherFinal_ex(c->Ctx, ((UCHAR *)dest) + (UINT)r, &r2) == 0)\r
+ {\r
+ return 0;\r
+ }\r
+@@ -933,6 +935,7 @@ BUF *BigNumToBuf(const BIGNUM *bn)
+ // Initialization of the lock of OpenSSL\r
+ void OpenSSL_InitLock()\r
+ {\r
++#if OPENSSL_VERSION_NUMBER < 0x10100000L\r
+ UINT i;\r
+ \r
+ // Initialization of the lock object\r
+@@ -946,11 +949,13 @@ void OpenSSL_InitLock()
+ // Setting the lock function\r
+ CRYPTO_set_locking_callback(OpenSSL_Lock);\r
+ CRYPTO_set_id_callback(OpenSSL_Id);\r
++#endif\r
+ }\r
+ \r
+ // Release of the lock of OpenSSL\r
+ void OpenSSL_FreeLock()\r
+ {\r
++#if OPENSSL_VERSION_NUMBER < 0x10100000L\r
+ UINT i;\r
+ \r
+ for (i = 0;i < ssl_lock_num;i++)\r
+@@ -962,11 +967,13 @@ void OpenSSL_FreeLock()
+ \r
+ CRYPTO_set_locking_callback(NULL);\r
+ CRYPTO_set_id_callback(NULL);\r
++#endif\r
+ }\r
+ \r
+ // Lock function for OpenSSL\r
+ void OpenSSL_Lock(int mode, int n, const char *file, int line)\r
+ {\r
++#if OPENSSL_VERSION_NUMBER < 0x10100000L\r
+ LOCK *lock = ssl_lock_obj[n];\r
+ \r
+ if (mode & CRYPTO_LOCK)\r
+@@ -979,12 +986,15 @@ void OpenSSL_Lock(int mode, int n, const char *file, int line)
+ // Unlock\r
+ Unlock(lock);\r
+ }\r
++#endif\r
+ }\r
+ \r
+ // Return the thread ID\r
+ unsigned long OpenSSL_Id(void)\r
+ {\r
++#if OPENSSL_VERSION_NUMBER < 0x10100000L\r
+ return (unsigned long)ThreadId();\r
++#endif\r
+ }\r
+ \r
+ // Get the display name of the certificate\r
+@@ -1908,8 +1918,8 @@ X509 *NewX509(K *pub, K *priv, X *ca, NAME *name, UINT days, X_SERIAL *serial)
+ X509_set_version(x509, 2L);\r
+ \r
+ // Set the Expiration\r
+- t1 = X509_get_notBefore(x509);\r
+- t2 = X509_get_notAfter(x509);\r
++ t1 = X509_getm_notBefore(x509);\r
++ t2 = X509_getm_notAfter(x509);\r
+ if (!UINT64ToAsn1Time(t1, notBefore))\r
+ {\r
+ FreeX509(x509);\r
+@@ -2050,8 +2060,8 @@ X509 *NewRootX509(K *pub, K *priv, NAME *name, UINT days, X_SERIAL *serial)
+ X509_set_version(x509, 2L);\r
+ \r
+ // Set the Expiration\r
+- t1 = X509_get_notBefore(x509);\r
+- t2 = X509_get_notAfter(x509);\r
++ t1 = X509_getm_notBefore(x509);\r
++ t2 = X509_getm_notAfter(x509);\r
+ if (!UINT64ToAsn1Time(t1, notBefore))\r
+ {\r
+ FreeX509(x509);\r
+@@ -2677,6 +2687,43 @@ bool RsaCheckEx()
+ \r
+ return false;\r
+ }\r
++\r
++// RSA key generation\r
++static RSA *RsaGenKey(UINT bit, BN_ULONG e)\r
++{\r
++ RSA *rsa = NULL;\r
++ char errbuf[MAX_SIZE];\r
++ BIGNUM *bne = NULL;\r
++\r
++ if ((bne = BN_new()) == NULL)\r
++ {\r
++ Debug("BN_new: err=%s\n", ERR_error_string(ERR_get_error(), errbuf));\r
++ return NULL;\r
++ }\r
++ if (BN_set_word(bne, e) == 0)\r
++ {\r
++ Debug("BN_set_word: err=%s\n", ERR_error_string(ERR_get_error(), errbuf));\r
++ goto fail;\r
++ }\r
++ if ((rsa = RSA_new()) == NULL)\r
++ {\r
++ Debug("RSA_new: err=%s\n", ERR_error_string(ERR_get_error(), errbuf));\r
++ goto fail;\r
++ }\r
++ if (RSA_generate_key_ex(rsa, bit, bne, NULL) == 0)\r
++ {\r
++ Debug("RSA_generate_key_ex: err=%s\n", ERR_error_string(ERR_get_error(), errbuf));\r
++ goto fail;\r
++ }\r
++ BN_free(bne);\r
++ return rsa;\r
++\r
++fail:\r
++ RSA_free(rsa);\r
++ BN_free(bne);\r
++ return NULL;\r
++}\r
++\r
+ bool RsaCheck()\r
+ {\r
+ RSA *rsa;\r
+@@ -2690,12 +2737,11 @@ bool RsaCheck()
+ // Key generation\r
+ Lock(openssl_lock);\r
+ {\r
+- rsa = RSA_generate_key(bit, RSA_F4, NULL, NULL);\r
++ rsa = RsaGenKey(bit, RSA_F4);\r
+ }\r
+ Unlock(openssl_lock);\r
+ if (rsa == NULL)\r
+ {\r
+- Debug("RSA_generate_key: err=%s\n", ERR_error_string(ERR_get_error(), errbuf));\r
+ return false;\r
+ }\r
+ \r
+@@ -2760,12 +2806,11 @@ bool RsaGen(K **priv, K **pub, UINT bit)
+ // Key generation\r
+ Lock(openssl_lock);\r
+ {\r
+- rsa = RSA_generate_key(bit, RSA_F4, NULL, NULL);\r
++ rsa = RsaGenKey(bit, RSA_F4);\r
+ }\r
+ Unlock(openssl_lock);\r
+ if (rsa == NULL)\r
+ {\r
+- Debug("RSA_generate_key: err=%s\n", ERR_error_string(ERR_get_error(), errbuf));\r
+ return false;\r
+ }\r
+ \r
+@@ -3875,7 +3920,7 @@ X *X509ToX(X509 *x509)
+ {\r
+ if (OBJ_obj2nid(ad->method) == NID_ad_ca_issuers && ad->location->type == GEN_URI)\r
+ {\r
+- char *uri = (char *)ASN1_STRING_data(ad->location->d.uniformResourceIdentifier);\r
++ char *uri = (char *)ASN1_STRING_get0_data(ad->location->d.uniformResourceIdentifier);\r
+ \r
+ if (IsEmptyStr(uri) == false)\r
+ {\r
+@@ -4088,7 +4133,9 @@ void Rand(void *buf, UINT size)
+ // Delete a thread-specific information that OpenSSL has holded\r
+ void FreeOpenSSLThreadState()\r
+ {\r
++#if OPENSSL_VERSION_NUMBER < 0x10100000L\r
+ ERR_remove_state(0);\r
++#endif\r
+ }\r
+ \r
+ // Release the Crypt library\r
+@@ -4110,13 +4157,16 @@ void InitCryptLibrary()
+ CheckIfIntelAesNiSupportedInit();\r
+ // RAND_Init_For_SoftEther()\r
+ openssl_lock = NewLock();\r
++#if OPENSSL_VERSION_NUMBER < 0x10100000L\r
+ SSL_library_init();\r
+ //OpenSSL_add_all_algorithms();\r
+ OpenSSL_add_all_ciphers();\r
+ OpenSSL_add_all_digests();\r
+ ERR_load_crypto_strings();\r
+ SSL_load_error_strings();\r
+-\r
++#else\r
++ OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CONFIG, NULL);\r
++#endif\r
+ #ifdef OS_UNIX\r
+ {\r
+ char *name1 = "/dev/random";\r
include $(TOPDIR)/rules.mk
PKG_NAME:=softethervpn5
-PKG_VERSION:=5.01.9667
-PKG_RELEASE:=2
+PKG_VERSION:=5.01.9671
+PKG_RELEASE:=1
PKG_MAINTAINER:=Andy Walsh <andy.walsh44+github@gmail.com>
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING
+PKG_SOURCE_URL:=https://github.com/SoftEtherVPN/SoftEtherVPN/releases/download/$(PKG_VERSION)/
PKG_SOURCE:=softether-vpn-src-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://github.com/SoftEtherVPN/SoftEtherVPN/releases/download/$(PKG_VERSION)
-PKG_HASH:=c99142c5e55fae055955332964c56d29aba10bec9764ab961aebabf6c3ee1462
+PKG_HASH:=56930110ad5e21a3b7c69008bdb3efd368c0ebafc1d0d97b48a76a3563ec8e24
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
-HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)-$(PKG_VERSION)
+HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/SoftEtherVPN-$(PKG_VERSION)
+PKG_BUILD_DIR:=$(BUILD_DIR)/SoftEtherVPN-$(PKG_VERSION)
HOST_BUILD_DEPENDS:=ncurses/host readline/host
PKG_BUILD_DEPENDS:=softethervpn5/host
include $(INCLUDE_DIR)/nls.mk
include $(INCLUDE_DIR)/cmake.mk
-TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS)
-
define Package/softethervpn5/Default
SECTION:=net
CATEGORY:=Network
# BUG: outdated host/include/elf.h
HOST_CFLAGS += $(FPIC) -DAT_HWCAP2=26
TARGET_CFLAGS += $(FPIC)
+CMAKE_OPTIONS = -DICONV_LIB_PATH="$(ICONV_PREFIX)/lib"
# static build for host (hamcorebuilder), avoid -fpic on ncurses/host and shared libs can't be found on host
define Host/Prepare
procd_set_param respawn
procd_close_instance
}
-
-stop_service(){
- logger -t 'softethervpn5' "Stopping softether bridge service."
-
- /var/softethervpn/vpnbridge stop
-}
procd_set_param respawn
procd_close_instance
}
-
-stop_service(){
- logger -t 'softethervpn5' "Stopping softether client service."
-
- /var/softethervpn/vpnclient stop
-}
procd_set_param respawn
procd_close_instance
}
-
-stop_service(){
- logger -t 'softethervpn5' "Stopping softether vpnserver service."
-
- /var/softethervpn/vpnserver stop
-}
--- /dev/null
+From a4ed6560017d0b9edcd7cab93ca05d80f794ec10 Mon Sep 17 00:00:00 2001
+From: Rosen Penev <rosenp@gmail.com>
+Date: Wed, 10 Jul 2019 17:01:01 -0700
+Subject: [PATCH] Mayaqua: Replace GNU specific sys/poll.h header with POSIX
+ poll.h
+
+Fixes warning from the musl libc:
+
+warning redirecting incorrect #include <sys/poll.h> to <poll.h>
+---
+ src/Mayaqua/Mayaqua.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/Mayaqua/Mayaqua.h b/src/Mayaqua/Mayaqua.h
+index 0f46d52a..63c2edc3 100644
+--- a/src/Mayaqua/Mayaqua.h
++++ b/src/Mayaqua/Mayaqua.h
+@@ -157,8 +157,8 @@ int PASCAL WinMain(HINSTANCE hInst, HINSTANCE hPrev, char *CmdLine, int CmdShow)
+ #ifdef UNIX_SOLARIS\r
+ #include <sys/filio.h>\r
+ #endif // UNIX_SOLARIS\r
+-#include <sys/poll.h>\r
+ #include <sys/resource.h>\r
++#include <poll.h>\r
+ #include <pthread.h>\r
+ #ifdef UNIX_LINUX\r
+ #include <sys/prctl.h>\r
--- /dev/null
+--- a/src/Mayaqua/Mayaqua.h 2019-07-11
++++ b/src/Mayaqua/Mayaqua.h 2019-07-11
+@@ -178,7 +178,7 @@ int PASCAL WinMain(HINSTANCE hInst, HINS
+ #include <ifaddrs.h>\r
+ #endif // MAYAQUA_SUPPORTS_GETIFADDRS\r
+ \r
+-#ifdef UNIX_LINUX\r
++#if 0\r
+ typedef void *iconv_t;\r
+ iconv_t iconv_open (__const char *__tocode, __const char *__fromcode);\r
+ size_t iconv (iconv_t __cd, char **__restrict __inbuf,\r
--- /dev/null
+--- a/src/Mayaqua/CMakeLists.txt 2019-07-10
++++ b/src/Mayaqua/CMakeLists.txt 2019-07-11
+@@ -59,7 +59,7 @@ if(UNIX)
+ find_package(ZLIB REQUIRED)
+
+ # In some cases libiconv is not included in libc
+- find_library(LIB_ICONV iconv)
++ find_library(LIB_ICONV iconv HINTS "${ICONV_LIB_PATH}")
+
+ find_library(LIB_RT rt)
+
--- /dev/null
+#
+# Copyright (c) 2018 Tony Ambardar
+# This is free software, licensed under the GNU General Public License v2.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=speedtest-netperf
+PKG_VERSION:=1.0.0
+PKG_RELEASE:=1
+PKG_LICENSE:=GPL-2.0
+PKG_MAINTAINER:=Tony Ambardar <itugrok@yahoo.com>
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/speedtest-netperf
+ SECTION:=net
+ CATEGORY:=Network
+ TITLE:=Script to measure the performance of your network and router
+ DEPENDS:=+netperf
+ CONFLICTS:=speedtest
+ PKGARCH:=all
+endef
+
+define Package/speedtest-netperf/description
+Script to measure the performance of your network and router.
+
+Please see https://github.com/openwrt/packages/blob/master/net/speedtest-netperf/files/README.md for further information.
+endef
+
+define Build/Prepare
+endef
+
+define Build/Configure
+endef
+
+define Build/Compile
+endef
+
+define Package/speedtest-netperf/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) ./files/speedtest-netperf.sh $(1)/usr/bin/
+endef
+
+$(eval $(call BuildPackage,speedtest-netperf))
--- /dev/null
+Network Performance Testing
+===========================
+
+## Introduction
+
+The `speedtest-netperf` package provides a convenient means of on-device network performance testing for OpenWrt routers. Such performance testing primarily includes characterizing the network throughput and latency, but CPU usage can also be an important secondary measurement. These aspects of network testing are motivated chiefly by the following:
+
+1. **Throughput:** Network speed measurements can help troubleshoot transfer problems, and be used to determine the truth of an ISP's promised speed claims. Accurate throughput numbers also provide guidance for configuring other software's settings, such as SQM ingress/egress rates, or bandwidth limits for Bittorrent.
+
+2. **Latency:** Network latency is a key factor in high-quality experiences with real-time or interactive applications such as VOIP, gaming, or video conferencing, and excessive latency can lead to undesirable dropouts, freezes and lag. Such latency problems are endemic on the Internet and often the result of [bufferbloat](https://www.bufferbloat.net/projects/). Systematic latency measurements are an important part of identifying and mitigating this bufferbloat.
+
+3. **CPU Usage:** Observing CPU usage under network load gives insight into whether the router is CPU-bound, or if there is CPU "headroom" to support even higher network throughput. In addition to managing network traffic, a router actively running a speed test will also use CPU cycles to generate network load, and measuring this distinct CPU usage also helps gauge its impact.
+
+**Note:** _The `speedtest-netperf.sh` script uses servers and network bandwidth that are provided by generous volunteers (not some wealthy "big company"). Feel free to use the script to test your SQM configuration or troubleshoot network and latency problems. Continuous or high rate use of this script may result in denied access. Happy testing!_
+
+
+## Theory of Operation
+
+When launched, `speedtest-netperf.sh` uses the local `netperf` application to run several upload and download streams (files) to a server on the Internet. This places a heavy load on the bottleneck link of your network (probably your connection to the Internet) while measuring the total bandwidth of the link during the transfers. Under this network load, the script simultaneously measures the latency of pings to see whether the file transfers affect the responsiveness of your network. Additionally, the script tracks the per-CPU processor usage, as well as the CPU usage of the `netperf` instances used for the test. On systems that report CPU frequency scaling, the script can also report per-CPU frequencies.
+
+The script operates in two distict modes for network loading: *sequential* and *concurrent*. In the default sequential mode, the script emulates a web-based speed test by first downloading and then uploading network streams. In concurrent mode, the script mimics the stress test of the [FLENT](https://github.com/tohojo/flent) program by dowloading and uploading streams simultaneously.
+
+Sequential mode is preferred when measuring peak upload and download speeds for SQM configuration or testing ISP speed claims, because the measurements are unimpacted by traffic in the opposite direction.
+
+Concurrent mode places greater stress on the network, and can expose additional latency problems. It provides a more realistic estimate of expected bidirectional throughput. However, the download and upload speeds reported may be considerably lower than your line's rated speed. This is not a bug, nor is it a problem with your internet connection. It's because the ACK (acknowledge) messages sent back to the sender may consume a significant fraction of a link's capacity (as much as 50% with highly asymmetric links, e.g 15:1 or 20:1).
+
+After running `speedtest-netperf.sh`, if latency is seen to increase much during the data transfers, then other network activity, such as voice or video chat, gaming, and general interactive usage will likely suffer. Gamers will see this as frustrating lag when someone else uses the network, Skype and FaceTime users will see dropouts or freezes, and VOIP service may be unusable.
+
+## Installation
+
+This package and its dependencies should be installed from the official OpenWrt software repository with the command:
+`opkg install speedtest-netperf`
+
+If unavailable, search for and try to directly download the same package for a newer OpenWrt release, since it is architecture-independent and very portable.
+
+As a last resort, you may download and install the latest version directly from the author's personal repo: e.g.
+```
+cd /tmp
+uclient-fetch https://github.com/guidosarducci/papal-repo/raw/master/speedtest-netperf_1.0.0-1_all.ipk
+opkg install speedtest-netperf_1.0.0-1_all.ipk
+```
+
+## Usage
+
+The speedtest-netperf.sh script measures throughput, latency and CPU usage during file transfers. To invoke it:
+
+ speedtest-netperf.sh [-4 | -6] [-H netperf-server] [-t duration] [-p host-to-ping] [-n simultaneous-streams ] [-s | -c]
+
+Options, if present, are:
+
+ -4 | -6: Enable ipv4 or ipv6 testing (default - ipv4)
+ -H | --host: DNS or Address of a netperf server (default - netperf.bufferbloat.net)
+ Alternate servers are netperf-east (US, east coast),
+ netperf-west (US, California), and netperf-eu (Denmark).
+ -t | --time: Duration for how long each direction's test should run - (default - 60 seconds)
+ -p | --ping: Host to ping to measure latency (default - gstatic.com)
+ -n | --number: Number of simultaneous sessions (default - 5 sessions)
+ -s | --sequential: Sequential download/upload (default - sequential)
+ -c | --concurrent: Concurrent download/upload
+
+The primary script output shows download and upload speeds, together with the percent packet loss, and a summary of latencies, including min, max, average, median, and 10th and 90th percentiles so you can get a sense of the distribution.
+
+The tool also summarizes CPU usage statistics during the test, to highlight whether speeds may be CPU-bound during testing, and to provide a better sense of how much CPU "headroom" would be available during normal operation. The data includes per-CPU load and frequency (if supported), and CPU usage of the `netperf` test programs.
+
+### Examples
+Below is a comparison of sequential speed testing runs showing the benefits of SQM. On the left is a test without SQM. Note that the latency gets large (greater than half a second), meaning that network performance would be poor for anyone else using the network. On the right is a test using SQM: the latency goes up a little (less than 21 msec under load), and network performance remains good.
+
+Notice also that the activation of SQM requires greater CPU, but that in both cases the router is not CPU-bound and likely capable of supporting higher throughputs.
+
+```
+[Sequential Test: NO SQM, POOR LATENCY] [Sequential Test: WITH SQM, GOOD LATENCY]
+# speedtest-netperf.sh # speedtest-netperf.sh
+[date/time] Starting speedtest for 60 seconds per transfer [date/time] Starting speedtest for 60 seconds per transfer
+session. Measure speed to netperf.bufferbloat.net (IPv4) session. Measure speed to netperf.bufferbloat.net (IPv4)
+while pinging gstatic.com. Download and upload sessions are while pinging gstatic.com. Download and upload sessions are
+sequential, each with 5 simultaneous streams. sequential, each with 5 simultaneous streams.
+
+ Download: 35.40 Mbps Download: 32.69 Mbps
+ Latency: (in msec, 61 pings, 0.00% packet loss) Latency: (in msec, 61 pings, 0.00% packet loss)
+ Min: 10.228 Min: 9.388
+ 10pct: 38.864 10pct: 12.038
+ Median: 47.027 Median: 14.550
+ Avg: 45.953 Avg: 14.827
+ 90pct: 51.867 90pct: 17.122
+ Max: 56.758 Max: 20.558
+Processor: (in % busy, avg +/- stddev, 57 samples) Processor: (in % busy, avg +/- stddev, 55 samples)
+ cpu0: 56 +/- 6 cpu0: 82 +/- 5
+ Overhead: (in % total CPU used) Overhead: (in % total CPU used)
+ netperf: 34 netperf: 51
+
+ Upload: 5.38 Mbps Upload: 5.16 Mbps
+ Latency: (in msec, 62 pings, 0.00% packet loss) Latency: (in msec, 62 pings, 0.00% packet loss)
+ Min: 11.581 Min: 9.153
+ 10pct: 424.616 10pct: 10.401
+ Median: 504.339 Median: 14.151
+ Avg: 491.511 Avg: 14.056
+ 90pct: 561.466 90pct: 17.241
+ Max: 580.896 Max: 20.733
+Processor: (in % busy, avg +/- stddev, 60 samples) Processor: (in % busy, avg +/- stddev, 59 samples)
+ cpu0: 11 +/- 5 cpu0: 16 +/- 5
+ Overhead: (in % total CPU used) Overhead: (in % total CPU used)
+ netperf: 1 netperf: 1
+```
+
+Below is another comparison of SQM, but now using a concurrent speedtest. Notice that without SQM, the total throughput drops nearly 11 Mbps compared to the above sequential test without SQM. This is due to both poorer latencies and the consumption of bandwidth by ACK messages. As before, the use of SQM on the right not only yields a marked improvement in latencies, but also recovers almost 6 Mbps in throughput (with SQM using CAKE's ACK filtering).
+```
+[Concurrent Test: NO SQM, POOR LATENCY] [Concurrent Test: WITH SQM, GOOD LATENCY]
+# speedtest-netperf.sh --concurrent # speedtest-netperf.sh --concurrent
+[date/time] Starting speedtest for 60 seconds per transfer [date/time] Starting speedtest for 60 seconds per transfer
+session. Measure speed to netperf.bufferbloat.net (IPv4) session. Measure speed to netperf.bufferbloat.net (IPv4)
+while pinging gstatic.com. Download and upload sessions are while pinging gstatic.com. Download and upload sessions are
+concurrent, each with 5 simultaneous streams. concurrent, each with 5 simultaneous streams.
+
+ Download: 25.24 Mbps Download: 31.92 Mbps
+ Upload: 4.75 Mbps Upload: 4.41 Mbps
+ Latency: (in msec, 59 pings, 0.00% packet loss) Latency: (in msec, 61 pings, 0.00% packet loss)
+ Min: 9.401 Min: 10.244
+ 10pct: 129.593 10pct: 13.161
+ Median: 189.312 Median: 16.885
+ Avg: 195.418 Avg: 17.219
+ 90pct: 226.628 90pct: 21.166
+ Max: 416.665 Max: 28.224
+Processor: (in % busy, avg +/- stddev, 59 samples) Processor: (in % busy, avg +/- stddev, 56 samples)
+ cpu0: 45 +/- 12 cpu0: 86 +/- 4
+ Overhead: (in % total CPU used) Overhead: (in % total CPU used)
+ netperf: 25 netperf: 42
+```
+
+## Provenance
+
+The `speedtest-netperf.sh` utility leverages earlier scripts from the CeroWrt project used to measure network throughput and latency: [betterspeedtest.sh](https://github.com/richb-hanover/OpenWrtScripts#betterspeedtestsh) and [netperfrunner.sh](https://github.com/richb-hanover/OpenWrtScripts#netperfrunnersh). Both scripts are gratefully used with the permission of their author, [Rich Brown](https://github.com/richb-hanover/OpenWrtScripts).
--- /dev/null
+#!/bin/sh
+
+# This speed testing script provides a convenient means of on-device network
+# performance testing for OpenWrt routers, and subsumes functionality of the
+# earlier CeroWrt scripts betterspeedtest.sh and netperfrunner.sh written by
+# Rich Brown.
+#
+# When launched, the script uses netperf to run several upload and download
+# streams to an Internet server. This places heavy load on the bottleneck link
+# of your network (probably your Internet connection) while measuring the total
+# bandwidth of the link during the transfers. Under this network load, the
+# script simultaneously measures the latency of pings to see whether the file
+# transfers affect the responsiveness of your network. Additionally, the script
+# tracks the per-CPU processor usage, as well as the netperf CPU usage used for
+# the test. On systems that report CPU frequency scaling, the script can also
+# report per-CPU frequencies.
+#
+# The script operates in two modes of network loading: sequential and
+# concurrent. The default sequential mode emulates a web-based speed test by
+# first downloading and then uploading network streams, while concurrent mode
+# provides a stress test by dowloading and uploading streams simultaneously.
+#
+# NOTE: The script uses servers and network bandwidth that are provided by
+# generous volunteers (not some wealthy "big company"). Feel free to use the
+# script to test your SQM configuration or troubleshoot network and latency
+# problems. Continuous or high rate use of this script may result in denied
+# access. Happy testing!
+#
+# For more information, consult the online README.md:
+# https://github.com/openwrt/packages/blob/master/net/speedtest-netperf/files/README.md
+
+# Usage: speedtest-netperf.sh [-4 | -6] [ -H netperf-server ] [ -t duration ] [ -p host-to-ping ] [ -n simultaneous-streams ] [ -s | -c ]
+
+# Options: If options are present:
+#
+# -H | --host: netperf server name or IP (default netperf.bufferbloat.net)
+# Alternate servers are netperf-east (east coast US),
+# netperf-west (California), and netperf-eu (Denmark)
+# -4 | -6: Enable ipv4 or ipv6 testing (ipv4 is the default)
+# -t | --time: Duration of each direction's test - (default - 60 seconds)
+# -p | --ping: Host to ping to measure latency (default - gstatic.com)
+# -n | --number: Number of simultaneous sessions (default - 5 sessions)
+# based on whether concurrent or sequential upload/downloads)
+# -s | -c: Sequential or concurrent download/upload (default - sequential)
+
+# Copyright (c) 2014 - Rich Brown <rich.brown@blueberryhillsoftware.com>
+# Copyright (c) 2018 - Tony Ambardar <itugrok@yahoo.com>
+# GPLv2
+
+
+# Summarize contents of the ping's output file as min, avg, median, max, etc.
+# input parameter ($1) file contains the output of the ping command
+
+summarize_pings() {
+
+# Process the ping times, and summarize the results
+# grep to keep lines with "time=", and sed to isolate time stamps and sort them
+# awk builds an array of those values, prints first & last (which are min, max)
+# and computes average.
+# If the number of samples is >= 10, also computes median, and 10th and 90th
+# percentile readings.
+ sed 's/^.*time=\([^ ]*\) ms/\1 pingtime/' < $1 | grep -v "PING" | sort -n | awk '
+BEGIN {numdrops=0; numrows=0;}
+{
+ if ( $2 == "pingtime" ) {
+ numrows += 1;
+ arr[numrows]=$1; sum+=$1;
+ } else {
+ numdrops += 1;
+ }
+}
+END {
+ pc10="-"; pc90="-"; med="-";
+ if (numrows>=10) {
+ ix=int(numrows/10); pc10=arr[ix]; ix=int(numrows*9/10);pc90=arr[ix];
+ if (numrows%2==1) med=arr[(numrows+1)/2]; else med=(arr[numrows/2]);
+ }
+ pktloss = numdrops>0 ? numdrops/(numdrops+numrows) * 100 : 0;
+ printf(" Latency: [in msec, %d pings, %4.2f%% packet loss]\n",numdrops+numrows,pktloss)
+ if (numrows>0) {
+ fmt="%9s: %7.3f\n"
+ printf(fmt fmt fmt fmt fmt fmt, "Min",arr[1],"10pct",pc10,"Median",med,
+ "Avg",sum/numrows,"90pct",pc90,"Max",arr[numrows])
+ }
+}'
+}
+
+# Summarize the contents of the load file, speedtest process stat file, cpuinfo
+# file to show mean/stddev CPU utilization, CPU freq, netperf CPU usage.
+# input parameter ($1) file contains CPU load/frequency samples
+
+summarize_load() {
+ cat $1 /proc/$$/stat | awk -v SCRIPT_PID=$$ '
+# track CPU frequencies
+$1 == "cpufreq" {
+ sum_freq[$2]+=$3/1000
+ n_freq_samp[$2]++
+}
+# total CPU of speedtest processes
+$1 == SCRIPT_PID {
+ tot=$16+$17
+ if (init_proc_cpu=="") init_proc_cpu=tot
+ proc_cpu=tot-init_proc_cpu
+}
+# track aggregate CPU stats
+$1 == "cpu" {
+ tot=0; for (f=2;f<=8;f++) tot+=$f
+ if (init_cpu=="") init_cpu=tot
+ tot_cpu=tot-init_cpu
+ n_load_samp++
+}
+# track per-CPU stats
+$1 ~ /cpu[0-9]+/ {
+ tot=0; for (f=2;f<=8;f++) tot+=$f
+ usg=tot-($5+$6)
+ if (init_tot[$1]=="") {
+ init_tot[$1]=tot
+ init_usg[$1]=usg
+ cpus[n_cpus++]=$1
+ }
+ if (last_tot[$1]>0) {
+ sum_usg_2[$1] += ((usg-last_usg[$1])/(tot-last_tot[$1]))^2
+ }
+ last_tot[$1]=tot
+ last_usg[$1]=usg
+}
+END {
+ printf(" CPU Load: [in %% busy (avg +/- std dev)")
+ for (i in sum_freq) if (sum_freq[i]>0) {printf(" @ avg frequency"); break}
+ if (n_load_samp>0) n_load_samp--
+ printf(", %d samples]\n", n_load_samp)
+ for (i=0;i<n_cpus;i++) {
+ c=cpus[i]
+ if (n_load_samp>0) {
+ avg_usg=(last_tot[c]-init_tot[c])
+ avg_usg=avg_usg>0 ? (last_usg[c]-init_usg[c])/avg_usg : 0
+ std_usg=sum_usg_2[c]/n_load_samp-avg_usg^2
+ std_usg=std_usg>0 ? sqrt(std_usg) : 0
+ printf("%9s: %5.1f +/- %4.1f", c, avg_usg*100, std_usg*100)
+ avg_freq=n_freq_samp[c]>0 ? sum_freq[c]/n_freq_samp[c] : 0
+ if (avg_freq>0) printf(" @ %4d MHz", avg_freq)
+ printf("\n")
+ }
+ }
+ printf(" Overhead: [in %% used of total CPU available]\n")
+ printf("%9s: %5.1f\n", "netperf", tot_cpu>0 ? proc_cpu/tot_cpu*100 : 0)
+}'
+}
+
+# Summarize the contents of the speed file to show formatted transfer rate.
+# input parameter ($1) indicates transfer direction
+# input parameter ($2) file contains speed info from netperf
+
+summarize_speed() {
+ printf "%9s: %6.2f Mbps\n" $1 $(awk '{s+=$1} END {print s}' $2)
+}
+
+# Capture process load, then per-CPU load/frequency info at 1-second intervals.
+
+sample_load() {
+ local cpus="$(find /sys/devices/system/cpu -name 'cpu[0-9]*' 2>/dev/null)"
+ local f="cpufreq/scaling_cur_freq"
+ cat /proc/$$/stat
+ while : ; do
+ sleep 1s
+ egrep "^cpu[0-9]*" /proc/stat
+ for c in $cpus; do
+ [ -r $c/$f ] && echo "cpufreq $(basename $c) $(cat $c/$f)"
+ done
+ done
+}
+
+# Print a line of dots as a progress indicator.
+
+print_dots() {
+ while : ; do
+ printf "."
+ sleep 1s
+ done
+}
+
+# Start $MAXSESSIONS datastreams between netperf client and server
+# netperf writes the sole output value (in Mbps) to stdout when completed
+
+start_netperf() {
+ for i in $( seq $MAXSESSIONS ); do
+ netperf $TESTPROTO -H $TESTHOST -t $1 -l $TESTDUR -v 0 -P 0 >> $2 &
+# echo "Starting PID $! params: $TESTPROTO -H $TESTHOST -t $1 -l $TESTDUR -v 0 -P 0 >> $2"
+ done
+}
+
+# Wait until each of the background netperf processes completes
+
+wait_netperf() {
+ # gets a list of PIDs for child processes named 'netperf'
+# echo "Process is $$"
+# echo $(pgrep -P $$ netperf)
+ local err=0
+ for i in $(pgrep -P $$ netperf); do
+# echo "Waiting for $i"
+ wait $i || err=1
+ done
+ return $err
+}
+
+# Stop the background netperf processes
+
+kill_netperf() {
+ # gets a list of PIDs for child processes named 'netperf'
+# echo "Process is $$"
+# echo $(pgrep -P $$ netperf)
+ for i in $(pgrep -P $$ netperf); do
+# echo "Stopping $i"
+ kill -9 $i
+ wait $i 2>/dev/null
+ done
+}
+
+# Stop the current sample_load() process
+
+kill_load() {
+# echo "Load: $LOAD_PID"
+ kill -9 $LOAD_PID
+ wait $LOAD_PID 2>/dev/null
+ LOAD_PID=0
+}
+
+# Stop the current print_dots() process
+
+kill_dots() {
+# echo "Dots: $DOTS_PID"
+ kill -9 $DOTS_PID
+ wait $DOTS_PID 2>/dev/null
+ DOTS_PID=0
+}
+
+# Stop the current ping process
+
+kill_pings() {
+# echo "Pings: $PING_PID"
+ kill -9 $PING_PID
+ wait $PING_PID 2>/dev/null
+ PING_PID=0
+}
+
+# Stop the current load, pings and dots, and exit
+# ping command catches and handles first Ctrl-C, so you have to hit it again...
+
+kill_background_and_exit() {
+ kill_netperf
+ kill_load
+ kill_dots
+ rm -f $DLFILE
+ rm -f $ULFILE
+ rm -f $LOADFILE
+ rm -f $PINGFILE
+ echo; echo "Stopped"
+ exit 1
+}
+
+# Measure speed, ping latency and cpu usage of netperf data transfers
+# Called with direction parameter: "Download", "Upload", or "Bidirectional"
+# The function gets other info from globals and command-line arguments.
+
+measure_direction() {
+
+ # Create temp files for netperf up/download results
+ ULFILE=$(mktemp /tmp/netperfUL.XXXXXX) || exit 1
+ DLFILE=$(mktemp /tmp/netperfDL.XXXXXX) || exit 1
+ PINGFILE=$(mktemp /tmp/measurepings.XXXXXX) || exit 1
+ LOADFILE=$(mktemp /tmp/measureload.XXXXXX) || exit 1
+# echo $ULFILE $DLFILE $PINGFILE $LOADFILE
+
+ local dir=$1
+ local spd_test
+
+ # Start dots
+ print_dots &
+ DOTS_PID=$!
+# echo "Dots PID: $DOTS_PID"
+
+ # Start Ping
+ if [ $TESTPROTO -eq "-4" ]; then
+ ping $PINGHOST > $PINGFILE &
+ else
+ ping6 $PINGHOST > $PINGFILE &
+ fi
+ PING_PID=$!
+# echo "Ping PID: $PING_PID"
+
+ # Start CPU load sampling
+ sample_load > $LOADFILE &
+ LOAD_PID=$!
+# echo "Load PID: $LOAD_PID"
+
+ # Start netperf datastreams between client and server
+ if [ $dir = "Bidirectional" ]; then
+ start_netperf TCP_STREAM $ULFILE
+ start_netperf TCP_MAERTS $DLFILE
+ else
+ # Start unidirectional netperf with the proper direction
+ case $dir in
+ Download) spd_test="TCP_MAERTS";;
+ Upload) spd_test="TCP_STREAM";;
+ esac
+ start_netperf $spd_test $DLFILE
+ fi
+
+ # Wait until background netperf processes complete, check errors
+ if ! wait_netperf; then
+ echo;echo "WARNING: netperf returned errors. Results may be inaccurate!"
+ fi
+
+ # When netperf completes, stop the CPU monitor, dots and pings
+ kill_load
+ kill_pings
+ kill_dots
+ echo
+
+ # Print TCP Download/Upload speed
+ if [ $dir = "Bidirectional" ]; then
+ summarize_speed Download $DLFILE
+ summarize_speed Upload $ULFILE
+ else
+ summarize_speed $dir $DLFILE
+ fi
+
+ # Summarize the ping data
+ summarize_pings $PINGFILE
+
+ # Summarize the load data
+ summarize_load $LOADFILE
+
+ # Clean up
+ rm -f $DLFILE
+ rm -f $ULFILE
+ rm -f $PINGFILE
+ rm -f $LOADFILE
+}
+
+# ------- Start of the main routine --------
+
+# set an initial values for defaults
+TESTHOST="netperf.bufferbloat.net"
+TESTDUR="60"
+PINGHOST="gstatic.com"
+MAXSESSIONS=5
+TESTPROTO="-4"
+TESTSEQ=1
+
+# read the options
+
+# extract options and their arguments into variables.
+while [ $# -gt 0 ]
+do
+ case "$1" in
+ -s|--sequential) TESTSEQ=1 ; shift 1 ;;
+ -c|--concurrent) TESTSEQ=0 ; shift 1 ;;
+ -4|-6) TESTPROTO=$1 ; shift 1 ;;
+ -H|--host)
+ case "$2" in
+ "") echo "Missing hostname" ; exit 1 ;;
+ *) TESTHOST=$2 ; shift 2 ;;
+ esac ;;
+ -t|--time)
+ case "$2" in
+ "") echo "Missing duration" ; exit 1 ;;
+ *) TESTDUR=$2 ; shift 2 ;;
+ esac ;;
+ -p|--ping)
+ case "$2" in
+ "") echo "Missing ping host" ; exit 1 ;;
+ *) PINGHOST=$2 ; shift 2 ;;
+ esac ;;
+ -n|--number)
+ case "$2" in
+ "") echo "Missing number of simultaneous streams" ; exit 1 ;;
+ *) MAXSESSIONS=$2 ; shift 2 ;;
+ esac ;;
+ --) shift ; break ;;
+ *) echo "Usage: speedtest-netperf.sh [ -s | -c ] [-4 | -6] [ -H netperf-server ] [ -t duration ] [ -p host-to-ping ] [ -n simultaneous-sessions ]" ; exit 1 ;;
+ esac
+done
+
+# Check dependencies
+
+if ! netperf -V >/dev/null 2>&1; then
+ echo "Missing netperf program, please install" ; exit 1
+fi
+
+# Start the main test
+
+DATE=$(date "+%Y-%m-%d %H:%M:%S")
+echo "$DATE Starting speedtest for $TESTDUR seconds per transfer session."
+echo "Measure speed to $TESTHOST (IPv${TESTPROTO#-}) while pinging $PINGHOST."
+echo -n "Download and upload sessions are "
+[ "$TESTSEQ " -eq "1" ] && echo -n "sequential," || echo -n "concurrent,"
+echo " each with $MAXSESSIONS simultaneous streams."
+
+# Catch a Ctl-C and stop background netperf, CPU stats, pinging and print_dots
+trap kill_background_and_exit HUP INT TERM
+
+if [ $TESTSEQ -eq "1" ]; then
+ measure_direction "Download"
+ measure_direction "Upload"
+else
+ measure_direction "Bidirectional"
+fi
#
-# Copyright (C) 2018 The Regents of the University of California
+# Copyright (C) 2019 The Regents of the University of California
#
# This is free software, licensed under the GNU General Public License v3.
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
PKG_NAME:=spoofer
-PKG_VERSION:=1.4.1
+PKG_VERSION:=1.4.5
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://www.caida.org/projects/spoofer/downloads
-PKG_HASH:=e6d9e954709a15dc55187a962e8698d880f3df3ce8b914097c576a3a1f852d0d
+PKG_HASH:=5f045be7269d93efb1ee7918e923e7695c9a36d192c3ada932bb6ae7fba8d15e
-PKG_LICENSE:=GPL-3.0
+PKG_MAINTAINER:=Ken Keys <spoofer-info@caida.org>
+PKG_LICENSE:=GPL-3.0-or-later
PKG_LICENSE_FILES:=LICENSE
PKG_USE_MIPS16:=0
-HOST_BUILD_DEPENDS:=protobuf/host
include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/package.mk
CATEGORY:=Network
TITLE:=Measure your ISP's resistance to spoofed IP packets
URL:=https://spoofer.caida.org/
- MAINTAINER:=Ken Keys <spoofer-info@caida.org>
DEPENDS:=+protobuf-lite +libpcap +libpthread +libopenssl
endef
include $(TOPDIR)/rules.mk
PKG_NAME:=squid
-PKG_VERSION:=4.4
+PKG_VERSION:=4.6
PKG_RELEASE:=2
-PKG_LICENSE:=GPL-2.0
-PKG_MAINTAINER:=Marko Ratkaj <marko.ratkaj@sartura.hr>
-
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=http://www3.us.squid-cache.org/Versions/v4/ \
http://www2.pl.squid-cache.org/Versions/v4/ \
http://www.squid-cache.org/Versions/v4/
-PKG_HASH:=4905e6da7f5574d2583ba36f398bb062a12d51e70d67035078b6e85b09e9ee82
+PKG_HASH:=015bade5d3a4905142c4c605df5c4216471e3d8338079955e0e44b0ae0303d41
+
+PKG_MAINTAINER:=Marko Ratkaj <marko.ratkaj@sartura.hr>
+PKG_LICENSE:=GPL-2.0-or-later
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
ac_cv_header_linux_netfilter_ipv4_h=yes \
ac_cv_epoll_works=yes
+TARGET_CFLAGS += -Wno-error
+TARGET_LDFLAGS += -latomic
+
define Build/Compile
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/lib all
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
MIMETABLE="/tmp/squid/mime.conf"
validate_squid_section() {
- uci_validate_section squid squid "${1}" \
+ uci_load_validate squid squid "$1" "$2" \
'config_file:string' \
'http_port:port:3128' \
'http_port_options:string' \
group_exists squid || group_add squid $USERID && group_add_user squid squid
}
-start_service() {
- local config_file http_port http_port_options ssldb ssldb_options coredump_dir visible_hostname pinger_enable
+start_squid_instance() {
+ local config_dir
- validate_squid_section squid || {
+ [ "$2" = 0 ] || {
echo "validation failed"
return 1
}
procd_close_instance
}
+start_service()
+{
+ validate_squid_section squid start_squid_instance
+}
+
stop_service()
{
- ${PROG} -f $CONFIGFILE -N -k shutdown 2>/dev/null
+ $PROG -f $CONFIGFILE -N -k shutdown 2>/dev/null
}
service_triggers()
--- a/src/Makefile.in
+++ b/src/Makefile.in
-@@ -8383,7 +8383,8 @@
+@@ -8385,7 +8385,8 @@
# cf_gen builds the configuration files.
cf_gen$(EXEEXT): $(cf_gen_SOURCES) $(cf_gen_DEPENDENCIES) cf_gen_defines.cci
+++ /dev/null
---- a/src/ssl/support.cc
-+++ b/src/ssl/support.cc
-@@ -485,7 +485,7 @@ Ssl::Initialize(void)
-
- SQUID_OPENSSL_init_ssl();
-
--#if HAVE_OPENSSL_ENGINE_H
-+#ifndef OPENSSL_NO_ENGINE
- if (::Config.SSL.ssl_engine) {
- ENGINE_load_builtin_engines();
- ENGINE *e;
SUBMENU:=SSH
TITLE:=Manages Local and Remote openssh ssh(1) tunnels
DEPENDS:=+openssh-client
+ PKGARCH:=all
endef
define Package/sshtunnel/description
-menu "Configuration"
- depends on PACKAGE_strongswan
+
+if PACKAGE_strongswan
+comment Configuration
# --with-routing-table
config STRONGSWAN_ROUTING_TABLE
prompt "Set the IPsec routing table priority"
default "220"
-endmenu
+comment Packages
+
+endif
include $(TOPDIR)/rules.mk
PKG_NAME:=strongswan
-PKG_VERSION:=5.7.2
+PKG_VERSION:=5.8.0
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=http://download.strongswan.org/ http://download2.strongswan.org/
-PKG_HASH:=308e3ba76e2ce2da070e48fcebbe1fa923a27cc71e43bf63917e6f2a889ecc70
+PKG_SOURCE_URL:=https://download.strongswan.org/ https://download2.strongswan.org/
+PKG_HASH:=15b1e10c7dd6253ab5d791fe9b9cb84624e24c118aecd9b90251b4e60daa0933
PKG_LICENSE:=GPL-2.0+
PKG_MAINTAINER:=Stijn Tintel <stijn@linux-ipv6.be>
define Package/strongswan
$(call Package/strongswan/Default)
+ MENU:=1
DEPENDS:= +libpthread +ip \
+kmod-crypto-authenc \
+kmod-ipsec +kmod-ipsec4 +IPV6:kmod-ipsec6 \
define Package/strongswan-full
$(call Package/strongswan/Default)
TITLE+= (full)
- DEPENDS:= +strongswan \
+ DEPENDS:= strongswan \
+strongswan-charon \
+strongswan-charon-cmd \
+strongswan-ipsec \
define Package/strongswan-default
$(call Package/strongswan/Default)
TITLE+= (default)
- DEPENDS:= +strongswan \
+ DEPENDS:= strongswan \
+strongswan-charon \
+strongswan-ipsec \
+strongswan-mod-aes \
define Package/strongswan-isakmp
$(call Package/strongswan/Default)
TITLE+= (isakmp)
- DEPENDS:= +strongswan \
+ DEPENDS:= strongswan \
+strongswan-charon \
+strongswan-ipsec \
+strongswan-mod-aes \
define Package/strongswan-minimal
$(call Package/strongswan/Default)
TITLE+= (minimal)
- DEPENDS:= +strongswan \
+ DEPENDS:= strongswan \
+strongswan-charon \
+strongswan-mod-aes \
+strongswan-mod-gmp \
define Package/strongswan-charon
$(call Package/strongswan/Default)
TITLE+= IKEv1/IKEv2 keying daemon
- DEPENDS:= +strongswan
+ DEPENDS:= strongswan
endef
define Package/strongswan-charon/description
define Package/strongswan-charon-cmd
$(call Package/strongswan/Default)
TITLE+= charon-cmd utility
- DEPENDS:= +strongswan +strongswan-charon
+ DEPENDS:= strongswan +strongswan-charon
endef
define Package/strongswan-charon-cmd/description
define Package/strongswan-ipsec
$(call Package/strongswan/Default)
TITLE+= utilities
- DEPENDS:= +strongswan
+ DEPENDS:= strongswan
endef
define Package/strongswan-ipsec/description
define Package/strongswan-pki
$(call Package/strongswan/Default)
TITLE+= PKI tool
- DEPENDS:= +strongswan
+ DEPENDS:= strongswan
endef
define Package/strongswan-pki/description
define Package/strongswan-scepclient
$(call Package/strongswan/Default)
TITLE+= SCEP client
- DEPENDS:= +strongswan
+ DEPENDS:= strongswan
endef
define Package/strongswan-scepclient/description
define Package/strongswan-swanctl
$(call Package/strongswan/Default)
TITLE+= swanctl utility
- DEPENDS:= +strongswan +strongswan-mod-vici
+ DEPENDS:= strongswan +strongswan-mod-vici
endef
define Package/strongswan-swanctl/description
define Package/strongswan-libtls
$(call Package/strongswan/Default)
TITLE+= libtls
- DEPENDS:= +strongswan
+ DEPENDS:= strongswan
endef
define Package/strongswan-libtls/description
define Package/strongswan-mod-$(1)
$$(call Package/strongswan/Default)
TITLE:= StrongSwan $(2) plugin
- DEPENDS:= +strongswan $(3)
+ DEPENDS:= strongswan $(3)
endef
define Package/strongswan-mod-$(1)/install
#include <linux/netlink.h>
--- a/src/libcharon/plugins/kernel_netlink/kernel_netlink_shared.c
+++ b/src/libcharon/plugins/kernel_netlink/kernel_netlink_shared.c
-@@ -38,6 +38,8 @@
+@@ -39,6 +39,8 @@
* THE SOFTWARE.
*/
+++ /dev/null
---- a/src/starter/netkey.c
-+++ b/src/starter/netkey.c
-@@ -30,7 +30,7 @@ bool starter_netkey_init(void)
- /* af_key module makes the netkey proc interface visible */
- if (stat(PROC_MODULES, &stb) == 0)
- {
-- ignore_result(system("modprobe -qv af_key"));
-+ ignore_result(system("modprobe af_key 2>&1 >/dev/null"));
- }
-
- /* now test again */
-@@ -44,11 +44,11 @@ bool starter_netkey_init(void)
- /* make sure that all required IPsec modules are loaded */
- if (stat(PROC_MODULES, &stb) == 0)
- {
-- ignore_result(system("modprobe -qv ah4"));
-- ignore_result(system("modprobe -qv esp4"));
-- ignore_result(system("modprobe -qv ipcomp"));
-- ignore_result(system("modprobe -qv xfrm4_tunnel"));
-- ignore_result(system("modprobe -qv xfrm_user"));
-+ ignore_result(system("modprobe ah4 2>&1 >/dev/null"));
-+ ignore_result(system("modprobe esp4 2>&1 >/dev/null"));
-+ ignore_result(system("modprobe ipcomp 2>&1 >/dev/null"));
-+ ignore_result(system("modprobe xfrm4_tunnel 2>&1 >/dev/null"));
-+ ignore_result(system("modprobe xfrm_user 2>&1 >/dev/null"));
- }
-
- DBG2(DBG_APP, "found netkey IPsec stack");
ARG_DISBL_SET([curve25519], [disable Curve25519 Diffie-Hellman plugin.])
ARG_DISBL_SET([hmac], [disable HMAC crypto implementation plugin.])
ARG_ENABL_SET([md4], [enable MD4 software implementation plugin.])
-@@ -1413,6 +1414,7 @@ ADD_PLUGIN([botan], [s ch
+@@ -1423,6 +1424,7 @@ ADD_PLUGIN([botan], [s ch
ADD_PLUGIN([af-alg], [s charon scepclient pki scripts medsrv attest nm cmd aikgen])
ADD_PLUGIN([fips-prf], [s charon nm cmd])
ADD_PLUGIN([gmp], [s charon scepclient pki scripts manager medsrv attest nm cmd aikgen fuzz])
ADD_PLUGIN([curve25519], [s charon pki scripts nm cmd])
ADD_PLUGIN([agent], [s charon nm cmd])
ADD_PLUGIN([keychain], [s charon cmd])
-@@ -1553,6 +1555,7 @@ AM_CONDITIONAL(USE_SHA3, test x$sha3 = x
+@@ -1563,6 +1565,7 @@ AM_CONDITIONAL(USE_SHA3, test x$sha3 = x
AM_CONDITIONAL(USE_MGF1, test x$mgf1 = xtrue)
AM_CONDITIONAL(USE_FIPS_PRF, test x$fips_prf = xtrue)
AM_CONDITIONAL(USE_GMP, test x$gmp = xtrue)
AM_CONDITIONAL(USE_CURVE25519, test x$curve25519 = xtrue)
AM_CONDITIONAL(USE_RDRAND, test x$rdrand = xtrue)
AM_CONDITIONAL(USE_AESNI, test x$aesni = xtrue)
-@@ -1827,6 +1830,7 @@ AC_CONFIG_FILES([
+@@ -1838,6 +1841,7 @@ AC_CONFIG_FILES([
src/libstrongswan/plugins/mgf1/Makefile
src/libstrongswan/plugins/fips_prf/Makefile
src/libstrongswan/plugins/gmp/Makefile
include $(TOPDIR)/rules.mk
PKG_NAME:=stubby
-PKG_VERSION:=0.2.4
+PKG_VERSION:=0.2.6
PKG_RELEASE:=1
PKG_LICENSE:=BSD-3-Clause
PKG_MAINTAINER:=Jonathan Underwood <jonathan.underwood@gmail.com>
PKG_SOURCE_PROTO:=git
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://github.com/getdnsapi/$(PKG_NAME)
-PKG_SOURCE_VERSION:=58200cadec6371f95e31a7f3735225c5a46ecf75
-PKG_MIRROR_HASH:=28c46f4464cb41cf59264d10da63dc25ece9a1d00b4dfb05a9276594658e5eb9
+PKG_SOURCE_VERSION:=v$(PKG_VERSION)
+PKG_MIRROR_HASH:=af896c471ac67b31c2263d11fcdfcdb32a213621c2f8789f4b0a4ceca4437108
PKG_FIXUP:=autoreconf
This option specifies additional command line arguments for
stubby daemon. By default, this is an empty string.
-
+
+#### `option tls_cipher_list`
+
+If set, this specifies the acceptable ciphers for DNS over TLS. With OpenSSL
+1.1.1 this list is for TLS1.2 and older only. Ciphers for TLS1.3 should be set
+with the `tls_ciphersuites` option. This option can also be given per upstream
+resolver. By default, this option is not set.
+
+#### `option tls_ciphersuites`
+
+If set, this specifies the acceptable cipher for DNS over TLS1.3. OpenSSL
+version 1.1.1 or greater is required for this option. This option can also be
+given per upstream resolver. By default, this option is not set.
+
+#### `option tls_min_version`
+
+If set, this specifies the minimum acceptable TLS version. Works with OpenSSL
+1.1.1 or greater only. This option can also be given per upstream resolver. By
+default, this option is not set.
+
+#### `option tls_max_version`
+
+If set, this specifies the maximum acceptable TLS version. Works with OpenSSL
+1.1.1 or greater only. This option can also be given per upstream resolver. By
+default, this option is not set.
+
+
### `resolver` section options
#### `option address`
This option specifies the upstream domain name used for TLS authentication with
the supplied server certificate
+#### `option tls_port`
+
+This option specifies the TLS port for the upstream resolver. If not specified,
+this defaults to 853.
+
+#### `option tls_cipher_list`
+
+If set, this specifies the acceptable ciphers for DNS over TLS. With OpenSSL
+1.1.1 this list is for TLS1.2 and older only. Ciphers for TLS1.3 should be set
+with the `tls_ciphersuites` option. By default, this option is not set. If set,
+this overrides the global value.
+
+#### `option tls_ciphersuites`
+
+If set, this specifies the acceptable cipher for DNS over TLS1.3. OpenSSL
+version 1.1.1 or greater is required for this option. By default, this option is
+not set. If set, this overrides the global value.
+
+#### `option tls_min_version`
+
+If set, this specifies the minimum acceptable TLS version. Works with OpenSSL
+1.1.1 or greater only. By default, this option is not set. If set, this
+overrides the global value.
+
+#### `option tls_max_version`
+
+If set, this specifies the maximum acceptable TLS version. Works with OpenSSL
+1.1.1 or greater only. By default, this options is not set. If set, this
+overrides the global value.
+
#### `list spki`
This list specifies the SPKI pinset which is verified against the keys in the
-server cerrtificate. The values takes the form `'<digest type>/value>'`, where
+server cerrtificate. The value takes the form `'<digest type>/value>'`, where
the `digest type` is the hashing algorithm used, and the value is the Base64
encoded hash of the public key. At present, only `sha256` is
supported for the digest type.
list listen_address '0::1@5453'
# option log_level '7'
# option command_line_arguments ''
+ # option tls_cipher_list 'EECDH+AESGCM:EECDH+CHACHA20'
+ # option tls_ciphersuites 'TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256'
+ # option tls_min_version '1.2'
+ # option tls_max_version '1.3'
# Upstream resolvers are specified using 'resolver' sections.
config resolver
option address '2606:4700:4700::1111'
option tls_auth_name 'cloudflare-dns.com'
+ # option tls_port 853
# list spki 'sha256/yioEpqeR4WtDwE9YxNVnCEkTxIjx6EEIwFSQW+lJsbc='
+ # option tls_cipher_list 'EECDH+AESGCM:EECDH+CHACHA20'
+ # option tls_ciphersuites 'TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256'
+ # option tls_min_version '1.2'
+ # option tls_max_version '1.3'
config resolver
option address '2606:4700:4700::1001'
option tls_auth_name 'cloudflare-dns.com'
+ # option tls_port 853
# list spki 'sha256/yioEpqeR4WtDwE9YxNVnCEkTxIjx6EEIwFSQW+lJsbc='
+ # option tls_cipher_list 'EECDH+AESGCM:EECDH+CHACHA20'
+ # option tls_ciphersuites 'TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256'
+ # option tls_min_version '1.2'
+ # option tls_max_version '1.3'
config resolver
option address '1.1.1.1'
option tls_auth_name 'cloudflare-dns.com'
+ # option tls_port 853
# list spki 'sha256/yioEpqeR4WtDwE9YxNVnCEkTxIjx6EEIwFSQW+lJsbc='
+ # option tls_cipher_list 'EECDH+AESGCM:EECDH+CHACHA20'
+ # option tls_ciphersuites 'TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256'
+ # option tls_min_version '1.2'
+ # option tls_max_version '1.3'
config resolver
option address '1.0.0.1'
option tls_auth_name 'cloudflare-dns.com'
+ # option tls_port 853
# list spki 'sha256/yioEpqeR4WtDwE9YxNVnCEkTxIjx6EEIwFSQW+lJsbc='
+ # option tls_cipher_list 'EECDH+AESGCM:EECDH+CHACHA20'
+ # option tls_ciphersuites 'TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256'
+ # option tls_min_version '1.2'
+ # option tls_max_version '1.3'
local upstream_recursive_servers_section=0
local command_line_arguments
local log_level
+ local tls_cipher_list
+ local tls_ciphersuites
+ local tls_min_version
+ local tls_max_version
# Generate configuration. See: https://github.com/getdnsapi/stubby/blob/develop/stubby.yml.example
echo "# Autogenerated configuration from uci data" > "$config_file"
config_get idle_timeout "global" idle_timeout "10000"
echo "idle_timeout: $idle_timeout" >> "$config_file"
+ config_get tls_cipher_list "global" tls_cipher_list ""
+ if [ -n "$tls_cipher_list" ]; then
+ echo "tls_cipher_list: \"$tls_cipher_list\"" >> "$config_file"
+ fi
+
+ config_get tls_ciphersuites "global" tls_ciphersuites ""
+ if [ -n "$tls_ciphersuites" ]; then
+ echo "tls_ciphersuites: \"$tls_ciphersuites\"" >> "$config_file"
+ fi
+
+ config_get tls_min_version "global" tls_min_version ""
+ if [ -n "$tls_min_version" ]; then
+ echo "tls_min_version: GETDNS_TLS${tls_min_version/\./_}" >> "$config_file"
+ fi
+
+ config_get tls_max_version "global" tls_max_version ""
+ if [ -n "$tls_max_version" ]; then
+ echo "tls_max_version: GETDNS_TLS${tls_max_version/\./_}" >> "$config_file"
+ fi
+
handle_listen_address_value()
{
local value="$1"
local config=$1
local address
local tls_auth_name
+ local tls_port
local tls_pubkey_pinset_section=0
+ local tls_cipher_list
+ local tls_ciphersuites
+ local tls_min_version
+ local tls_max_version
if [ "$upstream_recursive_servers_section" = 0 ]; then
echo "upstream_recursive_servers:" >> "$config_file"
upstream_recursive_servers_section=1
fi
config_get address "$config" address
- config_get tls_auth_name "$config" tls_auth_name
echo " - address_data: $address" >> "$config_file"
+
+ config_get tls_auth_name "$config" tls_auth_name
echo " tls_auth_name: \"$tls_auth_name\"" >> "$config_file"
+ config_get tls_auth_port "$config" tls_port ""
+ if [ -n "$tls_port" ]; then
+ echo " tls_port: $tls_port" >> "$config_file"
+ fi
+
+ config_get tls_cipher_list "$config" tls_cipher_list ""
+ if [ -n "$tls_cipher_list" ]; then
+ echo " tls_cipher_list: \"$tls_cipher_list\"" >> "$config_file"
+ fi
+
+ config_get tls_ciphersuites "$config" tls_ciphersuites ""
+ if [ -n "$tls_ciphersuites" ]; then
+ echo " tls_ciphersuites: \"$tls_ciphersuites\"" >> "$config_file"
+ fi
+
+ config_get tls_min_version "$config" tls_min_version ""
+ if [ -n "$tls_min_version" ]; then
+ echo " tls_min_version: GETDNS_TLS${tls_min_version/\./_}" >> "$config_file"
+ fi
+
+ config_get tls_max_version "$config" tls_max_version ""
+ if [ -n "$tls_max_version" ]; then
+ echo " tls_max_version: GETDNS_TLS${tls_max_version/\./_}" >> "$config_file"
+ fi
+
handle_resolver_spki()
{
local val="$1"
- local digest="${val%/*}"
+ local digest="${val%%/*}"
local value="${val#*/}"
if [ "$tls_pubkey_pinset_section" = 0 ]; then
upstream_recursive_servers:
- address_data: 2606:4700:4700::1111
tls_auth_name: "cloudflare-dns.com"
- - address_data: 2606:4700:4700::1111
+ - address_data: 2606:4700:4700::1001
tls_auth_name: "cloudflare-dns.com"
- address_data: 1.1.1.1
tls_auth_name: "cloudflare-dns.com"
include $(TOPDIR)/rules.mk
PKG_NAME:=stunnel
-PKG_VERSION:=5.49
-PKG_RELEASE:=2
+PKG_VERSION:=5.54
+PKG_RELEASE:=1
PKG_LICENSE:=GPL-2.0+
PKG_MAINTAINER:=Florian Eckert <fe@dev.tdt.de>
https://www.usenix.org.uk/mirrors/stunnel/archive/$(word 1, $(subst .,$(space),$(PKG_VERSION))).x/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=3d6641213a82175c19f23fde1c3d1c841738385289eb7ca1554f4a58b96d955e
+PKG_HASH:=5e8588a6c274b46b1d63e1b50f0725f4908dec736f6588eb48d1eb3d20c87902
PKG_FIXUP:=autoreconf
PKG_FIXUP:=patch-libtool
--with-threads=pthread \
--with-ssl=$(STAGING_DIR)/usr \
--disable-libwrap \
- --disable-systemd \
- --disable-fips
+ --disable-systemd
ifeq ($(CONFIG_IPV6),n)
CONFIGURE_ARGS+= \
'checkHost:list(host)' \
'checkIP:list(ipaddr)' \
'ciphers:list(string)' \
+ 'ciphersuites:list(string)' \
'client:bool' \
'config:list(string)' \
'connect:list(string)' \
'CRLfile:string' \
'CRLpath:string' \
- 'curve:string' \
+ 'curves:list(string)' \
'debug:or(range(0,7),string)' \
'delay:bool' \
'engineId:string' \
'socket:list(string)' \
'sslVersion:or("all","SSLv2","SSLv3","TLSv1","TLSv1.1","TLSv1.2")' \
'stack:uinteger' \
+ 'ticketKeySecret:string' \
+ 'ticketMacSecret:string' \
'TIMEOUTbusy:uinteger' \
'TIMEOUTclose:uinteger' \
'TIMEOUTconnect:uinteger' \
cert \
CRLfile \
CRLpath \
- curve \
debug \
logId \
engineId \
setuid \
sslVersion \
stack \
+ ticketKeySecret \
+ ticketMacSecret \
TIMEOUTbusy \
TIMEOUTclose \
TIMEOUTconnect \
print_lists_reduce : \
ciphers \
+ curves \
+ ciphersuites \
;
print_host_port \
#
-# Copyright (C) 2007-2017 OpenWrt.org
-#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
PKG_NAME:=subversion
PKG_RELEASE:=1
-PKG_VERSION:=1.11.1
+PKG_VERSION:=1.12.0
PKG_SOURCE_URL:=@APACHE/subversion
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_HASH:=9efd2750ca4d72ec903431a24b9c732b6cbb84aad9b7563f59dd96dea5be60bb
+PKG_HASH:=7fae7c73d8a007c107c0ae5eb372bc0bb013dbfe966fcd5c59cd5a195a5e2edf
PKG_LICENSE:=Apache-2.0
PKG_LICENSE_FILES:=LICENSE
PKG_MAINTAINER:=Val Kulkov <val.kulkov@gmail.com>
PKG_FIXUP:=autoreconf
PKG_MACRO_PATHS:=build/ac-macros
PKG_BUILD_DEPENDS:=apr-util
+PKG_BUILD_PARALLEL:=1
+PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk
CATEGORY:=Network
SUBMENU:=Version Control Systems
TITLE:=A compelling replacement for CVS
- DEPENDS:=+zlib +libsqlite3 +PACKAGE_unixodbc:unixodbc +libapr +libaprutil +libmagic \
- $(ICONV_DEPENDS) $(INTL_DEPENDS)
- URL:=http://subversion.apache.org/
+ DEPENDS:=+PACKAGE_unixodbc:unixodbc +libaprutil +libmagic $(ICONV_DEPENDS) $(INTL_DEPENDS)
+ URL:=https://subversion.apache.org/
endef
define Package/subversion/Default/description
endef
TARGET_CFLAGS += $(FPIC)
-TARGET_CPPFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
APU_LIBS=$(shell $(STAGING_DIR)/usr/bin/apu-1-config --link-libtool --libs)
+TARGET_LDFLAGS += $(APU_LIBS)
CONFIGURE_ARGS += \
--with-apr="$(STAGING_DIR)/usr/bin/apr-1-config" \
CONFIGURE_ARGS += --disable-nls
endif
-CONFIGURE_VARS += \
- LDFLAGS="$(TARGET_LDFLAGS) $(APU_LIBS) -lcrypt -lm \
- -lz -lpthread $(if $(INTL_FULL),-lintl)"
- CPPFLAGS="$(TARGET_CPPFLAGS)"
-
-define Build/Compile
- $(MAKE) -C $(PKG_BUILD_DIR) \
- DESTDIR="$(PKG_INSTALL_DIR)" \
- all local-install
-endef
-
define Package/subversion-libs/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libsvn_*.so.* $(1)/usr/lib/
---- a/build/ac-macros/macosx.m4 2016-02-09 01:24:13.181409245 -0500
-+++ b/build/ac-macros/macosx.m4 2016-02-09 01:25:15.873408288 -0500
-@@ -17,94 +17,4 @@ dnl specific language governing permis
- dnl under the License.
- dnl ===================================================================
+--- a/build/ac-macros/macosx.m4
++++ b/build/ac-macros/macosx.m4
+@@ -19,80 +19,3 @@ dnl ====================================
dnl
--dnl Mac OS X specific checks
+ dnl Mac OS X specific checks
-dnl SVN_LIB_MACHO_ITERATE
-dnl Check for _dyld_image_name and _dyld_image_header availability
- #error ProperyList API unavailable.
- #endif
- ]],[[]])],[
-- dnl ### Hack. We should only need to pass the -framework options when
-- dnl linking libsvn_subr, since it is the only library that uses Keychain.
-- dnl
-- dnl Unfortunately, libtool 1.5.x doesn't track transitive dependencies for
-- dnl OS X frameworks like it does for normal libraries, so we need to
-- dnl explicitly pass the option to all the users of libsvn_subr to allow
-- dnl static builds to link successfully.
-- dnl
-- dnl This does mean that all executables we link will be linked directly
-- dnl to these frameworks - even when building shared libraries - but that
-- dnl shouldn't cause any problems.
--
-- LIBS="$LIBS -framework CoreFoundation"
+- SVN_MACOS_PLIST_LIBS="-framework CoreFoundation"
+- AC_SUBST(SVN_MACOS_PLIST_LIBS)
- AC_DEFINE([SVN_HAVE_MACOS_PLIST], [1],
- [Is Mac OS property list API available?])
- AC_MSG_RESULT([yes])
- #error KeyChain API unavailable.
- #endif
- ]],[[]])],[
-- dnl ### Hack, see SVN_LIB_MACOS_PLIST
-- LIBS="$LIBS -framework Security"
-- LIBS="$LIBS -framework CoreServices"
+- SVN_MACOS_KEYCHAIN_LIBS="-framework Security -framework CoreServices"
+- AC_SUBST(SVN_MACOS_KEYCHAIN_LIBS)
- AC_DEFINE([SVN_HAVE_KEYCHAIN_SERVICES], [1], [Is Mac OS KeyChain support enabled?])
- AC_MSG_RESULT([yes])
- ],[
- ])
- fi
-])
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -56,8 +56,8 @@ SVN_XML_LIBS = @SVN_XML_LIBS@
+ SVN_ZLIB_LIBS = @SVN_ZLIB_LIBS@
+ SVN_LZ4_LIBS = @SVN_LZ4_LIBS@
+ SVN_UTF8PROC_LIBS = @SVN_UTF8PROC_LIBS@
+-SVN_MACOS_PLIST_LIBS = @SVN_MACOS_PLIST_LIBS@
+-SVN_MACOS_KEYCHAIN_LIBS = @SVN_MACOS_KEYCHAIN_LIBS@
++SVN_MACOS_PLIST_LIBS =
++SVN_MACOS_KEYCHAIN_LIBS =
+
+ LIBS = @LIBS@
+
--- /dev/null
+#
+# Copyright (C) 2018-2019 Luiz Angelo Daros de Luca
+#
+# This is free software, licensed under the GNU General Public License v2.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=switchdev-poller
+PKG_VERSION:=1.0.1
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
+PKG_LICENSE:=GPLv2
+
+PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
+include $(INCLUDE_DIR)/package.mk
+
+define Package/switchdev-poller
+ SECTION:=net
+ CATEGORY:=Network
+ DEPENDS:=+swconfig
+ TITLE:=Poll switchdev port to bring CPU ports up/down
+ PKGARCH:=all
+endef
+
+define Package/switchdev-poller/description
+This service monitors switchdev ports and brings down CPU ports when
+all related non-CPU vlan ports are also down. Otherwise, it brings
+the port up.
+
+endef
+
+define Build/Compile
+endef
+
+define Package/switchdev-poller/install
+ $(CP) ./files/* $(1)
+endef
+
+$(eval $(call BuildPackage,switchdev-poller))
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2018-2019 Luiz Angelo Daros de Luca <luizluca@gmail.com>
+
+START=99
+USE_PROCD=1
+
+start_service() {
+ procd_open_instance switchdev-poller
+ procd_set_param command /usr/lib/switchdev-poller/switchdev-poller
+ procd_set_param stdout 1
+ procd_set_param stderr 0 # enable for extra debug info
+ procd_set_param respawn 3600 5 5
+ procd_close_instance
+}
+
+service_triggers() {
+ procd_add_reload_trigger network
+}
--- /dev/null
+#!/bin/sh
+# shellcheck disable=SC2039,SC1091
+# https://www.shellcheck.net/wiki/SC2039 -- In POSIX sh, SC2039: In POSIX sh, string replacement is undefined.
+# https://www.shellcheck.net/wiki/SC2039 -- In POSIX sh, string indexing is undefined.
+# https://www.shellcheck.net/wiki/SC1091 -- Not following: /lib/functions.sh:...
+# Copyright (C) 2018 Luiz Angelo Daros de Luca <luizluca@gmail.com>
+#
+# Pools switchdev for port changes
+#
+
+[ -n "$NICED" ] && NICED=1 exec nice -n 19 "$0" "$@"
+
+. /usr/share/libubox/jshn.sh
+. /lib/functions.sh
+
+cpu_ports=""
+
+json_init
+json_load "$(cat /etc/board.json)"
+
+switches=
+json_get_keys switches switch
+json_select switch
+for switch in $switches; do
+ echo Loading $switch >&2
+ json_select "$switch"
+ if json_is_a ports array; then
+ ports=
+ json_get_keys ports ports
+ json_select ports
+
+ for port in $ports; do
+ echo Checking port "$port" in "$switch" >&2
+ json_select "$port"
+ num=
+ json_get_vars num device
+ if [ -n "$device" ]; then
+ echo "Port ${switch}_$num is CPU port as $device" >&2
+ cpu_ports="$cpu_ports ${switch}_$num=$device"
+ fi
+ json_select ..
+ done
+ json_select ..
+ fi
+ json_select ..
+done
+
+each_switch_vlan() {
+ switch=
+ vlan=
+ ports=
+ config_get switch "$1" device
+ config_get vlan "$1" vlan
+ config_get ports "$1" ports
+
+ [ -n "$vlan" ] || { echo "No vlan for '$1'" >&2; return 1; }
+ [ -n "$switch" ] || { echo "No device for '$1'" >&2; return 1; }
+
+ vlan_ifnames=""
+ vlan_non_cpu_ports=""
+ echo Checking vlan "$vlan" in $switch >&2
+ for port in $ports; do
+ case $port in
+ *t) tagged=1; port=${port:0:-1} ;;
+ *) tagged= ;;
+ esac
+ echo "Checking port $port in $switch used by vlan $vlan" >&2
+
+ cpu_port_ifname=""
+ for cpu_port in $cpu_ports; do
+ device=${cpu_port#*=}
+ cpu_switchport=${cpu_port%=*}
+ [ "${cpu_switchport}" = "${switch}_${port}" ] || continue
+ echo "Port $port in $switch used by $vlan is a CPU port at $device" >&2
+
+ for device_tagged in $device_tagged; do
+ [ "${tagged}" = 1 ] && not_tagged=0 || not_tagged=1
+ if [ "$device_tagged" = "$device=${not_tagged}" ]; then
+ echo "Cannot control CPU port ${cpu_switchport} when it is used both as tagged and not tagged"
+ exit 1
+ fi
+ done
+ device_tagged="${device_tagged} ${device}=${tagged:-0}"
+ cpu_port_ifname=${device}${tagged+.$vlan}
+ done
+
+ if [ -n "$cpu_port_ifname" ]; then
+ vlan_ifnames="$vlan_ifnames $cpu_port_ifname"
+ continue
+ fi
+ vlan_non_cpu_ports="$vlan_non_cpu_ports ${port}"
+ done
+ vlan_non_cpu_switch_ports="${vlan_non_cpu_ports// /:${switch}_}"
+ vlan_non_cpu_switch_ports="${vlan_non_cpu_switch_ports:1}"
+ vlan_non_cpu_ports="${vlan_non_cpu_ports:1}"
+ for vlan_ifname in $vlan_ifnames; do
+ devices2ports="$devices2ports $vlan_ifname=${vlan_non_cpu_switch_ports}"
+ echo "Monitoring $switch (ports ${vlan_non_cpu_ports// /,}) for $vlan_ifname"
+ done
+}
+
+device_tagged=""
+devices2ports=""
+config_load network
+config_foreach each_switch_vlan switch_vlan
+
+cleanup() {
+ for device2ports in $devices2ports; do
+ device=${device2ports%=*}
+ ip link show dev ${device}_down >/dev/null 2>&1 && {
+ echo "Bringing up $device on exit..."
+ ip link set dev ${device}_down name ${device}
+ ip link set dev ${device} up >/dev/null 2>&1;
+ }
+ done
+ echo "Stopped poller"
+ exit
+}
+trap cleanup INT TERM
+echo "Starting poller"
+while true; do (
+for device2ports in $devices2ports; do
+ device=${device2ports%=*}
+ switch_ports=${device2ports#*=}
+ switch_ports=${switch_ports//:/ }
+ should_be_up=false
+ for switch_port in $switch_ports; do
+ state=$(eval echo \$${switch_port})
+ if [ -z "${state}" ]; then
+ switch=${switch_port%_*}
+ port=${switch_port#*_}
+ echo "Polling $switch_port..." >&2
+ swconfig dev $switch port $port get link | grep -q 'link:up' &&
+ state=up || state=down
+ eval "$switch_port=$state"
+ echo "State of $switch_port, used by $device, is $state" >&2
+ else
+ echo "State of $switch_port, used by $device, is $state (cached)" >&2
+ fi
+ [ $state = up ] && should_be_up=true
+ done
+
+ if $should_be_up; then
+ ip link show dev ${device}_down >/dev/null 2>&1 && {
+ echo "Bringing up $device..."
+ ip link set dev ${device}_down name ${device}
+ ip link set dev ${device} up >/dev/null 2>&1;
+ }
+ else
+ ip link show dev ${device} >/dev/null 2>&1 && {
+ echo "Bringing down $device..."
+ ip link set dev ${device} down >/dev/null 2>&1;
+ ip link set dev ${device} name ${device}_down
+ }
+
+ fi
+done )
+sleep 3
+done
PKG_NAME:=sysrepo
PKG_VERSION:=0.7.7
-PKG_RELEASE:=3
+PKG_RELEASE:=4
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/sysrepo/sysrepo/tar.gz/v$(PKG_VERSION)?
source "$(SOURCE)/Config_libsysrepo.in"
endef
-PKG_BUILD_DEPENDS:=+SYSREPO_BINDINGS:swig/host
+PKG_BUILD_DEPENDS:=SYSREPO_BINDINGS:swig/host
define Package/libsysrepo
SECTION:=utils
CMAKE_OPTIONS += \
-DCMAKE_DISABLE_FIND_PACKAGE_SWIG=FALSE \
-DGEN_LANGUAGE_BINDINGS:BOOL=TRUE \
- -DSWIG_DIR=$(STAGING_DIR)/host/share/swig \
+ -DSWIG_DIR=$(STAGING_DIR_HOSTPKG)/share/swig \
+ -DSWIG_EXECUTABLE=$(STAGING_DIR_HOSTPKG)/bin/swig \
-DCALL_TARGET_BINS_DIRECTLY=OFF
endif
--- /dev/null
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=tac_plus
+PKG_VERSION:=4.0.4.28
+PKG_REV:=259251e6f1c2d5c98081a43c6f66d9eb2989cfd8
+PKG_RELEASE:=2
+
+PKG_SOURCE_VERSION:=$(PKG_REV)
+PKG_SOURCE_DATE:=2019.02.11
+PKG_SOURCE_URL:=https://codeload.github.com/facebook/tac_plus/tar.gz/$(PKG_SOURCE_VERSION)?
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_DATE)-$(PKG_SOURCE_VERSION).tar.gz
+PKG_HASH:=3c37d6a8acf66cac4a95558bf3e29686ef3be505a1638e2ef788a7ece41d1b01
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-$(BUILD_VARIANT)
+PKG_BUILD_SUBDIR:=tacacs-F$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+MAKE_PATH:=$(PKG_BUILD_SUBDIR)
+CONFIGURE_PATH:=$(PKG_BUILD_SUBDIR)
+
+CONFIGURE_ARGS += \
+ --disable-shared \
+ --without-libwrap
+
+ifeq ($(BUILD_VARIANT),without-pam)
+CONFIGURE_VARS += \
+ ac_cv_lib_pam_pam_start=no
+endif
+
+define Package/tac_plus/Default
+ SECTION:=net
+ CATEGORY:=Network
+ TITLE:=TACACS+ daemon
+ URL:=https://github.com/facebook/tac_plus/
+endef
+
+define Package/tac_plus
+$(call Package/tac_plus/Default)
+ TITLE+= (without PAM support)
+ VARIANT:=without-pam
+endef
+
+define Package/tac_plus-pam
+$(call Package/tac_plus/Default)
+ TITLE+= (with PAM support)
+ DEPENDS+= +libpam
+ VARIANT:=with-pam
+endef
+
+define Package/tac_plus/Default/description
+TACACS+ is a protocol (not TACACS or XTACACS) for authentication,
+authorization and accounting (AAA) services for routers and network devices.
+endef
+
+define Package/tac_plus/description
+$(call Package/tac_plus/Default/description)
+This package is built without PAM support.
+endef
+
+define Package/tac_plus-pam/description
+$(call Package/tac_plus/Default/description)
+This package is built with PAM support.
+endef
+
+define Package/tac_plus/Default/conffiles
+/etc/tac_plus.conf
+endef
+
+define Package/tac_plus/conffiles
+$(call Package/tac_plus/Default/conffiles)
+endef
+
+define Package/tac_plus-pam/conffiles
+$(call Package/tac_plus/Default/conffiles)
+endef
+
+define Package/tac_plus/install
+ $(INSTALL_DIR) $(1)/etc/init.d $(1)/usr/sbin
+ $(INSTALL_CONF) ./files/tac_plus.conf $(1)/etc/tac_plus.conf
+ $(INSTALL_BIN) ./files/tac_plus.init $(1)/etc/init.d/tac_plus
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_BUILD_SUBDIR)/tac_plus $(1)/usr/sbin/
+endef
+
+define Package/tac_plus-pam/install
+ $(INSTALL_DIR) $(1)/etc/init.d $(1)/usr/sbin
+ $(INSTALL_CONF) ./files/tac_plus.conf $(1)/etc/tac_plus.conf
+ $(INSTALL_BIN) ./files/tac_plus.init $(1)/etc/init.d/tac_plus
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_BUILD_SUBDIR)/tac_plus $(1)/usr/sbin/
+endef
+
+$(eval $(call BuildPackage,tac_plus))
+$(eval $(call BuildPackage,tac_plus-pam))
--- /dev/null
+#
+# An example tac_plus configuration. You should change this
+# before using it.
+#
+
+# Define where to log accounting data, this is the default.
+accounting file = /var/log/tac_plus.acct
+
+# This is the key that clients have to use to access Tacacs+
+key = testing123
+
+# Use /etc/passwd file to do authentication
+#default authentication = file /etc/passwd
+
+# You can use feature like per host key with different enable passwords
+#host = 127.0.0.1 {
+# key = test
+# type = cisco
+# enable = <des|cleartext> enablepass
+# prompt = "Welcome XXX ISP Access Router \n\nUsername:"
+#}
+
+# We also can define local users and specify a file where data is stored.
+# That file may be filled using tac_pwd
+#user = test1 {
+# name = "Test User"
+# member = staff
+# login = file /etc/tacacs/tacacs_passwords
+#}
+
+# We can also specify rules valid per group of users.
+#group = group1 {
+# cmd = conf {
+# deny
+# }
+#}
+
+# Another example : forbid configure command for some hosts
+# for a define range of clients
+#group = group1 {
+# login = file /etc/passwd
+# service = ppp
+# protocol = ip {
+# addr = 10.10.0.0/24
+# }
+# cmd = conf {
+# deny .*
+# }
+#}
+
+user = DEFAULT {
+ login = file /etc/passwd
+ service = ppp protocol = ip {}
+}
+
+# Much more features are availables, like ACL, more service compatibilities,
+# commands authorization, scripting authorization.
+# See the man page for those features.
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=99
+
+USE_PROCD=1
+PROG=/usr/sbin/tac_plus
+
+start_service() {
+ procd_open_instance
+ procd_set_param command "$PROG" -G -C /etc/tac_plus.conf
+ procd_close_instance
+}
--- /dev/null
+--- a/tacacs-F4.0.4.28/configure 2015-01-06 22:55:35.000000000 +0100
++++ b/tacacs-F4.0.4.28/configure 2019-01-31 14:44:28.679272504 +0100
+@@ -3285,11 +3285,9 @@
+ ;;
+ *linux* )
+ # XXX: not sure if /usr/local is necessary.
+- # XXX: linux libwrap needs -lnsl. configure should check for
+- # existence of libnsl instead of hard-coding
+ CPPFLAGS="$CFLAGS -I/usr/local/include"; export CPPFLAGS
+ LDFLAGS="$LDFLAGS -L/usr/local/lib -L/lib"; export LDFLAGS
+- LIBS="-lnsl -lcrypt $LIBS"; export LIBS
++ LIBS="-lcrypt $LIBS"; export LIBS
+ $as_echo "#define LINUX 1" >>confdefs.h
+
+
include $(TOPDIR)/rules.mk
PKG_NAME:=tcpreplay
-PKG_VERSION:=4.3.1
+PKG_VERSION:=4.3.2
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://github.com/appneta/tcpreplay/releases/download/v$(PKG_VERSION)
-PKG_HASH:=108924a25e616e3465139410c49cae629c338df73443dfc8fc155ea9f099c659
+PKG_HASH:=955aed6a40f49a5b8c1234fd0a928edc5c665d94b7755ab5769c30938e33f380
PKG_LICENSE:=GPL-3.0
PKG_LICENSE_FILES:=docs/LICENSE
-#
-# Copyright (C) 2012-2016 OpenWrt.org
-#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
PKG_NAME:=tgt
-PKG_VERSION:=1.0.74
-PKG_RELEASE:=2
+PKG_VERSION:=1.0.79
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/fujita/tgt/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=bfc202790d5326d7a18bd3928b4bb204ffb0acf443a5ec5c16a1a0fbc53be99f
+PKG_HASH:=6736d799a202ff665549359859441c6d2b5e3425bffef9ee60ab5a101342a40d
PKG_MAINTAINER:=Maxim Storchak <m.storchak@gmail.com>
-PKG_LICENSE:=GPL-2.0
+PKG_LICENSE:=GPL-2.0-only
PKG_USE_MIPS16:=0
+PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
define Package/tgt
- SECTION:=net
- CATEGORY:=Network
- URL:=http://stgt.sourceforge.net/
- TITLE:=userspace iSCSI target
- DEPENDS:=+libpthread +libaio
+ SECTION:=net
+ CATEGORY:=Network
+ URL:=http://stgt.sourceforge.net/
+ TITLE:=userspace iSCSI target
+ DEPENDS:=+libpthread +libaio
endef
define Package/tgt/description
-Linux SCSI target framework (tgt) aims to simplify various SCSI target driver (iSCSI, Fibre Channel, SRP, etc) creation and maintenance.
-Key goals of the project are the clean integration into the scsi-mid layer and implementing a great portion of tgt in user space.
-Tgt consists of kernel-space and user-space code. The kernel-space component is included in upstream as of 2.6.20.
-Note that if you are interested in only iSCSI (probably you are), you need only the user-space code (any kernel version is fine).
+The Linux target framework (tgt) is a user space SCSI target framework
+that supports the iSCSI and iSER transport protocols and that also
+supports multiple methods for accessing block storage. Tgt consists of
+a user-space daemon and user-space tools.
endef
define Build/Compile
- CC=$(TARGET_CC) CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
- $(MAKE) -C $(PKG_BUILD_DIR) \
- DESTDIR="$(PKG_INSTALL_DIR)" \
- LD="$(TARGET_CC)" \
- LDFLAGS="$(TARGET_LDFLAGS)" \
- install-programs
+ $(call Build/Compile/Default,programs)
endef
define Package/tgt/conffiles
endef
define Package/tgt/install
- $(INSTALL_DIR) $(1)/
- $(INSTALL_DIR) $(1)/usr/sbin
- $(CP) ./files/* $(1)/
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/tgtd $(1)/usr/sbin/
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/tgtadm $(1)/usr/sbin/
+ $(INSTALL_DIR) $(1)/etc/config $(1)/etc/init.d $(1)/usr/sbin
+ $(INSTALL_DATA) ./files/tgt.config $(1)/etc/config/tgt
+ $(INSTALL_BIN) ./files/tgt.init $(1)/etc/init.d/tgt
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/tgt{d,adm} $(1)/usr/sbin/
endef
$(eval $(call BuildPackage,tgt))
+++ /dev/null
-config options 'tgt'
-# iothreads limits number of worker threads per rdwr target, default is 16
-# which seems to be too much for an avarage router
- option iothreads '2'
-# option nop_count '3'
-# option nop_interval '1'
-# list portal '[::1]'
-# list portal '127.0.0.1:3261'
-# list portal '0.0.0.0:3262'
-# list portal '[::]:3263'
-
-config target 1
- option name 'iqn.2012-06.org.openwrt:target1'
-# list allow_name 'iqn.1994-05.org.example:fedcba987654'
-# list allow_address '192.168.2.128/27'
-
-#config target 2
-# option name 'iqn.2012-06.org.openwrt:t2'
-
-# all options are set to default, except for the device
-# lun "name" is constructed as TGTID_LUN
-#config lun 1_1
-# option 'device' '/dev/sda'
-# type of scsi device. available options: disk, cd, pt (sg passthrough)
-# option 'type' 'disk'
-# backing store access method: rdwr (read-write), aio (async IO), sg (for pt type only, device must be /dev/sgN)
-# option 'bstype' 'aio'
-# set sync and/or direct flags when opening device, affect only rdwr
-# option 'sync' '0'
-# option 'direct' '0'
-# block size for lun, default is 512
-# option 'blocksize' 4096
-# override SCSI mode page, see tgtadm man page for details
-# option 'mode_page' 'string'
-# vendor, product, revision, SCSI ID and SCSI Serial number
-# option 'vendor_id' 'string'
-# option 'product_id' 'string'
-# option 'product_rev' 'string'
-# option 'scsi_id' 'string'
-# option 'scsi_sn' 'string'
-# refuse write attempts. applies only to disk type
-# option 'readonly' '0'
-# Disk devices default to non-removable, cd - to removable
-# option 'removable' '0'
-# 0 = Classic sense format, 1 = Support descriptor format.
-# option 'sense_format' '0'
-
-#config lun 2_1
-# option device /mnt/iscsi.img
-
-#config lun 2_2
-# option device /dev/sdc
-
-#config account
-# list target 1
-# list target 2
-# option user "username1"
-# option password "pass1"
-
-#config account
-# option target 2
-# option user "user2"
-# option password "pwd2"
-# option outgoing 1
+++ /dev/null
-#!/bin/sh /etc/rc.common
-START=91
-STOP=10
-
-EXTRA_COMMANDS="show"
-EXTRA_HELP=" show Show current configuration of tgtd"
-
-NAME=tgt
-PROG=/usr/sbin/tgtd
-USE_PROCD=1
-
-tgtadm="/usr/sbin/tgtadm --lld iscsi"
-logger="logger -p daemon.err -s -t $NAME"
-
-validate_lun_section() {
- uci_load_validate tgt lun "$1" "$2" \
- 'device:or(file, device)' \
- 'type:or("disk", "cd", "pt"):disk' \
- 'bstype:or("rdwr", "aio", "sg"):rdwr' \
- 'sync:bool:0' \
- 'direct:bool:0' \
- 'blocksize:uinteger' \
- 'mode_page:string' \
- 'product_id:string' \
- 'product_rev:string' \
- 'readonly:bool:0' \
- 'removable:bool' \
- 'scsi_id:string' \
- 'scsi_sn:string' \
- 'sense_format:range(0, 1)' \
- 'vendor_id:string'
-}
-
-handle_lun() {
- local tgt_lun=$1
- local my_tgtid=${tgt_lun%_*}
- local lun=${tgt_lun#*_}
-
- [ $my_tgtid -eq $tgtid ] || return 0
-
- [ "$2" = 0 ] || {
- $logger "Validation failed for LUN $tgt_lun"
- return 1
- }
- [ "$device" ] || {
- $logger "Device is required for target $tgt_lun"
- return 1
- }
-
- if [ $sync -ne 0 -o $direct -ne 0 ]; then
- local bsoflags
- [ $sync -ne 0 ] && bsoflags="sync"
- [ $direct -ne 0 ] && bsoflags="direct"
- [ $sync -ne 0 -a $direct -ne 0 ] && bsoflags="sync:direct"
- bsoflags="--bsoflags $bsoflags"
- fi
-
- blocksize=${blocksize+--blocksize=$blocksize}
- local params='' i
- for i in mode_page product_id product_rev readonly removable scsi_id scsi_sn sense_format vendor_id; do
- eval params=\${$i+$i=\$$i,}\$params
- done
-
- local _tgtadm="$tgtadm --mode logicalunit --tid $tgtid --lun $lun"
- $_tgtadm --op new --backing-store $device --device-type $type --bstype $bstype $bsoflags $blocksize || {
- $logger "Failed to create lun $tgt_lun"
- return 1
- }
- $_tgtadm --op update --param $params || {
- $logger "Failed to update lun $tgt_lun"
- return 1
- }
-}
-
-validate_account_section () {
- uci_load_validate tgt account "$1" "$2" \
- 'target:list(uinteger)' \
- 'user:string' \
- 'password:string' \
- 'outgoing:bool:0'
-}
-
-handle_account() {
- local _tgtadm="$tgtadm --mode account"
-
- [ "$2" = 0 ] || {
- $logger "Validation failed for account ${user:-$1}"
- return 1
- }
- [ "$user" ] || {
- $logger "User is required for account $1. Run 'uci show tgt.$1' and check options"
- return 1
- }
- [ "$target" ] || {
- $logger "Target is required for account $user"
- return 1
- }
- [ "$password" ] || {
- $logger "Password is required for account $user"
- return 1
- }
- $_tgtadm --op new --user "$user" --password "$password" || {
- $logger "Failed to create user $username"
- return 1
- }
-}
-
-bind_account_to_target() {
- local _tgtadm="$tgtadm --mode account"
-
- [ "$2" = 0 ] || {
- $logger "Validation failed for account ${user:-$1}"
- return 1
- }
-
- [ "$outgoing" -ne 0 ] && outgoing=--outgoing || outgoing=""
- local t
- for t in $target; do
- [ "$t" -eq "$tgtid" ] && {
- $_tgtadm --op bind --tid $tgtid --user "$user" $outgoing || {
- $logger "Failed to bind user $username to target $tgtid"
- return 1
- }
- }
- done
- return 0
-}
-
-validate_target_section() {
- uci_load_validate tgt target "$1" "$2" \
- 'name:string:iqn.2012-06.org.openwrt' \
- 'allow_address:list(string):ALL' \
- 'allow_name:list(string)'
-}
-
-handle_target() {
- local tgtid=$1
- local _tgtadm="$tgtadm --mode target"
-
- [ $tgtid -ge 0 ] || return 1
- [ "$2" = 0 ] || {
- $logger "Validation failed for target $tgtid"
- return 1
- }
- $_tgtadm --op new --tid $tgtid --targetname $name || {
- $logger "Failed to create target $tgtid"
- return 1
- }
- local i
- for i in $allow_address; do
- $_tgtadm --op bind --tid $tgtid --initiator-address $i || {
- $logger "Failed to set allow $i to connect to target $tgtid"
- return 1
- }
- done
- for i in $allow_name; do
- $_tgtadm --op bind --tid $tgtid --initiator-name $i || {
- $logger "Failed to set allow $i to connect to target $tgtid"
- return 1
- }
- done
- config_foreach validate_lun_section lun handle_lun || return 1
- config_foreach validate_account_section account bind_account_to_target || return 1
-}
-
-configure() {
- config_load $NAME
- $tgtadm --mode sys --op update --name State -v offline || {
- $logger "Failed to set system state to Offline"
- return 1
- }
- config_foreach validate_account_section account handle_account || return 1
- config_foreach validate_target_section target handle_target || return 1
- $tgtadm --mode sys --op update --name State -v ready || {
- $logger "Failed to set system state to Ready"
- return 1
- }
- return 0
-}
-
-validate_tgt_section() {
- uci_load_validate tgt options "$1" "$2" \
- 'iothreads:uinteger' \
- 'portal:list(string)' \
- 'nop_interval:uinteger' \
- 'nop_count:uinteger'
-}
-
-start_tgt_instance() {
- [ "$2" = 0 ] || {
- $logger "Validation failed for tgt options"
- return 1
- }
- procd_open_instance
- procd_set_param command $PROG -f
- [ "$iothreads" ] && procd_append_param command -t $iothreads
- [ "$portal$nop_interval$nop_count" ] && {
- local iscsi="" i
- for i in nop_interval nop_count; do
- eval iscsi=\${$i+$i=\$$i,}\$iscsi
- done
- for i in $portal; do
- iscsi="portal=$i,$iscsi"
- done
- procd_append_param command --iscsi $iscsi
- }
- procd_set_param respawn
- procd_close_instance
- logger -p daemon.info -t $NAME -s "Configuration will be loaded in seconds"
- ( sleep 5; configure || { stop_service; exit 1; } ) &
-}
-
-start_service() {
- validate_tgt_section tgt start_tgt_instance
-}
-
-stop_service() {
- $tgtadm --mode sys --op update --name State -v offline || {
- $logger "Failed to set system state to Offline"
- return 1
- }
- $tgtadm --mode target --op show \
- | awk '$1 == "Target" {sub(/:/,"",$2); print $2}' \
- | xargs -r -n1 $tgtadm --mode target --op delete --force --tid
- $tgtadm --mode sys --op delete
-}
-
-reload_service() {
- stop_service
- start_service
-}
-
-service_triggers() {
- procd_add_reload_trigger "tgt"
-
- procd_open_validate
- validate_tgt_section
- validate_account_section
- validate_target_section
- validate_lun_section
- procd_close_validate
-}
-
-show() {
- $tgtadm --mode target --op show
-}
--- /dev/null
+config options 'tgt'
+# iothreads limits number of worker threads per rdwr target, default is 16
+# which seems to be too much for an avarage router
+ option iothreads '2'
+# option nop_count '3'
+# option nop_interval '1'
+# option logging '0'
+# list portal '[::1]'
+# list portal '127.0.0.1:3261'
+# list portal '0.0.0.0:3262'
+# list portal '[::]:3263'
+
+config target 1
+ option name 'iqn.2012-06.org.openwrt:target1'
+# list allow_name 'iqn.1994-05.org.example:fedcba987654'
+# list allow_address '192.168.2.128/27'
+
+#config target 2
+# option name 'iqn.2012-06.org.openwrt:t2'
+
+# all options are set to default, except for the device
+# lun "name" is constructed as TGTID_LUN
+#config lun 1_1
+# option 'device' '/dev/sda'
+# type of scsi device. available options: disk, cd, pt (sg passthrough)
+# option 'type' 'disk'
+# backing store access method: rdwr (read-write), aio (async IO), sg (for pt type only, device must be /dev/sgN)
+# option 'bstype' 'aio'
+# set sync and/or direct flags when opening device, affect only rdwr
+# option 'sync' '0'
+# option 'direct' '0'
+# block size for lun, default is 512
+# option 'blocksize' 4096
+# override SCSI mode page, see tgtadm man page for details
+# option 'mode_page' 'string'
+# vendor, product, revision, SCSI ID and SCSI Serial number
+# option 'vendor_id' 'string'
+# option 'product_id' 'string'
+# option 'product_rev' 'string'
+# option 'scsi_id' 'string'
+# option 'scsi_sn' 'string'
+# refuse write attempts. applies only to disk type
+# option 'readonly' '0'
+# Disk devices default to non-removable, cd - to removable
+# option 'removable' '0'
+# 0 = Classic sense format, 1 = Support descriptor format.
+# option 'sense_format' '0'
+# Rotaion rate: 0: not reported, 1: non-rotational medium (SSD), 2-1024: reserverd, 1025+: "Nominal rotation rate"
+# option 'rotation_rate' '0'
+
+#config lun 2_1
+# option device /mnt/iscsi.img
+
+#config lun 2_2
+# option device /dev/sdc
+
+#config account
+# list target 1
+# list target 2
+# option user "username1"
+# option password "pass1"
+
+#config account
+# option target 2
+# option user "user2"
+# option password "pwd2"
+# option outgoing 1
--- /dev/null
+#!/bin/sh /etc/rc.common
+START=91
+STOP=10
+
+EXTRA_COMMANDS="show"
+EXTRA_HELP=" show Show current configuration of tgtd"
+
+NAME=tgt
+PROG=/usr/sbin/tgtd
+USE_PROCD=1
+
+tgtadm="/usr/sbin/tgtadm --lld iscsi"
+logger="logger -p daemon.err -s -t $NAME"
+
+validate_lun_section() {
+ uci_load_validate tgt lun "$1" "$2" \
+ 'device:or(file, device)' \
+ 'type:or("disk", "cd", "pt"):disk' \
+ 'bstype:or("rdwr", "aio", "sg"):rdwr' \
+ 'sync:bool:0' \
+ 'direct:bool:0' \
+ 'blocksize:uinteger' \
+ 'mode_page:string' \
+ 'product_id:string' \
+ 'product_rev:string' \
+ 'readonly:bool:0' \
+ 'removable:bool' \
+ 'scsi_id:string' \
+ 'scsi_sn:string' \
+ 'sense_format:range(0, 1)' \
+ 'vendor_id:string' \
+ 'rotation_rate:uinteger'
+}
+
+handle_lun() {
+ local tgt_lun=$1
+ local my_tgtid=${tgt_lun%_*}
+ local lun=${tgt_lun#*_}
+
+ [ "$my_tgtid" -eq "$tgtid" ] || return 0
+
+ [ "$2" = 0 ] || {
+ $logger "Validation failed for LUN $tgt_lun"
+ return 1
+ }
+ [ "$device" ] || {
+ $logger "Device is required for target $tgt_lun"
+ return 1
+ }
+
+ if [ "$sync" -ne 0 ] || [ "$direct" -ne 0 ]; then
+ local bsoflags
+ [ "$sync" -ne 0 ] && bsoflags="sync"
+ [ "$direct" -ne 0 ] && bsoflags="direct"
+ [ "$sync" -ne 0 ] && [ "$direct" -ne 0 ] && bsoflags="sync:direct"
+ bsoflags="--bsoflags $bsoflags"
+ fi
+
+ blocksize=${blocksize+--blocksize=$blocksize}
+ local params='' i
+ for i in mode_page product_id product_rev readonly removable scsi_id scsi_sn sense_format vendor_id rotation_rate; do
+ eval params=\${$i+$i=\$$i,}\$params
+ done
+
+ local _tgtadm="$tgtadm --mode logicalunit --tid $tgtid --lun $lun"
+ $_tgtadm --op new --backing-store "$device" --device-type "$type" --bstype "$bstype" $bsoflags $blocksize || {
+ $logger "Failed to create lun $tgt_lun"
+ return 1
+ }
+ $_tgtadm --op update --param $params || {
+ $logger "Failed to update lun $tgt_lun"
+ return 1
+ }
+}
+
+validate_account_section () {
+ uci_load_validate tgt account "$1" "$2" \
+ 'target:list(uinteger)' \
+ 'user:string' \
+ 'password:string' \
+ 'outgoing:bool:0'
+}
+
+handle_account() {
+ local _tgtadm="$tgtadm --mode account"
+
+ [ "$2" = 0 ] || {
+ $logger "Validation failed for account ${user:-$1}"
+ return 1
+ }
+ [ "$user" ] || {
+ $logger "User is required for account $1. Run 'uci show tgt.$1' and check options"
+ return 1
+ }
+ [ "$target" ] || {
+ $logger "Target is required for account $user"
+ return 1
+ }
+ [ "$password" ] || {
+ $logger "Password is required for account $user"
+ return 1
+ }
+ $_tgtadm --op new --user "$user" --password "$password" || {
+ $logger "Failed to create user $username"
+ return 1
+ }
+}
+
+bind_account_to_target() {
+ local _tgtadm="$tgtadm --mode account"
+
+ [ "$2" = 0 ] || {
+ $logger "Validation failed for account ${user:-$1}"
+ return 1
+ }
+
+ [ "$outgoing" -ne 0 ] && outgoing=--outgoing || outgoing=""
+ local t
+ for t in $target; do
+ [ "$t" -eq "$tgtid" ] && {
+ $_tgtadm --op bind --tid "$tgtid" --user "$user" $outgoing || {
+ $logger "Failed to bind user $username to target $tgtid"
+ return 1
+ }
+ }
+ done
+ return 0
+}
+
+validate_target_section() {
+ uci_load_validate tgt target "$1" "$2" \
+ 'name:string:iqn.2012-06.org.openwrt' \
+ 'allow_address:list(string):ALL' \
+ 'allow_name:list(string)'
+}
+
+handle_target() {
+ local tgtid=$1
+ local _tgtadm="$tgtadm --mode target"
+
+ [ "$tgtid" -ge 0 ] || return 1
+ [ "$2" = 0 ] || {
+ $logger "Validation failed for target $tgtid"
+ return 1
+ }
+ $_tgtadm --op new --tid "$tgtid" --targetname "$name" || {
+ $logger "Failed to create target $tgtid"
+ return 1
+ }
+ local i
+ for i in $allow_address; do
+ $_tgtadm --op bind --tid "$tgtid" --initiator-address "$i" || {
+ $logger "Failed to set allow $i to connect to target $tgtid"
+ return 1
+ }
+ done
+ for i in $allow_name; do
+ $_tgtadm --op bind --tid "$tgtid" --initiator-name "$i" || {
+ $logger "Failed to set allow $i to connect to target $tgtid"
+ return 1
+ }
+ done
+ config_foreach validate_lun_section lun handle_lun || return 1
+ config_foreach validate_account_section account bind_account_to_target || return 1
+}
+
+configure() {
+ config_load $NAME
+ $tgtadm --mode sys --op update --name State -v offline || {
+ $logger "Failed to set system state to Offline"
+ return 1
+ }
+ config_foreach validate_account_section account handle_account || return 1
+ config_foreach validate_target_section target handle_target || return 1
+ $tgtadm --mode sys --op update --name State -v ready || {
+ $logger "Failed to set system state to Ready"
+ return 1
+ }
+ return 0
+}
+
+validate_tgt_section() {
+ uci_load_validate tgt options "$1" "$2" \
+ 'iothreads:uinteger' \
+ 'portal:list(string)' \
+ 'nop_interval:uinteger' \
+ 'nop_count:uinteger' \
+ 'logging:bool:0'
+}
+
+start_tgt_instance() {
+ local fg_flag=-f
+ [ "$2" = 0 ] || {
+ $logger "Validation failed for tgt options"
+ return 1
+ }
+ procd_open_instance
+ procd_set_param command $PROG
+ [ "$logging" -eq 1 ] && fg_flag=-D
+ procd_append_param command "$fg_flag"
+ [ "$iothreads" ] && procd_append_param command -t "$iothreads"
+ [ "$portal$nop_interval$nop_count" ] && {
+ local iscsi="" i
+ for i in nop_interval nop_count; do
+ eval iscsi=\${$i+$i=\$$i,}\$iscsi
+ done
+ for i in $portal; do
+ iscsi="portal=$i,$iscsi"
+ done
+ procd_append_param command --iscsi "$iscsi"
+ }
+ procd_set_param respawn
+ procd_close_instance
+ logger -p daemon.info -t "$NAME" -s "Configuration will be loaded in seconds"
+ ( sleep 5; configure || { stop_service; exit 1; } ) &
+}
+
+start_service() {
+ validate_tgt_section tgt start_tgt_instance
+}
+
+stop_service() {
+ $tgtadm --mode sys --op update --name State -v offline || {
+ $logger "Failed to set system state to Offline"
+ return 1
+ }
+ $tgtadm --mode target --op show \
+ | awk '$1 == "Target" {sub(/:/,"",$2); print $2}' \
+ | xargs -r -n1 $tgtadm --mode target --op delete --force --tid
+ $tgtadm --mode sys --op delete
+ procd_kill tgt
+}
+
+reload_service() {
+ stop_service
+ start_service
+}
+
+service_triggers() {
+ procd_add_reload_trigger "tgt"
+
+ procd_open_validate
+ validate_tgt_section
+ validate_account_section
+ validate_target_section
+ validate_lun_section
+ procd_close_validate
+}
+
+show() {
+ $tgtadm --mode target --op show
+}
PKG_NAME:=tinyproxy
PKG_VERSION:=1.8.3
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://www.banu.com/pub/tinyproxy/1.8/
proxy_atom "$1" LogLevel >> $CFGFILE
- proxy_list "$1" XTinyproxy >> $CFGFILE
+ proxy_flag "$1" XTinyproxy >> $CFGFILE
proxy_atom "$1" MaxClients >> $CFGFILE
proxy_atom "$1" MinSpareServers >> $CFGFILE
#
-# Copyright (C) 2008-2016 OpenWrt.org
+# Copyright (C) 2008-2019 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
PKG_NAME:=tor
-PKG_VERSION:=0.3.5.7
+PKG_VERSION:=0.4.0.5
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://dist.torproject.org/ \
https://archive.torproject.org/tor-package-archive
-PKG_HASH:=1b0887fc21ac535befea7243c5d5f1e31394d7458d64b30807a3e98cca0d839e
+PKG_HASH:=b5a2cbf0dcd3f1df2675dbd5ec10bbe6f8ae995c41b68cebe2bc95bffc90696e
PKG_MAINTAINER:=Hauke Mehrtens <hauke@hauke-m.de> \
Peter Wagner <tripolar@gmx.at>
PKG_LICENSE_FILES:=LICENSE
+PKG_CPE_ID:=cpe:/a:torproject:tor
PKG_INSTALL:=1
PKG_FIXUP:=autoreconf
--disable-libscrypt \
--disable-unittests \
--disable-lzma \
+ --disable-zstd \
--with-tor-user=tor \
--with-tor-group=tor
USE_PROCD=1
start_service() {
- [ -f /var/run/tor.pid ] || {
- touch /var/run/tor.pid
- chown tor:tor /var/run/tor.pid
- }
- [ -d /var/lib/tor ] || {
- mkdir -m 0755 -p /var/lib/tor
- chmod 0700 /var/lib/tor
- chown tor:tor /var/lib/tor
- }
- [ -d /var/log/tor ] || {
- mkdir -m 0755 -p /var/log/tor
- chown tor:tor /var/log/tor
- }
+ touch /var/run/tor.pid
+ chown tor:tor /var/run/tor.pid
+
+ mkdir -m 0700 -p /var/lib/tor
+ chown -R tor:tor /var/lib/tor
+
+ mkdir -m 0755 -p /var/log/tor
+ chown -R tor:tor /var/log/tor
+
procd_open_instance
procd_set_param command /usr/sbin/tor --runasdaemon 0
procd_close_instance
--- /dev/null
+#
+# Copyright (C) 2017-2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/)
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=torsocks
+PKG_VERSION:=2.3.0
+PKG_RELEASE:=1
+
+PKG_SOURCE_URL:=https://people.torproject.org/~dgoulet/torsocks/
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_HASH:=b9f1b981d6b3fd4e1820de1eee325f8a7038c84765d5a6cd9af12571d5cc3622
+
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+PKG_LICENSE:=GPLv2
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
+PKG_FIXUP:=autoreconf
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/torsocks
+ SECTION:=net
+ CATEGORY:=Network
+ SUBMENU:=IP Addresses and Names
+ TITLE:=torsocks
+ URL:=https://trac.torproject.org/projects/tor/wiki/doc/torsocks
+ DEPENDS:=+tor
+endef
+
+define Package/torsocks/description
+ Torsocks allows you to use most applications in a safe way with Tor.
+ It ensures that DNS requests are handled safely and explicitly rejects any traffic other than TCP from the application you're using.
+endef
+
+define Build/Configure
+ $(call Build/Configure/Default)
+ifeq ($(CONFIG_USE_UCLIBC),y)
+ find $(PKG_BUILD_DIR) -name 'Makefile' -exec sed -i 's|--param ssp-buffer-size=1 -fstack-protector-all||' \{\} \+
+endif
+endef
+
+define Package/conffiles
+/etc/tor/torsocks.conf
+endef
+
+define Package/torsocks/install
+ $(INSTALL_DIR) $(1)/etc/tor/
+ $(CP) $(PKG_INSTALL_DIR)/etc/tor/torsocks.conf $(1)/etc/tor/
+ $(INSTALL_DIR) $(1)/usr/lib/torsocks
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/torsocks/libtorsocks.so* $(1)/usr/lib/torsocks/
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/torsocks $(1)/usr/bin/
+endef
+
+$(eval $(call BuildPackage,torsocks))
--- /dev/null
+#
+# Copyright (C) 2018 Luiz Angelo Daros de Luca
+#
+# This is free software, licensed under the GNU General Public License v2.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=trafficshaper
+PKG_VERSION:=1.0.0
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
+PKG_LICENSE:=GPLv2
+PKG_ARCH:=all
+
+PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
+include $(INCLUDE_DIR)/package.mk
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/trafficshaper
+ SECTION:=net
+ CATEGORY:=Network
+ DEPENDS:=+tc +kmod-sched-core +kmod-sched-connmark +kmod-ifb +iptables +kmod-sched-cake +iptables-mod-conntrack-extra
+ TITLE:=WAN traffic shaper based on LAN addresses
+ MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
+ PKGARCH:=all
+endef
+
+define Package/trafficshaper/description
+Setup QoS rules to limit (or reserve) traffic used by classes of clients.
+Uplink and downlink can be controled (or not controlled) independently.
+Client classes are defined by its network addresses (IPv4 or IPv6). Each
+client class can define absolute or relative (to wan) bandwith, and also
+the use (or not) of spare wan bandwidth when avaiable.
+
+endef
+
+define Package/trafficshaper/conffiles
+/etc/config/trafficshaper
+endef
+
+define Build/Compile
+endef
+
+define Package/trafficshaper/install
+$(CP) ./files/* $(1)
+endef
+
+$(eval $(call BuildPackage,trafficshaper))
--- /dev/null
+package trafficshaper
+
+config globals 'globals'
+ option mark_mask '0xFF'
+
+config wan 'wan'
+ option downlink '20000'
+ option uplink '20000'
+
+config wan 'wanb'
+ option downlink '15000'
+ option uplink '5000'
+
+config class 'corp'
+ list network '192.168.1.0/24'
+ list network 'fdc8:1234:1234:1::/64'
+ option reserved_downlink '50%'
+ option reserved_uplink '35%'
+ option allowed_downlink '100%'
+ option allowed_uplink '100%'
+
+config class 'vpn'
+ list network '192.168.2.0/24'
+ list network 'fdc8:1234:1234:2::/64'
+ option reserved_downlink '25%'
+ option reserved_uplink '50%'
+ option allowed_downlink '100%'
+ option allowed_uplink '100%'
+
+config class 'guest'
+ list network '192.168.3.0/24'
+ list network 'fdc8:1234:1234:3::/64'
+ option reserved_downlink '25%'
+ option reserved_uplink '15%'
+ option allowed_downlink '25%'
+ option allowed_uplink '15%'
+
+config class 'default'
+ option reserved_downlink '1000'
+ option reserved_uplink '1000'
+ option allowed_downlink '100%'
+ option allowed_uplink '100%'
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+# Internal uci firewall chains are flushed and recreated on reload, so
+# put custom rules into the root chains e.g. INPUT or FORWARD or into the
+# special user chains, e.g. input_wan_rule or postrouting_lan_rule.
+
+START=25
+USE_PROCD=1
+
+echo_err() {
+ echo "$@" >&2
+}
+
+msg() {
+ local level=$1; shift
+ echo_err "$APPNAME[$level]: $*"
+}
+
+LOGLEVEL=${LOGLEVEL:-2}
+
+die() {
+ local err=$1; shift
+ e "$*"
+ exit $err
+}
+
+APPNAME="trafficshaper"
+IPT_CHAIN=$APPNAME
+
+debug_exec(){
+ local err
+ d "exec: $*"
+ if "$@"; then
+ return 0
+ else
+ err="$?"
+ fi
+ e "exec[err=$err]: $*"
+ return "$err"
+}
+
+IP="debug_exec ip"
+TC="debug_exec tc"
+IP4T="debug_exec iptables -w 5"
+IP6T="debug_exec ip6tables -w 5"
+
+#QDISC="cake autorate_ingress internet ethernet diffserv4 triple-isolate"
+QDISC="cake"
+
+REQ_MODULES="sch_htb sch_cake act_connmark act_mirred em_u32"
+REQ_CMDS="ip tc iptables"
+
+preinit(){
+ [ "$LOGLEVEL" -ge 1 ] && e() { msg ERROR "$@"; } || e() { true; }
+ [ "$LOGLEVEL" -ge 2 ] && v() { msg INFO "$@"; } || v() { true; }
+ [ "$LOGLEVEL" -ge 3 ] && d() { msg DEBUG "$@"; } || d() { true; }
+ [ "$LOGLEVEL" -ge 4 ] && set -x
+ set -e
+}
+
+requires() {
+ for module in $REQ_MODULES; do
+ [ -d /sys/module/$module ] || insert_modules "$module" ||
+ die 2 "cannot load $module. Please install kmod-$module"
+ done
+ for cmd in $REQ_CMDS; do
+ which $cmd &>/dev/null ||
+ die 2 "cannot find command $cmd. Please install $cmd"
+ done
+
+ if ! which ip6tables &>/dev/null; then
+ v "Disabling IPv6 as ip6tables was not found"
+ IP6T=true
+ fi
+
+ . /lib/functions/network.sh
+
+ config_load $APPNAME
+}
+
+do_stop() {
+ local only_int=$1
+
+ preinit
+ requires
+
+ v "Stopping $APPNAME${only_int:+ for interface $only_int}"
+ if [ -z "$only_int" ]; then
+ d "Cleaning iptables"
+ # Cleaning iptables
+ for IPT in "$IP4T" "$IP6T"; do
+ $IPT -t mangle -D FORWARD -j $IPT_CHAIN &>/dev/null || :
+ $IPT -t mangle -F $IPT_CHAIN &>/dev/null || :
+ $IPT -t mangle -X $IPT_CHAIN &>/dev/null || :
+ $IPT -t mangle -F $IPT_CHAIN-classify &>/dev/null || :
+ $IPT -t mangle -X $IPT_CHAIN-classify &>/dev/null || :
+ done
+ fi
+
+ d "Cleaning tc"
+ local dev_done int dev ifb interfaces
+ if [ "$only_int" ]; then
+ config_get type $only_int TYPE
+ if [ "$type" != "wan" ]; then
+ d "interface $only_int not found in trafficshaper config. Ignoring"
+ return 0
+ fi
+ interfaces="$only_int"
+
+ else
+ interfaces="$(config_foreach echo wan)"
+ fi
+
+ for int in $interfaces; do
+ d "Cleaning tc for interface $int"
+ network_get_physdev dev "$int" ||
+ die 1 "failed to get physical dev of interface $int"
+
+ if echo "$dev_done" | grep -x -F -q "$dev"; then
+ continue
+ fi
+ ifb="ifb_$dev"
+ if [ ${#ifb} -gt 15 ]; then
+ die 1 "ifb name too long: ${ifb}"
+ fi
+
+ $TC qdisc del dev ${ifb} root 2> /dev/null || :
+ $TC qdisc del dev ${dev} root 2> /dev/null || :
+ $TC qdisc del dev ${dev} ingress 2> /dev/null || :
+
+ d "Removing ${ifb}..."
+ $IP link set dev ${ifb} down 2>/dev/null || :
+ $IP link delete dev ${ifb} 2>/dev/null || :
+
+ intdev_done="$(echo "$dev_done"; echo -n $dev)"
+ done
+}
+
+
+calc_bw() {
+ local value=$1 reference=$2
+ case "${value}" in
+ *%) echo "$((${value%\%} * reference / 100 ))";;
+ *) echo ${value};;
+ esac
+}
+
+mask_range() {
+ local mask=$(($1)) n=0 fsb
+ if [ $mask -le 0 ]; then
+ e "mask '$1' must be greater than 0 (have a sequence of set bit)"
+ return 2
+ fi
+ while [ "$((mask & 0x1))" -eq 0 ]; do
+ mask=$((mask >> 1))
+ : $((n++))
+ done
+ fsb="$n"
+ while [ "$((mask & 0x1))" -eq 1 ]; do
+ mask=$((mask >> 1))
+ : $((n++))
+ done
+ if [ $mask -ne 0 ]; then
+ e "mask '$1' must be a continuos sequence of set bit"
+ return 2
+ fi
+ echo $fsb $((n-1))
+ return 0
+}
+
+start_iptables(){
+ d "Creating iptables mangle rules"
+
+ config_get mark_mask globals mark_mask 0xFF
+ mark_mask=$(printf '0x%X\n' $(($mark_mask)))
+
+ local fsb_lst class_id_max class_id_shift
+ fsb_lst=$(mask_range $mark_mask)
+ class_id_max=$(((1<<(${fsb_lst#* } - ${fsb_lst% *} +1))+1))
+ class_id_shift=$((${fsb_lst% *}))
+
+ d "General iptables rules:"
+ for IPT in "$IP4T" "$IP6T"; do
+ $IPT -t mangle -N $IPT_CHAIN
+ $IPT -t mangle -N $IPT_CHAIN-classify
+
+ $IPT -t mangle -A FORWARD -j $IPT_CHAIN
+ $IPT -t mangle -A $IPT_CHAIN -j CONNMARK --restore-mark --nfmask $mark_mask --ctmask $mark_mask \
+ -m comment --comment "Get previous class"
+ $IPT -t mangle -A $IPT_CHAIN -m mark --mark 0x0/$mark_mask -j $IPT_CHAIN-classify \
+ -m comment --comment "If no class, try to classify"
+ done
+
+ d "Classes iptables rules:"
+ local class_reserved_uplink class_reserved_downlink class_nets i=2 xi default_class_id
+ for class in $(config_foreach echo class); do
+ config_get class_reserved_uplink $class reserved_uplink
+ config_get class_reserved_downlink $class reserved_downlink
+ config_get class_nets $class network
+ if [ "$class" = default ]; then
+ default_class_id=$i
+ if [ -z "$class_reserved_uplink" -a -z "$class_reserved_downlink" ] ; then
+ die 2 "class default must defined either reserved uplink or downlink!"
+ fi
+ if [ "$class_nets" ]; then
+ die 2 "class default must not have any network defined!"
+ fi
+ else
+ if [ "$i" -ge "$class_id_max" ]; then
+ die 1 "Max client classes reached. Please, use less classes or increase option mark_mask '$mark_mask' in globals. Current mask allows only $((class_id_max-2)) classes if default is the last one."
+ fi
+ fi
+
+ xi=$(printf '0x%X\n' $(((i-1)<<class_id_shift)))
+
+ for class_net in $class_nets; do
+ case $class_net in
+ *:*) IPT="$IP6T" ;;
+ *.*) IPT="$IP4T" ;;
+ *) die 2 "Unknown address family of network $class_net in class $class!"
+ esac
+ if [ "$class_reserved_uplink" ]; then
+ $IPT -t mangle -A $IPT_CHAIN-classify -s $class_net -m mark --mark 0x0/$mark_mask -j MARK --set-mark ${xi}/$mark_mask \
+ -m comment --comment "$APPNAME-$class up"
+ fi
+ if [ "$class_reserved_downlink" ]; then
+ $IPT -t mangle -A $IPT_CHAIN-classify -d $class_net -m mark --mark 0x0/$mark_mask -j MARK --set-mark ${xi}/$mark_mask \
+ -m comment --comment "$APPNAME-$class down"
+ fi
+ done
+ : $((i++))
+ done
+ if [ -z "$default_class_id" ]; then
+ die 2 "No default class defined!"
+ fi
+
+ $IP4T -t mangle -A $IPT_CHAIN-classify -j CONNMARK --save-mark --nfmask $mark_mask --ctmask $mark_mask
+ $IP6T -t mangle -A $IPT_CHAIN-classify -j CONNMARK --save-mark --nfmask $mark_mask --ctmask $mark_mask
+}
+
+
+
+start_tc_interface() {
+ local int=$1; shift
+ local dev=$1; shift
+ local default_class_id=$1; shift
+
+ config_get mark_mask globals mark_mask 0xFF
+ local fsb_lst class_id_max class_id_shift
+ fsb_lst=$(mask_range $mark_mask)
+ class_id_max=$(((1<<(${fsb_lst#* } - ${fsb_lst% *} +1))))
+ class_id_shift=$((${fsb_lst% *}))
+
+ local downlink uplink type
+ config_get downlink $int downlink
+ config_get uplink $int uplink
+
+ d "Creating tc rules for $int ($dev)"
+ local dev_down dev_up
+ if [ "$downlink" ]; then
+ local ifb="ifb_$dev"
+ if [ ${#ifb} -gt 15 ]; then
+ die 1 "ifb name too long: ${ifb}"
+ fi
+
+ d "Creating ${ifb}..."
+ $IP link add name ${ifb} type ifb
+ $IP link set dev $ifb up
+ d "Redirect ingress $dev to $ifb..."
+ $TC qdisc add dev $dev handle ffff: ingress
+ $TC filter add dev $dev parent ffff: protocol all u32 match u32 0 0 action connmark action mirred egress redirect dev $ifb
+ dev_down=$ifb
+ else
+ dev_down=
+ fi
+ if [ "$uplink" ]; then
+ dev_up="$dev"
+ fi
+
+ # Download/Upload
+ if [ "$dev_down" ]; then
+ tc qdisc add dev $dev_down root handle 1: htb default "$default_class_id"
+ tc class add dev $dev_down parent 1: classid 1:1 htb rate $(calc_bw ${downlink})kbit burst 500k quantum 1500
+ fi
+
+ if [ "$dev_up" ]; then
+ tc qdisc add dev $dev_up root handle 1: htb default "$default_class_id"
+ tc class add dev $dev_up parent 1: classid 1:1 htb rate $(calc_bw ${uplink})kbit burst 500k quantum 1500
+ fi
+
+ v "$int($dev):" \
+ "${downlink:+downlink of ${downlink}kbit}"\
+ "${uplink:+uplink of ${uplink}kbit}"\
+
+ local class class_reserved_downlink class_reserved_uplink class_allowed_downlink class_allowed_uplink class_nets class_net i=2
+ for class in $(config_foreach echo class); do
+ config_get class_reserved_downlink $class reserved_downlink
+ if [ "$class_reserved_downlink" ]; then
+ if [ "$dev_down" ]; then
+ class_reserved_downlink=$(calc_bw $class_reserved_downlink $downlink)
+ config_get class_allowed_downlink $class allowed_downlink "$class_reserved_downlink"
+ class_allowed_downlink=$(calc_bw $class_allowed_downlink $downlink)
+ else
+ e "class $class defines reserved downlink but not wan $int. Downlink shapping will be ignored"
+ class_reserved_downlink=
+ fi
+ elif [ "$dev_down" ]; then
+ e "class $class does not define reserved downlink but wan $int does. Downlink shapping will use default class"
+ fi
+
+ if [ "$class_allowed_downlink" -lt "$class_reserved_downlink" ]; then
+ die 1 "Allowed downlink bandwitdh in class $class must not be smaller than reserved downlink."
+ fi
+
+ config_get class_reserved_uplink $class reserved_uplink
+ if [ "$class_reserved_uplink" ]; then
+ if [ "$dev_up" ]; then
+ class_reserved_uplink=$(calc_bw $class_reserved_uplink $uplink)
+ config_get class_allowed_uplink $class allowed_uplink "$class_reserved_uplink"
+ class_allowed_uplink=$(calc_bw $class_allowed_uplink $uplink)
+ else
+ e "class $class defines reserved uplink but not wan $int. Downlink shapping will be ignored"
+ class_reserved_uplink=
+ fi
+ elif [ "$dev_up" ]; then
+ e "class $class does not define reserved uplink but wan $int does. Downlink shapping will use default class"
+ fi
+
+ if [ -n "$class_allowed_uplink" -a -n "$class_reserved_uplink" ] && [ "$class_allowed_uplink" -lt "$class_reserved_uplink" ]; then
+ die 1 "Allowed uplink bandwitdh in class $class must not be smaller than reserved uplink."
+ fi
+
+ v "$int($dev): $class(class 1:$i) will have" \
+ "${class_reserved_downlink:+download of ${class_reserved_downlink}kbit (up to ${class_allowed_downlink}kbit)}"\
+ "${class_reserved_uplink:+upload of ${class_reserved_uplink}kbit up (up to ${class_allowed_uplink}kbit)}"
+
+ xi=$(printf '0x%X\n' $(((i-1)<<class_id_shift)))
+ if [ "$class_reserved_uplink" ]; then
+ $TC class add dev $dev_up parent 1:1 classid 1:$i htb rate ${class_reserved_uplink}kbit ceil ${class_allowed_uplink}kbit quantum 1500 burst 50k
+ $TC qdisc add dev $dev_up parent 1:$i handle $i: $QDISC
+ if [ "$class" != default ]; then
+ $TC filter add dev $dev_up parent 1: protocol ip prio $i handle ${xi}/$mark_mask fw flowid 1:$i
+ fi
+ fi
+ if [ "$class_reserved_downlink" ]; then
+ $TC class add dev $dev_down parent 1:1 classid 1:$i htb rate ${class_reserved_downlink}kbit ceil ${class_allowed_downlink}kbit quantum 1500 burst 50k
+ $TC qdisc add dev $dev_down parent 1:$i handle $i: $QDISC
+ if [ "$class" != default ]; then
+ $TC filter add dev $dev_down parent 1: protocol ip prio $i handle ${xi}/$mark_mask fw flowid 1:$i
+ fi
+ fi
+ : $((i++))
+ done
+}
+
+start_tc() {
+ d "Creating tc rules"
+ local dev_done int dev interfaces
+ local default_class_id=$1; shift
+ local only_int=$1
+
+ if [ "$only_int" ]; then
+ config_get type $only_int TYPE
+ if [ "$type" != "wan" ]; then
+ d "interface $only_int not found in trafficshaper config. Ignoring"
+ return 0
+ fi
+ interfaces="$only_int"
+
+ else
+ interfaces="$(config_foreach echo wan)"
+ fi
+
+ for int in $interfaces; do
+ network_get_physdev dev "$int" ||
+ die 1 "failed to get physical dev of interface $int"
+
+ if echo "$dev_done" | grep -x -F -q "$dev"; then
+ e "$int uses $dev which was already configured. Only list each WAN once. Skipping..."
+ continue
+ fi
+
+ start_tc_interface $int $dev $ifb "$default_class_id"
+ intdev_done="$(echo "$dev_done"; echo -n $dev)"
+ done
+}
+
+do_start() {
+ local only_int=$1 type
+
+ preinit
+ (LOGLEVEL=0 do_stop "$only_int")
+ requires
+
+ trap "set +e; do_stop $only_int" EXIT
+
+ v "Starting $APPNAME${only_int:+ for interface $only_int}"
+
+ local default_class_id
+ if ! default_class_id=$(i=2 config_foreach 'eval echo $((i++))' class '| grep " default"'); then
+ die 2 "No default class defined!"
+ fi
+ default_class_id=${default_class_id% *}
+
+ [ "$only_int" ] || start_iptables
+ start_tc "$default_class_id" "$only_int"
+
+ trap - EXIT
+}
+
+start_service() {
+ ( do_start )
+}
+
+stop_service() {
+ ( do_stop )
+}
+
+restart_service() {
+ ( do_start )
+}
+
+is_running() {
+ $IP4T -t mangle -L $IPT_CHAIN &>/dev/null
+}
+
+reload_service() {
+ preinit
+ if ! is_running; then
+ d "Not running. Nothing to reload"
+ return 0
+ fi
+ logger -t "$APPNAME" "Reloading $*..."
+ ( do_start "$@" )
+}
+
+add_interface_trigger() {
+ procd_add_interface_trigger "interface.update" "$1" /etc/init.d/$APPNAME reload $1
+}
+
+service_triggers() {
+ preinit; set +e
+ requires
+
+ procd_add_reload_trigger "$APPNAME"
+ config_foreach add_interface_trigger wan
+
+ procd_open_validate
+ validate_trafficshaper_global
+ validate_trafficshaper_wan
+ validate_trafficshaper_class
+ procd_close_validate
+}
+
+validate_trafficshaper_global() {
+ uci_validate_section $APPNAME global "${1}" \
+ 'mark_mask:uinteger:0xFF'
+}
+
+validate_trafficshaper_wan() {
+ uci_validate_section "$APPNAME" wan "${1}" \
+ 'downlink:uinteger' \
+ 'uplink:uinteger'
+}
+
+validate_trafficshaper_class() {
+ uci_validate_section "$APPNAME" class "${1}" \
+ 'network:cidr' \
+ 'reserved_downlink:or(uinteger, string)' \
+ 'reserved_uplink:or(uinteger, string)' \
+ 'allowed_downlink:or(uinteger, string)' \
+ 'allowed_uplink:or(uinteger, string)'
+}
+
+boot() {
+ LOGLEVEL=1 start
+}
--- /dev/null
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=transmission-web-control
+PKG_RELEASE:=1
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/ronggang/transmission-web-control
+PKG_SOURCE_DATE:=2019-04-16
+PKG_SOURCE_VERSION:=a747a87babb246b0d3e6dd108ad7b4c19462cfe6
+PKG_MIRROR_HASH:=90a2e33bd799a13504881e26980823fa181b47918900fc4ef03ae3daf0625f14
+
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+PKG_MAINTAINER:=Richard Yu <yurichard3839@gmail.com>
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/transmission-web-control
+ SECTION:=net
+ CATEGORY:=Network
+ SUBMENU:=BitTorrent
+ DEPENDS:=@(PACKAGE_transmission-daemon-openssl||PACKAGE_transmission-daemon-mbedtls)
+ CONFLICTS:=transmission-web
+ TITLE:=Transmission Web Control
+ URL:=https://github.com/ronggang/transmission-web-control
+ PKGARCH:=all
+endef
+
+define Package/transmission-web-control/description
+ Transmission Web Control is a custom Web UI for Transmission.
+endef
+
+define Build/Compile
+endef
+
+define Package/transmission-web-control/install
+ $(INSTALL_DIR) $(1)/usr/share/transmission/web
+ $(CP) $(PKG_BUILD_DIR)/src/* $(1)/usr/share/transmission/web
+endef
+
+$(eval $(call BuildPackage,transmission-web-control))
--- /dev/null
+--- a/src/index.html
++++ b/src/index.html
+@@ -61,9 +61,6 @@
+ <!-- 切换到移动版 -->
+ <a id="toolbar_mobile" href="javascript:location.href = 'index.mobile.html';" class="easyui-linkbutton" data-options="iconCls:'icon-mobile',plain:true" system-tip-lang="toolbar.tip['ui-mobile']"><span system-lang="toolbar['ui-mobile']"></span></a>
+ <span class="button-split">|</span>
+- <!-- 切换到原版 -->
+- <a id="" href="javascript:location.href = 'index.original.html';" class="easyui-linkbutton" data-options="iconCls:'icon-transmission',plain:true" system-tip-lang="toolbar.tip['ui-original']"><span system-lang="toolbar['ui-original']"></span></a>
+- <span class="button-split">|</span>
+ <!-- 关于 -->
+ <a id="toolbar_about" href="javascript:void(0);" onclick="javascript:system.openDialogFromTemplate({id: 'dialog-about',options: {title: system.lang.toolbar['about'],width: 420,height: 370}});" class="easyui-linkbutton" data-options="iconCls:'icon-about',plain:true" system-tip-lang="toolbar.about"><span system-lang="toolbar.about"></span></a>
+ </div>
+--- a/src/index.mobile.html
++++ b/src/index.mobile.html
+@@ -69,7 +69,6 @@
+ <ul data-role="listview" data-divider-theme="a" data-theme="c" data-icon="false" style="margin-top:15px;">
+ <li data-role='list-divider'>UI</li>
+ <li><a href="#" onclick="location.href = 'index.html?devicetype=computer';"><img src="tr-web-control/style/images/computer.png" class="ui-li-icon"/><span system-lang="toolbar['ui-computer']"></span></a></li>
+- <li><a href="#" onclick="location.href = 'index.original.html';"><img src="tr-web-control/style/images/transmission.png" class="ui-li-icon"/><span system-lang="toolbar['ui-original']"></span></a></li>
+ </ul>
+ <ul data-role="listview" data-divider-theme="a" data-theme="c" data-icon="false" style="margin-top:15px;">
+ <li data-role='list-divider'><span system-lang="title.status"></span></li>
PKG_NAME:=transmission
PKG_VERSION:=2.94
-PKG_RELEASE:=2
+PKG_RELEASE:=4
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@GITHUB/transmission/transmission-releases/master
$(call Package/transmission/template)
TITLE+= (webinterface)
DEPENDS:=@(PACKAGE_transmission-daemon-openssl||PACKAGE_transmission-daemon-mbedtls)
+ PKGARCH:=all
endef
endef
Package/transmission-daemon-mbedtls/conffiles = $(Package/transmission-daemon-openssl/conffiles)
+TARGET_CFLAGS += -flto
+TARGET_LDFLAGS += -Wl,--gc-sections -Wl,--as-needed
CONFIGURE_ARGS += \
- --enable-daemon \
--enable-cli \
- --without-gtk \
+ --enable-daemon \
--enable-external-natpmp \
--enable-largefile \
- --enable-lightweight
-
-ifeq ($(BUILD_VARIANT),openssl)
- CONFIGURE_ARGS += \
- --with-crypto=openssl
-endif
+ --enable-lightweight \
+ --without-gtk \
+ --without-kqueue \
+ --without-systemd-daemon
ifeq ($(BUILD_VARIANT),mbedtls)
- CONFIGURE_ARGS += \
- --with-crypto=polarssl
+ CONFIGURE_ARGS += --with-crypto=polarssl
CONFIGURE_VARS += \
MBEDTLS_CFLAGS="-I$(STAGING_DIR)/usr/include/mbedtls" \
MBEDTLS_LIBS="-lmbedtls -lmbedcrypto"
+else
+ CONFIGURE_ARGS += --with-crypto=openssl
endif
define Package/transmission-daemon-openssl/install
config_get nice "$cfg" nice 0
config_get web_home "$cfg" 'web_home'
- local MEM=$(sed -ne 's!^MemTotal:[[:space:]]*\([0-9]*\) kB$!\1!p' /proc/meminfo)
+ local MEM
+
+ MEM=$(sed -ne 's!^MemTotal:[[:space:]]*\([0-9]*\) kB$!\1!p' /proc/meminfo)
if test "$MEM" -gt 1;then
- USE=$(expr $MEM \* $mem_percentage \* 10)
+ USE=$((MEM * mem_percentage * 10))
fi
config_file="$config_dir/settings.json"
[ -z "$user" ] || chown -R "$user:$group" $config_dir
}
- [ "$config_overwrite" == 0 ] || {
+ [ "$config_overwrite" = 0 ] || {
echo "{" > $config_file
--- /dev/null
+From e24f7c6653ec385c8af7eb6499d924994e78e42d Mon Sep 17 00:00:00 2001
+From: Waldemar Brodkorb <wbx@uclibc-ng.org>
+Date: Wed, 19 Oct 2016 19:33:35 +0200
+Subject: [PATCH] uClibc-ng since 1.0.18 has sys/quota.h synced with GNU libc
+
+---
+ libtransmission/platform-quota.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libtransmission/platform-quota.c b/libtransmission/platform-quota.c
+index e7d1f6d4f..bb1f9d9b9 100644
+--- a/libtransmission/platform-quota.c
++++ b/libtransmission/platform-quota.c
+@@ -285,7 +285,7 @@ getquota (const char * device)
+ spaceused = (int64_t) dq.dqb_curblocks >> 1;
+ #elif defined(__APPLE__)
+ spaceused = (int64_t) dq.dqb_curbytes;
+-#elif defined(__UCLIBC__)
++#elif defined (__UCLIBC__) && !TR_UCLIBC_CHECK_VERSION (1, 0, 18)
+ spaceused = (int64_t) btodb(dq.dqb_curblocks);
+ #elif defined(__sun) || (defined(_LINUX_QUOTA_VERSION) && _LINUX_QUOTA_VERSION < 2)
+ spaceused = (int64_t) dq.dqb_curblocks >> 1;
+--
+2.17.1
+
include $(TOPDIR)/rules.mk
PKG_NAME:=travelmate
-PKG_VERSION:=1.3.4
+PKG_VERSION:=1.4.9
PKG_RELEASE:=1
PKG_LICENSE:=GPL-3.0+
PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
## Description
If you’re planning an upcoming vacation or a business trip, taking your laptop, tablet or smartphone give you the ability to connect with friends or complete work on the go. But many hotels don’t have a secure wireless network setup or you’re limited on using a single device at once. Investing in a portable, mini travel router is a great way to connect all of your devices at once while having total control over your own personalized wireless network.
A logical combination of AP+STA mode on one physical radio allows most of OpenWrt supported router devices to connect to a wireless hotspot/station (STA) and provide a wireless access point (AP) from that hotspot at the same time. Downside of this solution: whenever the STA interface looses the connection it will go into an active scan cycle which renders the radio unusable for AP mode operation, therefore the AP is taken down if the STA looses its association.
-To avoid these kind of deadlocks, travelmate set all station interfaces in an "always off" mode and connects automatically to available/configured hotspots.
+To avoid these kind of deadlocks, travelmate will set all station interfaces to an "always off" mode and connects automatically to available/configured hotspots.
## Main Features
* STA interfaces operating in an "always off" mode, to make sure that the AP is always accessible
* [OpenWrt](https://openwrt.org), tested with the stable release series (18.06.x) and with the latest OpenWrt snapshot
* iwinfo for wlan scanning, uclient-fetch for captive portal detection
* optional: qrencode 4.x for QR code support
+* optional: wpad (the full version, not wpad-mini) to use Enterprise WiFi
## Installation & Usage
* download the package [here](https://downloads.openwrt.org/snapshots/packages/x86_64/packages)
/etc/init.d/travelmate restart
</code></pre>
-## FAQ
-**Q:** What happen with misconfigured, faulty uplinks, e.g. due to outdated wlan passwords?
-**A:** Travelmate tries n times (default 3) to connect, then the respective uplink will be marked as "faulty" in the JSON runtime file and hereafter ignored. To reset the JSON runtime file, simply restart travelmate.
-**Q:** How to connect to hidden uplinks?
-**A:** See 'example\_hidden' STA configuration above, option 'SSID' and 'BSSID' must be specified for successful connections.
-**Q:** Any recommendations regarding suitable DNS settings to easily connect to captive portals?
-**A:** Use a simple DNS forwarder like dnsmasq and disable the option 'rebind_protection'.
-
## Support
Please join the travelmate discussion in this [forum thread](https://forum.lede-project.org/t/travelmate-support-thread/5155) or contact me by [mail](mailto:dev@brenken.org)
option trm_enabled '0'
option trm_captive '1'
option trm_proactive '1'
+ option trm_netcheck '0'
option trm_iface 'trm_wwan'
option trm_triggerdelay '2'
option trm_debug '0'
- option trm_maxretry '3'
+ option trm_maxretry '5'
+ option trm_listexpiry '0'
option trm_minquality '35'
option trm_maxwait '30'
option trm_timeout '60'
reload_service()
{
- [ -s "${trm_pidfile}" ] && return 1
- rc_procd start_service
+ local ppid pid timeout="$(uci_get travelmate global trm_timeout)"
+
+ if [ -s "${trm_pidfile}" ]
+ then
+ ppid="$(cat "${trm_pidfile}" 2>/dev/null)"
+ if [ -n "${ppid}" ]
+ then
+ pid="$(pgrep -xnf "sleep ${timeout:-60} 0" -P ${ppid} 2>/dev/null)"
+ if [ -n "${pid}" ]
+ then
+ kill -INT ${pid} 2>/dev/null
+ fi
+ fi
+ fi
}
stop_service()
local delay="$(uci_get travelmate global trm_triggerdelay)"
PROCD_RELOAD_DELAY=$((${delay:-2} * 1000))
- procd_add_interface_trigger "interface.*.down" "${trigger}" "${trm_init}" reload
- procd_add_reload_trigger "travelmate"
+ procd_add_interface_trigger "interface.*.down" "${trigger:-"trm_wwan"}" "${trm_init}" reload
+ procd_add_config_trigger "config.change" "wireless" "${trm_init}" reload
+ procd_add_config_trigger "config.change" "travelmate" "${trm_init}" restart
}
#
LC_ALL=C
PATH="/usr/sbin:/usr/bin:/sbin:/bin"
-trm_ver="1.3.4"
+trm_ver="1.4.9"
trm_sysver="unknown"
trm_enabled=0
trm_debug=0
+trm_iface="trm_wwan"
trm_captive=1
trm_proactive=1
+trm_netcheck=0
trm_captiveurl="http://captive.apple.com"
+trm_scanbuffer=1024
trm_minquality=35
-trm_maxretry=3
+trm_maxretry=5
trm_maxwait=30
trm_timeout=60
+trm_listexpiry=0
trm_radio=""
trm_connection=""
trm_rtfile="/tmp/trm_runtime.json"
#
f_trim()
{
- local trim="$1"
+ local IFS trim="${1}"
trim="${trim#"${trim%%[![:space:]]*}"}"
trim="${trim%"${trim##*[![:space:]]}"}"
#
f_envload()
{
- local sys_call sys_desc sys_model sys_ver
+ local IFS sys_call sys_desc sys_model
+
+ # (re-)initialize global list variables
+ #
+ unset trm_devlist trm_stalist trm_radiolist trm_active_sta
# get system information
#
trm_sysver="${sys_model}, ${sys_desc}"
fi
- # (re-)initialize global list variables
+ # get eap capabilities and rebind protection setting
#
- unset trm_devlist trm_stalist trm_radiolist trm_active_sta
+ trm_eap="$("${trm_wpa}" -veap >/dev/null 2>&1; printf "%u" ${?})"
+ trm_rebind="$(uci_get dhcp "@dnsmasq[0]" rebind_protection)"
# load config and check 'enabled' option
#
- option_cb()
+ config_cb()
{
- local option="${1}"
- local value="${2}"
- eval "${option}=\"${value}\""
+ local name="${1}" type="${2}"
+ if [ "${name}" = "travelmate" ] && [ "${type}" = "global" ]
+ then
+ option_cb()
+ {
+ local option="${1}" value="${2}"
+ eval "${option}=\"${value}\""
+ }
+ else
+ option_cb()
+ {
+ return 0
+ }
+ fi
}
config_load travelmate
- if [ ${trm_enabled} -ne 1 ]
+ if [ "${trm_enabled}" -ne 1 ]
then
f_log "info" "travelmate is currently disabled, please set 'trm_enabled' to '1' to use this service"
exit 0
# validate input ranges
#
- if [ ${trm_minquality} -lt 20 ] || [ ${trm_minquality} -gt 80 ]
+ if [ "${trm_minquality}" -lt 20 ] || [ "${trm_minquality}" -gt 80 ]
then
trm_minquality=35
fi
- if [ ${trm_maxretry} -lt 1 ] || [ ${trm_maxretry} -gt 10 ]
+ if [ "${trm_listexpiry}" -lt 0 ] || [ "${trm_listexpiry}" -gt 300 ]
then
- trm_maxretry=3
+ trm_listexpiry=0
fi
- if [ ${trm_maxwait} -lt 20 ] || [ ${trm_maxwait} -gt 40 ] || [ ${trm_maxwait} -ge ${trm_timeout} ]
+ if [ "${trm_maxretry}" -lt 1 ] || [ "${trm_maxretry}" -gt 10 ]
+ then
+ trm_maxretry=5
+ fi
+ if [ "${trm_maxwait}" -lt 20 ] || [ "${trm_maxwait}" -gt 40 ] || [ "${trm_maxwait}" -ge "${trm_timeout}" ]
then
trm_maxwait=30
fi
- if [ ${trm_timeout} -lt 30 ] || [ ${trm_timeout} -gt 300 ] || [ ${trm_timeout} -le ${trm_maxwait} ]
+ if [ "${trm_timeout}" -lt 30 ] || [ "${trm_timeout}" -gt 300 ] || [ "${trm_timeout}" -le "${trm_maxwait}" ]
then
trm_timeout=60
fi
+
+ # load json runtime file
+ #
+ json_load_file "${trm_rtfile}" >/dev/null 2>&1
+ json_select data >/dev/null 2>&1
+ if [ "${?}" -ne 0 ]
+ then
+ > "${trm_rtfile}"
+ json_init
+ json_add_object "data"
+ fi
}
# gather radio information & bring down all STA interfaces
#
f_prep()
{
- local eap_rc=0 config="${1}" proactive="${2}"
- local mode="$(uci_get wireless "${config}" mode)"
- local network="$(uci_get wireless "${config}" network)"
- local radio="$(uci_get wireless "${config}" device)"
- local disabled="$(uci_get wireless "${config}" disabled)"
- local eaptype="$(uci_get wireless "${config}" eap_type)"
+ local IFS mode network radio disabled eaptype config="${1}" proactive="${2}"
- if [ -z "${trm_radio}" ] && [ -z "$(printf "%s" "${trm_radiolist}" | grep -Fo "${radio}")" ]
- then
- trm_radiolist="$(f_trim "${trm_radiolist} ${radio}")"
- elif [ -n "${trm_radio}" ] && [ -z "${trm_radiolist}" ]
- then
- trm_radiolist="$(f_trim "$(printf "%s" "${trm_radio}" | \
- awk '{while(match(tolower($0),/radio[0-9]/)){ORS=" ";print substr(tolower($0),RSTART,RLENGTH);$0=substr($0,RSTART+RLENGTH)}}')")"
- fi
- if [ "${mode}" = "sta" ] && [ "${network}" = "${trm_iface}" ]
+ mode="$(uci_get wireless "${config}" mode)"
+ network="$(uci_get wireless "${config}" network)"
+ radio="$(uci_get wireless "${config}" device)"
+ disabled="$(uci_get wireless "${config}" disabled)"
+ eaptype="$(uci_get wireless "${config}" eap_type)"
+
+ if [ -n "${config}" ] && [ -n "${radio}" ] && [ -n "${mode}" ] && [ -n "${network}" ]
then
- if ([ -z "${disabled}" ] || [ "${disabled}" = "0" ]) && ([ ${proactive} -eq 0 ] || [ "${trm_ifstatus}" != "true" ])
+ if [ -z "${trm_radio}" ] && [ -z "$(printf "%s" "${trm_radiolist}" | grep -Fo "${radio}")" ]
then
- uci_set wireless "${config}" disabled 1
- elif [ "${disabled}" = "0" ] && [ "${trm_ifstatus}" = "true" ] && [ -z "${trm_active_sta}" ] && [ ${proactive} -eq 1 ]
+ trm_radiolist="$(f_trim "${trm_radiolist} ${radio}")"
+ elif [ -n "${trm_radio}" ] && [ -z "${trm_radiolist}" ]
then
- trm_active_sta="${config}"
+ trm_radiolist="$(f_trim "$(printf "%s" "${trm_radio}" | \
+ awk '{while(match(tolower($0),/radio[0-9]/)){ORS=" ";print substr(tolower($0),RSTART,RLENGTH);$0=substr($0,RSTART+RLENGTH)}}')")"
fi
- if [ -n "${eaptype}" ]
+ if [ "${mode}" = "sta" ] && [ "${network}" = "${trm_iface}" ]
then
- eap_rc="$("${trm_wpa}" -veap >/dev/null 2>&1; printf "%u" ${?})"
- fi
- if [ -z "${eaptype}" ] || [ ${eap_rc} -eq 0 ]
- then
- trm_stalist="$(f_trim "${trm_stalist} ${config}-${radio}")"
+ if { [ -z "${disabled}" ] || [ "${disabled}" = "0" ]; } && { [ "${proactive}" -eq 0 ] || [ "${trm_ifstatus}" != "true" ]; }
+ then
+ uci_set wireless "${config}" disabled 1
+ elif [ "${disabled}" = "0" ] && [ "${trm_ifstatus}" = "true" ] && [ -z "${trm_active_sta}" ] && [ "${proactive}" -eq 1 ]
+ then
+ trm_active_sta="${config}"
+ fi
+ if [ -z "${eaptype}" ] || { [ -n "${eaptype}" ] && [ "${trm_eap:-1}" -eq 0 ]; }
+ then
+ trm_stalist="$(f_trim "${trm_stalist} ${config}-${radio}")"
+ fi
fi
fi
- f_log "debug" "f_prep ::: config: ${config}, mode: ${mode}, network: ${network}, eap_rc: ${eap_rc}, radio: ${radio}, trm_radio: ${trm_radio:-"-"}, trm_active_sta: ${trm_active_sta:-"-"}, proactive: ${proactive}, disabled: ${disabled}"
+ f_log "debug" "f_prep ::: config: ${config}, mode: ${mode}, network: ${network}, radio: ${radio}, trm_radio: ${trm_radio:-"-"}, trm_active_sta: ${trm_active_sta:-"-"}, proactive: ${proactive}, trm_eap: ${trm_eap:-"-"}, trm_rebind: ${trm_rebind:-"-"}, disabled: ${disabled}"
}
# check interface status
#
f_check()
{
- local IFS ifname radio dev_status config sta_essid sta_bssid result wait=1 mode="${1}" status="${2:-"false"}"
+ local IFS ifname radio dev_status last_status config sta_essid sta_bssid result cp_domain wait mode="${1}" status="${2:-"false"}"
- trm_ifquality=0
- if [ "${mode}" = "initial" ]
+ if [ "${mode}" != "initial" ] && [ "${status}" = "false" ]
then
- trm_ifstatus="false"
- else
- if [ "${status}" = "false" ]
- then
- ubus call network reload
- fi
+ ubus call network reload
+ wait=$((trm_maxwait/6))
+ sleep ${wait}
fi
- while [ ${wait} -le ${trm_maxwait} ]
+
+ wait=1
+ while [ "${wait}" -le "${trm_maxwait}" ]
do
dev_status="$(ubus -S call network.wireless status 2>/dev/null)"
if [ -n "${dev_status}" ]
trm_devlist="$(f_trim "${trm_devlist} ${radio}")"
fi
done
- if [ "${trm_devlist}" = "${trm_radiolist}" ] || [ ${wait} -eq ${trm_maxwait} ]
+ if [ "${trm_devlist}" = "${trm_radiolist}" ] || [ "${wait}" -eq "${trm_maxwait}" ]
then
ifname="${trm_devlist}"
break
fi
elif [ "${mode}" = "rev" ]
then
- wait=$(( ${trm_maxwait} / 3 ))
- sleep ${wait}
break
else
ifname="$(printf "%s" "${dev_status}" | jsonfilter -l1 -e '@.*.interfaces[@.config.mode="sta"].ifname')"
if [ -n "${ifname}" ]
then
- trm_ifquality="$(${trm_iwinfo} ${ifname} info 2>/dev/null | awk -F "[\/| ]" '/Link Quality:/{printf "%i\n", (100 / $NF * $(NF-1)) }')"
- if [ ${trm_ifquality} -ge ${trm_minquality} ]
+ trm_ifquality="$(${trm_iwinfo} "${ifname}" info 2>/dev/null | awk -F "[ ]" '/Link Quality:/{split($NF,var0,"/");printf "%i\n",(var0[1]*100/var0[2])}')"
+ if [ "${mode}" = "initial" ] && [ "${trm_captive}" -eq 1 ]
+ then
+ result="$(${trm_fetch} --timeout=$((trm_maxwait/6)) "${trm_captiveurl}" -O /dev/null 2>&1 | \
+ awk '/^Failed to redirect|^Redirected/{printf "%s" "net cp \047"$NF"\047";exit}/^Download completed/{printf "%s" "net ok";exit}/^Failed|^Connection error/{printf "%s" "net nok";exit}')"
+ fi
+ if [ "${trm_ifquality}" -ge "${trm_minquality}" ] && [ "${result%/*}" != "net nok" ]
then
trm_ifstatus="$(ubus -S call network.interface dump 2>/dev/null | jsonfilter -l1 -e "@.interface[@.device=\"${ifname}\"].up")"
- elif [ "${mode}" = "initial" ] && [ ${trm_ifquality} -lt ${trm_minquality} ]
+ if [ "${trm_ifstatus}" = "true" ]
+ then
+ if [ "${mode}" = "sta" ] && [ "${trm_captive}" -eq 1 ] && [ "${trm_rebind:-0}" -eq 1 ] && [ -x "/etc/init.d/dnsmasq" ]
+ then
+ while true
+ do
+ result="$(${trm_fetch} --timeout=$((trm_maxwait/6)) "${trm_captiveurl}" -O /dev/null 2>&1 | \
+ awk '/^Failed to redirect|^Redirected/{printf "%s" "net cp \047"$NF"\047";exit}/^Download completed/{printf "%s" "net ok";exit}/^Failed|^Connection error/{printf "%s" "net nok";exit}')"
+ cp_domain="$(printf "%s" "${result}" | awk -F "[\\'| ]" '/^net cp/{printf "%s" $4}')"
+ if [ "${trm_netcheck}" -eq 1 ] && [ "${result%/*}" = "net nok" ]
+ then
+ trm_ifstatus="${status}"
+ f_jsnup
+ break 2
+ fi
+ if [ -z "${cp_domain}" ] || [ -n "$(uci_get dhcp "@dnsmasq[0]" rebind_domain | grep -Fo "${cp_domain}")" ]
+ then
+ break
+ fi
+ uci -q add_list dhcp.@dnsmasq[0].rebind_domain="${cp_domain}"
+ f_log "info" "captive portal domain '${cp_domain}' added to rebind whitelist"
+ done
+ if [ -n "$(uci -q changes dhcp)" ]
+ then
+ uci_commit dhcp
+ /etc/init.d/dnsmasq reload
+ fi
+ fi
+ trm_connection="${result:-"-"}/${trm_ifquality}"
+ f_jsnup
+ break
+ fi
+ elif [ -n "${trm_connection}" ]
then
- trm_ifstatus="${status}"
sta_essid="$(printf "%s" "${dev_status}" | jsonfilter -l1 -e '@.*.interfaces[@.config.mode="sta"].*.ssid')"
sta_bssid="$(printf "%s" "${dev_status}" | jsonfilter -l1 -e '@.*.interfaces[@.config.mode="sta"].*.bssid')"
- f_log "info" "uplink '${sta_essid:-"-"}/${sta_bssid:-"-"}' is out of range (${trm_ifquality}/${trm_minquality}), uplink disconnected (${trm_sysver})"
+ if [ "${trm_ifquality}" -lt "${trm_minquality}" ]
+ then
+ f_log "info" "uplink '${sta_essid:-"-"}/${sta_bssid:-"-"}' is out of range (${trm_ifquality}/${trm_minquality})"
+ elif [ "${trm_netcheck}" -eq 1 ] && [ "${result%/*}" = "net nok" ]
+ then
+ f_log "info" "uplink '${sta_essid:-"-"}/${sta_bssid:-"-"}' has no internet (${result})"
+ fi
+ unset trm_connection
+ trm_ifstatus="${status}"
+ f_jsnup
+ break
+ elif [ "${mode}" = "initial" ]
+ then
+ f_jsnup
+ break
fi
- fi
- fi
- if [ "${mode}" = "initial" ] || [ "${trm_ifstatus}" = "true" ]
- then
- if ([ "${trm_ifstatus}" != "true" ] && [ "${trm_ifstatus}" != "${status}" ]) || \
- ([ "${trm_ifstatus}" = "true" ] && [ "${mode}" = "sta" ] && [ -n "${trm_active_sta}" ]) || \
- [ ${trm_ifquality} -lt ${trm_minquality} ]
+ elif [ -n "${trm_connection}" ]
then
+ unset trm_connection
+ trm_ifstatus="${status}"
f_jsnup
- fi
- if [ "${mode}" = "initial" ] && [ ${trm_captive} -eq 1 ] && [ "${trm_ifstatus}" = "true" ]
+ break
+ elif [ "${mode}" = "initial" ]
then
- result="$(${trm_fetch} --timeout=$(( ${trm_maxwait} / 3 )) "${trm_captiveurl}" -O /dev/null 2>&1 | \
- awk '/^Redirected/{printf "%s" "net cp \047"$NF"\047";exit}/^Download completed/{printf "%s" "net ok";exit}/^Failed|^Connection error/{printf "%s" "net nok";exit}')"
- if [ -n "${result}" ] && ([ -z "${trm_connection}" ] || [ "${result}" != "${trm_connection%/*}" ])
- then
- trm_connection="${result}/${trm_ifquality}"
- f_jsnup
- fi
+ f_jsnup
+ break
fi
- break
fi
fi
- wait=$(( wait + 1 ))
+ wait=$((wait+1))
sleep 1
done
- f_log "debug" "f_check::: mode: ${mode}, name: ${ifname:-"-"}, status: ${trm_ifstatus}, quality: ${trm_ifquality}, result: ${result:-"-"}, connection: ${trm_connection:-"-"}, wait: ${wait}, max_wait: ${trm_maxwait}, min_quality: ${trm_minquality}, captive: ${trm_captive}"
+ f_log "debug" "f_check::: mode: ${mode}, name: ${ifname:-"-"}, status: ${trm_ifstatus}, connection: ${trm_connection:-"-"}, wait: ${wait}, max_wait: ${trm_maxwait}, min_quality: ${trm_minquality}, captive: ${trm_captive}, netcheck: ${trm_netcheck}"
}
# update runtime information
#
f_jsnup()
{
- local config sta_iface sta_radio sta_essid sta_bssid dev_status status="${trm_ifstatus}" faulty_list faulty_station="${1}"
-
- if [ "${status}" = "true" ]
- then
- status="connected (${trm_connection:-"-"})"
- else
- unset trm_connection
- status="running / not connected"
- fi
+ local IFS config d1 d2 d3 last_date last_station sta_iface sta_radio sta_essid sta_bssid last_status dev_status status="${trm_ifstatus}" faulty_list faulty_station="${1}"
dev_status="$(ubus -S call network.wireless status 2>/dev/null)"
if [ -n "${dev_status}" ]
fi
fi
+ json_get_var last_date "last_rundate"
+ json_get_var last_station "station_id"
+ if [ "${status}" = "true" ]
+ then
+ status="connected (${trm_connection:-"-"})"
+ json_get_var last_status "travelmate_status"
+ if [ "${last_status}" = "running / not connected" ] || [ "${last_station}" != "${sta_radio:-"-"}/${sta_essid:-"-"}/${sta_bssid:-"-"}" ]
+ then
+ last_date="$(/bin/date "+%Y.%m.%d-%H:%M:%S")"
+ fi
+ elif [ "${status}" = "error" ]
+ then
+ unset trm_connection
+ status="program error"
+ else
+ unset trm_connection
+ status="running / not connected"
+ fi
+ if [ -z "${last_date}" ]
+ then
+ last_date="$(/bin/date "+%Y.%m.%d-%H:%M:%S")"
+ fi
+
json_get_var faulty_list "faulty_stations"
+ if [ -n "${faulty_list}" ] && [ "${trm_listexpiry}" -gt 0 ]
+ then
+ d1="$(/bin/date -d "${last_date}" "+%s")"
+ d2="$(/bin/date "+%s")"
+ d3=$(((d2 - d1)/60))
+ if [ "${d3}" -ge "${trm_listexpiry}" ]
+ then
+ faulty_list=""
+ fi
+ fi
+
if [ -n "${faulty_station}" ]
then
if [ -z "$(printf "%s" "${faulty_list}" | grep -Fo "${faulty_station}")" ]
then
faulty_list="$(f_trim "${faulty_list} ${faulty_station}")"
+ last_date="$(/bin/date "+%Y.%m.%d-%H:%M:%S")"
fi
fi
json_add_string "travelmate_status" "${status}"
json_add_string "station_id" "${sta_radio:-"-"}/${sta_essid:-"-"}/${sta_bssid:-"-"}"
json_add_string "station_interface" "${sta_iface:-"-"}"
json_add_string "faulty_stations" "${faulty_list}"
- json_add_string "last_rundate" "$(/bin/date "+%d.%m.%Y %H:%M:%S")"
+ json_add_string "last_rundate" "${last_date}"
json_add_string "system" "${trm_sysver}"
json_dump > "${trm_rtfile}"
- f_log "debug" "f_jsnup::: config: ${config:-"-"}, status: ${status:-"-"}, sta_iface: ${sta_iface:-"-"}, sta_radio: ${sta_radio:-"-"}, sta_essid: ${sta_essid:-"-"}, sta_bssid: ${sta_bssid:-"-"}, faulty_list: ${faulty_list:-"-"}"
+ f_log "debug" "f_jsnup::: config: ${config:-"-"}, status: ${status:-"-"}, sta_iface: ${sta_iface:-"-"}, sta_radio: ${sta_radio:-"-"}, sta_essid: ${sta_essid:-"-"}, sta_bssid: ${sta_bssid:-"-"}, faulty_list: ${faulty_list:-"-"}, list_expiry: ${trm_listexpiry}"
}
# write to syslog
#
f_log()
{
- local class="${1}"
- local log_msg="${2}"
+ local IFS class="${1}" log_msg="${2}"
- if [ -n "${log_msg}" ] && ([ "${class}" != "debug" ] || [ ${trm_debug} -eq 1 ])
+ if [ -n "${log_msg}" ] && { [ "${class}" != "debug" ] || [ "${trm_debug}" -eq 1 ]; }
then
logger -p "${class}" -t "travelmate-${trm_ver}[${$}]" "${log_msg}"
if [ "${class}" = "err" ]
#
f_main()
{
- local IFS cnt dev config scan scan_list scan_essid scan_bssid scan_quality faulty_list
- local sta sta_essid sta_bssid sta_radio sta_iface active_essid active_bssid active_radio
+ local IFS cnt dev config spec scan_list scan_essid scan_bssid scan_quality faulty_list
+ local station_id sta sta_essid sta_bssid sta_radio sta_iface active_essid active_bssid active_radio
f_check "initial"
f_log "debug" "f_main ::: status: ${trm_ifstatus}, proactive: ${trm_proactive}"
- if [ "${trm_ifstatus}" != "true" ] || [ ${trm_proactive} -eq 1 ]
+ if [ "${trm_ifstatus}" != "true" ] || [ "${trm_proactive}" -eq 1 ]
then
config_load wireless
config_foreach f_prep wifi-iface ${trm_proactive}
- if [ "${trm_ifstatus}" = "true" ] && [ ${trm_proactive} -eq 1 ]
+ if [ "${trm_ifstatus}" = "true" ] && [ -n "${trm_active_sta}" ] && [ "${trm_proactive}" -eq 1 ]
then
json_get_var station_id "station_id"
active_radio="${station_id%%/*}"
active_essid="${active_essid#*/}"
active_bssid="${station_id##*/}"
f_check "dev" "true"
+ f_log "debug" "f_main ::: active_radio: ${active_radio}, active_essid: \"${active_essid}\", active_bssid: ${active_bssid:-"-"}"
else
uci_commit wireless
f_check "dev"
fi
json_get_var faulty_list "faulty_stations"
- f_log "debug" "f_main ::: iwinfo: ${trm_iwinfo:-"-"}, dev_list: ${trm_devlist:-"-"}, sta_list: ${trm_stalist:0:800}, faulty_list: ${faulty_list:-"-"}"
+ f_log "debug" "f_main ::: iwinfo: ${trm_iwinfo:-"-"}, dev_list: ${trm_devlist:-"-"}, sta_list: ${trm_stalist:0:${trm_scanbuffer}}, faulty_list: ${faulty_list:-"-"}"
+ # radio loop
+ #
for dev in ${trm_devlist}
do
- f_log "debug" "f_main ::: device: ${dev}"
- if [ -z "$(printf "%s" "${trm_stalist}" | grep -o "\-${dev}")" ]
+ if [ -z "$(printf "%s" "${trm_stalist}" | grep -o "\\-${dev}")" ]
then
f_log "debug" "f_main ::: no station on '${dev}' - continue"
continue
fi
- cnt=1
- while [ ${cnt} -le ${trm_maxretry} ]
+ # station loop
+ #
+ for sta in ${trm_stalist}
do
- f_log "debug" "f_main ::: cnt: ${cnt}, max_cnt: ${trm_maxretry}"
- for sta in ${trm_stalist}
- do
- config="${sta%%-*}"
- sta_radio="${sta##*-}"
- sta_essid="$(uci_get wireless "${config}" ssid)"
- sta_bssid="$(uci_get wireless "${config}" bssid)"
- sta_iface="$(uci_get wireless "${config}" network)"
- json_get_var faulty_list "faulty_stations"
- if [ -n "$(printf "%s" "${faulty_list}" | grep -Fo "${sta_radio}/${sta_essid}/${sta_bssid}")" ]
+ config="${sta%%-*}"
+ sta_radio="${sta##*-}"
+ sta_essid="$(uci_get wireless "${config}" ssid)"
+ sta_bssid="$(uci_get wireless "${config}" bssid)"
+ sta_iface="$(uci_get wireless "${config}" network)"
+ json_get_var faulty_list "faulty_stations"
+ if [ -n "$(printf "%s" "${faulty_list}" | grep -Fo "${sta_radio}/${sta_essid}/${sta_bssid}")" ]
+ then
+ f_log "debug" "f_main ::: faulty station '${sta_radio}/${sta_essid}/${sta_bssid:-"-"}' - continue"
+ continue
+ fi
+ if [ "${dev}" = "${active_radio}" ] && [ "${sta_essid}" = "${active_essid}" ] && [ "${sta_bssid:-"-"}" = "${active_bssid}" ]
+ then
+ f_log "debug" "f_main ::: active station prioritized '${active_radio}/${active_essid}/${active_bssid:-"-"}' - break"
+ break 2
+ fi
+ f_log "debug" "f_main ::: sta_radio: ${sta_radio}, sta_essid: \"${sta_essid}\", sta_bssid: ${sta_bssid:-"-"}"
+ if [ -z "${scan_list}" ]
+ then
+ scan_list="$("${trm_iwinfo}" "${dev}" scan 2>/dev/null | \
+ awk 'BEGIN{FS="[ ]"}/Address:/{var1=$NF}/ESSID:/{var2="";for(i=12;i<=NF;i++)if(var2==""){var2=$i}else{var2=var2" "$i};
+ gsub(/,/,".",var2)}/Quality:/{split($NF,var0,"/");printf "%i,%s,%s\n",(var0[1]*100/var0[2]),var1,var2}' | \
+ sort -rn | awk -v buf="${trm_scanbuffer}" 'BEGIN{ORS=","}{print substr($0,1,buf)}')"
+ f_log "debug" "f_main ::: scan_buffer: ${trm_scanbuffer}, scan_list: ${scan_list}"
+ if [ -z "${scan_list}" ]
then
- f_log "debug" "f_main ::: faulty station '${sta_radio}/${sta_essid}/${sta_bssid:-"-"}' - continue"
- continue
+ f_log "debug" "f_main ::: no scan results on '${dev}' - continue"
+ continue 2
fi
- if [ "${dev}" = "${active_radio}" ] && [ "${sta_essid}" = "${active_essid}" ] && [ "${sta_bssid:-"-"}" = "${active_bssid}" ]
+ fi
+ # scan loop
+ #
+ IFS=","
+ for spec in ${scan_list}
+ do
+ if [ -z "${scan_quality}" ]
then
- f_log "debug" "f_main ::: active station prioritized '${active_radio}/${active_essid}/${active_bssid:-"-"}' - break"
- break 3
- fi
- if [ -z "${scan_list}" ]
+ scan_quality="${spec}"
+ elif [ -z "${scan_bssid}" ]
then
- scan_list="$(f_trim "$("${trm_iwinfo}" "${dev}" scan 2>/dev/null | \
- awk 'BEGIN{FS="[/ ]"}/Address:/{var1=$NF}/ESSID:/{var2="";for(i=12;i<=NF;i++) \
- if(var2==""){var2=$i}else{var2=var2" "$i}}/Quality:/{printf "%i,%s,%s\n",(100/$NF*$(NF-1)),var1,var2}' | \
- sort -rn | awk '{ORS=",";print $0}')")"
- f_log "debug" "f_main ::: scan_list: ${scan_list:0:800}"
- if [ -z "${scan_list}" ]
- then
- f_log "debug" "f_main ::: no scan results on '${dev}' - continue"
- continue 3
- fi
+ scan_bssid="${spec}"
+ elif [ -z "${scan_essid}" ]
+ then
+ scan_essid="${spec}"
fi
- IFS=","
- for scan in ${scan_list}
- do
- if [ -z "${scan_quality}" ]
- then
- scan_quality="${scan}"
- elif [ -z "${scan_bssid}" ]
- then
- scan_bssid="${scan}"
- elif [ -z "${scan_essid}" ]
- then
- scan_essid="${scan}"
- fi
- if [ -n "${scan_quality}" ] && [ -n "${scan_bssid}" ] && [ -n "${scan_essid}" ]
+ if [ -n "${scan_quality}" ] && [ -n "${scan_bssid}" ] && [ -n "${scan_essid}" ]
+ then
+ if [ "${scan_quality}" -ge "${trm_minquality}" ]
then
- if [ ${scan_quality} -ge ${trm_minquality} ]
+ if { { [ "${scan_essid}" = "\"${sta_essid//,/.}\"" ] && { [ -z "${sta_bssid}" ] || [ "${scan_bssid}" = "${sta_bssid}" ]; } } || \
+ { [ "${scan_bssid}" = "${sta_bssid}" ] && [ "${scan_essid}" = "unknown" ]; } } && [ "${dev}" = "${sta_radio}" ]
then
- if (([ "${scan_essid}" = "\"${sta_essid}\"" ] && ([ -z "${sta_bssid}" ] || [ "${scan_bssid}" = "${sta_bssid}" ])) || \
- ([ "${scan_bssid}" = "${sta_bssid}" ] && [ "${scan_essid}" = "unknown" ])) && [ "${dev}" = "${sta_radio}" ]
+ f_log "debug" "f_main ::: scan_quality: ${scan_quality}, scan_essid: ${scan_essid}, scan_bssid: ${scan_bssid:-"-"}"
+ if [ "${dev}" = "${active_radio}" ]
then
- f_log "debug" "f_main ::: scan_quality: ${scan_quality}, sta_bssid: ${sta_bssid}, scan_bssid: ${scan_bssid}, sta_essid: \"${sta_essid}\", scan_essid: ${scan_essid}"
- if [ "${dev}" = "${active_radio}" ] && [ -n "${trm_active_sta}" ]
- then
- uci_set wireless "${trm_active_sta}" disabled 1
- unset trm_connection
- fi
+ unset trm_connection active_radio active_essid active_bssid
+ uci_set wireless "${trm_active_sta}" disabled 1
+ uci_commit wireless
+ fi
+ # retry loop
+ #
+ cnt=1
+ while [ "${cnt}" -le "${trm_maxretry}" ]
+ do
uci_set wireless "${config}" disabled 0
f_check "sta"
if [ "${trm_ifstatus}" = "true" ]
then
+ unset IFS scan_list
uci_commit wireless
- f_check "initial"
- f_log "info" "connected to uplink '${sta_radio}/${sta_essid}/${sta_bssid:-"-"}' (${trm_sysver})"
+ f_log "info" "connected to uplink '${sta_radio}/${sta_essid}/${sta_bssid:-"-"}' (${cnt}/${trm_maxretry}, ${trm_sysver})"
return 0
- elif [ ${cnt} -eq ${trm_maxretry} ]
- then
+ else
uci -q revert wireless
f_check "rev"
- if [ "${dev}" = "${active_radio}" ] && [ -n "${trm_active_sta}" ]
+ if [ "${cnt}" -eq "${trm_maxretry}" ]
then
- f_check "initial"
+ faulty_station="${sta_radio}/${sta_essid}/${sta_bssid:-"-"}"
+ f_jsnup "${faulty_station}"
+ f_log "info" "uplink disabled '${sta_radio}/${sta_essid}/${sta_bssid:-"-"}' (${cnt}/${trm_maxretry}, ${trm_sysver})"
+ break 2
+ else
+ f_jsnup
+ f_log "info" "can't connect to uplink '${sta_radio}/${sta_essid}/${sta_bssid:-"-"}' (${cnt}/${trm_maxretry}, ${trm_sysver})"
fi
- faulty_station="${sta_radio}/${sta_essid}/${sta_bssid:-"-"}"
- f_jsnup "${faulty_station}"
- f_log "info" "uplink disabled '${sta_radio}/${sta_essid}/${sta_bssid:-"-"}' (${trm_sysver})"
- break
- else
- uci -q revert wireless
- f_check "rev"
- f_jsnup
- f_log "info" "can't connect to uplink '${sta_radio}/${sta_essid}/${sta_bssid:-"-"}' (${trm_sysver})"
- unset scan_list
- break
fi
- fi
+ cnt=$((cnt+1))
+ sleep $((trm_maxwait/6))
+ done
+ else
+ unset scan_quality scan_bssid scan_essid
+ continue
fi
+ else
unset scan_quality scan_bssid scan_essid
+ continue
fi
- done
- unset IFS scan_quality scan_bssid scan_essid
+ fi
done
- cnt=$(( cnt + 1 ))
- sleep $(( ${trm_maxwait} / 6 ))
+ unset IFS scan_quality scan_bssid scan_essid
done
unset scan_list
done
f_log "err" "system libraries not found"
fi
-# initialize json runtime file
-#
-json_load_file "${trm_rtfile}" >/dev/null 2>&1
-json_select data >/dev/null 2>&1
-if [ ${?} -ne 0 ]
-then
- > "${trm_rtfile}"
- json_init
- json_add_object "data"
-fi
-
# control travelmate actions
#
+f_envload
while true
do
if [ -z "${trm_action}" ]
then
- sleep ${trm_timeout}
+ rc=0
+ while true
+ do
+ if [ "${rc}" -eq 0 ]
+ then
+ f_check "initial"
+ fi
+ sleep ${trm_timeout} 0
+ rc=${?}
+ if [ "${rc}" -ne 0 ]
+ then
+ f_check "initial"
+ fi
+ if [ "${rc}" -eq 0 ] || { [ "${rc}" -ne 0 ] && [ "${trm_ifstatus}" = "false" ]; }
+ then
+ break
+ fi
+ done
elif [ "${trm_action}" = "stop" ]
then
> "${trm_rtfile}"
f_log "info" "travelmate instance started ::: action: ${trm_action}, pid: ${$}"
unset trm_action
fi
+ json_cleanup
f_envload
f_main
done
--- /dev/null
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=udptunnel
+PKG_VERSION:=1.1
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://www.cs.columbia.edu/~lennox/udptunnel
+PKG_HASH:=45c0e12045735bc55734076ebbdc7622c746d1fe4e6f7267fa122e2421754670
+
+
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=COPYRIGHT
+
+PKG_BUILD_PARALLEL:=1
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/udptunnel
+ SECTION:=net
+ CATEGORY:=Network
+ TITLE:=Tunnel UDP packets over a TCP connection
+ URL:=http://www.cs.columbia.edu/~lennox/udptunnel/
+endef
+
+define Package/udptunnel/description
+ UDPTunnel is a small program which can tunnel UDP packets bi-directionally
+ over a TCP connection. Its primary purpose (and original motivation) is to
+ allow multi-media conferences to traverse a firewall which allows only outgoing
+ TCP connections.
+endef
+
+define Package/udptunnel/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/udptunnel $(1)/usr/bin/
+endef
+
+$(eval $(call BuildPackage,udptunnel))
--- /dev/null
+Description: Fix issue where udptunnel was failing to receive packets sent to a multicast address. (See #254834).
+Author: singh_chinmay@extenprise.net
+
+--- udptunnel-1.1.orig/udptunnel.c
++++ udptunnel-1.1/udptunnel.c
+@@ -217,7 +217,7 @@
+ (*relays)[i].udpaddr.sin_port = htons(udpport + i);
+ (*relays)[i].udpaddr.sin_family = AF_INET;
+ (*relays)[i].udp_ttl = udpttl;
+- (*relays)[i].multicast_udp = IN_MULTICAST(htons(udpaddr.s_addr));
++ (*relays)[i].multicast_udp = IN_MULTICAST(htonl(udpaddr.s_addr));
+
+ (*relays)[i].tcpaddr.sin_addr = tcpaddr;
+ (*relays)[i].tcpaddr.sin_port = htons(tcpport + i);
--- /dev/null
+Description: remove yp host lookup and fix some types
+Author: Jan Delgado <jdelgado@gmx.net>
+
+Index: udptunnel-1.1/host2ip.c
+===================================================================
+--- udptunnel-1.1.orig/host2ip.c
++++ udptunnel-1.1/host2ip.c
+@@ -4,7 +4,6 @@
+ #include <netdb.h> /* gethostbyname() */
+ #include <netinet/in.h> /* sockaddr_in */
+ #include <arpa/inet.h> /* inet_addr() */
+-#include <rpcsvc/ypclnt.h> /* YP */
+ #include <ctype.h> /* isspace() */
+
+ #include "host2ip.h"
+@@ -37,19 +36,9 @@ struct in_addr host2ip(char *host)
+ else if ((hep = gethostbyname(host))) {
+ in = *(struct in_addr *)(hep->h_addr_list[0]);
+ }
+- /* As a last resort, try YP. */
+ else {
+- static char *domain = 0; /* YP domain */
+- char *value; /* key value */
+- int value_len; /* length of returned value */
+-
+- if (!domain) yp_get_default_domain(&domain);
+- if (yp_match(domain, "hosts.byname", host, strlen(host), &value, &value_len) == 0) {
+- in.s_addr = inet_addr(value);
+- } else {
+ /* Everything failed */
+ in.s_addr = INADDR_ANY;
+- }
+ }
+ return in;
+ } /* host2ip */
+Index: udptunnel-1.1/udptunnel.c
+===================================================================
+--- udptunnel-1.1.orig/udptunnel.c
++++ udptunnel-1.1/udptunnel.c
+@@ -423,7 +423,7 @@ static void await_incoming_connections(s
+ for (i = 0; i < relay_count; i++) {
+ if (FD_ISSET(relays[i].tcp_listen_sock, &readfds)) {
+ struct sockaddr_in client_addr;
+- int addrlen = sizeof(client_addr);
++ socklen_t addrlen = sizeof(client_addr);
+
+ if ((relays[i].tcp_sock =
+ accept(relays[i].tcp_listen_sock,
+@@ -478,7 +478,7 @@ static int udp_to_tcp(struct relay *rela
+ struct out_packet p;
+ int buflen;
+ struct sockaddr_in remote_udpaddr;
+- int addrlen = sizeof(remote_udpaddr);
++ socklen_t addrlen = sizeof(remote_udpaddr);
+
+ if ((buflen = recvfrom(relay->udp_recv_sock, p.buf, UDPBUFFERSIZE, 0,
+ (struct sockaddr *) &remote_udpaddr,
+@@ -555,7 +555,8 @@ static int tcp_to_udp(struct relay *rela
+ /* There isn't a UDP listener waiting on the other end, but
+ * that's okay, it's probably just not up at the moment or something.
+ * Use getsockopt(SO_ERROR) to clear the error state. */
+- int err, len = sizeof(err);
++ int err;
++ socklen_t len = sizeof(err);
+
+ if (debug > 1) {
+ fprintf(stderr, "ECONNREFUSED on udp_send_sock; clearing.\n");
include $(TOPDIR)/rules.mk
PKG_NAME:=unbound
-PKG_VERSION:=1.9.0
+PKG_VERSION:=1.9.2
PKG_RELEASE:=1
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://nlnetlabs.nl/downloads/unbound
+PKG_HASH:=6f7acec5cf451277fcda31729886ae7dd62537c4f506855603e3aa153fcb6b95
+
+PKG_MAINTAINER:=Eric Luehrsen <ericluehrsen@gmail.com>
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
-PKG_MAINTAINER:=Eric Luehrsen <ericluehrsen@gmail.com>
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://www.unbound.net/downloads
-PKG_HASH:=415af94b8392bc6b2c52e44ac8f17935cc6ddf2cc81edfb47c5be4ad205ab917
+PKG_CPE_ID:=cpe:/a:nlnetlabs:unbound
PKG_BUILD_PARALLEL:=1
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
define Package/unbound/Default
- TITLE:=Validating Recursive DNS Server
- URL:=http://www.unbound.net/
- DEPENDS:=+libopenssl
-endef
-
-define Package/unbound
- $(call Package/unbound/Default)
SECTION:=net
CATEGORY:=Network
SUBMENU:=IP Addresses and Names
USERID:=unbound:unbound
- TITLE+= (daemon)
+ TITLE:=Recursive DNS Server
+ URL:=https://nlnetlabs.nl/projects/unbound/about
+ DEPENDS:=+libopenssl +@OPENSSL_WITH_EC
+endef
+
+define Package/unbound-daemon
+ $(call Package/unbound/Default)
+ TITLE+= (daemon, light traffic)
DEPENDS+= +libunbound
+ VARIANT:=light
+endef
+
+define Package/unbound-daemon/description
+ This package contains the Unbound daemon with basic includes
+ necessary to meet the needs of UCI/LuCI configuration optoins.
+endef
+
+define Package/unbound-daemon-heavy
+ $(call Package/unbound/Default)
+ TITLE+= (daemon, heavy traffic)
+ URL:=https://nlnetlabs.nl/documentation/unbound/howto-optimise
+ DEPENDS+= +libunbound-heavy +libpthread +libevent2 +libevent2-pthreads
+ VARIANT:=heavy
+ PROVIDES:=unbound-daemon
+endef
+
+define Package/unbound-daemon-heavy/description
+ This package contains the Unbound daemon including 'libevent' and
+ 'libpthread' to better handle large networks with heavy query loads.
+endef
+
+define Package/libunbound
+ $(call Package/unbound/Default)
+ SECTION:=libs
+ CATEGORY:=Libraries
+ SUBMENU:=Networking
+ TITLE+= (library, light traffic)
+ VARIANT:=light
+ DEFAULT_VARIANT:=1
+endef
+
+define Package/libunbound/description
+ This package contains the Unbound shared library with basic includes
+ necessary to meet the needs of UCI/LuCI configuration optoins.
+endef
+
+define Package/libunbound-heavy
+ $(call Package/unbound/Default)
+ SECTION:=libs
+ CATEGORY:=Libraries
+ SUBMENU:=Networking
+ TITLE+= (library, heavy traffic)
+ URL:=https://nlnetlabs.nl/documentation/unbound/howto-optimise
+ DEPENDS+= +libpthread +libevent2 +libevent2-pthreads
+ VARIANT:=heavy
+ PROVIDES:=libunbound
endef
-define Package/unbound/description
- This package contains the Unbound daemon.
+define Package/libunbound-heavy/description
+ This package contains the Unbound shared library including 'libevent' and
+ 'libpthread' to better handle large networks with heavy query loads.
endef
define Package/unbound-anchor
$(call Package/unbound/Default)
- SECTION:=net
- CATEGORY:=Network
- SUBMENU:=IP Addresses and Names
- TITLE+= (DSKEY utility)
- DEPENDS+= +unbound +libexpat
+ TITLE+= (root DSKEY)
+ DEPENDS+= +unbound-daemon +libexpat
endef
define Package/unbound-anchor/description
This package contains the Unbound anchor utility.
endef
+define Package/unbound-checkconf
+ $(call Package/unbound/Default)
+ TITLE+= (config checker)
+ DEPENDS+= +unbound-daemon
+endef
+
+define Package/unbound-checkconf/description
+ This package contains the Unbound DNS configuration checker utility.
+endef
+
define Package/unbound-control
$(call Package/unbound/Default)
- SECTION:=net
- CATEGORY:=Network
- SUBMENU:=IP Addresses and Names
- TITLE+= (control utility)
- DEPENDS+= +unbound
+ TITLE+= (remote control)
+ DEPENDS+= +unbound-daemon
endef
define Package/unbound-control/description
define Package/unbound-control-setup
$(call Package/unbound/Default)
- SECTION:=net
- CATEGORY:=Network
- SUBMENU:=IP Addresses and Names
TITLE+= (control setup)
DEPENDS+= +unbound-control +openssl-util
endef
define Package/unbound-host
$(call Package/unbound/Default)
- SECTION:=net
- CATEGORY:=Network
- SUBMENU:=IP Addresses and Names
- TITLE+= (lookup utility)
+ TITLE+= (DNS lookup)
DEPENDS+= +libunbound
endef
This package contains the Unbound DNS lookup utility.
endef
-define Package/libunbound
- $(call Package/unbound/Default)
- SECTION:=libs
- CATEGORY:=Libraries
- TITLE+= (library)
- DEPENDS+= +libpthread
-endef
-
-define Package/libunbound/description
- This package contains the Unbound shared library.
-endef
-
CONFIGURE_ARGS += \
--disable-dsa \
--disable-gost \
--enable-allsymbols \
+ --enable-ecdsa \
--enable-tfo-client \
--enable-tfo-server \
--with-libexpat="$(STAGING_DIR)/usr" \
--with-conf-file=/var/lib/unbound/unbound.conf \
--with-pidfile=/var/run/unbound.pid
-define Package/unbound/conffiles
+ifeq ($(BUILD_VARIANT),heavy)
+ CONFIGURE_ARGS += \
+ --with-pthreads \
+ --with-libevent="$(STAGING_DIR)/usr" \
+ --enable-event-api
+else
+ CONFIGURE_ARGS += \
+ --without-pthreads \
+ --without-solaris-threads \
+ --without-libevent
+endif
+
+define Package/unbound-daemon/conffiles
/etc/config/unbound
/etc/unbound/unbound.conf
/etc/unbound/unbound_ext.conf
/etc/unbound/unbound_srv.conf
endef
+Package/unbound-daemon-heavy/conffiles = $(Package/unbound-daemon/conffiles)
+
define Build/InstallDev
- $(INSTALL_DIR) $(1)/usr/include
- $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/unbound.h $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libunbound.{so*,a,la} $(1)/usr/lib/
+ $(INSTALL_DIR) $(1)/usr/include
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/unbound.h $(1)/usr/include/
+ifeq ($(BUILD_VARIANT),heavy)
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/unbound-event.h $(1)/usr/include/
+endif
endef
-define Package/unbound/install
+define Package/unbound-daemon/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) \
- $(PKG_INSTALL_DIR)/usr/sbin/unbound \
- $(PKG_INSTALL_DIR)/usr/sbin/unbound-checkconf \
- $(1)/usr/sbin/
+ $(PKG_INSTALL_DIR)/usr/sbin/unbound $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/etc/unbound
$(INSTALL_DATA) \
$(PKG_INSTALL_DIR)/var/lib/unbound/unbound.conf \
$(INSTALL_DATA) ./files/unbound.sh $(1)/usr/lib/unbound/unbound.sh
endef
+Package/unbound-daemon-heavy/install = $(Package/unbound-daemon/install)
+
+define Package/libunbound/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libunbound.so.* $(1)/usr/lib/
+endef
+
+Package/libunbound-heavy/install = $(Package/libunbound/install)
+
define Package/unbound-anchor/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/unbound-anchor $(1)/usr/sbin/
endef
+define Package/unbound-checkconf/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/unbound-checkconf $(1)/usr/sbin/
+endef
+
define Package/unbound-control/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/unbound-control $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/unbound-host $(1)/usr/sbin/
endef
-define Package/libunbound/install
- $(INSTALL_DIR) $(1)/usr/lib
- $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libunbound.so.* $(1)/usr/lib/
-endef
-
-$(eval $(call BuildPackage,unbound))
+$(eval $(call BuildPackage,unbound-daemon))
+$(eval $(call BuildPackage,unbound-daemon-heavy))
+$(eval $(call BuildPackage,libunbound))
+$(eval $(call BuildPackage,libunbound-heavy))
$(eval $(call BuildPackage,unbound-anchor))
+$(eval $(call BuildPackage,unbound-checkconf))
$(eval $(call BuildPackage,unbound-control))
$(eval $(call BuildPackage,unbound-control-setup))
$(eval $(call BuildPackage,unbound-host))
-$(eval $(call BuildPackage,libunbound))
## HOW TO: TLS Over DNS
Unbound can use TLS as a client or server. UCI supports Unbound as a forwarding client with TLS. Servers are more complex and need manual configuration. This may be desired for privacy against stealth tracking. Some public DNS servers seem to advertise help in this quest. If your looking for a better understanding, then some information can be found at [Cloudflare](https://www.cloudflare.com/) DNS [1.1.1.1](https://1.1.1.1/). The following is a generic example. You can mix providers by using complete server specificaiton to override the zones common port and certificate domain index.
-**NOTICE:** Unbound requires openssl-1.1.0 to verify host certificates. OpenWrt at present is configured with openssl-1.0.2. Connections will be over TLS, but theoretically, certificates may not be from a trusted source. See report [Unbound #658](https://www.nlnetlabs.nl/bugs-script/show_bug.cgi?id=658). When this is resolved, it will be recommended again to install `ca-bundle`, maintain it, and be sure to include the TLS certificate domain index with the host addresses.
+Update as of Unbound 1.9.1, all TLS functions work correctly with either OpenSSL 1.0.2 or 1.1.0. Please be sure to install `ca-bundle` package and use `opkg` to get updates regularly.
**/etc/config/unbound**:
```
4 - Above and interfaces named <iface>.<hostname>.<domain>
option add_wan_fqdn '0'
- Level. Same as previous option only this applies to the WAN. WAN
- are inferred by a UCI `config dhcp` entry that contains the line
- option ignore '1'.
+ Level. Same as previous option only this applies to the WAN. WAN are
+ inferred by a UCI `config dhcp` entry that contains the 'option ignore 1'.
option dns64 '0'
- Boolean. Enable DNS64 through Unbound in order to bridge networks
- that are IPV6 only and IPV4 only (see RFC6052).
+ Boolean. Enable DNS64 through Unbound in order to bridge networks that are
+ IPV6 only and IPV4 only (see RFC6052).
option dns64_prefix '64:ff9b::/96'
- IPV6 Prefix. The IPV6 prefix wrapped on the IPV4 address for DNS64.
- You should use RFC6052 "well known" address, unless you also
- redirect to a proxy or gateway for your NAT64.
+ IPV6 Prefix. The IPV6 prefix wrapped on the IPV4 address for DNS64. You
+ should use RFC6052 "well known" address, unless you also redirect to a proxy
+ or gateway for your NAT64.
option dhcp_link 'none'
Program Name. Link to one of the supported programs we have scripts
Boolean. Skip all this UCI nonsense. Manually edit the
configuration. Make changes to /etc/unbound/unbound.conf.
+ option num_threads '1'
+ Count. Enable multithreading with the "heavy traffic" variant. Base variant
+ spins each as whole proces and is not efficient. Two threads may be used,
+ but they use one shared cache slab. More edges into an industrial setup,
+ and UCI simplificaitons may not be appropriate.
+
option protocol 'mixed'
Unbound can limit its protocol used for recursive queries.
ip4_only - old fashioned IPv4 upstream and downstream
default - Unbound built-in defaults
option query_minimize '0'
- Boolean. Enable a minor privacy option. Don't let each server know
- the next recursion. Query one piece at a time.
+ Boolean. Enable a minor privacy option. Don't let each server know the next
+ recursion. Query one piece at a time.
option query_min_strict '0'
- Boolean. Query minimize is best effort and will fall back to normal
- when it must. This option prevents the fall back, but less than
- standard name servers will fail to resolve their domains.
+ Boolean. Query minimize is best effort and will fall back to normal when it
+ must. This option prevents the fall back, but less than standard name
+ servers will fail to resolve their domains.
option rebind_localhost '0'
- Boolean. Prevent loopback "127.0.0.0/8" or "::1/128" responses.
- These may used by black hole servers for good purposes like
- ad-blocking or parental access control. Obviously these responses
- also can be used to for bad purposes.
+ Boolean. Prevent loopback "127.0.0.0/8" or "::1/128" responses. These may
+ used by black hole servers for good purposes like ad-blocking or parental
+ access control. Obviously these responses may be used to for bad purposes.
option rebind_protection '1'
Level. Block your local address responses from global DNS. A poisoned
large - about double of medium
option root_age '9'
- Days. >90 Disables. Age limit for Unbound root data like root
- DNSSEC key. Unbound uses RFC 5011 to manage root key. This could
- harm flash ROM. This activity is mapped to "tmpfs," but every so
- often it needs to be copied back to flash for the next reboot.
+ Days. >90 Disables. Age limit for Unbound root data like root DNSSEC key.
+ Unbound uses RFC 5011 to manage root key. This could harm flash ROM. This
+ activity is mapped to "tmpfs," but every so often it needs to be copied back
+ to flash for the next reboot.
option ttl_min '120'
- Seconds. Minimum TTL in cache. Recursion can be expensive without
- cache. A low TTL is normal for server migration. A low TTL can be
- abused for snoop-vertising (DNS hit counts; recording query IP).
- Typical to configure maybe 0~300, but 1800 is the maximum accepted.
+ Seconds. Minimum TTL in cache. Recursion can be expensive without cache. A
+ low TTL is normal for server migration. A low TTL can be abused for snoop-
+ vertising (DNS hit counts; recording query IP). Typical to configure maybe
+ 0~300, but 1800 is the maximum accepted.
option unbound_control '0'
Level. Enables unbound-control application access ports.
Boolean. Enable DNSSEC. Unbound names this the "validator" module.
option validator_ntp '1'
- Boolean. Disable DNSSEC time checks at boot. Once NTP confirms
- global real time, then DNSSEC is restarted at full strength. Many
- embedded devices don't have a real time power off clock. NTP needs
- DNS to resolve servers. This works around the chicken-and-egg.
+ Boolean. Disable DNSSEC time checks at boot. Once NTP confirms global real
+ time, then DNSSEC is restarted at full strength. Many embedded devices don't
+ have a real time power off clock. NTP needs DNS to resolve servers. This
+ works around the chicken-and-egg.
option verbosity '1'
Level. Sets Unbounds logging intensity.
list trigger_interface 'lan' 'wan'
Interface (logical). This option is a work around for netifd/procd
- interaction with WAN DHCPv6. Minor RA or DHCP changes in IP6 can
- cause netifd to execute procd interface reload. Limit Unbound procd
- triggers to LAN and WAN (IP4 only) to prevent restart @2-3 minutes.
+ interaction with WAN DHCPv6. Minor RA or DHCP changes in IP6 can cause
+ netifd to execute procd interface reload. Limit Unbound procd triggers to
+ LAN and WAN (IP4 only) to prevent restart @2-3 minutes.
config zone
Boolean. Enable the zone clause.
option fallback 1
- Boolean. Permit normal recursion when the narrowly selected servers
- in this zone are unresponsive or return empty responses. Disable, if
- there are security concerns (forward only internal to organization).
+ Boolean. Permit normal recursion when the narrowly selected servers in this
+ zone are unresponsive or return empty responses. Disable, if there are
+ security concerns (forward only internal to organization).
option port 53
Port. Servers are contact on this port for plain DNS operations.
option resolv_conf 0
- Boolean. Use "resolv.conf" as it was filled by the DHCP client. This
- can be used to forward zones within your ISP (mail.example.net) or that
- have co-located services (streamed-movies.example.com). Recursion may
- not yield the most local result, but forwarding may instead.
+ Boolean. Use "resolv.conf" as it was filled by the DHCP client. This can be
+ used to forward zones within your ISP (mail.example.net) or that have co-
+ located services (streamed-movies.example.com). Recursion may not yield the
+ most local result, but forwarding may instead.
option tls_index (n/a)
Domain. Name TLS certificates are signed for (dns.example.net). If this
- option is ommitted, then Unbound will make the connection but not
- validate it.
+ option is ommitted, then Unbound will make connections but not validate.
option tls_port 853
Port. Servers are contact on this port for DNS over TLS operations.
auth_zone type only. Files "${zone_name}.zone" are expect in this path.
option zone_type (n/a)
- State. Required field or the clause is effectively disabled. Check
- Unbound documentation for clarity (unbound-conf).
+ State. Required field or the clause is effectively disabled. Check Unbound
+ documentation for clarity (unbound-conf).
auth_zone - prefetch whole zones from authoritative server (ICANN)
forward_zone - forward queries in these domains to the listed servers
stub_zone - force recursion of these domains to the listed servers
list server (n/a)
- IP. Every zone must have one server. Stub and forward require IP to
- prevent chicken and egg (due to UCI simplicity). Authoritative prefetch
- may use a server name.
+ IP. Every zone must have one server. Stub and forward require IP to prevent
+ chicken and egg (due to UCI simplicity). Authoritative prefetch may use a
+ server name.
list zone_name
- Domain. Every zone must represent some part of the DNS tree. It can be
- all of it "." or you internal organization domain "example.com." Within
- each zone clause all zone names will be matched to all servers.
+ Domain. Every zone must represent some part of the DNS tree. It can be all
+ of it "." or you internal organization domain "example.com." Within each
+ zone clause all zone names will be matched to all servers.
```
## Replaced Options
config unbound / option prefetch_root
- List the domains in a zone with type auth_zone and fill in the server
- or url fields. Root zones are ready but disabled in default install UCI.
+ List the domains in a zone with type auth_zone and fill in the server or url
+ fields. Root zones are ready but disabled in default install UCI.
config unbound / list domain_forward
List the domains in a zone with type forward_zone and enable the
resolv_conf option.
config unbound / list rebind_interface
- Enable rebind_protection at 2 and all DHCP interfaces are also
- protected for IPV6 GLA (parallel to subnets in add_local_fqdn).
+ Enable rebind_protection at 2 and all DHCP interfaces are also protected for
+ IPV6 GLA (parallel to subnets in add_local_fqdn).
config_get name "$cfg" name
- if [ -n "$name" -a -n "$ip" ] ; then
+ if [ -n "$name" ] && [ -n "$ip" ] ; then
create_local_zone "$name"
case $ip in
fe[89ab][0-9a-f]:*|169.254.*)
- debug_ip="$ip@$host"
+ debug_ip="$ip@$name"
;;
[1-9a-f]*:*[0-9a-f])
config_get pref "$cfg" pref 10
- if [ -n "$domain" -a -n "$relay" ] ; then
+ if [ -n "$domain" ] && [ -n "$relay" ] ; then
create_local_zone "$domain"
record="$domain.@@300@@IN@@MX@@$pref@@$relay."
DM_LIST_LOCAL_DATA="$DM_LIST_LOCAL_DATA $record"
config_get weight "$cfg" weight 10
- if [ -n "$srv" -a -n "$target" -a -n "$port" ] ; then
+ if [ -n "$srv" ] && [ -n "$target" ] && [ -n "$port" ] ; then
create_local_zone "$srv"
record="$srv.@@300@@IN@@SRV@@$class@@$weight@@$port@@$target."
DM_LIST_LOCAL_DATA="$DM_LIST_LOCAL_DATA $record"
config_get target "$cfg" target
- if [ -n "$cname" -a -n "$target" ] ; then
+ if [ -n "$cname" ] && [ -n "$target" ] ; then
create_local_zone "$cname"
record="$cname.@@300@@IN@@CNAME@@$target."
DM_LIST_LOCAL_DATA="$DM_LIST_LOCAL_DATA $record"
fi
- if [ -n "$fwd_domain" -a -n "$fwd_port" -a ! "${fwd_port:-53}" -eq 53 ] ; then
+ if [ -n "$fwd_domain" ] && [ -n "$fwd_port" ] \
+ && [ ! "${fwd_port:-53}" -eq 53 ] ; then
# dnsmasq localhost listening ports (possible multiple instances)
DM_LIST_FWD_PORTS="$DM_LIST_FWD_PORTS $fwd_port"
DM_LIST_FWD_ZONES="$DM_LIST_FWD_ZONES $fwd_domain"
fi
- if [ -n "$UB_LIST_NETW_WAN" -a "$DM_D_WAN_FQDN" -gt 0 ] ; then
+ if [ -n "$UB_LIST_NETW_WAN" ] && [ "$DM_D_WAN_FQDN" -gt 0 ] ; then
for ifsubnet in $UB_LIST_NETW_WAN ; do
ifarpa=$( domain_ptr_any "${ifsubnet#*@}" )
DM_LIST_FWD_ZONES="$DM_LIST_FWD_ZONES $ifarpa"
dnsmasq_local_arpa
- if [ -n "$DM_LIST_FWD_PORTS" -a -n "$DM_LIST_FWD_ZONES" ] ; then
+ if [ -n "$DM_LIST_FWD_PORTS" ] && [ -n "$DM_LIST_FWD_ZONES" ] ; then
{
# Forward to dnsmasq on same host for DHCP lease hosts
echo "# $UB_SRVMASQ_CONF generated by UCI $( date -Is )"
local validip6=$( valid_subnet6 $subnet )
- if [ "$validip4" = "ok" -o "$validip6" = "ok" ] ; then
+ if [ "$validip4" = "ok" ] || [ "$validip6" = "ok" ] ; then
echo "ok"
else
echo "not"
sub( /.*\//, "", cdr ) ;
sub( /\/.*/, "", adr2 ) ;
sub( /.*\//, "", cdr2 ) ;
+ gsub( /_/, "-", hst ) ;
if ( hst !~ /^[[:alnum:]]([-[:alnum:]]*[[:alnum:]])?$/ ) {
# that is not a valid host name (RFC1123)
+ # above replaced common error of "_" in host name with "-"
hst = "-" ;
}
# TODO: this might be better with a substituion option,
# or per DHCP pool do-not-DNS option, but its getting busy here.
fqdn = net
- fqdn = sub( /\./, "-", fqdn ) ;
+ gsub( /\./, "-", fqdn ) ;
fqdn = tolower( hst "." fqdn "." domain ) ;
}
while ( ( cmd | getline adr ) > 0 ) {
if (( substr( adr, 1, 5 ) <= "fdff:" ) \
+ && ( index( adr, "::/" ) != 0 ) \
&& ( index( adr, "anycast" ) == 0 ) \
&& ( index( adr, "via" ) == 0 )) {
# GA or ULA routed addresses only (not LL or MC)
local dhcp_origin=$( uci_get dhcp.@odhcpd[0].leasefile )
- if [ -f "$UB_TOTAL_CONF" -a -f "$dhcp_origin" \
- -a "$dhcp_link" = "odhcpd" -a -n "$dhcp_domain" ] ; then
+ if [ -f "$UB_TOTAL_CONF" ] && [ -f "$dhcp_origin" ] \
+ && [ "$dhcp_link" = "odhcpd" ] && [ -n "$dhcp_domain" ] ; then
local longconf dateconf
local dns_ls_add=$UB_VARDIR/dhcp_dns.add
local dns_ls_del=$UB_VARDIR/dhcp_dns.del
sort $dhcp_origin > $dhcp_ls_new
- if [ ! -f $UB_DHCP_CONF -o ! -f $dns_ls_old ] ; then
+ if [ ! -f $UB_DHCP_CONF ] || [ ! -f $dns_ls_old ] ; then
# no old files laying around
longconf=freshstart
[ -z "$dnssec_age" ] && dnssec_age=9
- if [ "$dnssec_age" -gt 90 -o "$dnssec" -lt 1 ] ; then
+ if [ "$dnssec_age" -gt 90 ] || [ "$dnssec" -lt 1 ] ; then
# Feature disabled
return 0
- elif [ "$dnssec_ntp" -gt 0 -a ! -f "$UB_TIME_FILE" ] ; then
+ elif [ "$dnssec_ntp" -gt 0 ] && [ ! -f "$UB_TIME_FILE" ] ; then
# We don't have time yet
return 0
fi
. /usr/lib/unbound/defaults.sh
- if [ ! -f "$UB_TOTAL_CONF" -o -n "$UB_BOOT" ] ; then
- # Unbound is can be a bit heavy, so wait some on first start but any
- # interface coming up affects the trigger and delay so guarantee start
+ if [ ! -f "$UB_TOTAL_CONF" ] || [ -n "$UB_BOOT" ] ; then
+ # Unbound can be a bit heavy, so wait some on first start. Any interface
+ # up affects the trigger delay and will guarantee start.
procd_add_raw_trigger "interface.*.up" 3000 /etc/init.d/unbound restart
elif [ -n "$triggers" ] ; then
UB_N_EDNS_SIZE=1280
UB_N_RX_PORT=53
UB_N_ROOT_AGE=9
+UB_N_THREADS=1
UB_TTL_MIN=120
UB_TXT_DOMAIN=lan
bundle_lan_networks() {
local cfg="$1"
- local ifsubnet ifname ifdashname ignore
+ local interface ifsubnet ifname ifdashname ignore
config_get_bool ignore "$cfg" ignore 0
- network_get_device ifname "$cfg"
+ config_get interface "$cfg" interface ""
+ network_get_device ifname "$interface"
ifdashname="${ifname//./-}"
- if [ "$ignore" -eq 0 -a -n "$ifdashname" -a -n "$UB_LIST_NETW_ALL" ] ; then
+ if [ "$ignore" -eq 0 ] && [ -n "$ifdashname" ] \
+ && [ -n "$UB_LIST_NETW_ALL" ] ; then
for ifsubnet in $UB_LIST_NETW_ALL ; do
case $ifsubnet in
"${ifdashname}"@*)
chmod 644 $UB_VARDIR/*
- if [ -f $UB_CTLKEY_FILE -o -f $UB_CTLPEM_FILE \
- -o -f $UB_SRVKEY_FILE -o -f $UB_SRVPEM_FILE ] ; then
+ if [ -f $UB_CTLKEY_FILE ] || [ -f $UB_CTLPEM_FILE ] \
+ || [ -f $UB_SRVKEY_FILE ] || [ -f $UB_SRVPEM_FILE ] ; then
# Keys (some) exist already; do not create new ones
chmod 640 $UB_CTLKEY_FILE $UB_CTLPEM_FILE \
$UB_SRVKEY_FILE $UB_SRVPEM_FILE
if [ "$UB_D_CONTROL" -gt 1 ] ; then
- if [ ! -f $UB_CTLKEY_FILE -o ! -f $UB_CTLPEM_FILE \
- -o ! -f $UB_SRVKEY_FILE -o ! -f $UB_SRVPEM_FILE ] ; then
+ if [ ! -f $UB_CTLKEY_FILE ] || [ ! -f $UB_CTLPEM_FILE ] \
+ || [ ! -f $UB_SRVKEY_FILE ] || [ ! -f $UB_SRVPEM_FILE ] ; then
# Key files need to be present; if unbound-control-setup was found, then
# they might have been made during unbound_makedir() above.
UB_D_CONTROL=0
case $zone_type in
auth_zone)
- if [ "$UB_B_NTP_BOOT" -eq 0 -a -n "$UB_LIST_ZONE_NAMES" \
- -a \( -n "$url_dir" -o -n "$UB_LIST_ZONE_SERVERS" \) ] ; then
+ if [ "$UB_B_NTP_BOOT" -eq 0 ] && [ -n "$UB_LIST_ZONE_NAMES" ] \
+ && { [ -n "$url_dir" ] || [ -n "$UB_LIST_ZONE_SERVERS" ] ; } ; then
# Note AXFR may have large downloads. If NTP restart is configured,
# then this can cause procd to force a process kill.
for zone_name in $UB_LIST_ZONE_NAMES ; do
;;
forward_zone)
- if [ ! -f $UB_TLS_FWD_FILE -a "$tls_upstream" = "yes" ] ; then
+ if [ ! -f $UB_TLS_FWD_FILE ] && [ "$tls_upstream" = "yes" ] ; then
logger -p 4 -t unbound -s \
"Forward-zone TLS benefits from authentication in package 'ca-bundle'"
fi
- if [ -n "$UB_LIST_ZONE_NAMES" -a -n "$UB_LIST_ZONE_SERVERS" ] ; then
+ if [ -n "$UB_LIST_ZONE_NAMES" ] && [ -n "$UB_LIST_ZONE_SERVERS" ] ; then
for server in $UB_LIST_ZONE_SERVERS ; do
if [ "$( valid_subnet_any $server )" = "not" ] ; then
case $server in
;;
stub_zone)
- if [ -n "$UB_LIST_ZONE_NAMES" -a -n "$UB_LIST_ZONE_SERVERS" ] ; then
+ if [ -n "$UB_LIST_ZONE_NAMES" ] && [ -n "$UB_LIST_ZONE_SERVERS" ] ; then
for zonename in $UB_LIST_ZONE_NAMES ; do
{
# generate a stub-zone: or ensure short cut to authority NS
##############################################################################
unbound_conf() {
- local rt_mem rt_conn rt_buff modulestring domain ifsubnet nsubnet
+ local rt_mem rt_conn rt_buff modulestring domain ifsubnet
{
# server: for this whole function
fi
- if [ "$UB_B_DNSSEC" -gt 0 -a -f "$UB_RKEY_FILE" ] ; then
+ if [ "$UB_B_DNSSEC" -gt 0 ] && [ -f "$UB_RKEY_FILE" ] ; then
{
echo " auto-trust-anchor-file: $UB_RKEY_FILE"
echo
fi
+ if [ "$UB_N_THREADS" -gt 1 ] \
+ && $PROG -h | grep -q "linked libs:.*libevent" ; then
+ # heavy variant using "threads" may need substantial resources
+ echo " num-threads: 2" >> $UB_CORE_CONF
+ else
+ # light variant with one "process" is much more efficient with light traffic
+ echo " num-threads: 1" >> $UB_CORE_CONF
+ fi
+
+
{
- # No threading
- echo " num-threads: 1"
+ # Limited threading (2) with one shared slab
echo " msg-cache-slabs: 1"
echo " rrset-cache-slabs: 1"
echo " infra-cache-slabs: 1"
} >> $UB_CORE_CONF
- if [ "$UB_D_VERBOSE" -ge 0 -a "$UB_D_VERBOSE" -le 5 ] ; then
+ if [ "$UB_D_VERBOSE" -ge 0 ] && [ "$UB_D_VERBOSE" -le 5 ] ; then
echo " verbosity: $UB_D_VERBOSE" >> $UB_CORE_CONF
fi
passive)
{
# Some query privacy but "strict" will break some servers
- if [ "$UB_B_QRY_MINST" -gt 0 \
- -a "$UB_B_QUERY_MIN" -gt 0 ] ; then
+ if [ "$UB_B_QRY_MINST" -gt 0 ] && [ "$UB_B_QUERY_MIN" -gt 0 ] ; then
echo " qname-minimisation: yes"
echo " qname-minimisation-strict: yes"
elif [ "$UB_B_QUERY_MIN" -gt 0 ] ; then
aggressive)
{
# Some query privacy but "strict" will break some servers
- if [ "$UB_B_QRY_MINST" -gt 0 \
- -a "$UB_B_QUERY_MIN" -gt 0 ] ; then
+ if [ "$UB_B_QRY_MINST" -gt 0 ] && [ "$UB_B_QUERY_MIN" -gt 0 ] ; then
echo " qname-minimisation: yes"
echo " qname-minimisation-strict: yes"
elif [ "$UB_B_QUERY_MIN" -gt 0 ] ; then
fi
- if [ -n "$UB_LIST_NETW_LAN" -a "$UB_D_PRIV_BLCK" -gt 1 ] ; then
+ if [ -n "$UB_LIST_NETW_LAN" ] && [ "$UB_D_PRIV_BLCK" -gt 1 ] ; then
{
for ifsubnet in $UB_LIST_NETW_LAN ; do
case $ifsubnet in
fi
- if [ "$UB_B_LOCL_SERV" -gt 0 -a -n "$UB_LIST_NETW_ALL" ] ; then
+ if [ "$UB_B_LOCL_SERV" -gt 0 ] && [ -n "$UB_LIST_NETW_ALL" ] ; then
{
for ifsubnet in $UB_LIST_NETW_ALL ; do
# Only respond to queries from subnets which have an interface.
echo
} >> $UB_HOST_CONF
- elif [ -n "$UB_TXT_DOMAIN" \
- -a \( "$UB_D_WAN_FQDN" -gt 0 -o "$UB_D_LAN_FQDN" -gt 0 \) ] ; then
+ elif [ -n "$UB_TXT_DOMAIN" ] \
+ && { [ "$UB_D_WAN_FQDN" -gt 0 ] || [ "$UB_D_LAN_FQDN" -gt 0 ] ; } ; then
case "$UB_D_DOMAIN_TYPE" in
deny|inform_deny|refuse|static)
{
echo " local-data: \"$UB_TXT_DOMAIN. $UB_XNS\""
echo " local-data: '$UB_TXT_DOMAIN. $UB_XTXT'"
echo
- # avoid upstream involvement in RFC6762
- echo " domain-insecure: local"
- echo " private-domain: local"
- echo " local-zone: local $UB_D_DOMAIN_TYPE"
- echo " local-data: \"local. $UB_XSOA\""
- echo " local-data: \"local. $UB_XNS\""
- echo " local-data: 'local. $UB_LTXT'"
- echo
+ if [ "$UB_TXT_DOMAIN" != "local" ] ; then
+ # avoid involvement in RFC6762, unless it is the local zone name
+ echo " local-zone: local always_nxdomain"
+ echo
+ fi
} >> $UB_HOST_CONF
zonetype=2
;;
- transparent|typetransparent)
+ inform|transparent|typetransparent)
{
# transparent will permit forward-zone: or stub-zone: clauses
echo " private-domain: $UB_TXT_DOMAIN"
echo
} >> $UB_HOST_CONF
- elif [ "$zonetype" -eq 1 -a "$UB_D_PRIV_BLCK" -eq 0 ] ; then
+ elif [ "$zonetype" -eq 1 ] && [ "$UB_D_PRIV_BLCK" -eq 0 ] ; then
{
echo " local-zone: $ifarpa transparent"
echo
fi
- if [ "$UB_LIST_NETW_LAN" -a "$UB_D_LAN_FQDN" -gt 0 ] ; then
+ if [ "$UB_LIST_NETW_LAN" ] && [ "$UB_D_LAN_FQDN" -gt 0 ] ; then
for ifsubnet in $UB_LIST_NETW_LAN ; do
ifaddr=${ifsubnet#*@}
ifaddr=${ifaddr%/*}
fi
- if [ -n "$UB_LIST_NETW_WAN" -a "$UB_D_WAN_FQDN" -gt 0 ] ; then
+ if [ -n "$UB_LIST_NETW_WAN" ] && [ "$UB_D_WAN_FQDN" -gt 0 ] ; then
for ifsubnet in $UB_LIST_NETW_WAN ; do
ifaddr=${ifsubnet#*@}
ifaddr=${ifaddr%/*}
unbound_uci() {
local cfg="$1"
- local dnsmasqpath hostnm
+ local hostnm
hostnm=$( uci_get system.@system[0].hostname | awk '{print tolower($0)}' )
UB_TXT_HOSTNAME=${hostnm:-thisrouter}
config_get UB_N_EDNS_SIZE "$cfg" edns_size 1280
config_get UB_N_RX_PORT "$cfg" listen_port 53
config_get UB_N_ROOT_AGE "$cfg" root_age 9
+ config_get UB_N_THREADS "$cfg" num_threads 1
config_get UB_D_CONTROL "$cfg" unbound_control 0
config_get UB_D_DOMAIN_TYPE "$cfg" domain_type static
if [ "$UB_D_DHCP_LINK" = "dnsmasq" ] ; then
- if [ ! -x /usr/sbin/dnsmasq -o ! -x /etc/init.d/dnsmasq ] ; then
+ if [ ! -x /usr/sbin/dnsmasq ] || [ ! -x /etc/init.d/dnsmasq ] ; then
UB_D_DHCP_LINK=none
else
/etc/init.d/dnsmasq enabled || UB_D_DHCP_LINK=none
fi
- if [ "$UB_B_READY" -eq 0 -a "$UB_D_DHCP_LINK" = "none" ] ; then
+ if [ "$UB_B_READY" -eq 0 ] && [ "$UB_D_DHCP_LINK" = "none" ] ; then
logger -t unbound -s "cannot forward to dnsmasq"
fi
fi
if [ "$UB_D_DHCP_LINK" = "odhcpd" ] ; then
- if [ ! -x /usr/sbin/odhcpd -o ! -x /etc/init.d/odhcpd ] ; then
+ if [ ! -x /usr/sbin/odhcpd ] || [ ! -x /etc/init.d/odhcpd ] ; then
UB_D_DHCP_LINK=none
else
/etc/init.d/odhcpd enabled || UB_D_DHCP_LINK=none
fi
- if [ "$UB_B_READY" -eq 0 -a "$UB_D_DHCP_LINK" = "none" ] ; then
+ if [ "$UB_B_READY" -eq 0 ] && [ "$UB_D_DHCP_LINK" = "none" ] ; then
logger -t unbound -s "cannot receive records from odhcpd"
fi
fi
- if [ "$UB_N_EDNS_SIZE" -lt 512 \
- -o 4096 -lt "$UB_N_EDNS_SIZE" ] ; then
+ if [ "$UB_N_EDNS_SIZE" -lt 512 ] || [ 4096 -lt "$UB_N_EDNS_SIZE" ] ; then
logger -t unbound -s "edns_size exceeds range, using default"
UB_N_EDNS_SIZE=1280
fi
- if [ "$UB_N_RX_PORT" -ne 53 \
- -a \( "$UB_N_RX_PORT" -lt 1024 -o 10240 -lt "$UB_N_RX_PORT" \) ] ; then
+ if [ "$UB_N_RX_PORT" -ne 53 ] \
+ && { [ "$UB_N_RX_PORT" -lt 1024 ] || [ 10240 -lt "$UB_N_RX_PORT" ] ; } ; then
logger -t unbound -s "privileged port or in 5 digits, using default"
UB_N_RX_PORT=53
fi
fi
- if [ -z "$adb_files" \
- -o ! -x /usr/bin/adblock.sh -o ! -x /etc/init.d/adblock ] ; then
+ if [ -z "$adb_files" ] || [ ! -x /usr/bin/adblock.sh ] \
+ || [ ! -x /etc/init.d/adblock ] ; then
adb_enabled=0
elif /etc/init.d/adblock enabled ; then
option listen_port '53'
option localservice '1'
option manual_conf '0'
+ option num_threads '1'
option protocol 'default'
option query_minimize '0'
option query_min_strict '0'
+++ /dev/null
---- a/util/net_help.c
-+++ b/util/net_help.c
-@@ -1049,10 +1049,10 @@ void* outgoing_ssl_fd(void* sslctx, int
- static lock_basic_type *ub_openssl_locks = NULL;
-
- /** callback that gets thread id for openssl */
--static unsigned long
--ub_crypto_id_cb(void)
-+static void
-+ub_crypto_id_cb(CRYPTO_THREADID *id)
- {
-- return (unsigned long)log_thread_get();
-+ CRYPTO_THREADID_set_numeric(id, (unsigned long)log_thread_get());
- }
-
- static void
-@@ -1078,7 +1078,7 @@ int ub_openssl_lock_init(void)
- for(i=0; i<CRYPTO_num_locks(); i++) {
- lock_basic_init(&ub_openssl_locks[i]);
- }
-- CRYPTO_set_id_callback(&ub_crypto_id_cb);
-+ CRYPTO_THREADID_set_callback(&ub_crypto_id_cb);
- CRYPTO_set_locking_callback(&ub_crypto_lock_cb);
- #endif /* OPENSSL_THREADS */
- return 1;
-@@ -1090,7 +1090,7 @@ void ub_openssl_lock_delete(void)
- int i;
- if(!ub_openssl_locks)
- return;
-- CRYPTO_set_id_callback(NULL);
-+ CRYPTO_THREADID_set_callback(NULL);
- CRYPTO_set_locking_callback(NULL);
- for(i=0; i<CRYPTO_num_locks(); i++) {
- lock_basic_destroy(&ub_openssl_locks[i]);
+++ /dev/null
-Index: daemon/remote.c
-===================================================================
---- a/daemon/remote.c (revision 5105)
-+++ b/daemon/remote.c (working copy)
-@@ -1987,7 +1987,7 @@
- return NULL;
- }
- } else {
--#ifndef HAVE_SSL_SET1_HOST
-+#if ! defined(HAVE_SSL_SET1_HOST) && ! defined(HAVE_X509_VERIFY_PARAM_SET1_HOST)
- if(auth_name)
- log_err("no name verification functionality in "
- "ssl library, ignored name for %s", todo);
-Index: iterator/iter_fwd.c
-===================================================================
---- a/iterator/iter_fwd.c (revision 5105)
-+++ b/iterator/iter_fwd.c (working copy)
-@@ -239,7 +239,7 @@
- s->name, p->str);
- return 0;
- }
--#ifndef HAVE_SSL_SET1_HOST
-+#if ! defined(HAVE_SSL_SET1_HOST) && ! defined(HAVE_X509_VERIFY_PARAM_SET1_HOST)
- if(tls_auth_name)
- log_err("no name verification functionality in "
- "ssl library, ignored name for %s", p->str);
-Index: iterator/iter_hints.c
-===================================================================
---- a/iterator/iter_hints.c (revision 5105)
-+++ b/iterator/iter_hints.c (working copy)
-@@ -252,7 +252,7 @@
- s->name, p->str);
- return 0;
- }
--#ifndef HAVE_SSL_SET1_HOST
-+#if ! defined(HAVE_SSL_SET1_HOST) && ! defined(HAVE_X509_VERIFY_PARAM_SET1_HOST)
- if(auth_name)
- log_err("no name verification functionality in "
- "ssl library, ignored name for %s", p->str);
PKG_NAME:=uwsgi-cgi
PKG_VERSION:=2.0.18
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE_URL= \
https://projects.unbit.it/downloads \
PKG_MAINTAINER:=Ansuel Smith <ansuelsmth@gmail.com>
include $(INCLUDE_DIR)/package.mk
-include $(TOPDIR)/feeds/packages/lang/python/python-package.mk
define Package/uwsgi-cgi
SECTION:=net
--- /dev/null
+--- a/core/uwsgi.c
++++ b/core/uwsgi.c
+@@ -1820,7 +1820,7 @@ void uwsgi_plugins_atexit(void) {
+
+ void uwsgi_backtrace(int depth) {
+
+-#if defined(__GLIBC__) || (defined(__APPLE__) && !defined(NO_EXECINFO)) || defined(UWSGI_HAS_EXECINFO)
++#if (!defined(__UCLIBC__) && defined(__GLIBC__)) || (defined(__APPLE__) && !defined(NO_EXECINFO)) || defined(UWSGI_HAS_EXECINFO)
+
+ #include <execinfo.h>
+
include $(TOPDIR)/rules.mk
PKG_NAME:=vallumd
-PKG_VERSION:=0.1.3
+PKG_VERSION:=0.1.4
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/stintel/vallumd/archive/$(PKG_VERSION)/
-PKG_HASH:=b40bede34ea321daf799276111e0e804007dc7c10eb031a0a654982957dcfb25
+PKG_HASH:=d6119f84840ff36f05c273f0a6f3e0f9eacf3a07c1583271c4fef62a7b199428
PKG_LICENSE:=GPL-3.0
PKG_LICENSE_FILES:=COPYING
TITLE:=VPN configuration script for vpnc and OpenConnect
MAINTAINER:=Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
SUBMENU:=VPN
+ PKGARCH:=all
endef
define Package/vpnc-scripts/description
PKG_NAME:=vpnc
PKG_REV:=550
PKG_VERSION:=0.5.3.r$(PKG_REV)
-PKG_RELEASE:=8
+PKG_RELEASE:=9
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://svn.unix-ag.uni-kl.de/vpnc/trunk/
logger -t vpnc "initializing..."
serv_addr=
- for ip in $(resolveip -t 10 "$server"); do
+ for ip in $(resolveip -4t 10 "$server"); do
( proto_add_host_dependency "$config" "$ip" $interface )
serv_addr=1
done
TITLE:=Sends 'magic packets' to wake-on-LAN enabled ethernet adapters
URL:=http://gsd.di.uminho.pt/jpo/software/wakeonlan/
DEPENDS:=+perl +perlbase-getopt +perlbase-net +perlbase-socket
+ PKGARCH:=all
endef
define Package/wakeonlan/description
include $(TOPDIR)/rules.mk
PKG_NAME:=wavemon
-PKG_VERSION:=0.8.2
-PKG_RELEASE:=2
+PKG_VERSION:=0.9.0
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/uoaerg/wavemon/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=4199e2ad11a036f4289f5ad42a8b0fe518f2b5ff77447f4c366dbcf3f23e91d5
+PKG_HASH:=5823ef9459d6147a457b390b6744a77465584e93d37c2809fa7a0be557070166
+PKG_MAINTAINER:=Jonathan McCrohan <jmccrohan@gmail.com>
PKG_LICENSE:=GPL-2.0+
PKG_LICENSE_FILES:=COPYING
-PKG_MAINTAINER:=Jonathan McCrohan <jmccrohan@gmail.com>
+PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
and higher), e.g. the Lucent Orinoco cards.
endef
-CONFIGURE_VARS += \
- ac_cv_lib_cap_cap_get_flag=no \
- BUILD_DATE=$(SOURCE_DATE_EPOCH)
-
-TARGET_CFLAGS += -pthread -I$(STAGING_DIR)/usr/include/libnl3
+CONFIGURE_ARGS += --without-libcap
-MAKE_FLAGS += \
- CFLAGS="$(TARGET_CFLAGS) -L$(STAGING_DIR)/usr/lib -I$(STAGING_DIR)/usr/include"
+TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/libnl3
define Package/wavemon/install
$(INSTALL_DIR) $(1)/usr/bin
--- /dev/null
+From f6e20c9c6e9b50963caaf5483248d329473a6815 Mon Sep 17 00:00:00 2001
+From: Gerrit Renker <Gerrit.Renker@ctl.io>
+Date: Mon, 21 Jan 2019 09:23:43 -0700
+Subject: [PATCH] Scan screen: resolves #62
+
+---
+ iw_if.c | 10 ++++++----
+ iw_if.h | 2 +-
+ iw_scan.c | 2 +-
+ 3 files changed, 8 insertions(+), 6 deletions(-)
+
+diff --git a/iw_if.c b/iw_if.c
+index c0b0128..d8bacbc 100644
+--- a/iw_if.c
++++ b/iw_if.c
+@@ -87,11 +87,13 @@ int if_set_down(const char *ifname)
+ return if_set_up_or_down(ifname, false);
+ }
+
+-/** Exit handler to restore interface 'down' state on exit via on_exit(3). */
+-void if_set_down_on_exit(int rc, void *arg)
++/** Exit handler to restore interface 'down' state on exit via atexit(3). */
++void if_set_down_on_exit(void)
+ {
+- if (if_set_down(arg) < 0) {
+- err_msg("unable to restore %s interface state - set down manually", arg);
++ const char *ifname = conf_ifname();
++
++ if (ifname && if_set_down(ifname) < 0) {
++ err_msg("unable to restore %s interface state - set down manually", ifname);
+ }
+ }
+
+diff --git a/iw_if.h b/iw_if.h
+index 50f5a47..e2199d3 100644
+--- a/iw_if.h
++++ b/iw_if.h
+@@ -76,7 +76,7 @@ struct if_info {
+ };
+ extern bool if_is_up(const char *ifname);
+ extern int if_set_up(const char *ifname);
+-extern void if_set_down_on_exit(int rc, void *arg);
++extern void if_set_down_on_exit(void);
+ extern void if_getinf(const char *ifname, struct if_info *info);
+
+ /**
+diff --git a/iw_scan.c b/iw_scan.c
+index 18e9e06..e2b3067 100644
+--- a/iw_scan.c
++++ b/iw_scan.c
+@@ -430,7 +430,7 @@ void *do_scan(void *sr_ptr)
+
+ if (if_set_up(conf_ifname()) < 0)
+ err_sys("Can not bring up interface '%s'", conf_ifname());
+- if (on_exit(if_set_down_on_exit, (void *)conf_ifname()) < 0)
++ if (atexit(if_set_down_on_exit) < 0)
+ snprintf(sr->msg, sizeof(sr->msg), "Warning: unable to restore %s down state on exit", conf_ifname());
+ break;
+ }
+--
+2.17.1
+
include $(TOPDIR)/rules.mk
PKG_NAME:=wget
-PKG_VERSION:=1.20.1
-PKG_RELEASE:=3
+PKG_VERSION:=1.20.3
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@GNU/$(PKG_NAME)
-PKG_HASH:=b783b390cb571c837b392857945f5a1f00ec6b043177cc42abb8ee1b542ee1b3
+PKG_HASH:=31cccfc6630528db1c8e3a06f6decf2a370060b982841cfab2b8677400a5092e
PKG_MAINTAINER:=Peter Wagner <tripolar@gmx.at>
PKG_LICENSE:=GPL-3.0+
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:gnu:wget
+
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
include $(TOPDIR)/rules.mk
PKG_NAME:=wifidog-ng
-PKG_VERSION:=2.0.0
+PKG_VERSION:=2.0.1
PKG_RELEASE:=1
PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)
BIN=/usr/bin/wifidog-ng
-dhcp_host_white=1
+global_dhcp_host_white=1
+
+validate_gateway_section() {
+ uci_load_validate wifidog-ng gateway "$1" "$2" \
+ 'enabled:bool:0' \
+ 'interface:uci("network", "@interface"):lan' \
+ 'dhcp_host_white:bool:1'
+}
start_wifidog() {
- local cfg="$1"
- local enabled interface
-
- uci_validate_section wifidog-ng gateway "${1}" \
- 'enabled:bool:0' \
- 'interface:uci("network", "@interface"):lan' \
- 'dhcp_host_white:bool:1'
-
- [ $? -ne 0 ] && {
- echo "validation gateway failed" >&2
- exit 1
- }
-
- [ $enabled -eq 1 ] || exit 0
-
- # timeout = 49 days
- ipset -! create wifidog-ng-mac hash:mac timeout 4294967
- ipset -! create wifidog-ng-ip hash:ip
-
- modprobe wifidog-ng
- echo "enabled=1" > /proc/wifidog-ng/config
-
- procd_open_instance
- procd_set_param command $BIN
- procd_set_param respawn
- procd_close_instance
+ [ "$2" = 0 ] || {
+ echo "validation gateway failed" >&2
+ exit 1
+ }
+
+ [ $enabled = 1 ] || exit 0
+
+ [ $dhcp_host_white = 1 ] || global_dhcp_host_white=0
+
+ # timeout = 24.855 days
+ ipset -! create wifidog-ng-mac hash:mac timeout 2147483
+ ipset -! create wifidog-ng-ip hash:ip
+
+ modprobe wifidog-ng
+ echo "enabled=1" > /proc/wifidog-ng/config
+
+ procd_open_instance
+ procd_set_param command $BIN
+ procd_set_param respawn
+ procd_close_instance
+}
+
+validate_server_section() {
+ uci_load_validate wifidog-ng server "$1" "$2" \
+ 'host:host'
}
parse_server() {
- local cfg="$1"
- local host
-
- config_get host $cfg host
- validate_data ip4addr "$host" 2> /dev/null
- if [ $? -eq 0 ];
- then
- ipset add wifidog-ng-ip $host
- else
- echo "ipset=/$host/wifidog-ng-ip" >> /tmp/dnsmasq.d/wifidog-ng
- fi
+ [ "$2" = 0 ] || {
+ echo "validation server failed" >&2
+ exit 1
+ }
+
+ if validate_data ip4addr "$host" 2> /dev/null; then
+ ipset add wifidog-ng-ip $host
+ else
+ echo "ipset=/$host/wifidog-ng-ip" >> /tmp/dnsmasq.d/wifidog-ng
+ fi
}
-parse_validated_user() {
- local cfg="$1"
- local mac ip
+validate_validated_user_section() {
+ uci_load_validate wifidog-ng validated_user "$1" "$2" \
+ 'mac:macaddr'
+}
- uci_validate_section wifidog-ng validated_user "${1}" \
- 'mac:macaddr'
+parse_validated_user() {
+ [ "$2" = 0 ] || {
+ echo "validation validated_user failed" >&2
+ exit 1
+ }
- [ $? -ne 0 ] && {
- echo "validation validated_user failed" >&2
- exit 1
- }
+ [ -n "$mac" ] && ipset add wifidog-ng-mac $mac
+}
- [ -n "$mac" ] && ipset add wifidog-ng-mac $mac
+validate_validated_domain_section() {
+ uci_load_validate wifidog-ng validated_domain "$1" "$2" \
+ 'domain:host'
}
parse_validated_domain() {
- local cfg="$1"
- local domain
+ [ "$2" = 0 ] || {
+ echo "validation validated_domain failed" >&2
+ exit 1
+ }
- uci_validate_section wifidog-ng validated_domain "${1}" \
- 'domain:host'
-
- [ $? -ne 0 ] && {
- echo "validation validated_domain failed" >&2
- exit 1
- }
+ [ -n "$domain" ] && echo "ipset=/$domain/wifidog-ng-ip" >> /tmp/dnsmasq.d/wifidog-ng
+}
- [ -n "$domain" ] && echo "ipset=/$domain/wifidog-ng-ip" >> /tmp/dnsmasq.d/wifidog-ng
+validate_dhcp_host_section() {
+ uci_load_validate dhcp host "$1" "$2" \
+ 'mac:macaddr'
}
parse_dhcp_host() {
- local cfg="$1"
- local mac ip
+ [ "$2" = 0 ] || {
+ echo "validation validated dhcp host failed" >&2
+ exit 1
+ }
- uci_validate_section dhcp host "${1}" \
- 'mac:macaddr'
-
- [ $? -ne 0 ] && {
- echo "validation validated dhcp host failed" >&2
- exit 1
- }
-
- [ -n "$mac" ] && ipset add wifidog-ng-mac $mac
+ [ -n "$mac" ] && ipset add wifidog-ng-mac $mac
}
start_service() {
- config_load wifidog-ng
- config_foreach start_wifidog gateway
+ config_load wifidog-ng
+ config_foreach validate_gateway_section gateway start_wifidog
- echo -n > /tmp/dnsmasq.d/wifidog-ng
+ echo -n > /tmp/dnsmasq.d/wifidog-ng
- config_foreach parse_server server
- config_foreach parse_validated_user validated_user
- config_foreach parse_validated_domain validated_domain
+ config_foreach validate_server_section server parse_server
+ config_foreach validate_validated_user_section validated_user parse_validated_user
+ config_foreach validate_validated_domain_section validated_domain parse_validated_domain
- [ $dhcp_host_white -eq 1 ] && {
- config_load dhcp
- config_foreach parse_dhcp_host host
- }
+ [ $global_dhcp_host_white = 1 ] && {
+ config_load dhcp
+ config_foreach validate_dhcp_host_section host parse_dhcp_host
+ }
- /etc/init.d/dnsmasq restart &
+ /etc/init.d/dnsmasq restart &
}
stop_service() {
- rmmod wifidog-ng
+ rmmod wifidog-ng
+
+ ipset destroy wifidog-ng-mac
+ ipset destroy wifidog-ng-ip
+}
+
+service_triggers() {
+ procd_add_reload_trigger "wifidog-ng"
- ipset destroy wifidog-ng-mac
- ipset destroy wifidog-ng-ip
+ procd_open_validate
+ validate_gateway_section
+ validate_server_section
+ validate_validated_user_section
+ validate_validated_domain_section
+ validate_dhcp_host_section
+ procd_close_validate
}
#define IPS_HIJACKED (1 << 31)
#define IPS_ALLOWED (1 << 30)
-static u32 wd_nf_nat_setup_info(void *priv, struct sk_buff *skb,
+#if LINUX_VERSION_CODE > KERNEL_VERSION(4, 17, 19)
+static u32 wd_nat_setup_info(struct sk_buff *skb, struct nf_conn *ct)
+#else
+static u32 wd_nat_setup_info(void *priv, struct sk_buff *skb,
const struct nf_hook_state *state, struct nf_conn *ct)
+#endif
{
struct config *conf = get_config();
struct tcphdr *tcph = tcp_hdr(skb);
union nf_conntrack_man_proto proto;
- struct nf_nat_range newrange;
+#if LINUX_VERSION_CODE > KERNEL_VERSION(4, 17, 19)
+ struct nf_nat_range2 newrange = {};
+#else
+ struct nf_nat_range newrange = {};
+#endif
static uint16_t PORT_80 = htons(80);
proto.tcp.port = (tcph->dest == PORT_80) ? htons(conf->port) : htons(conf->ssl_port);
newrange.flags = NF_NAT_RANGE_MAP_IPS | NF_NAT_RANGE_PROTO_SPECIFIED;
- newrange.min_addr.ip = newrange.max_addr.ip = conf->interface_ipaddr;
- newrange.min_proto = newrange.max_proto = proto;
+ newrange.min_addr.ip = conf->interface_ipaddr;
+ newrange.max_addr.ip = conf->interface_ipaddr;
+ newrange.min_proto = proto;
+ newrange.max_proto = proto;
ct->status |= IPS_HIJACKED;
return NF_DROP;
}
- return nf_nat_ipv4_in(priv, skb, state, wd_nf_nat_setup_info);
+#if LINUX_VERSION_CODE > KERNEL_VERSION(4, 17, 19)
+ return wd_nat_setup_info(skb, ct);
+#else
+ return nf_nat_ipv4_in(priv, skb, state, wd_nat_setup_info);
+#endif
}
-static struct nf_hook_ops wifidog_ops[] __read_mostly = {
- {
- .hook = wifidog_hook,
- .pf = PF_INET,
- .hooknum = NF_INET_PRE_ROUTING,
- .priority = NF_IP_PRI_CONNTRACK + 1 /* after conntrack */
- }
+static struct nf_hook_ops wifidog_ops __read_mostly = {
+ .hook = wifidog_hook,
+ .pf = PF_INET,
+ .hooknum = NF_INET_PRE_ROUTING,
+ .priority = NF_IP_PRI_NAT_DST
};
static int __init wifidog_init(void)
if (ret)
return ret;
-#if LINUX_VERSION_CODE > KERNEL_VERSION(4, 12, 14)
- ret = nf_register_net_hooks(&init_net, wifidog_ops, ARRAY_SIZE(wifidog_ops));
+#if LINUX_VERSION_CODE > KERNEL_VERSION(4, 17, 19)
+ ret = nf_nat_l3proto_ipv4_register_fn(&init_net, &wifidog_ops);
+#elif LINUX_VERSION_CODE > KERNEL_VERSION(4, 12, 14)
+ ret = nf_register_net_hook(&init_net, &wifidog_ops);
#else
- ret = nf_register_hooks(wifidog_ops, ARRAY_SIZE(wifidog_ops));
+ ret = nf_register_hook(&wifidog_ops);
#endif
if (ret < 0) {
pr_err("can't register hook\n");
{
deinit_config();
-#if LINUX_VERSION_CODE > KERNEL_VERSION(4, 12, 14)
- nf_unregister_net_hooks(&init_net, wifidog_ops, ARRAY_SIZE(wifidog_ops));
+#if LINUX_VERSION_CODE > KERNEL_VERSION(4, 17, 19)
+ nf_nat_l3proto_ipv4_unregister_fn(&init_net, &wifidog_ops);
+#elif LINUX_VERSION_CODE > KERNEL_VERSION(4, 12, 14)
+ nf_unregister_net_hook(&init_net, &wifidog_ops);
#else
- nf_unregister_hooks(wifidog_ops, ARRAY_SIZE(wifidog_ops));
+ nf_unregister_hook(&wifidog_ops);
#endif
pr_info("kmod of wifidog-ng is stop\n");
PKG_NAME:=wifidog
PKG_VERSION:=1.3.0
-PKG_RELEASE:=3
-
-
-PKG_LICENSE:=GPL-2.0
-# Note: Packaging is maintained upstream at
-# https://github.com/wifidog/packages
-PKG_MAINTAINER:=Michael Haas <haas@computerlinguist.org>
-PKG_LICENSE_FILES:=COPYING
-
+PKG_RELEASE:=4
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/wifidog/wifidog-gateway
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=1.3.0
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
+PKG_SOURCE_VERSION:=$(PKG_VERSION)
PKG_MIRROR_HASH:=9ffd9f3ae54baceb723abb7a04e27a9b6a3ff1479f8a3bfda9b8a496e8b4050f
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Michael Haas <haas@computerlinguist.org>
+PKG_LICENSE:=GPL-2.0-or-later
+PKG_LICENSE_FILES:=COPYING
PKG_FIXUP:=autoreconf
-# do not run make install
PKG_INSTALL:=0
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
define Package/wifidog-tls
$(call Package/wifidog/Default)
- DEPENDS+= +libcyassl
+ DEPENDS+= +PACKAGE_wifidog-tls:libwolfssl
VARIANT:=tls
endef
Package/wifidog-tls/conffiles = $(Package/wifidog/conffiles)
-
-define Package/wifidog/configure
- $(call Build/Configure/Default)
-endef
-
ifeq ($(BUILD_VARIANT),tls)
CONFIGURE_ARGS += \
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/wifidog $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/wdctl $(1)/usr/bin/
$(INSTALL_DIR) $(1)/usr/lib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/libhttpd.so* $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libhttpd.so.* $(1)/usr/lib/
$(INSTALL_DIR) $(1)/etc
$(INSTALL_DATA) $(PKG_BUILD_DIR)/wifidog.conf $(1)/etc/
$(INSTALL_DATA) $(PKG_BUILD_DIR)/wifidog-msg.html $(1)/etc/
--- /dev/null
+From 37b2dda9b1d62eb91028f6d590beddd36f7b79c8 Mon Sep 17 00:00:00 2001
+From: Nathan Samson <nathan@nathansamson.be>
+Date: Mon, 1 Feb 2016 21:37:22 +0100
+Subject: [PATCH] Modify get ip from iface method.
+
+This used to use a RAW socket, while now it used a DGRAM socket.
+Previously it failed with operation not permitted, while this version
+seems to work reliably.
+
+diff --git a/src/util.c b/src/util.c
+index 46ec5a2..426ba13 100644
+--- a/src/util.c
++++ b/src/util.c
+@@ -174,11 +174,13 @@ get_iface_ip(const char *ifname)
+ u_int32_t ip;
+
+ /* Create a socket */
+- if ((sockd = socket(AF_INET, SOCK_RAW, htons(0x8086))) < 0) {
++ if ((sockd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
+ debug(LOG_ERR, "socket(): %s", strerror(errno));
+ return NULL;
+ }
+
++ /* I want to get an IPv4 IP address */
++ if_data.ifr_addr.sa_family = AF_INET;
+ /* Get IP of internal interface */
+ strncpy(if_data.ifr_name, ifname, 15);
+ if_data.ifr_name[15] = '\0';
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=xtables-addons
-PKG_VERSION:=2.14
-PKG_RELEASE:=6
-PKG_HASH:=d215a9a8b8e66aae04b982fa2e1228e8a71e7dfe42320df99e34e5000cbdf152
+PKG_VERSION:=3.3
+PKG_RELEASE:=1
+PKG_HASH:=efa62c7df6cd3b82d7195105bf6fe177b605f91f3522e4114d2f4e0ad54320d6
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@SF/xtables-addons
CONFIGURE_ARGS+= \
--with-kbuild="$(LINUX_DIR)" \
- --with-xtlibdir="/usr/lib/iptables" \
+ --with-xtlibdir="/usr/lib/iptables"
+ifdef CONFIG_EXTERNAL_TOOLCHAIN
+MAKE_FLAGS:= \
+ $(patsubst ARCH=%,ARCH=$(LINUX_KARCH),$(MAKE_FLAGS)) \
+ DEPMOD="/bin/true"
+
+MAKE_INSTALL_FLAGS:= \
+ $(patsubst ARCH=%,ARCH=$(LINUX_KARCH),$(MAKE_FLAGS)) \
+ DEPMOD="/bin/true"
+else
define Build/Compile
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
$(KERNEL_MAKE_FLAGS) \
DEPMOD="/bin/true" \
install
endef
+endif
# 1: extension/module suffix used in package name
# 2: extension/module display name used in package title/description
--- /dev/null
+--- a/configure.ac
++++ b/configure.ac
+@@ -44,7 +44,7 @@ regular_CFLAGS="-Wall -Waggregate-return
+
+ if test -n "$kbuilddir"; then
+ AC_MSG_CHECKING([kernel version that we will build against])
+- krel="$(make -sC "$kbuilddir" M=$PWD kernelrelease | $AWK -v 'FS=[[^0-9.]]' '{print $1; exit}')"
++ krel="$(make -sC "$kbuilddir" M=$PWD kernelversion | $AWK -v 'FS=[[^0-9.]]' '{print $1; exit}')"
+ save_IFS="$IFS"
+ IFS='.'
+ set x $krel
+++ /dev/null
---- a/configure.ac
-+++ b/configure.ac
-@@ -44,7 +44,7 @@ regular_CFLAGS="-Wall -Waggregate-return
-
- if test -n "$kbuilddir"; then
- AC_MSG_CHECKING([kernel version that we will build against])
-- krel="$(make -sC "$kbuilddir" M=$PWD kernelrelease | $AWK -v 'FS=[[^0-9.]]' '{print $1; exit}')"
-+ krel="$(make -sC "$kbuilddir" M=$PWD kernelversion | $AWK -v 'FS=[[^0-9.]]' '{print $1; exit}')"
- save_IFS="$IFS"
- IFS='.'
- set x $krel
--- /dev/null
+Restore support for kernel 4.14
+This reverts commit bf63a25a64c9223435c26e6543ba749834b47752.
+---
+ configure.ac | 2 +-
+ extensions/compat_xtables.h | 4 ++--
+ extensions/pknock/xt_pknock.c | 16 ++++++++++++++++
+ 3 files changed, 19 insertions(+), 3 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 7631f6b..0d3aa72 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -59,7 +59,7 @@ if test -n "$kbuilddir"; then
+ echo "$kmajor.$kminor.$kmicro.$kstable in $kbuilddir";
+ if test "$kmajor" -gt 5 -o "$kmajor" -eq 5 -a "$kminor" -gt 0; then
+ echo "WARNING: That kernel version is not officially supported yet. Continue at own luck.";
+- elif test "$kmajor" -eq 4 -a "$kminor" -ge 18; then
++ elif test "$kmajor" -eq 4 -a "$kminor" -ge 14; then
+ :
+ else
+ echo "WARNING: That kernel version is not officially supported.";
+diff --git a/extensions/compat_xtables.h b/extensions/compat_xtables.h
+index d08354a..faf5dd8 100644
+--- a/extensions/compat_xtables.h
++++ b/extensions/compat_xtables.h
+@@ -8,8 +8,8 @@
+
+ #define DEBUGP Use__pr_debug__instead
+
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
+-# warning Kernels below 4.15 not supported.
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0)
++# warning Kernels below 4.14 not supported.
+ #endif
+
+ #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
+diff --git a/extensions/pknock/xt_pknock.c b/extensions/pknock/xt_pknock.c
+index c76901a..7be0345 100644
+--- a/extensions/pknock/xt_pknock.c
++++ b/extensions/pknock/xt_pknock.c
+@@ -357,10 +357,18 @@ has_logged_during_this_minute(const struct peer *peer)
+ *
+ * @r: rule
+ */
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
+ static void peer_gc(struct timer_list *tl)
++#else
++static void peer_gc(unsigned long r)
++#endif
+ {
+ unsigned int i;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
+ struct xt_pknock_rule *rule = from_timer(rule, tl, timer);
++#else
++ struct xt_pknock_rule *rule = (struct xt_pknock_rule *)r;
++#endif
+ struct peer *peer;
+ struct list_head *pos, *n;
+
+@@ -467,7 +475,15 @@ add_rule(struct xt_pknock_mtinfo *info)
+ rule->peer_head = alloc_hashtable(peer_hashsize);
+ if (rule->peer_head == NULL)
+ goto out;
++
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
+ timer_setup(&rule->timer, peer_gc, 0);
++#else
++ init_timer(&rule->timer);
++ rule->timer.function = peer_gc;
++ rule->timer.data = (unsigned long)rule;
++#endif
++
+ rule->status_proc = proc_create_data(info->rule_name, 0, pde,
+ &pknock_proc_ops, rule);
+ if (rule->status_proc == NULL)
+--
+2.21.0
+
--- /dev/null
+Restore support for kernel 4.9
+This reverts commits:
+94656621ed269882aedf116f900009f1ccade3f6
+95d4f9e113fae3ef1e161548fe25c43c091392e3
+123e1a14e95f01b6ba2e4a31b3b2a74ff250be57
+f4f3f9860916d2ec88eb8339680d9ca0f64d41a4
+9b1c7c1c047f0e9c6cb4f9abbdb9fd7b86ae6c1b
+---
+ configure.ac | 2 +-
+ extensions/ACCOUNT/xt_ACCOUNT.c | 4 ++++
+ extensions/compat_xtables.h | 8 ++++++--
+ extensions/xt_CHAOS.c | 28 ++++++++++++++++++++++++++--
+ extensions/xt_DELUDE.c | 8 +++++++-
+ extensions/xt_DNETMAP.c | 13 +++++++++++++
+ extensions/xt_ECHO.c | 4 ++++
+ extensions/xt_LOGMARK.c | 8 ++++++++
+ extensions/xt_TARPIT.c | 10 ++++++++++
+ extensions/xt_iface.c | 8 ++++++++
+ extensions/xt_lscan.c | 4 ++++
+ 11 files changed, 91 insertions(+), 6 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 0d3aa72..1cea354 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -59,7 +59,7 @@ if test -n "$kbuilddir"; then
+ echo "$kmajor.$kminor.$kmicro.$kstable in $kbuilddir";
+ if test "$kmajor" -gt 5 -o "$kmajor" -eq 5 -a "$kminor" -gt 0; then
+ echo "WARNING: That kernel version is not officially supported yet. Continue at own luck.";
+- elif test "$kmajor" -eq 4 -a "$kminor" -ge 14; then
++ elif test "$kmajor" -eq 4 -a "$kminor" -ge 9; then
+ :
+ else
+ echo "WARNING: That kernel version is not officially supported.";
+diff --git a/extensions/ACCOUNT/xt_ACCOUNT.c b/extensions/ACCOUNT/xt_ACCOUNT.c
+index 019f5bd..8abe8ab 100644
+--- a/extensions/ACCOUNT/xt_ACCOUNT.c
++++ b/extensions/ACCOUNT/xt_ACCOUNT.c
+@@ -485,7 +485,11 @@ static void ipt_acc_depth2_insert(struct ipt_acc_mask_8 *mask_8,
+ static unsigned int
+ ipt_acc_target(struct sk_buff *skb, const struct xt_action_param *par)
+ {
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)
+ struct ipt_acc_net *ian = net_generic(par->state->net, ipt_acc_net_id);
++#else
++ struct ipt_acc_net *ian = net_generic(par->net, ipt_acc_net_id);
++#endif
+ struct ipt_acc_table *ipt_acc_tables = ian->ipt_acc_tables;
+ const struct ipt_acc_info *info =
+ par->targinfo;
+diff --git a/extensions/compat_xtables.h b/extensions/compat_xtables.h
+index faf5dd8..23785d9 100644
+--- a/extensions/compat_xtables.h
++++ b/extensions/compat_xtables.h
+@@ -8,8 +8,8 @@
+
+ #define DEBUGP Use__pr_debug__instead
+
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0)
+-# warning Kernels below 4.14 not supported.
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
++# warning Kernels below 4.9 not supported.
+ #endif
+
+ #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
+@@ -44,7 +44,11 @@
+
+ static inline struct net *par_net(const struct xt_action_param *par)
+ {
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0)
+ return par->state->net;
++#else
++ return par->net;
++#endif
+ }
+
+ #ifndef NF_CT_ASSERT
+diff --git a/extensions/xt_CHAOS.c b/extensions/xt_CHAOS.c
+index eec36d4..cee2026 100644
+--- a/extensions/xt_CHAOS.c
++++ b/extensions/xt_CHAOS.c
+@@ -58,7 +58,12 @@ xt_chaos_total(struct sk_buff *skb, const struct xt_action_param *par)
+
+ {
+ struct xt_action_param local_par;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)
+ local_par.state = par->state;
++#else
++ local_par.in = par->in,
++ local_par.out = par->out,
++#endif
+ local_par.match = xm_tcp;
+ local_par.matchinfo = &tcp_params;
+ local_par.fragoff = fragoff;
+@@ -73,7 +78,14 @@ xt_chaos_total(struct sk_buff *skb, const struct xt_action_param *par)
+ destiny = (info->variant == XTCHAOS_TARPIT) ? xt_tarpit : xt_delude;
+ {
+ struct xt_action_param local_par;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)
+ local_par.state = par->state;
++#else
++ local_par.in = par->in;
++ local_par.out = par->out;
++ local_par.hooknum = par->hooknum;
++ local_par.family = par->family;
++#endif
+ local_par.target = destiny;
+ local_par.targinfo = par->targinfo;
+ destiny->target(skb, &local_par);
+@@ -96,15 +108,27 @@ chaos_tg(struct sk_buff *skb, const struct xt_action_param *par)
+
+ if ((unsigned int)prandom_u32() <= reject_percentage) {
+ struct xt_action_param local_par;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)
+ local_par.state = par->state;
++#else
++ local_par.in = par->in;
++ local_par.out = par->out;
++ local_par.hooknum = par->hooknum;
++#endif
+ local_par.target = xt_reject;
+ local_par.targinfo = &reject_params;
+ return xt_reject->target(skb, &local_par);
+ }
+
+ /* TARPIT/DELUDE may not be called from the OUTPUT chain */
+- if (iph->protocol == IPPROTO_TCP && info->variant != XTCHAOS_NORMAL &&
+- par->state->hook != NF_INET_LOCAL_OUT)
++ if (iph->protocol == IPPROTO_TCP &&
++ info->variant != XTCHAOS_NORMAL &&
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)
++ par->state->hook
++#else
++ par->hooknum
++#endif
++ != NF_INET_LOCAL_OUT)
+ xt_chaos_total(skb, par);
+
+ return NF_DROP;
+diff --git a/extensions/xt_DELUDE.c b/extensions/xt_DELUDE.c
+index 618de5e..221f342 100644
+--- a/extensions/xt_DELUDE.c
++++ b/extensions/xt_DELUDE.c
+@@ -146,7 +146,13 @@ delude_tg(struct sk_buff *skb, const struct xt_action_param *par)
+ * a problem, as that is supported since Linux 2.6.35. But since we do not
+ * actually want to have a connection open, we are still going to drop it.
+ */
+- delude_send_reset(par_net(par), skb, par->state->hook);
++ delude_send_reset(par_net(par), skb,
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)
++ par->state->hook
++#else
++ par->hooknum
++#endif
++ );
+ return NF_DROP;
+ }
+
+diff --git a/extensions/xt_DNETMAP.c b/extensions/xt_DNETMAP.c
+index de7d4ec..36a59e2 100644
+--- a/extensions/xt_DNETMAP.c
++++ b/extensions/xt_DNETMAP.c
+@@ -356,7 +356,11 @@ out:
+ static unsigned int
+ dnetmap_tg(struct sk_buff *skb, const struct xt_action_param *par)
+ {
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)
+ struct net *net = dev_net(par->state->in ? par->state->in : par->state->out);
++#else
++ struct net *net = dev_net(par->in ? par->in : par->out);
++#endif
+ struct dnetmap_net *dnetmap_net = dnetmap_pernet(net);
+ struct nf_conn *ct;
+ enum ip_conntrack_info ctinfo;
+@@ -371,7 +375,11 @@ dnetmap_tg(struct sk_buff *skb, const struct xt_action_param *par)
+ struct dnetmap_entry *e;
+ struct dnetmap_prefix *p;
+ __s32 jttl;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)
+ unsigned int hooknum = par->state->hook;
++#else
++ unsigned int hooknum = par->hooknum;
++#endif
+ ct = nf_ct_get(skb, &ctinfo);
+
+ jttl = tginfo->flags & XT_DNETMAP_TTL ? tginfo->ttl * HZ : jtimeout;
+@@ -496,7 +504,12 @@ bind_new_prefix:
+ newrange.max_addr.ip = postnat_ip;
+ newrange.min_proto = mr->min_proto;
+ newrange.max_proto = mr->max_proto;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)
+ return nf_nat_setup_info(ct, &newrange, HOOK2MANIP(par->state->hook));
++#else
++ return nf_nat_setup_info(ct, &newrange, HOOK2MANIP(par->hooknum));
++#endif
++
+ no_rev_map:
+ no_free_ip:
+ spin_unlock_bh(&dnetmap_lock);
+diff --git a/extensions/xt_ECHO.c b/extensions/xt_ECHO.c
+index e99312b..60cb815 100644
+--- a/extensions/xt_ECHO.c
++++ b/extensions/xt_ECHO.c
+@@ -35,7 +35,11 @@ echo_tg6(struct sk_buff *oldskb, const struct xt_action_param *par)
+ void *payload;
+ struct flowi6 fl;
+ struct dst_entry *dst = NULL;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)
+ struct net *net = dev_net((par->state->in != NULL) ? par->state->in : par->state->out);
++#else
++ struct net *net = dev_net((par->in != NULL) ? par->in : par->out);
++#endif
+
+ /* This allows us to do the copy operation in fewer lines of code. */
+ if (skb_linearize(oldskb) < 0)
+diff --git a/extensions/xt_LOGMARK.c b/extensions/xt_LOGMARK.c
+index 0474bf8..02e32be 100644
+--- a/extensions/xt_LOGMARK.c
++++ b/extensions/xt_LOGMARK.c
+@@ -77,13 +77,21 @@ logmark_tg(struct sk_buff *skb, const struct xt_action_param *par)
+ printk("<%u>%.*s""iif=%d hook=%s nfmark=0x%x "
+ "secmark=0x%x classify=0x%x",
+ info->level, (unsigned int)sizeof(info->prefix), info->prefix,
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)
+ skb_ifindex(skb), hook_names[par->state->hook],
++#else
++ skb_ifindex(skb), hook_names[par->hooknum],
++#endif
+ skb_nfmark(skb), skb_secmark(skb), skb->priority);
+
+ ct = nf_ct_get(skb, &ctinfo);
+ printk(" ctdir=%s", dir_names[ctinfo >= IP_CT_IS_REPLY]);
+ if (ct == NULL)
+ printk(" ct=NULL ctmark=NULL ctstate=INVALID ctstatus=NONE");
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 12, 0)
++ else if (nf_ct_is_untracked(ct))
++ printk(" ct=UNTRACKED ctmark=NULL ctstate=UNTRACKED ctstatus=NONE");
++#endif
+ else
+ logmark_ct(ct, ctinfo);
+
+diff --git a/extensions/xt_TARPIT.c b/extensions/xt_TARPIT.c
+index cb98e9e..b78683c 100644
+--- a/extensions/xt_TARPIT.c
++++ b/extensions/xt_TARPIT.c
+@@ -431,7 +431,12 @@ tarpit_tg4(struct sk_buff *skb, const struct xt_action_param *par)
+ /* We are not interested in fragments */
+ if (iph->frag_off & htons(IP_OFFSET))
+ return NF_DROP;
++
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)
+ tarpit_tcp4(par_net(par), skb, par->state->hook, info->variant);
++#else
++ tarpit_tcp4(par_net(par), skb, par->hooknum, info->variant);
++#endif
+ return NF_DROP;
+ }
+
+@@ -472,7 +477,12 @@ tarpit_tg6(struct sk_buff *skb, const struct xt_action_param *par)
+ pr_debug("addr is not unicast.\n");
+ return NF_DROP;
+ }
++
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)
+ tarpit_tcp6(par_net(par), skb, par->state->hook, info->variant);
++#else
++ tarpit_tcp6(par_net(par), skb, par->hooknum, info->variant);
++#endif
+ return NF_DROP;
+ }
+ #endif
+diff --git a/extensions/xt_iface.c b/extensions/xt_iface.c
+index 7704686..be52a52 100644
+--- a/extensions/xt_iface.c
++++ b/extensions/xt_iface.c
+@@ -45,9 +45,17 @@ static const struct net_device *iface_get(const struct xt_iface_mtinfo *info,
+ const struct xt_action_param *par, struct net_device **put)
+ {
+ if (info->flags & XT_IFACE_DEV_IN)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)
+ return par->state->in;
++#else
++ return par->in;
++#endif
+ else if (info->flags & XT_IFACE_DEV_OUT)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)
+ return par->state->out;
++#else
++ return par->out;
++#endif
+ return *put = dev_get_by_name(&init_net, info->ifname);
+ }
+
+diff --git a/extensions/xt_lscan.c b/extensions/xt_lscan.c
+index 060fe44..3a7d2ed 100644
+--- a/extensions/xt_lscan.c
++++ b/extensions/xt_lscan.c
+@@ -204,7 +204,11 @@ lscan_mt(const struct sk_buff *skb, struct xt_action_param *par)
+ unsigned int n;
+
+ n = lscan_mt_full(ctdata->mark & connmark_mask, ctstate,
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)
+ par->state->in == init_net.loopback_dev, tcph,
++#else
++ par->in == init_net.loopback_dev, tcph,
++#endif
+ skb->len - par->thoff - 4 * tcph->doff);
+
+ ctdata->mark = (ctdata->mark & ~connmark_mask) | n;
+--
+2.21.0
+
+++ /dev/null
---- a/extensions/libxt_geoip.c
-+++ b/extensions/libxt_geoip.c
-@@ -59,13 +59,13 @@ geoip_get_subnets(const char *code, uint
-
- /* Use simple integer vector files */
- if (nfproto == NFPROTO_IPV6) {
--#if __BYTE_ORDER == _BIG_ENDIAN
-+#if BYTE_ORDER == BIG_ENDIAN
- snprintf(buf, sizeof(buf), GEOIP_DB_DIR "/BE/%s.iv6", code);
- #else
- snprintf(buf, sizeof(buf), GEOIP_DB_DIR "/LE/%s.iv6", code);
- #endif
- } else {
--#if __BYTE_ORDER == _BIG_ENDIAN
-+#if BYTE_ORDER == BIG_ENDIAN
- snprintf(buf, sizeof(buf), GEOIP_DB_DIR "/BE/%s.iv4", code);
- #else
- snprintf(buf, sizeof(buf), GEOIP_DB_DIR "/LE/%s.iv4", code);
+++ /dev/null
-#
-# Copyright (C) 2016-2017 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=yaaw
-PKG_VERSION:=2017-04-12
-PKG_RELEASE:=1
-
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/binux/yaaw.git
-PKG_MIRROR_HASH:=02c79d4233384df7b82e18740f96803da03260785a710be587b4c1554e900326
-PKG_SOURCE_VERSION:=d3a8346c5b9c2c1875dc79e1db2533b584fc8def
-
-PKG_LICENSE:=LGPL-3.0
-PKG_MAINTAINER:=Hsing-Wang Liao <kuoruan@gmail.com>
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/yaaw
- SECTION:=net
- CATEGORY:=Network
- SUBMENU:=Download Manager
- DEPENDS:=
- TITLE:=Yet another aria2 web frontend
- URL:=https://github.com/binux/yaaw
- PKGARCH:=all
-endef
-
-define Package/yaaw/description
- Yet Another Aria2 Web Frontend in pure HTML/CSS/Javascirpt.
-endef
-
-define Build/Compile
-endef
-
-define Package/yaaw/install
- $(INSTALL_DIR) $(1)/www/yaaw
- $(CP) \
- $(PKG_BUILD_DIR)/{css,img,js} \
- $(1)/www/yaaw
- $(CP) \
- $(PKG_BUILD_DIR)/{index.html,offline.appcache} \
- $(1)/www/yaaw
-endef
-
-$(eval $(call BuildPackage,yaaw))
--- /dev/null
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=yggdrasil
+PKG_VERSION:=0.3.5
+PKG_RELEASE:=4
+
+PKG_SOURCE_URL:=https://codeload.github.com/yggdrasil-network/yggdrasil-go/tar.gz/v$(PKG_VERSION)?
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_HASH:=2c69029adeb053ad049e90f1e4b7efa986094779868da77464d3c869984e861b
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-go-$(PKG_VERSION)
+
+PKG_LICENSE:=GPL-3.0
+PKG_MAINTAINER:=William Fleurant <meshnet@protonmail.com>
+
+PKG_BUILD_DEPENDS:=golang/host
+PKG_BUILD_PARALLEL:=1
+PKG_USE_MIPS16:=0
+
+GO_PKG:=github.com/yggdrasil-network/yggdrasil-go
+GO_PKG_BUILD_PKG:=github.com/yggdrasil-network/yggdrasil-go/cmd/...
+
+GO_PKG_LDFLAGS_X:= \
+ github.com/yggdrasil-network/yggdrasil-go/src/yggdrasil.buildName=yggdrasil-openwrt \
+ github.com/yggdrasil-network/yggdrasil-go/src/yggdrasil.buildVersion=$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+include ../../lang/golang/golang-package.mk
+
+define Package/yggdrasil
+ SECTION:=net
+ CATEGORY:=Network
+ SUBMENU:=Routing and Redirection
+ TITLE:=Yggdrasil supports end-to-end encrypted IPv6 networks
+ URL:=https://yggdrasil-network.github.io/
+ DEPENDS:=$(GO_ARCH_DEPENDS) @IPV6 +kmod-tun
+endef
+
+define Package/yggdrasil/description
+ Yggdrasil builds end-to-end encrypted networks with IPv6.
+ Beyond the similarities with cjdns is a different routing
+ algorithm. This globally-agreed spanning tree uses greedy
+ routing in a metric space. Back-pressure routing techniques
+ allow advanced link aggregation bonding on per-stream basis.
+ In turn, a single stream will span across multiple network
+ interfaces simultaneously with much greater throughput.
+endef
+
+define Package/yggdrasil/install
+ $(INSTALL_DIR) \
+ $(1)/etc/init.d \
+ $(1)/etc/uci-defaults \
+ $(1)/usr/sbin
+
+ $(INSTALL_BIN) \
+ $(GO_PKG_BUILD_BIN_DIR)/yggdrasil \
+ $(1)/usr/sbin
+
+ $(INSTALL_BIN) \
+ $(GO_PKG_BUILD_BIN_DIR)/yggdrasilctl \
+ $(1)/usr/sbin
+
+ $(INSTALL_BIN) \
+ ./files/yggdrasil.defaults \
+ $(1)/etc/uci-defaults/yggdrasil
+
+ $(INSTALL_BIN) \
+ ./files/yggdrasil.init \
+ $(1)/etc/init.d/yggdrasil
+endef
+
+$(eval $(call GoBinPackage,yggdrasil))
+$(eval $(call BuildPackage,yggdrasil))
--- /dev/null
+#!/bin/sh
+
+yggConfig="/etc/yggdrasil.conf"
+
+first_boot_genConfig()
+{
+ . /usr/share/libubox/jshn.sh
+ boardcfg=$(ubus call system board)
+ yggcfg=$(yggdrasil -genconf -json | grep NodeInfo -v)
+
+ json_load "$boardcfg"
+ json_get_var kernel kernel
+ json_get_var hostname hostname
+ json_get_var system system
+ json_get_var model model
+ json_get_var board_name board_name
+
+ json_load "$yggcfg"
+ json_add_string "IfName" "ygg0"
+ json_add_object "NodeInfo"
+ json_add_string "kernel" "$kernel"
+ json_add_string "hostname" "$hostname"
+ json_add_string "system" "$system"
+ json_add_string "model" "$model"
+ json_add_string "board_name" "$board_name"
+ json_close_object
+ json_dump
+}
+
+if [ ! -e ${yggConfig} ]; then
+ echo "first_boot: adding system board details to NodeInfo[] in NEW config: ${yggConfig}" | logger -t yggdrasil
+
+ first_boot_genConfig > ${yggConfig}
+
+ # create the network interface
+ uci -q batch <<-EOF >/dev/null
+ set network.yggdrasil=interface
+ set network.yggdrasil.ifname=ygg0
+ set network.yggdrasil.proto=none
+EOF
+
+ # create the firewall zone
+ uci -q batch <<-EOF >/dev/null
+ add firewall zone
+ set firewall.@zone[-1].name=yggdrasil
+ add_list firewall.@zone[-1].network=yggdrasil
+ set firewall.@zone[-1].input=REJECT
+ set firewall.@zone[-1].output=ACCEPT
+ set firewall.@zone[-1].forward=REJECT
+ set firewall.@zone[-1].conntrack=1
+ set firewall.@zone[-1].family=ipv6
+EOF
+
+ # allow ICMP from yggdrasil zone, e.g. ping6
+ uci -q batch <<-EOF >/dev/null
+ add firewall rule
+ set firewall.@rule[-1].name='Allow-ICMPv6-yggdrasil'
+ set firewall.@rule[-1].src=yggdrasil
+ set firewall.@rule[-1].proto=icmp
+ add_list firewall.@rule[-1].icmp_type=echo-request
+ add_list firewall.@rule[-1].icmp_type=echo-reply
+ add_list firewall.@rule[-1].icmp_type=destination-unreachable
+ add_list firewall.@rule[-1].icmp_type=packet-too-big
+ add_list firewall.@rule[-1].icmp_type=time-exceeded
+ add_list firewall.@rule[-1].icmp_type=bad-header
+ add_list firewall.@rule[-1].icmp_type=unknown-header-type
+ set firewall.@rule[-1].limit='1000/sec'
+ set firewall.@rule[-1].family=ipv6
+ set firewall.@rule[-1].target=ACCEPT
+EOF
+
+ # allow SSH from yggdrasil zone, needs to be explicitly enabled
+ uci -q batch <<-EOF >/dev/null
+ add firewall rule
+ set firewall.@rule[-1].enabled=0
+ set firewall.@rule[-1].name='Allow-SSH-yggdrasil'
+ set firewall.@rule[-1].src=yggdrasil
+ set firewall.@rule[-1].proto=tcp
+ set firewall.@rule[-1].dest_port=22
+ set firewall.@rule[-1].target=ACCEPT
+EOF
+
+ # allow LuCI access from yggdrasil zone, needs to be explicitly enabled
+ uci -q batch <<-EOF >/dev/null
+ add firewall rule
+ set firewall.@rule[-1].enabled=0
+ set firewall.@rule[-1].name='Allow-HTTP-yggdrasil'
+ set firewall.@rule[-1].src=yggdrasil
+ set firewall.@rule[-1].proto=tcp
+ set firewall.@rule[-1].dest_port=80
+ set firewall.@rule[-1].target=ACCEPT
+EOF
+
+ uci commit firewall
+ uci commit network
+
+else
+ :
+fi
+
+exit 0
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=90
+STOP=85
+
+USE_PROCD=1
+
+start_service()
+{
+ [ -f /etc/uci-defaults/yggdrasil ] && ( . /etc/uci-defaults/yggdrasil )
+
+ procd_open_instance
+ procd_set_param respawn
+ procd_set_param command /bin/ash -c "/usr/sbin/yggdrasil -useconffile /etc/yggdrasil.conf | logger -t yggdrasil"
+
+ procd_close_instance
+}
+
+stop_service()
+{
+ killall yggdrasil
+}
+
+reload_service()
+{
+ restart
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger yggdrasil
+}
PKG_NAME:=zerotier
PKG_VERSION:=1.2.12
-PKG_RELEASE:=2
-
-PKG_LICENSE:=GPL-3.0
+PKG_RELEASE:=4
PKG_SOURCE_URL:=https://codeload.github.com/zerotier/ZeroTierOne/tar.gz/$(PKG_VERSION)?
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_HASH:=212799bfaeb5e7dff20f2cd83f15742c8e13b8e9535606cfb85abcfb5fb6fed4
PKG_BUILD_DIR:=$(BUILD_DIR)/ZeroTierOne-$(PKG_VERSION)
+PKG_MAINTAINER:=Moritz Warning <moritzwarning@web.de>
+PKG_LICENSE:=GPL-3.0-or-later
+PKG_LICENSE_FILES:=LICENSE.txt
PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
TITLE:=Create flat virtual Ethernet networks of almost unlimited size
URL:=https://www.zerotier.com
SUBMENU:=VPN
- MAINTAINER:=Moritz Warning <moritzwarning@web.de>
endef
define Package/zerotier/description
TARGET_CFLAGS += -ffunction-sections -fdata-sections
TARGET_LDFLAGS += -Wl,--gc-sections
+define Package/zerotier/conffiles
+/etc/config/zerotier
+endef
+
define Package/zerotier/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/zerotier-one $(1)/usr/bin/
index 0cd955d1..add1d3ae 100644
--- a/make-linux.mk
+++ b/make-linux.mk
-@@ -71,11 +71,11 @@ ifeq ($(ZT_DEBUG),1)
+@@ -63,11 +63,11 @@ ifeq ($(ZT_DEBUG),1)
# C25519 in particular is almost UNUSABLE in -O0 even on a 3ghz box!
node/Salsa20.o node/SHA512.o node/C25519.o node/Poly1305.o: CXXFLAGS=-Wall -O2 -g -pthread $(INCLUDES) $(DEFS)
else
--- /dev/null
+--- a/make-linux.mk
++++ b/make-linux.mk
+@@ -231,7 +231,7 @@ ifeq ($(ZT_OFFICIAL),1)
+ endif
+
+ # ARM32 hell -- use conservative CFLAGS
+-ifeq ($(ZT_ARCHITECTURE),3)
++ifeq (0,3)
+ ifeq ($(shell if [ -e /usr/bin/dpkg ]; then dpkg --print-architecture; fi),armel)
+ override CFLAGS+=-march=armv5 -mfloat-abi=soft -msoft-float -mno-unaligned-access -marm
+ override CXXFLAGS+=-march=armv5 -mfloat-abi=soft -msoft-float -mno-unaligned-access -marm
index 49e14f70..8e766bfb 100644
--- a/make-linux.mk
+++ b/make-linux.mk
-@@ -75,7 +75,7 @@ else
+@@ -67,7 +67,7 @@ else
override CFLAGS+=-Wall -Wno-deprecated -pthread $(INCLUDES) -DNDEBUG $(DEFS)
CXXFLAGS?=-O3 -fstack-protector
override CXXFLAGS+=-Wall -Wno-deprecated -std=c++11 -pthread $(INCLUDES) -DNDEBUG $(DEFS)
include $(TOPDIR)/rules.mk
PKG_NAME:=znc
-PKG_VERSION:=1.7.2
+PKG_VERSION:=1.7.4
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://znc.in/releases \
https://znc.in/releases/archive
-PKG_HASH:=60b4e78f54c532c32673d1ef8e5f606c530ef3a6d6b76ea1daa66459a86682a9
+PKG_HASH:=b1a32921a8e6d79ee6c5900c8d07293026966db7c05aaac48984231befc49b71
PKG_MAINTAINER:=Jonas Gorski <jonas.gorski@gmail.com>
PKG_LICENSE:=Apache-2.0
define Package/znc
$(Package/znc/default)
- DEPENDS:=+libopenssl +libpthread +libstdcpp +ZNC_ICU:icu +zlib
+ DEPENDS:=+libopenssl +libstdcpp +ZNC_ICU:icu +zlib
MENU:=1
endef
include $(INCLUDE_DIR)/package.mk
-CONFIGURE_VARS += \
- CXXFLAGS="$(TARGET_CFLAGS) -fno-builtin" \
- CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
- LDFLAGS="-nodefaultlibs -lc -L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
- LIBS="-lstdc++ -lm -lssl -lcrypto $(LIBGCC_S) -lc"
-
CONFIGURE_ARGS += \
$(if $(CONFIG_ZNC_ICU), --enable-charset, --disable-charset) \
--disable-cyrus \
--enable-tdns \
--enable-zlib
-define Build/Configure
- $(call Build/Configure/Default,)
- $(call libtool_disable_rpath)
-endef
-
define Build/Compile
$(call Build/Compile/Default,znc)
+$(MAKE_VARS) $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/modules \
+--- a/src/Utils.cpp
++++ b/src/Utils.cpp
+@@ -29,7 +29,7 @@
+ #include <openssl/ssl.h>
+ #include <openssl/bn.h>
+ #include <openssl/rsa.h>
+-#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || (LIBRESSL_VERSION_NUMBER < 0x20700000L)
++#if (OPENSSL_VERSION_NUMBER < 0x10100000L)
+ #define X509_getm_notBefore X509_get_notBefore
+ #define X509_getm_notAfter X509_get_notAfter
+ #endif
--- a/third_party/Csocket/Csocket.cc
+++ b/third_party/Csocket/Csocket.cc
@@ -47,10 +47,16 @@
#define HAVE_ERR_REMOVE_STATE
#ifdef OPENSSL_VERSION_NUMBER
# if OPENSSL_VERSION_NUMBER >= 0x10000000
-@@ -594,9 +600,11 @@ void ShutdownCsocket()
- #ifndef OPENSSL_IS_BORINGSSL
- CONF_modules_unload( 1 );
- #endif
+@@ -583,6 +589,7 @@ bool InitCsocket()
+ void ShutdownCsocket()
+ {
+ #ifdef HAVE_LIBSSL
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ #if defined( HAVE_ERR_REMOVE_THREAD_STATE )
+ ERR_remove_thread_state( NULL );
+ #elif defined( HAVE_ERR_REMOVE_STATE )
+@@ -597,6 +604,7 @@ void ShutdownCsocket()
ERR_free_strings();
EVP_cleanup();
CRYPTO_cleanup_all_ex_data();
include $(TOPDIR)/rules.mk
PKG_NAME:=fdk-aac
-PKG_VERSION:=0.1.6
-PKG_RELEASE:=2
+PKG_VERSION:=2.0.0
+PKG_RELEASE:=1
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
PKG_LICENSE:=Fraunhofer-FDK-AAC-for-Android
PKG_LICENSE_FILES:=NOTICE
PKG_SOURCE_URL=https://codeload.github.com/mstorsjo/fdk-aac/tar.gz/v$(PKG_VERSION)?
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=adbcd793e406e1b88b3c1c41382d49f8c27371485b823c0fdab69c9124fd2ce3
+PKG_HASH:=6e6c7921713788e31df655911e1d42620b057180b00bf16874f5d630e1d5b9a2
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
+++ /dev/null
-From a50eecf65b5ce5d4f03768c5c2cb4b492d2badad Mon Sep 17 00:00:00 2001
-From: Martin Storsjo <martin@martin.st>
-Date: Fri, 4 May 2018 12:46:44 +0300
-Subject: [PATCH] Fix overflows in accumulation, fixing crashes
-
-This fixes github issue #83.
----
- libSBRenc/src/tran_det.cpp | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/libSBRenc/src/tran_det.cpp b/libSBRenc/src/tran_det.cpp
-index 0e35ec3..51d6efe 100644
---- a/libSBRenc/src/tran_det.cpp
-+++ b/libSBRenc/src/tran_det.cpp
-@@ -256,12 +256,12 @@ static FIXP_DBL addLowbandEnergies(FIXP_DBL **Energies,
- /* freqBandTable[LORES] has MAX_FREQ_COEFFS/2 +1 coeefs max. */
- for (ts=tran_offdiv2; ts<YBufferWriteOffset; ts++) {
- for (k = 0; k < freqBandTable[0]; k++) {
-- accu1 += Energies[ts][k] >> 6;
-+ accu1 = fAddSaturate(accu1, Energies[ts][k] >> 6);
- }
- }
- for (; ts<tran_offdiv2+(slots>>nrgSzShift); ts++) {
- for (k = 0; k < freqBandTable[0]; k++) {
-- accu2 += Energies[ts][k] >> 9;
-+ accu2 = fAddSaturate(accu2, Energies[ts][k] >> 9);
- }
- }
-
PKG_NAME:=moc
PKG_VERSION:=2.5.2
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://ftp.daper.net/pub/soft/moc/stable/
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mocp $(1)/usr/bin/
$(INSTALL_DIR) $(1)/usr/lib/moc/decoder_plugins
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/moc/decoder_plugins/*.so $(1)/usr/lib/moc/decoder_plugins
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/moc/decoder_plugins/*.so $(1)/usr/lib/moc/decoder_plugins
endef
$(eval $(call BuildPackage,moc))
PKG_NAME:=mpd
PKG_VERSION:=0.20.23
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=http://www.musicpd.org/download/mpd/0.20/
define Package/mpd-full
$(call Package/mpd/Default)
TITLE+= (full)
- DEPENDS+= +libffmpeg +libid3tag +libmms +libupnp +libshout
+ DEPENDS+= +libffmpeg +libid3tag +libmms +libupnp +libshout +pulseaudio-daemon
PROVIDES:=mpd
VARIANT:=full
endef
/etc/avahi/services/mpd.service
endef
-EXTRA_LDFLAGS += $(if $(ICONV_FULL),-liconv,-Wl,--whole-archive -liconv -Wl,--no-whole-archive)
+EXTRA_LDFLAGS += $(if $(ICONV_FULL),-liconv,-Wl,--whole-archive -liconv -Wl,--no-whole-archive) -Wl,-rpath-link=$(STAGING_DIR)/usr/lib/pulseaudio
CONFIGURE_ARGS += \
$(call autoconf_bool,CONFIG_IPV6,ipv6) \
--disable-nfs \
--disable-openal \
--disable-opus \
- --disable-pulse \
--disable-sidplay \
--disable-smbclient \
--disable-sndfile \
--enable-pipe-output \
--enable-recorder-output \
--enable-shout \
+ --enable-pulse \
--disable-vorbis
endif
--disable-id3 \
--disable-mms \
--disable-shout \
+ --disable-pulse \
--enable-vorbis \
--with-tremor=yes \
--disable-recorder-output
PKG_NAME:=pulseaudio
PKG_VERSION:=12.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://freedesktop.org/software/pulseaudio/releases/
define Package/pulseaudio-tools
SECTION:=sound
CATEGORY:=Sound
- DEPENDS:=+libsndfile +pulseaudio
+ DEPENDS:=+libsndfile pulseaudio
TITLE:=Tools for Pulseaudio
URL:=http://www.pulseaudio.org
VARIANT:=noavahi
define Package/pulseaudio-profiles
SECTION:=sound
CATEGORY:=Sound
- DEPENDS:=+pulseaudio
+ DEPENDS:=pulseaudio
TITLE:=Profiles for Pulseaudio
URL:=http://www.pulseaudio.org
endef
include $(TOPDIR)/rules.mk
PKG_NAME:=squeezelite
-PKG_VERSION:=1.8.4-743
-PKG_RELEASE=2
+PKG_VERSION:=1.9.1-1130
+PKG_RELEASE:=2
PKG_LICENSE:=GPL-3.0
PKG_LICENSE_FILES:=LICENSE.txt
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/ralph-irving/squeezelite.git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=e37ed17fed9e11a7346cbe9f1e1deeccc051f42e
+PKG_SOURCE_VERSION:=451cad8da651073d18118fb9ca39faef550825ff
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
-PKG_MIRROR_HASH:=b6ea4a11366330790f5e36bd875b45bb19a9772dfc984c462f436dfca30256c0
+PKG_MIRROR_HASH:=e6082b486e364c8cbd7db96fc06dc5243242a3ac786113e42e3061c06ea8889e
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
endef
define Package/squeezelite/description/default
- Squeezelite is a small headless squeezebox emulator for linux using alsa audio output
- It is aimed at supporting high quality audio at multiple sample rates including
- 44.1/48/88.2/96/176.4/192k/352.8/384kHz
- Supported codecs: mp3, flac, ogg, aac, (wma and alac via ffmpeg)
+ Squeezelite is a small headless squeezebox emulator for linux using alsa audio output
+ It is aimed at supporting high quality audio at multiple sample rates including
+ 44.1/48/88.2/96/176.4/192k/352.8/384kHz
+ Supported codecs: mp3, flac, ogg, aac, (wma and alac via ffmpeg)
Native support for PCM builtin
Optional support of DSD playback via PCM for DoP capable DAC
Optional resampling to match sound device
endef
-define Package/squeezelite/description
+define Package/squeezelite-full/description
$(call Package/squeezelite/description/default)
- .
+
This package has all the audio codecs compiled in.
endef
define Package/squeezelite-mini/description
$(call Package/squeezelite/description/default)
- .
+
This package will dynamically load installed codecs.
endef
-#ifeq ($(CONFIG_SQUEEZELITE_WMA),y)
-# PKG_BUILD_DEPENDS+= libffmpeg-audio-dec
-#endif
-
-TARGET_CFLAGS+= -Wall -fPIC -O2 -DSELFPIPE
-
ifeq ($(CONFIG_SQUEEZELITE_WMA),y)
- TARGET_CFLAGS+= -DFFMPEG
+ opts+= -DFFMPEG
endif
ifeq ($(CONFIG_SQUEEZELITE_DSD),y)
- TARGET_CFLAGS+= -DDSD
+ opts+= -DDSD
endif
ifeq ($(CONFIG_SQUEEZELITE_RESAMPLE),y)
- TARGET_CFLAGS+= -DRESAMPLE
+ opts+= -DRESAMPLE
endif
-TARGET_LDFLAGS+= -lasound -lpthread -lm -lrt
-
ifeq ($(BUILD_VARIANT),full)
- TARGET_CFLAGS+= -DLINKALL
- TARGET_LDFLAGS+= -lvorbis -logg
+ opts+= -DLINKALL
endif
+MAKE_FLAGS+=OPTS="$(opts)"
+
+# Squeezelite uses functions which are deprecated in recent ffmpeg versions.
+# See https://github.com/ralph-irving/squeezelite/issues/60
+TARGET_CFLAGS+=-Wno-deprecated-declarations
+
define Package/squeezelite/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/squeezelite $(1)/usr/bin
-
config options 'options'
option name 'SqueezeWrt'
option model_name 'SqueezeLite'
option priority '0'
option max_sr '0'
option device 'hw:0,0'
- option decoder_auto_conf '1'
option dsd_over_pcm '0'
option ircontrol '0'
option interface ''
USE_PROCD=1
PROG=/usr/bin/squeezelite
-#
-# Auto config checks for existing codec installations if not specified in config
-# Explicit disable (override) by setting appropriate "decode_xxx" in config
-#
+# Check if a codec is disabled in the configuration (ie "decode_<codec> 0")
checkcodec() {
- config_get_bool auto_conf options "decoder_auto_conf" 1
- config_get_bool codec options "$1" $auto_conf
-
- if [ $codec -ne 0 ] ; then
- if [ $auto_conf -eq 0 ] ; then
- #force use requested
- echo "$4"
+ config_get_bool codec options "$1" 1
+
+ if [ $codec -eq 0 ] ; then
+ if [ -z "$3" ] ; then
+ echo "-e $2"
else
- if [ -e "/usr/lib/${2}" ] ; then
- # Use codec (it exists)
- echo "$4"
- else
- #exclude non-existant
- if [ -z "$4" ] ; then
- echo "-e $3"
- else
- echo "$4,$3"
- fi
- fi
- fi
- else
- # explicitly excluded
- if [ -z "$4" ] ; then
- echo "-e $3"
- else
- echo "$4,$3"
+ echo "$3,$2"
fi
+ else
+ echo "$3"
fi
}
config_get alsa_buffer options alsa_buffer 200
[ $alsa_buffer -eq 0 ] && alsa_buffer="200"
-
+
config_get alsa_period options alsa_period 4
[ $alsa_period -eq 0 ] && alsa_period="4"
-
+
config_get alsa_format options alsa_format 16
[ $alsa_format = "0" ] && alsa_format="16"
config_get priority options priority 0
[ $priority -ne 0 ] && cmdline="$cmdline -p $priority"
- #
- # ***NOTE: codec lib names are in squeezelite.h (set decode_auto_conf to 0 to ignore)
- #
local excl_codecs=""
- local vorbis_lib="libvorbisidec.so.1"
-
- excl_codecs=`checkcodec decode_flac "libFLAC.so.8" flac "$excl_codecs"`
- excl_codecs=`checkcodec decode_mp3 "libmpg123.so.0" mp3 "$excl_codecs"`
- excl_codecs=`checkcodec decode_aac "libfaad.so.2" aac "$excl_codecs"`
-
- [ -e "/usr/lib/$vorbis_lib" ] || vorbis_lib="libvorbisfile.so.3"
-
- excl_codecs=`checkcodec decode_ogg "$vorbis_lib" ogg "$excl_codecs"`
- excl_codecs=`checkcodec decode_wma_alac "libavcodec.so.56" wma,alac "$excl_codecs"`
+ excl_codecs=$(checkcodec decode_flac flac "$excl_codecs")
+ excl_codecs=$(checkcodec decode_mp3 mp3 "$excl_codecs")
+ excl_codecs=$(checkcodec decode_aac aac "$excl_codecs")
+ excl_codecs=$(checkcodec decode_ogg ogg "$excl_codecs")
+ excl_codecs=$(checkcodec decode_wma_alac wma,alac "$excl_codecs")
cmdline="$cmdline $excl_codecs"
config_get dop options dsd_over_pcm 0
+++ /dev/null
-From 1c53ed7db5b49ebf347efe65dbf9b740f9d54557 Mon Sep 17 00:00:00 2001
-From: Carlo Landmeter <clandmeter@gmail.com>
-Date: Tue, 31 Mar 2015 09:52:53 +0000
-Subject: [PATCH] respect LDFLAGS
-
----
- Makefile | 17 +++++++++--------
- 1 file changed, 9 insertions(+), 8 deletions(-)
-
---- a/Makefile
-+++ b/Makefile
-@@ -1,6 +1,7 @@
- # Cross compile support - create a Makefile which defines these three variables and then includes this Makefile...
--CFLAGS ?= -Wall -fPIC -O2 $(OPTS)
--LDFLAGS ?= -lasound -lpthread -lm -lrt
-+CFLAGS ?= -Wall -O2
-+CFLAGS += -fPIC $(OPTS)
-+LIBS ?= -lasound -lpthread -lm -lrt
- EXECUTABLE ?= squeezelite
-
- # passing one or more of these in $(OPTS) enables optional feature inclusion
-@@ -52,20 +53,20 @@ endif
-
- # add optional link options
- ifneq (,$(findstring $(OPT_LINKALL), $(CFLAGS)))
-- LDFLAGS += $(LINKALL)
-+ LIBS += $(LINKALL)
- ifneq (,$(findstring $(OPT_FF), $(CFLAGS)))
-- LDFLAGS += $(LINKALL_FF)
-+ LIBS += $(LINKALL_FF)
- endif
- ifneq (,$(findstring $(OPT_RESAMPLE), $(CFLAGS)))
-- LDFLAGS += $(LINKALL_RESAMPLE)
-+ LIBS += $(LINKALL_RESAMPLE)
- endif
- ifneq (,$(findstring $(OPT_IR), $(CFLAGS)))
-- LDFLAGS += $(LINKALL_IR)
-+ LIBS += $(LINKALL_IR)
- endif
- else
- # if not LINKALL and linux add LINK_LINUX
- ifeq ($(UNAME), Linux)
-- LDFLAGS += $(LINK_LINUX)
-+ LIBS += $(LINK_LINUX)
- endif
- endif
-
-@@ -74,7 +75,7 @@ OBJECTS = $(SOURCES:.c=.o)
- all: $(EXECUTABLE)
-
- $(EXECUTABLE): $(OBJECTS)
-- $(CC) $(OBJECTS) $(LDFLAGS) -o $@
-+ $(CC) $(OBJECTS) $(LDFLAGS) $(LIBS) -o $@
-
- $(OBJECTS): $(DEPS)
-
---- a/main.c
-+++ b/main.c
-@@ -78,6 +78,7 @@ static void usage(const char *argv0) {
+Index: squeezelite-1.9.1-1130/main.c
+===================================================================
+--- squeezelite-1.9.1-1130.orig/main.c
++++ squeezelite-1.9.1-1130/main.c
+@@ -84,6 +84,7 @@ static void usage(const char *argv0) {
#if IR
" -i [<filename>]\tEnable lirc remote control support (lirc config file ~/.lircrc used if filename not specified)\n"
#endif
-+ " -I <interface>\t\tNetwork interface used to send discovery\n"
++ " -I <interface>\tNetwork interface used to send discovery\n"
" -m <mac addr>\t\tSet mac address, format: ab:cd:ef:12:34:56\n"
" -M <modelname>\tSet the squeezelite player model name sent to the server (default: " MODEL_NAME_STRING ")\n"
" -n <name>\t\tSet the player name\n"
-@@ -233,6 +234,8 @@ int main(int argc, char **argv) {
- extern bool pcm_check_header;
+@@ -267,6 +268,8 @@ int main(int argc, char **argv) {
+ extern bool user_rates;
char *logfile = NULL;
u8_t mac[6];
+ char *iface = NULL;
unsigned stream_buf_size = STREAMBUF_SIZE;
unsigned output_buf_size = 0; // set later
unsigned rates[MAX_SUPPORTED_SAMPLERATES] = { 0 };
-@@ -271,6 +274,7 @@ int main(int argc, char **argv) {
+@@ -307,6 +310,7 @@ int main(int argc, char **argv) {
int maxSampleRate = 0;
char *optarg = NULL;
int optind = 1;
int i;
-@@ -278,8 +282,6 @@ int main(int argc, char **argv) {
+@@ -314,8 +318,6 @@ int main(int argc, char **argv) {
#define MAXCMDLINE 512
char cmdline[MAXCMDLINE] = "";
for (i = 0; i < argc && (strlen(argv[i]) + strlen(cmdline) + 2 < MAXCMDLINE); i++) {
strcat(cmdline, argv[i]);
strcat(cmdline, " ");
-@@ -287,7 +289,7 @@ int main(int argc, char **argv) {
+@@ -323,7 +325,7 @@ int main(int argc, char **argv) {
while (optind < argc && strlen(argv[optind]) >= 2 && argv[optind][0] == '-') {
char *opt = argv[optind] + 1;
- if (strstr("oabcCdefmMnNpPrs"
+ if (strstr("oabcCdefImMnNpPrs"
#if ALSA
- "UV"
+ "UVO"
#endif
-@@ -382,6 +384,9 @@ int main(int argc, char **argv) {
+@@ -424,6 +426,9 @@ int main(int argc, char **argv) {
case 'f':
logfile = optarg;
break;
case 'm':
{
int byte = 0;
-@@ -667,6 +672,11 @@ int main(int argc, char **argv) {
+@@ -733,6 +738,11 @@ int main(int argc, char **argv) {
winsock_init();
#endif
stream_init(log_stream, stream_buf_size);
if (!strcmp(output_device, "-")) {
-@@ -710,7 +720,7 @@ int main(int argc, char **argv) {
+@@ -776,7 +786,7 @@ int main(int argc, char **argv) {
exit(1);
}
decode_close();
stream_close();
---- a/squeezelite.h
-+++ b/squeezelite.h
-@@ -403,7 +403,7 @@ typedef enum { EVENT_TIMEOUT = 0, EVENT_
+Index: squeezelite-1.9.1-1130/squeezelite.h
+===================================================================
+--- squeezelite-1.9.1-1130.orig/squeezelite.h
++++ squeezelite-1.9.1-1130/squeezelite.h
+@@ -414,7 +414,7 @@ typedef enum { EVENT_TIMEOUT = 0, EVENT_
char *next_param(char *src, char c);
u32_t gettime_ms(void);
void set_nonblock(sockfd s);
int connect_timeout(sockfd sock, const struct sockaddr *addr, socklen_t addrlen, int timeout);
void server_addr(char *server, in_addr_t *ip_ptr, unsigned *port_ptr);
-@@ -459,7 +459,7 @@ void buf_init(struct buffer *buf, size_t
+@@ -470,7 +470,7 @@ void buf_init(struct buffer *buf, size_t
void buf_destroy(struct buffer *buf);
// slimproto.c
void slimproto_stop(void);
void wake_controller(void);
---- a/slimproto.c
-+++ b/slimproto.c
-@@ -119,7 +119,7 @@ void send_packet(u8_t *packet, size_t le
+Index: squeezelite-1.9.1-1130/slimproto.c
+===================================================================
+--- squeezelite-1.9.1-1130.orig/slimproto.c
++++ squeezelite-1.9.1-1130/slimproto.c
+@@ -113,7 +113,7 @@ void send_packet(u8_t *packet, size_t le
}
}
const char *base_cap = "Model=squeezelite,AccuratePlayPoints=1,HasDigitalOut=1,HasPolarityInversion=1,Firmware=" VERSION;
struct HELO_packet pkt;
-@@ -782,7 +782,7 @@ void wake_controller(void) {
+@@ -757,7 +757,7 @@ void wake_controller(void) {
wake_signal(wake_e);
}
--in_addr_t discover_server(void) {
-+in_addr_t discover_server(in_addr_t bcast_addr) {
+-in_addr_t discover_server(char *default_server) {
++in_addr_t discover_server(char *default_server, in_addr_t bcast_addr) {
struct sockaddr_in d;
struct sockaddr_in s;
char *buf;
-@@ -798,7 +798,7 @@ in_addr_t discover_server(void) {
+@@ -774,7 +774,7 @@ in_addr_t discover_server(char *default_
memset(&d, 0, sizeof(d));
d.sin_family = AF_INET;
d.sin_port = htons(PORT);
pollinfo.fd = disc_sock;
pollinfo.events = POLLIN;
-@@ -829,7 +829,7 @@ in_addr_t discover_server(void) {
+@@ -809,7 +809,7 @@ in_addr_t discover_server(char *default_
#define FIXED_CAP_LEN 256
#define VAR_CAP_LEN 128
struct sockaddr_in serv_addr;
static char fixed_cap[FIXED_CAP_LEN], var_cap[VAR_CAP_LEN] = "";
bool reconnect = false;
-@@ -849,7 +849,7 @@ void slimproto(log_level level, char *se
+@@ -830,7 +830,7 @@ void slimproto(log_level level, char *se
}
if (!slimproto_ip) {
-- slimproto_ip = discover_server();
-+ slimproto_ip = discover_server(bcast_addr);
+- slimproto_ip = discover_server(server);
++ slimproto_ip = discover_server(server, bcast_addr);
}
if (!slimproto_port) {
-@@ -924,7 +924,7 @@ void slimproto(log_level level, char *se
+@@ -911,7 +911,7 @@ void slimproto(log_level level, char *se
// rediscover server if it was not set at startup
if (!server && ++failed_connect > 5) {
-- slimproto_ip = serv_addr.sin_addr.s_addr = discover_server();
-+ slimproto_ip = serv_addr.sin_addr.s_addr = discover_server(bcast_addr);
+- slimproto_ip = serv_addr.sin_addr.s_addr = discover_server(NULL);
++ slimproto_ip = serv_addr.sin_addr.s_addr = discover_server(NULL, bcast_addr);
}
} else {
---- a/utils.c
-+++ b/utils.c
+Index: squeezelite-1.9.1-1130/utils.c
+===================================================================
+--- squeezelite-1.9.1-1130.orig/utils.c
++++ squeezelite-1.9.1-1130/utils.c
@@ -22,11 +22,11 @@
#include "squeezelite.h"
// logging functions
const char *logtime(void) {
static char buf[100];
-@@ -114,58 +110,101 @@ u32_t gettime_ms(void) {
+@@ -114,58 +110,94 @@ u32_t gettime_ms(void) {
#endif
}
+ loglevel = level;
+
+ // Check for non-zero MAC
-+ if ((mac[0] | mac[1] | mac[2]) != 0)
++ if (mac[0] | mac[1] | mac[2] != 0)
+ have_mac = 1;
+
-+ // Copy interface name, if it was provided.
-+ if (iface != NULL)
-+ {
-+ if( strlen(iface) > sizeof(ifname) )
-+ return -1;
-
-+ strncpy(ifname, iface, sizeof(ifname));
-+ have_ifname = 1;
++ // Copy interface name, if it was provided.
++ if (iface != NULL) {
++ if (strlen(iface) > sizeof(ifname))
++ return -1;
+
++ strncpy(ifname, iface, sizeof(ifname));
++ have_ifname = 1;
}
- mac[0] = mac[1] = mac[2] = mac[3] = mac[4] = mac[5] = 0;
+ for (ifa = addrs; ifa; ifa = ifa->ifa_next) {
+ // Skip LOOPBACK interfaces, DOWN interfaces and interfaces that
+ // don't support BROADCAST.
-+ if ((ifa->ifa_flags & IFF_LOOPBACK)
-+ || !(ifa->ifa_flags & IFF_UP)
-+ || !(ifa->ifa_flags & IFF_BROADCAST))
-+ {
++ if (ifa->ifa_flags & IFF_LOOPBACK
++ || !ifa->ifa_flags & IFF_UP
++ || !ifa->ifa_flags & IFF_BROADCAST) {
+ continue;
+ }
- int s = socket(AF_INET, SOCK_DGRAM, 0);
-+ if (!have_ifname)
-+ {
++ if (!have_ifname) {
+ // We have found a valid interface name. Keep it.
+ strncpy(ifname, ifa->ifa_name, sizeof(ifname));
+ have_ifname = 1;
+ } else {
-+ if (strncmp(ifname, ifa->ifa_name, sizeof(ifname)) != 0)
-+ {
++ if (strncmp(ifname, ifa->ifa_name, sizeof(ifname)) != 0) {
+ // This is not the interface we're looking for.
+ continue;
+ }
- if (ioctl(s, SIOCGIFCONF, &ifc) == 0) {
- ifend = ifs + (ifc.ifc_len / sizeof(struct ifreq));
+ // Check address family.
-+ if ((ifa->ifa_addr->sa_family == AF_INET) &&
-+ (((struct sockaddr_in *)ifa->ifa_broadaddr)->sin_addr.s_addr != 0))
-+ {
++ if (ifa->ifa_addr && ifa->ifa_addr->sa_family == AF_INET &&
++ ((struct sockaddr_in *)ifa->ifa_broadaddr)->sin_addr.s_addr != 0) {
+ // Get broadcast address and MAC address
+ bcast_addr = ((struct sockaddr_in *)ifa->ifa_broadaddr)->sin_addr.s_addr;
+ break;
+ }
-+ else
-+ {
++ else {
+ // Address is not IPv4
+ if (iface == NULL)
+ have_ifname = 0;
+ }
-+
+ }
- for (ifr = ifc.ifc_req; ifr < ifend; ifr++) {
- break;
- }
+ // Find MAC address matching interface
-+ if (!have_mac && (bcast_addr != 0)) {
++ if (!have_mac && bcast_addr != 0) {
+ for (ifa = addrs; ifa; ifa = ifa->ifa_next) {
-+ if ((ifa->ifa_addr->sa_family == PF_PACKET) &&
-+ (strncmp(ifname, ifa->ifa_name, sizeof(ifname)) == 0)) {
++ if (ifa->ifa_addr && ifa->ifa_addr->sa_family == PF_PACKET &&
++ strncmp(ifname, ifa->ifa_name, sizeof(ifname)) == 0) {
+ sdl = (struct sockaddr *)(ifa->ifa_addr);
+ ptr = (unsigned char *)sdl->sa_data;
+ memcpy(mac, ptr + 10, 6);
#if SUN
void get_mac(u8_t mac[]) {
struct arpreq parpreq;
-@@ -232,30 +271,6 @@ void get_mac(u8_t mac[]) {
+@@ -232,30 +264,6 @@ void get_mac(u8_t mac[]) {
}
#endif
---- a/Makefile
-+++ b/Makefile
-@@ -15,7 +15,7 @@ OPT_IR = -DIR
+Index: squeezelite-1.9.1-1130/Makefile
+===================================================================
+--- squeezelite-1.9.1-1130.orig/Makefile
++++ squeezelite-1.9.1-1130/Makefile
+@@ -17,7 +17,7 @@ OPT_NO_FAAD = -DNO_FAAD
SOURCES = \
main.c slimproto.c buffer.c stream.c utils.c \
output.c output_alsa.c output_pa.c output_stdout.c output_pack.c decode.c \
-- flac.c pcm.c mad.c vorbis.c faad.c mpg.c
-+ flac.c pcm.c vorbis.c faad.c mpg.c
+- flac.c pcm.c mad.c vorbis.c mpg.c
++ flac.c pcm.c vorbis.c mpg.c
SOURCES_DSD = dsd.c dop.c dsd2pcm/dsd2pcm.c
SOURCES_FF = ffmpeg.c
-@@ -25,7 +25,7 @@ SOURCES_IR = ir.c
-
+@@ -30,7 +30,7 @@ SOURCES_FAAD = faad.c
LINK_LINUX = -ldl
+ LINK_RPI = -lwiringPi
--LINKALL = -lFLAC -lmad -lvorbisfile -lfaad -lmpg123
-+LINKALL = -lFLAC -lvorbisfile -lfaad -lmpg123
+-LINKALL = -lFLAC -lmad -lvorbisfile -lmpg123
++LINKALL = -lFLAC -lvorbisfile -lmpg123
LINKALL_FF = -lavcodec -lavformat -lavutil
LINKALL_RESAMPLE = -lsoxr
LINKALL_IR = -llirc_client
---- a/decode.c
-+++ b/decode.c
-@@ -145,8 +145,8 @@ void decode_init(log_level level, const
- if (!strstr(exclude_codecs, "pcm") && (!include_codecs || strstr(include_codecs, "pcm"))) codecs[i++] = register_pcm();
+Index: squeezelite-1.9.1-1130/decode.c
+===================================================================
+--- squeezelite-1.9.1-1130.orig/decode.c
++++ squeezelite-1.9.1-1130/decode.c
+@@ -176,11 +176,7 @@ void decode_init(log_level level, const
+ if (!strstr(exclude_codecs, "pcm") && (!include_codecs || (order_codecs = strstr(include_codecs, "pcm"))))
+ sort_codecs((include_codecs ? order_codecs - include_codecs : i), register_pcm());
- // try mad then mpg for mp3 unless command line option passed
+- // try mad then mpg for mp3 unless command line option passed
- if (!(strstr(exclude_codecs, "mp3") || strstr(exclude_codecs, "mad")) &&
-- (!include_codecs || strstr(include_codecs, "mp3") || strstr(include_codecs, "mad"))) codecs[i] = register_mad();
-+// if (!(strstr(exclude_codecs, "mp3") || strstr(exclude_codecs, "mad")) &&
-+// (!include_codecs || strstr(include_codecs, "mp3") || strstr(include_codecs, "mad"))) codecs[i] = register_mad();
- if (!(strstr(exclude_codecs, "mp3") || strstr(exclude_codecs, "mpg")) && !codecs[i] &&
- (!include_codecs || strstr(include_codecs, "mp3") || strstr(include_codecs, "mpg"))) codecs[i] = register_mpg();
+- (!include_codecs || (order_codecs = strstr(include_codecs, "mp3")) || (order_codecs = strstr(include_codecs, "mad"))))
+- sort_codecs((include_codecs ? order_codecs - include_codecs : i), register_mad());
+- else if (!(strstr(exclude_codecs, "mp3") || strstr(exclude_codecs, "mpg")) &&
++ if (!(strstr(exclude_codecs, "mp3") || strstr(exclude_codecs, "mpg")) &&
+ (!include_codecs || (order_codecs = strstr(include_codecs, "mp3")) || (order_codecs = strstr(include_codecs, "mpg"))))
+ sort_codecs((include_codecs ? order_codecs - include_codecs : i), register_mpg());
---- a/main.c
-+++ b/main.c
-@@ -39,7 +39,8 @@
+Index: squeezelite-1.9.1-1130/main.c
+===================================================================
+--- squeezelite-1.9.1-1130.orig/main.c
++++ squeezelite-1.9.1-1130/main.c
+@@ -44,7 +44,7 @@
#else
#define CODECS_DSD ""
#endif
-#define CODECS_MP3 " (mad,mpg for specific mp3 codec)"
-+//#define CODECS_MP3 " (mad,mpg for specific mp3 codec)"
-+#define CODECS_MP3 " (mpg123 for specific mp3 codec)"
++#define CODECS_MP3 ""
- #define CODECS CODECS_BASE CODECS_FF CODECS_DSD CODECS_MP3
+ #define CODECS CODECS_BASE CODECS_AAC CODECS_FF CODECS_DSD CODECS_MP3
---- a/squeezelite.h
-+++ b/squeezelite.h
-@@ -154,7 +154,7 @@
+Index: squeezelite-1.9.1-1130/squeezelite.h
+===================================================================
+--- squeezelite-1.9.1-1130.orig/squeezelite.h
++++ squeezelite-1.9.1-1130/squeezelite.h
+@@ -163,7 +163,6 @@
#if LINUX
#define LIBFLAC "libFLAC.so.8"
-#define LIBMAD "libmad.so.0"
-+//#define LIBMAD "libmad.so.0"
#define LIBMPG "libmpg123.so.0"
#define LIBVORBIS "libvorbisfile.so.3"
#define LIBTREMOR "libvorbisidec.so.1"
-@@ -168,7 +168,7 @@
+@@ -177,7 +176,6 @@
#if OSX
#define LIBFLAC "libFLAC.8.dylib"
-#define LIBMAD "libmad.0.dylib"
-+//#define LIBMAD "libmad.0.dylib"
#define LIBMPG "libmpg123.0.dylib"
#define LIBVORBIS "libvorbisfile.3.dylib"
#define LIBTREMOR "libvorbisidec.1.dylib"
-@@ -181,7 +181,7 @@
+@@ -190,7 +188,6 @@
#if WIN
#define LIBFLAC "libFLAC.dll"
-#define LIBMAD "libmad-0.dll"
-+//#define LIBMAD "libmad-0.dll"
#define LIBMPG "libmpg123-0.dll"
#define LIBVORBIS "libvorbisfile.dll"
#define LIBTREMOR "libvorbisidec.dll"
-@@ -194,7 +194,7 @@
+@@ -203,7 +200,6 @@
#if FREEBSD
#define LIBFLAC "libFLAC.so.11"
-#define LIBMAD "libmad.so.2"
-+//#define LIBMAD "libmad.so.2"
#define LIBMPG "libmpg123.so.0"
#define LIBVORBIS "libvorbisfile.so.6"
#define LIBTREMOR "libvorbisidec.so.1"
+++ /dev/null
---- a/output_alsa.c
-+++ b/output_alsa.c
-@@ -911,8 +911,11 @@ void output_init_alsa(log_level level, c
- LOG_INFO("memory locked");
- }
-
-+#ifdef M_TRIM_THRESHOLD
-+ // mallopt is not defined in musl libc
- mallopt(M_TRIM_THRESHOLD, -1);
- mallopt(M_MMAP_MAX, 0);
-+#endif
-
- touch_memory(silencebuf, MAX_SILENCE_FRAMES * BYTES_PER_FRAME);
- touch_memory(outputbuf->buf, outputbuf->size);
+++ /dev/null
---- a/faad.c
-+++ b/faad.c
-@@ -594,6 +594,8 @@ static bool load_faad() {
- return false;
- }
-
-+ err = dlerror(); // Reset previous dynamic linking error string (if there was)
-+
- a->NeAACDecGetCurrentConfiguration = dlsym(handle, "NeAACDecGetCurrentConfiguration");
- a->NeAACDecSetConfiguration = dlsym(handle, "NeAACDecSetConfiguration");
- a->NeAACDecOpen = dlsym(handle, "NeAACDecOpen");
---- a/ffmpeg.c
-+++ b/ffmpeg.c
-@@ -620,6 +620,8 @@ static bool load_ff() {
- return false;
- }
-
-+ err = dlerror(); // Reset previous dynamic linking error string (if there was)
-+
- sprintf(name, LIBAVFORMAT, LIBAVFORMAT_VERSION_MAJOR);
- handle_format = dlopen(name, RTLD_NOW);
- if (!handle_format) {
---- a/flac.c
-+++ b/flac.c
-@@ -241,6 +241,8 @@ static bool load_flac() {
- return false;
- }
-
-+ err = dlerror(); // Reset previous dynamic linking error string (if there was)
-+
- f->FLAC__StreamDecoderErrorStatusString = dlsym(handle, "FLAC__StreamDecoderErrorStatusString");
- f->FLAC__StreamDecoderStateString = dlsym(handle, "FLAC__StreamDecoderStateString");
- f->FLAC__stream_decoder_new = dlsym(handle, "FLAC__stream_decoder_new");
---- a/ir.c
-+++ b/ir.c
-@@ -168,10 +168,10 @@ static void *ir_thread() {
- UNLOCK_I;
- wake_controller();
- }
--
-+
- free(code);
- }
--
-+
- return 0;
- }
-
-@@ -185,6 +185,8 @@ static bool load_lirc() {
- return false;
- }
-
-+ err = dlerror(); // Reset previous dynamic linking error string (if there was)
-+
- i->lirc_init = dlsym(handle, "lirc_init");
- i->lirc_deinit = dlsym(handle, "lirc_deinit");
- i->lirc_readconfig = dlsym(handle, "lirc_readconfig");
---- a/mad.c
-+++ b/mad.c
-@@ -365,7 +365,9 @@ static bool load_mad() {
- LOG_INFO("dlerror: %s", dlerror());
- return false;
- }
--
-+
-+ err = dlerror(); // Reset previous dynamic linking error string (if there was)
-+
- m->mad_stream_init = dlsym(handle, "mad_stream_init");
- m->mad_frame_init = dlsym(handle, "mad_frame_init");
- m->mad_synth_init = dlsym(handle, "mad_synth_init");
---- a/mpg.c
-+++ b/mpg.c
-@@ -222,7 +222,9 @@ static bool load_mpg() {
- LOG_INFO("dlerror: %s", dlerror());
- return false;
- }
--
-+
-+ err = dlerror(); // Reset previous dynamic linking error string (if there was)
-+
- m->mpg123_init = dlsym(handle, "mpg123_init");
- m->mpg123_feature = dlsym(handle, "mpg123_feature");
- m->mpg123_rates = dlsym(handle, "mpg123_rates");
---- a/resample.c
-+++ b/resample.c
-@@ -251,6 +251,8 @@ static bool load_soxr(void) {
- return false;
- }
-
-+ err = dlerror(); // Reset previous dynamic linking error string (if there was)
-+
- r->soxr_io_spec = dlsym(handle, "soxr_io_spec");
- r->soxr_quality_spec = dlsym(handle, "soxr_quality_spec");
- r->soxr_create = dlsym(handle, "soxr_create");
---- a/vorbis.c
-+++ b/vorbis.c
-@@ -287,6 +287,8 @@ static bool load_vorbis() {
- }
- }
-
-+ err = dlerror(); // Reset previous dynamic linking error string (if there was)
-+
- v->ov_read = tremor ? NULL : dlsym(handle, "ov_read");
- v->ov_read_tremor = tremor ? dlsym(handle, "ov_read") : NULL;
- v->ov_info = dlsym(handle, "ov_info");
include $(TOPDIR)/rules.mk
PKG_NAME:=attendedsysupgrade-common
-PKG_VERSION:=0.1
-PKG_RELEASE:=2
+PKG_VERSION:=0.2
+PKG_RELEASE:=1
PKG_LICENSE:=GPL-2.0
include $(INCLUDE_DIR)/package.mk
TITLE:=Common files neede by attendedsysupgrade packages
MAINTAINER:=Paul Spooren <paul@spooren.de>
DEPENDS:=+rpcd +rpcd-mod-rpcsys
+ PKGARCH:=all
endef
define Package/attendedsysupgrade-common/description
define Package/attendedsysupgrade-common/install
$(INSTALL_DIR) $(1)/etc/uci-defaults/
$(INSTALL_BIN) ./files/attendedsysupgrade.defaults $(1)/etc/uci-defaults/attendedsysupgrade
+
+ $(INSTALL_DIR) $(1)/etc/opkg/keys/
+ $(INSTALL_BIN) ./files/c06d891233ba699 $(1)/etc/opkg/keys/c06d891233ba699
endef
$(eval $(call BuildPackage,attendedsysupgrade-common))
uci -q batch <<EOF
set attendedsysupgrade.server=server
-set attendedsysupgrade.server.url='https://example.org'
+set attendedsysupgrade.server.url='https://chef.libremesh.org'
set attendedsysupgrade.client=client
set attendedsysupgrade.client.upgrade_packages='1'
--- /dev/null
+untrusted comment: public key c06d891233ba699
+RWQMBtiRIzummeTc81jtKdJ3XwnaZGtHLRwjls0ovGsKoTnTmS7fj4Na
include $(TOPDIR)/rules.mk
PKG_NAME:=auc
-PKG_VERSION:=0.0.9
-PKG_RELEASE:=2
+PKG_VERSION:=0.1.4
+PKG_RELEASE:=1
PKG_LICENSE:=GPL-3.0
include $(INCLUDE_DIR)/package.mk
CATEGORY:=Base system
TITLE:=Attended sysUpgrade CLI (EXPERIMENTAL)
DEPENDS:=+attendedsysupgrade-common +libblobmsg-json +libubox +libubus \
- +libuci +libuclient +rpcd-mod-rpcsys
+ +libuci +libuclient +rpcd-mod-rpcsys +ucert
endef
define Package/auc/description
*/
#define _GNU_SOURCE
-#define AUC_VERSION "0.0.9"
+#define AUC_VERSION "0.1.4"
#include <fcntl.h>
#include <dlfcn.h>
static int output_fd = -1;
static int retry, imagebuilder, building, ibready;
static char *board_name = NULL;
-static char *target = NULL, *subtarget = NULL;
-static char *distribution = NULL, *version = NULL;
+static char *target = NULL;
+static char *distribution = NULL, *version = NULL, *revision = NULL;
static int uptodate;
static char *filename = NULL;
static int rc;
enum {
RELEASE_DISTRIBUTION,
RELEASE_VERSION,
+ RELEASE_REVISION,
RELEASE_TARGET,
__RELEASE_MAX,
};
static const struct blobmsg_policy release_policy[__RELEASE_MAX] = {
[RELEASE_DISTRIBUTION] = { .name = "distribution", .type = BLOBMSG_TYPE_STRING },
[RELEASE_VERSION] = { .name = "version", .type = BLOBMSG_TYPE_STRING },
+ [RELEASE_REVISION] = { .name = "revision", .type = BLOBMSG_TYPE_STRING },
[RELEASE_TARGET] = { .name = "target", .type = BLOBMSG_TYPE_STRING },
};
*/
enum {
UPGTEST_CODE,
- UPGTEST_STDOUT,
+ UPGTEST_STDERR,
__UPGTEST_MAX,
};
static const struct blobmsg_policy upgtest_policy[__UPGTEST_MAX] = {
[UPGTEST_CODE] = { .name = "code", .type = BLOBMSG_TYPE_INT32 },
- [UPGTEST_STDOUT] = { .name = "stdout", .type = BLOBMSG_TYPE_STRING },
+ [UPGTEST_STDERR] = { .name = "stderr", .type = BLOBMSG_TYPE_STRING },
};
static const struct blobmsg_policy image_policy[__IMAGE_MAX] = {
[IMAGE_REQHASH] = { .name = "request_hash", .type = BLOBMSG_TYPE_STRING },
- [IMAGE_URL] = { .name = "url", .type = BLOBMSG_TYPE_STRING },
[IMAGE_FILES] = { .name = "files", .type = BLOBMSG_TYPE_STRING },
[IMAGE_SYSUPGRADE] = { .name = "sysupgrade", .type = BLOBMSG_TYPE_STRING },
};
return;
}
- blobmsg_add_field(buf, BLOBMSG_TYPE_TABLE, "packages", blobmsg_data(tb[PACKAGELIST_PACKAGES]), blobmsg_data_len(tb[PACKAGELIST_PACKAGES]));
+ blobmsg_add_field(buf, BLOBMSG_TYPE_TABLE, "installed", blobmsg_data(tb[PACKAGELIST_PACKAGES]), blobmsg_data_len(tb[PACKAGELIST_PACKAGES]));
};
/*
blobmsg_parse(release_policy, __RELEASE_MAX, rel,
blobmsg_data(tb[BOARD_RELEASE]), blobmsg_data_len(tb[BOARD_RELEASE]));
- if (!rel[RELEASE_TARGET]) {
- fprintf(stderr, "No target received\n");
+ if (!rel[RELEASE_TARGET] ||
+ !rel[RELEASE_DISTRIBUTION] ||
+ !rel[RELEASE_VERSION] ||
+ !rel[RELEASE_REVISION]) {
+ fprintf(stderr, "No release information received\n");
rc=-1;
return;
}
target = strdup(blobmsg_get_string(rel[RELEASE_TARGET]));
- subtarget = strchr(target, '/');
- *subtarget++ = '\0';
-
distribution = strdup(blobmsg_get_string(rel[RELEASE_DISTRIBUTION]));
version = strdup(blobmsg_get_string(rel[RELEASE_VERSION]));
+ revision = strdup(blobmsg_get_string(rel[RELEASE_REVISION]));
blobmsg_add_string(buf, "distro", distribution);
blobmsg_add_string(buf, "target", target);
- blobmsg_add_string(buf, "subtarget", subtarget);
blobmsg_add_string(buf, "version", version);
+ blobmsg_add_string(buf, "revision", revision);
}
/*
}
*valid = (blobmsg_get_u32(tb[UPGTEST_CODE]) == 0)?1:0;
- if (*valid == 0)
- fprintf(stderr, "%s", blobmsg_get_string(tb[UPGTEST_STDOUT]));
+
+ if (tb[UPGTEST_STDERR])
+ fprintf(stderr, "%s", blobmsg_get_string(tb[UPGTEST_STDERR]));
+ else if (*valid == 0)
+ fprintf(stderr, "image verification failed\n");
+ else
+ fprintf(stderr, "image verification succeeded\n");
};
/**
request_done(cl);
rc=-1;
break;
+ case 409:
+ fprintf(stderr, "Conflicting packages requested\n");
+ request_done(cl);
+ rc=-2;
+ break;
case 412:
- fprintf(stderr, "%s target %s/%s (%s) not found. Please report this at %s\n",
- distribution, target, subtarget, board_name, server_issues);
+ fprintf(stderr, "%s target %s (%s) not found. Please report this at %s\n",
+ distribution, target, board_name, server_issues);
request_done(cl);
rc=-2;
break;
return 0;
}
-/**
- * use busybox sha256sum to verify sha256sums file
- */
-static int sha256sum_v(const char *sha256file, const char *msgfile) {
- pid_t pid;
- int fds[2];
- int status;
- FILE *f = fopen(sha256file, "r");
- char sumline[512] = {};
- char *fname;
- unsigned int fnlen;
- unsigned int cnt = 0;
-
- if (pipe(fds))
- return -1;
-
- if (!f)
- return -1;
-
-
- pid = fork();
- switch (pid) {
- case -1:
- return -1;
-
- case 0:
- uloop_done();
-
- dup2(fds[0], 0);
- close(1);
- close(2);
- close(fds[0]);
- close(fds[1]);
- if (execl("/bin/busybox", "/bin/busybox", "sha256sum", "-s", "-c", NULL));
- return -1;
-
- break;
-
- default:
- while (fgets(sumline, sizeof(sumline), f)) {
- fname = &sumline[66];
- fnlen = strlen(fname);
- fname[fnlen-1] = '\0';
- if (!strcmp(fname, msgfile)) {
- fname[fnlen-1] = '\n';
- write(fds[1], sumline, strlen(sumline));
- cnt++;
- }
- }
- fclose(f);
- close(fds[1]);
- waitpid(pid, &status, 0);
- close(fds[0]);
-
- if (cnt == 1)
- return WEXITSTATUS(status);
- else
- return -1;
- }
-
- return -1;
-}
-
-/**
- * use usign to verify sha256sums.sig
- */
-static int usign_v(const char *file) {
- pid_t pid;
- int status;
-
- pid = fork();
- switch (pid) {
- case -1:
- return -1;
-
- case 0:
- uloop_done();
-
- if (execl("/usr/bin/usign", "/usr/bin/usign",
- "-V", "-q", "-P", PUBKEY_PATH, "-m", file, NULL));
- return -1;
-
- break;
-
- default:
- waitpid(pid, &status, 0);
- return WEXITSTATUS(status);
- }
-
- return -1;
-}
-
static int ask_user(void)
{
fprintf(stderr, "Are you sure you want to continue the upgrade process? [N/y] ");
char *newversion = NULL;
struct blob_attr *tb[__IMAGE_MAX];
struct blob_attr *tbc[__CHECK_MAX];
- char *tmp;
struct stat imgstat;
int check_only = 0;
- int ignore_sig = 0;
unsigned char argc = 1;
snprintf(user_agent, sizeof(user_agent), "%s (%s)", argv[0], AUC_VERSION);
if (!strncmp(argv[argc], "-c", 3))
check_only = 1;
- if (!strncmp(argv[argc], "-F", 3))
- ignore_sig = 1;
-
argc++;
};
goto freeconfig;
}
- rc = init_ustream_ssl();
- if (rc == -2) {
- fprintf(stderr, "No CA certificates loaded, please install ca-certificates\n");
- rc=-1;
- goto freessl;
- }
+ if (!strncmp(serverurl, "https", 5)) {
+ rc = init_ustream_ssl();
+ if (rc == -2) {
+ fprintf(stderr, "No CA certificates loaded, please install ca-certificates\n");
+ rc=-1;
+ goto freessl;
+ }
- if (rc || !ssl_ctx) {
- fprintf(stderr, "SSL support not available, please install ustream-ssl\n");
- rc=-1;
- goto freessl;
+ if (rc || !ssl_ctx) {
+ fprintf(stderr, "SSL support not available, please install ustream-ssl\n");
+ rc=-1;
+ goto freessl;
+ }
}
blobmsg_buf_init(&checkbuf);
blobmsg_add_u32(&checkbuf, "upgrade_packages", upgrade_packages);
- fprintf(stdout, "running %s %s on %s/%s (%s)\n", distribution,
- version, target, subtarget, board_name);
+ fprintf(stdout, "running %s %s on %s (%s)\n", distribution,
+ version, target, board_name);
fprintf(stdout, "checking %s for release upgrade%s\n", serverurl,
upgrade_packages?" or updated packages":"");
blobmsg_add_string(&reqbuf, "distro", distribution);
blobmsg_add_string(&reqbuf, "target", target);
- blobmsg_add_string(&reqbuf, "subtarget", subtarget);
blobmsg_add_string(&reqbuf, "board", board_name);
blob_buf_init(&allpkg, 0);
goto freeboard;
}
- strncpy(url, blobmsg_get_string(tb[IMAGE_SYSUPGRADE]), sizeof(url));
+ if (!tb[IMAGE_FILES]) {
+ if (!rc) {
+ fprintf(stderr, "no path to image files returned\n");
+ rc=-1;
+ }
+ goto freeboard;
+ }
+
+ snprintf(url, sizeof(url), "%s/%s/%s", serverurl,
+ blobmsg_get_string(tb[IMAGE_FILES]),
+ blobmsg_get_string(tb[IMAGE_SYSUPGRADE]));
server_request(url, NULL, NULL);
goto freeboard;
}
- tmp=strrchr(url, '/');
-
- strcpy(tmp, "/sha256sums");
- server_request(url, NULL, NULL);
-
- if (stat("sha256sums", &imgstat)) {
- fprintf(stderr, "sha256sums download failed\n");
- rc=-1;
- goto freeboard;
- }
-
- if ((intmax_t)imgstat.st_size != out_len) {
- fprintf(stderr, "sha256sums download incomplete\n");
- unlink("sha256sums");
- rc=-1;
- goto freeboard;
- }
-
- if (out_len < 68) {
- fprintf(stderr, "sha256sums size mismatch\n");
- unlink("sha256sums");
- rc=-1;
- goto freeboard;
- }
-
- if (sha256sum_v("sha256sums", filename)) {
- fprintf(stderr, "checksum verification failed\n");
- unlink(filename);
- unlink("sha256sums");
- rc=-1;
- goto freeboard;
- }
-
- strcpy(tmp, "/sha256sums.sig");
- server_request(url, NULL, NULL);
-
- if (stat("sha256sums.sig", &imgstat)) {
- fprintf(stderr, "sha256sums.sig download failed\n");
- rc=-1;
- goto freeboard;
- }
-
- if ((intmax_t)imgstat.st_size != out_len) {
- fprintf(stderr, "sha256sums.sig download incomplete\n");
- unlink("sha256sums.sig");
- rc=-1;
- goto freeboard;
- }
-
- if (out_len < 16) {
- fprintf(stderr, "sha256sums.sig size mismatch\n");
- unlink("sha256sums.sig");
- rc=-1;
- goto freeboard;
- }
-
- if (usign_v("sha256sums")) {
- fprintf(stderr, "signature verification failed\n");
- if (!ignore_sig) {
- unlink(filename);
- unlink("sha256sums");
- unlink("sha256sums.sig");
- rc=-1;
- goto freeboard;
- }
- };
-
if (strcmp(filename, "firmware.bin")) {
if (rename(filename, "firmware.bin")) {
fprintf(stderr, "can't rename to firmware.bin\n");
}
valid = 0;
- ubus_invoke(ctx, id, "upgrade_test", NULL, upgtest_cb, &valid, 3000);
+ ubus_invoke(ctx, id, "upgrade_test", NULL, upgtest_cb, &valid, 15000);
if (!valid) {
rc=-1;
goto freeboard;
}
+ fprintf(stderr, "invoking sysupgrade\n");
+
blobmsg_add_u8(&upgbuf, "keep", 1);
- fprintf(stdout, "invoking sysupgrade\n");
- ubus_invoke(ctx, id, "upgrade_start", upgbuf.head, NULL, NULL, 3000);
+ ubus_invoke(ctx, id, "upgrade_start", upgbuf.head, NULL, NULL, 120000);
freeboard:
free(board_name);
free(target);
- /* subtarget is a pointer within target, don't free */
free(distribution);
free(version);
PKG_NAME:=avrdude
PKG_VERSION:=6.3
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SAVANNAH/$(PKG_NAME)
PKG_HASH:=0f9f731b6394ca7795b88359689a7fa1fba818c6e1d962513eb28da670e0a196
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
-PKG_LICENSE:=GPL-2.0
+PKG_LICENSE:=GPL-2.0-or-later
PKG_LICENSE_FILES:=COPYING
PKG_FIXUP:=autoreconf
CATEGORY:=Utilities
SUBMENU:=Microcontroller programming
TITLE:=AVR Downloader/UploaDEr
- URL:=http://www.nongnu.org/avrdude/
+ URL:=https://www.nongnu.org/avrdude/
DEPENDS:=+libncurses +libreadline +libusb-compat +libftdi1 +libelf
endef
--- /dev/null
+--- a/linuxgpio.c
++++ b/linuxgpio.c
+@@ -66,7 +66,7 @@ static int linuxgpio_export(unsigned int gpio)
+ return fd;
+ }
+
+- len = snprintf(buf, sizeof(buf), "%ud", gpio);
++ len = snprintf(buf, sizeof(buf), "%u", gpio);
+ r = write(fd, buf, len);
+ close(fd);
+
+@@ -84,7 +84,7 @@ static int linuxgpio_unexport(unsigned int gpio)
+ return fd;
+ }
+
+- len = snprintf(buf, sizeof(buf), "%ud", gpio);
++ len = snprintf(buf, sizeof(buf), "%u", gpio);
+ r = write(fd, buf, len);
+ close(fd);
+
+@@ -95,7 +95,7 @@ static int linuxgpio_openfd(unsigned int gpio)
+ {
+ char filepath[60];
+
+- snprintf(filepath, sizeof(filepath), "/sys/class/gpio/gpio%ud/value", gpio);
++ snprintf(filepath, sizeof(filepath), "/sys/class/gpio/gpio%u/value", gpio);
+ return (open(filepath, O_RDWR));
+ }
+
+@@ -104,7 +104,7 @@ static int linuxgpio_dir(unsigned int gpio, unsigned int dir)
+ int fd, r;
+ char buf[60];
+
+- snprintf(buf, sizeof(buf), "/sys/class/gpio/gpio%ud/direction", gpio);
++ snprintf(buf, sizeof(buf), "/sys/class/gpio/gpio%u/direction", gpio);
+
+ fd = open(buf, O_WRONLY);
+ if (fd < 0) {
PKG_NAME:=bash
PKG_VERSION:=5.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@GNU/bash
--- /dev/null
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 5.0
+Patch-ID: bash50-001
+
+Bug-Reported-by: axel@freakout.de
+Bug-Reference-ID: <201901082050.x08KoShS006731@bongo.freakout.de>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2019-01/msg00079.html
+
+Bug-Description:
+
+Under certain circumstances, the glob expansion code did not remove
+backslashes escaping characters in directory names (or portions of a
+pattern preceding a slash).
+
+Patch (apply with `patch -p0'):
+
+*** a/bashline.c 2018-11-27 13:20:16.000000000 -0500
+--- b/bashline.c 2019-01-16 16:06:03.000000000 -0500
+***************
+*** 232,235 ****
+--- 232,236 ----
+ static int bash_possible_command_completions __P((int, int));
+
++ static int completion_glob_pattern __P((char *));
+ static char *glob_complete_word __P((const char *, int));
+ static int bash_glob_completion_internal __P((int));
+***************
+*** 1742,1746 ****
+ /* This could be a globbing pattern, so try to expand it using pathname
+ expansion. */
+! if (!matches && glob_pattern_p (text))
+ {
+ matches = rl_completion_matches (text, glob_complete_word);
+--- 1743,1747 ----
+ /* This could be a globbing pattern, so try to expand it using pathname
+ expansion. */
+! if (!matches && completion_glob_pattern ((char *)text))
+ {
+ matches = rl_completion_matches (text, glob_complete_word);
+***************
+*** 1851,1855 ****
+ }
+
+! globpat = glob_pattern_p (hint_text);
+
+ /* If this is an absolute program name, do not check it against
+--- 1852,1856 ----
+ }
+
+! globpat = completion_glob_pattern ((char *)hint_text);
+
+ /* If this is an absolute program name, do not check it against
+***************
+*** 3714,3717 ****
+--- 3715,3773 ----
+ }
+
++ static int
++ completion_glob_pattern (string)
++ char *string;
++ {
++ register int c;
++ char *send;
++ int open;
++
++ DECLARE_MBSTATE;
++
++ open = 0;
++ send = string + strlen (string);
++
++ while (c = *string++)
++ {
++ switch (c)
++ {
++ case '?':
++ case '*':
++ return (1);
++
++ case '[':
++ open++;
++ continue;
++
++ case ']':
++ if (open)
++ return (1);
++ continue;
++
++ case '+':
++ case '@':
++ case '!':
++ if (*string == '(') /*)*/
++ return (1);
++ continue;
++
++ case '\\':
++ if (*string == 0)
++ return (0);
++ }
++
++ /* Advance one fewer byte than an entire multibyte character to
++ account for the auto-increment in the loop above. */
++ #ifdef HANDLE_MULTIBYTE
++ string--;
++ ADVANCE_CHAR_P (string, send - string);
++ string++;
++ #else
++ ADVANCE_CHAR_P (string, send - string);
++ #endif
++ }
++ return (0);
++ }
++
+ static char *globtext;
+ static char *globorig;
+***************
+*** 3878,3882 ****
+ }
+
+! if (t && glob_pattern_p (t) == 0)
+ rl_explicit_arg = 1; /* XXX - force glob_complete_word to append `*' */
+ FREE (t);
+--- 3934,3938 ----
+ }
+
+! if (t && completion_glob_pattern (t) == 0)
+ rl_explicit_arg = 1; /* XXX - force glob_complete_word to append `*' */
+ FREE (t);
+*** a/lib/glob/glob_loop.c 2018-12-31 13:35:15.000000000 -0500
+--- b/lib/glob/glob_loop.c 2019-01-09 09:44:36.000000000 -0500
+***************
+*** 55,59 ****
+
+ case L('\\'):
+- #if 0
+ /* Don't let the pattern end in a backslash (GMATCH returns no match
+ if the pattern ends in a backslash anyway), but otherwise return 1,
+--- 55,58 ----
+***************
+*** 61,69 ****
+ and it can be removed. */
+ return (*p != L('\0'));
+- #else
+- /* The pattern may not end with a backslash. */
+- if (*p++ == L('\0'))
+- return 0;
+- #endif
+ }
+
+--- 60,63 ----
+*** a/patchlevel.h 2016-06-22 14:51:03.000000000 -0400
+--- b/patchlevel.h 2016-10-01 11:01:28.000000000 -0400
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 0
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 1
+
+ #endif /* _PATCHLEVEL_H_ */
--- /dev/null
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 5.0
+Patch-ID: bash50-002
+
+Bug-Reported-by: Ante Peric <synthmeat@gmail.com>
+Bug-Reference-ID: <B7E3B567-2467-4F7B-B6B9-CA4E75A9C93F@gmail.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2019-01/msg00095.html
+
+Bug-Description:
+
+When an alias value ends with an unquoted literal tab (not part of a quoted
+string or comment), alias expansion cannot correctly detect the end of the
+alias value after expanding it.
+
+Patch (apply with `patch -p0'):
+
+*** a/parser.h 2018-12-28 19:11:18.000000000 -0500
+--- b/parser.h 2019-01-11 15:13:03.000000000 -0500
+***************
+*** 48,51 ****
+--- 48,52 ----
+ #define PST_REDIRLIST 0x080000 /* parsing a list of redirections preceding a simple command name */
+ #define PST_COMMENT 0x100000 /* parsing a shell comment; used by aliases */
++ #define PST_ENDALIAS 0x200000 /* just finished expanding and consuming an alias */
+
+ /* Definition of the delimiter stack. Needed by parse.y and bashhist.c. */
+*** a/parse.y 2019-01-02 13:57:34.000000000 -0500
+--- b/parse.y 2019-01-14 08:23:31.000000000 -0500
+***************
+*** 2558,2567 ****
+ pushed_string_list->flags != PSH_DPAREN &&
+ (parser_state & PST_COMMENT) == 0 &&
+ shell_input_line_index > 0 &&
+! shell_input_line[shell_input_line_index-1] != ' ' &&
+ shell_input_line[shell_input_line_index-1] != '\n' &&
+ shellmeta (shell_input_line[shell_input_line_index-1]) == 0 &&
+ (current_delimiter (dstack) != '\'' && current_delimiter (dstack) != '"'))
+ {
+ return ' '; /* END_ALIAS */
+ }
+--- 2558,2569 ----
+ pushed_string_list->flags != PSH_DPAREN &&
+ (parser_state & PST_COMMENT) == 0 &&
++ (parser_state & PST_ENDALIAS) == 0 && /* only once */
+ shell_input_line_index > 0 &&
+! shellblank (shell_input_line[shell_input_line_index-1]) == 0 &&
+ shell_input_line[shell_input_line_index-1] != '\n' &&
+ shellmeta (shell_input_line[shell_input_line_index-1]) == 0 &&
+ (current_delimiter (dstack) != '\'' && current_delimiter (dstack) != '"'))
+ {
++ parser_state |= PST_ENDALIAS;
+ return ' '; /* END_ALIAS */
+ }
+***************
+*** 2572,2575 ****
+--- 2574,2578 ----
+ if (uc == 0 && pushed_string_list && pushed_string_list->flags != PSH_SOURCE)
+ {
++ parser_state &= ~PST_ENDALIAS;
+ pop_string ();
+ uc = shell_input_line[shell_input_line_index];
+*** a/y.tab.c 2019-01-02 13:57:43.000000000 -0500
+--- b/y.tab.c 2019-01-14 08:39:23.000000000 -0500
+***************
+*** 4874,4883 ****
+ pushed_string_list->flags != PSH_DPAREN &&
+ (parser_state & PST_COMMENT) == 0 &&
+ shell_input_line_index > 0 &&
+! shell_input_line[shell_input_line_index-1] != ' ' &&
+ shell_input_line[shell_input_line_index-1] != '\n' &&
+ shellmeta (shell_input_line[shell_input_line_index-1]) == 0 &&
+ (current_delimiter (dstack) != '\'' && current_delimiter (dstack) != '"'))
+ {
+ return ' '; /* END_ALIAS */
+ }
+--- 4874,4885 ----
+ pushed_string_list->flags != PSH_DPAREN &&
+ (parser_state & PST_COMMENT) == 0 &&
++ (parser_state & PST_ENDALIAS) == 0 && /* only once */
+ shell_input_line_index > 0 &&
+! shellblank (shell_input_line[shell_input_line_index-1]) == 0 &&
+ shell_input_line[shell_input_line_index-1] != '\n' &&
+ shellmeta (shell_input_line[shell_input_line_index-1]) == 0 &&
+ (current_delimiter (dstack) != '\'' && current_delimiter (dstack) != '"'))
+ {
++ parser_state |= PST_ENDALIAS;
+ return ' '; /* END_ALIAS */
+ }
+***************
+*** 4888,4891 ****
+--- 4890,4894 ----
+ if (uc == 0 && pushed_string_list && pushed_string_list->flags != PSH_SOURCE)
+ {
++ parser_state &= ~PST_ENDALIAS;
+ pop_string ();
+ uc = shell_input_line[shell_input_line_index];
+*** a/patchlevel.h 2016-06-22 14:51:03.000000000 -0400
+--- b/patchlevel.h 2016-10-01 11:01:28.000000000 -0400
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 1
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 2
+
+ #endif /* _PATCHLEVEL_H_ */
--- /dev/null
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=bigclown-control-tool
+PKG_VERSION:=0.2.0
+PKG_RELEASE:=1
+
+PKG_SOURCE_URL:=https://codeload.github.com/bigclownlabs/bch-control-tool/tar.gz/v$(PKG_VERSION)?
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_HASH:=c79a76e0940958e4ddcf51e57fadfb127f568b6c1ceb02033c3630bab2dee612
+PKG_LICENSE:=MIT
+PKG_MAINTAINER:=Karel Kočí <cynerd@email.cz>
+PKG_BUILD_DIR:=$(BUILD_DIR)/bch-control-tool-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+include ../../../lang/python/python3-package.mk
+
+define Package/$(PKG_NAME)
+ SECTION:=utils
+ CATEGORY:=Utilities
+ SUBMENU:=BigClown
+ URL:=https://github.com/bigclownlabs/bch-control-tool
+ TITLE:=BigCLown control tool
+ DEPENDS:=+python3-click-log +python3-paho-mqtt +python3-pyserial +python3-yaml +python3-simplejson
+endef
+
+define Build/Compile
+ sed -i 's/@@VERSION@@/$(PKG_VERSION)/' "$(PKG_BUILD_DIR)/setup.py"
+ $(call Py3Build/Compile/Default)
+endef
+
+$(eval $(call Py3Package,$(PKG_NAME)))
+$(eval $(call BuildPackage,$(PKG_NAME)))
--- /dev/null
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=bigclown-firmware-tool
+PKG_VERSION:=1.3.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/bigclownlabs/bch-firmware-tool/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=2ba459148a5f23773ab14d0f5d5cc381c441d758cb9f23cdbec18b30b07675ab
+PKG_BUILD_DIR:=$(BUILD_DIR)/bch-firmware-tool-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Karel Kočí <cynerd@email.cz>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+
+include $(INCLUDE_DIR)/package.mk
+include ../../../lang/python/python3-package.mk
+
+define Package/$(PKG_NAME)
+ SECTION:=utils
+ CATEGORY:=Utilities
+ SUBMENU:=BigClown
+ TITLE:=BigCLown firmware tool
+ URL:=https://github.com/bigclownlabs/bch-firmware-tool
+ DEPENDS:= \
+ +python3-appdirs \
+ +python3-pyserial \
+ +python3-colorama \
+ +python3-yaml \
+ +python3-schema \
+ +python3-requests \
+ +python3-click \
+ +python3-intelhex
+endef
+
+define Build/Compile
+ sed -i 's/@@VERSION@@/$(PKG_VERSION)/' "$(PKG_BUILD_DIR)/setup.py"
+ $(call Py3Build/Compile/Default)
+endef
+
+$(eval $(call Py3Package,$(PKG_NAME)))
+$(eval $(call BuildPackage,$(PKG_NAME)))
--- /dev/null
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=bigclown-gateway
+PKG_VERSION:=1.16.2
+PKG_RELEASE:=1
+
+PKG_SOURCE_URL:=https://codeload.github.com/bigclownlabs/bch-gateway/tar.gz/v$(PKG_VERSION)?
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_HASH:=9d3208bf4cffec507d992485104fcbba2b9bc02cf7b290dfe13f98e5916ee1ca
+PKG_LICENSE:=MIT
+PKG_MAINTAINER:=Karel Kočí <cynerd@email.cz>
+PKG_BUILD_DIR:=$(BUILD_DIR)/bch-gateway-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+include ../../../lang/python/python3-package.mk
+
+define Package/$(PKG_NAME)
+ SECTION:=utils
+ CATEGORY:=Utilities
+ SUBMENU:=BigClown
+ URL:=https://github.com/bigclownlabs/bch-gateway
+ TITLE:=BigCLown gateway
+ DEPENDS:= \
+ +kmod-usb-serial-ftdi \
+ +kmod-usb-acm \
+ +python3-click-log \
+ +python3-paho-mqtt \
+ +python3-pyserial \
+ +python3-yaml \
+ +python3-simplejson \
+ +python3-schema \
+ +python3-appdirs
+endef
+
+define Py3Package/$(PKG_NAME)/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
+
+ $(INSTALL_DIR) $(1)/etc/config
+ $(INSTALL_CONF) ./files/config $(1)/etc/config/bigclown-gateway
+ $(INSTALL_DIR) $(1)/etc/init.d
+ $(INSTALL_BIN) ./files/init $(1)/etc/init.d/bigclown-gateway
+endef
+
+define Package/$(PKG_NAME)/conffiles
+/etc/config/bigclown-gateway
+endef
+
+define Build/Compile
+ sed -i 's/@@VERSION@@/$(PKG_VERSION)/' "$(PKG_BUILD_DIR)/setup.py"
+ $(call Py3Build/Compile/Default)
+endef
+
+$(eval $(call Py3Package,$(PKG_NAME)))
+$(eval $(call BuildPackage,$(PKG_NAME)))
--- /dev/null
+
+config gateway 'gateway'
+ option enabled '0'
+ option name 'usb-dongle'
+ option device '/dev/ttyUSB0'
+ option automatic_rename_kit_nodes '1'
+
+config mqtt 'mqtt'
+ option host 'localhost'
+ option port '1883'
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=98
+STOP=1
+
+USE_PROCD=1
+
+PROG=/usr/bin/bcg
+CONF=/tmp/etc/bigclown-gateway.conf
+
+append() {
+ local cfg="$1"
+ local uci_name="$2"
+ local out_name="$3"
+ local default="$4"
+ config_get val $cfg $uci_name $default
+ if [ -n "$val" ]; then
+ echo "$out_name $val" >> $CONF
+ fi
+}
+
+start_service() {
+ config_load bigclown-gateway
+
+ local enabled
+ config_get_bool enabled gateway enabled "0"
+ [ "$enabled" = "1" ] || {
+ echo "Bigclown gateway service disabled"
+ exit 1
+ }
+
+ rm -rf $CONF
+ echo "Generating bigclown-gateway config file in $CONF"
+
+ append gateway name 'name:' usb-dongle
+ # TODO add hotplug script and use different default here
+ append gateway device 'device:' /dev/ttyUSB0
+ append gateway automatic_rename_kit_nodes 'automatic_rename_kit_nodes:' 1
+ append gateway base_topic_prefix 'base_topic_prefix:'
+
+ echo "mqtt:" >> $CONF
+ append mqtt host ' host:' localhost
+ append mqtt port ' port:' 1883
+ append mqtt cafile ' cafile:'
+ append mqtt certfile ' certfile:'
+ append mqtt keyfile ' keyfile:'
+
+ procd_open_instance
+ procd_set_param respawn ${respawn_threshold:-3600} ${respawn_timeout:-5} ${respawn_retry:-5}
+ procd_set_param command "$PROG" -c "$CONF"
+ procd_set_param stdout 1
+ procd_set_param stderr 1
+ procd_close_instance
+}
+
+service_triggers() {
+ procd_add_reload_trigger 'bigclown-gateway'
+}
--- /dev/null
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=bigclown-mqtt2influxdb
+PKG_VERSION:=1.1.0
+PKG_RELEASE:=1
+
+PKG_SOURCE_URL:=https://codeload.github.com/bigclownlabs/bch-mqtt2influxdb/tar.gz/v$(PKG_VERSION)?
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_HASH:=5be14132311e85215abbfd732fe6cd652522ea0a343ee8ba7abab3ec7578eb99
+PKG_LICENSE:=MIT
+PKG_MAINTAINER:=Karel Kočí <cynerd@email.cz>
+PKG_BUILD_DIR:=$(BUILD_DIR)/bch-mqtt2influxdb-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+include ../../../lang/python/python3-package.mk
+
+define Package/$(PKG_NAME)
+ SECTION:=utils
+ CATEGORY:=Utilities
+ SUBMENU:=BigClown
+ URL:=https://github.com/bigclownlabs/bch-mqtt2influxdb
+ TITLE:=BigCLown MQTT to Influxdb bridge
+ DEPENDS:=+python3-paho-mqtt +python3-yaml +python3-influxdb +python3-jsonpath-ng +python3-schema
+endef
+
+define Py3Package/$(PKG_NAME)/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
+
+ $(INSTALL_DIR) $(1)/etc/init.d
+ $(INSTALL_BIN) ./files/init $(1)/etc/init.d/bigclown-mqtt2influxdb
+ $(INSTALL_DATA) ./files/config.yml $(1)/etc/bigclown-mqtt2influxdb.yml
+endef
+
+define Package/$(PKG_NAME)/conffiles
+/etc/bigclown-mqtt2influxdb.yml
+endef
+
+define Build/Compile
+ sed -i 's/@@VERSION@@/$(PKG_VERSION)/' "$(PKG_BUILD_DIR)/setup.py"
+ $(call Py3Build/Compile/Default)
+endef
+
+$(eval $(call Py3Package,$(PKG_NAME)))
+$(eval $(call BuildPackage,$(PKG_NAME)))
--- /dev/null
+## Example bigclown-mqtt2influxdb configuration
+
+# MQTT configuration
+mqtt:
+ #host: 127.0.0.1
+ #port: 1883
+
+# InfluxDB configuration
+influxdb:
+ #host: 127.0.0.1
+ #port: 8086
+ #database: node
+
+# This is default configuration used to mirror all values produced by default
+# BigClown modules firmware. You might want to add your topics or drop those for
+# modules you don't own.
+points:
+ - measurement: temperature
+ topic: node/+/thermometer/+/temperature
+ fields:
+ value: $.payload
+ tags:
+ id: $.topic[1]
+ channel: $.topic[3]
+
+ - measurement: relative-humidity
+ topic: node/+/hygrometer/0:4/relative-humidity
+ fields:
+ value: $.payload
+ tags:
+ id: $.topic[1]
+
+ - measurement: illuminance
+ topic: node/+/lux-meter/0:0/illuminance
+ fields:
+ value: $.payload
+ tags:
+ id: $.topic[1]
+
+ - measurement: pressure
+ topic: node/+/barometer/0:0/pressure
+ fields:
+ value: $.payload
+ tags:
+ id: $.topic[1]
+
+ - measurement: co2
+ topic: node/+/co2-meter/-/concentration
+ fields:
+ value: $.payload
+ tags:
+ id: $.topic[1]
+
+ - measurement: voltage
+ topic: node/+/battery/+/voltage
+ fields:
+ value: $.payload
+ tags:
+ id: $.topic[1]
+
+ - measurement: button
+ topic: node/+/push-button/+/event-count
+ fields:
+ value: $.payload
+ tags:
+ id: $.topic[1]
+ channel: $.topic[3]
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=99
+STOP=1
+
+USE_PROCD=1
+
+PROG=/usr/bin/mqtt2influxdb
+CONF=/etc/bigclown-mqtt2influxdb.yml
+
+start_service() {
+ procd_open_instance
+ procd_set_param respawn 3600 5 5
+ procd_set_param command "$PROG" -c "$CONF"
+ procd_set_param stdout 1
+ procd_set_param stderr 1
+ procd_close_instance
+}
+
+stop_service() {
+ service_stop "$PROG"
+}
URL:=http://www.bluez.org/
endef
-define Package/bluez-examples
-$(call Package/bluez/Default)
- SECTION:=utils
- CATEGORY:=Utilities
- TITLE+= python example apps
- DEPENDS:=+python
-endef
-
-define Package/bluez-examples/description
- contains many examples apps for bluetooth, requiring python
-endef
-
define Package/bluez-libs
$(call Package/bluez/Default)
SECTION:=libs
CATEGORY:=Libraries
TITLE+= library
- DEPENDS:=+libpthread +kmod-bluetooth
+ DEPENDS:=+libpthread +USB_SUPPORT:kmod-bluetooth
endef
define Package/bluez-utils
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/bluez.pc $(1)/usr/lib/pkgconfig/
endef
-define Package/bluez-examples/install
- $(INSTALL_DIR) $(1)/usr/bin/bluez
- $(INSTALL_DATA) $(PKG_BUILD_DIR)/test/* $(1)/usr/bin/bluez/
-endef
-
define Package/bluez-libs/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libbluetooth.so.* $(1)/usr/lib/
$(INSTALL_BIN) ./files/bluetoothd.init $(1)/etc/init.d/bluetoothd
endef
-$(eval $(call BuildPackage,bluez-examples))
$(eval $(call BuildPackage,bluez-libs))
$(eval $(call BuildPackage,bluez-utils))
$(eval $(call BuildPackage,bluez-utils-extra))
TITLE:=bmx7-dnsupdate
MAINTAINER:=Paul Spooren <spooren@informatik.uni-leipzig.de>
DEPENDS:=+bmx7 +bmx7-json inotifywait jshn
+ PKGARCH:=all
endef
define Build/Compile
include $(TOPDIR)/rules.mk
PKG_NAME:=bonnie++
-PKG_VERSION:=1.97.3
-PKG_RELEASE:=2
+PKG_VERSION:=1.98
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
PKG_SOURCE_URL:=https://www.coker.com.au/bonnie++/
-PKG_HASH:=e27b386ae0dc054fa7b530aab6bdead7aea6337a864d1f982bc9ebacb320746e
+PKG_HASH:=6e0bcbc08b78856fd998dd7bcb352d4615a99c26c2dc83d5b8345b102bad0b04
PKG_MAINTAINER:=Florian Fainelli <florian@openwrt.org>
PKG_LICENSE:=GPL-2.0
endef
ifeq ($(CONFIG_USE_UCLIBCXX),y)
-TARGET_LDFLAGS +=-nodefaultlibs
+TARGET_LDFLAGS += -nodefaultlibs
endif
-TARGET_CXXFLAGS +=-fno-rtti
-
-define Build/Compile
- $(MAKE) -C $(PKG_BUILD_DIR) \
- TARGET_CXX="$(TARGET_CXX)" \
- TARGET_LINK="$(TARGET_CXX)" \
- MORECFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CXXFLAGS)" \
- DESTDIR="$(PKG_INSTALL_DIR)" \
- all
-endef
+TARGET_CXXFLAGS += -fno-rtti -flto
define Package/bonniexx/install
$(INSTALL_DIR) $(1)/usr/bin
+++ /dev/null
-Index: bonnie++-1.97.3/configure
-===================================================================
---- bonnie++-1.97.3.orig/configure
-+++ bonnie++-1.97.3/configure
-@@ -3955,9 +3955,7 @@ rm -f core conftest.err conftest.$ac_obj
-
- if test "$cross_compiling" = yes; then :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
--$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
--as_fn_error $? "cannot run test program while cross compiling
--See \`config.log' for more details" "$LINENO" 5 ; }
-+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} }
- else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
-Index: bonnie++-1.97.3/Makefile
-===================================================================
---- bonnie++-1.97.3.orig/Makefile
-+++ bonnie++-1.97.3/Makefile
-@@ -1,5 +1,7 @@
- EXES=bonnie++ zcav getc_putc getc_putc_helper
- EXE=bon_csv2html generate_randfile
-+TARGET_CXX=g++
-+TARGET_LINK=g++
-
- all: $(EXE) $(EXES)
-
-@@ -10,8 +12,8 @@ eprefix=${prefix}
- #MORE_WARNINGS=-Weffc++
- WFLAGS=-Wall -W -Wshadow -Wpointer-arith -Wwrite-strings -pedantic -ffor-scope -Wcast-align -Wsign-compare -Wpointer-arith -Wwrite-strings -Wformat-security -Wswitch-enum -Winit-self $(MORE_WARNINGS)
- CFLAGS=-O2 -DNDEBUG $(WFLAGS) $(MORECFLAGS)
--CXX=g++ $(CFLAGS)
--LINK=g++
-+CXX=$(TARGET_CXX) $(CFLAGS)
-+LINK=$(TARGET_LINK)
- THREAD_LFLAGS=-lpthread
-
- INSTALL=/usr/bin/install -c
--- a/bon_file.cpp
+++ b/bon_file.cpp
-@@ -464,25 +464,37 @@ int COpenTest::delete_sequential(BonTime
+@@ -469,25 +469,37 @@ int COpenTest::delete_sequential(BonTime
}
if(m_number_directories != 1)
{
--- /dev/null
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -7,12 +7,6 @@ SCRIPTS=bon_csv2txt
+
+ prefix=@prefix@
+ eprefix=@exec_prefix@
+-#MORE_WARNINGS=-Weffc++
+-WFLAGS=-Wall -W -Wshadow -Wpointer-arith -Wwrite-strings -pedantic -ffor-scope -Wcast-align -Wsign-compare -Wpointer-arith -Wwrite-strings -Wformat-security -Wswitch-enum -Winit-self $(MORE_WARNINGS)
+-CFLAGS=-O2 @debug@ -DNDEBUG $(WFLAGS) $(MORECFLAGS)
+-CXX=@CXX@ $(CFLAGS)
+-LINK=@CXX@
+-THREAD_LFLAGS=@thread_ldflags@
+
+ INSTALL=@INSTALL@
+ INSTALL_PROGRAM=@INSTALL_PROGRAM@
+@@ -34,22 +28,22 @@ GETCHSRC=getc_putc_helper.cpp duration.cpp
+ GETCHOBJS=$(GETCHSRC:.cpp=.o)
+
+ bonnie++: $(BONOBJS)
+- $(LINK) -o bonnie++ $(BONOBJS) $(THREAD_LFLAGS)
++ $(CXX) $(CXXFLAGS) -o bonnie++ $(BONOBJS)
+
+ zcav: $(ZCAVOBJS)
+- $(LINK) -o zcav $(ZCAVOBJS) $(THREAD_LFLAGS)
++ $(CXX) $(CXXFLAGS) -o zcav $(ZCAVOBJS)
+
+ getc_putc: $(GETCOBJS) getc_putc_helper
+- $(LINK) -o getc_putc $(GETCOBJS) $(THREAD_LFLAGS)
++ $(CXX) $(CXXFLAGS) -o getc_putc $(GETCOBJS)
+
+ getc_putc_helper: $(GETCHOBJS)
+- $(CXX) -o getc_putc_helper $(GETCHOBJS)
++ $(CXX) $(CXXFLAGS) -o getc_putc_helper $(GETCHOBJS)
+
+ bon_csv2html: bon_csv2html.o
+- $(LINK) bon_csv2html.o -o bon_csv2html
++ $(CXX) $(CXXFLAGS) bon_csv2html.o -o bon_csv2html
+
+ generate_randfile: generate_randfile.o
+- $(LINK) generate_randfile.o -o generate_randfile
++ $(CXX) $(CXXFLAGS) generate_randfile.o -o generate_randfile
+
+ install-bin: $(EXE) $(EXES)
+ mkdir -p $(eprefix)/bin $(eprefix)/sbin
+@@ -63,7 +57,7 @@ install: install-bin
+ @INSTALL_DATA@ $(MAN8) @mandir@/man8
+
+ %.o: %.cpp
+- $(CXX) -c $<
++ $(CXX) $(CXXFLAGS) -c $<
+
+ clean:
+ rm -f $(EXE) $(EXES) *.o build-stamp install-stamp
+--- a/configure.in
++++ b/configure.in
+@@ -31,7 +31,6 @@ fi
+
+ dnl Checks for programs.
+ AC_LANG_CPLUSPLUS
+-AC_PROG_CC
+ AC_PROG_CXX
+ AC_PROG_CXXCPP
+ AC_PROG_INSTALL
+@@ -66,7 +65,7 @@ AC_SUBST(linux_pthread)
+ AC_TRY_COMPILE([#define _GNU_SOURCE
+ #include <pthread.h>
+ ] , [pthread_mutexattr_t attr;
+- pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE_NP);]
++ pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);]
+ , linux_pthread="yes")
+ if [[ -n "$linux_pthread" ]]; then
+ linux_pthread="#define LINUX_PTHREAD"
+@@ -83,7 +82,7 @@ void * thread_func(void * param) { return NULL; }
+ , thread_ldflags="-pthread")
+
+ AC_SUBST(large_file)
+-AC_TRY_RUN([#ifndef _LARGEFILE64_SOURCE
++AC_TRY_COMPILE([#ifndef _LARGEFILE64_SOURCE
+ #define _LARGEFILE64_SOURCE
+ #endif
+ #include <stdio.h>
+++ /dev/null
---- a/configure.in
-+++ b/configure.in
-@@ -31,7 +31,6 @@ fi
-
- dnl Checks for programs.
- AC_LANG_CPLUSPLUS
--AC_PROG_CC
- AC_PROG_CXX
- AC_PROG_CXXCPP
- AC_PROG_INSTALL
-@@ -60,13 +59,13 @@ if [[ -n "$snprintf" ]]; then
- snprintf="#define NO_SNPRINTF"
- fi
-
--AC_CHECK_HEADERS(algorithm algo.h algo)
-+AC_CHECK_HEADERS(algorithm)
-
- AC_SUBST(linux_pthread)
- AC_TRY_COMPILE([#define _GNU_SOURCE
- #include <pthread.h>
- ] , [pthread_mutexattr_t attr;
-- pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE_NP);]
-+ pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);]
- , linux_pthread="yes")
- if [[ -n "$linux_pthread" ]]; then
- linux_pthread="#define LINUX_PTHREAD"
-@@ -83,7 +82,7 @@ void * thread_func(void * param) { return NULL; }
- , thread_ldflags="-pthread")
-
- AC_SUBST(large_file)
--AC_TRY_RUN([#ifndef _LARGEFILE64_SOURCE
-+AC_TRY_COMPILE([#ifndef _LARGEFILE64_SOURCE
- #define _LARGEFILE64_SOURCE
- #endif
- #include <stdio.h>
--- /dev/null
+if PACKAGE_btrfs-progs
+
+config BTRFS_PROGS_ZSTD
+ bool "Build with zstd support"
+ default n
+ help
+ This allows you to manage BTRFS with zstd compression
+
+endif
include $(TOPDIR)/rules.mk
PKG_NAME:=btrfs-progs
-PKG_VERSION:=4.20.1
+PKG_VERSION:=5.1.1
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@KERNEL/linux/kernel/people/kdave/btrfs-progs
-PKG_HASH:=562f5d1ff1d17867c4c2be2768c653b62f1f257c42f9bb3e1a36380c02ec4fcd
+PKG_HASH:=9cb91b7de9e10aa6bbf2b003f60bb3f5e5b1984a8008fad7c4b2d3978f5ebe1b
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-v$(PKG_VERSION)
-PKG_MAINTAINER:=Rosen Penev <rosenp@gmail.com>
+PKG_MAINTAINER:=Karel Kočí <karel.koci@nic.cz>
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=Filesystem
- DEPENDS:=+libattr +libuuid +zlib +libblkid +liblzo +libpthread
TITLE:=Btrfs filesystems utilities
URL:=https://btrfs.wiki.kernel.org/
+ DEPENDS:=+libattr +libuuid +zlib +libblkid +liblzo +libpthread +BTRFS_PROGS_ZSTD:libzstd
endef
define Package/btrfs-progs/description
GPL and open for contribution from anyone.
endef
+define Package/btrfs-progs/config
+ source "$(SOURCE)/Config.in"
+endef
+
progs = btrfs btrfs-find-root btrfs-image btrfs-map-logical \
- btrfs-select-super btrfstune fsck.btrfs mkfs.btrfs
+ btrfs-select-super btrfstune mkfs.btrfs
+
+TARGET_CFLAGS += -ffunction-sections -fdata-sections
+TARGET_LDFLAGS += -Wl,--gc-sections -Wl,--as-needed
+
+EXTRA_CFLAGS=$(TARGET_CPPFLAGS)
CONFIGURE_ARGS += \
--disable-backtrace \
--disable-convert \
--disable-documentation \
- --disable-python \
- --disable-zstd
-
-TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto
-TARGET_LDFLAGS += -Wl,--gc-sections -flto
-
-EXTRA_CFLAGS=$(TARGET_CPPFLAGS)
+ --disable-python
+ifneq ($(CONFIG_BTRFS_PROGS_ZSTD),y)
+CONFIGURE_ARGS += --disable-zstd
+endif
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib
- $(CP) \
- $(PKG_INSTALL_DIR)/usr/include/* \
- $(1)/usr/include/
- $(CP) \
- $(PKG_INSTALL_DIR)/usr/lib/libbtrfs.{a,so*} \
- $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libbtrfs* $(1)/usr/lib/
endef
define Package/btrfs-progs/install
$(INSTALL_DIR) $(1)/usr/lib
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libbtrfs.so* $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libbtrfs.so* $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libbtrfsutil.so* $(1)/usr/lib
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(addprefix $(PKG_INSTALL_DIR)/usr/bin/, $(progs)) $(1)/usr/bin/
$(LN) btrfs $(1)/usr/bin/btrfsck
--- /dev/null
+#
+# Copyright (C) 2009 Sharim At Work, Ltd.
+# Copyright (C) 2019 Jeffery To
+# Author: Xiangfu Liu <xiangfu@sharism.cc>
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=byobu
+PKG_VERSION:=5.129
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz
+PKG_SOURCE_URL:=https://launchpad.net/byobu/trunk/$(PKG_VERSION)/+download
+PKG_HASH:=e5135f20750c359b6371ee87cf2729c6038fbf3a6e66680e67f6a2125b07c2b9
+
+PKG_LICENSE:=GPL-3.0
+PKG_LICENSE_FILES:=COPYING
+PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
+
+PKG_BUILD_PARALLEL:=1
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/byobu/Default
+ SECTION:=utils
+ CATEGORY:=Utilities
+ URL:=http://byobu.org/
+ PKGARCH:=all
+endef
+
+define Package/byobu
+$(call Package/byobu/Default)
+ TITLE:=Text-based window manager and terminal multiplexer
+ DEPENDS:=+python3-light +python3-newt
+endef
+
+define Package/byobu-utils
+$(call Package/byobu/Default)
+ TITLE:=Utilities included with byobu
+endef
+
+define Package/byobu/description
+ Byobu is a GPLv3 open source text-based window manager and terminal
+ multiplexer. It was originally designed to provide elegant enhancements
+ to the otherwise functional, plain, practical GNU Screen, for the Ubuntu
+ server distribution. Byobu now includes an enhanced profiles, convenient
+ keybindings, configuration utilities, and toggle-able system status
+ notifications for both the GNU Screen window manager and the more modern
+ Tmux terminal multiplexer, and works on most Linux, BSD, and Mac
+ distributions.
+endef
+
+define Package/byobu-utils/description
+$(call Package/byobu/description)
+
+ These are the "bikeshed" utilities bundled with byobu:
+ * col1..col9, NF
+ * ctail
+ * manifest
+ * purge-old-kernels
+ * vigpg
+ * wifi-status
+endef
+
+define Package/byobu/install
+ $(INSTALL_DIR) $(1)/etc
+ $(CP) $(PKG_INSTALL_DIR)/etc/* $(1)/etc/
+
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/byobu* $(1)/usr/bin/
+ $(LN) byobu $(1)/usr/bin/byobu-screen
+ $(LN) byobu $(1)/usr/bin/byobu-tmux
+
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/byobu $(1)/usr/lib/
+
+ $(INSTALL_DIR) $(1)/usr/share/byobu
+ for i in keybindings profiles status windows; do \
+ $(CP) $(PKG_INSTALL_DIR)/usr/share/byobu/$$$$i $(1)/usr/share/byobu/ ; \
+ done
+
+ $(INSTALL_DIR) $(1)/usr/share/doc
+ $(CP) $(PKG_INSTALL_DIR)/usr/share/doc/byobu $(1)/usr/share/doc/
+endef
+
+define Package/byobu-utils/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ for i in col1 ctail manifest purge-old-kernels vigpg wifi-status; do \
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$$$$i $(1)/usr/bin/ ; \
+ done
+ for i in col2 col3 col4 col5 col6 col7 col8 col9 NF; do \
+ $(LN) col1 $(1)/usr/bin/$$$$i ; \
+ done
+endef
+
+$(eval $(call BuildPackage,byobu))
+$(eval $(call BuildPackage,byobu-utils))
--- /dev/null
+--- a/usr/bin/byobu.in
++++ b/usr/bin/byobu.in
+@@ -46,7 +46,7 @@ if [ -z "${BYOBU_PREFIX}" ]; then
+ . "$HOME/.byoburc"
+ fi
+ fi
+-export BYOBU_CHARMAP=$(locale charmap)
++export BYOBU_CHARMAP=UTF-8
+ [ -r "$HOME/.byoburc" ] && . "$HOME/.byoburc"
+ [ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="@prefix@" || export BYOBU_PREFIX
+ . "${BYOBU_PREFIX}/lib/${PKG}/include/common"
--- /dev/null
+--- a/usr/bin/byobu-launch.in
++++ b/usr/bin/byobu-launch.in
+@@ -30,7 +30,7 @@
+ # or edit your sshd_config, ssh_config, and set:
+ # $HOME/.bashrc: export BYOBU_DISABLE=1
+
+-_tty=$(tty)
++_tty=$(readlink /proc/$$/fd/0)
+ if [ "${_tty#/dev/ttyS}" != "$_tty" ] && [ "${_tty#/dev/ttyAMA}" != "$_tty" ]; then
+ # Don't autolaunch byobu on serial consoles
+ # You can certainly run 'byobu' manually, though
--- /dev/null
+--- a/usr/lib/byobu/include/constants
++++ b/usr/lib/byobu/include/constants
+@@ -58,6 +58,7 @@ $BYOBU_SED --follow-symlinks "s///" /dev
+ eval $BYOBU_TEST ulimit >/dev/null 2>&1 && export BYOBU_ULIMIT="ulimit" || export BYOBU_ULIMIT="false"
+
+ # Find a suitable python interpreter, if undefined
++export BYOBU_PYTHON="python3"
+ if [ -z "$BYOBU_PYTHON" ]; then
+ if python3 -c "import snack" >/dev/null 2>&1; then
+ export BYOBU_PYTHON="python3"
--- /dev/null
+--- a/usr/lib/byobu/disk
++++ b/usr/lib/byobu/disk
+@@ -26,7 +26,10 @@ __disk_detail() {
+ __disk() {
+ local out="" MP="" size="" pct="" unit=""
+ # Default to /, but let users override
+- [ -z "$MONITORED_DISK" ] && MP="/" || MP="$MONITORED_DISK"
++ MP="$MONITORED_DISK"
++ [ -n "$MP" ] || {
++ grep -q ' /overlay ' /proc/mounts && MP=/overlay || MP=/
++ }
+ case $MP in
+ /dev/*) MP=$(awk '$1 == m { print $2; exit(0); }' "m=$MP" /proc/mounts);;
+ esac
+--- a/usr/lib/byobu/disk_io
++++ b/usr/lib/byobu/disk_io
+@@ -42,7 +42,10 @@ getdisk() {
+ __disk_io() {
+ local part= i=
+ # Default to disk providing /, but let users override with MONITORED_DISK
+- [ -z "$MONITORED_DISK" ] && mount_point="/" || mount_point="$MONITORED_DISK"
++ local mount_point="$MONITORED_DISK"
++ [ -n "$mount_point" ] || {
++ grep -q ' /overlay ' /proc/mounts && mount_point=/overlay || mount_point=/
++ }
+ # By default, we won't bug the user with the display of network traffic
+ # below DISK_IO_THRESHOLD in kB/s; override in $BYOBU_CONFIG_DIR/status
+ [ -n "$DISK_IO_THRESHOLD" ] || DISK_IO_THRESHOLD=50
+--- a/usr/share/byobu/status/statusrc
++++ b/usr/share/byobu/status/statusrc
+@@ -36,8 +36,8 @@
+ # and your lsb_release is "precise", only "p" will be displayed
+ #RELEASE_ABBREVIATED=1
+
+-# Default: /
+-#MONITORED_DISK=/
++# Default: /overlay
++#MONITORED_DISK=/overlay
+
+ # Minimum disk throughput that triggers the notification (in kB/s)
+ # Default: 50
--- /dev/null
+--- a/usr/lib/byobu/services
++++ b/usr/lib/byobu/services
+@@ -24,6 +24,8 @@ __services_detail() {
+ }
+
+ service_running() {
++ pgrep "$1" >/dev/null
++ return $?
+ if [ -f "/etc/init/$1.conf" ]; then
+ # Use upstart
+ case "$(status $1 2>/dev/null)" in
--- /dev/null
+--- a/usr/lib/byobu/users
++++ b/usr/lib/byobu/users
+@@ -26,7 +26,12 @@ __users_detail() {
+ }
+
+ __users() {
+- local count=0
++ local count=0 f pid
++ for f in /var/run/dropbear.*.pid; do
++ read pid < "$f"
++ count=$(($count + $(pgrep -P "$pid" | wc -l)))
++ done
++ if [ $count -eq 0 ]; then
+ if [ "$USERS_DISTINCT" = "1" ]; then
+ count=$(pgrep -fl 'sshd:.*@' | cut -f3 -d\ | cut -f1 -d@ | sort -u | wc -l)
+ else
+@@ -34,6 +39,7 @@ __users() {
+ # busybox and some distro's pgrep (and it doesn't exit non-zero).
+ count=$(pgrep -f "^sshd:.*@|^/usr/sbin/sshd -i" | wc -l) || return
+ fi
++ fi
+ if [ $count -gt 0 ]; then
+ color b w r; printf "%d" "$count"; color -; color w r; printf "##"; color --
+ else
--- /dev/null
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=cgroupfs-mount
+PKG_VERSION:=1.4
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/tianon/cgroupfs-mount/tar.gz/${PKG_VERSION}?
+PKG_HASH:=d6c8aff7af59c7d0082ee3018c97f73b0421e81a49bb28ad9f66a36da5cd6ec7
+
+PKG_MAINTAINER:=Gerard Ryan <G.M0N3Y.2503@gmail.com>
+
+PKG_BUILD_PARALLEL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/cgroupfs-mount/config
+config CGROUPFS_MOUNT_CGROUPS
+ depends on PACKAGE_cgroupfs-mount
+ bool "Enable support for cgroups in the kernel"
+ default y
+ select KERNEL_CGROUPS
+endef
+
+define Package/cgroupfs-mount
+ SECTION:=utils
+ CATEGORY:=Utilities
+ TITLE:=cgroup mount scripts
+ DEPENDS:=+mount-utils
+ MENU:=1
+endef
+
+define Package/cgroupfs-mount/description
+Simple scripts to properly mount the cgroupfs hierarchy, especially structured for Debian packaging
+endef
+
+Build/Compile=# Nothing to compile, just install the scripts
+
+define Package/cgroupfs-mount/install
+ $(INSTALL_DIR) $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/cgroupfs-mount $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/cgroupfs-umount $(1)/usr/bin/
+
+ $(INSTALL_DIR) $(1)/etc/init.d
+ $(INSTALL_BIN) ./files/cgroupfs-mount.init $(1)/etc/init.d/cgroupfs-mount
+endef
+
+$(eval $(call BuildPackage,cgroupfs-mount))
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=1
+
+boot() {
+ # Procd mounts non-hierarchical cgroupfs so unmount first before cgroupfs-mount
+ if mountpoint -q /sys/fs/cgroup; then
+ umount /sys/fs/cgroup/
+ fi
+
+ cgroupfs-mount
+}
PKG_NAME:=cmdpad
PKG_VERSION:=0.0.3
-PKG_RELEASE:=4
+PKG_RELEASE:=5
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
PKG_SOURCE_URL:=@SF/cmdpad
URL:=http://cmdpad.sourceforge.net/index.php
endef
-TARGET_CFLAGS += -std=gnu89
-
CONFIGURE_ARGS += \
--enable-static \
--enable-shared
--- /dev/null
+--- a/src/command.c
++++ b/src/command.c
+@@ -43,6 +43,7 @@
+
+ #include <linux/input.h>
+ #include <linux/ioctl.h>
++#include <sys/wait.h>
+ #include <stdlib.h>
+ #include <fcntl.h>
+ #include <unistd.h>
+--- a/src/main.c
++++ b/src/main.c
+@@ -54,6 +54,7 @@
+
+ #include "debug.h"
+ #include "command.h"
++#include "parse.h"
+
+ #define DEBUGNAME "MAIN: "
+
+--- a/src/parse.c
++++ b/src/parse.c
+@@ -58,7 +58,7 @@
+ extern char * pchProgramName ;
+ extern char * pchEventDevice ;
+
+-inline void ltrim( char * pchText)
++static void ltrim( char * pchText)
+ {
+ if( pchText) {
+ char * pchTxt = pchText ;
+@@ -67,7 +67,7 @@ inline void ltrim( char * pchText)
+ }
+ }
+
+-inline void rtrim( char * pchText)
++static void rtrim( char * pchText)
+ {
+ if( pchText)
+ {
+@@ -77,7 +77,7 @@ inline void rtrim( char * pchText)
+ }
+ }
+
+-inline void trim( char * pchText)
++static void trim( char * pchText)
+ {
+ ltrim( pchText) ;
+ rtrim( pchText) ;
include $(TOPDIR)/rules.mk
PKG_NAME:=collectd
-PKG_VERSION:=5.8.1
-PKG_RELEASE:=3
+PKG_VERSION:=5.9.0
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://collectd.org/files/ \
https://github.com/collectd/collectd/releases/download/collectd-$(PKG_VERSION)
-PKG_HASH:=e796fda27ce06377f491ad91aa286962a68c2b54076aa77a29673d53204453da
+PKG_HASH:=7b220f8898a061f6e7f29a8c16697d1a198277f813da69474a67911097c0626b
PKG_FIXUP:=autoreconf
PKG_REMOVE_FILES:=aclocal.m4 libltdl/aclocal.m4
COLLECTD_PLUGINS_DISABLED:= \
amqp \
+ ampq1 \
apple_sensors \
aquaero \
barometer \
genericjmx \
gmond \
gps \
+ gpu_nvidia \
grpc \
hddtemp \
hugepages \
ipvs \
java \
log_logstash \
- lua \
lvm \
lpar \
madwifi \
oracle \
ovs_events \
ovs_stats \
+ pcie_errors \
perl \
pf \
pinba \
write_redis \
write_riemann \
write_sensu \
+ write_stackdriver \
+ write_syslog \
write_tsdb \
xencpu \
xmms \
iwinfo \
load \
logfile \
+ lua \
match_empty_counter \
match_hashed \
match_regex \
define Package/collectd
$(call Package/collectd/Default)
- DEPENDS:= +libpthread +zlib +libltdl +libip4tc
+ DEPENDS:= +libpthread \
+ +zlib \
+ +libltdl \
+ +libip4tc \
+ +jshn \
+ +PACKAGE_collectd-mod-lua:liblua
MENU:=1
endef
CONFIGURE_VARS+= \
CFLAGS="$$$$CFLAGS $(FPIC)" \
LDFLAGS="$$$$LDFLAGS -lm -lz" \
- KERNEL_DIR="$(LINUX_DIR)" \
+ KERNEL_DIR="$(LINUX_DIR)"
+
+ifneq ($(CONFIG_PACKAGE_collectd-mod-lua),)
+CONFIGURE_VARS+= \
+ LDFLAGS="$$$$LDFLAGS -llua"
+endif
ifneq ($(CONFIG_PACKAGE_COLLECTD_ENCRYPTED_NETWORK),)
CONFIGURE_ARGS+= \
define Package/collectd/conffiles
/etc/collectd.conf
+/etc/config/collectd
endef
define Package/collectd/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/collectd $(1)/usr/sbin/
+
$(INSTALL_DIR) $(1)/usr/share/collectd
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/collectd/types.db $(1)/usr/share/collectd/
- $(INSTALL_DIR) $(1)/etc
- $(INSTALL_CONF) ./files/collectd.conf $(1)/etc/
+
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/collectd.init $(1)/etc/init.d/collectd
- $(INSTALL_DIR) $(1)/etc/collectd/conf.d
+
+ $(INSTALL_DIR) $(1)/etc/config
+ $(INSTALL_CONF) files/collectd.uci $(1)/etc/config/collectd
endef
# 1: plugin name
$(PKG_INSTALL_DIR)/usr/lib/collectd/$$$$$$$${m}.so \
$$(1)/usr/lib/collectd/ ; \
done
+ if [ -f ./files/usr/share/collectd/plugin/$(1).json ]; then \
+ $(INSTALL_DIR) $$(1)/usr/share/collectd/plugin ; \
+ $(INSTALL_DATA) ./files/usr/share/collectd/plugin/$(1).json \
+ $$(1)/usr/share/collectd/plugin/$(1).json ; \
+ fi
endef
$$(eval $$(call BuildPackage,collectd-mod-$(1)))
$(eval $(call BuildPlugin,iwinfo,libiwinfo wireless statistics,iwinfo,+PACKAGE_collectd-mod-iwinfo:libiwinfo))
$(eval $(call BuildPlugin,load,system load input,load,))
$(eval $(call BuildPlugin,logfile,log files output,logfile,))
+$(eval $(call BuildPlugin,lua,lua input/output,lua,+PACKAGE_collectd-mod-lua:liblua))
$(eval $(call BuildPlugin,match-empty-counter,empty-counter match,match_empty_counter,))
$(eval $(call BuildPlugin,match-hashed,hashed match,match_hashed,))
$(eval $(call BuildPlugin,match-regex,regex match,match_regex,))
$(eval $(call BuildPlugin,ping,ping status input,ping,+PACKAGE_collectd-mod-ping:liboping))
$(eval $(call BuildPlugin,postgresql,PostgreSQL status input,postgresql,+PACKAGE_collectd-mod-postgresql:libpq))
$(eval $(call BuildPlugin,powerdns,PowerDNS server status input,powerdns,))
-$(eval $(call BuildPlugin,processes,process status input,processes,))
+$(eval $(call BuildPlugin,processes,process status input,processes,+PACKAGE_collectd-mod-processes:libmnl))
$(eval $(call BuildPlugin,protocols,network protocols input,protocols,))
$(eval $(call BuildPlugin,rrdtool,RRDtool output,rrdtool,+PACKAGE_collectd-mod-rrdtool:librrd1))
$(eval $(call BuildPlugin,sensors,lm_sensors input,sensors,+PACKAGE_collectd-mod-sensors:libsensors))
+++ /dev/null
-# Config file for collectd. More info: https://collectd.org/
-# Note: Luci statistics will generate a new config and overwrite this file.
-
-#Hostname "localhost"
-#FQDNLookup true
-BaseDir "/var/run/collectd"
-Include "/etc/collectd/conf.d"
-PIDFile "/var/run/collectd.pid"
-PluginDir "/usr/lib/collectd"
-TypesDB "/usr/share/collectd/types.db"
-Interval 30
-ReadThreads 2
-
-LoadPlugin interface
-LoadPlugin load
-#LoadPlugin ping
-LoadPlugin rrdtool
-
-<Plugin rrdtool>
- DataDir "/tmp/rrd"
- RRARows 100
- RRASingle true
- RRATimespan 3600
- RRATimespan 86400
- RRATimespan 604800
- RRATimespan 2678400
- RRATimespan 31622400
-</Plugin>
-
-<Plugin interface>
- IgnoreSelected false
- Interface "br-lan"
-</Plugin>
-
-#<Plugin ping>
-# Host "host.foo.bar"
-# Interval 30
-# TTL 127
-#</Plugin>
STOP=10
USE_PROCD=1
+COLLECTD_CONF="/tmp/collectd.conf"
+LOG="logger -t collectd[$$] -p"
NICEPRIO=5
+CONFIG_STRING=""
+
+process_exec() {
+ printf "<Plugin exec>\n" >> "$COLLECTD_CONF"
+ config_foreach process_exec_sections exec_input "Exec"
+ config_foreach process_exec_sections exec_notify "NotificationExec"
+ printf "</Plugin>\n\n" >> "$COLLECTD_CONF"
+}
+
+process_exec_sections() {
+ local cfg="$1"
+ local section="$2"
+
+ local cmdline cmduser cmdgroup
+
+ config_get cmdline "$cfg" cmdline
+ [ -z "$cmdline" ] && {
+ $LOG notice "No cmdline option in config $cfg defined"
+ return 0
+ }
+
+ config_get cmduser "$cfg" cmduser
+ [ -z "$cmduser" ] && {
+ $LOG notice "No cmduser option in config $cfg defined"
+ return 0
+ }
+
+ config_get cmdgroup "$cfg" cmdgroup
+ if [ -z "$cmdgroup" ]; then
+ printf "\\t%s \"%s\" \"%s\"\n" "${section}" "${cmduser}" "${cmdline}" >> "$COLLECTD_CONF"
+ else
+ printf "\\t%s \"%s:%s\" \"%s\"\n" "${section}" "${cmduser}" "${cmdgroup}" "${cmdline}" >> "$COLLECTD_CONF"
+ fi
+}
+
+CONFIG_LIST=""
+add_list_option() {
+ local value="$1"
+ local option="$2"
+ local indent="$3"
+
+ CONFIG_LIST="${CONFIG_LIST}${indent}${option} \"$value\"\n"
+}
+
+process_generic() {
+ local cfg="$1"
+ local indent="$2"
+ local json="$3"
+
+ local config=""
+
+ . /usr/share/libubox/jshn.sh
+ json_init
+ json_load_file "$json"
+
+ json_select string 1>/dev/null 2>&1
+ if [ $? -eq 0 ]; then
+ json_get_keys keys
+ for key in ${keys}; do
+ json_get_var option "$key"
+ config_get value "$cfg" "$option" ""
+ [ -z "$value" ] || {
+ config="${config}${indent}${option} \"${value}\"\n"
+ }
+ done
+ json_select ..
+ fi
+
+ json_select bool 1>/dev/null 2>&1
+ if [ $? -eq 0 ]; then
+ json_get_keys keys
+ for key in ${keys}; do
+ json_get_var option "$key"
+ config_get_bool value "$cfg" "$option"
+ if [ "$value" = "0" ]; then
+ config="${config}${indent}${option} false\n"
+ fi
+
+ if [ "$value" = "1" ]; then
+ config="${config}${indent}${option} true\n"
+ fi
+ done
+ json_select ..
+ fi
+
+ json_select list 1>/dev/null 2>&1
+ if [ $? -eq 0 ]; then
+ json_get_keys keys
+ for key in ${keys}; do
+ json_get_var option "$key"
+ CONFIG_LIST=""
+ config_list_foreach "$cfg" "$option" add_list_option "$option" "$indent"
+ config="${config}${CONFIG_LIST}"
+ done
+ json_select ..
+ fi
+
+ [ -z "$config" ] || {
+ printf "%s<Plugin %s>\n" "${CONFIG_STRING}" "$cfg" >> "$COLLECTD_CONF"
+ echo -e "${config}" >> "$COLLECTD_CONF"
+ printf "%s</Plugin>\n" "${CONFIG_STRING}" >> "$COLLECTD_CONF"
+ }
+
+ printf "\n" >> "$COLLECTD_CONF"
+}
+
+process_plugins() {
+ local cfg="$1"
+
+ local enable keys key option value
+
+ config_get enable "$cfg" enable 0
+ [ "$enable" = "1" ] || return 0
+
+ [ -f "/usr/lib/collectd/$cfg.so" ] || {
+ $LOG notice "Plugin collectd-mod-$cfg not installed"
+ return 0
+ }
+
+ [ -f "/usr/share/collectd/plugin/$cfg.json" ] || {
+ $LOG notice "Configuration definition file for $cfg not found"
+ return 0
+ }
+
+ printf "LoadPlugin %s\n" "$cfg" >> "$COLLECTD_CONF"
+ case "$cfg" in
+ exec)
+ CONFIG_STRING=""
+ process_exec
+ ;;
+ *)
+ CONFIG_STRING=""
+ process_generic "$cfg" "\\t" "/usr/share/collectd/plugin/$cfg.json"
+ ;;
+ esac
+}
+
+process_config() {
+ local alt_config_file BaseDir Include PIDFile PluginDir TypesDB
+ local Interval ReadThreads Hostname
+
+ rm -f "$COLLECTD_CONF"
+
+ [ -f /etc/config/collectd ] || {
+ $LOG notice "UCI config not found"
+ return 0
+ }
+ config_load collectd
+ config_get alt_config_file globals alt_config_file
+
+ # If "alt_config_file" specified, use that instead
+ [ -n "$alt_config_file" ] && [ -f "$alt_config_file" ] && {
+ rm -f "$COLLECTD_CONF"
+ ln -s "$alt_config_file" "$COLLECTD_CONF"
+ return 0
+ }
+
+ # GOBAL CONFIG
+ config_get BaseDir globals BaseDir "/var/run/collectd"
+ printf "BaseDir \"%s\"\n" "$BaseDir" >> "$COLLECTD_CONF"
+
+ config_get Include globals Include "/tmp/collectd.d"
+ printf "Include \"%s\"\n" "$Include" >> "$COLLECTD_CONF"
+ mkdir -p "$Include"
+
+ config_get PIDFile globals PIDFile "/var/run/collectd.pid"
+ printf "PIDFile \"%s\"\n" "$PIDFile" >> "$COLLECTD_CONF"
+
+ config_get PluginDir globals PluginDir "/usr/lib/collectd"
+ printf "PluginDir \"%s\"\n" "$PluginDir" >> "$COLLECTD_CONF"
+
+ config_get TypesDB globals TypesDB "/usr/share/collectd/types.db"
+ printf "TypesDB \"%s\"\n" "$TypesDB" >> "$COLLECTD_CONF"
+
+ config_get Interval globals Interval 30
+ printf "Interval \"%s\"\n" "$Interval" >> "$COLLECTD_CONF"
+
+ config_get ReadThreads globals ReadThreads 2
+ printf "ReadThreads \"%s\"\n" "$ReadThreads" >> "$COLLECTD_CONF"
+
+ config_get Hostname globals Hostname "$(hostname)"
+ printf "Hostname \"%s\"\n" "$Hostname" >> "$COLLECTD_CONF"
+
+ printf "\n" >> "$COLLECTD_CONF"
+
+ # PLUGIN CONFIG
+ config_foreach process_plugins plugin
+}
+
start_service() {
- mkdir -m 0755 -p /var/lib/collectd
procd_open_instance
- procd_set_param command /usr/sbin/collectd -f
+ procd_set_param command /usr/sbin/collectd
+ procd_append_param command -C "$COLLECTD_CONF"
+ procd_append_param command -f # don't daemonize, procd will handle that for us
procd_set_param nice "$NICEPRIO"
+
+ process_config
+
+ # set auto respawn behavior
+ procd_set_param respawn
procd_close_instance
}
--- /dev/null
+config globals 'globals'
+ option alt_config_file "/etc/collectd.conf"
+# option BaseDir '/var/run/collectd'
+# option Include '/tmp/collectd.d'
+# option PIDFile '/var/run/collectd.pid'
+# option PluginDir '/usr/lib/collectd'
+# option TypesDB '/usr/share/collectd/types.db'
+# option Interval '30'
+# option ReadThreads '2'
+
+#config plugin 'conntrack'
+# option enable '0'
+
+#config plugin 'contextswitch'
+# option enable '0'
+
+#config plugin 'cpu'
+# option enable '0'
+
+#config plugin 'cpufreq'
+# option enable '0'
+
+#config plugin 'csv'
+# option enable '0'
+# option StoreRates '0'
+# option DataDir '/tmp'
+
+#config plugin 'df'
+# option enable '0'
+# list Device '/dev/mtdblock/4'
+# list MountPoint '/jffs'
+# list FSType 'tmpfs'
+# option IgnoreSelected '0'
+
+#config plugin 'disk'
+# option enable '0'
+# list Disk 'hda1'
+# list Disk 'hdb'
+# option IgnoreSelected '0'
+
+#config plugin 'dns'
+# option enable '0'
+# list Interface 'br-lan'
+# list IgnoreSource '127.0.0.1'
+
+#config plugin 'email'
+# option enable '0'
+# option SocketFile '/var/run/collectd/email.sock'
+# option SocketGroup 'nogroup'
+
+#config plugin 'entropy'
+# option enable '0'
+
+#config plugin 'exec'
+# option enable '0'
+
+#config exec_input
+# option cmdline '/usr/bin/stat-dhcpusers'
+# option cmduser 'nobody'
+# option cmdgroup 'nogroup'
+
+#config exec_notify
+# option cmdline '/usr/bin/stat-dhcpusers'
+# option cmduser 'nobody'
+# option cmdgroup 'nogroup'
+
+#config plugin 'interface'
+# option enable '1'
+# list Interface 'br-lan'
+# option IgnoreSelected '0'
+
+#config plugin 'irq'
+# option enable '0'
+# list Irq '2'
+# list Irq '3'
+# list Irq '4'
+# list Irq '7'
+
+#config plugin 'iwinfo'
+# option enable '0'
+
+#config plugin 'load'
+# option enable '0'
+
+#config plugin 'lua'
+# option BasePath '/usr/share/collectd-mod-lua'
+# list Script 'script1.lua'
+# list Script 'script2.lua
+
+#config plugin 'memory'
+# option enable '0'
+
+#config plugin 'netlink'
+# option enable '0'
+# option IgnoreSelected '0'
+# list VerboseInterface 'br-lan'
+# list QDisc 'br-lan'
+
+#config plugin 'nut'
+# option enable '0'
+# option UPS 'myupsname'
+
+#config plugin 'olsrd'
+# option enable '0'
+# option Port '2006'
+# option Host '127.0.0.1'
+
+#config plugin 'openvpn'
+# option enable '0'
+# option StatusFile '/var/run/openvpn/openvpn.status'
+# option CollectIndividualUsers '1'
+# optoin CollectUserCount '1'
+# optoin CollectCompression '1'
+# option ImprovedNamingSchema '0'
+
+#config plugin 'ping'
+# option enable '0'
+# option TTL '127'
+# option Interval '30'
+# list Host '127.0.0.1'
+
+#config plugin 'processes'
+# option enable '0'
+# list Process 'uhttpd'
+# list Process 'dnsmasq'
+# list Process 'dropbear'
+
+#config plugin 'rrdtool'
+# option enable '0'
+# option DataDir '/tmp/rrd'
+# option RRARows '100'
+# option RRASingle '1'
+# list RRATimespan '3600'
+# list RRATimespan '86400'
+# list RRATimespan '604800'
+# list RRATimespan '2678400'
+# list RRATimespan '31622400'
+
+#config plugin 'sensors'
+# option enable '0'
+
+#config plugin 'tcpconns'
+# option enable '0'
+# list ListeningPort '0'
+# list LocalPort '22'
+# list LocalPort '80'
+
+#config plugin 'thermal'
+# option enable '0'
+# option IgnoreSelected '0'
+# list Device ''
+
+#config plugin 'unixsock'
+# option enable '0'
+# option SocketFile '/var/run/collectd/query.sock'
+# option SocketGroup 'nogroup'
+
+#config plugin 'uptime'
+# option enable '0'
+
--- /dev/null
+{
+ "string": [
+ "DataDir"
+ ],
+ "bool": [
+ "StoreRates"
+ ]
+}
--- /dev/null
+{
+ "bool": [
+ "IgnoreSelected"
+ ],
+ "list": [
+ "Device",
+ "MountPoint",
+ "FSType"
+ ]
+}
--- /dev/null
+{
+ "bool": [
+ "IgnoreSelected"
+ ],
+ "list": [
+ "Disk"
+ ]
+}
--- /dev/null
+{
+ "list": [
+ "Interface",
+ "IgnoreSource"
+ ]
+}
--- /dev/null
+{
+ "string": [
+ "SocketFile",
+ "SocketGroup",
+ "SocketPerms",
+ "MaxConns"
+ ]
+}
--- /dev/null
+{
+ "bool": [
+ "IgnoreSelected"
+ ],
+ "list": [
+ "Interface"
+ ]
+}
--- /dev/null
+{
+ "bool": [
+ "IgnoreSelected"
+ ],
+ "list": [
+ "Irq"
+ ]
+}
--- /dev/null
+{
+ "bool": [
+ "IgnoreSelected"
+ ],
+ "list": [
+ "Interface"
+ ]
+}
--- /dev/null
+{
+ "string": [
+ "BasePath"
+ ],
+ "list": [
+ "Script"
+ ]
+}
--- /dev/null
+{
+ "bool": [
+ "IgnoreSelected"
+ ],
+ "list": [
+ "Interface",
+ "VerboseInterface",
+ "QDisc",
+ "Classe",
+ "Filter"
+ ]
+}
--- /dev/null
+{
+ "string": [
+ "UPS"
+ ]
+}
--- /dev/null
+{
+ "string": [
+ "Host",
+ "Port",
+ "CollectLinks",
+ "CollectRoutes",
+ "CollectTopology"
+ ]
+}
--- /dev/null
+{
+ "string": [
+ "StatusFile"
+ ],
+ "bool": [
+ "CollectIndividualUsers",
+ "CollectUserCount",
+ "CollectCompression",
+ "ImprovedNamingSchema"
+ ]
+}
--- /dev/null
+{
+ "string": [
+ "TTL",
+ "Interval"
+ ],
+ "list": [
+ "Host"
+ ]
+}
--- /dev/null
+{
+ "list": [
+ "Process"
+ ]
+}
--- /dev/null
+{
+ "string": [
+ "DataDir",
+ "StepSize",
+ "HeartBeat",
+ "RRARows",
+ "XFF",
+ "CacheFlush",
+ "CacheTimeout"
+ ],
+ "bool": [
+ "RRASingle"
+ ],
+ "list": [
+ "RRATimespan"
+ ]
+}
--- /dev/null
+{
+ "bool": [
+ "IgnoreSelected"
+ ],
+ "list": [
+ "Sensor"
+ ]
+}
--- /dev/null
+{
+ "bool": [
+ "ListeningPorts"
+ ],
+ "list": [
+ "LocalPort",
+ "RemotePort"
+ ]
+}
--- /dev/null
+{
+ "bool": [
+ "IgnoreSelected"
+ ],
+ "list": [
+ "Device"
+ ]
+}
--- /dev/null
+{
+ "string": [
+ "SocketFile",
+ "SocketGroup",
+ "SocketPerms"
+ ]
+}
+++ /dev/null
-From d5a3c020d33cc33ee8049f54c7b4dffcd123bf83 Mon Sep 17 00:00:00 2001
-From: Pavel Rochnyack <pavel2000@ngs.ru>
-Date: Mon, 3 Dec 2018 18:34:14 +0700
-Subject: [PATCH] sensors: Removed checks for upper limit of
- SENSORS_API_VERSION
-
-That makes no more sense after lm-sensors got new maintainers.
-
-Closes: #3006
----
- src/sensors.c | 17 ++++++-----------
- 1 file changed, 6 insertions(+), 11 deletions(-)
-
-diff --git a/src/sensors.c b/src/sensors.c
-index f4ecda5e49..33982e061a 100644
---- a/src/sensors.c
-+++ b/src/sensors.c
-@@ -149,7 +149,7 @@ typedef struct featurelist {
- static char *conffile = SENSORS_CONF_PATH;
- /* #endif SENSORS_API_VERSION < 0x400 */
-
--#elif (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x500)
-+#elif (SENSORS_API_VERSION >= 0x400)
- typedef struct featurelist {
- const sensors_chip_name *chip;
- const sensors_feature *feature;
-@@ -159,11 +159,6 @@ typedef struct featurelist {
-
- static char *conffile = NULL;
- static _Bool use_labels = 0;
--/* #endif (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x500) */
--
--#else /* if SENSORS_API_VERSION >= 0x500 */
--#error "This version of libsensors is not supported yet. Please report this " \
-- "as bug."
- #endif
-
- static featurelist_t *first_feature = NULL;
-@@ -223,7 +218,7 @@ static int sensors_config(const char *key, const char *value) {
- if (IS_TRUE(value))
- ignorelist_set_invert(sensor_list, 0);
- }
--#if (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x500)
-+#if (SENSORS_API_VERSION >= 0x400)
- else if (strcasecmp(key, "UseLabels") == 0) {
- use_labels = IS_TRUE(value) ? 1 : 0;
- }
-@@ -353,7 +348,7 @@ static int sensors_load_conf(void) {
- } /* while sensors_get_detected_chips */
- /* #endif SENSORS_API_VERSION < 0x400 */
-
--#elif (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x500)
-+#elif (SENSORS_API_VERSION >= 0x400)
- chip_num = 0;
- while ((chip = sensors_get_detected_chips(NULL, &chip_num)) != NULL) {
- const sensors_feature *feature;
-@@ -410,7 +405,7 @@ static int sensors_load_conf(void) {
- } /* while (subfeature) */
- } /* while (feature) */
- } /* while (chip) */
--#endif /* (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x500) */
-+#endif /* (SENSORS_API_VERSION >= 0x400) */
-
- if (first_feature == NULL) {
- sensors_cleanup();
-@@ -485,7 +480,7 @@ static int sensors_read(void) {
- } /* for fl = first_feature .. NULL */
- /* #endif SENSORS_API_VERSION < 0x400 */
-
--#elif (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x500)
-+#elif (SENSORS_API_VERSION >= 0x400)
- for (featurelist_t *fl = first_feature; fl != NULL; fl = fl->next) {
- double value;
- int status;
-@@ -528,7 +523,7 @@ static int sensors_read(void) {
-
- sensors_submit(plugin_instance, type, type_instance, value);
- } /* for fl = first_feature .. NULL */
--#endif /* (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x500) */
-+#endif /* (SENSORS_API_VERSION >= 0x400) */
-
- return 0;
- } /* int sensors_read */
-
+++ /dev/null
-From 6028f89df95b12219d735b277863f83e9f5ee9e9 Mon Sep 17 00:00:00 2001
-From: PJ Bostley <pbostley@gmail.com>
-Date: Sat, 20 Jan 2018 16:39:36 -0700
-Subject: [PATCH 1/2] Adding support for CDAB endian 32-bit modbus polls
-
----
- src/modbus.c | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-----
- 1 file changed, 56 insertions(+), 5 deletions(-)
-
-diff --git a/src/modbus.c b/src/modbus.c
-index 31f0c2da81..daa3c028f5 100644
---- a/src/modbus.c
-+++ b/src/modbus.c
-@@ -76,9 +76,13 @@
- enum mb_register_type_e /* {{{ */
- { REG_TYPE_INT16,
- REG_TYPE_INT32,
-+ REG_TYPE_INT32_CDAB,
- REG_TYPE_UINT16,
- REG_TYPE_UINT32,
-- REG_TYPE_FLOAT }; /* }}} */
-+ REG_TYPE_UINT32_CDAB,
-+ REG_TYPE_FLOAT,
-+ REG_TYPE_FLOAT_CDAB }; /* }}} */
-+
- enum mb_mreg_type_e /* {{{ */
- { MREG_HOLDING,
- MREG_INPUT }; /* }}} */
-@@ -425,7 +429,9 @@ static int mb_read_data(mb_host_t *host, mb_slave_t *slave, /* {{{ */
-
- if ((ds->ds[0].type != DS_TYPE_GAUGE) &&
- (data->register_type != REG_TYPE_INT32) &&
-- (data->register_type != REG_TYPE_UINT32)) {
-+ (data->register_type != REG_TYPE_INT32_CDAB) &&
-+ (data->register_type != REG_TYPE_UINT32) &&
-+ (data->register_type != REG_TYPE_UINT32_CDAB)) {
- NOTICE(
- "Modbus plugin: The data source of type \"%s\" is %s, not gauge. "
- "This will most likely result in problems, because the register type "
-@@ -434,8 +440,11 @@ static int mb_read_data(mb_host_t *host, mb_slave_t *slave, /* {{{ */
- }
-
- if ((data->register_type == REG_TYPE_INT32) ||
-+ (data->register_type == REG_TYPE_INT32_CDAB) ||
- (data->register_type == REG_TYPE_UINT32) ||
-- (data->register_type == REG_TYPE_FLOAT))
-+ (data->register_type == REG_TYPE_UINT32_CDAB) ||
-+ (data->register_type == REG_TYPE_FLOAT) ||
-+ (data->register_type == REG_TYPE_FLOAT_CDAB))
- values_num = 2;
- else
- values_num = 1;
-@@ -496,8 +505,8 @@ static int mb_read_data(mb_host_t *host, mb_slave_t *slave, /* {{{ */
- }
- if (status != values_num) {
- ERROR("Modbus plugin: modbus read function (%s/%s) failed. "
-- " status = %i, values_num = %i. Giving up.",
-- host->host, host->node, status, values_num);
-+ " status = %i, start_addr = %i, values_num = %i. Giving up.",
-+ host->host, host->node, status, data->register_base, values_num);
- #if LEGACY_LIBMODBUS
- modbus_close(&host->connection);
- #else
-@@ -521,6 +530,17 @@ static int mb_read_data(mb_host_t *host, mb_slave_t *slave, /* {{{ */
- "Returned float value is %g",
- (double)float_value);
-
-+ CAST_TO_VALUE_T(ds, vt, float_value);
-+ mb_submit(host, slave, data, vt);
-+ } else if (data->register_type == REG_TYPE_FLOAT_CDAB) {
-+ float float_value;
-+ value_t vt;
-+
-+ float_value = mb_register_to_float(values[1], values[0]);
-+ DEBUG("Modbus plugin: mb_read_data: "
-+ "Returned float value is %g",
-+ (double)float_value);
-+
- CAST_TO_VALUE_T(ds, vt, float_value);
- mb_submit(host, slave, data, vt);
- } else if (data->register_type == REG_TYPE_INT32) {
-@@ -535,6 +555,20 @@ static int mb_read_data(mb_host_t *host, mb_slave_t *slave, /* {{{ */
- "Returned int32 value is %" PRIi32,
- v.i32);
-
-+ CAST_TO_VALUE_T(ds, vt, v.i32);
-+ mb_submit(host, slave, data, vt);
-+ } else if (data->register_type == REG_TYPE_INT32_CDAB) {
-+ union {
-+ uint32_t u32;
-+ int32_t i32;
-+ } v;
-+ value_t vt;
-+
-+ v.u32 = (((uint32_t)values[1]) << 16) | ((uint32_t)values[0]);
-+ DEBUG("Modbus plugin: mb_read_data: "
-+ "Returned int32 value is %" PRIi32,
-+ v.i32);
-+
- CAST_TO_VALUE_T(ds, vt, v.i32);
- mb_submit(host, slave, data, vt);
- } else if (data->register_type == REG_TYPE_INT16) {
-@@ -561,6 +595,17 @@ static int mb_read_data(mb_host_t *host, mb_slave_t *slave, /* {{{ */
- "Returned uint32 value is %" PRIu32,
- v32);
-
-+ CAST_TO_VALUE_T(ds, vt, v32);
-+ mb_submit(host, slave, data, vt);
-+ } else if (data->register_type == REG_TYPE_UINT32_CDAB) {
-+ uint32_t v32;
-+ value_t vt;
-+
-+ v32 = (((uint32_t)values[1]) << 16) | ((uint32_t)values[0]);
-+ DEBUG("Modbus plugin: mb_read_data: "
-+ "Returned uint32 value is %" PRIu32,
-+ v32);
-+
- CAST_TO_VALUE_T(ds, vt, v32);
- mb_submit(host, slave, data, vt);
- } else /* if (data->register_type == REG_TYPE_UINT16) */
-@@ -702,12 +747,18 @@ static int mb_config_add_data(oconfig_item_t *ci) /* {{{ */
- data.register_type = REG_TYPE_INT16;
- else if (strcasecmp("Int32", tmp) == 0)
- data.register_type = REG_TYPE_INT32;
-+ else if (strcasecmp("Int32LE", tmp) == 0)
-+ data.register_type = REG_TYPE_INT32_CDAB;
- else if (strcasecmp("Uint16", tmp) == 0)
- data.register_type = REG_TYPE_UINT16;
- else if (strcasecmp("Uint32", tmp) == 0)
- data.register_type = REG_TYPE_UINT32;
-+ else if (strcasecmp("Uint32LE", tmp) == 0)
-+ data.register_type = REG_TYPE_UINT32_CDAB;
- else if (strcasecmp("Float", tmp) == 0)
- data.register_type = REG_TYPE_FLOAT;
-+ else if (strcasecmp("FloatLE", tmp) == 0)
-+ data.register_type = REG_TYPE_FLOAT_CDAB;
- else {
- ERROR("Modbus plugin: The register type \"%s\" is unknown.", tmp);
- status = -1;
-
-From 67afd2685892e69ababb489f48b9033ab5908f4d Mon Sep 17 00:00:00 2001
-From: PJ Bostley <pbostley@gmail.com>
-Date: Tue, 23 Jan 2018 15:33:23 -0700
-Subject: [PATCH 2/2] Adding documentation for the Modbus little endian modes
- where 32 bit values have thier registers swapped
-
----
- src/collectd.conf.pod | 18 +++++++++++++-----
- 1 file changed, 13 insertions(+), 5 deletions(-)
-
-diff --git a/src/collectd.conf.pod b/src/collectd.conf.pod
-index dfd785a2c8..e9715126e6 100644
---- a/src/collectd.conf.pod
-+++ b/src/collectd.conf.pod
-@@ -4139,11 +4139,19 @@ Configures the base register to read from the device. If the option
- B<RegisterType> has been set to B<Uint32> or B<Float>, this and the next
- register will be read (the register number is increased by one).
-
--=item B<RegisterType> B<Int16>|B<Int32>|B<Uint16>|B<Uint32>|B<Float>
--
--Specifies what kind of data is returned by the device. If the type is B<Int32>,
--B<Uint32> or B<Float>, two 16E<nbsp>bit registers will be read and the data is
--combined into one value. Defaults to B<Uint16>.
-+=item B<RegisterType> B<Int16>|B<Int32>|B<Uint16>|B<Uint32>|B<Float>|B<Int32LE>|B<Uint32LE>|B<FloatLE>
-+
-+Specifies what kind of data is returned by the device. This defaults to
-+B<Uint16>. If the type is B<Int32>, B<Int32LE>, B<Uint32>, B<Uint32LE>,
-+B<Float> or B<FloatLE>, two 16E<nbsp>bit registers at B<RegisterBase>
-+and B<RegisterBase+1> will be read and the data is combined into one
-+32E<nbsp>value. For B<Int32>, B<Uint32> and B<Float> the most significant
-+16E<nbsp>bits are in the register at B<RegisterBase> and the least
-+significant 16E<nbsp>bits are in the register at B<RegisterBase+1>.
-+For B<Int32LE>, B<Uint32LE>, or B<Float32LE>, the high and low order
-+registers are swapped with the most significant 16E<nbsp>bits in
-+the B<RegisterBase+1> and the least significant 16E<nbsp>bits in
-+B<RegisterBase>.
-
- =item B<RegisterCmd> B<ReadHolding>|B<ReadInput>
-
/* consolidation_functions = */ NULL,
/* consolidation_functions_num = */ 0,
-@@ -949,6 +952,12 @@ static int rrd_config(const char *key, c
+@@ -944,6 +947,12 @@ static int rrd_config(const char *key, c
/* compar = */ rrd_compare_numeric);
free(value_copy);
} else if (strcasecmp("XFF", key) == 0) {
double tmp = atof(value);
if ((tmp < 0.0) || (tmp >= 1.0)) {
---- a/src/utils_rrdcreate.c
-+++ b/src/utils_rrdcreate.c
+--- a/src/utils/rrdcreate/rrdcreate.c
++++ b/src/utils/rrdcreate/rrdcreate.c
@@ -180,6 +180,9 @@ static int rra_get(char ***ret, const va
rts_num = rra_timespans_num;
}
rra_max = rts_num * rra_types_num;
assert(rra_max > 0);
---- a/src/utils_rrdcreate.h
-+++ b/src/utils_rrdcreate.h
+--- a/src/utils/rrdcreate/rrdcreate.h
++++ b/src/utils/rrdcreate/rrdcreate.h
@@ -40,6 +40,8 @@ struct rrdcreate_config_s {
int *timespans;
size_t timespans_num;
--- a/src/daemon/plugin.c
+++ b/src/daemon/plugin.c
-@@ -1099,7 +1099,7 @@ static int plugin_insert_read(read_func_
+@@ -1085,7 +1085,7 @@ static int plugin_insert_read(read_func_
int status;
llentry_t *le;
--- a/src/olsrd.c
+++ b/src/olsrd.c
-@@ -585,7 +585,7 @@ static int olsrd_read(void) /* {{{ */
+@@ -582,7 +582,7 @@ static int olsrd_read(void) /* {{{ */
if (fh == NULL)
return -1;
--- a/configure.ac
+++ b/configure.ac
-@@ -3327,9 +3327,9 @@ if test "x$with_libmodbus" = "xyes"; the
+@@ -3399,9 +3399,9 @@ if test "x$with_libmodbus" = "xyes"; the
SAVE_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $with_libmodbus_cflags"
--- a/src/modbus.c
+++ b/src/modbus.c
@@ -26,7 +26,7 @@
- #include "configfile.h"
#include "plugin.h"
+ #include "utils/common/common.h"
-#include <modbus.h>
+#include <modbus/modbus.h>
--- a/configure.ac
+++ b/configure.ac
-@@ -526,11 +526,7 @@ if test "x$ac_system" = "xLinux"; then
+@@ -531,11 +531,7 @@ if test "x$ac_system" = "xLinux"; then
[have_cpuid_h="no (cpuid.h not found)"]
)
--- a/configure.ac
+++ b/configure.ac
-@@ -710,6 +710,11 @@ AC_CACHE_CHECK([whether clock_boottime a
+@@ -721,6 +721,11 @@ AC_CACHE_CHECK([whether clock_boottime a
]
)
#
# Checks for typedefs, structures, and compiler characteristics.
-@@ -6127,6 +6132,7 @@ plugin_ipc="no"
+@@ -6392,6 +6397,7 @@ plugin_ipc="no"
plugin_ipmi="no"
plugin_ipvs="no"
plugin_irq="no"
plugin_load="no"
plugin_log_logstash="no"
plugin_mcelog="no"
-@@ -6538,6 +6544,7 @@ AC_PLUGIN([ipmi], [$plugi
- AC_PLUGIN([iptables], [$with_libiptc], [IPTables rule counters])
- AC_PLUGIN([ipvs], [$plugin_ipvs], [IPVS connection statistics])
- AC_PLUGIN([irq], [$plugin_irq], [IRQ statistics])
-+AC_PLUGIN([iwinfo], [$with_iwinfo], [Common iwinfo wireless statistics])
- AC_PLUGIN([java], [$with_java], [Embed the Java Virtual Machine])
- AC_PLUGIN([load], [$plugin_load], [System load])
- AC_PLUGIN([log_logstash], [$plugin_log_logstash], [Logstash json_event compatible logging])
-@@ -6899,6 +6906,7 @@ AC_MSG_RESULT([ libyajl . . . . . . .
+@@ -6826,6 +6832,7 @@ AC_PLUGIN([ipmi], [$plugi
+ AC_PLUGIN([iptables], [$with_libiptc], [IPTables rule counters])
+ AC_PLUGIN([ipvs], [$plugin_ipvs], [IPVS connection statistics])
+ AC_PLUGIN([irq], [$plugin_irq], [IRQ statistics])
++AC_PLUGIN([iwinfo], [$with_iwinfo], [Common iwinfo wireless statistics])
+ AC_PLUGIN([java], [$with_java], [Embed the Java Virtual Machine])
+ AC_PLUGIN([load], [$plugin_load], [System load])
+ AC_PLUGIN([log_logstash], [$plugin_log_logstash], [Logstash json_event compatible logging])
+@@ -7193,6 +7200,7 @@ AC_MSG_RESULT([ libyajl . . . . . . .
AC_MSG_RESULT([ oracle . . . . . . . $with_oracle])
AC_MSG_RESULT([ protobuf-c . . . . . $have_protoc_c])
AC_MSG_RESULT([ protoc 3 . . . . . . $have_protoc3])
AC_MSG_RESULT()
AC_MSG_RESULT([ Features:])
AC_MSG_RESULT([ daemon mode . . . . . $enable_daemon])
-@@ -6957,6 +6965,7 @@ AC_MSG_RESULT([ ipmi . . . . . . . .
+@@ -7253,6 +7261,7 @@ AC_MSG_RESULT([ ipmi . . . . . . . .
AC_MSG_RESULT([ iptables . . . . . . $enable_iptables])
AC_MSG_RESULT([ ipvs . . . . . . . . $enable_ipvs])
AC_MSG_RESULT([ irq . . . . . . . . . $enable_irq])
AC_MSG_RESULT([ logfile . . . . . . . $enable_logfile])
--- a/src/collectd.conf.in
+++ b/src/collectd.conf.in
-@@ -137,6 +137,7 @@
+@@ -138,6 +138,7 @@
#@BUILD_PLUGIN_IPTABLES_TRUE@LoadPlugin iptables
#@BUILD_PLUGIN_IPVS_TRUE@LoadPlugin ipvs
#@BUILD_PLUGIN_IRQ_TRUE@LoadPlugin irq
#@BUILD_PLUGIN_JAVA_TRUE@LoadPlugin java
@BUILD_PLUGIN_LOAD_TRUE@@BUILD_PLUGIN_LOAD_TRUE@LoadPlugin load
#@BUILD_PLUGIN_LPAR_TRUE@LoadPlugin lpar
-@@ -721,6 +722,12 @@
+@@ -767,6 +768,12 @@
# IgnoreSelected true
#</Plugin>
# JVMArg "-Djava.class.path=@prefix@/share/collectd/java/collectd-api.jar"
--- a/src/collectd.conf.pod
+++ b/src/collectd.conf.pod
-@@ -3521,6 +3521,27 @@ and all other interrupts are collected.
+@@ -3803,6 +3803,27 @@ and all other interrupts are collected.
=back
+ **/
+
+#include "collectd.h"
-+#include "common.h"
+#include "plugin.h"
-+#include "utils_ignorelist.h"
++#include "utils/common/common.h"
++#include "utils/ignorelist/ignorelist.h"
+
+#include <stdint.h>
+#include <iwinfo.h>
+}
--- a/src/types.db
+++ b/src/types.db
-@@ -269,6 +269,7 @@ voltage_threshold value:GAUGE:U:U,
- vs_memory value:GAUGE:0:9223372036854775807
- vs_processes value:GAUGE:0:65535
- vs_threads value:GAUGE:0:65535
+@@ -240,6 +240,7 @@ voltage_threshold value:GAUGE:U:U,
+ spam_check value:GAUGE:0:U
+ spam_score value:GAUGE:U:U
+ spl value:GAUGE:U:U
+stations value:GAUGE:0:256
-
- #
- # Legacy types
+ swap value:GAUGE:0:1099511627776
+ swap_io value:DERIVE:0:U
+ tcp_connections value:GAUGE:0:4294967295
--- a/Makefile.am
+++ b/Makefile.am
-@@ -997,6 +997,14 @@ irq_la_LDFLAGS = $(PLUGIN_LDFLAGS)
+@@ -1149,6 +1149,14 @@ irq_la_LDFLAGS = $(PLUGIN_LDFLAGS)
irq_la_LIBADD = libignorelist.la
endif
--- a/src/ping.c
+++ b/src/ping.c
-@@ -633,7 +633,7 @@ static int ping_read(void) /* {{{ */
+@@ -648,7 +648,7 @@ static int ping_read(void) /* {{{ */
((double)(pkg_recv * (pkg_recv - 1))));
/* Calculate drop rate. */
--- /dev/null
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=containerd
+PKG_VERSION:=1.2.6
+PKG_RELEASE:=1
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/containerd/containerd/tar.gz/v${PKG_VERSION}?
+PKG_HASH:=f2d578b743fb9faa5b3477b7cf4b33d00501087043a53b27754f14bbe741f891
+PKG_SOURCE_VERSION:=894b81a4b802e4eb2a91d1ce216b8817763c29fb
+
+PKG_MAINTAINER:=Gerard Ryan <G.M0N3Y.2503@gmail.com>
+
+PKG_BUILD_DEPENDS:=golang/host
+PKG_BUILD_PARALLEL:=1
+PKG_INSTALL:=1
+
+GO_PKG:=github.com/containerd/containerd
+
+include $(INCLUDE_DIR)/package.mk
+include ../../lang/golang/golang-package.mk
+
+define Package/containerd/config
+config CONTAINERD_SECCOMP
+ depends on PACKAGE_containerd
+ bool "Enable support for seccomp in containerd"
+ default DOCKER_SECCOMP
+ select KERNEL_SECCOMP
+ select PACKAGE_libseccomp
+ help
+ Build containerd with support for seccomp filters.
+ Select libseccomp which also pulls-in the needed kernel features.
+endef
+
+define Package/containerd
+ SECTION:=utils
+ CATEGORY:=Utilities
+ TITLE:=containerd container runtime
+ URL:=https://containerd.io/
+ DEPENDS:=$(GO_ARCH_DEPENDS) @TARGET_x86_64 +btrfs-progs +runc +CONTAINERD_SECCOMP:libseccomp
+ MENU:=1
+endef
+
+define Package/containerd/description
+An industry-standard container runtime with an emphasis on simplicity, robustness and portability
+endef
+
+GO_PKG_INSTALL_ALL:=1
+MAKE_PATH:=$(GO_PKG_WORK_DIR_NAME)/build/src/$(GO_PKG)
+MAKE_VARS += \
+ GOPATH=$(GO_PKG_BUILD_DIR) \
+ GOCACHE=$(GO_PKG_CACHE_DIR) \
+ GOTMPDIR=$(GO_PKG_TMP_DIR) \
+ GOROOT_FINAL=$(GO_TARGET_ROOT) \
+ CC=$(TARGET_CC) \
+ CXX=$(TARGET_CXX) \
+ $(call GoPackage/Environment)
+MAKE_FLAGS += \
+ DESTDIR="$(PKG_INSTALL_DIR)" \
+ VERSION=$(PKG_VERSION) \
+ REVISION=$(PKG_SOURCE_VERSION)
+
+ifeq ($(CONFIG_CONTAINERD_SECCOMP),y)
+MAKE_FLAGS += BUILDTAGS='seccomp'
+else
+MAKE_FLAGS += BUILDTAGS=''
+endif
+
+define Build/Compile
+ $(call Build/Compile/Default)
+endef
+
+# Avoid installing binaries
+define Build/InstallDev
+ $(call Build/Compile/Default,clean)
+ $(call GoPackage/Build/InstallDev,$(1))
+endef
+
+define Package/containerd/install
+ $(INSTALL_DIR) $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/{ctr,containerd,containerd-stress,containerd-shim} $(1)/usr/bin/
+endef
+
+$(eval $(call BuildPackage,containerd))
PKG_NAME:=coreutils
PKG_VERSION:=8.30
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@GNU/coreutils
timeout touch tr true truncate tsort tty uname unexpand uniq unlink \
uptime users vdir wc who whoami yes
+DIR_BIN := \
+ base64 cat chgrp chmod chown cp date dd echo false kill link ln ls \
+ mkdir mknod mktemp mv nice printenv pwd rm rmdir sleep stat stty sync \
+ touch true uname
+
+DIR_USR_BIN := \
+ basename cksum comm cut dirname du env expand expr factor fold groups \
+ head hostid id install logname md5sum mkfifo nl nohup nproc od paste \
+ printf readlink realpath seq sha1sum sha256sum sha512sum shred shuf \
+ sort split sum tac tail tee test timeout tr truncate tty unexpand uniq \
+ unlink uptime users wc who whoami yes
+
+DIR_USR_SBIN := \
+ chroot
+
+# BusyBox does not provide these yet
+DIR_OTHERS := \
+ chcon csplit dir dircolors fmt join pathchk pinky pr ptx runcon \
+ sha224sum sha384sum stdbuf tsort vdir
+
+$(eval $(foreach a,$(DIR_BIN),ALTS_$(a):=300:/bin/$(a):/usr/bin/gnu-$(a)$(newline)))
+$(eval $(foreach a,$(DIR_USR_BIN),ALTS_$(a):=300:/usr/bin/$(a):/usr/bin/gnu-$(a)$(newline)))
+$(eval $(foreach a,$(DIR_USR_SBIN),ALTS_$(a):=300:/usr/sbin/$(a):/usr/bin/gnu-$(a)$(newline)))
+
DEPENDS_sort = +libpthread
DEPENDS_timeout = +librt
DEPENDS_expr = +libgmp
$(call Package/coreutils/Default)
DEPENDS:=coreutils $(DEPENDS_$(2))
TITLE:=Utility $(2) from the GNU core utilities
+ ALTERNATIVES:=$(ALTS_$(2))
endef
define Package/$(1)/description
define BuildPlugin
define Package/$(1)/install
$(INSTALL_DIR) $$(1)/usr/bin
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(2) $$(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(2) $$(1)/usr/bin/$(if $(ALTS_$(2)),gnu-$(2),$(2))
$(foreach f,$(FILES_$(2)),
$(INSTALL_DIR) $$(1)/$(dir $(f))
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/$(f) $$(1)/$(f)
include $(TOPDIR)/rules.mk
PKG_NAME:=cryptsetup
-PKG_VERSION:=2.0.6
-PKG_RELEASE:=2
+PKG_VERSION:=2.1.0
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_SOURCE_URL:=@KERNEL/linux/utils/cryptsetup/v2.0
-PKG_HASH:=7c51fae0f0e7ea9af0f515b2ac77009fb2969a6619ebab47d097dca38b083d30
+PKG_SOURCE_URL:=@KERNEL/linux/utils/cryptsetup/v2.1
+PKG_HASH:=a3eeb2741f8f3376d16585191f3c60e067dd987e096c3c4b073fab7748b1c897
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
PKG_NAME:=device-observatory
PKG_VERSION:=1.2.0
-PKG_RELEASE:=2
-
-PKG_LICENSE:=GPL-3.0+
+PKG_RELEASE:=4
PKG_SOURCE_URL:=https://codeload.github.com/mwarning/device-observatory/tar.gz/v$(PKG_VERSION)?
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_HASH:=83b3f362f154a427abbd3af31b3c2dda9983cdc15f6b833d804727ef0fbdc72e
+PKG_LICENSE:=GPL-3.0+
+PKG_BUILD_DEPENDS:=vim/host
+
include $(INCLUDE_DIR)/package.mk
define Package/device-observatory
--- /dev/null
+--- a/src/parse_ether.c
++++ b/src/parse_ether.c
+@@ -21,10 +21,18 @@
+ #include "parse_ether.h"
+
+ /* tcpdump header (ether.h) defines ETHER_HDRLEN) */
+-#ifndef ETHER_HDRLEN
++#ifndef ETHER_HDRLEN
+ #define ETHER_HDRLEN 14
+ #endif
+
++/* uClibc-ng compatibility */
++#ifndef IPPROTO_BEETPH
++#define IPPROTO_BEETPH 94
++#endif
++
++#ifndef IPPROTO_MPLS
++#define IPPROTO_MPLS 137
++#endif
+
+ const char *ip_protcol_str(int p)
+ {
--- /dev/null
+if PACKAGE_docker-ce
+ config DOCKER_KERNEL_OPTIONS
+ bool "Enable Basic kernel support for Docker"
+ default n
+ select KERNEL_CGROUPS
+ select KERNEL_CGROUP_CPUACCT
+ select KERNEL_CGROUP_SCHED
+ select KERNEL_NAMESPACES
+ select KERNEL_CPUSETS
+ select KERNEL_MEMCG
+ select KERNEL_KEYS
+ select KERNEL_LXC_MISC
+ select KERNEL_POSIX_MQUEUE
+ help
+ Select needed kernel options for Docker. Options include
+ cgroups, namespaces and other miscellaneous options.
+ see also https://github.com/docker/engine/blob/master/contrib/check-config.sh
+
+ config DOCKER_SECCOMP
+ bool "Enable support for seccomp in Docker"
+ default n
+ select KERNEL_SECCOMP
+ select PACKAGE_libseccomp
+ help
+ Build Docker with support for seccomp filters.
+ Select libseccomp which also pulls-in the needed kernel features.
+
+ config DOCKER_RES_SHAPE
+ bool "Enables support for resource shaping"
+ default n
+ select KERNEL_MEMCG_SWAP
+ select KERNEL_MEMCG_SWAP_ENABLED
+ select KERNEL_BLK_DEV_THROTTLING
+ select KERNEL_CGROUP_PERF
+ select KERNEL_FAIR_GROUP_SCHED
+ select KERNEL_CFS_BANDWIDTH
+ select KERNEL_RT_GROUP_SCHED
+
+ menu "Network"
+ config DOCKER_NET_OVERLAY
+ bool "Enables the Overlay network feature"
+ default n
+ select PACKAGE_kmod-udptunnel4
+ help
+ Selects kernel options for the Overlay network feature.
+ Includes udptunnel4
+
+ config DOCKER_NET_ENCRYPT
+ bool "Enable encrypted networking kernel support"
+ depends on DOCKER_NET_OVERLAY
+ default n
+ select PACKAGE_kmod-ipsec
+ select PACKAGE_kmod-ipsec4
+ select PACKAGE_kmod-crypto-gcm
+ select PACKAGE_kmod-crypto-ghash
+ help
+ Select needed kernel options for encrypted networking support.
+
+ config DOCKER_NET_MACVLAN
+ bool "Enables macvlan kernel support"
+ default n
+ select PACKAGE_kmod-macvlan
+ select PACKAGE_kmod-dummy
+
+ config DOCKER_NET_TFTP
+ bool "Enable ftp/tftp client kernel support"
+ default n
+ select PACKAGE_kmod-nf-nathelper
+ select PACKAGE_kmod-nf-nathelper-extra
+ endmenu
+
+ menu "Storage"
+ config DOCKER_STO_EXT4
+ bool "Enables support for ext3 or ext4 as the backing filesystem"
+ default n
+ select KERNEL_EXT4_FS_POSIX_ACL
+
+ config DOCKER_STO_BTRFS
+ bool "Enables support for btrfs as the backing filesystem"
+ default n
+ select PACKAGE_kmod-fs-btrfs
+ select KERNEL_BTRFS_FS_POSIX_ACL
+ endmenu
+endif
--- /dev/null
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=docker-ce
+PKG_VERSION:=18.09.6
+PKG_RELEASE:=1
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=components/cli/LICENSE components/engine/LICENSE
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/docker/docker-ce/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=e8d2dd41e09e838e9043d4a5cf8433d8860afa20a611025621f7817b7ab16012
+PKG_SOURCE_VERSION:=481bc77156
+
+PKG_MAINTAINER:=Gerard Ryan <G.M0N3Y.2503@gmail.com>
+
+PKG_BUILD_DEPENDS:=golang/host
+PKG_BUILD_PARALLEL:=1
+
+GO_PKG:=github.com/docker
+
+include $(INCLUDE_DIR)/package.mk
+include ../../lang/golang/golang-package.mk
+
+define Package/docker-ce/config
+ source "$(SOURCE)/Config.in"
+endef
+
+define Package/docker-ce
+ SECTION:=utils
+ CATEGORY:=Utilities
+ TITLE:=Docker Community Edition
+ URL:=https://www.docker.com/
+ DEPENDS:=$(GO_ARCH_DEPENDS) @TARGET_x86_64 +btrfs-progs +libdevmapper +containerd +cgroupfs-mount +ca-certificates +iptables-mod-extra +DOCKER_SECCOMP:libseccomp \
+ +kmod-ikconfig +kmod-veth +kmod-br-netfilter +kmod-nf-ipvs
+ USERID:=docker:docker
+ MENU:=1
+endef
+
+define Package/docker-ce/description
+ Docker Engine is used by millions enables containerized applications
+ to run anywhere consistently on any infrastructure.
+endef
+
+define Build/Configure
+ # move so GoPackage/Build/Configure will get the correct path
+ mv $(PKG_BUILD_DIR)/components/engine $(PKG_BUILD_DIR)/
+ mv $(PKG_BUILD_DIR)/components/cli $(PKG_BUILD_DIR)/
+
+ # docker generates files at build time so we'll just symlink for now and call GoPackage/Build/Configure later
+ mkdir -p $(GO_PKG_BUILD_DIR)/bin \
+ $(GO_PKG_BUILD_DIR)/src \
+ $(GO_PKG_BUILD_DIR)/src/$(GO_PKG)/ \
+ $(GO_PKG_CACHE_DIR) \
+ $(GO_PKG_TMP_DIR)
+ $(LN) $(PKG_BUILD_DIR)/cli $(GO_PKG_BUILD_DIR)/src/$(GO_PKG)/cli
+ $(LN) $(PKG_BUILD_DIR)/engine $(GO_PKG_BUILD_DIR)/src/$(GO_PKG)/docker
+endef
+
+ifeq ($(CONFIG_DOCKER_SECCOMP),y)
+BUILDTAGS:=seccomp
+else
+BUILDTAGS:=
+endif
+
+define Build/Compile
+ ( \
+ export GOPATH=$(GO_PKG_BUILD_DIR) \
+ GOCACHE=$(GO_PKG_CACHE_DIR) \
+ GOTMPDIR=$(GO_PKG_TMP_DIR) \
+ GOROOT_FINAL=$(GO_TARGET_ROOT) \
+ CC=$(TARGET_CC) \
+ CXX=$(TARGET_CXX) \
+ $(call GoPackage/Environment) \
+ GITCOMMIT=$(PKG_SOURCE_VERSION) \
+ DOCKER_GITCOMMIT=$(PKG_SOURCE_VERSION) \
+ DOCKER_BUILDTAGS='$(BUILDTAGS)' \
+ VERSION=$(PKG_VERSION) \
+ \
+ && echo "Compiling CLI..." \
+ && cd $(PKG_BUILD_DIR)/cli \
+ && ./scripts/build/binary \
+ \
+ && echo "Compiling Engine..." \
+ && cd $(PKG_BUILD_DIR)/engine \
+ && ./hack/make.sh binary \
+ )
+
+ # done here to include autogenerated files also
+ rm $(GO_PKG_BUILD_DIR)/src/$(GO_PKG)/cli
+ rm $(GO_PKG_BUILD_DIR)/src/$(GO_PKG)/docker
+ $(call GoPackage/Build/Configure)
+endef
+
+define Package/docker-ce/install
+ $(INSTALL_DIR) $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/cli/build/docker $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/engine/bundles/binary-daemon/dockerd $(1)/usr/bin/
+
+ $(INSTALL_DIR) $(1)/opt/docker/
+ $(INSTALL_DIR) $(1)/usr/share/docker/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/engine/contrib/check-config.sh $(1)/usr/share/docker/
+
+ $(INSTALL_DIR) $(1)/etc/init.d
+ $(INSTALL_BIN) ./files/dockerd.init $(1)/etc/init.d/dockerd
+endef
+
+$(eval $(call BuildPackage,docker-ce))
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+USE_PROCD=1
+START=25
+
+# docker can't run with a symlink in the path so we just use /opt/docker/
+start_service() {
+ procd_open_instance
+ procd_set_param command /usr/bin/dockerd -g /opt/docker/
+ procd_close_instance
+}
--- /dev/null
+Index: docker-ce-18.09.0/components/engine/hack/make.sh
+===================================================================
+--- docker-ce-18.09.0.orig/components/engine/hack/make.sh
++++ docker-ce-18.09.0/components/engine/hack/make.sh
+@@ -129,7 +129,7 @@ fi
+ # with a newer libdevmapper than the one it was built with.
+ if \
+ command -v gcc &> /dev/null \
+- && ! ( echo -e '#include <libdevmapper.h>\nint main() { dm_task_deferred_remove(NULL); }'| gcc -xc - -o /dev/null $(pkg-config --libs devmapper) &> /dev/null ) \
++ && ! ( echo -e '#include <libdevmapper.h>\nint main() { dm_task_deferred_remove(NULL); }'| gcc -xc - -o /dev/null $(pkg-config --libs libdevmapper) &> /dev/null ) \
+ ; then
+ add_buildtag libdm dlsym_deferred_remove
+ fi
PKG_VERSION_PATCH:=9700
PKG_COMMIT:=
PKG_VERSION:=$(PKG_VERSION_MAJOR).$(PKG_VERSION_PATCH)
-PKG_RELEASE:=1
+PKG_RELEASE:=3
ifeq ($(PKG_COMMIT),)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
endef
CMAKE_OPTIONS += \
+ -DBUILD_SHARED_LIBS=yes \
+ -DBoost_NO_BOOST_CMAKE=yes \
-DCMAKE_BUILD_TYPE=Release \
-DUSE_BUILTIN_MQTT=no \
-DUSE_BUILTIN_SQLITE=no \
--- /dev/null
+From 9d226dab339f5767ec01ea1bcc9043ceee185cca Mon Sep 17 00:00:00 2001
+From: Rob Peters <info@domoticz.com>
+Date: Mon, 25 Mar 2019 08:50:23 +0100
+Subject: [PATCH] Fix for boot 1.70 get_io_service, fixed #3117
+
+---
+ hardware/Pinger.cpp | 10 ++++++++--
+ hardware/TCPProxy/tcpproxy_server.cpp | 8 +++++++-
+ 2 files changed, 15 insertions(+), 3 deletions(-)
+
+diff --git a/hardware/Pinger.cpp b/hardware/Pinger.cpp
+index 01a955ba4..184378738 100644
+--- a/hardware/Pinger.cpp
++++ b/hardware/Pinger.cpp
+@@ -18,6 +18,12 @@
+
+ #include <iostream>
+
++#if BOOST_VERSION >= 107000
++#define GET_IO_SERVICE(s) ((boost::asio::io_context&)(s).get_executor().context())
++#else
++#define GET_IO_SERVICE(s) ((s).get_io_service())
++#endif
++
+ class pinger
+ : private domoticz::noncopyable
+ {
+@@ -76,7 +82,7 @@ class pinger
+ num_tries_++;
+ if (num_tries_ > 4)
+ {
+- resolver_.get_io_service().stop();
++ GET_IO_SERVICE(resolver_).stop();
+ }
+ else
+ {
+@@ -118,7 +124,7 @@ class pinger
+ if (num_replies_++ == 0)
+ timer_.cancel();
+ m_PingState = true;
+- resolver_.get_io_service().stop();
++ GET_IO_SERVICE(resolver_).stop();
+ }
+ else
+ {
+diff --git a/hardware/TCPProxy/tcpproxy_server.cpp b/hardware/TCPProxy/tcpproxy_server.cpp
+index fddac08de..60445d9c2 100644
+--- a/hardware/TCPProxy/tcpproxy_server.cpp
++++ b/hardware/TCPProxy/tcpproxy_server.cpp
+@@ -15,6 +15,12 @@
+ #include "stdafx.h"
+ #include "tcpproxy_server.h"
+
++#if BOOST_VERSION >= 107000
++#define GET_IO_SERVICE(s) ((boost::asio::io_context&)(s).get_executor().context())
++#else
++#define GET_IO_SERVICE(s) ((s).get_io_service())
++#endif
++
+ namespace tcp_proxy
+ {
+ bridge::bridge(boost::asio::io_service& ios)
+@@ -38,7 +44,7 @@ namespace tcp_proxy
+ boost::asio::ip::tcp::endpoint end;
+
+
+- boost::asio::io_service &ios=downstream_socket_.get_io_service();
++ boost::asio::io_service &ios= GET_IO_SERVICE(downstream_socket_);
+ boost::asio::ip::tcp::resolver resolver(ios);
+ boost::asio::ip::tcp::resolver::query query(upstream_host, upstream_port, boost::asio::ip::resolver_query_base::numeric_service);
+ boost::asio::ip::tcp::resolver::iterator i = resolver.resolve(query);
PKG_NAME:=dosfstools
PKG_VERSION:=4.1
-PKG_RELEASE:=1
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://github.com/dosfstools/dosfstools/releases/download/v$(PKG_VERSION)/ \
+++ /dev/null
-From 1c6c135ee15e449c1bf2e76d5307f83a3a1d7425 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= <noltari@gmail.com>
-Date: Tue, 11 Oct 2016 12:07:48 +0200
-Subject: [PATCH] Switch to AC_CHECK_LIB for iconv library linking.
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-AC_SEARCH_LIB doesn't work properly for openwrt/lede when building dosfstools
-as a package.
-
-Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
----
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/configure.ac
-+++ b/configure.ac
-@@ -59,7 +59,7 @@ if test "x$with_udev" != "xno"; then
- [true])
- fi
-
--AC_SEARCH_LIBS(iconv_open, iconv)
-+AC_CHECK_LIB(iconv, iconv_open)
-
- # xxd (distributed with vim) is used in the testsuite
- AC_CHECK_PROG([XXD_FOUND], [xxd], [yes])
--- /dev/null
+From e18bcc65d5772e518c6496b439bad8a986f7e434 Mon Sep 17 00:00:00 2001
+From: Rosen Penev <rosenp@gmail.com>
+Date: Thu, 20 Jun 2019 15:18:19 -0700
+Subject: [PATCH] configure: Fix iconv check for cross compilation
+
+AC_CHECK_LIB is more friendly towards cross-compilation.
+
+Added check for libiconv_open as that can be used when the libc lacks iconv.
+---
+ configure.ac | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 07e8703..1b09964 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -75,7 +75,8 @@ if test "x$with_udev" != "xno"; then
+ [true])
+ fi
+
+-AC_SEARCH_LIBS(iconv_open, iconv)
++AC_CHECK_LIB(iconv, iconv_open)
++AC_CHECK_LIB(iconv, libiconv_open)
+
+ # xxd (distributed with vim) is used in the testsuite
+ AC_CHECK_PROG([XXD_FOUND], [xxd], [yes])
--- /dev/null
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=fft-eval
+PKG_VERSION:=2017-06-28
+PKG_RELEASE=$(PKG_SOURCE_VERSION)
+
+PKG_SOURCE_VERSION:=3cc175570379da172b0b2bcdbb8d2a42f83dad88
+PKG_SOURCE:=FFT_eval-$(PKG_SOURCE_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/simonwunderlich/FFT_eval/tar.gz/$(PKG_SOURCE_VERSION)?
+PKG_HASH:=9d70125fffc83918e6613d5938c4a9925aea07323e09470cf059cf0026e5937c
+PKG_BUILD_DIR:=$(BUILD_DIR)/FFT_eval-$(PKG_SOURCE_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/$(PKG_NAME)
+ SECTION:=utils
+ CATEGORY:=Utilities
+ MAINTAINER:=Nicolas Pace <nicopace@altermundi.net>
+ URL:=https://github.com/simonwunderlich/FFT_eval
+ TITLE:=Evaluates FFT samples from ath9k driver
+ DEPENDS:= +libc @PACKAGE_ATH_DEBUG @PACKAGE_ATH_SPECTRAL
+endef
+
+define Package/$(PKG_NAME)/description
+ Evaluates FFT samples from diferent wifi boards drivers
+endef
+
+TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto
+
+define Build/Compile
+ $(TARGET_CC) -D__NOSDL__ $(PKG_BUILD_DIR)/fft_eval.c -o $(PKG_BUILD_DIR)/fft_eval -lm
+endef
+
+define Package/$(PKG_NAME)/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/fft_eval $(1)/usr/bin/fft_eval
+endef
+
+$(eval $(call BuildPackage,$(PKG_NAME)))
include $(TOPDIR)/rules.mk
PKG_NAME:=fio
-PKG_VERSION:=3.12
+PKG_VERSION:=3.14
PKG_RELEASE:=1
PKG_SOURCE_URL:=http://brick.kernel.dk/snaps
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_HASH:=f73ec0a84834a058adcaf9964eb7e9a7af0a6e41a4e5eff781438c12b99b3b9d
+PKG_HASH:=1b4ce680242725df2fd3cca76047a4ebf07ed9034e2fa733ebb65ae8ed28fe10
PKG_MAINTAINER:=Rosen Penev <rosenp@gmail.com>
PKG_LICENSE:=GPL-2.0+
PKG_LICENSE_FILES:=COPYING
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
+
include $(INCLUDE_DIR)/package.mk
define Package/fio
endef
TARGET_CFLAGS := $(filter-out -O%,$(TARGET_CFLAGS))
+TARGET_LDFLAGS += -Wl,--gc-sections
CONFIGURE_ARGS = \
--disable-numa \
--disable-pmem \
--disable-native \
--cc="$(TARGET_CC)" \
- --extra-cflags="$(TARGET_CFLAGS)"
+ --extra-cflags="$(TARGET_CFLAGS)" \
+ --prefix="$(CONFIGURE_PREFIX)"
define Package/fio/install
$(INSTALL_DIR) $(1)/usr/bin
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/fio $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fio $(1)/usr/bin/
endef
$(eval $(call BuildPackage,fio))
include $(TOPDIR)/rules.mk
PKG_NAME:=fish
-PKG_VERSION:=3.0.0
-PKG_RELEASE:=3
+PKG_VERSION:=3.0.2
+PKG_RELEASE:=4
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://codeload.github.com/fish-shell/fish-shell/tar.gz/$(PKG_VERSION)?
-PKG_HASH:=a16b0ff31111167ef4f3831ef428bb236bef592b7f49a2867bf42405ee95ff33
-PKG_MAINTAINER:=Curtis Jiang <jqqqqqqqqqq@gmail.com>
+PKG_SOURCE_URL:=https://github.com/fish-shell/fish-shell/releases/download/$(PKG_VERSION)
+PKG_HASH:=14728ccc6b8e053d01526ebbd0822ca4eb0235e6487e832ec1d0d22f1395430e
+PKG_MAINTAINER:=Curtis Jiang <jqqqqqqqqqq@gmail.com>, Hao Dong <halbertdong@gmail.com>
PKG_LICENSE:=GPL-2.0
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
-PKG_BUILD_DIR:=$(BUILD_DIR)/fish-shell-$(PKG_VERSION)
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
CATEGORY:=Utilities
SUBMENU:=Shells
TITLE:=A smart and user-friendly command line shell
- DEPENDS:=+libncurses +libstdcpp +librt +libpcre2-32
+ DEPENDS:=+libncurses +libstdcpp +librt +libpcre2-32 @!USE_UCLIBC
URL:=https://fishshell.com
endef
PKG_NAME:=flashrom
PKG_VERSION:=1.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=http://download.flashrom.org/releases
+PKG_SOURCE_URL:=https://download.flashrom.org/releases
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_HASH:=3702fa215ba5fb5af8e54c852d239899cfa1389194c1e51cb2a170c4dc9dee64
-PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
-
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_SOURCE_SUBDIR)
-PKG_LICENSE:=GPL-2.0
+PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
+PKG_LICENSE:=GPL-2.0-or-later
PKG_LICENSE_FILES:=COPYING
PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
include flashrom.mk
SECTION:=utils
CATEGORY:=Utilities
TITLE:=FlashROM Utility
- URL:=http://www.flashrom.org/
+ URL:=https://www.flashrom.org/
endef
define Package/flashrom
+++ /dev/null
---- a/flash.h
-+++ b/flash.h
-@@ -30,6 +30,7 @@
- #include <stdio.h>
- #include <stdint.h>
- #include <stddef.h>
-+#include <sys/io.h>
- #include <stdarg.h>
- #include <stdbool.h>
- #if IS_WINDOWS
index 95e9c95..ee18624 100644
--- a/ch341a_spi.c
+++ b/ch341a_spi.c
-@@ -441,7 +441,12 @@ int ch341a_spi_init(void)
+@@ -444,7 +444,12 @@ int ch341a_spi_init(void)
return -1;
}
--- /dev/null
+--- a/Makefile
++++ b/Makefile
+@@ -420,7 +420,7 @@ endif
+ # Disable all drivers needing raw access (memory, PCI, port I/O) on
+ # architectures with unknown raw access properties.
+ # Right now those architectures are alpha hppa m68k sh s390
+-ifneq ($(ARCH),$(filter $(ARCH),x86 mips ppc arm sparc))
++ifneq ($(ARCH),$(filter $(ARCH),x86 mips ppc arm sparc arc))
+ ifeq ($(CONFIG_INTERNAL), yes)
+ UNSUPPORTED_FEATURES += CONFIG_INTERNAL=yes
+ else
+--- a/hwaccess.h
++++ b/hwaccess.h
+@@ -87,6 +87,13 @@
+ /* SPARC is big endian in general (but allows to access data in little endian too). */
+ #define __FLASHROM_BIG_ENDIAN__ 1
+
++#elif IS_ARC
++#ifdef __arceb__
++#define __FLASHROM_BIG_ENDIAN__ 1
++#else
++#define __FLASHROM_LITTLE_ENDIAN__ 1
++#endif
++
+ #endif /* IS_? */
+
+ #if !defined (__FLASHROM_BIG_ENDIAN__) && !defined (__FLASHROM_LITTLE_ENDIAN__)
+@@ -378,6 +385,8 @@ int libpayload_wrmsr(int addr, msr_t msr);
+
+ /* Non memory mapped I/O is not supported on ARM. */
+
++#elif IS_ARC
++
+ #else
+
+ #error Unknown architecture, please check if it supports PCI port IO.
+diff --git a/platform.h b/platform.h
+index b2fdcd0..2e68e71 100644
+--- a/platform.h
++++ b/platform.h
+@@ -75,9 +75,12 @@
+ #elif defined(__s390__) || defined(__s390x__) || defined(__zarch__)
+ #define __FLASHROM_ARCH__ "s390"
+ #define IS_S390 1
++#elif defined (__arc__)
++ #define __FLASHROM_ARCH__ "arc"
++ #define IS_ARC 1
+ #endif
+
+-#if !(IS_X86 || IS_MIPS || IS_PPC || IS_ARM || IS_SPARC || IS_ALPHA || IS_HPPA || IS_M68K || IS_SH || IS_S390)
++#if !(IS_X86 || IS_MIPS || IS_PPC || IS_ARM || IS_SPARC || IS_ALPHA || IS_HPPA || IS_M68K || IS_SH || IS_S390 || IS_ARC)
+ #error Unknown architecture
+ #endif
+
include $(TOPDIR)/rules.mk
PKG_NAME:=flent-tools
-PKG_VERSION:=1.0.1
-PKG_LICENSE:=GPLv3
+PKG_VERSION:=1.2.2
+PKG_RELEASE:=1
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_REV).tar.gz
-PKG_MIRROR_HASH:=0c4a99179a76e8479bdc7d91c312de7fc9e6d4d54132d1b2aba836138c86440c
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/tohojo/flent
-PKG_REV:=03c72cc340def354024351b6500774b11170d5ba
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=$(PKG_REV)
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/tohojo/flent/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=554bb1b5329cd39113cbb34445765ca6868dbf033aa64832d957d4a09d56adc7
+PKG_BUILD_DIR:=$(BUILD_DIR)/flent-$(PKG_VERSION)
+
+PKG_LICENSE:=GPL-3.0-only
+PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/nls.mk
define Package/flent-tools
SECTION:=utils
include $(TOPDIR)/rules.mk
PKG_NAME:=gammu
-PKG_VERSION:=1.39.0
-PKG_RELEASE:=2
+PKG_VERSION:=1.40.0
+PKG_RELEASE:=1
-PKG_SOURCE_URL:=https://dl.cihar.com/gammu/releases
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_HASH:=66d1d991d7a993fdf254d4c425f0fdd38c9cca15b1735936695a486067a6a9f8
+PKG_SOURCE_URL:=https://dl.cihar.com/gammu/releases
+PKG_HASH:=a760a3520d9f3a16a4ed73cefaabdbd86125bec73c6fa056ca3f0a4be8478dd6
PKG_MAINTAINER:=Vitaly Protsko <villy@sft.ru>
-PKG_LICENCE:=GPL-2.0
+PKG_LICENCE:=GPL-2.0-or-later
+PKG_LICENSE_FILES:=COPYING
PKG_BUILD_PARALLEL:=1
-PKG_INSTALL:=1
+CMAKE_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk
CMAKE_OPTIONS += -DICONV_LIBRARIES:STRING=iconv
endif
-define Build/InstallDev
- mkdir -p $(1)/usr/include
- $(CP) $(PKG_INSTALL_DIR)/usr/include/gammu $(1)/usr/include/
- mkdir -p $(1)/usr/lib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib$(LIB_SUFFIX)/lib{Gammu*,gsmsd*} $(1)/usr/lib/
-endef
-
define Package/gammu/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gammu $(1)/usr/bin
-diff --git a/cmake/FindIconv.cmake b/cmake/FindIconv.cmake
-index 3ec0493..f716700 100644
--- a/cmake/FindIconv.cmake
+++ b/cmake/FindIconv.cmake
@@ -9,10 +9,10 @@
IF(APPLE)
FIND_PATH(ICONV_INCLUDE_DIR iconv.h
-diff --git a/configure b/configure
-index 4f51ca7..5b0d993 100755
--- a/configure
+++ b/configure
@@ -33,6 +33,7 @@ Usage: ./configure [options]
+++ /dev/null
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -511,8 +511,6 @@ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMP
- # MACRO_TUNE_LINKER("-pie")
- # These do not work on Windows right now
- if (NOT WIN32)
-- # Stack protector
-- MACRO_TUNE_COMPILER("-fstack-protector")
- # Mark code read only
- MACRO_TUNE_LINKER("-Wl,-zrelro")
- endif (NOT WIN32)
--enable-shared enables shared build
--enable-debug enables debug build
--enable-tiger enables Mac OS X 10.4 (Tiger) build
-@@ -51,6 +52,7 @@ SOURCE_DIR=`pwd`
+@@ -51,6 +52,7 @@ BUILD_DIR="$SOURCE_DIR/build-configure"
# cmake parameters
CMAKE_PREFIX=
All enable params have their disable counterparts.
-@@ -61,6 +62,7 @@ CMAKE_PYTHON=
+@@ -61,6 +62,7 @@ CMAKE_PROTECTION=
CMAKE_GNAP=
CMAKE_COMPLETE=
CMAKE_ICONV=
--- /dev/null
+--- a/libgammu/device/devfunc.c
++++ b/libgammu/device/devfunc.c
+@@ -24,6 +24,7 @@
+ # include <signal.h>
+ # include <sys/socket.h>
+ # include <sys/stat.h>
++# include <sys/select.h>
+ #endif
+
+ #include "devfunc.h"
include $(TOPDIR)/rules.mk
PKG_NAME:=gawk
-PKG_VERSION:=4.2.1
+PKG_VERSION:=5.0.0
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@GNU/gawk
-PKG_HASH:=d1119785e746d46a8209d28b2de404a57f983aa48670f4e225531d3bdc175551
+PKG_HASH:=50f091ed0eb485ad87dbb620d773a3e2c31a27f75f5e008f7bf065055f024406
PKG_LICENSE:=GPL
PKG_LICENSE_FILES:=COPYING
--- /dev/null
+#
+# Copyright (C) 2018 Lucian Cristian
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=gddrescue
+PKG_VERSION:=1.23
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.xz
+PKG_SOURCE_URL:=http://http.debian.net/debian/pool/main/g/$(PKG_NAME)
+PKG_HASH:=5831d7e24070bc700d8f22deaeec56af1149392ce30ae67254096eaf8c9169ab
+PKG_MAINTAINER:=Lucian Cristian <lucian.cristian@gmail.com>
+
+PKG_LICENSE:=GPL-2.0
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
+
+include $(INCLUDE_DIR)/uclibc++.mk
+include $(INCLUDE_DIR)/package.mk
+
+define Package/gddrescue
+ SECTION:=utils
+ CATEGORY:=Utilities
+ TITLE:=Data recovery tool
+ URL:=https://www.gnu.org/software/ddrescue/
+ DEPENDS:=$(CXX_DEPENDS)
+endef
+
+define Package/gddrescue/description
+ GNU ddrescue is a data recovery tool. It copies data from one file
+ or block device (hard disc, cdrom, etc) to another, trying to rescue
+ the good parts first in case of read errors.
+endef
+
+CONFIGURE_ARGS += \
+ CXX="$(TARGET_CXX)" \
+ CPPFLAGS="$(TARGET_CPPFLAGS)" \
+ CXXFLAGS="$(TARGET_CXXFLAGS)" \
+ LDFLAGS="$(TARGET_LDFLAGS)"
+
+define Package/gddrescue/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ddrescue $(1)/usr/sbin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ddrescuelog $(1)/usr/sbin/
+endef
+
+$(eval $(call BuildPackage,gddrescue))
--- /dev/null
+--- a/block.h
++++ b/block.h
+@@ -34,6 +34,7 @@ class Block
+ { if( size_ < 0 || size_ > LLONG_MAX - pos_ ) size_ = LLONG_MAX - pos_; }
+
+ public:
++ Block() {} // default constructor
+ Block( const long long p, const long long s ) : pos_( p ), size_( s )
+ { if( p < 0 ) { pos_ = 0; if( s > 0 ) size_ -= std::min( s, -p ); }
+ fix_size(); }
+@@ -102,6 +103,7 @@ private:
+ Status status_;
+
+ public:
++ Sblock() {} // default constructor
+ Sblock( const Block & b, const Status st )
+ : Block( b ), status_( st ) {}
+ Sblock( const long long p, const long long s, const Status st )
+--- a/mapbook.cc
++++ b/mapbook.cc
+@@ -19,6 +19,7 @@
+
+ #include <algorithm>
+ #include <cerrno>
++#include <cctype>
+ #include <climits>
+ #include <cstdio>
+ #include <cstdlib>
\ No newline at end of file
PKG_NAME:=gkermit
PKG_VERSION:=1.00
-PKG_RELEASE:=1
-PKG_LICENSE:=GPL-2.0
+PKG_RELEASE:=2
PKG_SOURCE:=gku100.tar.gz
PKG_SOURCE_URL:=ftp://kermit.columbia.edu/kermit/archives
PKG_HASH:=3dbe63291277c4795255343b48b860777fb0a160163d7e1d30b1ee68585593eb
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_MAINTAINER:=Nathaniel Wesley Filardo <nwfilardo@gmail.com>
+PKG_LICENSE:=GPL-2.0-or-later
+PKG_LICENSE_FILES:=COPYING
include $(INCLUDE_DIR)/package.mk
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
tar -C $(PKG_BUILD_DIR) -xzvf "$(DL_DIR)/$(PKG_SOURCE)"
+ $(Build/Patch)
endef
# nothing to do
--- /dev/null
+--- a/gcmdline.c
++++ b/gcmdline.c
+@@ -29,6 +29,7 @@
+ */
+
+ #include <stdio.h>
++#include <stdlib.h>
+ #include "gkermit.h"
+
+ /* Externals */
+@@ -53,7 +54,7 @@ _MYPROTOTYPE( VOID fatal, (char *) );
+ _MYPROTOTYPE( VOID usage, (void) );
+
+ #ifndef NOGETENV
+-_MYPROTOTYPE( char * getenv, (char *) );
++_MYPROTOTYPE( char * getenv, (const char *) );
+ #define GARGC 32
+ #define GBUFSIZ 256
+ static char gbuf[GBUFSIZ], *gargs[GARGC], *gptr = NULL;
+--- a/gunixio.c
++++ b/gunixio.c
+@@ -58,6 +58,7 @@
+ */
+
+ #include <stdio.h> /* Standard input/output */
++#include <stdlib.h>
+
+ #ifdef POSIX
+ #include <termios.h> /* Terminal modes */
PKG_NAME:=gpsd
PKG_VERSION:=3.17
-PKG_RELEASE:=1
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SAVANNAH/$(PKG_NAME)
validate_section_gpsd()
{
- uci_validate_section gpsd gpsd "${1}" \
+ uci_load_validate gpsd gpsd "$1" "$2" \
'enabled:bool:1' \
'device:string' \
'listen_globally:bool:0' \
gpsd_instance()
{
- local device enabled listen_globally port
-
- validate_section_gpsd "${1}" || {
+ [ "$2" = 0 ] || {
echo "validation failed"
return 1
}
- [ "${enabled}" = "0" ] && return 1
+ [ "$enabled" = "0" ] && return 1
procd_open_instance
procd_set_param command "$PROG" -N -n
- [ "${listen_globally}" -ne 0 ] && procd_append_param command -G
- procd_append_param command -S "${port}"
- procd_append_param command "${device}"
+ [ "$listen_globally" -ne 0 ] && procd_append_param command -G
+ procd_append_param command -S "$port"
+ procd_append_param command "$device"
procd_set_param respawn
procd_close_instance
start_service()
{
- config_load "${NAME}"
- config_foreach gpsd_instance gpsd
+ config_load "$NAME"
+ config_foreach validate_section_gpsd gpsd gpsd_instance
+}
+
+service_triggers() {
+ procd_add_reload_trigger "$NAME"
+ procd_add_validation validate_section_gpsd
}
--- /dev/null
+--- a/driver_ais.c
++++ b/driver_ais.c
+@@ -24,6 +24,7 @@
+
+ /* strlcpy() needs _DARWIN_C_SOURCE */
+ #define _DARWIN_C_SOURCE
++#define _BSD_SOURCE
+
+ #include <stdlib.h>
+ #include <string.h>
+--- a/gpsctl.c
++++ b/gpsctl.c
+@@ -15,6 +15,7 @@
+
+ /* strlcpy() needs _DARWIN_C_SOURCE */
+ #define _DARWIN_C_SOURCE
++#define _BSD_SOURCE
+
+ #include <stdio.h>
+ #include <stdlib.h>
+--- a/gpsd_json.c
++++ b/gpsd_json.c
+@@ -24,6 +24,7 @@ PERMISSIONS
+ #define __DARWIN_C_LEVEL 200112L
+ /* strlcpy() needs _DARWIN_C_SOURCE */
+ #define _DARWIN_C_SOURCE
++#define _BSD_SOURCE
+
+ #include <stdio.h>
+ #include <math.h>
+--- a/libgpsd_core.c
++++ b/libgpsd_core.c
+@@ -20,6 +20,7 @@
+
+ /* strlcpy() needs _DARWIN_C_SOURCE */
+ #define _DARWIN_C_SOURCE
++#define _BSD_SOURCE
+
+ #include <time.h>
+ #include <stdio.h>
--- /dev/null
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=hashdeep
+PKG_VERSION:=4.4
+PKG_RELEASE:=1
+PKG_MAINTAINER=Tobe Deprez <trldp@outlook.com>
+PKG_LICENSE:=NLPL
+PKG_LICENSE_FILES:=COPYING
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/jessek/hashdeep/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=ad78d42142f9a74fe8ec0c61bc78d6588a528cbb9aede9440f50b6ff477f3a7f
+
+PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/uclibc++.mk
+include $(INCLUDE_DIR)/package.mk
+
+define Package/hashdeep
+ SECTION:=utils
+ CATEGORY:=Utilities
+ TITLE:=Recursively compute hashsums or piecewise hashings
+ URL:=http://md5deep.sourceforge.net/
+ DEPENDS:=$(CXX_DEPENDS)
+endef
+
+define Package/hashdeep/description
+ hashdeep is a set of tools to compute MD5, SHA1, SHA256, tiger
+ and whirlpool hashsums of arbitrary number of files recursively.
+endef
+
+define Package/hashdeep/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/hashdeep \
+ $(PKG_INSTALL_DIR)/usr/bin/md5deep \
+ $(PKG_INSTALL_DIR)/usr/bin/sha1deep \
+ $(PKG_INSTALL_DIR)/usr/bin/sha256deep \
+ $(PKG_INSTALL_DIR)/usr/bin/tigerdeep \
+ $(PKG_INSTALL_DIR)/usr/bin/whirlpooldeep \
+ $(1)/usr/bin/
+endef
+
+$(eval $(call BuildPackage,hashdeep))
+
PKG_NAME:=hd-idle
PKG_VERSION:=1.05
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_MAINTAINER:=Lim Guo Wei <limguowei@gmail.com>
PKG_LICENSE:=GPL-2.0
validate_section_hdidle()
{
- uci_validate_section hd-idle hd-idle "${1}" \
+ uci_load_validate hd-idle hd-idle "$1" "$2" \
'disk:string' \
'enabled:bool' \
'idle_time_interval:uinteger:10' \
}
hdidle_append() {
- local disk enabled idle_time_interval idle_time_unit
-
- validate_section_hdidle "${1}" || return
+ [ "$2" = 0 ] || return
[ "$enabled" -gt 0 ] || return
config_load "hd-idle"
numdisks="0"
- config_foreach hdidle_append "hd-idle"
+ config_foreach validate_section_hdidle "hd-idle" hdidle_append
if [ "$numdisks" -gt 0 ]; then
procd_set_param respawn
procd_close_instance
fi
}
+
+service_triggers() {
+ procd_add_reload_trigger "hd-idle"
+ procd_add_validation validate_section_hdidle
+}
PKG_NAME:=hfsprogs
PKG_VERSION:=332.25
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_LICENSE:=GPL-3.0+
PKG_LICENSE_FILES:=COPYING
--- /dev/null
+Index: diskdev_cmds-332.25/fsck_hfs.tproj/dfalib/SVerify1.c
+===================================================================
+--- diskdev_cmds-332.25.orig/fsck_hfs.tproj/dfalib/SVerify1.c
++++ diskdev_cmds-332.25/fsck_hfs.tproj/dfalib/SVerify1.c
+@@ -2848,7 +2848,7 @@ OSErr VLockedChk( SGlobPtr GPtr )
+ }
+ else // Because we don't have the unicode converters, just fill it with a dummy name.
+ {
+- CopyMemory( "\x0dPure HFS Plus", calculatedVCB->vcbVN, sizeof(Str27) );
++ CopyMemory( u"\x0dPure HFS Plus", calculatedVCB->vcbVN, sizeof(Str27) );
+ }
+
+ GPtr->TarBlock = hint;
--- /dev/null
+--- a/newfs_hfs.tproj/makehfs.c
++++ b/newfs_hfs.tproj/makehfs.c
+@@ -376,7 +376,7 @@ make_hfsplus(const DriveInfo *driveInfo, hfsparams_t *defaults)
+ if ( (temp & 0x01FF) != 0 )
+ temp = (temp + kBytesPerSector) & 0xFFFFFE00;
+
+- nodeBuffer = valloc((size_t)temp);
++ (void)posix_memalign(&nodeBuffer, sysconf(_SC_PAGESIZE), (size_t)temp);
+ if (nodeBuffer == NULL)
+ err(1, NULL);
+
+@@ -1814,7 +1814,7 @@ ClearDisk(const DriveInfo *driveInfo, UInt64 startingSector, UInt32 numberOfSect
+
+ bufferSize = bufferSizeInSectors << kLog2SectorSize;
+
+- tempBuffer = valloc((size_t)bufferSize);
++ (void)posix_memalign(&tempBuffer, sysconf(_SC_PAGESIZE), (size_t)bufferSize);
+ if (tempBuffer == NULL)
+ err(1, NULL);
+
include $(TOPDIR)/rules.mk
PKG_NAME:=hplip
-PKG_VERSION:=3.18.12
+PKG_VERSION:=3.19.3
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/hplip
-PKG_HASH:=3ba5278d5fcaf83ecd04d16850f2f24c43c78c1189c15ae32cae756360c2fabd
+PKG_HASH:=a04edf0b5b4c4dcaa3998a27caad8f24513340e0aea61b694397c7807d7c2ae6
PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
PKG_LICENSE:=GPL-2.0 GPL-2.0+
PKG_LICENSE_FILES:=COPYING LICENSE
PKG_BUILD_PARALLEL:=1
-PKG_BUILD_DEPENDS:= python libcups
+PKG_BUILD_DEPENDS:=libcups
PKG_FIXUP:=autoreconf
include $(INCLUDE_DIR)/package.mk
+++ /dev/null
-https://bugs.launchpad.net/hplip/+bug/1778626
-
---- a/prnt/hpcups/genPCLm.cpp
-+++ b/prnt/hpcups/genPCLm.cpp
-@@ -171,7 +171,7 @@ Defines
- #define rgb_2_gray(r,g,b) (ubyte)(0.299*(double)r+0.587*(double)g+0.114*(double)b)
-
- // Note: this is required for debugging
--boolean writeOutputFile(int numBytes, ubyte *ptr, char *user_name);
-+bool writeOutputFile(int numBytes, ubyte *ptr, char *user_name);
-
- /*
- ********************************************* Helper Routines **************************
-@@ -343,7 +343,7 @@ bool PCLmGenerator::addKids(sint32 kidObj)
- return(true);
- }
-
--boolean writeOutputFile(int numBytes, ubyte *ptr, char *user_name)
-+bool writeOutputFile(int numBytes, ubyte *ptr, char *user_name)
- {
- FILE *outputFile;
- char outFileName[MAX_FILE_PATH_LEN];
-@@ -1074,7 +1074,7 @@ void PCLmGenerator::writePDFGrammarPage(int imageWidth, int imageHeight, int num
- * Limitations:
- * -
- *****************************************************************************************/
--boolean prepImageForBacksideDuplex(ubyte *imagePtr, sint32 imageHeight, sint32 imageWidth, sint32 numComponents)
-+bool prepImageForBacksideDuplex(ubyte *imagePtr, sint32 imageHeight, sint32 imageWidth, sint32 numComponents)
- {
- sint32 numBytes=imageHeight*imageWidth*numComponents;
- ubyte *head, *tail, t0, t1, t2;
--- /dev/null
+Fix missing definition of uint64_t while compiling
+under uclibc
+
+https://bugs.launchpad.net/hplip/+bug/1826965
+
+--- a/scan/sane/OrbliteScan/LinuxCommon.h
++++ b/scan/sane/OrbliteScan/LinuxCommon.h
+@@ -2,6 +2,7 @@
+ #define H_LinuxCommon\r
+ \r
+ #include <sys/types.h>\r
++#include <stdint.h>\r
+ \r
+ /* Common typedefs for Linux */\r
+ \r
PKG_NAME:=i2c-tools
PKG_VERSION:=4.1
-PKG_RELEASE:=1
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@KERNEL/software/utils/i2c-tools
PKG_HASH:=57b219efd183795bd545dd5a60d9eabbe9dcb6f8fb92bc7ba2122b87f98527d5
-PKG_BUILD_PARALLEL:=1
-PKG_BUILD_DEPENDS:=PACKAGE_python-smbus:python
-
PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
-PKG_LICENSE:=GPLv2
-PKG_LICENSE_FILES:=COPYING
+PKG_LICENSE:=GPL-2.0-or-later LGPL-2.1-or-later
+PKG_LICENSE_FILES:=COPYING COPYING.LGPL
+
+PKG_BUILD_PARALLEL:=1
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-i2c-tools-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
include ../../lang/python/python-package.mk
include ../../lang/python/python3-package.mk
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xJf $(DL_DIR)/$(PKG_SOURCE)
+
define Package/i2c/Default
URL:=https://i2c.wiki.kernel.org/index.php/I2C_Tools
TITLE:=I2C
SECTION:=libs
CATEGORY:=Libraries
TITLE+=library for i2c-tools
+ VARIANT:=bin
endef
define Package/i2c-tools
CATEGORY:=Utilities
TITLE+=tools for Linux
DEPENDS:=+libi2c
+ VARIANT:=bin
endef
define Package/python-smbus
SECTION:=lang
CATEGORY:=Languages
TITLE:=Python bindings for the SMBUS
- DEPENDS:=+libi2c +python-light
+ DEPENDS:=+PACKAGE_python-smbus:libi2c +PACKAGE_python-smbus:python-light
+ VARIANT:=python
endef
define Package/python3-smbus
SECTION:=lang
CATEGORY:=Languages
TITLE:=Python bindings for the SMBUS
- DEPENDS:=+libi2c +python3-light
+ DEPENDS:=+PACKAGE_python3-smbus:libi2c +PACKAGE_python3-smbus:python3-light
+ VARIANT:=python3
endef
define Package/libi2c/description
endef
define Package/python3-smbus/description
- This package contain the python bindings for Linux SMBus access through i2c-dev.
+ This package contain the Python3 bindings for Linux SMBus access through i2c-dev.
endef
-TARGET_CPPFLAGS += -I$(PKG_BUILD_DIR)/include
-
-ifdef CONFIG_PACKAGE_python-smbus
- define Build/Compile/python-smbus
- $(if $(Build/Compile/PyMod),,@echo Python packaging code not found.; false)
- $(call Build/Compile/PyMod,./py-smbus/, \
- install --prefix="$(PKG_INSTALL_DIR)/usr", \
- )
- endef
-endif
-
-ifdef CONFIG_PACKAGE_python3-smbus
- define Build/Compile/python3-smbus
- $(if $(Build/Compile/Py3Mod),,@echo Python3 packaging code not found.; false)
- $(call Build/Compile/Py3Mod,./py-smbus/, \
- install --prefix="$(PKG_INSTALL_DIR)/usr", \
- )
- endef
-endif
+ifeq ($(BUILD_VARIANT),bin)
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR) \
STAGING_DIR="$(STAGING_DIR)" \
LDFLAGS="$(TARGET_LDFLAGS)" \
CFLAGS="$(TARGET_CFLAGS)"
- $(Build/Compile/python-smbus)
- $(Build/Compile/python3-smbus)
endef
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib
+ $(CP) $(PKG_BUILD_DIR)/include/i2c $(1)/usr/include/
+ $(CP) $(PKG_BUILD_DIR)/lib/libi2c.{a,so*} $(1)/usr/lib/
+endef
+
+endif # ifeq
+
+PYTHON_PKG_SETUP_ARGS:=
+PYTHON3_PKG_SETUP_ARGS:=
+
+PYTHON_PKG_SETUP_DIR:=py-smbus
+PYTHON3_PKG_SETUP_DIR:=py-smbus
+
define Package/libi2c/install
$(INSTALL_DIR) $(1)/usr/lib
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/libi2c.so* $(1)/usr/lib/
+ $(CP) $(PKG_BUILD_DIR)/lib/libi2c.so* $(1)/usr/lib/
endef
define Package/i2c-tools/install
$(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/i2cdump $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/i2cset $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/i2cget $(1)/usr/sbin/
-endef
-
-define PyPackage/python-smbus/filespec
-+|$(PYTHON_PKG_DIR)
-endef
-
-define PyPackage/python3-smbus/filespec
-+|$(PYTHON3_PKG_DIR)
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/i2ctransfer $(1)/usr/sbin/
endef
$(eval $(call BuildPackage,libi2c))
$(eval $(call BuildPackage,i2c-tools))
$(eval $(call PyPackage,python-smbus))
$(eval $(call BuildPackage,python-smbus))
-$(eval $(call PyPackage,python3-smbus))
+$(eval $(call Py3Package,python3-smbus))
$(eval $(call BuildPackage,python3-smbus))
PKG_NAME:=irqbalance
PKG_VERSION:=1.2.0
-PKG_RELEASE:=2
+PKG_RELEASE:=4
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_PROTO:=git
define Package/irqbalance/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/irqbalance $(1)/usr/sbin/
+ $(INSTALL_DIR) $(1)/etc/init.d
+ $(INSTALL_BIN) ./files/irqbalance.init $(1)/etc/init.d/irqbalance
+ $(INSTALL_DIR) $(1)/etc/config
+ $(INSTALL_DATA) ./files/irqbalance.config $(1)/etc/config/irqbalance
endef
$(eval $(call BuildPackage,irqbalance))
--- /dev/null
+config irqbalance 'irqbalance'
+ option enabled '0'
+
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=11
+USE_PROCD=1
+
+start_service() {
+ local enabled
+ config_load 'irqbalance'
+ config_get_bool enabled irqbalance enabled 0
+ [ "$enabled" -gt 0 ] || return 0
+
+ procd_open_instance "irqbalance"
+ procd_set_param command /usr/sbin/irqbalance -f
+ procd_set_param respawn
+ procd_close_instance
+}
+
TARGET_CFLAGS += -fno-ipa-sra
endif
-TARGET_CFLAGS += -std=c99
+TARGET_CFLAGS += -std=c99 -D_GNU_SOURCE
CONFIGURE_ARGS+= \
--disable-docs \
PKG_NAME:=lm-sensors
PKG_VERSION:=3.5.0
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_VERSION_SUBST=$(subst .,-,$(PKG_VERSION))
PKG_SOURCE_URL:=https://codeload.github.com/lm-sensors/lm-sensors/tar.gz/V$(PKG_VERSION_SUBST)?
SECTION:=utils
CATEGORY:=Utilities
TITLE:=lm-sensors-detect
- DEPENDS+=+lm-sensors +perl +perlbase-essential +perlbase-fcntl +perlbase-file +perlbase-xsloader
+ DEPENDS+=+lm-sensors \
+ +PACKAGE_lm-sensors-detect:perl \
+ +PACKAGE_lm-sensors-detect:perlbase-essential \
+ +PACKAGE_lm-sensors-detect:perlbase-fcntl \
+ +PACKAGE_lm-sensors-detect:perlbase-file \
+ +PACKAGE_lm-sensors-detect:perlbase-xsloader
endef
define Package/libsensors
define Package/libsensors/install
$(INSTALL_DIR) $(1)/usr/lib
- $(INSTALL_DATA) $(PKG_BUILD_DIR)/lib/libsensors.so* $(1)/usr/lib
+ $(CP) $(PKG_BUILD_DIR)/lib/libsensors.so* $(1)/usr/lib
endef
$(eval $(call BuildPackage,lm-sensors))
PKG_NAME:=logrotate
PKG_VERSION:=3.15.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:= https://github.com/logrotate/logrotate/releases/download/$(PKG_VERSION)
PKG_HASH:=313612c4776a305393454c874ef590d8acf84c9ffa648717731dfe902284ff8f
-PKG_LICENSE:=GPL-2.0
+
+PKG_MAINTAINER:=Christian Beier <cb@shoutrlabs.com>
+PKG_LICENSE:=GPL-2.0-or-later
+PKG_LICENSE_FILES:=COPYING
include $(INCLUDE_DIR)/package.mk
define Package/logrotate
SECTION:=utils
CATEGORY:=Utilities
- DEPENDS:=+libpopt
+ DEPENDS:=+libpopt +LOGROTATE_ACL:libacl
TITLE:=rotates, compresses, and mails system logs
URL:=https://github.com/logrotate/logrotate
- MAINTAINER:=Christian Beier <cb@shoutrlabs.com>
+ MENU:=1
+endef
+
+define Package/logrotate/config
+ if PACKAGE_logrotate
+ config LOGROTATE_ACL
+ bool
+ prompt "Enable ACL support"
+ default y if USE_FS_ACL_ATTR
+ endif
endef
define Package/logrotate/description
/etc/logrotate.conf
endef
-CONFIGURE_ARGS += --with-acl=no
-
-EXTRA_CFLAGS += $(TARGET_CPPFLAGS) -Wno-nonnull-compare
-EXTRA_LDFLAGS += $(TARGET_LDFLAGS)
+CONFIGURE_ARGS += $(if $(CONFIG_LOGROTATE_ACL),--with,--without)-acl
define Build/Compile
$(call Build/Compile/Default, \
- RPM_OPT_FLAGS:="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
- LDFLAGS="$(EXTRA_LDFLAGS)" \
+ RPM_OPT_FLAGS:="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
+ LDFLAGS="$(TARGET_LDFLAGS)" \
logrotate \
)
endef
-define Package/logrotate/install
+define Package/logrotate/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) ${PKG_BUILD_DIR}/logrotate $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/etc
PKG_NAME:=LVM2
PKG_VERSION:=2.03.02
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME).$(PKG_VERSION).tgz
PKG_SOURCE_URL:=https://sourceware.org/pub/lvm2
define Package/libdevmapper/install
$(INSTALL_DIR) $(1)/usr/lib
- $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libdevmapper.so.* $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdevmapper.so.* $(1)/usr/lib
endef
define Package/lvm2/install
config LXC_SECCOMP
bool "Enable support for seccomp in LXC"
default KERNEL_SECCOMP
+ depends on !arc
help
Build LXC with support for seccomp filters.
Select libseccomp which also pulls-in the needed kernel features.
PKG_NAME:=lxc
PKG_VERSION:=2.1.1
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_LICENSE:=LGPL-2.1+ BSD-2-Clause GPL-2.0
PKG_MAINTAINER:=Marko Ratkaj <marko.ratkaj@sartura.hr>
endef
CONFIGURE_ARGS += \
- --disable-gnutls \
--disable-apparmor \
+ --disable-cgmanager \
--disable-doc \
--disable-examples \
+ --disable-gnutls \
+ --disable-selinux \
+ --disable-python \
--enable-lua=yes \
--with-lua-pc="$(STAGING_DIR)/usr/lib/pkgconfig/lua.pc"
--- /dev/null
+From f48b5fd8ab03c200eaf5e3a9b03bcd01b2659cf3 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Thu, 2 Nov 2017 16:00:33 +0100
+Subject: [PATCH] Fix compilation on toolchain without prlimit
+
+Some toolchains which are not bionic like uclibc does not support
+prlimit or prlimit64. In this case, return an error.
+Moreover, if prlimit64 is available, use lxc implementation of prlimit.
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+---
+ configure.ac | 4 ++++
+ src/lxc/Makefile.am | 6 ++++++
+ src/lxc/conf.c | 12 +++++++++---
+ 3 files changed, 19 insertions(+), 3 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 642b78e7e1..63df7466cb 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -643,6 +643,10 @@ AC_CHECK_FUNCS([prlimit],
+ AM_CONDITIONAL(HAVE_PRLIMIT, true)
+ AC_DEFINE(HAVE_PRLIMIT,1,[Have prlimit]),
+ AM_CONDITIONAL(HAVE_PRLIMIT, false))
++AC_CHECK_FUNCS([prlimit64],
++ AM_CONDITIONAL(HAVE_PRLIMIT64, true)
++ AC_DEFINE(HAVE_PRLIMIT64,1,[Have prlimit64]),
++ AM_CONDITIONAL(HAVE_PRLIMIT64, false))
+
+ # Check for some libraries
+ AC_SEARCH_LIBS(sem_open, [rt pthread])
+diff --git a/src/lxc/Makefile.am b/src/lxc/Makefile.am
+index fff32ae4f3..8f0c11ecae 100644
+--- a/src/lxc/Makefile.am
++++ b/src/lxc/Makefile.am
+@@ -45,7 +45,10 @@ noinst_HEADERS += \
+ ../include/ifaddrs.h \
+ ../include/openpty.h \
+ ../include/lxcmntent.h
++endif
++
+ if !HAVE_PRLIMIT
++if HAVE_PRLIMIT64
+ noinst_HEADERS += ../include/prlimit.h
+ endif
+ endif
+@@ -142,7 +145,10 @@ liblxc_la_SOURCES += \
+ ../include/ifaddrs.c ../include/ifaddrs.h \
+ ../include/openpty.c ../include/openpty.h \
+ ../include/lxcmntent.c ../include/lxcmntent.h
++endif
++
+ if !HAVE_PRLIMIT
++if HAVE_PRLIMIT64
+ liblxc_la_SOURCES += ../include/prlimit.c ../include/prlimit.h
+ endif
+ endif
+diff --git a/src/lxc/conf.c b/src/lxc/conf.c
+index 44d9784303..8a66f2d02c 100644
+--- a/src/lxc/conf.c
++++ b/src/lxc/conf.c
+@@ -100,13 +100,14 @@
+
+ #if IS_BIONIC
+ #include <../include/lxcmntent.h>
+-#ifndef HAVE_PRLIMIT
+-#include <../include/prlimit.h>
+-#endif
+ #else
+ #include <mntent.h>
+ #endif
+
++#if !defined(HAVE_PRLIMIT) && defined(HAVE_PRLIMIT64)
++#include <../include/prlimit.h>
++#endif
++
+ lxc_log_define(lxc_conf, lxc);
+
+ #if HAVE_LIBCAP
+@@ -2457,10 +2458,15 @@ int setup_resource_limits(struct lxc_list *limits, pid_t pid) {
+ return -1;
+ }
+
++#if HAVE_PRLIMIT || HAVE_PRLIMIT64
+ if (prlimit(pid, resid, &lim->limit, NULL) != 0) {
+ ERROR("failed to set limit %s: %s", lim->resource, strerror(errno));
+ return -1;
+ }
++#else
++ ERROR("Cannot set limit %s as prlimit is missing", lim->resource);
++ return -1;
++#endif
+ }
+ return 0;
+ }
include $(TOPDIR)/rules.mk
PKG_NAME:=mariadb
-PKG_VERSION:=10.2.21
-PKG_RELEASE:=1
+PKG_VERSION:=10.2.24
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL := \
https://ftp.yz.yamagata-u.ac.jp/pub/dbms/mariadb/$(PKG_NAME)-$(PKG_VERSION)/source \
https://downloads.mariadb.org/interstitial/$(PKG_NAME)-$(PKG_VERSION)/source
-PKG_HASH:=637f0808b65ec06902897a2f885a60377828d019d35802402dca541f8113536c
+PKG_HASH:=97f4d924e69f77abb2f650116785c2f5ef356230442534ebcbaadb51d9bb8bc4
PKG_MAINTAINER:=Sebastian Kemper <sebastian_ml@gmx.net>
PKG_LICENSE:=GPL-2.0 LGPL-2.1
PKG_LICENSE_FILES:=COPYING libmariadb/COPYING.LIB
+PKG_CPE_ID:=cpe:/a:mariadb:mariadb
+
HOST_BUILD_PARALLEL:=1
PKG_BUILD_PARALLEL:=1
PKG_USE_MIPS16:=0
MARIADB_COMMON_DEPENDS := \
$(ICONV_DEPENDS) \
- +libatomic \
+libopenssl \
- +libstdcpp \
+zlib
+MARIADB_COMMON_DEPENDS_EXE := \
+ $(MARIADB_COMMON_DEPENDS) \
+ +libatomic \
+ +libstdcpp
+
# Pass CPPFLAGS in the CFLAGS as otherwise the build system will
# ignore them.
TARGET_CFLAGS+=$(TARGET_CPPFLAGS)
endef
define Package/mariadb/description/Default
-MariaDB is a fast, stable and true multi-user, multi-threaded SQL
-database server. SQL (Structured Query Language) is the most popular
-database query language in the world. The main goals of MariaDB are
-speed, robustness and ease of use.
+MariaDB is a very fast and robust SQL database server.
endef
define Package/libmariadb/Default
$(call Package/mariadb/Default)
TITLE:=MariaDB database client base
DEPENDS:=mariadb-common \
- $(MARIADB_COMMON_DEPENDS) \
+ $(MARIADB_COMMON_DEPENDS_EXE) \
+libedit
endef
define Package/mariadb-server-base
$(call Package/mariadb/Default)
DEPENDS:=mariadb-common \
- $(MARIADB_COMMON_DEPENDS) \
- +!arc:libaio \
+ $(MARIADB_COMMON_DEPENDS_EXE) \
+ +libaio \
+liblzma \
+libpcre \
+resolveip
NAME=mysqld
-LOGGER="/usr/bin/logger -p user.err -s -t $NAME"
+LOGGER="/usr/bin/logger -p user.err -s -t $NAME --"
COMMAND=/usr/bin/$NAME
mysqld_get_param() {
start_service() {
local conf=/etc/mysql/my.cnf
local dir
- local user=mariadb
+ local user
+ local group
+
+ local logfile
local datadir
local logdir=/var/log/mysql
local log_stdout
local options
+ local hint="please fix your server configuration in /etc/mysql/"
+
if [ ! -x $COMMAND ]; then
$LOGGER $COMMAND is missing
exit 1
config_get options general options
datadir=$(mysqld_get_param datadir)
+ logfile=$(mysqld_get_param general_log_file)
tmpdir=$(mysqld_get_param tmpdir)
+ user=$(mysqld_get_param user)
if [ -z "$datadir" ]; then
$LOGGER datadir is not set
+ $LOGGER $hint
exit 1
fi
if [ -z "$tmpdir" ]; then
- $LOGGER tmpdir is not set.
+ $LOGGER tmpdir is not set
+ $LOGGER $hint
exit 1
fi
- [ -e "$datadir" ] || mkdir -p "$datadir"
+ if [ -z "$user" ]; then
+ $LOGGER user is not set
+ $LOGGER $hint
+ exit 1
+ fi
- for dir in "$logdir" "$rundir" "$tmpdir"; do
- if [ ! -e "$dir" ]; then
- mkdir -p "$dir"
- chown $user "$dir"
- fi
- done
+ user_exists "$user" || {
+ $LOGGER user \""$user"\" does not exist
+ $LOGGER $hint
+ exit 1
+ }
+
+ group=$(id -g -n "$user")
+
+ group_exists "$group" || {
+ $LOGGER group \""$group"\" does not exist
+ $LOGGER user \""$user"\" not configured correctly
+ exit 1
+ }
+
+ [ -n "$logfile" ] && logdir=$(dirname "$logfile")
+
+ # do not touch directories that already exist
+ # posix shell does not support arrays, hence using awk
+ awk \
+ -v user="$user" \
+ -v group="$group" \
+ -v a="$datadir" \
+ -v b="$logdir" \
+ -v c="$rundir" \
+ -v d="$tmpdir" \
+ '
+ BEGIN {
+ dir[0]=a
+ dir[1]=b
+ dir[2]=c
+ dir[3]=d
+ for (x in dir) {
+ if (system("test ! -e \"" dir[x] "\"" )) {
+ delete dir[x]
+ }
+ }
+ for (x in dir) {
+ system("mkdir -p \"" dir[x] "\"" )
+ system("chmod 750 \"" dir[x] "\"" )
+ system("chown \"" user "\":\"" group "\" \"" dir[x] "\"" )
+ }
+ }
+ '
if [ ! -f "$datadir/mysql/tables_priv.MYD" ]; then
- $LOGGER "cannot detect privileges table, you might need to"
- $LOGGER "run 'mysql_install_db --force' to initialize the system tables"
+ local args="--force"
+ local basedir=$(mysqld_get_param basedir)
+ [ -n "$basedir" ] && args="$args --basedir=$basedir"
+
+ $LOGGER Cannot detect privileges table. You might need to run
+ $LOGGER \'mysql_install_db $args\'
+ $LOGGER to initialize the system tables.
exit 1
fi
--- a/scripts/mysql_install_db.sh
+++ b/scripts/mysql_install_db.sh
-@@ -388,7 +388,7 @@ fi
+@@ -403,7 +403,7 @@ fi
# Try to determine the hostname
# define UT_RESUME_PRIORITY_CPU() ((void)0)
--- a/storage/innobase/include/ut0ut.h
+++ b/storage/innobase/include/ut0ut.h
-@@ -70,9 +70,8 @@ typedef time_t ib_time_t;
+@@ -71,9 +71,8 @@ typedef time_t ib_time_t;
the YieldProcessor macro defined in WinNT.h. It is a CPU architecture-
independent way by using YieldProcessor. */
# define UT_RELAX_CPU() YieldProcessor()
#else
# define UT_RELAX_CPU() do { \
volatile int32 volatile_var; \
-@@ -90,9 +89,8 @@ typedef time_t ib_time_t;
+@@ -91,9 +90,8 @@ typedef time_t ib_time_t;
#endif
#if defined(HAVE_HMT_PRIORITY_INSTRUCTION)
+++ /dev/null
---- a/libmariadb/libmariadb/secure/openssl.c
-+++ b/libmariadb/libmariadb/secure/openssl.c
-@@ -419,8 +419,10 @@ void ma_tls_end()
- if (mariadb_deinitialize_ssl)
- {
- #ifndef HAVE_OPENSSL_1_1_API
--#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#if OPENSSL_VERSION_NUMBER < 0x10000000L
- ERR_remove_state(0);
-+#else
-+ ERR_remove_thread_state(NULL);
- #endif
- EVP_cleanup();
- CRYPTO_cleanup_all_ex_data();
config MC_VFS
bool "Enable virtual filesystem support"
- default n
+ default y
help
This option enables the Virtual File System switch code to get
transparent access to the following file systems:
cpio, tar, fish, sfs, ftp, sftp, extfs.
- Disabled by default.
+ Enabled by default.
endmenu
include $(TOPDIR)/rules.mk
PKG_NAME:=mc
-PKG_VERSION:=4.8.22
+PKG_VERSION:=4.8.23
PKG_RELEASE:=1
PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
PKG_LICENSE:=GPL-3.0+
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=http://ftp.midnight-commander.org/
-PKG_HASH:=ee7868d7ba0498cf2cccefe107d7efee7f2571098806bba2aed5a159db801318
+PKG_HASH:=dd7f7ce74183307b0df25b5c3e60ad3293fd3d3d27d2f37dd7a10efce13dff1c
PKG_BUILD_PARALLEL:=1
PKG_FIXUP:=autoreconf gettext-version
PKG_BUILD_DEPENDS:=MC_VFS:libtirpc
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/mc $(1)/usr/bin
$(INSTALL_DIR) $(1)/etc/mc
$(INSTALL_DATA) $(PKG_BUILD_DIR)/misc/mc.charsets $(1)/etc/mc
- $(INSTALL_DATA) $(PKG_BUILD_DIR)/misc/mc.default.keymap $(1)/etc/mc
$(INSTALL_DATA) $(PKG_BUILD_DIR)/misc/mc.ext $(1)/etc/mc
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/misc/mc.default.keymap $(1)/etc/mc/mc.keymap
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/misc/filehighlight.ini $(1)/etc/mc
$(INSTALL_DIR) $(1)/usr/share/mc/help
$(INSTALL_DATA) $(PKG_BUILD_DIR)/doc/hlp/mc.hlp $(1)/usr/share/mc/help
$(INSTALL_DATA) $(PKG_BUILD_DIR)/misc/mc.menu $(1)/etc/mc
ln -sf mc $(1)/usr/bin/mcedit
endif
ifeq ($(CONFIG_MC_VFS),y)
- $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/vfs/extfs/helpers/sfs.ini $(1)/etc/mc
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/vfs/sfs/sfs.ini $(1)/etc/mc
$(INSTALL_DIR) $(1)/usr/lib/mc/extfs.d
endif
endef
--- /dev/null
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=mg
+PKG_VERSION:=6.5
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/ibara/mg/tar.gz/$(PKG_NAME)-$(PKG_VERSION)?
+PKG_HASH:=c18ab048c192921b5f826885b4087f3e82ec4272dce2e7ed7cde051cd0acf375
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_NAME)-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Hirokazu MORIKAWA <morikw2@gmail.com>
+PKG_LICENSE:=PUBLICDOMAIN ISC BSD VARIOUS
+PKG_LICENSE_FILES:=README.md
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/mg
+ SECTION:=utils
+ CATEGORY:=Utilities
+ DEPENDS:=+libncurses +libpcre
+ TITLE:=microscopic EMACS style editor
+ URL:=https://github.com/ibara/mg
+ SUBMENU:=Editors
+endef
+
+define Package/mg/description
+ Mg is intended to be a small, fast, and portable editor for people who
+ can't (or don't want to) run emacs for one reason or another, or are not
+ familiar with the vi editor. It is compatible with emacs because there
+ shouldn't be any reason to learn more editor types than emacs or vi.
+endef
+
+define Package/mg/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/mg $(1)/usr/bin/
+endef
+
+$(eval $(call BuildPackage,mg))
--- /dev/null
+diff -urN a/configure b/configure
+--- a/configure 2019-03-03 22:17:03.000000000 +0900
++++ b/configure 2019-06-04 13:08:41.418919319 +0900
+@@ -3,51 +3,21 @@
+ # This configure script written by Brian Callahan <bcallah@openbsd.org>
+ # and released into the Public Domain.
+
+-cccheck() {
+- if [ ! -z "$CC" ] ; then
+-cat << EOF > conftest.c
+-int main(void){return 0;}
+-EOF
+- $CC -o conftest conftest.c > /dev/null 2>&1
+- if [ $? -eq 0 ] ; then
+- ./conftest
+- if [ $? -eq 0 ] ; then
+- rm -f conftest conftest.c
+- cc="$CC"
+- return 0
+- else
+- echo "could not build working executables"
+- echo "Please ensure your C compiler is a native compiler"
+- exit 1
+- fi
+- else
+- rm -f conftest conftest.c
+- fi
+- fi
+-
+- for compiler in cc clang pcc xlc gcc ; do
+-cat << EOF > conftest.c
+-int main(void){return 0;}
+-EOF
+-
+- $compiler -o conftest conftest.c > /dev/null 2>&1
+-
+- if [ $? -eq 0 ] ; then
+- ./conftest
+- if [ $? -eq 0 ] ; then
+- rm -f conftest conftest.c
+- cc="$compiler"
+- return 0
+- else
+- echo "could not build working executables"
+- echo "Please ensure your C compiler is a native compiler"
+- exit 1
+- fi
+- else
+- rm -f conftest conftest.c
+- fi
+- done
+- return 1
++cc="$CC"
++
++fgetlncheck() {
++ cat << EOF > conftest.c
++#include <stdio.h>
++int main(void){fgetln(NULL,NULL);return 0;}
++EOF
++ $cc $tflags -o conftest conftest.c > /dev/null 2>&1
++ if [ $? -eq 0 ] ; then
++ rm -f conftest conftest.c
++ return 0
++ else
++ rm -f conftest conftest.c
++ return 1
++ fi
+ }
+
+ fparselncheck() {
+@@ -211,18 +181,19 @@
+ fi
+ }
+
+-wflagcheck() {
++futimenscheck() {
+ cat << EOF > conftest.c
+-int main(void){return 0;}
++#include <sys/stat.h>
++#include <stddef.h>
++int main(void){futimens(0, NULL);return 0;}
+ EOF
+- $cc -w -o conftest conftest.c > /dev/null 2> conftest.err
+- grep ':' conftest.err > /dev/null 2>&1
++ $cc $tflags -o conftest conftest.c > /dev/null 2>&1
+ if [ $? -eq 0 ] ; then
+- rm -f conftest conftest.err conftest.c
+- return 1
+- else
+- rm -f conftest conftest.err conftest.c
++ rm -f conftest conftest.c
+ return 0
++ else
++ rm -f conftest conftest.c
++ return 1
+ fi
+ }
+
+@@ -290,54 +261,9 @@
+ ldflags="${ldflags}-static"
+ fi
+
+-printf "checking for C compiler... "
+-cccheck
+-if [ $? -ne 0 ] ; then
+- echo "not found"
+- echo "Please install a C compiler and re-run configure."
+- exit 1
+-else
+- echo "$cc"
+-fi
+-
+-printf "checking for -w compiler flag... "
+-wflagcheck
+-if [ $? -ne 0 ] ; then
+- echo "no"
+-else
+- cflags="$cflags -w"
+- echo "yes"
+-fi
+-
+-printf "checking for OS... "
+-libs='-lncurses'
+-os=`uname -s`
+-echo "$os"
+-
+-case "x$os" in
+- "xLinux"|"xCYGWIN"*)
+- cflags="$cflags -D_GNU_SOURCE -D__dead=\"__attribute__((__noreturn__))\" -Dst_mtimespec=st_mtim"
+- ;;
+- "xDarwin")
+- cflags="$cflags -DMSG_NOSIGNAL=SO_NOSIGPIPE -DLOGIN_NAME_MAX=MAXLOGNAME"
+- libs="$libs -lutil"
+- ;;
+- "xFreeBSD")
+- cflags="$cflags -D__dead=__dead2 -DLOGIN_NAME_MAX=MAXLOGNAME"
+- libs="$libs -lutil"
+- ;;
+- "xOpenBSD")
+- libs="$libs -lutil"
+- ;;
+- "xNetBSD")
+- cflags="$cflags -D_OPENBSD_SOURCE"
+- libs="$libs -lutil"
+- ;;
+- "xDragonFly")
+- cflags="$cflags -D__dead=__dead2 -DLOGIN_NAME_MAX=MAXLOGNAME"
+- libs="$libs -lutil"
+- ;;
+-esac
++# OpenWrt
++libs='-lncurses -lpcreposix'
++cflags="$cflags -D_GNU_SOURCE -D__dead=\"__attribute__((__noreturn__))\" -Dst_mtimespec=st_mtim"
+
+ cat << EOF > config.h
+ /* This file generated automatically by configure. */
+@@ -357,6 +283,15 @@
+
+ EOF
+
++printf "checking for fgetln... "
++fgetlncheck
++if [ $? -eq 0 ] ; then
++ echo "#define HAVE_FGETLN" >> config.h
++ echo "yes"
++else
++ echo "no"
++fi
++
+ printf "checking for fparseln... "
+ fparselncheck
+ if [ $? -eq 0 ] ; then
+diff -urN a/fparseln.c b/fparseln.c
+--- a/fparseln.c 2019-03-03 22:17:03.000000000 +0900
++++ b/fparseln.c 2019-06-04 13:05:38.815543338 +0900
+@@ -74,6 +74,8 @@
+ #include "util.h"
+ #endif
+
++#ifndef HAVE_FGETLN
++
+ static char *
+ fgetln(FILE *fp, size_t *len)
+ {
+@@ -119,6 +121,8 @@
+ return buf;
+ }
+
++#endif /* !HAVE_FGETLN */
++
+ static int isescaped(const char *, const char *, int);
+
+ /* isescaped():
+diff -urN a/linux.h b/linux.h
+--- a/linux.h 2019-03-03 22:17:03.000000000 +0900
++++ b/linux.h 2019-06-04 13:45:21.787063324 +0900
+@@ -7,6 +7,7 @@
+ #endif
+ #include <sys/types.h>
+
++#include <sys/stat.h>
+ #include <stdio.h>
+
+ /* Defines */
--- /dev/null
+--- a/fileio.c
++++ b/fileio.c
+@@ -23,6 +23,10 @@
+ #include <string.h>
+ #include <unistd.h>
+
++#ifndef DEFFILEMODE
++#define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)
++#endif
++
+ #include "def.h"
+ #include "kbd.h"
+ #include "pathnames.h"
--- /dev/null
+--- a/re_search.c
++++ b/re_search.c
+@@ -16,7 +16,7 @@
+ #ifdef REGEX
+ #include <sys/queue.h>
+ #include <sys/types.h>
+-#include <regex.h>
++#include <pcreposix.h>
+ #include <signal.h>
+ #include <stdio.h>
+ #include <string.h>
--- /dev/null
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=micrond
+PKG_VERSION:=1
+PKG_RELEASE:=1
+PKG_LICENSE:=BSD-2-clause
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/micrond
+ SECTION:=utils
+ CATEGORY:=Utilities
+ TITLE:=Small Cron daemon providing a cron.d directory other packages can install their crontabs into
+ DEPENDS:=
+endef
+
+define Package/micrond/install
+ $(CP) ./files/* $(1)/
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/micrond $(1)/usr/sbin/
+endef
+
+$(eval $(call BuildPackage,micrond))
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=50
+USE_PROCD=1
+
+CRONDIR=/usr/lib/micron.d
+
+start_service() {
+ procd_open_instance
+ procd_set_param command /usr/sbin/micrond "$CRONDIR"
+ procd_set_param respawn
+ procd_close_instance
+}
--- /dev/null
+all: micrond
+
+micrond: micrond.c
--- /dev/null
+/*
+ Copyright (c) 2013, Matthias Schiffer <mschiffer@universe-factory.net>
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+
+#include <sys/types.h>
+#include <sys/time.h>
+#include <dirent.h>
+#include <signal.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <strings.h>
+#include <syslog.h>
+#include <time.h>
+#include <unistd.h>
+
+
+typedef struct job {
+ struct job *next;
+
+ uint64_t minutes;
+ uint32_t hours;
+ uint32_t doms;
+ uint16_t months;
+ uint8_t dows;
+
+ char *command;
+} job_t;
+
+
+static const char const *const MONTHS[12] = {
+ "jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec"
+};
+
+static const char const *const WEEKDAYS[7] = {
+ "sun", "mon", "tue", "wed", "thu", "fri", "sat"
+};
+
+
+static const char *crondir;
+
+static job_t *jobs = NULL;
+
+
+static void usage(void) {
+ fprintf(stderr, "Usage: micrond <crondir>\n");
+}
+
+
+static inline uint64_t bit(unsigned b) {
+ return ((uint64_t)1) << b;
+}
+
+static int strict_atoi(const char *s) {
+ char *end;
+ int ret = strtol(s, &end, 10);
+
+ if (*end)
+ return -1;
+ else
+ return ret;
+}
+
+static uint64_t parse_strings(const char *input, const char *const *strings, size_t n) {
+ size_t i;
+ for (i = 0; i < n; i++) {
+ if (strcasecmp(input, strings[i]) == 0)
+ return bit(i);
+ }
+
+ return 0;
+}
+
+static uint64_t parse_times(char *input, int min, int n) {
+ uint64_t ret = 0;
+ int step = 1;
+
+ char *comma = strchr(input, ',');
+ if (comma) {
+ *comma = 0;
+ ret = parse_times(comma+1, min, n);
+
+ if (!ret)
+ return 0;
+ }
+
+ char *slash = strchr(input, '/');
+ if (slash) {
+ *slash = 0;
+ step = strict_atoi(slash+1);
+
+ if (step <= 0)
+ return 0;
+ }
+
+ int begin, end;
+ char *minus = strchr(input, '-');
+ if (minus) {
+ *minus = 0;
+ begin = strict_atoi(input);
+ end = strict_atoi(minus+1);
+ }
+ else if (strcmp(input, "*") == 0) {
+ begin = min;
+ end = min+n-1;
+ }
+ else {
+ begin = end = strict_atoi(input);
+ }
+
+ if (begin < min || end < min)
+ return 0;
+
+ int i;
+ for (i = begin-min; i <= end-min; i += step)
+ ret |= bit(i % n);
+
+ return ret;
+}
+
+static int handle_line(const char *line) {
+ job_t job = {};
+ int ret = -1;
+ char *columns[5];
+ int i;
+ int len;
+
+ int matches = sscanf(line, "%ms %ms %ms %ms %ms %n", &columns[0], &columns[1], &columns[2], &columns[3], &columns[4], &len);
+ if (matches != 5 && matches != 6) {
+ if (matches <= 0)
+ ret = 0;
+
+ goto end;
+ }
+
+ job.minutes = parse_times(columns[0], 0, 60);
+ if (!job.minutes)
+ goto end;
+
+ job.hours = parse_times(columns[1], 0, 24);
+ if (!job.hours)
+ goto end;
+
+ job.doms = parse_times(columns[2], 1, 31);
+ if (!job.doms)
+ goto end;
+
+
+ job.months = parse_strings(columns[3], MONTHS, 12);
+
+ if (!job.months)
+ job.months = parse_times(columns[3], 1, 12);
+ if (!job.months)
+ goto end;
+
+ job.dows = parse_strings(columns[4], WEEKDAYS, 7);
+ if (!job.dows)
+ job.dows = parse_times(columns[4], 0, 7);
+ if (!job.dows)
+ goto end;
+
+ job.command = strdup(line+len);
+
+ job_t *jobp = malloc(sizeof(job_t));
+ *jobp = job;
+
+ jobp->next = jobs;
+ jobs = jobp;
+
+ ret = 0;
+
+ end:
+ for (i = 0; i < matches && i < 5; i++)
+ free(columns[i]);
+
+ return ret;
+}
+
+
+static void read_crontab(const char *name) {
+ FILE *file = fopen(name, "r");
+ if (!file) {
+ syslog(LOG_WARNING, "unable to read crontab `%s'", name);
+ return;
+ }
+
+ char line[16384];
+ unsigned lineno = 0;
+
+ while (fgets(line, sizeof(line), file)) {
+ lineno++;
+
+ char *comment = strchr(line, '#');
+ if (comment)
+ *comment = 0;
+
+ if (handle_line(line))
+ syslog(LOG_WARNING, "syntax error in `%s', line %u", name, lineno);
+ }
+
+ fclose(file);
+}
+
+
+static void read_crondir(void) {
+ DIR *dir;
+
+ if (chdir(crondir) || ((dir = opendir(".")) == NULL)) {
+ fprintf(stderr, "Unable to read crondir `%s'\n", crondir);
+ usage();
+ exit(1);
+ }
+
+ struct dirent *ent;
+ while ((ent = readdir(dir)) != NULL) {
+ if (ent->d_name[0] == '.')
+ continue;
+
+ read_crontab(ent->d_name);
+ }
+
+ closedir(dir);
+}
+
+
+static void run_job(const job_t *job) {
+ pid_t pid = fork();
+ if (pid == 0) {
+ execl("/bin/sh", "/bin/sh", "-c", job->command, (char*)NULL);
+ syslog(LOG_ERR, "unable to run job: exec failed");
+ _exit(1);
+ }
+ else if (pid < 0) {
+ syslog(LOG_ERR, "unable to run job: fork failed");
+ }
+}
+
+
+static void check_job(const job_t *job, const struct tm *tm) {
+ if (!(job->minutes & bit(tm->tm_min)))
+ return;
+
+ if (!(job->hours & bit(tm->tm_hour)))
+ return;
+
+ if (!(job->doms & bit(tm->tm_mday-1)))
+ return;
+
+ if (!(job->months & bit(tm->tm_mon)))
+ return;
+
+ if (!(job->dows & bit(tm->tm_wday)))
+ return;
+
+ run_job(job);
+}
+
+
+int main(int argc, char *argv[]) {
+ if (argc != 2) {
+ usage();
+
+ exit(argc < 2 ? 0 : 1);
+ }
+
+ crondir = argv[1];
+
+ signal(SIGCHLD, SIG_IGN);
+
+ read_crondir();
+
+ time_t t = time(NULL);
+ struct tm *tm = localtime(&t);
+ int minute = tm->tm_min;
+
+ while (1) {
+ sleep(60 - t%60);
+
+ t = time(NULL);
+ tm = localtime(&t);
+
+ minute = (minute+1)%60;
+ if (tm->tm_min != minute) {
+ /* clock has moved, don't execute jobs */
+ minute = tm->tm_min;
+ continue;
+ }
+
+ job_t *job;
+ for (job = jobs; job; job = job->next)
+ check_job(job, tm);
+ }
+}
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc-utils.git
PKG_SOURCE_DATE:=2018-12-09
-PKG_SOURCE_VERSION:=485b05ec40031a06077db9c84ae75a36ebd3db25
-PKG_MIRROR_HASH:=043d706a5bb7c206ccfdc1a5e604bf03bd744f8dcfaeccba1a7ef845a18fbd26
+PKG_SOURCE_VERSION:=aef913e31b659462fe6b9320d241676cba97f67b
+PKG_MIRROR_HASH:=8c3d872be1392b7a140a36ce75ed48ef300ee6b6f1ce1b37dad1ad263d338dc3
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=
PKG_MAINTAINER:=Michael Heimpold <mhei@heimpold.de>
-PKG_BUILD_PARALLEL:=1
-
include $(INCLUDE_DIR)/package.mk
define Package/mmc-utils
--- /dev/null
+--- a/Makefile
++++ b/Makefile
+@@ -1,5 +1,5 @@
+ CC ?= gcc
+-AM_CFLAGS = -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
++AM_CFLAGS = -D_FILE_OFFSET_BITS=64
+ CFLAGS ?= -g -O2
+ objects = \
+ mmc.o \
--- /dev/null
+From bf96e1b2f48eab26c4a0c2a0903d9d7b9a311a1d Mon Sep 17 00:00:00 2001
+From: Michael Heimpold <michael.heimpold@i2se.com>
+Date: Tue, 18 Dec 2018 14:47:16 +0100
+Subject: [PATCH 1/9] Check calloc's return value before using the pointer
+
+If calloc fails, bail out immediately instead of trying to
+use the NULL pointer.
+
+Signed-off-by: Michael Heimpold <michael.heimpold@i2se.com>
+Cc: Michael Heimpold <mhei@heimpold.de>
+---
+ lsmmc.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/lsmmc.c b/lsmmc.c
+index 9737b37..e514c83 100644
+--- a/lsmmc.c
++++ b/lsmmc.c
+@@ -374,6 +374,8 @@ char *to_binstr(char *hexstr)
+ char *binstr;
+
+ binstr = calloc(strlen(hexstr) * 4 + 1, sizeof(char));
++ if (!binstr)
++ return NULL;
+
+ while (hexstr && *hexstr != '\0') {
+ if (!isxdigit(*hexstr))
+--
+2.17.1
+
--- /dev/null
+From 9214f2a4002bafef73c9593464ab3841ba7bac12 Mon Sep 17 00:00:00 2001
+From: Michael Heimpold <michael.heimpold@i2se.com>
+Date: Tue, 18 Dec 2018 14:49:37 +0100
+Subject: [PATCH 2/9] Cleanup memory in error case
+
+In case that we leave due to malformed string,
+free the allocated memory before returning.
+
+Signed-off-by: Michael Heimpold <michael.heimpold@i2se.com>
+Cc: Michael Heimpold <mhei@heimpold.de>
+---
+ lsmmc.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/lsmmc.c b/lsmmc.c
+index e514c83..a53bc57 100644
+--- a/lsmmc.c
++++ b/lsmmc.c
+@@ -378,8 +378,10 @@ char *to_binstr(char *hexstr)
+ return NULL;
+
+ while (hexstr && *hexstr != '\0') {
+- if (!isxdigit(*hexstr))
++ if (!isxdigit(*hexstr)) {
++ free(binstr);
+ return NULL;
++ }
+
+ if (isdigit(*hexstr))
+ strcat(binstr, bindigits[*hexstr - '0']);
+--
+2.17.1
+
--- /dev/null
+From a59d98003c0b2364929ee23ed331d610029c6dcf Mon Sep 17 00:00:00 2001
+From: Michael Heimpold <michael.heimpold@i2se.com>
+Date: Tue, 18 Dec 2018 14:52:12 +0100
+Subject: [PATCH 3/9] Fix parsing of character in to_binstr()
+
+When a hex-digit > 'a' or 'A' is read, we have to add an offset of 10
+to access the valid symbol in our mapping table.
+
+Signed-off-by: Michael Heimpold <michael.heimpold@i2se.com>
+Cc: Michael Heimpold <mhei@heimpold.de>
+---
+ lsmmc.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lsmmc.c b/lsmmc.c
+index a53bc57..e64117c 100644
+--- a/lsmmc.c
++++ b/lsmmc.c
+@@ -386,9 +386,9 @@ char *to_binstr(char *hexstr)
+ if (isdigit(*hexstr))
+ strcat(binstr, bindigits[*hexstr - '0']);
+ else if (islower(*hexstr))
+- strcat(binstr, bindigits[*hexstr - 'a']);
++ strcat(binstr, bindigits[*hexstr - 'a' + 10]);
+ else
+- strcat(binstr, bindigits[*hexstr - 'A']);
++ strcat(binstr, bindigits[*hexstr - 'A' + 10]);
+
+ hexstr++;
+ }
+--
+2.17.1
+
--- /dev/null
+From f1fc04d7609ab074647aa00e96d4c66d5135b155 Mon Sep 17 00:00:00 2001
+From: Michael Heimpold <michael.heimpold@i2se.com>
+Date: Tue, 18 Dec 2018 15:02:25 +0100
+Subject: [PATCH 4/9] Optimize to_binstr() function
+
+Appending multiple times to same string is slow since strcat() needs
+to determine the end during each run. So manually maintain a pointer
+to the end to speed-up things.
+
+Signed-off-by: Michael Heimpold <michael.heimpold@i2se.com>
+Cc: Michael Heimpold <mhei@heimpold.de>
+---
+ lsmmc.c | 11 +++++++----
+ 1 file changed, 7 insertions(+), 4 deletions(-)
+
+diff --git a/lsmmc.c b/lsmmc.c
+index e64117c..86713f7 100644
+--- a/lsmmc.c
++++ b/lsmmc.c
+@@ -371,12 +371,14 @@ char *to_binstr(char *hexstr)
+ "0000", "0001", "0010", "0011", "0100", "0101", "0110", "0111",
+ "1000", "1001", "1010", "1011", "1100", "1101", "1110", "1111",
+ };
+- char *binstr;
++ char *binstr, *tail;
+
+ binstr = calloc(strlen(hexstr) * 4 + 1, sizeof(char));
+ if (!binstr)
+ return NULL;
+
++ tail = binstr;
++
+ while (hexstr && *hexstr != '\0') {
+ if (!isxdigit(*hexstr)) {
+ free(binstr);
+@@ -384,13 +386,14 @@ char *to_binstr(char *hexstr)
+ }
+
+ if (isdigit(*hexstr))
+- strcat(binstr, bindigits[*hexstr - '0']);
++ strcat(tail, bindigits[*hexstr - '0']);
+ else if (islower(*hexstr))
+- strcat(binstr, bindigits[*hexstr - 'a' + 10]);
++ strcat(tail, bindigits[*hexstr - 'a' + 10]);
+ else
+- strcat(binstr, bindigits[*hexstr - 'A' + 10]);
++ strcat(tail, bindigits[*hexstr - 'A' + 10]);
+
+ hexstr++;
++ tail += 4;
+ }
+
+ return binstr;
+--
+2.17.1
+
--- /dev/null
+From c0375ecea6f3731c0f65ff6abd2c194b90153b26 Mon Sep 17 00:00:00 2001
+From: Michael Heimpold <michael.heimpold@i2se.com>
+Date: Tue, 18 Dec 2018 15:09:42 +0100
+Subject: [PATCH 5/9] Add eMMC vendor Micron to table
+
+Signed-off-by: Michael Heimpold <michael.heimpold@i2se.com>
+Cc: Michael Heimpold <mhei@heimpold.de>
+---
+ lsmmc.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/lsmmc.c b/lsmmc.c
+index 86713f7..4f687ac 100644
+--- a/lsmmc.c
++++ b/lsmmc.c
+@@ -194,6 +194,11 @@ struct ids_database database[] = {
+ .id = 0x11,
+ .manufacturer = "Toshiba",
+ },
++ {
++ .type = "mmc",
++ .id = 0x13,
++ .manufacturer = "Micron",
++ },
+ {
+ .type = "mmc",
+ .id = 0x15,
+--
+2.17.1
+
--- /dev/null
+From 6bcf573f9056c6a4fb2ace5aece08a53dc5dceca Mon Sep 17 00:00:00 2001
+From: Stephane Fillod <f8cfe@free.fr>
+Date: Mon, 14 Jan 2019 17:50:50 +0100
+Subject: [PATCH 6/9] Fix parsing of Product Revision and Serial Number
+
+According to MMC Standard (similar to SDCard Standard).
+
+Signed-off-by: Stephane Fillod <f8cfe@free.fr>
+Acked-by: Avri Altman <avri.altman@wdc.com>
+---
+ lsmmc.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lsmmc.c b/lsmmc.c
+index 4f687ac..b627b79 100644
+--- a/lsmmc.c
++++ b/lsmmc.c
+@@ -562,7 +562,7 @@ void print_mmc_cid(struct config *config, char *cid)
+ unsigned int crc;
+
+ parse_bin(cid, "8u6r2u8u48a4u4u32u4u4u7u1r",
+- &mid, &cbx, &oid, &pnm[0], &psn, &prv_major, &prv_minor,
++ &mid, &cbx, &oid, &pnm[0], &prv_major, &prv_minor, &psn,
+ &mdt_year, &mdt_month, &crc);
+
+ pnm[6] = '\0';
+--
+2.17.1
+
--- /dev/null
+From c9c90f4f74ee5318ee9a2f581b665d474f6f90c5 Mon Sep 17 00:00:00 2001
+From: Stephane Fillod <f8cfe@free.fr>
+Date: Tue, 15 Jan 2019 14:56:15 +0100
+Subject: [PATCH 7/9] Add various SD/eMMC vendors to table
+
+Part if this list update comes from a compilation of this web site[1].
+
+[1] https://www.cameramemoryspeed.com/sd-memory-card-faq/reading-sd-card-cid-serial-psn-internal-numbers/
+
+Signed-off-by: Stephane Fillod <f8cfe@free.fr>
+---
+ lsmmc.c | 34 ++++++++++++++++++++++++++++++++--
+ 1 file changed, 32 insertions(+), 2 deletions(-)
+
+diff --git a/lsmmc.c b/lsmmc.c
+index b627b79..63504d2 100644
+--- a/lsmmc.c
++++ b/lsmmc.c
+@@ -112,7 +112,7 @@ struct ids_database database[] = {
+ {
+ .type = "sd",
+ .id = 0x1b,
+- .manufacturer = "Transcend",
++ .manufacturer = "Transcend/Samsung",
+ },
+ {
+ .type = "sd",
+@@ -122,7 +122,7 @@ struct ids_database database[] = {
+ {
+ .type = "sd",
+ .id = 0x1d,
+- .manufacturer = "Corsair",
++ .manufacturer = "Corsair/AData",
+ },
+ {
+ .type = "sd",
+@@ -134,6 +134,11 @@ struct ids_database database[] = {
+ .id = 0x1f,
+ .manufacturer = "Kingston",
+ },
++ {
++ .type = "sd",
++ .id = 0x27,
++ .manufacturer = "Delkin/Phison",
++ },
+ {
+ .type = "sd",
+ .id = 0x28,
+@@ -144,6 +149,11 @@ struct ids_database database[] = {
+ .id = 0x30,
+ .manufacturer = "SanDisk",
+ },
++ {
++ .type = "sd",
++ .id = 0x31,
++ .manufacturer = "Silicon Power",
++ },
+ {
+ .type = "sd",
+ .id = 0x33,
+@@ -159,6 +169,21 @@ struct ids_database database[] = {
+ .id = 0x6f,
+ .manufacturer = "STMicroelectronics",
+ },
++ {
++ .type = "sd",
++ .id = 0x74,
++ .manufacturer = "Transcend",
++ },
++ {
++ .type = "sd",
++ .id = 0x76,
++ .manufacturer = "Patriot",
++ },
++ {
++ .type = "sd",
++ .id = 0x82,
++ .manufacturer = "Gobe/Sony",
++ },
+ {
+ .type = "sd",
+ .id = 0x89,
+@@ -224,6 +249,11 @@ struct ids_database database[] = {
+ .id = 0x70,
+ .manufacturer = "Kingston",
+ },
++ {
++ .type = "mmc",
++ .id = 0xfe,
++ .manufacturer = "Micron",
++ },
+ };
+
+ /* Command line parsing functions */
+--
+2.17.1
+
--- /dev/null
+From 6ace4329870d9d7b2a2c3603af316b3f1a75e9f2 Mon Sep 17 00:00:00 2001
+From: Stephane Fillod <f8cfe@free.fr>
+Date: Tue, 15 Jan 2019 15:06:03 +0100
+Subject: [PATCH 8/9] Various fixes
+
+These warnings were mainly found using cppcheck.
+
+Signed-off-by: Stephane Fillod <f8cfe@free.fr>
+Reviewed-by: Michael Heimpold <mhei@heimpold.de>
+---
+ lsmmc.c | 42 +++++++++++++++++++++---------------------
+ mmc_cmds.c | 14 ++++++++++++--
+ 2 files changed, 33 insertions(+), 23 deletions(-)
+
+diff --git a/lsmmc.c b/lsmmc.c
+index 63504d2..06cc0b8 100644
+--- a/lsmmc.c
++++ b/lsmmc.c
+@@ -554,9 +554,9 @@ void print_sd_cid(struct config *config, char *cid)
+ printf("\tOID: %s\n", oid);
+ printf("\tPNM: %s\n", pnm);
+ printf("\tPRV: 0x%01x%01x ", prv_major, prv_minor);
+- printf("(%d.%d)\n", prv_major, prv_minor);
++ printf("(%u.%u)\n", prv_major, prv_minor);
+ printf("\tPSN: 0x%08x\n", psn);
+- printf("\tMDT: 0x%02x%01x %d %s\n", mdt_year, mdt_month,
++ printf("\tMDT: 0x%02x%01x %u %s\n", mdt_year, mdt_month,
+ 2000 + mdt_year, months[mdt_month]);
+ printf("\tCRC: 0x%02x\n", crc);
+ } else {
+@@ -566,9 +566,9 @@ void print_sd_cid(struct config *config, char *cid)
+ else
+ printf("manufacturer: 'Unlisted' '%s'\n", oid);
+
+- printf("product: '%s' %d.%d\n", pnm, prv_major, prv_minor);
++ printf("product: '%s' %u.%u\n", pnm, prv_major, prv_minor);
+ printf("serial: 0x%08x\n", psn);
+- printf("manfacturing date: %d %s\n", 2000 + mdt_year,
++ printf("manufacturing date: %u %s\n", 2000 + mdt_year,
+ months[mdt_month]);
+ }
+ }
+@@ -625,9 +625,9 @@ void print_mmc_cid(struct config *config, char *cid)
+ printf("\tOID: 0x%01x\n", oid);
+ printf("\tPNM: %s\n", pnm);
+ printf("\tPRV: 0x%01x%01x ", prv_major, prv_minor);
+- printf("(%d.%d)\n", prv_major, prv_minor);
++ printf("(%u.%u)\n", prv_major, prv_minor);
+ printf("\tPSN: 0x%08x\n", psn);
+- printf("\tMDT: 0x%01x%01x %d %s\n", mdt_month, mdt_year,
++ printf("\tMDT: 0x%01x%01x %u %s\n", mdt_month, mdt_year,
+ 1997 + mdt_year, months[mdt_month]);
+ printf("\tCRC: 0x%02x\n", crc);
+ } else {
+@@ -637,9 +637,9 @@ void print_mmc_cid(struct config *config, char *cid)
+ else
+ printf("manufacturer: 'Unlisted' '%c'\n", oid);
+
+- printf("product: '%s' %d.%d\n", pnm, prv_major, prv_minor);
++ printf("product: '%s' %u.%u\n", pnm, prv_major, prv_minor);
+ printf("serial: 0x%08x\n", psn);
+- printf("manfacturing date: %d %s\n", 1997 + mdt_year,
++ printf("manufacturing date: %u %s\n", 1997 + mdt_year,
+ months[mdt_month]);
+ }
+ }
+@@ -729,7 +729,7 @@ void print_sd_csd(struct config *config, char *csd)
+
+ printf("======SD/CSD======\n");
+
+- printf("\tCSD_STRUCTURE: %d\n", csd_structure);
++ printf("\tCSD_STRUCTURE: %u\n", csd_structure);
+ printf("\tTAAC: 0x%02x (", taac);
+
+ switch (taac_timevalue) {
+@@ -816,7 +816,7 @@ void print_sd_csd(struct config *config, char *csd)
+ if (csd_structure == 1 && taac != 0x0e)
+ printf("Warn: Invalid TAAC (should be 0x0e)\n");
+
+- printf("\tNSAC: %d clocks\n", nsac);
++ printf("\tNSAC: %u clocks\n", nsac);
+ if (csd_structure == 1 && nsac != 0x00)
+ printf("Warn: Invalid NSAC (should be 0x00)\n");
+
+@@ -1103,12 +1103,12 @@ void print_sd_csd(struct config *config, char *csd)
+ if (erase_blk_en != 0x01)
+ printf("Warn: Invalid ERASE_BLK_EN (should be 0x01)\n");
+
+- printf("\tSECTOR_SIZE: 0x%02x (Erasable sector: %d blocks)\n",
++ printf("\tSECTOR_SIZE: 0x%02x (Erasable sector: %u blocks)\n",
+ sector_size, sector_size + 1);
+ if (sector_size != 0x7f)
+ printf("Warn: Invalid SECTOR_SIZE (should be 0x7f)\n");
+
+- printf("\tWP_GRP_SIZE: 0x%02x (Write protect group: %d blocks)\n",
++ printf("\tWP_GRP_SIZE: 0x%02x (Write protect group: %u blocks)\n",
+ wp_grp_size, wp_grp_size + 1);
+ if (wp_grp_size != 0x00)
+ printf("Warn: Invalid WP_GRP_SIZE (should be 0x00)\n");
+@@ -1117,7 +1117,7 @@ void print_sd_csd(struct config *config, char *csd)
+ if (wp_grp_enable != 0x00)
+ printf("Warn: Invalid WP_GRP_ENABLE (should be 0x00)\n");
+
+- printf("\tR2W_FACTOR: 0x%01x (Write %d times read)\n",
++ printf("\tR2W_FACTOR: 0x%01x (Write %u times read)\n",
+ r2w_factor, r2w_factor);
+ if (r2w_factor != 0x02)
+ printf("Warn: Invalid R2W_FACTOR (should be 0x02)\n");
+@@ -1199,7 +1199,7 @@ void print_sd_csd(struct config *config, char *csd)
+ else
+ printf("%.2fbyte", memory_capacity * 1.0);
+
+- printf(" (%lld bytes, %lld sectors, %d bytes each)\n",
++ printf(" (%llu bytes, %llu sectors, %d bytes each)\n",
+ memory_capacity, blocks, block_size);
+ } else {
+ unsigned long long blocks = 0;
+@@ -1262,7 +1262,7 @@ void print_sd_csd(struct config *config, char *csd)
+ else
+ printf("%.2fbyte", memory_capacity * 1.0);
+
+- printf(" (%lld bytes, %lld sectors, %d bytes each)\n",
++ printf(" (%llu bytes, %llu sectors, %d bytes each)\n",
+ memory_capacity, blocks, block_size);
+ }
+ }
+@@ -1456,7 +1456,7 @@ void print_mmc_csd(struct config *config, char *csd)
+ break;
+ }
+
+- printf("\tNSAC: %d clocks\n", nsac);
++ printf("\tNSAC: %u clocks\n", nsac);
+ printf("\tTRAN_SPEED: 0x%02x (", tran_speed);
+ switch (tran_speed_timevalue) {
+ case 0x0:
+@@ -1764,10 +1764,10 @@ void print_mmc_csd(struct config *config, char *csd)
+
+ printf("\tC_SIZE_MULT: 0x%01x\n", c_size_mult);
+ printf("\tERASE_GRP_SIZE: 0x%02x\n", erase_grp_size);
+- printf("\tERASE_GRP_MULT: 0x%02x (%d write blocks/erase group)\n",
++ printf("\tERASE_GRP_MULT: 0x%02x (%u write blocks/erase group)\n",
+ erase_grp_mult, (erase_grp_size + 1) *
+ (erase_grp_mult + 1));
+- printf("\tWP_GRP_SIZE: 0x%02x (%d blocks/write protect group)\n",
++ printf("\tWP_GRP_SIZE: 0x%02x (%u blocks/write protect group)\n",
+ wp_grp_size, wp_grp_size + 1);
+ printf("\tWP_GRP_ENABLE: 0x%01x\n", wp_grp_enable);
+
+@@ -1784,7 +1784,7 @@ void print_mmc_csd(struct config *config, char *csd)
+ break;
+ }
+
+- printf("\tR2W_FACTOR: 0x%01x (Write %d times read)\n",
++ printf("\tR2W_FACTOR: 0x%01x (Write %u times read)\n",
+ r2w_factor, r2w_factor);
+
+ printf("\tWRITE_BL_LEN: 0x%01x (", write_bl_len);
+@@ -1914,7 +1914,7 @@ void print_mmc_csd(struct config *config, char *csd)
+ else
+ printf("%.2fbyte", memory_capacity * 1.0);
+
+- printf(" (%lld bytes, %lld sectors, %d bytes each)\n",
++ printf(" (%llu bytes, %llu sectors, %d bytes each)\n",
+ memory_capacity, blocks, block_size);
+ } else {
+ int mult;
+@@ -1991,7 +1991,7 @@ void print_mmc_csd(struct config *config, char *csd)
+ printf("%.2fKbyte", memory_capacity / (1024.0));
+ else
+ printf("%.2fbyte", memory_capacity * 1.0);
+- printf(" (%lld bytes, %lld sectors, %d bytes each)\n",
++ printf(" (%llu bytes, %llu sectors, %d bytes each)\n",
+ memory_capacity, blocks, block_size);
+ }
+ }
+diff --git a/mmc_cmds.c b/mmc_cmds.c
+index 19a9da1..9402112 100644
+--- a/mmc_cmds.c
++++ b/mmc_cmds.c
+@@ -252,6 +252,7 @@ int do_writeprotect_boot_get(int nargs, char **argv)
+
+ print_writeprotect_boot_status(ext_csd);
+
++ close(fd);
+ return ret;
+ }
+
+@@ -290,6 +291,7 @@ int do_writeprotect_boot_set(int nargs, char **argv)
+ exit(1);
+ }
+
++ close(fd);
+ return ret;
+ }
+
+@@ -378,6 +380,7 @@ int do_writeprotect_user_get(int nargs, char **argv)
+ if (last_wpblk != (x + y - 1))
+ print_wp_status(wp_sizeblks, last_wpblk, cnt - 1, last_prot);
+
++ close(fd);
+ return ret;
+ }
+
+@@ -524,6 +527,7 @@ int do_disable_512B_emulation(int nargs, char **argv)
+ printf("MMC does not support disabling 512B emulation mode.\n");
+ }
+
++ close(fd);
+ return ret;
+ }
+
+@@ -595,6 +599,7 @@ int do_write_boot_en(int nargs, char **argv)
+ value, EXT_CSD_PART_CONFIG, device);
+ exit(1);
+ }
++ close(fd);
+ return ret;
+ }
+
+@@ -716,6 +721,7 @@ int do_hwreset(int value, int nargs, char **argv)
+ exit(1);
+ }
+
++ close(fd);
+ return ret;
+ }
+
+@@ -766,6 +772,7 @@ int do_write_bkops_en(int nargs, char **argv)
+ exit(1);
+ }
+
++ close(fd);
+ return ret;
+ }
+
+@@ -796,6 +803,7 @@ int do_status_get(int nargs, char **argv)
+
+ printf("SEND_STATUS response: 0x%08x\n", response);
+
++ close(fd);
+ return ret;
+ }
+
+@@ -1615,11 +1623,11 @@ int do_read_extcsd(int nargs, char **argv)
+ printf("Write reliability setting register"
+ " [WR_REL_SET]: 0x%02x\n", reg);
+
+- printf(" user area: %s\n", reg & (1<<0) ? reliable : fast);
++ printf(" user area: %s\n", (reg & (1<<0)) ? reliable : fast);
+ int i;
+ for (i = 1; i <= 4; i++) {
+ printf(" partition %d: %s\n", i,
+- reg & (1<<i) ? reliable : fast);
++ (reg & (1<<i)) ? reliable : fast);
+ }
+
+ reg = ext_csd[EXT_CSD_WR_REL_PARAM];
+@@ -1805,6 +1813,7 @@ int do_sanitize(int nargs, char **argv)
+ exit(1);
+ }
+
++ close(fd);
+ return ret;
+
+ }
+@@ -2390,6 +2399,7 @@ int do_cache_ctrl(int value, int nargs, char **argv)
+ exit(1);
+ }
+
++ close(fd);
+ return ret;
+ }
+
+--
+2.17.1
+
--- /dev/null
+From 5425e4e96559b29b36459080190e8bcc1c92f7c2 Mon Sep 17 00:00:00 2001
+From: "Shivamurthy Shastri (sshivamurthy)" <sshivamurthy@micron.com>
+Date: Wed, 10 Apr 2019 13:38:08 +0000
+Subject: [PATCH 9/9] mmc-utils: let FFU mode use CMD23 and CMD25
+
+As per specification, the host can use either CMD24 or CMD25 in
+closed-ended or open-ended way.
+CMD25 is better option as it can flash the firmware image in one go.
+
+Signed-off-by: Shivamurthy Shastri <sshivamurthy@micron.com>
+Reviewed-by: Avri Altman <avri.altman@wdc.com>
+---
+ mmc.h | 2 ++
+ mmc_cmds.c | 70 ++++++++++++++++++++++++++++++------------------------
+ 2 files changed, 41 insertions(+), 31 deletions(-)
+
+diff --git a/mmc.h b/mmc.h
+index 285c1f1..a4cbba4 100644
+--- a/mmc.h
++++ b/mmc.h
+@@ -25,10 +25,12 @@
+ /* From kernel linux/mmc/mmc.h */
+ #define MMC_SWITCH 6 /* ac [31:0] See below R1b */
+ #define MMC_SEND_EXT_CSD 8 /* adtc R1 */
++#define MMC_STOP_TRANSMISSION 12 /* ac R1b */
+ #define MMC_SEND_STATUS 13 /* ac [31:16] RCA R1 */
+ #define R1_SWITCH_ERROR (1 << 7) /* sx, c */
+ #define MMC_SWITCH_MODE_WRITE_BYTE 0x03 /* Set target to value */
+ #define MMC_READ_MULTIPLE_BLOCK 18 /* adtc [31:0] data addr R1 */
++#define MMC_SET_BLOCK_COUNT 23 /* adtc [31:0] data addr R1 */
+ #define MMC_WRITE_BLOCK 24 /* adtc [31:0] data addr R1 */
+ #define MMC_WRITE_MULTIPLE_BLOCK 25 /* adtc R1 */
+ #define MMC_SET_WRITE_PROT 28 /* ac [31:0] data addr R1b */
+diff --git a/mmc_cmds.c b/mmc_cmds.c
+index 9402112..0a3788a 100644
+--- a/mmc_cmds.c
++++ b/mmc_cmds.c
+@@ -2424,12 +2424,13 @@ int do_ffu(int nargs, char **argv)
+ int sect_done = 0, retry = 3, ret = -EINVAL;
+ unsigned int sect_size;
+ __u8 ext_csd[512];
+- __u8 *buf;
++ __u8 *buf = NULL;
+ __u32 arg;
+ off_t fw_size;
+ ssize_t chunk_size;
+ char *device;
+- struct mmc_ioc_multi_cmd *multi_cmd;
++ struct mmc_ioc_multi_cmd *multi_cmd = NULL;
++ __u32 blocks = 1;
+
+ if (nargs != 3) {
+ fprintf(stderr, "Usage: ffu <image name> </path/to/mmcblkX> \n");
+@@ -2449,14 +2450,6 @@ int do_ffu(int nargs, char **argv)
+ exit(1);
+ }
+
+- buf = malloc(512);
+- multi_cmd = calloc(1, sizeof(struct mmc_ioc_multi_cmd) +
+- 3 * sizeof(struct mmc_ioc_cmd));
+- if (!buf || !multi_cmd) {
+- perror("failed to allocate memory");
+- goto out;
+- }
+-
+ ret = read_extcsd(dev_fd, ext_csd);
+ if (ret) {
+ fprintf(stderr, "Could not read EXT_CSD from %s\n", device);
+@@ -2481,9 +2474,17 @@ int do_ffu(int nargs, char **argv)
+ }
+
+ fw_size = lseek(img_fd, 0, SEEK_END);
++ if (fw_size > MMC_IOC_MAX_BYTES || fw_size == 0) {
++ fprintf(stderr, "Wrong firmware size");
++ goto out;
++ }
+
+- if (fw_size == 0) {
+- fprintf(stderr, "Firmware image is empty");
++ /* allocate maximum required */
++ buf = malloc(fw_size);
++ multi_cmd = calloc(1, sizeof(struct mmc_ioc_multi_cmd) +
++ 4 * sizeof(struct mmc_ioc_cmd));
++ if (!buf || !multi_cmd) {
++ perror("failed to allocate memory");
+ goto out;
+ }
+
+@@ -2493,14 +2494,19 @@ int do_ffu(int nargs, char **argv)
+ goto out;
+ }
+
++ /* calculate required fw blocks for CMD25 */
++ blocks = fw_size / sect_size;
++
+ /* set CMD ARG */
+ arg = ext_csd[EXT_CSD_FFU_ARG_0] |
+ ext_csd[EXT_CSD_FFU_ARG_1] << 8 |
+ ext_csd[EXT_CSD_FFU_ARG_2] << 16 |
+ ext_csd[EXT_CSD_FFU_ARG_3] << 24;
+
++ /* prepare multi_cmd for FFU based on cmd to be used */
++
+ /* prepare multi_cmd to be sent */
+- multi_cmd->num_of_cmds = 3;
++ multi_cmd->num_of_cmds = 4;
+
+ /* put device into ffu mode */
+ multi_cmd->cmds[0].opcode = MMC_SWITCH;
+@@ -2511,37 +2517,42 @@ int do_ffu(int nargs, char **argv)
+ multi_cmd->cmds[0].flags = MMC_RSP_SPI_R1B | MMC_RSP_R1B | MMC_CMD_AC;
+ multi_cmd->cmds[0].write_flag = 1;
+
++ /* send block count */
++ multi_cmd->cmds[1].opcode = MMC_SET_BLOCK_COUNT;
++ multi_cmd->cmds[1].arg = blocks;
++ multi_cmd->cmds[1].flags = MMC_RSP_SPI_R1 | MMC_RSP_R1 | MMC_CMD_AC;
++
+ /* send image chunk */
+- multi_cmd->cmds[1].opcode = MMC_WRITE_BLOCK;
+- multi_cmd->cmds[1].blksz = sect_size;
+- multi_cmd->cmds[1].blocks = 1;
+- multi_cmd->cmds[1].arg = arg;
+- multi_cmd->cmds[1].flags = MMC_RSP_SPI_R1 | MMC_RSP_R1 | MMC_CMD_ADTC;
+- multi_cmd->cmds[1].write_flag = 1;
+- mmc_ioc_cmd_set_data(multi_cmd->cmds[1], buf);
++ multi_cmd->cmds[2].opcode = MMC_WRITE_MULTIPLE_BLOCK;
++ multi_cmd->cmds[2].blksz = sect_size;
++ multi_cmd->cmds[2].blocks = blocks;
++ multi_cmd->cmds[2].arg = arg;
++ multi_cmd->cmds[2].flags = MMC_RSP_SPI_R1 | MMC_RSP_R1 | MMC_CMD_ADTC;
++ multi_cmd->cmds[2].write_flag = 1;
++ mmc_ioc_cmd_set_data(multi_cmd->cmds[2], buf);
+
+ /* return device into normal mode */
+- multi_cmd->cmds[2].opcode = MMC_SWITCH;
+- multi_cmd->cmds[2].arg = (MMC_SWITCH_MODE_WRITE_BYTE << 24) |
++ multi_cmd->cmds[3].opcode = MMC_SWITCH;
++ multi_cmd->cmds[3].arg = (MMC_SWITCH_MODE_WRITE_BYTE << 24) |
+ (EXT_CSD_MODE_CONFIG << 16) |
+ (EXT_CSD_NORMAL_MODE << 8) |
+ EXT_CSD_CMD_SET_NORMAL;
+- multi_cmd->cmds[2].flags = MMC_RSP_SPI_R1B | MMC_RSP_R1B | MMC_CMD_AC;
+- multi_cmd->cmds[2].write_flag = 1;
++ multi_cmd->cmds[3].flags = MMC_RSP_SPI_R1B | MMC_RSP_R1B | MMC_CMD_AC;
++ multi_cmd->cmds[3].write_flag = 1;
+
+ do_retry:
+ /* read firmware chunk */
+ lseek(img_fd, 0, SEEK_SET);
+- chunk_size = read(img_fd, buf, 512);
++ chunk_size = read(img_fd, buf, fw_size);
+
+- while (chunk_size > 0) {
++ if (chunk_size > 0) {
+ /* send ioctl with multi-cmd */
+ ret = ioctl(dev_fd, MMC_IOC_MULTI_CMD, multi_cmd);
+
+ if (ret) {
+ perror("Multi-cmd ioctl");
+ /* In case multi-cmd ioctl failed before exiting from ffu mode */
+- ioctl(dev_fd, MMC_IOC_CMD, &multi_cmd->cmds[2]);
++ ioctl(dev_fd, MMC_IOC_CMD, &multi_cmd->cmds[3]);
+ goto out;
+ }
+
+@@ -2568,9 +2579,6 @@ do_retry:
+ } else {
+ fprintf(stderr, "Programmed %d/%jd bytes\r", sect_done * sect_size, (intmax_t)fw_size);
+ }
+-
+- /* read the next firmware chunk (if any) */
+- chunk_size = read(img_fd, buf, 512);
+ }
+
+ if ((sect_done * sect_size) == fw_size) {
+@@ -2607,7 +2615,7 @@ do_retry:
+ if (ret) {
+ perror("Multi-cmd ioctl failed setting install mode");
+ /* In case multi-cmd ioctl failed before exiting from ffu mode */
+- ioctl(dev_fd, MMC_IOC_CMD, &multi_cmd->cmds[2]);
++ ioctl(dev_fd, MMC_IOC_CMD, &multi_cmd->cmds[3]);
+ goto out;
+ }
+
+--
+2.17.1
+
+++ /dev/null
---- a/Makefile
-+++ b/Makefile
-@@ -1,5 +1,5 @@
- CC ?= gcc
--AM_CFLAGS = -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-+AM_CFLAGS = -D_FILE_OFFSET_BITS=64
- CFLAGS ?= -g -O2
- objects = \
- mmc.o \
include $(TOPDIR)/rules.mk
PKG_NAME:=moreutils
-PKG_VERSION:=0.62
+PKG_VERSION:=0.63
PKG_RELEASE:=1
-PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://git.kitenet.net/index.cgi/moreutils.git/snapshot
-PKG_HASH:=812ac4e9e09dbfb812c64fb1929ed5275c279312d78e3fe1c30b01380c902db9
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)_$(PKG_VERSION)
+PKG_HASH:=4fc86d56a8a276a0cec71cdabda5ccca50c7a44a2a1ccd888476741d1ce6831d
PKG_MAINTAINER:=Nikil Mehta <nikil.mehta@gmail.com>
PKG_LICENSE:=GPL-2.0
include $(TOPDIR)/rules.mk
PKG_NAME:=nano
-PKG_VERSION:=3.2
+PKG_VERSION:=4.3
PKG_RELEASE:=1
-PKG_LICENSE:=GPL-3.0+
-PKG_LICENSE_FILES:=COPYING
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@GNU/nano
-PKG_HASH:=d12773af3589994b2e4982c5792b07c6240da5b86c5aef2103ab13b401fe6349
+PKG_HASH:=00d3ad1a287a85b4bf83e5f06cedd0a9f880413682bebd52b4b1e2af8cfc0d81
+
+PKG_LICENSE:=GPL-3.0+
+PKG_LICENSE_FILES:=COPYING
+PKG_MAINTAINER:=Jonathan Bennett <JBennett@incomsystems.biz>, Hannu Nyman <hannu.nyman@iki.fi>
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
SECTION:=utils
CATEGORY:=Utilities
TITLE:=An enhanced clone of the Pico text editor
- URL:=http://www.nano-editor.org/
- MAINTAINER:=Jonathan Bennett <JBennett@incomsystems.biz>, \
- Hannu Nyman <hannu.nyman@iki.fi>
+ URL:=https://www.nano-editor.org/
DEPENDS:=+libncurses
endef
include $(TOPDIR)/rules.mk
PKG_NAME:=ncdu
-PKG_VERSION:=1.13
+PKG_VERSION:=1.14
PKG_RELEASE=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://dev.yorhel.nl/download
-PKG_HASH:=f4d9285c38292c2de05e444d0ba271cbfe1a705eee37c2b23ea7c448ab37255a
+PKG_HASH:=c694783aab21e27e64baad314b7c1ff34541bfa219fe9645ef6780f1c5558c44
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
include $(TOPDIR)/rules.mk
PKG_NAME:=ntfs-3g
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_VERSION:=2017.3.23
PKG_SOURCE:=$(PKG_NAME)_ntfsprogs-$(PKG_VERSION).tgz
etc.) it makes sense to activate this option and save some kilobytes
of space.
+config PACKAGE_NTFS-3G_HAS_PROBE
+ bool "install the ntfs-3g.probe utility"
+ depends on PACKAGE_ntfs-3g
+ default y
endef
define Package/ntfs-3g-low
define Package/ntfs-3g/install
$(INSTALL_DIR) $(1)/usr/bin
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ntfs-3g{,.probe} $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ntfs-3g $(1)/usr/bin/
+ $(if $(CONFIG_PACKAGE_NTFS-3G_HAS_PROBE),$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ntfs-3g.probe $(1)/usr/bin/,)
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libntfs-3g.so.* $(1)/usr/lib/
$(INSTALL_DIR) $(1)/sbin
PKG_NAME:=oath-toolkit
PKG_VERSION:=2.6.2
-PKG_RELEASE:=2
+PKG_RELEASE:=4
PKG_SOURCE:=oath-toolkit-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SAVANNAH/oath-toolkit
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/oathtool $(1)/usr/bin/
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/liboath.so* $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/liboath.so* $(1)/usr/lib/
endef
$(eval $(call BuildPackage,oath-toolkit))
return ((fp->_flags & _IO_NO_WRITES) != 0
|| ((fp->_flags & (_IO_NO_READS | _IO_CURRENTLY_PUTTING)) == 0
&& fp->_IO_read_base != NULL));
-diff --git a/liboath/gl/fseeko.c b/liboath/gl/fseeko.c
-index 67bb9ec..5616221 100644
---- a/liboath/gl/fseeko.c
-+++ b/liboath/gl/fseeko.c
-@@ -47,7 +47,7 @@ fseeko (FILE *fp, off_t offset, int whence)
- #endif
-
- /* These tests are based on fpurge.c. */
--#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
-+#if defined _IO_ftrylockfile || __GNU_LIBRARY__ /* GNU libc, BeOS, Haiku, Linux libc5 */
- if (fp->_IO_read_end == fp->_IO_read_ptr
- && fp->_IO_write_ptr == fp->_IO_write_base
- && fp->_IO_save_base == NULL)
-@@ -123,7 +123,7 @@ fseeko (FILE *fp, off_t offset, int whence)
- return -1;
- }
-
--#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
-+#if defined _IO_ftrylockfile || __GNU_LIBRARY__ /* GNU libc, BeOS, Haiku, Linux libc5 */
- fp->_flags &= ~_IO_EOF_SEEN;
- fp->_offset = pos;
- #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
diff --git a/liboath/gl/stdio-impl.h b/liboath/gl/stdio-impl.h
index 4c02c9f..393ef0c 100644
--- a/liboath/gl/stdio-impl.h
--- /dev/null
+#
+# Copyright (C) 2018 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=open-vm-tools
+PKG_VERSION:=10.3.10
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-12406962.tar.gz
+PKG_SOURCE_URL:=https://github.com/vmware/open-vm-tools/releases/download/stable-$(PKG_VERSION)
+PKG_HASH:=a3c02595c802680be258d6249513c76502d383a59597079b10984bb9136dbef5
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-12406962
+PKG_INSTALL:=1
+
+PKG_FIXUP:=autoreconf
+PKG_LICENSE:=LGPL-2.1
+PKG_LICENSE_FILES:=LICENSE
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/open-vm-tools
+ SECTION:=utils
+ CATEGORY:=Utilities
+ DEPENDS:=@TARGET_x86 +glib2 +libpthread +libtirpc
+ TITLE:=open-vm-tools
+ URL:=https://github.com/vmware/open-vm-tools
+ MAINTAINER:=Yuhei OKAWA <tochiro.srchack@gmail.com>
+endef
+
+define Package/open-vm-tools-vm-tools/description
+ Open Virtual Machine Tools for VMware guest OS
+endef
+
+
+CONFIGURE_ARGS+= \
+ --without-icu \
+ --disable-multimon \
+ --disable-docs \
+ --disable-tests \
+ --without-gtkmm \
+ --without-gtkmm3 \
+ --without-xerces \
+ --without-pam \
+ --disable-grabbitmqproxy \
+ --disable-vgauth \
+ --disable-deploypkg \
+ --without-root-privileges \
+ --without-kernel-modules \
+ --without-dnet \
+ --with-tirpc \
+ --without-x \
+ --without-gtk2 \
+ --without-gtk3 \
+ --without-xerces \
+ --enable-resolutionkms=no
+
+
+define Package/open-vm-tools/install
+ $(INSTALL_DIR) $(1)/etc/init.d/
+ $(INSTALL_BIN) ./files/vmtoolsd.init $(1)/etc/init.d/vmtoolsd
+
+ $(INSTALL_DIR) $(1)/etc/vmware-tools/
+ $(INSTALL_DATA) ./files/tools.conf $(1)/etc/vmware-tools/
+ $(CP) $(PKG_INSTALL_DIR)/etc/vmware-tools $(1)/etc/
+
+ $(INSTALL_DIR) $(1)/bin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vmtoolsd $(1)/bin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vmware-checkvm $(1)/bin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vmware-hgfsclient $(1)/bin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vmware-namespace-cmd $(1)/bin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vmware-rpctool $(1)/bin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vmware-toolbox-cmd $(1)/bin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vmware-xferlogs $(1)/bin/
+
+ $(INSTALL_DIR) $(1)/sbin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/mount.vmhgfs $(1)/sbin/
+ $(INSTALL_BIN) ./files/shutdown $(1)/sbin/
+
+ $(INSTALL_DIR) $(1)/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libguestlib.so* $(1)/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libhgfs.so* $(1)/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libvmtools.so* $(1)/lib/
+
+ $(INSTALL_DIR) $(1)/usr/lib/open-vm-tools/plugins/common/
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/open-vm-tools/plugins/common/libhgfsServer.so $(1)/usr/lib/open-vm-tools/plugins/common/
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/open-vm-tools/plugins/common/libvix.so $(1)/usr/lib/open-vm-tools/plugins/common/
+
+ $(INSTALL_DIR) $(1)/usr/lib/open-vm-tools/plugins/vmsvc/
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/open-vm-tools/plugins/vmsvc/libguestInfo.so $(1)/usr/lib/open-vm-tools/plugins/vmsvc/
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/open-vm-tools/plugins/vmsvc/libpowerOps.so $(1)/usr/lib/open-vm-tools/plugins/vmsvc/
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/open-vm-tools/plugins/vmsvc/libtimeSync.so $(1)/usr/lib/open-vm-tools/plugins/vmsvc/
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/open-vm-tools/plugins/vmsvc/libvmbackup.so $(1)/usr/lib/open-vm-tools/plugins/vmsvc/
+
+ $(INSTALL_DIR) $(1)/etc/hotplug.d/block/
+ $(INSTALL_BIN) ./files/vmware-scsi.hotplug $(1)/etc/hotplug.d/block/80-vmware-scsi
+
+ $(INSTALL_DIR) $(1)/usr/share/open-vm-tools/messages/de/
+ $(CP) $(PKG_INSTALL_DIR)/usr/share/open-vm-tools/messages/de/toolboxcmd.vmsg $(1)/usr/share/open-vm-tools/messages/de/
+ $(CP) $(PKG_INSTALL_DIR)/usr/share/open-vm-tools/messages/de/vmtoolsd.vmsg $(1)/usr/share/open-vm-tools/messages/de/
+ $(INSTALL_DIR) $(1)/usr/share/open-vm-tools/messages/ko/
+ $(CP) $(PKG_INSTALL_DIR)/usr/share/open-vm-tools/messages/ko/toolboxcmd.vmsg $(1)/usr/share/open-vm-tools/messages/ko/
+ $(CP) $(PKG_INSTALL_DIR)/usr/share/open-vm-tools/messages/ko/vmtoolsd.vmsg $(1)/usr/share/open-vm-tools/messages/ko/
+ $(INSTALL_DIR) $(1)/usr/share/open-vm-tools/messages/zh_CN/
+ $(CP) $(PKG_INSTALL_DIR)/usr/share/open-vm-tools/messages/zh_CN/toolboxcmd.vmsg $(1)/usr/share/open-vm-tools/messages/zh_CN/
+ $(INSTALL_DIR) $(1)/usr/share/open-vm-tools/messages/ja/
+ $(CP) $(PKG_INSTALL_DIR)/usr/share/open-vm-tools/messages/ja/toolboxcmd.vmsg $(1)/usr/share/open-vm-tools/messages/ja/
+ $(CP) $(PKG_INSTALL_DIR)/usr/share/open-vm-tools/messages/ja/vmtoolsd.vmsg $(1)/usr/share/open-vm-tools/messages/ja/
+endef
+
+$(eval $(call BuildPackage,open-vm-tools))
--- /dev/null
+#!/bin/sh
+#compatibility script for openvmtools
+
+if [ "$1" == "-r" ]; then
+ /sbin/reboot
+else
+ /sbin/poweroff
+fi
--- /dev/null
+[guestinfo]
+disable-perf-mon=1
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=10
+
+USE_PROCD=1
+PROG=/bin/vmtoolsd
+
+start_service() {
+ procd_open_instance
+ procd_set_param command "$PROG"
+ procd_set_param respawn
+ procd_close_instance
+}
--- /dev/null
+#!/bin/sh
+
+if [ "$DEVTYPE" = disk ]; then
+ if [ "$ACTION" = add ]; then
+ vendor=`cat /sys/block/$DEVNAME/device/vendor`
+ case "$vendor" in
+ "VMware"*)
+ model=`cat /sys/block/$DEVNAME/device/model`
+ case "$model" in
+ "Virtual disk"*)
+ echo 180 > /sys/block/$DEVNAME/device/timeout
+ ;;
+ "VMware Virtual S")
+ echo 180 > /sys/block/$DEVNAME/device/timeout
+ ;;
+ esac
+ ;;
+ esac
+ fi
+fi
--- /dev/null
+diff -urN a/configure.ac b/configure.ac
+--- a/configure.ac
++++ b/configure.ac
+@@ -949,7 +949,7 @@
+ AC_VMW_CHECK_LIB([dnet],
+ [DNET],
+ [],
+- [dnet-config],
++ [],
+ [],
+ [dnet.h],
+ [intf_open],
+@@ -959,7 +959,7 @@
+
+ if test $have_dnet = "no"; then
+ AC_MSG_ERROR(
+- [dnet-config was not found on your PATH. Please configure without dnet (using --without-dnet) or install dnet - http://libdnet.sourceforge.net])
++ [dnet was not found. Please configure without dnet (using --without-dnet) or install dnet - http://libdnet.sourceforge.net])
+ fi
+ fi
+
--- /dev/null
+diff -urN a/lib/wiper/wiperPosix.c b/lib/wiper/wiperPosix.c
+--- a/lib/wiper/wiperPosix.c
++++ b/lib/wiper/wiperPosix.c
+@@ -43,6 +43,9 @@
+ # include <libgen.h>
+ # endif /* __FreeBSD_version >= 500000 */
+ #endif
++#if defined(__linux__)
++#include <sys/sysmacros.h>
++#endif
+ #include <unistd.h>
+
+ #include "vmware.h"
--- /dev/null
+diff -urN a/configure.ac b/configure.ac
+--- a/configure.ac
++++ b/configure.ac
+@@ -1208,6 +1208,7 @@
+ AC_TYPE_PID_T
+ AC_TYPE_SIZE_T
+ AC_CHECK_MEMBERS([struct stat.st_rdev])
++AC_CHECK_MEMBERS([struct timespec.tv_sec],[],[],[[#include <time.h>]])
+ AC_HEADER_TIME
+ AC_STRUCT_TM
+ AC_C_VOLATILE
+diff -urN a/lib/include/hgfsUtil.h b/lib/include/hgfsUtil.h
+--- a/lib/include/hgfsUtil.h
++++ b/lib/include/hgfsUtil.h
+@@ -53,13 +53,7 @@
+ # include <time.h>
+ # endif
+ # include "vm_basic_types.h"
+-# if !defined _STRUCT_TIMESPEC && \
+- !defined _TIMESPEC_DECLARED && \
+- !defined __timespec_defined && \
+- !defined sun && \
+- !defined __FreeBSD__ && \
+- !__APPLE__ && \
+- !defined _WIN32
++# if !defined HAVE_STRUCT_TIMESPEC_TV_SEC
+ struct timespec {
+ time_t tv_sec;
+ long tv_nsec;
--- /dev/null
+diff -urN a/lib/hgfsServer/hgfsServerLinux.c b/lib/hgfsServer/hgfsServerLinux.c
+--- a/lib/hgfsServer/hgfsServerLinux.c
++++ b/lib/hgfsServer/hgfsServerLinux.c
+@@ -105,11 +105,13 @@
+ #endif
+
+ /*
+- * ALLPERMS (mode 07777) and ACCESSPERMS (mode 0777) are not defined in the
+- * Solaris version of <sys/stat.h>.
++ * ALLPERMS (mode 07777) and ACCESSPERMS (mode 0777) are not specified in
++ * POSIX.
+ */
+-#ifdef sun
++#ifndef ACCESSPERMS
+ # define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO)
++#endif
++#ifndef ALLPERMS
+ # define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)
+ #endif
+
+diff -urN a/services/plugins/dndcp/dnd/dndLinux.c b/services/plugins/dndcp/dnd/dndLinux.c
+--- a/services/plugins/dndcp/dnd/dndLinux.c
++++ b/services/plugins/dndcp/dnd/dndLinux.c
+@@ -52,7 +52,7 @@
+
+ #define DND_ROOTDIR_PERMS (S_IRWXU | S_IRWXG | S_IRWXO)
+ #define DND_STAGINGDIR_PERMS (S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH)
+-#ifdef sun
++#ifndef ACCESSPERMS
+ #define ACCESSPERMS (S_IRWXU | S_IRWXG | S_IRWXO)
+ #endif
+ #ifdef __ANDROID__
+@@ -61,7 +61,6 @@
+ */
+ #define NO_SETMNTENT
+ #define NO_ENDMNTENT
+-#define ACCESSPERMS (S_IRWXU | S_IRWXG | S_IRWXO)
+ #endif
+
+
--- /dev/null
+diff -urN a/configure.ac b/configure.ac
+--- a/configure.ac
++++ b/configure.ac
+@@ -897,6 +897,7 @@
+
+ AC_CHECK_FUNCS([ecvt])
+ AC_CHECK_FUNCS([fcvt])
++AC_CHECK_FUNCS([getifaddrs getauxval issetugid __secure_getenv])
+
+ AC_CHECK_FUNC([mkdtemp], [have_mkdtemp=yes])
+
+@@ -1145,10 +1146,13 @@
+ ###
+
+ AC_CHECK_HEADERS([crypt.h])
++AC_CHECK_HEADERS([ifaddrs.h])
+ AC_CHECK_HEADERS([inttypes.h])
+ AC_CHECK_HEADERS([stdint.h])
+ AC_CHECK_HEADERS([stdlib.h])
+ AC_CHECK_HEADERS([wchar.h])
++AC_CHECK_HEADERS([net/if.h])
++AC_CHECK_HEADERS([sys/auxv.h])
+ AC_CHECK_HEADERS([sys/inttypes.h])
+ AC_CHECK_HEADERS([sys/io.h])
+ AC_CHECK_HEADERS([sys/param.h]) # Required to make the sys/user.h check work correctly on FreeBSD
+diff -urN a/lib/misc/idLinux.c b/lib/misc/idLinux.c
+--- a/lib/misc/idLinux.c
++++ b/lib/misc/idLinux.c
+@@ -27,12 +27,9 @@
+ #include <sys/syscall.h>
+ #include <string.h>
+ #include <unistd.h>
+-#ifdef __linux__
+-#if defined(__GLIBC__) && \
+- (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 16))
++#ifdef HAVE_SYS_AUXV_H
+ #include <sys/auxv.h>
+ #endif
+-#endif
+ #ifdef __APPLE__
+ #include <sys/socket.h>
+ #include <TargetConditionals.h>
+@@ -997,31 +994,32 @@
+ static Bool
+ IdIsSetUGid(void)
+ {
+-#if defined(__ANDROID__)
+- /* Android does not have a secure_getenv, so be conservative. */
+- return TRUE;
+-#else
+ /*
+ * We use __secure_getenv, which returns NULL if the binary is
+- * setuid or setgid. Alternatives include,
++ * setuid or setgid, when issetugid or getauxval(AT_SECURE) is not
++ * available. Alternatives include,
+ *
+- * a) getauxval(AT_SECURE); not available until glibc 2.16.
+- * b) __libc_enable_secure; may not be exported.
++ * a) issetugid(); not (yet?) available in glibc.
++ * b) getauxval(AT_SECURE); not available until glibc 2.16.
++ * c) __libc_enable_secure; may not be exported.
+ *
+- * Use (a) when we are based on glibc 2.16, or newer.
++ * Use (b) when we are based on glibc 2.16, or newer.
+ */
+
+-#if defined(__GLIBC__) && \
+- (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 16))
++#if HAVE_ISSETUGID
++ return issetugid();
++#elif HAVE_GETAUXVAL
+ return getauxval(AT_SECURE) != 0;
+-#else
++#elif HAVE___SECURE_GETENV
+ static const char envName[] = "VMW_SETUGID_TEST";
+
+ if (setenv(envName, "1", TRUE) == -1) {
+ return TRUE; /* Conservative */
+ }
+ return __secure_getenv(envName) == NULL;
+-#endif
++#else
++ /* Android does not have a secure_getenv, so be conservative. */
++ return TRUE;
+ #endif
+ }
+ #endif
+diff -urN a/lib/nicInfo/nicInfoPosix.c b/lib/nicInfo/nicInfoPosix.c
+--- a/lib/nicInfo/nicInfoPosix.c
++++ b/lib/nicInfo/nicInfoPosix.c
+@@ -34,9 +34,13 @@
+ #include <sys/socket.h>
+ #include <sys/stat.h>
+ #include <errno.h>
+-#if defined(__FreeBSD__) || defined(__APPLE__)
++#if HAVE_SYS_SYSCTL_H
+ # include <sys/sysctl.h>
++#endif
++#if HAVE_IFADDRS_H
+ # include <ifaddrs.h>
++#endif
++#if HAVE_NET_IF_H
+ # include <net/if.h>
+ #endif
+ #ifndef NO_DNET
--- /dev/null
+diff -urN a/services/plugins/vix/vixTools.c b/services/plugins/vix/vixTools.c
+--- a/services/plugins/vix/vixTools.c
++++ b/services/plugins/vix/vixTools.c
+@@ -66,7 +66,7 @@
+ #include <unistd.h>
+ #endif
+
+-#if defined(sun) || defined(__FreeBSD__) || defined(__APPLE__)
++#ifdef HAVE_SYS_STAT_H
+ #include <sys/stat.h>
+ #endif
+
--- /dev/null
+diff -urN a/lib/asyncsocket/asyncsocket.c b/lib/asyncsocket/asyncsocket.c
+--- a/lib/asyncsocket/asyncsocket.c
++++ b/lib/asyncsocket/asyncsocket.c
+@@ -69,8 +69,8 @@
+ #else
+ #include <stddef.h>
+ #include <ctype.h>
++#include <poll.h>
+ #include <sys/types.h>
+-#include <sys/poll.h>
+ #include <sys/socket.h>
+ #include <sys/un.h>
+ #include <netdb.h>
--- /dev/null
+diff --git a/lib/asyncsocket/asyncsocket.c b/lib/asyncsocket/asyncsocket.c
+index e0a68e7e..b9675674 100644
+--- a/lib/asyncsocket/asyncsocket.c
++++ b/lib/asyncsocket/asyncsocket.c
+@@ -86,7 +86,7 @@
+ #include "random.h"
+ #include "asyncsocket.h"
+ #include "asyncSocketBase.h"
+-#include "poll.h"
++#include "vm_poll.h"
+ #include "log.h"
+ #include "err.h"
+ #include "hostinfo.h"
+diff --git a/lib/hgfsServer/hgfsServer.c b/lib/hgfsServer/hgfsServer.c
+index 991a7941..ed0c09f9 100644
+--- a/lib/hgfsServer/hgfsServer.c
++++ b/lib/hgfsServer/hgfsServer.c
+@@ -48,7 +48,7 @@
+ #include "hgfsServerOplock.h"
+ #include "hgfsDirNotify.h"
+ #include "userlock.h"
+-#include "poll.h"
++#include "vm_poll.h"
+ #include "mutexRankLib.h"
+ #include "vm_basic_asm.h"
+ #include "unicodeOperations.h"
+diff --git a/lib/include/asyncsocket.h b/lib/include/asyncsocket.h
+index 524147ea..103f944f 100644
+--- a/lib/include/asyncsocket.h
++++ b/lib/include/asyncsocket.h
+@@ -164,7 +164,7 @@ typedef struct AsyncSocket AsyncSocket;
+ * Or the client can specify its favorite poll class and locking behavior.
+ * Use of IVmdbPoll is only supported for regular sockets and for Attach.
+ */
+-#include "poll.h"
++#include "vm_poll.h"
+ struct IVmdbPoll;
+ typedef struct AsyncSocketPollParams {
+ int flags; /* Default 0, only POLL_FLAG_NO_BULL is valid */
+diff --git a/lib/include/pollImpl.h b/lib/include/pollImpl.h
+index 46442e55..8bc66997 100644
+--- a/lib/include/pollImpl.h
++++ b/lib/include/pollImpl.h
+@@ -44,7 +44,7 @@
+ #define INCLUDE_ALLOW_USERLEVEL
+ #include "includeCheck.h"
+
+-#include "poll.h"
++#include "vm_poll.h"
+ #include "vm_basic_asm.h"
+
+ #if defined(__cplusplus)
+diff --git a/lib/include/poll.h b/lib/include/vm_poll.h
+similarity index 99%
+rename from a/lib/include/poll.h
+rename to a/lib/include/vm_poll.h
+index 988fe6d0..e9e74fb5 100644
+--- a/lib/include/poll.h
++++ b/lib/include/vm_poll.h
+@@ -60,7 +60,7 @@ extern "C" {
+ #if !defined(TARGET_OS_IPHONE) || TARGET_OS_IPHONE == 0
+ #include <sys/kernel.h>
+ #endif
+-#include <sys/poll.h>
++#include <poll.h>
+ #define HZ 100
+ #endif
+ #ifdef __ANDROID__
+diff --git a/lib/rpcIn/rpcin.c b/lib/rpcIn/rpcin.c
+index c2c51583..d6c62f10 100644
+--- a/lib/rpcIn/rpcin.c
++++ b/lib/rpcIn/rpcin.c
+@@ -57,7 +57,7 @@
+
+ #if defined(VMTOOLS_USE_VSOCKET)
+ # include <glib.h>
+-# include "poll.h"
++# include "vm_poll.h"
+ # include "asyncsocket.h"
+ # include "vmci_defs.h"
+ #include "dataMap.h"
+diff --git a/services/plugins/grabbitmqProxy/grabbitmqProxyPlugin.c b/services/plugins/grabbitmqProxy/grabbitmqProxyPlugin.c
+index 03700937..f0b49ad7 100644
+--- a/services/plugins/grabbitmqProxy/grabbitmqProxyPlugin.c
++++ b/services/plugins/grabbitmqProxy/grabbitmqProxyPlugin.c
+@@ -48,7 +48,7 @@
+ #include "rpcout.h"
+ #include "rabbitmqProxyConst.h"
+ #include "vm_basic_types.h"
+-#include "poll.h"
++#include "vm_poll.h"
+ #ifdef OPEN_VM_TOOLS
+ #include "vmci_sockets.h"
+ #include "sslDirect.h"
--- /dev/null
+diff -urN a/lib/err/errPosix.c b/lib/err/errPosix.c
+--- a/lib/err/errPosix.c
++++ b/lib/err/errPosix.c
+@@ -31,6 +31,7 @@
+ #include <errno.h>
+ #include <string.h>
+ #include <locale.h>
++#include <stdio.h>
+
+ #include "vmware.h"
+ #include "errInt.h"
+@@ -63,11 +64,13 @@
+ {
+ char *p;
+
+-#if defined(__linux__) && !defined(__ANDROID__)
++#if defined(__GLIBC__) && !defined(__ANDROID__)
+ p = strerror_r(errorNumber, buf, bufSize);
+ #else
+- p = strerror(errorNumber);
+-#endif
++ if (strerror_r(errorNumber, buf, bufSize) != 0)
++ snprintf(buf, bufSize, "unknown error %i", errorNumber);
++ p = buf;
++#endif /* defined __GLIBC__ */
+ ASSERT(p != NULL);
+ return p;
+ }
--- /dev/null
+diff -urN a/lib/hgfsServer/hgfsServerLinux.c b/lib/hgfsServer/hgfsServerLinux.c
+--- a/lib/hgfsServer/hgfsServerLinux.c
++++ b/lib/hgfsServer/hgfsServerLinux.c
+@@ -5294,8 +5294,8 @@
+ goto exit;
+ }
+
+- LOG(6, ("%s: File Size limits: 0x%"FMT64"x 0x%"FMT64"x\n",
+- __FUNCTION__, fileSize.rlim_cur, fileSize.rlim_max));
++ LOG(6, ("%s: File Size limits: 0x%jx 0x%jx\n",
++ __FUNCTION__, (uintmax_t)fileSize.rlim_cur, (uintmax_t)fileSize.rlim_max));
+
+ /*
+ * Check the offset is within the file size range.
--- /dev/null
+diff -urN a/lib/file/fileIOPosix.c b/lib/file/fileIOPosix.c
+--- a/lib/file/fileIOPosix.c
++++ b/lib/file/fileIOPosix.c
+@@ -206,10 +206,10 @@
+ * the symbols (and anyone building XOPEN<700 gets nothing).
+ */
+ extern ssize_t preadv64(int fd, const struct iovec *iov, int iovcnt,
+- __off64_t offset) __attribute__ ((weak));
++ off64_t offset) __attribute__ ((weak));
+
+ extern ssize_t pwritev64(int fd, const struct iovec *iov, int iovcnt,
+- __off64_t offset) __attribute__ ((weak));
++ off64_t offset) __attribute__ ((weak));
+ #else
+ #error "Large file support unavailable. Aborting."
+ #endif
--- /dev/null
+--- a/vmhgfs-fuse/fsutil.h
++++ b/vmhgfs-fuse/fsutil.h
+@@ -32,9 +32,7 @@
+ #include "hgfsProto.h"
+ #include <fuse.h>
+
+-#if defined(__FreeBSD__) || defined(__SOLARIS__) || defined(__APPLE__)
+ typedef long long loff_t;
+-#endif
+
+ /*
+ * Struct used to pass around attributes.
-#
+#
# Copyright (C) 2010 segal.ubi.pt
# Copyright (C) 2014 nunojpg@gmail.com
# Copyright (C) 2015 dev@localnet.hu
include $(TOPDIR)/rules.mk
PKG_NAME:=open2300
-PKG_VERSION:=1.12
-PKG_RELEASE:=5
-PKG_LICENSE:=GPL-2.0+
-PKG_LICENSE_FILES:=COPYING
+PKG_SOURCE_DATE:=2014-03-04
+PKG_SOURCE_VERSION:=1af8ae609da66f8e1b745533c19095c9758bfb0b
+PKG_RELEASE:=1
-PKG_SOURCE_PROTO:=svn
-PKG_SOURCE_URL:=http://www.lavrsen.dk/svn/open2300/trunk
-PKG_SOURCE_VERSION:=r12
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_CHECK_FORMAT_SECURITY:=0
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/wezm/open2300
+PKG_MIRROR_HASH:=3287ca1c70e736dd1c6c3abb01e0d986f91573c7c54b9adabdc437309dc4fd56
PKG_MAINTAINER:=Gabor SZOLLOSI <dev@localnet.hu>
+PKG_LICENSE:=GPL-2.0-or-later
+PKG_LICENSE_FILES:=COPYING
include $(INCLUDE_DIR)/package.mk
This is an utility suite used to communicate with and collect data from a WS23XX wheather station.
endef
-MAKE_FLAGS += \
- CFLAGS="$(TARGET_CFLAGS) -DVERSION=\"$(PKG_VERSION)\""
-
define Package/open2300/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bin2300 $(1)/usr/bin/
+++ /dev/null
---- a/Makefile
-+++ b/Makefile
-@@ -15,87 +15,82 @@
- prefix = /usr/local
- exec_prefix = ${prefix}
- bindir = ${exec_prefix}/bin
-+libdir = ${prefix}/lib
-
- #########################################
-
- CC = gcc
--OBJ = open2300.o rw2300.o linux2300.o win2300.o
--LOGOBJ = log2300.o rw2300.o linux2300.o win2300.o
--FETCHOBJ = fetch2300.o rw2300.o linux2300.o win2300.o
--WUOBJ = wu2300.o rw2300.o linux2300.o win2300.o
--CWOBJ = cw2300.o rw2300.o linux2300.o win2300.o
--DUMPOBJ = dump2300.o rw2300.o linux2300.o win2300.o
--HISTOBJ = history2300.o rw2300.o linux2300.o win2300.o
--HISTLOGOBJ = histlog2300.o rw2300.o linux2300.o win2300.o
--DUMPBINOBJ = bin2300.o rw2300.o linux2300.o win2300.o
--XMLOBJ = xml2300.o rw2300.o linux2300.o win2300.o
--PGSQLOBJ = pgsql2300.o rw2300.o linux2300.o win2300.o
--LIGHTOBJ = light2300.o rw2300.o linux2300.o win2300.o
--INTERVALOBJ = interval2300.o rw2300.o linux2300.o win2300.o
--MINMAXOBJ = minmax2300.o rw2300.o linux2300.o win2300.o
--MYSQLHISTLOGOBJ = mysqlhistlog2300.o rw2300.o linux2300.o win2300.o
-+LIB = lib2300
-+LIB_C = rw2300.c linux2300.c
-+LIBOBJ = rw2300.o linux2300.o
-
- VERSION = 1.11
-
- CFLAGS = -Wall -O3 -DVERSION=\"$(VERSION)\"
--CC_LDFLAGS = -lm
--CC_WINFLAG =
--# For Windows - comment the two line above and un-comment the two lines below.
--#CC_LDFLAGS = -lm -lwsock32
--#CC_WINFLAG = -mwindows
-+CC_LDFLAGS = -L. -lm -l2300
-+LFLAGS = -shared -Wl,-soname
- INSTALL = install
-+MAKE_EXEC = $(CC) $(CFLAGS) $@.c -o $@ $(CC_LDFLAGS)
-
- ####### Build rules
-
--all: open2300 dump2300 log2300 fetch2300 wu2300 cw2300 history2300 histlog2300 bin2300 xml2300 light2300 interval2300 minmax2300 mysql2300 mysqlhistlog2300
-+all: open2300 dump2300 log2300 fetch2300 wu2300 cw2300 history2300 histlog2300 bin2300 xml2300 light2300 interval2300 minmax2300 #mysql2300 mysqlhistlog2300
-
--open2300 : $(OBJ)
-- $(CC) $(CFLAGS) -o $@ $(OBJ) $(CC_LDFLAGS)
--
--dump2300 : $(DUMPOBJ)
-- $(CC) $(CFLAGS) -o $@ $(DUMPOBJ) $(CC_LDFLAGS)
-+lib2300 :
-+ $(CC) -c -fPIC $(CFLAGS) $(LIB_C)
-+ $(CC) $(LFLAGS),$@.so -o $@.so.$(VERSION) $(LIBOBJ)
-+ ln -sf $@.so.$(VERSION) $@.so
-+
-+open2300 : $(LIB)
-+ $(MAKE_EXEC)
-
--log2300 : $(LOGOBJ)
-- $(CC) $(CFLAGS) -o $@ $(LOGOBJ) $(CC_LDFLAGS) $(CC_WINFLAG)
-+dump2300 : $(LIB)
-+ $(MAKE_EXEC)
-
--fetch2300 : $(FETCHOBJ)
-- $(CC) $(CFLAGS) -o $@ $(FETCHOBJ) $(CC_LDFLAGS)
-+log2300 : $(LIB)
-+ $(MAKE_EXEC)
-
--wu2300 : $(WUOBJ)
-- $(CC) $(CFLAGS) -o $@ $(WUOBJ) $(CC_LDFLAGS) $(CC_WINFLAG)
-+fetch2300 : $(LIB)
-+ $(MAKE_EXEC)
-+
-+srv2300 : $(LIB)
-+ $(MAKE_EXEC)
-+
-+wu2300 : $(LIB)
-+ $(MAKE_EXEC)
-
--cw2300 : $(CWOBJ)
-- $(CC) $(CFLAGS) -o $@ $(CWOBJ) $(CC_LDFLAGS) $(CC_WINFLAG)
-+cw2300 : $(LIB)
-+ $(MAKE_EXEC)
-
--history2300 : $(HISTOBJ)
-- $(CC) $(CFLAGS) -o $@ $(HISTOBJ) $(CC_LDFLAGS)
-+history2300 : $(LIB)
-+ $(MAKE_EXEC)
-
--histlog2300 : $(HISTLOGOBJ)
-- $(CC) $(CFLAGS) -o $@ $(HISTLOGOBJ) $(CC_LDFLAGS) $(CC_WINFLAG)
-+histlog2300 : $(LIB)
-+ $(MAKE_EXEC)
-
--bin2300 : $(DUMPBINOBJ)
-- $(CC) $(CFLAGS) -o $@ $(DUMPBINOBJ) $(CC_LDFLAGS)
-+bin2300 : $(LIB)
-+ $(MAKE_EXEC)
-
--xml2300 : $(XMLOBJ)
-- $(CC) $(CFLAGS) -o $@ $(XMLOBJ) $(CC_LDFLAGS) $(CC_WINFLAG)
-+xml2300 : $(LIB)
-+ $(MAKE_EXEC)
-
--mysql2300:
-- $(CC) $(CFLAGS) -o mysql2300 mysql2300.c rw2300.c linux2300.c $(CC_LDFLAGS) $(CC_WINFLAG) -I/usr/include/mysql -L/usr/lib/mysql -lmysqlclient
-+mysql2300: $(LIB)
-+ $(CC) $(CFLAGS) $@.c -o $@ -I/usr/include/mysql -L/usr/lib/mysql $(CC_LDFLAGS) -lmysqlclient
-
--pgsql2300: $(PGSQLOBJ)
-- $(CC) $(CFLAGS) -o $@ $(PGSQLOBJ) $(CC_LDFLAGS) $(CC_WINFLAG) -I/usr/include/pgsql -L/usr/lib/pgsql -lpq
-+pgsql2300: $(LIB)
-+ $(CC) $(CFLAGS) $@.c -o $@ -I/usr/include/pgsql -L/usr/lib/pgsql $(CC_LDFLAGS) -lpq
-
--light2300: $(LIGHTOBJ)
-- $(CC) $(CFLAGS) -o $@ $(LIGHTOBJ) $(CC_LDFLAGS)
-+light2300: $(LIB)
-+ $(MAKE_EXEC)
-
--interval2300: $(INTERVALOBJ)
-- $(CC) $(CFLAGS) -o $@ $(INTERVALOBJ) $(CC_LDFLAGS)
-+interval2300: $(LIB)
-+ $(MAKE_EXEC)
-
--minmax2300: $(MINMAXOBJ)
-- $(CC) $(CFLAGS) -o $@ $(MINMAXOBJ) $(CC_LDFLAGS) $(CC_WINFLAG)
-+minmax2300: $(LIB)
-+ $(MAKE_EXEC)
-
--mysqlhistlog2300 :
-- $(CC) $(CFLAGS) -o mysqlhistlog2300 mysqlhistlog2300.c rw2300.c linux2300.c $(CC_LDFLAGS) $(CC_WINFLAG) -I/usr/include/mysql -L/usr/lib/mysql -lmysqlclient
-+mysqlhistlog2300 : $(LIB)
-+ $(CC) $(CFLAGS) $@.c -o $@ -I/usr/include/mysql -L/usr/lib/mysql $(CC_LDFLAGS) -lmysqlclient
-
-
- install:
PKG_NAME:=openocd
PKG_SOURCE_VERSION:=0.10.0
PKG_VERSION:=v$(PKG_SOURCE_VERSION)
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE_URL:=@SF/openocd
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.bz2
PKG_LICENSE_FILES:=COPYING
PKG_MAINTAINER:=Paul Fertser <fercerpav@gmail.com>
+PKG_CPE_ID:=cpe:/a:openocd:open_on-chip_debugger
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
--- /dev/null
+Subject: Bind to IPv4 localhost by default
+Origin: other, http://openocd.zylin.com/#/c/4331/2
+Last-Update: 2018-01-18
+
+From f8630b0b15e30dc6c51270006a4e075c79cf466a Mon Sep 17 00:00:00 2001
+From: Paul Fertser <fercerpav@gmail.com>
+Date: Sat, 13 Jan 2018 16:22:10 +0300
+Subject: [PATCH] server: bind to IPv4 localhost by default
+
+Since OpenOCD basically allows to perform arbitrary actions on behalf of
+the running user, it makes sense to restrict the exposure by default.
+
+If you need network connectivity and your environment is safe enough,
+use "bindto 0.0.0.0" to switch to the old behaviour.
+
+Change-Id: I4a4044b90d0ecb30118cea96fc92a7bcff0924e0
+Signed-off-by: Paul Fertser <fercerpav@gmail.com>
+---
+
+diff --git a/doc/openocd.texi b/doc/openocd.texi
+index 7f5b72e..5c7f465 100644
+--- a/doc/openocd.texi
++++ b/doc/openocd.texi
+@@ -7017,7 +7017,7 @@
+
+ @deffn Command bindto [name]
+ Specify address by name on which to listen for incoming TCP/IP connections.
+-By default, OpenOCD will listen on all available interfaces.
++By default, OpenOCD will listen on the loopback interface only.
+ @end deffn
+
+ @anchor{targetstatehandling}
+diff --git a/src/server/server.c b/src/server/server.c
+index 1e52e97..ea1e898 100644
+--- a/src/server/server.c
++++ b/src/server/server.c
+@@ -259,7 +259,7 @@
+ c->sin.sin_family = AF_INET;
+
+ if (bindto_name == NULL)
+- c->sin.sin_addr.s_addr = INADDR_ANY;
++ c->sin.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
+ else {
+ hp = gethostbyname(bindto_name);
+ if (hp == NULL) {
--- /dev/null
+Subject: Prevent some forms of Cross Protocol Scripting attacks
+Author: Andreas Fritiofson <andreas.fritiofson@gmail.com>
+Origin: other, http://openocd.zylin.com/#/c/4335/
+Bug-Debian: https://bugs.debian.org/887488
+Last-Update: 2018-01-18
+
+From 3a223ca3ebc7ac24d7726a0cd58e5695bc813657 Mon Sep 17 00:00:00 2001
+From: Andreas Fritiofson <andreas.fritiofson@gmail.com>
+Date: Sat, 13 Jan 2018 21:00:47 +0100
+Subject: [PATCH] CVE-2018-5704: Prevent some forms of Cross Protocol Scripting attacks
+
+OpenOCD can be targeted by a Cross Protocol Scripting attack from
+a web browser running malicious code, such as the following PoC:
+
+var x = new XMLHttpRequest();
+x.open("POST", "http://127.0.0.1:4444", true);
+x.send("exec xcalc\r\n");
+
+This mitigation should provide some protection from browser-based
+attacks and is based on the corresponding fix in Redis:
+
+https://github.com/antirez/redis/blob/8075572207b5aebb1385c4f233f5302544439325/src/networking.c#L1758
+
+Change-Id: Ia96ebe19b74b5805dc228bf7364c7971a90a4581
+Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
+Reported-by: Josef Gajdusek <atx@atx.name>
+---
+
+diff --git a/src/server/startup.tcl b/src/server/startup.tcl
+index 64ace40..dd1b31e 100644
+--- a/src/server/startup.tcl
++++ b/src/server/startup.tcl
+@@ -8,3 +8,14 @@
+ # one target
+ reset halt
+ }
++
++proc prevent_cps {} {
++ echo "Possible SECURITY ATTACK detected."
++ echo "It looks like somebody is sending POST or Host: commands to OpenOCD."
++ echo "This is likely due to an attacker attempting to use Cross Protocol Scripting"
++ echo "to compromise your OpenOCD instance. Connection aborted."
++ exit
++}
++
++proc POST {args} { prevent_cps }
++proc Host: {args} { prevent_cps }
PKG_NAME:=owfs
PKG_VERSION:=3.2p3
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/owfs/owfs/releases/download/v$(PKG_VERSION)
DEPENDS:= \
+libpthread \
+LIBOW_MASTER_USB:libusb-compat \
- +LIBOW_MASTER_W1:kmod-w1 \
- +libavahi-client
+ +LIBOW_MASTER_W1:kmod-w1
TITLE:=OWFS - common shared library
endef
--disable-owphp \
--disable-owtcl \
--disable-swig \
+ --disable-avahi \
$(if $(CONFIG_LIBOW_MASTER_USB),--enable-usb,--disable-usb) \
$(if $(CONFIG_LIBOW_MASTER_W1),--enable-w1,--disable-w1) \
$(if $(CONFIG_LIBOW_MASTER_I2C),--enable-i2c,--disable-i2c) \
PKG_NAME:=pciutils
PKG_VERSION:=3.6.2
-PKG_RELEASE:=1
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@KERNEL/software/utils/pciutils
PKG_HASH:=db452ec986edefd88af0d222d22f6102f8030a8633fdfe846c3ae4bde9bb93f3
-PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
+PKG_MAINTAINER:=Lucian Cristian <lucian.cristian@gmail.com>
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING
CATEGORY:=Utilities
TITLE:=Linux PCI Utilities
URL:=http://mj.ucw.cz/pciutils.shtml
- DEPENDS:=+libkmod +zlib
+ DEPENDS:=+libkmod +libpci
endef
define Package/pciutils/description
of PCI devices
endef
-PCI_IDS_VER:=0.319
+define Package/libpci
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=Linux PCI Libraries
+ URL:=http://mj.ucw.cz/pciutils.shtml
+endef
+
+
+PCI_IDS_VER:=0.324
PCI_IDS_FILE:=pci.ids.$(PCI_IDS_VER)
define Download/pci_ids
FILE:=$(PCI_IDS_FILE)
URL_FILE:=pci.ids
URL:=@GITHUB/vcrhonek/hwdata/v$(PCI_IDS_VER)
- HASH:=54154a6955f550b110c6a216943dcd69ba6188e68b80bee6efbaa03ef0df0a5f
+ HASH:=6dba287b4aaafb9582d6139eda22ee6580651b8557828b9598d99078a5f4217e
endef
$(eval $(call Download,pci_ids))
$(CP) $(DL_DIR)/$(PCI_IDS_FILE) $(PKG_BUILD_DIR)/pci.ids
endef
+TARGET_CFLAGS += $(FPIC)
+
MAKE_FLAGS += \
CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
PREFIX="/usr" \
HOST="Linux" \
HWDB="no" \
- ZLIB="yes"
+ ZLIB="no" \
+ SHARED="yes"
ifneq ($(CONFIG_USE_GLIBC),)
TARGET_LDFLAGS += -lresolv
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/lib
- $(CP) $(PKG_BUILD_DIR)/lib/libpci.a $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpci.so.3 \
+ $(PKG_INSTALL_DIR)/usr/lib/libpci.so
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib
+ $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+ $(CP) $(PKG_BUILD_DIR)/lib/libpci.pc $(1)/usr/lib/pkgconfig
$(INSTALL_DIR) $(1)/usr/include/pci
$(CP) $(foreach i,pci.h config.h header.h types.h, \
$(PKG_BUILD_DIR)/lib/$(i)) $(1)/usr/include/pci
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{lspci,setpci,update-pciids} $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/usr/share
- $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/pci.ids.gz $(1)/usr/share/
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/pci.ids $(1)/usr/share/
endef
+define Package/libpci/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
+endef
+
+
+$(eval $(call BuildPackage,libpci))
$(eval $(call BuildPackage,pciutils))
include $(TOPDIR)/rules.mk
PKG_NAME:=pcsc-lite
-PKG_VERSION:=1.8.23
+PKG_VERSION:=1.8.25
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://pcsclite.apdu.fr/files/
-PKG_HASH:=5a27262586eff39cfd5c19aadc8891dd71c0818d3d629539bd631b958be689c9
+PKG_HASH:=d76d79edc31cf76e782b9f697420d3defbcc91778c3c650658086a1b748e8792
PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=COPYING
include $(TOPDIR)/rules.mk
PKG_NAME:=pcsc-tools
-PKG_VERSION=1.5.3
+PKG_VERSION=1.5.4
PKG_RELEASE:=1
PKG_MAINTAINER:=
PKG_LICENSE:=GPL-2.0
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://ludovic.rousseau.free.fr/softwares/pcsc-tools/
-PKG_HASH:=daaa011c28daa00653bd8e2a3d8b0b9f8abae00f7344f50b1a94fbd2b01f1d14
+PKG_HASH:=c39e6abba781895220c68df5e5d2f0f9547c7a676eebec3f1ddcff8794377c93
PKG_FIXUP:=autoreconf
--- /dev/null
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=pigz
+PKG_VERSION:=2.4
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://zlib.net/pigz/
+PKG_HASH:=a4f816222a7b4269bd232680590b579ccc72591f1bb5adafcd7208ca77e14f73
+
+PKG_MAINTAINER:=Ken Wong <xinxijishuwyq@gmail.com>
+PKG_LICENSE:=CUSTOM
+PKG_LICENSE_FILES:=README
+PKG_CPE_ID:=cpe:/a:zlib:pigz
+
+PKG_BUILD_PARALLEL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/pigz
+ SECTION:=utils
+ CATEGORY:=Utilities
+ SUBMENU:=Compression
+ TITLE:=pigz
+ URL:=https://zlib.net/pigz
+ DEPENDS:=+zlib
+endef
+
+define Package/pigz/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/pigz $(1)/usr/bin/pigz
+endef
+
+$(eval $(call BuildPackage,pigz))
+
--- /dev/null
+--- a/Makefile 2019-05-22 19:54:23.980451289 +0800
++++ b/Makefile 2019-06-10 10:32:58.054675929 +0800
+@@ -1,7 +1,7 @@
+-CC=gcc
+-CFLAGS=-O3 -Wall -Wextra -Wno-unknown-pragmas
+-LDFLAGS=
+-LIBS=-lm -lpthread -lz
++CC?=gcc
++CFLAGS?=-O3 -Wall -Wextra -Wno-unknown-pragmas
++LDFLAGS?=
++LIBS?=-lm -lpthread -lz
+ ZOPFLI=zopfli/src/zopfli/
+ ZOP=deflate.o blocksplitter.o tree.o lz77.o cache.o hash.o util.o squeeze.o katajainen.o
+
--- /dev/null
+#
+# Copyright (C) 2019 Lucian Cristain <lucian.cristian@gmail.com>
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=powertop
+PKG_VERSION:=2.10
+PKG_RELEASE:=3
+
+PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://01.org/sites/default/files/downloads/
+PKG_HASH:=d3b7459eaba7d01c8841dd33a3b4d369416c01e9bd8951b0d88234cf18fe4a75
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-v$(PKG_VERSION)
+PKG_MAINTAINER:=Lucian Cristain <lucian.cristian@gmail.com>
+PKG_LICENSE:=GPL-2.0
+
+PKG_BUILD_PARALLEL:=1
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/uclibc++.mk
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/nls.mk
+
+define Package/powertop
+ SECTION:=utils
+ CATEGORY:=Utilities
+ DEPENDS:=$(CXX_DEPENDS) $(INTL_DEPENDS) +libpci +libncursesw +libnl-genl
+ TITLE:=Power consumption monitor
+ URL:=https://01.org/powertop
+endef
+
+define Package/powertop/description
+ PowerTOP is a Linux tool to diagnose issues with power consumption
+ and power management.
+endef
+
+TARGET_CFLAGS += $(FPIC)
+ifeq ($(CONFIG_USE_UCLIBC),y)
+TARGET_CFLAGS += -fno-stack-protector
+endif
+TARGET_LDFLAGS += $(if $(INTL_FULL),-lintl)
+
+CONFIGURE_ARGS += --without-pic
+
+define Package/powertop/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/powertop \
+ $(1)/usr/sbin/
+endef
+
+$(eval $(call BuildPackage,powertop))
--- /dev/null
+--- traceevent/event-parse.c.orig
++++ ./traceevent/event-parse.c
+@@ -5121,12 +5121,17 @@
+ const char *msg;
+
+ if (errnum >= 0) {
++#if defined(__GLIBC__)
+ msg = strerror_r(errnum, buf, buflen);
+ if (msg != buf) {
+ size_t len = strlen(msg);
+ memcpy(buf, msg, min(buflen - 1, len));
+ *(buf + min(buflen - 1, len)) = '\0';
+ }
++#else
++ if (strerror_r(errnum, buf, buflen))
++ snprintf(buf, buflen, "errnum %i", errnum);
++#endif
+ return 0;
+ }
+
--- /dev/null
+From 7235a786ea30ae5ca7c1b3458ef5b2388c08dfd9 Mon Sep 17 00:00:00 2001
+From: Rosen Penev <rosenp@gmail.com>
+Date: Thu, 28 Mar 2019 18:44:27 -0700
+Subject: [PATCH] src/main: Add missing pthread header
+
+Otherwise compilation can fail with:
+
+main.cpp: In function 'void one_measurement(int, int, char*)':
+main.cpp:226:3: error: 'pthread_t' was not declared in this scope
+ pthread_t thread = 0UL;
+ ^~~~~~~~~
+main.cpp:226:3: note: suggested alternative: 'pread'
+ pthread_t thread = 0UL;
+ ^~~~~~~~~
+ pread
+
+et al.
+
+Signed-off-by: Rosen Penev <rosenp@gmail.com>
+---
+ src/main.cpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/main.cpp b/src/main.cpp
+index cbb7a4e..75d4202 100644
+--- a/src/main.cpp
++++ b/src/main.cpp
+@@ -39,6 +39,7 @@
+ #include <locale.h>
+ #include <sys/resource.h>
+ #include <limits.h>
++#include <pthread.h>
+
+ #include "cpu/cpu.h"
+ #include "process/process.h"
+--
+2.17.1
+
--- /dev/null
+From 8cdf846922ffb3e0d2a828be473fdf9c45a56e7c Mon Sep 17 00:00:00 2001
+From: Rosen Penev <rosenp@gmail.com>
+Date: Sat, 30 Mar 2019 20:19:17 -0700
+Subject: [PATCH] intel_cpus.cpp: Change open parameter to const char *
+
+ifstream::open takes std::string starting with C++11, not before.
+
+This fixes compilation with uClibc++ and potentially other older libraries
+
+Signed-off-by: Rosen Penev <rosenp@gmail.com>
+---
+ src/cpu/intel_cpus.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/cpu/intel_cpus.cpp b/src/cpu/intel_cpus.cpp
+index 0030dba..4dffadc 100644
+--- a/src/cpu/intel_cpus.cpp
++++ b/src/cpu/intel_cpus.cpp
+@@ -92,7 +92,7 @@ int is_supported_intel_cpu(int model, int cpu)
+
+ int is_intel_pstate_driver_loaded()
+ {
+- const string filename("/sys/devices/system/cpu/cpu0/cpufreq/scaling_driver");
++ const char *filename = "/sys/devices/system/cpu/cpu0/cpufreq/scaling_driver";
+ const string intel_pstate("intel_pstate");
+ char line[32] = { '\0' };
+ ifstream file;
+--
+2.17.1
+
PKG_NAME:=procps-ng
PKG_VERSION:=3.3.15
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@SF/procps-ng
define Package/procps-ng/install
$(INSTALL_DIR) $(1)/usr/lib
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libprocps.so* $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libprocps.so* $(1)/usr/lib/
endef
define BuildPlugin
include $(TOPDIR)/rules.mk
PKG_NAME:=prometheus-node-exporter-lua
-PKG_VERSION:=2018.12.30
-PKG_RELEASE:=4
+PKG_VERSION:=2019.04.12
+PKG_RELEASE:=1
PKG_MAINTAINER:=Etienne CHAMPETIER <champetier.etienne@gmail.com>
PKG_LICENSE:=Apache-2.0
local function scrape()
- metric("node_nf_conntrack_entries", "gauge", nil,
- string.sub(get_contents("/proc/sys/net/netfilter/nf_conntrack_count"), 1, -2))
- metric("node_nf_conntrack_entries_limit", "gauge", nil,
- string.sub(get_contents("/proc/sys/net/netfilter/nf_conntrack_max"), 1, -2))
+ local count = get_contents("/proc/sys/net/netfilter/nf_conntrack_count")
+ local max = get_contents("/proc/sys/net/netfilter/nf_conntrack_max")
+ if count ~= "" then
+ metric("node_nf_conntrack_entries", "gauge", nil, string.sub(count, 1, -2))
+ end
+ if max ~= "" then
+ metric("node_nf_conntrack_entries_limit", "gauge", nil, string.sub(max, 1, -2))
+ end
end
return { scrape = scrape }
local iwinfo = require "iwinfo"
local function scrape()
+ local metric_wifi_stations = metric("wifi_stations", "gauge")
+
local metric_wifi_station_signal = metric("wifi_station_signal_dbm","gauge")
- local metric_wifi_station_tx_packets = metric("wifi_station_tx_packets_total","gauge")
- local metric_wifi_station_rx_packets = metric("wifi_station_rx_packets_total","gauge")
+
+ local metric_wifi_station_inactive = metric('wifi_station_inactive_milliseconds', 'gauge')
+
+ local metric_wifi_station_exp_thr = metric('wifi_station_expected_throughput_kilobits_per_second', 'gauge')
+
+ local metric_wifi_station_tx_bitrate = metric('wifi_station_transmit_kilobits_per_second', 'gauge')
+ local metric_wifi_station_rx_bitrate = metric('wifi_station_receive_kilobits_per_second', 'gauge')
+
+ local metric_wifi_station_tx_packets = metric("wifi_station_transmit_packets_total","counter")
+ local metric_wifi_station_rx_packets = metric("wifi_station_receive_packets_total","counter")
+
+ local metric_wifi_station_tx_bytes = metric('wifi_station_transmit_bytes_total', 'counter')
+ local metric_wifi_station_rx_bytes = metric('wifi_station_receive_bytes_total', 'counter')
+
local u = ubus.connect()
local status = u:call("network.wireless", "status", {})
for _, intf in ipairs(dev_table['interfaces']) do
local ifname = intf['ifname']
local iw = iwinfo[iwinfo.type(ifname)]
+ local count = 0
local assoclist = iw.assoclist(ifname)
for mac, station in pairs(assoclist) do
ifname = ifname,
mac = mac,
}
- metric_wifi_station_signal(labels, station.signal)
+ if station.signal and station.signal ~= 0 then
+ metric_wifi_station_signal(labels, station.signal)
+ end
+ if station.inactive then
+ metric_wifi_station_inactive(labels, station.inactive)
+ end
+ if station.expected_throughput and station.expected_throughput ~= 0 then
+ metric_wifi_station_exp_thr(labels, station.expected_throughput)
+ end
+ if station.tx_rate and station.tx_rate ~= 0 then
+ metric_wifi_station_tx_bitrate(labels, station.tx_rate)
+ end
+ if station.rx_rate and station.rx_rate ~= 0 then
+ metric_wifi_station_rx_bitrate(labels, station.rx_rate)
+ end
metric_wifi_station_tx_packets(labels, station.tx_packets)
metric_wifi_station_rx_packets(labels, station.rx_packets)
+ if station.tx_bytes then
+ metric_wifi_station_tx_bytes(labels, station.tx_bytes)
+ end
+ if station.rx_bytes then
+ metric_wifi_station_rx_bytes(labels, station.rx_bytes)
+ end
+
+ count = count + 1
end
+ metric_wifi_stations({ifname = ifname}, count)
end
end
end
include $(TOPDIR)/rules.mk
PKG_NAME:=prometheus
-PKG_VERSION:=2.7.1
+PKG_VERSION:=2.10.0
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/prometheus/prometheus/tar.gz/v${PKG_VERSION}?
-PKG_HASH:=bfbeb434342a03b5849e2ec7a0cbe573067299cf59ccf59db0cacd8db8800bb0
+PKG_HASH:=0362f4aa2fb44cc2c572df140da742bdf99fe9f338157a83f6634694fd693000
PKG_LICENSE:=Apache-2.0
PKG_LICENSE_FILES:=LICENSE
#
# Copyright (C) 2016 OpenWrt.org
-# Copyright (C) 2016-2018 Yousong Zhou <yszhou4tech@gmail.com>
+# Copyright (C) 2016-2019 Yousong Zhou <yszhou4tech@gmail.com>
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
PKG_NAME:=qemu
-PKG_VERSION:=3.1.0
+PKG_VERSION:=4.0.0
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_HASH:=6a0508df079a0a33c2487ca936a56c12122f105b8a96a44374704bef6c69abfc
+PKG_HASH:=13a93dfe75b86734326f8d5b475fde82ec692d5b5a338b4262aeeb6b0fa4e469
PKG_SOURCE_URL:=http://download.qemu.org/
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=LICENSE tcg/LICENSE
PKG_USE_MIPS16:=0
include $(INCLUDE_DIR)/uclibc++.mk
+include $(INCLUDE_DIR)/nls.mk
include $(INCLUDE_DIR)/package.mk
TITLE:=QEMU target $(1)
URL:=http://www.qemu.org
DEPENDS:= +glib2 +libpthread +zlib $(CXX_DEPENDS) $(QEMU_DEPS_IN_HOST) \
- $(if $(filter %-softmmu,$(1)),+libncurses +libfdt +pixman +qemu-blobs)
+ $(if $(filter %-softmmu,$(1)),+libncurses +libfdt +pixman +qemu-blobs $(ICONV_DEPENDS))
endef
define Package/qemu-$(1)/description
--disable-fortify-source \
--disable-stack-protector \
+# VHost features
CONFIGURE_ARGS += \
- --audio-drv-list='' \
- --disable-debug-info \
- --disable-modules \
+ --enable-vhost-crypto \
+ --enable-vhost-kernel \
+ --enable-vhost-net \
+ --enable-vhost-scsi \
+ --enable-vhost-user \
+ --enable-vhost-vsock \
+
+# Image formats support
+CONFIGURE_ARGS += \
+ --disable-bochs \
+ --disable-cloop \
+ --disable-dmg \
+ --disable-qcow1 \
+ --disable-vdi \
+ --disable-vvfat \
+ --disable-qed \
+ --disable-parallels \
+
+# system/user-mode emulation
+CONFIGURE_ARGS += \
+ --disable-user \
+ --disable-bsd-user \
+ --disable-linux-user \
+ --enable-system \
+
+# accel
+CONFIGURE_ARGS += \
+ --disable-hax \
+ --disable-hvf \
+ --disable-whpx \
+ --disable-xen \
+ --enable-kvm \
+ --enable-tcg \
+
+# UI
+CONFIGURE_ARGS += \
+ --disable-cocoa \
+ --disable-gtk \
--disable-sdl \
- --disable-qom-cast-debug \
- --disable-virtfs \
+ --disable-sdl-image \
+ --disable-spice \
+ --disable-virglrenderer \
--disable-vnc \
- --disable-debug-tcg \
- --disable-sparse \
- --disable-strip \
- --disable-vnc-sasl \
--disable-vnc-jpeg \
--disable-vnc-png \
- --disable-uuid \
- --disable-vde \
- --disable-netmap \
- --disable-xen \
- --disable-xen-pci-passthrough \
- --disable-xen-pv-domain-build \
- --disable-brlapi \
+ --disable-vnc-sasl \
+ --disable-vte \
+ --enable-curses \
+ --enable-iconv \
+
+# Features for performance & no external dependency
+CONFIGURE_ARGS += \
+ --enable-coroutine-pool \
+ --enable-crypto-afalg \
+ --enable-live-block-migration \
+ --enable-membarrier \
+ --enable-replication \
+
+# Review configure options not explicitly specified here
+#
+# openwrt_makefile=openwrt/packages/utils/qemu/Makefile
+# qemu_configure=qemu/configure
+# for arg in $(grep -E '^\s*--disable-[^)]+\)' "$qemu_configure" | cut -f1 -d')'); do
+# grep -qE "(--enable|--disable)${arg#--disable}" "$openwrt_makefile" || echo "$arg"
+# done
+#
+CONFIGURE_ARGS += \
+ --audio-drv-list='' \
+ --disable-attr \
+ --disable-auth-pam \
--disable-bluez \
- --disable-tcg-interpreter \
+ --disable-brlapi \
+ --disable-bzip2 \
--disable-cap-ng \
- --disable-spice \
+ --disable-capstone \
+ --disable-curl \
+ --disable-debug-info \
+ --disable-debug-mutex \
+ --disable-debug-tcg \
+ --disable-docs \
+ --disable-gcrypt \
+ --disable-git-update \
+ --disable-glusterfs \
+ --disable-gnutls \
+ --disable-guest-agent-msi \
+ --disable-jemalloc \
--disable-libiscsi \
--disable-libnfs \
- --disable-cocoa \
- --disable-bsd-user \
- --disable-curl \
+ --disable-libpmem \
+ --disable-libssh2 \
+ --disable-libudev \
+ --disable-libusb \
+ --disable-libxml2 \
--disable-linux-aio \
- --disable-attr \
- --disable-docs \
+ --disable-lzfse \
+ --disable-lzo \
+ --disable-modules \
+ --disable-mpath \
+ --disable-netmap \
+ --disable-nettle \
+ --disable-numa \
--disable-opengl \
+ --disable-pvrdma \
+ --disable-qom-cast-debug \
--disable-rbd \
- --disable-xfsctl \
+ --disable-rdma \
+ --disable-sanitizers \
+ --disable-seccomp \
+ --disable-sheepdog \
--disable-smartcard \
- --disable-libusb \
- --disable-usb-redir \
- --disable-zlib-test \
- --disable-lzo \
--disable-snappy \
- --disable-bzip2 \
- --disable-guest-agent-msi \
+ --disable-sparse \
+ --disable-strip \
+ --disable-tcg-interpreter \
+ --disable-tcmalloc \
--disable-tools \
- --disable-seccomp \
- --disable-glusterfs \
- --disable-gtk \
- --disable-gnutls \
- --disable-nettle \
- --disable-gcrypt \
- --disable-rdma \
- --disable-vte \
- --disable-virglrenderer \
--disable-tpm \
- --disable-libssh2 \
- --disable-vhdx \
- --disable-numa \
- --disable-tcmalloc \
- --disable-jemalloc \
- --disable-strip \
+ --disable-usb-redir \
+ --disable-vde \
+ --disable-virtfs \
+ --disable-vxhs \
--disable-werror \
+ --disable-xen-pci-passthrough \
+ --disable-xfsctl \
CONFIGURE_ARGS += --target-list='$(foreach target,$(QEMU_TARGET_LIST),$(if $(CONFIG_PACKAGE_qemu-$(target)),$(target)))'
CONFIGURE_ARGS += $(if $(CONFIG_PACKAGE_qemu-ga),--enable-guest-agent)
-From 0b4011cd0983ced6e065f397049f967656494793 Mon Sep 17 00:00:00 2001
+From cbb0971d0d1bc32413095810e24f17eb7169810a Mon Sep 17 00:00:00 2001
From: Yousong Zhou <yszhou4tech@gmail.com>
Date: Sat, 24 Feb 2018 13:43:19 +0800
-Subject: [PATCH 1/3] configure: allow disable fortify_source
+Subject: [PATCH 1/4] configure: allow disable fortify_source
Tell build system of qemu to not add _FORTIFY_SOURCE options and let the
OpenWrt base build system decide flavor of fortify_source to use
1 file changed, 2 insertions(+)
diff --git a/configure b/configure
-index 0c6e757..8ea3fdd 100755
+index 1c563a7027..f4d949b35b 100755
--- a/configure
+++ b/configure
-@@ -1313,6 +1313,8 @@ for opt do
+@@ -1518,6 +1518,8 @@ for opt do
;;
- --disable-git-update) git_update=no
+ --disable-libpmem) libpmem=no
;;
+ --disable-fortify-source) fortify_source="no"
+ ;;
*)
echo "ERROR: unknown option $opt"
echo "Try '$0 --help' for more information"
---
-1.8.3.1
-
--- /dev/null
+From 39b07d1742475f2c60ae2c80f3f2853bb556e0b1 Mon Sep 17 00:00:00 2001
+From: Yousong Zhou <yszhou4tech@gmail.com>
+Date: Tue, 2 Apr 2019 06:31:31 +0000
+Subject: [PATCH 2/4] configure: allow enabling/disabling libudev from command
+ line
+
+---
+ configure | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/configure b/configure
+index f4d949b35b..939f54178b 100755
+--- a/configure
++++ b/configure
+@@ -1518,6 +1518,10 @@ for opt do
+ ;;
+ --disable-libpmem) libpmem=no
+ ;;
++ --enable-libudev) libudev=yes
++ ;;
++ --disable-libudev) libudev=no
++ ;;
+ --disable-fortify-source) fortify_source="no"
+ ;;
+ *)
+++ /dev/null
-From 83e72b93889fbcbbfff281b0dbcc58c5a7455257 Mon Sep 17 00:00:00 2001
-From: Yousong Zhou <yszhou4tech@gmail.com>
-Date: Sat, 24 Feb 2018 13:45:25 +0800
-Subject: [PATCH 2/3] disas: fix compilation failure when isnan is a macro
-
----
- disas/libvixl/vixl/utils.h | 16 +++++++++++-----
- 1 file changed, 11 insertions(+), 5 deletions(-)
-
-diff --git a/disas/libvixl/vixl/utils.h b/disas/libvixl/vixl/utils.h
-index 5ab134e..df30663 100644
---- a/disas/libvixl/vixl/utils.h
-+++ b/disas/libvixl/vixl/utils.h
-@@ -118,11 +118,17 @@ double double_pack(uint64_t sign, uint64_t exp, uint64_t mantissa);
- // An fpclassify() function for 16-bit half-precision floats.
- int float16classify(float16 value);
-
-+#ifdef isnan
-+#define isnan_ isnan
-+#else
-+#define isnan_ std::isnan
-+#endif
-+
- // NaN tests.
- inline bool IsSignallingNaN(double num) {
- const uint64_t kFP64QuietNaNMask = UINT64_C(0x0008000000000000);
- uint64_t raw = double_to_rawbits(num);
-- if (std::isnan(num) && ((raw & kFP64QuietNaNMask) == 0)) {
-+ if (isnan_(num) && ((raw & kFP64QuietNaNMask) == 0)) {
- return true;
- }
- return false;
-@@ -132,7 +138,7 @@ inline bool IsSignallingNaN(double num) {
- inline bool IsSignallingNaN(float num) {
- const uint32_t kFP32QuietNaNMask = 0x00400000;
- uint32_t raw = float_to_rawbits(num);
-- if (std::isnan(num) && ((raw & kFP32QuietNaNMask) == 0)) {
-+ if (isnan_(num) && ((raw & kFP32QuietNaNMask) == 0)) {
- return true;
- }
- return false;
-@@ -148,21 +154,21 @@ inline bool IsSignallingNaN(float16 num) {
-
- template <typename T>
- inline bool IsQuietNaN(T num) {
-- return std::isnan(num) && !IsSignallingNaN(num);
-+ return isnan_(num) && !IsSignallingNaN(num);
- }
-
-
- // Convert the NaN in 'num' to a quiet NaN.
- inline double ToQuietNaN(double num) {
- const uint64_t kFP64QuietNaNMask = UINT64_C(0x0008000000000000);
-- VIXL_ASSERT(std::isnan(num));
-+ VIXL_ASSERT(isnan_(num));
- return rawbits_to_double(double_to_rawbits(num) | kFP64QuietNaNMask);
- }
-
-
- inline float ToQuietNaN(float num) {
- const uint32_t kFP32QuietNaNMask = 0x00400000;
-- VIXL_ASSERT(std::isnan(num));
-+ VIXL_ASSERT(isnan_(num));
- return rawbits_to_float(float_to_rawbits(num) | kFP32QuietNaNMask);
- }
-
---
-1.8.3.1
-
--- /dev/null
+From fb90eacb808c3b1719d6a5f2deefe88c82589bfb Mon Sep 17 00:00:00 2001
+From: Yousong Zhou <yszhou4tech@gmail.com>
+Date: Sat, 24 Feb 2018 13:45:25 +0800
+Subject: [PATCH 3/4] disas: fix compilation failure when isnan is a macro
+
+---
+ disas/libvixl/vixl/utils.h | 16 +++++++++++-----
+ 1 file changed, 11 insertions(+), 5 deletions(-)
+
+diff --git a/disas/libvixl/vixl/utils.h b/disas/libvixl/vixl/utils.h
+index 5ab134e240..df30663df8 100644
+--- a/disas/libvixl/vixl/utils.h
++++ b/disas/libvixl/vixl/utils.h
+@@ -118,11 +118,17 @@ double double_pack(uint64_t sign, uint64_t exp, uint64_t mantissa);
+ // An fpclassify() function for 16-bit half-precision floats.
+ int float16classify(float16 value);
+
++#ifdef isnan
++#define isnan_ isnan
++#else
++#define isnan_ std::isnan
++#endif
++
+ // NaN tests.
+ inline bool IsSignallingNaN(double num) {
+ const uint64_t kFP64QuietNaNMask = UINT64_C(0x0008000000000000);
+ uint64_t raw = double_to_rawbits(num);
+- if (std::isnan(num) && ((raw & kFP64QuietNaNMask) == 0)) {
++ if (isnan_(num) && ((raw & kFP64QuietNaNMask) == 0)) {
+ return true;
+ }
+ return false;
+@@ -132,7 +138,7 @@ inline bool IsSignallingNaN(double num) {
+ inline bool IsSignallingNaN(float num) {
+ const uint32_t kFP32QuietNaNMask = 0x00400000;
+ uint32_t raw = float_to_rawbits(num);
+- if (std::isnan(num) && ((raw & kFP32QuietNaNMask) == 0)) {
++ if (isnan_(num) && ((raw & kFP32QuietNaNMask) == 0)) {
+ return true;
+ }
+ return false;
+@@ -148,21 +154,21 @@ inline bool IsSignallingNaN(float16 num) {
+
+ template <typename T>
+ inline bool IsQuietNaN(T num) {
+- return std::isnan(num) && !IsSignallingNaN(num);
++ return isnan_(num) && !IsSignallingNaN(num);
+ }
+
+
+ // Convert the NaN in 'num' to a quiet NaN.
+ inline double ToQuietNaN(double num) {
+ const uint64_t kFP64QuietNaNMask = UINT64_C(0x0008000000000000);
+- VIXL_ASSERT(std::isnan(num));
++ VIXL_ASSERT(isnan_(num));
+ return rawbits_to_double(double_to_rawbits(num) | kFP64QuietNaNMask);
+ }
+
+
+ inline float ToQuietNaN(float num) {
+ const uint32_t kFP32QuietNaNMask = 0x00400000;
+- VIXL_ASSERT(std::isnan(num));
++ VIXL_ASSERT(isnan_(num));
+ return rawbits_to_float(float_to_rawbits(num) | kFP32QuietNaNMask);
+ }
+
+++ /dev/null
-From b6d4bff30f2bdc3a6f26c9f6c7f32e352270d119 Mon Sep 17 00:00:00 2001
-From: Yousong Zhou <yszhou4tech@gmail.com>
-Date: Sat, 24 Feb 2018 13:46:31 +0800
-Subject: [PATCH 3/3] pc-bios: fix compilation when $(AS) is actually gcc
- driver
-
----
- pc-bios/optionrom/Makefile | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/pc-bios/optionrom/Makefile b/pc-bios/optionrom/Makefile
-index a9a9e5e..f88b3ee 100644
---- a/pc-bios/optionrom/Makefile
-+++ b/pc-bios/optionrom/Makefile
-@@ -34,7 +34,7 @@ endif
- QEMU_INCLUDES += -I$(SRC_PATH)
-
- Wa = -Wa,
--ASFLAGS += -32
-+ASFLAGS += $(Wa)-32
- QEMU_CFLAGS += $(call cc-c-option, $(QEMU_CFLAGS), $(Wa)-32)
-
- build-all: multiboot.bin linuxboot.bin linuxboot_dma.bin kvmvapic.bin
-@@ -44,7 +44,7 @@ build-all: multiboot.bin linuxboot.bin linuxboot_dma.bin kvmvapic.bin
-
-
- %.o: %.S
-- $(call quiet-command,$(CPP) $(QEMU_INCLUDES) $(QEMU_DGFLAGS) -c -o - $< | $(AS) $(ASFLAGS) -o $@,"AS","$(TARGET_DIR)$@")
-+ $(call quiet-command,$(CPP) $(QEMU_INCLUDES) $(QEMU_DGFLAGS) -c -o - $< | $(AS) $(ASFLAGS) -o $@ -x assembler -,"AS","$(TARGET_DIR)$@")
-
- %.img: %.o
- $(call quiet-command,$(LD) $(LDFLAGS_NOPIE) -m $(LD_I386_EMULATION) -T $(SRC_PATH)/pc-bios/optionrom/flat.lds -s -o $@ $<,"BUILD","$(TARGET_DIR)$@")
---
-1.8.3.1
-
--- /dev/null
+From 8cff6a5f07f66103809e6bf4a26c512d70ab2841 Mon Sep 17 00:00:00 2001
+From: Yousong Zhou <yszhou4tech@gmail.com>
+Date: Sat, 24 Feb 2018 13:46:31 +0800
+Subject: [PATCH 4/4] pc-bios: fix compilation when $(AS) is actually gcc
+ driver
+
+---
+ pc-bios/optionrom/Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/pc-bios/optionrom/Makefile b/pc-bios/optionrom/Makefile
+index e33a24da0d..ce734e8202 100644
+--- a/pc-bios/optionrom/Makefile
++++ b/pc-bios/optionrom/Makefile
+@@ -34,7 +34,7 @@ endif
+ QEMU_INCLUDES += -I$(SRC_PATH)
+
+ Wa = -Wa,
+-ASFLAGS += -32
++ASFLAGS += $(Wa)-32
+ QEMU_CFLAGS += $(call cc-c-option, $(QEMU_CFLAGS), $(Wa)-32)
+
+ build-all: multiboot.bin linuxboot.bin linuxboot_dma.bin kvmvapic.bin pvh.bin
+@@ -44,7 +44,7 @@ build-all: multiboot.bin linuxboot.bin linuxboot_dma.bin kvmvapic.bin pvh.bin
+
+
+ %.o: %.S
+- $(call quiet-command,$(CPP) $(QEMU_INCLUDES) $(QEMU_DGFLAGS) -c -o - $< | $(AS) $(ASFLAGS) -o $@,"AS","$(TARGET_DIR)$@")
++ $(call quiet-command,$(CPP) $(QEMU_INCLUDES) $(QEMU_DGFLAGS) -c -o - $< | $(AS) $(ASFLAGS) -o $@ -x assembler -,"AS","$(TARGET_DIR)$@")
+
+ pvh.img: pvh.o pvh_main.o
+ $(call quiet-command,$(LD) $(LDFLAGS_NOPIE) -m $(LD_I386_EMULATION) -T $(SRC_PATH)/pc-bios/optionrom/flat.lds -s -o $@ $^,"BUILD","$(TARGET_DIR)$@")
PKG_NAME:=rtl-ais
PKG_VERSION:=0.3
-PKG_RELEASE:=2
+PKG_RELEASE:=4
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/dgiardini/rtl-ais/tar.gz/v$(PKG_VERSION)?
PKG_HASH:=01e2b675226ec403c409cec8b55999008f5c7aa9e82d6c0ba085ef13b200ceb1
PKG_MAINTAINER:=Nuno Goncalves <nunojpg@gmail.com>
-PKG_LICENSE:=GPL-2.0+
+PKG_LICENSE:=GPL-2.0-or-later
PKG_LICENSE_FILES:=COPYING
include $(INCLUDE_DIR)/package.mk
PROG=/usr/bin/rtl_ais
validate_rtl_ais_section() {
- uci_validate_section "rtl_ais" "rtl_ais" "$1" \
+ uci_load_validate "rtl_ais" "rtl_ais" "$1" "$2" \
'enabled:bool' \
'ppm:range(-100,100):0'
}
load_rtl_ais() {
local cfg="$1"
- local enabled ppm
- validate_rtl_ais_section "$cfg" || { echo "validation failed"; return 1; }
+ [ "$2" = 0 ] || { echo "validation failed"; return 1; }
[ "$enabled" = "1" ] || return 1
- procd_open_instance
- procd_set_param command "$PROG" -p "$ppm"
+ procd_open_instance
+ procd_set_param command "$PROG" -p "$ppm"
procd_set_param stdout 1
procd_set_param stderr 1
- procd_set_param respawn
- procd_close_instance
+ procd_set_param respawn
+ procd_close_instance
}
start_service() {
config_load "rtl_ais"
- config_foreach load_rtl_ais "rtl_ais"
+ config_foreach validate_rtl_ais_section "rtl_ais" load_rtl_ais
}
service_triggers() {
--- /dev/null
+--- a/tcp_listener/tcp_listener.c
++++ b/tcp_listener/tcp_listener.c
+@@ -6,6 +6,7 @@
+ #include <string.h>
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <unistd.h>
+ #include <errno.h>
+ #include <stdio.h>
+ #include <pthread.h>
-#
+#
# Copyright (C) 2017 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
include $(TOPDIR)/rules.mk
PKG_NAME:=rtl_433
-PKG_VERSION:=18.05
+PKG_VERSION:=18.12
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:=4710105234e3b71ae839e2d3f2628d6c12879fcda9c849fffe847d4de42a74f3
-
-CMAKE_INSTALL:=1
+PKG_HASH:=8d9a0d57155430b03d299effd48b43b7e072f49868485f0fc79294a28402d654
+PKG_MAINTAINER:=Jasper Scholte <NightNL@outlook.com>
PKG_LICENSE:=GPLv2
PKG_LICENSE_FILES:=COPYING
+CMAKE_INSTALL:=1
+
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
CATEGORY:=Utilities
DEPENDS:=+librtlsdr +rtl-sdr +libtool-bin
URL:=https://github.com/merbanan/rtl_433
- MAINTAINER:=Jasper Scholte <NightNL@outlook.com>
endef
define Package/rtl-sdr/description
--- /dev/null
+--- 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)
+
include $(TOPDIR)/rules.mk
PKG_NAME:=rtty
-PKG_VERSION:=6.5.0
+PKG_VERSION:=6.6.1
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_VERSION:=v$(PKG_VERSION)
PKG_SOURCE_URL=https://codeload.github.com/zhaojh329/rtty/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=736f4f6bb214c5d97ae530d8029b9a113dbd82b5e6683cf46bf9f23c55fb10d8
+PKG_HASH:=4a46bd80f738ccb9aeea7c0cb8aa5ac364fd964d9ccc1bc3faf7b68eae17007c
CMAKE_INSTALL:=1
PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_SOURCE_SUBDIR)
# option port '5912' # Server Port
# option ssl 1 # Whether to use ssl
# option keepalive 5 # keep alive in seconds for this client
+# option token 'your-token' # generated by rttys
BIN=/usr/sbin/rtty
+validate_rtty_section() {
+ uci_load_validate rtty rtty "$1" "$2" \
+ 'interface:uci("network", "@interface"):lan' \
+ 'id:maxlength(63)' \
+ 'description:maxlength(126)' \
+ 'host:host' \
+ 'port:port' \
+ 'ssl:bool:0' \
+ 'keepalive:uinteger:5' \
+ 'token:maxlength(32)'
+}
+
start_rtty() {
- . /lib/functions/network.sh
-
- local cfg="$1"
- local interface ifname id description host port ssl
-
- uci_validate_section rtty rtty "${1}" \
- 'interface:uci("network", "@interface"):lan' \
- 'id:maxlength(63)' \
- 'description:maxlength(126)' \
- 'host:host' \
- 'port:port' \
- 'ssl:bool:0' \
- 'keepalive:uinteger:5'
-
- [ $? -ne 0 ] && {
- echo "validation failed" >&2
- return 1
- }
-
- [ -n "$interface" ] && network_get_device ifname "$interface"
-
- [ -z "$ifname" -a -z "$id" ] && {
- echo "You must specify an interface or ID" >&2
- return 1
- }
-
- [ -z "$host" ] && {
- echo "host required" >&2
- return 1
- }
-
- [ -z "$port" ] && {
- echo "port required" >&2
- return 1
- }
-
- procd_open_instance
- procd_set_param command $BIN -h $host -p $port -a -k $keepalive
- [ -n "$ifname" ] && procd_append_param command -i "$ifname"
- [ -n "$id" ] && procd_append_param command -I "$id"
- [ -n "$description" ] && procd_append_param command -d "$description"
- [ "$ssl" = "1" ] && procd_append_param command -s
- procd_set_param respawn
- procd_close_instance
+ . /lib/functions/network.sh
+
+ local ifname
+
+ [ "$2" = 0 ] || {
+ echo "validation failed" >&2
+ return 1
+ }
+
+ [ -n "$interface" ] && network_get_device ifname "$interface"
+
+ [ -z "$ifname" -a -z "$id" ] && {
+ echo "You must specify an interface or ID" >&2
+ return 1
+ }
+
+ [ -z "$host" ] && {
+ echo "host required" >&2
+ return 1
+ }
+
+ [ -z "$port" ] && {
+ echo "port required" >&2
+ return 1
+ }
+
+ procd_open_instance
+ procd_set_param command $BIN -h $host -p $port -a -k $keepalive
+ [ -n "$ifname" ] && procd_append_param command -i "$ifname"
+ [ -n "$id" ] && procd_append_param command -I "$id"
+ [ -n "$description" ] && procd_append_param command -d "$description"
+ [ "$ssl" = "1" ] && procd_append_param command -s
+ [ -n "$token" ] && procd_append_param command -t "$token"
+ procd_set_param respawn
+ procd_close_instance
}
start_service() {
- config_load rtty
- config_foreach start_rtty rtty
+ config_load rtty
+ config_foreach validate_rtty_section rtty start_rtty
}
+service_triggers() {
+ procd_add_reload_trigger "rtty"
+ procd_add_validation validate_rtty_section
+}
--- /dev/null
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=runc
+PKG_VERSION:=1.0.0-rc8
+PKG_RELEASE:=1
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/opencontainers/runc/tar.gz/v${PKG_VERSION}?
+PKG_HASH:=efe4ff9bbe49b19074346d65c914d809c0a3e90d062ea9619fe240f931f0b700
+PKG_SOURCE_VERSION:=425e105d5a03fabd737a126ad93d62a9eeede87f
+
+PKG_MAINTAINER:=Gerard Ryan <G.M0N3Y.2503@gmail.com>
+
+PKG_BUILD_DEPENDS:=golang/host
+PKG_BUILD_PARALLEL:=1
+PKG_USE_MIPS16:=0
+
+GO_PKG:=github.com/opencontainers/runc
+
+include $(INCLUDE_DIR)/package.mk
+include ../../lang/golang/golang-package.mk
+
+define Package/runc/config
+config RUNC_SECCOMP
+ depends on PACKAGE_runc
+ bool "Enable support for seccomp in runc"
+ default DOCKER_SECCOMP
+ select KERNEL_SECCOMP
+ select PACKAGE_libseccomp
+ help
+ Build runc with support for seccomp filters.
+ Select libseccomp which also pulls-in the needed kernel features.
+endef
+
+define Package/runc
+ SECTION:=utils
+ CATEGORY:=Utilities
+ TITLE:=runc container runtime
+ URL:=https://www.opencontainers.org/
+ DEPENDS:=$(GO_ARCH_DEPENDS) @TARGET_x86_64 +RUNC_SECCOMP:libseccomp
+ MENU:=1
+endef
+
+define Package/runc/description
+runc is a CLI tool for spawning and running containers according to the OCI specification.
+endef
+
+GO_PKG_INSTALL_ALL:=1
+MAKE_PATH:=$(GO_PKG_WORK_DIR_NAME)/build/src/$(GO_PKG)
+MAKE_VARS += \
+ GOPATH=$(GO_PKG_BUILD_DIR) \
+ GOCACHE=$(GO_PKG_CACHE_DIR) \
+ GOTMPDIR=$(GO_PKG_TMP_DIR) \
+ GOROOT_FINAL=$(GO_TARGET_ROOT) \
+ CC=$(TARGET_CC) \
+ CXX=$(TARGET_CXX) \
+ $(call GoPackage/Environment)
+MAKE_FLAGS += \
+ COMMIT=$(PKG_SOURCE_VERSION)
+
+ifeq ($(ARCH),mips)
+MAKE_FLAGS += EXTRA_FLAGS='-buildmode=default'
+endif
+
+ifeq ($(CONFIG_RUNC_SECCOMP),y)
+MAKE_FLAGS += BUILDTAGS='seccomp'
+else
+MAKE_FLAGS += BUILDTAGS=''
+endif
+
+define Build/Compile
+ $(call Build/Compile/Default)
+endef
+
+# Avoid installing binaries
+define Build/InstallDev
+ $(call Build/Compile/Default,clean)
+ $(call GoPackage/Build/InstallDev,$(1))
+endef
+
+define Package/runc/install
+ $(INSTALL_DIR) $(1)/usr/sbin/
+ $(INSTALL_BIN) $(GO_PKG_BUILD_DIR)/src/$(GO_PKG)/runc $(1)/usr/sbin/
+endef
+
+$(eval $(call BuildPackage,runc))
#
# Copyright (C) 2006-2016 OpenWrt.org
-# Copyright (C) 2017-2018 Luiz Angelo Daros de Luca <luizluca@gmail.com>
+# Copyright (C) 2017-2019 Luiz Angelo Daros de Luca <luizluca@gmail.com>
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
PKG_NAME:=sane-backends
PKG_VERSION:=1.0.27
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://fossies.org/linux/misc \
https://alioth.debian.org/frs/download.php/file/4146/
$(INSTALL_DIR) $(1)/etc/sane.d
$(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/sane.d/saned.conf $(1)/etc/sane.d/
$(INSTALL_DIR) $(1)/usr/sbin
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/
+ $(INSTALL_BIN) ./files/usr/sbin/saned $(1)/usr/sbin/saned
+ $(INSTALL_DIR) $(1)/usr/lib/sane/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/saned $(1)/usr/lib/sane/saned
$(INSTALL_DIR) $(1)/etc/xinetd.d
- $(CP) ./files/xinet.d_sane-port $(1)/etc/xinetd.d/sane-port
+ $(CP) ./files/etc/xinetd.d/sane-port $(1)/etc/xinetd.d/sane-port
endef
define Package/sane-daemon/conffiles
--- /dev/null
+# default: off
+# description: The saned provides scanner service via the network. \
+# Applications like kooka, xsane or xscanimage can use the remote \
+# scanner.
+service sane-port
+{
+ socket_type = stream
+ port = 6566
+ wait = no
+ user = root
+ group = root
+ server = /usr/sbin/saned
+ disable = yes
+}
--- /dev/null
+#!/bin/sh
+
+usblp_driver="/sys/bus/usb/drivers/usblp"
+
+inuse=""
+if [ -e /sys/bus/usb/devices ]; then
+ for usbdev_driver in /sys/bus/usb/devices/*/driver; do
+ [ -e "$usbdev_driver" ] || continue
+ [ "$(readlink -f "$usbdev_driver")" = "$usblp_driver" ] || continue
+ usbdev="${usbdev_driver%/*}"
+ inuse="$inuse ${usbdev##*/}"
+ done
+fi
+
+/usr/lib/sane/saned "$@"
+err=$?
+
+for usbdev in $inuse; do
+ [ -e "/sys/bus/usb/devices/$usbdev/driver" ] && continue
+ logger -t saned "binding device $usbdev back to usblp..."
+ printf '%s' "$usbdev" > "$usblp_driver/bind"
+done
+
+exit $err
+++ /dev/null
-# default: off
-# description: The saned provides scanner service via the network. \
-# Applications like kooka, xsane or xscanimage can use the remote \
-# scanner.
-service sane-port
-{
- socket_type = stream
- port = 6566
- wait = no
- user = root
- group = root
- server = /usr/sbin/saned
- disable = yes
-}
PKG_NAME:=screen
PKG_VERSION:=4.6.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=1b6922520e6a0ce5e28768d620b0f640a6631397f95ccb043b70b91bb503fa3a
PKG_SOURCE_URL:=@GNU/screen
+PKG_HASH:=1b6922520e6a0ce5e28768d620b0f640a6631397f95ccb043b70b91bb503fa3a
+PKG_MAINTAINER:=Etienne CHAMPETIER <champetier.etienne@gmail.com>
PKG_LICENSE:=GPL-3.0+
-PKG_LICENSE_FILES:=
+PKG_LICENSE_FILES:=COPYING
+
+PKG_FIXUP:=autoreconf
+PKG_BUILD_PARALLEL:=1
+PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
SUBMENU:=Terminal
DEPENDS:=+libncurses
TITLE:=Full-screen terminal window manager
- URL:=http://www.gnu.org/software/screen/
- MAINTAINER:=Etienne CHAMPETIER <champetier.etienne@gmail.com>
+ URL:=https://www.gnu.org/software/screen/
endef
define Package/screen/description
terminal between several processes, typically interactive shells.
endef
-define Build/Configure
- $(call Build/Configure/Default,\
- --with-sys-screenrc=/etc/screenrc \
- --enable-colors256 \
- )
- # XXX: memmove() works well with overlapped memory areas
- echo "#define USEMEMMOVE 1" >>$(PKG_BUILD_DIR)/config.h
-endef
+CONFIGURE_ARGS += \
+ --enable-colors256 \
+ --with-sys-screenrc=/etc/screenrc
define Package/screen/install
$(INSTALL_DIR) $(1)/usr/sbin
--- /dev/null
+From 8c2b4061d16756ee2ed37f08db063b8215656943 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Thu, 2 Nov 2017 16:48:15 +0800
+Subject: [PATCH] fix configure failed while build dir name contains "yes"
+
+While build dir name contained "yes", and compiled with
+producing debugging information (-g), the configure failed.
+
+The pattern of AC_EGREP_CPP (string "yes") mismatched with
+dir name. It caused the test of AC_EGREP_CPP incorrect.
+
+Use YES_IS_DEFINED to replace yes which is not often used
+as dir name.
+
+Bug: 52329
+(Fix release v.4.6.2 or above)
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ configure.ac | 32 ++++++++++++++++----------------
+ 1 file changed, 16 insertions(+), 16 deletions(-)
+
+diff --git a/src/configure.ac b/src/configure.ac
+index 28237f5..34f9735 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -151,9 +151,9 @@ fi
+
+
+ AC_CHECKING(for Ultrix)
+-AC_EGREP_CPP(yes,
++AC_EGREP_CPP(YES_IS_DEFINED,
+ [#if defined(ultrix) || defined(__ultrix)
+- yes;
++ YES_IS_DEFINED;
+ #endif
+ ], ULTRIX=1)
+
+@@ -168,9 +168,9 @@ dnl ghazi@caip.rutgers.edu (Kaveh R. Ghazi):
+ dnl BBN butterfly is not POSIX, but a MACH BSD system.
+ dnl Do not define POSIX and TERMIO.
+ AC_CHECKING(for butterfly)
+-AC_EGREP_CPP(yes,
++AC_EGREP_CPP(YES_IS_DEFINED,
+ [#if defined(butterfly)
+- yes;
++ YES_IS_DEFINED;
+ #endif
+ ], butterfly=1)
+
+@@ -179,12 +179,12 @@ if test -n "$ULTRIX"; then
+ test -z "$GCC" && CC="$CC -YBSD"
+ fi
+ AC_CHECKING(for POSIX.1)
+-AC_EGREP_CPP(yes,
++AC_EGREP_CPP(YES_IS_DEFINED,
+ [#include <sys/types.h>
+ #include <unistd.h>
+ main () {
+ #ifdef _POSIX_VERSION
+- yes;
++ YES_IS_DEFINED;
+ #endif
+ ], AC_NOTE(- you have a POSIX system) AC_DEFINE(POSIX) posix=1)
+ fi
+@@ -196,9 +196,9 @@ AC_TRY_COMPILE(
+ #include <fcntl.h>], [int x = SIGCHLD | FNDELAY;], , AC_DEFINE(SYSV))
+
+ AC_CHECKING(for sequent/ptx)
+-AC_EGREP_CPP(yes,
++AC_EGREP_CPP(YES_IS_DEFINED,
+ [#ifdef _SEQUENT_
+- yes;
++ YES_IS_DEFINED;
+ #endif
+ ], LIBS="$LIBS -lsocket -linet";seqptx=1)
+
+@@ -213,9 +213,9 @@ AC_TRY_LINK([#include <utmpx.h>
+ AC_CHECK_HEADERS([stropts.h string.h strings.h])
+
+ AC_CHECKING(for Solaris 2.x)
+-AC_EGREP_CPP(yes,
++AC_EGREP_CPP(YES_IS_DEFINED,
+ [#if defined(SVR4) && defined(sun)
+- yes
++ YES_IS_DEFINED;
+ #endif
+ ], LIBS="$LIBS -lsocket -lnsl -lkstat")
+
+@@ -699,9 +699,9 @@ else
+ pdir='/dev'
+ fi
+ dnl SCO uses ptyp%d
+-AC_EGREP_CPP(yes,
++AC_EGREP_CPP(YES_IS_DEFINED,
+ [#ifdef M_UNIX
+- yes;
++ YES_IS_DEFINED;
+ #endif
+ ], ptys=`echo /dev/ptyp??`, ptys=`echo $pdir/pty??`)
+ dnl if test -c /dev/ptyp19; then
+@@ -878,9 +878,9 @@ fi
+ )
+
+ if test -z "$load" ; then
+-AC_EGREP_CPP(yes,
++AC_EGREP_CPP(YES_IS_DEFINED,
+ [#if defined(NeXT) || defined(apollo) || defined(linux)
+- yes;
++ YES_IS_DEFINED;
+ #endif
+ ], load=1)
+ fi
+@@ -1105,9 +1105,9 @@ AC_CHECKING(syslog in libbsd.a)
+ AC_TRY_LINK(, [closelog();], AC_NOTE(- found.), [LIBS="$oldlibs"
+ AC_NOTE(- bad news: syslog missing.) AC_DEFINE(NOSYSLOG)])])
+
+-AC_EGREP_CPP(yes,
++AC_EGREP_CPP(YES_IS_DEFINED,
+ [#ifdef M_UNIX
+- yes;
++ YES_IS_DEFINED;
+ #endif
+ ], LIBS="$LIBS -lsocket -lcrypt_i")
+
+--
+2.17.1
+
--- /dev/null
+From 5c3643fb701cc380ceb02116526ef4f5885295d0 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Amadeusz=20S=C5=82awi=C5=84ski?= <amade@asmblr.net>
+Date: Sat, 16 Dec 2017 15:09:57 +0100
+Subject: [PATCH] fix: configure option "--disable-use-locale" is not working
+
+Bug: 52663
+---
+ acconfig.h | 2 +-
+ configure.ac | 6 +++++-
+ 2 files changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/src/acconfig.h b/src/acconfig.h
+index 4e5cda0..6ff2d32 100644
+--- a/acconfig.h
++++ b/acconfig.h
+@@ -274,7 +274,7 @@
+ * Define USE_LOCALE if you want screen to use the locale names
+ * for the name of the month and day of the week.
+ */
+-#define USE_LOCALE
++#undef USE_LOCALE
+
+ /*
+ * Define USE_PAM if your system supports PAM (Pluggable Authentication
+diff --git a/src/configure.ac b/src/configure.ac
+index 34f9735..d1bc42c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1246,7 +1246,11 @@ if test "$enable_pam" = "yes"; then
+ AC_MSG_RESULT(no);LIBS="$oldlibs")
+ fi
+
+-AC_ARG_ENABLE(use_locale, [ --enable-use-locale use localized month/day names])
++AC_ARG_ENABLE(use-locale,
++ [ --enable-use-locale use localized month/day names (default: yes)],
++ [],
++ [enable_use_locale=yes]
++)
+ if test "$enable_use_locale" = "yes"; then
+ AC_DEFINE(USE_LOCALE)
+ fi
+--
+2.17.1
+
--- /dev/null
+From 6b320186db7df1e58fdd2c836af54c86cc596981 Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Sat, 24 Feb 2018 15:09:10 +0100
+Subject: [PATCH] [PATCH 1/4] Remove redundant compiler sanity checks
+
+AC_PROG_CC already performs sanity checks. And unlike the removed
+checks, it does so in a way that supports cross compilation.
+
+Modified from patch by Maarten ter Huurne.
+
+Upstream-Status: Submitted [http://savannah.gnu.org/bugs/?43223]
+
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+---
+ configure.ac | 27 ---------------------------
+ 1 file changed, 27 deletions(-)
+
+diff --git a/src/configure.ac b/src/configure.ac
+index d1bc42c..a8208ea 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -48,31 +48,6 @@ AC_PROG_GCC_TRADITIONAL
+ AC_ISC_POSIX
+ AC_USE_SYSTEM_EXTENSIONS
+
+-AC_TRY_RUN(main(){exit(0);},,[
+-if test $CC != cc ; then
+-AC_NOTE(Your $CC failed - restarting with CC=cc)
+-AC_NOTE()
+-CC=cc
+-export CC
+-exec $0 $configure_args
+-fi
+-])
+-
+-AC_TRY_RUN(main(){exit(0);},,
+-exec 5>&2
+-eval $ac_link
+-AC_NOTE(CC=$CC; CFLAGS=$CFLAGS; LIBS=$LIBS;)
+-AC_NOTE($ac_compile)
+-AC_MSG_ERROR(Can't run the compiler - sorry))
+-
+-AC_TRY_RUN([
+-main()
+-{
+- int __something_strange_();
+- __something_strange_(0);
+-}
+-],AC_MSG_ERROR(Your compiler does not set the exit status - sorry))
+-
+ AC_PROG_AWK
+
+ AC_PROG_INSTALL
+@@ -1278,8 +1253,6 @@ fi
+ dnl Ptx bug workaround -- insert -lc after -ltermcap
+ test -n "$seqptx" && LIBS="-ltermcap -lc -lsocket -linet -lnsl -lsec -lseq"
+
+-AC_TRY_RUN(main(){exit(0);},,AC_MSG_ERROR(Can't run the compiler - internal error. Sorry.))
+-
+ ETCSCREENRC=
+ AC_MSG_CHECKING(for the global screenrc file)
+ AC_ARG_WITH(sys-screenrc, [ --with-sys-screenrc=path to the global screenrc file], [ ETCSCREENRC="${withval}" ])
+--
+2.17.1
+
--- /dev/null
+From abba47ce4206506c49858d944e904fff86ae65cc Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Sat, 24 Feb 2018 15:14:48 +0100
+Subject: [PATCH] [PATCH 2/4] Provide cross compile alternatives for AC_TRY_RUN
+
+Modified from patch by Maarten ter Huurne.
+
+Upstream-Status: Submitted [http://savannah.gnu.org/bugs/?43223]
+
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+---
+ configure.ac | 32 ++++++++++++++++++++------------
+ 1 file changed, 20 insertions(+), 12 deletions(-)
+
+diff --git a/src/configure.ac b/src/configure.ac
+index a8208ea..74be368 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -348,7 +348,8 @@ main()
+ exit(0);
+ }
+ ], AC_NOTE(- your fifos are usable) fifo=1,
+-AC_NOTE(- your fifos are not usable))
++AC_NOTE(- your fifos are not usable),
++AC_NOTE(- skipping check because we are cross compiling; assuming fifos are usable) fifo=1)
+ rm -f /tmp/conftest*
+
+ if test -n "$fifo"; then
+@@ -396,7 +397,8 @@ main()
+ exit(0);
+ }
+ ], AC_NOTE(- your implementation is ok),
+-AC_NOTE(- you have a broken implementation) AC_DEFINE(BROKEN_PIPE) fifobr=1)
++AC_NOTE(- you have a broken implementation) AC_DEFINE(BROKEN_PIPE) fifobr=1,
++AC_NOTE(- skipping check because we are cross compiling; assuming fifo implementation is ok))
+ rm -f /tmp/conftest*
+ fi
+
+@@ -458,7 +460,8 @@ main()
+ exit(0);
+ }
+ ], AC_NOTE(- your sockets are usable) sock=1,
+-AC_NOTE(- your sockets are not usable))
++AC_NOTE(- your sockets are not usable),
++AC_NOTE(- skipping check because we are cross compiling; assuming sockets are usable) sock=1)
+ rm -f /tmp/conftest*
+
+ if test -n "$sock"; then
+@@ -497,7 +500,8 @@ main()
+ }
+ ],AC_NOTE(- you are normal),
+ AC_NOTE(- unix domain sockets are not kept in the filesystem)
+-AC_DEFINE(SOCK_NOT_IN_FS) socknofs=1)
++AC_DEFINE(SOCK_NOT_IN_FS) socknofs=1,
++AC_NOTE(- skipping check because we are cross compiling; assuming sockets are normal))
+ rm -f /tmp/conftest*
+ fi
+
+@@ -598,7 +602,8 @@ main()
+ exit(0);
+ }
+ ],AC_NOTE(- select is ok),
+-AC_NOTE(- select can't count) AC_DEFINE(SELECT_BROKEN))
++AC_NOTE(- select can't count) AC_DEFINE(SELECT_BROKEN),
++AC_NOTE(- skipping check because we are cross compiling; assuming select is ok))
+
+ dnl
+ dnl **** termcap or terminfo ****
+@@ -640,7 +645,8 @@ main()
+ {
+ exit(strcmp(tgoto("%p1%d", 0, 1), "1") ? 0 : 1);
+ }], AC_NOTE(- you use the termcap database),
+-AC_NOTE(- you use the terminfo database) AC_DEFINE(TERMINFO))
++AC_NOTE(- you use the terminfo database) AC_DEFINE(TERMINFO),
++AC_NOTE(- skipping check because we are cross compiling; assuming terminfo database is used) AC_DEFINE(TERMINFO))
+ AC_CHECKING(ospeed)
+ AC_TRY_LINK(extern short ospeed;,ospeed=5;,,AC_DEFINE(NEED_OSPEED))
+
+@@ -775,7 +781,8 @@ main()
+ else
+ AC_NOTE(- can't determine - assume ptys are world accessable)
+ fi
+- ]
++ ],
++ AC_NOTE(- skipping check because we are cross compiling; assuming ptys are world accessable)
+ )
+ rm -f conftest_grp
+ fi
+@@ -859,7 +866,7 @@ AC_EGREP_CPP(YES_IS_DEFINED,
+ #endif
+ ], load=1)
+ fi
+-if test -z "$load" ; then
++if test -z "$load" && test "$cross_compiling" = no ; then
+ AC_CHECKING(for kernelfile)
+ for core in /unix /vmunix /dynix /hp-ux /xelos /dev/ksyms /kernel/unix /kernel/genunix /unicos /mach /netbsd /386bsd /dgux /bsd /stand/vmunix; do
+ if test -f $core || test -c $core; then
+@@ -1052,7 +1059,7 @@ main()
+ #endif
+ exit(0);
+ }
+-],,AC_DEFINE(SYSVSIGS))
++],,AC_DEFINE(SYSVSIGS),:)
+
+ fi
+
+@@ -1132,7 +1139,7 @@ main() {
+ if (strncmp(buf, "cdedef", 6))
+ exit(1);
+ exit(0); /* libc version works properly. */
+-}], AC_DEFINE(USEBCOPY))
++}], AC_DEFINE(USEBCOPY),,:)
+
+ AC_TRY_RUN([
+ #define bcopy(s,d,l) memmove(d,s,l)
+@@ -1147,7 +1154,8 @@ main() {
+ if (strncmp(buf, "cdedef", 6))
+ exit(1);
+ exit(0); /* libc version works properly. */
+-}], AC_DEFINE(USEMEMMOVE))
++}], AC_DEFINE(USEMEMMOVE),,
++ AC_NOTE(- skipping check because we are cross compiling; use memmove) AC_DEFINE(USEMEMMOVE))
+
+
+ AC_TRY_RUN([
+@@ -1163,7 +1171,7 @@ main() {
+ if (strncmp(buf, "cdedef", 6))
+ exit(1);
+ exit(0); /* libc version works properly. */
+-}], AC_DEFINE(USEMEMCPY))
++}], AC_DEFINE(USEMEMCPY),,:)
+
+ AC_SYS_LONG_FILE_NAMES
+
+--
+2.17.1
+
--- /dev/null
+From c573b89139e7a068f5573abd565605bed60f293f Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Sat, 24 Feb 2018 15:18:33 +0100
+Subject: [PATCH] [PATCH 3/4] Skip host file system checks when cross-compiling
+
+Modified from patch by Maarten ter Huurne.
+
+Upstream-Status: Submitted [http://savannah.gnu.org/bugs/?43223]
+
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+---
+ configure.ac | 23 +++++++++++++++++++----
+ 1 file changed, 19 insertions(+), 4 deletions(-)
+
+diff --git a/src/configure.ac b/src/configure.ac
+index 74be368..bd748d9 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -85,7 +85,7 @@ AC_ARG_ENABLE(socket-dir,
+ dnl
+ dnl **** special unix variants ****
+ dnl
+-if test -n "$ISC"; then
++if test "$cross_compiling" = no && test -n "$ISC" ; then
+ AC_DEFINE(ISC) LIBS="$LIBS -linet"
+ fi
+
+@@ -96,10 +96,11 @@ dnl AC_DEFINE(OSF1) # this disables MIPS again....
+ dnl fi
+ dnl fi
+
+-if test -f /sysV68 ; then
++if test "$cross_compiling" = no && test -f /sysV68 ; then
+ AC_DEFINE(sysV68)
+ fi
+
++if test "$cross_compiling" = no ; then
+ AC_CHECKING(for MIPS)
+ if test -f /lib/libmld.a || test -f /usr/lib/libmld.a || test -f /usr/lib/cmplrs/cc/libmld.a; then
+ oldlibs="$LIBS"
+@@ -123,6 +124,7 @@ AC_DEFINE(USE_WAIT2) LIBS="$LIBS -lbsd" ; CC="$CC -I/usr/include/bsd"
+ ))
+ fi
+ fi
++fi
+
+
+ AC_CHECKING(for Ultrix)
+@@ -132,7 +134,7 @@ AC_EGREP_CPP(YES_IS_DEFINED,
+ #endif
+ ], ULTRIX=1)
+
+-if test -f /usr/lib/libpyr.a ; then
++if test "$cross_compiling" = no && test -f /usr/lib/libpyr.a ; then
+ oldlibs="$LIBS"
+ LIBS="$LIBS -lpyr"
+ AC_CHECKING(Pyramid OSX)
+@@ -653,17 +655,21 @@ AC_TRY_LINK(extern short ospeed;,ospeed=5;,,AC_DEFINE(NEED_OSPEED))
+ dnl
+ dnl **** PTY specific things ****
+ dnl
++if test "$cross_compiling" = no ; then
+ AC_CHECKING(for /dev/ptc)
+ if test -r /dev/ptc; then
+ AC_DEFINE(HAVE_DEV_PTC)
+ fi
++fi
+
++if test "$cross_compiling" = no ; then
+ AC_CHECKING(for SVR4 ptys)
+ sysvr4ptys=
+ if test -c /dev/ptmx ; then
+ AC_TRY_LINK([],[ptsname(0);grantpt(0);unlockpt(0);],[AC_DEFINE(HAVE_SVR4_PTYS)
+ sysvr4ptys=1])
+ fi
++fi
+
+ AC_CHECK_FUNCS(getpt)
+
+@@ -673,6 +679,7 @@ AC_CHECK_FUNCS(openpty,,
+ [AC_CHECK_LIB(util,openpty, [AC_DEFINE(HAVE_OPENPTY)] [LIBS="$LIBS -lutil"])])
+ fi
+
++if test "$cross_compiling" = no ; then
+ AC_CHECKING(for ptyranges)
+ if test -d /dev/ptym ; then
+ pdir='/dev/ptym'
+@@ -696,6 +703,7 @@ p1=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\)$/\1/g' | sort -u | tr -d '\
+ AC_DEFINE_UNQUOTED(PTYRANGE0,"$p0")
+ AC_DEFINE_UNQUOTED(PTYRANGE1,"$p1")
+ fi
++fi
+
+ dnl **** pty mode/group handling ****
+ dnl
+@@ -843,14 +851,16 @@ fi
+ dnl
+ dnl **** loadav ****
+ dnl
++if test "$cross_compiling" = no ; then
+ AC_CHECKING(for libutil(s))
+ test -f /usr/lib/libutils.a && LIBS="$LIBS -lutils"
+ test -f /usr/lib/libutil.a && LIBS="$LIBS -lutil"
++fi
+
+ AC_CHECKING(getloadavg)
+ AC_TRY_LINK(,[getloadavg((double *)0, 0);],
+ AC_DEFINE(LOADAV_GETLOADAVG) load=1,
+-if test -f /usr/lib/libkvm.a ; then
++if test "$cross_compiling" = no && test -f /usr/lib/libkvm.a ; then
+ olibs="$LIBS"
+ LIBS="$LIBS -lkvm"
+ AC_CHECKING(getloadavg with -lkvm)
+@@ -1068,13 +1078,18 @@ dnl **** libraries ****
+ dnl
+
+ AC_CHECKING(for crypt and sec libraries)
++if test "$cross_compiling" = no ; then
+ test -f /lib/libcrypt_d.a || test -f /usr/lib/libcrypt_d.a && LIBS="$LIBS -lcrypt_d"
++fi
+ oldlibs="$LIBS"
+ LIBS="$LIBS -lcrypt"
+ AC_CHECKING(crypt)
+ AC_TRY_LINK(,,,LIBS="$oldlibs")
++if test "$cross_compiling" = no ; then
+ test -f /lib/libsec.a || test -f /usr/lib/libsec.a && LIBS="$LIBS -lsec"
+ test -f /lib/libshadow.a || test -f /usr/lib/libshadow.a && LIBS="$LIBS -lshadow"
++fi
++
+ oldlibs="$LIBS"
+ LIBS="$LIBS -lsun"
+ AC_CHECKING(IRIX sun library)
+--
+2.17.1
+
--- /dev/null
+From ec90292592dd2c9d5c108390841e3df24e377ed5 Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Sat, 24 Feb 2018 15:22:05 +0100
+Subject: [PATCH] [PATCH 4/4] Avoid mis-identifying systems as SVR4
+
+Linux can be misdetected as SVR4 because it has
+libelf installed. This leads to linking with libelf, even though no
+symbols from that library were actually used, and to a workaround for
+a buggy getlogin() being enabled.
+
+It is not documented which exact SVR4 system had the bug that the
+workaround was added for, so all I could do is make an educated guess
+at the #defines its compiler would be likely to set.
+
+Modified from patch by Maarten ter Huurne.
+
+Upstream-Status: Submitted [http://savannah.gnu.org/bugs/?43223]
+
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+---
+ configure.ac | 14 ++++++++++++--
+ 1 file changed, 12 insertions(+), 2 deletions(-)
+
+diff --git a/src/configure.ac b/src/configure.ac
+index bd748d9..ab799d2 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -179,14 +179,24 @@ AC_EGREP_CPP(YES_IS_DEFINED,
+ #endif
+ ], LIBS="$LIBS -lsocket -linet";seqptx=1)
+
++AC_CHECKING(SVR4)
++AC_EGREP_CPP(yes,
++[main () {
++#if defined(SVR4) || defined(__SVR4)
++ yes;
++#endif
++], AC_NOTE(- you have a SVR4 system) AC_DEFINE(SVR4) svr4=1)
++if test -n "$svr4" ; then
+ oldlibs="$LIBS"
+ LIBS="$LIBS -lelf"
+ AC_CHECKING(SVR4)
+ AC_TRY_LINK([#include <utmpx.h>
+ ],,
+-[AC_CHECK_HEADER(dwarf.h, AC_DEFINE(SVR4) AC_DEFINE(BUGGYGETLOGIN),
+-[AC_CHECK_HEADER(elf.h, AC_DEFINE(SVR4) AC_DEFINE(BUGGYGETLOGIN))])]
++[AC_CHECK_HEADER(dwarf.h, AC_DEFINE(BUGGYGETLOGIN),
++[AC_CHECK_HEADER(elf.h, AC_DEFINE(BUGGYGETLOGIN))])]
+ ,LIBS="$oldlibs")
++fi
++
+ AC_CHECK_HEADERS([stropts.h string.h strings.h])
+
+ AC_CHECKING(for Solaris 2.x)
+--
+2.17.1
+
+++ /dev/null
---- a/configure
-+++ b/configure
-@@ -414,7 +414,7 @@ as_fn_error ()
- $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
- fi
- $as_echo "$as_me: error: $2" >&2
-- as_fn_exit $as_status
-+ # as_fn_exit $as_status
- } # as_fn_error
-
- if expr a : '\(a\)' >/dev/null 2>&1 &&
-@@ -5909,8 +5909,6 @@ else
- fi
- rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
--test -f /lib/libsec.a || test -f /usr/lib/libsec.a && LIBS="$LIBS -lsec"
--test -f /lib/libshadow.a || test -f /usr/lib/libshadow.a && LIBS="$LIBS -lshadow"
- oldlibs="$LIBS"
- LIBS="$LIBS -lsun"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking IRIX sun library..." >&5
-@@ -6991,7 +6989,7 @@ as_fn_error ()
- $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
- fi
- $as_echo "$as_me: error: $2" >&2
-- as_fn_exit $as_status
-+ # as_fn_exit $as_status
- } # as_fn_error
-
-
---- a/pty.c
-+++ b/pty.c
-@@ -39,9 +39,9 @@
- #endif
-
- /* for solaris 2.1, Unixware (SVR4.2) and possibly others */
--#ifdef HAVE_STROPTS_H
--# include <sys/stropts.h>
--#endif
-+//#ifdef HAVE_STROPTS_H
-+//# include <sys/stropts.h>
-+//#endif
-
- #if defined(sun) && defined(LOCKPTY) && !defined(TIOCEXCL)
- # include <sys/ttold.h>
---- a/sched.h
-+++ b/sched.h
-@@ -27,6 +27,11 @@
- * $Id$ GNU
- */
-
-+#ifndef __SCHED_H
-+#define __SCHED_H
-+
-+#include <sys/time.h>
-+
- struct event
- {
- struct event *next;
-@@ -46,3 +51,5 @@ struct event
- #define EV_READ 1
- #define EV_WRITE 2
- #define EV_ALWAYS 3
-+
-+#endif
+++ /dev/null
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -79,7 +79,7 @@ screen: $(OFILES)
- $(CC) $(LDFLAGS) -o $@ $(OFILES) $(LIBS)
-
- .c.o:
-- $(CC) -c -I. -I$(srcdir) $(M_CFLAGS) $(CPPFLAGS) $(DEFS) \
-+ $(CC) -c $(M_CFLAGS) $(CPPFLAGS) $(DEFS) \
- $(OPTIONS) $(CFLAGS) $<
-
- install_bin: .version screen installdirs
+++ /dev/null
---- a/configure
-+++ b/configure
-@@ -4155,44 +4155,6 @@ fi
- rm -f conftest*
-
-
--oldlibs="$LIBS"
--LIBS="$LIBS -lelf"
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SVR4..." >&5
--$as_echo "$as_me: checking SVR4..." >&6;}
--cat confdefs.h - <<_ACEOF >conftest.$ac_ext
--/* end confdefs.h. */
--#include <utmpx.h>
--
--int
--main ()
--{
--
-- ;
-- return 0;
--}
--_ACEOF
--if ac_fn_c_try_link "$LINENO"; then :
-- ac_fn_c_check_header_mongrel "$LINENO" "dwarf.h" "ac_cv_header_dwarf_h" "$ac_includes_default"
--if test "x$ac_cv_header_dwarf_h" = xyes; then :
-- $as_echo "#define SVR4 1" >>confdefs.h
-- $as_echo "#define BUGGYGETLOGIN 1" >>confdefs.h
--
--else
-- ac_fn_c_check_header_mongrel "$LINENO" "elf.h" "ac_cv_header_elf_h" "$ac_includes_default"
--if test "x$ac_cv_header_elf_h" = xyes; then :
-- $as_echo "#define SVR4 1" >>confdefs.h
-- $as_echo "#define BUGGYGETLOGIN 1" >>confdefs.h
--
--fi
--
--
--fi
--
--
--
--else
-- LIBS="$oldlibs"
--fi
- rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- for ac_header in stropts.h string.h strings.h
---- a/utmp.c
-+++ b/utmp.c
-@@ -33,6 +33,7 @@
- #include "config.h"
- #include "screen.h"
- #include "extern.h"
-+#include "os.h"
-
- #ifdef HAVE_UTEMPTER
- #include <utempter.h>
PKG_NAME:=setserial
PKG_VERSION:=2.17
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/setserial
PKG_HASH:=7e4487d320ac31558563424189435d396ddf77953bb23111a17a3d1487b5794a
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
-PKG_LICENSE:=GPL-2.0
-
+PKG_LICENSE:=GPL-2.0-only
include $(INCLUDE_DIR)/package.mk
--- /dev/null
+--- a/setserial.c
++++ b/setserial.c
+@@ -11,6 +11,8 @@
+ */
+
+ #include <stdio.h>
++#include <stdlib.h>
++#include <unistd.h>
+ #include <fcntl.h>
+ #include <termios.h>
+ #include <string.h>
+@@ -22,6 +24,7 @@
+ #ifdef HAVE_LINUX_HAYESESP_H
+ #include <linux/hayesesp.h>
+ #endif
++#include <sys/ioctl.h>
+ #include <linux/serial.h>
+
+ #include "version.h"
#
-# Copyright (C) 2016, 2018 Jeffery To
+# Copyright (C) 2016, 2018-2019 Jeffery To
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
PKG_NAME:=slide-switch
-PKG_VERSION:=0.9.3
+PKG_VERSION:=0.9.4
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/jefferyto/openwrt-slide-switch.git
-PKG_SOURCE_VERSION:=c43b6184292dc60949aa22e2b1730ced9fe34a49
+PKG_SOURCE_VERSION:=0.9.4
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(call version_abbrev,$(PKG_SOURCE_VERSION)).tar.xz
-PKG_MIRROR_HASH:=9ba1b8c978d14b7b70fa61fbf14513ef508a7dbb2a75638088532e4258de6a1b
+PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.xz
+PKG_MIRROR_HASH:=52a93506c994b1babf174aec8ac8aebbf94f27263125d144f6d86db001dd24d6
PKG_BUILD_PARALLEL:=1
PKG_FIXUP:=autoreconf
include $(INCLUDE_DIR)/package.mk
define Package/slide-switch
- SECTION:=utils
- CATEGORY:=Utilities
- DEPENDS:=+jshn +jsonfilter
- TITLE:=Translate switch position change to button press
- URL:=https://github.com/jefferyto/openwrt-slide-switch
+ SECTION:=utils
+ CATEGORY:=Utilities
+ TITLE:=Translate switch position change to button press
+ URL:=https://github.com/jefferyto/openwrt-slide-switch
+ DEPENDS:=+jshn +jsonfilter
+ PKGARCH:=all
endef
define Package/slide-switch/description
slide-switch translates slide switch position changes into normal button
-presses and releases for OpenWrt / LEDE devices.
+presses and releases for OpenWrt devices.
endef
-CONFIGURE_ARGS += --with-platform=$(BOARD)
-
define Package/slide-switch/install
$(INSTALL_DIR) $(1)/etc/hotplug.d/button
- $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/hotplug.d/button/50-slide-switch $(1)/etc/hotplug.d/button
+ $(INSTALL_DATA) \
+ $(PKG_INSTALL_DIR)/etc/hotplug.d/button/50-slide-switch \
+ $(1)/etc/hotplug.d/button
+
$(INSTALL_DIR) $(1)/etc/init.d
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/etc/init.d/zzz-slide-switch $(1)/etc/init.d
- if [ -d $(PKG_INSTALL_DIR)/usr/lib/slide-switch ]; then \
- $(INSTALL_DIR) $(1)/usr/lib/slide-switch; \
- $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/slide-switch/* $(1)/usr/lib/slide-switch; \
- fi
+ $(INSTALL_BIN) \
+ $(PKG_INSTALL_DIR)/etc/init.d/zzz-slide-switch \
+ $(1)/etc/init.d
+
$(INSTALL_DIR) $(1)/usr/sbin
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/slide-switch $(1)/usr/sbin
+ $(INSTALL_BIN) \
+ $(PKG_INSTALL_DIR)/usr/sbin/slide-switch \
+ $(1)/usr/sbin
+
$(INSTALL_DIR) $(1)/usr/share/slide-switch
- $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/slide-switch/functions.sh $(1)/usr/share/slide-switch
+ $(INSTALL_DATA) \
+ $(PKG_INSTALL_DIR)/usr/share/slide-switch/functions.sh \
+ $(PKG_INSTALL_DIR)/usr/share/slide-switch/switch-data.json \
+ $(1)/usr/share/slide-switch
endef
$(eval $(call BuildPackage,slide-switch))
PKG_NAME:=smartmontools
PKG_VERSION:=7.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/smartmontools
define Package/smartmontools/Default
SECTION:=utils
CATEGORY:=Utilities
- DEPENDS:=$(CXX_DEPENDS)
TITLE:=S.M.A.R.T Monitoring
- URL:=http://smartmontools.sourceforge.net/
+ URL:=https://www.smartmontools.org/
endef
define Package/smartmontools
$(call Package/smartmontools/Default)
+ DEPENDS:=$(CXX_DEPENDS)
TITLE+= Tool
endef
define Package/smartd
$(call Package/smartmontools/Default)
+ DEPENDS:=$(CXX_DEPENDS)
TITLE+= Daemon
endef
ATA and SCSI disks. It is derived from smartsuite.
endef
+define Package/smartmontools-drivedb
+ $(call Package/smartmontools/Default)
+ TITLE+= Drive database
+ PKGARCH=all
+endef
+
+define Package/smartmontools-drivedb/description
+ Database of known drives and USB bridges for smartctl and smartd.
+endef
+
ifeq ($(CONFIG_USE_UCLIBCXX),y)
TARGET_LDFLAGS +=-nodefaultlibs
else
define Package/smartmontools/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/smartctl $(1)/usr/sbin/
- $(INSTALL_DIR) $(1)/usr/share
- $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/smartmontools/drivedb.h $(1)/usr/share/smartmontools
endef
define Package/smartd/install
$(INSTALL_BIN) ./files/smartd.init $(1)/etc/init.d/smartd
endef
+define Package/smartmontools-drivedb/install
+ $(INSTALL_DIR) $(1)/usr/share/smartmontools/
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/smartmontools/drivedb.h $(1)/usr/share/smartmontools/
+endef
+
define Package/smartd/conffiles
/etc/smartd.conf
endef
$(eval $(call BuildPackage,smartmontools))
$(eval $(call BuildPackage,smartd))
+$(eval $(call BuildPackage,smartmontools-drivedb))
--- /dev/null
+diff --git i/knowndrives.cpp w/knowndrives.cpp
+index 072160a..d57417b 100644
+--- i/knowndrives.cpp
++++ w/knowndrives.cpp
+@@ -40,11 +40,84 @@ const char * knowndrives_cpp_cvsid = "$Id: knowndrives.cpp 4842 2018-12-02 16:07
+ // see read_default_drive_databases() below.
+ // The drive_settings structure is described in drivedb.h.
+ const drive_settings builtin_knowndrives[] = {
+-#include "drivedb.h"
++ { "DEFAULT",
++ "-", "-",
++ "Default settings",
++ "-v 1,raw48,Raw_Read_Error_Rate "
++ "-v 2,raw48,Throughput_Performance "
++ "-v 3,raw16(avg16),Spin_Up_Time "
++ "-v 4,raw48,Start_Stop_Count "
++ "-v 5,raw16(raw16),Reallocated_Sector_Ct "
++ "-v 6,raw48,Read_Channel_Margin,HDD "
++ "-v 7,raw48,Seek_Error_Rate,HDD "
++ "-v 8,raw48,Seek_Time_Performance,HDD "
++ "-v 9,raw24(raw8),Power_On_Hours "
++ "-v 10,raw48,Spin_Retry_Count,HDD "
++ "-v 11,raw48,Calibration_Retry_Count,HDD "
++ "-v 12,raw48,Power_Cycle_Count "
++ "-v 13,raw48,Read_Soft_Error_Rate "
++ // 14-174 Unknown_Attribute
++ "-v 175,raw48,Program_Fail_Count_Chip,SSD "
++ "-v 176,raw48,Erase_Fail_Count_Chip,SSD "
++ "-v 177,raw48,Wear_Leveling_Count,SSD "
++ "-v 178,raw48,Used_Rsvd_Blk_Cnt_Chip,SSD "
++ "-v 179,raw48,Used_Rsvd_Blk_Cnt_Tot,SSD "
++ "-v 180,raw48,Unused_Rsvd_Blk_Cnt_Tot,SSD "
++ "-v 181,raw48,Program_Fail_Cnt_Total "
++ "-v 182,raw48,Erase_Fail_Count_Total,SSD "
++ "-v 183,raw48,Runtime_Bad_Block "
++ "-v 184,raw48,End-to-End_Error "
++ // 185-186 Unknown_Attribute
++ "-v 187,raw48,Reported_Uncorrect "
++ "-v 188,raw48,Command_Timeout "
++ "-v 189,raw48,High_Fly_Writes,HDD "
++ "-v 190,tempminmax,Airflow_Temperature_Cel "
++ "-v 191,raw48,G-Sense_Error_Rate,HDD "
++ "-v 192,raw48,Power-Off_Retract_Count "
++ "-v 193,raw48,Load_Cycle_Count,HDD "
++ "-v 194,tempminmax,Temperature_Celsius "
++ "-v 195,raw48,Hardware_ECC_Recovered "
++ "-v 196,raw16(raw16),Reallocated_Event_Count "
++ "-v 197,raw48,Current_Pending_Sector "
++ "-v 198,raw48,Offline_Uncorrectable "
++ "-v 199,raw48,UDMA_CRC_Error_Count "
++ "-v 200,raw48,Multi_Zone_Error_Rate,HDD "
++ "-v 201,raw48,Soft_Read_Error_Rate,HDD "
++ "-v 202,raw48,Data_Address_Mark_Errs,HDD "
++ "-v 203,raw48,Run_Out_Cancel "
++ "-v 204,raw48,Soft_ECC_Correction "
++ "-v 205,raw48,Thermal_Asperity_Rate "
++ "-v 206,raw48,Flying_Height,HDD "
++ "-v 207,raw48,Spin_High_Current,HDD "
++ "-v 208,raw48,Spin_Buzz,HDD "
++ "-v 209,raw48,Offline_Seek_Performnce,HDD "
++ // 210-219 Unknown_Attribute
++ "-v 220,raw48,Disk_Shift,HDD "
++ "-v 221,raw48,G-Sense_Error_Rate,HDD "
++ "-v 222,raw48,Loaded_Hours,HDD "
++ "-v 223,raw48,Load_Retry_Count,HDD "
++ "-v 224,raw48,Load_Friction,HDD "
++ "-v 225,raw48,Load_Cycle_Count,HDD "
++ "-v 226,raw48,Load-in_Time,HDD "
++ "-v 227,raw48,Torq-amp_Count,HDD "
++ "-v 228,raw48,Power-off_Retract_Count "
++ // 229 Unknown_Attribute
++ "-v 230,raw48,Head_Amplitude,HDD "
++ "-v 231,raw48,Temperature_Celsius "
++ "-v 232,raw48,Available_Reservd_Space "
++ "-v 233,raw48,Media_Wearout_Indicator,SSD "
++ // 234-239 Unknown_Attribute
++ "-v 240,raw24(raw8),Head_Flying_Hours,HDD "
++ "-v 241,raw48,Total_LBAs_Written "
++ "-v 242,raw48,Total_LBAs_Read "
++ // 243-249 Unknown_Attribute
++ "-v 250,raw48,Read_Error_Retry_Rate "
++ // 251-253 Unknown_Attribute
++ "-v 254,raw48,Free_Fall_Sensor,HDD"
++ },
+ };
+
+-const unsigned builtin_knowndrives_size =
+- sizeof(builtin_knowndrives) / sizeof(builtin_knowndrives[0]);
++const unsigned builtin_knowndrives_size = 1;
+
+ /// Drive database class. Stores custom entries read from file.
+ /// Provides transparent access to concatenation of custom and
--- /dev/null
+#
+# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/)
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=ssdeep
+PKG_VERSION:=2.14.1
+PKG_RELEASE=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://github.com/ssdeep-project/ssdeep/releases/download/release-$(PKG_VERSION)/
+PKG_HASH:=ff2eabc78106f009b4fb2def2d76fb0ca9e12acf624cbbfad9b3eb390d931313
+
+PKG_FIXUP:=autoreconf
+PKG_BUILD_PARALLEL:=1
+
+PKG_LICENSE:=GPL-2.0
+PKG_LICENSE_FILES:=COPYING
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+
+include $(INCLUDE_DIR)/uclibc++.mk
+include $(INCLUDE_DIR)/package.mk
+
+define Package/ssdeep
+ SECTION:=utils
+ CATEGORY:=Utilities
+ TITLE:=A program to compute and match fuzzy hashes
+ URL:=https://ssdeep-project.github.io/ssdeep
+ DEPENDS:=$(CXX_DEPENDS)
+endef
+
+define Package/ssdeep/description
+ ssdeep is a program for computing context triggered piecewise hashes (CTPH). Also called fuzzy hashes, CTPH can match inputs that have homologies.
+endef
+
+define Package/ssdeep/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/ssdeep $(1)/usr/bin/
+endef
+
+$(eval $(call BuildPackage,ssdeep))
include $(TOPDIR)/rules.mk
PKG_NAME:=sumo
-PKG_VERSION:=0.27.1
+PKG_VERSION:=1.1.0
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-src-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/sumo
-PKG_HASH:=4494190bd6570646df7a020befe25bc66355377273d922753685737c0d38bfdf
-PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
+PKG_HASH:=68630b6879a3331683443e8044cb0a81e5919f9e4cfb80722933da85b84e542e
+PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
PKG_LICENSE:=GPL-3.0
PKG_LICENSE_FILES:=COPYING
include $(INCLUDE_DIR)/package.mk
-CONFIGURE_ARGS += \
- --with-xerces=$(STAGING_DIR)/usr \
- --disable-debug \
- --disable-dependency-tracking \
- --disable-silent-rules
-
-TARGET_CXXFLAGS+=-fpermissive
-
define Package/sumo
SECTION:=utils
CATEGORY:=Utilities
TITLE:=SUMO - Simulation of Urban MObility
- URL:=http://sumo-sim.org/
- DEPENDS:=+libstdcpp +libxerces-c
+ URL:=https://sumo.dlr.de/
+ DEPENDS:=+libxerces-c
endef
define Package/sumo/description
various APIs to remotely control the simulation.
endef
+CONFIGURE_ARGS += \
+ --with-xerces=$(STAGING_DIR)/usr \
+ --disable-debug \
+ --disable-dependency-tracking \
+ --disable-silent-rules
+
define Package/sumo/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{activitygen,dfrouter,duarouter,emissionsDrivingCycle,emissionsMap,jtrrouter,marouter,netconvert,netgenerate,od2trips,polyconvert,TraCITestClient} $(1)/usr/bin
--- a/configure.ac
+++ b/configure.ac
-@@ -117,11 +117,6 @@ dnl - - - - - - - - - - - - - - - - - -
+@@ -87,11 +87,6 @@ dnl - - - - - - - - - - - - - - - - - -
case "$host" in
x86-*-linux* | ia64-*-linux* | i586-*-linux* | i686-*-linux* | x86_64-*-linux*)
dnl Make sure we are on architecture that supports SIMD
-#
+#
# Copyright (C) 2006-2013 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
include $(TOPDIR)/rules.mk
PKG_NAME:=swig
-PKG_VERSION:=3.0.12
-PKG_RELEASE:=2
+PKG_VERSION:=4.0.0
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/$(PKG_NAME)
-PKG_HASH:=7cf9f447ae7ed1c51722efc45e7f14418d15d7a1e143ac9f09a668999f4fc94d
+PKG_HASH:=e8a39cd6437e342cdcbd5af27a9bf11b62dc9efec9248065debcb8276fcbb925
PKG_INSTALL:=1
PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>, Hirokazu MORIKAWA <morikw2@gmail.com>
+++ /dev/null
-From 1a5aadcd66e85c63d228bfd811a521d617c22a38 Mon Sep 17 00:00:00 2001
-From: Patrick Schneider <patrick.schneider@meetnow.eu>
-Date: Thu, 13 Apr 2017 15:02:53 +0200
-Subject: [PATCH] Add Node 7.x aka V8 5.2+ support
-
-* Use WeakCallbackInfo instead of WeakCallbackData
-* Use GetPrivate instead of GetHiddenValue
-* Adopted new signature for SetWeak to support destructor calling
-* SetAccessor deprecation fixed
-* Proper version checks where applicable
-
-Upstream-Status: Submitted [https://github.com/swig/swig/pull/968]
-
-Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
----
- Lib/javascript/v8/javascriptcode.swg | 27 +++++++++++++++++-----
- Lib/javascript/v8/javascripthelpers.swg | 29 +++++++++++++++++++++---
- Lib/javascript/v8/javascriptinit.swg | 16 +++++++++++--
- Lib/javascript/v8/javascriptrun.swg | 40 ++++++++++++++++++++++++++++-----
- 4 files changed, 95 insertions(+), 17 deletions(-)
-
-diff --git a/Lib/javascript/v8/javascriptcode.swg b/Lib/javascript/v8/javascriptcode.swg
-index fb7d55c..b8c5089 100644
---- a/Lib/javascript/v8/javascriptcode.swg
-+++ b/Lib/javascript/v8/javascriptcode.swg
-@@ -133,10 +133,13 @@ static void $jswrapper(v8::Isolate *isolate, v8::Persistent<v8::Value> object, v
- SWIGV8_Proxy *proxy = static_cast<SWIGV8_Proxy *>(parameter);
- #elif (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION)
- static void $jswrapper(v8::Isolate *isolate, v8::Persistent<v8::Object> *object, SWIGV8_Proxy *proxy) {
--#else
-+#elif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
- static void $jswrapper(const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &data) {
- v8::Local<v8::Object> object = data.GetValue();
- SWIGV8_Proxy *proxy = data.GetParameter();
-+#else
-+ static void $jswrapper(const v8::WeakCallbackInfo<SWIGV8_Proxy> &data) {
-+ SWIGV8_Proxy *proxy = data.GetParameter();
- #endif
-
- if(proxy->swigCMemOwn && proxy->swigCObject) {
-@@ -147,7 +150,9 @@ static void $jswrapper(const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &dat
- }
- delete proxy;
-
-+#if (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
- object.Clear();
-+#endif
-
- #if (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < 0x031710)
- object.Dispose();
-@@ -155,7 +160,7 @@ static void $jswrapper(const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &dat
- object.Dispose(isolate);
- #elif (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < 0x032100)
- object->Dispose(isolate);
--#else
-+#elif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
- object->Dispose();
- #endif
- }
-@@ -177,10 +182,13 @@ static void $jswrapper(v8::Isolate *isolate, v8::Persistent<v8::Value> object, v
- SWIGV8_Proxy *proxy = static_cast<SWIGV8_Proxy *>(parameter);
- #elif (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION)
- static void $jswrapper(v8::Isolate *isolate, v8::Persistent< v8::Object> *object, SWIGV8_Proxy *proxy) {
--#else
-+#elif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
- static void $jswrapper(const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &data) {
- v8::Local<v8::Object> object = data.GetValue();
- SWIGV8_Proxy *proxy = data.GetParameter();
-+#else
-+static void $jswrapper(const v8::WeakCallbackInfo<SWIGV8_Proxy> &data) {
-+ SWIGV8_Proxy *proxy = data.GetParameter();
- #endif
-
- if(proxy->swigCMemOwn && proxy->swigCObject) {
-@@ -197,7 +205,7 @@ static void $jswrapper(const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &dat
- object->Dispose(isolate);
- #elif (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION)
- object->Dispose();
--#else
-+#elif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
- object.Clear();
- #endif
- }
-@@ -211,7 +219,11 @@ static void $jswrapper(const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &dat
- * ----------------------------------------------------------------------------- */
- %fragment("js_getter", "templates")
- %{
-+#if (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
- static SwigV8ReturnValue $jswrapper(v8::Local<v8::String> property, const SwigV8PropertyCallbackInfo &info) {
-+#else
-+static SwigV8ReturnValue $jswrapper(v8::Local<v8::Name> property, const SwigV8PropertyCallbackInfo &info) {
-+#endif
- SWIGV8_HANDLESCOPE();
-
- v8::Handle<v8::Value> jsresult;
-@@ -233,8 +245,11 @@ fail:
- * ----------------------------------------------------------------------------- */
- %fragment("js_setter", "templates")
- %{
--static void $jswrapper(v8::Local<v8::String> property, v8::Local<v8::Value> value,
-- const SwigV8PropertyCallbackInfoVoid &info) {
-+#if (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
-+static void $jswrapper(v8::Local<v8::String> property, v8::Local<v8::Value> value, const SwigV8PropertyCallbackInfoVoid &info) {
-+#else
-+static void $jswrapper(v8::Local<v8::Name> property, v8::Local<v8::Value> value, const SwigV8PropertyCallbackInfoVoid &info) {
-+#endif
- SWIGV8_HANDLESCOPE();
-
- $jslocals
-diff --git a/Lib/javascript/v8/javascripthelpers.swg b/Lib/javascript/v8/javascripthelpers.swg
-index 091467d..7461079 100644
---- a/Lib/javascript/v8/javascripthelpers.swg
-+++ b/Lib/javascript/v8/javascripthelpers.swg
-@@ -6,11 +6,16 @@ typedef v8::InvocationCallback SwigV8FunctionCallback;
- typedef v8::AccessorGetter SwigV8AccessorGetterCallback;
- typedef v8::AccessorSetter SwigV8AccessorSetterCallback;
- typedef v8::AccessorInfo SwigV8PropertyCallbackInfoVoid;
--#else
-+#elif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
- typedef v8::FunctionCallback SwigV8FunctionCallback;
- typedef v8::AccessorGetterCallback SwigV8AccessorGetterCallback;
- typedef v8::AccessorSetterCallback SwigV8AccessorSetterCallback;
- typedef v8::PropertyCallbackInfo<void> SwigV8PropertyCallbackInfoVoid;
-+#else
-+typedef v8::FunctionCallback SwigV8FunctionCallback;
-+typedef v8::AccessorNameGetterCallback SwigV8AccessorGetterCallback;
-+typedef v8::AccessorNameSetterCallback SwigV8AccessorSetterCallback;
-+typedef v8::PropertyCallbackInfo<void> SwigV8PropertyCallbackInfoVoid;
- #endif
-
- /**
-@@ -65,18 +70,36 @@ SWIGRUNTIME void SWIGV8_AddStaticFunction(v8::Handle<v8::Object> obj, const char
- */
- SWIGRUNTIME void SWIGV8_AddStaticVariable(v8::Handle<v8::Object> obj, const char* symbol,
- SwigV8AccessorGetterCallback getter, SwigV8AccessorSetterCallback setter) {
-+#if (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
- obj->SetAccessor(SWIGV8_SYMBOL_NEW(symbol), getter, setter);
-+#else
-+ obj->SetAccessor(SWIGV8_CURRENT_CONTEXT(), SWIGV8_SYMBOL_NEW(symbol), getter, setter);
-+#endif
- }
-
--SWIGRUNTIME void JS_veto_set_variable(v8::Local<v8::String> property, v8::Local<v8::Value> value,
-- const SwigV8PropertyCallbackInfoVoid& info)
-+#if (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
-+SWIGRUNTIME void JS_veto_set_variable(v8::Local<v8::String> property, v8::Local<v8::Value> value, const SwigV8PropertyCallbackInfoVoid& info)
-+#else
-+SWIGRUNTIME void JS_veto_set_variable(v8::Local<v8::Name> property, v8::Local<v8::Value> value, const SwigV8PropertyCallbackInfoVoid& info)
-+#endif
- {
- char buffer[256];
- char msg[512];
- int res;
-
-+#if (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
- property->WriteUtf8(buffer, 256);
- res = sprintf(msg, "Tried to write read-only variable: %s.", buffer);
-+#else
-+ v8::Local<v8::String> sproperty;
-+ if (property->ToString(SWIGV8_CURRENT_CONTEXT()).ToLocal(&sproperty)) {
-+ sproperty->WriteUtf8(buffer, 256);
-+ res = sprintf(msg, "Tried to write read-only variable: %s.", buffer);
-+ }
-+ else {
-+ res = -1;
-+ }
-+#endif
-
- if(res<0) {
- SWIG_exception(SWIG_ERROR, "Tried to write read-only variable.");
-diff --git a/Lib/javascript/v8/javascriptinit.swg b/Lib/javascript/v8/javascriptinit.swg
-index 34befa7..86008d9 100644
---- a/Lib/javascript/v8/javascriptinit.swg
-+++ b/Lib/javascript/v8/javascriptinit.swg
-@@ -7,15 +7,27 @@ SWIG_V8_SetModule(void *, swig_module_info *swig_module) {
- v8::Local<v8::Object> global_obj = SWIGV8_CURRENT_CONTEXT()->Global();
- v8::Local<v8::External> mod = SWIGV8_EXTERNAL_NEW(swig_module);
- assert(!mod.IsEmpty());
-+#if (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
- global_obj->SetHiddenValue(SWIGV8_STRING_NEW("swig_module_info_data"), mod);
-+#else
-+ v8::Local<v8::Private> privateKey = v8::Private::ForApi(v8::Isolate::GetCurrent(), SWIGV8_STRING_NEW("swig_module_info_data"));
-+ global_obj->SetPrivate(SWIGV8_CURRENT_CONTEXT(), privateKey, mod);
-+#endif
- }
-
- SWIGRUNTIME swig_module_info *
- SWIG_V8_GetModule(void *) {
- v8::Local<v8::Object> global_obj = SWIGV8_CURRENT_CONTEXT()->Global();
-+#if (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
- v8::Local<v8::Value> moduleinfo = global_obj->GetHiddenValue(SWIGV8_STRING_NEW("swig_module_info_data"));
-+#else
-+ v8::Local<v8::Private> privateKey = v8::Private::ForApi(v8::Isolate::GetCurrent(), SWIGV8_STRING_NEW("swig_module_info_data"));
-+ v8::Local<v8::Value> moduleinfo;
-+ if (!global_obj->GetPrivate(SWIGV8_CURRENT_CONTEXT(), privateKey).ToLocal(&moduleinfo))
-+ return 0;
-+#endif
-
-- if (moduleinfo.IsEmpty())
-+ if (moduleinfo.IsEmpty() || moduleinfo->IsNull() || moduleinfo->IsUndefined())
- {
- // It's not yet loaded
- return 0;
-@@ -23,7 +35,7 @@ SWIG_V8_GetModule(void *) {
-
- v8::Local<v8::External> moduleinfo_extern = v8::Local<v8::External>::Cast(moduleinfo);
-
-- if (moduleinfo_extern.IsEmpty())
-+ if (moduleinfo_extern.IsEmpty() || moduleinfo_extern->IsNull() || moduleinfo_extern->IsUndefined())
- {
- // Something's not right
- return 0;
-diff --git a/Lib/javascript/v8/javascriptrun.swg b/Lib/javascript/v8/javascriptrun.swg
-index 5ac52a5..30002c0 100644
---- a/Lib/javascript/v8/javascriptrun.swg
-+++ b/Lib/javascript/v8/javascriptrun.swg
-@@ -193,8 +193,10 @@ public:
- void (*dtor) (v8::Isolate *isolate, v8::Persistent< v8::Value> object, void *parameter);
- #elif (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION)
- void (*dtor) (v8::Isolate *isolate, v8::Persistent< v8::Object > *object, SWIGV8_Proxy *proxy);
--#else
-+#elif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
- void (*dtor) (const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &data);
-+#else
-+ void (*dtor) (const v8::WeakCallbackInfo<SWIGV8_Proxy> &data);
- #endif
- };
-
-@@ -241,9 +243,12 @@ SWIGRUNTIME void SWIGV8_Proxy_DefaultDtor(v8::Isolate *, v8::Persistent< v8::Val
- SWIGV8_Proxy *proxy = static_cast<SWIGV8_Proxy *>(parameter);
- #elif (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION)
- SWIGRUNTIME void SWIGV8_Proxy_DefaultDtor(v8::Isolate *, v8::Persistent< v8::Object > *object, SWIGV8_Proxy *proxy) {
--#else
-+#elif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
- SWIGRUNTIME void SWIGV8_Proxy_DefaultDtor(const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &data) {
- SWIGV8_Proxy *proxy = data.GetParameter();
-+#else
-+SWIGRUNTIME void SWIGV8_Proxy_DefaultDtor(const v8::WeakCallbackInfo<SWIGV8_Proxy> &data) {
-+ SWIGV8_Proxy *proxy = data.GetParameter();
- #endif
-
- delete proxy;
-@@ -312,12 +317,18 @@ SWIGRUNTIME void SWIGV8_SetPrivateData(v8::Handle<v8::Object> obj, void *ptr, sw
- } else {
- cdata->handle.MakeWeak(cdata, SWIGV8_Proxy_DefaultDtor);
- }
--#else
-+#elifif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
- if(cdata->swigCMemOwn && (SWIGV8_ClientData*)info->clientdata) {
- cdata->handle.SetWeak(cdata, ((SWIGV8_ClientData*)info->clientdata)->dtor);
- } else {
- cdata->handle.SetWeak(cdata, SWIGV8_Proxy_DefaultDtor);
- }
-+#else
-+ if(cdata->swigCMemOwn && (SWIGV8_ClientData*)info->clientdata) {
-+ cdata->handle.SetWeak(cdata, ((SWIGV8_ClientData*)info->clientdata)->dtor, v8::WeakCallbackType::kParameter);
-+ } else {
-+ cdata->handle.SetWeak(cdata, SWIGV8_Proxy_DefaultDtor, v8::WeakCallbackType::kParameter);
-+ }
- #endif
-
- #if (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < 0x031710)
-@@ -470,7 +481,14 @@ int SwigV8Packed_Check(v8::Handle<v8::Value> valRef) {
-
- v8::Handle<v8::Object> objRef = valRef->ToObject();
- if(objRef->InternalFieldCount() < 1) return false;
-+#if (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
- v8::Handle<v8::Value> flag = objRef->GetHiddenValue(SWIGV8_STRING_NEW("__swig__packed_data__"));
-+#else
-+ v8::Local<v8::Private> privateKey = v8::Private::ForApi(v8::Isolate::GetCurrent(), SWIGV8_STRING_NEW("__swig__packed_data__"));
-+ v8::Local<v8::Value> flag;
-+ if (!objRef->GetPrivate(SWIGV8_CURRENT_CONTEXT(), privateKey).ToLocal(&flag))
-+ return false;
-+#endif
- return (flag->IsBoolean() && flag->BooleanValue());
- }
-
-@@ -519,10 +537,13 @@ SWIGRUNTIME void _wrap_SwigV8PackedData_delete(v8::Isolate *isolate, v8::Persist
- SwigV8PackedData *cdata = static_cast<SwigV8PackedData *>(parameter);
- #elif (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION)
- SWIGRUNTIME void _wrap_SwigV8PackedData_delete(v8::Isolate *isolate, v8::Persistent<v8::Object> *object, SwigV8PackedData *cdata) {
--#else
-+#elif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
- SWIGRUNTIME void _wrap_SwigV8PackedData_delete(const v8::WeakCallbackData<v8::Object, SwigV8PackedData> &data) {
- v8::Local<v8::Object> object = data.GetValue();
- SwigV8PackedData *cdata = data.GetParameter();
-+#else
-+SWIGRUNTIME void _wrap_SwigV8PackedData_delete(const v8::WeakCallbackInfo<SwigV8PackedData> &data) {
-+ SwigV8PackedData *cdata = data.GetParameter();
- #endif
-
- delete cdata;
-@@ -537,7 +558,7 @@ SWIGRUNTIME void _wrap_SwigV8PackedData_delete(const v8::WeakCallbackData<v8::Ob
- object->Dispose(isolate);
- #elif (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION)
- object->Dispose();
--#else
-+#elif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
- object.Clear();
- #endif
- }
-@@ -550,7 +571,12 @@ v8::Handle<v8::Value> SWIGV8_NewPackedObj(void *data, size_t size, swig_type_inf
- // v8::Handle<v8::Object> obj = SWIGV8_OBJECT_NEW();
- v8::Local<v8::Object> obj = SWIGV8_OBJECT_NEW();
-
-+#if (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
- obj->SetHiddenValue(SWIGV8_STRING_NEW("__swig__packed_data__"), SWIGV8_BOOLEAN_NEW(true));
-+#else
-+ v8::Local<v8::Private> privateKey = v8::Private::ForApi(v8::Isolate::GetCurrent(), SWIGV8_STRING_NEW("__swig__packed_data__"));
-+ obj->SetPrivate(SWIGV8_CURRENT_CONTEXT(), privateKey, SWIGV8_BOOLEAN_NEW(true));
-+#endif
-
- #if (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < 0x031511)
- obj->SetPointerInInternalField(0, cdata);
-@@ -573,9 +599,11 @@ v8::Handle<v8::Value> SWIGV8_NewPackedObj(void *data, size_t size, swig_type_inf
- cdata->handle.MakeWeak(v8::Isolate::GetCurrent(), cdata, _wrap_SwigV8PackedData_delete);
- #elif (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION)
- cdata->handle.MakeWeak(cdata, _wrap_SwigV8PackedData_delete);
--#else
-+#elif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
- cdata->handle.SetWeak(cdata, _wrap_SwigV8PackedData_delete);
- // v8::V8::SetWeak(&cdata->handle, cdata, _wrap_SwigV8PackedData_delete);
-+#else
-+ cdata->handle.SetWeak(cdata, _wrap_SwigV8PackedData_delete, v8::WeakCallbackType::kParameter);
- #endif
-
- #if (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < 0x031710)
---
-2.9.5
-
include $(TOPDIR)/rules.mk
PKG_NAME:=sysstat
-PKG_VERSION:=12.0.2
+PKG_VERSION:=12.0.5
PKG_RELEASE:=1
PKG_LICENSE:=GPL-2.0
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=http://pagesperso-orange.fr/sebastien.godard/
-PKG_HASH:=2d30947c8fabbb5015c229fbc149f2891db4926cdf165e5f099310795d8dac80
+PKG_HASH:=58583b0776b9addec69e42eebd6dd1a8e976da8a36bad2422659a1ad6c1a2600
PKG_INSTALL:=1
SYSSTAT_CFG="/etc/sysstat/sysstat"
validate_sysstat_section() {
- uci_validate_section sysstat sysstat "${1}" \
+ uci_load_validate sysstat sysstat "$1" "$2" \
'log_history:uinteger' \
'compressafter:uinteger' \
'sadc_options:string' \
'enabled:string'
}
-start_service() {
-
- local log_history compressafter sadc_options sa_dir zip enabled
-
- validate_sysstat_section sysstat || {
+start_sysstat_instance() {
+ [ "$2" = 0 ] || {
echo "validation failed"
return 1
}
procd_close_instance
}
+start_service() {
+ validate_sysstat_section sysstat start_sysstat_instance
+}
+
service_triggers()
{
procd_add_reload_trigger "sysstat"
--- a/sa_common.c
+++ b/sa_common.c
-@@ -28,6 +28,7 @@
+@@ -29,6 +29,7 @@
#include <dirent.h>
#include <fcntl.h>
#include <libgen.h>
--- /dev/null
+#
+# Author: Tibor Dudlák
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=tang
+PKG_VERSION:=6
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=https://github.com/latchset/$(PKG_NAME)/releases/download/v$(PKG_VERSION)/
+PKG_HASH:=1df78b48a52d2ca05656555cfe52bd4427c884f5a54a2c5e37a7b39da9e155e3
+
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
+
+PKG_FIXUP:=autoreconf
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/tang
+ SECTION:=utils
+ TITLE:=tang v$(PKG_VERSION) - daemon for binding data to the presence of a third party
+ DEPENDS:=+libhttp-parser +xinetd +jose +bash
+ URL:=https://github.com/latchset/tang
+ MAINTAINER:=Tibor Dudlák <tibor.dudlak@gmail.com>
+endef
+
+define Package/tang/description
+ Tang is a small daemon for binding data to the presence of a third party.
+endef
+
+define Package/tang/conffiles
+/etc/xinetd.d/tangdx
+/usr/share/tang/db/
+endef
+
+define Package/tang/install
+ $(INSTALL_DIR) $(1)/usr/libexec
+ $(INSTALL_DIR) $(1)/etc/xinetd.d/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/tangd* $(1)/usr/libexec/
+ $(INSTALL_BIN) ./files/tangdw $(1)/usr/libexec/
+ $(CP) ./files/tangdx $(1)/etc/xinetd.d/
+endef
+
+define Package/tang/postinst
+#!/bin/sh
+if [ -z "$${IPKG_INSTROOT}" ]; then
+ mkdir -p /usr/share/tang/db && mkdir -p /usr/share/tang/cache
+ KEYS=$(find /usr/share/tang/db/ -name "*.jw*" -maxdepth 1 | wc -l)
+ if [ "${KEYS}" = "0" ]; then # if db is empty generate new key pair
+ /usr/libexec/tangd-keygen /usr/share/tang/db/
+ elif [ "${KEYS}" = "1" ]; then # having 1 key should not happen
+ (>&2 echo "Please check the Tang's keys in /usr/share/tang/db \
+and regenate cache using /usr/libexec/tangd-update script.")
+ else
+ /usr/libexec/tangd-update /usr/share/tang/db/ /usr/share/tang/cache/
+ fi
+ (cat /etc/services | grep -E "tangd.*8888\/tcp") > /dev/null \
+ || echo -e "tangd\t\t8888/tcp" >> /etc/services
+fi
+endef
+
+$(eval $(call BuildPackage,tang))
--- /dev/null
+#!/bin/sh
+echo "==================================" >> /var/log/tangd.log
+echo `date`: >> /var/log/tangd.log
+/usr/libexec/tangd $1 2>> /var/log/tangd.log
--- /dev/null
+service tangd
+{
+ port = 8888
+ socket_type = stream
+ wait = no
+ user = root
+ server = /usr/libexec/tangdw
+ server_args = /usr/share/tang/cache
+ log_on_success += USERID
+ log_on_failure += USERID
+ disable = no
+}
--- /dev/null
+diff --git a/Makefile.am b/Makefile.am
+index 14bf91d..dfa6d07 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1,5 +1,3 @@
+-DISTCHECK_CONFIGURE_FLAGS = --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir)
+-
+ AM_CFLAGS = @TANG_CFLAGS@ @jose_CFLAGS@
+ LDADD = @jose_LIBS@ @http_parser_LIBS@
+
+@@ -7,21 +5,11 @@ nagiosdir = $(libdir)/nagios/plugins
+ cachedir = $(localstatedir)/cache/$(PACKAGE_NAME)
+ jwkdir = $(localstatedir)/db/$(PACKAGE_NAME)
+
+-nodist_systemdsystemunit_DATA = \
+- units/tangd@.service \
+- units/tangd.socket \
+- units/tangd-update.path \
+- units/tangd-update.service \
+- units/tangd-keygen.service
+-
+ dist_libexec_SCRIPTS = src/tangd-update src/tangd-keygen
+ libexec_PROGRAMS = src/tangd
+-nagios_PROGRAMS = src/tang
+-man1_MANS = doc/tang-nagios.1
+ man8_MANS = doc/tang.8
+
+ src_tangd_SOURCES = src/http.c src/http.h src/tangd.c
+-src_tang_SOURCES = src/nagios.c
+
+ %: %.in
+ $(AM_V_GEN)mkdir -p "`dirname "$@"`"
+@@ -32,11 +20,9 @@ src_tang_SOURCES = src/nagios.c
+ $(srcdir)/$@.in > $@
+
+ AM_TESTS_ENVIRONMENT = SD_ACTIVATE="@SD_ACTIVATE@" PATH=$(srcdir)/src:$(builddir)/src:$(PATH)
+-TESTS = tests/adv tests/rec tests/nagios
++TESTS = tests/adv tests/rec
+
+-CLEANFILES = $(nodist_systemdsystemunit_DATA)
+ EXTRA_DIST = \
+- $(foreach unit,$(nodist_systemdsystemunit_DATA),$(unit).in) \
+ COPYING \
+ $(TESTS) \
+ $(man1_MANS) \
--- /dev/null
+diff --git a/configure.ac b/configure.ac
+index b51bb31..4b37d30 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -27,32 +27,6 @@ AC_CHECK_LIB([http_parser], [http_parser_execute],
+ [AC_MSG_ERROR([http-parser required!])])
+
+ PKG_CHECK_MODULES([jose], [jose >= 8])
+-PKG_CHECK_MODULES([systemd], [systemd])
+-
+-AC_ARG_WITH([systemdsystemunitdir],
+- [AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files])],
+- [],
+- [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)])
+-
+-AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
+-
+-for ac_prog in systemd-socket-activate systemd-activate; do
+- AC_CHECK_PROG([SD_ACTIVATE], [$ac_prog], [$as_dir/$ac_prog], [],
+- [$PATH$PATH_SEPARATOR$($PKG_CONFIG --variable=systemdutildir systemd)])
+- test -n "$SD_ACTIVATE" && break
+-done
+-
+-test -n "$SD_ACTIVATE" || AC_MSG_ERROR([systemd-socket-activate required!])
+-
+-AC_MSG_CHECKING([systemd-socket-activate inetd flag])
+-if $SD_ACTIVATE --help | grep -q inetd; then
+- SD_ACTIVATE="$SD_ACTIVATE --inetd"
+- AC_MSG_RESULT([--inetd])
+-else
+- AC_MSG_RESULT([(default)])
+-fi
+-
+-AC_SUBST(SD_ACTIVATE)
+
+ TANG_CFLAGS="\
+ -Wall \
--- /dev/null
+diff --git a/src/tangd-update b/src/tangd-update
+index 652dbef..01aa842 100755
+--- a/src/tangd-update
++++ b/src/tangd-update
+@@ -33,8 +33,8 @@ fi
+
+ [ ! -d "$2" ] && mkdir -p -m 0700 "$2"
+
+-src=`realpath "$1"`
+-dst=`realpath "$2"`
++src=`readlink -f "$1"`
++dst=`readlink -f "$2"`
+
+ payl=()
+ sign=()
include $(TOPDIR)/rules.mk
PKG_NAME:=tar
-PKG_VERSION:=1.30
+PKG_VERSION:=1.32
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@GNU/$(PKG_NAME)
-PKG_HASH:=f1bf92dbb1e1ab27911a861ea8dde8208ee774866c46c0bb6ead41f4d1f4d2d3
-PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
+PKG_HASH:=d0d3ae07f103323be809bc3eac0dcc386d52c5262499fe05511ac4788af1fdd8
+PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
PKG_LICENSE:=GPL-3.0
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:gnu:tar
+PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
PKG_BUILD_DEPENDS:=xz
DEPENDS:=+PACKAGE_TAR_POSIX_ACL:libacl +PACKAGE_TAR_XATTR:libattr +PACKAGE_TAR_BZIP2:bzip2
EXTRA_DEPENDS:=$(if $(CONFIG_PACKAGE_TAR_XZ),xz)
TITLE:=GNU tar
- URL:=http://www.gnu.org/software/tar/
+ URL:=https://www.gnu.org/software/tar/
MENU:=1
endef
include $(TOPDIR)/rules.mk
PKG_NAME:=taskwarrior
-PKG_VERSION:=2.4.4
+PKG_VERSION:=2.5.1
PKG_RELEASE:=1
-PKG_LICENSE:=MIT
-
PKG_SOURCE:=task-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://www.taskwarrior.org/download/
-PKG_HASH:=7ff406414e0be480f91981831507ac255297aab33d8246f98dbfd2b1b2df8e3b
-PKG_MAINTAINER:=Luka Perkov <luka@openwrt.org>
-
+PKG_SOURCE_URL:=https://www.taskwarrior.org/download
+PKG_HASH:=d87bcee58106eb8a79b850e9abc153d98b79e00d50eade0d63917154984f2a15
PKG_BUILD_DIR:=$(BUILD_DIR)/task-$(PKG_VERSION)
+PKG_MAINTAINER:=
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
SECTION:=utils
CATEGORY:=Utilities
DEPENDS:=+libstdcpp +libuuid +libgnutls
- URL:=http://taskwarrior.org/
+ URL:=https://taskwarrior.org/
endef
-TARGET_LDFLAGS += -ldl
-
define Package/taskwarrior/description
taskwarrior is a command-line todo list manager
endef
--- /dev/null
+#
+# Copyright (C) 2010 Telldus Technologies AB
+#
+# This is free software, licensed under the GNU General Public License v2.
+#
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=telldus-core
+PKG_VERSION:=2.1.2
+PKG_RELEASE:=2
+
+PKG_LICENSE:=LGPL-2.1
+PKG_BUILD_DEPENDS:=argp-standalone
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://download.telldus.com/TellStick/Software/telldus-core/
+PKG_HASH:=a20f6c74814afc23312d2c93ebbb37fdea9deaaee05ae7b6a6275e11e4662014
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/nls.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+define Package/telldus-core
+ SECTION:=utils
+ CATEGORY:=Utilities
+ TITLE:=Telldus TellStick USB interface
+ URL:=http://www.telldus.com
+ MAINTAINER:=Peter Liedholm <PeterFromSwe884@gmail.com>
+ DEPENDS:=+confuse +libftdi +libstdcpp $(ICONV_DEPENDS)
+endef
+
+define Package/telldus-core/description
+ Telldus driver for USB-based 433 MHz RF transceiver for home automation.
+ MUST be built with full language support, (don't know how to DEPEND that)
+endef
+
+CMAKE_OPTIONS+=\
+ -DBUILD_LIBTELLDUS-CORE=1 \
+ -DBUILD_TDTOOL=1 \
+ -DGENERATE_MAN=0 \
+ -DICONV_LIBRARY=-liconv
+
+TARGET_CXXFLAGS += -fpermissive
+
+define Package/telldus-core/conffiles
+/etc/tellstick.conf
+endef
+
+define Package/telldus-core/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/tdtool $(1)/usr/bin
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/telldusd $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/tdadmin $(1)/usr/sbin
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libtelldus* $(1)/usr/lib
+ $(INSTALL_DIR) $(1)/etc/config
+ $(INSTALL_CONF) ./files/tellstick.conf $(1)/etc
+ $(INSTALL_DIR) $(1)/etc/init.d
+ $(INSTALL_BIN) ./files/telldusd $(1)/etc/init.d
+endef
+
+$(eval $(call BuildPackage,telldus-core))
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+
+START=99
+
+USE_PROCD=1
+PROG=/usr/sbin/telldusd
+CONFFILE=/etc/tellstick.conf
+
+start_service() {
+ procd_open_instance
+ procd_set_param command $PROG
+ procd_append_param command --nodaemon # foreground required by procd
+ procd_set_param file $CONFFILE
+ procd_set_param term_timeout 10 # telldusd is slow to exit of some reason
+ procd_set_param respawn # respawn the service if it exits
+ procd_set_param stdout 1 # forward stdout of the command to logd
+ procd_set_param stderr 1 # same for stderr
+ procd_close_instance
+}
--- /dev/null
+user = "root"
+group = "root"
+ignoreControllerConfirmation = "false"
+device {
+ id = 1
+ name = "Example device"
+ protocol = "arctech"
+ model = "codeswitch"
+ parameters {
+ house = "A"
+ unit = "1"
+ }
+}
+
+# Example controller (tellstick duo)
+#controller {
+ #id=1
+ # name=""
+ #type=2
+ #serial="A501IVK7"
+#}
--- /dev/null
+Added missing includes required by openwrt. Expected to be portable.
+--- a/common/Socket_unix.cpp
++++ b/common/Socket_unix.cpp
+@@ -8,6 +8,7 @@
+ #include <stdio.h>
+ #include <unistd.h>
+ #include <sys/socket.h>
++#include <sys/select.h> // POSIX.1-2001
+ #include <sys/un.h>
+ #include <fcntl.h>
+ #include <math.h>
+--- a/service/ConnectionListener_unix.cpp
++++ b/service/ConnectionListener_unix.cpp
+@@ -13,6 +13,7 @@
+ #include <fcntl.h>
+ #include <errno.h>
+ #include <string>
++#include <cstring> // strcpy
+
+ #include "service/ConnectionListener.h"
+ #include "common/Socket.h"
--- /dev/null
+Added a typecast (signed/unsigned char problem). Should be portable.
+--- a/service/ProtocolIkea.cpp
++++ b/service/ProtocolIkea.cpp
+@@ -23,7 +23,7 @@ int ProtocolIkea::methods() const {
+
+ std::string ProtocolIkea::getStringForMethod(int method, unsigned char level, Controller *) {
+ const char B1[] = {84, 84, 0};
+- const char B0[] = {170, 0};
++ const char B0[] = {(char)170, 0};
+
+ int intSystem = this->getIntParameter(L"system", 1, 16)-1;
+ int intFadeStyle = TelldusCore::comparei(this->getStringParameter(L"fade", L"true"), L"true");
+--- a/service/ProtocolX10.cpp
++++ b/service/ProtocolX10.cpp
+@@ -22,7 +22,7 @@ int ProtocolX10::methods() const {
+ std::string ProtocolX10::getStringForMethod(int method, unsigned char data, Controller *controller) {
+ const unsigned char S = 59, L = 169;
+ const char B0[] = {S, S, 0};
+- const char B1[] = {S, L, 0};
++ const char B1[] = {S, (char)L, 0};
+ const unsigned char START_CODE[] = {'S', 255, 1, 255, 1, 255, 1, 100, 255, 1, 180, 0};
+ const unsigned char STOP_CODE[] = {S, 0};
+
--- /dev/null
+Added a missing initialisation that under special circumstanses causes seg fault.
+--- a/service/SettingsConfuse.cpp
++++ b/service/SettingsConfuse.cpp
+@@ -435,6 +435,7 @@ bool readVarConfig(cfg_t **cfg) {
+
+ FILE *fp = fopen(VAR_CONFIG_FILE, "re"); // e for setting O_CLOEXEC on the file handle
+ if (!fp) {
++ (*cfg) = 0;
+ Log::warning("Unable to open var config file, %s", VAR_CONFIG_FILE);
+ return false;
+ }
--- /dev/null
+Adopted to OpenWrt target. Most likely these changes go elsewhere when done right.
+--- a/service/CMakeLists.txt
++++ b/service/CMakeLists.txt
+@@ -98,7 +98,7 @@ IF (UNIX AND NOT APPLE)
+ IF (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
+ SET(DEFAULT_STATE_INSTALL_DIR "/var/spool")
+ ELSE ()
+- SET(DEFAULT_STATE_INSTALL_DIR "/var/state")
++ SET(DEFAULT_STATE_INSTALL_DIR "/tmp/state") # OpenWrt has var as symlink to tmp
+ ENDIF ()
+ SET(STATE_INSTALL_DIR "${DEFAULT_STATE_INSTALL_DIR}" CACHE PATH "The directory to store state information of the devices")
+
+--- a/tdadmin/CMakeLists.txt
++++ b/tdadmin/CMakeLists.txt
+@@ -38,8 +38,11 @@ ELSEIF (CMAKE_SYSTEM_NAME MATCHES "FreeB
+ ${ARGP_LIBRARY}
+ )
+ ELSE (WIN32)
++ # Linux, in this case openwrt that requires argp-standalone
++ FIND_LIBRARY(ARGP_LIBRARY argp)
+ TARGET_LINK_LIBRARIES(tdadmin
+ ${CMAKE_BINARY_DIR}/client/libtelldus-core.so
++ ${ARGP_LIBRARY}
+ )
+ ENDIF (WIN32)
+
+--- a/common/CMakeLists.txt
++++ b/common/CMakeLists.txt
+@@ -66,12 +66,16 @@ ELSEIF (CMAKE_SYSTEM_NAME MATCHES "FreeB
+ )
+ ELSE (APPLE)
+ #### Linux ####
++ #FIND_LIBRARY(ICONV_LIBRARY iconv) Does not work
+ ADD_DEFINITIONS( -D_LINUX )
+ LIST(APPEND telldus-common_SRCS
+ Event_unix.cpp
+ EventHandler_unix.cpp
+ Socket_unix.cpp
+ )
++ LIST(APPEND telldus-common_LIBRARIES
++ ${ICONV_LIBRARY}
++ )
+ ENDIF (APPLE)
+
+
--- /dev/null
+On OpenWrt targets the tmp filesystem is wiped upon power cycle, so files
+requires to be created.
+--- a/service/SettingsConfuse.cpp
++++ b/service/SettingsConfuse.cpp
+@@ -436,6 +436,13 @@ bool readVarConfig(cfg_t **cfg) {
+ FILE *fp = fopen(VAR_CONFIG_FILE, "re"); // e for setting O_CLOEXEC on the file handle
+ if (!fp) {
+ (*cfg) = 0;
++ fp = fopen(VAR_CONFIG_FILE, "we"); // If missing, create file if possible
++ if(fp) {
++ fclose(fp);
++ }
++ else {
++ Log::warning("Unable to create var config file, %s", VAR_CONFIG_FILE);
++ }
+ Log::warning("Unable to open var config file, %s", VAR_CONFIG_FILE);
+ return false;
+ }
include $(TOPDIR)/rules.mk
PKG_NAME:=temperusb
-PKG_VERSION:=2.0
+PKG_VERSION:=2.3
PKG_RELEASE:=1
PKG_CONFIG_DEPENDS:=libusb
PKG_BUILD_DIR:=$(BUILD_DIR)/temperv14-$(PKG_VERSION)
PKG_SOURCE_URL:=https://codeload.github.com/Arduous/temperv14/tar.gz/v${PKG_VERSION}?
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=a8f4ef76a2def5a2e3ec351828a042ce8f7a0963eaa6d9d8ce0c8313e2b54526
-PKG_LICENSE:=BSD-1-Clause
-PKG_LICENSE_FILES:=temperv14.c
+PKG_HASH:=3319026e0d5c42aebe9a75a23593f181c29d0ec9d544fac90b7ba886269ff246
+PKG_LICENSE:=BSD-2-Clause
+PKG_LICENSE_FILES:=LICENSE
PKG_MAINTAINER := Samuel Progin <samuel.progin@gmail.com>
define Package/temperusb/description
RDing TEMPer v1.4 USB thermometer are cheap devices that can be sourced everywhere on
- the Internet. This package allow to operate them from user space.
+ the Internet. This package allows to operate them from user space.
endef
define Package/temperusb/install
$(INSTALL_DIR) $(1)/usr/bin
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/temperv14 $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/temperusb $(1)/usr/bin
endef
$(eval $(call BuildPackage,temperusb))
-#
-# Copyright (C) 2009-2016 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
include $(TOPDIR)/rules.mk
PKG_NAME:=tmux
-PKG_VERSION:=2.8
+PKG_VERSION:=2.9a
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/tmux/tmux/releases/download/$(PKG_VERSION)
-PKG_HASH:=7f6bf335634fafecff878d78de389562ea7f73a7367f268b66d37ea13617a2ba
+PKG_HASH:=839d167a4517a6bffa6b6074e89a9a8630547b2dea2086f1fad15af12ab23b25
PKG_MAINTAINER:=Maxim Storchak <m.storchak@gmail.com>
PKG_LICENSE:=ISC
PKG_NAME:=ttyd
PKG_VERSION:=1.4.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_URL:=https://codeload.github.com/tsl0922/ttyd/tar.gz/$(PKG_VERSION)?
-PKG_SOURCE_VERSION=$(PKG_VERSION)
-PKG_HASH=ff1a66b418df6cd741868a8ea84f69cd63f15e52e3fa117641ec57d3c37a1315
+PKG_HASH:=ff1a66b418df6cd741868a8ea84f69cd63f15e52e3fa117641ec57d3c37a1315
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE
+PKG_BUILD_DEPENDS:=vim/host
CMAKE_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
include $(TOPDIR)/rules.mk
PKG_NAME:=unrar
-PKG_VERSION:=5.6.8
+PKG_VERSION:=5.7.5
PKG_RELEASE:=1
PKG_SOURCE:=unrarsrc-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://www.rarlab.com/rar
-PKG_HASH:=a4cc0ac14a354827751912d2af4a0a09e2c2129df5766576fa7e151791dd3dff
+PKG_HASH:=e1c2fddaa87a88b1535bfc10ca484f3c5af4e5a55fbb933f8819e26203bbe2ee
PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>, \
Ted Hess <thess@kitschensync.net>
include $(INCLUDE_DIR)/uclibc++.mk
include $(INCLUDE_DIR)/package.mk
+ifeq ($(CONFIG_USE_UCLIBCXX),y)
+TARGET_LDFLAGS +=-nodefaultlibs
+endif
+TARGET_CXXFLAGS +=-fno-rtti -flto
+TARGET_LDFLAGS +=$(FPIC) -Wl,--gc-sections
+
define Package/unrar/Default
TITLE:=UnRAR
SUBMENU:=Compression
archives
endef
-MAKE_FLAGS += \
- LDFLAGS="$(TARGET_LDFLAGS) -lpthread"
-
ifeq ($(BUILD_VARIANT),lib)
define Build/Compile
$(call Build/Compile/Default,lib)
--- a/makefile
+++ b/makefile
-@@ -2,13 +2,13 @@
+@@ -2,14 +2,14 @@
# Makefile for UNIX - unrar
# Linux using GCC
-CXX=c++
-CXXFLAGS=-O2 -Wno-logical-op-parentheses -Wno-switch -Wno-dangling-else
-+#CXX=c++
-+#CXXFLAGS=-O2 -Wno-logical-op-parentheses -Wno-switch -Wno-dangling-else
- LIBFLAGS=-fPIC
+-LIBFLAGS=-fPIC
++CXX?=c++
++CXXFLAGS?=-O2 -Wno-logical-op-parentheses -Wno-switch -Wno-dangling-else
++LIBFLAGS?=-fPIC
DEFINES=-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DRAR_SMP
- STRIP=strip
- AR=ar
+-STRIP=strip
+-AR=ar
-LDFLAGS=-pthread
-+LDFLAGS=-lpthread
- DESTDIR=/usr
+-DESTDIR=/usr
++STRIP?=strip
++AR?=ar
++LDFLAGS?=-lpthread
++DESTDIR?=/usr
# Linux using LCC
+ #CXX=lcc
@@ -166,7 +166,7 @@ uninstall-unrar:
rm -f $(DESTDIR)/bin/unrar
include $(TOPDIR)/rules.mk
PKG_NAME:=usbmuxd
-PKG_VERSION:=1.1.1
-PKG_RELEASE:=4
-PKG_SOURCE_PROTO:=git
+PKG_SOURCE_DATE:=2019-03-04
+PKG_SOURCE_VERSION:=b1b0bf390363fa36aff1bc09443ff751943b9c34
+PKG_RELEASE:=1
-PKG_MAINTAINER:=Lukasz Baj <l.baj@radytek.com>
+PKG_MAINTAINER:=
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING.GPLv2
-PKG_SOURCE_URL:=https://github.com/libimobiledevice/usbmuxd.git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=35e5d48f29ae03b2b9686109e4ed9ab8b9677ce8
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
-PKG_MIRROR_HASH:=7c0d8ea230570344fbc0183c0171689c74baf3d75fff33bbdfca2d1775a4d62d
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_DATE).tar.gz
+PKG_SOURCE_URL=https://codeload.github.com/libimobiledevice/usbmuxd/tar.gz/$(PKG_SOURCE_VERSION)?
+PKG_HASH:=ca4275dbc21e8d9c926e65943b605ea5a6112d30eb3f9e655d3983da87ac6798
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_SOURCE_VERSION)
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
uses a dedicated USB interface as a virtual network device.
endef
-TARGET_CFLAGS += $(FPIC)
+CONFIGURE_ARGS += --without-systemd
define Package/usbmuxd/install
$(INSTALL_DIR) $(1)/usr/sbin
PKG_NAME:=uvcdynctrl
PKG_VERSION:=0.2.5
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=libwebcam-src-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/libwebcam
PKG_HASH:=3ca5199c7b8398b655a7c38e3ad4191bb053b1486503287f20d30d141bda9d41
-PKG_MAINTAINER:=Roger D <rogerdammit@gmail.com>
-
PKG_BUILD_DIR:=$(BUILD_DIR)/libwebcam-$(PKG_VERSION)
+PKG_MAINTAINER:=Roger D <rogerdammit@gmail.com>
+CMAKE_INSTALL:=1
+
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
+include $(INCLUDE_DIR)/nls.mk
define Package/uvcdynctrl
SECTION:=utils
CATEGORY:=Utilities
DEPENDS:=+libwebcam
TITLE:=Manage dynamic controls in uvcvideo
+ LICENSE:=GPL-3.0-or-later
+ LICENSE_FILES:=uvcdynctrl/COPYING
URL:=https://sourceforge.net/projects/libwebcam/
MENU:=1
endef
define Package/libwebcam
SECTION:=libs
CATEGORY:=Libraries
- DEPENDS:=+libxml2 +libiconv-full
+ DEPENDS:=+libxml2 $(ICONV_DEPENDS)
TITLE:=Webcam library
+ LICENSE:=LGPL-3.0-or-later
+ LICENSE_FILES:=libwebcam/COPYING.LESSER
URL:=https://sourceforge.net/projects/libwebcam/
endef
$(call Package/uvcdynctrl/description)
endef
-TARGET_CFLAGS += -I$(STAGING_DIR)/usr/lib/libiconv-full/include -liconv
-TARGET_LDFLAGS += -L$(STAGING_DIR)/usr/lib/libiconv-full/lib
-
define Package/uvcdynctrl/install
$(INSTALL_DIR) $(1)/usr/{bin,share}
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/uvcdynctrl* $(1)/usr/bin/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libwebcam.so* $(1)/usr/lib/
endef
-define Build/InstallDev
- $(INSTALL_DIR) $(1)/usr/{include,lib}
- $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/libwebcam.{a,so*} $(1)/usr/lib/
-endef
-
$(eval $(call BuildPackage,uvcdynctrl))
$(eval $(call BuildPackage,libwebcam))
--- /dev/null
+--- a/uvcdynctrl/CMakeLists.txt
++++ b/uvcdynctrl/CMakeLists.txt
+@@ -77,7 +77,7 @@ include_directories (../common/include)
+ include_directories (${CMAKE_CURRENT_BINARY_DIR})
+ link_directories (${LIBWEBCAM_BINARY_DIR}/webcam)
+
+-target_link_libraries (uvcdynctrl webcam)
++target_link_libraries (uvcdynctrl webcam iconv)
+
+ # Compiler flags
+ set_target_properties (uvcdynctrl PROPERTIES
PKG_NAME:=vim
PKG_VERSION:=8.1
-PKG_RELEASE:=1
+PKG_RELEASE:=4
VIMVER:=81
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)$(VIMVER)
PKG_BUILD_PARALLEL:=1
+HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)$(VIMVER)
+HOST_BUILD_PARALLEL:=1
+
include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
define Package/vim/Default
SECTION:=utils
--with-compiledby="non-existent-hostname-compiled"
CONFIGURE_VARS += \
+ ac_cv_header_elf_h=no \
vim_cv_getcwd_broken=no \
vim_cv_memmove_handles_overlap=yes \
vim_cv_stat_ignores_slash=yes \
$(eval $(call BuildPackage,vim-runtime))
$(eval $(call BuildPackage,vim-help))
$(eval $(call BuildPackage,xxd))
+$(eval $(call HostBuild))
--- /dev/null
+--- a/src/getchar.c
++++ b/src/getchar.c
+@@ -1407,6 +1407,12 @@ openscript(
+ emsg(_(e_nesting));
+ return;
+ }
++
++ // Disallow sourcing a file in the sandbox, the commands would be executed
++ // later, possibly outside of the sandbox.
++ if (check_secure())
++ return;
++
+ #ifdef FEAT_EVAL
+ if (ignore_script)
+ /* Not reading from script, also don't open one. Warning message? */
SECTION:=utils
CATEGORY:=Utilities
TITLE:=Enable the configuration of programed reboots
+ PKGARCH:=all
endef
define Package/watchcat/description
SECTION:=utils
CATEGORY:=Utilities
TITLE:=Script to toggle Wi-Fi with a button and UCI config
+ PKGARCH:=all
endef
define Package/wifitoggle/description
PKG_NAME:=xz
PKG_VERSION:=5.2.4
-PKG_RELEASE:=1
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=@SF/lzmautils
PKG_HASH:=3313fd2a95f43d88e44264e6b015e7d03053e681860b0d5d3f9baca79c57b7bf
+PKG_MAINTAINER:=
PKG_LICENSE:=Public-Domain LGPL-2.1+ GPL-2.0+ GPL-3.0+
PKG_LICENSE_FILES:=COPYING
-PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org>
+PKG_CPE_ID:=cpe:/a:tukaani:xz
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
$$(eval $$(call BuildPackage,$(1)))
endef
+TARGET_LDFLAGS += -Wl,--gc-sections -flto
CONFIGURE_ARGS += \
--enable-small \
--enable-assume-ram=4 \
--disable-assembler \
+ --disable-debug \
+ --disable-doc \
+ --disable-rpath \
+ --disable-symbol-versions \
--disable-werror \
-
-# API uses "restrict" keyword introduced in C99 standard
-TARGET_CFLAGS += \
- -std=c99 \
+ --with-pic
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
--- /dev/null
+--- a/src/liblzma/liblzma.pc.in
++++ b/src/liblzma/liblzma.pc.in
+@@ -7,8 +7,8 @@
+
+ prefix=@prefix@
+ exec_prefix=@exec_prefix@
+-libdir=@libdir@
+-includedir=@includedir@
++libdir=${exec_prefix}/lib
++includedir=${prefix}/include
+
+ Name: liblzma
+ Description: General purpose data compression library
include $(TOPDIR)/rules.mk
PKG_NAME:=yara
-PKG_VERSION:=3.8.1
-PKG_RELEASE:=2
+PKG_VERSION:=3.10.0
+PKG_RELEASE:=1
PKG_LICENSE:=BSD-3-Clause
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/VirusTotal/yara/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=283527711269354d3c60e2705f7f74b1f769d2d35ddba8f7f9ce97d0fd5cb1ca
+PKG_HASH:=3281d43d6b49a4ca8d3a5d2521e06a0b72863702022f981b051856c2b83449c2
+PKG_CPE_ID:=cpe:/a:virustotal:yara
PKG_FIXUP:=autoreconf
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
+++ /dev/null
-From cd73c968e896b8ba364510abdcd3dcc63d017110 Mon Sep 17 00:00:00 2001
-From: Rosen Penev <rosenp@gmail.com>
-Date: Thu, 8 Nov 2018 14:57:49 -0800
-Subject: [PATCH] libyara: Switch to OpenSSL's THREADID API
-
-The non THREADID API was deprecated back in OpenSSL 1.0.0
----
- libyara/libyara.c | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/libyara/libyara.c b/libyara/libyara.c
-index f05d1f9..6f20488 100644
---- a/libyara/libyara.c
-+++ b/libyara/libyara.c
-@@ -87,9 +87,9 @@ char yr_altercase[256];
- static YR_MUTEX *openssl_locks;
-
-
--static unsigned long _thread_id(void)
-+static void _thread_id(CRYPTO_THREADID *id)
- {
-- return (unsigned long) yr_current_thread_id();
-+ CRYPTO_THREADID_set_numeric(id, (unsigned long) yr_current_thread_id());
- }
-
-
-@@ -155,7 +155,7 @@ YR_API int yr_initialize(void)
- for (i = 0; i < CRYPTO_num_locks(); i++)
- yr_mutex_create(&openssl_locks[i]);
-
-- CRYPTO_set_id_callback(_thread_id);
-+ CRYPTO_THREADID_set_callback(_thread_id);
- CRYPTO_set_locking_callback(_locking_function);
-
- #elif defined(HAVE_WINCRYPT_H)
-@@ -226,7 +226,7 @@ YR_API int yr_finalize(void)
- yr_mutex_destroy(&openssl_locks[i]);
-
- OPENSSL_free(openssl_locks);
-- CRYPTO_set_id_callback(NULL);
-+ CRYPTO_THREADID_set_callback(NULL);
- CRYPTO_set_locking_callback(NULL);
-
- #elif defined(HAVE_WINCRYPT_H)
---
-2.19.1
-
--- /dev/null
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=ykclient
+PKG_VERSION:=2.15
+PKG_RELEASE:=1
+
+PKG_SOURCE:=ykclient-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://developers.yubico.com/yubico-c-client/Releases/
+PKG_HASH:=f461cdefe7955d58bbd09d0eb7a15b36cb3576b88adbd68008f40ea978ea5016
+PKG_MAINTAINER:=Stuart B. Wilkins <stuwilkins@mac.com>
+PKG_LICENSE_FILES:=COPYING
+PKG_LICENSE:=BSD-2-Clause
+PKG_BUILD_DEPENDS:=curl
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/ykclient-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/ykclient
+ SECTION:=utils
+ CATEGORY:=Utilities
+ TITLE:=The Yuibco yubikey c client library
+ URL:=https://developers.yubico.com/yubico-c-client/
+ DEPENDS:=curl
+endef
+
+define Package/ykclient/description
+ YubiKey C Client Library (libykclient)
+endef
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(STAGING_DIR)/usr/include
+ $(CP) $(PKG_BUILD_DIR)/ykclient*.h $(STAGING_DIR)/usr/include
+ $(INSTALL_DIR) $(STAGING_DIR)/usr/lib
+ $(CP) $(PKG_BUILD_DIR)/.libs/libykclient.so* $(STAGING_DIR)/usr/lib
+endef
+
+CONFIGURE_ARGS += \
+ --enable-shared \
+ --disable-static
+
+define Package/ykclient/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/ykclient $(1)/usr/bin/
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_BUILD_DIR)/.libs/libykclient.so* $(1)/usr/lib
+endef
+
+$(eval $(call BuildPackage,ykclient))
--- /dev/null
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=ykpers
+PKG_VERSION:=1.19.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=ykpers-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://developers.yubico.com/yubikey-personalization/Releases
+PKG_HASH:=2bc8afa16d495a486582bad916d16de1f67c0cce9bb0a35c3123376c2d609480
+PKG_MAINTAINER:=Stuart B. Wilkins <stuwilkins@mac.com>
+PKG_LICENSE_FILES:=COPYING
+PKG_LICENSE:=BSD-2-Clause
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/ykpers-$(PKG_VERSION)
+PKG_BUILD_DEPENDS:=libyubikey
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/ykpers
+ SECTION:=utils
+ CATEGORY:=Utilities
+ TITLE:=The Yuibco personalization package
+ URL:=https://developers.yubico.com/yubikey-personalization/
+ DEPENDS:=+curl +libyubikey +libjson-c +libusb-1.0
+endef
+
+define Package/ykpers/description
+ The YubiKey Personalization package contains a library and command
+ line tool used to personalize (i.e., set a AES key) YubiKeys.
+endef
+
+CONFIGURE_ARGS += \
+ --enable-shared \
+ --disable-static
+
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(STAGING_DIR)/usr/include
+ $(CP) $(PKG_BUILD_DIR)/ykcore/*.h $(STAGING_DIR)/usr/include
+ $(CP) $(PKG_BUILD_DIR)/*.h $(STAGING_DIR)/usr/include
+ $(INSTALL_DIR) $(STAGING_DIR)/usr/lib
+ $(CP) $(PKG_BUILD_DIR)/.libs/libykpers-1.so* $(STAGING_DIR)/usr/lib
+endef
+
+define Package/ykpers/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/ykchalresp $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/ykinfo $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/ykpersonalize $(1)/usr/bin/
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_BUILD_DIR)/.libs/libykpers-1.so* $(1)/usr/lib
+endef
+
+$(eval $(call BuildPackage,ykpers))
#
-# Copyright (C) 2007-2018 OpenWrt.org
+# Copyright (C) 2007-2019 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
PKG_NAME:=zoneinfo
-PKG_VERSION:=2018i
+PKG_VERSION:=2019b
PKG_RELEASE:=1
#As i couldn't find real license used "Public Domain"
PKG_SOURCE:=tzdata$(PKG_VERSION).tar.gz
PKG_SOURCE_CODE:=tzcode$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.iana.org/time-zones/repository/releases
-PKG_HASH:=82c45ef84ca3bc01d0a4a397ba8adeb8f7f199c6550740587c6ac5a7108c00d9
+PKG_HASH:=05d9092c90dcf9ec4f3ccfdea80c7dcea5e882b3b105c3422da172aaa9a50c64
include $(INCLUDE_DIR)/package.mk
define Download/tzcode
FILE=$(PKG_SOURCE_CODE)
URL=$(PKG_SOURCE_URL)
- HASH:=aaacdb876ca6fb9d58e244b462cbc7578a496b1b10994381b4b32b9f2ded32dc
+ HASH:=2e479d409337da41408629ce6c3b4d8410b10ba6d4431d862e22d2b137d7756d
endef
$(eval $(call Download,tzcode))
--- /dev/null
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=zstd
+PKG_VERSION:=1.4.0
+PKG_RELEASE:=4
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/facebook/zstd/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=63be339137d2b683c6d19a9e34f4fb684790e864fee13c7dd40e197a64c705c1
+
+PKG_MAINTAINER:=Amol Bhave <ambhave@fb.com>
+PKG_LICENSE:=GPL-2.0-or-later
+PKG_LICENSE_FILES:=COPYING
+
+PKG_BUILD_PARALLEL:=1
+HOST_BUILD_PARALLEL:=1
+CMAKE_SOURCE_SUBDIR:=build/cmake
+CMAKE_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+ifeq ($(CONFIG_ZSTD_OPTIMIZE_O3),y)
+ TARGET_CFLAGS := $(filter-out -O%,$(TARGET_CFLAGS))
+ TARGET_CFLAGS += -O3
+ TARGET_CXXFLAGS := $(filter-out -O%,$(TARGET_CXXFLAGS))
+ TARGET_CXXFLAGS += -O3
+endif
+
+define Package/zstd/Default
+ SUBMENU:=Compression
+ URL:=https://github.com/facebook/zstd
+endef
+
+define Package/libzstd
+$(call Package/zstd/Default)
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=zstd library.
+endef
+
+define Package/libzstd/description
+ Zstandard - Fast real-time compression algorithm.
+ This package provides libzstd library.
+endef
+
+define Package/libzstd/config
+ config ZSTD_OPTIMIZE_O3
+ bool "Use all optimizations (-O3)"
+ default y
+ help
+ This enables additional optmizations using the -O3 compilation flag.
+endef
+
+define Package/zstd
+$(call Package/zstd/Default)
+ SECTION:=utils
+ CATEGORY:=Utilities
+ DEPENDS:=+libzstd
+ TITLE:=Fast real-time compression algorithm.
+endef
+
+define Package/zstd/description
+ Zstandard - Fast real-time compression algorithm.
+ This package provides the zstd binaries.
+endef
+
+define Package/libzstd/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libzstd.so* $(1)/usr/lib/
+endef
+
+define Package/zstd/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/{unzstd,zstd,zstdcat,zstdmt} $(1)/usr/bin/
+endef
+
+$(eval $(call BuildPackage,libzstd))
+$(eval $(call BuildPackage,zstd))
+$(eval $(call HostBuild))
--- /dev/null
+--- a/programs/fileio.c
++++ b/programs/fileio.c
+@@ -175,7 +175,7 @@ static void clearHandler(void)
+
+ #if !defined(BACKTRACE_ENABLE)
+ /* automatic detector : backtrace enabled by default on linux+glibc and osx */
+-# if (defined(__linux__) && defined(__GLIBC__)) \
++# if (defined(__linux__) && (defined(__GLIBC__) && !defined(__UCLIBC__))) \
+ || (defined(__APPLE__) && defined(__MACH__))
+ # define BACKTRACE_ENABLE 1
+ # else