Merge pull request #582 from Shulyaka/master
authorSteven Barth <steven@midlink.org>
Mon, 1 Dec 2014 07:53:28 +0000 (08:53 +0100)
committerSteven Barth <steven@midlink.org>
Mon, 1 Dec 2014 07:53:28 +0000 (08:53 +0100)
postfix: fixed installing to the filesystem image

248 files changed:
CONTRIBUTING.md
admin/debootstrap/Makefile
admin/monit/Makefile
admin/zabbix/Makefile
admin/zabbix/patches/001-cross_compile.patch [deleted file]
lang/erlang/Makefile
lang/luasql/Makefile
lang/perl-compress-bzip2/Makefile
lang/perl-dbi/Makefile
lang/perl-test-harness/Makefile
lang/perl-uri/Makefile
lang/perl/Config.in [new file with mode: 0644]
lang/perl/Makefile
lang/perl/files/config.sh-arm.in
lang/perl/files/config.sh-armeb.in
lang/perl/files/config.sh-avr32.in
lang/perl/files/config.sh-i486.in
lang/perl/files/config.sh-mips.in
lang/perl/files/config.sh-mipsel.in
lang/perl/files/config.sh-powerpc.in
lang/perl/files/config.sh-x86_64.in
lang/perl/files/perl-run_tests.sh [new file with mode: 0755]
lang/perl/perlbase.mk
lang/perl/perlmod.mk
lang/php5/Makefile
lang/python-dns/Makefile
lang/python-pip/Makefile [new file with mode: 0644]
lang/python-setuptools/Makefile [new file with mode: 0644]
lang/python/Makefile
lang/python/files/python-package.mk
lang/python/patches/140-do-not-write-bytes-codes.patch [new file with mode: 0644]
lang/python3/Makefile
lang/python3/files/python3-package.mk
lang/ruby/Makefile
libs/alsa-lib/Makefile
libs/gnutls/Makefile
libs/libao/Makefile
libs/libdbi-drivers/Makefile
libs/libdbi/Makefile
libs/libftdi1/Makefile
libs/libftdi1/patches/100-fix-x86_64-build.patch
libs/libhttp-parser/Makefile [new file with mode: 0644]
libs/libimobiledevice/Makefile
libs/liblo/Makefile
libs/libmcrypt/Makefile
libs/libmicrohttpd/Makefile [new file with mode: 0644]
libs/libmpdclient/Makefile
libs/libnatpmp/Makefile
libs/libnetfilter-acct/Makefile
libs/libnetfilter-log/Makefile
libs/libnetfilter-queue/Makefile
libs/liboil/Makefile
libs/libowfat/Makefile
libs/libplist/Makefile
libs/libsamplerate/Makefile
libs/libsodium/Makefile
libs/libsoup/Makefile
libs/libsoxr/Makefile
libs/libtheora/Makefile
libs/libuecc/Makefile
libs/libusbmuxd/Makefile
libs/libv4l/Makefile
libs/libxml2/Makefile
libs/opus/Makefile
libs/protobuf/Makefile
libs/sqlite3/Makefile
libs/tdb/Makefile [new file with mode: 0644]
libs/tdb/patches/001-printf-fix.patch [new file with mode: 0644]
libs/xmlrpc-c/Makefile
mail/bogofilter/Makefile
mail/dovecot/Makefile
mail/fdm/Config.in [new file with mode: 0644]
mail/fdm/Makefile [new file with mode: 0644]
mail/fdm/files/etc/fdm.conf [new file with mode: 0644]
mail/fdm/patches/001-base64-fix.patch [new file with mode: 0644]
mail/fdm/patches/002-base64-fix.patch [new file with mode: 0644]
mail/fdm/src/compat/b64_ntop.c [new file with mode: 0644]
mail/fdm/src/compat/b64_pton.c [new file with mode: 0644]
mail/mailman/Makefile
mail/mailsend/Makefile
mail/nail/Makefile [new file with mode: 0644]
mail/postfix/Makefile
mail/ssmtp/Makefile [new file with mode: 0644]
mail/ssmtp/patches/002-fix_pointer.patch [new file with mode: 0644]
multimedia/fswebcam/Makefile
multimedia/gst1-libav/Makefile
multimedia/gst1-plugins-bad/Makefile
multimedia/gst1-plugins-base/Makefile
multimedia/gst1-plugins-good/Makefile
multimedia/gst1-plugins-ugly/Makefile
multimedia/gstreamer1/Makefile
multimedia/icecast/Makefile
multimedia/minidlna/Makefile
multimedia/minidlna/patches/020-makefileam-tweaks.patch [deleted file]
multimedia/minidlna/patches/030-upnphttp-fixPhilips.patch [deleted file]
multimedia/mjpg-streamer/Makefile
multimedia/motion/Makefile
multimedia/motion/patches/002-honor_cppflags.patch [deleted file]
net/bcp38/Makefile [new file with mode: 0644]
net/bcp38/files/bcp38.config [new file with mode: 0644]
net/bcp38/files/bcp38.defaults [new file with mode: 0644]
net/bcp38/files/run.sh [new file with mode: 0755]
net/bmon/Makefile
net/coova-chilli/Config.in [new file with mode: 0644]
net/coova-chilli/Makefile [new file with mode: 0644]
net/coova-chilli/files/chilli.hotplug [new file with mode: 0644]
net/coova-chilli/patches/100-fix-sysinfo-redeclaration.patch [new file with mode: 0644]
net/ddns-scripts/CHANGELOG [new file with mode: 0644]
net/ddns-scripts/Makefile
net/ddns-scripts/files/etc/config/ddns
net/ddns-scripts/files/etc/config/ddns.sample
net/ddns-scripts/files/etc/hotplug.d/iface/25-ddns
net/ddns-scripts/files/etc/init.d/ddns
net/ddns-scripts/files/usr/lib/ddns/create_cert_hashes.sh [deleted file]
net/ddns-scripts/files/usr/lib/ddns/dynamic_dns_functions.sh
net/ddns-scripts/files/usr/lib/ddns/dynamic_dns_lucihelper.tmp.sh [new file with mode: 0755]
net/ddns-scripts/files/usr/lib/ddns/dynamic_dns_updater.sh
net/ddns-scripts/files/usr/lib/ddns/getlocalip_sample.sh [new file with mode: 0755]
net/ddns-scripts/files/usr/lib/ddns/services
net/ddns-scripts/files/usr/lib/ddns/services_ipv6
net/ddns-scripts/files/usr/lib/ddns/update_cloudflare.sh [new file with mode: 0644]
net/ddns-scripts/files/usr/lib/ddns/update_no-ip.sh [new file with mode: 0644]
net/ddns-scripts/files/usr/lib/ddns/update_sample.sh
net/dmapd/Makefile
net/ethtool/Makefile
net/fastd/Config.in
net/fastd/Makefile
net/fastd/files/fastd.config [deleted file]
net/fastd/files/fastd.init [deleted file]
net/freeradius2/Makefile
net/freeradius2/patches/010-disbale-openssl-check.patch
net/fwknop/Makefile
net/fwknop/patches/001-fix_config.patch
net/haproxy/Makefile
net/haproxy/patches/0001-BUG-MEDIUM-systemd-set-KillMode-to-mixed.patch [deleted file]
net/haproxy/patches/0001-BUILD-fix-make-install-to-support-spaces-in-the-inst.patch [new file with mode: 0644]
net/haproxy/patches/0002-BUG-MEDIUM-config-avoid-skipping-disabled-proxies.patch [deleted file]
net/haproxy/patches/0002-BUG-MEDIUM-ssl-fix-bad-ssl-context-init-can-cause-se.patch [new file with mode: 0644]
net/haproxy/patches/0003-BUG-MEDIUM-ssl-force-a-full-GC-in-case-of-memory-sho.patch [new file with mode: 0644]
net/haproxy/patches/0004-BUG-MEDIUM-checks-fix-conflicts-between-agent-checks.patch [new file with mode: 0644]
net/haproxy/patches/0005-BUG-MINOR-config-don-t-inherit-the-default-balance-a.patch [new file with mode: 0644]
net/haproxy/patches/0006-BUG-MAJOR-frontend-initialize-capture-pointers-earli.patch [new file with mode: 0644]
net/horst/Makefile
net/lftp/Makefile
net/lighttpd/Makefile
net/luci-app-bcp38/Makefile [new file with mode: 0644]
net/luci-app-bcp38/files/bcp38-cbi.lua [new file with mode: 0644]
net/luci-app-bcp38/files/bcp38-controller.lua [new file with mode: 0644]
net/luci-app-bcp38/files/uci-defaults-bcp38 [new file with mode: 0755]
net/mosquitto/Makefile
net/nmap/Makefile
net/ntpd/Makefile
net/ocserv/Config.in
net/ocserv/Makefile
net/ocserv/patches/001-use-define-_XOPEN_SOURCE-to-get-crypt.patch [new file with mode: 0644]
net/openconnect/Makefile
net/openconnect/files/openconnect.sh
net/openconnect/patches/001-Added-a-default-timeout-value-in-CSTP-handshake-usin.patch [deleted file]
net/openconnect/patches/001-always-resolve-ips.patch [new file with mode: 0644]
net/openssh/Makefile
net/opentracker/Makefile
net/opentracker/patches/100-makefile.patch
net/openvswitch/Makefile
net/rtorrent/Makefile
net/socat/Makefile
net/sqm-scripts/Makefile
net/tcpproxy/Makefile
net/tgt/Makefile
net/tor/Makefile
net/uanytun/Makefile
net/ulogd/Makefile
net/unbound/Makefile
net/znc/Makefile
net/znc/patches/002-Uclibcpp_build_fix.patch [deleted file]
net/znc/patches/900-remove_cpp11_usage.patch [deleted file]
sound/mocp/Makefile
sound/mpd/Makefile
utils/ccid/Makefile
utils/cmdpad/Makefile
utils/coreutils/Makefile
utils/coreutils/patches/001-no_docs_man_tests.patch
utils/coreutils/patches/002-fix_compile_with_uclibc.patch
utils/coreutils/patches/010-fix-gets-removal.patch [deleted file]
utils/dbus/Makefile
utils/dump1090/Makefile
utils/dump1090/files/dump1090.config
utils/dump1090/files/dump1090.init
utils/gnupg/Makefile
utils/hd-idle/Makefile
utils/hdparm/Makefile [new file with mode: 0644]
utils/hdparm/patches/001-fix-includes.patch [new file with mode: 0644]
utils/luci-app-lxc/Makefile
utils/luci-app-lxc/files/controller/lxc.lua
utils/lvm2/Makefile
utils/lvm2/patches/000-compile.patch
utils/lvm2/patches/001-include_fix.patch
utils/lxc/Makefile
utils/lxc/files/lxc.conf [new file with mode: 0644]
utils/lxc/patches/100-lxc-defconfig.patch [deleted file]
utils/mc/Config.in [new file with mode: 0644]
utils/mc/Makefile [new file with mode: 0644]
utils/mpack/Makefile [new file with mode: 0644]
utils/ntfs-3g/Makefile
utils/open-plc-utils/Makefile [new file with mode: 0644]
utils/opensc/Makefile
utils/opensc/patches/0001-OpenPGP-Detect-and-support-Gnuk-Token.patch
utils/opensc/patches/0002-OpenPGP-Add-Gnuk-in-pkcs15-emulation-layer.patch
utils/opensc/patches/0003-OpenPGP-Include-private-DO-to-filesystem-at-driver-i.patch
utils/opensc/patches/0004-PKCS15-OpenPGP-Declare-DATA-objects.patch
utils/opensc/patches/0005-OpenPGP-Support-erasing-reset-card.patch
utils/opensc/patches/0006-openpgp-tool-Support-deleting-key-in-Gnuk.patch
utils/opensc/patches/0007-OpenPGP-Correct-building-Extended-Header-List-when-i.patch
utils/opensc/patches/0008-OpenPGP-Read-some-empty-DOs-from-Gnuk.patch
utils/opensc/patches/0009-PKCS15-OpenPGP-Do-not-show-empty-DO-in-pkcs15-emu_in.patch
utils/opensc/patches/0010-PKCS15-OpenPGP-Allow-to-store-data-to-pkcs15-data-ob.patch
utils/opensc/patches/0011-OpenPGP-Provide-enough-buffer-to-read-pubkey-from-Gn.patch
utils/opensc/patches/0012-OpenPGP-Support-write-certificate-for-Gnuk.patch
utils/opensc/patches/0013-pkcs15-openpgp-Change-to-sc_put_data-instead-of-sc_u.patch
utils/opensc/patches/0014-OpenPGP-Overcome-the-restriction-of-even-data-length.patch
utils/opensc/patches/0015-OpenPGP-Delete-key-as-file-for-Gnuk.patch
utils/opensc/patches/0016-OpenPGP-Correct-parameter-checking.patch
utils/opensc/patches/0017-OpenPGP-Make-code-neater.patch
utils/opensc/patches/0018-Move-declaration-to-top-of-block.patch
utils/opensc/patches/0019-OpenPGP-Make-indentation-consistent-space-tab.patch [new file with mode: 0644]
utils/opensc/patches/0020-OpenPGP-Don-t-use-sc_log-in-openpgp-tool.patch [new file with mode: 0644]
utils/opensc/patches/0021-OpenPGP-Don-t-reimplement-gnuk_delete_key-in-openpgp.patch [new file with mode: 0644]
utils/opensc/patches/0022-OpenPGP-Use-directly-binary-array-of-APDUs-for-ERASE.patch [new file with mode: 0644]
utils/opensc/patches/0023-OpenPGP-Rename-private-blob-type-to-avoid-confusing-.patch [new file with mode: 0644]
utils/opensc/patches/0024-OpenPGP-Fix-crash-after-accessing-inexistent-file.patch [new file with mode: 0644]
utils/opensc/patches/0025-Replace-hardcode.patch [new file with mode: 0644]
utils/opensc/patches/0026-hardcode-defines-for-DO-s.patch [new file with mode: 0644]
utils/opus-tools/Makefile
utils/pciutils/Makefile
utils/pciutils/patches/101-no-strip.patch
utils/pciutils/patches/103-relative-path-ids.patch
utils/pciutils/patches/104-resolv.patch
utils/pcsc-lite/Makefile
utils/rpcd-mod-lxc/Makefile
utils/sispmctl/Makefile [new file with mode: 0644]
utils/sispmctl/patches/001-fix-includes.patch [new file with mode: 0644]
utils/stm32flash/Makefile
utils/tcsh/Makefile
utils/tracertools/Makefile
utils/triggerhappy/Makefile
utils/unrar/Makefile
utils/usbmuxd/Makefile
utils/zile/Makefile
utils/zoneinfo/Makefile [new file with mode: 0644]

index f28aea38f3021a70043954c59f00b9eb24125656..1deef680462dd8c5799ab6d17c208d0f0a69b421 100644 (file)
@@ -16,8 +16,8 @@ Makefile contents should contain:
     (E.g.: PKG_MAINTAINER:= Joe D. Hacker `<jdh@jdhs-email-provider.org`>)
 * 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).
-* An optional PKG_LICENSE_FILE including the filename of the license-file in the source-package.
-    (E.g.: PKG_LICENSE_FILE:=COPYING)
+* An optional PKG_LICENSE_FILES including the filename of the license-file in the source-package.
+    (E.g.: PKG_LICENSE_FILES:=COPYING)
 
 Commits and pull-requests:
 
index 461e5a4be27890142b404f2c73b33706af3d912e..50d0cbda0693ab14f1132ce95720986218c5850b 100644 (file)
@@ -9,13 +9,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=debootstrap
-PKG_VERSION:=1.0.63
+PKG_VERSION:=1.0.66
 PKG_RELEASE:=1
 PKG_MAINTAINER=Daniel Golle <daniel@makrotopia.org>
 
 PKG_SOURCE:=$(PKG_NAME)-udeb_$(PKG_VERSION)_all.udeb
 PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/d/debootstrap
-PKG_MD5SUM:=7bd6a1ad6721cc7d8c9ac637ae478df4
+PKG_MD5SUM:=bf6370ea0aa80308dfb03a4a35e33ad1
 PKG_LICENSE:=Unique
 PKG_LICENSE_FILES:=debian/copyright
 
index cc56725581c0236f92f47a04f9f30263bd1b0743..9695b3d7416eeeb936659bbdc7d6606c856d8bca 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=monit
-PKG_VERSION:=5.9
+PKG_VERSION:=5.10
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://mmonit.com/monit/dist
-PKG_MD5SUM:=808473ebbacda0c5085d7399e507bfda
+PKG_MD5SUM:=5b5b5cc7939b975bbbef73bd6426750a
 
 PKG_LICENSE:=AGPL-3.0
 PKG_LICENSE_FILES:=COPYING
index 1b8a97fb4cf90a54345e1aff8a8f1990bf874be9..148ed77a55be6faf92e8c55ee9e911e4b57a137e 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=zabbix
-PKG_VERSION:=2.4.0
+PKG_VERSION:=2.4.2
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/zabbix
-PKG_MD5SUM:=57d9bf72bf0732971e4540a402bfc6c6
+PKG_MD5SUM:=50530e52c08d4a81f9e6e781f1a170ca
 
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=COPYING
diff --git a/admin/zabbix/patches/001-cross_compile.patch b/admin/zabbix/patches/001-cross_compile.patch
deleted file mode 100644 (file)
index 77b9fe3..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
---- a/configure.ac
-+++ b/configure.ac
-@@ -824,25 +824,8 @@ dnl ************************************
- dnl Check for %qu format (FreeBSD 4.x)
- dnl FreeBSD 4.x does not support %llu
--AC_MSG_CHECKING(for long long format)
--AC_TRY_RUN(
--[
--#include <sys/types.h>
--int main()
--{
--        uint64_t i;
--
--        sscanf("200000000010020", "%qu", &i);
--
--        if (i == 200000000010020) return 0;
--        else return -1;
--}
--],
--AC_DEFINE(HAVE_LONG_LONG_QU, 1 ,[Define to 1 if format '%qu' exists.])
--AC_MSG_RESULT(yes),
--AC_MSG_RESULT(no))
--
- dnl option -rdynamic is needed for readable backtraces
-+
- AC_MSG_CHECKING(for -rdynamic linking option)
- saved_LDFLAGS="$LDFLAGS"
- LDFLAGS="-rdynamic $LDFLAGS"
index 1bf17f3347c165f08f0a09a4face7e34bf87d78f..b6193af75a76ba9a7dc07e5ca9e44054a889f6b3 100644 (file)
@@ -8,16 +8,16 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=erlang
-PKG_VERSION:=17.1
+PKG_VERSION:=17.3
 PKG_RELEASE:=1
 
 PKG_SOURCE:=otp_src_$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:= http://www.erlang.org/download/ \
        http://erlang.mirror.su.se/
-PKG_MD5SUM:=9c90706ce70e01651adde34a2b79bf4c
+PKG_MD5SUM:=1d0bb2d54dfe1bb6844756b99902ba20
 
 PKG_LICENSE:=ErlPL-1.1
-PKG_LICENSE_FILE:=EPLICENCE
+PKG_LICENSE_FILES:=EPLICENCE
 PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org>
 
 PKG_BUILD_DEPENDS:=erlang/host openssl
index 12fbfb61f3394d50c79689ce8fe7d4594a70cd3e..6df105dc73e2fba075a24568ab607319e56ab11f 100644 (file)
@@ -16,7 +16,7 @@ PKG_SOURCE_URL:=https://github.com/keplerproject/luasql/archive/
 PKG_MD5SUM:=af9f0f3a2313a1fcf88c40700092048d
 
 PKG_LICENSE:=MIT
-PKG_LICENSE_FILE:=docs/us/license.html
+PKG_LICENSE_FILES:=docs/us/license.html
 PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org>
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
index 9f9430a6782f3e97746874d409fdc57bb794ff66..fefd3f52c3623c14d0bb73775988789902d1fb3b 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=perl-compress-bzip2
-PKG_VERSION:=2.18
+PKG_VERSION:=2.19
 PKG_RELEASE:=1
 
 PKG_SOURCE_URL:=http://www.cpan.org/authors/id/R/RU/RURBAN/
 PKG_SOURCE:=Compress-Bzip2-$(PKG_VERSION).tar.gz
-PKG_MD5SUM:=c4a1995df9443cb97c28593cbbb23304
+PKG_MD5SUM:=dd4ebb4e88a50cc9a85e282618fdf88f
 
 PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
 PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
index 53c15066f7f852e922dd77d295856478d59aabcc..7af28ce22bba7e34ad69de540961aa01b957185b 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=perl-dbi
-PKG_VERSION:=1.631
-PKG_RELEASE:=2
+PKG_VERSION:=1.632
+PKG_RELEASE:=1
 
 PKG_SOURCE_URL:=http://www.cpan.org/authors/id/T/TI/TIMB/
 PKG_SOURCE:=DBI-$(PKG_VERSION).tar.gz
-PKG_MD5SUM:=444d3c305e86597e11092b517794a840
+PKG_MD5SUM:=285fc34c1ee20125aabbd50bc3e587fb
 
 PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
 PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
index 524bbd751d6cdcf1e7c499319dd281f87b85f2b8..59af42ae8a427c061a8271e5507edc44475803b0 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=perl-test-harness
-PKG_VERSION:=3.33
+PKG_VERSION:=3.34
 PKG_RELEASE:=1
 
 PKG_SOURCE_URL:=http://www.cpan.org/authors/id/L/LE/LEONT/
 PKG_SOURCE:=Test-Harness-$(PKG_VERSION).tar.gz
-PKG_MD5SUM:=7a72849ee1e67184db098146cc7c8855
+PKG_MD5SUM:=aa0175e8fef92c19f06128810f1a2921
 
 PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
 PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
index d298dd98cd40f6aa1b7a8982d4b77543d33e7867..64cc10f1768ae60d252ea9d07590175fdc39949c 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=perl-uri
-PKG_VERSION:=1.64
+PKG_VERSION:=1.65
 PKG_RELEASE:=1
 
 PKG_SOURCE_URL:=http://www.cpan.org/authors/id/E/ET/ETHER/
 PKG_SOURCE:=URI-$(PKG_VERSION).tar.gz
-PKG_MD5SUM:=975b2282bc8f0fd72a6dae5cefc33824
+PKG_MD5SUM:=12c5d612a20ddd42041a5aa426f66269
 
 PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
 PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
diff --git a/lang/perl/Config.in b/lang/perl/Config.in
new file mode 100644 (file)
index 0000000..3cfa71d
--- /dev/null
@@ -0,0 +1,15 @@
+menu "Configuration"
+       depends on PACKAGE_perl
+
+config PERL_TESTS
+       bool "Include perl tests"
+       default n
+       help
+               Include test suites for all perl packages.
+               This will make perl related packages much bigger, so
+               use with care.
+               
+               Note: Test support is still in development. Some tests
+               still fail, others are just missing completely.
+
+endmenu
index bef6c211d52fa7cdfe02ef6ce4b5cba2c6c1b0f3..be4f773ef8315138189d285245d4bd54b3298f0d 100644 (file)
@@ -8,8 +8,8 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=perl
-PKG_VERSION:=5.20.0
-PKG_RELEASE:=6
+PKG_VERSION:=5.20.1
+PKG_RELEASE:=1
 
 PKG_SOURCE_URL:=ftp://ftp.cpan.org/pub/CPAN/src/5.0 \
                http://www.cpan.org/src/5.0/perl-5.20.0.tar.gz \
@@ -20,7 +20,7 @@ PKG_SOURCE_URL:=ftp://ftp.cpan.org/pub/CPAN/src/5.0 \
                ftp://ftp.funet.fi/pub/languages/perl/CPAN/src/5.0 \
                http://ftp.funet.fi/pub/languages/perl/CPAN/src/5.0
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_MD5SUM:=406ec049ebe3afcc80d9c76ec78ca4f8
+PKG_MD5SUM:=7a195abb7d6769f751e90c7d30dcf2e0
 
 PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
 PKG_LICENSE_FILES:=Copying Artistic README
@@ -44,6 +44,16 @@ endif
 TARGET_CFLAGS_PERL:=$(patsubst -g3,-g,$(TARGET_CFLAGS))
 TARGET_CPPFLAGS_PERL:=$(patsubst -g3,-g,$(TARGET_CPPFLAGS))
 
+# A list of disabled testss
+# ExtUtils tests are disabled for now as we don't support building
+# native extensions on the target machine at the moment
+PERL_DISABLEDTESTS:=cpan/ExtUtils-Constant cpan/ExtUtils-MakeMaker
+# We're on Linux, so don't even package those
+PERL_DISABLEDTESTS+=cpan/Win32API-File cpan/Win32 ext/VMS-DCLsym ext/VMS-Filespec ext/VMS-Stdio ext/Win32CORE
+# NDBM and ODBM not supported
+PERL_DISABLEDTESTS+=ext/NDBM_File ext/ODBM_File
+
+
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/host-build.mk
 include perlmod.mk
@@ -63,6 +73,10 @@ define Package/perl/description
   and is widely used to program web applications of all needs.
 endef
 
+define Package/perl/config
+       source "$(SOURCE)/Config.in"
+endef
+
 # Static host perl
 define Host/Configure
        ( cd $(HOST_BUILD_DIR); ./Configure -der -Uusedl -Duserelocatableinc -Dprefix=$(HOST_PERL_PREFIX) )
@@ -128,3 +142,37 @@ $(eval $(call BuildPackage,perl))
 $(eval $(call HostBuild))
 
 -include perlbase.mk
+
+# A helper package that includes all sort of supplementary files for tests
+define Package/perl-tests-common
+$(call Package/perlbase-template)
+TITLE:=Common test support files
+DEPENDS:=@PERL_TESTS
+endef
+
+define Package/perl-tests-common/install
+       $(INSTALL_DIR) $(1)/$(PERL_TESTSDIR)
+       $(INSTALL_DIR) $(1)/$(PERL_TESTSDIR)/Porting
+       $(INSTALL_DIR) $(1)/$(PERL_TESTSDIR)/regen
+       $(INSTALL_DIR) $(1)/usr/lib/perl5/5.20/XS
+       $(INSTALL_DIR) $(1)/usr/lib/perl5/5.20/auto/XS
+       $(INSTALL_DIR) $(1)/usr/lib/perl5/5.20/unicore
+       
+       $(CP) $(PKG_BUILD_DIR)/t $(1)/$(PERL_TESTSDIR)
+       $(CP) $(PKG_BUILD_DIR)/Porting $(1)/$(PERL_TESTSDIR)
+       $(CP) $(PKG_BUILD_DIR)/regen $(1)/$(PERL_TESTSDIR)
+       $(CP) $(PKG_BUILD_DIR)/MANIFEST $(1)/$(PERL_TESTSDIR)
+       $(CP) $(PKG_BUILD_DIR)/TestInit.pm $(1)/$(PERL_TESTSDIR)
+       $(CP) $(PKG_BUILD_DIR)/vutil.c $(1)/$(PERL_TESTSDIR)
+       $(CP) $(PKG_BUILD_DIR)/vxs.inc $(1)/$(PERL_TESTSDIR)
+       $(CP) $(PKG_BUILD_DIR)/lib/XS $(1)/usr/lib/perl5/5.20/
+       $(CP) $(PKG_BUILD_DIR)/lib/auto/XS $(1)/usr/lib/perl5/5.20/auto
+       $(CP) $(PKG_BUILD_DIR)/lib/vmsish.pm $(1)/usr/lib/perl5/5.20/
+       $(CP) $(PKG_BUILD_DIR)/lib/unicore/TestProp.pl $(1)/usr/lib/perl5/5.20/unicore
+       $(CP) files/perl-run_tests.sh $(1)/$(PERL_TESTSDIR)/run_tests.sh
+       sed -e 's!%%PERL_DISABLEDTESTS%%!$(PERL_DISABLEDTESTS)!' -i $(1)/$(PERL_TESTSDIR)/run_tests.sh
+       $(CP) $(PKG_BUILD_DIR)/config_h.SH $(1)/$(PERL_TESTSDIR)
+       $(CP) $(PKG_BUILD_DIR)/perl.h $(1)/$(PERL_TESTSDIR)
+endef
+
+$(eval $(call BuildPackage,perl-tests-common))
index 523fef409c612de1a333d16bb6323f554d12b7e2..df6152edec1fe21e789cce14f7ac6c0c54a5bebf 100644 (file)
@@ -949,7 +949,6 @@ stdio_stream_array=''
 strerror_r_proto='0'
 #strings='/usr/include/string.h'
 submit=''
-subversion='0'
 sysman='/usr/share/man/man1'
 tail=''
 tar=''
@@ -1050,8 +1049,6 @@ config_args='-der'
 config_argc=1
 config_arg1='-der'
 PERL_REVISION=5
-
-PERL_SUBVERSION=0
 PERL_API_REVISION=5
 
 PERL_API_SUBVERSION=0
@@ -1109,7 +1106,7 @@ i_syspoll='define'
 #incpth='/usr/lib/gcc/i486-slackware-linux/4.8.2/include /usr/local/include /usr/lib/gcc/i486-slackware-linux/4.8.2/include-fixed /usr/include'
 ld_can_script='define'
 #libsfound=' /usr/lib/libgdbm.so /usr/lib/libdb.so /usr/lib/libdl.so /usr/lib/libm.so /usr/lib/libcrypt.so /usr/lib/libutil.so /usr/lib/libc.so'
-nv_overflows_integers_at='0'
+nv_overflows_integers_at='256.0*256.0*256.0*256.0*256.0*256.0*2.0*2.0*2.0*2.0*2.0'
 perl_static_inline='static __inline__'
 sGMTIME_max='2147483647'
 sGMTIME_min='-2147483648'
@@ -1150,12 +1147,14 @@ privlib='/usr/lib/perl5/5.20'
 privlibexp='/usr/lib/perl5/5.20'
 archlib='/usr/lib/perl5/5.20'
 archlibexp='/usr/lib/perl5/5.20'
-version='5.20.0'
-version_patchlevel_string='version 20 subversion 0'
+version='5.20.1'
+version_patchlevel_string='version 20 subversion 1'
 PERL_VERSION=20
 PERL_API_VERSION=20
+PERL_SUBVERSION=1
 patchlevel='20'
 ccdlflags='-fPIC -Wl,-rpath,/usr/lib/perl5/5.20/CORE'
+subversion='1'
 
 # Make perl use these tools instead of the target binaries during build.
 hostgenerate='%%HOSTGENERATE%%'
index 34520fd19cfbee51c942d467992735e353977f19..6c12a53666c0c8c122ed4ded6f49c6dcbcdae51e 100644 (file)
@@ -32,7 +32,6 @@ alignbytes='4'
 ansi2knr=''
 aphostname='/bin/hostname'
 api_revision='5'
-api_subversion='0'
 
 
 ar='ar'
@@ -1050,8 +1049,6 @@ config_args='-der'
 config_argc=1
 config_arg1='-der'
 PERL_REVISION=5
-
-PERL_SUBVERSION=0
 PERL_API_REVISION=5
 
 PERL_API_SUBVERSION=0
@@ -1109,7 +1106,7 @@ i_syspoll='define'
 #incpth='/usr/lib/gcc/i486-slackware-linux/4.8.2/include /usr/local/include /usr/lib/gcc/i486-slackware-linux/4.8.2/include-fixed /usr/include'
 ld_can_script='define'
 #libsfound=' /usr/lib/libgdbm.so /usr/lib/libdb.so /usr/lib/libdl.so /usr/lib/libm.so /usr/lib/libcrypt.so /usr/lib/libutil.so /usr/lib/libc.so'
-nv_overflows_integers_at='0'
+nv_overflows_integers_at='256.0*256.0*256.0*256.0*256.0*256.0*2.0*2.0*2.0*2.0*2.0'
 perl_static_inline='static __inline__'
 sGMTIME_max='2147483647'
 sGMTIME_min='-2147483648'
@@ -1150,12 +1147,14 @@ privlib='/usr/lib/perl5/5.20'
 privlibexp='/usr/lib/perl5/5.20'
 archlib='/usr/lib/perl5/5.20'
 archlibexp='/usr/lib/perl5/5.20'
-version='5.20.0'
-version_patchlevel_string='version 20 subversion 0'
+version='5.20.1'
+version_patchlevel_string='version 20 subversion 1'
 PERL_VERSION=20
 PERL_API_VERSION=20
+PERL_SUBVERSION=0
 patchlevel='20'
 ccdlflags='-fPIC -Wl,-rpath,/usr/lib/perl5/5.20/CORE'
+api_subversion='1'
 
 # Make perl use these tools instead of the target binaries during build.
 hostgenerate='%%HOSTGENERATE%%'
index 37a5d6c041278df01f39005617586d3375cd39cf..33cfa69db30abde1e456ed8357af64887bf07736 100644 (file)
@@ -951,7 +951,6 @@ stdio_stream_array=''
 strerror_r_proto='0'
 #strings='/usr/include/string.h'
 submit=''
-subversion='0'
 sysman='/usr/share/man/man1'
 tail=''
 tar=''
@@ -1052,8 +1051,6 @@ config_args='-der'
 config_argc=1
 config_arg1='-der'
 PERL_REVISION=5
-
-PERL_SUBVERSION=0
 PERL_API_REVISION=5
 
 PERL_API_SUBVERSION=0
@@ -1111,7 +1108,7 @@ i_syspoll='define'
 #incpth='/usr/lib/gcc/i486-slackware-linux/4.8.2/include /usr/local/include /usr/lib/gcc/i486-slackware-linux/4.8.2/include-fixed /usr/include'
 ld_can_script='define'
 #libsfound=' /usr/lib/libgdbm.so /usr/lib/libdb.so /usr/lib/libdl.so /usr/lib/libm.so /usr/lib/libcrypt.so /usr/lib/libutil.so /usr/lib/libc.so'
-nv_overflows_integers_at='0'
+nv_overflows_integers_at='256.0*256.0*256.0*256.0*256.0*256.0*2.0*2.0*2.0*2.0*2.0'
 perl_static_inline='static __inline__'
 sGMTIME_max='2147483647'
 sGMTIME_min='-2147483648'
@@ -1152,12 +1149,14 @@ privlib='/usr/lib/perl5/5.20'
 privlibexp='/usr/lib/perl5/5.20'
 archlib='/usr/lib/perl5/5.20'
 archlibexp='/usr/lib/perl5/5.20'
-version='5.20.0'
-version_patchlevel_string='version 20 subversion 0'
+version='5.20.1'
+version_patchlevel_string='version 20 subversion 1'
 PERL_VERSION=20
 PERL_API_VERSION=20
+PERL_SUBVERSION=1
 patchlevel='20'
 ccdlflags='-fPIC -Wl,-rpath,/usr/lib/perl5/5.20/CORE'
+subversion='1'
 
 # Make perl use these tools instead of the target binaries during build.
 hostgenerate='%%HOSTGENERATE%%'
index f4566367abc73272680a26ed354efb17930d4ae1..b04fa4e7f18f68fe34b5264636502adeb959ad70 100644 (file)
@@ -885,8 +885,8 @@ shortsize='2'
 shrpenv=''
 shsharp='true'
 sig_count='64'
-sig_name='ZERO HUP INT QUIT ILL TRAP ABRT BUS FPE KILL USR1 SEGV USR2 PIPE ALRM TERM STKFLT CHLD CONT STOP TSTP TTIN TTOU URG XCPU XFSZ VTALRM PROF WINCH IO PWR SYS RTMIN NUM33 NUM34 NUM35 NUM36 NUM37 NUM38 NUM39 NUM40 NUM41 NUM42 NUM43 NUM44 NUM45 NUM46 NUM47 NUM48 NUM49 NUM50 NUM51 NUM52 NUM53 NUM54 NUM55 NUM56 NUM57 NUM58 NUM59 NUM60 NUM61 NUM62 RTMAX IOT CLD POLL UNUSED '
-sig_name_init='"ZERO", "HUP", "INT", "QUIT", "ILL", "TRAP", "ABRT", "BUS", "FPE", "KILL", "USR1", "SEGV", "USR2", "PIPE", "ALRM", "TERM", "STKFLT", "CHLD", "CONT", "STOP", "TSTP", "TTIN", "TTOU", "URG", "XCPU", "XFSZ", "VTALRM", "PROF", "WINCH", "IO", "PWR", "SYS", "RTMIN", "NUM33", "NUM34", "NUM35", "NUM36", "NUM37", "NUM38", "NUM39", "NUM40", "NUM41", "NUM42", "NUM43", "NUM44", "NUM45", "NUM46", "NUM47", "NUM48", "NUM49", "NUM50", "NUM51", "NUM52", "NUM53", "NUM54", "NUM55", "NUM56", "NUM57", "NUM58", "NUM59", "NUM60", "NUM61", "NUM62", "RTMAX", "IOT", "CLD", "POLL", "UNUSED", 0'
+sig_name='ZERO HUP INT QUIT ILL TRAP ABRT BUS FPE KILL USR1 SEGV USR2 PIPE ALRM TERM STKFLT CHLD CONT STOP TSTP TTIN TTOU URG XCPU XFSZ VTALRM PROF WINCH IO PWR SYS NUM32 NUM33 RTMIN NUM35 NUM36 NUM37 NUM38 NUM39 NUM40 NUM41 NUM42 NUM43 NUM44 NUM45 NUM46 NUM47 NUM48 NUM49 NUM50 NUM51 NUM52 NUM53 NUM54 NUM55 NUM56 NUM57 NUM58 NUM59 NUM60 NUM61 NUM62 RTMAX IOT CLD POLL UNUSED '
+sig_name_init='"ZERO", "HUP", "INT", "QUIT", "ILL", "TRAP", "ABRT", "BUS", "FPE", "KILL", "USR1", "SEGV", "USR2", "PIPE", "ALRM", "TERM", "STKFLT", "CHLD", "CONT", "STOP", "TSTP", "TTIN", "TTOU", "URG", "XCPU", "XFSZ", "VTALRM", "PROF", "WINCH", "IO", "PWR", "SYS", "NUM32", "NUM33", "RTMIN", "NUM35", "NUM36", "NUM37", "NUM38", "NUM39", "NUM40", "NUM41", "NUM42", "NUM43", "NUM44", "NUM45", "NUM46", "NUM47", "NUM48", "NUM49", "NUM50", "NUM51", "NUM52", "NUM53", "NUM54", "NUM55", "NUM56", "NUM57", "NUM58", "NUM59", "NUM60", "NUM61", "NUM62", "RTMAX", "IOT", "CLD", "POLL", "UNUSED", 0'
 sig_num='0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 6 17 29 31 '
 sig_num_init='0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 6, 17, 29, 31, 0'
 sig_size='68'
@@ -938,7 +938,6 @@ stdio_stream_array=''
 strerror_r_proto='0'
 #strings='/usr/include/string.h'
 submit=''
-subversion='0'
 sysman='/usr/share/man/man1'
 tail=''
 tar=''
@@ -1037,7 +1036,6 @@ config_args='-der'
 config_argc=1
 config_arg1='-der'
 PERL_REVISION=5
-PERL_SUBVERSION=0
 PERL_API_REVISION=5
 PERL_API_SUBVERSION=0
 PERL_PATCHLEVEL=
@@ -1094,7 +1092,7 @@ i_syspoll='define'
 #incpth='/usr/lib/gcc/i486-slackware-linux/4.8.2/include /usr/local/include /usr/lib/gcc/i486-slackware-linux/4.8.2/include-fixed /usr/include'
 ld_can_script='define'
 #libsfound=' /usr/lib/libgdbm.so /usr/lib/libdb.so /usr/lib/libdl.so /usr/lib/libm.so /usr/lib/libcrypt.so /usr/lib/libutil.so /usr/lib/libc.so'
-nv_overflows_integers_at='0'
+nv_overflows_integers_at='256.0*256.0*256.0*256.0*256.0*256.0*2.0*2.0*2.0*2.0*2.0'
 perl_static_inline='static __inline__'
 sGMTIME_max='2147483647'
 sGMTIME_min='-2147483648'
@@ -1135,12 +1133,14 @@ privlib='/usr/lib/perl5/5.20'
 privlibexp='/usr/lib/perl5/5.20'
 archlib='/usr/lib/perl5/5.20'
 archlibexp='/usr/lib/perl5/5.20'
-version='5.20.0'
-version_patchlevel_string='version 20 subversion 0'
+version='5.20.1'
+version_patchlevel_string='version 20 subversion 1'
 PERL_VERSION=20
 PERL_API_VERSION=20
+PERL_SUBVERSION=1
 patchlevel='20'
 ccdlflags='-fPIC -Wl,-rpath,/usr/lib/perl5/5.20/CORE'
+subversion='1'
 
 # Make perl use these tools instead of the target binaries during build.
 hostgenerate='%%HOSTGENERATE%%'
index cb313b1e8eec8f69b902764f942accd44558e39e..75ae8c92b0ee9a8d668109d609fcbb6caafbc8f8 100644 (file)
@@ -949,7 +949,6 @@ stdio_stream_array=''
 strerror_r_proto='0'
 #strings='/usr/include/string.h'
 submit=''
-subversion='0'
 sysman='/usr/share/man/man1'
 tail=''
 tar=''
@@ -1050,8 +1049,6 @@ config_args='-der'
 config_argc=1
 config_arg1='-der'
 PERL_REVISION=5
-
-PERL_SUBVERSION=0
 PERL_API_REVISION=5
 
 PERL_API_SUBVERSION=0
@@ -1109,7 +1106,7 @@ i_syspoll='define'
 #incpth='/usr/lib/gcc/i486-slackware-linux/4.8.2/include /usr/local/include /usr/lib/gcc/i486-slackware-linux/4.8.2/include-fixed /usr/include'
 ld_can_script='define'
 #libsfound=' /usr/lib/libgdbm.so /usr/lib/libdb.so /usr/lib/libdl.so /usr/lib/libm.so /usr/lib/libcrypt.so /usr/lib/libutil.so /usr/lib/libc.so'
-nv_overflows_integers_at='0'
+nv_overflows_integers_at='256.0*256.0*256.0*256.0*256.0*256.0*2.0*2.0*2.0*2.0*2.0'
 perl_static_inline='static __inline__'
 sGMTIME_max='2147483647'
 sGMTIME_min='-2147483648'
@@ -1150,12 +1147,14 @@ privlib='/usr/lib/perl5/5.20'
 privlibexp='/usr/lib/perl5/5.20'
 archlib='/usr/lib/perl5/5.20'
 archlibexp='/usr/lib/perl5/5.20'
-version='5.20.0'
-version_patchlevel_string='version 20 subversion 0'
+version='5.20.1'
+version_patchlevel_string='version 20 subversion 1'
 PERL_VERSION=20
 PERL_API_VERSION=20
+PERL_SUBVERSION=1
 patchlevel='20'
 ccdlflags='-fPIC -Wl,-rpath,/usr/lib/perl5/5.20/CORE'
+subversion='1'
 
 # Make perl use these tools instead of the target binaries during build.
 hostgenerate='%%HOSTGENERATE%%'
index a3e841613b6ee0fc097f76905880b5c290a47136..86b6c64334b21b12c210f474568b8f029b204925 100644 (file)
@@ -938,7 +938,6 @@ stdio_stream_array=''
 strerror_r_proto='0'
 #strings='/usr/include/string.h'
 submit=''
-subversion='0'
 sysman='/usr/share/man/man1'
 tail=''
 tar=''
@@ -1037,7 +1036,6 @@ config_args='-der'
 config_argc=1
 config_arg1='-der'
 PERL_REVISION=5
-PERL_SUBVERSION=0
 PERL_API_REVISION=5
 PERL_API_SUBVERSION=0
 PERL_PATCHLEVEL=
@@ -1094,7 +1092,7 @@ i_syspoll='define'
 #incpth='/usr/lib/gcc/i486-slackware-linux/4.8.2/include /usr/local/include /usr/lib/gcc/i486-slackware-linux/4.8.2/include-fixed /usr/include'
 ld_can_script='define'
 #libsfound=' /usr/lib/libgdbm.so /usr/lib/libdb.so /usr/lib/libdl.so /usr/lib/libm.so /usr/lib/libcrypt.so /usr/lib/libutil.so /usr/lib/libc.so'
-nv_overflows_integers_at='0'
+nv_overflows_integers_at='256.0*256.0*256.0*256.0*256.0*256.0*2.0*2.0*2.0*2.0*2.0'
 perl_static_inline='static __inline__'
 sGMTIME_max='2147483647'
 sGMTIME_min='-2147483648'
@@ -1135,12 +1133,14 @@ privlib='/usr/lib/perl5/5.20'
 privlibexp='/usr/lib/perl5/5.20'
 archlib='/usr/lib/perl5/5.20'
 archlibexp='/usr/lib/perl5/5.20'
-version='5.20.0'
-version_patchlevel_string='version 20 subversion 0'
+version='5.20.1'
+version_patchlevel_string='version 20 subversion 1'
 PERL_VERSION=20
 PERL_API_VERSION=20
+PERL_SUBVERSION=1
 patchlevel='20'
 ccdlflags='-fPIC -Wl,-rpath,/usr/lib/perl5/5.20/CORE'
+subversion='1'
 
 # Make perl use these tools instead of the target binaries during build.
 hostgenerate='%%HOSTGENERATE%%'
index acd62b7aebb2099cc9d082f42f6b2557a9e92987..650f94f0fe9a336193798da6ae2174a502b301ce 100644 (file)
@@ -949,7 +949,6 @@ stdio_stream_array=''
 strerror_r_proto='0'
 #strings='/usr/include/string.h'
 submit=''
-subversion='0'
 sysman='/usr/share/man/man1'
 tail=''
 tar=''
@@ -1050,8 +1049,6 @@ config_args='-der'
 config_argc=1
 config_arg1='-der'
 PERL_REVISION=5
-
-PERL_SUBVERSION=0
 PERL_API_REVISION=5
 
 PERL_API_SUBVERSION=0
@@ -1109,7 +1106,7 @@ i_syspoll='define'
 #incpth='/usr/lib/gcc/i486-slackware-linux/4.8.2/include /usr/local/include /usr/lib/gcc/i486-slackware-linux/4.8.2/include-fixed /usr/include'
 ld_can_script='define'
 #libsfound=' /usr/lib/libgdbm.so /usr/lib/libdb.so /usr/lib/libdl.so /usr/lib/libm.so /usr/lib/libcrypt.so /usr/lib/libutil.so /usr/lib/libc.so'
-nv_overflows_integers_at='0'
+nv_overflows_integers_at='256.0*256.0*256.0*256.0*256.0*256.0*2.0*2.0*2.0*2.0*2.0'
 perl_static_inline='static __inline__'
 sGMTIME_max='2147483647'
 sGMTIME_min='-2147483648'
@@ -1150,12 +1147,14 @@ privlib='/usr/lib/perl5/5.20'
 privlibexp='/usr/lib/perl5/5.20'
 archlib='/usr/lib/perl5/5.20'
 archlibexp='/usr/lib/perl5/5.20'
-version='5.20.0'
-version_patchlevel_string='version 20 subversion 0'
+version='5.20.1'
+version_patchlevel_string='version 20 subversion 1'
 PERL_VERSION=20
 PERL_API_VERSION=20
+PERL_SUBVERSION=1
 patchlevel='20'
 ccdlflags='-fPIC -Wl,-rpath,/usr/lib/perl5/5.20/CORE'
+subversion='1'
 
 # Make perl use these tools instead of the target binaries during build.
 hostgenerate='%%HOSTGENERATE%%'
index c7bb86ca42a7d4ab3f72253e44640b1db364bb0d..6a2bd1bfb2c1806c14eed5fb34a3150a53035efb 100644 (file)
@@ -938,7 +938,6 @@ stdio_stream_array=''
 strerror_r_proto='0'
 #strings='/usr/include/string.h'
 submit=''
-subversion='0'
 sysman='/usr/share/man/man1'
 tail=''
 tar=''
@@ -1037,7 +1036,6 @@ config_args='-der'
 config_argc=1
 config_arg1='-der'
 PERL_REVISION=5
-PERL_SUBVERSION=0
 PERL_API_REVISION=5
 PERL_API_SUBVERSION=0
 PERL_PATCHLEVEL=
@@ -1094,7 +1092,7 @@ i_syspoll='define'
 #incpth='/usr/lib/gcc/i486-slackware-linux/4.8.2/include /usr/local/include /usr/lib/gcc/i486-slackware-linux/4.8.2/include-fixed /usr/include'
 ld_can_script='define'
 #libsfound=' /usr/lib/libgdbm.so /usr/lib/libdb.so /usr/lib/libdl.so /usr/lib/libm.so /usr/lib/libcrypt.so /usr/lib/libutil.so /usr/lib/libc.so'
-nv_overflows_integers_at='0'
+nv_overflows_integers_at='256.0*256.0*256.0*256.0*256.0*256.0*2.0*2.0*2.0*2.0*2.0'
 perl_static_inline='static __inline__'
 sGMTIME_max='67768036191676799'
 sGMTIME_min='-62167219200'
@@ -1135,12 +1133,14 @@ privlib='/usr/lib/perl5/5.20'
 privlibexp='/usr/lib/perl5/5.20'
 archlib='/usr/lib/perl5/5.20'
 archlibexp='/usr/lib/perl5/5.20'
-version='5.20.0'
-version_patchlevel_string='version 20 subversion 0'
+version='5.20.1'
+version_patchlevel_string='version 20 subversion 1'
 PERL_VERSION=20
 PERL_API_VERSION=20
+PERL_SUBVERSION=1
 patchlevel='20'
 ccdlflags='-fPIC -Wl,-rpath,/usr/lib/perl5/5.20/CORE'
+subversion='1'
 
 # Make perl use these tools instead of the target binaries during build.
 hostgenerate='%%HOSTGENERATE%%'
diff --git a/lang/perl/files/perl-run_tests.sh b/lang/perl/files/perl-run_tests.sh
new file mode 100755 (executable)
index 0000000..af6a39c
--- /dev/null
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+PERL_TESTSDIR="/usr/share/perl/perl-tests"
+PERL_LIBDIR="/usr/lib/perl5/5.20/"
+PERL_DISABLEDTESTS="%%PERL_DISABLEDTESTS%%"
+
+if [ ! -f "$PERL_TESTSDIR/__prepared" ]; then
+       ln -s "$PERL_LIBDIR" "$PERL_TESTSDIR/lib"
+       ln -s /usr/bin/perl "$PERL_TESTSDIR/perl"
+       ln -s /usr/bin/perl "$PERL_TESTSDIR/t/perl"
+       touch "$PERL_TESTSDIR/__prepared"
+       
+       for i in $PERL_DISABLEDTESTS; do
+               echo "Disabling $i tests"
+               sed 's!^'$i'.*$!!' -i $PERL_TESTSDIR/MANIFEST
+       done
+       
+       cat $PERL_TESTSDIR/MANIFEST | grep -v '^$' > $PERL_TESTSDIR/MANIFEST_NEW
+       rm $PERL_TESTSDIR/MANIFEST
+       mv $PERL_TESTSDIR/MANIFEST_NEW $PERL_TESTSDIR/MANIFEST
+fi
+
+cd "$PERL_TESTSDIR/t"
+./perl TEST
index cc9169076ea6fac9bd59cfaa59d0e02303adb597..ab08b386068501a32742af1bb0aa97680f3d796f 100644 (file)
@@ -19,6 +19,19 @@ endef
 $(eval $(call BuildPackage,perlbase-anydbm-file))
 
 
+define Package/perlbase-app
+$(call Package/perlbase-template)
+TITLE:=app perl module
+DEPENDS+=+perlbase-autouse +perlbase-base +perlbase-config +perlbase-cpan +perlbase-essential +perlbase-file +perlbase-getopt +perlbase-if +perlbase-tap +perlbase-text
+endef
+
+define Package/perlbase-app/install
+$(call perlmod/Install,$(1),App,)
+endef
+
+$(eval $(call BuildPackage,perlbase-app))
+
+
 define Package/perlbase-archive
 $(call Package/perlbase-template)
 TITLE:=Archive perl module
@@ -27,11 +40,25 @@ endef
 
 define Package/perlbase-archive/install
 $(call perlmod/Install,$(1),Archive,)
+$(call perlmod/InstallBaseTests,$(1),cpan/Archive-Tar/t)
 endef
 
 $(eval $(call BuildPackage,perlbase-archive))
 
 
+define Package/perlbase-arybase
+$(call Package/perlbase-template)
+TITLE:=arybase perl module
+endef
+
+define Package/perlbase-arybase/install
+$(call perlmod/Install,$(1),arybase.pm auto/arybase,)
+$(call perlmod/InstallBaseTests,$(1),ext/arybase/t)
+endef
+
+$(eval $(call BuildPackage,perlbase-arybase))
+
+
 define Package/perlbase-attribute
 $(call Package/perlbase-template)
 TITLE:=Attribute perl module
@@ -40,6 +67,7 @@ endef
 
 define Package/perlbase-attribute/install
 $(call perlmod/Install,$(1),Attribute,)
+$(call perlmod/InstallBaseTests,$(1),dist/Attribute-Handlers/t)
 endef
 
 $(eval $(call BuildPackage,perlbase-attribute))
@@ -52,12 +80,26 @@ DEPENDS+=+perlbase-essential
 endef
 
 define Package/perlbase-attributes/install
-$(call perlmod/Install,$(1),attributes.pm,)
+$(call perlmod/Install,$(1),attributes.pm auto/attributes,)
 endef
 
 $(eval $(call BuildPackage,perlbase-attributes))
 
 
+define Package/perlbase-autodie
+$(call Package/perlbase-template)
+TITLE:=autodie perl module
+DEPENDS+=+perlbase-base +perlbase-essential +perlbase-fatal +perlbase-if
+endef
+
+define Package/perlbase-autodie/install
+$(call perlmod/Install,$(1),autodie autodie.pm,)
+$(call perlmod/InstallBaseTests,$(1),cpan/autodie/t)
+endef
+
+$(eval $(call BuildPackage,perlbase-autodie))
+
+
 define Package/perlbase-autoloader
 $(call Package/perlbase-template)
 TITLE:=AutoLoader perl module
@@ -66,6 +108,7 @@ endef
 
 define Package/perlbase-autoloader/install
 $(call perlmod/Install,$(1),AutoLoader.pm,)
+$(call perlmod/InstallBaseTests,$(1),cpan/AutoLoader/t)
 endef
 
 $(eval $(call BuildPackage,perlbase-autoloader))
@@ -78,7 +121,7 @@ DEPENDS+=+perlbase-config +perlbase-essential +perlbase-file
 endef
 
 define Package/perlbase-autosplit/install
-$(call perlmod/Install,$(1),AutoSplit.pm,)
+$(call perlmod/Install/NoStrip,$(1),AutoSplit.pm,)
 endef
 
 $(eval $(call BuildPackage,perlbase-autosplit))
@@ -91,6 +134,7 @@ endef
 
 define Package/perlbase-autouse/install
 $(call perlmod/Install,$(1),autouse.pm,)
+$(call perlmod/InstallBaseTests,$(1),dist/autouse/t)
 endef
 
 $(eval $(call BuildPackage,perlbase-autouse))
@@ -104,6 +148,7 @@ endef
 
 define Package/perlbase-b/install
 $(call perlmod/Install,$(1),B B.pm auto/B,)
+$(call perlmod/InstallBaseTests,$(1),cpan/B-Debug/t ext/B/t)
 endef
 
 $(eval $(call BuildPackage,perlbase-b))
@@ -117,6 +162,7 @@ endef
 
 define Package/perlbase-base/install
 $(call perlmod/Install,$(1),base.pm,)
+$(call perlmod/InstallBaseTests,$(1),dist/base/t)
 endef
 
 $(eval $(call BuildPackage,perlbase-base))
@@ -155,7 +201,8 @@ DEPENDS+=+perlbase-bigint +perlbase-essential
 endef
 
 define Package/perlbase-bignum/install
-$(call perlmod/Install,$(1),bignum.pm,)
+$(call perlmod/Install,$(1),bignum.pm bigrat.pm,)
+$(call perlmod/InstallBaseTests,$(1),dist/bignum/t)
 endef
 
 $(eval $(call BuildPackage,perlbase-bignum))
@@ -194,6 +241,7 @@ endef
 
 define Package/perlbase-cgi/install
 $(call perlmod/Install,$(1),CGI CGI.pm,)
+$(call perlmod/InstallBaseTests,$(1),cpan/CGI/t)
 endef
 
 $(eval $(call BuildPackage,perlbase-cgi))
@@ -202,11 +250,11 @@ $(eval $(call BuildPackage,perlbase-cgi))
 define Package/perlbase-charnames
 $(call Package/perlbase-template)
 TITLE:=charnames perl module
-DEPENDS+=+perlbase-bytes +perlbase-essential +perlbase-re +perlbase-unicore
+DEPENDS+=+perlbase-bytes +perlbase-essential +perlbase-file +perlbase-re +perlbase-unicore
 endef
 
 define Package/perlbase-charnames/install
-$(call perlmod/Install,$(1),charnames.pm,)
+$(call perlmod/Install,$(1),_charnames.pm charnames.pm,)
 endef
 
 $(eval $(call BuildPackage,perlbase-charnames))
@@ -233,6 +281,7 @@ endef
 
 define Package/perlbase-compress/install
 $(call perlmod/Install,$(1),Compress auto/Compress,)
+$(call perlmod/InstallBaseTests,$(1),cpan/Compress-Raw-Bzip2/t cpan/Compress-Raw-Zlib/t)
 endef
 
 $(eval $(call BuildPackage,perlbase-compress))
@@ -241,10 +290,12 @@ $(eval $(call BuildPackage,perlbase-compress))
 define Package/perlbase-config
 $(call Package/perlbase-template)
 TITLE:=Config perl module
+DEPENDS+=+perlbase-essential
 endef
 
 define Package/perlbase-config/install
-$(call perlmod/Install,$(1),Config Config.pm Config_heavy.pl,)
+$(call perlmod/Install,$(1),Config Config.pm Config_git.pl Config_heavy.pl,)
+$(call perlmod/InstallBaseTests,$(1),cpan/Config-Perl-V/t)
 endef
 
 $(eval $(call BuildPackage,perlbase-config))
@@ -253,11 +304,13 @@ $(eval $(call BuildPackage,perlbase-config))
 define Package/perlbase-cpan
 $(call Package/perlbase-template)
 TITLE:=CPAN perl module
-DEPENDS+=+perlbase-b +perlbase-config +perlbase-cwd +perlbase-dirhandle +perlbase-essential +perlbase-extutils +perlbase-fcntl +perlbase-file +perlbase-filehandle +perlbase-list +perlbase-net +perlbase-safe +perlbase-scalar +perlbase-sys +perlbase-text +perlbase-version
+DEPENDS+=+perlbase-b +perlbase-config +perlbase-cwd +perlbase-dirhandle +perlbase-essential +perlbase-extutils +perlbase-fcntl +perlbase-file +perlbase-filehandle +perlbase-http-tiny +perlbase-list +perlbase-net +perlbase-safe +perlbase-scalar +perlbase-sys +perlbase-text +perlbase-version
 endef
 
 define Package/perlbase-cpan/install
-$(call perlmod/Install,$(1),CPAN CPAN.pm,)
+$(call perlmod/Install,$(1),CPAN CPAN.pm Parse/CPAN/Meta.pm,CPAN/FirstTime.pm)
+$(call perlmod/Install/NoStrip,$(1),CPAN/FirstTime.pm,)
+$(call perlmod/InstallBaseTests,$(1),cpan/CPAN-Meta-Requirements/t cpan/CPAN-Meta-YAML/t cpan/CPAN-Meta/t cpan/CPAN/t cpan/Parse-CPAN-Meta/t)
 endef
 
 $(eval $(call BuildPackage,perlbase-cpan))
@@ -284,6 +337,7 @@ endef
 
 define Package/perlbase-data/install
 $(call perlmod/Install,$(1),Data auto/Data,)
+$(call perlmod/InstallBaseTests,$(1),dist/Data-Dumper/t)
 endef
 
 $(eval $(call BuildPackage,perlbase-data))
@@ -310,6 +364,7 @@ endef
 
 define Package/perlbase-db-file/install
 $(call perlmod/Install,$(1),DB_File.pm auto/DB_File,)
+$(call perlmod/InstallBaseTests,$(1),cpan/DB_File/t)
 endef
 
 $(eval $(call BuildPackage,perlbase-db-file))
@@ -335,7 +390,9 @@ DEPENDS+=+perlbase-essential +perlbase-file
 endef
 
 define Package/perlbase-devel/install
-$(call perlmod/Install,$(1),Devel auto/Devel,)
+$(call perlmod/Install,$(1),Devel auto/Devel,Devel/PPPort.pm)
+$(call perlmod/Install/NoStrip,$(1),Devel/PPPort.pm,)
+$(call perlmod/InstallBaseTests,$(1),cpan/Devel-PPPort/t dist/Devel-SelfStubber/t ext/Devel-Peek/t)
 endef
 
 $(eval $(call BuildPackage,perlbase-devel))
@@ -362,6 +419,8 @@ endef
 
 define Package/perlbase-digest/install
 $(call perlmod/Install,$(1),Digest Digest.pm auto/Digest,)
+$(call perlmod/InstallBaseTests,$(1),cpan/Digest-MD5/MD5.xs cpan/Digest-MD5/t cpan/Digest-SHA/t cpan/Digest/t)
+       $(INSTALL_DIR) $(1)/$(PERL_TESTSDIR)/cpan/Digest-SHA/src
 endef
 
 $(eval $(call BuildPackage,perlbase-digest))
@@ -388,6 +447,7 @@ endef
 
 define Package/perlbase-dumpvalue/install
 $(call perlmod/Install,$(1),Dumpvalue.pm,)
+$(call perlmod/InstallBaseTests,$(1),dist/Dumpvalue/t)
 endef
 
 $(eval $(call BuildPackage,perlbase-dumpvalue))
@@ -413,6 +473,7 @@ endef
 
 define Package/perlbase-dynaloader/install
 $(call perlmod/Install,$(1),DynaLoader.pm,)
+$(call perlmod/InstallBaseTests,$(1),ext/DynaLoader/t)
 endef
 
 $(eval $(call BuildPackage,perlbase-dynaloader))
@@ -426,6 +487,7 @@ endef
 
 define Package/perlbase-encode/install
 $(call perlmod/Install,$(1),Encode Encode.pm auto/Encode,Encode/PerlIO.pod Encode/Supported.pod)
+$(call perlmod/InstallBaseTests,$(1),cpan/Encode/t)
 endef
 
 $(eval $(call BuildPackage,perlbase-encode))
@@ -439,6 +501,7 @@ endef
 
 define Package/perlbase-encoding/install
 $(call perlmod/Install,$(1),encoding encoding.pm,)
+$(call perlmod/InstallBaseTests,$(1),cpan/encoding-warnings/t)
 endef
 
 $(eval $(call BuildPackage,perlbase-encoding))
@@ -464,6 +527,7 @@ endef
 
 define Package/perlbase-env/install
 $(call perlmod/Install,$(1),Env.pm,)
+$(call perlmod/InstallBaseTests,$(1),dist/Env/t)
 endef
 
 $(eval $(call BuildPackage,perlbase-env))
@@ -477,6 +541,7 @@ endef
 
 define Package/perlbase-errno/install
 $(call perlmod/Install,$(1),Errno.pm,)
+$(call perlmod/InstallBaseTests,$(1),ext/Errno/t)
 endef
 
 $(eval $(call BuildPackage,perlbase-errno))
@@ -485,24 +550,40 @@ $(eval $(call BuildPackage,perlbase-errno))
 define Package/perlbase-essential
 $(call Package/perlbase-template)
 TITLE:=essential perl module
-DEPENDS+=+perlbase-config
 endef
 
 define Package/perlbase-essential/install
-$(call perlmod/Install,$(1),Carp Carp.pm Exporter Exporter.pm constant.pm lib.pm locale.pm overload.pm overloading.pm parent.pm strict.pm subs.pm vars.pm warnings warnings.pm,)
+$(call perlmod/Install,$(1),Carp Carp.pm Exporter Exporter.pm constant.pm deprecate.pm lib.pm locale.pm overload.pm overloading.pm parent.pm strict.pm subs.pm vars.pm warnings warnings.pm,)
+$(call perlmod/InstallBaseTests,$(1),cpan/parent/t dist/Carp/t dist/Exporter/t dist/constant/t dist/lib/t)
 endef
 
 $(eval $(call BuildPackage,perlbase-essential))
 
 
+define Package/perlbase-experimental
+$(call Package/perlbase-template)
+TITLE:=perl module to enable/disable experimental features
+DEPENDS+=+perlbase-essential +perlbase-feature
+endef
+
+define Package/perlbase-experimental/install
+$(call perlmod/Install,$(1),experimental.pm,)
+$(call perlmod/InstallBaseTests,$(1),cpan/experimental/t)
+endef
+
+$(eval $(call BuildPackage,perlbase-experimental))
+
+
 define Package/perlbase-extutils
 $(call Package/perlbase-template)
 TITLE:=ExtUtils perl module
-DEPENDS+=+perlbase-autosplit +perlbase-config +perlbase-cwd +perlbase-dirhandle +perlbase-essential +perlbase-file +perlbase-io +perlbase-ipc +perlbase-symbol +perlbase-text
+DEPENDS+=+perlbase-autosplit +perlbase-config +perlbase-cwd +perlbase-dirhandle +perlbase-essential +perlbase-file +perlbase-io +perlbase-ipc +perlbase-ostype +perlbase-symbol +perlbase-text
 endef
 
 define Package/perlbase-extutils/install
-$(call perlmod/Install,$(1),ExtUtils,ExtUtils/MakeMaker/FAQ.pod ExtUtils/MakeMaker/Tutorial.pod)
+$(call perlmod/Install,$(1),ExtUtils,ExtUtils/MakeMaker/FAQ.pod ExtUtils/MakeMaker/Tutorial.pod ExtUtils/ParseXS.pm ExtUtils/ParseXS/Utilities.pm)
+$(call perlmod/Install/NoStrip,$(1),ExtUtils/ParseXS.pm ExtUtils/ParseXS/Utilities.pm,)
+$(call perlmod/InstallBaseTests,$(1),cpan/ExtUtils-Constant/t cpan/ExtUtils-MakeMaker/t dist/ExtUtils-CBuilder/t dist/ExtUtils-Command/t dist/ExtUtils-Install/t dist/ExtUtils-Manifest/t dist/ExtUtils-ParseXS/t)
 endef
 
 $(eval $(call BuildPackage,perlbase-extutils))
@@ -529,6 +610,7 @@ endef
 
 define Package/perlbase-fcntl/install
 $(call perlmod/Install,$(1),Fcntl.pm auto/Fcntl,)
+$(call perlmod/InstallBaseTests,$(1),ext/Fcntl/t)
 endef
 
 $(eval $(call BuildPackage,perlbase-fcntl))
@@ -566,7 +648,9 @@ DEPENDS+=+perlbase-class +perlbase-config +perlbase-cwd +perlbase-errno +perlbas
 endef
 
 define Package/perlbase-file/install
-$(call perlmod/Install,$(1),File auto/File,)
+$(call perlmod/Install,$(1),File auto/File,File/Find.pm)
+$(call perlmod/Install/NoStrip,$(1),File/Find.pm,)
+$(call perlmod/InstallBaseTests,$(1),cpan/File-Fetch/t cpan/File-Path/t cpan/File-Temp/t dist/PathTools/t ext/File-DosGlob/t ext/File-Find/t ext/File-Glob/t)
 endef
 
 $(eval $(call BuildPackage,perlbase-file))
@@ -580,6 +664,7 @@ endef
 
 define Package/perlbase-filecache/install
 $(call perlmod/Install,$(1),FileCache.pm,)
+$(call perlmod/InstallBaseTests,$(1),ext/FileCache/t)
 endef
 
 $(eval $(call BuildPackage,perlbase-filecache))
@@ -618,6 +703,7 @@ endef
 
 define Package/perlbase-filter/install
 $(call perlmod/Install,$(1),Filter auto/Filter,)
+$(call perlmod/InstallBaseTests,$(1),cpan/Filter-Util-Call/filter-util.pl cpan/Filter-Util-Call/t dist/Filter-Simple/t)
 endef
 
 $(eval $(call BuildPackage,perlbase-filter))
@@ -644,6 +730,7 @@ endef
 
 define Package/perlbase-gdbm-file/install
 $(call perlmod/Install,$(1),GDBM_File.pm auto/GDBM_File,)
+$(call perlmod/InstallBaseTests,$(1),ext/GDBM_File/t)
 endef
 
 $(eval $(call BuildPackage,perlbase-gdbm-file))
@@ -657,6 +744,7 @@ endef
 
 define Package/perlbase-getopt/install
 $(call perlmod/Install,$(1),Getopt,)
+$(call perlmod/InstallBaseTests,$(1),cpan/Getopt-Long/t)
 endef
 
 $(eval $(call BuildPackage,perlbase-getopt))
@@ -670,11 +758,26 @@ endef
 
 define Package/perlbase-hash/install
 $(call perlmod/Install,$(1),Hash auto/Hash,)
+$(call perlmod/InstallBaseTests,$(1),ext/Hash-Util-FieldHash/t ext/Hash-Util/t)
 endef
 
 $(eval $(call BuildPackage,perlbase-hash))
 
 
+define Package/perlbase-http-tiny
+$(call Package/perlbase-template)
+TITLE:=http-tiny perl module
+DEPENDS+=+perlbase-errno +perlbase-essential +perlbase-io
+endef
+
+define Package/perlbase-http-tiny/install
+$(call perlmod/Install,$(1),HTTP/Tiny.pm,)
+$(call perlmod/InstallBaseTests,$(1),cpan/HTTP-Tiny/t)
+endef
+
+$(eval $(call BuildPackage,perlbase-http-tiny))
+
+
 define Package/perlbase-i18n
 $(call Package/perlbase-template)
 TITLE:=I18N perl module
@@ -682,7 +785,9 @@ DEPENDS+=+perlbase-essential +perlbase-posix
 endef
 
 define Package/perlbase-i18n/install
-$(call perlmod/Install,$(1),I18N auto/I18N,)
+$(call perlmod/Install,$(1),I18N auto/I18N,I18N/LangTags/List.pm)
+$(call perlmod/InstallBaseTests,$(1),dist/I18N-Collate/t dist/I18N-LangTags/t ext/I18N-Langinfo/t)
+$(call perlmod/Install/NoStrip,$(1),I18N/LangTags/List.pm)
 endef
 
 $(eval $(call BuildPackage,perlbase-i18n))
@@ -695,6 +800,7 @@ endef
 
 define Package/perlbase-if/install
 $(call perlmod/Install,$(1),if.pm,)
+$(call perlmod/InstallBaseTests,$(1),dist/if/t)
 endef
 
 $(eval $(call BuildPackage,perlbase-if))
@@ -720,6 +826,7 @@ endef
 
 define Package/perlbase-io/install
 $(call perlmod/Install,$(1),IO IO.pm auto/IO,)
+$(call perlmod/InstallBaseTests,$(1),cpan/IO-Compress/t cpan/IO-Socket-IP/t cpan/IO-Zlib/t dist/IO/Makefile.PL dist/IO/t)
 endef
 
 $(eval $(call BuildPackage,perlbase-io))
@@ -733,11 +840,26 @@ endef
 
 define Package/perlbase-ipc/install
 $(call perlmod/Install,$(1),IPC auto/IPC,)
+$(call perlmod/InstallBaseTests,$(1),cpan/IPC-Cmd/t cpan/IPC-SysV/t ext/IPC-Open3/t)
 endef
 
 $(eval $(call BuildPackage,perlbase-ipc))
 
 
+define Package/perlbase-json-pp
+$(call Package/perlbase-template)
+TITLE:=json-pp perl module
+DEPENDS+=+perlbase-b +perlbase-base +perlbase-essential
+endef
+
+define Package/perlbase-json-pp/install
+$(call perlmod/Install,$(1),JSON/PP JSON/PP.pm,)
+$(call perlmod/InstallBaseTests,$(1),cpan/JSON-PP/t)
+endef
+
+$(eval $(call BuildPackage,perlbase-json-pp))
+
+
 define Package/perlbase-less
 $(call Package/perlbase-template)
 TITLE:=less perl module
@@ -772,6 +894,7 @@ endef
 
 define Package/perlbase-locale/install
 $(call perlmod/Install,$(1),Locale,Locale/Constants.pod Locale/Country.pod Locale/Currency.pod Locale/Language.pod Locale/Maketext.pod Locale/Maketext/TPJ13.pod Locale/Script.pod)
+$(call perlmod/InstallBaseTests,$(1),cpan/Locale-Codes/t cpan/Locale-Maketext-Simple/t dist/Locale-Maketext/t)
 endef
 
 $(eval $(call BuildPackage,perlbase-locale))
@@ -785,6 +908,7 @@ endef
 
 define Package/perlbase-math/install
 $(call perlmod/Install,$(1),Math auto/Math,)
+$(call perlmod/InstallBaseTests,$(1),cpan/Math-Complex/t dist/Math-BigInt-FastCalc/t dist/Math-BigInt/t dist/Math-BigRat/t)
 endef
 
 $(eval $(call BuildPackage,perlbase-math))
@@ -798,6 +922,7 @@ endef
 
 define Package/perlbase-memoize/install
 $(call perlmod/Install,$(1),Memoize Memoize.pm,)
+$(call perlmod/InstallBaseTests,$(1),cpan/Memoize/t)
 endef
 
 $(eval $(call BuildPackage,perlbase-memoize))
@@ -811,6 +936,7 @@ endef
 
 define Package/perlbase-mime/install
 $(call perlmod/Install,$(1),MIME auto/MIME,)
+$(call perlmod/InstallBaseTests,$(1),cpan/MIME-Base64/t)
 endef
 
 $(eval $(call BuildPackage,perlbase-mime))
@@ -819,11 +945,13 @@ $(eval $(call BuildPackage,perlbase-mime))
 define Package/perlbase-module
 $(call Package/perlbase-template)
 TITLE:=Module perl module
-DEPENDS+=+perlbase-config +perlbase-cwd +perlbase-data +perlbase-essential +perlbase-extutils +perlbase-file +perlbase-filehandle +perlbase-if +perlbase-io +perlbase-locale +perlbase-params +perlbase-text +perlbase-version
+DEPENDS+=+perlbase-config +perlbase-cwd +perlbase-data +perlbase-essential +perlbase-extutils +perlbase-file +perlbase-filehandle +perlbase-if +perlbase-io +perlbase-locale +perlbase-ostype +perlbase-params +perlbase-text +perlbase-version
 endef
 
 define Package/perlbase-module/install
-$(call perlmod/Install,$(1),Module,Module/Build/API.pod Module/Build/Authoring.pod)
+$(call perlmod/Install,$(1),Module,Module/Build Module/Build.pm Module/Build/API.pod Module/Build/Authoring.pod)
+$(call perlmod/Install/NoStrip,$(1),Module/Build Module/Build.pm,Module/Build/API.pod Module/Build/Authoring.pod)
+$(call perlmod/InstallBaseTests,$(1),cpan/Module-Build/lib cpan/Module-Build/t cpan/Module-Load-Conditional/t cpan/Module-Load/t cpan/Module-Loaded/t cpan/Module-Metadata/lib cpan/Module-Metadata/t dist/Module-CoreList/t)
 endef
 
 $(eval $(call BuildPackage,perlbase-module))
@@ -836,7 +964,7 @@ DEPENDS+=+perlbase-essential
 endef
 
 define Package/perlbase-mro/install
-$(call perlmod/Install,$(1),mro.pm,)
+$(call perlmod/Install,$(1),auto/mro mro.pm,)
 endef
 
 $(eval $(call BuildPackage,perlbase-mro))
@@ -850,6 +978,7 @@ endef
 
 define Package/perlbase-net/install
 $(call perlmod/Install,$(1),Net,Net/libnetFAQ.pod)
+$(call perlmod/InstallBaseTests,$(1),cpan/libnet/t dist/Net-Ping/t)
 endef
 
 $(eval $(call BuildPackage,perlbase-net))
@@ -863,6 +992,7 @@ endef
 
 define Package/perlbase-next/install
 $(call perlmod/Install,$(1),NEXT.pm,)
+$(call perlmod/InstallBaseTests,$(1),cpan/NEXT/t)
 endef
 
 $(eval $(call BuildPackage,perlbase-next))
@@ -888,7 +1018,9 @@ DEPENDS+=+perlbase-essential +perlbase-xsloader
 endef
 
 define Package/perlbase-opcode/install
-$(call perlmod/Install,$(1),Opcode.pm auto/Opcode,)
+$(call perlmod/Install,$(1),auto/Opcode,)
+$(call perlmod/Install/NoStrip,$(1),Opcode.pm,)
+$(call perlmod/InstallBaseTests,$(1),ext/Opcode/t)
 endef
 
 $(eval $(call BuildPackage,perlbase-opcode))
@@ -920,6 +1052,20 @@ endef
 $(eval $(call BuildPackage,perlbase-ops))
 
 
+define Package/perlbase-ostype
+$(call Package/perlbase-template)
+TITLE:=OSType perl module
+DEPENDS+=+perlbase-essential
+endef
+
+define Package/perlbase-ostype/install
+$(call perlmod/Install,$(1),Perl/OSType.pm,)
+$(call perlmod/InstallBaseTests,$(1),cpan/Perl-OSType/t)
+endef
+
+$(eval $(call BuildPackage,perlbase-ostype))
+
+
 define Package/perlbase-package
 $(call Package/perlbase-template)
 TITLE:=Package perl module
@@ -928,6 +1074,7 @@ endef
 
 define Package/perlbase-package/install
 $(call perlmod/Install,$(1),Package,)
+$(call perlmod/InstallBaseTests,$(1),cpan/Package-Constants/t)
 endef
 
 $(eval $(call BuildPackage,perlbase-package))
@@ -941,6 +1088,7 @@ endef
 
 define Package/perlbase-params/install
 $(call perlmod/Install,$(1),Params,)
+$(call perlmod/InstallBaseTests,$(1),cpan/Params-Check/t)
 endef
 
 $(eval $(call BuildPackage,perlbase-params))
@@ -967,6 +1115,7 @@ endef
 
 define Package/perlbase-perlio/install
 $(call perlmod/Install,$(1),PerlIO PerlIO.pm auto/PerlIO,)
+$(call perlmod/InstallBaseTests,$(1),cpan/PerlIO-via-QuotedPrint/t ext/PerlIO-encoding/t ext/PerlIO-scalar/t ext/PerlIO-via/t)
 endef
 
 $(eval $(call BuildPackage,perlbase-perlio))
@@ -979,7 +1128,12 @@ DEPENDS+=+perlbase-config +perlbase-cwd +perlbase-encode +perlbase-essential +pe
 endef
 
 define Package/perlbase-pod/install
-$(call perlmod/Install,$(1),Pod,)
+$(call perlmod/Install,$(1),Pod,Pod/Usage.pm)
+$(call perlmod/Install/NoStrip,$(1),Pod/Usage.pm,)
+$(call perlmod/InstallBaseTests,$(1),cpan/Pod-Checker/t cpan/Pod-Escapes/t cpan/Pod-Parser/lib cpan/Pod-Parser/scripts cpan/Pod-Parser/t cpan/Pod-Perldoc/t cpan/Pod-Simple/t cpan/Pod-Usage/scripts cpan/Pod-Usage/t cpan/podlators/t ext/Pod-Functions/Functions.pm ext/Pod-Functions/t ext/Pod-Html/t)
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/pod2man $(1)/usr/bin/
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/pod2text $(1)/usr/bin/
 endef
 
 $(eval $(call BuildPackage,perlbase-pod))
@@ -993,6 +1147,7 @@ endef
 
 define Package/perlbase-posix/install
 $(call perlmod/Install,$(1),POSIX.pm auto/POSIX,)
+$(call perlmod/InstallBaseTests,$(1),ext/POSIX/Makefile.PL ext/POSIX/POSIX.xs ext/POSIX/t)
 endef
 
 $(eval $(call BuildPackage,perlbase-posix))
@@ -1006,6 +1161,7 @@ endef
 
 define Package/perlbase-re/install
 $(call perlmod/Install,$(1),auto/re re.pm,)
+$(call perlmod/InstallBaseTests,$(1),ext/re/t)
 endef
 
 $(eval $(call BuildPackage,perlbase-re))
@@ -1019,6 +1175,7 @@ endef
 
 define Package/perlbase-safe/install
 $(call perlmod/Install,$(1),Safe.pm,)
+$(call perlmod/InstallBaseTests,$(1),dist/Safe/t)
 endef
 
 $(eval $(call BuildPackage,perlbase-safe))
@@ -1032,6 +1189,8 @@ endef
 
 define Package/perlbase-scalar/install
 $(call perlmod/Install,$(1),Scalar,)
+$(call perlmod/InstallBaseTests,$(1),cpan/Scalar-List-Utils/t)
+       $(INSTALL_DIR) $(1)/$(PERL_TESTSDIR)/cpan/Scalar-List-Utils/blib
 endef
 
 $(eval $(call BuildPackage,perlbase-scalar))
@@ -1045,6 +1204,7 @@ endef
 
 define Package/perlbase-sdbm-file/install
 $(call perlmod/Install,$(1),SDBM_File.pm auto/SDBM_File,)
+$(call perlmod/InstallBaseTests,$(1),ext/SDBM_File/t)
 endef
 
 $(eval $(call BuildPackage,perlbase-sdbm-file))
@@ -1058,6 +1218,7 @@ endef
 
 define Package/perlbase-search/install
 $(call perlmod/Install,$(1),Search,)
+$(call perlmod/InstallBaseTests,$(1),dist/Search-Dict/t)
 endef
 
 $(eval $(call BuildPackage,perlbase-search))
@@ -1084,6 +1245,7 @@ endef
 
 define Package/perlbase-selfloader/install
 $(call perlmod/Install,$(1),SelfLoader.pm,)
+$(call perlmod/InstallBaseTests,$(1),dist/SelfLoader/t)
 endef
 
 $(eval $(call BuildPackage,perlbase-selfloader))
@@ -1110,6 +1272,7 @@ endef
 
 define Package/perlbase-socket/install
 $(call perlmod/Install,$(1),Socket.pm auto/Socket,)
+$(call perlmod/InstallBaseTests,$(1),cpan/Socket/t)
 endef
 
 $(eval $(call BuildPackage,perlbase-socket))
@@ -1136,6 +1299,7 @@ endef
 
 define Package/perlbase-storable/install
 $(call perlmod/Install,$(1),Storable.pm auto/Storable,)
+$(call perlmod/InstallBaseTests,$(1),dist/Storable/t)
 endef
 
 $(eval $(call BuildPackage,perlbase-storable))
@@ -1161,11 +1325,25 @@ endef
 
 define Package/perlbase-sys/install
 $(call perlmod/Install,$(1),Sys auto/Sys,)
+$(call perlmod/InstallBaseTests,$(1),cpan/Sys-Syslog/t ext/Sys-Hostname/t)
 endef
 
 $(eval $(call BuildPackage,perlbase-sys))
 
 
+define Package/perlbase-tap
+$(call Package/perlbase-template)
+TITLE:=TAP perl module
+DEPENDS+=+perlbase-base +perlbase-benchmark +perlbase-config +perlbase-essential +perlbase-file +perlbase-io +perlbase-posix +perlbase-text
+endef
+
+define Package/perlbase-tap/install
+$(call perlmod/Install,$(1),TAP,)
+endef
+
+$(eval $(call BuildPackage,perlbase-tap))
+
+
 define Package/perlbase-term
 $(call Package/perlbase-template)
 TITLE:=Term perl module
@@ -1174,6 +1352,7 @@ endef
 
 define Package/perlbase-term/install
 $(call perlmod/Install,$(1),Term,)
+$(call perlmod/InstallBaseTests,$(1),cpan/Term-ANSIColor/t cpan/Term-Cap/test.pl dist/Term-Complete/t dist/Term-ReadLine/t)
 endef
 
 $(eval $(call BuildPackage,perlbase-term))
@@ -1182,11 +1361,13 @@ $(eval $(call BuildPackage,perlbase-term))
 define Package/perlbase-test
 $(call Package/perlbase-template)
 TITLE:=Test perl module
-DEPENDS+=+perlbase-base +perlbase-config +perlbase-essential +perlbase-symbol +perlbase-text
+DEPENDS+=+perlbase-base +perlbase-config +perlbase-essential +perlbase-symbol +perlbase-tap +perlbase-text
 endef
 
 define Package/perlbase-test/install
-$(call perlmod/Install,$(1),Test Test.pm,Test/Harness/TAP.pod Test/Tutorial.pod)
+$(call perlmod/Install,$(1),Test Test.pm,Test/Builder.pm Test/Harness/TAP.pod Test/More.pm Test/Tutorial.pod)
+$(call perlmod/Install/NoStrip,$(1),Test/Builder.pm Test/More.pm,)
+$(call perlmod/InstallBaseTests,$(1),cpan/Test-Harness/t cpan/Test-Simple/t cpan/Test/t)
        $(INSTALL_DIR) $(1)/usr/bin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/prove $(1)/usr/bin
 endef
@@ -1197,11 +1378,12 @@ $(eval $(call BuildPackage,perlbase-test))
 define Package/perlbase-text
 $(call Package/perlbase-template)
 TITLE:=Text perl module
-DEPENDS+=+perlbase-essential
+DEPENDS+=+perlbase-essential +perlbase-selfloader
 endef
 
 define Package/perlbase-text/install
 $(call perlmod/Install,$(1),Text,)
+$(call perlmod/InstallBaseTests,$(1),cpan/Text-Balanced/t cpan/Text-ParseWords/t cpan/Text-Tabs/t dist/Text-Abbrev/t)
 endef
 
 $(eval $(call BuildPackage,perlbase-text))
@@ -1215,6 +1397,7 @@ endef
 
 define Package/perlbase-thread/install
 $(call perlmod/Install,$(1),Thread Thread.pm,)
+$(call perlmod/InstallBaseTests,$(1),dist/Thread-Queue/t dist/Thread-Semaphore/t)
 endef
 
 $(eval $(call BuildPackage,perlbase-thread))
@@ -1228,6 +1411,7 @@ endef
 
 define Package/perlbase-threads/install
 $(call perlmod/Install,$(1),auto/threads threads threads.pm,)
+$(call perlmod/InstallBaseTests,$(1),dist/threads-shared/t dist/threads/t)
 endef
 
 $(eval $(call BuildPackage,perlbase-threads))
@@ -1240,7 +1424,8 @@ DEPENDS+=+perlbase-essential +perlbase-fcntl +perlbase-posix
 endef
 
 define Package/perlbase-tie/install
-$(call perlmod/Install,$(1),Tie,)
+$(call perlmod/Install,$(1),Tie auto/Tie,)
+$(call perlmod/InstallBaseTests,$(1),cpan/Tie-RefHash/t dist/Tie-File/t ext/Tie-Hash-NamedCapture/t ext/Tie-Memoize/lib/Tie/Memoize.pm ext/Tie-Memoize/t)
 endef
 
 $(eval $(call BuildPackage,perlbase-tie))
@@ -1254,6 +1439,7 @@ endef
 
 define Package/perlbase-time/install
 $(call perlmod/Install,$(1),Time auto/Time,)
+$(call perlmod/InstallBaseTests,$(1),cpan/Time-HiRes/t cpan/Time-Local/t cpan/Time-Piece/t)
 endef
 
 $(eval $(call BuildPackage,perlbase-time))
@@ -1267,6 +1453,7 @@ endef
 
 define Package/perlbase-unicode/install
 $(call perlmod/Install,$(1),Unicode auto/Unicode,)
+$(call perlmod/InstallBaseTests,$(1),cpan/Unicode-Collate/t cpan/Unicode-Normalize/t)
 endef
 
 $(eval $(call BuildPackage,perlbase-unicode))
@@ -1325,11 +1512,12 @@ $(eval $(call BuildPackage,perlbase-utf8))
 define Package/perlbase-version
 $(call Package/perlbase-template)
 TITLE:=version perl module
-DEPENDS+=+perlbase-essential
+DEPENDS+=+perlbase-config +perlbase-essential
 endef
 
 define Package/perlbase-version/install
-$(call perlmod/Install,$(1),version.pm,)
+$(call perlmod/Install,$(1),version version.pm,)
+$(call perlmod/InstallBaseTests,$(1),cpan/version/t)
 endef
 
 $(eval $(call BuildPackage,perlbase-version))
@@ -1342,6 +1530,10 @@ endef
 
 define Package/perlbase-xsloader/install
 $(call perlmod/Install,$(1),XSLoader.pm,)
+$(call perlmod/InstallBaseTests,$(1),dist/XSLoader/t ext/XS-APItest/t ext/XS-Typemap/t)
 endef
 
 $(eval $(call BuildPackage,perlbase-xsloader))
+
+
+# Generated Mon Oct 13 10:06:15 2014
index 3c3d56720a63a6c53e7bacbcbd9c3b80432d1f13..e8706dc6a087e81b4f5fd95ecde79c58f4f74caa 100644 (file)
@@ -11,6 +11,9 @@ PERL_CMD:=$(STAGING_DIR_HOST)/usr/bin/perl5.20.0
 
 # Module install prefix
 PERL_SITELIB:=/usr/lib/perl5/5.20
+PERL_TESTSDIR:=/usr/share/perl/perl-tests
+PERLBASE_TESTSDIR:=/usr/share/perl/perlbase-tests
+PERLMOD_TESTSDIR:=/usr/share/perl/perlmod-tests
 
 define perlmod/host/relink
        rm -f $(1)/Makefile.aperl
@@ -105,7 +108,7 @@ define perlmod/Compile
                install
 endef
 
-define perlmod/Install
+define perlmod/Install/NoStrip
        $(INSTALL_DIR) $(strip $(1))$(PERL_SITELIB)
        (cd $(PKG_INSTALL_DIR)$(PERL_SITELIB) && \
        rsync --relative -rlHp --itemize-changes \
@@ -116,12 +119,37 @@ define perlmod/Install
                $(strip $(2)) $(strip $(1))$(PERL_SITELIB))
 
        chmod -R u+w $(strip $(1))$(PERL_SITELIB)
+endef
+
+
+define perlmod/Install
+       $(call perlmod/Install/NoStrip,$(1),$(2),$(3))
 
        @echo "---> Stripping modules in: $(strip $(1))$(PERL_SITELIB)"
        find $(strip $(1))$(PERL_SITELIB) -name \*.pm -or -name \*.pl | \
        xargs -r sed -i \
-               -e '/^=\(head\|pod\|item\|over\|back\|encoding\)/,/^=cut/d' \
-               -e '/^=\(head\|pod\|item\|over\|back\|encoding\)/,$$$$d' \
+               -e '/^=\(head\|pod\|item\|over\|back\|encoding\|begin\|end\|for\)/,/^=cut/d' \
+               -e '/^=\(head\|pod\|item\|over\|back\|encoding\|begin\|end\|for\)/,$$$$d' \
                -e '/^#$$$$/d' \
                -e '/^#[^!"'"'"']/d'
 endef
+
+# You probably don't want to use this directly. Look at perlmod/InstallTests
+define perlmod/_InstallTests
+       $(INSTALL_DIR) $(strip $(1))
+       (cd $(PKG_BUILD_DIR)/$(2) && \
+       rsync --relative -rlHp --itemize-changes \
+               --exclude=.packlist \
+               --prune-empty-dirs \
+               $(strip $(3)) $(strip $(1)))
+
+       chmod -R u+w $(strip $(1))
+endef
+
+define perlmod/InstallBaseTests
+       $(if $(CONFIG_PERL_TESTS),$(call perlmod/_InstallTests,$(1)$(PERL_TESTSDIR),,$(2)))
+endef
+
+define perlmod/InstallTests
+       $(if $(CONFIG_PERL_TESTS),$(call perlmod/_InstallTests,$(1)$(PERL_TESTSDIR),$(2),$(3)))
+endef
index 8216fdf80987d02c84cccc8366c3783d819986e0..02e4759639b9e554d547ff73af8859f1803518b0 100644 (file)
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=php
-PKG_VERSION:=5.4.33
+PKG_VERSION:=5.4.35
 PKG_RELEASE:=1
 
 PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
@@ -18,7 +18,7 @@ PKG_LICENSE_FILE=LICENSE
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://www.php.net/distributions/
-PKG_MD5SUM:=c6878bb1cdb46bfc1e1a5cd67a024737
+PKG_MD5SUM:=489cc8336488fb2e722ffa3c08f9c864
 
 PKG_FIXUP:=libtool no-autoreconf
 PKG_BUILD_PARALLEL:=1
index 150bdc52a5ad96489c8c73801d77683c9631cf7f..cbb568001c99c2f2f65a2c8f2a6f5747b401eb69 100644 (file)
@@ -15,7 +15,7 @@ PKG_MD5SUM:=3f2601ef3c8b77fc6d21a9c77a81efeb
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_MAINTAINER:=Denis Shulyaka <Shulyaka@gmail.com>
 PKG_LICENSE:=ISC
-PKG_LICENSE_FILE:=LICENSE
+PKG_LICENSE_FILES:=LICENSE
 
 include $(INCLUDE_DIR)/package.mk
 $(call include_mk, python-package.mk)
diff --git a/lang/python-pip/Makefile b/lang/python-pip/Makefile
new file mode 100644 (file)
index 0000000..c0de9fa
--- /dev/null
@@ -0,0 +1,56 @@
+#
+# Copyright (C) 2014 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+# 
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-pip
+PKG_VERSION:=1.5.6
+PKG_RELEASE:=1
+
+PKG_SOURCE:=pip-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://pypi.python.org/packages/source/p/pip/
+PKG_MD5SUM:=01026f87978932060cc86c1dc527903e
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/pip-$(PKG_VERSION)
+PKG_USE_MIPS16:=0
+
+include $(INCLUDE_DIR)/package.mk
+$(call include_mk, python-package.mk)
+
+define Package/python-pip
+  SUBMENU:=Python
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=Tool for installing Python packages.
+  URL:=https://pip.pypa.io
+  DEPENDS:=+python +python-setuptools
+endef
+
+define Package/python-pip/description
+  A tool for installing and managing Python packages.
+endef
+
+PYTHONPATH:=$(PKG_INSTALL_DIR)/$(PYTHON_PKG_DIR)
+define Build/Compile
+       $(INSTALL_DIR) $(PYTHONPATH)
+       $(call Build/Compile/PyMod,,\
+               install --prefix="$(PKG_INSTALL_DIR)/usr" \
+       )
+endef
+
+define PyPackage/python-pip/filespec
++|/usr/lib/python$(PYTHON_VERSION)
+endef
+
+define PyPackage/python-pip/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin
+endef
+
+$(eval $(call PyPackage,python-pip))
+$(eval $(call BuildPackage,python-pip))
+
diff --git a/lang/python-setuptools/Makefile b/lang/python-setuptools/Makefile
new file mode 100644 (file)
index 0000000..9187614
--- /dev/null
@@ -0,0 +1,62 @@
+#
+# Copyright (C) 2014 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+# 
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-setuptools
+PKG_VERSION:=7.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=setuptools-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://pypi.python.org/packages/source/s/setuptools/
+PKG_MD5SUM:=6245d6752e2ef803c365f560f7f2f940
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/setuptools-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+$(call include_mk, python-package.mk)
+
+define Package/python-setuptools
+  SUBMENU:=Python
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=Tool for installing Python packages.
+  URL:=https://bitbucket.org/pypa/setuptools
+  DEPENDS:=+python
+endef
+
+define Package/python-setuptools/description
+  Easily download, build, install, upgrade, and uninstall Python packages
+endef
+
+PYTHONPATH:=$(PKG_INSTALL_DIR)/$(PYTHON_PKG_DIR)
+define Build/Compile
+       $(INSTALL_DIR) $(PYTHONPATH)
+       $(call Build/Compile/PyMod,,\
+               install --prefix="$(PKG_INSTALL_DIR)/usr" \
+       )
+endef
+
+define PyPackage/python-setuptools/filespec
++|/usr/lib/python$(PYTHON_VERSION)/site-packages
+endef
+
+define Build/InstallDev
+       $(INSTALL_DIR) $(2)/lib/python$(PYTHON_VERSION)/site-packages
+       $(CP) \
+               $(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON_VERSION)/site-packages/* \
+               $(HOST_PYTHON_LIB_DIR)/site-packages
+endef
+
+define PyPackage/python-setuptools/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
+endef
+
+$(eval $(call PyPackage,python-setuptools))
+$(eval $(call BuildPackage,python-setuptools))
+
index 32199f85c8ba5f7de4479934e6dd50a509df1e34..92271ba9fc159867a64a8c8fdf2115c57abb041c 100644 (file)
@@ -28,7 +28,7 @@ HOST_BUILD_PARALLEL:=1
 PKG_BUILD_DIR:=$(BUILD_DIR)/Python-$(PKG_VERSION)
 HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/Python-$(PKG_VERSION)
 
-PKG_BUILD_DEPENDS:=python/host
+PKG_BUILD_DEPENDS:=libffi/host python/host
 
 include $(INCLUDE_DIR)/host-build.mk
 include $(INCLUDE_DIR)/package.mk
@@ -51,125 +51,61 @@ define Package/python/Default/description
  the development of higher quality, more maintainable code.
 endef
 
-define Package/python
-$(call Package/python/Default)
-  DEPENDS:=+libpthread +zlib +libffi +libopenssl +libcrypto
-endef
-
-define Package/python/description
-$(call Package/python/Default/description)
-  .
-  This package contains only a minimal Python install.
-endef
-
-define Package/python-full
-$(call Package/python/Default)
-  TITLE+= (full)
-  DEPENDS:=@PACKAGE_python +PACKAGE_python:python
-endef
-
-define Package/python-full/description
-$(call Package/python/Default/description)
- .
- This package contains the full Python install.
-endef
-
-define Package/python-doc
-$(call Package/python/Default)
-  TITLE:=Python interactive documentation
-  DEPENDS:=@PACKAGE_python +PACKAGE_python:python
-endef
-
-define Package/python-bzip2
-$(call Package/python/Default)
-  TITLE:=Python support for Bzip2
-  DEPENDS:=@PACKAGE_python +PACKAGE_python:python +libbz2
-endef
-
-define Package/python-expat
-$(call Package/python/Default)
-  TITLE:=Python support for expat
-  DEPENDS:=@PACKAGE_python +PACKAGE_python:python +libexpat
-endef
-
-define Package/python-gzip
-$(call Package/python/Default)
-  TITLE:=Python support for gzip
-  DEPENDS:=@PACKAGE_python +PACKAGE_python:python
-endef
-
-define Package/python-openssl
-$(call Package/python/Default)
- TITLE:=Python support for OpenSSL
- DEPENDS:=@PACKAGE_python +PACKAGE_python:python +libopenssl
-endef
-
-define Package/python-shutil
-$(call Package/python/Default)
-  TITLE:=Python support for shutil
-  DEPENDS:=@PACKAGE_python +PACKAGE_python:python
-endef
-
-# Needs datetime
-define Package/python-sqlite3
+define Package/python-base
 $(call Package/python/Default)
- TITLE:=Python support for sqlite3
- DEPENDS:=@PACKAGE_python +PACKAGE_python:python +libsqlite3
+  TITLE:=Python $(PYTHON_VERSION) interpreter
+  DEPENDS:=+libpthread +zlib +libffi +libopenssl
 endef
 
-define Package/python-gdbm
-$(call Package/python/Default)
- TITLE:=Python support for gdbm
- DEPENDS:=@PACKAGE_python +PACKAGE_python:python +libgdbm
+define Package/python-base/description
+  This package contains only the interpreter and the bare minimum
+  for the interpreter to start.
 endef
 
-define Package/python-readline
+define Package/python
 $(call Package/python/Default)
- TITLE:=Python support for readline
- DEPENDS:=@PACKAGE_python +PACKAGE_python:python +libreadline +libncursesw @BROKEN
+  DEPENDS:=+python-base +libncursesw +libbz2 +libgdbm +libsqlite3 +libexpat +libdb47
 endef
 
-define Package/python-ncurses
-$(call Package/python/Default)
- TITLE:=Python support for readline
- DEPENDS:=@PACKAGE_python +PACKAGE_python:python +libncursesw
+define Package/python/description
+  This package contains the (almost) full Python install.
 endef
 
-MAKE_FLAGS:=\
-       $(TARGET_CONFIGURE_OPTS) \
-       DESTDIR="$(PKG_INSTALL_DIR)" \
+MAKE_FLAGS+=\
        CROSS_COMPILE=yes \
-       CFLAGS="$(TARGET_CFLAGS) -DNDEBUG -fno-inline" \
-       LDFLAGS="$(TARGET_LDFLAGS) -L$(PKG_BUILD_DIR)" \
        LD="$(TARGET_CC)" \
        PGEN=pgen2
 
+EXTRA_CFLAGS+= \
+       -DNDEBUG -fno-inline
+EXTRA_LDFLAGS+= \
+       -L$(PKG_BUILD_DIR)
+
 ENABLE_IPV6:=
 ifeq ($(CONFIG_IPV6),y)
        ENABLE_IPV6 += --enable-ipv6
 endif
 
-define Build/Configure
-       -$(MAKE) -C $(PKG_BUILD_DIR) distclean
-       (cd $(PKG_BUILD_DIR); autoreconf --force --install || exit 0)
-       $(CP) ./files/config.site $(PKG_BUILD_DIR)
-       $(call Build/Configure/Default, \
-               --sysconfdir=/etc \
-               --enable-shared \
-               --without-cxx-main \
-               --with-threads \
-               --with-system-ffi="$(STAGING_DIR)/usr" \
-               --without-ensurepip \
-               --without-pymalloc \
-               $(ENABLE_IPV6) \
-               CONFIG_SITE="$(PKG_BUILD_DIR)/config.site" \
-               OPT="$(TARGET_CFLAGS)" \
-       )
+CONFIGURE_ARGS+= \
+       --sysconfdir=/etc \
+       --enable-shared \
+       --without-cxx-main \
+       --with-threads \
+       --with-system-ffi="$(STAGING_DIR)/usr" \
+       --without-pymalloc \
+       $(ENABLE_IPV6) \
+       CONFIG_SITE="$(PKG_BUILD_DIR)/config.site" \
+       OPT="$(TARGET_CFLAGS)"
+
+define Build/Prepare
+       $(call Build/Prepare/Default)
+       $(CP) ./files/config.site $(PKG_BUILD_DIR)/config.site
 endef
 
 define Build/InstallDev
-       $(INSTALL_DIR) $(2)/bin $(1)/usr/bin $(1)/usr/include $(1)/usr/lib
        $(INSTALL_DIR) $(STAGING_DIR)/mk/
+       $(INSTALL_DIR) $(1)/usr/include/ $(1)/usr/lib/
+       $(INSTALL_DIR) $(1)/usr/lib/python$(PYTHON_VERSION)/
        $(INSTALL_DATA) ./files/python-package.mk $(STAGING_DIR)/mk/
        $(CP) \
                $(PKG_INSTALL_DIR)/usr/include/python$(PYTHON_VERSION) \
@@ -181,316 +117,73 @@ define Build/InstallDev
        $(CP) \
                $(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON_VERSION)/config \
                $(1)/usr/lib/python$(PYTHON_VERSION)/
-
-       $(CP) \
-               $(STAGING_DIR_HOST)/bin/python$(PYTHON_VERSION)-config \
-               $(2)/bin/
-       $(SED) 's,^#!.*,#!/usr/bin/env python$(PYTHON_VERSION),g' $(2)/bin/python$(PYTHON_VERSION)-config
-endef
-
-define PyPackage/python-full/filespec
-+|/usr/lib/python$(PYTHON_VERSION)
--|/usr/lib/python$(PYTHON_VERSION)/bsddb/test
--|/usr/lib/python$(PYTHON_VERSION)/config
--|/usr/lib/python$(PYTHON_VERSION)/ctypes/test
--|/usr/lib/python$(PYTHON_VERSION)/distutils/command/wininst-*.exe
--|/usr/lib/python$(PYTHON_VERSION)/distutils/tests
--|/usr/lib/python$(PYTHON_VERSION)/email/test
--|/usr/lib/python$(PYTHON_VERSION)/idlelib
--|/usr/lib/python$(PYTHON_VERSION)/json/tests
--|/usr/lib/python$(PYTHON_VERSION)/lib-tk
--|/usr/lib/python$(PYTHON_VERSION)/sqlite3
--|/usr/lib/python$(PYTHON_VERSION)/test
--|/usr/lib/python$(PYTHON_VERSION)/lib2to3
--|/usr/lib/python$(PYTHON_VERSION)/lib-old
--|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/bz2.so
--|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/gdbm.so
--|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_sqlite3.so
--|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_ssl.so
--|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/pyexpat.so
--|/usr/lib/python$(PYTHON_VERSION)/pydoc_data
--|/usr/lib/python$(PYTHON_VERSION)/pydoc.py
--|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_ctypes_test.so
--|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_testcapi.so
--|/usr/lib/python$(PYTHON_VERSION)/__future__.py
--|/usr/lib/python$(PYTHON_VERSION)/_abcoll.py
--|/usr/lib/python$(PYTHON_VERSION)/abc.py
--|/usr/lib/python$(PYTHON_VERSION)/codecs.py
--|/usr/lib/python$(PYTHON_VERSION)/compileall.py
--|/usr/lib/python$(PYTHON_VERSION)/ConfigParser.py
--|/usr/lib/python$(PYTHON_VERSION)/copy.py
--|/usr/lib/python$(PYTHON_VERSION)/copy_reg.py
--|/usr/lib/python$(PYTHON_VERSION)/dis.py
--|/usr/lib/python$(PYTHON_VERSION)/encodings
--|/usr/lib/python$(PYTHON_VERSION)/fnmatch.py
--|/usr/lib/python$(PYTHON_VERSION)/genericpath.py
--|/usr/lib/python$(PYTHON_VERSION)/getopt.py
--|/usr/lib/python$(PYTHON_VERSION)/glob.py
--|/usr/lib/python$(PYTHON_VERSION)/hashlib.py
--|/usr/lib/python$(PYTHON_VERSION)/inspect.py
--|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/array.so
--|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/binascii.so
--|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/cStringIO.so
--|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_curses.so
--|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_curses_panel.so
--|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/dbm.so
--|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_bsddb.so
--|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/fcntl.so
--|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/grp.so
--|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/itertools.so
--|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/math.so
--|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_hashlib.so
--|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/operator.so
--|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_random.so
--|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/readline.so
--|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/select.so
--|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_socket.so
--|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/strop.so
--|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_struct.so
--|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/syslog.so
--|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/time.so
--|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/unicodedata.so
--|/usr/lib/python$(PYTHON_VERSION)/linecache.py
--|/usr/lib/python$(PYTHON_VERSION)/md5.py
--|/usr/lib/python$(PYTHON_VERSION)/new.py
--|/usr/lib/python$(PYTHON_VERSION)/opcode.py
--|/usr/lib/python$(PYTHON_VERSION)/optparse.py
--|/usr/lib/python$(PYTHON_VERSION)/os.py
--|/usr/lib/python$(PYTHON_VERSION)/pickle.py
--|/usr/lib/python$(PYTHON_VERSION)/pickle.py
--|/usr/lib/python$(PYTHON_VERSION)/pkgutil.py
--|/usr/lib/python$(PYTHON_VERSION)/popen2.py
--|/usr/lib/python$(PYTHON_VERSION)/posixpath.py
--|/usr/lib/python$(PYTHON_VERSION)/py_compile.py
--|/usr/lib/python$(PYTHON_VERSION)/random.py
--|/usr/lib/python$(PYTHON_VERSION)/repr.py
--|/usr/lib/python$(PYTHON_VERSION)/re.py
--|/usr/lib/python$(PYTHON_VERSION)/sha.py
--|/usr/lib/python$(PYTHON_VERSION)/site.py
--|/usr/lib/python$(PYTHON_VERSION)/socket.py
--|/usr/lib/python$(PYTHON_VERSION)/sre_compile.py
--|/usr/lib/python$(PYTHON_VERSION)/sre_constants.py
--|/usr/lib/python$(PYTHON_VERSION)/sre_parse.py
--|/usr/lib/python$(PYTHON_VERSION)/sre.py
--|/usr/lib/python$(PYTHON_VERSION)/stat.py
--|/usr/lib/python$(PYTHON_VERSION)/StringIO.py
--|/usr/lib/python$(PYTHON_VERSION)/stringprep.py
--|/usr/lib/python$(PYTHON_VERSION)/string.py
--|/usr/lib/python$(PYTHON_VERSION)/struct.py
--|/usr/lib/python$(PYTHON_VERSION)/subprocess.py
--|/usr/lib/python$(PYTHON_VERSION)/tempfile.py
--|/usr/lib/python$(PYTHON_VERSION)/textwrap.py
--|/usr/lib/python$(PYTHON_VERSION)/tokenize.py
--|/usr/lib/python$(PYTHON_VERSION)/token.py
--|/usr/lib/python$(PYTHON_VERSION)/traceback.py
--|/usr/lib/python$(PYTHON_VERSION)/types.py
--|/usr/lib/python$(PYTHON_VERSION)/UserDict.py
--|/usr/lib/python$(PYTHON_VERSION)/warnings.py
--|/usr/lib/python$(PYTHON_VERSION)/weakref.py
--|/usr/lib/python$(PYTHON_VERSION)/_weakrefset.py
--|/usr/lib/python$(PYTHON_VERSION)/sysconfig.py
--|/usr/lib/python$(PYTHON_VERSION)/functools.py
--|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_functools.so
--|/usr/lib/python$(PYTHON_VERSION)/collections.py
--|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_collections.so
--|/usr/lib/python$(PYTHON_VERSION)/keyword.py
--|/usr/lib/python$(PYTHON_VERSION)/heapq.py
--|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_heapq.so
--|/usr/lib/python$(PYTHON_VERSION)/bisect.py
--|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_bisect.so
 endef
 
-define PyPackage/python/filespec
+define PyPackage/python-base/filespec
 +|/usr/bin/python$(PYTHON_VERSION)
-+|/usr/lib/python$(PYTHON_VERSION)/__future__.py
 +|/usr/lib/python$(PYTHON_VERSION)/_abcoll.py
++|/usr/lib/python$(PYTHON_VERSION)/_sysconfigdata.py
++|/usr/lib/python$(PYTHON_VERSION)/_weakrefset.py
 +|/usr/lib/python$(PYTHON_VERSION)/abc.py
-+|/usr/lib/python$(PYTHON_VERSION)/codecs.py
-+|/usr/lib/python$(PYTHON_VERSION)/compileall.py
-+|/usr/lib/python$(PYTHON_VERSION)/ConfigParser.py
-+|/usr/lib/python$(PYTHON_VERSION)/copy.py
 +|/usr/lib/python$(PYTHON_VERSION)/copy_reg.py
-+|/usr/lib/python$(PYTHON_VERSION)/dis.py
-+|/usr/lib/python$(PYTHON_VERSION)/encodings
-+|/usr/lib/python$(PYTHON_VERSION)/fnmatch.py
 +|/usr/lib/python$(PYTHON_VERSION)/genericpath.py
-+|/usr/lib/python$(PYTHON_VERSION)/getopt.py
-+|/usr/lib/python$(PYTHON_VERSION)/glob.py
-+|/usr/lib/python$(PYTHON_VERSION)/hashlib.py
-+|/usr/lib/python$(PYTHON_VERSION)/inspect.py
-+|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/array.so
-+|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/binascii.so
-+|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/cStringIO.so
-+|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/fcntl.so
-+|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/grp.so
-+|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/itertools.so
-+|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/math.so
-+|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_hashlib.so
-+|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/operator.so
-+|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_random.so
-+|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/select.so
-+|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_socket.so
-+|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/strop.so
-+|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_struct.so
-+|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/syslog.so
-+|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/time.so
-+|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/unicodedata.so
 +|/usr/lib/python$(PYTHON_VERSION)/linecache.py
-+|/usr/lib/python$(PYTHON_VERSION)/md5.py
-+|/usr/lib/python$(PYTHON_VERSION)/new.py
-+|/usr/lib/python$(PYTHON_VERSION)/opcode.py
-+|/usr/lib/python$(PYTHON_VERSION)/optparse.py
-+|/usr/lib/python$(PYTHON_VERSION)/os.py
-+|/usr/lib/python$(PYTHON_VERSION)/pickle.py
-+|/usr/lib/python$(PYTHON_VERSION)/pickle.py
-+|/usr/lib/python$(PYTHON_VERSION)/pkgutil.py
-+|/usr/lib/python$(PYTHON_VERSION)/popen2.py
 +|/usr/lib/python$(PYTHON_VERSION)/posixpath.py
-+|/usr/lib/python$(PYTHON_VERSION)/py_compile.py
-+|/usr/lib/python$(PYTHON_VERSION)/random.py
-+|/usr/lib/python$(PYTHON_VERSION)/repr.py
++|/usr/lib/python$(PYTHON_VERSION)/os.py
 +|/usr/lib/python$(PYTHON_VERSION)/re.py
-+|/usr/lib/python$(PYTHON_VERSION)/sha.py
 +|/usr/lib/python$(PYTHON_VERSION)/site.py
-+|/usr/lib/python$(PYTHON_VERSION)/socket.py
 +|/usr/lib/python$(PYTHON_VERSION)/sre_compile.py
 +|/usr/lib/python$(PYTHON_VERSION)/sre_constants.py
 +|/usr/lib/python$(PYTHON_VERSION)/sre_parse.py
-+|/usr/lib/python$(PYTHON_VERSION)/sre.py
++|/usr/lib/python$(PYTHON_VERSION)/sysconfig.py
 +|/usr/lib/python$(PYTHON_VERSION)/stat.py
-+|/usr/lib/python$(PYTHON_VERSION)/StringIO.py
-+|/usr/lib/python$(PYTHON_VERSION)/stringprep.py
-+|/usr/lib/python$(PYTHON_VERSION)/string.py
-+|/usr/lib/python$(PYTHON_VERSION)/struct.py
-+|/usr/lib/python$(PYTHON_VERSION)/subprocess.py
-+|/usr/lib/python$(PYTHON_VERSION)/tempfile.py
-+|/usr/lib/python$(PYTHON_VERSION)/textwrap.py
-+|/usr/lib/python$(PYTHON_VERSION)/tokenize.py
-+|/usr/lib/python$(PYTHON_VERSION)/token.py
 +|/usr/lib/python$(PYTHON_VERSION)/traceback.py
 +|/usr/lib/python$(PYTHON_VERSION)/types.py
 +|/usr/lib/python$(PYTHON_VERSION)/UserDict.py
 +|/usr/lib/python$(PYTHON_VERSION)/warnings.py
-+|/usr/lib/python$(PYTHON_VERSION)/weakref.py
-+|/usr/lib/python$(PYTHON_VERSION)/_weakrefset.py
-+|/usr/lib/python$(PYTHON_VERSION)/config/Makefile
-+|/usr/lib/python$(PYTHON_VERSION)/sysconfig.py
-+|/usr/lib/python$(PYTHON_VERSION)/_sysconfigdata.py
-+|/usr/lib/python$(PYTHON_VERSION)/functools.py
-+|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_functools.so
-+|/usr/lib/python$(PYTHON_VERSION)/collections.py
-+|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_collections.so
-+|/usr/lib/python$(PYTHON_VERSION)/keyword.py
-+|/usr/lib/python$(PYTHON_VERSION)/heapq.py
-+|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_heapq.so
-+|/usr/lib/python$(PYTHON_VERSION)/bisect.py
-+|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_bisect.so
 endef
 
-define PyPackage/python/install
+define PyPackage/python/filespec
++|/usr/lib/python$(PYTHON_VERSION)
+-|/usr/lib/python$(PYTHON_VERSION)/config
+-|/usr/lib/python$(PYTHON_VERSION)/distutils/cygwinccompiler.py
+-|/usr/lib/python$(PYTHON_VERSION)/distutils/command/wininst*
+-|/usr/lib/python$(PYTHON_VERSION)/idlelib
+-|/usr/lib/python$(PYTHON_VERSION)/lib2to3
+-|/usr/lib/python$(PYTHON_VERSION)/lib-tk
+-|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_testcapi.so
+-|/usr/lib/python$(PYTHON_VERSION)/pdb.doc
+-|/usr/lib/python$(PYTHON_VERSION)/test
+-|/usr/lib/python$(PYTHON_VERSION)/webbrowser.py
+-|/usr/lib/python$(PYTHON_VERSION)/*/test
+-|/usr/lib/python$(PYTHON_VERSION)/*/tests
+-|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/readline.so
+endef
+
+define PyPackage/python-base/install
        $(LN) python$(PYTHON_VERSION) $(1)/usr/bin/python
        $(LN) python$(PYTHON_VERSION) $(1)/usr/bin/python2
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpython$(PYTHON_VERSION).so* $(1)/usr/lib/
 endef
 
-define PyPackage/python-doc/filespec
-+|/usr/lib/python$(PYTHON_VERSION)/pydoc_data
-+|/usr/lib/python$(PYTHON_VERSION)/pydoc.py
-endef
-
-define PyPackage/python-bzip2/filespec
-+|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/bz2.so
-endef
-
-define PyPackage/python-expat/filespec
-+|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/pyexpat.so
-endef
-
-define PyPackage/python-gzip/filespec
-+|/usr/lib/python$(PYTHON_VERSION)/gzip.py
-endef
-
-define PyPackage/python-openssl/filespec
-+|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_ssl.so
-endef
-
-define PyPackage/python-shutil/filespec
-+|/usr/lib/python$(PYTHON_VERSION)/shutil.py
-endef
-
-define PyPackage/python-sqlite3/filespec
-+|/usr/lib/python$(PYTHON_VERSION)/sqlite3
-+|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_sqlite3.so
-endef
-
-define PyPackage/python-gdbm/filespec
-+|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/gdbm.so
-endef
-
-define PyPackage/python-readline/filespec
-+|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/readline.so
-endef
-
-define PyPackage/python-ncurses/filespec
-+|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_curses.so
-+|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_curses_panel.so
-endef
-
-define Host/Configure
-       -$(MAKE) -C $(HOST_BUILD_DIR) distclean
-       (cd $(HOST_BUILD_DIR); autoreconf --force --install || exit 0)
-       (cd $(HOST_BUILD_DIR); \
-               rm -rf config.cache; \
-               CONFIG_SITE= \
-               OPT="$(HOST_CFLAGS)" \
-               ./configure \
-                       --without-cxx-main \
-                       --without-ensurepip \
-                       --without-pymalloc \
-                       --with-threads \
-                       --prefix=$(STAGING_DIR_HOST); \
-       )
-endef
-
-define Host/Compile
-       +$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) \
-               python Parser/pgen
-       +$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) \
-               sharedmods
-endef
+HOST_CONFIGURE_ARGS+= \
+       --without-cxx-main \
+       --without-pymalloc \
+       --with-threads \
+       --prefix=$(STAGING_DIR_HOST) \
+       CONFIG_SITE= \
+       OPT="$(HOST_CFLAGS)"
 
 define Host/Install
        $(INSTALL_DIR) $(STAGING_DIR_HOST)/bin/
-       $(MAKE) -C $(HOST_BUILD_DIR) \
-               install
+       $(MAKE) -C $(HOST_BUILD_DIR) install
        $(INSTALL_BIN) $(HOST_BUILD_DIR)/Parser/pgen $(STAGING_DIR_HOST)/bin/pgen2
 endef
 
-
 $(eval $(call HostBuild))
 
+$(eval $(call PyPackage,python-base))
 $(eval $(call PyPackage,python))
-$(eval $(call PyPackage,python-full))
-$(eval $(call PyPackage,python-doc))
-$(eval $(call PyPackage,python-bzip2))
-$(eval $(call PyPackage,python-expat))
-$(eval $(call PyPackage,python-gzip))
-$(eval $(call PyPackage,python-openssl))
-$(eval $(call PyPackage,python-shutil))
-$(eval $(call PyPackage,python-sqlite3))
-$(eval $(call PyPackage,python-gdbm))
-$(eval $(call PyPackage,python-readline))
-$(eval $(call PyPackage,python-ncurses))
 
+$(eval $(call BuildPackage,python-base))
 $(eval $(call BuildPackage,python))
-$(eval $(call BuildPackage,python-full))
-$(eval $(call BuildPackage,python-doc))
-$(eval $(call BuildPackage,python-bzip2))
-$(eval $(call BuildPackage,python-expat))
-$(eval $(call BuildPackage,python-gzip))
-$(eval $(call BuildPackage,python-openssl))
-$(eval $(call BuildPackage,python-shutil))
-$(eval $(call BuildPackage,python-sqlite3))
-$(eval $(call BuildPackage,python-gdbm))
-$(eval $(call BuildPackage,python-readline))
-$(eval $(call BuildPackage,python-ncurses))
index ecf48d1e3efce6453732cb809f95bb6b88d39cc2..b9349f3c1c87e5f3b9181a3d9cb02a90ea79c224 100644 (file)
@@ -17,10 +17,12 @@ PYTHON_PKG_DIR:=/usr/lib/python$(PYTHON_VERSION)/site-packages
 
 PYTHON:=python$(PYTHON_VERSION)
 
+HOST_PYTHON_LIB_DIR:=$(STAGING_DIR_HOST)/lib/python$(PYTHON_VERSION)
 HOST_PYTHON_BIN:=$(STAGING_DIR_HOST)/bin/python2
 
+PYTHONPATH:=$(PYTHON_LIB_DIR):$(STAGING_DIR)/$(PYTHON_PKG_DIR)
 define HostPython
-       (       export PYTHONPATH="$(PYTHON_LIB_DIR):$(STAGING_DIR)/$(PYTHON_PKG_DIR)"; \
+       (       export PYTHONPATH="$(PYTHONPATH)"; \
                export PYTHONOPTIMIZE=""; \
                export PYTHONDONTWRITEBYTECODE=1; \
                $(1) \
@@ -28,6 +30,13 @@ define HostPython
        )
 endef
 
+PKG_USE_MIPS16:=0
+# This is required in addition to PKG_USE_MIPS16:=0 because otherwise MIPS16
+# flags are inherited from the Python base package (via sysconfig module)
+ifdef CONFIG_USE_MIPS16
+  TARGET_CFLAGS += -mno-mips16 -mno-interlink-mips16
+endif
+
 define PyPackage
   $(call shexport,PyPackage/$(1)/filespec)
 
@@ -80,6 +89,7 @@ define Build/Compile/PyMod
                CPPFLAGS="$(TARGET_CPPFLAGS) -I$(PYTHON_INC_DIR)" \
                LDFLAGS="$(TARGET_LDFLAGS) -lpython$(PYTHON_VERSION)" \
                _PYTHON_HOST_PLATFORM="linux-$(ARCH)" \
+               __PYVENV_LAUNCHER__="/usr/bin/$(PYTHON)" \
                $(3) \
                , \
                ./setup.py $(2) \
diff --git a/lang/python/patches/140-do-not-write-bytes-codes.patch b/lang/python/patches/140-do-not-write-bytes-codes.patch
new file mode 100644 (file)
index 0000000..f67e7dc
--- /dev/null
@@ -0,0 +1,22 @@
+diff --git a/Python/pythonrun.c b/Python/pythonrun.c
+index 748a63b..cb6e291 100644
+--- a/Python/pythonrun.c
++++ b/Python/pythonrun.c
+@@ -79,7 +79,7 @@ int Py_InteractiveFlag; /* Needed by Py_FdIsInteractive() below */
+ int Py_InspectFlag; /* Needed to determine whether to exit at SystemExit */
+ int Py_NoSiteFlag; /* Suppress 'import site' */
+ int Py_BytesWarningFlag; /* Warn on str(bytes) and str(buffer) */
+-int Py_DontWriteBytecodeFlag; /* Suppress writing bytecode files (*.py[co]) */
++int Py_DontWriteBytecodeFlag = 1; /* Suppress writing bytecode files (*.py[co]) */
+ int Py_UseClassExceptionsFlag = 1; /* Needed by bltinmodule.c: deprecated */
+ int Py_FrozenFlag; /* Needed by getpath.c */
+ int Py_UnicodeFlag = 0; /* Needed by compile.c */
+@@ -174,7 +174,7 @@ Py_InitializeEx(int install_sigs)
+     if ((p = Py_GETENV("PYTHONOPTIMIZE")) && *p != '\0')
+         Py_OptimizeFlag = add_flag(Py_OptimizeFlag, p);
+     if ((p = Py_GETENV("PYTHONDONTWRITEBYTECODE")) && *p != '\0')
+-        Py_DontWriteBytecodeFlag = add_flag(Py_DontWriteBytecodeFlag, p);
++        Py_DontWriteBytecodeFlag = atoi(p);
+     /* The variable is only tested for existence here; _PyRandom_Init will
+        check its value further. */
+     if ((p = Py_GETENV("PYTHONHASHSEED")) && *p != '\0')
index d326b267c4311181eb416a2ff013393a670e9503..2e9a8715cead6805af7d48725d041d56aa338a07 100644 (file)
@@ -19,7 +19,7 @@ PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO)
 
 PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=http://www.python.org/ftp/python/$(PKG_VERSION)
-PKG_MD5SUM:=6cafc183b4106476dd73d5738d7f616a
+PKG_MD5SUM:=36fc7327c02c6f12fa24fc9ba78039e3
 
 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
@@ -31,7 +31,7 @@ HOST_BUILD_PARALLEL:=1
 PKG_BUILD_DIR:=$(BUILD_DIR)/Python-$(PKG_VERSION)
 HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/Python-$(PKG_VERSION)
 
-PKG_BUILD_DEPENDS:=python3/host
+PKG_BUILD_DEPENDS:=libffi/host python3/host
 
 include $(INCLUDE_DIR)/host-build.mk
 include $(INCLUDE_DIR)/package.mk
@@ -54,69 +54,62 @@ define Package/python3/Default/description
  the development of higher quality, more maintainable code.
 endef
 
-define Package/python3
+define Package/python3-base
 $(call Package/python3/Default)
+  TITLE:=Python $(PYTHON_VERSION) interpreter
   DEPENDS:=+libpthread +zlib +libffi
 endef
 
+define Package/python3-base/description
+  This package contains only the interpreter and the bare minimum
+  for the interpreter to start.
+endef
+
+define Package/python3
+$(call Package/python3/Default)
+  DEPENDS:=+python3-base +libncursesw +libbz2 +libgdbm +libsqlite3 +libdb47 +libopenssl
+endef
+
 define Package/python3/description
-$(call Package/python3/Default/description)
-  .
-  This package contains only the interpreter and the bare minimum for the interpreter to start.
+  This package contains the (almost) full Python install.
 endef
 
-MAKE_FLAGS:=\
-       $(TARGET_CONFIGURE_OPTS) \
-       DESTDIR="$(PKG_INSTALL_DIR)" \
+MAKE_FLAGS+=\
        CROSS_COMPILE=yes \
-       CFLAGS="$(TARGET_CFLAGS) -DNDEBUG -fno-inline" \
-       LDFLAGS="$(TARGET_LDFLAGS) -L$(PKG_BUILD_DIR)" \
-       LD="$(TARGET_CC)"
+       LD="$(TARGET_CC)" \
+       PGEN=pgen3
+
+EXTRA_CFLAGS+= \
+       -DNDEBUG -fno-inline
+EXTRA_LDFLAGS+= \
+       -L$(PKG_BUILD_DIR)
 
 ENABLE_IPV6:=
 ifeq ($(CONFIG_IPV6),y)
        ENABLE_IPV6 += --enable-ipv6
 endif
 
-#=======================================================================
-# Notes: adding these so that I don't forget, and can track why stuff
-#        was did as was did
-# - Arguments below were moved to ./files/config.site file, and disabled
-#          ac_cv_have_chflags=no \
-#          ac_cv_have_lchflags=no \
-#          ac_cv_py_format_size_t=no \
-#          ac_cv_have_long_long_format=yes \
-#          ac_cv_buggy_getaddrinfo=no \
-# - --without-ensurepip added, because the build wants to ensure that
-#   it works; that's a good idea, but for now, it requires special 
-#   setup, and we can do that later
-# - --without-pymalloc added, becase in Python 3, modules are suffixed
-#   with m; e.g. so some paths are python3.4m instead of python3.4 
-#   all this is detailed here:
-#     http://legacy.python.org/dev/peps/pep-3149/
-#=======================================================================
-
-define Build/Configure
-       -$(MAKE) -C $(PKG_BUILD_DIR) distclean
-       (cd $(PKG_BUILD_DIR); autoreconf --force --install || exit 0)
-       $(CP) ./files/config.site $(PKG_BUILD_DIR)
-       $(call Build/Configure/Default, \
-               --sysconfdir=/etc \
-               --enable-shared \
-               --without-cxx-main \
-               --with-threads \
-               --with-system-ffi="$(STAGING_DIR)/usr" \
-               --without-ensurepip \
-               --without-pymalloc \
-               $(ENABLE_IPV6) \
-               CONFIG_SITE="$(PKG_BUILD_DIR)/config.site" \
-               OPT="$(TARGET_CFLAGS)" \
-       )
+CONFIGURE_ARGS+= \
+       --sysconfdir=/etc \
+       --enable-shared \
+       --without-cxx-main \
+       --with-threads \
+       --with-system-ffi="$(STAGING_DIR)/usr" \
+       --without-pymalloc \
+       --without-ensurepip \
+       $(ENABLE_IPV6) \
+       CONFIG_SITE="$(PKG_BUILD_DIR)/config.site" \
+       OPT="$(TARGET_CFLAGS)"
+
+define Build/Prepare
+       $(call Build/Prepare/Default)
+       $(CP) ./files/config.site $(PKG_BUILD_DIR)/config.site
 endef
 
 define Build/InstallDev
-       $(INSTALL_DIR) $(2)/bin $(1)/usr/bin $(1)/usr/include $(1)/usr/lib
        $(INSTALL_DIR) $(STAGING_DIR)/mk/
+       $(INSTALL_DIR) $(1)/usr/include/ $(1)/usr/lib/
+       $(INSTALL_DIR) $(1)/usr/lib/python$(PYTHON_VERSION)/
        $(INSTALL_DATA) ./files/python3-package.mk $(STAGING_DIR)/mk/
        $(CP) \
                $(PKG_INSTALL_DIR)/usr/include/python$(PYTHON_VERSION) \
@@ -128,14 +121,9 @@ define Build/InstallDev
        $(CP) \
                $(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON_VERSION)/config-$(PYTHON_VERSION) \
                $(1)/usr/lib/python$(PYTHON_VERSION)/
-
-       $(CP) \
-               $(STAGING_DIR_HOST)/bin/python$(PYTHON_VERSION)-config \
-               $(2)/bin/
-       $(SED) 's,^#!.*,#!/usr/bin/env python$(PYTHON_VERSION),g' $(2)/bin/python$(PYTHON_VERSION)-config
 endef
 
-define Py3Package/python3/filespec
+define Py3Package/python3-base/filespec
 +|/usr/bin/python$(PYTHON_VERSION)
 +|/usr/lib/python$(PYTHON_VERSION)/encodings
 +|/usr/lib/python$(PYTHON_VERSION)/_collections_abc.py
@@ -153,7 +141,25 @@ define Py3Package/python3/filespec
 +|/usr/lib/python$(PYTHON_VERSION)/stat.py
 endef
 
-define Py3Package/python3/install
+define Py3Package/python3/filespec
++|/usr/lib/python$(PYTHON_VERSION)
+-|/usr/lib/python$(PYTHON_VERSION)/config-$(PYTHON_VERSION)
+-|/usr/lib/python$(PYTHON_VERSION)/distutils/cygwinccompiler.py
+-|/usr/lib/python$(PYTHON_VERSION)/distutils/command/wininst*
+-|/usr/lib/python$(PYTHON_VERSION)/idlelib
+-|/usr/lib/python$(PYTHON_VERSION)/lib2to3
+-|/usr/lib/python$(PYTHON_VERSION)/tkinter
+-|/usr/lib/python$(PYTHON_VERSION)/turtledemo
+-|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_test*.so
+-|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/readline*.so
+-|/usr/lib/python$(PYTHON_VERSION)/pdb.doc
+-|/usr/lib/python$(PYTHON_VERSION)/test
+-|/usr/lib/python$(PYTHON_VERSION)/webbrowser.py
+-|/usr/lib/python$(PYTHON_VERSION)/*/test
+-|/usr/lib/python$(PYTHON_VERSION)/*/tests
+endef
+
+define Py3Package/python3-base/install
        # Adding the lib-dynload folder (even just empty) suppresses 2 warnings when starting Python
        $(INSTALL_DIR) $(1)/usr/lib/python$(PYTHON_VERSION)/lib-dynload/
        $(INSTALL_DIR) $(1)/usr/bin
@@ -161,39 +167,30 @@ define Py3Package/python3/install
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpython$(PYTHON_VERSION).so* $(1)/usr/lib/
 endef
 
-define Host/Configure
-       -$(MAKE) -C $(HOST_BUILD_DIR) distclean
-       (cd $(HOST_BUILD_DIR); autoreconf --force --install || exit 0)
-       (cd $(HOST_BUILD_DIR); \
-               rm -rf config.cache; \
-               CONFIG_SITE= \
-               OPT="$(HOST_CFLAGS)" \
-               ./configure \
-                       --without-cxx-main \
-                       --without-ensurepip \
-                       --without-pymalloc \
-                       --with-threads \
-                       --prefix=$(STAGING_DIR_HOST); \
-       )
-endef
+HOST_CONFIGURE_ARGS+= \
+       --without-cxx-main \
+       --without-pymalloc \
+       --without-ensurepip \
+       --with-threads \
+       --prefix=$(STAGING_DIR_HOST) \
+       CONFIG_SITE= \
+       OPT="$(HOST_CFLAGS)"
 
 define Host/Compile
-       +$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) \
-               python Parser/pgen
-       +$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) \
-               sharedmods
+       +$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) python Parser/pgen
+       +$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) sharedmods
 endef
 
 define Host/Install
        $(INSTALL_DIR) $(STAGING_DIR_HOST)/bin/
-       $(MAKE) -C $(HOST_BUILD_DIR) \
-               install
-       $(INSTALL_BIN) $(HOST_BUILD_DIR)/Parser/pgen $(STAGING_DIR_HOST)/bin/
+       $(MAKE) -C $(HOST_BUILD_DIR) install
+       $(INSTALL_BIN) $(HOST_BUILD_DIR)/Parser/pgen $(STAGING_DIR_HOST)/bin/pgen3
 endef
 
-
 $(eval $(call HostBuild))
 
+$(eval $(call Py3Package,python3-base))
 $(eval $(call Py3Package,python3))
 
+$(eval $(call BuildPackage,python3-base))
 $(eval $(call BuildPackage,python3))
index 0c4057c7de230dc493dd57e895090fec36730a28..a345c8124420f528ed7f8a71bec05babd4f381f1 100644 (file)
@@ -6,7 +6,7 @@
 #
 
 PYTHON3_VERSION:=3.4
-PYTHON3_VERSION_MICRO:=1
+PYTHON3_VERSION_MICRO:=2
 
 PYTHON3_DIR:=$(STAGING_DIR)/usr
 PYTHON3_BIN_DIR:=$(PYTHON3_DIR)/bin
@@ -17,10 +17,12 @@ PYTHON3_PKG_DIR:=/usr/lib/python$(PYTHON3_VERSION)/site-packages
 
 PYTHON3:=python$(PYTHON3_VERSION)
 
+HOST_PYTHON3_LIB_DIR:=$(STAGING_DIR_HOST)/lib/python$(PYTHON3_VERSION)
 HOST_PYTHON3_BIN:=$(STAGING_DIR_HOST)/bin/python3
 
+PYTHON3PATH="$(PYTHON3_LIB_DIR):$(STAGING_DIR)/$(PYTHON3_PKG_DIR)"
 define HostPython3
-       (       export PYTHONPATH="$(PYTHON3_LIB_DIR):$(STAGING_DIR)/$(PYTHON3_PKG_DIR)"; \
+       (       export PYTHONPATH="$(PYTHON3PATH)"; \
                export PYTHONOPTIMIZE=""; \
                export PYTHONDONTWRITEBYTECODE=1; \
                $(1) \
@@ -28,12 +30,19 @@ define HostPython3
        )
 endef
 
+PKG_USE_MIPS16:=0
+# This is required in addition to PKG_USE_MIPS16:=0 because otherwise MIPS16
+# flags are inherited from the Python base package (via sysconfig module)
+ifdef CONFIG_USE_MIPS16
+  TARGET_CFLAGS += -mno-mips16 -mno-interlink-mips16
+endif
+
 define Py3Package
   $(call shexport,Py3Package/$(1)/filespec)
 
   define Package/$(1)/install
        find $(PKG_INSTALL_DIR) -name "*\.pyc" -o -name "*\.pyo" | xargs rm -f
-       @echo "$$$$$$$$$$(call shvar,PyPackage/$(1)/filespec)" | ( \
+       @echo "$$$$$$$$$$(call shvar,Py3Package/$(1)/filespec)" | ( \
                IFS='|'; \
                while read fop fspec fperm; do \
                  if [ "$$$$$$$$fop" = "+" ]; then \
@@ -80,6 +89,7 @@ define Build/Compile/Py3Mod
                CPPFLAGS="$(TARGET_CPPFLAGS) -I$(PYTHON3_INC_DIR)" \
                LDFLAGS="$(TARGET_LDFLAGS) -lpython$(PYTHON3_VERSION)" \
                _PYTHON_HOST_PLATFORM="linux-$(ARCH)" \
+               __PYVENV_LAUNCHER__="/usr/bin/$(PYTHON3)" \
                $(3) \
                , \
                ./setup.py $(2) \
index 8b81daa99e7d1f892f724cdf706494e2f261c86d..4a955a85d1b7ed05768d9109d85850ddb8b19799 100644 (file)
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ruby
-PKG_VERSION:=2.1.3
-PKG_RELEASE:=2
+PKG_VERSION:=2.1.4
+PKG_RELEASE:=1
 
 PKG_LIBVER:=2.1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://cache.ruby-lang.org/pub/ruby/$(PKG_LIBVER)/
-PKG_MD5SUM:=02b7da3bb06037c777ca52e1194efccb
+PKG_MD5SUM:=f4136e781d261e3cc20748005e1740b7
 PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
 PKG_LICENSE:=BSD-2-Clause
-PKG_LICENSE_FILE:=COPYING
+PKG_LICENSE_FILES:=COPYING
 
 PKG_BUILD_DEPENDS:=ruby/host
 PKG_INSTALL:=1
@@ -86,7 +86,7 @@ endef
 
 define Package/ruby-bigdecimal
 $(call Package/ruby/Default)
-  TITLE:=Arbitrary-precision decimal floating-point library for Ruby
+  TITLE:=Arbitrary-precision decimal floating-point lib for Ruby
   DEPENDS:=ruby
 endef
 
index 09d72eb6897e4460746831c2de5fcdfe4a42f476..a4ccc233172718f26af6573db2a0c3e0664a2533 100644 (file)
@@ -18,7 +18,7 @@ PKG_MD5SUM:=c9e21b88a2b3e6e12ea7ba0f3b271fc3
 PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
 
 PKG_LICENSE:=LGPLv2.1 GPLv2
-PKG_LICENSE_FILE:=COPYING aserver/COPYING
+PKG_LICENSE_FILES:=COPYING aserver/COPYING
 
 PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
index a435d584f3ae324879f19cf923a738e378ceb20d..ef4c512ac423b7e6d0952b90c42751a0045f8028 100644 (file)
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gnutls
-PKG_VERSION:=3.3.9
+PKG_VERSION:=3.3.10
 PKG_RELEASE:=1
 PKG_USE_MIPS16:=0
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=ftp://ftp.gnutls.org/gcrypt/gnutls/v3.3
-PKG_MD5SUM:=ff61b77e39d09f1140ab5a9cf52c58b6
+PKG_MD5SUM:=c0a72b2c0553fe1c4992e30835808012
 PKG_MAINTAINER:=Nikos Mavrogiannopoulos <nmav@gnutls.org>
 
 PKG_INSTALL:=1
index f3a4317ac3d5111342e7ec26b83e6a1c62381a86..690af47ab98a87aabcfc2ec286353b1097e909f7 100644 (file)
@@ -18,7 +18,7 @@ PKG_MD5SUM:=9f5dd20d7e95fd0dd72df5353829f097
 PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
 
 PKG_LICENSE:=GPL-2.0
-PKG_LICENSE_FILE:=COPYING
+PKG_LICENSE_FILES:=COPYING
 
 PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
index 3ff5bae6775cb981b3ea9f88aa4ab7843fb35423..e5a2da7f3175f51ab3e6bb7c33c694d7aee226de 100644 (file)
@@ -16,7 +16,7 @@ PKG_SOURCE_URL:=@SF/libdbi-drivers
 PKG_MD5SUM:=9f47b960e225eede2cdeaabf7d22f59f
 
 PKG_LICENSE:=LGPL-2.1
-PKG_LICENSE_FILE:=COPYING
+PKG_LICENSE_FILES:=COPYING
 PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org>
 
 PKG_FIXUP:=autoreconf
index aaf15cca47b6811c0d6edb4c381bb472f8e84376..a1079fea462dc8afba134844ec058aa0a00b3b08 100644 (file)
@@ -16,7 +16,7 @@ PKG_SOURCE_URL:=@SF/libdbi
 PKG_MD5SUM:=05e2ceeac4bc85fbe40de8b4b22d9ab3
 
 PKG_LICENSE:=LGPL-2.1
-PKG_LICENSE_FILE:=COPYING
+PKG_LICENSE_FILES:=COPYING
 PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org>
 
 PKG_FIXUP:=autoreconf
index 5fa7220fbde4fea9241eb6d8c88822390e326160..d0d67e38caa8727e94dd6d3a939a0d381c864cfb 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libftdi1
-PKG_VERSION:=1.1
+PKG_VERSION:=1.2
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://www.intra2net.com/en/developer/libftdi/download/
-PKG_MD5SUM:=b79a6356978aa8e69f8eecc3a720ff79
+PKG_MD5SUM:=89dff802d89c4c0d55d8b4665fd52d0b
 PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
 
 PKG_LICENSE:=LGPL-2.0
index bf3674eaeaf2c3cd69adf91d109f493ca12c718a..495db1789ada22a977becf4a09cda3e348496ce0 100644 (file)
@@ -1,6 +1,6 @@
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -43,7 +43,7 @@ IF(CMAKE_SIZEOF_VOID_P EQUAL 4)
+@@ -55,7 +55,7 @@ if ( NOT DEFINED LIB_SUFFIX )
        AND NOT EXISTS "/etc/debian_version"
        AND NOT EXISTS "/etc/arch-release" )
      if ( "${CMAKE_SIZEOF_VOID_P}" EQUAL "8" )
diff --git a/libs/libhttp-parser/Makefile b/libs/libhttp-parser/Makefile
new file mode 100644 (file)
index 0000000..88e7568
--- /dev/null
@@ -0,0 +1,60 @@
+#
+# Copyright (C) 2013 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:=libhttp-parser
+PKG_VERSION:=2.3.0
+PKG_RELEASE=1
+PKG_MAINTAINER:=Ramanathan Sivagurunathan <ramzthecoder@gmail.com>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILE:=LICENSE-MIT
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE_URL:=git://github.com/joyent/http-parser.git
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_VERSION:=56f7ad0e2e5a80f79d214015c91e1f17d11d109f
+
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libhttp-parser
+  SECTION:=libs
+  CATEGORY:=Libraries
+  TITLE:=A library to parse http request and response
+  URL:=https://github.com/joyent/http-parser
+endef
+
+define Package/libhttp-parser/description
+  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, 
+  it only requires about 40 bytes of data per message stream 
+  (in a web server that is per connection).
+endef
+
+define Build/Compile
+       $(call Build/Compile/Default, library) 
+endef
+
+define Build/InstallDev
+       $(INSTALL_DIR) $(1)/usr/include
+       $(INSTALL_DATA) $(PKG_BUILD_DIR)/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.* libhttp_parser.so )
+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.* libhttp_parser.so )
+endef
+
+$(eval $(call BuildPackage,libhttp-parser))
index 3ec74e652787c272fac17c52f4737e0709dd977c..cd61903a4cc0dbac1d64ce3db02b18013d551cc8 100644 (file)
@@ -13,7 +13,7 @@ PKG_RELEASE:=1
 
 PKG_MAINTAINER:=Lukasz Baj <l.baj@radytek.com>
 PKG_LICENSE:=LGPL-2.1+
-PKG_LICENSE_FILE:=COPYING.LESSER
+PKG_LICENSE_FILES:=COPYING.LESSER
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/libimobiledevice/libimobiledevice.git
index 4ab9ad7ed1706b151db1c54669512645da27d3d5..4e8fa20e238cdccdc4f5f52342253454af44dd78 100644 (file)
@@ -16,7 +16,7 @@ PKG_SOURCE_URL:=@SF/liblo
 PKG_MD5SUM:=e2a4391a08b49bb316c03e2034e06fa2
 
 PKG_LICENSE:=LGPL-2.1+
-PKG_LICENSE_FILE:=COPYING
+PKG_LICENSE_FILES:=COPYING
 PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org>
 
 PKG_INSTALL:=1
index 37aeb8d24b61c6839de7fd6f40dfebd0dde0c1b9..f7f3827d4feb31c081ab8510e0cd76600b785e23 100644 (file)
@@ -14,7 +14,7 @@ PKG_RELEASE:=2
 PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
 
 PKG_LICENSE:=LGPLv2.1
-PKG_LICENSE_FILE:=COPYING.LIB
+PKG_LICENSE_FILES:=COPYING.LIB
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=@SF/mcrypt
diff --git a/libs/libmicrohttpd/Makefile b/libs/libmicrohttpd/Makefile
new file mode 100644 (file)
index 0000000..3f1608e
--- /dev/null
@@ -0,0 +1,54 @@
+#
+# Copyright (C) 2010-2014 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libmicrohttpd
+PKG_VERSION:=0.9.38
+PKG_RELEASE:=1.1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=@GNU/libmicrohttpd
+PKG_MD5SUM:=b72efbfe7f290846015d460aea7091fe
+
+PKG_MAINTAINER:=Martijn Zilverschoon <martijn@friedzombie.com>
+
+PKG_LICENSE:=LGPL-2.1
+PKG_LICENSE_FILES:=COPYING
+
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libmicrohttpd
+       SECTION:=libs
+       CATEGORY:=Libraries
+       TITLE:=GNU libmicrohttpd is a library that runs an HTTP server.
+       URL:=http://www.gnu.org/software/libmicrohttpd/
+       DEPENDS:=+libpthread +libgcrypt +libgnutls +libgpg-error +libcrypto +libopenssl
+endef
+
+define Package/libmicrohttpd/description
+       GNU libmicrohttpd is a small C library that is supposed to make it easy
+       to run an HTTP server as part of another application.
+endef
+
+define Build/InstallDev
+       $(INSTALL_DIR) $(1)/usr/include/
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
+       $(INSTALL_DIR) $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a,la} $(1)/usr/lib/
+       $(INSTALL_DIR) $(1)/usr/lib/pkgconfig/
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/
+endef
+
+define Package/libmicrohttpd/install
+       $(INSTALL_DIR) $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,libmicrohttpd))
index d81095fb3de7d809f901f2ee0d2d874efef23d4f..dbf5fe02ca540259ab8e212043ea8d5b01668aed 100644 (file)
@@ -17,7 +17,7 @@ PGK_MD5SUM:=4b101a36e5c0cf967dc063391260ddbf
 
 PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
 PKG_LICENSE:=BSD-3-Clause
-PKG_LICENSE_FILE:=COPYING
+PKG_LICENSE_FILES:=COPYING
 
 PKG_INSTALL:=1
 
index b9e49e206595b29292eedd29845bb308c7986888..f90d9bc8f418c98d11437afaf0070c59091a3487 100644 (file)
@@ -16,7 +16,7 @@ PKG_SOURCE_URL:=http://miniupnp.free.fr/files
 PKG_MD5SUM:=7c9a7c76e200ead4e6447fe4b105f676
 PKG_MAINTAINER:=Hauke Mehrtens <hauke@hauke-m.de>
 PKG_LICENSE:=BSD-3c
-PKG_LICENSE_FILE:=LICENSE
+PKG_LICENSE_FILES:=LICENSE
 
 PKG_INSTALL:=1
 
index 028c231562254ff87926b07bcab090fd4028ed51..b54222ac46332a6472fcf9194746702b6e196ab1 100644 (file)
@@ -19,7 +19,7 @@ PKG_SOURCE_URL:= \
 PKG_MD5SUM:=2118d9514c079839ebd9cb3144ad2ad7
 
 PKG_LICENSE:=LGPL-2.1
-PKG_LICENSE_FILE:=COPYING
+PKG_LICENSE_FILES:=COPYING
 PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org>
 
 PKG_FIXUP:=autoreconf
index b154988f3192c113c5c5fa331a1704a6b6b13297..97e858c6368bb0dc6bf95f551bfaac218153e3cf 100644 (file)
@@ -19,7 +19,7 @@ PKG_SOURCE_URL:= \
 PKG_MD5SUM:=2a4bb0654ae675a52d2e8d1c06090b94
 
 PKG_LICENSE:=GPL-2.0
-PKG_LICENSE_FILE:=COPYING
+PKG_LICENSE_FILES:=COPYING
 PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org>
 
 PKG_FIXUP:=autoreconf
index 029fe079ed2bbbcd40dc5597e8440e1571eeb65b..e150ed0d8432f3370290c64cddefe58741f4eab5 100644 (file)
@@ -19,7 +19,7 @@ PKG_SOURCE_URL:= \
 PKG_MD5SUM:=df09befac35cb215865b39a36c96a3fa
 
 PKG_LICENSE:=GPL-2.0
-PKG_LICENSE_FILE:=COPYING
+PKG_LICENSE_FILES:=COPYING
 PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org>
 
 PKG_FIXUP:=autoreconf
index ce844e2d61b940045dac905dba644aa1109015d6..8850c74fdaf7701fdb96c43ce84054e99648cebc 100644 (file)
@@ -16,7 +16,7 @@ PKG_SOURCE_URL:=http://liboil.freedesktop.org/download/
 PKG_MD5SUM:=47dc734f82faeb2964d97771cfd2e701
 
 PKG_LICENSE:=FREE
-PKG_LICENSE_FILE:=COPYING
+PKG_LICENSE_FILES:=COPYING
 
 PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
index f7ed2ae4b826240606532cd984278aefab1c4cf9..173e5dca1737b16aa5e6b82aeece5fac4d982f1e 100644 (file)
@@ -7,7 +7,7 @@
 
 include $(TOPDIR)/rules.mk
 
-LOWFAT_VERSION=0.28
+LOWFAT_VERSION=0.29
 
 PKG_NAME:=libowfat
 PKG_VERSION:=$(LOWFAT_VERSION)
@@ -15,7 +15,7 @@ PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://dl.fefe.de
-PKG_MD5SUM:=6bbee9a86506419657d87123b7a6f2c1
+PKG_MD5SUM:=1187c6acf11429e7adb9ebe180f644bb
 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=COPYING
index 3d40835d7b59bbd8024f738d41ea745581a79800..0b7ed51b878c6d8eb93083a470b1996f2ff592ed 100644 (file)
@@ -13,7 +13,7 @@ PKG_RELEASE:=1
 
 PKG_MAINTAINER:=Lukasz Baj <l.baj@radytek.com>
 PKG_LICENSE:=LGPL-2.1+
-PKG_LICENSE_FILE:=COPYING.LESSER
+PKG_LICENSE_FILES:=COPYING.LESSER
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/libimobiledevice/libplist.git
index 1a6af67905683e80a056f6664d8011f7ac678d00..a7619148c67337e52cbc5de81cdddcb6fb61080d 100644 (file)
@@ -18,7 +18,7 @@ PKG_MD5SUM:=1c7fb25191b4e6e3628d198a66a84f47
 PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
 
 PKG_LICENSE:=GPL-2.0
-PKG_LICENSE_FILE:=COPYING
+PKG_LICENSE_FILES:=COPYING
 
 PKG_INSTALL:=1
 
index 73057923477d2258f0b6f8dde4b5ca8f65b44094..3c80feef16029155c21bf6de8dad0eb0a8654c44 100644 (file)
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libsodium
-PKG_VERSION:=1.0.0
+PKG_VERSION:=1.0.1
 PKG_RELEASE:=1
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://download.libsodium.org/libsodium/releases
-PKG_MD5SUM:=3093dabe4e038d09f0d150cef064b2f7
+PKG_MD5SUM:=9a221b49fba7281ceaaf5e278d0f4430
 PKG_CAT:=zcat
 
 PKG_FIXUP:=libtool autoreconf
@@ -62,6 +62,8 @@ define Build/InstallDev
        $(CP) $(PKG_INSTALL_DIR)/usr/include/sodium/*.h $(1)/usr/include/sodium
        $(INSTALL_DIR) $(1)/usr/lib
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsodium.{a,so*} $(1)/usr/lib
+       $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libsodium.pc $(1)/usr/lib/pkgconfig/
 endef
 
 define Package/libsodium/install
index 85a48286d6ce08c54ef6ab7dae4aff5407016847..a482b5ed4e99d669a48492a830961dfd907961e1 100644 (file)
@@ -16,7 +16,7 @@ PKG_SOURCE_URL:=@GNOME/$(PKG_NAME)/2.44
 PKG_MD5SUM:=92aa3667357157e8f3489bcca287f2fa
 
 PKG_LICENSE:=GPL-2.0
-PKG_LICENSE_FILE:=COPYING
+PKG_LICENSE_FILES:=COPYING
 
 PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
index ce203731ff83a5b6224032d7ad0d47832b05d58f..8f69803f8e7ec631016e7bde21033b090fbffa1b 100644 (file)
@@ -19,7 +19,7 @@ PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
 
 PKG_LICENSE:=LGPL-2.1
-PKG_LICENSE_FILE:=LICENCE
+PKG_LICENSE_FILES:=LICENCE
 
 PKG_FIXUP:=libtool
 PKG_REMOVE_FILES:=autogen.sh
index ae258868d636a228a6f8ded28d7f34f67910b619..d5db86c70ba7d52db2a2dfdb21fcfc0f26febca9 100644 (file)
@@ -13,8 +13,11 @@ PKG_RELEASE:=1
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://downloads.xiph.org/releases/theora/
 PKG_MD5SUM:=292ab65cedd5021d6b7ddd117e07cd8e
-PKG_FIXUP:=autoreconf
 
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=COPYING LICENSE
+
+PKG_FIXUP:=autoreconf
 PKG_BUILD_DEPENDS:=libvorbis
 
 include $(INCLUDE_DIR)/package.mk
index 6147948a1530011b510df6be2f498890ed250165..a0581f277a1d92cf4421bb368212300720f3ee05 100644 (file)
@@ -17,7 +17,7 @@ PKG_SOURCE_URL:=https://projects.universe-factory.net/attachments/download/71
 PKG_MD5SUM:=7f44df5dc69cb8686947562e2a11eea9
 
 PKG_LICENSE:=BSD-2-Clause
-PKG_LICENSE_FILE:=COPYRIGHT
+PKG_LICENSE_FILES:=COPYRIGHT
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/cmake.mk
index 8f48e9266af72a1651948d7f7fd96b5b53200749..451f849628bc367f2441495ec7d9914bbd48d663 100644 (file)
@@ -13,7 +13,7 @@ PKG_RELEASE:=1
 
 PKG_MAINTAINER:=Lukasz Baj <l.baj@radytek.com>
 PKG_LICENSE:=LGPL-2.1+
-PKG_LICENSE_FILE:=COPYING.LGPLv2.1
+PKG_LICENSE_FILES:=COPYING.LGPLv2.1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/libimobiledevice/libusbmuxd.git
index 86121dc17f38d8cc0c9fc014f77c7edae40c40ac..4fb41ed1b72867ec422424a77b48e36921803e10 100644 (file)
@@ -11,6 +11,7 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=v4l-utils
 PKG_VERSION:=1.2.1
 PKG_RELEASE:=2
+PKG_USE_MIPS16:=0
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://www.linuxtv.org/downloads/v4l-utils
@@ -19,7 +20,7 @@ PKG_MD5SUM:=4cc0fb4ded302ea9e89e5e1b56a7252b
 PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
 
 PKG_LICENSE:=GPL-2.0 LGPL-2.1
-PKG_LICENSE_FILE:=COPYING COPYING.libv4l
+PKG_LICENSE_FILES:=COPYING COPYING.libv4l
 
 PKG_BUILD_DEPENDS:=argp-standalone
 
index 1a7ed5d6a7894beedbb8e9a53c96dc679d96ef90..b22761f7ddb46408141e0c0e6cdd4b8f496f3b09 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libxml2
 PKG_VERSION:=2.9.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://gd.tuwien.ac.at/languages/libxml/ \
@@ -26,6 +26,7 @@ PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
 PKG_BUILD_PARALLEL:=1
 
+include $(INCLUDE_DIR)/host-build.mk
 include $(INCLUDE_DIR)/package.mk
 
 define Package/libxml2
@@ -41,6 +42,7 @@ define Package/libxml2/description
 endef
 
 TARGET_CFLAGS += $(FPIC)
+TARGET_LDFLAGS += -lz
 
 CONFIGURE_ARGS += \
        --enable-shared \
@@ -74,6 +76,38 @@ CONFIGURE_ARGS += \
        --with-zlib \
        --without-lzma
 
+HOST_CONFIGURE_ARGS += \
+       --enable-shared \
+       --enable-static \
+       --with-c14n \
+       --without-catalog \
+       --with-debug \
+       --without-docbook \
+       --with-html \
+       --without-ftp \
+       --without-http \
+       --without-iconv \
+       --without-iso8859x \
+       --without-legacy \
+       --with-output \
+       --without-pattern \
+       --without-push \
+       --without-python \
+       --with-reader \
+       --without-readline \
+       --without-regexps \
+       --with-sax1 \
+       --with-schemas \
+       --with-threads \
+       --with-tree \
+       --with-valid \
+       --with-writer \
+       --with-xinclude \
+       --with-xpath \
+       --with-xptr \
+       --with-zlib \
+       --without-lzma
+
 define Build/InstallDev
        $(INSTALL_DIR) $(2)/bin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/xml2-config $(2)/bin/
@@ -97,4 +131,5 @@ define Package/libxml2/install
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxml2.so* $(1)/usr/lib/
 endef
 
+$(eval $(call HostBuild))
 $(eval $(call BuildPackage,libxml2))
index cbc273eeb9e0afd0d87d2c51d3d0f401189e87f2..dbcb4dd95b1f55b50eb2dfaec130c3556f6cdb8e 100644 (file)
@@ -16,7 +16,7 @@ PKG_SOURCE_URL:=http://downloads.xiph.org/releases/opus/
 PKG_MD5SUM:=c5a8cf7c0b066759542bc4ca46817ac6
 
 PKG_LICENSE:=BSD-3-Clause
-PKG_LICENSE_FILE:=COPYING
+PKG_LICENSE_FILES:=COPYING
 PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org>
 
 PKG_INSTALL:=1
index 1553a7edc529a60b30925d9bb2d60c0d6ecbca0d..e1d99f67a782288c245706348ba8ebf1143f81e4 100644 (file)
@@ -43,6 +43,7 @@ define Host/Compile
 endef
 
 define Host/Install
+       $(MAKE) -C $(HOST_BUILD_DIR) install
 endef
 
 CONFIGURE_ARGS += --with-protoc=$(HOST_BUILD_DIR)/src/protoc
index 8796dc56cb38ae87a2bf11bbabbd50572911e45b..aa3ee28d2439e0fcad26417d80ca603a5906ad7d 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=sqlite
-PKG_VERSION:=3080600
+PKG_VERSION:=3080701
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-autoconf-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.sqlite.org/2014/
-PKG_MD5SUM:=f7e4a156b583abeba349629e2364224b
+PKG_MD5SUM:=8ee4541ebb3e5739e7ef5e9046e30063
 
 PKG_LICENSE:=PUBLICDOMAIN
 PKG_LICENSE_FILES:=
diff --git a/libs/tdb/Makefile b/libs/tdb/Makefile
new file mode 100644 (file)
index 0000000..2fce3dc
--- /dev/null
@@ -0,0 +1,56 @@
+#
+# Copyright (C) 2007-2014 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=tdb
+PKG_VERSION:=1.0.6
+PKG_RELEASE:=1
+PKG_LICENSE:=GPL-2.0
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=@SF/tdb
+PKG_MD5SUM:=6b643fdeb48304010dcd5f675e458b58
+
+PKG_INSTALL:=1
+PKG_BUILD_DEPENDS:=+libgdbm
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/tdb
+  SUBMENU:=database
+  SECTION:=libs
+  CATEGORY:=Libraries
+  TITLE:=Trivial Database
+  URL:=http://sourceforge.net/projects/tdb/
+  MAINTAINER:=Dmitry V. Zimin <pfzim@mail.ru>
+#  DEPENDS:=+libgdbm
+endef
+
+define Package/tdb/description
+  TDB is a Trivial Database. In concept, it is very much like GDBM,
+  and BSD's DB except that it allows multiple simultaneous writers
+  and uses locking internally to keep writers from trampling on
+  each other. TDB is also extremely small.
+endef
+
+define Build/InstallDev
+       $(INSTALL_DIR) $(1)/usr/include
+       $(CP) $(PKG_INSTALL_DIR)/usr/include/tdb.h $(1)/usr/include/
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
+endef
+
+define Package/tdb/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
+endef
+
+$(eval $(call BuildPackage,tdb))
+
diff --git a/libs/tdb/patches/001-printf-fix.patch b/libs/tdb/patches/001-printf-fix.patch
new file mode 100644 (file)
index 0000000..f88d942
--- /dev/null
@@ -0,0 +1,41 @@
+--- a/tdbtool.c        2001-12-11 06:45:47.000000000 +0300
++++ b/tdbtool.c        2014-11-14 15:14:00.401164300 +0300
+@@ -169,23 +169,21 @@ static void print_data(unsigned char *bu
+ static void help(void)
+ {
+-      printf("
+-tdbtool: 
+-  create    dbname     : create a database
+-  open      dbname     : open an existing database
+-  erase                : erase the database
+-  dump      dumpname   : dump the database as strings
+-  insert    key  data  : insert a record
+-  store     key  data  : store a record (replace)
+-  show      key        : show a record by key
+-  delete    key        : delete a record by key
+-  list                 : print the database hash table and freelist
+-  free                 : print the database freelist
+-  1 | first            : print the first record
+-  n | next             : print the next record
+-  q | quit             : terminate
+-  \\n                   : repeat 'next' command
+-");
++      printf("tdbtool:\n");
++      printf("  create    dbname     : create a database\n");
++      printf("  open      dbname     : open an existing database\n");
++      printf("  erase                : erase the database\n");
++      printf("  dump      dumpname   : dump the database as strings\n");
++      printf("  insert    key  data  : insert a record\n");
++      printf("  store     key  data  : store a record (replace)\n");
++      printf("  show      key        : show a record by key\n");
++      printf("  delete    key        : delete a record by key\n");
++      printf("  list                 : print the database hash table and freelist\n");
++      printf("  free                 : print the database freelist\n");
++      printf("  1 | first            : print the first record\n");
++      printf("  n | next             : print the next record\n");
++      printf("  q | quit             : terminate\n");
++      printf("  \\n                   : repeat 'next' command\n\n");
+ }
+ static void terror(char *why)
index 0e6be0f9b856c395fca7ac5c1e8894d021aee0cf..998219a9fc48ad57092b880c4696ea1db4858090 100644 (file)
@@ -20,7 +20,7 @@ PKG_SOURCE_PROTO:=svn
 
 PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
 PKG_LICENSE:=VARIOUS
-PKG_LICENSE_FILE:=doc/COPYING
+PKG_LICENSE_FILES:=doc/COPYING
 
 PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
index 5ff72c0ff7b99d5ba1b7210e31390e5a8dddab30..de3646b01137dbeed803f36d59ad57b083c95312 100644 (file)
@@ -12,7 +12,7 @@ PKG_VERSION:=1.2.4
 PKG_RELEASE:=3
 
 PKG_LICENSE:=GPLv2
-PKG_LICENSE_FILE:=COPYING
+PKG_LICENSE_FILES:=COPYING
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=@SF/bogofilter
index 275fcb285afd658c5bc33acc5ac168028c968f55..1032d97718d396c33130a34d0c0fb9bd71cd0697 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=dovecot
-PKG_VERSION:=2.2.14
+PKG_VERSION:=2.2.15
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.dovecot.org/releases/2.2
-PKG_MD5SUM:=03315255920ee1c4b11039945246a8af
+PKG_MD5SUM:=c6c176943bd832c780fbb5d2f8850952
 PKG_LICENSE:=LGPL-2.1 MIT BSD-3-Clause Unique
 PKG_LICENSE_FILES:=COPYING COPYING.LGPL COPYING.MIT
 
diff --git a/mail/fdm/Config.in b/mail/fdm/Config.in
new file mode 100644 (file)
index 0000000..084695b
--- /dev/null
@@ -0,0 +1,10 @@
+menu "Configuration"
+       depends on PACKAGE_fdm
+
+config FDM_WITH_PCRE
+       bool
+       default y
+       select libpcre
+       prompt "Enable PCRE support (elsewhere POSIX regex)"
+
+endmenu
diff --git a/mail/fdm/Makefile b/mail/fdm/Makefile
new file mode 100644 (file)
index 0000000..3eacdf8
--- /dev/null
@@ -0,0 +1,86 @@
+#
+# Copyright (C) 2007-2014 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=fdm
+PKG_VERSION:=1.7
+PKG_RELEASE:=1
+PKG_LICENSE:=BSD-2-Clause
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=@SF/fdm
+PKG_MD5SUM:=aea0421571e8f3ec8f747a5d72c84348
+
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/fdm
+  SECTION:=mail
+  CATEGORY:=Mail
+  TITLE:=fetch mail and deliver
+  URL:=http://fdm.sourceforge.net/
+  MAINTAINER:=Dmitry V. Zimin <pfzim@mail.ru>
+  MENU:=1
+  DEPENDS:=+tdb +zlib +libopenssl +FDM_WITH_PCRE:libpcre
+  USERID:=_fdm=99:_fdm=99
+endef
+
+define Package/fdm/description
+  fdm is a simple, lightweight replacement for mail fetch, filter
+  and delivery programs such as fetchmail and procmail. It can
+  fetch using POP3 or IMAP (with SSL) or from stdin, and deliver
+  to a pipe, file, maildir, mbox or SMTP server, based on $(if $(CONFIG_FDM_WITH_PCRE),PCRE,POSIX regexp)
+endef
+
+MAKE_FLAGS += \
+       PREFIX="/usr"\
+       $(if $(CONFIG_FDM_WITH_PCRE),PCRE=1)
+
+define Build/Prepare
+       $(call Build/Prepare/Default)
+       $(CP) ./src/compat/* $(PKG_BUILD_DIR)/
+endef
+
+define Package/fdm/config
+       source "$(SOURCE)/Config.in
+endef
+
+define Package/fdm/conffiles
+/etc/fdm.conf
+endef
+
+define Package/fdm/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
+       $(INSTALL_DIR) $(1)/etc
+       $(INSTALL_DATA) ./files/etc/* $(1)/etc/
+       $(INSTALL_DIR) $(1)/opt/fdm
+       chmod a+rwx $(1)/opt/fdm
+endef
+
+define Package/fdm/postinst
+#!/bin/sh
+if [ -z "$${IPKG_INSTROOT}" ]; then
+       echo "Creating cron job template for user _fdm..."
+       (crontab -l -u _fdm 2>/dev/null; echo "# */13 * * * * fdm -q fetch") | crontab -u _fdm -
+       echo "Please, edit file /etc/fdm.conf and enable cron job!"
+fi
+exit 0
+endef
+
+define Package/fdm/prerm
+#!/bin/sh
+if [ -z "$${IPKG_INSTROOT}" ]; then
+       echo "Don't forget disable cron job!"
+       echo "# crontab -r -u _fdm"
+fi
+exit 0
+endef
+
+$(eval $(call BuildPackage,fdm))
diff --git a/mail/fdm/files/etc/fdm.conf b/mail/fdm/files/etc/fdm.conf
new file mode 100644 (file)
index 0000000..56c9db4
--- /dev/null
@@ -0,0 +1,36 @@
+# /etc/fdm.conf example file
+# 1. Edit this file
+# 2. Test: fdm -vv fetch
+# 3. Enable cron job: crontab -e -u _fdm
+
+set maximum-size      3M
+set delete-oversized
+set queue-high        1
+set queue-low         0
+set purge-after       5
+set unmatched-mail    keep
+
+action "drop" drop
+action "keep" keep
+
+action "wakeup" exec "wol -h 192.168.0.255 -p 9 00:11:22:33:44:55"
+action "my-test-action" exec "echo \"OK\" > /tmp/fdm.ok"
+
+# This action extract *.torrent files from incoming email and put it
+# to watch-dir your torrect client application
+
+action "torrent-add" pipe "munpack -f -q -C /your-path/watch-dir/ ; for i in /your-path/watch-dir/*.torrent ; do chmod a+r \$i ; done"
+
+account "xbmc" disabled
+        pop3s
+        server   "pop.yandex.ru"
+        port     995
+        user     "username-enter-here"
+        pass     "password-enter-here"
+        new-only
+        cache    "/opt/fdm/cache"
+
+match "^Subject:[ \t]+openwrt:[ \t]*wakeup[ \t]*$" in headers actions { "wakeup" "drop" }
+match "^Subject:[ \t]+openwrt:[ \t]*torrent[ \t]+add[ \t]*\$" in headers actions { "torrent-add" "drop" }
+match "^Subject:[ \t]+openwrt:[ \t]*test[ \t]*$" in headers actions { "my-test-action" "drop" }
+match all action "keep"
diff --git a/mail/fdm/patches/001-base64-fix.patch b/mail/fdm/patches/001-base64-fix.patch
new file mode 100644 (file)
index 0000000..ad9239b
--- /dev/null
@@ -0,0 +1,14 @@
+--- a/fdm.h    2011-10-10 17:36:29.000000000 +0400
++++ b/fdm.h    2014-11-13 12:56:59.217083683 +0300
+@@ -719,6 +719,11 @@
+ size_t                 strlcat(char *, const char *, size_t);
+ #endif
++int local_b64_ntop(uint8_t const *src, size_t srclength, char *target,
++    size_t targsize);
++
++int local_b64_pton(char const *src, uint8_t *target, size_t targsize);
++
+ /* shm.c */
+ char                  *shm_path(struct shm *);
+ void          *shm_create(struct shm *, size_t);
diff --git a/mail/fdm/patches/002-base64-fix.patch b/mail/fdm/patches/002-base64-fix.patch
new file mode 100644 (file)
index 0000000..7f798a6
--- /dev/null
@@ -0,0 +1,20 @@
+--- a/imap-common.c    2011-12-20 00:19:03.000000000 +0400
++++ b/imap-common.c    2014-11-13 12:56:06.930418446 +0300
+@@ -206,7 +206,7 @@
+       size = (strlen(in) * 2) + 1;
+       out = xcalloc(1, size);
+-      if (b64_ntop(in, strlen(in), out, size) < 0) {
++      if (local_b64_ntop(in, strlen(in), out, size) < 0) {
+               xfree(out);
+               return (NULL);
+       }
+@@ -222,7 +222,7 @@
+       size = (strlen(in) * 4) + 1;
+       out = xcalloc(1, size);
+-      if (b64_pton(in, out, size) < 0) {
++      if (local_b64_pton(in, out, size) < 0) {
+               xfree(out);
+               return (NULL);
+       }
diff --git a/mail/fdm/src/compat/b64_ntop.c b/mail/fdm/src/compat/b64_ntop.c
new file mode 100644 (file)
index 0000000..0d222cf
--- /dev/null
@@ -0,0 +1,183 @@
+/*
+ * Copyright (c) 1996, 1998 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 <config.h>
+
+#include <sys/types.h>
+#include <sys/param.h>
+#include <sys/socket.h>
+
+#include <netinet/in.h>
+#include <arpa/inet.h>
+
+#include <ctype.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "fdm.h"
+
+#define Assert(Cond) if (!(Cond)) abort()
+
+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
+local_b64_ntop(uint8_t const *src, size_t srclength, char *target, size_t targsize) {
+       size_t datalength = 0;
+       uint8_t input[3];
+       uint8_t output[4];
+       size_t 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;
+               Assert(output[0] < 64);
+               Assert(output[1] < 64);
+               Assert(output[2] < 64);
+               Assert(output[3] < 64);
+
+               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);
+               Assert(output[0] < 64);
+               Assert(output[1] < 64);
+               Assert(output[2] < 64);
+
+               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);
+}
diff --git a/mail/fdm/src/compat/b64_pton.c b/mail/fdm/src/compat/b64_pton.c
new file mode 100644 (file)
index 0000000..0e9363a
--- /dev/null
@@ -0,0 +1,393 @@
+/*
+ * Copyright (c) 1996, 1998 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 <config.h>
+
+#include <sys/types.h>
+#include <sys/param.h>
+#include <sys/socket.h>
+
+#include <netinet/in.h>
+#include <arpa/inet.h>
+
+#include <ctype.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "fdm.h"
+
+#define Assert(Cond) if (!(Cond)) abort()
+
+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.
+   */
+
+/* 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.
+ */
+
+static int b64rmap_initialized = 0;
+static uint8_t b64rmap[256];
+
+static const uint8_t b64rmap_special = 0xf0;
+static const uint8_t b64rmap_end = 0xfd;
+static const uint8_t b64rmap_space = 0xfe;
+static const uint8_t b64rmap_invalid = 0xff;
+
+/**
+ * Initializing the reverse map is not thread safe.
+ * Which is fine for NSD. For now...
+ **/
+static void
+b64_initialize_rmap ()
+{
+       int i;
+       char ch;
+
+       /* Null: end of string, stop parsing */
+       b64rmap[0] = b64rmap_end;
+
+       for (i = 1; i < 256; ++i) {
+               ch = (char)i;
+               /* Whitespaces */
+               if (isspace(ch))
+                       b64rmap[i] = b64rmap_space;
+               /* Padding: stop parsing */
+               else if (ch == Pad64)
+                       b64rmap[i] = b64rmap_end;
+               /* Non-base64 char */
+               else
+                       b64rmap[i] = b64rmap_invalid;
+       }
+
+       /* Fill reverse mapping for base64 chars */
+       for (i = 0; Base64[i] != '\0'; ++i)
+               b64rmap[(uint8_t)Base64[i]] = i;
+
+       b64rmap_initialized = 1;
+}
+
+static int
+b64_pton_do(char const *src, uint8_t *target, size_t targsize)
+{
+       int tarindex, state, ch;
+       uint8_t ofs;
+
+       state = 0;
+       tarindex = 0;
+
+       while (1)
+       {
+               ch = *src++;
+               ofs = b64rmap[ch];
+
+               if (ofs >= b64rmap_special) {
+                       /* Ignore whitespaces */
+                       if (ofs == b64rmap_space)
+                               continue;
+                       /* End of base64 characters */
+                       if (ofs == b64rmap_end)
+                               break;
+                       /* A non-base64 character. */
+                       return (-1);
+               }
+
+               switch (state) {
+               case 0:
+                       if ((size_t)tarindex >= targsize)
+                               return (-1);
+                       target[tarindex] = ofs << 2;
+                       state = 1;
+                       break;
+               case 1:
+                       if ((size_t)tarindex + 1 >= targsize)
+                               return (-1);
+                       target[tarindex]   |=  ofs >> 4;
+                       target[tarindex+1]  = (ofs & 0x0f)
+                                               << 4 ;
+                       tarindex++;
+                       state = 2;
+                       break;
+               case 2:
+                       if ((size_t)tarindex + 1 >= targsize)
+                               return (-1);
+                       target[tarindex]   |=  ofs >> 2;
+                       target[tarindex+1]  = (ofs & 0x03)
+                                               << 6;
+                       tarindex++;
+                       state = 3;
+                       break;
+               case 3:
+                       if ((size_t)tarindex >= targsize)
+                               return (-1);
+                       target[tarindex] |= ofs;
+                       tarindex++;
+                       state = 0;
+                       break;
+               default:
+                       abort();
+               }
+       }
+
+       /*
+        * 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 = *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 ((void)NULL; ch != '\0'; ch = *src++)
+                               if (b64rmap[ch] != b64rmap_space)
+                                       break;
+                       /* Make sure there is another trailing = sign. */
+                       if (ch != Pad64)
+                               return (-1);
+                       ch = *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 ((void)NULL; ch != '\0'; ch = *src++)
+                               if (b64rmap[ch] != b64rmap_space)
+                                       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] != 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);
+}
+
+
+static int
+b64_pton_len(char const *src)
+{
+       int tarindex, state, ch;
+       uint8_t ofs;
+
+       state = 0;
+       tarindex = 0;
+
+       while (1)
+       {
+               ch = *src++;
+               ofs = b64rmap[ch];
+
+               if (ofs >= b64rmap_special) {
+                       /* Ignore whitespaces */
+                       if (ofs == b64rmap_space)
+                               continue;
+                       /* End of base64 characters */
+                       if (ofs == b64rmap_end)
+                               break;
+                       /* A non-base64 character. */
+                       return (-1);
+               }
+
+               switch (state) {
+               case 0:
+                       state = 1;
+                       break;
+               case 1:
+                       tarindex++;
+                       state = 2;
+                       break;
+               case 2:
+                       tarindex++;
+                       state = 3;
+                       break;
+               case 3:
+                       tarindex++;
+                       state = 0;
+                       break;
+               default:
+                       abort();
+               }
+       }
+
+       /*
+        * 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 = *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 ((void)NULL; ch != '\0'; ch = *src++)
+                               if (b64rmap[ch] != b64rmap_space)
+                                       break;
+                       /* Make sure there is another trailing = sign. */
+                       if (ch != Pad64)
+                               return (-1);
+                       ch = *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 ((void)NULL; ch != '\0'; ch = *src++)
+                               if (b64rmap[ch] != b64rmap_space)
+                                       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);
+}
+
+
+int
+local_b64_pton(char const *src, uint8_t *target, size_t targsize)
+{
+       if (!b64rmap_initialized)
+               b64_initialize_rmap ();
+
+       if (target)
+               return b64_pton_do (src, target, targsize);
+       else
+               return b64_pton_len (src);
+}
index 1e85627f204b0f15d8cf77703f5a86804eb0f495..c18e1e3085ccde501c0b9ad6791e4e4732bd76d4 100644 (file)
@@ -15,7 +15,7 @@ PKG_MD5SUM:=dc861ed9698a98499a951eaef7d4db9f
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
 PKG_MAINTAINER:=Denis Shulyaka <Shulyaka@gmail.com>
 PKG_LICENSE:=GPL-2.0+
-PKG_LICENSE_FILE:=gnu-COPYING-GPL
+PKG_LICENSE_FILES:=gnu-COPYING-GPL
 
 include $(INCLUDE_DIR)/package.mk
 
index 6274c9a4ef4969cfcb93a7b8fbaf01a36a5d3de6..29010e0828c50d4e3d522a753087fb37e4a5bf9b 100644 (file)
@@ -18,7 +18,7 @@ PKG_MD5SUM:=60103c411a8627e893d35e7836f904e8
 PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
 
 PKG_LICENSE:=BSD-3-Clause
-PKG_LICENSE_FILE:=COPYRIGHT
+PKG_LICENSE_FILES:=COPYRIGHT
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
 
diff --git a/mail/nail/Makefile b/mail/nail/Makefile
new file mode 100644 (file)
index 0000000..dba2018
--- /dev/null
@@ -0,0 +1,60 @@
+#
+# Copyright (C) 2007-2014 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=nail
+PKG_VERSION:=
+PKG_RELEASE:=1
+PKG_LICENSE:=BSD-2-Clause
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=:pserver:anonymous@nail.cvs.sourceforge.net:/cvsroot/nail
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)
+PKG_SOURCE_VERSION:=-D"2014-11-24 00:00"
+PKG_SOURCE_PROTO:=cvs
+
+PKG_INSTALL:=0
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/nail
+  SECTION:=mail
+  CATEGORY:=Mail
+  TITLE:=Heirloom mailx (nail)
+  URL:=http://heirloom.sourceforge.net/mailx.html
+  MAINTAINER:=Dmitry V. Zimin <pfzim@mail.ru>
+  DEPENDS:=+libopenssl
+endef
+
+define Package/nail/description
+  Heirloom mailx (formerly known as "nail") is intended provide
+  the functionality of the POSIX mailx command with additional
+  support for MIME messages, IMAP (including caching), POP3,
+  SMTP, S/MIME, message threading/sorting, scoring, and filtering
+endef
+
+define Package/nail/conffiles
+/etc/nail.rc
+endef
+
+define Build/Install
+       $(INSTALL_DIR) $(PKG_INSTALL_DIR)/usr/bin
+       $(CP) $(PKG_BUILD_DIR)/mailx $(PKG_INSTALL_DIR)/usr/bin/
+       $(INSTALL_DIR) $(PKG_INSTALL_DIR)/etc
+       $(CP) $(PKG_BUILD_DIR)/nail.rc $(PKG_INSTALL_DIR)/etc/
+endef
+
+define Package/nail/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
+       $(INSTALL_DIR) $(1)/etc
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/etc/* $(1)/etc/
+endef
+
+$(eval $(call BuildPackage,nail))
+
index c81782add9491a606bf982632e3ddbebbb25601e..bb75cbb40f938e9ff800c35ec43bcd22907aafc5 100644 (file)
@@ -15,7 +15,7 @@ PKG_MD5SUM:=c3f0f51d8865559b40e9350eb3816011
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_MAINTAINER:=Denis Shulyaka <Shulyaka@gmail.com>
 PKG_LICENSE:=IPL-1.0
-PKG_LICENSE_FILE:=LICENSE
+PKG_LICENSE_FILES:=LICENSE
 PKG_BUILD_DEPENDS:=+POSTFIX_CDB:tinycdb
 
 include $(INCLUDE_DIR)/package.mk
diff --git a/mail/ssmtp/Makefile b/mail/ssmtp/Makefile
new file mode 100644 (file)
index 0000000..3d24394
--- /dev/null
@@ -0,0 +1,64 @@
+#
+# Copyright (C) 2007-2014 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=ssmtp
+PKG_VERSION:=2.64
+PKG_RELEASE:=1.1
+PKG_MAINTAINER:=Dirk Brenken <dibdot@gmail.com>
+PKG_LICENSE:=GPL-2.0+
+
+PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.bz2
+PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/s/ssmtp
+PKG_MD5SUM:=65b4e0df4934a6cd08c506cabcbe584f
+
+include $(INCLUDE_DIR)/package.mk
+
+TARGET_CFLAGS += $(TARGET_CPPFLAGS)
+
+define Package/ssmtp
+  SECTION:=mail
+  CATEGORY:=Mail
+  DEPENDS:=+libopenssl
+  TITLE:=A minimal and secure mail sender with ssl support
+  URL:=http://packages.debian.org/ssmtp
+endef
+
+define Package/ssmtp/description
+ A secure, effective and simple way of getting mail off a system to your
+ mail hub. It contains no suid-binaries or other dangerous things - no
+ mail spool to poke around in, and no daemons running in the background.
+ Mail is simply forwarded to the configured mailhost. Extremely easy
+ configuration.
+endef
+
+define Package/ssmtp/conffiles
+/etc/ssmtp/ssmtp.conf
+/etc/ssmtp/revaliases
+endef
+
+CONFIGURE_VARS += \
+       LIBS="$(TARGET_LDFLAGS) -lcrypto -lssl"
+
+CONFIGURE_ARGS += \
+       --enable-ssl
+
+define Package/ssmtp/install
+       $(INSTALL_DIR) $(1)/etc/ssmtp
+       $(INSTALL_CONF) $(PKG_BUILD_DIR)/ssmtp.conf $(1)/etc/ssmtp/
+       $(INSTALL_DATA) $(PKG_BUILD_DIR)/revaliases $(1)/etc/ssmtp/
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/ssmtp $(1)/usr/sbin/
+endef
+
+define Package/ssmtp/postinst
+#!/bin/sh
+ln -sf ssmtp $${IPKG_INSTROOT}/usr/sbin/sendmail
+endef
+
+$(eval $(call BuildPackage,ssmtp))
diff --git a/mail/ssmtp/patches/002-fix_pointer.patch b/mail/ssmtp/patches/002-fix_pointer.patch
new file mode 100644 (file)
index 0000000..f22e3d6
--- /dev/null
@@ -0,0 +1,466 @@
+--- a/ssmtp.c
++++ b/ssmtp.c
+@@ -55,21 +55,21 @@ bool_t use_oldauth = False;                /* use old
+ #define ARPADATE_LENGTH 32            /* Current date in RFC format */
+ char arpadate[ARPADATE_LENGTH];
+-char *auth_user = (char)NULL;
+-char *auth_pass = (char)NULL;
+-char *auth_method = (char)NULL;               /* Mechanism for SMTP authentication */
+-char *mail_domain = (char)NULL;
+-char *from = (char)NULL;              /* Use this as the From: address */
++char *auth_user = NULL;
++char *auth_pass = NULL;
++char *auth_method = NULL;             /* Mechanism for SMTP authentication */
++char *mail_domain = NULL;
++char *from = NULL;            /* Use this as the From: address */
+ char *hostname;
+ char *mailhost = "mailhub";
+-char *minus_f = (char)NULL;
+-char *minus_F = (char)NULL;
++char *minus_f = NULL;
++char *minus_F = NULL;
+ char *gecos;
+-char *prog = (char)NULL;
++char *prog = NULL;
+ char *root = NULL;
+ char *tls_cert = "/etc/ssl/certs/ssmtp.pem";  /* Default Certificate */
+-char *uad = (char)NULL;
+-char *config_file = (char)NULL;               /* alternate configuration file */
++char *uad = NULL;
++char *config_file = NULL;             /* alternate configuration file */
+ headers_t headers, *ht;
+@@ -261,7 +261,7 @@ char *strip_post_ws(char *str)
+       p = (str + strlen(str));
+       while(isspace(*--p)) {
+-              *p = (char)NULL;
++              *p = '\0';
+       }
+       return(p);
+@@ -279,7 +279,7 @@ char *addr_parse(char *str)
+ #endif
+       /* Simple case with email address enclosed in <> */
+-      if((p = strdup(str)) == (char *)NULL) {
++      if((p = strdup(str)) == NULL) {
+               die("addr_parse(): strdup()");
+       }
+@@ -287,7 +287,7 @@ char *addr_parse(char *str)
+               q++;
+               if((p = strchr(q, '>'))) {
+-                      *p = (char)NULL;
++                      *p = '\0';
+               }
+ #if 0
+@@ -310,7 +310,7 @@ char *addr_parse(char *str)
+       q = strip_post_ws(p);
+       if(*q == ')') {
+               while((*--q != '('));
+-              *q = (char)NULL;
++              *q = '\0';
+       }
+       (void)strip_post_ws(p);
+@@ -349,7 +349,6 @@ standardise() -- Trim off '\n's and doub
+ */
+ bool_t standardise(char *str, bool_t *linestart)
+ {
+-      size_t sl;
+       char *p;
+       bool_t leadingdot = False;
+@@ -363,7 +362,7 @@ bool_t standardise(char *str, bool_t *li
+       *linestart = False;
+       if((p = strchr(str, '\n'))) {
+-              *p = (char)NULL;
++              *p = '\0';
+               *linestart = True;
+       }
+       return(leadingdot);
+@@ -384,7 +383,7 @@ void revaliases(struct passwd *pw)
+               while(fgets(buf, sizeof(buf), fp)) {
+                       /* Make comments invisible */
+                       if((p = strchr(buf, '#'))) {
+-                              *p = (char)NULL;
++                              *p = '\0';
+                       }
+                       /* Ignore malformed lines and comments */
+@@ -519,11 +518,11 @@ void rcpt_save(char *str)
+ #endif
+       /* Ignore missing usernames */
+-      if(*str == (char)NULL) {
++      if(*str == '\0') {
+               return;
+       }
+-      if((rt->string = strdup(str)) == (char *)NULL) {
++      if((rt->string = strdup(str)) == NULL) {
+               die("rcpt_save() -- strdup() failed");
+       }
+@@ -548,7 +547,7 @@ void rcpt_parse(char *str)
+       (void)fprintf(stderr, "*** rcpt_parse(): str = [%s]\n", str);
+ #endif
+-      if((p = strdup(str)) == (char *)NULL) {
++      if((p = strdup(str)) == NULL) {
+               die("rcpt_parse(): strdup() failed");
+       }
+       q = p;
+@@ -576,7 +575,7 @@ void rcpt_parse(char *str)
+               }
+               /* End of string? */
+-              if(*(q + 1) == (char)NULL) {
++              if(*(q + 1) == '\0') {
+                       got_addr = True;
+               }
+@@ -584,7 +583,7 @@ void rcpt_parse(char *str)
+               if((*q == ',') && (in_quotes == False)) {
+                       got_addr = True;
+-                      *q = (char)NULL;
++                      *q = '\0';
+               }
+               if(got_addr) {
+@@ -668,7 +667,7 @@ void header_save(char *str)
+       (void)fprintf(stderr, "header_save(): str = [%s]\n", str);
+ #endif
+-      if((p = strdup(str)) == (char *)NULL) {
++      if((p = strdup(str)) == NULL) {
+               die("header_save() -- strdup() failed");
+       }
+       ht->string = p;
+@@ -676,7 +675,7 @@ void header_save(char *str)
+       if(strncasecmp(ht->string, "From:", 5) == 0) {
+ #if 1
+               /* Hack check for NULL From: line */
+-              if(*(p + 6) == (char)NULL) {
++              if(*(p + 6) == '\0') {
+                       return;
+               }
+ #endif
+@@ -739,19 +738,19 @@ header_parse() -- Break headers into sep
+ void header_parse(FILE *stream)
+ {
+       size_t size = BUF_SZ, len = 0;
+-      char *p = (char *)NULL, *q;
++      char *p = NULL, *q;
+       bool_t in_header = True;
+-      char l = (char)NULL;
++      char l = '\0';
+       int c;
+       while(in_header && ((c = fgetc(stream)) != EOF)) {
+               /* Must have space for up to two more characters, since we
+                       may need to insert a '\r' */
+-              if((p == (char *)NULL) || (len >= (size - 1))) {
++              if((p == NULL) || (len >= (size - 1))) {
+                       size += BUF_SZ;
+                       p = (char *)realloc(p, (size * sizeof(char)));
+-                      if(p == (char *)NULL) {
++                      if(p == NULL) {
+                               die("header_parse() -- realloc() failed");
+                       }
+                       q = (p + len);
+@@ -776,9 +775,9 @@ void header_parse(FILE *stream)
+                                               in_header = False;
+                               default:
+-                                              *q = (char)NULL;
++                                              *q = '\0';
+                                               if((q = strrchr(p, '\n'))) {
+-                                                      *q = (char)NULL;
++                                                      *q = '\0';
+                                               }
+                                               header_save(p);
+@@ -809,9 +808,9 @@ void header_parse(FILE *stream)
+                                               in_header = False;
+                               default:
+-                                              *q = (char)NULL;
++                                              *q = '\0';
+                                               if((q = strrchr(p, '\n'))) {
+-                                                      *q = (char)NULL;
++                                                      *q = '\0';
+                                               }
+                                               header_save(p);
+@@ -876,11 +875,11 @@ bool_t read_config()
+               char *rightside;
+               /* Make comments invisible */
+               if((p = strchr(buf, '#'))) {
+-                      *p = (char)NULL;
++                      *p = '\0';
+               }
+               /* Ignore malformed lines and comments */
+-              if(strchr(buf, '=') == (char *)NULL) continue;
++              if(strchr(buf, '=') == NULL) continue;
+               /* Parse out keywords */
+               p=firsttok(&begin, "= \t\n");
+@@ -890,7 +889,7 @@ bool_t read_config()
+               }
+               if(p && q) {
+                       if(strcasecmp(p, "Root") == 0) {
+-                              if((root = strdup(q)) == (char *)NULL) {
++                              if((root = strdup(q)) == NULL) {
+                                       die("parse_config() -- strdup() failed");
+                               }
+@@ -904,7 +903,7 @@ bool_t read_config()
+                                       port = atoi(r);
+                               }
+-                              if((mailhost = strdup(q)) == (char *)NULL) {
++                              if((mailhost = strdup(q)) == NULL) {
+                                       die("parse_config() -- strdup() failed");
+                               }
+@@ -949,7 +948,7 @@ bool_t read_config()
+                                       mail_domain = strdup(q);
+                               }
+-                              if(mail_domain == (char *)NULL) {
++                              if(mail_domain == NULL) {
+                                       die("parse_config() -- strdup() failed");
+                               }
+                               rewrite_domain = True;
+@@ -1025,7 +1024,7 @@ bool_t read_config()
+                               }
+                       }
+                       else if(strcasecmp(p, "TLSCert") == 0) {
+-                              if((tls_cert = strdup(q)) == (char *)NULL) {
++                              if((tls_cert = strdup(q)) == NULL) {
+                                       die("parse_config() -- strdup() failed");
+                               }
+@@ -1036,7 +1035,7 @@ bool_t read_config()
+ #endif
+                       /* Command-line overrides these */
+                       else if(strcasecmp(p, "AuthUser") == 0 && !auth_user) {
+-                              if((auth_user = strdup(q)) == (char *)NULL) {
++                              if((auth_user = strdup(q)) == NULL) {
+                                       die("parse_config() -- strdup() failed");
+                               }
+@@ -1045,7 +1044,7 @@ bool_t read_config()
+                               }
+                       }
+                       else if(strcasecmp(p, "AuthPass") == 0 && !auth_pass) {
+-                              if((auth_pass = strdup(q)) == (char *)NULL) {
++                              if((auth_pass = strdup(q)) == NULL) {
+                                       die("parse_config() -- strdup() failed");
+                               }
+@@ -1054,7 +1053,7 @@ bool_t read_config()
+                               }
+                       }
+                       else if(strcasecmp(p, "AuthMethod") == 0 && !auth_method) {
+-                              if((auth_method = strdup(q)) == (char *)NULL) {
++                              if((auth_method = strdup(q)) == NULL) {
+                                       die("parse_config() -- strdup() failed");
+                               }
+@@ -1119,14 +1118,11 @@ int smtp_open(char *host, int port)
+       char buf[(BUF_SZ + 1)];
+       /* Init SSL stuff */
+-      SSL_CTX *ctx;
+-      SSL_METHOD *meth;
++      SSL_CTX *ctx = NULL;
+       X509 *server_cert;
+-
+       SSL_load_error_strings();
+       SSLeay_add_ssl_algorithms();
+-      meth=SSLv23_client_method();
+-      ctx = SSL_CTX_new(meth);
++      ctx = SSL_CTX_new(SSLv23_client_method());
+       if(!ctx) {
+               log_event(LOG_ERR, "No SSL support initiated\n");
+               return(-1);
+@@ -1310,7 +1306,7 @@ char *fd_gets(char *buf, int size, int f
+                       buf[i++] = c;
+               }
+       }
+-      buf[i] = (char)NULL;
++      buf[i] = '\0';
+       return(buf);
+ }
+@@ -1434,14 +1430,14 @@ int ssmtp(char *argv[])
+       }
+       if((p = strtok(pw->pw_gecos, ";,"))) {
+-              if((gecos = strdup(p)) == (char *)NULL) {
++              if((gecos = strdup(p)) == NULL) {
+                       die("ssmtp() -- strdup() failed");
+               }
+       }
+       revaliases(pw);
+       /* revaliases() may have defined this */
+-      if(uad == (char *)NULL) {
++      if(uad == NULL) {
+               uad = append_domain(pw->pw_name);
+       }
+@@ -1489,7 +1485,7 @@ int ssmtp(char *argv[])
+       /* Try to log in if username was supplied */
+       if(auth_user) {
+ #ifdef MD5AUTH
+-              if(auth_pass == (char *)NULL) {
++              if(auth_pass == NULL) {
+                       auth_pass = strdup("");
+               }
+@@ -1508,7 +1504,7 @@ int ssmtp(char *argv[])
+               else {
+ #endif
+               memset(buf, 0, bufsize);
+-              to64frombits(buf, auth_user, strlen(auth_user));
++              to64frombits(buf, (unsigned char *)auth_user, strlen(auth_user));
+               if (use_oldauth) {
+                       outbytes += smtp_write(sock, "AUTH LOGIN %s", buf);
+               }
+@@ -1520,7 +1516,7 @@ int ssmtp(char *argv[])
+                       }
+                       /* we assume server asked us for Username */
+                       memset(buf, 0, bufsize);
+-                      to64frombits(buf, auth_user, strlen(auth_user));
++                      to64frombits(buf, (unsigned char *)auth_user, strlen(auth_user));
+                       outbytes += smtp_write(sock, buf);
+               }
+@@ -1530,7 +1526,7 @@ int ssmtp(char *argv[])
+               }
+               memset(buf, 0, bufsize);
+-              to64frombits(buf, auth_pass, strlen(auth_pass));
++              to64frombits(buf, (unsigned char *)auth_pass, strlen(auth_pass));
+ #ifdef MD5AUTH
+               }
+ #endif
+@@ -1737,7 +1733,7 @@ char **parse_options(int argc, char *arg
+               j = 0;
+               add = 1;
+-              while(argv[i][++j] != (char)NULL) {
++              while(argv[i][++j] != '\0') {
+                       switch(argv[i][j]) {
+ #ifdef INET6
+                       case '6':
+@@ -1755,14 +1751,14 @@ char **parse_options(int argc, char *arg
+                                       if((!argv[i][(j + 1)])
+                                               && argv[(i + 1)]) {
+                                               auth_user = strdup(argv[i+1]);
+-                                              if(auth_user == (char *)NULL) {
++                                              if(auth_user == NULL) {
+                                                       die("parse_options() -- strdup() failed");
+                                               }
+                                               add++;
+                                       }
+                                       else {
+                                               auth_user = strdup(argv[i]+j+1);
+-                                              if(auth_user == (char *)NULL) {
++                                              if(auth_user == NULL) {
+                                                       die("parse_options() -- strdup() failed");
+                                               }
+                                       }
+@@ -1772,14 +1768,14 @@ char **parse_options(int argc, char *arg
+                                       if((!argv[i][(j + 1)])
+                                               && argv[(i + 1)]) {
+                                               auth_pass = strdup(argv[i+1]);
+-                                              if(auth_pass == (char *)NULL) {
++                                              if(auth_pass == NULL) {
+                                                       die("parse_options() -- strdup() failed");
+                                               }
+                                               add++;
+                                       }
+                                       else {
+                                               auth_pass = strdup(argv[i]+j+1);
+-                                              if(auth_pass == (char *)NULL) {
++                                              if(auth_pass == NULL) {
+                                                       die("parse_options() -- strdup() failed");
+                                               }
+                                       }
+@@ -1870,14 +1866,14 @@ char **parse_options(int argc, char *arg
+                       case 'F':
+                               if((!argv[i][(j + 1)]) && argv[(i + 1)]) {
+                                       minus_F = strdup(argv[(i + 1)]);
+-                                      if(minus_F == (char *)NULL) {
++                                      if(minus_F == NULL) {
+                                               die("parse_options() -- strdup() failed");
+                                       }
+                                       add++;
+                               }
+                               else {
+                                       minus_F = strdup(argv[i]+j+1);
+-                                      if(minus_F == (char *)NULL) {
++                                      if(minus_F == NULL) {
+                                               die("parse_options() -- strdup() failed");
+                                       }
+                               }
+@@ -1889,14 +1885,14 @@ char **parse_options(int argc, char *arg
+                       case 'r':
+                               if((!argv[i][(j + 1)]) && argv[(i + 1)]) {
+                                       minus_f = strdup(argv[(i + 1)]);
+-                                      if(minus_f == (char *)NULL) {
++                                      if(minus_f == NULL) {
+                                               die("parse_options() -- strdup() failed");
+                                       }
+                                       add++;
+                               }
+                               else {
+                                       minus_f = strdup(argv[i]+j+1);
+-                                      if(minus_f == (char *)NULL) {
++                                      if(minus_f == NULL) {
+                                               die("parse_options() -- strdup() failed");
+                                       }
+                               }
+--- a/base64.c
++++ b/base64.c
+@@ -31,7 +31,7 @@ static const char base64val[] = {
+ };
+ #define DECODE64(c)  (isascii(c) ? base64val[c] : BAD)
+-void to64frombits(unsigned char *out, const unsigned char *in, int inlen)
++void to64frombits(char *out, const unsigned char *in, int inlen)
+ /* raw bytes in quasi-big-endian order to base 64 string (NUL-terminated) */
+ {
+     for (; inlen >= 3; inlen -= 3)
+@@ -57,7 +57,7 @@ void to64frombits(unsigned char *out, co
+     *out = '\0';
+ }
+-int from64tobits(char *out, const char *in)
++int from64tobits(unsigned char *out, const char *in)
+ /* base 64 to raw bytes in quasi-big-endian order, returning count of bytes */
+ {
+     int len = 0;
+--- a/ssmtp.h
++++ b/ssmtp.h
+@@ -41,5 +41,5 @@ typedef struct string_list rcpt_t;
+ void get_arpadate(char *);
+ /* base64.c */
+-void to64frombits(unsigned char *, const unsigned char *, int);
+-int from64tobits(char *, const char *);
++void to64frombits(char *, const unsigned char *, int);
++int from64tobits(unsigned char *, const char *);
index edb46be6806c40dc74fc569bd0f970071dcb4caa..5a5f3b52cb0080b1c1a04f30f473e012079f7833 100644 (file)
@@ -17,7 +17,7 @@ PKG_SOURCE_URL:=http://www.firestorm.cx/fswebcam/files \
 PKG_MD5SUM:=1bfdb21904e816f100370ec8f4df986b
 
 PKG_LICENSE:=GPL-2.0
-PKG_LICENSE_FILE:=LICENCE
+PKG_LICENSE_FILES:=LICENCE
 PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org>
 
 PKG_INSTALL:=1
index a4721ef9c47807ad73527c1dfdf1c892d3259f32..600fb670e4f91736ea346bd183b71a2d5080312f 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gst1-libav
 PKG_VERSION:=1.2.3
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
 
@@ -18,7 +18,7 @@ PKG_SOURCE_URL:=http://gstreamer.freedesktop.org/src/gst-libav
 PKG_MD5SUM:=58c7998a054d8d8ca041fa35738f72b6
 
 PKG_LICENSE:=GPL-2.0 LGPL-2.0
-PKG_LICENSE_FILE:=COPYING COPYING.LIB
+PKG_LICENSE_FILES:=COPYING COPYING.LIB
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/gst-libav-$(PKG_VERSION)
 
@@ -109,7 +109,7 @@ PKG_CONFIG_DEPENDS:= \
        $(patsubst %,CONFIG_GST1_LIBAV_PARSER_%,$(LIBAV_PARSERS)) \
        $(patsubst %,CONFIG_GST1_LIBAV_PROTOCOL_%,$(LIBAV_PROTOCOLS))
 
-PKG_BUILD_DEPENDS:= libstreamer1 gstreamer1-plugins-base
+PKG_BUILD_DEPENDS:= libgstreamer1 gstreamer1-plugins-base
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/nls.mk
index c3b88aa720c97d9bb6a5afd46f99311080731650..9bed4ef163575a26b0d9cf4c13d982c7a016b45b 100644 (file)
@@ -14,7 +14,7 @@ PKG_RELEASE:=3
 PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
 
 PKG_LICENSE:=LGPLv2 GPLv2
-PKG_LICENSE_FILE:=COPYING.LIB COPYING
+PKG_LICENSE_FILES:=COPYING.LIB COPYING
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/gst-plugins-bad-$(PKG_VERSION)
 PKG_SOURCE:=gst-plugins-bad-$(PKG_VERSION).tar.xz
index 0ca6a8bf81019281f27c5548dad7c698d607bd46..6fd667caf0fdd7f4bc45e24f80dc1fa629b4635a 100644 (file)
@@ -9,12 +9,12 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gst1-plugins-base
 PKG_VERSION:=1.2.3
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
 
 PKG_LICENSE:=LGPLv2 GPLv2
-PKG_LICENSE_FILE:=COPYING.LIB COPYING
+PKG_LICENSE_FILES:=COPYING.LIB COPYING
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/gst-plugins-base-$(PKG_VERSION)
 PKG_SOURCE:=gst-plugins-base-$(PKG_VERSION).tar.xz
@@ -183,9 +183,12 @@ endef
 
 
 define Package/gst1-plugins-base/install
-       /bin/true
+  true
 endef
 
+define Package/gstreamer1-plugins-base/install
+  true
+endef
 
 # 1: short name
 # 2: description
index 082e736efb06b24dfbec80bac30001008e4b0883..1371a6f7e8a6edfca9334841c7654a77ae008e2a 100644 (file)
@@ -14,7 +14,7 @@ PKG_RELEASE:=2
 PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
 
 PKG_LICENSE:=LGPLv2
-PKG_LICENSE_FILE:=COPYING
+PKG_LICENSE_FILES:=COPYING
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/gst-plugins-good-$(PKG_VERSION)
 PKG_SOURCE:=gst-plugins-good-$(PKG_VERSION).tar.xz
index da574e0b464d474613bb612a788692ed40009cde..f7e699ac35ffb1ef53c97d85b7ff87d4b0b17492 100644 (file)
@@ -14,7 +14,7 @@ PKG_RELEASE:=2
 PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
 
 PKG_LICENSE:=LGPLv2
-PKG_LICENSE_FILE:=COPYING
+PKG_LICENSE_FILES:=COPYING
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/gst-plugins-ugly-$(PKG_VERSION)
 PKG_SOURCE:=gst-plugins-ugly-$(PKG_VERSION).tar.xz
index 7beec17480eb613854d1f7b1a971476602d346cf..5ee7164bf3565d61572a43473602ccf4d622b170 100644 (file)
@@ -9,12 +9,12 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gstreamer1
 PKG_VERSION:=1.2.3
-PKG_RELEASE:=2
+PKG_RELEASE:=4
 
 PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
 
 PKG_LICENSE:=LGPLv2
-PKG_LICENSE_FILE:=COPYING
+PKG_LICENSE_FILES:=COPYING
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/gstreamer-$(PKG_VERSION)
 PKG_SOURCE:=gstreamer-$(PKG_VERSION).tar.xz
@@ -161,6 +161,7 @@ define Package/gstreamer1/install
 endef
 
 define Package/gstreamer1-libs/install
+  true
 endef
 
 define Package/gstreamer1-utils/install
@@ -185,6 +186,8 @@ define Package/libgstreamer1/install
                ./usr/lib/gstreamer-$(GST_VERSION)/libgst*.so \
                $(1)/usr/lib/gstreamer-$(GST_VERSION)/ \
        )
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/gstreamer-$(GST_VERSION)/gst-plugin-scanner \
+                      $(1)/usr/lib/gstreamer-$(GST_VERSION)
 endef
 
 
index f883eeefb5ae2ba2c47088026014e9014a668fa5..7df8b74fb8ffe409a4f1d7628814aa6b98278cdf 100644 (file)
@@ -10,6 +10,7 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=icecast
 PKG_VERSION:=2.4.0
 PKG_RELEASE:=1
+PKG_LICENSE:=GPL-2.0
 PKG_MAINTAINER:=André Gaul <gaul@web-yard.de>
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
index 2b30ba83965696970abe79c44783383eef68c025..093c2efc6753991bcccecfa7aa00f8def1d56822 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=minidlna
-PKG_VERSION:=1.1.3
+PKG_VERSION:=1.1.4
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/minidlna
-PKG_MD5SUM:=879027192c89e5376cdd2ae2d1aa33b4
+PKG_MD5SUM:=67c9e91285bc3801fd91a5d26ea775d7
 PKG_LICENSE:=GPL-2.0 BSD-3-Clause
 PKG_LICENSE_FILES:=COPYING LICENCE.miniupnpd
 
@@ -75,7 +75,7 @@ CONFIGURE_ARGS +=\
 
 define Package/minidlna/install
        $(INSTALL_DIR) $(1)/usr/bin
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/minidlna $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/minidlnad $(1)/usr/bin/minidlna
        $(INSTALL_DIR) $(1)/etc/init.d
        $(INSTALL_BIN) ./files/minidlna.init $(1)/etc/init.d/minidlna
        $(INSTALL_DIR) $(1)/etc/config
diff --git a/multimedia/minidlna/patches/020-makefileam-tweaks.patch b/multimedia/minidlna/patches/020-makefileam-tweaks.patch
deleted file mode 100644 (file)
index 93d3f3c..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -19,9 +19,9 @@
- SUBDIRS=po
--sbin_PROGRAMS = minidlnad
-+sbin_PROGRAMS = minidlna
- check_PROGRAMS = testupnpdescgen
--minidlnad_SOURCES = minidlna.c upnphttp.c upnpdescgen.c upnpsoap.c \
-+minidlna_SOURCES = minidlna.c upnphttp.c upnpdescgen.c upnpsoap.c \
-                       upnpreplyparse.c minixml.c clients.c \
-                       getifaddr.c process.c upnpglobalvars.c \
-                       options.c minissdp.c uuid.c upnpevents.c \
-@@ -38,7 +38,7 @@
- flacoggflag = -logg
- #endif
--minidlnad_LDADD = \
-+minidlna_LDADD = \
-       @LIBJPEG_LIBS@ \
-       @LIBID3TAG_LIBS@ \
-       @LIBSQLITE3_LIBS@ \
-@@ -49,7 +49,7 @@
-       @LIBICONV@ \
-       -lFLAC  $(flacoggflag) $(vorbisflag)
--minidlnad_LDFLAGS = @STATIC_LDFLAGS@
-+minidlna_LDFLAGS = @STATIC_LDFLAGS@
- testupnpdescgen_SOURCES = testupnpdescgen.c upnpdescgen.c
- testupnpdescgen_LDADD = \
diff --git a/multimedia/minidlna/patches/030-upnphttp-fixPhilips.patch b/multimedia/minidlna/patches/030-upnphttp-fixPhilips.patch
deleted file mode 100644 (file)
index 8829bdc..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
---- a/upnphttp.c
-+++ b/upnphttp.c
-@@ -1259,7 +1259,7 @@
-       int try_sendfile = 1;
- #endif
--      while( offset < end_offset )
-+      while( offset <= end_offset )
-       {
- #if HAVE_SENDFILE
-               if( try_sendfile )
-
index d8df190b5301abcbc9f35fcf978c17c6532caf99..848fcc7e65914d63db35f0ef2d5de847946c1a1a 100644 (file)
@@ -20,7 +20,7 @@ PKG_SOURCE_VERSION:=$(PKG_REV)
 PKG_SOURCE_PROTO:=svn
 
 PKG_LICENSE:=GPL-2.0
-PKG_LICENSE_FILE:=LICENSE
+PKG_LICENSE_FILES:=LICENSE
 
 include $(INCLUDE_DIR)/package.mk
 
index 6f49a5df44dc221b121ffbfc7d394e8cc0700f80..412b5f90bc5b5a72e94360d7a61f63f3b501909d 100644 (file)
@@ -8,16 +8,21 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=motion
-PKG_VERSION:=20110826-051001
-PKG_RELEASE:=2
+PKG_VERSION=3.4.0-20141018-$(PKG_SOURCE_VERSION)
+PKG_RELEASE:=1
+
 PKG_MAINTAINER:=Roger D <rogerdammit@gmail.com>
+PKG_LICENSE:=GPLv2
+PKG_LICENSE_FILES:=COPYING
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://www.lavrsen.dk/sources/motion-daily \
-               @SF/motion
-PKG_MD5SUM:=e703fce57ae2215cb05f25e3027f5818
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/Mr-Dave/motion.git
+PKG_SOURCE_VERSION:=9479d910f2149b5558788bb86f97f26522794212
 
-PKG_INSTALL:=1
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -30,7 +35,7 @@ define Package/motion
 endef
 
 define Package/motion/conffiles
-/etc/motion.conf
+  /etc/motion.conf
 endef
 
 CONFIGURE_ARGS+= \
@@ -44,9 +49,9 @@ CONFIGURE_ARGS+= \
 
 define Package/motion/install
        $(INSTALL_DIR) $(1)/etc
-       $(CP) $(PKG_INSTALL_DIR)/etc/motion-dist.conf $(1)/etc/motion.conf
+       $(CP) $(PKG_BUILD_DIR)/motion-dist.conf $(1)/etc/motion.conf
        $(INSTALL_DIR) $(1)/usr/bin
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/motion $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/motion $(1)/usr/bin/
 
 endef
 
diff --git a/multimedia/motion/patches/002-honor_cppflags.patch b/multimedia/motion/patches/002-honor_cppflags.patch
deleted file mode 100644 (file)
index ac10f1e..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -31,6 +31,7 @@ examplesdir = $(datadir)/@PACKAGE_NAME@-
- # install.                                                                     #
- ################################################################################
- CFLAGS       = @CFLAGS@ -Wall -DVERSION=\"@PACKAGE_VERSION@\" -Dsysconfdir=\"$(sysconfdir)\" 
-+CPPFLAGS     = @CPPFLAGS@
- LDFLAGS      = @LDFLAGS@
- LIBS         = @LIBS@ 
- VIDEO_OBJ    = @VIDEO@
-@@ -118,7 +119,7 @@ endif
- ################################################################################
- $(DEPEND_FILE): *.h $(SRC)
-       @echo "Generating dependencies, please wait..."
--      @$(CC) $(CFLAGS) -M $(SRC) > .tmp
-+      @$(CC) $(CFLAGS) $(CPPFLAGS) -M $(SRC) > .tmp
-       @mv -f .tmp $(DEPEND_FILE)
-       @echo
diff --git a/net/bcp38/Makefile b/net/bcp38/Makefile
new file mode 100644 (file)
index 0000000..280bcc5
--- /dev/null
@@ -0,0 +1,62 @@
+#
+# Copyright (C) 2014 Openwrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=bcp38
+PKG_VERSION:=4
+PKG_RELEASE:=1
+PKG_LICENCE:=GPL-3.0+
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/bcp38
+  SECTION:=net
+  CATEGORY:=Network
+  SUBMENU:=Routing and Redirection
+  TITLE:=BCP38 compliance
+  URL:=https://github.com/dtaht/ceropackages-3.10
+  MAINTAINER:=Toke Høiland-Jørgensen <toke@toke.dk>
+  DEPENDS:=+ipset
+endef
+
+define Package/bcp38/description
+ bcp38 implements IETF BCP38 for home routers. See https://tools.ietf.org/html/bcp38.
+endef
+
+define Package/bcp38/conffiles
+/etc/config/bcp38
+endef
+
+define Build/Prepare
+endef
+
+define Build/Configure
+endef
+
+define Build/Compile
+endef
+
+define Package/bcp38/install
+       $(INSTALL_DIR) $(1)/etc/config
+       $(INSTALL_CONF) ./files/bcp38.config $(1)/etc/config/bcp38
+       $(INSTALL_DIR) $(1)/usr/lib/bcp38
+       $(INSTALL_BIN) ./files/run.sh $(1)/usr/lib/bcp38/run.sh
+       $(INSTALL_DIR) $(1)/etc/uci-defaults
+       $(INSTALL_BIN) ./files/bcp38.defaults $(1)/etc/uci-defaults/bcp38
+endef
+
+define Package/bcp38/postinst
+#!/bin/sh
+[ -x /etc/uci-defaults/bcp38 ] && /etc/uci-defaults/bcp38 || exit 0
+endef
+
+define Package/bcp38/postrm
+#!/bin/sh
+uci delete firewall.bcp38
+uci commit
+endef
+
+$(eval $(call BuildPackage,bcp38))
diff --git a/net/bcp38/files/bcp38.config b/net/bcp38/files/bcp38.config
new file mode 100644 (file)
index 0000000..08e8e20
--- /dev/null
@@ -0,0 +1,22 @@
+config bcp38
+       option enabled 0
+       option interface 'eth1'
+       option detect_upstream 1
+       list match '127.0.0.0/8'
+       list match '0.0.0.0/8'       # RFC 1700
+       list match '240.0.0.0/4'     # RFC 5745
+       list match '192.0.2.0/24'    # RFC 5737
+       list match '198.51.100.0/24' # RFC 5737
+       list match '203.0.113.0/24'  # RFC 5737
+       list match '192.168.0.0/16'  # RFC 1918
+       list match '10.0.0.0/8'      # RFC 1918
+       list match '172.16.0.0/12'   # RFC 1918
+       list match '169.254.0.0/16'  # RFC 3927
+
+#      list nomatch '172.26.0.0/21' # Example of something not to match
+#      There is a dhcp trigger to do this for the netmask of a 
+#      double natted connection needed
+
+#      I will argue that this level of indirection doesn't scale
+#      very well - see how to block china as an example
+#      http://www.okean.com/china.txt
diff --git a/net/bcp38/files/bcp38.defaults b/net/bcp38/files/bcp38.defaults
new file mode 100644 (file)
index 0000000..d7e0d80
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+uci -q batch <<-EOT
+       delete firewall.bcp38
+       set firewall.bcp38=include
+       set firewall.bcp38.type=script
+       set firewall.bcp38.path=/usr/lib/bcp38/run.sh
+       set firewall.bcp38.family=IPv4
+       set firewall.bcp38.reload=1
+       commit firewall
+EOT
+
+exit 0
diff --git a/net/bcp38/files/run.sh b/net/bcp38/files/run.sh
new file mode 100755 (executable)
index 0000000..bafdf3b
--- /dev/null
@@ -0,0 +1,104 @@
+#!/bin/sh
+# BCP38 filtering implementation for CeroWrt.
+#
+# This program is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 3 of the License, or (at your option) any later
+# version.
+#
+# Author: Toke Høiland-Jørgensen <toke@toke.dk>
+
+STOP=$1
+IPSET_NAME=bcp38-ipv4
+IPTABLES_CHAIN=BCP38
+
+. /lib/functions.sh
+
+config_load bcp38
+
+add_bcp38_rule()
+{
+       local subnet="$1"
+       local action="$2"
+
+       if [ "$action" == "nomatch" ]; then
+               ipset add "$IPSET_NAME" "$subnet" nomatch
+       else
+               ipset add "$IPSET_NAME" "$subnet"
+       fi
+}
+
+detect_upstream()
+{
+       local interface="$1"
+
+       subnets=$(ip route show dev "$interface"  | grep 'scope link' | awk '{print $1}')
+       for subnet in $subnets; do
+               # ipset test doesn't work for subnets, so strip out the subnet part
+               # and test for that; add as exception if there's a match
+               addr=$(echo $subnet | sed 's|/[0-9]\+$||')
+               ipset test "$IPSET_NAME" $addr 2>/dev/null && add_bcp38_rule $subnet nomatch
+       done
+}
+
+run() {
+       local section="$1"
+       local enabled
+       local interface
+       local detect_upstream
+       config_get_bool enabled "$section" enabled 0
+       config_get interface "$section" interface
+       config_get detect_upstream "$section" detect_upstream
+
+       if [ "$enabled" -eq "1" -a -n "$interface" -a -z "$STOP" ] ; then
+               setup_ipset
+               setup_iptables "$interface"
+               config_list_foreach "$section" match add_bcp38_rule match
+               config_list_foreach "$section" nomatch add_bcp38_rule nomatch
+               [ "$detect_upstream" -eq "1" ] && detect_upstream "$interface"
+       fi
+       exit 0
+}
+
+setup_ipset()
+{
+       ipset create "$IPSET_NAME" hash:net family ipv4
+       ipset flush "$IPSET_NAME"
+}
+
+setup_iptables()
+{
+       local interface="$1"
+       iptables -N "$IPTABLES_CHAIN" 2>/dev/null
+       iptables -F "$IPTABLES_CHAIN" 2>/dev/null
+
+       iptables -I output_rule -j "$IPTABLES_CHAIN"
+       iptables -I input_rule -j "$IPTABLES_CHAIN"
+       iptables -I forwarding_rule -j "$IPTABLES_CHAIN"
+
+       # always accept DHCP traffic
+       iptables -A "$IPTABLES_CHAIN" -p udp --dport 67:68 --sport 67:68 -j RETURN
+       iptables -A "$IPTABLES_CHAIN" -o "$interface" -m set --match-set "$IPSET_NAME" dst -j REJECT --reject-with icmp-net-unreachable
+       iptables -A "$IPTABLES_CHAIN" -i "$interface" -m set --match-set "$IPSET_NAME" src -j DROP
+}
+
+destroy_ipset()
+{
+       ipset flush "$IPSET_NAME" 2>/dev/null
+       ipset destroy "$IPSET_NAME" 2>/dev/null
+}
+
+destroy_iptables()
+{
+       iptables -D output_rule -j "$IPTABLES_CHAIN" 2>/dev/null
+       iptables -D input_rule -j "$IPTABLES_CHAIN" 2>/dev/null
+       iptables -D forwarding_rule -j "$IPTABLES_CHAIN" 2>/dev/null
+       iptables -F "$IPTABLES_CHAIN" 2>/dev/null
+       iptables -X "$IPTABLES_CHAIN" 2>/dev/null
+}
+
+destroy_iptables
+destroy_ipset
+config_foreach run bcp38
+
+exit 0
index 500674f09b76d02d0367572e7c8b2e0db72bf68f..44da26c09d3bbc2dff6d3f557a5f2a9d15f101a1 100644 (file)
@@ -22,7 +22,7 @@ include $(INCLUDE_DIR)/package.mk
 define Package/bmon
   SECTION:=net
   CATEGORY:=Network
-  DEPENDS:=+libncurses +libnl +confuse
+  DEPENDS:=+PACKAGE_libncursesw:libncursesw +!PACKAGE_libncursesw:libncurses +libnl +confuse
   TITLE:=bmon is a portable bandwidth monitor
   URL:=https://github.com/tgraf/bmon/
 endef
@@ -36,9 +36,6 @@ endef
 
 CONFIGURE_ARGS += \
        --disable-cnt-workaround \
-       --disable-dbi \
-       --disable-rrd \
-       --disable-asound \
 
 CONFIGURE_VARS += \
        ac_cv_lib_nl_nl_connect=no \
diff --git a/net/coova-chilli/Config.in b/net/coova-chilli/Config.in
new file mode 100644 (file)
index 0000000..79171f3
--- /dev/null
@@ -0,0 +1,48 @@
+# CoovaChilli avanced configuration
+
+menu "Configuration"
+       depends on PACKAGE_coova-chilli
+
+config COOVACHILLI_REDIR
+       bool "Enable support for redir server. Required for uamregex"
+       default n
+
+config COOVACHILLI_MINIPORTAL
+       bool "Enable support Coova miniportal"
+       default n
+
+config COOVACHILLI_USERAGENT
+       bool "Enable recording user-agent"
+       default n
+
+config COOVACHILLI_DNSLOG
+       bool "Enable support to log DNS name queries"
+       default n
+
+config COOVACHILLI_UAMDOMAINFILE
+       bool "Enable loading of mass uamdomains from file"
+       default n
+
+config COOVACHILLI_LARGELIMITS
+       bool "Enable larger limits for use with non-embedded systems"
+       default n
+
+choice
+       prompt "SSL library"
+       default COOVACHILLI_NOSSL
+
+config COOVACHILLI_NOSSL
+       bool "No SSL support"
+
+config COOVACHILLI_MATRIXSSL
+       bool "MatrixSSL"
+
+config COOVACHILLI_CYASSL
+       bool "CyaSSL"
+
+config COOVACHILLI_OPENSSL
+       bool "OpenSSL"
+
+endchoice
+
+endmenu
diff --git a/net/coova-chilli/Makefile b/net/coova-chilli/Makefile
new file mode 100644 (file)
index 0000000..0498f93
--- /dev/null
@@ -0,0 +1,104 @@
+#
+# Copyright (C) 2007-2014 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=coova-chilli
+PKG_VERSION:=1.3.0+20141128
+PKG_MAINTAINER:=Imre Kaloz <kaloz@openwrt.org>
+PKG_LICENSE:=GPL-2.0+
+PKG_LICENSE_FILE:=COPYING
+PKG_RELEASE:=1
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=git://github.com/coova/coova-chilli
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE_VERSION:=b93de20a288c01c2ba28e96e31ad6da01627f45f
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_MD5SUM:=2adb27ec56172b18c5beee359dd7898d
+
+PKG_INSTALL:=1
+
+PKG_CONFIG_DEPENDS := \
+  COOVACHILLI_MINIPORTAL \
+  COOVACHILLI_REDIR \
+  COOVACHILLI_USERAGENT \
+  COOVACHILLI_DNSLOG \
+  COOVACHILLI_UAMDOMAINFILE \
+  COOVACHILLI_LARGELIMITS \
+  COOVACHILLI_NOSSL \
+  COOVACHILLI_MATRIXSSL \
+  COOVACHILLI_CYASSL \
+  COOVACHILLI_OPENSSL
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/coova-chilli
+  SUBMENU:=Captive Portals
+  SECTION:=net
+  CATEGORY:=Network
+  DEPENDS:=+kmod-tun +librt +COOVACHILLI_MATRIXSSL:libmatrixssl +COOVACHILLI_CYASSL:libcyassl +COOVACHILLI_OPENSSL:libopenssl
+  TITLE:=Wireless LAN HotSpot controller (Coova Chilli Version)
+  URL:=http://www.coova.org/CoovaChilli
+  MENU:=1
+endef
+
+define Package/coova-chilli/description
+       CoovaChilli is an open source access controller for wireless LAN
+       access points and is based on ChilliSpot. It is used for authenticating
+       users of a wireless (or wired) LAN. It supports web based login (UAM)
+       which is today's standard for public HotSpots and it supports Wireless
+       Protected Access (WPA) which is the standard of the future.
+       Authentication, authorization and accounting (AAA) is handled by your
+       favorite radius server.
+endef
+
+define Package/coova-chilli/config
+  source "$(SOURCE)/Config.in"
+endef
+
+define Build/Prepare
+$(call Build/Prepare/Default)
+       ( cd $(PKG_BUILD_DIR) ; \
+               [ -f ./configure ] || { \
+                       ./bootstrap ; \
+               } \
+       )
+endef
+
+define Build/Configure
+       $(call Build/Configure/Default, \
+       $(if $(CONFIG_COOVACHILLI_REDIR),--enable,--disable)-chilliredir \
+       $(if $(CONFIG_COOVACHILLI_DNSLOG),--enable,--disable)-dnslog \
+       $(if $(CONFIG_COOVACHILLI_MINIPORTAL),--enable,--disable)-miniportal \
+       $(if $(CONFIG_COOVACHILLI_USERAGENT),--enable,--disable)-useragent \
+       $(if $(CONFIG_COOVACHILLI_LARGELIMITS),--enable,--disable)-largelimits \
+       $(if $(CONFIG_COOVACHILLI_UAMDOMAINFILE),--enable,--disable)-uamdomainfile \
+       $(if $(CONFIG_COOVACHILLI_MATRIXSSL),--with,--without)-matrixssl \
+       $(if $(CONFIG_COOVACHILLI_CYASSL),--with,--without)-cyaxssl \
+       $(if $(CONFIG_COOVACHILLI_OPENSSL),--with,--without)-openssl \
+       )
+endef
+
+define Package/coova-chilli/conffiles
+/etc/chilli.conf
+endef
+
+define Package/coova-chilli/install
+       $(INSTALL_DIR) $(1)/etc
+       $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/chilli.conf $(1)/etc/
+       $(INSTALL_DIR) $(1)/etc/chilli
+       $(CP) $(PKG_INSTALL_DIR)/etc/chilli/* $(1)/etc/chilli/
+       $(INSTALL_DIR) $(1)/etc/hotplug.d/iface
+       $(INSTALL_DATA) ./files/chilli.hotplug $(1)/etc/hotplug.d/iface/30-chilli
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/chilli* $(1)/usr/sbin/
+       $(INSTALL_DIR) $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.so.* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,coova-chilli))
diff --git a/net/coova-chilli/files/chilli.hotplug b/net/coova-chilli/files/chilli.hotplug
new file mode 100644 (file)
index 0000000..e12812b
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+[ "$ACTION" == "ifup" ] || exit 0
+
+[ "$INTERFACE" = "wan" ] && {
+       /etc/init.d/chilli restart
+}
diff --git a/net/coova-chilli/patches/100-fix-sysinfo-redeclaration.patch b/net/coova-chilli/patches/100-fix-sysinfo-redeclaration.patch
new file mode 100644 (file)
index 0000000..2efecbe
--- /dev/null
@@ -0,0 +1,24 @@
+--- a/src/system.h
++++ b/src/system.h
+@@ -83,10 +83,6 @@
+ #include <linux/sysinfo.h>
+ #endif
+-#ifdef HAVE_SYS_SYSINFO_H
+-#include <sys/sysinfo.h>
+-#endif
+-
+ #ifdef HAVE_TIME_H
+ #include <time.h>
+ #endif
+@@ -139,6 +135,10 @@
+ #include <linux/un.h>
+ #endif
++#ifdef HAVE_SYS_SYSINFO_H
++#include <sys/sysinfo.h>
++#endif
++
+ #elif defined (__FreeBSD__)  || defined (__APPLE__) || defined (__OpenBSD__) || defined (__NetBSD__) 
+ #include <net/if.h>
+ #include <net/bpf.h>
diff --git a/net/ddns-scripts/CHANGELOG b/net/ddns-scripts/CHANGELOG
new file mode 100644 (file)
index 0000000..43f3bf8
--- /dev/null
@@ -0,0 +1,109 @@
+Version 2.1.0-2
+Date   2014-11-15
+
+- moved /usr/lib/ddns/dynamic_dns_lucihelper.sh from luci-app-ddns into this package
+       (Github openwrt/luci issue 251)
+       (OpenWrt Trac tickets 18326 18347)
+- fix: dynamic_dns_update.sh did not loop
+       (OpenWrt Trac ticket 18336)
+- add provider cloudflare.com IPv4 and IPv6 (Thanks to Paul for support and testing)
+       (OpenWrt Trac ticket 12500)
+- modified detection, if dynamic_dns_fuctions are used by dynamic_dns_lucihelper.sh
+- redirect stdout of wget,curl,host,nslookup,nc etc to /tmp/ddns_$$.dat and *.err instead of variables
+- extended error detection in get_local_ip function
+- modified verify of option ip_script to allow parameters, when calling
+- add provider selfhost.de IPv4
+- add provider no-ip.pl (nothing to do with no-ip.com)
+       (Github openwrt/packages issue #542)
+       IPv4 (tested) and also added for
+       IPv6 (NOT tested) because client IP is autodetected be provider
+- add getlocalip_sample.sh as sample script for usage of
+       option ip_source 'script'  together with
+       option ip_script '/usr/lib/ddns/getlocalip.sh -4'
+- cleanup whitespaces at line ends
+
+--------------------------------------------------------------------------------
+Version 2.1.0-1
+Date   2014-11-09
+
+- fixed postinst and prerm in Makefile
+- implementation of provider specific update scripts into services and services_ipv6 file.
+       first Provider "no-ip.com"      - Thanks to DarkStarXxX for request and testing
+- finished uci/ddns wiki at http://wiki.openwrt.org/doc/uci/ddns
+- rewritten retry management
+- rewritten logging including following Issue 469
+       https://github.com/openwrt/packages/issues/469
+- stop running sections on hotplug ifdown event (like start on ifup)
+- implement trap detection
+       also kill "sleep" child processes
+       SIGHUP to reload configuration (not really reloading, simply starting a new process)
+       /etc/init.d/ddns reload implemented
+- code optimization
+- new provider LoopiaDNS.se    Issue 494
+       https://github.com/openwrt/packages/issues/494
+
+--------------------------------------------------------------------------------
+Version 2.0.1-9
+Date   2014-10-11
+
+- add retry loop to verify dns and proxy when script starts
+
+--------------------------------------------------------------------------------
+Version 2.0.1-8
+Date   2014-10-06
+
+- fixes problem CRITICAL ERROR - custom update_script not found
+
+--------------------------------------------------------------------------------
+Version 2.0.1-7
+Date   2014-10-05
+
+- Added support for custom update scripts with new option update_script
+
+--------------------------------------------------------------------------------
+Version 2.0.1-6
+Date   2014-10-01
+
+- url encode USERNAME and PASSWORD in update url
+
+--------------------------------------------------------------------------------
+Version 2.0.1-5
+Date   2014-09-30
+
+- fix send_update() detection of private IPv4
+
+--------------------------------------------------------------------------------
+Version 2.0.1-4
+Date   2014-09-29
+
+- fix ticket #17998: wrongly detect ipv4 start with 10x.x.x.x
+
+--------------------------------------------------------------------------------
+Version 2.0.1-3
+Date   2014-09-28
+
+- add service two-dns.de
+
+--------------------------------------------------------------------------------
+Version 2.0.1-2
+Date   2014-09-22
+
+- fix issue (#337) current/registered ip
+       https://github.com/openwrt/packages/issues/337
+
+--------------------------------------------------------------------------------
+Version 2.0.1-1
+Date   2014-09-20
+
+- 1st published version via github
+
+--------------------------------------------------------------------------------
+Version 2.0.0
+Date   2014-07-16
+
+- published via OpenWrt TRAC system as zip-file for testing
+       - IPv6 address support
+       - log file support
+       - syslog support for various error levels
+       - verify all given parameters before starting main loop
+       - retry max retry_counter times before terminating scripts
index 71c57866e638ed721a3d6874c1ee302c862f3f1f..a64b683f7cedcf3b62273bfdf19fbbaf372f5050 100644 (file)
@@ -1,8 +1,8 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ddns-scripts
-PKG_VERSION:=2.0.1
-PKG_RELEASE:=9
+PKG_VERSION:=2.1.0
+PKG_RELEASE:=2
 PKG_LICENSE:=GPL-2.0
 
 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
@@ -19,7 +19,7 @@ define Package/ddns-scripts
 endef
 
 define Package/ddns-scripts/description
-       A highly configurable set of scripts for doing dynamic dns updates. 
+       A highly configurable set of scripts for doing dynamic dns updates.
        NEW in this version:
        - IPv6 support
        - force communication to IPv4 or IPv6 only
@@ -62,7 +62,15 @@ endef
 define Package/ddns-scripts/postinst
        #!/bin/sh
        # if run within buildroot exit
-       [ -n "${IPKG_INSTROOT}" ] && exit 0
+       [ -n "$${IPKG_INSTROOT}" ] && exit 0
+
+       # remove old sed script file
+       [ -f /usr/lib/ddns/url_escape.sed ] && rm -f /usr/lib/ddns/url_escape.sed
+
+       # luci updates are not in sync with ddns-script updates !!!
+       # if old luci-app-ddns then errors during install because exist from differnt package
+       # copy dynamic_dns_helper.tmp.sh -> dynamic_dns_helper.sh
+       cp -f /usr/lib/ddns/dynamic_dns_lucihelper.tmp.sh /usr/lib/ddns/dynamic_dns_lucihelper.sh
 
        # add new section "ddns" "global" if not exists
        uci -q get ddns.global > /dev/null || uci -q set ddns.global='ddns'
@@ -70,7 +78,7 @@ define Package/ddns-scripts/postinst
        uci -q get ddns.global.log_lines > /dev/null || uci -q set ddns.global.log_lines='250'
        uci -q commit ddns
 
-       # clear LuCI indexcache 
+       # clear LuCI indexcache
        rm -f /tmp/luci-indexcache >/dev/null 2>&1
 
        exit 0
@@ -79,13 +87,13 @@ endef
 define Package/ddns-scripts/prerm
        #!/bin/sh
        # if run within buildroot exit
-       [ -n "${IPKG_INSTROOT}" ] && exit 0
+       [ -n "$${IPKG_INSTROOT}" ] && exit 0
 
        # stop running scripts
        /etc/init.d/ddns disable
        /etc/init.d/ddns stop
 
-       # clear LuCI indexcache 
+       # clear LuCI indexcache
        rm -f /tmp/luci-indexcache >/dev/null 2>&1
 
        exit 0
index 54ec42c125d7e380bafeab5c83a588932b299833..ce2c57302b6c43677d39051fac0f9ff047ca3f01 100644 (file)
@@ -1,5 +1,6 @@
 #
 # Please read ddns.sample
+# or http://wiki.openwrt.org/doc/uci/ddns
 #
 config ddns "global"
        option date_format "%F %R"
@@ -9,8 +10,8 @@ config ddns "global"
 
 
 config service "myddns_ipv4"
-       option service_name     "dyndns.org"
-       option domain           "yourhost.dyndns.org"
+       option service_name     "example.org"
+       option domain           "yourhost.example.org"
        option username         "your_username"
        option password         "your_password"
        option interface        "wan"
@@ -26,4 +27,4 @@ config service "myddns_ipv6"
        option interface        "wan6"
        option ip_source        "network"
        option ip_network       "wan6"
-       
+
index 8625b3899850ce81fb4ec1e033237235828859bd..23ed9f1713ae9a06b6578bf9980db82e585abfbb 100644 (file)
@@ -4,18 +4,18 @@
 # and used by ddns-scripts and corresponding LuCI application
 #
 # Inside your ddns configuration file (/etc/config/ddns)
-# you might not find some of below described options. 
+# you might not find some of below described options.
 # This is because you don't need to define options
 # if using there defaults. The LuCI application will delete
 # options that configured to there default values.
 #
 # If you have a working ddns configuration from old ddns-scripts (Version 1.x)
-# everything will function the same with new scripts 
+# everything will function the same with new scripts
 # without any changes to the configuration.
 #
 # If you like to use this file for your configuration then
-# use a copy, because the used software to modify the 
-# configuration files will throw away all empty lines 
+# use a copy, because the used software to modify the
+# configuration files will throw away all empty lines
 # and those starting with # (comments).
 #
 
@@ -55,10 +55,10 @@ config ddns "global"
 # for each service you want to serve you need a separate configuration
 # if you need IPv4 and IPv6 you need to setup 2 separate configurations
 # with different names. (i.e. "myddns_ipv4" and "myddns_ipv6")
-# do not use white-spaces or dashes "-" or "@" ":" "!" or 
+# do not use white-spaces or dashes "-" or "@" ":" "!" or
 # other special characters inside name.
 config service "myddns"
-       
+
        ########### Basic settings ########################
 
        ###########
@@ -74,22 +74,22 @@ config service "myddns"
 
        ###########
        # defines the network as defined in /etc/config/network
-       # to be monitored for up/down events to start via hotplug 
+       # to be monitored for up/down events to start via hotplug
        default: "wan"  for IPv4
        default: "wan6" for IPv6
        option interface "wan"
 
        ###########
-       # Next you need to specify the name of the service you are 
+       # Next you need to specify the name of the service you are
        # connecting to "eg. dyndns.org".  The format of the update
        # urls for several different dynamic dns services is specified
-       # in the "/usr/lib/ddns/services" file for IPv4 and in 
+       # in the "/usr/lib/ddns/services" file for IPv4 and in
        # "/usr/lib/ddns/service_ipv6" file. This list is hardly complete
        # as there are many, many different dynamic dns services.
-       # If your service is on the list you can merely specify it with the 
+       # If your service is on the list you can merely specify it with the
        # "service_name" option.  Otherwise you will need to determine
        # the format of the url to update with.  You can either add an
-       # entry to the "/usr/lib/ddns/services" or "services_ipv6" file 
+       # entry to the "/usr/lib/ddns/services" or "services_ipv6" file
        # or specify this with the "update_url" option.
        # If your ddns provider doesn't work with ddns-scripts because
        # there are additional parameters or other special thinks to be done,
@@ -100,18 +100,18 @@ config service "myddns"
        # default: none
        option service_name "dyndns.org"
 
-       # sample: 
+       # sample:
        # "http://[USERNAME]:[PASSWORD]@members.dyndns.org/nic/update?hostname=[DOMAIN]&myip=[IP]"
 #      option update_url   ""
 
-       # sample: 
+       # sample:
        # "/usr/lib/ddns/update_sample.sh"
 #      option update_script   ""
 
        ###########
        # You must specify your domain/host name, your username and your password
        # as you get from you DDNS provider. Keep an eye on providers help pages.
-       #       
+       #
        # Your DNS name / replace [DOMAIN] in update_url
        # default: none
        option domain ""
@@ -126,21 +126,21 @@ config service "myddns"
 
        ###########
        # use HTTPS for secure communication with you DDNS provider
-       # personally found some providers having problems when not sending 
-       # updates via HTTPS. Yyou must not specify "https://" in update_url. 
+       # personally found some providers having problems when not sending
+       # updates via HTTPS. You must not specify "https://" in update_url.
        # It's modified by the scripts themselves
        # Needs GNU Wget (with SSL support) or cURL to be installed.
        # default: "0"  do not use HTTPS
        option use_https "0"
 
-       # if using HTTPS (see above) the transfer program tries to verify 
+       # if using HTTPS (see above) the transfer program tries to verify
        # the providers server certificate. For verification there needs to be
        # the counterpart on this machine. Specify the path or path/file where
        # the transfer program can find them. (might need package CA-certificates)
        # if you don't want to verify servers certificate (insecure) you should
        # this parameter to "IGNORE" (in capital letters)
-       # default: "/etc/cacert"        path where CA-certificate package is installed
-       option cacert "/etc/cacert"
+       # default: (none)       path where CA-certificate package is installed
+       option cacert "/etc/ssl/certs"
 
        ###########
        # for logging and control if everything work fine you can get information inside
@@ -176,7 +176,7 @@ config service "myddns"
        option ip_source  "network"
        option ip_network "wan"
 
-       # ip_source "web" additional uses option ip_url and detects the current 
+       # ip_source "web" additional uses option ip_url and detects the current
        # local ip from special web sides that response with the ip address of
        # calling host. If you are behind a firewall/NAT this is the best option
        # since none of the local networks or interfaces will have the external ip.
@@ -201,8 +201,8 @@ config service "myddns"
 #      option ip_script ""
 
        ###########
-       # force_ipversion option will set the "-4" respectively "-6" parameter 
-       # on command line of transfer and DNS lookup program. 
+       # force_ipversion option will set the "-4" respectively "-6" parameter
+       # on command line of transfer and DNS lookup program.
        # So the whole communication uses the selected IP version between both ends.
        # needs GNU Wget or cURL installed for transfer and
        # BIND's host for DNS lookup.
@@ -210,11 +210,10 @@ config service "myddns"
        option force_ipversion "0"
 
        ###########
-       # normally the current (in the internet) registered ip is detected using the
+       # Normally the current (in the internet) registered ip is detected using the
        # local defined name lookup policies (i.e. /etc/resolve.conf etc.)
        # Specify here a DNS server to use instead of the defaults.
        # you can use hostname or ip address
-       # IPv6 address must be in squared brackets "[...]"
        # i.e. "google-public-dns-a.google.com"
        # default: none
 #      option dns_server "google-public-dns-a.google.com"
@@ -231,11 +230,12 @@ config service "myddns"
        # If a Proxy is need to access HTTP/HTTPS pages on the WEB
        # it can be configured here also for sending updates to the
        # DDNS provider. If you configured use_https='1' above, you
-       # need to setup your HTTPS proxy here, otherwise your 
+       # need to setup your HTTPS proxy here, otherwise your
        # HTTP proxy. !!! You should not detect your current IP
-       # ip_source='web' (see above) because this request is also 
+       # ip_source='web' (see above) because this request is also
        # send via the configured proxy !!!
        # Syntax: [user:password@]proxy:port !port is required !
+       # IPv6 address must be in squared brackets "[...]"
        # default: none
 #      option proxy ''
 
@@ -245,9 +245,9 @@ config service "myddns"
        # defines the time interval to check if local IP has changed
        # After the first start and first update send, the system will
        # wait this time before verify if update was successful send.
-       # !!! checks below 5 minutes make no sense because the Internet 
+       # !!! checks below 5 minutes make no sense because the Internet
        # needs about 5-10 minutes to sync an IP-change to all DNS servers !!!
-       # accepted unit entry’s: 'seconds' 'minutes' 'hours' 'days'
+       # accepted unit entry’s: 'seconds' 'minutes' 'hours'
        # minimum 5 minutes == 300 seconds
        # default 10 minutes
        option check_interval   '10'
@@ -256,11 +256,11 @@ config service "myddns"
        ###########
        # force to send an update to service provider, if no change was detected.
        # consult DDNS providers documentation if your DDNS entry might timeout.
-       # accepted unit entry’s: 'seconds' 'minutes' 'hours' 'days'
+       # accepted unit entry’s: 'minutes' 'hours' 'days'
        # minimum needs to be greater or equal check interval (see above)
        # A special setting of '0' is allowed, which forces the script to run once.
-       # It sends an update, verify if update was accepted by DNS 
-       # (retry if not) and finish. Useful if you want to start by your own (i.e. cron) 
+       # It sends an update, verify if update was accepted by DNS
+       # (retry if not) and finish. Useful if you want to start by your own (i.e. cron)
        # default 3 days == 72 hours
        option force_interval   '72'
        option force_unit       'hours'
@@ -276,7 +276,7 @@ config service "myddns"
        # if error happen on detecting, sending or updating the
        # script will retry the relevant action.
        # here you define the time to wait before retry is started
-       # accepted unit entry’s: 'seconds' 'minutes' 'hours' 'days'
+       # accepted unit entry’s: 'seconds' 'minutes'
        # default: 60 seconds
        option retry_interval   '60'
        option retry_unit       'seconds'
index dab2385cbfee4e69b85e6661032d1ec0f2d2adc6..dfb35f6d7afb198d2936ad8bf9b85beaf24ab416 100644 (file)
@@ -1,8 +1,14 @@
 #!/bin/sh
 
-if [ "$ACTION" = "ifup" ]; then
-       . /usr/lib/ddns/dynamic_dns_functions.sh
-       /etc/init.d/ddns enabled && start_daemon_for_all_ddns_sections "$INTERFACE"
-fi
-
-
+# there are other ACTIONs like ifupdate we don't need
+# so parse dynamic_dns_functions.sh only when needed
+case "$ACTION" in
+       ifup)
+               . /usr/lib/ddns/dynamic_dns_functions.sh
+               /etc/init.d/ddns enabled && start_daemon_for_all_ddns_sections "$INTERFACE"
+               ;;
+       ifdown)
+               . /usr/lib/ddns/dynamic_dns_functions.sh
+               stop_daemon_for_all_ddns_sections "$INTERFACE"
+               ;;
+esac
index 1194543cbac3f3d3c15e6bf9c263835ab96234e7..3618621160e7314afb5fc5313c6a48ae11c2ec99 100644 (file)
@@ -1,16 +1,26 @@
 #!/bin/sh /etc/rc.common
 START=95
+STOP=10
 
 boot() {
        return 0
 }
 
+reload() {
+       killall -1 dynamic_dns_updater.sh 2>/dev/null   # send SIGHUP
+}
+
+restart() {
+       stop
+       sleep 1 # give time to shutdown
+       start
+}
+
 start() {
        . /usr/lib/ddns/dynamic_dns_functions.sh
        start_daemon_for_all_ddns_sections
 }
 
 stop() {
-       killall -9 dynamic_dns_updater.sh
+       killall dynamic_dns_updater.sh 2>/dev/null
 }
-
diff --git a/net/ddns-scripts/files/usr/lib/ddns/create_cert_hashes.sh b/net/ddns-scripts/files/usr/lib/ddns/create_cert_hashes.sh
deleted file mode 100644 (file)
index ff788c3..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/bin/sh
-#
-#set -vx
-
-[ -d /etc/ssl/certs ] || {
-        echo "CA-Certificates not istalled - please install first"
-        exit 1
-}
-
-NUMCERT=$(find /etc/ssl/certs -name *.crt 2>/dev/null | wc -l)
-NUMLINK=$(find /etc/ssl/certs -type l 2>/dev/null | wc -l)
-
-[ $NUMLINK -gt 0 ] && {
-       echo "File-Links already exist. Exiting"
-       exit 0
-}
-
-[ -f /usr/bin/openssl ] && OPENSSL="EXIST"
-[ -z "$OPENSSL" ] && {
-       opkg update || exit 1
-       opkg install openssl-util 2>/dev/null
-}
-
-for CERTFILE in `ls -1 $(1)/etc/ssl/certs`; do \
-       HASH=`openssl x509 -hash -noout -in /etc/ssl/certs/$CERTFILE`
-       SUFFIX=0
-       while [ -h "/etc/ssl/certs/$HASH.$SUFFIX" ]; do
-               let "SUFFIX += 1"
-       done
-       ln -s "$CERTFILE" "/etc/ssl/certs/$HASH.$SUFFIX"
-       echo "link $HASH.$SUFFIX created for $CERTFILE"
-done
-
-[ -z "$OPENSSL" ] && opkg remove --force-remove --autoremove openssl-util 2>/dev/null
index aeabe5280a20b60f6423279b7ba9497685a1a0b9..8c0c5c12a532b869c156b2c09df831ba23608f84 100644 (file)
@@ -6,7 +6,7 @@
 # (Loosely) based on the script on the one posted by exobyte in the forums here:
 # http://forum.openwrt.org/viewtopic.php?id=14040
 #
-# extended and partial rewritten in August 2014 
+# extended and partial rewritten in August 2014
 # by Christian Schoenebeck <christian dot schoenebeck at gmail dot com>
 # to support:
 # - IPv6 DDNS services
@@ -14,9 +14,9 @@
 # - Proxy Server to send out updates or retrieving WEB based IP detection
 # - force_interval=0 to run once (usefull for cron jobs etc.)
 # - the usage of BIND's host instead of BusyBox's nslookup if installed (DNS via TCP)
-# - extended Verbose Mode and log file support for better error detection 
+# - extended Verbose Mode and log file support for better error detection
 #
-# function __timeout
+# function timeout
 # copied from http://www.ict.griffith.edu.au/anthony/software/timeout.sh
 # @author Anthony Thyssen  6 April 2011
 #
 # GLOBAL VARIABLES #
 SECTION_ID=""          # hold config's section name
 VERBOSE_MODE=1         # default mode is log to console, but easily changed with parameter
-LUCI_HELPER=""         # set by dynamic_dns_lucihelper.sh, if filled supress all error logging
 
-PIDFILE=""             # pid file
-UPDFILE=""             # store UPTIME of last update
-
-# directory to store run information to. 
+# directory to store run information to.
 RUNDIR=$(uci -q get ddns.global.run_dir) || RUNDIR="/var/run/ddns"
 # NEW # directory to store log files
 LOGDIR=$(uci -q get ddns.global.log_dir) || LOGDIR="/var/log/ddns"
 LOGFILE=""             # NEW # logfile can be enabled as new option
+PIDFILE=""             # pid file
+UPDFILE=""             # store UPTIME of last update
+DATFILE="/tmp/ddns_$$.dat"     # save stdout data of WGet and other extern programs called
+ERRFILE="/tmp/ddns_$$.err"     # save stderr output of WGet and other extern programs called
+
 # number of lines to before rotate logfile
 LOGLINES=$(uci -q get ddns.global.log_lines) || LOGLINES=250
+LOGLINES=$((LOGLINES + 1))     # correct sed handling
 
 CHECK_SECONDS=0                # calculated seconds out of given
 FORCE_SECONDS=0                # interval and unit
 RETRY_SECONDS=0                # in configuration
 
-OLD_PID=0              # Holds the PID of already running process for the same config section
-
 LAST_TIME=0            # holds the uptime of last successful update
 CURR_TIME=0            # holds the current uptime
 NEXT_TIME=0            # calculated time for next FORCED update
@@ -58,12 +58,13 @@ EPOCH_TIME=0                # seconds since 1.1.1970 00:00:00
 REGISTERED_IP=""       # holds the IP read from DNS
 LOCAL_IP=""            # holds the local IP read from the box
 
+URL_USER=""            # url encoded $username from config file
+URL_PASS=""            # url encoded $password from config file
+
 ERR_LAST=0             # used to save $? return code of program and function calls
-ERR_LOCAL_IP=0         # error counter on getting local ip
-ERR_REG_IP=0           # error counter on getting DNS registered ip
-ERR_SEND=0             # error counter on sending update to DNS provider
 ERR_UPDATE=0           # error counter on different local and registered ip
-ERR_VERIFY=0           # error counter verifying proxy- and dns-servers
+
+PID_SLEEP=0            # ProcessID of current background "sleep"
 
 # format to show date information in log and luci-app-ddns default ISO 8601 format
 DATE_FORMAT=$(uci -q get ddns.global.date_format) || DATE_FORMAT="%F %R"
@@ -75,6 +76,9 @@ IPV4_REGEX="[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}"
 # IPv6       ( ( 0-9a-f  1-4char ":") min 1x) ( ( 0-9a-f  1-4char   )optional) ( (":" 0-9a-f 1-4char  ) min 1x)
 IPV6_REGEX="\(\([0-9A-Fa-f]\{1,4\}:\)\{1,\}\)\(\([0-9A-Fa-f]\{1,4\}\)\{0,1\}\)\(\(:[0-9A-Fa-f]\{1,4\}\)\{1,\}\)"
 
+# detect if called by dynamic_dns_lucihelper.sh script, disable retrys (empty variable == false)
+[ "$(basename $0)" = "dynamic_dns_lucihelper.sh" ] && LUCI_HELPER="TRUE" || LUCI_HELPER=""
+
 # loads all options for a given package and section
 # also, sets all_option_variables to a list of the variable names
 # $1 = ddns, $2 = SECTION_ID
@@ -102,7 +106,7 @@ load_all_config_options()
        }
 
        config_load "$__PKGNAME"
-       
+
        # Given SECTION_ID not found so no data, so return 1
        [ -z "$__ALL_OPTION_VARIABLES" ] && return 1
 
@@ -113,9 +117,26 @@ load_all_config_options()
        return 0
 }
 
+# read's all service sections from ddns config
+# $1 = Name of variable to store
+load_all_service_sections() {
+       local __DATA=""
+       config_cb()
+       {
+               # only look for section type "service", ignore everything else
+               [ "$1" = "service" ] && __DATA="$__DATA $2"
+       }
+       config_load "ddns"
+
+       eval "$1=\"$__DATA\""
+       return
+}
+
 # starts updater script for all given sections or only for the one given
 # $1 = interface (Optional: when given only scripts are started
 # configured for that interface)
+# used by /etc/hotplug.d/iface/25-ddns on IFUP
+# and by /etc/init.d/ddns start
 start_daemon_for_all_ddns_sections()
 {
        local __EVENTIF="$1"
@@ -123,59 +144,102 @@ start_daemon_for_all_ddns_sections()
        local __SECTIONID=""
        local __IFACE=""
 
-       config_cb()
-       {
-               # only look for section type "service", ignore everything else
-               [ "$1" = "service" ] && __SECTIONS="$__SECTIONS $2"
+       load_all_service_sections __SECTIONS
+       for __SECTIONID in $__SECTIONS; do
+               config_get __IFACE "$__SECTIONID" interface "wan"
+               [ -z "$__EVENTIF" -o "$__IFACE" = "$__EVENTIF" ] || continue
+               /usr/lib/ddns/dynamic_dns_updater.sh $__SECTIONID 0 >/dev/null 2>&1 &
+       done
+}
+
+# stop sections process incl. childs (sleeps)
+# $1 = section
+stop_section_processes() {
+       local __PID=0
+       local __PIDFILE="$RUNDIR/$1.pid"
+       [ $# -ne 1 ] && write_log 12 "Error calling 'stop_section_processes()' - wrong number of parameters"
+
+       [ -e "$__PIDFILE" ] && {
+               __PID=$(cat $__PIDFILE)
+               ps | grep "^[\t ]*$__PID" >/dev/null 2>&1 && kill $__PID || __PID=0     # terminate it
        }
-       config_load "ddns"
+       [ $__PID -eq 0 ] # report if process was running
+}
 
-       for __SECTIONID in $__SECTIONS
-       do
+# stop updater script for all defines sections or only for one given
+# $1 = interface (optional)
+# used by /etc/hotplug.d/iface/25-ddns on 'ifdown'
+# and by /etc/init.d/ddns stop
+# needed because we also need to kill "sleep" child processes
+stop_daemon_for_all_ddns_sections() {
+       local __EVENTIF="$1"
+       local __SECTIONS=""
+       local __SECTIONID=""
+       local __IFACE=""
+
+       load_all_service_sections __SECTIONS
+       for __SECTIONID in $__SECTIONS; do
                config_get __IFACE "$__SECTIONID" interface "wan"
                [ -z "$__EVENTIF" -o "$__IFACE" = "$__EVENTIF" ] || continue
-               /usr/lib/ddns/dynamic_dns_updater.sh $__SECTIONID 0 > /dev/null 2>&1 &
+               stop_section_processes "$__SECTIONID"
        done
 }
 
-verbose_echo()
-{
-       [ -n "$LUCI_HELPER" ] && return # nothing to report when used by LuCI helper script
-       [ $VERBOSE_MODE -gt 0 ] && echo -e " $*"
-       if [ ${use_logfile:-0} -eq 1 -o $VERBOSE_MODE -gt 1 ]; then
+# reports to console, logfile, syslog
+# $1   loglevel 7 == Debug to 0 == EMERG
+#      value +10 will exit the scripts
+# $2..n        text to report
+write_log() {
+       local __LEVEL __EXIT __CMD __MSG
+       local __TIME=$(date +%H%M%S)
+       [ $1 -ge 10 ] && {
+               __LEVEL=$(($1-10))
+               __EXIT=1
+       } || {
+               __LEVEL=$1
+               __EXIT=0
+       }
+       shift   # remove loglevel
+       [ $__EXIT -eq 0 ] && __MSG="$*" || __MSG="$* - TERMINATE"
+       case $__LEVEL in                # create log message and command depending on loglevel
+               0)      __CMD="logger -p user.emerg -t ddns-scripts[$$] $SECTION_ID: $__MSG"
+                       __MSG=" $__TIME EMERG : $__MSG" ;;
+               1)      __CMD="logger -p user.alert -t ddns-scripts[$$] $SECTION_ID: $__MSG"
+                       __MSG=" $__TIME ALERT : $__MSG" ;;
+               2)      __CMD="logger -p user.crit -t ddns-scripts[$$] $SECTION_ID: $__MSG"
+                       __MSG=" $__TIME  CRIT : $__MSG" ;;
+               3)      __CMD="logger -p user.err -t ddns-scripts[$$] $SECTION_ID: $__MSG"
+                       __MSG=" $__TIME ERROR : $__MSG" ;;
+               4)      __CMD="logger -p user.warn -t ddns-scripts[$$] $SECTION_ID: $__MSG"
+                       __MSG=" $__TIME  WARN : $__MSG" ;;
+               5)      __CMD="logger -p user.notice -t ddns-scripts[$$] $SECTION_ID: $__MSG"
+                       __MSG=" $__TIME  note : $__MSG" ;;
+               6)      __CMD="logger -p user.info -t ddns-scripts[$$] $SECTION_ID: $__MSG"
+                       __MSG=" $__TIME  info : $__MSG" ;;
+               7)      __MSG=" $__TIME       : $__MSG";;
+               *)      return;;
+       esac
+
+       # verbose echo
+       [ $VERBOSE_MODE -gt 0 -o $__EXIT -gt 0 ] && echo -e "$__MSG"
+       # write to logfile
+       if [ ${use_logfile:-1} -eq 1 -o $VERBOSE_MODE -gt 1 ]; then
                [ -d $LOGDIR ] || mkdir -p -m 755 $LOGDIR
-               echo -e " $*" >> $LOGFILE
+               echo -e "$__MSG" >> $LOGFILE
                # VERBOSE_MODE > 1 then NO loop so NO truncate log to $LOGLINES lines
                [ $VERBOSE_MODE -gt 1 ] || sed -i -e :a -e '$q;N;'$LOGLINES',$D;ba' $LOGFILE
        fi
+       [ $LUCI_HELPER ]   && return    # nothing else todo when running LuCI helper script
+       [ $__LEVEL -eq 7 ] && return    # no syslog for debug messages
+       [ $__EXIT  -eq 1 ] && {
+               $__CMD          # force syslog before exit
+               exit 1
+       }
+       [ $use_syslog -eq 0 ] && return
+       [ $((use_syslog + __LEVEL)) -le 7 ] && $__CMD
        return
 }
 
-syslog_info(){
-       [ $use_syslog -eq 1 ] && logger -p user.info -t ddns-scripts[$$] "$SECTION_ID: $*"
-       return
-}
-syslog_notice(){
-       [ $use_syslog -ge 1 -a $use_syslog -le 2 ] && logger -p user.notice -t ddns-scripts[$$] "$SECTION_ID: $*"
-       return
-}
-syslog_warn(){
-       [ $use_syslog -ge 1 -a $use_syslog -le 3 ] && logger -p user.warn -t ddns-scripts[$$] "$SECTION_ID: $*"
-       return
-}
-syslog_err(){
-       [ $use_syslog -ge 1 ] && logger -p user.err -t ddns-scripts[$$] "$SECTION_ID: $*"
-       return
-}
-
-critical_error() {
-       [ -n "$LUCI_HELPER" ] && return # nothing to report when used by LuCI helper script
-       verbose_echo "\n CRITICAL ERROR =: $* - EXITING\n"
-       [ $VERBOSE_MODE -eq 0 ] && echo -e "\n$SECTION_ID: CRITICAL ERROR - $* - EXITING\n"
-       logger -t ddns-scripts[$$] -p user.crit "$SECTION_ID: CRITICAL ERROR - $* - EXITING"
-       exit 1          # critical error -> leave here
-}
-
 # replace all special chars to their %hex value
 # used for USERNAME and PASSWORD in update_url
 # unchanged: "-"(minus) "_"(underscore) "."(dot) "~"(tilde)
@@ -183,13 +247,15 @@ critical_error() {
 #            "$"(Dollar)                               # because used as variable output
 # tested with the following string stored via Luci Application as password / username
 # A B!"#AA$1BB%&'()*+,-./:;<=>?@[\]^_`{|}~     without problems at Dollar or quotes
-__urlencode() {
+urlencode() {
        # $1    Name of Variable to store encoded string to
        # $2    string to encode
        local __STR __LEN __CHAR __OUT
        local __ENC=""
        local __POS=1
 
+       [ $# -ne 2 ] && write_log 12 "Error calling 'urlencode()' - wrong number of parameters"
+
        __STR="$2"              # read string to encode
        __LEN=${#__STR}         # get string length
 
@@ -211,21 +277,22 @@ __urlencode() {
                __POS=$(( $__POS + 1 ))         # increment position
        done
 
-       eval "$1='$__ENC'"      # transfer back to variable
+       eval "$1=\"$__ENC\""    # transfer back to variable
        return 0
 }
 
 # extract url or script for given DDNS Provider from
 # file /usr/lib/ddns/services for IPv4 or from
 # file /usr/lib/ddns/services_ipv6 for IPv6
+# $1   Name of Variable to store url to
+# $2   Name of Variable to store script to
 get_service_data() {
-       # $1    Name of Variable to store url to
-       # $2    Name of Variable to store script to
        local __LINE __FILE __NAME __URL __SERVICES __DATA
        local __SCRIPT=""
        local __OLD_IFS=$IFS
        local __NEWLINE_IFS='
 ' #__NEWLINE_IFS
+       [ $# -ne 2 ] && write_log 12 "Error calling 'get_service_data()' - wrong number of parameters"
 
        __FILE="/usr/lib/ddns/services"                                 # IPv4
        [ $use_ipv6 -ne 0 ] && __FILE="/usr/lib/ddns/services_ipv6"     # IPv6
@@ -250,16 +317,18 @@ get_service_data() {
        # check is URL or SCRIPT is given
        __URL=$(echo "$__DATA" | grep "^http:")
        [ -z "$__URL" ] && __SCRIPT="/usr/lib/ddns/$__DATA"
-       
-       eval "$1='$__URL'"
-       eval "$2='$__SCRIPT'"
+
+       eval "$1=\"$__URL\""
+       eval "$2=\"$__SCRIPT\""
        return 0
 }
 
+# Calculate seconds from interval and unit
+# $1   Name of Variable to store result in
+# $2   Number and
+# $3   Unit of time interval
 get_seconds() {
-       # $1    Name of Variable to store result in
-       # $2    Number and
-       # $3    Unit of time interval
+       [ $# -ne 3 ] && write_log 12 "Error calling 'get_seconds()' - wrong number of parameters"
        case "$3" in
                "days" )        eval "$1=$(( $2 * 86400 ))";;
                "hours" )       eval "$1=$(( $2 * 3600 ))";;
@@ -269,7 +338,7 @@ get_seconds() {
        return 0
 }
 
-__timeout() {
+timeout() {
        # copied from http://www.ict.griffith.edu.au/anthony/software/timeout.sh
        # only did the folloing changes
        #       - commented out "#!/bin/bash" and usage section
@@ -314,7 +383,7 @@ __timeout() {
 
        SIG=-TERM
 
-       while [  $# -gt 0 ]; do
+       while [ $# -gt 0 ]; do
                case "$1" in
                        --)
                                # forced end of user options
@@ -368,104 +437,130 @@ __timeout() {
        return $status
 }
 
-__verify_host_port() {
-       # $1    Host/IP to verify
-       # $2    Port to verify
+#verify given host and port is connectable
+# $1   Host/IP to verify
+# $2   Port to verify
+verify_host_port() {
        local __HOST=$1
        local __PORT=$2
-       local __TMP __IP __IPV4 __IPV6 __RUNPROG __ERRPROG __ERR
+       local __IP __IPV4 __IPV6 __RUNPROG __ERR
        # return codes
        # 1     system specific error
        # 2     nslookup error
        # 3     nc (netcat) error
        # 4     unmatched IP version
 
-       __RUNPROG="nslookup $__HOST 2>/dev/null"
-       __ERRPROG="nslookup $__HOST 2>&1"
-       verbose_echo " resolver prog =: '$__RUNPROG'"
-       __TMP=$(eval $__RUNPROG)        # test if nslookup runs without errors
+       [ $# -ne 2 ] && write_log 12 "Error calling 'verify_host_port()' - wrong number of parameters"
+
+       __RUNPROG="/usr/bin/nslookup $__HOST >$DATFILE 2>$ERRFILE"
+       write_log 7 "#> $__RUNPROG"
+       eval $__RUNPROG
        __ERR=$?
        # command error
        [ $__ERR -gt 0 ] && {
-               verbose_echo "\n!!!!!!!!! ERROR =: BusyBox nslookup Error '$__ERR'\n$(eval $__ERRPROG)\n"
-               syslog_err "DNS Resolver Error - BusyBox nslookup Error '$__ERR'"
+               write_log 3 "DNS Resolver Error - BusyBox nslookup Error '$__ERR'"
+               write_log 7 "Error:\n$(cat $ERRFILE)"
                return 2
-       } || {
-               # we need to run twice because multi-line output needs to be directly piped to grep because
-               # pipe returns return code of last prog in pipe but we need errors from nslookup command
-               __IPV4=$(eval $__RUNPROG | sed -ne "3,\$ { s/^Address [0-9]*: \($IPV4_REGEX\).*$/\\1/p }")
-               __IPV6=$(eval $__RUNPROG | sed -ne "3,\$ { s/^Address [0-9]*: \($IPv6_REGEX\).*$/\\1/p }")
        }
+       # extract IP address
+       __IPV4=$(cat $DATFILE | sed -ne "3,\$ { s/^Address [0-9]*: \($IPV4_REGEX\).*$/\\1/p }")
+       __IPV6=$(cat $DATFILE | sed -ne "3,\$ { s/^Address [0-9]*: \($IPV6_REGEX\).*$/\\1/p }")
 
        # check IP version if forced
        if [ $force_ipversion -ne 0 ]; then
                __ERR=0
                [ $use_ipv6 -eq 0 -a -z "$__IPV4" ] && __ERR=4
                [ $use_ipv6 -eq 1 -a -z "$__IPV6" ] && __ERR=6
-               [ $__ERR -gt 0 ] && critical_error "Invalid host: Error '4' - Force IP Version IPv$__ERR not supported"
+               [ $__ERR -gt 0 ] && {
+                       [ $LUCI_HELPER ] && return 4
+                       write_log 14 "Verify host Error '4' - Forced IP Version IPv$__ERR don't match"
+               }
        fi
 
        # verify nc command
        # busybox nc compiled without -l option "NO OPT l!" -> critical error
-       nc --help 2>&1 | grep -iq "NO OPT l!" && \
-               critical_error "Busybox nc: netcat compiled without -l option, error 'NO OPT l!'"
+       /usr/bin/nc --help 2>&1 | grep -i "NO OPT l!" >/dev/null 2>&1 && \
+               write_log 12 "Busybox nc (netcat) compiled without '-l' option, error 'NO OPT l!'"
        # busybox nc compiled with extensions
-       nc --help 2>&1 | grep -q "\-w" && __NCEXT="TRUE"
+       /usr/bin/nc --help 2>&1 | grep "\-w" >/dev/null 2>&1 && __NCEXT="TRUE"
 
        # connectivity test
        # run busybox nc to HOST PORT
        # busybox might be compiled with "FEATURE_PREFER_IPV4_ADDRESS=n"
-       # then nc will try to connect via IPv6 if there is an IPv6 availible for host
-       # not worring if there is an IPv6 wan address
-       # so if not "forced_ipversion" to use ipv6 then connect test via ipv4 if availible
-       [ $force_ipversion -ne 0 -a $use_ipv6 -ne 0 -o -z "$__IPV4" ] && {
-               # force IPv6
-               __IP=$__IPV6
-       } || __IP=$__IPV4
-
-       if [ -n "$__NCEXT" ]; then      # nc compiled with extensions (timeout support)
-               __RUNPROG="nc -w 1 $__IP $__PORT </dev/null >/dev/null 2>&1"
-               __ERRPROG="nc -vw 1 $__IP $__PORT </dev/null 2>&1"
-               verbose_echo "  connect prog =: '$__RUNPROG'"
+       # then nc will try to connect via IPv6 if there is any IPv6 availible on any host interface
+       # not worring, if there is an IPv6 wan address
+       # so if not "force_ipversion" to use_ipv6 then connect test via ipv4, if availible
+       [ $force_ipversion -ne 0 -a $use_ipv6 -ne 0 -o -z "$__IPV4" ] && __IP=$__IPV6 || __IP=$__IPV4
+
+       if [ -n "$__NCEXT" ]; then      # BusyBox nc compiled with extensions (timeout support)
+               __RUNPROG="/usr/bin/nc -vw 1 $__IP $__PORT </dev/null >$DATFILE 2>$ERRFILE"
+               write_log 7 "#> $__RUNPROG"
                eval $__RUNPROG
                __ERR=$?
                [ $__ERR -eq 0 ] && return 0
-               verbose_echo "\n!!!!!!!!! ERROR =: BusyBox nc Error '$__ERR'\n$(eval $__ERRPROG)\n"
-               syslog_err "host verify Error - BusyBox nc Error '$__ERR'"
+               write_log 3 "Connect error - BusyBox nc (netcat) Error '$__ERR'"
+               write_log 7 "Error:\n$(cat $ERRFILE)"
                return 3
        else            # nc compiled without extensions (no timeout support)
-               __RUNPROG="__timeout 2 -- nc $__IP $__PORT </dev/null >/dev/null 2>&1"
-               verbose_echo "  connect prog =: '$__RUNPROG'"
+               __RUNPROG="timeout 2 -- /usr/bin/nc $__IP $__PORT </dev/null >$DATFILE 2>$ERRFILE"
+               write_log 7 "#> $__RUNPROG"
                eval $__RUNPROG
                __ERR=$?
                [ $__ERR -eq 0 ] && return 0
-               verbose_echo "\n!!!!!!!!! ERROR =: BusyBox nc Error '$__ERR' (timeout)"
-               syslog_err "host verify Error - BusyBox nc Error '$__ERR' (timeout)"
+               write_log 3 "Connect error - BusyBox nc (netcat) timeout Error '$__ERR'"
                return 3
        fi
 }
 
+# verfiy given DNS server if connectable
+# $1   DNS server to verify
 verify_dns() {
-       # $1    DNS server to verify
-       # we need DNS server to verify otherwise exit with ERROR 1
-       [ -z "$1" ] && return 1
+       local __ERR=255 # last error buffer
+       local __CNT=0   # error counter
+
+       [ $# -ne 1 ] && write_log 12 "Error calling 'verify_dns()' - wrong number of parameters"
+       write_log 7 "Verify DNS server '$1'"
 
-       # DNS uses port 53
-       __verify_host_port "$1" "53"
+       while [ $__ERR -ne 0 ]; do
+               # DNS uses port 53
+               verify_host_port "$1" "53"
+               __ERR=$?
+               if [ $LUCI_HELPER ]; then       # no retry if called by LuCI helper script
+                       return $__ERR
+               elif [ $__ERR -ne 0 -a $VERBOSE_MODE -gt 1 ]; then      # VERBOSE_MODE > 1 then NO retry
+                       write_log 4 "Verify DNS server '$1' failed - Verbose Mode: $VERBOSE_MODE - NO retry on error"
+                       return $__ERR
+               elif [ $__ERR -ne 0 ]; then
+                       __CNT=$(( $__CNT + 1 )) # increment error counter
+                       # if error count > retry_count leave here
+                       [ $__CNT -gt $retry_count ] && \
+                               write_log 14 "Verify DNS server '$1' failed after $retry_count retries"
+
+                       write_log 4 "Verify DNS server '$1' failed - retry $__CNT/$retry_count in $RETRY_SECONDS seconds"
+                       sleep $RETRY_SECONDS &
+                       PID_SLEEP=$!
+                       wait $PID_SLEEP # enable trap-handler
+                       PID_SLEEP=0
+               fi
+       done
+       return 0
 }
 
+# analyse and verfiy given proxy string
+# $1   Proxy-String to verify
 verify_proxy() {
-       # $1    Proxy-String to verify
-       #               complete entry          user:password@host:port
-       #                                       inside user and password NO '@' of ":" allowed 
-       #               host and port only      host:port
-       #               host only               host            ERROR unsupported
-       #               IPv4 address instead of host    123.234.234.123
-       #               IPv6 address instead of host    [xxxx:....:xxxx]        in square bracket
+       #       complete entry          user:password@host:port
+       #                               inside user and password NO '@' of ":" allowed
+       #       host and port only      host:port
+       #       host only               host            ERROR unsupported
+       #       IPv4 address instead of host    123.234.234.123
+       #       IPv6 address instead of host    [xxxx:....:xxxx]        in square bracket
        local __TMP __HOST __PORT
+       local __ERR=255 # last error buffer
+       local __CNT=0   # error counter
 
-       # we need Proxy-Sting to verify otherwise exit with ERROR 1
-       [ -z "$1" ] && return 1
+       [ $# -ne 1 ] && write_log 12 "Error calling 'verify_proxy()' - wrong number of parameters"
+       write_log 7 "Verify Proxy server 'http://$1'"
 
        # try to split user:password "@" host:port
        __TMP=$(echo $1 | awk -F "@" '{print $2}')
@@ -481,24 +576,50 @@ verify_proxy() {
                __HOST=$(echo $__TMP | awk -F ":" '{print $1}')
                __PORT=$(echo $__TMP | awk -F ":" '{print $2}')
        fi
-       # No Port detected
-       [ -z "$__PORT" ] && critical_error "Invalid Proxy server Error '5' - proxy port missing"
+       # No Port detected - EXITING
+       [ -z "$__PORT" ] && {
+               [ $LUCI_HELPER ] && return 5
+               write_log 14 "Invalid Proxy server Error '5' - proxy port missing"
+       }
 
-       __verify_host_port "$__HOST" "$__PORT"
+       while [ $__ERR -gt 0 ]; do
+               verify_host_port "$__HOST" "$__PORT"
+               __ERR=$?
+               if [ $LUCI_HELPER ]; then       # no retry if called by LuCI helper script
+                       return $__ERR
+               elif [ $__ERR -gt 0 -a $VERBOSE_MODE -gt 1 ]; then      # VERBOSE_MODE > 1 then NO retry
+                       write_log 4 "Verify Proxy server '$1' failed - Verbose Mode: $VERBOSE_MODE - NO retry on error"
+                       return $__ERR
+               elif [ $__ERR -gt 0 ]; then
+                       __CNT=$(( $__CNT + 1 )) # increment error counter
+                       # if error count > retry_count leave here
+                       [ $__CNT -gt $retry_count ] && \
+                               write_log 14 "Verify Proxy server '$1' failed after $retry_count retries"
+
+                       write_log 4 "Verify Proxy server '$1' failed - retry $__CNT/$retry_count in $RETRY_SECONDS seconds"
+                       sleep $RETRY_SECONDS &
+                       PID_SLEEP=$!
+                       wait $PID_SLEEP # enable trap-handler
+                       PID_SLEEP=0
+               fi
+       done
+       return 0
 }
 
-__do_transfer() {
-       # $1    # Variable to store Answer of transfer
-       # $2    # URL to use
-       local __URL="$2"
+do_transfer() {
+       # $1    # URL to use
+       local __URL="$1"
        local __ERR=0
-       local __PROG  __RUNPROG  __ERRPROG  __DATA
+       local __CNT=0   # error counter
+       local __PROG  __RUNPROG
+
+       [ $# -ne 1 ] && write_log 12 "Error in 'do_transfer()' - wrong number of parameters"
 
        # lets prefer GNU Wget because it does all for us - IPv4/IPv6/HTTPS/PROXY/force IP version
-       if /usr/bin/wget --version 2>&1 | grep -q "\+ssl"; then
-               __PROG="/usr/bin/wget -t 2 -O -"        # standard output only 2 retrys on error
+       if /usr/bin/wget --version 2>&1 | grep "\+ssl" >/dev/null 2>&1 ; then
+               __PROG="/usr/bin/wget -nv -t 1 -O $DATFILE -o $ERRFILE" # non_verbose no_retry outfile errfile
                # force ip version to use
-               if [ $force_ipversion -eq 1 ]; then     
+               if [ $force_ipversion -eq 1 ]; then
                        [ $use_ipv6 -eq 0 ] && __PROG="$__PROG -4" || __PROG="$__PROG -6"       # force IPv4/IPv6
                fi
                # set certificate parameters
@@ -510,29 +631,21 @@ __do_transfer() {
                        elif [ -d "$cacert" ]; then
                                __PROG="$__PROG --ca-directory=${cacert}"
                        else    # exit here because it makes no sense to start loop
-                               critical_error "Wget: No valid certificate(s) found for running HTTPS"
+                               write_log 14 "No valid certificate(s) found at '$cacert' for HTTPS communication"
                        fi
                fi
                # disable proxy if no set (there might be .wgetrc or .curlrc or wrong environment set)
                [ -z "$proxy" ] && __PROG="$__PROG --no-proxy"
 
-               __RUNPROG="$__PROG -q '$__URL' 2>/dev/null"     # do transfer with "-q" to suppress not needed output
-               __ERRPROG="$__PROG -d '$__URL' 2>&1"            # do transfer with "-d" for debug mode
-               verbose_echo " transfer prog =: $__RUNPROG"
-               __DATA=$(eval $__RUNPROG)
-               __ERR=$?
-               [ $__ERR -gt 0 ] && {
-                       verbose_echo "\n!!!!!!!!! ERROR =: GNU Wget Error '$__ERR'\n$(eval $__ERRPROG)\n"
-                       syslog_err "Communication Error - GNU Wget Error: '$__ERR'"
-                       return 1
-               }
+               __RUNPROG="$__PROG $__URL"      # build final command
+               __PROG="GNU Wget"               # reuse for error logging
 
        # 2nd choice is cURL IPv4/IPv6/HTTPS
        # libcurl might be compiled without Proxy Support (default in trunk)
        elif [ -x /usr/bin/curl ]; then
-               __PROG="/usr/bin/curl"
+               __PROG="/usr/bin/curl -sS -o $DATFILE --stderr $ERRFILE"
                # force ip version to use
-               if [ $force_ipversion -eq 1 ]; then     
+               if [ $force_ipversion -eq 1 ]; then
                        [ $use_ipv6 -eq 0 ] && __PROG="$__PROG -4" || __PROG="$__PROG -6"       # force IPv4/IPv6
                fi
                # set certificate parameters
@@ -544,7 +657,7 @@ __do_transfer() {
                        elif [ -d "$cacert" ]; then
                                __PROG="$__PROG --capath $cacert"
                        else    # exit here because it makes no sense to start loop
-                               critical_error "cURL: No valid certificate(s) found for running HTTPS"
+                               write_log 14 "No valid certificate(s) found at '$cacert' for HTTPS communication"
                        fi
                fi
                # disable proxy if no set (there might be .wgetrc or .curlrc or wrong environment set)
@@ -554,221 +667,332 @@ __do_transfer() {
                else
                        # if libcurl has no proxy support and proxy should be used then force ERROR
                        # libcurl currently no proxy support by default
-                       grep -iq all_proxy /usr/lib/libcurl.so* || \
-                               critical_error "cURL: libcurl compiled without Proxy support"
+                       grep -i "all_proxy" /usr/lib/libcurl.so* >/dev/null 2>&1 || \
+                               write_log 13 "cURL: libcurl compiled without Proxy support"
                fi
 
-               __RUNPROG="$__PROG -q '$__URL' 2>/dev/null"     # do transfer with "-s" to suppress not needed output
-               __ERRPROG="$__PROG -v '$__URL' 2>&1"            # do transfer with "-v" for verbose mode
-               verbose_echo " transfer prog =: $__RUNPROG"
-               __DATA=$(eval $__RUNPROG)
-               __ERR=$?
-               [ $__ERR -gt 0 ] && {
-                       verbose_echo "\n!!!!!!!!! ERROR =: cURL Error '$__ERR'\n$(eval $__ERRPROG)\n"
-                       syslog_err "Communication Error - cURL Error: '$__ERR'"
-                       return 1
-               }
+               __RUNPROG="$__PROG $__URL"      # build final command
+               __PROG="cURL"                   # reuse for error logging
 
        # busybox Wget (did not support neither IPv6 nor HTTPS)
        elif [ -x /usr/bin/wget ]; then
-               __PROG="/usr/bin/wget -O -"
+               __PROG="/usr/bin/wget -q -O $DATFILE"
                # force ip version not supported
                [ $force_ipversion -eq 1 ] && \
-                       critical_error "BusyBox Wget: can not force IP version to use"
+                       write_log 14 "BusyBox Wget: can not force IP version to use"
                # https not supported
                [ $use_https -eq 1 ] && \
-                       critical_error "BusyBox Wget: no HTTPS support"
+                       write_log 14 "BusyBox Wget: no HTTPS support"
                # disable proxy if no set (there might be .wgetrc or .curlrc or wrong environment set)
                [ -z "$proxy" ] && __PROG="$__PROG -Y off"
-               
-               __RUNPROG="$__PROG -q '$__URL' 2>/dev/null"     # do transfer with "-q" to suppress not needed output
-               __ERRPROG="$__PROG '$__URL' 2>&1"
-               verbose_echo " transfer prog =: $__RUNPROG"
-               __DATA=$(eval $__RUNPROG)
-               __ERR=$?
-               [ $__ERR -gt 0 ] && {
-                       verbose_echo "\n!!!!!!!!! ERROR =: BusyBox Wget Error '$__ERR'\n$(eval $__ERRPROG)\n"
-                       syslog_err "Communication Error - BusyBox Wget Error: '$__ERR'"
-                       return 1
-               }
+
+               __RUNPROG="$__PROG $__URL 2>$ERRFILE"   # build final command
+               __PROG="Busybox Wget"                   # reuse for error logging
 
        else
-               critical_error "Program not found - Neither 'Wget' nor 'cURL' installed or executable"
+               write_log 13 "Neither 'Wget' nor 'cURL' installed or executable"
        fi
 
-       eval "$1='$__DATA'"
-       return 0
+       while : ; do
+               write_log 7 "#> $__RUNPROG"
+               $__RUNPROG                      # DO transfer
+               __ERR=$?                        # save error code
+               [ $__ERR -eq 0 ] && return 0    # no error leave
+               [ $LUCI_HELPER ] && return 1    # no retry if called by LuCI helper script
+
+               write_log 3 "$__PROG Error: '$__ERR'"
+               write_log 7 "$(cat $ERRFILE)"           # report error
+
+               [ $VERBOSE_MODE -gt 1 ] && {
+                       # VERBOSE_MODE > 1 then NO retry
+                       write_log 4 "Transfer failed - Verbose Mode: $VERBOSE_MODE - NO retry on error"
+                       return 1
+               }
+
+               __CNT=$(( $__CNT + 1 )) # increment error counter
+               # if error count > retry_count leave here
+               [ $__CNT -gt $retry_count ] && \
+                       write_log 14 "Transfer failed after $retry_count retries"
+
+               write_log 4 "Transfer failed - retry $__CNT/$retry_count in $RETRY_SECONDS seconds"
+               sleep $RETRY_SECONDS &
+               PID_SLEEP=$!
+               wait $PID_SLEEP # enable trap-handler
+               PID_SLEEP=0
+       done
+       # we should never come here there must be a programming error
+       write_log 12 "Error in 'do_transfer()' - program coding error"
 }
 
 send_update() {
        # $1    # IP to set at DDNS service provider
        local __IP
 
+       [ $# -ne 1 ] && write_log 12 "Error calling 'send_update()' - wrong number of parameters"
+
        # verify given IP / no private IPv4's / no IPv6 addr starting with fxxx of with ":"
        [ $use_ipv6 -eq 0 ] && __IP=$(echo $1 | grep -v -E "(^0|^10\.|^127|^172\.1[6-9]\.|^172\.2[0-9]\.|^172\.3[0-1]\.|^192\.168)")
        [ $use_ipv6 -eq 1 ] && __IP=$(echo $1 | grep "^[0-9a-eA-E]")
-       [ -z "$__IP" ] && critical_error "Private or invalid or no IP '$1' given"
+       [ -z "$__IP" ] && write_log 4 "Private or invalid or no IP '$1' given"
 
        if [ -n "$update_script" ]; then
-               verbose_echo "        update =: parsing script '$update_script'"
+               write_log 7 "parsing script '$update_script'"
                . $update_script
        else
-               local __URL __ANSWER __ERR __USER __PASS
+               local __URL __ERR
 
                # do replaces in URL
-               __urlencode __USER "$username"  # encode username, might be email or something like this
-               __urlencode __PASS "$password"  # encode password, might have special chars for security reason
-               __URL=$(echo $update_url | sed -e "s#\[USERNAME\]#$__USER#g" -e "s#\[PASSWORD\]#$__PASS#g" \
+               __URL=$(echo $update_url | sed -e "s#\[USERNAME\]#$URL_USER#g" -e "s#\[PASSWORD\]#$URL_PASS#g" \
                                               -e "s#\[DOMAIN\]#$domain#g" -e "s#\[IP\]#$__IP#g")
                [ $use_https -ne 0 ] && __URL=$(echo $__URL | sed -e 's#^http:#https:#')
 
-               __do_transfer __ANSWER "$__URL"
-               __ERR=$?
-               [ $__ERR -gt 0 ] && {
-                       verbose_echo "\n!!!!!!!!! ERROR =: Error sending update to DDNS Provider\n"
-                       return 1
-               }
-               verbose_echo "   update send =: DDNS Provider answered\n$__ANSWER"
-               return 0
+               do_transfer "$__URL" || return 1
+
+               write_log 7 "DDNS Provider answered:\n$(cat $DATFILE)"
+
+               # analyse provider answers
+               # "good [IP_ADR]"       = successful
+               # "nochg [IP_ADR]"      = no change but OK
+               grep -E "good|nochg" $DATFILE >/dev/null 2>&1
+               return $?       # "0" if "good" or "nochg" found
        fi
 }
 
 get_local_ip () {
        # $1    Name of Variable to store local IP (LOCAL_IP)
-       local __RUNPROG __IP __URL __ANSWER
-
-       case $ip_source in
-               network )
-                       # set correct program
-                       [ $use_ipv6 -eq 0 ] && __RUNPROG="network_get_ipaddr" \
-                                           || __RUNPROG="network_get_ipaddr6"
-                       $__RUNPROG __IP "$ip_network"
-                       verbose_echo "      local ip =: '$__IP' detected on network '$ip_network'"
-                       ;;
-               interface )
-                       if [ $use_ipv6 -eq 0 ]; then
-                               __IP=$(ifconfig $ip_interface | awk '
-                                       /inet addr:/ {  # Filter IPv4
-                                       #   inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
-                                       $1="";          # remove inet
-                                       $3="";          # remove Bcast: ...
-                                       $4="";          # remove Mask: ...
-                                       FS=":";         # separator ":"
-                                       $0=$0;          # reread to activate separator
-                                       $1="";          # remove addr
-                                       FS=" ";         # set back separator to default " "
-                                       $0=$0;          # reread to activate separator (remove whitespaces)
-                                       print $1;       # print IPv4 addr
-                                       }'
-                               )
-                       else
-                               __IP=$(ifconfig $ip_interface | awk '
-                                       /inet6/ && /: [0-9a-eA-E]/ && !/\/128/ {        # Filter IPv6 exclude fxxx and /128 prefix
-                                       #   inet6 addr: 2001:db8::xxxx:xxxx/32 Scope:Global
-                                       FS="/";         # separator "/"
-                                       $0=$0;          # reread to activate separator
-                                       $2="";          # remove everything behind "/"
-                                       FS=" ";         # set back separator to default " "
-                                       $0=$0;          # reread to activate separator
-                                       print $3;       # print IPv6 addr
-                                       }'
-                               )
-                       fi
-                       verbose_echo "      local ip =: '$__IP' detected on interface '$ip_interface'"
-                       ;;
-               script )
-                       # get ip from script
-                       __IP=$($ip_script)
-                       verbose_echo "      local ip =: '$__IP' detected via script '$ip_script'"
-                       ;;
-               * )
-                       for __URL in $ip_url; do
-                               __do_transfer __ANSWER "$__URL"
-                               [ -n "$__IP" ] && break # Answer detected, leave for loop
-                       done
-                       # use correct regular expression
-                       [ $use_ipv6 -eq 0 ] \
-                               && __IP=$(echo "$__ANSWER" | grep -m 1 -o "$IPV4_REGEX") \
-                               || __IP=$(echo "$__ANSWER" | grep -m 1 -o "$IPV6_REGEX")
-                       verbose_echo "      local ip =: '$__IP' detected via web at '$__URL'"
-                       ;;
-       esac
+       local __CNT=0   # error counter
+       local __RUNPROG __DATA __URL __ERR
+
+       [ $# -ne 1 ] && write_log 12 "Error calling 'get_local_ip()' - wrong number of parameters"
+       write_log 7 "Detect local IP"
+
+       while : ; do
+               case $ip_source in
+                       network)
+                               # set correct program
+                               [ $use_ipv6 -eq 0 ] && __RUNPROG="network_get_ipaddr" \
+                                                   || __RUNPROG="network_get_ipaddr6"
+                               write_log 7 "#> $__RUNPROG __DATA '$ip_network'"
+                               eval "$__RUNPROG __DATA $ip_network" || write_log 3 "$__RUNPROG Error: '$?'"
+                               [ -n "$__DATA" ] && write_log 7 "Local IP '$__DATA' detected on network '$ip_network'"
+                               ;;
+                       interface)
+                               write_log 7 "#> ifconfig $ip_interface >$DATFILE 2>$ERRFILE"
+                               ifconfig $ip_interface >$DATFILE 2>$ERRFILE
+                               __ERR=$?
+                               if [ $__ERR -eq 0 ]; then
+                                       if [ $use_ipv6 -eq 0 ]; then
+                                               __DATA=$(awk '
+                                                       /inet addr:/ {  # Filter IPv4
+                                                       #   inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
+                                                       $1="";          # remove inet
+                                                       $3="";          # remove Bcast: ...
+                                                       $4="";          # remove Mask: ...
+                                                       FS=":";         # separator ":"
+                                                       $0=$0;          # reread to activate separator
+                                                       $1="";          # remove addr
+                                                       FS=" ";         # set back separator to default " "
+                                                       $0=$0;          # reread to activate separator (remove whitespaces)
+                                                       print $1;       # print IPv4 addr
+                                                       }' $DATFILE
+                                               )
+                                       else
+                                               __DATA=$(awk '
+                                                       /inet6/ && /: [0-9a-eA-E]/ && !/\/128/ {        # Filter IPv6 exclude fxxx and /128 prefix
+                                                       #   inet6 addr: 2001:db8::xxxx:xxxx/32 Scope:Global
+                                                       FS="/";         # separator "/"
+                                                       $0=$0;          # reread to activate separator
+                                                       $2="";          # remove everything behind "/"
+                                                       FS=" ";         # set back separator to default " "
+                                                       $0=$0;          # reread to activate separator
+                                                       print $3;       # print IPv6 addr
+                                                       }' $DATFILE
+                                               )
+                                       fi
+                                       [ -n "$__DATA" ] && write_log 7 "Local IP '$__DATA' detected on interface '$ip_interface'"
+                               else
+                                       write_log 3 "ifconfig Error: '$__ERR'"
+                                       write_log 7 "$(cat $ERRFILE)"           # report error
+                               fi
+                               ;;
+                       script)
+                               write_log 7 "#> $ip_script >$DATFILE 2>$ERRFILE"
+                               eval $ip_script >$DATFILE 2>$ERRFILE
+                               __ERR=$?
+                               if [ $__ERR -eq 0 ]; then
+                                       __DATA=$(cat $DATFILE)
+                                       [ -n "$__DATA" ] && write_log 7 "Local IP '$__DATA' detected via script '$ip_script'"
+                               else
+                                       write_log 3 "$ip_script Error: '$__ERR'"
+                                       write_log 7 "$(cat $ERRFILE)"           # report error
+                               fi
+                               ;;
+                       web)
+                               do_transfer "$ip_url"
+                               # use correct regular expression
+                               [ $use_ipv6 -eq 0 ] \
+                                       && __DATA=$(grep -m 1 -o "$IPV4_REGEX" $DATFILE) \
+                                       || __DATA=$(grep -m 1 -o "$IPV6_REGEX" $DATFILE)
+                               [ -n "$__DATA" ] && write_log 7 "Local IP '$__DATA' detected on web at '$__URL'"
+                               ;;
+                       *)
+                               write_log 12 "Error in 'get_local_ip()' - unhandled ip_source '$ip_source'"
+                               ;;
+               esac
+               # valid data found return here
+               [ -n "$__DATA" ] && {
+                       eval "$1=\"$__DATA\""
+                       return 0
+               }
 
-       # if NO IP was found
-       [ -z "$__IP" ] && return 1
+               [ $LUCI_HELPER ] && return 1    # no retry if called by LuCI helper script
+               [ $VERBOSE_MODE -gt 1 ] && {
+                       # VERBOSE_MODE > 1 then NO retry
+                       write_log 4 "Get local IP via '$ip_source' failed - Verbose Mode: $VERBOSE_MODE - NO retry on error"
+                       return 1
+               }
 
-       eval "$1='$__IP'"
-       return 0
+               __CNT=$(( $__CNT + 1 )) # increment error counter
+               # if error count > retry_count leave here
+               [ $__CNT -gt $retry_count ] && \
+                       write_log 14 "Get local IP via '$ip_source' failed after $retry_count retries"
+
+               write_log 4 "Get local IP via '$ip_source' failed - retry $__CNT/$retry_count in $RETRY_SECONDS seconds"
+               sleep $RETRY_SECONDS &
+               PID_SLEEP=$!
+               wait $PID_SLEEP # enable trap-handler
+               PID_SLEEP=0
+       done
+       # we should never come here there must be a programming error
+       write_log 12 "Error in 'get_local_ip()' - program coding error"
 }
 
 get_registered_ip() {
        # $1    Name of Variable to store public IP (REGISTERED_IP)
-       local __IP  __REGEX  __PROG  __RUNPROG  __ERRPROG  __ERR
+       # $2    (optional) if set, do not retry on error
+       local __CNT=0   # error counter
+       local __ERR=255
+       local __REGEX  __PROG  __RUNPROG  __DATA
        # return codes
        # 1     no IP detected
 
+       [ $# -lt 1 -o $# -gt 2 ] && write_log 12 "Error calling 'get_registered_ip()' - wrong number of parameters"
+       write_log 7 "Detect registered/public IP"
+
        # set correct regular expression
        [ $use_ipv6 -eq 0 ] && __REGEX="$IPV4_REGEX" || __REGEX="$IPV6_REGEX"
 
-       if [ -x /usr/bin/host ]; then           # otherwise try to use BIND host
+       if [ -x /usr/bin/host ]; then
                __PROG="/usr/bin/host"
                [ $use_ipv6 -eq 0 ] && __PROG="$__PROG -t A"  || __PROG="$__PROG -t AAAA"
                if [ $force_ipversion -eq 1 ]; then                     # force IP version
                        [ $use_ipv6 -eq 0 ] && __PROG="$__PROG -4"  || __PROG="$__PROG -6"
-               fi                      
+               fi
                [ $force_dnstcp -eq 1 ] && __PROG="$__PROG -T"  # force TCP
 
-               __RUNPROG="$__PROG $domain $dns_server 2>/dev/null"
-               __ERRPROG="$__PROG -v $domain $dns_server 2>&1"
-               verbose_echo " resolver prog =: $__RUNPROG"
-               __IP=$(eval $__RUNPROG)
-               __ERR=$?
-               # command error
-               [ $__ERR -gt 0 ] && {
-                       verbose_echo "\n!!!!!!!!! ERROR =: BIND host Error '$__ERR'\n$(eval $__ERRPROG)\n"
-                       syslog_err "DNS Resolver Error - BIND host Error: '$__ERR'"
-                       return 1
-               } || {
-                       # we need to run twice because multi-line output needs to be directly piped to grep because
-                       # pipe returns return code of last prog in pipe but we need errors from host command
-                       __IP=$(eval $__RUNPROG | awk -F "address " '/has/ {print $2; exit}' )
-               }
-
+               __RUNPROG="$__PROG $domain $dns_server >$DATFILE 2>$ERRFILE"
+               __PROG="BIND host"
        elif [ -x /usr/bin/nslookup ]; then     # last use BusyBox nslookup
                [ $force_ipversion -ne 0 -o $force_dnstcp -ne 0 ] && \
-                       critical_error "nslookup - no support to 'force IP Version' or 'DNS over TCP'"
+                       write_log 14 "Busybox nslookup - no support to 'force IP Version' or 'DNS over TCP'"
 
-               __RUNPROG="nslookup $domain $dns_server 2>/dev/null"
-               __ERRPROG="nslookup $domain $dns_server 2>&1"
-               verbose_echo " resolver prog =: $__RUNPROG"
-               __IP=$(eval $__RUNPROG)
-               __ERR=$?
-               # command error
-               [ $__ERR -gt 0 ] && {
-                       verbose_echo "\n!!!!!!!!! ERROR =: BusyBox nslookup Error '$__ERR'\n$(eval $__ERRPROG)\n"
-                       syslog_err "DNS Resolver Error - BusyBox nslookup Error: '$__ERR'"
-                       return 1
-               } || {
-                       # we need to run twice because multi-line output needs to be directly piped to grep because
-                       # pipe returns return code of last prog in pipe but we need errors from nslookup command
-                       __IP=$(eval $__RUNPROG | sed -ne "3,\$ { s/^Address [0-9]*: \($__REGEX\).*$/\\1/p }" )
-               }
-
-       else                                    # there must be an error
-               critical_error "No program found to request public registered IP"
+               __RUNPROG="/usr/bin/nslookup $domain $dns_server >$DATFILE 2>$ERRFILE"
+               __PROG="BusyBox nslookup"
+       else    # there must be an error
+               write_log 12 "Error in 'get_registered_ip()' - no supported Name Server lookup software accessible"
        fi
 
-       verbose_echo "   resolved ip =: '$__IP'"
+       while : ; do
+               write_log 7 "#> $__RUNPROG"
+               eval $__RUNPROG
+               __ERR=$?
+               if [ $__ERR -ne 0 ]; then
+                       write_log 3 "$__PROG error: '$__ERR'"
+                       write_log 7 "Error:\n$(cat $ERRFILE)"
+               else
+                       if [ "$__PROG" = "BIND host" ]; then
+                               __DATA=$(cat $DATFILE | awk -F "address " '/has/ {print $2; exit}' )
+                       else
+                               __DATA=$(cat $DATFILE | sed -ne "3,\$ { s/^Address [0-9]*: \($__REGEX\).*$/\\1/p }" )
+                       fi
+                       [ -n "$__DATA" ] && {
+                               write_log 7 "Registered IP '$__DATA' detected"
+                               eval "$1=\"$__DATA\""   # valid data found
+                               return 0                # leave here
+                       }
+                       write_log 4 "NO valid IP found"
+                       __ERR=127
+               fi
+
+               [ $LUCI_HELPER ] && return $__ERR       # no retry if called by LuCI helper script
+               [ -n "$2" ] && return $__ERR            # $2 is given -> no retry
+               [ $VERBOSE_MODE -gt 1 ] && {
+                       # VERBOSE_MODE > 1 then NO retry
+                       write_log 4 "Get registered/public IP for '$domain' failed - Verbose Mode: $VERBOSE_MODE - NO retry on error"
+                       return $__ERR
+               }
 
-       # if NO IP was found
-       [ -z "$__IP" ] && return 1
+               __CNT=$(( $__CNT + 1 )) # increment error counter
+               # if error count > retry_count leave here
+               [ $__CNT -gt $retry_count ] && \
+                       write_log 14 "Get registered/public IP for '$domain' failed after $retry_count retries"
 
-       eval "$1='$__IP'"
-       return 0
+               write_log 4 "Get registered/public IP for '$domain' failed - retry $__CNT/$retry_count in $RETRY_SECONDS seconds"
+               sleep $RETRY_SECONDS &
+               PID_SLEEP=$!
+               wait $PID_SLEEP # enable trap-handler
+               PID_SLEEP=0
+       done
+       # we should never come here there must be a programming error
+       write_log 12 "Error in 'get_registered_ip()' - program coding error"
 }
 
 get_uptime() {
        # $1    Variable to store result in
+       [ $# -ne 1 ] && write_log 12 "Error calling 'verify_host_port()' - wrong number of parameters"
        local __UPTIME=$(cat /proc/uptime)
-       eval "$1='${__UPTIME%%.*}'"
+       eval "$1=\"${__UPTIME%%.*}\""
+}
+
+trap_handler() {
+       # $1    trap signal
+       # $2    optional (exit status)
+       local __PIDS __PID
+       local __ERR=${2:-0}
+       local __OLD_IFS=$IFS
+       local __NEWLINE_IFS='
+' #__NEWLINE_IFS
+
+       [ $PID_SLEEP -ne 0 ] && kill -$1 $PID_SLEEP 2>/dev/null # kill pending sleep if exist
+
+       case $1 in
+               0)      if [ $__ERR -eq 0 ]; then
+                               write_log 5 "PID '$$' exit normal at $(eval $DATE_PROG)\n"
+                       else
+                               write_log 4 "PID '$$' exit WITH ERROR '$__ERR' at $(eval $DATE_PROG)\n"
+                       fi ;;
+               1)      write_log 6 "PID '$$' received 'SIGHUP' at $(eval $DATE_PROG)"
+                       eval "$0 $SECTION_ID $VERBOSE_MODE &"   # reload config via restarting script
+                       exit 0 ;;
+               2)      write_log 5 "PID '$$' terminated by 'SIGINT' at $(eval $DATE_PROG)\n";;
+               3)      write_log 5 "PID '$$' terminated by 'SIGQUIT' at $(eval $DATE_PROG)\n";;
+               15)     write_log 5 "PID '$$' terminated by 'SIGTERM' at $(eval $DATE_PROG)\n";;
+               *)      write_log 13 "Unhandled signal '$1' in 'trap_handler()'";;
+       esac
+
+       __PIDS=$(pgrep -P $$)   # get my childs (pgrep prints with "newline")
+       IFS=$__NEWLINE_IFS
+       for __PID in $__PIDS; do
+               kill -$1 $__PID # terminate it
+       done
+       IFS=$__OLD_IFS
+
+       # remove out and err file
+       [ -f $DATFILE ] && rm -f $DATFILE
+       [ -f $ERRFILE ] && rm -f $ERRFILE
+
+       # exit with correct handling:
+       # remove trap handling settings and send kill to myself
+       trap - 0 1 2 3 15
+       [ $1 -gt 0 ] && kill -$1 $$
 }
diff --git a/net/ddns-scripts/files/usr/lib/ddns/dynamic_dns_lucihelper.tmp.sh b/net/ddns-scripts/files/usr/lib/ddns/dynamic_dns_lucihelper.tmp.sh
new file mode 100755 (executable)
index 0000000..1fb7585
--- /dev/null
@@ -0,0 +1,100 @@
+#!/bin/sh
+# /usr/lib/ddns/luci_dns_helper.sh
+#
+# Written in August 2014
+# by Christian Schoenebeck <christian dot schoenebeck at gmail dot com>
+# This script is used by luci-app-ddns
+# - getting registered IP
+# - check if possible to get local IP
+# - verifing given DNS- or Proxy-Server
+#
+# variables in small chars are read from /etc/config/ddns as parameter given here
+# variables in big chars are defined inside these scripts as gloval vars
+# variables in big chars beginning with "__" are local defined inside functions only
+# set -vx      #script debugger
+
+[ $# -lt 2 ] && exit 1
+
+. /usr/lib/ddns/dynamic_dns_functions.sh       # global vars are also defined here
+
+# set -vx      #script debugger
+
+# preset some variables, wrong or not set in dynamic_dns_functions.sh
+SECTION_ID="lucihelper"
+LOGFILE="$LOGDIR/$SECTION_ID.log"
+VERBOSE_MODE=0         # no console logging
+# global variables normally set by reading DDNS UCI configuration
+use_syslog=0           # no syslog
+use_logfile=0          # by default no logfile, can be changed here
+
+__RET=0
+case "$1" in
+       get_registered_ip)
+               local IP
+               domain=$2                       # Hostname/Domain
+               use_ipv6=${3:-"0"}              # Use IPv6 - default IPv4
+               force_ipversion=${4:-"0"}       # Force IP Version - default 0 - No
+               force_dnstcp=${5:-"0"}          # Force TCP on DNS - default 0 - No
+               dns_server=${6:-""}             # DNS server - default No DNS
+               write_log 7 "-----> get_registered_ip IP"
+               get_registered_ip IP
+               __RET=$?
+               [ $__RET -ne 0 ] && IP=""
+               echo -n "$IP"                   # suppress LF
+               ;;
+       verify_dns)
+               # $2 : dns-server to verify     # no need for force_dnstcp because
+                                               # verify with nc (netcat) uses tcp anyway
+               use_ipv6=${3:-"0"}              # Use IPv6 - default IPv4
+               force_ipversion=${4:-"0"}       # Force IP Version - default 0 - No
+               write_log 7 "-----> verify_dns '$2'"
+               verify_dns "$2"
+               __RET=$?
+               ;;
+       verify_proxy)
+               # $2 : proxy string to verify
+               use_ipv6=${3:-"0"}              # Use IPv6 - default IPv4
+               force_ipversion=${4:-"0"}       # Force IP Version - default 0 - No
+               write_log 7 "-----> verify_proxy '$2'"
+               verify_proxy "$2"
+               __RET=$?
+               ;;
+       get_local_ip)
+               local IP
+               use_ipv6="$2"                   # Use IPv6
+               ip_source="$3"                  # IP source
+               ip_network="$4"                 # set if source = "network" otherwise "-"
+               ip_url="$5"                     # set if source = "web" otherwise "-"
+               ip_interface="$6"               # set if source = "interface" itherwiase "-"
+               ip_script="$7"                  # set if source = "script" otherwise "-"
+               proxy="$8"                      # proxy if set
+               force_ipversion="0"             # not needed but must be set
+               use_https="0"                   # not needed but must be set
+               [ -n "$proxy" -a "$ip_source" = "web" ] && {
+                       # proxy defined, used for ip_source=web
+                       export HTTP_PROXY="http://$proxy"
+                       export HTTPS_PROXY="http://$proxy"
+                       export http_proxy="http://$proxy"
+                       export https_proxy="http://$proxy"
+               }
+               # don't need IP only the return code
+               [ "$ip_source" = "web" -o  "$ip_source" = "script" ] && {
+                       # we wait only 3 seconds for an
+                       # answer from "web" or "script"
+                       write_log 7 "-----> timeout 3 -- get_local_ip IP"
+                       timeout 3 -- get_local_ip IP
+               } || {
+                       write_log 7 "-----> get_local_ip IP"
+                       get_local_ip IP
+               }
+               __RET=$?
+               ;;
+       *)
+               __RET=255
+               ;;
+esac
+
+# remove out and err file
+[ -f $DATFILE ] && rm -f $DATFILE
+[ -f $ERRFILE ] && rm -f $ERRFILE
+return $__RET
\ No newline at end of file
index 6c715cb49c747a2049e5678212049f56cf8a01dc..349803e408b63d8d8abb89165c29da20e4d506b3 100755 (executable)
@@ -6,15 +6,16 @@
 # (Loosely) based on the script on the one posted by exobyte in the forums here:
 # http://forum.openwrt.org/viewtopic.php?id=14040
 #
-# extended and partial rewritten in August 2014 
+# extended and partial rewritten in August 2014
 # by Christian Schoenebeck <christian dot schoenebeck at gmail dot com>
 # to support:
 # - IPv6 DDNS services
-# - DNS Server to retrieve registered IP including TCP transport
+# - DNS Server to retrieve registered IP including TCP transport (Ticket 7820)
 # - Proxy Server to send out updates
-# - force_interval=0 to run once
+# - force_interval=0 to run once (Luci Ticket 538)
 # - the usage of BIND's host command instead of BusyBox's nslookup if installed
-# - extended Verbose Mode and log file support for better error detection 
+# - extended Verbose Mode and log file support for better error detection
+# - wait for interface to fully come up, before the first update is done
 #
 # variables in small chars are read from /etc/config/ddns
 # variables in big chars are defined inside these scripts as global vars
@@ -38,7 +39,7 @@
 . /usr/lib/ddns/dynamic_dns_functions.sh       # global vars are also defined here
 
 SECTION_ID="$1"
-VERBOSE_MODE=${2:-1}   #default mode is log to console
+VERBOSE_MODE=${2:-1}   # default mode is log to console
 
 # set file names
 PIDFILE="$RUNDIR/$SECTION_ID.pid"      # Process ID file
@@ -47,18 +48,26 @@ LOGFILE="$LOGDIR/$SECTION_ID.log"   # log file
 
 # VERBOSE_MODE > 1 delete logfile if exist to create an empty one
 # only with this data of this run for easier diagnostic
-# new one created by verbose_echo function
+# new one created by write_log function
 [ $VERBOSE_MODE -gt 1 -a -f $LOGFILE ] && rm -f $LOGFILE
 
+# TRAP handler
+trap "trap_handler 0 \$?" 0    # handle script exit with exit status
+trap "trap_handler 1"  1       # SIGHUP        Hangup / reload config
+trap "trap_handler 2"  2       # SIGINT        Terminal interrupt
+trap "trap_handler 3"  3       # SIGQUIT       Terminal quit
+#trap "trap_handler 9"  9      # SIGKILL       no chance to trap
+trap "trap_handler 15" 15      # SIGTERM       Termination
+
 ################################################################################
 # Leave this comment here, to clearly document variable names that are expected/possible
 # Use load_all_config_options to load config options, which is a much more flexible solution.
 #
 # config_load "ddns"
-# config_get <variable> $SECTION_ID <option]>
+# config_get <variable> $SECTION_ID <option>
 #
 # defined options (also used as variable):
-# 
+#
 # enable       self-explanatory
 # interface    network interface used by hotplug.d i.e. 'wan' or 'wan6'
 #
@@ -79,9 +88,9 @@ LOGFILE="$LOGDIR/$SECTION_ID.log"     # log file
 # ip_network   local defined network to read IP from i.e. 'wan' or 'wan6'
 # ip_url       URL to read local address from i.e. http://checkip.dyndns.com/ or http://checkipv6.dyndns.com/
 # ip_script    full path and name of your script to detect local IP
-# ip_interface physical interface to use for detecting 
+# ip_interface physical interface to use for detecting
 #
-# check_interval       check for changes every  !!! checks below 10 minutes make no sense because the Internet 
+# check_interval       check for changes every  !!! checks below 10 minutes make no sense because the Internet
 # check_unit           'days' 'hours' 'minutes' !!! needs about 5-10 minutes to sync an IP-change for an DNS entry
 #
 # force_interval       force to send an update to your service if no change was detected
@@ -98,7 +107,7 @@ LOGFILE="$LOGDIR/$SECTION_ID.log"    # log file
 # proxy                        #NEW# using a proxy for communication !!! ALSO used to detect local IP via web => return proxy's IP !!!
 # use_logfile          #NEW# self-explanatory "/var/log/ddns/$SECTION_ID.log"
 #
-# some functionality needs 
+# some functionality needs
 # - GNU Wget or cURL installed for sending updates to DDNS service
 # - BIND host installed to detect Registered IP
 #
@@ -108,23 +117,23 @@ LOGFILE="$LOGDIR/$SECTION_ID.log" # log file
 [ "$(uci_get ddns $SECTION_ID)" != "service" ] && {
        [ $VERBOSE_MODE -le 1 ] && VERBOSE_MODE=2       # force console out and logfile output
        [ -f $LOGFILE ] && rm -f $LOGFILE               # clear logfile before first entry
-       verbose_echo "\n ************** =: ************** ************** **************"
-       verbose_echo "       STARTED =: PID '$$' at $(eval $DATE_PROG)"
-       verbose_echo "    UCI CONFIG =:\n$(uci -q show ddns | grep '=service' | sort)"
-       critical_error "Service '$SECTION_ID' not defined"
+       write_log  7 "************ ************** ************** **************"
+       write_log  5 "PID '$$' started at $(eval $DATE_PROG)"
+       write_log  7 "uci configuration:\n$(uci -q show ddns | grep '=service' | sort)"
+       write_log 14 "Service section '$SECTION_ID' not defined"
 }
 load_all_config_options "ddns" "$SECTION_ID"
 
-verbose_echo "\n ************** =: ************** ************** **************"
-verbose_echo "       STARTED =: PID '$$' at $(eval $DATE_PROG)"
+write_log 7 "************ ************** ************** **************"
+write_log 5 "PID '$$' started at $(eval $DATE_PROG)"
+write_log 7 "uci configuraion:\n$(uci -q show ddns.$SECTION_ID | sort)"
 case $VERBOSE_MODE in
-       0) verbose_echo "  verbose mode =: '0' - run normal, NO console output";;
-       1) verbose_echo "  verbose mode =: '1' - run normal, console mode";;
-       2) verbose_echo "  verbose mode =: '2' - run once, NO retry on error";;
-       3) verbose_echo "  verbose mode =: '3' - run once, NO retry on error, NOT sending update";;
-       *) critical_error "ERROR detecting VERBOSE_MODE '$VERBOSE_MODE'"
+       0) write_log  7 "verbose mode  : 0 - run normal, NO console output";;
+       1) write_log  7 "verbose mode  : 1 - run normal, console mode";;
+       2) write_log  7 "verbose mode  : 2 - run once, NO retry on error";;
+       3) write_log  7 "verbose mode  : 3 - run once, NO retry on error, NOT sending update";;
+       *) write_log 14 "error detecting VERBOSE_MODE '$VERBOSE_MODE'";;
 esac
-verbose_echo "    UCI CONFIG =:\n$(uci -q show ddns.$SECTION_ID | sort)"
 
 # set defaults if not defined
 [ -z "$enabled" ]        && enabled=0
@@ -142,56 +151,56 @@ verbose_echo "    UCI CONFIG =:\n$(uci -q show ddns.$SECTION_ID | sort)"
 [ "$ip_source" = "web" -a -z "$ip_url" -a $use_ipv6 -eq 1 ] && ip_url="http://checkipv6.dyndns.com"
 [ "$ip_source" = "interface" -a -z "$ip_interface" ] && ip_interface="eth1"
 
-# check configuration and enabled state
-[ -z "$domain" -o -z "$username" -o -z "$password" ] && critical_error "Service Configuration not correctly configured"
-[ $enabled -eq 0 ] && critical_error "Service Configuration is disabled"
+# check enabled state otherwise we don't need to continue
+[ $enabled -eq 0 ] && write_log 14 "Service section disabled!"
 
-# verify script if configured and executable
+# without domain or username or password we can do nothing for you
+[ -z "$domain" -o -z "$username" -o -z "$password" ] && write_log 14 "Service section not correctly configured!"
+urlencode URL_USER "$username" # encode username, might be email or something like this
+urlencode URL_PASS "$password" # encode password, might have special chars for security reason
+
+# verify ip_source script if configured and executable
 if [ "$ip_source" = "script" ]; then
-       [ -z "$ip_script" ] && critical_error "No script defined to detect local IP"
-       [ -x "$ip_script" ] || critical_error "Script to detect local IP not found or not executable"
+       set -- $ip_script       #handling script with parameters, we need a trick
+       [ -z "$1" ] && write_log 14 "No script defined to detect local IP!"
+       [ -x "$1" ] || write_log 14 "Script to detect local IP not executable!"
 fi
 
 # compute update interval in seconds
 get_seconds CHECK_SECONDS ${check_interval:-10} ${check_unit:-"minutes"} # default 10 min
 get_seconds FORCE_SECONDS ${force_interval:-72} ${force_unit:-"hours"}  # default 3 days
 get_seconds RETRY_SECONDS ${retry_interval:-60} ${retry_unit:-"seconds"} # default 60 sec
-verbose_echo "check interval =: $CHECK_SECONDS seconds"
-verbose_echo "force interval =: $FORCE_SECONDS seconds"
-verbose_echo "retry interval =: $RETRY_SECONDS seconds"
-verbose_echo " retry counter =: $retry_count times"
+[ $CHECK_SECONDS -lt 300 ] && CHECK_SECONDS=300                # minimum 5 minutes
+[ $FORCE_SECONDS -gt 0 -a $FORCE_SECONDS -lt $CHECK_SECONDS ] && FORCE_SECONDS=$CHECK_SECONDS  # FORCE_SECONDS >= CHECK_SECONDS or 0
+write_log 7 "check interval: $CHECK_SECONDS seconds"
+write_log 7 "force interval: $FORCE_SECONDS seconds"
+write_log 7 "retry interval: $RETRY_SECONDS seconds"
+write_log 7 "retry counter : $retry_count times"
 
 # determine what update url we're using if a service_name is supplied
-# otherwise update_url is set inside configuration (custom service)
+# otherwise update_url is set inside configuration (custom update url)
 # or update_script is set inside configuration (custom update script)
 [ -n "$service_name" ] && get_service_data update_url update_script
-[ -z "$update_url" -a -z "$update_script" ] && critical_error "no update_url found/defined or no update_script found/defined"
-[ -n "$update_script" -a ! -f "$update_script" ] && critical_error "custom update_script not found"
+[ -z "$update_url" -a -z "$update_script" ] && write_log 14 "No update_url found/defined or no update_script found/defined!"
+[ -n "$update_script" -a ! -f "$update_script" ] && write_log 14 "Custom update_script not found!"
 
 #kill old process if it exists & set new pid file
 if [ -d $RUNDIR ]; then
-       #if process is already running, stop it
-       if [ -e "$PIDFILE" ]; then
-               OLD_PID=$(cat $PIDFILE)
-               ps | grep -q "^[\t ]*$OLD_PID" && {
-                       verbose_echo "   old process =: PID '$OLD_PID'"
-                       kill $OLD_PID
-               } || verbose_echo "old process id =: PID 'none'"
-       else
-               verbose_echo "old process id =: PID 'none'"
-       fi
+       #if process for section is already running, stop it
+       stop_section_processes "$SECTION_ID"
+       [ $? -gt 0 ] && write_log 7 "Send 'SIGTERM' to old process" || write_log 7 "No old process"
 else
        #make dir since it doesn't exist
        mkdir -p $RUNDIR
-       verbose_echo "old process id =: PID 'none'"
+       write_log 7 "No old process"
 fi
 echo $$ > $PIDFILE
 
 # determine when the last update was
-# the following lines should prevent multiple updates if hotplug fires multiple startups 
+# the following lines should prevent multiple updates if hotplug fires multiple startups
 # as described in Ticket #7820, but did not function if never an update take place
 # i.e. after a reboot (/var is linked to /tmp)
-# using uptime as reference because date might not be updated via NTP client 
+# using uptime as reference because date might not be updated via NTP client
 get_uptime CURR_TIME
 [ -e "$UPDFILE" ] && {
        LAST_TIME=$(cat $UPDFILE)
@@ -201,242 +210,121 @@ get_uptime CURR_TIME
        [ $LAST_TIME -gt $CURR_TIME ] && LAST_TIME=0
 }
 if [ $LAST_TIME -eq 0 ]; then
-       verbose_echo "   last update =: never"
+       write_log 7 "last update: never"
 else
        EPOCH_TIME=$(( $(date +%s) - CURR_TIME + LAST_TIME ))
        EPOCH_TIME="date -d @$EPOCH_TIME +'$DATE_FORMAT'"
-       verbose_echo "   last update =: $(eval $EPOCH_TIME)"
+       write_log 7 "last update: $(eval $EPOCH_TIME)"
 fi
 
 # we need time here because hotplug.d is fired by netifd
 # but IP addresses are not set by DHCP/DHCPv6 etc.
-verbose_echo "       waiting =: 10 seconds for interfaces to fully come up"
-sleep 10
-
-# verify DNS server: 
-# do with retry's because there might be configurations
-# not directly could connect to outside dns when interface is already up
-ERR_VERIFY=0   # reset err counter
-while [ -n "$dns_server" ]; do
-       [ $ERR_VERIFY -eq 0 ] && verbose_echo "******* VERIFY =: DNS server '$dns_server'"
-       verify_dns "$dns_server"
-       ERR_LAST=$?                     # save return value
-       [ $ERR_LAST -eq 0 ] && break    # everything ok leave while loop
-       ERR_VERIFY=$(( $ERR_VERIFY + 1 ))
-       # if error count > retry_count leave here with critical error
-       [ $ERR_VERIFY -gt $retry_count ] && {
-               case $ERR_LAST in
-                       2)      critical_error "Invalid DNS server Error: '2' - nslookup can not resolve host";;
-                       3)      critical_error "Invalid DNS server Error: '3' - nc (netcat) can not connect";;
-                       *)      critical_error "Invalid DNS server Error: '$ERR_LAST' - unspecific error";;
-               esac
-       }
-       case $ERR_LAST in
-               2)      syslog_err "Invalid DNS server Error: '2' - nslookup can not resolve host - retry $ERR_VERIFY/$retry_count in $RETRY_SECONDS seconds\n";;
-               3)      syslog_err "Invalid DNS server Error: '3' - nc (netcat) can not connect - retry $ERR_VERIFY/$retry_count in $RETRY_SECONDS seconds\n";;
-               *)      syslog_err "Invalid DNS server Error: '$ERR_LAST' - unspecific error - retry $ERR_VERIFY/$retry_count in $RETRY_SECONDS seconds\n";;
-       esac
-       [ $VERBOSE_MODE -gt 1 ] && {
-               # VERBOSE_MODE > 1 then NO retry
-               verbose_echo "\n!!!!!!!!! ERROR =: Verbose Mode - NO retry\n"
-               break
-       }
-       verbose_echo "******** RETRY =: DNS server '$dns_server' - retry $ERR_VERIFY/$retry_count in $RETRY_SECONDS seconds"
-       sleep $RETRY_SECONDS
-done
+write_log 7 "Waiting 10 seconds for interfaces to fully come up"
+sleep 10 &
+PID_SLEEP=$!
+wait $PID_SLEEP        # enable trap-handler
+PID_SLEEP=0
+
+# verify DNS server
+[ -n "$dns_server" ] && verify_dns "$dns_server"
 
 # verify Proxy server and set environment
-# do with retry's because there might be configurations
-# not directly could connect to outside dns when interface is already up
-ERR_VERIFY=0   # reset err counter
 [ -n "$proxy" ] && {
-       [ $ERR_VERIFY -eq 0 ] && verbose_echo "******* VERIFY =: Proxy server 'http://$proxy'"
-       verify_proxy "$proxy"
-       ERR_LAST=$?                     # save return value
-       [ $ERR_LAST -eq 0 ] && {
-               # everything ok set proxy and leave while loop
+       verify_proxy "$proxy" && {
+               # everything ok set proxy
                export HTTP_PROXY="http://$proxy"
                export HTTPS_PROXY="http://$proxy"
                export http_proxy="http://$proxy"
                export https_proxy="http://$proxy"
-               break
-       }
-       ERR_VERIFY=$(( $ERR_VERIFY + 1 ))
-       # if error count > retry_count leave here with critical error
-       [ $ERR_VERIFY -gt $retry_count ] && {
-               case $ERR_LAST in
-                       2)      critical_error "Invalid Proxy server Error '2' - nslookup can not resolve host";;
-                       3)      critical_error "Invalid Proxy server Error '3' - nc (netcat) can not connect";;
-                       *)      critical_error "Invalid Proxy server Error '$ERR_LAST' - unspecific error";;
-               esac
        }
-       case $ERR_LAST in
-               2)      syslog_err "Invalid Proxy server Error '2' - nslookup can not resolve host - retry $ERR_VERIFY/$retry_count in $RETRY_SECONDS seconds\n";;
-               3)      syslog_err "Invalid Proxy server Error '3' - nc (netcat) can not connect - retry $ERR_VERIFY/$retry_count in $RETRY_SECONDS seconds\n";;
-               *)      syslog_err "Invalid Proxy server Error '$ERR_LAST' - unspecific error - retry $ERR_VERIFY/$retry_count in $RETRY_SECONDS seconds\n";;
-       esac
-       [ $VERBOSE_MODE -gt 1 ] && {
-               # VERBOSE_MODE > 1 then NO retry
-               verbose_echo "\n!!!!!!!!! ERROR =: Verbose Mode - NO retry\n"
-               break
-       }
-       verbose_echo "******** RETRY =: Proxy server 'http://$proxy' - retry $ERR_VERIFY/$retry_count in $RETRY_SECONDS seconds"
-       sleep $RETRY_SECONDS
 }
 
 # let's check if there is already an IP registered at the web
 # but ignore errors if not
-verbose_echo "******* DETECT =: Registered IP"
-get_registered_ip REGISTERED_IP
+get_registered_ip REGISTERED_IP "NO_RETRY"
 
 # loop endlessly, checking ip every check_interval and forcing an updating once every force_interval
-# NEW: ### Luci Ticket 538
-# a "force_interval" of "0" will run this script only once
-# the update is only done once when an interface goes up
-# or you run /etc/init.d/ddns start or you can use a cron job
-# it will force an update without check when lastupdate happen
-# but it will verify after "check_interval" if update is seen in the web 
-# and retries on error retry_count times
-# CHANGES: ### Ticket 16363
-# modified nslookup / sed / grep to detect registered ip
-# NEW: ### Ticket 7820
-# modified nslookup to support non standard dns_server (needs to be defined in /etc/config/ddns)
-# support for BIND host command.
-# Wait for interface to fully come up, before the first update is done
-verbose_echo "*** START LOOP =: $(eval $DATE_PROG)"
-# we run NOT once
-[ $FORCE_SECONDS -gt 0 -o $VERBOSE_MODE -le 1 ] && syslog_info "Starting main loop"
-
+write_log 6 "Starting main loop at $(eval $DATE_PROG)"
 while : ; do
 
-       # read local IP
-       verbose_echo "******* DETECT =: Local IP"
-       get_local_ip LOCAL_IP
-       ERR_LAST=$?     # save return value
-       # Error in function
-       [ $ERR_LAST -gt 0 ] && {
-               if [ $VERBOSE_MODE -le 1 ]; then        # VERBOSE_MODE <= 1 then retry
-                       # we can't read local IP
-                       ERR_LOCAL_IP=$(( $ERR_LOCAL_IP + 1 ))
-                       [ $ERR_LOCAL_IP -gt $retry_count ] && critical_error "Can not detect local IP"
-                       verbose_echo "\n!!!!!!!!! ERROR =: detecting local IP - retry $ERR_LOCAL_IP/$retry_count in $RETRY_SECONDS seconds\n"
-                       syslog_err "Error detecting local IP - retry $ERR_LOCAL_IP/$retry_count in $RETRY_SECONDS seconds"
-                       sleep $RETRY_SECONDS
-                       continue        # jump back to the beginning of while loop
-               else
-                       verbose_echo "\n!!!!!!!!! ERROR =: detecting local IP - NO retry\n"
-               fi
-       }
-       ERR_LOCAL_IP=0  # reset err counter
+       get_local_ip LOCAL_IP           # read local IP
 
        # prepare update
-       # never updated or forced immediate then NEXT_TIME = 0 
+       # never updated or forced immediate then NEXT_TIME = 0
        [ $FORCE_SECONDS -eq 0 -o $LAST_TIME -eq 0 ] \
                && NEXT_TIME=0 \
                || NEXT_TIME=$(( $LAST_TIME + $FORCE_SECONDS ))
-       # get current uptime
-       get_uptime CURR_TIME
-       
-       # send update when current time > next time or local ip different from registered ip (as loop on error)
-       ERR_SEND=0
-       while [ $CURR_TIME -ge $NEXT_TIME -o "$LOCAL_IP" != "$REGISTERED_IP" ]; do
+
+       get_uptime CURR_TIME            # get current uptime
+
+       # send update when current time > next time or local ip different from registered ip
+       if [ $CURR_TIME -ge $NEXT_TIME -o "$LOCAL_IP" != "$REGISTERED_IP" ]; then
                if [ $VERBOSE_MODE -gt 2 ]; then
-                       verbose_echo "  VERBOSE MODE =: NO UPDATE send to DDNS provider"
+                       write_log 7 "Verbose Mode: $VERBOSE_MODE - NO UPDATE send"
                elif [ "$LOCAL_IP" != "$REGISTERED_IP" ]; then
-                       verbose_echo "******* UPDATE =: LOCAL: '$LOCAL_IP' <> REGISTERED: '$REGISTERED_IP'"
+                       write_log 7 "Update needed - L: '$LOCAL_IP' <> R: '$REGISTERED_IP'"
                else
-                       verbose_echo "******* FORCED =: LOCAL: '$LOCAL_IP' == REGISTERED: '$REGISTERED_IP'"
+                       write_log 7 "Forced Update - L: '$LOCAL_IP' == R: '$REGISTERED_IP'"
                fi
-               # only send if VERBOSE_MODE < 3
+
                ERR_LAST=0
                [ $VERBOSE_MODE -lt 3 ] && {
-                       send_update "$LOCAL_IP" 
+                       # only send if VERBOSE_MODE < 3
+                       send_update "$LOCAL_IP"
                        ERR_LAST=$?     # save return value
                }
 
-               # Error in function 
-               if [ $ERR_LAST -gt 0 ]; then
-                       if [ $VERBOSE_MODE -le 1 ]; then        # VERBOSE_MODE <=1 then retry
-                               # error sending local IP
-                               ERR_SEND=$(( $ERR_SEND + 1 ))
-                               [ $ERR_SEND -gt $retry_count ] && critical_error "can not send update to DDNS Provider"
-                               verbose_echo "\n!!!!!!!!! ERROR =: sending update - retry $ERR_SEND/$retry_count in $RETRY_SECONDS seconds\n"
-                               syslog_err "Error sending update - retry $ERR_SEND/$retry_count in $RETRY_SECONDS seconds"
-                               sleep $RETRY_SECONDS
-                               continue # re-loop
-                       else
-                               verbose_echo "\n!!!!!!!!! ERROR =: sending update to DDNS service - NO retry\n"
-                               break
-                       fi
-               else
-                       # we send data so save "last time"
-                       get_uptime LAST_TIME
+               # error sending local IP to provider
+               # we have no communication error (handled inside send_update/do_transfer)
+               # but update was not recognized
+               # do NOT retry after RETRY_SECONDS, do retry after CHECK_SECONDS
+               # to early retrys will block most DDNS provider
+               # providers answer is checked inside send_update() function
+               if [ $ERR_LAST -eq 0 ]; then
+                       get_uptime LAST_TIME            # we send update, so
                        echo $LAST_TIME > $UPDFILE      # save LASTTIME to file
-                       [ "$LOCAL_IP" != "$REGISTERED_IP" ] \
-                               && syslog_notice "Changed IP: '$LOCAL_IP' successfully send" \
-                               || syslog_notice "Forced Update: IP: '$LOCAL_IP' successfully send"
-                       break # leave while
+                       [ "$LOCAL_IP" != "$REGISTERED_IP" ] && write_log 6 "Update successful - IP '$LOCAL_IP' send"
+                       [ "$LOCAL_IP" = "$REGISTERED_IP" ]  || write_log 6 "Forced update successful - IP: '$LOCAL_IP' send"
+               else
+                       write_log 3 "Can not update IP at DDNS Provider"
                fi
-       done
+       fi
 
        # now we wait for check interval before testing if update was recognized
-       # only sleep if VERBOSE_MODE <= 2 because nothing send so do not wait
+       # only sleep if VERBOSE_MODE <= 2 because otherwise nothing was send
        [ $VERBOSE_MODE -le 2 ] && {
-               verbose_echo "****** WAITING =: $CHECK_SECONDS seconds (Check Interval) before continue"
-               sleep $CHECK_SECONDS
-       } || verbose_echo "  VERBOSE MODE =: NO WAITING for Check Interval\n"
-
-       # read at DDNS service registered IP (in loop on error)
-       REGISTERED_IP=""
-       ERR_REG_IP=0
-       while : ; do
-               verbose_echo "******* DETECT =: Registered IP"
-               get_registered_ip REGISTERED_IP
-               ERR_LAST=$?     # save return value
-
-               # No Error in function we leave while loop
-               [ $ERR_LAST -eq 0  ] && break
-
-               # we can't read Registered IP
-               if [ $VERBOSE_MODE -le 1 ]; then        # VERBOSE_MODE <=1 then retry
-                       ERR_REG_IP=$(( $ERR_REG_IP + 1 ))
-                       [ $ERR_REG_IP -gt $retry_count ] && critical_error "can not detect registered local IP"
-                       verbose_echo "\n!!!!!!!!! ERROR =: detecting Registered IP - retry $ERR_REG_IP/$retry_count in $RETRY_SECONDS seconds\n"
-                       syslog_err "Error detecting Registered IP - retry $ERR_REG_IP/$retry_count in $RETRY_SECONDS seconds"
-                       sleep $RETRY_SECONDS
-               else
-                       verbose_echo "\n!!!!!!!!! ERROR =: detecting Registered IP - NO retry\n"
-                       break   # leave while loop
-               fi
-       done
+               write_log 7 "Waiting $CHECK_SECONDS seconds (Check Interval)"
+               sleep $CHECK_SECONDS &
+               PID_SLEEP=$!
+               wait $PID_SLEEP # enable trap-handler
+               PID_SLEEP=0
+       } || write_log 7 "Verbose Mode: $VERBOSE_MODE - NO Check Interval waiting"
+
+       REGISTERED_IP=""                # clear variable
+       get_registered_ip REGISTERED_IP # get registered/public IP
 
        # IP's are still different
        if [ "$LOCAL_IP" != "$REGISTERED_IP" ]; then
                if [ $VERBOSE_MODE -le 1 ]; then        # VERBOSE_MODE <=1 then retry
                        ERR_UPDATE=$(( $ERR_UPDATE + 1 ))
-                       [ $ERR_UPDATE -gt $retry_count ] && critical_error "Registered IP <> Local IP - LocalIP: '$LOCAL_IP' - RegisteredIP: '$REGISTERED_IP'"
-                       verbose_echo "\n!!!!!!!!! ERROR =: Registered IP <> Local IP - starting retry $ERR_UPDATE/$retry_count\n"
-                       syslog_warn "Warning: Registered IP <> Local IP - starting retry $ERR_UPDATE/$retry_count"
+                       [ $ERR_UPDATE -gt $retry_count ] && write_log 14 "Updating IP at DDNS provider failed after $retry_count retries"
+                       write_log 4 "Updating IP at DDNS provider failed - starting retry $ERR_UPDATE/$retry_count"
                        continue # loop to beginning
                else
-                       verbose_echo "\n!!!!!!!!! ERROR =: Registered IP <> Local IP - LocalIP: '$LOCAL_IP' - RegisteredIP: '$REGISTERED_IP' - NO retry\n"
+                       write_log 4 "Updating IP at DDNS provider failed"
+                       write_log 7 "Verbose Mode: $VERBOSE_MODE - NO retry"; exit 1
                fi
-       fi              
+       else
+               # we checked successful the last update
+               ERR_UPDATE=0                    # reset error counter
+       fi
 
-       # we checked successful the last update
-       ERR_UPDATE=0                    # reset error counter
+       # force_update=0 or VERBOSE_MODE > 1 - leave here
+       [ $VERBOSE_MODE -gt 1 ]  && write_log 7 "Verbose Mode: $VERBOSE_MODE - NO reloop"
+       [ $FORCE_SECONDS -eq 0 ] && write_log 6 "Configured to run once"
+       [ $VERBOSE_MODE -gt 1 -o $FORCE_SECONDS -eq 0 ] && exit 0
 
-       # force_update=0 or VERBOSE_MODE > 1 - leave the main loop
-       [ $FORCE_SECONDS -eq 0 -o $VERBOSE_MODE -gt 1 ] && {
-               verbose_echo "****** LEAVING =: $(eval $DATE_PROG)"
-               syslog_info "Leaving"
-               break
-       }
-       verbose_echo "********* LOOP =: $(eval $DATE_PROG)"
-       syslog_info "Rerun IP check"
+       write_log 6 "Rerun IP check at $(eval $DATE_PROG)"
 done
-
-verbose_echo "****** STOPPED =: PID '$$' at $(eval $DATE_PROG)\n"
-syslog_info "Done"
-
-exit 0
+# we should never come here there must be a programming error
+write_log 12 "Error in 'dynamic_dns_updater.sh - program coding error"
diff --git a/net/ddns-scripts/files/usr/lib/ddns/getlocalip_sample.sh b/net/ddns-scripts/files/usr/lib/ddns/getlocalip_sample.sh
new file mode 100755 (executable)
index 0000000..ac5dc8e
--- /dev/null
@@ -0,0 +1,30 @@
+#!/bin/sh
+#
+# sample script for detecting local IP
+# 2014 Christian Schoenebeck <christian dot schoenebeck at gmail dot com>
+#
+# activated inside /etc/config/ddns by setting
+#
+# option ip_source     'script'
+# option ip_script     '/usr/lib/ddns/getlocalip_sample.sh -6' !!! parameters ALLOWED
+#
+# the script is executed (not parsed) inside get_local_ip() function
+# of /usr/lib/ddns/dynamic_dns_functions.sh
+#
+# This script should
+#      - return the IP address via stdout      echo -n "...."  !!! without line feed
+#      - report errors via stderr              echo "...." >&2
+#      - return an error code ('0' for success)        exit 123
+
+case $1 in
+       -4)     echo -n "8.8.8.8"               # never append linefeed or simular
+               exit 0
+               ;;                              # IP's of Googles public DNS
+       -6)     echo -n "2001:4860:4860::8888"
+               exit 0
+               ;;
+       *)      echo "$0 - Invalid or missing parameter" >&2
+               exit 1
+esac
+echo "Should never come here" >&2
+exit 2
index bb447fb41202b3e99fce1d8b5c04475aa9a80b8e..477caebe3e07985d6da1b4cc2b7026461338b30e 100644 (file)
@@ -1,45 +1,54 @@
-# This file contains the update urls for various dynamic dns services.
-# Column one contains the service name, column two contains the update url.
-# within the update url there are 4 variables you can use: [USERNAME], 
-# [PASSWORD], [DOMAIN] and [IP].  These are substituted for the username, 
-# password, and domain name specified in the /etc/config/ddns file when an 
-# update is performed.  The IP is substituted for the current ip address of the
-# router.  These variables are case sensitive, while urls generally are not, so 
-# if you need to enter the same text in the url (which seems very unlikely) put 
-# that text in lowercase, while the variables should remain in uppercase
+#444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444
+#4
+#4 This file contains the update urls for various dynamic dns services.
+#4 Column one contains the service name, column two contains the update url.
+#4 within the update url there are 4 variables you can use: [USERNAME],
+#4 [PASSWORD], [DOMAIN] and [IP].  These are substituted for the username,
+#4 password, and domain name specified in the /etc/config/ddns file when an
+#4 update is performed.  The IP is substituted for the current ip address of the
+#4 router.  These variables are case sensitive, while urls generally are not, so
+#4 if you need to enter the same text in the url (which seems very unlikely) put
+#4 that text in lowercase, while the variables should remain in uppercase
+#4
+#4 There are TONS of dynamic dns services out there. There's a huge list of them at:
+#4 http://www.dmoz.org/Computers/Software/Internet/Servers/Address_Management/Dynamic_DNS_Services/
+#4 If anyone has time they could update this file to be compatible with a bunch of them
+#4
+#4 !!! Since ddns-scripts Version 2.x the update of IPv6 addresses is also supported
+#4 !!! This file is used for update of IPv4 adresses only. For IPv6 use services_ipv6
+#4
+#4 !!! Since ddns-scripts Version 2.x the update via provider specific update scripts is supported.
+#4 !!! This scripts must be located at /usr/lib/ddns directory if defined inside this file.
+#4 !!! Use only the script name (without path). Sample:
+#4 !!! "example.com"   "update_sample.sh"
+#4
+#444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444
 
 "dyndns.org"           "http://[USERNAME]:[PASSWORD]@members.dyndns.org/nic/update?hostname=[DOMAIN]&myip=[IP]"
 "changeip.com"         "http://[USERNAME]:[PASSWORD]@nic.changeip.com/nic/update?u=[USERNAME]&p=[PASSWORD]&cmd=update&hostname=[DOMAIN]&ip=[IP]"
 "zoneedit.com"         "http://[USERNAME]:[PASSWORD]@dynamic.zoneedit.com/auth/dynamic.html?host=[DOMAIN]&dnsto=[IP]"
 "free.editdns.net"     "http://dyndns-free.editdns.net/api/dynLinux.php?p=[PASSWORD]&r=[DOMAIN]"
 
-#noip is an alias of no-ip, so allow both names for the same service
-"no-ip.com"            "http://[USERNAME]:[PASSWORD]@dynupdate.no-ip.com/nic/update?hostname=[DOMAIN]&myip=[IP]"
-"noip.com"             "http://[USERNAME]:[PASSWORD]@dynupdate.no-ip.com/nic/update?hostname=[DOMAIN]&myip=[IP]"
+# noip is an alias of no-ip, so allow both names for the same service
+# use provider specific update script
+"no-ip.com"    "update_no-ip.sh"
+"noip.com"     "update_no-ip.sh"
 
 #freedns.afraid.org is weird, you just need an update code, for which we use the password variable
 "freedns.afraid.org"   "http://freedns.afraid.org/dynamic/update.php?[PASSWORD]&address=[IP]"
 
-#### ADD YOURS HERE! ######################################################################################
-#                                                                                                         #
-# There are TONS of dynamic dns services out there. There's a huge list of them at:                       #
-# http://www.dmoz.org/Computers/Software/Internet/Servers/Address_Management/Dynamic_DNS_Services/        #
-# If anyone has time they could update this file to be compatible with a bunch of them                    #
-#                                                                                                         #
-###########################################################################################################
-
 # DNS Max and resellers' update urls
 "dnsmax.com"   "http://update.dnsmax.com/update/?username=[USERNAME]&password=[PASSWORD]&resellerid=1&clientname=openwrt&clientversion=8.09&protocolversion=2.0&updatehostname=[DOMAIN]&ip=[IP]"
 "thatip.com"   "http://update.dnsmax.com/update/?username=[USERNAME]&password=[PASSWORD]&resellerid=2&clientname=openwrt&clientversion=8.09&protocolversion=2.0&updatehostname=[DOMAIN]&ip=[IP]"
 
 # Hurricane Electric Dynamic DNS
-"he.net"               "http://[DOMAIN]:[PASSWORD]@dyn.dns.he.net/nic/update?hostname=[DOMAIN]&myip=[IP]" 
+"he.net"       "http://[DOMAIN]:[PASSWORD]@dyn.dns.he.net/nic/update?hostname=[DOMAIN]&myip=[IP]"
 
 # DNSdynamic.org
 "dnsdynamic.org"       "http://[USERNAME]:[PASSWORD]@www.dnsdynamic.org/api/?hostname=[DOMAIN]&myip=[IP]"
 
 # dnsExit.com free dynamic DNS update url
-"dnsexit.com"          "http://www.dnsexit.com/RemoteUpdate.sv?login=[USERNAME]&password=[PASSWORD]&host=[DOMAIN]&myip=[IP]"
+"dnsexit.com"  "http://www.dnsexit.com/RemoteUpdate.sv?login=[USERNAME]&password=[PASSWORD]&host=[DOMAIN]&myip=[IP]"
 
 # OVH
 "ovh.com" "http://[USERNAME]:[PASSWORD]@www.ovh.com/nic/update?system=dyndns&hostname=[DOMAIN]&myip=[IP]"
@@ -56,7 +65,7 @@
 "namecheap.com" "http://dynamicdns.park-your-domain.com/update?host=[USERNAME]&domain=[DOMAIN]&password=[PASSWORD]&ip=[IP]"
 
 # easydns.com dynamic DNS
-"easydns.com"          "http://[USERNAME]:[PASSWORD]@api.cp.easydns.com/dyn/tomato.php?hostname=[DOMAIN]&myip=[IP]"
+"easydns.com"  "http://[USERNAME]:[PASSWORD]@api.cp.easydns.com/dyn/tomato.php?hostname=[DOMAIN]&myip=[IP]"
 
 # Winco DDNS
 "ddns.com.br"  "http://[DOMAIN]:[PASSWORD]@members.ddns.com.br/nic/update?hostname=[DOMAIN]&myip=[IP]"
 
 # MyDNS.JP
 "mydns.jp"     "http://www.mydns.jp/directip.html?MID=[USERNAME]&PWD=[PASSWORD]&IPV4ADDR=[IP]"
+
+# LoopiaDNS
+"loopia.se" "http://[USERNAME]:[PASSWORD]@dns.loopia.se/XDynDNSServer/XDynDNS.php?system=custom&hostname=[DOMAIN]&myip=[IP]"
+
+# Cloudflare
+"cloudflare.com"       "update_cloudflare.sh"
+
+# SelfHost.de
+"selfhost.de"  "http://carol.selfhost.de/update?username=[USERNAME]&password=[PASSWORD]&myip=[IP]&hostname=1"
+
+# no-ip.pl nothing to do with no-ip.com (domain registered to www.domeny.tv) (IP autodetected by provider)
+"no-ip.pl"     "http://[USERNAME]:[PASSWORD]@update.no-ip.pl/?hostname=[DOMAIN]"
index b0faf4d478b17d2ff38222c02bbd3e4e06656f06..ff17568a31b2339e6b51c2e5cd6a1b28ae64e6fc 100644 (file)
@@ -1,32 +1,40 @@
-# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-# !!!!! IPv6 Version of original services file                 !!!!!
-# !!!!! funtionally and syntax is the same                     !!!!!
-# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-# This file contains the update urls for various dynamic dns services.
-# Column one contains the service name, column two contains the update url.
-# within the update url there are 4 variables you can use: [USERNAME], 
-# [PASSWORD], [DOMAIN] and [IP].  These are substituted for the username, 
-# password, and domain name specified in the /etc/config/ddns file when an 
-# update is performed.  The IP is substituted for the current ip address of the
-# router.  These variables are case sensitive, while urls generally are not, so 
-# if you need to enter the same text in the url (which seems very unlikely) put 
-# that text in lowercase, while the variables should remain in uppercase
+#666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666
+#6
+#6 This file contains the update urls for various dynamic dns services.
+#6 Column one contains the service name, column two contains the update url.
+#6 within the update url there are 4 variables you can use: [USERNAME],
+#6 [PASSWORD], [DOMAIN] and [IP].  These are substituted for the username,
+#6 password, and domain name specified in the /etc/config/ddns file when an
+#6 update is performed.  The IP is substituted for the current ip address of the
+#6 router.  These variables are case sensitive, while urls generally are not, so
+#6 if you need to enter the same text in the url (which seems very unlikely) put
+#6 that text in lowercase, while the variables should remain in uppercase
+#6
+#6 There are TONS of dynamic dns services out there. There's a huge list of them at:
+#6 http://www.dmoz.org/Computers/Software/Internet/Servers/Address_Management/Dynamic_DNS_Services/
+#6 If anyone has time they could update this file to be compatible with a bunch of them
+#6
+#6 !!! Since ddns-scripts Version 2.x the update of IPv6 addresses is also supported
+#6 !!! This file is used for update of IPv6 adresses only. For IPv4 use services
+#6
+#6 !!! Since ddns-scripts Version 2.x the update via provider specific update scripts is supported.
+#6 !!! This scripts must be located at /usr/lib/ddns directory if defined inside this file.
+#6 !!! Use only the script name (without path). Sample:
+#6 !!! "example.com"   "update_sample.sh"
+#6
+#666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666
 
-# tested with
-
-# Securepoint Dynamic-DNS-Service
+#IPv6 @ Securepoint Dynamic-DNS-Service
 "spdns.de"     "http://[USERNAME]:[PASSWORD]@update.spdns.de/nic/update?hostname=[DOMAIN]&myip=[IP]"
 
-# Hurricane Electric Dynamic DNS
-"he.net"       "http://[DOMAIN]:[PASSWORD]@dyn.dns.he.net/nic/update?hostname=[DOMAIN]&myip=[IP]" 
-
-#### ADD YOURS HERE! ######################################################################################
-#                                                                                                         #
-# There are TONS of dynamic dns services out there. There's a huge list of them at:                       #
-# http://www.dmoz.org/Computers/Software/Internet/Servers/Address_Management/Dynamic_DNS_Services/        #
-# If anyone has time they could update this file to be compatible with a bunch of them                    #
-#                                                                                                         #
-###########################################################################################################
+#IPv6 @ Hurricane Electric Dynamic DNS
+"he.net"       "http://[DOMAIN]:[PASSWORD]@dyn.dns.he.net/nic/update?hostname=[DOMAIN]&myip=[IP]"
 
-# MyDNS.JP
+#IPv6 @ MyDNS.JP
 "mydns.jp"     "http://www.mydns.jp/directip.html?MID=[USERNAME]&PWD=[PASSWORD]&IPV6ADDR=[IP]"
+
+#IPv6 @ Cloudflare
+"cloudflare.com"       "update_cloudflare.sh"
+
+#IPv6 @ no-ip.pl nothing to do with no-ip.com (domain registered to www.domeny.tv) (IP autodetected by provider)
+"no-ip.pl"     "http://[USERNAME]:[PASSWORD]@update.no-ip.pl/?hostname=[DOMAIN]"
diff --git a/net/ddns-scripts/files/usr/lib/ddns/update_cloudflare.sh b/net/ddns-scripts/files/usr/lib/ddns/update_cloudflare.sh
new file mode 100644 (file)
index 0000000..a86e8d7
--- /dev/null
@@ -0,0 +1,138 @@
+#
+# script for sending updates to cloudflare.com
+# 2014 Christian Schoenebeck <christian dot schoenebeck at gmail dot com>
+# many thanks to Paul for testing and feedback during development
+#
+# This script is parsed by dynamic_dns_functions.sh inside send_update() function
+#
+# using following options from /etc/config/ddns
+# option username - your cloudflare e-mail
+# option password - cloudflare api key, you can get it from cloudflare.com/my-account/
+# option domain   - your full hostname to update, in cloudflare its subdomain.domain
+#                      i.e. myhost.example.com where myhost is the subdomain and example.com is your domain
+#
+# Attention !!! script will only work if there is only one subdomain-level at your domain
+# subdomain2.subdomain1.domain i.e. mail.host.example.com will not work
+#
+# variable __IP already defined with the ip-address to use for update
+#
+[ $use_https -eq 0 ] && write_log 14 "Cloudflare only support updates via Secure HTTP (HTTPS). Please correct configuration!"
+
+local __RECID __URL __KEY __KEYS __FOUND __DOMREC
+local __SUBDOM=$(echo $domain | awk -F "." '{print $1}')
+local __DOMAIN=$(echo $domain | awk -F "${__SUBDOM}." '{print $2}')
+local __TMP="/tmp/$$.json"
+
+# parse OpenWrt script with
+# functions for parsing and generating json
+. /usr/share/libubox/jshn.sh
+
+# function copied from /usr/share/libubox/jshn.sh
+# from BB14.09 for backward compatibility to AA12.09
+json_get_keys() {
+       local __dest="$1"
+       local _tbl_cur
+
+       if [ -n "$2" ]; then
+               json_get_var _tbl_cur "$2"
+       else
+               _json_get_var _tbl_cur JSON_CUR
+       fi
+       local __var="${JSON_PREFIX}KEYS_${_tbl_cur}"
+       eval "export -- \"$__dest=\${$__var}\"; [ -n \"\${$__var+x}\" ]"
+}
+
+# function to "sed" unwanted string parts from DATFILE
+cleanup() {
+       #based on the sample output on cloudflare.com homepage we need to do some cleanup
+       sed -i 's/^[ \t]*//;s/[ \t]*$//' $DATFILE       # remove invisible chars at beginning and end of lines
+       sed -i '/^-$/d' $DATFILE                        # remove lines with "-" (dash)
+       sed -i '/^$/d' $DATFILE                         # remove empty lines
+       sed -i "#'##g" $DATFILE                         # remove "'" (single quote)
+}
+
+# build url according to cloudflare client api at https://www.cloudflare.com/docs/client-api.html
+# to "rec_load_all" to detect rec_id needed for update
+__URL="https://www.cloudflare.com/api_json.html"       # https://www.cloudflare.com/api_json.html
+__URL="${__URL}?a=rec_load_all"                                #  -d 'a=rec_load_all'
+__URL="${__URL}&tkn=$password"                         #  -d 'tkn=8afbe6dea02407989af4dd4c97bb6e25'
+__URL="${__URL}&email=$username"                       #  -d 'email=sample@example.com'
+__URL="${__URL}&z=$__DOMAIN"                           #  -d 'z=example.com'
+
+# lets request the data
+do_transfer "$__URL" || return 1
+
+cleanup                                # cleanup dat file
+json_load "$(cat $DATFILE)"    # lets extract data
+__FOUND=0                      # found record indicator
+json_get_var __RES "result"    # cloudflare result of last request
+json_get_var __MSG "msg"       # cloudflare error message
+[ "$__RES" != "success" ] && {
+       write_log 4 "'rec_load_all' failed with error: \n$__MSG"
+       return 1
+}
+
+json_select "response"
+json_select "recs"
+json_select "objs"
+json_get_keys __KEYS
+for __KEY in $__KEYS; do
+       local __ZONE __NAME __DISPLAY __TYPE
+       json_select "$__KEY"
+       json_get_var __ZONE "zone_name"
+       json_get_var __NAME "name"
+       json_get_var __DISPLAY "display_name"
+       json_get_var __TYPE "type"
+       # if "zone_name" == "name" == "display_name" == $domain, then we found a valid domain record
+       if [ "$__NAME" = "$domain" ]; then
+               [ "$__DISPLAY" = "$__ZONE" ] && __DOMREC=1 || __DOMREC=0
+               # we must verify IPv4 and IPv6 because there might be both for the same host
+               [ \( $use_ipv6 -eq 0 -a "$__TYPE" = "A" \) -o \( $use_ipv6 -eq 1 -a "$__TYPE" = "AAAA" \) ] && {
+                       __FOUND=1       # mark found
+                       break           # found leave for loop
+               }
+       fi
+       json_select ..
+done
+[ $__FOUND -eq 0 ] && {
+       # we don't need to continue trying to update cloudflare because record to update does not exist
+       # user has to setup record first outside ddns-scripts
+       write_log 14 "No valid record found at Cloudflare setup. Please create first!"
+}
+json_get_var __RECID "rec_id"  # last thing to do get rec_id
+json_cleanup                   # cleanup
+write_log 7 "rec_id '$__RECID' detected for host/domain '$domain'"
+
+# build url according to cloudflare client api at https://www.cloudflare.com/docs/client-api.html
+# for "rec_edit" to update IP address
+__URL="https://www.cloudflare.com/api_json.html"       # https://www.cloudflare.com/api_json.html
+__URL="${__URL}?a=rec_edit"                            #  -d 'a=rec_edit'
+__URL="${__URL}&tkn=$password"                         #  -d 'tkn=8afbe6dea02407989af4dd4c97bb6e25'
+__URL="${__URL}&id=$__RECID"                           #  -d 'id=9001'
+__URL="${__URL}&email=$username"                       #  -d 'email=sample@example.com'
+[ $__DOMREC -eq 0 ] && __URL="${__URL}&z=$__DOMAIN"    #  -d 'z=example.com'
+[ $__DOMREC -eq 1 ] && __URL="${__URL}&z=$domain"      #  -d 'z=example.com'
+
+[ $use_ipv6 -eq 0 ] && __URL="${__URL}&type=A"         #  -d 'type=A'          (IPv4)
+[ $use_ipv6 -eq 1 ] && __URL="${__URL}&type=AAAA"      #  -d 'type=AAAA'       (IPv6)
+
+[ $__DOMREC -eq 0 ] && __URL="${__URL}&name=$__SUBDOM" #  -d 'name=sub'        (HOST/SUBDOMAIN)
+[ $__DOMREC -eq 1 ] && __URL="${__URL}&name=$domain"   #  -d 'name=example.com'(DOMAIN)
+
+__URL="${__URL}&content=$__IP"                         #  -d 'content=1.2.3.4'
+__URL="${__URL}&service_mode=0"                                #  -d 'service_mode=0'
+__URL="${__URL}&ttl=1"                                 #  -d 'ttl=1'
+
+# lets do the update
+do_transfer "$__URL" || return 1
+
+cleanup                                # cleanup tmp file
+json_load "$(cat $DATFILE)"    # lets extract data
+json_get_var __RES "result"    # cloudflare result of last request
+json_get_var __MSG "msg"       # cloudflare error message
+[ "$__RES" != "success" ] && {
+       write_log 4 "'rec_edit' failed with error:\n$__MSG"
+       return 1
+}
+write_log 7 "Update of rec_id '$__RECID' successful"
+return 0
diff --git a/net/ddns-scripts/files/usr/lib/ddns/update_no-ip.sh b/net/ddns-scripts/files/usr/lib/ddns/update_no-ip.sh
new file mode 100644 (file)
index 0000000..0d4315e
--- /dev/null
@@ -0,0 +1,47 @@
+#
+# script for sending updates to no-ip.com / noip.com
+# 2014 Christian Schoenebeck <christian dot schoenebeck at gmail dot com>
+#
+# This script is parsed by dynamic_dns_functions.sh inside send_update() function
+#
+# provider did not reactivate records, if no IP change was recognized
+# so we send a dummy (localhost) and a seconds later we send the correct IP addr
+#
+local __DUMMY
+local __UPDURL="http://[USERNAME]:[PASSWORD]@dynupdate.no-ip.com/nic/update?hostname=[DOMAIN]&myip=[IP]"
+
+# set IP version dependend dummy (localhost)
+[ $use_ipv6 -eq 0 ] && __DUMMY="127.0.0.1" || __DUMMY="::1"
+
+# lets do DUMMY transfer
+write_log 7 "sending dummy IP to 'no-ip.com'"
+__URL=$(echo $__UPDURL | sed -e "s#\[USERNAME\]#$URL_USER#g" -e "s#\[PASSWORD\]#$URL_PASS#g" \
+                              -e "s#\[DOMAIN\]#$domain#g" -e "s#\[IP\]#$__DUMMY#g")
+[ $use_https -ne 0 ] && __URL=$(echo $__URL | sed -e 's#^http:#https:#')
+
+do_transfer "$__URL" || return 1
+
+write_log 7 "'no-ip.com' answered:\n$(cat $DATFILE)"
+# analyse provider answers
+# "good [IP_ADR]"      = successful
+# "nochg [IP_ADR]"     = no change but OK
+grep -E "good|nochg" $DATFILE >/dev/null 2>&1 || return 1
+
+# lets wait a seconds
+sleep 1
+
+# now send the correct data
+write_log 7 "sending real IP to 'no-ip.com'"
+__URL=$(echo $__UPDURL | sed -e "s#\[USERNAME\]#$URL_USER#g" -e "s#\[PASSWORD\]#$URL_PASS#g" \
+                              -e "s#\[DOMAIN\]#$domain#g" -e "s#\[IP\]#$__IP#g")
+[ $use_https -ne 0 ] && __URL=$(echo $__URL | sed -e 's#^http:#https:#')
+
+do_transfer "$__URL" || return 1
+
+write_log 7 "'no-ip.com' answered:\n$(cat $DATFILE)"
+# analyse provider answers
+# "good [IP_ADR]"      = successful
+# "nochg [IP_ADR]"     = no change but OK
+grep -E "good|nochg" $DATFILE >/dev/null 2>&1
+return $?      # "0" if "good" or "nochg" found
+
index fb69081ac557b1eb35f5be15306a9120edc56c06..6d1cf0da84e39fd3c60c250fb7aa2ea55901626d 100644 (file)
@@ -1,37 +1,36 @@
-# sample script for sending user defined updates 
+# sample script for sending user defined updates
 # 2014 Christian Schoenebeck <christian dot schoenebeck at gmail dot com>
 #
 # activated inside /etc/config/ddns by setting
 #
-# option update_script '/usr/lib/ddns/update_sample.sh' 
+# option update_script '/usr/lib/ddns/update_sample.sh'
 #
 # the script is parsed (not executed) inside send_update() function
 # of /usr/lib/ddns/dynamic_dns_functions.sh
 # so you can use all available functions and global variables inside this script
 # already defined in dynamic_dns_updater.sh and dynamic_dns_functions.sh
 #
-# It make sence to define the update url ONLY inside this script 
+# It make sence to define the update url ONLY inside this script
 # because it's anyway unique to the update script
 # otherwise it should work with the default scripts
 #
 # the code here is the copy of the default used inside send_update()
 #
-local __USER __PASS __ANSWER
 # tested with spdns.de
 local __URL="http://[USERNAME]:[PASSWORD]@update.spdns.de/nic/update?hostname=[DOMAIN]&myip=[IP]"
 
 # do replaces in URL
-__urlencode __USER "$username" # encode username, might be email or something like this
-__urlencode __PASS "$password" # encode password, might have special chars for security reason
-__URL=$(echo $__URL | sed -e "s#\[USERNAME\]#$__USER#g" -e "s#\[PASSWORD\]#$__PASS#g" \
+__URL=$(echo $__URL | sed -e "s#\[USERNAME\]#$URL_USER#g" -e "s#\[PASSWORD\]#$URL_PASS#g" \
                               -e "s#\[DOMAIN\]#$domain#g" -e "s#\[IP\]#$__IP#g")
 [ $use_https -ne 0 ] && __URL=$(echo $__URL | sed -e 's#^http:#https:#')
 
-__do_transfer __ANSWER "$__URL"
-__ERR=$?
-[ $__ERR -gt 0 ] && {
-       verbose_echo "\n!!!!!!!!! ERROR =: Error sending update to DDNS Provider\n"
-       return 1
-}
-verbose_echo "   update send =: DDNS Provider answered\n$__ANSWER"
-return 0
+do_transfer "$__URL" || return 1
+
+write_log 7 "DDNS Provider answered:\n$(cat $DATFILE)"
+
+# analyse provider answers
+# "good [IP_ADR]"      = successful
+# "nochg [IP_ADR]"     = no change but OK
+grep -E "good|nochg" $DATFILE >/dev/null 2>&1
+return $?      # "0" if "good" or "nochg" found
+
index 2c97879ac9d07b9dfd9a02b70171e97cebd4292e..f69622e9c9c06ffdaa656f482b1bc83fd4047881 100644 (file)
@@ -14,7 +14,7 @@ PKG_RELEASE:=1
 PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
 
 PKG_LICENSE:=GPLv2
-PKG_LICENSE_FILE:=COPYING
+PKG_LICENSE_FILES:=COPYING
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.flyn.org/projects/dmapd
index 7fa772aeda982a5afaec80b86f88f6aef371cd44..e8f9f033ea1346d4ee11b1fa3adf908493d6dfb7 100644 (file)
@@ -17,7 +17,7 @@ PKG_SOURCE_URL:=@KERNEL/software/network/ethtool
 PKG_MD5SUM:=e7bf0c355d2bf6ee281ebc713c5fb987
 
 PKG_LICENSE:=GPL-2.0
-PKG_LICENSE_FILE:=COPYING
+PKG_LICENSE_FILES:=COPYING
 
 PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
index ca4045c5c572f4e5a76be05f14de4c561f7cc318..8292245e6c00ef6bde077c85446d55f5c85f9893 100644 (file)
@@ -80,8 +80,14 @@ config FASTD_WITH_CMDLINE_COMMANDS
        default n
 
 config FASTD_WITH_VERIFY
-        bool "Include support for on-verify handlers"
-        depends on PACKAGE_fastd
-        default n
+       bool "Include support for on-verify handlers"
+       depends on PACKAGE_fastd
+       default n
+
+config FASTD_WITH_STATUS_SOCKET
+       bool "Include support for status sockets"
+       depends on PACKAGE_fastd
+       default y
+
 
 endmenu
index 7a5a4324b72091d22cda9c7840ebbcd0a0a6dbbf..e6a87283464cb228a93aaa3a279548f1f846a475 100644 (file)
@@ -8,16 +8,16 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=fastd
-PKG_VERSION:=14
-PKG_RELEASE:=3
+PKG_VERSION:=16
+PKG_RELEASE:=1
 
 PKG_MAINTAINER:=Matthias Schiffer <mschiffer@universe-factory.net>
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_SOURCE_URL:=https://projects.universe-factory.net/attachments/download/75
-PKG_MD5SUM:=34f6bdebd0410a1fba7c8fd06fff7a05
+PKG_SOURCE_URL:=https://projects.universe-factory.net/attachments/download/78
+PKG_MD5SUM:=135b3083d2743e335738de3bd4bb0c3c
 
 PKG_LICENSE:=BSD-2-Clause
-PKG_LICENSE_FILE:=COPYRIGHT
+PKG_LICENSE_FILES:=COPYRIGHT
 
 PKG_CONFIG_DEPENDS:=\
        CONFIG_FASTD_ENABLE_METHOD_CIPHER_TEST \
@@ -35,7 +35,8 @@ PKG_CONFIG_DEPENDS:=\
        CONFIG_FASTD_WITH_CMDLINE_LOGGING \
        CONFIG_FASTD_WITH_CMDLINE_OPERATION \
        CONFIG_FASTD_WITH_CMDLINE_COMMANDS \
-       CONFIG_FASTD_WITH_VERIFY
+       CONFIG_FASTD_WITH_VERIFY \
+       CONFIG_FASTD_WITH_STATUS_SOCKET
 
 
 PKG_BUILD_DEPENDS:=nacl libuecc
@@ -46,7 +47,7 @@ include $(INCLUDE_DIR)/cmake.mk
 define Package/fastd
   SECTION:=net
   CATEGORY:=Network
-  DEPENDS:=+kmod-tun +librt +libpthread
+  DEPENDS:=+kmod-tun +librt +libpthread +FASTD_WITH_STATUS_SOCKET:libjson-c
   TITLE:=Fast and Secure Tunneling Daemon
   URL:=https://projects.universe-factory.net/projects/fastd
   SUBMENU:=VPN
@@ -77,6 +78,7 @@ CMAKE_OPTIONS += \
        -DWITH_CMDLINE_OPERATION:BOOL=FALSE \
        -DWITH_CMDLINE_COMMANDS:BOOL=FALSE \
        -DWITH_VERIFY:BOOL=FALSE \
+       -DWITH_STATUS_SOCKET:BOOL=FALSE \
        -DWITH_CAPABILITIES:BOOL=FALSE \
        -DENABLE_SYSTEMD:BOOL=FALSE \
        -DENABLE_LIBSODIUM:BOOL=FALSE \
@@ -150,6 +152,10 @@ ifeq ($(CONFIG_FASTD_WITH_VERIFY),y)
 CMAKE_OPTIONS += -DWITH_VERIFY:BOOL=TRUE
 endif
 
+ifeq ($(CONFIG_FASTD_WITH_STATUS_SOCKET),y)
+CMAKE_OPTIONS += -DWITH_STATUS_SOCKET:BOOL=TRUE
+endif
+
 
 define Package/fastd/description
  Fast and secure tunneling daemon, which is optimized on small code size and few dependencies
@@ -164,9 +170,9 @@ define Package/fastd/install
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fastd $(1)/usr/bin/
 
        $(INSTALL_DIR) $(1)/etc/init.d/
-       $(INSTALL_BIN) files/fastd.init $(1)/etc/init.d/fastd
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/doc/examples/openwrt/fastd.init $(1)/etc/init.d/fastd
        $(INSTALL_DIR) $(1)/etc/config
-       $(INSTALL_CONF) files/fastd.config $(1)/etc/config/fastd
+       $(INSTALL_CONF) $(PKG_BUILD_DIR)/doc/examples/openwrt/fastd.config $(1)/etc/config/fastd
        $(INSTALL_DIR) $(1)/etc/fastd
        $(INSTALL_DIR) $(1)/lib/upgrade/keep.d
        $(INSTALL_DATA) files/fastd.upgrade $(1)/lib/upgrade/keep.d/fastd
diff --git a/net/fastd/files/fastd.config b/net/fastd/files/fastd.config
deleted file mode 100644 (file)
index b47cc65..0000000
+++ /dev/null
@@ -1,143 +0,0 @@
-package fastd
-
-config fastd sample_config
-
-       # Set to 1 to enable this instance:
-       option enabled 0
-
-       # Sets a static config file, optional
-       # Options set via UCI have higher priority that statically configured ones
-#      list config '/etc/fastd/sample_config/fastd.conf'
-
-       # Configures a single static peer from a configuration file
-#      list config_peer '/etc/fastd/sample_config/sample_peer.conf'
-
-       # Sets an additional directory from which peers configurations are read
-       # The peer list can be reloaded without restarting fastd
-       # Peer can either be configured via UCI (see examples below) or via peer dirs
-       # Can't be used in tun mode
-#      list config_peer_dir '/etc/fastd/sample_config/peers'
-
-       # Sets the log level
-       # Possible values: error, warn, info, verbose, debug
-       # Default: info
-       option syslog_level 'info'
-
-       # IP address and port of the local end, optional
-       # 'any' can be used to bind to both IPv4 and IPv6
-       # If no port is given fastd will bind to a random port
-#      list bind 'any:1337'
-#      list bind '0.0.0.0:1337'
-#      list bind '[::]:1337'
-
-       # "method null" uses no encryption or MAC
-       # "method xsalsa20-poly1305" uses the XSalsa20 encryption ad the Poly1305 MAC
-       list method 'xsalsa20-poly1305'
-
-       # "mode tap" will create an ethernet tunnel (tap device),
-       # "mode tun" will create an IP tunnel (tun device).
-       option mode 'tap'
-
-       # Set the name of the tunnel interface to use
-       option interface 'tap0'
-#      option interface 'tun0'
-#      option interface 'fastd0'
-
-       # Sets the MTU of the tunnel interface, default is 1500
-       # 1426 is a good value that avoids fragmentation for the xsalsa20-poly1305 method
-       # when the tunnel uses an IPv4 connection on a line with an MTU of 1492 or higher
-       option mtu 1426
-
-       # Enables direct forwaring of packets between peers
-       # WARNING: Only enable this if you know what you are doing, as this can lead to forwarding loops!
-       option forward 0
-
-       # Disable for compatiblity with fastd v10 and older
-       option secure_handshakes 1
-
-       # Set a packet mark to filter for with iptables or ip rules
-#      option packet_mark 42
-
-       # Limits the maximum number of connections, optional
-#      option peer_limit 5
-
-       # The secret key
-       # A keypair can be generated with `fastd --generate-key`
-       # When the corresponding public key is lost it can be recovered with `/etc/init.d/fastd show-key <config name>`
-#      option secret '0000000000000000000000000000000000000000000000000000000000000000'
-
-       # Sets the user to run fastd as. Defaults to root
-#      option user 'daemon'
-
-       # Sets the group to run fastd as. Defaults to the user's primary group
-#      option group 'daemon'
-
-       # If set to 1, the logs won't contain peers' IP addresses
-#      option hide_ip_addresses '0'
-
-       # If set to 1, the logs won't contain peers' MAC addresses
-#      option hide_mac_addresses '0'
-
-       # Read the documentation about this one. Only ever useful in severly broken networks.
-#      option pmtu ''
-
-       # command to configure IP addresses etc. after the tunnel interface is up; $1 will be the interface name (optional)
-#      option up ''
-
-       # command to execute before the tunnel interface is set down; $1 will be the interface name (optional)
-#      option down ''
-
-
-config peer sample_peer
-
-       # Set to 1 to enable this peer
-       # In tap mode peers can be reloaded dynamically
-       option enabled 0
-
-       # Controls which instance this peer is associated with
-       option net 'sample_config'
-
-       # Controls which peer group this peer belongs to, optional
-       # For most use cases peer groups aren't necessary
-#      option group 'sample_group'
-
-       # The peer's public key
-       option key '0000000000000000000000000000000000000000000000000000000000000000'
-
-       # A remote specification consists of an address or a hostname, and a port
-       # When a hostname is given, it is recommended to specify the address family to use
-       # It is possible to specify no, one or multiple remotes
-       # (but all entries must designate the same host as the public key must be unique)
-#      list remote '192.0.2.1:1337'
-#      list remote '[2001:db8::1]:1337'
-#      list remote '"example.com" port 1337'
-#      list remote 'ipv4 "example.com" port 1337'
-#      list remote 'ipv6 "example.com" port 1337'
-
-       # Setting float to 1 allow incoming connections with this key from other addresses/hostnames/ports than the specified remotes
-#      option float 0
-
-
-config peer_group sample_group
-
-       # Set to 1 to enable this peer group
-       option enabled 0
-
-       # Controls which instance this peer group is associated with
-       # Peer groups can't be used in tun mode
-       option net 'sample_config'
-
-       # Allows configuring nested groups
-#      option parent 'other_group'
-
-       # Includes another config file inside the peer group definition
-#      list config '/etc/fastd/sample_config/sample_group.conf'
-
-       # Configures a single static peer from a configuration file
-#      list config_peer '/etc/fastd/sample_config/sample_peer.conf'
-
-       # Configures an additional peer directory for this group
-#      list config_peer_dir '/etc/fastd/sample_config/peers2'
-
-       # Limits the maximum number of connections to peers in this group (optional)
-#      option peer_limit 5
diff --git a/net/fastd/files/fastd.init b/net/fastd/files/fastd.init
deleted file mode 100644 (file)
index 3a20922..0000000
+++ /dev/null
@@ -1,425 +0,0 @@
-#!/bin/sh /etc/rc.common
-# Copyright (C) 2012-2013 OpenWrt.org
-
-START=95
-
-SERVICE_USE_PID=1
-
-EXTRA_COMMANDS="up down show_key generate_key"
-
-LIST_SEP="
-"
-TMP_FASTD=/tmp/fastd
-FASTD_COMMAND=/usr/bin/fastd
-
-
-section_enabled() {
-       config_get_bool enabled "$1" 'enabled' 0
-       [ $enabled -gt 0 ]
-}
-
-error() {
-       echo "${initscript}:" "$@" 1>&2
-}
-
-get_key_instance() {
-       local s="$1"
-
-       config_get secret "$s" secret
-       if [ "$secret" = 'generate' ]; then
-               secret=`"$FASTD_COMMAND" --generate-key --machine-readable`
-               uci -q set fastd."$s".secret="$secret" && uci -q commit fastd
-       fi
-
-       echo "$secret"
-}
-
-
-escape_string() {
-       local t=${1//\\/\\\\}
-       echo -n "\"${t//\"/\\\"}\""
-}
-
-guard_value() {
-       local t=${1//[^-a-z0-9\[\].:]/}
-       echo -n "$t"
-}
-
-guard_remote() {
-       local t=${1//[^-a-zA-Z0-9\[\].:\"% ]/}
-       local quotes=${t//[^\"]/}
-       if [ "${#quotes}" = 0 -o "${#quotes}" = 2 ]; then
-               echo -n "$t"
-       fi
-}
-
-yes_no() {
-       case "$1" in
-               0|no|off|false|disabled) echo -n no;;
-               *) echo -n yes;;
-       esac
-}
-
-config_string_config='include $(escape_string "$value");'
-config_string_config_peer='include peer $(escape_string "$value");'
-config_string_config_peer_dir='include peers from $(escape_string "$value");'
-config_string_bind='bind $(guard_value "$value");'
-config_string_method='method $(escape_string "$value");'
-config_string_syslog_level='log to syslog level $(guard_value "$value");'
-config_string_mode='mode $(guard_value "$value");'
-config_string_interface='interface $(escape_string "$value");'
-config_string_mtu='mtu $(guard_value "$value");'
-config_string_peer_limit='peer limit $(guard_value "$value");'
-config_string_user='user $(escape_string "$value");'
-config_string_group='group $(escape_string "$value");'
-config_string_pmtu='pmtu $(yes_no "$value");'
-config_string_forward='forward $(yes_no "$value");'
-config_string_hide_ip_addresses='hide ip addresses $(yes_no "$value");'
-config_string_hide_mac_addresses='hide mac addresses $(yes_no "$value");'
-config_string_secure_handshakes='secure handshakes $(yes_no "$value");'
-config_string_packet_mark='packet mark $(guard_value "$value");'
-
-config_string_peer='peer $(escape_string "$value") {'
-config_string_peer_group='peer group $(escape_string "$value") {'
-
-peer_string_key='key $(escape_string "$value");'
-peer_string_float='float $(yes_no "$value");'
-peer_string_remote='remote $(guard_remote "$value");'
-
-generate_option() {
-       local __string=$(eval echo \"\$$2\")
-       local value="$1";
-       eval echo "\"$__string\""
-}
-
-append_option() {
-       local v; local len; local s="$1"; local prefix="$2"; local p="$3"
-
-       config_get len "$s" "${p}_LENGTH"
-
-       if [ -z "$len" ]; then
-               config_get v "$s" "$p"
-               [ -n "$v" ] && generate_option "$v" "${prefix}_string_${p}"
-       else
-               config_list_foreach "$s" "$p" generate_option "${prefix}_string_${p}"
-       fi
-}
-
-append_options() {
-       local p; local s="$1"; local prefix="$2"; shift; shift
-       for p in $*; do
-               append_option "$s" "$prefix" "$p"
-       done
-}
-
-
-generate_config_secret() {
-       echo "secret $(escape_string "$1");"
-}
-
-
-generate_peer_config() {
-       local peer="$1"
-
-       # These options are deprecated
-       config_get address "$peer" address
-       config_get hostname "$peer" hostname
-       config_get address_family "$peer" address_family
-       config_get port "$peer" port
-
-       if [ "$address" -o "$hostname" ]; then
-               if [ -z "$port" ]; then
-                       error "peer $peer: address or hostname, but no port given"
-                       return 1
-               fi
-
-               if [ "$hostname" ]; then
-                       generate_option peer_string_remote "$address_family \"$hostname\" port $port"
-               fi
-
-               if [ "$address" ]; then
-                       generate_option peer_string_remote "$address port $port"
-               fi
-       fi
-
-       append_options "$peer" peer \
-               key float remote
-}
-
-generate_single_peer_config() {
-       local peer="$1"; local net="$2"
-
-       config_get peer_net "$peer" net
-       config_get peer_group "$peer" group
-       [ "$net" = "$peer_net" -a "$peer_group" = '' ] || return 0
-
-       section_enabled "$peer" || return 0
-
-       generate_option "$peer" config_string_peer
-       generate_peer_config "$peer"
-       echo '}'
-}
-
-create_peer_config() {
-       local peer="$1"; local net="$2"; local group="$3"; local path="$4"
-
-       config_get peer_net "$peer" net
-       config_get peer_group "$peer" group
-       [ "$group" = "$peer_group" ] || return 0
-
-       if [ "$net" != "$peer_net" ]; then
-               [ -z "$group" ] || error "warning: the peer group of peer '$peer' doesn't match its net, the peer will be ignored"
-               return 0
-       fi
-
-       section_enabled "$peer" || return 0
-
-       generate_peer_config "$peer" >"$path/$peer"
-}
-
-update_peer_group() {
-       local net="$1"; local group_dir="$2"; local group="$3"; local update_only="$4"
-       local path="$TMP_FASTD/fastd.$net/$group_dir"
-
-       rm -rf "$path"
-       mkdir -p "$path"
-
-       config_foreach create_peer_config 'peer' "$net" "$group" "$path"
-
-       if [ -z "$update_only" ]; then
-               generate_option "$path" config_string_config_peer_dir
-       fi
-
-       config_foreach generate_peer_group_config 'peer_group' "$net" "$group_dir" "$update_only" "$group"
-}
-
-generate_peer_group_config() {
-       local group="$1"; local net="$2"; local group_dir="$3%$group"; local update_only="$4"; local parent="$5"
-
-       config_get group_net "$group" net
-       config_get group_parent "$group" parent
-       [ "$parent" = "$group_parent" ] || return 0
-
-       if [ "$net" != "$peer_net" ]; then
-               [ -z "$parent" ] || error "warning: the parent of peer group '$group' doesn't match its net, the peer group will be ignored"
-               return 0
-       fi
-
-       section_enabled "$group" || return 0
-
-       if [ -z "$update_only" ]; then
-               generate_option "$group" config_string_peer_group
-               append_options "$group" config \
-                       config config_peer config_peer_dir peer_limit
-       fi
-
-       update_peer_group "$net" "$group_dir" "$group" "$update_only"
-
-       if [ -z "$update_only" ]; then
-               echo '}'
-       fi
-}
-
-update_peer_groups() {
-       local net="$1"; local update_only="$2"
-
-       update_peer_group "$net" 'peers' '' "$update_only"
-}
-
-generate_config() {
-       local s="$1"
-
-       generate_option 'info' config_string_syslog_level
-
-       append_options "$s" config \
-               config config_peer config_peer_dir bind method syslog_level mode interface mtu peer_limit \
-               user group pmtu forward hide_ip_addresses hide_mac_addresses secure_handshakes packet_mark
-
-       config_get mode "$s" mode
-
-       if [ "$mode" = "tun" ]; then
-               config_foreach generate_single_peer_config 'peer' "$s"
-       else
-               update_peer_groups "$s"
-       fi
-}
-
-
-generate_key_instance() {
-       local s="$1"
-
-       config_get secret "$s" secret
-       if [ -z "$secret" -o "$secret" = 'generate' ]; then
-               secret=`fastd --generate-key --machine-readable`
-               uci -q set fastd."$s".secret="$secret" && uci -q commit fastd
-       fi
-
-       generate_config_secret "$secret" | "$FASTD_COMMAND" --config - --show-key --machine-readable
-}
-
-show_key_instance() {
-       local s="$1"
-
-       local secret=`get_key_instance "$s"`
-       if [ -z "$secret" ]; then
-               error "$s: secret is not set"
-               return 1
-       fi
-
-       generate_config_secret "$secret" | "$FASTD_COMMAND" --config - --show-key --machine-readable
-}
-
-start_instance() {
-       local s="$1"
-
-       section_enabled "$s" || return 1
-
-       SERVICE_PID_FILE="/var/run/fastd.$s.pid"
-
-       config_get interface "$s" interface
-       if [ -z "$interface" ]; then
-               error "$s: interface is not set"
-               return 1
-       fi
-
-       if ifconfig "$interface" &>/dev/null; then
-               error "$s: interface '$interface' is already in use"
-               return 1
-       fi
-
-       config_get mode "$s" mode
-       if [ -z "$mode" ]; then
-               error "$s: mode is not set"
-               return 1
-       fi
-
-       local secret=`get_key_instance "$s"`
-       if [ -z "$secret" ]; then
-               error "$s: secret is not set"
-               return 1
-       fi
-
-       rm -f "$SERVICE_PID_FILE"
-       touch "$SERVICE_PID_FILE"
-
-       config_get user "$s" user
-       if [ "$user" ]; then
-               chown "$user" "$SERVICE_PID_FILE"
-       fi
-
-       (generate_config_secret "$secret"; generate_config "$s") | service_start "$FASTD_COMMAND" --config - --daemon --pid-file "$SERVICE_PID_FILE"
-
-       if ! ifconfig "$interface" >/dev/null 2>&1; then
-               error "$s: startup failed"
-               return 1
-       fi
-
-       config_get up "$s" up
-       [ -n "$up" ] && sh -c "$up" - "$interface"
-}
-
-stop_instance() {
-       local s="$1"
-
-       section_enabled "$s" || return 1
-
-       SERVICE_PID_FILE="/var/run/fastd.$s.pid"
-
-       config_get interface "$s" interface
-       if [ -z "$interface" ]; then
-               error "$s: interface is not set"
-               return 1
-       fi
-
-       if ! ifconfig "$interface" &>/dev/null; then
-               error "$s: interface '$interface' does not exist"
-               return 1
-       fi
-
-       config_get down "$s" down
-       [ -n "$down" ] && sh -c "$down" - "$interface"
-
-       service_stop "$FASTD_COMMAND"
-
-       rm -rf "$TMP_FASTD/fastd.$s"
-}
-
-reload_instance() {
-       local s="$1"
-
-       section_enabled "$s" || return 1
-
-       config_get mode "$s" mode
-       [ "$mode" = "tun" ] && return 1
-
-       update_peer_groups "$s" true
-
-       SERVICE_PID_FILE="/var/run/fastd.$s.pid"
-       service_reload "$FASTD_COMMAND"
-}
-
-start() {
-       config_load 'fastd'
-       config_foreach start_instance 'fastd'
-       return 0
-}
-
-stop() {
-       config_load 'fastd'
-       config_foreach stop_instance 'fastd'
-       return 0
-}
-
-reload() {
-       config_load 'fastd'
-       config_foreach reload_instance 'fastd'
-       return 0
-}
-
-up() {
-       local exists
-       local instance
-       config_load 'fastd'
-       for instance in "$@"; do
-               config_get exists "$instance" 'TYPE'
-               if [ "$exists" = 'fastd' ]; then
-                       start_instance "$instance"
-               fi
-       done
-}
-
-down() {
-       local exists
-       local instance
-       config_load 'fastd'
-       for instance in "$@"; do
-               config_get exists "$instance" 'TYPE'
-               if [ "$exists" = 'fastd' ]; then
-                       stop_instance "$instance"
-               fi
-       done
-}
-
-show_key() {
-       local exists
-       local instance
-       config_load 'fastd'
-       for instance in "$@"; do
-               config_get exists "$instance" 'TYPE'
-               if [ "$exists" = 'fastd' ]; then
-                       show_key_instance "$instance"
-               fi
-       done
-}
-
-generate_key() {
-       local exists
-       local instance
-       config_load 'fastd'
-       for instance in "$@"; do
-               config_get exists "$instance" 'TYPE'
-               if [ "$exists" = 'fastd' ]; then
-                       generate_key_instance "$instance"
-               fi
-       done
-}
index c48b0bfeb6536e0b7314aaf0971049be20253d7b..1f1d86dce6320128de503892fc467e261d8aa4d1 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=freeradius2
-PKG_VERSION:=2.2.5
+PKG_VERSION:=2.2.6
 PKG_RELEASE:=1
 
 PKG_SOURCE:=freeradius-server-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=ftp://ftp.freeradius.org/pub/freeradius/
-PKG_MD5SUM:=40535bace507d7a3134c3d858f3cbc5a
+PKG_MD5SUM:=e9a6f9bbee9706b008b924061ab3f915
 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=COPYRIGHT LICENSE
index 4bf225276ef4a5f781e4f8c04e3c22dc93b57e18..c254912d46a9313d32070166825148f5b4c79cda 100644 (file)
@@ -1,6 +1,6 @@
 --- a/configure.in
 +++ b/configure.in
-@@ -832,35 +832,6 @@ if test "x$WITH_OPENSSL" = xyes; then
+@@ -796,35 +796,6 @@ if test "x$WITH_OPENSSL" = xyes; then
      OPENSSL_INCLUDE="-DOPENSSL_NO_KRB5"
    fi
  
index bf60dcbdf95900152edf7879b40c4bf6eae9ebd7..ccf57a5cb8aa53de2e923247780162658c38d2de 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=fwknop
-PKG_VERSION:=2.6.3
+PKG_VERSION:=2.6.4
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://www.cipherdyne.org/fwknop/download
-PKG_MD5SUM:=79e8a2feff54b429503bc7cade3bc32e
+PKG_MD5SUM:=259ae562a8fd845b67662fc8e504467e
 PKG_MAINTAINER:=Jonathan Bennett <JBennett@incomsystems.biz>
 PKG_INSTALL:=1
 
index 9362df99a98b77e9a17165baf4ecc78e13e1bc5a..bc0c258c4133670bb25ed97a3f87306a719e4b4e 100644 (file)
@@ -1,6 +1,6 @@
 --- a/server/fwknopd.conf.inst
 +++ b/server/fwknopd.conf.inst
-@@ -284,8 +284,13 @@
+@@ -392,8 +392,13 @@
  # The IPT_FORWARD_ACCESS variable is only used if ENABLE_IPT_FORWARDING is
  # enabled.
  #
index 05f7f80481f1d4cae01cbe8c3065d89a7b7e1b35..dc254bc70903f5b1f3e7e4e40a77047fed44cd62 100644 (file)
@@ -9,12 +9,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=haproxy
-PKG_VERSION:=1.5.5
-PKG_RELEASE:=02
+PKG_VERSION:=1.5.8
+PKG_RELEASE:=06
 PKG_SOURCE:=haproxy-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://haproxy.1wt.eu/download/1.5/src/
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
-PKG_MD5SUM:=952e4c2057d763a3fb74173a81028be5
+PKG_MD5SUM:=7bffa1afa069d90ce03b7cd9aa0557cd
 PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>
 PKG_LICENSE:=GPL-2.0
 
diff --git a/net/haproxy/patches/0001-BUG-MEDIUM-systemd-set-KillMode-to-mixed.patch b/net/haproxy/patches/0001-BUG-MEDIUM-systemd-set-KillMode-to-mixed.patch
deleted file mode 100644 (file)
index aa94fd0..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-From 1f24e3fee3aba83fb3338d17589d0ad0f34f6c73 Mon Sep 17 00:00:00 2001
-From: Apollon Oikonomopoulos <apoikos@debian.org>
-Date: Wed, 8 Oct 2014 15:14:41 +0300
-Subject: [PATCH 1/2] BUG/MEDIUM: systemd: set KillMode to 'mixed'
-
-By default systemd will send SIGTERM to all processes in the service's
-control group. In our case, this includes the wrapper, the master
-process and all worker processes.
-
-Since commit c54bdd2a the wrapper actually catches SIGTERM and survives
-to see the master process getting killed by systemd and regard this as
-an error, placing the unit in a failed state during "systemctl stop".
-
-Since the wrapper now handles SIGTERM by itself, we switch the kill mode
-to 'mixed', which means that systemd will deliver the initial SIGTERM to
-the wrapper only, and if the actual haproxy processes don't exit after a
-given amount of time (default: 90s), a SIGKILL is sent to all remaining
-processes in the control group. See systemd.kill(5) for more
-information.
-
-This should also be backported to 1.5.
-(cherry picked from commit 74f016985ab1fa7a6a5afa301d982e77eba9c96a)
----
- contrib/systemd/haproxy.service.in | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/contrib/systemd/haproxy.service.in b/contrib/systemd/haproxy.service.in
-index 1a3d2c0..0bc5420 100644
---- a/contrib/systemd/haproxy.service.in
-+++ b/contrib/systemd/haproxy.service.in
-@@ -5,6 +5,7 @@ After=network.target
- [Service]
- ExecStart=@SBINDIR@/haproxy-systemd-wrapper -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid
- ExecReload=/bin/kill -USR2 $MAINPID
-+KillMode=mixed
- Restart=always
- [Install]
--- 
-1.8.5.5
-
diff --git a/net/haproxy/patches/0001-BUILD-fix-make-install-to-support-spaces-in-the-inst.patch b/net/haproxy/patches/0001-BUILD-fix-make-install-to-support-spaces-in-the-inst.patch
new file mode 100644 (file)
index 0000000..27a41ce
--- /dev/null
@@ -0,0 +1,46 @@
+From 184422d39df1aa27e6ef4c1ae75177489147ec99 Mon Sep 17 00:00:00 2001
+From: Arcadiy Ivanov <arcadiy.ivanov@servicemesh.com>
+Date: Tue, 4 Nov 2014 07:06:13 -0500
+Subject: [PATCH 1/6] BUILD: fix "make install" to support spaces in the
+ install dirs
+
+Makefile is unable to install into directories containing spaces.
+(cherry picked from commit 3785311e64792787de78370fa126fd806734f7fe)
+---
+ Makefile | 14 +++++++-------
+ 1 file changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 707037b..9556069 100644
+--- a/Makefile
++++ b/Makefile
+@@ -710,19 +710,19 @@ src/dlmalloc.o: $(DLMALLOC_SRC)
+       $(CC) $(COPTS) -DDEFAULT_MMAP_THRESHOLD=$(DLMALLOC_THRES) -c -o $@ $<
+ install-man:
+-      install -d $(DESTDIR)$(MANDIR)/man1
+-      install -m 644 doc/haproxy.1 $(DESTDIR)$(MANDIR)/man1
++      install -d "$(DESTDIR)$(MANDIR)"/man1
++      install -m 644 doc/haproxy.1 "$(DESTDIR)$(MANDIR)"/man1
+ install-doc:
+-      install -d $(DESTDIR)$(DOCDIR)
++      install -d "$(DESTDIR)$(DOCDIR)"
+       for x in configuration architecture haproxy-en haproxy-fr; do \
+-              install -m 644 doc/$$x.txt $(DESTDIR)$(DOCDIR) ; \
++              install -m 644 doc/$$x.txt "$(DESTDIR)$(DOCDIR)" ; \
+       done
+ install-bin: haproxy haproxy-systemd-wrapper
+-      install -d $(DESTDIR)$(SBINDIR)
+-      install haproxy $(DESTDIR)$(SBINDIR)
+-      install haproxy-systemd-wrapper $(DESTDIR)$(SBINDIR)
++      install -d "$(DESTDIR)$(SBINDIR)"
++      install haproxy "$(DESTDIR)$(SBINDIR)"
++      install haproxy-systemd-wrapper "$(DESTDIR)$(SBINDIR)"
+ install: install-bin install-man install-doc
+-- 
+2.0.4
+
diff --git a/net/haproxy/patches/0002-BUG-MEDIUM-config-avoid-skipping-disabled-proxies.patch b/net/haproxy/patches/0002-BUG-MEDIUM-config-avoid-skipping-disabled-proxies.patch
deleted file mode 100644 (file)
index 71a437c..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-From 4ab232ce2fbdaf9b871c411fc7284096219bb854 Mon Sep 17 00:00:00 2001
-From: Willy Tarreau <w@1wt.eu>
-Date: Fri, 10 Oct 2014 14:54:25 +0200
-Subject: [PATCH 2/2] BUG/MEDIUM: config: avoid skipping disabled proxies
-
-Paul Taylor and Bryan Talbot found that after commit 419ead8 ("MEDIUM:
-config: compute the exact bind-process before listener's maxaccept"),
-a backend marked "disabled" would cause the next backend to be skipped
-and if it was the last one it would cause a segfault.
-
-The reason is that the commit above changed the "while" loop for a "for"
-loop but a "continue" statement still incrementing the current proxy was
-left in the code for disabled proxies, causing the next one to be skipped
-as well and the last one to try to dereference NULL when seeking ->next.
-
-The quick workaround consists in not disabling backends, or adding an
-empty dummy one after a disabled section.
-
-This fix must be backported to 1.5.
-(cherry picked from commit 06cc905813f1858c0606b44d1e271bd0b6a25224)
----
- src/cfgparse.c | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/src/cfgparse.c b/src/cfgparse.c
-index ec6d923..392a692 100644
---- a/src/cfgparse.c
-+++ b/src/cfgparse.c
-@@ -6104,7 +6104,6 @@ int check_config_validity()
-               if (curproxy->state == PR_STSTOPPED) {
-                       /* ensure we don't keep listeners uselessly bound */
-                       stop_proxy(curproxy);
--                      curproxy = curproxy->next;
-                       continue;
-               }
--- 
-1.8.5.5
-
diff --git a/net/haproxy/patches/0002-BUG-MEDIUM-ssl-fix-bad-ssl-context-init-can-cause-se.patch b/net/haproxy/patches/0002-BUG-MEDIUM-ssl-fix-bad-ssl-context-init-can-cause-se.patch
new file mode 100644 (file)
index 0000000..33f35b3
--- /dev/null
@@ -0,0 +1,87 @@
+From 90951497008967f10ba8f9927b53c6e6bc138540 Mon Sep 17 00:00:00 2001
+From: Emeric Brun <ebrun@haproxy.comw>
+Date: Wed, 12 Nov 2014 17:35:37 +0100
+Subject: [PATCH 2/6] BUG/MEDIUM: ssl: fix bad ssl context init can cause
+ segfault in case of OOM.
+
+Some SSL context's init functions errors were not handled and
+can cause a segfault due to an incomplete SSL context
+initialization.
+
+This fix must be backported to 1.5.
+(cherry picked from commit 5547615cdac377797ae351a2e024376dbf6d6963)
+---
+ src/ssl_sock.c | 44 ++++++++++++++++++++++++++++++++++----------
+ 1 file changed, 34 insertions(+), 10 deletions(-)
+
+diff --git a/src/ssl_sock.c b/src/ssl_sock.c
+index f8bfbe7..620609f 100644
+--- a/src/ssl_sock.c
++++ b/src/ssl_sock.c
+@@ -2040,15 +2040,29 @@ static int ssl_sock_init(struct connection *conn)
+                       return -1;
+               }
+-              SSL_set_connect_state(conn->xprt_ctx);
+-              if (objt_server(conn->target)->ssl_ctx.reused_sess)
+-                      SSL_set_session(conn->xprt_ctx, objt_server(conn->target)->ssl_ctx.reused_sess);
+-
+               /* set fd on SSL session context */
+-              SSL_set_fd(conn->xprt_ctx, conn->t.sock.fd);
++              if (!SSL_set_fd(conn->xprt_ctx, conn->t.sock.fd)) {
++                      SSL_free(conn->xprt_ctx);
++                      conn->xprt_ctx = NULL;
++                      conn->err_code = CO_ER_SSL_NO_MEM;
++                      return -1;
++              }
+               /* set connection pointer */
+-              SSL_set_app_data(conn->xprt_ctx, conn);
++              if (!SSL_set_app_data(conn->xprt_ctx, conn)) {
++                      SSL_free(conn->xprt_ctx);
++                      conn->xprt_ctx = NULL;
++                      conn->err_code = CO_ER_SSL_NO_MEM;
++                      return -1;
++              }
++
++              SSL_set_connect_state(conn->xprt_ctx);
++              if (objt_server(conn->target)->ssl_ctx.reused_sess) {
++                      if(!SSL_set_session(conn->xprt_ctx, objt_server(conn->target)->ssl_ctx.reused_sess)) {
++                              SSL_SESSION_free(objt_server(conn->target)->ssl_ctx.reused_sess);
++                              objt_server(conn->target)->ssl_ctx.reused_sess = NULL;
++                      }
++              }
+               /* leave init state and start handshake */
+               conn->flags |= CO_FL_SSL_WAIT_HS | CO_FL_WAIT_L6_CONN;
+@@ -2065,13 +2079,23 @@ static int ssl_sock_init(struct connection *conn)
+                       return -1;
+               }
+-              SSL_set_accept_state(conn->xprt_ctx);
+-
+               /* set fd on SSL session context */
+-              SSL_set_fd(conn->xprt_ctx, conn->t.sock.fd);
++              if (!SSL_set_fd(conn->xprt_ctx, conn->t.sock.fd)) {
++                      SSL_free(conn->xprt_ctx);
++                      conn->xprt_ctx = NULL;
++                      conn->err_code = CO_ER_SSL_NO_MEM;
++                      return -1;
++              }
+               /* set connection pointer */
+-              SSL_set_app_data(conn->xprt_ctx, conn);
++              if (!SSL_set_app_data(conn->xprt_ctx, conn)) {
++                      SSL_free(conn->xprt_ctx);
++                      conn->xprt_ctx = NULL;
++                      conn->err_code = CO_ER_SSL_NO_MEM;
++                      return -1;
++              }
++
++              SSL_set_accept_state(conn->xprt_ctx);
+               /* leave init state and start handshake */
+               conn->flags |= CO_FL_SSL_WAIT_HS | CO_FL_WAIT_L6_CONN;
+-- 
+2.0.4
+
diff --git a/net/haproxy/patches/0003-BUG-MEDIUM-ssl-force-a-full-GC-in-case-of-memory-sho.patch b/net/haproxy/patches/0003-BUG-MEDIUM-ssl-force-a-full-GC-in-case-of-memory-sho.patch
new file mode 100644 (file)
index 0000000..422471d
--- /dev/null
@@ -0,0 +1,104 @@
+From 9bcc01ae25985dd540080f43b160beab1f1a2bc6 Mon Sep 17 00:00:00 2001
+From: Willy Tarreau <w@1wt.eu>
+Date: Thu, 13 Nov 2014 13:48:58 +0100
+Subject: [PATCH 3/6] BUG/MEDIUM: ssl: force a full GC in case of memory
+ shortage
+
+When memory becomes scarce and openssl refuses to allocate a new SSL
+session, it is worth freeing the pools and trying again instead of
+rejecting all incoming SSL connection. This can happen when some
+memory usage limits have been assigned to the haproxy process using
+-m or with ulimit -m/-v.
+
+This is mostly an enhancement of previous fix and is worth backporting
+to 1.5.
+(cherry picked from commit fba03cdc5ac6e3ca318b34915596cbc0a0dacc55)
+---
+ src/ssl_sock.c | 30 ++++++++++++++++++++++++++++++
+ 1 file changed, 30 insertions(+)
+
+diff --git a/src/ssl_sock.c b/src/ssl_sock.c
+index 620609f..f50efe5 100644
+--- a/src/ssl_sock.c
++++ b/src/ssl_sock.c
+@@ -2033,9 +2033,16 @@ static int ssl_sock_init(struct connection *conn)
+       /* If it is in client mode initiate SSL session
+          in connect state otherwise accept state */
+       if (objt_server(conn->target)) {
++              int may_retry = 1;
++
++      retry_connect:
+               /* Alloc a new SSL session ctx */
+               conn->xprt_ctx = SSL_new(objt_server(conn->target)->ssl_ctx.ctx);
+               if (!conn->xprt_ctx) {
++                      if (may_retry--) {
++                              pool_gc2();
++                              goto retry_connect;
++                      }
+                       conn->err_code = CO_ER_SSL_NO_MEM;
+                       return -1;
+               }
+@@ -2044,6 +2051,10 @@ static int ssl_sock_init(struct connection *conn)
+               if (!SSL_set_fd(conn->xprt_ctx, conn->t.sock.fd)) {
+                       SSL_free(conn->xprt_ctx);
+                       conn->xprt_ctx = NULL;
++                      if (may_retry--) {
++                              pool_gc2();
++                              goto retry_connect;
++                      }
+                       conn->err_code = CO_ER_SSL_NO_MEM;
+                       return -1;
+               }
+@@ -2052,6 +2063,10 @@ static int ssl_sock_init(struct connection *conn)
+               if (!SSL_set_app_data(conn->xprt_ctx, conn)) {
+                       SSL_free(conn->xprt_ctx);
+                       conn->xprt_ctx = NULL;
++                      if (may_retry--) {
++                              pool_gc2();
++                              goto retry_connect;
++                      }
+                       conn->err_code = CO_ER_SSL_NO_MEM;
+                       return -1;
+               }
+@@ -2072,9 +2087,16 @@ static int ssl_sock_init(struct connection *conn)
+               return 0;
+       }
+       else if (objt_listener(conn->target)) {
++              int may_retry = 1;
++
++      retry_accept:
+               /* Alloc a new SSL session ctx */
+               conn->xprt_ctx = SSL_new(objt_listener(conn->target)->bind_conf->default_ctx);
+               if (!conn->xprt_ctx) {
++                      if (may_retry--) {
++                              pool_gc2();
++                              goto retry_accept;
++                      }
+                       conn->err_code = CO_ER_SSL_NO_MEM;
+                       return -1;
+               }
+@@ -2083,6 +2105,10 @@ static int ssl_sock_init(struct connection *conn)
+               if (!SSL_set_fd(conn->xprt_ctx, conn->t.sock.fd)) {
+                       SSL_free(conn->xprt_ctx);
+                       conn->xprt_ctx = NULL;
++                      if (may_retry--) {
++                              pool_gc2();
++                              goto retry_accept;
++                      }
+                       conn->err_code = CO_ER_SSL_NO_MEM;
+                       return -1;
+               }
+@@ -2091,6 +2117,10 @@ static int ssl_sock_init(struct connection *conn)
+               if (!SSL_set_app_data(conn->xprt_ctx, conn)) {
+                       SSL_free(conn->xprt_ctx);
+                       conn->xprt_ctx = NULL;
++                      if (may_retry--) {
++                              pool_gc2();
++                              goto retry_accept;
++                      }
+                       conn->err_code = CO_ER_SSL_NO_MEM;
+                       return -1;
+               }
+-- 
+2.0.4
+
diff --git a/net/haproxy/patches/0004-BUG-MEDIUM-checks-fix-conflicts-between-agent-checks.patch b/net/haproxy/patches/0004-BUG-MEDIUM-checks-fix-conflicts-between-agent-checks.patch
new file mode 100644 (file)
index 0000000..7a741fb
--- /dev/null
@@ -0,0 +1,102 @@
+From 1f96a87c4e1412ccdc6cfe81bfd6f20a1782886a Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Cyril=20Bont=C3=A9?= <cyril.bonte@free.fr>
+Date: Sat, 15 Nov 2014 22:41:27 +0100
+Subject: [PATCH 4/6] BUG/MEDIUM: checks: fix conflicts between agent checks
+ and ssl healthchecks
+
+Lasse Birnbaum Jensen reported an issue when agent checks are used at the same
+time as standard healthchecks when SSL is enabled on the server side.
+
+The symptom is that agent checks try to communicate in SSL while it should
+manage raw data. This happens because the transport layer is shared between all
+kind of checks.
+
+To fix the issue, the transport layer is now stored in each check type,
+allowing to use SSL healthchecks when required, while an agent check should
+always use the raw_sock implementation.
+
+The fix must be backported to 1.5.
+(cherry picked from commit 9ce1311ebc834e20addc7a8392c0fc4e4ad687b7)
+---
+ include/types/checks.h | 3 ++-
+ include/types/server.h | 1 -
+ src/checks.c           | 2 +-
+ src/server.c           | 2 +-
+ src/ssl_sock.c         | 2 +-
+ 5 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/include/types/checks.h b/include/types/checks.h
+index a50043b..42b7b07 100644
+--- a/include/types/checks.h
++++ b/include/types/checks.h
+@@ -125,6 +125,7 @@ enum {
+ };
+ struct check {
++      struct xprt_ops *xprt;                  /* transport layer operations for health checks */
+       struct connection *conn;                /* connection state for health checks */
+       unsigned short port;                    /* the port to use for the health checks */
+       struct buffer *bi, *bo;                 /* input and output buffers to send/recv check */
+@@ -132,7 +133,7 @@ struct check {
+       struct timeval start;                   /* last health check start time */
+       long duration;                          /* time in ms took to finish last health check */
+       short status, code;                     /* check result, check code */
+-      char desc[HCHK_DESC_LEN];               /* health check descritpion */
++      char desc[HCHK_DESC_LEN];               /* health check description */
+       int use_ssl;                            /* use SSL for health checks */
+       int send_proxy;                         /* send a PROXY protocol header with checks */
+       struct tcpcheck_rule *current_step;     /* current step when using tcpcheck */
+diff --git a/include/types/server.h b/include/types/server.h
+index 313f58d..c419b40 100644
+--- a/include/types/server.h
++++ b/include/types/server.h
+@@ -194,7 +194,6 @@ struct server {
+       struct {                                /* configuration  used by health-check and agent-check */
+               struct protocol *proto;         /* server address protocol for health checks */
+-              struct xprt_ops *xprt;          /* transport layer operations for health checks */
+               struct sockaddr_storage addr;   /* the address to check, if different from <addr> */
+       } check_common;
+diff --git a/src/checks.c b/src/checks.c
+index 5318f35..84bf0e5 100644
+--- a/src/checks.c
++++ b/src/checks.c
+@@ -1413,7 +1413,7 @@ static int connect_chk(struct task *t)
+       /* prepare a new connection */
+       conn_init(conn);
+-      conn_prepare(conn, s->check_common.proto, s->check_common.xprt);
++      conn_prepare(conn, s->check_common.proto, check->xprt);
+       conn_attach(conn, check, &check_conn_cb);
+       conn->target = &s->obj_type;
+diff --git a/src/server.c b/src/server.c
+index fdb63cc..94a31b6 100644
+--- a/src/server.c
++++ b/src/server.c
+@@ -929,7 +929,7 @@ int parse_server(const char *file, int linenum, char **args, struct proxy *curpr
+                       newsrv->addr = *sk;
+                       newsrv->proto = newsrv->check_common.proto = protocol_by_family(newsrv->addr.ss_family);
+-                      newsrv->xprt  = newsrv->check_common.xprt  = &raw_sock;
++                      newsrv->xprt  = newsrv->check.xprt = newsrv->agent.xprt = &raw_sock;
+                       if (!newsrv->proto) {
+                               Alert("parsing [%s:%d] : Unknown protocol family %d '%s'\n",
+diff --git a/src/ssl_sock.c b/src/ssl_sock.c
+index f50efe5..b73d6f9 100644
+--- a/src/ssl_sock.c
++++ b/src/ssl_sock.c
+@@ -1812,7 +1812,7 @@ int ssl_sock_prepare_srv_ctx(struct server *srv, struct proxy *curproxy)
+       if (srv->use_ssl)
+               srv->xprt = &ssl_sock;
+       if (srv->check.use_ssl)
+-              srv->check_common.xprt = &ssl_sock;
++              srv->check.xprt = &ssl_sock;
+       srv->ssl_ctx.ctx = SSL_CTX_new(SSLv23_client_method());
+       if (!srv->ssl_ctx.ctx) {
+-- 
+2.0.4
+
diff --git a/net/haproxy/patches/0005-BUG-MINOR-config-don-t-inherit-the-default-balance-a.patch b/net/haproxy/patches/0005-BUG-MINOR-config-don-t-inherit-the-default-balance-a.patch
new file mode 100644 (file)
index 0000000..1ca2efe
--- /dev/null
@@ -0,0 +1,42 @@
+From cac307c020db7a938b73d4fef27a3b4ad2ecdf6a Mon Sep 17 00:00:00 2001
+From: Willy Tarreau <w@1wt.eu>
+Date: Tue, 18 Nov 2014 15:04:29 +0100
+Subject: [PATCH 5/6] BUG/MINOR: config: don't inherit the default balance
+ algorithm in frontends
+
+Tom Limoncelli from Stack Exchange reported a minor bug : the frontend
+inherits the LB parameters from the defaults sections. The impact is
+that if a "balance" directive uses any L7 parameter in the defaults
+sections and the frontend is in TCP mode, a warning is emitted about
+their incompatibility. The warning is harmless but a valid, sane config
+should never cause any warning to be reported.
+
+This fix should be backported into 1.5 and possibly 1.4.
+(cherry picked from commit 743c128580ee29c8f073b4a29771a5ce715f3721)
+---
+ src/cfgparse.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/cfgparse.c b/src/cfgparse.c
+index 392a692..40d20ab 100644
+--- a/src/cfgparse.c
++++ b/src/cfgparse.c
+@@ -2003,7 +2003,6 @@ int cfg_parse_listen(const char *file, int linenum, char **args, int kwm)
+               curproxy->no_options = defproxy.no_options;
+               curproxy->no_options2 = defproxy.no_options2;
+               curproxy->bind_proc = defproxy.bind_proc;
+-              curproxy->lbprm.algo = defproxy.lbprm.algo;
+               curproxy->except_net = defproxy.except_net;
+               curproxy->except_mask = defproxy.except_mask;
+               curproxy->except_to = defproxy.except_to;
+@@ -2037,6 +2036,7 @@ int cfg_parse_listen(const char *file, int linenum, char **args, int kwm)
+               }
+               if (curproxy->cap & PR_CAP_BE) {
++                      curproxy->lbprm.algo = defproxy.lbprm.algo;
+                       curproxy->fullconn = defproxy.fullconn;
+                       curproxy->conn_retries = defproxy.conn_retries;
+                       curproxy->max_ka_queue = defproxy.max_ka_queue;
+-- 
+2.0.4
+
diff --git a/net/haproxy/patches/0006-BUG-MAJOR-frontend-initialize-capture-pointers-earli.patch b/net/haproxy/patches/0006-BUG-MAJOR-frontend-initialize-capture-pointers-earli.patch
new file mode 100644 (file)
index 0000000..835461c
--- /dev/null
@@ -0,0 +1,59 @@
+From 8ba50128832bb31e95f06fe4cb2bd172f2b945fe Mon Sep 17 00:00:00 2001
+From: Willy Tarreau <w@1wt.eu>
+Date: Tue, 18 Nov 2014 18:49:19 +0100
+Subject: [PATCH 6/6] BUG/MAJOR: frontend: initialize capture pointers earlier
+
+Denys Fedoryshchenko reported and diagnosed a nasty bug caused by TCP
+captures, introduced in late 1.5-dev by commit 18bf01e ("MEDIUM: tcp:
+add a new tcp-request capture directive"). The problem is that we're
+using the array of capture pointers initially designed for HTTP usage
+only, and that this array was only reset when starting to process an
+HTTP request. In a tcp-only frontend, the pointers are not reset, and
+if the capture pool is shared, we can very well point to whatever other
+memory location, resulting in random crashes when tcp-request content
+captures are processed.
+
+The fix simply consists in initializing these pointers when the pools
+are prepared.
+
+A workaround for existing versions consists in either disabling TCP
+captures in tcp-only frontends, or in forcing the frontends to work in
+HTTP mode.
+
+Thanks to Denys for the amount of testing and detailed reports.
+
+This fix must be backported to 1.5.
+(cherry picked from commit 9654e57fac86c773091b892f42015ba2ba56be5a)
+---
+ src/frontend.c | 14 ++++++++++----
+ 1 file changed, 10 insertions(+), 4 deletions(-)
+
+diff --git a/src/frontend.c b/src/frontend.c
+index 3f80774..2928047 100644
+--- a/src/frontend.c
++++ b/src/frontend.c
+@@ -106,11 +106,17 @@ int frontend_accept(struct session *s)
+       if (global.tune.client_rcvbuf)
+               setsockopt(cfd, SOL_SOCKET, SO_RCVBUF, &global.tune.client_rcvbuf, sizeof(global.tune.client_rcvbuf));
+-      if (unlikely(s->fe->nb_req_cap > 0 && (s->txn.req.cap = pool_alloc2(s->fe->req_cap_pool)) == NULL))
+-              goto out_return;        /* no memory */
++      if (unlikely(s->fe->nb_req_cap > 0)) {
++              if ((s->txn.req.cap = pool_alloc2(s->fe->req_cap_pool)) == NULL)
++                      goto out_return;        /* no memory */
++              memset(s->txn.req.cap, 0, s->fe->nb_req_cap * sizeof(void *));
++      }
+-      if (unlikely(s->fe->nb_rsp_cap > 0 && (s->txn.rsp.cap = pool_alloc2(s->fe->rsp_cap_pool)) == NULL))
+-              goto out_free_reqcap;   /* no memory */
++      if (unlikely(s->fe->nb_rsp_cap > 0)) {
++              if ((s->txn.rsp.cap = pool_alloc2(s->fe->rsp_cap_pool)) == NULL)
++                      goto out_free_reqcap;   /* no memory */
++              memset(s->txn.rsp.cap, 0, s->fe->nb_rsp_cap * sizeof(void *));
++      }
+       if (s->fe->http_needed) {
+               /* we have to allocate header indexes only if we know
+-- 
+2.0.4
+
index 29e279a2d05ca0a86a922bdb1384c70dfb063d69..607e2705ec23d75c7f267af3be8113f9e02964b7 100644 (file)
@@ -19,7 +19,7 @@ PKG_SOURCE_VERSION:=version-$(PKG_VERSION)
 
 PKG_MAINTAINER:=Bruno Randolf <br1@einfach.org>
 PKG_LICENSE:=GPL-2.0+
-PKG_LICENSE_FILE:=LICENSE
+PKG_LICENSE_FILES:=LICENSE
 
 PKG_BUILD_PARALLEL:=1
 
index 054d4a4dcc64a1da871bf993731090b1fabea852..04e3d111d9629f5d750fa8a2d55960e8acf2b919 100644 (file)
@@ -14,6 +14,9 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=http://lftp.yar.ru/ftp \ http://lftp.cybermirror.org \ http://lftp.cybermirror.org/old
 PKG_MD5SUM:=e58fc886e3d7c6d994de5ce51de46087
 
+PKG_LICENSE:=GPL-3.0+
+PKG_LICENSE_FILES:=COPYING
+
 include $(INCLUDE_DIR)/uclibc++.mk
 include $(INCLUDE_DIR)/package.mk
 
index 6bf91441c412c28da973f2f7acbc21234c9797a1..9fab80abb5674e8c29d306b234e0f81ad388aea0 100644 (file)
@@ -16,7 +16,7 @@ PKG_SOURCE_URL:=http://download.lighttpd.net/lighttpd/releases-1.4.x
 PKG_MD5SUM:=c7ae774eab4cb7ac85e41b712f4ee9ba
 
 PKG_LICENSE:=BSD-3c
-PKG_LICENSE_FILE:=COPYING
+PKG_LICENSE_FILES:=COPYING
 
 PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
diff --git a/net/luci-app-bcp38/Makefile b/net/luci-app-bcp38/Makefile
new file mode 100644 (file)
index 0000000..d42916c
--- /dev/null
@@ -0,0 +1,57 @@
+#
+# Copyright (C) 2010 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:=luci-app-bcp38
+PKG_VERSION:=2
+PKG_RELEASE:=1
+PKG_LICENSE:=Apache-2.0
+LUCI_DIR:=/usr/lib/lua/luci
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/luci-app-bcp38
+  SECTION:=luci
+  CATEGORY:=LuCI
+  TITLE:=BCP38 LuCI interface
+  MAINTAINER:=Toke Høiland-Jørgensen <toke@toke.dk>
+  PKGARCH:=all
+  DEPENDS:= lua luci-base +bcp38
+  SUBMENU:=3. Applications
+endef
+
+define Package/luci-app-bcp38/description
+       Control BCP38 subnet blocking
+endef
+
+define Build/Compile
+endef
+
+define Build/Configure
+endef
+
+define Package/luci-app-bcp38/install
+       $(INSTALL_DIR) $(1)$(LUCI_DIR)/controller $(1)$(LUCI_DIR)/model/cbi
+       $(INSTALL_DATA) ./files/bcp38-controller.lua $(1)$(LUCI_DIR)/controller/bcp38.lua
+       $(INSTALL_DATA) ./files/bcp38-cbi.lua $(1)$(LUCI_DIR)/model/cbi/bcp38.lua
+       $(INSTALL_DIR) $(1)/etc/uci-defaults
+       $(INSTALL_BIN) ./files/uci-defaults-bcp38 $(1)/etc/uci-defaults/luci-bcp38
+endef
+
+define Package/luci-app-bcp38/postinst
+#!/bin/sh
+[ -x /etc/uci-defaults/luci-bcp38 ] && /etc/uci-defaults/luci-bcp38 || exit 0
+endef
+
+define Package/luci-app-bcp38/postrm
+#!/bin/sh
+uci delete ucitrack.@bcp38[0]
+uci commit
+endef
+
+$(eval $(call BuildPackage,luci-app-bcp38))
diff --git a/net/luci-app-bcp38/files/bcp38-cbi.lua b/net/luci-app-bcp38/files/bcp38-cbi.lua
new file mode 100644 (file)
index 0000000..b0b8f38
--- /dev/null
@@ -0,0 +1,58 @@
+--[[
+LuCI - Lua Configuration Interface
+
+Copyright 2014 Toke Høiland-Jørgensen <toke@toke.dk>
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+$Id$
+]]--
+
+local wa = require "luci.tools.webadmin"
+local net = require "luci.model.network".init()
+local ifaces = net:get_interfaces()
+
+m = Map("bcp38", translate("BCP38"),
+       translate("This function blocks packets with private address destinations " ..
+               "from going out onto the internet as per " ..
+               "<a href=\"http://tools.ietf.org/html/bcp38\">BCP 38</a>."))
+
+s = m:section(TypedSection, "bcp38", translate("BCP38 config"))
+s.anonymous = true
+-- BASIC
+e = s:option(Flag, "enabled", translate("Enable"))
+e.rmempty = false
+
+a = s:option(Flag, "detect_upstream", translate("Auto-detect upstream IP"),
+                               translate("Attempt to automatically detect if the upstream IP " ..
+                                       "will be blocked by the configuration, and add an exception if it will. " ..
+                                       "If this does not work correctly, you can add exceptions manually below."))
+a.rmempty = false
+
+n = s:option(ListValue, "interface", translate("Interface name"), translate("Interface to apply the blocking to " ..
+                                                       "(should be the upstream WAN interface)."))
+for _, iface in ipairs(ifaces) do
+     if iface:is_up() then
+       n:value(iface:name())
+     end
+end
+n.rmempty = false
+
+ma = s:option(DynamicList, "match",
+       translate("Blocked IP ranges"))
+
+ma.datatype = "ip4addr"
+
+nm = s:option(DynamicList, "nomatch",
+       translate("Allowed IP ranges"), translate("Takes precedence over blocked ranges. "..
+                                                 "Use to whitelist your upstream network if you're behind a double NAT " ..
+                                                 "and the auto-detection doesn't work."))
+
+nm.datatype = "ip4addr"
+
+
+return m
diff --git a/net/luci-app-bcp38/files/bcp38-controller.lua b/net/luci-app-bcp38/files/bcp38-controller.lua
new file mode 100644 (file)
index 0000000..7ea2283
--- /dev/null
@@ -0,0 +1,7 @@
+module("luci.controller.bcp38", package.seeall)
+
+function index()
+       entry({"admin", "network", "firewall", "bcp38"},
+               cbi("bcp38"),
+               _("BCP38"), 50).dependent = false
+end
diff --git a/net/luci-app-bcp38/files/uci-defaults-bcp38 b/net/luci-app-bcp38/files/uci-defaults-bcp38
new file mode 100755 (executable)
index 0000000..c204236
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+uci -q batch <<-EOF >/dev/null
+       delete ucitrack.@bcp38[-1]
+       add ucitrack bcp38
+        add_list ucitrack.@bcp38[0].affects=firewall
+       commit ucitrack
+EOF
+
+rm -f /tmp/luci-indexcache
+exit 0
index 8e300ccd3e5be91011d5fe3d6b50b6be24c5f577..a8e92f204df1913e41ca5f5937face353653109a 100644 (file)
@@ -12,7 +12,7 @@ PKG_NAME:=mosquitto
 PKG_VERSION:=1.3.5
 PKG_RELEASE:=1
 PKG_LICENSE:=BSD-3-Clause
-PKG_LICENSE_FILE:=LICENSE.txt
+PKG_LICENSE_FILES:=LICENSE.txt
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://mosquitto.org/files/source/
index e84b3cc355da24b895e669a94ab484809507950d..6a8949fa27c0ba7b846ca690e6dfe5465c48198d 100644 (file)
@@ -21,7 +21,7 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://nmap.org/dist/
 PKG_MD5SUM:=edfe81f6763223c0a29bfa15a8526e2a
 PKG_LICENSE:=GPL-2.0
-PKG_LICENSE_FILE:=COPYING
+PKG_LICENSE_FILES:=COPYING
 
 PKG_INSTALL:=1
 
index c785635099dd4e16a1a950f2ae49b0abc08f0de8..f1bfd4f44cfb34da42b16eb8ce6981bc9da93173 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006-2011 OpenWrt.org
+# Copyright (C) 2006-2014 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -15,6 +15,9 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/
 PKG_MD5SUM:=00df80a84ec9528fcfb09498075525bc
 
+PKG_LICENSE:=Unique
+PKG_LICENSE_FILES:=COPYRIGHT html/copyright.html
+
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
 
 PKG_FIXUP:=autoreconf
@@ -35,7 +38,7 @@ endef
 
 define Package/ntpd/Default/description
  The ISC ntp suite is a collection of tools used to synchronize the
- system clock with remote NTP time servers and run/montior local NTP
+ system clock with remote NTP time servers and run/monitor local NTP
  servers.
 endef
 
index beace7bb26e184aec19b109f69f72e0a822bbe33..81075fd81329d489f9838b5a379b26ed5b0af1f5 100644 (file)
@@ -11,4 +11,8 @@ config OCSERV_PROTOBUF
        bool "use external libprotobuf"
        default y
 
+config OCSERV_HTTP_PARSER
+       bool "use external libhttp-parser"
+       default y
+
 endmenu
index bf22c4beff335c89927921e6911a705789beaec6..7971e99a2e2b3556bbe7e56eb94fe2da3726f228 100644 (file)
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ocserv
-PKG_VERSION:=0.8.7
-PKG_RELEASE:=1
+PKG_VERSION:=0.8.8
+PKG_RELEASE:=2
 
 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_MD5SUM:=79c00132c3366bb60546f256068211eb
+PKG_MD5SUM:=d9b12a3fa976dfda3e4c0238173744e6
 
 PKG_LICENSE:=GPLv2
 PKG_LICENSE_FILES:=COPYING
@@ -37,7 +37,7 @@ define Package/ocserv
   TITLE:=OpenConnect VPN server
   URL:=http://www.infradead.org/ocserv/
   MAINTAINER:=Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
-  DEPENDS:= +libgnutls +certtool +libncurses +libreadline +OCSERV_PAM:libpam +OCSERV_PROTOBUF:libprotobuf-c
+  DEPENDS:= +OCSERV_HTTP_PARSER:libhttp-parser +libgnutls +certtool +libncurses +libreadline +OCSERV_PAM:libpam +OCSERV_PROTOBUF:libprotobuf-c
   USERID:=ocserv=72:ocserv=72
 endef
 
@@ -66,6 +66,10 @@ ifneq ($(CONFIG_OCSERV_PROTOBUF),y)
 CONFIGURE_ARGS += --without-protobuf
 endif
 
+ifneq ($(CONFIG_OCSERV_HTTP_PARSER),y)
+CONFIGURE_ARGS += --without-http-parser
+endif
+
 define Package/ocserv/conffiles
 /etc/config/ocserv
 endef
diff --git a/net/ocserv/patches/001-use-define-_XOPEN_SOURCE-to-get-crypt.patch b/net/ocserv/patches/001-use-define-_XOPEN_SOURCE-to-get-crypt.patch
new file mode 100644 (file)
index 0000000..c93afcd
--- /dev/null
@@ -0,0 +1,56 @@
+From ef48fe731f8b43c58b9580a048d793a69bd5a903 Mon Sep 17 00:00:00 2001
+From: Nikos Mavrogiannopoulos <nmav@gnutls.org>
+Date: Sat, 29 Nov 2014 19:44:03 +0100
+Subject: [PATCH] use define _XOPEN_SOURCE to get crypt()
+
+---
+ configure.ac     | 3 ++-
+ src/auth/plain.c | 3 +++
+ src/ocpasswd.c   | 3 +++
+ 3 files changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 8bb0044..622929d 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -190,7 +190,8 @@ fi
+ gl_INIT
+-AC_LIB_HAVE_LINKFLAGS(crypt,, [#include <unistd.h>], [crypt(0,0);])
++AC_LIB_HAVE_LINKFLAGS(crypt,, [#define _XOPEN_SOURCE
++#include <unistd.h>], [crypt(0,0);])
+ AC_ARG_WITH(utmp,
+   AS_HELP_STRING([--without-utmp], [do not use libutil for utmp support]),
+diff --git a/src/auth/plain.c b/src/auth/plain.c
+index f429ef4..0e13241 100644
+--- a/src/auth/plain.c
++++ b/src/auth/plain.c
+@@ -22,6 +22,9 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <syslog.h>
++#ifndef _XOPEN_SOURCE
++# define _XOPEN_SOURCE
++#endif
+ #include <unistd.h>
+ #include <vpn.h>
+ #include <c-ctype.h>
+diff --git a/src/ocpasswd.c b/src/ocpasswd.c
+index 8b33d76..aced94a 100644
+--- a/src/ocpasswd.c
++++ b/src/ocpasswd.c
+@@ -23,6 +23,9 @@
+ #include <string.h>
+ #include <stdlib.h>
+ #include <stdint.h>
++#ifndef _XOPEN_SOURCE
++# define _XOPEN_SOURCE
++#endif
+ #include <unistd.h>
+ #include <gnutls/gnutls.h>
+ #include <gnutls/crypto.h>    /* for random */
+-- 
+2.1.3
+
index c14dd32a6fc423932311c36b8ba29ecfc15cc4b7..2faa38cef5ace5f9d524d9295c0f760241a277ec 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=openconnect
-PKG_VERSION:=6.00
-PKG_RELEASE:=4
+PKG_VERSION:=7.00
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=ftp://ftp.infradead.org/pub/openconnect/
-PKG_MD5SUM:=7e28e23c6e281be31446e6c365f5d273
+PKG_MD5SUM:=208b03fb66cd8e26633a19b9e12f35af
 
 PKG_CONFIG_DEPENDS:= \
        CONFIG_OPENCONNECT_GNUTLS \
@@ -47,7 +47,8 @@ endef
 
 CONFIGURE_ARGS += \
        --disable-shared \
-       --with-vpnc-script=/lib/netifd/vpnc-script
+       --with-vpnc-script=/lib/netifd/vpnc-script \
+       --without-libpcsclite
 
 ifeq ($(CONFIG_OPENCONNECT_OPENSSL),y)
 CONFIGURE_ARGS += \
index 30513f6b4f9e31ec134b20f5322d45d2522fb6b8..307e3a758f7645b2f29ba0d9aa0e0bef5aaf8a41 100755 (executable)
@@ -38,10 +38,10 @@ proto_openconnect_setup() {
 
        cmdline="$server$port -i vpn-$config --non-inter --syslog --script /lib/netifd/vpnc-script"
 
-       [ -f /etc/openconnect/ca-vpn-$config.pem ] && append cmdline "--cafile /etc/openconnect/ca-vpn-$config.pem"
+       [ -f /etc/openconnect/ca-vpn-$config.pem ] && append cmdline "--no-system-trust --cafile /etc/openconnect/ca-vpn-$config.pem"
        [ -f /etc/openconnect/user-cert-vpn-$config.pem ] && append cmdline "-c /etc/openconnect/user-cert-vpn-$config.pem"
        [ -f /etc/openconnect/user-key-vpn-$config.pem ] && append cmdline "--sslkey /etc/openconnect/user-key-vpn-$config.pem"
-       [ -n "$serverhash" ] && append cmdline "--servercert=$serverhash"
+       [ -n "$serverhash" ] && append cmdline "--no-system-trust --servercert=$serverhash"
        [ -n "$authgroup" ] && append cmdline "--authgroup $authgroup"
        [ -n "$username" ] && append cmdline "-u $username"
        [ -n "$password" ] && {
diff --git a/net/openconnect/patches/001-Added-a-default-timeout-value-in-CSTP-handshake-usin.patch b/net/openconnect/patches/001-Added-a-default-timeout-value-in-CSTP-handshake-usin.patch
deleted file mode 100644 (file)
index 8981805..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-From 826ad45a86f1556910c2f00dfa6477879deb978f Mon Sep 17 00:00:00 2001
-From: Nikos Mavrogiannopoulos <nmav@gnutls.org>
-Date: Thu, 24 Jul 2014 21:59:01 +0200
-Subject: [PATCH] Added a default timeout value in CSTP handshake using gnutls
-
-[dwmw2: move it to openconnect_open_https() so it's done only once]
-
-Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
-Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
----
- gnutls.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/gnutls.c b/gnutls.c
-index 3e3204a..2ef836c 100644
---- a/gnutls.c
-+++ b/gnutls.c
-@@ -2017,6 +2017,10 @@ int openconnect_open_https(struct openconnect_info *vpninfo)
-       vpn_progress(vpninfo, PRG_INFO, _("SSL negotiation with %s\n"),
-                    vpninfo->hostname);
-+#ifdef GNUTLS_DEFAULT_HANDSHAKE_TIMEOUT
-+      gnutls_handshake_set_timeout(vpninfo->https_sess,
-+                                   GNUTLS_DEFAULT_HANDSHAKE_TIMEOUT);
-+#endif
-       err = cstp_handshake(vpninfo, 1);
-       if (err)
--- 
-2.0.0
-
diff --git a/net/openconnect/patches/001-always-resolve-ips.patch b/net/openconnect/patches/001-always-resolve-ips.patch
new file mode 100644 (file)
index 0000000..820ee2d
--- /dev/null
@@ -0,0 +1,161 @@
+diff --git a/cstp.c b/cstp.c
+index b1235ef..f955b82 100644
+--- a/cstp.c
++++ b/cstp.c
+@@ -570,7 +570,10 @@ int openconnect_make_cstp_connection(struct openconnect_info *vpninfo)
+       return ret;
+ }
+-static int cstp_reconnect(struct openconnect_info *vpninfo)
++/* When dead peer is set, this function will re-attempt resolving
++ * the peer in case its IP changed.
++ */
++static int cstp_reconnect(struct openconnect_info *vpninfo, unsigned dead_peer)
+ {
+       int ret;
+       int timeout;
+@@ -591,6 +594,16 @@ static int cstp_reconnect(struct openconnect_info *vpninfo)
+       timeout = vpninfo->reconnect_timeout;
+       interval = vpninfo->reconnect_interval;
++      /* handle cases with dynamic DNS by forcing a new resolve.
++       * The original IP is saved to retry as fallback if resolving
++       * fails.
++       */
++      if (dead_peer && vpninfo->first_peer_addr == NULL) {
++              vpninfo->first_peer_addr = vpninfo->peer_addr;
++              vpninfo->first_peer_addrlen = vpninfo->peer_addrlen;
++              vpninfo->peer_addr = NULL;
++      }
++
+       while ((ret = openconnect_make_cstp_connection(vpninfo))) {
+               if (timeout <= 0)
+                       return ret;
+@@ -611,6 +624,11 @@ static int cstp_reconnect(struct openconnect_info *vpninfo)
+               interval += vpninfo->reconnect_interval;
+               if (interval > RECONNECT_INTERVAL_MAX)
+                       interval = RECONNECT_INTERVAL_MAX;
++
++              if (dead_peer && vpninfo->first_peer_addr != NULL) {
++                      free(vpninfo->peer_addr);
++                      vpninfo->peer_addr = NULL;
++              }
+       }
+       script_config_tun(vpninfo, "reconnect");
+       return 0;
+@@ -903,8 +921,15 @@ int cstp_mainloop(struct openconnect_info *vpninfo, int *timeout)
+               /* Not that this will ever happen; we don't even process
+                  the setting when we're asked for it. */
+               vpn_progress(vpninfo, PRG_INFO, _("CSTP rekey due\n"));
+-              if (vpninfo->ssl_times.rekey_method == REKEY_TUNNEL)
+-                      goto do_reconnect;
++              if (vpninfo->ssl_times.rekey_method == REKEY_TUNNEL) {
++                      ret = cstp_reconnect(vpninfo, 0);
++                      if (ret) {
++                              vpn_progress(vpninfo, PRG_ERR, _("Reconnect failed\n"));
++                              vpninfo->quit_reason = "CSTP reconnect failed";
++                              return ret;
++                      }
++                      goto do_dtls_reconnect;
++              }
+               else if (vpninfo->ssl_times.rekey_method == REKEY_SSL) {
+                       ret = cstp_handshake(vpninfo, 0);
+                       if (ret) {
+@@ -922,7 +947,7 @@ int cstp_mainloop(struct openconnect_info *vpninfo, int *timeout)
+               vpn_progress(vpninfo, PRG_ERR,
+                            _("CSTP Dead Peer Detection detected dead peer!\n"));
+       do_reconnect:
+-              ret = cstp_reconnect(vpninfo);
++              ret = cstp_reconnect(vpninfo, 1);
+               if (ret) {
+                       vpn_progress(vpninfo, PRG_ERR, _("Reconnect failed\n"));
+                       vpninfo->quit_reason = "CSTP reconnect failed";
+diff --git a/library.c b/library.c
+index f5d3dc9..7c8d5ec 100644
+--- a/library.c
++++ b/library.c
+@@ -178,6 +178,7 @@ void openconnect_vpninfo_free(struct openconnect_info *vpninfo)
+               CloseHandle(vpninfo->dtls_event);
+ #endif
+       free(vpninfo->peer_addr);
++      free(vpninfo->first_peer_addr);
+       free_optlist(vpninfo->csd_env);
+       free_optlist(vpninfo->script_env);
+       free_optlist(vpninfo->cookies);
+@@ -291,6 +292,8 @@ int openconnect_set_hostname(struct openconnect_info *vpninfo,
+       vpninfo->unique_hostname = NULL;
+       free(vpninfo->peer_addr);
+       vpninfo->peer_addr = NULL;
++      free(vpninfo->first_peer_addr);
++      vpninfo->first_peer_addr = NULL;
+       return 0;
+ }
+diff --git a/openconnect-internal.h b/openconnect-internal.h
+index 1bc79e5..cafbb3c 100644
+--- a/openconnect-internal.h
++++ b/openconnect-internal.h
+@@ -424,6 +424,9 @@ struct openconnect_info {
+       struct sockaddr *peer_addr;
+       struct sockaddr *dtls_addr;
++      struct sockaddr *first_peer_addr;
++      socklen_t first_peer_addrlen;
++
+       int dtls_local_port;
+       int deflate;
+diff --git a/ssl.c b/ssl.c
+index b50652d..e341871 100644
+--- a/ssl.c
++++ b/ssl.c
+@@ -110,6 +110,7 @@ int connect_https_socket(struct openconnect_info *vpninfo)
+ {
+       int ssl_sock = -1;
+       int err;
++      unsigned retry_old_ip = 0;
+       if (!vpninfo->port)
+               vpninfo->port = 443;
+@@ -230,6 +231,8 @@ int connect_https_socket(struct openconnect_info *vpninfo)
+                       if (hints.ai_flags & AI_NUMERICHOST)
+                               free(hostname);
+                       ssl_sock = -EINVAL;
++                      if (vpninfo->first_peer_addr != NULL)
++                              retry_old_ip = 1;
+                       goto out;
+               }
+               if (hints.ai_flags & AI_NUMERICHOST)
+@@ -291,7 +294,10 @@ int connect_https_socket(struct openconnect_info *vpninfo)
+               }
+               freeaddrinfo(result);
++
+               if (ssl_sock < 0) {
++                      if (vpninfo->first_peer_addr != NULL)
++                              retry_old_ip = 1;
+                       vpn_progress(vpninfo, PRG_ERR,
+                                    _("Failed to connect to host %s\n"),
+                                    vpninfo->proxy?:vpninfo->hostname);
+@@ -314,6 +320,21 @@ int connect_https_socket(struct openconnect_info *vpninfo)
+               }
+       }
+  out:
++      if (retry_old_ip != 0 && vpninfo->first_peer_addr != NULL) {
++              vpn_progress(vpninfo, PRG_ERR,
++                           _("Retrying connection to host %s with original IP\n"),
++                                   vpninfo->proxy?:vpninfo->hostname);
++
++              retry_old_ip = 0;
++              if (vpninfo->first_peer_addrlen > vpninfo->peer_addrlen || vpninfo->peer_addr == NULL)
++                      realloc_inplace(vpninfo->peer_addr, vpninfo->first_peer_addrlen);
++
++              if (vpninfo->peer_addr != NULL) {
++                      memcpy(vpninfo->peer_addr, vpninfo->first_peer_addr, vpninfo->first_peer_addrlen);
++                      goto reconnect;
++              }
++      }
++
+       /* If proxy processing returned -EAGAIN to reconnect before attempting
+          further auth, and we failed to reconnect, we have to clean up here. */
+       cleanup_proxy_auth(vpninfo);
index 526759cf1ef2530cead76bf8dd2d073162ce0e64..d4930f855abd76cc76c1410f134d4827f3110b78 100644 (file)
@@ -17,7 +17,7 @@ PKG_SOURCE_URL:=http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/ \
 PKG_MD5SUM:=3246aa79317b1d23cae783a3bf8275d6
 
 PKG_LICENSE:=BSD ISC
-PKG_LICENSE_FILE:=LICENCE
+PKG_LICENSE_FILES:=LICENCE
 
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
index bfcf65cba88c04a77784eda840646e1b3d70d984..9fafaf2e384fb72d97175827fbad304d5098c1e3 100644 (file)
@@ -8,9 +8,9 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=opentracker
-PKG_VERSION:=20130804
+PKG_VERSION:=20141007
 PKG_RELEASE:=1
-PKG_REV:=954f5029dfa17734dc408336ef710c192268e8a4
+PKG_REV:=6c60309745ced3c121a2c5c7d80ed85a573b848e
 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
 PKG_LICENSE:=Beerware
 
index f3f9038028cebcc509c471a4e1522186a8bdfb46..bbaf8d99e60451ef4631cc89e2dae7630c6aea2f 100644 (file)
@@ -1,7 +1,5 @@
-Index: opentracker-20130804/Makefile
-===================================================================
---- opentracker-20130804.orig/Makefile
-+++ opentracker-20130804/Makefile
+--- a/Makefile
++++ b/Makefile
 @@ -9,13 +9,13 @@ CC?=gcc
  
  # BSD flavour
index a198d0a85cd258d686ba746f06078b7461e5d6ef..397c1da4b21f37dd85985cea79a61f43dfecb029 100644 (file)
@@ -15,7 +15,7 @@ PKG_RELEASE:=1
 PKG_VERSION:=2.3.0
 PKG_RELEASE=$(PKG_SOURCE_VERSION)
 PKG_LICENSE:=Apache-2.0
-PKG_LICENSE_FILE:=COPYING
+PKG_LICENSE_FILES:=COPYING
 PKG_USE_MIPS16:=0
 
 PKG_SOURCE_PROTO:=git
index 482d612674944b52e1c39d08415d99ffc1be69dc..6336717b0981725acb0254842caf6aba4b2e81f9 100644 (file)
@@ -18,7 +18,7 @@ PKG_SOURCE_VERSION:=6a3234eaa79f15857260df31f98711ef24266191
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
 
 PKG_LICENSE:=GPL-2.0
-PKG_LICENSE_FILE:=COPYING
+PKG_LICENSE_FILES:=COPYING
 
 PKG_FIXUP:=autoreconf
 PKG_BUILD_PARALLEL:=1
index 91a86a32aabe09af218689c8daa242bd1cf3103d..bb3fc7d64b4e7c983d558ed0d83ba545192cdebf 100644 (file)
@@ -18,7 +18,7 @@ PKG_MD5SUM:=69b8155dd442a6f24e28ef5407d868eb
 PKG_MAINTAINER:= Ted Hess <thess@kitschensync.net>
 
 PKG_LICENSE:=GPL-2.0 OpenSSL
-PKG_LICENSE_FILE:=COPYING COPYING.OpenSSL
+PKG_LICENSE_FILES:=COPYING COPYING.OpenSSL
 
 PKG_INSTALL:=1
 
index 31c54812073d37942f05e461fa867f00cd9b3532..298220dfa97266fd1da6bfd164a645136cd426dd 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=sqm-scripts
 PKG_VERSION:=7
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 PKG_LICENSE:=GPLv2
 
 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
@@ -44,8 +44,14 @@ define Build/Compile
 endef
 
 define Package/sqm-scripts/install
-       $(INSTALL_DIR) $(1)
-       $(CP) ./files/* $(1)/
+       $(INSTALL_DIR) $(1)/etc/init.d
+       $(INSTALL_BIN) ./files/etc/init.d/sqm $(1)/etc/init.d/sqm
+       $(INSTALL_DIR) $(1)/etc/config
+       $(INSTALL_DATA) ./files/etc/config/sqm $(1)/etc/config/sqm
+       $(INSTALL_DIR) $(1)/usr/lib/sqm
+       $(INSTALL_BIN) ./files/usr/lib/sqm/*.sh $(1)/usr/lib/sqm/
+       $(INSTALL_BIN) ./files/usr/lib/sqm/*.qos $(1)/usr/lib/sqm/
+       $(INSTALL_DATA) ./files/usr/lib/sqm/*.help $(1)/usr/lib/sqm/
 endef
 
 $(eval $(call BuildPackage,sqm-scripts))
index ae0407203bf192a61fde966e09135803c95a4aec..1f120a908fc168f04eae02596d27bad1f7d2ca78 100644 (file)
@@ -21,7 +21,7 @@ PKG_SOURCE_URL:=http://www.spreadspace.org/tcpproxy/releases/
 PKG_MD5SUM:=55126473bcde635f9ee019c6caf19bb7
 PKG_MAINTAINER:=Christian Pointner <equinox@spreadspace.org>
 PKG_LICENSE:=GPL-3.0+
-PKG_LICENSE_FILE:=LICENSE
+PKG_LICENSE_FILES:=LICENSE
 include $(INCLUDE_DIR)/package.mk
 
 
index 8efa9e72aa5e4aa6e1ca42ef8a6e54dde8da31db..d1fb251ee70200840059b9526760d3c86ce2f614 100644 (file)
@@ -10,6 +10,7 @@ PKG_NAME:=tgt
 PKG_VERSION:=1.0.48
 PKG_REV:=22d9567f39e5eb8a794ce2cb5a2190abdbecaa1f
 PKG_RELEASE:=1
+PKG_USE_MIPS16:=0
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/fujita/tgt.git
index 98fda865bfeb01e2e99071eaa50734d6279804a3..3b88ac4584280b0a18dcc75bfc0e056abb10e5f0 100644 (file)
@@ -16,7 +16,7 @@ PKG_SOURCE_URL:=https://www.torproject.org/dist \
        https://archive.torproject.org/tor-package-archive
 PKG_MD5SUM:=9acb86b529f0f48cc495da3801f85d1f
 PKG_MAINTAINER:=Hauke Mehrtens <hauke@hauke-m.de>
-PKG_LICENSE_FILE:=LICENSE
+PKG_LICENSE_FILES:=LICENSE
 
 PKG_BUILD_DEPENDS:=libminiupnpc libnatpmp
 PKG_INSTALL:=1
index 5e98197d14d9d12a83d08ecf7a804019934ee908..5091920e430b8edc6661584c0b6cb53a566fd0b7 100644 (file)
@@ -21,7 +21,7 @@ PKG_MD5SUM:=ce47ad45003ff1d84eaf5276941b9ddf
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
 PKG_MAINTAINER:=Christian Pointner <equinox@spreadspace.org>
 PKG_LICENSE:=GPL-3.0+
-PKG_LICENSE_FILE:=LICENSE
+PKG_LICENSE_FILES:=LICENSE
 include $(INCLUDE_DIR)/package.mk
 
 
index 375712b7ea0bd7cd7749e2a58d5e4a874fe2092d..0cca3e4d9d725e600b6916a05e27ce459cfbe17f 100644 (file)
@@ -19,7 +19,7 @@ PKG_SOURCE_URL:=ftp://ftp.netfilter.org/pub/ulogd/ \
 PKG_MD5SUM:=7c71ec460dfea5287eba27472c521ebc
 
 PKG_LICENSE:=GPL-2.0
-PKG_LICENSE_FILE:=COPYING
+PKG_LICENSE_FILES:=COPYING
 PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org>
 
 PKG_FIXUP:=autoreconf
index 55867ee55a35e7d1811e5a3b4b1596a9bded0529..5567dca6ddaf469fe4dbe58c8a24e4878f84e3f2 100644 (file)
@@ -12,7 +12,7 @@ PKG_VERSION:=1.4.22
 PKG_RELEASE:=1
 
 PKG_LICENSE:=BSD-3-Clause
-PKG_LICENSE_FILE:=LICENSE
+PKG_LICENSE_FILES:=LICENSE
 PKG_MAINTAINER:=Michael Hanselmann <public@hansmi.ch>
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
index 1d73922f4ef820435f866db741c8eb7afdfb576b..9681c47333ee7237a270f3ddcd9d3f6104ab5f28 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=znc
 PKG_VERSION:=1.4
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://znc.in/releases \
@@ -33,7 +33,7 @@ endef
 
 define Package/znc
   $(Package/znc/default)
-  DEPENDS:=+libopenssl +libpthread $(CXX_DEPENDS)
+  DEPENDS:=+libopenssl +libpthread +libstdcpp
   MENU:=1
 endef
 
@@ -261,14 +261,13 @@ $(eval $(call webskin,ice))
 
 PKG_CONFIG_DEPENDS := $(patsubst %,CONFIG_PACKAGE_%,$(ZNC_MODULES))
 
-include $(INCLUDE_DIR)/uclibc++.mk
 include $(INCLUDE_DIR)/package.mk
 
 CONFIGURE_VARS += \
-       CXXFLAGS="$(TARGET_CFLAGS) -fno-builtin -fno-rtti -nostdinc++" \
+       CXXFLAGS="$(TARGET_CFLAGS) -fno-builtin -fno-rtti" \
        CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
        LDFLAGS="-nodefaultlibs -lc -L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
-       LIBS="-luClibc++ -lm -lssl -lcrypto $(LIBGCC_S) -lc"
+       LIBS="-lstdc++ -lm -lssl -lcrypto $(LIBGCC_S) -lc"
 
 CONFIGURE_ARGS += \
        --disable-c-ares \
diff --git a/net/znc/patches/002-Uclibcpp_build_fix.patch b/net/znc/patches/002-Uclibcpp_build_fix.patch
deleted file mode 100644 (file)
index df27c80..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-From fa14938321eda39f16bee6068296e6abc9df7b85 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jonas.gorski+openwrt@gmail.com>
-Date: Wed, 6 Apr 2011 04:11:48 +0200
-Subject: [PATCH] Add a uClibc++ build workaround
-
----
- modules/webadmin.cpp |    4 +++-
- 1 files changed, 3 insertions(+), 1 deletions(-)
-
---- a/modules/webadmin.cpp
-+++ b/modules/webadmin.cpp
-@@ -20,6 +20,7 @@
- #include <znc/IRCNetwork.h>
- #include <znc/IRCSock.h>
-+using std::string;
- using std::stringstream;
- using std::make_pair;
- using std::set;
-@@ -75,7 +76,7 @@ class CWebAdminMod : public CModule {
- public:
-       MODCONSTRUCTOR(CWebAdminMod) {
-               VPair vParams;
--              vParams.push_back(make_pair("user", ""));
-+              vParams.push_back(make_pair((string)"user", (string)""));
-               AddSubPage(new CWebSubPage("settings", "Global Settings", CWebSubPage::F_ADMIN));
-               AddSubPage(new CWebSubPage("edituser", "Your Settings", vParams));
-               AddSubPage(new CWebSubPage("traffic", "Traffic Info", CWebSubPage::F_ADMIN));
diff --git a/net/znc/patches/900-remove_cpp11_usage.patch b/net/znc/patches/900-remove_cpp11_usage.patch
deleted file mode 100644 (file)
index e87730b..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/modules/certauth.cpp b/modules/certauth.cpp
-index 61e5687..4857d59 100644
---- a/modules/certauth.cpp
-+++ b/modules/certauth.cpp
-@@ -204,7 +204,7 @@ public:
-                       return;
-               }
--              SCString::const_iterator it2 = it->second.begin();
-+              SCString::iterator it2 = it->second.begin();
-               while (id > 1) {
-                       ++it2;
-                       id--;
index 0bdd231fa80e35d4f7ffab9a7a92b2248b2aa26a..75925d57f7f48d46144f8420066ddf9cc13b7cab 100644 (file)
@@ -18,7 +18,7 @@ PKG_MD5SUM:=da87b90b57934234589b63e347921458
 PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
 
 PKG_LICENSE:=GPL-2.0
-PKG_LICENSE_FILE:=COPYING
+PKG_LICENSE_FILES:=COPYING
 
 PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
index 1d2ce22dca538db8e6bad21aaf667357574c575f..9146a844382771ecf191f3d8c4ab09add71a30c1 100644 (file)
@@ -17,7 +17,7 @@ PKG_MD5SUM:=900657ff55726f4cc09a27eb7df57015
 PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
 
 PKG_LICENSE:=GPL-2.0
-PKG_LICENSE_FILE:=COPYING
+PKG_LICENSE_FILES:=COPYING
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
 PKG_BUILD_PARALLEL:=1
index 1d8c1739a45d7ba3de70b647cf0cdbfe78dd6d9a..ce059cbb4d1cd627c477c12eee41edaeedeecd1e 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ccid
-PKG_VERSION:=1.4.17
+PKG_VERSION:=1.4.18
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=https://alioth.debian.org/frs/download.php/file/4091
-PKG_MD5SUM:=a227a20a0dd034cd4bb7400806a0a2d0
+PKG_SOURCE_URL:=https://alioth.debian.org/frs/download.php/file/4111
+PKG_MD5SUM:=8d57342bda53aaee706ef2d02409c4f4
 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
 PKG_LICENSE:=LGPL-2.1+
 PKG_LICENSE_FILES:=COPYING
index a85c12417672377cc013556d2f2a449e6a1d6395..5b9f52d1c25f6b90ef5b7544677474609aa6aff5 100644 (file)
@@ -17,7 +17,7 @@ PKG_MD5SUM:=6633b2354b7f23f9cd8e2bfb6e735965
 
 PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
 PKG_LICENSE:=MIT
-PKG_LICENSE_FILE:=doc/COPYING
+PKG_LICENSE_FILES:=doc/COPYING
 
 include $(INCLUDE_DIR)/package.mk
 
index 4500e88e478e0078007cf7119cc7e36664067d1d..3b9f17d37f7ff30dc5eab054ffb14ab9f384474b 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=coreutils
-PKG_VERSION:=8.16
+PKG_VERSION:=8.23
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@GNU/coreutils
-PKG_MD5SUM:=89b06f91634208dceba7b36ad1f9e8b9
+PKG_MD5SUM:=abed135279f87ad6762ce57ff6d89c41
 PKG_BUILD_DEPENDS:=libpthread
 PKG_MAINTAINER:=Jo-Philipp Wich <jow@openwrt.org>
 
@@ -36,6 +36,12 @@ DEPENDS_sort = +libpthread
 DEPENDS_timeout = +librt
 DEPENDS_expr = +libgmp
 DEPENDS_factor = +libgmp
+DEPENDS_cp = +libacl
+DEPENDS_dir = +libacl
+DEPENDS_install = +libacl
+DEPENDS_ls = +libacl
+DEPENDS_mv = +libacl
+DEPENDS_vdir = +libacl
 
 define Package/coreutils/Default
   SECTION:=utils
@@ -89,7 +95,7 @@ define Build/Compile
        $(MAKE) -C $(PKG_BUILD_DIR) \
                DESTDIR="$(PKG_INSTALL_DIR)" \
                SHELL="/bin/bash" \
-               all install install-root
+               all install
 endef
 
 define Package/coreutils/install
index 2c04117509f5124ec9ea1d0a8da4a75374f6c48d..60f2df2b8061975dac81453d7c6058a7d859515b 100644 (file)
@@ -4,19 +4,86 @@
  
  ALL_RECURSIVE_TARGETS =
  
--SUBDIRS = lib src doc man po tests gnulib-tests
-+SUBDIRS = lib src po
+-SUBDIRS = po . gnulib-tests
++SUBDIRS = po
  
  changelog_etc =                               \
    ChangeLog-2005                      \
+@@ -213,6 +213,4 @@ AM_CPPFLAGS = -Ilib -I$(top_srcdir)/lib
+ include $(top_srcdir)/lib/local.mk
+ include $(top_srcdir)/src/local.mk
+-include $(top_srcdir)/doc/local.mk
+-include $(top_srcdir)/man/local.mk
+-include $(top_srcdir)/tests/local.mk
++
 --- a/Makefile.in
 +++ b/Makefile.in
-@@ -1639,7 +1639,7 @@ top_srcdir = @top_srcdir@
- # Some tests always need root privileges, others need them only sometimes.
- ALL_RECURSIVE_TARGETS = install-root check-root distcheck-hook
--SUBDIRS = lib src doc man po tests gnulib-tests
-+SUBDIRS = lib src po
+@@ -159,8 +159,7 @@ build_triplet = @build@
+ host_triplet = @host@
+ DIST_COMMON = $(top_srcdir)/lib/local.mk $(srcdir)/lib/gnulib.mk \
+       $(top_srcdir)/src/local.mk $(srcdir)/src/cu-progs.mk \
+-      $(top_srcdir)/src/single-binary.mk $(top_srcdir)/doc/local.mk \
+-      $(top_srcdir)/man/local.mk $(top_srcdir)/tests/local.mk \
++      $(top_srcdir)/src/single-binary.mk \
+       INSTALL NEWS README AUTHORS ChangeLog $(srcdir)/Makefile.in \
+       $(srcdir)/Makefile.am $(top_srcdir)/configure \
+       $(am__configure_deps) $(top_srcdir)/lib/config.hin ABOUT-NLS \
+@@ -2276,11 +2275,7 @@ RECURSIVE_TARGETS = all-recursive check-
+       install-ps-recursive install-recursive installcheck-recursive \
+       installdirs-recursive pdf-recursive ps-recursive \
+       tags-recursive uninstall-recursive
+-am__can_run_installinfo = \
+-  case $$AM_UPDATE_INFO_DIR in \
+-    n|no|NO) false;; \
+-    *) (install-info --version) >/dev/null 2>&1;; \
+-  esac
++am__can_run_installinfo = false
+ am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+ am__vpath_adj = case $$p in \
+     $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+@@ -2606,7 +2601,7 @@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@
+ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
+ ERRNO_H = @ERRNO_H@
+ EXEEXT = @EXEEXT@
+-EXTRA_MANS = @EXTRA_MANS@
++EXTRA_MANS = 
+ FLOAT_H = @FLOAT_H@
+ FNMATCH_H = @FNMATCH_H@
+ GETADDRINFO_LIB = @GETADDRINFO_LIB@
+@@ -3820,7 +3815,7 @@ libexecdir = @libexecdir@
+ lispdir = @lispdir@
+ localedir = @localedir@
+ localstatedir = @localstatedir@
+-man1_MANS = @man1_MANS@
++man1_MANS = 
+ mandir = @mandir@
+ mkdir_p = @mkdir_p@
+ oldincludedir = @oldincludedir@
+@@ -3843,7 +3838,7 @@ top_build_prefix = @top_build_prefix@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+ ALL_RECURSIVE_TARGETS = distcheck-hook check-root
+-SUBDIRS = po . gnulib-tests
++SUBDIRS = po
  changelog_etc = \
    ChangeLog-2005                      \
    ChangeLog-2006                      \
+@@ -5767,7 +5762,7 @@ all: $(BUILT_SOURCES)
+ .SUFFIXES: .1 .c .dvi .log .o .obj .pl .pl$(EXEEXT) .ps .sed .sh .sh$(EXEEXT) .sin .trs .x .xpl .xpl$(EXEEXT) .y
+ am--refresh: Makefile
+       @:
+-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am $(top_srcdir)/lib/local.mk $(srcdir)/lib/gnulib.mk $(top_srcdir)/src/local.mk $(srcdir)/src/cu-progs.mk $(top_srcdir)/src/single-binary.mk $(top_srcdir)/doc/local.mk $(top_srcdir)/man/local.mk $(top_srcdir)/tests/local.mk $(am__configure_deps)
++$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am $(top_srcdir)/lib/local.mk $(srcdir)/lib/gnulib.mk $(top_srcdir)/src/local.mk $(srcdir)/src/cu-progs.mk $(top_srcdir)/src/single-binary.mk $(am__configure_deps)
+       @for dep in $?; do \
+         case '$(am__configure_deps)' in \
+           *$$dep*) \
+@@ -5790,7 +5785,7 @@ Makefile: $(srcdir)/Makefile.in $(top_bu
+           echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+           cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+       esac;
+-$(top_srcdir)/lib/local.mk $(srcdir)/lib/gnulib.mk $(top_srcdir)/src/local.mk $(srcdir)/src/cu-progs.mk $(top_srcdir)/src/single-binary.mk $(top_srcdir)/doc/local.mk $(top_srcdir)/man/local.mk $(top_srcdir)/tests/local.mk:
++$(top_srcdir)/lib/local.mk $(srcdir)/lib/gnulib.mk $(top_srcdir)/src/local.mk $(srcdir)/src/cu-progs.mk $(top_srcdir)/src/single-binary.mk:
+ $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+       $(SHELL) ./config.status --recheck
index bee8a5656a7ecaec423f789ddb5689e5b71c20df..94187e4b6a30eb1db38a46933d397bb2a0d1a598 100644 (file)
@@ -1,6 +1,6 @@
 --- a/lib/pthread.in.h
 +++ b/lib/pthread.in.h
-@@ -232,6 +232,9 @@ pthread_mutex_unlock (pthread_mutex_t *m
+@@ -252,6 +252,9 @@ pthread_mutex_unlock (pthread_mutex_t *m
  
  /* Approximate spinlocks with mutexes.  */
  
@@ -9,4 +9,4 @@
 +#endif
  typedef pthread_mutex_t pthread_spinlock_t;
  
static inline int
_GL_PTHREAD_INLINE int
diff --git a/utils/coreutils/patches/010-fix-gets-removal.patch b/utils/coreutils/patches/010-fix-gets-removal.patch
deleted file mode 100644 (file)
index 2be5fc4..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-diff --git a/lib/stdio.in.h b/lib/stdio.in.h
-index 9dc7c4a..9fdac77 100644
---- a/lib/stdio.in.h
-+++ b/lib/stdio.in.h
-@@ -711,10 +711,6 @@ _GL_CXXALIAS_SYS (gets, char *, (char *s));
- #  undef gets
- # endif
- _GL_CXXALIASWARN (gets);
--/* It is very rare that the developer ever has full control of stdin,
--   so any use of gets warrants an unconditional warning.  Assume it is
--   always declared, since it is required by C89.  */
--_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
- #endif
index 240e100e76bce3dfaa287b874615393db7e69f82..996369512ca9cbc6bda4f22c98d7be29e23f8c1d 100644 (file)
@@ -21,6 +21,7 @@ PKG_LICENSE:=AFL-2.1
 PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
 
+include $(INCLUDE_DIR)/host-build.mk
 include $(INCLUDE_DIR)/package.mk
 
 TARGET_LDFLAGS+= \
@@ -107,6 +108,29 @@ CONFIGURE_VARS+= \
        ac_cv_have_abstract_sockets="yes" \
        ac_cv_lib_expat_XML_ParserCreate_MM="yes" \
 
+HOST_CONFIGURE_ARGS+= \
+       --enable-shared \
+       --enable-static \
+       --disable-abstract-sockets \
+       --disable-ansi \
+       --disable-asserts \
+       --disable-console-owner-file \
+       --disable-docygen-docs \
+       --disable-compiler_coverage \
+       --disable-selinux \
+       --disable-tests \
+       --disable-verbose-mode \
+       --disable-xml-docs \
+       --with-dbus-user=root \
+       --with-dbus-daemondir="$(STAGIND_DIR_HOST)/bin" \
+       --with-system-socket="$(STAGING_DIR_HOST)/var/run/dbus/system_bus_socket" \
+       --with-system-pid-file="$(STAGING_DIR_HOST)/var/run/dbus.pid" \
+       --without-x \
+       --libexecdir="$(STAGING_DIR_HOST)/lib/dbus-1"
+
+HOST_CONFIGURE_VARS+= \
+       ac_cv_have_abstract_sockets="yes" \
+       ac_cv_lib_expat_XML_ParserCreate_MM="yes" \
 
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include
@@ -184,6 +208,7 @@ define Package/dbus-utils/install
                $(1)/usr/bin/
 endef
 
+$(eval $(call HostBuild))
 $(eval $(call BuildPackage,libdbus))
 $(eval $(call BuildPackage,dbus))
 $(eval $(call BuildPackage,dbus-utils))
index 51fcc9d73f2bef8cb87f62cee5e93d9f2ce54767..82ce06a67ada4831b584a4f711eba7e5b931e6f9 100644 (file)
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=dump1090
-PKG_VERSION:=2014-10-27
+PKG_VERSION:=2014-11-09
 PKG_RELEASE:=$(PKG_SOURCE_VERSION)
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=git://github.com/MalcolmRobb/dump1090.git
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=65751ed6e9e20dcd6ab4e693cc5c80c698664da8
+PKG_SOURCE_VERSION:=bff92c4ad772a0a8d433f788d39dae97e00e4dbe
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
 
index 2267798a96c61fae572410cc0b2ccb1312500953..53d40ef7f6b98fa7359b04265903f4c42a8bd427 100644 (file)
@@ -11,6 +11,7 @@ config dump1090 main
        option modeac '0'
        option net_beast '0'
        option net_only '0'
+       option net_bind_address ''
        option net_http_port '8080'
        option net_ri_port ''
        option net_ro_port ''
index c7c2161e288b8d1d139b8fc8b23251c45836af22..bc0755fb862423c527ceff87d5694aebf01b36a7 100644 (file)
@@ -49,6 +49,7 @@ start_instance() {
        append_bool "$cfg" modeac "--modeac"
        append_bool "$cfg" net_beast "--net-beast"
        append_bool "$cfg" net_only "--net-only"
+       append_arg "$cfg" net_bind_address "--net-bind-address"
        append_arg "$cfg" net_http_port "--net-http-port"
        append_arg "$cfg" net_ri_port "--net-ri-port"
        append_arg "$cfg" net_ro_port "--net-ro-port"
index f1e5f84f706a5e72f7ff1ab8b1ca2d6c58fd314b..0bec41d8b793131f7aa212ed18234220e8985386 100644 (file)
@@ -17,7 +17,7 @@ PKG_SOURCE_URL:=ftp://ftp.franken.de/pub/crypt/mirror/ftp.gnupg.org/gcrypt/gnupg
 PKG_MD5SUM:=54db1be9588b11afbbdd8b82d4ea883a
 
 PKG_LICENSE:=GPL-3.0
-PKG_LICENSE_FILE:=COPYING
+PKG_LICENSE_FILES:=COPYING
 PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org>
 
 PKG_INSTALL:=1
index cf1493ab568c946d04583656d094dd640478c42e..aa222846630b6d69c3c9ae344adbcd2eab980ac5 100644 (file)
@@ -13,7 +13,7 @@ PKG_RELEASE:=1
 
 PKG_MAINTAINER:=Lim Guo Wei <limguowei@gmail.com>
 PKG_LICENSE:=GPL-2.0
-PKG_LICENSE_FILE:=
+PKG_LICENSE_FILES:=
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
 PKG_SOURCE_URL:=@SF/$(PKG_NAME)
diff --git a/utils/hdparm/Makefile b/utils/hdparm/Makefile
new file mode 100644 (file)
index 0000000..8841213
--- /dev/null
@@ -0,0 +1,42 @@
+#
+# Copyright (C) 2006-2014 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=hdparm
+PKG_VERSION:=9.45
+PKG_RELEASE:=1
+PKG_USE_MIPS16:=0
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=@SF/$(PKG_NAME)
+PKG_MD5SUM:=1c75d0751a44928b6c4bc81fb16d7fe8
+PKG_MAINTAINER:=Richard Kunze <richard.kunze@web.de>
+PKG_LICENSE:=BSD-Style Open Source License
+
+include $(INCLUDE_DIR)/package.mk
+
+TARGET_CFLAGS+=-D_GNU_SOURCE
+
+define Package/hdparm
+  SECTION:=utils
+  CATEGORY:=Utilities
+  SUBMENU:=disc
+  TITLE:=Hard disk drive configuration utilitity
+  URL:=http://sourceforge.net/projects/hdparm/
+endef
+
+define Package/hdparm/description
+ get/set SATA/IDE device parameters
+endef
+
+define Package/hdparm/install
+       $(INSTALL_DIR) $(1)/sbin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/sbin
+endef
+
+$(eval $(call BuildPackage,hdparm))
diff --git a/utils/hdparm/patches/001-fix-includes.patch b/utils/hdparm/patches/001-fix-includes.patch
new file mode 100644 (file)
index 0000000..44343fb
--- /dev/null
@@ -0,0 +1,20 @@
+--- a/hdparm.h
++++ b/hdparm.h
+@@ -2,6 +2,7 @@
+ //#undef __KERNEL_STRICT_NAMES
+ #include <linux/types.h>
++#include <sys/types.h>
+ #if !defined(__GNUC__) && !defined(__attribute__)
+ #define __attribute__(x)
+--- a/sysfs.c
++++ b/sysfs.c
+@@ -12,6 +12,7 @@
+ #include <stdio.h>
+ #include <fcntl.h>
+ #include <errno.h>
++#include <limits.h>
+ #include <dirent.h>
+ #include <sys/stat.h>
+ #include <linux/types.h>
index ffdb95843081ed5e015f1962c8801cbdb57ca19e..f08d81e13cccddac2e674c46309f5a1c2eba4cce 100644 (file)
@@ -10,6 +10,8 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=luci-app-lxc
 PKG_RELEASE:=20141012
 
+PKG_LICENSE:=Apache-2.0
+
 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
 
 include $(INCLUDE_DIR)/package.mk
@@ -19,7 +21,7 @@ define Package/luci-app-lxc
   CATEGORY:=LuCI
   SUBMENU:=3. Applications
   TITLE:=LXC management Web UI
-  DEPENDS:=+luci-mod-admin-full +lxc +liblxc +rpcd-mod-lxc
+  DEPENDS:=+luci-mod-admin-full +lxc +lxc-create +liblxc +rpcd-mod-lxc
   MAINTAINER:=Petar Koretic <petar.koretic@sartura.hr>
 endef
 
index ce7b53e6eadd4c30efb6ee3aeed82b1e9bcddb57..f3f5d07ba78da9d20792add2f79b225608df5854 100644 (file)
@@ -80,9 +80,9 @@ function lxc_create(lxc_name, lxc_template)
 
        local target = _G.DISTRIB_TARGET:match('([^/]+)')
 
-       local res = os.execute("lxc-create -t download -n " .. lxc_name .. " -- --server=" .. url .. " --no-validate --dist " .. lxc_template .. " --release bb --arch " .. target)
+       local data = conn:call("lxc", "create", { name = lxc_name, template = "download", args = { "--server", url,  "--no-validate", "--dist", lxc_template, "--release", "bb", "--arch", target } } )
 
-       luci.http.write(tostring(res))
+       luci.http.write(data)
 end
 
 function lxc_action(lxc_action, lxc_name)
index 1a009449395187cb61bee43e674a710494c113ab..d23584ec3667e652d916333feed127023d568a3b 100644 (file)
@@ -9,13 +9,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=LVM2
-PKG_VERSION:=2.02.111
+PKG_VERSION:=2.02.113
 PKG_RELEASE:=1
 PKG_LICENSE:=GPL-2.0 LGPL-2.1
 
 PKG_SOURCE:=$(PKG_NAME).$(PKG_VERSION).tgz
 PKG_SOURCE_URL:=ftp://sources.redhat.com/pub/lvm2
-PKG_MD5SUM:=02487ab2a9e02d1ee76fe217183df28a
+PKG_MD5SUM:=f71aa8e64030f3d2a3fdabcc36e45094
 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME).$(PKG_VERSION)
 
index 0c7dfea7f359dedfe41f9db89e249face96f074d..9fa1c1d5688cffe66dd976d0e0c34496738f62f3 100644 (file)
@@ -1,6 +1,6 @@
 --- a/make.tmpl.in
 +++ b/make.tmpl.in
-@@ -19,7 +19,7 @@
+@@ -19,7 +19,7 @@ SHELL = /bin/sh
  
  # Allow environment to override any built-in default value for CC.
  # If there is a built-in default, CC is NOT set to @CC@ here.
index 0c79d5da11f1a85098d0947f1e36bf33d23051ad..dc159c5529377485237368c679c8d77be5f849ad 100644 (file)
@@ -1,6 +1,5 @@
-diff -urN LVM2.2.02.111.old/lib/device/dev-type.c LVM2.2.02.111/lib/device/dev-type.c
---- LVM2.2.02.111.old/lib/device/dev-type.c    2014-09-17 09:41:08.281821278 -0400
-+++ LVM2.2.02.111/lib/device/dev-type.c        2014-09-17 09:41:50.773821280 -0400
+--- a/lib/device/dev-type.c
++++ b/lib/device/dev-type.c
 @@ -22,7 +22,7 @@
  #include <ctype.h>
  
index 0f34eeafe37e7d83d36aa6914e91d6d43b7894c4..3adfd5de952e6aea6caaf4a460fadfb31b202e4e 100644 (file)
@@ -11,6 +11,8 @@ PKG_NAME:=lxc
 PKG_VERSION:=1.0.6
 PKG_RELEASE:=1
 
+PKG_LICENSE:=LGPL-2.1+ BSD-2-Clause GPL-2.0
+
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://linuxcontainers.org/downloads/
 PKG_MD5SUM:=4aad3aee84b42faa194e44091d723a3b
@@ -33,6 +35,7 @@ LXC_SCRIPTS += \
 
 DEPENDS_APPLETS = +libpthread +libcap +liblxc
 
+DEPENDS_create = +lxc-configs +lxc-hooks +lxc-templates
 DEPENDS_ls = +lxc-config
 DEPENDS_top = +lxc-lua +luafilesystem @BROKEN
 
@@ -162,6 +165,11 @@ define Package/lxc-common/install
        $(INSTALL_DIR) $(1)/etc/lxc/
        $(CP) \
                $(PKG_INSTALL_DIR)/etc/lxc/default.conf \
+               $(1)/etc/lxc/default.conf
+
+       $(INSTALL_DIR) $(1)/etc/lxc/
+       $(CP) \
+               ./files/lxc.conf \
                $(1)/etc/lxc/lxc.conf
 
        $(INSTALL_DIR) $(1)/lxc/
diff --git a/utils/lxc/files/lxc.conf b/utils/lxc/files/lxc.conf
new file mode 100644 (file)
index 0000000..3b77baa
--- /dev/null
@@ -0,0 +1 @@
+lxc.lxcpath = /lxc
diff --git a/utils/lxc/patches/100-lxc-defconfig.patch b/utils/lxc/patches/100-lxc-defconfig.patch
deleted file mode 100644 (file)
index 60a0f92..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
---- a/config/etc/default.conf.unknown
-+++ b/config/etc/default.conf.unknown
-@@ -1 +1,2 @@
-+lxc.lxcpath = /lxc
- lxc.network.type = empty
diff --git a/utils/mc/Config.in b/utils/mc/Config.in
new file mode 100644 (file)
index 0000000..1445aa1
--- /dev/null
@@ -0,0 +1,60 @@
+menu "Configuration"
+       depends on PACKAGE_mc
+
+config MC_DIFFVIEWER
+       bool "Enable internal diff viewer"
+       default n
+       help
+           This option enables the built-in diff viewer.
+           Disabled by default.
+
+config MC_EDITOR
+       bool "Enable internal editor"
+       default n
+       help
+           This option enables the built-in file editor.
+           Disabled by default.
+
+config MC_SUBSHELL
+       bool "Enable concurrent subshell"
+       default n
+       help
+           This option enables concurrent subshell support.
+           Disabled by default.
+
+config MC_LARGEFILE
+       bool "Enable largefile support"
+       default n
+       help
+           This option enables support for large files (> 2 GB).
+           Disabled by default.
+
+config MC_BACKGROUND
+       bool "Enable background operations"
+       default n
+       help
+           This option enables support for background operations which
+           allow to perform some tasks such as copying files in a
+           separate background process. Background code is known
+           to be less stable than the rest of the code.
+           Disabled by default.
+
+config MC_CHARSET
+       bool "Enable charset support"
+       default n
+       help
+           This option adds support for selecting character set of the text in
+           the internal viewer and editor and converting it on the fly.
+           The implementation is currently incomplete.
+           Disabled by default.
+
+config MC_VFS
+       bool "Enable virtual filesystem support"
+       default n
+       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, smb.
+           Disabled by default.
+
+endmenu
diff --git a/utils/mc/Makefile b/utils/mc/Makefile
new file mode 100644 (file)
index 0000000..1fb7bec
--- /dev/null
@@ -0,0 +1,122 @@
+#
+# Copyright (C) 2006-2014 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=mc
+PKG_VERSION:=4.8.13
+PKG_RELEASE:=1.2
+PKG_MAINTAINER:=Dirk Brenken <dibdot@gmail.com>
+PKG_LICENSE:=GPL-3.0+
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE_URL:=http://ftp.midnight-commander.org/
+PKG_MD5SUM:=d967caa12765eb86e52a6a63ca202500
+
+PKG_BUILD_PARALLEL:=1
+PKG_FIXUP:=autoreconf
+
+PKG_CONFIG_DEPENDS := \
+       CONFIG_PACKAGE_MC \
+       CONFIG_MC_DIFFVIEWER \
+       CONFIG_MC_EDITOR \
+       CONFIG_MC_SUBSHELL \
+       CONFIG_MC_LARGEFILE \
+       CONFIG_MC_BACKGROUND \
+       CONFIG_MC_CHARSET \
+       CONFIG_MC_VFS
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/nls.mk
+
+define Package/mc
+  SECTION:=utils
+  CATEGORY:=Utilities
+  DEPENDS:=+glib2 +libncurses +MC_VFS:libssh2 $(LIBRPC_DEPENDS) $(ICONV_DEPENDS)
+  TITLE:=Midnight Commander - a powerful visual file manager
+  URL:=http://www.midnight-commander.org/
+  MENU:=1
+endef
+
+define Package/mc/config
+       source "$(SOURCE)/Config.in"
+endef
+
+define Package/mc/description
+ GNU Midnight Commander is a visual file manager,
+ licensed under GNU General Public License and therefore qualifies as Free Software.
+ It's a feature rich full-screen text mode application that allows you to copy,
+ move and delete files and whole directory trees, search for files
+ and run commands in the subshell. Internal viewer and editor are included.
+endef
+
+CONFIGURE_ARGS += \
+       --disable-doxygen-doc \
+       --with-screen=ncurses \
+       --without-gpm-mouse \
+       --without-x \
+
+CONFIGURE_VARS += \
+       ac_cv_search_addwstr=no \
+
+ifeq ($(CONFIG_MC_DIFFVIEWER),)
+CONFIGURE_ARGS += \
+       --without-diff-viewer
+endif
+
+ifeq ($(CONFIG_MC_EDITOR),)
+CONFIGURE_ARGS += \
+       --without-internal-edit
+endif
+
+ifeq ($(CONFIG_MC_SUBSHELL),)
+CONFIGURE_ARGS += \
+       --without-subshell
+endif
+
+ifeq ($(CONFIG_MC_LARGEFILE),)
+CONFIGURE_ARGS += \
+       --disable-largefile
+endif
+
+ifeq ($(CONFIG_MC_BACKGROUND),)
+CONFIGURE_ARGS += \
+       --disable-background
+endif
+
+ifeq ($(CONFIG_MC_CHARSET),)
+CONFIGURE_ARGS += \
+       --disable-charset
+endif
+
+ifeq ($(CONFIG_MC_VFS),)
+CONFIGURE_ARGS += \
+       --disable-vfs
+endif
+
+define Package/mc/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/mc $(1)/usr/bin
+       $(INSTALL_DIR) $(1)/etc/mc
+ifeq ($(CONFIG_MC_DIFFVIEWER),y)
+       ln -sf mc $(1)/usr/bin/mcdiff
+endif
+ifeq ($(CONFIG_MC_EDITOR),y)
+       ln -sf mc $(1)/usr/bin/mcedit
+endif
+       $(INSTALL_DATA) $(PKG_BUILD_DIR)/misc/mc.menu $(1)/etc/mc
+       $(INSTALL_DIR) $(1)/etc/mc/skins
+       $(INSTALL_DATA) $(PKG_BUILD_DIR)/misc/skins/default.ini $(1)/etc/mc/skins
+       $(INSTALL_DIR) $(1)/root/.mc/cedit/Syntax
+endef
+
+define Package/mc/conffiles
+/etc/mc/mc.menu
+/etc/mc/skins/default.ini
+endef
+
+$(eval $(call BuildPackage,mc))
diff --git a/utils/mpack/Makefile b/utils/mpack/Makefile
new file mode 100644 (file)
index 0000000..c2b77eb
--- /dev/null
@@ -0,0 +1,45 @@
+#
+# Copyright (C) 2007-2014 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=mpack
+PKG_VERSION:=1.6
+PKG_RELEASE:=1
+PKG_LICENSE:=NLPL
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://ftp.andrew.cmu.edu/pub/mpack/
+PKG_MD5SUM:=a70fa5afa76539a9afb70b9d81568fe8
+
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/mpack
+  SECTION:=utils
+  CATEGORY:=Utilities
+  TITLE:=mpack/munpack MIME format mail messages
+  URL:=http://ftp.andrew.cmu.edu/pub/mpack/
+  MAINTAINER:=Dmitry V. Zimin <pfzim@mail.ru>
+endef
+
+define Package/mpack/description
+  Mpack and munpack are utilities for encoding and decoding
+  (respectively) binary files in MIME (Multipurpose Internet Mail
+  Extensions) format mail messages.  For compatibility with older forms
+  of transferring binary files, the munpack program can also decode
+  messages in split-uuencoded format.
+endef
+
+define Package/mpack/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
+endef
+
+$(eval $(call BuildPackage,mpack))
+
index c1fddff16e47bc9496ad7a1f91c099ca0ea5f170..3d87b7d0a748c5d49b43c8e39b841fd1e6289a9b 100644 (file)
@@ -16,7 +16,7 @@ PKG_SOURCE_URL:=http://www.tuxera.com/opensource/
 PKG_MD5SUM:=f11d563816249d730a00498983485f3a
 
 PKG_LICENSE:=GPL-2.0 LGPL-2.0
-PKG_LICENSE_FILE:=COPYING COPYING.LIB
+PKG_LICENSE_FILES:=COPYING COPYING.LIB
 
 PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
diff --git a/utils/open-plc-utils/Makefile b/utils/open-plc-utils/Makefile
new file mode 100644 (file)
index 0000000..bc83525
--- /dev/null
@@ -0,0 +1,103 @@
+#
+# Copyright (C) 2013-2014 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=open-plc-utils
+PKG_VERSION:=2013-01-29
+PKG_RELEASE:=$(PKG_SOURCE_VERSION)
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=git://github.com/qca/open-plc-utils.git
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE_VERSION:=6beeb6fe6ce2b16b14284c26e1b9220b68044591
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
+
+PKG_MAINTAINER:=Florian Fainelli <florian@openwrt.org>
+
+PKG_LICENSE:=ISC
+PKG_LICENSE_FILE:=LICENSE
+
+PKG_BUILD_PARALLEL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/open-plc-utils/Default
+  SECTION:=utils
+  CATEGORY:=Utilities
+  TITLE:=Qualcomm Atheros Power Line Communication utilities
+  URL:=https://github.com/qca/open-plc-utils/blob/master/README
+endef
+
+define Package/open-plc-utils
+  $(call Package/open-plc-utils/Default)
+  MENU:=1
+endef
+
+define GenPlugin
+  define Package/$(addprefix open-plc-utils-,$(1))
+    $(call Package/open-plc-utils/Default)
+    DEPENDS:=open-plc-utils
+    TITLE:=Utility $(2) from the Open PLC utilities
+  endef
+
+   define Package/$(addprefix open-plc-utils-,$(1))/description
+     Utility $(2) from the Open PLC utilities package.
+   endef
+endef
+
+OPEN_PLC_UTILS_APPS:=efbu efeu efru efsu edru edsu nics \
+                    hpavkey hpavkeys rkey mac2pw mac2pwd \
+                    mdioblock mdioblock2 mdiodump mdiogen \
+                    hpav mme \
+                    chknvm chknvm2 nvmsplit nvmmerge \
+                    chkpib chkpib2 setpib getpib modpib pib2xml \
+                    pibcomp pibdump pibruin xml2pib psin psout pskey \
+                    psgraph psnotch pibrump \
+                    int6k int6kboot int6keth int6kf int6khost \
+                    int64host int6kid int6klist int6klog int6kmdio \
+                    int6kmdio2 int6kmod int6kstat int6ktest int6krate \
+                    int6krule int6ktone int6kwait CMEncrypt sada \
+                    coqos_add coqos_info coqos_man coqos_mod coqos_rel \
+                    mdustats ampboot amphost ampID amplist amprate \
+                    ampstat amptest amptool amptone ampwait \
+                    plcboot plchost plcID plclist plcrate plcrule \
+                    plcstat plctest plctool plctone \
+                    plcwait plchostd plcget plcset plcotst plcfwd \
+                    plcdevs plclog plcmdio16 plcmdio32 \
+                    config2cfg sdram \
+                    int6kuart int6kbaud ttysig ptsctl weeder ttysend \
+                    ttyrecv ttycat int6kdetect
+
+$(foreach a,$(OPEN_PLC_UTILS_APPS),$(eval $(call GenPlugin,$(a))))
+
+define Build/Compile
+       $(MAKE) -C $(PKG_BUILD_DIR) \
+               EXTRA_CFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" \
+               LDFLAGS="$(TARGET_CFLAGS) $(TARGET_LDFLAGS)" \
+               CROSS="$(TARGET_CROSS)" \
+               ROOTFS="$(PKG_INSTALL_DIR)" \
+               OWNER="$(shell id -u $(shell whoami))" \
+               GROUP="$(shell id -g $(shell whoami))" \
+               all install
+endef
+
+define Package/open-plc-utils/install
+endef
+
+define BuildPlugin
+  define Package/$(1)/install
+       $(INSTALL_DIR) $$(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/local/bin/$(subst open-plc-utils-,,$(1)) \
+               $$(1)/usr/bin/
+  endef
+
+  $$(eval $$(call BuildPackage,$(1)))
+endef
+
+$(eval $(call BuildPackage,open-plc-utils))
+$(foreach a,$(OPEN_PLC_UTILS_APPS),$(eval $(call BuildPlugin,open-plc-utils-$(a))))
index f17357055f0eb5d8a0991b36b11f2f4d9ae0fb5a..a7b8301490fe90bdbc2d07a3da5c2d99c01c7f59 100644 (file)
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=opensc
-PKG_VERSION:=20140317
+PKG_VERSION:=20141126
 PKG_RELEASE:=1
 PKG_LICENSE:=LGPL-2.1+
 PKG_LICENSE_FILES:=COPYING
@@ -19,7 +19,7 @@ PKG_RELEASE=$(PKG_SOURCE_VERSION)
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/OpenSC/OpenSC.git
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=de6d61405b271e22244376e4817e16b49018e1ce
+PKG_SOURCE_VERSION:=8aadbbd678730dbafb819382da553439887499fd
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_BUILD_DEPENDS:=+libpcsclite
 PKG_FIXUP:=libtool
index 0d79422ca0b81d4c5c9876b694b9e53c546b6294..08b2a8324a386474345b1d0cd1c66804b524f83f 100644 (file)
@@ -1,18 +1,18 @@
-From c706491fc9b08d4cc6d7b254cf936d6b8d8691bc Mon Sep 17 00:00:00 2001
+From 471b40173b73f213ee72bf05735abf3357658197 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Nguy=E1=BB=85n=20H=E1=BB=93ng=20Qu=C3=A2n?=
  <ng.hong.quan@gmail.com>
 Date: Wed, 20 Feb 2013 11:54:30 +0700
-Subject: [PATCH 01/18] OpenPGP: Detect and support Gnuk Token.
+Subject: [PATCH 01/26] OpenPGP: Detect and support Gnuk Token.
 
 http://www.fsij.org/gnuk/
 ---
  src/libopensc/card-openpgp.c | 61 ++++++++++++++++++++++++++++++++++----------
  src/libopensc/cards.h        |  1 +
- src/tools/openpgp-tool.c     |  9 +++++--
- 3 files changed, 56 insertions(+), 15 deletions(-)
+ src/tools/openpgp-tool.c     |  7 ++++-
+ 3 files changed, 55 insertions(+), 14 deletions(-)
 
 diff --git a/src/libopensc/card-openpgp.c b/src/libopensc/card-openpgp.c
-index 743e79c..716052b 100644
+index 6774fe1..c785a55 100644
 --- a/src/libopensc/card-openpgp.c
 +++ b/src/libopensc/card-openpgp.c
 @@ -43,6 +43,7 @@
@@ -66,7 +66,7 @@ index 743e79c..716052b 100644
                                priv->ext_caps |= EXT_CAP_SM;
  
                        if ((priv->bcd_version >= OPENPGP_CARD_2_0) && (blob->len >= 10)) {
-@@ -1055,12 +1060,18 @@ static int
+@@ -1057,12 +1062,18 @@ static int
  pgp_get_pubkey(sc_card_t *card, unsigned int tag, u8 *buf, size_t buf_len)
  {
        sc_apdu_t       apdu;
@@ -86,7 +86,7 @@ index 743e79c..716052b 100644
        apdu.lc = 2;
        apdu.data = ushort2bebytes(idbuf, tag);
        apdu.datalen = 2;
-@@ -1152,6 +1163,7 @@ pgp_put_data(sc_card_t *card, unsigned int tag, const u8 *buf, size_t buf_len)
+@@ -1154,6 +1165,7 @@ pgp_put_data(sc_card_t *card, unsigned int tag, const u8 *buf, size_t buf_len)
        u8 ins = 0xDA;
        u8 p1 = tag >> 8;
        u8 p2 = tag & 0xFF;
@@ -94,7 +94,7 @@ index 743e79c..716052b 100644
        int r;
  
        LOG_FUNC_CALLED(card->ctx);
-@@ -1193,13 +1205,17 @@ pgp_put_data(sc_card_t *card, unsigned int tag, const u8 *buf, size_t buf_len)
+@@ -1195,13 +1207,17 @@ pgp_put_data(sc_card_t *card, unsigned int tag, const u8 *buf, size_t buf_len)
  
        /* Build APDU */
        if (buf != NULL && buf_len > 0) {
@@ -114,7 +114,7 @@ index 743e79c..716052b 100644
                apdu.datalen = buf_len;
                apdu.lc = buf_len;
        }
-@@ -1326,6 +1342,7 @@ pgp_compute_signature(sc_card_t *card, const u8 *data,
+@@ -1328,6 +1344,7 @@ pgp_compute_signature(sc_card_t *card, const u8 *data,
        struct pgp_priv_data    *priv = DRVDATA(card);
        sc_security_env_t       *env = &priv->sec_env;
        sc_apdu_t               apdu;
@@ -122,7 +122,7 @@ index 743e79c..716052b 100644
        int                     r;
  
        LOG_FUNC_CALLED(card->ctx);
-@@ -1334,14 +1351,19 @@ pgp_compute_signature(sc_card_t *card, const u8 *data,
+@@ -1336,14 +1353,19 @@ pgp_compute_signature(sc_card_t *card, const u8 *data,
                LOG_TEST_RET(card->ctx, SC_ERROR_INVALID_ARGUMENTS,
                                "invalid operation");
  
@@ -144,7 +144,7 @@ index 743e79c..716052b 100644
                break;
        case 0x01:
        default:
-@@ -1350,7 +1372,7 @@ pgp_compute_signature(sc_card_t *card, const u8 *data,
+@@ -1352,7 +1374,7 @@ pgp_compute_signature(sc_card_t *card, const u8 *data,
        }
  
        apdu.lc = data_len;
@@ -153,7 +153,7 @@ index 743e79c..716052b 100644
        apdu.datalen = data_len;
        apdu.le = ((outlen >= 256) && !(card->caps & SC_CARD_CAP_APDU_EXT)) ? 256 : outlen;
        apdu.resp    = out;
-@@ -1374,6 +1396,7 @@ pgp_decipher(sc_card_t *card, const u8 *in, size_t inlen,
+@@ -1376,6 +1398,7 @@ pgp_decipher(sc_card_t *card, const u8 *in, size_t inlen,
        struct pgp_priv_data    *priv = DRVDATA(card);
        sc_security_env_t       *env = &priv->sec_env;
        sc_apdu_t       apdu;
@@ -161,7 +161,7 @@ index 743e79c..716052b 100644
        u8              *temp = NULL;
        int             r;
  
-@@ -1398,7 +1421,7 @@ pgp_decipher(sc_card_t *card, const u8 *in, size_t inlen,
+@@ -1400,7 +1423,7 @@ pgp_decipher(sc_card_t *card, const u8 *in, size_t inlen,
        case 0x01: /* Decryption key */
        case 0x02: /* authentication key */
                /* PSO DECIPHER */
@@ -170,7 +170,7 @@ index 743e79c..716052b 100644
                break;
        case 0x00: /* signature key */
        default:
-@@ -1407,8 +1430,13 @@ pgp_decipher(sc_card_t *card, const u8 *in, size_t inlen,
+@@ -1409,8 +1432,13 @@ pgp_decipher(sc_card_t *card, const u8 *in, size_t inlen,
                                "invalid key reference");
        }
  
@@ -209,10 +209,10 @@ index 743e79c..716052b 100644
                 * sc_format_apdu() */
                apdu_le = card->max_recv_size;
 diff --git a/src/libopensc/cards.h b/src/libopensc/cards.h
-index 0fbf9ca..01b08fd 100644
+index 7be6667..a3f3634 100644
 --- a/src/libopensc/cards.h
 +++ b/src/libopensc/cards.h
-@@ -104,6 +104,7 @@ enum {
+@@ -105,6 +105,7 @@ enum {
        SC_CARD_TYPE_OPENPGP_BASE = 9000,
        SC_CARD_TYPE_OPENPGP_V1,
        SC_CARD_TYPE_OPENPGP_V2,
@@ -221,27 +221,18 @@ index 0fbf9ca..01b08fd 100644
        /* jcop driver */
        SC_CARD_TYPE_JCOP_BASE = 10000,
 diff --git a/src/tools/openpgp-tool.c b/src/tools/openpgp-tool.c
-index 7058aaa..8b5e327 100644
+index f42e6d6..a24a395 100644
 --- a/src/tools/openpgp-tool.c
 +++ b/src/tools/openpgp-tool.c
-@@ -32,6 +32,7 @@
- #include "libopensc/asn1.h"
+@@ -33,6 +33,7 @@
  #include "libopensc/cards.h"
  #include "libopensc/cardctl.h"
+ #include "libopensc/errors.h"
 +#include "libopensc/log.h"
  #include "util.h"
+ #include "libopensc/log.h"
  
- #define       OPT_RAW         256
-@@ -216,7 +217,7 @@ static void display_data(const struct ef_name_map *mapping, char *value)
-                       } else {
-                               const char *label = mapping->name;
--                              printf("%s:%*s%s\n", label, 10-strlen(label), "", value);
-+                              printf("%s:%*s%s\n", label, 10 - (int)strlen(label), "", value);
-                       }
-               }
-       }
-@@ -390,6 +391,8 @@ int do_genkey(sc_card_t *card, u8 key_id, unsigned int key_len)
+@@ -396,6 +397,8 @@ int do_genkey(sc_card_t *card, u8 key_id, unsigned int key_len)
        sc_path_t path;
        sc_file_t *file;
  
@@ -250,7 +241,7 @@ index 7058aaa..8b5e327 100644
        if (key_id < 1 || key_id > 3) {
                printf("Unknown key ID %d.\n", key_id);
                return 1;
-@@ -481,8 +484,10 @@ int main(int argc, char **argv)
+@@ -487,8 +490,10 @@ int main(int argc, char **argv)
  
        /* check card type */
        if ((card->type != SC_CARD_TYPE_OPENPGP_V1) &&
@@ -263,5 +254,5 @@ index 7058aaa..8b5e327 100644
                goto out;
        }
 -- 
-1.9.3
+2.1.3
 
index cf8cae6d7350ee85202aa9365451253d82b2c8b2..c08a6e0a35b3b30a8cd0005f491621171abb2245 100644 (file)
@@ -1,8 +1,8 @@
-From ecc6460d17147b37def27a9b776e1fc5a61408d0 Mon Sep 17 00:00:00 2001
+From 00a2c08c9125103ee0bff9af9e7ff42c5cdc14fe Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Nguy=E1=BB=85n=20H=E1=BB=93ng=20Qu=C3=A2n?=
  <ng.hong.quan@gmail.com>
 Date: Fri, 12 Apr 2013 17:24:00 +0700
-Subject: [PATCH 02/18] OpenPGP: Add Gnuk in pkcs15 emulation layer.
+Subject: [PATCH 02/26] OpenPGP: Add Gnuk in pkcs15 emulation layer.
 
 ---
  src/libopensc/pkcs15-openpgp.c | 6 ++++--
@@ -10,10 +10,10 @@ Subject: [PATCH 02/18] OpenPGP: Add Gnuk in pkcs15 emulation layer.
  2 files changed, 5 insertions(+), 2 deletions(-)
 
 diff --git a/src/libopensc/pkcs15-openpgp.c b/src/libopensc/pkcs15-openpgp.c
-index d9dc074..5a8a1ca 100644
+index 4daaa98..fdf720a 100644
 --- a/src/libopensc/pkcs15-openpgp.c
 +++ b/src/libopensc/pkcs15-openpgp.c
-@@ -155,7 +155,8 @@ sc_pkcs15emu_openpgp_init(sc_pkcs15_card_t *p15card)
+@@ -151,7 +151,8 @@ sc_pkcs15emu_openpgp_init(sc_pkcs15_card_t *p15card)
        u8              c4data[10];
        u8              c5data[70];
        int             r, i;
@@ -23,7 +23,7 @@ index d9dc074..5a8a1ca 100644
        sc_path_t path;
        sc_file_t *file;
  
-@@ -367,7 +368,8 @@ failed:    sc_debug(card->ctx, SC_LOG_DEBUG_NORMAL, "Failed to initialize OpenPGP e
+@@ -363,7 +364,8 @@ failed:    sc_debug(card->ctx, SC_LOG_DEBUG_NORMAL, "Failed to initialize OpenPGP e
  
  static int openpgp_detect_card(sc_pkcs15_card_t *p15card)
  {
@@ -34,17 +34,17 @@ index d9dc074..5a8a1ca 100644
        else
                return SC_ERROR_WRONG_CARD;
 diff --git a/src/libopensc/pkcs15-syn.c b/src/libopensc/pkcs15-syn.c
-index e2f6004..a9f8c0b 100644
+index ffbf642..d2c086c 100644
 --- a/src/libopensc/pkcs15-syn.c
 +++ b/src/libopensc/pkcs15-syn.c
-@@ -112,6 +112,7 @@ int sc_pkcs15_is_emulation_only(sc_card_t *card)
+@@ -115,6 +115,7 @@ int sc_pkcs15_is_emulation_only(sc_card_t *card)
                case SC_CARD_TYPE_GEMSAFEV1_PTEID:
                case SC_CARD_TYPE_OPENPGP_V1:
                case SC_CARD_TYPE_OPENPGP_V2:
 +              case SC_CARD_TYPE_OPENPGP_GNUK:
                case SC_CARD_TYPE_SC_HSM:
-                       return 1;
-               default:
+               case SC_CARD_TYPE_DNIE_BASE:
+               case SC_CARD_TYPE_DNIE_BLANK:
 -- 
-1.9.3
+2.1.3
 
index fa15d792c5878194c618363714d37d732346360e..9e96cfef62534e2bb0d9a595f2cbf4da7f038dfd 100644 (file)
@@ -1,8 +1,8 @@
-From 5f751ba5628f9d85e9d8dca9939a93f49d2525d0 Mon Sep 17 00:00:00 2001
+From 2d348b60ab8c22791b56f291600954abd716a791 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Nguy=E1=BB=85n=20H=E1=BB=93ng=20Qu=C3=A2n?=
  <ng.hong.quan@gmail.com>
 Date: Fri, 22 Mar 2013 17:37:16 +0700
-Subject: [PATCH 03/18] OpenPGP: Include private DO to filesystem at driver
+Subject: [PATCH 03/26] OpenPGP: Include private DO to filesystem at driver
  initialization.
 
 In old implementation, the DOs which their access is restricted by
@@ -13,7 +13,7 @@ leading to that we cannot read their data later, even if we verified PIN.
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/src/libopensc/card-openpgp.c b/src/libopensc/card-openpgp.c
-index 716052b..ead07ae 100644
+index c785a55..1cc3923 100644
 --- a/src/libopensc/card-openpgp.c
 +++ b/src/libopensc/card-openpgp.c
 @@ -357,7 +357,7 @@ pgp_init(sc_card_t *card)
@@ -26,5 +26,5 @@ index 716052b..ead07ae 100644
                        child = pgp_new_blob(card, priv->mf, info->id, sc_file_new());
  
 -- 
-1.9.3
+2.1.3
 
index 114412f2298b05128a9de4a9334565ff272f5891..b6408de7f69aeb71e0a7b84e915b64f659102c80 100644 (file)
@@ -1,8 +1,8 @@
-From fbf8e392db4456de97796259a62ccb972fe24df8 Mon Sep 17 00:00:00 2001
+From fda9b6dd088e734de372fc85c091f88e8607bc2e Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Nguy=E1=BB=85n=20H=E1=BB=93ng=20Qu=C3=A2n?=
  <ng.hong.quan@gmail.com>
 Date: Tue, 26 Feb 2013 17:37:16 +0700
-Subject: [PATCH 04/18] PKCS15-OpenPGP: Declare DATA objects.
+Subject: [PATCH 04/26] PKCS15-OpenPGP: Declare DATA objects.
 
 Begin to support read/write DATA object for PKCS-OpenPGP binding.
 This object is used by TrueCrypt.
@@ -11,18 +11,18 @@ This object is used by TrueCrypt.
  1 file changed, 35 insertions(+)
 
 diff --git a/src/libopensc/pkcs15-openpgp.c b/src/libopensc/pkcs15-openpgp.c
-index 5a8a1ca..9f239ef 100644
+index fdf720a..fea2805 100644
 --- a/src/libopensc/pkcs15-openpgp.c
 +++ b/src/libopensc/pkcs15-openpgp.c
-@@ -36,6 +36,7 @@ typedef USHORT ushort;
- #endif
+@@ -32,6 +32,7 @@
+ #include "log.h"
  
  int sc_pkcs15emu_openpgp_init_ex(sc_pkcs15_card_t *, sc_pkcs15emu_opt_t *);
 +static int sc_pkcs15emu_openpgp_add_data(sc_pkcs15_card_t *);
  
  
  #define       PGP_USER_PIN_FLAGS      (SC_PKCS15_PIN_FLAG_CASE_SENSITIVE \
-@@ -45,6 +46,8 @@ int sc_pkcs15emu_openpgp_init_ex(sc_pkcs15_card_t *, sc_pkcs15emu_opt_t *);
+@@ -41,6 +42,8 @@ int sc_pkcs15emu_openpgp_init_ex(sc_pkcs15_card_t *, sc_pkcs15emu_opt_t *);
                                | SC_PKCS15_PIN_FLAG_UNBLOCK_DISABLED \
                                | SC_PKCS15_PIN_FLAG_SO_PIN)
  
@@ -31,7 +31,7 @@ index 5a8a1ca..9f239ef 100644
  typedef struct _pgp_pin_cfg {
        const char      *label;
        int             reference;
-@@ -359,6 +362,9 @@ sc_pkcs15emu_openpgp_init(sc_pkcs15_card_t *p15card)
+@@ -355,6 +358,9 @@ sc_pkcs15emu_openpgp_init(sc_pkcs15_card_t *p15card)
                        goto failed;
        }
  
@@ -41,7 +41,7 @@ index 5a8a1ca..9f239ef 100644
        return 0;
  
  failed:       sc_debug(card->ctx, SC_LOG_DEBUG_NORMAL, "Failed to initialize OpenPGP emulation: %s\n",
-@@ -366,6 +372,35 @@ failed:   sc_debug(card->ctx, SC_LOG_DEBUG_NORMAL, "Failed to initialize OpenPGP e
+@@ -362,6 +368,35 @@ failed:   sc_debug(card->ctx, SC_LOG_DEBUG_NORMAL, "Failed to initialize OpenPGP e
        return r;
  }
  
@@ -78,5 +78,5 @@ index 5a8a1ca..9f239ef 100644
  {
        if (p15card->card->type == SC_CARD_TYPE_OPENPGP_V1 || p15card->card->type == SC_CARD_TYPE_OPENPGP_V2
 -- 
-1.9.3
+2.1.3
 
index c28ed10cbf1216048c9ed06baeb30ef2a4687946..0dc4954629cafa421143c7166729cf7d707a784a 100644 (file)
@@ -1,20 +1,20 @@
-From 4cdc5f3102f5ad93d263eea2f8206bb5e9fffc6c Mon Sep 17 00:00:00 2001
+From 6d138f0199575516bfaad18cbbafcfa2ee61e58f Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Nguy=E1=BB=85n=20H=E1=BB=93ng=20Qu=C3=A2n?=
  <ng.hong.quan@gmail.com>
 Date: Mon, 4 Mar 2013 11:28:08 +0700
-Subject: [PATCH 05/18] OpenPGP: Support erasing (reset) card.
+Subject: [PATCH 05/26] OpenPGP: Support erasing (reset) card.
 
 Command: openpgp-tool --erase
 ---
  src/libopensc/card-openpgp.c | 64 ++++++++++++++++++++++++++++++++++++++++++++
- src/tools/openpgp-tool.c     | 23 +++++++++++++++-
- 2 files changed, 86 insertions(+), 1 deletion(-)
+ src/tools/openpgp-tool.c     | 2++++++++++++++-
+ 2 files changed, 85 insertions(+), 1 deletion(-)
 
 diff --git a/src/libopensc/card-openpgp.c b/src/libopensc/card-openpgp.c
-index ead07ae..42a9684 100644
+index 1cc3923..7349876 100644
 --- a/src/libopensc/card-openpgp.c
 +++ b/src/libopensc/card-openpgp.c
-@@ -2197,6 +2197,66 @@ out:
+@@ -2195,6 +2195,66 @@ out:
  
  #endif /* ENABLE_OPENSSL */
  
@@ -81,7 +81,7 @@ index ead07ae..42a9684 100644
  /* ABI: card ctl: perform special card-specific operations */
  static int pgp_card_ctl(sc_card_t *card, unsigned long cmd, void *ptr)
  {
-@@ -2221,6 +2281,10 @@ static int pgp_card_ctl(sc_card_t *card, unsigned long cmd, void *ptr)
+@@ -2219,6 +2279,10 @@ static int pgp_card_ctl(sc_card_t *card, unsigned long cmd, void *ptr)
                LOG_FUNC_RETURN(card->ctx, r);
                break;
  #endif /* ENABLE_OPENSSL */
@@ -93,53 +93,52 @@ index ead07ae..42a9684 100644
  
        LOG_FUNC_RETURN(card->ctx, SC_ERROR_NOT_SUPPORTED);
 diff --git a/src/tools/openpgp-tool.c b/src/tools/openpgp-tool.c
-index 8b5e327..0d360a3 100644
+index a24a395..de1c9d4 100644
 --- a/src/tools/openpgp-tool.c
 +++ b/src/tools/openpgp-tool.c
-@@ -76,6 +76,7 @@ static int opt_verify = 0;
- static char *verifytype = NULL;
- static int opt_pin = 0;
+@@ -78,6 +78,7 @@ static int opt_pin = 0;
  static char *pin = NULL;
+ static int opt_dump_do = 0;
+ static u8 do_dump_idx;
 +static int opt_erase = 0;
  
  static const char *app_name = "openpgp-tool";
  
-@@ -92,6 +93,7 @@ static const struct option options[] = {
+@@ -94,6 +95,7 @@ static const struct option options[] = {
        { "help",      no_argument,       NULL, 'h'        },
        { "verbose",   no_argument,       NULL, 'v'        },
        { "version",   no_argument,       NULL, 'V'        },
 +      { "erase",     no_argument,       NULL, 'E'        },
        { "verify",    required_argument, NULL, OPT_VERIFY },
        { "pin",       required_argument, NULL, OPT_PIN },
-       { NULL, 0, NULL, 0 }
-@@ -110,6 +112,7 @@ static const char *option_help[] = {
+       { "do",        required_argument, NULL, 'd' },
+@@ -113,6 +115,7 @@ static const char *option_help[] = {
  /* h */       "Print this help message",
  /* v */       "Verbose operation. Use several times to enable debug output.",
  /* V */       "Show version number",
 +/* E */       "Erase (reset) the card",
        "Verify PIN (CHV1, CHV2, CHV3...)",
-       "PIN string"
- };
-@@ -228,7 +231,7 @@ static int decode_options(int argc, char **argv)
+       "PIN string",
+ /* d */ "Dump private data object number <arg> (i.e. PRIVATE-DO-<arg>)"
+@@ -232,7 +235,7 @@ static int decode_options(int argc, char **argv)
  {
        int c;
  
--      while ((c = getopt_long(argc, argv,"r:x:CUG:L:hwvV", options, (int *) 0)) != EOF) {
-+      while ((c = getopt_long(argc, argv,"r:x:CUG:L:hwvVE", options, (int *) 0)) != EOF) {
+-      while ((c = getopt_long(argc, argv,"r:x:CUG:L:hwvVd:", options, (int *) 0)) != EOF) {
++      while ((c = getopt_long(argc, argv,"r:x:CUG:L:hwvVd:E", options, (int *) 0)) != EOF) {
                switch (c) {
                case 'r':
                        opt_reader = optarg;
-@@ -288,6 +291,9 @@ static int decode_options(int argc, char **argv)
-                       show_version();
-                       exit(EXIT_SUCCESS);
-                       break;
+@@ -296,6 +299,8 @@ static int decode_options(int argc, char **argv)
+                       do_dump_idx = optarg[0] - '0';
+                       opt_dump_do++;
+                       actions++;
 +              case 'E':
 +                      opt_erase++;
-+                      break;
+                       break;
                default:
                        util_print_usage_and_die(app_name, options, option_help, NULL);
-               }
-@@ -446,6 +452,18 @@ int do_verify(sc_card_t *card, u8 *type, u8* pin)
+@@ -452,6 +457,18 @@ int do_verify(sc_card_t *card, char *type, char *pin)
        return r;
  }
  
@@ -158,7 +157,7 @@ index 8b5e327..0d360a3 100644
  int main(int argc, char **argv)
  {
        sc_context_t *ctx = NULL;
-@@ -521,6 +539,9 @@ int main(int argc, char **argv)
+@@ -531,6 +548,9 @@ int main(int argc, char **argv)
                exit(EXIT_FAILURE);
        }
  
@@ -169,5 +168,5 @@ index 8b5e327..0d360a3 100644
        sc_unlock(card);
        sc_disconnect_card(card);
 -- 
-1.9.3
+2.1.3
 
index f73cb22f5c2fc816a5e32d165e9a530e7b065cec..ec9ddf5b0e92eb9baa37dd49c5d40c25ae6ef276 100644 (file)
@@ -1,18 +1,18 @@
-From bbbedd3b358f80a7f98df2b22cf541cb007dd62e Mon Sep 17 00:00:00 2001
+From 469b6567d9adc4af6f49fa65534162673060454d Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Nguy=E1=BB=85n=20H=E1=BB=93ng=20Qu=C3=A2n?=
  <ng.hong.quan@gmail.com>
 Date: Mon, 4 Mar 2013 18:13:03 +0700
-Subject: [PATCH 06/18] openpgp-tool: Support deleting key in Gnuk.
+Subject: [PATCH 06/26] openpgp-tool: Support deleting key in Gnuk.
 
 ---
- src/tools/openpgp-tool.c | 144 ++++++++++++++++++++++++++++++++++++++++++++++-
- 1 file changed, 143 insertions(+), 1 deletion(-)
+ src/tools/openpgp-tool.c | 142 +++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 142 insertions(+)
 
 diff --git a/src/tools/openpgp-tool.c b/src/tools/openpgp-tool.c
-index 0d360a3..239c86b 100644
+index de1c9d4..374819a 100644
 --- a/src/tools/openpgp-tool.c
 +++ b/src/tools/openpgp-tool.c
-@@ -39,6 +39,7 @@
+@@ -41,6 +41,7 @@
  #define       OPT_PRETTY      257
  #define       OPT_VERIFY      258
  #define       OPT_PIN     259
@@ -20,33 +20,31 @@ index 0d360a3..239c86b 100644
  
  /* define structures */
  struct ef_name_map {
-@@ -77,6 +78,7 @@ static char *verifytype = NULL;
- static int opt_pin = 0;
- static char *pin = NULL;
+@@ -79,6 +80,7 @@ static char *pin = NULL;
+ static int opt_dump_do = 0;
+ static u8 do_dump_idx;
  static int opt_erase = 0;
 +static int opt_delkey = 0;
  
  static const char *app_name = "openpgp-tool";
  
-@@ -96,6 +98,7 @@ static const struct option options[] = {
-       { "erase",     no_argument,       NULL, 'E'        },
+@@ -99,6 +101,7 @@ static const struct option options[] = {
        { "verify",    required_argument, NULL, OPT_VERIFY },
        { "pin",       required_argument, NULL, OPT_PIN },
+       { "do",        required_argument, NULL, 'd' },
 +      { "del-key",   required_argument, NULL, OPT_DELKEY },
        { NULL, 0, NULL, 0 }
  };
  
-@@ -114,7 +117,8 @@ static const char *option_help[] = {
- /* V */       "Show version number",
- /* E */       "Erase (reset) the card",
+@@ -119,6 +122,7 @@ static const char *option_help[] = {
        "Verify PIN (CHV1, CHV2, CHV3...)",
--      "PIN string"
-+      "PIN string",
+       "PIN string",
+ /* d */ "Dump private data object number <arg> (i.e. PRIVATE-DO-<arg>)"
 +      "Delete key (1, 2, 3 or all)"
  };
  
  static const struct ef_name_map openpgp_data[] = {
-@@ -294,6 +298,14 @@ static int decode_options(int argc, char **argv)
+@@ -302,6 +306,14 @@ static int decode_options(int argc, char **argv)
                case 'E':
                        opt_erase++;
                        break;
@@ -61,7 +59,7 @@ index 0d360a3..239c86b 100644
                default:
                        util_print_usage_and_die(app_name, options, option_help, NULL);
                }
-@@ -452,6 +464,133 @@ int do_verify(sc_card_t *card, u8 *type, u8* pin)
+@@ -457,6 +469,133 @@ int do_verify(sc_card_t *card, char *type, char *pin)
        return r;
  }
  
@@ -195,7 +193,7 @@ index 0d360a3..239c86b 100644
  int do_erase(sc_card_t *card)
  {
        int r;
-@@ -539,6 +678,9 @@ int main(int argc, char **argv)
+@@ -548,6 +687,9 @@ int main(int argc, char **argv)
                exit(EXIT_FAILURE);
        }
  
@@ -206,5 +204,5 @@ index 0d360a3..239c86b 100644
                exit_status != do_erase(card);
  
 -- 
-1.9.3
+2.1.3
 
index 1d487af32dde4ca8345e5827f8c7ad5385eb671d..7d8045679b931a22407d190016400377ab907115 100644 (file)
@@ -1,8 +1,8 @@
-From b6bc7a497e1fe20104f923de1092a35d137ba553 Mon Sep 17 00:00:00 2001
+From d210faa377bcec63876f84b82540b110ede16e57 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Nguy=E1=BB=85n=20H=E1=BB=93ng=20Qu=C3=A2n?=
  <ng.hong.quan@gmail.com>
 Date: Mon, 4 Mar 2013 18:14:51 +0700
-Subject: [PATCH 07/18] OpenPGP: Correct building Extended Header List when
+Subject: [PATCH 07/26] OpenPGP: Correct building Extended Header List when
  importing keys.
 
 ---
@@ -10,10 +10,10 @@ Subject: [PATCH 07/18] OpenPGP: Correct building Extended Header List when
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/src/libopensc/card-openpgp.c b/src/libopensc/card-openpgp.c
-index 42a9684..47c1938 100644
+index 7349876..91c311b 100644
 --- a/src/libopensc/card-openpgp.c
 +++ b/src/libopensc/card-openpgp.c
-@@ -1978,7 +1978,7 @@ pgp_build_extended_header_list(sc_card_t *card, sc_cardctl_openpgp_keystore_info
+@@ -1977,7 +1977,7 @@ pgp_build_extended_header_list(sc_card_t *card, sc_cardctl_openpgp_keystore_info
        u8 *p = NULL;
        u8 *components[] = {key_info->e, key_info->p, key_info->q, key_info->n};
        size_t componentlens[] = {key_info->e_len, key_info->p_len, key_info->q_len, key_info->n_len};
@@ -23,5 +23,5 @@ index 42a9684..47c1938 100644
                "public exponent",
                "prime p",
 -- 
-1.9.3
+2.1.3
 
index 25a69d4cb61ad2841112d633caa24731ca61431a..17aaf92ca9edc1cdb9730c0c4f8c2ecf6aaeb66a 100644 (file)
@@ -1,8 +1,8 @@
-From d1b8d3588336abac4876c1d537d8e8e5e578bc02 Mon Sep 17 00:00:00 2001
+From df98874784a77c96a7a1be54412a02a53fdd3a3e Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Nguy=E1=BB=85n=20H=E1=BB=93ng=20Qu=C3=A2n?=
  <ng.hong.quan@gmail.com>
 Date: Mon, 25 Mar 2013 11:58:38 +0700
-Subject: [PATCH 08/18] OpenPGP: Read some empty DOs from Gnuk.
+Subject: [PATCH 08/26] OpenPGP: Read some empty DOs from Gnuk.
 
 In Gnuk, some empty DOs are returned as not exist, instead of existing with empty value.
 So, we will consider them exist in driver.
@@ -11,10 +11,10 @@ So, we will consider them exist in driver.
  1 file changed, 25 insertions(+)
 
 diff --git a/src/libopensc/card-openpgp.c b/src/libopensc/card-openpgp.c
-index 47c1938..9b08bbb 100644
+index 91c311b..e7b25c0 100644
 --- a/src/libopensc/card-openpgp.c
 +++ b/src/libopensc/card-openpgp.c
-@@ -813,6 +813,23 @@ pgp_get_blob(sc_card_t *card, struct blob *blob, unsigned int id,
+@@ -815,6 +815,23 @@ pgp_get_blob(sc_card_t *card, struct blob *blob, unsigned int id,
                }
        }
  
@@ -38,7 +38,7 @@ index 47c1938..9b08bbb 100644
        return SC_ERROR_FILE_NOT_FOUND;
  }
  
-@@ -1147,6 +1164,14 @@ pgp_get_data(sc_card_t *card, unsigned int tag, u8 *buf, size_t buf_len)
+@@ -1149,6 +1166,14 @@ pgp_get_data(sc_card_t *card, unsigned int tag, u8 *buf, size_t buf_len)
        LOG_TEST_RET(card->ctx, r, "APDU transmit failed");
  
        r = sc_check_sw(card, apdu.sw1, apdu.sw2);
@@ -54,5 +54,5 @@ index 47c1938..9b08bbb 100644
  
        LOG_FUNC_RETURN(card->ctx, apdu.resplen);
 -- 
-1.9.3
+2.1.3
 
index 5abf6f8db23e9a761feb6a05df22ec4854d63c2f..a75a2c2ce6ab6dc90d2c804828cfde38d9452dfc 100644 (file)
@@ -1,8 +1,8 @@
-From 6a4457cde65ef44f05b0689415ae7165b06fb8bf Mon Sep 17 00:00:00 2001
+From 42adc35954e18e24f253f710b16d850d1872bce5 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Nguy=E1=BB=85n=20H=E1=BB=93ng=20Qu=C3=A2n?=
  <ng.hong.quan@gmail.com>
 Date: Wed, 27 Mar 2013 11:38:42 +0700
-Subject: [PATCH 09/18] PKCS15-OpenPGP: Do not show empty DO in pkcs15
+Subject: [PATCH 09/26] PKCS15-OpenPGP: Do not show empty DO in pkcs15
  emu_init.
 
 ---
@@ -10,10 +10,10 @@ Subject: [PATCH 09/18] PKCS15-OpenPGP: Do not show empty DO in pkcs15
  1 file changed, 18 insertions(+)
 
 diff --git a/src/libopensc/pkcs15-openpgp.c b/src/libopensc/pkcs15-openpgp.c
-index 9f239ef..850dd74 100644
+index fea2805..51a2032 100644
 --- a/src/libopensc/pkcs15-openpgp.c
 +++ b/src/libopensc/pkcs15-openpgp.c
-@@ -385,16 +385,34 @@ sc_pkcs15emu_openpgp_add_data(sc_pkcs15_card_t *p15card)
+@@ -381,16 +381,34 @@ sc_pkcs15emu_openpgp_add_data(sc_pkcs15_card_t *p15card)
                sc_pkcs15_object_t dat_obj;
                char name[8];
                char path[9];
@@ -49,5 +49,5 @@ index 9f239ef..850dd74 100644
                r = sc_pkcs15emu_add_data_object(p15card, &dat_obj, &dat_info);
        }
 -- 
-1.9.3
+2.1.3
 
index a3c75309c903afd4dc801f2d5840b26e574edecd..7b0f493ccbd663f12729ff6f6e54945341e6b06f 100644 (file)
@@ -1,8 +1,8 @@
-From 88ded8fc5802c073caa71b649cee5a3116699b2a Mon Sep 17 00:00:00 2001
+From f085e6a5f386875b5b071ef3bf115e4d9bb33bdb Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Nguy=E1=BB=85n=20H=E1=BB=93ng=20Qu=C3=A2n?=
  <ng.hong.quan@gmail.com>
 Date: Wed, 27 Mar 2013 11:39:33 +0700
-Subject: [PATCH 10/18] PKCS15-OpenPGP: Allow to store data to pkcs15 data
+Subject: [PATCH 10/26] PKCS15-OpenPGP: Allow to store data to pkcs15 data
  object.
 
 Only one DO is supported now.
@@ -12,10 +12,10 @@ Only one DO is supported now.
  2 files changed, 38 insertions(+), 2 deletions(-)
 
 diff --git a/src/libopensc/pkcs15-openpgp.c b/src/libopensc/pkcs15-openpgp.c
-index 850dd74..b701041 100644
+index 51a2032..4cc1c39 100644
 --- a/src/libopensc/pkcs15-openpgp.c
 +++ b/src/libopensc/pkcs15-openpgp.c
-@@ -397,7 +397,7 @@ sc_pkcs15emu_openpgp_add_data(sc_pkcs15_card_t *p15card)
+@@ -393,7 +393,7 @@ sc_pkcs15emu_openpgp_add_data(sc_pkcs15_card_t *p15card)
                 */
                r = read_file(p15card->card, path, content, sizeof(content));
                if (r <= 0 ) {
@@ -87,5 +87,5 @@ index f3a4962..1455580 100755
                r = SC_ERROR_NOT_IMPLEMENTED;
        }
 -- 
-1.9.3
+2.1.3
 
index 8fc34642d0c14155d6d6a549fb16ef17a2d70ac5..d133e805955ab8b419b60ad64c830e93242d9384 100644 (file)
@@ -1,8 +1,8 @@
-From 7231ee09bb628f0401939778decce818ef6e3665 Mon Sep 17 00:00:00 2001
+From 752f8981bed49a98d3592ead3aa50e743318dea8 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Nguy=E1=BB=85n=20H=E1=BB=93ng=20Qu=C3=A2n?=
  <ng.hong.quan@gmail.com>
 Date: Fri, 5 Apr 2013 17:18:50 +0700
-Subject: [PATCH 11/18] OpenPGP: Provide enough buffer to read pubkey from
+Subject: [PATCH 11/26] OpenPGP: Provide enough buffer to read pubkey from
  Gnuk.
 
 ---
@@ -10,7 +10,7 @@ Subject: [PATCH 11/18] OpenPGP: Provide enough buffer to read pubkey from
  1 file changed, 23 insertions(+), 5 deletions(-)
 
 diff --git a/src/libopensc/card-openpgp.c b/src/libopensc/card-openpgp.c
-index 9b08bbb..8a1a270 100644
+index e7b25c0..1913eca 100644
 --- a/src/libopensc/card-openpgp.c
 +++ b/src/libopensc/card-openpgp.c
 @@ -263,7 +263,12 @@ static struct do_info             pgp2_objects[] = {      /* OpenPGP card spec 2.0 */
@@ -27,7 +27,7 @@ index 9b08bbb..8a1a270 100644
  
  #define DRVDATA(card)        ((struct pgp_priv_data *) ((card)->drv_data))
  struct pgp_priv_data {
-@@ -729,6 +734,14 @@ pgp_read_blob(sc_card_t *card, struct blob *blob)
+@@ -731,6 +736,14 @@ pgp_read_blob(sc_card_t *card, struct blob *blob)
                u8      buffer[2048];
                size_t  buf_len = (card->caps & SC_CARD_CAP_APDU_EXT)
                                  ? sizeof(buffer) : 256;
@@ -42,7 +42,7 @@ index 9b08bbb..8a1a270 100644
                int     r = blob->info->get_fn(card, blob->id, buffer, buf_len);
  
                if (r < 0) {    /* an error occurred */
-@@ -1830,6 +1843,7 @@ static int pgp_gen_key(sc_card_t *card, sc_cardctl_openpgp_keygen_info_t *key_in
+@@ -1828,6 +1841,7 @@ static int pgp_gen_key(sc_card_t *card, sc_cardctl_openpgp_keygen_info_t *key_in
        u8 apdu_case;
        u8 *apdu_data;
        size_t apdu_le;
@@ -83,5 +83,5 @@ index 9b08bbb..8a1a270 100644
        /* Send */
        sc_log(card->ctx, "Waiting for the card to generate key...");
 -- 
-1.9.3
+2.1.3
 
index 0d54d96fc35e9adfe32b2ebec31798184d2eb951..3a2526f4e87c7d63116ea12327f87042678f4cd7 100644 (file)
@@ -1,18 +1,18 @@
-From d8f63eb6fcc1441c12a44850da2fa22a6fe81634 Mon Sep 17 00:00:00 2001
+From 5110ae3ba33d165c43ea5eca8f929a82d81cb3fe Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Nguy=E1=BB=85n=20H=E1=BB=93ng=20Qu=C3=A2n?=
  <ng.hong.quan@gmail.com>
 Date: Thu, 11 Apr 2013 11:47:51 +0700
-Subject: [PATCH 12/18] OpenPGP: Support write certificate for Gnuk.
+Subject: [PATCH 12/26] OpenPGP: Support write certificate for Gnuk.
 
 ---
  src/libopensc/card-openpgp.c | 158 +++++++++++++++++++++++++++++++++----------
  1 file changed, 123 insertions(+), 35 deletions(-)
 
 diff --git a/src/libopensc/card-openpgp.c b/src/libopensc/card-openpgp.c
-index 8a1a270..d9db948 100644
+index 1913eca..7cea84f 100644
 --- a/src/libopensc/card-openpgp.c
 +++ b/src/libopensc/card-openpgp.c
-@@ -725,6 +725,8 @@ pgp_iterate_blobs(struct blob *blob, int level, void (*func)())
+@@ -727,6 +727,8 @@ pgp_iterate_blobs(struct blob *blob, int level, void (*func)())
  static int
  pgp_read_blob(sc_card_t *card, struct blob *blob)
  {
@@ -21,7 +21,7 @@ index 8a1a270..d9db948 100644
        if (blob->data != NULL)
                return SC_SUCCESS;
        if (blob->info == NULL)
-@@ -735,6 +737,11 @@ pgp_read_blob(sc_card_t *card, struct blob *blob)
+@@ -737,6 +739,11 @@ pgp_read_blob(sc_card_t *card, struct blob *blob)
                size_t  buf_len = (card->caps & SC_CARD_CAP_APDU_EXT)
                                  ? sizeof(buffer) : 256;
  
@@ -33,7 +33,7 @@ index 8a1a270..d9db948 100644
                /* Buffer length for Gnuk pubkey */
                if (card->type == SC_CARD_TYPE_OPENPGP_GNUK &&
                    (blob->id == 0xa400 || blob->id == 0xb600 || blob->id == 0xb800
-@@ -1190,49 +1197,75 @@ pgp_get_data(sc_card_t *card, unsigned int tag, u8 *buf, size_t buf_len)
+@@ -1192,49 +1199,75 @@ pgp_get_data(sc_card_t *card, unsigned int tag, u8 *buf, size_t buf_len)
        LOG_FUNC_RETURN(card->ctx, apdu.resplen);
  }
  
@@ -143,7 +143,7 @@ index 8a1a270..d9db948 100644
  
        /* Extended Header list (004D DO) needs a variant of PUT DATA command */
        if (tag == 0x004D) {
-@@ -1258,15 +1291,70 @@ pgp_put_data(sc_card_t *card, unsigned int tag, const u8 *buf, size_t buf_len)
+@@ -1260,15 +1293,70 @@ pgp_put_data(sc_card_t *card, unsigned int tag, const u8 *buf, size_t buf_len)
                apdu.lc = buf_len;
        }
        else {
@@ -216,5 +216,5 @@ index 8a1a270..d9db948 100644
        if (r == SC_ERROR_SECURITY_STATUS_NOT_SATISFIED) {
                sc_debug(card->ctx, SC_LOG_DEBUG_VERBOSE, "Please verify PIN first.");
 -- 
-1.9.3
+2.1.3
 
index 67d79dd6f8cfd4475dc7f3808cc28e2e40234d5c..48afb37390fb8c58ae33d2dd81d0ffa08ca006c2 100644 (file)
@@ -1,8 +1,8 @@
-From e5c94d3f1f7e6a96a98815d6e51190498c357fb6 Mon Sep 17 00:00:00 2001
+From 7823e836e8279c8d77786d8f10ffaa83cf50bf1d Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Nguy=E1=BB=85n=20H=E1=BB=93ng=20Qu=C3=A2n?=
  <ng.hong.quan@gmail.com>
 Date: Wed, 10 Apr 2013 18:35:58 +0700
-Subject: [PATCH 13/18] pkcs15-openpgp: Change to sc_put_data instead of
+Subject: [PATCH 13/26] pkcs15-openpgp: Change to sc_put_data instead of
  sc_update_binary when writing certificate.
 
 ---
@@ -27,5 +27,5 @@ index 1455580..be1291e 100755
  
        case SC_PKCS15_TYPE_DATA_OBJECT:
 -- 
-1.9.3
+2.1.3
 
index cf1a07c6478200b1ac36c37c099fb6caad7a4e09..0fa8f2c3d3ae879b824a1186044428fe6c881c00 100644 (file)
@@ -1,8 +1,8 @@
-From df8a78e3c8c9d9d591c0d3fa31db7e010eb2c8c2 Mon Sep 17 00:00:00 2001
+From 3ff1f7234abb4c42273adedbe06d9e7f9f3a5f9d Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Nguy=E1=BB=85n=20H=E1=BB=93ng=20Qu=C3=A2n?=
  <ng.hong.quan@gmail.com>
 Date: Thu, 11 Apr 2013 16:18:31 +0700
-Subject: [PATCH 14/18] OpenPGP: Overcome the restriction of even data length
+Subject: [PATCH 14/26] OpenPGP: Overcome the restriction of even data length
  of Gnuk.
 
 When write certificate with odd length to Gnuk, we add zero padding to make it even.
@@ -11,10 +11,10 @@ When write certificate with odd length to Gnuk, we add zero padding to make it e
  1 file changed, 18 insertions(+), 2 deletions(-)
 
 diff --git a/src/libopensc/card-openpgp.c b/src/libopensc/card-openpgp.c
-index d9db948..a666163 100644
+index 7cea84f..7a77a71 100644
 --- a/src/libopensc/card-openpgp.c
 +++ b/src/libopensc/card-openpgp.c
-@@ -1206,6 +1206,10 @@ static int gnuk_write_certificate(sc_card_t *card, const u8 *buf, size_t length)
+@@ -1208,6 +1208,10 @@ static int gnuk_write_certificate(sc_card_t *card, const u8 *buf, size_t length)
        sc_apdu_t apdu;
        u8 *part;
        size_t plen;
@@ -25,7 +25,7 @@ index d9db948..a666163 100644
        int r = SC_SUCCESS;
  
        LOG_FUNC_CALLED(ctx);
-@@ -1236,8 +1240,20 @@ static int gnuk_write_certificate(sc_card_t *card, const u8 *buf, size_t length)
+@@ -1238,8 +1242,20 @@ static int gnuk_write_certificate(sc_card_t *card, const u8 *buf, size_t length)
                        sc_format_apdu(card, &apdu, SC_APDU_CASE_3_SHORT, 0xD6, i, 0);
                }
                apdu.flags |= SC_APDU_FLAGS_CHAINING;
@@ -49,5 +49,5 @@ index d9db948..a666163 100644
                r = sc_transmit_apdu(card, &apdu);
                LOG_TEST_RET(card->ctx, r, "APDU transmit failed");
 -- 
-1.9.3
+2.1.3
 
index cc88a12db74ce3ff843480228e238453d42c961e..2389cd10992bfa4bafadd01f8cce7bf9dbb8fd88 100644 (file)
@@ -1,18 +1,18 @@
-From 693b3ac5a53e89a0cdeab0f728d24a6e16864f5c Mon Sep 17 00:00:00 2001
+From 9af45c4cf052e3a6059a3004082f9ee3d2b3b2bf Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Nguy=E1=BB=85n=20H=E1=BB=93ng=20Qu=C3=A2n?=
  <ng.hong.quan@gmail.com>
 Date: Fri, 12 Apr 2013 15:33:31 +0700
-Subject: [PATCH 15/18] OpenPGP: Delete key as file, for Gnuk.
+Subject: [PATCH 15/26] OpenPGP: Delete key as file, for Gnuk.
 
 ---
  src/libopensc/card-openpgp.c | 51 +++++++++++++++++++++++++++++++++++++++++++-
  1 file changed, 50 insertions(+), 1 deletion(-)
 
 diff --git a/src/libopensc/card-openpgp.c b/src/libopensc/card-openpgp.c
-index a666163..19d3b04 100644
+index 7a77a71..4d0500d 100644
 --- a/src/libopensc/card-openpgp.c
 +++ b/src/libopensc/card-openpgp.c
-@@ -2437,6 +2437,44 @@ static int pgp_card_ctl(sc_card_t *card, unsigned long cmd, void *ptr)
+@@ -2435,6 +2435,44 @@ static int pgp_card_ctl(sc_card_t *card, unsigned long cmd, void *ptr)
        LOG_FUNC_RETURN(card->ctx, SC_ERROR_NOT_SUPPORTED);
  }
  
@@ -57,7 +57,7 @@ index a666163..19d3b04 100644
  /* ABI: DELETE FILE */
  static int
  pgp_delete_file(sc_card_t *card, const sc_path_t *path)
-@@ -2444,6 +2482,7 @@ pgp_delete_file(sc_card_t *card, const sc_path_t *path)
+@@ -2442,6 +2480,7 @@ pgp_delete_file(sc_card_t *card, const sc_path_t *path)
        struct pgp_priv_data *priv = DRVDATA(card);
        struct blob *blob;
        sc_file_t *file;
@@ -65,7 +65,7 @@ index a666163..19d3b04 100644
        int r;
  
        LOG_FUNC_CALLED(card->ctx);
-@@ -2459,10 +2498,20 @@ pgp_delete_file(sc_card_t *card, const sc_path_t *path)
+@@ -2457,10 +2496,20 @@ pgp_delete_file(sc_card_t *card, const sc_path_t *path)
        if (blob == priv->mf)
                LOG_FUNC_RETURN(card->ctx, SC_ERROR_NOT_SUPPORTED);
  
@@ -88,5 +88,5 @@ index a666163..19d3b04 100644
                /* call pgp_put_data() with zero-sized NULL-buffer to zap the DO contents */
                r = pgp_put_data(card, file->id, NULL, 0);
 -- 
-1.9.3
+2.1.3
 
index c49de13c0a906ecb3b6062d25842ca25961f507f..76c8624e3091fef3a5c31292ecf80ab7d0217f33 100644 (file)
@@ -1,18 +1,18 @@
-From f96f7536a8c2efd0ba41fd94fe3334e5fa556854 Mon Sep 17 00:00:00 2001
+From ee23d262768e7e54ed0fc554bc0b869c65868ace Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Nguy=E1=BB=85n=20H=E1=BB=93ng=20Qu=C3=A2n?=
  <ng.hong.quan@gmail.com>
 Date: Tue, 16 Apr 2013 10:19:34 +0700
-Subject: [PATCH 16/18] OpenPGP: Correct parameter checking.
+Subject: [PATCH 16/26] OpenPGP: Correct parameter checking.
 
 ---
  src/libopensc/card-openpgp.c | 9 +++++++--
  1 file changed, 7 insertions(+), 2 deletions(-)
 
 diff --git a/src/libopensc/card-openpgp.c b/src/libopensc/card-openpgp.c
-index 19d3b04..196c094 100644
+index 4d0500d..beeee83 100644
 --- a/src/libopensc/card-openpgp.c
 +++ b/src/libopensc/card-openpgp.c
-@@ -1221,6 +1221,8 @@ static int gnuk_write_certificate(sc_card_t *card, const u8 *buf, size_t length)
+@@ -1223,6 +1223,8 @@ static int gnuk_write_certificate(sc_card_t *card, const u8 *buf, size_t length)
                LOG_TEST_RET(card->ctx, r, "APDU transmit failed");
                /* Check response */
                r = sc_check_sw(card, apdu.sw1, apdu.sw2);
@@ -21,7 +21,7 @@ index 19d3b04..196c094 100644
                LOG_FUNC_RETURN(card->ctx, length);
        }
  
-@@ -2448,6 +2450,11 @@ gnuk_delete_key(sc_card_t *card, u8 key_id)
+@@ -2446,6 +2448,11 @@ gnuk_delete_key(sc_card_t *card, u8 key_id)
  
        LOG_FUNC_CALLED(ctx);
  
@@ -33,7 +33,7 @@ index 19d3b04..196c094 100644
        /* Delete fingerprint */
        sc_log(ctx, "Delete fingerprints");
        r = pgp_put_data(card, 0xC6 + key_id, NULL, 0);
-@@ -2466,8 +2473,6 @@ gnuk_delete_key(sc_card_t *card, u8 key_id)
+@@ -2464,8 +2471,6 @@ gnuk_delete_key(sc_card_t *card, u8 key_id)
                data = "\x4D\x02\xB8";
        else if (key_id == 3)
                data = "\x4D\x02\xA4";
@@ -43,5 +43,5 @@ index 19d3b04..196c094 100644
        r = pgp_put_data(card, 0x4D, data, strlen(data) + 1);
  
 -- 
-1.9.3
+2.1.3
 
index 50501e09584cb9896941761f08422d718b0d19b9..2bb6fccafb3a97570f1afd27c4170737e15d585c 100644 (file)
@@ -1,18 +1,18 @@
-From 8a69525a60391b46db4994033527d219d2adaa4e Mon Sep 17 00:00:00 2001
+From f4aec38233010953cea72c367bccc71c3687b2f1 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Nguy=E1=BB=85n=20H=E1=BB=93ng=20Qu=C3=A2n?=
  <ng.hong.quan@gmail.com>
 Date: Tue, 16 Apr 2013 16:02:17 +0700
-Subject: [PATCH 17/18] OpenPGP: Make code neater
+Subject: [PATCH 17/26] OpenPGP: Make code neater
 
 ---
  src/libopensc/card-openpgp.c | 8 ++------
  1 file changed, 2 insertions(+), 6 deletions(-)
 
 diff --git a/src/libopensc/card-openpgp.c b/src/libopensc/card-openpgp.c
-index 196c094..c4ef3b6 100644
+index beeee83..ca0d01b 100644
 --- a/src/libopensc/card-openpgp.c
 +++ b/src/libopensc/card-openpgp.c
-@@ -1220,10 +1220,7 @@ static int gnuk_write_certificate(sc_card_t *card, const u8 *buf, size_t length)
+@@ -1222,10 +1222,7 @@ static int gnuk_write_certificate(sc_card_t *card, const u8 *buf, size_t length)
                r = sc_transmit_apdu(card, &apdu);
                LOG_TEST_RET(card->ctx, r, "APDU transmit failed");
                /* Check response */
@@ -24,7 +24,7 @@ index 196c094..c4ef3b6 100644
        }
  
        /* Ref: gnuk_put_binary_libusb.py and gnuk_token.py in Gnuk source tree */
-@@ -1260,8 +1257,7 @@ static int gnuk_write_certificate(sc_card_t *card, const u8 *buf, size_t length)
+@@ -1262,8 +1259,7 @@ static int gnuk_write_certificate(sc_card_t *card, const u8 *buf, size_t length)
                r = sc_transmit_apdu(card, &apdu);
                LOG_TEST_RET(card->ctx, r, "APDU transmit failed");
                /* Check response */
@@ -35,5 +35,5 @@ index 196c094..c4ef3b6 100644
                /* To next part */
                i++;
 -- 
-1.9.3
+2.1.3
 
index b05cc59c4eb471d65c5b77d123c6170e51b6b5fc..774ed58a11fe985da614b1729e33f79460ea2844 100644 (file)
@@ -1,18 +1,18 @@
-From a099f951d085d3abfefeead14a4af06913cb67d2 Mon Sep 17 00:00:00 2001
+From c84c84169f7a73eab27f6a9b13b77432baa5c3f8 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Nguy=E1=BB=85n=20H=E1=BB=93ng=20Qu=C3=A2n?=
  <ng.hong.quan@gmail.com>
 Date: Wed, 8 May 2013 16:51:21 +0700
-Subject: [PATCH 18/18] Move declaration to top of block.
+Subject: [PATCH 18/26] Move declaration to top of block.
 
 ---
  src/libopensc/card-openpgp.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/src/libopensc/card-openpgp.c b/src/libopensc/card-openpgp.c
-index c4ef3b6..7f2006e 100644
+index ca0d01b..037ef73 100644
 --- a/src/libopensc/card-openpgp.c
 +++ b/src/libopensc/card-openpgp.c
-@@ -736,6 +736,7 @@ pgp_read_blob(sc_card_t *card, struct blob *blob)
+@@ -738,6 +738,7 @@ pgp_read_blob(sc_card_t *card, struct blob *blob)
                u8      buffer[2048];
                size_t  buf_len = (card->caps & SC_CARD_CAP_APDU_EXT)
                                  ? sizeof(buffer) : 256;
@@ -20,7 +20,7 @@ index c4ef3b6..7f2006e 100644
  
                /* Buffer length for certificate */
                if (blob->id == DO_CERT && priv->max_cert_size > 0) {
-@@ -749,7 +750,7 @@ pgp_read_blob(sc_card_t *card, struct blob *blob)
+@@ -751,7 +752,7 @@ pgp_read_blob(sc_card_t *card, struct blob *blob)
                        buf_len = MAXLEN_RESP_PUBKEY_GNUK;
                }
  
@@ -30,5 +30,5 @@ index c4ef3b6..7f2006e 100644
                if (r < 0) {    /* an error occurred */
                        blob->status = r;
 -- 
-1.9.3
+2.1.3
 
diff --git a/utils/opensc/patches/0019-OpenPGP-Make-indentation-consistent-space-tab.patch b/utils/opensc/patches/0019-OpenPGP-Make-indentation-consistent-space-tab.patch
new file mode 100644 (file)
index 0000000..3702d61
--- /dev/null
@@ -0,0 +1,182 @@
+From c6abf7976f64be5191dc80fecdbcb07daab7a2e0 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Nguy=E1=BB=85n=20H=E1=BB=93ng=20Qu=C3=A2n?=
+ <ng.hong.quan@gmail.com>
+Date: Sun, 3 Nov 2013 01:45:56 +0800
+Subject: [PATCH 19/26] OpenPGP: Make indentation consistent (space -> tab).
+
+---
+ src/libopensc/card-openpgp.c | 22 ++++++++---------
+ src/tools/openpgp-tool.c     | 56 ++++++++++++++++++++++----------------------
+ 2 files changed, 39 insertions(+), 39 deletions(-)
+
+diff --git a/src/libopensc/card-openpgp.c b/src/libopensc/card-openpgp.c
+index 037ef73..ae40940 100644
+--- a/src/libopensc/card-openpgp.c
++++ b/src/libopensc/card-openpgp.c
+@@ -192,12 +192,12 @@ static struct do_info            pgp1_objects[] = {      /* OpenPGP card spec 1.1 */
+       { 0x5f35, SIMPLE,      READ_ALWAYS | WRITE_PIN3,  NULL,               sc_put_data },
+       { 0x5f50, SIMPLE,      READ_ALWAYS | WRITE_PIN3,  sc_get_data,        sc_put_data },
+       { 0x7f49, CONSTRUCTED, READ_ALWAYS | WRITE_NEVER, NULL,               NULL        },
+-      { 0xa400, CONSTRUCTED, READ_ALWAYS | WRITE_NEVER,  pgp_get_pubkey,     NULL        },
+-      { 0xa401, SIMPLE,      READ_ALWAYS | WRITE_PIN3, pgp_get_pubkey_pem, NULL        },
+-      { 0xb600, CONSTRUCTED, READ_ALWAYS | WRITE_NEVER,  pgp_get_pubkey,     NULL        },
+-      { 0xb601, SIMPLE,      READ_ALWAYS | WRITE_PIN3, pgp_get_pubkey_pem, NULL        },
+-      { 0xb800, CONSTRUCTED, READ_ALWAYS | WRITE_NEVER,  pgp_get_pubkey,     NULL        },
+-      { 0xb801, SIMPLE,      READ_ALWAYS | WRITE_PIN3, pgp_get_pubkey_pem, NULL        },
++      { 0xa400, CONSTRUCTED, READ_ALWAYS | WRITE_NEVER, pgp_get_pubkey,     NULL        },
++      { 0xa401, SIMPLE,      READ_ALWAYS | WRITE_PIN3,  pgp_get_pubkey_pem, NULL        },
++      { 0xb600, CONSTRUCTED, READ_ALWAYS | WRITE_NEVER, pgp_get_pubkey,     NULL        },
++      { 0xb601, SIMPLE,      READ_ALWAYS | WRITE_PIN3,  pgp_get_pubkey_pem, NULL        },
++      { 0xb800, CONSTRUCTED, READ_ALWAYS | WRITE_NEVER, pgp_get_pubkey,     NULL        },
++      { 0xb801, SIMPLE,      READ_ALWAYS | WRITE_PIN3,  pgp_get_pubkey_pem, NULL        },
+       { 0, 0, 0, NULL, NULL },
+ };
+@@ -253,11 +253,11 @@ static struct do_info            pgp2_objects[] = {      /* OpenPGP card spec 2.0 */
+       /* The 0xA401, 0xB601, 0xB801 are just symbolic, it does not represent any real DO.
+        * However, their R/W access condition may block the process of importing key in pkcs15init.
+        * So we set their accesses condition as WRITE_PIN3 (writable). */
+-      { 0xa401, SIMPLE,      READ_ALWAYS | WRITE_PIN3, pgp_get_pubkey_pem, NULL        },
+-      { 0xb600, CONSTRUCTED, READ_ALWAYS | WRITE_NEVER,  pgp_get_pubkey,     NULL        },
+-      { 0xb601, SIMPLE,      READ_ALWAYS | WRITE_PIN3, pgp_get_pubkey_pem, NULL        },
+-      { 0xb800, CONSTRUCTED, READ_ALWAYS | WRITE_NEVER,  pgp_get_pubkey,     NULL        },
+-      { 0xb801, SIMPLE,      READ_ALWAYS | WRITE_PIN3, pgp_get_pubkey_pem, NULL        },
++      { 0xa401, SIMPLE,      READ_ALWAYS | WRITE_PIN3,  pgp_get_pubkey_pem, NULL        },
++      { 0xb600, CONSTRUCTED, READ_ALWAYS | WRITE_NEVER, pgp_get_pubkey,     NULL        },
++      { 0xb601, SIMPLE,      READ_ALWAYS | WRITE_PIN3,  pgp_get_pubkey_pem, NULL        },
++      { 0xb800, CONSTRUCTED, READ_ALWAYS | WRITE_NEVER, pgp_get_pubkey,     NULL        },
++      { 0xb801, SIMPLE,      READ_ALWAYS | WRITE_PIN3,  pgp_get_pubkey_pem, NULL        },
+       { 0, 0, 0, NULL, NULL },
+ };
+diff --git a/src/tools/openpgp-tool.c b/src/tools/openpgp-tool.c
+index 374819a..a0334ca 100644
+--- a/src/tools/openpgp-tool.c
++++ b/src/tools/openpgp-tool.c
+@@ -37,11 +37,11 @@
+ #include "util.h"
+ #include "libopensc/log.h"
+-#define       OPT_RAW         256
+-#define       OPT_PRETTY      257
+-#define       OPT_VERIFY      258
+-#define       OPT_PIN     259
+-#define       OPT_DELKEY  260
++#define OPT_RAW     256
++#define OPT_PRETTY  257
++#define OPT_VERIFY  258
++#define OPT_PIN     259
++#define OPT_DELKEY  260
+ /* define structures */
+ struct ef_name_map {
+@@ -142,10 +142,10 @@ static const struct ef_name_map openpgp_data[] = {
+ static void show_version(void)
+ {
+       fprintf(stderr,
+-              "openpgp-tool - OpenPGP card utility version " PACKAGE_VERSION "\n"
+-              "\n"
+-              "Copyright (c) 2012 Peter Marschall <peter@adpm.de>\n"
+-              "Licensed under LGPL v2\n");
++              "openpgp-tool - OpenPGP card utility version " PACKAGE_VERSION "\n"
++              "\n"
++              "Copyright (c) 2012 Peter Marschall <peter@adpm.de>\n"
++              "Licensed under LGPL v2\n");
+ }
+@@ -176,16 +176,16 @@ static char *prettify_language(char *str)
+ {
+       if (str != NULL) {
+               switch (strlen(str)) {
+-                      case 8: memmove(str+7, str+6, 1+strlen(str+6));
++                      case 8: memmove(str+7, str+6, 1+strlen(str+6));
+                               str[6] = ',';
+                               /* fall through */
+-                      case 6: memmove(str+5, str+4, 1+strlen(str+4));
++                      case 6: memmove(str+5, str+4, 1+strlen(str+4));
+                               str[4] = ',';
+                               /* fall through */
+-                      case 4: memmove(str+3, str+2, 1+strlen(str+2));
++                      case 4: memmove(str+3, str+2, 1+strlen(str+2));
+                               str[2] = ',';
+                               /* fall through */
+-                      case 2:  return str;
++                      case 2: return str;
+               }
+       }
+       return NULL;
+@@ -197,10 +197,10 @@ static char *prettify_gender(char *str)
+ {
+       if (str != NULL) {
+               switch (*str) {
+-                      case '0':  return "unknown";
+-                      case '1':  return "male";
+-                      case '2':  return "female";
+-                      case '9':  return "not applicable";
++                      case '0': return "unknown";
++                      case '1': return "male";
++                      case '2': return "female";
++                      case '9': return "not applicable";
+               }
+       }
+       return NULL;
+@@ -218,7 +218,7 @@ static void display_data(const struct ef_name_map *mapping, char *value)
+                               char *envvar;
+                               envvar = malloc(strlen(mapping->env_name) +
+-                                              strlen(value) + 2);
++                                              strlen(value) + 2);
+                               if (envvar != NULL) {
+                                       strcpy(envvar, mapping->env_name);
+                                       strcat(envvar, "=");
+@@ -346,20 +346,20 @@ static int do_userinfo(sc_card_t *card)
+               if (!count)
+                       continue;
+-              if (count > (int)sizeof(buf) - 1)   {
++              if (count > (int)sizeof(buf) - 1) {
+                       fprintf(stderr, "Too small buffer to read the OpenPGP data\n");
+                       return EXIT_FAILURE;
+               }
+-      
+-              r = sc_read_binary(card, 0, buf, count, 0);
+-                      if (r < 0) {
++
++              r = sc_read_binary(card, 0, buf, count, 0);
++              if (r < 0) {
+                       fprintf(stderr, "%s: read failed - %s\n", openpgp_data[i].ef, sc_strerror(r));
+                       return EXIT_FAILURE;
+-              }
+-                      if (r != count) {
+-                        fprintf(stderr, "%s: expecting %d, got only %d bytes\n", openpgp_data[i].ef, count, r);
++              }
++              if (r != count) {
++                      fprintf(stderr, "%s: expecting %d, got only %d bytes\n", openpgp_data[i].ef, count, r);
+                       return EXIT_FAILURE;
+-              }
++              }
+               buf[count] = '\0';
+@@ -628,7 +628,7 @@ int main(int argc, char **argv)
+       r = sc_context_create(&ctx, &ctx_param);
+       if (r) {
+               util_fatal("failed to establish context: %s\n",
+-                      sc_strerror(r));
++                         sc_strerror(r));
+               return EXIT_FAILURE;
+       }
+@@ -640,7 +640,7 @@ int main(int argc, char **argv)
+       r = util_connect_card(ctx, &card, opt_reader, opt_wait, verbose);
+       if (r) {
+               util_fatal("failed to connect to card: %s\n",
+-                      sc_strerror(r));
++                         sc_strerror(r));
+               return EXIT_FAILURE;
+       }
+-- 
+2.1.3
+
diff --git a/utils/opensc/patches/0020-OpenPGP-Don-t-use-sc_log-in-openpgp-tool.patch b/utils/opensc/patches/0020-OpenPGP-Don-t-use-sc_log-in-openpgp-tool.patch
new file mode 100644 (file)
index 0000000..b73826f
--- /dev/null
@@ -0,0 +1,84 @@
+From 9acf5c1ad7d8a32b472203d3bd8860ea2cbde0e7 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Nguy=E1=BB=85n=20H=E1=BB=93ng=20Qu=C3=A2n?=
+ <ng.hong.quan@gmail.com>
+Date: Sun, 3 Nov 2013 02:53:35 +0800
+Subject: [PATCH 20/26] OpenPGP: Don't use sc_log in openpgp-tool.
+
+---
+ src/tools/openpgp-tool.c | 21 +++++++++++----------
+ 1 file changed, 11 insertions(+), 10 deletions(-)
+
+diff --git a/src/tools/openpgp-tool.c b/src/tools/openpgp-tool.c
+index a0334ca..505abd9 100644
+--- a/src/tools/openpgp-tool.c
++++ b/src/tools/openpgp-tool.c
+@@ -414,8 +414,6 @@ int do_genkey(sc_card_t *card, u8 key_id, unsigned int key_len)
+       sc_path_t path;
+       sc_file_t *file;
+-      LOG_FUNC_CALLED(card->ctx);
+-
+       if (key_id < 1 || key_id > 3) {
+               printf("Unknown key ID %d.\n", key_id);
+               return 1;
+@@ -479,14 +477,14 @@ int delete_key_gnuk(sc_card_t *card, u8 key_id)
+       u8 *data = NULL;
+       /* Delete fingerprint */
+-      sc_log(ctx, "Delete fingerprints");
++      fprintf(stdout, "Delete fingerprints");
+       r |= sc_put_data(card, 0xC6 + key_id, NULL, 0);
+       /* Delete creation time */
+-      sc_log(ctx, "Delete creation time");
++      fprintf(stdout, "Delete creation time");
+       r |= sc_put_data(card, 0xCD + key_id, NULL, 0);
+       /* Rewrite Extended Header List */
+-      sc_log(ctx, "Rewrite Extended Header List");
++      fprintf(stdout, "Rewrite Extended Header List");
+       if (key_id == 1)
+               data = "\x4D\x02\xB6";
+@@ -534,15 +532,18 @@ int delete_key_openpgp(sc_card_t *card, u8 key_id)
+               /* Build APDU from binary array */
+               r = sc_bytes2apdu(card->ctx, buf, len0, &apdu);
+               if (r) {
+-                      sc_log(ctx, "Failed to build APDU");
+-                      LOG_FUNC_RETURN(ctx, SC_ERROR_INTERNAL);
++                      fprintf(stderr, "Failed to build APDU: %s\n", sc_strerror(r));
++                      return r;
+               }
+               apdu.resp = rbuf;
+               apdu.resplen = sizeof(rbuf);
+               /* Send APDU to card */
+               r = sc_transmit_apdu(card, &apdu);
+-              LOG_TEST_RET(ctx, r, "Transmiting APDU failed");
++              if (r) {
++                      fprintf(stderr, "Transmiting APDU failed: %s\n", sc_strerror(r));
++                      return r;
++              }
+       }
+       /* TODO: Rewrite Extended Header List.
+        * Not support by OpenGPG v2 yet */
+@@ -557,7 +558,7 @@ int delete_key(sc_card_t *card, u8 key_id)
+       LOG_FUNC_CALLED(ctx);
+       /* Check key ID */
+       if (key_id < 1 || key_id > 3) {
+-              sc_log(ctx, "Invalid key ID %d", key_id);
++              fprintf(stderr, "Invalid key ID %d", key_id);
+               LOG_FUNC_RETURN(ctx, SC_ERROR_INVALID_ARGUMENTS);
+       }
+@@ -649,7 +650,7 @@ int main(int argc, char **argv)
+           (card->type != SC_CARD_TYPE_OPENPGP_V2) &&
+           (card->type != SC_CARD_TYPE_OPENPGP_GNUK)) {
+               util_error("not an OpenPGP card");
+-              sc_log(card->ctx, "Card type %X", card->type);
++              fprintf(stderr, "Card type %X\n", card->type);
+               exit_status = EXIT_FAILURE;
+               goto out;
+       }
+-- 
+2.1.3
+
diff --git a/utils/opensc/patches/0021-OpenPGP-Don-t-reimplement-gnuk_delete_key-in-openpgp.patch b/utils/opensc/patches/0021-OpenPGP-Don-t-reimplement-gnuk_delete_key-in-openpgp.patch
new file mode 100644 (file)
index 0000000..dc8fe84
--- /dev/null
@@ -0,0 +1,112 @@
+From 0fdbf868976172486af210accafbab163452ff78 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Nguy=E1=BB=85n=20H=E1=BB=93ng=20Qu=C3=A2n?=
+ <ng.hong.quan@gmail.com>
+Date: Sun, 3 Nov 2013 11:26:25 +0800
+Subject: [PATCH 21/26] OpenPGP: Don't reimplement gnuk_delete_key in
+ openpgp-tool.
+
+---
+ src/tools/openpgp-tool.c | 64 ++++++------------------------------------------
+ 1 file changed, 8 insertions(+), 56 deletions(-)
+
+diff --git a/src/tools/openpgp-tool.c b/src/tools/openpgp-tool.c
+index 505abd9..a7796e7 100644
+--- a/src/tools/openpgp-tool.c
++++ b/src/tools/openpgp-tool.c
+@@ -468,38 +468,6 @@ int do_verify(sc_card_t *card, char *type, char *pin)
+ }
+ /**
+- * Delete key, for Gnuk.
+- **/
+-int delete_key_gnuk(sc_card_t *card, u8 key_id)
+-{
+-      sc_context_t *ctx = card->ctx;
+-      int r = SC_SUCCESS;
+-      u8 *data = NULL;
+-
+-      /* Delete fingerprint */
+-      fprintf(stdout, "Delete fingerprints");
+-      r |= sc_put_data(card, 0xC6 + key_id, NULL, 0);
+-      /* Delete creation time */
+-      fprintf(stdout, "Delete creation time");
+-      r |= sc_put_data(card, 0xCD + key_id, NULL, 0);
+-
+-      /* Rewrite Extended Header List */
+-      fprintf(stdout, "Rewrite Extended Header List");
+-
+-      if (key_id == 1)
+-              data = "\x4D\x02\xB6";
+-      else if (key_id == 2)
+-              data = "\x4D\x02\xB8";
+-      else if (key_id == 3)
+-              data = "\x4D\x02\xA4";
+-      else
+-              return SC_ERROR_INVALID_ARGUMENTS;
+-
+-      r |= sc_put_data(card, 0x4D, data, strlen(data) + 1);
+-      return r;
+-}
+-
+-/**
+  * Delete key, for OpenPGP card.
+  * This function is not complete and is reserved for future version (> 2) of OpenPGP card.
+  **/
+@@ -547,32 +515,13 @@ int delete_key_openpgp(sc_card_t *card, u8 key_id)
+       }
+       /* TODO: Rewrite Extended Header List.
+        * Not support by OpenGPG v2 yet */
+-      LOG_FUNC_RETURN(ctx, r);
+-}
+-
+-int delete_key(sc_card_t *card, u8 key_id)
+-{
+-      sc_context_t *ctx = card->ctx;
+-      int r;
+-
+-      LOG_FUNC_CALLED(ctx);
+-      /* Check key ID */
+-      if (key_id < 1 || key_id > 3) {
+-              fprintf(stderr, "Invalid key ID %d", key_id);
+-              LOG_FUNC_RETURN(ctx, SC_ERROR_INVALID_ARGUMENTS);
+-      }
+-
+-      if (card->type == SC_CARD_TYPE_OPENPGP_GNUK)
+-              r = delete_key_gnuk(card, key_id);
+-      else
+-              r = delete_key_openpgp(card, key_id);
+-
+-      LOG_FUNC_RETURN(ctx, r);
++      return r;
+ }
+ int do_delete_key(sc_card_t *card, u8 key_id)
+ {
+       sc_context_t *ctx = card->ctx;
++      sc_path_t path;
+       int r = SC_SUCCESS;
+       /* Currently, only Gnuk supports deleting keys */
+@@ -586,13 +535,16 @@ int do_delete_key(sc_card_t *card, u8 key_id)
+               return SC_ERROR_INVALID_ARGUMENTS;
+       }
+       if (key_id == 1 || key_id == 'a') {
+-              r |= delete_key(card, 1);
++              sc_format_path("B601", &path);
++              r |= sc_delete_file(card, &path);
+       }
+       if (key_id == 2 || key_id == 'a') {
+-              r |= delete_key(card, 2);
++              sc_format_path("B801", &path);
++              r |= sc_delete_file(card, &path);
+       }
+       if (key_id == 3 || key_id == 'a') {
+-              r |= delete_key(card, 3);
++              sc_format_path("A401", &path);
++              r |= sc_delete_file(card, &path);
+       }
+       return r;
+ }
+-- 
+2.1.3
+
diff --git a/utils/opensc/patches/0022-OpenPGP-Use-directly-binary-array-of-APDUs-for-ERASE.patch b/utils/opensc/patches/0022-OpenPGP-Use-directly-binary-array-of-APDUs-for-ERASE.patch
new file mode 100644 (file)
index 0000000..6297783
--- /dev/null
@@ -0,0 +1,87 @@
+From 0cd2a488d86006bb2740a4e73e7a0d859e1bf33c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Nguy=E1=BB=85n=20H=E1=BB=93ng=20Qu=C3=A2n?=
+ <ng.hong.quan@gmail.com>
+Date: Sun, 13 Jul 2014 17:37:59 +0800
+Subject: [PATCH 22/26] OpenPGP: Use directly binary array of APDUs for ERASE
+ command.
+
+I used a string presentation before and it needed an extra conversion step.
+---
+ src/libopensc/card-openpgp.c | 47 +++++++++++++++++++++++---------------------
+ 1 file changed, 25 insertions(+), 22 deletions(-)
+
+diff --git a/src/libopensc/card-openpgp.c b/src/libopensc/card-openpgp.c
+index ae40940..724fe73 100644
+--- a/src/libopensc/card-openpgp.c
++++ b/src/libopensc/card-openpgp.c
+@@ -2347,24 +2347,27 @@ out:
+ static int pgp_erase_card(sc_card_t *card)
+ {
+       sc_context_t *ctx = card->ctx;
+-      u8 *apdustring[10] = {
+-              "00:20:00:81:08:40:40:40:40:40:40:40:40",
+-              "00:20:00:81:08:40:40:40:40:40:40:40:40",
+-              "00:20:00:81:08:40:40:40:40:40:40:40:40",
+-              "00:20:00:81:08:40:40:40:40:40:40:40:40",
+-              "00:20:00:83:08:40:40:40:40:40:40:40:40",
+-              "00:20:00:83:08:40:40:40:40:40:40:40:40",
+-              "00:20:00:83:08:40:40:40:40:40:40:40:40",
+-              "00:20:00:83:08:40:40:40:40:40:40:40:40",
+-              "00:e6:00:00",
+-              "00:44:00:00"
++      /* Special series of commands to erase OpenPGP card,
++       * according to https://www.crypto-stick.com/en/faq
++       * (How to reset a Crypto Stick? question).
++       * Gnuk is known not to support this feature. */
++      u8 apdu_binaries[10][13] = {
++              {0, 0x20, 0, 0x81, 0x08, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40},
++              {0, 0x20, 0, 0x81, 0x08, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40},
++              {0, 0x20, 0, 0x81, 0x08, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40},
++              {0, 0x20, 0, 0x81, 0x08, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40},
++              {0, 0x20, 0, 0x83, 0x08, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40},
++              {0, 0x20, 0, 0x83, 0x08, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40},
++              {0, 0x20, 0, 0x83, 0x08, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40},
++              {0, 0x20, 0, 0x83, 0x08, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40},
++              {0, 0xe6, 0, 0},
++              {0, 0x44, 0, 0}
+       };
++      u8 apdu_lens[10] = {13, 13, 13, 13, 13, 13, 13, 13, 4, 4};
+       u8 buf[SC_MAX_APDU_BUFFER_SIZE];
+       u8 rbuf[SC_MAX_APDU_BUFFER_SIZE];
+       sc_apdu_t apdu;
+-      size_t len0;
+-      int commandsnum = 10;
+-      int i, r;
++      int i, l, r;
+       LOG_FUNC_CALLED(ctx);
+@@ -2376,17 +2379,17 @@ static int pgp_erase_card(sc_card_t *card)
+       sc_log(ctx, "Card is OpenPGP v2. Erase card.");
+       /* Iterate over 10 commands above */
+-      for (i = 0; i < commandsnum; i++) {
+-              /* Convert the string to binary array */
+-              len0 = sizeof(buf);
+-              sc_hex_to_bin(apdustring[i], buf, &len0);
+-              printf("Sending: ");
+-              for (r = 0; r < len0; r++)
+-                      printf("%02X ", buf[r]);
++      for (i = 0; i < sizeof(apdu_lens); i++) {
++              /* Length of the binary array of the current command */
++              l = apdu_lens[i];
++              /* Print the command to console */
++              printf("Sending %d: ", i);
++              for (r = 0; r < l; r++)
++                      printf("%02X ", apdu_binaries[i][r]);
+               printf("\n");
+               /* Build APDU from binary array */
+-              r = sc_bytes2apdu(card->ctx, buf, len0, &apdu);
++              r = sc_bytes2apdu(card->ctx, apdu_binaries[i], l, &apdu);
+               if (r) {
+                       sc_log(ctx, "Failed to build APDU");
+                       LOG_FUNC_RETURN(ctx, SC_ERROR_INTERNAL);
+-- 
+2.1.3
+
diff --git a/utils/opensc/patches/0023-OpenPGP-Rename-private-blob-type-to-avoid-confusing-.patch b/utils/opensc/patches/0023-OpenPGP-Rename-private-blob-type-to-avoid-confusing-.patch
new file mode 100644 (file)
index 0000000..f859f7c
--- /dev/null
@@ -0,0 +1,339 @@
+From 6f56ea4cfc52323002d818731a50a31e863b6843 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Nguy=E1=BB=85n=20H=E1=BB=93ng=20Qu=C3=A2n?=
+ <ng.hong.quan@gmail.com>
+Date: Sun, 13 Jul 2014 19:41:36 +0800
+Subject: [PATCH 23/26] OpenPGP: Rename private "blob" type to avoid confusing
+ with variable name.
+
+This name has been used for both data type and variable name of that
+type.
+---
+ src/libopensc/card-openpgp.c | 96 ++++++++++++++++++++++----------------------
+ 1 file changed, 49 insertions(+), 47 deletions(-)
+
+diff --git a/src/libopensc/card-openpgp.c b/src/libopensc/card-openpgp.c
+index 724fe73..ca3173c 100644
+--- a/src/libopensc/card-openpgp.c
++++ b/src/libopensc/card-openpgp.c
+@@ -111,9 +111,9 @@ enum _card_state {
+       CARD_STATE_ACTIVATED      = 0x05
+ };
+-struct blob {
+-      struct blob *   next;   /* pointer to next sibling */
+-      struct blob *   parent; /* pointer to parent */
++typedef struct pgp_blob {
++      struct pgp_blob *       next;   /* pointer to next sibling */
++      struct pgp_blob *       parent; /* pointer to parent */
+       struct do_info *info;
+       sc_file_t *     file;
+@@ -122,8 +122,8 @@ struct blob {
+       unsigned char * data;
+       unsigned int    len;
+-      struct blob *   files;  /* pointer to 1st child */
+-};
++      struct pgp_blob *       files;  /* pointer to 1st child */
++} pgp_blob_t;
+ struct do_info {
+       unsigned int    id;             /* ID of the DO in question */
+@@ -141,12 +141,12 @@ struct do_info {
+ static int            pgp_get_card_features(sc_card_t *card);
+ static int            pgp_finish(sc_card_t *card);
+-static void           pgp_iterate_blobs(struct blob *, int, void (*func)());
++static void           pgp_iterate_blobs(pgp_blob_t *, int, void (*func)());
+-static int            pgp_get_blob(sc_card_t *card, struct blob *blob,
+-                               unsigned int id, struct blob **ret);
+-static struct blob *  pgp_new_blob(sc_card_t *, struct blob *, unsigned int, sc_file_t *);
+-static void           pgp_free_blob(struct blob *);
++static int            pgp_get_blob(sc_card_t *card, pgp_blob_t *blob,
++                               unsigned int id, pgp_blob_t **ret);
++static pgp_blob_t *   pgp_new_blob(sc_card_t *, pgp_blob_t *, unsigned int, sc_file_t *);
++static void           pgp_free_blob(pgp_blob_t *);
+ static int            pgp_get_pubkey(sc_card_t *, unsigned int,
+                               u8 *, size_t);
+ static int            pgp_get_pubkey_pem(sc_card_t *, unsigned int,
+@@ -272,8 +272,8 @@ static struct do_info              pgp2_objects[] = {      /* OpenPGP card spec 2.0 */
+ #define DRVDATA(card)        ((struct pgp_priv_data *) ((card)->drv_data))
+ struct pgp_priv_data {
+-      struct blob *           mf;
+-      struct blob *           current;        /* currently selected file */
++      pgp_blob_t *            mf;
++      pgp_blob_t *            current;        /* currently selected file */
+       enum _version           bcd_version;
+       struct do_info          *pgp_objects;
+@@ -311,7 +311,7 @@ pgp_init(sc_card_t *card)
+       sc_file_t       *file = NULL;
+       struct do_info  *info;
+       int             r;
+-      struct blob     *child = NULL;
++      pgp_blob_t      *child = NULL;
+       LOG_FUNC_CALLED(card->ctx);
+@@ -389,7 +389,7 @@ pgp_get_card_features(sc_card_t *card)
+       unsigned char *hist_bytes = card->atr.value;
+       size_t atr_len = card->atr.len;
+       size_t i = 0;
+-      struct blob *blob, *blob6e, *blob73;
++      pgp_blob_t *blob, *blob6e, *blob73;
+       /* parse card capabilities from historical bytes */
+       while ((i < atr_len) && (hist_bytes[i] != 0x73))
+@@ -526,7 +526,7 @@ pgp_finish(sc_card_t *card)
+ /* internal: fill a blob's data */
+ static int
+-pgp_set_blob(struct blob *blob, const u8 *data, size_t len)
++pgp_set_blob(pgp_blob_t *blob, const u8 *data, size_t len)
+ {
+       if (blob->data)
+               free(blob->data);
+@@ -620,16 +620,16 @@ pgp_attach_acl(sc_card_t *card, sc_file_t *file, struct do_info *info)
+ }
+ /* internal: append a blob to the list of children of a given parent blob */
+-static struct blob *
+-pgp_new_blob(sc_card_t *card, struct blob *parent, unsigned int file_id,
++static pgp_blob_t *
++pgp_new_blob(sc_card_t *card, pgp_blob_t *parent, unsigned int file_id,
+               sc_file_t *file)
+ {
+-      struct blob *blob = NULL;
++      pgp_blob_t *blob = NULL;
+       if (file == NULL)
+               return NULL;
+-      if ((blob = calloc(1, sizeof(struct blob))) != NULL) {
++      if ((blob = calloc(1, sizeof(pgp_blob_t))) != NULL) {
+               struct pgp_priv_data *priv = DRVDATA (card);
+               struct do_info *info;
+@@ -643,7 +643,7 @@ pgp_new_blob(sc_card_t *card, struct blob *parent, unsigned int file_id,
+               blob->parent = parent;
+               if (parent != NULL) {
+-                      struct blob **p;
++                      pgp_blob_t **p;
+                       /* set file's path = parent's path + file's id */
+                       blob->file->path = parent->file->path;
+@@ -681,11 +681,11 @@ pgp_new_blob(sc_card_t *card, struct blob *parent, unsigned int file_id,
+ /* internal: free a blob including its content */
+ static void
+-pgp_free_blob(struct blob *blob)
++pgp_free_blob(pgp_blob_t *blob)
+ {
+       if (blob) {
+               if (blob->parent) {
+-                      struct blob **p;
++                      pgp_blob_t **p;
+                       /* remove blob from list of parent's children */
+                       for (p = &blob->parent->files; *p != NULL && *p != blob; p = &(*p)->next)
+@@ -705,14 +705,14 @@ pgp_free_blob(struct blob *blob)
+ /* internal: iterate through the blob tree, calling a function for each blob */
+ static void
+-pgp_iterate_blobs(struct blob *blob, int level, void (*func)())
++pgp_iterate_blobs(pgp_blob_t *blob, int level, void (*func)())
+ {
+       if (blob) {
+               if (level > 0) {
+-                      struct blob *child = blob->files;
++                      pgp_blob_t *child = blob->files;
+                       while (child != NULL) {
+-                              struct blob *next = child->next;
++                              pgp_blob_t *next = child->next;
+                               pgp_iterate_blobs(child, level-1, func);
+                               child = next;
+@@ -725,7 +725,7 @@ pgp_iterate_blobs(struct blob *blob, int level, void (*func)())
+ /* internal: read a blob's contents from card */
+ static int
+-pgp_read_blob(sc_card_t *card, struct blob *blob)
++pgp_read_blob(sc_card_t *card, pgp_blob_t *blob)
+ {
+       struct pgp_priv_data *priv = DRVDATA (card);
+@@ -772,7 +772,7 @@ pgp_read_blob(sc_card_t *card, struct blob *blob)
+  * The OpenPGP card has a TLV encoding according ASN.1 BER-encoding rules.
+  */
+ static int
+-pgp_enumerate_blob(sc_card_t *card, struct blob *blob)
++pgp_enumerate_blob(sc_card_t *card, pgp_blob_t *blob)
+ {
+       const u8        *in;
+       int             r;
+@@ -789,7 +789,7 @@ pgp_enumerate_blob(sc_card_t *card, struct blob *blob)
+               unsigned int    cla, tag, tmptag;
+               size_t          len;
+               const u8        *data = in;
+-              struct blob     *new;
++              pgp_blob_t      *new;
+               r = sc_asn1_read_tag(&data, blob->len - (in - blob->data),
+                                       &cla, &tag, &len);
+@@ -819,10 +819,10 @@ pgp_enumerate_blob(sc_card_t *card, struct blob *blob)
+ /* internal: find a blob by ID below a given parent, filling its contents when necessary */
+ static int
+-pgp_get_blob(sc_card_t *card, struct blob *blob, unsigned int id,
+-              struct blob **ret)
++pgp_get_blob(sc_card_t *card, pgp_blob_t *blob, unsigned int id,
++              pgp_blob_t **ret)
+ {
+-      struct blob             *child;
++      pgp_blob_t              *child;
+       int                     r;
+       if ((r = pgp_enumerate_blob(card, blob)) < 0)
+@@ -858,10 +858,10 @@ pgp_get_blob(sc_card_t *card, struct blob *blob, unsigned int id,
+ /* Internal: search recursively for a blob by ID below a given root */
+ static int
+-pgp_seek_blob(sc_card_t *card, struct blob *root, unsigned int id,
+-              struct blob **ret)
++pgp_seek_blob(sc_card_t *card, pgp_blob_t *root, unsigned int id,
++              pgp_blob_t **ret)
+ {
+-      struct blob     *child;
++      pgp_blob_t      *child;
+       int                     r;
+       if ((r = pgp_get_blob(card, root, id, ret)) == 0)
+@@ -883,11 +883,11 @@ pgp_seek_blob(sc_card_t *card, struct blob *root, unsigned int id,
+ }
+ /* internal: find a blob by tag - pgp_seek_blob with optimizations */
+-static struct blob *
++static pgp_blob_t *
+ pgp_find_blob(sc_card_t *card, unsigned int tag)
+ {
+       struct pgp_priv_data *priv = DRVDATA(card);
+-      struct blob *blob = NULL;
++      pgp_blob_t *blob = NULL;
+       int r;
+       /* Check if current selected blob is which we want to test*/
+@@ -941,7 +941,7 @@ static int
+ pgp_select_file(sc_card_t *card, const sc_path_t *path, sc_file_t **ret)
+ {
+       struct pgp_priv_data *priv = DRVDATA(card);
+-      struct blob     *blob;
++      pgp_blob_t      *blob;
+       unsigned int    path_start = 0;
+       unsigned int    n;
+       sc_path_t dummy_path;
+@@ -1022,7 +1022,7 @@ static int
+ pgp_list_files(sc_card_t *card, u8 *buf, size_t buflen)
+ {
+       struct pgp_priv_data *priv = DRVDATA(card);
+-      struct blob     *blob;
++      pgp_blob_t      *blob;
+       unsigned int    k;
+       int             r;
+@@ -1058,7 +1058,7 @@ pgp_read_binary(sc_card_t *card, unsigned int idx,
+               u8 *buf, size_t count, unsigned long flags)
+ {
+       struct pgp_priv_data *priv = DRVDATA(card);
+-      struct blob     *blob;
++      pgp_blob_t      *blob;
+       int             r;
+       LOG_FUNC_CALLED(card->ctx);
+@@ -1134,7 +1134,7 @@ static int
+ pgp_get_pubkey_pem(sc_card_t *card, unsigned int tag, u8 *buf, size_t buf_len)
+ {
+       struct pgp_priv_data *priv = DRVDATA(card);
+-      struct blob     *blob, *mod_blob, *exp_blob;
++      pgp_blob_t      *blob, *mod_blob, *exp_blob;
+       sc_pkcs15_pubkey_t pubkey;
+       u8              *data;
+       size_t          len;
+@@ -1329,7 +1329,7 @@ static int
+ pgp_put_data(sc_card_t *card, unsigned int tag, const u8 *buf, size_t buf_len)
+ {
+       struct pgp_priv_data *priv = DRVDATA(card);
+-      struct blob *affected_blob = NULL;
++      pgp_blob_t *affected_blob = NULL;
+       struct do_info *dinfo = NULL;
+       int r;
+@@ -1603,7 +1603,7 @@ static int
+ pgp_update_new_algo_attr(sc_card_t *card, sc_cardctl_openpgp_keygen_info_t *key_info)
+ {
+       struct pgp_priv_data *priv = DRVDATA(card);
+-      struct blob *algo_blob;
++      pgp_blob_t *algo_blob;
+       unsigned int old_modulus_len;     /* Measured in bit */
+       unsigned int old_exponent_len;
+       const unsigned int tag = 0x00C0 | key_info->keytype;
+@@ -1708,7 +1708,7 @@ pgp_calculate_and_store_fingerprint(sc_card_t *card, time_t ctime,
+       u8 *p; /* Use this pointer to set fp_buffer content */
+       size_t pk_packet_len;
+       unsigned int tag;
+-      struct blob *fpseq_blob;
++      pgp_blob_t *fpseq_blob;
+       u8 *newdata;
+       int r;
+@@ -1797,7 +1797,7 @@ pgp_update_pubkey_blob(sc_card_t *card, u8* modulus, size_t modulus_len,
+                        u8* exponent, size_t exponent_len, u8 key_id)
+ {
+       struct pgp_priv_data *priv = DRVDATA(card);
+-      struct blob *pk_blob;
++      pgp_blob_t *pk_blob;
+       unsigned int blob_id;
+       sc_pkcs15_pubkey_t pubkey;
+       u8 *data = NULL;
+@@ -1939,6 +1939,8 @@ static int pgp_update_card_algorithms(sc_card_t *card, sc_cardctl_openpgp_keygen
+  **/
+ static int pgp_gen_key(sc_card_t *card, sc_cardctl_openpgp_keygen_info_t *key_info)
+ {
++      struct pgp_priv_data *priv = DRVDATA(card);
++      pgp_blob_t *algo_blob;
+       sc_apdu_t apdu;
+       /* Temporary variables to hold APDU params */
+       u8 apdu_case;
+@@ -2132,7 +2134,7 @@ pgp_build_extended_header_list(sc_card_t *card, sc_cardctl_openpgp_keystore_info
+       };
+       size_t comp_to_add = 3;
+       size_t req_e_len = 0;     /* The exponent length specified in Algorithm Attributes */
+-      struct blob *alat_blob;
++      pgp_blob_t *alat_blob;
+       u8 i;
+       int r;
+@@ -2483,7 +2485,7 @@ static int
+ pgp_delete_file(sc_card_t *card, const sc_path_t *path)
+ {
+       struct pgp_priv_data *priv = DRVDATA(card);
+-      struct blob *blob;
++      pgp_blob_t *blob;
+       sc_file_t *file;
+       u8 key_id;
+       int r;
+@@ -2533,7 +2535,7 @@ pgp_update_binary(sc_card_t *card, unsigned int idx,
+                 const u8 *buf, size_t count, unsigned long flags)
+ {
+       struct pgp_priv_data *priv = DRVDATA(card);
+-      struct blob *blob = priv->current;
++      pgp_blob_t *blob = priv->current;
+       int r = SC_SUCCESS;
+       LOG_FUNC_CALLED(card->ctx);
+-- 
+2.1.3
+
diff --git a/utils/opensc/patches/0024-OpenPGP-Fix-crash-after-accessing-inexistent-file.patch b/utils/opensc/patches/0024-OpenPGP-Fix-crash-after-accessing-inexistent-file.patch
new file mode 100644 (file)
index 0000000..7d8a0ff
--- /dev/null
@@ -0,0 +1,41 @@
+From 8a87a4ee9107f250254d5c93c6fd62224c400ce7 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Nguy=E1=BB=85n=20H=E1=BB=93ng=20Qu=C3=A2n?=
+ <ng.hong.quan@gmail.com>
+Date: Mon, 14 Jul 2014 01:30:28 +0800
+Subject: [PATCH 24/26] OpenPGP: Fix crash after accessing inexistent file.
+
+---
+ src/libopensc/card-openpgp.c | 3 ---
+ 1 file changed, 3 deletions(-)
+
+diff --git a/src/libopensc/card-openpgp.c b/src/libopensc/card-openpgp.c
+index ca3173c..94c69ae 100644
+--- a/src/libopensc/card-openpgp.c
++++ b/src/libopensc/card-openpgp.c
+@@ -973,7 +973,6 @@ pgp_select_file(sc_card_t *card, const sc_path_t *path, sc_file_t **ret)
+                        * So we set its size to be the same as max certificate size the card supports. */
+                       (*ret)->size = priv->max_cert_size;
+               }
+-              priv->current = NULL;
+               LOG_FUNC_RETURN(card->ctx, SC_SUCCESS);
+       }
+@@ -990,7 +989,6 @@ pgp_select_file(sc_card_t *card, const sc_path_t *path, sc_file_t **ret)
+               /* This file ID is refered when importing key&certificate via pkcs15init, like above.
+                * We pretend to successfully find this inexistent file. */
+               if (id == 0x4402 || id == 0x5f48) {
+-                      priv->current = NULL;
+                       if (ret == NULL)
+                               /* No need to return file */
+                               LOG_FUNC_RETURN(card->ctx, SC_SUCCESS);
+@@ -1002,7 +1000,6 @@ pgp_select_file(sc_card_t *card, const sc_path_t *path, sc_file_t **ret)
+               }
+               if (r < 0) {    /* failure */
+-                      priv->current = NULL;
+                       LOG_FUNC_RETURN(card->ctx, r);
+               }
+       }
+-- 
+2.1.3
+
diff --git a/utils/opensc/patches/0025-Replace-hardcode.patch b/utils/opensc/patches/0025-Replace-hardcode.patch
new file mode 100644 (file)
index 0000000..0eb750c
--- /dev/null
@@ -0,0 +1,148 @@
+From da70a41383e2ab81fbcc89fb1067f5a189e0fb97 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Nguy=E1=BB=85n=20H=E1=BB=93ng=20Qu=C3=A2n?=
+ <ng.hong.quan@gmail.com>
+Date: Sun, 9 Nov 2014 15:58:40 +0700
+Subject: [PATCH 25/26] Replace hardcode.
+
+---
+ src/libopensc/card-openpgp.c | 72 +++++++++++++++++++++++++-------------------
+ 1 file changed, 41 insertions(+), 31 deletions(-)
+
+diff --git a/src/libopensc/card-openpgp.c b/src/libopensc/card-openpgp.c
+index 94c69ae..1e6e338 100644
+--- a/src/libopensc/card-openpgp.c
++++ b/src/libopensc/card-openpgp.c
+@@ -152,6 +152,24 @@ static int                pgp_get_pubkey(sc_card_t *, unsigned int,
+ static int            pgp_get_pubkey_pem(sc_card_t *, unsigned int,
+                               u8 *, size_t);
++/* The DO holding X.509 certificate is constructed but does not contain child DO.
++ * We should notice this when building fake file system later. */
++#define DO_CERT                  0x7f21
++/* Control Reference Template of private keys. Ref: Section 4.3.3.7 of OpenPGP card v2 spec.
++ * Here we seen it as DO just for convenient */
++#define DO_SIGN                  0xb600
++#define DO_ENCR                  0xb800
++#define DO_AUTH                  0xa400
++/* These DO does not exist. They are defined and used just for ease of implementation */
++#define DO_SIGN_SYM              0xb601
++#define DO_ENCR_SYM              0xb801
++#define DO_AUTH_SYM              0xa401
++/* Maximum length for response buffer when reading pubkey. This value is calculated with
++ * 4096-bit key length */
++#define MAXLEN_RESP_PUBKEY       527
++/* Gnuk only support 1 key length (2048 bit) */
++#define MAXLEN_RESP_PUBKEY_GNUK  271
++
+ static struct do_info         pgp1_objects[] = {      /* OpenPGP card spec 1.1 */
+       { 0x004f, SIMPLE,      READ_ALWAYS | WRITE_NEVER, NULL,               NULL        },
+       { 0x005b, SIMPLE,      READ_ALWAYS | WRITE_PIN3,  NULL,               sc_put_data },
+@@ -192,12 +210,12 @@ static struct do_info            pgp1_objects[] = {      /* OpenPGP card spec 1.1 */
+       { 0x5f35, SIMPLE,      READ_ALWAYS | WRITE_PIN3,  NULL,               sc_put_data },
+       { 0x5f50, SIMPLE,      READ_ALWAYS | WRITE_PIN3,  sc_get_data,        sc_put_data },
+       { 0x7f49, CONSTRUCTED, READ_ALWAYS | WRITE_NEVER, NULL,               NULL        },
+-      { 0xa400, CONSTRUCTED, READ_ALWAYS | WRITE_NEVER, pgp_get_pubkey,     NULL        },
+-      { 0xa401, SIMPLE,      READ_ALWAYS | WRITE_PIN3,  pgp_get_pubkey_pem, NULL        },
+-      { 0xb600, CONSTRUCTED, READ_ALWAYS | WRITE_NEVER, pgp_get_pubkey,     NULL        },
+-      { 0xb601, SIMPLE,      READ_ALWAYS | WRITE_PIN3,  pgp_get_pubkey_pem, NULL        },
+-      { 0xb800, CONSTRUCTED, READ_ALWAYS | WRITE_NEVER, pgp_get_pubkey,     NULL        },
+-      { 0xb801, SIMPLE,      READ_ALWAYS | WRITE_PIN3,  pgp_get_pubkey_pem, NULL        },
++      { DO_AUTH,     CONSTRUCTED, READ_ALWAYS | WRITE_NEVER, pgp_get_pubkey,     NULL   },
++      { DO_AUTH_SYM, SIMPLE,      READ_ALWAYS | WRITE_PIN3,  pgp_get_pubkey_pem, NULL   },
++      { DO_SIGN,     CONSTRUCTED, READ_ALWAYS | WRITE_NEVER, pgp_get_pubkey,     NULL   },
++      { DO_SIGN_SYM, SIMPLE,      READ_ALWAYS | WRITE_PIN3,  pgp_get_pubkey_pem, NULL   },
++      { DO_ENCR,     CONSTRUCTED, READ_ALWAYS | WRITE_NEVER, pgp_get_pubkey,     NULL   },
++      { DO_ENCR_SYM, SIMPLE,      READ_ALWAYS | WRITE_PIN3,  pgp_get_pubkey_pem, NULL   },
+       { 0, 0, 0, NULL, NULL },
+ };
+@@ -246,30 +264,21 @@ static struct do_info            pgp2_objects[] = {      /* OpenPGP card spec 2.0 */
+       { 0x5f52, SIMPLE,      READ_ALWAYS | WRITE_NEVER, sc_get_data,        NULL        },
+       /* The 7F21 is constructed DO in spec, but in practice, its content can be retrieved
+        * as simple DO (no need to parse TLV). */
+-      { 0x7f21, SIMPLE,      READ_ALWAYS | WRITE_PIN3,  sc_get_data,        sc_put_data },
++      { DO_CERT, SIMPLE,      READ_ALWAYS | WRITE_PIN3,  sc_get_data,        sc_put_data },
+       { 0x7f48, CONSTRUCTED, READ_NEVER  | WRITE_NEVER, NULL,               NULL        },
+       { 0x7f49, CONSTRUCTED, READ_ALWAYS | WRITE_NEVER, NULL,               NULL        },
+-      { 0xa400, CONSTRUCTED, READ_ALWAYS | WRITE_NEVER, pgp_get_pubkey,     NULL        },
++      { DO_AUTH,     CONSTRUCTED, READ_ALWAYS | WRITE_NEVER, pgp_get_pubkey,     NULL   },
+       /* The 0xA401, 0xB601, 0xB801 are just symbolic, it does not represent any real DO.
+        * However, their R/W access condition may block the process of importing key in pkcs15init.
+        * So we set their accesses condition as WRITE_PIN3 (writable). */
+-      { 0xa401, SIMPLE,      READ_ALWAYS | WRITE_PIN3,  pgp_get_pubkey_pem, NULL        },
+-      { 0xb600, CONSTRUCTED, READ_ALWAYS | WRITE_NEVER, pgp_get_pubkey,     NULL        },
+-      { 0xb601, SIMPLE,      READ_ALWAYS | WRITE_PIN3,  pgp_get_pubkey_pem, NULL        },
+-      { 0xb800, CONSTRUCTED, READ_ALWAYS | WRITE_NEVER, pgp_get_pubkey,     NULL        },
+-      { 0xb801, SIMPLE,      READ_ALWAYS | WRITE_PIN3,  pgp_get_pubkey_pem, NULL        },
++      { DO_AUTH_SYM, SIMPLE,      READ_ALWAYS | WRITE_PIN3,  pgp_get_pubkey_pem, NULL   },
++      { DO_SIGN,     CONSTRUCTED, READ_ALWAYS | WRITE_NEVER, pgp_get_pubkey,     NULL   },
++      { DO_SIGN_SYM, SIMPLE,      READ_ALWAYS | WRITE_PIN3,  pgp_get_pubkey_pem, NULL   },
++      { DO_ENCR,     CONSTRUCTED, READ_ALWAYS | WRITE_NEVER, pgp_get_pubkey,     NULL   },
++      { DO_ENCR_SYM, SIMPLE,      READ_ALWAYS | WRITE_PIN3,  pgp_get_pubkey_pem, NULL   },
+       { 0, 0, 0, NULL, NULL },
+ };
+-/* The DO holding X.509 certificate is constructed but does not contain child DO.
+- * We should notice this when building fake file system later. */
+-#define DO_CERT                  0x7f21
+-/* Maximum length for response buffer when reading pubkey. This value is calculated with
+- * 4096-bit key length */
+-#define MAXLEN_RESP_PUBKEY       527
+-/* Gnuk only support 1 key length (2048 bit) */
+-#define MAXLEN_RESP_PUBKEY_GNUK  271
+-
+ #define DRVDATA(card)        ((struct pgp_priv_data *) ((card)->drv_data))
+ struct pgp_priv_data {
+       pgp_blob_t *            mf;
+@@ -747,8 +756,9 @@ pgp_read_blob(sc_card_t *card, pgp_blob_t *blob)
+               /* Buffer length for Gnuk pubkey */
+               if (card->type == SC_CARD_TYPE_OPENPGP_GNUK &&
+-                  (blob->id == 0xa400 || blob->id == 0xb600 || blob->id == 0xb800
+-                   || blob->id == 0xa401 || blob->id == 0xb601 || blob->id == 0xb801)) {
++                  (blob->id == DO_AUTH || blob->id == DO_SIGN || blob->id == DO_ENCR
++                   || blob->id == DO_AUTH_SYM || blob->id == DO_SIGN_SYM
++                   || blob->id == DO_ENCR_SYM)) {
+                       buf_len = MAXLEN_RESP_PUBKEY_GNUK;
+               }
+@@ -1804,11 +1814,11 @@ pgp_update_pubkey_blob(sc_card_t *card, u8* modulus, size_t modulus_len,
+       LOG_FUNC_CALLED(card->ctx);
+       if (key_id == SC_OPENPGP_KEY_SIGN)
+-              blob_id = 0xB601;
++              blob_id = DO_SIGN_SYM;
+       else if (key_id == SC_OPENPGP_KEY_ENCR)
+-              blob_id = 0xB801;
++              blob_id = DO_ENCR_SYM;
+       else if (key_id == SC_OPENPGP_KEY_AUTH)
+-              blob_id = 0xA401;
++              blob_id = DO_AUTH_SYM;
+       else {
+               sc_log(card->ctx, "Unknown key id %X.", key_id);
+               LOG_FUNC_RETURN(card->ctx, SC_ERROR_INVALID_ARGUMENTS);
+@@ -2501,17 +2511,17 @@ pgp_delete_file(sc_card_t *card, const sc_path_t *path)
+               LOG_FUNC_RETURN(card->ctx, SC_ERROR_NOT_SUPPORTED);
+       if (card->type != SC_CARD_TYPE_OPENPGP_GNUK &&
+-          (file->id == 0xB601 || file->id == 0xB801 || file->id == 0xA401)) {
++          (file->id == DO_SIGN_SYM || file->id == DO_ENCR_SYM || file->id == DO_AUTH_SYM)) {
+               /* These tags are just symbolic. We don't really delete it. */
+               r = SC_SUCCESS;
+       }
+-      else if (card->type == SC_CARD_TYPE_OPENPGP_GNUK && file->id == 0xB601) {
++      else if (card->type == SC_CARD_TYPE_OPENPGP_GNUK && file->id == DO_SIGN_SYM) {
+               r = gnuk_delete_key(card, 1);
+       }
+-      else if (card->type == SC_CARD_TYPE_OPENPGP_GNUK && file->id == 0xB801) {
++      else if (card->type == SC_CARD_TYPE_OPENPGP_GNUK && file->id == DO_ENCR_SYM) {
+               r = gnuk_delete_key(card, 2);
+       }
+-      else if (card->type == SC_CARD_TYPE_OPENPGP_GNUK && file->id == 0xA401) {
++      else if (card->type == SC_CARD_TYPE_OPENPGP_GNUK && file->id == DO_AUTH_SYM) {
+               r = gnuk_delete_key(card, 3);
+       }
+       else {
+-- 
+2.1.3
+
diff --git a/utils/opensc/patches/0026-hardcode-defines-for-DO-s.patch b/utils/opensc/patches/0026-hardcode-defines-for-DO-s.patch
new file mode 100644 (file)
index 0000000..d106e86
--- /dev/null
@@ -0,0 +1,53 @@
+From b9dae832db54b206a15bcc12e290cef50f31c3d0 Mon Sep 17 00:00:00 2001
+From: george <ggkitsas@yahoo.com>
+Date: Tue, 11 Nov 2014 16:16:15 +0100
+Subject: [PATCH 26/26] hardcode->defines for DO's
+
+---
+ src/libopensc/card-openpgp.c | 16 ++++++++++++++--
+ 1 file changed, 14 insertions(+), 2 deletions(-)
+
+diff --git a/src/libopensc/card-openpgp.c b/src/libopensc/card-openpgp.c
+index 1e6e338..8464914 100644
+--- a/src/libopensc/card-openpgp.c
++++ b/src/libopensc/card-openpgp.c
+@@ -164,6 +164,18 @@ static int                pgp_get_pubkey_pem(sc_card_t *, unsigned int,
+ #define DO_SIGN_SYM              0xb601
+ #define DO_ENCR_SYM              0xb801
+ #define DO_AUTH_SYM              0xa401
++/* Private DO's */
++#define DO_PRIV1                 0x0101
++#define DO_PRIV2                 0x0102
++#define DO_PRIV3                 0x0103
++#define DO_PRIV4                 0x0104
++/* Cardholder information DO's */
++#define DO_CARDHOLDER            0x65
++#define DO_NAME                  0x5b
++#define DO_LANG_PREF             0x5f2d
++#define DO_SEX                   0x5f35
++
++
+ /* Maximum length for response buffer when reading pubkey. This value is calculated with
+  * 4096-bit key length */
+ #define MAXLEN_RESP_PUBKEY       527
+@@ -851,7 +863,7 @@ pgp_get_blob(sc_card_t *card, pgp_blob_t *blob, unsigned int id,
+       /* Special case:
+        * Gnuk does not have default value for children of DO 65 (DOs 5B, 5F2D, 5F35)
+        * So, if these blob was not found, we create it. */
+-      if (blob->id == 0x65 && (id == 0x5B || id == 0x5F2D || id == 0x5F35)) {
++      if (blob->id == DO_CARDHOLDER && (id == DO_NAME || id == DO_LANG_PREF || id == DO_SEX)) {
+               sc_log(card->ctx, "Create blob %X under %X", id, blob->id);
+               child = pgp_new_blob(card, blob, id, sc_file_new());
+               if (child) {
+@@ -1198,7 +1210,7 @@ pgp_get_data(sc_card_t *card, unsigned int tag, u8 *buf, size_t buf_len)
+       /* For Gnuk card, if there is no certificate, it returns error instead of empty data.
+        * So, for this case, we ignore error and consider success */
+       if (r == SC_ERROR_DATA_OBJECT_NOT_FOUND && card->type == SC_CARD_TYPE_OPENPGP_GNUK
+-        && (tag == DO_CERT || tag == 0x0101 || tag == 0x0102 || tag == 0x0103 || tag == 0x0104)) {
++        && (tag == DO_CERT || tag == DO_PRIV1 || tag == DO_PRIV2 || tag == DO_PRIV3 || tag == DO_PRIV4)) {
+               r = SC_SUCCESS;
+               apdu.resplen = 0;
+       }
+-- 
+2.1.3
+
index da13a4e116caf13a52f36d527df3f1c54ea80e36..e53b84328181c161924b9c3a64da1a8ab21bf02f 100644 (file)
@@ -16,7 +16,7 @@ PKG_SOURCE_URL:=http://downloads.xiph.org/releases/opus/
 PKG_MD5SUM:=20682e4d8d1ae9ec5af3cf43e808b8cb
 
 PKG_LICENSE:=BSD-2-Clause
-PKG_LICENSE_FILE:=COPYING
+PKG_LICENSE_FILES:=COPYING
 PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org>
 
 PKG_INSTALL:=1
index 82d016b7e1c2ff756a58b202a1e16204a106d1f0..d3b0765f85b7dd1dc1b3ab38940a86c3d8238bd8 100644 (file)
@@ -8,12 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=pciutils
-PKG_VERSION:=3.2.1
+PKG_VERSION:=3.3.0
 PKG_RELEASE:=1
+PKG_USE_MIPS16:=0
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@KERNEL/software/utils/pciutils
-PKG_MD5SUM:=425b1acad6854cc2bbb06ac8e48e76fc
+PKG_MD5SUM:=bf6ce5c50b273ffc2d27f659e929a37e
 PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
 
 PKG_LICENSE:=GPL-2.0
index 583eb9a60edc41c38ad4af23a1261061a9603216..610a7553083d792342313da70aca471bbd5495a9 100644 (file)
@@ -1,6 +1,6 @@
 --- a/Makefile
 +++ b/Makefile
-@@ -108,7 +108,7 @@ distclean: clean
+@@ -111,7 +111,7 @@ distclean: clean
  install: all
  # -c is ignored on Linux, but required on FreeBSD
        $(DIRINSTALL) -m 755 $(DESTDIR)$(SBINDIR) $(DESTDIR)$(IDSDIR) $(DESTDIR)$(MANDIR)/man8 $(DESTDIR)$(MANDIR)/man7
index 9c1a067550d257711942de56758b47316325e81a..c6d690681572880b2f06544f403e27996d182fb7 100644 (file)
@@ -1,6 +1,6 @@
 --- a/Makefile
 +++ b/Makefile
-@@ -85,7 +85,7 @@ lspci: LDLIBS+=$(LIBKMOD_LIBS)
+@@ -88,7 +88,7 @@ lspci: LDLIBS+=$(LIBKMOD_LIBS)
  ls-kernel.o: CFLAGS+=$(LIBKMOD_CFLAGS)
  
  update-pciids: update-pciids.sh
index dbd46aab4f4246abb6edf68e51afda67661c8efb..c38d1cfc57104351810778f1dafd989bf3bbfac8 100644 (file)
@@ -6,6 +6,6 @@
  echo_n "Looking for access methods..."
 -LIBRESOLV=-lresolv
 +LIBRESOLV=
+ LIBEXT=so
  
  case $sys in
-       linux*)
index df0cdeaecd08884f2c7da0c2c095a6e3e64f8fd9..f5387f0399a8657c978894564a70e440182d46cd 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=pcsc-lite
-PKG_VERSION:=1.8.11
+PKG_VERSION:=1.8.13
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=https://alioth.debian.org/frs/download.php/file/3991
-PKG_MD5SUM:=73502ca4ba6526727f9f49c63d805408
+PKG_SOURCE_URL:=https://alioth.debian.org/frs/download.php/file/4126
+PKG_MD5SUM:=4dcd22d20a6df8810fac5480cc320b6d
 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
 PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=COPYING
index ccabc39d7925588dc45931529c28307d3fa7ee2f..154336b7b0e2c26c60f94962847f0931e8eb2bc2 100644 (file)
@@ -10,6 +10,8 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=rpcd-mod-lxc
 PKG_RELEASE=20141012
 
+PKG_LICENSE:=ISC
+
 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
 
 include $(INCLUDE_DIR)/package.mk
diff --git a/utils/sispmctl/Makefile b/utils/sispmctl/Makefile
new file mode 100644 (file)
index 0000000..ad6c1e3
--- /dev/null
@@ -0,0 +1,56 @@
+#
+# Copyright (C) 2008-2014 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=sispmctl
+PKG_VERSION:=3.1+20120206
+PKG_RELEASE:=1
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_VERSION:=5ff4a05a5bcb6a64a9d6f77fed47014512f66b11
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE_URL:=git://git.code.sf.net/p/sispmctl/git
+PKG_MAINTAINER:=Richard Kunze <richard.kunze@web.de>
+PKG_LICENSE:=GPL-2.0+
+
+PKG_INSTALL:=1
+PKG_FIXUP:=autoreconf
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/sispmctl
+  SECTION:=utils
+  CATEGORY:=Utilities
+  TITLE:=Silver Shield PM Control for Linux
+  URL:=http://sispmctl.sourceforge.net/
+  DEPENDS:=+libusb-compat
+endef
+
+define Package/sispmctl/description
+ The sispmctl tool can control Gembird SIS-PM Silver Shield
+ programmable power outlet strips (also known under the name
+ Revolt Intelli-Plug) from the command line.
+ .
+ It can be used to switch on or off any of the programmable
+ power sockets of the SIS-PM via USB. It can also show the
+ current status of each power socket, and it can handle
+ multiple SIS-PM devices, too.
+endef
+
+TARGET_CFLAGS += -D_GNU_SOURCE
+CONFIGURE_ARGS += \
+       --enable-webless \
+       --disable-dependency-tracking
+
+define Package/sispmctl/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME) $(1)/usr/bin/
+endef
+
+$(eval $(call BuildPackage,sispmctl))
diff --git a/utils/sispmctl/patches/001-fix-includes.patch b/utils/sispmctl/patches/001-fix-includes.patch
new file mode 100644 (file)
index 0000000..218e22e
--- /dev/null
@@ -0,0 +1,25 @@
+--- a/src/sispm_ctl.c
++++ b/src/sispm_ctl.c
+@@ -33,6 +33,7 @@
+ #include <stdlib.h>
+ #include <unistd.h>
+ #include <time.h>
++#include <sys/types.h>
+ #include <usb.h>
+ #include <assert.h>
+ #include "sispm_ctl.h"
+--- a/src/main.c
++++ b/src/main.c
+@@ -34,11 +34,11 @@
+ #define __USE_XOPEN
+ #include <time.h>
+ #include <signal.h>
+-#include <usb.h>
+ #include <assert.h>
+ #include <getopt.h>
+ #include <sys/types.h>
+ #include <sys/socket.h>
++#include <usb.h>
+ #include <fcntl.h>
index ad4c2ede03f4f86d19b26678abbe581359fe3c2a..eab8cb9a3ee5a5104b0b5c7167bd8801175125f1 100644 (file)
@@ -17,7 +17,7 @@ PKG_MD5SUM:=a806c6b10b186b7d06a7eab12c3bc880
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
 PKG_MAINTAINER:=Christian Pointner <equinox@spreadspace.org>
 PKG_LICENSE:=GPL-2.0+
-PKG_LICENSE_FILE:=gpl-2.0.txt
+PKG_LICENSE_FILES:=gpl-2.0.txt
 include $(INCLUDE_DIR)/package.mk
 
 define Package/stm32flash
index c77eb8af311c451e2c2fb0b0863ab2f83b87616e..a50f1820024482240a8376c2cf3bb6de43e2d98a 100644 (file)
@@ -14,7 +14,7 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=ftp://ftp.astron.com/pub/tcsh/
 PKG_MD5SUM:=6eed09dbd4223ab5b6955378450d228a
 PKG_LICENSE:=BSD-4-Clause-UC
-PKG_LICENSE_FILE:=Copyright
+PKG_LICENSE_FILES:=Copyright
 
 PKG_MAINTAINER:=Nuno Goncalves <nunojpg@gmail.com>
 
index ad0e720ec6eef9d05967d1b45877a06961096f4f..733d074bacd0d4476fe09046d425f5e549bae6b1 100644 (file)
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=tracertools
-PKG_VERSION:=20141022
+PKG_VERSION:=20141027
 PKG_RELEASE=$(PKG_SOURCE_VERSION)
 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
 
@@ -16,7 +16,7 @@ PKG_LICENSE:=GPL-3.0
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://gitorious.org/tracertools/tracertools.git
-PKG_SOURCE_VERSION:=9c3c2e8b81fb8745752ee195b028a50b88dc711b
+PKG_SOURCE_VERSION:=9ba70d1fe4f3c0f24d565d98c79fee71711823f0
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
 
index 68464f8ced975b0329710290feae7d547195cb23..5b365cdd992997714436e1545aae065695033bce 100644 (file)
@@ -20,7 +20,7 @@ PKG_SOURCE_VERSION:=$(PKG_REV)
 
 PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
 PKG_LICENSE:=GPL-3.0+
-PKG_LICENSE_FILE:=COPYING
+PKG_LICENSE_FILES:=COPYING
 
 include $(INCLUDE_DIR)/package.mk
 
index f22f84faec29097f3bca503d02d8d8a586515933..82c567d5b1bdec9e2e7ea39744b541394f742d12 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=unrar
-PKG_VERSION:=5.2.1
+PKG_VERSION:=5.2.2
 PKG_RELEASE:=1
 
 PKG_SOURCE:=unrarsrc-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.rarlab.com/rar
-PKG_MD5SUM:=451d75ce182abccfa60b47f605aaf736
+PKG_MD5SUM:=69ef5af8442cbb7dfdebe298bfb9c61a
 PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
 
 PKG_LICENSE:=UnRAR
index a90d6d33f1509a30b8af115ab7345cca7fbbea08..905f9a96b320a0dd46218e0c4beaf63a33a5ee10 100644 (file)
@@ -14,7 +14,7 @@ PKG_SOURCE_PROTO:=git
 
 PKG_MAINTAINER:=Lukasz Baj <l.baj@radytek.com>
 PKG_LICENSE:=GPL-2.0
-PKG_LICENSE_FILE:=COPYING.GPLv2
+PKG_LICENSE_FILES:=COPYING.GPLv2
 
 PKG_SOURCE_URL:=https://github.com/libimobiledevice/usbmuxd.git
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
index 72c7f271acd42464c480fbce82f919e8e7cee16e..512057c2a5dd5d2d1764a496c6224ce7a0d25078 100644 (file)
@@ -17,7 +17,7 @@ PKG_MD5SUM:=fe77d801ba69e0fb9b4914a04b9ff506
 PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
 
 PKG_LICENSE:=GPL-3.0+
-PKG_LICENSE_FILE:=COPYING
+PKG_LICENSE_FILES:=COPYING
 
 PKG_INSTALL:=1
 
diff --git a/utils/zoneinfo/Makefile b/utils/zoneinfo/Makefile
new file mode 100644 (file)
index 0000000..482ab16
--- /dev/null
@@ -0,0 +1,242 @@
+#
+# Copyright (C) 2007-2014 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+# Author: Michael Geddes
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=zoneinfo
+PKG_VERSION:=2014j
+PKG_VERSION_CODE:=2014j
+PKG_RELEASE:=2
+
+#As i couldn't find real license used "Puplic Domain"
+#as referense to http://www.iana.org/time-zones/repository/tz-link.html
+PKG_LICENSE:=Public Domain
+
+PKG_SOURCE:=tzdata$(PKG_VERSION).tar.gz
+PKG_SOURCE_CODE:=tzcode$(PKG_VERSION_CODE).tar.gz
+PKG_SOURCE_URL:=http://www.iana.org/time-zones/repository/releases
+PKG_MD5SUM:=2d7ea9c309f0d4e162e426e568290ca3
+
+include $(INCLUDE_DIR)/package.mk
+
+define Download/tzcode
+   FILE=$(PKG_SOURCE_CODE)
+   URL=$(PKG_SOURCE_URL)
+   MD5SUM=970119e9765bc5a9320368851c91ecb6
+endef
+
+$(eval $(call Download,tzcode))
+
+define Package/zoneinfo/Default
+  SUBMENU:=zoneinfo
+  TITLE:=Zone Information
+  SECTION:=utils
+  CATEGORY:=Utilities
+  MAINTAINER=Vladimir Ulrich <admin@evl.su>
+endef
+
+define Package/zoneinfo-core
+$(call Package/zoneinfo/Default)
+  TITLE:=Zone Information (core)
+endef
+
+define Package/zoneinfo-simple
+$(call Package/zoneinfo/Default)
+  TITLE:=Zone Information (simple)
+endef
+
+define Package/zoneinfo-africa
+$(call Package/zoneinfo/Default)
+  TITLE:=Zone Information (Africa)
+endef
+
+define Package/zoneinfo-northamerica
+$(call Package/zoneinfo/Default)
+  TITLE:=Zone Information (NorthAmerica)
+endef
+
+define Package/zoneinfo-southamerica
+$(call Package/zoneinfo/Default)
+  TITLE:=Zone Information (SouthAmerica)
+endef
+
+define Package/zoneinfo-poles
+$(call Package/zoneinfo/Default)
+  TITLE:=Zone Information (Arctic, Antarctic)
+endef
+
+define Package/zoneinfo-asia
+$(call Package/zoneinfo/Default)
+  TITLE:=Zone Information (Asia)
+endef
+
+define Package/zoneinfo-atlantic
+$(call Package/zoneinfo/Default)
+  TITLE:=Zone Information (Atlantic)
+endef
+
+define Package/zoneinfo-australia-nz
+$(call Package/zoneinfo/Default)
+  TITLE:=Zone Information (Australia-NZ)
+endef
+
+define Package/zoneinfo-pacific
+$(call Package/zoneinfo/Default)
+  TITLE:=Zone Information (Pacific)
+endef
+
+define Package/zoneinfo-europe
+$(call Package/zoneinfo/Default)
+  TITLE:=Zone Information (Europe)
+endef
+
+define Package/zoneinfo-india
+$(call Package/zoneinfo/Default)
+  TITLE:=Zone Information (India)
+endef
+
+define Build/Prepare
+       (cd $(PKG_BUILD_DIR) && tar -xzf $(DL_DIR)/$(PKG_SOURCE_CODE) && tar -xzf $(DL_DIR)/$(PKG_SOURCE))
+endef
+
+define Build/Compile
+       CFLAGS="$(HOST_CFLAGS)" \
+       $(MAKE) -C $(PKG_BUILD_DIR) -f Makefile \
+               $(HOST_CONFIGURE_OPTS) \
+               CC="$(HOSTCC)" \
+               LD="\$$$$(CC)" \
+               CPPFLAGS="$(HOST_CPPFLAGS)" \
+               LDFLAGS="$(HOST_LDFLAGS)" \
+               TOPDIR="$(PKG_INSTALL_DIR)" \
+               TZDIR="$(PKG_INSTALL_DIR)/zoneinfo" \
+               install
+endef
+
+define Package/zoneinfo-core/install
+       $(INSTALL_DIR) $(1)/usr/share/zoneinfo
+       for i in \
+               CET CST6CDT EET EST EST5EDT GB-Eire Eire \
+               GB    GMT   GMT+0 GMT-0 GMT0  Greenwich  \
+               HST   MET   MST   MST7MDT                \
+               PRC   PST8PDT ROC ROK     UCT   UTC      \
+               Universal W-SU WET Zulu Etc/* zone.tab ; do \
+         $(CP) $(PKG_INSTALL_DIR)/zoneinfo/$$$$i \
+             $(1)/usr/share/zoneinfo ; \
+       done
+endef
+
+define Package/zoneinfo-simple/install
+       $(INSTALL_DIR) $(1)/usr/share/zoneinfo
+       for i in Pacific/Honolulu     \
+               America/Anchorage   America/Los_Angeles America/Denver   \
+               America/Chicago     America/New_York    America/Caracas  \
+               America/Sao_Paulo   Europe/London       Europe/Paris     \
+               Africa/Cairo        Europe/Moscow       Asia/Dubai       \
+               Asia/Karachi        Asia/Dhaka          Asia/Bankok      \
+               Asia/Hong_Kong      Asia/Tokyo          Australia/Darwin \
+               Australia/Adelaide  Australia/Brisbane  Australia/Sydney \
+               Australia/Perth     Pacific/Noumea ; do \
+         $(CP) $(PKG_INSTALL_DIR)/zoneinfo/$$$$i \
+             $(1)/usr/share/zoneinfo ; \
+       done
+endef
+
+define Package/zoneinfo-africa/install
+       $(INSTALL_DIR) $(1)/usr/share/zoneinfo/Africa
+       $(CP) $(PKG_INSTALL_DIR)/zoneinfo/Africa/* \
+             $(1)/usr/share/zoneinfo/Africa
+endef
+
+define Package/zoneinfo-northamerica/install
+       $(INSTALL_DIR) $(1)/usr/share/zoneinfo
+       for i in US America Canada Mexico Cuba Jamaica Navajo ; do \
+         $(CP) $(PKG_INSTALL_DIR)/zoneinfo/$$$$i \
+             $(1)/usr/share/zoneinfo ; \
+       done
+       rm  -rf $(1)/usr/share/zoneinfo/America/Argentina
+endef
+
+define Package/zoneinfo-southamerica/install
+       $(INSTALL_DIR) $(1)/usr/share/zoneinfo
+       for i in Brazil Chile ; do \
+         $(CP) $(PKG_INSTALL_DIR)/zoneinfo/$$$$i \
+             $(1)/usr/share/zoneinfo ; \
+       done
+       $(INSTALL_DIR) $(1)/usr/share/zoneinfo/America/Argentina
+       $(CP) $(PKG_INSTALL_DIR)/zoneinfo/America/Argentina/* \
+             $(1)/usr/share/zoneinfo/America/Argentina
+endef
+
+define Package/zoneinfo-poles/install
+       $(INSTALL_DIR) $(1)/usr/share/zoneinfo
+       for i in Antarctica Arctic ; do \
+         $(CP) $(PKG_INSTALL_DIR)/zoneinfo/$$$$i \
+             $(1)/usr/share/zoneinfo ; \
+       done
+endef
+
+define Package/zoneinfo-asia/install
+       $(INSTALL_DIR) $(1)/usr/share/zoneinfo
+       for i in Asia Japan Singapore Hongkong ; do \
+         $(CP) $(PKG_INSTALL_DIR)/zoneinfo/$$$$i \
+             $(1)/usr/share/zoneinfo ; \
+       done
+endef
+
+define Package/zoneinfo-atlantic/install
+       $(INSTALL_DIR) $(1)/usr/share/zoneinfo
+       for i in Atlantic Iceland ; do \
+         $(CP) $(PKG_INSTALL_DIR)/zoneinfo/$$$$i \
+             $(1)/usr/share/zoneinfo ; \
+       done
+endef
+
+define Package/zoneinfo-australia-nz/install
+       $(INSTALL_DIR) $(1)/usr/share/zoneinfo
+       for i in NZ NZ-CHAT Australia ; do \
+         $(CP) $(PKG_INSTALL_DIR)/zoneinfo/$$$$i \
+             $(1)/usr/share/zoneinfo ; \
+       done
+endef
+
+define Package/zoneinfo-pacific/install
+       $(INSTALL_DIR) $(1)/usr/share/zoneinfo
+       for i in Pacific Kwajalein ; do \
+         $(CP) $(PKG_INSTALL_DIR)/zoneinfo/$$$$i \
+             $(1)/usr/share/zoneinfo ; \
+       done
+endef
+
+define Package/zoneinfo-europe/install
+       $(INSTALL_DIR) $(1)/usr/share/zoneinfo
+       for i in Europe Portugal Poland ; do \
+         $(CP) $(PKG_INSTALL_DIR)/zoneinfo/$$$$i \
+             $(1)/usr/share/zoneinfo ; \
+       done
+endef
+
+define Package/zoneinfo-india/install
+       $(INSTALL_DIR) $(1)/usr/share/zoneinfo
+       for i in Indian ; do \
+         $(CP) $(PKG_INSTALL_DIR)/zoneinfo/$$$$i \
+             $(1)/usr/share/zoneinfo ; \
+       done
+endef
+
+$(eval $(call BuildPackage,zoneinfo-simple))
+$(eval $(call BuildPackage,zoneinfo-core))
+$(eval $(call BuildPackage,zoneinfo-africa))
+$(eval $(call BuildPackage,zoneinfo-northamerica))
+$(eval $(call BuildPackage,zoneinfo-southamerica))
+$(eval $(call BuildPackage,zoneinfo-poles))
+$(eval $(call BuildPackage,zoneinfo-asia))
+$(eval $(call BuildPackage,zoneinfo-atlantic))
+$(eval $(call BuildPackage,zoneinfo-australia-nz))
+$(eval $(call BuildPackage,zoneinfo-pacific))
+$(eval $(call BuildPackage,zoneinfo-europe))
+$(eval $(call BuildPackage,zoneinfo-india))