Merge pull request #2241 from sumpfralle/sshfs-source-change
authorZoltan Herpai <wigyori@uid0.hu>
Sun, 10 Apr 2016 10:22:08 +0000 (12:22 +0200)
committerZoltan Herpai <wigyori@uid0.hu>
Sun, 10 Apr 2016 10:22:08 +0000 (12:22 +0200)
FUSE moved from sourceforge to github

413 files changed:
admin/debootstrap/Makefile
admin/htop/Makefile
admin/monit/Makefile
admin/sudo/Makefile
admin/sudo/patches/010-cross-compile-fixes.patch
admin/zabbix/Makefile
admin/zabbix/files/mac80211
admin/zabbix/files/network
admin/zabbix/files/wifi
admin/zabbix/files/zabbix_agentd.init
admin/zabbix/patches/002-fix-res_send-on-uclibc.patch
admin/zabbix/patches/002-uclibc_loadavg.patch
admin/zabbix/patches/003-change-user-and-foreground.patch [new file with mode: 0644]
admin/zabbix/patches/010-change-agentd-config.patch
admin/zabbix/patches/015-daemon-foreground.patch [deleted file]
admin/zabbix/patches/100-musl-compat.patch
devel/automake/Makefile
devel/libtool-bin/Makefile [new file with mode: 0644]
devel/pkg-config/Makefile
kernel/exfat-nofuse/Makefile
lang/lua-mosquitto/Makefile
lang/lualanes/Makefile
lang/luarocks/Makefile
lang/node-arduino-firmata/Makefile
lang/node-cylon/Makefile
lang/node-hid/Makefile
lang/node-serialport/Makefile
lang/node/Makefile
lang/perl-cgi/Makefile
lang/perl-html-parser/Makefile
lang/perl-test-harness/Makefile
lang/perl-uri/Makefile
lang/perl-xml-parser/Makefile
lang/perl/Makefile
lang/perl/files/README.config
lang/perl/files/perlconfig.pl
lang/perl/patches/020-host-libc-dir-moved-debian+derivatives.patch
lang/perl/patches/110-always_use_miniperl.patch
lang/perl/patches/700-tie_fetch_count_t-handle_missing_crypt.patch
lang/perl/patches/710-threads_join-skip_ps_on_busybox.patch
lang/perl/patches/900-CVE-2015-8607.patch [new file with mode: 0644]
lang/perl/perlmod.mk
lang/php5/Makefile
lang/php5/pecl.mk
lang/python-attrs/Makefile [new file with mode: 0644]
lang/python-cffi/Makefile
lang/python-cryptography/Makefile
lang/python-gmpy/Makefile [new file with mode: 0644]
lang/python-gmpy2/Makefile [new file with mode: 0644]
lang/python-idna/Makefile
lang/python-ipaddress/Makefile
lang/python-parsley/Makefile [new file with mode: 0644]
lang/python-parsley/patches/001-omit-tests.patch [new file with mode: 0644]
lang/python-pip/Makefile
lang/python-ply/Makefile
lang/python-pyasn1-modules/Makefile [new file with mode: 0644]
lang/python-pycparser/Makefile
lang/python-pyopenssl/Makefile
lang/python-pyopenssl/patches/001-omit-tests.patch [deleted file]
lang/python-pyptlib/Makefile [new file with mode: 0644]
lang/python-service-identity/Makefile [new file with mode: 0644]
lang/python-setuptools/Makefile
lang/python-setuptools/patches/0001-remove-windows-support.patch
lang/python-txsocksx/Makefile [new file with mode: 0644]
lang/python-txsocksx/patches/001-omit-tests.patch [new file with mode: 0644]
lang/python-txsocksx/patches/002-do-not-use-vcversioner.patch [new file with mode: 0644]
lang/python/Makefile
lang/python/files/python-host.mk
lang/python/files/python-package.mk
lang/python3-pip/Makefile
lang/python3-setuptools/Makefile
lang/python3-setuptools/patches/0001-remove-windows-support.patch
lang/python3/Makefile
lang/python3/files/python3-package.mk
lang/ruby/Makefile
lang/ruby/patches/001-acinclude.m4_rename_aclocal.m4.patch [new file with mode: 0644]
lang/ruby/patches/001-rdoc-remove_gems_dep.patch [deleted file]
lang/ruby/ruby_find_pkgsdeps
lang/ruby/ruby_missingfiles
lang/tcl/Makefile
lang/twisted/Makefile [new file with mode: 0644]
lang/twisted/patches/001-fix-zsh-completion.patch [new file with mode: 0644]
lang/twisted/patches/002-omit-tests.patch [new file with mode: 0644]
libs/alsa-lib/Makefile
libs/alsa-lib/patches/002-remove_cross_compile_guess.patch [deleted file]
libs/alsa-lib/patches/005-fix_include_file_redirect_warnings.patch
libs/apr-util/Makefile
libs/apr/Makefile
libs/avahi/patches/011-fix-poll-h-warnings-on-musl.patch [new file with mode: 0644]
libs/boost/Makefile
libs/c-ares/Makefile
libs/file/Makefile
libs/flac/Makefile
libs/flac/patches/020-fix-musl-sigemptyset-x86.patch [new file with mode: 0644]
libs/gdbm/Makefile
libs/giflib/Makefile
libs/giflib/patches/100-no-docs.patch [new file with mode: 0644]
libs/glib2/Makefile
libs/glib2/patches/100-fix-gio-linking.patch [deleted file]
libs/glpk/Makefile
libs/gnutls/Config.in
libs/gnutls/Makefile
libs/libesmtp/Makefile
libs/libev/Makefile
libs/libevdev/Makefile
libs/libfastjson/Makefile [new file with mode: 0644]
libs/libffi/patches/100-fix_mips_softfloat.patch [new file with mode: 0644]
libs/libgee/Makefile
libs/libimobiledevice/Makefile
libs/libinput/Makefile
libs/libinput/patches/002-static_assert.patch [new file with mode: 0644]
libs/libmraa/Makefile
libs/libplist/Makefile
libs/libpng/Makefile
libs/libsearpc/Makefile
libs/libsoxr/Makefile
libs/libuecc/Makefile
libs/libupm/Makefile
libs/libusbmuxd/Makefile
libs/libv4l/Makefile
libs/libv4l/patches/001-no-shm_open-fix.patch [deleted file]
libs/libv4l/patches/005-test_for_posix_ioctl.patch [deleted file]
libs/libv4l/patches/030-dont-call-getsubopt.patch [new file with mode: 0644]
libs/libv4l/patches/030-musl_compatibility.patch [deleted file]
libs/libwebsockets/Makefile
libs/libxerces-c/Makefile
libs/libxml2/Makefile
libs/libzdb/Makefile
libs/libzdb/patches/020-filterh-use-host-built-version.patch
libs/pcre/Makefile
libs/pcre/patches/001-pcre-8.38-upstream_fixes-1.patch [new file with mode: 0644]
libs/pcre/patches/100-pcre-cve-2015-3210.patch [deleted file]
libs/poco/Makefile [new file with mode: 0644]
libs/poco/patches/100-configure.patch [new file with mode: 0644]
libs/poco/patches/200-strerror.patch [new file with mode: 0644]
libs/protobuf-c/Makefile
libs/protobuf/Makefile
libs/sqlite3/Makefile
libs/tiff/Makefile
libs/tiff/patches/001-autoconf-compat.patch
libs/tiff/patches/002-CVE-2015-8665_and_CVE-2015-8683.patch [new file with mode: 0644]
libs/tiff/patches/003-fix_potential_out-of-bound_writes_in_decode_functions.patch [new file with mode: 0644]
libs/tiff/patches/004-fix_potential_out-of-bound_write_in_NeXTDecode.patch [new file with mode: 0644]
libs/tiff/patches/010-CVE-2012-4564.patch [deleted file]
libs/tiff/patches/011-CVE-2013-1960.patch [deleted file]
libs/tiff/patches/012-CVE-2013-1961.patch [deleted file]
libs/tiff/patches/013-CVE-2013-4231.patch [deleted file]
libs/tiff/patches/014-CVE-2013-4232.patch [deleted file]
libs/tiff/patches/015-CVE-2013-4244.patch [deleted file]
libs/tiff/patches/016-CVE-2013-4243.patch [deleted file]
libs/tiff/patches/017-CVE-2014-9330.patch [deleted file]
libs/unixodbc/Makefile
mail/postfix/Makefile
mail/postfix/files/main.cf.default
mail/postfix/files/postfix.init
mail/postfix/patches/100-fsstat.patch
mail/postfix/patches/200-manpages.patch
mail/postfix/patches/400-cdb.patch
mail/postfix/patches/500-crosscompile.patch
mail/postfix/patches/600-nopostconf.patch
mail/postfix/patches/800-fmt.patch
multimedia/ffmpeg/Makefile
multimedia/grilo/Makefile
multimedia/minidlna/Makefile
net/adblock/Makefile
net/adblock/files/README.md
net/adblock/files/adblock-helper.sh
net/adblock/files/adblock-update.sh
net/adblock/files/adblock.blacklist
net/adblock/files/adblock.conf
net/adblock/files/adblock.hotplug [new file with mode: 0644]
net/adblock/files/adblock.init [new file with mode: 0755]
net/adblock/files/adblock.whitelist
net/adblock/files/samples/adblock.conf.sample [deleted file]
net/adblock/files/samples/dhcp.config.sample [deleted file]
net/adblock/files/samples/dnsmasq.conf.sample [deleted file]
net/adblock/files/samples/firewall.user.sample [deleted file]
net/adblock/files/samples/rc.local.sample [deleted file]
net/adblock/files/samples/root.crontab.sample [deleted file]
net/adblock/files/samples/uhttpd.config.sample [deleted file]
net/adblock/files/www/adblock/adblock.html [deleted file]
net/adblock/files/www/adblock/index.html
net/apache/Makefile
net/arp-scan/Makefile [new file with mode: 0644]
net/arp-scan/patches/001-cross_compile.patch [new file with mode: 0644]
net/bind/Config.in [new file with mode: 0644]
net/bind/Makefile
net/bind/files/bind/db.root
net/bind/files/named.init
net/chrony/Makefile
net/cifs-utils/Makefile [new file with mode: 0644]
net/cifs-utils/patches/001-fix-musl-build.patch [new file with mode: 0644]
net/coova-chilli/files/chilli.config
net/ddns-scripts/Makefile
net/ddns-scripts/files/ddns.config
net/ddns-scripts/files/dynamic_dns_functions.sh
net/ddns-scripts/files/dynamic_dns_lucihelper.sh
net/ddns-scripts/files/dynamic_dns_updater.sh
net/ddns-scripts/files/services
net/ddns-scripts/files/services_ipv6
net/ddns-scripts/files/tld_names.dat
net/ddns-scripts/files/update_CloudFlare.sh [deleted file]
net/ddns-scripts/files/update_No-IP.com.sh [deleted file]
net/ddns-scripts/files/update_cloudflare_com.sh [new file with mode: 0755]
net/ddns-scripts/files/update_no-ip_com.sh [new file with mode: 0755]
net/dnscrypt-proxy/Makefile
net/ethtool/Makefile
net/fastd/Config.in
net/fastd/Makefile
net/fastd/patches/100-musl-compat.patch [deleted file]
net/git/Makefile
net/git/patches/100-convert_builtin.patch
net/git/patches/300-configure_for_crosscompiling
net/git/patches/400-imapsend_without_curl.patch
net/gnunet/Makefile
net/haproxy/Makefile
net/haproxy/patches/0001-BUG-BUILD-replace-haproxy-systemd-wrapper-with-EXTRA.patch [deleted file]
net/haproxy/patches/0002-BUG-MINOR-acl-don-t-use-record-layer-in-req_ssl_ver.patch [deleted file]
net/haproxy/patches/0003-BUG-http-do-not-abort-keep-alive-connections-on-serv.patch [deleted file]
net/haproxy/patches/0004-BUG-MEDIUM-http-switch-the-request-channel-to-no-del.patch [deleted file]
net/haproxy/patches/0005-MINOR-config-extend-the-default-max-hostname-length-.patch [deleted file]
net/haproxy/patches/0006-BUG-MEDIUM-http-don-t-enable-auto-close-on-the-respo.patch [deleted file]
net/haproxy/patches/0007-BUG-MEDIUM-stream-fix-half-closed-timeout-handling.patch [deleted file]
net/haproxy/patches/0008-BUG-MEDIUM-cli-changing-compression-rate-limiting-mu.patch [deleted file]
net/haproxy/patches/0009-BUILD-freebsd-double-declaration.patch [deleted file]
net/haproxy/patches/0010-BUG-MEDIUM-sample-urlp-can-t-match-an-empty-value.patch [deleted file]
net/iptraf-ng/Makefile [new file with mode: 0644]
net/isc-dhcp/Makefile [new file with mode: 0644]
net/isc-dhcp/files/dhclient-script [new file with mode: 0644]
net/isc-dhcp/files/dhclient.init [new file with mode: 0644]
net/isc-dhcp/files/dhclient6.conf [new file with mode: 0644]
net/isc-dhcp/files/dhclient6.init [new file with mode: 0644]
net/isc-dhcp/files/dhcpd.conf [new file with mode: 0644]
net/isc-dhcp/files/dhcpd.init [new file with mode: 0644]
net/isc-dhcp/files/dhcpd6.conf [new file with mode: 0644]
net/isc-dhcp/files/dhcpd6.init [new file with mode: 0644]
net/isc-dhcp/files/dhcrelay4.init [new file with mode: 0644]
net/isc-dhcp/files/dhcrelay6.init [new file with mode: 0644]
net/isc-dhcp/files/etc/config/dhcrelay [new file with mode: 0644]
net/isc-dhcp/patches/000-compile.patch [new file with mode: 0644]
net/isc-dhcp/patches/100-relay-rfc3527-link-selection.patch [new file with mode: 0644]
net/isc-dhcp/patches/510-bind-CC.patch [new file with mode: 0644]
net/knot/Makefile
net/knot/files/knotd.init
net/knot/files/runtests.sh
net/knot/patches/01_strptime_susv3.patch [deleted file]
net/knot/patches/01_zscanner_tests.patch [new file with mode: 0644]
net/knot/patches/02_knot.conf.patch
net/knot/patches/03_libtap_files.patch [new file with mode: 0644]
net/knot/patches/03_zscanner_tests.patch [deleted file]
net/knxd/Makefile
net/knxd/files/knxd.init
net/krb5/Makefile
net/krb5/patches/001-fix-uninitialized-warning-errors.patch
net/linknx/Makefile
net/linknx/patches/010-musl-compat [deleted file]
net/linknx/patches/012-fix-linknx.cpp [deleted file]
net/mdnsresponder/Makefile
net/mdnsresponder/patches/114-fix_posix_build.patch [new file with mode: 0644]
net/mosquitto/Config.in
net/mosquitto/Makefile
net/mosquitto/files/etc/config/mosquitto [new file with mode: 0644]
net/mosquitto/files/etc/init.d/mosquitto [new file with mode: 0755]
net/mosquitto/files/mosquitto.init [deleted file]
net/mosquitto/files/mosquitto.uci.convert [deleted file]
net/net-snmp/files/snmpd.init
net/nfs-kernel-server/Makefile
net/nginx/Config.in
net/nginx/Makefile
net/ngircd/Makefile
net/nsd/Makefile
net/ntpd/Makefile
net/nut/Makefile
net/ocserv/Makefile
net/ocserv/patches/0001-don-t-attempt-to-open-per_user_dir-if-it-is-NULL.patch [deleted file]
net/ola/Makefile
net/ola/patches/003-Make-DNS-SD-functionality-optional-at-build-time.patch [new file with mode: 0644]
net/openssh/Makefile
net/openvswitch/Makefile
net/openvswitch/patches/0010-lib-ovs-thread-Ensure-that-thread-stacks-are-always-.patch [new file with mode: 0644]
net/openvswitch/patches/0011-kernel-4-4-support.patch [new file with mode: 0644]
net/pptpd/Makefile
net/pptpd/files/options.pptpd
net/pptpd/files/pptpd.conf
net/pptpd/files/pptpd.init
net/privoxy/Config.in [new file with mode: 0644]
net/privoxy/Makefile
net/privoxy/files/privoxy.hotplug
net/privoxy/files/privoxy.init
net/privoxy/files/privoxy.upgrade [new file with mode: 0644]
net/prosody/Makefile
net/prosody/files/prosody.init
net/prosody/patches/010-fix-randomseed.patch [deleted file]
net/radicale/Makefile
net/radicale/files/radicale.config
net/radicale/files/radicale.hotplug
net/radicale/files/radicale.init
net/radicale/files/radicale.upgrade [new file with mode: 0644]
net/radsecproxy/Makefile
net/rsyslog/Makefile
net/shadowsocks-client/Makefile
net/shadowsocks-client/patches/100-fortify-source-compat.patch [deleted file]
net/snort/Config.in
net/snort/Makefile
net/sqm-scripts/Makefile
net/squid/Makefile
net/strongswan/Makefile
net/strongswan/patches/001-fix-EINTR-crash.patch [deleted file]
net/strongswan/patches/305-minimal_dh_plugin.patch
net/tgt/Makefile
net/transmission/Makefile
net/transmission/patches/010_libtransmission_fallocate64_eglibc.patch [deleted file]
net/transmission/patches/020-use-internal-miniupnp.patch
net/transmission/patches/030-fix-musl-build.patch
net/u2pnpd/Makefile
net/unbound/Makefile
net/usbip/Makefile
net/wavemon/Makefile
net/wavemon/patches/musl-fix.patch [new file with mode: 0644]
net/znc/Makefile
sound/mpd/Makefile
sound/mpd/patches/100-musl_gcc5_fixes.patch
sound/pulseaudio/Makefile
sound/pulseaudio/patches/002-xlocale.patch [deleted file]
sound/shairplay/Makefile
sound/shairplay/patches/001-key_file_dir.patch
sound/shairport-sync/Makefile
sound/squeezelite/Makefile
sound/squeezelite/files/squeezelite.conf
sound/squeezelite/files/squeezelite.init
sound/squeezelite/patches/010-select_broadcast_interface.patch [new file with mode: 0644]
sound/squeezelite/patches/010-wait_for_nonzero_mac.patch [deleted file]
utils/acpid/Makefile
utils/alsa-utils/Makefile
utils/bandwidthd/Makefile
utils/bluez/Makefile
utils/bluez/patches/001-bcm43xx-Add-bcm43xx-3wire-variant.patch [new file with mode: 0644]
utils/bluez/patches/002-bcm43xx-The-UART-speed-must-be-reset-after-the-firmw.patch [new file with mode: 0644]
utils/bluez/patches/003-Increase-firmware-load-timeout-to-30s.patch [new file with mode: 0644]
utils/bluez/patches/004-Move-the-43xx-firmware-into-lib-firmware.patch [new file with mode: 0644]
utils/bluez/patches/201-readline.patch
utils/bonnie++/Makefile [new file with mode: 0644]
utils/bonnie++/patches/001-cross_compile_fix.patch [new file with mode: 0644]
utils/bonnie++/patches/002-add-verbose-error-messages.patch [new file with mode: 0644]
utils/ccid/Makefile
utils/cmdpad/Makefile
utils/collectd/Makefile
utils/collectd/files/collectd.init
utils/collectd/patches/100-rrdtool-add-rrasingle-option.patch
utils/collectd/patches/140-fix-fqdnlookup.patch
utils/collectd/patches/200-fix-git-describe-error.patch
utils/collectd/patches/300-delay-first-read-cycle.patch
utils/collectd/patches/500-upstream-parallel-build-fix.patch [deleted file]
utils/collectd/patches/600-fix-libmodbus-detection.patch [new file with mode: 0644]
utils/collectd/patches/900-add-iwinfo-plugin.patch
utils/collectd/patches/920-fix-ping-droprate.patch
utils/crelay/Makefile
utils/cryptodev-linux/Makefile
utils/cryptodev-linux/patches/001-no-get-unused-fd.patch [deleted file]
utils/cryptsetup/Makefile
utils/dbus/Makefile
utils/dump1090/Makefile
utils/dump1090/files/dump1090.config
utils/dump1090/files/dump1090.init
utils/dvtm/Makefile [new file with mode: 0644]
utils/eudev/Config.in [new file with mode: 0644]
utils/eudev/Makefile [new file with mode: 0644]
utils/eudev/patches/0001-mtd_probe-uses-stdint_h.patch [new file with mode: 0644]
utils/flashrom/Makefile
utils/flashrom/flashrom.mk
utils/flashrom/patches/0002-fix-io-h-include.patch [new file with mode: 0644]
utils/flashrom/patches/0002-fix-musl-compatibility.patch [deleted file]
utils/gammu/Makefile
utils/gammu/files/gammu.init
utils/gnupg/Makefile
utils/gpsd/Makefile
utils/grep/Makefile
utils/hamlib/Makefile
utils/hamlib/patches/100-override-autoconf-detection.patch [deleted file]
utils/lvm2/Makefile
utils/lvm2/patches/002-const-stdio.patch
utils/lxc/Makefile
utils/lxc/files/lxc-auto.config [new file with mode: 0644]
utils/lxc/files/lxc-auto.init [new file with mode: 0755]
utils/lxc/patches/015-getline.patch
utils/lxc/patches/035-fix-undefined-lfd.patch
utils/mc/Makefile
utils/mc/patches/010-subshell.patch
utils/mmc-utils/Makefile
utils/nano/Makefile
utils/openocd/Makefile
utils/opensc/patches/0024-OpenPGP-Fix-crash-after-accessing-inexistent-file.patch
utils/pciutils/Makefile
utils/pcsc-lite/Makefile
utils/pps-tools/Makefile
utils/qemu/Makefile [new file with mode: 0644]
utils/qemu/files/qemu-ga.init [new file with mode: 0755]
utils/qemu/files/virtio-ports.hotplug [new file with mode: 0755]
utils/rtl-sdr/Makefile
utils/rtl-sdr/files/rtl_tcp.config [new file with mode: 0644]
utils/rtl-sdr/files/rtl_tcp.init [new file with mode: 0755]
utils/smstools3/files/smstools3.init
utils/squashfs-tools/Config.in [new file with mode: 0644]
utils/squashfs-tools/Makefile [new file with mode: 0644]
utils/squashfs-tools/patches/0001-squashfs-tools-fix-fnmatch.h-compatibility-with-musl.patch [new file with mode: 0644]
utils/squashfs-tools/patches/0002-pseudo.c-add-explicit-stat.h-include.patch [new file with mode: 0644]
utils/squashfs-tools/patches/0003-mksquashfs.c-get-inline-functions-work-with-C99.patch [new file with mode: 0644]
utils/tracertools/Makefile
utils/unrar/Makefile
utils/usbmuxd/Makefile
utils/watchcat/Makefile
utils/zip/Makefile
utils/zoneinfo/Makefile

index 8d38005527ea74b47be62272070974293c37135f..d76bf65f9e18feb3c01fba5380d00b3d7b939136 100644 (file)
@@ -9,13 +9,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=debootstrap
-PKG_VERSION:=1.0.75
+PKG_VERSION:=1.0.79
 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:=5b568d66390d76fba87b839984254730
+PKG_MD5SUM:=48dae2747db960f5484fe5355678c249
 PKG_LICENSE:=Unique
 PKG_LICENSE_FILES:=debian/copyright
 
index 7cb47067a1d772281d4f634ae55e7806e29823bd..ac9c7d048f5c1a81b63c116b6e92b43c086aed47 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=htop
-PKG_VERSION:=1.0.3
+PKG_VERSION:=2.0.1
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://hisham.hm/htop/releases/$(PKG_VERSION)/
-PKG_MD5SUM:=e768b9b55c033d9c1dffda72db3a6ac7
+PKG_MD5SUM:=f75fe92b4defaa80d99109830f34b5e2
 
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=COPYING
@@ -39,15 +39,12 @@ define Package/htop/description
 endef
 
 CONFIGURE_ARGS += \
-       --disable-native-affinity \
        --disable-unicode \
-       --enable-hwloc
+       --disable-hwloc
 
 CONFIGURE_VARS += \
        ac_cv_file__proc_stat=yes \
-       ac_cv_file__proc_meminfo=yes \
-       ac_cv_func_malloc_0_nonnull=yes \
-       ac_cv_func_realloc_0_nonnull=yes
+       ac_cv_file__proc_meminfo=yes
 
 define Package/htop/install
        $(INSTALL_DIR) $(1)/usr/bin
index b172de4aa78672bc2131a068783c62f89b608f44..4f90c1264e24b5f7d3daeed50ae51d041525494b 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=monit
-PKG_VERSION:=5.14
+PKG_VERSION:=5.17.1
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://mmonit.com/monit/dist
-PKG_MD5SUM:=1b3ae1eb08a0914402a8764e5689c1c5
+PKG_MD5SUM:=6918ed7411a244c9e158f5e54c86be78
 
 PKG_LICENSE:=AGPL-3.0
 PKG_LICENSE_FILES:=COPYING
index 3f2d6f81aeee0466dc2570bcf3f430345156ab7b..43e92977d7552e2ab08023618a22049c92864443 100644 (file)
@@ -64,8 +64,8 @@ define Host/Compile
 endef
 
 define Host/Install
-       $(INSTALL_DIR) $(STAGING_DIR_HOST)/bin
-       $(CP) $(HOST_BUILD_DIR)/lib/util/mksig{list,name} $(STAGING_DIR_HOST)/bin/
+       $(INSTALL_DIR) $(STAGING_DIR)/host/bin
+       $(CP) $(HOST_BUILD_DIR)/lib/util/mksig{list,name} $(STAGING_DIR)/host/bin/
 endef
 
 $(eval $(call HostBuild))
index 4e80d4d42f7c0619ef20e2bc37372fda9698849d..b9c1e79956e94e53a8a88c1e4647b27b7e779aff 100644 (file)
@@ -1,25 +1,16 @@
 diff -rupN sudo-1.8.11p2.orig/lib/util/Makefile.in sudo-1.8.11p2/lib/util/Makefile.in
 --- sudo-1.8.11p2.orig/lib/util/Makefile.in    2014-10-07 22:26:20.000000000 +0200
 +++ sudo-1.8.11p2/lib/util/Makefile.in 2014-12-09 21:44:35.610041162 +0100
-@@ -17,6 +17,8 @@
- # @configure_input@
- #
-+include $(TOPDIR)/rules.mk
-+
- #### Start of system configuration section. ####
- srcdir = @srcdir@
-@@ -142,10 +144,10 @@ libsudo_util.la: $(LTOBJS) @LT_LDDEP@
+@@ -142,10 +142,10 @@ libsudo_util.la: $(LTOBJS) @LT_LDDEP@
        esac
  
  siglist.c: mksiglist
 -      ./mksiglist > $@
-+      $(STAGING_DIR_HOST)/bin/mksiglist > $@
++      mksiglist > $@
  
  signame.c: mksigname
 -      ./mksigname > $@
-+      $(STAGING_DIR_HOST)/bin/mksigname > $@
++      mksigname > $@
  
  mksiglist: $(srcdir)/mksiglist.c $(srcdir)/mksiglist.h $(incdir)/sudo_compat.h $(top_builddir)/config.h
        $(CC) $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/mksiglist.c -o $@
index 424779ef987c6f552510fb41923ea6dde4675a9b..87e51c3be6b6722a81fb3670a74b548f18e6b5dc 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=zabbix
-PKG_VERSION:=2.4.6
-PKG_RELEASE:=2
+PKG_VERSION:=3.0.1
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/zabbix
-PKG_MD5SUM:=06ad8d5808a0eddf2b9f0a256b6a5fde
+PKG_MD5SUM:=890d9eec69304ad552959fabe0a5d122
 
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=COPYING
@@ -33,11 +33,7 @@ define Package/zabbix/Default
   SUBMENU:=zabbix
   MAINTAINER:=Etienne CHAMPETIER <champetier.etienne@gmail.com>
   USERID:=zabbix=53:zabbix=53
-endef
-
-define Package/zabbix-agent
-  $(call Package/zabbix/Default)
-  TITLE+= agent
+  DEPENDS += $(ICONV_DEPENDS)
 endef
 
 define Package/zabbix-agentd
@@ -48,19 +44,19 @@ endef
 define Package/zabbix-extra-mac80211
   $(call Package/zabbix/Default)
   TITLE+= discovery/userparameters for mac80211
-  DEPENDS += +zabbix-agentd @PACKAGE_MAC80211_DEBUGFS @KERNEL_DEBUG_FS
+  DEPENDS = +zabbix-agentd @PACKAGE_MAC80211_DEBUGFS @KERNEL_DEBUG_FS
 endef
 
 define Package/zabbix-extra-network
   $(call Package/zabbix/Default)
   TITLE+= discovery/userparameters for network
-  DEPENDS += +zabbix-agentd +libuci-lua +lua
+  DEPENDS = +zabbix-agentd +libuci-lua +lua
 endef
 
 define Package/zabbix-extra-wifi
   $(call Package/zabbix/Default)
   TITLE+= discovery/userparameters for wifi
-  DEPENDS += +zabbix-agentd +libiwinfo-lua +libuci-lua +lua
+  DEPENDS = +zabbix-agentd +libiwinfo-lua +libuci-lua +lua
 endef
 
 define Package/zabbix-sender
@@ -158,9 +154,6 @@ define Package/zabbix/install/zabbix.conf.d
                $(1)/etc/zabbix_agentd.conf.d/$(2)
 endef
 
-define Package/zabbix-agent/conffiles
-/etc/zabbix_agent.conf
-endef
 define Package/zabbix-agentd/conffiles
 /etc/zabbix_agentd.conf
 endef
@@ -192,11 +185,6 @@ define Build/Compile
        $(call Build/Compile/zabbix-extra-mac80211)
 endef
 
-define Package/zabbix-agent/install
-       $(call Package/zabbix/install/sbin,$(1),agent)
-       $(call Package/zabbix/install/etc,$(1),agent)
-endef
-
 define Package/zabbix-agentd/install
        $(INSTALL_DIR) $(1)/etc/zabbix_agentd.conf.d
        $(call Package/zabbix/install/sbin,$(1),agentd)
@@ -237,7 +225,6 @@ define Package/zabbix-proxy/install
        $(call Package/zabbix/install/etc,$(1),proxy)
 endef
 
-$(eval $(call BuildPackage,zabbix-agent))
 $(eval $(call BuildPackage,zabbix-agentd))
 $(eval $(call BuildPackage,zabbix-extra-mac80211))
 $(eval $(call BuildPackage,zabbix-extra-network))
index 93d8351898dfa42b59288270f71211b19829fc14..afa50aeba5e9d2ecd594fa1ba023b250a0e62107 100644 (file)
@@ -2,10 +2,10 @@
 
 # If you want to know the exact meaning of an UserParameter, you can search in the ieee80211 standard:
 # http://standards.ieee.org/getieee802/download/802.11-2012.pdf
-# exemple: for mac80211.ACKFailureCount search for dot11ACKFailureCount (page 2145)
+# example: for mac80211.ACKFailureCount search for dot11ACKFailureCount (page 2145)
 
 # mac80211 phy discovery (like 'phy0')
-# exemple: {"data":[{"{#PHY}":"phy0"}]}
+# example: {"data":[{"{#PHY}":"phy0"}]}
 #
 UserParameter=mac80211.phydiscovery,zabbix_helper_mac80211 discovery
 
index 51cb1cbc254fabf252eb259eb82cfda00088996f..b68e2a50549ee0dab5fcada47732ddb528aa44e9 100644 (file)
@@ -1,7 +1,7 @@
 #see http://wiki.openwrt.org/doc/howto/zabbix for ready to use templates
 
 # network interface discovery
-# exemple: {"data":[{"{#IF}":"lo", "{#NET}":"loopback"},{"{#IF}":"br-lan", "{#NET}":"lan"},{"{#IF}":"eth0.1", "{#NET}":"wan"}]}
+# example: {"data":[{"{#IF}":"lo", "{#NET}":"loopback"},{"{#IF}":"br-lan", "{#NET}":"lan"},{"{#IF}":"eth0.1", "{#NET}":"wan"}]}
 #
 UserParameter=netowrt.discovery,lua -l uci -e 'x = uci.cursor(nil, "/var/state");list = "{\"data\":[";x:foreach("network", "interface", function(s) list=list.."{\"{#IF}\":\""..s.ifname.."\", \"{#NET}\":\""..s[".name"].."\"}," end); list=string.gsub(list,",$",""); print(list.."]}")'
 
index 6315ea995b2fa17e7bb6e401941c92e618902b1b..f03d9b41ebe06be2e9f14fa22a20b1fdb18673e0 100644 (file)
@@ -1,7 +1,7 @@
 #see http://wiki.openwrt.org/doc/howto/zabbix for ready to use templates
 
 # wifi interface discovery
-# exemple: {"data":[{"{#IF}":"wlan0", "{#MODE}":"ap", "{#SSID}":"Openwrt", "{#NET}":"lan", "{#DEV}":"radio0", "{#ENC}":"psk2+ccmp", "{#TYPE}":"mac80211", "{#HWMODE}":"11ng", "{#CHANNEL}":"11", "{#BSSID}":"xx:xx:xx:xx:xx:xx"}]}
+# example: {"data":[{"{#IF}":"wlan0", "{#MODE}":"ap", "{#SSID}":"Openwrt", "{#NET}":"lan", "{#DEV}":"radio0", "{#ENC}":"psk2+ccmp", "{#TYPE}":"mac80211", "{#HWMODE}":"11ng", "{#CHANNEL}":"11", "{#BSSID}":"xx:xx:xx:xx:xx:xx"}]}
 # ubus call only work as root so you need to run zabbix as root to use wifi.ifdiscovery
 UserParameter=wifi.ifdiscovery, lua -l ubus -l iwinfo -e 'u=ubus.connect();list="{\"data\":[";stat=u:call("network.wireless", "status", {});for dev, dev_table in pairs(stat) do for i, iface in pairs(dev_table["interfaces"]) do c=iface["config"];i=iface["ifname"];t=iwinfo.type(i);iw=iwinfo[t];e = iw.encryption(i);e = e and e.description or "None";n = table.concat(c["network"]," ");list=list.."{\"{#IF}\":\""..i.."\", \"{#MODE}\":\""..iw.mode(i).."\", \"{#SSID}\":\""..c["ssid"].."\", \"{#NET}\":\""..n.."\", \"{#DEV}\":\""..dev.."\", \"{#ENC}\":\""..e.."\", \"{#TYPE}\":\""..t.."\", \"{#HWMODE}\":\"".."?".."\", \"{#CHANNEL}\":\""..iw.channel(i).."\", \"{#BSSID}\":\""..iw.bssid(i).."\"},";end;end;list=string.gsub(list,",$","");print(list.."]}")'
 
index 86f1cedeadbec1e5566a666789bbbdadd79c5e3b..ea886346e7c821f8cd63032e2bc15876cde0eb88 100755 (executable)
@@ -16,6 +16,8 @@ start_service() {
        procd_open_instance
        procd_set_param command ${PROG} -c ${CONFIG} -f
        procd_set_param respawn
+       procd_set_param stdout 1
+       procd_set_param stderr 1
        procd_close_instance
 }
 
index cedad90048e65425d229f827aa8b859c4fc6169d..f4b5d33a12d9317958b85f1a19a092312f711b29 100644 (file)
@@ -1,6 +1,6 @@
 --- a/configure.ac
 +++ b/configure.ac
-@@ -152,6 +152,10 @@ if test "x$found_resolv" != "xyes"; then
+@@ -161,6 +161,10 @@ if test "x$found_resolv" != "xyes"; then
        AC_MSG_ERROR([Unable to do DNS lookups (libresolv check failed)])
  fi
  LIBS="${LIBS} ${RESOLV_LIBS}"
@@ -13,7 +13,7 @@
  dnl *                                                               *
 --- a/src/libs/zbxsysinfo/common/net.c
 +++ b/src/libs/zbxsysinfo/common/net.c
-@@ -450,6 +450,7 @@ static int dns_query(AGENT_REQUEST *requ
+@@ -471,6 +471,7 @@ static int dns_query(AGENT_REQUEST *requ
                return SYSINFO_RET_FAIL;
        }
  
@@ -21,7 +21,7 @@
        if (-1 == (res = res_mkquery(QUERY, zone, C_IN, type, NULL, 0, NULL, buf, sizeof(buf))))
        {
                SET_MSG_RESULT(result, zbx_dsprintf(NULL, "Cannot create DNS query: %s", zbx_strerror(errno)));
-@@ -480,6 +481,11 @@ static int        dns_query(AGENT_REQUEST *requ
+@@ -505,6 +506,11 @@ static int        dns_query(AGENT_REQUEST *requ
        _res.retry = retry;
  
        res = res_send(buf, res, answer.buffer, sizeof(answer.buffer));
@@ -31,5 +31,5 @@
 +      return SYSINFO_RET_FAIL;
 +#endif 
  
+       _res.options = saved_options;
        _res.retrans = saved_retrans;
-       _res.retry = saved_retry;
index 191f1a136f8e6638390df51f7ce397a789cd2b11..ce62d06c3315d7b7cb925dd40f0a9cc9e8ce86bd 100644 (file)
@@ -1,8 +1,8 @@
 --- a/src/libs/zbxsysinfo/linux/cpu.c
 +++ b/src/libs/zbxsysinfo/linux/cpu.c
-@@ -62,6 +62,45 @@ int SYSTEM_CPU_DISCOVERY(AGENT_REQUEST *
-       return SYSINFO_RET_OK;
- }
+@@ -22,6 +22,45 @@
+ #include "stats.h"
+ #include "log.h"
  
 +
 +/* uclibc and dietlibc do not have this junk -ReneR */
diff --git a/admin/zabbix/patches/003-change-user-and-foreground.patch b/admin/zabbix/patches/003-change-user-and-foreground.patch
new file mode 100644 (file)
index 0000000..6779e47
--- /dev/null
@@ -0,0 +1,17 @@
+--- a/src/libs/zbxnix/daemon.c
++++ b/src/libs/zbxnix/daemon.c
+@@ -300,11 +300,14 @@ int      daemon_start(int allow_root, const c
+       if (0 == allow_root && 0 == getuid())   /* running as root? */
+       {
++#if 0
++/* allow changing user and foreground */
+               if (0 != (flags & ZBX_TASK_FLAG_FOREGROUND))
+               {
+                       zbx_error("cannot run as root!");
+                       exit(EXIT_FAILURE);
+               }
++#endif
+               if (NULL == user)
+                       user = "zabbix";
index e4812f6ef97de80bdc6292509f44e5ca3fa28c84..8b16b28032c7ed68d0ad9603d732ce1f29e8fe81 100644 (file)
@@ -1,6 +1,6 @@
 --- a/conf/zabbix_agentd.conf
 +++ b/conf/zabbix_agentd.conf
-@@ -3,12 +3,8 @@
+@@ -3,12 +3,11 @@
  
  ############ GENERAL PARAMETERS #################
  
 -# PidFile=/tmp/zabbix_agentd.pid
 +# We do not need PidFile with procd
 +# PidFile=/var/run/zabbix_agentd.pid
++
++# use syslog
++LogType=system
  
- ### Option: LogFile
- #     Name of log file.
-@@ -18,8 +14,6 @@
+ ### Option: LogType
+ #     Specifies where log messages are written to:
+@@ -27,8 +26,6 @@
  # Default:
  # LogFile=
  
@@ -24,7 +27,7 @@
  ### Option: LogFileSize
  #     Maximum size of log file in MB.
  #     0 - disable automatic log rotation.
-@@ -104,6 +98,7 @@ Server=127.0.0.1
+@@ -114,6 +111,7 @@ Server=127.0.0.1
  # Range: 0-100
  # Default:
  # StartAgents=3
@@ -32,7 +35,7 @@
  
  ##### Active checks related
  
-@@ -119,8 +114,6 @@ Server=127.0.0.1
+@@ -129,8 +127,6 @@ Server=127.0.0.1
  # Default:
  # ServerActive=
  
@@ -41,7 +44,7 @@
  ### Option: Hostname
  #     Unique, case sensitive hostname.
  #     Required for active checks and must match hostname as configured on the server.
-@@ -130,8 +123,6 @@ ServerActive=127.0.0.1
+@@ -140,8 +136,6 @@ ServerActive=127.0.0.1
  # Default:
  # Hostname=
  
@@ -50,7 +53,7 @@
  ### Option: HostnameItem
  #     Item used for generating Hostname if it is undefined. Ignored if Hostname is defined.
  #     Does not support UserParameters or aliases.
-@@ -249,8 +240,8 @@ Hostname=Zabbix server
+@@ -259,8 +253,8 @@ Hostname=Zabbix server
  # Include=
  
  # Include=/usr/local/etc/zabbix_agentd.userparams.conf
diff --git a/admin/zabbix/patches/015-daemon-foreground.patch b/admin/zabbix/patches/015-daemon-foreground.patch
deleted file mode 100644 (file)
index 364e703..0000000
+++ /dev/null
@@ -1,243 +0,0 @@
---- a/include/common.h
-+++ b/include/common.h
-@@ -1083,4 +1083,7 @@ int      parse_serveractive_element(char *str
- char  *zbx_dyn_escape_shell_single_quote(const char *text);
-+#define ZBX_RUN_BACKGROUND      0
-+#define ZBX_RUN_FOREGROUND      1
-+
- #endif
---- a/include/daemon.h
-+++ b/include/daemon.h
-@@ -28,7 +28,7 @@ extern char  *CONFIG_PID_FILE;
- #include "threads.h"
--int   daemon_start(int allow_root, const char *user);
-+int   daemon_start(int allow_root, const char *user, int run_foreground);
- void  daemon_stop();
- int   zbx_sigusr_send(int flags);
-@@ -36,6 +36,6 @@ int  zbx_sigusr_send(int flags);
- #define ZBX_IS_RUNNING()      1
- #define ZBX_DO_EXIT()
--#define START_MAIN_ZABBIX_ENTRY(a, u) daemon_start(a, u)
-+#define START_MAIN_ZABBIX_ENTRY(a, u, f)      daemon_start(a, u, f)
- #endif        /* ZABBIX_DAEMON_H */
---- a/src/libs/zbxnix/daemon.c
-+++ b/src/libs/zbxnix/daemon.c
-@@ -272,16 +272,17 @@ static void      set_daemon_signal_handlers()
-  *                                                                            *
-  * Purpose: init process as daemon                                            *
-  *                                                                            *
-- * Parameters: allow_root - allow root permission for application             *
-- *             user       - user on the system to which to drop the           *
-- *                          privileges                                        *
-+ * Parameters: allow_root     - allow root permission for application         *
-+ *             user           - user on the system to which to drop the       *
-+ *                              privileges                                    *
-+ *             run_foreground - should it close its controling tty            *
-  *                                                                            *
-  * Author: Alexei Vladishev                                                   *
-  *                                                                            *
-  * Comments: it doesn't allow running under 'root' if allow_root is zero      *
-  *                                                                            *
-  ******************************************************************************/
--int   daemon_start(int allow_root, const char *user)
-+int   daemon_start(int allow_root, const char *user, int run_foreground)
- {
-       pid_t           pid;
-       struct passwd   *pwd;
-@@ -336,15 +337,22 @@ int      daemon_start(int allow_root, const c
- #endif
-       }
--      if (0 != (pid = zbx_fork()))
--              exit(EXIT_SUCCESS);
-+      if ( ZBX_RUN_FOREGROUND != run_foreground)
-+              if (0 != (pid = zbx_fork()))
-+                      exit(EXIT_SUCCESS);
-       setsid();
-       signal(SIGHUP, SIG_IGN);
--      if (0 != (pid = zbx_fork()))
--              exit(EXIT_SUCCESS);
-+      if ( ZBX_RUN_FOREGROUND == run_foreground) {
-+              zabbix_log(LOG_LEVEL_INFORMATION, "Running in foreground...");
-+      } else {
-+              if (0 != (pid = zbx_fork()))
-+                      exit(EXIT_SUCCESS);
-+      }
-+
-+
-       if (-1 == chdir("/"))   /* this is to eliminate warning: ignoring return value of chdir */
-               assert(0);
---- a/src/zabbix_agent/zabbix_agentd.c
-+++ b/src/zabbix_agent/zabbix_agentd.c
-@@ -62,6 +62,8 @@ const char   *progname = NULL;
-       static char     DEFAULT_CONFIG_FILE[]   = SYSCONFDIR "/zabbix_agentd.conf";
- #endif
-+int CONFIG_FOREGROUND = ZBX_RUN_BACKGROUND;
-+
- /* application TITLE */
- const char    title_message[] = APPLICATION_NAME
- #if defined(_WIN64)
-@@ -93,6 +95,7 @@ const char   usage_message[] =
- const char    *help_message[] = {
-       "Options:",
-       "  -c --config <config-file>       Absolute path to the configuration file",
-+      "  -f --foreground                 Run in foreground don't fork",
-       "  -p --print                      Print known items and exit",
-       "  -t --test <item key>            Test specified item and exit",
-       "  -h --help                       Display help information",
-@@ -127,6 +130,7 @@ const char *help_message[] = {
- /* COMMAND LINE OPTIONS */
- static struct zbx_option      longopts[] =
- {
-+      {"foreground",          0,      NULL,   'f'},
-       {"config",              1,      NULL,   'c'},
-       {"help",                0,      NULL,   'h'},
-       {"version",             0,      NULL,   'V'},
-@@ -147,7 +151,7 @@ static struct zbx_option   longopts[] =
- };
- static char   shortopts[] =
--      "c:hVpt:"
-+      "c:hfVpt:"
- #ifndef _WINDOWS
-       "R:"
- #else
-@@ -241,6 +245,9 @@ static void        parse_commandline(int argc,
-       {
-               switch (ch)
-               {
-+                      case 'f':
-+                              CONFIG_FOREGROUND = ZBX_RUN_FOREGROUND;
-+                              break;
-                       case 'c':
-                               CONFIG_FILE = strdup(zbx_optarg);
-                               break;
-@@ -944,7 +951,7 @@ int        main(int argc, char **argv)
-                       break;
-       }
--      START_MAIN_ZABBIX_ENTRY(CONFIG_ALLOW_ROOT, CONFIG_USER);
-+      START_MAIN_ZABBIX_ENTRY(CONFIG_ALLOW_ROOT, CONFIG_USER, CONFIG_FOREGROUND);
-       exit(EXIT_SUCCESS);
- }
---- a/src/zabbix_proxy/proxy.c
-+++ b/src/zabbix_proxy/proxy.c
-@@ -60,6 +60,7 @@ const char   usage_message[] = "[-hV] [-c
- const char    *help_message[] = {
-       "Options:",
-+      "  -f --foreground                 Run in foreground don't fork",
-       "  -c --config <file>              Absolute path to the configuration file",
-       "  -R --runtime-control <option>   Perform administrative functions",
-       "",
-@@ -84,6 +85,7 @@ const char   *help_message[] = {
- /* long options */
- static struct zbx_option      longopts[] =
- {
-+      {"foreground",          0,      NULL,   'f'},
-       {"config",              1,      NULL,   'c'},
-       {"runtime-control",     1,      NULL,   'R'},
-       {"help",                0,      NULL,   'h'},
-@@ -92,7 +94,7 @@ static struct zbx_option     longopts[] =
- };
- /* short options */
--static char   shortopts[] = "c:n:hVR:";
-+static char   shortopts[] = "c:n:fhVR:";
- /* end of COMMAND LINE OPTIONS */
-@@ -202,6 +204,7 @@ char       *CONFIG_LOAD_MODULE_PATH        = NULL;
- char  **CONFIG_LOAD_MODULE            = NULL;
- char  *CONFIG_USER                    = NULL;
-+int   CONFIG_FOREGROUND               = ZBX_RUN_BACKGROUND;
- /* web monitoring */
- #ifdef HAVE_LIBCURL
-@@ -666,6 +669,9 @@ int        main(int argc, char **argv)
-       {
-               switch (ch)
-               {
-+                      case 'f':
-+                              CONFIG_FOREGROUND = ZBX_RUN_FOREGROUND;
-+                              break;
-                       case 'c':
-                               CONFIG_FILE = zbx_strdup(CONFIG_FILE, zbx_optarg);
-                               break;
-@@ -705,7 +711,7 @@ int        main(int argc, char **argv)
-       init_ipmi_handler();
- #endif
--      return daemon_start(CONFIG_ALLOW_ROOT, CONFIG_USER);
-+      return daemon_start(CONFIG_ALLOW_ROOT, CONFIG_USER, CONFIG_FOREGROUND);
- }
- int   MAIN_ZABBIX_ENTRY()
---- a/src/zabbix_server/server.c
-+++ b/src/zabbix_server/server.c
-@@ -64,6 +64,7 @@ const char   usage_message[] = "[-hV] [-c
- const char    *help_message[] = {
-       "Options:",
-+      "  -f --foreground                 Run in foreground don't fork",
-       "  -c --config <file>              Absolute path to the configuration file",
-       "  -R --runtime-control <option>   Perform administrative functions",
-       "",
-@@ -88,6 +89,7 @@ const char   *help_message[] = {
- /* long options */
- static struct zbx_option      longopts[] =
- {
-+      {"foreground",          0,      NULL,   'f'},
-       {"config",              1,      NULL,   'c'},
-       {"runtime-control",     1,      NULL,   'R'},
-       {"help",                0,      NULL,   'h'},
-@@ -96,7 +98,7 @@ static struct zbx_option     longopts[] =
- };
- /* short options */
--static char   shortopts[] = "c:n:hVR:";
-+static char   shortopts[] = "c:n:fhVR:";
- /* end of COMMAND LINE OPTIONS */
-@@ -197,6 +199,7 @@ char       *CONFIG_LOAD_MODULE_PATH        = NULL;
- char  **CONFIG_LOAD_MODULE            = NULL;
- char  *CONFIG_USER                    = NULL;
-+int   CONFIG_FOREGROUND               = ZBX_RUN_BACKGROUND;
- /* web monitoring */
- #ifdef HAVE_LIBCURL
-@@ -631,6 +634,9 @@ int        main(int argc, char **argv)
-       {
-               switch (ch)
-               {
-+                      case 'f':
-+                              CONFIG_FOREGROUND = ZBX_RUN_FOREGROUND;
-+                              break;
-                       case 'c':
-                               CONFIG_FILE = zbx_strdup(CONFIG_FILE, zbx_optarg);
-                               break;
-@@ -670,7 +676,7 @@ int        main(int argc, char **argv)
-       init_ipmi_handler();
- #endif
--      return daemon_start(CONFIG_ALLOW_ROOT, CONFIG_USER);
-+      return daemon_start(CONFIG_ALLOW_ROOT, CONFIG_USER, CONFIG_FOREGROUND);
- }
- int   MAIN_ZABBIX_ENTRY()
index 2b6fee6ce0b46b858187e695ccab440139c27615..61aeb9e01bb250c846ffd7c320d656a07417b8fd 100644 (file)
@@ -10,7 +10,7 @@
    sys/vmmeter.h strings.h vm/vm_param.h \
    sys/time.h kstat.h sys/syscall.h sys/sysmacros.h \
 @@ -63,6 +63,11 @@ AC_CHECK_HEADERS(stdio.h stdlib.h string
-   sys/timeb.h Winber.h lber.h ws2tcpip.h inttypes.h sys/file.h grp.h \
+   Winber.h lber.h ws2tcpip.h inttypes.h sys/file.h grp.h \
    execinfo.h libperfstat.h sys/systemcfg.h sys/mnttab.h mntent.h sys/times.h \
    dlfcn.h sys/utsname.h)
 +AC_CHECK_HEADERS(sys/sysinfo.h, [], [], [
index 562ea8d51cf6817986f419c146641c497fb16977..e8c9bef9fcab01e09a5ea03b6415bf71bed6ba17 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2015 OpenWrt.org
+# Copyright (C) 2015-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=automake
 PKG_VERSION:=1.15
-PKG_RELEASE:=1
+PKG_RELEASE:=3
 
 PKG_SOURCE_URL:=@GNU/automake
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
@@ -37,11 +37,15 @@ endef
 define Package/automake/install
        $(INSTALL_DIR) $(1)/usr/bin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/automake-$(PKG_VERSION) \
-         $(1)/usr/bin/automake
+         $(1)/usr/bin/automake-$(PKG_VERSION)
+       $(LN) automake-$(PKG_VERSION) $(1)/usr/bin/automake
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/aclocal-$(PKG_VERSION) \
-         $(1)/usr/bin/aclocal
-       $(SED) 's|$(STAGING_DIR_HOST)|/usr|g' $(1)/usr/bin/automake
-       $(SED) 's|$(STAGING_DIR_HOST)|/usr|g' $(1)/usr/bin/aclocal
+         $(1)/usr/bin/aclocal-$(PKG_VERSION)
+       $(LN) aclocal-$(PKG_VERSION) $(1)/usr/bin/aclocal
+       $(SED) 's|$(STAGING_DIR_HOST)|/usr|g' \
+         $(1)/usr/bin/automake-$(PKG_VERSION)
+       $(SED) 's|$(STAGING_DIR_HOST)|/usr|g' \
+         $(1)/usr/bin/aclocal-$(PKG_VERSION)
        $(INSTALL_DIR) $(1)/usr/share/automake-$(PKG_VERSION)
 
        for dir in \
diff --git a/devel/libtool-bin/Makefile b/devel/libtool-bin/Makefile
new file mode 100644 (file)
index 0000000..e7922c3
--- /dev/null
@@ -0,0 +1,51 @@
+#
+# Copyright (C) 2016 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libtool
+PKG_VERSION:=2.4.6
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=@GNU/libtool
+PKG_MD5SUM:=addf44b646ddb4e3919805aa88fa7c5e
+PKG_MAINTAINER:=Heinrich Schuchardt <xypron.glpk@gmx.de>
+PKG_LICENSE:=GPL-2.0+
+PKG_BUILD_DIR = $(BUILD_DIR)/libtool-bin/$(PKG_NAME)-$(PKG_VERSION)
+
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libtool-bin
+  SECTION:=devel
+  CATEGORY:=Development
+  TITLE:=GNU Libtool - libtoolize
+  URL:=https://www.gnu.org/software/libtool/
+endef
+
+define Package/libtool-bin/description
+ GNU libtool is a generic library support script.
+ Libtool hides the complexity of using shared libraries behind a consistent,
+ portable interface. 
+ This package contains the libtoolize executable.
+endef
+
+define Package/libtool-bin/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/libtoolize $(1)/usr/bin/
+       $(SED) 's|$(STAGING_DIR_HOST)||g' $(1)/usr/bin/libtoolize
+       $(INSTALL_DIR) $(1)/usr/share/aclocal/
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/aclocal/*.m4 \
+         $(1)/usr/share/aclocal/
+       $(INSTALL_DIR) $(1)/usr/share/libtool/build-aux/
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/libtool/build-aux/* \
+         $(1)/usr/share/libtool/build-aux/
+endef
+
+$(eval $(call BuildPackage,libtool-bin))
index beb0a94c0ffb4d0966a9401cb5e335d52972081e..7fa007622739f4fd9a1839be43030470103b5339 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2015 OpenWrt.org
+# Copyright (C) 2015-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,25 +8,26 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=pkg-config
-PKG_VERSION:=0.29
+PKG_VERSION:=0.29.1
 PKG_RELEASE:=1
 
 PKG_SOURCE_URL:=http://pkgconfig.freedesktop.org/releases/
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_MD5SUM:=77f27dce7ef88d0634d0d6f90e03a77f
+PKG_MD5SUM:=f739a28cae4e0ca291f82d1d41ef107d
 PKG_MAINTAINER:=Heinrich Schuchardt <xypron.glpk@gmx.de>
 PKG_LICENSE:=GPL-2+
 
 PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/nls.mk
 
 define Package/pkg-config
   SECTION:=devel
   CATEGORY:=Development
   TITLE:=pkg-config
   URL:=http://www.freedesktop.org/wiki/Software/pkg-config/
-  DEPENDS:=+glib2
+  DEPENDS:=+glib2 $(INTL_DEPENDS)
 endef
 
 define Package/pkg-config/description
index bae51532de7fdb01c7fb81b9d71dfe7c0a82e1a6..15773755176de0ef964bbafab6d40b0c054060d0 100644 (file)
@@ -9,14 +9,14 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=exfat-nofuse
-PKG_VERSION:=git-20150828
+PKG_VERSION:=git-20151121
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://github.com/dorimanx/exfat-nofuse.git
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=0ead00404360b944652335331a2e1a50948f4cb9
+PKG_SOURCE_VERSION:=42635ed1c682a0d85c12f73d08489d1a3a7a94e3
 
 PKG_MAINTAINER:=Bruno Randolf <br1@einfach.org>
 PKG_LICENSE:=GPL-2.0
index 680df4b5e73e241fb8c56860a7c29224b34a9d33..2220b2e07fc3b5e4b4f138ab9410dac45d554009 100644 (file)
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=lua-mosquitto
-PKG_VERSION:=0.1
+PKG_VERSION:=0.2
 PKG_RELEASE:=1
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
index 06bc1e286404ab2ecab6b3b74709ceae28446418..616129066f82df1be07e5945bea37739110c4e1a 100644 (file)
@@ -42,8 +42,8 @@ endef
 define Build/Compile
        $(MAKE) -C $(PKG_BUILD_DIR) all \
         CC="$(TARGET_CC)" \
-        LUA="$(STAGING_DIR_HOST)/bin/lua" \
-        LUAC="$(STAGING_DIR_HOST)/bin/luac" \
+        LUA="$(STAGING_DIR)/host/bin/lua" \
+        LUAC="$(STAGING_DIR)/host/bin/luac" \
         OPT_FLAGS="$(TARGET_CFLAGS) --std=c99 -Dpthread_yield=sched_yield"
 endef
 
index e0a0f57114ca87ab4240aa756160fa6a82b8d307..7519f8f7c806cbd7abf53bf3422b0f4b260d84c8 100644 (file)
@@ -41,7 +41,7 @@ endef
 CONFIGURE_ARGS = \
     --prefix=$(CONFIGURE_PREFIX) \
     --sysconfdir=/etc \
-    --with-lua=$(STAGING_DIR_HOST)
+    --with-lua=$(STAGING_DIR)/host
 
 define Build/Compile
        $(call Build/Compile/Default,build)
index aced0701287475e245a185f969b71232cf3ee6e0..a21b23348767a7fc48ed30ffc3d0871fbe817df6 100644 (file)
@@ -18,7 +18,7 @@ PKG_SOURCE_VERSION:=16e76007edf218d72df590adbd711ac6b7432845
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION)
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
 
-PKG_BUILD_DEPENDS:=node
+PKG_BUILD_DEPENDS:=node/host
 PKG_NODE_VERSION:=0.12.7
 
 PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>
@@ -52,8 +52,9 @@ define Build/Compile
        $(MAKE_FLAGS) \
        npm_config_arch=$(CONFIG_ARCH) \
        npm_config_nodedir=$(BUILD_DIR)/node-v$(PKG_NODE_VERSION)/ \
+       npm_config_cache=$(BUILD_DIR)/node-v$(PKG_NODE_VERSION)/npm-cache \
        PREFIX="$(PKG_INSTALL_DIR)/usr/" \
-       $(STAGING_DIR_HOST)/bin/npm install -g $(PKG_BUILD_DIR)
+       $(STAGING_DIR)/host/bin/npm install -g $(PKG_BUILD_DIR)
 endef
 
 define Package/node-arduino-firmata/install
index 753ae2319b103e392297c8cf63c915cc2fcd3453..25341d3bb66b92f25ca118f15954381a3175ea94 100644 (file)
@@ -18,7 +18,7 @@ PKG_SOURCE_VERSION:=0c37da77e48b3e2cc3a8d566822a17689de91b40
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION)
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
 
-PKG_BUILD_DEPENDS:=node
+PKG_BUILD_DEPENDS:=node/host
 PKG_NODE_VERSION:=0.12.7
 
 PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>
@@ -67,8 +67,9 @@ define Build/Compile
        $(MAKE_FLAGS) \
        npm_config_arch=$(CONFIG_ARCH) \
        npm_config_nodedir=$(BUILD_DIR)/node-v$(PKG_NODE_VERSION)/ \
+       npm_config_cache=$(BUILD_DIR)/node-v$(PKG_NODE_VERSION)/npm-cache \
        PREFIX="$(PKG_INSTALL_DIR)/usr/" \
-       $(STAGING_DIR_HOST)/bin/npm install -g $(PKG_BUILD_DIR)
+       $(STAGING_DIR)/host/bin/npm install -g $(PKG_BUILD_DIR)
 endef
 
 define Package/node-cylon/install
index 911e2a4cc695004d4ee4ee3d3078fc7d1876bee2..3a929fb14f7db0f753298a674be97621537eda53 100644 (file)
@@ -18,7 +18,7 @@ PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
 PKG_SOURCE_VERSION:=c56c8aa5d113c6f2574d1f7e64d41745702965bb
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
 
-PKG_BUILD_DEPENDS:=node
+PKG_BUILD_DEPENDS:=node/host
 PKG_NODE_VERSION:=0.12.7
 
 PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>
@@ -49,8 +49,9 @@ define Build/Compile
        $(MAKE_FLAGS) \
        npm_config_arch=$(CONFIG_ARCH) \
        npm_config_nodedir=$(BUILD_DIR)/node-v$(PKG_NODE_VERSION)/ \
+       npm_config_cache=$(BUILD_DIR)/node-v$(PKG_NODE_VERSION)/npm-cache \
        PREFIX="$(PKG_INSTALL_DIR)/usr/" \
-       $(STAGING_DIR_HOST)/bin/npm install -g $(PKG_BUILD_DIR)
+       $(STAGING_DIR)/host/bin/npm install -g $(PKG_BUILD_DIR)
 endef
 
 define Package/node-hid/install
index ad4b7aff604543fdfd5a443064552c5fa8fbc472..90a9fd7aa9ad123fa8a8b31f3351a36124f3cf8e 100644 (file)
@@ -16,7 +16,7 @@ PKG_SOURCE:=$(PKG_NPM_NAME)-$(PKG_VERSION).tgz
 PKG_SOURCE_URL:=http://registry.npmjs.org/$(PKG_NPM_NAME)/-/
 PKG_MD5SUM:=1eb21082e0aa676b8350182a60230808
 
-PKG_BUILD_DEPENDS:=node
+PKG_BUILD_DEPENDS:=node/host
 PKG_NODE_VERSION:=0.12.7
 
 PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>
@@ -49,8 +49,9 @@ define Build/Compile
        $(MAKE_FLAGS) \
        npm_config_arch=$(CONFIG_ARCH) \
        npm_config_nodedir=$(BUILD_DIR)/node-v$(PKG_NODE_VERSION)/ \
+       npm_config_cache=$(BUILD_DIR)/node-v$(PKG_NODE_VERSION)/npm-cache \
        PREFIX="$(PKG_INSTALL_DIR)/usr/" \
-       $(STAGING_DIR_HOST)/bin/npm install -g $(PKG_BUILD_DIR)
+       $(STAGING_DIR)/host/bin/npm install -g $(PKG_BUILD_DIR)
 endef
 
 define Package/node-serialport/install
index 14741049972a8bd8a15bcf879d3c1294dd754603..9df887614e9b2442ab9d8de87059859fcdd4e03c 100644 (file)
@@ -57,7 +57,7 @@ HOST_CONFIGURE_VARS:=
 HOST_CONFIGURE_ARGS:= \
        --dest-os=linux \
        --without-snapshot \
-       --prefix=$(STAGING_DIR_HOST)/
+       --prefix=$(STAGING_DIR)/host/
 
 HOST_CONFIGURE_CMD:=python ./configure
 
index 9d2eac3309a8887df3d0fa559aa8af477f387f55..5fb416a0d4ddd07a22d8d82923eb09c172c13891 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2015 OpenWrt.org
+# Copyright (C) 2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=perl-cgi
-PKG_VERSION:=4.25
+PKG_VERSION:=4.28
 PKG_RELEASE:=1
 
 PKG_SOURCE_URL:=http://www.cpan.org/authors/id/L/LE/LEEJO
 PKG_SOURCE:=CGI-$(PKG_VERSION).tar.gz
-PKG_MD5SUM:=e047bec455105cdfa413b9c776f95bb9
+PKG_MD5SUM:=28efb391377f6e98c19c23292d5fcc8c
 
 PKG_LICENSE:=GPL Artistic-2.0
 PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
index c248a615c1ce23aef50660abb93920710f082a3d..e9772171b8b82b08b0e34ee8c8361b2a8d373ce7 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2014 OpenWrt.org
+# Copyright (C) 2014 - 2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=perl-html-parser
-PKG_VERSION:=3.71
-PKG_RELEASE:=4
+PKG_VERSION:=3.72
+PKG_RELEASE:=1
 
 PKG_SOURCE_URL:=http://www.cpan.org/authors/id/G/GA/GAAS/
 PKG_SOURCE:=HTML-Parser-$(PKG_VERSION).tar.gz
-PKG_MD5SUM:=9128a45893097dfa3bf03301b19c5efe
+PKG_MD5SUM:=eb7505e5f626913350df9dd4a03d54a8
 
 PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
 PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
index fd2b4f63482d94480669db2067bc97212581a0ce..0c14e85927f6424d7b8bd623cc960866407722c6 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2014, 2015 OpenWrt.org
+# Copyright (C) 2014 - 2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=perl-test-harness
-PKG_VERSION:=3.35
-PKG_RELEASE:=3
+PKG_VERSION:=3.36
+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:=2a6010bca2ad78e094d629eea6afd7d9
+PKG_MD5SUM:=4c8d9c77e8e06ca96c7383c05c8f3616
 
 PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
 PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
index e3f566efb67e65da7951b3ce8ca8c7b0e8ec4317..18667fcdb3387adf1be9cf3e9c034811310ddf70 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2015 OpenWrt.org
+# Copyright (C) 2015 - 2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=perl-uri
-PKG_VERSION:=1.69
+PKG_VERSION:=1.71
 PKG_RELEASE:=1
 
 PKG_SOURCE_URL:=http://www.cpan.org/authors/id/E/ET/ETHER/
 PKG_SOURCE:=URI-$(PKG_VERSION).tar.gz
-PKG_MD5SUM:=3c56aee0300bce5a440ccbd558277ea0
+PKG_MD5SUM:=247c3da29a794f72730e01aa5a715daf
 
 PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
 PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
index 08acb239f2d4bcf7504b9c69f7acf536cc3c81e8..e5d3b2c88bbaa4b02669a75dd49d03ee6e049728 100644 (file)
@@ -25,8 +25,8 @@ HOST_BUILD_DEPENDS:=perl/host expat/host
 
 EXPAT_LIBPATH:=$(STAGING_DIR)/usr/lib
 EXPAT_INCPATH=$(STAGING_DIR)/usr/include
-HOST_EXPAT_LIBPATH:=$(STAGING_DIR_HOST)/lib
-HOST_EXPAT_INCPATH=$(STAGING_DIR_HOST)/include
+HOST_EXPAT_LIBPATH:=$(STAGING_DIR)/host/lib
+HOST_EXPAT_INCPATH=$(STAGING_DIR)/host/include
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/host-build.mk
index 39a018ad936ccb788eaca9abee26a8d5ffde6793..5e6da214114674e92ee40830826a9e2a0258c69c 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=perl
 PKG_VERSION:=5.22.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_URL:=ftp://ftp.cpan.org/pub/CPAN/src/5.0 \
                http://www.cpan.org/src/5.0 \
@@ -35,7 +35,7 @@ PKG_BUILD_PARALLEL:=1
 HOST_BUILD_PARALLEL:=1
 
 # Variables used during configuration/build
-HOST_PERL_PREFIX:=$(STAGING_DIR_HOST)/usr
+HOST_PERL_PREFIX:=$(STAGING_DIR)/host/usr
 
 # Filter -g3, it will break Compress-Raw-Zlib
 TARGET_CFLAGS_PERL:=$(patsubst -g3,-g,$(TARGET_CFLAGS))
index 572cf923d162b7a8dd3518eb32d2592c0b007dac..16bf05831f38e9947b3027a7aff19827504daf12 100644 (file)
@@ -26,14 +26,14 @@ owrt:sig_count      64/128              Number of signals the target
                                         provides(NSIG - 1).
 owrt:sigs           *                   Symbolic names of the first 32 signals
                                         this architecture provides, in numeric
-                                        order. Seperated by whitespaces.
+                                        order. Separated by whitespaces.
 owrt:sig_name_extra *                   Symbolic names of any additional signals
                                         this architecture provides after
-                                        owrt:sig_count. Seperated by
+                                        owrt:sig_count. Separated by
                                         whitespaces.
 owrt:sig_num_extra  *                   Numeric values associated with the
                                         signal names provided in
-                                        owrt:sig_name_extra. Seperated by
+                                        owrt:sig_name_extra. Separated by
                                         whitespaces.
 
 Passed via command line
index 17378cd446033088c902f2084cd1e6a5f459f3b2..f169980d3b8a1ca776806bddb90d5277e624c25e 100644 (file)
@@ -62,7 +62,7 @@ flexibility.
 
 A symbol name has to consist entirely of alphanumeric characters as well as
 the underscore(_) character. In addition, symbol names may be prefixed with an
-all-lowercase string, seperated by a colon(:):
+all-lowercase string, separated by a colon(:):
 
   my:name=value
 
@@ -76,7 +76,7 @@ to the final configuration file.
 
 =head3 Symbol definitions
 
-A symbol definition is in the form of a simple name/value pair, seperated by
+A symbol definition is in the form of a simple name/value pair, separated by
 an equals sign(=):
 
   name=value
index 761f8b9273469f4cae0ddfb77445b7a8f8838076..956466d99ae701e0b55e90521ba07a55ccb10f19 100644 (file)
@@ -1,6 +1,6 @@
 --- a/hints/linux.sh
 +++ b/hints/linux.sh
-@@ -204,6 +204,24 @@ case "$libc" in
+@@ -221,6 +221,24 @@ case "$libc" in
      ;;
  esac
  
index f8f8a65deb5c3b24f7db85df5fc2c173ddd67cab..9f9f812197d35467f2f32a9c18ea4bde6a8c48b4 100644 (file)
@@ -1,6 +1,6 @@
 --- a/Makefile.SH
 +++ b/Makefile.SH
-@@ -315,22 +315,11 @@ MINIPERL = \$(LDLIBPTH) ./miniperl\$(EXE
+@@ -316,22 +316,11 @@ MANIFEST_SRT = MANIFEST.srt
  
  !GROK!THIS!
  
index 32914dde72cab619853386557a059a49efb6ec6a..f90e5d9ca73c21ace03493ca0a5cfbd9a433af3c 100644 (file)
@@ -1,7 +1,5 @@
-Index: perl-5.22.0/t/op/tie_fetch_count.t
-===================================================================
---- perl-5.22.0.orig/t/op/tie_fetch_count.t
-+++ perl-5.22.0/t/op/tie_fetch_count.t
+--- a/t/op/tie_fetch_count.t
++++ b/t/op/tie_fetch_count.t
 @@ -250,12 +250,17 @@ for ([chdir=>''],[chmod=>'0,'],[chown=>'
      check_count "$op $args\\\$tied_glob$postargs";
  }
index 27ee75749a76f50f2235ee7f65a0feb877464cc8..e60ee8cc1f10808f0a54a55e8160f0b206b54f21 100644 (file)
@@ -5,10 +5,8 @@ We can't provide either with busybox. Just skip it for now.
 
 Signed-off-by: Marcel Denia <naoir@gmx.net>
 
-Index: perl-5.22.0/dist/threads/t/join.t
-===================================================================
---- perl-5.22.0.orig/dist/threads/t/join.t
-+++ perl-5.22.0/dist/threads/t/join.t
+--- a/dist/threads/t/join.t
++++ b/dist/threads/t/join.t
 @@ -110,36 +110,41 @@ sub skip {
  
  # We parse ps output so this is OS-dependent.
diff --git a/lang/perl/patches/900-CVE-2015-8607.patch b/lang/perl/patches/900-CVE-2015-8607.patch
new file mode 100644 (file)
index 0000000..5f1c1cb
--- /dev/null
@@ -0,0 +1,57 @@
+From b6307f728a4f842a54ea96959e386c7daa92ece1 Mon Sep 17 00:00:00 2001
+From: Tony Cook <tony@develop-help.com>
+Date: Tue, 15 Dec 2015 10:56:54 +1100
+Subject: [perl #126862] ensure File::Spec::canonpath() preserves taint
+
+Previously the unix specific XS implementation of canonpath() would
+return an untainted path when supplied a tainted path.
+
+For the empty string case, newSVpvs() already sets taint as needed on
+its result.
+---
+ dist/PathTools/Cwd.xs    |  1 +
+ dist/PathTools/t/taint.t | 19 ++++++++++++++++++-
+ 2 files changed, 19 insertions(+), 1 deletion(-)
+
+--- a/dist/PathTools/Cwd.xs
++++ b/dist/PathTools/Cwd.xs
+@@ -535,6 +535,7 @@ THX_unix_canonpath(pTHX_ SV *path)
+     *o = 0;
+     SvPOK_on(retval);
+     SvCUR_set(retval, o - SvPVX(retval));
++    SvTAINT(retval);
+     return retval;
+ }
+--- a/dist/PathTools/t/taint.t
++++ b/dist/PathTools/t/taint.t
+@@ -12,7 +12,7 @@ use Test::More;
+ BEGIN {
+     plan(
+         ${^TAINT}
+-        ? (tests => 17)
++        ? (tests => 21)
+         : (skip_all => "A perl without taint support")
+     );
+ }
+@@ -34,3 +34,20 @@ foreach my $func (@Functions) {
+ # Previous versions of Cwd tainted $^O
+ is !tainted($^O), 1, "\$^O should not be tainted";
++
++{
++    # [perl #126862] canonpath() loses taint
++    my $tainted = substr($ENV{PATH}, 0, 0);
++    # yes, getcwd()'s result should be tainted, and is tested above
++    # but be sure
++    ok tainted(File::Spec->canonpath($tainted . Cwd::getcwd)),
++        "canonpath() keeps taint on non-empty string";
++    ok tainted(File::Spec->canonpath($tainted)),
++        "canonpath() keeps taint on empty string";
++
++    (Cwd::getcwd() =~ /^(.*)/);
++    my $untainted = $1;
++    ok !tainted($untainted), "make sure our untainted value is untainted";
++    ok !tainted(File::Spec->canonpath($untainted)),
++        "canonpath() doesn't add taint to untainted string";
++}
index a6f4eaaf933eb9ef18b7ff09e54e7791b61d00c0..c64942fedee3b8bc161e029f51caa4f4b1c7cd02 100644 (file)
@@ -4,12 +4,12 @@
 PERL_VERSION:=5.22
 
 # Build environment
-HOST_PERL_PREFIX:=$(STAGING_DIR_HOST)/usr
+HOST_PERL_PREFIX:=$(STAGING_DIR)/host/usr
 ifneq ($(CONFIG_USE_GLIBC),)
        EXTRA_LIBS:=bsd
        EXTRA_LIBDIRS:=$(STAGING_DIR)/lib
 endif
-PERL_CMD:=$(STAGING_DIR_HOST)/usr/bin/perl$(PERL_VERSION).0
+PERL_CMD:=$(STAGING_DIR)/host/usr/bin/perl$(PERL_VERSION).0
 
 MOD_CFLAGS_PERL:=-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(TARGET_CFLAGS) $(TARGET_CPPFLAGS)
 ifdef CONFIG_PERL_THREADS
@@ -26,7 +26,7 @@ define perlmod/host/relink
        rm -f $(1)/Makefile.aperl
        $(MAKE) -C $(1) perl
        $(CP) $(1)/perl $(PERL_CMD)
-       $(CP) $(1)/perl $(STAGING_DIR_HOST)/usr/bin/perl
+       $(CP) $(1)/perl $(STAGING_DIR)/host/usr/bin/perl
 endef
 
 define perlmod/host/Configure
index 3ab2e8eae6585bf010aeb3c73941068bb165c1d0..a8cbce2fcc6fa8dbd8c9df868cd2577888c22377 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006-2015 OpenWrt.org
+# Copyright (C) 2006-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=php
-PKG_VERSION:=5.6.16
+PKG_VERSION:=5.6.19
 PKG_RELEASE:=1
 
 PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>, Michael Heimpold <mhei@heimpold.de>
@@ -18,7 +18,7 @@ PKG_LICENSE_FILES:=LICENSE
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=http://www.php.net/distributions/
-PKG_MD5SUM:=3f1d999ed1f9cb5713c9a0161c557f2f
+PKG_MD5SUM:=aab960cc1b2bfbeb00d030a9d42b38bd
 
 PKG_FIXUP:=libtool autoreconf
 PKG_BUILD_PARALLEL:=1
@@ -491,10 +491,10 @@ define Build/InstallDev
        mkdir -p $(PKG_BUILD_DIR)/staging/usr/bin
        make -C $(PKG_BUILD_DIR) install INSTALL_ROOT=$(PKG_BUILD_DIR)/staging
        rm -f $(PKG_BUILD_DIR)/staging/usr/bin/php
-       $(CP) $(PKG_BUILD_DIR)/staging/* $(STAGING_DIR_HOST)
-       sed -i -e "s#prefix='/usr'#prefix='$(STAGING_DIR_HOST)/usr'#" $(STAGING_DIR_HOST)/usr/bin/phpize
-       sed -i -e "s#exec_prefix=\"\`eval echo /usr\`\"#exec_prefix='$(STAGING_DIR_HOST)/usr'#" $(STAGING_DIR_HOST)/usr/bin/phpize
-       sed -i -e "s#prefix=\"/usr\"#prefix=\"$(STAGING_DIR_HOST)/usr\"#" $(STAGING_DIR_HOST)/usr/bin/php-config
+       $(CP) $(PKG_BUILD_DIR)/staging/* $(STAGING_DIR)/host
+       sed -i -e "s#prefix='/usr'#prefix='$(STAGING_DIR)/host/usr'#" $(STAGING_DIR)/host/usr/bin/phpize
+       sed -i -e "s#exec_prefix=\"\`eval echo /usr\`\"#exec_prefix='$(STAGING_DIR)/host/usr'#" $(STAGING_DIR)/host/usr/bin/phpize
+       sed -i -e "s#prefix=\"/usr\"#prefix=\"$(STAGING_DIR)/host/usr\"#" $(STAGING_DIR)/host/usr/bin/php-config
 endef
 
 define BuildModule
index ee2a5ce771a20d74ff857c2ca1f1b2eff111b4d9..88d3a98bb259bdf04346f84d61c7914825c72807 100644 (file)
@@ -15,11 +15,11 @@ endef
 
 define Build/Prepare
        $(Build/Prepare/Default)
-       ( cd $(PKG_BUILD_DIR); $(STAGING_DIR_HOST)/usr/bin/phpize )
+       ( cd $(PKG_BUILD_DIR); $(STAGING_DIR)/host/usr/bin/phpize )
 endef
 
 CONFIGURE_ARGS+= \
-       --with-php-config=$(STAGING_DIR_HOST)/usr/bin/php-config
+       --with-php-config=$(STAGING_DIR)/host/usr/bin/php-config
 
 define PECLPackage
 
diff --git a/lang/python-attrs/Makefile b/lang/python-attrs/Makefile
new file mode 100644 (file)
index 0000000..ec0fadf
--- /dev/null
@@ -0,0 +1,47 @@
+#
+# Copyright (C) 2016 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=attrs
+PKG_VERSION:=15.2.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://pypi.python.org/packages/source/a/attrs
+PKG_MD5SUM:=b3c460eb6482f6e557c0e4025475c007
+
+PKG_BUILD_DEPENDS:=python python-setuptools
+
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
+
+include $(INCLUDE_DIR)/package.mk
+$(call include_mk, python-package.mk)
+
+define Package/python-attrs
+       SECTION:=lang
+       CATEGORY:=Languages
+       SUBMENU:=Python
+       TITLE:=python-attrs
+       URL:=https://attrs.readthedocs.org/
+       DEPENDS:=+python-light
+endef
+
+define Package/python-attrs/description
+attrs is an MIT-licensed Python package with class decorators that ease
+the chores of implementing the most common attribute-related object
+protocols.
+endef
+
+define Build/Compile
+       $(call Build/Compile/PyMod,,install --prefix="/usr" --root="$(PKG_INSTALL_DIR)")
+endef
+
+$(eval $(call PyPackage,python-attrs))
+$(eval $(call BuildPackage,python-attrs))
index b78bce1d505a3392617806b491cc402b9cedbc05..a3269601681bdf7b2034804b589370153a0e9042 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2015 OpenWrt.org
+# Copyright (C) 2015-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=cffi
-PKG_VERSION:=1.4.2
-PKG_RELEASE:=1
+PKG_VERSION:=1.5.2
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://pypi.python.org/packages/source/c/cffi
-PKG_MD5SUM:=81357fe5042d00650b85b728cc181df2
+PKG_MD5SUM:=fa766133f7299464c8bf857e0c966a82
 
 PKG_BUILD_DEPENDS:=python python-setuptools
 HOST_BUILD_DEPENDS:=libffi/host python/host python-setuptools/host python-pycparser/host
@@ -45,7 +45,7 @@ define Build/Compile
 endef
 
 define Host/Compile
-       $(call Build/Compile/HostPyMod,,install --prefix="/usr" --root="$(STAGING_DIR_HOST)")
+       $(call Build/Compile/HostPyMod,,install --prefix="" --root="$(STAGING_DIR)/host")
 endef
 
 define Host/Install
index 6959f6d1b7ca5c4f6142f26ea70c3cd81bb928d8..79875cf140987fb5ef190ec1e9466254451be910 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2015 OpenWrt.org
+# Copyright (C) 2015-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=cryptography
-PKG_VERSION:=1.1.2
+PKG_VERSION:=1.3.1
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://pypi.python.org/packages/source/c/cryptography
-PKG_MD5SUM:=15eeba9e31f852bac21155baa3dfbc61
+PKG_MD5SUM:=bc8148d2ff2d80fef8ef2d2e856b3a7f
 
 PKG_BUILD_DEPENDS:=python-cffi/host
 
diff --git a/lang/python-gmpy/Makefile b/lang/python-gmpy/Makefile
new file mode 100644 (file)
index 0000000..09ed13d
--- /dev/null
@@ -0,0 +1,44 @@
+#
+# Copyright (C) 2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=gmpy
+PKG_VERSION:=1.17
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).zip
+PKG_SOURCE_URL:=https://pypi.python.org/packages/source/g/gmpy
+PKG_MD5SUM:=2bf419076b06e107167e219f60ac6d27
+
+PKG_LICENSE:=LGPL-2.1+
+PKG_LICENSE_FILES:=lgpl-2.1.txt
+PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
+
+include $(INCLUDE_DIR)/package.mk
+$(call include_mk, python-package.mk)
+
+define Package/python-gmpy
+       SECTION:=lang
+       CATEGORY:=Languages
+       SUBMENU:=Python
+       TITLE:=python-gmpy
+       URL:=http://code.google.com/p/gmpy/
+       DEPENDS:=+libgmp +python-light
+endef
+
+define Package/python-gmpy/description
+gmpy is a C-coded Python extension module that provides access to the
+GMP (or MPIR) multiple-precision arithmetic library.
+endef
+
+define Build/Compile
+       $(call Build/Compile/PyMod,,install --prefix="/usr" --root="$(PKG_INSTALL_DIR)")
+endef
+
+$(eval $(call PyPackage,python-gmpy))
+$(eval $(call BuildPackage,python-gmpy))
diff --git a/lang/python-gmpy2/Makefile b/lang/python-gmpy2/Makefile
new file mode 100644 (file)
index 0000000..a92be90
--- /dev/null
@@ -0,0 +1,49 @@
+#
+# Copyright (C) 2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=gmpy2
+PKG_VERSION:=2.0.7
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).zip
+PKG_SOURCE_URL:=https://pypi.python.org/packages/source/g/gmpy2
+PKG_MD5SUM:=b5aada3ee5afb316ea94604f45192054
+
+PKG_LICENSE:=LGPL-3.0+
+PKG_LICENSE_FILES:=COPYING.LESSER
+PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
+
+include $(INCLUDE_DIR)/package.mk
+$(call include_mk, python-package.mk)
+
+define Package/python-gmpy2
+       SECTION:=lang
+       CATEGORY:=Languages
+       SUBMENU:=Python
+       TITLE:=python-gmpy2
+       URL:=http://code.google.com/p/gmpy/
+       DEPENDS:=+libgmp +python-light
+endef
+
+define Package/python-gmpy2/description
+gmpy2 is a C-coded Python extension module that supports multiple-precision
+arithmetic. gmpy2 is the successor to the original gmpy module. The gmpy module
+only supported the GMP multiple-precision library. gmpy2 adds support for the
+MPFR (correctly rounded real floating-point arithmetic) and MPC (correctly
+rounded complex floating-point arithmetic) libraries. gmpy2 also updates the
+API and naming conventions to be more consistent and support the additional
+functionality.
+endef
+
+define Build/Compile
+       $(call Build/Compile/PyMod,,install --prefix="/usr" --root="$(PKG_INSTALL_DIR)" --nompfr)
+endef
+
+$(eval $(call PyPackage,python-gmpy2))
+$(eval $(call BuildPackage,python-gmpy2))
index af0b86052af7ec33548e1dab9966f51504d6b7e5..d95409668192edbe89f63ff5cd7f2fcd2f6f382a 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2015 OpenWrt.org
+# Copyright (C) 2015-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=idna
-PKG_VERSION:=2.0
+PKG_VERSION:=2.1
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://pypi.python.org/packages/source/i/idna
-PKG_MD5SUM:=bd17a9d15e755375f48a62c13b25b801
+PKG_MD5SUM:=f6473caa9c5e0cc1ad3fd5d04c3c114b
 
 PKG_BUILD_DEPENDS:=python python-setuptools
 
index 65b4a05a2c15b4d04caf05c8657160aebdd1d251..9fc6f6e62dccea2a33f58e7b88bb573c4b87fa40 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2015 OpenWrt.org
+# Copyright (C) 2015-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ipaddress
-PKG_VERSION:=1.0.15
+PKG_VERSION:=1.0.16
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://pypi.python.org/packages/source/i/ipaddress
-PKG_MD5SUM:=12915e923b738107e47827478d553ba1
+PKG_MD5SUM:=1e27b62aa20f5b6fc200b2bdbf0d0847
 
 PKG_BUILD_DEPENDS:=python python-setuptools
 
diff --git a/lang/python-parsley/Makefile b/lang/python-parsley/Makefile
new file mode 100644 (file)
index 0000000..75df427
--- /dev/null
@@ -0,0 +1,43 @@
+#
+# Copyright (C) 2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=Parsley
+PKG_VERSION:=1.3
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://pypi.python.org/packages/source/P/Parsley
+PKG_MD5SUM:=92bc256e5f73810a609dc7874637ad31
+
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
+
+include $(INCLUDE_DIR)/package.mk
+$(call include_mk, python-package.mk)
+
+define Package/python-parsley
+       SECTION:=lang
+       CATEGORY:=Languages
+       SUBMENU:=Python
+       TITLE:=python-parsley
+       URL:=http://launchpad.net/parsley
+       DEPENDS:=+python-light
+endef
+
+define Package/python-parsley/description
+Parsing and pattern matching made easy.
+endef
+
+define Build/Compile
+       $(call Build/Compile/PyMod,,install --prefix="/usr" --root="$(PKG_INSTALL_DIR)")
+endef
+
+$(eval $(call PyPackage,python-parsley))
+$(eval $(call BuildPackage,python-parsley))
diff --git a/lang/python-parsley/patches/001-omit-tests.patch b/lang/python-parsley/patches/001-omit-tests.patch
new file mode 100644 (file)
index 0000000..71bd021
--- /dev/null
@@ -0,0 +1,12 @@
+diff -Nur a/setup.py b/setup.py
+--- a/setup.py 2015-09-09 10:45:25.000000000 +0800
++++ b/setup.py 2015-12-01 17:31:03.143409843 +0800
+@@ -14,7 +14,6 @@
+     author_email="washort42@gmail.com",
+     license="MIT License",
+     long_description=open("README").read(),
+-    packages=["ometa", "terml", "ometa._generated", "terml._generated",
+-              "ometa.test", "terml.test"],
++    packages=["ometa", "terml", "ometa._generated", "terml._generated"],
+     py_modules=["parsley"]
+ )
index f260e7ffee1da6c5bff80015d278087dc2e4ede9..789f41e2d91cece51c194617ed0978e6c8635855 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-pip
-PKG_VERSION:=7.1.2
-PKG_RELEASE:=3
+PKG_VERSION:=8.1.0
+PKG_RELEASE:=1
 
 PKG_SOURCE:=pip-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://pypi.python.org/packages/source/p/pip/
-PKG_MD5SUM:=3823d2343d9f3aaab21cf9c917710196
+PKG_MD5SUM:=e9c3844db343f47d16040b32ad9072be
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/pip-$(PKG_VERSION)
 PKG_USE_MIPS16:=0
index e8b974a6831f9802115b51df9c62f833bc0c4bfa..c92de2edfc1a5e02dcf83ff14f2c13499e403c8c 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2015 OpenWrt.org
+# Copyright (C) 2015-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ply
 PKG_VERSION:=3.8
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.dabeaz.com/ply
@@ -45,15 +45,8 @@ define Build/Compile
        $(call Build/Compile/PyMod,,install --prefix="/usr" --root="$(PKG_INSTALL_DIR)")
 endef
 
-define Build/InstallDev
-       $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
-       $(CP) \
-               $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
-               $(1)$(PYTHON_PKG_DIR)
-endef
-
 define Host/Compile
-       $(call Build/Compile/HostPyMod,,install --prefix="/usr" --root="$(STAGING_DIR_HOST)")
+       $(call Build/Compile/HostPyMod,,install --prefix="" --root="$(STAGING_DIR)/host")
 endef
 
 define Host/Install
diff --git a/lang/python-pyasn1-modules/Makefile b/lang/python-pyasn1-modules/Makefile
new file mode 100644 (file)
index 0000000..bc4142b
--- /dev/null
@@ -0,0 +1,46 @@
+#
+# Copyright (C) 2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=pyasn1-modules
+PKG_VERSION:=0.0.8
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://pypi.python.org/packages/source/p/pyasn1-modules
+PKG_MD5SUM:=178129bc7fbf07215c25230c5f053f81
+
+PKG_BUILD_DEPENDS:=python python-setuptools
+
+PKG_LICENSE:=BSD-2-Clause
+PKG_LICENSE_FILES:=LICENSE.txt
+PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
+
+include $(INCLUDE_DIR)/package.mk
+$(call include_mk, python-package.mk)
+
+define Package/python-pyasn1-modules
+       SECTION:=lang
+       CATEGORY:=Languages
+       SUBMENU:=Python
+       TITLE:=python-pyasn1-modules
+       URL:=http://sourceforge.net/projects/pyasn1/
+       DEPENDS:=+python-light +python-pyasn1
+endef
+
+define Package/python-pyasn1-modules/description
+This is a small but growing collection of ASN.1 data structures
+expressed in Python terms using pyasn1 data model.
+endef
+
+define Build/Compile
+       $(call Build/Compile/PyMod,,install --prefix="/usr" --root="$(PKG_INSTALL_DIR)")
+endef
+
+$(eval $(call PyPackage,python-pyasn1-modules))
+$(eval $(call BuildPackage,python-pyasn1-modules))
index c5e03f2bb98d135b8b68df24c9afcfa090f4fec9..8acab48f009b021af72ed5ef52c9dd6103db7fb1 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2015 OpenWrt.org
+# Copyright (C) 2015-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=pycparser
 PKG_VERSION:=2.14
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://pypi.python.org/packages/source/p/pycparser
@@ -47,7 +47,7 @@ define Build/Compile
 endef
 
 define Host/Compile
-       $(call Build/Compile/HostPyMod,,install --prefix="/usr" --root="$(STAGING_DIR_HOST)")
+       $(call Build/Compile/HostPyMod,,install --prefix="" --root="$(STAGING_DIR)/host")
 endef
 
 define Host/Install
index 187e19fddb3c0f3523c342f32db472076c5e30a6..d79261bab530226474e8ad78f4b8b408049f1124 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2015 OpenWrt.org
+# Copyright (C) 2015-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=pyOpenSSL
-PKG_VERSION:=0.15.1
+PKG_VERSION:=16.0.0
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://pypi.python.org/packages/source/p/pyOpenSSL
-PKG_MD5SUM:=f447644afcbd5f0a1f47350fec63a4c6
+PKG_MD5SUM:=9587d813dcf656e9f2760e41a3682dc3
 
 PKG_BUILD_DEPENDS:=python python-setuptools
 
diff --git a/lang/python-pyopenssl/patches/001-omit-tests.patch b/lang/python-pyopenssl/patches/001-omit-tests.patch
deleted file mode 100644 (file)
index b3c387e..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-diff --git a/setup.py b/setup.py
-index c376f87..6444fac 100755
---- a/setup.py
-+++ b/setup.py
-@@ -22,14 +22,7 @@ setup(name='pyOpenSSL', version=__version__,
-                      'OpenSSL.rand',
-                      'OpenSSL.crypto',
-                      'OpenSSL.SSL',
--                     'OpenSSL.version',
--                     'OpenSSL.test.__init__',
--                     'OpenSSL.test.util',
--                     'OpenSSL.test.test_crypto',
--                     'OpenSSL.test.test_rand',
--                     'OpenSSL.test.test_ssl',
--                     'OpenSSL.test.test_tsafe',
--                     'OpenSSL.test.test_util',],
-+                     'OpenSSL.version',],
-       description = 'Python wrapper module around the OpenSSL library',
-       author = 'Jean-Paul Calderone',
-       author_email = 'exarkun@twistedmatrix.com',
-@@ -74,5 +67,4 @@ High-level wrapper around a subset of the OpenSSL library, includes
-         'Topic :: Security :: Cryptography',
-         'Topic :: Software Development :: Libraries :: Python Modules',
-         'Topic :: System :: Networking',
--        ],
--      test_suite="OpenSSL")
-+        ])
diff --git a/lang/python-pyptlib/Makefile b/lang/python-pyptlib/Makefile
new file mode 100644 (file)
index 0000000..8f33246
--- /dev/null
@@ -0,0 +1,46 @@
+#
+# Copyright (C) 2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=pyptlib
+PKG_VERSION:=0.0.6
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://pypi.python.org/packages/source/p/pyptlib
+PKG_MD5SUM:=2fc7b8803777451c1fad3d5e25f1b99c
+
+PKG_BUILD_DEPENDS:=python python-setuptools
+
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=LICENSE
+PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
+
+include $(INCLUDE_DIR)/package.mk
+$(call include_mk, python-package.mk)
+
+define Package/python-pyptlib
+       SECTION:=lang
+       CATEGORY:=Languages
+       SUBMENU:=Python
+       TITLE:=python-pyptlib
+       URL:=https://pypi.python.org/pypi/pyptlib
+       DEPENDS:=+python-light
+endef
+
+define Package/python-pyptlib/description
+A python implementation of the Pluggable Transports for Circumvention
+specification for Tor
+endef
+
+define Build/Compile
+       $(call Build/Compile/PyMod,,install --prefix="/usr" --root="$(PKG_INSTALL_DIR)")
+endef
+
+$(eval $(call PyPackage,python-pyptlib))
+$(eval $(call BuildPackage,python-pyptlib))
diff --git a/lang/python-service-identity/Makefile b/lang/python-service-identity/Makefile
new file mode 100644 (file)
index 0000000..b66927b
--- /dev/null
@@ -0,0 +1,46 @@
+#
+# Copyright (C) 2016 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=service_identity
+PKG_VERSION:=16.0.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://pypi.python.org/packages/source/s/service_identity
+PKG_MD5SUM:=d52392597b9c44a740abf322bfdb21e6
+
+PKG_BUILD_DEPENDS:=python python-setuptools
+
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
+
+include $(INCLUDE_DIR)/package.mk
+$(call include_mk, python-package.mk)
+
+define Package/python-service-identity
+       SECTION:=lang
+       CATEGORY:=Languages
+       SUBMENU:=Python
+       TITLE:=python-service-identity
+       URL:=https://github.com/pyca/service_identity
+       DEPENDS:=+python-light +python-attrs +python-pyasn1 +python-pyasn1-modules +python-pyopenssl
+endef
+
+define Package/python-service-identity/description
+service_identity aspires to give you all the tools you need for
+verifying whether a certificate is valid for the intended purposes.
+endef
+
+define Build/Compile
+       $(call Build/Compile/PyMod,,install --prefix="/usr" --root="$(PKG_INSTALL_DIR)")
+endef
+
+$(eval $(call PyPackage,python-service-identity))
+$(eval $(call BuildPackage,python-service-identity))
index 71d30fec16e9aaa2fd45ab1ee05c0f579e5f0154..7eab1429065569da6ab8a8bab90c496be2eb2751 100644 (file)
@@ -1,21 +1,21 @@
 #
-# Copyright (C) 2014 OpenWrt.org
+# Copyright (C) 2014-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
-# 
+#
 
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-setuptools
-PKG_VERSION:=18.7
+PKG_VERSION:=20.2.2
 PKG_RELEASE:=1
 
 PKG_SOURCE:=setuptools-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://pypi.python.org/packages/source/s/setuptools/
-PKG_MD5SUM:=295d7aaef2da7d6ff10b522581da0cf9
+PKG_MD5SUM:=bf37191cb4c1472fb61e6f933d2006b1
 
-HOST_BUILD_DEPENDS:=python/host
+HOST_BUILD_DEPENDS:=python python/host
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/setuptools-$(PKG_VERSION)
 HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/setuptools-$(PKG_VERSION)
@@ -60,7 +60,7 @@ endef
 
 define Host/Compile
        $(call Build/Compile/HostPyMod,,\
-               install --root="$(STAGING_DIR_HOST)" --prefix="/usr" \
+               install --root="$(STAGING_DIR)/host" --prefix="" \
                --single-version-externally-managed \
        )
 endef
index 0a2d50baf11cbb4b023b9f38f7c899995f15a0b0..f48127fab316e90432822e297e2705bf5b2f6eb0 100644 (file)
@@ -1,16 +1,16 @@
 diff --git a/setuptools/dist.py b/setuptools/dist.py
-index 6b9d350..1350e8a 100644
+index 7785541..23108c7 100644
 --- a/setuptools/dist.py
 +++ b/setuptools/dist.py
-@@ -15,7 +15,6 @@ from distutils.errors import (DistutilsOptionError, DistutilsPlatformError,
+@@ -18,7 +18,6 @@ from setuptools.extern.six.moves import map
+ from pkg_resources.extern import packaging
  
  from setuptools.depends import Require
- from setuptools.compat import basestring, PY2
 -from setuptools import windows_support
  import pkg_resources
  
- def _get_unpatched(cls):
-@@ -310,7 +309,6 @@ class Distribution(_Distribution):
+@@ -335,7 +334,6 @@ class Distribution(_Distribution):
          egg_cache_dir = os.path.join(os.curdir, '.eggs')
          if not os.path.exists(egg_cache_dir):
              os.mkdir(egg_cache_dir)
diff --git a/lang/python-txsocksx/Makefile b/lang/python-txsocksx/Makefile
new file mode 100644 (file)
index 0000000..d830e6f
--- /dev/null
@@ -0,0 +1,49 @@
+#
+# Copyright (C) 2015-2016 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=txsocksx
+PKG_VERSION:=1.15.0.2
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://pypi.python.org/packages/source/t/txsocksx
+PKG_MD5SUM:=0266b9ae7b58f7550a49683afebf65ba
+
+PKG_BUILD_DEPENDS:=python python-setuptools
+
+PKG_LICENSE:=ISC
+PKG_LICENSE_FILES:=COPYING
+PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
+
+include $(INCLUDE_DIR)/package.mk
+$(call include_mk, python-package.mk)
+
+define Package/python-txsocksx
+       SECTION:=lang
+       CATEGORY:=Languages
+       SUBMENU:=Python
+       TITLE:=python-txsocksx
+       URL:=https://github.com/habnabit/txsocksx
+       DEPENDS:=+python-light +python-parsley +twisted
+endef
+
+define Package/python-txsocksx/description
+txsocksx is SOCKS4/4a and SOCKS5 client endpoints for Twisted 10.1 or
+greater.
+endef
+
+define Build/Compile
+       $(call Build/Compile/PyMod,, \
+               install --prefix="/usr" --root="$(PKG_INSTALL_DIR)", \
+               PKG_VERSION="$(PKG_VERSION)" \
+       )
+endef
+
+$(eval $(call PyPackage,python-txsocksx))
+$(eval $(call BuildPackage,python-txsocksx))
diff --git a/lang/python-txsocksx/patches/001-omit-tests.patch b/lang/python-txsocksx/patches/001-omit-tests.patch
new file mode 100644 (file)
index 0000000..dd4acd7
--- /dev/null
@@ -0,0 +1,11 @@
+diff --git a/setup.py b/setup.py
+index 7979f89..3873a1e 100644
+--- a/setup.py
++++ b/setup.py
+@@ -35,5 +35,5 @@ setup(
+         'version_module_paths': ['txsocksx/_version.py'],
+     },
+     install_requires=install_requires,
+-    packages=['txsocksx', 'txsocksx.test'],
++    packages=['txsocksx'],
+ )
diff --git a/lang/python-txsocksx/patches/002-do-not-use-vcversioner.patch b/lang/python-txsocksx/patches/002-do-not-use-vcversioner.patch
new file mode 100644 (file)
index 0000000..a904db1
--- /dev/null
@@ -0,0 +1,29 @@
+diff --git a/setup.py b/setup.py
+index 7979f89..5e1abb3 100644
+--- a/setup.py
++++ b/setup.py
+@@ -1,6 +1,8 @@
+ # Copyright (c) Aaron Gallagher <_@habnab.it>
+ # See COPYING for details.
++import os
++
+ from setuptools import setup
+@@ -30,10 +32,11 @@ setup(
+     ],
+     license='ISC',
+-    setup_requires=['vcversioner>=1'],
+-    vcversioner={
+-        'version_module_paths': ['txsocksx/_version.py'],
+-    },
++    #setup_requires=['vcversioner>=1'],
++    #vcversioner={
++    #    'version_module_paths': ['txsocksx/_version.py'],
++    #},
++    version=os.environ.get('PKG_VERSION'),
+     install_requires=install_requires,
+     packages=['txsocksx', 'txsocksx.test'],
+ )
index c8936d2262f3e619bb2529a0b86d827b999893ce..63af64de5b5abfeb6de53583dbbf4d6e28860dc2 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006-2015 OpenWrt.org
+# Copyright (C) 2006-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -12,7 +12,7 @@ include ./files/python-package.mk
 
 PKG_NAME:=python
 PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO)
-PKG_RELEASE:=3
+PKG_RELEASE:=6
 
 PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://www.python.org/ftp/python/$(PKG_VERSION)
@@ -29,7 +29,7 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/Python-$(PKG_VERSION)
 HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/Python-$(PKG_VERSION)
 
 PKG_BUILD_DEPENDS:=python/host
-HOST_BUILD_DEPENDS:=bzip2/host expat/host
+HOST_BUILD_DEPENDS:=bzip2/host expat/host libffi/host
 
 include $(INCLUDE_DIR)/host-build.mk
 include $(INCLUDE_DIR)/package.mk
@@ -144,13 +144,13 @@ define Build/InstallDev
                $(PKG_INSTALL_DIR)/usr/include/python$(PYTHON_VERSION) \
                $(1)/usr/include/
        $(CP) \
-               $(STAGING_DIR_HOST)/usr/lib/python$(PYTHON_VERSION) \
+               $(STAGING_DIR)/host/lib/python$(PYTHON_VERSION) \
                $(PKG_INSTALL_DIR)/usr/lib/libpython$(PYTHON_VERSION).so* \
                $(1)/usr/lib/
        $(CP) \
-               $(STAGING_DIR_HOST)/lib/pkgconfig/python.pc \
-               $(STAGING_DIR_HOST)/lib/pkgconfig/python2.pc \
-               $(STAGING_DIR_HOST)/lib/pkgconfig/python-$(PYTHON_VERSION).pc \
+               $(STAGING_DIR)/host/lib/pkgconfig/python.pc \
+               $(STAGING_DIR)/host/lib/pkgconfig/python2.pc \
+               $(STAGING_DIR)/host/lib/pkgconfig/python-$(PYTHON_VERSION).pc \
                $(1)/usr/lib/pkgconfig
        $(CP) \
                $(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON_VERSION)/config \
@@ -221,16 +221,16 @@ HOST_CONFIGURE_ARGS+= \
        --without-cxx-main \
        --without-pymalloc \
        --with-threads \
-       --prefix=$(STAGING_DIR_HOST)/usr \
-       --with-system-expat=$(STAGING_DIR_HOST) \
+       --with-system-expat=$(STAGING_DIR)/host \
+       --with-system-ffi="$(STAGING_DIR)/host" \
        --with-ensurepip=upgrade \
        CONFIG_SITE= \
        CFLAGS="$(HOST_CFLAGS)"
 
 define Host/Install
-       $(INSTALL_DIR) $(STAGING_DIR_HOST)/bin/
+       $(INSTALL_DIR) $(STAGING_DIR)/host/bin/
        $(MAKE) -C $(HOST_BUILD_DIR) install
-       $(INSTALL_BIN) $(HOST_BUILD_DIR)/Parser/pgen $(STAGING_DIR_HOST)/bin/pgen2
+       $(INSTALL_BIN) $(HOST_BUILD_DIR)/Parser/pgen $(STAGING_DIR)/host/bin/pgen2
 endef
 
 $(eval $(call HostBuild))
index b2ed33683503081d17d5a16ef31ee0f6d4061a43..8736d29ad27123b795ac65379e735122a574d189 100644 (file)
@@ -1,38 +1,36 @@
 #
-# Copyright (C) 2015 OpenWrt.org
+# Copyright (C) 2015-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
 #
 
-HOST_PYTHON_INC_DIR:=$(STAGING_DIR_HOST)/include/python$(PYTHON_VERSION)
+HOST_PYTHON_DIR:=$(STAGING_DIR)/host
+HOST_PYTHON_INC_DIR:=$(HOST_PYTHON_DIR)/include/python$(PYTHON_VERSION)
+HOST_PYTHON_LIB_DIR:=$(HOST_PYTHON_DIR)/lib/python$(PYTHON_VERSION)
 
-HOST_PYTHON_PKG_DIR:=/usr/lib/python$(PYTHON_VERSION)/site-packages
+HOST_PYTHON_PKG_DIR:=/lib/python$(PYTHON_VERSION)/site-packages
+
+HOST_PYTHON_BIN:=$(HOST_PYTHON_DIR)/bin/python$(PYTHON_VERSION)
+
+HOST_PYTHONPATH:=$(HOST_PYTHON_LIB_DIR):$(STAGING_DIR)/host/$(HOST_PYTHON_PKG_DIR)
 
-HOST_PYTHONPATH:=$(HOST_PYTHON_LIB_DIR):$(STAGING_DIR_HOST)/$(HOST_PYTHON_PKG_DIR)
 define HostPython
        if [ "$(strip $(3))" == "HOST" ]; then \
                export PYTHONPATH="$(HOST_PYTHONPATH)"; \
-               export _python_sysroot="$(STAGING_DIR_HOST)"; \
+               export PYTHONDONTWRITEBYTECODE=0; \
        else \
                export PYTHONPATH="$(PYTHONPATH)"; \
+               export PYTHONDONTWRITEBYTECODE=1; \
                export _python_sysroot="$(STAGING_DIR)"; \
+               export _python_prefix="/usr"; \
+               export _python_exec_prefix="/usr"; \
        fi; \
        export PYTHONOPTIMIZE=""; \
-       export PYTHONDONTWRITEBYTECODE=1; \
-       export _python_prefix="/usr"; \
-       export _python_exec_prefix="/usr"; \
        $(1) \
        $(HOST_PYTHON_BIN) $(2);
 endef
 
-# These configure args are needed in detection of path to Python header files
-# using autotools.
-HOST_CONFIGURE_ARGS += \
-       _python_sysroot="$(STAGING_DIR_HOST)" \
-       _python_prefix="/usr" \
-       _python_exec_prefix="/usr"
-
 # $(1) => build subdir
 # $(2) => additional arguments to setup.py
 # $(3) => additional variables
@@ -46,9 +44,8 @@ define Build/Compile/HostPyMod
                LDSHARED="$(HOSTCC) -shared" \
                CFLAGS="$(HOST_CFLAGS)" \
                CPPFLAGS="$(HOST_CPPFLAGS) -I$(HOST_PYTHON_INC_DIR)" \
-               LDFLAGS="$(HOST_LDFLAGS) -lpython$(PYTHON_VERSION)" \
+               LDFLAGS="$(HOST_LDFLAGS) -lpython$(PYTHON_VERSION) -Wl$(comma)-rpath=$(STAGING_DIR)/host/lib" \
                _PYTHON_HOST_PLATFORM=linux2 \
-               __PYVENV_LAUNCHER__="/usr/bin/$(PYTHON)" \
                $(3) \
                , \
                ./setup.py $(2) \
index 0a370c531a0f94bd5a7bb6f62df2032f9cc7230b..1f67718455feb2ba258050e9f422933904083a03 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006-2015 OpenWrt.org
+# Copyright (C) 2006-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -17,9 +17,6 @@ PYTHON_PKG_DIR:=/usr/lib/python$(PYTHON_VERSION)/site-packages
 
 PYTHON:=python$(PYTHON_VERSION)
 
-HOST_PYTHON_LIB_DIR:=$(STAGING_DIR_HOST)/usr/lib/python$(PYTHON_VERSION)
-HOST_PYTHON_BIN:=$(STAGING_DIR_HOST)/bin/python2
-
 PYTHONPATH:=$(PYTHON_LIB_DIR):$(STAGING_DIR)/$(PYTHON_PKG_DIR):$(PKG_INSTALL_DIR)/$(PYTHON_PKG_DIR)
 
 # These configure args are needed in detection of path to Python header files
index 2383520627dd2c9f572f46f685b0a8a4b46f6452..08b2651421863c1d408d30c79fab010cec957151 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python3-pip
-PKG_VERSION:=7.1.2
+PKG_VERSION:=8.1.0
 PKG_RELEASE:=1
 
 PKG_SOURCE:=pip-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://pypi.python.org/packages/source/p/pip/
-PKG_MD5SUM:=3823d2343d9f3aaab21cf9c917710196
+PKG_MD5SUM:=e9c3844db343f47d16040b32ad9072be
 
 PKG_LICENSE:=MIT
 
index 8394ec1ea494d5dc28c94ff810bd831c6fe83129..a11788648a8beeb0f13730a069db126d9bdadd71 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python3-setuptools
-PKG_VERSION:=18.5
+PKG_VERSION:=20.2.2
 PKG_RELEASE:=1
 
 PKG_SOURCE:=setuptools-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://pypi.python.org/packages/source/s/setuptools/
-PKG_MD5SUM:=533c868f01169a3085177dffe5e768bb
+PKG_MD5SUM:=bf37191cb4c1472fb61e6f933d2006b1
 
 PKG_LICENSE:=PSF
 
index 0a2d50baf11cbb4b023b9f38f7c899995f15a0b0..f48127fab316e90432822e297e2705bf5b2f6eb0 100644 (file)
@@ -1,16 +1,16 @@
 diff --git a/setuptools/dist.py b/setuptools/dist.py
-index 6b9d350..1350e8a 100644
+index 7785541..23108c7 100644
 --- a/setuptools/dist.py
 +++ b/setuptools/dist.py
-@@ -15,7 +15,6 @@ from distutils.errors import (DistutilsOptionError, DistutilsPlatformError,
+@@ -18,7 +18,6 @@ from setuptools.extern.six.moves import map
+ from pkg_resources.extern import packaging
  
  from setuptools.depends import Require
- from setuptools.compat import basestring, PY2
 -from setuptools import windows_support
  import pkg_resources
  
- def _get_unpatched(cls):
-@@ -310,7 +309,6 @@ class Distribution(_Distribution):
+@@ -335,7 +334,6 @@ class Distribution(_Distribution):
          egg_cache_dir = os.path.join(os.curdir, '.eggs')
          if not os.path.exists(egg_cache_dir):
              os.mkdir(egg_cache_dir)
index 250410756b1923f37dd19bb0f1e0140160130663..cdaa93a099d8ea3b604bf2ba0ccbf4577ecfadda 100644 (file)
@@ -146,7 +146,7 @@ define Build/InstallDev
                $(PKG_INSTALL_DIR)/usr/include/python$(PYTHON_VERSION) \
                $(1)/usr/include/
        $(CP) \
-               $(STAGING_DIR_HOST)/lib/python$(PYTHON_VERSION) \
+               $(STAGING_DIR)/host/lib/python$(PYTHON_VERSION) \
                $(PKG_INSTALL_DIR)/usr/lib/libpython$(PYTHON_VERSION).so* \
                $(1)/usr/lib/
        $(CP) \
@@ -216,8 +216,8 @@ HOST_CONFIGURE_ARGS+= \
        --without-cxx-main \
        --without-pymalloc \
        --with-threads \
-       --prefix=$(STAGING_DIR_HOST) \
-       --with-system-expat=$(STAGING_DIR_HOST) \
+       --prefix=$(STAGING_DIR)/host \
+       --with-system-expat=$(STAGING_DIR)/host \
        --with-ensurepip=upgrade \
        CONFIG_SITE= \
        CFLAGS="$(HOST_CFLAGS)"
@@ -228,10 +228,10 @@ define Host/Compile
 endef
 
 define Host/Install
-       $(INSTALL_DIR) $(STAGING_DIR_HOST)/bin/
+       $(INSTALL_DIR) $(STAGING_DIR)/host/bin/
        $(MAKE) -C $(HOST_BUILD_DIR) install
-       $(INSTALL_BIN) $(HOST_BUILD_DIR)/Parser/pgen $(STAGING_DIR_HOST)/bin/pgen3
-       $(INSTALL_BIN) $(HOST_BUILD_DIR)/Programs/_freeze_importlib $(STAGING_DIR_HOST)/bin/_freeze_importlib
+       $(INSTALL_BIN) $(HOST_BUILD_DIR)/Parser/pgen $(STAGING_DIR)/host/bin/pgen3
+       $(INSTALL_BIN) $(HOST_BUILD_DIR)/Programs/_freeze_importlib $(STAGING_DIR)/host/bin/_freeze_importlib
 endef
 
 $(eval $(call HostBuild))
index 4fd3191eb72f4f9b301461d868c3cd387a6bdd68..4ffb181757e6a6d02a39e0e9fd1f90cdfd495caf 100644 (file)
@@ -20,8 +20,8 @@ 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
+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):$(PKG_INSTALL_DIR)/$(PYTHON3_PKG_DIR)
 define HostPython3
index 3922dad16fc61b175f27a4b5a94dca738204518d..129a55a61f1f2f2758e48d66e482264799476478 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006-2015 OpenWrt.org
+# Copyright (C) 2006-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ruby
-PKG_VERSION:=2.2.4
+PKG_VERSION:=2.3.0
 PKG_RELEASE:=1
 
-PKG_LIBVER:=2.2
+PKG_LIBVER:=2.3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://cache.ruby-lang.org/pub/ruby/$(PKG_LIBVER)/
-PKG_MD5SUM:=c3d65f6d2ebe90dda81a37885ea244f5
+PKG_MD5SUM:=f0d9f9bbdc87372ca98988a571875819
 PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
 PKG_LICENSE:=BSD-2-Clause
 PKG_LICENSE_FILES:=COPYING
@@ -31,6 +31,69 @@ include $(INCLUDE_DIR)/host-build.mk
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/nls.mk
 
+HOST_CONFIGURE_ARGS += \
+       --disable-install-doc \
+       --disable-install-rdoc \
+       --disable-install-capi \
+       --without-gmp \
+       --with-out-ext=tk,tk/tkutil,win32,win32ole,dbm,gdbm,readline \
+
+# Does not compile with this. Workaround is --without-gmp
+# https://bugs.ruby-lang.org/issues/11940
+       #--with-static-linked-ext \
+
+# even not used, host build with restricted exts results in gems not being
+# compiled for target (probably some cross compiling problem like checking
+# host for selecting target features)
+#      --with-out-ext \
+#      --with-ext=thread,stringio \
+
+CONFIGURE_ARGS += \
+       --enable-shared \
+       --enable-static \
+       --disable-rpath \
+       $(call autoconf_bool,CONFIG_IPV6,ipv6) \
+       --disable-install-doc \
+       --disable-install-capi \
+       --with-ruby-version=minor \
+       --with-iconv-dir=$(ICONV_PREFIX) \
+       --with-out-ext=tk,tk/tkutil,win32,win32ole
+
+ifndef CONFIG_RUBY_DIGEST_USE_OPENSSL
+CONFIGURE_ARGS += \
+       --with-bundled-sha1\
+       --with-bundled-md5\
+       --with-bundled-rmd160\
+       --with-bundled-sha2 \
+
+endif
+
+TARGET_LDFLAGS += -L$(PKG_BUILD_DIR)
+
+# Ruby uses DLDFLAGS and not LDFLAGS for libraries. LDFLAGS is only for execs.
+# However, DLDFLAGS from configure is not passed to Makefile when target is linux.
+# XLDFLAGS is used by both libraries and execs. This is somehow brute force but
+# if will fix when some LD_FLAGS is needef for libraries. As side effect, it will
+# duplicate ld args for binaries.
+CONFIGURE_VARS += XLDFLAGS="$(TARGET_LDFLAGS)"
+
+MAKE_FLAGS += \
+       DESTDIR="$(PKG_INSTALL_DIR)" \
+       SHELL="/bin/bash"
+
+define Build/InstallDev
+       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
+               . \
+       ) | ( cd $(1); $(TAR) -xf - )
+endef
+
+define Host/Install
+       # When ruby version is updated, make install asks in some cases before replace
+       # an existing different file. Remove them before install and avoid the interaction
+       rm -f $(HOST_BUILD_PREFIX)/bin/rake
+       $(call Host/Install/Default)
+endef
+
 define Package/ruby/Default
   SUBMENU:=Ruby
   SECTION:=lang
@@ -57,6 +120,52 @@ define Package/ruby/description
 $(call Package/ruby/Default/description)
 endef
 
+define RubyDependency
+    $(eval \
+        $(call Package/Default)
+        $(call Package/ruby-$(1))
+        FILTER_CONFIG:=$$(strip \
+            $$(foreach config_dep, \
+                $$(filter @%, \
+                    $$(foreach v, \
+                        $$(DEPENDS), \
+                        $$(if $$(findstring :,$$v),,$$v) \
+                    ) \
+                ), \
+                $$(subst @,,$$(config_dep)) \
+            ) \
+        )
+        ifneq (,$$(FILTER_CONFIG))
+           FILTER_CONFIG:=($$(subst $$(space),&&,$$(FILTER_CONFIG))):
+        endif
+    ) \
+    +$(FILTER_CONFIG)ruby-$(1)
+endef
+
+define Package/ruby/config
+    comment "Standard Library"
+      depends on PACKAGE_ruby
+
+    config PACKAGE_ruby-stdlib
+      depends on PACKAGE_ruby
+      default m if ALL
+      prompt "Select Ruby Complete Standard Library (ruby-stdlib)"
+
+endef
+
+define Package/ruby/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
+       $(INSTALL_DIR) $(1)/usr/lib/ruby/vendor_ruby/$(PKG_LIBVER)
+       $(INSTALL_DIR) $(1)/usr/lib/ruby/site_ruby/$(PKG_LIBVER)
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ruby $(1)/usr/lib/ruby/ruby$(PKG_LIBVER)-bin
+       $(INSTALL_BIN) ./files/ruby $(1)/usr/bin/ruby
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/vendor_ruby/$(PKG_LIBVER)/* $(1)/usr/lib/ruby/vendor_ruby/$(PKG_LIBVER)/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/site_ruby/$(PKG_LIBVER)/* $(1)/usr/lib/ruby/site_ruby/$(PKG_LIBVER)/
+       $(SED) "s%@RUBY_LIBPATH@%/usr/lib/ruby/$(PKG_LIBVER)%" $(1)/usr/bin/ruby
+       $(SED) "s%@RUBY_BINPATH@%/usr/lib/ruby/ruby$(PKG_LIBVER)-bin%" $(1)/usr/bin/ruby
+endef
+
 define Package/libruby
 $(call Package/ruby/Default)
   SUBMENU:=
@@ -65,18 +174,17 @@ $(call Package/ruby/Default)
   TITLE+= (shared library)
   DEPENDS+= +libpthread +librt +libgmp
 endef
+define Package/libruby/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libruby.so.* $(1)/usr/lib/
+endef
 
+RUBY_STDLIB :=
 define Package/ruby-stdlib
 $(call Package/ruby/Default)
   TITLE:=Ruby standard libraries (metadata for all stdlib subsets)
-  DEPENDS:=ruby +ruby-misc +ruby-bigdecimal +ruby-cgi +ruby-csv +ruby-datetime +ruby-dbm +ruby-debuglib\
-                       +ruby-digest +ruby-drb +ruby-enc +ruby-enc-extra +ruby-erb +ruby-gdbm +ruby-gems \
-                       +ruby-json +ruby-io-console +ruby-irb +ruby-fiddle +ruby-filelib +ruby-logger +ruby-math \
-                       +ruby-minitest +ruby-mkmf +ruby-multithread +ruby-nkf +ruby-net +ruby-openssl +ruby-optparse \
-                       +ruby-patterns +ruby-powerassert +ruby-prettyprint +ruby-pstore +ruby-psych +ruby-racc +ruby-rake \
-                       +ruby-rbconfig +ruby-rdoc +ruby-readline +ruby-rexml +ruby-rinda +ruby-ripper +ruby-rss +ruby-sdbm \
-                       +ruby-shell +ruby-socket +ruby-testunit +ruby-unicodenormalize +ruby-uri +ruby-webrick +ruby-xmlrpc \
-                       +ruby-yaml +ruby-zlib
+  DEPENDS:=ruby $(foreach subpackage,$(RUBY_STDLIB),$(strip $(call RubyDependency,$(subpackage))))
+  HIDDEN:=1
 endef
 
 define Package/ruby-stdlib/description
@@ -85,53 +193,31 @@ define Package/ruby-stdlib/description
 
 endef
 
-define Package/ruby-bigdecimal
-$(call Package/ruby/Default)
-  TITLE:=Arbitrary-precision decimal floating-point lib for Ruby
-  DEPENDS:=ruby
-endef
-
-define Package/ruby-bigdecimal/description
- Provides bigdecimal* files
-endef
-
-define Package/ruby-cgi
-$(call Package/ruby/Default)
-  TITLE:=Ruby CGI support toolkit
-  DEPENDS:=ruby +ruby-filelib +ruby-pstore
-endef
-
-define Package/ruby-bigdecimal/description
- Provides bigdecimal* files
-
-endef
-
-define Package/ruby-csv
-$(call Package/ruby/Default)
-  TITLE+=CSV library
-  DEPENDS:=ruby +ruby-patterns +ruby-datetime +ruby-enc
+# nothing to do
+define Package/ruby-stdlib/install
+       /bin/true
 endef
 
-define Package/ruby-csv/description
- Provides csv.rb file
-
+define Package/ruby-bigdecimal/files
+/usr/lib/ruby/$(PKG_LIBVER)/*/bigdecimal.so
+/usr/lib/ruby/$(PKG_LIBVER)/bigdecimal/
+/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/bigdecimal-*.gemspec
 endef
 
-define Package/ruby-datetime
-$(call Package/ruby/Default)
-  TITLE+= date library
-  DEPENDS:=ruby
+define Package/ruby-cgi/files
+/usr/lib/ruby/$(PKG_LIBVER)/cgi
+/usr/lib/ruby/$(PKG_LIBVER)/cgi.rb
+/usr/lib/ruby/$(PKG_LIBVER)/*/cgi/escape.so
 endef
 
-define Package/ruby-datetime/description
- Provides date.rb and time.rb
-
+define Package/ruby-csv/files
+/usr/lib/ruby/$(PKG_LIBVER)/csv.rb
 endef
 
-define Package/ruby-dbm
-$(call Package/ruby/Default)
-  TITLE:=Ruby support for dbm
-  DEPENDS:=ruby +libdb47
+define Package/ruby-datetime/files
+/usr/lib/ruby/$(PKG_LIBVER)/time.rb
+/usr/lib/ruby/$(PKG_LIBVER)/date.rb
+/usr/lib/ruby/$(PKG_LIBVER)/*/date_core.so
 endef
 
 define Package/ruby-dbm/description
@@ -139,28 +225,29 @@ define Package/ruby-dbm/description
  This package provides dbm.so file.
 
 endef
-
-define Package/ruby-debuglib
-$(call Package/ruby/Default)
-  TITLE+= debug library
-  DEPENDS:=ruby +ruby-multithread +ruby-prettyprint
+define Package/ruby-dbm/files
+/usr/lib/ruby/$(PKG_LIBVER)/*/dbm.so
 endef
 
-define Package/ruby-debuglib/description
- Provides files for debugging:
- - benchmark.rb
- - debug.rb
- - objspace.so
- - profile.rb
- - profiler.rb
- - tracer.rb
-
+define Package/ruby-debuglib/files
+/usr/lib/ruby/$(PKG_LIBVER)/profile.rb
+/usr/lib/ruby/$(PKG_LIBVER)/profiler.rb
+/usr/lib/ruby/$(PKG_LIBVER)/debug.rb
+/usr/lib/ruby/$(PKG_LIBVER)/tracer.rb
+/usr/lib/ruby/$(PKG_LIBVER)/benchmark.rb
+/usr/lib/ruby/$(PKG_LIBVER)/*/objspace.so
 endef
 
-define Package/ruby-digest
-$(call Package/ruby/Default)
-  TITLE:=Ruby Digest Library
-  DEPENDS:=ruby +RUBY_DIGEST_USE_OPENSSL:libopenssl
+define Package/ruby-did-you-mean/files
+/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/did_you_mean-*.gemspec
+/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/did_you_mean-*/
+endef
+define Package/ruby-did-you-mean/files-excluded
+/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/did_you_mean-*/benchmark
+/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/did_you_mean-*/doc
+/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/did_you_mean-*/evaluation
+/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/did_you_mean-*/test
+/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/did_you_mean-*/*.md
 endef
 
 define Package/ruby-digest/description
@@ -168,7 +255,6 @@ define Package/ruby-digest/description
  bundled hash functions.
 
 endef
-
 define Package/ruby-digest/config
 
        config RUBY_DIGEST_USE_OPENSSL
@@ -182,1206 +268,482 @@ define Package/ruby-digest/config
                default n
 
 endef
-
-define Package/ruby-drb
-$(call Package/ruby/Default)
-  TITLE:=Ruby distributed object system
-  DEPENDS:=ruby +ruby-filelib +ruby-patterns +ruby-socket
-endef
-
-define Package/ruby-drb/description
- Provides drb* files
-
-endef
-
-define Package/ruby-enc
-$(call Package/ruby/Default)
-  TITLE:=Ruby character re-coding library charset (small subset)
-  DEPENDS:=ruby
-endef
-
-define Package/ruby-enc/description
- Provides ruby encoding library for encodings used directly by
- libraries in Ruby Standard Library:
- - enc/encdb.so
- - enc/euc_jp.so
- - enc/iso_8859_1.so
- - enc/utf_16be.so
- - enc/utf_16le.so
- - enc/utf_32be.so
- - enc/utf_32le.so
- FYI: ASCII-8BIT, UTF-7, UTF-8 and US-ASCII are already in Core.
-
-endef
-
-define Package/ruby-enc-extra
-$(call Package/ruby/Default)
-  TITLE:=Ruby character re-coding library charset (extra subset)
-  DEPENDS:=ruby +ruby-enc
-endef
-
-define Package/ruby-enc-extra/description
- Provides extra encodings not provided by ruby-enc:
- - enc/big5.so
- - enc/cp949.so
- - enc/emacs_mule.so
- - enc/euc_kr.so
- - enc/euc_tw.so
- - enc/gb18030.so
- - enc/gb2312.so
- - enc/gbk.so
- - enc/iso_8859_10.so
- - enc/iso_8859_11.so
- - enc/iso_8859_13.so
- - enc/iso_8859_14.so
- - enc/iso_8859_15.so
- - enc/iso_8859_16.so
- - enc/iso_8859_2.so
- - enc/iso_8859_3.so
- - enc/iso_8859_4.so
- - enc/iso_8859_5.so
- - enc/iso_8859_6.so
- - enc/iso_8859_7.so
- - enc/iso_8859_8.so
- - enc/iso_8859_9.so
- - enc/koi8_r.so
- - enc/koi8_u.so
- - enc/shift_jis.so
- - enc/trans/big5.so
- - enc/trans/chinese.so
- - enc/trans/emoji.so
- - enc/trans/emoji_iso2022_kddi.so
- - enc/trans/emoji_sjis_docomo.so
- - enc/trans/emoji_sjis_kddi.so
- - enc/trans/emoji_sjis_softbank.so
- - enc/trans/escape.so
- - enc/trans/gb18030.so
- - enc/trans/gbk.so
- - enc/trans/iso2022.so
- - enc/trans/japanese.so
- - enc/trans/japanese_euc.so
- - enc/trans/japanese_sjis.so
- - enc/trans/korean.so
- - enc/trans/single_byte.so
- - enc/trans/transdb.so
- - enc/trans/utf8_mac.so
- - enc/trans/utf_16_32.so
- - enc/windows_1251.so
- - enc/windows_31j.so
-
-endef
-
-define Package/ruby-erb
-$(call Package/ruby/Default)
-  TITLE+= (embedded interpreter)
-  DEPENDS:=ruby +ruby-cgi
-endef
-
-define Package/ruby-erb/description
- Provides erb* files
-
-endef
-
-define Package/ruby-fiddle
-$(call Package/ruby/Default)
-  TITLE:=A libffi wrapper for Ruby
-  DEPENDS:=ruby +libffi
-endef
-
-define Package/ruby-fiddle/description
- Provides fiddle* files
-
-endef
-
-define Package/ruby-filelib
-$(call Package/ruby/Default)
-  TITLE+= File utils library
-  DEPENDS:=ruby +ruby-enc +ruby-misc
-endef
-
-define Package/ruby-filelib/description
- Provides filesystem interaction files, including
- path and temp:
- - fileutils.rb
- - find.rb
- - pathname.rb
- - pathname.so
- - tempfile.rb
- - tmpdir.rb
-
-endef
-
-define Package/ruby-gdbm
-$(call Package/ruby/Default)
-  TITLE:=Ruby support for gdbm
-  DEPENDS:=ruby +libgdbm
-endef
-
-define Package/ruby-gdbm/description
- Provides gdbm* files
-
-endef
-
-define Package/ruby-gems
-$(call Package/ruby/Default)
-  TITLE:=Ruby gems packet management
-  DEPENDS:=ruby +ruby-net +ruby-rdoc
-endef
-
-define Package/ruby-gems/description
- Provides rubygems for gems usage, download and installation
-
-endef
-
-define Package/ruby-io-console
-$(call Package/ruby/Default)
-  TITLE+= Console interface
-  DEPENDS:=ruby
-endef
-
-define Package/ruby-io-console/description
- Provides io-console* files
-
-endef
-
-define Package/ruby-irb
-$(call Package/ruby/Default)
-  TITLE+= (interactive shell)
-  DEPENDS:=ruby +ruby-debuglib +ruby-filelib +ruby-math
+define Package/ruby-digest/files
+/usr/lib/ruby/$(PKG_LIBVER)/digest
+/usr/lib/ruby/$(PKG_LIBVER)/digest.rb
+/usr/lib/ruby/$(PKG_LIBVER)/*/digest.so
+/usr/lib/ruby/$(PKG_LIBVER)/*/digest/*
 endef
 
-define Package/ruby-irb/description
- Provides irb* files
-
-endef
-
-define Package/ruby-json
-$(call Package/ruby/Default)
-  TITLE:=Ruby support for JSON
-  DEPENDS:=ruby +ruby-datetime +ruby-misc
+define Package/ruby-drb/files
+/usr/lib/ruby/$(PKG_LIBVER)/drb.rb
+/usr/lib/ruby/$(PKG_LIBVER)/drb
 endef
 
-define Package/ruby-json/description
- Provides json* files
-
+define Package/ruby-enc/files
+/usr/lib/ruby/$(PKG_LIBVER)/*/enc/encdb.so
+/usr/lib/ruby/$(PKG_LIBVER)/*/enc/iso_8859_1.so
+/usr/lib/ruby/$(PKG_LIBVER)/*/enc/utf_*.so
+/usr/lib/ruby/$(PKG_LIBVER)/*/enc/euc_jp.so
 endef
 
-define Package/ruby-logger
-$(call Package/ruby/Default)
-  TITLE+= logger and syslog library
-  DEPENDS:=ruby +ruby-multithread
+define Package/ruby-enc-extra/files
+/usr/lib/ruby/$(PKG_LIBVER)/*/enc
 endef
-
-define Package/ruby-logger/description
- Provides log library, including syslog:
- - logger.rb
- - syslog.so
- - syslog/logger.rb
-
+define Package/ruby-enc-extra/files-excluded
+$(call Package/ruby-enc/files)
 endef
 
-define Package/ruby-math
-$(call Package/ruby/Default)
-  TITLE+= math library
-  DEPENDS:=ruby +ruby-patterns
+define Package/ruby-erb/files
+/usr/bin/erb
+/usr/lib/ruby/$(PKG_LIBVER)/erb.rb
 endef
 
-define Package/ruby-math/description
- Provides math related files:
- - cmath.rb
- - complex.rb
- - mathn.rb
- - mathn/complex.so
- - mathn/rational.so
- - matrix.rb
- - matrix/eigenvalue_decomposition.rb
- - matrix/lup_decomposition.rb
- - prime.rb
- - rational.rb
-
+define Package/ruby-fiddle/files
+/usr/lib/ruby/$(PKG_LIBVER)/fiddle.rb
+/usr/lib/ruby/$(PKG_LIBVER)/fiddle/
+/usr/lib/ruby/$(PKG_LIBVER)/*/fiddle.so
 endef
 
-define Package/ruby-minitest
-$(call Package/ruby/Default)
-  TITLE:=Gem minitest shipped with Ruby
-  DEPENDS:=ruby +ruby-gems
+define Package/ruby-filelib/files
+/usr/lib/ruby/$(PKG_LIBVER)/tmpdir.rb
+/usr/lib/ruby/$(PKG_LIBVER)/tempfile.rb
+/usr/lib/ruby/$(PKG_LIBVER)/pathname.rb
+/usr/lib/ruby/$(PKG_LIBVER)/*/pathname.so
+/usr/lib/ruby/$(PKG_LIBVER)/find.rb
+/usr/lib/ruby/$(PKG_LIBVER)/fileutils.rb
 endef
 
-define Package/ruby-minitest/description
- Provides minitest gem
-
+define Package/ruby-gdbm/files
+/usr/lib/ruby/$(PKG_LIBVER)/*/gdbm.so
 endef
 
-define Package/ruby-misc
-$(call Package/ruby/Default)
-  TITLE:=Ruby standard libraries subset (miscelaneous files)
-  DEPENDS:=ruby
-endef
-
-define Package/ruby-misc/description
- This package contains miscellaneous files from stdlib
- not splitted in other ruby packages like stringio:
- - English.rb
- - abbrev.rb
- - base64.rb
- - continuation.so
- - coverage.so
- - delegate.rb
- - e2mmap.rb
- - etc.so
- - expect.rb
- - fcntl.so
- - fiber.so
- - getoptlong.rb
- - open3.rb
- - ostruct.rb
- - pty.so
- - scanf.rb
- - securerandom.rb
- - set.rb
- - shellwords.rb
- - stringio.so
- - strscan.so
- - tsort.rb
- - weakref.rb
-
-endef
-
-define Package/ruby-mkmf
-$(call Package/ruby/Default)
-  TITLE+= makefile library
-  DEPENDS:=ruby +ruby-filelib +ruby-optparse +ruby-rbconfig
+define Package/ruby-gems/files
+/usr/lib/ruby/$(PKG_LIBVER)/ubygems.rb
+/usr/lib/ruby/$(PKG_LIBVER)/rubygems.rb
+/usr/lib/ruby/$(PKG_LIBVER)/rubygems
 endef
-
-define Package/ruby-mkmf/description
- Provides mkmf* files
-
+define Package/ruby-gems/files-excluded
+/usr/lib/ruby/$(PKG_LIBVER)/rubygems/test_case.rb
+/usr/lib/ruby/$(PKG_LIBVER)/rubygems/package/tar_test_case.rb
+/usr/lib/ruby/$(PKG_LIBVER)/rubygems/installer_test_case.rb
 endef
-
-define Package/ruby-multithread
-$(call Package/ruby/Default)
-  TITLE+= multithread library
-  DEPENDS:=ruby +ruby-misc
+define Package/ruby-gems/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gem $(1)/usr/bin/
+       $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default
+       $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems
+       $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/doc
+       $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/cache
+       $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/extensions
+       $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/build_info
+       $(call RubyBuildPackage/install,gems,$(1))
 endef
 
-define Package/ruby-multithread/description
- Provides files for multithread usage:
- - io/nonblock.so
- - io/wait.so
- - thread.so (FYI, Thread is a core class)
- - monitor.rb
- - mutex_m.rb
- - sync.rb
- - thwait.rb
- - timeout.rb
-
+define Package/ruby-io-console/files
+/usr/lib/ruby/$(PKG_LIBVER)/*/io/console.so
+/usr/lib/ruby/$(PKG_LIBVER)/io/console/
+/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/io-console-*.gemspec
 endef
 
-define Package/ruby-net
-$(call Package/ruby/Default)
-  TITLE:=Ruby Network Protocols Library
-  DEPENDS:=ruby +ruby-datetime +ruby-digest +ruby-filelib +ruby-uri
+define Package/ruby-irb/files
+/usr/lib/ruby/$(PKG_LIBVER)/irb
+/usr/lib/ruby/$(PKG_LIBVER)/irb.rb
 endef
-
-define Package/ruby-net/description
- Provides net* files
-
+define Package/ruby-irb/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/irb $(1)/usr/bin/
+       $(call RubyBuildPackage/install,irb,$(1))
 endef
 
-define Package/ruby-nkf
-$(call Package/ruby/Default)
-  TITLE:=Ruby Network Kanji Filter
-  DEPENDS:=ruby +ruby-enc
+define Package/ruby-json/files
+/usr/lib/ruby/$(PKG_LIBVER)/json.rb
+/usr/lib/ruby/$(PKG_LIBVER)/json
+/usr/lib/ruby/$(PKG_LIBVER)/*/json
+/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/json-*.gemspec
 endef
-
-define Package/ruby-nkf/description
- Provides nkf* files
-
+define Package/ruby-json/files-excluded
+$(call Package/ruby-psych/files)
 endef
 
-define Package/ruby-openssl
-$(call Package/ruby/Default)
-  TITLE:=Ruby support for openssl
-  DEPENDS:=ruby +ruby-enc +libopenssl +ruby-misc
+define Package/ruby-logger/files
+/usr/lib/ruby/$(PKG_LIBVER)/logger.rb
+/usr/lib/ruby/$(PKG_LIBVER)/syslog/logger.rb
+/usr/lib/ruby/$(PKG_LIBVER)/*/syslog.so
 endef
 
-define Package/ruby-openssl/description
- Provides openssl* files
-
+define Package/ruby-math/files
+/usr/lib/ruby/$(PKG_LIBVER)/prime.rb
+/usr/lib/ruby/$(PKG_LIBVER)/mathn.rb
+/usr/lib/ruby/$(PKG_LIBVER)/cmath.rb
+/usr/lib/ruby/$(PKG_LIBVER)/*/mathn
+/usr/lib/ruby/$(PKG_LIBVER)/matrix.rb
+/usr/lib/ruby/$(PKG_LIBVER)/matrix
 endef
 
-define Package/ruby-optparse
-$(call Package/ruby/Default)
-  TITLE:=Ruby command-line option analysis
-  DEPENDS:=ruby +ruby-misc
+define Package/ruby-minitest/files
+/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/minitest-*.gemspec
+/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/minitest-*
 endef
-
-define Package/ruby-optparse/description
- Provides optparse* files
-
+define Package/ruby-minitest/files-excluded
+/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/minitest-*/test
+/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/minitest-*/*.rdoc
+/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/minitest-*/*.txt
 endef
 
-define Package/ruby-patterns
-$(call Package/ruby/Default)
-  TITLE:=Ruby design patterns implementation
-  DEPENDS:=ruby +ruby-multithread
+define Package/ruby-misc/files
+/usr/lib/ruby/$(PKG_LIBVER)/English.rb
+/usr/lib/ruby/$(PKG_LIBVER)/abbrev.rb
+/usr/lib/ruby/$(PKG_LIBVER)/base64.rb
+/usr/lib/ruby/$(PKG_LIBVER)/delegate.rb
+/usr/lib/ruby/$(PKG_LIBVER)/e2mmap.rb
+/usr/lib/ruby/$(PKG_LIBVER)/expect.rb
+/usr/lib/ruby/$(PKG_LIBVER)/getoptlong.rb
+/usr/lib/ruby/$(PKG_LIBVER)/open3.rb
+/usr/lib/ruby/$(PKG_LIBVER)/ostruct.rb
+/usr/lib/ruby/$(PKG_LIBVER)/scanf.rb
+/usr/lib/ruby/$(PKG_LIBVER)/securerandom.rb
+/usr/lib/ruby/$(PKG_LIBVER)/set.rb
+/usr/lib/ruby/$(PKG_LIBVER)/shellwords.rb
+/usr/lib/ruby/$(PKG_LIBVER)/tsort.rb
+/usr/lib/ruby/$(PKG_LIBVER)/weakref.rb
+/usr/lib/ruby/$(PKG_LIBVER)/*/continuation.so
+/usr/lib/ruby/$(PKG_LIBVER)/*/coverage.so
+/usr/lib/ruby/$(PKG_LIBVER)/*/etc.so
+/usr/lib/ruby/$(PKG_LIBVER)/*/fcntl.so
+/usr/lib/ruby/$(PKG_LIBVER)/*/fiber.so
+/usr/lib/ruby/$(PKG_LIBVER)/*/pty.so
+/usr/lib/ruby/$(PKG_LIBVER)/*/stringio.so
+/usr/lib/ruby/$(PKG_LIBVER)/*/strscan.so
 endef
 
-define Package/ruby-patterns/description
- Provides design patterns helpers files:
- - forwardable.rb
- - observer.rb
- - singleton.rb
-
+define Package/ruby-mkmf/files
+/usr/lib/ruby/$(PKG_LIBVER)/mkmf.rb
+/usr/lib/ruby/$(PKG_LIBVER)/un.rb
 endef
 
-define Package/ruby-powerassert
-$(call Package/ruby/Default)
-  TITLE:=Gem power_assert shipped with Ruby
-  DEPENDS:=ruby +ruby-ripper
+define Package/ruby-multithread/files
+/usr/lib/ruby/$(PKG_LIBVER)/monitor.rb
+/usr/lib/ruby/$(PKG_LIBVER)/timeout.rb
+/usr/lib/ruby/$(PKG_LIBVER)/thwait.rb
+/usr/lib/ruby/$(PKG_LIBVER)/mutex_m.rb
+/usr/lib/ruby/$(PKG_LIBVER)/sync.rb
+/usr/lib/ruby/$(PKG_LIBVER)/*/thread.so
+/usr/lib/ruby/$(PKG_LIBVER)/*/io/wait.so
+/usr/lib/ruby/$(PKG_LIBVER)/*/io/nonblock.so
 endef
 
-define Package/ruby-powerassert/description
-  Power Assert gem for Ruby. Power Assert shows each value of variables
-  and method calls in the expression. It is useful for testing, providing
-  which value wasn't correct when the condition is not satisfied
-
+define Package/ruby-net/files
+/usr/lib/ruby/$(PKG_LIBVER)/open-uri.rb
+/usr/lib/ruby/$(PKG_LIBVER)/net/*
 endef
 
-define Package/ruby-prettyprint
-$(call Package/ruby/Default)
-  TITLE:=Ruby PrettyPrint librart
-  DEPENDS:=ruby +ruby-misc
+define Package/ruby-net-telnet/files
+/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/net-telnet-*.gemspec
+/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/net-telnet-*/
 endef
-
-define Package/ruby-prettyprint/description
- Provides Pretty Print library:
- - pp.rb
- - prettyprint.rb
-
+define Package/ruby-net-telnet/files-excluded
+/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/net-telnet-*/*.md
+/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/net-telnet-*/*.txt
 endef
 
-define Package/ruby-pstore
-$(call Package/ruby/Default)
-  TITLE+=file based persistence
-  DEPENDS:=ruby +ruby-digest +ruby-enc
+define Package/ruby-nkf/files
+/usr/lib/ruby/$(PKG_LIBVER)/kconv.rb
+/usr/lib/ruby/$(PKG_LIBVER)/*/nkf.so
 endef
 
-define Package/ruby-pstore/description
- Provides pstore.rb file
-
+define Package/ruby-openssl/files
+/usr/lib/ruby/$(PKG_LIBVER)/openssl
+/usr/lib/ruby/$(PKG_LIBVER)/openssl.rb
+/usr/lib/ruby/$(PKG_LIBVER)/*/openssl.so
 endef
 
-define Package/ruby-psych
-$(call Package/ruby/Default)
-  TITLE+=YAML parser and emitter
-  DEPENDS:=ruby +ruby-bigdecimal +ruby-datetime +ruby-misc +ruby-enc +libyaml
+define Package/ruby-optparse/files
+/usr/lib/ruby/$(PKG_LIBVER)/optparse.rb
+/usr/lib/ruby/$(PKG_LIBVER)/optionparser.rb
+/usr/lib/ruby/$(PKG_LIBVER)/optparse
 endef
 
-define Package/ruby-psych/description
- Provides psych* files
-
+define Package/ruby-patterns/files
+/usr/lib/ruby/$(PKG_LIBVER)/observer.rb
+/usr/lib/ruby/$(PKG_LIBVER)/singleton.rb
+/usr/lib/ruby/$(PKG_LIBVER)/forwardable.rb
 endef
 
-define Package/ruby-racc
-$(call Package/ruby/Default)
-  TITLE:=LALR parser generator in Ruby
-  DEPENDS:=ruby
+define Package/ruby-powerassert/files
+/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/power_assert-*.gemspec
+/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/power_assert-*
 endef
-
-define Package/ruby-racc/description
- Provides racc* files
-
+define Package/ruby-powerassert/files-excluded
+/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/power_assert-*/test
 endef
 
-define Package/ruby-rake
-$(call Package/ruby/Default)
-  TITLE+=Ruby Rake (make replacement)
-  DEPENDS:=ruby +ruby-datetime +ruby-filelib +ruby-optparse +ruby-patterns +ruby-rbconfig
+define Package/ruby-prettyprint/files
+/usr/lib/ruby/$(PKG_LIBVER)/pp.rb
+/usr/lib/ruby/$(PKG_LIBVER)/prettyprint.rb
 endef
 
-define Package/ruby-rake/description
- Provides rake* files
-
+define Package/ruby-pstore/files
+/usr/lib/ruby/$(PKG_LIBVER)/pstore.rb
 endef
 
-define Package/ruby-rbconfig
-$(call Package/ruby/Default)
-  TITLE+=Ruby RbConfig
-  DEPENDS:=ruby
+define Package/ruby-psych/files
+/usr/lib/ruby/$(PKG_LIBVER)/psych
+/usr/lib/ruby/$(PKG_LIBVER)/psych.rb
+/usr/lib/ruby/$(PKG_LIBVER)/psych_jars.rb
+/usr/lib/ruby/$(PKG_LIBVER)/*/psych.so
+/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/psych-*.gemspec
 endef
 
-define Package/ruby-rbconfig/description
- Provides rbconfig file
-
+define Package/ruby-racc/files
+/usr/lib/ruby/$(PKG_LIBVER)/racc
+/usr/lib/ruby/$(PKG_LIBVER)/*/racc/*.so
 endef
 
-define Package/ruby-rdoc
-$(call Package/ruby/Default)
-  TITLE+= (documentation generator)
-  DEPENDS:=ruby +ruby-erb +ruby-irb +ruby-json +ruby-racc +ruby-rake +ruby-yaml +ruby-zlib
+define Package/ruby-rake/files
+/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/rake-*.gemspec
+/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/rake-*/
 endef
-
-define Package/ruby-rdoc/description
- Provides rdoc* and ri files
-
+define Package/ruby-rake/files-excluded
+/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/rake-*/doc
+/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/rake-*/test
+/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/rake-*/*.rdoc
+/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/rake-*/*.txt
+/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/rake-10.4.2/lib/rake/runtest.rb
 endef
-
-define Package/ruby-readline
-$(call Package/ruby/Default)
-  TITLE:=Ruby support for readline
-  DEPENDS:=ruby +libncurses +libreadline
+define Package/ruby-rake/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rake $(1)/usr/bin/;
+       $(call RubyBuildPackage/install,rake,$(1))
 endef
 
-define Package/ruby-readline/description
- Provides readline* files
-
+define Package/ruby-rbconfig/files
+/usr/lib/ruby/$(PKG_LIBVER)/*/rbconfig.rb
+/usr/lib/ruby/$(PKG_LIBVER)/rbconfig/*
+/usr/lib/ruby/$(PKG_LIBVER)/*/rbconfig/*.so
 endef
 
-define Package/ruby-rexml
-$(call Package/ruby/Default)
-  TITLE:=Ruby XML toolkit
-  DEPENDS:=ruby +ruby-patterns +ruby-enc
+define Package/ruby-rdoc/files
+       /usr/lib/ruby/$(PKG_LIBVER)/rdoc.rb
+       /usr/lib/ruby/$(PKG_LIBVER)/rdoc
+       /usr/lib/ruby/gems/$(PKG_LIBVER)/gems/rdoc-*
+       /usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/rdoc-*.gemspec
 endef
-
-define Package/ruby-rexml/description
- Provides rexml* files
-
+define Package/ruby-rdoc/files-excluded
+       /usr/lib/ruby/$(PKG_LIBVER)/rdoc/test_case.rb
+       /usr/lib/ruby/$(PKG_LIBVER)/rdoc/markup/formatter_test_case.rb
+       /usr/lib/ruby/$(PKG_LIBVER)/rdoc/markup/text_formatter_test_case.rb
 endef
-
-define Package/ruby-rinda
-$(call Package/ruby/Default)
-  TITLE:=Ruby Linda paradigm implementation
-  DEPENDS:=ruby +ruby-drb
+define Package/ruby-rdoc/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rdoc $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ri $(1)/usr/bin/
+       $(call RubyBuildPackage/install,rdoc,$(1))
 endef
 
-define Package/ruby-rinda/description
- Provides rinda* files
-
+define Package/ruby-readline/files
+/usr/lib/ruby/$(PKG_LIBVER)/*/readline.so
 endef
 
-define Package/ruby-ripper
-$(call Package/ruby/Default)
-  TITLE:=Ruby script parser
-  DEPENDS:=ruby
+define Package/ruby-rexml/files
+/usr/lib/ruby/$(PKG_LIBVER)/rexml
 endef
 
-define Package/ruby-ripper/description
- Provides ripper* files
-
+define Package/ruby-rinda/files
+/usr/lib/ruby/$(PKG_LIBVER)/rinda
 endef
 
-define Package/ruby-rss
-$(call Package/ruby/Default)
-  TITLE:=Ruby RSS toolkit
-  DEPENDS:=ruby +ruby-net +ruby-nkf +ruby-rexml
+define Package/ruby-ripper/files
+/usr/lib/ruby/$(PKG_LIBVER)/ripper.rb
+/usr/lib/ruby/$(PKG_LIBVER)/ripper
+/usr/lib/ruby/$(PKG_LIBVER)/*/ripper.so
 endef
 
-define Package/ruby-rss/description
- Provides rss* files
-
+define Package/ruby-rss/files
+/usr/lib/ruby/$(PKG_LIBVER)/rss
+/usr/lib/ruby/$(PKG_LIBVER)/rss.rb
 endef
 
-define Package/ruby-sdbm
-$(call Package/ruby/Default)
-  TITLE:=Ruby simple file-based key-value dbm implementation
-  DEPENDS:=ruby
+define Package/ruby-sdbm/files
+/usr/lib/ruby/$(PKG_LIBVER)/*/sdbm.so
 endef
 
-define Package/ruby-sdbm/description
- Provides sdbm* files
-
+define Package/ruby-shell/files
+/usr/lib/ruby/$(PKG_LIBVER)/shell.rb
+/usr/lib/ruby/$(PKG_LIBVER)/shell
 endef
 
-define Package/ruby-shell
-$(call Package/ruby/Default)
-  TITLE:=Ruby idiomatic Ruby interface
-  DEPENDS:=ruby +ruby-patterns
+define Package/ruby-socket/files
+/usr/lib/ruby/$(PKG_LIBVER)/ipaddr.rb
+/usr/lib/ruby/$(PKG_LIBVER)/resolv-replace.rb
+/usr/lib/ruby/$(PKG_LIBVER)/resolv.rb
+/usr/lib/ruby/$(PKG_LIBVER)/socket.rb
+/usr/lib/ruby/$(PKG_LIBVER)/*/socket.so
 endef
 
-define Package/ruby-shell/description
- Provides shell* files
-
+define Package/ruby-testunit/files
+/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/test-unit-*.gemspec
+/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/test-unit-*
 endef
-
-define Package/ruby-socket
-$(call Package/ruby/Default)
-  TITLE+= socket support
-  DEPENDS:=ruby +ruby-multithread
+define Package/ruby-testunit/files-excluded
+/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/test-unit-*/doc
+/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/test-unit-*/test
+/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/test-unit-*/sample
+/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/test-unit-*/*.md
 endef
 
-define Package/ruby-socket/description
- Provides socket-related files:
- - gserver.rb
- - ipaddr.rb
- - resolv-replace.rb
- - resolv.rb
- - socket.rb
- - socket.so
-
+define Package/ruby-unicodenormalize/files
+/usr/lib/ruby/$(PKG_LIBVER)/unicode_normalize.rb
+/usr/lib/ruby/$(PKG_LIBVER)/unicode_normalize
 endef
 
-define Package/ruby-testunit
-$(call Package/ruby/Default)
-  TITLE:=Gem test-unit shipped with Ruby
-  DEPENDS:=ruby +ruby-csv +ruby-erb +ruby-optparse +ruby-powerassert +ruby-prettyprint +ruby-rexml +ruby-yaml
+define Package/ruby-uri/files
+/usr/lib/ruby/$(PKG_LIBVER)/uri.rb
+/usr/lib/ruby/$(PKG_LIBVER)/uri
 endef
 
-define Package/ruby-testunit/description
- Provides test/unit* files
-
+define Package/ruby-webrick/files
+/usr/lib/ruby/$(PKG_LIBVER)/webrick
+/usr/lib/ruby/$(PKG_LIBVER)/webrick.rb
 endef
 
-define Package/ruby-unicodenormalize
-$(call Package/ruby/Default)
-  TITLE:=Ruby String additions for Unicode normalization
-  DEPENDS:=ruby +ruby-enc +ruby-enc-extra
+define Package/ruby-xmlrpc/files
+/usr/lib/ruby/$(PKG_LIBVER)/xmlrpc
+/usr/lib/ruby/$(PKG_LIBVER)/xmlrpc.rb
 endef
 
-define Package/ruby-unicodenormalize/description
-  Additions to class String for Unicode normalization
-
+define Package/ruby-yaml/files
+/usr/lib/ruby/$(PKG_LIBVER)/yaml
+/usr/lib/ruby/$(PKG_LIBVER)/yaml.rb
 endef
 
-define Package/ruby-uri
-$(call Package/ruby/Default)
-  TITLE:=Ruby library to handle URI
-  DEPENDS:=ruby +ruby-socket +ruby-enc
+define Package/ruby-zlib/files
+/usr/lib/ruby/$(PKG_LIBVER)/*/zlib.so
 endef
 
-define Package/ruby-uri/description
- Provides uri* files
+RUBY_FILES = $(strip $(call Package/ruby-$(1)/files))
+RUBY_FILES_EXCLUDED = $(strip $(call Package/ruby-$(1)/files-excluded))
 
+# 1: short name
+# 2: install dir
+define RubyBuildPackage/install
+       ( \
+         cd $(PKG_INSTALL_DIR) && \
+         $(TAR) -cf - \
+           --files-from <(ls -1d $(patsubst /%,%,$(RUBY_FILES))) \
+           $(if $(RUBY_FILES_EXCLUDED),--exclude-from <(ls -1d $(patsubst /%,%,$(RUBY_FILES_EXCLUDED)))) \
+       ) | ( \
+         [ -n "$(2)" ] && cd $(2) && $(TAR) -xf - \
+       )
 endef
 
-define Package/ruby-webrick
-$(call Package/ruby/Default)
-  TITLE:=Ruby Web server toolkit
-  DEPENDS:=ruby +ruby-erb +ruby-net +ruby-patterns +ruby-rbconfig
-endef
+# 1: short name
+# 2: description
+# 3: dependencies on other packages
+define RubyBuildPackage
+  RUBY_STDLIB += $(1)
 
-define Package/ruby-webrick/description
- Provides webrick* files
+  # Package definition
+  ifndef Package/ruby-$(1)
+    define Package/ruby-$(1)
+      $(call Package/ruby/Default)
+      TITLE:=Ruby $(2)
+      DEPENDS:=ruby $(3)
+    endef
+  endif
 
-endef
+  ifndef Package/ruby-$(1)/description
+    define Package/ruby-$(1)/description
+      This package contains the ruby $(2).
 
-define Package/ruby-xmlrpc
-$(call Package/ruby/Default)
-  TITLE:=Ruby XML-RPC toolkit
-  DEPENDS:=ruby +ruby-rexml +ruby-webrick
-endef
+    endef
+  endif
 
-define Package/ruby-xmlrpc/description
- Provides xmlrpc* files
+  # Description
+  ifndef Package/ruby-$(1)/install
+    ifndef Package/ruby-$(1)/files
+       $$(error It must exists either a Package/ruby-$(1)/install or Package/ruby-$(1)/files)
+    endif
 
-endef
+    define Package/ruby-$(1)/description +=
 
-define Package/ruby-yaml
-$(call Package/ruby/Default)
-  TITLE:=Ruby YAML toolkit
-  DEPENDS:=ruby +ruby-dbm +ruby-pstore +ruby-psych
-endef
+Provides:
+$(patsubst /%,
+ - /%,$(RUBY_FILES))
 
-define Package/ruby-yaml/description
- Provides yaml* files
+    endef
 
-endef
+    ifneq ($(RUBY_FILES_EXCLUDED),)
+      define Package/ruby-$(1)/description +=
 
-define Package/ruby-zlib
-$(call Package/ruby/Default)
-  TITLE:=Ruby support for zlib
-  DEPENDS:=ruby +zlib
-endef
+Except:
+$(patsubst /%,
+ - /%,$(RUBY_FILES_EXCLUDED))
 
-define Package/ruby-zlib/description
- Provides zlib* files
+      endef
+    endif
 
-endef
+    Package/ruby-$(1)/install=$(call RubyBuildPackage/install,$(1),$$(1))
+  endif
 
-HOST_CONFIGURE_ARGS += \
-       --disable-install-doc \
-       --disable-install-rdoc \
-       --disable-install-capi \
-       --with-static-linked-ext \
-       --with-out-ext=tk,tk/tkutil,win32,win32ole,dbm,gdbm,readline \
-
-# even not used, host build with restricted exts results in gems not being
-# compiling for target (probably some cross compiling problem like checking
-# host for selecting target features)
-#      --with-out-ext \
-#      --with-ext=thread,stringio \
-
-CONFIGURE_ARGS += \
-       --enable-shared \
-       --enable-static \
-       --disable-rpath \
-       $(call autoconf_bool,CONFIG_IPV6,ipv6) \
-       --disable-install-doc \
-       --disable-install-capi \
-       --with-ruby-version=minor \
-       --with-iconv-dir=$(ICONV_PREFIX) \
-       --with-out-ext=tk,tk/tkutil,win32,win32ole
-
-ifndef CONFIG_RUBY_DIGEST_USE_OPENSSL
-CONFIGURE_ARGS += \
-       --with-bundled-sha1\
-       --with-bundled-md5\
-       --with-bundled-rmd160\
-       --with-bundled-sha2 \
-
-endif
-
-TARGET_LDFLAGS += -L$(PKG_BUILD_DIR)
-
-# Ruby uses DLDFLAGS and not LDFLAGS for libraries. LDFLAGS is only for execs.
-# However, DLDFLAGS from configure is not passed to Makefile when target is linux.
-# XLDFLAGS is used by both libraries and execs. This is somehow brute force but
-# if will fix when some LD_FLAGS is needef for libraries. As side effect, it will
-# duplicate ld args for binaries.
-CONFIGURE_VARS += XLDFLAGS="$(TARGET_LDFLAGS)"
-
-MAKE_FLAGS += \
-       DESTDIR="$(PKG_INSTALL_DIR)" \
-       SHELL="/bin/bash"
-
-define Package/ruby/install
-       $(INSTALL_DIR) $(1)/usr/bin
-       $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
-       $(INSTALL_DIR) $(1)/usr/lib/ruby/vendor_ruby/$(PKG_LIBVER)
-       $(INSTALL_DIR) $(1)/usr/lib/ruby/site_ruby/$(PKG_LIBVER)
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ruby $(1)/usr/lib/ruby/ruby$(PKG_LIBVER)-bin
-       $(INSTALL_BIN) ./files/ruby $(1)/usr/bin/ruby
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/vendor_ruby/$(PKG_LIBVER)/* $(1)/usr/lib/ruby/vendor_ruby/$(PKG_LIBVER)/
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/site_ruby/$(PKG_LIBVER)/* $(1)/usr/lib/ruby/site_ruby/$(PKG_LIBVER)/
-       sed -i -e "s%@RUBY_LIBPATH@%/usr/lib/ruby/$(PKG_LIBVER)%" $(1)/usr/bin/ruby
-       sed -i -e "s%@RUBY_BINPATH@%/usr/lib/ruby/ruby$(PKG_LIBVER)-bin%" $(1)/usr/bin/ruby
-endef
-
-define Package/libruby/install
-       $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libruby.so.* $(1)/usr/lib/
-endef
-
-define Package/ruby-stdlib/install
-       # nothing to do
-endef
-
-define Package/ruby-bigdecimal/install
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/*/bigdecimal.so \
-               usr/lib/ruby/$(PKG_LIBVER)/bigdecimal/ \
-               usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/bigdecimal-*.gemspec \
-       ) | ( cd $(1); $(TAR) -xf - )
-endef
-
-define Package/ruby-cgi/install
-       $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/cgi $(1)/usr/lib/ruby/$(PKG_LIBVER)/
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/cgi.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
-endef
-
-define Package/ruby-csv/install
-       $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/csv.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
-endef
-
-define Package/ruby-datetime/install
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/time.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/date.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/*/date_core.so \
-       ) | ( cd $(1); $(TAR) -xf - )
-endef
-
-define Package/ruby-dbm/install
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/*/dbm.so \
-       ) | ( cd $(1); $(TAR) -xf - )
-endef
-
-define Package/ruby-debuglib/install
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/profile.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/profiler.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/debug.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/tracer.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/benchmark.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/*/objspace.so \
-       ) | ( cd $(1); $(TAR) -xf - )
-endef
-
-define Package/ruby-digest/install
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/digest \
-               usr/lib/ruby/$(PKG_LIBVER)/digest.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/*/digest.so \
-               usr/lib/ruby/$(PKG_LIBVER)/*/digest/* \
-       ) | ( cd $(1); $(TAR) -xf - )
-endef
-
-define Package/ruby-drb/install
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/drb.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/drb \
-       ) | ( cd $(1); $(TAR) -xf - )
-endef
-
-define Package/ruby-enc/install
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/*/enc/encdb.so \
-               usr/lib/ruby/$(PKG_LIBVER)/*/enc/iso_8859_1.so \
-               usr/lib/ruby/$(PKG_LIBVER)/*/enc/utf_* \
-               usr/lib/ruby/$(PKG_LIBVER)/*/enc/euc_jp.so \
-       ) | ( cd $(1); $(TAR) -xf - )
-endef
-
-define Package/ruby-enc-extra/install
-       ( cd $(PKG_INSTALL_DIR); $(TAR) \
-               --exclude=usr/lib/ruby/$(PKG_LIBVER)/*/enc/encdb.so \
-               --exclude=usr/lib/ruby/$(PKG_LIBVER)/*/enc/iso_8859_1.so \
-               --exclude=usr/lib/ruby/$(PKG_LIBVER)/*/enc/utf_* \
-               --exclude=usr/lib/ruby/$(PKG_LIBVER)/*/enc/euc_jp.so \
-               -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/*/enc \
-       ) | ( cd $(1); $(TAR) -xf - )
-endef
-
-define Package/ruby-erb/install
-       $(INSTALL_DIR) $(1)/usr/bin
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/erb $(1)/usr/bin/
-       $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)/
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/erb.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
-endef
-
-define Package/ruby-fiddle/install
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/fiddle.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/fiddle/ \
-               usr/lib/ruby/$(PKG_LIBVER)/*/fiddle.so \
-       ) | ( cd $(1); $(TAR) -xf - )
-endef
-
-define Package/ruby-filelib/install
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/tmpdir.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/tempfile.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/pathname.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/*/pathname.so \
-               usr/lib/ruby/$(PKG_LIBVER)/find.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/fileutils.rb \
-       ) | ( cd $(1); $(TAR) -xf - )
-endef
-
-define Package/ruby-gdbm/install
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/*/gdbm.so \
-       ) | ( cd $(1); $(TAR) -xf - )
-endef
-
-define Package/ruby-gems/install
-       $(INSTALL_DIR) $(1)/usr/bin
-       $(CP) $(PKG_INSTALL_DIR)/usr/bin/gem $(1)/usr/bin/
-       $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/ubygems.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rubygems.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
-       # Remove tests (avoids extra deps)
-       $(RM) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rubygems/test_case.rb
-       $(RM) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rubygems/package/tar_test_case.rb
-       $(RM) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rubygems/installer_test_case.rb
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rubygems $(1)/usr/lib/ruby/$(PKG_LIBVER)/
-       $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default
-       $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems
-       $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/doc
-       $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/cache
-       $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/extensions
-       $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/build_info
-endef
-
-define Package/ruby-io-console/install
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/*/io/console.so \
-               usr/lib/ruby/$(PKG_LIBVER)/io/console/ \
-               usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/io-console-*.gemspec \
-       ) | ( cd $(1); $(TAR) -xf - )
-endef
-
-define Package/ruby-irb/install
-       $(INSTALL_DIR) $(1)/usr/bin
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/irb $(1)/usr/bin/
-       $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/irb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/irb.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
-endef
-
-define Package/ruby-json/install
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/json.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/json \
-               usr/lib/ruby/$(PKG_LIBVER)/*/json \
-               usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/json-*.gemspec \
-       ) | ( cd $(1); $(TAR) -xf - )
-       rm -rf \
-               $(1)/usr/lib/ruby/$(PKG_LIBVER)/psych/json
-endef
-
-define Package/ruby-logger/install
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/logger.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/syslog/logger.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/*/syslog.so \
-       ) | ( cd $(1); $(TAR) -xf - )
-endef
-
-define Package/ruby-math/install
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/prime.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/mathn.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/cmath.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/*/mathn \
-               usr/lib/ruby/$(PKG_LIBVER)/matrix.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/matrix \
-       ) | ( cd $(1); $(TAR) -xf - )
-endef
-
-define Package/ruby-minitest/install
-       $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications
-       $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/minitest-*.gemspec $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/
-       # Remove tests (avoids extra deps)
-       $(RM) -rf $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/minitest-*/test
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/minitest-* $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/
-endef
-
-define Package/ruby-misc/install
-       $(INSTALL_DIR) $(1)/usr/lib
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/English.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/abbrev.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/base64.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/delegate.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/e2mmap.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/expect.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/getoptlong.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/open3.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/ostruct.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/scanf.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/securerandom.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/set.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/shellwords.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/tsort.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/weakref.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/*/continuation.so \
-               usr/lib/ruby/$(PKG_LIBVER)/*/coverage.so \
-               usr/lib/ruby/$(PKG_LIBVER)/*/etc.so \
-               usr/lib/ruby/$(PKG_LIBVER)/*/fcntl.so \
-               usr/lib/ruby/$(PKG_LIBVER)/*/fiber.so \
-               usr/lib/ruby/$(PKG_LIBVER)/*/pty.so \
-               usr/lib/ruby/$(PKG_LIBVER)/*/stringio.so \
-               usr/lib/ruby/$(PKG_LIBVER)/*/strscan.so \
-       ) | ( cd $(1); $(TAR) -xf - )
-endef
-
-
-
-define Package/ruby-mkmf/install
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/mkmf.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/un.rb \
-       ) | ( cd $(1); $(TAR) -xf - )
-endef
-
-define Package/ruby-multithread/install
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/monitor.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/timeout.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/thwait.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/mutex_m.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/sync.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/*/thread.so \
-               usr/lib/ruby/$(PKG_LIBVER)/*/io/wait.so \
-               usr/lib/ruby/$(PKG_LIBVER)/*/io/nonblock.so \
-       ) | ( cd $(1); $(TAR) -xf - )
-endef
-
-define Package/ruby-net/install
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/open-uri.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/net/* \
-       ) | ( cd $(1); $(TAR) -xf - )
-endef
-
-define Package/ruby-nkf/install
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/kconv.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/*/nkf.so \
-       ) | ( cd $(1); $(TAR) -xf - )
-endef
-
-define Package/ruby-openssl/install
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/openssl \
-               usr/lib/ruby/$(PKG_LIBVER)/openssl.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/*/openssl.so \
-       ) | ( cd $(1); $(TAR) -xf - )
-endef
-
-define Package/ruby-optparse/install
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/optparse.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/optionparser.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/optparse \
-       ) | ( cd $(1); $(TAR) -xf - )
-endef
-
-define Package/ruby-patterns/install
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/observer.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/singleton.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/forwardable.rb \
-       ) | ( cd $(1); $(TAR) -xf - )
-endef
-
-define Package/ruby-powerassert/install
-       $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications
-       $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/power_assert-*.gemspec $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/
-       # Remove tests (avoids extra deps)
-       $(RM) -rf $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/power_assert-*/test
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/power_assert-* $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/
-endef
-
-define Package/ruby-prettyprint/install
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/pp.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/prettyprint.rb \
-       ) | ( cd $(1); $(TAR) -xf - )
-endef
-
-define Package/ruby-pstore/install
-       $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/pstore.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
-endef
-
-define Package/ruby-psych/install
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/psych \
-               usr/lib/ruby/$(PKG_LIBVER)/psych.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/*/psych.so \
-               usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/psych-*.gemspec \
-       ) | ( cd $(1); $(TAR) -xf - )
-endef
-
-define Package/ruby-racc/install
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/racc \
-               usr/lib/ruby/$(PKG_LIBVER)/*/racc/*.so \
-       ) | ( cd $(1); $(TAR) -xf - )
-endef
-
-define Package/ruby-rake/install
-       $(INSTALL_DIR) $(1)/usr/bin
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rake $(1)/usr/bin/
-       $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rake.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
-       # Remove tests (avoids extra deps)
-       $(RM) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rake/runtest.rb
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rake $(1)/usr/lib/ruby/$(PKG_LIBVER)/
-       $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default
-       $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/rake-*.gemspec \
-               $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/rake-* $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/
-endef
-
-define Package/ruby-rbconfig/install
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/*/rbconfig.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/rbconfig/* \
-               usr/lib/ruby/$(PKG_LIBVER)/*/rbconfig/*.so \
-       ) | ( cd $(1); $(TAR) -xf - )
-endef
-
-define Package/ruby-rdoc/install
-       $(INSTALL_DIR) $(1)/usr/bin
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rdoc $(1)/usr/bin/
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ri $(1)/usr/bin/
-       $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
-       # Remove tests (avoids extra deps)
-       $(RM) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rdoc/test_case.rb
-       $(RM) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rdoc/markup/formatter_test_case.rb
-       $(RM) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rdoc/markup/text_formatter_test_case.rb
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rdoc.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rdoc $(1)/usr/lib/ruby/$(PKG_LIBVER)/
-       $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default
-       $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/rdoc-*.gemspec \
-               $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/rdoc-* \
-               $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/
-endef
-
-define Package/ruby-readline/install
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/*/readline.so \
-       ) | ( cd $(1); $(TAR) -xf - )
-endef
-
-define Package/ruby-rexml/install
-       $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rexml $(1)/usr/lib/ruby/$(PKG_LIBVER)/
-endef
-
-define Package/ruby-rinda/install
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/rinda \
-       ) | ( cd $(1); $(TAR) -xf - )
-endef
-
-define Package/ruby-ripper/install
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/ripper.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/ripper \
-               usr/lib/ruby/$(PKG_LIBVER)/*/ripper.so \
-       ) | ( cd $(1); $(TAR) -xf - )
-endef
-
-define Package/ruby-rss/install
-       $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rss $(1)/usr/lib/ruby/$(PKG_LIBVER)/
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rss.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
-endef
-
-define Package/ruby-sdbm/install
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/*/sdbm.so \
-       ) | ( cd $(1); $(TAR) -xf - )
-endef
-
-define Package/ruby-shell/install
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/shell.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/shell \
-       ) | ( cd $(1); $(TAR) -xf - )
-endef
-
-define Package/ruby-socket/install
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/ipaddr.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/resolv-replace.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/resolv.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/socket.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/*/socket.so \
-       ) | ( cd $(1); $(TAR) -xf - )
-endef
-
-define Package/ruby-testunit/install
-       $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications
-       $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/test-unit-*.gemspec $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/
-       # Remove tests (avoids extra deps)
-       $(RM) -rf $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/test-unit-*/test
-       $(RM) -rf $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/test-unit-*/sample
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/test-unit-* $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/
-endef
-
-define Package/ruby-unicodenormalize/install
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/unicode_normalize.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/unicode_normalize \
-       ) | ( cd $(1); $(TAR) -xf - )
-endef
-
-define Package/ruby-uri/install
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/uri.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/uri \
-       ) | ( cd $(1); $(TAR) -xf - )
-endef
-
-define Package/ruby-webrick/install
-       $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/webrick $(1)/usr/lib/ruby/$(PKG_LIBVER)/
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/webrick.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
-endef
-
-define Package/ruby-xmlrpc/install
-       $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/xmlrpc $(1)/usr/lib/ruby/$(PKG_LIBVER)/
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/xmlrpc.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
-endef
-
-define Package/ruby-yaml/install
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/yaml \
-               usr/lib/ruby/$(PKG_LIBVER)/yaml.rb \
-       ) | ( cd $(1); $(TAR) -xf - )
-endef
-
-define Package/ruby-zlib/install
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/*/zlib.so \
-       ) | ( cd $(1); $(TAR) -xf - )
-endef
-
-define Build/InstallDev
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               . \
-       ) | ( cd $(1); $(TAR) -xf - )
+  $$(eval $$(call BuildPackage,ruby-$(1)))
 endef
 
 $(eval $(call BuildPackage,ruby))
 $(eval $(call BuildPackage,libruby))
+$(eval $(call RubyBuildPackage,bigdecimal,Arbitrary-precision decimal floating-point library,))
+$(eval $(call RubyBuildPackage,cgi,CGI support toolkit,+ruby-filelib +ruby-pstore))
+$(eval $(call RubyBuildPackage,csv,CSV library,+ruby-patterns +ruby-datetime +ruby-enc))
+$(eval $(call RubyBuildPackage,datetime,date library))
+$(eval $(call RubyBuildPackage,dbm,support for dbm,+libdb47))
+$(eval $(call RubyBuildPackage,debuglib,debug library,+ruby-multithread +ruby-prettyprint))
+$(eval $(call RubyBuildPackage,did-you-mean,did you mean? experience,+ruby-misc))
+$(eval $(call RubyBuildPackage,digest,Digest Library,+RUBY_DIGEST_USE_OPENSSL:libopenssl))
+$(eval $(call RubyBuildPackage,drb,distributed object system,+ruby-filelib +ruby-patterns +ruby-socket))
+$(eval $(call RubyBuildPackage,enc,character re-coding library charset (small subset),))
+$(eval $(call RubyBuildPackage,enc-extra,character re-coding library charset (extra subset),+ruby-enc))
+$(eval $(call RubyBuildPackage,erb,(embedded interpreter),+ruby-cgi))
+$(eval $(call RubyBuildPackage,fiddle,libffi wrapper,+libffi))
+$(eval $(call RubyBuildPackage,filelib,file utils library,+ruby-enc +ruby-misc))
+$(eval $(call RubyBuildPackage,gdbm,support for gdbm,+libgdbm))
+$(eval $(call RubyBuildPackage,gems,gems packet management,+ruby-net +ruby-rdoc))
+$(eval $(call RubyBuildPackage,io-console,Console interface,))
+$(eval $(call RubyBuildPackage,irb,(interactive shell),+ruby-debuglib +ruby-filelib +ruby-math))
+$(eval $(call RubyBuildPackage,json,support for JSON,+ruby-datetime +ruby-misc))
+$(eval $(call RubyBuildPackage,logger,logger and syslog library,+ruby-multithread))
+$(eval $(call RubyBuildPackage,math,math library,+ruby-patterns))
+$(eval $(call RubyBuildPackage,minitest,Gem minitest,+ruby-gems))
+$(eval $(call RubyBuildPackage,misc,standard libraries subset (miscellaneous files),))
+$(eval $(call RubyBuildPackage,mkmf,makefile library,+ruby-filelib +ruby-optparse +ruby-rbconfig))
+$(eval $(call RubyBuildPackage,multithread,multithread library,+ruby-misc))
+$(eval $(call RubyBuildPackage,net,Network Protocols Library,+ruby-datetime +ruby-digest +ruby-filelib +ruby-uri))
+$(eval $(call RubyBuildPackage,net-telnet,telnet client,+ruby-net))
+$(eval $(call RubyBuildPackage,nkf,Network Kanji Filter,+ruby-enc))
+$(eval $(call RubyBuildPackage,openssl,support for openssl,+ruby-enc +ruby-multithread +libopenssl))
+$(eval $(call RubyBuildPackage,optparse,command-line option analysis,+ruby-misc))
+$(eval $(call RubyBuildPackage,patterns,design patterns implementation,+ruby-multithread))
+$(eval $(call RubyBuildPackage,powerassert,Gem power_assert,+ruby-ripper))
+$(eval $(call RubyBuildPackage,prettyprint,PrettyPrint library,+ruby-misc))
+$(eval $(call RubyBuildPackage,pstore,file based persistence,+ruby-digest +ruby-enc))
+$(eval $(call RubyBuildPackage,psych,YAML parser and emitter,+ruby-bigdecimal +ruby-datetime +ruby-misc +ruby-enc +libyaml))
+$(eval $(call RubyBuildPackage,racc,LALR parser generator,))
+$(eval $(call RubyBuildPackage,rake,Rake (make replacement),+ruby-datetime +ruby-filelib +ruby-optparse +ruby-patterns +ruby-rbconfig))
+$(eval $(call RubyBuildPackage,rbconfig,RbConfig,))
+$(eval $(call RubyBuildPackage,rdoc,documentation generator,+ruby-erb +ruby-irb +ruby-json +ruby-racc +ruby-rake +ruby-yaml +ruby-zlib))
+$(eval $(call RubyBuildPackage,readline,support for readline,+libncurses +libreadline))
+$(eval $(call RubyBuildPackage,rexml,XML toolkit,+ruby-patterns +ruby-enc))
+$(eval $(call RubyBuildPackage,rinda,Linda paradigm implementation,+ruby-drb))
+$(eval $(call RubyBuildPackage,ripper,script parser,))
+$(eval $(call RubyBuildPackage,rss,RSS toolkit,+ruby-net +ruby-nkf +ruby-rexml))
+$(eval $(call RubyBuildPackage,sdbm,simple file-based key-value dbm implementation,))
+$(eval $(call RubyBuildPackage,shell,idiomatic Ruby interface,+ruby-patterns))
+$(eval $(call RubyBuildPackage,socket,socket support,+ruby-multithread))
+$(eval $(call RubyBuildPackage,testunit,Gem test-unit,+ruby-csv +ruby-erb +ruby-optparse +ruby-powerassert +ruby-prettyprint +ruby-rexml +ruby-yaml))
+$(eval $(call RubyBuildPackage,unicodenormalize,String additions for Unicode normalization,+ruby-enc +ruby-enc-extra))
+$(eval $(call RubyBuildPackage,uri,library to handle URI,+ruby-socket +ruby-enc))
+$(eval $(call RubyBuildPackage,webrick,Web server toolkit,+ruby-erb +ruby-net +ruby-patterns +ruby-rbconfig))
+$(eval $(call RubyBuildPackage,xmlrpc,XML-RPC toolkit,+ruby-rexml +ruby-webrick))
+$(eval $(call RubyBuildPackage,yaml,YAML toolkit,+ruby-dbm +ruby-pstore +ruby-psych))
+$(eval $(call RubyBuildPackage,zlib,support for zlib,+zlib))
 $(eval $(call BuildPackage,ruby-stdlib))
-$(eval $(call BuildPackage,ruby-bigdecimal))
-$(eval $(call BuildPackage,ruby-cgi))
-$(eval $(call BuildPackage,ruby-csv))
-$(eval $(call BuildPackage,ruby-datetime))
-$(eval $(call BuildPackage,ruby-dbm))
-$(eval $(call BuildPackage,ruby-debuglib))
-$(eval $(call BuildPackage,ruby-digest))
-$(eval $(call BuildPackage,ruby-drb))
-$(eval $(call BuildPackage,ruby-enc))
-$(eval $(call BuildPackage,ruby-enc-extra))
-$(eval $(call BuildPackage,ruby-erb))
-$(eval $(call BuildPackage,ruby-fiddle))
-$(eval $(call BuildPackage,ruby-filelib))
-$(eval $(call BuildPackage,ruby-gdbm))
-$(eval $(call BuildPackage,ruby-gems))
-$(eval $(call BuildPackage,ruby-io-console))
-$(eval $(call BuildPackage,ruby-irb))
-$(eval $(call BuildPackage,ruby-json))
-$(eval $(call BuildPackage,ruby-logger))
-$(eval $(call BuildPackage,ruby-math))
-$(eval $(call BuildPackage,ruby-minitest))
-$(eval $(call BuildPackage,ruby-misc))
-$(eval $(call BuildPackage,ruby-mkmf))
-$(eval $(call BuildPackage,ruby-multithread))
-$(eval $(call BuildPackage,ruby-net))
-$(eval $(call BuildPackage,ruby-nkf))
-$(eval $(call BuildPackage,ruby-openssl))
-$(eval $(call BuildPackage,ruby-optparse))
-$(eval $(call BuildPackage,ruby-patterns))
-$(eval $(call BuildPackage,ruby-powerassert))
-$(eval $(call BuildPackage,ruby-prettyprint))
-$(eval $(call BuildPackage,ruby-pstore))
-$(eval $(call BuildPackage,ruby-psych))
-$(eval $(call BuildPackage,ruby-racc))
-$(eval $(call BuildPackage,ruby-rake))
-$(eval $(call BuildPackage,ruby-rbconfig))
-$(eval $(call BuildPackage,ruby-rdoc))
-$(eval $(call BuildPackage,ruby-readline))
-$(eval $(call BuildPackage,ruby-rexml))
-$(eval $(call BuildPackage,ruby-rinda))
-$(eval $(call BuildPackage,ruby-ripper))
-$(eval $(call BuildPackage,ruby-rss))
-$(eval $(call BuildPackage,ruby-sdbm))
-$(eval $(call BuildPackage,ruby-shell))
-$(eval $(call BuildPackage,ruby-socket))
-$(eval $(call BuildPackage,ruby-testunit))
-$(eval $(call BuildPackage,ruby-unicodenormalize))
-$(eval $(call BuildPackage,ruby-uri))
-$(eval $(call BuildPackage,ruby-webrick))
-$(eval $(call BuildPackage,ruby-xmlrpc))
-$(eval $(call BuildPackage,ruby-yaml))
-$(eval $(call BuildPackage,ruby-zlib))
 $(eval $(call HostBuild))
diff --git a/lang/ruby/patches/001-acinclude.m4_rename_aclocal.m4.patch b/lang/ruby/patches/001-acinclude.m4_rename_aclocal.m4.patch
new file mode 100644 (file)
index 0000000..271bd71
--- /dev/null
@@ -0,0 +1,152 @@
+https://bugs.ruby-lang.org/projects/ruby-trunk/repository/revisions/53414
+
+Fixes:
+
+https://bugs.ruby-lang.org/issues/11941
+
+It might be incorporated in the following release
+
+Index: aclocal.m4
+===================================================================
+--- a/aclocal.m4       (revision 53413)
++++ b/aclocal.m4       (revision 53414)
+@@ -1,46 +0,0 @@
+-# -*- autoconf -*-
+-
+-AC_DEFUN([_COLORIZE_RESULT_PREPARE], [
+-    msg_checking= msg_result_yes= msg_result_no= msg_result_other= msg_reset=
+-    AS_IF([test "x${CONFIGURE_TTY}" = xyes -o -t 1], [
+-      msg_begin="`tput smso 2>/dev/null`"
+-      AS_CASE(["$msg_begin"], ['\e@<:@'*m],
+-          [msg_begin="`echo "$msg_begin" | sed ['s/[0-9]*m$//']`"
+-          msg_checking="${msg_begin}33m"
+-          AS_IF([test ${TEST_COLORS:+set}], [
+-              msg_result_yes=[`expr ":$TEST_COLORS:" : ".*:pass=\([^:]*\):"`]
+-              msg_result_no=[`expr ":$TEST_COLORS:" : ".*:fail=\([^:]*\):"`]
+-              msg_result_other=[`expr ":$TEST_COLORS:" : ".*:skip=\([^:]*\):"`]
+-          ])
+-          msg_result_yes="${msg_begin}${msg_result_yes:-32;1}m"
+-          msg_result_no="${msg_begin}${msg_result_no:-31;1}m"
+-          msg_result_other="${msg_begin}${msg_result_other:-33;1}m"
+-          msg_reset="${msg_begin}m"
+-          ])
+-      AS_UNSET(msg_begin)
+-      ])
+-    AS_REQUIRE_SHELL_FN([colorize_result],
+-      [AS_FUNCTION_DESCRIBE([colorize_result], [MSG], [Colorize result])],
+-        [AS_CASE(["$[]1"],
+-            [yes], [AS_ECHO(["${msg_result_yes}$[]1${msg_reset}]")],
+-            [no], [AS_ECHO(["${msg_result_no}$[]1${msg_reset}]")],
+-            [AS_ECHO(["${msg_result_other}$[]1${msg_reset}]")])])
+-])
+-
+-AC_DEFUN([COLORIZE_RESULT], [AC_REQUIRE([_COLORIZE_RESULT_PREPARE])dnl
+-    AS_LITERAL_IF([$1],
+-      [m4_case([$1],
+-              [yes], [AS_ECHO(["${msg_result_yes}$1${msg_reset}"])],
+-              [no], [AS_ECHO(["${msg_result_no}$1${msg_reset}"])],
+-              [AS_ECHO(["${msg_result_other}$1${msg_reset}"])])],
+-      [colorize_result "$1"]) dnl
+-])
+-
+-AC_DEFUN([AC_CHECKING],[dnl
+-AC_REQUIRE([_COLORIZE_RESULT_PREPARE])dnl
+-AS_MESSAGE([checking ${msg_checking}$1${msg_reset}...])])
+-
+-AC_DEFUN([AC_MSG_RESULT], [dnl
+-{ _AS_ECHO_LOG([result: $1])
+-COLORIZE_RESULT([$1]); dnl
+-}])
+Index: acinclude.m4
+===================================================================
+--- a/acinclude.m4     (revision 0)
++++ b/acinclude.m4     (revision 53414)
+@@ -0,0 +1,46 @@
++# -*- autoconf -*-
++
++AC_DEFUN([_COLORIZE_RESULT_PREPARE], [
++    msg_checking= msg_result_yes= msg_result_no= msg_result_other= msg_reset=
++    AS_IF([test "x${CONFIGURE_TTY}" = xyes -o -t 1], [
++      msg_begin="`tput smso 2>/dev/null`"
++      AS_CASE(["$msg_begin"], ['\e@<:@'*m],
++          [msg_begin="`echo "$msg_begin" | sed ['s/[0-9]*m$//']`"
++          msg_checking="${msg_begin}33m"
++          AS_IF([test ${TEST_COLORS:+set}], [
++              msg_result_yes=[`expr ":$TEST_COLORS:" : ".*:pass=\([^:]*\):"`]
++              msg_result_no=[`expr ":$TEST_COLORS:" : ".*:fail=\([^:]*\):"`]
++              msg_result_other=[`expr ":$TEST_COLORS:" : ".*:skip=\([^:]*\):"`]
++          ])
++          msg_result_yes="${msg_begin}${msg_result_yes:-32;1}m"
++          msg_result_no="${msg_begin}${msg_result_no:-31;1}m"
++          msg_result_other="${msg_begin}${msg_result_other:-33;1}m"
++          msg_reset="${msg_begin}m"
++          ])
++      AS_UNSET(msg_begin)
++      ])
++    AS_REQUIRE_SHELL_FN([colorize_result],
++      [AS_FUNCTION_DESCRIBE([colorize_result], [MSG], [Colorize result])],
++        [AS_CASE(["$[]1"],
++            [yes], [AS_ECHO(["${msg_result_yes}$[]1${msg_reset}]")],
++            [no], [AS_ECHO(["${msg_result_no}$[]1${msg_reset}]")],
++            [AS_ECHO(["${msg_result_other}$[]1${msg_reset}]")])])
++])
++
++AC_DEFUN([COLORIZE_RESULT], [AC_REQUIRE([_COLORIZE_RESULT_PREPARE])dnl
++    AS_LITERAL_IF([$1],
++      [m4_case([$1],
++              [yes], [AS_ECHO(["${msg_result_yes}$1${msg_reset}"])],
++              [no], [AS_ECHO(["${msg_result_no}$1${msg_reset}"])],
++              [AS_ECHO(["${msg_result_other}$1${msg_reset}"])])],
++      [colorize_result "$1"]) dnl
++])
++
++AC_DEFUN([AC_CHECKING],[dnl
++AC_REQUIRE([_COLORIZE_RESULT_PREPARE])dnl
++AS_MESSAGE([checking ${msg_checking}$1${msg_reset}...])])
++
++AC_DEFUN([AC_MSG_RESULT], [dnl
++{ _AS_ECHO_LOG([result: $1])
++COLORIZE_RESULT([$1]); dnl
++}])
+
+Property changes on: acinclude.m4
+___________________________________________________________________
+Added: svn:eol-style
+## -0,0 +1 ##
++LF
+\ No newline at end of property
+Index: common.mk
+===================================================================
+--- a/common.mk        (revision 53413)
++++ b/common.mk        (revision 53414)
+@@ -518,7 +518,7 @@
+       $(Q)$(RM) id.c id.h probes.dmyh
+       $(Q)$(CHDIR) $(srcdir) && $(exec) $(RM) parse.c parse.h lex.c enc/trans/newline.c $(PRELUDES) revision.h
+       $(Q)$(CHDIR) $(srcdir) && $(exec) $(RM) id.c id.h probes.dmyh
+-      $(Q)$(CHDIR) $(srcdir) && $(exec) $(RM) configure tool/config.guess tool/config.sub gems/*.gem
++      $(Q)$(CHDIR) $(srcdir) && $(exec) $(RM) configure aclocal.m4 tool/config.guess tool/config.sub gems/*.gem
+ realclean-ext:: PHONY
+ realclean-golf: distclean-golf
+       $(Q)$(RM) $(GOLFPRELUDES)
+Index: Makefile.in
+===================================================================
+--- a/Makefile.in      (revision 53413)
++++ b/Makefile.in      (revision 53414)
+@@ -22,6 +22,7 @@
+ YACC = bison
+ PURIFY =
+ AUTOCONF = autoconf
++ACLOCAL = aclocal
+ CONFIGURE = @CONFIGURE@
+ @SET_MAKE@
+ MKFILES = @MAKEFILES@
+@@ -310,6 +311,9 @@
+ $(srcdir)/$(CONFIGURE): $(srcdir)/configure.in $(srcdir)/aclocal.m4
+       $(CHDIR) $(srcdir) && exec $(AUTOCONF) -o $(@F)
++$(srcdir)/aclocal.m4: $(srcdir)/acinclude.m4
++      $(CHDIR) $(srcdir) && exec $(ACLOCAL)
++
+ incs: id.h
+ all-incs: probes.h
diff --git a/lang/ruby/patches/001-rdoc-remove_gems_dep.patch b/lang/ruby/patches/001-rdoc-remove_gems_dep.patch
deleted file mode 100644 (file)
index 9630de5..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-References:
-
-https://github.com/rdoc/rdoc/pull/340
-
---- ruby-2.1.2.orig/lib/rdoc.rb        2014-09-02 17:14:28.719224215 -0300
-+++ ruby-2.1.2/lib/rdoc.rb     2014-09-02 17:14:28.762223911 -0300
-@@ -109,6 +109,8 @@
-   def self.load_yaml
-     begin
-       gem 'psych'
-+    rescue NameError => e # --disable-gems
-+       raise unless e.name == :gem
-     rescue Gem::LoadError
-     end
---- ruby-2.1.2.orig/lib/rdoc/markdown.rb       2014-09-02 17:14:28.761223918 -0300
-+++ ruby-2.1.2/lib/rdoc/markdown.rb    2014-09-02 17:14:28.805223607 -0300
-@@ -525,7 +525,6 @@
--  require 'rubygems'
-   require 'rdoc'
-   require 'rdoc/markup/to_joined_paragraph'
-   require 'rdoc/markdown/entities'
---- ruby-2.1.2.orig/lib/rdoc/text.rb   2014-09-02 17:14:28.721224201 -0300
-+++ ruby-2.1.2/lib/rdoc/text.rb        2014-09-02 17:14:28.764223897 -0300
-@@ -10,6 +10,8 @@
- begin
-   gem 'json'
-+rescue NameError => e # --disable-gems
-+  raise unless e.name == :gem
- rescue Gem::LoadError
- end
index 946ec1fca24fc5a4895cf2feb409ff54ef862278..16f664a56f74d53ad89051d325d4e896e3638ddb 100644 (file)
@@ -6,13 +6,14 @@
 # Must run inside a openwrt with all *ruby* packages installed
 #
 
+RUBY_SIMPLE_VERSION = RUBY_VERSION.split(".")[0..1].join(".")
 failed = false
 
 puts "Looking for installed ruby packages..."
 packages=`opkg list-installed '*ruby*' | cut -d' ' -f 1`.split("\n")
 
 puts "Looking for packages files..."
-package_files=Hash.new([])
+package_files=Hash.new { |h,k| h[k]=[] }
 packages.each do
        |pkg|
        files=`opkg files "#{pkg}" | sed -e 1d`.split("\n")
@@ -24,7 +25,7 @@ require_regex_ignore=/^require ([a-zA-Z\$]|["']$|.*\/$)/
 require_ignore=%w{drb/invokemethod16 foo rubygems/defaults/operating_system win32console java Win32API
                   builder/xchar json/pure simplecov win32/sspi rdoc/markdown/literals_1_8 enumerator win32/resolv rbtree
                   nqxml/streamingparser nqxml/treeparser xmlscan/parser xmlscan/scanner xmltreebuilder xml/parser xmlparser xml/encoding-ja xmlencoding-ja
-                  iconv uconv win32ole gettext/po_parser gettext/mo libxml}
+                  iconv uconv win32ole gettext/po_parser gettext/mo libxml psych.jar jar-dependencies}
 
 builtin_enc=[
        Encoding.find("ASCII-8BIT"),
@@ -34,7 +35,7 @@ builtin_enc=[
 ]
 
 puts "Looking for requires in files..."
-files_requires=Hash.new([])
+files_requires=Hash.new { |h,k| h[k]=[] }
 packages.each do
         |pkg|
        package_files[pkg].each do
@@ -93,7 +94,7 @@ packages.each do
                                                next
                                        end
 
-                                       files_requires[file]=files_requires[file] + [require]
+                                       files_requires[file] += [require]
 
                                when /Encoding::/
                                        encs=line.scan(/Encoding::[[:alnum:]_]+/).collect {|enc| eval(enc) }.select {|enc| enc.kind_of? Encoding }
@@ -104,7 +105,7 @@ packages.each do
                                required_encs = (encs - builtin_enc).collect {|enc| "enc/#{enc.name.downcase.gsub("-","_")}" }
                                required_encs << "enc/encdb" if need_encdb
 
-                               files_requires[file] = files_requires[file] + required_encs
+                               files_requires[file] += required_encs
                        end
                end
        end
@@ -119,10 +120,18 @@ package_files.each do |(pkg,files)| files.each do |file|
        end
 end; end
 
-puts "Merging requirements into packages..."
-package_requires = Hash[packages.collect { |pkg| [pkg, package_files[pkg].collect {|file| files_requires[file] }.inject([],:+).uniq] }]
+puts "Grouping package requirements per package"
+package_requires_files = Hash.new{|h,k| h[k] = Hash.new { |h2,k2| h2[k2] = [] } }
+package_files.each do |(pkg,files)|
+       package_requires_files[pkg]
+       files.each do |file|
+               files_requires[file].each do |requires|
+                       package_requires_files[pkg][requires] << file
+               end
+       end
+end
 
-weak_dependency=Hash.new([])
+weak_dependency=Hash.new { |h,k| h[k]=[] }
 weak_dependency.merge!({
 "ruby-misc"=>["ruby-openssl","ruby-fiddle"],                   #securerandom.rb
 "ruby-debuglib"=>["ruby-readline"],                            #debug.rb
@@ -136,6 +145,7 @@ weak_dependency.merge!({
 "ruby-rdoc"=>["ruby-gems","ruby-readline","ruby-webrick",      #/usr/bin/rdoc and others
               "ruby-io-console"],                              #rdoc/stats/normal.rb
 "ruby-webrick"=>["ruby-openssl"],                              #webrick/ssl.rb
+"ruby-testunit"=>["ruby-io-console"],                          #gems/test-unit-3.1.5/lib/test/unit/ui/console/testrunner.rb
 })
 
 puts "Preloading gems..."
@@ -143,12 +153,12 @@ Gem::Specification.all.each{ |x| gem x.name }
 
 puts "Looking for package dependencies..."
 package_provides = {}
-package_dependencies = Hash.new([])
-package_requires.each do
-       |(pkg,requires)|
+package_dependencies = Hash.new { |h,k| h[k]=[] }
+package_requires_files.each do
+       |(pkg,requires_files)|
 
-       requires.each do
-               |require|
+       requires_files.each do
+               |(require,files)|
                if package_provides.include?(require)
                        found = package_provides[require]
                else
@@ -159,13 +169,13 @@ package_requires.each do
                                next
                        end
                        found = found.first
-                       package_provides[require]=found
+                       package_provides[require] = found
                end
                if weak_dependency[pkg].include?(found)
-                       puts "#{pkg}: #{found} provides #{require} (ignored WEAK dep)"
+                       puts "#{pkg}: #{found} provides #{require} (weak depedendency ignored)"
                else
-                       puts "#{pkg}: #{found} provides #{require}"
-                       package_dependencies[pkg]=package_dependencies[pkg] + [found]
+                       puts "#{pkg}: #{found} provides #{require} for #{files.collect {|file| file.sub("/usr/lib/ruby/","") }.join(",")}"
+                       package_dependencies[pkg] += [found]
                end
        end
 end
@@ -174,20 +184,16 @@ if failed
        puts "Please, fix the missing files or ignore them on require_ignore var"
        exit(1)
 end
-
-package_dependencies.each do
-        |(pkg,deps)|
-        package_dependencies[pkg]=deps.uniq.sort - [pkg]
-end
+# Remove self dependency
+package_dependencies = Hash[package_dependencies.collect {|(pkg,deps)| [pkg,package_dependencies[pkg]=deps.uniq.sort - [pkg]]}]
+package_dependencies.default = []
 
 puts "Expanding dependencies..."
 begin
        changed=false
        package_dependencies.each do
                |(pkg,deps)|
-
                next if deps.empty?
-
                deps_new = deps.collect {|dep| [dep] + package_dependencies[dep] }.inject([],:+).uniq.sort
                if not deps == deps_new
                        puts "#{pkg}: #{deps.join(",")}"
@@ -198,6 +204,12 @@ begin
        end
 end if not changed
 
+puts "Removing redundant dependencies..."
+package_dependencies.each do
+       |(pkg,deps)|
+       package_dependencies[pkg]=deps.uniq - [pkg]
+end
+
 puts "Checking for mutual dependencies..."
 package_dependencies.each do
        |(pkg,deps)|
@@ -208,17 +220,12 @@ package_dependencies.each do
 end
 exit(1) if failed
 
-puts "Removing redundant dependencies..."
-package_dependencies.each do
-       |(pkg,deps)|
-       package_dependencies[pkg]=deps.uniq - [pkg]
-end
 
 package_dependencies2=package_dependencies.dup
 package_dependencies.each do
        |(pkg,deps)|
 
-       # Ignore dependencies that are aready required by another dependency
+       # Ignore dependencies that are already required by another dependency
        deps_clean = deps.reject {|dep_suspect| deps.detect {|dep_provider|
                        if package_dependencies[dep_provider].include?(dep_suspect)
                                puts "#{pkg}: #{dep_suspect} is already required by #{dep_provider}"
@@ -256,15 +263,4 @@ end
 
 puts "All dependencies are OK." if ok
 
-
 __END__
-
-puts RUBY_VERSION, RUBY_PLATFORM
-puts 123
-
-puts Object.contants
-
-#RUBY_VER=2.1
-#RUBY_ARCH=i486-linux-gnu
-#RUBYLIB=/usr/lib/ruby/$RUBY_VER/
-#RUBYLIB_A=/usr/lib/ruby/$RUBY_ARCH/$RUBY_VER/
index f05e9feb8cb6cc08e28900ad2b3edb03513cee0c..e23b73df4b4c9133e747652afff69d3bc5eb22d8 100644 (file)
@@ -1,20 +1,28 @@
 #!/bin/bash
 #
+# bash feeds/packages/lang/ruby/ruby_missingfiles staging_dir/target-i386_i486_musl-1.1.11/ bin/x86/packages/packages/*ruby*_2.3.0*
+#
 
 function list_staging_files {
-       cd staging_dir/target-*/; find \
+       cd "$1"; find \
                \( \( -name "root-x86" -or -name "packages" -or -name "stamp" -or -name "pkginfo" \) -prune \) -or -true \
                \( -path "*ruby*" -or -name "erb" -or -name "gem" -or -name "irb" -or -name "rake" -or -name "rdoc" -or -name "ri" -or -name "testrb" \) \
+               -not -path "*/usr/include/*" -not -path "*/usr/lib/pkgconfig/*" -not -path "*/usr/lib/lib*.a" \
+               -not -path "*/usr/lib/ruby/gems/*/cache/*" \
                -print | sort
 }
 
 function list_ipkg_files {
-       for OPKG in bin/*/packages/packages/*ruby*; do
+       for OPKG; do
         tar --to-stdout -xzf "$OPKG" ./data.tar.gz | tar tz | sed -e 's%/$%%'
        done | sort -u
 }
 
 
-echo "          Staging                    Packages"
-diff -y <(list_staging_files) <(list_ipkg_files)
+echo "                          Staging                                             Packages"
+
+: ${1:?First arg is staging_dir}
+: ${2:?Second and following args are ruby ipkg packages}
+STAGING_DIR=$1; shift
+diff -d -y <(list_staging_files "$STAGING_DIR") <(list_ipkg_files "$@")
 
index 8ed5e0ba2d3cd1eaa44d1af59e860b8c1f4a7fdf..743670456a67231897a502f4c719e71b3d9b79d0 100644 (file)
@@ -30,7 +30,7 @@ define Package/tcl
   SUBMENU:=Tcl
   SECTION:=lang
   CATEGORY:=Languages
-  DEPENDS:=+libpthread
+  DEPENDS:=+libpthread @BROKEN
   TITLE:=The Tcl language
   URL:=http://www.tcl.tk/
 endef
diff --git a/lang/twisted/Makefile b/lang/twisted/Makefile
new file mode 100644 (file)
index 0000000..0b917dd
--- /dev/null
@@ -0,0 +1,64 @@
+#
+# Copyright (C) 2006-2016 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=twisted
+PKG_VERSION:=16.0.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=Twisted-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=https://pypi.python.org/packages/source/T/Twisted \
+               http://twistedmatrix.com/Releases/Twisted/16.0
+PKG_MD5SUM:=c6aa35e9a1e40fce6797247f39647d2a
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/Twisted-$(PKG_VERSION)
+PKG_BUILD_DEPENDS:=python python-setuptools USE_MUSL:librpc
+
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
+
+include $(INCLUDE_DIR)/package.mk
+$(call include_mk, python-package.mk)
+
+define Package/twisted
+  SUBMENU:=Python
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=Python networking engine
+  URL:=http://twistedmatrix.com/
+  DEPENDS:=+python-light +zope-interface
+endef
+
+define Package/twisted/description
+ Twisted is a networking engine written in Python, supporting numerous
+ protocols. It contains a web server, numerous chat clients, chat servers,
+ mail servers, and more.
+endef
+
+define PyPackage/twisted/filespec
++|/usr/bin
+-|/usr/bin/manhole
+-|/usr/bin/tap2deb
+-|/usr/bin/tap2rpm
+-|/usr/bin/tkconch
++|$(PYTHON_PKG_DIR)
+-|$(PYTHON_PKG_DIR)/twisted/conch/scripts/tkconch.py
+-|$(PYTHON_PKG_DIR)/twisted/scripts/manhole.py
+-|$(PYTHON_PKG_DIR)/twisted/scripts/tap2deb.py
+-|$(PYTHON_PKG_DIR)/twisted/scripts/tap2rpm.py
+endef
+
+define Build/Compile
+       $(call Build/Compile/PyMod,, \
+               install --prefix="/usr" --root="$(PKG_INSTALL_DIR)" --no-compile, \
+       )
+endef
+
+$(eval $(call PyPackage,twisted))
+$(eval $(call BuildPackage,twisted))
diff --git a/lang/twisted/patches/001-fix-zsh-completion.patch b/lang/twisted/patches/001-fix-zsh-completion.patch
new file mode 100644 (file)
index 0000000..f7b0486
--- /dev/null
@@ -0,0 +1,9 @@
+diff -Nur a/twisted/python/twisted-completion.zsh b/twisted/python/twisted-completion.zsh
+--- a/twisted/python/twisted-completion.zsh    2015-11-29 11:30:47.000000000 +0800
++++ b/twisted/python/twisted-completion.zsh    2015-11-30 20:05:59.755695237 +0800
+@@ -1,4 +1,4 @@
+-#compdef twistd trial conch cftp ckeygen pyhtmlizer tap2deb tkconch manhole tap2rpm
++#compdef twistd trial conch cftp ckeygen pyhtmlizer
+ #
+ # This is the ZSH completion file for Twisted commands. It calls the current
+ # command-line with the special "--_shell-completion" option which is handled
diff --git a/lang/twisted/patches/002-omit-tests.patch b/lang/twisted/patches/002-omit-tests.patch
new file mode 100644 (file)
index 0000000..58c004f
--- /dev/null
@@ -0,0 +1,32 @@
+diff -Nur a/setup.py b/setup.py
+--- a/setup.py 2015-11-29 11:30:46.000000000 +0800
++++ b/setup.py 2015-12-02 18:22:10.251268303 +0800
+@@ -49,11 +49,11 @@
+     scripts = getScripts()
+     setup_args.update(dict(
+-        packages=getPackages('twisted'),
++        packages=getPackages('twisted', ignore=['test']),
+         conditionalExtensions=getExtensions(),
+         scripts=scripts,
+         extras_require=_EXTRAS_REQUIRE,
+-        data_files=getDataFiles('twisted'),
++        data_files=getDataFiles('twisted', ignore=['test']),
+         **STATIC_PACKAGE_METADATA))
+     setup(**setup_args)
+diff -Nur a/twisted/python/dist.py b/twisted/python/dist.py
+--- a/twisted/python/dist.py   2015-11-29 11:30:47.000000000 +0800
++++ b/twisted/python/dist.py   2015-12-02 19:21:20.076370379 +0800
+@@ -268,11 +268,6 @@
+     """
+     extensions = [
+         ConditionalExtension(
+-            "twisted.test.raiser",
+-            ["twisted/test/raiser.c"],
+-            condition=lambda _: _isCPython),
+-
+-        ConditionalExtension(
+             "twisted.internet.iocpreactor.iocpsupport",
+             ["twisted/internet/iocpreactor/iocpsupport/iocpsupport.c",
+              "twisted/internet/iocpreactor/iocpsupport/winsock_pointers.c"],
index c4d036e218bb5ab36a9b8efe3040815765efc529..a97caf008e0cfd1186cf1561be7aaadc2e39fff4 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006-2015 OpenWrt.org
+# Copyright (C) 2006-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=alsa-lib
-PKG_VERSION:=1.0.29
+PKG_VERSION:=1.1.0
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=ftp://ftp.alsa-project.org/pub/lib/ \
                http://alsa.cybermirror.org/lib/
-PKG_MD5SUM:=de67e0eca72474d6b1121037dafe1024
+PKG_MD5SUM:=69515ca73c3c4a212ef45160dea846c1
 PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>, \
                Peter Wagner <tripolar@gmx.at>
 
@@ -43,15 +43,12 @@ endef
 
 TARGET_CFLAGS += $(FPIC)
 
-define Build/Configure
-       $(call Build/Configure/Default, \
+CONFIGURE_ARGS+= \
                --disable-python \
                --disable-debug \
                --without-debug \
                $(SOFT_FLOAT_CONFIG_OPTION) \
-               --with-versioned=no \
-       )
-endef
+               --with-versioned=no
 
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include/
diff --git a/libs/alsa-lib/patches/002-remove_cross_compile_guess.patch b/libs/alsa-lib/patches/002-remove_cross_compile_guess.patch
deleted file mode 100644 (file)
index d8f9f12..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
---- a/configure.ac
-+++ b/configure.ac
-@@ -27,20 +27,6 @@ AC_PREFIX_DEFAULT(/usr)
- dnl Checks for programs.
--dnl try to gues cross-compiler if not set
--if test "x$host" != "x$build" -a -z "`echo $CC | grep -e '-gcc'`";
--then
--  AC_MSG_CHECKING(for cross-compiler)
--
--  which ${program_prefix}gcc >/dev/null 2>&1 && CC=${program_prefix}gcc
--  which ${host_cpu}-${host_os}-gcc >/dev/null 2>&1 \
--  && CC=${host_cpu}-${host_os}-gcc
--  which ${host_cpu}-${host_vendor}-${host_os}-gcc >/dev/null 2>&1 \
--  && CC=${host_cpu}-${host_vendor}-${host_os}-gcc
--
--  AC_MSG_RESULT($CC)
--fi
--          
- CFLAGS="$CFLAGS -D_GNU_SOURCE"
index 8230c02f59d7fed3eef5a9d516d0c4d2f3c946d1..fc6c6f5901b33fdbd2560ac16d8fdf8f79676009 100644 (file)
@@ -82,9 +82,9 @@
  #include <ctype.h>
 -#include <sys/poll.h>
 +#include <poll.h>
- #include <sys/shm.h>
  #include <sys/mman.h>
  #include <limits.h>
+ #include "pcm_local.h"
 --- a/src/pcm/pcm_direct.c
 +++ b/src/pcm/pcm_direct.c
 @@ -30,7 +30,7 @@
  #include <sys/socket.h>
 -#include <sys/poll.h>
 +#include <poll.h>
- #include <sys/shm.h>
  #include <pthread.h>
  #include "pcm_local.h"
 --- a/src/pcm/pcm_shm.c
 +++ b/src/pcm/pcm_shm.c
 @@ -36,7 +36,7 @@
index d5178d5679f71be826f8e14f1f97d3850a409931..97d377c07708485d0368a946fe48ab39b4907919 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2007-2014 OpenWrt.org
+# Copyright (C) 2007-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -9,10 +9,10 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=apr-util
 PKG_VERSION:=1.5.4
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=https://archive.apache.org/dist/apr/
+PKG_SOURCE_URL:=@APACHE/apr/
 PKG_MD5SUM:=2202b18f269ad606d70e1864857ed93c
 PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>
 PKG_LICENSE:=Apache License
@@ -41,16 +41,21 @@ CONFIGURE_ARGS += \
        --with-apr="$(STAGING_DIR)/usr/bin/apr-1-config" \
        --with-expat="$(STAGING_DIR)/usr" \
        --without-sqlite2 \
-       --with-sqlite3="$(STAGING_DIR)/usr" \
-       --with-iconv="$(ICONV_PREFIX)" \
+       --with-sqlite3="$(STAGING_DIR)/usr"
+
+ifdef $(CONFIG_BUILD_NLS)
+       CONFIGURE_ARGS += --with-iconv="$(ICONV_PREFIX)"
+else
+       CONFIGURE_ARGS += --without-iconv
+endif
 
 CONFIGURE_VARS += \
        ac_cv_file_dbd_apr_dbd_mysql_c=no \
        ac_cv_path_ODBC_CONFIG= \
-       APR_BUILD_DIR="$(STAGING_DIR)/usr/share/build-1" \
+       APR_BUILD_DIR="$(STAGING_DIR)/usr/share/build-1"
 
 MAKE_FLAGS += \
-       APRUTIL_LIBS="-lsqlite3 $(TARGET_LDFLAGS) -lexpat $(if $(ICONV_FULL),-liconv) -lapr-1 -luuid -lm -lcrypt" \
+       APRUTIL_LIBS="-lsqlite3 $(TARGET_LDFLAGS) -lexpat $(if $(ICONV_FULL),-liconv) -lapr-1 -luuid -lm -lcrypt"
 
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/include/apr-1/ $(1)/usr/lib  $(1)/usr/lib/pkgconfig/
index d61d31f9e6290af172f2d185f80daffae46cde8a..975447ddc5ca3c9fe1cfa19638c5cd18b468817e 100644 (file)
@@ -12,7 +12,7 @@ PKG_VERSION:=1.5.2
 PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=http://mirrors.ibiblio.org/apache/apr/
+PKG_SOURCE_URL:=@APACHE/apr/
 PKG_MD5SUM:=4e9769f3349fe11fc0a5e1b224c236aa
 PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>
 PKG_LICENSE:=Apache License
diff --git a/libs/avahi/patches/011-fix-poll-h-warnings-on-musl.patch b/libs/avahi/patches/011-fix-poll-h-warnings-on-musl.patch
new file mode 100644 (file)
index 0000000..a331e64
--- /dev/null
@@ -0,0 +1,65 @@
+diff --git a/avahi-common/simple-watch.c b/avahi-common/simple-watch.c
+index 8df18dd..08d8090 100644
+--- a/avahi-common/simple-watch.c
++++ b/avahi-common/simple-watch.c
+@@ -21,7 +21,7 @@
+ #include <config.h>
+ #endif
+-#include <sys/poll.h>
++#include <poll.h>
+ #include <assert.h>
+ #include <string.h>
+ #include <errno.h>
+diff --git a/avahi-common/simple-watch.h b/avahi-common/simple-watch.h
+index 72c1905..db87122 100644
+--- a/avahi-common/simple-watch.h
++++ b/avahi-common/simple-watch.h
+@@ -22,7 +22,7 @@
+ /** \file simple-watch.h Simple poll() based main loop implementation */
+-#include <sys/poll.h>
++#include <poll.h>
+ #include <avahi-common/cdecl.h>
+ #include <avahi-common/watch.h>
+diff --git a/avahi-common/thread-watch.c b/avahi-common/thread-watch.c
+index c0cadeb..ecb202b 100644
+--- a/avahi-common/thread-watch.c
++++ b/avahi-common/thread-watch.c
+@@ -21,7 +21,7 @@
+ #include <config.h>
+ #endif
+-#include <sys/poll.h>
++#include <poll.h>
+ #include <assert.h>
+ #include <string.h>
+ #include <errno.h>
+diff --git a/avahi-common/thread-watch.h b/avahi-common/thread-watch.h
+index dec0cf3..1b44ccb 100644
+--- a/avahi-common/thread-watch.h
++++ b/avahi-common/thread-watch.h
+@@ -22,7 +22,7 @@
+ /** \file thread-watch.h Threaded poll() based main loop implementation */
+-#include <sys/poll.h>
++#include <poll.h>
+ #include <avahi-common/cdecl.h>
+ #include <avahi-common/watch.h>
+diff --git a/avahi-common/watch.h b/avahi-common/watch.h
+index 86e63d3..eea12ec 100644
+--- a/avahi-common/watch.h
++++ b/avahi-common/watch.h
+@@ -22,7 +22,7 @@
+ /** \file watch.h Simplistic main loop abstraction */
+-#include <sys/poll.h>
++#include <poll.h>
+ #include <sys/time.h>
+ #include <avahi-common/cdecl.h>
index ecd65fa3bd340ea0eb28924667bc963caf331536..c0e90d1e9e86c778aabc19cfc83aac9ee34a1338 100644 (file)
@@ -17,7 +17,7 @@ include $(INCLUDE_DIR)/target.mk
 
 PKG_NAME:=boost
 PKG_VERSION:=1_60_0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/boost
@@ -288,7 +288,7 @@ $(eval $(call DefineBoostLibrary,date_time,,))
 $(eval $(call DefineBoostLibrary,filesystem,system,))
 $(eval $(call DefineBoostLibrary,graph,regex,))
 $(eval $(call DefineBoostLibrary,iostreams,,+PACKAGE_boost-iostreams:zlib))
-$(eval $(call DefineBoostLibrary,locale,system,$(ICONV_DEPENDS) +@BUILD_NLS))
+$(eval $(call DefineBoostLibrary,locale,system,$(ICONV_DEPENDS) @BUILD_NLS))
 $(eval $(call DefineBoostLibrary,log,system chrono date_time thread filesystem regex,))
 $(eval $(call DefineBoostLibrary,math,,))
 #$(eval $(call DefineBoostLibrary,mpi,,)) # OpenMPI does no exist in OpenWRT at this time.
@@ -336,7 +336,7 @@ comma := ,
 define Build/Compile
        $(info Selected Boost API $(BOOST_ABI) for architecture $(ARCH) and cpu $(CPU_TYPE) $(CPU_SUBTYPE))
        ( cd $(PKG_BUILD_DIR) ; \
-               echo "using gcc : $(ARCH) : $(GNU_TARGET_NAME)-gcc : <compileflags>\"$(TARGET_CFLAGS)\" <cxxflags>\"$(TARGET_CXXFLAGS)\" <linkflags>\"$(TARGET_LDFLAGS)\" ;" > tools/build/src/user-config.jam ; \
+               echo "using gcc : $(ARCH) : $(GNU_TARGET_NAME)-gcc : <compileflags>\"$(TARGET_CFLAGS)\" <cxxflags>\"$(TARGET_CXXFLAGS) $(if $(CONFIG_boost-coroutine2),-std=c++14,)\" <linkflags>\"$(TARGET_LDFLAGS)\" ;" > tools/build/src/user-config.jam ; \
                $(if $(CONFIG_PACKAGE_boost-python3), \
                        echo "using python : 3.5 : $(STAGING_DIR_ROOT)/usr/bin/python3 : $(STAGING_DIR)/usr/include/python3.5/ ;" >> \
                                tools/build/src/user-config.jam; \
@@ -397,11 +397,11 @@ endef
 
 define Host/Install
        $(INSTALL_DIR) \
-               $(STAGING_DIR_HOST)/bin
+               $(STAGING_DIR)/host/bin
 
        $(CP) \
                $(HOST_BUILD_DIR)/tools/build/src/engine/bin.*/b2 \
-               $(STAGING_DIR_HOST)/bin/
+               $(STAGING_DIR)/host/bin/
 endef
 
 define Package/boost/Default/install
index c5b2269975a8a5a50fcea42c5a3acd480b0935fb..ec822f5e0cc4e1e090c4f0c0bc47b83744fc9b9d 100644 (file)
@@ -9,13 +9,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=c-ares
-PKG_VERSION:=1.10.0
+PKG_VERSION:=1.11.0
 PKG_RELEASE:=1
 PKG_LICENSE:=MIT
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://c-ares.haxx.se/download
-PKG_MD5SUM:=1196067641411a75d3cbebe074fd36d8
+PKG_MD5SUM:=d5c6d522cfc54bb6f215a0b7912d46be
 
 PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
index 90ab6f4cc60b319aa9c62440dd799fd19aae14b2..a0117b57b0d10c03d8a0f50fb80c6e3456875c75 100644 (file)
@@ -31,7 +31,7 @@ define Package/file/Default
 endef
 
 define Package/file
-$(call package/file/Default)
+$(call Package/file/Default)
   SECTION:=utils
   CATEGORY:=Utilities
   TITLE+= utility
@@ -39,7 +39,7 @@ $(call package/file/Default)
 endef
 
 define Package/libmagic
-$(call package/file/Default)
+$(call Package/file/Default)
   SECTION:=libs
   CATEGORY:=Libraries
   TITLE+= library
index 7d94cb63ed28654d441078b048250812f17d0eb4..0454f98f7fecd40416b6a47c2f9ea05c8c9e90c4 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006-2015 OpenWrt.org
+# Copyright (C) 2006-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=flac
 PKG_VERSION:=1.3.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=http://downloads.xiph.org/releases/flac/
diff --git a/libs/flac/patches/020-fix-musl-sigemptyset-x86.patch b/libs/flac/patches/020-fix-musl-sigemptyset-x86.patch
new file mode 100644 (file)
index 0000000..0ee3ce5
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/src/libFLAC/cpu.c
++++ b/src/libFLAC/cpu.c
+@@ -243,7 +243,7 @@ void FLAC__cpu_info(FLAC__CPUInfo *info)
+               struct sigaction sigill_save;
+               struct sigaction sigill_sse;
+               sigill_sse.sa_sigaction = sigill_handler_sse_os;
+-              __sigemptyset(&sigill_sse.sa_mask);
++              sigemptyset(&sigill_sse.sa_mask);
+               sigill_sse.sa_flags = SA_SIGINFO | SA_RESETHAND; /* SA_RESETHAND just in case our SIGILL return jump breaks, so we don't get stuck in a loop */
+               if(0 == sigaction(SIGILL, &sigill_sse, &sigill_save))
+               {
index 21ecfb2dd3f02d53a59e7c00fbafb639d14661fa..a8d1926c55331b078680a75a33f06479d404fe7e 100644 (file)
@@ -23,6 +23,8 @@ PKG_FIXUP:=autoreconf gettext-version
 PKG_REMOVE_FILES:=Makefile compat/Makefile doc/Makefile export/Makefile src/Makefile tests/Makefile
 PKG_BUILD_PARALLEL:=0
 
+PKG_BUILD_DEPENDS:=gettext-full/host
+
 include $(INCLUDE_DIR)/package.mk
 
 define Package/libgdbm
index efeabee68df93b391b80f426f6a2d08cb5471059..28fcd69eeba26d47983d6f8efb74235f6f86c9dd 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006-2015 OpenWrt.org
+# Copyright (C) 2006-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=giflib
-PKG_VERSION:=5.1.1
+PKG_VERSION:=5.1.2
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=@SF/giflib
-PKG_MD5SUM:=1c39333192712788c6568c78a949f13e
+PKG_MD5SUM:=323a9f11ab56c8a2d1715376410ce376
 
 PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
 
@@ -39,7 +39,6 @@ define Package/giflib/description
 endef
 
 TARGET_CFLAGS += $(FPIC)
-CONFIGURE_ARGS += --enable-x11=no
 
 define Build/Compile
        $(MAKE) -C $(PKG_BUILD_DIR)
diff --git a/libs/giflib/patches/100-no-docs.patch b/libs/giflib/patches/100-no-docs.patch
new file mode 100644 (file)
index 0000000..f006d6c
--- /dev/null
@@ -0,0 +1,10 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -21,7 +21,6 @@ AC_PROG_MAKE_SET
+ AM_PROG_CC_C_O
+ dnl Allow partial building on systems without xmlto
+-AC_CHECK_PROG([have_xmlto], [xmlto], ["yes"],["no"])
+ AM_CONDITIONAL([BUILD_DOC], [test "x${have_xmlto}" = "xyes"])
+ dnl Shared-library version
index 70f8450a8d2b1b4a1edd1c9336f8c4a617315622..583828b933d0b5b9e3590ca9027a063313c2443c 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2007-2015 OpenWrt.org
+# Copyright (C) 2007-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=glib2
-PKG_VERSION:=2.44.1
+PKG_VERSION:=2.46.2
 PKG_RELEASE:=1
 
 PKG_SOURCE:=glib-$(PKG_VERSION).tar.xz
 PKG_BUILD_DIR:=$(BUILD_DIR)/glib-$(PKG_VERSION)
-PKG_SOURCE_URL:=@GNOME/glib/2.44
-PKG_MD5SUM:=83efba4722a9674b97437d1d99af79db
+PKG_SOURCE_URL:=@GNOME/glib/2.46
+PKG_MD5SUM:=7f815d6e46df68e070cb421ed7f1139e
 
 PKG_BUILD_PARALLEL:=1
 HOST_BUILD_PARALLEL:=1
@@ -45,7 +45,8 @@ define Package/glib2/description
 endef
 
 HOST_CONFIGURE_ARGS += \
-       --disable-selinux
+       --disable-selinux \
+       --with-libiconv=gnu
 
 CONFIGURE_ARGS += \
        --enable-shared \
@@ -53,12 +54,12 @@ CONFIGURE_ARGS += \
        --enable-debug=no \
        --disable-selinux \
        --disable-fam \
-       $(if $(ICONV_FULL),--with-libiconv=gnu)
+       --with-libiconv=gnu
 
 CONFIGURE_VARS += \
        glib_cv_stack_grows=no \
        glib_cv_uscore=no \
-       ac_cv_path_GLIB_GENMARSHAL=$(STAGING_DIR_HOST)/bin/glib-genmarshal \
+       ac_cv_path_GLIB_GENMARSHAL=$(STAGING_DIR)/host/bin/glib-genmarshal \
        ac_cv_func_mmap_fixed_mapped=yes \
        ac_cv_func_posix_getpwuid_r=yes \
        ac_cv_func_posix_getgrgid_r=yes
diff --git a/libs/glib2/patches/100-fix-gio-linking.patch b/libs/glib2/patches/100-fix-gio-linking.patch
deleted file mode 100644 (file)
index 3ce57fc..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/gio/Makefile.am
-+++ b/gio/Makefile.am
-@@ -707,6 +707,7 @@ bin_PROGRAMS = gio-querymodules glib-com
- glib_compile_resources_LDADD = libgio-2.0.la          \
-       $(top_builddir)/gobject/libgobject-2.0.la       \
-+      $(top_builddir)/gmodule/libgmodule-2.0.la       \
-       $(top_builddir)/glib/libglib-2.0.la             \
-       $(NULL)
index 9d3cfd39162e32aff54bc097f19c4de6a4666f3d..e84a9a750b45fd8346a098a0ac71ea9ecbbb2fcf 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=glpk
-PKG_VERSION:=4.57
+PKG_VERSION:=4.58
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@GNU/$(PKG_NAME)
-PKG_MD5SUM:=237531a54f73155842f8defe51aedb0f
+PKG_MD5SUM:=924ff878278d07a52f2e06240f2fe30a
 
 PKG_LICENSE:=GPL-3.0
 PKG_LICENSE_FILES:=COPYING
index 59ca00f8f4cd66e328d1095f5e7105e04e128011..fc3b31758ebedd1905195f4d350e6fe8ab576bf7 100644 (file)
@@ -17,7 +17,6 @@ config GNUTLS_OCSP
 
 config GNUTLS_CRYPTODEV
        bool "enable /dev/crypto support"
-       select PACKAGE_kmod-cryptodev
        default n
 
 config GNUTLS_HEARTBEAT
index 5577eb7f24d05ee404f00690533cf7afe72685d5..97f29666c2287a11663ecd56961baa44c8cf196c 100644 (file)
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gnutls
-PKG_VERSION:=3.4.7
+PKG_VERSION:=3.4.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.4
-PKG_MD5SUM:=e7556cec73c8b34fd2ff0b591e24e44c
+PKG_MD5SUM:=fe9a0dc5adf205122f01a3e7dac5f8dd
 #PKG_FIXUP:=autoreconf gettext-version
 PKG_MAINTAINER:=Nikos Mavrogiannopoulos <nmav@gnutls.org>
 PKG_LICENSE:=LGPLv2.1+
@@ -93,7 +93,7 @@ endef
 define Package/libgnutls
 $(call Package/gnutls/Default)
   TITLE+= (library)
-  DEPENDS+= +libnettle +!LIBNETTLE_MINI:libgmp +GNUTLS_EXT_LIBTASN1:libtasn1 +GNUTLS_PKCS11:p11-kit
+  DEPENDS+= +libnettle +!LIBNETTLE_MINI:libgmp +GNUTLS_EXT_LIBTASN1:libtasn1 +GNUTLS_PKCS11:p11-kit +GNUTLS_CRYPTODEV:kmod-cryptodev
 endef
 
 define Package/libgnutls/description
index fa402c66088600e7b340a7bb063ef4b200d3cbfc..256d96399ccc30e1202c63a7b29db0539aac8ef0 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2008-2015 OpenWrt.org
+# Copyright (C) 2008-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -9,14 +9,16 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libesmtp
 PKG_VERSION:=1.0.6
-PKG_RELEASE:=2
-PKG_MD5SUM:=c4fedc999b6c3820296b0eb92cc2e252
+PKG_RELEASE:=3
 
 PKG_MAINTAINER:=Othmar Truniger <github@truniger.ch>
 PKG_LICENSE:=LGPL-2.0+
 PKG_LICENSE_FILES:=COPYING
 
-PKG_SOURCE_URL:=http://www.stafford.uklinux.net/libesmtp
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/tru7/libesmtp.git
+PKG_SOURCE_VERSION=10e9a6df9f76da610941addf71b9a3cbf94f2e9f
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 
 PKG_BUILD_PARALLEL:=1
@@ -28,13 +30,10 @@ define Package/libesmtp
   SECTION:=libs
   CATEGORY:=Libraries
   TITLE:=A Library for Posting Electronic Mail
-  URL:=http://www.stafford.uklinux.net/libesmtp/
-  DEPENDS:=+libpthread
+  URL:=https://github.com/tru7/libesmtp.git
+  DEPENDS:=+libpthread +libopenssl
 endef
 
-CONFIGURE_ARGS += \
-       --without-openssl
-
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/bin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/libesmtp-config $(1)/usr/bin/
index 1cd08e49c06642a5d1f79a0f312c8020ca688759..24b04643698e4018358f5e9f3d891b9b06333e9e 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libev
-PKG_VERSION:=4.20
-PKG_RELEASE:=2
+PKG_VERSION:=4.22
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://dist.schmorp.de/libev/Attic/
-PKG_MD5SUM:=1cac539cfc560f381a490c9fba940de9
+PKG_MD5SUM:=bf0007e37240103d3c2be80ca9bee3f9
 PKG_LICENSE:=BSD-2-Clause
 PKG_MAINTAINER:=Karl Palsson <karlp@tweak.net.au>
 
index 9274e581a19daa9083f0c3cff80672e020457272..dd8cef51422f405c700f1121ef2e2f161e72c4f9 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libevdev
-PKG_VERSION:=1.4.5
+PKG_VERSION:=1.4.6
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=http://www.freedesktop.org/software/libevdev/
-PKG_MD5SUM:=b123d91e31d279ecb37bea774f17aae1
+PKG_MD5SUM:=9b3f25bd8fb0f8efa4944d34668dddc0
 
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=COPYING
diff --git a/libs/libfastjson/Makefile b/libs/libfastjson/Makefile
new file mode 100644 (file)
index 0000000..8d38219
--- /dev/null
@@ -0,0 +1,55 @@
+#
+# Copyright (C) 2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libfastjson
+PKG_VERSION:=0.99.2
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE_URL:=https://github.com/rsyslog/libfastjson.git
+PKG_SOURCE_VERSION:=v$(PKG_VERSION)
+
+PKG_MAINTAINER:=Dov Murik <dmurik@us.ibm.com>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILE:=COPYING
+
+PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libfastjson
+  SECTION:=libs
+  CATEGORY:=Libraries
+  TITLE:=A fast JSON library for C
+  URL:=https://github.com/rsyslog/libfastjson
+endef
+
+define Package/libfastjson/description
+  libfastjson - A fast JSON library for C
+endef
+
+TARGET_CFLAGS += $(FPIC)
+
+define Build/InstallDev
+       $(INSTALL_DIR) $(1)/usr/include
+       $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
+
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
+endef
+
+define Package/libfastjson/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfastjson.so* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,libfastjson))
diff --git a/libs/libffi/patches/100-fix_mips_softfloat.patch b/libs/libffi/patches/100-fix_mips_softfloat.patch
new file mode 100644 (file)
index 0000000..bdd5a9a
--- /dev/null
@@ -0,0 +1,79 @@
+--- a/src/mips/o32.S
++++ b/src/mips/o32.S
+@@ -82,13 +82,16 @@ sixteen:
+               
+       ADDU    $sp, 4 * FFI_SIZEOF_ARG         # adjust $sp to new args
++#ifndef __mips_soft_float
+       bnez    t0, pass_d                      # make it quick for int
++#endif
+       REG_L   a0, 0*FFI_SIZEOF_ARG($sp)       # just go ahead and load the
+       REG_L   a1, 1*FFI_SIZEOF_ARG($sp)       # four regs.
+       REG_L   a2, 2*FFI_SIZEOF_ARG($sp)
+       REG_L   a3, 3*FFI_SIZEOF_ARG($sp)
+       b       call_it
++#ifndef __mips_soft_float
+ pass_d:
+       bne     t0, FFI_ARGS_D, pass_f
+       l.d     $f12, 0*FFI_SIZEOF_ARG($sp)     # load $fp regs from args
+@@ -130,6 +133,7 @@ pass_f_d:
+  #    bne     t0, FFI_ARGS_F_D, call_it
+       l.s     $f12, 0*FFI_SIZEOF_ARG($sp)     # load $fp regs from args
+       l.d     $f14, 2*FFI_SIZEOF_ARG($sp)     # passing double and float
++#endif
+ call_it:      
+       # Load the function pointer
+@@ -158,14 +162,23 @@ retfloat:
+       bne     t2, FFI_TYPE_FLOAT, retdouble
+       jalr    t9
+       REG_L   t0, SIZEOF_FRAME + 4*FFI_SIZEOF_ARG($fp)
++#ifndef __mips_soft_float
+       s.s     $f0, 0(t0)
++#else
++      REG_S   v0, 0(t0)
++#endif
+       b       epilogue
+ retdouble:    
+       bne     t2, FFI_TYPE_DOUBLE, noretval
+       jalr    t9
+       REG_L   t0, SIZEOF_FRAME + 4*FFI_SIZEOF_ARG($fp)
++#ifndef __mips_soft_float
+       s.d     $f0, 0(t0)
++#else
++      REG_S   v1, 4(t0)
++      REG_S   v0, 0(t0)
++#endif
+       b       epilogue
+       
+ noretval:     
+@@ -261,9 +274,11 @@ $LCFI7:
+       li      $13, 1          # FFI_O32
+       bne     $16, $13, 1f    # Skip fp save if FFI_O32_SOFT_FLOAT
+       
++#ifndef __mips_soft_float
+       # Store all possible float/double registers.
+       s.d     $f12, FA_0_0_OFF2($fp)
+       s.d     $f14, FA_1_0_OFF2($fp)
++#endif
+ 1:    
+       # Call ffi_closure_mips_inner_O32 to do the work.
+       la      t9, ffi_closure_mips_inner_O32
+@@ -281,6 +296,7 @@ $LCFI7:
+       li      $13, 1          # FFI_O32
+       bne     $16, $13, 1f    # Skip fp restore if FFI_O32_SOFT_FLOAT
++#ifndef __mips_soft_float
+       li      $9, FFI_TYPE_FLOAT
+       l.s     $f0, V0_OFF2($fp)
+       beq     $8, $9, closure_done
+@@ -288,6 +304,7 @@ $LCFI7:
+       li      $9, FFI_TYPE_DOUBLE
+       l.d     $f0, V0_OFF2($fp)
+       beq     $8, $9, closure_done
++#endif
+ 1:    
+       REG_L   $3, V1_OFF2($fp)
+       REG_L   $2, V0_OFF2($fp)
index d03a79d4ff55a56e55c5fb6c6f5954f8e0c412c3..9be56482d03747334790fa069ba7010892117c59 100644 (file)
@@ -57,10 +57,10 @@ define Build/InstallDev
        $(INSTALL_DATA) \
                $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc \
                $(1)/usr/lib/pkgconfig/
-       $(INSTALL_DIR) $(STAGING_DIR_HOST)/share/vala-0.30/vapi/
+       $(INSTALL_DIR) $(STAGING_DIR)/host/share/vala-0.30/vapi/
        $(INSTALL_DATA) \
                 $(PKG_INSTALL_DIR)/usr/share/vala/vapi/* \
-                $(STAGING_DIR_HOST)/share/vala-0.30/vapi
+                $(STAGING_DIR)/host/share/vala-0.30/vapi
 endef
 
 define Package/libgee/install
index 304cf275f8a7309f687c1473368f2728e76818e7..c9d1990396ceb0e228272a62e200e3402d67bbb5 100644 (file)
@@ -8,8 +8,8 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libimobiledevice
-PKG_VERSION:=1.2.0
-PKG_RELEASE:=2
+PKG_VERSION:=1.2.1
+PKG_RELEASE:=1
 
 PKG_MAINTAINER:=Lukasz Baj <l.baj@radytek.com>
 PKG_LICENSE:=LGPL-2.1+
@@ -18,7 +18,7 @@ PKG_LICENSE_FILES:=COPYING.LESSER
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/libimobiledevice/libimobiledevice.git
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=53eb963f8e6d607cca6b50381c10820a5e8357f4
+PKG_SOURCE_VERSION:=df1f5c4d70d0c19ad40072f5246ca457e7f9849e
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
 
 PKG_FIXUP:=autoreconf
index 0af00e367db5ddaedeecd95a8307a9649944c8e4..029a3038412c17f8d89dfe738f89c3762c8afccb 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libinput
-PKG_VERSION:=1.1.1
+PKG_VERSION:=1.2.1
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=http://www.freedesktop.org/software/libinput/
-PKG_MD5SUM:=4a3fc842ac0b7bf0fa306ea7badc31a0
+PKG_MD5SUM:=2b36d32362111c3e99f19c83bc535332
 
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=COPYING
@@ -26,12 +26,14 @@ include $(INCLUDE_DIR)/package.mk
 
 TARGET_CFLAGS+= -std=gnu99
 
+CONFIGURE_ARGS += --disable-libwacom --disable-tests --disable-documentation
+
 define Package/libinput
   SECTION:=libs
   CATEGORY:=Libraries
   TITLE:=a library to handle input devices
   URL:=http://freedesktop.org/wiki/Software/libinput/
-  DEPENDS:=+libevdev +mtdev +udev
+  DEPENDS:=+libevdev +mtdev +eudev
 endef
 
 define Package/libinput/description
@@ -52,9 +54,10 @@ define Build/InstallDev
 endef
 
 define Package/libinput/install
-       $(INSTALL_DIR) $(1)/usr/lib/udev
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/udev/* $(1)/usr/lib/udev
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/{udev,*.so*} $(1)/usr/lib
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin
 endef
 
 $(eval $(call BuildPackage,libinput))
diff --git a/libs/libinput/patches/002-static_assert.patch b/libs/libinput/patches/002-static_assert.patch
new file mode 100644 (file)
index 0000000..e5aaee2
--- /dev/null
@@ -0,0 +1,14 @@
+--- a/src/evdev-tablet.c
++++ b/src/evdev-tablet.c
+@@ -1155,9 +1155,11 @@ static void
+ tablet_mark_all_axes_changed(struct tablet_dispatch *tablet,
+                            struct libinput_tablet_tool *tool)
+ {
++#if 0
+       static_assert(sizeof(tablet->changed_axes) ==
+                             sizeof(tool->axis_caps),
+                     "Mismatching array sizes");
++#endif
+       memcpy(tablet->changed_axes,
+              tool->axis_caps,
index 3e3202ad2c41a37dc2d3e85f101c7fcbdfa28075..1bff5ff9949795e3ee91746974fd0b40ce2ae5a1 100644 (file)
@@ -28,8 +28,8 @@ include $(INCLUDE_DIR)/cmake.mk
 
 CMAKE_OPTIONS=-DBUILDARCH=$(CONFIG_ARCH) \
        -DENABLEEXAMPLES=0 \
-       -DNODE_EXECUTABLE=$(STAGING_DIR_HOST)/bin/node \
-       -DSWIG_DIR=$(STAGING_DIR_HOST)/bin
+       -DNODE_EXECUTABLE=$(STAGING_DIR)/host/bin/node \
+       -DSWIG_DIR=$(STAGING_DIR)/host/bin
 
 TARGET_CFLAGS+=-I$(STAGING_DIR)/usr/include/node
 
index 4d7cb9c86ae965a91aa26a585ceac5272a11d21f..bb61336c4c1b97e5a44b6d875aff677b5d16aa09 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libplist
 PKG_VERSION:=1.13
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_MAINTAINER:=Lukasz Baj <l.baj@radytek.com>
 PKG_LICENSE:=LGPL-2.1+
@@ -18,7 +18,7 @@ PKG_LICENSE_FILES:=COPYING.LESSER
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/libimobiledevice/libplist.git
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=cc907c0f162ee84e5698b9c27ac6fb0be8bb9bc0
+PKG_SOURCE_VERSION:=060eda6b1846968aa40b0d38dcf92ac46f933417
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
 
 PKG_FIXUP:=autoreconf
index 23d833d38c9b46d1558c2b4e2d39fe37bd99a551..c634061ec6b46b241506952c931fe158b1acf89c 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libpng
-PKG_VERSION:=1.2.54
+PKG_VERSION:=1.2.56
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@SF/libpng
-PKG_MD5SUM:=bbb7a7264f1c7d9c444fd16bf6f89832
+PKG_MD5SUM:=868562bd1c58b76ed8703f135a2e439a
 PKG_MAINTAINER:=Jo-Philipp Wich <jow@openwrt.org>
 
 PKG_LICENSE:=Libpng GPL-2.0+ BSD-3-Clause
index 4ec9e93a0f225cb11d2c0fb5b2db0701aa36d78c..15c0e8ba352279d03f00c49f81f2fa0e01f05b44 100644 (file)
@@ -52,8 +52,8 @@ define Host/Compile
 endef
 
 define Host/Install
-       $(INSTALL_DIR) $(STAGING_DIR_HOST)/bin
-       $(INSTALL_BIN) $(HOST_BUILD_DIR)/lib/searpc-codegen.py $(STAGING_DIR_HOST)/bin/
+       $(INSTALL_DIR) $(STAGING_DIR)/host/bin
+       $(INSTALL_BIN) $(HOST_BUILD_DIR)/lib/searpc-codegen.py $(STAGING_DIR)/host/bin/
 endef
 
 $(eval $(call HostBuild))
index 8f69803f8e7ec631016e7bde21033b090fbffa1b..9881fbb9d8717b708ffa4ae7ff2f3ca68d46f8a0 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2014 OpenWrt.org  
+# Copyright (C) 2014-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libsoxr
 PKG_VERSION:=0.1.1
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=git://git.code.sf.net/p/soxr/code
@@ -18,6 +18,9 @@ PKG_SOURCE_VERSION:=$(PKG_VERSION)
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
 
+PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>, \
+               Mike Brady <mikebrady@eircom.net>
+
 PKG_LICENSE:=LGPL-2.1
 PKG_LICENSE_FILES:=LICENCE
 
@@ -25,6 +28,7 @@ PKG_FIXUP:=libtool
 PKG_REMOVE_FILES:=autogen.sh
 
 PKG_BUILD_PARALLEL:=1
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/cmake.mk
@@ -34,7 +38,6 @@ define Package/libsoxr
   CATEGORY:=Libraries
   TITLE:=The SoX Resampler library
   URL:=http://sourceforge.net/projects/soxr/
-  MAINTAINER:=Mike Brady <mikebrady@eircom.net>
   DEPENDS:= +libpthread
 endef
 
@@ -43,20 +46,20 @@ define Package/libsoxr/description
   High quality, one-dimensional sample-rate conversion library
 endef
 
-CMAKE_OPTIONS:= -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTS=0 -DBUILD_EXAMPLES=0
+CMAKE_OPTIONS:= -DBUILD_TESTS=0 -DBUILD_EXAMPLES=0
 CMAKE_OPTIONS+= -DHAVE_WORDS_BIGENDIAN_EXITCODE=$(if $(CONFIG_BIG_ENDIAN),0,1)
 
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include
-       $(CP) $(PKG_BUILD_DIR)/src/soxr.h $(1)/usr/include/
-       $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_BUILD_DIR)/src/*.a $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/include/soxr.h $(1)/usr/include/
+       $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsoxr.so* $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/soxr.pc $(1)/usr/lib/pkgconfig/
 endef
 
 define Package/libsoxr/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_BUILD_DIR)/src/*.a $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsoxr.so* $(1)/usr/lib/
 endef
 
-
 $(eval $(call BuildPackage,libsoxr))
index fb269339ce073d1b51840b6efefe00838445ce61..c1ba53f854b5f0e29728f0a4d2e8f682ff8357a3 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2012-2015 OpenWrt.org
+# Copyright (C) 2012-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libuecc
-PKG_VERSION:=6
+PKG_VERSION:=7
 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/83
-PKG_MD5SUM:=cba68339ff46482ec4090303de18fff4
+PKG_SOURCE_URL:=https://projects.universe-factory.net/attachments/download/85
+PKG_MD5SUM:=5cd543cb8e7bce83a22c07a0579c95a1
 
 PKG_LICENSE:=BSD-2-Clause
 PKG_LICENSE_FILES:=COPYRIGHT
index 93287c52de2b9057c8f7949b8f05a19af199f13e..c1eaad16e6d4bfdbf9b76bb5efc0fe193196abca 100644 (file)
@@ -36,8 +36,8 @@ UPM_MODULES:= \
        th02 tm1637 tsl2561 ttp223 ublox6 uln200xa waterlevel wheelencoder wt5001 yg1006 zfm20
 
 CMAKE_OPTIONS=-DBUILDARCH=$(CONFIG_ARCH) \
-       -DNODE_EXECUTABLE=$(STAGING_DIR_HOST)/bin/node \
-       -DSWIG_DIR=$(STAGING_DIR_HOST)/bin
+       -DNODE_EXECUTABLE=$(STAGING_DIR)/host/bin/node \
+       -DSWIG_DIR=$(STAGING_DIR)/host/bin
 
 define Package/libupm/Default
   SECTION:=libs
index ec15bc2d2a37e9169f6b971e835120402e42d9cc..3b84d54d76f50cd7670d4d4b794954a06665da33 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libusbmuxd
 PKG_VERSION:=1.1.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_MAINTAINER:=Lukasz Baj <l.baj@radytek.com>
 PKG_LICENSE:=LGPL-2.1+
@@ -18,7 +18,7 @@ PKG_LICENSE_FILES:=COPYING.LGPLv2.1
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/libimobiledevice/libusbmuxd.git
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=f347085157006523622b0a7160be68d14f037c00
+PKG_SOURCE_VERSION:=4397b3376dc4e4cb1c991d0aed61ce6482614196
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
 
 PKG_FIXUP:=autoreconf
index 841ffa50e6f871f11820dc72c59888bf91d73d07..b6fda69bbcc5f2f3e08d8bf07f1c4d37a08a0f1e 100644 (file)
@@ -9,12 +9,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=v4l-utils
-PKG_VERSION:=1.6.3
+PKG_VERSION:=1.10.0
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://www.linuxtv.org/downloads/v4l-utils
-PKG_MD5SUM:=307858616be6374f63bf946307f15a7f
+PKG_MD5SUM:=945a38979138997e805828a4a53e53ec
 
 PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
 
@@ -76,7 +76,7 @@ define Package/v4l-utils/description
   This package contains the video4linux utilities.
 endef
 
-TARGET_CFLAGS += $(FPIC) -std=gnu99
+TARGET_CFLAGS += $(FPIC)
 TARGET_LDFLAGS += -largp
 
 CONFIGURE_ARGS+= \
diff --git a/libs/libv4l/patches/001-no-shm_open-fix.patch b/libs/libv4l/patches/001-no-shm_open-fix.patch
deleted file mode 100644 (file)
index 382f5c7..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
---- a/lib/libv4lconvert/control/libv4lcontrol.c
-+++ b/lib/libv4lconvert/control/libv4lcontrol.c
-@@ -570,7 +570,7 @@ static void v4lcontrol_get_flags_from_db
- struct v4lcontrol_data *v4lcontrol_create(int fd, void *dev_ops_priv,
-       const struct libv4l_dev_ops *dev_ops, int always_needs_conversion)
- {
--      int shm_fd;
-+      int shm_fd, fdflags;
-       int i, rc, got_usb_info, speed, init = 0;
-       char *s, shm_name[256], pwd_buf[1024];
-       struct v4l2_capability cap;
-@@ -695,33 +695,38 @@ struct v4lcontrol_data *v4lcontrol_creat
-       if (getpwuid_r(geteuid(), &pwd, pwd_buf, sizeof(pwd_buf), &pwd_p) == 0) {
-               if (got_usb_info)
--                      snprintf(shm_name, 256, "/libv4l-%s:%s:%04x:%04x:%s", pwd.pw_name,
-+                      snprintf(shm_name, 256, "/dev/shm/libv4l-%s:%s:%04x:%04x:%s", pwd.pw_name,
-                                       cap.bus_info, (int)vendor_id, (int)product_id, cap.card);
-               else
--                      snprintf(shm_name, 256, "/libv4l-%s:%s:%s", pwd.pw_name,
-+                      snprintf(shm_name, 256, "/dev/shm/libv4l-%s:%s:%s", pwd.pw_name,
-                                       cap.bus_info, cap.card);
-       } else {
-               perror("libv4lcontrol: error getting username using uid instead");
-               if (got_usb_info)
--                      snprintf(shm_name, 256, "/libv4l-%lu:%s:%04x:%04x:%s",
-+                      snprintf(shm_name, 256, "/dev/shm/libv4l-%lu:%s:%04x:%04x:%s",
-                                       (unsigned long)geteuid(), cap.bus_info,
-                                       (int)vendor_id, (int)product_id, cap.card);
-               else
--                      snprintf(shm_name, 256, "/libv4l-%lu:%s:%s", (unsigned long)geteuid(),
-+                      snprintf(shm_name, 256, "/dev/shm/libv4l-%lu:%s:%s", (unsigned long)geteuid(),
-                                       cap.bus_info, cap.card);
-       }
-       /* / is not allowed inside shm names */
--      for (i = 1; shm_name[i]; i++)
-+      for (i = 9; shm_name[i]; i++) /* start after "/dev/shm", i = 9 */
-               if (shm_name[i] == '/')
-                       shm_name[i] = '-';
-       /* Open the shared memory object identified by shm_name */
--      shm_fd = shm_open(shm_name, (O_CREAT | O_EXCL | O_RDWR), (S_IREAD | S_IWRITE));
-+      shm_fd = open(shm_name, (O_CREAT | O_EXCL | O_RDWR), (S_IREAD | S_IWRITE));
-       if (shm_fd >= 0)
-               init = 1;
-       else
--              shm_fd = shm_open(shm_name, O_RDWR, (S_IREAD | S_IWRITE));
-+              shm_fd = open(shm_name, O_RDWR, (S_IREAD | S_IWRITE));
-+
-+      /* This is all uClibc > 0.9.30 seems to do for shm_open() in librt/shm.c */
-+      fdflags = fcntl(shm_fd, F_GETFD, 0);
-+      if (fdflags >= 0)
-+              fdflags = fcntl(fd, F_SETFD, fdflags | FD_CLOEXEC);
-       if (shm_fd >= 0) {
-               /* Set the shared memory size */
diff --git a/libs/libv4l/patches/005-test_for_posix_ioctl.patch b/libs/libv4l/patches/005-test_for_posix_ioctl.patch
deleted file mode 100644 (file)
index e945bbf..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
---- a/configure.ac
-+++ b/configure.ac
-@@ -80,6 +80,20 @@ gl_VISIBILITY
- AC_CHECK_HEADERS([sys/klog.h])
- AC_CHECK_FUNCS([klogctl])
-+AC_CACHE_CHECK([for ioctl with POSIX signature],
-+  [gl_cv_func_ioctl_posix_signature],
-+  [AC_COMPILE_IFELSE(
-+     [AC_LANG_PROGRAM(
-+        [[#include <sys/ioctl.h>]],
-+        [[int ioctl (int, int, ...);]])
-+     ],
-+     [gl_cv_func_ioctl_posix_signature=yes],
-+     [gl_cv_func_ioctl_posix_signature=no])
-+  ])
-+if test "x$gl_cv_func_ioctl_posix_signature" = xyes; then
-+  AC_DEFINE([HAVE_POSIX_IOCTL], [1], [Have ioctl with POSIX signature])
-+fi
-+
- # Check host os
- case "$host_os" in
-   linux*)
diff --git a/libs/libv4l/patches/030-dont-call-getsubopt.patch b/libs/libv4l/patches/030-dont-call-getsubopt.patch
new file mode 100644 (file)
index 0000000..5824c70
--- /dev/null
@@ -0,0 +1,28 @@
+--- a/utils/v4l2-ctl/v4l2-ctl-common.cpp
++++ b/utils/v4l2-ctl/v4l2-ctl-common.cpp
+@@ -671,15 +671,18 @@ static bool parse_subset(char *optarg)
+ static bool parse_next_subopt(char **subs, char **value)
+ {
+-      static char *const subopts[] = {
+-          NULL
+-      };
+-      int opt = getsubopt(subs, subopts, value);
++      char *stmp = *subs;
++      *value = NULL;
+-      if (opt < 0 || *value)
++      if (*subs) {
++              *subs = strchr(stmp, ',');
++              if (*subs)
++                      *(*subs)++ = 0;
++              else *subs = stmp + strlen(stmp);
++
++              *value = stmp;
+               return false;
+-      fprintf(stderr, "No value given to suboption <%s>\n",
+-                      subopts[opt]);
++      }
+       return true;
+ }
diff --git a/libs/libv4l/patches/030-musl_compatibility.patch b/libs/libv4l/patches/030-musl_compatibility.patch
deleted file mode 100644 (file)
index 758be2b..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
---- a/lib/libv4lconvert/libv4lsyscall-priv.h
-+++ b/lib/libv4lconvert/libv4lsyscall-priv.h
-@@ -35,18 +35,23 @@
-    which is broken on some systems and doesn't include them itself :( */
- #ifdef linux
-+#define __NEED_off_t
- #include <sys/time.h>
- #include <syscall.h>
- #include <linux/types.h>
- #include <linux/ioctl.h>
- /* On 32 bits archs we always use mmap2, on 64 bits archs there is no mmap2 */
- #ifdef __NR_mmap2
-+#undef SYS_mmap2
- #define       SYS_mmap2 __NR_mmap2
- #define       MMAP2_PAGE_SHIFT 12
- #else
- #define       SYS_mmap2 SYS_mmap
- #define       MMAP2_PAGE_SHIFT 0
- #endif
-+#if !(defined(__UCLIBC__) || defined(__GLIBC__))
-+typedef off_t __off_t;
-+#endif
- #endif
- #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
---- a/lib/libv4l1/v4l1compat.c
-+++ b/lib/libv4l1/v4l1compat.c
-@@ -62,7 +62,7 @@ LIBV4L_PUBLIC int open(const char *file,
-       return fd;
- }
--#ifdef linux
-+#if defined(linux) && (defined(__GLIBC__) || defined(__UCLIBC__))
- LIBV4L_PUBLIC int open64(const char *file, int oflag, ...)
- {
-       int fd;
-@@ -94,7 +94,11 @@ LIBV4L_PUBLIC int dup(int fd)
-       return v4l1_dup(fd);
- }
-+#ifdef HAVE_POSIX_IOCTL
-+LIBV4L_PUBLIC int ioctl(int fd, int request, ...)
-+#else
- LIBV4L_PUBLIC int ioctl(int fd, unsigned long int request, ...)
-+#endif
- {
-       void *arg;
-       va_list ap;
-@@ -112,12 +116,12 @@ LIBV4L_PUBLIC ssize_t read(int fd, void
- }
- LIBV4L_PUBLIC void *mmap(void *start, size_t length, int prot, int flags, int fd,
--              __off_t offset)
-+              off_t offset)
- {
-       return v4l1_mmap(start, length, prot, flags, fd, offset);
- }
--#ifdef linux
-+#if defined(linux) && (defined(__GLIBC__) || defined(__UCLIBC__))
- LIBV4L_PUBLIC void *mmap64(void *start, size_t length, int prot, int flags, int fd,
-               __off64_t offset)
- {
---- a/lib/libv4l2/v4l2convert.c
-+++ b/lib/libv4l2/v4l2convert.c
-@@ -86,7 +86,7 @@ LIBV4L_PUBLIC int open(const char *file,
-       return fd;
- }
--#ifdef linux
-+#if defined(linux) && (defined(__GLIBC__) || defined(__UCLIBC__))
- LIBV4L_PUBLIC int open64(const char *file, int oflag, ...)
- {
-       int fd;
-@@ -121,7 +121,11 @@ LIBV4L_PUBLIC int dup(int fd)
-       return v4l2_dup(fd);
- }
-+#ifdef HAVE_POSIX_IOCTL
-+LIBV4L_PUBLIC int ioctl(int fd, int request, ...)
-+#else
- LIBV4L_PUBLIC int ioctl(int fd, unsigned long int request, ...)
-+#endif
- {
-       void *arg;
-       va_list ap;
-@@ -144,7 +148,7 @@ LIBV4L_PUBLIC void *mmap(void *start, si
-       return v4l2_mmap(start, length, prot, flags, fd, offset);
- }
--#ifdef linux
-+#if defined(linux) && (defined(__GLIBC__) || defined(__UCLIBC__))
- LIBV4L_PUBLIC void *mmap64(void *start, size_t length, int prot, int flags, int fd,
-               __off64_t offset)
- {
index 3e5f00462c1c8db1a6b59cc683daa95ce881240a..76375d01dac24ccaee9465e89d85fca1a032a544 100644 (file)
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libwebsockets
-PKG_VERSION:=1.5-chrome47-firefox41
+PKG_VERSION:=1.7.5
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
@@ -27,8 +27,7 @@ CMAKE_INSTALL:=1
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/cmake.mk
 
-CMAKE_OPTIONS += $(if $(CONFIG_IPV6),,-DLWS_IPV6=)
-
+CMAKE_OPTIONS += -DLWS_IPV6=$(if $(CONFIG_IPV6),ON,OFF)
 CMAKE_OPTIONS += -DLWS_WITHOUT_TESTAPPS=ON
 
 # other options worth noting
@@ -74,7 +73,7 @@ ifeq ($(BUILD_VARIANT),cyassl)
 # for cyassl, edit package/libs/cyassl/Makefile to include --enable-opensslextra
 # NOTE: it will compile without it, untested whether it it's needed?!
     CMAKE_OPTIONS += -DLWS_USE_CYASSL=ON
-    CMAKE_OPTIONS += -DLWS_CYASSL_LIB=$(STAGING_DIR)/usr/lib/libcyassl.so
+    CMAKE_OPTIONS += -DLWS_CYASSL_LIBRARIES=$(STAGING_DIR)/usr/lib/libcyassl.so
     CMAKE_OPTIONS += -DLWS_CYASSL_INCLUDE_DIRS=$(STAGING_DIR)/usr/include
 endif
 
index e892084ea80491a593cbaebc81aeca97578e7b12..a7cd6c62f66c8411ced4a2daaa547d26c91c2c99 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2015 OpenWrt.org
+# Copyright (C) 2015-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libxerces-c
-PKG_VERSION:=3.1.2
+PKG_VERSION:=3.1.3
 PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=git://git.apache.org/xerces-c.git
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=Xerces-C_3_1_2
+PKG_SOURCE_VERSION:=Xerces-C_3_1_3
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
 
index 8e09530e384dfe2a21f18c95639fc3b4c20acfcc..fd025148969db1c87020535ee6218e90c16d5a07 100644 (file)
@@ -130,5 +130,10 @@ define Package/libxml2/install
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxml2.so* $(1)/usr/lib/
 endef
 
+define Host/Install
+       $(SED) 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' $(HOST_BUILD_DIR)/xml2-config
+       $(call Host/Install/Default)
+endef
+
 $(eval $(call HostBuild))
 $(eval $(call BuildPackage,libxml2))
index f3fc66eed39a14f016b92c074256aef30ce2c751..cf17a2cffecde5be75db01e63d3e7049512eed27 100644 (file)
@@ -67,8 +67,8 @@ define Host/Compile
 endef
 
 define Host/Install
-       $(INSTALL_DIR) $(STAGING_DIR_HOST)/bin
-       $(CP) $(HOST_BUILD_DIR)/tools/bin/filterh $(STAGING_DIR_HOST)/bin/
+       $(INSTALL_DIR) $(STAGING_DIR)/host/bin
+       $(CP) $(HOST_BUILD_DIR)/tools/bin/filterh $(STAGING_DIR)/host/bin/
 endef
 
 $(eval $(call HostBuild))
index 74c166a6cc48340b2fe0d44fe59230e5f3345729..1edfd77b3a7b0cdcbc5d9c7478b4af60641f0c27 100644 (file)
@@ -14,7 +14,7 @@ diff -rupN libzdb-3.0.orig/Makefile.am libzdb-3.0/Makefile.am
  RE2C          = @RE2C@
  RE2CFLAGS       = -b
 -FILTERH         = ./tools/bin/filterh
-+FILTERH         = $(STAGING_DIR_HOST)/bin/filterh
++FILTERH         = $(STAGING_DIR)/host/bin/filterh
  
  AM_CPPFLAGS     = $(CPPFLAGS) $(DBCPPFLAGS)
  AM_CPPFLAGS     += -Isrc -Isrc/util -Isrc/net -Isrc/db -Isrc/exceptions
index 6a9c4144c361a1749a2c6375335749d7c217ce7f..7f0495ee62eefc7af3f4804e8cf16995ad885a43 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=pcre
-PKG_VERSION:=8.37
+PKG_VERSION:=8.38
 PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=@SF/pcre
-PKG_MD5SUM:=ed91be292cb01d21bc7e526816c26981
+PKG_SOURCE_URL:=ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/
+PKG_MD5SUM:=00aabbfe56d5a48b270f999b508c5ad2
 PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>
 
 PKG_LICENSE:=BSD-3-Clause
diff --git a/libs/pcre/patches/001-pcre-8.38-upstream_fixes-1.patch b/libs/pcre/patches/001-pcre-8.38-upstream_fixes-1.patch
new file mode 100644 (file)
index 0000000..d366e22
--- /dev/null
@@ -0,0 +1,1408 @@
+Submitted By: Ken Moffat <ken at linuxfromscratch dot org>
+Date: 2016-03-16
+Initial Package Version: 8.38
+Upstream Status: Applied
+Origin: Upstream, backported to 8.38 by Petr Písař at redhat
+Description: Various fixes, including for CVE-2016-1263 and many other
+bugs which have been fixed upstream.  Many of these bugs were found by
+fuzzing, upstream is trying to persuade its users to move to pcre2 and
+giving low priority to further pcre1 maintenance releases.
+
+From 3c80e02cd464ea049e117b423fd48fab294c51a9 Mon Sep 17 00:00:00 2001
+From: ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>
+Date: Thu, 26 Nov 2015 20:29:13 +0000
+Subject: [PATCH] Fix auto-callout (?# comment bug.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1611 2f5784b3-3f2a-0410-8824-cb99058d5e15
+
+Petr Pisar: Ported to 8.38.
+
+diff --git a/pcre_compile.c b/pcre_compile.c
+index 4d3b313..3360a8b 100644
+--- a/pcre_compile.c
++++ b/pcre_compile.c
+@@ -4699,6 +4699,23 @@ for (;; ptr++)
+       }
+     }
++  /* Skip over (?# comments. We need to do this here because we want to know if
++  the next thing is a quantifier, and these comments may come between an item
++  and its quantifier. */
++
++  if (c == CHAR_LEFT_PARENTHESIS && ptr[1] == CHAR_QUESTION_MARK &&
++      ptr[2] == CHAR_NUMBER_SIGN)
++    {
++    ptr += 3;
++    while (*ptr != CHAR_NULL && *ptr != CHAR_RIGHT_PARENTHESIS) ptr++;
++    if (*ptr == CHAR_NULL)
++      {
++      *errorcodeptr = ERR18;
++      goto FAILED;
++      }
++    continue;
++    }
++
+   /* See if the next thing is a quantifier. */
+   is_quantifier =
+@@ -6529,21 +6546,6 @@ for (;; ptr++)
+     case CHAR_LEFT_PARENTHESIS:
+     ptr++;
+-    /* First deal with comments. Putting this code right at the start ensures
+-    that comments have no bad side effects. */
+-
+-    if (ptr[0] == CHAR_QUESTION_MARK && ptr[1] == CHAR_NUMBER_SIGN)
+-      {
+-      ptr += 2;
+-      while (*ptr != CHAR_NULL && *ptr != CHAR_RIGHT_PARENTHESIS) ptr++;
+-      if (*ptr == CHAR_NULL)
+-        {
+-        *errorcodeptr = ERR18;
+-        goto FAILED;
+-        }
+-      continue;
+-      }
+-
+     /* Now deal with various "verbs" that can be introduced by '*'. */
+     if (ptr[0] == CHAR_ASTERISK && (ptr[1] == ':'
+diff --git a/testdata/testinput2 b/testdata/testinput2
+index e2e520f..92e3359 100644
+--- a/testdata/testinput2
++++ b/testdata/testinput2
+@@ -4217,4 +4217,12 @@ backtracking verbs. --/
+ /a[[:punct:]b]/BZ
++/L(?#(|++<!(2)?/BZ
++
++/L(?#(|++<!(2)?/BOZ
++
++/L(?#(|++<!(2)?/BCZ
++
++/L(?#(|++<!(2)?/BCOZ
++
+ /-- End of testinput2 --/
+diff --git a/testdata/testinput7 b/testdata/testinput7
+index e411a4b..00b9738 100644
+--- a/testdata/testinput7
++++ b/testdata/testinput7
+@@ -853,4 +853,8 @@ of case for anything other than the ASCII letters. --/
+ /a[b[:punct:]]/8WBZ
++/L(?#(|++<!(2)?/B8COZ
++
++/L(?#(|++<!(2)?/B8WCZ
++
+ /-- End of testinput7 --/
+diff --git a/testdata/testoutput2 b/testdata/testoutput2
+index 85c565d..2cf7a90 100644
+--- a/testdata/testoutput2
++++ b/testdata/testoutput2
+@@ -14574,4 +14574,40 @@ No match
+         End
+ ------------------------------------------------------------------
++/L(?#(|++<!(2)?/BZ
++------------------------------------------------------------------
++        Bra
++        L?+
++        Ket
++        End
++------------------------------------------------------------------
++
++/L(?#(|++<!(2)?/BOZ
++------------------------------------------------------------------
++        Bra
++        L?
++        Ket
++        End
++------------------------------------------------------------------
++
++/L(?#(|++<!(2)?/BCZ
++------------------------------------------------------------------
++        Bra
++        Callout 255 0 14
++        L?+
++        Callout 255 14 0
++        Ket
++        End
++------------------------------------------------------------------
++
++/L(?#(|++<!(2)?/BCOZ
++------------------------------------------------------------------
++        Bra
++        Callout 255 0 14
++        L?
++        Callout 255 14 0
++        Ket
++        End
++------------------------------------------------------------------
++
+ /-- End of testinput2 --/
+diff --git a/testdata/testoutput7 b/testdata/testoutput7
+index cc9ebdd..fdfff64 100644
+--- a/testdata/testoutput7
++++ b/testdata/testoutput7
+@@ -2348,4 +2348,24 @@ No match
+         End
+ ------------------------------------------------------------------
++/L(?#(|++<!(2)?/B8COZ
++------------------------------------------------------------------
++        Bra
++        Callout 255 0 14
++        L?
++        Callout 255 14 0
++        Ket
++        End
++------------------------------------------------------------------
++
++/L(?#(|++<!(2)?/B8WCZ
++------------------------------------------------------------------
++        Bra
++        Callout 255 0 14
++        L?+
++        Callout 255 14 0
++        Ket
++        End
++------------------------------------------------------------------
++
+ /-- End of testinput7 --/
+-- 
+2.4.3
+
+From ef6b10fcde41a2687f38d4a9ff2886b037948a1b Mon Sep 17 00:00:00 2001
+From: ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>
+Date: Fri, 27 Nov 2015 17:13:13 +0000
+Subject: [PATCH 1/5] Fix negated POSIX class within negated overall class UCP
+ bug.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1612 2f5784b3-3f2a-0410-8824-cb99058d5e15
+
+Petr Písař: Ported to 8.38.
+diff --git a/pcre_compile.c b/pcre_compile.c
+index 3360a8b..3670f1e 100644
+--- a/pcre_compile.c
++++ b/pcre_compile.c
+@@ -5063,20 +5063,22 @@ for (;; ptr++)
+             ptr = tempptr + 1;
+             continue;
+-            /* For the other POSIX classes (ascii, xdigit) we are going to fall
+-            through to the non-UCP case and build a bit map for characters with
+-            code points less than 256. If we are in a negated POSIX class
+-            within a non-negated overall class, characters with code points
+-            greater than 255 must all match. In the special case where we have
+-            not yet generated any xclass data, and this is the final item in
+-            the overall class, we need do nothing: later on, the opcode
++            /* For the other POSIX classes (ascii, cntrl, xdigit) we are going
++            to fall through to the non-UCP case and build a bit map for
++            characters with code points less than 256. If we are in a negated
++            POSIX class, characters with code points greater than 255 must
++            either all match or all not match. In the special case where we
++            have not yet generated any xclass data, and this is the final item
++            in the overall class, we need do nothing: later on, the opcode
+             OP_NCLASS will be used to indicate that characters greater than 255
+             are acceptable. If we have already seen an xclass item or one may
+             follow (we have to assume that it might if this is not the end of
+-            the class), explicitly match all wide codepoints. */
++            the class), explicitly list all wide codepoints, which will then
++            either not match or match, depending on whether the class is or is
++            not negated. */
+             default:
+-            if (!negate_class && local_negate &&
++            if (local_negate &&
+                 (xclass || tempptr[2] != CHAR_RIGHT_SQUARE_BRACKET))
+               {
+               *class_uchardata++ = XCL_RANGE;
+diff --git a/testdata/testinput6 b/testdata/testinput6
+index aeb62a0..a178d3d 100644
+--- a/testdata/testinput6
++++ b/testdata/testinput6
+@@ -1553,4 +1553,13 @@
+     \x{200}
+     \x{37e}
++/[^[:^ascii:]\d]/8W
++    a
++    ~
++    0
++    \a
++    \x{7f}
++    \x{389}
++    \x{20ac}
++
+ /-- End of testinput6 --/
+diff --git a/testdata/testoutput6 b/testdata/testoutput6
+index beb85aa..b64dc0d 100644
+--- a/testdata/testoutput6
++++ b/testdata/testoutput6
+@@ -2557,4 +2557,20 @@ No match
+     \x{37e}
+  0: \x{37e}
++/[^[:^ascii:]\d]/8W
++    a
++ 0: a
++    ~
++ 0: ~
++    0
++No match
++    \a
++ 0: \x{07}
++    \x{7f}
++ 0: \x{7f}
++    \x{389}
++No match
++    \x{20ac}
++No match
++
+ /-- End of testinput6 --/
+-- 
+2.4.3
+
+From bfc1dfa660c24dc7a75108d934290e50d7db2719 Mon Sep 17 00:00:00 2001
+From: ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>
+Date: Fri, 27 Nov 2015 17:41:04 +0000
+Subject: [PATCH 2/5] Fix bug for isolated \E between an item and its qualifier
+ when auto callout is set.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1613 2f5784b3-3f2a-0410-8824-cb99058d5e15
+
+Petr Písař: Ported to 8.38.
+
+diff --git a/pcre_compile.c b/pcre_compile.c
+index 3670f1e..5786cd3 100644
+--- a/pcre_compile.c
++++ b/pcre_compile.c
+@@ -4645,9 +4645,10 @@ for (;; ptr++)
+     goto FAILED;
+     }
+-  /* If in \Q...\E, check for the end; if not, we have a literal */
++  /* If in \Q...\E, check for the end; if not, we have a literal. Otherwise an
++  isolated \E is ignored. */
+-  if (inescq && c != CHAR_NULL)
++  if (c != CHAR_NULL)
+     {
+     if (c == CHAR_BACKSLASH && ptr[1] == CHAR_E)
+       {
+@@ -4655,7 +4656,7 @@ for (;; ptr++)
+       ptr++;
+       continue;
+       }
+-    else
++    else if (inescq)
+       {
+       if (previous_callout != NULL)
+         {
+@@ -4670,7 +4671,6 @@ for (;; ptr++)
+         }
+       goto NORMAL_CHAR;
+       }
+-    /* Control does not reach here. */
+     }
+   /* In extended mode, skip white space and comments. We need a loop in order
+diff --git a/testdata/testinput2 b/testdata/testinput2
+index 92e3359..e8ca4fe 100644
+--- a/testdata/testinput2
++++ b/testdata/testinput2
+@@ -4225,4 +4225,6 @@ backtracking verbs. --/
+ /L(?#(|++<!(2)?/BCOZ
++/(A*)\E+/CBZ
++
+ /-- End of testinput2 --/
+diff --git a/testdata/testoutput2 b/testdata/testoutput2
+index 2cf7a90..09756b8 100644
+--- a/testdata/testoutput2
++++ b/testdata/testoutput2
+@@ -14610,4 +14610,18 @@ No match
+         End
+ ------------------------------------------------------------------
++/(A*)\E+/CBZ
++------------------------------------------------------------------
++        Bra
++        Callout 255 0 7
++        SCBra 1
++        Callout 255 1 2
++        A*
++        Callout 255 3 0
++        KetRmax
++        Callout 255 7 0
++        Ket
++        End
++------------------------------------------------------------------
++
+ /-- End of testinput2 --/
+-- 
+2.4.3
+
+From 108377b836fc29a84f5286287629d96549b1c777 Mon Sep 17 00:00:00 2001
+From: ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>
+Date: Sun, 29 Nov 2015 17:38:25 +0000
+Subject: [PATCH 3/5] Give error for regexec with pmatch=NULL and REG_STARTEND
+ set.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1614 2f5784b3-3f2a-0410-8824-cb99058d5e15
+
+Petr Písař: Ported to 8.38.
+
+diff --git a/pcreposix.c b/pcreposix.c
+index f024423..dcc13ef 100644
+--- a/pcreposix.c
++++ b/pcreposix.c
+@@ -364,6 +364,7 @@ start location rather than being passed as a PCRE "starting offset". */
+ if ((eflags & REG_STARTEND) != 0)
+   {
++  if (pmatch == NULL) return REG_INVARG; 
+   so = pmatch[0].rm_so;
+   eo = pmatch[0].rm_eo;
+   }
+-- 
+2.4.3
+
+From e347b40d5bb12f7ef1e632aa649571a107be7d8a Mon Sep 17 00:00:00 2001
+From: ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>
+Date: Sun, 29 Nov 2015 17:46:23 +0000
+Subject: [PATCH 4/5] Allow for up to 32-bit numbers in the ordin() function in
+ pcregrep.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1615 2f5784b3-3f2a-0410-8824-cb99058d5e15
+
+Petr Písař: Ported to 8.38.
+
+diff --git a/pcregrep.c b/pcregrep.c
+index 64986b0..cd53c64 100644
+--- a/pcregrep.c
++++ b/pcregrep.c
+@@ -2437,7 +2437,7 @@ return options;
+ static char *
+ ordin(int n)
+ {
+-static char buffer[8];
++static char buffer[14];
+ char *p = buffer;
+ sprintf(p, "%d", n);
+ while (*p != 0) p++;
+-- 
+2.4.3
+
+From e78ad4264b16988b826bd2939a1781c1165a92d9 Mon Sep 17 00:00:00 2001
+From: ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>
+Date: Mon, 30 Nov 2015 17:44:45 +0000
+Subject: [PATCH 5/5] Fix \Q\E before qualifier bug when auto callouts are
+ enabled.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1616 2f5784b3-3f2a-0410-8824-cb99058d5e15
+
+Petr Písař: Ported to 8.38.
+
+diff --git a/pcre_compile.c b/pcre_compile.c
+index 5786cd3..beed46b 100644
+--- a/pcre_compile.c
++++ b/pcre_compile.c
+@@ -4671,17 +4671,27 @@ for (;; ptr++)
+         }
+       goto NORMAL_CHAR;
+       }
++      
++    /* Check for the start of a \Q...\E sequence. We must do this here rather
++    than later in case it is immediately followed by \E, which turns it into a
++    "do nothing" sequence. */                                            
++                                                                          
++    if (c == CHAR_BACKSLASH && ptr[1] == CHAR_Q)
++      {                                                                   
++      inescq = TRUE;                                                      
++      ptr++;                                                  
++      continue;
++      }           
+     }
+-  /* In extended mode, skip white space and comments. We need a loop in order
+-  to check for more white space and more comments after a comment. */
++  /* In extended mode, skip white space and comments. */
+   if ((options & PCRE_EXTENDED) != 0)
+     {
+-    for (;;)
++    const pcre_uchar *wscptr = ptr;
++    while (MAX_255(c) && (cd->ctypes[c] & ctype_space) != 0) c = *(++ptr);
++    if (c == CHAR_NUMBER_SIGN)
+       {
+-      while (MAX_255(c) && (cd->ctypes[c] & ctype_space) != 0) c = *(++ptr);
+-      if (c != CHAR_NUMBER_SIGN) break;
+       ptr++;
+       while (*ptr != CHAR_NULL)
+         {
+@@ -4695,7 +4705,15 @@ for (;; ptr++)
+         if (utf) FORWARDCHAR(ptr);
+ #endif
+         }
+-      c = *ptr;     /* Either NULL or the char after a newline */
++      }
++
++    /* If we skipped any characters, restart the loop. Otherwise, we didn't see
++    a comment. */
++
++    if (ptr > wscptr)
++      {
++      ptr--;
++      continue;
+       }
+     }
+@@ -7900,16 +7918,6 @@ for (;; ptr++)
+       c = ec;
+     else
+       {
+-      if (escape == ESC_Q)            /* Handle start of quoted string */
+-        {
+-        if (ptr[1] == CHAR_BACKSLASH && ptr[2] == CHAR_E)
+-          ptr += 2;               /* avoid empty string */
+-            else inescq = TRUE;
+-        continue;
+-        }
+-
+-      if (escape == ESC_E) continue;  /* Perl ignores an orphan \E */
+-
+       /* For metasequences that actually match a character, we disable the
+       setting of a first character if it hasn't already been set. */
+diff --git a/testdata/testinput2 b/testdata/testinput2
+index e8ca4fe..3a1134f 100644
+--- a/testdata/testinput2
++++ b/testdata/testinput2
+@@ -4227,4 +4227,6 @@ backtracking verbs. --/
+ /(A*)\E+/CBZ
++/()\Q\E*]/BCZ
++
+ /-- End of testinput2 --/
+diff --git a/testdata/testoutput2 b/testdata/testoutput2
+index 09756b8..ac33cc4 100644
+--- a/testdata/testoutput2
++++ b/testdata/testoutput2
+@@ -14624,4 +14624,19 @@ No match
+         End
+ ------------------------------------------------------------------
++/()\Q\E*]/BCZ
++------------------------------------------------------------------
++        Bra
++        Callout 255 0 7
++        Brazero
++        SCBra 1
++        Callout 255 1 0
++        KetRmax
++        Callout 255 7 1
++        ]
++        Callout 255 8 0
++        Ket
++        End
++------------------------------------------------------------------
++
+ /-- End of testinput2 --/
+-- 
+2.4.3
+
+From 46ed1a703b067e5b679eacf6500a54dae35f8130 Mon Sep 17 00:00:00 2001
+From: ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>
+Date: Thu, 3 Dec 2015 17:05:40 +0000
+Subject: [PATCH] Fix /x bug when pattern starts with white space and (?-x)
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1617 2f5784b3-3f2a-0410-8824-cb99058d5e15
+
+Petr Písař: Ported to 8.38.
+
+diff --git a/pcre_compile.c b/pcre_compile.c
+index beed46b..57719b9 100644
+--- a/pcre_compile.c
++++ b/pcre_compile.c
+@@ -7607,39 +7607,15 @@ for (;; ptr++)
+         newoptions = (options | set) & (~unset);
+         /* If the options ended with ')' this is not the start of a nested
+-        group with option changes, so the options change at this level. If this
+-        item is right at the start of the pattern, the options can be
+-        abstracted and made external in the pre-compile phase, and ignored in
+-        the compile phase. This can be helpful when matching -- for instance in
+-        caseless checking of required bytes.
+-
+-        If the code pointer is not (cd->start_code + 1 + LINK_SIZE), we are
+-        definitely *not* at the start of the pattern because something has been
+-        compiled. In the pre-compile phase, however, the code pointer can have
+-        that value after the start, because it gets reset as code is discarded
+-        during the pre-compile. However, this can happen only at top level - if
+-        we are within parentheses, the starting BRA will still be present. At
+-        any parenthesis level, the length value can be used to test if anything
+-        has been compiled at that level. Thus, a test for both these conditions
+-        is necessary to ensure we correctly detect the start of the pattern in
+-        both phases.
+-
++        group with option changes, so the options change at this level. 
+         If we are not at the pattern start, reset the greedy defaults and the
+         case value for firstchar and reqchar. */
+         if (*ptr == CHAR_RIGHT_PARENTHESIS)
+           {
+-          if (code == cd->start_code + 1 + LINK_SIZE &&
+-               (lengthptr == NULL || *lengthptr == 2 + 2*LINK_SIZE))
+-            {
+-            cd->external_options = newoptions;
+-            }
+-          else
+-            {
+-            greedy_default = ((newoptions & PCRE_UNGREEDY) != 0);
+-            greedy_non_default = greedy_default ^ 1;
+-            req_caseopt = ((newoptions & PCRE_CASELESS) != 0)? REQ_CASELESS:0;
+-            }
++          greedy_default = ((newoptions & PCRE_UNGREEDY) != 0);
++          greedy_non_default = greedy_default ^ 1;
++          req_caseopt = ((newoptions & PCRE_CASELESS) != 0)? REQ_CASELESS:0;
+           /* Change options at this level, and pass them back for use
+           in subsequent branches. */
+diff --git a/testdata/testoutput2 b/testdata/testoutput2
+index ac33cc4..6c42897 100644
+--- a/testdata/testoutput2
++++ b/testdata/testoutput2
+@@ -419,7 +419,7 @@ Need char = '>'
+ /(?U)<.*>/I
+ Capturing subpattern count = 0
+-Options: ungreedy
++No options
+ First char = '<'
+ Need char = '>'
+     abc<def>ghi<klm>nop
+@@ -443,7 +443,7 @@ Need char = '='
+ /(?U)={3,}?/I
+ Capturing subpattern count = 0
+-Options: ungreedy
++No options
+ First char = '='
+ Need char = '='
+     abc========def
+@@ -477,7 +477,7 @@ Failed: lookbehind assertion is not fixed length at offset 12
+ /(?i)abc/I
+ Capturing subpattern count = 0
+-Options: caseless
++No options
+ First char = 'a' (caseless)
+ Need char = 'c' (caseless)
+@@ -489,7 +489,7 @@ No need char
+ /(?i)^1234/I
+ Capturing subpattern count = 0
+-Options: anchored caseless
++Options: anchored
+ No first char
+ No need char
+@@ -502,7 +502,7 @@ No need char
+ /(?s).*/I
+ Capturing subpattern count = 0
+ May match empty string
+-Options: anchored dotall
++Options: anchored
+ No first char
+ No need char
+@@ -516,7 +516,7 @@ Starting chars: a b c d
+ /(?i)[abcd]/IS
+ Capturing subpattern count = 0
+-Options: caseless
++No options
+ No first char
+ No need char
+ Subject length lower bound = 1
+@@ -524,7 +524,7 @@ Starting chars: A B C D a b c d
+ /(?m)[xy]|(b|c)/IS
+ Capturing subpattern count = 1
+-Options: multiline
++No options
+ No first char
+ No need char
+ Subject length lower bound = 1
+@@ -538,7 +538,7 @@ No need char
+ /(?i)(^a|^b)/Im
+ Capturing subpattern count = 1
+-Options: caseless multiline
++Options: multiline
+ First char at start or follows newline
+ No need char
+@@ -1179,7 +1179,7 @@ No need char
+         End
+ ------------------------------------------------------------------
+ Capturing subpattern count = 1
+-Options: anchored dotall
++Options: anchored
+ No first char
+ No need char
+@@ -2735,7 +2735,7 @@ No match
+         End
+ ------------------------------------------------------------------
+ Capturing subpattern count = 0
+-Options: caseless extended
++Options: extended
+ First char = 'a' (caseless)
+ Need char = 'c' (caseless)
+@@ -2748,7 +2748,7 @@ Need char = 'c' (caseless)
+         End
+ ------------------------------------------------------------------
+ Capturing subpattern count = 0
+-Options: caseless extended
++Options: extended
+ First char = 'a' (caseless)
+ Need char = 'c' (caseless)
+@@ -3095,7 +3095,7 @@ Need char = 'b'
+         End
+ ------------------------------------------------------------------
+ Capturing subpattern count = 0
+-Options: ungreedy
++No options
+ First char = 'x'
+ Need char = 'b'
+     xaaaab
+@@ -3497,7 +3497,7 @@ Need char = 'c'
+ /(?i)[ab]/IS
+ Capturing subpattern count = 0
+-Options: caseless
++No options
+ No first char
+ No need char
+ Subject length lower bound = 1
+@@ -6299,7 +6299,7 @@ Capturing subpattern count = 3
+ Named capturing subpatterns:
+   A   2
+   A   3
+-Options: anchored dupnames
++Options: anchored
+ Duplicate name status changes
+ No first char
+ No need char
+-- 
+2.4.3
+
+From db1fb68feddc9afe6f8822d099fa9ff25e3ea8e7 Mon Sep 17 00:00:00 2001
+From: ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>
+Date: Sat, 5 Dec 2015 16:30:14 +0000
+Subject: [PATCH] Fix copy named substring bug.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1618 2f5784b3-3f2a-0410-8824-cb99058d5e15
+
+Petr Písař: Ported to 8.38.
+diff --git a/pcre_get.c b/pcre_get.c
+index 8094b34..41eda9c 100644
+--- a/pcre_get.c
++++ b/pcre_get.c
+@@ -250,6 +250,7 @@ Arguments:
+   code         the compiled regex
+   stringname   the name of the capturing substring
+   ovector      the vector of matched substrings
++  stringcount  number of captured substrings 
+ Returns:       the number of the first that is set,
+                or the number of the last one if none are set,
+@@ -258,13 +259,16 @@ Returns:       the number of the first that is set,
+ #if defined COMPILE_PCRE8
+ static int
+-get_first_set(const pcre *code, const char *stringname, int *ovector)
++get_first_set(const pcre *code, const char *stringname, int *ovector,
++  int stringcount)
+ #elif defined COMPILE_PCRE16
+ static int
+-get_first_set(const pcre16 *code, PCRE_SPTR16 stringname, int *ovector)
++get_first_set(const pcre16 *code, PCRE_SPTR16 stringname, int *ovector,
++  int stringcount)
+ #elif defined COMPILE_PCRE32
+ static int
+-get_first_set(const pcre32 *code, PCRE_SPTR32 stringname, int *ovector)
++get_first_set(const pcre32 *code, PCRE_SPTR32 stringname, int *ovector,
++  int stringcount)
+ #endif
+ {
+ const REAL_PCRE *re = (const REAL_PCRE *)code;
+@@ -295,7 +299,7 @@ if (entrysize <= 0) return entrysize;
+ for (entry = (pcre_uchar *)first; entry <= (pcre_uchar *)last; entry += entrysize)
+   {
+   int n = GET2(entry, 0);
+-  if (ovector[n*2] >= 0) return n;
++  if (n < stringcount && ovector[n*2] >= 0) return n;
+   }
+ return GET2(entry, 0);
+ }
+@@ -402,7 +406,7 @@ pcre32_copy_named_substring(const pcre32 *code, PCRE_SPTR32 subject,
+   PCRE_UCHAR32 *buffer, int size)
+ #endif
+ {
+-int n = get_first_set(code, stringname, ovector);
++int n = get_first_set(code, stringname, ovector, stringcount);
+ if (n <= 0) return n;
+ #if defined COMPILE_PCRE8
+ return pcre_copy_substring(subject, ovector, stringcount, n, buffer, size);
+@@ -619,7 +623,7 @@ pcre32_get_named_substring(const pcre32 *code, PCRE_SPTR32 subject,
+   PCRE_SPTR32 *stringptr)
+ #endif
+ {
+-int n = get_first_set(code, stringname, ovector);
++int n = get_first_set(code, stringname, ovector, stringcount);
+ if (n <= 0) return n;
+ #if defined COMPILE_PCRE8
+ return pcre_get_substring(subject, ovector, stringcount, n, stringptr);
+diff --git a/testdata/testinput2 b/testdata/testinput2
+index 3a1134f..00ffe32 100644
+--- a/testdata/testinput2
++++ b/testdata/testinput2
+@@ -4229,4 +4229,7 @@ backtracking verbs. --/
+ /()\Q\E*]/BCZ
++/(?<A>)(?J:(?<B>)(?<B>))(?<C>)/
++    \O\CC
++
+ /-- End of testinput2 --/
+diff --git a/testdata/testoutput2 b/testdata/testoutput2
+index 6c42897..ffb4466 100644
+--- a/testdata/testoutput2
++++ b/testdata/testoutput2
+@@ -14639,4 +14639,9 @@ No match
+         End
+ ------------------------------------------------------------------
++/(?<A>)(?J:(?<B>)(?<B>))(?<C>)/
++    \O\CC
++Matched, but too many substrings
++copy substring C failed -7
++
+ /-- End of testinput2 --/
+-- 
+2.4.3
+
+From 40363ebc19baeab160abaaa55dc84322a89ac35a Mon Sep 17 00:00:00 2001
+From: ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>
+Date: Sat, 5 Dec 2015 16:58:46 +0000
+Subject: [PATCH] Fix (by hacking) another length computation issue.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1619 2f5784b3-3f2a-0410-8824-cb99058d5e15
+
+Petr Písař: Ported to 8.38.
+
+diff --git a/pcre_compile.c b/pcre_compile.c
+index 57719b9..087bf2a 100644
+--- a/pcre_compile.c
++++ b/pcre_compile.c
+@@ -7280,7 +7280,7 @@ for (;; ptr++)
+           issue is fixed "properly" in PCRE2. As PCRE1 is now in maintenance
+           only mode, we finesse the bug by allowing more memory always. */
+-          *lengthptr += 2 + 2*LINK_SIZE;
++          *lengthptr += 4 + 4*LINK_SIZE;
+           /* It is even worse than that. The current reference may be to an
+           existing named group with a different number (so apparently not
+diff --git a/testdata/testoutput11-16 b/testdata/testoutput11-16
+index 9a0a12d..280692e 100644
+--- a/testdata/testoutput11-16
++++ b/testdata/testoutput11-16
+@@ -231,7 +231,7 @@ Memory allocation (code space): 73
+ ------------------------------------------------------------------
+ /(?P<a>a)...(?P=a)bbb(?P>a)d/BM
+-Memory allocation (code space): 77
++Memory allocation (code space): 93
+ ------------------------------------------------------------------
+   0  24 Bra
+   2   5 CBra 1
+diff --git a/testdata/testoutput11-32 b/testdata/testoutput11-32
+index 57e5da0..cdbda74 100644
+--- a/testdata/testoutput11-32
++++ b/testdata/testoutput11-32
+@@ -231,7 +231,7 @@ Memory allocation (code space): 155
+ ------------------------------------------------------------------
+ /(?P<a>a)...(?P=a)bbb(?P>a)d/BM
+-Memory allocation (code space): 157
++Memory allocation (code space): 189
+ ------------------------------------------------------------------
+   0  24 Bra
+   2   5 CBra 1
+diff --git a/testdata/testoutput11-8 b/testdata/testoutput11-8
+index 748548a..cb37896 100644
+--- a/testdata/testoutput11-8
++++ b/testdata/testoutput11-8
+@@ -231,7 +231,7 @@ Memory allocation (code space): 45
+ ------------------------------------------------------------------
+ /(?P<a>a)...(?P=a)bbb(?P>a)d/BM
+-Memory allocation (code space): 50
++Memory allocation (code space): 62
+ ------------------------------------------------------------------
+   0  30 Bra
+   3   7 CBra 1
+-- 
+2.4.3
+
+From 4f47274a2eb10131d88145ad7fd0eed4027a0c51 Mon Sep 17 00:00:00 2001
+From: ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>
+Date: Tue, 8 Dec 2015 11:06:40 +0000
+Subject: [PATCH] Fix get_substring_list() bug when \K is used in an assertion.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1620 2f5784b3-3f2a-0410-8824-cb99058d5e15
+
+Petr Písař: ported to 8.38.
+
+diff --git a/pcre_get.c b/pcre_get.c
+index 41eda9c..cdd2abc 100644
+--- a/pcre_get.c
++++ b/pcre_get.c
+@@ -461,7 +461,10 @@ pcre_uchar **stringlist;
+ pcre_uchar *p;
+ for (i = 0; i < double_count; i += 2)
+-  size += sizeof(pcre_uchar *) + IN_UCHARS(ovector[i+1] - ovector[i] + 1);
++  {
++  size += sizeof(pcre_uchar *) + IN_UCHARS(1);
++  if (ovector[i+1] > ovector[i]) size += IN_UCHARS(ovector[i+1] - ovector[i]);
++  } 
+ stringlist = (pcre_uchar **)(PUBL(malloc))(size);
+ if (stringlist == NULL) return PCRE_ERROR_NOMEMORY;
+@@ -477,7 +480,7 @@ p = (pcre_uchar *)(stringlist + stringcount + 1);
+ for (i = 0; i < double_count; i += 2)
+   {
+-  int len = ovector[i+1] - ovector[i];
++  int len = (ovector[i+1] > ovector[i])? (ovector[i+1] - ovector[i]) : 0;
+   memcpy(p, subject + ovector[i], IN_UCHARS(len));
+   *stringlist++ = p;
+   p += len;
+diff --git a/testdata/testinput2 b/testdata/testinput2
+index 00ffe32..967a241 100644
+--- a/testdata/testinput2
++++ b/testdata/testinput2
+@@ -4232,4 +4232,7 @@ backtracking verbs. --/
+ /(?<A>)(?J:(?<B>)(?<B>))(?<C>)/
+     \O\CC
++/(?=a\K)/ 
++    ring bpattingbobnd $ 1,oern cou \rb\L
++
+ /-- End of testinput2 --/
+diff --git a/testdata/testoutput2 b/testdata/testoutput2
+index ffb4466..5fb28d5 100644
+--- a/testdata/testoutput2
++++ b/testdata/testoutput2
+@@ -14644,4 +14644,10 @@ No match
+ Matched, but too many substrings
+ copy substring C failed -7
++/(?=a\K)/ 
++    ring bpattingbobnd $ 1,oern cou \rb\L
++Start of matched string is beyond its end - displaying from end to start.
++ 0: a
++ 0L 
++
+ /-- End of testinput2 --/
+-- 
+2.5.0
+
+From 3da5528b47b88c32224cf9d14d8a4e80cd7a0815 Mon Sep 17 00:00:00 2001
+From: ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>
+Date: Sat, 6 Feb 2016 16:54:14 +0000
+Subject: [PATCH] Fix pcretest bad behaviour for callout in lookbehind.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1625 2f5784b3-3f2a-0410-8824-cb99058d5e15
+
+Petr Písař: Ported to 8.38.
+
+diff --git a/pcretest.c b/pcretest.c
+index 488e419..63869fd 100644
+--- a/pcretest.c
++++ b/pcretest.c
+@@ -2250,7 +2250,7 @@ data is not zero. */
+ static int callout(pcre_callout_block *cb)
+ {
+ FILE *f = (first_callout | callout_extra)? outfile : NULL;
+-int i, pre_start, post_start, subject_length;
++int i, current_position, pre_start, post_start, subject_length;
+ if (callout_extra)
+   {
+@@ -2280,14 +2280,19 @@ printed lengths of the substrings. */
+ if (f != NULL) fprintf(f, "--->");
++/* If a lookbehind is involved, the current position may be earlier than the
++match start. If so, use the match start instead. */
++
++current_position = (cb->current_position >= cb->start_match)?
++  cb->current_position : cb->start_match;
++
+ PCHARS(pre_start, cb->subject, 0, cb->start_match, f);
+ PCHARS(post_start, cb->subject, cb->start_match,
+-  cb->current_position - cb->start_match, f);
++  current_position - cb->start_match, f);
+ PCHARS(subject_length, cb->subject, 0, cb->subject_length, NULL);
+-PCHARSV(cb->subject, cb->current_position,
+-  cb->subject_length - cb->current_position, f);
++PCHARSV(cb->subject, current_position, cb->subject_length - current_position, f);
+ if (f != NULL) fprintf(f, "\n");
+@@ -5740,3 +5745,4 @@ return yield;
+ }
+ /* End of pcretest.c */
++
+diff --git a/testdata/testinput2 b/testdata/testinput2
+index 967a241..086e0f4 100644
+--- a/testdata/testinput2
++++ b/testdata/testinput2
+@@ -4235,4 +4235,8 @@ backtracking verbs. --/
+ /(?=a\K)/ 
+     ring bpattingbobnd $ 1,oern cou \rb\L
++/(?<=((?C)0))/
++    9010
++    abcd
++     
+ /-- End of testinput2 --/
+diff --git a/testdata/testoutput2 b/testdata/testoutput2
+index 5fb28d5..d414a72 100644
+--- a/testdata/testoutput2
++++ b/testdata/testoutput2
+@@ -14650,4 +14650,19 @@ Start of matched string is beyond its end - displaying from end to start.
+  0: a
+  0L 
++/(?<=((?C)0))/
++    9010
++--->9010
++  0  ^       0
++  0   ^      0
++ 0: 
++ 1: 0
++    abcd
++--->abcd
++  0  ^       0
++  0   ^      0
++  0    ^     0
++  0     ^    0
++No match
++     
+ /-- End of testinput2 --/
+-- 
+2.5.0
+
+From 943a5105b9fe2842851003f692c7077a6cdbeefe Mon Sep 17 00:00:00 2001
+From: ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>
+Date: Wed, 10 Feb 2016 19:13:17 +0000
+Subject: [PATCH] Fix workspace overflow for (*ACCEPT) with deeply nested
+ parentheses.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1631 2f5784b3-3f2a-0410-8824-cb99058d5e15
+
+Petr Písař: Ported to 8.38.
+
+diff --git a/pcre_compile.c b/pcre_compile.c
+index b9a239e..5019854 100644
+--- a/pcre_compile.c
++++ b/pcre_compile.c
+@@ -6,7 +6,7 @@
+ and semantics are as close as possible to those of the Perl 5 language.
+                        Written by Philip Hazel
+-           Copyright (c) 1997-2014 University of Cambridge
++           Copyright (c) 1997-2016 University of Cambridge
+ -----------------------------------------------------------------------------
+ Redistribution and use in source and binary forms, with or without
+@@ -560,6 +560,7 @@ static const char error_texts[] =
+   /* 85 */
+   "parentheses are too deeply nested (stack check)\0"
+   "digits missing in \\x{} or \\o{}\0"
++  "regular expression is too complicated\0"
+   ;
+ /* Table to identify digits and hex digits. This is used when compiling
+@@ -4591,7 +4592,8 @@ for (;; ptr++)
+     if (code > cd->start_workspace + cd->workspace_size -
+         WORK_SIZE_SAFETY_MARGIN)                       /* Check for overrun */
+       {
+-      *errorcodeptr = ERR52;
++      *errorcodeptr = (code >= cd->start_workspace + cd->workspace_size)?
++        ERR52 : ERR87;
+       goto FAILED;
+       }
+@@ -6626,8 +6628,21 @@ for (;; ptr++)
+             cd->had_accept = TRUE;
+             for (oc = cd->open_caps; oc != NULL; oc = oc->next)
+               {
+-              *code++ = OP_CLOSE;
+-              PUT2INC(code, 0, oc->number);
++              if (lengthptr != NULL)
++                {
++#ifdef COMPILE_PCRE8
++                *lengthptr += 1 + IMM2_SIZE;
++#elif defined COMPILE_PCRE16
++                *lengthptr += 2 + IMM2_SIZE;
++#elif defined COMPILE_PCRE32
++                *lengthptr += 4 + IMM2_SIZE;
++#endif
++                }
++              else
++                {
++                *code++ = OP_CLOSE;
++                PUT2INC(code, 0, oc->number);
++                }
+               }
+             setverb = *code++ =
+               (cd->assert_depth > 0)? OP_ASSERT_ACCEPT : OP_ACCEPT;
+diff --git a/pcre_internal.h b/pcre_internal.h
+index f7a5ee7..dbfe80e 100644
+--- a/pcre_internal.h
++++ b/pcre_internal.h
+@@ -7,7 +7,7 @@
+ and semantics are as close as possible to those of the Perl 5 language.
+                        Written by Philip Hazel
+-           Copyright (c) 1997-2014 University of Cambridge
++           Copyright (c) 1997-2016 University of Cambridge
+ -----------------------------------------------------------------------------
+ Redistribution and use in source and binary forms, with or without
+@@ -2289,7 +2289,7 @@ enum { ERR0,  ERR1,  ERR2,  ERR3,  ERR4,  ERR5,  ERR6,  ERR7,  ERR8,  ERR9,
+        ERR50, ERR51, ERR52, ERR53, ERR54, ERR55, ERR56, ERR57, ERR58, ERR59,
+        ERR60, ERR61, ERR62, ERR63, ERR64, ERR65, ERR66, ERR67, ERR68, ERR69,
+        ERR70, ERR71, ERR72, ERR73, ERR74, ERR75, ERR76, ERR77, ERR78, ERR79,
+-       ERR80, ERR81, ERR82, ERR83, ERR84, ERR85, ERR86, ERRCOUNT };
++       ERR80, ERR81, ERR82, ERR83, ERR84, ERR85, ERR86, ERR87, ERRCOUNT };
+ /* JIT compiling modes. The function list is indexed by them. */
+diff --git a/pcreposix.c b/pcreposix.c
+index dcc13ef..55b6ddc 100644
+--- a/pcreposix.c
++++ b/pcreposix.c
+@@ -6,7 +6,7 @@
+ and semantics are as close as possible to those of the Perl 5 language.
+                        Written by Philip Hazel
+-           Copyright (c) 1997-2014 University of Cambridge
++           Copyright (c) 1997-2016 University of Cambridge
+ -----------------------------------------------------------------------------
+ Redistribution and use in source and binary forms, with or without
+@@ -173,7 +173,8 @@ static const int eint[] = {
+   REG_BADPAT,  /* group name must start with a non-digit */
+   /* 85 */
+   REG_BADPAT,  /* parentheses too deeply nested (stack check) */
+-  REG_BADPAT   /* missing digits in \x{} or \o{} */
++  REG_BADPAT,  /* missing digits in \x{} or \o{} */
++  REG_BADPAT   /* pattern too complicated */
+ };
+ /* Table of texts corresponding to POSIX error codes */
+diff --git a/testdata/testinput11 b/testdata/testinput11
+index ac9d228..6f0989a 100644
+--- a/testdata/testinput11
++++ b/testdata/testinput11
+@@ -138,4 +138,6 @@ is required for these tests. --/
+ /.((?2)(?R)\1)()/B
++/([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00](*ACCEPT)/
++
+ /-- End of testinput11 --/
+diff --git a/testdata/testoutput11-16 b/testdata/testoutput11-16
+index 280692e..3c485da 100644
+--- a/testdata/testoutput11-16
++++ b/testdata/testoutput11-16
+@@ -765,4 +765,7 @@ Memory allocation (code space): 14
+  25     End
+ ------------------------------------------------------------------
++/([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00](*ACCEPT)/
++Failed: regular expression is too complicated at offset 490
++
+ /-- End of testinput11 --/
+diff --git a/testdata/testoutput11-32 b/testdata/testoutput11-32
+index cdbda74..e19518d 100644
+--- a/testdata/testoutput11-32
++++ b/testdata/testoutput11-32
+@@ -765,4 +765,7 @@ Memory allocation (code space): 28
+  25     End
+ ------------------------------------------------------------------
++/([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00](*ACCEPT)/
++Failed: missing ) at offset 509
++
+ /-- End of testinput11 --/
+diff --git a/testdata/testoutput11-8 b/testdata/testoutput11-8
+index cb37896..5a4fbb2 100644
+--- a/testdata/testoutput11-8
++++ b/testdata/testoutput11-8
+@@ -765,4 +765,7 @@ Memory allocation (code space): 10
+  38     End
+ ------------------------------------------------------------------
++/([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00](*ACCEPT)/
++Failed: missing ) at offset 509
++
+ /-- End of testinput11 --/
+-- 
+2.5.0
+
+From b7537308b7c758f33c347cb0bec62754c43c271f Mon Sep 17 00:00:00 2001
+From: ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>
+Date: Sat, 27 Feb 2016 17:38:11 +0000
+Subject: [PATCH] Yet another duplicate name bugfix by overestimating the
+ memory needed (i.e. another hack - PCRE2 has this "properly" fixed).
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1636 2f5784b3-3f2a-0410-8824-cb99058d5e15
+
+Petr Písař: Ported to 8.38.
+
+diff --git a/pcre_compile.c b/pcre_compile.c
+index 5019854..4ffea0c 100644
+--- a/pcre_compile.c
++++ b/pcre_compile.c
+@@ -7311,7 +7311,12 @@ for (;; ptr++)
+           so far in order to get the number. If the name is not found, leave
+           the value of recno as 0 for a forward reference. */
+-          else
++          /* This patch (removing "else") fixes a problem when a reference is
++          to multiple identically named nested groups from within the nest.
++          Once again, it is not the "proper" fix, and it results in an
++          over-allocation of memory. */
++
++          /* else */
+             {
+             ng = cd->named_groups;
+             for (i = 0; i < cd->names_found; i++, ng++)
+diff --git a/testdata/testinput2 b/testdata/testinput2
+index 086e0f4..c805f5f 100644
+--- a/testdata/testinput2
++++ b/testdata/testinput2
+@@ -4239,4 +4239,6 @@ backtracking verbs. --/
+     9010
+     abcd
+      
++/((?J)(?'R'(?'R'(?'R'(?'R'(?'R'(?|(\k'R'))))))))/
++
+ /-- End of testinput2 --/
+diff --git a/testdata/testoutput2 b/testdata/testoutput2
+index d414a72..800a72f 100644
+--- a/testdata/testoutput2
++++ b/testdata/testoutput2
+@@ -14665,4 +14665,6 @@ Start of matched string is beyond its end - displaying from end to start.
+   0     ^    0
+ No match
+      
++/((?J)(?'R'(?'R'(?'R'(?'R'(?'R'(?|(\k'R'))))))))/
++
+ /-- End of testinput2 --/
+-- 
+2.5.0
+
+From 0fc2edb79b3815c6511fd75c36a57893e4acaee6 Mon Sep 17 00:00:00 2001
+From: ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>
+Date: Sat, 27 Feb 2016 17:55:24 +0000
+Subject: [PATCH] Fix pcretest loop for global matching with an ovector size
+ less than 2.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1637 2f5784b3-3f2a-0410-8824-cb99058d5e15
+
+Petr Písař: Ported to 8.38.
+
+diff --git a/pcretest.c b/pcretest.c
+index 63869fd..78ef517 100644
+--- a/pcretest.c
++++ b/pcretest.c
+@@ -5617,6 +5617,12 @@ while (!done)
+         break;
+         }
++      if (use_size_offsets < 2)
++        {
++        fprintf(outfile, "Cannot do global matching with an ovector size < 2\n");
++        break;
++        }
++
+       /* If we have matched an empty string, first check to see if we are at
+       the end of the subject. If so, the /g loop is over. Otherwise, mimic what
+       Perl's /g options does. This turns out to be rather cunning. First we set
+-- 
+2.5.0
+
+From b3db1b7de5cfaa026ec2bc4a393129461a0f5c57 Mon Sep 17 00:00:00 2001
+From: ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>
+Date: Sat, 27 Feb 2016 18:44:41 +0000
+Subject: [PATCH] Fix non-diagnosis of missing assertion after (?(?C).
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1638 2f5784b3-3f2a-0410-8824-cb99058d5e15
+
+Petr Písař: Ported to 8.38.
+
+diff --git a/pcre_compile.c b/pcre_compile.c
+index 4ffea0c..254c629 100644
+--- a/pcre_compile.c
++++ b/pcre_compile.c
+@@ -485,7 +485,7 @@ static const char error_texts[] =
+   "lookbehind assertion is not fixed length\0"
+   "malformed number or name after (?(\0"
+   "conditional group contains more than two branches\0"
+-  "assertion expected after (?(\0"
++  "assertion expected after (?( or (?(?C)\0"
+   "(?R or (?[+-]digits must be followed by )\0"
+   /* 30 */
+   "unknown POSIX class name\0"
+@@ -6771,6 +6771,15 @@ for (;; ptr++)
+           for (i = 3;; i++) if (!IS_DIGIT(ptr[i])) break;
+           if (ptr[i] == CHAR_RIGHT_PARENTHESIS)
+             tempptr += i + 1;
++
++          /* tempptr should now be pointing to the opening parenthesis of the
++          assertion condition. */
++
++          if (*tempptr != CHAR_LEFT_PARENTHESIS)
++            {
++            *errorcodeptr = ERR28;
++            goto FAILED;
++            }
+           }
+         /* For conditions that are assertions, check the syntax, and then exit
+diff --git a/testdata/testinput2 b/testdata/testinput2
+index c805f5f..75e402e 100644
+--- a/testdata/testinput2
++++ b/testdata/testinput2
+@@ -4241,4 +4241,6 @@ backtracking verbs. --/
+      
+ /((?J)(?'R'(?'R'(?'R'(?'R'(?'R'(?|(\k'R'))))))))/
++/\N(?(?C)0?!.)*/
++
+ /-- End of testinput2 --/
+diff --git a/testdata/testoutput2 b/testdata/testoutput2
+index 800a72f..5e88d1a 100644
+--- a/testdata/testoutput2
++++ b/testdata/testoutput2
+@@ -555,13 +555,13 @@ Failed: malformed number or name after (?( at offset 4
+ Failed: malformed number or name after (?( at offset 4
+ /(?(?i))/
+-Failed: assertion expected after (?( at offset 3
++Failed: assertion expected after (?( or (?(?C) at offset 3
+ /(?(abc))/
+ Failed: reference to non-existent subpattern at offset 7
+ /(?(?<ab))/
+-Failed: assertion expected after (?( at offset 3
++Failed: assertion expected after (?( or (?(?C) at offset 3
+ /((?s)blah)\s+\1/I
+ Capturing subpattern count = 1
+@@ -7870,7 +7870,7 @@ No match
+ Failed: malformed number or name after (?( at offset 6
+ /(?(''))/
+-Failed: assertion expected after (?( at offset 4
++Failed: assertion expected after (?( or (?(?C) at offset 4
+ /(?('R')stuff)/
+ Failed: reference to non-existent subpattern at offset 7
+@@ -14346,7 +14346,7 @@ No match
+ "((?2)+)((?1))"
+ "(?(?<E>.*!.*)?)"
+-Failed: assertion expected after (?( at offset 3
++Failed: assertion expected after (?( or (?(?C) at offset 3
+ "X((?2)()*+){2}+"BZ
+ ------------------------------------------------------------------
+@@ -14667,4 +14667,7 @@ No match
+      
+ /((?J)(?'R'(?'R'(?'R'(?'R'(?'R'(?|(\k'R'))))))))/
++/\N(?(?C)0?!.)*/
++Failed: assertion expected after (?( or (?(?C) at offset 4
++
+ /-- End of testinput2 --/
+-- 
+2.5.0
+
diff --git a/libs/pcre/patches/100-pcre-cve-2015-3210.patch b/libs/pcre/patches/100-pcre-cve-2015-3210.patch
deleted file mode 100644 (file)
index 276d09e..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-Index: pcre-8.37/pcre_compile.c
-===================================================================
---- a/pcre_compile.c
-+++ b/pcre_compile.c
-@@ -7177,14 +7177,26 @@
-           number. If the name is not found, set the value to 0 for a forward
-           reference. */
-+          recno = 0;
-           ng = cd->named_groups;
-           for (i = 0; i < cd->names_found; i++, ng++)
-             {
-             if (namelen == ng->length &&
-                 STRNCMP_UC_UC(name, ng->name, namelen) == 0)
--              break;
-+              {
-+              open_capitem *oc;
-+              recno = ng->number;
-+              if (is_recurse) break;
-+              for (oc = cd->open_caps; oc != NULL; oc = oc->next)         
-+                {          
-+                if (oc->number == recno)                                     
-+                  {               
-+                  oc->flag = TRUE;                                      
-+                  break;
-+                  }                                                         
-+                }                          
-+              }    
-             }
--          recno = (i < cd->names_found)? ng->number : 0;
-           /* Count named back references. */
diff --git a/libs/poco/Makefile b/libs/poco/Makefile
new file mode 100644 (file)
index 0000000..6fbf831
--- /dev/null
@@ -0,0 +1,64 @@
+#
+# Copyright (C) 2007-2016 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=poco
+PKG_VERSION:=1.7.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://pocoproject.org/releases/poco-1.7.0
+PKG_MD5SUM:=dbbc98ab95910cc31bf4f1ffff9ac572
+
+PKG_LICENSE:=BSL-1.0
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/poco
+  SECTION:=libs
+  CATEGORY:=Libraries
+  TITLE:=Poco C++ libraries
+  URL:=http://www.pocoproject.org/
+  DEPENDS:=+libstdcpp +libpthread +librt
+  MAINTAINER:=Jean-Michel Julien <jean-michel.julien@trilliantinc.com>
+endef
+
+define Package/poco/description
+  POrtable COmponents, a modern and powerful open source C++ class libraries
+  and frameworks for building network and internet-based applications that
+  run on desktop, server and embedded systems.
+endef
+
+CONFIGURE_ARGS += \
+       --config=Linux \
+       --no-tests \
+       --no-samples \
+       --no-fpenvironment \
+       --no-sharedmemory \
+       --no-wstring \
+       --poquito \
+       --minimal \
+       --shared
+
+define Package/poco/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libPoco{Foundation,XML,JSON,Net,Util}.so* $(1)/usr/lib/
+endef
+
+define Build/InstallDev
+       $(INSTALL_DIR) $(1)/usr/include
+       $(CP) -r $(PKG_INSTALL_DIR)/usr/include/Poco $(1)/usr/include/
+
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libPoco{Foundation,XML,JSON,Net,Util}.so* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,poco))
diff --git a/libs/poco/patches/100-configure.patch b/libs/poco/patches/100-configure.patch
new file mode 100644 (file)
index 0000000..1051dfc
--- /dev/null
@@ -0,0 +1,15 @@
+--- a/configure
++++ b/configure
+@@ -231,9 +231,9 @@
+               ;;
+
+       *)
+-              showhelp
+-              exit 1
+-              ;;
++#             showhelp
++#             exit 1
++#             ;;
+       esac
+
+       shift
diff --git a/libs/poco/patches/200-strerror.patch b/libs/poco/patches/200-strerror.patch
new file mode 100644 (file)
index 0000000..54cce51
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/Foundation/src/Error.cpp
++++ b/Foundation/src/Error.cpp
+@@ -66,7 +66,7 @@
+                  without -D_GNU_SOURCE is needed, otherwise the GNU version is
+                  preferred.
+               */
+-#if defined _GNU_SOURCE && !POCO_ANDROID
++#if (defined _GNU_SOURCE && (defined __GLIBC__ || defined __UCLIBC__)) && !POCO_ANDROID
+               char errmsg[256] = "";
+               return std::string(strerror_r(errorCode, errmsg, 256));
+ #elif (_XOPEN_SOURCE >= 600) || POCO_ANDROID
index f4af211a8a2d00de1aa19abe0bff915bd007bb00..16b2f2be326e4585955e416d7681ca9f7ec3e9ee 100644 (file)
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libprotobuf-c
-PKG_VERSION:=v1.0.1
+PKG_VERSION:=v1.2.1
 PKG_RELEASE:=$(PKG_SOURCE_VERSION)
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
index 72133be8676535d72dd4e09a96f2bf89899cac62..1e70a12fce9be730f52805b3a805bc6857825f23 100644 (file)
@@ -41,7 +41,7 @@ define Package/protobuf/description
  of its internal RPC protocols and file formats.
 endef
 
-CONFIGURE_ARGS += --with-protoc=$(STAGING_DIR_HOST)/bin/protoc
+CONFIGURE_ARGS += --with-protoc=$(STAGING_DIR)/host/bin/protoc
 
 define Build/InstallDev
        $(INSTALL_DIR) \
index 0fdbedfc9f58cf20b0fa8f36910bb0a5aa9036a3..cb8589989667f0e85ea55996a8a5ad29faaed194 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=sqlite
-PKG_VERSION:=3081101
+PKG_VERSION:=3120000
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-autoconf-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://www.sqlite.org/2015/
-PKG_MD5SUM:=298c8d6af7ca314f68de92bc7a356cbe
+PKG_SOURCE_URL:=http://www.sqlite.org/2016/
+PKG_MD5SUM:=56a80fdab2f398cb2e1ab2ab7c339c30
 
 PKG_LICENSE:=PUBLICDOMAIN
 PKG_LICENSE_FILES:=
index bccab8bf49535199618a7eb8f793c001feaa39aa..735184ed1a2b7c17b9e00cf869e540576a994d88 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006-2014 OpenWrt.org
+# Copyright (C) 2006-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=tiff
-PKG_VERSION:=4.0.3
-PKG_RELEASE:=4
+PKG_VERSION:=4.0.6
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://download.osgeo.org/libtiff
-PKG_MD5SUM:=051c1068e6a0627f461948c365290410
+PKG_MD5SUM:=d1d2e940dea0b5ad435f21f03d96dd72
 
 PKG_FIXUP:=autoreconf
 PKG_REMOVE_FILES:=autogen.sh aclocal.m4
index c7c0dfccd2f9833c7231d466761fbf031da0fe65..16a88e3ef042914d544b907acbc1260a095337a5 100644 (file)
@@ -1,5 +1,6 @@
---- a/Makefile.am
-+++ b/Makefile.am
+diff -rupN tiff-4.0.6/Makefile.am tiff-new/Makefile.am
+--- tiff-4.0.6/Makefile.am     2015-09-06 21:30:46.179705536 +0200
++++ tiff-new/Makefile.am       2016-04-05 14:26:09.539194844 +0200
 @@ -25,7 +25,7 @@
  
  docdir = $(LIBTIFF_DOCDIR)
  ACLOCAL_AMFLAGS = -I m4
  
  docfiles = \
-@@ -48,7 +48,7 @@ EXTRA_DIST = \
- dist_doc_DATA = $(docfiles)
+@@ -61,7 +61,7 @@ distcheck-hook:
+       rm -rf $(distdir)/_build/cmake
+       rm -rf $(distdir)/_inst/cmake
  
 -SUBDIRS = port libtiff tools build contrib test man html
 +SUBDIRS = port libtiff tools build contrib
  
  release:
        (rm -f $(top_srcdir)/RELEASE-DATE && echo $(LIBTIFF_RELEASE_DATE) > $(top_srcdir)/RELEASE-DATE)
---- a/test/Makefile.am
-+++ b/test/Makefile.am
+diff -rupN tiff-4.0.6/test/Makefile.am tiff-new/test/Makefile.am
+--- tiff-4.0.6/test/Makefile.am        2015-09-01 04:41:07.598381354 +0200
++++ tiff-new/test/Makefile.am  2016-04-05 14:26:39.763453075 +0200
 @@ -23,7 +23,7 @@
  
  # Process this file with automake to produce Makefile.in.
diff --git a/libs/tiff/patches/002-CVE-2015-8665_and_CVE-2015-8683.patch b/libs/tiff/patches/002-CVE-2015-8665_and_CVE-2015-8683.patch
new file mode 100644 (file)
index 0000000..15807e1
--- /dev/null
@@ -0,0 +1,136 @@
+From f3f0cad770593eaef0766e5be896a6a034fc6313 Mon Sep 17 00:00:00 2001
+From: erouault <erouault>
+Date: Sat, 26 Dec 2015 17:32:03 +0000
+Subject: [PATCH] * libtiff/tif_getimage.c: fix out-of-bound reads in
+ TIFFRGBAImage interface in case of unsupported values of
+ SamplesPerPixel/ExtraSamples for LogLUV / CIELab. Add explicit call to
+ TIFFRGBAImageOK() in TIFFRGBAImageBegin(). Fix CVE-2015-8665 reported by
+ limingxing and CVE-2015-8683 reported by zzf of Alibaba.
+
+---
+ ChangeLog              |  8 ++++++++
+ libtiff/tif_getimage.c | 37 +++++++++++++++++++++++--------------
+ 2 files changed, 31 insertions(+), 14 deletions(-)
+
+diff --git a/ChangeLog b/ChangeLog
+index a7d283a..4beb30b 100644
+--- a/ChangeLog
++++ b/ChangeLog
+@@ -1,3 +1,11 @@
++2015-12-26  Even Rouault <even.rouault at spatialys.com>
++
++      * libtiff/tif_getimage.c: fix out-of-bound reads in TIFFRGBAImage
++      interface in case of unsupported values of SamplesPerPixel/ExtraSamples
++      for LogLUV / CIELab. Add explicit call to TIFFRGBAImageOK() in
++      TIFFRGBAImageBegin(). Fix CVE-2015-8665 reported by limingxing and
++      CVE-2015-8683 reported by zzf of Alibaba.
++
+ 2015-09-12  Bob Friesenhahn  <bfriesen@simple.dallas.tx.us>
+       * libtiff 4.0.6 released.
+diff --git a/libtiff/tif_getimage.c b/libtiff/tif_getimage.c
+index fd0a4f9..fae1e31 100644
+--- a/libtiff/tif_getimage.c
++++ b/libtiff/tif_getimage.c
+@@ -1,4 +1,4 @@
+-/* $Id: tif_getimage.c,v 1.90 2015-06-17 01:34:08 bfriesen Exp $ */
++/* $Id: tif_getimage.c,v 1.94 2015-12-26 17:32:03 erouault Exp $ */
+ /*
+  * Copyright (c) 1991-1997 Sam Leffler
+@@ -182,20 +182,22 @@ TIFFRGBAImageOK(TIFF* tif, char emsg[1024])
+                                   "Planarconfiguration", td->td_planarconfig);
+                               return (0);
+                       }
+-                      if( td->td_samplesperpixel != 3 )
++                      if( td->td_samplesperpixel != 3 || colorchannels != 3 )
+             {
+                 sprintf(emsg,
+-                        "Sorry, can not handle image with %s=%d",
+-                        "Samples/pixel", td->td_samplesperpixel);
++                        "Sorry, can not handle image with %s=%d, %s=%d",
++                        "Samples/pixel", td->td_samplesperpixel,
++                        "colorchannels", colorchannels);
+                 return 0;
+             }
+                       break;
+               case PHOTOMETRIC_CIELAB:
+-            if( td->td_samplesperpixel != 3 || td->td_bitspersample != 8 )
++            if( td->td_samplesperpixel != 3 || colorchannels != 3 || td->td_bitspersample != 8 )
+             {
+                 sprintf(emsg,
+-                        "Sorry, can not handle image with %s=%d and %s=%d",
++                        "Sorry, can not handle image with %s=%d, %s=%d and %s=%d",
+                         "Samples/pixel", td->td_samplesperpixel,
++                        "colorchannels", colorchannels,
+                         "Bits/sample", td->td_bitspersample);
+                 return 0;
+             }
+@@ -255,6 +257,9 @@ TIFFRGBAImageBegin(TIFFRGBAImage* img, TIFF* tif, int stop, char emsg[1024])
+       int colorchannels;
+       uint16 *red_orig, *green_orig, *blue_orig;
+       int n_color;
++      
++      if( !TIFFRGBAImageOK(tif, emsg) )
++              return 0;
+       /* Initialize to normal values */
+       img->row_offset = 0;
+@@ -2508,29 +2513,33 @@ PickContigCase(TIFFRGBAImage* img)
+               case PHOTOMETRIC_RGB:
+                       switch (img->bitspersample) {
+                               case 8:
+-                                      if (img->alpha == EXTRASAMPLE_ASSOCALPHA)
++                                      if (img->alpha == EXTRASAMPLE_ASSOCALPHA &&
++                                              img->samplesperpixel >= 4)
+                                               img->put.contig = putRGBAAcontig8bittile;
+-                                      else if (img->alpha == EXTRASAMPLE_UNASSALPHA)
++                                      else if (img->alpha == EXTRASAMPLE_UNASSALPHA &&
++                                                       img->samplesperpixel >= 4)
+                                       {
+                                               if (BuildMapUaToAa(img))
+                                                       img->put.contig = putRGBUAcontig8bittile;
+                                       }
+-                                      else
++                                      else if( img->samplesperpixel >= 3 )
+                                               img->put.contig = putRGBcontig8bittile;
+                                       break;
+                               case 16:
+-                                      if (img->alpha == EXTRASAMPLE_ASSOCALPHA)
++                                      if (img->alpha == EXTRASAMPLE_ASSOCALPHA &&
++                                              img->samplesperpixel >=4 )
+                                       {
+                                               if (BuildMapBitdepth16To8(img))
+                                                       img->put.contig = putRGBAAcontig16bittile;
+                                       }
+-                                      else if (img->alpha == EXTRASAMPLE_UNASSALPHA)
++                                      else if (img->alpha == EXTRASAMPLE_UNASSALPHA &&
++                                                       img->samplesperpixel >=4 )
+                                       {
+                                               if (BuildMapBitdepth16To8(img) &&
+                                                   BuildMapUaToAa(img))
+                                                       img->put.contig = putRGBUAcontig16bittile;
+                                       }
+-                                      else
++                                      else if( img->samplesperpixel >=3 )
+                                       {
+                                               if (BuildMapBitdepth16To8(img))
+                                                       img->put.contig = putRGBcontig16bittile;
+@@ -2539,7 +2548,7 @@ PickContigCase(TIFFRGBAImage* img)
+                       }
+                       break;
+               case PHOTOMETRIC_SEPARATED:
+-                      if (buildMap(img)) {
++                      if (img->samplesperpixel >=4 && buildMap(img)) {
+                               if (img->bitspersample == 8) {
+                                       if (!img->Map)
+                                               img->put.contig = putRGBcontig8bitCMYKtile;
+@@ -2635,7 +2644,7 @@ PickContigCase(TIFFRGBAImage* img)
+                       }
+                       break;
+               case PHOTOMETRIC_CIELAB:
+-                      if (buildMap(img)) {
++                      if (img->samplesperpixel == 3 && buildMap(img)) {
+                               if (img->bitspersample == 8)
+                                       img->put.contig = initCIELabConversion(img);
+                               break;
diff --git a/libs/tiff/patches/003-fix_potential_out-of-bound_writes_in_decode_functions.patch b/libs/tiff/patches/003-fix_potential_out-of-bound_writes_in_decode_functions.patch
new file mode 100644 (file)
index 0000000..716ddfd
--- /dev/null
@@ -0,0 +1,193 @@
+From 3899f0ab62dd307f63f87ec99aaf289e104f4070 Mon Sep 17 00:00:00 2001
+From: erouault <erouault>
+Date: Sun, 27 Dec 2015 16:25:11 +0000
+Subject: [PATCH] * libtiff/tif_luv.c: fix potential out-of-bound writes in
+ decode functions in non debug builds by replacing assert()s by regular if
+ checks (bugzilla #2522). Fix potential out-of-bound reads in case of short
+ input data.
+
+---
+ ChangeLog         |  7 +++++++
+ libtiff/tif_luv.c | 57 +++++++++++++++++++++++++++++++++++++++++++------------
+ 2 files changed, 52 insertions(+), 12 deletions(-)
+
+diff --git a/ChangeLog b/ChangeLog
+index 4beb30b..b8aa23c 100644
+--- a/ChangeLog
++++ b/ChangeLog
+@@ -1,3 +1,10 @@
++2015-12-27  Even Rouault <even.rouault at spatialys.com>
++
++      * libtiff/tif_luv.c: fix potential out-of-bound writes in decode
++      functions in non debug builds by replacing assert()s by regular if
++      checks (bugzilla #2522).
++      Fix potential out-of-bound reads in case of short input data.
++
+ 2015-12-26  Even Rouault <even.rouault at spatialys.com>
+       * libtiff/tif_getimage.c: fix out-of-bound reads in TIFFRGBAImage
+diff --git a/libtiff/tif_luv.c b/libtiff/tif_luv.c
+index 4e328ba..60a174d 100644
+--- a/libtiff/tif_luv.c
++++ b/libtiff/tif_luv.c
+@@ -1,4 +1,4 @@
+-/* $Id: tif_luv.c,v 1.40 2015-06-21 01:09:09 bfriesen Exp $ */
++/* $Id: tif_luv.c,v 1.41 2015-12-27 16:25:11 erouault Exp $ */
+ /*
+  * Copyright (c) 1997 Greg Ward Larson
+@@ -202,7 +202,11 @@ LogL16Decode(TIFF* tif, uint8* op, tmsize_t occ, uint16 s)
+       if (sp->user_datafmt == SGILOGDATAFMT_16BIT)
+               tp = (int16*) op;
+       else {
+-              assert(sp->tbuflen >= npixels);
++              if(sp->tbuflen < npixels) {
++                      TIFFErrorExt(tif->tif_clientdata, module,
++                                               "Translation buffer too short");
++                      return (0);
++              }
+               tp = (int16*) sp->tbuf;
+       }
+       _TIFFmemset((void*) tp, 0, npixels*sizeof (tp[0]));
+@@ -211,9 +215,11 @@ LogL16Decode(TIFF* tif, uint8* op, tmsize_t occ, uint16 s)
+       cc = tif->tif_rawcc;
+       /* get each byte string */
+       for (shft = 2*8; (shft -= 8) >= 0; ) {
+-              for (i = 0; i < npixels && cc > 0; )
++              for (i = 0; i < npixels && cc > 0; ) {
+                       if (*bp >= 128) {               /* run */
+-                              rc = *bp++ + (2-128);   /* TODO: potential input buffer overrun when decoding corrupt or truncated data */
++                              if( cc < 2 )
++                                      break;
++                              rc = *bp++ + (2-128);
+                               b = (int16)(*bp++ << shft);
+                               cc -= 2;
+                               while (rc-- && i < npixels)
+@@ -223,6 +229,7 @@ LogL16Decode(TIFF* tif, uint8* op, tmsize_t occ, uint16 s)
+                               while (--cc && rc-- && i < npixels)
+                                       tp[i++] |= (int16)*bp++ << shft;
+                       }
++              }
+               if (i != npixels) {
+ #if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__))
+                       TIFFErrorExt(tif->tif_clientdata, module,
+@@ -268,13 +275,17 @@ LogLuvDecode24(TIFF* tif, uint8* op, tmsize_t occ, uint16 s)
+       if (sp->user_datafmt == SGILOGDATAFMT_RAW)
+               tp = (uint32 *)op;
+       else {
+-              assert(sp->tbuflen >= npixels);
++              if(sp->tbuflen < npixels) {
++                      TIFFErrorExt(tif->tif_clientdata, module,
++                                               "Translation buffer too short");
++                      return (0);
++              }
+               tp = (uint32 *) sp->tbuf;
+       }
+       /* copy to array of uint32 */
+       bp = (unsigned char*) tif->tif_rawcp;
+       cc = tif->tif_rawcc;
+-      for (i = 0; i < npixels && cc > 0; i++) {
++      for (i = 0; i < npixels && cc >= 3; i++) {
+               tp[i] = bp[0] << 16 | bp[1] << 8 | bp[2];
+               bp += 3;
+               cc -= 3;
+@@ -325,7 +336,11 @@ LogLuvDecode32(TIFF* tif, uint8* op, tmsize_t occ, uint16 s)
+       if (sp->user_datafmt == SGILOGDATAFMT_RAW)
+               tp = (uint32*) op;
+       else {
+-              assert(sp->tbuflen >= npixels);
++              if(sp->tbuflen < npixels) {
++                      TIFFErrorExt(tif->tif_clientdata, module,
++                                               "Translation buffer too short");
++                      return (0);
++              }
+               tp = (uint32*) sp->tbuf;
+       }
+       _TIFFmemset((void*) tp, 0, npixels*sizeof (tp[0]));
+@@ -334,11 +349,13 @@ LogLuvDecode32(TIFF* tif, uint8* op, tmsize_t occ, uint16 s)
+       cc = tif->tif_rawcc;
+       /* get each byte string */
+       for (shft = 4*8; (shft -= 8) >= 0; ) {
+-              for (i = 0; i < npixels && cc > 0; )
++              for (i = 0; i < npixels && cc > 0; ) {
+                       if (*bp >= 128) {               /* run */
++                              if( cc < 2 )
++                                      break;
+                               rc = *bp++ + (2-128);
+                               b = (uint32)*bp++ << shft;
+-                              cc -= 2;                /* TODO: potential input buffer overrun when decoding corrupt or truncated data */
++                              cc -= 2;
+                               while (rc-- && i < npixels)
+                                       tp[i++] |= b;
+                       } else {                        /* non-run */
+@@ -346,6 +363,7 @@ LogLuvDecode32(TIFF* tif, uint8* op, tmsize_t occ, uint16 s)
+                               while (--cc && rc-- && i < npixels)
+                                       tp[i++] |= (uint32)*bp++ << shft;
+                       }
++              }
+               if (i != npixels) {
+ #if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__))
+                       TIFFErrorExt(tif->tif_clientdata, module,
+@@ -413,6 +431,7 @@ LogLuvDecodeTile(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s)
+ static int
+ LogL16Encode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s)
+ {
++      static const char module[] = "LogL16Encode";
+       LogLuvState* sp = EncoderState(tif);
+       int shft;
+       tmsize_t i;
+@@ -433,7 +452,11 @@ LogL16Encode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s)
+               tp = (int16*) bp;
+       else {
+               tp = (int16*) sp->tbuf;
+-              assert(sp->tbuflen >= npixels);
++              if(sp->tbuflen < npixels) {
++                      TIFFErrorExt(tif->tif_clientdata, module,
++                                               "Translation buffer too short");
++                      return (0);
++              }
+               (*sp->tfunc)(sp, bp, npixels);
+       }
+       /* compress each byte string */
+@@ -506,6 +529,7 @@ LogL16Encode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s)
+ static int
+ LogLuvEncode24(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s)
+ {
++      static const char module[] = "LogLuvEncode24";
+       LogLuvState* sp = EncoderState(tif);
+       tmsize_t i;
+       tmsize_t npixels;
+@@ -521,7 +545,11 @@ LogLuvEncode24(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s)
+               tp = (uint32*) bp;
+       else {
+               tp = (uint32*) sp->tbuf;
+-              assert(sp->tbuflen >= npixels);
++              if(sp->tbuflen < npixels) {
++                      TIFFErrorExt(tif->tif_clientdata, module,
++                                               "Translation buffer too short");
++                      return (0);
++              }
+               (*sp->tfunc)(sp, bp, npixels);
+       }
+       /* write out encoded pixels */
+@@ -553,6 +581,7 @@ LogLuvEncode24(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s)
+ static int
+ LogLuvEncode32(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s)
+ {
++      static const char module[] = "LogLuvEncode32";
+       LogLuvState* sp = EncoderState(tif);
+       int shft;
+       tmsize_t i;
+@@ -574,7 +603,11 @@ LogLuvEncode32(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s)
+               tp = (uint32*) bp;
+       else {
+               tp = (uint32*) sp->tbuf;
+-              assert(sp->tbuflen >= npixels);
++              if(sp->tbuflen < npixels) {
++                      TIFFErrorExt(tif->tif_clientdata, module,
++                                               "Translation buffer too short");
++                      return (0);
++              }
+               (*sp->tfunc)(sp, bp, npixels);
+       }
+       /* compress each byte string */
diff --git a/libs/tiff/patches/004-fix_potential_out-of-bound_write_in_NeXTDecode.patch b/libs/tiff/patches/004-fix_potential_out-of-bound_write_in_NeXTDecode.patch
new file mode 100644 (file)
index 0000000..f2b6b31
--- /dev/null
@@ -0,0 +1,72 @@
+From 237c9c18b0b3479950e54a755ae428bf0f55f754 Mon Sep 17 00:00:00 2001
+From: erouault <erouault>
+Date: Sun, 27 Dec 2015 16:55:20 +0000
+Subject: [PATCH] * libtiff/tif_next.c: fix potential out-of-bound write in
+ NeXTDecode() triggered by http://lcamtuf.coredump.cx/afl/vulns/libtiff5.tif
+ (bugzilla #2508)
+
+---
+ ChangeLog          |  6 ++++++
+ libtiff/tif_next.c | 12 +++++++++---
+ 2 files changed, 15 insertions(+), 3 deletions(-)
+
+diff --git a/ChangeLog b/ChangeLog
+index b8aa23c..04926a3 100644
+--- a/ChangeLog
++++ b/ChangeLog
+@@ -1,5 +1,11 @@
+ 2015-12-27  Even Rouault <even.rouault at spatialys.com>
++      * libtiff/tif_next.c: fix potential out-of-bound write in NeXTDecode()
++      triggered by http://lcamtuf.coredump.cx/afl/vulns/libtiff5.tif
++      (bugzilla #2508)
++
++2015-12-27  Even Rouault <even.rouault at spatialys.com>
++
+       * libtiff/tif_luv.c: fix potential out-of-bound writes in decode
+       functions in non debug builds by replacing assert()s by regular if
+       checks (bugzilla #2522).
+diff --git a/libtiff/tif_next.c b/libtiff/tif_next.c
+index 17e0311..1248caa 100644
+--- a/libtiff/tif_next.c
++++ b/libtiff/tif_next.c
+@@ -1,4 +1,4 @@
+-/* $Id: tif_next.c,v 1.16 2014-12-29 12:09:11 erouault Exp $ */
++/* $Id: tif_next.c,v 1.17 2015-12-27 16:55:20 erouault Exp $ */
+ /*
+  * Copyright (c) 1988-1997 Sam Leffler
+@@ -37,7 +37,7 @@
+       case 0: op[0]  = (unsigned char) ((v) << 6); break;     \
+       case 1: op[0] |= (v) << 4; break;       \
+       case 2: op[0] |= (v) << 2; break;       \
+-      case 3: *op++ |= (v);      break;       \
++      case 3: *op++ |= (v);      op_offset++; break;  \
+       }                                       \
+ }
+@@ -106,6 +106,7 @@ NeXTDecode(TIFF* tif, uint8* buf, tmsize_t occ, uint16 s)
+                       uint32 imagewidth = tif->tif_dir.td_imagewidth;
+             if( isTiled(tif) )
+                 imagewidth = tif->tif_dir.td_tilewidth;
++            tmsize_t op_offset = 0;
+                       /*
+                        * The scanline is composed of a sequence of constant
+@@ -122,10 +123,15 @@ NeXTDecode(TIFF* tif, uint8* buf, tmsize_t occ, uint16 s)
+                                * bounds, potentially resulting in a security
+                                * issue.
+                                */
+-                              while (n-- > 0 && npixels < imagewidth)
++                              while (n-- > 0 && npixels < imagewidth && op_offset < scanline)
+                                       SETPIXEL(op, grey);
+                               if (npixels >= imagewidth)
+                                       break;
++                if (op_offset >= scanline ) {
++                    TIFFErrorExt(tif->tif_clientdata, module, "Invalid data for scanline %ld",
++                        (long) tif->tif_row);
++                    return (0);
++                }
+                               if (cc == 0)
+                                       goto bad;
+                               n = *bp++, cc--;
diff --git a/libs/tiff/patches/010-CVE-2012-4564.patch b/libs/tiff/patches/010-CVE-2012-4564.patch
deleted file mode 100644 (file)
index 7783353..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-Index: tiff-4.0.3/tools/ppm2tiff.c
-===================================================================
---- tiff-4.0.3.orig/tools/ppm2tiff.c   2013-06-23 10:36:50.779629492 -0400
-+++ tiff-4.0.3/tools/ppm2tiff.c        2013-06-23 10:36:50.775629494 -0400
-@@ -89,6 +89,7 @@
-       int c;
-       extern int optind;
-       extern char* optarg;
-+      tmsize_t scanline_size;
-       if (argc < 2) {
-           fprintf(stderr, "%s: Too few arguments\n", argv[0]);
-@@ -237,8 +238,16 @@
-       }
-       if (TIFFScanlineSize(out) > linebytes)
-               buf = (unsigned char *)_TIFFmalloc(linebytes);
--      else
--              buf = (unsigned char *)_TIFFmalloc(TIFFScanlineSize(out));
-+      else {
-+              scanline_size = TIFFScanlineSize(out);
-+              if (scanline_size != 0)
-+                      buf = (unsigned char *)_TIFFmalloc(TIFFScanlineSize(out));
-+              else {
-+                      fprintf(stderr, "%s: scanline size overflow\n",infile);
-+                      (void) TIFFClose(out);
-+                      exit(-2);
-+                      }
-+              }
-       if (resolution > 0) {
-               TIFFSetField(out, TIFFTAG_XRESOLUTION, resolution);
-               TIFFSetField(out, TIFFTAG_YRESOLUTION, resolution);
diff --git a/libs/tiff/patches/011-CVE-2013-1960.patch b/libs/tiff/patches/011-CVE-2013-1960.patch
deleted file mode 100644 (file)
index 3bf15f1..0000000
+++ /dev/null
@@ -1,146 +0,0 @@
-Index: tiff-4.0.3/tools/tiff2pdf.c
-===================================================================
---- tiff-4.0.3.orig/tools/tiff2pdf.c   2013-06-23 10:36:50.979629486 -0400
-+++ tiff-4.0.3/tools/tiff2pdf.c        2013-06-23 10:36:50.975629486 -0400
-@@ -3341,33 +3341,56 @@
-       uint32 height){
-       tsize_t i=0;
--      uint16 ri =0;
--      uint16 v_samp=1;
--      uint16 h_samp=1;
--      int j=0;
--      
--      i++;
--      
--      while(i<(*striplength)){
-+
-+      while (i < *striplength) {
-+              tsize_t datalen;
-+              uint16 ri;
-+              uint16 v_samp;
-+              uint16 h_samp;
-+              int j;
-+              int ncomp;
-+
-+              /* marker header: one or more FFs */
-+              if (strip[i] != 0xff)
-+                      return(0);
-+              i++;
-+              while (i < *striplength && strip[i] == 0xff)
-+                      i++;
-+              if (i >= *striplength)
-+                      return(0);
-+              /* SOI is the only pre-SOS marker without a length word */
-+              if (strip[i] == 0xd8)
-+                      datalen = 0;
-+              else {
-+                      if ((*striplength - i) <= 2)
-+                              return(0);
-+                      datalen = (strip[i+1] << 8) | strip[i+2];
-+                      if (datalen < 2 || datalen >= (*striplength - i))
-+                              return(0);
-+              }
-               switch( strip[i] ){
--                      case 0xd8:
--                              /* SOI - start of image */
-+                      case 0xd8:      /* SOI - start of image */
-                               _TIFFmemcpy(&(buffer[*bufferoffset]), &(strip[i-1]), 2);
-                               *bufferoffset+=2;
--                              i+=2;
-                               break;
--                      case 0xc0:
--                      case 0xc1:
--                      case 0xc3:
--                      case 0xc9:
--                      case 0xca:
-+                      case 0xc0:      /* SOF0 */
-+                      case 0xc1:      /* SOF1 */
-+                      case 0xc3:      /* SOF3 */
-+                      case 0xc9:      /* SOF9 */
-+                      case 0xca:      /* SOF10 */
-                               if(no==0){
--                                      _TIFFmemcpy(&(buffer[*bufferoffset]), &(strip[i-1]), strip[i+2]+2);
--                                      for(j=0;j<buffer[*bufferoffset+9];j++){
--                                              if( (buffer[*bufferoffset+11+(2*j)]>>4) > h_samp) 
--                                                      h_samp = (buffer[*bufferoffset+11+(2*j)]>>4);
--                                              if( (buffer[*bufferoffset+11+(2*j)] & 0x0f) > v_samp) 
--                                                      v_samp = (buffer[*bufferoffset+11+(2*j)] & 0x0f);
-+                                      _TIFFmemcpy(&(buffer[*bufferoffset]), &(strip[i-1]), datalen+2);
-+                                      ncomp = buffer[*bufferoffset+9];
-+                                      if (ncomp < 1 || ncomp > 4)
-+                                              return(0);
-+                                      v_samp=1;
-+                                      h_samp=1;
-+                                      for(j=0;j<ncomp;j++){
-+                                              uint16 samp = buffer[*bufferoffset+11+(3*j)];
-+                                              if( (samp>>4) > h_samp) 
-+                                                      h_samp = (samp>>4);
-+                                              if( (samp & 0x0f) > v_samp) 
-+                                                      v_samp = (samp & 0x0f);
-                                       }
-                                       v_samp*=8;
-                                       h_samp*=8;
-@@ -3381,45 +3404,43 @@
-                                           (unsigned char) ((height>>8) & 0xff);
-                                       buffer[*bufferoffset+6]=
-                                             (unsigned char) (height & 0xff);
--                                      *bufferoffset+=strip[i+2]+2;
--                                      i+=strip[i+2]+2;
--
-+                                      *bufferoffset+=datalen+2;
-+                                      /* insert a DRI marker */
-                                       buffer[(*bufferoffset)++]=0xff;
-                                       buffer[(*bufferoffset)++]=0xdd;
-                                       buffer[(*bufferoffset)++]=0x00;
-                                       buffer[(*bufferoffset)++]=0x04;
-                                       buffer[(*bufferoffset)++]=(ri >> 8) & 0xff;
-                                       buffer[(*bufferoffset)++]= ri & 0xff;
--                              } else {
--                                      i+=strip[i+2]+2;
-                               }
-                               break;
--                      case 0xc4:
--                      case 0xdb:
--                              _TIFFmemcpy(&(buffer[*bufferoffset]), &(strip[i-1]), strip[i+2]+2);
--                              *bufferoffset+=strip[i+2]+2;
--                              i+=strip[i+2]+2;
-+                      case 0xc4: /* DHT */
-+                      case 0xdb: /* DQT */
-+                              _TIFFmemcpy(&(buffer[*bufferoffset]), &(strip[i-1]), datalen+2);
-+                              *bufferoffset+=datalen+2;
-                               break;
--                      case 0xda:
-+                      case 0xda: /* SOS */
-                               if(no==0){
--                                      _TIFFmemcpy(&(buffer[*bufferoffset]), &(strip[i-1]), strip[i+2]+2);
--                                      *bufferoffset+=strip[i+2]+2;
--                                      i+=strip[i+2]+2;
-+                                      _TIFFmemcpy(&(buffer[*bufferoffset]), &(strip[i-1]), datalen+2);
-+                                      *bufferoffset+=datalen+2;
-                               } else {
-                                       buffer[(*bufferoffset)++]=0xff;
-                                       buffer[(*bufferoffset)++]=
-                                             (unsigned char)(0xd0 | ((no-1)%8));
--                                      i+=strip[i+2]+2;
-                               }
--                              _TIFFmemcpy(&(buffer[*bufferoffset]), &(strip[i-1]), (*striplength)-i-1);
--                              *bufferoffset+=(*striplength)-i-1;
-+                              i += datalen + 1;
-+                              /* copy remainder of strip */
-+                              _TIFFmemcpy(&(buffer[*bufferoffset]), &(strip[i]), *striplength - i);
-+                              *bufferoffset+= *striplength - i;
-                               return(1);
-                       default:
--                              i+=strip[i+2]+2;
-+                              /* ignore any other marker */
-+                              break;
-               }
-+              i += datalen + 1;
-       }
--      
-+      /* failed to find SOS marker */
-       return(0);
- }
- #endif
diff --git a/libs/tiff/patches/012-CVE-2013-1961.patch b/libs/tiff/patches/012-CVE-2013-1961.patch
deleted file mode 100644 (file)
index 2d1268e..0000000
+++ /dev/null
@@ -1,768 +0,0 @@
-Index: tiff-4.0.3/contrib/dbs/xtiff/xtiff.c
-===================================================================
---- tiff-4.0.3.orig/contrib/dbs/xtiff/xtiff.c  2013-06-23 10:36:51.163629483 -0400
-+++ tiff-4.0.3/contrib/dbs/xtiff/xtiff.c       2013-06-23 10:36:51.147629484 -0400
-@@ -512,9 +512,9 @@
-     Arg args[1];
-     if (tfMultiPage)
--        sprintf(buffer, "%s - page %d", fileName, tfDirectory);
-+        snprintf(buffer, sizeof(buffer), "%s - page %d", fileName, tfDirectory);
-     else
--        strcpy(buffer, fileName);
-+        snprintf(buffer, sizeof(buffer), "%s", fileName);
-     XtSetArg(args[0], XtNlabel, buffer);
-     XtSetValues(labelWidget, args, 1);
- }
-Index: tiff-4.0.3/libtiff/tif_dirinfo.c
-===================================================================
---- tiff-4.0.3.orig/libtiff/tif_dirinfo.c      2013-06-23 10:36:51.163629483 -0400
-+++ tiff-4.0.3/libtiff/tif_dirinfo.c   2013-06-23 10:36:51.147629484 -0400
-@@ -711,7 +711,7 @@
-        * note that this name is a special sign to TIFFClose() and
-        * _TIFFSetupFields() to free the field
-        */
--      sprintf(fld->field_name, "Tag %d", (int) tag);
-+      snprintf(fld->field_name, 32, "Tag %d", (int) tag);
-       return fld;    
- }
-Index: tiff-4.0.3/libtiff/tif_codec.c
-===================================================================
---- tiff-4.0.3.orig/libtiff/tif_codec.c        2013-06-23 10:36:51.163629483 -0400
-+++ tiff-4.0.3/libtiff/tif_codec.c     2013-06-23 10:36:51.151629482 -0400
-@@ -108,7 +108,8 @@
-       const TIFFCodec* c = TIFFFindCODEC(tif->tif_dir.td_compression);
-         char compression_code[20];
-         
--        sprintf( compression_code, "%d", tif->tif_dir.td_compression );
-+        snprintf(compression_code, sizeof(compression_code), "%d",
-+               tif->tif_dir.td_compression );
-       TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
-                      "%s compression support is not configured", 
-                      c ? c->name : compression_code );
-Index: tiff-4.0.3/tools/tiffdither.c
-===================================================================
---- tiff-4.0.3.orig/tools/tiffdither.c 2013-06-23 10:36:51.163629483 -0400
-+++ tiff-4.0.3/tools/tiffdither.c      2013-06-23 10:36:51.151629482 -0400
-@@ -260,7 +260,7 @@
-               TIFFSetField(out, TIFFTAG_FILLORDER, fillorder);
-       else
-               CopyField(TIFFTAG_FILLORDER, shortv);
--      sprintf(thing, "Dithered B&W version of %s", argv[optind]);
-+      snprintf(thing, sizeof(thing), "Dithered B&W version of %s", argv[optind]);
-       TIFFSetField(out, TIFFTAG_IMAGEDESCRIPTION, thing);
-       CopyField(TIFFTAG_PHOTOMETRIC, shortv);
-       CopyField(TIFFTAG_ORIENTATION, shortv);
-Index: tiff-4.0.3/tools/rgb2ycbcr.c
-===================================================================
---- tiff-4.0.3.orig/tools/rgb2ycbcr.c  2013-06-23 10:36:51.163629483 -0400
-+++ tiff-4.0.3/tools/rgb2ycbcr.c       2013-06-23 10:36:51.151629482 -0400
-@@ -332,7 +332,8 @@
-       TIFFSetField(out, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
-       { char buf[2048];
-         char *cp = strrchr(TIFFFileName(in), '/');
--        sprintf(buf, "YCbCr conversion of %s", cp ? cp+1 : TIFFFileName(in));
-+        snprintf(buf, sizeof(buf), "YCbCr conversion of %s",
-+                 cp ? cp+1 : TIFFFileName(in));
-         TIFFSetField(out, TIFFTAG_IMAGEDESCRIPTION, buf);
-       }
-       TIFFSetField(out, TIFFTAG_SOFTWARE, TIFFGetVersion());
-Index: tiff-4.0.3/tools/tiff2pdf.c
-===================================================================
---- tiff-4.0.3.orig/tools/tiff2pdf.c   2013-06-23 10:36:51.163629483 -0400
-+++ tiff-4.0.3/tools/tiff2pdf.c        2013-06-23 10:36:51.151629482 -0400
-@@ -3630,7 +3630,9 @@
-       char buffer[16];
-       int buflen=0;
-       
--      buflen=sprintf(buffer, "%%PDF-%u.%u ", t2p->pdf_majorversion&0xff, t2p->pdf_minorversion&0xff);
-+      buflen = snprintf(buffer, sizeof(buffer), "%%PDF-%u.%u ",
-+                        t2p->pdf_majorversion&0xff,
-+                        t2p->pdf_minorversion&0xff);
-       written += t2pWriteFile(output, (tdata_t) buffer, buflen);
-       written += t2pWriteFile(output, (tdata_t)"\n%\342\343\317\323\n", 7);
-@@ -3644,10 +3646,10 @@
- tsize_t t2p_write_pdf_obj_start(uint32 number, TIFF* output){
-       tsize_t written=0;
--      char buffer[16];
-+      char buffer[32];
-       int buflen=0;
--      buflen=sprintf(buffer, "%lu", (unsigned long)number);
-+      buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)number);
-       written += t2pWriteFile(output, (tdata_t) buffer, buflen );
-       written += t2pWriteFile(output, (tdata_t) " 0 obj\n", 7);
-@@ -3686,13 +3688,13 @@
-       written += t2pWriteFile(output, (tdata_t) "/", 1);
-       for (i=0;i<namelen;i++){
-               if ( ((unsigned char)name[i]) < 0x21){
--                      sprintf(buffer, "#%.2X", name[i]);
-+                      snprintf(buffer, sizeof(buffer), "#%.2X", name[i]);
-                       buffer[sizeof(buffer) - 1] = '\0';
-                       written += t2pWriteFile(output, (tdata_t) buffer, 3);
-                       nextchar=1;
-               }
-               if ( ((unsigned char)name[i]) > 0x7E){
--                      sprintf(buffer, "#%.2X", name[i]);
-+                      snprintf(buffer, sizeof(buffer), "#%.2X", name[i]);
-                       buffer[sizeof(buffer) - 1] = '\0';
-                       written += t2pWriteFile(output, (tdata_t) buffer, 3);
-                       nextchar=1;
-@@ -3700,57 +3702,57 @@
-               if (nextchar==0){
-                       switch (name[i]){
-                               case 0x23:
--                                      sprintf(buffer, "#%.2X", name[i]);
-+                                      snprintf(buffer, sizeof(buffer), "#%.2X", name[i]);
-                                       buffer[sizeof(buffer) - 1] = '\0';
-                                       written += t2pWriteFile(output, (tdata_t) buffer, 3);
-                                       break;
-                               case 0x25:
--                                      sprintf(buffer, "#%.2X", name[i]);
-+                                      snprintf(buffer, sizeof(buffer), "#%.2X", name[i]);
-                                       buffer[sizeof(buffer) - 1] = '\0';
-                                       written += t2pWriteFile(output, (tdata_t) buffer, 3);
-                                       break;
-                               case 0x28:
--                                      sprintf(buffer, "#%.2X", name[i]);
-+                                      snprintf(buffer, sizeof(buffer), "#%.2X", name[i]);
-                                       buffer[sizeof(buffer) - 1] = '\0';
-                                       written += t2pWriteFile(output, (tdata_t) buffer, 3);
-                                       break;
-                               case 0x29:
--                                      sprintf(buffer, "#%.2X", name[i]); 
-+                                      snprintf(buffer, sizeof(buffer), "#%.2X", name[i]); 
-                                       buffer[sizeof(buffer) - 1] = '\0';
-                                       written += t2pWriteFile(output, (tdata_t) buffer, 3);
-                                       break;
-                               case 0x2F:
--                                      sprintf(buffer, "#%.2X", name[i]); 
-+                                      snprintf(buffer, sizeof(buffer), "#%.2X", name[i]); 
-                                       buffer[sizeof(buffer) - 1] = '\0';
-                                       written += t2pWriteFile(output, (tdata_t) buffer, 3);
-                                       break;
-                               case 0x3C:
--                                      sprintf(buffer, "#%.2X", name[i]); 
-+                                      snprintf(buffer, sizeof(buffer), "#%.2X", name[i]); 
-                                       buffer[sizeof(buffer) - 1] = '\0';
-                                       written += t2pWriteFile(output, (tdata_t) buffer, 3);
-                                       break;
-                               case 0x3E:
--                                      sprintf(buffer, "#%.2X", name[i]);
-+                                      snprintf(buffer, sizeof(buffer), "#%.2X", name[i]);
-                                       buffer[sizeof(buffer) - 1] = '\0';
-                                       written += t2pWriteFile(output, (tdata_t) buffer, 3);
-                                       break;
-                               case 0x5B:
--                                      sprintf(buffer, "#%.2X", name[i]); 
-+                                      snprintf(buffer, sizeof(buffer), "#%.2X", name[i]); 
-                                       buffer[sizeof(buffer) - 1] = '\0';
-                                       written += t2pWriteFile(output, (tdata_t) buffer, 3);
-                                       break;
-                               case 0x5D:
--                                      sprintf(buffer, "#%.2X", name[i]);
-+                                      snprintf(buffer, sizeof(buffer), "#%.2X", name[i]);
-                                       buffer[sizeof(buffer) - 1] = '\0';
-                                       written += t2pWriteFile(output, (tdata_t) buffer, 3);
-                                       break;
-                               case 0x7B:
--                                      sprintf(buffer, "#%.2X", name[i]); 
-+                                      snprintf(buffer, sizeof(buffer), "#%.2X", name[i]); 
-                                       buffer[sizeof(buffer) - 1] = '\0';
-                                       written += t2pWriteFile(output, (tdata_t) buffer, 3);
-                                       break;
-                               case 0x7D:
--                                      sprintf(buffer, "#%.2X", name[i]); 
-+                                      snprintf(buffer, sizeof(buffer), "#%.2X", name[i]); 
-                                       buffer[sizeof(buffer) - 1] = '\0';
-                                       written += t2pWriteFile(output, (tdata_t) buffer, 3);
-                                       break;
-@@ -3865,14 +3867,14 @@
- tsize_t t2p_write_pdf_stream_dict(tsize_t len, uint32 number, TIFF* output){
-       
-       tsize_t written=0;
--      char buffer[16];
-+      char buffer[32];
-       int buflen=0;
-       
-       written += t2pWriteFile(output, (tdata_t) "/Length ", 8);
-       if(len!=0){
-               written += t2p_write_pdf_stream_length(len, output);
-       } else {
--              buflen=sprintf(buffer, "%lu", (unsigned long)number);
-+              buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)number);
-               written += t2pWriteFile(output, (tdata_t) buffer, buflen);
-               written += t2pWriteFile(output, (tdata_t) " 0 R \n", 6);
-       }
-@@ -3913,10 +3915,10 @@
- tsize_t t2p_write_pdf_stream_length(tsize_t len, TIFF* output){
-       tsize_t written=0;
--      char buffer[16];
-+      char buffer[32];
-       int buflen=0;
--      buflen=sprintf(buffer, "%lu", (unsigned long)len);
-+      buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)len);
-       written += t2pWriteFile(output, (tdata_t) buffer, buflen);
-       written += t2pWriteFile(output, (tdata_t) "\n", 1);
-@@ -3930,7 +3932,7 @@
- tsize_t t2p_write_pdf_catalog(T2P* t2p, TIFF* output)
- {
-       tsize_t written = 0;
--      char buffer[16];
-+      char buffer[32];
-       int buflen = 0;
-       written += t2pWriteFile(output, 
-@@ -3969,7 +3971,6 @@
-               written += t2p_write_pdf_string(t2p->pdf_datetime, output);
-       }
-       written += t2pWriteFile(output, (tdata_t) "\n/Producer ", 11);
--      _TIFFmemset((tdata_t)buffer, 0x00, sizeof(buffer));
-       snprintf(buffer, sizeof(buffer), "libtiff / tiff2pdf - %d", TIFFLIB_VERSION);
-       written += t2p_write_pdf_string(buffer, output);
-       written += t2pWriteFile(output, (tdata_t) "\n", 1);
-@@ -4110,7 +4111,7 @@
- {
-       tsize_t written=0;
-       tdir_t i=0;
--      char buffer[16];
-+      char buffer[32];
-       int buflen=0;
-       int page=0;
-@@ -4118,7 +4119,7 @@
-               (tdata_t) "<< \n/Type /Pages \n/Kids [ ", 26);
-       page = t2p->pdf_pages+1;
-       for (i=0;i<t2p->tiff_pagecount;i++){
--              buflen=sprintf(buffer, "%d", page);
-+              buflen=snprintf(buffer, sizeof(buffer), "%d", page);
-               written += t2pWriteFile(output, (tdata_t) buffer, buflen);
-               written += t2pWriteFile(output, (tdata_t) " 0 R ", 5);
-               if ( ((i+1)%8)==0 ) {
-@@ -4133,8 +4134,7 @@
-               }
-       }
-       written += t2pWriteFile(output, (tdata_t) "] \n/Count ", 10);
--      _TIFFmemset(buffer, 0x00, 16);
--      buflen=sprintf(buffer, "%d", t2p->tiff_pagecount);
-+      buflen=snprintf(buffer, sizeof(buffer), "%d", t2p->tiff_pagecount);
-       written += t2pWriteFile(output, (tdata_t) buffer, buflen);
-       written += t2pWriteFile(output, (tdata_t) " \n>> \n", 6);
-@@ -4149,28 +4149,28 @@
-       unsigned int i=0;
-       tsize_t written=0;
--      char buffer[16];
-+      char buffer[256];
-       int buflen=0;
-       written += t2pWriteFile(output, (tdata_t) "<<\n/Type /Page \n/Parent ", 24);
--      buflen=sprintf(buffer, "%lu", (unsigned long)t2p->pdf_pages);
-+      buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->pdf_pages);
-       written += t2pWriteFile(output, (tdata_t) buffer, buflen);
-       written += t2pWriteFile(output, (tdata_t) " 0 R \n", 6);
-       written += t2pWriteFile(output, (tdata_t) "/MediaBox [", 11); 
--      buflen=sprintf(buffer, "%.4f",t2p->pdf_mediabox.x1);
-+      buflen=snprintf(buffer, sizeof(buffer), "%.4f",t2p->pdf_mediabox.x1);
-       written += t2pWriteFile(output, (tdata_t) buffer, buflen);
-       written += t2pWriteFile(output, (tdata_t) " ", 1); 
--      buflen=sprintf(buffer, "%.4f",t2p->pdf_mediabox.y1);
-+      buflen=snprintf(buffer, sizeof(buffer), "%.4f",t2p->pdf_mediabox.y1);
-       written += t2pWriteFile(output, (tdata_t) buffer, buflen);
-       written += t2pWriteFile(output, (tdata_t) " ", 1); 
--      buflen=sprintf(buffer, "%.4f",t2p->pdf_mediabox.x2);
-+      buflen=snprintf(buffer, sizeof(buffer), "%.4f",t2p->pdf_mediabox.x2);
-       written += t2pWriteFile(output, (tdata_t) buffer, buflen);
-       written += t2pWriteFile(output, (tdata_t) " ", 1); 
--      buflen=sprintf(buffer, "%.4f",t2p->pdf_mediabox.y2);
-+      buflen=snprintf(buffer, sizeof(buffer), "%.4f",t2p->pdf_mediabox.y2);
-       written += t2pWriteFile(output, (tdata_t) buffer, buflen);
-       written += t2pWriteFile(output, (tdata_t) "] \n", 3); 
-       written += t2pWriteFile(output, (tdata_t) "/Contents ", 10);
--      buflen=sprintf(buffer, "%lu", (unsigned long)(object + 1));
-+      buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)(object + 1));
-       written += t2pWriteFile(output, (tdata_t) buffer, buflen);
-       written += t2pWriteFile(output, (tdata_t) " 0 R \n", 6);
-       written += t2pWriteFile(output, (tdata_t) "/Resources << \n", 15);
-@@ -4178,15 +4178,13 @@
-               written += t2pWriteFile(output, (tdata_t) "/XObject <<\n", 12);
-               for(i=0;i<t2p->tiff_tiles[t2p->pdf_page].tiles_tilecount;i++){
-                       written += t2pWriteFile(output, (tdata_t) "/Im", 3);
--                      buflen = sprintf(buffer, "%u", t2p->pdf_page+1);
-+                      buflen = snprintf(buffer, sizeof(buffer), "%u", t2p->pdf_page+1);
-                       written += t2pWriteFile(output, (tdata_t) buffer, buflen);
-                       written += t2pWriteFile(output, (tdata_t) "_", 1);
--                      buflen = sprintf(buffer, "%u", i+1);
-+                      buflen = snprintf(buffer, sizeof(buffer), "%u", i+1);
-                       written += t2pWriteFile(output, (tdata_t) buffer, buflen);
-                       written += t2pWriteFile(output, (tdata_t) " ", 1);
--                      buflen = sprintf(
--                              buffer, 
--                              "%lu", 
-+                      buflen = snprintf(buffer, sizeof(buffer), "%lu",
-                               (unsigned long)(object+3+(2*i)+t2p->tiff_pages[t2p->pdf_page].page_extra)); 
-                       written += t2pWriteFile(output, (tdata_t) buffer, buflen);
-                       written += t2pWriteFile(output, (tdata_t) " 0 R ", 5);
-@@ -4198,12 +4196,10 @@
-       } else {
-                       written += t2pWriteFile(output, (tdata_t) "/XObject <<\n", 12);
-                       written += t2pWriteFile(output, (tdata_t) "/Im", 3);
--                      buflen = sprintf(buffer, "%u", t2p->pdf_page+1);
-+                      buflen = snprintf(buffer, sizeof(buffer), "%u", t2p->pdf_page+1);
-                       written += t2pWriteFile(output, (tdata_t) buffer, buflen);
-                       written += t2pWriteFile(output, (tdata_t) " ", 1);
--                      buflen = sprintf(
--                              buffer, 
--                              "%lu", 
-+                      buflen = snprintf(buffer, sizeof(buffer), "%lu",
-                               (unsigned long)(object+3+(2*i)+t2p->tiff_pages[t2p->pdf_page].page_extra)); 
-                       written += t2pWriteFile(output, (tdata_t) buffer, buflen);
-                       written += t2pWriteFile(output, (tdata_t) " 0 R ", 5);
-@@ -4212,9 +4208,7 @@
-       if(t2p->tiff_transferfunctioncount != 0) {
-               written += t2pWriteFile(output, (tdata_t) "/ExtGState <<", 13);
-               t2pWriteFile(output, (tdata_t) "/GS1 ", 5);
--              buflen = sprintf(
--                      buffer, 
--                      "%lu", 
-+              buflen = snprintf(buffer, sizeof(buffer), "%lu",
-                       (unsigned long)(object + 3)); 
-               written += t2pWriteFile(output, (tdata_t) buffer, buflen);
-               written += t2pWriteFile(output, (tdata_t) " 0 R ", 5);
-@@ -4587,7 +4581,7 @@
-       if(t2p->tiff_tiles[t2p->pdf_page].tiles_tilecount>0){ 
-               for(i=0;i<t2p->tiff_tiles[t2p->pdf_page].tiles_tilecount; i++){
-                       box=t2p->tiff_tiles[t2p->pdf_page].tiles_tiles[i].tile_box;
--                      buflen=sprintf(buffer, 
-+                      buflen=snprintf(buffer, sizeof(buffer), 
-                               "q %s %.4f %.4f %.4f %.4f %.4f %.4f cm /Im%d_%ld Do Q\n", 
-                               t2p->tiff_transferfunctioncount?"/GS1 gs ":"",
-                               box.mat[0],
-@@ -4602,7 +4596,7 @@
-               }
-       } else {
-               box=t2p->pdf_imagebox;
--              buflen=sprintf(buffer, 
-+              buflen=snprintf(buffer, sizeof(buffer), 
-                       "q %s %.4f %.4f %.4f %.4f %.4f %.4f cm /Im%d Do Q\n", 
-                       t2p->tiff_transferfunctioncount?"/GS1 gs ":"",
-                       box.mat[0],
-@@ -4627,59 +4621,48 @@
-                                                                                               TIFF* output){
-       tsize_t written=0;
--      char buffer[16];
-+      char buffer[32];
-       int buflen=0;
-       written += t2p_write_pdf_stream_dict(0, t2p->pdf_xrefcount+1, output); 
-       written += t2pWriteFile(output, 
-               (tdata_t) "/Type /XObject \n/Subtype /Image \n/Name /Im", 
-               42);
--      buflen=sprintf(buffer, "%u", t2p->pdf_page+1);
-+      buflen=snprintf(buffer, sizeof(buffer), "%u", t2p->pdf_page+1);
-       written += t2pWriteFile(output, (tdata_t) buffer, buflen);
-       if(tile != 0){
-               written += t2pWriteFile(output, (tdata_t) "_", 1);
--              buflen=sprintf(buffer, "%lu", (unsigned long)tile);
-+              buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)tile);
-               written += t2pWriteFile(output, (tdata_t) buffer, buflen);
-       }
-       written += t2pWriteFile(output, (tdata_t) "\n/Width ", 8);
--      _TIFFmemset((tdata_t)buffer, 0x00, 16);
-       if(tile==0){
--              buflen=sprintf(buffer, "%lu", (unsigned long)t2p->tiff_width);
-+              buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->tiff_width);
-       } else {
-               if(t2p_tile_is_right_edge(t2p->tiff_tiles[t2p->pdf_page], tile-1)!=0){
--                      buflen=sprintf(
--                              buffer, 
--                              "%lu", 
-+                      buflen=snprintf(buffer, sizeof(buffer), "%lu",
-                               (unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilewidth);
-               } else {
--                      buflen=sprintf(
--                              buffer, 
--                              "%lu", 
-+                      buflen=snprintf(buffer, sizeof(buffer), "%lu",
-                               (unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_tilewidth);
-               }
-       }
-       written += t2pWriteFile(output, (tdata_t) buffer, buflen);
-       written += t2pWriteFile(output, (tdata_t) "\n/Height ", 9);
--      _TIFFmemset((tdata_t)buffer, 0x00, 16);
-       if(tile==0){
--              buflen=sprintf(buffer, "%lu", (unsigned long)t2p->tiff_length);
-+              buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->tiff_length);
-       } else {
-               if(t2p_tile_is_bottom_edge(t2p->tiff_tiles[t2p->pdf_page], tile-1)!=0){
--                      buflen=sprintf(
--                              buffer, 
--                              "%lu", 
-+                      buflen=snprintf(buffer, sizeof(buffer), "%lu",
-                               (unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilelength);
-               } else {
--                      buflen=sprintf(
--                              buffer, 
--                              "%lu", 
-+                      buflen=snprintf(buffer, sizeof(buffer), "%lu",
-                               (unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_tilelength);
-               }
-       }
-       written += t2pWriteFile(output, (tdata_t) buffer, buflen);
-       written += t2pWriteFile(output, (tdata_t) "\n/BitsPerComponent ", 19);
--      _TIFFmemset((tdata_t)buffer, 0x00, 16);
--      buflen=sprintf(buffer, "%u", t2p->tiff_bitspersample);
-+      buflen=snprintf(buffer, sizeof(buffer), "%u", t2p->tiff_bitspersample);
-       written += t2pWriteFile(output, (tdata_t) buffer, buflen);
-       written += t2pWriteFile(output, (tdata_t) "\n/ColorSpace ", 13);
-       written += t2p_write_pdf_xobject_cs(t2p, output);
-@@ -4723,11 +4706,10 @@
-               t2p->pdf_colorspace ^= T2P_CS_PALETTE;
-               written += t2p_write_pdf_xobject_cs(t2p, output);
-               t2p->pdf_colorspace |= T2P_CS_PALETTE;
--              buflen=sprintf(buffer, "%u", (0x0001 << t2p->tiff_bitspersample)-1 );
-+              buflen=snprintf(buffer, sizeof(buffer), "%u", (0x0001 << t2p->tiff_bitspersample)-1 );
-               written += t2pWriteFile(output, (tdata_t) buffer, buflen);
-               written += t2pWriteFile(output, (tdata_t) " ", 1);
--              _TIFFmemset(buffer, 0x00, 16);
--              buflen=sprintf(buffer, "%lu", (unsigned long)t2p->pdf_palettecs ); 
-+              buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->pdf_palettecs ); 
-               written += t2pWriteFile(output, (tdata_t) buffer, buflen);
-               written += t2pWriteFile(output, (tdata_t) " 0 R ]\n", 7);
-               return(written);
-@@ -4761,10 +4743,10 @@
-                       X_W /= Y_W;
-                       Z_W /= Y_W;
-                       Y_W = 1.0F;
--                      buflen=sprintf(buffer, "[%.4f %.4f %.4f] \n", X_W, Y_W, Z_W);
-+                      buflen=snprintf(buffer, sizeof(buffer), "[%.4f %.4f %.4f] \n", X_W, Y_W, Z_W);
-                       written += t2pWriteFile(output, (tdata_t) buffer, buflen);
-                       written += t2pWriteFile(output, (tdata_t) "/Range ", 7);
--                      buflen=sprintf(buffer, "[%d %d %d %d] \n", 
-+                      buflen=snprintf(buffer, sizeof(buffer), "[%d %d %d %d] \n", 
-                               t2p->pdf_labrange[0], 
-                               t2p->pdf_labrange[1], 
-                               t2p->pdf_labrange[2], 
-@@ -4780,26 +4762,26 @@
- tsize_t t2p_write_pdf_transfer(T2P* t2p, TIFF* output){
-       tsize_t written=0;
--      char buffer[16];
-+      char buffer[32];
-       int buflen=0;
-       written += t2pWriteFile(output, (tdata_t) "<< /Type /ExtGState \n/TR ", 25);
-       if(t2p->tiff_transferfunctioncount == 1){
--              buflen=sprintf(buffer, "%lu",
-+              buflen=snprintf(buffer, sizeof(buffer), "%lu",
-                              (unsigned long)(t2p->pdf_xrefcount + 1));
-               written += t2pWriteFile(output, (tdata_t) buffer, buflen);
-               written += t2pWriteFile(output, (tdata_t) " 0 R ", 5);
-       } else {
-               written += t2pWriteFile(output, (tdata_t) "[ ", 2);
--              buflen=sprintf(buffer, "%lu",
-+              buflen=snprintf(buffer, sizeof(buffer), "%lu",
-                              (unsigned long)(t2p->pdf_xrefcount + 1));
-               written += t2pWriteFile(output, (tdata_t) buffer, buflen);
-               written += t2pWriteFile(output, (tdata_t) " 0 R ", 5);
--              buflen=sprintf(buffer, "%lu",
-+              buflen=snprintf(buffer, sizeof(buffer), "%lu",
-                              (unsigned long)(t2p->pdf_xrefcount + 2));
-               written += t2pWriteFile(output, (tdata_t) buffer, buflen);
-               written += t2pWriteFile(output, (tdata_t) " 0 R ", 5);
--              buflen=sprintf(buffer, "%lu",
-+              buflen=snprintf(buffer, sizeof(buffer), "%lu",
-                              (unsigned long)(t2p->pdf_xrefcount + 3));
-               written += t2pWriteFile(output, (tdata_t) buffer, buflen);
-               written += t2pWriteFile(output, (tdata_t) " 0 R ", 5);
-@@ -4821,7 +4803,7 @@
-       written += t2pWriteFile(output, (tdata_t) "/FunctionType 0 \n", 17);
-       written += t2pWriteFile(output, (tdata_t) "/Domain [0.0 1.0] \n", 19);
-       written += t2pWriteFile(output, (tdata_t) "/Range [0.0 1.0] \n", 18);
--      buflen=sprintf(buffer, "/Size [%u] \n", (1<<t2p->tiff_bitspersample));
-+      buflen=snprintf(buffer, sizeof(buffer), "/Size [%u] \n", (1<<t2p->tiff_bitspersample));
-       written += t2pWriteFile(output, (tdata_t) buffer, buflen);
-       written += t2pWriteFile(output, (tdata_t) "/BitsPerSample 16 \n", 19);
-       written += t2p_write_pdf_stream_dict(((tsize_t)1)<<(t2p->tiff_bitspersample+1), 0, output);
-@@ -4848,7 +4830,7 @@
- tsize_t t2p_write_pdf_xobject_calcs(T2P* t2p, TIFF* output){
-       tsize_t written=0;
--      char buffer[128];
-+      char buffer[256];
-       int buflen=0;
-       
-       float X_W=0.0;
-@@ -4916,16 +4898,16 @@
-       written += t2pWriteFile(output, (tdata_t) "<< \n", 4);
-       if(t2p->pdf_colorspace & T2P_CS_CALGRAY){
-               written += t2pWriteFile(output, (tdata_t) "/WhitePoint ", 12);
--              buflen=sprintf(buffer, "[%.4f %.4f %.4f] \n", X_W, Y_W, Z_W);
-+              buflen=snprintf(buffer, sizeof(buffer), "[%.4f %.4f %.4f] \n", X_W, Y_W, Z_W);
-               written += t2pWriteFile(output, (tdata_t) buffer, buflen);
-               written += t2pWriteFile(output, (tdata_t) "/Gamma 2.2 \n", 12);
-       }
-       if(t2p->pdf_colorspace & T2P_CS_CALRGB){
-               written += t2pWriteFile(output, (tdata_t) "/WhitePoint ", 12);
--              buflen=sprintf(buffer, "[%.4f %.4f %.4f] \n", X_W, Y_W, Z_W);
-+              buflen=snprintf(buffer, sizeof(buffer), "[%.4f %.4f %.4f] \n", X_W, Y_W, Z_W);
-               written += t2pWriteFile(output, (tdata_t) buffer, buflen);
-               written += t2pWriteFile(output, (tdata_t) "/Matrix ", 8);
--              buflen=sprintf(buffer, "[%.4f %.4f %.4f %.4f %.4f %.4f %.4f %.4f %.4f] \n", 
-+              buflen=snprintf(buffer, sizeof(buffer), "[%.4f %.4f %.4f %.4f %.4f %.4f %.4f %.4f %.4f] \n", 
-                       X_R, Y_R, Z_R, 
-                       X_G, Y_G, Z_G, 
-                       X_B, Y_B, Z_B); 
-@@ -4944,11 +4926,11 @@
- tsize_t t2p_write_pdf_xobject_icccs(T2P* t2p, TIFF* output){
-       tsize_t written=0;
--      char buffer[16];
-+      char buffer[32];
-       int buflen=0;
-       
-       written += t2pWriteFile(output, (tdata_t) "[/ICCBased ", 11);
--      buflen=sprintf(buffer, "%lu", (unsigned long)t2p->pdf_icccs);
-+      buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->pdf_icccs);
-       written += t2pWriteFile(output, (tdata_t) buffer, buflen);
-       written += t2pWriteFile(output, (tdata_t) " 0 R] \n", 7);
-@@ -4958,11 +4940,11 @@
- tsize_t t2p_write_pdf_xobject_icccs_dict(T2P* t2p, TIFF* output){
-       tsize_t written=0;
--      char buffer[16];
-+      char buffer[32];
-       int buflen=0;
-       
-       written += t2pWriteFile(output, (tdata_t) "/N ", 3);
--      buflen=sprintf(buffer, "%u \n", t2p->tiff_samplesperpixel);
-+      buflen=snprintf(buffer, sizeof(buffer), "%u \n", t2p->tiff_samplesperpixel);
-       written += t2pWriteFile(output, (tdata_t) buffer, buflen);
-       written += t2pWriteFile(output, (tdata_t) "/Alternate ", 11);
-       t2p->pdf_colorspace ^= T2P_CS_ICCBASED;
-@@ -5027,7 +5009,7 @@
- tsize_t t2p_write_pdf_xobject_stream_filter(ttile_t tile, T2P* t2p, TIFF* output){
-       tsize_t written=0;
--      char buffer[16];
-+      char buffer[32];
-       int buflen=0;
-       if(t2p->pdf_compression==T2P_COMPRESS_NONE){
-@@ -5042,41 +5024,33 @@
-                       written += t2pWriteFile(output, (tdata_t) "<< /K -1 ", 9);
-                       if(tile==0){
-                               written += t2pWriteFile(output, (tdata_t) "/Columns ", 9);
--                              buflen=sprintf(buffer, "%lu",
-+                              buflen=snprintf(buffer, sizeof(buffer), "%lu",
-                                              (unsigned long)t2p->tiff_width);
-                               written += t2pWriteFile(output, (tdata_t) buffer, buflen);
-                               written += t2pWriteFile(output, (tdata_t) " /Rows ", 7);
--                              buflen=sprintf(buffer, "%lu",
-+                              buflen=snprintf(buffer, sizeof(buffer), "%lu",
-                                              (unsigned long)t2p->tiff_length);
-                               written += t2pWriteFile(output, (tdata_t) buffer, buflen);
-                       } else {
-                               if(t2p_tile_is_right_edge(t2p->tiff_tiles[t2p->pdf_page], tile-1)==0){
-                                       written += t2pWriteFile(output, (tdata_t) "/Columns ", 9);
--                                      buflen=sprintf(
--                                              buffer, 
--                                              "%lu", 
-+                                      buflen=snprintf(buffer, sizeof(buffer), "%lu",
-                                               (unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_tilewidth);
-                                       written += t2pWriteFile(output, (tdata_t) buffer, buflen);
-                               } else {
-                                       written += t2pWriteFile(output, (tdata_t) "/Columns ", 9);
--                                      buflen=sprintf(
--                                              buffer, 
--                                              "%lu", 
-+                                      buflen=snprintf(buffer, sizeof(buffer), "%lu",
-                                               (unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilewidth);
-                                       written += t2pWriteFile(output, (tdata_t) buffer, buflen);
-                               }
-                               if(t2p_tile_is_bottom_edge(t2p->tiff_tiles[t2p->pdf_page], tile-1)==0){
-                                       written += t2pWriteFile(output, (tdata_t) " /Rows ", 7);
--                                      buflen=sprintf(
--                                              buffer, 
--                                              "%lu", 
-+                                      buflen=snprintf(buffer, sizeof(buffer), "%lu",
-                                               (unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_tilelength);
-                                       written += t2pWriteFile(output, (tdata_t) buffer, buflen);
-                               } else {
-                                       written += t2pWriteFile(output, (tdata_t) " /Rows ", 7);
--                                      buflen=sprintf(
--                                              buffer, 
--                                              "%lu", 
-+                                      buflen=snprintf(buffer, sizeof(buffer), "%lu",
-                                               (unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilelength);
-                                       written += t2pWriteFile(output, (tdata_t) buffer, buflen);
-                               }
-@@ -5103,21 +5077,17 @@
-                       if(t2p->pdf_compressionquality%100){
-                               written += t2pWriteFile(output, (tdata_t) "/DecodeParms ", 13);
-                               written += t2pWriteFile(output, (tdata_t) "<< /Predictor ", 14);
--                              _TIFFmemset(buffer, 0x00, 16);
--                              buflen=sprintf(buffer, "%u", t2p->pdf_compressionquality%100);
-+                              buflen=snprintf(buffer, sizeof(buffer), "%u", t2p->pdf_compressionquality%100);
-                               written += t2pWriteFile(output, (tdata_t) buffer, buflen);
-                               written += t2pWriteFile(output, (tdata_t) " /Columns ", 10);
--                              _TIFFmemset(buffer, 0x00, 16);
--                              buflen = sprintf(buffer, "%lu",
-+                              buflen = snprintf(buffer, sizeof(buffer), "%lu",
-                                                (unsigned long)t2p->tiff_width);
-                               written += t2pWriteFile(output, (tdata_t) buffer, buflen);
-                               written += t2pWriteFile(output, (tdata_t) " /Colors ", 9);
--                              _TIFFmemset(buffer, 0x00, 16);
--                              buflen=sprintf(buffer, "%u", t2p->tiff_samplesperpixel);
-+                              buflen=snprintf(buffer, sizeof(buffer), "%u", t2p->tiff_samplesperpixel);
-                               written += t2pWriteFile(output, (tdata_t) buffer, buflen);
-                               written += t2pWriteFile(output, (tdata_t) " /BitsPerComponent ", 19);
--                              _TIFFmemset(buffer, 0x00, 16);
--                              buflen=sprintf(buffer, "%u", t2p->tiff_bitspersample);
-+                              buflen=snprintf(buffer, sizeof(buffer), "%u", t2p->tiff_bitspersample);
-                               written += t2pWriteFile(output, (tdata_t) buffer, buflen);
-                               written += t2pWriteFile(output, (tdata_t) ">>\n", 3);
-                       }
-@@ -5137,16 +5107,16 @@
- tsize_t t2p_write_pdf_xreftable(T2P* t2p, TIFF* output){
-       tsize_t written=0;
--      char buffer[21];
-+      char buffer[64];
-       int buflen=0;
-       uint32 i=0;
-       written += t2pWriteFile(output, (tdata_t) "xref\n0 ", 7);
--      buflen=sprintf(buffer, "%lu", (unsigned long)(t2p->pdf_xrefcount + 1));
-+      buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)(t2p->pdf_xrefcount + 1));
-       written += t2pWriteFile(output, (tdata_t) buffer, buflen);
-       written += t2pWriteFile(output, (tdata_t) " \n0000000000 65535 f \n", 22);
-       for (i=0;i<t2p->pdf_xrefcount;i++){
--              sprintf(buffer, "%.10lu 00000 n \n",
-+              snprintf(buffer, sizeof(buffer), "%.10lu 00000 n \n",
-                       (unsigned long)t2p->pdf_xrefoffsets[i]);
-               written += t2pWriteFile(output, (tdata_t) buffer, 20);
-       }
-@@ -5170,17 +5140,14 @@
-               snprintf(t2p->pdf_fileid + i, 9, "%.8X", rand());
-       written += t2pWriteFile(output, (tdata_t) "trailer\n<<\n/Size ", 17);
--      buflen = sprintf(buffer, "%lu", (unsigned long)(t2p->pdf_xrefcount+1));
-+      buflen = snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)(t2p->pdf_xrefcount+1));
-       written += t2pWriteFile(output, (tdata_t) buffer, buflen);
--      _TIFFmemset(buffer, 0x00, 32);  
-       written += t2pWriteFile(output, (tdata_t) "\n/Root ", 7);
--      buflen=sprintf(buffer, "%lu", (unsigned long)t2p->pdf_catalog);
-+      buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->pdf_catalog);
-       written += t2pWriteFile(output, (tdata_t) buffer, buflen);
--      _TIFFmemset(buffer, 0x00, 32);  
-       written += t2pWriteFile(output, (tdata_t) " 0 R \n/Info ", 12);
--      buflen=sprintf(buffer, "%lu", (unsigned long)t2p->pdf_info);
-+      buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->pdf_info);
-       written += t2pWriteFile(output, (tdata_t) buffer, buflen);
--      _TIFFmemset(buffer, 0x00, 32);  
-       written += t2pWriteFile(output, (tdata_t) " 0 R \n/ID[<", 11);
-       written += t2pWriteFile(output, (tdata_t) t2p->pdf_fileid,
-                               sizeof(t2p->pdf_fileid) - 1);
-@@ -5188,9 +5155,8 @@
-       written += t2pWriteFile(output, (tdata_t) t2p->pdf_fileid,
-                               sizeof(t2p->pdf_fileid) - 1);
-       written += t2pWriteFile(output, (tdata_t) ">]\n>>\nstartxref\n", 16);
--      buflen=sprintf(buffer, "%lu", (unsigned long)t2p->pdf_startxref);
-+      buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->pdf_startxref);
-       written += t2pWriteFile(output, (tdata_t) buffer, buflen);
--      _TIFFmemset(buffer, 0x00, 32);  
-       written += t2pWriteFile(output, (tdata_t) "\n%%EOF\n", 7);
-       return(written);
-Index: tiff-4.0.3/tools/tiff2ps.c
-===================================================================
---- tiff-4.0.3.orig/tools/tiff2ps.c    2013-06-23 10:36:51.163629483 -0400
-+++ tiff-4.0.3/tools/tiff2ps.c 2013-06-23 10:36:51.155629481 -0400
-@@ -1781,8 +1781,8 @@
-               imageOp = "imagemask";
-       (void)strcpy(im_x, "0");
--      (void)sprintf(im_y, "%lu", (long) h);
--      (void)sprintf(im_h, "%lu", (long) h);
-+      (void)snprintf(im_y, sizeof(im_y), "%lu", (long) h);
-+      (void)snprintf(im_h, sizeof(im_h), "%lu", (long) h);
-       tile_width = w;
-       tile_height = h;
-       if (TIFFIsTiled(tif)) {
-@@ -1803,7 +1803,7 @@
-               }
-               if (tile_height < h) {
-                       fputs("/im_y 0 def\n", fd);
--                      (void)sprintf(im_y, "%lu im_y sub", (unsigned long) h);
-+                      (void)snprintf(im_y, sizeof(im_y), "%lu im_y sub", (unsigned long) h);
-               }
-       } else {
-               repeat_count = tf_numberstrips;
-@@ -1815,7 +1815,7 @@
-                       fprintf(fd, "/im_h %lu def\n",
-                           (unsigned long) tile_height);
-                       (void)strcpy(im_h, "im_h");
--                      (void)sprintf(im_y, "%lu im_y sub", (unsigned long) h);
-+                      (void)snprintf(im_y, sizeof(im_y), "%lu im_y sub", (unsigned long) h);
-               }
-       }
-Index: tiff-4.0.3/tools/tiffcrop.c
-===================================================================
---- tiff-4.0.3.orig/tools/tiffcrop.c   2013-06-23 10:36:51.163629483 -0400
-+++ tiff-4.0.3/tools/tiffcrop.c        2013-06-23 10:36:51.159629481 -0400
-@@ -2077,7 +2077,7 @@
-         return 1;
-         }
--      sprintf (filenum, "-%03d%s", findex, export_ext);
-+      snprintf(filenum, sizeof(filenum), "-%03d%s", findex, export_ext);
-       filenum[14] = '\0';
-       strncat (exportname, filenum, 15);
-       }
-@@ -2230,8 +2230,8 @@
-           /* dump.infilename is guaranteed to be NUL termimated and have 20 bytes 
-              fewer than PATH_MAX */ 
--          memset (temp_filename, '\0', PATH_MAX + 1);              
--          sprintf (temp_filename, "%s-read-%03d.%s", dump.infilename, dump_images,
-+          snprintf(temp_filename, sizeof(temp_filename), "%s-read-%03d.%s",
-+                 dump.infilename, dump_images,
-                   (dump.format == DUMP_TEXT) ? "txt" : "raw");
-           if ((dump.infile = fopen(temp_filename, dump.mode)) == NULL)
-             {
-@@ -2249,8 +2249,8 @@
-           /* dump.outfilename is guaranteed to be NUL termimated and have 20 bytes 
-              fewer than PATH_MAX */ 
--          memset (temp_filename, '\0', PATH_MAX + 1);              
--          sprintf (temp_filename, "%s-write-%03d.%s", dump.outfilename, dump_images,
-+          snprintf(temp_filename, sizeof(temp_filename), "%s-write-%03d.%s",
-+                 dump.outfilename, dump_images,
-                   (dump.format == DUMP_TEXT) ? "txt" : "raw");
-           if ((dump.outfile = fopen(temp_filename, dump.mode)) == NULL)
-             {
-Index: tiff-4.0.3/tools/tiff2bw.c
-===================================================================
---- tiff-4.0.3.orig/tools/tiff2bw.c    2013-06-23 10:36:51.163629483 -0400
-+++ tiff-4.0.3/tools/tiff2bw.c 2013-06-23 10:36:51.159629481 -0400
-@@ -205,7 +205,7 @@
-               }
-       }
-       TIFFSetField(out, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_MINISBLACK);
--      sprintf(thing, "B&W version of %s", argv[optind]);
-+      snprintf(thing, sizeof(thing), "B&W version of %s", argv[optind]);
-       TIFFSetField(out, TIFFTAG_IMAGEDESCRIPTION, thing);
-       TIFFSetField(out, TIFFTAG_SOFTWARE, "tiff2bw");
-       outbuf = (unsigned char *)_TIFFmalloc(TIFFScanlineSize(out));
diff --git a/libs/tiff/patches/013-CVE-2013-4231.patch b/libs/tiff/patches/013-CVE-2013-4231.patch
deleted file mode 100644 (file)
index c26bd85..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-Description: Buffer overflow in gif2tiff
-Bug: http://bugzilla.maptools.org/show_bug.cgi?id=2450
-Bug-Debian: http://bugs.debian.org/719303
-
-Index: tiff-4.0.3/tools/gif2tiff.c
-===================================================================
---- tiff-4.0.3.orig/tools/gif2tiff.c   2013-08-22 11:46:11.960846910 -0400
-+++ tiff-4.0.3/tools/gif2tiff.c        2013-08-22 11:46:11.956846910 -0400
-@@ -333,6 +333,8 @@
-     int status = 1;
-     datasize = getc(infile);
-+    if (datasize > 12)
-+      return 0;
-     clear = 1 << datasize;
-     eoi = clear + 1;
-     avail = clear + 2;
diff --git a/libs/tiff/patches/014-CVE-2013-4232.patch b/libs/tiff/patches/014-CVE-2013-4232.patch
deleted file mode 100644 (file)
index 0d80ff3..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-Description: use after free in tiff2pdf
-Bug: http://bugzilla.maptools.org/show_bug.cgi?id=2449
-Bug-Debian: http://bugs.debian.org/719303
-
-Index: tiff-4.0.3/tools/tiff2pdf.c
-===================================================================
---- tiff-4.0.3.orig/tools/tiff2pdf.c   2013-08-22 11:46:37.292847242 -0400
-+++ tiff-4.0.3/tools/tiff2pdf.c        2013-08-22 11:46:37.292847242 -0400
-@@ -2461,7 +2461,8 @@
-                                       (unsigned long) t2p->tiff_datasize, 
-                                       TIFFFileName(input));
-                               t2p->t2p_error = T2P_ERR_ERROR;
--                        _TIFFfree(buffer);
-+                              _TIFFfree(buffer);
-+                              return(0);
-                       } else {
-                               buffer=samplebuffer;
-                               t2p->tiff_datasize *= t2p->tiff_samplesperpixel;
diff --git a/libs/tiff/patches/015-CVE-2013-4244.patch b/libs/tiff/patches/015-CVE-2013-4244.patch
deleted file mode 100644 (file)
index 0a77a0c..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-Description: OOB write in gif2tiff
-Bug-Redhat: https://bugzilla.redhat.com/show_bug.cgi?id=996468
-
-Index: tiff-4.0.3/tools/gif2tiff.c
-===================================================================
---- tiff-4.0.3.orig/tools/gif2tiff.c   2013-08-24 11:17:13.546447901 -0400
-+++ tiff-4.0.3/tools/gif2tiff.c        2013-08-24 11:17:13.546447901 -0400
-@@ -400,6 +400,10 @@
-     }
-     if (oldcode == -1) {
-+        if (code >= clear) {
-+            fprintf(stderr, "bad input: code=%d is larger than clear=%d\n",code, clear);
-+            return 0;
-+        }
-       *(*fill)++ = suffix[code];
-       firstchar = oldcode = code;
-       return 1;
diff --git a/libs/tiff/patches/016-CVE-2013-4243.patch b/libs/tiff/patches/016-CVE-2013-4243.patch
deleted file mode 100644 (file)
index 75fae2c..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-Index: tiff/tools/gif2tiff.c
-===================================================================
---- tiff.orig/tools/gif2tiff.c
-+++ tiff/tools/gif2tiff.c
-@@ -280,6 +280,10 @@ readgifimage(char* mode)
-         fprintf(stderr, "no colormap present for image\n");
-         return (0);
-     }
-+    if (width == 0 || height == 0) {
-+        fprintf(stderr, "Invalid value of width or height\n");
-+        return(0);
-+    }
-     if ((raster = (unsigned char*) _TIFFmalloc(width*height+EXTRAFUDGE)) == NULL) {
-         fprintf(stderr, "not enough memory for image\n");
-         return (0);
-@@ -404,6 +408,10 @@ process(register int code, unsigned char
-             fprintf(stderr, "bad input: code=%d is larger than clear=%d\n",code, clear);
-             return 0;
-         }
-+        if (*fill >= raster + width*height) {
-+            fprintf(stderr, "raster full before eoi code\n");
-+            return 0;
-+        }
-       *(*fill)++ = suffix[code];
-       firstchar = oldcode = code;
-       return 1;
-@@ -434,6 +442,10 @@ process(register int code, unsigned char
-     }
-     oldcode = incode;
-     do {
-+        if (*fill >= raster + width*height) {
-+            fprintf(stderr, "raster full before eoi code\n");
-+            return 0;
-+        }
-       *(*fill)++ = *--stackp;
-     } while (stackp > stack);
-     return 1;
diff --git a/libs/tiff/patches/017-CVE-2014-9330.patch b/libs/tiff/patches/017-CVE-2014-9330.patch
deleted file mode 100644 (file)
index acd0a33..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-Description: CVE-2014-9330
- Integer overflow in bmp2tiff
-Origin: upstream, http://bugzilla.maptools.org/show_bug.cgi?id=2494
-Bug: http://bugzilla.maptools.org/show_bug.cgi?id=2494
-Bug-Debian: http://bugs.debian.org/773987
-
-Index: tiff/tools/bmp2tiff.c
-===================================================================
---- tiff.orig/tools/bmp2tiff.c
-+++ tiff/tools/bmp2tiff.c
-@@ -1,4 +1,4 @@
--/* $Id: bmp2tiff.c,v 1.23 2010-03-10 18:56:49 bfriesen Exp $
-+/* $Id: bmp2tiff.c,v 1.24 2014-12-21 15:15:32 erouault Exp $
-  *
-  * Project:  libtiff tools
-  * Purpose:  Convert Windows BMP files in TIFF.
-@@ -403,6 +403,13 @@ main(int argc, char* argv[])
-               width = info_hdr.iWidth;
-               length = (info_hdr.iHeight > 0) ? info_hdr.iHeight : -info_hdr.iHeight;
-+        if( width <= 0 || length <= 0 )
-+        {
-+            TIFFError(infilename,
-+                  "Invalid dimensions of BMP file" );
-+            close(fd);
-+            return -1;
-+        }
-               switch (info_hdr.iBitCount)
-               {
-@@ -593,6 +600,14 @@ main(int argc, char* argv[])
-                       compr_size = file_hdr.iSize - file_hdr.iOffBits;
-                       uncompr_size = width * length;
-+            /* Detect int overflow */
-+            if( uncompr_size / width != length )
-+            {
-+                TIFFError(infilename,
-+                    "Invalid dimensions of BMP file" );
-+                close(fd);
-+                return -1;
-+            }
-                       comprbuf = (unsigned char *) _TIFFmalloc( compr_size );
-                       if (!comprbuf) {
-                               TIFFError(infilename,
index 4a94a8986bd68b7fd6354b7af27f05f6e46440c0..d962371baa3470f8bfc1d6453bc5beac8e6d9241 100644 (file)
@@ -9,9 +9,9 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=unixodbc
 PKG_VERSION:=2.3.4
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
-PKG_SOURCE_URL:=@SF/unixodbc
+PKG_SOURCE_URL:=ftp://ftp.unixodbc.org/pub/unixODBC/
 PKG_SOURCE:=unixODBC-$(PKG_VERSION).tar.gz
 PKG_MD5SUM:=bd25d261ca1808c947cb687e2034be81
 PKG_BUILD_DIR:=$(BUILD_DIR)/unixODBC-$(PKG_VERSION)
index bcbb07a18510dec7e3b50c7a06bdb0ee837b6b60..137a45b1c0d04eb3134311c12eda329f05cc0bcb 100644 (file)
@@ -8,10 +8,10 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=postfix
-PKG_RELEASE:=2
+PKG_RELEASE:=1
 PKG_SOURCE_URL:=ftp://ftp.porcupine.org/mirrors/postfix-release/official/
-PKG_VERSION:=3.0.1
-PKG_MD5SUM:=3ec1416e7d4fba9566297c8fcf7a348c
+PKG_VERSION:=3.1.0
+PKG_MD5SUM:=b4a506fa74c69c6fb1875c0971268344
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_MAINTAINER:=Denis Shulyaka <Shulyaka@gmail.com>
 PKG_LICENSE:=IPL-1.0
@@ -25,7 +25,7 @@ define Package/postfix
   CATEGORY:=Mail
   TITLE:=Postfix Mail Transmit Agent
   URL:=http://www.postfix.org/
-  DEPENDS:=+POSTFIX_TLS:libopenssl +POSTFIX_SASL:libsasl2 +POSTFIX_LDAP:libopenldap +POSTFIX_DB:libdb47 +libpcre
+  DEPENDS:=+POSTFIX_TLS:libopenssl +POSTFIX_SASL:libsasl2 +POSTFIX_LDAP:libopenldap +POSTFIX_DB:libdb47 +POSTFIX_EAI:icu +libpcre
 endef
 
 define Package/postfix/description
@@ -59,10 +59,20 @@ define Package/postfix/config
                        default y
                        help
                          Implements support for cdb files using tinycdb
+               config POSTFIX_EAI
+                       bool "SMTPUTF8 support"
+                       default n
+                       help
+                               Enable Postfix support for Email Address Internationalization
+                               (EAI) as defined in RFC 6531 (SMTPUTF8 extension), RFC 6532
+                               (Internationalized email headers) and RFC 6533
+                               (Internationalized delivery status notifications).
+                               Since version 3.0, Postfix fully supports UTF-8 email
+                               addresses and UTF-8 message header values.
        endmenu
 endef
 
-CCARGS=-DNO_EPOLL -DNO_SIGSETJMP -DNO_NIS -DNO_EAI
+CCARGS=-DNO_NIS
 AUXLIBS=-L$(STAGING_DIR)/usr/lib
 default_database_type=cdb
 
@@ -96,6 +106,15 @@ else
   CCARGS+=-DNO_DB
 endif
 
+ifdef CONFIG_POSTFIX_EAI
+  AUXLIBS+=-licuuc
+  CCARGS+=-DHAS_EAI
+  smtputf8_conf = yes
+else
+  CCARGS+=-DNO_EAI
+  smtputf8_conf = no
+endif
+
 CCARGS+=-DDEF_DB_TYPE=\"$(default_database_type)\"
 
 config_directory=/etc/postfix# also add this to postfix init file
@@ -121,6 +140,7 @@ define Package/postfix/conffiles
 $(config_directory)/main.cf
 $(config_directory)/master.cf
 $(config_directory)/aliases
+$(config_directory)/virtual
 endef
 
 define Build/Configure
@@ -139,17 +159,18 @@ endef
 #      postconf -d > /tmp/main.cf.new
 # 3. Transfer /tmp/main.cf.new file to the build system
 # 4. Execute the following command:
-#      cat /tmp/main.cf.new | ( echo '# DO NOT EDIT THIS FILE. EDIT THE MAIN.CF FILE INSTEAD. THE'; echo '# TEXT HERE JUST SHOWS DEFAULT SETTINGS BUILT INTO POSTFIX.'; echo '#'; grep -v ^alias_maps\ = |grep -v ^alias_database\ = |grep -v ^command_directory\ = |grep -v ^config_directory\ = |grep -v ^daemon_directory\ = |grep -v ^data_directory\ = |grep -v ^default_database_type\ = |grep -v ^html_directory\ = |grep -v ^mail_spool_directory\ = |grep -v ^mailq_path\ = |grep -v ^manpage_directory\ = |grep -v ^meta_directory\ = |grep -v ^mydomain\ = |grep -v ^myhostname\ = |grep -v ^mynetworks\ = |grep -v ^mynetworks_style\ = |grep -v ^newaliases_path\ = |grep -v ^queue_directory\ = |grep -v ^readme_directory\ = |grep -v ^sample_directory\ = |grep -v ^sendmail_path\ = |grep -v ^shlib_directory\ = |grep -v ^smtputf8_enable\ = ) > files/main.cf.default
+#      cat /tmp/main.cf.new | ( echo '# DO NOT EDIT THIS FILE. EDIT THE MAIN.CF FILE INSTEAD. THE'; echo '# TEXT HERE JUST SHOWS DEFAULT SETTINGS BUILT INTO POSTFIX.'; echo '#'; grep -v ^alias_maps\ = |grep -v ^alias_database\ = |grep -v ^command_directory\ = |grep -v ^config_directory\ = |grep -v ^daemon_directory\ = |grep -v ^data_directory\ = |grep -v ^default_database_type\ = |grep -v ^html_directory\ = |grep -v ^mail_spool_directory\ = |grep -v ^mailq_path\ = |grep -v ^manpage_directory\ = |grep -v ^meta_directory\ = |grep -v ^mydomain\ = |grep -v ^myhostname\ = |grep -v ^mynetworks\ = |grep -v ^mynetworks_style\ = |grep -v ^newaliases_path\ = |grep -v ^queue_directory\ = |grep -v ^readme_directory\ = |grep -v ^sample_directory\ = |grep -v ^sendmail_path\ = |grep -v ^shlib_directory\ = |grep -v ^smtputf8_enable\ = |grep -v ^virtual_maps\ = |grep -v ^process_id\ = ) > files/main.cf.default
 # 5. Done. Now you can rebuild the package with new main.cf.default.
 #
 
 define Build/Compile
-       # Currently postfix has a bug with Makefiles that CCARGS are not passed to the compiler, so we are copying them to CC
+       # Currently postfix has a bug with Makefiles that CCARGS are not passed to the compiler, so we are copying them to CC as a workaround
        cd $(PKG_BUILD_DIR); $(MAKE) $(TARGET_CONFIGURE_OPTS) CC='$(TARGET_CC) $(CCARGS)'
        cp ./files/main.cf.default $(PKG_BUILD_DIR)/conf/main.cf.default
        echo "default_database_type = $(default_database_type)" >> $(PKG_BUILD_DIR)/conf/main.cf.default
        echo "alias_database = $(default_database_type):$(config_directory)/aliases" >> $(PKG_BUILD_DIR)/conf/main.cf.default
        echo "alias_maps = $(default_database_type):$(config_directory)/aliases" >> $(PKG_BUILD_DIR)/conf/main.cf.default
+       echo "virtual_maps = $(default_database_type):$(config_directory)/virtual" >> $(PKG_BUILD_DIR)/conf/main.cf.default
        echo "sendmail_path = $(sendmail_path)$(ln_suffix)" >> $(PKG_BUILD_DIR)/conf/main.cf.default
        echo "newaliases_path = $(newaliases_path)$(ln_suffix)" >> $(PKG_BUILD_DIR)/conf/main.cf.default
        echo "mailq_path = $(mailq_path)$(ln_suffix)" >> $(PKG_BUILD_DIR)/conf/main.cf.default
@@ -165,7 +186,7 @@ define Build/Compile
        echo "mail_spool_directory = $(mail_spool_directory)" >> $(PKG_BUILD_DIR)/conf/main.cf.default
        echo "shlib_directory = $(shlib_directory)" >> $(PKG_BUILD_DIR)/conf/main.cf.default
        echo "meta_directory = $(meta_directory)" >> $(PKG_BUILD_DIR)/conf/main.cf.default
-       echo "smtputf8_enable = no" >> $(PKG_BUILD_DIR)/conf/main.cf.default
+       echo "smtputf8_enable = $(smtputf8_conf)" >> $(PKG_BUILD_DIR)/conf/main.cf.default
 endef
 
 define Package/postfix/install
@@ -205,11 +226,12 @@ define Package/postfix/postinst
  grep -qc main\.cf "$${IPKG_INSTROOT}"/etc/sysupgrade.conf >/dev/null || echo "$(config_directory)/main.cf" >> "$${IPKG_INSTROOT}"/etc/sysupgrade.conf
  grep -qc master\.cf "$${IPKG_INSTROOT}"/etc/sysupgrade.conf >/dev/null || echo "$(config_directory)/master.cf" >> "$${IPKG_INSTROOT}"/etc/sysupgrade.conf
  grep -qc aliases "$${IPKG_INSTROOT}"/etc/sysupgrade.conf >/dev/null || echo "$(config_directory)/aliases" >> "$${IPKG_INSTROOT}"/etc/sysupgrade.conf
+ grep -qc virtual "$${IPKG_INSTROOT}"/etc/sysupgrade.conf >/dev/null || echo "$(config_directory)/virtual" >> "$${IPKG_INSTROOT}"/etc/sysupgrade.conf
 
  touch "$${IPKG_INSTROOT}$(config_directory)"/opkg_postinst
 
  if [ -z "$${IPKG_INSTROOT}" ]; then
-  ps | grep "postfix/master" | grep -cvq grep >/dev/null && /etc/init.d/postfix reload
+  ps | grep "postfix/master" | grep -cvq grep >/dev/null && /etc/init.d/postfix restart
  fi
 
 endef
@@ -224,6 +246,8 @@ define Package/postfix/postrm
 #!/bin/sh
  rm -f $${IPKG_INSTROOT}$(config_directory)/aliases.cdb $${IPKG_INSTROOT}$(config_directory)/aliases.db $${IPKG_INSTROOT}$(data_directory)/master.lock
 
+ rm -f $${IPKG_INSTROOT}$(config_directory)/virtual.cdb $${IPKG_INSTROOT}$(config_directory)/virtual.db
+
  rm -f "$${IPKG_INSTROOT}$(sendmail_path)" "$${IPKG_INSTROOT}$(newaliases_path)" "$${IPKG_INSTROOT}$(mailq_path)"
 
  if [ -f "$${IPKG_INSTROOT}$(sendmail_path)$(ln_old_suffix)" ]; then
index d9eec99ebf1917760df4695a5e68c19e1266f339..9075498a938f315681d6b430dbb43173ecc32870 100644 (file)
@@ -11,6 +11,7 @@ address_verify_map = btree:$data_directory/verify_cache
 address_verify_negative_cache = yes
 address_verify_negative_expire_time = 3d
 address_verify_negative_refresh_time = 3h
+address_verify_pending_request_limit = 5000
 address_verify_poll_count = ${stress?{1}:{3}}
 address_verify_poll_delay = 3s
 address_verify_positive_expire_time = 31d
@@ -92,6 +93,7 @@ default_recipient_limit = 20000
 default_recipient_refill_delay = 5s
 default_recipient_refill_limit = 100
 default_transport = smtp
+default_transport_rate_delay = 0s
 default_verp_delimiters = +=
 defer_code = 450
 defer_service_name = defer
@@ -108,6 +110,7 @@ disable_mime_input_processing = no
 disable_mime_output_conversion = no
 disable_verp_bounces = no
 disable_vrfy_command = no
+dns_ncache_ttl_fix_enable = no
 dnsblog_reply_delay = 0s
 dnsblog_service_name = dnsblog
 dont_remove = 0
@@ -135,6 +138,7 @@ error_recipient_limit = $default_recipient_limit
 error_recipient_refill_delay = $default_recipient_refill_delay
 error_recipient_refill_limit = $default_recipient_refill_limit
 error_service_name = error
+error_transport_rate_delay = $default_transport_rate_delay
 execution_directory_expansion_filter = 1234567890!@%-_=+:,./abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
 expand_owner_alias = no
 export_environment = TZ MAIL_CONFIG LANG
@@ -205,6 +209,7 @@ lmtp_dns_resolver_options =
 lmtp_dns_support_level =
 lmtp_enforce_tls = no
 lmtp_extra_recipient_limit = $default_extra_recipient_limit
+lmtp_fallback_relay =
 lmtp_generic_maps =
 lmtp_header_checks =
 lmtp_host_lookup = dns
@@ -254,7 +259,7 @@ lmtp_tls_CAfile =
 lmtp_tls_CApath =
 lmtp_tls_block_early_mail_reply = no
 lmtp_tls_cert_file =
-lmtp_tls_ciphers = export
+lmtp_tls_ciphers = medium
 lmtp_tls_dcert_file =
 lmtp_tls_dkey_file = $lmtp_tls_dcert_file
 lmtp_tls_eccert_file =
@@ -268,11 +273,11 @@ lmtp_tls_key_file = $lmtp_tls_cert_file
 lmtp_tls_loglevel = 0
 lmtp_tls_mandatory_ciphers = medium
 lmtp_tls_mandatory_exclude_ciphers =
-lmtp_tls_mandatory_protocols = !SSLv2
+lmtp_tls_mandatory_protocols = !SSLv2, !SSLv3
 lmtp_tls_note_starttls_offer = no
 lmtp_tls_per_site =
 lmtp_tls_policy_maps =
-lmtp_tls_protocols = !SSLv2
+lmtp_tls_protocols = !SSLv2, !SSLv3
 lmtp_tls_scert_verifydepth = 9
 lmtp_tls_secure_cert_match = nexthop
 lmtp_tls_security_level =
@@ -281,6 +286,7 @@ lmtp_tls_session_cache_timeout = 3600s
 lmtp_tls_trust_anchor_file =
 lmtp_tls_verify_cert_match = hostname
 lmtp_tls_wrappermode = no
+lmtp_transport_rate_delay = $default_transport_rate_delay
 lmtp_use_tls = no
 lmtp_xforward_timeout = 300s
 local_command_shell =
@@ -303,11 +309,12 @@ local_recipient_maps = proxy:unix:passwd.byname $alias_maps
 local_recipient_refill_delay = $default_recipient_refill_delay
 local_recipient_refill_limit = $default_recipient_refill_limit
 local_transport = local:$myhostname
+local_transport_rate_delay = $default_transport_rate_delay
 luser_relay =
 mail_name = Postfix
 mail_owner = postfix
-mail_release_date = 20150208
-mail_version = 3.0.0
+mail_release_date = 20160224
+mail_version = 3.1.0
 mailbox_command =
 mailbox_command_maps =
 mailbox_delivery_lock = fcntl, dotlock
@@ -339,6 +346,7 @@ milter_end_of_header_macros = i
 milter_header_checks =
 milter_helo_macros = {tls_version} {cipher} {cipher_bits} {cert_subject} {cert_issuer}
 milter_macro_daemon_name = $myhostname
+milter_macro_defaults =
 milter_macro_v = $mail_name $mail_version
 milter_mail_macros = i {auth_type} {auth_authen} {auth_author} {mail_addr} {mail_host} {mail_mailer}
 milter_protocol = 6
@@ -360,6 +368,7 @@ nested_header_checks = $header_checks
 non_fqdn_reject_code = 504
 non_smtpd_milters =
 notify_classes = resource, software
+openssl_path = openssl
 owner_request_special = yes
 parent_domain_matches_subdomains = debug_peer_list,fast_flush_domains,mynetworks,permit_mx_backup_networks,qmqpd_authorized_clients,relay_domains,smtpd_access_maps
 permit_mx_backup_networks =
@@ -385,11 +394,12 @@ postscreen_disable_vrfy_command = $disable_vrfy_command
 postscreen_discard_ehlo_keyword_address_maps = $smtpd_discard_ehlo_keyword_address_maps
 postscreen_discard_ehlo_keywords = $smtpd_discard_ehlo_keywords
 postscreen_dnsbl_action = ignore
+postscreen_dnsbl_max_ttl = ${postscreen_dnsbl_ttl?{$postscreen_dnsbl_ttl}:{1}}h
+postscreen_dnsbl_min_ttl = 60s
 postscreen_dnsbl_reply_map =
 postscreen_dnsbl_sites =
 postscreen_dnsbl_threshold = 1
 postscreen_dnsbl_timeout = 10s
-postscreen_dnsbl_ttl = 1h
 postscreen_dnsbl_whitelist_threshold = 0
 postscreen_enforce_tls = $smtpd_enforce_tls
 postscreen_expansion_filter = $smtpd_expansion_filter
@@ -415,7 +425,6 @@ postscreen_use_tls = $smtpd_use_tls
 postscreen_watchdog_timeout = 10s
 postscreen_whitelist_interfaces = static:all
 prepend_delivered_header = command, file, forward
-process_id = 25939
 process_id_directory = pid
 process_name = postconf
 propagate_unmatched_extensions = canonical, virtual
@@ -467,6 +476,7 @@ relay_recipient_maps =
 relay_recipient_refill_delay = $default_recipient_refill_delay
 relay_recipient_refill_limit = $default_recipient_refill_limit
 relay_transport = relay
+relay_transport_rate_delay = $default_transport_rate_delay
 relayhost =
 relocated_maps =
 remote_header_rewrite_domain =
@@ -490,6 +500,7 @@ retry_minimum_delivery_slots = $default_minimum_delivery_slots
 retry_recipient_limit = $default_recipient_limit
 retry_recipient_refill_delay = $default_recipient_refill_delay
 retry_recipient_refill_limit = $default_recipient_refill_limit
+retry_transport_rate_delay = $default_transport_rate_delay
 rewrite_service_name = rewrite
 send_cyrus_sasl_authzid = no
 sender_bcc_maps =
@@ -511,7 +522,7 @@ smtp_body_checks =
 smtp_cname_overrides_servername = no
 smtp_connect_timeout = 30s
 smtp_connection_cache_destinations =
-smtp_connection_cache_on_demand = yes
+smtp_connection_cache_on_demand = no
 smtp_connection_cache_time_limit = 2s
 smtp_connection_reuse_count_limit = 0
 smtp_connection_reuse_time_limit = 300s
@@ -586,7 +597,8 @@ smtp_tls_CAfile =
 smtp_tls_CApath =
 smtp_tls_block_early_mail_reply = no
 smtp_tls_cert_file =
-smtp_tls_ciphers = export
+smtp_tls_ciphers = medium
+smtp_tls_dane_insecure_mx_policy = dane
 smtp_tls_dcert_file =
 smtp_tls_dkey_file = $smtp_tls_dcert_file
 smtp_tls_eccert_file =
@@ -600,11 +612,11 @@ smtp_tls_key_file = $smtp_tls_cert_file
 smtp_tls_loglevel = 0
 smtp_tls_mandatory_ciphers = medium
 smtp_tls_mandatory_exclude_ciphers =
-smtp_tls_mandatory_protocols = !SSLv2
+smtp_tls_mandatory_protocols = !SSLv2, !SSLv3
 smtp_tls_note_starttls_offer = no
 smtp_tls_per_site =
 smtp_tls_policy_maps =
-smtp_tls_protocols = !SSLv2
+smtp_tls_protocols = !SSLv2, !SSLv3
 smtp_tls_scert_verifydepth = 9
 smtp_tls_secure_cert_match = nexthop, dot-nexthop
 smtp_tls_security_level =
@@ -613,12 +625,14 @@ smtp_tls_session_cache_timeout = 3600s
 smtp_tls_trust_anchor_file =
 smtp_tls_verify_cert_match = hostname
 smtp_tls_wrappermode = no
+smtp_transport_rate_delay = $default_transport_rate_delay
 smtp_use_tls = no
 smtp_xforward_timeout = 300s
 smtpd_authorized_verp_clients = $authorized_verp_clients
 smtpd_authorized_xclient_hosts =
 smtpd_authorized_xforward_hosts =
 smtpd_banner = $myhostname ESMTP $mail_name
+smtpd_client_auth_rate_limit = 0
 smtpd_client_connection_count_limit = 50
 smtpd_client_connection_rate_limit = 0
 smtpd_client_event_limit_exceptions = ${smtpd_client_connection_limit_exceptions:$mynetworks}
@@ -654,6 +668,7 @@ smtpd_per_record_deadline = ${stress?{yes}:{no}}
 smtpd_policy_service_default_action = 451 4.3.5 Server configuration problem
 smtpd_policy_service_max_idle = 300s
 smtpd_policy_service_max_ttl = 1000s
+smtpd_policy_service_policy_context =
 smtpd_policy_service_request_limit = 0
 smtpd_policy_service_retry_delay = 1s
 smtpd_policy_service_timeout = 100s
@@ -692,7 +707,7 @@ smtpd_tls_ask_ccert = no
 smtpd_tls_auth_only = no
 smtpd_tls_ccert_verifydepth = 9
 smtpd_tls_cert_file =
-smtpd_tls_ciphers = export
+smtpd_tls_ciphers = medium
 smtpd_tls_dcert_file =
 smtpd_tls_dh1024_param_file =
 smtpd_tls_dh512_param_file =
@@ -706,8 +721,8 @@ smtpd_tls_key_file = $smtpd_tls_cert_file
 smtpd_tls_loglevel = 0
 smtpd_tls_mandatory_ciphers = medium
 smtpd_tls_mandatory_exclude_ciphers =
-smtpd_tls_mandatory_protocols = !SSLv2
-smtpd_tls_protocols =
+smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3
+smtpd_tls_protocols = !SSLv2, !SSLv3
 smtpd_tls_received_header = no
 smtpd_tls_req_ccert = no
 smtpd_tls_security_level =
@@ -741,11 +756,11 @@ tls_dane_trust_anchor_digest_enable = yes
 tls_disable_workarounds =
 tls_eecdh_strong_curve = prime256v1
 tls_eecdh_ultra_curve = secp384r1
-tls_export_cipherlist = aNULL:-aNULL:ALL:+RC4:@STRENGTH
-tls_high_cipherlist = aNULL:-aNULL:ALL:!EXPORT:!LOW:!MEDIUM:+RC4:@STRENGTH
+tls_export_cipherlist = aNULL:-aNULL:HIGH:MEDIUM:LOW:EXPORT:+RC4:@STRENGTH
+tls_high_cipherlist = aNULL:-aNULL:HIGH:@STRENGTH
 tls_legacy_public_key_fingerprints = no
-tls_low_cipherlist = aNULL:-aNULL:ALL:!EXPORT:+RC4:@STRENGTH
-tls_medium_cipherlist = aNULL:-aNULL:ALL:!EXPORT:!LOW:+RC4:@STRENGTH
+tls_low_cipherlist = aNULL:-aNULL:HIGH:MEDIUM:LOW:+RC4:@STRENGTH
+tls_medium_cipherlist = aNULL:-aNULL:HIGH:MEDIUM:+RC4:@STRENGTH
 tls_null_cipherlist = eNULL:!aNULL
 tls_preempt_cipherlist = no
 tls_random_bytes = 32
@@ -837,4 +852,5 @@ virtual_recipient_limit = $default_recipient_limit
 virtual_recipient_refill_delay = $default_recipient_refill_delay
 virtual_recipient_refill_limit = $default_recipient_refill_limit
 virtual_transport = virtual
+virtual_transport_rate_delay = $default_transport_rate_delay
 virtual_uid_maps =
index 1f3bc5e8b3da5c1204797d6f5dc9d0368404c437..dbedc407169ecbaa8dd927e71726019caceda257 100644 (file)
@@ -3,6 +3,10 @@
 
 START=50
 STOP=50
+EXTRA_COMMANDS="status abort flush"
+EXTRA_HELP="   status  Display the service status
+       abort   Stop the service abruptly. Running processes are signaled to stop immediately
+       flush   Force delivery: attempt to deliver every message in the deferred mail queue"
 
 upgrade() {
        config_directory="$IPKG_INSTROOT"/etc/postfix
@@ -16,7 +20,7 @@ upgrade() {
 
                echo "myhostname = $(uci get system.@system[0].hostname)" >> "$config_directory"/main.cf.default
                echo "mydomain = $(uci get system.@system[0].hostname|sed -e "s/[^\.]*\.\(.*\)/\1/")" >> "$config_directory"/main.cf.default
-               ifconfig | grep "inet addr" | sed -e "s/.*inet addr:\([0-9.]*\).*Mask:/\1 /" | while read IP NETMASK; do eval "$(ipcalc.sh $IP $NETMASK)"; echo "$NETWORK/$PREFIX"; done | xargs echo "mynetworks =" >> "$config_directory"/main.cf.default
+               (eval $(ipcalc.sh $(uci get network.lan.ipaddr) $(uci get network.lan.netmask)); echo mynetworks = 127.0.0.0/8 $NETWORK/$PREFIX) >> "$config_directory"/main.cf.default
                echo "mynetworks_style = subnet" >> "$config_directory"/main.cf.default
 
                grep -qc "^sendmail_path[^_]" "$config_directory"/main.cf >/dev/null || postconf -e "$(grep "^sendmail_path =" "$config_directory"/main.cf.default)"
@@ -36,7 +40,7 @@ upgrade() {
                grep -qc "^setgid_group[^_]" "$config_directory"/main.cf >/dev/null || postconf -e "$(grep "^setgid_group =" "$config_directory"/main.cf.default)"
                grep -qc "^myhostname[^_]" "$config_directory"/main.cf >/dev/null || postconf -e "$(grep "^myhostname =" "$config_directory"/main.cf.default)"
                grep -qc "^mydomain[^_]" "$config_directory"/main.cf >/dev/null || postconf -e "$(grep "^mydomain =" "$config_directory"/main.cf.default)"
-               grep -qc "^mynetworks[^_]" "$config_directory"/main.cf >/dev/null || postconf -e "$(grep "^mynetworks =" "$config_directory"/main.cf.default)"
+               #grep -qc "^mynetworks[^_]" "$config_directory"/main.cf >/dev/null || postconf -e "$(grep "^mynetworks =" "$config_directory"/main.cf.default)" #Setting mynetworks_style is enough
                grep -qc "^mynetworks_style[^_]" "$config_directory"/main.cf >/dev/null || postconf -e "$(grep "^mynetworks_style =" "$config_directory"/main.cf.default)"
                grep -qc "^shlib_directory[^_]" "$config_directory"/main.cf >/dev/null || postconf -e "$(grep "^shlib_directory =" "$config_directory"/main.cf.default)"
                grep -qc "^meta_directory[^_]" "$config_directory"/main.cf >/dev/null || postconf -e "$(grep "^meta_directory =" "$config_directory"/main.cf.default)"
@@ -46,6 +50,8 @@ upgrade() {
                postfix post-install upgrade-source
                postfix upgrade-configuration
                newaliases
+               postmap "$config_directory"/virtual
+               postfix check
        fi
 }
 
@@ -62,3 +68,15 @@ reload() {
        upgrade
        postfix reload
 }
+
+status() {
+       postfix status
+}
+
+abort() {
+       postfix abort
+}
+
+flush() {
+       postfix flush
+}
index ca43025c14330a34fcf55f18c7723d8e8af2bff1..50581446c88a136d4659f0c90389af4cfb7ea987 100644 (file)
@@ -1,7 +1,7 @@
 diff -rupN postfix-2.8.1/src/smtpd/smtpd_check.c postfix-2.8.1_patched/src/smtpd/smtpd_check.c
 --- postfix-2.8.1/src/smtpd/smtpd_check.c      2011-01-04 22:03:50.000000000 +0300
 +++ postfix-2.8.1_patched/src/smtpd/smtpd_check.c      2011-03-06 19:35:39.000000000 +0300
-@@ -5277,7 +5277,7 @@ char   *smtpd_check_queue(SMTPD_STATE *s
+@@ -5296,7 +5296,7 @@ char   *smtpd_check_queue(SMTPD_STATE *s
       */
  #define BLOCKS(x)     ((x) / fsbuf.block_size)
  
index 6344e93ba3a5644eb855931c5992dfb9753f7ff6..75d6411003881e31a9b30f21a80fbebe760e0e01 100644 (file)
@@ -1,7 +1,7 @@
 diff -Naur postfix-2.10.2/conf/post-install postfix-2.10.2_patched/conf/post-install
 --- postfix-2.10.2/conf/post-install   2013-06-13 18:07:46.000000000 +0400
 +++ postfix-2.10.2_patched/conf/post-install   2013-11-19 21:17:49.572820573 +0400
-@@ -359,10 +359,10 @@
+@@ -361,10 +361,10 @@
  
  # Sanity checks
  
@@ -16,7 +16,7 @@ diff -Naur postfix-2.10.2/conf/post-install postfix-2.10.2_patched/conf/post-ins
  
  case $setgid_group in
   no) echo $0: Error: setgid_group no longer accepts \"no\" values. 1>&2
-@@ -370,7 +370,7 @@
+@@ -372,7 +372,7 @@
  esac
  
  for path in "$daemon_directory" "$command_directory" "$queue_directory" \
@@ -25,7 +25,7 @@ diff -Naur postfix-2.10.2/conf/post-install postfix-2.10.2_patched/conf/post-ins
      "$meta_directory"
  do
     case "$path" in
-@@ -379,7 +379,7 @@
+@@ -381,7 +381,7 @@
     esac
  done
  
@@ -37,7 +37,7 @@ diff -Naur postfix-2.10.2/conf/post-install postfix-2.10.2_patched/conf/post-ins
 diff -Naur postfix-2.10.2/postfix-install postfix-2.10.2_patched/postfix-install
 --- postfix-2.10.2/postfix-install     2012-05-22 23:40:29.000000000 +0400
 +++ postfix-2.10.2_patched/postfix-install     2013-11-19 21:12:20.694160734 +0400
-@@ -543,13 +543,13 @@
+@@ -554,13 +554,13 @@
       exit 1;;
  esac
  
@@ -58,7 +58,7 @@ diff -Naur postfix-2.10.2/postfix-install postfix-2.10.2_patched/postfix-install
  
  for path in "$html_directory" "$readme_directory" "$shlib_directory"
  do
-@@ -562,7 +562,7 @@
+@@ -573,7 +573,7 @@
  done
  
  for path in "$daemon_directory" "$data_directory" "$command_directory" "$queue_directory" \
@@ -67,7 +67,7 @@ diff -Naur postfix-2.10.2/postfix-install postfix-2.10.2_patched/postfix-install
      "$meta_directory"
  do
     case "$path" in
-@@ -758,8 +758,8 @@
+@@ -780,8 +780,8 @@
                compare_or_replace $mode "$owner" "$group" html/$file \
                    $HTML_DIRECTORY/$file || exit 1;;
        '$manpage_directory')
index 8aeaea5e48671175fbf429d1f034ae15e3780220..7abff3b900129b07f840a450476ae350f0983eb0 100644 (file)
@@ -1,7 +1,7 @@
 diff -Naur postfix-2.11.1/src/util/sys_defs.h postfix-2.11.1.patched/src/util/sys_defs.h
 --- postfix-2.11.1/src/util/sys_defs.h 2013-09-30 00:51:55.000000000 +0400
 +++ postfix-2.11.1.patched/src/util/sys_defs.h 2014-09-29 03:11:48.962277971 +0400
-@@ -768,9 +768,8 @@
+@@ -769,9 +769,8 @@
  #define INTERNAL_LOCK MYFLOCK_STYLE_FLOCK
  #define DEF_MAILBOX_LOCK "fcntl, dotlock"     /* RedHat >= 4.x */
  #define HAS_FSYNC
index 0366612bb29095a0245092e7ed8514e24a3f3eae..076d875df0bb584eb189be59e48f8e45fc3fe970 100644 (file)
@@ -1,27 +1,27 @@
---- a/makedefs
-+++ b/makedefs
-@@ -190,9 +190,9 @@ error() {
+--- a/makedefs 2016-01-28 12:30:14.444082390 -0500
++++ b/makedefs 2016-01-28 13:44:02.092006512 -0500
+@@ -198,7 +198,7 @@ error() {
  
  case $# in
   # Officially supported usage.
 - 0) SYSTEM=`(uname -s) 2>/dev/null`
--    RELEASE=`(uname -r) 2>/dev/null`
--    VERSION=`(uname -v) 2>/dev/null`
-+ 0) SYSTEM="Linux"
-+    RELEASE="3.10.18"
-+    VERSION="OpenWRT"
-     case "$VERSION" in
-      dcosx*) SYSTEM=$VERSION;;
-     esac;;
-@@ -522,9 +522,9 @@ EOF
-               esac
-               for name in nsl resolv
-               do
--                  for lib in /usr/lib64 /lib64 /usr/lib /usr/lib/* /lib /lib/*
-+                  for lib in /usr/lib64 /usr/lib64/* /usr/lib /usr/lib/* /lib /lib/*
-                   do
--                      test -e $lib/lib$name.a -o -e $lib/lib$name.so && {
-+                      test -e $STAGING_DIR/$lib/lib$name.a -o -e $STAGING_DIR/$lib/lib$name.so && {
-                           SYSLIBS="$SYSLIBS -l$name"
-                           break
-                       }
++ 0) SYSTEM="OpenWRT"
+     RELEASE=`(uname -r) 2>/dev/null`
+     # No ${x%%y} support in Solaris 11 /bin/sh
+     RELEASE_MAJOR=`expr "$RELEASE" : '\([0-9]*\)'` || exit 1
+@@ -212,6 +212,15 @@ case $# in
+ esac
+ case "$SYSTEM.$RELEASE" in
++   OpenWRT*)    SYSTYPE=LINUX$RELEASE_MAJOR
++              SYSLIBS="$SYSLIBS -ldl"
++              : ${SHLIB_SUFFIX=.so}
++              : ${SHLIB_CFLAGS=-fPIC}
++              : ${SHLIB_LD="${CC-gcc} -shared"' -Wl,-soname,${LIB}'}
++              : ${SHLIB_RPATH='-Wl,--enable-new-dtags -Wl,-rpath,${SHLIB_DIR}'}
++              : ${SHLIB_ENV="LD_LIBRARY_PATH=`pwd`/lib"}
++              : ${PLUGIN_LD="${CC-gcc} -shared"}
++              ;;
+    SCO_SV.3.2)        SYSTYPE=SCO5
+               # Use the native compiler by default
+               : ${CC="/usr/bin/cc -b elf"}
index 6140e23faf62c4bcc8c056221e144360d66b239a..0dce776fae8531172baf9e151fb6ae2f7462ecc9 100644 (file)
@@ -1,7 +1,7 @@
 diff -Naur postfix-2.11.1/postfix-install postfix-2.11.1.patched/postfix-install
 --- postfix-2.11.1/postfix-install     2014-10-05 20:43:58.598876904 +0400
 +++ postfix-2.11.1.patched/postfix-install     2014-10-05 20:47:36.076700082 +0400
-@@ -830,23 +830,23 @@
+@@ -852,23 +852,23 @@
      esac
  done
  
index 97a165c3d43cd76d6bfaa48a4edb8ad05ee328d8..334efdd788f16af76adaf39773496602ef4bcd5f 100644 (file)
@@ -1,12 +1,12 @@
 diff -Naur postfix-2.11.1/conf/post-install postfix-2.11.1.patched/conf/post-install
 --- postfix-2.11.1/conf/post-install   2014-10-05 20:43:58.597876946 +0400
 +++ postfix-2.11.1.patched/conf/post-install   2014-10-11 16:28:01.258874097 +0400
-@@ -319,7 +319,7 @@
+@@ -321,7 +321,7 @@
  case `uname -s` in
  HP-UX*) FMT=cat;;
  SunOS*) FMT=fake_fmt;;
 -     *) FMT=fmt;;
-+     *) FMT="xargs echo";;
++     *) FMT=cat;;
  esac
  
  # If a parameter is not set via the command line or environment,
index d24eeb964ea0f3d00285a31889cb93f5ef5e9ec9..3e4c693c51bed1052ae964782f8b9417000f5585 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006-2015 OpenWrt.org
+# Copyright (C) 2006-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ffmpeg
-PKG_VERSION:=2.7.4
+PKG_VERSION:=2.7.6
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=http://ffmpeg.org/releases/
-PKG_MD5SUM:=dea35a30de724e1851a94680fc209a0d
+PKG_MD5SUM:=578c88242872e58cf0db5f23faa4b2af
 PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
 
 PKG_LICENSE:=LGPL-2.1+ GPL-2+ LGPL-3
index 960d409b21130f5f087dc8e1f83034e0a13adb28..7e78e3dbecb25ee4b25742664d11b9ed9335a346 100644 (file)
@@ -56,13 +56,13 @@ define Build/InstallDev
        $(INSTALL_DATA) \
                $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc \
                $(1)/usr/lib/pkgconfig/
-       $(INSTALL_DIR) $(STAGING_DIR_HOST)/share/vala-0.30/vapi/
+       $(INSTALL_DIR) $(STAGING_DIR)/host/share/vala-0.30/vapi/
        # Note: this are compiled elsewhere because grilo refuses to
        # generate VAPI files unless gobject-introspection exists;
        # OpenWrt does not yet have a gobject-introspection package.
        $(INSTALL_DATA) \
                ./files/*.vapi \
-               $(STAGING_DIR_HOST)/share/vala-0.30/vapi
+               $(STAGING_DIR)/host/share/vala-0.30/vapi
 endef
 
 define Package/grilo/install
index 75fa39804f5d02d4ee174d5ff60288cfe588bef7..144da201fa345d103185d0d25c03e0ad0ea2f8ac 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=minidlna
-PKG_VERSION:=1.1.4
-PKG_RELEASE:=2
+PKG_VERSION:=1.1.5
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/minidlna
-PKG_MD5SUM:=67c9e91285bc3801fd91a5d26ea775d7
+PKG_MD5SUM:=1970e553a1eb8a3e7e302e2ce292cbc4
 PKG_LICENSE:=GPL-2.0 BSD-3-Clause
 PKG_LICENSE_FILES:=COPYING LICENCE.miniupnpd
 
index 60d01699fec8be5edb0f3767dcbd3ca8e2c18963..2333a1134302f523248d9c1086777dead669f3dc 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2015 OpenWrt.org
+# Copyright (C) 2015-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v3.
 #
@@ -7,10 +7,10 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=adblock
-PKG_VERSION:=0.40.2
+PKG_VERSION:=1.0.3
 PKG_RELEASE:=1
 PKG_LICENSE:=GPL-3.0+
-PKG_MAINTAINER:=Dirk Brenken <dirk@brenken.org>
+PKG_MAINTAINER:=Dirk Brenken <openwrt@brenken.org>
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -18,30 +18,14 @@ define Package/$(PKG_NAME)
        SECTION:=net
        CATEGORY:=Network
        TITLE:=Powerful adblock script to block ad/abuse domains
-       DEPENDS:=+curl +wget
+       DEPENDS:=+wget
        PKGARCH:=all
 endef
 
 define Package/$(PKG_NAME)/description
-Powerful adblock script to block ad/abuse domains
-When the dns server on your router receives dns requests, we will sort out queries that ask for the [A]
-resource records of ad servers and return the local ip address of your router and the internal web server
-delivers a transparent pixel instead.
-The script supports the following domain blacklist sites:
-  https://adaway.org
-  https://disconnect.me
-  http://dshield.org
-  https://feodotracker.abuse.ch
-  http://malwaredomains.com
-  https://palevotracker.abuse.ch
-  http://www.shallalist.de
-  http://www.spam404.com
-  http://someonewhocares.org
-  http://winhelp2002.mvps.org
-  http://pgl.yoyo.org/adservers
-  https://zeustracker.abuse.ch
-
-Please see README.md in /etc/adblock for further information.
+Powerful adblock script to block ad/abuse domains.
+Currently the script supports 16 domain blacklist sites plus manual black- and whitelist overrides.
+Please see https://github.com/openwrt/packages/blob/master/net/adblock/files/README.md for further information.
 
 endef
 
@@ -65,16 +49,19 @@ define Package/$(PKG_NAME)/install
        $(INSTALL_BIN) ./files/adblock-update.sh $(1)/usr/bin/
        $(INSTALL_DATA) ./files/adblock-helper.sh $(1)/usr/bin/
 
+       $(INSTALL_DIR) $(1)/etc/hotplug.d/iface
+       $(INSTALL_BIN) ./files/adblock.hotplug $(1)/etc/hotplug.d/iface/99-adblock
+
+       $(INSTALL_DIR) $(1)/etc/init.d
+       $(INSTALL_BIN) ./files/adblock.init $(1)/etc/init.d/adblock
+
        $(INSTALL_DIR) $(1)/etc/config
        $(INSTALL_CONF) ./files/adblock.conf $(1)/etc/config/adblock
 
        $(INSTALL_DIR) $(1)/etc/adblock
+       $(INSTALL_CONF) ./files/adblock.conf $(1)/etc/adblock/adblock.conf.default
        $(INSTALL_CONF) ./files/adblock.blacklist $(1)/etc/adblock/
        $(INSTALL_CONF) ./files/adblock.whitelist $(1)/etc/adblock/
-       $(INSTALL_CONF) ./files/README.md $(1)/etc/adblock/
-
-       $(INSTALL_DIR) $(1)/etc/adblock/samples
-       $(INSTALL_CONF) ./files/samples/*.sample $(1)/etc/adblock/samples/
 
        $(INSTALL_DIR) $(1)/www/adblock
        $(INSTALL_DATA) ./files/www/adblock/* $(1)/www/adblock/
index 301e0f6a4ddfa1ff2f589c4c53ee26757eb7c2d2..3c90e1ca5e53cddb63143d18b4dea4a9e8a6443b 100644 (file)
 # adblock script for openwrt
 
 ## Description
-A lot of people already use adblocker plugins within their desktop browsers,  
-but what if you are using your (smart) phone, tablet, watch or any other wlan gadget...  
-...getting rid of annoying ads, trackers and other abuse sites (like facebook ;-) is simple: block them with your router.  
-
-When the dns server on your router receives dns requests, you’ll sort out queries that ask for the [A] resource records of ad servers and return the local ip address of your router and the internal web server delivers a transparent pixel instead.
+A lot of people already use adblocker plugins within their desktop browsers, but what if you are using your (smart) phone, tablet, watch or any other wlan gadget...getting rid of annoying ads, trackers and other abuse sites (like facebook ;-) is simple: block them with your router. When the dns server on your router receives dns requests, you will sort out queries that ask for the resource records of ad servers and return the local ip address of your router and the internal web server delivers a transparent pixel instead.  
 
 ## Main Features
 * support of the following domain blocklist sources (free for private usage, for commercial use please check their individual licenses):
-    * [adaway.org](https://adaway.org)
-    * => infrequent updates, approx. 400 entries
-    * [disconnect.me](https://disconnect.me)
-    * => numerous updates on the same day, approx. 6.500 entries
-    * [dshield.org](http://dshield.org)
+    * [adaway](https://adaway.org)
+    * => infrequent updates, approx. 400 entries (enabled by default)
+    * [disconnect](https://disconnect.me)
+    * => numerous updates on the same day, approx. 6.500 entries (enabled by default)
+    * [dshield](http://dshield.org)
     * => daily updates, approx. 4.500 entries
-    * [feodotracker.abuse.ch](https://feodotracker.abuse.ch)
+    * [feodotracker](https://feodotracker.abuse.ch)
     * => daily updates, approx. 0-10 entries
-    * [malwaredomains.com](http://malwaredomains.com)
+    * [malwaredomains](http://malwaredomains.com)
     * => daily updates, approx. 16.000 entries
-    * [palevotracker.abuse.ch](https://palevotracker.abuse.ch)
+    * [malwaredomainlist](http://www.malwaredomainlist.com)
+    * => daily updates, approx. 1.500 entries
+    * [openphish](https://openphish.com)
+    * => numerous updates on the same day, approx. 1.800 entries
+    * [palevotracker](https://palevotracker.abuse.ch)
     * => daily updates, approx. 15 entries
-    * [shallalist.de](http://www.shallalist.de) (categories "adv" "costtraps" "spyware" "tracker" "warez" enabled by default)
+    * [ruadlist/easylist](https://code.google.com/p/ruadlist)
+    * => weekly updates, approx. 2.000 entries
+    * [shallalist](http://www.shallalist.de) (categories "adv" "costtraps" "spyware" "tracker" "warez" enabled by default)
     * => daily updates, approx. 32.000 entries (a short description of all shallalist categories can be found [online](http://www.shallalist.de/categories.html))
-    * [spam404.com](http://www.spam404.com)
+    * [spam404](http://www.spam404.com)
     * => infrequent updates, approx. 5.000 entries
-    * [whocares.org](http://someonewhocares.org)
+    * [sysctl/cameleon](http://sysctl.org/cameleon)
+    * => weekly updates, approx. 21.000 entries
+    * [whocares](http://someonewhocares.org)
     * => weekly updates, approx. 12.000 entries
-    * [winhelp2002.mvps.org](http://winhelp2002.mvps.org)
+    * [winhelp](http://winhelp2002.mvps.org)
     * => infrequent updates, approx. 15.000 entries
-    * [yoyo.org](http://pgl.yoyo.org/adservers)
+    * [yoyo](http://pgl.yoyo.org/adservers)
     * => weekly updates, approx. 2.500 entries (enabled by default)
-    * [zeustracker.abuse.ch](https://zeustracker.abuse.ch)
+    * [zeustracker](https://zeustracker.abuse.ch)
     * => daily updates, approx. 440 entries
+* zero-conf like automatic installation & setup, usually no manual changes needed (i.e. ip address, network devices etc.)
+* full IPv4 and IPv6 support
 * each blocklist source will be updated and processed separately
-* timestamp check to download and process only updated blocklists
-* overall duplicate removal in separate blocklists (will be automatically disabled on low memory systems)
-* blocklist parsing by fast & flexible regex rulesets
+* timestamp check to download and process only updated adblock list sources
+* overall duplicate removal in separate adblock lists (will be automatically disabled on low memory systems)
+* adblock source list parsing by fast & flexible regex rulesets
 * additional white- and blacklist support for manual overrides
-* use of dynamic adblock network interface
-* use of dynamic uhttpd instance as pixel server
-* use of quality checks after adblocklist updates to ensure a reliable dnsmasq service
-* optional features (disabled by default):
-    * powerful adblock list backup/restore handling
-    * wan interface check, useful for rc.local based autostart and (mobile) multiwan setups to update only on pre-defined wan interfaces
-    * domain query logging as a background service to easily identify free and already blocked domains (see example output below)
-    * adblock statistics (req. query logging)
-    * ntp time sync
-    * status & error logging to separate file (req. ntp time sync)
+* quality checks during & after update of adblock lists to ensure a reliable dnsmasq service
+* basic adblock statistics via iptables packet counters for each chain
+* status & error logging to stdout and syslog
+* use a dynamic uhttpd instance as an adblock pixel server
+* use dynamic iptables rulesets for adblock related redirects/rejects
+* openwrt init system support (start/stop/restart/reload)
+* hotplug support, the adblock start will be triggered by wan 'ifup' event
+* optional: adblock list backup/restore (disabled by default)
 
 ## Prerequisites
-* [openwrt](https://openwrt.org) (tested only with trunk > r47025), CC should also work
-* additional software packages:
-    * curl
-    * wget (due to an openwrt bug still needed for certain https requests - see ticket #19621)
-    * optional: busybox find with *-mtime* support for logfile housekeeping (enabled by default with r47362, will be disabled if not found)
-* the above dependencies and requirements will be checked during package installation & script startup, please check console output or *logread -e "adblock"* for errors
+* [openwrt](https://openwrt.org), tested with latest stable release (Chaos Calmer 15.05) and with current trunk (Designated Driver > r47025)
+* usual openwrt setup with 'iptables' & 'uhttpd', additional required software packages:
+    * wget
+    * optional: 'kmod-ipt-nat6' for IPv6 support
+* the above dependencies and requirements will be checked during package installation & script runtime
+
+## Designated Driver Installation & Usage
+* install the adblock package (*opkg install adblock*)
+* start the adblock service with */etc/init.d/adblock start* and check *logread -e "adblock"* for adblock related information
+* optional: enable/disable your required adblock list sources in */etc/config/adblock* - 'adaway', 'disconnect' and 'yoyo' are enabled by default
+* optional: maintain the adblock service in luci under 'System => Startup'
 
-## Usage
-* select & install adblock package (*opkg install adblock*)
-* configure */etc/config/adblock* to your needs, see additional comments in *adblock.conf.sample*
-* at least configure the ip address of the local adblock interface/uhttpd instance, it needs to be a different subnet from the normal LAN
-* recommendation: there is no need to enable all blacklist sites at once, for normal use one to three lists should be sufficient
-* recommendation: to handle all blacklists at once add an usb stick or any other storage device to supersize your /tmp directory with a swap partition
-* => see [openwrt wiki](https://wiki.openwrt.org/doc/uci/fstab) for further details
-* add additional domain white- or blacklist entries, one domain per line (wildcards & regex are not allowed!), both lists are located in */etc/adblock*
-* by default openwrts main uhttpd instance is bind to all ports of your router,
-* for a working adblock setup you have to bind uhttpd to the standard LAN port only, please change listen_http accordingly
-* start /usr/bin/adblock-update.sh and check console output or *logread -e "adblock"* for errors
+## LuCI adblock companion package
+For easy management of the various blocklist sources and and the adblock options there is also a nice & efficient LuCI frontend available.  
+Please install the package 'luci-app-adblock' (*opkg install luci-app-adblock*). Then you will find the application in LuCI located under 'Services' menu.  
+Thanks to Hannu Nyman for this great adblock LuCI frontend!  
 
-## Distributed samples
-* all sample configuration files stored in */etc/adblock/samples*
-* to enable/disable additional domain query logging set the dnsmasq option *logqueries* accordingly, see *dhcp.config.sample*
-* to bind uhttpd to standard LAN port only, see *uhttpd.config.sample*
-* for rc.local based autostart and /tmp resizing on the fly see *rc.local.sample*
-* for scheduled call of *adblock-update.sh* see *root.crontab.sample*
-* to redirect/force all dns queries to your router see *firwall.user.sample*
-* for further dnsmasq tweaks see *dnsmasq.conf.sample*
+## Chaos Calmer installation notes
+* currently the adblock package is *not* part of the CC package repository
+* download the latest adblock package *adblock_x.xx.x-1_all.ipk* from a development snapshot [package directory](https://downloads.openwrt.org/snapshots/trunk/ar71xx/nand/packages/packages)
+* due to server hardware troubles the package directory link above may not work, if so please check the [main openwrt download area](https://downloads.openwrt.org) manually
+* manual transfer the package to your router and install the opkg package as usual
 
-## Examples
+## Tweaks
+* there is no need to enable all blacklist sites at once, for normal use one to three adblock list sources should be sufficient
+* if you really need to handle all blacklists at once add an usb stick or any other storage device to enlarge your temp directory with a swap partition => see [openwrt wiki](https://wiki.openwrt.org/doc/uci/fstab) for further details
+* add personal domain white- or blacklist entries as an additional blocklist source, one domain per line (wildcards & regex are not allowed!), by default both empty lists are located in */etc/adblock*
+* enable the backup/restore feature, to restore automatically the latest stable backup of your adblock lists in case of any (partial) processing error (i.e. a single blocklist source server is down). Please use an (external) solid partition and *not* your volatile router temp directory for this
+* for a scheduled call of the adblock service via */etc/init.d/adblock start* add an appropriate crontab entry
+* in case of any script runtime errors, you should enable script debugging: for this please change the value of the main 'DEBUG' switch, you'll find it in the header of */usr/bin/adblock-update.sh*
 
-  adblock log file excerpt:  
-    
-    adblock[11780] info : domain adblock processing started (0.40.1, r47929, 20.12.2015 21:59:56)  
-    adblock[11780] info : backup/restore will be disabled  
-    adblock[11780] info : wan update check will be disabled  
-    adblock[11780] info : get ntp time sync (192.168.254.254), after 0 loops  
-    adblock[11780] info : source doesn't change, no update required (whocares)  
-    adblock[11780] info : adblocklists with overall 11619 domains loaded, backups disabled  
-    adblock[11780] info : adblock statistics for query date 20151220 (total: 2495, blocked: 154)  
-    adblock[11780] info : domain adblock processing finished (0.40.1, r47929, 20.12.2015 22:00:03)  
-    
+## Further adblock config options
+* usually the adblock autodetection works quite well and no manual config overrides are needed, all options apply to 'global' adblock config section:
+    * adb\_enabled => main switch to enable/disable adblock service (default: '1', enabled)
+    * adb\_cfgver => config version string (do not change!) - adblock checks this entry and automatically applies the current config, if none or an older revision was found.
+    * adb\_wanif => name of the logical wan interface (default: 'wan')
+    * adb\_lanif => name of the logical lan interface (default: 'lan')
+    * adb\_port => port of the adblock uhttpd instance (default: '65535')
+    * adb\_nullipv4 => IPv4 blackhole ip address (default: '192.0.2.1')
+    * adb\_nullipv6 => IPv6 blackhole ip address (default: '::ffff:c000:0201')
+    * adb\_forcedns => redirect all DNS queries to local dnsmasq resolver (default: '1', enabled)
 
-  domain blocklist for dnsmasq (disconnect.me after overall duplicate removal):  
-    
-    address=/0000mps.webpreview.dsl.net/192.168.2.1  
-    address=/0001.2waky.com/192.168.2.1  
-    address=/001wen.com/192.168.2.1  
-    address=/002it.com/192.168.2.1  
-    address=/00game.net/192.168.2.1  
-    [...]  
-    address=/zzsgssxh.com/192.168.2.1  
-    address=/zzshw.net/192.168.2.1  
-    address=/zztxdown.com/192.168.2.1  
-    address=/zzxcws.com/192.168.2.1  
-    #------------------------------------------------------------------  
-    # adblock-update.sh (0.40.0) - 3710 ad/abuse domains blocked  
-    # source: https://s3.amazonaws.com/lists.disconnect.me/simple_malvertising.txt  
-    # last modified: Thu, 17 Dec 2015 09:21:17 GMT  
-    
+## Background
+This adblock package is a dns/dnsmasq based adblock solution for openwrt.  
+Queries to ad/abuse domains are never forwarded and always replied with a local IP address which may be IPv4 or IPv6.  
+For that purpose adblock uses an ip address from the private 'TEST-NET-1' subnet (192.0.2.1 / ::ffff:c000:0201) by default.  
+Furthermore all ad/abuse queries will be filtered by ip(6)tables and redirected to internal adblock pixel server (in PREROUTING chain) or rejected (in FORWARD or OUTPUT chain).  
+All iptables and uhttpd related adblock additions are non-destructive, no hard-coded changes in 'firewall.user', 'uhttpd' config or any other openwrt related config files. There is *no* adblock background daemon running, the (scheduled) start of the adblock service keeps only the adblock lists up-to-date.  
 
-  domain query log excerpt:  
-    
-    query[A] www.seenby.de from fe80::6257:18ff:fe6b:4667  
-    query[A] tarifrechner.heise.de from 192.168.1.131  
-    query[A] www.mittelstandswiki.de from fe80::6257:18ff:fe6b:4667  
-    query[A] ad.doubleclick.net from 192.168.1.131  
-    ad.doubleclick.net is 192.168.2.1  
-    
+## Support
+Please join the adblock discussion in this [openwrt forum thread](https://forum.openwrt.org/viewtopic.php?id=59803) or contact me by mail <openwrt@brenken.org>  
 
-The first three queries are OK (not blocked), the last one has been blocked and answered by local dnsmasq instance.
+## Removal
+* stop all adblock related services with */etc/init.d/adblock stop*
+* optional: remove the adblock package (*opkg remove adblock*)
 
 Have fun!  
 Dirk  
index 554c962e38b83eb68941ca10759873455f472528..246f98b9609ae02a5837b28fcd5bba79612c8f6e 100644 (file)
@@ -1,44 +1,73 @@
 #!/bin/sh
-##############################################
-# function library used by adblock-update.sh #
-# written by Dirk Brenken (dirk@brenken.org) #
-##############################################
+# function library used by adblock-update.sh
+# written by Dirk Brenken (openwrt@brenken.org)
 
 #####################################
 # f_envload: load adblock environment
 #
 f_envload()
 {
+    local cfg_version
+
+    # get version string from default adblock configuration file
+    #
+    cfg_version="$(/sbin/uci -q get adblock.global.adb_cfgver)"
+    cfg_enabled="$(/sbin/uci -q get adblock.global.adb_enabled)"
+    rc=$?
+    if [ $((rc)) -ne 0 ] || [ "${cfg_version}" != "${adb_scriptver%.*}" ]
+    then
+        cp -pf "/etc/adblock/adblock.conf.default" "/etc/config/adblock"
+        rc=$?
+        if [ $((rc)) -eq 0 ]
+        then
+            f_log "new default adblock configuration applied, please check your settings in '/etc/config/adblock'"
+        else
+            f_log "original adblock configuration not found, please (re-)install the adblock package via 'opkg install adblock --force-maintainer'" "${rc}"
+            f_exit
+        fi
+    elif [ $((rc)) -eq 0 ] && [ $((cfg_enabled)) -ne 1 ]
+    then
+        rc=-1
+        f_log "adblock is currently disabled, please run 'uci set adblock.global.adb_enabled=1' and 'uci commit adblock' to enable this service"
+        f_exit
+    fi
+
     # source in openwrt function library
     #
     if [ -r "/lib/functions.sh" ]
     then
-        . "/lib/functions.sh" 2>/dev/null
+        . "/lib/functions.sh"
     else
-        rc=500
+        rc=110
         f_log "openwrt function library not found" "${rc}"
-        f_deltemp
+        f_exit
     fi
 
-    # source in openwrt json helpers library
+    # source in openwrt network library
     #
-    if [ -r "/usr/share/libubox/jshn.sh" ]
+    if [ -r "/lib/functions/network.sh" ]
     then
-        . "/usr/share/libubox/jshn.sh" 2>/dev/null
+        . "/lib/functions/network.sh"
     else
-        rc=505
-        f_log "openwrt json helpers library not found" "${rc}"
-        f_deltemp
+        rc=115
+        f_log "openwrt network library not found" "${rc}"
+        f_exit
     fi
 
-    # get list with all installed openwrt packages
+    # check opkg availability and get list with all installed openwrt packages
     #
-    pkg_list="$(opkg list-installed 2>/dev/null)"
+    if [ -r "/var/lock/opkg.lock" ]
+    then
+        rc=-1
+        f_log "adblock installation finished, 'opkg' currently locked by package installer"
+        f_exit
+    fi
+    pkg_list="$(opkg list-installed)"
     if [ -z "${pkg_list}" ]
     then
-        rc=510
+        rc=120
         f_log "empty openwrt package list" "${rc}"
-        f_deltemp
+        f_exit
     fi
 }
 
@@ -47,34 +76,19 @@ f_envload()
 #
 f_envparse()
 {
-    # set the C locale, characters are single bytes, the charset is ASCII
-    # speeds up sort, grep etc.
-    #
-    LC_ALL=C
-
-    # set initial defaults (may be overwritten by setting appropriate adblock config options)
-    #
-    adb_if="adblock"
-    adb_minspace="20000"
-    adb_maxtime="60"
-    adb_maxloop="5"
-    adb_unique="1"
+    # set initial defaults,
+    # may be overwritten by setting appropriate adblock config options in global section of /etc/config/adblock
+    #
+    adb_wanif="wan"
+    adb_lanif="lan"
+    adb_port="65535"
+    adb_nullipv4="192.0.2.1"
+    adb_nullipv6="::ffff:c000:0201"
     adb_blacklist="/etc/adblock/adblock.blacklist"
     adb_whitelist="/etc/adblock/adblock.whitelist"
+    adb_forcedns=1
 
-    # adblock device name auto detection
-    # derived from first entry in openwrt lan ifname config
-    #
-    adb_dev="$(uci get network.lan.ifname 2>/dev/null)"
-    adb_dev="${adb_dev/ *}"
-
-    # adblock ntp server name auto detection
-    # derived from ntp list found in openwrt ntp server config
-    #
-    adb_ntpsrv="$(uci get system.ntp.server 2>/dev/null)"
-
-    # function to read/set global options by callback,
-    # prepare list items and build option list for all others
+    # function to read global options by callback
     #
     config_cb()
     {
@@ -89,65 +103,44 @@ f_envparse()
                 eval "${option}=\"${value}\""
             }
         else
-            option_cb()
-            {
-                local option="${1}"
-                local value="${2}"
-                local opt_out="$(printf "${option}" | sed -n '/.*_ITEM[0-9]$/p; /.*_LENGTH$/p; /enabled/p' 2>/dev/null)"
-                if [ -z "${opt_out}" ]
-                then
-                    all_options="${all_options} ${option}"
-                fi
-            }
-            list_cb()
-            {
-                local list="${1}"
-                local value="${2}"
-                if [ "${list}" = "adb_wanlist" ]
-                then
-                    adb_wandev="${adb_wandev} ${value}"
-                elif [ "${list}" = "adb_ntplist" ]
-                then
-                    adb_ntpsrv="${adb_ntpsrv} ${value}"
-                elif [ "${list}" = "adb_catlist" ]
-                then
-                    adb_cat_shalla="${adb_cat_shalla} ${value}"
-                fi
-            }
+            reset_cb
         fi
     }
 
-    # function to iterate through option list, read/set all options in "enabled" sections
+    # function to iterate through config list, read only options in "enabled" sections
     #
+    adb_cfglist="adb_backupdir adb_src"
+    unset adb_sources
     parse_config()
     {
         local config="${1}"
         config_get switch "${config}" "enabled"
         if [ "${switch}" = "1" ]
         then
-            for option in ${all_options}
+            for option in ${adb_cfglist}
             do
                 config_get value "${config}" "${option}"
                 if [ -n "${value}" ]
                 then
-                    local opt_src="$(printf "${option}" | sed -n '/^adb_src_[a-z0-9]*$/p' 2>/dev/null)"
-                    if [ -n "${opt_src}" ]
+                    if [ "${option}" = "adb_src" ]
                     then
-                        adb_sources="${adb_sources} ${value}"
+                        if [ "${config}" = "shalla" ]
+                        then
+                            categories()
+                            {
+                                local cat="${1}"
+                                adb_cat_shalla="${adb_cat_shalla} ${cat}"
+                            }
+                            eval "adb_arc_shalla=\"${value}\""
+                            config_list_foreach "shalla" "adb_catlist" "categories"
+                        else
+                            adb_sources="${adb_sources} ${value}"
+                        fi
                     else
                         eval "${option}=\"${value}\""
                     fi
                 fi
             done
-        elif [ "${config}" = "wancheck" ]
-        then
-           unset adb_wandev
-        elif [ "${config}" = "ntpcheck" ]
-        then
-           unset adb_ntpsrv
-        elif [ "${config}" = "shalla" ]
-        then
-           unset adb_cat_shalla
         fi
     }
 
@@ -157,126 +150,126 @@ f_envparse()
     config_foreach parse_config service
     config_foreach parse_config source
 
-    # set temp variables and defaults 
+    # set more script defaults (can't be overwritten by adblock config options)
     #
-    adb_tmpfile="$(mktemp -tu 2>/dev/null)"
-    adb_tmpdir="$(mktemp -p /tmp -d 2>/dev/null)"
-    unset adb_srcfind
-    unset adb_revsrcfind
+    adb_count=0
+    adb_minspace=12000
+    adb_tmpfile="$(mktemp -tu)"
+    adb_tmpdir="$(mktemp -p /tmp -d)"
+    adb_dnsdir="/tmp/dnsmasq.d"
+    adb_dnsprefix="adb_list"
+    adb_prechain_ipv4="prerouting_rule"
+    adb_fwdchain_ipv4="forwarding_rule"
+    adb_outchain_ipv4="output_rule"
+    adb_prechain_ipv6="PREROUTING"
+    adb_fwdchain_ipv6="forwarding_rule"
+    adb_outchain_ipv6="output_rule"
+    adb_fetch="/usr/bin/wget"
+    unset adb_srclist adb_revsrclist adb_errsrclist
 
     # set adblock source ruleset definitions
     #
-    rset_start="sed -r 's/[[:space:]]|[\[!#/:;_].*|[0-9\.]*localhost.*//g; s/[\^#/:;_\.\t ]*$//g'"
-    rset_end="sed '/^[#/:;_\s]*$/d'"
-    rset_adaway="${rset_start} | sed 's/\([0-9]\{1,3\}\.\)\{3\}[0-1]\{1,1\}//g' | ${rset_end}"
-    rset_blacklist="${rset_start} | ${rset_end}"
-    rset_disconnect="${rset_start} | ${rset_end}"
-    rset_dshield="${rset_start} | ${rset_end}"
-    rset_feodo="${rset_start} | ${rset_end}"
-    rset_malware="${rset_start} | ${rset_end}"
-    rset_palevo="${rset_start} | ${rset_end}"
-    rset_shalla="${rset_start} | sed 's/\([0-9]\{1,3\}\.\)\{3\}[0-9]\{1,3\}$//g' | ${rset_end}"
-    rset_spam404="${rset_start} | sed 's/^\|\|//g' | ${rset_end}"
-    rset_whocares="${rset_start} | sed 's/\([0-9]\{1,3\}\.\)\{3\}[0-1]\{1,1\}//g' | ${rset_end}"
-    rset_winhelp="${rset_start} | sed 's/\([0-9]\{1,3\}\.\)\{3\}[0-1]\{1,1\}//g' | ${rset_end}"
-    rset_yoyo="${rset_start} | sed 's/,/\n/g' | ${rset_end}"
-    rset_zeus="${rset_start} | ${rset_end}"
+    rset_core="([A-Za-z0-9_-]+\.){1,}[A-Za-z]+"
+    rset_adaway="awk '\$0 ~/^127\.0\.0\.1[ \t]+${rset_core}/{print tolower(\$2)}'"
+    rset_blacklist="awk '\$1 ~/^${rset_core}/{print tolower(\$1)}'"
+    rset_disconnect="awk '\$1 ~/^${rset_core}/{print tolower(\$1)}'"
+    rset_dshield="awk '\$1 ~/^${rset_core}/{print tolower(\$1)}'"
+    rset_feodo="awk '\$1 ~/^${rset_core}/{print tolower(\$1)}'"
+    rset_malware="awk '\$1 ~/^${rset_core}/{print tolower(\$1)}'"
+    rset_malwarelist="awk '\$0 ~/^127\.0\.0\.1[ \t]+${rset_core}/{print tolower(\$2)}'"
+    rset_openphish="awk -F '/' '\$3 ~/^${rset_core}/{print tolower(\$3)}'"
+    rset_palevo="awk '\$1 ~/^${rset_core}/{print tolower(\$1)}'"
+    rset_ruadlist="awk -F '[|^]' '\$0 ~/^\|\|${rset_core}\^$/{print tolower(\$3)}'"
+    rset_shalla="awk -F '/' '\$1 ~/^${rset_core}/{print tolower(\$1)}'"
+    rset_spam404="awk '\$1 ~/^${rset_core}/{print tolower(\$1)}'"
+    rset_sysctl="awk '\$0 ~/^127\.0\.0\.1[ \t]+${rset_core}/{print tolower(\$2)}'"
+    rset_whocares="awk '\$0 ~/^127\.0\.0\.1[ \t]+${rset_core}/{print tolower(\$2)}'"
+    rset_winhelp="awk '\$0 ~/^0\.0\.0\.0[ \t]+${rset_core}/{print tolower(\$2)}'"
+    rset_yoyo="awk '\$1 ~/^${rset_core}/{print tolower(\$1)}'"
+    rset_zeus="awk '\$1 ~/^${rset_core}/{print tolower(\$1)}'"
+
+    # get logical wan update interfaces (with default route) and their device names
+    #
+    network_find_wan adb_wanif4
+    network_find_wan6 adb_wanif6
+    if [ -z "${adb_wanif4}" ] && [ -z "${adb_wanif6}" ]
+    then
+        rc=125
+        f_log "no valid IPv4/IPv6 wan update interface found" "${rc}"
+        f_exit
+    elif [ "${adb_wanif4}" = "${adb_lanif}" ] || [ "${adb_wanif6}" = "${adb_lanif}" ]
+    then
+        rc=125
+        f_log "LAN only (${adb_lanif}) network, no valid IPv4/IPv6 wan update interface found" "${rc}"
+        f_exit
+    else
+        network_get_device adb_wandev4 "${adb_wanif4}"
+        network_get_device adb_wandev6 "${adb_wanif6}"
+    fi
 
-    # set dnsmasq defaults
+    # get lan ip addresses
     #
-    adb_dnsdir="/tmp/dnsmasq.d"
-    adb_dnsformat="sed 's/^/address=\//;s/$/\/'${adb_ip}'/'"
-    adb_dnsprefix="adb_list"
+    network_get_ipaddr adb_ipv4 "${adb_lanif}"
+    network_get_ipaddr6 adb_ipv6 "${adb_lanif}"
+    if [ -z "${adb_ipv4}" ] && [ -z "${adb_ipv6}" ]
+    then
+        rc=130
+        f_log "no valid IPv4/IPv6 configuration for given logical LAN interface found (${adb_lanif}), please set 'adb_lanif' manually" "${rc}"
+        f_exit
+    fi
 }
 
-#############################################
-# f_envcheck: check environment prerequisites
+#################################################
+# f_envcheck: check/set environment prerequisites
 #
 f_envcheck()
 {
-    # check adblock config file
-    #
-    check_config="$(grep -F "ruleset=rset_default" /etc/config/adblock 2>/dev/null)"
-    if [ -n "${check_config}" ]
-    then
-        rc=515
-        grep -Fv "#" "/etc/adblock/samples/adblock.conf.sample" > /etc/config/adblock
-        f_log "new default adblock config applied, please check your configuration settings in /etc/config/adblock" "${rc}"
-        f_deltemp
-    fi
-
-    # check required config options
-    #
-    adb_varlist="adb_ip adb_dev adb_domain"
-    for var in ${adb_varlist}
-    do
-        if [ -z "$(eval printf \"\$"${var}"\")" ]
-        then
-            rc=520
-            f_log "missing adblock config option (${var})" "${rc}"
-            f_deltemp
-        fi
-    done
+    local check
 
-    # check main uhttpd configuration
+    # check general package dependencies
     #
-    check_uhttpd="$(uci get uhttpd.main.listen_http 2>/dev/null | grep -Fo "0.0.0.0" 2>/dev/null)"
-    if [ -n "${check_uhttpd}" ]
-    then
-        rc=525
-        lan_ip="$(uci get network.lan.ipaddr 2>/dev/null)"
-        f_log "please bind main uhttpd instance to LAN only (lan ip: ${lan_ip})" "${rc}"
-        f_deltemp
-    fi
+    f_depend "uhttpd"
+    f_depend "wget"
+    f_depend "iptables"
+    f_depend "kmod-ipt-nat"
 
-    # check adblock network device configuration
+    # check ipv6 related package dependencies
     #
-    if [ ! -d "/sys/class/net/${adb_dev}" ]
+    if [ -n "${adb_wanif6}" ]
     then
-        rc=530
-        f_log "invalid adblock network device input (${adb_dev})" "${rc}"
-        f_deltemp
-    fi
-
-    # check adblock network interface configuration
-    #
-    check_if="$(printf "${adb_if}" | sed -n '/[^._0-9A-Za-z]/p' 2>/dev/null)"
-    banned_if="$(printf "${adb_if}" | sed -n '/.*lan.*\|.*wan.*\|.*switch.*\|main\|globals\|loopback\|px5g/p' 2>/dev/null)"
-    if [ -n "${check_if}" ] || [ -n "${banned_if}" ]
-    then
-        rc=535
-        f_log "invalid adblock network interface input (${adb_if})" "${rc}"
-        f_deltemp
+        check="$(printf "${pkg_list}" | grep "^ip6tables -")"
+        if [ -z "${check}" ]
+        then
+            f_log "package 'ip6tables' not found, IPv6 support will be disabled"
+            unset adb_wanif6
+        else
+            check="$(printf "${pkg_list}" | grep "^kmod-ipt-nat6 -")"
+            if [ -z "${check}" ]
+            then
+                f_log "package 'kmod-ipt-nat6' not found, IPv6 support will be disabled"
+                unset adb_wanif6
+            fi
+        fi
     fi
 
-    # check adblock ip address configuration
+    # check ca-certificates package and set wget parms accordingly
     #
-    check_ip="$(printf "${adb_ip}" | sed -n '/\([0-9]\{1,3\}\.\)\{3\}[0-9]\{1,3\}/p' 2>/dev/null)"
-    lan_ip="$(uci get network.lan.ipaddr 2>/dev/null)"
-    if [ -z "${check_ip}" ]
-    then
-        rc=540
-        f_log "invalid adblock ip address input (${adb_ip})" "${rc}"
-        f_deltemp
-    elif [ "${adb_ip}" = "${lan_ip}" ]
+    wget_parm="--no-config --quiet --tries=1 --no-cache --no-cookies --max-redirect=0 --dns-timeout=5 --connect-timeout=5 --read-timeout=5"
+    check="$(printf "${pkg_list}" | grep "^ca-certificates -")"
+    if [ -z "${check}" ]
     then
-        rc=545
-        f_log "adblock ip needs to be a different subnet from the normal LAN (adblock ip: ${adb_ip})" "${rc}"
-        f_deltemp
+        wget_parm="${wget_parm} --no-check-certificate"
     fi
 
     # check adblock blacklist/whitelist configuration
     #
     if [ ! -r "${adb_blacklist}" ]
     then
-        rc=550
-        f_log "adblock blacklist not found" "${rc}"
-        f_deltemp
-    elif [ ! -r "${adb_whitelist}" ]
+        f_log "adblock blacklist not found, source will be disabled"
+    fi
+    if [ ! -r "${adb_whitelist}" ]
     then
-        rc=555
-        f_log "adblock whitelist not found" "${rc}"
-        f_deltemp
+        f_log "adblock whitelist not found, source will be disabled"
     fi
 
     # check adblock temp directory
@@ -284,56 +277,34 @@ f_envcheck()
     if [ -n "${adb_tmpdir}" ] && [ -d "${adb_tmpdir}" ]
     then
         f_space "${adb_tmpdir}"
-        tmp_ok="true"
+        if [ "${space_ok}" = "false" ]
+        then
+            if [ $((av_space)) -le 2000 ]
+            then
+                rc=135
+                f_log "not enough free space in '${adb_tmpdir}' (avail. ${av_space} kb)" "${rc}"
+                f_exit
+            else
+                f_log "not enough free space to handle all adblock list sources at once in '${adb_tmpdir}' (avail. ${av_space} kb)"
+            fi
+        fi
     else
-        rc=560
-        tmp_ok="false"
+        rc=135
         f_log "temp directory not found" "${rc}"
-        f_deltemp
-    fi
-
-    # check curl package dependency
-    #
-    check="$(printf "${pkg_list}" | grep "^curl -" 2>/dev/null)"
-    if [ -z "${check}" ]
-    then
-        rc=565
-        f_log "curl package not found" "${rc}"
-        f_deltemp
-    fi
-
-    # check wget package dependency
-    #
-    check="$(printf "${pkg_list}" | grep "^wget -" 2>/dev/null)"
-    if [ -z "${check}" ]
-    then
-        rc=570
-        f_log "wget package not found" "${rc}"
-        f_deltemp
+        f_exit
     fi
 
-    # check ca-certificates package and set wget/curl options accordingly
+    # memory check
     #
-    check="$(printf "${pkg_list}" | grep "^ca-certificates -" 2>/dev/null)"
-    if [ -z "${check}" ]
+    mem_total="$(awk '$1 ~ /^MemTotal/ {printf $2}' "/proc/meminfo")"
+    mem_free="$(awk '$1 ~ /^MemFree/ {printf $2}' "/proc/meminfo")"
+    mem_swap="$(awk '$1 ~ /^SwapTotal/ {printf $2}' "/proc/meminfo")"
+    if [ $((mem_total)) -le 64000 ] && [ $((mem_swap)) -eq 0 ]
     then
-        curl_parm="-q --insecure --silent"
-        wget_parm="--no-config --no-hsts --no-check-certificate --quiet"
+        mem_ok="false"
+        f_log "not enough free memory, overall sort processing will be disabled (total: ${mem_total}, free: ${mem_free}, swap: ${mem_swap})"
     else
-        curl_parm="-q --silent"
-        wget_parm="--no-config --no-hsts --quiet"
-    fi
-
-    # check total and swap memory
-    #
-    mem_total="$(grep -F "MemTotal" "/proc/meminfo" 2>/dev/null | grep -o "[0-9]*" 2>/dev/null)"
-    mem_free="$(grep -F "MemFree" "/proc/meminfo" 2>/dev/null | grep -o "[0-9]*" 2>/dev/null)"
-    swap_total="$(grep -F "SwapTotal" "/proc/meminfo" 2>/dev/null | grep -o "[0-9]*" 2>/dev/null)"
-    if [ $((mem_total)) -le 64000 ] && [ $((swap_total)) -eq 0 ]
-    then
-        adb_unique=0
-        f_log "overall sort/unique processing will be disabled,"
-        f_log "please consider adding an external swap device to supersize your /tmp directory (total: ${mem_total}, free: ${mem_free}, swap: ${mem_swap})"
+        mem_ok="true"
     fi
 
     # check backup configuration
@@ -341,140 +312,188 @@ f_envcheck()
     if [ -n "${adb_backupdir}" ] && [ -d "${adb_backupdir}" ]
     then
         f_space "${adb_backupdir}"
-        backup_ok="true"
+        if [ "${space_ok}" = "false" ]
+        then
+            f_log "not enough free space in '${adb_backupdir}'(avail. ${av_space} kb), backup/restore will be disabled"
+            backup_ok="false"
+        else
+            f_log "backup/restore will be enabled"
+            backup_ok="true"
+        fi
     else
         backup_ok="false"
         f_log "backup/restore will be disabled"
     fi
 
-    # check dns query log configuration
+    # check ipv4/iptables configuration
     #
-    adb_querydir="${adb_queryfile%/*}"
-    adb_querypid="/var/run/adb_query.pid"
-    if [ -n "${adb_querydir}" ] && [ -d "${adb_querydir}" ]
+    if [ -n "${adb_wanif4}" ] && [ -n "${adb_wandev4}" ]
     then
-        # check find capabilities
-        #
-        check="$(find --help 2>&1 | grep -F "mtime" 2>/dev/null)"
-        if [ -z "${check}" ]
+        f_firewall "IPv4" "nat" "A" "${adb_prechain_ipv4}" "adb-prerouting" "! -i ${adb_wandev4} -p tcp -d ${adb_nullipv4} -m multiport --dports 80,443 -j REDIRECT --to-ports ${adb_port}"
+        f_firewall "IPv4" "filter" "A" "${adb_fwdchain_ipv4}" "adb-forward" "! -i ${adb_wandev4} -d ${adb_nullipv4} -j REJECT --reject-with icmp-host-unreachable"
+        f_firewall "IPv4" "filter" "A" "${adb_outchain_ipv4}" "adb-output" "! -i ${adb_wandev4} -d ${adb_nullipv4} -j REJECT --reject-with icmp-host-unreachable"
+        if [ $((adb_forcedns)) -eq 1 ]
         then
-            query_ok="false"
-            f_log "busybox without 'find/mtime' support (min. r47362), dns query logging will be disabled"
-        else
-            f_space "${adb_querydir}"
-            query_ok="true"
-            query_name="${adb_queryfile##*/}"
-            query_ip="${adb_ip//./\\.}"
+            f_firewall "IPv4" "nat" "A" "${adb_prechain_ipv4}" "adb-dns" "! -i ${adb_wandev4} -p udp --dport 53 -j REDIRECT"
+            f_firewall "IPv4" "nat" "A" "${adb_prechain_ipv4}" "adb-dns" "! -i ${adb_wandev4} -p tcp --dport 53 -j REDIRECT"
         fi
-    else
-        query_ok="false"
-        f_log "dns query logging will be disabled"
-        if [ -s "${adb_querypid}" ]
+        if [ "${fw_done}" = "true" ]
         then
-            kill -9 "$(cat "${adb_querypid}")" >/dev/null 2>&1
-            f_log "remove old dns query log background process (pid: $(cat "${adb_querypid}" 2>/dev/null))"
-            > "${adb_querypid}"
+            f_log "created volatile IPv4 firewall ruleset"
+            fw_done="false"
         fi
     fi
 
-    # check debug log configuration
+    # check ipv6/ip6tables configuration
     #
-    adb_logdir="${adb_logfile%/*}"
-    if [ -n "${adb_logdir}" ] && [ -d "${adb_logdir}" ]
+    if [ -n "${adb_wanif6}" ] && [ -n "${adb_wandev6}" ]
     then
-        f_space "${adb_logdir}"
-        log_ok="true"
-    else
-        log_ok="false"
-        f_log "debug logging will be disabled"
+        f_firewall "IPv6" "nat" "A" "${adb_prechain_ipv6}" "adb-prerouting" "! -i ${adb_wandev6} -p tcp -d ${adb_nullipv6} -m multiport --dports 80,443 -j REDIRECT --to-ports ${adb_port}"
+        f_firewall "IPv6" "filter" "A" "${adb_fwdchain_ipv6}" "adb-forward" "! -i ${adb_wandev6} -d ${adb_nullipv6} -j REJECT --reject-with icmp6-addr-unreachable"
+        f_firewall "IPv6" "filter" "A" "${adb_outchain_ipv6}" "adb-output" "! -i ${adb_wandev6} -d ${adb_nullipv6} -j REJECT --reject-with icmp6-addr-unreachable"
+        if [ $((adb_forcedns)) -eq 1 ]
+        then
+            f_firewall "IPv6" "nat" "A" "${adb_prechain_ipv6}" "adb-dns" "! -i ${adb_wandev6} -p udp --dport 53 -j REDIRECT"
+            f_firewall "IPv6" "nat" "A" "${adb_prechain_ipv6}" "adb-dns" "! -i ${adb_wandev6} -p tcp --dport 53 -j REDIRECT"
+        fi
+        if [ "${fw_done}" = "true" ]
+        then
+            f_log "created volatile IPv6 firewall ruleset"
+            fw_done="false"
+        fi
     fi
 
-    # check wan update configuration
+    # check volatile adblock uhttpd instance configuration
     #
-    if [ -n "${adb_wandev}" ]
+    rc="$(ps | grep -q "[u]httpd.*\-h /www/adblock"; printf ${?})"
+    if [ $((rc)) -ne 0 ]
     then
-        f_wancheck "${adb_maxloop}"
-    else
-        wan_ok="false"
-        f_log "wan update check will be disabled"
+        if [ -n "${adb_wanif4}" ] && [ -n "${adb_wanif6}" ]
+        then
+            uhttpd -h "/www/adblock" -k 5 -N 200 -t 0 -T 1 -D -S -E "/index.html" -p "${adb_ipv4}:${adb_port}" -p "[${adb_ipv6}]:${adb_port}"
+            rc=${?}
+        elif [ -n "${adb_wanif4}" ]
+        then
+            uhttpd -h "/www/adblock" -k 5 -N 200 -t 0 -T 1 -D -S -E "/index.html" -p "${adb_ipv4}:${adb_port}"
+            rc=${?}
+        elif [ -n "${adb_wanif6}" ]
+        then
+            uhttpd -h "/www/adblock" -k 5 -N 200 -t 0 -T 1 -D -S -E "/index.html" -p "[${adb_ipv6}]:${adb_port}"
+            rc=${?}
+        fi
+        if [ $((rc)) -eq 0 ]
+        then
+            f_log "created volatile uhttpd instance"
+        else
+            f_log "failed to initialize volatile uhttpd instance" "${rc}"
+            f_restore
+        fi
     fi
 
-    # check ntp sync configuration
+    # set dnsmasq defaults
     #
-    if [ -n "${adb_ntpsrv}" ]
+    if [ -n "${adb_wanif4}" ] && [ -n "${adb_wanif6}" ]
     then
-        f_ntpcheck "${adb_maxloop}"
-    else
-        ntp_ok="false"
-        f_log "ntp time sync will be disabled"
+        adb_dnsformat="awk -v ipv4="${adb_nullipv4}" -v ipv6="${adb_nullipv6}" '{print \"address=/\"\$0\"/\"ipv4\"\n\"\"address=/\"\$0\"/\"ipv6}'"
+    elif [ -n "${adb_wanif4}" ]
+    then
+        adb_dnsformat="awk -v ipv4="${adb_nullipv4}" '{print \"address=/\"\$0\"/\"ipv4}'"
+    elif [ -n "${adb_wanif6}" ]
+    then
+        adb_dnsformat="awk -v ipv6="${adb_nullipv6}" '{print \"address=/\"\$0\"/\"ipv6}'"
     fi
 
-    # check dynamic/volatile adblock network interface configuration
+    # remove no longer used opkg package list
     #
-    rc="$(ifstatus "${adb_if}" >/dev/null 2>&1; printf ${?})"
-    if [ $((rc)) -ne 0 ]
+    unset pkg_list
+}
+
+######################################
+# f_depend: check package dependencies
+#
+f_depend()
+{
+    local check
+    local package="${1}"
+
+    check="$(printf "${pkg_list}" | grep "^${package} -")"
+    if [ -z "${check}" ]
     then
-        json_init
-        json_add_string name "${adb_if}"
-        json_add_string ifname "${adb_dev}"
-        json_add_string proto "static"
-        json_add_array ipaddr
-        json_add_string "" "${adb_ip}"
-        json_close_array
-        json_close_object
-        ubus call network add_dynamic "$(json_dump)"
-        rc=${?}
-        if [ $((rc)) -eq 0 ]
-        then
-            f_log "created new dynamic/volatile network interface (${adb_if}, ${adb_ip})"
-        else
-            f_log "failed to initialize new dynamic/volatile network interface (${adb_if}, ${adb_ip})" "${rc}"
-            f_remove
-        fi
+        rc=140
+        f_log "package '${package}' not found" "${rc}"
+        f_exit
+    fi
+}
+
+##############################################
+# f_firewall: set iptables rules for ipv4/ipv6
+#
+f_firewall()
+{
+    local ipt
+    local iptv4="/usr/sbin/iptables"
+    local iptv6="/usr/sbin/ip6tables"
+    local proto="${1}"
+    local table="${2}"
+    local ctype="${3}"
+    local chain="${4}"
+    local notes="${5}"
+    local rules="${6}"
+
+    # select appropriate iptables executable
+    #
+    if [ "${proto}" = "IPv4" ]
+    then
+        ipt="${iptv4}"
+    else
+        ipt="${iptv6}"
     fi
 
-    # check dynamic/volatile adblock uhttpd instance configuration
+    # check whether iptables rule already applied and proceed accordingly
     #
-    rc="$(ps | grep "[u]httpd.*\-r ${adb_if}" >/dev/null 2>&1; printf ${?})"
+    rc="$("${ipt}" -w -t "${table}" -C "${chain}" -m comment --comment "${notes}" ${rules}; printf ${?})"
     if [ $((rc)) -ne 0 ]
     then
-        uhttpd -h "/www/adblock" -r "${adb_if}" -E "/adblock.html" -p "${adb_ip}:80" >/dev/null 2>&1
+        "${ipt}" -w -t "${table}" -"${ctype}" "${chain}" -m comment --comment "${notes}" ${rules}
         rc=${?}
         if [ $((rc)) -eq 0 ]
         then
-            f_log "created new dynamic/volatile uhttpd instance (${adb_if}, ${adb_ip})"
+            fw_done="true"
         else
-            f_log "failed to initialize new dynamic/volatile uhttpd instance (${adb_if}, ${adb_ip})" "${rc}"
-            f_remove
+            f_log "failed to initialize volatile ${proto} firewall rule '${notes}'" "${rc}"
+            f_restore
         fi
     fi
-
-    # remove no longer used package list
-    #
-    unset pkg_list
 }
 
-################################################
-# f_log: log messages to stdout, syslog, logfile
+##########################################
+# f_log: log messages to stdout and syslog
 #
 f_log()
 {
+    local log_parm
     local log_msg="${1}"
     local log_rc="${2}"
     local class="info "
+
+    # check for terminal session
+    #
+    if [ -t 1 ]
+    then
+        log_parm="-s"
+    fi
+
+    # log to different output devices and set log class accordingly
+    #
     if [ -n "${log_msg}" ]
     then
-        if [ $((log_rc)) -ne 0 ]
+        if [ $((log_rc)) -gt 0 ]
         then
             class="error"
             log_rc=", rc: ${log_rc}"
             log_msg="${log_msg}${log_rc}"
         fi
-        /usr/bin/logger -s -t "adblock[${pid}] ${class}" "${log_msg}"
-        if [ "${log_ok}" = "true" ] && [ "${ntp_ok}" = "true" ]
-        then
-            printf "%s\n" "$(/bin/date "+%d.%m.%Y %H:%M:%S") adblock[${pid}] ${class}: ${log_msg}" >> "${adb_logfile}"
-        fi
+        /usr/bin/logger ${log_parm} -t "adblock[${adb_pid}] ${class}" "${log_msg}" 2>&1
     fi
 }
 
@@ -484,211 +503,136 @@ f_log()
 f_space()
 {
     local mp="${1}"
+
     if [ -d "${mp}" ]
     then
-        df "${mp}" 2>/dev/null |\
-        tail -n1 2>/dev/null |\
-        while read filesystem overall used available scrap
-        do
-            av_space="${available}"
-            if [ $((av_space)) -eq 0 ]
-            then
-                rc=575
-                f_log "no space left on device/not mounted (${mp})" "${rc}"
-                exit ${rc}
-            elif [ $((av_space)) -lt $((adb_minspace)) ]
-            then
-                rc=580
-                f_log "not enough space left on device (${mp})" "${rc}"
-                exit ${rc}
-            fi
-        done
-        rc=${?}
-        if [ $((rc)) -eq 0 ]
+        av_space="$(df "${mp}" | tail -n1 | awk '{printf $4}')"
+        if [ $((av_space)) -lt $((adb_minspace)) ]
         then
-            space_ok="true"
-        else
             space_ok="false"
-            f_deltemp
         fi
     fi
 }
 
-####################################################
-# f_deltemp: delete temp files, directories and exit
+##################################################################
+# f_restore: restore last adblock list backups and restart dnsmasq
 #
-f_deltemp()
+f_restore()
 {
-    if [ -f "${adb_tmpfile}" ]
-    then
-       rm -f "${adb_tmpfile}" >/dev/null 2>&1
-    fi
-    if [ -d "${adb_tmpdir}" ]
-    then
-       rm -rf "${adb_tmpdir}" >/dev/null 2>&1
-    fi
-    f_log "domain adblock processing finished (${adb_version}, ${openwrt_version}, $(/bin/date "+%d.%m.%Y %H:%M:%S"))"
-    exit ${rc}
-}
+    local rm_done
+    local restore_done
 
-####################################################
-# f_remove: maintain and (re-)start domain query log
-#
-f_remove()
-{
-    local query_pid
-    local query_date
-    local query_total
-    local query_blocked
-    if [ "${query_ok}" = "true" ] && [ "${ntp_ok}" = "true" ]
-    then
-        query_date="$(date "+%Y%m%d")"
-        if [ -s "${adb_querypid}" ] && [ -f "${adb_queryfile}.${query_date}" ]
-        then
-            query_total="$(grep -F "query[A]" "${adb_queryfile}.${query_date}" 2>/dev/null | wc -l)"
-            query_blocked="$(grep -Fv "query[A]" "${adb_queryfile}.${query_date}" 2>/dev/null | wc -l)"
-            f_log "adblock statistics for query date ${query_date} (total: ${query_total}, blocked: ${query_blocked})"
-        fi
-        if [ -s "${adb_querypid}" ] && [ ! -f "${adb_queryfile}.${query_date}" ]
+    # remove bogus adblock lists
+    #
+    if [ -n "${adb_revsrclist}" ]
+    then
+        rm_done="$(find "${adb_dnsdir}" -maxdepth 1 -type f \( ${adb_revsrclist} \) -print -exec rm -f "{}" \;)"
+        rc=${?}
+        if [ $((rc)) -eq 0 ] && [ -n "${rm_done}" ]
         then
-            query_pid="$(cat "${adb_querypid}" 2>/dev/null)"
-            > "${adb_querypid}"
-            kill -9 "${query_pid}" >/dev/null 2>&1
-            rc=${?}
-            if [ $((rc)) -eq 0 ]
-            then
-                find "${adb_backupdir}" -maxdepth 1 -type f -mtime +"${adb_queryhistory}" -name "${query_name}.*" -exec rm -f "{}" \; 2>/dev/null
-                rc=${?}
-                if [ $((rc)) -eq 0 ]
-                then
-                    f_log "remove old domain query background process (pid: ${query_pid}) and do logfile housekeeping"
-                else
-                    f_log "error during domain query logfile housekeeping" "${rc}"
-                fi
-            else
-                f_log "error during domain query background process removal (pid: ${query_pid})" "${rc}"
-            fi
-        fi
-        if [ ! -s "${adb_querypid}" ]
+            f_log "all bogus adblock lists removed"
+        elif [ $((rc)) -ne 0 ]
         then
-            (logread -f 2>/dev/null & printf ${!} > "${adb_querypid}") | grep -Eo "(query\[A\].*)|([a-z0-9\.\-]* is ${query_ip}$)" 2>/dev/null >> "${adb_queryfile}.${query_date}" &
-            rc=${?}
-            if [ $((rc)) -eq 0 ]
-            then
-                sleep 1
-                f_log "new domain query log background process started (pid: $(cat "${adb_querypid}" 2>/dev/null))"
-            else
-                f_log "error during domain query background process start" "${rc}"
-            fi
+            f_log "error during removal of bogus adblock lists" "${rc}"
+            f_exit
         fi
     fi
-    f_deltemp
-}
 
-################################################################
-# f_restore: restore last adblocklist backup and restart dnsmasq
-#
-f_restore()
-{
-    # remove bogus adblocklists
+    # restore backups
     #
-    if [ -n "${adb_revsrclist}" ]
+    if [ "${backup_ok}" = "true" ] && [ "$(printf "${adb_backupdir}/${adb_dnsprefix}."*)" != "${adb_backupdir}/${adb_dnsprefix}.*" ]
     then
-        find "${adb_dnsdir}" -maxdepth 1 -type f \( ${adb_revsrcfind} \) -exec rm -f "{}" \; 2>/dev/null
-        if [ $((rc)) -eq 0 ]
+        restore_done="$(find "${adb_backupdir}" -maxdepth 1 -type f -name "${adb_dnsprefix}.*" -print -exec cp -pf "{}" "${adb_dnsdir}" \;)"
+        rc=${?}
+        if [ $((rc)) -eq 0 ] && [ -n "${restore_done}" ]
         then
-            f_log "bogus adblocklists removed"
-        else
-            f_log "error during removal of bogus adblocklists" "${rc}"
-            f_remove
+            f_log "all available backups restored"
+        elif [ $((rc)) -ne 0 ]
+        then
+            f_log "error during restore of adblock lists" "${rc}"
+            f_exit
         fi
+    else
+        f_log "no backups found, nothing to restore"
     fi
 
-    # restore backups
+    # (re-)try dnsmasq restart without bogus adblock lists / with backups 
     #
-    if [ "${backup_ok}" = "true" ] && [ -d "${adb_backupdir}" ] && [ "$(printf "${adb_backupdir}/${adb_dnsprefix}."*)" != "${adb_backupdir}/${adb_dnsprefix}.*" ]
+    if [ -n "${restore_done}" ] || [ -n "${rm_done}" ]
     then
-        cp -f "${adb_backupdir}/${adb_dnsprefix}."* "${adb_dnsdir}" >/dev/null 2>&1
-        rc=${?}
+        /etc/init.d/dnsmasq restart
+        sleep 1
+        rc="$(ps | grep -q "[d]nsmasq"; printf ${?})"
         if [ $((rc)) -eq 0 ]
         then
-            f_log "all available backups restored"
+            rc=0
+            adb_count="$(head -qn -3 "${adb_dnsdir}/${adb_dnsprefix}."* | wc -l)"
+            if [ -n "${adb_wanif4}" ] && [ -n "${adb_wanif6}" ]
+            then
+                adb_count="$((adb_count / 2))"
+            fi
+            f_log "adblock lists with overall ${adb_count} domains loaded"
         else
-            f_log "error during restore" "${rc}"
-            f_remove
+            rc=145
+            f_log "dnsmasq restart failed, please check 'logread' output" "${rc}"
         fi
     fi
-    /etc/init.d/dnsmasq restart >/dev/null 2>&1
-    f_remove
+    f_exit
 }
 
-#######################################################
-# f_wancheck: check for usable adblock update interface
+###################################
+# f_exit: delete (temporary) files,
+# generate statistics and exit
 #
-f_wancheck()
+f_exit()
 {
-    local cnt=0
-    local cnt_max="${1}"
-    local dev
-    local dev_out
-    while [ $((cnt)) -le $((cnt_max)) ]
-    do
-        for dev in ${adb_wandev}
-        do
-            if [ -d "/sys/class/net/${dev}" ]
-            then
-                dev_out="$(cat /sys/class/net/${dev}/operstate 2>/dev/null)"
-                rc=${?}
-                if [ "${dev_out}" = "up" ]
-                then
-                    wan_ok="true"
-                    f_log "get wan/update interface (${dev}), after ${cnt} loops"
-                    break 2
-                fi
-            fi
-        done
-        sleep 1
-        cnt=$((cnt + 1))
-    done
-    if [ -z "${wan_ok}" ]
-    then
-        rc=585
-        wan_ok="false"
-        f_log "no wan/update interface(s) found (${adb_wandev# })" "${rc}"
-        f_restore
+    local ipv4_prerouting=0
+    local ipv4_forward=0
+    local ipv4_output=0
+    local ipv6_prerouting=0
+    local ipv6_forward=0
+    local ipv6_output=0
+    local iptv4="/usr/sbin/iptables"
+    local iptv6="/usr/sbin/ip6tables"
+
+    # delete temporary files & directories
+    #
+    if [ -f "${adb_tmpfile}" ]
+    then
+       rm -f "${adb_tmpfile}"
+    fi
+    if [ -d "${adb_tmpdir}" ]
+    then
+       rm -rf "${adb_tmpdir}"
     fi
-}
 
-#####################################
-# f_ntpcheck: check/get ntp time sync
-#
-f_ntpcheck()
-{
-    local cnt=0
-    local cnt_max="${1}"
-    local ntp_pool
-    for srv in ${adb_ntpsrv}
-    do
-        ntp_pool="${ntp_pool} -p ${srv}"
-    done
-    while [ $((cnt)) -le $((cnt_max)) ]
-    do
-        /usr/sbin/ntpd -nq ${ntp_pool} >/dev/null 2>&1
-        rc=${?}
-        if [ $((rc)) -eq 0 ]
+    # final log message and iptables statistics
+    #
+    if [ $((rc)) -eq 0 ]
+    then
+        if [ -n "${adb_wanif4}" ]
         then
-            ntp_ok="true"
-            f_log "get ntp time sync (${adb_ntpsrv# }), after ${cnt} loops"
-            break
+            ipv4_prerouting="$(${iptv4} -t nat -vnL | awk '$11 ~ /^adb-prerouting$/ {sum += $1} END {printf sum}')"
+            ipv4_forward="$(${iptv4} -vnL | awk '$11 ~ /^adb-forward$/ {sum += $1} END {printf sum}')"
+            ipv4_output="$(${iptv4} -vnL | awk '$11 ~ /^adb-output$/ {sum += $1} END {printf sum}')"
         fi
-        sleep 1
-        cnt=$((cnt + 1))
-    done
-    if [ -z "${ntp_ok}" ]
-    then
-        rc=590
-        ntp_ok="false"
-        f_log "ntp time sync failed (${adb_ntpsrv# })" "${rc}"
-        f_restore
+        if [ -n "${adb_wanif6}" ]
+        then
+            ipv6_prerouting="$(${iptv6} -t nat -vnL | awk '$10 ~ /^adb-prerouting$/ {sum += $1} END {printf sum}')"
+            ipv6_forward="$(${iptv6} -vnL | awk '$10 ~ /^adb-forward$/ {sum += $1} END {printf sum}')"
+            ipv6_output="$(${iptv6} -vnL | awk '$10 ~ /^adb-output$/ {sum += $1} END {printf sum}')"
+        fi
+        f_log "adblock firewall statistics (IPv4/IPv6):"
+        f_log "${ipv4_prerouting}/${ipv6_prerouting} packets redirected in PREROUTING chain"
+        f_log "${ipv4_forward}/${ipv6_forward} packets rejected in FORWARD chain"
+        f_log "${ipv4_output}/${ipv6_output} packets rejected in OUTPUT chain"
+        f_log "domain adblock processing finished successfully (${adb_scriptver}, ${openwrt_version}, $(/bin/date "+%d.%m.%Y %H:%M:%S"))"
+    elif [ $((rc)) -gt 0 ]
+    then
+        f_log "domain adblock processing failed (${adb_scriptver}, ${openwrt_version}, $(/bin/date "+%d.%m.%Y %H:%M:%S"))"
+    else
+        rc=0
     fi
+    rm -f "${adb_pidfile}"
+    exit ${rc}
 }
index a2ab78b57025cf66e7000bd8b8cebc332f092f0e..cce8dcb1724552749fda89d30db810a9bad82210 100755 (executable)
@@ -1,65 +1,68 @@
 #!/bin/sh
-#######################################################
-# ad/abuse domain blocking script for dnsmasq/openwrt #
-# written by Dirk Brenken (dirk@brenken.org)          #
-#######################################################
-
-# LICENSE
-# ========
-# 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.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
+# ad/abuse domain blocking script for dnsmasq/openwrt
+# written by Dirk Brenken (openwrt@brenken.org)
+
+# This is free software, licensed under the GNU General Public License v3.
 # You should have received a copy of the GNU General Public License
 # along with this program. If not, see <http://www.gnu.org/licenses/>.
 
-###############
-# environment #
-###############
+# set the C locale
+#
+LC_ALL=C
 
-# set script version
+# script debug switch (disabled by default)
+# set 'DEBUG=1' to enable script debugging
 #
-adb_version="0.40.2"
+DEBUG=0
+if [ $((DEBUG)) -eq 0 ]
+then
+    exec 2>/dev/null
+fi
 
-# get current pid, script directory and openwrt version
+# pid handling
+#
+adb_pid="${$}"
+adb_pidfile="/var/run/adblock.pid"
+
+if [ -r "${adb_pidfile}" ]
+then
+    rc=255
+    /usr/bin/logger -s -t "adblock[${adb_pid}] error" "adblock service already running ($(cat ${adb_pidfile}))"
+    exit ${rc}
+else
+    printf "${adb_pid}" > "${adb_pidfile}"
+fi
+
+# get current directory, script- and openwrt version
 #
-pid=${$}
 adb_scriptdir="${0%/*}"
-openwrt_version="$(cat /etc/openwrt_version 2>/dev/null)"
+adb_scriptver="1.0.3"
+openwrt_version="$(cat /etc/openwrt_version)"
 
 # source in adblock function library
 #
 if [ -r "${adb_scriptdir}/adblock-helper.sh" ]
 then
-    . "${adb_scriptdir}/adblock-helper.sh" 2>/dev/null
+    . "${adb_scriptdir}/adblock-helper.sh"
 else
-    rc=600
-    /usr/bin/logger -s -t "adblock[${pid}] error" "adblock function library not found, rc: ${rc}"
+    rc=254
+    /usr/bin/logger -s -t "adblock[${adb_pid}] error" "adblock function library not found"
+    rm -f "${adb_pidfile}"
     exit ${rc}
 fi
 
-################
-# main program #
-################
-
-# call restore function on trap signals (HUP, INT, QUIT, BUS, SEGV, TERM)
-#
-trap "f_log 'trap error' '700'; f_restore" 1 2 3 10 11 15
-
-# start logging
+# call trap function on error signals (HUP, INT, QUIT, BUS, SEGV, TERM)
 #
-f_log "domain adblock processing started (${adb_version}, ${openwrt_version}, $(/bin/date "+%d.%m.%Y %H:%M:%S"))"
+trap "rc=250; f_log 'error signal received/trapped' '${rc}'; f_exit" 1 2 3 10 11 15
 
 # load environment
 #
 f_envload
 
+# start logging
+#
+f_log "domain adblock processing started (${adb_scriptver}, ${openwrt_version}, $(/bin/date "+%d.%m.%Y %H:%M:%S"))"
+
 # parse environment
 #
 f_envparse
@@ -78,143 +81,155 @@ then
     shalla_file="${adb_tmpdir}/shallalist.txt"
     src_name="shalla"
     adb_dnsfile="${adb_dnsdir}/${adb_dnsprefix}.${src_name}"
-    list_time="$(grep -F "# last modified: " "${adb_dnsfile}" 2>/dev/null)"
-    list_time="${list_time/*: /}"
+    if [ -r "${adb_dnsfile}" ]
+    then
+        list_time="$(awk '$0 ~ /^# last modified/ {printf substr($0,18)}' "${adb_dnsfile}")"
+    fi
+    f_log "=> (pre-)processing adblock source '${src_name}'"
 
-    # only process shallalist archive with updated timestamp
+    # only process shallalist archive with updated timestamp,
+    # extract and merge only domains of selected shallalist categories
     #
-    shalla_time="$(curl ${curl_parm} --max-time 5 --head "${adb_arc_shalla}" 2>/dev/null | grep -F "Last-Modified: " 2>/dev/null | tr -d '\r' 2>/dev/null)"
-    shalla_time="${shalla_time/*: /}"
+    shalla_time="$(${adb_fetch} ${wget_parm} --server-response --spider "${adb_arc_shalla}" 2>&1 | awk '$0 ~ /Last-Modified/ {printf substr($0,18)}')"
     if [ -z "${shalla_time}" ]
     then
         shalla_time="$(date)"
-        f_log "no online timestamp received, current date will be used (${src_name})"
+        f_log "   no online timestamp received, current date will be used"
     fi
     if [ -z "${list_time}" ] || [ "${list_time}" != "${shalla_time}" ]
     then
-        f_log "shallalist (pre-)processing started ..."
-        curl ${curl_parm} --max-time "${adb_maxtime}" "${adb_arc_shalla}" --output "${shalla_archive}" 2>/dev/null
+        ${adb_fetch} ${wget_parm} --output-document="${shalla_archive}" "${adb_arc_shalla}"
         rc=${?}
-        if [ $((rc)) -ne 0 ]
+        if [ $((rc)) -eq 0 ]
         then
-            f_log "source download failed (${src_name})" "${rc}"
-            f_restore
-        fi
+            > "${shalla_file}"
+            for category in ${adb_cat_shalla}
+            do
+                tar -xOzf "${shalla_archive}" BL/${category}/domains >> "${shalla_file}"
+                rc=${?}
+                if [ $((rc)) -ne 0 ]
+                then
+                    f_log "   archive extraction failed (${category})"
+                    break
+                fi
+            done
 
-        # extract and merge only domains of selected shallalist categories
-        #
-        > "${shalla_file}"
-        for category in ${adb_cat_shalla}
-        do
-            tar -xOzf "${shalla_archive}" BL/${category}/domains 2>/dev/null >> "${shalla_file}"
-            rc=${?}
-            if [ $((rc)) -ne 0 ]
+            # remove temporary files
+            #
+            rm -f "${shalla_archive}"
+            rm -rf "${adb_tmpdir}/BL"
+            if [ $((rc)) -eq 0 ]
             then
-                f_log "source archive extraction failed (${category})" "${rc}"
-                f_restore
+                adb_sources="${adb_sources} ${shalla_file}&ruleset=rset_shalla"
+                f_log "   source archive (pre-)processing finished"
+            else
+                rc=0
+                adb_srclist="! -name ${adb_dnsprefix}.${src_name}"
+                adb_errsrclist="-name ${adb_dnsprefix}.${src_name}"
             fi
-        done
-
-        # remove temporary files
-        #
-        rm -f "${shalla_archive}" >/dev/null 2>&1
-        rm -rf "${adb_tmpdir}/BL" >/dev/null 2>&1 
+        else
+            rc=0
+            adb_srclist="! -name ${adb_dnsprefix}.${src_name}"
+            adb_errsrclist="-name ${adb_dnsprefix}.${src_name}"
+            f_log "   source archive download failed"
+        fi
+    else
+        adb_srclist="! -name ${adb_dnsprefix}.${src_name}"
+        f_log "   source archive doesn't change, no update required"
     fi
-    adb_sources="${adb_sources} file:///${shalla_file}&ruleset=rset_shalla"
 fi
 
 # add blacklist source to active adblock domain sources
 #
-if [ -n "${adb_sources}" ] && [ -s "${adb_blacklist}" ]
+if [ -s "${adb_blacklist}" ]
 then
-    adb_sources="${adb_sources} file://${adb_blacklist}&ruleset=rset_blacklist"
+    adb_sources="${adb_sources} ${adb_blacklist}&ruleset=rset_blacklist"
 fi
 
 # loop through active adblock domain sources,
-# prepare output and store all extracted domains in temp file
+# download sources, prepare output and store all extracted domains in temp file
 #
 for src in ${adb_sources}
 do
-    # download selected adblock sources
-    #
     url="${src/\&ruleset=*/}"
-    check_url="$(printf "${url}" | sed -n '/^https:/p' 2>/dev/null)"
     src_name="${src/*\&ruleset=rset_/}"
     adb_dnsfile="${adb_dnsdir}/${adb_dnsprefix}.${src_name}"
-    list_time="$(grep -F "# last modified: " "${adb_dnsfile}" 2>/dev/null)"
-    list_time="${list_time/*: /}"
+    if [ -r "${adb_dnsfile}" ]
+    then
+        list_time="$(awk '$0 ~ /^# last modified/ {printf substr($0,18)}' "${adb_dnsfile}")"
+    fi
+    f_log "=> processing adblock source '${src_name}'"
 
-    # prepare find statement for all active adblocklist sources
+    # prepare find statement with active adblock list sources
     #
-    if [ -z "${adb_srcfind}" ]
+    if [ -z "${adb_srclist}" ]
     then
-        adb_srcfind="! -name ${adb_dnsprefix}.${src_name}"
+        adb_srclist="! -name ${adb_dnsprefix}.${src_name}"
     else
-        adb_srcfind="${adb_srcfind} -a ! -name ${adb_dnsprefix}.${src_name}"
+        adb_srclist="${adb_srclist} -a ! -name ${adb_dnsprefix}.${src_name}"
     fi
 
-    # wget/curl switch
-    # only download blocklist with newer/updated timestamp
+    # only download adblock list with newer/updated timestamp
     #
-    if [ -n "${check_url}" ]
+    if [ "${src_name}" = "blacklist" ]
     then
-        url_time="$(wget ${wget_parm} --timeout=5 --server-response --spider "${url}" 2>&1 | grep -F "Last-Modified: " 2>/dev/null | tr -d '\r' 2>/dev/null)"
-        url_time="${url_time/*: /}"
-        if [ -z "${url_time}" ]
-        then
-            url_time="$(date)"
-            f_log "no online timestamp received, current date will be used (${src_name})"
-        fi
-        if [ -z "${list_time}" ] || [ "${list_time}" != "${url_time}" ]
-        then
-            tmp_domains="$(wget ${wget_parm} --timeout="${adb_maxtime}" --tries=1 --output-document=- "${url}" 2>/dev/null)"
-            rc=${?}
-        else
-            f_log "source doesn't change, no update required (${src_name})"
-            continue
-        fi
+        url_time="$(date -r "${adb_blacklist}")"
+    elif [ "${src_name}" = "shalla" ]
+    then
+        url_time="${shalla_time}"
     else
-        if [ "${src_name}" = "shalla" ]
-        then
-            url_time="${shalla_time}"
-        else
-            url_time="$(curl ${curl_parm} --max-time 5 --head "${url}" 2>/dev/null | grep -F "Last-Modified: " | tr -d '\r')"
-            url_time="${url_time/*: /}"
-        fi
-        if [ -z "${url_time}" ]
+        url_time="$(${adb_fetch} ${wget_parm} --server-response --spider "${url}" 2>&1 | awk '$0 ~ /Last-Modified/ {printf substr($0,18)}')"
+    fi
+    if [ -z "${url_time}" ]
+    then
+        url_time="$(date)"
+        f_log "   no online timestamp received, current date will be used"
+    fi
+    if [ -z "${list_time}" ] || [ "${list_time}" != "${url_time}" ]
+    then
+        if [ "${src_name}" = "blacklist" ]
         then
-            url_time="$(date)"
-            f_log "no online timestamp received, current date will be used (${src_name})"
-        fi
-        if [ -z "${list_time}" ] || [ "${list_time}" != "${url_time}" ]
+            tmp_domains="$(cat "${adb_blacklist}")"
+            rc=${?}
+        elif [ "${src_name}" = "shalla" ]
         then
-            tmp_domains="$(curl ${curl_parm} --max-time "${adb_maxtime}" "${url}" 2>/dev/null)"
+            tmp_domains="$(cat "${shalla_file}")"
             rc=${?}
         else
-            f_log "source doesn't change, no update required (${src_name})"
-            continue
+            tmp_domains="$(${adb_fetch} ${wget_parm} --output-document=- "${url}")"
+            rc=${?}
         fi
+    else
+        f_log "   source doesn't change, no update required"
+        continue
     fi
 
     # check download result and prepare domain output by regex patterns
     #
     if [ $((rc)) -eq 0 ] && [ -n "${tmp_domains}" ]
     then
-        eval "$(printf "${src}" | sed 's/\(.*\&ruleset=\)/ruleset=\$/g')"
-        count="$(printf "%s\n" "${tmp_domains}" | tr '[A-Z]' '[a-z]' | eval "${ruleset}" | tee "${adb_tmpfile}" | wc -l)"
-        f_log "source download finished (${url}, ${count} entries)"
+        eval "src_rset=\${rset_${src_name}}"
+        count="$(printf "%s\n" "${tmp_domains}" | eval "${src_rset}" | tee "${adb_tmpfile}" | wc -l)"
+        f_log "   source download finished (${count} entries)"
         if [ "${src_name}" = "shalla" ]
         then
-            rm -f "${shalla_file}" >/dev/null 2>&1
+            rm -f "${shalla_file}"
         fi
         unset tmp_domains
     elif [ $((rc)) -eq 0 ] && [ -z "${tmp_domains}" ]
     then
-        f_log "empty source download finished (${src_name})"
+        f_log "   empty source download finished"
         continue
     else
-        f_log "source download failed (${src_name})" "${rc}"
-        f_restore
+        rc=0
+        if [ -z "${adb_errsrclist}" ]
+        then
+            adb_errsrclist="-name ${adb_dnsprefix}.${src_name}"
+        else
+            adb_errsrclist="${adb_errsrclist} -o -name ${adb_dnsprefix}.${src_name}"
+        fi
+        f_log "   source download failed"
+        continue
     fi
 
     # remove whitelist domains, sort domains and make them unique,
@@ -224,155 +239,181 @@ do
     then
         if [ -s "${adb_whitelist}" ]
         then
-            grep -Fvxf "${adb_whitelist}" "${adb_tmpfile}" 2>/dev/null | sort 2>/dev/null | uniq -u 2>/dev/null | eval "${adb_dnsformat}" 2>/dev/null > "${adb_dnsfile}"
+            grep -Fvxf "${adb_whitelist}" "${adb_tmpfile}" | sort -u | eval "${adb_dnsformat}" > "${adb_dnsfile}"
             rc=${?}
         else
-            sort "${adb_tmpfile}" 2>/dev/null | uniq -u 2>/dev/null | eval "${adb_dnsformat}" 2>/dev/null > "${adb_dnsfile}"
+            sort -u "${adb_tmpfile}" | eval "${adb_dnsformat}" > "${adb_dnsfile}"
             rc=${?}
         fi
 
-        # prepare find statement for revised adblocklist sources
+        # prepare find statement with revised adblock list sources
         #
-        if [ -z "${adb_revsrcfind}" ]
+        if [ -z "${adb_revsrclist}" ]
         then
-            adb_revsrcfind="-name ${adb_dnsprefix}.${src_name}"
+            adb_revsrclist="-name ${adb_dnsprefix}.${src_name}"
         else
-            adb_revsrcfind="${adb_revsrcfind} -o -name ${adb_dnsprefix}.${src_name}"
+            adb_revsrclist="${adb_revsrclist} -o -name ${adb_dnsprefix}.${src_name}"
         fi
 
-        # write preliminary adblocklist footer
+        # write preliminary footer
         #
         if [ $((rc)) -eq 0 ]
         then
-            count="$(wc -l < "${adb_dnsdir}/${adb_dnsprefix}.${src_name}")"
-            printf "%s\n" "#------------------------------------------------------------------" >> "${adb_dnsfile}"
-            printf "%s\n" "# ${0##*/} (${adb_version}) - ${count} ad/abuse domains blocked" >> "${adb_dnsfile}"
-            printf "%s\n" "# source: ${url}" >> "${adb_dnsfile}"
+            printf "%s\n" "#---------------------------------------------" >> "${adb_dnsfile}"
             printf "%s\n" "# last modified: ${url_time}" >> "${adb_dnsfile}"
-            f_log "domain merging finished (${src_name})"
+            printf "%s\n" "##" >> "${adb_dnsfile}"
+            f_log "   domain merging finished"
         else
-            f_log "domain merging failed (${src_name})" "${rc}"
+            f_log "   domain merging failed" "${rc}"
             f_restore
         fi
     else
-        f_log "empty domain input received (${src_name})"
+        f_log "   empty domain input received"
         continue
     fi
 done
 
-# remove old adblocklists and their backups
+# remove disabled adblock lists and their backups
 #
-if [ -n "${adb_srcfind}" ]
+if [ -n "${adb_srclist}" ]
 then
-    find "${adb_dnsdir}" -maxdepth 1 -type f -name "${adb_dnsprefix}.*" \( ${adb_srcfind} \) -exec rm -f "{}" \; 2>/dev/null
-    if [ $((rc)) -ne 0 ]
-    then
-        f_log "error during removal of old adblocklists" "${rc}"
-        f_remove
-    fi
+    rm_done="$(find "${adb_dnsdir}" -maxdepth 1 -type f -name "${adb_dnsprefix}.*" \( ${adb_srclist} \) -print -exec rm -f "{}" \;)"
+    rc=${?}
+else
+    rm_done="$(find "${adb_dnsdir}" -maxdepth 1 -type f -name "${adb_dnsprefix}.*" -print -exec rm -f "{}" \;)"
+    rc=${?}
+fi
+if [ $((rc)) -eq 0 ] && [ -n "${rm_done}" ]
+then
+    f_log "disabled adblock lists removed"
     if [ "${backup_ok}" = "true" ]
     then
-        find "${adb_backupdir}" -maxdepth 1 -type f -name "${adb_dnsprefix}.*" \( ${adb_srcfind} \) -exec rm -f "{}" \; 2>/dev/null
-        if [ $((rc)) -ne 0 ]
+        if [ -n "${adb_srclist}" ]
+        then
+            rm_done="$(find "${adb_backupdir}" -maxdepth 1 -type f -name "${adb_dnsprefix}.*" \( ${adb_srclist} \) -print -exec rm -f "{}" \;)"
+            rc=${?}
+        else
+            rm_done="$(find "${adb_backupdir}" -maxdepth 1 -type f -name "${adb_dnsprefix}.*" -print -exec rm -f "{}" \;)"
+            rc=${?}
+        fi
+        if  [ $((rc)) -eq 0 ] && [ -n "${rm_done}" ]
+        then
+            f_log "disabled adblock list backups removed"
+        elif [ $((rc)) -ne 0 ]
         then
-            f_log "error during removal of old backups" "${rc}"
-            f_remove
+            f_log "error during removal of disabled adblock list backups" "${rc}"
+            f_exit
         fi
     fi
-else
-    rm -f "${adb_dnsdir}/${adb_dnsprefix}."* >/dev/null 2>&1
-    if [ "${backup_ok}" = "true" ]
+elif [ $((rc)) -ne 0 ]
+then
+    f_log "error during removal of disabled adblock lists" "${rc}"
+    f_exit
+fi
+
+# partial restore of adblock lists in case of download errors
+#
+if [ "${backup_ok}" = "true" ] && [ -n "${adb_errsrclist}" ]
+then
+    restore_done="$(find "${adb_backupdir}" -maxdepth 1 -type f \( ${adb_errsrclist} \) -print -exec cp -pf "{}" "${adb_dnsdir}" \;)"
+    rc=${?}
+    if [ $((rc)) -eq 0 ] && [ -n "${restore_done}" ]
     then
-        rm -f "${adb_backupdir}/${adb_dnsprefix}."* >/dev/null 2>&1
-        f_log "all available adblocklists and backups removed"
-    else
-        f_log "all available adblocklists removed"
+        f_log "partial restore done"
+    elif [ $((rc)) -ne 0 ]
+    then
+        f_log "error during partial restore" "${rc}"
+        f_exit
     fi
 fi
 
-# make separate adblocklists unique
+# make separate adblock lists entries unique
 #
-if [ $((adb_unique)) -eq 1 ]
+if [ "${mem_ok}" = "true" ] && [ -n "${adb_revsrclist}" ]
 then
-    if [ -n "${adb_revsrcfind}" ]
-    then
-        f_log "remove duplicates in separate adblocklists ..."
+    f_log "remove duplicates in separate adblock lists"
 
-        # generate a temporary, unique overall list
-        #
-        head -qn -4 "${adb_dnsdir}/${adb_dnsprefix}."* 2>/dev/null | sort -u 2>/dev/null > "${adb_dnsdir}/tmp.overall"
+    # generate a unique overall block list
+    #
+    head -qn -3 "${adb_dnsdir}/${adb_dnsprefix}."* | sort -u > "${adb_tmpdir}/blocklist.overall"
 
-        # loop through all separate lists, ordered by size (ascending)
+    # loop through all separate lists, ordered by size (ascending)
+    #
+    for list in $(ls -Sr "${adb_dnsdir}/${adb_dnsprefix}."*)
+    do
+        # check overall block list vs. separate block list,
+        # write only duplicate entries to a temporary separate list
         #
-        for list in $(ls -Sr "${adb_dnsdir}/${adb_dnsprefix}."* 2>/dev/null)
-        do
-            # check separate lists vs. overall list,
-            # rewrite only duplicate entries back to separate lists
-            #
-            list="${list/*./}"
-            sort "${adb_dnsdir}/tmp.overall" "${adb_dnsdir}/${adb_dnsprefix}.${list}" 2>/dev/null | uniq -d 2>/dev/null > "${adb_dnsdir}/tmp.${list}"
+        list="${list/*./}"
+        sort "${adb_tmpdir}/blocklist.overall" "${adb_dnsdir}/${adb_dnsprefix}.${list}" | uniq -d > "${adb_tmpdir}/tmp.${list}"
 
-            # remove these entries from overall list,
-            # rewrite only unique entries back to overall list
-            #
-            tmp_unique="$(sort "${adb_dnsdir}/tmp.overall" "${adb_dnsdir}/tmp.${list}" 2>/dev/null | uniq -u 2>/dev/null)"
-            printf "%s\n" "${tmp_unique}" > "${adb_dnsdir}/tmp.overall"
+        # write only unique entries back to overall block list
+        #
+        sort "${adb_tmpdir}/blocklist.overall" "${adb_tmpdir}/tmp.${list}" | uniq -u > "${adb_tmpdir}/tmp.overall"
+        mv -f "${adb_tmpdir}/tmp.overall" "${adb_tmpdir}/blocklist.overall"
 
-            # write final adblocklist footer
-            #
-            count="$(wc -l < "${adb_dnsdir}/tmp.${list}")"
-            printf "%s\n" "#------------------------------------------------------------------" >> "${adb_dnsdir}/tmp.${list}"
-            printf "%s\n" "# ${0##*/} (${adb_version}) - ${count} ad/abuse domains blocked" >> "${adb_dnsdir}/tmp.${list}"
-            tail -qn -2 "${adb_dnsdir}/$adb_dnsprefix.${list}" 2>/dev/null >> "${adb_dnsdir}/tmp.${list}"
-            mv -f "${adb_dnsdir}/tmp.${list}" "${adb_dnsdir}/${adb_dnsprefix}.${list}" >/dev/null 2>&1
-        done
-        rm -f "${adb_dnsdir}/tmp.overall" >/dev/null 2>&1
-    fi
+        # write unique result back to original separate list
+        #
+        tail -qn 3 "${adb_dnsdir}/${adb_dnsprefix}.${list}" >> "${adb_tmpdir}/tmp.${list}"
+        mv -f "${adb_tmpdir}/tmp.${list}" "${adb_dnsdir}/${adb_dnsprefix}.${list}"
+    done
+    rm -f "${adb_tmpdir}/blocklist.overall"
 fi
 
-# restart dnsmasq with newly generated block lists
+# set separate list count & get overall count
 #
-/etc/init.d/dnsmasq restart >/dev/null 2>&1
-sleep 3
+for list in $(ls -Sr "${adb_dnsdir}/${adb_dnsprefix}."*)
+do
+    list="${list/*./}"
+    count="$(head -qn -3 "${adb_dnsdir}/${adb_dnsprefix}.${list}" | wc -l)"
+    if [ -n "${adb_wanif4}" ] && [ -n "${adb_wanif6}" ]
+    then
+        count=$((count / 2))
+    fi
+    if [ "$(tail -qn 1 "${adb_dnsdir}/${adb_dnsprefix}.${list}")" = "##" ]
+    then
+        last_line="# ${0##*/} (${adb_scriptver}) - ${count} ad\/abuse domains blocked"
+        sed -i "s/^##$/${last_line}/" "${adb_dnsdir}/${adb_dnsprefix}.${list}"
+    fi
+    adb_count=$((adb_count + count))
+done
 
-# dnsmasq health check
+# restart dnsmasq with newly generated or deleted adblock lists,
+# check dnsmasq startup afterwards
 #
-dns_status="$(logread -l 20 -e "dnsmasq" -e "FAILED to start up" 2>/dev/null)"
-if [ -z "${dns_status}" ]
+if [ -n "${adb_revsrclist}" ] || [ -n "${rm_done}" ] || [ -n "${restore_done}" ]
 then
-    dns_status="$(nslookup "${adb_domain}" 2>/dev/null | grep -F "${adb_ip}" 2>/dev/null)"
-    if [ -z "${dns_status}" ]
+    /etc/init.d/dnsmasq restart
+    sleep 1
+    rc="$(ps | grep -q "[d]nsmasq"; printf ${?})"
+    if [ $((rc)) -eq 0 ]
     then
-        adb_count="$(head -qn -4 "${adb_dnsdir}/${adb_dnsprefix}."* 2>/dev/null | wc -l)"
-        if [ "${backup_ok}" = "true" ]
-        then
-            if [ -n "${adb_revsrcfind}" ]
-            then
-                find "${adb_dnsdir}" -maxdepth 1 -type f \( ${adb_revsrcfind} \) -exec cp -f "{}" "${adb_backupdir}" \; 2>/dev/null
-                rc=${?}
-                if [ $((rc)) -ne 0 ]
-                then
-                    f_log "error during backup of adblocklists" "${rc}"
-                    f_remove
-                fi
-                f_log "adblocklists with overall ${adb_count} domains loaded, new backups generated"
-            else
-                f_log "adblocklists with overall ${adb_count} domains loaded, no new backups"
-            fi
-        else
-            f_log "adblocklists with overall ${adb_count} domains loaded, backups disabled"
-        fi
+        f_log "adblock lists with overall ${adb_count} domains loaded"
     else
-        rc=605
-        f_log "nslookup probe failed" "${rc}"
+        rc=100
+        f_log "dnsmasq restart failed, please check 'logread' output" "${rc}"
         f_restore
     fi
 else
-    rc=610
-    f_log "dnsmasq probe failed" "${rc}"
-    f_restore
+    f_log "adblock lists with overall ${adb_count} domains are still valid, no dnsmasq restart required"
+fi
+
+# create adblock list backups
+#
+if [ "${backup_ok}" = "true" ] && [ -n "${adb_revsrclist}" ] && [ "$(printf "${adb_dnsdir}/${adb_dnsprefix}."*)" != "${adb_dnsdir}/${adb_dnsprefix}.*" ]
+then
+    backup_done="$(find "${adb_dnsdir}" -maxdepth 1 -type f \( ${adb_revsrclist} \) -print -exec cp -pf "{}" "${adb_backupdir}" \;)"
+    rc=${?}
+    if [ $((rc)) -eq 0 ] && [ -n "${backup_done}" ]
+    then
+        f_log "new adblock list backups generated"
+    elif [ $((rc)) -ne 0 ]
+    then
+        f_log "error during backup of adblock lists" "${rc}"
+        f_exit
+    fi
 fi
 
 # remove temporary files and exit
 #
-f_remove
+f_exit
index 8b137891791fe96927ad78e64b0aad7bded08bdc..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1 +0,0 @@
-
index 8dff6e30d767d411d40314ff62142629dc2c6575..cb18787dccc9b24d48a0e153b89dc3269d34e28b 100644 (file)
@@ -1,82 +1,98 @@
 # adblock configuration, for further information
-# please read /etc/adblock/samples/adblock.conf.sample
-# and /etc/adblock/README.md
-#
-config adblock "global"
-       option adb_ip "192.168.2.1"
-       option adb_domain "heise.de"
-       option adb_blacklist "/etc/adblock/adblock.blacklist"
-       option adb_whitelist "/etc/adblock/adblock.whitelist"
-
-config service "wancheck"
-       option enabled "0"
-       list adb_wanlist "wan"
-
-config service "ntpcheck"
-       option enabled "0"
-
-config service "backup"
-       option enabled "0"
-       option adb_backupdir "/tmp"
-
-config service "debuglog"
-       option enabled "0"
-       option adb_logfile "/tmp/adb_debug.log"
-
-config service "querylog"
-       option enabled "0"
-       option adb_queryfile "/tmp/adb_query.log"
-       option adb_queryhistory "1"
-
-config source "adaway"
-       option enabled "0"
-       option adb_src_adaway "https://adaway.org/hosts.txt&ruleset=rset_adaway"
-
-config source "disconnect"
-       option enabled "0"
-       option adb_src_disconnect "https://s3.amazonaws.com/lists.disconnect.me/simple_malvertising.txt&ruleset=rset_disconnect"
-
-config source "dshield"
-       option enabled "0"
-       option adb_src_dshield "http://www.dshield.org/feeds/suspiciousdomains_Low.txt&ruleset=rset_dshield"
-
-config source "feodo"
-       option enabled "0"
-       option adb_src_feodo "https://feodotracker.abuse.ch/blocklist/?download=domainblocklist&ruleset=rset_feodo"
-
-config source "malware"
-       option enabled "0"
-       option adb_src_malware "http://mirror1.malwaredomains.com/files/justdomains&ruleset=rset_malware"
-
-config source "palevo"
-       option enabled "0"
-       option adb_src_palevo "https://palevotracker.abuse.ch/blocklists.php?download=domainblocklist&ruleset=rset_palevo"
-
-config source "shalla"
-       option enabled "0"
-       option adb_arc_shalla "http://www.shallalist.de/Downloads/shallalist.tar.gz"
-       list adb_catlist "adv"
-       list adb_catlist "costtraps"
-       list adb_catlist "spyware"
-       list adb_catlist "tracker"
-       list adb_catlist "warez"
-
-config source "spam404"
-       option enabled "0"
-       option adb_src_spam404 "http://spam404bl.com/spam404scamlist.txt&ruleset=rset_spam404"
-
-config source "whocares"
-       option enabled "0"
-       option adb_src_whocares "http://someonewhocares.org/hosts/hosts&ruleset=rset_whocares"
-
-config source "winhelp"
-       option enabled "0"
-       option adb_src_winhelp "http://winhelp2002.mvps.org/hosts.txt&ruleset=rset_winhelp"
-
-config source "yoyo"
-       option enabled "1"
-       option adb_src_yoyo "http://pgl.yoyo.org/adservers/serverlist.php?hostformat=one-line&showintro=0&mimetype=plaintext&ruleset=rset_yoyo"
-
-config source "zeus"
-       option enabled "0"
-       option adb_src_zeus "https://zeustracker.abuse.ch/blocklist.php?download=domainblocklist&ruleset=rset_zeus"
+# see 'https://github.com/openwrt/packages/blob/master/net/adblock/files/README.md'
+
+config adblock 'global'
+       option adb_enabled '1'
+       option adb_cfgver '1.0'
+       option adb_blacklist '/etc/adblock/adblock.blacklist'
+       option adb_whitelist '/etc/adblock/adblock.whitelist'
+       option adb_forcedns '1'
+
+config service 'backup'
+       option enabled '0'
+       option adb_backupdir '/mnt'
+
+config source 'adaway'
+       option enabled '1'
+       option adb_src 'https://adaway.org/hosts.txt&ruleset=rset_adaway'
+       option adb_srcdesc 'focus on mobile ads, infrequent updates, approx. 400 entries'
+
+config source 'disconnect'
+       option enabled '1'
+       option adb_src 'https://s3.amazonaws.com/lists.disconnect.me/simple_malvertising.txt&ruleset=rset_disconnect'
+       option adb_srcdesc 'mozilla driven content blocklist, numerous updates on the same day, approx. 6.500 entries'
+
+config source 'dshield'
+       option enabled '0'
+       option adb_src 'http://www.dshield.org/feeds/suspiciousdomains_Low.txt&ruleset=rset_dshield'
+       option adb_srcdesc 'broad blocklist for suspicious domains, daily updates, approx. 4.500 entries'
+
+config source 'feodo'
+       option enabled '0'
+       option adb_src 'https://feodotracker.abuse.ch/blocklist/?download=domainblocklist&ruleset=rset_feodo'
+       option adb_srcdesc 'focus on feodo botnet domains, daily updates, approx. 0-10 entries'
+
+config source 'malware'
+       option enabled '0'
+       option adb_src 'https://mirror.cedia.org.ec/malwaredomains/justdomains&ruleset=rset_malware'
+       option adb_srcdesc 'broad blocklist for malware domains, daily updates, approx. 16.000 entries'
+
+config source 'malwarelist'
+       option enabled '0'
+       option adb_src 'http://www.malwaredomainlist.com/hostslist/hosts.txt&ruleset=rset_malwarelist'
+       option adb_srcdesc 'generic blocklist for malware domains, daily updates, approx. 1.500 entries'
+
+config source 'openphish'
+       option enabled '0'
+       option adb_src 'https://openphish.com/feed.txt&ruleset=rset_openphish'
+       option adb_srcdesc 'focus on phishing domains, numerous updates on the same day, approx. 1.800 entries'
+
+config source 'palevo'
+       option enabled '0'
+       option adb_src 'https://palevotracker.abuse.ch/blocklists.php?download=domainblocklist&ruleset=rset_palevo'
+       option adb_srcdesc 'focus on palevo worm domains, daily updates, approx. 15 entries'
+
+config source 'ruadlist'
+       option enabled '0'
+       option adb_src 'https://easylist-downloads.adblockplus.org/ruadlist+easylist.txt&ruleset=rset_ruadlist'
+       option adb_srcdesc 'focus on russian ad related domains plus generic easylist additions, weekly updates, approx. 2.000 entries'
+
+config source 'shalla'
+       option enabled '0'
+       option adb_src 'http://www.shallalist.de/Downloads/shallalist.tar.gz'
+       option adb_srcdesc 'broad blocklist subdivided in different categories (adv, costtraps, spyware, tracker and warez enabled by default), daily updates, approx. 32.000 entries'
+       list adb_catlist 'adv'
+       list adb_catlist 'costtraps'
+       list adb_catlist 'spyware'
+       list adb_catlist 'tracker'
+       list adb_catlist 'warez'
+
+config source 'spam404'
+       option enabled '0'
+       option adb_src 'https://raw.githubusercontent.com/Dawsey21/Lists/master/main-blacklist.txt&ruleset=rset_spam404'
+       option adb_srcdesc 'generic blocklist for suspicious domains, infrequent updates, approx. 5.000 entries'
+
+config source 'sysctl' 
+       option enabled '0'
+       option adb_src 'http://sysctl.org/cameleon/hosts&ruleset=rset_sysctl'
+       option adb_srcdesc 'generic blocklist for ad related domains, weekly updates, approx. 21.000 entries'
+
+config source 'whocares'
+       option enabled '0'
+       option adb_src 'http://someonewhocares.org/hosts/hosts&ruleset=rset_whocares'
+       option adb_srcdesc 'broad blocklist for suspicious domains, weekly updates, approx. 12.000 entries'
+
+config source 'winhelp'
+       option enabled '0'
+       option adb_src 'http://winhelp2002.mvps.org/hosts.txt&ruleset=rset_winhelp'
+       option adb_srcdesc 'broad blocklist for suspicious domains, infrequent updates, approx. 15.000 entries'
+
+config source 'yoyo'
+       option enabled '1'
+       option adb_src 'https://pgl.yoyo.org/adservers/serverlist.php?hostformat=nohtml&showintro=0&mimetype=plaintext&ruleset=rset_yoyo'
+       option adb_srcdesc 'focus on ad related domains, weekly updates, approx. 2.500 entries'
+
+config source 'zeus'
+       option enabled '0'
+       option adb_src 'https://zeustracker.abuse.ch/blocklist.php?download=domainblocklist&ruleset=rset_zeus'
+       option adb_srcdesc 'focus on zeus botnet domains, daily updates, approx. 440 entries'
diff --git a/net/adblock/files/adblock.hotplug b/net/adblock/files/adblock.hotplug
new file mode 100644 (file)
index 0000000..0aa6196
--- /dev/null
@@ -0,0 +1,21 @@
+#!/bin/sh
+#
+
+adb_pid="${$}"
+adb_pidfile="/var/run/adblock.pid"
+adb_logger="/usr/bin/logger"
+
+if [ -f "${adb_pidfile}" ] || [ "${ACTION}" != "ifup" ]
+then
+    exit 0
+fi
+
+. /lib/functions/network.sh
+network_find_wan adb_wanif4
+network_find_wan6 adb_wanif6
+
+if [ "${INTERFACE}" = "${adb_wanif4}" ] || [ "${INTERFACE}" = "${adb_wanif6}" ]
+then
+    /etc/init.d/adblock start
+    "${adb_logger}" -t "adblock[${adb_pid}] info " "adblock service started due to '${ACTION}' of '${INTERFACE}' interface"
+fi
diff --git a/net/adblock/files/adblock.init b/net/adblock/files/adblock.init
new file mode 100755 (executable)
index 0000000..47b11dd
--- /dev/null
@@ -0,0 +1,71 @@
+#!/bin/sh /etc/rc.common
+#
+
+START=99
+
+exec 2>/dev/null
+adb_pid="${$}"
+adb_script="/usr/bin/adblock-update.sh"
+adb_pidfile="/var/run/adblock.pid"
+adb_logger="/usr/bin/logger"
+
+if [ -t 1 ]
+then
+    log_parm="-s"
+    unset bg_parm
+else
+    unset log_parm
+    bg_parm="&"
+fi
+
+if [ -r "${adb_pidfile}" ]
+then
+    "${adb_logger}" ${log_parm} -t "adblock[${adb_pid}] error" "adblock service already running ($(cat ${adb_pidfile})" 2>&1
+    exit 255
+fi
+
+boot()
+{
+    return 0
+}
+
+start()
+{
+    eval "${adb_script}" ${bg_parm}
+    return 0
+}
+
+restart()
+{
+    stop
+    start
+}
+
+reload()
+{
+    stop
+    start
+}
+
+stop()
+{
+    rm_done="$(find "/tmp/dnsmasq.d" -maxdepth 1 -type f -name "adb_list.*" -print -exec rm -f "{}" \;)"
+    rc=${?}
+    if [ $((rc)) -eq 0 ] && [ -n "${rm_done}" ]
+    then
+        /etc/init.d/dnsmasq restart
+        /etc/init.d/firewall restart
+    fi
+
+    uhttpd_pid="$(ps | grep "[u]httpd.*\-h /www/adblock" | awk '{print $1}')"
+    if [ -n "${uhttpd_pid}" ]
+    then
+        kill -9 "${uhttpd_pid}"
+    fi
+
+    if [ -n "${rm_done}" ] || [ -n "${uhttpd_pid}" ]
+    then
+        "${adb_logger}" ${log_parm} -t "adblock[${adb_pid}] info " "all adblock related services stopped" 2>&1
+    fi
+    return 0
+}
index 8b137891791fe96927ad78e64b0aad7bded08bdc..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1 +0,0 @@
-
diff --git a/net/adblock/files/samples/adblock.conf.sample b/net/adblock/files/samples/adblock.conf.sample
deleted file mode 100644 (file)
index 7f7a1d7..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-# adblock configuration, for further information
-# please read /etc/adblock/samples/adblock.conf.sample
-# and /etc/adblock/README.md
-#
-
-# generic options (always required)
-#
-config adblock "global"
-       # ip address of the local adblock interface/uhttpd instance,
-       # needs to be a different subnet from the normal LAN
-       option adb_ip "192.168.2.1"
-
-       # name of an "always accessible" domain,
-       # this domain will be used for the final nslookup check
-       option adb_domain "heise.de"
-
-       # full path to static domain blacklist file (one domain per line)
-       # wildcards or regex expressions are not allowed
-       option adb_blacklist "/etc/adblock/adblock.blacklist"
-
-       # full path to static domain whitelist file (one domain per line)
-       # wildcards or regex expressions are not allowed
-       option adb_whitelist "/etc/adblock/adblock.whitelist"
-
-# list of wan devices that are allowed for adblock updates (check /sys/class/net/<dev>),
-# if no one found the last adlist backup will be restored,
-# useful only for (mobile) multiwan setups
-# disabled by default
-config service "wancheck"
-       option enabled "0"
-       list adb_wanlist "wan"
-
-# check that ntp has adjusted the system time on this device,
-# will be used for logfile writing and logfile housekeeping
-# disabled by default
-config service "ntpcheck"
-       option enabled "0"
-
-# full path to backup directory for adlist backups
-# disabled by default
-config service "backup"
-       option enabled "0"
-       option adb_backupdir "/tmp"
-
-# full path to debug logfile
-# by default adblock logs to syslog and stdout only
-# disabled by default
-config service "debuglog"
-       option enabled "0"
-       option adb_logfile "/tmp/adb_debug.log"
-
-# full path to domain query logfile
-# a background task will trace every dns request to file, to easily identify free and already blocked domains,
-# for this to work, you've to enable the dnsmasq option "logqueries" too.
-# the "queryhistory" option deletes query logfiles older than n days (req. busybox find with mtime support)
-# disabled by default
-config service "querylog"
-       option enabled "0"
-       option adb_queryfile "/tmp/adb_query.log"
-       option adb_queryhistory "1"
-
-# different adblock list sources
-# please do not change the urls listed below, 
-# enable/disable sources as needed
-# for shallalist you can also enable/disable different ad categories
-config source "adaway"
-       option enabled "0"
-       option adb_src_adaway "https://adaway.org/hosts.txt&ruleset=rset_adaway"
-
-config source "disconnect"
-       option enabled "0"
-       option adb_src_disconnect "https://s3.amazonaws.com/lists.disconnect.me/simple_malvertising.txt&ruleset=rset_disconnect"
-
-config source "dshield"
-       option enabled "0"
-       option adb_src_dshield "http://www.dshield.org/feeds/suspiciousdomains_Low.txt&ruleset=rset_dshield"
-
-config source "feodo"
-       option enabled "0"
-       option adb_src_feodo "https://feodotracker.abuse.ch/blocklist/?download=domainblocklist&ruleset=rset_feodo"
-
-config source "malware"
-       option enabled "0"
-       option adb_src_malware "http://mirror1.malwaredomains.com/files/justdomains&ruleset=rset_malware"
-
-config source "palevo"
-       option enabled "0"
-       option adb_src_palevo "https://palevotracker.abuse.ch/blocklists.php?download=domainblocklist&ruleset=rset_palevo"
-
-config source "shalla"
-       option enabled "0"
-       option adb_arc_shalla "http://www.shallalist.de/Downloads/shallalist.tar.gz"
-       list adb_catlist "adv"
-       list adb_catlist "costtraps"
-       list adb_catlist "spyware"
-       list adb_catlist "tracker"
-       list adb_catlist "warez"
-
-config source "spam404"
-       option enabled "0"
-       option adb_src_spam404 "http://spam404bl.com/spam404scamlist.txt&ruleset=rset_spam404"
-
-config source "whocares"
-       option enabled "0"
-       option adb_src_whocares "http://someonewhocares.org/hosts/hosts&ruleset=rset_whocares"
-
-config source "winhelp"
-       option enabled "0"
-       option adb_src_winhelp "http://winhelp2002.mvps.org/hosts.txt&ruleset=rset_winhelp"
-
-config source "yoyo"
-       option enabled "1"
-       option adb_src_yoyo "http://pgl.yoyo.org/adservers/serverlist.php?hostformat=one-line&showintro=0&mimetype=plaintext&ruleset=rset_yoyo"
-
-config source "zeus"
-       option enabled "0"
-       option adb_src_zeus "https://zeustracker.abuse.ch/blocklist.php?download=domainblocklist&ruleset=rset_zeus"
diff --git a/net/adblock/files/samples/dhcp.config.sample b/net/adblock/files/samples/dhcp.config.sample
deleted file mode 100644 (file)
index 40de7d4..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-# tweaks for dnsmasq
-# configuration found in /etc/config/dhcp
-#
-config dnsmasq
-    option cachesize '1000'
-    option filterwin2k '0'
-    option logqueries '1'
diff --git a/net/adblock/files/samples/dnsmasq.conf.sample b/net/adblock/files/samples/dnsmasq.conf.sample
deleted file mode 100644 (file)
index d92adc8..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-# tell DHCP clients to not ask for proxy information
-# some clients - like Win7 - will constantly ask if not told "No!"
-# configuration found in /etc/dnsmasq
-#
-dhcp-option=252,"\n"
diff --git a/net/adblock/files/samples/firewall.user.sample b/net/adblock/files/samples/firewall.user.sample
deleted file mode 100644 (file)
index 823c014..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-# redirect/force all dns queries to port 53 of your router
-# configuration found in /etc/firewall.user
-#
-iptables -t nat -I PREROUTING -p tcp --dport 53 -j REDIRECT --to-ports 53
-iptables -t nat -I PREROUTING -p udp --dport 53 -j REDIRECT --to-ports 53
diff --git a/net/adblock/files/samples/rc.local.sample b/net/adblock/files/samples/rc.local.sample
deleted file mode 100644 (file)
index 890779e..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-# sample startup script
-# configuration found in /etc/rc.local
-#
-
-# start logging
-#
-/usr/bin/logger -t rc.local "start rc.local processing"
-
-# set home directory
-#
-export HOME=/root
-
-# resize /tmp partition to 256 MB
-#
-/usr/bin/logger -t rc.local "resize /tmp partition to 256 MB"
-mount tmpfs /tmp -t tmpfs -o remount,nosuid,nodev,noatime,size=256M
-
-# start adblock script
-#
-/usr/bin/logger -t rc.local "start adblock script"
-/usr/bin/adblock-update.sh >/dev/null 2>&1
-
-# write log and exit
-#
-/usr/bin/logger -t rc.local "finish rc.local processing"
-exit 0
diff --git a/net/adblock/files/samples/root.crontab.sample b/net/adblock/files/samples/root.crontab.sample
deleted file mode 100644 (file)
index bc7bde7..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-# sample crontab script
-# configuration found in /etc/crontabs/root
-#
-
-# start adblock script twice a day
-#
-0 06 * * *    /usr/bin/adblock-update.sh &
-0 22 * * *    /usr/bin/adblock-update.sh &
diff --git a/net/adblock/files/samples/uhttpd.config.sample b/net/adblock/files/samples/uhttpd.config.sample
deleted file mode 100644 (file)
index b6dad66..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-# main uhttpd instance listens only to internal LAN
-#
-    config uhttpd 'main'
-            list listen_http '192.168.1.1:80'
diff --git a/net/adblock/files/www/adblock/adblock.html b/net/adblock/files/www/adblock/adblock.html
deleted file mode 100644 (file)
index cc8d213..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-<html>
-    <head></head>
-    <body>
-       <img src="/adblock.png" border=0 alt=""></img>
-    </body>
-</html>
index cc8d21357f8db35e2ff07fcb9280b7bb0c9ace9a..29cdf586e85e07bdc5828dd53dab5112ab7b46c1 100644 (file)
@@ -1,6 +1,6 @@
 <html>
-    <head></head>
+    <head><meta charset="utf-8"></head>
     <body>
-       <img src="/adblock.png" border=0 alt=""></img>
+        <img src="/adblock.png" border="0" alt=""></img>
     </body>
 </html>
index f5de16377ecb97331207924373fcfe8853990a33..f65be874e171e506a8a95295c0613af7cd1d94d8 100644 (file)
@@ -15,8 +15,7 @@ PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>
 PKG_LICENSE:=Apache License
 
 PKG_SOURCE:=$(PKG_SOURCE_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=http://mirrors.ibiblio.org/apache/httpd/ \
-               http://apache.imsam.info/httpd/
+PKG_SOURCE_URL:=@APACHE/httpd/
 PKG_MD5SUM:=6c10e15835ab214464228a9beb7afba8
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_NAME)-$(PKG_VERSION)
diff --git a/net/arp-scan/Makefile b/net/arp-scan/Makefile
new file mode 100644 (file)
index 0000000..78e8412
--- /dev/null
@@ -0,0 +1,47 @@
+#
+# Copyright (C) 2016 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=arp-scan
+PKG_VERSION:=1.9-40-g69b2f70
+PKG_RELEASE:=1
+PKG_LICENSE:=GPL-3.0
+PKG_MAINTAINER:=Sergey Urushkin <urusha.v1.0@gmail.com>
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/royhills/arp-scan.git
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE_VERSION:=69b2f70588565385f3a61d9b1f100f01747cd5e1
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+
+PKG_FIXUP:=autoreconf
+
+PKG_BUILD_PARALLEL:=1
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/arp-scan
+  SECTION:=net
+  CATEGORY:=Network
+  TITLE:=ARP scanner
+  DEPENDS:=+libpcap
+  URL:=https://github.com/royhills/arp-scan
+  PKG_MAINTAINER:=Sergey Urushkin <urusha.v1.0@gmail.com>
+endef
+
+define Package/arp-scan/description
+    ARP scanner
+endef
+
+define Package/arp-scan/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/arp-scan $(1)/usr/bin/
+endef
+
+$(eval $(call BuildPackage,arp-scan))
diff --git a/net/arp-scan/patches/001-cross_compile.patch b/net/arp-scan/patches/001-cross_compile.patch
new file mode 100644 (file)
index 0000000..aa7f53e
--- /dev/null
@@ -0,0 +1,10 @@
+--- a/acinclude.m4     2016-02-19 15:21:01.000000000 +0300
++++ b/acinclude.m4     2016-02-19 17:18:50.480874343 +0300
+@@ -211,7 +211,6 @@
+ LONG_LONG_INT_FORMAT=''
+ case $pgac_cv_snprintf_long_long_int_format in
+-  cross) AC_MSG_RESULT([cannot test (not on host machine)]);;
+   ?*)    AC_MSG_RESULT([$pgac_cv_snprintf_long_long_int_format])
+          LONG_LONG_INT_FORMAT=$pgac_cv_snprintf_long_long_int_format;;
+   *)     AC_MSG_RESULT(none);;
diff --git a/net/bind/Config.in b/net/bind/Config.in
new file mode 100644 (file)
index 0000000..f0d4847
--- /dev/null
@@ -0,0 +1,17 @@
+if PACKAGE_bind-server
+
+config BIND_ENABLE_FILTER_AAAA
+       bool
+       default n
+       prompt "Enable filtering of AAAA records returned to the client"
+       help
+               BIND 9 has an option to filter AAAA (IPv6 address) records
+               returned to the client based on the transport used for the
+               query, and other filtering conditions. This filtering does
+               not affect the recursive queries made by the server (if
+               any) as a result of the client request.
+
+               Additional details are available at
+               https://kb.isc.org/article/AA-00576/0/Filter-AAAA-option-in-BIND-9-.html
+
+endif
index be4fc836c0624aa8f6824d9ef4ee76cf35af5a6d..711b564b089fdd2013a42916998131eeaa4635f6 100644 (file)
@@ -9,8 +9,8 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=bind
-PKG_VERSION:=9.9.7-P3
-PKG_RELEASE:=1
+PKG_VERSION:=9.9.8-P4
+PKG_RELEASE:=3
 USERID:=bind=57:bind=57
 
 PKG_MAINTAINER := Noah Meyerhans <frodo@morgul.net>
@@ -20,14 +20,16 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:= \
        ftp://ftp.isc.org/isc/bind9/$(PKG_VERSION) \
        http://www.mirrorservice.org/sites/ftp.isc.org/isc/bind9/$(PKG_VERSION)
-PKG_MD5SUM:=022a8aca9ca51e1027d77094094eecfd
+PKG_MD5SUM:=5e401f6cf024f596044d733ceb0d6415
 
 PKG_FIXUP:=autoreconf
 PKG_REMOVE_FILES:=aclocal.m4 libtool.m4
 
 PKG_INSTALL:=1
 
-PKG_CONFIG_DEPENDS := CONFIG_OPENSSL_WITH_EC
+PKG_CONFIG_DEPENDS := \
+       CONFIG_OPENSSL_WITH_EC \
+       CONFIG_BIND_ENABLE_FILTER_AAAA
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -53,6 +55,10 @@ define Package/bind-server
   TITLE+= DNS server
 endef
 
+define Package/bind-server/config
+       source "$(SOURCE)/Config.in"
+endef
+
 define Package/bind-client
   $(call Package/bind/Default)
   TITLE+= dynamic DNS client
@@ -105,6 +111,11 @@ CONFIGURE_ARGS += \
        --with-ecdsa=$(if $(CONFIG_OPENSSL_WITH_EC),yes,no) \
        --with-readline=no
 
+ifdef CONFIG_BIND_ENABLE_FILTER_AAAA
+       CONFIGURE_ARGS += \
+               --enable-filter-aaaa
+endif
+
 CONFIGURE_VARS += \
        BUILD_CC="$(TARGET_CC)" \
 
index 0eb52af7a538b39691f9da212101129dd3b42d5a..f0b79d2af39435154908c1658cc263acd0648eb9 100644 (file)
@@ -1,45 +1,90 @@
-
-; <<>> DiG 9.2.3 <<>> ns . @a.root-servers.net.
-;; global options:  printcmd
-;; Got answer:
-;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 18944
-;; flags: qr aa rd; QUERY: 1, ANSWER: 13, AUTHORITY: 0, ADDITIONAL: 13
-
-;; QUESTION SECTION:
-;.                             IN      NS
-
-;; ANSWER SECTION:
-.                      518400  IN      NS      A.ROOT-SERVERS.NET.
-.                      518400  IN      NS      B.ROOT-SERVERS.NET.
-.                      518400  IN      NS      C.ROOT-SERVERS.NET.
-.                      518400  IN      NS      D.ROOT-SERVERS.NET.
-.                      518400  IN      NS      E.ROOT-SERVERS.NET.
-.                      518400  IN      NS      F.ROOT-SERVERS.NET.
-.                      518400  IN      NS      G.ROOT-SERVERS.NET.
-.                      518400  IN      NS      H.ROOT-SERVERS.NET.
-.                      518400  IN      NS      I.ROOT-SERVERS.NET.
-.                      518400  IN      NS      J.ROOT-SERVERS.NET.
-.                      518400  IN      NS      K.ROOT-SERVERS.NET.
-.                      518400  IN      NS      L.ROOT-SERVERS.NET.
-.                      518400  IN      NS      M.ROOT-SERVERS.NET.
-
-;; ADDITIONAL SECTION:
-A.ROOT-SERVERS.NET.    3600000 IN      A       198.41.0.4
-B.ROOT-SERVERS.NET.    3600000 IN      A       192.228.79.201
-C.ROOT-SERVERS.NET.    3600000 IN      A       192.33.4.12
-D.ROOT-SERVERS.NET.    3600000 IN      A       128.8.10.90
-E.ROOT-SERVERS.NET.    3600000 IN      A       192.203.230.10
-F.ROOT-SERVERS.NET.    3600000 IN      A       192.5.5.241
-G.ROOT-SERVERS.NET.    3600000 IN      A       192.112.36.4
-H.ROOT-SERVERS.NET.    3600000 IN      A       128.63.2.53
-I.ROOT-SERVERS.NET.    3600000 IN      A       192.36.148.17
-J.ROOT-SERVERS.NET.    3600000 IN      A       192.58.128.30
-K.ROOT-SERVERS.NET.    3600000 IN      A       193.0.14.129
-L.ROOT-SERVERS.NET.    3600000 IN      A       199.7.83.42
-M.ROOT-SERVERS.NET.    3600000 IN      A       202.12.27.33
-
-;; Query time: 81 msec
-;; SERVER: 198.41.0.4#53(a.root-servers.net.)
-;; WHEN: Sun Feb  1 11:27:14 2004
-;; MSG SIZE  rcvd: 436
-
+;       This file holds the information on root name servers needed to
+;       initialize cache of Internet domain name servers
+;       (e.g. reference this file in the "cache  .  <file>"
+;       configuration file of BIND domain name servers).
+;
+;       This file is made available by InterNIC 
+;       under anonymous FTP as
+;           file                /domain/named.cache
+;           on server           FTP.INTERNIC.NET
+;       -OR-                    RS.INTERNIC.NET
+;
+;       last update:    February 17, 2016
+;       related version of root zone:   2016021701
+;
+; formerly NS.INTERNIC.NET
+;
+.                        3600000      NS    A.ROOT-SERVERS.NET.
+A.ROOT-SERVERS.NET.      3600000      A     198.41.0.4
+A.ROOT-SERVERS.NET.      3600000      AAAA  2001:503:ba3e::2:30
+;
+; FORMERLY NS1.ISI.EDU
+;
+.                        3600000      NS    B.ROOT-SERVERS.NET.
+B.ROOT-SERVERS.NET.      3600000      A     192.228.79.201
+B.ROOT-SERVERS.NET.      3600000      AAAA  2001:500:84::b
+;
+; FORMERLY C.PSI.NET
+;
+.                        3600000      NS    C.ROOT-SERVERS.NET.
+C.ROOT-SERVERS.NET.      3600000      A     192.33.4.12
+C.ROOT-SERVERS.NET.      3600000      AAAA  2001:500:2::c
+;
+; FORMERLY TERP.UMD.EDU
+;
+.                        3600000      NS    D.ROOT-SERVERS.NET.
+D.ROOT-SERVERS.NET.      3600000      A     199.7.91.13
+D.ROOT-SERVERS.NET.      3600000      AAAA  2001:500:2d::d
+;
+; FORMERLY NS.NASA.GOV
+;
+.                        3600000      NS    E.ROOT-SERVERS.NET.
+E.ROOT-SERVERS.NET.      3600000      A     192.203.230.10
+;
+; FORMERLY NS.ISC.ORG
+;
+.                        3600000      NS    F.ROOT-SERVERS.NET.
+F.ROOT-SERVERS.NET.      3600000      A     192.5.5.241
+F.ROOT-SERVERS.NET.      3600000      AAAA  2001:500:2f::f
+;
+; FORMERLY NS.NIC.DDN.MIL
+;
+.                        3600000      NS    G.ROOT-SERVERS.NET.
+G.ROOT-SERVERS.NET.      3600000      A     192.112.36.4
+;
+; FORMERLY AOS.ARL.ARMY.MIL
+;
+.                        3600000      NS    H.ROOT-SERVERS.NET.
+H.ROOT-SERVERS.NET.      3600000      A     198.97.190.53
+H.ROOT-SERVERS.NET.      3600000      AAAA  2001:500:1::53
+;
+; FORMERLY NIC.NORDU.NET
+;
+.                        3600000      NS    I.ROOT-SERVERS.NET.
+I.ROOT-SERVERS.NET.      3600000      A     192.36.148.17
+I.ROOT-SERVERS.NET.      3600000      AAAA  2001:7fe::53
+;
+; OPERATED BY VERISIGN, INC.
+;
+.                        3600000      NS    J.ROOT-SERVERS.NET.
+J.ROOT-SERVERS.NET.      3600000      A     192.58.128.30
+J.ROOT-SERVERS.NET.      3600000      AAAA  2001:503:c27::2:30
+;
+; OPERATED BY RIPE NCC
+;
+.                        3600000      NS    K.ROOT-SERVERS.NET.
+K.ROOT-SERVERS.NET.      3600000      A     193.0.14.129
+K.ROOT-SERVERS.NET.      3600000      AAAA  2001:7fd::1
+;
+; OPERATED BY ICANN
+;
+.                        3600000      NS    L.ROOT-SERVERS.NET.
+L.ROOT-SERVERS.NET.      3600000      A     199.7.83.42
+L.ROOT-SERVERS.NET.      3600000      AAAA  2001:500:3::42
+;
+; OPERATED BY WIDE
+;
+.                        3600000      NS    M.ROOT-SERVERS.NET.
+M.ROOT-SERVERS.NET.      3600000      A     202.12.27.33
+M.ROOT-SERVERS.NET.      3600000      AAAA  2001:dc3::35
+; End of file
index 2ef7797ba0018ac7c4fca9fb765615255b13ebd9..b7876d9e1d8c9bb74583b2d61df01bb05e499dfb 100644 (file)
@@ -13,7 +13,6 @@ pid_file=/var/run/named/named.pid
 logdir=/var/log/named/
 cachedir=/var/cache/bind
 libdir=/var/lib/bind
-config_file=/etc/bind/named.conf
 
 fix_perms() {
     for dir in $libdir $logdir $cachedir; do
index d0bf9ba59ab42347c189da4c0840f6e52c53fdf2..dd2f6b6b149cacff6c54aabd070dd8c2ebd38e9d 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=chrony
-PKG_VERSION:=2.2
-PKG_RELEASE:=2
+PKG_VERSION:=2.3
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://download.tuxfamily.org/chrony/
-PKG_MD5SUM:=17bc77d3d2ce942675f9600b60452717
+PKG_MD5SUM:=db6d46afea66f75dcc362f44623c1af4
 
 PKG_MAINTAINER:=Miroslav Lichvar <mlichvar0@gmail.com>
 PKG_LICENSE:=GPL-2.0
diff --git a/net/cifs-utils/Makefile b/net/cifs-utils/Makefile
new file mode 100644 (file)
index 0000000..87b8a30
--- /dev/null
@@ -0,0 +1,44 @@
+#
+# Copyright (C) 2007-2012 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:=cifs-utils
+PKG_VERSION:=6.4
+PKG_RELEASE:=1
+
+PKG_SOURCE_URL:=http://ftp.samba.org/pub/linux-cifs/cifs-utils
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_MD5SUM:=b7d75b67fd3987952896d27256c7293d
+
+PKG_MAINTAINER:=Florian Fainelli <florian@openwrt.org>
+PKG_LICENSE:=GPL-3.0
+PKG_LICENSE_FILES:=COPYING
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/cifsmount
+  SECTION:=net
+  CATEGORY:=Network
+  TITLE:=CIFS mount utilities
+  URL:=http://wiki.samba.org/index.php/LinuxCIFS_utils
+endef
+
+TARGET_CFLAGS += -Wno-error
+
+CONFIGURE_ARGS += \
+       --exec-prefix=/usr \
+       --prefix=/ \
+       --with-libcap-ng=no \
+       --with-libcap=no
+
+define Package/cifsmount/install
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/mount.cifs $(1)/usr/sbin/
+endef
+
+$(eval $(call BuildPackage,cifsmount))
diff --git a/net/cifs-utils/patches/001-fix-musl-build.patch b/net/cifs-utils/patches/001-fix-musl-build.patch
new file mode 100644 (file)
index 0000000..e34d4f1
--- /dev/null
@@ -0,0 +1,30 @@
+From 6603cef0f06c450196a1bca06bb143d8fcda5651 Mon Sep 17 00:00:00 2001
+From: Felix Janda <felix.janda@posteo.de>
+Date: Fri, 5 Dec 2014 23:19:29 +0100
+Subject: [PATCH 1/1] mtab.c: include <paths.h> for _PATH_MOUNTED
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Backported from: 6603cef0f06c450196a1bca06bb143d8fcda5651
+
+Signed-off-by: Felix Janda <felix.janda@posteo.de>
+Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
+---
+ mtab.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/mtab.c b/mtab.c
+index 7b365b3..a662a3c 100644
+--- a/mtab.c
++++ b/mtab.c
+@@ -38,6 +38,7 @@
+ #include <mntent.h>
+ #include <stdlib.h>
+ #include <signal.h>
++#include <paths.h>
+ #include "mount.h"
+ #include "config.h"
+-- 
+2.5.0
index 6aa98373d38ec8090e2b8e0350cce1c3b7497137..ab8ca1f0e1f769f3597a33d0d932ff245efe3de4 100644 (file)
@@ -9,6 +9,9 @@ config chilli
     # name of TUN device name. required.
     option tundev 'tun0'
 
+    # name of network interface
+    option network ''
+
     # Include this flag if process is to run in the foreground
     #option fg
 
index 32b41dc5f7bfc266a990575fe35daf0b363295f9..1805450f96fa1abacea16eb849f7c705edce148f 100755 (executable)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2008-2015 OpenWrt.org
+# Copyright (C) 2008-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 #
@@ -9,10 +9,10 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=ddns-scripts
 # Version == major.minor.patch
 # increase on new functionality (minor) or patches (patch)
-PKG_VERSION:=2.5.0
+PKG_VERSION:=2.6.4
 # Release == build
 # increase on changes of services files or tld_names.dat
-PKG_RELEASE:=3
+PKG_RELEASE:=1
 
 PKG_LICENSE:=GPL-2.0
 PKG_MAINTAINER:=Christian Schoenebeck <christian.schoenebeck@gmail.com>
@@ -50,21 +50,19 @@ define Package/$(PKG_NAME)/config
                  - Proxy server support
                  - log file support
                  - support to run once
-               .
                Version: $(PKG_VERSION)-$(PKG_RELEASE)
                Info   : http://wiki.openwrt.org/doc/howto/ddns.client
-               .
                $(PKG_MAINTAINER)
 endef
 
 ##### **********************************
 define Package/$(PKG_NAME)_cloudflare
     $(call Package/$(PKG_NAME)/Default)
-    TITLE:=DDNS extension for CloudFlare
+    TITLE:=DDNS extension for CloudFlare.com
     DEPENDS:=$(PKG_NAME)
 endef
 define Package/$(PKG_NAME)_cloudflare/description
-    Dynamic DNS Client scripts extension for CloudFlare
+    Dynamic DNS Client scripts extension for CloudFlare.com
 endef
 
 ##### **********************************
@@ -88,10 +86,10 @@ define Package/$(PKG_NAME)_nsupdate/description
 endef
 define Package/$(PKG_NAME)_nsupdate/config
     help
-       The script directly updates a PowerDNS (or maybe bind server) via nsupdate 
-       from bind-client package. It requires 
+       The script directly updates a PowerDNS (or maybe bind server) via nsupdate
+       from bind-client package. It requires
        "option dns_server" to be set to the server to be used by nsupdate.
-       "option username" should be set to the key name and 
+       "option username" should be set to the key name and
        "option password" to the base64 encoded shared secret.
 
 endef
@@ -164,33 +162,35 @@ endef
 ##### **********************************
 define Package/$(PKG_NAME)_cloudflare/install
        $(INSTALL_DIR) $(1)/usr/lib/ddns
-       $(INSTALL_BIN)  $(PKG_BUILD_DIR)/files/update_CloudFlare.sh $(1)/usr/lib/ddns
+       $(INSTALL_BIN)  $(PKG_BUILD_DIR)/files/update_cloudflare_com.sh $(1)/usr/lib/ddns
        $(INSTALL_DATA) $(PKG_BUILD_DIR)/files/tld_names.dat.gz $(1)/usr/lib/ddns
 endef
 define Package/$(PKG_NAME)_cloudflare/postinst
        #!/bin/sh
-       echo -e '"CloudFlare"\t"update_CloudFlare.sh"' >> $${IPKG_INSTROOT}/usr/lib/ddns/services
-       echo -e '"CloudFlare"\t"update_CloudFlare.sh"' >> $${IPKG_INSTROOT}/usr/lib/ddns/services_ipv6
+       echo -e '"cloudflare.com"\t"update_cloudflare_com.sh"' >> $${IPKG_INSTROOT}/usr/lib/ddns/services
+       echo -e '"cloudflare.com"\t"update_cloudflare_com.sh"' >> $${IPKG_INSTROOT}/usr/lib/ddns/services_ipv6
+       /bin/sed -i '/service_name/s/CloudFlare/cloudflare\.com/g' $${IPKG_INSTROOT}/etc/config/ddns
 endef
 define Package/$(PKG_NAME)_cloudflare/prerm
        #!/bin/sh
-       /bin/sed -i '/update_CloudFlare\.sh/ d' $${IPKG_INSTROOT}/usr/lib/ddns/services
-       /bin/sed -i '/update_CloudFlare\.sh/ d' $${IPKG_INSTROOT}/usr/lib/ddns/services_ipv6
+       /bin/sed -i '/update_cloudflare_com\.sh/ d' $${IPKG_INSTROOT}/usr/lib/ddns/services
+       /bin/sed -i '/update_cloudflare_com\.sh/ d' $${IPKG_INSTROOT}/usr/lib/ddns/services_ipv6
 endef
 
 ##### **********************************
 define Package/$(PKG_NAME)_no-ip_com/install
        $(INSTALL_DIR) $(1)/usr/lib/ddns
-       $(INSTALL_BIN)  $(PKG_BUILD_DIR)/files/update_No-IP.com.sh $(1)/usr/lib/ddns
+       $(INSTALL_BIN)  $(PKG_BUILD_DIR)/files/update_no-ip_com.sh $(1)/usr/lib/ddns
 endef
 define Package/$(PKG_NAME)_no-ip_com/postinst
        #!/bin/sh
-       echo -e '"No-IP.com"\t"update_No-IP.com.sh"' >> $${IPKG_INSTROOT}/usr/lib/ddns/services
-       echo -e '"NoIP.com"\t"update_No-IP.com.sh"' >> $${IPKG_INSTROOT}/usr/lib/ddns/services
+       echo -e '"no-ip.com"\t"update_no-ip_com.sh"' >> $${IPKG_INSTROOT}/usr/lib/ddns/services
+       /bin/sed -i '/service_name/s/NoIP\.com/no-ip\.com/g'  $${IPKG_INSTROOT}/etc/config/ddns
+       /bin/sed -i '/service_name/s/No-IP\.com/no-ip\.com/g' $${IPKG_INSTROOT}/etc/config/ddns
 endef
 define Package/$(PKG_NAME)_no-ip_com/prerm
        #!/bin/sh
-       /bin/sed -i '/update_No-IP\.com\.sh/ d' $${IPKG_INSTROOT}/usr/lib/ddns/services
+       /bin/sed -i '/update_no-ip_com\.sh/ d' $${IPKG_INSTROOT}/usr/lib/ddns/services
 endef
 
 ##### **********************************
@@ -200,8 +200,9 @@ define Package/$(PKG_NAME)_nsupdate/install
 endef
 define Package/$(PKG_NAME)_nsupdate/postinst
        #!/bin/sh
-       echo -e '"Bind-nsupdate"\t"update_nsupdate.sh"' >> $${IPKG_INSTROOT}/usr/lib/ddns/services
-       echo -e '"Bind-nsupdate"\t"update_nsupdate.sh"' >> $${IPKG_INSTROOT}/usr/lib/ddns/services_ipv6
+       echo -e '"bind-nsupdate"\t"update_nsupdate.sh"' >> $${IPKG_INSTROOT}/usr/lib/ddns/services
+       echo -e '"bind-nsupdate"\t"update_nsupdate.sh"' >> $${IPKG_INSTROOT}/usr/lib/ddns/services_ipv6
+       /bin/sed -i '/service_name/s/Bind-nsupdate/bind-nsupdate/g' $${IPKG_INSTROOT}/etc/config/ddns
 endef
 define Package/$(PKG_NAME)_nsupdate/prerm
        #!/bin/sh
index 05eda79c4dc7707126db0c945ffd6a209e64cae8..8ba3da58641c02a7c2cc0d0c3f795c6b10a9d5ed 100644 (file)
@@ -10,7 +10,7 @@ config ddns "global"
 
 
 config service "myddns_ipv4"
-       option service_name     "dyndns.com"
+       option service_name     "dyndns.org"
        option lookup_host      "yourhost.example.com"
        option domain           "yourhost.example.com"
        option username         "your_username"
index 951b41b49b620f952833b101d6b081422860a556..525719b59328e9157711d6ede207a4fef4553a69 100755 (executable)
@@ -1,20 +1,12 @@
 #!/bin/sh
 # /usr/lib/ddns/dynamic_dns_functions.sh
 #
-# Original written by Eric Paul Bishop, January 2008
 #.Distributed under the terms of the GNU General Public License (GPL) version 2.0
+# Original written by Eric Paul Bishop, January 2008
 # (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 by
-#.Christian Schoenebeck <christian dot schoenebeck at gmail dot com>
-# to support:
-# - IPv6 DDNS services
-# - setting DNS Server to retrieve current IP including TCP transport
-# - Proxy Server to send out updates or retrieving WEB based IP detection
-# - force_interval=0 to run once (useful 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 and partial rewritten
+#.2014-2016 Christian Schoenebeck <christian dot schoenebeck at gmail dot com>
 #
 # function timeout
 # copied from http://www.ict.griffith.edu.au/anthony/software/timeout.sh
@@ -29,7 +21,7 @@
 . /lib/functions/network.sh
 
 # GLOBAL VARIABLES #
-VERSION="2.5.0-1"
+VERSION="2.6.4-1"
 SECTION_ID=""          # hold config's section name
 VERBOSE_MODE=1         # default mode is log to console, but easily changed with parameter
 
@@ -467,12 +459,12 @@ verify_host_port() {
        __IPV6=$(echo $__HOST | grep -m 1 -o "$IPV6_REGEX")
        # if FQDN given get IP address
        [ -z "$__IPV4" -a -z "$__IPV6" ] && {
-               if [ -x /usr/bin/host ]; then   # use BIND host if installed
+               if [ -n "$(which host)" ]; then # use BIND host if installed
                        __PROG="BIND host"
-                       __RUNPROG="/usr/bin/host -t ANY $__HOST >$DATFILE 2>$ERRFILE"
+                       __RUNPROG="$(which host) -t ANY $__HOST >$DATFILE 2>$ERRFILE"
                else    # use BusyBox nslookup
                        __PROG="BusyBox nslookup"
-                       __RUNPROG="/usr/bin/nslookup $__HOST >$DATFILE 2>$ERRFILE"
+                       __RUNPROG="$(which nslookup) $__HOST >$DATFILE 2>$ERRFILE"
                fi
                write_log 7 "#> $__RUNPROG"
                eval $__RUNPROG
@@ -643,9 +635,8 @@ do_transfer() {
        [ $# -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
-       grep -i "\+ssl" /usr/bin/wget >/dev/null 2>&1   # check for Wget with SSL support
-       if [ $? -eq 0 -a $USE_CURL -eq 0 ]; then        # except global option use_curl is set to "1"
-               __PROG="/usr/bin/wget -nv -t 1 -O $DATFILE -o $ERRFILE" # non_verbose no_retry outfile errfile
+       if [ -n "$(which wget-ssl)" -a $USE_CURL -eq 0 ]; then                  # except global option use_curl is set to "1"
+               __PROG="$(which wget-ssl) -nv -t 1 -O $DATFILE -o $ERRFILE"     # non_verbose no_retry outfile errfile
                # force network/ip to use for communication
                if [ -n "$bind_network" ]; then
                        local __BINDIP
@@ -668,7 +659,7 @@ do_transfer() {
                                __PROG="$__PROG --ca-certificate=${cacert}"
                        elif [ -d "$cacert" ]; then
                                __PROG="$__PROG --ca-directory=${cacert}"
-                       else    # exit here because it makes no sense to start loop
+                       elif [ -n "$cacert" ]; then             # it's not a file and not a directory but given
                                write_log 14 "No valid certificate(s) found at '$cacert' for HTTPS communication"
                        fi
                fi
@@ -679,9 +670,13 @@ do_transfer() {
                __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 -RsS -o $DATFILE --stderr $ERRFILE"
+       # libcurl might be compiled without Proxy or HTTPS Support
+       elif [ -n "$(which curl)" ]; then
+               __PROG="$(which curl) -RsS -o $DATFILE --stderr $ERRFILE"
+               # check HTTPS support
+               /usr/bin/curl -V | grep "Protocols:" | grep -F "https" >/dev/null 2>&1
+               [ $? -eq 1 -a $use_https -eq 1 ] && \
+                       write_log 13 "cURL: libcurl compiled without https support"
                # force network/interface-device to use for communication
                if [ -n "$bind_network" ]; then
                        local __DEVICE
@@ -702,7 +697,7 @@ do_transfer() {
                                __PROG="$__PROG --cacert $cacert"
                        elif [ -d "$cacert" ]; then
                                __PROG="$__PROG --capath $cacert"
-                       else    # exit here because it makes no sense to start loop
+                       elif [ -n "$cacert" ]; then             # it's not a file and not a directory but given
                                write_log 14 "No valid certificate(s) found at '$cacert' for HTTPS communication"
                        fi
                fi
@@ -720,9 +715,37 @@ do_transfer() {
                __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 -q -O $DATFILE"
+       # uclient-fetch possibly with ssl support if /lib/libustream-ssl.so installed
+       elif [ -n "$(which uclient-fetch)" ]; then
+               __PROG="$(which uclient-fetch) -q -O $DATFILE"
+               # force network/ip not supported
+               [ -n "$__BINDIP" ] && \
+                       write_log 14 "uclient-fetch: FORCE binding to specific address not supported"
+               # force ip version to use
+               if [ $force_ipversion -eq 1 ]; then
+                       [ $use_ipv6 -eq 0 ] && __PROG="$__PROG -4" || __PROG="$__PROG -6"       # force IPv4/IPv6
+               fi
+               # https possibly not supported
+               [ $use_https -eq 1 -a ! -f /lib/libustream-ssl.so ] && \
+                       write_log 14 "uclient-fetch: no HTTPS support! Additional install one of ustream-ssl packages"
+               # proxy support
+               [ -z "$proxy" ] && __PROG="$__PROG -Y off" || __PROG="$__PROG -Y on"
+               # https & certificates
+               if [ $use_https -eq 1 ]; then
+                       if [ "$cacert" = "IGNORE" ]; then
+                               __PROG="$__PROG --no-check-certificate"
+                       elif [ -f "$cacert" ]; then
+                               __PROG="$__PROG --ca-certificate=$cacert"
+                       elif [ -n "$cacert" ]; then             # it's not a file; nothing else supported
+                               write_log 14 "No valid certificate file '$cacert' for HTTPS communication"
+                       fi
+               fi
+               __RUNPROG="$__PROG '$__URL' 2>$ERRFILE"         # build final command
+               __PROG="uclient-fetch"                          # reuse for error logging
+
+       # Busybox Wget or any other wget in search $PATH (did not support neither IPv6 nor HTTPS)
+       elif [ -n "$(which wget)" ]; then
+               __PROG="$(which wget) -q -O $DATFILE"
                # force network/ip not supported
                [ -n "$__BINDIP" ] && \
                        write_log 14 "BusyBox Wget: FORCE binding to specific address not supported"
@@ -739,7 +762,7 @@ do_transfer() {
                __PROG="Busybox Wget"                           # reuse for error logging
 
        else
-               write_log 13 "Neither 'Wget' nor 'cURL' installed or executable"
+               write_log 13 "Neither 'Wget' nor 'cURL' nor 'uclient-fetch' installed or executable"
        fi
 
        while : ; do
@@ -851,7 +874,7 @@ get_local_ip () {
                                                )
                                        else
                                                __DATA=$(awk '
-                                                       /inet6/ && /: [0-9a-eA-E]/ && !/\/128/ {        # Filter IPv6 exclude fxxx and /128 prefix
+                                                       /inet6/ && /: [0-9a-eA-E]/ {    # Filter IPv6 exclude fxxx
                                                        #   inet6 addr: 2001:db8::xxxx:xxxx/32 Scope:Global
                                                        FS="/";         # separator "/"
                                                        $0=$0;          # reread to activate separator
@@ -927,7 +950,8 @@ get_registered_ip() {
        # $2    (optional) if set, do not retry on error
        local __CNT=0   # error counter
        local __ERR=255
-       local __REGEX  __PROG  __RUNPROG  __DATA
+       local __REGEX  __PROG  __RUNPROG  __DATA  __IP
+       local __MUSL=$(nslookup localhost 2>&1 | grep -qF "(null)"; echo $?) # 0 == busybox compiled with musl "(null)" found
        # return codes
        # 1     no IP detected
 
@@ -937,8 +961,8 @@ get_registered_ip() {
        # set correct regular expression
        [ $use_ipv6 -eq 0 ] && __REGEX="$IPV4_REGEX" || __REGEX="$IPV6_REGEX"
 
-       if [ -x /usr/bin/host ]; then
-               __PROG="/usr/bin/host"
+       if [ -n "$(which host)" ]; then
+               __PROG="$(which 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"
@@ -947,11 +971,37 @@ get_registered_ip() {
 
                __RUNPROG="$__PROG $lookup_host $dns_server >$DATFILE 2>$ERRFILE"
                __PROG="BIND host"
-       elif [ -x /usr/bin/nslookup ]; then     # last use BusyBox nslookup
+       elif [ -n "$(which hostip)" ]; then     # hostip package installed
+               __PROG="$(which hostip)"
+               [ $force_dnstcp -ne 0 ] && \
+                       write_log 14 "hostip - no support for 'DNS over TCP'"
+
+               # is IP given as dns_server ?
+               __IP=$(echo $dns_server | grep -m 1 -o "$IPV4_REGEX")
+               [ -z "$__IP" ] && __IP=$(echo $dns_server | grep -m 1 -o "$IPV6_REGEX")
+
+               # we got NO ip for dns_server, so build command
+               [ -z "$__IP" -a -n "$dns_server" ] && {
+                       __IP="\`/usr/bin/hostip"
+                       [ $use_ipv6 -eq 1 -a $force_ipversion -eq 1 ] && __IP="$__IP -6"
+                       __IP="$__IP $dns_server | grep -m 1 -o"
+                       [ $use_ipv6 -eq 1 -a $force_ipversion -eq 1 ] \
+                               && __IP="$__IP '$IPV6_REGEX'" \
+                               || __IP="$__IP '$IPV4_REGEX'"
+                       __IP="$__IP \`"
+               }
+
+               [ $use_ipv6 -eq 1 ] && __PROG="$__PROG -6"
+               [ -n "$dns_server" ] && __PROG="$__PROG -r $__IP"
+               __RUNPROG="$__PROG $lookup_host >$DATFILE 2>$ERRFILE"
+               __PROG="hostip"
+       elif [ -n "$(which nslookup)" ]; then   # last use BusyBox nslookup
                [ $force_ipversion -ne 0 -o $force_dnstcp -ne 0 ] && \
                        write_log 14 "Busybox nslookup - no support to 'force IP Version' or 'DNS over TCP'"
+               [ $__MUSL -eq 0 -a -n "$dns_server" ] && \
+                       write_log 14 "Busybox compiled with musl - nslookup - no support to set/use DNS Server"
 
-               __RUNPROG="/usr/bin/nslookup $lookup_host $dns_server >$DATFILE 2>$ERRFILE"
+               __RUNPROG="$(which nslookup) $lookup_host $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"
@@ -967,6 +1017,8 @@ get_registered_ip() {
                else
                        if [ "$__PROG" = "BIND host" ]; then
                                __DATA=$(cat $DATFILE | awk -F "address " '/has/ {print $2; exit}' )
+                       elif [ "$__PROG" = "hostip" ]; then
+                               __DATA=$(cat $DATFILE | grep -m 1 -o "$__REGEX")
                        else
                                __DATA=$(cat $DATFILE | sed -ne "/^Name:/,\$ { s/^Address[0-9 ]\{0,\}: \($__REGEX\).*$/\\1/p }" )
                        fi
@@ -1107,7 +1159,7 @@ split_FQDN() {
 
        # the leftover parameters are the HOST/SUBDOMAIN
        while [ -n "$1" ]; do
-               _HOST="$1 $HOST"                # remember we need to invert
+               _HOST="$1 $_HOST"               # remember we need to invert
                shift
        done
        _HOST=$(echo $_HOST | tr " " ".")       # insert DOT
@@ -1124,3 +1176,68 @@ split_FQDN() {
        eval "$4=''"            # clear HOST/SUBDOMAIN
        return 1
 }
+
+expand_ipv6() {
+       # Original written for bash by
+       # Author:  Florian Streibelt <florian@f-streibelt.de>
+       # Date:    08.04.2012
+       # License: Public Domain, but please be fair and
+       #          attribute the original author(s) and provide
+       #          a link to the original source for corrections:
+       #.         https://github.com/mutax/IPv6-Address-checks
+
+       # $1    IPv6 t0 expand
+       # $2    name of variable to store expanded IPv6
+       [ $# -ne 2 ] && write_log 12 "Error calling 'expand_ipv6()' - wrong number of parameters"
+
+       INPUT="$(echo "$1" | tr 'A-F' 'a-f')"
+       [ "$INPUT" = "::" ] && INPUT="::0"      # special case ::
+
+       O=""
+
+       while [ "$O" != "$INPUT" ]; do
+               O="$INPUT"
+
+               # fill all words with zeroes
+               INPUT=$( echo "$INPUT" | sed    -e 's|:\([0-9a-f]\{3\}\):|:0\1:|g' \
+                                               -e 's|:\([0-9a-f]\{3\}\)$|:0\1|g' \
+                                               -e 's|^\([0-9a-f]\{3\}\):|0\1:|g' \
+                                               -e 's|:\([0-9a-f]\{2\}\):|:00\1:|g' \
+                                               -e 's|:\([0-9a-f]\{2\}\)$|:00\1|g' \
+                                               -e 's|^\([0-9a-f]\{2\}\):|00\1:|g' \
+                                               -e 's|:\([0-9a-f]\):|:000\1:|g' \
+                                               -e 's|:\([0-9a-f]\)$|:000\1|g' \
+                                               -e 's|^\([0-9a-f]\):|000\1:|g' )
+
+       done
+
+       # now expand the ::
+       ZEROES=""
+
+       echo "$INPUT" | grep -qs "::"
+       if [ "$?" -eq 0 ]; then
+               GRPS="$( echo "$INPUT" | sed  's|[0-9a-f]||g' | wc -m )"
+               GRPS=$(( GRPS-1 ))              # remove carriage return
+               MISSING=$(( 8-GRPS ))
+               while [ $MISSING -gt 0 ]; do
+                       ZEROES="$ZEROES:0000"
+                       MISSING=$(( MISSING-1 ))
+               done
+
+               # be careful where to place the :
+               INPUT=$( echo "$INPUT" | sed    -e 's|\(.\)::\(.\)|\1'$ZEROES':\2|g' \
+                                               -e 's|\(.\)::$|\1'$ZEROES':0000|g' \
+                                               -e 's|^::\(.\)|'$ZEROES':0000:\1|g;s|^:||g' )
+       fi
+
+       # an expanded address has 39 chars + CR
+       if [ $(echo $INPUT | wc -m) != 40 ]; then
+               write_log 4 "Error in 'expand_ipv6()' - invalid IPv6 found: '$1' expanded: '$INPUT'"
+               eval "$2='invalid'"
+               return 1
+       fi
+
+       # echo the fully expanded version of the address
+       eval "$2=$INPUT"
+       return 0
+}
index e58f978551205d0dc0c87acb25fe58d4d16bed6f..3bf661bb36bfaf584bfb90e01aa0061a45a7d8d0 100755 (executable)
@@ -2,13 +2,8 @@
 # /usr/lib/ddns/luci_dns_helper.sh
 #
 #.Distributed under the terms of the GNU General Public License (GPL) version 2.0
-#
-# Written in August 2014 by
-#.Christian Schoenebeck <christian dot schoenebeck at gmail dot com>
+#.2014-2016 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
index 9acb9c4e418909997ae82a3dcdd08831f175e6da..02a61dfe90205a900c9bddb6050337c19aaff1be 100755 (executable)
@@ -1,21 +1,12 @@
 #!/bin/sh
 # /usr/lib/ddns/dynamic_dns_updater.sh
 #
-# Original written by Eric Paul Bishop, January 2008
 #.Distributed under the terms of the GNU General Public License (GPL) version 2.0
+# Original written by Eric Paul Bishop, January 2008
 # (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 by
-#.Christian Schoenebeck <christian dot schoenebeck at gmail dot com>
-# to support:
-# - IPv6 DDNS services
-# - DNS Server to retrieve registered IP including TCP transport (Ticket 7820)
-# - Proxy Server to send out updates
-# - 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
-# - wait for interface to fully come up, before the first update is done
+# extended and partial rewritten
+#.2014-2016 Christian Schoenebeck <christian dot schoenebeck at gmail dot com>
 #
 # variables in small chars are read from /etc/config/ddns
 # variables in big chars are defined inside these scripts as global vars
@@ -274,12 +265,15 @@ get_registered_ip REGISTERED_IP "NO_RETRY"
 ERR_LAST=$?
 #     No error    or     No IP set      otherwise retry
 [ $ERR_LAST -eq 0 -o $ERR_LAST -eq 127 ] || get_registered_ip REGISTERED_IP
+# on IPv6 we use expanded version to be shure when comparing
+[ $use_ipv6 -eq 1 ] && expand_ipv6 "$REGISTERED_IP" REGISTERED_IP
 
 # loop endlessly, checking ip every check_interval and forcing an updating once every force_interval
 write_log 6 "Starting main loop at $(eval $DATE_PROG)"
 while : ; do
 
        get_local_ip LOCAL_IP           # read local IP
+       [ $use_ipv6 -eq 1 ] && expand_ipv6 "$LOCAL_IP" LOCAL_IP # on IPv6 we use expanded version
 
        # prepare update
        # never updated or forced immediate then NEXT_TIME = 0
@@ -335,6 +329,7 @@ while : ; do
 
        REGISTERED_IP=""                # clear variable
        get_registered_ip REGISTERED_IP # get registered/public IP
+       [ $use_ipv6 -eq 1 ] && expand_ipv6 "$REGISTERED_IP" REGISTERED_IP       # on IPv6 we use expanded version
 
        # IP's are still different
        if [ "$LOCAL_IP" != "$REGISTERED_IP" ]; then
index f2e2b3cf86abbf7099a315bc5991a2ef80c55357..d62032d6c00defc7a7bbb0d00c44e53529266c14 100644 (file)
 # !!! Use only the script name (without path). Sample:
 # !!! "example.com"    "update_sample.sh"
 #
+# !!! Since ddns-scripts Version 2.5.x additional parameters are supported
+# !!! and a given answer on success is checked (ignored by earlier versions)
+# !!! Additional parameters: [PARAMOPT] and [PARAMENC]; [PARAMENC] is send urlencoded
+#
+# Line syntax: "service" [TAB] "update_url" [TAB] "answer"
+# "service"    name used as "option service_name" inside /etc/config/ddns
+# "update_url" update url as given by the provider; custom urls should not saved here
+# "answer"     single words inside providers answer string; use "|" to combine "or"
+#
 # 44444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444
 
 "dyndns.org"           "http://[USERNAME]:[PASSWORD]@members.dyndns.org/nic/update?hostname=[DOMAIN]&myip=[IP]"
@@ -37,7 +46,7 @@
 "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]"      "good|nochg"
 
 # DNSdynamic.org
 "dnsdynamic.org"       "http://[USERNAME]:[PASSWORD]@www.dnsdynamic.org/api/?hostname=[DOMAIN]&myip=[IP]"
 # OVH
 "ovh.com"      "http://[USERNAME]:[PASSWORD]@www.ovh.com/nic/update?system=dyndns&hostname=[DOMAIN]&myip=[IP]"
 
-# dns-o-matic is a free service by opendns.com for updating multiple hosts and
-# dynamic dns services in one api call. To update all your configured services
-# at once, use "all.dnsomatic.com as the hostname.
-"dnsomatic.com"        "http://[USERNAME]:[PASSWORD]@updates.dnsomatic.com/nic/update?hostname=[DOMAIN]&myip=[IP]"
+# dns-o-matic is a free service by opendns.com for updating multiple hosts
+"dnsomatic.com"        "http://[USERNAME]:[PASSWORD]@updates.dnsomatic.com/nic/update?hostname=[DOMAIN]&myip=[IP]"     "good|nochg"
 
 # 3322.org
 "3322.org"     "http://[USERNAME]:[PASSWORD]@members.3322.org/dyndns/update?system=dyndns&hostname=[DOMAIN]&myip=[IP]"
@@ -69,7 +76,7 @@
 "mythic-beasts.com"    "http://dnsapi4.mythic-beasts.com/?domain=[USERNAME]&password=[PASSWORD]&command=REPLACE%20[DOMAIN]%2060%20A%20DYNAMIC_IP"
 
 # Securepoint Dynamic-DNS-Service      (http://www.spdns.de)
-"spdns.de"     "http://[USERNAME]:[PASSWORD]@update.spdns.de/nic/update?hostname=[DOMAIN]&myip=[IP]"       "good|nochg"
+"spdns.de"     "http://[USERNAME]:[PASSWORD]@update.spdns.de/nic/update?hostname=[DOMAIN]&myip=[IP]"   "good|nochg"
 
 # duiadns.net - free dynamic DNS
 "duiadns.net"  "http://ipv4.duia.ro/dynamic.duia?host=[DOMAIN]&password=[PASSWORD]&ip4=[IP]"
@@ -84,7 +91,7 @@
 "loopia.se"    "http://[USERNAME]:[PASSWORD]@dns.loopia.se/XDynDNSServer/XDynDNS.php?system=custom&hostname=[DOMAIN]&myip=[IP]"
 
 # SelfHost.de
-"selfhost.de"  "http://carol.selfhost.de/update?username=[USERNAME]&password=[PASSWORD]&myip=[IP]&hostname=1"      "good|nochg"
+"selfhost.de"  "http://carol.selfhost.de/update?username=[USERNAME]&password=[PASSWORD]&myip=[IP]&hostname=1"  "good|nochg"
 
 # 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]"
 "domains.google.com"   "http://[USERNAME]:[PASSWORD]@domains.google.com/nic/update?hostname=[DOMAIN]&myip=[IP]"
 
 # Schokokeks Hosting, schokokeks.org
-"schokokeks.org"       "http://[USERNAME]:[PASSWORD]@dyndns.schokokeks.org/nic/update?myip=[IP]"
+"schokokeks.org"       "http://[USERNAME]:[PASSWORD]@dyndns.schokokeks.org/nic/update?myip=[IP]"       "good|nochg"
 
 # STRATO AG
 "strato.de"            "http://[USERNAME]:[PASSWORD]@dyndns.strato.com/nic/update?hostname=[DOMAIN]&myip=[IP]"
 
 # Variomedia AG
-"variomedia.de"        "http://[USERNAME]:[PASSWORD]@dyndns.variomedia.de/nic/update?hostname=[DOMAIN]&myip=[IP]"
+"variomedia.de"        "http://[USERNAME]:[PASSWORD]@dyndns.variomedia.de/nic/update?hostname=[DOMAIN]&myip=[IP]"      "good|nochg"
 
- #DtDNS
+DtDNS
 "dtdns.com"    "http://www.dtdns.com/api/autodns.cfm?id=[DOMAIN]&pw=[PASSWORD]&ip=[IP]"
 
-# dy.fi Dynamic DNS for finnish users
-"dy.fi"      "http://[USERNAME]:[PASSWORD]@www.dy.fi/nic/update?hostname=[DOMAIN]"
+# dy.fi Dynamic DNS for finnish users (IP autodetected by provider)
+"dy.fi"                "http://[USERNAME]:[PASSWORD]@www.dy.fi/nic/update?hostname=[DOMAIN]"   "good|nochg"
+
+# duckdns.org
+"duckdns.org"  "http://www.duckdns.org/update?domains=[USERNAME]&token=[PASSWORD]&ip=[IP]"     "OK"
+
+# zzzz.io Free Dynamic DNS
+"zzzz.io"      "https://zzzz.io/api/v1/update/[DOMAIN]/?token=[PASSWORD]&ip=[IP]"      "Updated|No change"
+
+# dynu.com
+"dynu.com"  "http://api.dynu.com/nic/update?hostname=[DOMAIN]&myip=[IP]&username=[USERNAME]&password=[PASSWORD]"
+
+# nubem.com
+"nubem.com"    "http://[USERNAME]:[PASSWORD]@nubem.com/nic/update?hostname=[DOMAIN]&myip=[IP]"
+
+# nettica.com
+"nettica.com"  "http://www.nettica.com/Domain/Update.aspx?U=[USERNAME]&PC=[PASSWORD]&FQDN=[DOMAIN]&N=[IP]"
+
+# zerigo.com
+"zerigo.com"   "http://update.zerigo.com/dynamic?host=[DOMAIN]&ip=[IP]&user=[USERNAME]&password=[PASSWORD]"
+
+# regfish.de
+"regfish.de"   "http://dyndns.regfish.de/?fqdn=[DOMAIN]&forcehost=1&authtype=secure&token=[PASSWORD]&ipv4=[IP]"        "success|100|101"
index df3c897bf5f06ae0ae77969f92062ea171ba9451..b6e5997f93c55cfcfefd203d1dc47edf7b9a2300 100644 (file)
 # !!! Use only the script name (without path). Sample:
 # !!! "example.com"    "update_sample.sh"
 #
+# !!! Since ddns-scripts Version 2.5.x additional parameters are supported
+# !!! and a given answer on success is checked (ignored by earlier versions)
+# !!! Additional parameters: [PARAMOPT] and [PARAMENC]; [PARAMENC] is send urlencoded
+#
+# Line syntax: "service" [TAB] "update_url" [TAB] "answer"
+# "service"    name used as "option service_name" inside /etc/config/ddns
+# "update_url" update url as given by the provider; custom urls should not saved here
+# "answer"     words inside providers answer string; use "|" to combine "or"
+#
 # 66666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666
 
 # IPv6 @ Securepoint Dynamic-DNS-Service
-"spdns.de"     "http://[USERNAME]:[PASSWORD]@update.spdns.de/nic/update?hostname=[DOMAIN]&myip=[IP]"       "good|nochg"
+"spdns.de"     "http://[USERNAME]:[PASSWORD]@update.spdns.de/nic/update?hostname=[DOMAIN]&myip=[IP]"   "good|nochg"
 
 # IPv6 @ 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]"      "good|nochg"
 
 # IPv6 @ MyDNS.JP
 "mydns.jp"     "http://www.mydns.jp/directip.html?MID=[USERNAME]&PWD=[PASSWORD]&IPV6ADDR=[IP]"
 "freedns.afraid.org"   "http://freedns.afraid.org/dynamic/update.php?[PASSWORD]&address=[IP]"
 
 # IPv6 @ LoopiaDNS
-"loopia.se" "http://[USERNAME]:[PASSWORD]@dns.loopia.se/XDynDNSServer/XDynDNS.php?system=custom&hostname=[DOMAIN]&myip=[IP]"
+"loopia.se"    "http://[USERNAME]:[PASSWORD]@dns.loopia.se/XDynDNSServer/XDynDNS.php?system=custom&hostname=[DOMAIN]&myip=[IP]"
 
 # Variomedia AG
-"variomedia.de"        "http://[USERNAME]:[PASSWORD]@dyndns.variomedia.de/nic/update?hostname=[DOMAIN]&myip=[IP]"
+"variomedia.de"                "http://[USERNAME]:[PASSWORD]@dyndns.variomedia.de/nic/update?hostname=[DOMAIN]&myip=[IP]"      "good|nochg"
+
+# IPv6 @ Dyn.com
+"dyndns.org"           "http://[USERNAME]:[PASSWORD]@members.dyndns.org/nic/update?hostname=[DOMAIN]&myip=[IP]"
+
+# IPv6 @ zzzz.io Free Dynamic DNS
+"zzzz.io"      "https://zzzz.io/api/v1/update/[DOMAIN]/?token=[PASSWORD]&type=aaaa&ip=[IP]"    "Updated|No change"
+
+# IPv6 @ zerigo.com
+"zerigo.com"   "http://update.zerigo.com/dynamic?host=[DOMAIN]&ip=[IP]&user=[USERNAME]&password=[PASSWORD]"
+
+# IPv6 @ regfish.de
+"regfish.de"   "http://dyndns.regfish.de/?fqdn=[DOMAIN]&forcehost=1&authtype=secure&token=[PASSWORD]&ipv6=[IP]"        "success|100|101"
 
index 08b05fcb2fefe09ddd0d26a6142277e43adb7e8d..5925141222d9aa9a2eb37b0fe85ca0f936d91cde 100644 (file)
@@ -89,7 +89,6 @@ leasing.aero
 logistics.aero
 magazine.aero
 maintenance.aero
-marketplace.aero
 media.aero
 microlight.aero
 modelling.aero
@@ -112,7 +111,6 @@ show.aero
 skydiving.aero
 software.aero
 student.aero
-taxi.aero
 trader.aero
 trading.aero
 trainer.aero
@@ -155,13 +153,6 @@ org.al
 // am : http://en.wikipedia.org/wiki/.am
 am
 
-// an : http://www.una.an/an_domreg/default.asp
-an
-com.an
-net.an
-org.an
-edu.an
-
 // ao : http://en.wikipedia.org/wiki/.ao
 // http://www.dns.ao/REGISTR.DOC
 ao
@@ -404,7 +395,7 @@ mil.bo
 tv.bo
 
 // br : http://registro.br/dominio/categoria.html
-// Submitted by registry <fneves@registro.br> 2014-08-11
+// Submitted by registry <fneves@registro.br>
 br
 adm.br
 adv.br
@@ -494,7 +485,7 @@ net.bt
 org.bt
 
 // bv : No registrations at this time.
-// Submitted by registry <jarle@uninett.no> 2006-06-16
+// Submitted by registry <jarle@uninett.no>
 bv
 
 // bw : http://en.wikipedia.org/wiki/.bw
@@ -607,7 +598,7 @@ gov.cm
 net.cm
 
 // cn : http://en.wikipedia.org/wiki/.cn
-// Submitted by registry <tanyaling@cnnic.cn> 2008-06-11
+// Submitted by registry <tanyaling@cnnic.cn>
 cn
 ac.cn
 com.cn
@@ -659,7 +650,7 @@ mo.cn
 tw.cn
 
 // co : http://en.wikipedia.org/wiki/.co
-// Submitted by registry <tecnico@uniandes.edu.co> 2008-06-11
+// Submitted by registry <tecnico@uniandes.edu.co>
 co
 arts.co
 com.co
@@ -779,7 +770,7 @@ pol.dz
 art.dz
 
 // ec : http://www.nic.ec/reg/paso1.asp
-// Submitted by registry <vabboud@nic.ec> 2008-07-04
+// Submitted by registry <vabboud@nic.ec>
 ec
 com.ec
 info.ec
@@ -900,7 +891,7 @@ veterinaire.fr
 ga
 
 // gb : This registry is effectively dormant
-// Submitted by registry <Damien.Shaw@ja.net> 2008-06-12
+// Submitted by registry <Damien.Shaw@ja.net>
 gb
 
 // gd : http://en.wikipedia.org/wiki/.gd
@@ -959,7 +950,7 @@ org.gl
 gm
 
 // gn : http://psg.com/dns/gn/gn.txt
-// Submitted by registry <randy@psg.com> 2008-06-17
+// Submitted by registry <randy@psg.com>
 gn
 ac.gn
 com.gn
@@ -984,7 +975,7 @@ asso.gp
 gq
 
 // gr : https://grweb.ics.forth.gr/english/1617-B-2005.html
-// Submitted by registry <segred@ics.forth.gr> 2008-06-09
+// Submitted by registry <segred@ics.forth.gr>
 gr
 com.gr
 edu.gr
@@ -1016,10 +1007,13 @@ gw
 gy
 co.gy
 com.gy
+edu.gy
+gov.gy
 net.gy
+org.gy
 
 // hk : https://www.hkdnr.hk
-// Submitted by registry <hk.tech@hkirc.hk> 2008-06-11
+// Submitted by registry <hk.tech@hkirc.hk>
 hk
 com.hk
 edu.hk
@@ -1162,7 +1156,7 @@ net.il
 org.il
 
 // im : https://www.nic.im/
-// Submitted by registry <info@nic.im> 2013-11-15
+// Submitted by registry <info@nic.im>
 im
 ac.im
 co.im
@@ -1176,7 +1170,7 @@ tv.im
 
 // in : http://en.wikipedia.org/wiki/.in
 // see also: https://registry.in/Policies
-// Please note, that nic.in is not an offical eTLD, but used by most
+// Please note, that nic.in is not an official eTLD, but used by most
 // government institutions.
 in
 co.in
@@ -1645,7 +1639,7 @@ jobs
 
 // jp : http://en.wikipedia.org/wiki/.jp
 // http://jprs.co.jp/en/jpdomain.html
-// Submitted by registry <info@jprs.jp> 2014-10-30
+// Submitted by registry <info@jprs.jp>
 jp
 // jp organizational type names
 ac.jp
@@ -3616,7 +3610,7 @@ mil.kz
 com.kz
 
 // la : http://en.wikipedia.org/wiki/.la
-// Submitted by registry <gavin.brown@nic.la> 2008-06-10
+// Submitted by registry <gavin.brown@nic.la>
 la
 int.la
 net.la
@@ -3628,7 +3622,7 @@ com.la
 org.la
 
 // lb : http://en.wikipedia.org/wiki/.lb
-// Submitted by registry <randy@psg.com> 2008-06-17
+// Submitted by registry <randy@psg.com>
 lb
 com.lb
 edu.lb
@@ -3668,7 +3662,7 @@ hotel.lk
 ac.lk
 
 // lr : http://psg.com/dns/lr/lr.txt
-// Submitted by registry <randy@psg.com> 2008-06-17
+// Submitted by registry <randy@psg.com>
 lr
 com.lr
 edu.lr
@@ -3822,7 +3816,7 @@ net.ms
 org.ms
 
 // mt : https://www.nic.org.mt/go/policy
-// Submitted by registry <help@nic.org.mt> 2013-11-19
+// Submitted by registry <help@nic.org.mt>
 mt
 com.mt
 edu.mt
@@ -4429,7 +4423,7 @@ net.mw
 org.mw
 
 // mx : http://www.nic.mx/
-// Submitted by registry <farias@nic.mx> 2008-06-19
+// Submitted by registry <farias@nic.mx>
 mx
 com.mx
 org.mx
@@ -4498,20 +4492,34 @@ info.nf
 other.nf
 store.nf
 
-// ng : http://psg.com/dns/ng/
+// ng : http://www.nira.org.ng/index.php/join-us/register-ng-domain/189-nira-slds
 ng
 com.ng
 edu.ng
+gov.ng
+i.ng
+mil.ng
+mobi.ng
 name.ng
 net.ng
 org.ng
 sch.ng
-gov.ng
-mil.ng
-mobi.ng
 
-// ni : http://www.nic.ni/dominios.htm
-*.ni
+// ni : http://www.nic.ni/
+com.ni
+gob.ni
+edu.ni
+org.ni
+nom.ni
+net.ni
+mil.ni
+co.ni
+biz.ni
+web.ni
+int.ni
+ac.ni
+in.ni
+info.ni
 
 // nl : http://en.wikipedia.org/wiki/.nl
 // https://www.sidn.nl/
@@ -5465,7 +5473,7 @@ xn--vler-qoa.hedmark.no
 *.np
 
 // nr : http://cenpac.net.nr/dns/index.html
-// Confirmed by registry <technician@cenpac.net.nr> 2008-06-17
+// Submitted by registry <technician@cenpac.net.nr>
 nr
 biz.nr
 info.nr
@@ -5479,7 +5487,7 @@ com.nr
 nu
 
 // nz : http://en.wikipedia.org/wiki/.nz
-// Confirmed by registry <jay@nzrs.net.nz> 2014-05-19
+// Submitted by registry <jay@nzrs.net.nz>
 nz
 ac.nz
 co.nz
@@ -5550,7 +5558,7 @@ edu.pf
 *.pg
 
 // ph : http://www.domains.ph/FAQ2.asp
-// Submitted by registry <jed@email.com.ph> 2008-06-13
+// Submitted by registry <jed@email.com.ph>
 ph
 com.ph
 net.ph
@@ -5579,7 +5587,7 @@ gos.pk
 info.pk
 
 // pl http://www.dns.pl/english/index.html
-// updated by .PL registry on 2015-04-28
+// Submitted by registry
 pl
 com.pl
 net.pl
@@ -5816,15 +5824,19 @@ est.pr
 prof.pr
 ac.pr
 
-// pro : http://www.nic.pro/support_faq.htm
+// pro : http://registry.pro/get-pro
 pro
+aaa.pro
 aca.pro
+acct.pro
+avocat.pro
 bar.pro
 cpa.pro
+eng.pro
 jur.pro
 law.pro
 med.pro
-eng.pro
+recht.pro
 
 // ps : http://en.wikipedia.org/wiki/.ps
 // http://www.nic.ps/registration/policy.html#reg
@@ -5858,7 +5870,7 @@ go.pw
 belau.pw
 
 // py : http://www.nic.py/pautas.html#seccion_9
-// Confirmed by registry 2012-10-03
+// Submitted by registry
 py
 com.py
 coop.py
@@ -5881,32 +5893,32 @@ sch.qa
 
 // re : http://www.afnic.re/obtenir/chartes/nommage-re/annexe-descriptifs
 re
-com.re
 asso.re
+com.re
 nom.re
 
 // ro : http://www.rotld.ro/
 ro
+arts.ro
 com.ro
-org.ro
-tm.ro
-nt.ro
-nom.ro
+firm.ro
 info.ro
+nom.ro
+nt.ro
+org.ro
 rec.ro
-arts.ro
-firm.ro
 store.ro
+tm.ro
 www.ro
 
-// rs : http://en.wikipedia.org/wiki/.rs
+// rs : https://www.rnids.rs/en/domains/national-domains
 rs
+ac.rs
 co.rs
-org.rs
 edu.rs
-ac.rs
 gov.rs
 in.rs
+org.rs
 
 // ru : http://www.cctld.ru/ru/docs/aktiv_8.php
 // Industry domains
@@ -6030,7 +6042,6 @@ kms.ru
 k-uralsk.ru
 kustanai.ru
 kuzbass.ru
-magnitka.ru
 mytis.ru
 nakhodka.ru
 nkz.ru
@@ -6072,7 +6083,7 @@ edu.sa
 sch.sa
 
 // sb : http://www.sbnic.net.sb/
-// Submitted by registry <lee.humphries@telekom.com.sb> 2008-06-08
+// Submitted by registry <lee.humphries@telekom.com.sb>
 sb
 com.sb
 edu.sb
@@ -6089,7 +6100,7 @@ org.sc
 edu.sc
 
 // sd : http://www.isoc.sd/sudanic.isoc.sd/billing_pricing.htm
-// Submitted by registry <admin@isoc.sd> 2008-06-17
+// Submitted by registry <admin@isoc.sd>
 sd
 com.sd
 net.sd
@@ -6101,7 +6112,7 @@ gov.sd
 info.sd
 
 // se : http://en.wikipedia.org/wiki/.se
-// Submitted by registry <patrik.wallstrom@iis.se> 2014-03-18
+// Submitted by registry <patrik.wallstrom@iis.se>
 se
 a.se
 ac.se
@@ -6164,7 +6175,7 @@ mil.sh
 si
 
 // sj : No registrations at this time.
-// Submitted by registry <jarle@uninett.no> 2008-06-16
+// Submitted by registry <jarle@uninett.no>
 sj
 
 // sk : http://en.wikipedia.org/wiki/.sk
@@ -6172,7 +6183,7 @@ sj
 sk
 
 // sl : http://www.nic.sl
-// Submitted by registry <adam@neoip.com> 2008-06-12
+// Submitted by registry <adam@neoip.com>
 sl
 com.sl
 net.sl
@@ -6261,7 +6272,7 @@ org.sv
 red.sv
 
 // sx : http://en.wikipedia.org/wiki/.sx
-// Confirmed by registry <jcvignes@openregistry.com> 2012-05-31
+// Submitted by registry <jcvignes@openregistry.com>
 sx
 gov.sx
 
@@ -6300,7 +6311,7 @@ tf
 tg
 
 // th : http://en.wikipedia.org/wiki/.th
-// Submitted by registry <krit@thains.co.th> 2008-06-17
+// Submitted by registry <krit@thains.co.th>
 th
 ac.th
 co.th
@@ -6371,7 +6382,7 @@ defense.tn
 turen.tn
 
 // to : http://en.wikipedia.org/wiki/.to
-// Submitted by registry <egullich@colo.to> 2008-06-17
+// Submitted by registry <egullich@colo.to>
 to
 com.to
 gov.to
@@ -6380,13 +6391,9 @@ org.to
 edu.to
 mil.to
 
-// tp : No registrations at this time.
-// Submitted by Ryan Sleevi <ryan.sleevi@gmail.com> 2014-01-03
-tp
-
 // subTLDs: https://www.nic.tr/forms/eng/policies.pdf
 // and: https://www.nic.tr/forms/politikalar.pdf
-// Submitted by <mehmetgurevin@gmail.com> 2014-07-19
+// Submitted by <mehmetgurevin@gmail.com>
 tr
 com.tr
 info.tr
@@ -6463,7 +6470,7 @@ xn--uc0atv.tw
 xn--czrw28b.tw
 
 // tz : http://www.tznic.or.tz/index.php/domains
-// Confirmed by registry <manager@tznic.or.tz> 2013-01-22
+// Submitted by registry <manager@tznic.or.tz>
 tz
 ac.tz
 co.tz
@@ -6479,7 +6486,7 @@ sc.tz
 tv.tz
 
 // ua : https://hostmaster.ua/policy/?ua
-// Submitted by registry <dk@cctld.ua> 2012-04-27
+// Submitted by registry <dk@cctld.ua>
 ua
 // ua 2LD
 com.ua
@@ -6822,8 +6829,8 @@ lib.wi.us
 // lib.wv.us Bug 941670 - Removed at request of Larry W Arnold <arnold@wvlc.lib.wv.us>
 lib.wy.us
 // k12.ma.us contains school districts in Massachusetts. The 4LDs are
-// managed indepedently except for private (PVT), charter (CHTR) and
-// parochial (PAROCH) schools. Those are delegated dorectly to the
+// managed independently except for private (PVT), charter (CHTR) and
+// parochial (PAROCH) schools. Those are delegated directly to the
 // 5LD operators. <k12-ma-hostmaster _ at _ rsuc.gweep.net>
 pvt.k12.ma.us
 chtr.k12.ma.us
@@ -6849,7 +6856,7 @@ org.uz
 va
 
 // vc : http://en.wikipedia.org/wiki/.vc
-// Submitted by registry <kshah@ca.afilias.info> 2008-06-13
+// Submitted by registry <kshah@ca.afilias.info>
 vc
 com.vc
 net.vc
@@ -6859,8 +6866,7 @@ mil.vc
 edu.vc
 
 // ve : https://registro.nic.ve/
-// Confirmed by registry 2012-10-04
-// Updated 2014-05-20 - Bug 940478
+// Submitted by registry
 ve
 arts.ve
 co.ve
@@ -7110,7 +7116,7 @@ xn--mgbai9a5eva00b
 xn--ygbi2ammx
 
 // xn--90a3ac ("srb", Cyrillic) : RS
-// http://www.rnids.rs/en/the-.срб-domain
+// https://www.rnids.rs/en/domains/national-domains
 срб
 xn--90a3ac
 пр.срб
@@ -7214,7 +7220,7 @@ xxx
 
 // za : http://www.zadna.org.za/content/page/domain-information
 ac.za
-agrica.za
+agric.za
 alt.za
 co.za
 edu.za
@@ -7238,7 +7244,7 @@ web.za
 *.zw
 
 
-// List of new gTLDs imported from https://newgtlds.icann.org/newgtlds.csv on 2015-10-11T22:21:58Z
+// List of new gTLDs imported from https://newgtlds.icann.org/newgtlds.csv on 2016-01-04T22:39:54Z
 
 // aaa : 2015-02-26 American Automobile Association, Inc.
 aaa
@@ -7411,6 +7417,9 @@ apple
 // aquarelle : 2014-07-24 Aquarelle.com
 aquarelle
 
+// arab : 2015-11-12 League of Arab States
+arab
+
 // aramco : 2014-11-20 Aramco Services Company
 aramco
 
@@ -7507,6 +7516,9 @@ barefoot
 // bargains : 2013-11-14 Half Hallow, LLC
 bargains
 
+// baseball : 2015-10-29 MLB Advanced Media DH, LLC
+baseball
+
 // basketball : 2015-08-20 Fédération Internationale de Basketball (FIBA)
 basketball
 
@@ -7534,6 +7546,9 @@ bcn
 // beats : 2015-05-14 Beats Electronics, LLC
 beats
 
+// beauty : 2015-12-03 L'Oréal
+beauty
+
 // beer : 2014-01-09 Top Level Domain Holdings Limited
 beer
 
@@ -7639,12 +7654,18 @@ bosch
 // bostik : 2015-05-28 Bostik SA
 bostik
 
+// boston : 2015-12-10 Boston Globe Media Partners, LLC
+boston
+
 // bot : 2014-12-18 Amazon EU S.à r.l.
 bot
 
 // boutique : 2013-11-14 Over Galley, LLC
 boutique
 
+// box : 2015-11-12 NS1 Limited
+box
+
 // bradesco : 2014-12-18 Banco Bradesco S.A.
 bradesco
 
@@ -7765,6 +7786,9 @@ casino
 // catering : 2013-12-05 New Falls. LLC
 catering
 
+// catholic : 2015-10-21 Pontificium Consilium de Comunicationibus Socialibus (PCCS) (Pontifical Council for Social Communication)
+catholic
+
 // cba : 2014-06-26 COMMONWEALTH BANK OF AUSTRALIA
 cba
 
@@ -7972,6 +7996,9 @@ crown
 // crs : 2014-04-03 Federated Co-operatives Limited
 crs
 
+// cruise : 2015-12-10 Viking River Cruises (Bermuda) Ltd.
+cruise
+
 // cruises : 2013-12-05 Spring Way, LLC
 cruises
 
@@ -8083,6 +8110,9 @@ discover
 // dish : 2015-07-30 Dish DBS Corporation
 dish
 
+// diy : 2015-11-05 Lifestyle Domain Holdings, Inc.
+diy
+
 // dnp : 2013-12-13 Dai Nippon Printing Co., Ltd.
 dnp
 
@@ -8365,6 +8395,9 @@ foundation
 // fox : 2015-09-11 FOX Registry, LLC
 fox
 
+// free : 2015-12-10 Amazon EU S.à r.l.
+free
+
 // fresenius : 2015-07-30 Fresenius Immobilien-Verwaltungs-GmbH
 fresenius
 
@@ -8554,6 +8587,9 @@ guitars
 // guru : 2013-08-27 Pioneer Cypress, LLC
 guru
 
+// hair : 2015-12-03 L'Oréal
+hair
+
 // hamburg : 2014-02-20 Hamburg Top-Level-Domain GmbH
 hamburg
 
@@ -8602,7 +8638,7 @@ hisamitsu
 // hitachi : 2014-10-31 Hitachi, Ltd.
 hitachi
 
-// hiv : 2014-03-13 dotHIV gemeinnuetziger e.V.
+// hiv : 2014-03-13
 hiv
 
 // hkt : 2015-05-14 PCCW-HKT DataCom Services Limited
@@ -9349,6 +9385,9 @@ ninja
 // nissan : 2014-03-27 NISSAN MOTOR CO., LTD.
 nissan
 
+// nissay : 2015-10-29 Nippon Life Insurance Company
+nissay
+
 // nokia : 2015-01-08 Nokia Corporation
 nokia
 
@@ -9604,7 +9643,7 @@ prof
 // progressive : 2015-07-23 Progressive Casualty Insurance Company
 progressive
 
-// promo : 2014-12-18 Play.PROMO Oy
+// promo : 2014-12-18
 promo
 
 // properties : 2013-12-05 Big Pass, LLC
@@ -9625,6 +9664,9 @@ prudential
 // pub : 2013-12-12 United TLD Holdco Ltd.
 pub
 
+// pwc : 2015-10-29 PricewaterhouseCoopers LLP
+pwc
+
 // qpon : 2013-11-14 dotCOOL, Inc.
 qpon
 
@@ -9736,6 +9778,9 @@ rio
 // rip : 2014-07-10 United TLD Holdco Ltd.
 rip
 
+// rmit : 2015-11-19 Royal Melbourne Institute of Technology
+rmit
+
 // rocher : 2014-12-18 Ferrero Trading Lux S.A.
 rocher
 
@@ -10288,6 +10333,9 @@ ubs
 // uconnect : 2015-07-30 FCA US LLC.
 uconnect
 
+// unicom : 2015-10-15 China United Network Communications Corporation Limited
+unicom
+
 // university : 2014-03-06 Little Station, LLC
 university
 
@@ -10375,6 +10423,9 @@ vodka
 // volkswagen : 2015-05-14 Volkswagen Group of America Inc.
 volkswagen
 
+// volvo : 2015-11-12 Volvo Holding Sverige Aktiebolag
+volvo
+
 // vote : 2013-11-21 Monolith Registry LLC
 vote
 
@@ -10583,6 +10634,10 @@ xn--6qq986b3xl
 москва
 xn--80adxhks
 
+// xn--80aqecdr1a : 2015-10-21 Pontificium Consilium de Comunicationibus Socialibus (PCCS) (Pontifical Council for Social Communication)
+католик
+xn--80aqecdr1a
+
 // xn--80asehdb : 2013-07-14 CORE Association
 онлайн
 xn--80asehdb
@@ -10763,6 +10818,10 @@ xn--mgbb9fbpob
 ابوظبي
 xn--mgbca7dzdo
 
+// xn--mgbi4ecexp : 2015-10-21 Pontificium Consilium de Comunicationibus Socialibus (PCCS) (Pontifical Council for Social Communication)
+كاثوليك
+xn--mgbi4ecexp
+
 // xn--mgbt3dhd : 2014-09-04 Asia Green IT System Bilgisayar San. ve Tic. Ltd. Sti.
 همراه
 xn--mgbt3dhd
@@ -10783,6 +10842,10 @@ xn--ngbc5azd
 بيتك
 xn--ngbe9e0a
 
+// xn--ngbrx : 2015-11-12 League of Arab States
+عرب
+xn--ngbrx
+
 // xn--nqv7f : 2013-11-14 Public Interest Registry
 机构
 xn--nqv7f
@@ -10835,6 +10898,10 @@ xn--t60b56a
 コム
 xn--tckwe
 
+// xn--tiq49xqyj : 2015-10-21 Pontificium Consilium de Comunicationibus Socialibus (PCCS) (Pontifical Council for Social Communication)
+天主教
+xn--tiq49xqyj
+
 // xn--unup4y : 2013-07-14 Spring Fields, LLC
 游戏
 xn--unup4y
@@ -10934,20 +11001,21 @@ zuerich
 // (Note: these are in alphabetical order by company name)
 
 // Amazon CloudFront : https://aws.amazon.com/cloudfront/
-// Submitted by Donavan Miller <donavanm@amazon.com> 2013-03-22
+// Submitted by Donavan Miller <donavanm@amazon.com>
 cloudfront.net
 
 // Amazon Elastic Compute Cloud: https://aws.amazon.com/ec2/
-// Submitted by Osman Surkatty <osmans@amazon.com> 2014-12-16
+// Submitted by Luke Wells <lawells@amazon.com>
 ap-northeast-1.compute.amazonaws.com
+ap-northeast-2.compute.amazonaws.com
 ap-southeast-1.compute.amazonaws.com
 ap-southeast-2.compute.amazonaws.com
 cn-north-1.compute.amazonaws.cn
+compute-1.amazonaws.com
 compute.amazonaws.cn
 compute.amazonaws.com
-compute-1.amazonaws.com
-eu-west-1.compute.amazonaws.com
 eu-central-1.compute.amazonaws.com
+eu-west-1.compute.amazonaws.com
 sa-east-1.compute.amazonaws.com
 us-east-1.amazonaws.com
 us-gov-west-1.compute.amazonaws.com
@@ -10957,37 +11025,39 @@ z-1.compute-1.amazonaws.com
 z-2.compute-1.amazonaws.com
 
 // Amazon Elastic Beanstalk : https://aws.amazon.com/elasticbeanstalk/
-// Submitted by Adam Stein <astein@amazon.com> 2013-04-02
+// Submitted by Adam Stein <astein@amazon.com>
 elasticbeanstalk.com
 
 // Amazon Elastic Load Balancing : https://aws.amazon.com/elasticloadbalancing/
-// Submitted by Scott Vidmar <svidmar@amazon.com> 2013-03-27
+// Submitted by Scott Vidmar <svidmar@amazon.com>
 elb.amazonaws.com
 
 // Amazon S3 : https://aws.amazon.com/s3/
-// Submitted by Eric Kinolik <kilo@amazon.com> 2015-04-08
+// Submitted by Luke Wells <lawells@amazon.com>
 s3.amazonaws.com
 s3-ap-northeast-1.amazonaws.com
+s3-ap-northeast-2.amazonaws.com
 s3-ap-southeast-1.amazonaws.com
 s3-ap-southeast-2.amazonaws.com
+s3-eu-central-1.amazonaws.com
+s3-eu-west-1.amazonaws.com
 s3-external-1.amazonaws.com
 s3-external-2.amazonaws.com
 s3-fips-us-gov-west-1.amazonaws.com
-s3-eu-central-1.amazonaws.com
-s3-eu-west-1.amazonaws.com
 s3-sa-east-1.amazonaws.com
 s3-us-gov-west-1.amazonaws.com
 s3-us-west-1.amazonaws.com
 s3-us-west-2.amazonaws.com
+s3.ap-northeast-2.amazonaws.com
 s3.cn-north-1.amazonaws.com.cn
 s3.eu-central-1.amazonaws.com
 
 // BetaInABox
-// Submitted by adrian@betainabox.com 2012-09-13
+// Submitted by Adrian <adrian@betainabox.com>
 betainabox.com
 
 // CentralNic : http://www.centralnic.com/names/domains
-// Submitted by registry <gavin.brown@centralnic.com> 2012-09-27
+// Submitted by registry <gavin.brown@centralnic.com>
 ae.org
 ar.com
 br.com
@@ -11018,38 +11088,46 @@ za.bz
 za.com
 
 // Africa.com Web Solutions Ltd : https://registry.africa.com
-// Submitted by Gavin Brown <gavin.brown@centralnic.com> 2014-02-04
+// Submitted by Gavin Brown <gavin.brown@centralnic.com>
 africa.com
 
+// Citrix : https://citrix.com
+// Submitted by Alex Stoddard <alex.stoddard@citrix.com>
+xenapponazure.com
+
 // iDOT Services Limited : http://www.domain.gr.com
-// Submitted by Gavin Brown <gavin.brown@centralnic.com> 2014-02-04
+// Submitted by Gavin Brown <gavin.brown@centralnic.com>
 gr.com
 
 // Radix FZC : http://domains.in.net
-// Submitted by Gavin Brown <gavin.brown@centralnic.com> 2014-02-04
+// Submitted by Gavin Brown <gavin.brown@centralnic.com>
 in.net
 
 // US REGISTRY LLC : http://us.org
-// Submitted by Gavin Brown <gavin.brown@centralnic.com> 2014-02-04
+// Submitted by Gavin Brown <gavin.brown@centralnic.com>
 us.org
 
 // co.com Registry, LLC : https://registry.co.com
-// Submitted by Gavin Brown <gavin.brown@centralnic.com> 2014-02-04
+// Submitted by Gavin Brown <gavin.brown@centralnic.com>
 co.com
 
 // c.la : http://www.c.la/
 c.la
 
 // cloudControl : https://www.cloudcontrol.com/
-// Submitted by Tobias Wilken <tw@cloudcontrol.com> 2013-07-23
+// Submitted by Tobias Wilken <tw@cloudcontrol.com>
 cloudcontrolled.com
 cloudcontrolapp.com
 
 // co.ca : http://registry.co.ca/
 co.ca
 
+// i-registry s.r.o. : http://www.i-registry.cz/
+// Submitted by Martin Semrad <semrad@i-registry.cz>
+co.cz
+
 // CDN77.com : http://www.cdn77.com
-// Submitted by Jan Krpes <jan.krpes@cdn77.com> 2015-07-13
+// Submitted by Jan Krpes <jan.krpes@cdn77.com>
 c.cdn77.org
 cdn77-ssl.net
 r.cdn77.net
@@ -11061,19 +11139,23 @@ co.nl
 co.no
 
 // Commerce Guys, SAS
-// Submitted by Damien Tournoud <damien@commerceguys.com> 2015-01-22
+// Submitted by Damien Tournoud <damien@commerceguys.com>
 *.platform.sh
 
 // Cupcake : https://cupcake.io/
-// Submitted by Jonathan Rudenberg <jonathan@cupcake.io> 2013-10-08
+// Submitted by Jonathan Rudenberg <jonathan@cupcake.io>
 cupcake.is
 
 // DreamHost : http://www.dreamhost.com/
-// Submitted by Andrew Farmer <andrew.farmer@dreamhost.com> 2012-10-02
+// Submitted by Andrew Farmer <andrew.farmer@dreamhost.com>
 dreamhosters.com
 
+// Drobo : http://www.drobo.com/
+// Submitted by Ricardo Padilha <rpadilha@drobo.com>
+mydrobo.com
+
 // DuckDNS : http://www.duckdns.org/
-// Submitted by Richard Harper <richard@duckdns.org> 2015-05-17
+// Submitted by Richard Harper <richard@duckdns.org>
 duckdns.org
 
 // DynDNS.com : http://www.dyndns.com/services/dns/dyndns/
@@ -11358,8 +11440,7 @@ worse-than.tv
 writesthisblog.com
 
 // EU.org https://eu.org/
-// Submitted by Pierre Beyssac <hostmaster@eu.org> 2015-04-17
-
+// Submitted by Pierre Beyssac <hostmaster@eu.org>
 eu.org
 al.eu.org
 asso.eu.org
@@ -11418,7 +11499,7 @@ uk.eu.org
 us.eu.org
 
 // Fastly Inc. http://www.fastly.com/
-// Submitted by Vladimir Vuksan <vladimir@fastly.com> 2013-05-31
+// Submitted by Vladimir Vuksan <vladimir@fastly.com>
 a.ssl.fastly.net
 b.ssl.fastly.net
 global.ssl.fastly.net
@@ -11426,28 +11507,28 @@ a.prod.fastly.net
 global.prod.fastly.net
 
 // Firebase, Inc.
-// Submitted by Chris Raynor <chris@firebase.com> 2014-01-21
+// Submitted by Chris Raynor <chris@firebase.com>
 firebaseapp.com
 
 // Flynn : https://flynn.io
-// Submitted by Jonathan Rudenberg <jonathan@flynn.io> 2014-07-12
+// Submitted by Jonathan Rudenberg <jonathan@flynn.io>
 flynnhub.com
 
 // GDS : https://www.gov.uk/service-manual/operations/operating-servicegovuk-subdomains
-// Submitted by David Illsley <david.illsley@digital.cabinet-office.gov.uk> 2014-08-28
+// Submitted by David Illsley <david.illsley@digital.cabinet-office.gov.uk>
 service.gov.uk
 
 // GitHub, Inc.
-// Submitted by Ben Toews <btoews@github.com> 2014-02-06
+// Submitted by Ben Toews <btoews@github.com>
 github.io
 githubusercontent.com
 
 // GlobeHosting, Inc.
-// Submitted by Zoltan Egresi <egresi@globehosting.com> 2013-07-12
+// Submitted by Zoltan Egresi <egresi@globehosting.com>
 ro.com
 
 // Google, Inc.
-// Submitted by Eduardo Vela <evn@google.com> 2014-12-19
+// Submitted by Eduardo Vela <evn@google.com>
 appspot.com
 blogspot.ae
 blogspot.al
@@ -11523,6 +11604,7 @@ blogspot.td
 blogspot.tw
 blogspot.ug
 blogspot.vn
+cloudfunctions.net
 codespot.com
 googleapis.com
 googlecode.com
@@ -11530,13 +11612,16 @@ pagespeedmobilizer.com
 withgoogle.com
 withyoutube.com
 
+// Hashbang : https://hashbang.sh
+hashbang.sh
+
 // Heroku : https://www.heroku.com/
-// Submitted by Tom Maher <tmaher@heroku.com> 2013-05-02
+// Submitted by Tom Maher <tmaher@heroku.com>
 herokuapp.com
 herokussl.com
 
 // iki.fi
-// Submitted by Hannu Aronsson <haa@iki.fi> 2009-11-05
+// Submitted by Hannu Aronsson <haa@iki.fi>
 iki.fi
 
 // info.at : http://www.info.at/
@@ -11547,39 +11632,47 @@ info.at
 co.pl
 
 // Microsoft : http://microsoft.com
-// Submitted by Barry Dorrans <bdorrans@microsoft.com> 2014-01-24
+// Submitted by Barry Dorrans <bdorrans@microsoft.com>
 azurewebsites.net
 azure-mobile.net
 cloudapp.net
 
 // Mozilla Foundation : https://mozilla.org/
-// Submited by glob <glob@mozilla.com> 2015-07-06
+// Submitted by glob <glob@mozilla.com>
 bmoattachments.org
 
 // Neustar Inc.
-// Submitted by Trung Tran <Trung.Tran@neustar.biz> 2015-04-23
+// Submitted by Trung Tran <Trung.Tran@neustar.biz>
 4u.com
 
+// ngrok : https://ngrok.com/
+// Submitted by Alan Shreve <alan@ngrok.com>
+ngrok.io
+
 // NFSN, Inc. : https://www.NearlyFreeSpeech.NET/
-// Submitted by Jeff Wheelhouse <support@nearlyfreespeech.net> 2014-02-02
+// Submitted by Jeff Wheelhouse <support@nearlyfreespeech.net>
 nfshost.com
 
 // NYC.mn : http://www.information.nyc.mn
-// Submitted by Matthew Brown <mattbrown@nyc.mn> 2013-03-11
+// Submitted by Matthew Brown <mattbrown@nyc.mn>
 nyc.mn
 
 // One Fold Media : http://www.onefoldmedia.com/
-// Submitted by Eddie Jones <eddie@onefoldmedia.com> 2014-06-10
+// Submitted by Eddie Jones <eddie@onefoldmedia.com>
 nid.io
 
 // Opera Software, A.S.A.
-// Submitted by Yngve Pettersen <yngve@opera.com> 2009-11-26
+// Submitted by Yngve Pettersen <yngve@opera.com>
 operaunite.com
 
 // OutSystems
-// Submitted by Duarte Santos <domain-admin@outsystemscloud.com> 2014-03-11
+// Submitted by Duarte Santos <domain-admin@outsystemscloud.com>
 outsystemscloud.com
 
+// Pagefront : https://www.pagefronthq.com/
+// Submitted by Jason Kriss <jason@pagefronthq.com>
+pagefrontapp.com
+
 // .pl domains (grandfathered)
 art.pl
 gliwice.pl
@@ -11589,38 +11682,63 @@ wroc.pl
 zakopane.pl
 
 // Pantheon Systems, Inc. : https://pantheon.io/
-// Submitted by Gary Dylina <gary@pantheon.io> 2015-09-14
+// Submitted by Gary Dylina <gary@pantheon.io>
 pantheon.io
 gotpantheon.com
 
+// prgmr.com : https://prgmr.com/
+// Submitted by Sarah Newman <owner@prgmr.com>
+xen.prgmr.com
+
 // priv.at : http://www.nic.priv.at/
-// Submitted by registry <lendl@nic.at> 2008-06-09
+// Submitted by registry <lendl@nic.at>
 priv.at
 
 // QA2
-// Submitted by Daniel Dent (https://www.danieldent.com/) 2015-07-16
+// Submitted by Daniel Dent (https://www.danieldent.com/)
 qa2.com
 
+// Rackmaze LLC : https://www.rackmaze.com
+// Submitted by Kirill Pertsev <kika@rackmaze.com>
+rackmaze.com
+rackmaze.net
+
 // Red Hat, Inc. OpenShift : https://openshift.redhat.com/
-// Submitted by Tim Kramer <tkramer@rhcloud.com> 2012-10-24
+// Submitted by Tim Kramer <tkramer@rhcloud.com>
 rhcloud.com
 
 // Sandstorm Development Group, Inc. : https://sandcats.io/
-// Submitted by Asheesh Laroia <asheesh@sandstorm.io> 2015-07-21
+// Submitted by Asheesh Laroia <asheesh@sandstorm.io>
 sandcats.io
 
 // Service Online LLC : http://drs.ua/
-// Submitted by Serhii Bulakh <support@drs.ua> 2015-07-30
+// Submitted by Serhii Bulakh <support@drs.ua>
 biz.ua
 co.ua
 pp.ua
 
 // SinaAppEngine : http://sae.sina.com.cn/
-// Submitted by SinaAppEngine <saesupport@sinacloud.com> 2015-02-02
+// Submitted by SinaAppEngine <saesupport@sinacloud.com>
 sinaapp.com
 vipsinaapp.com
 1kapp.com
 
+// Synology, Inc. : https://www.synology.com/
+// Submitted by Rony Weng <ronyweng@synology.com>
+diskstation.me
+dscloud.biz
+dscloud.me
+dscloud.mobi
+dsmynas.com
+dsmynas.net
+dsmynas.org
+familyds.com
+familyds.net
+familyds.org
+i234.me
+myds.me
+synology.me
+
 // TASK geographical domains (www.task.gda.pl/uslugi/dns)
 gda.pl
 gdansk.pl
@@ -11629,18 +11747,18 @@ med.pl
 sopot.pl
 
 // UDR Limited : http://www.udr.hk.com
-// Submitted by registry <hostmaster@udr.hk.com> 2014-11-07
+// Submitted by registry <hostmaster@udr.hk.com>
 hk.com
 hk.org
 ltd.hk
 inc.hk
 
 // Yola : https://www.yola.com/
-// Submitted by Stefano Rivera <stefano@yola.com> 2014-07-09
+// Submitted by Stefano Rivera <stefano@yola.com>
 yolasite.com
 
 // ZaNiC : http://www.za.net/
-// Submitted by registry <hostmaster@nic.za.net> 2009-10-03
+// Submitted by registry <hostmaster@nic.za.net>
 za.net
 za.org
 
diff --git a/net/ddns-scripts/files/update_CloudFlare.sh b/net/ddns-scripts/files/update_CloudFlare.sh
deleted file mode 100644 (file)
index 2281740..0000000
+++ /dev/null
@@ -1,142 +0,0 @@
-#
-#.Distributed under the terms of the GNU General Public License (GPL) version 2.0
-#
-# script for sending updates to cloudflare.com
-#.2014-2015 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
-#
-# 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!"
-[ -z "$username" ] && write_log 14 "Service section not configured correctly! Missing 'username'"
-[ -z "$password" ] && write_log 14 "Service section not configured correctly! Missing 'password'"
-
-local __RECID __URL __KEY __KEYS __FOUND __SUBDOM __DOMAIN __TLD
-
-# split given Host/Domain into TLD, registrable domain, and subdomain
-split_FQDN $domain __TLD __DOMAIN __SUBDOM
-[ $? -ne 0 -o -z "$__DOMAIN" ] && \
-       write_log 14 "Wrong Host/Domain configuration ($domain). Please correct configuration!"
-
-# put together what we need
-__DOMAIN="$__DOMAIN.$__TLD"
-
-# 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
-grep -i "json_get_keys" /usr/share/libubox/jshn.sh >/dev/null 2>&1 || 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 __DISPLAY __NAME __TYPE
-       json_select "$__KEY"
-#      json_get_var __ZONE "zone_name"         # for debugging
-#      json_get_var __DISPLAY "display_name"   # for debugging
-       json_get_var __NAME "name"
-       json_get_var __TYPE "type"
-       if [ "$__NAME" = "$domain" ]; then
-               # 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'
-__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)
-
-# handle subdomain or domain record
-[ -n "$__SUBDOM" ] && __URL="${__URL}&name=$__SUBDOM"  #  -d 'name=sub'        (HOST/SUBDOMAIN)
-[ -z "$__SUBDOM" ] && __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/update_No-IP.com.sh b/net/ddns-scripts/files/update_No-IP.com.sh
deleted file mode 100644 (file)
index 9d73448..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-#
-#.Distributed under the terms of the GNU General Public License (GPL) version 2.0
-#
-# script for sending updates to no-ip.com / noip.com
-#.2014-2015 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]"
-# inside url we need username and password
-[ -z "$username" ] && write_log 14 "Service section not configured correctly! Missing 'username'"
-[ -z "$password" ] && write_log 14 "Service section not configured correctly! Missing 'password'"
-
-# 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
-
diff --git a/net/ddns-scripts/files/update_cloudflare_com.sh b/net/ddns-scripts/files/update_cloudflare_com.sh
new file mode 100755 (executable)
index 0000000..15f3afd
--- /dev/null
@@ -0,0 +1,144 @@
+#
+#.Distributed under the terms of the GNU General Public License (GPL) version 2.0
+#
+# script for sending updates to cloudflare.com
+#.2014-2015 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
+#
+# 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!"
+[ -z "$username" ] && write_log 14 "Service section not configured correctly! Missing 'username'"
+[ -z "$password" ] && write_log 14 "Service section not configured correctly! Missing 'password'"
+
+local __RECID __URL __KEY __KEYS __FOUND __SUBDOM __DOMAIN __TLD
+
+# split given Host/Domain into TLD, registrable domain, and subdomain
+split_FQDN $domain __TLD __DOMAIN __SUBDOM
+[ $? -ne 0 -o -z "$__DOMAIN" ] && \
+       write_log 14 "Wrong Host/Domain configuration ($domain). Please correct configuration!"
+
+# put together what we need
+__DOMAIN="$__DOMAIN.$__TLD"
+
+# 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
+grep -i "json_get_keys" /usr/share/libubox/jshn.sh >/dev/null 2>&1 || 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)
+}
+
+[ -n "$rec_id" ] && __RECID="$rec_id" || {
+       # 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 __DISPLAY __NAME __TYPE
+               json_select "$__KEY"
+       #       json_get_var __ZONE "zone_name"         # for debugging
+       #       json_get_var __DISPLAY "display_name"   # for debugging
+               json_get_var __NAME "name"
+               json_get_var __TYPE "type"
+               if [ "$__NAME" = "$domain" ]; then
+                       # 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'
+__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)
+
+# handle subdomain or domain record
+[ -n "$__SUBDOM" ] && __URL="${__URL}&name=$__SUBDOM"  #  -d 'name=sub'        (HOST/SUBDOMAIN)
+[ -z "$__SUBDOM" ] && __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/update_no-ip_com.sh b/net/ddns-scripts/files/update_no-ip_com.sh
new file mode 100755 (executable)
index 0000000..9d73448
--- /dev/null
@@ -0,0 +1,52 @@
+#
+#.Distributed under the terms of the GNU General Public License (GPL) version 2.0
+#
+# script for sending updates to no-ip.com / noip.com
+#.2014-2015 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]"
+# inside url we need username and password
+[ -z "$username" ] && write_log 14 "Service section not configured correctly! Missing 'username'"
+[ -z "$password" ] && write_log 14 "Service section not configured correctly! Missing 'password'"
+
+# 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 ae7ab88c9ad2237ef37de5abb22c3452a0dc90aa..30d6267509e02058670e396f5ebc84ae5ae982aa 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2009-2014 OpenWrt.org
+# Copyright (C) 2009-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=dnscrypt-proxy
-PKG_VERSION:=1.6.0
-PKG_RELEASE:=2
+PKG_VERSION:=1.6.1
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://download.dnscrypt.org/dnscrypt-proxy
-PKG_MD5SUM:=039b8106cf4e15302dc2487cb7fbb17b
+PKG_MD5SUM:=6fc2a8c57007d582dee3313979a4d1b5
 
 PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
index 110765407202755fb266466b979ec18a22665b1b..4a89f828e2e2a7b563165ab82f8be24c49cb4c0e 100644 (file)
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ethtool
-PKG_VERSION:=4.2
+PKG_VERSION:=4.5
 PKG_RELEASE:=1
 
 PKG_MAINTAINER:=Matthias Schiffer <mschiffer@universe-factory.net>
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@KERNEL/software/network/ethtool
-PKG_MD5SUM:=8433e71a256678d859ecc264132063c5
+PKG_MD5SUM:=f50d25177d10f0cb74da3edc66c3143a
 
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=COPYING
index 5820b9796562cd11826f8bbefbb02806fe516c61..3350eb3099a26c870d70373c0712a8b59881ee5c 100644 (file)
@@ -74,6 +74,12 @@ config FASTD_ENABLE_MAC_UHASH
        default y
 
 
+config FASTD_WITH_CAPABILITIES
+       bool "Enable POSIX capability support"
+       depends on PACKAGE_fastd
+       default n
+
+
 config FASTD_WITH_CMDLINE_USER
        bool "Include support for setting user/group related options on the command line"
        depends on PACKAGE_fastd
index 0574b399e9a787cfab4e3c19d58cc0b3c96bdc3f..5c550d8a5f4669d4f018dde23b622376bc8d0b06 100644 (file)
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=fastd
-PKG_VERSION:=17
-PKG_RELEASE:=2
+PKG_VERSION:=18
+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/81
-PKG_MD5SUM:=bad4f1948702f418b799578f83a0edb8
+PKG_SOURCE_URL:=https://projects.universe-factory.net/attachments/download/86
+PKG_MD5SUM:=e53236d3049f64f7955ad9556da099eb
 
 PKG_LICENSE:=BSD-2-Clause
 PKG_LICENSE_FILES:=COPYRIGHT
@@ -34,6 +34,7 @@ PKG_CONFIG_DEPENDS:=\
        CONFIG_FASTD_ENABLE_CIPHER_SALSA2012 \
        CONFIG_FASTD_ENABLE_MAC_GHASH \
        CONFIG_FASTD_ENABLE_MAC_UHASH \
+       CONFIG_FASTD_WITH_CAPABILITIES \
        CONFIG_FASTD_WITH_CMDLINE_USER \
        CONFIG_FASTD_WITH_CMDLINE_LOGGING \
        CONFIG_FASTD_WITH_CMDLINE_OPERATION \
@@ -50,7 +51,7 @@ include $(INCLUDE_DIR)/cmake.mk
 define Package/fastd
   SECTION:=net
   CATEGORY:=Network
-  DEPENDS:=+kmod-tun +librt +libpthread +FASTD_WITH_STATUS_SOCKET:libjson-c
+  DEPENDS:=+kmod-tun +librt +libpthread +FASTD_WITH_STATUS_SOCKET:libjson-c +FASTD_WITH_CAPABILITIES:libcap
   TITLE:=Fast and Secure Tunneling Daemon
   URL:=https://projects.universe-factory.net/projects/fastd
   SUBMENU:=VPN
@@ -79,13 +80,13 @@ CMAKE_OPTIONS += \
        -DWITH_CIPHER_SALSA2012:BOOL=FALSE \
        -DWITH_MAC_GHASH:BOOL=FALSE \
        -DWITH_MAC_UHASH:BOOL=FALSE \
+       -DWITH_CAPABILITIES:BOOL=FALSE \
        -DWITH_CMDLINE_USER:BOOL=FALSE \
        -DWITH_CMDLINE_LOGGING:BOOL=FALSE \
        -DWITH_CMDLINE_OPERATION:BOOL=FALSE \
        -DWITH_CMDLINE_COMMANDS:BOOL=FALSE \
        -DWITH_DYNAMIC_PEERS:BOOL=FALSE \
        -DWITH_STATUS_SOCKET:BOOL=FALSE \
-       -DWITH_CAPABILITIES:BOOL=FALSE \
        -DENABLE_SYSTEMD:BOOL=FALSE \
        -DENABLE_LIBSODIUM:BOOL=FALSE \
        -DENABLE_LTO:BOOL=TRUE
@@ -150,6 +151,11 @@ CMAKE_OPTIONS += -DWITH_MAC_UHASH:BOOL=TRUE
 endif
 
 
+ifeq ($(CONFIG_FASTD_WITH_CAPABILITIES),y)
+CMAKE_OPTIONS += -DWITH_CAPABILITIES:BOOL=TRUE
+endif
+
+
 ifeq ($(CONFIG_FASTD_WITH_CMDLINE_USER),y)
 CMAKE_OPTIONS += -DWITH_CMDLINE_USER:BOOL=TRUE
 endif
diff --git a/net/fastd/patches/100-musl-compat.patch b/net/fastd/patches/100-musl-compat.patch
deleted file mode 100644 (file)
index 984aace..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
---- a/cmake/checks.cmake
-+++ b/cmake/checks.cmake
-@@ -54,9 +54,13 @@ if(NOT DARWIN)
- endif(NOT DARWIN)
-+set(CMAKE_EXTRA_INCLUDE_FILES "linux/if_ether.h")
-+check_type_size("struct ethhdr" SIZEOF_ETHHDR)
-+string(COMPARE NOTEQUAL "${SIZEOF_ETHHDR}" "" HAVE_LINUX_ETHHDR)
-+
- set(CMAKE_EXTRA_INCLUDE_FILES "netinet/if_ether.h")
- check_type_size("struct ethhdr" SIZEOF_ETHHDR)
--string(COMPARE NOTEQUAL "${SIZEOF_ETHHDR}" "" HAVE_ETHHDR)
-+string(COMPARE NOTEQUAL "${SIZEOF_ETHHDR}" "" HAVE_NETINET_ETHHDR)
- set(CMAKE_REQUIRED_INCLUDES "sys/types.h")
---- a/src/compat.h
-+++ b/src/compat.h
-@@ -45,7 +45,12 @@
- #include <net/if.h>
- #include <net/if_arp.h>
- #include <netinet/in.h>
-+
-+#if defined(HAVE_LINUX_ETHHDR)
-+#include <linux/if_ether.h>
-+#elif defined(HAVE_NETINET_ETHHDR)
- #include <netinet/if_ether.h>
-+#endif
- #ifndef ETH_ALEN
- /** The length of a MAC address */
-@@ -55,9 +60,8 @@
- #ifndef ETH_HLEN
- /** The length of the standard ethernet header */
- #define ETH_HLEN 14
--#endif
--#ifndef HAVE_ETHHDR
-+#if !defined(HAVE_LINUX_ETHHDR) && !defined(HAVE_NETINET_ETHHDR)
- /** An ethernet header */
- struct ethhdr {
-       uint8_t h_dest[ETH_ALEN];                       /**< The destination MAC address field */
-@@ -65,6 +69,7 @@ struct ethhdr {
-       uint16_t h_proto;                               /**< The EtherType/length field */
- } __attribute__((packed));
- #endif
-+#endif
- #if defined(USE_FREEBIND) && !defined(IP_FREEBIND)
- /** Compatiblity define for systems supporting, but not defining IP_FREEBIND */
---- a/src/fastd_config.h.in
-+++ b/src/fastd_config.h.in
-@@ -35,8 +35,11 @@
- /** Defined if the platform supports the AI_ADDRCONFIG flag to getaddrinfo() */
- #cmakedefine HAVE_AI_ADDRCONFIG
--/** Defined if the platform defines the \e ethhdr struct */
--#cmakedefine HAVE_ETHHDR
-+/** Defined if the platform defines the \e ethhdr struct through linux/if_ether.h */
-+#cmakedefine HAVE_LINUX_ETHHDR
-+
-+/** Defined if the platform defines the \e ethhdr struct through netinet/if_ether.h */
-+#cmakedefine HAVE_NETINET_ETHHDR
- /** Defined if the platform defines get_current_dir_name() */
- #cmakedefine HAVE_GET_CURRENT_DIR_NAME
index da3509d7c5adfeaf3096eb8cf063f6e7319e2cd1..c7ad3cc94e5cb621d870bcb652885a47f54ae0ec 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=git
-PKG_VERSION:=2.6.3
+PKG_VERSION:=2.7.3
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@KERNEL/software/scm/git/
-PKG_MD5SUM:=5a6375349c3f13c8dbbabfc327bae429
+PKG_MD5SUM:=bb01710b1b24789a53c800a90c73957f
 
 PKG_INSTALL:=1
 PKG_BUILD_PARALLEL:=1
index 9687bca7f8592c00ea0ab8ee8bccbb8d3c389d52..bf0d39f470b005d12c87befb2b7c7882ed1c6b3d 100644 (file)
@@ -1,6 +1,6 @@
 --- a/Makefile
 +++ b/Makefile
-@@ -557,16 +557,7 @@ EXTRA_PROGRAMS =
+@@ -559,16 +559,7 @@ EXTRA_PROGRAMS =
  # ... and all the rest that could be moved out of bindir to gitexecdir
  PROGRAMS += $(EXTRA_PROGRAMS)
  
@@ -17,7 +17,7 @@
  
  # Binary suffix, set to .exe for Windows builds
  X =
-@@ -923,6 +914,11 @@ BUILTIN_OBJS += builtin/verify-pack.o
+@@ -929,6 +920,11 @@ BUILTIN_OBJS += builtin/verify-pack.o
  BUILTIN_OBJS += builtin/verify-tag.o
  BUILTIN_OBJS += builtin/worktree.o
  BUILTIN_OBJS += builtin/write-tree.o
@@ -29,7 +29,7 @@
  
  GITLIBS = $(LIB_FILE) $(XDIFF_LIB)
  EXTLIBS =
-@@ -1106,7 +1102,7 @@ endif
+@@ -1112,7 +1108,7 @@ endif
  EXTLIBS += -lz
  
  ifndef NO_OPENSSL
@@ -38,7 +38,7 @@
        ifdef OPENSSLDIR
                BASIC_CFLAGS += -I$(OPENSSLDIR)/include
                OPENSSL_LINK = -L$(OPENSSLDIR)/$(lib) $(CC_LD_DYNPATH)$(OPENSSLDIR)/$(lib)
-@@ -1977,10 +1973,6 @@ endif
+@@ -1989,10 +1985,6 @@ endif
  git-%$X: %.o GIT-LDFLAGS $(GITLIBS)
        $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS)
  
@@ -49,7 +49,7 @@
  git-http-fetch$X: http.o http-walker.o http-fetch.o GIT-LDFLAGS $(GITLIBS)
        $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
                $(CURL_LIBCURL) $(LIBS)
-@@ -2300,10 +2292,11 @@ endif
+@@ -2312,10 +2304,11 @@ endif
        bindir=$$(cd '$(DESTDIR_SQ)$(bindir_SQ)' && pwd) && \
        execdir=$$(cd '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' && pwd) && \
        { test "$$bindir/" = "$$execdir/" || \
@@ -64,7 +64,7 @@
        } && \
 --- a/builtin.h
 +++ b/builtin.h
-@@ -141,5 +141,10 @@ extern int cmd_verify_pack(int argc, con
+@@ -142,5 +142,10 @@ extern int cmd_verify_pack(int argc, con
  extern int cmd_show_ref(int argc, const char **argv, const char *prefix);
  extern int cmd_pack_refs(int argc, const char **argv, const char *prefix);
  extern int cmd_replace(int argc, const char **argv, const char *prefix);
@@ -97,7 +97,7 @@
 +#include "../upload-pack.c"
 --- a/daemon.c
 +++ b/daemon.c
-@@ -1184,7 +1184,7 @@ static int serve(struct string_list *lis
+@@ -1178,7 +1178,7 @@ static int serve(struct string_list *lis
        return service_loop(&socklist);
  }
  
  {
        int listen_port = 0;
        struct string_list listen_addr = STRING_LIST_INIT_NODUP;
-@@ -1380,12 +1380,13 @@ int main(int argc, char **argv)
+@@ -1374,6 +1374,7 @@ int main(int argc, char **argv)
                write_file(pid_file, "%"PRIuMAX, (uintmax_t) getpid());
  
        /* prepare argv for serving-processes */
--      cld_argv = xmalloc(sizeof (char *) * (argc + 2));
--      cld_argv[0] = argv[0];  /* git-daemon */
--      cld_argv[1] = "--serve";
-+      cld_argv = xmalloc(sizeof (char *) * (argc + 3));
-+      cld_argv[0] = "git";
-+      cld_argv[1] = argv[0];  /* daemon */
-+      cld_argv[2] = "--serve";
++      argv_array_push(&cld_argv, "git"); /* git-daemon */
+       argv_array_push(&cld_argv, argv[0]); /* git-daemon */
+       argv_array_push(&cld_argv, "--serve");
        for (i = 1; i < argc; ++i)
--              cld_argv[i+1] = argv[i];
--      cld_argv[argc+1] = NULL;
-+              cld_argv[i+2] = argv[i];
-+      cld_argv[argc+2] = NULL;
-       return serve(&listen_addr, listen_port, cred);
- }
 --- a/fast-import.c
 +++ b/fast-import.c
-@@ -3380,7 +3380,7 @@ static void parse_argv(void)
+@@ -3381,7 +3381,7 @@ static void parse_argv(void)
                read_marks();
  }
  
  
 --- a/git.c
 +++ b/git.c
-@@ -311,11 +311,11 @@ static int handle_alias(int *argcp, cons
+@@ -307,11 +307,11 @@ static int handle_alias(int *argcp, cons
  
  struct cmd_struct {
        const char *cmd;
  {
        int status, help;
        struct stat st;
-@@ -396,6 +396,7 @@ static struct cmd_struct commands[] = {
+@@ -392,6 +392,7 @@ static struct cmd_struct commands[] = {
        { "config", cmd_config, RUN_SETUP_GENTLY },
        { "count-objects", cmd_count_objects, RUN_SETUP },
        { "credential", cmd_credential, RUN_SETUP_GENTLY },
        { "describe", cmd_describe, RUN_SETUP },
        { "diff", cmd_diff },
        { "diff-files", cmd_diff_files, RUN_SETUP | NEED_WORK_TREE },
-@@ -414,6 +415,7 @@ static struct cmd_struct commands[] = {
+@@ -410,6 +411,7 @@ static struct cmd_struct commands[] = {
        { "grep", cmd_grep, RUN_SETUP_GENTLY },
        { "hash-object", cmd_hash_object },
        { "help", cmd_help },
        { "index-pack", cmd_index_pack, RUN_SETUP_GENTLY },
        { "init", cmd_init_db, NO_SETUP },
        { "init-db", cmd_init_db, NO_SETUP },
-@@ -463,6 +465,7 @@ static struct cmd_struct commands[] = {
+@@ -459,6 +461,7 @@ static struct cmd_struct commands[] = {
        { "revert", cmd_revert, RUN_SETUP | NEED_WORK_TREE },
        { "rm", cmd_rm, RUN_SETUP },
        { "send-pack", cmd_send_pack, RUN_SETUP },
        { "shortlog", cmd_shortlog, RUN_SETUP_GENTLY | USE_PAGER },
        { "show", cmd_show, RUN_SETUP },
        { "show-branch", cmd_show_branch, RUN_SETUP },
-@@ -479,6 +482,7 @@ static struct cmd_struct commands[] = {
+@@ -476,6 +479,7 @@ static struct cmd_struct commands[] = {
        { "update-server-info", cmd_update_server_info, RUN_SETUP },
        { "upload-archive", cmd_upload_archive },
        { "upload-archive--writer", cmd_upload_archive_writer },
        { "verify-pack", cmd_verify_pack },
 --- a/imap-send.c
 +++ b/imap-send.c
-@@ -1496,7 +1496,7 @@ static int curl_append_msgs_to_imap(stru
+@@ -1494,7 +1494,7 @@ static int curl_append_msgs_to_imap(stru
  }
  #endif
  
        const char **user_argv;
 --- a/upload-pack.c
 +++ b/upload-pack.c
-@@ -819,7 +819,7 @@ static int upload_pack_config(const char
+@@ -820,7 +820,7 @@ static int upload_pack_config(const char
        return parse_hide_refs_config(var, value, "uploadpack");
  }
  
index 8a8ce289d93987d34908a606e8cd6362813bd74b..5a7991c8c924544e7bb8ed315e459b67f0b6b055 100644 (file)
@@ -1,6 +1,6 @@
 --- a/configure.ac
 +++ b/configure.ac
-@@ -867,7 +867,8 @@ AC_RUN_IFELSE(
+@@ -860,7 +860,8 @@ AC_RUN_IFELSE(
                FILE *f = fopen(".", "r");
                return f && fread(&c, 1, 1, f)]])],
        [ac_cv_fread_reads_directories=no],
@@ -10,7 +10,7 @@
  ])
  if test $ac_cv_fread_reads_directories = yes; then
        FREAD_READS_DIRECTORIES=UnfortunatelyYes
-@@ -901,7 +902,8 @@ AC_RUN_IFELSE(
+@@ -894,7 +895,8 @@ AC_RUN_IFELSE(
                  if (snprintf(buf, 3, "%s", "12345") != 5
                      || strcmp(buf, "12")) return 1]])],
        [ac_cv_snprintf_returns_bogus=no],
@@ -20,7 +20,7 @@
  ])
  if test $ac_cv_snprintf_returns_bogus = yes; then
        SNPRINTF_RETURNS_BOGUS=UnfortunatelyYes
-@@ -924,7 +926,8 @@ yippeeyeswehaveit
+@@ -917,7 +919,8 @@ yippeeyeswehaveit
  #endif
  ]),
        [ac_cv_sane_mode_bits=yes],
index 5b5f472a231c487ed45461e51885e14796518ec7..84d1e8f0c2fa67bc064d3ecfcc10b5f1461ab32f 100644 (file)
@@ -1,6 +1,6 @@
 --- a/Makefile
 +++ b/Makefile
-@@ -1074,7 +1074,7 @@ else
+@@ -1080,7 +1080,7 @@ else
        endif
        curl_check := $(shell (echo 072200; $(CURL_CONFIG) --vernum | sed -e '/^70[BC]/s/^/0/') 2>/dev/null | sort -r | sed -ne 2p)
        ifeq "$(curl_check)" "072200"
index cfb1949c3288c6bb1dbfe8e48dfaa6ad258ed0c0..fd2476576875e80c167967879bdcbffff26441bf 100644 (file)
@@ -8,9 +8,9 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gnunet
-PKG_SOURCE_VERSION:=36713
+PKG_SOURCE_VERSION:=36986
 PKG_VERSION:=0.10.1-svn$(PKG_SOURCE_VERSION)
-PKG_RELEASE:=3
+PKG_RELEASE:=1
 
 # ToDo:
 #  - break-out {peer,name,data}store for each backend
@@ -39,7 +39,7 @@ CONFIGURE_ARGS+= \
        $(if $(CONFIG_PACKAGE_$(PKG_NAME)-mysql),--with-mysql="$(STAGING_DIR)/usr",--without-mysql) \
        $(if $(CONFIG_PACKAGE_$(PKG_NAME)-pgsql),--with-postgresql="$(STAGING_DIR)/usr/bin/pg_config",--without-postgresql) \
        $(if $(CONFIG_PACKAGE_$(PKG_NAME)-sqlite),--with-sqlite="$(STAGING_DIR)/usr",--without-sqlite) \
-       $(if $(CONFIG_PACKAGE_$(PKG_NAME)-experiments),--enable-experimental,--disable-experimental) \
+       --enable-experimental \
        --with-extractor=$(STAGING_DIR)/usr \
        --with-gnutls=$(STAGING_DIR)/usr \
        --with-libgnurl=$(STAGING_DIR)/usr \
@@ -133,13 +133,13 @@ define Package/gnunet/install
        $(INSTALL_DIR) $(1)/usr/share/gnunet/config.d $(1)/usr/share/gnunet/hellos
 
        ( for bin in arm ats cadet core config ecc identity nat nat-server nse \
-           peerinfo peerstore revocation scalarproduct statistics transport uri; do \
+           peerinfo revocation scalarproduct statistics transport uri; do \
                $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gnunet-$$$$bin $(1)/usr/bin/ ; \
        done )
 
        ( for lib in arm ats block cadet core datacache dht \
            dns dnsparser dnsstub fragmentation friends hello identity nat nse \
-           peerinfo peerstore regexblock regex revocation scalarproduct set \
+           peerinfo regexblock regex revocation scalarproduct set \
            statistics transport util; do \
                $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgnunet$$$$lib.so* $(1)/usr/lib/ ; \
        done )
@@ -152,7 +152,7 @@ define Package/gnunet/install
        ( for lex in daemon-hostlist daemon-topology helper-nat-client \
            helper-nat-server service-arm service-ats service-cadet \
            service-core service-dht service-identity service-nse \
-           service-peerinfo service-peerstore service-regex \
+           service-peerinfo service-regex \
            service-revocation service-scalarproduct-alice \
            service-scalarproduct-bob service-scalarproduct-ecc-alice \
            service-scalarproduct-ecc-bob service-set service-statistics \
@@ -161,7 +161,7 @@ define Package/gnunet/install
        done )
 
        ( for conf in arm ats cadet core datacache dht hostlist identity \
-           nat nse peerinfo peerstore regex revocation scalarproduct \
+           nat nse peerinfo regex revocation scalarproduct \
            set statistics topology transport util; do \
                $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/gnunet/config.d/$$$$conf.conf $(1)/usr/share/gnunet/config.d ; \
        done )
@@ -198,14 +198,17 @@ PLUGIN_transport-http_server:=transport_http_server transport_https_server
 PLUGIN_transport-wlan:=transport_wlan
 LIBEXEC_transport-wlan:=helper-transport-wlan
 
-DEPENDS_experiments:=+libglpk +gnunet-sqlite
-BIN_experiments:=multicast rps
-LIB_experiments:=consensus dv env multicast psyc psycstore psycutil rps secretsharing social
-PLUGIN_experiments:=ats_mlp ats_ril namecache_flat namestore_flat psycstore_sqlite transport_dv
-LIBEXEC_experiments:=service-consensus service-dv service-evil-consensus service-multicast service-psyc service-psycstore service-rps service-secretsharing service-social
-CONF_experiments:=consensus dv multicast psyc psycstore rps secretsharing social
+DEPENDS_experiments:=+libglpk
+PLUGIN_experiments:=ats_mlp ats_ril
+LIBEXEC_experiments:=service-dht-whanau service-dht-xvine
 
-DEPENDS_fs:=+gnunet-datastore +libextractor
+# BIN_dv:=dv
+LIB_dv:=dv
+PLUGIN_dv:=transport_dv
+LIBEXEC_dv:=service-dv
+CONF_dv:=dv
+
+DEPENDS_fs:=+gnunet-datastore +gnunet-peerstore +libextractor
 BIN_fs:=auto-share directory download download-manager.scm fs publish unindex search
 LIB_fs:=fs
 PLUGIN_fs:=block_fs
@@ -227,15 +230,41 @@ PLUGIN_datastore:=datastore_heap
 LIBEXEC_datastore:=daemon-latency-logger service-datastore
 CONF_datastore:=datastore
 
+BIN_peerstore:=peerstore
+LIB_peerstore:=peerstore
+LIBEXEC_peerstore:=service-peerstore
+CONF_peerstore:=peerstore
+
+DEPENDS_flat:=+gnunet-gns
+PLUGIN_flat:=namecache_flat namestore_flat
+
 DEPENDS_mysql:=+gnunet-gns +gnunet-datastore +libmysqlclient
 LIB_mysql:=mysql
 PLUGIN_mysql:=datastore_mysql
 
 DEPENDS_pgsql:=+gnunet-gns +gnunet-datastore +libpq
-LIB_pgsql:=postgres
+LIB_pgsql:=postgres pq
 PLUGIN_pgsql:=datacache_postgres datastore_postgres namecache_postgres namestore_postgres
 
-DEPENDS_sqlite:=+gnunet-gns +gnunet-datastore +libsqlite3
+DEPENDS_rest:=+gnunet-gns +gnunet-social +jansson
+LIB_rest:=rest
+PLUGIN_rest:=rest_gns rest_identity rest_identity_provider rest_namestore
+LIBEXEC_rest:=rest-server
+CONF_rest:=rest
+
+BIN_rps:=rps
+LIB_rps:=rps
+LIBEXEC_rps:=service-rps
+CONF_rps:=rps
+
+DEPENDS_social:=+gnunet-sqlite +jansson
+BIN_social:=identity-token multicast
+LIB_social:=consensus identityprovider multicast psyc psycstore psycutil secretsharing social
+PLUGIN_social:=psycstore_sqlite
+LIBEXEC_social:=service-consensus service-evil-consensus service-identity-provider service-multicast service-psyc service-psycstore service-secretsharing service-social
+CONF_social:=consensus multicast psyc psycstore secretsharing social
+
+DEPENDS_sqlite:=+gnunet-gns +gnunet-datastore +gnunet-peerstore +libsqlite3
 PLUGIN_sqlite:=datacache_sqlite datastore_sqlite namecache_sqlite namestore_sqlite peerstore_sqlite
 
 DEPENDS_transport-bluetooth:=+bluez-libs
@@ -253,16 +282,22 @@ CONF_vpn:=exit pt vpn
 
 $(eval $(call BuildPackage,gnunet))
 $(eval $(call BuildComponent,conversation,conversation component,))
+$(eval $(call BuildComponent,datastore,data storage components,))
+$(eval $(call BuildComponent,dv,distance-vector routing component,))
 $(eval $(call BuildComponent,experiments,experimental components,))
+$(eval $(call BuildComponent,flat,flat storage backends,))
 $(eval $(call BuildComponent,fs,file-sharing components,))
 $(eval $(call BuildComponent,gns,name resolution components,y))
-$(eval $(call BuildComponent,datastore,storage components,))
+$(eval $(call BuildComponent,mysql,mySQL datastore backend,))
+$(eval $(call BuildComponent,pgsql,PostgreSQL storage backends,))
+$(eval $(call BuildComponent,peerstore,peerstore local persistency component,))
+$(eval $(call BuildComponent,rest,REST interface,))
+$(eval $(call BuildComponent,rps,RPS routing component,))
+$(eval $(call BuildComponent,social,social components,))
+$(eval $(call BuildComponent,sqlite,libsqlite3 storage backends,y))
 $(eval $(call BuildComponent,transport-bluetooth,bluetooth transport,))
 $(eval $(call BuildComponent,transport-http_client,HTTP/HTTPS client transport,y))
 $(eval $(call BuildComponent,transport-http_server,HTTP/HTTPS server transport,))
 $(eval $(call BuildComponent,transport-wlan,WLAN transport,))
 $(eval $(call BuildComponent,utils,administration utililties,))
 $(eval $(call BuildComponent,vpn,vpn components,y))
-$(eval $(call BuildComponent,mysql,mySQL datastore backend,))
-$(eval $(call BuildComponent,pgsql,PostgreSQL backends,))
-$(eval $(call BuildComponent,sqlite,libsqlite3 backends,y))
index 5138e7c3da0c87ffefc05f79cdd9c657818f6d68..49746ea6f3058910691b94f1d69f1d07d409ef43 100644 (file)
@@ -9,12 +9,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=haproxy
-PKG_VERSION:=1.5.15
-PKG_RELEASE:=10
+PKG_VERSION:=1.5.16
+PKG_RELEASE:=01
 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:=eeaa35744f84c92184cd735ee56dd0a3
+PKG_MD5SUM:=294fdb5aaaccba00c2070e5f4baf9f0e
 PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>
 PKG_LICENSE:=GPL-2.0
 
diff --git a/net/haproxy/patches/0001-BUG-BUILD-replace-haproxy-systemd-wrapper-with-EXTRA.patch b/net/haproxy/patches/0001-BUG-BUILD-replace-haproxy-systemd-wrapper-with-EXTRA.patch
deleted file mode 100644 (file)
index 0a29467..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-From 4818bc3035bccc00d8c3fc9b14ec37366cac3059 Mon Sep 17 00:00:00 2001
-From: Jerome Duval <jerome.duval@gmail.com>
-Date: Mon, 2 Nov 2015 17:47:43 +0000
-Subject: [PATCH 01/10] BUG/BUILD: replace haproxy-systemd-wrapper with
- $(EXTRA) in install-bin.
-
-[wt: this should be backported to 1.6 and 1.5 as well since some platforms
- don't build the systemd-wrapper]
-(cherry picked from commit 796d2fc136359c31c5c35f00c0751890ab42a016)
-(cherry picked from commit 9d0b47d96825b0584ea81c826a96ed8babcc016b)
----
- Makefile | 5 ++---
- 1 file changed, 2 insertions(+), 3 deletions(-)
-
-diff --git a/Makefile b/Makefile
-index 9556069..e3199b2 100644
---- a/Makefile
-+++ b/Makefile
-@@ -719,10 +719,9 @@ install-doc:
-               install -m 644 doc/$$x.txt "$(DESTDIR)$(DOCDIR)" ; \
-       done
--install-bin: haproxy haproxy-systemd-wrapper
-+install-bin: haproxy $(EXTRA)
-       install -d "$(DESTDIR)$(SBINDIR)"
--      install haproxy "$(DESTDIR)$(SBINDIR)"
--      install haproxy-systemd-wrapper "$(DESTDIR)$(SBINDIR)"
-+      install haproxy $(EXTRA) "$(DESTDIR)$(SBINDIR)"
- install: install-bin install-man install-doc
--- 
-2.4.10
-
diff --git a/net/haproxy/patches/0002-BUG-MINOR-acl-don-t-use-record-layer-in-req_ssl_ver.patch b/net/haproxy/patches/0002-BUG-MINOR-acl-don-t-use-record-layer-in-req_ssl_ver.patch
deleted file mode 100644 (file)
index daac5d4..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-From 1af6a324c3206902f69bd2c9838e94ffb4cee3ae Mon Sep 17 00:00:00 2001
-From: Lukas Tribus <luky-37@hotmail.com>
-Date: Thu, 5 Nov 2015 13:59:30 +0100
-Subject: [PATCH 02/10] BUG/MINOR: acl: don't use record layer in req_ssl_ver
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-The initial record layer version in a SSL handshake may be set to TLSv1.0
-or similar for compatibility reasons, this is allowed as per RFC5246
-Appendix E.1 [1]. Some implementations are Openssl [2] and NSS [3].
-
-A related issue has been fixed some time ago in commit 57d229747
-("BUG/MINOR: acl: req_ssl_sni fails with SSLv3 record version").
-
-Fix this by using the real client hello version instead of the record
-layer version.
-
-This was reported by Julien Vehent and analyzed by Cyril Bonté.
-The initial patch is from Julien Vehent as well.
-
-This should be backported to stable series, the req_ssl_ver keyword was
-first introduced in 1.3.16.
-
-[1] https://tools.ietf.org/html/rfc5246#appendix-E.1
-[2] https://github.com/openssl/openssl/commit/4a1cf50187659e60c5867ecbbc36e37b2605d2c3
-[3] https://bugzilla.mozilla.org/show_bug.cgi?id=774547
-(cherry picked from commit c93242cab986087f06a4655d14fec18eecb7f5f4)
-(cherry picked from commit b048a6eb3d9cb518e4a378e20ba2a801afec553c)
----
- src/payload.c | 11 +++++++----
- 1 file changed, 7 insertions(+), 4 deletions(-)
-
-diff --git a/src/payload.c b/src/payload.c
-index f62163c..b8f1ca3 100644
---- a/src/payload.c
-+++ b/src/payload.c
-@@ -148,21 +148,24 @@ smp_fetch_req_ssl_ver(struct proxy *px, struct session *s, void *l7, unsigned in
-       data = (const unsigned char *)s->req->buf->p;
-       if ((*data >= 0x14 && *data <= 0x17) || (*data == 0xFF)) {
-               /* SSLv3 header format */
--              if (bleft < 5)
-+              if (bleft < 11)
-                       goto too_short;
--              version = (data[1] << 16) + data[2]; /* version: major, minor */
-+              version = (data[1] << 16) + data[2]; /* record layer version: major, minor */
-               msg_len = (data[3] <<  8) + data[4]; /* record length */
-               /* format introduced with SSLv3 */
-               if (version < 0x00030000)
-                       goto not_ssl;
--              /* message length between 1 and 2^14 + 2048 */
--              if (msg_len < 1 || msg_len > ((1<<14) + 2048))
-+              /* message length between 6 and 2^14 + 2048 */
-+              if (msg_len < 6 || msg_len > ((1<<14) + 2048))
-                       goto not_ssl;
-               bleft -= 5; data += 5;
-+
-+              /* return the client hello client version, not the record layer version */
-+              version = (data[4] << 16) + data[5]; /* client hello version: major, minor */
-       } else {
-               /* SSLv2 header format, only supported for hello (msg type 1) */
-               int rlen, plen, cilen, silen, chlen;
--- 
-2.4.10
-
diff --git a/net/haproxy/patches/0003-BUG-http-do-not-abort-keep-alive-connections-on-serv.patch b/net/haproxy/patches/0003-BUG-http-do-not-abort-keep-alive-connections-on-serv.patch
deleted file mode 100644 (file)
index 10fcc86..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-From ef8a113d59e89b2214adf7ab9f9b0b75905a7050 Mon Sep 17 00:00:00 2001
-From: lsenta <laurent.senta@gmail.com>
-Date: Fri, 13 Nov 2015 10:44:22 +0100
-Subject: [PATCH 03/10] BUG: http: do not abort keep-alive connections on
- server timeout
-
-When a server timeout is detected on the second or nth request of a keep-alive
-connection, HAProxy closes the connection without writing a response.
-Some clients would fail with a remote disconnected exception and some
-others would retry potentially unsafe requests.
-
-This patch removes the special case and makes sure a 504 timeout is
-written back whenever a server timeout is handled.
-
-Signed-off-by: lsenta <laurent.senta@gmail.com>
-(cherry picked from commit 1e1f41d0f3473d86da84dc3785b7d7cbef6e9044)
-(cherry picked from commit 1f279c0b116f7fbc208793fffbd256c3c736fc52)
----
- src/proto_http.c | 2 --
- 1 file changed, 2 deletions(-)
-
-diff --git a/src/proto_http.c b/src/proto_http.c
-index 17742c6..e7e1785 100644
---- a/src/proto_http.c
-+++ b/src/proto_http.c
-@@ -5782,8 +5782,6 @@ int http_wait_for_response(struct session *s, struct channel *rep, int an_bit)
-               else if (rep->flags & CF_READ_TIMEOUT) {
-                       if (msg->err_pos >= 0)
-                               http_capture_bad_message(&s->be->invalid_rep, s, msg, msg->msg_state, s->fe);
--                      else if (txn->flags & TX_NOT_FIRST)
--                              goto abort_keep_alive;
-                       s->be->be_counters.failed_resp++;
-                       if (objt_server(s->target)) {
--- 
-2.4.10
-
diff --git a/net/haproxy/patches/0004-BUG-MEDIUM-http-switch-the-request-channel-to-no-del.patch b/net/haproxy/patches/0004-BUG-MEDIUM-http-switch-the-request-channel-to-no-del.patch
deleted file mode 100644 (file)
index 9f74e1f..0000000
+++ /dev/null
@@ -1,112 +0,0 @@
-From c0d56134320e507c82952f3d2a03f76b701945cb Mon Sep 17 00:00:00 2001
-From: Willy Tarreau <w@1wt.eu>
-Date: Wed, 18 Nov 2015 11:59:55 +0100
-Subject: [PATCH 04/10] BUG/MEDIUM: http: switch the request channel to
- no-delay once done.
-
-There's an issue when sending POST data that came in a second packet,
-the CF_NEVER_WAIT flag is not always set on the request channel, while
-the server is waiting for the request. We must always set this flag in
-this case since we're not going to shut down after sending, contrary
-to the response side.
-
-Note that option http-no-delay works around this issue.
-
-Reproducer :
-
-listen  px
-        mode http
-        timeout client 10s
-        timeout server 5s
-        timeout connect 3s
-        option http-server-close
-        #option http-no-delay
-        bind :8001
-        server s1 127.0.0.1:8003
-
-$ (printf "POST / HTTP/1.1\r\nTransfer-encoding: chunked\r\n\r\n"; sleep 0.01; printf "10\r\nAZERTYUIOPQSDFGH\r\n0\r\n\r\n") | nc6 0 8001
-
-Before this fix :
-
-12:03:31.946763 epoll_wait(3, {{EPOLLIN, {u32=5, u64=5}}}, 200, 1000) = 1
-12:03:32.634175 accept4(5, {sa_family=AF_INET, sin_port=htons(53849), sin_addr=inet_addr("127.0.0.1")}, [16], SOCK_NONBLOCK) = 6
-12:03:32.634318 setsockopt(6, SOL_TCP, TCP_NODELAY, [1], 4) = 0
-12:03:32.634434 accept4(5, 0x7ffccfbb2cf0, [128], SOCK_NONBLOCK) = -1 EAGAIN (Resource temporarily unavailable)
-12:03:32.634574 recvfrom(6, "POST / HTTP/1.1\r\nTransfer-encodi"..., 8192, 0, NULL, NULL) = 47
-12:03:32.634809 setsockopt(6, SOL_TCP, TCP_QUICKACK, [1], 4) = 0
-12:03:32.634952 socket(PF_INET, SOCK_STREAM, IPPROTO_TCP) = 7
-12:03:32.635031 fcntl(7, F_SETFL, O_RDONLY|O_NONBLOCK) = 0
-12:03:32.635089 setsockopt(7, SOL_TCP, TCP_NODELAY, [1], 4) = 0
-12:03:32.635153 connect(7, {sa_family=AF_INET, sin_port=htons(8003), sin_addr=inet_addr("127.0.0.1")}, 16) = -1 EINPROGRESS (Operation now in progress)
-12:03:32.635315 epoll_wait(3, {}, 200, 0) = 0
-12:03:32.635394 sendto(7, "POST / HTTP/1.1\r\nTransfer-encodi"..., 66, MSG_DONTWAIT|MSG_NOSIGNAL, NULL, 0) = 66
-12:03:32.635527 recvfrom(6, 0x7f0224e66024, 8192, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)
-12:03:32.635651 epoll_ctl(3, EPOLL_CTL_ADD, 6, {EPOLLIN|0x2000, {u32=6, u64=6}}) = 0
-12:03:32.635782 epoll_wait(3, {}, 200, 0) = 0
-12:03:32.635842 recvfrom(7, 0x7f0224e66024, 8192, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)
-12:03:32.635924 epoll_ctl(3, EPOLL_CTL_ADD, 7, {EPOLLIN|0x2000, {u32=7, u64=7}}) = 0
-12:03:32.636027 epoll_wait(3, {{EPOLLIN, {u32=6, u64=6}}}, 200, 1000) = 1
-12:03:32.644892 recvfrom(6, "10\r\nAZERTYUIOPQSDFGH\r\n0\r\n\r\n", 8192, 0, NULL, NULL) = 27
-12:03:32.645016 epoll_wait(3, {}, 200, 0) = 0
-12:03:32.645105 sendto(7, "10\r\nAZERTYUIOPQSDFGH\r\n0\r\n\r\n", 27, MSG_DONTWAIT|MSG_NOSIGNAL|MSG_MORE, NULL, 0) = 27
-
-After the fix :
-
-11:59:12.538617 connect(7, {sa_family=AF_INET, sin_port=htons(8003), sin_addr=inet_addr("127.0.0.1")}, 16) = -1 EINPROGRESS (Operation now in progress)
-11:59:12.538787 epoll_wait(3, {}, 200, 0) = 0
-11:59:12.538867 sendto(7, "POST / HTTP/1.1\r\nTransfer-encodi"..., 66, MSG_DONTWAIT|MSG_NOSIGNAL, NULL, 0) = 66
-11:59:12.539031 recvfrom(6, 0x7f832ce45024, 8192, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)
-11:59:12.539161 epoll_ctl(3, EPOLL_CTL_ADD, 6, {EPOLLIN|0x2000, {u32=6, u64=6}}) = 0
-11:59:12.539259 epoll_wait(3, {}, 200, 0) = 0
-11:59:12.539337 recvfrom(7, 0x7f832ce45024, 8192, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)
-11:59:12.539421 epoll_ctl(3, EPOLL_CTL_ADD, 7, {EPOLLIN|0x2000, {u32=7, u64=7}}) = 0
-11:59:12.539499 epoll_wait(3, {{EPOLLIN, {u32=6, u64=6}}}, 200, 1000) = 1
-11:59:12.548519 recvfrom(6, "10\r\nAZERTYUIOPQSDFGH\r\n0\r\n\r\n", 8192, 0, NULL, NULL) = 27
-11:59:12.548844 epoll_wait(3, {}, 200, 0) = 0
-11:59:12.549012 sendto(7, "10\r\nAZERTYUIOPQSDFGH\r\n0\r\n\r\n", 27, MSG_DONTWAIT|MSG_NOSIGNAL, NULL, 0) = 27
-11:59:12.549454 epoll_wait(3, {}, 200, 1000) = 0
-
-This fix must be backported to 1.6, 1.5 and 1.4.
-(cherry picked from commit 7f876a1eeb14ffae708327aad8a0b4b029da5e26)
-(cherry picked from commit 712a5339f384db62796aa4d4901e091dd7fd24dd)
----
- src/proto_http.c | 9 +++++++--
- 1 file changed, 7 insertions(+), 2 deletions(-)
-
-diff --git a/src/proto_http.c b/src/proto_http.c
-index e7e1785..b32e778 100644
---- a/src/proto_http.c
-+++ b/src/proto_http.c
-@@ -5001,6 +5001,13 @@ int http_sync_req_state(struct session *s)
-                */
-               chn->cons->flags |= SI_FL_NOHALF;
-+              /* In any case we've finished parsing the request so we must
-+               * disable Nagle when sending data because 1) we're not going
-+               * to shut this side, and 2) the server is waiting for us to
-+               * send pending data.
-+               */
-+              chn->flags |= CF_NEVER_WAIT;
-+
-               if (txn->rsp.msg_state == HTTP_MSG_ERROR)
-                       goto wait_other_side;
-@@ -5015,7 +5022,6 @@ int http_sync_req_state(struct session *s)
-                       /* if any side switches to tunnel mode, the other one does too */
-                       channel_auto_read(chn);
-                       txn->req.msg_state = HTTP_MSG_TUNNEL;
--                      chn->flags |= CF_NEVER_WAIT;
-                       goto wait_other_side;
-               }
-@@ -5048,7 +5054,6 @@ int http_sync_req_state(struct session *s)
-                       if ((txn->flags & TX_CON_WANT_MSK) == TX_CON_WANT_TUN) {
-                               channel_auto_read(chn);
-                               txn->req.msg_state = HTTP_MSG_TUNNEL;
--                              chn->flags |= CF_NEVER_WAIT;
-                       }
-               }
--- 
-2.4.10
-
diff --git a/net/haproxy/patches/0005-MINOR-config-extend-the-default-max-hostname-length-.patch b/net/haproxy/patches/0005-MINOR-config-extend-the-default-max-hostname-length-.patch
deleted file mode 100644 (file)
index 69e8f4f..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-From e77015cdc18ab74aba61cdf57de56d06be5c2a4d Mon Sep 17 00:00:00 2001
-From: Willy Tarreau <w@1wt.eu>
-Date: Wed, 14 Jan 2015 11:48:58 +0100
-Subject: [PATCH 05/10] MINOR: config: extend the default max hostname length
- to 64 and beyond
-
-Some users reported that the default max hostname length of 32 is too
-short in some environments. This patch does two things :
-
-  - it relies on the system's max hostname length as found in MAXHOSTNAMELEN
-    if it is set. This is the most logical thing to do as the system libs
-    generally present the appropriate value supported by the system. This
-    value is 64 on Linux and 256 on Solaris, to give a few examples.
-
-  - otherwise it defaults to 64
-
-It is still possible to override this value by defining MAX_HOSTNAME_LEN at
-build time. After some observation time, this patch may be backported to
-1.5 if it does not cause any build issue, as it is harmless and may help
-some users.
-(cherry picked from commit 75abcb3106e2c27ef983df885558cf94e01f717a)
-
-Cc: Lukas Tribus <luky-37@hotmail.com>
-Cc: jose.castro.leon@cern.ch
-
-[wt: no issue reported so far and Jose rightfully asked for it in 1.5]
----
- include/common/defaults.h | 8 ++++++--
- 1 file changed, 6 insertions(+), 2 deletions(-)
-
-diff --git a/include/common/defaults.h b/include/common/defaults.h
-index 0075509..a191b8a 100644
---- a/include/common/defaults.h
-+++ b/include/common/defaults.h
-@@ -190,8 +190,12 @@
- /* Maximum host name length */
- #ifndef MAX_HOSTNAME_LEN
--#define MAX_HOSTNAME_LEN      32
--#endif
-+#if MAXHOSTNAMELEN
-+#define MAX_HOSTNAME_LEN      MAXHOSTNAMELEN
-+#else
-+#define MAX_HOSTNAME_LEN      64
-+#endif // MAXHOSTNAMELEN
-+#endif // MAX_HOSTNAME_LEN
- /* Maximum health check description length */
- #ifndef HCHK_DESC_LEN
--- 
-2.4.10
-
diff --git a/net/haproxy/patches/0006-BUG-MEDIUM-http-don-t-enable-auto-close-on-the-respo.patch b/net/haproxy/patches/0006-BUG-MEDIUM-http-don-t-enable-auto-close-on-the-respo.patch
deleted file mode 100644 (file)
index 58d44f0..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-From 3de8e7ab8d9125402cc1a8fb48ee475ee21d7d4c Mon Sep 17 00:00:00 2001
-From: Willy Tarreau <w@1wt.eu>
-Date: Wed, 25 Nov 2015 20:11:11 +0100
-Subject: [PATCH 06/10] BUG/MEDIUM: http: don't enable auto-close on the
- response side
-
-There is a bug where "option http-keep-alive" doesn't force a response
-to stay in keep-alive if the server sends the FIN along with the response
-on the second or subsequent response. The reason is that the auto-close
-was forced enabled when recycling the HTTP transaction and it's never
-disabled along the response processing chain before the SHUTR gets a
-chance to be forwarded to the client side. The MSG_DONE state of the
-HTTP response properly disables it but too late.
-
-There's no more reason for enabling auto-close here, because either it
-doesn't matter in non-keep-alive modes because the connection is closed,
-or it is automatically enabled by process_stream() when it sees there's
-no analyser on the stream.
-
-This bug also affects 1.5 so a backport is desired.
-(cherry picked from commit 714ea78c9a09fe6a35a1f2d86af8f7fc9abb64d1)
-(cherry picked from commit a15091be17f27fcf4e3a84338df1a8b732e396a1)
----
- src/proto_http.c | 6 ++++--
- 1 file changed, 4 insertions(+), 2 deletions(-)
-
-diff --git a/src/proto_http.c b/src/proto_http.c
-index b32e778..5facfbb 100644
---- a/src/proto_http.c
-+++ b/src/proto_http.c
-@@ -4946,11 +4946,13 @@ void http_end_txn_clean_session(struct session *s)
-                       s->rep->flags |= CF_EXPECT_MORE;
-       }
--      /* we're removing the analysers, we MUST re-enable events detection */
-+      /* we're removing the analysers, we MUST re-enable events detection.
-+       * We don't enable close on the response channel since it's either
-+       * already closed, or in keep-alive with an idle connection handler.
-+       */
-       channel_auto_read(s->req);
-       channel_auto_close(s->req);
-       channel_auto_read(s->rep);
--      channel_auto_close(s->rep);
-       /* we're in keep-alive with an idle connection, monitor it */
-       si_idle_conn(s->req->cons);
--- 
-2.4.10
-
diff --git a/net/haproxy/patches/0007-BUG-MEDIUM-stream-fix-half-closed-timeout-handling.patch b/net/haproxy/patches/0007-BUG-MEDIUM-stream-fix-half-closed-timeout-handling.patch
deleted file mode 100644 (file)
index f80f1b5..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-From 9154bc92ed11c6de75573dec341b6a0ce68bd0eb Mon Sep 17 00:00:00 2001
-From: Willy Tarreau <w@1wt.eu>
-Date: Wed, 25 Nov 2015 20:17:27 +0100
-Subject: [PATCH 07/10] BUG/MEDIUM: stream: fix half-closed timeout handling
-
-client-fin and server-fin are bogus. They are applied on the write
-side after a SHUTR was seen. The immediate effect is that sometimes
-if a SHUTR was seen after a SHUTW on the same side, the timeout is
-enabled again regardless of the fact that the output is already
-closed. This results in the timeout event not to be processed and
-a busy poll loop to happen until another timeout on the stream gets
-rid of it. Note that haproxy continues its job during this, it's just
-that it eats all the CPU trying to handle an event that it ignores.
-
-An reproducible case consists in having a client stop reading data from
-a server to ensure data remain in the response buffer, then the client
-sends a shutdown(write). If abortonclose is enabled on haproxy, the
-shutdown is passed to the server side and the server responds with a
-SHUTR that cannot immediately be forwarded to the client since the
-buffer is full. During this time the event is ignored and the task is
-woken again in loops.
-
-It is worth noting that the timeout handling since 1.5 is a bit fragile
-and that it might be possible that other similar conditions still exist,
-so the timeout handling should be audited regarding this issue.
-
-Many thanks to BaiYang for providing detailed information showing the
-problem in action.
-
-This bug also affects 1.5 thus the fix must be backported.
-(cherry picked from commit f25b3573d65fd2411c7537b7b0a4817b478df909)
-[Note for 1.5, it's in session.c here]
-(cherry picked from commit 44e86286159474a52dc74f80d3271504cc6f1550)
----
- src/session.c | 16 ----------------
- 1 file changed, 16 deletions(-)
-
-diff --git a/src/session.c b/src/session.c
-index 7520a85..2b2ad78 100644
---- a/src/session.c
-+++ b/src/session.c
-@@ -2213,10 +2213,6 @@ struct task *process_session(struct task *t)
-       if (unlikely((s->req->flags & (CF_SHUTW|CF_SHUTW_NOW|CF_AUTO_CLOSE|CF_SHUTR)) ==
-                    (CF_AUTO_CLOSE|CF_SHUTR))) {
-               channel_shutw_now(s->req);
--              if (tick_isset(s->fe->timeout.clientfin)) {
--                      s->rep->wto = s->fe->timeout.clientfin;
--                      s->rep->wex = tick_add(now_ms, s->rep->wto);
--              }
-       }
-       /* shutdown(write) pending */
-@@ -2241,10 +2237,6 @@ struct task *process_session(struct task *t)
-               if (s->req->prod->flags & SI_FL_NOHALF)
-                       s->req->prod->flags |= SI_FL_NOLINGER;
-               si_shutr(s->req->prod);
--              if (tick_isset(s->fe->timeout.clientfin)) {
--                      s->rep->wto = s->fe->timeout.clientfin;
--                      s->rep->wex = tick_add(now_ms, s->rep->wto);
--              }
-       }
-       /* it's possible that an upper layer has requested a connection setup or abort.
-@@ -2391,10 +2383,6 @@ struct task *process_session(struct task *t)
-       if (unlikely((s->rep->flags & (CF_SHUTW|CF_SHUTW_NOW|CF_AUTO_CLOSE|CF_SHUTR)) ==
-                    (CF_AUTO_CLOSE|CF_SHUTR))) {
-               channel_shutw_now(s->rep);
--              if (tick_isset(s->be->timeout.serverfin)) {
--                      s->req->wto = s->be->timeout.serverfin;
--                      s->req->wex = tick_add(now_ms, s->req->wto);
--              }
-       }
-       /* shutdown(write) pending */
-@@ -2417,10 +2405,6 @@ struct task *process_session(struct task *t)
-               if (s->rep->prod->flags & SI_FL_NOHALF)
-                       s->rep->prod->flags |= SI_FL_NOLINGER;
-               si_shutr(s->rep->prod);
--              if (tick_isset(s->be->timeout.serverfin)) {
--                      s->req->wto = s->be->timeout.serverfin;
--                      s->req->wex = tick_add(now_ms, s->req->wto);
--              }
-       }
-       if (s->req->prod->state == SI_ST_DIS || s->req->cons->state == SI_ST_DIS)
--- 
-2.4.10
-
diff --git a/net/haproxy/patches/0008-BUG-MEDIUM-cli-changing-compression-rate-limiting-mu.patch b/net/haproxy/patches/0008-BUG-MEDIUM-cli-changing-compression-rate-limiting-mu.patch
deleted file mode 100644 (file)
index c42e656..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-From 07ccb48add8c8cb0dd8a0f7d3f4994866d0ef32e Mon Sep 17 00:00:00 2001
-From: Willy Tarreau <w@1wt.eu>
-Date: Thu, 26 Nov 2015 18:32:39 +0100
-Subject: [PATCH 08/10] BUG/MEDIUM: cli: changing compression rate-limiting
- must require admin level
-
-Right now it's possible to change the global compression rate limiting
-without the CLI being at the admin level.
-
-This fix must be backported to 1.6 and 1.5.
-(cherry picked from commit a1c2b2c4f3e65d198a0a4b25a4f655f7b307a855)
-(cherry picked from commit 9e5f1489c9f2d6926729890f249f7ebb9d3bfd43)
----
- src/dumpstats.c | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-diff --git a/src/dumpstats.c b/src/dumpstats.c
-index b4be2cd..b1bbf31 100644
---- a/src/dumpstats.c
-+++ b/src/dumpstats.c
-@@ -1695,6 +1695,12 @@ static int stats_sock_parse_request(struct stream_interface *si, char *line)
-                               if (strcmp(args[3], "global") == 0) {
-                                       int v;
-+                                      if (s->listener->bind_conf->level < ACCESS_LVL_ADMIN) {
-+                                              appctx->ctx.cli.msg = stats_permission_denied_msg;
-+                                              appctx->st0 = STAT_CLI_PRINT;
-+                                              return 1;
-+                                      }
-+
-                                       if (!*args[4]) {
-                                               appctx->ctx.cli.msg = "Expects a maximum input byte rate in kB/s.\n";
-                                               appctx->st0 = STAT_CLI_PRINT;
--- 
-2.4.10
-
diff --git a/net/haproxy/patches/0009-BUILD-freebsd-double-declaration.patch b/net/haproxy/patches/0009-BUILD-freebsd-double-declaration.patch
deleted file mode 100644 (file)
index bc2072c..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-From 97ef6f99b8426ffdc97864fc8bb2d85c87cfdad0 Mon Sep 17 00:00:00 2001
-From: Thierry FOURNIER <tfournier@arpalert.org>
-Date: Tue, 3 Nov 2015 19:17:37 +0100
-Subject: [PATCH 09/10] BUILD: freebsd: double declaration
-
-On freebsd, the macro LIST_PREV already exists in the header file
-<sys/queue.h>, and this makes a build error.
-
-This patch removes the macros before declaring it. This ensure
-that the error doesn't occurs.
-(cherry picked from commit 1db96672c4cd264ebca8197bec93a5ce1b23aaa9)
-(cherry picked from commit 6cf9c6b270e57f05abf72cd61f4facb5b6980d57)
----
- include/common/mini-clist.h | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/include/common/mini-clist.h b/include/common/mini-clist.h
-index 3c3f001..404b6fa 100644
---- a/include/common/mini-clist.h
-+++ b/include/common/mini-clist.h
-@@ -144,6 +144,7 @@ struct cond_wordlist {
-  * which contains list head <lh>, which is known as element <el> in
-  * struct pt.
-  */
-+#undef LIST_PREV
- #define LIST_PREV(lh, pt, el) (LIST_ELEM((lh)->p, pt, el))
- /*
--- 
-2.4.10
-
diff --git a/net/haproxy/patches/0010-BUG-MEDIUM-sample-urlp-can-t-match-an-empty-value.patch b/net/haproxy/patches/0010-BUG-MEDIUM-sample-urlp-can-t-match-an-empty-value.patch
deleted file mode 100644 (file)
index 6dbab2b..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-From 0f836e1361933721c5689c7943143fd6cd260148 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Cyril=20Bont=C3=A9?= <cyril.bonte@free.fr>
-Date: Thu, 26 Nov 2015 21:39:56 +0100
-Subject: [PATCH 10/10] BUG/MEDIUM: sample: urlp can't match an empty value
-
-Currently urlp fetching samples were able to find parameters with an empty
-value, but the return code depended on the value length. The final result was
-that acls using urlp couldn't match empty values.
-
-Example of acl which always returned "false":
-  acl MATCH_EMPTY urlp(foo) -m len 0
-
-The fix consists in unconditionally return 1 when the parameter is found.
-
-This fix must be backported to 1.6 and 1.5.
-(cherry picked from commit ce1ef4df0135f9dc1cb6691395eacb487015fe3e)
-(cherry picked from commit 6bd426cf35c95985712369ed528c10a5f80ad8fd)
-[ note: in 1.5 we have value+value_l instead of vstart+vend ]
----
- src/proto_http.c | 10 ++++++----
- 1 file changed, 6 insertions(+), 4 deletions(-)
-
-diff --git a/src/proto_http.c b/src/proto_http.c
-index 5facfbb..3af7880 100644
---- a/src/proto_http.c
-+++ b/src/proto_http.c
-@@ -11050,9 +11050,11 @@ find_url_param_pos(char* query_string, size_t query_string_l,
- }
- /*
-- * Given a url parameter name, returns its value and size into *value and
-- * *value_l respectively, and returns non-zero. If the parameter is not found,
-- * zero is returned and value/value_l are not touched.
-+ * Given a url parameter name and a query string, find the next value.
-+ * An empty url_param_name matches the first available parameter.
-+ * If the parameter is found, 1 is returned and *value / *value_l are updated
-+ * to respectively provide a pointer to the value and its length.
-+ * Otherwise, 0 is returned and value/value_l are not modified.
-  */
- static int
- find_url_param_value(char* path, size_t path_l,
-@@ -11082,7 +11084,7 @@ find_url_param_value(char* path, size_t path_l,
-       *value = value_start;
-       *value_l = value_end - value_start;
--      return value_end != value_start;
-+      return 1;
- }
- static int
--- 
-2.4.10
-
diff --git a/net/iptraf-ng/Makefile b/net/iptraf-ng/Makefile
new file mode 100644 (file)
index 0000000..9084867
--- /dev/null
@@ -0,0 +1,64 @@
+#
+# Copyright (C) 2016 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=iptraf-ng
+PKG_VERSION:=1.1.4
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://fedorahosted.org/releases/i/p/iptraf-ng/
+PKG_MD5SUM:=de27cfeeede96e2acfb0edc8439b034a
+
+PKG_LICENSE:=GPL-2.0
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_MAINTAINER:=Florian Fainelli <florian@openwrt.org>
+
+PKG_CHECK_FORMAT_SECURITY:=0
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/iptraf-ng
+  SECTION:=net
+  CATEGORY:=Network
+  DEPENDS:=+libncurses
+  TITLE:=A console-based network monitoring program
+  URL:=https://fedorahosted.org/iptraf-ng/
+endef
+
+define Package/iptraf-ng/description
+  iptraf-ng is a console-based network statistics utility for Linux. It gathers a
+  variety of figures such as TCP connection packet and byte counts, interface
+  statistics and activity indicators, TCP/UDP traffic breakdowns, and LAN
+  station packet and byte counts.
+endef
+
+define Package/iptraf-ng/postinst
+#!/bin/sh
+if [ -z "$${IPKG_INSTROOT}" ]; then
+       mkdir -p $${IPKG_INSTROOT}/var/log/iptraf-ng \
+                $${IPKG_INSTROOT}/var/run/iptraf-ng \
+                $${IPKG_INSTROOT}/var/lib/iptraf-ng
+fi
+endef
+
+MAKE_FLAGS += \
+       CFLAGS="$(TARGET_CFLAGS) -std=gnu99" \
+       CPPFLAGS="$(TARGET_CPPFLAGS) -D_GNU_SOURCE" \
+       NCURSES_CFLAGS="$(TARGET_CFLAGS)" \
+       NCURSES_LDFLAGS="$(TARGET_LDFLAGS) -lncurses -lpanel" \
+       iptraf-ng rvnamed-ng
+
+define Package/iptraf-ng/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/iptraf-ng $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/rvnamed-ng $(1)/usr/bin/
+endef
+
+$(eval $(call BuildPackage,iptraf-ng))
diff --git a/net/isc-dhcp/Makefile b/net/isc-dhcp/Makefile
new file mode 100644 (file)
index 0000000..1de5981
--- /dev/null
@@ -0,0 +1,241 @@
+#
+# Copyright (C) 2006-2012 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:=isc-dhcp
+UPSTREAM_NAME:=dhcp
+PKG_VERSION:=4.3.3
+PKG_RELEASE:=1
+
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=LICENSE
+PKG_MAINTAINER:=Antony Antony <antony@phenome.org>
+
+PKG_SOURCE:=$(UPSTREAM_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=ftp://ftp.isc.org/isc/dhcp/$(PKG_VERSION)
+PKG_MD5SUM:=c5577b09c9017cdd319a11ff6364268e
+
+PKG_FIXUP:=autoreconf
+PKG_BUILD_PARALLEL:=1
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(UPSTREAM_NAME)-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/isc-dhcp/Default
+  SECTION:=net
+  CATEGORY:=Network
+  SUBMENU:=IP Addresses and Names
+  TITLE:=ISC's DHCP
+  URL:=https://www.isc.org/software/dhcp
+endef
+
+define Package/isc-dhcp-relay-ipv4
+  $(call Package/isc-dhcp/Default)
+  TITLE+= relay (without IPv6)
+  VARIANT:=ipv4
+endef
+
+define Package/isc-dhcp-relay-ipv6
+  $(call Package/isc-dhcp/Default)
+  TITLE+= relay (with IPv6)
+  VARIANT:=ipv6
+endef
+
+define Package/isc-dhcp-relay/description
+ provides a means for relaying DHCP and BOOTP requests from a subnet to which
+ no DHCP server is directly connected to one or more DHCP servers on other
+ subnets.
+endef
+
+define Package/isc-dhcp-relay-ipv4/description
+$(call Package/isc-dhcp-relay-ipv6/description)
+ This package is compiled with IPv4 support only.
+endef
+
+define Package/isc-dhcp-relay-ipv4/conffiles
+/etc/config/dhcrelay
+endef
+
+define Package/isc-dhcp-relay-ipv6/description
+$(call Package/isc-dhcp-relay/description)
+ This package is compiled with IPv4 and IPv6 support.
+endef
+
+define Package/isc-dhcp-relay-ipv6/conffiles
+/etc/config/dhcrelay
+endef
+
+define Package/isc-dhcp-client-ipv4
+  $(call Package/isc-dhcp/Default)
+  TITLE+= client (without IPv6)
+  VARIANT:=ipv4
+endef
+
+define Package/isc-dhcp-client-ipv6
+  $(call Package/isc-dhcp/Default)
+  TITLE+= client (with IPv6)
+  VARIANT:=ipv6
+endef
+
+define Package/isc-dhcp-client/description
+ provides a means for configuring one or more network interfaces using the
+ Dynamic Host Configuration Protocol, BOOTP protocol, or if these protocols
+ fail, by statically assigning an address.
+endef
+
+define Package/isc-dhcp-client-ipv4/description
+$(call Package/isc-dhcp-client/description)
+ This package is compiled with IPv4 support only.
+endef
+
+define Package/isc-dhcp-client-ipv6/description
+$(call Package/isc-dhcp-client/description)
+ This package is compiled with IPv4 and IPv6 support.
+endef
+
+define Package/isc-dhcp-server-ipv4
+  $(call Package/isc-dhcp/Default)
+  TITLE+= server (without IPv6)
+  VARIANT:=ipv4
+endef
+
+define Package/isc-dhcp-server-ipv6
+  $(call Package/isc-dhcp/Default)
+  TITLE+= server (with IPv6)
+  VARIANT:=ipv6
+endef
+
+define Package/isc-dhcp-server/description
+ implements the Dynamic Host Configuration Protocol (DHCP) and the Internet
+ Bootstrap Protocol (BOOTP).
+endef
+
+define Package/isc-dhcp-server-ipv4/description
+$(call Package/isc-dhcp-server/description)
+ This package is compiled with IPv4 support only.
+endef
+
+define Package/isc-dhcp-server-ipv6/description
+$(call Package/isc-dhcp-server/description)
+ This package is compiled with IPv4 and IPv6 support.
+endef
+
+define Package/isc-dhcp-omshell-ipv4
+  $(call Package/isc-dhcp/Default)
+  DEPENDS:= +isc-dhcp-server-ipv4
+  TITLE+= omshell (without IPv6)
+  VARIANT:=ipv4
+endef
+
+define Package/isc-dhcp-omshell-ipv6
+  $(call Package/isc-dhcp/Default)
+  DEPENDS:= +isc-dhcp-server-ipv6
+  TITLE+= omshell (with IPv6)
+  VARIANT:=ipv6
+endef
+
+define Package/isc-dhcp-omshell/description
+ provides an interactive way to connect to, query, and possibly change, the ISC
+ DHCP Server's state via OMAPI, the Object Management API.
+endef
+
+define Package/isc-dhcp-omshell-ipv4/description
+$(call Package/isc-dhcp-omshell/description)
+ This package is compiled with IPv4 support only.
+endef
+
+define Package/isc-dhcp-omshell-ipv6/description
+$(call Package/isc-dhcp-omshell/description)
+ This package is compiled with IPv4 and IPv6 support.
+endef
+
+CONFIGURE_ARGS += \
+       --disable-tracing               \
+       --enable-paranoia               \
+       --disable-dependency-tracking   \
+       --with-randomdev=/dev/urandom \
+       ac_cv_file__dev_random=yes
+
+ifeq ($(BUILD_VARIANT),ipv4)
+  CONFIGURE_ARGS += --disable-dhcpv6
+endif
+ifeq ($(BUILD_VARIANT),ipv6)
+  CONFIGURE_ARGS += --enable-dhcpv6
+endif
+
+define Build/Compile
+       $(MAKE) -C $(PKG_BUILD_DIR)                     \
+               DESTDIR="$(PKG_INSTALL_DIR)"            \
+               BUILD_CC="$(HOSTCC_NOCACHE)"            \
+               CROSS_CC="$(TARGET_CC)"                 \
+               host_alias="$(GNU_TARGET_NAME)"         \
+               target_alias="$(GNU_TARGET_NAME)"       \
+               build_alias="$(GNU_HOST_NAME)"          \
+               all install-exec
+endef
+
+define Package/isc-dhcp-relay-$(BUILD_VARIANT)/install
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dhcrelay $(1)/usr/sbin
+       $(INSTALL_DIR) $(1)/etc/config
+       $(INSTALL_DATA) ./files/etc/config/dhcrelay $(1)/etc/config
+       $(INSTALL_DIR) $(1)/etc/init.d
+       $(INSTALL_BIN) ./files/dhcrelay4.init $(1)/etc/init.d/dhcrelay4
+endef
+
+define Package/isc-dhcp-server-$(BUILD_VARIANT)/install
+       $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc
+       $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/init.d
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dhcpd $(1)/usr/sbin
+       $(INSTALL_BIN) ./files/dhcpd.init $(1)/etc/init.d/dhcpd
+       $(INSTALL_BIN) ./files/dhcpd.conf $(1)/etc
+ifeq ($(BUILD_VARIANT),ipv6)
+       $(INSTALL_BIN) ./files/dhcpd6.init $(1)/etc/init.d/dhcpd6
+       $(INSTALL_BIN) ./files/dhcpd6.conf $(1)/etc
+endif
+endef
+
+define Package/isc-dhcp-server-ipv4/conffiles
+/etc/dhcpd.conf
+endef
+
+define Package/isc-dhcp-server-ipv6/conffiles
+/etc/dhcpd6.conf
+endef
+
+define Package/isc-dhcp-client-$(BUILD_VARIANT)/install
+       $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dhclient $(1)/usr/sbin
+       $(INSTALL_BIN) ./files/dhclient-script $(1)/usr/sbin/
+ifeq ($(BUILD_VARIANT),ipv6)
+       $(INSTALL_BIN) ./files/dhclient6.conf $(1)/etc
+endif
+endef
+
+define Package/isc-dhcp-client-ipv4/conffiles
+/etc/dhclient.conf
+endef
+
+define Package/isc-dhcp-client-ipv6/conffiles
+/etc/dhclient6.conf
+endef
+
+define Package/isc-dhcp-omshell-$(BUILD_VARIANT)/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/omshell $(1)/usr/bin
+endef
+
+$(eval $(call BuildPackage,isc-dhcp-relay-ipv4))
+$(eval $(call BuildPackage,isc-dhcp-server-ipv4))
+$(eval $(call BuildPackage,isc-dhcp-client-ipv4))
+$(eval $(call BuildPackage,isc-dhcp-omshell-ipv4))
+$(eval $(call BuildPackage,isc-dhcp-relay-ipv6))
+$(eval $(call BuildPackage,isc-dhcp-server-ipv6))
+$(eval $(call BuildPackage,isc-dhcp-client-ipv6))
+$(eval $(call BuildPackage,isc-dhcp-omshell-ipv6))
diff --git a/net/isc-dhcp/files/dhclient-script b/net/isc-dhcp/files/dhclient-script
new file mode 100644 (file)
index 0000000..4afebc0
--- /dev/null
@@ -0,0 +1,281 @@
+#!/bin/sh
+
+make_resolv_conf() {
+  if [ x"$new_domain_name_servers" != x ]; then
+    cat /dev/null > /etc/resolv.conf.dhclient
+    chmod 644 /etc/resolv.conf.dhclient
+    if [ x"$new_domain_search" != x ]; then
+      echo search $new_domain_search >> /etc/resolv.conf.dhclient
+    elif [ x"$new_domain_name" != x ]; then
+      # Note that the DHCP 'Domain Name Option' is really just a domain
+      # name, and that this practice of using the domain name option as
+      # a search path is both nonstandard and deprecated.
+      echo search $new_domain_name >> /etc/resolv.conf.dhclient
+    fi
+    for nameserver in $new_domain_name_servers; do
+      echo nameserver $nameserver >>/etc/resolv.conf.dhclient
+    done
+
+  elif [ "x${new_dhcp6_name_servers}" != x ] ; then
+    cat /dev/null > /etc/resolv.conf.dhclient6
+    chmod 644 /etc/resolv.conf.dhclient6
+
+    if [ "x${new_dhcp6_domain_search}" != x ] ; then
+      echo search ${new_dhcp6_domain_search} >> /etc/resolv.conf.dhclient6
+    fi
+    for nameserver in ${new_dhcp6_name_servers} ; do
+      echo nameserver ${nameserver} >> /etc/resolv.conf.dhclient6
+    done
+  fi
+
+  # if both v4 and v6 clients are running, concatenate results
+  cat /etc/resolv.conf.* > /etc/resolv.conf
+}
+
+# Must be used on exit.   Invokes the local dhcp client exit hooks, if any.
+exit_with_hooks() {
+  exit_status=$1
+  if [ -f /etc/dhclient-exit-hooks ]; then
+    . /etc/dhclient-exit-hooks
+  fi
+# probably should do something with exit status of the local script
+  exit $exit_status
+}
+
+# Invoke the local dhcp client enter hooks, if they exist.
+if [ -f /etc/dhclient-enter-hooks ]; then
+  exit_status=0
+  . /etc/dhclient-enter-hooks
+  # allow the local script to abort processing of this state
+  # local script must set exit_status variable to nonzero.
+  if [ $exit_status -ne 0 ]; then
+    exit $exit_status
+  fi
+fi
+
+###
+### DHCPv4 Handlers
+###
+
+if [ x$new_broadcast_address != x ]; then
+  new_broadcast_arg="broadcast $new_broadcast_address"
+fi
+if [ x$new_subnet_mask != x ]; then
+  new_subnet_arg="netmask $new_subnet_mask"
+fi
+if [ x$alias_subnet_mask != x ]; then
+  alias_subnet_arg="netmask $alias_subnet_mask"
+fi
+
+if [ x$reason = xMEDIUM ]; then
+  # Linux doesn't do mediums (ok, ok, media).
+  exit_with_hooks 0
+fi
+
+if [ x$reason = xPREINIT ]; then
+  if [ x$alias_ip_address != x ]; then
+    # Bring down alias interface. Its routes will disappear too.
+    ifconfig $interface:0- 0.0.0.0
+  fi
+  ifconfig $interface 0.0.0.0 up
+
+  # We need to give the kernel some time to get the interface up.
+  sleep 1
+
+  exit_with_hooks 0
+fi
+
+if [ x$reason = xARPCHECK ] || [ x$reason = xARPSEND ]; then
+  exit_with_hooks 0
+fi
+  
+if [ x$reason = xBOUND ] || [ x$reason = xRENEW ] || \
+   [ x$reason = xREBIND ] || [ x$reason = xREBOOT ]; then
+  current_hostname=`hostname`
+  if [ x$current_hostname = x ] || \
+     [ x$current_hostname = x$old_host_name ]; then
+    if [ x$current_hostname = x ] || \
+       [ x$new_host_name != x$old_host_name ]; then
+      hostname $new_host_name
+    fi
+  fi
+    
+  if [ x$old_ip_address != x ] && [ x$alias_ip_address != x ] && \
+               [ x$alias_ip_address != x$old_ip_address ]; then
+    # Possible new alias. Remove old alias.
+    ifconfig $interface:0- 0.0.0.0
+  fi
+  if [ x$old_ip_address != x ] && [ x$old_ip_address != x$new_ip_address ]; then
+    # IP address changed. Bringing down the interface will delete all routes,
+    # and clear the ARP cache.
+    ifconfig $interface 0.0.0.0 down
+
+  fi
+  if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \
+     [ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then
+
+    ifconfig $interface $new_ip_address $new_subnet_arg \
+                                                       $new_broadcast_arg
+    for router in $new_routers; do
+      if [ "x$new_subnet_mask" = "x255.255.255.255" ] ; then
+       route add -host $router dev $interface
+      fi
+      route add default gw $router
+    done
+  fi
+  if [ x$new_ip_address != x$alias_ip_address ] && [ x$alias_ip_address != x ];
+   then
+    ifconfig $interface:0- 0.0.0.0
+    ifconfig $interface:0 $alias_ip_address $alias_subnet_arg
+    route add -host $alias_ip_address $interface:0
+  fi
+  make_resolv_conf
+  exit_with_hooks 0
+fi
+
+if [ x$reason = xEXPIRE ] || [ x$reason = xFAIL ] || [ x$reason = xRELEASE ] \
+   || [ x$reason = xSTOP ]; then
+  if [ x$alias_ip_address != x ]; then
+    # Turn off alias interface.
+    ifconfig $interface:0- 0.0.0.0
+  fi
+  if [ x$old_ip_address != x ]; then
+    # Shut down interface, which will delete routes and clear arp cache.
+    ifconfig $interface 0.0.0.0 down
+  fi
+  if [ x$alias_ip_address != x ]; then
+    ifconfig $interface:0 $alias_ip_address $alias_subnet_arg
+    route add -host $alias_ip_address $interface:0
+  fi
+
+  # remove v4 dns configuration for this interface
+  rm /etc/resolv.conf.dhclient
+  cat /etc/resolv.conf.* > /etc/resolv.conf
+
+  exit_with_hooks 0
+fi
+
+if [ x$reason = xTIMEOUT ]; then
+  if [ x$alias_ip_address != x ]; then
+    ifconfig $interface:0- 0.0.0.0
+  fi
+  ifconfig $interface $new_ip_address $new_subnet_arg \
+                                       $new_broadcast_arg
+  set $new_routers
+  if ping -q -c 1 $1; then
+    if [ x$new_ip_address != x$alias_ip_address ] && \
+                       [ x$alias_ip_address != x ]; then
+      ifconfig $interface:0 $alias_ip_address $alias_subnet_arg
+      route add -host $alias_ip_address dev $interface:0
+    fi
+    for router in $new_routers; do
+      if [ "x$new_subnet_mask" = "x255.255.255.255" ] ; then
+       route add -host $router dev $interface
+      fi
+      route add default gw $router
+    done
+    make_resolv_conf
+    exit_with_hooks 0
+  fi
+  ifconfig $interface 0.0.0.0 down
+  exit_with_hooks 1
+fi
+
+###
+### DHCPv6 Handlers
+###
+
+if [ x$reason = xPREINIT6 ]; then
+  # Ensure interface is up.
+  ifconfig ${interface} up
+
+  # Remove any stale addresses from aborted clients.
+  ip -f inet6 addr flush dev ${interface} scope global
+
+  exit_with_hooks 0
+fi
+
+if [ x${old_ip6_prefix} != x ] || [ x${new_ip6_prefix} != x ] ; then
+    echo Prefix ${reason} old=${old_ip6_prefix} new=${new_ip6_prefix}
+
+    exit_with_hooks 0
+fi
+
+if [ x$reason = xBOUND6 ]; then
+  if [ x${new_ip6_address} = x ] || [ x${new_ip6_prefixlen} = x ] ; then
+    exit_with_hooks 2;
+  fi
+
+  ifconfig ${interface} add ${new_ip6_address}/${new_ip6_prefixlen}
+
+  # Check for nameserver options.
+  make_resolv_conf
+
+### <<
+  # Set up softwire tunnel
+  if [ x${new_dhcp6_softwire} != x ] ; then
+    /etc/init.d/dhclient stop
+    ifconfig ${interface} 0.0.0.0
+    ip -6 tunnel add tun0 mode ipip6 \
+       remote ${new_dhcp6_softwire} \
+       local ${new_ip6_address} \
+       dev ${interface} encaplimit none
+    ip link set tun0 up
+    ip route add default dev tun0
+  fi
+### >>
+
+  exit_with_hooks 0
+fi
+
+if [ x$reason = xRENEW6 ] || [ x$reason = xREBIND6 ]; then
+  if [ x${new_ip6_address} = x ] || [ x${new_ip6_prefixlen} = x ] ; then
+    exit_with_hooks 2;
+  fi
+
+  ifconfig ${interface} add ${new_ip6_address}/${new_ip6_prefixlen}
+
+  # Make sure nothing has moved around on us.
+
+  # Nameservers/domains/etc.
+  if [ "x${new_dhcp6_name_servers}" != "x${old_dhcp6_name_servers}" ] ||
+     [ "x${new_dhcp6_domain_search}" != "x${old_dhcp6_domain_search}" ] ; then
+    make_resolv_conf
+  fi
+
+  exit_with_hooks 0
+fi
+
+if [ x$reason = xDEPREF6 ]; then
+  if [ x${new_ip6_address} = x ] ; then
+    exit_with_hooks 2;
+  fi
+
+  # Busybox ifconfig has no way to communicate this to the kernel, so ignore it
+
+  exit_with_hooks 0
+fi
+
+if [ x$reason = xEXPIRE6 -o x$reason = xRELEASE6 -o x$reason = xSTOP6 ]; then
+  if [ x${old_ip6_address} = x ] || [ x${old_ip6_prefixlen} = x ] ; then
+    exit_with_hooks 2;
+  fi
+
+  ifconfig ${interface} del ${old_ip6_address}/${old_ip6_prefixlen}
+
+  # remove v6 dns configuration for this interface
+  rm /etc/resolv.conf.dhclient6
+  cat /etc/resolv.conf.* > /etc/resolv.conf
+
+### <<
+  # Tear down softwire tunnel
+  if [ x${old_dhcp6_softwire} != x ] ; then
+    ip link set tun0 down
+    ip tunnel del tun0
+  fi
+### >>
+
+  exit_with_hooks 0
+fi
+
+exit_with_hooks 0
diff --git a/net/isc-dhcp/files/dhclient.init b/net/isc-dhcp/files/dhclient.init
new file mode 100644 (file)
index 0000000..b5ffb41
--- /dev/null
@@ -0,0 +1,30 @@
+#!/bin/sh /etc/rc.common
+
+START=60
+
+lease_file=/var/dhclient.leases
+config_file=/etc/dhclient.conf
+pid_file=/var/run/dhclient.pid
+script_file=/usr/sbin/dhclient-script
+
+start() {
+       /usr/sbin/dhclient -q -nw -cf $config_file -lf $lease_file -pf $pid_file -sf $script_file `/sbin/uci get network.wan.ifname`
+       
+       if [ $? -ne 0 ]; then
+               return 1
+       fi
+}
+
+stop() {
+       if [ ! -e $pid_file ]; then
+               return 1
+       fi
+
+       kill -9 `cat $pid_file`
+
+       if [ $? -ne 0 ]; then
+               return 1
+       fi
+
+       rm $pid_file
+}
diff --git a/net/isc-dhcp/files/dhclient6.conf b/net/isc-dhcp/files/dhclient6.conf
new file mode 100644 (file)
index 0000000..ab44699
--- /dev/null
@@ -0,0 +1,2 @@
+option dhcp6.softwire code 54 = ip6-address;
+also request dhcp6.softwire;
diff --git a/net/isc-dhcp/files/dhclient6.init b/net/isc-dhcp/files/dhclient6.init
new file mode 100644 (file)
index 0000000..630c3f2
--- /dev/null
@@ -0,0 +1,30 @@
+#!/bin/sh /etc/rc.common
+
+START=60
+
+lease_file=/var/dhclient6.leases
+config_file=/etc/dhclient6.conf
+pid_file=/var/run/dhclient6.pid
+script_file=/usr/sbin/dhclient-script
+
+start() {
+       /usr/sbin/dhclient -q -nw -6 -cf $config_file -lf $lease_file -pf $pid_file -sf $script_file `/sbin/uci get network.wan.ifname`
+       
+       if [ $? -ne 0 ]; then
+               return 1
+       fi
+}
+
+stop() {
+       if [ ! -e $pid_file ]; then
+               return 1
+       fi
+
+       kill -9 `cat $pid_file`
+
+       if [ $? -ne 0 ]; then
+               return 1
+       fi
+       
+       rm $pid_file
+}
diff --git a/net/isc-dhcp/files/dhcpd.conf b/net/isc-dhcp/files/dhcpd.conf
new file mode 100644 (file)
index 0000000..11985ce
--- /dev/null
@@ -0,0 +1,13 @@
+# dhcpd.conf
+
+authoritative;
+
+default-lease-time 3600;
+max-lease-time 86400;
+
+option domain-name-servers 192.168.1.1;
+
+subnet 192.168.1.0 netmask 255.255.255.0 {
+  range 192.168.1.10 192.168.1.50;
+  option routers 192.168.1.1;
+}
diff --git a/net/isc-dhcp/files/dhcpd.init b/net/isc-dhcp/files/dhcpd.init
new file mode 100644 (file)
index 0000000..3ca6c64
--- /dev/null
@@ -0,0 +1,33 @@
+#!/bin/sh /etc/rc.common
+
+START=65
+
+lease_file=/tmp/dhcpd.leases
+config_file=/etc/dhcpd.conf
+pid_file=/var/run/dhcpd.pid
+
+start() {
+       if [ ! -e $lease_file ]; then
+               touch $lease_file
+       fi
+
+       /usr/sbin/dhcpd -q -cf $config_file -lf $lease_file -pf $pid_file $dhcp_ifs
+
+       if [ $? -ne 0 ]; then
+               return 1
+       fi
+}
+
+stop() {
+       if [ ! -e $pid_file ]; then
+               return 1
+       fi
+
+       kill -9 `cat $pid_file`
+
+       if [ $? -ne 0 ]; then
+               return 1
+       fi
+
+       rm $pid_file
+}
diff --git a/net/isc-dhcp/files/dhcpd6.conf b/net/isc-dhcp/files/dhcpd6.conf
new file mode 100644 (file)
index 0000000..1c0baae
--- /dev/null
@@ -0,0 +1,30 @@
+# dhcpd6.conf
+
+authoritative;
+
+default-lease-time 3600;
+max-lease-time 86400;
+
+# Enable RFC 5007 support
+#allow leasequery;
+
+# Global definitions for name server address(es) and domain search list
+#option dhcp6.name-servers 3ffe:501:ffff:100:200:ff:fe00:3f3e;
+#option dhcp6.domain-search "test.example.com","example.com";
+
+# Set preference to 255 (maximum) in order to avoid waiting for
+# additional servers when there is only one
+#option dhcp6.preference 255;
+
+# Server side command to enable rapid-commit (2 packet exchange)
+#option dhcp6.rapid-commit;
+
+# The delay before information-request refresh
+#  (minimum is 10 minutes, maximum one day, default is to not refresh)
+#  (set to 6 hours)
+#option dhcp6.info-refresh-time 3600;
+
+subnet6 3ffe:501:ffff:101::/64 {
+       # Use the whole /64 prefix for clients
+       range6 3ffe:501:ffff:101:: /64;
+}
diff --git a/net/isc-dhcp/files/dhcpd6.init b/net/isc-dhcp/files/dhcpd6.init
new file mode 100644 (file)
index 0000000..e38e38b
--- /dev/null
@@ -0,0 +1,33 @@
+#!/bin/sh /etc/rc.common
+
+START=65
+
+lease_file=/var/dhcpd6.leases
+config_file=/etc/dhcpd6.conf
+pid_file=/var/run/dhcpd6.pid
+
+start() {
+       if [ ! -e $lease_file ]; then
+               touch $lease_file
+       fi
+
+       /usr/sbin/dhcpd -q -6 -cf $config_file -lf $lease_file -pf $pid_file $dhcp_ifs
+
+       if [ $? -ne 0 ]; then
+               return 1
+       fi
+}
+
+stop() {
+       if [ ! -e $pid_file ]; then
+               return 1
+       fi
+
+       kill -9 `cat $pid_file`
+
+       if [ $? -ne 0 ]; then
+               return 1
+       fi
+
+       rm $pid_file
+}
diff --git a/net/isc-dhcp/files/dhcrelay4.init b/net/isc-dhcp/files/dhcrelay4.init
new file mode 100644 (file)
index 0000000..9af0f84
--- /dev/null
@@ -0,0 +1,53 @@
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2012 OpenWrt.org
+
+START=91
+
+SERVICE_SIG="KILL"
+SERVICE_PID_FILE="/var/run/dhcrelay4.pid"
+SERVICE_USE_PID=1
+
+start() {
+       . /lib/functions/network.sh
+       config_load dhcrelay
+       local args=""
+
+       local enabled
+       config_get_bool enabled ipv4 enabled 0
+       [ "$enabled" -eq 0 ] && return 0
+
+       # listen interfaces
+       local interfaces
+       local ifname
+       config_get interfaces ipv4 interfaces
+       for net in $interfaces; do
+               if network_get_device ifname "$net"; then
+                       append args "-i $ifname"
+               fi
+       done
+
+       # link selection sub-option (RFC3527)
+       local link_selection
+       config_get link_selection ipv4 link_selection
+       if network_get_device ifname "$link_selection"; then
+               append args "-l $ifname"
+       fi
+
+       # relay mode
+       local relay_mode
+       config_get relay_mode ipv4 relay_mode
+       [ -n "$relay_mode" ] && append args "-m $relay_mode"
+
+       # dhcp server address
+       local server
+       config_get server ipv4 dhcpserver
+       [ -n "$server" ] || return 0
+       append args "$server"
+
+       service_start /usr/sbin/dhcrelay -4 -q \
+               -pf $SERVICE_PID_FILE $args
+}
+
+stop() {
+       service_stop /usr/sbin/dhcrelay
+}
diff --git a/net/isc-dhcp/files/dhcrelay6.init b/net/isc-dhcp/files/dhcrelay6.init
new file mode 100644 (file)
index 0000000..0c6f756
--- /dev/null
@@ -0,0 +1,42 @@
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2012 OpenWrt.org
+
+START=91
+
+SERVICE_SIG="KILL"
+SERVICE_PID_FILE="/var/run/dhcrelay6.pid"
+SERVICE_USE_PID=1
+
+start() {
+    local relay_dhcpserver
+    local relay_upper
+    local relay_lowers
+    local relay_lower_args
+
+    config_load dhcrelay
+    config_get relay_dhcpserver ipv6 dhcpserver
+    config_get relay_upper ipv6 upper
+    config_get relay_lowers ipv6 lower
+
+    # If a specific DHCP server is specified,
+    # add it to the upper interface.
+    if [ -n "$relay_dhcpserver" ]; then
+        relay_upper="${relay_dhcpserver}%$relay_upper"
+    fi
+
+    # Add all lower interfaces at the end.
+    if [ -n "$relay_lowers" ]; then
+        local relay_lower
+        for relay_lower in $relay_lowers; do
+            append relay_lower_args "-l $relay_lower"
+        done
+    fi
+
+    service_start /usr/sbin/dhcrelay -6 -q \
+        -pf $SERVICE_PID_FILE \
+        -u $relay_upper $relay_lower_args
+}
+
+stop() {
+    service_stop /usr/sbin/dhcrelay
+}
diff --git a/net/isc-dhcp/files/etc/config/dhcrelay b/net/isc-dhcp/files/etc/config/dhcrelay
new file mode 100644 (file)
index 0000000..b3b53b5
--- /dev/null
@@ -0,0 +1,27 @@
+
+config dhcrelay ipv4
+       option 'enabled' '0'
+
+       # IP address of the server
+       option 'dhcpserver' '192.0.2.10'
+
+       # network interfaces to listen on (e.g. lan or wan)
+       option 'interfaces' ''
+
+       # What to do about packets that already have a relay option:
+       # 'append': Forward and append our own relay option
+       # 'replace': Forward, but replace theirs with ours (default)
+       # 'forward': Forward without changes
+       # 'discard': Don't forward
+       option 'relay_mode' ''
+
+       # enable RFC3527 link selection sub-option and use the IP address of
+       # the specified network interface as "uplink" IP address (e.g. wan)
+       option 'link_selection' ''
+
+config dhcrelay ipv6
+#      option dhcpserver '2001:db8:1::1'
+       option upper 'eth1'
+       list lower 'eth0.2'
+       list lower 'eth0.3'
+
diff --git a/net/isc-dhcp/patches/000-compile.patch b/net/isc-dhcp/patches/000-compile.patch
new file mode 100644 (file)
index 0000000..27ce1e9
--- /dev/null
@@ -0,0 +1,30 @@
+diff --git a/bind/Makefile.in b/bind/Makefile.in
+index bd784c6..5950d19 100644
+--- a/bind/Makefile.in
++++ b/bind/Makefile.in
+@@ -85,13 +85,13 @@ bind2:
+               echo Bind export libraries already installed ;               \
+       else                                                                 \
+               echo Building BIND Export libraries - this takes some time. ;\
+-              (cd ${bindsrcdir}/lib/export ;                               \
+-                echo building in `pwd` ;                                   \
+-                MAKE=${GMAKE} ${GMAKE} >> ${binddir}/build.log) ;          \
++              (cd ${bindsrcdir}/lib/export/dns ;                           \
++                echo building gen using ${BUILD_CC} in `pwd` ;             \
++                $(MAKE) CC=${BUILD_CC} CFLAGS="-O2" LIBS="" gen) ;         \
+                                                                              \
+               echo Installing BIND Export libraries to ${binddir}. ;       \
+               (cd ${bindsrcdir}/lib/export ;                               \
+-                MAKE=${GMAKE} ${GMAKE} install > ${binddir}/install.log) ; \
++                $(MAKE) DESTDIR="" install > ${binddir}/build.log) ;       \
+       fi
+ clean:
+@@ -100,6 +100,7 @@ clean:
+ # Include the following so that this Makefile is happy when the parent
+ # tries to use them.
++install-exec:
+ distdir:
diff --git a/net/isc-dhcp/patches/100-relay-rfc3527-link-selection.patch b/net/isc-dhcp/patches/100-relay-rfc3527-link-selection.patch
new file mode 100644 (file)
index 0000000..1c86590
--- /dev/null
@@ -0,0 +1,100 @@
+--- a/relay/dhcrelay.c
++++ b/relay/dhcrelay.c
+@@ -60,6 +60,7 @@
+ int client_packet_errors = 0; /* Errors sending packets to clients. */
+ int add_agent_options = 0;    /* If nonzero, add relay agent options. */
++int add_rfc3527_suboption = 0;        /* If nonzero, add RFC3527 link selection sub-option. */
+ int agent_option_errors = 0;    /* Number of packets forwarded without
+                                  agent options because there was no room. */
+@@ -99,6 +100,8 @@
+       struct sockaddr_in to;
+ } *servers;
++struct interface_info *uplink;
++
+ #ifdef DHCPv6
+ struct stream_list {
+       struct stream_list *next;
+@@ -147,6 +150,7 @@
+ "                     [-pf <pid-file>] [--no-pid]\n"\
+ "                     [-m append|replace|forward|discard]\n" \
+ "                     [-i interface0 [ ... -i interfaceN]\n" \
++"                     [-l interface]\n" \
+ "                     server0 [ ... serverN]\n\n" \
+ "       dhcrelay -6   [-d] [-q] [-I] [-c <hops>] [-p <port>]\n" \
+ "                     [-pf <pid-file>] [--no-pid]\n" \
+@@ -161,6 +165,7 @@
+ "                [-pf <pid-file>] [--no-pid]\n" \
+ "                [-m append|replace|forward|discard]\n" \
+ "                [-i interface0 [ ... -i interfaceN]\n" \
++"                [-l interface]\n" \
+ "                server0 [ ... serverN]\n\n"
+ #endif
+@@ -325,6 +330,20 @@
+                               agent_relay_mode = discard;
+                       } else
+                               usage();
++              } else if (!strcmp (argv [i], "-l")) {
++                      add_agent_options = 1;
++                      add_rfc3527_suboption = 1;
++                      if (++i == argc)
++                              usage();
++
++                      status = interface_allocate(&uplink, MDL);
++                      if (status != ISC_R_SUCCESS)
++                              log_fatal("%s: interface_allocate: %s",
++                                        argv[i],
++                                        isc_result_totext(status));
++                      strcpy(uplink->name, argv[i]);
++                      interface_snorf(uplink, INTERFACE_REQUESTED);
++                      //interface_dereference(&uplink, MDL);
+               } else if (!strcmp(argv[i], "-D")) {
+ #ifdef DHCPv6
+                       if (local_family_set && (local_family == AF_INET6)) {
+@@ -711,12 +730,17 @@
+                                              ip->addresses[0])))
+               return;
++      /* RFC3527: Replace giaddr address by uplink address. The original
++       * giaddr will be used in the link selection sub-option */
++      if (add_rfc3527_suboption)
++              packet->giaddr = uplink->addresses[0];
++
+       /* If giaddr is not already set, Set it so the server can
+          figure out what net it's from and so that we can later
+          forward the response to the correct net.    If it's already
+          set, the response will be sent directly to the relay agent
+          that set giaddr, so we won't see it. */
+-      if (!packet->giaddr.s_addr)
++      else if (!packet->giaddr.s_addr)
+               packet->giaddr = ip->addresses[0];
+       if (packet->hops < max_hop_count)
+               packet->hops = packet->hops + 1;
+@@ -1090,6 +1114,9 @@
+               optlen += ip->remote_id_len + 2;    /* RAI_REMOTE_ID + len */
+       }
++      if (add_rfc3527_suboption)
++              optlen += 6;
++
+       /* We do not support relay option fragmenting(multiple options to
+        * support an option data exceeding 255 bytes).
+        */
+@@ -1121,6 +1148,14 @@
+                       memcpy(sp, ip->remote_id, ip->remote_id_len);
+                       sp += ip->remote_id_len;
+               }
++
++              if (add_rfc3527_suboption) {
++                      *sp++ = RAI_LINK_SELECT;
++                      *sp++ = 4u;
++                      memcpy(sp, &giaddr.s_addr, 4);
++                      sp += 4;
++                      log_debug ("RFC3527 link selection sub-option added: %s", inet_ntoa(giaddr));
++              }
+       } else {
+               ++agent_option_errors;
+               log_error("No room in packet (used %d of %d) "
diff --git a/net/isc-dhcp/patches/510-bind-CC.patch b/net/isc-dhcp/patches/510-bind-CC.patch
new file mode 100644 (file)
index 0000000..ddef4f2
--- /dev/null
@@ -0,0 +1,19 @@
+--- a/bind/Makefile.in
++++ b/bind/Makefile.in
+@@ -63,8 +63,14 @@
+       else                                                            \
+               echo Configuring BIND Export libraries for DHCP. ;      \
+               rm -rf ${cleandirs} ${cleanfiles} ;                     \
+-              (cd ${bindsrcdir} &&                                    \
+-                 ./configure ${bindconfig} > ${binddir}/configure.log); \
++               (cd ${bindsrcdir} && export CC=${CROSS_CC} &&           \
++                ./configure  --disable-atomic --disable-kqueue         \
++                --disable-epoll --disable-devpoll --without-openssl    \
++                --without-libxml2 --enable-exportlib                   \
++                --enable-threads=no                                    \
++                --with-export-includedir=${binddir}/include            \
++                --with-export-libdir=${binddir}/lib --with-gssapi=no   \
++               --without-randomdev > ${binddir}/configure.log);       \
+       fi
+ atf:
index a245d675337c2ab49a9578709b50077a53ff70dd..104bd3ec0e110c10ff354f58db18c55ff32578ca 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2014-2015 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
+# Copyright (C) 2014-2016 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=knot
-PKG_VERSION:=1.6.5
+PKG_VERSION:=2.1.1
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
 PKG_SOURCE_URL:=https://secure.nic.cz/files/knot-dns/
-PKG_MD5SUM:=934b6feaeefd0df7b3be6709e39b19ce
+PKG_MD5SUM:=ee6a54ec8a7898579b768c66e2eaeb54
 
 PKG_MAINTAINER:=Daniel Salzman <daniel.salzman@nic.cz>
-PKG_LICENSE:=GPL-2.0+
+PKG_LICENSE:=GPL-3.0 LGPL-2.0 0BSD MIT OLDAP-2.8
 
-PKG_BUILD_PARALLEL:=1
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
 PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
+define Package/knot-lib/Default
+       SECTION:=libs
+       CATEGORY:=Libraries
+       TITLE:=Knot DNS
+       URL:=https://www.knot-dns.cz
+endef
+
 define Package/knot/Default
        SECTION:=net
        CATEGORY:=Network
+       SUBMENU:=IP Addresses and Names
        TITLE:=Knot DNS
        URL:=https://www.knot-dns.cz
-       SUBMENU:=IP Addresses and Names
-       DEPENDS:=+libopenssl +liburcu
+       USERID:=knot=5353:knot=5353
+endef
+
+define Package/knot-libdnssec
+       $(call Package/knot-lib/Default)
+       TITLE+= DNSSEC library
+       DEPENDS=+libpthread +libgnutls +jansson
 endef
 
 define Package/knot-libknot
-       $(call Package/knot/Default)
-       TITLE+= (library)
+       $(call Package/knot-lib/Default)
+       TITLE+= library
+       DEPENDS=+libpthread +knot-libdnssec
+endef
+
+define Package/knot-libzscanner
+       $(call Package/knot-lib/Default)
+       TITLE+= zone parser library
+       DEPENDS=+libpthread
 endef
 
 define Package/knot
        $(call Package/knot/Default)
-       TITLE+= (server)
-       DEPENDS+=+knot-libknot
+       TITLE+= server
+       DEPENDS=+liburcu +knot-libdnssec +knot-libknot +knot-libzscanner
 endef
 
 define Package/knot-dig
        $(call Package/knot/Default)
-       TITLE+= lookup utility
-       DEPENDS+=+knot-libknot
+       TITLE+= advanced DNS lookup utility
+       DEPENDS=+knot-libdnssec +knot-libknot
 endef
 
 define Package/knot-host
        $(call Package/knot/Default)
        TITLE+= simple DNS lookup utility
-       DEPENDS+=+knot-libknot
+       DEPENDS=+knot-libdnssec +knot-libknot
+endef
+
+define Package/knot-nsupdate
+       $(call Package/knot/Default)
+       TITLE+= dynamic DNS update utility
+       DEPENDS=+knot-libdnssec +knot-libknot +knot-libzscanner
 endef
 
 define Package/knot-nsec3hash
        $(call Package/knot/Default)
        TITLE+= simple NSEC3 hash utility
-       DEPENDS+=+knot-libknot
+       DEPENDS=+knot-libdnssec
 endef
 
-define Package/knot-nsupdate
+define Package/knot-keymgr
        $(call Package/knot/Default)
-       TITLE+= dynamic DNS update utility
-       DEPENDS+=+knot-libknot
+       TITLE+= DNSSEC key management utility
+       DEPENDS=+knot-libdnssec +knot-libzscanner
 endef
 
 define Package/knot-tests
        $(call Package/knot/Default)
-       TITLE+= (tests)
-       DEPENDS+=+knot-libknot
+       TITLE+= tests
+       DEPENDS=+liburcu +knot-libdnssec +knot-libknot +knot-libzscanner
+endef
+
+define Package/knot-libdnssec/description
+       Knot DNS DNSSEC library.
 endef
 
 define Package/knot-libknot/description
        Knot DNS library.
 endef
 
+define Package/knot-libdnssec/description
+       Knot DNS zone parser library.
+endef
+
 define Package/knot/description
        High-performance authoritative-only DNS server.
 endef
 
 define Package/knot-dig/description
-       Knot DNS lookup utility.
+       Knot DNS advanced DNS lookup utility.
 endef
 
 define Package/knot-host/description
        Knot DNS simple DNS lookup utility.
 endef
 
+define Package/knot-nsupdate/description
+       Knot DNS dynamic DNS update utility.
+endef
+
 define Package/knot-nsec3hash/description
-       Knot DNS simple utility to compute NSEC3 hash.
+       Knot DNS simple NSEC3 hash utility.
 endef
 
-define Package/knot-nsupdate/description
-       Knot DNS dynamic DNS update utility.
+define Package/knot-keymgr/description
+       Knot DNS DNSSEC key management utility.
 endef
 
 define Package/knot-tests/description
-       Unit tests for Knot DNS server.
+       Unit tests for the Knot DNS server and libraries.
        Usage: /usr/share/knot/runtests.sh
 endef
 
-define Package/knot/conffiles
-/etc/knot/knot.conf
-endef
-
 CONFIGURE_ARGS +=                      \
        --enable-recvmmsg=no            \
        --disable-fastparser            \
        --without-libidn                \
-       --with-rundir=/var/run          \
-       --with-storage=/etc/knot
+       --with-rundir=/var/run/knot     \
+       --with-storage=/var/lib/knot    \
+       --with-configdir=/etc/knot      \
+       --with-timer-mapsize=50         \
+       --with-conf-mapsize=50
 
-TARGET_CFLAGS += -std=gnu99 -DPSELECT_COMPAT
+TARGET_CFLAGS += -DPSELECT_COMPAT -DNDEBUG
+
+define Package/knot/conffiles
+/etc/knot/knot.conf
+endef
 
 define Build/Compile
        $(MAKE) -C $(PKG_BUILD_DIR)
        $(MAKE) -C $(PKG_BUILD_DIR)/libtap check
+       $(MAKE) -C $(PKG_BUILD_DIR)/src/dnssec/tests check-compile-only
        $(MAKE) -C $(PKG_BUILD_DIR)/tests check-compile-only
        $(MAKE) -C $(PKG_BUILD_DIR)/src/zscanner check-compile-only
 endef
 
+define Build/InstallDev
+       $(INSTALL_DIR)                                  $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.{a,so*}      $(1)/usr/lib/
+
+       $(INSTALL_DIR)                                          $(1)/usr/include/libknot
+       $(CP) $(PKG_INSTALL_DIR)/usr/include/libknot/*          $(1)/usr/include/libknot/
+
+       $(INSTALL_DIR)                                                  $(1)/usr/lib/pkgconfig
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc       $(1)/usr/lib/pkgconfig/
+endef
+
+define Package/knot-libdnssec/install
+       $(INSTALL_DIR)                                          $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdnssec.so.*         $(1)/usr/lib/
+endef
+
 define Package/knot-libknot/install
        $(INSTALL_DIR)                                          $(1)/usr/lib
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libknot.so.*           $(1)/usr/lib/
+endef
+
+define Package/knot-libzscanner/install
+       $(INSTALL_DIR)                                          $(1)/usr/lib
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libzscanner.so.*       $(1)/usr/lib/
 endef
 
@@ -137,7 +199,6 @@ define Package/knot/install
 
        $(INSTALL_DIR)                                                  $(1)/etc/knot
        $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/knot/knot.sample.conf    $(1)/etc/knot/knot.conf
-       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/knot/example.com.zone    $(1)/etc/knot/
 
        $(INSTALL_DIR)                          $(1)/etc/init.d
        $(INSTALL_BIN) ./files/knotd.init       $(1)/etc/init.d/knotd
@@ -153,14 +214,19 @@ define Package/knot-host/install
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/khost         $(1)/usr/bin/
 endef
 
+define Package/knot-nsupdate/install
+       $(INSTALL_DIR)                                          $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/knsupdate     $(1)/usr/bin/
+endef
+
 define Package/knot-nsec3hash/install
        $(INSTALL_DIR)                                          $(1)/usr/bin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/knsec3hash    $(1)/usr/bin/
 endef
 
-define Package/knot-nsupdate/install
-       $(INSTALL_DIR)                                          $(1)/usr/bin
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/knsupdate     $(1)/usr/bin/
+define Package/knot-keymgr/install
+       $(INSTALL_DIR)                                          $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/keymgr       $(1)/usr/sbin/
 endef
 
 define Package/knot-tests/install
@@ -171,13 +237,19 @@ define Package/knot-tests/install
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/libtap/runtests         $(1)/usr/share/knot/tap/
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/libtap/tap/libtap.sh    $(1)/usr/share/knot/tap/
 
-       $(INSTALL_DIR)                                                          $(1)/usr/share/knot/tests
+       $(INSTALL_DIR)                                                                  $(1)/usr/share/knot/tests
+
+       find $(PKG_BUILD_DIR)/src/dnssec/tests -maxdepth 1 -executable -type f | \
+               xargs -I{} basename {} | \
+               xargs -I{} $(INSTALL_BIN) -T $(PKG_BUILD_DIR)/src/dnssec/tests/{}       $(1)/usr/share/knot/tests/dnssec_test_{}
+
        find $(PKG_BUILD_DIR)/tests/.libs -maxdepth 1 -executable -type f | \
                xargs -I{} basename {} | \
-               xargs -I{} $(INSTALL_BIN) -T $(PKG_BUILD_DIR)/tests/.libs/{}    $(1)/usr/share/knot/tests/test_{}
+               xargs -I{} $(INSTALL_BIN) -T $(PKG_BUILD_DIR)/tests/.libs/{}            $(1)/usr/share/knot/tests/test_{}
 
-       $(INSTALL_DIR)                                          $(1)/usr/share/knot/tests/data
-       $(INSTALL_DATA) $(PKG_BUILD_DIR)/tests/data/sample_conf $(1)/usr/share/knot/tests/data/
+       find $(PKG_BUILD_DIR)/tests/modules/.libs -maxdepth 1 -executable -type f | \
+               xargs -I{} basename {} | \
+               xargs -I{} $(INSTALL_BIN) -T $(PKG_BUILD_DIR)/tests/modules/.libs/{}    $(1)/usr/share/knot/tests/test_module_{}
 
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/zscanner/tests/.libs/zscanner-tool  $(1)/usr/share/knot/tests/
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/zscanner/tests/unittests            $(1)/usr/share/knot/tests/test_zscanner
@@ -185,10 +257,13 @@ define Package/knot-tests/install
        cp -a $(PKG_BUILD_DIR)/src/zscanner/tests/data                          $(1)/usr/share/knot/tests/
 endef
 
+$(eval $(call BuildPackage,knot-libdnssec))
 $(eval $(call BuildPackage,knot-libknot))
+$(eval $(call BuildPackage,knot-libzscanner))
 $(eval $(call BuildPackage,knot))
 $(eval $(call BuildPackage,knot-dig))
 $(eval $(call BuildPackage,knot-host))
-$(eval $(call BuildPackage,knot-nsec3hash))
 $(eval $(call BuildPackage,knot-nsupdate))
+$(eval $(call BuildPackage,knot-nsec3hash))
+$(eval $(call BuildPackage,knot-keymgr))
 $(eval $(call BuildPackage,knot-tests))
index 23d3bd58e7eb2e14cb6f09eda2cc8501ad35931f..0e5bf03f4dac2053535896d78d2467324c0b1c54 100644 (file)
@@ -1,45 +1,39 @@
 #!/bin/sh /etc/rc.common
-START=70
-
-knot_bin="/usr/sbin/knotd"
-knot_ctl="/usr/sbin/knotc"
-config_file="/etc/knot/knot.conf"
-pid_file="/var/run/knot.pid"
-
-start() {
-  echo "Starting Knot DNS"
-
-  if [ -e $pid_file ]; then
-     echo "  Already running with PID `cat $pid_file`"
-     return 1
-  fi
-
-  $knot_bin -c $config_file -d
-
-  if [ $? -ne 0 ]; then
-    echo "  Failed to start"
-  fi
+#
+# Copyright (C) 2014-2016 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
+#
+# This is free software, licensed under the GNU General Public License v2.
+
+START=50
+USE_PROCD=1
+
+PROG="/usr/sbin/knotd"
+CONFFILE="/etc/knot/knot.conf"
+
+USER="knot"
+USERID="5353"
+RUNDIR="/var/run/knot"
+STORAGE="/var/lib/knot"
+
+fix_perms() {
+       user_exists $USER $USERID || user_add $USER $USERID
+       group_exists $USER $USERID || group_add $USER $USERID
+
+       for dir in $RUNDIR $STORAGE; do
+               test -e $dir || {
+                       mkdir -p $dir
+                       chgrp $USER $dir
+                       chmod g+w $dir
+               }
+               chgrp $USER $CONFFILE
+               chmod g+r $CONFFILE
+       done
 }
 
-stop() {
-  echo "Stopping Knot DNS"
-
-  if [ -e $pid_file ]; then
-    kill `cat $pid_file`
-    rm -f $pid_file
-  else
-    echo "  No PID file $pid_file"
-    return 1
-  fi
-}
-
-restart() {
-  stop
-  start
-}
-
-reload() {
-  echo "Reloading Knot DNS"
-
-  $knot_ctl -c $config_file reload
+start_service() {
+       fix_perms
+       procd_open_instance
+       procd_set_param command $PROG -c $CONFFILE
+       procd_set_param respawn
+       procd_close_instance
 }
index 10032cb59815db5655a060521714d4b8240ccae1..c45868faae8ee7a19d627f01e1f6e99461320882 100644 (file)
@@ -1,8 +1,7 @@
 #!/bin/sh
 
 cd `dirname "$0"`/tests
-../tap/runtests -b /tmp ./test_*
-
+../tap/runtests -b /tmp ./dnssec_test_* ./test_*
 ret=$?
 cd -
 
diff --git a/net/knot/patches/01_strptime_susv3.patch b/net/knot/patches/01_strptime_susv3.patch
deleted file mode 100644 (file)
index fc14b91..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-diff --git a/src/libknot/dnssec/key.c b/src/libknot/dnssec/key.c
-index 7dc0540..3e351bb 100644
---- a/src/libknot/dnssec/key.c
-+++ b/src/libknot/dnssec/key.c
-@@ -260,7 +260,15 @@ static int key_param_time(const void *save_to, char *value)
-       struct tm parsed = { 0 };
--      if (!strptime(value, "%Y%m%d%H%M%S", &parsed)) {
-+      if (strlen(value) != 14) {
-+              return KNOT_EINVAL;
-+      }
-+
-+      char *v = value;
-+      char buf[32] = "";
-+      int ret = sprintf(buf, "%.4s %.2s %.2s %.2s %.2s %.2s",
-+                        v, v + 4, v + 6, v + 8, v + 10, v + 12);
-+      if (ret != 19 || !strptime(buf, "%Y %m %d %H %M %S", &parsed)) {
-               return KNOT_EINVAL;
-       }
diff --git a/net/knot/patches/01_zscanner_tests.patch b/net/knot/patches/01_zscanner_tests.patch
new file mode 100644 (file)
index 0000000..7ea4cfd
--- /dev/null
@@ -0,0 +1,25 @@
+diff --git a/src/zscanner/tests/unittests.in b/src/zscanner/tests/unittests.in
+index 9a4af53..f9b45bf 100644
+--- a/src/zscanner/tests/unittests.in
++++ b/src/zscanner/tests/unittests.in
+@@ -1,15 +1,14 @@
+ #!/bin/sh
+-SOURCE=@top_srcdir@/src/zscanner/tests
+-BUILD=@top_builddir@/src/zscanner/tests
++SOURCE="."
++BUILD="/tmp/knot-test"
++mkdir -p "$BUILD"
+-. @top_srcdir@/libtap/tap/libtap.sh
+-
+-cd "$BUILD"
++. ../tap/libtap.sh
+ TMPDIR=$(test_tmpdir)
+ TESTS_DIR="$SOURCE"/data
+-ZSCANNER_TOOL="$BUILD"/zscanner-tool
++ZSCANNER_TOOL=./zscanner-tool
+ plan 71
index f82af0cfc9951ff31b7e33e102874027cee20684..215b09fbed153bb0930845a87f29395e2ac2858d 100644 (file)
@@ -1,28 +1,13 @@
 diff --git a/samples/knot.sample.conf.in b/samples/knot.sample.conf.in
-index 956e8a9..a068e67 100644
+index e07c8a7..ecc13ad 100644
 --- a/samples/knot.sample.conf.in
 +++ b/samples/knot.sample.conf.in
-@@ -14,7 +14,7 @@ system {
+@@ -9,7 +9,7 @@ server:
+     # Listen on all configured IPv6 interfaces.
+     listen: ::@53
+     # User for running the server.
+-    # user: knot:knot
++    user: knot:knot
  
-   # User for running server
-   # May also specify user.group (e.g. knot.knot)
--  user knot.knot;
-+  user root.root;
-   # Directory for storing run-time data
-   # e.g. PID file and control sockets
-@@ -63,11 +63,11 @@ zones {
- #  storage "@storage_dir@";
- #
- #  Example master zone
--#  example.com {
--#    file "@config_dir@/example.com.zone";
-+  example.com {
-+    file "example.com.zone";
- #    xfr-out slave0;
- #    notify-out slave0;
--#  }
-+  }
- #
- #  Example slave zone
- #  example.net {
+ log:
+     # Log info and more serious events to syslog.
diff --git a/net/knot/patches/03_libtap_files.patch b/net/knot/patches/03_libtap_files.patch
new file mode 100644 (file)
index 0000000..bb7b342
--- /dev/null
@@ -0,0 +1,15 @@
+diff --git a/libtap/tap/files.c b/libtap/tap/files.c
+index 0c24075..d33db6c 100644
+--- a/libtap/tap/files.c
++++ b/libtap/tap/files.c
+@@ -27,6 +27,10 @@
+ #include <sys/types.h>
+ #include <unistd.h>
++#ifndef O_NOFOLLOW
++#define O_NOFOLLOW 0
++#endif
++
+ char *test_mkdtemp(void)
+ {
+       char *tmpdir = getenv("TMPDIR");
diff --git a/net/knot/patches/03_zscanner_tests.patch b/net/knot/patches/03_zscanner_tests.patch
deleted file mode 100644 (file)
index a0d0524..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-diff --git a/src/zscanner/tests/TESTS b/src/zscanner/tests/TESTS
-index c88aef1..4e2148f 100644
---- a/src/zscanner/tests/TESTS
-+++ b/src/zscanner/tests/TESTS
-@@ -18,10 +18,8 @@
- 05-2_TTL
- 05-3_TTL
- 05-4_TTL
--06-0_INCLUDE
- 06-1_INCLUDE
- 06-2_INCLUDE
--06-3_INCLUDE
- 06-4_INCLUDE
- 06-5_INCLUDE
- 06-6_INCLUDE
-diff --git a/src/zscanner/tests/unittests.in b/src/zscanner/tests/unittests.in
-index 846f351..272856c 100644
---- a/src/zscanner/tests/unittests.in
-+++ b/src/zscanner/tests/unittests.in
-@@ -1,9 +1,9 @@
- #!/bin/sh
--SOURCE=@top_srcdir@/src/zscanner/tests
--BUILD=@top_builddir@/src/zscanner/tests
-+SOURCE="."
-+BUILD="."
--. @top_srcdir@/libtap/tap/libtap.sh
-+. ../tap/libtap.sh
- cd "$BUILD"
-@@ -11,7 +11,7 @@ TMPDIR=$(test_tmpdir)
- TESTS_DIR="$SOURCE"/data
- ZSCANNER_TOOL="$BUILD"/zscanner-tool
--plan 71
-+plan 69
- mkdir -p "$TMPDIR"/includes/
- for a in 1 2 3 4 5 6; do
index da6148e09170f774e87e2703e6f2875c63bd627c..5b5fba2204cefa3e05e91d56d05846c2024da25d 100644 (file)
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=knxd
-PKG_VERSION=2016-01-01-$(PKG_SOURCE_VERSION)
-PKG_RELEASE:=3
+PKG_VERSION=2016-03-12
+PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/knxd/knxd.git
-PKG_SOURCE_VERSION:=0cca354494310c8700e95692d5e09c80f6b57085
+PKG_SOURCE_VERSION:=c8a4bb3b042de1fd692a93cdb7a307546f2be359
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
 
index df3c7c87c84e113e1dec3bda531085cc082ded21..6fabee19910e6d9363faa30fbb512683bd1e6a20 100644 (file)
@@ -49,8 +49,8 @@ start_service() {
        append_bool args tpuarts_ack_all_individual "tpuarts-ack-all-individual" 0
        append_bool args tpuarts_disch_reset "tpuarts-disch-reset" 0
        append_bool args Tunnelling "Tunnelling" 1
-       append_parm args listen_local "listen-local" "/var/run/knxd"
        append_bool args Server "Server" 1
+       append_parm args listen_local "listen-local" "/var/run/knxd"
        config_get url args url
        procd_open_instance
        procd_set_param command $PROG $params $url
index 2ae831beb6943d10f33769fc9bd4fa2108bd6f26..5f7413ed6effffe8bb4c33d29b33d1940528f099 100644 (file)
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=krb5
-PKG_VERSION:=1.14
+PKG_VERSION:=1.14.1
 PKG_RELEASE:=1
 
 PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
@@ -18,7 +18,7 @@ PKG_LICENSE_FILES:=NOTICE
 
 PKG_SOURCE:=krb5-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://web.mit.edu/kerberos/dist/krb5/1.14/
-PKG_MD5SUM:=0727968764d0208388b85ad31aafde24
+PKG_MD5SUM:=400de0cabbfbe85c2c36f60347bf7dc6
 
 PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
index e416209e1056acc7a055c186fd5a206ba6672f80..99d37bb935feb33b763ee758aec6fb18fcab995a 100644 (file)
@@ -1,18 +1,18 @@
-diff -u --recursive krb5-1.14-vanilla/src/kadmin/ktutil/ktutil_funcs.c krb5-1.14/src/kadmin/ktutil/ktutil_funcs.c
---- krb5-1.14-vanilla/src/kadmin/ktutil/ktutil_funcs.c 2015-12-31 21:50:20.572824136 -0500
-+++ krb5-1.14/src/kadmin/ktutil/ktutil_funcs.c 2015-12-31 22:11:26.603926597 -0500
-@@ -64,7 +64,7 @@
-     krb5_kt_list *list;
-     int idx;
+diff -u --recursive krb5-1.14.1-vanilla/src/lib/kadm5/str_conv.c krb5-1.14.1/src/lib/kadm5/str_conv.c
+--- krb5-1.14.1-vanilla/src/lib/kadm5/str_conv.c       2016-03-26 19:49:13.651926364 -0400
++++ krb5-1.14.1/src/lib/kadm5/str_conv.c       2016-03-26 21:05:37.436084066 -0400
+@@ -131,7 +131,7 @@
  {
--    krb5_kt_list lp, prev;
-+    krb5_kt_list lp, prev = NULL;
-     int i;
+     int found = 0, invert = 0;
+     size_t i;
+-    krb5_flags flag;
++    krb5_flags flag = 0;
+     unsigned long ul;
  
-     for (lp = *list, i = 1; lp; prev = lp, lp = lp->next, i++) {
-diff -u --recursive krb5-1.14-vanilla/src/lib/krad/packet.c krb5-1.14/src/lib/krad/packet.c
---- krb5-1.14-vanilla/src/lib/krad/packet.c    2015-12-31 21:50:20.476819205 -0500
-+++ krb5-1.14/src/lib/krad/packet.c    2015-12-31 22:05:32.041257903 -0500
+     for (i = 0; !found && i < NFTBL; i++) {
+diff -u --recursive krb5-1.14.1-vanilla/src/lib/krad/packet.c krb5-1.14.1/src/lib/krad/packet.c
+--- krb5-1.14.1-vanilla/src/lib/krad/packet.c  2016-03-26 19:49:13.634926238 -0400
++++ krb5-1.14.1/src/lib/krad/packet.c  2016-03-26 21:13:03.023144940 -0400
 @@ -253,7 +253,7 @@
  {
      krb5_error_code retval;
@@ -22,9 +22,9 @@ diff -u --recursive krb5-1.14-vanilla/src/lib/krad/packet.c krb5-1.14/src/lib/kr
      size_t attrset_len;
  
      pkt = packet_new();
-diff -u --recursive krb5-1.14-vanilla/src/plugins/preauth/pkinit/pkinit_crypto_openssl.c krb5-1.14/src/plugins/preauth/pkinit/pkinit_crypto_openssl.c
---- krb5-1.14-vanilla/src/plugins/preauth/pkinit/pkinit_crypto_openssl.c       2015-12-31 21:50:20.531822031 -0500
-+++ krb5-1.14/src/plugins/preauth/pkinit/pkinit_crypto_openssl.c       2015-12-31 22:08:32.871650805 -0500
+diff -u --recursive krb5-1.14.1-vanilla/src/plugins/preauth/pkinit/pkinit_crypto_openssl.c krb5-1.14.1/src/plugins/preauth/pkinit/pkinit_crypto_openssl.c
+--- krb5-1.14.1-vanilla/src/plugins/preauth/pkinit/pkinit_crypto_openssl.c     2016-03-26 19:49:13.653926379 -0400
++++ krb5-1.14.1/src/plugins/preauth/pkinit/pkinit_crypto_openssl.c     2016-03-26 21:17:07.151335877 -0400
 @@ -3618,7 +3618,7 @@
  {
      CK_ULONG i, r;
@@ -34,15 +34,16 @@ diff -u --recursive krb5-1.14-vanilla/src/plugins/preauth/pkinit/pkinit_crypto_o
      CK_ULONG count = 0;
      CK_SLOT_ID_PTR slotlist;
      CK_TOKEN_INFO tinfo;
-diff -u --recursive krb5-1.14-vanilla/src/util/profile/prof_file.c krb5-1.14/src/util/profile/prof_file.c
---- krb5-1.14-vanilla/src/util/profile/prof_file.c     2015-12-31 21:50:20.474819103 -0500
-+++ krb5-1.14/src/util/profile/prof_file.c     2015-12-31 21:59:08.551797171 -0500
-@@ -359,6 +359,8 @@
-         if (f == NULL)
-             return (errno != 0) ? errno : ENOENT;
-         set_cloexec_file(f);
-+    } else {
-+        f = NULL;
-     }
+Only in krb5-1.14.1/src/plugins/preauth/pkinit: .pkinit_crypto_openssl.c.swp
+diff -u --recursive krb5-1.14.1-vanilla/src/util/profile/prof_file.c krb5-1.14.1/src/util/profile/prof_file.c
+--- krb5-1.14.1-vanilla/src/util/profile/prof_file.c   2016-03-26 19:49:13.633926230 -0400
++++ krb5-1.14.1/src/util/profile/prof_file.c   2016-03-26 21:03:07.934427580 -0400
+@@ -309,7 +309,7 @@
+     unsigned long frac;
+     time_t now;
+ #endif
+-    FILE *f;
++    FILE *f = NULL;
+     int isdir = 0;
  
-     data->upd_serial++;
+ #ifdef HAVE_STAT
index 3af3842bef3ce99d3eb71333cdaf64d899240904..fd3032d9bc8c361bb6b63bf8d75414dc9aa7fb97 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2008-2015 OpenWrt.org
+# Copyright (C) 2008-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,18 +8,24 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=linknx
-PKG_VERSION:=0.0.1.32
-PKG_RELEASE:=7
-PKG_MD5SUM:=7ecc1208f59bceb05068c752b2250b63
+PKG_VERSION:=0.0.1.33
+PKG_RELEASE:=1
 
 PKG_MAINTAINER:=Othmar Truniger <github@truniger.ch>
 PKG_LICENSE:=GPL-2.0+
 
-PKG_SOURCE_URL:=@SF/linknx
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/linknx/linknx.git
+PKG_SOURCE_VERSION:=f627ed44feaea5a1f67c53f2810c44a14c059cef
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)
+PKG_SOURCE:=$(PKG_NAME)-${PKG_VERSION}.tar.gz
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
 PKG_BUILD_DEPENDS:=argp-standalone
 PKG_FORTIFY_SOURCE:=1
 
+PKG_FIXUP:=autoreconf
+
 include $(INCLUDE_DIR)/package.mk
 
 define Package/linknx
diff --git a/net/linknx/patches/010-musl-compat b/net/linknx/patches/010-musl-compat
deleted file mode 100644 (file)
index 15c757e..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/src/eibclient.c  2007-10-11 01:55:31.000000000 +0200
-+++ b/src/eibclient.c  2015-06-27 22:18:01.433296921 +0200
-@@ -32,6 +32,7 @@
- #include <netinet/in.h>
- #include <netdb.h>
- #include <errno.h>
-+#include <string.h>
- #include "config.h"
diff --git a/net/linknx/patches/012-fix-linknx.cpp b/net/linknx/patches/012-fix-linknx.cpp
deleted file mode 100644 (file)
index 8394cf1..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/src/linknx.cpp   2012-06-04 22:12:13.000000000 +0200
-+++ b/src/linknx.cpp   2015-06-27 22:35:23.705721355 +0200
-@@ -136,7 +136,7 @@
-     if (errno)
-         printf (": %s\n", strerror (errno));
-     else
--        printf ("\n", strerror (errno));
-+        printf ("\n");
-     exit (1);
- }
index 0536a4032b9696a16286cc1beae3a85d83a480d0..4b2f5be68bb39c75c67db8b609b6f4e36bc342b0 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mDNSResponder
-PKG_VERSION:=567
-PKG_RELEASE:=3
+PKG_VERSION:=576.30.4
+PKG_RELEASE:=1
 
 PKG_SOURCE:=mDNSResponder-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://opensource.apple.com/tarballs/mDNSResponder/
-PKG_MD5SUM:=6eff6d243a12a3d4b6fca03c05a9893b
+PKG_MD5SUM:=940057ac8b513b00e8e9ca12ef796762
 PKG_MAINTAINER:=Steven Barth <cyrus@openwrt.org>
 PKG_LICENSE:=Apache-2.0
 
diff --git a/net/mdnsresponder/patches/114-fix_posix_build.patch b/net/mdnsresponder/patches/114-fix_posix_build.patch
new file mode 100644 (file)
index 0000000..d3fbae5
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/mDNSPosix/mDNSPosix.c
++++ b/mDNSPosix/mDNSPosix.c
+@@ -1673,7 +1673,7 @@ mDNSexport mDNSs32 mDNSPlatformGetServic
+     return -1;
+ }
+-mDNSexport void mDNSPlatformSetDelegatePID(UDPSocket *src, const mDNSAddr *dst, DNSQuestion *q)
++mDNSexport void mDNSPlatformSetuDNSSocktOpt(UDPSocket *src, const mDNSAddr *dst, DNSQuestion *q)
+ {
+     (void) src;
+     (void) dst;
index 9fe48ce3b50eda967617ac18894e807db3d3ab32..9b169c58e765224dcdf3928123d93181a2475bdc 100644 (file)
@@ -4,3 +4,10 @@ config MOSQUITTO_LWS
     default y
     help
         Includes websockets support in the broker, via libwebsockets
+
+config MOSQUITTO_PASSWD
+    bool "Include mosquitto_passwd utility"
+    depends on PACKAGE_mosquitto
+    default y
+    help
+        mosquitto_passwd is a tool for managing password files for mosquitto.
index 87ff529e8e11663cc746d72d23928f9115ab611d..b4c0ae747dcd4154bbb4b6007ba3f7e3afb4cbf2 100644 (file)
@@ -9,14 +9,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mosquitto
-PKG_VERSION:=1.4.4
+PKG_VERSION:=1.4.8
 PKG_RELEASE:=1
 PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=LICENSE.txt
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://mosquitto.org/files/source/
-PKG_MD5SUM:=89a57f11cdfec140fa21fe3d4493b2ca
+PKG_MD5SUM:=d859cd474ffa61a6197bdabe007b9027
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
 
 include $(INCLUDE_DIR)/package.mk
@@ -137,6 +137,16 @@ define Package/libmosquitto-nossl/description
     This package is built without SSL support
 endef
 
+define Package/libmosquittopp
+    SECTION:=libs
+    CATEGORY:=Libraries
+    DEPENDS:=+libmosquitto +libstdcpp
+    TITLE:= mosquitto - client c++ library
+endef
+
+define Package/libmosquittopp/description
+ C++ Library wrapper for libmosquitto.
+endef
 
 define Package/$(PKG_NAME)/conffiles
 /etc/mosquitto/mosquitto.conf
@@ -145,18 +155,25 @@ endef
 
 Package/$(PKG_NAME)-nossl/conffiles = $(Package/$(PKG_NAME)/conffiles)
 
-define Package/$(PKG_NAME)/install
+define Package/mosquitto/install/default
        $(INSTALL_DIR) $(1)/usr/sbin
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/mosquitto $(1)/usr/sbin/mosquitto
        $(INSTALL_DIR) $(1)/etc/mosquitto
        $(INSTALL_CONF) $(PKG_BUILD_DIR)/mosquitto.conf $(1)/etc/mosquitto/mosquitto.conf
-       $(INSTALL_DIR) $(1)/etc/init.d
-       $(INSTALL_BIN) ./files/mosquitto.init $(1)/etc/init.d/mosquitto
-       $(INSTALL_DIR) $(1)/usr/bin
-       $(INSTALL_BIN) ./files/mosquitto.uci.convert $(1)/usr/bin
+       $(CP) ./files/* $(1)/
+endef
+
+define Package/mosquitto-nossl/install
+       $(call Package/mosquitto/install/default,$(1))
 endef
-Package/$(PKG_NAME)-nossl/install = $(Package/$(PKG_NAME)/install)
 
+define Package/mosquitto/install
+       $(call Package/mosquitto/install/default,$(1))
+ifeq ($(CONFIG_MOSQUITTO_PASSWD),y)
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/mosquitto_passwd $(1)/usr/bin
+endif
+endef
 
 define Package/mosquitto-client/install
        $(INSTALL_DIR) $(1)/usr/bin
@@ -169,9 +186,12 @@ Package/mosquitto-client-nossl/install = $(Package/mosquitto-client/install)
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include
        $(CP) $(PKG_BUILD_DIR)/lib/mosquitto.h $(1)/usr/include
+       $(CP) $(PKG_BUILD_DIR)/lib/cpp/mosquittopp.h $(1)/usr/include
        $(INSTALL_DIR) $(1)/usr/lib
        $(CP) $(PKG_BUILD_DIR)/lib/libmosquitto.so.1 $(1)/usr/lib/
+       $(CP) $(PKG_BUILD_DIR)/lib/cpp/libmosquittopp.so.1 $(1)/usr/lib/
        $(LN) libmosquitto.so.1 $(1)/usr/lib/libmosquitto.so
+       $(LN) libmosquittopp.so.1 $(1)/usr/lib/libmosquittopp.so
 endef
 
 # This installs files on the target.  Compare with Build/InstallDev
@@ -182,10 +202,16 @@ define Package/libmosquitto/install
 endef
 Package/libmosquitto-nossl/install = $(Package/libmosquitto/install)
 
+define Package/libmosquittopp/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/cpp/libmosquittopp.so.1 $(1)/usr/lib/
+       $(LN) libmosquittopp.so.1 $(1)/usr/lib/libmosquittopp.so
+endef
+
 # Applies to all...
 MAKE_FLAGS += WITH_DOCS=no
 ifeq ($(BUILD_VARIANT),nossl)
-        MAKE_FLAGS += WITH_TLS=no WITH_WEBSOCKETS=no
+       MAKE_FLAGS += WITH_TLS=no WITH_WEBSOCKETS=no
 else
        MAKE_FLAGS += WITH_WEBSOCKETS=$(if $(CONFIG_MOSQUITTO_LWS),"yes","no")
 endif
@@ -194,5 +220,6 @@ $(eval $(call BuildPackage,$(PKG_NAME)))
 $(eval $(call BuildPackage,$(PKG_NAME)-nossl))
 $(eval $(call BuildPackage,libmosquitto))
 $(eval $(call BuildPackage,libmosquitto-nossl))
+$(eval $(call BuildPackage,libmosquittopp))
 $(eval $(call BuildPackage,mosquitto-client))
 $(eval $(call BuildPackage,mosquitto-client-nossl))
diff --git a/net/mosquitto/files/etc/config/mosquitto b/net/mosquitto/files/etc/config/mosquitto
new file mode 100644 (file)
index 0000000..fc7544c
--- /dev/null
@@ -0,0 +1,4 @@
+config owrt owrt
+    option use_uci 0
+
+config mosquitto mosquitto
diff --git a/net/mosquitto/files/etc/init.d/mosquitto b/net/mosquitto/files/etc/init.d/mosquitto
new file mode 100755 (executable)
index 0000000..6551c47
--- /dev/null
@@ -0,0 +1,168 @@
+#!/bin/sh /etc/rc.common
+# Basic init script for mosquitto
+# April 2012, OpenWrt.org
+# Provides support for the luci-app-mosquitto package, if installed
+
+START=80
+USE_PROCD=1
+TCONF=/tmp/mosquitto.generated.conf
+
+# Usage: append_if cfg uci_name output_name
+# add a config line of the form "output_name <value>"
+# if the "uci_name" was found.
+# output_name defaults to uci_name if not specified.
+append_if() {
+    local cfg="$1"
+    local uci_name="$2"
+    local out_name="$3"
+    if [ -z "$out_name" ]; then
+        out_name=$uci_name
+    fi
+    config_get val $cfg $uci_name
+    if [ -n "$val" ]; then
+        echo "$out_name $val" >> $TCONF
+    fi
+}
+
+# mosquitto uses true/false, uci uses 1/0
+# note that this is not shell truthy, but equality with 1!
+append_bool() {
+    if [ $2 -eq 1 ]; then
+        echo "$1 true" >> $TCONF
+    else
+        echo "$1 false" >> $TCONF
+    fi
+}
+
+# as per append_if, but gets the value as a uci bool, not raw
+append_optional_bool() {
+    local cfg="$1"
+    local uci_name="$2"
+    local out_name="$3"
+    config_get val $cfg $uci_name
+    if [ -n "$val" ]; then
+        config_get_bool real $cfg $uci_name
+        append_bool $out_name $real
+    fi
+}
+
+
+convert_mosq_general() {
+       local cfg="$1"
+       config_get destinations "$1" log_dest
+       for dest in $destinations; do
+               echo "log_dest $dest" >> $TCONF
+       done
+
+       config_get_bool no_remote "$1" no_remote_access 0
+       if [ "$no_remote" -eq 1 ]; then
+               echo "bind_address 127.0.0.1" >> $TCONF
+       fi
+
+       config_get port "$1" port 1883
+       echo "port $port" >> $TCONF
+       append_if "$1" protocol
+       append_if "$1" max_inflight_messages
+       append_if "$1" max_queued_messages
+}
+
+convert_persistence() {
+       local cfg="$1"
+
+       append_if "$cfg" client_expiration persistent_client_expiration
+       append_if "$cfg" autosave_interval
+       append_optional_bool "$cfg" autosave_on_changes autosave_on_changes
+       append_optional_bool "$cfg" persistence persistence
+       append_if "$cfg" file persistence_file
+       config_get loc "$cfg" location
+       if [ -n "$loc" ]; then
+               [ -d "$loc" ] || mkdir -p "$loc";
+               echo "persistence_location $loc" >> $TCONF
+       fi
+}
+
+add_listener() {
+    echo "" >> $TCONF
+    config_get port "$1" port
+    if [ -z "$port" ]; then
+        echo "Ignoring listener section without port"
+        return
+    fi
+    config_get_bool no_remote "$1" no_remote_access 0
+    if [ "$no_remote" -eq 1 ]; then
+        echo "listener $port 127.0.0.1" >> $TCONF
+    else
+        echo "listener $port" >> $TCONF
+    fi
+
+    append_if "$1" protocol
+}
+
+add_topic() {
+    echo "topic $1" >> $TCONF
+}
+
+add_bridge() {
+    config_get conn "$1" connection
+    config_get addr "$1" address
+    if [ -z "$conn" -o -z "$addr" ]; then
+        echo "Ignoring bridge section, misisng connection/address"
+        return
+    fi
+    echo "" >> $TCONF
+    echo "# Bridge connection from UCI section" >> $TCONF
+    append_if "$1" connection
+    append_if "$1" address
+
+    config_list_foreach "$1" topic add_topic
+    append_optional_bool "$1" cleansession cleansession
+    append_optional_bool "$1" try_private try_private
+
+    append_if "$1" clientid
+    append_if "$1" identity bridge_identity
+    append_if "$1" psk bridge_psk
+    append_if "$1" tls_version bridge_tls_version
+}
+
+
+convert_uci() {
+       rm -rf $TCONF
+       echo "Generating mosquitto config file in $TCONF"
+       echo "# mosquitto.conf file generated from UCI config." >>$TCONF
+       # Don't include a timestamp, it makes md5sum compares fail
+
+       config_load mosquitto
+       config_foreach convert_mosq_general "mosquitto"
+       config_foreach convert_persistence "persistence"
+       config_foreach add_listener "listener"
+       config_foreach add_bridge "bridge"
+}
+
+start_service_real() {
+       local cfg="$1"
+       local use_uci
+       config_get use_uci "$cfg" use_uci
+       if [ "$use_uci" -eq 1 ]; then
+               CONF=$TCONF
+               convert_uci
+       else
+               CONF=/etc/mosquitto/mosquitto.conf
+        fi
+
+       procd_open_instance
+       procd_set_param command mosquitto
+       procd_append_param command -c $CONF
+       # Makes /etc/init.d/mosquitto reload work if you edit the final file.
+       procd_set_param file $CONF
+       procd_close_instance
+}
+
+start_service() {
+       config_load mosquitto
+       config_foreach start_service_real owrt
+}
+
+service_triggers() {
+       # Makes "reload_config" work
+       procd_add_reload_trigger "mosquitto"
+}
diff --git a/net/mosquitto/files/mosquitto.init b/net/mosquitto/files/mosquitto.init
deleted file mode 100755 (executable)
index 2b3a93a..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/sh /etc/rc.common
-# Basic init script for mosquitto
-# April 2012, OpenWrt.org
-# Provides support for the luci-app-mosquitto package, if installed
-
-START=80
-APP=`which mosquitto`
-USE_UCI_CONFIG=$(uci -q get mosquitto.owrt.use_uci)
-if [ $? -eq 1 ]; then
-    USE_UCI_CONFIG=0
-fi
-
-SERVICE_DAEMONIZE=1
-SERVICE_WRITE_PID=1
-
-start() {
-        if [ "$USE_UCI_CONFIG" -eq 1 ]; then
-            CONF=/tmp/mosquitto.converted.$$.conf
-            mosquitto.uci.convert -f $CONF
-        else
-            CONF=/etc/mosquitto/mosquitto.conf
-        fi
-        service_start $APP -c $CONF
-}
-
-stop() {
-        service_stop $APP
-}
diff --git a/net/mosquitto/files/mosquitto.uci.convert b/net/mosquitto/files/mosquitto.uci.convert
deleted file mode 100644 (file)
index 1a03d97..0000000
+++ /dev/null
@@ -1,134 +0,0 @@
-#!/bin/sh
-# Converts a uci config file into an appropriate mosquitto.conf snippet
-# expected to be used in an init file to generate a config file to run from
-# Karl Palsson <karlp@remake.is> 2012.
-# Considered to be released into the public domain
-
-[ -f $IPKG_INSTROOT/lib/functions.sh ] && . $IPKG_INSTROOT/lib/functions.sh
-
-TCONF=/tmp/mosquitto.generated.$$.conf
-while getopts "f:" o; do
-    case $o in
-    f)
-        TCONF=$OPTARG
-        ;;
-    esac
-done
-
-if [ -e $TCONF ]; then
-    echo "Odd, same temporary generated config file already existed: $TCONF"
-    exit 1
-fi
-
-echo "Generating mosquitto config file in $TCONF"
-NOW=$(date)
-echo "# mosquitto.conf file generated from UCI config." >>$TCONF
-echo "# Config snippet generated by $0 on $NOW" >>$TCONF
-echo "#" >> $TCONF
-
-# Usage: append_if cfg uci_name output_name
-# add a config line of the form "output_name <value>"
-# if the "uci_name" was found.
-# output_name defaults to uci_name if not specified.
-append_if() {
-    local cfg="$1"
-    local uci_name="$2"
-    local out_name="$3"
-    if [ -z "$out_name" ]; then
-        out_name=$uci_name
-    fi
-    config_get val $cfg $uci_name
-    if [ -n "$val" ]; then
-        echo "$out_name $val" >> $TCONF
-    fi
-}
-
-# mosquitto uses true/false, uci uses 1/0
-# note that this is not shell truthy, but equality with 1!
-append_bool() {
-    if [ $2 -eq 1 ]; then
-        echo "$1 true" >> $TCONF
-    else
-        echo "$1 false" >> $TCONF
-    fi
-}
-
-# as per append_if, but gets the value as a uci bool, not raw
-append_optional_bool() {
-    local cfg="$1"
-    local uci_name="$2"
-    local out_name="$3"
-    config_get val $cfg $uci_name
-    if [ -n "$val" ]; then
-        config_get_bool real $cfg $uci_name
-        append_bool $out_name $real
-    fi
-}
-
-mosq_general() {
-    config_get destinations "$1" log_dest
-    for dest in $destinations; do
-        echo "log_dest $dest" >> $TCONF
-    done
-
-    config_get_bool no_remote "$1" no_remote_access 0
-    if [ "$no_remote" -eq 1 ]; then
-        echo "bind_address 127.0.0.1" >> $TCONF
-    fi
-
-    config_get port "$1" port 1883
-    echo "port $port" >> $TCONF
-    append_if "$1" protocol
-    append_if "$1" max_inflight_messages
-    append_if "$1" max_queued_messages
-
-}
-
-add_listener() {
-    echo "" >> $TCONF
-    config_get port "$1" port
-    if [ -z "$port" ]; then
-        echo "Ignoring listener section without port"
-        return
-    fi
-    config_get_bool no_remote "$1" no_remote_access 0
-    if [ "$no_remote" -eq 1 ]; then
-        echo "listener $port 127.0.0.1" >> $TCONF
-    else
-        echo "listener $port" >> $TCONF
-    fi
-
-    append_if "$1" protocol
-}
-
-add_topic() {
-    echo "topic $1" >> $TCONF
-}
-
-add_bridge() {
-    config_get conn "$1" connection
-    config_get addr "$1" address
-    if [ -z "$conn" -o -z "$addr" ]; then
-        echo "Ignoring bridge section, misisng connection/address"
-        return
-    fi
-    echo "" >> $TCONF
-    echo "# Bridge connection from UCI section" >> $TCONF
-    append_if "$1" connection
-    append_if "$1" address
-
-    config_list_foreach "$1" topic add_topic
-    append_optional_bool "$1" cleansession cleansession
-    append_optional_bool "$1" try_private try_private
-
-    append_if "$1" clientid
-    append_if "$1" identity bridge_identity
-    append_if "$1" psk bridge_psk
-    append_if "$1" tls_version bridge_tls_version
-}
-
-
-config_load "mosquitto"
-config_foreach mosq_general "mosquitto"
-config_foreach add_listener "listener"
-config_foreach add_bridge "bridge"
index 000a992d48f5263097a2c3777d512bf028e0b49f..ff780975de8ed62994e4acba13b6afd21ec848ec 100644 (file)
@@ -230,5 +230,12 @@ stop_service() {
 }
 
 service_triggers(){
+       local script=$(readlink "$initscript")
+       local name=$(basename ${script:-$initscript})
+
+       procd_open_trigger
+       procd_add_raw_trigger "interface.*" 2000 /etc/init.d/$name reload
+       procd_close_trigger
+
        procd_add_reload_trigger 'snmpd'
 }
index 8c2d26daa5cc43f73c3819b3a8b70ad014fc4d16..86a356bb1b23f43c9bb3ae3ddc770e2b5b2ec4d5 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2009-2015 OpenWrt.org
+# Copyright (C) 2009-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=nfs-kernel-server
 PKG_VERSION:=1.3.3
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_MD5SUM:=9b87d890669eaaec8e97a2b0a35b2665
 
 PKG_SOURCE_URL:=@SF/nfs
@@ -60,7 +60,7 @@ define Package/nfs-utils
   $(call Package/nfs-kernel-server/Default)
   SECTION:=utils
   CATEGORY:=Utilities
-  DEPENDS+= +libevent +USE_UCLIBC:librpc
+  DEPENDS+= +libevent2 +USE_UCLIBC:librpc
   TITLE:=updated mount utility (includes nfs4)
 endef
 
@@ -93,8 +93,8 @@ MAKE_FLAGS += \
        OPT="$(TARGET_CFLAGS)" \
        INSTALLSUID="install -m 4755" \
        DESTDIR="$(PKG_INSTALL_DIR)" \
-       RPCGEN_PATH=$(STAGING_DIR_HOST)/bin/rpcgen \
-       RPCGEN=$(STAGING_DIR_HOST)/bin/rpcgen
+       RPCGEN_PATH=$(STAGING_DIR)/host/bin/rpcgen \
+       RPCGEN=$(STAGING_DIR)/host/bin/rpcgen
 
 HOST_CFLAGS += -Dlinux
 
@@ -125,7 +125,8 @@ define Host/Compile
 endef
 
 define Host/Install
-       $(INSTALL_BIN) $(HOST_BUILD_DIR)/tools/rpcgen/rpcgen $(STAGING_DIR_HOST)/bin/rpcgen
+       $(INSTALL_DIR) $(STAGING_DIR)/host/bin
+       $(INSTALL_BIN) $(HOST_BUILD_DIR)/tools/rpcgen/rpcgen $(STAGING_DIR)/host/bin/rpcgen
 endef
 
 define Package/nfs-kernel-server/install
index a4cc4c8c8e7af40ebdbbc7544f5ead43f52c7611..6482d9d2846ee14339df9621a6719c0528992c59 100644 (file)
@@ -172,4 +172,9 @@ config NGINX_PCRE
        prompt "Enable PCRE library usage"
        default y
 
+config NGINX_NAXSI
+       bool
+       prompt "Enable NAXSI module"
+       default y
+
 endmenu
index cc597157744cd528e6a049c19cf49afaa7faaf2b..09479227ca9b06bd1d72a5a6ff0b8a64bddcf001 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=nginx
-PKG_VERSION:=1.9.6
+PKG_VERSION:=1.9.13
 PKG_RELEASE:=1
 
 PKG_SOURCE:=nginx-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://nginx.org/download/
-PKG_MD5SUM:=f6899825e7a8deadba4948ff84515ad6
+PKG_MD5SUM:=e7502dc170277597ca73eb53c359c771
 PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>
 PKG_LICENSE:=2-clause BSD-like license
 
@@ -83,6 +83,11 @@ define Package/nginx/conffiles
 /etc/nginx/
 endef
 
+ADDITIONAL_MODULES:=
+ifeq ($(CONFIG_NGINX_NAXSI),y)
+  ADDITIONAL_MODULES += --add-module=$(PKG_BUILD_DIR)/nginx-naxsi/naxsi_src
+endif
+
 ADDITIONAL_MODULES:=
 ifeq ($(CONFIG_IPV6),y)
   ADDITIONAL_MODULES += --with-ipv6
@@ -209,6 +214,31 @@ define Package/nginx/install
        $(INSTALL_DATA) $(addprefix $(PKG_INSTALL_DIR)/etc/nginx/,$(config_files)) $(1)/etc/nginx/
        $(INSTALL_DIR) $(1)/etc/init.d
        $(INSTALL_BIN) ./files/nginx.init $(1)/etc/init.d/nginx
+ifeq ($(CONFIG_NGINX_NAXSI),y)
+       $(INSTALL_DIR) $(1)/etc/nginx
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/nginx-naxsi/naxsi_config/naxsi_core.rules $(1)/etc/nginx
+       chmod 0640 $(1)/etc/nginx/naxsi_core.rules
+endif
+       $(if $(CONFIG_NGINX_NAXSI),$($(INSTALL_BIN) $(PKG_BUILD_DIR)/nginx-naxsi/naxsi_config/naxsi_core.rules $(1)/etc/nginx))
+       $(if $(CONFIG_NGINX_NAXSI),$(chmod 0640 $(1)/etc/nginx/naxsi_core.rules))
+endef
+
+define Build/Prepare
+       $(call Build/Prepare/Default)
+       $(if $(CONFIG_NGINX_NAXSI),$(call Prepare/nginx-naxsi))
+endef
+
+define Download/nginx-naxsi
+       VERSION:=6358c3d2e68a0c9e3ad11661c2a1f63fadc9b4f2
+       SUBDIR:=nginx-naxsi
+       FILE:=nginx-naxsi-module-$(PKG_VERSION)-$$(VERSION).tar.gz
+       URL:=https://github.com/nbs-system/naxsi.git
+       PROTO:=git
+endef
+
+define  Prepare/nginx-naxsi
+       $(eval $(call Download,nginx-naxsi))
+       gzip -dc $(DL_DIR)/$(FILE) | tar -C $(PKG_BUILD_DIR) $(TAR_OPTIONS)
 endef
 
 $(eval $(call BuildPackage,nginx))
index a431cd9900b86d1fcb3f6368333577203b968c9c..3778609caf7ac5b1983df7ccbddf5757dd3aa206 100644 (file)
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ngircd
-PKG_VERSION:=22.1
+PKG_VERSION:=23
 PKG_RELEASE:=1
 PKG_MAINTAINER:=Claudio Leite <leitec@staticky.com>
 PKG_LICENSE:=GPL-2.0
@@ -18,7 +18,7 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:= \
         http://ngircd.barton.de/pub/ngircd/ \
         ftp://ftp.berlios.de/pub/ngircd/
-PKG_MD5SUM:=586c4fef1fbb77dcbe723e9136ec08eb
+PKG_MD5SUM:=a58e0075fea60176fa7df092ca7e2c6a
 
 PKG_INSTALL:=1
 
index 14b2144a4b80e0913b527e616a6340214a109ace..d0817a3b64d52fd27bba07023a1fb6a04354814f 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2014-2015 OpenWrt.org
+# Copyright (C) 2014-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=nsd
-PKG_VERSION:=4.1.2
+PKG_VERSION:=4.1.9
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.nlnetlabs.nl/downloads/nsd
-PKG_MD5SUM:=73014bab5514b9babaf6c9007a6b36d8
+PKG_MD5SUM:=9ac1d5ba51351d3d98b7de765439af57
 PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
 
index 0e446f9dd78ac374b968e23168a9f4286abde0b5..3b1b6c0fd411bb237a355dc7b272ff67011fb771 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006-2015 OpenWrt.org
+# Copyright (C) 2006-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ntp
-PKG_VERSION:=4.2.8p4
-PKG_RELEASE:=2
+PKG_VERSION:=4.2.8p6
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/
-PKG_MD5SUM:=6af96862b09324a8ef965ca76b759c8b
+PKG_MD5SUM:=60049f51e9c8305afe30eb22b711c5c6
 
 PKG_LICENSE:=Unique
 PKG_LICENSE_FILES:=COPYRIGHT html/copyright.html
index 41ab4cc4448c4338c95ef82fd5012518c4f9e0f8..8f4f25161ab6abe5458531d6851066ade4a53bdd 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=nut
-PKG_VERSION:=2.7.3
-PKG_RELEASE:=2
+PKG_VERSION:=2.7.4
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.networkupstools.org/source/2.7/
-PKG_MD5SUM:=a1a7f747093663e1f39ab595b63b45e4
+PKG_MD5SUM:=3ba53656933d7471f95140b32a5b8d5c
 PKG_MAINTAINER:=Martin Rowe <martin.p.rowe@gmail.com>
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=LICENSE-GPL2
index ac90a55057a738f836db0d69de497717c2804a5a..55b6917313d2b1545a15d85790053ca9a670ef64 100644 (file)
@@ -8,14 +8,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ocserv
-PKG_VERSION:=0.10.10
-PKG_RELEASE:=4
+PKG_VERSION:=0.11.1
+PKG_RELEASE:=1
 PKG_USE_MIPS16:=0
 
 PKG_BUILD_DIR :=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=ftp://ftp.infradead.org/pub/ocserv/
-PKG_MD5SUM:=1f73ccb66d36cd51279323e95ae99e68
+PKG_MD5SUM:=a581b8669f5d16639773ef81f25a1317
 
 PKG_LICENSE:=GPLv2
 PKG_LICENSE_FILES:=COPYING
@@ -39,7 +39,7 @@ define Package/ocserv
   TITLE:=OpenConnect VPN server
   URL:=http://www.infradead.org/ocserv/
   MAINTAINER:=Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
-  DEPENDS:= +OCSERV_RADIUS:libradcli +OCSERV_HTTP_PARSER:libhttp-parser +OCSERV_SECCOMP:libseccomp +libgnutls +certtool +libncurses +libreadline +OCSERV_PAM:libpam +OCSERV_PROTOBUF:libprotobuf-c +kmod-tun
+  DEPENDS:= +OCSERV_RADIUS:libradcli +OCSERV_HTTP_PARSER:libhttp-parser +OCSERV_SECCOMP:libseccomp +libgnutls +certtool +libncurses +libreadline +OCSERV_PAM:libpam +OCSERV_PROTOBUF:libprotobuf-c +libev +kmod-tun
   USERID:=ocserv=72:ocserv=72
 endef
 
@@ -92,8 +92,8 @@ define Package/ocserv/install
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ocserv $(1)/usr/sbin/
        $(INSTALL_DIR) $(1)/usr/bin
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ocserv-fw $(1)/usr/bin/
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ocpasswd $(1)/usr/bin/
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/occtl $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ocpasswd/ocpasswd $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/occtl/occtl $(1)/usr/bin/
        $(INSTALL_DIR) $(1)/etc/init.d
        $(INSTALL_BIN) ./files/ocserv.init $(1)/etc/init.d/ocserv
        $(INSTALL_DIR) $(1)/etc/ocserv
diff --git a/net/ocserv/patches/0001-don-t-attempt-to-open-per_user_dir-if-it-is-NULL.patch b/net/ocserv/patches/0001-don-t-attempt-to-open-per_user_dir-if-it-is-NULL.patch
deleted file mode 100644 (file)
index 513d766..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-From 78ebe6c1dab648e3190363cb38ad5be356884494 Mon Sep 17 00:00:00 2001
-From: Nikos Mavrogiannopoulos <nmav@gnutls.org>
-Date: Tue, 5 Jan 2016 21:37:35 +0100
-Subject: [PATCH] don't attempt to open per_user_dir if it is NULL
-
-This addresses a crash in certain libc's.
----
- src/config.c | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/src/config.c b/src/config.c
-index 827a7a0..50db655 100644
---- a/src/config.c
-+++ b/src/config.c
-@@ -617,6 +617,9 @@ static void load_iroutes(struct cfg_st *config)
-       struct dirent *r;
-       char path[_POSIX_PATH_MAX];
-+      if (config->per_user_dir == NULL)
-+              return;
-+
-       dir = opendir(config->per_user_dir);
-       if (dir != NULL) {
-               do {
-@@ -626,8 +629,8 @@ static void load_iroutes(struct cfg_st *config)
-                               append_iroutes_from_file(config, path);
-                       }
-               } while(r != NULL);
-+              closedir(dir);
-       }
--      closedir(dir);
- }
- static void parse_cfg_file(void *pool, const char* file, struct perm_cfg_st *perm_config, unsigned reload)
--- 
-2.5.1
-
index c2284aab1bd9ddfee804fcd48e81eb1b6dd5faa6..437380f64353efa58e51ff6c6594264ef4754ba9 100644 (file)
@@ -9,13 +9,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ola
-PKG_VERSION:=0.9.7
-PKG_RELEASE:=1
+PKG_VERSION:=0.10.1
+PKG_RELEASE:=2
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/OpenLightingProject/ola.git
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=2a306e4f0221fea9f4833ba04b042e72c6f10cd3
+PKG_SOURCE_VERSION:=5b86f5802e2e5b23c6a010dc8d10788e6dc57614
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
 PKG_LICENSE:=LGPL-2.1+
 
@@ -37,7 +37,7 @@ define Package/ola
   TITLE:=Open Lighting Architecture Daemon
   URL:=https://www.openlighting.org/
   MAINTAINER:=Christian Beier <dontmind@freeshell.org>
-  DEPENDS:=+protobuf +libusb-1.0 +libuuid +libstdcpp +libpthread +librt +zlib +libncurses +sudo
+  DEPENDS:=+protobuf +libusb-1.0 +libuuid +libstdcpp +libpthread +librt +zlib +libncurses +liblo +sudo
 endef
 
 define Package/ola/description
@@ -52,6 +52,7 @@ CONFIGURE_ARGS += \
        --disable-fatal-warnings \
        --disable-unittests \
        --disable-http \
+       --without-dns-sd \
         --with-ola-protoc-plugin=$(HOST_BUILD_DIR)/protoc/ola_protoc_plugin
 
 HOST_CONFIGURE_ARGS += \
diff --git a/net/ola/patches/003-Make-DNS-SD-functionality-optional-at-build-time.patch b/net/ola/patches/003-Make-DNS-SD-functionality-optional-at-build-time.patch
new file mode 100644 (file)
index 0000000..84878a1
--- /dev/null
@@ -0,0 +1,61 @@
+From a88d6d31fc5a04be4378095e03b4aac133954026 Mon Sep 17 00:00:00 2001
+From: Christian Beier <dontmind@freeshell.org>
+Date: Tue, 15 Mar 2016 15:09:25 +0100
+Subject: [PATCH] Make DNS-SD functionality optional at build time.
+
+When building for embedded systems, for instance, we
+want to limit dependencies to a minimum and it seems
+that OLA is able to perform its core tasks without
+DNS-SD perfectly fine.
+
+Signed-off-by: Christian Beier <dontmind@freeshell.org>
+---
+ configure.ac | 27 +++++++++++++++------------
+ 1 file changed, 15 insertions(+), 12 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 6654354..0d1947c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -411,23 +411,26 @@ AS_IF([test "x$use_ossp_uuid" = xyes],
+ # DNS-SD support
+ # We use either avahi or the Apple DNS-SD library.
+-
+-# dns_sd
+-AC_CHECK_HEADER(
+-  [dns_sd.h],
+-  [AC_SEARCH_LIBS(DNSServiceRegister, [dns_sd], [have_dnssd="yes"])])
++AC_ARG_WITH(dns-sd,
++[AS_HELP_STRING([--without-dns-sd], [disable DNS-SD support])],,)
++if test "x$with_dns_sd" != "xno"; then
++      # dns_sd
++      AC_CHECK_HEADER(
++        [dns_sd.h],
++        [AC_SEARCH_LIBS(DNSServiceRegister, [dns_sd], [have_dnssd="yes"])])
++
++      # avahi
++      PKG_CHECK_MODULES(
++        avahi,
++        [avahi-client],
++        [have_avahi="yes"],
++        [true])
++fi
+ AS_IF([test "x$have_dnssd" = xyes],
+       [AC_DEFINE([HAVE_DNSSD], [1], [Defined to use Bonjour DNS_SD])])
+ AM_CONDITIONAL([HAVE_DNSSD], [test "x$have_dnssd" = xyes])
+-# avahi
+-PKG_CHECK_MODULES(
+-  avahi,
+-  [avahi-client],
+-  [have_avahi="yes"],
+-  [true])
+-
+ AS_IF([test "x$have_avahi" = xyes],
+       [AC_DEFINE([HAVE_AVAHI], [1], [Defined to use Avahi])])
+ AM_CONDITIONAL([HAVE_AVAHI], [test "x$have_avahi" = xyes])
+-- 
+2.1.4
+
index 3a1e400c2f8662fe220b7c8f9a0b0c78998dddcd..66c949c821e5000961b9845ef4c7a28bc0381b7c 100644 (file)
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=openssh
-PKG_VERSION:=7.1p1
+PKG_VERSION:=7.2p2
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/ \
                http://ftp.belnet.be/pub/OpenBSD/OpenSSH/portable/
-PKG_MD5SUM:=8709736bc8a8c253bc4eeb4829888ca5
+PKG_MD5SUM:=13009a9156510d8f27e752659075cced
 
 PKG_LICENSE:=BSD ISC
 PKG_LICENSE_FILES:=LICENCE
index 3e8d6f6008c49913084467e42c548449ff2c6401..cb7170fddb7c48634b74643ed644240c96e277f2 100644 (file)
@@ -8,10 +8,11 @@
 # $Id: Makefile $
 
 include $(TOPDIR)/rules.mk
+include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=openvswitch
 
-PKG_RELEASE:=3
+PKG_RELEASE:=7
 PKG_VERSION:=2.5.0
 PKG_RELEASE=$(PKG_SOURCE_VERSION)
 PKG_LICENSE:=Apache-2.0
@@ -21,7 +22,7 @@ PKG_USE_MIPS16:=0
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/openvswitch/ovs
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=98b94d1e7002063ce2ea3c3221fe9234cac4e124
+PKG_SOURCE_VERSION:=22d4614ddf83988a3771fb379ea029e663b4455a
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
 
 PKG_BUILD_PARALLEL:=1
@@ -31,14 +32,15 @@ PKG_INSTALL:=1
 # Upstream package supports kernels between 2.6.32 and 4.3 
 # see https://github.com/openvswitch/ovs/blob/master/FAQ.md
 # This list is pruned to only those kernels used in OpenWRT
-SUPPORTED_KERNELS:=LINUX_3_18||LINUX_4_1||LINUX_4_3
+# Support for kernel 4.4 is backported
+SUPPORTED_KERNELS:=LINUX_3_18||LINUX_4_1||LINUX_4_3||LINUX_4_4
 
 include $(INCLUDE_DIR)/package.mk
-include $(INCLUDE_DIR)/kernel.mk
 $(call include_mk, python-package.mk)
 
 define Package/openvswitch/Default
   SECTION:=net
+  SUBMENU:=Open vSwitch
   CATEGORY:=Network
   URL:=http://openvswitch.org/
   MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
@@ -54,20 +56,22 @@ define Package/openvswitch/Default/description
   1000V.
 endef
 
-define Package/openvswitch
+define Package/openvswitch-base
   $(call Package/openvswitch/Default)
-  TITLE:=Open vSwitch Userspace Package
+  TITLE:=Open vSwitch Userspace Package (base)
   DEPENDS:=+libpcap +libopenssl +librt +kmod-openvswitch @($(SUPPORTED_KERNELS))
 endef
 
-define Package/openvswitch/description
+define Package/openvswitch-base/description
   Provides the main userspace components required for Open vSwitch to function.
+  The main OVS tools (ovs-vsctl, ovs-ofctl, etc) are packaged separately
+  to conserve some room and allow more configurability.
 endef
 
 define Package/openvswitch-python
   $(call Package/openvswitch/Default)
   TITLE:=Open vSwitch Python Support
-  DEPENDS:=@PACKAGE_openvswitch +PACKAGE_openvswitch:openvswitch +python
+  DEPENDS:=+openvswitch +python
 endef
 
 define Package/openvswitch-python/description
@@ -76,8 +80,8 @@ endef
 
 define Package/openvswitch-ipsec
   $(call Package/openvswitch/Default)
-  TITLE:=Open vSwitch Userspace Package
-  DEPENDS:=@PACKAGE_openvswitch +PACKAGE_openvswitch:openvswitch-python
+  TITLE:=Open vSwitch GRE through IPsec tool
+  DEPENDS:=+openvswitch-python
 endef
 
 define Package/openvswitch-ipsec/description
@@ -87,14 +91,26 @@ endef
 
 define Package/openvswitch-benchmark
   $(call Package/openvswitch/Default)
-  TITLE:=Open vSwitch Userspace Package
-  DEPENDS:=@PACKAGE_openvswitch +PACKAGE_openvswitch:openvswitch
+  TITLE:=Open vSwitch flow setup benchmark utility
+  DEPENDS:=+openvswitch
 endef
 
 define Package/openvswitch-benchmark/description
   Utility for running OpenVSwitch benchmarking
 endef
 
+OVS_BIN_TOOLS:=ovs-appctl ovs-ofctl ovs-dpctl ovs-vsctl ovsdb-client
+define Package/openvswitch
+  $(call Package/openvswitch/Default)
+  TITLE:=Open vSwitch Userspace Package
+  DEPENDS:=+openvswitch-base $(foreach t,$(OVS_BIN_TOOLS),+openvswitch-$(t))
+endef
+
+define Package/openvswitch/description
+  Provides the main userspace components required for Open vSwitch to function.
+  Includes also the main OVS utilities (ovs-appctl, ovs-vsctl, etc).
+endef
+
 define KernelPackage/openvswitch
   SECTION:=kernel
   CATEGORY:=Kernel modules
@@ -122,38 +138,49 @@ TARGET_CFLAGS += -flto -std=gnu99
 CONFIGURE_VARS += KARCH=$(LINUX_KARCH)
 MAKE_FLAGS += ARCH="$(LINUX_KARCH)"
 
-define Package/openvswitch/install
+define OvsBinUtility
+  define Package/openvswitch-$(1)
+     $(call Package/openvswitch/Default)
+     TITLE:=$(2)
+     DEPENDS:=+openvswitch-base
+  endef
+
+  define Package/openvswitch-$(1)/description
+    $(2)
+  endef
+
+  define Package/openvswitch-$(1)/install
+    $(INSTALL_DIR) $$(1)/usr/bin/ ;\
+    $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(1) $$(1)/usr/bin/
+  endef
+endef
+
+define Package/openvswitch-base/install
        $(INSTALL_DIR) $(1)/etc/openvswitch
 
        $(INSTALL_DIR) $(1)/etc/init.d
        $(INSTALL_BIN) ./files/etc/init.d/openvswitch.init $(1)/etc/init.d/openvswitch
 
        $(INSTALL_DIR) $(1)/usr/lib/
-       $(CP) $(PKG_BUILD_DIR)/lib/.libs/libsflow.so*  $(1)/usr/lib/
-       $(CP) $(PKG_BUILD_DIR)/lib/.libs/libopenvswitch.so*  $(1)/usr/lib/
-       $(CP) $(PKG_BUILD_DIR)/ofproto/.libs/libofproto.so*  $(1)/usr/lib/
-       $(CP) $(PKG_BUILD_DIR)/ovsdb/.libs/libovsdb.so*  $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libofproto.so*  $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libopenvswitch.so*  $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libovsdb.so*  $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsflow.so*  $(1)/usr/lib/
 
        $(INSTALL_DIR) $(1)/usr/bin/
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/utilities/.libs/ovs-appctl $(1)/usr/bin/
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/utilities/.libs/ovs-ofctl $(1)/usr/bin/
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/ovsdb/.libs/ovsdb-client $(1)/usr/bin/
-
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/utilities/.libs/ovs-dpctl $(1)/usr/bin/
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/utilities/.libs/ovs-vsctl $(1)/usr/bin/
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/ovsdb/.libs/ovsdb-tool $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ovsdb-tool $(1)/usr/bin/
 
        $(INSTALL_DIR) $(1)/usr/sbin/
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/vswitchd/.libs/ovs-vswitchd $(1)/usr/sbin/
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/ovsdb/.libs/ovsdb-server $(1)/usr/sbin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ovs-vswitchd $(1)/usr/sbin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ovsdb-server $(1)/usr/sbin/
 
        $(INSTALL_DIR) $(1)/usr/share/openvswitch/
-       $(INSTALL_CONF) $(PKG_BUILD_DIR)/vswitchd/vswitch.ovsschema $(1)/usr/share/openvswitch/
+       $(INSTALL_CONF) $(PKG_INSTALL_DIR)/usr/share/openvswitch/vswitch.ovsschema $(1)/usr/share/openvswitch/
 endef
 
 define Package/openvswitch-python/install
-       $(INSTALL_DIR) $(1)/usr/lib/python$(PYTHON_VERSION)/
-       $(CP) $(PKG_BUILD_DIR)/python/ovs/ $(1)/usr/lib/python$(PYTHON_VERSION)/
+       $(INSTALL_DIR) $(1)/usr/lib/python$(PYTHON_VERSION)/ovs
+       $(CP) $(PKG_INSTALL_DIR)/usr/share/openvswitch/python/ovs/* $(1)/usr/lib/python$(PYTHON_VERSION)/ovs
 endef
 
 define Package/openvswitch-ipsec/install
@@ -163,17 +190,25 @@ endef
 
 define Package/openvswitch-benchmark/install
        $(INSTALL_DIR) $(1)/usr/bin/
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/utilities/.libs/ovs-benchmark $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ovs-benchmark $(1)/usr/bin/
 endef
 
-define Package/openvswitch/postinst
-#!/bin/sh
-[ -n "$${IPKG_INSTROOT}" ] || /etc/init.d/openvswitch enable || true
+define Package/openvswitch/install
+       :
 endef
 
-$(eval $(call BuildPackage,openvswitch))
+$(eval $(call OvsBinUtility,ovs-appctl,Open vSwitch app control utility))
+$(eval $(call OvsBinUtility,ovs-ofctl,Open vSwitch OpenFlow control utility))
+$(eval $(call OvsBinUtility,ovs-dpctl,Open vSwitch datapath management utility))
+$(eval $(call OvsBinUtility,ovs-vsctl,Open vSwitch ovs-vswitchd management utility))
+$(eval $(call OvsBinUtility,ovsdb-client,Open vSwitch database JSON-RPC client))
+
+$(foreach t,$(OVS_BIN_TOOLS),$(eval $(call BuildPackage,openvswitch-$(t))))
+
+$(eval $(call BuildPackage,openvswitch-base))
 $(eval $(call BuildPackage,openvswitch-python))
 $(eval $(call BuildPackage,openvswitch-ipsec))
 $(eval $(call BuildPackage,openvswitch-benchmark))
+$(eval $(call BuildPackage,openvswitch))
 $(eval $(call KernelPackage,openvswitch))
 
diff --git a/net/openvswitch/patches/0010-lib-ovs-thread-Ensure-that-thread-stacks-are-always-.patch b/net/openvswitch/patches/0010-lib-ovs-thread-Ensure-that-thread-stacks-are-always-.patch
new file mode 100644 (file)
index 0000000..88f5d26
--- /dev/null
@@ -0,0 +1,75 @@
+From 8147cec9ee8feea9440cf79365709ddc32ff57d5 Mon Sep 17 00:00:00 2001
+From: Alexandru Ardelean <ardeleanalex@gmail.com>
+Date: Thu, 4 Feb 2016 09:20:34 +0200
+Subject: [PATCH] lib/ovs-thread: Ensure that thread stacks are always at least
+ 512 kB.
+
+This makes a difference for libc implementations (such as musl libc) that
+have a really small default pthread stack size.
+
+Will reference this discussion:
+http://patchwork.ozlabs.org/patch/572340/
+
+Reported-by: Robert McKay <robert@mckay.com>
+Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
+[blp@ovn.org made style changes]
+Signed-off-by: Ben Pfaff <blp@ovn.org>
+---
+ lib/ovs-thread.c | 29 +++++++++++++++++++++++++++++
+ 1 file changed, 29 insertions(+)
+
+diff --git a/lib/ovs-thread.c b/lib/ovs-thread.c
+index 6ebda07..b0e10ee 100644
+--- a/lib/ovs-thread.c
++++ b/lib/ovs-thread.c
+@@ -340,6 +340,25 @@ ovsthread_wrapper(void *aux_)
+     return aux.start(aux.arg);
+ }
++static void
++set_min_stack_size(pthread_attr_t *attr, size_t min_stacksize)
++{
++    size_t stacksize;
++    int error;
++
++    error = pthread_attr_getstacksize(attr, &stacksize);
++    if (error) {
++        ovs_abort(error, "pthread_attr_getstacksize failed");
++    }
++
++    if (stacksize < min_stacksize) {
++        error = pthread_attr_setstacksize(attr, min_stacksize);
++        if (error) {
++            ovs_abort(error, "pthread_attr_setstacksize failed");
++        }
++    }
++}
++
+ /* Starts a thread that calls 'start(arg)'.  Sets the thread's name to 'name'
+  * (suffixed by its ovsthread_id()).  Returns the new thread's pthread_t. */
+ pthread_t
+@@ -358,10 +377,20 @@ ovs_thread_create(const char *name, void *(*start)(void *), void *arg)
+     aux->arg = arg;
+     ovs_strlcpy(aux->name, name, sizeof aux->name);
+
+-    error = pthread_create(&thread, NULL, ovsthread_wrapper, aux);
++    /* Some small systems use a default stack size as small as 80 kB, but OVS
++     * requires approximately 384 kB according to the following analysis:
++     * http://openvswitch.org/pipermail/dev/2016-January/065049.html
++     *
++     * We use 512 kB to give us some margin of error. */
++    pthread_attr_t attr;
++    pthread_attr_init(&attr);
++    set_min_stack_size(&attr, 512 * 1024);
++
++    error = pthread_create(&thread, &attr, ovsthread_wrapper, aux);
+     if (error) {
+         ovs_abort(error, "pthread_create failed");
+     }
++    pthread_attr_destroy(&attr);
+     return thread;
+ }
\f
+-- 
+2.1.4
+
diff --git a/net/openvswitch/patches/0011-kernel-4-4-support.patch b/net/openvswitch/patches/0011-kernel-4-4-support.patch
new file mode 100644 (file)
index 0000000..1a492e4
--- /dev/null
@@ -0,0 +1,279 @@
+diff --git a/acinclude.m4 b/acinclude.m4
+index 11c7787..07dd647 100644
+--- a/acinclude.m4
++++ b/acinclude.m4
+@@ -134,10 +134,10 @@ AC_DEFUN([OVS_CHECK_LINUX], [
+     AC_MSG_RESULT([$kversion])
+     if test "$version" -ge 4; then
+-       if test "$version" = 4 && test "$patchlevel" -le 3; then
++       if test "$version" = 4 && test "$patchlevel" -le 4; then
+           : # Linux 4.x
+        else
+-          AC_ERROR([Linux kernel in $KBUILD is version $kversion, but version newer than 4.3.x is not supported (please refer to the FAQ for advice)])
++          AC_ERROR([Linux kernel in $KBUILD is version $kversion, but version newer than 4.4.x is not supported (please refer to the FAQ for advice)])
+        fi
+     elif test "$version" = 3; then
+        : # Linux 3.x
+diff --git a/datapath/actions.c b/datapath/actions.c
+index 20413c9..719c43d 100644
+--- a/datapath/actions.c
++++ b/datapath/actions.c
+@@ -706,7 +706,8 @@ static void ovs_fragment(struct vport *vport, struct sk_buff *skb, u16 mru,
+               skb_dst_set_noref(skb, &ovs_dst);
+               IPCB(skb)->frag_max_size = mru;
+-              ip_do_fragment(skb->sk, skb, ovs_vport_output);
++              ip_do_fragment(NET_ARG(dev_net(ovs_dst.dev))
++                      skb->sk, skb, ovs_vport_output);
+               refdst_drop(orig_dst);
+       } else if (ethertype == htons(ETH_P_IPV6)) {
+               const struct nf_ipv6_ops *v6ops = nf_get_ipv6_ops();
+@@ -727,7 +728,8 @@ static void ovs_fragment(struct vport *vport, struct sk_buff *skb, u16 mru,
+               skb_dst_set_noref(skb, &ovs_rt.dst);
+               IP6CB(skb)->frag_max_size = mru;
+-              v6ops->fragment(skb->sk, skb, ovs_vport_output);
++              v6ops->fragment(NET_ARG(dev_net(ovs_rt.dst.dev))
++                      skb->sk, skb, ovs_vport_output);
+               refdst_drop(orig_dst);
+       } else {
+               WARN_ONCE(1, "Failed fragment ->%s: eth=%04x, MRU=%d, MTU=%d.",
+diff --git a/datapath/conntrack.c b/datapath/conntrack.c
+index 795ed91..3b9bfba 100644
+--- a/datapath/conntrack.c
++++ b/datapath/conntrack.c
+@@ -323,7 +323,7 @@ static int handle_fragments(struct net *net, struct sw_flow_key *key,
+               int err;
+               memset(IPCB(skb), 0, sizeof(struct inet_skb_parm));
+-              err = ip_defrag(skb, user);
++              err = ip_defrag(NET_ARG(net) skb, user);
+               if (err)
+                       return err;
+@@ -374,7 +374,7 @@ ovs_ct_expect_find(struct net *net, const struct nf_conntrack_zone *zone,
+ {
+       struct nf_conntrack_tuple tuple;
+-      if (!nf_ct_get_tuplepr(skb, skb_network_offset(skb), proto, &tuple))
++      if (!nf_ct_get_tuplepr(skb, skb_network_offset(skb), proto, NET_ARG(net) &tuple))
+               return NULL;
+       return __nf_ct_expect_find(net, zone, &tuple);
+ }
+diff --git a/datapath/datapath.c b/datapath/datapath.c
+index e3d3c8c..a4157f4 100644
+--- a/datapath/datapath.c
++++ b/datapath/datapath.c
+@@ -96,8 +96,12 @@ static bool ovs_must_notify(struct genl_family *family, struct genl_info *info,
+ static void ovs_notify(struct genl_family *family, struct genl_multicast_group *grp,
+                      struct sk_buff *skb, struct genl_info *info)
+ {
+-      genl_notify(family, skb, genl_info_net(info),
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,0)
++    genl_notify(family, skb, info, GROUP_ID(grp), GFP_KERNEL);
++#else
++    genl_notify(family, skb, genl_info_net(info),
+                   info->snd_portid, GROUP_ID(grp), info->nlhdr, GFP_KERNEL);
++#endif
+ }
+ /**
+diff --git a/datapath/linux/compat/include/linux/netfilter_ipv6.h b/datapath/linux/compat/include/linux/netfilter_ipv6.h
+index 3939e14..b724623 100644
+--- a/datapath/linux/compat/include/linux/netfilter_ipv6.h
++++ b/datapath/linux/compat/include/linux/netfilter_ipv6.h
+@@ -13,7 +13,7 @@
+  * the callback parameter needs to be in the form that older kernels accept.
+  * We don't backport the other ipv6_ops as they're currently unused by OVS. */
+ struct ovs_nf_ipv6_ops {
+-      int (*fragment)(struct sock *sk, struct sk_buff *skb,
++      int (*fragment)(NET_ARG(net) struct sock *sk, struct sk_buff *skb,
+                       int (*output)(OVS_VPORT_OUTPUT_PARAMS));
+ };
+ #define nf_ipv6_ops ovs_nf_ipv6_ops
+diff --git a/datapath/linux/compat/include/net/ip.h b/datapath/linux/compat/include/net/ip.h
+index cd87bcc..b749301 100644
+--- a/datapath/linux/compat/include/net/ip.h
++++ b/datapath/linux/compat/include/net/ip.h
+@@ -66,8 +66,20 @@ static inline unsigned int rpl_ip_skb_dst_mtu(const struct sk_buff *skb)
+ #define ip_skb_dst_mtu rpl_ip_skb_dst_mtu
+ #endif /* HAVE_IP_SKB_DST_MTU */
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,0)
++#define NET_PARAM(x) struct net *x,
++#define NET_ARG(x) x,
++#define NET_DEV_NET(x) dev_net(x)
++#define NET_DECLARE_INIT(x,y)
++#else
++#define NET_PARAM(x)
++#define NET_ARG(x)
++#define NET_DEV_NET(x)
++#define NET_DECLARE_INIT(x,y) struct net *x = y;
++#endif
++
+ #ifdef HAVE_IP_FRAGMENT_TAKES_SOCK
+-#define OVS_VPORT_OUTPUT_PARAMS struct sock *sock, struct sk_buff *skb
++#define OVS_VPORT_OUTPUT_PARAMS NET_PARAM(net) struct sock *sock, struct sk_buff *skb
+ #else
+ #define OVS_VPORT_OUTPUT_PARAMS struct sk_buff *skb
+ #endif
+@@ -89,12 +101,13 @@ static inline bool ip_defrag_user_in_between(u32 user,
+ #endif /* < v4.2 */
+ #ifndef HAVE_IP_DO_FRAGMENT
+-static inline int rpl_ip_do_fragment(struct sock *sk, struct sk_buff *skb,
++static inline int rpl_ip_do_fragment(NET_PARAM(net) struct sock *sk, struct sk_buff *skb,
+                                    int (*output)(OVS_VPORT_OUTPUT_PARAMS))
+ {
+       unsigned int mtu = ip_skb_dst_mtu(skb);
+       struct iphdr *iph = ip_hdr(skb);
+       struct rtable *rt = skb_rtable(skb);
+       struct net_device *dev = rt->dst.dev;
++      NET_DECLARE_INIT(net, dev_net(dev));
+       if (unlikely(((iph->frag_off & htons(IP_DF)) && !skb->ignore_df) ||
+@@ -102,7 +115,7 @@ static inline int rpl_ip_do_fragment(struct sock *sk, struct sk_buff *skb,
+                     IPCB(skb)->frag_max_size > mtu))) {
+               pr_warn("Dropping packet in ip_do_fragment()\n");
+-              IP_INC_STATS(dev_net(dev), IPSTATS_MIB_FRAGFAILS);
++              IP_INC_STATS(net, IPSTATS_MIB_FRAGFAILS);
+               kfree_skb(skb);
+               return -EMSGSIZE;
+       }
+@@ -116,8 +129,7 @@ static inline int rpl_ip_do_fragment(struct sock *sk, struct sk_buff *skb,
+ #define ip_do_fragment rpl_ip_do_fragment
+ #endif /* IP_DO_FRAGMENT */
+-int rpl_ip_defrag(struct sk_buff *skb, u32 user);
+-#define ip_defrag rpl_ip_defrag
++int rpl_ip_defrag(NET_PARAM(net) struct sk_buff *skb, u32 user);
+ int __init rpl_ipfrag_init(void);
+ void rpl_ipfrag_fini(void);
+@@ -127,14 +139,15 @@ void rpl_ipfrag_fini(void);
+  * ("inet: frag: Always orphan skbs inside ip_defrag()"), but it should be
+  * always included in kernels 4.5+. */
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(4,5,0)
+-static inline int rpl_ip_defrag(struct sk_buff *skb, u32 user)
++static inline int rpl_ip_defrag(NET_PARAM(net) struct sk_buff *skb, u32 user)
+ {
+       skb_orphan(skb);
+-      return ip_defrag(skb, user);
++      return ip_defrag(NET_ARG(net) skb, user);
+ }
+-#define ip_defrag rpl_ip_defrag
+ #endif
++#define ip_defrag rpl_ip_defrag
++
+ static inline int rpl_ipfrag_init(void) { return 0; }
+ static inline void rpl_ipfrag_fini(void) { }
+ #endif /* HAVE_CORRECT_MRU_HANDLING && OVS_FRAGMENT_BACKPORT */
+diff --git a/datapath/linux/compat/include/net/ip6_tunnel.h b/datapath/linux/compat/include/net/ip6_tunnel.h
+index ce65087..eacf9ca 100644
+--- a/datapath/linux/compat/include/net/ip6_tunnel.h
++++ b/datapath/linux/compat/include/net/ip6_tunnel.h
+@@ -17,11 +17,15 @@ static inline void ip6tunnel_xmit(struct sock *sk, struct sk_buff *skb,
+       pkt_len = skb->len - skb_inner_network_offset(skb);
+       /* TODO: Fix GSO for ipv6 */
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,0)
++      err = ip6_local_out(dev_net(dev), sk, skb);
++#else
+ #ifdef HAVE_IP6_LOCAL_OUT_SK
+       err = ip6_local_out_sk(sk, skb);
+ #else
+       err = ip6_local_out(skb);
+ #endif
++#endif /* >= kernel 4.4 */
+       if (net_xmit_eval(err) != 0)
+               pkt_len = net_xmit_eval(err);
+       else
+diff --git a/datapath/linux/compat/include/net/vxlan.h b/datapath/linux/compat/include/net/vxlan.h
+index b50cd17..230f3ad 100644
+--- a/datapath/linux/compat/include/net/vxlan.h
++++ b/datapath/linux/compat/include/net/vxlan.h
+@@ -218,10 +218,20 @@ struct vxlan_dev {
+ struct net_device *rpl_vxlan_dev_create(struct net *net, const char *name,
+                                   u8 name_assign_type, struct vxlan_config *conf);
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,0)
++static inline __be16 vxlan_dev_dst_port(struct vxlan_dev *vxlan,
++                                      unsigned short family)
++{
++      if (family == AF_INET6)
++              return inet_sk(vxlan->vn6_sock->sock->sk)->inet_sport;
++      return inet_sk(vxlan->vn4_sock->sock->sk)->inet_sport;
++}
++#else
+ static inline __be16 vxlan_dev_dst_port(struct vxlan_dev *vxlan)
+ {
+       return inet_sport(vxlan->vn_sock->sock->sk);
+ }
++#endif
+ static inline netdev_features_t vxlan_features_check(struct sk_buff *skb,
+                                                    netdev_features_t features)
+diff --git a/datapath/linux/compat/ip_fragment.c b/datapath/linux/compat/ip_fragment.c
+index cf2daaa..e168196 100644
+--- a/datapath/linux/compat/ip_fragment.c
++++ b/datapath/linux/compat/ip_fragment.c
+@@ -674,11 +674,11 @@ out_fail:
+ }
+ /* Process an incoming IP datagram fragment. */
+-int rpl_ip_defrag(struct sk_buff *skb, u32 user)
++int rpl_ip_defrag(NET_ARG(net) struct sk_buff *skb, u32 user)
+ {
+       struct net_device *dev = skb->dev ? : skb_dst(skb)->dev;
+       int vif = vrf_master_ifindex_rcu(dev);
+-      struct net *net = dev_net(dev);
++      NET_DECLARE_INIT(net, dev_net(dev));
+       struct ipq *qp;
+       IP_INC_STATS_BH(net, IPSTATS_MIB_REASMREQDS);
+diff --git a/datapath/linux/compat/stt.c b/datapath/linux/compat/stt.c
+index eb397e8..5ea3c52 100644
+--- a/datapath/linux/compat/stt.c
++++ b/datapath/linux/compat/stt.c
+@@ -1450,7 +1450,11 @@ static void clean_percpu(struct work_struct *work)
+ }
+ #ifdef HAVE_NF_HOOKFN_ARG_OPS
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,0)
++#define FIRST_PARAM void *priv
++#else
+ #define FIRST_PARAM const struct nf_hook_ops *ops
++#endif /* >= kernel 4.4 */
+ #else
+ #define FIRST_PARAM unsigned int hooknum
+ #endif
+@@ -1498,7 +1502,9 @@ static unsigned int nf_ip_hook(FIRST_PARAM, struct sk_buff *skb, LAST_PARAM)
+ static struct nf_hook_ops nf_hook_ops __read_mostly = {
+       .hook           = nf_ip_hook,
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,4,0)
+       .owner          = THIS_MODULE,
++#endif
+       .pf             = NFPROTO_IPV4,
+       .hooknum        = NF_INET_LOCAL_IN,
+       .priority       = INT_MAX,
+diff --git a/datapath/vport-vxlan.c b/datapath/vport-vxlan.c
+index c05f5d4..3cbb568 100644
+--- a/datapath/vport-vxlan.c
++++ b/datapath/vport-vxlan.c
+@@ -153,7 +153,12 @@ static int vxlan_get_egress_tun_info(struct vport *vport, struct sk_buff *skb,
+ {
+       struct vxlan_dev *vxlan = netdev_priv(vport->dev);
+       struct net *net = ovs_dp_get_net(vport->dp);
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,0)
++      unsigned short family = ip_tunnel_info_af(upcall->egress_tun_info);
++      __be16 dst_port = vxlan_dev_dst_port(vxlan, family);
++#else
+       __be16 dst_port = vxlan_dev_dst_port(vxlan);
++#endif
+       __be16 src_port;
+       int port_min;
+       int port_max;
index d17d1962e4ffcaa55fd4adf6a6169221ede3c8d4..f188cc07668592159f9cfe060033c73324bfa5e8 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=pptpd
 PKG_VERSION:=1.4.0
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/poptop
index f73eeea2375e18ceb091553d190161bb0c45c78d..7f825941f3e7bafa70c1e844878a9c1d986c9590 100644 (file)
@@ -11,7 +11,6 @@ nobsdcomp
 nodeflate
 #noproxyarp
 #nomppc
-mppe required,no40,no56,stateless
 require-mschap-v2
 refuse-chap
 refuse-mschap
index 354745f592f8995bfcd66e0a0bb494a9f7de56be..398ae9d36f1b865d4ba5cd80f5d7aec919b28547 100644 (file)
@@ -1,5 +1,4 @@
 #debug
-option /etc/ppp/options.pptpd
 speed 115200
 stimeout 10
 #localip & remoteip are not needed, ip management is done by pppd
index d1c50fd6faec62518c492346c2543f44ae8033bb..0d18aa1276f3c74fa64934ab283769891c549947 100644 (file)
@@ -7,6 +7,7 @@ USE_PROCD=1
 BIN=/usr/sbin/pptpd
 CONFIG=/var/etc/pptpd.conf
 CHAP_SECRETS=/var/etc/chap-secrets
+OPTIONS_PPTP=/var/etc/options.pptpd
 
 validate_login_section() {
        uci_validate_section pptpd login "${1}" \
@@ -18,7 +19,9 @@ validate_pptpd_section() {
        uci_validate_section pptpd service "${1}" \
                'enabled:uinteger' \
                'localip:string' \
-               'remoteip:string'
+               'remoteip:string' \
+               'mppe:list(string):required no40 no56 stateless' \
+               'logwtmp:uinteger'
 }
 
 setup_login() {
@@ -34,6 +37,8 @@ setup_login() {
 }
 
 setup_config() {
+       local enabled localip remoteip mppe
+
        validate_pptpd_section "${1}" || {
                echo "validation failed"
                return 1
@@ -43,9 +48,13 @@ setup_config() {
 
        mkdir -p /var/etc
        cp /etc/pptpd.conf $CONFIG
+       cp /etc/ppp/options.pptpd $OPTIONS_PPTP
 
        [ -n "$localip" ] && echo "localip  $localip" >> $CONFIG
        [ -n "$remoteip" ] && echo "remoteip  $remoteip" >> $CONFIG
+       [ "$logwtmp" -eq 1 ] && echo "logwtmp" >> $CONFIG
+
+       echo "mppe $(echo $mppe | sed -e 's/\s/,/g')" >> $OPTIONS_PPTP
 
        return 0
 }
@@ -58,6 +67,6 @@ start_service() {
        ln -sfn $CHAP_SECRETS /etc/ppp/chap-secrets
 
        procd_open_instance
-       procd_set_param command $BIN -c $CONFIG
+       procd_set_param command $BIN -c $CONFIG -o $OPTIONS_PPTP
        procd_close_instance
 }
diff --git a/net/privoxy/Config.in b/net/privoxy/Config.in
new file mode 100644 (file)
index 0000000..b4a629d
--- /dev/null
@@ -0,0 +1,115 @@
+if PACKAGE_privoxy
+
+       comment "Shared libraries settings"
+
+       config PRIVOXY_disable-pthread
+               bool "Don't use POSIX libpthread (-5489b)"
+               default n
+
+       config PRIVOXY_disable-dynamic-pcre
+               bool "Use the built-in, static pcre, even if libpcre is available (+25669b)"
+               default n
+
+       config PRIVOXY_disable-zlib
+               bool "Don't use zlib to decompress data before filtering. (-1336b)"
+               default n
+
+       comment "Config options. Overwrites/ignore configuration file settings"
+
+       config PRIVOXY_disable-toggle
+               bool "Don't support temporary disable (+2797b)"
+               default n
+
+       config PRIVOXY_disable-force
+               bool "Don't allow single-page disable (-434b)"
+               default n
+
+       config PRIVOXY_disable-fast-redirects
+               bool "Don't support fast redirects (-1393b)"
+               default n
+
+       config PRIVOXY_disable-stats
+               bool "Don't keep statistics (+2870b)"
+               default n
+
+       config PRIVOXY_enable-ie-images
+               bool "Enable MS IE image handling. !Read help! (+2694b)"
+               help
+                       Enable a quick but not always reliable auto-detect whether
+                       requests from MS Internet Explorer are for an image or not.
+               default n
+
+       config PRIVOXY_disable-image-blocking
+               bool "Don't check for image request - assume HTML (-655b)"
+               help
+                       Don't try to figure out whether a request is
+                       for an image or HTML - assume HTML.
+               default n
+
+       config PRIVOXY_disable-acl-support
+               bool "Disable ACL access control (-3496b)"
+               help
+                       Prevents the use of ACLs to control access to Privoxy by IP address.
+               default n
+
+       config PRIVOXY_disable-trust-files
+               bool "Prevents the use of trust files. (-1302b)"
+               default n
+
+       config PRIVOXY_disable-editor
+               bool "Disable web-based editor. !Read help! (-44979b)"
+               help
+                       Prevents the use of the web-based actions file
+                       editor and web-based temporary disable setting.
+               default n
+
+       config PRIVOXY_enable-no-gifs
+               bool "Use politically correct PNG format. !Read help! (+112b)"
+               help
+                       Use politically correct PNG format instead of GIF
+                       for built-in images. May not work with all browsers.
+               default n
+
+       config PRIVOXY_enable-graceful-termination
+               bool "Allow to shutdown Privoxy through the webinterface. (+1685b)"
+               default n
+
+       config PRIVOXY_enable-extended-host-patterns
+               bool "Enable and require PCRE syntax in host patterns. !Read help! (-1329b)"
+               help
+                       Enable and require PCRE syntax in host patterns. This feature hasn't
+                       been announced yet and it's not clear if it's a good idea. It's expected
+                       to work, but undocumented. You should only enable it if you know what
+                       PCRE is and are sure that you need it for your host patterns. You can
+                       use tools/url-pattern-translator.pl to convert existing action files to
+                       use PCRE host patterns. Please don't enable this option when creating
+                       packages for others that may not be expecting it.
+               default n
+
+       config PRIVOXY_enable-external-filters
+               bool "Allow to filter content with scripts and programs. Experimental. (+4821b)"
+               default n
+
+       config PRIVOXY_enable-accept-filter
+               bool "Try to use accf_http(9) if supported. (+-0b)"
+               default n
+
+       config PRIVOXY_enable-strptime-sanity-checks
+               bool "Only trust strptime() results if ... !Read help! (+407b)"
+               help
+                       Only trust strptime() results if an additional strftime()/strptime()
+                       conversion doesn't change the result. Can be useful if strptime() is
+                       known or suspected to be broken.
+               default n
+
+       config PRIVOXY_enable-compression
+               bool "Allow Privoxy to compress buffered content. (+1275b)"
+               help
+                       Allow Privoxy to compress buffered content 
+                       if the client supports it. Requires zlib support.
+               depends on !PRIVOXY_no_zlib
+               default n
+
+
+endif
+                
\ No newline at end of file
index 8c5ca2c87ef30c72bbac5ca005e07c4785058ac4..a51b36f94c58389417c7649e35039fe1910346d7 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006-2015 OpenWrt.org
+# Copyright (C) 2006-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=privoxy
-PKG_VERSION:=3.0.23
-PKG_RELEASE:=4
+PKG_VERSION:=3.0.24
+PKG_RELEASE:=1
 
 PKG_SOURCE:=privoxy-$(PKG_VERSION)-stable-src.tar.gz
 PKG_SOURCE_URL:=@SF/ijbswa
-PKG_MD5SUM:=bbe47d5ff1a54d9f9fc93a160532697f
+PKG_MD5SUM:=44a47d1a5000db8cccd61ace0e25e7f7
 PKG_BUILD_DIR:=$(BUILD_DIR)/privoxy-$(PKG_VERSION)-stable
 PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
@@ -21,7 +21,31 @@ PKG_INSTALL:=1
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=LICENSE
 
-PKG_MAINTAINER:=christian.schoenebeck@gmail.com
+PKG_MAINTAINER:=Christian Schoenebeck <christian.schoenebeck@gmail.com>
+
+PKG_CONFIG_DEPENDS:= \
+  CONFIG_IPV6 \
+  \
+  CONFIG_PRIVOXY_disable-pthread \
+  CONFIG_PRIVOXY_disable-dynamic-pcre \
+  CONFIG_PRIVOXY_disable-zlib \
+  \
+  CONFIG_PRIVOXY_disable-toggle \
+  CONFIG_PRIVOXY_disable-force \
+  CONFIG_PRIVOXY_disable-fast-redirects \
+  CONFIG_PRIVOXY_disable-stats \
+  CONFIG_PRIVOXY_enable-ie-images \
+  CONFIG_PRIVOXY_disable-image-blocking \
+  CONFIG_PRIVOXY_disable-acl-support \
+  CONFIG_PRIVOXY_disable-trust-files \
+  CONFIG_PRIVOXY_disable-editor \
+  CONFIG_PRIVOXY_enable-no-gifs \
+  CONFIG_PRIVOXY_enable-graceful-termination \
+  CONFIG_PRIVOXY_enable-extended-host-patterns \
+  CONFIG_PRIVOXY_enable-external-filters \
+  CONFIG_PRIVOXY_enable-accept-filter \
+  CONFIG_PRIVOXY_enable-strptime-sanity-checks \
+  CONFIG_PRIVOXY_enable-compression
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -29,10 +53,11 @@ define Package/$(PKG_NAME)
   SECTION:=net
   CATEGORY:=Network
   SUBMENU:=Web Servers/Proxies
-  DEPENDS:=+libpcre +libpthread +zlib
   TITLE:=Privoxy WEB Proxy
   URL:=http://www.privoxy.org/
   USERID:=privoxy=8118:privoxy=8118
+  MENU:=1
+  DEPENDS:=+!PRIVOXY_no_pcre:libpcre +!PRIVOXY_no_pthread:libpthread +!PRIVOXY_no_zlib:zlib
 endef
 
 # shown in LuCI package description
@@ -42,23 +67,45 @@ endef
 
 # shown in make menuconfig <Help>
 define Package/$(PKG_NAME)/config
-help
-       Privoxy is a web proxy with advanced filtering capabilities for protecting
-       privacy, modifying web page content, managing cookies, controlling access,
-       and removing ads, banners, pop-ups and other obnoxious Internet junk. 
-       Privoxy has a very flexible configuration and can be customized to suit
-       individual needs and tastes. 
-       Privoxy has application for both stand-alone systems and multi-user networks.
-
-       Run as : $(USERID)
-       Version: $(PKG_VERSION)-$(PKG_RELEASE)
-       Home   : $(URL)
-
-       $(PKG_MAINTAINER)
+       help
+               Privoxy is a web proxy with advanced filtering capabilities for protecting
+               privacy, modifying web page content, managing cookies, controlling access,
+               and removing ads, banners, pop-ups and other obnoxious Internet junk. 
+               Privoxy has a very flexible configuration and can be customized to suit
+               individual needs and tastes. 
+               Privoxy has application for both stand-alone systems and multi-user networks.
+               Run as : $(USERID)
+               Version: $(PKG_VERSION)-$(PKG_RELEASE)
+               Home   : $(URL)
+               $(PKG_MAINTAINER)
+
+       source "$(SOURCE)/Config.in"
 endef
 
 CONFIGURE_ARGS += \
-       --sysconfdir=/etc/privoxy
+       --sysconfdir=/etc/privoxy \
+       $(if $(CONFIG_IPV6),,--disable-ipv6-support) \
+       \
+       $(if $(CONFIG_PRIVOXY_disable-pthread),--disable-pthread) \
+       $(if $(CONFIG_PRIVOXY_disable-dynamic-pcre),--disable-dynamic-pcre) \
+       $(if $(CONFIG_PRIVOXY_disable-zlib),--disable-zlib) \
+       \
+       $(if $(CONFIG_PRIVOXY_disable-toggle),--disable-toggle) \
+       $(if $(CONFIG_PRIVOXY_disable-force),--disable-force) \
+       $(if $(CONFIG_PRIVOXY_disable-fast-redirects),--disable-fast-redirects) \
+       $(if $(CONFIG_PRIVOXY_disable-stats),--disable-stats) \
+       $(if $(CONFIG_PRIVOXY_enable-ie-images),--enable-ie-images) \
+       $(if $(CONFIG_PRIVOXY_disable-image-blocking),--disable-image-blocking) \
+       $(if $(CONFIG_PRIVOXY_disable-acl-support),--disable-acl-support) \
+       $(if $(CONFIG_PRIVOXY_disable-trust-files),--disable-trust-files) \
+       $(if $(CONFIG_PRIVOXY_disable-editor),--disable-editor) \
+       $(if $(CONFIG_PRIVOXY_enable-no-gifs),--enable-no-gifs) \
+       $(if $(CONFIG_PRIVOXY_enable-graceful-termination),--enable-graceful-termination) \
+       $(if $(CONFIG_PRIVOXY_enable-extended-host-patterns),--enable-extended-host-patterns) \
+       $(if $(CONFIG_PRIVOXY_enable-external-filters),--enable-external-filters) \
+       $(if $(CONFIG_PRIVOXY_enable-accept-filter),--enable-accept-filter) \
+       $(if $(CONFIG_PRIVOXY_enable-strptime-sanity-checks),--enable-strptime-sanity-checks) \
+       $(if $(CONFIG_PRIVOXY_enable-compression),--enable-compression)
 
 # needed otherwise errors during compile
 MAKE_FLAGS:=
@@ -98,12 +145,20 @@ define Package/$(PKG_NAME)/install
                -exec install -m0664 -t $(1)/etc/privoxy {} \;
 
        $(INSTALL_DIR) \
+               $(1)/lib/upgrade/keep.d \
                $(1)/etc/init.d \
                $(1)/etc/hotplug.d/iface \
                $(1)/etc/config
+       $(INSTALL_DATA) ./files/privoxy.upgrade $(1)/lib/upgrade/keep.d/privoxy
        $(INSTALL_BIN)  ./files/privoxy.init $(1)/etc/init.d/privoxy
        $(INSTALL_BIN)  ./files/privoxy.hotplug $(1)/etc/hotplug.d/iface/80-privoxy
        $(INSTALL_CONF) ./files/privoxy.config $(1)/etc/config/privoxy
 endef
 
+define Package/$(PKG_NAME)/postinst
+       #!/bin/sh
+       grep -i privoxy $${IPKG_INSTROOT}/etc/services >/dev/null 2>&1 || \
+               echo -e "privoxy\t8118" >> $${IPKG_INSTROOT}/etc/services
+endef
+
 $(eval $(call BuildPackage,$(PKG_NAME)))
index bd668017f06d40a401cb6cbbc261133dc0f9a330..2673b20504a26f6048cd1bc7d6f7ea186edc0192 100644 (file)
@@ -2,6 +2,8 @@
 
 # only (re-)start on ifup
 [ "$ACTION" = "ifup" ] || exit 0
+# only start if boot_delay is done
+[ -f /tmp/privoxy.hotplug ] || exit 0
 
 PIDFILE=/var/run/privoxy.pid
 
index 96660dd5d7a2c99e0ea73ddbf8d91311f643c561..124fb858d4ec5c4c62a54dadc6d9fbd89ba95884 100644 (file)
@@ -50,6 +50,17 @@ _uci2conf() {
        echo '### SEE /etc/config/privoxy INSTEAD' >> $CFGTEMP
        echo ''                                    >> $CFGTEMP
 
+       # logdir and logfile
+       # privoxy needs read/write access
+       _LOGDIR=$(uci -q get privoxy.privoxy.logdir)   || _LOGDIR="/var/log"
+       _LOGFILE=$(uci -q get privoxy.privoxy.logfile) || _LOGFILE="privoxy.log"
+       mkdir -m0755 -p $_LOGDIR
+       touch $_LOGDIR/$_LOGFILE
+       chmod 664 $_LOGDIR/$_LOGFILE
+       chown privoxy:privoxy $_LOGDIR/$_LOGFILE
+       echo -e "logdir\t$_LOGDIR" >> $CFGTEMP
+       echo -e "logfile\t$_LOGFILE" >> $CFGTEMP
+
        # confdir
        # privoxy needs read access (possibly write access)
        _CONFDIR=$(uci -q get privoxy.privoxy.confdir) || _CONFDIR="/etc/privoxy"
@@ -72,17 +83,6 @@ _uci2conf() {
                echo -e "templdir\t$_TEMPLDIR" >> $CFGTEMP
        fi
 
-       # logdir and logfile
-       # privoxy needs read/write access
-       _LOGDIR=$(uci -q get privoxy.privoxy.logdir)   || _LOGDIR="/var/log"
-       _LOGFILE=$(uci -q get privoxy.privoxy.logfile) || _LOGFILE="privoxy.log"
-       mkdir -m0755 -p $_LOGDIR
-       touch $_LOGDIR/$_LOGFILE
-       chmod 664 $_LOGDIR/$_LOGFILE
-       chown privoxy:privoxy $_LOGDIR/$_LOGFILE
-       echo -e "logdir\t$_LOGDIR" >> $CFGTEMP
-       echo -e "logfile\t$_LOGFILE" >> $CFGTEMP
-
        # temporary-directory
        # privoxy needs read/write access
        _TMP_DIR=$(uci -q get privoxy.privoxy.temporary_directory)      # no default needed
@@ -100,7 +100,25 @@ _uci2conf() {
 }
 
 boot() {
-       return 0        # will be started by "iface" hotplug events
+       # wait a given time (default 10 seconds) before startup
+       # to wait for interfaces to come up / not using hotplug events during boot
+       _start() {
+               [ $1 -gt 0 ] && {
+                       logger -p daemon.info -t "privoxy[]" "Scheduled startup in $1 seconds"
+                       sleep $1
+               }
+               start
+       }
+
+       local _DELAY
+       _DELAY=$(uci_get "privoxy" "system" "boot_delay" "10")
+       _start $_DELAY &
+       return 0
+}
+
+shutdown() {
+       rm -f /tmp/privoxy.hotplug
+       stop
 }
 
 start() {
@@ -110,6 +128,7 @@ start() {
 
        _uci2conf
        /usr/sbin/privoxy --pidfile $PIDFILE --user privoxy.privoxy $CFGFILE
+       touch /tmp/privoxy.hotplug
 
        # verify startup
        _PID=$(cat $PIDFILE 2>/dev/null)
@@ -117,7 +136,7 @@ start() {
        local _ERR=$?
        [ $_ERR -eq 0 ] \
                && logger -p daemon.notice -t "privoxy[$_PID]" "Started successfully"\
-               || logger -p daemon.warn -t "privoxy[-----]" "Failed to start"
+               || logger -p daemon.warn -t "privoxy[]" "Failed to start"
        return $_ERR
 }
 
@@ -144,7 +163,7 @@ stop() {
                logger -p daemon.notice -t "privoxy[$_PID]" "Shutdown successfully"
        else
                kill -9 $_tmp   # Normally never come here
-               logger -p daemon.warn -t "privoxy[-----]" "Shutdown forced by KILL"
+               logger -p daemon.warn -t "privoxy[$_tmp]" "Shutdown forced by KILL"
        fi
        return 0
 }
diff --git a/net/privoxy/files/privoxy.upgrade b/net/privoxy/files/privoxy.upgrade
new file mode 100644 (file)
index 0000000..ef198a2
--- /dev/null
@@ -0,0 +1,4 @@
+/etc/config/privoxy
+/etc/privoxy/user.action
+/etc/privoxy/user.filter
+/etc/privoxy/user.trust
index 4ff6d38adfd7a07f26882e8e24ad72208c8e3d3c..0942a626f3973b819b87a722aee31cb5aeef10a8 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=prosody
-PKG_VERSION:=0.9.8
+PKG_VERSION:=0.9.10
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://prosody.im/downloads/source
-PKG_MD5SUM:=5144cd832a1860443e21e336dc560ee7
+PKG_MD5SUM:=ef6d4a9e6dcae577eb52f7277d7beac5
 PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>
 PKG_LICENSE:=MIT/X11
 
index bab0ae7d5919c5952f3f2ba3c920614bb3fffbdc..322c3d2b1385a66d153e6c325f88977ec2426e55 100644 (file)
@@ -1,10 +1,9 @@
 #!/bin/sh /etc/rc.common
-# Copyright (C) 2010-2011 OpenWrt.org
+# Copyright (C) 2011-2016 OpenWrt.org
 
 START=99
 
-EXTRA_COMMANDS="status"
-EXTRA_HELP="   status  Print the status of the service"
+USE_PROCD=1
 
 BIN=/usr/bin/prosodyctl
 LOG_D=/var/log/prosody
@@ -13,7 +12,7 @@ PID_F=$RUN_D/prosody.pid
 RUN_USER=prosody
 RUN_GROUP=prosody
 
-start() {
+start_service() {
        [ -d /var/run/prosody ] || {
                mkdir -m 0755 -p /var/run/prosody
                chown prosody:prosody /var/run/prosody
@@ -36,18 +35,12 @@ start() {
                }
        }
 
-       
-       $BIN start
+       procd_open_instance
+       procd_set_param command "$BIN" start
+       procd_set_param file /etc/prosody/prosody.cfg.lua
+       procd_close_instance
 }
 
-stop() {
-       $BIN stop
-}
-
-reload() {
-       [ -f $PID_F ] && kill -HUP $(cat $PID_F)
-}
-
-status() {
-       $BIN status
+stop_service() {
+       ${BIN} stop
 }
diff --git a/net/prosody/patches/010-fix-randomseed.patch b/net/prosody/patches/010-fix-randomseed.patch
deleted file mode 100644 (file)
index 05bdffa..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -u --recursive prosody-0.9.7-vanilla/net/dns.lua prosody-0.9.7/net/dns.lua
---- prosody-0.9.7-vanilla/net/dns.lua  2015-01-02 00:26:19.981433830 -0500
-+++ prosody-0.9.7/net/dns.lua  2015-01-02 00:33:10.467077715 -0500
-@@ -225,7 +225,7 @@
- function dns.random(...)    -- - - - - - - - - - - - - - - - - - -  dns.random
--      math.randomseed(math.floor(10000*socket.gettime()) % 0x100000000);
-+      math.randomseed(math.floor(10000*socket.gettime()) % 0x80000000);
-       dns.random = math.random;
-       return dns.random(...);
- end
index f604a9fdf541c7a4488fe3f276686ee5893143f2..a08c62dada32205fd38597e7332181de6f24ff14 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2008-2015 OpenWrt.org
+# Copyright (C) 2008-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 #
@@ -7,8 +7,8 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=radicale
-PKG_VERSION:=0.10
-PKG_RELEASE:=2
+PKG_VERSION:=1.1.1
+PKG_RELEASE:=1
 PKG_MAINTAINER:=Christian Schoenebeck <christian.schoenebeck@gmail.com>
 
 PKG_LICENSE:=GPL-3.0
@@ -16,7 +16,7 @@ PKG_LICENSE_FILES:=COPYING
 
 PKG_SOURCE:=Radicale-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://pypi.python.org/packages/source/R/Radicale/
-PKG_MD5SUM:=32655d8893962956ead0ad690cca6044
+PKG_MD5SUM:=a29dd538377ea24cec83237a636122ae
 
 # needed for "r"adicale <-> "R"adicale
 PKG_BUILD_DIR:=$(BUILD_DIR)/Radicale-$(PKG_VERSION)
@@ -98,16 +98,21 @@ $(call Package/$(PKG_NAME)-py2/preinst)
 endef
 
 define Package/$(PKG_NAME)-py2/install
-       $(INSTALL_DIR)  $(1)/etc/init.d
-       $(INSTALL_BIN)  ./files/radicale.init $(1)/etc/init.d/radicale
-       $(INSTALL_DIR)  $(1)/etc/hotplug.d/iface
+       $(INSTALL_DIR)  $(1)/etc/init.d
+       $(INSTALL_BIN)  ./files/radicale.init    $(1)/etc/init.d/radicale
+
+       $(INSTALL_DIR)  $(1)/etc/hotplug.d/iface
        $(INSTALL_BIN)  ./files/radicale.hotplug $(1)/etc/hotplug.d/iface/80-radicale
-       $(INSTALL_DIR)  $(1)/etc/config
-       $(INSTALL_CONF) ./files/radicale.config $(1)/etc/config/radicale
 
-       $(INSTALL_DIR)  $(1)/etc/radicale/ssl
-       $(INSTALL_DATA) ./files/config.template  $(1)/etc/radicale/
-       $(INSTALL_DATA) ./files/logging.template $(1)/etc/radicale/
+       $(INSTALL_DIR)  $(1)/etc/config
+       $(INSTALL_CONF) ./files/radicale.config  $(1)/etc/config/radicale
+
+       $(INSTALL_DIR)  $(1)/lib/upgrade/keep.d
+       $(INSTALL_DATA) ./files/radicale.upgrade $(1)/lib/upgrade/keep.d/radicale
+
+       $(INSTALL_DIR)  $(1)/etc/radicale/ssl
+       $(INSTALL_DATA) ./files/config.template  $(1)/etc/radicale/config.template
+       $(INSTALL_DATA) ./files/logging.template $(1)/etc/radicale/logging.template
        $(INSTALL_DATA) ./files/radicale.users   $(1)/etc/radicale/users
        $(INSTALL_DATA) ./files/radicale.rights  $(1)/etc/radicale/rights
 
index 58148f8233f25f235b6d4ca7218bcf7912c862e7..149ce2b6f6306a0f654471f2fbaa4cae92c332ad 100644 (file)
 # Each Radicale's config [section] is setup as UCI config setting 'section'
 #
 
+####################################################
+# OpenWrt specific settings
+# not part of radicale package
+#
+config system 'radicale'
+       # delayed startup at boot (default 10 seconds)
+       # to wait for netifd to bring up interfaces
+       # during this time iface hotplug events are ignored
+#      option  boot_delay      '10'
+
 ####################################################
 # Server options
 #
@@ -65,7 +75,7 @@ config        setting 'encoding'
 ####################################################
 # Authentication options
 #
-config setting 'auth'
+config setting 'auth'
 
        # Authentication method
        # Value: None | htpasswd | IMAP | LDAP | PAM | courier | http | remote_user | custom
index 3b91419864f7a5a02fbcffbb9441bf18b9b0335d..aeb7c41e2fd4d356df264f1971e97af63bab251b 100644 (file)
@@ -2,6 +2,8 @@
 
 # only (re-)start on ifup
 [ "$ACTION" = "ifup" ] || exit 0
+# only start if boot_delay is done
+[ -f /tmp/radicale.hotplug ] || exit 0
 
 _PID=$(ps | grep '[p]ython.*[r]adicale' 2>/dev/null | awk '{print $1}')
 kill -1 $_PID 2>/dev/null
index 991ca5051296c390e14d599d728ee7dd96ba1dbc..4fb9bbb8a9d6d0a1553d45e57c3f301dfa799320 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/sh /etc/rc.common
-# Copyright (C) 2006-2015 OpenWrt.org
+# Copyright (C) 2006-2016 OpenWrt.org
 
 START=80
 STOP=10
@@ -163,7 +163,22 @@ _set_permission() {
 }
 
 boot() {
-       return 0        # will be started by "iface" hotplug events
+       # wait a given time (default 10 seconds) before startup
+       # to wait for interfaces to come up / not using hotplug events during boot
+       _start() {
+               [ $1 -gt 0 ] && sleep $1
+               start
+       }
+
+       local _DELAY
+       _DELAY=$(uci_get "radicale" "system" "boot_delay" "10")
+       _start $_DELAY &
+       return 0
+}
+
+shutdown() {
+       rm -f /tmp/radicale.hotplug
+       stop
 }
 
 start() {
@@ -184,6 +199,7 @@ start() {
        _set_permission
 
        radicale --daemon --config=$SYSCFG
+       touch /tmp/radicale.hotplug
 
        _running &      # check if running and syslog
 
diff --git a/net/radicale/files/radicale.upgrade b/net/radicale/files/radicale.upgrade
new file mode 100644 (file)
index 0000000..760782f
--- /dev/null
@@ -0,0 +1,4 @@
+/etc/config/radicale
+/etc/radicale/users
+/etc/radicale/rights
+
index f155532c04c96db28de234ae366ae5a2928d4d9f..52b52e94f7912d3d3ffec13cb8d4c2497eadf648 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=radsecproxy
-PKG_VERSION:=1.6.6
+PKG_VERSION:=1.6.7
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=http://software.uninett.no/radsecproxy/
-PKG_MD5SUM:=8270b2a9d7cb1dcf30ddd677f3e7ac5f
+PKG_MD5SUM:=d76cf4fc68515667b8c67387f5045150
 
 PKG_INSTALL:=1
 
index d5f97a75f1c02b1b489a166c380c992440685f24..02bf3898565fad3a3f55bc4f9f6ccd89d483561d 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=rsyslog
-PKG_VERSION:=8.15.0
+PKG_VERSION:=8.17.0
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.rsyslog.com/files/download/rsyslog/
-PKG_MD5SUM:=3fab1c48e8d8111d4cc412482e2fe39d
+PKG_MD5SUM:=fadc26576a783afdf11f64beca278bc9
 
 PKG_MAINTAINER:=Dov Murik <dmurik@us.ibm.com>
 PKG_LICENSE:=GPL-3.0
@@ -29,7 +29,7 @@ define Package/rsyslog
   CATEGORY:=Network
   TITLE:=Enhanced system logging and kernel message trapping daemons
   URL:=http://www.rsyslog.com/
-  DEPENDS:=+libestr +libjson-c +libuuid +zlib
+  DEPENDS:=+libestr +libfastjson +libuuid +zlib
 endef
 
 define Package/rsyslog/conffiles
index e4344d6e6d935f9971e8c0edf86cf0ce791a151f..3e8c9be243bf2d6f3b562149f2c9e5152a6c6197 100644 (file)
@@ -1,13 +1,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=shadowsocks-client
-PKG_VERSION:=0.5
+PKG_VERSION:=0.6
 PKG_RELEASE=$(PKG_SOURCE_VERSION)
 
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=http://github.com/zhao-gang/shadowsocks-tiny.git
+PKG_SOURCE_URL:=https://github.com/zhao-gang/shadowsocks-tiny.git
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=d8ef02715f40de0fb7ba0f7267d3f8260f38ba80
+PKG_SOURCE_VERSION:=b59d754f838213d60b908aed0b7d4d5a81f273e2
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
 PKG_MAINTAINER:=Zhao, Gang <gang.zhao.42@gmail.com>
 
diff --git a/net/shadowsocks-client/patches/100-fortify-source-compat.patch b/net/shadowsocks-client/patches/100-fortify-source-compat.patch
deleted file mode 100644 (file)
index e4e1538..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
---- a/client.c
-+++ b/client.c
-@@ -111,7 +111,7 @@ int client_do_local_read(int sockfd, str
-                       goto out;
-       }
--      if (encrypt(sockfd, ln) == -1)
-+      if (crypto_encrypt(sockfd, ln) == -1)
-               goto out;
-       ret = do_send(ln->server_sockfd, ln, "cipher", 0);
-@@ -172,7 +172,7 @@ int client_do_server_read(int sockfd, st
-               }
-       }
--      if (decrypt(sockfd, ln) == -1)
-+      if (crypto_decrypt(sockfd, ln) == -1)
-               goto out;
-       if (ln->state & SS_UDP) {
---- a/crypto.c
-+++ b/crypto.c
-@@ -185,7 +185,7 @@ err:
-       return -1;
- }
--int encrypt(int sockfd, struct link *ln)
-+int crypto_encrypt(int sockfd, struct link *ln)
- {
-       int len, cipher_len;
-       EVP_CIPHER_CTX *ctx_p;
-@@ -223,7 +223,7 @@ err:
-       return -1;
- }
--int decrypt(int sockfd, struct link *ln)
-+int crypto_decrypt(int sockfd, struct link *ln)
- {
-       int len, text_len;
-       EVP_CIPHER_CTX *ctx_p;
---- a/crypto.h
-+++ b/crypto.h
-@@ -15,7 +15,7 @@ extern int iv_len;
- int crypto_init(char *key, char *method);
- void crypto_exit(void);
--int encrypt(int sockfd, struct link *ln);
--int decrypt(int sockfd, struct link *ln);
-+int crypto_encrypt(int sockfd, struct link *ln);
-+int crypto_decrypt(int sockfd, struct link *ln);
- #endif
---- a/server.c
-+++ b/server.c
-@@ -36,7 +36,7 @@ int server_do_remote_read(int sockfd, st
-                       goto out;
-       }
--      if (encrypt(sockfd, ln) == -1)
-+      if (crypto_encrypt(sockfd, ln) == -1)
-               goto out;
-       ret = do_send(ln->local_sockfd, ln, "cipher", 0);
-@@ -91,7 +91,7 @@ int server_do_local_read(int sockfd, str
-               }
-       }
--      if (decrypt(sockfd, ln) == -1)
-+      if (crypto_decrypt(sockfd, ln) == -1)
-               goto out;
-       if (ln->state & SS_UDP) {
index 433557c30f91818e01437f2e3cebeb71c965b3eb..a79e51db04310f639789e25a8d6b3e5e44901da1 100644 (file)
@@ -1,20 +1,6 @@
 menu "Configuration"
        depends on PACKAGE_snort
 
-config SNORT_MYSQL
-       bool "Enable MySQL support"
-       default n
-       help
-           This option enables support for logging to a MySQL database.
-           Disabled by default.
-
-config SNORT_PGSQL
-       bool "Enable PostgreSQL support"
-       default n
-       help
-           This option enables support for logging to a PostgreSQL database.
-           Disabled by default.
-
 config SNORT_LZMA
        bool "Enable LZMA support"
        default n
index 9886a5d92abc8a57230fa6d70bdb09edcc574a38..d37829ee4b18151fafa2c9a0889e5e0a3b932b4e 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=snort
 PKG_VERSION:=2.9.7.2
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_LICENSE:=GPL-2.0
 PKG_MAINTAINER:=Luka Perkov <luka@openwrt.org>
@@ -30,7 +30,7 @@ define Package/snort
   SUBMENU:=Firewall
   SECTION:=net
   CATEGORY:=Network
-  DEPENDS:=+libdaq +libdnet +libopenssl +libpcap +libpcre +libpthread +libuuid +zlib +SNORT_MYSQL:libmysqlclient +SNORT_PGSQL:libpq +SNORT_PGSQL:libuuid +SNORT_LZMA:liblzma
+  DEPENDS:=+libdaq +libdnet +libopenssl +libpcap +libpcre +libpthread +libuuid +zlib +SNORT_LZMA:liblzma
   TITLE:=Lightweight Network Intrusion Detection System
   URL:=http://www.snort.org/
   MENU:=1
@@ -61,24 +61,12 @@ CONFIGURE_ARGS += \
        --with-daq-libraries="$(STAGING_DIR)/usr/lib" \
        --disable-static-daq
 
-ifeq ($(CONFIG_SNORT_MYSQL),)
-CONFIGURE_ARGS += \
-       --without-mysql
-endif
-
-ifeq ($(CONFIG_PGSQL),)
-CONFIGURE_ARGS += \
-       --without-postgresql
-endif
-
 ifeq ($(CONFIG_SNORT_LZMA),)
 CONFIGURE_ARGS += \
        --disable-lzma
 endif
 
 CONFIGURE_VARS += \
-       CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include/mysql" \
-       LDFLAGS="$$$$LDFLAGS -L$(STAGING_DIR)/usr/lib/mysql" \
        PATH="$(STAGING_DIR)/usr/lib/libnet-1.0.x/bin:$$$$PATH"
 
 MAKE_FLAGS += \
index ee11783b6c4bf03b370e8cc28f81f75f22f44fd2..00c6e37390ba2b411e52de90c567b07043b42aee 100644 (file)
@@ -8,8 +8,8 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=sqm-scripts
-PKG_SOURCE_VERSION:=f2be2cc07c9902c3031f799ed4e133964e8c608f
-PKG_VERSION:=1.0.6
+PKG_SOURCE_VERSION:=56677e61a0d410d744e0382c35980dd44aaa072b
+PKG_VERSION:=1.0.7
 PKG_RELEASE:=1
 PKG_LICENSE:=GPLv2
 
index a5e43b3404be50bed4586a368c726b56f47b14dc..dcf138aaee8d5c7183134994bf073e9b17ec231f 100644 (file)
@@ -85,6 +85,7 @@ CONFIGURE_ARGS += \
        --disable-auth-basic \
        --disable-arch-native \
        --with-krb5-config=no \
+       --without-mit-krb5 \
        --without-libcap \
        --without-netfilter-conntrack
 
index 385f40fb6d19791cba49e41cf5858c50523d9dfe..6865499f008cdc3ea35a4763e2621ec6e587ba89 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=strongswan
-PKG_VERSION:=5.3.4
-PKG_RELEASE:=2
+PKG_VERSION:=5.3.5
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://download.strongswan.org/ http://download2.strongswan.org/
-PKG_MD5SUM:=655a632a515c74a99f2e9cc337ab2f33
+PKG_MD5SUM:=a2f9ea185f27e7f8413d4cd2ee61efe4
 PKG_LICENSE:=GPL-2.0+
 PKG_MAINTAINER:=Steven Barth <cyrus@openwrt.org>
 
@@ -28,6 +28,7 @@ PKG_MOD_AVAILABLE:= \
        ccm \
        cmac \
        constraints \
+       connmark \
        coupling \
        ctr \
        curl \
@@ -144,6 +145,7 @@ $(call Package/strongswan/Default)
        +strongswan-mod-ccm \
        +strongswan-mod-cmac \
        +strongswan-mod-constraints \
+       +strongswan-mod-connmark \
        +strongswan-mod-coupling \
        +strongswan-mod-ctr \
        +strongswan-mod-curl \
@@ -221,6 +223,7 @@ $(call Package/strongswan/Default)
        +strongswan-charon \
        +strongswan-mod-aes \
        +strongswan-mod-attr \
+       +strongswan-mod-connmark \
        +strongswan-mod-constraints \
        +strongswan-mod-des \
        +strongswan-mod-dnskey \
@@ -382,6 +385,7 @@ CONFIGURE_ARGS+= \
 EXTRA_LDFLAGS+= -Wl,-rpath-link,$(STAGING_DIR)/usr/lib
 
 define Package/strongswan/conffiles
+/etc/ipsec.d/
 /etc/ipsec.conf
 /etc/ipsec.secrets
 /etc/ipsec.user
@@ -503,6 +507,7 @@ $(eval $(call BuildPlugin,attr-sql,SQL based config,+strongswan-charon))
 $(eval $(call BuildPlugin,blowfish,Blowfish crypto,))
 $(eval $(call BuildPlugin,ccm,CCM AEAD wrapper crypto,))
 $(eval $(call BuildPlugin,cmac,CMAC crypto,))
+$(eval $(call BuildPlugin,connmark,netfilter connection marking,))
 $(eval $(call BuildPlugin,constraints,advanced X509 constraint checking,))
 $(eval $(call BuildPlugin,coupling,IKEv2 plugin to couple peer certificates permanently to authentication,))
 $(eval $(call BuildPlugin,ctr,Counter Mode wrapper crypto,))
diff --git a/net/strongswan/patches/001-fix-EINTR-crash.patch b/net/strongswan/patches/001-fix-EINTR-crash.patch
deleted file mode 100644 (file)
index ff4d949..0000000
+++ /dev/null
@@ -1,216 +0,0 @@
-From ea651877c0bb6e129f52eb592cea3b10b2e3347b Mon Sep 17 00:00:00 2001
-From: Tobias Brunner <tobias@strongswan.org>
-Date: Thu, 19 Nov 2015 11:21:48 +0100
-Subject: [PATCH] sigwaitinfo() may fail with EINTR if an unblocked signal not
- in the set is received
-
- #1213.
----
- src/charon-cmd/charon-cmd.c               |  9 ++++-----
- src/charon-nm/charon-nm.c                 |  9 ++++-----
- src/charon-systemd/charon-systemd.c       |  9 ++++-----
- src/charon-tkm/src/charon-tkm.c           |  9 ++++-----
- src/charon/charon.c                       | 11 +++++------
- src/conftest/conftest.c                   |  2 +-
- src/frontends/osx/charon-xpc/charon-xpc.c |  7 ++++---
- src/libfast/fast_dispatcher.c             |  6 +++++-
- src/libstrongswan/utils/utils.c           |  5 ++++-
- 9 files changed, 35 insertions(+), 32 deletions(-)
-
-diff --git a/src/charon-cmd/charon-cmd.c b/src/charon-cmd/charon-cmd.c
-index b8f943f..d3b31cc 100644
---- a/src/charon-cmd/charon-cmd.c
-+++ b/src/charon-cmd/charon-cmd.c
-@@ -115,6 +115,10 @@ static int run()
-               sig = sigwaitinfo(&set, NULL);
-               if (sig == -1)
-               {
-+                      if (errno == EINTR)
-+                      {       /* ignore signals we didn't wait for */
-+                              continue;
-+                      }
-                       DBG1(DBG_DMN, "waiting for signal failed: %s", strerror(errno));
-                       return 1;
-               }
-@@ -152,11 +156,6 @@ static int run()
-                               charon->bus->alert(charon->bus, ALERT_SHUTDOWN_SIGNAL, sig);
-                               return 1;
-                       }
--                      default:
--                      {
--                              DBG1(DBG_DMN, "unknown signal %d received. Ignored", sig);
--                              break;
--                      }
-               }
-       }
- }
-diff --git a/src/charon-nm/charon-nm.c b/src/charon-nm/charon-nm.c
-index 1773e7c..fb090e5 100644
---- a/src/charon-nm/charon-nm.c
-+++ b/src/charon-nm/charon-nm.c
-@@ -85,6 +85,10 @@ static void run()
-               sig = sigwaitinfo(&set, NULL);
-               if (sig == -1)
-               {
-+                      if (errno == EINTR)
-+                      {       /* ignore signals we didn't wait for */
-+                              continue;
-+                      }
-                       DBG1(DBG_DMN, "waiting for signal failed: %s", strerror(errno));
-                       return;
-               }
-@@ -102,11 +106,6 @@ static void run()
-                               charon->bus->alert(charon->bus, ALERT_SHUTDOWN_SIGNAL, sig);
-                               return;
-                       }
--                      default:
--                      {
--                              DBG1(DBG_DMN, "unknown signal %d received. Ignored", sig);
--                              break;
--                      }
-               }
-       }
- }
-diff --git a/src/charon-systemd/charon-systemd.c b/src/charon-systemd/charon-systemd.c
-index f302d45..4286cde 100644
---- a/src/charon-systemd/charon-systemd.c
-+++ b/src/charon-systemd/charon-systemd.c
-@@ -254,6 +254,10 @@ static int run()
-               sig = sigwaitinfo(&set, NULL);
-               if (sig == -1)
-               {
-+                      if (errno == EINTR)
-+                      {       /* ignore signals we didn't wait for */
-+                              continue;
-+                      }
-                       DBG1(DBG_DMN, "waiting for signal failed: %s", strerror(errno));
-                       return SS_RC_INITIALIZATION_FAILED;
-               }
-@@ -265,11 +269,6 @@ static int run()
-                               charon->bus->alert(charon->bus, ALERT_SHUTDOWN_SIGNAL, sig);
-                               return 0;
-                       }
--                      default:
--                      {
--                              DBG1(DBG_DMN, "unknown signal %d received. Ignored", sig);
--                              break;
--                      }
-               }
-       }
- }
-diff --git a/src/charon-tkm/src/charon-tkm.c b/src/charon-tkm/src/charon-tkm.c
-index 52d82f3..3923c8a 100644
---- a/src/charon-tkm/src/charon-tkm.c
-+++ b/src/charon-tkm/src/charon-tkm.c
-@@ -104,6 +104,10 @@ static void run()
-               sig = sigwaitinfo(&set, NULL);
-               if (sig == -1)
-               {
-+                      if (errno == EINTR)
-+                      {       /* ignore signals we didn't wait for */
-+                              continue;
-+                      }
-                       DBG1(DBG_DMN, "waiting for signal failed: %s", strerror(errno));
-                       return;
-               }
-@@ -121,11 +125,6 @@ static void run()
-                               charon->bus->alert(charon->bus, ALERT_SHUTDOWN_SIGNAL, sig);
-                               return;
-                       }
--                      default:
--                      {
--                              DBG1(DBG_DMN, "unknown signal %d received. Ignored", sig);
--                              break;
--                      }
-               }
-       }
- }
-diff --git a/src/charon/charon.c b/src/charon/charon.c
-index f03b6e1..4c2a9a4 100644
---- a/src/charon/charon.c
-+++ b/src/charon/charon.c
-@@ -98,7 +98,7 @@ static void run()
- {
-       sigset_t set;
-
--      /* handle SIGINT, SIGHUP ans SIGTERM in this handler */
-+      /* handle SIGINT, SIGHUP and SIGTERM in this handler */
-       sigemptyset(&set);
-       sigaddset(&set, SIGINT);
-       sigaddset(&set, SIGHUP);
-@@ -112,6 +112,10 @@ static void run()
-               sig = sigwaitinfo(&set, NULL);
-               if (sig == -1)
-               {
-+                      if (errno == EINTR)
-+                      {       /* ignore signals we didn't wait for */
-+                              continue;
-+                      }
-                       DBG1(DBG_DMN, "waiting for signal failed: %s", strerror(errno));
-                       return;
-               }
-@@ -144,11 +148,6 @@ static void run()
-                               charon->bus->alert(charon->bus, ALERT_SHUTDOWN_SIGNAL, sig);
-                               return;
-                       }
--                      default:
--                      {
--                              DBG1(DBG_DMN, "unknown signal %d received. Ignored", sig);
--                              break;
--                      }
-               }
-       }
- }
-diff --git a/src/conftest/conftest.c b/src/conftest/conftest.c
-index 9348b64..edfe0ca 100644
---- a/src/conftest/conftest.c
-+++ b/src/conftest/conftest.c
-@@ -565,7 +565,7 @@ int main(int argc, char *argv[])
-       sigaddset(&set, SIGTERM);
-       sigprocmask(SIG_BLOCK, &set, NULL);
-
--      while ((sig = sigwaitinfo(&set, NULL)) != -1)
-+      while ((sig = sigwaitinfo(&set, NULL)) != -1 || errno == EINTR)
-       {
-               switch (sig)
-               {
-diff --git a/src/libfast/fast_dispatcher.c b/src/libfast/fast_dispatcher.c
-index b4c6ce3..66a2ee5 100644
---- a/src/libfast/fast_dispatcher.c
-+++ b/src/libfast/fast_dispatcher.c
-@@ -21,6 +21,7 @@
- #include <fcgiapp.h>
- #include <signal.h>
- #include <unistd.h>
-+#include <errno.h>
-
- #include <utils/debug.h>
- #include <threading/thread.h>
-@@ -389,7 +390,10 @@ METHOD(fast_dispatcher_t, waitsignal, void,
-       sigaddset(&set, SIGTERM);
-       sigaddset(&set, SIGHUP);
-       sigprocmask(SIG_BLOCK, &set, NULL);
--      sigwaitinfo(&set, NULL);
-+      while (sigwaitinfo(&set, NULL) == -1 && errno == EINTR)
-+      {
-+              /* wait for signal */
-+      }
- }
-
- METHOD(fast_dispatcher_t, destroy, void,
-diff --git a/src/libstrongswan/utils/utils.c b/src/libstrongswan/utils/utils.c
-index 4e86165..40cb43d 100644
---- a/src/libstrongswan/utils/utils.c
-+++ b/src/libstrongswan/utils/utils.c
-@@ -124,7 +124,10 @@ void wait_sigint()
-       sigaddset(&set, SIGTERM);
-
-       sigprocmask(SIG_BLOCK, &set, NULL);
--      sigwaitinfo(&set, NULL);
-+      while (sigwaitinfo(&set, NULL) == -1 && errno == EINTR)
-+      {
-+              /* wait for signal */
-+      }
- }
-
- #ifndef HAVE_SIGWAITINFO
index d143c1610abea83bea4aaae83cd025fd0cf248a9..e060ec36cfb7def2f7c1d3709fc4c9a3ee1da828 100644 (file)
@@ -8,7 +8,7 @@
  ARG_DISBL_SET([hmac],           [disable HMAC crypto implementation plugin.])
  ARG_ENABL_SET([md4],            [enable MD4 software implementation plugin.])
  ARG_DISBL_SET([md5],            [disable MD5 software implementation plugin.])
-@@ -1310,6 +1311,7 @@ ADD_PLUGIN([gcrypt],               [s ch
+@@ -1312,6 +1313,7 @@ ADD_PLUGIN([gcrypt],               [s ch
  ADD_PLUGIN([af-alg],               [s charon scepclient pki scripts medsrv attest nm cmd aikgen])
  ADD_PLUGIN([fips-prf],             [s charon nm cmd])
  ADD_PLUGIN([gmp],                  [s charon scepclient pki scripts manager medsrv attest nm cmd aikgen])
  ADD_PLUGIN([agent],                [s charon nm cmd])
  ADD_PLUGIN([keychain],             [s charon cmd])
  ADD_PLUGIN([chapoly],              [s charon scripts nm cmd])
-@@ -1441,6 +1443,7 @@ AM_CONDITIONAL(USE_SHA1, test x$sha1 = x
- AM_CONDITIONAL(USE_SHA2, test x$sha2 = xtrue)
+@@ -1444,6 +1446,7 @@ AM_CONDITIONAL(USE_SHA2, test x$sha2 = x
+ AM_CONDITIONAL(USE_SHA3, test x$sha3 = xtrue)
  AM_CONDITIONAL(USE_FIPS_PRF, test x$fips_prf = xtrue)
  AM_CONDITIONAL(USE_GMP, test x$gmp = xtrue)
 +AM_CONDITIONAL(USE_GMPDH, test x$gmpdh = xtrue)
  AM_CONDITIONAL(USE_RDRAND, test x$rdrand = xtrue)
  AM_CONDITIONAL(USE_AESNI, test x$aesni = xtrue)
  AM_CONDITIONAL(USE_RANDOM, test x$random = xtrue)
-@@ -1688,6 +1691,7 @@ AC_CONFIG_FILES([
-       src/libstrongswan/plugins/sha2/Makefile
+@@ -1692,6 +1695,7 @@ AC_CONFIG_FILES([
+       src/libstrongswan/plugins/sha3/Makefile
        src/libstrongswan/plugins/fips_prf/Makefile
        src/libstrongswan/plugins/gmp/Makefile
 +      src/libstrongswan/plugins/gmpdh/Makefile
@@ -34,7 +34,7 @@
        src/libstrongswan/plugins/random/Makefile
 --- a/src/libstrongswan/Makefile.am
 +++ b/src/libstrongswan/Makefile.am
-@@ -295,6 +295,13 @@ if MONOLITHIC
+@@ -303,6 +303,13 @@ if MONOLITHIC
  endif
  endif
  
index 0ec19c3fa3229b7c4e9ce984eea4ab4c1fa656ec..93c1a88dee23972e4d9f2e20676924a5ab56f4bd 100644 (file)
@@ -30,7 +30,7 @@ define Package/tgt
   CATEGORY:=Network
   URL:=http://stgt.sourceforge.net/
   TITLE:=userspace iSCSI target
-  DEPENDS:=+libpthread +libaio +@KERNEL_AIO +@KERNEL_DIRECT_IO
+  DEPENDS:=+libpthread +libaio @KERNEL_AIO @KERNEL_DIRECT_IO
 endef
 
 define Package/tgt/description
index 1cd4b91f63f3f9b751a166ca0cc3cc2a9a400e70..644257d4e61d613594ccdb79e0a6c8804fef0afa 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2009-2014 OpenWrt.org
+# Copyright (C) 2009-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=transmission
-PKG_VERSION:=2.84
-PKG_RELEASE:=4
+PKG_VERSION:=2.92
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=http://download-origin.transmissionbt.com/files/ http://mirrors.m0k.org/transmission/files
-PKG_MD5SUM:=411aec1c418c14f6765710d89743ae42
+PKG_MD5SUM:=3fce404a436e3cd7fde80fb6ed61c264
 
 PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
@@ -89,6 +89,8 @@ CONFIGURE_ARGS += \
 MAKE_FLAGS += \
        CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE"
 
+TARGET_CFLAGS += -std=gnu99
+
 define Package/transmission-daemon/install
        $(INSTALL_DIR) $(1)/usr/bin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/transmission-daemon $(1)/usr/bin/
diff --git a/net/transmission/patches/010_libtransmission_fallocate64_eglibc.patch b/net/transmission/patches/010_libtransmission_fallocate64_eglibc.patch
deleted file mode 100644 (file)
index e46a1ad..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
---- a/libtransmission/fdlimit.c
-+++ b/libtransmission/fdlimit.c
-@@ -22,11 +22,6 @@
-  #include <fcntl.h>
- #endif
-
--#ifdef HAVE_FALLOCATE64
--  /* FIXME can't find the right #include voodoo to pick up the declaration.. */
--  extern int fallocate64 (int fd, int mode, uint64_t offset, uint64_t len);
--#endif
--
- #ifdef HAVE_XFS_XFS_H
-  #include <xfs/xfs.h>
- #endif
index cf78567957542e83a7c6947fff0f5fa7ca3815d8..9a99fe87c8f64c4128d921b7bb2a07afa4055e5c 100644 (file)
@@ -1,6 +1,6 @@
 --- a/configure.ac
 +++ b/configure.ac
-@@ -251,7 +251,7 @@
+@@ -378,7 +378,7 @@ dnl See if ANY version of miniupnpc is i
  AC_LINK_IFELSE(
    [AC_LANG_PROGRAM([#include <miniupnpc/miniupnpc.h>],
                     [struct UPNPDev dev;])],
index badf67317d98ddf9da3efe2f550023abbbedaac1..1747402f54bce01041f89516dcafa6033cdddf61 100644 (file)
@@ -1,17 +1,15 @@
-Index: transmission-2.84/libtransmission/bitfield.c
-===================================================================
---- transmission-2.84.orig/libtransmission/bitfield.c
-+++ transmission-2.84/libtransmission/bitfield.c
+--- a/libtransmission/bitfield.c
++++ b/libtransmission/bitfield.c
 @@ -7,6 +7,8 @@
-  * $Id: bitfield.c 14302 2014-06-29 01:42:38Z jordan $
+  * $Id: bitfield.c 14646 2015-12-31 05:22:42Z mikedld $
   */
  
 +#define __NEED_ssize_t
 +
  #include <assert.h>
- #include <stdlib.h> /* realloc () */
  #include <string.h> /* memset */
-@@ -15,6 +17,7 @@
+@@ -14,6 +16,7 @@
  #include "bitfield.h"
  #include "utils.h" /* tr_new0 () */
  
@@ -19,10 +17,8 @@ Index: transmission-2.84/libtransmission/bitfield.c
  const tr_bitfield TR_BITFIELD_INIT = { NULL, 0, 0, 0, false, false };
  
  /****
-Index: transmission-2.84/libtransmission/fdlimit.h
-===================================================================
---- transmission-2.84.orig/libtransmission/fdlimit.h
-+++ transmission-2.84/libtransmission/fdlimit.h
+--- a/libtransmission/fdlimit.h
++++ b/libtransmission/fdlimit.h
 @@ -11,6 +11,8 @@
   #error only libtransmission should #include this header.
  #endif
@@ -30,5 +26,5 @@ Index: transmission-2.84/libtransmission/fdlimit.h
 +#define __NEED_off_t
 +
  #include "transmission.h"
+ #include "file.h"
  #include "net.h"
index f859d3b031a9377e4ff7db7579a8e8b161f0fa4c..3f77ba33966e9b11ca104319e0cc39a4c0854cd6 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2015 OpenWrt.org
+# Copyright (C) 2015-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=u2pnpd
-PKG_VERSION:=0.1
+PKG_VERSION:=0.3
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://github.com/mhei/u2pnpd/releases/download/v$(PKG_VERSION)
-PKG_MD5SUM:=a98089923d93803fa90d03a504c98b8e
+PKG_MD5SUM:=ac6f378590d3e4e38b40e4b13f03b369
 
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=COPYING
index baf1c574041bb74103bf8c66b0bfc658b6e8c958..8549f6191cf9f7f5c45c2cf4e07335a68846c893 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2010-2015 OpenWrt.org
+# Copyright (C) 2010-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=unbound
-PKG_VERSION:=1.5.7
+PKG_VERSION:=1.5.8
 PKG_RELEASE:=1
 
 PKG_LICENSE:=BSD-3-Clause
@@ -17,7 +17,7 @@ PKG_MAINTAINER:=Michael Hanselmann <public@hansmi.ch>
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.unbound.net/downloads
-PKG_MD5SUM:=a1253cbbb339dbca03404dcc58365d71
+PKG_MD5SUM:=1c34282bae0c625b86374ee9caaef6f7
 
 PKG_BUILD_DEPENDS:=libexpat
 PKG_BUILD_PARALLEL:=1
index 49130574fa43b0a71ab8b9312f699eafcaf19a25..b7a8531546a74ccaa42f264acd6874029f6b901d 100644 (file)
@@ -30,7 +30,7 @@ define prepare_source_directory
 endef
 Hooks/Prepare/Pre += prepare_source_directory
 
-PKG_BUILD_DEPENDS:=udev
+PKG_BUILD_DEPENDS:=eudev
 PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
 
@@ -52,7 +52,7 @@ endef
 define Package/usbip
   $(call Package/usbip/Default)
   TITLE+= (common)
-  DEPENDS+= +libwrap +kmod-usbip +udev
+  DEPENDS+= +libwrap +kmod-usbip +eudev
 endef
 
 define Package/usbip-client
index f843db83427be038ee69107775bb78af69fef836..327a12f6cbd206fdc8e1950a1961e66c788589cd 100644 (file)
@@ -8,8 +8,8 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=wavemon
-PKG_VERSION:=0.7.6
-PKG_RELEASE:=2
+PKG_VERSION:=0.8.0
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_PROTO:=git
@@ -30,7 +30,7 @@ define Package/wavemon
   SECTION:=net
   CATEGORY:=Network
   TITLE:=N-curses based wireless network devices monitor
-  DEPENDS:=+libncurses +libpthread
+  DEPENDS:=+libncurses +libpthread +libnl-genl
   SUBMENU:=wireless
   URL:=https://github.com/uoaerg/wavemon/releases
 endef
@@ -45,7 +45,7 @@ endef
 CONFIGURE_VARS += \
        ac_cv_lib_cap_cap_get_flag=no
 
-TARGET_CFLAGS += -pthread
+TARGET_CFLAGS += -pthread -I$(STAGING_DIR)/usr/include/libnl3
 
 MAKE_FLAGS += \
        CFLAGS="$(TARGET_CFLAGS) -L$(STAGING_DIR)/usr/lib -I$(STAGING_DIR)/usr/include"
diff --git a/net/wavemon/patches/musl-fix.patch b/net/wavemon/patches/musl-fix.patch
new file mode 100644 (file)
index 0000000..a0a7866
--- /dev/null
@@ -0,0 +1,21 @@
+diff --git a/wavemon.h b/wavemon.h
+index e7584f7..8c76d11 100644
+--- a/wavemon.h
++++ b/wavemon.h
+@@ -19,6 +19,7 @@
+  * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+  */
+ #include <stdio.h>
++#include <stdint.h>
+ #include <stdlib.h>
+ #include <unistd.h>
+ #include <signal.h>
+@@ -33,7 +34,7 @@
+ #include <ctype.h>
+ #include <math.h>
+ #include <stdbool.h>
+-#include <ncurses.h>
++#include <curses.h>
+ #include "llist.h"
index 25fcead133a76bc375a9cb2f21920d9ddbeaaab2..00d42ccc96965aca66af7222998bf846cea37208 100644 (file)
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=znc
-PKG_VERSION:=1.6.1
+PKG_VERSION:=1.6.2
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://znc.in/releases \
                http://znc.in/releases/archive
-PKG_MD5SUM:=8e29289e6229b6d2473de202170745ab
+PKG_MD5SUM:=89f6696ed366661f7432ece343fd19d0
 
 PKG_MAINTAINER:=Jonas Gorski <jogo@openwrt.org>
 PKG_LICENSE:=Apache-2.0
@@ -277,8 +277,18 @@ CONFIGURE_VARS += \
        LIBS="-lstdc++ -lm -lssl -lcrypto $(LIBGCC_S) -lc"
 
 CONFIGURE_ARGS += \
-       --disable-c-ares \
-       --disable-perl
+       --disable-charset \
+       --disable-cyrus \
+       --disable-debug \
+       --enable-largefile \
+       --disable-perl \
+       --enable-poll \
+       --disable-python \
+       --enable-ssl \
+       --disable-swig \
+       --disable-tcl \
+       --enable-tdns \
+       --enable-zlib
 
 define Build/Configure
        $(call Build/Configure/Default,)
index 3c7e5a2248a68557d61f4e1aa8d7e05a9528404a..ae444a81bc9053221685364bb7eea009cb26fc9a 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2007-2015 OpenWrt.org
+# Copyright (C) 2007-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mpd
-PKG_VERSION:=0.19.11
+PKG_VERSION:=0.19.14
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=http://www.musicpd.org/download/mpd/0.19/
-PKG_MD5SUM:=78935f6c464b67e19b4dc65bdb80319e
+PKG_MD5SUM:=9f99340ec6b77bea4ba3729e3b76fd7c
 PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
 
 PKG_LICENSE:=GPL-2.0
@@ -137,6 +137,7 @@ CONFIGURE_ARGS += \
        --disable-wildmidi \
        --disable-zzip \
        --with-zeroconf=no \
+       --disable-soxr \
        \
        --enable-curl \
        --enable-flac \
index 8795cc618940efcc5dbfa54060de59ac32005a80..924cc40bd7be8c6054b50a6d8c86b0f2ce8f1f44 100644 (file)
@@ -26,25 +26,3 @@ Volatile in the type is necessary. without that, LTO can break the code.
        constexpr
  #endif
        notify():pending(false) {}
---- a/src/thread/PosixCond.hxx
-+++ b/src/thread/PosixCond.hxx
-@@ -41,7 +41,7 @@ class PosixCond {
-       pthread_cond_t cond;
- public:
--#if defined(__NetBSD__) || defined(__BIONIC__)
-+#if !defined(__GLIBC__)
-       /* NetBSD's PTHREAD_COND_INITIALIZER is not compatible with
-          "constexpr" */
-       PosixCond() {
---- a/src/thread/PosixMutex.hxx
-+++ b/src/thread/PosixMutex.hxx
-@@ -41,7 +41,7 @@ class PosixMutex {
-       pthread_mutex_t mutex;
- public:
--#if defined(__NetBSD__) || defined(__BIONIC__)
-+#if !defined(__GLIBC__)
-       /* NetBSD's PTHREAD_MUTEX_INITIALIZER is not compatible with
-          "constexpr" */
-       PosixMutex() {
index 62836b3a09f31049e328952765dc00761163d967..b84449f071a36027a85731b060da000be55d0265 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2011-2014 OpenWrt.org
+# Copyright (C) 2011-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=pulseaudio
-PKG_VERSION:=7.1
+PKG_VERSION:=8.0
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=http://freedesktop.org/software/pulseaudio/releases/
-PKG_MD5SUM:=9d0a9817b632cac8e3f3834d7eb1c99d
+PKG_MD5SUM:=8678442ba0bb4b4c33ac6f62542962df
 PKG_LICENSE:=LGPL-2.1+
 PKG_LICENSE_FILES:=GPL LICENSE
 
@@ -99,7 +99,8 @@ CONFIGURE_ARGS += \
        --disable-udev \
        --without-fftw \
        --disable-avahi \
-       --disable-dbus
+       --disable-dbus \
+       --without-soxr
 
 CONFIGURE_VARS += \
        PKG_CONFIG_LIBDIR="$(STAGING_DIR)/usr/lib/pkgconfig"
@@ -144,7 +145,7 @@ define Package/pulseaudio-daemon/install
                ./files/pulseaudio.init \
                $(1)/etc/init.d/pulseaudio
 
-       $(INSTALL_CONF) \
+       $(INSTALL_DATA) \
                $(PKG_INSTALL_DIR)/etc/pulse/* \
                $(1)/etc/pulse
 
@@ -164,7 +165,6 @@ define Package/pulseaudio-daemon/install
                $(PKG_INSTALL_DIR)/usr/lib/pulse-$(PKG_VERSION)/modules/module*.so \
                $(1)/usr/lib/pulse-$(PKG_VERSION)/modules/
 
-       chmod -R 0644 $(1)/etc/pulse/*
 endef
 
 define Package/pulseaudio-tools/install
@@ -181,11 +181,11 @@ define Package/pulseaudio-profiles/install
                $(1)/usr/share/pulseaudio/alsa-mixer/paths \
                $(1)/usr/share/pulseaudio/alsa-mixer/profile-sets
 
-       $(INSTALL_CONF) \
+       $(INSTALL_DATA) \
                $(PKG_INSTALL_DIR)/usr/share/pulseaudio/alsa-mixer/paths/* \
                $(1)/usr/share/pulseaudio/alsa-mixer/paths
 
-       $(INSTALL_CONF) \
+       $(INSTALL_DATA) \
                $(PKG_INSTALL_DIR)/usr/share/pulseaudio/alsa-mixer/profile-sets/* \
                $(1)/usr/share/pulseaudio/alsa-mixer/profile-sets
 endef
diff --git a/sound/pulseaudio/patches/002-xlocale.patch b/sound/pulseaudio/patches/002-xlocale.patch
deleted file mode 100644 (file)
index ef3ee91..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/pulsecore/core-util.c b/pulsecore/core-util.c
-index ba31221..824368a 100644
---- a/src/pulsecore/core-util.c
-+++ b/src/pulsecore/core-util.c
-@@ -54,7 +54,6 @@
- #ifdef HAVE_STRTOD_L
- #include <locale.h>
--#include <xlocale.h>
- #endif
- #ifdef HAVE_SCHED_H
index 81ba7b6984a859b19ced34fbfbb979d8d9bfc339..191647c51e17a54aabc82153f880654b9247a3ab 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2014-2015 OpenWrt.org
+# Copyright (C) 2014-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=shairplay
-PKG_VERSION:=2015-09-29
+PKG_VERSION:=2016-01-01
 PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=git://github.com/juhovh/shairplay.git
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=498bc5bcdd305e04721f94a04b9f26a7da72673f
+PKG_SOURCE_VERSION:=ce80e005908f41d0e6fde1c4a21e9cb8ee54007b
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
 PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
 
index 3c5e3a595557fc24173b0e9c3ee465c2dd528c64..af9bd8448c06e5e90b15fdca9d553f87147ea599 100644 (file)
@@ -1,6 +1,6 @@
 --- a/src/shairplay.c
 +++ b/src/shairplay.c
-@@ -346,7 +346,7 @@ main(int argc, char *argv[])
+@@ -350,7 +350,7 @@ main(int argc, char *argv[])
        raop_cbs.audio_destroy = audio_destroy;
        raop_cbs.audio_set_volume = audio_set_volume;
  
index 8f60ec0e540c9c1ddff1d53c84f148d1eeac822b..781b85590420c142b12c7b942d73f8eb7124fdf1 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2015 OpenWrt.org
+# Copyright (C) 2015-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -9,8 +9,8 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=shairport-sync
-PKG_VERSION:=2.6
-PKG_RELEASE:=2
+PKG_VERSION:=2.8.1
+PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=git://github.com/mikebrady/shairport-sync.git
@@ -35,20 +35,21 @@ define Package/shairport-sync/default
   CATEGORY:=Sound
   TITLE:=AirPlay compatible audio player
   DEPENDS:=@AUDIO_SUPPORT +libpthread +alsa-lib +libconfig +libdaemon +libpopt
+  PROVIDES:=shairport-sync
   URL:=http://github.com/mikebrady/shairport-sync
 endef
 
 define Package/shairport-sync-openssl
   $(Package/shairport-sync/default)
   TITLE+= (openssl)
-  DEPENDS+= +PACKAGE_shairport-sync-openssl:libopenssl +libavahi-client +libsoxr
+  DEPENDS+= +libopenssl +libavahi-client +libsoxr
   VARIANT:=openssl
 endef
 
 define Package/shairport-sync-polarssl
   $(Package/shairport-sync/default)
   TITLE+= (polarssl)
-  DEPENDS+= +PACKAGE_shairport-sync-polarssl:libpolarssl +libavahi-client +libsoxr
+  DEPENDS+= +libpolarssl +libavahi-client +libsoxr
   VARIANT:=polarssl
   DEFAULT_VARIANT:=1
 endef
index 8a1274ccfe63da384062447b0370fbc381e4efe8..086bea8682eab2ceee414fad22871022a596210a 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2015 OpenWrt.org
+# Copyright (C) 2015-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=squeezelite
 PKG_VERSION:=1.8
-PKG_RELEASE=1
+PKG_RELEASE=2
 
 PKG_LICENSE:=GPL-3.0
 PKG_LICENSE_FILES:=LICENSE.txt
index 57d1b73dd420e4edab5cc6dcaf721376cb6a583f..6bfcaab3aa77e51e9edc86d6f0ef4e45c0106662 100644 (file)
@@ -9,4 +9,5 @@ config options 'options'
        option decoder_auto_conf '1'
        option dsd_over_pcm '0'
        option ircontrol '0'
+       option interface ''
        option enabled '1'
index 3fa008f63ee589f1212eb43e444ef6c03defdb98..d5746254d035e89d0d5d65d45628eb0736ecb3aa 100644 (file)
@@ -51,8 +51,11 @@ make_cmdline() {
        config_get model_name options model_name "SqueezeLite"
        cmdline="$cmdline -M $model_name"
 
+       config_get interface options interface ""
+       [ -n "$interface" ] && cmdline="$cmdline -I $interface"
+
        config_get device options device ""
-       [ -n $device ] && cmdline="$cmdline -o $device"
+       [ -n "$device" ] && cmdline="$cmdline -o $device"
 
        config_get alsa_buffer options alsa_buffer 200
        [ $alsa_buffer -eq 0 ] && alsa_buffer="200"
@@ -96,10 +99,15 @@ make_cmdline() {
        # ***NOTE: codec lib names are in squeezelite.h (set decode_auto_conf to 0 to ignore)
        #
        local excl_codecs=""
+       local vorbis_lib="libvorbisidec.so.1"
+
        excl_codecs=`checkcodec decode_flac "libFLAC.so.8" flac "$excl_codecs"`
        excl_codecs=`checkcodec decode_mp3 "libmad.so.0" mp3 "$excl_codecs"`
        excl_codecs=`checkcodec decode_aac "libfaad.so.2" aac "$excl_codecs"`
-       excl_codecs=`checkcodec decode_ogg "libvorbisfile.so.3" ogg "$excl_codecs"`
+
+       [ -e "/usr/lib/$vorbis_lib" ] || vorbis_lib="libvorbisfile.so.3"
+
+       excl_codecs=`checkcodec decode_ogg "$vorbis_lib" ogg "$excl_codecs"`
        excl_codecs=`checkcodec decode_wma_alac "libavcodec.so.56" wma,alac "$excl_codecs"`
        cmdline="$cmdline $excl_codecs"
 
diff --git a/sound/squeezelite/patches/010-select_broadcast_interface.patch b/sound/squeezelite/patches/010-select_broadcast_interface.patch
new file mode 100644 (file)
index 0000000..17d083e
--- /dev/null
@@ -0,0 +1,338 @@
+--- a/main.c
++++ b/main.c
+@@ -69,6 +69,7 @@ static void usage(const char *argv0) {
+ #if IR
+                  "  -i [<filename>]\tEnable lirc remote control support (lirc config file ~/.lircrc used if filename not specified)\n"
+ #endif
++                 "  -I <interface>\t\tNetwork interface used to send discovery\n"
+                  "  -m <mac addr>\t\tSet mac address, format: ab:cd:ef:12:34:56\n"
+                  "  -M <modelname>\tSet the squeezelite player model name sent to the server (default: " MODEL_NAME_STRING ")\n"
+                  "  -n <name>\t\tSet the player name\n"
+@@ -197,6 +198,8 @@ int main(int argc, char **argv) {
+       char *modelname = NULL;
+       char *logfile = NULL;
+       u8_t mac[6];
++      char *iface = NULL;
++      in_addr_t bcast_addr = 0;
+       unsigned stream_buf_size = STREAMBUF_SIZE;
+       unsigned output_buf_size = 0; // set later
+       unsigned rates[MAX_SUPPORTED_SAMPLERATES] = { 0 };
+@@ -233,6 +236,7 @@ int main(int argc, char **argv) {
+       log_level log_ir     = lWARN;
+ #endif
++      memset(mac, 0, sizeof(mac));
+       char *optarg = NULL;
+       int optind = 1;
+       int i;
+@@ -240,8 +244,6 @@ int main(int argc, char **argv) {
+ #define MAXCMDLINE 512
+       char cmdline[MAXCMDLINE] = "";
+-      get_mac(mac);
+-
+       for (i = 0; i < argc && (strlen(argv[i]) + strlen(cmdline) + 2 < MAXCMDLINE); i++) {
+               strcat(cmdline, argv[i]);
+               strcat(cmdline, " ");
+@@ -249,7 +251,7 @@ int main(int argc, char **argv) {
+       while (optind < argc && strlen(argv[optind]) >= 2 && argv[optind][0] == '-') {
+               char *opt = argv[optind] + 1;
+-              if (strstr("oabcCdefmMnNpPrs"
++              if (strstr("oabcCdefImMnNpPrs"
+ #if ALSA
+                                  "UV"
+ #endif
+@@ -334,6 +336,9 @@ int main(int argc, char **argv) {
+               case 'f':
+                       logfile = optarg;
+                       break;
++              case 'I':
++                      iface = optarg;
++                      break;
+               case 'm':
+                       {
+                               int byte = 0;
+@@ -556,6 +561,11 @@ int main(int argc, char **argv) {
+       winsock_init();
+ #endif
++      if (!(bcast_addr = get_iface_info(log_slimproto, iface, mac))) {
++              fprintf(stderr, "Error binding to network or none given\n");
++              exit(1);
++      }
++
+       stream_init(log_stream, stream_buf_size);
+       if (!strcmp(output_device, "-")) {
+@@ -599,7 +609,7 @@ int main(int argc, char **argv) {
+               exit(1);
+       }
+-      slimproto(log_slimproto, server, mac, name, namefile, modelname);
++      slimproto(log_slimproto, server, bcast_addr, mac, name, namefile, modelname);
+       decode_close();
+       stream_close();
+--- a/squeezelite.h
++++ b/squeezelite.h
+@@ -374,7 +374,7 @@ typedef enum { EVENT_TIMEOUT = 0, EVENT_
+ char *next_param(char *src, char c);
+ u32_t gettime_ms(void);
+-void get_mac(u8_t *mac);
++in_addr_t get_iface_info(log_level level, char *iface, u8_t *mac);
+ void set_nonblock(sockfd s);
+ int connect_timeout(sockfd sock, const struct sockaddr *addr, socklen_t addrlen, int timeout);
+ void server_addr(char *server, in_addr_t *ip_ptr, unsigned *port_ptr);
+@@ -426,7 +426,7 @@ void buf_init(struct buffer *buf, size_t
+ void buf_destroy(struct buffer *buf);
+ // slimproto.c
+-void slimproto(log_level level, char *server, u8_t mac[6], const char *name, const char *namefile, const char *modelname);
++void slimproto(log_level level, char *server, in_addr_t bcast_addr, u8_t *mac, const char *name, const char *namefile, const char *modelname);
+ void slimproto_stop(void);
+ void wake_controller(void);
+--- a/slimproto.c
++++ b/slimproto.c
+@@ -107,7 +107,7 @@ void send_packet(u8_t *packet, size_t le
+       }
+ }
+-static void sendHELO(bool reconnect, const char *fixed_cap, const char *var_cap, u8_t mac[6]) {
++static void sendHELO(bool reconnect, const char *fixed_cap, const char *var_cap, u8_t *mac) {
+       const char *base_cap = "Model=squeezelite,AccuratePlayPoints=1,HasDigitalOut=1,HasPolarityInversion=1,Firmware=" VERSION;
+       struct HELO_packet pkt;
+@@ -730,7 +730,7 @@ void wake_controller(void) {
+       wake_signal(wake_e);
+ }
+-in_addr_t discover_server(void) {
++in_addr_t discover_server(in_addr_t bcast_addr) {
+       struct sockaddr_in d;
+       struct sockaddr_in s;
+       char *buf;
+@@ -746,7 +746,7 @@ in_addr_t discover_server(void) {
+       memset(&d, 0, sizeof(d));
+       d.sin_family = AF_INET;
+       d.sin_port = htons(PORT);
+-      d.sin_addr.s_addr = htonl(INADDR_BROADCAST);
++      d.sin_addr.s_addr = bcast_addr;
+       pollinfo.fd = disc_sock;
+       pollinfo.events = POLLIN;
+@@ -777,7 +777,7 @@ in_addr_t discover_server(void) {
+ #define FIXED_CAP_LEN 256
+ #define VAR_CAP_LEN   128
+-void slimproto(log_level level, char *server, u8_t mac[6], const char *name, const char *namefile, const char *modelname) {
++void slimproto(log_level level, char *server, in_addr_t bcast_addr, u8_t *mac, const char *name, const char *namefile, const char *modelname) {
+       struct sockaddr_in serv_addr;
+       static char fixed_cap[FIXED_CAP_LEN], var_cap[VAR_CAP_LEN] = "";
+       bool reconnect = false;
+@@ -795,7 +795,7 @@ void slimproto(log_level level, char *se
+       }
+       if (!slimproto_ip) {
+-              slimproto_ip = discover_server();
++              slimproto_ip = discover_server(bcast_addr);
+       }
+       if (!slimproto_port) {
+@@ -870,7 +870,7 @@ void slimproto(log_level level, char *se
+                       // rediscover server if it was not set at startup
+                       if (!server && ++failed_connect > 5) {
+-                              slimproto_ip = serv_addr.sin_addr.s_addr = discover_server();
++                              slimproto_ip = serv_addr.sin_addr.s_addr = discover_server(bcast_addr);
+                       }
+               } else {
+--- a/utils.c
++++ b/utils.c
+@@ -21,11 +21,11 @@
+ #include "squeezelite.h"
+ #if LINUX || OSX || FREEBSD
+-#include <sys/ioctl.h>
++#include <sys/types.h>
+ #include <net/if.h>
+-#include <netdb.h>
+-#if FREEBSD
+ #include <ifaddrs.h>
++#include <netdb.h>
++#if FREEBSD || OSX
+ #include <net/if_dl.h>
+ #include <net/if_types.h>
+ #endif
+@@ -33,15 +33,11 @@
+ #if WIN
+ #include <iphlpapi.h>
+ #endif
+-#if OSX
+-#include <net/if_dl.h>
+-#include <net/if_types.h>
+-#include <ifaddrs.h>
+-#include <netdb.h>
+-#endif
+ #include <fcntl.h>
++static log_level loglevel;
++
+ // logging functions
+ const char *logtime(void) {
+       static char buf[100];
+@@ -99,67 +95,101 @@ u32_t gettime_ms(void) {
+ #endif
+ }
+-// mac address
+-#if LINUX
+-// search first 4 interfaces returned by IFCONF
+-void get_mac(u8_t mac[]) {
+-      struct ifconf ifc;
+-      struct ifreq *ifr, *ifend;
+-      struct ifreq ifreq;
+-      struct ifreq ifs[4];
+-
+-      mac[0] = mac[1] = mac[2] = mac[3] = mac[4] = mac[5] = 0;
+-
+-      int s = socket(AF_INET, SOCK_DGRAM, 0);
+-
+-      ifc.ifc_len = sizeof(ifs);
+-      ifc.ifc_req = ifs;
+-
+-      if (ioctl(s, SIOCGIFCONF, &ifc) == 0) {
+-              ifend = ifs + (ifc.ifc_len / sizeof(struct ifreq));
+-
+-              for (ifr = ifc.ifc_req; ifr < ifend; ifr++) {
+-                      if (ifr->ifr_addr.sa_family == AF_INET) {
+-
+-                              strncpy(ifreq.ifr_name, ifr->ifr_name, sizeof(ifreq.ifr_name));
+-                              if (ioctl (s, SIOCGIFHWADDR, &ifreq) == 0) {
+-                                      memcpy(mac, ifreq.ifr_hwaddr.sa_data, 6);
+-                                      if (mac[0]+mac[1]+mac[2] != 0) {
+-                                              break;
+-                                      }
++// Get broadcast address for interface (given or first available)
++// Return MAC address if none given
++#if LINUX || OSX || FREEBSD
++
++in_addr_t get_iface_info(log_level level, char *iface, u8_t *mac) {
++      struct ifaddrs *addrs, *ifa;
++      struct sockaddr *sdl;
++      char ifname[16];
++      unsigned char *ptr;
++      in_addr_t bcast_addr = 0;
++      int have_mac = 0, have_ifname = 0;
++
++      loglevel = level;
++
++      // Check for non-zero MAC
++      if ((mac[0] | mac[1] | mac[2]) != 0)
++              have_mac = 1;
++
++        // Copy interface name, if it was provided.
++        if (iface != NULL)
++        {
++                if( strlen(iface) > sizeof(ifname) )
++                        return -1;
++
++                strncpy(ifname, iface, sizeof(ifname));
++                have_ifname = 1;
++      }
++
++      if (getifaddrs(&addrs) == 0) {
++              //iterate to find corresponding ethernet address
++              for (ifa = addrs; ifa; ifa = ifa->ifa_next) {
++                      // Skip LOOPBACK interfaces, DOWN interfaces and interfaces that
++                      // don't support BROADCAST.
++                      if ((ifa->ifa_flags & IFF_LOOPBACK)
++                                || !(ifa->ifa_flags & IFF_UP)
++                                || !(ifa->ifa_flags & IFF_BROADCAST))
++                      {
++                              continue;
++                      }
++
++                      if (!have_ifname)
++                      {
++                              // We have found a valid interface name. Keep it.
++                              strncpy(ifname, ifa->ifa_name, sizeof(ifname));
++                              have_ifname = 1;
++                      } else {
++                              if (strncmp(ifname, ifa->ifa_name, sizeof(ifname)) != 0)
++                              {
++                                      // This is not the interface we're looking for.
++                                      continue;
+                               }
+                       }
+-              }
+-      }
+-      close(s);
+-}
+-#endif
+-#if OSX || FREEBSD
+-void get_mac(u8_t mac[]) {
+-      struct ifaddrs *addrs, *ptr;
+-      const struct sockaddr_dl *dlAddr;
+-      const unsigned char *base;
+-      
+-      mac[0] = mac[1] = mac[2] = mac[3] = mac[4] = mac[5] = 0;
+-      
+-      if (getifaddrs(&addrs) == 0) {
+-              ptr = addrs;
+-              while (ptr) {
+-                      if (ptr->ifa_addr->sa_family == AF_LINK && ((const struct sockaddr_dl *) ptr->ifa_addr)->sdl_type == IFT_ETHER) {
+-                              dlAddr = (const struct sockaddr_dl *)ptr->ifa_addr;
+-                              base = (const unsigned char*) &dlAddr->sdl_data[dlAddr->sdl_nlen];
+-                              memcpy(mac, base, min(dlAddr->sdl_alen, 6));
++                      // Check address family.
++                      if ((ifa->ifa_addr->sa_family == AF_INET) &&
++                          (((struct sockaddr_in *)ifa->ifa_broadaddr)->sin_addr.s_addr != 0))
++                      {
++                              // Get broadcast address and MAC address
++                              bcast_addr = ((struct sockaddr_in *)ifa->ifa_broadaddr)->sin_addr.s_addr;
+                               break;
+                       }
+-                      ptr = ptr->ifa_next;
++                      else
++                      {
++                              // Address is not IPv4
++                              if (iface == NULL)
++                                      have_ifname = 0;
++                      }
++
+               }
++
++              // Find MAC address matching interface
++              if (!have_mac && (bcast_addr != 0)) {
++                      for (ifa = addrs; ifa; ifa = ifa->ifa_next) {
++                              if ((ifa->ifa_addr->sa_family == PF_PACKET) &&
++                                  (strncmp(ifname, ifa->ifa_name, sizeof(ifname)) == 0)) {
++                                      sdl = (struct sockaddr *)(ifa->ifa_addr);
++                                      ptr = (unsigned char *)sdl->sa_data;
++                                      memcpy(mac, ptr + 10, 6);
++                                      have_mac = 1;
++                              }
++                      }
++              }
++
+               freeifaddrs(addrs);
+       }
++
++      LOG_INFO("Interface: %s, broadcast: %08X, macaddr = %02x:%02x:%02x:%02x:%02x:%02x",
++               ifname, bcast_addr, mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
++
++      return bcast_addr;
+ }
+ #endif
++
+ #if WIN
+ #pragma comment(lib, "IPHLPAPI.lib")
+ void get_mac(u8_t mac[]) {
diff --git a/sound/squeezelite/patches/010-wait_for_nonzero_mac.patch b/sound/squeezelite/patches/010-wait_for_nonzero_mac.patch
deleted file mode 100644 (file)
index 69d4f34..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
---- a/main.c
-+++ b/main.c
-@@ -187,6 +187,17 @@ static void sighandler(int signum) {
-       signal(signum, SIG_DFL);
- }
-+// Waits for nonzero MAC
-+static void get_nonzero_mac(u8_t mac[], u32_t timeout_ms) {
-+      u32_t wait_timeout = gettime_ms() + timeout_ms;
-+      do{
-+              get_mac(mac);
-+              if ((mac[0]+mac[1]+mac[2]+mac[3]+mac[4]+mac[5]) != 0) {
-+                      break;
-+              }
-+      }while(wait_timeout > gettime_ms());
-+}
-+
- int main(int argc, char **argv) {
-       char *server = NULL;
-       char *output_device = "default";
-@@ -240,7 +251,8 @@ int main(int argc, char **argv) {
- #define MAXCMDLINE 512
-       char cmdline[MAXCMDLINE] = "";
--      get_mac(mac);
-+      // Waits for nonzero MAC
-+      get_nonzero_mac(mac,10000);
-       for (i = 0; i < argc && (strlen(argv[i]) + strlen(cmdline) + 2 < MAXCMDLINE); i++) {
-               strcat(cmdline, argv[i]);
index d5427120b78f453f954c7358e832c9c361e5f190..78a26cb6f02520d3b4ab2d6ac897e83023b9447a 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=acpid
-PKG_VERSION:=2.0.25
+PKG_VERSION:=2.0.27
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@SF/acpid2 
-PKG_MD5SUM:=69bb0cc4a0a89eb2dfecc4851087f568
+PKG_MD5SUM:=e41bdf628e122edb4342fca432ea7db9
 PKG_MAINTAINER:=Thomas Heil<heil@terminal-consulting.de>
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=COPYING
index 44ff097bf9906f8d007c57f3659a9d6f74de4aa3..5e8d2bc2af1a9a28aba02bef6976de4a0b194ee7 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006-2015 OpenWrt.org
+# Copyright (C) 2006-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=alsa-utils
-PKG_VERSION:=1.0.29
+PKG_VERSION:=1.1.0
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=ftp://ftp.alsa-project.org/pub/utils/ \
                http://alsa.cybermirror.org/utils/
-PKG_MD5SUM:=6b289bf874c4c9a63f4b3973093dd404
+PKG_MD5SUM:=b9d6102fbbd0b68040bb77023ed30c0c
 PKG_INSTALL:=1
 PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
 
@@ -23,7 +23,7 @@ include $(INCLUDE_DIR)/package.mk
 define Package/alsa-utils
   SECTION:=utils
   CATEGORY:=Utilities
-  DEPENDS:=+alsa-lib +libncurses +libpthread
+  DEPENDS:=+alsa-lib +libncursesw +libpthread
   TITLE:=ALSA (Advanced Linux Sound Architecture) utilities
   URL:=http://www.alsa-project.org/
 endef
@@ -44,16 +44,12 @@ define Package/alsa-utils-tests
   DEPENDS:=+alsa-lib +libpthread
 endef
 
-define Build/Configure
-       $(call Build/Configure/Default, \
+CONFIGURE_ARGS+= \
                --disable-rpath \
                --disable-alsatest \
+               --disable-bat \
                --disable-xmlto \
-               , \
-               ac_cv_prog_ncurses5_config=no \
-               ac_cv_prog_ncursesw5_config=no \
-       )
-endef
+               --with-curses=ncursesw
 
 define Package/alsa-utils/install
        $(INSTALL_DIR) $(1)/usr/{s,}bin
index ad5fde4daa0de144730893ad13dc57d6aa80cce9..3d6514a5ed790d927ad99425e66cee64668c1ea3 100644 (file)
@@ -54,11 +54,11 @@ With the ability to store in a postgresql database.
 endef
 
 define Package/bandwidthd/daemon
- This package contains bandwidthd a bandwith tracking utility.
+ This package contains bandwidthd a bandwidth tracking utility.
 endef
 
 define Package/bandwidthd-pgsql/daemon
- This package contains bandwidthd a bandwith tracking utility.
+ This package contains bandwidthd a bandwidth tracking utility.
 endef
 
 ifeq ($(BUILD_VARIANT),no-pgsql)
index e7b504832f08d315e4dec569ff329daa099336e5..0430cd6c1ae766f004d91ed06589850a8d1f6f82 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006-2015 OpenWrt.org
+# Copyright (C) 2006-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=bluez
-PKG_VERSION:=5.33
+PKG_VERSION:=5.38
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@KERNEL/linux/bluetooth/
-PKG_MD5SUM:=78782dc33d9a8b6344c4cc1af70c8a98
+PKG_MD5SUM:=dae2ed00c63791800ea7d10a381270a5
 
 PKG_LICENSE:=GPL-2.0+
 PKG_LICENSE_FILES:=COPYING
diff --git a/utils/bluez/patches/001-bcm43xx-Add-bcm43xx-3wire-variant.patch b/utils/bluez/patches/001-bcm43xx-Add-bcm43xx-3wire-variant.patch
new file mode 100644 (file)
index 0000000..96e8a26
--- /dev/null
@@ -0,0 +1,21 @@
+From b4f2b77472aeb967d3a7595e8a965785c7a37c87 Mon Sep 17 00:00:00 2001
+From: Phil Elwell <phil@raspberrypi.org>
+Date: Tue, 16 Feb 2016 16:40:46 +0000
+Subject: [PATCH 1/4] bcm43xx: Add bcm43xx-3wire variant
+
+---
+ tools/hciattach.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/tools/hciattach.c
++++ b/tools/hciattach.c
+@@ -1144,6 +1144,9 @@ struct uart_t uart[] = {
+       { "bcm43xx",    0x0000, 0x0000, HCI_UART_H4,   115200, 3000000,
+                               FLOW_CTL, DISABLE_PM, NULL, bcm43xx, NULL  },
++      { "bcm43xx-3wire",    0x0000, 0x0000, HCI_UART_3WIRE, 115200, 3000000,
++                              0, DISABLE_PM, NULL, bcm43xx, NULL  },
++
+       { "ath3k",    0x0000, 0x0000, HCI_UART_ATH3K, 115200, 115200,
+                       FLOW_CTL, DISABLE_PM, NULL, ath3k_ps, ath3k_pm  },
diff --git a/utils/bluez/patches/002-bcm43xx-The-UART-speed-must-be-reset-after-the-firmw.patch b/utils/bluez/patches/002-bcm43xx-The-UART-speed-must-be-reset-after-the-firmw.patch
new file mode 100644 (file)
index 0000000..a221861
--- /dev/null
@@ -0,0 +1,33 @@
+From e145c9621f976063e5c573db1f2053d906f63427 Mon Sep 17 00:00:00 2001
+From: Phil Elwell <phil@raspberrypi.org>
+Date: Tue, 16 Feb 2016 16:39:09 +0000
+Subject: [PATCH 2/4] bcm43xx: The UART speed must be reset after the firmware
+ download
+
+---
+ tools/hciattach_bcm43xx.c | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+--- a/tools/hciattach_bcm43xx.c
++++ b/tools/hciattach_bcm43xx.c
+@@ -366,11 +366,8 @@ int bcm43xx_init(int fd, int def_speed,
+               return -1;
+       if (bcm43xx_locate_patch(FIRMWARE_DIR, chip_name, fw_path)) {
+-              fprintf(stderr, "Patch not found, continue anyway\n");
++              fprintf(stderr, "Patch not found for %s, continue anyway\n", chip_name);
+       } else {
+-              if (bcm43xx_set_speed(fd, ti, speed))
+-                      return -1;
+-
+               if (bcm43xx_load_firmware(fd, fw_path))
+                       return -1;
+@@ -380,6 +377,7 @@ int bcm43xx_init(int fd, int def_speed,
+                       return -1;
+               }
++              sleep(1);
+               if (bcm43xx_reset(fd))
+                       return -1;
+       }
diff --git a/utils/bluez/patches/003-Increase-firmware-load-timeout-to-30s.patch b/utils/bluez/patches/003-Increase-firmware-load-timeout-to-30s.patch
new file mode 100644 (file)
index 0000000..fa0948d
--- /dev/null
@@ -0,0 +1,20 @@
+From d41dc2046dd08d8c95197f677e224506f5b39bdd Mon Sep 17 00:00:00 2001
+From: Phil Elwell <phil@raspberrypi.org>
+Date: Wed, 20 Jan 2016 16:00:37 +0000
+Subject: [PATCH 3/4] Increase firmware load timeout to 30s
+
+---
+ tools/hciattach.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/tools/hciattach.c
++++ b/tools/hciattach.c
+@@ -1293,7 +1293,7 @@ int main(int argc, char *argv[])
+ {
+       struct uart_t *u = NULL;
+       int detach, printpid, raw, opt, i, n, ld, err;
+-      int to = 10;
++      int to = 30;
+       int init_speed = 0;
+       int send_break = 0;
+       pid_t pid;
diff --git a/utils/bluez/patches/004-Move-the-43xx-firmware-into-lib-firmware.patch b/utils/bluez/patches/004-Move-the-43xx-firmware-into-lib-firmware.patch
new file mode 100644 (file)
index 0000000..80b052d
--- /dev/null
@@ -0,0 +1,20 @@
+From 76681284b0ea49852041fdb97a35175089a08781 Mon Sep 17 00:00:00 2001
+From: Phil Elwell <phil@raspberrypi.org>
+Date: Tue, 23 Feb 2016 17:52:29 +0000
+Subject: [PATCH 4/4] Move the 43xx firmware into /lib/firmware
+
+---
+ tools/hciattach_bcm43xx.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/tools/hciattach_bcm43xx.c
++++ b/tools/hciattach_bcm43xx.c
+@@ -43,7 +43,7 @@
+ #include "hciattach.h"
+ #ifndef FIRMWARE_DIR
+-#define FIRMWARE_DIR "/etc/firmware"
++#define FIRMWARE_DIR "/lib/firmware/brcm"
+ #endif
+ #define FW_EXT ".hcd"
index 3d6ffaec331aa130a228981a276c5358d8a2d1bb..45e155325c76f4d49047514a51c19f44fe0bbf83 100644 (file)
@@ -1,6 +1,6 @@
 --- a/Makefile.in
 +++ b/Makefile.in
-@@ -2405,7 +2405,7 @@ unit_tests = $(am__append_32) unit/test-
+@@ -2441,7 +2441,7 @@ unit_tests = $(am__append_35) unit/test-
  @CLIENT_TRUE@                                 monitor/uuid.h monitor/uuid.c
  
  @CLIENT_TRUE@client_bluetoothctl_LDADD = gdbus/libgdbus-internal.la @GLIB_LIBS@ @DBUS_LIBS@ \
@@ -9,7 +9,7 @@
  
  @MONITOR_TRUE@monitor_btmon_SOURCES = monitor/main.c monitor/bt.h \
  @MONITOR_TRUE@                                monitor/display.h monitor/display.c \
-@@ -2651,13 +2651,13 @@ unit_tests = $(am__append_32) unit/test-
+@@ -2691,13 +2691,13 @@ unit_tests = $(am__append_35) unit/test-
  @READLINE_TRUE@                               client/display.h
  
  @READLINE_TRUE@attrib_gatttool_LDADD = lib/libbluetooth-internal.la \
@@ -25,7 +25,7 @@
  
  @READLINE_TRUE@tools_obex_server_tool_SOURCES = $(gobex_sources) $(btio_sources) \
  @READLINE_TRUE@                                               tools/obex-server-tool.c
-@@ -2667,17 +2667,17 @@ unit_tests = $(am__append_32) unit/test-
+@@ -2707,17 +2707,17 @@ unit_tests = $(am__append_35) unit/test-
  @READLINE_TRUE@                               client/display.h client/display.c
  
  @READLINE_TRUE@tools_bluetooth_player_LDADD = gdbus/libgdbus-internal.la \
diff --git a/utils/bonnie++/Makefile b/utils/bonnie++/Makefile
new file mode 100644 (file)
index 0000000..0008cc2
--- /dev/null
@@ -0,0 +1,53 @@
+#
+# Copyright (C) 2009-2016 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=bonnie++
+PKG_VERSION:=1.97
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
+PKG_SOURCE_URL:=http://www.coker.com.au/bonnie++/experimental/
+PKG_MD5SUM:=d6cf9703242998b2ddc2d875b028b3c6
+PKG_LICENSE:=GPL-2.0
+PKG_LICENSE_FILES:=copyright.txt
+PKG_MAINTAINER:=Florian Fainelli <florian@openwrt.org>
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION).1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/bonniexx
+  SECTION:=utils
+  CATEGORY:=Utilities
+  DEPENDS:=+libstdcpp +libpthread
+  TITLE:=Bonnie++ - hard drive bottleneck testing program.
+  URL:=http://www.coker.com.au/bonnie++/
+endef
+
+define Package/bonniexx/description
+  Bonnie++ is a benchmark suite that is aimed at performing a number of simple
+  tests of hard drive and file system performance.
+endef
+
+define Build/Compile
+       $(MAKE) -C $(PKG_BUILD_DIR) \
+               TARGET_CXX="$(TARGET_CXX)" \
+               TARGET_LINK="$(TARGET_CXX)" \
+               MORECFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CXXFLAGS)" \
+               DESTDIR="$(PKG_INSTALL_DIR)" \
+               all
+endef
+
+define Package/bonniexx/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(CP) $(PKG_BUILD_DIR)/bonnie++ $(1)/usr/bin/
+       $(CP) $(PKG_BUILD_DIR)/bon_csv2html $(1)/usr/bin/
+endef
+
+$(eval $(call BuildPackage,bonniexx))
diff --git a/utils/bonnie++/patches/001-cross_compile_fix.patch b/utils/bonnie++/patches/001-cross_compile_fix.patch
new file mode 100644 (file)
index 0000000..0379fec
--- /dev/null
@@ -0,0 +1,38 @@
+Index: bonnie++-1.97.1/configure
+===================================================================
+--- bonnie++-1.97.1.orig/configure
++++ bonnie++-1.97.1/configure
+@@ -3955,9 +3955,7 @@ rm -f core conftest.err conftest.$ac_obj
+ if test "$cross_compiling" = yes; then :
+   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+-as_fn_error $? "cannot run test program while cross compiling
+-See \`config.log' for more details" "$LINENO" 5 ; }
++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} }
+ else
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+Index: bonnie++-1.97.1/Makefile
+===================================================================
+--- bonnie++-1.97.1.orig/Makefile
++++ bonnie++-1.97.1/Makefile
+@@ -1,5 +1,7 @@
+ EXES=bonnie++ zcav getc_putc getc_putc_helper
+ EXE=bon_csv2html generate_randfile
++TARGET_CXX=g++
++TARGET_LINK=g++
+ all: $(EXE) $(EXES)
+@@ -10,8 +12,8 @@ eprefix=${prefix}
+ #MORE_WARNINGS=-Weffc++
+ WFLAGS=-Wall -W -Wshadow -Wpointer-arith -Wwrite-strings -pedantic -ffor-scope -Wcast-align -Wsign-compare -Wpointer-arith -Wwrite-strings -Wformat-security -Wswitch-enum -Winit-self $(MORE_WARNINGS)
+ CFLAGS=-O2  -DNDEBUG $(WFLAGS) $(MORECFLAGS)
+-CXX=g++ $(CFLAGS)
+-LINK=g++
++CXX=$(TARGET_CXX) $(CFLAGS)
++LINK=$(TARGET_LINK)
+ THREAD_LFLAGS=-lpthread
+ INSTALL=/usr/bin/install -c
diff --git a/utils/bonnie++/patches/002-add-verbose-error-messages.patch b/utils/bonnie++/patches/002-add-verbose-error-messages.patch
new file mode 100644 (file)
index 0000000..ccec8e8
--- /dev/null
@@ -0,0 +1,47 @@
+--- a/bon_file.cpp
++++ b/bon_file.cpp
+@@ -464,25 +464,37 @@ int COpenTest::delete_sequential(BonTime
+     }
+     if(m_number_directories != 1)
+     {
+-      if(chdir("..") || rmdir(buf))
++      if(chdir(".."))
+       {
++        io_error("chdir");
++        return -1;
++      }
++      if(rmdir(buf))
++      {
++        fprintf(stderr, "Unable to delete directory '%s'\n", buf);
+         io_error("rmdir");
+         return -1;
+       }
+     }
+   }
+-  if(chdir("..") || rmdir(m_dirname))
++  if(count != m_number)
+   {
+-    io_error("rmdir");
++    fprintf(stderr, "Expected %d files but only got %d\n", m_number, count);
+     return -1;
+   }
+-  delete m_dirname;
+-  m_dirname = NULL;
+-  if(count != m_number)
++  if(chdir(".."))
+   {
+-    fprintf(stderr, "Expected %d files but only got %d\n", m_number, count);
++    io_error("chdir");
++    return -1;
++  }
++  if(rmdir(m_dirname))
++  {
++    fprintf(stderr, "Unable to delete directory '%s'\n", m_dirname);
++    io_error("rmdir");
+     return -1;
+   }
++  delete m_dirname;
++  m_dirname = NULL;
+   sync();
+   timer.stop_and_record(DelSeq);
+   timer.add_latency(DelSeq, dur.getMax());
index 67d670372cdb5d5cb4b5191e43f1a958533d5f79..9b6368f755789aac904539a67a72eee007827592 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ccid
-PKG_VERSION:=1.4.20
+PKG_VERSION:=1.4.22
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=https://alioth.debian.org/frs/download.php/file/4140
-PKG_MD5SUM:=a73c203cfe27e684850df73630065738
+PKG_SOURCE_URL:=https://alioth.debian.org/frs/download.php/file/4162
+PKG_MD5SUM:=150e1edc449ad394572dd72490b7b6f4
 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
 PKG_LICENSE:=LGPL-2.1+
 PKG_LICENSE_FILES:=COPYING
index 5b9f52d1c25f6b90ef5b7544677474609aa6aff5..c092fc90bd4933d2273bb7641d6451bca127d5a9 100644 (file)
@@ -34,7 +34,7 @@ CONFIGURE_ARGS += \
 
 define Package/cmdpad/description
        cmdpad - execute commands when a key is pressed, released or hold down.
-       Should be started from /etc/rc or /etc/rc.local. To run it as deamon you
+       Should be started from /etc/rc or /etc/rc.local. To run it as daemon you
        need to start it with '&'. All logs are printed to standard out and standard
        error (to write the log to disk use cmdpad > /var/log/cmdpad). Cmdpad
        searches for /etc/cmdpad.conf and load the key bindings. Then wait for
index 803a61d49ffc5aca65e41970408323e02abae262..adc11796d2dd7ad1949b395b55689c866ab8e251 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006-2015 OpenWrt.org
+# Copyright (C) 2006-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=collectd
-PKG_VERSION:=5.5.0
-PKG_RELEASE:=5
+PKG_VERSION:=5.5.1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://collectd.org/files/
-PKG_MD5SUM:=c39305ef5514b44238b0d31f77e29e6a
+PKG_MD5SUM:=fd24b947cef9351ce3e2d6d2a0762e18
 
 PKG_FIXUP:=autoreconf
 PKG_REMOVE_FILES:=aclocal.m4 libltdl/aclocal.m4
@@ -176,6 +176,14 @@ define Package/collectd/description
  and provides mechanismns to store the values in a variety of ways.
 endef
 
+define Package/collectd/config
+       config PACKAGE_COLLECTD_ENCRYPTED_NETWORK
+       bool "Enable ability to use encrypted networking"
+       default n
+       depends on PACKAGE_collectd
+       select PACKAGE_collectd-mod-network
+endef
+
 ifneq ($(CONFIG_avr32),)
   TARGET_CFLAGS += -fsigned-char
 endif
@@ -185,8 +193,15 @@ CONFIGURE_ARGS+= \
        --disable-debug \
        --enable-daemon \
        --with-nan-emulation \
-       --with-perl-bindings= \
+       --without-perl-bindings
+
+ifneq ($(CONFIG_PACKAGE_COLLECTD_ENCRYPTED_NETWORK),)
+CONFIGURE_ARGS+= \
+       --with-libgcrypt=$(STAGING_DIR)/include
+else
+CONFIGURE_ARGS+= \
        --without-libgcrypt
+endif
 
 CONFIGURE_VARS+= \
        CFLAGS="$$$$CFLAGS $(FPIC)" \
@@ -317,7 +332,7 @@ $(eval $(call BuildPlugin,madwifi,MadWifi status input,madwifi,))
 $(eval $(call BuildPlugin,memory,physical memory usage input,memory,))
 $(eval $(call BuildPlugin,modbus,read variables through libmodbus,modbus,+PACKAGE_collectd-mod-modbus:libmodbus))
 $(eval $(call BuildPlugin,netlink,netlink input,netlink,+PACKAGE_collectd-mod-netlink:libmnl))
-$(eval $(call BuildPlugin,network,network input/output,network))
+$(eval $(call BuildPlugin,network,network input/output,network,+PACKAGE_COLLECTD_ENCRYPTED_NETWORK:libgcrypt))
 $(eval $(call BuildPlugin,nginx,nginx status input,nginx,+PACKAGE_collectd-mod-nginx:libcurl))
 $(eval $(call BuildPlugin,ntpd,NTP daemon status input,ntpd,))
 $(eval $(call BuildPlugin,nut,UPS monitoring input,nut,+PACKAGE_collectd-mod-nut:nut))
index 8204c38acba5ce7f7f2198fad3bbab0516ba3ef3..727e020aacf5e46d0efda459edf1a6c071e5e08e 100644 (file)
@@ -1,15 +1,13 @@
 #!/bin/sh /etc/rc.common
-# Copyright (C) 2006-2011 OpenWrt.org
+# Copyright (C) 2006-2016 OpenWrt.org
 
 START=80
 
-SERVICE_USE_PID=1
+USE_PROCD=1
 
-start() {
-       mkdir -m 0755 -p /var/lib/collectd
-       service_start /usr/sbin/collectd
+start_service() {
+       procd_open_instance
+       procd_set_param command /usr/sbin/collectd -f
+       procd_close_instance
 }
 
-stop() {
-       service_stop /usr/sbin/collectd
-}
index e9059d532470cdb216e74e377a81449ecbda7c73..704962f75b79fd639681309cc95c01d8324daf9f 100644 (file)
@@ -17,7 +17,7 @@
        /* consolidation_functions = */ NULL,
        /* consolidation_functions_num = */ 0,
  
-@@ -1093,6 +1096,14 @@ static int rrd_config (const char *key,
+@@ -1110,6 +1113,14 @@ static int rrd_config (const char *key,
  
                free (value_copy);
        }
@@ -34,7 +34,7 @@
                double tmp = atof (value);
 --- a/src/utils_rrdcreate.c
 +++ b/src/utils_rrdcreate.c
-@@ -217,6 +217,9 @@ static int rra_get (char ***ret, const v
+@@ -213,6 +213,9 @@ static int rra_get (char ***ret, const v
      rts_num = rra_timespans_num;
    }
  
@@ -42,8 +42,8 @@
 +    rra_types_num = 1;
 +
    rra_max = rts_num * rra_types_num;
+   assert (rra_max > 0);
  
-   if ((rra_def = (char **) malloc ((rra_max + 1) * sizeof (char *))) == NULL)
 --- a/src/utils_rrdcreate.h
 +++ b/src/utils_rrdcreate.h
 @@ -41,6 +41,8 @@ struct rrdcreate_config_s
index 660b87d2c4f1dd956ac53ed5fc2e46681500dd70..22990bd5be2bacd88482bbfb4057229f196b5c92 100644 (file)
@@ -1,6 +1,6 @@
 --- a/src/daemon/configfile.c
 +++ b/src/daemon/configfile.c
-@@ -109,7 +109,7 @@ static cf_global_option_t cf_global_opti
+@@ -111,7 +111,7 @@ static cf_global_option_t cf_global_opti
        {"BaseDir",     NULL, PKGLOCALSTATEDIR},
        {"PIDFile",     NULL, PIDFILE},
        {"Hostname",    NULL, NULL},
index 5aa48dcda7e0634126c5d40dde67b7220ad30305..d9f1311a5d7480501ca85805c04b6b51639243ba 100644 (file)
@@ -2,7 +2,7 @@
 +++ b/version-gen.sh
 @@ -2,7 +2,7 @@
  
- DEFAULT_VERSION="5.5.0.git"
+ DEFAULT_VERSION="5.5.1.git"
  
 -VERSION="`git describe 2> /dev/null | grep collectd | sed -e 's/^collectd-//'`"
 +#VERSION="`git describe 2> /dev/null | grep collectd | sed -e 's/^collectd-//'`"
index 9a60cc4640ac04688b881805f6465327a4ac2d0a..495c80f3ae42a0be67b618bf663314ffc536c25e 100644 (file)
@@ -9,4 +9,3 @@
        rf->rf_effective_interval = rf->rf_interval;
  
        pthread_mutex_lock (&read_lock);
-
diff --git a/utils/collectd/patches/500-upstream-parallel-build-fix.patch b/utils/collectd/patches/500-upstream-parallel-build-fix.patch
deleted file mode 100644 (file)
index a10fbbb..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-Backport of 780e6a76021a240e95007a04b723d827120afa95
-Subject: [PATCH] build: add libavltree, libcommon & libheap dependencies
-
-Otherwise it can break on very parallel builds since collectd link time
-arrives before one or more of these were built.
-
---- a/src/daemon/Makefile.am
-+++ b/src/daemon/Makefile.am
-@@ -49,7 +49,7 @@ collectd_CPPFLAGS =  $(AM_CPPFLAGS) $(LT
- collectd_CFLAGS = $(AM_CFLAGS)
- collectd_LDFLAGS = -export-dynamic
- collectd_LDADD = libavltree.la libcommon.la libheap.la -lm
--collectd_DEPENDENCIES =
-+collectd_DEPENDENCIES = libavltree.la libcommon.la libheap.la
- # Link to these libraries..
- if BUILD_WITH_LIBRT
diff --git a/utils/collectd/patches/600-fix-libmodbus-detection.patch b/utils/collectd/patches/600-fix-libmodbus-detection.patch
new file mode 100644 (file)
index 0000000..027ba5b
--- /dev/null
@@ -0,0 +1,40 @@
+Patch reverts upstream commit:
+https://github.com/collectd/collectd/commit/6124da7a48f28f54fc09ebeb942d1037516fe6ab
+
+The commit changed the detection path due to FreeBSD issues,
+but apparently affects also Openwrt buildroot negatively.
+
+Original explanation:
+  From 6124da7a48f28f54fc09ebeb942d1037516fe6ab Mon Sep 17 00:00:00 2001
+  Subject: [PATCH] Fix libmodbus detection on FreeBSD
+
+  We look for modbus/modbus.h in /usr/local/include/modbus
+  but we should look for modbus.h
+
+  This is only an issue on FreeBSD since /usr/local/include is not
+  in the default search path.
+
+Reversed patch to be applied:
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -2585,7 +2585,7 @@ then
+       SAVE_CPPFLAGS="$CPPFLAGS"
+       CPPFLAGS="$CPPFLAGS $with_libmodbus_cflags"
+-      AC_CHECK_HEADERS(modbus.h, [], [with_libmodbus="no (modbus.h not found)"])
++      AC_CHECK_HEADERS(modbus/modbus.h, [], [with_libmodbus="no (modbus/modbus.h not found)"])
+       CPPFLAGS="$SAVE_CPPFLAGS"
+ fi
+--- a/src/modbus.c
++++ b/src/modbus.c
+@@ -27,7 +27,7 @@
+ #include <netdb.h>
+-#include <modbus.h>
++#include <modbus/modbus.h>
+ #ifndef LIBMODBUS_VERSION_CHECK
+ /* Assume version 2.0.3 */
index 6b36b9a23252b81dde2d9286a073261b1a877ef5..92c0877ed083b3c399abc196243df80ee2531662 100644 (file)
@@ -1,6 +1,6 @@
 --- a/configure.ac
 +++ b/configure.ac
-@@ -589,6 +589,9 @@ AC_CHECK_HEADERS(net/pfvar.h,
+@@ -663,6 +663,9 @@ AC_CHECK_HEADERS(net/pfvar.h,
  have_termios_h="no"
  AC_CHECK_HEADERS(termios.h, [have_termios_h="yes"])
  
@@ -10,7 +10,7 @@
  # For the turbostat plugin
  have_asm_msrindex_h="no"
  AC_CHECK_HEADERS(asm/msr-index.h, [have_asm_msrindex_h="yes"])
-@@ -5171,6 +5174,7 @@ plugin_interface="no"
+@@ -5241,6 +5244,7 @@ plugin_interface="no"
  plugin_ipmi="no"
  plugin_ipvs="no"
  plugin_irq="no"
@@ -18,7 +18,7 @@
  plugin_load="no"
  plugin_log_logstash="no"
  plugin_memory="no"
-@@ -5562,6 +5566,7 @@ AC_PLUGIN([ipmi],        [$plugin_ipmi],
+@@ -5638,6 +5642,7 @@ AC_PLUGIN([ipmi],        [$plugin_ipmi],
  AC_PLUGIN([iptables],    [$with_libiptc],      [IPTables rule counters])
  AC_PLUGIN([ipvs],        [$plugin_ipvs],       [IPVS connection statistics])
  AC_PLUGIN([irq],         [$plugin_irq],        [IRQ statistics])
@@ -26,7 +26,7 @@
  AC_PLUGIN([java],        [$with_java],         [Embed the Java Virtual Machine])
  AC_PLUGIN([load],        [$plugin_load],       [System load])
  AC_PLUGIN([logfile],     [yes],                [File logging plugin])
-@@ -5891,6 +5896,7 @@ Configuration:
+@@ -5967,6 +5972,7 @@ Configuration:
      oracle  . . . . . . . $with_oracle
      protobuf-c  . . . . . $have_protoc_c
      python  . . . . . . . $with_python
@@ -34,7 +34,7 @@
  
    Features:
      daemon mode . . . . . $enable_daemon
-@@ -5940,6 +5946,7 @@ Configuration:
+@@ -6016,6 +6022,7 @@ Configuration:
      iptables  . . . . . . $enable_iptables
      ipvs  . . . . . . . . $enable_ipvs
      irq . . . . . . . . . $enable_irq
@@ -45,7 +45,7 @@
 --- a/src/collectd.conf.in
 +++ b/src/collectd.conf.in
 @@ -128,6 +128,7 @@
- #@BUILD_PLUGIN_IPMI_TRUE@LoadPlugin ipmi
+ #@BUILD_PLUGIN_IPTABLES_TRUE@LoadPlugin iptables
  #@BUILD_PLUGIN_IPVS_TRUE@LoadPlugin ipvs
  #@BUILD_PLUGIN_IRQ_TRUE@LoadPlugin irq
 +#@BUILD_PLUGIN_IWINFO_TRUE@LoadPlugin iwinfo
@@ -67,7 +67,7 @@
  #     JVMArg "-Djava.class.path=@prefix@/share/collectd/java/collectd-api.jar"
 --- a/src/collectd.conf.pod
 +++ b/src/collectd.conf.pod
-@@ -2572,6 +2572,27 @@ and all other interrupts are collected.
+@@ -2608,6 +2608,27 @@ and all other interrupts are collected.
  
  =back
  
 +}
 --- a/src/Makefile.am
 +++ b/src/Makefile.am
-@@ -459,6 +459,13 @@ irq_la_SOURCES = irq.c \
+@@ -454,6 +454,13 @@ irq_la_SOURCES = irq.c
  irq_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  endif
  
 +if BUILD_PLUGIN_IWINFO
 +pkglib_LTLIBRARIES += iwinfo.la
-+iwinfo_la_SOURCES = iwinfo.c utils_ignorelist.c utils_ignorelist.h
++iwinfo_la_SOURCES = iwinfo.c
 +iwinfo_la_LDFLAGS = -module -avoid-version
 +iwinfo_la_LIBADD = -liwinfo
 +endif
  java_la_SOURCES = java.c
 --- a/src/types.db
 +++ b/src/types.db
-@@ -227,6 +227,7 @@ voltage                    value:GAUGE:U:U
+@@ -228,6 +228,7 @@ voltage                    value:GAUGE:U:U
  vs_memory             value:GAUGE:0:9223372036854775807
  vs_processes          value:GAUGE:0:65535
  vs_threads            value:GAUGE:0:65535
index 6cbdcda9ed442c1647b985aaba5482d18e4eaf33..96a5c22bd38e042e1d8ef0a342fac688e7d220ac 100644 (file)
@@ -1,6 +1,6 @@
 --- a/src/ping.c
 +++ b/src/ping.c
-@@ -656,7 +656,7 @@ static int ping_read (void) /* {{{ */
+@@ -658,7 +658,7 @@ static int ping_read (void) /* {{{ */
            / ((double) (pkg_recv * (pkg_recv - 1))));
  
      /* Calculate drop rate. */
index 04fa0ae26abf98af22ee82959d2c3493e2b2f574..6445f8d8cc1ddfbc7344e2adddfcecb0e3b1a7ea 100644 (file)
@@ -36,7 +36,7 @@ define Package/crelay/description
  crelay is used to control different relay cards in a unified manner. It provides
  several interfaces for controlling the relays locally or remotely by a web browser
  or a smartphone.  The card which is detected first will be used. A WebUI control is
- availble on port 8000 (default)
+ available on port 8000 (default)
  .
  Currently supported relay cards:
       - Conrad USB 4-channel relay card
index 507cf4f5f9ef74fd22cda552997e9ebf059dc317..4f187c84c648a38f7ef46f8e02f2186759529d17 100644 (file)
@@ -10,12 +10,12 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=cryptodev-linux
-PKG_VERSION:=1.7
+PKG_VERSION:=1.8
 PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://download.gna.org/cryptodev-linux/
-PKG_MD5SUM:=0b63b3481cf2c90386b35f057481d36b
+PKG_MD5SUM:=02644cc4cd02301e0b503a332eb2f0b5
 
 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
 
@@ -31,7 +31,7 @@ define KernelPackage/cryptodev
   URL:=http://cryptodev-linux.org/
   MAINTAINER:=Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
   VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE)
-  DEPENDS:=+kmod-crypto-core +kmod-crypto-authenc +kmod-crypto-hash
+  DEPENDS:=+kmod-crypto-authenc +kmod-crypto-hash
   FILES:= \
                $(PKG_BUILD_DIR)/cryptodev.$(LINUX_KMOD_SUFFIX)
   AUTOLOAD:=$(call AutoLoad,50,$(CRYPTODEV_AUTOLOAD))
diff --git a/utils/cryptodev-linux/patches/001-no-get-unused-fd.patch b/utils/cryptodev-linux/patches/001-no-get-unused-fd.patch
deleted file mode 100644 (file)
index e3308bb..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: cryptodev-linux-1.7/ioctl.c
-===================================================================
---- cryptodev-linux-1.7.orig/ioctl.c
-+++ cryptodev-linux-1.7/ioctl.c
-@@ -546,7 +546,7 @@ static int
- clonefd(struct file *filp)
- {
-       int ret;
--      ret = get_unused_fd();
-+      ret = get_unused_fd_flags(0);
-       if (ret >= 0) {
-                       get_file(filp);
-                       fd_install(ret, filp);
index 459d53da87ffbbae8682a193dd4aabac7e26b246..10db45164ffd7c9a327995f92981c31805869d26 100644 (file)
@@ -8,14 +8,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=cryptsetup
-PKG_VERSION:=1.7.0
-PKG_RELEASE:=1
+PKG_VERSION:=1.7.1
+PKG_RELEASE:=2
 PKG_LICENSE:=GPL-2.0+ LGPL-2.1+
 PKG_LICENSE_FILES:=COPYING COPYING.LGPL
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@KERNEL/linux/utils/cryptsetup/v1.7
-PKG_MD5SUM:=56c385fe87fc2b6873df4b7f89202d0f
+PKG_MD5SUM:=e38da1c80088cbaaccf931ef61e726dc
 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
index 2cc6033d06542761987d7dcfc385872cd5c0fca8..16ed227e2e87087c8d9c320923f9c36954ce10d3 100644 (file)
@@ -122,11 +122,11 @@ HOST_CONFIGURE_ARGS+= \
        --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" \
+       --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"
+       --libexecdir="$(STAGING_DIR)/host/lib/dbus-1"
 
 HOST_CONFIGURE_VARS+= \
        ac_cv_have_abstract_sockets="yes" \
index adf8d19ea1cf8ceaf6d645f1e7b9c44ef137fc64..4f174ae3d475923ff50836d63c4650b34e850453 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2013-2015 OpenWrt.org
+# Copyright (C) 2013-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=dump1090
-PKG_VERSION:=2015-11-22
+PKG_VERSION:=2016-02-25
 PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=git://github.com/mutability/dump1090.git
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=497f88fe1c597652aca23c1035ddb55a9f6c274d
+PKG_SOURCE_VERSION:=214bc0e587fa70b7206c094e10e62c88bf387322
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
 PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
 
@@ -53,7 +53,8 @@ define Package/view1090/description
 endef
 
 MAKE_FLAGS += \
-       CFLAGS="$(TARGET_CFLAGS)"
+       CFLAGS="$(TARGET_CFLAGS)" \
+       UNAME=Linux
 
 define Package/dump1090/install
        $(INSTALL_DIR) $(1)/etc/init.d
index b9c433eea0995a9532789fc26d04e87a7e64e8e2..5854cb456973337d0e3556ee5f25b54c2382ba80 100644 (file)
@@ -11,7 +11,6 @@ config dump1090 main
        option raw '0'
        option net '1'
        option modeac '0'
-       option net_beast '0'
        option net_only '0'
        option net_bind_address ''
        option net_http_port '8080'
@@ -20,7 +19,6 @@ config dump1090 main
        option net_sbs_port ''
        option net_bi_port ''
        option net_bo_port ''
-       option net_fatsv_port ''
        option net_ro_size ''
        option net_ro_interval ''
        option net_heartbeat ''
@@ -34,13 +32,13 @@ config dump1090 main
        option no_fix '0'
        option no_crc_check '0'
        option phase_enhance '0'
-       option aggressive '0'
        option mlat '0'
        option stats '0'
        option stats_range '0'
        option stats_every ''
        option onlyaddr '0'
        option metric '0'
+       option hae '0'
        option snip ''
        option debug ''
        option ppm ''
index 23519dbc2f8f46bb32dd0f0689824fc6e1b306ea..fead29edb1573ad3571cbdb7700cb21db86cbaa0 100644 (file)
@@ -49,7 +49,6 @@ start_instance() {
        append_bool "$cfg" raw "--raw"
        append_bool "$cfg" net "--net"
        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"
@@ -58,7 +57,6 @@ start_instance() {
        append_arg "$cfg" net_sbs_port "--net-sbs-port"
        append_arg "$cfg" net_bi_port "--net-bi-port"
        append_arg "$cfg" net_bo_port "--net-bo-port"
-       append_arg "$cfg" net_fatsv_port "net-fatsv-port"
        append_arg "$cfg" net_ro_size "--net-ro-size"
        append_arg "$cfg" net_ro_interval "--net-ro-interval"
        append_arg "$cfg" net_heartbeat "--net-heartbeat"
@@ -72,13 +70,13 @@ start_instance() {
        append_bool "$cfg" no_fix "--no-fix"
        append_bool "$cfg" no_crc_check "--no-crc-check"
        append_bool "$cfg" phase_enhance "--phase-enhance"
-       append_bool "$cfg" aggressive "--aggressive"
        append_bool "$cfg" mlat "--mlat"
        append_bool "$cfg" stats "--stats"
        append_bool "$cfg" stats_range "--stats-range"
        append_arg "$cfg" stats_every "--stats-every"
        append_bool "$cfg" onlyaddr "--onlyaddr"
        append_bool "$cfg" metric "--metric"
+       append_bool "$cfg" hae "--hae"
        append_arg "$cfg" snip "--snip"
        append_arg "$cfg" debug "--debug"
        append_arg "$cfg" ppm "--ppm"
diff --git a/utils/dvtm/Makefile b/utils/dvtm/Makefile
new file mode 100644 (file)
index 0000000..8d2ae39
--- /dev/null
@@ -0,0 +1,41 @@
+#
+# Copyright (C) 2016 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=dvtm
+PKG_VERSION:=0.15
+PKG_RELEASE:=1
+
+PKG_SOURCE:=dvtm-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://www.brain-dump.org/projects/dvtm/
+PKG_MD5SUM:=887e162a3abe2ad8e86caefab20cdd63
+PKG_MAINTAINER:=Yunfan Jiang <jyf1987@gmail.com>
+
+PKG_LICENSE:=MIT/X
+PKG_LICENSE_FILES:=LICENSE
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/dvtm
+  SECTION:=utils
+  CATEGORY:=Utilities
+  DEPENDS:=+libncursesw
+  TITLE:=dynamic virtual terminal manager
+  URL:=http://www.brain-dump.org/projects/dvtm/
+endef
+
+define Package/dvtm/description
+    dvtm brings the concept of tiling window management, popularized by X11-window managers like dwm to the console. As a console window manager it tries to make it easy to work with multiple console based programs.
+endef
+
+define Package/dvtm/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/dvtm $(1)/usr/bin/
+endef
+
+$(eval $(call BuildPackage,dvtm))
diff --git a/utils/eudev/Config.in b/utils/eudev/Config.in
new file mode 100644 (file)
index 0000000..6cd3970
--- /dev/null
@@ -0,0 +1,68 @@
+# udev package config
+
+menu "Configuration"
+       depends on PACKAGE_eudev
+
+config EUDEV_EXTRA_ata_id
+       bool "Install eudev ata_id callout"
+       default y
+       help
+         ata_id - udev callout to read product/serial number
+         from ATA drives
+
+config EUDEV_EXTRA_blkid
+       bool "Use blkid to identify block devices"
+       default y
+       help
+         blkid - make use of libblkid to identify block devices
+
+config EUDEV_EXTRA_cdrom_id
+       bool "Install eudev cdrom_id callout"
+       default y
+       help
+         cdrom_id - udev callout to determine the capabilities
+         of optical drives and media
+
+config EUDEV_EXTRA_collect
+       bool "Install eudev collect"
+       default n
+       help
+         Adds ID to the list governed by <checkpoint>
+
+config EUDEV_EXTRA_input_id
+       bool "Install input_id callout"
+       default y
+       help
+        input_id - udev callout to classify input devices
+
+config EUDEV_EXTRA_kmod
+       bool "Use kmod for loading kernel modules"
+       default n
+       help
+         kmod - make use of kmod to load kernel modules on demand
+
+config EUDEV_EXTRA_mtd_probe
+       bool "Install mtd_probe callout"
+       default y
+       help
+         mtd_probe - udev callout to probe mtd devices
+
+config EUDEV_EXTRA_rule_generator
+       bool "Install (legacy) eudev rule_generator"
+       default n
+       help
+
+config EUDEV_EXTRA_scsi_id
+       bool "Install eudev scsi_id callout"
+       default y
+       help
+         scsi_id - retrieve and generate a unique SCSI identifier
+
+config EUDEV_EXTRA_v4l_id
+       bool "Install eudev v4l_id callout"
+       default y
+       help
+         v4l_id - udev callout to identify Video4Linux devices
+
+
+endmenu
diff --git a/utils/eudev/Makefile b/utils/eudev/Makefile
new file mode 100644 (file)
index 0000000..53256b0
--- /dev/null
@@ -0,0 +1,140 @@
+#
+# Copyright (C) 2006-2008 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:=eudev
+PKG_VERSION:=3.1.5
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://dev.gentoo.org/~blueness/eudev/
+PKG_MD5SUM:=c4dace42deecede102b6c01904042acc
+PKG_LICENSE:=GPL-2.0
+
+include $(INCLUDE_DIR)/package.mk
+
+PKG_BUILD_DEPENDS:=gperf/host
+PKG_FIXUP:=autoreconf
+PKG_INSTALL=1
+
+define Package/eudev
+  SECTION:=base
+  CATEGORY:=Base system
+  TITLE:=Dynamic device management subsystem
+  URL:=https://wiki.gentoo.org/wiki/Project:Eudev
+  MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
+  MENU:=1
+  DEPENDS:=+librt +EUDEV_EXTRA_blkid:libblkid +EUDEV_EXTRA_kmod:libkmod
+  PROVIDES:=udev
+  CONFLICTS:=udev
+endef
+
+define Package/eudev/description
+udev allows Linux users to have a dynamic /dev directory and it
+provides the ability to have persistent device names.
+eudev is a fork of systemd-udev with the goal of obtaining better
+compatibility with existing software such as OpenRC and Upstart, older
+kernels, various toolchains and anything else required by users and
+various distributions.
+endef
+
+define Package/eudev/conffiles
+/etc/udev/udev.conf
+endef
+
+define Package/eudev/config
+       source "$(SOURCE)/Config.in"
+endef
+
+CONFIGURE_ARGS += \
+       --prefix=/usr --exec-prefix= --sysconfdir=/etc \
+       --libexecdir=/lib/udev --sbindir=/sbin \
+       --disable-hwdb --disable-introspection --disable-manpages \
+       --disable-selinux \
+       $(if $(CONFIG_EUDEV_EXTRA_blkid),--enable-blkid,--disable-blkid) \
+       $(if $(CONFIG_EUDEV_EXTRA_kmod),--enable-kmod,--disable-kmod)
+
+
+eudev-extra-lib-bin-$(CONFIG_EUDEV_EXTRA_ata_id) += ata_id
+
+eudev-extra-rules-$(CONFIG_EUDEV_EXTRA_blkid) += 60-persistent-storage.rules
+
+eudev-extra-lib-bin-$(CONFIG_EUDEV_EXTRA_cdrom_id) += cdrom_id
+eudev-extra-rules-$(CONFIG_EUDEV_EXTRA_cdrom_id) += 60-cdrom_id.rules
+
+eudev-extra-lib-bin-$(CONFIG_EUDEV_EXTRA_collect) += collect
+
+eudev-extra-rules-$(CONFIG_EUDEV_EXTRA_input_id) += 60-persistent-input.rules
+
+eudev-extra-lib-bin-$(CONFIG_EUDEV_EXTRA_mtd_probe) += mtd_probe
+eudev-extra-rules-$(CONFIG_EUDEV_EXTRA_mtd_probe) += 75-probe_mtd.rules
+
+eudev-extra-lib-bin-$(CONFIG_EUDEV_EXTRA_scsi_id) += scsi_id
+
+eudev-extra-lib-bin-$(CONFIG_EUDEV_EXTRA_v4l_id) += v4l_id
+eudev-extra-rules-$(CONFIG_EUDEV_EXTRA_v4l_id) += 60-persistent-v4l.rules
+
+define Build/InstallDev
+       $(INSTALL_DIR) $(1)/usr/include
+       $(CP) $(PKG_INSTALL_DIR)/usr/include/libudev.h $(1)/usr/include
+       $(INSTALL_DIR) $(1)/usr/share/pkgconfig
+       $(CP) $(PKG_INSTALL_DIR)/usr/share/pkgconfig/udev.pc $(1)/usr/share/pkgconfig
+       $(INSTALL_DIR) $(1)/lib
+       $(CP) $(PKG_INSTALL_DIR)/lib/libudev.so* $(1)/lib
+       $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+       $(CP) $(PKG_INSTALL_DIR)/lib/pkgconfig/libudev.pc $(1)/usr/lib/pkgconfig
+endef
+
+define Package/eudev/install
+       $(INSTALL_DIR) $(1)/etc/udev/rules.d
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/udev/udev.conf $(1)/etc/udev
+
+       $(INSTALL_DIR) $(1)/sbin
+       $(INSTALL_BIN) \
+               $(PKG_INSTALL_DIR)/usr/bin/udevadm \
+               $(PKG_INSTALL_DIR)/sbin/udevd \
+               $(1)/sbin
+
+       $(INSTALL_DIR) $(1)/lib/udev/rules.d
+       $(INSTALL_DATA) \
+               $(addprefix $(PKG_INSTALL_DIR)/lib/udev/rules.d/, \
+                       $(eudev-extra-rules-y)) \
+               $(addprefix $(PKG_INSTALL_DIR)/lib/udev/rules.d/, \
+                       50-udev-default.rules \
+                       60-block.rules \
+                       60-drm.rules \
+                       60-evdev.rules \
+                       60-persistent-alsa.rules \
+                       60-persistent-storage-tape.rules \
+                       60-serial.rules \
+                       64-btrfs.rules \
+                       70-mouse.rules \
+                       75-net-description.rules \
+                       78-sound-card.rules \
+                       80-net-name-slot.rules) \
+               $(1)/lib/udev/rules.d
+
+       $(INSTALL_DIR) $(1)/lib
+       $(CP) $(PKG_INSTALL_DIR)/lib/libudev.so* $(1)/lib
+
+       $(INSTALL_DIR) $(1)/lib/udev
+ifneq ($(eudev-extra-lib-bin-y),)
+               $(INSTALL_BIN) \
+                       $(addprefix $(PKG_INSTALL_DIR)/lib/udev/, \
+                               $(eudev-extra-lib-bin-y)) \
+                       $(1)/lib/udev/
+endif
+ifneq ($(eudev-extra-lib-data-y),)
+               $(INSTALL_DATA) \
+                       $(addprefix $(PKG_INSTALL_DIR)/lib/udev/, \
+                               $(eudev-extra-lib-data-y)) \
+                       $(1)/lib/udev/
+endif
+endef
+
+$(eval $(call BuildPackage,eudev))
diff --git a/utils/eudev/patches/0001-mtd_probe-uses-stdint_h.patch b/utils/eudev/patches/0001-mtd_probe-uses-stdint_h.patch
new file mode 100644 (file)
index 0000000..2ae5634
--- /dev/null
@@ -0,0 +1,12 @@
+Index: eudev-3.1.5/src/mtd_probe/mtd_probe.h
+===================================================================
+--- eudev-3.1.5.orig/src/mtd_probe/mtd_probe.h
++++ eudev-3.1.5/src/mtd_probe/mtd_probe.h
+@@ -18,6 +18,7 @@
+  */
+ #include <mtd/mtd-user.h>
++#include <stdint.h>
+ #include "macro.h"
index e6e38b43192e98344b53a5e704a627926f9d7579..bc062d3f5fc2bceb4f8d75abd6347b684f6a0c40 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2010-2015 OpenWrt.org
+# Copyright (C) 2010-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=flashrom
-PKG_VERSION:=0.9.8
-PKG_RELEASE:=5
+PKG_VERSION:=0.9.9
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://download.flashrom.org/releases
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_MD5SUM:=ac513076b63ab7eb411a7694bb8f6fda
+PKG_MD5SUM:=aab9c98925d9cfb5ffb28b67a6112530
 PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_SOURCE_SUBDIR)
@@ -44,10 +44,11 @@ define Package/flashrom
   $(Package/flashrom/default)
   TITLE+= (full)
   DEPENDS+= \
-    +(PACKAGE_flashrom&&(TARGET_x86||TARGET_x86_64)):dmidecode \
-    +PACKAGE_flashrom:libftdi \
-    +PACKAGE_flashrom:libusb-compat \
-    +PACKAGE_flashrom:pciutils
+    +(TARGET_x86||TARGET_x86_64):dmidecode \
+    +libftdi1 \
+    +libusb-1.0 \
+    +libusb-compat \
+    +pciutils
   VARIANT:=full
   DEFAULT_VARIANT:=1
 endef
@@ -56,8 +57,8 @@ define Package/flashrom-pci
   $(Package/flashrom/default)
   TITLE+= (pci)
   DEPENDS+= \
-    +(PACKAGE_flashrom-pci&&(TARGET_x86||TARGET_x86_64)):dmidecode \
-    +PACKAGE_flashrom-pci:pciutils
+    +(TARGET_x86||TARGET_x86_64):dmidecode \
+    +pciutils
   VARIANT:=pci
 endef
 
@@ -71,8 +72,9 @@ define Package/flashrom-usb
   $(Package/flashrom/default)
   TITLE+= (usb)
   DEPENDS+= \
-    +PACKAGE_flashrom-usb:libftdi \
-    +PACKAGE_flashrom-usb:libusb-compat
+    +libftdi1 \
+    +libusb-1.0 \
+    +libusb-compat
   VARIANT:=usb
 endef
 
index 0ca82b6d05d603ef4eafdd654dc004f037763849..f910758a4d66f68189b77cd194a55002b1099220 100644 (file)
@@ -19,6 +19,7 @@ ifeq ($(BUILD_VARIANT),full)
   FLASHROM_BASIC := yes
   FLASHROM_FTDI := yes
   FLASHROM_PCI := yes
+  FLASHROM_RAW := yes
   FLASHROM_SERIAL := yes
   FLASHROM_USB := yes
 endif
@@ -27,6 +28,7 @@ ifeq ($(BUILD_VARIANT),pci)
   FLASHROM_BASIC := yes
   FLASHROM_FTDI := no
   FLASHROM_PCI := yes
+  FLASHROM_RAW := yes
   FLASHROM_SERIAL := no
   FLASHROM_USB := no
 endif
@@ -35,6 +37,7 @@ ifeq ($(BUILD_VARIANT),spi)
   FLASHROM_BASIC := yes
   FLASHROM_FTDI := no
   FLASHROM_PCI := no
+  FLASHROM_RAW := no
   FLASHROM_SERIAL := no
   FLASHROM_USB := no
 endif
@@ -43,6 +46,7 @@ ifeq ($(BUILD_VARIANT),usb)
   FLASHROM_BASIC := yes
   FLASHROM_FTDI := yes
   FLASHROM_PCI := no
+  FLASHROM_RAW := no
   FLASHROM_SERIAL := yes
   FLASHROM_USB := yes
 endif
@@ -57,10 +61,13 @@ $(eval $(call DefineConfig,FTDI,$(FLASHROM_FTDI)))
 $(eval $(call DefineProgrammer,FT2232_SPI,$(FLASHROM_FTDI)))
 $(eval $(call DefineProgrammer,USBBLASTER_SPI,$(FLASHROM_FTDI)))
 
+# RAW
+$(eval $(call DefineConfig,RAW_ACCESS,$(FLASHROM_RAW)))
+$(eval $(call DefineProgrammer,RAYER_SPI,$(FLASHROM_RAW)))
+
 # PCI
 $(eval $(call DefineConfig,PCI,$(FLASHROM_PCI)))
 $(eval $(call DefineProgrammer,INTERNAL,$(FLASHROM_PCI)))
-$(eval $(call DefineProgrammer,RAYER_SPI,$(FLASHROM_PCI)))
 $(eval $(call DefineProgrammer,NIC3COM,$(FLASHROM_PCI)))
 $(eval $(call DefineProgrammer,GFXNVIDIA,$(FLASHROM_PCI)))
 $(eval $(call DefineProgrammer,SATASII,$(FLASHROM_PCI)))
@@ -82,7 +89,11 @@ $(eval $(call DefineProgrammer,SERPROG,$(FLASHROM_SERIAL)))
 $(eval $(call DefineProgrammer,PONY_SPI,$(FLASHROM_SERIAL)))
 $(eval $(call DefineProgrammer,BUSPIRATE_SPI,$(FLASHROM_SERIAL)))
 
-# USB
-$(eval $(call DefineConfig,USB,$(FLASHROM_USB)))
+# USB0
+$(eval $(call DefineConfig,USB0,$(FLASHROM_USB)))
 $(eval $(call DefineProgrammer,PICKIT2_SPI,$(FLASHROM_USB)))
-#$(eval $(call DefineProgrammer,DEDIPROG,$(FLASHROM_USB)))
+
+# USB1
+$(eval $(call DefineConfig,USB1,$(FLASHROM_USB)))
+$(eval $(call DefineProgrammer,CH341A_SPI,$(FLASHROM_USB)))
+$(eval $(call DefineProgrammer,DEDIPROG,$(FLASHROM_USB)))
diff --git a/utils/flashrom/patches/0002-fix-io-h-include.patch b/utils/flashrom/patches/0002-fix-io-h-include.patch
new file mode 100644 (file)
index 0000000..50aa2a8
--- /dev/null
@@ -0,0 +1,12 @@
+diff -uprN a/linux_spi.c b/linux_spi.c
+--- a/flash.h     2015-02-08 16:57:52.000000000 -0500
++++ b/flash.h     2016-01-08 20:09:51.599387507 -0500
+@@ -30,6 +30,7 @@
+ #include <stdio.h>
+ #include <stdint.h>
+ #include <stddef.h>
++#include <sys/io.h>
+ #include <stdbool.h>
+ #if IS_WINDOWS
+ #include <windows.h>
+
diff --git a/utils/flashrom/patches/0002-fix-musl-compatibility.patch b/utils/flashrom/patches/0002-fix-musl-compatibility.patch
deleted file mode 100644 (file)
index b52f8b2..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -uprN a/linux_spi.c b/linux_spi.c
---- a/linux_spi.c      2015-06-17 20:50:36.492963100 +0200
-+++ b/linux_spi.c      2015-06-17 20:50:00.444860800 +0200
-@@ -22,7 +22,7 @@
- #include <stdio.h>
- #include <string.h>
- #include <stdlib.h>
--#include <sys/fcntl.h>
-+#include <fcntl.h>
- #include <errno.h>
- #include <ctype.h>
- #include <unistd.h>
index 7e878e0c07e3fc151ec12aaddceb2fae7ae8e335..d173f157c51aaf42f2debe977750c07a75056d73 100644 (file)
@@ -9,12 +9,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gammu
-PKG_VERSION:=1.36.8
+PKG_VERSION:=1.37.0
 PKG_RELEASE:=1
 
 PKG_SOURCE_URL:=http://dl.cihar.com/gammu/releases/
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_MD5SUM:=462d45f9fb359bd7931c288785028e2d
+PKG_MD5SUM:=6e249e6f93461f1fc215ec85cec67740
 PKG_MAINTAINER:=Vitaly Protsko <villy@sft.ru>
 PKG_LICENCE:=GPL-2.0
 
index 6a391d4ac8e0fe784d70188ae1727c6793c1aa8d..37232457770b5e79f90aee8694a8dddcd2e6a0ac 100755 (executable)
@@ -15,7 +15,7 @@ start_instance() {
        config_get_bool item "$conf" enabled 0
        [ $item = 0 ] && return
 
-       echo -e "; dont edit. instead look into /etc/config/gammu\n[gammu]\n" > $conffile
+       echo -e "; don't edit. instead look into /etc/config/gammu\n[gammu]\n" > $conffile
 
        config_get item "$conf" device
        [ -z "$item" ] && return
index 65209bb986312883c6f33563a05026952d85ef6e..193a82040eaeece91940615fd171b8aa9e1cc0ac 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gnupg
 PKG_VERSION:=1.4.20
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=ftp://ftp.franken.de/pub/crypt/mirror/ftp.gnupg.org/gcrypt/gnupg \
@@ -39,7 +39,7 @@ endef
 
 define Package/gnupg-utils
   $(call Package/gnupg/Default)
-  DEPENDS:=gnupg
+  DEPENDS:=gnupg +libcurl
   TITLE:=Key management utilities for GnuPG
 endef
 
@@ -67,9 +67,7 @@ CONFIGURE_ARGS += \
        --disable-bzip2 \
        --disable-ldap \
        --disable-finger \
-       --disable-ftp \
        --disable-dns-srv \
-       --enable-fake-curl \
        --disable-regex \
 
 MAKE_FLAGS += \
index 2351f71ec70b7efef253da84d68baa02e820d1f6..0a6ef374cde7b7fe02d6006564e831b98a1c51fe 100644 (file)
@@ -83,6 +83,9 @@ define Package/libgps/description
   This package contains the libgps library.
 endef
 
+SCONS_VARS += \
+       LINKFLAGS="$(TARGET_LDFLAGS)"
+
 SCONS_OPTIONS += \
        dbus_export=no \
        tsip=no \
index 7b373bbf6654500af992539ac8ca401fbcbe9862..d7a99a52b2a9f07360f4a7dba650286f4c9ce6c1 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2010-2015 OpenWrt.org
+# Copyright (C) 2010-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=grep
-PKG_VERSION:=2.22
+PKG_VERSION:=2.24
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@GNU/grep
-PKG_MD5SUM:=e1015e951a49a82b02e38891026ef5df
+PKG_MD5SUM:=f1c980134c04692a90078e87283074b6
 
 PKG_LICENSE:=GPL-3.0
 PKG_LICENSE_FILES:=COPYING
index dec78f643a3addd5ddca31b430143c52a45d00a3..3787bced63036123b4bbc72b630026197376ad7d 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2014 OpenWrt.org
+# Copyright (C) 2014-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -7,9 +7,9 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=hamlib
-PKG_VERSION:=1.2.15.3
-PKG_RELEASE:=3
-PKG_MD5SUM:=3cad8987e995a00e5e9d360e2be0eb43
+PKG_VERSION:=3.0.1
+PKG_RELEASE:=1
+PKG_MD5SUM:=451acb9f727ed706ae2f59ee3f0e03c7
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/hamlib
@@ -39,7 +39,7 @@ define Package/hamlib
   TITLE+= utilities
   SECTION:=utils
   CATEGORY:=Utilities
-  DEPENDS:=+libpthread +libhamlib
+  DEPENDS:=+libhamlib
 endef
 
 define Package/hamlib/description
@@ -57,7 +57,7 @@ endef
 
 define Package/libhamlib
   $(call Package/libhamlib/Default)
-  DEPENDS:=+libusb-1.0 +libltdl
+  DEPENDS:=+libusb-1.0
   MENU:=1
 endef
 
@@ -67,222 +67,6 @@ define Package/libhamlib/description
   This package contains the hamlib shared library.
 endef
 
-define Package/hamlib-adat
-  $(call Package/libhamlib/Default)
-  TITLE:= for ADAT
-  DEPENDS:=libhamlib
-endef
-
-define Package/hamlib-alinco
-  $(call Package/libhamlib/Default)
-  TITLE:= for Alinco
-  DEPENDS:=libhamlib
-endef
-
-define Package/hamlib-amsat
-  $(call Package/libhamlib/Default)
-  TITLE:= for AMSAT
-  DEPENDS:=libhamlib
-endef
-
-define Package/hamlib-aor
-  $(call Package/libhamlib/Default)
-  TITLE:= for AOR
-  DEPENDS:=libhamlib
-endef
-
-define Package/hamlib-ars
-  $(call Package/libhamlib/Default)
-  TITLE:= for ARS
-  DEPENDS:=libhamlib
-endef
-
-define Package/hamlib-celestron
-  $(call Package/libhamlib/Default)
-  TITLE:= for Celestron
-  DEPENDS:=libhamlib
-endef
-
-define Package/hamlib-drake
-  $(call Package/libhamlib/Default)
-  TITLE:= for Drake
-  DEPENDS:=libhamlib
-endef
-
-define Package/hamlib-dummy
-  $(call Package/libhamlib/Default)
-  TITLE:= for dummy
-  DEPENDS:=libhamlib
-endef
-
-define Package/hamlib-easycomm
-  $(call Package/libhamlib/Default)
-  TITLE:= for EasyComm
-  DEPENDS:=libhamlib
-endef
-
-define Package/hamlib-flexradio
-  $(call Package/libhamlib/Default)
-  TITLE:= for FlexRadio
-  DEPENDS:=libhamlib
-endef
-
-define Package/hamlib-fodtrack
-  $(call Package/libhamlib/Default)
-  TITLE:= for FodTrack
-  DEPENDS:=libhamlib
-endef
-
-define Package/hamlib-gs232a
-  $(call Package/libhamlib/Default)
-  TITLE:= for GS-232A
-  DEPENDS:=libhamlib
-endef
-
-define Package/hamlib-heathkit
-  $(call Package/libhamlib/Default)
-  TITLE:= for Heathkit
-  DEPENDS:=libhamlib
-endef
-
-define Package/hamlib-icom
-  $(call Package/libhamlib/Default)
-  TITLE:= for ICOM
-  DEPENDS:=libhamlib
-endef
-
-define Package/hamlib-jrc
-  $(call Package/libhamlib/Default)
-  TITLE:= for JRC
-  DEPENDS:=libhamlib
-endef
-
-define Package/hamlib-kachina
-  $(call Package/libhamlib/Default)
-  TITLE:= for Kachina
-  DEPENDS:=libhamlib
-endef
-
-define Package/hamlib-kenwood
-  $(call Package/libhamlib/Default)
-  TITLE:= for Kenwood
-  DEPENDS:=libhamlib
-endef
-
-define Package/hamlib-kit
-  $(call Package/libhamlib/Default)
-  TITLE:= for kits
-  DEPENDS:=libhamlib
-endef
-
-define Package/hamlib-lowe
-  $(call Package/libhamlib/Default)
-  TITLE:= for Lowe
-  DEPENDS:=libhamlib
-endef
-
-define Package/hamlib-m2
-  $(call Package/libhamlib/Default)
-  TITLE:= for M2
-  DEPENDS:=libhamlib
-endef
-
-define Package/hamlib-pcr
-  $(call Package/libhamlib/Default)
-  TITLE:= for PCR
-  DEPENDS:=libhamlib
-endef
-
-define Package/hamlib-prm80
-  $(call Package/libhamlib/Default)
-  TITLE:= for PRM80
-  DEPENDS:=libhamlib
-endef
-
-define Package/hamlib-racal
-  $(call Package/libhamlib/Default)
-  TITLE:= for Racal
-  DEPENDS:=libhamlib
-endef
-
-define Package/hamlib-rft
-  $(call Package/libhamlib/Default)
-  TITLE:= for RFT
-  DEPENDS:=libhamlib
-endef
-
-define Package/hamlib-rotorez
-  $(call Package/libhamlib/Default)
-  TITLE:= for Rotor-EZ
-  DEPENDS:=libhamlib
-endef
-
-define Package/hamlib-rs
-  $(call Package/libhamlib/Default)
-  TITLE:= for R&S
-  DEPENDS:=libhamlib
-endef
-
-define Package/hamlib-sartek
-  $(call Package/libhamlib/Default)
-  TITLE:= for SARtek
-  DEPENDS:=libhamlib
-endef
-
-define Package/hamlib-skanti
-  $(call Package/libhamlib/Default)
-  TITLE:= for Skanti
-  DEPENDS:=libhamlib
-endef
-
-define Package/hamlib-spid
-  $(call Package/libhamlib/Default)
-  TITLE:= for SPID
-  DEPENDS:=libhamlib
-endef
-
-define Package/hamlib-tapr
-  $(call Package/libhamlib/Default)
-  TITLE:= for TAPR
-  DEPENDS:=libhamlib
-endef
-
-define Package/hamlib-tentec
-  $(call Package/libhamlib/Default)
-  TITLE:= for TenTec
-  DEPENDS:=libhamlib
-endef
-
-define Package/hamlib-ts7400
-  $(call Package/libhamlib/Default)
-  TITLE:= for TS-7400
-  DEPENDS:=libhamlib
-endef
-
-define Package/hamlib-tuner
-  $(call Package/libhamlib/Default)
-  TITLE:= for Video for Linux tuner
-  DEPENDS:=libhamlib
-endef
-
-define Package/hamlib-uniden
-  $(call Package/libhamlib/Default)
-  TITLE:= for Uniden
-  DEPENDS:=libhamlib
-endef
-
-define Package/hamlib-wj
-  $(call Package/libhamlib/Default)
-  TITLE:= for Watkins - Johnson
-  DEPENDS:=libhamlib
-endef
-
-define Package/hamlib-yaesu
-  $(call Package/libhamlib/Default)
-  TITLE:= for Yaesu
-  DEPENDS:=libhamlib
-endef
-
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include/hamlib
        $(CP) $(PKG_INSTALL_DIR)/usr/include/hamlib/*.h $(1)/usr/include/hamlib
@@ -293,11 +77,15 @@ define Build/InstallDev
 endef
 
 CONFIGURE_ARGS+= \
+       --disable-html-matrix \
+       --disable-winradio \
+       --without-readline \
        --without-cxx-binding \
-       --without-winradio \
-       --without-rpc-backends \
        --with-pic \
 
+CONFIGURE_VARS+= \
+       LIBUSB_LIBS="-lusb-1.0" \
+
 define Package/hamlib/install
        $(INSTALL_DIR) $(1)/usr/bin
        $(CP) $(PKG_INSTALL_DIR)/usr/bin/{rig,rot}* $(1)/usr/bin/
@@ -308,222 +96,5 @@ define Package/libhamlib/install
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libhamlib.so* $(1)/usr/lib/
 endef
 
-define Package/hamlib-adat/install
-       $(INSTALL_DIR) $(1)/usr/lib/hamlib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/hamlib/hamlib-adat.so* $(1)/usr/lib/hamlib
-endef
-
-define Package/hamlib-alinco/install
-       $(INSTALL_DIR) $(1)/usr/lib/hamlib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/hamlib/hamlib-alinco.so* $(1)/usr/lib/hamlib
-endef
-
-define Package/hamlib-amsat/install
-       $(INSTALL_DIR) $(1)/usr/lib/hamlib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/hamlib/hamlib-amsat.so* $(1)/usr/lib/hamlib
-endef
-
-define Package/hamlib-aor/install
-       $(INSTALL_DIR) $(1)/usr/lib/hamlib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/hamlib/hamlib-aor.so* $(1)/usr/lib/hamlib
-endef
-
-define Package/hamlib-ars/install
-       $(INSTALL_DIR) $(1)/usr/lib/hamlib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/hamlib/hamlib-ars.so* $(1)/usr/lib/hamlib
-endef
-
-define Package/hamlib-celestron/install
-       $(INSTALL_DIR) $(1)/usr/lib/hamlib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/hamlib/hamlib-celestron.so* $(1)/usr/lib/hamlib
-endef
-
-define Package/hamlib-drake/install
-       $(INSTALL_DIR) $(1)/usr/lib/hamlib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/hamlib/hamlib-drake.so* $(1)/usr/lib/hamlib
-endef
-
-define Package/hamlib-dummy/install
-       $(INSTALL_DIR) $(1)/usr/lib/hamlib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/hamlib/hamlib-dummy.so* $(1)/usr/lib/hamlib
-endef
-
-define Package/hamlib-easycomm/install
-       $(INSTALL_DIR) $(1)/usr/lib/hamlib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/hamlib/hamlib-easycomm.so* $(1)/usr/lib/hamlib
-endef
-
-define Package/hamlib-flexradio/install
-       $(INSTALL_DIR) $(1)/usr/lib/hamlib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/hamlib/hamlib-flexradio.so* $(1)/usr/lib/hamlib
-endef
-
-define Package/hamlib-fodtrack/install
-       $(INSTALL_DIR) $(1)/usr/lib/hamlib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/hamlib/hamlib-fodtrack.so* $(1)/usr/lib/hamlib
-endef
-
-define Package/hamlib-gs232a/install
-       $(INSTALL_DIR) $(1)/usr/lib/hamlib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/hamlib/hamlib-gs232a.so* $(1)/usr/lib/hamlib
-endef
-
-define Package/hamlib-heathkit/install
-       $(INSTALL_DIR) $(1)/usr/lib/hamlib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/hamlib/hamlib-heathkit.so* $(1)/usr/lib/hamlib
-endef
-
-define Package/hamlib-icom/install
-       $(INSTALL_DIR) $(1)/usr/lib/hamlib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/hamlib/hamlib-icom.so* $(1)/usr/lib/hamlib
-endef
-
-define Package/hamlib-jrc/install
-       $(INSTALL_DIR) $(1)/usr/lib/hamlib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/hamlib/hamlib-jrc.so* $(1)/usr/lib/hamlib
-endef
-
-define Package/hamlib-kachina/install
-       $(INSTALL_DIR) $(1)/usr/lib/hamlib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/hamlib/hamlib-kachina.so* $(1)/usr/lib/hamlib
-endef
-
-define Package/hamlib-kenwood/install
-       $(INSTALL_DIR) $(1)/usr/lib/hamlib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/hamlib/hamlib-kenwood.so* $(1)/usr/lib/hamlib
-endef
-
-define Package/hamlib-kit/install
-       $(INSTALL_DIR) $(1)/usr/lib/hamlib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/hamlib/hamlib-kit.so* $(1)/usr/lib/hamlib
-endef
-
-define Package/hamlib-lowe/install
-       $(INSTALL_DIR) $(1)/usr/lib/hamlib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/hamlib/hamlib-lowe.so* $(1)/usr/lib/hamlib
-endef
-
-define Package/hamlib-m2/install
-       $(INSTALL_DIR) $(1)/usr/lib/hamlib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/hamlib/hamlib-m2.so* $(1)/usr/lib/hamlib
-endef
-
-define Package/hamlib-pcr/install
-       $(INSTALL_DIR) $(1)/usr/lib/hamlib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/hamlib/hamlib-pcr.so* $(1)/usr/lib/hamlib
-endef
-
-define Package/hamlib-prm80/install
-       $(INSTALL_DIR) $(1)/usr/lib/hamlib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/hamlib/hamlib-prm80.so* $(1)/usr/lib/hamlib
-endef
-
-define Package/hamlib-racal/install
-       $(INSTALL_DIR) $(1)/usr/lib/hamlib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/hamlib/hamlib-racal.so* $(1)/usr/lib/hamlib
-endef
-
-define Package/hamlib-rft/install
-       $(INSTALL_DIR) $(1)/usr/lib/hamlib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/hamlib/hamlib-rft.so* $(1)/usr/lib/hamlib
-endef
-
-define Package/hamlib-rotorez/install
-       $(INSTALL_DIR) $(1)/usr/lib/hamlib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/hamlib/hamlib-rotorez.so* $(1)/usr/lib/hamlib
-endef
-
-define Package/hamlib-rs/install
-       $(INSTALL_DIR) $(1)/usr/lib/hamlib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/hamlib/hamlib-rs.so* $(1)/usr/lib/hamlib
-endef
-
-define Package/hamlib-sartek/install
-       $(INSTALL_DIR) $(1)/usr/lib/hamlib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/hamlib/hamlib-sartek.so* $(1)/usr/lib/hamlib
-endef
-
-define Package/hamlib-skanti/install
-       $(INSTALL_DIR) $(1)/usr/lib/hamlib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/hamlib/hamlib-skanti.so* $(1)/usr/lib/hamlib
-endef
-
-define Package/hamlib-spid/install
-       $(INSTALL_DIR) $(1)/usr/lib/hamlib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/hamlib/hamlib-spid.so* $(1)/usr/lib/hamlib
-endef
-
-define Package/hamlib-tapr/install
-       $(INSTALL_DIR) $(1)/usr/lib/hamlib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/hamlib/hamlib-tapr.so* $(1)/usr/lib/hamlib
-endef
-
-define Package/hamlib-tentec/install
-       $(INSTALL_DIR) $(1)/usr/lib/hamlib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/hamlib/hamlib-tentec.so* $(1)/usr/lib/hamlib
-endef
-
-define Package/hamlib-ts7400/install
-       $(INSTALL_DIR) $(1)/usr/lib/hamlib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/hamlib/hamlib-ts7400.so* $(1)/usr/lib/hamlib
-endef
-
-define Package/hamlib-tuner/install
-       $(INSTALL_DIR) $(1)/usr/lib/hamlib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/hamlib/hamlib-tuner.so* $(1)/usr/lib/hamlib
-endef
-
-define Package/hamlib-uniden/install
-       $(INSTALL_DIR) $(1)/usr/lib/hamlib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/hamlib/hamlib-uniden.so* $(1)/usr/lib/hamlib
-endef
-
-define Package/hamlib-wj/install
-       $(INSTALL_DIR) $(1)/usr/lib/hamlib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/hamlib/hamlib-wj.so* $(1)/usr/lib/hamlib
-endef
-
-define Package/hamlib-yaesu/install
-       $(INSTALL_DIR) $(1)/usr/lib/hamlib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/hamlib/hamlib-yaesu.so* $(1)/usr/lib/hamlib
-endef
-
 $(eval $(call BuildPackage,hamlib))
 $(eval $(call BuildPackage,libhamlib))
-$(eval $(call BuildPackage,hamlib-adat))
-$(eval $(call BuildPackage,hamlib-alinco))
-$(eval $(call BuildPackage,hamlib-amsat))
-$(eval $(call BuildPackage,hamlib-aor))
-$(eval $(call BuildPackage,hamlib-ars))
-$(eval $(call BuildPackage,hamlib-celestron))
-$(eval $(call BuildPackage,hamlib-drake))
-$(eval $(call BuildPackage,hamlib-dummy))
-$(eval $(call BuildPackage,hamlib-easycomm))
-$(eval $(call BuildPackage,hamlib-flexradio))
-$(eval $(call BuildPackage,hamlib-fodtrack))
-$(eval $(call BuildPackage,hamlib-gs232a))
-$(eval $(call BuildPackage,hamlib-heathkit))
-$(eval $(call BuildPackage,hamlib-icom))
-$(eval $(call BuildPackage,hamlib-jrc))
-$(eval $(call BuildPackage,hamlib-kachina))
-$(eval $(call BuildPackage,hamlib-kenwood))
-$(eval $(call BuildPackage,hamlib-kit))
-$(eval $(call BuildPackage,hamlib-lowe))
-$(eval $(call BuildPackage,hamlib-m2))
-$(eval $(call BuildPackage,hamlib-pcr))
-$(eval $(call BuildPackage,hamlib-prm80))
-$(eval $(call BuildPackage,hamlib-racal))
-$(eval $(call BuildPackage,hamlib-rft))
-$(eval $(call BuildPackage,hamlib-rotorez))
-$(eval $(call BuildPackage,hamlib-rs))
-$(eval $(call BuildPackage,hamlib-sartek))
-$(eval $(call BuildPackage,hamlib-skanti))
-$(eval $(call BuildPackage,hamlib-spid))
-$(eval $(call BuildPackage,hamlib-tapr))
-$(eval $(call BuildPackage,hamlib-tentec))
-$(eval $(call BuildPackage,hamlib-ts7400))
-$(eval $(call BuildPackage,hamlib-tuner))
-$(eval $(call BuildPackage,hamlib-uniden))
-$(eval $(call BuildPackage,hamlib-wj))
-$(eval $(call BuildPackage,hamlib-yaesu))
-
diff --git a/utils/hamlib/patches/100-override-autoconf-detection.patch b/utils/hamlib/patches/100-override-autoconf-detection.patch
deleted file mode 100644 (file)
index 284cc3b..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-Index: hamlib-1.2.15.3/configure.ac
-===================================================================
---- hamlib-1.2.15.3.orig/configure.ac  2012-11-01 22:27:27.000000000 +0100
-+++ hamlib-1.2.15.3/configure.ac       2014-06-15 09:34:25.557966205 +0200
-@@ -234,12 +234,12 @@
-               "You need a C99 compliant C compiler that supports struct/array intializers."
-               "Have you considered GCC lately?.")]);
--dnl libxml2 required rigmem xml support
--PKG_CHECK_MODULES([LIBXML2], [libxml-2.0],
--      [AC_DEFINE(HAVE_XML2,[1],[Define if libxml2 is available])],
--      [AC_MSG_WARN([libxml-2.0 pkg-config not found, XML support will be disabled])])
-+#dnl libxml2 required rigmem xml support
-+#PKG_CHECK_MODULES([LIBXML2], [libxml-2.0],
-+#     [AC_DEFINE(HAVE_XML2,[1],[Define if libxml2 is available])],
-+#     [AC_MSG_WARN([libxml-2.0 pkg-config not found, XML support will be disabled])])
- AC_SUBST(LIBXML2_LIBS)
- AC_SUBST(LIBXML2_CFLAGS)
- dnl Check if libgd-dev is installed, so we can enable rigmatrix
-@@ -406,7 +406,7 @@
- AM_CONDITIONAL(HAVE_USRP, test x"${cf_with_usrp}" = "xyes")
--PKG_CHECK_MODULES(LIBUSB, libusb >= 0.1, ,
-+PKG_CHECK_MODULES(LIBUSB, libusb >= 1.0, ,
-                 [AC_MSG_WARN([libusb pkg-config not found, USB backends will be disabled])])
- CFLAGS="${CFLAGS} ${LIBUSB_CFLAGS}"
- CXXFLAGS="${CXXFLAGS} ${LIBUSB_CFLAGS}"
index 8e46a8572ec9dd553d1d6ef199a96abdb716e916..82942dfe80b526b0b199930db035268632507e58 100644 (file)
@@ -9,13 +9,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=LVM2
-PKG_VERSION:=2.02.138
-PKG_RELEASE:=1
+PKG_VERSION:=2.02.145
+PKG_RELEASE:=2
 PKG_LICENSE:=GPL-2.0 LGPL-2.1
 
 PKG_SOURCE:=$(PKG_NAME).$(PKG_VERSION).tgz
 PKG_SOURCE_URL:=ftp://sources.redhat.com/pub/lvm2/releases
-PKG_MD5SUM:=c660e02ad4586a1d297b6befbe85556d
+PKG_MD5SUM:=fd952ba7d640f0bedcec0085e358b318
 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME).$(PKG_VERSION)
 
@@ -26,7 +26,7 @@ define Package/libdevmapper
   CATEGORY:=Libraries
   TITLE:=The Linux Kernel Device Mapper userspace library
   URL:=http://sourceware.org/dm/
-  DEPENDS:=+kmod-dm +libpthread
+  DEPENDS:=+kmod-dm +libpthread +libuuid
 endef
 
 define Package/libdevmapper/description
index 13da6b63f978388923a7947297ba2032817f4004..fff37964729eedbc6a7de35d2fa1cc7e5cb09c2f 100644 (file)
@@ -1,6 +1,6 @@
 --- a/lib/commands/toolcontext.c
 +++ b/lib/commands/toolcontext.c
-@@ -1741,8 +1741,10 @@ struct cmd_context *create_toolcontext(u
+@@ -1747,8 +1747,10 @@ struct cmd_context *create_toolcontext(u
                                       unsigned set_filters)
  {
        struct cmd_context *cmd;
@@ -11,7 +11,7 @@
  
  #ifdef M_MMAP_MAX
        mallopt(M_MMAP_MAX, 0);
-@@ -1778,7 +1780,7 @@ struct cmd_context *create_toolcontext(u
+@@ -1784,7 +1786,7 @@ struct cmd_context *create_toolcontext(u
        /* FIXME Make this configurable? */
        reset_lvm_errno(1);
  
@@ -20,7 +20,7 @@
        /* Set in/out stream buffering before glibc */
        if (set_buffering) {
                /* Allocate 2 buffers */
-@@ -2161,7 +2163,7 @@ void destroy_toolcontext(struct cmd_cont
+@@ -2167,7 +2169,7 @@ void destroy_toolcontext(struct cmd_cont
        if (cmd->libmem)
                dm_pool_destroy(cmd->libmem);
  
@@ -31,7 +31,7 @@
                if (is_valid_fd(STDIN_FILENO) &&
 --- a/tools/lvmcmdline.c
 +++ b/tools/lvmcmdline.c
-@@ -1741,6 +1741,7 @@ int lvm_split(char *str, int *argc, char
+@@ -1744,6 +1744,7 @@ int lvm_split(char *str, int *argc, char
  /* Make sure we have always valid filedescriptors 0,1,2 */
  static int _check_standard_fds(void)
  {
@@ -39,7 +39,7 @@
        int err = is_valid_fd(STDERR_FILENO);
  
        if (!is_valid_fd(STDIN_FILENO) &&
-@@ -1767,6 +1768,12 @@ static int _check_standard_fds(void)
+@@ -1770,6 +1771,12 @@ static int _check_standard_fds(void)
                       strerror(errno));
                return 0;
        }
index de9cecf1de4d5106e78361bfb8d9968bbddf14fc..a6935e03c1d764894481246c3cab42bed9ffe555 100644 (file)
@@ -8,15 +8,15 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=lxc
-PKG_VERSION:=1.1.3
-PKG_RELEASE:=1
+PKG_VERSION:=1.1.5
+PKG_RELEASE:=2
 
 PKG_LICENSE:=LGPL-2.1+ BSD-2-Clause GPL-2.0
 PKG_MAINTAINER:=Luka Perkov <luka@openwrt.org>
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://linuxcontainers.org/downloads/lxc/
-PKG_MD5SUM:=197abb5a28ab0b689c737eb1951023fb
+PKG_MD5SUM:=dd9684dde0a58ed13f4f49c855b79a1a
 
 PKG_BUILD_DEPENDS:=lua
 PKG_BUILD_PARALLEL:=1
@@ -39,7 +39,8 @@ LXC_SCRIPTS += \
 
 DEPENDS_APPLETS = +libpthread +libcap +liblxc
 
-DEPENDS_create = +lxc-configs +lxc-hooks +lxc-templates
+DEPENDS_create = +lxc-configs +lxc-hooks +lxc-templates +flock
+
 DEPENDS_ls = +lxc-config
 DEPENDS_top = +lxc-lua +luafilesystem @BROKEN
 
@@ -56,6 +57,23 @@ define Package/lxc
   MENU:=1
 endef
 
+define Package/lxc-auto
+  $(call Package/lxc/Default)
+  TITLE:= (initscript)
+  DEPENDS:=+lxc-start +lxc-stop
+endef
+
+define Package/lxc-auto/description
+ LXC is the userspace control package for Linux Containers, a lightweight
+ virtual system mechanism sometimes described as "chroot on steroids".
+ This package adds and initscript for starting and stopping the containers
+ on boot and shutdown.
+endef
+
+define Package/lxc-auto/conffiles
+/etc/config/lxc-auto
+endef
+
 define Package/lxc/config
   source "$(SOURCE)/Config.in"
 endef
@@ -149,6 +167,12 @@ define Package/lxc/install
        true
 endef
 
+define Package/lxc-auto/install
+       $(INSTALL_DIR) $(1)/etc/config $(1)/etc/init.d
+       $(INSTALL_CONF) ./files/lxc-auto.config $(1)/etc/config/lxc-auto
+       $(INSTALL_BIN) ./files/lxc-auto.init $(1)/etc/init.d/lxc-auto
+endef
+
 define Package/lxc-common/conffiles
 /etc/lxc/default.conf
 /etc/lxc/lxc.conf
@@ -250,6 +274,7 @@ $(eval $(call BuildPackage,lxc-templates))
 $(eval $(call BuildPackage,liblxc))
 $(eval $(call BuildPackage,lxc-lua))
 $(eval $(call BuildPackage,lxc-init))
+$(eval $(call BuildPackage,lxc-auto))
 $(foreach u,$(LXC_APPLETS_BIN),$(eval $(call GenPlugin,$(u),$(DEPENDS_APPLETS),"/usr/bin")))
 $(foreach u,$(LXC_APPLETS_LIB),$(eval $(call GenPlugin,$(u),$(DEPENDS_APPLETS),"/usr/lib/lxc")))
 $(foreach u,$(LXC_SCRIPTS),$(eval $(call GenPlugin,$(u),,"/usr/bin")))
diff --git a/utils/lxc/files/lxc-auto.config b/utils/lxc/files/lxc-auto.config
new file mode 100644 (file)
index 0000000..b5a7ec9
--- /dev/null
@@ -0,0 +1,5 @@
+#config container
+       #option name container1
+       #option timeout 300
+       #list command '/bin/command --option'
+
diff --git a/utils/lxc/files/lxc-auto.init b/utils/lxc/files/lxc-auto.init
new file mode 100755 (executable)
index 0000000..937f082
--- /dev/null
@@ -0,0 +1,60 @@
+#!/bin/sh /etc/rc.common
+
+. /lib/functions.sh
+
+START=99
+STOP=00
+
+run_command() {
+       local command="$1"
+       $command
+}
+
+start_container() {
+       local cfg="$1"
+       local name
+
+       config_get name "$cfg" name
+       config_list_foreach "$cfg" command run_command
+       if [ -n "$name" ]; then
+               /usr/bin/lxc-start -n "$name"
+       fi
+}
+
+max_timeout=0
+
+stop_container() {
+       local cfg="$1"
+       local name timeout
+
+       config_get name "$cfg" name
+       config_get timeout "$cfg" timeout 300
+
+       if [ "$max_timeout" -lt "$timeout" ]; then
+               max_timeout=$timeout
+       fi
+
+       if [ -n "$name" ]; then
+               if [ "$timeout" = "0" ]; then
+                       /usr/bin/lxc-stop -n "$name" &
+               else
+                       /usr/bin/lxc-stop -n "$name" -t $timeout &
+               fi
+       fi
+}
+
+start() {
+       config_load lxc-auto
+       config_foreach start_container container
+}
+
+stop() {
+       config_load lxc-auto
+       config_foreach stop_container container
+       # ensure e.g. shutdown doesn't occur before maximum timeout on
+       # containers that are shutting down
+       if [ $max_timeout -gt 0 ]; then
+               sleep $max_timeout
+       fi
+}
+
index e2f002af99f91d58338da003b6d6bce709975ffe..2dfaa9bea5a652cc708604ce3658bbd66828ed50 100644 (file)
@@ -1,7 +1,7 @@
 --- a/src/lxc/utils.h
 +++ b/src/lxc/utils.h
-@@ -44,11 +44,7 @@ extern char *get_rundir(void);
- extern const char *lxc_global_config_value(const char *option_name);
+@@ -41,11 +41,7 @@ extern int mkdir_p(const char *dir, mode
+ extern char *get_rundir(void);
  
  /* Define getline() if missing from the C library */
 -#ifndef HAVE_GETLINE
index 6b57e2690235b0d5c10344240db49ac0a54dbe18..42e194c33f3961d42f8c927fb6f18e61168af410 100644 (file)
@@ -1,12 +1,20 @@
 --- a/src/lxc/bdev.c
 +++ b/src/lxc/bdev.c
-@@ -1936,3 +1936,3 @@ static int loop_mount(struct bdev *bdev)
+@@ -1939,7 +1939,7 @@ static int find_free_loopdev(int *retfd,
+ static int loop_mount(struct bdev *bdev)
  {
 -      int lfd, ffd = -1, ret = -1;
 +      int lfd = -1, ffd = -1, ret = -1;
        struct loop_info64 lo;
-@@ -1974,3 +1974,3 @@ out:
+       char loname[100];
+@@ -1977,7 +1977,7 @@ out:
+       if (ffd > -1)
+               close(ffd);
        if (ret < 0) {
 -              close(lfd);
 +              if (lfd > -1) close(lfd);
                bdev->lofd = -1;
+       }
+       return ret;
index 7c0b3dbef4c2f7d857c173756045613493f68694..f712c99e8767abc437d9efdb987453483872ed54 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006-2015 OpenWrt.org
+# Copyright (C) 2006-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,14 +8,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mc
-PKG_VERSION:=4.8.15
-PKG_RELEASE:=2
-PKG_MAINTAINER:=Dirk Brenken <dirk@brenken.org>
+PKG_VERSION:=4.8.16
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Dirk Brenken <openwrt@brenken.org>
 PKG_LICENSE:=GPL-3.0+
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=http://ftp.midnight-commander.org/
-PKG_MD5SUM:=7c1935433866fdf59a3c2d9b7dae81ad
+PKG_SHA256SUM:=bbbcbe3097d3160f865d24aa38ff122f1c59752b5ef153ca4ade5ac0f82b7020
 PKG_BUILD_PARALLEL:=1
 PKG_FIXUP:=autoreconf
 
index 12067f1c915521bf0dcb91becc2de859f522659e..bd7ee35e90f54a254f1c5dbd7518a159882b9428 100644 (file)
---- a/lib/global.c
-+++ b/lib/global.c
-@@ -97,6 +97,7 @@ mc_global_t mc_global = {
- #endif /* !ENABLE_SUBSHELL */
-         .shell = NULL,
-+        .shell_realpath = NULL,
-         .xterm_flag = FALSE,
-         .disable_x11 = FALSE,
---- a/lib/global.h
-+++ b/lib/global.h
-@@ -255,6 +255,7 @@ typedef struct
-         /* The user's shell */
-         char *shell;
-+        char *shell_realpath;
-         /* This flag is set by xterm detection routine in function main() */
-         /* It is used by function view_other_cmd() */
---- a/lib/mcconfig/paths.c
-+++ b/lib/mcconfig/paths.c
-@@ -84,6 +84,7 @@ static const struct
-     /* data */
-     { "skins",                                 &mc_data_str, MC_SKINS_SUBDIR},
-     { "fish",                                  &mc_data_str, FISH_PREFIX},
-+    { "ashrc",                                 &mc_data_str, "ashrc"},
-     { "bashrc",                                &mc_data_str, "bashrc"},
-     { "inputrc",                               &mc_data_str, "inputrc"},
-     { "extfs.d",                               &mc_data_str, MC_EXTFS_DIR},
---- a/src/main.c
-+++ b/src/main.c
-@@ -87,6 +87,9 @@
- /*** file scope variables ************************************************************************/
- /*** file scope functions ************************************************************************/
-+
-+static char rp_shell[PATH_MAX];
-+
- /* --------------------------------------------------------------------------------------------- */
- static void
-@@ -118,6 +121,44 @@ check_codeset (void)
- }
- /* --------------------------------------------------------------------------------------------- */
-+/**
-+ * Get a system shell.
-+ *
-+ * @return newly allocated string with shell name
-+ */
-+
-+static char *
-+mc_get_system_shell (void)
-+{
-+    char *sh_str;
-+    /* 3rd choice: look for existing shells supported as MC subshells.  */
-+    if (access ("/bin/bash", X_OK) == 0)
-+        sh_str = g_strdup ("/bin/bash");
-+    else if (access ("/bin/ash", X_OK) == 0)
-+        sh_str = g_strdup ("/bin/ash");
-+    else if (access ("/bin/dash", X_OK) == 0)
-+        sh_str = g_strdup ("/bin/dash");
-+    else if (access ("/bin/busybox", X_OK) == 0)
-+        sh_str = g_strdup ("/bin/busybox");
-+    else if (access ("/bin/zsh", X_OK) == 0)
-+        sh_str = g_strdup ("/bin/zsh");
-+    else if (access ("/bin/tcsh", X_OK) == 0)
-+        sh_str = g_strdup ("/bin/tcsh");
-+    /* No fish as fallback because it is so much different from other shells and
-+     * in a way exotic (even though user-friendly by name) that we should not
-+     * present it as a subshell without the user's explicit intention. We rather
-+     * will not use a subshell but just a command line.
-+     * else if (access("/bin/fish", X_OK) == 0)
-+     *     mc_global.tty.shell = g_strdup ("/bin/fish");
-+     */
-+    else
-+        /* Fallback and last resort: system default shell */
-+        sh_str = g_strdup ("/bin/sh");
-+
-+    return sh_str;
-+}
-+
-+/* --------------------------------------------------------------------------------------------- */
- /** POSIX version.  The only version we support.  */
- static void
-@@ -126,9 +167,11 @@ OS_Setup (void)
-     const char *shell_env;
-     const char *datadir_env;
-+
-     shell_env = getenv ("SHELL");
-     if ((shell_env == NULL) || (shell_env[0] == '\0'))
-     {
-+        /* 2nd choice: user login shell */
-         struct passwd *pwd;
-         pwd = getpwuid (geteuid ());
-@@ -136,13 +179,15 @@ OS_Setup (void)
-             mc_global.tty.shell = g_strdup (pwd->pw_shell);
-     }
-     else
-+        /* 1st choice: SHELL environment variable */
-         mc_global.tty.shell = g_strdup (shell_env);
-     if ((mc_global.tty.shell == NULL) || (mc_global.tty.shell[0] == '\0'))
-     {
-         g_free (mc_global.tty.shell);
--        mc_global.tty.shell = g_strdup ("/bin/sh");
-+        mc_global.tty.shell = mc_get_system_shell ();
-     }
-+    mc_global.tty.shell_realpath = mc_realpath (mc_global.tty.shell, rp_shell);
-     /* This is the directory, where MC was installed, on Unix this is DATADIR */
-     /* and can be overriden by the MC_DATADIR environment variable */
---- a/src/subshell.c
-+++ b/src/subshell.c
-@@ -114,6 +114,8 @@ enum
- static enum
- {
-     BASH,
-+    ASH_BUSYBOX,                /* BusyBox default shell (ash) */
-+    DASH,                       /* Debian variant of ash */
-     TCSH,
-     ZSH,
-     FISH
-@@ -209,6 +211,7 @@ static void
- init_subshell_child (const char *pty_name)
- {
-     char *init_file = NULL;
-+    char *putenv_str = NULL;
-     pid_t mc_sid;
-     (void) pty_name;
-@@ -257,32 +260,53 @@ init_subshell_child (const char *pty_nam
-     switch (subshell_type)
-     {
-     case BASH:
-+        /* Do we have a custom init file ~/.local/share/mc/bashrc? */
-         init_file = mc_config_get_full_path ("bashrc");
-+        /* Otherwise use ~/.bashrc */
-         if (access (init_file, R_OK) == -1)
-         {
-             g_free (init_file);
-             init_file = g_strdup (".bashrc");
-         }
--        /* Make MC's special commands not show up in bash's history */
--        putenv ((char *) "HISTCONTROL=ignorespace");
-+        /* Make MC's special commands not show up in bash's history and also suppress
-+         * consecutive identical commands*/
-+        putenv ((char *) "HISTCONTROL=ignoreboth");
-         /* Allow alternative readline settings for MC */
-         {
-             char *input_file = mc_config_get_full_path ("inputrc");
-             if (access (input_file, R_OK) == 0)
-             {
--                char *putenv_str = g_strconcat ("INPUTRC=", input_file, NULL);
-+                putenv_str = g_strconcat ("INPUTRC=", input_file, NULL);
-                 putenv (putenv_str);
--                g_free (putenv_str);
-             }
-             g_free (input_file);
-         }
-         break;
--        /* TODO: Find a way to pass initfile to TCSH and ZSH */
-+    case ASH_BUSYBOX:
-+    case DASH:
-+        /* Do we have a custom init file ~/.local/share/mc/ashrc? */
-+        init_file = mc_config_get_full_path ("ashrc");
-+
-+        /* Otherwise use ~/.profile */
-+        if (access (init_file, R_OK) == -1)
-+        {
-+            g_free (init_file);
-+            init_file = g_strdup (".profile");
-+        }
-+
-+        /* Put init file to ENV variable used by ash */
-+        putenv_str = g_strconcat ("ENV=", init_file, NULL);
-+        putenv (putenv_str);
-+        /* Do not use "g_free (putenv_str)" here, otherwise ENV will be undefined! */
-+
-+        break;
-+
-+        /* TODO: Find a way to pass initfile to TCSH, ZSH and FISH */
-     case TCSH:
-     case ZSH:
-     case FISH:
-@@ -320,10 +344,6 @@ init_subshell_child (const char *pty_nam
-         execl (mc_global.tty.shell, "bash", "-rcfile", init_file, (char *) NULL);
-         break;
--    case TCSH:
--        execl (mc_global.tty.shell, "tcsh", (char *) NULL);
--        break;
--
-     case ZSH:
-         /* Use -g to exclude cmds beginning with space from history
-          * and -Z to use the line editor on non-interactive term */
-@@ -331,8 +351,11 @@ init_subshell_child (const char *pty_nam
-         break;
-+    case ASH_BUSYBOX:
-+    case DASH:
-+    case TCSH:
-     case FISH:
--        execl (mc_global.tty.shell, "fish", (char *) NULL);
-+        execl (mc_global.tty.shell, mc_global.tty.shell, (char *) NULL);
-         break;
-     default:
-@@ -341,6 +364,7 @@ init_subshell_child (const char *pty_nam
-     /* If we get this far, everything failed miserably */
-     g_free (init_file);
-+    g_free (putenv_str);
-     my_exit (FORK_FAILURE);
- }
-@@ -742,6 +766,171 @@ pty_open_slave (const char *pty_name)
- }
- #endif /* !HAVE_GRANTPT */
-+
-+/* --------------------------------------------------------------------------------------------- */
-+/**
-+ * Get a subshell type and store in subshell_type variable
-+ *
-+ * @return TRUE if subtype was gotten, FALSE otherwise
-+ */
-+
-+static gboolean
-+init_subshell_type (void)
-+{
-+    gboolean result = TRUE;
-+
-+    /* Find out what type of shell we have. Also consider real paths (resolved symlinks)
-+     * because e.g. csh might point to tcsh, ash to dash or busybox, sh to anything. */
-+
-+    if (strstr (mc_global.tty.shell, "/zsh") || strstr (mc_global.tty.shell_realpath, "/zsh")
-+        || getenv ("ZSH_VERSION"))
-+        /* Also detects ksh symlinked to zsh */
-+        subshell_type = ZSH;
-+    else if (strstr (mc_global.tty.shell, "/tcsh")
-+             || strstr (mc_global.tty.shell_realpath, "/tcsh"))
-+        /* Also detects csh symlinked to tcsh */
-+        subshell_type = TCSH;
-+    else if (strstr (mc_global.tty.shell, "/fish")
-+             || strstr (mc_global.tty.shell_realpath, "/fish"))
-+        subshell_type = FISH;
-+    else if (strstr (mc_global.tty.shell, "/dash")
-+             || strstr (mc_global.tty.shell_realpath, "/dash"))
-+        /* Debian ash (also found if symlinked to by ash/sh) */
-+        subshell_type = DASH;
-+    else if (strstr (mc_global.tty.shell_realpath, "/busybox"))
-+    {
-+        /* If shell is symlinked to busybox, assume it is an ash, even though theoretically
-+         * it could also be a hush (a mini shell for non-MMU systems deactivated by default).
-+         * For simplicity's sake we assume that busybox always contains an ash, not a hush.
-+         * On embedded platforms or on server systems, /bin/sh often points to busybox.
-+         * Sometimes even bash is symlinked to busybox (CONFIG_FEATURE_BASH_IS_ASH option),
-+         * so we need to check busybox symlinks *before* checking for the name "bash"
-+         * in order to avoid that case. */
-+        subshell_type = ASH_BUSYBOX;
-+    }
-+    else if (strstr (mc_global.tty.shell, "/bash") || getenv ("BASH"))
-+        /* If bash is not symlinked to busybox, it is safe to assume it is a real bash */
-+        subshell_type = BASH;
-+    else
-+    {
-+        mc_global.tty.use_subshell = FALSE;
-+        result = FALSE;
-+    }
-+    return result;
-+}
-+
-+/* --------------------------------------------------------------------------------------------- */
-+/**
-+ * Set up `precmd' or equivalent for reading the subshell's CWD.
-+ *
-+ * Attention! Never forget that these are *one-liners* even though the concatenated
-+ * substrings contain line breaks and indentation for better understanding of the
-+ * shell code. It is vital that each one-liner ends with a line feed character ("\n" ).
-+ *
-+ * @return initialized pre-command string
-+ */
-+
-+static void
-+init_subshell_precmd (char *precmd, size_t buff_size)
-+{
-+
-+    switch (subshell_type)
-+    {
-+    case BASH:
-+        g_snprintf (precmd, buff_size,
-+                    " PROMPT_COMMAND='pwd>&%d; kill -STOP $$';\n", subshell_pipe[WRITE]);
-+        break;
-+
-+    case ASH_BUSYBOX:
-+        /* BusyBox ash needs a somewhat complicated precmd emulation via PS1, and it is vital
-+         * that BB be built with active CONFIG_ASH_EXPAND_PRMT, but this is the default anyway.
-+         *
-+         * A: This leads to a stopped subshell (=frozen mc) if user calls "ash" command
-+         *    "PS1='$(pwd>&%d; kill -STOP $$)\\u@\\h:\\w\\$ '\n",
-+         *
-+         * B: This leads to "sh: precmd: not found" in sub-subshell if user calls "ash" command
-+         *    "precmd() { pwd>&%d; kill -STOP $$; }; "
-+         *    "PS1='$(precmd)\\u@\\h:\\w\\$ '\n",
-+         *
-+         * C: This works if user calls "ash" command because in sub-subshell
-+         *    PRECMD is unfedined, thus evaluated to empty string - no damage done.
-+         *    Attention: BusyBox must be built with FEATURE_EDITING_FANCY_PROMPT to
-+         *    permit \u, \w, \h, \$ escape sequences. Unfortunately this cannot be guaranteed,
-+         *    especially on embedded systems where people try to save space, so let's use
-+         *    the dash version below. It should work on virtually all systems.
-+         *    "precmd() { pwd>&%d; kill -STOP $$; }; "
-+         *    "PRECMD=precmd; "
-+         *    "PS1='$(eval $PRECMD)\\u@\\h:\\w\\$ '\n",
-+         */
-+    case DASH:
-+        /* Debian ash needs a precmd emulation via PS1, similar to BusyBox ash,
-+         * but does not support escape sequences for user, host and cwd in prompt.
-+         * Attention! Make sure that the buffer for precmd is big enough.
-+         *
-+         * We want to have a fancy dynamic prompt with user@host:cwd just like in the BusyBox
-+         * examples above, but because replacing the home directory part of the path by "~" is
-+         * complicated, it bloats the precmd to a size > BUF_SMALL (128).
-+         *
-+         * The following example is a little less fancy (home directory not replaced)
-+         * and shows the basic workings of our prompt for easier understanding:
-+         *
-+         * "precmd() { "
-+         *     "echo \"$USER@$(hostname -s):$PWD\"; "
-+         *     "pwd>&%d; "
-+         *     "kill -STOP $$; "
-+         * "}; "
-+         * "PRECMD=precmd; "
-+         * "PS1='$($PRECMD)$ '\n",
-+         */
-+        g_snprintf (precmd, buff_size,
-+                    "precmd() { "
-+                    "if [ ! \"${PWD##$HOME}\" ]; then "
-+                    "MC_PWD=\"~\"; "
-+                    "else "
-+                    "[ \"${PWD##$HOME/}\" = \"$PWD\" ] && MC_PWD=\"$PWD\" || MC_PWD=\"~/${PWD##$HOME/}\"; "
-+                    "fi; "
-+                    "echo \"$USER@openwrt:$MC_PWD\"; "
-+                    "pwd>&%d; "
-+                    "kill -STOP $$; "
-+                    "}; " "PRECMD=precmd; " "PS1='$($PRECMD)$ '\n", subshell_pipe[WRITE]);
-+        break;
-+
-+    case ZSH:
-+        g_snprintf (precmd, buff_size,
-+                    " precmd() { pwd>&%d; kill -STOP $$; }; "
-+                    "PS1='%%n@%%m:%%~%%# '\n", subshell_pipe[WRITE]);
-+        break;
-+
-+    case TCSH:
-+        g_snprintf (precmd, buff_size,
-+                    "set echo_style=both; "
-+                    "set prompt='%%n@%%m:%%~%%# '; "
-+                    "alias precmd 'echo $cwd:q >>%s; kill -STOP $$'\n", tcsh_fifo);
-+        break;
-+
-+    case FISH:
-+        /* We also want a fancy user@host:cwd prompt here, but fish makes it very easy to also
-+         * use colours, which is what we will do. But first here is a simpler, uncoloured version:
-+         * "function fish_prompt; "
-+         *     "echo (whoami)@(hostname -s):(pwd)\\$\\ ; "
-+         *     "echo \"$PWD\">&%d; "
-+         *     "kill -STOP %%self; "
-+         * "end\n",
-+         *
-+         * TODO: fish prompt is shown when panel is hidden (Ctrl-O), but not when it is visible.
-+         * Find out how to fix this.
-+         */
-+        g_snprintf (precmd, buff_size,
-+                    "function fish_prompt; "
-+                    "echo (whoami)@(hostname -s):(set_color $fish_color_cwd)(pwd)(set_color normal)\\$\\ ; "
-+                    "echo \"$PWD\">&%d; " "kill -STOP %%self; " "end\n", subshell_pipe[WRITE]);
-+        break;
-+
-+    default:
-+        break;
-+    }
-+}
-+
- /* --------------------------------------------------------------------------------------------- */
- /*** public functions ****************************************************************************/
- /* --------------------------------------------------------------------------------------------- */
-@@ -761,6 +950,7 @@ init_subshell (void)
- {
-     /* This must be remembered across calls to init_subshell() */
-     static char pty_name[BUF_SMALL];
-+    /* Must be considerably longer than BUF_SMALL (128) to support fancy shell prompts */
-     char precmd[BUF_MEDIUM];
-     switch (check_sid ())
-@@ -782,23 +972,8 @@ init_subshell (void)
-     if (mc_global.tty.subshell_pty == 0)
-     {                           /* First time through */
--        /* Find out what type of shell we have */
--
--        if (strstr (mc_global.tty.shell, "/zsh") || getenv ("ZSH_VERSION"))
--            subshell_type = ZSH;
--        else if (strstr (mc_global.tty.shell, "/tcsh"))
--            subshell_type = TCSH;
--        else if (strstr (mc_global.tty.shell, "/csh"))
--            subshell_type = TCSH;
--        else if (strstr (mc_global.tty.shell, "/bash") || getenv ("BASH"))
--            subshell_type = BASH;
--        else if (strstr (mc_global.tty.shell, "/fish"))
--            subshell_type = FISH;
--        else
--        {
--            mc_global.tty.use_subshell = FALSE;
-+        if (!init_subshell_type ())
-             return;
--        }
-         /* Open a pty for talking to the subshell */
-@@ -844,7 +1019,7 @@ init_subshell (void)
-                 return;
-             }
-         }
--        else /* subshell_type is BASH or ZSH */ if (pipe (subshell_pipe))
-+        else if (pipe (subshell_pipe))  /* subshell_type is BASH, ASH_BUSYBOX, DASH or ZSH */
-         {
-             perror (__FILE__ ": couldn't create pipe");
-             mc_global.tty.use_subshell = FALSE;
-@@ -872,39 +1047,116 @@ init_subshell (void)
-         init_subshell_child (pty_name);
-     }
--    /* Set up 'precmd' or equivalent for reading the subshell's CWD */
-+    init_subshell_precmd (precmd, BUF_MEDIUM);
-+
-+    /* Set up `precmd' or equivalent for reading the subshell's CWD
-+     *
-+     * Attention! Never forget that these are *one-liners* even though the concatenated
-+     * substrings contain line breaks and indentation for better understanding of the
-+     * shell code. It is vital that each one-liner ends with a line feed character ("\n" ).
-+     */
-     switch (subshell_type)
-     {
-     case BASH:
-         g_snprintf (precmd, sizeof (precmd),
--                    " PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND\n}'pwd>&%d;kill -STOP $$'\n",
--                    subshell_pipe[WRITE]);
-+                    " PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND\n}'pwd>&%d;kill -STOP $$'\n"
-+                    "PS1='\\u@\\h:\\w\\$ '\n", subshell_pipe[WRITE]);
-+        break;
-+
-+    case ASH_BUSYBOX:
-+        /* BusyBox ash needs a somewhat complicated precmd emulation via PS1, and it is vital
-+         * that BB be built with active CONFIG_ASH_EXPAND_PRMT, but this is the default anyway.
-+         *
-+         * A: This leads to a stopped subshell (=frozen mc) if user calls "ash" command
-+         *    "PS1='$(pwd>&%d; kill -STOP $$)\\u@\\h:\\w\\$ '\n",
-+         *
-+         * B: This leads to "sh: precmd: not found" in sub-subshell if user calls "ash" command
-+         *    "precmd() { pwd>&%d; kill -STOP $$; }; "
-+         *    "PS1='$(precmd)\\u@\\h:\\w\\$ '\n",
-+         *
-+         * C: This works if user calls "ash" command because in sub-subshell
-+         *    PRECMD is unfedined, thus evaluated to empty string - no damage done.
-+         *    Attention: BusyBox must be built with FEATURE_EDITING_FANCY_PROMPT to
-+         *    permit \u, \w, \h, \$ escape sequences. Unfortunately this cannot be guaranteed,
-+         *    especially on embedded systems where people try to save space, so let's use
-+         *    the dash version below. It should work on virtually all systems.
-+         *    "precmd() { pwd>&%d; kill -STOP $$; }; "
-+         *    "PRECMD=precmd; "
-+         *    "PS1='$(eval $PRECMD)\\u@\\h:\\w\\$ '\n",
-+         */
-+    case DASH:
-+        /* Debian ash needs a precmd emulation via PS1, similar to BusyBox ash,
-+         * but does not support escape sequences for user, host and cwd in prompt.
-+         * Attention! Make sure that the buffer for precmd is big enough.
-+         *
-+         * We want to have a fancy dynamic prompt with user@host:cwd just like in the BusyBox
-+         * examples above, but because replacing the home directory part of the path by "~" is
-+         * complicated, it bloats the precmd to a size > BUF_SMALL (128).
-+         *
-+         * The following example is a little less fancy (home directory not replaced)
-+         * and shows the basic workings of our prompt for easier understanding:
-+         *
-+         * "precmd() { "
-+         *     "echo \"$USER@$(hostname -s):$PWD\"; "
-+         *     "pwd>&%d; "
-+         *     "kill -STOP $$; "
-+         * "}; "
-+         * "PRECMD=precmd; "
-+         * "PS1='$($PRECMD)$ '\n",
-+         */
-+        g_snprintf (precmd, sizeof (precmd),
-+                    "precmd() { "
-+                    "if [ ! \"${PWD##$HOME}\" ]; then "
-+                    "MC_PWD=\"~\"; "
-+                    "else "
-+                    "[ \"${PWD##$HOME/}\" = \"$PWD\" ] && MC_PWD=\"$PWD\" || MC_PWD=\"~/${PWD##$HOME/}\"; "
-+                    "fi; "
-+                    "echo \"$USER@openwrt:$MC_PWD\"; "
-+                    "pwd>&%d; "
-+                    "kill -STOP $$; "
-+                    "}; " "PRECMD=precmd; " "PS1='$($PRECMD)$ '\n", subshell_pipe[WRITE]);
-         break;
-     case ZSH:
-         g_snprintf (precmd, sizeof (precmd),
--                    " _mc_precmd(){ pwd>&%d;kill -STOP $$ }; precmd_functions+=(_mc_precmd)\n",
--                    subshell_pipe[WRITE]);
-+                    " _mc_precmd(){ pwd>&%d;kill -STOP $$ }; precmd_functions+=(_mc_precmd)\n"
-+                    "PS1='%%n@%%m:%%~%%# '\n", subshell_pipe[WRITE]);
-         break;
-     case TCSH:
-         g_snprintf (precmd, sizeof (precmd),
--                    "set echo_style=both;"
--                    "alias precmd 'echo $cwd:q >>%s;kill -STOP $$'\n", tcsh_fifo);
-+                    "set echo_style=both; "
-+                    "set prompt='%%n@%%m:%%~%%# '; "
-+                    "alias precmd 'echo $cwd:q >>%s; kill -STOP $$'\n", tcsh_fifo);
-         break;
-+
-     case FISH:
-         /* Use fish_prompt_mc function for prompt, if not present then copy fish_prompt to it. */
-+        /* We also want a fancy user@host:cwd prompt here, but fish makes it very easy to also
-+         * use colours, which is what we will do. But first here is a simpler, uncoloured version:
-+         * "function fish_prompt; "
-+         *     "echo (whoami)@(hostname -s):(pwd)\\$\\ ; "
-+         *     "echo \"$PWD\">&%d; "
-+         *     "kill -STOP %%self; "
-+         * "end\n",
-+         *
-+         * TODO: fish prompt is shown when panel is hidden (Ctrl-O), but not when it is visible.
-+         * Find out how to fix this.
-+         */
-         g_snprintf (precmd, sizeof (precmd),
-                     "if not functions -q fish_prompt_mc;"
-                     "functions -c fish_prompt fish_prompt_mc; end;"
--                    "function fish_prompt; echo $PWD>&%d; fish_prompt_mc; kill -STOP %%self; end\n",
-+                    "function fish_prompt;"
-+                    "echo (whoami)@(hostname -s):(set_color $fish_color_cwd)(pwd)(set_color normal)\\$\\ ; "
-+                    "echo \"$PWD\">&%d; fish_prompt_mc; kill -STOP %%self; end\n",
-                     subshell_pipe[WRITE]);
-         break;
-     default:
-         break;
-     }
-+
-     write_all (mc_global.tty.subshell_pty, precmd, strlen (precmd));
-     /* Wait until the subshell has started up and processed the command */
-@@ -1108,6 +1360,13 @@ subshell_name_quote (const char *s)
-         quote_cmd_start = "(printf \"%b\" '";
-         quote_cmd_end = "')";
-     }
-+    /* TODO: When BusyBox printf is fixed, get rid of this "else if", see
-+       http://lists.busybox.net/pipermail/busybox/2012-March/077460.html */
-+    /* else if (subshell_type == ASH_BUSYBOX)
-+       {
-+       quote_cmd_start = "\"`echo -en '";
-+       quote_cmd_end = "'`\"";
-+       } */
-     else
-     {
-         quote_cmd_start = "\"`printf \"%b\" '";
+--- a/src/subshell/common.c
++++ b/src/subshell/common.c
+@@ -849,7 +849,7 @@ init_subshell_precmd (char *precmd, size
+                     "else "
+                     "[ \"${PWD##$HOME/}\" = \"$PWD\" ] && MC_PWD=\"$PWD\" || MC_PWD=\"~/${PWD##$HOME/}\"; "
+                     "fi; "
+-                    "echo \"$USER@$(hostname -s):$MC_PWD\"; "
++                    "echo \"$USER@$HOSTNAME:$MC_PWD\"; "
+                     "pwd>&%d; "
+                     "kill -STOP $$; "
+                     "}; " "PRECMD=precmd; " "PS1='$($PRECMD)$ '\n", subshell_pipe[WRITE]);
index 00a0531eca4d427d02a316157a50960ab50d2cb8..145e7408f8c108abfa8593f185cc593faf72084b 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2015 OpenWrt.org
+# Copyright (C) 2015-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mmc-utils
-PKG_VERSION=2015-05-01-$(PKG_SOURCE_VERSION)
+PKG_VERSION=2016-02-23-$(PKG_SOURCE_VERSION)
 PKG_RELEASE:=2
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc-utils.git
-PKG_SOURCE_VERSION:=d0b46442b50794217e53b2455c1344c548d9d088
+PKG_SOURCE_VERSION:=4af1749d23503c25f692a60f23d295d16ddcfb61
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION)
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
 
index 8ae5c3cb6a5f1f59a8aa40638a1a7d8d43101e5a..8e27ed1ad3bfdddc657c8c734c0ba94f80d48106 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2007-2015 OpenWrt.org
+# Copyright (C) 2007-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,14 +8,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=nano
-PKG_VERSION:=2.5.0
+PKG_VERSION:=2.5.3
 PKG_RELEASE:=1
 PKG_LICENSE:=GPL-3.0+
 PKG_LICENSE_FILES:=COPYING
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://www.nano-editor.org/dist/v2.5
-PKG_MD5SUM:=751ed96457017572bab15be18cb873ba
+PKG_SOURCE_URL:=@GNU/nano
+PKG_MD5SUM:=a04d77611422ab4b6a7b489650c7a793
 
 PKG_INSTALL:=1
 PKG_BUILD_PARALLEL:=1
index c72818c97bbd5b5e791d4720dbc84ed6c735901e..e18e1aa19efe577466d701cdc397f61e08976cdb 100644 (file)
@@ -40,7 +40,7 @@ define Package/openocd/description
 OpenOCD provides on-chip programming and debugging support with a
 layered architecture of JTAG interface and TAP support including:
 
-- (X)SVF playback to faciliate automated boundary scan and FPGA/CPLD
+- (X)SVF playback to facilitate automated boundary scan and FPGA/CPLD
   programming;
 - debug target support (e.g. ARM, MIPS): single-stepping,
   breakpoints/watchpoints, gprof profiling, etc;
index 22ae5f43fd0a8750d380249ba13f44c742939ca3..14184a807f4c9c38766b870bd0043c5ce488b4a5 100644 (file)
@@ -21,7 +21,7 @@ Index: opensc-20150513/src/libopensc/card-openpgp.c
        }
  
 @@ -998,7 +997,6 @@ pgp_select_file(sc_card_t *card, const s
-               /* This file ID is refered when importing key&certificate via pkcs15init, like above.
+               /* This file ID is referred when importing key&certificate via pkcs15init, like above.
                 * We pretend to successfully find this inexistent file. */
                if (id == 0x4402 || id == 0x5f48) {
 -                      priv->current = NULL;
index 3cfc1252b89b6bb13b77260c7ba7fc9ff73443bd..209a3ed09b157b422476c4da1217147053628308 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2007-2015 OpenWrt.org
+# Copyright (C) 2007-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=pciutils
-PKG_VERSION:=3.4.0
-PKG_RELEASE:=1
+PKG_VERSION:=3.4.1
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@KERNEL/software/utils/pciutils
-PKG_MD5SUM:=46674cdbf2f72e4cfef75fea1b1ec5c8
+PKG_MD5SUM:=e901d17fcc6850747f43efde4de3452b
 PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
 
 PKG_LICENSE:=GPL-2.0
@@ -48,6 +48,7 @@ MAKE_FLAGS += \
        CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \
        PREFIX="/usr" \
        HOST="$(GNU_TARGET_NAME)" \
+       HWDB="no" \
        ZLIB="yes"
 
 ifneq ($(CONFIG_USE_GLIBC),)
index 6f473511b950543c3704fb0facc0bc1e78fe48e5..41dfd93ed9a2b042a051c2a6e2b12d911fcc8f2e 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=pcsc-lite
-PKG_VERSION:=1.8.14
+PKG_VERSION:=1.8.15
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=https://alioth.debian.org/frs/download.php/file/4138
-PKG_MD5SUM:=439b2c8892f502e39e5b8997a7ae01ed
+PKG_SOURCE_URL:=https://alioth.debian.org/frs/download.php/file/4157
+PKG_MD5SUM:=ded5cf2f78d26293934cefd0dbc58a43
 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
 PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=COPYING
index 91918e58b16c9dd4fb886057b076ce00df8143c5..dd4f90a10ff4e9cf80bb2b9ccaa4bda31431fd9a 100644 (file)
@@ -29,7 +29,7 @@ define Package/pps-tools
 endef
 
 define Package/pps-tools/description
-  Userland tools for GPS and DCF-77 Clock syncronization. PPS support in Kernel must be enabled.
+  Userland tools for GPS and DCF-77 Clock synchronization. PPS support in Kernel must be enabled.
 endef
 
 TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include
diff --git a/utils/qemu/Makefile b/utils/qemu/Makefile
new file mode 100644 (file)
index 0000000..f890fbe
--- /dev/null
@@ -0,0 +1,62 @@
+#
+# Copyright (C) 2016 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=qemu
+PKG_VERSION:=2.5.0
+PKG_RELEASE:=1
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=http://wiki.qemu-project.org/download/
+PKG_SOURCE_MD5SUM:=f469f2330bbe76e3e39db10e9ac4f8db
+PKG_LICENSE:=GPL-2.0
+PKG_LICENSE_FILES:=LICENSE tcg/LICENSE
+PKG_MAINTAINER:=Yousong Zhou <yszhou4tech@gmail.com>
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/qemu-ga
+  SECTION:=utils
+  CATEGORY:=Utilities
+  TITLE:=QEMU Guest Agent
+  URL:=http://www.qemu.org
+  DEPENDS:=+glib2 +libpthread +libstdcpp +librt
+endef
+
+define Package/qemu-ga/description
+This package contains the QEMU Guest Agent daemon
+endef
+
+# QEMU configure script does not recognize these options
+CONFIGURE_ARGS:=$(filter-out   \
+       --target=%              \
+       --host=%                \
+       --build=%               \
+       --program-prefix=%      \
+       --program-suffix=%      \
+       --exec-prefix=%         \
+       --disable-nls           \
+       , $(CONFIGURE_ARGS))
+
+# Building qemu-ga alone does not require zlib
+CONFIGURE_ARGS+=                       \
+       --cross-prefix=$(TARGET_CROSS)  \
+       --host-cc=$(HOSTCC)             \
+       --target-list=''                \
+       --disable-zlib-test             \
+       --enable-guest-agent
+
+define Package/qemu-ga/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/qemu-ga $(1)/usr/bin
+       $(INSTALL_DIR) $(1)/etc/init.d
+       $(INSTALL_BIN) ./files/qemu-ga.init $(1)/etc/init.d/qemu-ga
+       $(INSTALL_DIR) $(1)/etc/hotplug.d/virtio-ports
+       $(INSTALL_BIN) ./files/virtio-ports.hotplug $(1)/etc/hotplug.d/virtio-ports/qemu-ga
+endef
+
+$(eval $(call BuildPackage,qemu-ga))
diff --git a/utils/qemu/files/qemu-ga.init b/utils/qemu/files/qemu-ga.init
new file mode 100755 (executable)
index 0000000..86c2b7e
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2016 OpenWrt.org
+
+START=99
+USE_PROCD=1
+
+BIN=/usr/bin/qemu-ga
+
+start_service() {
+       procd_open_instance
+       procd_set_param command $BIN
+       procd_set_param respawn
+       procd_set_param stderr 1
+       procd_close_instance
+}
diff --git a/utils/qemu/files/virtio-ports.hotplug b/utils/qemu/files/virtio-ports.hotplug
new file mode 100755 (executable)
index 0000000..35919a5
--- /dev/null
@@ -0,0 +1,19 @@
+#!/bin/sh
+# Copyright (C) 2016 OpenWrt.org
+
+[ "$SUBSYSTEM" = "virtio-ports" ] || exit 0
+
+syspath="/sys/$DEVPATH"
+name="$(cat "$syspath/name" 2>/dev/null)"
+[ -n "$name" ] || exit 0
+
+case "$ACTION" in
+       "add")
+               mkdir -p /dev/virtio-ports
+               ln -s "/dev/$DEVNAME" "/dev/virtio-ports/$name"
+               /etc/init.d/qemu-ga start
+               ;;
+       "del")
+               rm -f "/dev/virtio-ports/$name"
+               ;;
+esac
index c716fb2ab7fc4e9ce6bff9d53809879db5f28ed1..37e7f848a738f1fd15b13aded17c8b76fd88444e 100644 (file)
@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=rtl-sdr
 PKG_VERSION:=0.5.3-20150608-$(PKG_SOURCE_VERSION)
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=git://git.osmocom.org/rtl-sdr.git
@@ -81,6 +81,10 @@ endef
 define Package/rtl-sdr/install
        $(INSTALL_DIR) $(1)/usr/bin
        $(CP) $(PKG_INSTALL_DIR)/usr/bin/rtl_* $(1)/usr/bin/
+       $(INSTALL_DIR) $(1)/etc/init.d
+       $(INSTALL_BIN) files/rtl_tcp.init $(1)/etc/init.d/rtl_tcp
+       $(INSTALL_DIR) $(1)/etc/config
+       $(INSTALL_CONF) files/rtl_tcp.config $(1)/etc/config/rtl_tcp
 endef
 
 define Package/librtlsdr/install
diff --git a/utils/rtl-sdr/files/rtl_tcp.config b/utils/rtl-sdr/files/rtl_tcp.config
new file mode 100644 (file)
index 0000000..95998aa
--- /dev/null
@@ -0,0 +1,12 @@
+config rtl_tcp main
+       option disabled '1'
+       option respawn '1'
+       option device_index ''
+       option address '0.0.0.0'
+       option port ''
+       option frequency ''
+       option gain ''
+       option samplerate ''
+       option buffers '8'
+       option num_linked_lists '8'
+       option ppm_error ''
diff --git a/utils/rtl-sdr/files/rtl_tcp.init b/utils/rtl-sdr/files/rtl_tcp.init
new file mode 100755 (executable)
index 0000000..4204787
--- /dev/null
@@ -0,0 +1,64 @@
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2016 OpenWrt.org
+
+START=90
+STOP=10
+USE_PROCD=1
+
+append_arg() {
+       local cfg="$1"
+       local var="$2"
+       local opt="$3"
+       local def="$4"
+       local val
+
+       config_get val "$cfg" "$var"
+       [ -n "$val" -o -n "$def" ] && procd_append_param command $opt "${val:-$def}"
+}
+
+append_bool() {
+       local cfg="$1"
+       local var="$2"
+       local opt="$3"
+       local def="$4"
+       local val
+
+       config_get_bool val "$cfg" "$var" "$def"
+       [ "$val" = 1 ] && procd_append_param command "$opt"
+}
+
+
+start_instance() {
+       local cfg="$1"
+       local aux
+
+       config_get_bool aux "$cfg" 'disabled' '0'
+       [ "$aux" = 1 ] && return 1
+
+       procd_open_instance
+
+       procd_set_param command /usr/bin/rtl_tcp
+       append_arg "$cfg" device_index "-d"
+       append_arg "$cfg" address "-a"
+       append_arg "$cfg" port "-p"
+       append_arg "$cfg" frequency "-f"
+       append_arg "$cfg" gain "-g"
+       append_arg "$cfg" samplerate "-s"
+       append_arg "$cfg" buffers "-b"
+       append_arg "$cfg" num_linked_lists "-n"
+       append_arg "$cfg" ppm_error "-P"
+
+       config_get_bool aux "$cfg" 'respawn' '0'
+       [ "$aux" = 1 ] && procd_set_param respawn
+
+       procd_close_instance
+}
+
+service_triggers() {
+       procd_add_reload_trigger "rtl_tcp"
+}
+
+start_service() {
+       config_load rtl_tcp
+       config_foreach start_instance rtl_tcp
+}
index 1638c60c754a1f0cd6d8ddf2ade84a484deedf42..6598795b16421252fda683454ed4b8eaa4a3a1d8 100644 (file)
@@ -113,7 +113,7 @@ stop() {
                  echo ""
                  dots=0
                fi
-               echo "Timeout occured, killing $NAME hardly."
+               echo "Timeout occurred, killing $NAME hardly."
                kill -9 `ps $PSOPT | grep $NAME | grep -v grep | awk '{print $1}'` >/dev/null 2>&1
                [ -f $PIDFILE ] && rm $PIDFILE
                seconds=0
diff --git a/utils/squashfs-tools/Config.in b/utils/squashfs-tools/Config.in
new file mode 100644 (file)
index 0000000..dcc3c4e
--- /dev/null
@@ -0,0 +1,17 @@
+config SQUASHFS_TOOLS_LZO_SUPPORT
+       depends on PACKAGE_squashfs-tools-mksquashfs || PACKAGE_squashfs-tools-unsquashfs
+       bool "Enable LZO support"
+       select PACKAGE_liblzo
+       default y
+
+config SQUASHFS_TOOLS_LZ4_SUPPORT
+       depends on PACKAGE_squashfs-tools-mksquashfs || PACKAGE_squashfs-tools-unsquashfs
+       bool "Enable LZ4 support"
+       select PACKAGE_liblz4
+       default y
+
+config SQUASHFS_TOOLS_XZ_SUPPORT
+       depends on PACKAGE_squashfs-tools-mksquashfs || PACKAGE_squashfs-tools-unsquashfs
+       bool "Enable XZ support"
+       select PACKAGE_liblzma
+       default y
diff --git a/utils/squashfs-tools/Makefile b/utils/squashfs-tools/Makefile
new file mode 100644 (file)
index 0000000..9da23bc
--- /dev/null
@@ -0,0 +1,86 @@
+# 
+# Copyright (C) 2016 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=squashfs-tools
+PKG_VERSION:=4.3
+PKG_RELEASE:=2
+PKG_LICENSE:=GPL-2.0
+PKG_LICENSE_FILES:=COPYING
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/plougher/squashfs-tools
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE_VERSION:=9c1db6d13a51a2e009f0027ef336ce03624eac0d
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
+
+PKG_BUILD_PARALLEL:=1
+include $(INCLUDE_DIR)/package.mk
+
+define Package/squashfs-tools/Default
+  SECTION:=utils
+  CATEGORY:=Utilities
+  TITLE:=squashfs-tools
+  URL:=https://github.com/plougher/squashfs-tools
+  DEPENDS += +libpthread +zlib \
+       +SQUASHFS_TOOLS_LZO_SUPPORT:liblzo \
+       +SQUASHFS_TOOLS_LZ4_SUPPORT:liblz4 \
+       +SQUASHFS_TOOLS_XZ_SUPPORT:liblzma
+  MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
+endef
+
+define Package/squashfs-tools-mksquashfs
+  $(call Package/squashfs-tools/Default)
+  TITLE+= mksquashfs
+endef
+
+define Package/squashfs-tools-unsquashfs
+  $(call Package/squashfs-tools/Default)
+  TITLE+= unsquashfs
+endef
+
+define Package/squashfs-tools-unsquashfs/config
+       source "$(SOURCE)/Config.in"
+endef
+
+Build/Configure:=
+
+MAKE_FLAGS += \
+       XATTR_SUPPORT=
+
+ifneq ($(CONFIG_SQUASHFS_TOOLS_XZ_SUPPORT),)
+MAKE_FLAGS += XZ_SUPPORT=1
+endif
+
+ifneq ($(CONFIG_SQUASHFS_TOOLS_LZO_SUPPORT),)
+MAKE_FLAGS += LZO_SUPPORT=1
+endif
+
+ifneq ($(CONFIG_SQUASHFS_TOOLS_LZ4_SUPPORT),)
+MAKE_FLAGS += LZ4_SUPPORT=1
+endif
+
+define Build/Compile
+       $(MAKE) -C $(PKG_BUILD_DIR)/squashfs-tools \
+               CC="$(TARGET_CC)" \
+               $(MAKE_FLAGS) \
+               mksquashfs unsquashfs
+endef
+
+define Package/squashfs-tools-mksquashfs/install
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/squashfs-tools/mksquashfs $(1)/usr/sbin/mksquashfs
+endef
+
+define Package/squashfs-tools-unsquashfs/install
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/squashfs-tools/unsquashfs $(1)/usr/sbin/unsquashfs
+endef
+
+$(eval $(call BuildPackage,squashfs-tools-mksquashfs))
+$(eval $(call BuildPackage,squashfs-tools-unsquashfs))
diff --git a/utils/squashfs-tools/patches/0001-squashfs-tools-fix-fnmatch.h-compatibility-with-musl.patch b/utils/squashfs-tools/patches/0001-squashfs-tools-fix-fnmatch.h-compatibility-with-musl.patch
new file mode 100644 (file)
index 0000000..5bfd28d
--- /dev/null
@@ -0,0 +1,120 @@
+From a0c129760ca9bdc7e564ae2a508fac3799f9d39b Mon Sep 17 00:00:00 2001
+From: Alexandru Ardelean <aa@ocedo.com>
+Date: Wed, 6 Jan 2016 15:33:43 +0200
+Subject: [PATCH 1/2] squashfs-tools: with fnmatch.h compatibility with musl
+
+Signed-off-by: Alexandru Ardelean <aa@ocedo.com>
+---
+ squashfs-tools/action.c         |  2 +-
+ squashfs-tools/fnmatch_compat.h | 32 ++++++++++++++++++++++++++++++++
+ squashfs-tools/mksquashfs.c     |  2 +-
+ squashfs-tools/unsquashfs.c     |  1 +
+ squashfs-tools/unsquashfs.h     |  1 -
+ 5 files changed, 35 insertions(+), 3 deletions(-)
+ create mode 100644 squashfs-tools/fnmatch_compat.h
+
+diff --git a/squashfs-tools/action.c b/squashfs-tools/action.c
+index 35889a4..4b06ccb 100644
+--- a/squashfs-tools/action.c
++++ b/squashfs-tools/action.c
+@@ -31,7 +31,6 @@
+ #include <sys/stat.h>
+ #include <sys/types.h>
+ #include <unistd.h>
+-#include <fnmatch.h>
+ #include <pwd.h>
+ #include <grp.h>
+ #include <sys/wait.h>
+@@ -43,6 +42,7 @@
+ #include "mksquashfs.h"
+ #include "action.h"
+ #include "error.h"
++#include "fnmatch_compat.h"
+ /*
+  * code to parse actions
+diff --git a/squashfs-tools/fnmatch_compat.h b/squashfs-tools/fnmatch_compat.h
+new file mode 100644
+index 0000000..7b4afd8
+--- /dev/null
++++ b/squashfs-tools/fnmatch_compat.h
+@@ -0,0 +1,32 @@
++#ifndef FNMATCH_COMPAT
++#define FNMATCH_COMPAT
++/*
++ * Squashfs
++ *
++ * Copyright (c) 2015
++ * Phillip Lougher <phillip@squashfs.org.uk>
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License
++ * as published by the Free Software Foundation; either version 2,
++ * or (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
++ *
++ * fnmatch_compat.h
++ */
++
++#include <fnmatch.h>
++
++#ifndef FNM_EXTMATCH
++#define FNM_EXTMATCH  0
++#endif
++
++#endif
+diff --git a/squashfs-tools/mksquashfs.c b/squashfs-tools/mksquashfs.c
+index d221c35..4e7cbdd 100644
+--- a/squashfs-tools/mksquashfs.c
++++ b/squashfs-tools/mksquashfs.c
+@@ -46,7 +46,6 @@
+ #include <sys/mman.h>
+ #include <pthread.h>
+ #include <regex.h>
+-#include <fnmatch.h>
+ #include <sys/wait.h>
+ #include <limits.h>
+ #include <ctype.h>
+@@ -76,6 +75,7 @@
+ #include "read_fs.h"
+ #include "restore.h"
+ #include "process_fragments.h"
++#include "fnmatch_compat.h"
+ int delete = FALSE;
+ int fd;
+diff --git a/squashfs-tools/unsquashfs.c b/squashfs-tools/unsquashfs.c
+index 1323dd6..2428baa 100644
+--- a/squashfs-tools/unsquashfs.c
++++ b/squashfs-tools/unsquashfs.c
+@@ -30,6 +30,7 @@
+ #include "xattr.h"
+ #include "unsquashfs_info.h"
+ #include "stdarg.h"
++#include "fnmatch_compat.h"
+ #include <sys/sysinfo.h>
+ #include <sys/types.h>
+diff --git a/squashfs-tools/unsquashfs.h b/squashfs-tools/unsquashfs.h
+index ecd0bb4..0edbd25 100644
+--- a/squashfs-tools/unsquashfs.h
++++ b/squashfs-tools/unsquashfs.h
+@@ -40,7 +40,6 @@
+ #include <grp.h>
+ #include <time.h>
+ #include <regex.h>
+-#include <fnmatch.h>
+ #include <signal.h>
+ #include <pthread.h>
+ #include <math.h>
+-- 
+2.1.4
+
diff --git a/utils/squashfs-tools/patches/0002-pseudo.c-add-explicit-stat.h-include.patch b/utils/squashfs-tools/patches/0002-pseudo.c-add-explicit-stat.h-include.patch
new file mode 100644 (file)
index 0000000..8f10211
--- /dev/null
@@ -0,0 +1,25 @@
+From 0ea07a1b5ddb2f2fa1358b2c1b42bcf34bbf5ee2 Mon Sep 17 00:00:00 2001
+From: Alexandru Ardelean <aa@ocedo.com>
+Date: Wed, 6 Jan 2016 15:36:48 +0200
+Subject: [PATCH 2/2] pseudo.c: add explicit <stat.h> include
+
+Signed-off-by: Alexandru Ardelean <aa@ocedo.com>
+---
+ squashfs-tools/pseudo.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/squashfs-tools/pseudo.c b/squashfs-tools/pseudo.c
+index f85fe60..7a26bca 100644
+--- a/squashfs-tools/pseudo.c
++++ b/squashfs-tools/pseudo.c
+@@ -32,6 +32,7 @@
+ #include <stdlib.h>
+ #include <sys/types.h>
+ #include <sys/wait.h>
++#include <sys/stat.h>
+ #include <ctype.h>
+ #include "pseudo.h"
+-- 
+2.1.4
+
diff --git a/utils/squashfs-tools/patches/0003-mksquashfs.c-get-inline-functions-work-with-C99.patch b/utils/squashfs-tools/patches/0003-mksquashfs.c-get-inline-functions-work-with-C99.patch
new file mode 100644 (file)
index 0000000..a5bab05
--- /dev/null
@@ -0,0 +1,154 @@
+From ac6268e843c43286eebff2a1052182c2393cdb2e Mon Sep 17 00:00:00 2001
+From: Roy Li <rongqing.li@windriver.com>
+Date: Mon, 14 Sep 2015 12:31:42 +0800
+Subject: [PATCH] mksquashfs.c:  get inline functions work with both gnu11 and gnu89
+
+Upstream-Status: Pending
+
+After gcc upgraded to gcc5, and if the codes is compiled without optimization(-O0),
+and the below error will happen:
+
+| mksquashfs.o: In function `create_inode':
+| git/squashfs-tools/mksquashfs.c:897: undefined reference to `get_inode_no'
+| git/squashfs-tools/mksquashfs.c:960: undefined reference to `get_parent_no'
+| git/squashfs-tools/mksquashfs.c:983: undefined reference to `get_parent_no'
+| mksquashfs.o: In function `reader_read_process':
+| git/squashfs-tools/mksquashfs.c:2132: undefined reference to `is_fragment'
+| mksquashfs.o: In function `reader_read_file':
+| git/squashfs-tools/mksquashfs.c:2228: undefined reference to `is_fragment'
+| mksquashfs.o: In function `dir_scan':
+| git/squashfs-tools/mksquashfs.c:3101: undefined reference to `create_dir_entry'
+
+gcc5 defaults to -std=gnu11 instead of -std=gnu89, and it requires that exactly one C
+source file has the callable copy of the inline function. Consider the following
+program:
+
+  inline int
+  foo (void)
+  {
+    return 42;
+  }
+
+  int
+  main (void)
+  {
+    return foo ();
+  }
+
+The program above will not link with the C99 inline semantics, because no out-of-line
+function foo is generated. To fix this, either mark the function foo as static, or
+add the following declaration:
+  static inline int foo (void);
+
+more information refer to: https://gcc.gnu.org/gcc-5/porting_to.html;
+
+but the use of "extern inline" will lead to the compilation issue if gcc is not
+gcc5, as the commit in oe-core d0af30c92fde [alsa-lib: Change function type to
+"static __inline__"]
+    "extern __inline__ function()" is the inlined version that
+    can be used in this compilation unit, but there will be another
+    definition of this function somewhere, so compiler will not emit
+    any code for the function body. This causes problem in -O0,
+    where functions are never inlined, the function call is preserved,
+    but linker can't find the symbol, thus the error happens.
+
+so replace "inline" with "static inline" to make it work with both gnu11 and gnu89
+
+Signed-off-by: Roy Li <rongqing.li@windriver.com>
+---
+ squashfs-tools/mksquashfs.c | 20 ++++++++++----------
+ 1 file changed, 10 insertions(+), 10 deletions(-)
+
+diff --git a/squashfs-tools/mksquashfs.c b/squashfs-tools/mksquashfs.c
+index d221c35..6bba1d2 100644
+--- a/squashfs-tools/mksquashfs.c
++++ b/squashfs-tools/mksquashfs.c
+@@ -828,13 +828,13 @@ char *subpathname(struct dir_ent *dir_ent)
+ }
+-inline unsigned int get_inode_no(struct inode_info *inode)
++static inline unsigned int get_inode_no(struct inode_info *inode)
+ {
+       return inode->inode_number;
+ }
+-inline unsigned int get_parent_no(struct dir_info *dir)
++static inline unsigned int get_parent_no(struct dir_info *dir)
+ {
+       return dir->depth ? get_inode_no(dir->dir_ent->inode) : inode_no;
+ }
+@@ -2027,7 +2027,7 @@ struct file_info *duplicate(long long file_size, long long bytes,
+ }
+-inline int is_fragment(struct inode_info *inode)
++static inline int is_fragment(struct inode_info *inode)
+ {
+       off_t file_size = inode->buf.st_size;
+@@ -2996,13 +2996,13 @@ struct inode_info *lookup_inode2(struct stat *buf, int pseudo, int id)
+ }
+-inline struct inode_info *lookup_inode(struct stat *buf)
++static inline struct inode_info *lookup_inode(struct stat *buf)
+ {
+       return lookup_inode2(buf, 0, 0);
+ }
+-inline void alloc_inode_no(struct inode_info *inode, unsigned int use_this)
++static inline void alloc_inode_no(struct inode_info *inode, unsigned int use_this)
+ {
+       if (inode->inode_number == 0) {
+               inode->inode_number = use_this ? : inode_no ++;
+@@ -3013,7 +3013,7 @@ inline void alloc_inode_no(struct inode_info *inode, unsigned int use_this)
+ }
+-inline struct dir_ent *create_dir_entry(char *name, char *source_name,
++static inline struct dir_ent *create_dir_entry(char *name, char *source_name,
+       char *nonstandard_pathname, struct dir_info *dir)
+ {
+       struct dir_ent *dir_ent = malloc(sizeof(struct dir_ent));
+@@ -3031,7 +3031,7 @@ inline struct dir_ent *create_dir_entry(char *name, char *source_name,
+ }
+-inline void add_dir_entry(struct dir_ent *dir_ent, struct dir_info *sub_dir,
++static inline void add_dir_entry(struct dir_ent *dir_ent, struct dir_info *sub_dir,
+       struct inode_info *inode_info)
+ {
+       struct dir_info *dir = dir_ent->our_dir;
+@@ -3047,7 +3047,7 @@ inline void add_dir_entry(struct dir_ent *dir_ent, struct dir_info *sub_dir,
+ }
+-inline void add_dir_entry2(char *name, char *source_name,
++static inline void add_dir_entry2(char *name, char *source_name,
+       char *nonstandard_pathname, struct dir_info *sub_dir,
+       struct inode_info *inode_info, struct dir_info *dir)
+ {
+@@ -3059,7 +3059,7 @@ inline void add_dir_entry2(char *name, char *source_name,
+ }
+-inline void free_dir_entry(struct dir_ent *dir_ent)
++static inline void free_dir_entry(struct dir_ent *dir_ent)
+ {
+       if(dir_ent->name)
+               free(dir_ent->name);
+@@ -3080,7 +3080,7 @@ inline void free_dir_entry(struct dir_ent *dir_ent)
+ }
+-inline void add_excluded(struct dir_info *dir)
++static inline void add_excluded(struct dir_info *dir)
+ {
+       dir->excluded ++;
+ }
+-- 
+1.9.1
+
index 39ac89b5ce8967b8b958872e87c1a3a0502cace3..9a0bc7a3d288cf48864d8c1aaccc1ca52c5a4d26 100644 (file)
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=tracertools
-PKG_VERSION:=20151226
+PKG_VERSION:=20160308
 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://github.com/dangowrt/tracertools.git
-PKG_SOURCE_VERSION:=cc443e28120ab86d0d6e50aad6ac9b1c7596a9ca
+PKG_SOURCE_VERSION:=28d0bb9a10a0b56b4964e3256135cfd152075a59
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
 
index 713ca8ead109f471a28416211d65cea484d5f86b..1b526746bc1c7671cbb89f12dca8f321abccb5b1 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006-2015 OpenWrt.org
+# Copyright (C) 2006-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=unrar
-PKG_VERSION:=5.3.8
+PKG_VERSION:=5.3.11
 PKG_RELEASE:=1
 
 PKG_SOURCE:=unrarsrc-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.rarlab.com/rar
-PKG_MD5SUM:=9aa9643e817187519e358be292185f6f
+PKG_MD5SUM:=4a29cc1b47ced82db11e06090a95ed51
 PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
 
 PKG_LICENSE:=UnRAR
index 239c84b72ed1305bac28bb8a31a581142d62952b..b05563eb55e41ff6709abc5198c682c75d8afb96 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=usbmuxd
 PKG_VERSION:=1.1.1
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 PKG_SOURCE_PROTO:=git
 
 PKG_MAINTAINER:=Lukasz Baj <l.baj@radytek.com>
@@ -18,7 +18,7 @@ PKG_LICENSE_FILES:=COPYING.GPLv2
 
 PKG_SOURCE_URL:=https://github.com/libimobiledevice/usbmuxd.git
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=4bd7cd0d28e7f5920de51470b863f3aeee00409d
+PKG_SOURCE_VERSION:=35e5d48f29ae03b2b9686109e4ed9ab8b9677ce8
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
 
 PKG_FIXUP:=autoreconf
index 7459794423673f7d056e70546380b53779c22090..9160cff0afe8f36fe5eafb86513ef2b887e8bbe2 100644 (file)
@@ -23,7 +23,7 @@ define Package/watchcat
 endef
 
 define Package/watchcat/description
-Allows to configure a periodically reboot, or after loosing internet connectivity. Configured trough UCI /etc/config/system.
+Allows to configure a periodically reboot, or after losing internet connectivity. Configured trough UCI /etc/config/system.
 endef
 
 define Package/watchcat/conffiles
index dcbc7037c150924c087703a7e89648dba7327170..e1ed0687dee5c2bf3cec20c8885a9b431db54a95 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2007-2014 OpenWrt.org
+# Copyright (C) 2007-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=zip
 PKG_REV:=30
 PKG_VERSION:=3.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)$(PKG_REV).tar.gz
 PKG_SOURCE_URL:=@SF/infozip
@@ -48,8 +48,7 @@ define Build/Compile
        $(MAKE) -C $(PKG_BUILD_DIR) -f unix/Makefile generic \
                prefix="$(PKG_INSTALL_DIR)/usr" \
                CFLAGS="$(TARGET_CFLAGS)" \
-               CC="$(TARGET_CC) $(TARGET_CFLAGS) -O $(TARGET_CPPFLAGS) -I. -DUNIX" \
-               LD="$(TARGET_CC) $(TARGET_LDFLAGS)" \
+               CC="$(TARGET_CC) $(TARGET_CFLAGS) -O $(TARGET_CPPFLAGS) -I. -DUNIX $(TARGET_LDFLAGS)" \
                IZ_BZIP2="no" \
                install
 endef
index 09b4f581c6eb3c45bf2a1d81a3dcf8fdc8e263de..3f33f8c4416fd466e131992a0d580e47d4d22d76 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2007-2015 OpenWrt.org
+# Copyright (C) 2007-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -9,8 +9,8 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=zoneinfo
-PKG_VERSION:=2015g
-PKG_VERSION_CODE:=2015g
+PKG_VERSION:=2016c
+PKG_VERSION_CODE:=2016c
 PKG_RELEASE:=1
 
 #As i couldn't find real license used "Public Domain"
@@ -20,14 +20,14 @@ 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:=8d46e8b225b9a04c75f5c39636435ad6
+PKG_MD5SUM:=0330ccd16140d3b6438a18dae9b34b93
 
 include $(INCLUDE_DIR)/package.mk
 
 define Download/tzcode
    FILE=$(PKG_SOURCE_CODE)
    URL=$(PKG_SOURCE_URL)
-   MD5SUM:=a2c47d908a6426f530efb1393cf1cd06
+   MD5SUM:=ffb82ab0b588138759902b4627a6a80d
 endef
 
 $(eval $(call Download,tzcode))