From: RISCi_ATOM Date: Fri, 12 May 2017 19:29:18 +0000 (-0400) Subject: Fresh pull from upstream X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=f116137591c6f17e9b7d9049a6e0fb8808aa455c;p=librecmc%2Fpackage-feed.git Fresh pull from upstream --- diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index 29ba5db..0000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,114 +0,0 @@ -# Contributing Guidelines -(See for overall format and construction) - - -### Basic guidelines - -All packages you commit or submit by pull-request should follow these simple guidelines: -* Package a version which is still maintained by the upstream author. -* Will be updated regularly to maintained and supported versions. -* Have no dependencies outside the OpenWrt core packages or this repository feed. -* Have been tested to compile with the correct includes and dependencies. Please also test with "Compile with full language support" found under "General Build Settings" set if language support is relevant to your package. -* Do NOT use a rolling source file (e.g. foo-latest.tar.gz) or the head of a branch as source for the package since that would create unpredictable builds which change over time. -* Best of all -- it works as expected! - -#### Makefile contents should contain: - -* An up-to-date copyright notice. Use OpenWrt if no other present or supply your own. -* A (PKG_)MAINTAINER definition listing either yourself or another person in the field. - (E.g.: PKG_MAINTAINER:= Joe D. Hacker `) -* A PKG_LICENSE tag declaring the main license of the package. - (E.g.: PKG_LICENSE:=GPL-2.0+) Please use SPDX identifiers if possible (see list at the bottom). -* An optional PKG_LICENSE_FILES tag including the filenames of the license-files in the source-package. - (E.g.: PKG_LICENSE_FILES:=COPYING) -* PKG_RELEASE should be initially set to 1 or reset to 1 if the software version is changed. You should increment it if the package itself has changed. For example, modifying a support script, changing configure options like --disable* or --enable* switches, or if you changed something in the package which causes the resulting binaries to be different. Changes like correcting md5sums, changing mirror URLs, adding a maintainer field or updating a comment or copyright year in a Makefile do not require a change to PKG_RELEASE. - -#### Commits in your pull-requests should: - -* Have a useful description prefixed with the package name - (E.g.: "foopkg: Add libzot dependency") -* Include Signed-off-by in the comment - (See ) - -### Advice on pull requests: - -Pull requests are the easiest way to contribute changes to git repos at Github. They are the preferred contribution method, as they offer a nice way for commenting and amending the proposed changes. - -* You need a local "fork" of the Github repo. -* Use a "feature branch" for your changes. That separates the changes in the pull request from your other changes and makes it easy to edit/amend commits in the pull request. Workflow using "feature_x" as the example: - - Update your local git fork to the tip (of the master, usually) - - Create the feature branch with `git checkout -b feature_x` - - Edit changes and commit them locally - - Push them to your Github fork by `git push -u origin feature_x`. That creates the "feature_x" branch at your Github fork and sets it as the remote of this branch - - When you now visit Github, you should see a proposal to create a pull request - -* If you later need to add new commits to the pull request, you can simply commit the changes to the local branch and then use `git push` to automatically update the pull request. - -* If you need to change something in the existing pull request (e.g. to add a missing signed-off-by line to the commit message), you can use `git push -f` to overwrite the original commits. That is easy and safe when using a feature branch. Example workflow: - - Checkout the feature branch by `git checkout feature_x` - - Edit changes and commit them locally. If you are just updating the commit message in the last commit, you can use `git commit --amend` to do that - - If you added several new commits or made other changes that require cleaning up, you can use `git rebase -i HEAD~X` (X = number of commits to edit) to possibly squash some commits - - Push the changed commits to Github with `git push -f` to overwrite the original commits in the "feature_x" branch with the new ones. The pull request gets automatically updated - -### If you have commit access: - -* Do NOT use git push --force. -* Do NOT commit to other maintainer's packages without their consent. -* Use Pull Requests if you are unsure and to suggest changes to other maintainers. - -#### Gaining commit access: - -* We will gladly grant commit access to responsible contributors who have made - useful pull requests and / or feedback or patches to this repository or - OpenWrt in general. Please include your request for commit access in your - next pull request or ticket. - -### Release Branches: - -* Branches named "for-XX.YY" (e.g. for-14.07) are release branches. -* These branches are built with the respective OpenWrt release and are created - during the release stabilisation phase. -* Please ONLY cherry-pick or commit security and bug-fixes to these branches. -* Do NOT add new packages and do NOT do major upgrades of packages here. -* If you are unsure if your change is suitable, please use a pull request. - -### Common LICENSE tags (short list) -(Complete list can be found at: ) - -| Full Name | Identifier | -|---|:---| -|Apache License 1.0|Apache-1.0| -|Apache License 1.1|Apache-1.1| -|Apache License 2.0|Apache-2.0| -|Artistic License 1.0|Artistic-1.0| -|Artistic License 1.0 (Perl)|Artistic-1.0-Perl| -|Artistic License 1.0 w/clause 8|Artistic-1.0-cl8| -|Artistic License 2.0|Artistic-2.0| -|BSD 2-clause "Simplified" License|BSD-2-Clause| -|BSD 2-clause FreeBSD License|BSD-2-Clause-FreeBSD| -|BSD 2-clause NetBSD License|BSD-2-Clause-NetBSD| -|BSD 3-clause "New" or "Revised" License|BSD-3-Clause| -|BSD 3-clause Clear License|BSD-3-Clause-Clear| -|BSD 4-clause "Original" or "Old" License|BSD-4-Clause| -|BSD Protection License|BSD-Protection| -|BSD with attribution|BSD-3-Clause-Attribution| -|BSD-4-Clause (University of California-Specific)|BSD-4-Clause-UC| -|GNU General Public License v1.0 only|GPL-1.0| -|GNU General Public License v1.0 or later|GPL-1.0+| -|GNU General Public License v2.0 only|GPL-2.0| -|GNU General Public License v2.0 or later|GPL-2.0+| -|GNU General Public License v3.0 only|GPL-3.0| -|GNU General Public License v3.0 or later|GPL-3.0+| -|GNU Lesser General Public License v2.1 only|LGPL-2.1| -|GNU Lesser General Public License v2.1 or later|LGPL-2.1+| -|GNU Lesser General Public License v3.0 only|LGPL-3.0| -|GNU Lesser General Public License v3.0 or later|LGPL-3.0+| -|GNU Library General Public License v2 only|LGPL-2.0| -|GNU Library General Public License v2 or later|LGPL-2.0+| -|Fair License|Fair| -|ISC License|ISC| -|MIT License|MIT| -|No Limit Public License|NLPL| -|OpenSSL License|OpenSSL| -|X11 License|X11| -|zlib License|Zlib| diff --git a/admin/debootstrap/Makefile b/admin/debootstrap/Makefile index a7d45c2..72d2c5b 100644 --- a/admin/debootstrap/Makefile +++ b/admin/debootstrap/Makefile @@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=debootstrap -PKG_VERSION:=1.0.83 +PKG_VERSION:=1.0.87 PKG_RELEASE:=1 PKG_MAINTAINER:=Daniel Golle PKG_SOURCE:=$(PKG_NAME)-udeb_$(PKG_VERSION)_all.udeb PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/d/debootstrap -PKG_MD5SUM:=877fe5281a0e424bd6c71d121cbb725b8f56694e66558cd47c20c3aa87ceff72 +PKG_MD5SUM:=784f5754f3287ae80715d9100a4ed04e7895be5f7b81b7b2295d335dd69d79fb PKG_LICENSE:=Unique PKG_LICENSE_FILES:=debian/copyright diff --git a/admin/openwisp-config/Makefile b/admin/openwisp-config/Makefile new file mode 100644 index 0000000..ed539b0 --- /dev/null +++ b/admin/openwisp-config/Makefile @@ -0,0 +1,119 @@ +# openwisp.org +# +# This is free software, licensed under the GNU General Public License v3. +# See /LICENSE for more information. +include $(TOPDIR)/rules.mk + +PKG_NAME:=openwisp-config +PKG_VERSION:=0.4.5 +PKG_RELEASE:=1 + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE_PROTO:=git +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_SOURCE_URL:=https://github.com/openwisp/openwisp-config.git +PKG_SOURCE_VERSION:=0.4.5 +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION) +PKG_MIRROR_HASH:=017a8ed35ebfda2805426e7da02559d5cc2845ee9ded60fdae8e848d377424fb +PKG_LICENSE:=GPL-3.0 +PKGARCH:=all + +include $(INCLUDE_DIR)/package.mk + +define Package/openwisp-config/default + TITLE:=Remote configuration management agent ($(2) variant) + CATEGORY:=Administration + SECTION:=admin + SUBMENU:=openwisp + DEPENDS:=+curl +lua +libuci-lua +luafilesystem $(3) + VARIANT:=$(1) + MAINTAINER:=Federico Capoano + URL:=http://openwisp.org +endef + +Package/openwisp-config-openssl=$(call Package/openwisp-config/default,openssl,OpenSSL,+ca-certificates +libopenssl) +Package/openwisp-config-mbedtls=$(call Package/openwisp-config/default,mbedtls,mbedTLS,+ca-certificates +libmbedtls) +Package/openwisp-config-cyassl=$(call Package/openwisp-config/default,cyassl,CyaSSL,+ca-certificates +libcyassl) +# deprecated on recent versions of OpenWRT (>= Designated Driver) and LEDE (>= 17.01) +Package/openwisp-config-polarssl=$(call Package/openwisp-config/default,polarssl,PolarSSL,+ca-certificates +libpolarssl) +Package/openwisp-config-nossl=$(call Package/openwisp-config/default,nossl,No SSL) + +define Build/Compile +endef + +define Package/openwisp-config-$(BUILD_VARIANT)/conffiles +/etc/config/openwisp +endef + +ifeq ($(BUILD_VARIANT),openssl) +CONFIG_OPENWISP_UCI:=ssl +endif +ifeq ($(BUILD_VARIANT),mbedtls) +CONFIG_OPENWISP_UCI:=ssl +endif +ifeq ($(BUILD_VARIANT),cyassl) +CONFIG_OPENWISP_UCI:=ssl +endif +ifeq ($(BUILD_VARIANT),polarssl) +CONFIG_OPENWISP_UCI:=ssl +endif +ifeq ($(BUILD_VARIANT),nossl) +CONFIG_OPENWISP_UCI:=nossl +endif + + +define Package/openwisp-config-$(BUILD_VARIANT)/install + $(INSTALL_DIR) \ + $(1)/usr/sbin \ + $(1)/etc/init.d \ + $(1)/etc/config \ + $(1)/etc/openwisp \ + $(1)/usr/lib/lua/openwisp + + $(INSTALL_BIN) \ + $(PKG_BUILD_DIR)/openwisp-config/files/openwisp.agent \ + $(1)/usr/sbin/openwisp_config + + $(INSTALL_BIN) \ + $(PKG_BUILD_DIR)/openwisp-config/files/openwisp.init \ + $(1)/etc/init.d/openwisp_config + + $(INSTALL_CONF) $(PKG_BUILD_DIR)/openwisp-config/files/openwisp-$(CONFIG_OPENWISP_UCI).config \ + $(1)/etc/config/openwisp + + $(INSTALL_BIN) \ + $(PKG_BUILD_DIR)/openwisp-config/files/sbin/openwisp-reload-config \ + $(1)/usr/sbin/openwisp-reload-config + + $(INSTALL_BIN) \ + $(PKG_BUILD_DIR)/openwisp-config/files/lib/openwisp/utils.lua \ + $(1)/usr/lib/lua/openwisp/utils.lua + + $(INSTALL_BIN) \ + $(PKG_BUILD_DIR)/openwisp-config/files/sbin/openwisp-store-unmanaged.lua \ + $(1)/usr/sbin/openwisp-store-unmanaged + + $(INSTALL_BIN) \ + $(PKG_BUILD_DIR)/openwisp-config/files/sbin/openwisp-restore-unmanaged.lua \ + $(1)/usr/sbin/openwisp-restore-unmanaged + + $(INSTALL_BIN) \ + $(PKG_BUILD_DIR)/openwisp-config/files/sbin/openwisp-remove-default-wifi.lua \ + $(1)/usr/sbin/openwisp-remove-default-wifi + + $(INSTALL_BIN) \ + $(PKG_BUILD_DIR)/openwisp-config/files/sbin/openwisp-uci-autoname.lua \ + $(1)/usr/sbin/openwisp-uci-autoname + + $(INSTALL_BIN) \ + $(PKG_BUILD_DIR)/openwisp-config/files/sbin/openwisp-update-config.lua \ + $(1)/usr/sbin/openwisp-update-config + + $(CP) $(PKG_BUILD_DIR)/VERSION $(1)/etc/openwisp/ +endef + +$(eval $(call BuildPackage,openwisp-config-openssl)) +$(eval $(call BuildPackage,openwisp-config-mbedtls)) +$(eval $(call BuildPackage,openwisp-config-cyassl)) +$(eval $(call BuildPackage,openwisp-config-polarssl)) +$(eval $(call BuildPackage,openwisp-config-nossl)) diff --git a/admin/sudo/Makefile b/admin/sudo/Makefile index 0555161..e9090ee 100644 --- a/admin/sudo/Makefile +++ b/admin/sudo/Makefile @@ -64,8 +64,8 @@ define Host/Compile endef define Host/Install - $(INSTALL_DIR) $(HOST_BUILD_PREFIX)/bin - $(CP) $(HOST_BUILD_DIR)/lib/util/mksig{list,name} $(HOST_BUILD_PREFIX)/bin/ + $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/bin + $(CP) $(HOST_BUILD_DIR)/lib/util/mksig{list,name} $(STAGING_DIR_HOSTPKG)/bin/ endef $(eval $(call HostBuild)) diff --git a/admin/syslog-ng/Makefile b/admin/syslog-ng/Makefile new file mode 100644 index 0000000..0486164 --- /dev/null +++ b/admin/syslog-ng/Makefile @@ -0,0 +1,76 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=syslog-ng +PKG_VERSION:=3.8.1 +PKG_RELEASE:=3 + +PKG_MAINTAINER:=W. Michael Petullo + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://github.com/balabit/syslog-ng/releases/download/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_MD5SUM:=acf14563cf5ce435db8db35486ce66af + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk + +define Package/syslog-ng + SECTION:=admin + CATEGORY:=Administration + DEPENDS:=+libpcre +glib2 +libeventlog +libopenssl +libuuid +libcurl + TITLE:=A powerful syslog daemon + URL:=http://www.balabit.com/network-security/syslog-ng/opensource-logging-system/ +endef + +define Package/syslog-ng/description + syslog-ng reads and logs messages to the system console, log + files, other machines and/or users as specified by its + configuration file. +endef + +define Package/syslog-ng/conffiles + /etc/syslog-ng.conf +endef + +define Build/Configure + $(SED) 's,-I/usr/include,,' $(PKG_BUILD_DIR)/configure + $(Build/Configure/Default) +endef + +CONFIGURE_ARGS += \ + $(call autoconf_bool,CONFIG_IPV6,ipv6) \ + --disable-dependency-tracking \ + --disable-ampq \ + --disable-tcp-wrapper \ + --disable-glibtest \ + --disable-mongodb \ + --disable-java \ + --disable-json \ + --disable-python \ + --disable-spoof-source \ + --disable-sql \ + --disable-linux-caps \ + --disable-smtp \ + --disable-redis \ + --enable-prce \ + +TARGET_CPPFLAGS += \ + -I$(STAGING_DIR)/usr/include/eventlog + +CONFIGURE_VARS += \ + LIBDBI_CFLAGS="-I$(STAGING_DIR)/usr/include" + +define Package/syslog-ng/install + $(INSTALL_DIR) $(1)/usr/lib + $(MAKE) -C $(PKG_BUILD_DIR) \ + install-sbinPROGRAMS install-libLTLIBRARIES \ + install-moduleLTLIBRARIES DESTDIR="$(1)" + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/syslog-ng.init $(1)/etc/init.d/syslog-ng + $(INSTALL_DIR) $(1)/etc + $(INSTALL_DATA) ./files/syslog-ng.conf $(1)/etc + $(call libtool_remove_files,$(1)) +endef + +$(eval $(call BuildPackage,syslog-ng)) diff --git a/admin/syslog-ng/files/syslog-ng.conf b/admin/syslog-ng/files/syslog-ng.conf new file mode 100644 index 0000000..6786bc3 --- /dev/null +++ b/admin/syslog-ng/files/syslog-ng.conf @@ -0,0 +1,37 @@ +@version:3.8 + +options { + chain_hostnames(no); + create_dirs(yes); + flush_lines(0); + keep_hostname(yes); + log_fifo_size(256); + log_msg_size(1024); + stats_freq(0); + flush_lines(0); + use_fqdn(no); +}; + +source src { + internal(); + unix-stream("/dev/log"); +}; + +source net { + udp(ip(0.0.0.0) port(514)); +}; + +source kernel { + file("/proc/kmsg" program_override("kernel")); +}; + +destination messages { + file("/var/log/messages"); +}; + +log { + source(src); + source(net); + source(kernel); + destination(messages); +}; diff --git a/admin/syslog-ng/files/syslog-ng.init b/admin/syslog-ng/files/syslog-ng.init new file mode 100644 index 0000000..cecb3f9 --- /dev/null +++ b/admin/syslog-ng/files/syslog-ng.init @@ -0,0 +1,19 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006-2016 OpenWrt.org + +START=20 + +SERVICE_USE_PID=1 + +start() { + [ -f /etc/syslog-ng.conf ] || return 1 + service_start /usr/sbin/syslog-ng +} + +stop() { + service_stop /usr/sbin/syslog-ng +} + +reload() { + service_reload /usr/sbin/syslog-ng +} diff --git a/kernel/exfat-nofuse/Makefile b/kernel/exfat-nofuse/Makefile deleted file mode 100644 index 694ad1e..0000000 --- a/kernel/exfat-nofuse/Makefile +++ /dev/null @@ -1,51 +0,0 @@ -# -# Copyright (C) 2014 Bruno Randolf -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk -include $(INCLUDE_DIR)/kernel.mk - -PKG_NAME:=exfat-nofuse -PKG_VERSION=2016-09-26-$(PKG_SOURCE_VERSION) -PKG_RELEASE:=1 - -PKG_SOURCE=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://github.com/dorimanx/exfat-nofuse.git -PKG_SOURCE_PROTO:=git -PKG_SOURCE_SUBDIR=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=051167ceccbe75d9d77fc4f5356f5a39a01779e8 - -PKG_MAINTAINER:=Bruno Randolf -PKG_LICENSE:=GPL-2.0 -PKG_LICENSE_FILES:=LICENSE - -include $(INCLUDE_DIR)/package.mk - -define KernelPackage/fs-exfat - SUBMENU:=Filesystems - TITLE:=ExFAT Kernel driver - FILES:=$(PKG_BUILD_DIR)/exfat.ko - AUTOLOAD:=$(call AutoLoad,30,exfat,1) - DEPENDS:=+kmod-nls-base @BUILD_PATENTED -endef - -define KernelPackage/fs-exfat/description - Kernel module for ExFAT Filesytems -endef - -MAKE_OPTS:= \ - ARCH="$(LINUX_KARCH)" \ - CROSS_COMPILE="$(TARGET_CROSS)" \ - M="$(PKG_BUILD_DIR)" - -define Build/Compile - $(MAKE) -C "$(LINUX_DIR)" \ - $(MAKE_OPTS) \ - CONFIG_EXFAT_FS=m \ - modules -endef - -$(eval $(call KernelPackage,fs-exfat)) diff --git a/lang/lua-bencode/Makefile b/lang/lua-bencode/Makefile index 0b32056..a7b898b 100644 --- a/lang/lua-bencode/Makefile +++ b/lang/lua-bencode/Makefile @@ -11,11 +11,10 @@ PKG_NAME:=lua-bencode PKG_VERSION:=2.1.0 PKG_RELEASE:=1 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_URL:=https://bitbucket.org/wilhelmy/lua-bencode -PKG_SOURCE_PROTO:=hg -PKG_SOURCE_VERSION:=500243383cb6acbddd3cf12aee6e4667aab53324 +PKG_SOURCE_URL:=https://bitbucket.org/wilhelmy/lua-bencode/downloads/ +PKG_HASH:=4624f33ff026bc62990a323ee4953e42d68430c38a1a4726c9cfd77c085b1422 PKG_LICENSE:=MIT include $(INCLUDE_DIR)/package.mk diff --git a/lang/lualanes/Makefile b/lang/lualanes/Makefile index 6161290..749709d 100644 --- a/lang/lualanes/Makefile +++ b/lang/lualanes/Makefile @@ -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_HOSTPKG)/bin/lua" \ + LUAC="$(STAGING_DIR_HOSTPKG)/bin/luac" \ OPT_FLAGS="$(TARGET_CFLAGS) --std=c99 -Dpthread_yield=sched_yield" endef diff --git a/lang/luarocks/Makefile b/lang/luarocks/Makefile index 7519f8f..73dbde7 100644 --- a/lang/luarocks/Makefile +++ b/lang/luarocks/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luarocks PKG_VERSION:=2.2.2 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_PROTO:=git @@ -41,7 +41,11 @@ endef CONFIGURE_ARGS = \ --prefix=$(CONFIGURE_PREFIX) \ --sysconfdir=/etc \ - --with-lua=$(STAGING_DIR)/host + --with-lua=$(STAGING_DIR_HOSTPKG) + +CONFIGURE_VARS = \ + LUAROCKS_UNAME_S="Linux" \ + LUAROCKS_UNAME_M="$(ARCH)" define Build/Compile $(call Build/Compile/Default,build) diff --git a/lang/luarocks/patches/02_allow_configure_uname_siteconfig_adjustment.patch b/lang/luarocks/patches/02_allow_configure_uname_siteconfig_adjustment.patch new file mode 100644 index 0000000..5c9c968 --- /dev/null +++ b/lang/luarocks/patches/02_allow_configure_uname_siteconfig_adjustment.patch @@ -0,0 +1,37 @@ +Index: luarocks-2.2.2/configure +=================================================================== +--- luarocks-2.2.2.orig/configure ++++ luarocks-2.2.2/configure +@@ -388,18 +388,22 @@ then + fi + + echo_n "Configuring for system... " +-if uname -s +-then +- LUAROCKS_UNAME_S=`uname -s` +-else +- die "Could not determine operating system. 'uname -s' failed." ++if [ -z "$LUAROCKS_UNAME_S" ]; then ++ if uname -s ++ then ++ LUAROCKS_UNAME_S=`uname -s` ++ else ++ die "Could not determine operating system. 'uname -s' failed." ++ fi + fi + echo_n "Configuring for architecture... " +-if uname -m +-then +- LUAROCKS_UNAME_M=`uname -m` +-else +- die "Could not determine processor architecture. 'uname -m' failed." ++if [ -z "$LUAROCKS_UNAME_M" ]; then ++ if uname -m ++ then ++ LUAROCKS_UNAME_M=`uname -m` ++ else ++ die "Could not determine processor architecture. 'uname -m' failed." ++ fi + fi + + for v in 5.1 5.2 5.3; do diff --git a/lang/node/Makefile b/lang/node/Makefile index 6cb1e20..3a1a2f3 100644 --- a/lang/node/Makefile +++ b/lang/node/Makefile @@ -72,7 +72,7 @@ HOST_CONFIGURE_VARS:= HOST_CONFIGURE_ARGS:= \ --dest-os=linux \ --without-snapshot \ - --prefix=$(HOST_BUILD_PREFIX) + --prefix=$(STAGING_DIR_HOSTPKG) HOST_CONFIGURE_CMD:=python ./configure diff --git a/lang/perl-cgi/Makefile b/lang/perl-cgi/Makefile index afecaa0..eaca425 100644 --- a/lang/perl-cgi/Makefile +++ b/lang/perl-cgi/Makefile @@ -8,18 +8,22 @@ include $(TOPDIR)/rules.mk PKG_NAME:=perl-cgi -PKG_VERSION:=4.28 -PKG_RELEASE:=1 +PKG_VERSION:=4.35 +PKG_RELEASE:=2 PKG_SOURCE_URL:=http://www.cpan.org/authors/id/L/LE/LEEJO PKG_SOURCE:=CGI-$(PKG_VERSION).tar.gz -PKG_MD5SUM:=28efb391377f6e98c19c23292d5fcc8c +PKG_MD5SUM:=15e63942c02354426b25f056f2a4467c PKG_LICENSE:=GPL Artistic-2.0 -PKG_MAINTAINER:=Marcel Denia +PKG_MAINTAINER:=Marcel Denia , \ + Philip Prindeville PKG_BUILD_DIR:=$(BUILD_DIR)/perl/CGI-$(PKG_VERSION) +# don't strip comments because that will mangle this module +PKG_LEAVE_COMMENTS:=1 + include $(INCLUDE_DIR)/package.mk include ../perl/perlmod.mk diff --git a/lang/perl-www-curl/Makefile b/lang/perl-www-curl/Makefile new file mode 100644 index 0000000..1e424cb --- /dev/null +++ b/lang/perl-www-curl/Makefile @@ -0,0 +1,49 @@ +# +# Copyright (C) 2014 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=perl-www-curl +PKG_VERSION:=4.17 +PKG_RELEASE:=4 + +PKG_SOURCE_URL:=http://www.cpan.org/authors/id/S/SZ/SZBALINT/ +PKG_SOURCE:=WWW-Curl-$(PKG_VERSION).tar.gz +PKG_MD5SUM:=997ac81cd6b03b30b36f7cd930474845 + +PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl +PKG_LICENSE_FILES:=LICENSE +PKG_MAINTAINER:=Marcel Denia + +PKG_BUILD_DIR:=$(BUILD_DIR)/perl/WWW-Curl-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk +include ../perl/perlmod.mk + +define Package/perl-www-curl + SUBMENU:=Perl + SECTION:=lang + CATEGORY:=Languages + TITLE:=Perl bindings to libcurl + URL:=http://search.cpan.org/dist/WWW-Curl/ + DEPENDS:=perl +libcurl +perlbase-essential +perlbase-xsloader +endef + +define Build/Configure + $(call perlmod/Configure,$(STAGING_DIR)/usr/include,) +endef + +define Build/Compile + $(call perlmod/Compile,,) +endef + +define Package/perl-www-curl/install + $(call perlmod/Install,$(1),WWW/Curl WWW/Curl.pm auto/WWW/Curl) +endef + + +$(eval $(call BuildPackage,perl-www-curl)) diff --git a/lang/perl-www-curl/patches/100-perl-www-curl_disable_curl-config_hack.patch b/lang/perl-www-curl/patches/100-perl-www-curl_disable_curl-config_hack.patch new file mode 100644 index 0000000..568b65c --- /dev/null +++ b/lang/perl-www-curl/patches/100-perl-www-curl_disable_curl-config_hack.patch @@ -0,0 +1,74 @@ +--- a/Makefile.PL ++++ b/Makefile.PL +@@ -12,31 +12,31 @@ no_index directory => 'template'; + repository 'http://github.com/szbalint/WWW--Curl'; + # This is a hack. If you have libcurl installed, just specify curl.h below + # and comment out this line. +-if ($^O ne 'MSWin32') { +- if (!$ENV{CURL_CONFIG}) { +- requires_external_bin 'curl-config'; +- } +-} else { +- print "Sorry, no automated install is available on Windows,\n". +- "please see the README.Win32 file on instructions for a manual install.\n"; +- exit(0); +-} +- +-my $curl_config = $ENV{CURL_CONFIG} || 'curl-config'; +- +-my $vernum = `${curl_config} --vernum`; chomp $vernum; +-my $version = `${curl_config} --version`; chomp $version; +- +-my $minimum_ver = hex("070a08"); +- +-if ($vernum && hex($vernum) <= $minimum_ver) { +- print "Your currently installed libcurl version - $version - is too old.\n". +- "This module doesn't seek compatibility with versions older than 7.10.8\n". +- "Proceed manually if you know what you're doing.\n"; +- exit(0); +-} +- +-print "The version is $version\n"; ++#if ($^O ne 'MSWin32') { ++# if (!$ENV{CURL_CONFIG}) { ++# requires_external_bin 'curl-config'; ++# } ++#} else { ++# print "Sorry, no automated install is available on Windows,\n". ++# "please see the README.Win32 file on instructions for a manual install.\n"; ++# exit(0); ++#} ++# ++#my $curl_config = $ENV{CURL_CONFIG} || 'curl-config'; ++# ++#my $vernum = `${curl_config} --vernum`; chomp $vernum; ++#my $version = `${curl_config} --version`; chomp $version; ++# ++#my $minimum_ver = hex("070a08"); ++# ++#if ($vernum && hex($vernum) <= $minimum_ver) { ++# print "Your currently installed libcurl version - $version - is too old.\n". ++# "This module doesn't seek compatibility with versions older than 7.10.8\n". ++# "Proceed manually if you know what you're doing.\n"; ++# exit(0); ++#} ++# ++#print "The version is $version\n"; + + my @includes = qw(); + my ($cflags,$lflags, $ldflags) = ('','',''); +@@ -58,10 +58,10 @@ if ($^O ne 'MSWin32') { + # Get curl to tell us where it is, if we can. + # + +-if ($^O ne 'MSWin32') { +- $cflags = `${curl_config} --cflags`; +- $lflags = `${curl_config} --libs`; +-} ++#if ($^O ne 'MSWin32') { ++# $cflags = `${curl_config} --cflags`; ++# $lflags = `${curl_config} --libs`; ++#} + + # can't find link flags, make some guesses + if (!defined($lflags)) { diff --git a/lang/perl-www-curl/patches/101-skip-preprocessor-symbol.path b/lang/perl-www-curl/patches/101-skip-preprocessor-symbol.path new file mode 100644 index 0000000..34221c0 --- /dev/null +++ b/lang/perl-www-curl/patches/101-skip-preprocessor-symbol.path @@ -0,0 +1,34 @@ +From 0be0223422e6e5f4091c6e4e058d213623eed105 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Mon, 12 Sep 2016 14:40:44 +0200 +Subject: [PATCH] Skip preprocessor symbol only CURL_STRICTER +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +CURL_STRICTER leaked into curl-constants.c when building against +curl-7.50.2. This is a preprocessor only macro without a value. + +CPAN RT#117793 + +Signed-off-by: Petr Písař +--- + Makefile.PL | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile.PL b/Makefile.PL +index f9170bb..ad2bd3d 100644 +--- a/Makefile.PL ++++ b/Makefile.PL +@@ -127,7 +127,7 @@ if (!defined($curl_h)) { + close H; + + for my $e (sort @syms) { +- if($e =~ /(OBSOLETE|^CURL_EXTERN|_LAST\z|_LASTENTRY\z)/) { ++ if($e =~ /(OBSOLETE|^CURL_EXTERN|^CURL_STRICTER\z|_LAST\z|_LASTENTRY\z)/) { + next; + } + my ($group) = $e =~ m/^([^_]+_)/; +-- +2.7.4 + diff --git a/lang/perl-www-curl/patches/200-fix_default_lflags.patch b/lang/perl-www-curl/patches/200-fix_default_lflags.patch new file mode 100644 index 0000000..f51eaf5 --- /dev/null +++ b/lang/perl-www-curl/patches/200-fix_default_lflags.patch @@ -0,0 +1,11 @@ +--- a/Makefile.PL ++++ b/Makefile.PL +@@ -39,7 +39,7 @@ repository 'http://github.com/szbalint/ + #print "The version is $version\n"; + + my @includes = qw(); +-my ($cflags,$lflags, $ldflags) = ('','',''); ++my ($cflags,$lflags, $ldflags) = ('','-lcurl',''); + + # You may need to specify where to find curl.h on your platform + # These are guesses only, in case curl-config is not telling us. diff --git a/lang/perl-xml-parser/Makefile b/lang/perl-xml-parser/Makefile index e5d3b2c..57977c1 100644 --- a/lang/perl-xml-parser/Makefile +++ b/lang/perl-xml-parser/Makefile @@ -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_HOSTPKG)/lib +HOST_EXPAT_INCPATH=$(STAGING_DIR_HOSTPKG)/include include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/host-build.mk diff --git a/lang/perl/Config.in b/lang/perl/Config.in index 14aedc2..65a3a47 100644 --- a/lang/perl/Config.in +++ b/lang/perl/Config.in @@ -17,4 +17,15 @@ config PERL_TESTS Test support is still in development. Some tests will fail, others are just missing completely. +config PERL_NOCOMMENT + bool "Strip comments and pod sections from modules" + default y + help + Remove comments and pod sections for all perl packages. + + This will descrease the size of perl libraries moderately. + + Stripping occasionally gets confused and mangles valid code, + so disable this option if you're not pressed for space. + endmenu diff --git a/lang/perl/Makefile b/lang/perl/Makefile index 7c7f10d..d3cb081 100644 --- a/lang/perl/Makefile +++ b/lang/perl/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=perl PKG_VERSION:=5.22.1 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_SOURCE_URL:=ftp://ftp.cpan.org/pub/CPAN/src/5.0 \ http://www.cpan.org/src/5.0 \ @@ -24,7 +24,8 @@ PKG_MD5SUM:=19295bbb775a3c36123161b9bf4892f1 PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl PKG_LICENSE_FILES:=Copying Artistic README -PKG_MAINTAINER:=Marcel Denia +PKG_MAINTAINER:=Marcel Denia , \ + Philip Prindeville # Build settings PKG_BUILD_DIR:=$(BUILD_DIR)/perl/$(PKG_NAME)-$(PKG_VERSION) @@ -35,7 +36,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_HOSTPKG)/usr # Filter -g3, it will break Compress-Raw-Zlib TARGET_CFLAGS_PERL:=$(patsubst -g3,-g,$(TARGET_CFLAGS)) diff --git a/lang/perl/perlmod.mk b/lang/perl/perlmod.mk index c64942f..be56608 100644 --- a/lang/perl/perlmod.mk +++ b/lang/perl/perlmod.mk @@ -4,12 +4,12 @@ PERL_VERSION:=5.22 # Build environment -HOST_PERL_PREFIX:=$(STAGING_DIR)/host/usr +HOST_PERL_PREFIX:=$(STAGING_DIR_HOSTPKG)/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_HOSTPKG)/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_HOSTPKG)/usr/bin/perl endef define perlmod/host/Configure @@ -129,9 +129,7 @@ define perlmod/Install/NoStrip endef -define perlmod/Install - $(call perlmod/Install/NoStrip,$(1),$(2),$(3)) - +define perlmod/_DoStrip @echo "---> Stripping modules in: $(strip $(1))$(PERL_SITELIB)" find $(strip $(1))$(PERL_SITELIB) -name \*.pm -or -name \*.pl | \ xargs -r sed -i \ @@ -141,6 +139,12 @@ define perlmod/Install -e '/^#[^!"'"'"']/d' endef +define perlmod/Install + $(call perlmod/Install/NoStrip,$(1),$(2),$(3)) + + $(if $(CONFIG_PERL_NOCOMMENT),$(if $(PKG_LEAVE_COMMENTS),,$(call perlmod/_DoStrip,$(1),$(2),$(3)))) +endef + # You probably don't want to use this directly. Look at perlmod/InstallTests define perlmod/_InstallTests $(INSTALL_DIR) $(strip $(1)) diff --git a/lang/php7-pecl-dio/Makefile b/lang/php7-pecl-dio/Makefile index bcf32a1..9c1d52e 100644 --- a/lang/php7-pecl-dio/Makefile +++ b/lang/php7-pecl-dio/Makefile @@ -8,9 +8,9 @@ include $(TOPDIR)/rules.mk PECL_NAME:=dio PECL_LONGNAME:=Direct I/O functions -PKG_VERSION:=0.0.7 -PKG_RELEASE:=2 -PKG_MD5SUM:=a1a4df428a17dbe1ab4277b492dfa052 +PKG_VERSION:=0.0.9 +PKG_RELEASE:=1 +PKG_MD5SUM:=2c80b63fbbbaead856cb468955c14dc328d1262621b0c704b122d902053c8156 PKG_NAME:=php7-pecl-$(PECL_NAME) PKG_SOURCE:=$(PECL_NAME)-$(PKG_VERSION).tgz diff --git a/lang/php7-pecl-dio/patches/0000-unify-line-endings.patch b/lang/php7-pecl-dio/patches/0000-unify-line-endings.patch deleted file mode 100644 index b6c2750..0000000 --- a/lang/php7-pecl-dio/patches/0000-unify-line-endings.patch +++ /dev/null @@ -1,3110 +0,0 @@ ---- a/dio_posix.c -+++ b/dio_posix.c -@@ -1,659 +1,659 @@ --/* -- +----------------------------------------------------------------------+ -- | PHP Version 5 | -- +----------------------------------------------------------------------+ -- | Copyright (c) 2009 Melanie Rhianna Lewis | -- +----------------------------------------------------------------------+ -- | This source file is subject to version 3.0 of the PHP license, | -- | that is bundled with this package in the file LICENSE, and is | -- | available through the world-wide-web at the following url: | -- | http://www.php.net/license/3_0.txt. | -- | If you did not receive a copy of the PHP license and are unable to | -- | obtain it through the world-wide-web, please send a note to | -- | license@php.net so we can mail you a copy immediately. | -- +----------------------------------------------------------------------+ -- | Author: Melanie Rhianna Lewis | -- +----------------------------------------------------------------------+ -- */ -- --#ifdef HAVE_CONFIG_H --#include "config.h" --#endif -- --#include "php.h" -- --#include "php_dio_common.h" -- --/* {{{ dio_stream_mode_to_flags -- * Convert an fopen() mode string to open() flags -- */ --static int dio_stream_mode_to_flags(const char *mode) { -- int flags = 0, ch = 0, bin = 1; -- -- switch(mode[ch++]) { -- case 'r': -- flags = 0; -- break; -- case 'w': -- flags = O_TRUNC | O_CREAT; -- break; -- case 'a': -- flags = O_APPEND | O_CREAT; -- break; -- case 'x': -- flags = O_EXCL | O_CREAT; -- break; -- } -- -- if (mode[ch] != '+') { -- bin = (mode[ch++] == 'b'); -- } -- -- if (mode[ch] == '+') { -- flags |= O_RDWR; -- } else if (flags) { -- flags |= O_WRONLY; -- } else { -- flags |= O_RDONLY; -- } -- --#if defined(_O_TEXT) && defined(O_BINARY) -- if (bin) { -- flags |= O_BINARY; -- } else { -- flags |= _O_TEXT; -- } --#endif -- -- return flags; --} --/* }}} */ -- --/* {{{ dio_data_rate_to_define -- * Converts a numeric data rate to a termios define -- */ --static int dio_data_rate_to_define(long rate, speed_t *def) { -- speed_t val; -- -- switch (rate) { -- case 0: -- val = 0; -- break; -- case 50: -- val = B50; -- break; -- case 75: -- val = B75; -- break; -- case 110: -- val = B110; -- break; -- case 134: -- val = B134; -- break; -- case 150: -- val = B150; -- break; -- case 200: -- val = B200; -- break; -- case 300: -- val = B300; -- break; -- case 600: -- val = B600; -- break; -- case 1200: -- val = B1200; -- break; -- case 1800: -- val = B1800; -- break; -- case 2400: -- val = B2400; -- break; -- case 4800: -- val = B4800; -- break; -- case 9600: -- val = B9600; -- break; -- case 19200: -- val = B19200; -- break; -- case 38400: -- val = B38400; -- break; --#ifdef B57600 -- case 57600: -- val = B57600; -- break; --#endif --#ifdef B115200 -- case 115200: -- val = B115200; -- break; --#endif --#ifdef B230400 -- case 230400: -- val = B230400; -- break; --#endif --#ifdef B460800 -- case 460800: -- val = B460800; -- break; --#endif -- default: -- return 0; -- } -- -- *def = val; -- return 1; --} -- --/* {{{ dio_data_bits_to_define -- * Converts a number of data bits to a termios define -- */ --static int dio_data_bits_to_define(int data_bits, int *def) { -- int val; -- -- switch (data_bits) { -- case 8: -- val = CS8; -- break; -- case 7: -- val = CS7; -- break; -- case 6: -- val = CS6; -- break; -- case 5: -- val = CS5; -- break; -- default: -- return 0; -- } -- -- *def = val; -- return 1; --} --/* }}} */ -- --/* {{{ dio_stop_bits_to_define -- * Converts a number of stop bits to a termios define -- */ --static int dio_stop_bits_to_define(int stop_bits, int *def) { -- int val; -- -- switch (stop_bits) { -- case 1: -- val = 0; -- break; -- case 2: -- val = CSTOPB; -- break; -- default: -- return 0; -- } -- -- *def = val; -- return 1; --} --/* }}} */ -- --/* {{{ dio_parity_to_define -- * Converts a parity type to a termios define -- */ --static int dio_parity_to_define(int parity, int *def) { -- int val; -- -- switch (parity) { -- case 0: -- val = 0; -- break; -- case 1: -- val = PARENB | PARODD; -- break; -- case 2: -- val = PARENB; -- break; -- default: -- return 0; -- } -- -- *def = val; -- return 1; --} --/* }}} */ -- --/* {{{ dio_create_stream_data -- * Creates an initialised stream data structure. Free with efree(). -- */ --php_dio_stream_data * dio_create_stream_data(void) { -- php_dio_posix_stream_data * data = emalloc(sizeof(php_dio_posix_stream_data)); -- dio_init_stream_data(&(data->common)); -- data->fd = -1; -- data->flags = 0; -- -- return (php_dio_stream_data *)data; --} --/* }}} */ -- --/* {{{ dio_common_write -- * Writes count chars from the buffer to the stream described by the stream data. -- */ --size_t dio_common_write(php_dio_stream_data *data, const char *buf, size_t count) { -- size_t ret; -- -- /* Blocking writes can be interrupted by signals etc. If -- * interrupted try again. Not sure about non-blocking -- * writes but it doesn't hurt to check. */ -- do { -- ret = write(((php_dio_posix_stream_data*)data)->fd, buf, count); -- if (ret > 0) { -- return ret; -- } -- } while (errno == EINTR); -- return 0; --} --/* }}} */ -- --#ifdef DIO_NONBLOCK --/* {{{ dio_timeval_subtract -- * Calculates the difference between two timevals returning the result in the -- * structure pointed to by diffptr. Returns -1 as error if late time is -- * earlier than early time. -- */ --static int dio_timeval_subtract(struct timeval *late, struct timeval *early, struct timeval *diff) { -- struct timeval *tmp; -- -- /* Handle negatives */ -- if (late->tv_sec < early->tv_sec) { -- return 0; -- } -- -- if ((late->tv_sec == early->tv_sec) && (late->tv_usec < early->tv_usec)) { -- return 0; -- } -- -- /* Handle any carry. If later usec is smaller than earlier usec simple -- * subtraction will result in negative value. Since usec has a maximum -- * of one second by adding another second before the subtraction the -- * result will always be positive. */ -- if (late->tv_usec < early->tv_usec) { -- late->tv_usec += 1000000; -- late->tv_sec--; -- } -- -- /* Once adjusted can just subtract values. */ -- diff->tv_sec = late->tv_sec - early->tv_sec; -- diff->tv_usec = late->tv_usec - early->tv_usec; -- -- return 1; --} --#endif -- --/* {{{ dio_common_read -- * Reads count chars to the buffer to the stream described by the stream data. -- */ --size_t dio_common_read(php_dio_stream_data *data, const char *buf, size_t count) { -- int fd = ((php_dio_posix_stream_data*)data)->fd; -- size_t ret, total = 0; -- char *ptr = (char*)buf; -- -- struct timeval timeout, timeouttmp, before, after, diff; -- fd_set rfds; -- -- if (!data->has_timeout) { -- /* Blocking reads can be interrupted by signals etc. If -- * interrupted try again. Not sure about non-blocking -- * reads but it doesn't hurt to check. */ -- do { -- ret = read(fd, (char*)ptr, count); -- if (ret > 0) { -- return ret; -- } else if (!ret) { -- data->end_of_file = 1; -- } -- } while ((errno == EINTR) && !data->end_of_file); -- return 0; -- } --#ifdef DIO_NONBLOCK -- else { -- /* Clear timed out flag */ -- data->timed_out = 0; -- -- /* The initial timeout value */ -- timeout.tv_sec = data->timeout_sec; -- timeout.tv_usec = data->timeout_usec; -- -- do { -- /* The semantics of select() are that you cannot guarantee -- * that the timeval structure passed in has not been changed by -- * the select call. So you keep a copy. */ -- timeouttmp = timeout; -- -- /* The time before we wait for data. */ -- (void) gettimeofday(&before, NULL); -- -- /* Wait for an event on our file descriptor. */ -- FD_ZERO(&rfds); -- FD_SET(fd, &rfds); -- -- ret = select(fd + 1, &rfds, NULL, NULL, &timeouttmp); -- /* An error. */ -- if ((ret < 0) && (errno != EINTR) && (errno != EAGAIN)) { -- return 0; -- } -- -- /* We have data to read. */ -- if ((ret > 0) && FD_ISSET(fd, &rfds)) { -- ret = read(fd, ptr, count); -- /* Another error */ -- if ((ret < 0) && (errno != EINTR) && (errno != EAGAIN)) { -- return 0; -- } -- -- if (ret > 0) { -- /* Got data, add it to the buffer. */ -- ptr += ret; -- total += ret; -- count -= ret; -- } else if (!ret) { -- /* This should never happen since how can we have -- * data to read at an end of file, but still -- * just in case! */ -- data->end_of_file = 1; -- break; -- } -- } -- -- /* If not timed out and not end of file and not all data read -- * calculate how long it took us and loop if we still have time -- * out time left. */ -- if (count) { -- (void) gettimeofday(&after, NULL); -- -- /* Diff the timevals */ -- (void) dio_timeval_subtract(&after, &before, &diff); -- -- /* Now adjust the timeout. */ -- if (!dio_timeval_subtract(&timeout, &diff, &timeout)) { -- /* If it errors we've run out of time. */ -- data->timed_out = 1; -- break; -- } else if (!timeout.tv_sec && !(timeout.tv_usec / 1000)) { -- /* Check for rounding issues (millisecond accuracy) */ -- data->timed_out = 1; -- break; -- } -- } -- } while (count); /* Until time out or end of file or all data read. */ -- -- return total; -- } --#endif --} --/* }}} */ -- --/* {{{ php_dio_stream_data -- * Closes the php_stream. -- */ --int dio_common_close(php_dio_stream_data *data) { -- if (close(((php_dio_posix_stream_data*)data)->fd) < 0) { -- return 0; -- } -- -- return 1; --} --/* }}} */ -- --/* {{{ dio_common_set_option -- * Sets/gets stream options -- */ --int dio_common_set_option(php_dio_stream_data *data, int option, int value, void *ptrparam) { -- int fd = ((php_dio_posix_stream_data*)data)->fd; -- int old_is_blocking; -- int flags; -- -- switch (option) { --#ifdef DIO_NONBLOCK -- case PHP_STREAM_OPTION_READ_TIMEOUT: -- if (ptrparam) { -- struct timeval *tv = (struct timeval*)ptrparam; -- -- flags = fcntl(fd, F_GETFL, 0); -- -- /* A timeout of zero seconds and zero microseconds disables -- any existing timeout. */ -- if (tv->tv_sec || tv->tv_usec) { -- data->timeout_sec = tv->tv_sec; -- data->timeout_usec = tv->tv_usec; -- data->has_timeout = -1; -- (void) fcntl(fd, F_SETFL, flags & ~DIO_NONBLOCK); -- } else { -- data->timeout_sec = 0; -- data->timeout_usec = 0; -- data->has_timeout = 0; -- data->timed_out = 0; -- (void) fcntl(fd, F_SETFL, flags | DIO_NONBLOCK); -- } -- -- return PHP_STREAM_OPTION_RETURN_OK; -- } else { -- return PHP_STREAM_OPTION_RETURN_ERR; -- } -- -- case PHP_STREAM_OPTION_BLOCKING: -- flags = fcntl(fd, F_GETFL, 0); -- if (value) { -- flags &= ~DIO_NONBLOCK; -- } else { -- flags |= DIO_NONBLOCK; -- } -- (void) fcntl(fd, F_SETFL, flags); -- -- old_is_blocking = data->is_blocking; -- data->is_blocking = value; -- return old_is_blocking ? PHP_STREAM_OPTION_RETURN_OK : PHP_STREAM_OPTION_RETURN_ERR; --#endif /* O_NONBLOCK */ -- -- default: -- break; -- } -- -- return 1; --} --/* }}} */ -- --/* {{{ dio_raw_open_stream -- * Opens the underlying stream. -- */ --int dio_raw_open_stream(char *filename, char *mode, php_dio_stream_data *data TSRMLS_DC) { -- php_dio_posix_stream_data *pdata = (php_dio_posix_stream_data*)data; -- pdata->flags = dio_stream_mode_to_flags(mode); -- --#ifdef DIO_NONBLOCK -- if (!data->is_blocking || data->has_timeout) { -- pdata->flags |= DIO_NONBLOCK; -- } --#endif -- -- /* Open the file and handle any errors. */ --#ifdef DIO_HAS_FILEPERMS -- if (data->has_perms) { -- pdata->fd = open(filename, pdata->flags, (mode_t)data->perms); -- } else { -- pdata->fd = open(filename, pdata->flags); -- } --#else -- pdata->fd = open(filename, pdata->flags); --#endif -- -- if (pdata->fd < 0) { -- switch (errno) { -- case EEXIST: -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "File exists!"); -- return 0; -- default: -- return 0; -- } -- } -- -- return 1; --} --/* }}} */ -- --/* {{{ dio_serial_init -- * Initialises the serial settings storing the original settings before hand. -- */ --static int dio_serial_init(php_dio_stream_data *data TSRMLS_DC) { -- php_dio_posix_stream_data *pdata = (php_dio_posix_stream_data*)data; -- int ret = 0, data_bits_def, stop_bits_def, parity_def; -- struct termios tio; -- speed_t rate_def; -- -- if (!dio_data_rate_to_define(data->data_rate, &rate_def)) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid data_rate value (%ld)", data->data_rate); -- return 0; -- } -- -- if (!dio_data_bits_to_define(data->data_bits, &data_bits_def)) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid data_bits value (%d)", data->data_bits); -- return 0; -- } -- -- if (!dio_stop_bits_to_define(data->stop_bits, &stop_bits_def)) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid stop_bits value (%d)", data->stop_bits); -- return 0; -- } -- -- if (!dio_parity_to_define(data->parity, &parity_def)) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid parity value (%d)", data->parity); -- return 0; -- } -- -- ret = tcgetattr(pdata->fd, &(pdata->oldtio)); -- if (ret < 0) { -- if ((errno == ENOTTY) || (errno == ENODEV)) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Not a serial port or terminal!"); -- } -- return 0; -- } -- -- ret = tcgetattr(pdata->fd, &tio); -- if (ret < 0) { -- return 0; -- } -- -- if (data->canonical) { -- tio.c_iflag = IGNPAR | ICRNL; -- tio.c_oflag = 0; -- tio.c_lflag = ICANON; -- } else { -- cfmakeraw(&tio); -- } -- -- cfsetispeed(&tio, rate_def); -- cfsetospeed(&tio, rate_def); -- -- tio.c_cflag &= ~CSIZE; -- tio.c_cflag |= data_bits_def; -- tio.c_cflag &= ~CSTOPB; -- tio.c_cflag |= stop_bits_def; -- tio.c_cflag &= ~(PARENB|PARODD); -- tio.c_cflag |= parity_def; -- --#ifdef CRTSCTS -- tio.c_cflag &= ~(CLOCAL | CRTSCTS); --#else -- tio.c_cflag &= ~CLOCAL; --#endif -- if (!data->flow_control) { -- tio.c_cflag |= CLOCAL; --#ifdef CRTSCTS -- } else { -- tio.c_cflag |= CRTSCTS; --#endif -- } -- -- ret = tcsetattr(pdata->fd, TCSANOW, &tio); -- if (ret < 0) { -- return 0; -- } -- -- return 1; --} --/* }}} */ -- --/* {{{ dio_serial_uninit -- * Restores the serial settings back to their original state. -- */ --int dio_serial_uninit(php_dio_stream_data *data) { -- php_dio_posix_stream_data *pdata = (php_dio_posix_stream_data*)data; -- int ret; -- -- do { -- ret = tcsetattr(pdata->fd, TCSANOW, &(pdata->oldtio)); -- } while ((ret < 0) && (errno == EINTR)); -- -- return 1; --} --/* }}} */ -- --/* {{{ dio_serial_flush -- * Purges the serial buffers of data. -- */ --int dio_serial_purge(php_dio_stream_data *data) { -- php_dio_posix_stream_data *pdata = (php_dio_posix_stream_data*)data; -- int ret; -- -- if ((pdata->flags & O_RDWR) == O_RDWR) { -- ret = tcflush(pdata->fd, TCIOFLUSH); -- } else if ((pdata->flags & O_WRONLY) == O_WRONLY) { -- ret = tcflush(pdata->fd, TCOFLUSH); -- } else if ((pdata->flags & O_RDONLY) == O_RDONLY) { -- ret = tcflush(pdata->fd, TCIFLUSH); -- } -- -- if (ret < 0) { -- return 0; -- } -- -- return 1; --} --/* }}} */ -- --/* {{{ dio_serial_open_stream -- * Opens the underlying stream. -- */ --int dio_serial_open_stream(char *filename, char *mode, php_dio_stream_data *data TSRMLS_DC) { -- php_dio_posix_stream_data *pdata = (php_dio_posix_stream_data*)data; -- --#ifdef O_NOCTTY -- /* We don't want a controlling TTY */ -- pdata->flags |= O_NOCTTY; --#endif -- -- if (!dio_raw_open_stream(filename, mode, data TSRMLS_CC)) { -- return 0; -- } -- -- if (!dio_serial_init(data TSRMLS_CC)) { -- close(pdata->fd); -- return 0; -- } -- -- return 1; --} --/* }}} */ -- --/* -- * Local variables: -- * c-basic-offset: 4 -- * tab-width: 4 -- * End: -- * vim600: fdm=marker -- * vim: sw=4 ts=4 noet -- */ -+/* -+ +----------------------------------------------------------------------+ -+ | PHP Version 5 | -+ +----------------------------------------------------------------------+ -+ | Copyright (c) 2009 Melanie Rhianna Lewis | -+ +----------------------------------------------------------------------+ -+ | This source file is subject to version 3.0 of the PHP license, | -+ | that is bundled with this package in the file LICENSE, and is | -+ | available through the world-wide-web at the following url: | -+ | http://www.php.net/license/3_0.txt. | -+ | If you did not receive a copy of the PHP license and are unable to | -+ | obtain it through the world-wide-web, please send a note to | -+ | license@php.net so we can mail you a copy immediately. | -+ +----------------------------------------------------------------------+ -+ | Author: Melanie Rhianna Lewis | -+ +----------------------------------------------------------------------+ -+ */ -+ -+#ifdef HAVE_CONFIG_H -+#include "config.h" -+#endif -+ -+#include "php.h" -+ -+#include "php_dio_common.h" -+ -+/* {{{ dio_stream_mode_to_flags -+ * Convert an fopen() mode string to open() flags -+ */ -+static int dio_stream_mode_to_flags(const char *mode) { -+ int flags = 0, ch = 0, bin = 1; -+ -+ switch(mode[ch++]) { -+ case 'r': -+ flags = 0; -+ break; -+ case 'w': -+ flags = O_TRUNC | O_CREAT; -+ break; -+ case 'a': -+ flags = O_APPEND | O_CREAT; -+ break; -+ case 'x': -+ flags = O_EXCL | O_CREAT; -+ break; -+ } -+ -+ if (mode[ch] != '+') { -+ bin = (mode[ch++] == 'b'); -+ } -+ -+ if (mode[ch] == '+') { -+ flags |= O_RDWR; -+ } else if (flags) { -+ flags |= O_WRONLY; -+ } else { -+ flags |= O_RDONLY; -+ } -+ -+#if defined(_O_TEXT) && defined(O_BINARY) -+ if (bin) { -+ flags |= O_BINARY; -+ } else { -+ flags |= _O_TEXT; -+ } -+#endif -+ -+ return flags; -+} -+/* }}} */ -+ -+/* {{{ dio_data_rate_to_define -+ * Converts a numeric data rate to a termios define -+ */ -+static int dio_data_rate_to_define(long rate, speed_t *def) { -+ speed_t val; -+ -+ switch (rate) { -+ case 0: -+ val = 0; -+ break; -+ case 50: -+ val = B50; -+ break; -+ case 75: -+ val = B75; -+ break; -+ case 110: -+ val = B110; -+ break; -+ case 134: -+ val = B134; -+ break; -+ case 150: -+ val = B150; -+ break; -+ case 200: -+ val = B200; -+ break; -+ case 300: -+ val = B300; -+ break; -+ case 600: -+ val = B600; -+ break; -+ case 1200: -+ val = B1200; -+ break; -+ case 1800: -+ val = B1800; -+ break; -+ case 2400: -+ val = B2400; -+ break; -+ case 4800: -+ val = B4800; -+ break; -+ case 9600: -+ val = B9600; -+ break; -+ case 19200: -+ val = B19200; -+ break; -+ case 38400: -+ val = B38400; -+ break; -+#ifdef B57600 -+ case 57600: -+ val = B57600; -+ break; -+#endif -+#ifdef B115200 -+ case 115200: -+ val = B115200; -+ break; -+#endif -+#ifdef B230400 -+ case 230400: -+ val = B230400; -+ break; -+#endif -+#ifdef B460800 -+ case 460800: -+ val = B460800; -+ break; -+#endif -+ default: -+ return 0; -+ } -+ -+ *def = val; -+ return 1; -+} -+ -+/* {{{ dio_data_bits_to_define -+ * Converts a number of data bits to a termios define -+ */ -+static int dio_data_bits_to_define(int data_bits, int *def) { -+ int val; -+ -+ switch (data_bits) { -+ case 8: -+ val = CS8; -+ break; -+ case 7: -+ val = CS7; -+ break; -+ case 6: -+ val = CS6; -+ break; -+ case 5: -+ val = CS5; -+ break; -+ default: -+ return 0; -+ } -+ -+ *def = val; -+ return 1; -+} -+/* }}} */ -+ -+/* {{{ dio_stop_bits_to_define -+ * Converts a number of stop bits to a termios define -+ */ -+static int dio_stop_bits_to_define(int stop_bits, int *def) { -+ int val; -+ -+ switch (stop_bits) { -+ case 1: -+ val = 0; -+ break; -+ case 2: -+ val = CSTOPB; -+ break; -+ default: -+ return 0; -+ } -+ -+ *def = val; -+ return 1; -+} -+/* }}} */ -+ -+/* {{{ dio_parity_to_define -+ * Converts a parity type to a termios define -+ */ -+static int dio_parity_to_define(int parity, int *def) { -+ int val; -+ -+ switch (parity) { -+ case 0: -+ val = 0; -+ break; -+ case 1: -+ val = PARENB | PARODD; -+ break; -+ case 2: -+ val = PARENB; -+ break; -+ default: -+ return 0; -+ } -+ -+ *def = val; -+ return 1; -+} -+/* }}} */ -+ -+/* {{{ dio_create_stream_data -+ * Creates an initialised stream data structure. Free with efree(). -+ */ -+php_dio_stream_data * dio_create_stream_data(void) { -+ php_dio_posix_stream_data * data = emalloc(sizeof(php_dio_posix_stream_data)); -+ dio_init_stream_data(&(data->common)); -+ data->fd = -1; -+ data->flags = 0; -+ -+ return (php_dio_stream_data *)data; -+} -+/* }}} */ -+ -+/* {{{ dio_common_write -+ * Writes count chars from the buffer to the stream described by the stream data. -+ */ -+size_t dio_common_write(php_dio_stream_data *data, const char *buf, size_t count) { -+ size_t ret; -+ -+ /* Blocking writes can be interrupted by signals etc. If -+ * interrupted try again. Not sure about non-blocking -+ * writes but it doesn't hurt to check. */ -+ do { -+ ret = write(((php_dio_posix_stream_data*)data)->fd, buf, count); -+ if (ret > 0) { -+ return ret; -+ } -+ } while (errno == EINTR); -+ return 0; -+} -+/* }}} */ -+ -+#ifdef DIO_NONBLOCK -+/* {{{ dio_timeval_subtract -+ * Calculates the difference between two timevals returning the result in the -+ * structure pointed to by diffptr. Returns -1 as error if late time is -+ * earlier than early time. -+ */ -+static int dio_timeval_subtract(struct timeval *late, struct timeval *early, struct timeval *diff) { -+ struct timeval *tmp; -+ -+ /* Handle negatives */ -+ if (late->tv_sec < early->tv_sec) { -+ return 0; -+ } -+ -+ if ((late->tv_sec == early->tv_sec) && (late->tv_usec < early->tv_usec)) { -+ return 0; -+ } -+ -+ /* Handle any carry. If later usec is smaller than earlier usec simple -+ * subtraction will result in negative value. Since usec has a maximum -+ * of one second by adding another second before the subtraction the -+ * result will always be positive. */ -+ if (late->tv_usec < early->tv_usec) { -+ late->tv_usec += 1000000; -+ late->tv_sec--; -+ } -+ -+ /* Once adjusted can just subtract values. */ -+ diff->tv_sec = late->tv_sec - early->tv_sec; -+ diff->tv_usec = late->tv_usec - early->tv_usec; -+ -+ return 1; -+} -+#endif -+ -+/* {{{ dio_common_read -+ * Reads count chars to the buffer to the stream described by the stream data. -+ */ -+size_t dio_common_read(php_dio_stream_data *data, const char *buf, size_t count) { -+ int fd = ((php_dio_posix_stream_data*)data)->fd; -+ size_t ret, total = 0; -+ char *ptr = (char*)buf; -+ -+ struct timeval timeout, timeouttmp, before, after, diff; -+ fd_set rfds; -+ -+ if (!data->has_timeout) { -+ /* Blocking reads can be interrupted by signals etc. If -+ * interrupted try again. Not sure about non-blocking -+ * reads but it doesn't hurt to check. */ -+ do { -+ ret = read(fd, (char*)ptr, count); -+ if (ret > 0) { -+ return ret; -+ } else if (!ret) { -+ data->end_of_file = 1; -+ } -+ } while ((errno == EINTR) && !data->end_of_file); -+ return 0; -+ } -+#ifdef DIO_NONBLOCK -+ else { -+ /* Clear timed out flag */ -+ data->timed_out = 0; -+ -+ /* The initial timeout value */ -+ timeout.tv_sec = data->timeout_sec; -+ timeout.tv_usec = data->timeout_usec; -+ -+ do { -+ /* The semantics of select() are that you cannot guarantee -+ * that the timeval structure passed in has not been changed by -+ * the select call. So you keep a copy. */ -+ timeouttmp = timeout; -+ -+ /* The time before we wait for data. */ -+ (void) gettimeofday(&before, NULL); -+ -+ /* Wait for an event on our file descriptor. */ -+ FD_ZERO(&rfds); -+ FD_SET(fd, &rfds); -+ -+ ret = select(fd + 1, &rfds, NULL, NULL, &timeouttmp); -+ /* An error. */ -+ if ((ret < 0) && (errno != EINTR) && (errno != EAGAIN)) { -+ return 0; -+ } -+ -+ /* We have data to read. */ -+ if ((ret > 0) && FD_ISSET(fd, &rfds)) { -+ ret = read(fd, ptr, count); -+ /* Another error */ -+ if ((ret < 0) && (errno != EINTR) && (errno != EAGAIN)) { -+ return 0; -+ } -+ -+ if (ret > 0) { -+ /* Got data, add it to the buffer. */ -+ ptr += ret; -+ total += ret; -+ count -= ret; -+ } else if (!ret) { -+ /* This should never happen since how can we have -+ * data to read at an end of file, but still -+ * just in case! */ -+ data->end_of_file = 1; -+ break; -+ } -+ } -+ -+ /* If not timed out and not end of file and not all data read -+ * calculate how long it took us and loop if we still have time -+ * out time left. */ -+ if (count) { -+ (void) gettimeofday(&after, NULL); -+ -+ /* Diff the timevals */ -+ (void) dio_timeval_subtract(&after, &before, &diff); -+ -+ /* Now adjust the timeout. */ -+ if (!dio_timeval_subtract(&timeout, &diff, &timeout)) { -+ /* If it errors we've run out of time. */ -+ data->timed_out = 1; -+ break; -+ } else if (!timeout.tv_sec && !(timeout.tv_usec / 1000)) { -+ /* Check for rounding issues (millisecond accuracy) */ -+ data->timed_out = 1; -+ break; -+ } -+ } -+ } while (count); /* Until time out or end of file or all data read. */ -+ -+ return total; -+ } -+#endif -+} -+/* }}} */ -+ -+/* {{{ php_dio_stream_data -+ * Closes the php_stream. -+ */ -+int dio_common_close(php_dio_stream_data *data) { -+ if (close(((php_dio_posix_stream_data*)data)->fd) < 0) { -+ return 0; -+ } -+ -+ return 1; -+} -+/* }}} */ -+ -+/* {{{ dio_common_set_option -+ * Sets/gets stream options -+ */ -+int dio_common_set_option(php_dio_stream_data *data, int option, int value, void *ptrparam) { -+ int fd = ((php_dio_posix_stream_data*)data)->fd; -+ int old_is_blocking; -+ int flags; -+ -+ switch (option) { -+#ifdef DIO_NONBLOCK -+ case PHP_STREAM_OPTION_READ_TIMEOUT: -+ if (ptrparam) { -+ struct timeval *tv = (struct timeval*)ptrparam; -+ -+ flags = fcntl(fd, F_GETFL, 0); -+ -+ /* A timeout of zero seconds and zero microseconds disables -+ any existing timeout. */ -+ if (tv->tv_sec || tv->tv_usec) { -+ data->timeout_sec = tv->tv_sec; -+ data->timeout_usec = tv->tv_usec; -+ data->has_timeout = -1; -+ (void) fcntl(fd, F_SETFL, flags & ~DIO_NONBLOCK); -+ } else { -+ data->timeout_sec = 0; -+ data->timeout_usec = 0; -+ data->has_timeout = 0; -+ data->timed_out = 0; -+ (void) fcntl(fd, F_SETFL, flags | DIO_NONBLOCK); -+ } -+ -+ return PHP_STREAM_OPTION_RETURN_OK; -+ } else { -+ return PHP_STREAM_OPTION_RETURN_ERR; -+ } -+ -+ case PHP_STREAM_OPTION_BLOCKING: -+ flags = fcntl(fd, F_GETFL, 0); -+ if (value) { -+ flags &= ~DIO_NONBLOCK; -+ } else { -+ flags |= DIO_NONBLOCK; -+ } -+ (void) fcntl(fd, F_SETFL, flags); -+ -+ old_is_blocking = data->is_blocking; -+ data->is_blocking = value; -+ return old_is_blocking ? PHP_STREAM_OPTION_RETURN_OK : PHP_STREAM_OPTION_RETURN_ERR; -+#endif /* O_NONBLOCK */ -+ -+ default: -+ break; -+ } -+ -+ return 1; -+} -+/* }}} */ -+ -+/* {{{ dio_raw_open_stream -+ * Opens the underlying stream. -+ */ -+int dio_raw_open_stream(char *filename, char *mode, php_dio_stream_data *data TSRMLS_DC) { -+ php_dio_posix_stream_data *pdata = (php_dio_posix_stream_data*)data; -+ pdata->flags = dio_stream_mode_to_flags(mode); -+ -+#ifdef DIO_NONBLOCK -+ if (!data->is_blocking || data->has_timeout) { -+ pdata->flags |= DIO_NONBLOCK; -+ } -+#endif -+ -+ /* Open the file and handle any errors. */ -+#ifdef DIO_HAS_FILEPERMS -+ if (data->has_perms) { -+ pdata->fd = open(filename, pdata->flags, (mode_t)data->perms); -+ } else { -+ pdata->fd = open(filename, pdata->flags); -+ } -+#else -+ pdata->fd = open(filename, pdata->flags); -+#endif -+ -+ if (pdata->fd < 0) { -+ switch (errno) { -+ case EEXIST: -+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "File exists!"); -+ return 0; -+ default: -+ return 0; -+ } -+ } -+ -+ return 1; -+} -+/* }}} */ -+ -+/* {{{ dio_serial_init -+ * Initialises the serial settings storing the original settings before hand. -+ */ -+static int dio_serial_init(php_dio_stream_data *data TSRMLS_DC) { -+ php_dio_posix_stream_data *pdata = (php_dio_posix_stream_data*)data; -+ int ret = 0, data_bits_def, stop_bits_def, parity_def; -+ struct termios tio; -+ speed_t rate_def; -+ -+ if (!dio_data_rate_to_define(data->data_rate, &rate_def)) { -+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid data_rate value (%ld)", data->data_rate); -+ return 0; -+ } -+ -+ if (!dio_data_bits_to_define(data->data_bits, &data_bits_def)) { -+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid data_bits value (%d)", data->data_bits); -+ return 0; -+ } -+ -+ if (!dio_stop_bits_to_define(data->stop_bits, &stop_bits_def)) { -+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid stop_bits value (%d)", data->stop_bits); -+ return 0; -+ } -+ -+ if (!dio_parity_to_define(data->parity, &parity_def)) { -+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid parity value (%d)", data->parity); -+ return 0; -+ } -+ -+ ret = tcgetattr(pdata->fd, &(pdata->oldtio)); -+ if (ret < 0) { -+ if ((errno == ENOTTY) || (errno == ENODEV)) { -+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Not a serial port or terminal!"); -+ } -+ return 0; -+ } -+ -+ ret = tcgetattr(pdata->fd, &tio); -+ if (ret < 0) { -+ return 0; -+ } -+ -+ if (data->canonical) { -+ tio.c_iflag = IGNPAR | ICRNL; -+ tio.c_oflag = 0; -+ tio.c_lflag = ICANON; -+ } else { -+ cfmakeraw(&tio); -+ } -+ -+ cfsetispeed(&tio, rate_def); -+ cfsetospeed(&tio, rate_def); -+ -+ tio.c_cflag &= ~CSIZE; -+ tio.c_cflag |= data_bits_def; -+ tio.c_cflag &= ~CSTOPB; -+ tio.c_cflag |= stop_bits_def; -+ tio.c_cflag &= ~(PARENB|PARODD); -+ tio.c_cflag |= parity_def; -+ -+#ifdef CRTSCTS -+ tio.c_cflag &= ~(CLOCAL | CRTSCTS); -+#else -+ tio.c_cflag &= ~CLOCAL; -+#endif -+ if (!data->flow_control) { -+ tio.c_cflag |= CLOCAL; -+#ifdef CRTSCTS -+ } else { -+ tio.c_cflag |= CRTSCTS; -+#endif -+ } -+ -+ ret = tcsetattr(pdata->fd, TCSANOW, &tio); -+ if (ret < 0) { -+ return 0; -+ } -+ -+ return 1; -+} -+/* }}} */ -+ -+/* {{{ dio_serial_uninit -+ * Restores the serial settings back to their original state. -+ */ -+int dio_serial_uninit(php_dio_stream_data *data) { -+ php_dio_posix_stream_data *pdata = (php_dio_posix_stream_data*)data; -+ int ret; -+ -+ do { -+ ret = tcsetattr(pdata->fd, TCSANOW, &(pdata->oldtio)); -+ } while ((ret < 0) && (errno == EINTR)); -+ -+ return 1; -+} -+/* }}} */ -+ -+/* {{{ dio_serial_flush -+ * Purges the serial buffers of data. -+ */ -+int dio_serial_purge(php_dio_stream_data *data) { -+ php_dio_posix_stream_data *pdata = (php_dio_posix_stream_data*)data; -+ int ret; -+ -+ if ((pdata->flags & O_RDWR) == O_RDWR) { -+ ret = tcflush(pdata->fd, TCIOFLUSH); -+ } else if ((pdata->flags & O_WRONLY) == O_WRONLY) { -+ ret = tcflush(pdata->fd, TCOFLUSH); -+ } else if ((pdata->flags & O_RDONLY) == O_RDONLY) { -+ ret = tcflush(pdata->fd, TCIFLUSH); -+ } -+ -+ if (ret < 0) { -+ return 0; -+ } -+ -+ return 1; -+} -+/* }}} */ -+ -+/* {{{ dio_serial_open_stream -+ * Opens the underlying stream. -+ */ -+int dio_serial_open_stream(char *filename, char *mode, php_dio_stream_data *data TSRMLS_DC) { -+ php_dio_posix_stream_data *pdata = (php_dio_posix_stream_data*)data; -+ -+#ifdef O_NOCTTY -+ /* We don't want a controlling TTY */ -+ pdata->flags |= O_NOCTTY; -+#endif -+ -+ if (!dio_raw_open_stream(filename, mode, data TSRMLS_CC)) { -+ return 0; -+ } -+ -+ if (!dio_serial_init(data TSRMLS_CC)) { -+ close(pdata->fd); -+ return 0; -+ } -+ -+ return 1; -+} -+/* }}} */ -+ -+/* -+ * Local variables: -+ * c-basic-offset: 4 -+ * tab-width: 4 -+ * End: -+ * vim600: fdm=marker -+ * vim: sw=4 ts=4 noet -+ */ ---- a/dio_win32.c -+++ b/dio_win32.c -@@ -1,759 +1,759 @@ --/* -- +----------------------------------------------------------------------+ -- | PHP Version 5 | -- +----------------------------------------------------------------------+ -- | Copyright (c) 2009 Melanie Rhianna Lewis | -- +----------------------------------------------------------------------+ -- | This source file is subject to version 3.0 of the PHP license, | -- | that is bundled with this package in the file LICENSE, and is | -- | available through the world-wide-web at the following url: | -- | http://www.php.net/license/3_0.txt. | -- | If you did not receive a copy of the PHP license and are unable to | -- | obtain it through the world-wide-web, please send a note to | -- | license@php.net so we can mail you a copy immediately. | -- +----------------------------------------------------------------------+ -- | Author: Melanie Rhianna Lewis | -- +----------------------------------------------------------------------+ -- */ -- --#ifdef HAVE_CONFIG_H --#include "config.h" --#endif -- --#include "php.h" --#include "php_dio_common.h" -- --#ifndef ZEND_WIN32 --#error ZEND_WIN32 not defined! --#endif -- --/* {{{ dio_last_error_php_error -- * Generates a PHP error message based upon the last Windows error. -- */ --static void dio_last_error_php_error(int level, char * message TSRMLS_DC) { -- LPVOID msgbuf; -- DWORD msgbuflen; -- char * errmsg; -- DWORD err; -- --#ifdef UNICODE -- DWORD errmsglen; --#endif -- -- err = GetLastError(); -- msgbuflen = FormatMessage( -- FORMAT_MESSAGE_ALLOCATE_BUFFER| -- FORMAT_MESSAGE_FROM_SYSTEM| -- FORMAT_MESSAGE_IGNORE_INSERTS, -- NULL, -- err, -- MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), -- (LPTSTR)&msgbuf, -- 0, -- NULL); -- --#ifdef UNICODE -- -- /* Get the length of the converted message */ -- errmsglen = WideCharToMultibyte( -- CP_ACP, -- 0 -- (LPCWSTR)msgbuf, -- -1, -- (LPSTR)errmsg, -- 0, -- NULL, -- NULL); -- -- /* Allocate a buffer */ -- errmsg = emalloc(errmsglen); -- if (!errmsg) { -- php_error_docref(NULL TSRMLS_CC, E_ERROR, "Out of memory in dio_last_error_php_error()!"); -- LocalFree(msgbuf); -- return; -- } -- -- /* Convert the message */ -- errmsglen = WideCharToMultibyte( -- CP_ACP, -- 0 -- (LPCWSTR)msgbuf, -- -1, -- (LPSTR)errmsg, -- errmsglen, -- NULL, -- NULL); -- --#else -- errmsg = (char *)msgbuf; --#endif -- -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s[ERROR %d] %s", message, err, errmsg); -- -- LocalFree(msgbuf); --#ifdef UNICODE -- efree(errmsg); --#endif --} -- --/* {{{ dio_data_rate_to_define -- * Converts a numeric data rate to a termios define -- */ --static int dio_data_rate_to_define(long rate, DWORD *def) { -- switch (rate) { -- case 75: -- case 110: -- case 134: -- case 150: -- case 300: -- case 600: -- case 1200: -- case 1800: -- case 2400: -- case 4800: -- case 7200: -- case 9600: -- case 14400: -- case 19200: -- case 38400: -- case 57600: -- case 115200: -- case 56000: -- case 128000: -- case 256000: -- break; -- default: -- return 0; -- } -- -- *def = (DWORD)rate; -- return 1; --} --/* }}} */ -- -- --/* {{{ dio_data_bits_to_define -- * Converts a number of data bits to a termios define -- */ --static int dio_data_bits_to_define(int data_bits, DWORD *def) { -- switch (data_bits) { -- case 8: -- case 7: -- case 6: -- case 5: -- case 4: -- break; -- default: -- return 0; -- } -- -- *def = (DWORD)data_bits; -- return 1; --} --/* }}} */ -- --/* {{{ dio_stop_bits_to_define -- * Converts a number of stop bits to a termios define -- */ --static int dio_stop_bits_to_define(int stop_bits, DWORD *def) { -- DWORD val; -- -- switch (stop_bits) { -- case 1: -- val = ONESTOPBIT; -- break; -- case 2: -- val = TWOSTOPBITS; -- break; -- case 3: -- val = ONE5STOPBITS; -- break; -- default: -- return 0; -- } -- -- *def = val; -- return 1; --} --/* }}} */ -- --/* {{{ dio_parity_to_define -- * Converts a parity type to a termios define -- */ --static int dio_parity_to_define(int parity, DWORD *def) { -- DWORD val; -- -- switch (parity) { -- case 0: -- val = NOPARITY; -- break; -- case 1: -- val = ODDPARITY; -- break; -- case 2: -- val = EVENPARITY; -- break; -- default: -- return 0; -- } -- -- *def = val; -- return 1; --} --/* }}} */ -- --/* {{{ dio_create_stream_data -- * Creates an initialised stream data structure. Free with efree(). -- */ --php_dio_stream_data * dio_create_stream_data(void) { -- php_dio_win32_stream_data * data = emalloc(sizeof(php_dio_win32_stream_data)); -- memset(data, 0, sizeof(php_dio_win32_stream_data)); -- dio_init_stream_data(&(data->common)); -- data->handle = INVALID_HANDLE_VALUE; -- data->desired_access = 0; -- data->creation_disposition = 0; -- data->olddcb.DCBlength = sizeof(DCB); -- -- return (php_dio_stream_data *)data; --} --/* }}} */ -- --/* {{{ dio_common_write -- * Writes count chars from the buffer to the stream described by the stream data. -- */ --size_t dio_common_write(php_dio_stream_data *data, const char *buf, size_t count) { -- php_dio_win32_stream_data *wdata = (php_dio_win32_stream_data*)data; -- DWORD total = 0; -- -- if (WriteFile(wdata->handle, buf, (DWORD)count, &total, NULL)) { -- return (size_t)total; -- } -- -- return 0; --} --/* }}} */ -- --/* {{{ dio_buffer_read -- * Reads any available chars from the canonical buffer. -- */ --static size_t dio_buffer_read(php_dio_win32_stream_data *wdata, const char *buf, size_t count) { -- php_dio_win32_canon_data *canon_data = wdata->canon_data; -- size_t total = 0; -- -- /* Read always follows write. I.e. if read ptr > write ptr buffer has -- wrapped and so we need to copy two blocks of data. */ -- if (canon_data->read_pos > canon_data->write_pos) { -- -- /* Check we actually need to copy both blocks */ -- if ((canon_data->size - canon_data->read_pos) > count) { -- -- /* No we don't. Just copy as much as we were asked for. */ -- memcpy((char*)buf, -- &(canon_data->buf[canon_data->read_pos]), -- count); -- /* Update the read pointer. */ -- canon_data->read_pos += count; -- -- /* Return the amount read. */ -- return count; -- } else { -- -- /* We need to copy both blocks so copy data up to the end of -- the buffer. */ -- total = canon_data->size - canon_data->read_pos; -- memcpy((char*)buf, -- &(canon_data->buf[canon_data->read_pos]), -- total); -- canon_data->read_pos = 0; -- count -= total; -- -- /* Now copy the data from the start of the buffer either up -- count or the number of bytes in the buffer. */ -- -- if (canon_data->write_pos > count) { -- memcpy((char*)buf, canon_data->buf, count); -- canon_data->read_pos = count; -- total += count; -- -- return total; -- } else { -- memcpy((char*)buf, canon_data->buf, canon_data->write_pos); -- canon_data->read_pos = canon_data->write_pos; -- total += canon_data->write_pos; -- -- return total; -- } -- } -- -- /* Else if write follows read. This is a simpler case. We just copy -- either all the data buffered or count, which ever is smaller. */ -- } else if (canon_data->write_pos > canon_data->read_pos) { -- if ((canon_data->write_pos - canon_data->read_pos) > count) { -- memcpy((char*)buf, -- &(canon_data->buf[canon_data->read_pos]), -- count); -- canon_data->read_pos += count; -- -- return count; -- } else { -- total = canon_data->write_pos - canon_data->read_pos; -- memcpy((char*)buf, -- &(canon_data->buf[canon_data->read_pos]), -- total); -- canon_data->read_pos += total; -- -- return total; -- } -- } -- -- /* Else we need to read more data from the data port. */ -- return 0; --} -- --/* {{{ dio_com_read -- * Read chars from the data port. -- */ --static size_t dio_com_read(php_dio_stream_data *data, const char *buf, size_t count) { -- php_dio_win32_stream_data *wdata = (php_dio_win32_stream_data*)data; -- DWORD err, total = 0; -- -- if (ReadFile(wdata->handle, (void*)buf, (DWORD)count, &total, NULL)) { -- -- if (total) { -- return (size_t)total; -- } -- -- data->end_of_file = 1; -- } -- -- if (!data->end_of_file) { -- err = GetLastError(); -- -- if (ERROR_HANDLE_EOF == err) { -- data->end_of_file = 1; -- } -- } -- -- return 0; --} -- --/* {{{ dio_canonical_read -- * Reads chars from the input stream until the internal buffer is full or a new -- * line is reached. -- */ --static size_t dio_canonical_read(php_dio_win32_stream_data *wdata, const char *buf, size_t count) { -- php_dio_win32_canon_data *canon_data = wdata->canon_data; -- size_t total = 0; -- char ch; -- -- /* See if there's any buffered data and copy it. */ -- total = dio_buffer_read(wdata, buf, count); -- if (total) { -- return total; -- } -- -- /* Need to read more data from the data port. Buffer should be empty(er) -- by now. */ -- do { -- /* Is the buffer full? */ -- if (((canon_data->write_pos + 1) % canon_data->size) == -- canon_data->read_pos) { -- break; -- } -- -- /* Read a byte from the input checking for EOF. */ -- if (!dio_com_read((php_dio_stream_data*)wdata, &ch, 1)) { -- break; -- } -- -- /* Translate CR to newlines (same as ICRNL in POSIX) */ -- ch = (ch != '\r') ? ch : '\n'; -- -- /* We read a character! So buffer it. */ -- canon_data->buf[canon_data->write_pos++] = ch; -- if (canon_data->write_pos >= canon_data->size) { -- canon_data->write_pos = 0; -- } -- -- /* End of line/input (^D)? */ -- } while ((ch != '\n') && (ch != 0x04)); -- -- return dio_buffer_read(wdata, buf, count); --} --/* }}} */ -- --/* {{{ dio_common_read -- * Reads count chars to the buffer to the stream described by the stream data. -- */ --size_t dio_common_read(php_dio_stream_data *data, const char *buf, size_t count) { -- -- /* You ask for no bytes you'll get none :-) */ -- if (!count) { -- return 0; -- } -- -- if (data->canonical) { -- return dio_canonical_read((php_dio_win32_stream_data*)data, buf, count); -- } else { -- return dio_com_read(data, buf, count); -- } --} --/* }}} */ -- --/* {{{ php_dio_stream_data -- * Closes the php_stream. -- */ --int dio_common_close(php_dio_stream_data *data) { -- php_dio_win32_stream_data *wdata = (php_dio_win32_stream_data*)data; -- -- if (data->canonical) { -- efree(wdata->canon_data); -- } -- -- if (!CloseHandle(wdata->handle)) { -- return 0; -- } -- -- return 1; --} --/* }}} */ -- --/* {{{ dio_common_set_option -- * Sets/gets stream options -- */ --int dio_common_set_option(php_dio_stream_data *data, int option, int value, void *ptrparam) { -- COMMTIMEOUTS cto = { 0, 0, 0, 0, 0 }; -- int old_is_blocking = 0; -- -- /* Can't do timeouts or non blocking with raw windows streams :-( */ -- if (DIO_STREAM_TYPE_SERIAL == data->stream_type) { -- switch (option) { -- case PHP_STREAM_OPTION_BLOCKING: -- old_is_blocking = data->is_blocking; -- data->is_blocking = value ? 1 : 0; -- -- /* Only change values if we need to change them. */ -- if (data->is_blocking != old_is_blocking) { -- /* If we're not blocking but don't have a timeout -- set to return immediately */ -- if (!data->is_blocking && !data->has_timeout) { -- cto.ReadIntervalTimeout = MAXDWORD; -- } -- -- /* If we have a timeout ignore the blocking and set -- the total time in which to read the data */ -- if (data->has_timeout) { -- cto.ReadIntervalTimeout = MAXDWORD; -- cto.ReadTotalTimeoutMultiplier = MAXDWORD; -- cto.ReadTotalTimeoutConstant = (data->timeout_usec / 1000) + -- (data->timeout_sec * 1000); -- } -- -- if (!SetCommTimeouts(((php_dio_win32_stream_data*)data)->handle, &cto)) { -- return PHP_STREAM_OPTION_RETURN_ERR; -- } -- } -- return old_is_blocking ? PHP_STREAM_OPTION_RETURN_OK : PHP_STREAM_OPTION_RETURN_ERR; -- -- case PHP_STREAM_OPTION_READ_TIMEOUT: -- if (ptrparam) { -- /* struct timeval is supported with PHP_WIN32 defined. */ -- struct timeval *tv = (struct timeval*)ptrparam; -- -- /* A timeout of zero seconds and zero microseconds disables -- any existing timeout. */ -- if (tv->tv_sec || tv->tv_usec) { -- data->timeout_sec = tv->tv_sec; -- data->timeout_usec = tv->tv_usec; -- data->has_timeout = -1; -- -- cto.ReadIntervalTimeout = MAXDWORD; -- cto.ReadTotalTimeoutMultiplier = MAXDWORD; -- cto.ReadTotalTimeoutConstant = (data->timeout_usec / 1000) + -- (data->timeout_sec * 1000); -- } else { -- data->timeout_sec = 0; -- data->timeout_usec = 0; -- data->has_timeout = 0; -- data->timed_out = 0; -- -- /* If we're not blocking but don't have a timeout -- set to return immediately */ -- if (!data->is_blocking) { -- cto.ReadIntervalTimeout = MAXDWORD; -- } -- } -- -- if (!SetCommTimeouts(((php_dio_win32_stream_data*)data)->handle, &cto)) { -- return PHP_STREAM_OPTION_RETURN_ERR; -- } else { -- return PHP_STREAM_OPTION_RETURN_OK; -- } -- } else { -- return PHP_STREAM_OPTION_RETURN_ERR; -- } -- -- default: -- break; -- } -- } -- -- return 1; --} --/* }}} */ -- --/* {{{ dio_raw_open_stream -- * Opens the underlying stream. -- */ --int dio_raw_open_stream(char *filename, char *mode, php_dio_stream_data *data TSRMLS_DC) { -- php_dio_win32_stream_data *wdata = (php_dio_win32_stream_data*)data; -- DWORD err; -- -- switch(*mode) { -- case 'r': -- wdata->creation_disposition = OPEN_EXISTING; -- break; -- case 'w': -- wdata->creation_disposition = TRUNCATE_EXISTING; -- break; -- case 'a': -- wdata->creation_disposition = OPEN_ALWAYS; -- break; -- case 'x': -- wdata->creation_disposition = CREATE_NEW; -- break; -- } -- mode ++; -- -- if (*mode && (*mode != '+')) { -- mode++; -- } -- -- if (*mode && (*mode == '+')) { -- wdata->desired_access = GENERIC_READ | GENERIC_WRITE; -- } else if (OPEN_EXISTING == wdata->creation_disposition) { -- wdata->desired_access = GENERIC_READ; -- } else { -- wdata->desired_access = GENERIC_WRITE; -- } -- -- wdata->handle = CreateFile(filename, wdata->desired_access, 0, -- NULL, wdata->creation_disposition, FILE_ATTRIBUTE_NORMAL, NULL); -- if (INVALID_HANDLE_VALUE == wdata->handle) { -- err = GetLastError(); -- switch (err) { -- case ERROR_FILE_EXISTS: -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "File exists!"); -- return 0; -- -- case ERROR_FILE_NOT_FOUND: -- /* ERROR_FILE_NOT_FOUND with TRUNCATE_EXISTING means that -- * the file doesn't exist so now try to create it. */ -- if (TRUNCATE_EXISTING == wdata->creation_disposition) { -- php_error_docref(NULL TSRMLS_CC, E_NOTICE, "File does not exist, creating new file!"); -- -- wdata->handle = CreateFile(filename, wdata->desired_access, 0, -- NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); -- if (INVALID_HANDLE_VALUE == wdata->handle) { -- dio_last_error_php_error(E_WARNING, "CreateFile() failed:" TSRMLS_CC); -- return 0; -- } -- } else { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "File not found!"); -- return 0; -- } -- break; -- -- default: -- dio_last_error_php_error(E_WARNING, "CreateFile() failed:" TSRMLS_CC); -- return 0; -- } -- } -- -- /* If canonical allocate the canonical buffer. */ -- if (data->canonical) { -- wdata->canon_data = emalloc(sizeof(php_dio_win32_canon_data)); -- memset(wdata->canon_data, 0, sizeof(php_dio_win32_canon_data)); -- wdata->canon_data->size = DIO_WIN32_CANON_BUF_SIZE; -- } -- -- return 1; --} --/* }}} */ -- --/* {{{ dio_serial_init -- * Initialises the serial port -- */ --static int dio_serial_init(php_dio_stream_data *data TSRMLS_DC) { -- php_dio_win32_stream_data *wdata = (php_dio_win32_stream_data*)data; -- DWORD rate_def, data_bits_def, stop_bits_def, parity_def; -- DCB dcb; -- -- if (!dio_data_rate_to_define(data->data_rate, &rate_def)) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid data_rate value (%d)", data->data_rate); -- return 0; -- } -- -- if (!dio_data_bits_to_define(data->data_bits, &data_bits_def)) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid data_bits value (%d)", data->data_bits); -- return 0; -- } -- -- if (!dio_stop_bits_to_define(data->stop_bits, &stop_bits_def)) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid stop_bits value (%d)", data->stop_bits); -- return 0; -- } -- -- if (!dio_parity_to_define(data->parity, &parity_def)) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid parity value (%d)", data->parity); -- return 0; -- } -- -- if (!GetCommState(wdata->handle, &(wdata->olddcb))) { -- dio_last_error_php_error(E_WARNING, "GetCommState() failed:" TSRMLS_CC); -- return 0; -- } -- -- /* Init the DCB structure */ -- memset(&dcb, 0, sizeof(DCB)); -- dcb.DCBlength = sizeof(DCB); -- -- /* Set the communication parameters */ -- dcb.fBinary = 1; -- dcb.BaudRate = rate_def; -- dcb.ByteSize = (BYTE)data_bits_def; -- dcb.StopBits = (BYTE)stop_bits_def; -- dcb.Parity = (BYTE)parity_def; -- -- /* Set the control line parameters */ -- dcb.fDtrControl = DTR_CONTROL_DISABLE; -- dcb.fDsrSensitivity = FALSE; -- dcb.fOutxDsrFlow = FALSE; -- dcb.fTXContinueOnXoff = FALSE; -- dcb.fOutX = FALSE; -- dcb.fInX = FALSE; -- dcb.fErrorChar = FALSE; -- dcb.fNull = FALSE; -- dcb.fAbortOnError = FALSE; -- -- /* Hardware flow control */ -- if (data->flow_control) { -- dcb.fOutxCtsFlow = TRUE; -- dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; -- } else { -- dcb.fOutxCtsFlow = FALSE; -- dcb.fRtsControl = RTS_CONTROL_DISABLE; -- } -- -- if (!SetCommState(wdata->handle, &dcb)) { -- dio_last_error_php_error(E_WARNING, "SetCommState() failed:" TSRMLS_CC); -- return 0; -- } -- -- return 1; --} --/* }}} */ -- -- --/* {{{ dio_serial_uninit -- * Restores the serial settings back to their original state. -- */ --int dio_serial_uninit(php_dio_stream_data *data) { -- php_dio_win32_stream_data *wdata = (php_dio_win32_stream_data*)data; -- -- if (!SetCommState(wdata->handle, &(wdata->olddcb))) { -- return 0; -- } -- -- return 1; --} --/* }}} */ -- --/* {{{ dio_serial_flush -- * Purges the serial buffers of data. -- */ --int dio_serial_purge(php_dio_stream_data *data) { -- php_dio_win32_stream_data *wdata = (php_dio_win32_stream_data*)data; -- BOOL ret; -- -- /* Purge the canonical buffer if required */ -- if (data->canonical && ((wdata->desired_access & GENERIC_READ) == GENERIC_READ)) { -- wdata->canon_data->read_pos = 0; -- wdata->canon_data->write_pos = 0; -- } -- -- /* Purge the com port */ -- if ((wdata->desired_access & (GENERIC_READ|GENERIC_WRITE)) == (GENERIC_READ|GENERIC_WRITE)) { -- ret = PurgeComm(wdata->handle, PURGE_RXCLEAR|PURGE_TXCLEAR); -- } else if ((wdata->desired_access & GENERIC_WRITE) == GENERIC_WRITE) { -- ret = PurgeComm(wdata->handle, PURGE_TXCLEAR); -- } else if ((wdata->desired_access & GENERIC_READ) == GENERIC_READ) { -- ret = PurgeComm(wdata->handle, PURGE_RXCLEAR); -- } -- -- return ret; --} --/* }}} */ -- --/* {{{ dio_serial_open_stream -- * Opens the underlying stream. -- */ --int dio_serial_open_stream(char *filename, char *mode, php_dio_stream_data *data TSRMLS_DC) { -- php_dio_win32_stream_data *wdata = (php_dio_win32_stream_data*)data; -- COMMTIMEOUTS cto = { 0, 0, 0, 0, 0 }; -- -- php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Opening \"%s\" as a serial port (mode=\"%s\").", filename, mode); -- -- if (*mode != 'r') { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "You must open serial ports in read or read/write mode!"); -- return 0; -- } -- -- if (!dio_raw_open_stream(filename, mode, data TSRMLS_CC)) { -- return 0; -- } -- -- if (!GetCommTimeouts(wdata->handle, &(wdata->oldcto))) { -- dio_last_error_php_error(E_WARNING, "GetCommTimeouts() failed (Not a comm port?):" TSRMLS_CC); -- CloseHandle(wdata->handle); -- return 0; -- } -- -- /* If we're not blocking but don't have a timeout -- set to return immediately */ -- if (!data->is_blocking && !data->has_timeout) { -- cto.ReadIntervalTimeout = MAXDWORD; -- } -- -- /* If we have a timeout ignore the blocking and set -- the total time in which to read the data */ -- if (data->has_timeout) { -- cto.ReadIntervalTimeout = MAXDWORD; -- cto.ReadTotalTimeoutMultiplier = MAXDWORD; -- cto.ReadTotalTimeoutConstant = (data->timeout_usec / 1000) + -- (data->timeout_sec * 1000); -- } -- -- if (!SetCommTimeouts(wdata->handle, &cto)) { -- dio_last_error_php_error(E_WARNING, "SetCommTimeouts() failed:" TSRMLS_CC); -- CloseHandle(wdata->handle); -- return 0; -- } -- -- if (!dio_serial_init(data TSRMLS_CC)) { -- CloseHandle(wdata->handle); -- return 0; -- } -- -- return 1; --} --/* }}} */ -- --/* -- * Local variables: -- * c-basic-offset: 4 -- * tab-width: 4 -- * End: -- * vim600: fdm=marker -- * vim: sw=4 ts=4 noet -- */ -+/* -+ +----------------------------------------------------------------------+ -+ | PHP Version 5 | -+ +----------------------------------------------------------------------+ -+ | Copyright (c) 2009 Melanie Rhianna Lewis | -+ +----------------------------------------------------------------------+ -+ | This source file is subject to version 3.0 of the PHP license, | -+ | that is bundled with this package in the file LICENSE, and is | -+ | available through the world-wide-web at the following url: | -+ | http://www.php.net/license/3_0.txt. | -+ | If you did not receive a copy of the PHP license and are unable to | -+ | obtain it through the world-wide-web, please send a note to | -+ | license@php.net so we can mail you a copy immediately. | -+ +----------------------------------------------------------------------+ -+ | Author: Melanie Rhianna Lewis | -+ +----------------------------------------------------------------------+ -+ */ -+ -+#ifdef HAVE_CONFIG_H -+#include "config.h" -+#endif -+ -+#include "php.h" -+#include "php_dio_common.h" -+ -+#ifndef ZEND_WIN32 -+#error ZEND_WIN32 not defined! -+#endif -+ -+/* {{{ dio_last_error_php_error -+ * Generates a PHP error message based upon the last Windows error. -+ */ -+static void dio_last_error_php_error(int level, char * message TSRMLS_DC) { -+ LPVOID msgbuf; -+ DWORD msgbuflen; -+ char * errmsg; -+ DWORD err; -+ -+#ifdef UNICODE -+ DWORD errmsglen; -+#endif -+ -+ err = GetLastError(); -+ msgbuflen = FormatMessage( -+ FORMAT_MESSAGE_ALLOCATE_BUFFER| -+ FORMAT_MESSAGE_FROM_SYSTEM| -+ FORMAT_MESSAGE_IGNORE_INSERTS, -+ NULL, -+ err, -+ MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), -+ (LPTSTR)&msgbuf, -+ 0, -+ NULL); -+ -+#ifdef UNICODE -+ -+ /* Get the length of the converted message */ -+ errmsglen = WideCharToMultibyte( -+ CP_ACP, -+ 0 -+ (LPCWSTR)msgbuf, -+ -1, -+ (LPSTR)errmsg, -+ 0, -+ NULL, -+ NULL); -+ -+ /* Allocate a buffer */ -+ errmsg = emalloc(errmsglen); -+ if (!errmsg) { -+ php_error_docref(NULL TSRMLS_CC, E_ERROR, "Out of memory in dio_last_error_php_error()!"); -+ LocalFree(msgbuf); -+ return; -+ } -+ -+ /* Convert the message */ -+ errmsglen = WideCharToMultibyte( -+ CP_ACP, -+ 0 -+ (LPCWSTR)msgbuf, -+ -1, -+ (LPSTR)errmsg, -+ errmsglen, -+ NULL, -+ NULL); -+ -+#else -+ errmsg = (char *)msgbuf; -+#endif -+ -+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s[ERROR %d] %s", message, err, errmsg); -+ -+ LocalFree(msgbuf); -+#ifdef UNICODE -+ efree(errmsg); -+#endif -+} -+ -+/* {{{ dio_data_rate_to_define -+ * Converts a numeric data rate to a termios define -+ */ -+static int dio_data_rate_to_define(long rate, DWORD *def) { -+ switch (rate) { -+ case 75: -+ case 110: -+ case 134: -+ case 150: -+ case 300: -+ case 600: -+ case 1200: -+ case 1800: -+ case 2400: -+ case 4800: -+ case 7200: -+ case 9600: -+ case 14400: -+ case 19200: -+ case 38400: -+ case 57600: -+ case 115200: -+ case 56000: -+ case 128000: -+ case 256000: -+ break; -+ default: -+ return 0; -+ } -+ -+ *def = (DWORD)rate; -+ return 1; -+} -+/* }}} */ -+ -+ -+/* {{{ dio_data_bits_to_define -+ * Converts a number of data bits to a termios define -+ */ -+static int dio_data_bits_to_define(int data_bits, DWORD *def) { -+ switch (data_bits) { -+ case 8: -+ case 7: -+ case 6: -+ case 5: -+ case 4: -+ break; -+ default: -+ return 0; -+ } -+ -+ *def = (DWORD)data_bits; -+ return 1; -+} -+/* }}} */ -+ -+/* {{{ dio_stop_bits_to_define -+ * Converts a number of stop bits to a termios define -+ */ -+static int dio_stop_bits_to_define(int stop_bits, DWORD *def) { -+ DWORD val; -+ -+ switch (stop_bits) { -+ case 1: -+ val = ONESTOPBIT; -+ break; -+ case 2: -+ val = TWOSTOPBITS; -+ break; -+ case 3: -+ val = ONE5STOPBITS; -+ break; -+ default: -+ return 0; -+ } -+ -+ *def = val; -+ return 1; -+} -+/* }}} */ -+ -+/* {{{ dio_parity_to_define -+ * Converts a parity type to a termios define -+ */ -+static int dio_parity_to_define(int parity, DWORD *def) { -+ DWORD val; -+ -+ switch (parity) { -+ case 0: -+ val = NOPARITY; -+ break; -+ case 1: -+ val = ODDPARITY; -+ break; -+ case 2: -+ val = EVENPARITY; -+ break; -+ default: -+ return 0; -+ } -+ -+ *def = val; -+ return 1; -+} -+/* }}} */ -+ -+/* {{{ dio_create_stream_data -+ * Creates an initialised stream data structure. Free with efree(). -+ */ -+php_dio_stream_data * dio_create_stream_data(void) { -+ php_dio_win32_stream_data * data = emalloc(sizeof(php_dio_win32_stream_data)); -+ memset(data, 0, sizeof(php_dio_win32_stream_data)); -+ dio_init_stream_data(&(data->common)); -+ data->handle = INVALID_HANDLE_VALUE; -+ data->desired_access = 0; -+ data->creation_disposition = 0; -+ data->olddcb.DCBlength = sizeof(DCB); -+ -+ return (php_dio_stream_data *)data; -+} -+/* }}} */ -+ -+/* {{{ dio_common_write -+ * Writes count chars from the buffer to the stream described by the stream data. -+ */ -+size_t dio_common_write(php_dio_stream_data *data, const char *buf, size_t count) { -+ php_dio_win32_stream_data *wdata = (php_dio_win32_stream_data*)data; -+ DWORD total = 0; -+ -+ if (WriteFile(wdata->handle, buf, (DWORD)count, &total, NULL)) { -+ return (size_t)total; -+ } -+ -+ return 0; -+} -+/* }}} */ -+ -+/* {{{ dio_buffer_read -+ * Reads any available chars from the canonical buffer. -+ */ -+static size_t dio_buffer_read(php_dio_win32_stream_data *wdata, const char *buf, size_t count) { -+ php_dio_win32_canon_data *canon_data = wdata->canon_data; -+ size_t total = 0; -+ -+ /* Read always follows write. I.e. if read ptr > write ptr buffer has -+ wrapped and so we need to copy two blocks of data. */ -+ if (canon_data->read_pos > canon_data->write_pos) { -+ -+ /* Check we actually need to copy both blocks */ -+ if ((canon_data->size - canon_data->read_pos) > count) { -+ -+ /* No we don't. Just copy as much as we were asked for. */ -+ memcpy((char*)buf, -+ &(canon_data->buf[canon_data->read_pos]), -+ count); -+ /* Update the read pointer. */ -+ canon_data->read_pos += count; -+ -+ /* Return the amount read. */ -+ return count; -+ } else { -+ -+ /* We need to copy both blocks so copy data up to the end of -+ the buffer. */ -+ total = canon_data->size - canon_data->read_pos; -+ memcpy((char*)buf, -+ &(canon_data->buf[canon_data->read_pos]), -+ total); -+ canon_data->read_pos = 0; -+ count -= total; -+ -+ /* Now copy the data from the start of the buffer either up -+ count or the number of bytes in the buffer. */ -+ -+ if (canon_data->write_pos > count) { -+ memcpy((char*)buf, canon_data->buf, count); -+ canon_data->read_pos = count; -+ total += count; -+ -+ return total; -+ } else { -+ memcpy((char*)buf, canon_data->buf, canon_data->write_pos); -+ canon_data->read_pos = canon_data->write_pos; -+ total += canon_data->write_pos; -+ -+ return total; -+ } -+ } -+ -+ /* Else if write follows read. This is a simpler case. We just copy -+ either all the data buffered or count, which ever is smaller. */ -+ } else if (canon_data->write_pos > canon_data->read_pos) { -+ if ((canon_data->write_pos - canon_data->read_pos) > count) { -+ memcpy((char*)buf, -+ &(canon_data->buf[canon_data->read_pos]), -+ count); -+ canon_data->read_pos += count; -+ -+ return count; -+ } else { -+ total = canon_data->write_pos - canon_data->read_pos; -+ memcpy((char*)buf, -+ &(canon_data->buf[canon_data->read_pos]), -+ total); -+ canon_data->read_pos += total; -+ -+ return total; -+ } -+ } -+ -+ /* Else we need to read more data from the data port. */ -+ return 0; -+} -+ -+/* {{{ dio_com_read -+ * Read chars from the data port. -+ */ -+static size_t dio_com_read(php_dio_stream_data *data, const char *buf, size_t count) { -+ php_dio_win32_stream_data *wdata = (php_dio_win32_stream_data*)data; -+ DWORD err, total = 0; -+ -+ if (ReadFile(wdata->handle, (void*)buf, (DWORD)count, &total, NULL)) { -+ -+ if (total) { -+ return (size_t)total; -+ } -+ -+ data->end_of_file = 1; -+ } -+ -+ if (!data->end_of_file) { -+ err = GetLastError(); -+ -+ if (ERROR_HANDLE_EOF == err) { -+ data->end_of_file = 1; -+ } -+ } -+ -+ return 0; -+} -+ -+/* {{{ dio_canonical_read -+ * Reads chars from the input stream until the internal buffer is full or a new -+ * line is reached. -+ */ -+static size_t dio_canonical_read(php_dio_win32_stream_data *wdata, const char *buf, size_t count) { -+ php_dio_win32_canon_data *canon_data = wdata->canon_data; -+ size_t total = 0; -+ char ch; -+ -+ /* See if there's any buffered data and copy it. */ -+ total = dio_buffer_read(wdata, buf, count); -+ if (total) { -+ return total; -+ } -+ -+ /* Need to read more data from the data port. Buffer should be empty(er) -+ by now. */ -+ do { -+ /* Is the buffer full? */ -+ if (((canon_data->write_pos + 1) % canon_data->size) == -+ canon_data->read_pos) { -+ break; -+ } -+ -+ /* Read a byte from the input checking for EOF. */ -+ if (!dio_com_read((php_dio_stream_data*)wdata, &ch, 1)) { -+ break; -+ } -+ -+ /* Translate CR to newlines (same as ICRNL in POSIX) */ -+ ch = (ch != '\r') ? ch : '\n'; -+ -+ /* We read a character! So buffer it. */ -+ canon_data->buf[canon_data->write_pos++] = ch; -+ if (canon_data->write_pos >= canon_data->size) { -+ canon_data->write_pos = 0; -+ } -+ -+ /* End of line/input (^D)? */ -+ } while ((ch != '\n') && (ch != 0x04)); -+ -+ return dio_buffer_read(wdata, buf, count); -+} -+/* }}} */ -+ -+/* {{{ dio_common_read -+ * Reads count chars to the buffer to the stream described by the stream data. -+ */ -+size_t dio_common_read(php_dio_stream_data *data, const char *buf, size_t count) { -+ -+ /* You ask for no bytes you'll get none :-) */ -+ if (!count) { -+ return 0; -+ } -+ -+ if (data->canonical) { -+ return dio_canonical_read((php_dio_win32_stream_data*)data, buf, count); -+ } else { -+ return dio_com_read(data, buf, count); -+ } -+} -+/* }}} */ -+ -+/* {{{ php_dio_stream_data -+ * Closes the php_stream. -+ */ -+int dio_common_close(php_dio_stream_data *data) { -+ php_dio_win32_stream_data *wdata = (php_dio_win32_stream_data*)data; -+ -+ if (data->canonical) { -+ efree(wdata->canon_data); -+ } -+ -+ if (!CloseHandle(wdata->handle)) { -+ return 0; -+ } -+ -+ return 1; -+} -+/* }}} */ -+ -+/* {{{ dio_common_set_option -+ * Sets/gets stream options -+ */ -+int dio_common_set_option(php_dio_stream_data *data, int option, int value, void *ptrparam) { -+ COMMTIMEOUTS cto = { 0, 0, 0, 0, 0 }; -+ int old_is_blocking = 0; -+ -+ /* Can't do timeouts or non blocking with raw windows streams :-( */ -+ if (DIO_STREAM_TYPE_SERIAL == data->stream_type) { -+ switch (option) { -+ case PHP_STREAM_OPTION_BLOCKING: -+ old_is_blocking = data->is_blocking; -+ data->is_blocking = value ? 1 : 0; -+ -+ /* Only change values if we need to change them. */ -+ if (data->is_blocking != old_is_blocking) { -+ /* If we're not blocking but don't have a timeout -+ set to return immediately */ -+ if (!data->is_blocking && !data->has_timeout) { -+ cto.ReadIntervalTimeout = MAXDWORD; -+ } -+ -+ /* If we have a timeout ignore the blocking and set -+ the total time in which to read the data */ -+ if (data->has_timeout) { -+ cto.ReadIntervalTimeout = MAXDWORD; -+ cto.ReadTotalTimeoutMultiplier = MAXDWORD; -+ cto.ReadTotalTimeoutConstant = (data->timeout_usec / 1000) + -+ (data->timeout_sec * 1000); -+ } -+ -+ if (!SetCommTimeouts(((php_dio_win32_stream_data*)data)->handle, &cto)) { -+ return PHP_STREAM_OPTION_RETURN_ERR; -+ } -+ } -+ return old_is_blocking ? PHP_STREAM_OPTION_RETURN_OK : PHP_STREAM_OPTION_RETURN_ERR; -+ -+ case PHP_STREAM_OPTION_READ_TIMEOUT: -+ if (ptrparam) { -+ /* struct timeval is supported with PHP_WIN32 defined. */ -+ struct timeval *tv = (struct timeval*)ptrparam; -+ -+ /* A timeout of zero seconds and zero microseconds disables -+ any existing timeout. */ -+ if (tv->tv_sec || tv->tv_usec) { -+ data->timeout_sec = tv->tv_sec; -+ data->timeout_usec = tv->tv_usec; -+ data->has_timeout = -1; -+ -+ cto.ReadIntervalTimeout = MAXDWORD; -+ cto.ReadTotalTimeoutMultiplier = MAXDWORD; -+ cto.ReadTotalTimeoutConstant = (data->timeout_usec / 1000) + -+ (data->timeout_sec * 1000); -+ } else { -+ data->timeout_sec = 0; -+ data->timeout_usec = 0; -+ data->has_timeout = 0; -+ data->timed_out = 0; -+ -+ /* If we're not blocking but don't have a timeout -+ set to return immediately */ -+ if (!data->is_blocking) { -+ cto.ReadIntervalTimeout = MAXDWORD; -+ } -+ } -+ -+ if (!SetCommTimeouts(((php_dio_win32_stream_data*)data)->handle, &cto)) { -+ return PHP_STREAM_OPTION_RETURN_ERR; -+ } else { -+ return PHP_STREAM_OPTION_RETURN_OK; -+ } -+ } else { -+ return PHP_STREAM_OPTION_RETURN_ERR; -+ } -+ -+ default: -+ break; -+ } -+ } -+ -+ return 1; -+} -+/* }}} */ -+ -+/* {{{ dio_raw_open_stream -+ * Opens the underlying stream. -+ */ -+int dio_raw_open_stream(char *filename, char *mode, php_dio_stream_data *data TSRMLS_DC) { -+ php_dio_win32_stream_data *wdata = (php_dio_win32_stream_data*)data; -+ DWORD err; -+ -+ switch(*mode) { -+ case 'r': -+ wdata->creation_disposition = OPEN_EXISTING; -+ break; -+ case 'w': -+ wdata->creation_disposition = TRUNCATE_EXISTING; -+ break; -+ case 'a': -+ wdata->creation_disposition = OPEN_ALWAYS; -+ break; -+ case 'x': -+ wdata->creation_disposition = CREATE_NEW; -+ break; -+ } -+ mode ++; -+ -+ if (*mode && (*mode != '+')) { -+ mode++; -+ } -+ -+ if (*mode && (*mode == '+')) { -+ wdata->desired_access = GENERIC_READ | GENERIC_WRITE; -+ } else if (OPEN_EXISTING == wdata->creation_disposition) { -+ wdata->desired_access = GENERIC_READ; -+ } else { -+ wdata->desired_access = GENERIC_WRITE; -+ } -+ -+ wdata->handle = CreateFile(filename, wdata->desired_access, 0, -+ NULL, wdata->creation_disposition, FILE_ATTRIBUTE_NORMAL, NULL); -+ if (INVALID_HANDLE_VALUE == wdata->handle) { -+ err = GetLastError(); -+ switch (err) { -+ case ERROR_FILE_EXISTS: -+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "File exists!"); -+ return 0; -+ -+ case ERROR_FILE_NOT_FOUND: -+ /* ERROR_FILE_NOT_FOUND with TRUNCATE_EXISTING means that -+ * the file doesn't exist so now try to create it. */ -+ if (TRUNCATE_EXISTING == wdata->creation_disposition) { -+ php_error_docref(NULL TSRMLS_CC, E_NOTICE, "File does not exist, creating new file!"); -+ -+ wdata->handle = CreateFile(filename, wdata->desired_access, 0, -+ NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); -+ if (INVALID_HANDLE_VALUE == wdata->handle) { -+ dio_last_error_php_error(E_WARNING, "CreateFile() failed:" TSRMLS_CC); -+ return 0; -+ } -+ } else { -+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "File not found!"); -+ return 0; -+ } -+ break; -+ -+ default: -+ dio_last_error_php_error(E_WARNING, "CreateFile() failed:" TSRMLS_CC); -+ return 0; -+ } -+ } -+ -+ /* If canonical allocate the canonical buffer. */ -+ if (data->canonical) { -+ wdata->canon_data = emalloc(sizeof(php_dio_win32_canon_data)); -+ memset(wdata->canon_data, 0, sizeof(php_dio_win32_canon_data)); -+ wdata->canon_data->size = DIO_WIN32_CANON_BUF_SIZE; -+ } -+ -+ return 1; -+} -+/* }}} */ -+ -+/* {{{ dio_serial_init -+ * Initialises the serial port -+ */ -+static int dio_serial_init(php_dio_stream_data *data TSRMLS_DC) { -+ php_dio_win32_stream_data *wdata = (php_dio_win32_stream_data*)data; -+ DWORD rate_def, data_bits_def, stop_bits_def, parity_def; -+ DCB dcb; -+ -+ if (!dio_data_rate_to_define(data->data_rate, &rate_def)) { -+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid data_rate value (%d)", data->data_rate); -+ return 0; -+ } -+ -+ if (!dio_data_bits_to_define(data->data_bits, &data_bits_def)) { -+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid data_bits value (%d)", data->data_bits); -+ return 0; -+ } -+ -+ if (!dio_stop_bits_to_define(data->stop_bits, &stop_bits_def)) { -+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid stop_bits value (%d)", data->stop_bits); -+ return 0; -+ } -+ -+ if (!dio_parity_to_define(data->parity, &parity_def)) { -+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid parity value (%d)", data->parity); -+ return 0; -+ } -+ -+ if (!GetCommState(wdata->handle, &(wdata->olddcb))) { -+ dio_last_error_php_error(E_WARNING, "GetCommState() failed:" TSRMLS_CC); -+ return 0; -+ } -+ -+ /* Init the DCB structure */ -+ memset(&dcb, 0, sizeof(DCB)); -+ dcb.DCBlength = sizeof(DCB); -+ -+ /* Set the communication parameters */ -+ dcb.fBinary = 1; -+ dcb.BaudRate = rate_def; -+ dcb.ByteSize = (BYTE)data_bits_def; -+ dcb.StopBits = (BYTE)stop_bits_def; -+ dcb.Parity = (BYTE)parity_def; -+ -+ /* Set the control line parameters */ -+ dcb.fDtrControl = DTR_CONTROL_DISABLE; -+ dcb.fDsrSensitivity = FALSE; -+ dcb.fOutxDsrFlow = FALSE; -+ dcb.fTXContinueOnXoff = FALSE; -+ dcb.fOutX = FALSE; -+ dcb.fInX = FALSE; -+ dcb.fErrorChar = FALSE; -+ dcb.fNull = FALSE; -+ dcb.fAbortOnError = FALSE; -+ -+ /* Hardware flow control */ -+ if (data->flow_control) { -+ dcb.fOutxCtsFlow = TRUE; -+ dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; -+ } else { -+ dcb.fOutxCtsFlow = FALSE; -+ dcb.fRtsControl = RTS_CONTROL_DISABLE; -+ } -+ -+ if (!SetCommState(wdata->handle, &dcb)) { -+ dio_last_error_php_error(E_WARNING, "SetCommState() failed:" TSRMLS_CC); -+ return 0; -+ } -+ -+ return 1; -+} -+/* }}} */ -+ -+ -+/* {{{ dio_serial_uninit -+ * Restores the serial settings back to their original state. -+ */ -+int dio_serial_uninit(php_dio_stream_data *data) { -+ php_dio_win32_stream_data *wdata = (php_dio_win32_stream_data*)data; -+ -+ if (!SetCommState(wdata->handle, &(wdata->olddcb))) { -+ return 0; -+ } -+ -+ return 1; -+} -+/* }}} */ -+ -+/* {{{ dio_serial_flush -+ * Purges the serial buffers of data. -+ */ -+int dio_serial_purge(php_dio_stream_data *data) { -+ php_dio_win32_stream_data *wdata = (php_dio_win32_stream_data*)data; -+ BOOL ret; -+ -+ /* Purge the canonical buffer if required */ -+ if (data->canonical && ((wdata->desired_access & GENERIC_READ) == GENERIC_READ)) { -+ wdata->canon_data->read_pos = 0; -+ wdata->canon_data->write_pos = 0; -+ } -+ -+ /* Purge the com port */ -+ if ((wdata->desired_access & (GENERIC_READ|GENERIC_WRITE)) == (GENERIC_READ|GENERIC_WRITE)) { -+ ret = PurgeComm(wdata->handle, PURGE_RXCLEAR|PURGE_TXCLEAR); -+ } else if ((wdata->desired_access & GENERIC_WRITE) == GENERIC_WRITE) { -+ ret = PurgeComm(wdata->handle, PURGE_TXCLEAR); -+ } else if ((wdata->desired_access & GENERIC_READ) == GENERIC_READ) { -+ ret = PurgeComm(wdata->handle, PURGE_RXCLEAR); -+ } -+ -+ return ret; -+} -+/* }}} */ -+ -+/* {{{ dio_serial_open_stream -+ * Opens the underlying stream. -+ */ -+int dio_serial_open_stream(char *filename, char *mode, php_dio_stream_data *data TSRMLS_DC) { -+ php_dio_win32_stream_data *wdata = (php_dio_win32_stream_data*)data; -+ COMMTIMEOUTS cto = { 0, 0, 0, 0, 0 }; -+ -+ php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Opening \"%s\" as a serial port (mode=\"%s\").", filename, mode); -+ -+ if (*mode != 'r') { -+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "You must open serial ports in read or read/write mode!"); -+ return 0; -+ } -+ -+ if (!dio_raw_open_stream(filename, mode, data TSRMLS_CC)) { -+ return 0; -+ } -+ -+ if (!GetCommTimeouts(wdata->handle, &(wdata->oldcto))) { -+ dio_last_error_php_error(E_WARNING, "GetCommTimeouts() failed (Not a comm port?):" TSRMLS_CC); -+ CloseHandle(wdata->handle); -+ return 0; -+ } -+ -+ /* If we're not blocking but don't have a timeout -+ set to return immediately */ -+ if (!data->is_blocking && !data->has_timeout) { -+ cto.ReadIntervalTimeout = MAXDWORD; -+ } -+ -+ /* If we have a timeout ignore the blocking and set -+ the total time in which to read the data */ -+ if (data->has_timeout) { -+ cto.ReadIntervalTimeout = MAXDWORD; -+ cto.ReadTotalTimeoutMultiplier = MAXDWORD; -+ cto.ReadTotalTimeoutConstant = (data->timeout_usec / 1000) + -+ (data->timeout_sec * 1000); -+ } -+ -+ if (!SetCommTimeouts(wdata->handle, &cto)) { -+ dio_last_error_php_error(E_WARNING, "SetCommTimeouts() failed:" TSRMLS_CC); -+ CloseHandle(wdata->handle); -+ return 0; -+ } -+ -+ if (!dio_serial_init(data TSRMLS_CC)) { -+ CloseHandle(wdata->handle); -+ return 0; -+ } -+ -+ return 1; -+} -+/* }}} */ -+ -+/* -+ * Local variables: -+ * c-basic-offset: 4 -+ * tab-width: 4 -+ * End: -+ * vim600: fdm=marker -+ * vim: sw=4 ts=4 noet -+ */ ---- a/php_dio_posix.h -+++ b/php_dio_posix.h -@@ -1,70 +1,70 @@ --/* -- +----------------------------------------------------------------------+ -- | PHP Version 5 | -- +----------------------------------------------------------------------+ -- | Copyright (c) 2009 Melanie Rhianna Lewis | -- +----------------------------------------------------------------------+ -- | This source file is subject to version 3.0 of the PHP license, | -- | that is bundled with this package in the file LICENSE, and is | -- | available through the world-wide-web at the following url: | -- | http://www.php.net/license/3_0.txt. | -- | If you did not receive a copy of the PHP license and are unable to | -- | obtain it through the world-wide-web, please send a note to | -- | license@php.net so we can mail you a copy immediately. | -- +----------------------------------------------------------------------+ -- | Author: Melanie Rhianna Lewis | -- +----------------------------------------------------------------------+ -- */ -- --#ifndef PHP_DIO_POSIX_H_ --#define PHP_DIO_POSIX_H_ -- --#include --#include --#include --#include -- --#ifdef HAVE_UNISTD_H --#include --#endif -- --#include --#include -- -- --/** -+/* -+ +----------------------------------------------------------------------+ -+ | PHP Version 5 | -+ +----------------------------------------------------------------------+ -+ | Copyright (c) 2009 Melanie Rhianna Lewis | -+ +----------------------------------------------------------------------+ -+ | This source file is subject to version 3.0 of the PHP license, | -+ | that is bundled with this package in the file LICENSE, and is | -+ | available through the world-wide-web at the following url: | -+ | http://www.php.net/license/3_0.txt. | -+ | If you did not receive a copy of the PHP license and are unable to | -+ | obtain it through the world-wide-web, please send a note to | -+ | license@php.net so we can mail you a copy immediately. | -+ +----------------------------------------------------------------------+ -+ | Author: Melanie Rhianna Lewis | -+ +----------------------------------------------------------------------+ -+ */ -+ -+#ifndef PHP_DIO_POSIX_H_ -+#define PHP_DIO_POSIX_H_ -+ -+#include -+#include -+#include -+#include -+ -+#ifdef HAVE_UNISTD_H -+#include -+#endif -+ -+#include -+#include -+ -+ -+/** - * Detect if we can support non blocking IO. -- */ --#ifdef O_NONBLOCK --#define DIO_NONBLOCK O_NONBLOCK --#else --#ifdef O_NDELAY --#define DIO_NONBLOCK O_NDELAY --#endif --#endif -- --/** -+ */ -+#ifdef O_NONBLOCK -+#define DIO_NONBLOCK O_NONBLOCK -+#else -+#ifdef O_NDELAY -+#define DIO_NONBLOCK O_NDELAY -+#endif -+#endif -+ -+/** - * POSIXy platforms have file permissions -- */ --#define DIO_HAS_FILEPERMS -- --#include "php_dio_common_data.h" -- --typedef struct _php_dio_posix_stream_data { -- php_dio_stream_data common; -- int fd; -- int flags; -- /* Serial options */ -- struct termios oldtio; --} php_dio_posix_stream_data ; -- --#endif /* PHP_DIO_POSIX_H_ */ -- --/* -- * Local variables: -- * c-basic-offset: 4 -- * tab-width: 4 -- * End: -- * vim600: fdm=marker -- * vim: sw=4 ts=4 noet -- */ -+ */ -+#define DIO_HAS_FILEPERMS -+ -+#include "php_dio_common_data.h" -+ -+typedef struct _php_dio_posix_stream_data { -+ php_dio_stream_data common; -+ int fd; -+ int flags; -+ /* Serial options */ -+ struct termios oldtio; -+} php_dio_posix_stream_data ; -+ -+#endif /* PHP_DIO_POSIX_H_ */ -+ -+/* -+ * Local variables: -+ * c-basic-offset: 4 -+ * tab-width: 4 -+ * End: -+ * vim600: fdm=marker -+ * vim: sw=4 ts=4 noet -+ */ ---- a/php_dio_win32.h -+++ b/php_dio_win32.h -@@ -1,62 +1,62 @@ --/* -- +----------------------------------------------------------------------+ -- | PHP Version 5 | -- +----------------------------------------------------------------------+ -- | Copyright (c) 2009 Melanie Rhianna Lewis | -- +----------------------------------------------------------------------+ -- | This source file is subject to version 3.0 of the PHP license, | -- | that is bundled with this package in the file LICENSE, and is | -- | available through the world-wide-web at the following url: | -- | http://www.php.net/license/3_0.txt. | -- | If you did not receive a copy of the PHP license and are unable to | -- | obtain it through the world-wide-web, please send a note to | -- | license@php.net so we can mail you a copy immediately. | -- +----------------------------------------------------------------------+ -- | Author: Melanie Rhianna Lewis | -- +----------------------------------------------------------------------+ -- */ -- --#ifndef PHP_DIO_WIN32_H_ --#define PHP_DIO_WIN32_H_ -- --#include -- --/* Windows platform can do non blocking. */ --#define DIO_NONBLOCK -- --#include "php_dio_common_data.h" -- --#define DIO_WIN32_CANON_BUF_SIZE 8192 -- --/* This is the buffer information when reading in canonical mode. Data is -- read right up to either buffer being full or a newline being read. Excess -- data will be retained in the buffer until the next read. */ --typedef struct _php_dio_win32_canon_data { -- size_t size; -- size_t read_pos; -- size_t write_pos; -- char buf[DIO_WIN32_CANON_BUF_SIZE]; -- --} php_dio_win32_canon_data; -- --typedef struct _php_dio_win32_stream_data { -- php_dio_stream_data common; -- HANDLE handle; -- DWORD desired_access; -- DWORD creation_disposition; -- DCB olddcb; -- COMMTIMEOUTS oldcto; -- php_dio_win32_canon_data *canon_data; -- --} php_dio_win32_stream_data ; -- --#endif /* PHP_DIO_WIN32_H_ */ -- --/* -- * Local variables: -- * c-basic-offset: 4 -- * tab-width: 4 -- * End: -- * vim600: fdm=marker -- * vim: sw=4 ts=4 noet -- */ -+/* -+ +----------------------------------------------------------------------+ -+ | PHP Version 5 | -+ +----------------------------------------------------------------------+ -+ | Copyright (c) 2009 Melanie Rhianna Lewis | -+ +----------------------------------------------------------------------+ -+ | This source file is subject to version 3.0 of the PHP license, | -+ | that is bundled with this package in the file LICENSE, and is | -+ | available through the world-wide-web at the following url: | -+ | http://www.php.net/license/3_0.txt. | -+ | If you did not receive a copy of the PHP license and are unable to | -+ | obtain it through the world-wide-web, please send a note to | -+ | license@php.net so we can mail you a copy immediately. | -+ +----------------------------------------------------------------------+ -+ | Author: Melanie Rhianna Lewis | -+ +----------------------------------------------------------------------+ -+ */ -+ -+#ifndef PHP_DIO_WIN32_H_ -+#define PHP_DIO_WIN32_H_ -+ -+#include -+ -+/* Windows platform can do non blocking. */ -+#define DIO_NONBLOCK -+ -+#include "php_dio_common_data.h" -+ -+#define DIO_WIN32_CANON_BUF_SIZE 8192 -+ -+/* This is the buffer information when reading in canonical mode. Data is -+ read right up to either buffer being full or a newline being read. Excess -+ data will be retained in the buffer until the next read. */ -+typedef struct _php_dio_win32_canon_data { -+ size_t size; -+ size_t read_pos; -+ size_t write_pos; -+ char buf[DIO_WIN32_CANON_BUF_SIZE]; -+ -+} php_dio_win32_canon_data; -+ -+typedef struct _php_dio_win32_stream_data { -+ php_dio_stream_data common; -+ HANDLE handle; -+ DWORD desired_access; -+ DWORD creation_disposition; -+ DCB olddcb; -+ COMMTIMEOUTS oldcto; -+ php_dio_win32_canon_data *canon_data; -+ -+} php_dio_win32_stream_data ; -+ -+#endif /* PHP_DIO_WIN32_H_ */ -+ -+/* -+ * Local variables: -+ * c-basic-offset: 4 -+ * tab-width: 4 -+ * End: -+ * vim600: fdm=marker -+ * vim: sw=4 ts=4 noet -+ */ diff --git a/lang/php7-pecl-dio/patches/0001-fix-svn-prop.patch b/lang/php7-pecl-dio/patches/0001-fix-svn-prop.patch deleted file mode 100644 index e8a56fb..0000000 --- a/lang/php7-pecl-dio/patches/0001-fix-svn-prop.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 46d3a1ff2c6e316cf0928a9fd403cb5284bfe863 Mon Sep 17 00:00:00 2001 -From: remi -Date: Wed, 9 Oct 2013 12:04:16 +0000 -Subject: [PATCH 01/16] fix svn prop - -git-svn-id: http://svn.php.net/repository/pecl/dio/trunk@331748 c90b9560-bf6c-de11-be94-00142212c4b1 ---- - dio_posix.c | 0 - dio_win32.c | 0 - php_dio_posix.h | 0 - php_dio_win32.h | 0 - 4 files changed, 0 insertions(+), 0 deletions(-) - mode change 100755 => 100644 dio_posix.c - mode change 100755 => 100644 dio_win32.c - mode change 100755 => 100644 php_dio_posix.h - mode change 100755 => 100644 php_dio_win32.h - -diff --git a/dio_posix.c b/dio_posix.c -old mode 100755 -new mode 100644 -diff --git a/dio_win32.c b/dio_win32.c -old mode 100755 -new mode 100644 -diff --git a/php_dio_posix.h b/php_dio_posix.h -old mode 100755 -new mode 100644 -diff --git a/php_dio_win32.h b/php_dio_win32.h -old mode 100755 -new mode 100644 --- -2.5.0 - diff --git a/lang/php7-pecl-dio/patches/0002-fix-Wunused-variable.patch b/lang/php7-pecl-dio/patches/0002-fix-Wunused-variable.patch deleted file mode 100644 index 6624174..0000000 --- a/lang/php7-pecl-dio/patches/0002-fix-Wunused-variable.patch +++ /dev/null @@ -1,39 +0,0 @@ -From e9261081d447492e7eff3a22601b1de4f1ae550f Mon Sep 17 00:00:00 2001 -From: remi -Date: Wed, 9 Oct 2013 12:15:51 +0000 -Subject: [PATCH 02/16] fix [-Wunused-variable] - -git-svn-id: http://svn.php.net/repository/pecl/dio/trunk@331749 c90b9560-bf6c-de11-be94-00142212c4b1 ---- - dio.c | 2 +- - dio_posix.c | 1 - - 2 files changed, 1 insertion(+), 2 deletions(-) - -diff --git a/dio.c b/dio.c -index e400cf0..408a171 100644 ---- a/dio.c -+++ b/dio.c -@@ -775,7 +775,7 @@ ZEND_BEGIN_ARG_INFO_EX(dio_serial_args, 0, 0, 2) - ZEND_ARG_INFO(0, options) - ZEND_END_ARG_INFO() - --static zend_object_handlers dio_raw_object_handlers; -+// not used static zend_object_handlers dio_raw_object_handlers; - - static zend_function_entry dio_functions[] = { - /* Class functions. */ -diff --git a/dio_posix.c b/dio_posix.c -index 16fb3d6..01e1109 100644 ---- a/dio_posix.c -+++ b/dio_posix.c -@@ -266,7 +266,6 @@ size_t dio_common_write(php_dio_stream_data *data, const char *buf, size_t count - * earlier than early time. - */ - static int dio_timeval_subtract(struct timeval *late, struct timeval *early, struct timeval *diff) { -- struct timeval *tmp; - - /* Handle negatives */ - if (late->tv_sec < early->tv_sec) { --- -2.5.0 - diff --git a/lang/php7-pecl-dio/patches/0003-Fix-Wmaybe-uninitialized.patch b/lang/php7-pecl-dio/patches/0003-Fix-Wmaybe-uninitialized.patch deleted file mode 100644 index 21f4cff..0000000 --- a/lang/php7-pecl-dio/patches/0003-Fix-Wmaybe-uninitialized.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 6cbc1651b6b6f865f9aae1e9adff73743298666f Mon Sep 17 00:00:00 2001 -From: remi -Date: Wed, 9 Oct 2013 12:18:34 +0000 -Subject: [PATCH 03/16] Fix [-Wmaybe-uninitialized] - -git-svn-id: http://svn.php.net/repository/pecl/dio/trunk@331750 c90b9560-bf6c-de11-be94-00142212c4b1 ---- - dio_stream_wrappers.c | 6 ++---- - 1 file changed, 2 insertions(+), 4 deletions(-) - -diff --git a/dio_stream_wrappers.c b/dio_stream_wrappers.c -index 844b006..811bc07 100644 ---- a/dio_stream_wrappers.c -+++ b/dio_stream_wrappers.c -@@ -228,9 +228,8 @@ PHP_FUNCTION(dio_raw) { - efree(data); - RETURN_FALSE; - } -+ php_stream_to_zval(stream, return_value); - } -- -- php_stream_to_zval(stream, return_value); - } - /* }}} */ - -@@ -390,9 +389,8 @@ PHP_FUNCTION(dio_serial) { - efree(data); - RETURN_FALSE; - } -+ php_stream_to_zval(stream, return_value); - } -- -- php_stream_to_zval(stream, return_value); - } - /* }}} */ - --- -2.5.0 - diff --git a/lang/php7-pecl-dio/patches/0004-Fix-last-build-warning-Wunused-but-set-variable-sorr.patch b/lang/php7-pecl-dio/patches/0004-Fix-last-build-warning-Wunused-but-set-variable-sorr.patch deleted file mode 100644 index ba69d22..0000000 --- a/lang/php7-pecl-dio/patches/0004-Fix-last-build-warning-Wunused-but-set-variable-sorr.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 1e6f98d9fb65b9c052e6d555eab573d7e5073dae Mon Sep 17 00:00:00 2001 -From: remi -Date: Wed, 9 Oct 2013 12:24:28 +0000 -Subject: [PATCH 04/16] Fix last build warning [-Wunused-but-set-variable] - (sorry for legibility...) - -git-svn-id: http://svn.php.net/repository/pecl/dio/trunk@331751 c90b9560-bf6c-de11-be94-00142212c4b1 ---- - dio_posix.c | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/dio_posix.c b/dio_posix.c -index 01e1109..6ed8630 100644 ---- a/dio_posix.c -+++ b/dio_posix.c -@@ -28,7 +28,10 @@ - * Convert an fopen() mode string to open() flags - */ - static int dio_stream_mode_to_flags(const char *mode) { -- int flags = 0, ch = 0, bin = 1; -+ int flags = 0, ch = 0; -+#if defined(_O_TEXT) && defined(O_BINARY) -+ int bin = 1; -+#endif - - switch(mode[ch++]) { - case 'r': -@@ -45,9 +48,11 @@ static int dio_stream_mode_to_flags(const char *mode) { - break; - } - -+#if defined(_O_TEXT) && defined(O_BINARY) - if (mode[ch] != '+') { - bin = (mode[ch++] == 'b'); - } -+#endif - - if (mode[ch] == '+') { - flags |= O_RDWR; --- -2.5.0 - diff --git a/lang/php7-pecl-dio/patches/0005-Added-LICENCE-file-as-requested-in-Request-65869.patch b/lang/php7-pecl-dio/patches/0005-Added-LICENCE-file-as-requested-in-Request-65869.patch deleted file mode 100644 index fc9961a..0000000 --- a/lang/php7-pecl-dio/patches/0005-Added-LICENCE-file-as-requested-in-Request-65869.patch +++ /dev/null @@ -1,91 +0,0 @@ -From 7c85a44880d9d748e7554f8fe7448505fa86aa28 Mon Sep 17 00:00:00 2001 -From: cyberspice -Date: Sat, 12 Oct 2013 22:20:19 +0000 -Subject: [PATCH 05/16] Added LICENCE file as requested in Request #65869 - -Files added: - LICENCE - -git-svn-id: http://svn.php.net/repository/pecl/dio/trunk@331788 c90b9560-bf6c-de11-be94-00142212c4b1 ---- - LICENSE | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 68 insertions(+) - create mode 100644 LICENSE - -diff --git a/LICENSE b/LICENSE -new file mode 100644 -index 0000000..d376afe ---- /dev/null -+++ b/LICENSE -@@ -0,0 +1,68 @@ -+-------------------------------------------------------------------- -+ The PHP License, version 3.01 -+Copyright (c) 2008 - 2013 The PHP Group. All rights reserved. -+-------------------------------------------------------------------- -+ -+Redistribution and use in source and binary forms, with or without -+modification, is permitted provided that the following conditions -+are met: -+ -+ 1. Redistributions of source code must retain the above copyright -+ notice, this list of conditions and the following disclaimer. -+ -+ 2. Redistributions in binary form must reproduce the above copyright -+ notice, this list of conditions and the following disclaimer in -+ the documentation and/or other materials provided with the -+ distribution. -+ -+ 3. The name "PHP" must not be used to endorse or promote products -+ derived from this software without prior written permission. For -+ written permission, please contact group@php.net. -+ -+ 4. Products derived from this software may not be called "PHP", nor -+ may "PHP" appear in their name, without prior written permission -+ from group@php.net. You may indicate that your software works in -+ conjunction with PHP by saying "Foo for PHP" instead of calling -+ it "PHP Foo" or "phpfoo" -+ -+ 5. The PHP Group may publish revised and/or new versions of the -+ license from time to time. Each version will be given a -+ distinguishing version number. -+ Once covered code has been published under a particular version -+ of the license, you may always continue to use it under the terms -+ of that version. You may also choose to use such covered code -+ under the terms of any subsequent version of the license -+ published by the PHP Group. No one other than the PHP Group has -+ the right to modify the terms applicable to covered code created -+ under this License. -+ -+ 6. Redistributions of any form whatsoever must retain the following -+ acknowledgment: -+ "This product includes PHP software, freely available from -+ ". -+ -+THIS SOFTWARE IS PROVIDED BY THE PHP DEVELOPMENT TEAM ``AS IS'' AND -+ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -+PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PHP -+DEVELOPMENT TEAM OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, -+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -+STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED -+OF THE POSSIBILITY OF SUCH DAMAGE. -+ -+-------------------------------------------------------------------- -+ -+This software consists of voluntary contributions made by many -+individuals on behalf of the PHP Group. -+ -+The PHP Group can be contacted via Email at group@php.net. -+ -+For more information on the PHP Group and the PHP project, -+please see . -+ -+PHP includes the Zend Engine, freely available at -+. --- -2.5.0 - diff --git a/lang/php7-pecl-dio/patches/0006-Replace-ZEND_FETCH_RESOURCE-macro-with-zend_fetch_re.patch b/lang/php7-pecl-dio/patches/0006-Replace-ZEND_FETCH_RESOURCE-macro-with-zend_fetch_re.patch deleted file mode 100644 index 6d9c483..0000000 --- a/lang/php7-pecl-dio/patches/0006-Replace-ZEND_FETCH_RESOURCE-macro-with-zend_fetch_re.patch +++ /dev/null @@ -1,117 +0,0 @@ -From b69e1067f70ef293587b72979193e68b01d90902 Mon Sep 17 00:00:00 2001 -From: Michael Heimpold -Date: Wed, 13 Jul 2016 00:23:29 +0200 -Subject: [PATCH 06/16] Replace ZEND_FETCH_RESOURCE macro with - zend_fetch_resource - -Signed-off-by: Michael Heimpold ---- - dio.c | 36 +++++++++++++++++++++++++++--------- - 1 file changed, 27 insertions(+), 9 deletions(-) - -diff --git a/dio.c b/dio.c -index 408a171..6b687ac 100644 ---- a/dio.c -+++ b/dio.c -@@ -161,7 +161,9 @@ PHP_FUNCTION(dio_dup) - return; - } - -- ZEND_FETCH_RESOURCE(f, php_fd_t *, &r_fd, -1, le_fd_name, le_fd); -+ if ((f = (php_fd_t *)zend_fetch_resource(Z_RES_P(r_fd), le_fd_name, le_fd)) == NULL) { -+ RETURN_FALSE; -+ } - - dfd = dup(f->fd); - if (dfd == -1) { -@@ -192,7 +194,9 @@ PHP_FUNCTION(dio_read) - return; - } - -- ZEND_FETCH_RESOURCE(f, php_fd_t *, &r_fd, -1, le_fd_name, le_fd); -+ if ((f = (php_fd_t *)zend_fetch_resource(Z_RES_P(r_fd), le_fd_name, le_fd)) == NULL) { -+ RETURN_FALSE; -+ } - - if (bytes <= 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Length parameter must be greater than 0."); -@@ -233,7 +237,9 @@ PHP_FUNCTION(dio_write) - RETURN_FALSE; - } - -- ZEND_FETCH_RESOURCE(f, php_fd_t *, &r_fd, -1, le_fd_name, le_fd); -+ if ((f = (php_fd_t *)zend_fetch_resource(Z_RES_P(r_fd), le_fd_name, le_fd)) == NULL) { -+ RETURN_FALSE; -+ } - - res = write(f->fd, data, trunc_len ? trunc_len : data_len); - if (res == -1) { -@@ -258,7 +264,9 @@ PHP_FUNCTION(dio_truncate) - return; - } - -- ZEND_FETCH_RESOURCE(f, php_fd_t *, &r_fd, -1, le_fd_name, le_fd); -+ if ((f = (php_fd_t *)zend_fetch_resource(Z_RES_P(r_fd), le_fd_name, le_fd)) == NULL) { -+ RETURN_FALSE; -+ } - - if (ftruncate(f->fd, offset) == -1) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "couldn't truncate %d to %ld bytes: %s", f->fd, offset, strerror(errno)); -@@ -284,7 +292,9 @@ PHP_FUNCTION(dio_stat) - return; - } - -- ZEND_FETCH_RESOURCE(f, php_fd_t *, &r_fd, -1, le_fd_name, le_fd); -+ if ((f = (php_fd_t *)zend_fetch_resource(Z_RES_P(r_fd), le_fd_name, le_fd)) == NULL) { -+ RETURN_FALSE; -+ } - - if (fstat(f->fd, &s) == -1) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "cannot stat %d: %s", f->fd, strerror(errno)); -@@ -323,7 +333,9 @@ PHP_FUNCTION(dio_seek) - return; - } - -- ZEND_FETCH_RESOURCE(f, php_fd_t *, &r_fd, -1, le_fd_name, le_fd); -+ if ((f = (php_fd_t *)zend_fetch_resource(Z_RES_P(r_fd), le_fd_name, le_fd)) == NULL) { -+ RETURN_FALSE; -+ } - - RETURN_LONG(lseek(f->fd, offset, whence)); - } -@@ -344,7 +356,9 @@ PHP_FUNCTION(dio_fcntl) - return; - } - -- ZEND_FETCH_RESOURCE(f, php_fd_t *, &r_fd, -1, le_fd_name, le_fd); -+ if ((f = (php_fd_t *)zend_fetch_resource(Z_RES_P(r_fd), le_fd_name, le_fd)) == NULL) { -+ RETURN_FALSE; -+ } - - switch (cmd) { - case F_SETLK: -@@ -454,7 +468,9 @@ PHP_FUNCTION(dio_tcsetattr) - return; - } - -- ZEND_FETCH_RESOURCE(f, php_fd_t *, &r_fd, -1, le_fd_name, le_fd); -+ if ((f = (php_fd_t *)zend_fetch_resource(Z_RES_P(r_fd), le_fd_name, le_fd)) == NULL) { -+ RETURN_FALSE; -+ } - - if (Z_TYPE_P(arg) != IS_ARRAY) { - php_error_docref(NULL TSRMLS_CC, E_WARNING,"tcsetattr, third argument should be an associative array"); -@@ -639,7 +655,9 @@ PHP_FUNCTION(dio_close) - return; - } - -- ZEND_FETCH_RESOURCE(f, php_fd_t *, &r_fd, -1, le_fd_name, le_fd); -+ if ((f = (php_fd_t *)zend_fetch_resource(Z_RES_P(r_fd), le_fd_name, le_fd)) == NULL) { -+ RETURN_FALSE; -+ } - - zend_list_delete(Z_LVAL_P(r_fd)); - } --- -2.5.0 - diff --git a/lang/php7-pecl-dio/patches/0007-Replace-ZEND_REGISTER_RESOURCE-with-zend_register_re.patch b/lang/php7-pecl-dio/patches/0007-Replace-ZEND_REGISTER_RESOURCE-with-zend_register_re.patch deleted file mode 100644 index c676a25..0000000 --- a/lang/php7-pecl-dio/patches/0007-Replace-ZEND_REGISTER_RESOURCE-with-zend_register_re.patch +++ /dev/null @@ -1,66 +0,0 @@ -From dbf03eb09bf1a41bcd140c4edba351121ac24729 Mon Sep 17 00:00:00 2001 -From: Michael Heimpold -Date: Wed, 13 Jul 2016 00:36:46 +0200 -Subject: [PATCH 07/16] Replace ZEND_REGISTER_RESOURCE with - zend_register_resource - -Signed-off-by: Michael Heimpold ---- - dio.c | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - -diff --git a/dio.c b/dio.c -index 6b687ac..6f2d58c 100644 ---- a/dio.c -+++ b/dio.c -@@ -72,9 +72,9 @@ static int new_php_fd(php_fd_t **f, int fd) - return 1; - } - --static void _dio_close_fd(zend_rsrc_list_entry *rsrc TSRMLS_DC) -+static void _dio_close_fd(zend_resource *res) - { -- php_fd_t *f = (php_fd_t *) rsrc->ptr; -+ php_fd_t *f = (php_fd_t *)zend_fetch_resource(res, NULL, le_fd); - if (f) { - close(f->fd); - free(f); -@@ -115,7 +115,7 @@ PHP_FUNCTION(dio_open) - RETURN_FALSE; - } - -- ZEND_REGISTER_RESOURCE(return_value, f, le_fd); -+ RETVAL_RES(zend_register_resource(f, le_fd)); - } - /* }}} */ - -@@ -144,7 +144,7 @@ PHP_FUNCTION(dio_fdopen) - RETURN_FALSE; - } - -- ZEND_REGISTER_RESOURCE(return_value, f, le_fd); -+ RETVAL_RES(zend_register_resource(f, le_fd)); - } - /* }}} */ - -@@ -175,7 +175,7 @@ PHP_FUNCTION(dio_dup) - RETURN_FALSE; - } - -- ZEND_REGISTER_RESOURCE(return_value, df, le_fd); -+ RETVAL_RES(zend_register_resource(f, le_fd)); - } - /* }}} */ - #endif -@@ -434,7 +434,7 @@ PHP_FUNCTION(dio_fcntl) - if (!new_php_fd(&new_f, fcntl(f->fd, cmd, Z_LVAL_P(arg)))) { - RETURN_FALSE; - } -- ZEND_REGISTER_RESOURCE(return_value, new_f, le_fd); -+ RETVAL_RES(zend_register_resource(new_f, le_fd)); - break; - } - default: --- -2.5.0 - diff --git a/lang/php7-pecl-dio/patches/0008-RETURN_STRINGL-takes-only-2-arguments.patch b/lang/php7-pecl-dio/patches/0008-RETURN_STRINGL-takes-only-2-arguments.patch deleted file mode 100644 index 2197d12..0000000 --- a/lang/php7-pecl-dio/patches/0008-RETURN_STRINGL-takes-only-2-arguments.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 47422cf01f0a352c3f5f015585a28c99dba79862 Mon Sep 17 00:00:00 2001 -From: Michael Heimpold -Date: Wed, 13 Jul 2016 00:40:08 +0200 -Subject: [PATCH 08/16] RETURN_STRINGL takes only 2 arguments - -Signed-off-by: Michael Heimpold ---- - dio.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/dio.c b/dio.c -index 6f2d58c..e8660f8 100644 ---- a/dio.c -+++ b/dio.c -@@ -24,6 +24,7 @@ - #include "php.h" - #include "php_ini.h" - #include "ext/standard/info.h" -+#include "ext/standard/php_string.h" - - #include "php_dio.h" - #include "php_dio_stream_wrappers.h" -@@ -213,7 +214,7 @@ PHP_FUNCTION(dio_read) - data = erealloc(data, res + 1); - data[res] = 0; - -- RETURN_STRINGL(data, res, 0); -+ RETURN_STRINGL(data, res); - } - /* }}} */ - --- -2.5.0 - diff --git a/lang/php7-pecl-dio/patches/0009-Replace-zend_hash_find-with-zend_hash_str_find.patch b/lang/php7-pecl-dio/patches/0009-Replace-zend_hash_find-with-zend_hash_str_find.patch deleted file mode 100644 index 85a8a07..0000000 --- a/lang/php7-pecl-dio/patches/0009-Replace-zend_hash_find-with-zend_hash_str_find.patch +++ /dev/null @@ -1,125 +0,0 @@ -From 7533f64b19006262fae7c6a4769392c67078166b Mon Sep 17 00:00:00 2001 -From: Michael Heimpold -Date: Wed, 13 Jul 2016 01:07:22 +0200 -Subject: [PATCH 09/16] Replace zend_hash_find with zend_hash_str_find - -Signed-off-by: Michael Heimpold ---- - dio.c | 44 ++++++++++++++++++++++---------------------- - 1 file changed, 22 insertions(+), 22 deletions(-) - -diff --git a/dio.c b/dio.c -index e8660f8..b489747 100644 ---- a/dio.c -+++ b/dio.c -@@ -364,7 +364,7 @@ PHP_FUNCTION(dio_fcntl) - switch (cmd) { - case F_SETLK: - case F_SETLKW: { -- zval **element; -+ zval *element; - struct flock lk = {0}; - HashTable *fh; - -@@ -374,28 +374,28 @@ PHP_FUNCTION(dio_fcntl) - } - if (Z_TYPE_P(arg) == IS_ARRAY) { - fh = HASH_OF(arg); -- if (zend_hash_find(fh, "start", sizeof("start"), (void **) &element) == FAILURE) { -+ if ((element = zend_hash_str_find(fh, "start", sizeof("start"))) == NULL) { - lk.l_start = 0; - } else { -- lk.l_start = Z_LVAL_PP(element); -+ lk.l_start = Z_LVAL_P(element); - } - -- if (zend_hash_find(fh, "length", sizeof("length"), (void **) &element) == FAILURE) { -+ if ((element = zend_hash_str_find(fh, "length", sizeof("length"))) == NULL) { - lk.l_len = 0; - } else { -- lk.l_len = Z_LVAL_PP(element); -+ lk.l_len = Z_LVAL_P(element); - } - -- if (zend_hash_find(fh, "whence", sizeof("whence"), (void **) &element) == FAILURE) { -+ if ((element = zend_hash_str_find(fh, "whence", sizeof("whence"))) == NULL) { - lk.l_whence = 0; - } else { -- lk.l_whence = Z_LVAL_PP(element); -+ lk.l_whence = Z_LVAL_P(element); - } - -- if (zend_hash_find(fh, "type", sizeof("type"), (void **) &element) == FAILURE) { -+ if ((element = zend_hash_str_find(fh, "type", sizeof("type"))) == NULL) { - lk.l_type = 0; - } else { -- lk.l_type = Z_LVAL_PP(element); -+ lk.l_type = Z_LVAL_P(element); - } - } else if (Z_TYPE_P(arg) == IS_LONG) { - lk.l_start = 0; -@@ -463,7 +463,7 @@ PHP_FUNCTION(dio_tcsetattr) - int Baud_Rate, Data_Bits=8, Stop_Bits=1, Parity=0, Flow_Control=1, Is_Canonical=1; - long BAUD,DATABITS,STOPBITS,PARITYON,PARITY; - HashTable *fh; -- zval **element; -+ zval *element; - - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rz", &r_fd, &arg) == FAILURE) { - return; -@@ -480,40 +480,40 @@ PHP_FUNCTION(dio_tcsetattr) - - fh = HASH_OF(arg); - -- if (zend_hash_find(fh, "baud", sizeof("baud"), (void **) &element) == FAILURE) { -+ if ((element = zend_hash_str_find(fh, "baud", sizeof("baud"))) == NULL) { - Baud_Rate = 9600; - } else { -- Baud_Rate = Z_LVAL_PP(element); -+ Baud_Rate = Z_LVAL_P(element); - } - -- if (zend_hash_find(fh, "bits", sizeof("bits"), (void **) &element) == FAILURE) { -+ if ((element = zend_hash_str_find(fh, "bits", sizeof("bits"))) == NULL) { - Data_Bits = 8; - } else { -- Data_Bits = Z_LVAL_PP(element); -+ Data_Bits = Z_LVAL_P(element); - } - -- if (zend_hash_find(fh, "stop", sizeof("stop"), (void **) &element) == FAILURE) { -+ if ((element = zend_hash_str_find(fh, "stop", sizeof("stop"))) == NULL) { - Stop_Bits = 1; - } else { -- Stop_Bits = Z_LVAL_PP(element); -+ Stop_Bits = Z_LVAL_P(element); - } - -- if (zend_hash_find(fh, "parity", sizeof("parity"), (void **) &element) == FAILURE) { -+ if ((element = zend_hash_str_find(fh, "parity", sizeof("parity"))) == NULL) { - Parity = 0; - } else { -- Parity = Z_LVAL_PP(element); -+ Parity = Z_LVAL_P(element); - } - -- if (zend_hash_find(fh, "flow_control", sizeof("flow_control"), (void **) &element) == FAILURE) { -+ if ((element = zend_hash_str_find(fh, "flow_control", sizeof("flow_control"))) == NULL) { - Flow_Control = 1; - } else { -- Flow_Control = Z_LVAL_PP(element); -+ Flow_Control = Z_LVAL_P(element); - } - -- if (zend_hash_find(fh, "is_canonical", sizeof("is_canonical"), (void **) &element) == FAILURE) { -+ if ((element = zend_hash_str_find(fh, "is_canonical", sizeof("is_canonical"))) == NULL) { - Is_Canonical = 0; - } else { -- Is_Canonical = Z_LVAL_PP(element); -+ Is_Canonical = Z_LVAL_P(element); - } - - /* assign to correct values... */ --- -2.5.0 - diff --git a/lang/php7-pecl-dio/patches/0010-Replace-dio_convert_to_long.patch b/lang/php7-pecl-dio/patches/0010-Replace-dio_convert_to_long.patch deleted file mode 100644 index b5d7b61..0000000 --- a/lang/php7-pecl-dio/patches/0010-Replace-dio_convert_to_long.patch +++ /dev/null @@ -1,240 +0,0 @@ -From fb31b1cf4da2bfd0830d0a83754f5ecb125d1c4a Mon Sep 17 00:00:00 2001 -From: Michael Heimpold -Date: Thu, 14 Jul 2016 00:38:52 +0200 -Subject: [PATCH 10/16] Replace dio_convert_to_long - -Signed-off-by: Michael Heimpold ---- - dio_common.c | 106 +++++++++++++++++++++++-------------------------------- - php_dio_common.h | 2 -- - 2 files changed, 44 insertions(+), 64 deletions(-) - -diff --git a/dio_common.c b/dio_common.c -index c50f56d..a5f4c63 100644 ---- a/dio_common.c -+++ b/dio_common.c -@@ -52,29 +52,12 @@ void dio_init_stream_data(php_dio_stream_data *data) { - } - /* }}} */ - --/* {{{ dio_convert_to_long -- * Returns as a long, the value of the zval regardless of its type. -- */ --long dio_convert_to_long(zval *val) { -- zval *copyval; -- long longval; -- -- ALLOC_INIT_ZVAL(copyval); -- *copyval = *val; -- convert_to_long(copyval); -- longval = Z_LVAL_P(copyval); -- zval_ptr_dtor(©val); -- -- return longval; --} --/* }}} */ -- - /* {{{ dio_assoc_array_get_basic_options - * Retrieves the basic open option values from an associative array - */ - void dio_assoc_array_get_basic_options(zval *options, php_dio_stream_data *data TSRMLS_DC) { - #if defined(DIO_HAS_FILEPERMS) || defined(DIO_NONBLOCK) -- zval **tmpzval; -+ zval *tmpzval; - HashTable *opthash; - - opthash = HASH_OF(options); -@@ -82,8 +65,8 @@ void dio_assoc_array_get_basic_options(zval *options, php_dio_stream_data *data - - #ifdef DIO_HAS_FILEPERMS - /* This is the file mode flags used by open(). */ -- if (zend_hash_find(opthash, "perms", sizeof("perms"), (void **)&tmpzval) == SUCCESS && tmpzval && *tmpzval) { -- data->perms = (int)dio_convert_to_long(*tmpzval); -+ if ((tmpzval = zend_hash_str_find(opthash, "perms", sizeof("perms"))) != NULL) { -+ data->perms = (int)zval_get_long(tmpzval); - data->has_perms = 1; - } - #endif -@@ -91,20 +74,20 @@ void dio_assoc_array_get_basic_options(zval *options, php_dio_stream_data *data - #ifdef DIO_NONBLOCK - /* This sets the underlying stream to be blocking/non - block (i.e. O_NONBLOCK) */ -- if (zend_hash_find(opthash, "is_blocking", sizeof("is_blocking"), (void **)&tmpzval) == SUCCESS && tmpzval && *tmpzval) { -- data->is_blocking = dio_convert_to_long(*tmpzval) ? 1 : 0; -+ if ((tmpzval = zend_hash_str_find(opthash, "is_blocking", sizeof("is_blocking"))) != NULL) { -+ data->is_blocking = zval_get_long(tmpzval) ? 1 : 0; - } - - /* This is the timeout value for reads in seconds. Only one of - timeout_secs or timeout_usecs need be defined to define a timeout. */ -- if (zend_hash_find(opthash, "timeout_secs", sizeof("timeout_secs"), (void **)&tmpzval) == SUCCESS && tmpzval && *tmpzval) { -- data->timeout_sec = dio_convert_to_long(*tmpzval); -+ if ((tmpzval = zend_hash_str_find(opthash, "timeout_secs", sizeof("timeout_secs"))) != NULL) { -+ data->timeout_sec = zval_get_long(tmpzval); - } - - /* This is the timeout value for reads in microseconds. Only one of - timeout_secs or timeout_usecs need be defined to define a timeout. */ -- if (zend_hash_find(opthash, "timeout_usecs", sizeof("timeout_usecs"), (void **)&tmpzval) == SUCCESS && tmpzval && *tmpzval) { -- data->timeout_usec = dio_convert_to_long(*tmpzval); -+ if ((tmpzval = zend_hash_str_find(opthash, "timeout_usecs", sizeof("timeout_usecs"))) != NULL) { -+ data->timeout_usec = zval_get_long(tmpzval); - } - - data->has_timeout = (data->timeout_sec | data->timeout_usec) ? 1 : 0; -@@ -116,33 +99,33 @@ void dio_assoc_array_get_basic_options(zval *options, php_dio_stream_data *data - * Retrieves the serial open option values from an associative array - */ - void dio_assoc_array_get_serial_options(zval *options, php_dio_stream_data *data TSRMLS_DC) { -- zval **tmpzval; -+ zval *tmpzval; - HashTable *opthash; - - opthash = HASH_OF(options); - -- if (zend_hash_find(opthash, "data_rate", sizeof("data_rate"), (void **)&tmpzval) == SUCCESS && tmpzval && *tmpzval) { -- data->data_rate = dio_convert_to_long(*tmpzval); -+ if ((tmpzval = zend_hash_str_find(opthash, "data_rate", sizeof("data_rate"))) != NULL) { -+ data->data_rate = zval_get_long(tmpzval); - } - -- if (zend_hash_find(opthash, "data_bits", sizeof("data_bits"), (void **)&tmpzval) == SUCCESS && tmpzval && *tmpzval) { -- data->data_bits = (int)dio_convert_to_long(*tmpzval); -+ if ((tmpzval = zend_hash_str_find(opthash, "data_bits", sizeof("data_bits"))) != NULL) { -+ data->data_bits = (int)zval_get_long(tmpzval); - } - -- if (zend_hash_find(opthash, "stop_bits", sizeof("stop_bits"), (void **)&tmpzval) == SUCCESS && tmpzval && *tmpzval) { -- data->stop_bits = (int)dio_convert_to_long(*tmpzval); -+ if ((tmpzval = zend_hash_str_find(opthash, "stop_bits", sizeof("stop_bits"))) != NULL) { -+ data->stop_bits = (int)zval_get_long(tmpzval); - } - -- if (zend_hash_find(opthash, "parity", sizeof("parity"), (void **)&tmpzval) == SUCCESS && tmpzval && *tmpzval) { -- data->parity = (int)dio_convert_to_long(*tmpzval); -+ if ((tmpzval = zend_hash_str_find(opthash, "parity", sizeof("parity"))) != NULL) { -+ data->parity = (int)zval_get_long(tmpzval); - } - -- if (zend_hash_find(opthash, "flow_control", sizeof("flow_control"), (void **)&tmpzval) == SUCCESS && tmpzval && *tmpzval) { -- data->flow_control = (int)(dio_convert_to_long(*tmpzval) ? 1 : 0); -+ if ((tmpzval = zend_hash_str_find(opthash, "flow_control", sizeof("flow_control"))) != NULL) { -+ data->flow_control = zval_get_long(tmpzval) ? 1 : 0; - } - -- if (zend_hash_find(opthash, "is_canonical", sizeof("is_canonical"), (void **)&tmpzval) == SUCCESS && tmpzval && *tmpzval) { -- data->canonical = (int)(dio_convert_to_long(*tmpzval) ? 1 : 0); -+ if ((tmpzval = zend_hash_str_find(opthash, "is_canonical", sizeof("is_canonical"))) != NULL) { -+ data->canonical = zval_get_long(tmpzval) ? 1 : 0; - } - } - /* }}} */ -@@ -152,13 +135,13 @@ void dio_assoc_array_get_serial_options(zval *options, php_dio_stream_data *data - */ - void dio_stream_context_get_basic_options(php_stream_context *context, php_dio_stream_data *data TSRMLS_DC) { - #if defined(DIO_HAS_FILEPERMS) || defined(DIO_NONBLOCK) -- zval **tmpzval; -+ zval *tmpzval; - #endif - - #ifdef DIO_HAS_FILEPERMS - /* This is the file mode flags used by open(). */ -- if (php_stream_context_get_option(context, "dio", "perms", &tmpzval) == SUCCESS && tmpzval && *tmpzval) { -- data->perms = (int)dio_convert_to_long(*tmpzval); -+ if ((tmpzval = php_stream_context_get_option(context, "dio", "perms")) != NULL) { -+ data->perms = (int)zval_get_long(tmpzval); - data->has_perms = 1; - } - #endif -@@ -166,20 +149,20 @@ void dio_stream_context_get_basic_options(php_stream_context *context, php_dio_s - #ifdef DIO_NONBLOCK - /* This sets the underlying stream to be blocking/non - block (i.e. O_NONBLOCK) */ -- if (php_stream_context_get_option(context, "dio", "is_blocking", &tmpzval) == SUCCESS && tmpzval && *tmpzval) { -- data->is_blocking = dio_convert_to_long(*tmpzval) ? 1 : 0; -+ if ((tmpzval = php_stream_context_get_option(context, "dio", "is_blocking")) != NULL) { -+ data->is_blocking = zval_get_long(tmpzval) ? 1 : 0; - } - - /* This is the timeout value for reads in seconds. Only one of - timeout_secs or timeout_usecs need be defined to define a timeout. */ -- if (php_stream_context_get_option(context, "dio", "timeout_secs", &tmpzval) == SUCCESS && tmpzval && *tmpzval) { -- data->timeout_sec = dio_convert_to_long(*tmpzval); -+ if ((tmpzval = php_stream_context_get_option(context, "dio", "timeout_secs")) != NULL) { -+ data->timeout_sec = zval_get_long(tmpzval); - } - - /* This is the timeout value for reads in microseconds. Only one of - timeout_secs or timeout_usecs need be defined to define a timeout. */ -- if (php_stream_context_get_option(context, "dio", "timeout_usecs", &tmpzval) == SUCCESS && tmpzval && *tmpzval) { -- data->timeout_usec = dio_convert_to_long(*tmpzval); -+ if ((tmpzval = php_stream_context_get_option(context, "dio", "timeout_usecs")) != NULL) { -+ data->timeout_usec = zval_get_long(tmpzval); - } - - data->has_timeout = (data->timeout_sec | data->timeout_usec) ? 1 : 0; -@@ -191,30 +174,30 @@ void dio_stream_context_get_basic_options(php_stream_context *context, php_dio_s - * Extracts the option values for dio.serial mode from a context - */ - void dio_stream_context_get_serial_options(php_stream_context *context, php_dio_stream_data *data TSRMLS_DC) { -- zval **tmpzval; -+ zval *tmpzval; - -- if (php_stream_context_get_option(context, "dio", "data_rate", &tmpzval) == SUCCESS && tmpzval && *tmpzval) { -- data->data_rate = dio_convert_to_long(*tmpzval); -+ if ((tmpzval = php_stream_context_get_option(context, "dio", "data_rate")) != NULL) { -+ data->data_rate = zval_get_long(tmpzval); - } - -- if (php_stream_context_get_option(context, "dio", "data_bits", &tmpzval) == SUCCESS && tmpzval && *tmpzval) { -- data->data_bits = (int)dio_convert_to_long(*tmpzval); -+ if ((tmpzval = php_stream_context_get_option(context, "dio", "data_bits")) != NULL) { -+ data->data_bits = (int)zval_get_long(tmpzval); - } - -- if (php_stream_context_get_option(context, "dio", "stop_bits", &tmpzval) == SUCCESS && tmpzval && *tmpzval) { -- data->stop_bits = (int)dio_convert_to_long(*tmpzval); -+ if ((tmpzval = php_stream_context_get_option(context, "dio", "stop_bits")) != NULL) { -+ data->stop_bits = (int)zval_get_long(tmpzval); - } - -- if (php_stream_context_get_option(context, "dio", "parity", &tmpzval) == SUCCESS && tmpzval && *tmpzval) { -- data->parity = (int)dio_convert_to_long(*tmpzval); -+ if ((tmpzval = php_stream_context_get_option(context, "dio", "parity")) != NULL) { -+ data->parity = (int)zval_get_long(tmpzval); - } - -- if (php_stream_context_get_option(context, "dio", "flow_control", &tmpzval) == SUCCESS && tmpzval && *tmpzval) { -- data->flow_control = (int)(dio_convert_to_long(*tmpzval) ? 1 : 0); -+ if ((tmpzval = php_stream_context_get_option(context, "dio", "flow_control")) != NULL) { -+ data->flow_control = zval_get_long(tmpzval) ? 1 : 0; - } - -- if (php_stream_context_get_option(context, "dio", "is_canonical", &tmpzval) == SUCCESS && tmpzval && *tmpzval) { -- data->canonical = (int)(dio_convert_to_long(*tmpzval) ? 1 : 0); -+ if ((tmpzval = php_stream_context_get_option(context, "dio", "is_canonical")) != NULL) { -+ data->canonical = zval_get_long(tmpzval) ? 1 : 0; - } - } - /* }}} */ -@@ -227,4 +210,3 @@ void dio_stream_context_get_serial_options(php_stream_context *context, php_dio_ - * vim600: fdm=marker - * vim: sw=4 ts=4 noet - */ -- -diff --git a/php_dio_common.h b/php_dio_common.h -index f6e4d98..6b14040 100644 ---- a/php_dio_common.h -+++ b/php_dio_common.h -@@ -35,8 +35,6 @@ - #define DIO_STREAM_TYPE_RAW 1 - #define DIO_STREAM_TYPE_SERIAL 2 - --long dio_convert_to_long(zval *val); -- - php_dio_stream_data * dio_create_stream_data(void); - - void dio_init_stream_data(php_dio_stream_data *data); --- -2.5.0 - diff --git a/lang/php7-pecl-dio/patches/0011-Adopt-to-changed-stream-API-interface.patch b/lang/php7-pecl-dio/patches/0011-Adopt-to-changed-stream-API-interface.patch deleted file mode 100644 index dde8565..0000000 --- a/lang/php7-pecl-dio/patches/0011-Adopt-to-changed-stream-API-interface.patch +++ /dev/null @@ -1,89 +0,0 @@ -From 3d71063ada4f1a4ef90611d263aa8e1d4f275359 Mon Sep 17 00:00:00 2001 -From: Michael Heimpold -Date: Thu, 14 Jul 2016 00:50:12 +0200 -Subject: [PATCH 11/16] Adopt to changed stream API interface - -Signed-off-by: Michael Heimpold ---- - dio_posix.c | 2 +- - dio_stream_wrappers.c | 14 +++++++------- - dio_win32.c | 2 +- - php_dio_common.h | 2 +- - 4 files changed, 10 insertions(+), 10 deletions(-) - -diff --git a/dio_posix.c b/dio_posix.c -index 6ed8630..527d683 100644 ---- a/dio_posix.c -+++ b/dio_posix.c -@@ -474,7 +474,7 @@ int dio_common_set_option(php_dio_stream_data *data, int option, int value, void - /* {{{ dio_raw_open_stream - * Opens the underlying stream. - */ --int dio_raw_open_stream(char *filename, char *mode, php_dio_stream_data *data TSRMLS_DC) { -+int dio_raw_open_stream(const char *filename, char *mode, php_dio_stream_data *data TSRMLS_DC) { - php_dio_posix_stream_data *pdata = (php_dio_posix_stream_data*)data; - pdata->flags = dio_stream_mode_to_flags(mode); - -diff --git a/dio_stream_wrappers.c b/dio_stream_wrappers.c -index 811bc07..817b0d1 100644 ---- a/dio_stream_wrappers.c -+++ b/dio_stream_wrappers.c -@@ -126,12 +126,12 @@ php_stream_ops dio_raw_stream_ops = { - * fopen for the dio.raw stream. - */ - static php_stream *dio_raw_fopen_wrapper(php_stream_wrapper *wrapper, -- char *path, char *mode, -- int options, char **opened_path, -- php_stream_context *context STREAMS_DC TSRMLS_DC) { -+ const char *path, const char *mode, int options, -+ zend_string **opened_path, php_stream_context *context STREAMS_DC) -+{ - php_dio_stream_data *data; - php_stream *stream; -- char *filename; -+ const char *filename; - - /* Check it was actually for us (not a corrupted function pointer - somewhere!). */ -@@ -287,9 +287,9 @@ php_stream_ops dio_serial_stream_ops = { - * fopen for the dio.raw stream. - */ - static php_stream *dio_serial_fopen_wrapper(php_stream_wrapper *wrapper, -- char *path, char *mode, -- int options, char **opened_path, -- php_stream_context *context STREAMS_DC TSRMLS_DC) { -+ const char *path, const char *mode, int options, -+ zend_string **opened_path, php_stream_context *context STREAMS_DC) -+{ - php_dio_stream_data *data; - php_stream *stream; - char *filename; -diff --git a/dio_win32.c b/dio_win32.c -index e7ccedd..1023d36 100644 ---- a/dio_win32.c -+++ b/dio_win32.c -@@ -505,7 +505,7 @@ int dio_common_set_option(php_dio_stream_data *data, int option, int value, void - /* {{{ dio_raw_open_stream - * Opens the underlying stream. - */ --int dio_raw_open_stream(char *filename, char *mode, php_dio_stream_data *data TSRMLS_DC) { -+int dio_raw_open_stream(const char *filename, char *mode, php_dio_stream_data *data TSRMLS_DC) { - php_dio_win32_stream_data *wdata = (php_dio_win32_stream_data*)data; - DWORD err; - -diff --git a/php_dio_common.h b/php_dio_common.h -index 6b14040..7a75370 100644 ---- a/php_dio_common.h -+++ b/php_dio_common.h -@@ -55,7 +55,7 @@ int dio_common_close(php_dio_stream_data *data); - - int dio_common_set_option(php_dio_stream_data *data, int option, int value, void *ptrparam); - --int dio_raw_open_stream(char *filename, char *mode, php_dio_stream_data *data TSRMLS_DC); -+int dio_raw_open_stream(const char *filename, char *mode, php_dio_stream_data *data TSRMLS_DC); - - int dio_serial_uninit(php_dio_stream_data *data); - --- -2.5.0 - diff --git a/lang/php7-pecl-dio/patches/0012-Remove-ancient-macros-TSRMLS_CC-and-TSRMLS_DC.patch b/lang/php7-pecl-dio/patches/0012-Remove-ancient-macros-TSRMLS_CC-and-TSRMLS_DC.patch deleted file mode 100644 index c15fd89..0000000 --- a/lang/php7-pecl-dio/patches/0012-Remove-ancient-macros-TSRMLS_CC-and-TSRMLS_DC.patch +++ /dev/null @@ -1,829 +0,0 @@ -From 760ec7072cbba2cbbb6e4e17b0c54ee3c7b661a8 Mon Sep 17 00:00:00 2001 -From: Michael Heimpold -Date: Thu, 14 Jul 2016 00:59:42 +0200 -Subject: [PATCH 12/16] Remove ancient macros TSRMLS_CC and TSRMLS_DC - -Signed-off-by: Michael Heimpold ---- - dio.c | 70 +++++++++++++++++++++++++-------------------------- - dio_common.c | 8 +++--- - dio_posix.c | 22 ++++++++-------- - dio_stream_wrappers.c | 48 +++++++++++++++++------------------ - dio_win32.c | 46 ++++++++++++++++----------------- - php_dio_common.h | 12 ++++----- - 6 files changed, 103 insertions(+), 103 deletions(-) - -diff --git a/dio.c b/dio.c -index b489747..7bad575 100644 ---- a/dio.c -+++ b/dio.c -@@ -93,11 +93,11 @@ PHP_FUNCTION(dio_open) - long mode = 0; - int fd; - -- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sl|l", &file_name, &file_name_length, &flags, &mode) == FAILURE) { -+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "sl|l", &file_name, &file_name_length, &flags, &mode) == FAILURE) { - return; - } - -- if (php_check_open_basedir(file_name TSRMLS_CC) || DIO_SAFE_MODE_CHECK(file_name, "wb+")) { -+ if (php_check_open_basedir(file_name) || DIO_SAFE_MODE_CHECK(file_name, "wb+")) { - RETURN_FALSE; - } - -@@ -108,7 +108,7 @@ PHP_FUNCTION(dio_open) - } - - if (fd == -1) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "cannot open file %s with flags %ld and permissions %ld: %s", file_name, flags, mode, strerror(errno)); -+ php_error_docref(NULL, E_WARNING, "cannot open file %s with flags %ld and permissions %ld: %s", file_name, flags, mode, strerror(errno)); - RETURN_FALSE; - } - -@@ -130,14 +130,14 @@ PHP_FUNCTION(dio_fdopen) - long lfd; - int fd; - -- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &lfd) == FAILURE) { -+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &lfd) == FAILURE) { - return; - } - - fd = (int)lfd; - - if ((fcntl(fd, F_GETFL, 0) == -1) && (errno == EBADF)) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Bad file descriptor %d", fd); -+ php_error_docref(NULL, E_WARNING, "Bad file descriptor %d", fd); - RETURN_FALSE; - } - -@@ -158,7 +158,7 @@ PHP_FUNCTION(dio_dup) - php_fd_t *f, *df; - int dfd; - -- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &r_fd) == FAILURE) { -+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &r_fd) == FAILURE) { - return; - } - -@@ -168,7 +168,7 @@ PHP_FUNCTION(dio_dup) - - dfd = dup(f->fd); - if (dfd == -1) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "cannot duplication file descriptor %d: %s", f->fd, strerror(errno)); -+ php_error_docref(NULL, E_WARNING, "cannot duplication file descriptor %d: %s", f->fd, strerror(errno)); - RETURN_FALSE; - } - -@@ -191,7 +191,7 @@ PHP_FUNCTION(dio_read) - long bytes = 1024; - ssize_t res; - -- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|l", &r_fd, &bytes) == FAILURE) { -+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|l", &r_fd, &bytes) == FAILURE) { - return; - } - -@@ -200,7 +200,7 @@ PHP_FUNCTION(dio_read) - } - - if (bytes <= 0) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Length parameter must be greater than 0."); -+ php_error_docref(NULL, E_WARNING, "Length parameter must be greater than 0."); - RETURN_FALSE; - } - -@@ -229,12 +229,12 @@ PHP_FUNCTION(dio_write) - long trunc_len = 0; - ssize_t res; - -- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs|l", &r_fd, &data, &data_len, &trunc_len) == FAILURE) { -+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "rs|l", &r_fd, &data, &data_len, &trunc_len) == FAILURE) { - return; - } - - if (trunc_len < 0 || trunc_len > data_len) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "length must be greater or equal to zero and less then the length of the specified string."); -+ php_error_docref(NULL, E_WARNING, "length must be greater or equal to zero and less then the length of the specified string."); - RETURN_FALSE; - } - -@@ -244,7 +244,7 @@ PHP_FUNCTION(dio_write) - - res = write(f->fd, data, trunc_len ? trunc_len : data_len); - if (res == -1) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "cannot write data to file descriptor %d: %s", f->fd, strerror(errno)); -+ php_error_docref(NULL, E_WARNING, "cannot write data to file descriptor %d: %s", f->fd, strerror(errno)); - } - - RETURN_LONG(res); -@@ -261,7 +261,7 @@ PHP_FUNCTION(dio_truncate) - php_fd_t *f; - long offset; - -- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &r_fd, &offset) == FAILURE) { -+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "rl", &r_fd, &offset) == FAILURE) { - return; - } - -@@ -270,7 +270,7 @@ PHP_FUNCTION(dio_truncate) - } - - if (ftruncate(f->fd, offset) == -1) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "couldn't truncate %d to %ld bytes: %s", f->fd, offset, strerror(errno)); -+ php_error_docref(NULL, E_WARNING, "couldn't truncate %d to %ld bytes: %s", f->fd, offset, strerror(errno)); - RETURN_FALSE; - } - -@@ -289,7 +289,7 @@ PHP_FUNCTION(dio_stat) - php_fd_t *f; - struct stat s; - -- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &r_fd) == FAILURE) { -+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &r_fd) == FAILURE) { - return; - } - -@@ -298,7 +298,7 @@ PHP_FUNCTION(dio_stat) - } - - if (fstat(f->fd, &s) == -1) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "cannot stat %d: %s", f->fd, strerror(errno)); -+ php_error_docref(NULL, E_WARNING, "cannot stat %d: %s", f->fd, strerror(errno)); - RETURN_FALSE; - } - -@@ -330,7 +330,7 @@ PHP_FUNCTION(dio_seek) - long offset; - long whence = SEEK_SET; - -- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl|l", &r_fd, &offset, &whence) == FAILURE) { -+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "rl|l", &r_fd, &offset, &whence) == FAILURE) { - return; - } - -@@ -353,7 +353,7 @@ PHP_FUNCTION(dio_fcntl) - php_fd_t *f; - long cmd; - -- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl|z", &r_fd, &cmd, &arg) == FAILURE) { -+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "rl|z", &r_fd, &cmd, &arg) == FAILURE) { - return; - } - -@@ -369,7 +369,7 @@ PHP_FUNCTION(dio_fcntl) - HashTable *fh; - - if (!arg) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "expects argument 3 to be array or int, none given"); -+ php_error_docref(NULL, E_WARNING, "expects argument 3 to be array or int, none given"); - RETURN_FALSE; - } - if (Z_TYPE_P(arg) == IS_ARRAY) { -@@ -403,7 +403,7 @@ PHP_FUNCTION(dio_fcntl) - lk.l_whence = SEEK_SET; - lk.l_type = Z_LVAL_P(arg); - } else { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "expects argument 3 to be array or int, %s given", zend_zval_type_name(arg)); -+ php_error_docref(NULL, E_WARNING, "expects argument 3 to be array or int, %s given", zend_zval_type_name(arg)); - RETURN_FALSE; - } - -@@ -428,7 +428,7 @@ PHP_FUNCTION(dio_fcntl) - php_fd_t *new_f; - - if (!arg || Z_TYPE_P(arg) != IS_LONG) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "expects argument 3 to be int"); -+ php_error_docref(NULL, E_WARNING, "expects argument 3 to be int"); - RETURN_FALSE; - } - -@@ -440,7 +440,7 @@ PHP_FUNCTION(dio_fcntl) - } - default: - if (!arg || Z_TYPE_P(arg) != IS_LONG) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "expects argument 3 to be int"); -+ php_error_docref(NULL, E_WARNING, "expects argument 3 to be int"); - RETURN_FALSE; - } - -@@ -465,7 +465,7 @@ PHP_FUNCTION(dio_tcsetattr) - HashTable *fh; - zval *element; - -- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rz", &r_fd, &arg) == FAILURE) { -+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "rz", &r_fd, &arg) == FAILURE) { - return; - } - -@@ -474,7 +474,7 @@ PHP_FUNCTION(dio_tcsetattr) - } - - if (Z_TYPE_P(arg) != IS_ARRAY) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING,"tcsetattr, third argument should be an associative array"); -+ php_error_docref(NULL, E_WARNING,"tcsetattr, third argument should be an associative array"); - return; - } - -@@ -564,7 +564,7 @@ PHP_FUNCTION(dio_tcsetattr) - BAUD = B50; - break; - default: -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid baud rate %d", Baud_Rate); -+ php_error_docref(NULL, E_WARNING, "invalid baud rate %d", Baud_Rate); - RETURN_FALSE; - } - switch (Data_Bits) { -@@ -581,7 +581,7 @@ PHP_FUNCTION(dio_tcsetattr) - DATABITS = CS5; - break; - default: -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid data bits %d", Data_Bits); -+ php_error_docref(NULL, E_WARNING, "invalid data bits %d", Data_Bits); - RETURN_FALSE; - } - switch (Stop_Bits) { -@@ -592,7 +592,7 @@ PHP_FUNCTION(dio_tcsetattr) - STOPBITS = CSTOPB; - break; - default: -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid stop bits %d", Stop_Bits); -+ php_error_docref(NULL, E_WARNING, "invalid stop bits %d", Stop_Bits); - RETURN_FALSE; - } - -@@ -610,7 +610,7 @@ PHP_FUNCTION(dio_tcsetattr) - PARITY = 0; - break; - default: -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid parity %d", Parity); -+ php_error_docref(NULL, E_WARNING, "invalid parity %d", Parity); - RETURN_FALSE; - } - -@@ -652,7 +652,7 @@ PHP_FUNCTION(dio_close) - zval *r_fd; - php_fd_t *f; - -- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &r_fd) == FAILURE) { -+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &r_fd) == FAILURE) { - return; - } - -@@ -669,7 +669,7 @@ PHP_FUNCTION(dio_close) - /* {{{ dio_init_legacy_defines - * Initialises the legacy PHP defines - */ --static void dio_init_legacy_defines(int module_number TSRMLS_DC) { -+static void dio_init_legacy_defines(int module_number) { - RDIOC(O_RDONLY); - RDIOC(O_WRONLY); - RDIOC(O_RDWR); -@@ -852,11 +852,11 @@ PHP_MINIT_FUNCTION(dio) - /* Legacy resource destructor. */ - le_fd = zend_register_list_destructors_ex(_dio_close_fd, NULL, le_fd_name, module_number); - -- dio_init_legacy_defines(module_number TSRMLS_CC); -+ dio_init_legacy_defines(module_number); - - /* Register the stream wrappers */ -- return (php_register_url_stream_wrapper(DIO_RAW_STREAM_NAME, &php_dio_raw_stream_wrapper TSRMLS_CC) == SUCCESS && -- php_register_url_stream_wrapper(DIO_SERIAL_STREAM_NAME, &php_dio_serial_stream_wrapper TSRMLS_CC) == SUCCESS) ? SUCCESS : FAILURE; -+ return (php_register_url_stream_wrapper(DIO_RAW_STREAM_NAME, &php_dio_raw_stream_wrapper) == SUCCESS && -+ php_register_url_stream_wrapper(DIO_SERIAL_STREAM_NAME, &php_dio_serial_stream_wrapper) == SUCCESS) ? SUCCESS : FAILURE; - } - /* }}} */ - -@@ -864,8 +864,8 @@ PHP_MINIT_FUNCTION(dio) - */ - PHP_MSHUTDOWN_FUNCTION(dio) - { -- return (php_unregister_url_stream_wrapper(DIO_RAW_STREAM_NAME TSRMLS_CC) == SUCCESS && -- php_unregister_url_stream_wrapper(DIO_SERIAL_STREAM_NAME TSRMLS_CC) == SUCCESS) ? SUCCESS : FAILURE; -+ return (php_unregister_url_stream_wrapper(DIO_RAW_STREAM_NAME) == SUCCESS && -+ php_unregister_url_stream_wrapper(DIO_SERIAL_STREAM_NAME) == SUCCESS) ? SUCCESS : FAILURE; - } - /* }}} */ - -diff --git a/dio_common.c b/dio_common.c -index a5f4c63..d09c0ec 100644 ---- a/dio_common.c -+++ b/dio_common.c -@@ -55,7 +55,7 @@ void dio_init_stream_data(php_dio_stream_data *data) { - /* {{{ dio_assoc_array_get_basic_options - * Retrieves the basic open option values from an associative array - */ --void dio_assoc_array_get_basic_options(zval *options, php_dio_stream_data *data TSRMLS_DC) { -+void dio_assoc_array_get_basic_options(zval *options, php_dio_stream_data *data) { - #if defined(DIO_HAS_FILEPERMS) || defined(DIO_NONBLOCK) - zval *tmpzval; - HashTable *opthash; -@@ -98,7 +98,7 @@ void dio_assoc_array_get_basic_options(zval *options, php_dio_stream_data *data - /* {{{ dio_assoc_array_get_serial_options - * Retrieves the serial open option values from an associative array - */ --void dio_assoc_array_get_serial_options(zval *options, php_dio_stream_data *data TSRMLS_DC) { -+void dio_assoc_array_get_serial_options(zval *options, php_dio_stream_data *data) { - zval *tmpzval; - HashTable *opthash; - -@@ -133,7 +133,7 @@ void dio_assoc_array_get_serial_options(zval *options, php_dio_stream_data *data - /* {{{ dio_stream_context_get_raw_options - * Extracts the option values for dio.raw mode from a context - */ --void dio_stream_context_get_basic_options(php_stream_context *context, php_dio_stream_data *data TSRMLS_DC) { -+void dio_stream_context_get_basic_options(php_stream_context *context, php_dio_stream_data *data) { - #if defined(DIO_HAS_FILEPERMS) || defined(DIO_NONBLOCK) - zval *tmpzval; - #endif -@@ -173,7 +173,7 @@ void dio_stream_context_get_basic_options(php_stream_context *context, php_dio_s - /* {{{ dio_stream_context_get_serial_options - * Extracts the option values for dio.serial mode from a context - */ --void dio_stream_context_get_serial_options(php_stream_context *context, php_dio_stream_data *data TSRMLS_DC) { -+void dio_stream_context_get_serial_options(php_stream_context *context, php_dio_stream_data *data) { - zval *tmpzval; - - if ((tmpzval = php_stream_context_get_option(context, "dio", "data_rate")) != NULL) { -diff --git a/dio_posix.c b/dio_posix.c -index 527d683..843e234 100644 ---- a/dio_posix.c -+++ b/dio_posix.c -@@ -474,7 +474,7 @@ int dio_common_set_option(php_dio_stream_data *data, int option, int value, void - /* {{{ dio_raw_open_stream - * Opens the underlying stream. - */ --int dio_raw_open_stream(const char *filename, char *mode, php_dio_stream_data *data TSRMLS_DC) { -+int dio_raw_open_stream(const char *filename, const char *mode, php_dio_stream_data *data) { - php_dio_posix_stream_data *pdata = (php_dio_posix_stream_data*)data; - pdata->flags = dio_stream_mode_to_flags(mode); - -@@ -498,7 +498,7 @@ int dio_raw_open_stream(const char *filename, char *mode, php_dio_stream_data *d - if (pdata->fd < 0) { - switch (errno) { - case EEXIST: -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "File exists!"); -+ php_error_docref(NULL, E_WARNING, "File exists!"); - return 0; - default: - return 0; -@@ -512,36 +512,36 @@ int dio_raw_open_stream(const char *filename, char *mode, php_dio_stream_data *d - /* {{{ dio_serial_init - * Initialises the serial settings storing the original settings before hand. - */ --static int dio_serial_init(php_dio_stream_data *data TSRMLS_DC) { -+static int dio_serial_init(php_dio_stream_data *data) { - php_dio_posix_stream_data *pdata = (php_dio_posix_stream_data*)data; - int ret = 0, data_bits_def, stop_bits_def, parity_def; - struct termios tio; - speed_t rate_def; - - if (!dio_data_rate_to_define(data->data_rate, &rate_def)) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid data_rate value (%ld)", data->data_rate); -+ php_error_docref(NULL, E_WARNING, "invalid data_rate value (%ld)", data->data_rate); - return 0; - } - - if (!dio_data_bits_to_define(data->data_bits, &data_bits_def)) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid data_bits value (%d)", data->data_bits); -+ php_error_docref(NULL, E_WARNING, "invalid data_bits value (%d)", data->data_bits); - return 0; - } - - if (!dio_stop_bits_to_define(data->stop_bits, &stop_bits_def)) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid stop_bits value (%d)", data->stop_bits); -+ php_error_docref(NULL, E_WARNING, "invalid stop_bits value (%d)", data->stop_bits); - return 0; - } - - if (!dio_parity_to_define(data->parity, &parity_def)) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid parity value (%d)", data->parity); -+ php_error_docref(NULL, E_WARNING, "invalid parity value (%d)", data->parity); - return 0; - } - - ret = tcgetattr(pdata->fd, &(pdata->oldtio)); - if (ret < 0) { - if ((errno == ENOTTY) || (errno == ENODEV)) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Not a serial port or terminal!"); -+ php_error_docref(NULL, E_WARNING, "Not a serial port or terminal!"); - } - return 0; - } -@@ -632,7 +632,7 @@ int dio_serial_purge(php_dio_stream_data *data) { - /* {{{ dio_serial_open_stream - * Opens the underlying stream. - */ --int dio_serial_open_stream(char *filename, char *mode, php_dio_stream_data *data TSRMLS_DC) { -+int dio_serial_open_stream(char *filename, char *mode, php_dio_stream_data *data) { - php_dio_posix_stream_data *pdata = (php_dio_posix_stream_data*)data; - - #ifdef O_NOCTTY -@@ -640,11 +640,11 @@ int dio_serial_open_stream(char *filename, char *mode, php_dio_stream_data *data - pdata->flags |= O_NOCTTY; - #endif - -- if (!dio_raw_open_stream(filename, mode, data TSRMLS_CC)) { -+ if (!dio_raw_open_stream(filename, mode, data)) { - return 0; - } - -- if (!dio_serial_init(data TSRMLS_CC)) { -+ if (!dio_serial_init(data)) { - close(pdata->fd); - return 0; - } -diff --git a/dio_stream_wrappers.c b/dio_stream_wrappers.c -index 817b0d1..eb23752 100644 ---- a/dio_stream_wrappers.c -+++ b/dio_stream_wrappers.c -@@ -36,7 +36,7 @@ - /* {{{ dio_stream_write - * Write to the stream - */ --static size_t dio_stream_write(php_stream *stream, const char *buf, size_t count TSRMLS_DC) -+static size_t dio_stream_write(php_stream *stream, const char *buf, size_t count) - { - return dio_common_write((php_dio_stream_data*)stream->abstract, buf, count); - } -@@ -45,7 +45,7 @@ static size_t dio_stream_write(php_stream *stream, const char *buf, size_t count - /* {{{ dio_stream_read - * Read from the stream - */ --static size_t dio_stream_read(php_stream *stream, char *buf, size_t count TSRMLS_DC) -+static size_t dio_stream_read(php_stream *stream, char *buf, size_t count) - { - php_dio_stream_data* data = (php_dio_stream_data*)stream->abstract; - size_t bytes = dio_common_read(data, buf, count); -@@ -58,7 +58,7 @@ static size_t dio_stream_read(php_stream *stream, char *buf, size_t count TSRMLS - /* {{{ dio_stream_flush - * Flush the stream. For raw streams this does nothing. - */ --static int dio_stream_flush(php_stream *stream TSRMLS_DC) -+static int dio_stream_flush(php_stream *stream) - { - return 1; - } -@@ -67,7 +67,7 @@ static int dio_stream_flush(php_stream *stream TSRMLS_DC) - /* {{{ dio_stream_close - * Close the stream - */ --static int dio_stream_close(php_stream *stream, int close_handle TSRMLS_DC) -+static int dio_stream_close(php_stream *stream, int close_handle) - { - php_dio_stream_data *abstract = (php_dio_stream_data*)stream->abstract; - -@@ -83,7 +83,7 @@ static int dio_stream_close(php_stream *stream, int close_handle TSRMLS_DC) - /* {{{ dio_stream_set_option - * Set the stream options. - */ --static int dio_stream_set_option(php_stream *stream, int option, int value, void *ptrparam TSRMLS_DC) -+static int dio_stream_set_option(php_stream *stream, int option, int value, void *ptrparam) - { - php_dio_stream_data *abstract = (php_dio_stream_data*)stream->abstract; - -@@ -143,7 +143,7 @@ static php_stream *dio_raw_fopen_wrapper(php_stream_wrapper *wrapper, - filename = path + sizeof(DIO_RAW_STREAM_PROTOCOL) - 1; - - /* Check we can actually access it. */ -- if (php_check_open_basedir(filename TSRMLS_CC) || DIO_SAFE_MODE_CHECK(filename, mode)) { -+ if (php_check_open_basedir(filename) || DIO_SAFE_MODE_CHECK(filename, mode)) { - return NULL; - } - -@@ -152,11 +152,11 @@ static php_stream *dio_raw_fopen_wrapper(php_stream_wrapper *wrapper, - - /* Parse the context. */ - if (context) { -- dio_stream_context_get_basic_options(context, data TSRMLS_CC); -+ dio_stream_context_get_basic_options(context, data); - } - - /* Try and open a raw stream. */ -- if (!dio_raw_open_stream(filename, mode, data TSRMLS_CC)) { -+ if (!dio_raw_open_stream(filename, mode, data)) { - return NULL; - } - -@@ -199,7 +199,7 @@ PHP_FUNCTION(dio_raw) { - char *mode; - int mode_len; - -- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|z", &filename, &filename_len, &mode, &mode_len, &options) == FAILURE) { -+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|z", &filename, &filename_len, &mode, &mode_len, &options) == FAILURE) { - RETURN_FALSE; - } - -@@ -209,7 +209,7 @@ PHP_FUNCTION(dio_raw) { - } - - /* Check we can actually access the file. */ -- if (php_check_open_basedir(filename TSRMLS_CC) || DIO_SAFE_MODE_CHECK(filename, mode)) { -+ if (php_check_open_basedir(filename) || DIO_SAFE_MODE_CHECK(filename, mode)) { - RETURN_FALSE; - } - -@@ -217,11 +217,11 @@ PHP_FUNCTION(dio_raw) { - data->stream_type = DIO_STREAM_TYPE_RAW; - - if (options) { -- dio_assoc_array_get_basic_options(options, data TSRMLS_CC); -+ dio_assoc_array_get_basic_options(options, data); - } - - /* Try and open a raw stream. */ -- if (dio_raw_open_stream(filename, mode, data TSRMLS_CC)) { -+ if (dio_raw_open_stream(filename, mode, data)) { - stream = php_stream_alloc(&dio_raw_stream_ops, data, 0, mode); - if (!stream) { - (void) dio_common_close(data); -@@ -244,7 +244,7 @@ PHP_FUNCTION(dio_raw) { - * stream, if it is write only it flushes the write, otherwise it flushes - * both. - */ --static int dio_serial_stream_flush(php_stream *stream TSRMLS_DC) -+static int dio_serial_stream_flush(php_stream *stream) - { - return dio_serial_purge((php_dio_stream_data*)stream->abstract); - } -@@ -254,7 +254,7 @@ static int dio_serial_stream_flush(php_stream *stream TSRMLS_DC) - * Close the stream. Restores the serial settings to their value before - * the stream was open. - */ --static int dio_serial_stream_close(php_stream *stream, int close_handle TSRMLS_DC) -+static int dio_serial_stream_close(php_stream *stream, int close_handle) - { - php_dio_stream_data *abstract = (php_dio_stream_data*)stream->abstract; - -@@ -304,7 +304,7 @@ static php_stream *dio_serial_fopen_wrapper(php_stream_wrapper *wrapper, - filename = path + sizeof(DIO_SERIAL_STREAM_PROTOCOL) - 1; - - /* Check we can actually access it. */ -- if (php_check_open_basedir(filename TSRMLS_CC) || DIO_SAFE_MODE_CHECK(filename, mode)) { -+ if (php_check_open_basedir(filename) || DIO_SAFE_MODE_CHECK(filename, mode)) { - return NULL; - } - -@@ -313,12 +313,12 @@ static php_stream *dio_serial_fopen_wrapper(php_stream_wrapper *wrapper, - - /* Parse the context. */ - if (context) { -- dio_stream_context_get_basic_options(context, data TSRMLS_CC); -- dio_stream_context_get_serial_options(context, data TSRMLS_CC); -+ dio_stream_context_get_basic_options(context, data); -+ dio_stream_context_get_serial_options(context, data); - } - - /* Try and open a serial stream. */ -- if (!dio_serial_open_stream(filename, mode, data TSRMLS_CC)) { -+ if (!dio_serial_open_stream(filename, mode, data)) { - return NULL; - } - -@@ -359,18 +359,18 @@ PHP_FUNCTION(dio_serial) { - char *mode; - int mode_len; - -- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|z", &filename, &filename_len, &mode, &mode_len, &options) == FAILURE) { -+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|z", &filename, &filename_len, &mode, &mode_len, &options) == FAILURE) { - RETURN_FALSE; - } - - /* Check the third argument is an array. */ - if (options && (Z_TYPE_P(options) != IS_ARRAY)) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING,"dio_serial, the third argument should be an array of options"); -+ php_error_docref(NULL, E_WARNING,"dio_serial, the third argument should be an array of options"); - RETURN_FALSE; - } - - /* Check we can actually access the file. */ -- if (php_check_open_basedir(filename TSRMLS_CC) || DIO_SAFE_MODE_CHECK(filename, mode)) { -+ if (php_check_open_basedir(filename) || DIO_SAFE_MODE_CHECK(filename, mode)) { - RETURN_FALSE; - } - -@@ -378,12 +378,12 @@ PHP_FUNCTION(dio_serial) { - data->stream_type = DIO_STREAM_TYPE_SERIAL; - - if (options) { -- dio_assoc_array_get_basic_options(options, data TSRMLS_CC); -- dio_assoc_array_get_serial_options(options, data TSRMLS_CC); -+ dio_assoc_array_get_basic_options(options, data); -+ dio_assoc_array_get_serial_options(options, data); - } - - /* Try and open a serial stream. */ -- if (dio_serial_open_stream(filename, mode, data TSRMLS_CC)) { -+ if (dio_serial_open_stream(filename, mode, data)) { - stream = php_stream_alloc(&dio_serial_stream_ops, data, 0, mode); - if (!stream) { - efree(data); -diff --git a/dio_win32.c b/dio_win32.c -index 1023d36..25c838a 100644 ---- a/dio_win32.c -+++ b/dio_win32.c -@@ -30,7 +30,7 @@ - /* {{{ dio_last_error_php_error - * Generates a PHP error message based upon the last Windows error. - */ --static void dio_last_error_php_error(int level, char * message TSRMLS_DC) { -+static void dio_last_error_php_error(int level, char * message) { - LPVOID msgbuf; - DWORD msgbuflen; - char * errmsg; -@@ -68,7 +68,7 @@ static void dio_last_error_php_error(int level, char * message TSRMLS_DC) { - /* Allocate a buffer */ - errmsg = emalloc(errmsglen); - if (!errmsg) { -- php_error_docref(NULL TSRMLS_CC, E_ERROR, "Out of memory in dio_last_error_php_error()!"); -+ php_error_docref(NULL, E_ERROR, "Out of memory in dio_last_error_php_error()!"); - LocalFree(msgbuf); - return; - } -@@ -88,7 +88,7 @@ static void dio_last_error_php_error(int level, char * message TSRMLS_DC) { - errmsg = (char *)msgbuf; - #endif - -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s[ERROR %d] %s", message, err, errmsg); -+ php_error_docref(NULL, E_WARNING, "%s[ERROR %d] %s", message, err, errmsg); - - LocalFree(msgbuf); - #ifdef UNICODE -@@ -505,7 +505,7 @@ int dio_common_set_option(php_dio_stream_data *data, int option, int value, void - /* {{{ dio_raw_open_stream - * Opens the underlying stream. - */ --int dio_raw_open_stream(const char *filename, char *mode, php_dio_stream_data *data TSRMLS_DC) { -+int dio_raw_open_stream(const char *filename, const char *mode, php_dio_stream_data *data) { - php_dio_win32_stream_data *wdata = (php_dio_win32_stream_data*)data; - DWORD err; - -@@ -543,29 +543,29 @@ int dio_raw_open_stream(const char *filename, char *mode, php_dio_stream_data *d - err = GetLastError(); - switch (err) { - case ERROR_FILE_EXISTS: -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "File exists!"); -+ php_error_docref(NULL, E_WARNING, "File exists!"); - return 0; - - case ERROR_FILE_NOT_FOUND: - /* ERROR_FILE_NOT_FOUND with TRUNCATE_EXISTING means that - * the file doesn't exist so now try to create it. */ - if (TRUNCATE_EXISTING == wdata->creation_disposition) { -- php_error_docref(NULL TSRMLS_CC, E_NOTICE, "File does not exist, creating new file!"); -+ php_error_docref(NULL, E_NOTICE, "File does not exist, creating new file!"); - - wdata->handle = CreateFile(filename, wdata->desired_access, 0, - NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); - if (INVALID_HANDLE_VALUE == wdata->handle) { -- dio_last_error_php_error(E_WARNING, "CreateFile() failed:" TSRMLS_CC); -+ dio_last_error_php_error(E_WARNING, "CreateFile() failed:"); - return 0; - } - } else { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "File not found!"); -+ php_error_docref(NULL, E_WARNING, "File not found!"); - return 0; - } - break; - - default: -- dio_last_error_php_error(E_WARNING, "CreateFile() failed:" TSRMLS_CC); -+ dio_last_error_php_error(E_WARNING, "CreateFile() failed:"); - return 0; - } - } -@@ -584,33 +584,33 @@ int dio_raw_open_stream(const char *filename, char *mode, php_dio_stream_data *d - /* {{{ dio_serial_init - * Initialises the serial port - */ --static int dio_serial_init(php_dio_stream_data *data TSRMLS_DC) { -+static int dio_serial_init(php_dio_stream_data *data) { - php_dio_win32_stream_data *wdata = (php_dio_win32_stream_data*)data; - DWORD rate_def, data_bits_def, stop_bits_def, parity_def; - DCB dcb; - - if (!dio_data_rate_to_define(data->data_rate, &rate_def)) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid data_rate value (%d)", data->data_rate); -+ php_error_docref(NULL, E_WARNING, "invalid data_rate value (%d)", data->data_rate); - return 0; - } - - if (!dio_data_bits_to_define(data->data_bits, &data_bits_def)) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid data_bits value (%d)", data->data_bits); -+ php_error_docref(NULL, E_WARNING, "invalid data_bits value (%d)", data->data_bits); - return 0; - } - - if (!dio_stop_bits_to_define(data->stop_bits, &stop_bits_def)) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid stop_bits value (%d)", data->stop_bits); -+ php_error_docref(NULL, E_WARNING, "invalid stop_bits value (%d)", data->stop_bits); - return 0; - } - - if (!dio_parity_to_define(data->parity, &parity_def)) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid parity value (%d)", data->parity); -+ php_error_docref(NULL, E_WARNING, "invalid parity value (%d)", data->parity); - return 0; - } - - if (!GetCommState(wdata->handle, &(wdata->olddcb))) { -- dio_last_error_php_error(E_WARNING, "GetCommState() failed:" TSRMLS_CC); -+ dio_last_error_php_error(E_WARNING, "GetCommState() failed:"); - return 0; - } - -@@ -646,7 +646,7 @@ static int dio_serial_init(php_dio_stream_data *data TSRMLS_DC) { - } - - if (!SetCommState(wdata->handle, &dcb)) { -- dio_last_error_php_error(E_WARNING, "SetCommState() failed:" TSRMLS_CC); -+ dio_last_error_php_error(E_WARNING, "SetCommState() failed:"); - return 0; - } - -@@ -698,23 +698,23 @@ int dio_serial_purge(php_dio_stream_data *data) { - /* {{{ dio_serial_open_stream - * Opens the underlying stream. - */ --int dio_serial_open_stream(char *filename, char *mode, php_dio_stream_data *data TSRMLS_DC) { -+int dio_serial_open_stream(char *filename, char *mode, php_dio_stream_data *data) { - php_dio_win32_stream_data *wdata = (php_dio_win32_stream_data*)data; - COMMTIMEOUTS cto = { 0, 0, 0, 0, 0 }; - -- php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Opening \"%s\" as a serial port (mode=\"%s\").", filename, mode); -+ php_error_docref(NULL, E_NOTICE, "Opening \"%s\" as a serial port (mode=\"%s\").", filename, mode); - - if (*mode != 'r') { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "You must open serial ports in read or read/write mode!"); -+ php_error_docref(NULL, E_WARNING, "You must open serial ports in read or read/write mode!"); - return 0; - } - -- if (!dio_raw_open_stream(filename, mode, data TSRMLS_CC)) { -+ if (!dio_raw_open_stream(filename, mode, data)) { - return 0; - } - - if (!GetCommTimeouts(wdata->handle, &(wdata->oldcto))) { -- dio_last_error_php_error(E_WARNING, "GetCommTimeouts() failed (Not a comm port?):" TSRMLS_CC); -+ dio_last_error_php_error(E_WARNING, "GetCommTimeouts() failed (Not a comm port?):"); - CloseHandle(wdata->handle); - return 0; - } -@@ -735,12 +735,12 @@ int dio_serial_open_stream(char *filename, char *mode, php_dio_stream_data *data - } - - if (!SetCommTimeouts(wdata->handle, &cto)) { -- dio_last_error_php_error(E_WARNING, "SetCommTimeouts() failed:" TSRMLS_CC); -+ dio_last_error_php_error(E_WARNING, "SetCommTimeouts() failed:"); - CloseHandle(wdata->handle); - return 0; - } - -- if (!dio_serial_init(data TSRMLS_CC)) { -+ if (!dio_serial_init(data)) { - CloseHandle(wdata->handle); - return 0; - } -diff --git a/php_dio_common.h b/php_dio_common.h -index 7a75370..6af202f 100644 ---- a/php_dio_common.h -+++ b/php_dio_common.h -@@ -39,13 +39,13 @@ php_dio_stream_data * dio_create_stream_data(void); - - void dio_init_stream_data(php_dio_stream_data *data); - --void dio_assoc_array_get_basic_options(zval *options, php_dio_stream_data *data TSRMLS_DC); -+void dio_assoc_array_get_basic_options(zval *options, php_dio_stream_data *data); - --void dio_assoc_array_get_serial_options(zval *options, php_dio_stream_data *data TSRMLS_DC); -+void dio_assoc_array_get_serial_options(zval *options, php_dio_stream_data *data); - --void dio_stream_context_get_basic_options(php_stream_context *context, php_dio_stream_data *data TSRMLS_DC); -+void dio_stream_context_get_basic_options(php_stream_context *context, php_dio_stream_data *data); - --void dio_stream_context_get_serial_options(php_stream_context *context, php_dio_stream_data *data TSRMLS_DC); -+void dio_stream_context_get_serial_options(php_stream_context *context, php_dio_stream_data *data); - - size_t dio_common_write(php_dio_stream_data *data, const char *buf, size_t count); - -@@ -55,13 +55,13 @@ int dio_common_close(php_dio_stream_data *data); - - int dio_common_set_option(php_dio_stream_data *data, int option, int value, void *ptrparam); - --int dio_raw_open_stream(const char *filename, char *mode, php_dio_stream_data *data TSRMLS_DC); -+int dio_raw_open_stream(const char *filename, const char *mode, php_dio_stream_data *data); - - int dio_serial_uninit(php_dio_stream_data *data); - - int dio_serial_purge(php_dio_stream_data *data); - --int dio_serial_open_stream(char *filename, char *mode, php_dio_stream_data *data TSRMLS_DC); -+int dio_serial_open_stream(char *filename, char *mode, php_dio_stream_data *data); - - #endif /* PHP_DIO_COMMON_H_ */ - --- -2.5.0 - diff --git a/lang/php7-pecl-dio/patches/0013-Fix-tests-for-legacy-interface.patch b/lang/php7-pecl-dio/patches/0013-Fix-tests-for-legacy-interface.patch deleted file mode 100644 index e632552..0000000 --- a/lang/php7-pecl-dio/patches/0013-Fix-tests-for-legacy-interface.patch +++ /dev/null @@ -1,69 +0,0 @@ -From 942b77d84417298fb9e99c216029f22fbd1e2d98 Mon Sep 17 00:00:00 2001 -From: Michael Heimpold -Date: Thu, 14 Jul 2016 01:47:05 +0200 -Subject: [PATCH 13/16] Fix tests for legacy interface - -Signed-off-by: Michael Heimpold ---- - dio.c | 16 ++++++++++------ - 1 file changed, 10 insertions(+), 6 deletions(-) - -diff --git a/dio.c b/dio.c -index 7bad575..1a130a2 100644 ---- a/dio.c -+++ b/dio.c -@@ -73,9 +73,9 @@ static int new_php_fd(php_fd_t **f, int fd) - return 1; - } - --static void _dio_close_fd(zend_resource *res) -+static void _dio_close_fd(zend_resource *rsrc) - { -- php_fd_t *f = (php_fd_t *)zend_fetch_resource(res, NULL, le_fd); -+ php_fd_t *f = (php_fd_t *)rsrc->ptr; - if (f) { - close(f->fd); - free(f); -@@ -87,8 +87,8 @@ static void _dio_close_fd(zend_resource *res) - PHP_FUNCTION(dio_open) - { - php_fd_t *f; -- char *file_name; -- int file_name_length; -+ char *file_name = NULL; -+ size_t file_name_length = 0; - long flags; - long mode = 0; - int fd; -@@ -97,6 +97,10 @@ PHP_FUNCTION(dio_open) - return; - } - -+ if (!file_name || file_name[0] == '\0') { -+ RETURN_FALSE; -+ } -+ - if (php_check_open_basedir(file_name) || DIO_SAFE_MODE_CHECK(file_name, "wb+")) { - RETURN_FALSE; - } -@@ -176,7 +180,7 @@ PHP_FUNCTION(dio_dup) - RETURN_FALSE; - } - -- RETVAL_RES(zend_register_resource(f, le_fd)); -+ RETVAL_RES(zend_register_resource(df, le_fd)); - } - /* }}} */ - #endif -@@ -660,7 +664,7 @@ PHP_FUNCTION(dio_close) - RETURN_FALSE; - } - -- zend_list_delete(Z_LVAL_P(r_fd)); -+ zend_list_delete(Z_RES_P(r_fd)); - } - /* }}} */ - --- -2.5.0 - diff --git a/lang/php7-pecl-dio/patches/0014-Add-missing-changes-from-changed-stream-API-interfac.patch b/lang/php7-pecl-dio/patches/0014-Add-missing-changes-from-changed-stream-API-interfac.patch deleted file mode 100644 index b9e2e00..0000000 --- a/lang/php7-pecl-dio/patches/0014-Add-missing-changes-from-changed-stream-API-interfac.patch +++ /dev/null @@ -1,54 +0,0 @@ -From ff469d3a11409e9b043dc10ddfc44792c5359ff1 Mon Sep 17 00:00:00 2001 -From: Michael Heimpold -Date: Thu, 14 Jul 2016 01:47:05 +0200 -Subject: [PATCH 14/16] Add missing changes from changed stream API interface - -Signed-off-by: Michael Heimpold ---- - dio_posix.c | 2 +- - dio_stream_wrappers.c | 2 +- - php_dio_common.h | 2 +- - 3 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/dio_posix.c b/dio_posix.c -index 843e234..b2aa228 100644 ---- a/dio_posix.c -+++ b/dio_posix.c -@@ -632,7 +632,7 @@ int dio_serial_purge(php_dio_stream_data *data) { - /* {{{ dio_serial_open_stream - * Opens the underlying stream. - */ --int dio_serial_open_stream(char *filename, char *mode, php_dio_stream_data *data) { -+int dio_serial_open_stream(const char *filename, const char *mode, php_dio_stream_data *data) { - php_dio_posix_stream_data *pdata = (php_dio_posix_stream_data*)data; - - #ifdef O_NOCTTY -diff --git a/dio_stream_wrappers.c b/dio_stream_wrappers.c -index eb23752..0a00daa 100644 ---- a/dio_stream_wrappers.c -+++ b/dio_stream_wrappers.c -@@ -292,7 +292,7 @@ static php_stream *dio_serial_fopen_wrapper(php_stream_wrapper *wrapper, - { - php_dio_stream_data *data; - php_stream *stream; -- char *filename; -+ const char *filename; - - /* Check it was actually for us (not a corrupted function pointer - somewhere!). */ -diff --git a/php_dio_common.h b/php_dio_common.h -index 6af202f..7068ea7 100644 ---- a/php_dio_common.h -+++ b/php_dio_common.h -@@ -61,7 +61,7 @@ int dio_serial_uninit(php_dio_stream_data *data); - - int dio_serial_purge(php_dio_stream_data *data); - --int dio_serial_open_stream(char *filename, char *mode, php_dio_stream_data *data); -+int dio_serial_open_stream(const char *filename, const char *mode, php_dio_stream_data *data); - - #endif /* PHP_DIO_COMMON_H_ */ - --- -2.5.0 - diff --git a/lang/php7-pecl-dio/patches/0015-Add-.gitignore.patch b/lang/php7-pecl-dio/patches/0015-Add-.gitignore.patch deleted file mode 100644 index ef675de..0000000 --- a/lang/php7-pecl-dio/patches/0015-Add-.gitignore.patch +++ /dev/null @@ -1,48 +0,0 @@ -From def92a2db269d4ea6d2e8b7f8fe9dd473886a6b1 Mon Sep 17 00:00:00 2001 -From: Michael Heimpold -Date: Sun, 17 Jul 2016 01:08:47 +0200 -Subject: [PATCH 15/16] Add .gitignore - -Signed-off-by: Michael Heimpold ---- - .gitignore | 28 ++++++++++++++++++++++++++++ - 1 file changed, 28 insertions(+) - create mode 100644 .gitignore - -diff --git a/.gitignore b/.gitignore -new file mode 100644 -index 0000000..dae52e8 ---- /dev/null -+++ b/.gitignore -@@ -0,0 +1,28 @@ -+.deps -+.libs -+Makefile -+Makefile.fragments -+Makefile.global -+Makefile.objects -+acinclude.m4 -+aclocal.m4 -+autom4te.cache -+build -+config.guess -+config.h -+config.h.in -+config.log -+config.nice -+config.status -+config.sub -+configure -+configure.in -+*.la -+*.lo -+install-sh -+libtool -+ltmain.sh -+missing -+mkinstalldirs -+modules -+run-tests.php --- -2.5.0 - diff --git a/lang/php7-pecl-dio/patches/0016-Add-additional-baudrates.patch b/lang/php7-pecl-dio/patches/0016-Add-additional-baudrates.patch deleted file mode 100644 index 16cceea..0000000 --- a/lang/php7-pecl-dio/patches/0016-Add-additional-baudrates.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 0f8df09a8008eed8a7ac0c6400bce523014ff770 Mon Sep 17 00:00:00 2001 -From: Michael Heimpold -Date: Mon, 18 Jul 2016 22:45:04 +0200 -Subject: [PATCH 16/16] Add additional baudrates - -Signed-off-by: Michael Heimpold ---- - dio.c | 20 ++++++++++++++++++++ - 1 file changed, 20 insertions(+) - -diff --git a/dio.c b/dio.c -index 1a130a2..a4e8e7d 100644 ---- a/dio.c -+++ b/dio.c -@@ -522,6 +522,26 @@ PHP_FUNCTION(dio_tcsetattr) - - /* assign to correct values... */ - switch (Baud_Rate) { -+#ifdef B460800 -+ case 460800: -+ BAUD = B460800; -+ break; -+#endif -+#ifdef B230400 -+ case 230400: -+ BAUD = B230400; -+ break; -+#endif -+#ifdef B115200 -+ case 115200: -+ BAUD = B115200; -+ break; -+#endif -+#ifdef B57600 -+ case 57600: -+ BAUD = B57600; -+ break; -+#endif - case 38400: - BAUD = B38400; - break; --- -2.5.0 - diff --git a/lang/php7-pecl-http/Makefile b/lang/php7-pecl-http/Makefile index 4166d2c..be9267a 100644 --- a/lang/php7-pecl-http/Makefile +++ b/lang/php7-pecl-http/Makefile @@ -8,9 +8,9 @@ include $(TOPDIR)/rules.mk PECL_NAME:=pecl_http PECL_LONGNAME:=Extended HTTP Support -PKG_VERSION:=3.0.1 +PKG_VERSION:=3.1.0 PKG_RELEASE:=2 -PKG_MD5SUM:=042c97314c180f6473338f0c5d35fabd +PKG_MD5SUM:=e3de67b156e7d5f6c2e5eb1e2b5f0acceb7004f1260d68c9f8b2c0f9629aabf0 PKG_NAME:=php7-pecl-http PKG_SOURCE:=$(PECL_NAME)-$(PKG_VERSION).tgz @@ -32,8 +32,19 @@ include $(INCLUDE_DIR)/nls.mk include ../php7/pecl.mk CONFIGURE_VARS+= \ - PHP_PROPRO=yes \ - PHP_RAPHF=yes \ + PECL_cv_HAVE_EXT_propro=yes \ + PECL_cv_HAVE_EXT_raphf=yes \ + PECL_cv_HAVE_LIBCURL_ARES=no \ + PECL_cv_HAVE_LIBCURL_OpenSSL=$(if $(CONFIG_LIBCURL_OPENSSL),yes,no) \ + PECL_cv_HAVE_LIBCURL_GnuTLS=$(if $(CONFIG_LIBCURL_GNUTLS),yes,no) \ + PECL_cv_HAVE_LIBCURL_NSS=no \ + PECL_cv_HAVE_LIBCURL_SecureTransport=no \ + PECL_cv_HAVE_LIBCURL_GSKit=no \ + PECL_cv_HAVE_LIBCURL_PolarSSL=no \ + PECL_cv_HAVE_LIBCURL_WolfSSL=$(if $(CONFIG_LIBCURL_CYASSL),yes,no) \ + PECL_cv_HAVE_LIBCURL_mbedTLS=$(if $(CONFIG_LIBCURL_MBEDTLS),yes,no) \ + PECL_cv_HAVE_LIBCURL_axTLS=no \ + PECL_cv_LIBCURL_TLSAUTH_SRP=$(if $(CONFIG_LIBCURL_TLS_SRP),yes,no) \ CONFIGURE_ARGS+= \ --with-http \ @@ -42,5 +53,5 @@ CONFIGURE_ARGS+= \ --with-http-libevent-dir="$(STAGING_DIR)/usr" \ --with-http-libidn-dir="$(STAGING_DIR)/usr" -$(eval $(call PECLPackage,http,$(PECL_LONGNAME),+libcurl +librt +libevent2 +libidn +php7-mod-iconv +php7-mod-session +php7-pecl-raphf +php7-pecl-propro,30)) +$(eval $(call PECLPackage,http,$(PECL_LONGNAME),+icu +libcurl +librt +libevent2 +libidn +php7-mod-iconv +php7-mod-session +php7-pecl-raphf +php7-pecl-propro,30)) $(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/lang/php7-pecl-http/patches.old/100_config9-m4.patch b/lang/php7-pecl-http/patches.old/100_config9-m4.patch new file mode 100644 index 0000000..304a1df --- /dev/null +++ b/lang/php7-pecl-http/patches.old/100_config9-m4.patch @@ -0,0 +1,22 @@ +--- a/config9.m4 2016-09-08 21:39:18.000000000 +0200 ++++ b/config9.m4 2016-09-08 21:42:35.066903251 +0200 +@@ -71,18 +71,7 @@ + extname=$1 + haveext=$[PHP_]translit($1,a-z_-,A-Z__) + AC_MSG_CHECKING([for ext/$extname support]) +- if test -x "$PHP_EXECUTABLE"; then +- grepext=`$PHP_EXECUTABLE -m | $EGREP ^$extname\$` +- if test "$grepext" = "$extname"; then +- [PHP_HTTP_HAVE_EXT_]translit($1,a-z_-,A-Z__)=1 +- AC_MSG_RESULT([yes]) +- $2 +- else +- [PHP_HTTP_HAVE_EXT_]translit($1,a-z_-,A-Z__)= +- AC_MSG_RESULT([no]) +- $3 +- fi +- elif test "$haveext" != "no" && test "x$haveext" != "x"; then ++ if test "$haveext" != "no" && test "x$haveext" != "x"; then + [PHP_HTTP_HAVE_EXT_]translit($1,a-z_-,A-Z__)=1 + AC_MSG_RESULT([yes]) + $2 diff --git a/lang/php7-pecl-http/patches/100_config9-m4.patch b/lang/php7-pecl-http/patches/100_config9-m4.patch deleted file mode 100644 index 304a1df..0000000 --- a/lang/php7-pecl-http/patches/100_config9-m4.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/config9.m4 2016-09-08 21:39:18.000000000 +0200 -+++ b/config9.m4 2016-09-08 21:42:35.066903251 +0200 -@@ -71,18 +71,7 @@ - extname=$1 - haveext=$[PHP_]translit($1,a-z_-,A-Z__) - AC_MSG_CHECKING([for ext/$extname support]) -- if test -x "$PHP_EXECUTABLE"; then -- grepext=`$PHP_EXECUTABLE -m | $EGREP ^$extname\$` -- if test "$grepext" = "$extname"; then -- [PHP_HTTP_HAVE_EXT_]translit($1,a-z_-,A-Z__)=1 -- AC_MSG_RESULT([yes]) -- $2 -- else -- [PHP_HTTP_HAVE_EXT_]translit($1,a-z_-,A-Z__)= -- AC_MSG_RESULT([no]) -- $3 -- fi -- elif test "$haveext" != "no" && test "x$haveext" != "x"; then -+ if test "$haveext" != "no" && test "x$haveext" != "x"; then - [PHP_HTTP_HAVE_EXT_]translit($1,a-z_-,A-Z__)=1 - AC_MSG_RESULT([yes]) - $2 diff --git a/lang/php7-pecl-http/patches/100_php_http_etag_bigendian_check.patch b/lang/php7-pecl-http/patches/100_php_http_etag_bigendian_check.patch new file mode 100644 index 0000000..ee925c4 --- /dev/null +++ b/lang/php7-pecl-http/patches/100_php_http_etag_bigendian_check.patch @@ -0,0 +1,11 @@ +--- a/src/php_http_etag.c 2016-12-12 10:04:21.000000000 +0100 ++++ b/src/php_http_etag.c 2016-12-23 21:10:59.523222367 +0100 +@@ -60,7 +60,7 @@ + unsigned char buf[4]; + + *((uint *) e->ctx) = ~*((uint *) e->ctx); +-#if WORDS_BIGENDIAN ++#ifdef WORDS_BIGENDIAN + etag = php_http_etag_digest((unsigned char *) e->ctx, 4); + #else + buf[0] = ((unsigned char *) e->ctx)[3]; diff --git a/lang/php7/Makefile b/lang/php7/Makefile index d311a7b..6cd2beb 100644 --- a/lang/php7/Makefile +++ b/lang/php7/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=php -PKG_VERSION:=7.0.13 +PKG_VERSION:=7.1.1 PKG_RELEASE:=1 PKG_MAINTAINER:=Michael Heimpold @@ -16,7 +16,8 @@ PKG_LICENSE_FILES:=LICENSE PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=http://www.php.net/distributions/ -PKG_MD5SUM:=eb117bf1d1efc99c522f132b265a3402 +PKG_MD5SUM:=65eef256f6e7104a05361939f5e23ada +PKG_HASH:=b3565b0c1441064eba204821608df1ec7367abff881286898d900c2c2a5ffe70 PKG_FIXUP:=libtool autoreconf PKG_BUILD_PARALLEL:=1 diff --git a/lang/php7/patches/0013-Add-support-for-use-of-the-system-timezone-database.patch b/lang/php7/patches/0013-Add-support-for-use-of-the-system-timezone-database.patch index 9d8f989..819ad1e 100644 --- a/lang/php7/patches/0013-Add-support-for-use-of-the-system-timezone-database.patch +++ b/lang/php7/patches/0013-Add-support-for-use-of-the-system-timezone-database.patch @@ -1,11 +1,12 @@ From: Joe Orton -Date: Sun, 18 Oct 2015 02:15:17 +0200 +Date: Thu, 20 Oct 2016 11:44:14 +0200 Subject: Add support for use of the system timezone database Add support for use of the system timezone database, rather than embedding a copy. Discussed upstream but was not desired. History: +r14: improve check for valid tz file r13: adapt for upstream changes to use PHP allocator r12: adapt for upstream changes for new zic r11: use canonical names to avoid more case sensitivity issues @@ -25,12 +26,12 @@ r3: fix a crash if /usr/share/zoneinfo doesn't exist (Raphael Geissert) r2: add filesystem trawl to set up name alias index r1: initial revision --- - ext/date/lib/parse_tz.c | 549 +++++++++++++++++++++++++++++++++++++++++++++++- - ext/date/lib/timelib.m4 | 14 ++ - 2 files changed, 552 insertions(+), 11 deletions(-) + ext/date/lib/parse_tz.c | 560 +++++++++++++++++++++++++++++++++++++++++++++++- + ext/date/lib/timelib.m4 | 13 ++ + 2 files changed, 562 insertions(+), 11 deletions(-) diff --git a/ext/date/lib/parse_tz.c b/ext/date/lib/parse_tz.c -index 20d7eea..6301dc5 100644 +index 20d7eea..ed7717e 100644 --- a/ext/date/lib/parse_tz.c +++ b/ext/date/lib/parse_tz.c @@ -24,6 +24,16 @@ @@ -75,7 +76,7 @@ index 20d7eea..6301dc5 100644 /* read ID */ version = (*tzf)[3] - '0'; *tzf += 4; -@@ -302,7 +321,418 @@ void timelib_dump_tzinfo(timelib_tzinfo *tz) +@@ -302,7 +321,429 @@ void timelib_dump_tzinfo(timelib_tzinfo *tz) } } @@ -294,6 +295,7 @@ index 20d7eea..6301dc5 100644 + && strcmp(ent->d_name, "posix") != 0 + && strcmp(ent->d_name, "posixrules") != 0 + && strcmp(ent->d_name, "right") != 0 ++ && strstr(ent->d_name, ".list") == NULL + && strstr(ent->d_name, ".tab") == NULL; +} + @@ -434,8 +436,18 @@ index 20d7eea..6301dc5 100644 + +/* Returns true if the passed-in stat structure describes a + * probably-valid timezone file. */ -+static int is_valid_tzfile(const struct stat *st) ++static int is_valid_tzfile(const struct stat *st, int fd) +{ ++ if (fd) { ++ char buf[20]; ++ if (read(fd, buf, 20)!=20) { ++ return 0; ++ } ++ lseek(fd, SEEK_SET, 0); ++ if (memcmp(buf, "TZif", 4)) { ++ return 0; ++ } ++ } + return S_ISREG(st->st_mode) && st->st_size > 20; +} + @@ -473,11 +485,11 @@ index 20d7eea..6301dc5 100644 + } + + snprintf(fname, sizeof fname, ZONEINFO_PREFIX "/%s", canonical_tzname(timezone)); -+ ++ + fd = open(fname, O_RDONLY); + if (fd == -1) { + return NULL; -+ } else if (fstat(fd, &st) != 0 || !is_valid_tzfile(&st)) { ++ } else if (fstat(fd, &st) != 0 || !is_valid_tzfile(&st, fd)) { + close(fd); + return NULL; + } @@ -495,7 +507,7 @@ index 20d7eea..6301dc5 100644 { int left = 0, right = tzdb->index_size - 1; #ifdef HAVE_SETLOCALE -@@ -341,21 +771,88 @@ static int seek_to_tz_position(const unsigned char **tzf, char *timezone, const +@@ -341,21 +782,88 @@ static int seek_to_tz_position(const unsigned char **tzf, char *timezone, const return 0; } @@ -577,7 +589,7 @@ index 20d7eea..6301dc5 100644 + + snprintf(fname, sizeof fname, ZONEINFO_PREFIX "/%s", canonical_tzname(timezone)); + -+ return stat(fname, &st) == 0 && is_valid_tzfile(&st); ++ return stat(fname, &st) == 0 && is_valid_tzfile(&st, 0); + } +#endif + @@ -585,7 +597,7 @@ index 20d7eea..6301dc5 100644 } static void skip_64bit_preamble(const unsigned char **tzf, timelib_tzinfo *tz) -@@ -380,24 +877,54 @@ static void read_64bit_header(const unsigned char **tzf, timelib_tzinfo *tz) +@@ -380,24 +888,54 @@ static void read_64bit_header(const unsigned char **tzf, timelib_tzinfo *tz) timelib_tzinfo *timelib_parse_tzfile(char *timezone, const timelib_tzdb *tzdb) { const unsigned char *tzf; @@ -650,13 +662,13 @@ index 20d7eea..6301dc5 100644 tmp = NULL; } diff --git a/ext/date/lib/timelib.m4 b/ext/date/lib/timelib.m4 -index c725572..4c837c7 100644 +index 99bf9fa..4bf7e46 100644 --- a/ext/date/lib/timelib.m4 +++ b/ext/date/lib/timelib.m4 -@@ -78,3 +78,17 @@ stdlib.h +@@ -78,3 +78,16 @@ stdlib.h dnl Check for strtoll, atoll - AC_CHECK_FUNCS(strtoll atoll strftime) + AC_CHECK_FUNCS(strtoll atoll strftime gettimeofday) + +PHP_ARG_WITH(system-tzdata, for use of system timezone data, +[ --with-system-tzdata[=DIR] to specify use of system timezone data], @@ -670,4 +682,3 @@ index c725572..4c837c7 100644 + [Define for location of system timezone data]) + fi +fi -+ diff --git a/lang/php7/patches/0032-Use-system-timezone.patch b/lang/php7/patches/0032-Use-system-timezone.patch index 11a6393..efa1fc7 100644 --- a/lang/php7/patches/0032-Use-system-timezone.patch +++ b/lang/php7/patches/0032-Use-system-timezone.patch @@ -14,10 +14,10 @@ To be used in tandem with use_embedded_timezonedb.patch and use_embedded_timezon 1 file changed, 17 insertions(+) diff --git a/ext/date/php_date.c b/ext/date/php_date.c -index e780b2e..2b5a528 100644 +index cbe6e91..1999c83 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c -@@ -992,6 +992,23 @@ static char* guess_timezone(const timelib_tzdb *tzdb) +@@ -1003,6 +1003,23 @@ static char* guess_timezone(const timelib_tzdb *tzdb) DATEG(timezone_valid) = 1; return DATEG(default_timezone); } diff --git a/lang/php7/patches/0041-Add-patch-to-remove-build-timestamps-from-generated-.patch b/lang/php7/patches/0041-Add-patch-to-remove-build-timestamps-from-generated-.patch index abfd6f7..0a10afa 100644 --- a/lang/php7/patches/0041-Add-patch-to-remove-build-timestamps-from-generated-.patch +++ b/lang/php7/patches/0041-Add-patch-to-remove-build-timestamps-from-generated-.patch @@ -8,15 +8,14 @@ Subject: Add patch to remove build timestamps from generated binaries. sapi/cgi/cgi_main.c | 4 ++-- sapi/cli/php_cli.c | 4 ++-- sapi/fpm/fpm/fpm_main.c | 4 ++-- - sapi/litespeed/lsapi_main.c | 4 ++-- sapi/phpdbg/phpdbg.c | 4 +--- - 7 files changed, 12 insertions(+), 24 deletions(-) + 6 files changed, 10 insertions(+), 22 deletions(-) diff --git a/ext/standard/info.c b/ext/standard/info.c -index e6eaac3..024e5c9 100644 +index e74d6b4..883fbdf 100644 --- a/ext/standard/info.c +++ b/ext/standard/info.c -@@ -863,7 +863,6 @@ PHPAPI void php_print_info(int flag) +@@ -865,7 +865,6 @@ PHPAPI void php_print_info(int flag) php_info_print_box_end(); php_info_print_table_start(); php_info_print_table_row(2, "System", ZSTR_VAL(php_uname)); @@ -51,78 +50,62 @@ index f286b1a..fba92b8 100644 case $host_alias in *aix*) diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c -index 8983b53..589e299 100644 +index 0b6deb1..bb9014a 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c -@@ -2216,9 +2216,9 @@ consult the installation file that came with this distribution, or visit \n\ +@@ -2342,9 +2342,9 @@ consult the installation file that came with this distribution, or visit \n\ SG(request_info).no_headers = 1; } #if ZEND_DEBUG -- php_printf("PHP %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) 1997-2016 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); -+ php_printf("PHP %s (%s) (DEBUG)\nCopyright (c) 1997-2016 The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version()); +- php_printf("PHP %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) 1997-2017 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); ++ php_printf("PHP %s (%s) (DEBUG)\nCopyright (c) 1997-2017 The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version()); #else -- php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) 1997-2016 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); -+ php_printf("PHP %s (%s)\nCopyright (c) 1997-2016 The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version()); +- php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) 1997-2017 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); ++ php_printf("PHP %s (%s)\nCopyright (c) 1997-2017 The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version()); #endif php_request_shutdown((void *) 0); fcgi_shutdown(); diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c -index 978c8b3..3ee61a4 100644 +index dc92045..bb28364 100644 --- a/sapi/cli/php_cli.c +++ b/sapi/cli/php_cli.c -@@ -682,8 +682,8 @@ static int do_cli(int argc, char **argv) /* {{{ */ +@@ -690,8 +690,8 @@ static int do_cli(int argc, char **argv) /* {{{ */ goto out; case 'v': /* show php version & quit */ -- php_printf("PHP %s (%s) (built: %s %s) ( %s)\nCopyright (c) 1997-2016 The PHP Group\n%s", +- php_printf("PHP %s (%s) (built: %s %s) ( %s)\nCopyright (c) 1997-2017 The PHP Group\n%s", - PHP_VERSION, cli_sapi_module.name, __DATE__, __TIME__, -+ php_printf("PHP %s (%s) ( %s)\nCopyright (c) 1997-2016 The PHP Group\n%s", ++ php_printf("PHP %s (%s) ( %s)\nCopyright (c) 1997-2017 The PHP Group\n%s", + PHP_VERSION, cli_sapi_module.name, #if ZTS "ZTS " #else diff --git a/sapi/fpm/fpm/fpm_main.c b/sapi/fpm/fpm/fpm_main.c -index 5adeb63..5e60255 100644 +index 6768113..545c52e 100644 --- a/sapi/fpm/fpm/fpm_main.c +++ b/sapi/fpm/fpm/fpm_main.c -@@ -1757,9 +1757,9 @@ int main(int argc, char *argv[]) +@@ -1756,9 +1756,9 @@ int main(int argc, char *argv[]) SG(request_info).no_headers = 1; #if ZEND_DEBUG -- php_printf("PHP %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) 1997-2016 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); -+ php_printf("PHP %s (%s) (DEBUG)\nCopyright (c) 1997-2016 The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version()); +- php_printf("PHP %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) 1997-2017 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); ++ php_printf("PHP %s (%s) (DEBUG)\nCopyright (c) 1997-2017 The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version()); #else -- php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) 1997-2016 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); -+ php_printf("PHP %s (%s)\nCopyright (c) 1997-2016 The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version()); +- php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) 1997-2017 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); ++ php_printf("PHP %s (%s)\nCopyright (c) 1997-2017 The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version()); #endif php_request_shutdown((void *) 0); fcgi_shutdown(); -diff --git a/sapi/litespeed/lsapi_main.c b/sapi/litespeed/lsapi_main.c -index b0ea105..4feb8f3 100644 ---- a/sapi/litespeed/lsapi_main.c -+++ b/sapi/litespeed/lsapi_main.c -@@ -811,9 +811,9 @@ static int cli_main( int argc, char * argv[] ) - case 'v': - if (php_request_startup() != FAILURE) { - #if ZEND_DEBUG -- php_printf("PHP %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) 1997-2016 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); -+ php_printf("PHP %s (%s) (DEBUG)\nCopyright (c) 1997-2016 The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version()); - #else -- php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) 1997-2016 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); -+ php_printf("PHP %s (%s)\nCopyright (c) 1997-2016 The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version()); - #endif - #ifdef PHP_OUTPUT_NEWAPI - php_output_end_all(); diff --git a/sapi/phpdbg/phpdbg.c b/sapi/phpdbg/phpdbg.c -index 68a164c..82565d8 100644 +index b47c7c8..ab94bba 100644 --- a/sapi/phpdbg/phpdbg.c +++ b/sapi/phpdbg/phpdbg.c -@@ -1657,10 +1657,8 @@ - phpdbg_do_help(NULL); +@@ -1699,10 +1699,8 @@ phpdbg_main: + phpdbg_do_help_cmd(exec); } else if (show_version) { phpdbg_out( -- "phpdbg %s (built: %s %s)\nPHP %s, Copyright (c) 1997-2016 The PHP Group\n%s", -+ "phpdbg %s\nPHP %s, Copyright (c) 1997-2016 The PHP Group\n%s", +- "phpdbg %s (built: %s %s)\nPHP %s, Copyright (c) 1997-2017 The PHP Group\n%s", ++ "phpdbg %s\nPHP %s, Copyright (c) 1997-2017 The PHP Group\n%s", PHPDBG_VERSION, - __DATE__, - __TIME__, diff --git a/lang/php7/patches/1005-fix-asm-constraints-in-aarch64-multiply-macro.patch b/lang/php7/patches/1005-fix-asm-constraints-in-aarch64-multiply-macro.patch new file mode 100644 index 0000000..0afa951 --- /dev/null +++ b/lang/php7/patches/1005-fix-asm-constraints-in-aarch64-multiply-macro.patch @@ -0,0 +1,29 @@ +From 6cbb9f4c247c5361b8c165fbb40b4118d5d7c0e5 Mon Sep 17 00:00:00 2001 +From: Andreas Schwab +Date: Mon, 25 Apr 2016 11:59:14 +0200 +Subject: [PATCH] Fix asm constraints in aarch64 multiply macro + +All operands must be register operands and the output operands are early +clobbered. +--- + Zend/zend_multiply.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Zend/zend_multiply.h b/Zend/zend_multiply.h +index dfd21f7..651dd43 100644 +--- a/Zend/zend_multiply.h ++++ b/Zend/zend_multiply.h +@@ -53,8 +53,8 @@ + __asm__("mul %0, %2, %3\n" \ + "smulh %1, %2, %3\n" \ + "sub %1, %1, %0, asr #63\n" \ +- : "=X"(__tmpvar), "=X"(usedval) \ +- : "X"(a), "X"(b)); \ ++ : "=&r"(__tmpvar), "=&r"(usedval) \ ++ : "r"(a), "r"(b)); \ + if (usedval) (dval) = (double) (a) * (double) (b); \ + else (lval) = __tmpvar; \ + } while (0) +-- +2.8.0 + diff --git a/lang/php7/pecl.mk b/lang/php7/pecl.mk index 7b7c244..caafc66 100644 --- a/lang/php7/pecl.mk +++ b/lang/php7/pecl.mk @@ -16,6 +16,9 @@ define Build/Prepare ( cd $(PKG_BUILD_DIR); $(STAGING_DIR)/usr/bin/phpize7 ) endef +CONFIGURE_VARS+= \ + ac_cv_c_bigendian_php=$(if $(CONFIG_BIG_ENDIAN),yes,no) + CONFIGURE_ARGS+= \ --with-php-config=$(STAGING_DIR)/usr/bin/php7-config diff --git a/lang/python-cffi/Makefile b/lang/python-cffi/Makefile index b8a5000..b6d15fd 100644 --- a/lang/python-cffi/Makefile +++ b/lang/python-cffi/Makefile @@ -45,7 +45,7 @@ define Build/Compile endef define Host/Compile - $(call Build/Compile/HostPyMod,,install --prefix="" --root="$(HOST_BUILD_PREFIX)") + $(call Build/Compile/HostPyMod,,install --prefix="" --root="$(STAGING_DIR_HOSTPKG)") endef define Host/Install diff --git a/lang/python-gmpy/Makefile b/lang/python-gmpy/Makefile deleted file mode 100644 index 09ed13d..0000000 --- a/lang/python-gmpy/Makefile +++ /dev/null @@ -1,44 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=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 - -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-packages/Makefile b/lang/python-packages/Makefile index f12b78e..701f0e6 100644 --- a/lang/python-packages/Makefile +++ b/lang/python-packages/Makefile @@ -69,7 +69,7 @@ CONFIG_PACKAGE_python-packages-envs:=$(call qstrip,$(CONFIG_PACKAGE_python-packa CONFIG_PACKAGE_python-packages-extra-deps:=$(call qstrip,$(CONFIG_PACKAGE_python-packages-extra-deps)) CONFIG_PACKAGE_python-packages-pip-opts:=$(call qstrip,$(CONFIG_PACKAGE_python-packages-pip-opts)) -HOST_PYTHON_PIP:=$(STAGING_DIR)/host/bin/pip$(PYTHON_VERSION) +HOST_PYTHON_PIP:=$(STAGING_DIR_HOSTPKG)/bin/pip$(PYTHON_VERSION) decr=$(word $(1),0 1 2 3 4 5 6 7 8 9 10) recur=$(if $(subst 0,,$(2)),$(call recur,$(1),$(call decr,$(2)),$(call $(1)$(2),$(3))),$(3)) @@ -92,7 +92,7 @@ HOST_PYTHON_PIP_INSTALL=$(HOST_PYTHON_PIP) install \ $(if $(CONFIG_PACKAGE_python-packages-index-url), --index-url $(CONFIG_PACKAGE_python-packages-index-url)) \ $(if $(CONFIG_PACKAGE_python-packages-pip-opts), $(CONFIG_PACKAGE_python-packages-pip-opts)) \ -HOST_PYTHON_PIP_INSTALL_HOST:=$(call HOST_PYTHON_PIP_INSTALL,$(STAGING_DIR)/host,"") +HOST_PYTHON_PIP_INSTALL_HOST:=$(call HOST_PYTHON_PIP_INSTALL,$(STAGING_DIR_HOSTPKG),"") HOST_PYTHON_PIP_INSTALL_TARGET=$(call HOST_PYTHON_PIP_INSTALL,$(PKG_INSTALL_DIR)/$(call req2dir,$(pkg)),/usr) HOST_PYTHON_PIP_INSTALL_CLEANUP:=$(call HOST_PYTHON_PIP_INSTALL,$(PKG_INSTALL_DIR)/_cleanup,/usr) diff --git a/lang/python-pip/Makefile b/lang/python-pip/Makefile index db40f8f..2099e63 100644 --- a/lang/python-pip/Makefile +++ b/lang/python-pip/Makefile @@ -62,7 +62,7 @@ endef define Host/Compile $(call Build/Compile/HostPyMod,,\ - install --root="$(STAGING_DIR)/host" --prefix="" \ + install --root="$(STAGING_DIR_HOSTPKG)" --prefix="" \ --single-version-externally-managed \ ) endef diff --git a/lang/python-ply/Makefile b/lang/python-ply/Makefile index ba90ecb..0b0e553 100644 --- a/lang/python-ply/Makefile +++ b/lang/python-ply/Makefile @@ -46,7 +46,7 @@ define Build/Compile endef define Host/Compile - $(call Build/Compile/HostPyMod,,install --prefix="" --root="$(HOST_BUILD_PREFIX)") + $(call Build/Compile/HostPyMod,,install --prefix="" --root="$(STAGING_DIR_HOSTPKG)") endef define Host/Install diff --git a/lang/python-pycparser/Makefile b/lang/python-pycparser/Makefile index ff17417..37e6c84 100644 --- a/lang/python-pycparser/Makefile +++ b/lang/python-pycparser/Makefile @@ -47,7 +47,7 @@ define Build/Compile endef define Host/Compile - $(call Build/Compile/HostPyMod,,install --prefix="" --root="$(HOST_BUILD_PREFIX)") + $(call Build/Compile/HostPyMod,,install --prefix="" --root="$(STAGING_DIR_HOSTPKG)") endef define Host/Install diff --git a/lang/python-setuptools/Makefile b/lang/python-setuptools/Makefile index 6efc433..1f31222 100644 --- a/lang/python-setuptools/Makefile +++ b/lang/python-setuptools/Makefile @@ -63,7 +63,7 @@ endef define Host/Compile $(call Build/Compile/HostPyMod,,\ - install --root="$(HOST_BUILD_PREFIX)" --prefix="" \ + install --root="$(STAGING_DIR_HOSTPKG)" --prefix="" \ --single-version-externally-managed \ ) endef diff --git a/lang/python/Makefile b/lang/python/Makefile index 3eb4e9d..d17b6e1 100644 --- a/lang/python/Makefile +++ b/lang/python/Makefile @@ -10,23 +10,24 @@ include $(TOPDIR)/rules.mk # For PYTHON_VERSION include ./files/python-version.mk -# This file provides the necsessary host build variables -include ./files/python-host.mk - -# For PyPackage -include ./files/python-package.mk - PKG_NAME:=python PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO) -PKG_RELEASE:=2 +PKG_RELEASE:=4 PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://www.python.org/ftp/python/$(PKG_VERSION) -PKG_MD5SUM:=57dffcee9cee8bb2ab5f82af1d8e9a69 +PKG_MD5SUM:=53b43534153bb2a0363f08bae8b9d990 +PKG_HASH:=35d543986882f78261f97787fd3e06274bfa6df29fac9b4a94f73930ff98f731 PKG_LICENSE:=PSF PKG_LICENSE_FILES:=LICENSE Modules/_ctypes/libffi_msvc/LICENSE Modules/_ctypes/darwin/LICENSE Modules/_ctypes/libffi/LICENSE Modules/_ctypes/libffi_osx/LICENSE Tools/pybench/LICENSE +# This file provides the necsessary host build variables +include ./files/python-host.mk + +# For PyPackage +include ./files/python-package.mk + PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 HOST_BUILD_PARALLEL:=1 @@ -35,7 +36,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 libffi/host +HOST_BUILD_DEPENDS:=bzip2/host expat/host include $(INCLUDE_DIR)/host-build.mk include $(INCLUDE_DIR)/package.mk @@ -122,13 +123,21 @@ ifeq ($(CONFIG_IPV6),y) ENABLE_IPV6 += --enable-ipv6 endif +PYTHON_FOR_BUILD:= \ + _PYTHON_PROJECT_BASE=$(PKG_BUILD_DIR) \ + _PYTHON_HOST_PLATFORM=linux2 \ + PYTHONPATH="$(PKG_BUILD_DIR)/Lib:$(PKG_BUILD_DIR)/build/lib.linux2-$(PYTHON_VERSION)" \ + _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata \ + $(HOST_PYTHON_BIN) + CONFIGURE_ARGS+= \ --sysconfdir=/etc \ --enable-shared \ --without-cxx-main \ --with-threads \ - --with-system-ffi="$(STAGING_DIR)/usr" \ + --with-system-ffi \ --without-pymalloc \ + PYTHON_FOR_BUILD="$(PYTHON_FOR_BUILD)" \ $(ENABLE_IPV6) \ CONFIG_SITE="$(PKG_BUILD_DIR)/config.site" \ OPT="$(TARGET_CFLAGS)" @@ -220,6 +229,9 @@ define PyPackage/python/filespec -|$(PYTHON_PKG_DIR) endef +HOST_LDFLAGS += \ + $$$$(pkg-config --static --libs libcrypto libssl) + HOST_CONFIGURE_ARGS+= \ --without-cxx-main \ --without-pymalloc \ @@ -227,9 +239,8 @@ HOST_CONFIGURE_ARGS+= \ --prefix=$(HOST_PYTHON_DIR) \ --exec-prefix=$(HOST_PYTHON_DIR) \ --with-system-expat=$(STAGING_DIR_HOSTPKG) \ - --with-system-ffi=$(STAGING_DIR_HOSTPKG) \ - CONFIG_SITE= \ - CFLAGS="$(HOST_CFLAGS)" + --with-system-ffi=no \ + CONFIG_SITE= define Host/Install $(MAKE) -C $(HOST_BUILD_DIR) install diff --git a/lang/python/files/python-host.mk b/lang/python/files/python-host.mk index dc0c0c0..6953a09 100644 --- a/lang/python/files/python-host.mk +++ b/lang/python/files/python-host.mk @@ -11,12 +11,6 @@ __python_host_mk_inc=1 # For PYTHON_VERSION $(call include_mk, python-version.mk) -# Compatibility fallback for older OpenWrt and LEDE versions -ifeq ($(STAGING_DIR_HOSTPKG),) - $(warning STAGING_DIR_HOSTPKG is unset - falling back to $$(STAGING_DIR)/host) - STAGING_DIR_HOSTPKG := $(STAGING_DIR)/host -endif - HOST_PYTHON_DIR:=$(STAGING_DIR_HOSTPKG) HOST_PYTHON_INC_DIR:=$(HOST_PYTHON_DIR)/include/python$(PYTHON_VERSION) HOST_PYTHON_LIB_DIR:=$(HOST_PYTHON_DIR)/lib/python$(PYTHON_VERSION) @@ -77,4 +71,11 @@ define Build/Compile/HostPyMod $(3)) endef +define HostPy/Compile/Default + $(call Build/Compile/HostPyMod,,\ + install --root="$(STAGING_DIR_HOSTPKG)" --prefix="" \ + --single-version-externally-managed \ + ) +endef + endif # __python_host_mk_inc diff --git a/lang/python/files/python-package-dev.mk b/lang/python/files/python-package-dev.mk index 6a2b942..647f649 100644 --- a/lang/python/files/python-package-dev.mk +++ b/lang/python/files/python-package-dev.mk @@ -8,7 +8,7 @@ define Package/python-dev $(call Package/python/Default) TITLE:=Python $(PYTHON_VERSION) development files - DEPENDS:=+python + DEPENDS:=+python +python-lib2to3 endef define PyPackage/python-dev/install diff --git a/lang/python/files/python-package.mk b/lang/python/files/python-package.mk index 2a2e371..d0818a6 100644 --- a/lang/python/files/python-package.mk +++ b/lang/python/files/python-package.mk @@ -41,6 +41,15 @@ define PyPackage endef endif + ifndef PyPackage/$(1)/install + define PyPackage/$(1)/install + if [ -d $(PKG_INSTALL_DIR)/usr/bin ]; then \ + $(INSTALL_DIR) $$(1)/usr/bin \ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $$(1)/usr/bin/ + fi + endef + endif + $(call shexport,PyPackage/$(1)/filespec) define Package/$(1)/install @@ -115,21 +124,15 @@ define Build/Compile/PyMod find $(PKG_INSTALL_DIR) -name "*\.pyc" -o -name "*\.pyo" -o -name "*\.exe" | xargs rm -f endef -define PyMod/Default - define Build/Compile - $$(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) - endef - - define Package/$(PKG_NAME)/install - $(INSTALL_DIR) $$(1)$(PYTHON_PKG_DIR) $$(1)/usr/bin - if [ -d $(PKG_INSTALL_DIR)/usr/bin ]; then find $(PKG_INSTALL_DIR)/usr/bin -mindepth 1 -maxdepth 1 -type f -exec $(CP) \{\} $$(1)/usr/bin/ \; ; fi - find $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR) -mindepth 1 -maxdepth 1 \( -type f -o -type d \) -exec $(CP) \{\} $$(1)$(PYTHON_PKG_DIR)/ \; - endef - - define Build/InstallDev - $(INSTALL_DIR) $$(1)/usr/bin $$(1)$(PYTHON_PKG_DIR) - if [ -d $(PKG_INSTALL_DIR)/usr/bin ]; then find $(PKG_INSTALL_DIR)/usr/bin -mindepth 1 -maxdepth 1 -type f -exec $(CP) \{\} $$(1)/usr/bin/ \; ; fi - find $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR) -mindepth 1 -maxdepth 1 \( -type f -o -type d \) -exec $(CP) \{\} $$(1)$(PYTHON_PKG_DIR)/ \; - endef +define PyBuild/Compile/Default + $(call Build/Compile/PyMod,, \ + install --prefix="/usr" --root="$(PKG_INSTALL_DIR)" \ + --single-version-externally-managed \ + ) endef +ifeq ($(BUILD_VARIANT),python) +define Build/Compile + $(call PyBuild/Compile/Default) +endef +endif # python diff --git a/lang/python/files/python-version.mk b/lang/python/files/python-version.mk index 6905c3d..847eaf5 100644 --- a/lang/python/files/python-version.mk +++ b/lang/python/files/python-version.mk @@ -6,5 +6,5 @@ # PYTHON_VERSION:=2.7 -PYTHON_VERSION_MICRO:=12 +PYTHON_VERSION_MICRO:=13 diff --git a/lang/python/patches/005-fix-libffi-x86-64-configure.patch b/lang/python/patches/005-fix-libffi-x86-64-configure.patch deleted file mode 100644 index ea062a3..0000000 --- a/lang/python/patches/005-fix-libffi-x86-64-configure.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff --git a/Modules/_ctypes/libffi/configure b/Modules/_ctypes/libffi/configure -index 75f62a7..4d6c9f2 100755 ---- a/Modules/_ctypes/libffi/configure -+++ b/Modules/_ctypes/libffi/configure -@@ -17257,20 +17257,12 @@ case "$host" in - fi - ;; - -- i?86-*-* | x86_64-*-*) -- TARGETDIR=x86 -- if test $ac_cv_sizeof_size_t = 4; then -- case "$host" in -- *-gnux32) -- TARGET=X86_64 -- ;; -- *) -- TARGET=X86 -- ;; -- esac -- else -- TARGET=X86_64; -- fi -+ i?86-*-*) -+ TARGET=X86; TARGETDIR=x86 -+ ;; -+ -+ x86_64-*-*) -+ TARGET=X86_64; TARGETDIR=x86 - ;; - - ia64*-*-*) diff --git a/lang/python/patches/011-do-not-prefer-ncursesw.patch b/lang/python/patches/011-do-not-prefer-ncursesw.patch deleted file mode 100644 index c5f323c..0000000 --- a/lang/python/patches/011-do-not-prefer-ncursesw.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/setup.py b/setup.py -index 7868b7b..86b0119 100644 ---- a/setup.py -+++ b/setup.py -@@ -725,8 +725,8 @@ class PyBuildExt(build_ext): - # use the same library for the readline and curses modules. - if 'curses' in readline_termcap_library: - curses_library = readline_termcap_library -- elif self.compiler.find_library_file(lib_dirs, 'ncursesw'): -- curses_library = 'ncursesw' -+ #elif self.compiler.find_library_file(lib_dirs, 'ncursesw'): -+ # curses_library = 'ncursesw' - elif self.compiler.find_library_file(lib_dirs, 'ncurses'): - curses_library = 'ncurses' - elif self.compiler.find_library_file(lib_dirs, 'curses'): diff --git a/lang/python/patches/011-remove-setupterm-definition.patch b/lang/python/patches/011-remove-setupterm-definition.patch new file mode 100644 index 0000000..e55d708 --- /dev/null +++ b/lang/python/patches/011-remove-setupterm-definition.patch @@ -0,0 +1,12 @@ +diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c +index e478a57..eb297b4 100644 +--- a/Modules/_cursesmodule.c ++++ b/Modules/_cursesmodule.c +@@ -117,7 +117,6 @@ char *PyCursesVersion = "2.2"; + #defines many common symbols (such as "lines") which breaks the + curses module in other ways. So the code will just specify + explicit prototypes here. */ +-extern int setupterm(char *,int,int *); + #ifdef __sgi + #include + #endif diff --git a/lang/python3/Makefile b/lang/python3/Makefile index 2e0f872..3a08a93 100644 --- a/lang/python3/Makefile +++ b/lang/python3/Makefile @@ -8,22 +8,29 @@ include $(TOPDIR)/rules.mk # The file included below defines PYTHON_VERSION -include ./files/python3-package.mk +include ./files/python3-version.mk PYTHON_VERSION:=$(PYTHON3_VERSION) PYTHON_VERSION_MICRO:=$(PYTHON3_VERSION_MICRO) PKG_NAME:=python3 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO) PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://www.python.org/ftp/python/$(PKG_VERSION) -PKG_MD5SUM:=8906efbacfcdc7c3c9198aeefafd159e +PKG_MD5SUM:=82b143ebbf4514d7e05876bed7a6b1f5 +PKG_HASH:=b0c5f904f685e32d9232f7bdcbece9819a892929063b6e385414ad2dd6a23622 PKG_LICENSE:=PSF PKG_LICENSE_FILES:=LICENSE Modules/_ctypes/libffi_msvc/LICENSE Modules/_ctypes/darwin/LICENSE Modules/_ctypes/libffi/LICENSE Modules/_ctypes/libffi_osx/LICENSE Tools/pybench/LICENSE +# This file provides the necsessary host build variables +include ./files/python3-host.mk + +# For Py3Package +include ./files/python3-package.mk + PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 HOST_BUILD_PARALLEL:=1 @@ -31,7 +38,7 @@ HOST_BUILD_PARALLEL:=1 PKG_BUILD_DIR:=$(BUILD_DIR)/Python-$(PKG_VERSION) HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/Python-$(PKG_VERSION) -PKG_BUILD_DEPENDS:=libbz2/host expat/host python3/host +PKG_BUILD_DEPENDS:=python3/host HOST_BUILD_DEPENDS:=bzip2/host expat/host libffi/host include $(INCLUDE_DIR)/host-build.mk @@ -81,8 +88,12 @@ endef PYTHON3_LIB_FILES_DEL:= PYTHON3_PACKAGES:= PYTHON3_SO_SUFFIX:=cpython-$(PYTHON3_VERSION_MAJOR)$(PYTHON3_VERSION_MINOR).so +PYTHON3_PACKAGES_DEPENDS:= define Py3BasePackage PYTHON3_PACKAGES+=$(1) + ifeq ($(3),) + PYTHON3_PACKAGES_DEPENDS+=$(1) + endif PYTHON3_LIB_FILES_DEL+=$(2) define Py3Package/$(1)/filespec $(subst $(space),$(newline),$(foreach lib_file,$(2),+|$(lib_file))) @@ -93,7 +104,7 @@ include ./files/python3-package-*.mk define Package/python3 $(call Package/python3/Default) - DEPENDS:=+python3-light $(foreach package,$(filter-out python3-dev python3-lib2to3,$(PYTHON3_PACKAGES)),+$(package)) + DEPENDS:=+python3-light $(foreach package,$(PYTHON3_PACKAGES_DEPENDS),+$(package)) endef define Package/python3/description @@ -120,14 +131,22 @@ ifeq ($(CONFIG_IPV6),y) ENABLE_IPV6 += --enable-ipv6 endif +PYTHON_FOR_BUILD:= \ + _PYTHON_PROJECT_BASE=$(PKG_BUILD_DIR) \ + _PYTHON_HOST_PLATFORM=linux2 \ + PYTHONPATH="$(PKG_BUILD_DIR)/Lib:$(PKG_BUILD_DIR)/build/lib.linux2-$(PYTHON_VERSION)" \ + _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata \ + $(HOST_PYTHON3_BIN) + CONFIGURE_ARGS+= \ --sysconfdir=/etc \ --enable-shared \ --without-cxx-main \ --with-threads \ - --with-system-ffi="$(STAGING_DIR)/usr" \ + --with-system-ffi \ --without-pymalloc \ --with-ensurepip=no \ + PYTHON_FOR_BUILD="$(PYTHON_FOR_BUILD)" \ $(ENABLE_IPV6) \ CONFIG_SITE="$(PKG_BUILD_DIR)/config.site" \ OPT="$(TARGET_CFLAGS)" @@ -141,7 +160,11 @@ define Build/InstallDev $(INSTALL_DIR) $(STAGING_DIR)/mk/ $(INSTALL_DIR) $(1)/usr/include/ $(1)/usr/lib/ $(INSTALL_DIR) $(1)/usr/lib/python$(PYTHON_VERSION)/ - $(INSTALL_DATA) ./files/python3-package.mk $(STAGING_DIR)/mk/ + $(INSTALL_DATA) \ + ./files/python3-package.mk \ + ./files/python3-host.mk \ + ./files/python3-version.mk \ + $(STAGING_DIR)/mk/ $(CP) \ $(PKG_INSTALL_DIR)/usr/include/python$(PYTHON_VERSION) \ $(1)/usr/include/ @@ -215,7 +238,7 @@ HOST_CONFIGURE_ARGS+= \ --prefix=$(HOST_PYTHON3_DIR) \ --exec-prefix=$(HOST_PYTHON3_DIR) \ --with-system-expat=$(STAGING_DIR_HOSTPKG) \ - --with-system-ffi=$(STAGING_DIR_HOSTPKG) \ + --with-system-ffi \ --with-ensurepip=no \ CONFIG_SITE= \ CFLAGS="$(HOST_CFLAGS)" diff --git a/lang/python3/files/python3-host.mk b/lang/python3/files/python3-host.mk new file mode 100644 index 0000000..8ff6dd7 --- /dev/null +++ b/lang/python3/files/python3-host.mk @@ -0,0 +1,90 @@ +# +# Copyright (C) 2017 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +ifneq ($(__python3_host_mk_inc),1) +__python3_host_mk_inc=1 + +# For PYTHON3_VERSION +$(call include_mk, python3-version.mk) + +HOST_PYTHON3_DIR:=$(STAGING_DIR_HOSTPKG) +HOST_PYTHON3_INC_DIR:=$(HOST_PYTHON3_DIR)/include/python$(PYTHON3_VERSION) +HOST_PYTHON3_LIB_DIR:=$(HOST_PYTHON3_DIR)/lib/python$(PYTHON3_VERSION) + +HOST_PYTHON3_PKG_DIR:=$(HOST_PYTHON3_DIR)/lib/python$(PYTHON3_VERSION)/site-packages + +HOST_PYTHON3_BIN:=$(HOST_PYTHON3_DIR)/bin/python$(PYTHON3_VERSION) + +HOST_PYTHON3PATH:=$(HOST_PYTHON3_LIB_DIR):$(HOST_PYTHON3_PKG_DIR) + +define HostPython3 + if [ "$(strip $(3))" == "HOST" ]; then \ + export PYTHONPATH="$(HOST_PYTHON3PATH)"; \ + export PYTHONDONTWRITEBYTECODE=0; \ + else \ + export PYTHONPATH="$(PYTHON3PATH)"; \ + export PYTHONDONTWRITEBYTECODE=1; \ + export _python_sysroot="$(STAGING_DIR)"; \ + export _python_prefix="/usr"; \ + export _python_exec_prefix="/usr"; \ + fi; \ + export PYTHONOPTIMIZE=""; \ + $(1) \ + $(HOST_PYTHON3_BIN) $(2); +endef + +# $(1) => commands to execute before running pythons script +# $(2) => python script and its arguments +# $(3) => additional variables +define Build/Compile/HostPy3RunHost + $(call HostPython3, \ + $(if $(1),$(1);) \ + CC="$(HOSTCC)" \ + CCSHARED="$(HOSTCC) $(HOST_FPIC)" \ + CXX="$(HOSTCXX)" \ + LD="$(HOSTCC)" \ + LDSHARED="$(HOSTCC) -shared" \ + CFLAGS="$(HOST_CFLAGS)" \ + CPPFLAGS="$(HOST_CPPFLAGS) -I$(HOST_PYTHON3_INC_DIR)" \ + LDFLAGS="$(HOST_LDFLAGS) -lpython$(PYTHON3_VERSION) -Wl$(comma)-rpath=$(STAGING_DIR_HOSTPKG)/lib" \ + _PYTHON_HOST_PLATFORM=linux2 \ + $(3) \ + , \ + $(2) \ + , \ + HOST \ + ) +endef + + +# $(1) => build subdir +# $(2) => additional arguments to setup.py +# $(3) => additional variables +define Build/Compile/HostPy3Mod + $(call Build/Compile/HostPy3RunHost, \ + cd $(HOST_BUILD_DIR)/$(strip $(1)), \ + ./setup.py $(2), \ + $(3)) +endef + +define HostPy3/Compile/Default + $(call Build/Compile/HostPy3Mod,,\ + install --root="$(STAGING_DIR_HOSTPKG)" --prefix="" \ + --single-version-externally-managed \ + ) +endef + +ifeq ($(BUILD_VARIANT),python3) +define Host/Compile + $(call HostPy3/Compile/Default) +endef + +define Host/Install +endef +endif # python3 + +endif # __python3_host_mk_inc diff --git a/lang/python3/files/python3-package-dev.mk b/lang/python3/files/python3-package-dev.mk index 7c2fc0d..19d9592 100644 --- a/lang/python3/files/python3-package-dev.mk +++ b/lang/python3/files/python3-package-dev.mk @@ -8,7 +8,7 @@ define Package/python3-dev $(call Package/python3/Default) TITLE:=Python $(PYTHON3_VERSION) development files - DEPENDS:=+python3 + DEPENDS:=+python3 +python3-lib2to3 endef define Py3Package/python3-dev/install @@ -22,4 +22,6 @@ $(eval $(call Py3BasePackage,python3-dev, \ /usr/lib/python$(PYTHON_VERSION)/config-$(PYTHON_VERSION) \ /usr/include/python$(PYTHON_VERSION) \ /usr/lib/pkgconfig \ + , \ + DO_NOT_ADD_TO_PACKAGE_DEPENDS \ )) diff --git a/lang/python3/files/python3-package-lib2to3.mk b/lang/python3/files/python3-package-lib2to3.mk index 801fd91..ed712b6 100644 --- a/lang/python3/files/python3-package-lib2to3.mk +++ b/lang/python3/files/python3-package-lib2to3.mk @@ -13,4 +13,6 @@ endef $(eval $(call Py3BasePackage,python3-lib2to3, \ /usr/lib/python$(PYTHON3_VERSION)/lib2to3 \ + , \ + DO_NOT_ADD_TO_PACKAGE_DEPENDS \ )) diff --git a/lang/python3/files/python3-package.mk b/lang/python3/files/python3-package.mk index 60feaf1..f13e737 100644 --- a/lang/python3/files/python3-package.mk +++ b/lang/python3/files/python3-package.mk @@ -5,17 +5,7 @@ # See /LICENSE for more information. # -# Compatibility fallback for older OpenWrt and LEDE versions -ifeq ($(STAGING_DIR_HOSTPKG),) - $(warning STAGING_DIR_HOSTPKG is unset - falling back to $$(STAGING_DIR)/host) - STAGING_DIR_HOSTPKG := $(STAGING_DIR)/host -endif - -PYTHON3_VERSION_MAJOR:=3 -PYTHON3_VERSION_MINOR:=5 -PYTHON3_VERSION_MICRO:=2 - -PYTHON3_VERSION:=$(PYTHON3_VERSION_MAJOR).$(PYTHON3_VERSION_MINOR) +$(call include_mk, python3-version.mk) PYTHON3_DIR:=$(STAGING_DIR)/usr PYTHON3_BIN_DIR:=$(PYTHON3_DIR)/bin @@ -26,22 +16,7 @@ PYTHON3_PKG_DIR:=/usr/lib/python$(PYTHON3_VERSION)/site-packages PYTHON3:=python$(PYTHON3_VERSION) -HOST_PYTHON3_DIR:=$(STAGING_DIR_HOSTPKG) -HOST_PYTHON3_LIB_DIR:=$(HOST_PYTHON3_DIR)/lib/python$(PYTHON3_VERSION) -HOST_PYTHON3_BIN:=$(HOST_PYTHON3_DIR)/bin/python3 - PYTHON3PATH:=$(PYTHON3_LIB_DIR):$(STAGING_DIR)/$(PYTHON3_PKG_DIR):$(PKG_INSTALL_DIR)/$(PYTHON3_PKG_DIR) -define HostPython3 - ( export PYTHONPATH="$(PYTHON3PATH)"; \ - export PYTHONOPTIMIZE=""; \ - export PYTHONDONTWRITEBYTECODE=1; \ - export _python_sysroot="$(STAGING_DIR)"; \ - export _python_prefix="/usr"; \ - export _python_exec_prefix="/usr"; \ - $(1) \ - $(HOST_PYTHON3_BIN) $(2); \ - ) -endef # These configure args are needed in detection of path to Python header files # using autotools. @@ -66,6 +41,15 @@ define Py3Package endef endif + ifndef Py3Package/$(1)/install + define Py3Package/$(1)/install + if [ -d $(PKG_INSTALL_DIR)/usr/bin ]; then \ + $(INSTALL_DIR) $$(1)/usr/bin \ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $$(1)/usr/bin/ + fi + endef + endif + $(call shexport,Py3Package/$(1)/filespec) define Package/$(1)/install @@ -104,15 +88,17 @@ define Py3Package endef endef -# $(1) => build subdir -# $(2) => additional arguments to setup.py +$(call include_mk, python3-host.mk) + +# $(1) => commands to execute before running pythons script +# $(2) => python script and its arguments # $(3) => additional variables -define Build/Compile/Py3Mod - $(INSTALL_DIR) $(PKG_INSTALL_DIR)/$(PYTHON3_PKG_DIR) +define Build/Compile/HostPy3RunTarget $(call HostPython3, \ - cd $(PKG_BUILD_DIR)/$(strip $(1)); \ + $(if $(1),$(1);) \ CC="$(TARGET_CC)" \ CCSHARED="$(TARGET_CC) $(FPIC)" \ + CXX="$(TARGET_CXX)" \ LD="$(TARGET_CC)" \ LDSHARED="$(TARGET_CC) -shared" \ CFLAGS="$(TARGET_CFLAGS)" \ @@ -122,8 +108,31 @@ define Build/Compile/Py3Mod __PYVENV_LAUNCHER__="/usr/bin/$(PYTHON3)" \ $(3) \ , \ - ./setup.py $(2) \ + $(2) \ ) +endef + +# $(1) => build subdir +# $(2) => additional arguments to setup.py +# $(3) => additional variables +define Build/Compile/Py3Mod + $(INSTALL_DIR) $(PKG_INSTALL_DIR)/$(PYTHON3_PKG_DIR) + $(call Build/Compile/HostPy3RunTarget, \ + cd $(PKG_BUILD_DIR)/$(strip $(1)), \ + ./setup.py $(2), \ + $(3)) find $(PKG_INSTALL_DIR) -name "*\.pyc" -o -name "*\.pyo" -o -name "*\.exe" | xargs rm -f endef +define Py3Build/Compile/Default + $(call Build/Compile/Py3Mod,, \ + install --prefix="/usr" --root="$(PKG_INSTALL_DIR)" \ + --single-version-externally-managed \ + ) +endef + +ifeq ($(BUILD_VARIANT),python3) +define Build/Compile + $(call Py3Build/Compile/Default) +endef +endif # python3 diff --git a/lang/python3/files/python3-version.mk b/lang/python3/files/python3-version.mk new file mode 100644 index 0000000..08a130f --- /dev/null +++ b/lang/python3/files/python3-version.mk @@ -0,0 +1,13 @@ +# +# Copyright (C) 2007-2016 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +PYTHON3_VERSION_MAJOR:=3 +PYTHON3_VERSION_MINOR:=6 +PYTHON3_VERSION_MICRO:=0 + +PYTHON3_VERSION:=$(PYTHON3_VERSION_MAJOR).$(PYTHON3_VERSION_MINOR) + diff --git a/lang/python3/patches/011-fix-ncursesw-definition-colisions.patch b/lang/python3/patches/011-fix-ncursesw-definition-colisions.patch new file mode 100644 index 0000000..0df72c7 --- /dev/null +++ b/lang/python3/patches/011-fix-ncursesw-definition-colisions.patch @@ -0,0 +1,24 @@ +diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c +index 3bf2ca7..c156964 100644 +--- a/Modules/_cursesmodule.c ++++ b/Modules/_cursesmodule.c +@@ -116,7 +116,6 @@ char *PyCursesVersion = "2.2"; + #defines many common symbols (such as "lines") which breaks the + curses module in other ways. So the code will just specify + explicit prototypes here. */ +-extern int setupterm(char *,int,int *); + #ifdef __sgi + #include + #endif +diff --git a/setup.py b/setup.py +index af9a414..ee19ecd 100644 +--- a/setup.py ++++ b/setup.py +@@ -1349,7 +1349,6 @@ class PyBuildExt(build_ext): + panel_library = 'panel' + if curses_library == 'ncursesw': + curses_defines.append(('HAVE_NCURSESW', '1')) +- curses_includes.append('/usr/include/ncursesw') + # Bug 1464056: If _curses.so links with ncursesw, + # _curses_panel.so must link with panelw. + panel_library = 'panelw' diff --git a/lang/python3/patches/016-adjust-config-paths.patch b/lang/python3/patches/016-adjust-config-paths.patch new file mode 100644 index 0000000..fb709b7 --- /dev/null +++ b/lang/python3/patches/016-adjust-config-paths.patch @@ -0,0 +1,72 @@ +diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py +index 8bf1a70..c2708c3 100644 +--- a/Lib/distutils/sysconfig.py ++++ b/Lib/distutils/sysconfig.py +@@ -424,6 +424,7 @@ def _init_posix(): + platform=sys.platform, + multiarch=getattr(sys.implementation, '_multiarch', ''), + )) ++ name = '_sysconfigdata' + _temp = __import__(name, globals(), locals(), ['build_time_vars'], 0) + build_time_vars = _temp.build_time_vars + global _config_vars +diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py +index 9314e71..4861261 100644 +--- a/Lib/sysconfig.py ++++ b/Lib/sysconfig.py +@@ -343,6 +343,7 @@ def get_makefile_filename(): + + + def _get_sysconfigdata_name(): ++ return '_sysconfigdata' + return os.environ.get('_PYTHON_SYSCONFIGDATA_NAME', + '_sysconfigdata_{abi}_{platform}_{multiarch}'.format( + abi=sys.abiflags, +diff --git a/Makefile.pre.in b/Makefile.pre.in +index cd7d33d..ad6572f 100644 +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -1301,7 +1301,7 @@ libinstall: build_all $(srcdir)/Modules/xxmodule.c + esac; \ + done; \ + done +- $(INSTALL_DATA) `cat pybuilddir.txt`/_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH).py \ ++ $(INSTALL_DATA) `cat pybuilddir.txt`/_sysconfigdata*.py \ + $(DESTDIR)$(LIBDEST); \ + $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt + if test -d $(DESTDIR)$(LIBDEST)/distutils/tests; then \ +@@ -1436,7 +1436,7 @@ sharedinstall: sharedmods + --install-scripts=$(BINDIR) \ + --install-platlib=$(DESTSHARED) \ + --root=$(DESTDIR)/ +- -rm $(DESTDIR)$(DESTSHARED)/_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH).py ++ -rm $(DESTDIR)$(DESTSHARED)/_sysconfigdata*.py + -rm -r $(DESTDIR)$(DESTSHARED)/__pycache__ + + # Here are a couple of targets for MacOSX again, to install a full +diff --git a/configure b/configure +index cf95b27..8203fbb 100755 +--- a/configure ++++ b/configure +@@ -14895,7 +14895,7 @@ LDVERSION='$(VERSION)$(ABIFLAGS)' + $as_echo "$LDVERSION" >&6; } + + +-if test x$PLATFORM_TRIPLET = x; then ++if true ; then + LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}" + else + LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}" +diff --git a/configure.ac b/configure.ac +index 1d63813..25f25ed 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -4600,7 +4600,7 @@ AC_MSG_RESULT($LDVERSION) + + dnl define LIBPL after ABIFLAGS and LDVERSION is defined. + AC_SUBST(PY_ENABLE_SHARED) +-if test x$PLATFORM_TRIPLET = x; then ++if true ; then + LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}" + else + LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}" diff --git a/lang/ruby/Makefile b/lang/ruby/Makefile index f6dcd2d..adca82f 100644 --- a/lang/ruby/Makefile +++ b/lang/ruby/Makefile @@ -1,23 +1,25 @@ # # Copyright (C) 2006-2016 OpenWrt.org +# Copyright (C) 2017 Luiz Angelo Daros de Luca # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. # # To Do: -# - dirs not removed when uninstalling! +# - dirs not removed when uninstalling! opkg bug? # include $(TOPDIR)/rules.mk PKG_NAME:=ruby -PKG_VERSION:=2.3.3 +PKG_VERSION:=2.4.1 PKG_RELEASE:=1 -PKG_LIBVER:=2.3 +# First two numbes +PKG_ABI_VERSION:=$(subst $(space),.,$(wordlist 1, 2, $(subst .,$(space),$(PKG_VERSION)))) -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=http://cache.ruby-lang.org/pub/ruby/$(PKG_LIBVER)/ -PKG_MD5SUM:=882e6146ed26c6e78c02342835f5d46b86de95f0dc4e16543294bc656594cc5b +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_SOURCE_URL:=http://cache.ruby-lang.org/pub/ruby/$(PKG_ABI_VERSION)/ +PKG_HASH:=4fc8a9992de3e90191de369270ea4b6c1b171b7941743614cc50822ddc1fe654 PKG_MAINTAINER:=Luiz Angelo Daros de Luca PKG_LICENSE:=BSD-2-Clause PKG_LICENSE_FILES:=COPYING @@ -36,7 +38,7 @@ HOST_CONFIGURE_ARGS += \ --disable-install-rdoc \ --disable-install-capi \ --without-gmp \ - --with-out-ext=tk,tk/tkutil,win32,win32ole,dbm,gdbm,readline \ + --with-out-ext=-test-/array/resize,-test-/bignum,-test-/bug-3571,-test-/bug-5832,-test-/bug_reporter,-test-/class,-test-/debug,-test-/dln/empty,-test-/exception,-test-/fatal,-test-/file,-test-/float,-test-/funcall,-test-/gvl/call_without_gvl,-test-/hash,-test-/integer,-test-/iseq_load,-test-/iter,-test-/load/dot.dot,-test-/marshal/compat,-test-/marshal/internal_ivar,-test-/marshal/usr,-test-/memory_status,-test-/method,-test-/notimplement,-test-/num2int,-test-/path_to_class,-test-/popen_deadlock,-test-/postponed_job,-test-/printf,-test-/proc,-test-/rational,-test-/recursion,-test-/st/foreach,-test-/st/numhash,-test-/st/update,-test-/string,-test-/struct,-test-/symbol,-test-/time,-test-/tracepoint,-test-/typeddata,-test-/vm,-test-/wait_for_single_fd,-test-/win32/console,-test-/win32/dln,-test-/win32/fd_setsize,bigdecimal,cgi/escape,continuation,coverage,dbm,etc,fcntl,fiber,fiddle,gdbm,io/console,io/nonblock,io/wait,json,json/generator,json/parser,mathn/complex,mathn/rational,nkf,objspace,openssl,pathname,pty,racc/cparse,rbconfig/sizeof,readline,ripper,rubyvm,sdbm,socket,syslog,win32,win32ole,win32/resolv,zlib # Does not compile with this. Workaround is --without-gmp # https://bugs.ruby-lang.org/issues/11940 @@ -57,7 +59,7 @@ CONFIGURE_ARGS += \ --disable-install-capi \ --with-ruby-version=minor \ --with-iconv-dir=$(ICONV_PREFIX) \ - --with-out-ext=tk,tk/tkutil,win32,win32ole + --with-out-ext=win32,win32ole ifndef CONFIG_RUBY_DIGEST_USE_OPENSSL CONFIGURE_ARGS += \ @@ -73,7 +75,7 @@ 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 +# it will fix when some LD_FLAGS is needed for libraries. As side effect, it will # duplicate ld args for binaries. CONFIGURE_VARS += XLDFLAGS="$(TARGET_LDFLAGS)" @@ -90,7 +92,7 @@ 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 + rm -f $(STAGING_DIR_HOSTPKG)/bin/rake $(call Host/Install/Default) endef @@ -155,15 +157,15 @@ 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_DIR) $(1)/usr/lib/ruby/$(PKG_ABI_VERSION) + $(INSTALL_DIR) $(1)/usr/lib/ruby/vendor_ruby/$(PKG_ABI_VERSION) + $(INSTALL_DIR) $(1)/usr/lib/ruby/site_ruby/$(PKG_ABI_VERSION) + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ruby $(1)/usr/lib/ruby/ruby$(PKG_ABI_VERSION)-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 + $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/vendor_ruby/$(PKG_ABI_VERSION)/* $(1)/usr/lib/ruby/vendor_ruby/$(PKG_ABI_VERSION)/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/site_ruby/$(PKG_ABI_VERSION)/* $(1)/usr/lib/ruby/site_ruby/$(PKG_ABI_VERSION)/ + $(SED) "s%@RUBY_LIBPATH@%/usr/lib/ruby/$(PKG_ABI_VERSION)%" $(1)/usr/bin/ruby + $(SED) "s%@RUBY_BINPATH@%/usr/lib/ruby/ruby$(PKG_ABI_VERSION)-bin%" $(1)/usr/bin/ruby endef define Package/libruby @@ -173,7 +175,7 @@ $(call Package/ruby/Default) CATEGORY:=Libraries TITLE+= (shared library) DEPENDS+= +libpthread +librt +libgmp - ABI_VERSION:=$(PKG_LIBVER) + ABI_VERSION:=$(PKG_ABI_VERSION) endef define Package/libruby/install $(INSTALL_DIR) $(1)/usr/lib @@ -200,25 +202,25 @@ define Package/ruby-stdlib/install endef 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 +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/bigdecimal.so +/usr/lib/ruby/$(PKG_ABI_VERSION)/bigdecimal/ +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/bigdecimal-*.gemspec endef 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 +/usr/lib/ruby/$(PKG_ABI_VERSION)/cgi +/usr/lib/ruby/$(PKG_ABI_VERSION)/cgi.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/cgi/escape.so endef define Package/ruby-csv/files -/usr/lib/ruby/$(PKG_LIBVER)/csv.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/csv.rb endef 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 +/usr/lib/ruby/$(PKG_ABI_VERSION)/time.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/date.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/date_core.so endef define Package/ruby-dbm/description @@ -227,28 +229,28 @@ define Package/ruby-dbm/description endef define Package/ruby-dbm/files -/usr/lib/ruby/$(PKG_LIBVER)/*/dbm.so +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/dbm.so endef 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 +/usr/lib/ruby/$(PKG_ABI_VERSION)/profile.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/profiler.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/debug.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/tracer.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/benchmark.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/objspace.so endef 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-*/ +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/did_you_mean-*.gemspec +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/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 +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/did_you_mean-*/benchmark +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/did_you_mean-*/doc +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/did_you_mean-*/evaluation +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/did_you_mean-*/test +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/did_you_mean-*/*.md endef define Package/ruby-digest/description @@ -270,26 +272,26 @@ define Package/ruby-digest/config endef 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/* +/usr/lib/ruby/$(PKG_ABI_VERSION)/digest +/usr/lib/ruby/$(PKG_ABI_VERSION)/digest.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/digest.so +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/digest/* endef define Package/ruby-drb/files -/usr/lib/ruby/$(PKG_LIBVER)/drb.rb -/usr/lib/ruby/$(PKG_LIBVER)/drb +/usr/lib/ruby/$(PKG_ABI_VERSION)/drb.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/drb endef 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 +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/enc/encdb.so +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/enc/iso_8859_1.so +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/enc/utf_*.so +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/enc/euc_jp.so endef define Package/ruby-enc-extra/files -/usr/lib/ruby/$(PKG_LIBVER)/*/enc +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/enc endef define Package/ruby-enc-extra/files-excluded $(call Package/ruby-enc/files) @@ -297,59 +299,59 @@ endef define Package/ruby-erb/files /usr/bin/erb -/usr/lib/ruby/$(PKG_LIBVER)/erb.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/erb.rb endef 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 +/usr/lib/ruby/$(PKG_ABI_VERSION)/fiddle.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/fiddle/ +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/fiddle.so endef 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 +/usr/lib/ruby/$(PKG_ABI_VERSION)/tmpdir.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/tempfile.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/pathname.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/pathname.so +/usr/lib/ruby/$(PKG_ABI_VERSION)/find.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/fileutils.rb endef define Package/ruby-gdbm/files -/usr/lib/ruby/$(PKG_LIBVER)/*/gdbm.so +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/gdbm.so endef 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 +/usr/lib/ruby/$(PKG_ABI_VERSION)/ubygems.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/rubygems.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/rubygems endef 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 +/usr/lib/ruby/$(PKG_ABI_VERSION)/rubygems/test_case.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/rubygems/package/tar_test_case.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/rubygems/installer_test_case.rb endef 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 + $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default + $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems + $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/doc + $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/cache + $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/extensions + $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/build_info $(call RubyBuildPackage/install,gems,$(1)) endef 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 +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/io/console.so +/usr/lib/ruby/$(PKG_ABI_VERSION)/io/console/ +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/io-console-*.gemspec endef define Package/ruby-irb/files -/usr/lib/ruby/$(PKG_LIBVER)/irb -/usr/lib/ruby/$(PKG_LIBVER)/irb.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/irb +/usr/lib/ruby/$(PKG_ABI_VERSION)/irb.rb endef define Package/ruby-irb/install $(INSTALL_DIR) $(1)/usr/bin @@ -358,159 +360,156 @@ define Package/ruby-irb/install endef 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 +/usr/lib/ruby/$(PKG_ABI_VERSION)/json.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/json +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/json +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/json-*.gemspec endef define Package/ruby-json/files-excluded $(call Package/ruby-psych/files) endef 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 +/usr/lib/ruby/$(PKG_ABI_VERSION)/logger.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/syslog/logger.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/syslog.so endef 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 +/usr/lib/ruby/$(PKG_ABI_VERSION)/prime.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/mathn.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/cmath.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/mathn +/usr/lib/ruby/$(PKG_ABI_VERSION)/matrix.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/matrix endef define Package/ruby-minitest/files -/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/minitest-*.gemspec -/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/minitest-* +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/minitest-*.gemspec +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/minitest-* endef 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 +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/minitest-*/test +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/minitest-*/*.rdoc +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/minitest-*/*.txt endef 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 +/usr/lib/ruby/$(PKG_ABI_VERSION)/English.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/abbrev.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/base64.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/delegate.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/e2mmap.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/expect.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/getoptlong.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/open3.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/ostruct.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/scanf.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/securerandom.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/set.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/shellwords.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/tsort.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/weakref.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/continuation.so +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/coverage.so +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/etc.so +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/fcntl.so +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/fiber.so +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/pty.so +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/stringio.so +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/strscan.so endef define Package/ruby-mkmf/files -/usr/lib/ruby/$(PKG_LIBVER)/mkmf.rb -/usr/lib/ruby/$(PKG_LIBVER)/un.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/mkmf.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/un.rb endef 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 +/usr/lib/ruby/$(PKG_ABI_VERSION)/monitor.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/timeout.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/thwait.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/mutex_m.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/sync.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/io/wait.so +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/io/nonblock.so endef define Package/ruby-net/files -/usr/lib/ruby/$(PKG_LIBVER)/open-uri.rb -/usr/lib/ruby/$(PKG_LIBVER)/net/* +/usr/lib/ruby/$(PKG_ABI_VERSION)/open-uri.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/net/* endef 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-*/ +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/net-telnet-*.gemspec +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/net-telnet-*/ endef 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 +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/net-telnet-*/*.md +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/net-telnet-*/*.txt endef define Package/ruby-nkf/files -/usr/lib/ruby/$(PKG_LIBVER)/kconv.rb -/usr/lib/ruby/$(PKG_LIBVER)/*/nkf.so +/usr/lib/ruby/$(PKG_ABI_VERSION)/kconv.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/nkf.so endef 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 +/usr/lib/ruby/$(PKG_ABI_VERSION)/openssl +/usr/lib/ruby/$(PKG_ABI_VERSION)/openssl.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/openssl.so +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/openssl-*.gemspec endef 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 +/usr/lib/ruby/$(PKG_ABI_VERSION)/optparse.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/optionparser.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/optparse endef 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 +/usr/lib/ruby/$(PKG_ABI_VERSION)/observer.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/singleton.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/forwardable.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/forwardable endef define Package/ruby-powerassert/files -/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/power_assert-*.gemspec -/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/power_assert-* +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/power_assert-*.gemspec +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/power_assert-* endef define Package/ruby-powerassert/files-excluded -/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/power_assert-*/test +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/power_assert-*/test endef define Package/ruby-prettyprint/files -/usr/lib/ruby/$(PKG_LIBVER)/pp.rb -/usr/lib/ruby/$(PKG_LIBVER)/prettyprint.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/pp.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/prettyprint.rb endef define Package/ruby-pstore/files -/usr/lib/ruby/$(PKG_LIBVER)/pstore.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/pstore.rb endef 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 +/usr/lib/ruby/$(PKG_ABI_VERSION)/psych +/usr/lib/ruby/$(PKG_ABI_VERSION)/psych.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/psych.so +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/psych-*.gemspec endef define Package/ruby-racc/files -/usr/lib/ruby/$(PKG_LIBVER)/racc -/usr/lib/ruby/$(PKG_LIBVER)/*/racc/*.so +/usr/lib/ruby/$(PKG_ABI_VERSION)/racc +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/racc/*.so endef define Package/ruby-rake/files -/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/rake-*.gemspec -/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/rake-*/ +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/rake-*.gemspec +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/rake-*/ endef 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 +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/rake-*/doc +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/rake-*/*.rdoc endef define Package/ruby-rake/install $(INSTALL_DIR) $(1)/usr/bin @@ -519,21 +518,21 @@ define Package/ruby-rake/install endef 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 +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/rbconfig.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/rbconfig/* +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/rbconfig/*.so endef 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 + /usr/lib/ruby/$(PKG_ABI_VERSION)/rdoc.rb + /usr/lib/ruby/$(PKG_ABI_VERSION)/rdoc + /usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/rdoc-* + /usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/rdoc-*.gemspec endef 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 + /usr/lib/ruby/$(PKG_ABI_VERSION)/rdoc/test_case.rb + /usr/lib/ruby/$(PKG_ABI_VERSION)/rdoc/markup/formatter_test_case.rb + /usr/lib/ruby/$(PKG_ABI_VERSION)/rdoc/markup/text_formatter_test_case.rb endef define Package/ruby-rdoc/install $(INSTALL_DIR) $(1)/usr/bin @@ -543,83 +542,87 @@ define Package/ruby-rdoc/install endef define Package/ruby-readline/files -/usr/lib/ruby/$(PKG_LIBVER)/*/readline.so +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/readline.so endef define Package/ruby-rexml/files -/usr/lib/ruby/$(PKG_LIBVER)/rexml +/usr/lib/ruby/$(PKG_ABI_VERSION)/rexml endef define Package/ruby-rinda/files -/usr/lib/ruby/$(PKG_LIBVER)/rinda +/usr/lib/ruby/$(PKG_ABI_VERSION)/rinda endef 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 +/usr/lib/ruby/$(PKG_ABI_VERSION)/ripper.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/ripper +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/ripper.so endef define Package/ruby-rss/files -/usr/lib/ruby/$(PKG_LIBVER)/rss -/usr/lib/ruby/$(PKG_LIBVER)/rss.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/rss +/usr/lib/ruby/$(PKG_ABI_VERSION)/rss.rb endef define Package/ruby-sdbm/files -/usr/lib/ruby/$(PKG_LIBVER)/*/sdbm.so +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/sdbm.so endef define Package/ruby-shell/files -/usr/lib/ruby/$(PKG_LIBVER)/shell.rb -/usr/lib/ruby/$(PKG_LIBVER)/shell +/usr/lib/ruby/$(PKG_ABI_VERSION)/shell.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/shell endef 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 +/usr/lib/ruby/$(PKG_ABI_VERSION)/ipaddr.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/resolv-replace.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/resolv.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/socket.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/socket.so endef define Package/ruby-testunit/files -/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/test-unit-*.gemspec -/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/test-unit-* +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/test-unit-*.gemspec +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/test-unit-* endef 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 +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/test-unit-*/doc +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/test-unit-*/test +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/test-unit-*/sample +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/test-unit-*/*.md endef define Package/ruby-unicodenormalize/files -/usr/lib/ruby/$(PKG_LIBVER)/unicode_normalize.rb -/usr/lib/ruby/$(PKG_LIBVER)/unicode_normalize +/usr/lib/ruby/$(PKG_ABI_VERSION)/unicode_normalize.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/unicode_normalize endef define Package/ruby-uri/files -/usr/lib/ruby/$(PKG_LIBVER)/uri.rb -/usr/lib/ruby/$(PKG_LIBVER)/uri +/usr/lib/ruby/$(PKG_ABI_VERSION)/uri.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/uri endef define Package/ruby-webrick/files -/usr/lib/ruby/$(PKG_LIBVER)/webrick -/usr/lib/ruby/$(PKG_LIBVER)/webrick.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/webrick +/usr/lib/ruby/$(PKG_ABI_VERSION)/webrick.rb endef define Package/ruby-xmlrpc/files -/usr/lib/ruby/$(PKG_LIBVER)/xmlrpc -/usr/lib/ruby/$(PKG_LIBVER)/xmlrpc.rb +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/xmlrpc-* +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/xmlrpc-*.gemspec +endef +define Package/ruby-xmlrpc/files-excluded +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/xmlrpc-0.2.1/*.md +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/xmlrpc-0.2.1/*.txt endef define Package/ruby-yaml/files -/usr/lib/ruby/$(PKG_LIBVER)/yaml -/usr/lib/ruby/$(PKG_LIBVER)/yaml.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/yaml +/usr/lib/ruby/$(PKG_ABI_VERSION)/yaml.rb endef define Package/ruby-zlib/files -/usr/lib/ruby/$(PKG_LIBVER)/*/zlib.so +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/zlib.so endef RUBY_FILES = $(strip $(call Package/ruby-$(1)/files)) @@ -690,14 +693,14 @@ $(patsubst /%, $$(eval $$(call BuildPackage,ruby-$(1))) endef -$(eval $(call BuildPackage,ruby)) $(eval $(call BuildPackage,libruby)) +$(eval $(call BuildPackage,ruby)) $(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,csv,CSV library,+ruby-patterns +ruby-datetime +ruby-enc +ruby-misc)) $(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,debuglib,debug library,+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)) @@ -712,7 +715,7 @@ $(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,math,math library,+ruby-patterns +ruby-misc)) $(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)) @@ -722,24 +725,24 @@ $(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,patterns,design patterns implementation,)) +$(eval $(call RubyBuildPackage,powerassert,Gem power_assert,+ruby-ripper +ruby-debuglib)) $(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,rake,Rake (make replacement),+ruby-filelib +ruby-optparse +ruby-patterns +ruby-rbconfig +ruby-multithread)) $(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,rexml,XML toolkit,+ruby-patterns +ruby-enc +ruby-misc)) $(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,shell,idiomatic Ruby interface,+ruby-patterns +ruby-multithread)) $(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,testunit,Gem test-unit,+ruby-csv +ruby-erb +ruby-optparse +ruby-powerassert +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)) diff --git a/lang/ruby/patches/001-acinclude.m4_rename_aclocal.m4.patch b/lang/ruby/patches/001-acinclude.m4_rename_aclocal.m4.patch deleted file mode 100644 index 271bd71..0000000 --- a/lang/ruby/patches/001-acinclude.m4_rename_aclocal.m4.patch +++ /dev/null @@ -1,152 +0,0 @@ -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"], ['@<:@'*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"], ['@<:@'*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/ruby_find_pkgsdeps b/lang/ruby/ruby_find_pkgsdeps index 16f664a..15a6408 100644 --- a/lang/ruby/ruby_find_pkgsdeps +++ b/lang/ruby/ruby_find_pkgsdeps @@ -25,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 psych.jar jar-dependencies} + iconv uconv win32ole gettext/po_parser gettext/mo libxml psych.jar psych_jars jar-dependencies thread minitest/proveit} builtin_enc=[ Encoding.find("ASCII-8BIT"), @@ -164,7 +164,7 @@ package_requires_files.each do else found = package_files.detect {|(pkg,files)| files.detect {|file| $:.detect {|path| "#{path}/#{require}" == file.gsub(/\.(so|rb)$/,"") } } } if not found - $stderr.puts "#{pkg}: Nothing provides #{require}" + $stderr.puts "#{pkg}: Nothing provides #{require} for #{files.collect {|file| file.sub("/usr/lib/ruby/","") }.join(",")}" failed = true next end diff --git a/lang/ruby/ruby_missingfiles b/lang/ruby/ruby_missingfiles index e23b73d..25e5810 100644 --- a/lang/ruby/ruby_missingfiles +++ b/lang/ruby/ruby_missingfiles @@ -5,7 +5,7 @@ function list_staging_files { cd "$1"; find \ - \( \( -name "root-x86" -or -name "packages" -or -name "stamp" -or -name "pkginfo" \) -prune \) -or -true \ + \( \( -name "root-*" -or -name "packages" -or -name "stamp" -or -name "pkginfo" -or -name "host" \) -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/*" \ diff --git a/libs/boost/Makefile b/libs/boost/Makefile index fd87298..45e9c62 100644 --- a/libs/boost/Makefile +++ b/libs/boost/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2015-2016 OpenWrt.org +# Copyright (C) 2015-2017 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -16,15 +16,15 @@ include $(INCLUDE_DIR)/nls.mk include $(INCLUDE_DIR)/target.mk PKG_NAME:=boost -PKG_VERSION:=1.62.0 -PKG_SOURCE_VERSION:=1_62_0 -PKG_RELEASE:=5 +PKG_VERSION:=1.63.0 +PKG_SOURCE_VERSION:=1_63_0 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)_$(PKG_SOURCE_VERSION).tar.bz2 PKG_SOURCE_URL:=https://sourceforge.net/projects/boost/files/boost/$(PKG_VERSION) PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)_$(PKG_SOURCE_VERSION) HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)_$(PKG_SOURCE_VERSION) -PKG_MD5SUM:=36c96b0f6155c98404091d8ceb48319a28279ca0333fba1ad8611eb90afb2ca0 +PKG_MD5SUM:=beae2529f759f6b3bf3f4969a19c2e9d6f0c503edcb2de4a61d1428519fcb3b0 PKG_LICENSE:=Boost Software License PKG_MAINTAINER:=Carlos M. Ferreira @@ -44,7 +44,7 @@ define Package/boost/Default endef define Package/boost/description -This package provides the Boost v1.62 libraries. +This package provides the Boost v1.63 libraries. Boost is a set of free, peer-reviewed, portable C++ source libraries. ----------------------------------------------------------------------------- @@ -68,7 +68,7 @@ This package provides the following run-time libraries: - date_time - exception - filesystem - - fiber (Requires GCC v5 and up) - BROKEN + - fiber (Requires GCC v5 and up) - graph - - graph-parallel - iostreams @@ -88,7 +88,7 @@ This package provides the following run-time libraries: - wave There are many more header-only libraries supported by Boost. -See more at http://www.boost.org/doc/libs/1_62_0/ +See more at http://www.boost.org/doc/libs/1_63_0/ endef PKG_BUILD_DEPENDS:=boost/host PACKAGE_python:python PACKAGE_python3:python3 @@ -336,6 +336,8 @@ TARGET_CFLAGS += \ $(if $(CONFIG_PACKAGE_boost-python3), -I$(STAGING_DIR)/usr/include/python3.5/) \ $(if $(CONFIG_SOFT_FLOAT),-DBOOST_NO_FENV_H) -fPIC +EXTRA_CXXFLAGS += $(if $(CONFIG_GCC_VERSION_4_8),-std=gnu++11,-std=gnu++14) + ifneq ($(findstring mips,$(ARCH)),) BOOST_ABI = o32 ifneq ($(findstring 64,$(ARCH)),) @@ -354,7 +356,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 : \"$(TARGET_CFLAGS)\" \"$(TARGET_CXXFLAGS) $(if $(CONFIG_boost-coroutine2),-std=c++14,)\" \"$(TARGET_LDFLAGS)\" ;" > tools/build/src/user-config.jam ; \ + echo "using gcc : $(ARCH) : $(GNU_TARGET_NAME)-gcc : \"$(TARGET_CFLAGS)\" \"$(TARGET_CXXFLAGS) $(EXTRA_CXXFLAGS)\" \"$(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; \ @@ -415,11 +417,11 @@ endef define Host/Install $(INSTALL_DIR) \ - $(STAGING_DIR)/host/bin + $(STAGING_DIR_HOSTPKG)/bin $(CP) \ $(HOST_BUILD_DIR)/tools/build/src/engine/bin.*/b2 \ - $(STAGING_DIR)/host/bin/ + $(STAGING_DIR_HOSTPKG)/bin/ endef define Package/boost/Default/install diff --git a/libs/boost/patches/01_fiber_fix.patch b/libs/boost/patches/01_fiber_fix.patch index dc62f6f..8989e0b 100644 --- a/libs/boost/patches/01_fiber_fix.patch +++ b/libs/boost/patches/01_fiber_fix.patch @@ -1,8 +1,8 @@ -Index: boost_1_62_0/libs/fiber/build/Jamfile.v2 +Index: boost_1_63_0/libs/fiber/build/Jamfile.v2 =================================================================== ---- boost_1_62_0.orig/libs/fiber/build/Jamfile.v2 -+++ boost_1_62_0/libs/fiber/build/Jamfile.v2 -@@ -43,19 +43,6 @@ lib boost_fiber +--- boost_1_63_0.orig/libs/fiber/build/Jamfile.v2 ++++ boost_1_63_0/libs/fiber/build/Jamfile.v2 +@@ -44,20 +44,6 @@ lib boost_fiber recursive_timed_mutex.cpp timed_mutex.cpp scheduler.cpp @@ -11,6 +11,7 @@ Index: boost_1_62_0/libs/fiber/build/Jamfile.v2 - cxx11_constexpr - cxx11_defaulted_functions - cxx11_final +- cxx11_hdr_mutex - cxx11_hdr_tuple - cxx11_lambdas - cxx11_noexcept diff --git a/libs/dtc/Makefile b/libs/dtc/Makefile new file mode 100644 index 0000000..a2d74a9 --- /dev/null +++ b/libs/dtc/Makefile @@ -0,0 +1,74 @@ +# +# Copyright (C) 2016 Yousong Zhou +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=dtc +PKG_VERSION:=1.4.2 +PKG_RELEASE:=2 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_SOURCE_URL:=https://www.kernel.org/pub/software/utils/dtc +PKG_SOURCE_MD5SUM:=3d5814e31b2046ef51fca8fece998db0 +PKG_LICENSE:=GPL-2.0 +PKG_LICENSE_FILES:=GPL +PKG_INSTALL:=1 +PKG_MAINTAINER:=Yousong Zhou + +include $(INCLUDE_DIR)/package.mk + + +define Package/dtc + SECTION:=utils + CATEGORY:=Utilities + TITLE:=Device Tree Compiler + URL:=http://devicetree.org/Device_Tree_Compiler +endef + +define Package/dtc/description + Device Tree Compiler for Flat Device Trees Device Tree Compiler, dtc, takes + as input a device-tree in a given format and outputs a device-tree in another + format for booting kernels on embedded systems. +endef + +define Package/dtc/install + $(INSTALL_DIR) $(1)/usr/bin + $(CP) $(PKG_INSTALL_DIR)/bin/dtc $(1)/usr/bin +endef + + +define Package/libfdt + SECTION:=libs + CATEGORY:=Libraries + TITLE:=a utility library for reading and manipulating dtb files + URL:=http://devicetree.org/Device_Tree_Compiler +endef + +define Package/libfdt/description + This is a library containing functions for manipulating Flat Device Trees. +endef + +define Package/libfdt/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/lib/libfdt*.so* $(1)/usr/lib +endef + +TARGET_CFLAGS += \ + $(FPIC) + +MAKE_FLAGS += \ + PREFIX= \ + CFLAGS="$(TARGET_CFLAGS)" + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/lib + $(INSTALL_DIR) $(1)/usr/include + $(CP) $(PKG_INSTALL_DIR)/include/* $(1)/usr/include + $(CP) $(PKG_INSTALL_DIR)/lib/* $(1)/usr/lib +endef + +$(eval $(call BuildPackage,dtc)) +$(eval $(call BuildPackage,libfdt)) diff --git a/libs/eventlog/Makefile b/libs/eventlog/Makefile new file mode 100644 index 0000000..d0658ff --- /dev/null +++ b/libs/eventlog/Makefile @@ -0,0 +1,44 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=eventlog +PKG_VERSION:=0.2.12 +PKG_RELEASE:=2 + +PKG_MAINTAINER:=W. Michael Petullo + +PKG_SOURCE_URL:=https://my.balabit.com/downloads/eventlog/0.2/ +PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz +PKG_MD5SUM:=3d6ebda8a161d36cb40d09328f78786b + +PKG_FIXUP:=autoreconf +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/libeventlog + SECTION:=libs + CATEGORY:=Libraries + TITLE:=A new API to format and send structured log messages. +endef + +define Package/eventlog/description + A new API to format and send structured log messages. It supports multiple message + representations (plain, XML attributes and XML tags) and multiple output methods + (local syslogd). +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/eventlog $(1)/usr/include/ + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libevtlog.{a,so*} $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/eventlog.pc $(1)/usr/lib/pkgconfig/ +endef + +define Package/libeventlog/install + $(INSTALL_DIR) $(1)/usr/lib + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libevtlog.so* $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,libeventlog)) diff --git a/libs/expat/Makefile b/libs/expat/Makefile index db599d9..27a8e50 100644 --- a/libs/expat/Makefile +++ b/libs/expat/Makefile @@ -8,11 +8,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=expat -PKG_VERSION:=2.1.0 -PKG_RELEASE:=3 +PKG_VERSION:=2.2.0 +PKG_RELEASE:=1 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_MD5SUM:=dd7dab7a5fea97d2a6a43f511449b7cd +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_MD5SUM:=2f47841c829facb346eb6e3fab5212e2 PKG_SOURCE_URL:=@SF/expat PKG_MAINTAINER:=Steven Barth diff --git a/libs/fftw3/Makefile b/libs/fftw3/Makefile index 7d31b73..e6634da 100644 --- a/libs/fftw3/Makefile +++ b/libs/fftw3/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=fftw3 -PKG_VERSION:=3.3.4 +PKG_VERSION:=3.3.6 PKG_RELEASE:=1 PKG_LICENSE:=GPL-2.0+ PKG_SOURCE:=fftw-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://www.fftw.org -PKG_MD5SUM:=2edab8c06b24feeb3b82bbb3ebf3e7b3 +PKG_MD5SUM:=ccd91b5b12bd0a441e100070ff09a310 PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/fftw-$(PKG_VERSION) PKG_FIXUP:=autoreconf diff --git a/libs/fftw3/patches/001-makefile.patch b/libs/fftw3/patches/001-makefile.patch index c5dd857..6f56fa6 100644 --- a/libs/fftw3/patches/001-makefile.patch +++ b/libs/fftw3/patches/001-makefile.patch @@ -1,19 +1,19 @@ --- a/Makefile.in +++ b/Makefile.in -@@ -232,7 +232,7 @@ +@@ -241,7 +241,7 @@ CTAGS = ctags CSCOPE = cscope DIST_SUBDIRS = support genfft kernel simd-support dft rdft reodft api \ - libbench2 . threads tests mpi doc tools m4 + libbench2 . threads mpi doc tools m4 - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - distdir = $(PACKAGE)-$(VERSION) - top_distdir = $(distdir) -@@ -444,7 +444,7 @@ - # - @COMBINED_THREADS_TRUE@CHICKEN_EGG = threads . + am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \ + $(srcdir)/fftw.pc.in AUTHORS COPYING ChangeLog INSTALL NEWS \ + README TODO compile config.guess config.sub install-sh \ +@@ -470,7 +470,7 @@ + # tools are available, such as fig2dev in maintainer mode) + @BUILD_DOC_TRUE@DOCDIR = doc SUBDIRS = support $(GENFFT) kernel simd-support dft rdft reodft api \ --libbench2 $(CHICKEN_EGG) tests mpi doc tools m4 +-libbench2 $(CHICKEN_EGG) tests mpi $(DOCDIR) tools m4 +libbench2 $(CHICKEN_EGG) mpi m4 EXTRA_DIST = COPYRIGHT bootstrap.sh CONVENTIONS fftw.pc.in diff --git a/libs/glib2/Makefile b/libs/glib2/Makefile index 013e23b..dce64f9 100644 --- a/libs/glib2/Makefile +++ b/libs/glib2/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=glib2 -PKG_VERSION:=2.49.7 -PKG_RELEASE:=1 +PKG_VERSION:=2.50.2 +PKG_RELEASE:=2 PKG_SOURCE:=glib-$(PKG_VERSION).tar.xz PKG_BUILD_DIR:=$(BUILD_DIR)/glib-$(PKG_VERSION) -PKG_SOURCE_URL:=@GNOME/glib/2.49 -PKG_MD5SUM:=397ead3fcf325cb921d54e2c9e7dfd7a +PKG_SOURCE_URL:=@GNOME/glib/2.50 +PKG_MD5SUM:=5eeb2bfaf78a07be59585e8b6e80b1d6 PKG_BUILD_PARALLEL:=1 HOST_BUILD_PARALLEL:=1 @@ -47,13 +47,15 @@ endef HOST_CONFIGURE_ARGS += \ --disable-selinux \ --with-libiconv=gnu \ - --with-pcre=internal + --with-pcre=internal \ + --enable-libmount=no CONFIGURE_ARGS += \ --enable-shared \ --enable-static \ --enable-debug=no \ --disable-selinux \ + --enable-libmount=no \ --disable-fam \ --with-libiconv=gnu \ --with-pcre=internal @@ -61,7 +63,7 @@ CONFIGURE_ARGS += \ 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_HOSTPKG)/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/gnutls/Makefile b/libs/gnutls/Makefile index 69cac8d..aba3255 100644 --- a/libs/gnutls/Makefile +++ b/libs/gnutls/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=gnutls -PKG_VERSION:=3.5.6 +PKG_VERSION:=3.5.11 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.5 -PKG_MD5SUM:=7a38b23757aae009c3eb5bb12fb0afda +PKG_HASH:=51765cc5579e250da77fbd7871507c517d01b15353cc40af7b67e9ec7b6fe28f #PKG_FIXUP:=autoreconf gettext-version PKG_MAINTAINER:=Nikos Mavrogiannopoulos PKG_LICENSE:=LGPLv2.1+ @@ -110,8 +110,10 @@ CONFIGURE_ARGS+= \ --enable-static \ --disable-rpath \ --disable-libdane \ + --with-included-unistring \ --disable-guile \ --disable-nls \ + --without-idn \ --without-zlib \ --enable-local-libopts \ --disable-doc \ diff --git a/libs/icu/Makefile b/libs/icu/Makefile index c70ac16..ecf261e 100644 --- a/libs/icu/Makefile +++ b/libs/icu/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006-2010 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,17 +8,17 @@ include $(TOPDIR)/rules.mk PKG_NAME:=icu4c -PKG_VERSION:=55.1 -PKG_RELEASE:=1 +PKG_VERSION:=58.2 +PKG_RELEASE:=2 -PKG_SOURCE:=$(PKG_NAME)-55_1-src.tgz -PKG_SOURCE_URL:=http://download.icu-project.org/files/icu4c/55.1 -PKG_MD5SUM:=e2d523df79d6cb7855c2fbe284f4db29 +PKG_SOURCE:=$(PKG_NAME)-58_2-src.tgz +PKG_SOURCE_URL:=http://download.icu-project.org/files/$(PKG_NAME)/$(PKG_VERSION) +PKG_MD5SUM:=fac212b32b7ec7ab007a12dff1f3aea1 PKG_LICENSE:=ICU-1.8.1+ -PKG_LICENSE_FILES:=license.html +PKG_LICENSE_FILES:=LICENSE -PKG_MAINTAINER:=Mirko Vogt +PKG_MAINTAINER:=Hirokazu MORIKAWA PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 @@ -26,7 +26,6 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_BUILD_DEPENDS:=icu/host - include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/host-build.mk @@ -41,25 +40,39 @@ define Package/icu DEPENDS:=+libstdcpp +libpthread endef -define Build/Configure - $(call Build/Configure/Default, \ - --disable-debug \ - --enable-release \ - --enable-shared \ - --enable-static \ - --enable-draft \ - --enable-renaming \ - --disable-tracing \ - --disable-extras \ - --enable-dyload \ - --enable-layout \ - --enable-layoutex \ - --disable-tools \ - --disable-tests \ - --disable-samples \ - --with-cross-build="$(HOST_BUILD_DIR)" \ - ) -endef +CONFIGURE_CMD:= ./runConfigureICU +CONFIGURE_VARS:= +CONFIGURE_ARGS:= \ + Linux/gcc \ + --disable-debug \ + --enable-release \ + --enable-shared \ + --enable-static \ + --enable-draft \ + --enable-renaming \ + --disable-tracing \ + --disable-extras \ + --enable-dyload \ + --disable-tools \ + --disable-tests \ + --disable-samples \ + --with-cross-build="$(HOST_BUILD_DIR)" \ + --prefix=/usr + +HOST_CONFIGURE_CMD:= ./runConfigureICU +HOST_CONFIGURE_VARS:= +HOST_CONFIGURE_ARGS:= \ + Linux/gcc \ + --disable-debug \ + --enable-release \ + --enable-shared \ + --enable-static \ + --enable-draft \ + --enable-renaming \ + --disable-tracing \ + --disable-extras \ + --enable-dyload \ + --prefix=$(HOST_BUILD_PREFIX) define Build/InstallDev $(INSTALL_DIR) \ diff --git a/libs/icu/patches/000-dont-cpy-files-from-topdirs.patch b/libs/icu/patches/000-dont-cpy-files-from-topdirs.patch index cc7d938..8b8cb7b 100644 --- a/libs/icu/patches/000-dont-cpy-files-from-topdirs.patch +++ b/libs/icu/patches/000-dont-cpy-files-from-topdirs.patch @@ -6,7 +6,7 @@ index 9db6c52..6aa2273 100644 $(INSTALL_SCRIPT) $(top_srcdir)/install-sh $(DESTDIR)$(pkgdatadir)/install-sh @$(MKINSTALLDIRS) $(DESTDIR)$(libdir)/pkgconfig $(INSTALL_DATA) $(ALL_PKGCONFIG_FILES) $(DESTDIR)$(libdir)/pkgconfig/ -- $(INSTALL_DATA) $(top_srcdir)/../license.html $(DESTDIR)$(pkgdatadir)/license.html +- $(INSTALL_DATA) $(top_srcdir)/../LICENSE $(DESTDIR)$(pkgdatadir)/LICENSE $(INSTALL_SCRIPT) $(top_builddir)/config/icu-config $(DESTDIR)$(bindir)/icu-config $(INSTALL_DATA) $(top_builddir)/config/Makefile.inc $(DESTDIR)$(pkglibdir)/Makefile.inc $(INSTALL_DATA) $(top_builddir)/config/pkgdata.inc $(DESTDIR)$(pkglibdir)/pkgdata.inc diff --git a/libs/icu/patches/001-disable-strtod_l.patch b/libs/icu/patches/001-disable-strtod_l.patch new file mode 100644 index 0000000..b84d14f --- /dev/null +++ b/libs/icu/patches/001-disable-strtod_l.patch @@ -0,0 +1,26 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -893,8 +893,8 @@ + AC_CHECK_FUNC(strtod_l) + if test x$ac_cv_func_strtod_l = xyes + then +- CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_STRTOD_L=1" +- U_HAVE_STRTOD_L=1 ++ CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_STRTOD_L=0" ++ U_HAVE_STRTOD_L=0 + else + CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_STRTOD_L=0" + U_HAVE_STRTOD_L=0 +--- a/configure ++++ b/configure +@@ -7053,8 +7053,8 @@ + + if test x$ac_cv_func_strtod_l = xyes + then +- CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_STRTOD_L=1" +- U_HAVE_STRTOD_L=1 ++ CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_STRTOD_L=0" ++ U_HAVE_STRTOD_L=0 + else + CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_STRTOD_L=0" + U_HAVE_STRTOD_L=0 diff --git a/libs/icu/patches/CVE-2017-7867_CVE-2017-7868.patch b/libs/icu/patches/CVE-2017-7867_CVE-2017-7868.patch new file mode 100644 index 0000000..accba5f --- /dev/null +++ b/libs/icu/patches/CVE-2017-7867_CVE-2017-7868.patch @@ -0,0 +1,176 @@ +Index: source/test/intltest/utxttest.h +=================================================================== +--- source/test/intltest/utxttest.h (revision 39670) ++++ source/test/intltest/utxttest.h (revision 39671) +@@ -38,6 +38,7 @@ + void Ticket10562(); + void Ticket10983(); + void Ticket12130(); ++ void Ticket12888(); + + private: + struct m { // Map between native indices & code points. +Index: source/test/intltest/utxttest.cpp +=================================================================== +--- source/test/intltest/utxttest.cpp (revision 39670) ++++ source/test/intltest/utxttest.cpp (revision 39671) +@@ -67,6 +67,8 @@ + if (exec) Ticket10983(); break; + case 7: name = "Ticket12130"; + if (exec) Ticket12130(); break; ++ case 8: name = "Ticket12888"; ++ if (exec) Ticket12888(); break; + default: name = ""; break; + } + } +@@ -1583,3 +1585,63 @@ + } + utext_close(&ut); + } ++ ++// Ticket 12888: bad handling of illegal utf-8 containing many instances of the archaic, now illegal, ++// six byte utf-8 forms. Original implementation had an assumption that ++// there would be at most three utf-8 bytes per UTF-16 code unit. ++// The five and six byte sequences map to a single replacement character. ++ ++void UTextTest::Ticket12888() { ++ const char *badString = ++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80" ++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80" ++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80" ++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80" ++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80" ++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80" ++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80" ++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80" ++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80" ++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80" ++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80" ++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80" ++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80" ++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80" ++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80" ++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80" ++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80" ++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80" ++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80" ++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"; ++ ++ UErrorCode status = U_ZERO_ERROR; ++ LocalUTextPointer ut(utext_openUTF8(NULL, badString, -1, &status)); ++ TEST_SUCCESS(status); ++ for (;;) { ++ UChar32 c = utext_next32(ut.getAlias()); ++ if (c == U_SENTINEL) { ++ break; ++ } ++ } ++ int32_t endIdx = utext_getNativeIndex(ut.getAlias()); ++ if (endIdx != (int32_t)strlen(badString)) { ++ errln("%s:%d expected=%d, actual=%d", __FILE__, __LINE__, strlen(badString), endIdx); ++ return; ++ } ++ ++ for (int32_t prevIndex = endIdx; prevIndex>0;) { ++ UChar32 c = utext_previous32(ut.getAlias()); ++ int32_t currentIndex = utext_getNativeIndex(ut.getAlias()); ++ if (c != 0xfffd) { ++ errln("%s:%d (expected, actual, index) = (%d, %d, %d)\n", ++ __FILE__, __LINE__, 0xfffd, c, currentIndex); ++ break; ++ } ++ if (currentIndex != prevIndex - 6) { ++ errln("%s:%d: wrong index. Expected, actual = %d, %d", ++ __FILE__, __LINE__, prevIndex - 6, currentIndex); ++ break; ++ } ++ prevIndex = currentIndex; ++ } ++} +Index: source/common/utext.cpp +=================================================================== +--- source/common/utext.cpp (revision 39670) ++++ source/common/utext.cpp (revision 39671) +@@ -847,9 +847,15 @@ + //------------------------------------------------------------------------------ + + // Chunk size. +-// Must be less than 85, because of byte mapping from UChar indexes to native indexes. +-// Worst case is three native bytes to one UChar. (Supplemenaries are 4 native bytes +-// to two UChars.) ++// Must be less than 42 (256/6), because of byte mapping from UChar indexes to native indexes. ++// Worst case there are six UTF-8 bytes per UChar. ++// obsolete 6 byte form fd + 5 trails maps to fffd ++// obsolete 5 byte form fc + 4 trails maps to fffd ++// non-shortest 4 byte forms maps to fffd ++// normal supplementaries map to a pair of utf-16, two utf8 bytes per utf-16 unit ++// mapToUChars array size must allow for the worst case, 6. ++// This could be brought down to 4, by treating fd and fc as pure illegal, ++// rather than obsolete lead bytes. But that is not compatible with the utf-8 access macros. + // + enum { UTF8_TEXT_CHUNK_SIZE=32 }; + +@@ -889,7 +895,7 @@ + // Requires two extra slots, + // one for a supplementary starting in the last normal position, + // and one for an entry for the buffer limit position. +- uint8_t mapToUChars[UTF8_TEXT_CHUNK_SIZE*3+6]; // Map native offset from bufNativeStart to ++ uint8_t mapToUChars[UTF8_TEXT_CHUNK_SIZE*6+6]; // Map native offset from bufNativeStart to + // correspoding offset in filled part of buf. + int32_t align; + }; +@@ -1032,6 +1038,7 @@ + // Requested index is in this buffer. + u8b = (UTF8Buf *)ut->p; // the current buffer + mapIndex = ix - u8b->toUCharsMapStart; ++ U_ASSERT(mapIndex < (int32_t)sizeof(UTF8Buf::mapToUChars)); + ut->chunkOffset = u8b->mapToUChars[mapIndex] - u8b->bufStartIdx; + return TRUE; + +@@ -1298,6 +1305,10 @@ + // Can only do this if the incoming index is somewhere in the interior of the string. + // If index is at the end, there is no character there to look at. + if (ix != ut->b) { ++ // Note: this function will only move the index back if it is on a trail byte ++ // and there is a preceding lead byte and the sequence from the lead ++ // through this trail could be part of a valid UTF-8 sequence ++ // Otherwise the index remains unchanged. + U8_SET_CP_START(s8, 0, ix); + } + +@@ -1311,7 +1322,10 @@ + UChar *buf = u8b->buf; + uint8_t *mapToNative = u8b->mapToNative; + uint8_t *mapToUChars = u8b->mapToUChars; +- int32_t toUCharsMapStart = ix - (UTF8_TEXT_CHUNK_SIZE*3 + 1); ++ int32_t toUCharsMapStart = ix - sizeof(UTF8Buf::mapToUChars) + 1; ++ // Note that toUCharsMapStart can be negative. Happens when the remaining ++ // text from current position to the beginning is less than the buffer size. ++ // + 1 because mapToUChars must have a slot at the end for the bufNativeLimit entry. + int32_t destIx = UTF8_TEXT_CHUNK_SIZE+2; // Start in the overflow region + // at end of buffer to leave room + // for a surrogate pair at the +@@ -1338,6 +1352,7 @@ + if (c<0x80) { + // Special case ASCII range for speed. + buf[destIx] = (UChar)c; ++ U_ASSERT(toUCharsMapStart <= srcIx); + mapToUChars[srcIx - toUCharsMapStart] = (uint8_t)destIx; + mapToNative[destIx] = (uint8_t)(srcIx - toUCharsMapStart); + } else { +@@ -1367,6 +1382,7 @@ + do { + mapToUChars[sIx-- - toUCharsMapStart] = (uint8_t)destIx; + } while (sIx >= srcIx); ++ U_ASSERT(toUCharsMapStart <= (srcIx+1)); + + // Set native indexing limit to be the current position. + // We are processing a non-ascii, non-native-indexing char now; +@@ -1541,6 +1557,7 @@ + U_ASSERT(index>=ut->chunkNativeStart+ut->nativeIndexingLimit); + U_ASSERT(index<=ut->chunkNativeLimit); + int32_t mapIndex = index - u8b->toUCharsMapStart; ++ U_ASSERT(mapIndex < (int32_t)sizeof(UTF8Buf::mapToUChars)); + int32_t offset = u8b->mapToUChars[mapIndex] - u8b->bufStartIdx; + U_ASSERT(offset>=0 && offset<=ut->chunkLength); + return offset; diff --git a/libs/libcanfestival/Makefile b/libs/libcanfestival/Makefile new file mode 100644 index 0000000..9758ef3 --- /dev/null +++ b/libs/libcanfestival/Makefile @@ -0,0 +1,71 @@ +# +# 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:=libcanfestival +PKG_RELEASE:=3 + +PKG_SOURCE_PROTO:=hg +PKG_SOURCE_URL:=http://dev.automforge.net/CanFestival-3 +PKG_SOURCE_SUBDIR:=$(PKG_NAME) +PKG_SOURCE_VERSION:=8bfe0ac00cdb +PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.bz2 + +PKG_MAINTAINER:=Anton Glukhov +PKG_LICENSE:=LGPL-2.1+ +PKG_LICENSE_FILES:=LICENCE + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) + +PKG_FIXUP:=autoreconf +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/libcanfestival + SECTION:=libs + CATEGORY:=Libraries + TITLE:=Free software CANopen library + URL:=http://canfestival.org + DEPENDS:=+libpthread +librt +endef + +define Package/libcanfestival/description + CanFestival library +endef + +TARGET_CFLAGS += $(FPIC) + +CONFIGURE_ARGS := \ + --cc=$(TARGET_CC) \ + --cxx=$(TARGET_CXX) \ + --ld=$(TARGET_CC) \ + --arch=$(ARCH) \ + --binutils=$(TARGET_CROSS) \ + --os=Linux \ + --kerneldir=$(LINUX_DIR) \ + --prefix=/usr \ + --target=unix \ + --can=socket \ + --timers=unix \ + --debug=ERR \ + +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/libcanfestival/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcanfestival_can_socket.so $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,libcanfestival)) diff --git a/libs/libcanfestival/patches/001-sigval-ref-fix.patch b/libs/libcanfestival/patches/001-sigval-ref-fix.patch new file mode 100644 index 0000000..7e15ff1 --- /dev/null +++ b/libs/libcanfestival/patches/001-sigval-ref-fix.patch @@ -0,0 +1,11 @@ +--- a/drivers/timers_unix/timers_unix.c ++++ b/drivers/timers_unix/timers_unix.c +@@ -33,7 +33,7 @@ + } + } + +-void timer_notify(sigval_t val) ++void timer_notify(void) + { + if(gettimeofday(&last_sig,NULL)) { + perror("gettimeofday()"); diff --git a/libs/libcanfestival/patches/002-makefile-gcc-linker.patch b/libs/libcanfestival/patches/002-makefile-gcc-linker.patch new file mode 100644 index 0000000..129743f --- /dev/null +++ b/libs/libcanfestival/patches/002-makefile-gcc-linker.patch @@ -0,0 +1,33 @@ +--- a/examples/TestMasterMicroMod/Makefile.in ++++ b/examples/TestMasterMicroMod/Makefile.in +@@ -56,7 +56,7 @@ + + + $(TESTMASTERMICROMOD): $(OBJS) +- $(LD) $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) -o $@ $(OBJS) $(EXE_CFLAGS) ++ $(CC) $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) -o $@ $(OBJS) $(EXE_CFLAGS) + + + TestMaster.c: TestMaster.od +--- a/examples/TestMasterSlave/Makefile.in ++++ b/examples/TestMasterSlave/Makefile.in +@@ -65,7 +65,7 @@ + + + $(TESTMASTERSLAVE): $(OBJS) +- $(LD) $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) -o $@ $(OBJS) $(EXE_CFLAGS) ++ $(CC) $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) -o $@ $(OBJS) $(EXE_CFLAGS) + + TestSlave.c: TestSlave.od + $(MAKE) -C ../../objdictgen gnosis +--- a/examples/CANOpenShell/Makefile.in ++++ b/examples/CANOpenShell/Makefile.in +@@ -64,7 +64,7 @@ + $(MAKE) -C ../../drivers/$(TARGET) libcanfestival_$(TARGET).a + + $(CANOPENSHELL): $(OBJS) +- $(LD) $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) -o $@ $(OBJS) $(EXE_CFLAGS) ++ $(CC) $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) -o $@ $(OBJS) $(EXE_CFLAGS) + mkdir -p Debug; cp $(CANOPENSHELL) Debug + + CANOpenShellMasterOD.c: CANOpenShellMasterOD.od diff --git a/libs/libcanfestival/patches/003-makefile-skip-examples.patch b/libs/libcanfestival/patches/003-makefile-skip-examples.patch new file mode 100644 index 0000000..e52fc6a --- /dev/null +++ b/libs/libcanfestival/patches/003-makefile-skip-examples.patch @@ -0,0 +1,20 @@ +--- a/Makefile.in ++++ b/Makefile.in +@@ -21,7 +21,7 @@ + # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + # + +-all: objdictedit canfestival examples ++all: objdictedit canfestival + + examples: canfestival driver + $(MAKE) -C examples all +@@ -44,7 +44,7 @@ driver: + install: canfestival driver + $(MAKE) -C drivers $@ + $(MAKE) -C src $@ +- $(MAKE) -C examples $@ ++ #$(MAKE) -C examples $@ + $(MAKE) -C objdictgen $@ + ldconfig + diff --git a/libs/libcoap/Makefile b/libs/libcoap/Makefile new file mode 100644 index 0000000..fb220a9 --- /dev/null +++ b/libs/libcoap/Makefile @@ -0,0 +1,64 @@ +# +# 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:=libcoap +PKG_RELEASE:=3 + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/obgm/libcoap +PKG_SOURCE_SUBDIR:=$(PKG_NAME) +PKG_SOURCE_VERSION:=2da31de732c0e51a9bc9e1d4aea21e25da89cf87 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.bz2 + +PKG_MAINTAINER:=Anton Glukhov +PKG_LICENSE:=GPL-2.0+ BSD-2-Clause +PKG_LICENSE_FILES:=COPYING LICENSE.GPL LICENSE.BSD + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) + +PKG_FIXUP:=autoreconf +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/libcoap + SECTION:=libs + CATEGORY:=Libraries + TITLE:=CoAP (RFC 7252) library + URL:=http://libcoap.net/ +endef + +define Package/libcoap/description + Constrained Application Protocol (RFC 7252) library +endef + +TARGET_CFLAGS += $(FPIC) + +CONFIGURE_ARGS += \ + --disable-examples \ + --disable-documentation + +ifeq ($(CONFIG_BIG_ENDIAN),y) +TARGET_CFLAGS += -DWORDS_BIGENDIAN +endif + +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/libcoap/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcoap-1.so* $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,libcoap)) diff --git a/libs/libevhtp/Makefile b/libs/libevhtp/Makefile deleted file mode 100644 index a81e7ab..0000000 --- a/libs/libevhtp/Makefile +++ /dev/null @@ -1,51 +0,0 @@ -# -# Copyright (C) 2007-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -# NOTE: please DO NOT update this package without the maintainer's consent. -# See https://github.com/haiwen/seafile/issues/1119 - -include $(TOPDIR)/rules.mk - -PKG_NAME:=libevhtp -PKG_VERSION:=1.1.6 -PKG_RELEASE:=1 -PKG_LICENSE:=BSD-3-Clause - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/ellzey/libevhtp.git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=91071e2f20749cd469b87ac2ef1c158dc2a6806f -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz - -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/libevhtp - SECTION:=libs - CATEGORY:=Libraries - TITLE:=A more flexible replacement for libevent's httpd API - MAINTAINER:=Gergely Kiss - URL:=https://github.com/ellzey/libevhtp - DEPENDS:=+libevent2 +libevent2-openssl +libevent2-pthreads +libopenssl +libpthread -endef - -define Package/libevhtp/description - Libevhtp was created as a replacement API for Libevent's current HTTP API. - The reality of libevent's http interface is that it was created as a JIT server, - meaning the developer never thought of it being used for creating a full-fledged HTTP service. -endef - -include $(INCLUDE_DIR)/cmake.mk - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/{include,lib} - $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/ -endef - -$(eval $(call BuildPackage,libevhtp)) diff --git a/libs/libevhtp/patches/010-strcmp-endianness-fix.patch b/libs/libevhtp/patches/010-strcmp-endianness-fix.patch deleted file mode 100644 index 072b76b..0000000 --- a/libs/libevhtp/patches/010-strcmp-endianness-fix.patch +++ /dev/null @@ -1,49 +0,0 @@ -diff -rupN libevhtp-1.2.9.orig/htparse/htparse.c libevhtp-1.2.9/htparse/htparse.c ---- libevhtp-1.2.9.orig/htparse/htparse.c 2014-03-23 12:50:50.000000000 +0100 -+++ libevhtp-1.2.9/htparse/htparse.c 2014-12-09 01:12:22.242001241 +0100 -@@ -197,6 +197,7 @@ static const char * method_strmap[] = { - - #define _MIN_READ(a, b) ((a) < (b) ? (a) : (b)) - -+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ - #define _str3_cmp(m, c0, c1, c2, c3) \ - *(uint32_t *)m == ((c3 << 24) | (c2 << 16) | (c1 << 8) | c0) - -@@ -226,6 +227,37 @@ static const char * method_strmap[] = { - *(uint32_t *)m == ((c3 << 24) | (c2 << 16) | (c1 << 8) | c0) \ - && ((uint32_t *)m)[1] == ((c7 << 24) | (c6 << 16) | (c5 << 8) | c4) \ - && m[8] == c8 -+#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ -+#define _str3_cmp(m, c0, c1, c2, c3) \ -+ *(uint32_t *)m == ((c0 << 24) | (c1 << 16) | (c2 << 8) | c3) -+ -+#define _str3Ocmp(m, c0, c1, c2, c3) \ -+ *(uint32_t *)m == ((c0 << 24) | (c1 << 16) | (c2 << 8) | c3) -+ -+#define _str4cmp(m, c0, c1, c2, c3) \ -+ *(uint32_t *)m == ((c0 << 24) | (c1 << 16) | (c2 << 8) | c3) -+ -+#define _str5cmp(m, c0, c1, c2, c3, c4) \ -+ *(uint32_t *)m == ((c0 << 24) | (c1 << 16) | (c2 << 8) | c3) \ -+ && m[4] == c4 -+ -+#define _str6cmp(m, c0, c1, c2, c3, c4, c5) \ -+ *(uint32_t *)m == ((c0 << 24) | (c1 << 16) | (c2 << 8) | c3) \ -+ && (((uint32_t *)m)[1] & 0xffff0000) == ((c4 << 24) | c5 << 16) -+ -+#define _str7_cmp(m, c0, c1, c2, c3, c4, c5, c6, c7) \ -+ *(uint32_t *)m == ((c0 << 24) | (c1 << 16) | (c2 << 8) | c3) \ -+ && ((uint32_t *)m)[1] == ((c4 << 24) | (c5 << 16) | (c6 << 8) | c7) -+ -+#define _str8cmp(m, c0, c1, c2, c3, c4, c5, c6, c7) \ -+ *(uint32_t *)m == ((c0 << 24) | (c1 << 16) | (c2 << 8) | c3) \ -+ && ((uint32_t *)m)[1] == ((c4 << 24) | (c5 << 16) | (c6 << 8) | c7) -+ -+#define _str9cmp(m, c0, c1, c2, c3, c4, c5, c6, c7, c8) \ -+ *(uint32_t *)m == ((c0 << 24) | (c1 << 16) | (c2 << 8) | c3) \ -+ && ((uint32_t *)m)[1] == ((c4 << 24) | (c5 << 16) | (c6 << 8) | c7) \ -+ && m[8] == c8 -+#endif - - #define __HTPARSE_GENHOOK(__n) \ - static inline int hook_ ## __n ## _run(htparser * p, htparse_hooks * hooks) { \ diff --git a/libs/libexif/Makefile b/libs/libexif/Makefile index c290bdd..0588304 100644 --- a/libs/libexif/Makefile +++ b/libs/libexif/Makefile @@ -41,6 +41,7 @@ CONFIGURE_ARGS+= \ --enable-shared \ --enable-static \ --disable-rpath \ + --disable-nls \ --without-libiconv-prefix \ --without-libintl-prefix \ diff --git a/libs/libextractor/Makefile b/libs/libextractor/Makefile index ddccc88..914dd56 100644 --- a/libs/libextractor/Makefile +++ b/libs/libextractor/Makefile @@ -1,6 +1,4 @@ # -# Copyright (C) 2015 OpenWrt.org -# # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. # @@ -9,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libextractor PKG_VERSION:=1.3 -PKG_RELEASE:=3 +PKG_RELEASE:=4 # ToDo: # - package missing optional dependencies: libexiv2, gsf, librpm, smf, tidy @@ -17,6 +15,7 @@ PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@GNU/$(PKG_NAME) PKG_MD5SUM:=35b8913dbebafe583a2781bf71509c48 +PKG_HASH:=868ad64c9a056d6b923d451d746935bffb1ddf5d89c3eb4f67d786001a3f7b7f PKG_LICENSE:=GPL-3.0 PKG_LICENSE_FILES:=COPYING @@ -31,7 +30,7 @@ PLUGINS:= \ dvi \ flac:+libflac \ gif:+giflib \ - gstreamer:+libgstreamer1:+libgst1app:+libgst1pbutils:+libgst1tag \ + gstreamer:+libgstreamer1:+gstreamer1-plugins-base:+libgst1app:+libgst1pbutils:+libgst1tag \ it \ jpeg:+libjpeg \ man \ diff --git a/libs/libextractor/patches/002-ffmpeg2.9_api_backport.patch b/libs/libextractor/patches/002-ffmpeg2.9_api_backport.patch new file mode 100644 index 0000000..f875729 --- /dev/null +++ b/libs/libextractor/patches/002-ffmpeg2.9_api_backport.patch @@ -0,0 +1,347 @@ +--- a/src/plugins/thumbnailffmpeg_extractor.c ++++ b/src/plugins/thumbnailffmpeg_extractor.c +@@ -59,6 +59,20 @@ + #include + #endif + ++#if USE_JPEG ++#ifdef PIX_FMT_YUVJ420P ++#define PIX_OUTPUT_FORMAT PIX_FMT_YUVJ420P ++#else ++#define PIX_OUTPUT_FORMAT AV_PIX_FMT_YUVJ420P ++#endif ++#else ++#ifdef PIX_FMT_RGB24 ++#define PIX_OUTPUT_FORMAT PIX_FMT_RGB24 ++#else ++#define PIX_OUTPUT_FORMAT AV_PIX_FMT_RGB24 ++#endif ++#endif ++ + /** + * Set to 1 to enable debug output. + */ +@@ -153,7 +167,7 @@ + static size_t + create_thumbnail (int src_width, int src_height, + int src_stride[], +- enum PixelFormat src_pixfmt, ++ enum AVPixelFormat src_pixfmt, + const uint8_t * const src_data[], + int dst_width, int dst_height, + uint8_t **output_data, +@@ -189,7 +203,8 @@ + if (NULL == + (scaler_ctx = + sws_getContext (src_width, src_height, src_pixfmt, +- dst_width, dst_height, PIX_FMT_RGB24, ++ dst_width, dst_height, ++ PIX_OUTPUT_FORMAT, + SWS_BILINEAR, NULL, NULL, NULL))) + { + #if DEBUG +@@ -199,7 +214,12 @@ + return 0; + } + +- if (NULL == (dst_frame = avcodec_alloc_frame ())) ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1) ++ dst_frame = av_frame_alloc (); ++#else ++ dst_frame = avcodec_alloc_frame(); ++#endif ++ if (NULL == dst_frame) + { + #if DEBUG + fprintf (stderr, +@@ -209,18 +229,24 @@ + return 0; + } + if (NULL == (dst_buffer = +- av_malloc (avpicture_get_size (PIX_FMT_RGB24, dst_width, dst_height)))) ++ av_malloc (avpicture_get_size (PIX_OUTPUT_FORMAT, ++ dst_width, dst_height)))) + { + #if DEBUG + fprintf (stderr, + "Failed to allocate the destination image buffer\n"); + #endif +- av_free (dst_frame); ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1) ++ av_frame_free (&dst_frame); ++#else ++ avcodec_free_frame (&dst_frame); ++#endif + sws_freeContext (scaler_ctx); + return 0; + } + avpicture_fill ((AVPicture *) dst_frame, dst_buffer, +- PIX_FMT_RGB24, dst_width, dst_height); ++ PIX_OUTPUT_FORMAT, ++ dst_width, dst_height); + sws_scale (scaler_ctx, + src_data, + src_stride, +@@ -236,7 +262,11 @@ + "Failed to allocate the encoder output buffer\n"); + #endif + av_free (dst_buffer); +- av_free (dst_frame); ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1) ++ av_frame_free (&dst_frame); ++#else ++ avcodec_free_frame (&dst_frame); ++#endif + sws_freeContext (scaler_ctx); + return 0; + } +@@ -249,13 +279,17 @@ + #endif + av_free (encoder_output_buffer); + av_free (dst_buffer); +- av_free (dst_frame); ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1) ++ av_frame_free (&dst_frame); ++#else ++ avcodec_free_frame (&dst_frame); ++#endif + sws_freeContext (scaler_ctx); + return 0; + } + encoder_codec_ctx->width = dst_width; + encoder_codec_ctx->height = dst_height; +- encoder_codec_ctx->pix_fmt = PIX_FMT_RGB24; ++ encoder_codec_ctx->pix_fmt = PIX_OUTPUT_FORMAT; + opts = NULL; + if (avcodec_open2 (encoder_codec_ctx, encoder_codec, &opts) < 0) + { +@@ -263,10 +297,14 @@ + fprintf (stderr, + "Failed to open the encoder\n"); + #endif +- av_free (encoder_codec_ctx); ++ avcodec_free_context (&encoder_codec_ctx); + av_free (encoder_output_buffer); + av_free (dst_buffer); +- av_free (dst_frame); ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1) ++ av_frame_free (&dst_frame); ++#else ++ avcodec_free_frame (&dst_frame); ++#endif + sws_freeContext (scaler_ctx); + return 0; + } +@@ -295,9 +333,13 @@ + cleanup: + av_dict_free (&opts); + avcodec_close (encoder_codec_ctx); +- av_free (encoder_codec_ctx); ++ avcodec_free_context (&encoder_codec_ctx); + av_free (dst_buffer); +- av_free (dst_frame); ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1) ++ av_frame_free (&dst_frame); ++#else ++ avcodec_free_frame (&dst_frame); ++#endif + sws_freeContext (scaler_ctx); + *output_data = encoder_output_buffer; + +@@ -406,18 +448,23 @@ + fprintf (stderr, + "Failed to open image codec\n"); + #endif +- av_free (codec_ctx); ++ avcodec_free_context (&codec_ctx); + return; + } + av_dict_free (&opts); +- if (NULL == (frame = avcodec_alloc_frame ())) ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1) ++ frame = av_frame_alloc (); ++#else ++ frame = avcodec_alloc_frame(); ++#endif ++ if (NULL == frame) + { + #if DEBUG + fprintf (stderr, + "Failed to allocate frame\n"); + #endif + avcodec_close (codec_ctx); +- av_free (codec_ctx); ++ avcodec_free_context (&codec_ctx); + return; + } + +@@ -441,9 +488,13 @@ + fprintf (stderr, + "Failed to decode a complete frame\n"); + #endif +- av_free (frame); ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1) ++ av_frame_free (&frame); ++#else ++ avcodec_free_frame (&frame); ++#endif + avcodec_close (codec_ctx); +- av_free (codec_ctx); ++ avcodec_free_context (&codec_ctx); + return; + } + calculate_thumbnail_dimensions (codec_ctx->width, codec_ctx->height, +@@ -467,9 +518,13 @@ + err); + av_free (encoded_thumbnail); + } +- av_free (frame); ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1) ++ av_frame_free (&frame); ++#else ++ avcodec_free_frame (&frame); ++#endif + avcodec_close (codec_ctx); +- av_free (codec_ctx); ++ avcodec_free_context (&codec_ctx); + } + + +@@ -563,7 +618,12 @@ + return; + } + +- if (NULL == (frame = avcodec_alloc_frame ())) ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1) ++ frame = av_frame_alloc (); ++#else ++ frame = avcodec_alloc_frame(); ++#endif ++ if (NULL == frame) + { + #if DEBUG + fprintf (stderr, +@@ -616,7 +676,11 @@ + fprintf (stderr, + "Failed to decode a complete frame\n"); + #endif +- av_free (frame); ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1) ++ av_frame_free (&frame); ++#else ++ avcodec_free_frame (&frame); ++#endif + avcodec_close (codec_ctx); + avformat_close_input (&format_ctx); + av_free (io_ctx); +@@ -643,7 +707,11 @@ + err); + av_free (encoded_thumbnail); + } +- av_free (frame); ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1) ++ av_frame_free (&frame); ++#else ++ avcodec_free_frame (&frame); ++#endif + avcodec_close (codec_ctx); + avformat_close_input (&format_ctx); + av_free (io_ctx); +--- a/src/plugins/previewopus_extractor.c ++++ b/src/plugins/previewopus_extractor.c +@@ -296,7 +296,12 @@ + /** Initialize one audio frame for reading from the input file */ + static int init_input_frame(AVFrame **frame) + { +- if (!(*frame = avcodec_alloc_frame())) { ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1) ++ *frame = av_frame_alloc (); ++#else ++ *frame = avcodec_alloc_frame(); ++#endif ++ if (NULL == *frame) { + #if DEBUG + fprintf(stderr, "Could not allocate input frame\n"); + #endif +@@ -655,7 +660,11 @@ + av_freep(&converted_input_samples[0]); + free(converted_input_samples); + } ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1) ++ av_frame_free (&input_frame); ++#else + avcodec_free_frame(&input_frame); ++#endif + + return ret; + } +@@ -671,7 +680,12 @@ + int error; + + /** Create a new frame to store the audio samples. */ +- if (!(*frame = avcodec_alloc_frame())) { ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1) ++ *frame = av_frame_alloc (); ++#else ++ *frame = avcodec_alloc_frame(); ++#endif ++ if (NULL == *frame) { + #if DEBUG + fprintf(stderr, "Could not allocate output frame\n"); + #endif +@@ -702,7 +716,11 @@ + #if DEBUG + fprintf(stderr, "Could allocate output frame samples (error '%s')\n", get_error_text(error)); + #endif ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1) ++ av_frame_free (frame); ++#else + avcodec_free_frame(frame); ++#endif + return error; + } + +@@ -783,17 +801,29 @@ + #if DEBUG + fprintf(stderr, "Could not read data from FIFO\n"); + #endif ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1) ++ av_frame_free (&output_frame); ++#else + avcodec_free_frame(&output_frame); ++#endif + return AVERROR_EXIT; + } + + /** Encode one frame worth of audio samples. */ + if (encode_audio_frame(output_frame, output_format_context, + output_codec_context, &data_written)) { ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1) ++ av_frame_free (&output_frame); ++#else + avcodec_free_frame(&output_frame); ++#endif + return AVERROR_EXIT; + } ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1) ++ av_frame_free (&output_frame); ++#else + avcodec_free_frame(&output_frame); ++#endif + return 0; + } + /** Write the trailer of the output file container. */ +@@ -907,7 +937,12 @@ + return; + } + +- if (NULL == (frame = avcodec_alloc_frame ())) ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1) ++ frame = av_frame_alloc (); ++#else ++ frame = avcodec_alloc_frame(); ++#endif ++ if (NULL == frame) + { + #if DEBUG + fprintf (stderr, diff --git a/libs/libgd/Makefile b/libs/libgd/Makefile index 0309ff2..3749982 100644 --- a/libs/libgd/Makefile +++ b/libs/libgd/Makefile @@ -54,7 +54,7 @@ CONFIGURE_ARGS += \ --without-iconv CONFIGURE_VARS += \ - LIBPNG12_CONFIG="$(STAGING_DIR)/host/bin/libpng12-config" \ + LIBPNG12_CONFIG="$(STAGING_DIR_HOSTPKG)/bin/libpng12-config" \ ac_cv_header_iconv_h=no define Build/InstallDev diff --git a/libs/libgee/Makefile b/libs/libgee/Makefile index 9be5648..27b353c 100644 --- a/libs/libgee/Makefile +++ b/libs/libgee/Makefile @@ -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_HOSTPKG)/share/vala-0.30/vapi/ $(INSTALL_DATA) \ $(PKG_INSTALL_DIR)/usr/share/vala/vapi/* \ - $(STAGING_DIR)/host/share/vala-0.30/vapi + $(STAGING_DIR_HOSTPKG)/share/vala-0.30/vapi endef define Package/libgee/install diff --git a/libs/libidn/Makefile b/libs/libidn/Makefile index d7f5247..2d20216 100644 --- a/libs/libidn/Makefile +++ b/libs/libidn/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libidn PKG_VERSION:=1.33 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@GNU/libidn @@ -28,7 +28,7 @@ define Package/idn/Default SECTION:=net CATEGORY:=Network URL:=http://www.gnu.org/software/libidn/ - MAINTAINER:=Marcel Denia + MAINTAINER:=Kevin Darbyshire-Bryant endef define Package/idn/Default/description @@ -79,6 +79,8 @@ define Build/InstallDev $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/ $(INSTALL_DIR) $(1)/usr/lib $(CP) $(PKG_INSTALL_DIR)/usr/lib/libidn.{a,so*} $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libidn.pc $(1)/usr/lib/pkgconfig/ endef define Package/idn/install diff --git a/libs/libidn/patches/002-disable-po-docs-examples.patch b/libs/libidn/patches/002-disable-po-docs-examples.patch index e99f2a1..dcac7c4 100644 --- a/libs/libidn/patches/002-disable-po-docs-examples.patch +++ b/libs/libidn/patches/002-disable-po-docs-examples.patch @@ -11,7 +11,7 @@ EXTRA_DIST = cfg.mk maint.mk .clcopying --- a/configure.ac +++ b/configure.ac -@@ -48,8 +48,6 @@ AC_PROG_LIBTOOL +@@ -47,8 +47,6 @@ LT_INIT([win32-dll]) # Checks for programs. AM_MISSING_PROG(PERL, perl, $missing_dir) AM_MISSING_PROG(HELP2MAN, help2man, $missing_dir) diff --git a/libs/libidn/patches/010-fix-idn-error-usage.patch b/libs/libidn/patches/010-fix-idn-error-usage.patch index 9b7ab2c..e9201c4 100644 --- a/libs/libidn/patches/010-fix-idn-error-usage.patch +++ b/libs/libidn/patches/010-fix-idn-error-usage.patch @@ -1,6 +1,6 @@ --- a/src/idn.c +++ b/src/idn.c -@@ -169,7 +169,7 @@ main (int argc, char *argv[]) +@@ -170,7 +170,7 @@ main (int argc, char *argv[]) (args_info.idna_to_unicode_given ? 1 : 0) + (args_info.nfkc_given ? 1 : 0) != 1) { @@ -9,7 +9,7 @@ usage (EXIT_FAILURE); } -@@ -184,7 +184,7 @@ main (int argc, char *argv[]) +@@ -185,7 +185,7 @@ main (int argc, char *argv[]) if (!args_info.quiet_given && args_info.inputs_num == 0 && isatty (fileno (stdin))) @@ -18,7 +18,7 @@ "terminated by a newline character.\n")); do -@@ -199,7 +199,7 @@ main (int argc, char *argv[]) +@@ -197,7 +197,7 @@ main (int argc, char *argv[]) if (feof (stdin)) break; @@ -26,8 +26,8 @@ + error (EXIT_FAILURE, errno, "%s", _("input error")); } - if (readbuf[strlen (readbuf) - 1] == '\n') -@@ -216,7 +216,7 @@ main (int argc, char *argv[]) + if (strlen (line) > 0) +@@ -215,7 +215,7 @@ main (int argc, char *argv[]) if (!q) { free (p); @@ -36,7 +36,7 @@ _("could not convert from UTF-8 to UCS-4")); } -@@ -241,7 +241,7 @@ main (int argc, char *argv[]) +@@ -240,7 +240,7 @@ main (int argc, char *argv[]) if (!q) { free (r); diff --git a/libs/liblz4/Makefile b/libs/liblz4/Makefile index fd173e5..6e52067 100644 --- a/libs/liblz4/Makefile +++ b/libs/liblz4/Makefile @@ -16,7 +16,7 @@ PKG_RELEASE:=1 PKG_LICENSE:=BSD-2-Clause PKG_MAINTAINER:=Darik Horn -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_PROTO:=git PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE_URL:=https://github.com/Cyan4973/lz4.git diff --git a/libs/liboping/Makefile b/libs/liboping/Makefile index faca681..ffed96d 100644 --- a/libs/liboping/Makefile +++ b/libs/liboping/Makefile @@ -8,14 +8,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=liboping -PKG_VERSION:=1.6.2 +PKG_VERSION:=1.9.0 PKG_RELEASE:=1 PKG_MAINTAINER:=Jo-Philipp Wich -PKG_LICENSE:=GPL-2.0 +PKG_LICENSE:=LGPL-2.1+ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=http://verplant.org/liboping/files -PKG_MD5SUM:=64a6f31310093d2517cfe7f05aa011e0 +PKG_SOURCE_URL:=https://noping.cc/files +PKG_MD5SUM:=9c9f65bfd297d7e7092c7f219c31f66a PKG_FIXUP:=autoreconf diff --git a/libs/libpng/Makefile b/libs/libpng/Makefile index 2ff620a..a4eda8e 100644 --- a/libs/libpng/Makefile +++ b/libs/libpng/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libpng -PKG_VERSION:=1.2.56 +PKG_VERSION:=1.2.57 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@SF/libpng -PKG_MD5SUM:=868562bd1c58b76ed8703f135a2e439a +PKG_MD5SUM:=307052e5e8af97b82b17b64fb1b3677a PKG_MAINTAINER:=Jo-Philipp Wich PKG_LICENSE:=Libpng GPL-2.0+ BSD-3-Clause diff --git a/libs/libshout/Makefile b/libs/libshout/Makefile index aeff853..d491e32 100644 --- a/libs/libshout/Makefile +++ b/libs/libshout/Makefile @@ -1,6 +1,4 @@ # -# Copyright (C) 2008-2015 OpenWrt.org -# # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. # @@ -8,17 +6,19 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libshout -PKG_VERSION:=2.3.1 -PKG_RELEASE:=3 +PKG_VERSION:=2.4.1 +PKG_RELEASE:=1 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://downloads.us.xiph.org/releases/libshout/ -PKG_MD5SUM:=11765b2592e7ea623ccd93d3f8df172c +PKG_MD5SUM:=89cebf8cb0197f639cde69c95177fe47 +PKG_HASH:=f3acb8dec26f2dbf6df778888e0e429a4ce9378a9d461b02a7ccbf2991bbf24d PKG_LICENSE:=LGPL-2.0+ PKG_LICENSE_FILES:=COPYING -PKG_MAINTAINER:=Nicolas Thill +PKG_MAINTAINER:=Nicolas Thill , \ + Ted Hess PKG_FIXUP:=autoreconf PKG_INSTALL:=1 @@ -29,24 +29,31 @@ define Package/libshout/default SECTION:=libs CATEGORY:=Libraries TITLE:=Shoutcast client library - URL:=http://www.icecast.org/download.php - DEPENDS:= +libvorbis +libvorbisidec +libpthread + URL:=http://www.icecast.org + DEPENDS:= +libvorbisidec +libpthread endef define Package/libshout $(call Package/libshout/default) - TITLE+= (no speex & theora) - VARIANT:=nospeex + TITLE+= (no theora) + DEPENDS+= +libopenssl + VARIANT:=notheora +endef + +define Package/libshout-nossl + $(call Package/libshout/default) + TITLE+= (no ssl/theora) + VARIANT:=nossl endef define Package/libshout-full $(call Package/libshout/default) - TITLE+= (all codecs) - DEPENDS+= +libspeex +libtheora + TITLE+=(full) + DEPENDS+= +libtheora +libopenssl VARIANT:=full endef -define Package/libshout/description +define Package/libshout/description/default libshout allows applications to easily communicate and broadcast to an Icecast streaming media server. It handles the socket connections, metadata communication, and data streaming for the calling application, @@ -54,19 +61,36 @@ define Package/libshout/description details. endef -Package/libshout-full/description=Package/libshout/description +define Package/libshout/description + $(call Package/libshout/description/default) + . + This package does not have Theora support. +endef + +define Package/libshout-nossl/description + $(call Package/libshout/description/default) + . + This package does not have OpenSSL or Theora support. +endef + +Package/libshout-full/description=$(Package/libshout/description/default) CONFIGURE_ARGS += \ --enable-shared \ - --enable-static + --enable-static \ + --disable-speex -ifeq ($(BUILD_VARIANT),nospeex) - CONFIGURE_ARGS += --disable-theora --disable-speex +ifeq ($(BUILD_VARIANT),notheora) + CONFIGURE_ARGS += --disable-theora +endif + +ifeq ($(BUILD_VARIANT),nossl) + CONFIGURE_ARGS += --disable-theora --with-openssl="no" endif CONFIGURE_VARS += \ VORBIS_CFLAGS="-I$(STAGING_DIR)/usr/include/tremor/" \ - VORBIS_LIBS="$(TARGET_LDFLAGS) -lvorbis -lvorbisidec" \ + VORBIS_LIBS="$(TARGET_LDFLAGS) -lvorbisidec" \ TARGET_CFLAGS += $(FPIC) -Wl,-rpath-link="$(STAGING_DIR)/usr/lib" @@ -86,7 +110,10 @@ define Package/libshout/install $(INSTALL_DIR) $(1)/usr/lib $(CP) $(PKG_INSTALL_DIR)/usr/lib/libshout.so.* $(1)/usr/lib/ endef + Package/libshout-full/install=$(Package/libshout/install) +Package/libshout-nossl/install=$(Package/libshout/install) $(eval $(call BuildPackage,libshout)) +$(eval $(call BuildPackage,libshout-nossl)) $(eval $(call BuildPackage,libshout-full)) diff --git a/libs/libshout/patches/100-add_with-openssl_option.patch b/libs/libshout/patches/100-add_with-openssl_option.patch new file mode 100644 index 0000000..7319e29 --- /dev/null +++ b/libs/libshout/patches/100-add_with-openssl_option.patch @@ -0,0 +1,27 @@ +--- a/m4/xiph_openssl.m4 ++++ b/m4/xiph_openssl.m4 +@@ -29,14 +29,16 @@ else + fi + fi + +-# Now try linking to openssl +-xt_save_CFLAGS="$CFLAGS" +-xt_save_LIBS="$LIBS" +-CFLAGS="$CFLAGS $OPENSSL_CFLAGS" +-LIBS="$OPENSSL_LIBS $LIBS" +-AC_TRY_LINK([#include ], [void *a = SSL_new], [openssl_ok='yes']) +-CFLAGS="$xt_save_CFLAGS" +-LIBS="$xt_save_LIBS" ++if test "x$openssl_prefix" != "xno"; then ++ # Now try linking to openssl ++ xt_save_CFLAGS="$CFLAGS" ++ xt_save_LIBS="$LIBS" ++ CFLAGS="$CFLAGS $OPENSSL_CFLAGS" ++ LIBS="$OPENSSL_LIBS $LIBS" ++ AC_TRY_LINK([#include ], [void *a = SSL_new], [openssl_ok='yes']) ++ CFLAGS="$xt_save_CFLAGS" ++ LIBS="$xt_save_LIBS" ++fi + + if test "$openssl_ok" = "yes"; then + AC_DEFINE(HAVE_OPENSSL, 1, [Define if you have libopenssl.]) diff --git a/libs/libshout/patches/120-vorbis-c.patch b/libs/libshout/patches/120-vorbis-c.patch index a9e41f9..be7ca7a 100644 --- a/libs/libshout/patches/120-vorbis-c.patch +++ b/libs/libshout/patches/120-vorbis-c.patch @@ -1,5 +1,5 @@ ---- a/src/vorbis.c -+++ b/src/vorbis.c +--- a/src/codec_vorbis.c ++++ b/src/codec_vorbis.c @@ -28,7 +28,7 @@ #endif #include @@ -8,4 +8,4 @@ +#include #include "shout_private.h" - #include "shout_ogg.h" + #include "format_ogg.h" diff --git a/libs/libshout/patches/140-no_example_doc_win32.patch b/libs/libshout/patches/140-no_example_doc_win32.patch index 9e8b5a3..4f09328 100644 --- a/libs/libshout/patches/140-no_example_doc_win32.patch +++ b/libs/libshout/patches/140-no_example_doc_win32.patch @@ -1,17 +1,19 @@ ---- a/Makefile.in -+++ b/Makefile.in -@@ -288,12 +288,12 @@ top_builddir = @top_builddir@ - top_srcdir = @top_srcdir@ +--- a/Makefile.am ++++ b/Makefile.am +@@ -3,14 +3,14 @@ AUTOMAKE_OPTIONS = 1.6 foreign ACLOCAL_AMFLAGS = -I m4 --SUBDIRS = include src examples debian doc win32 -+SUBDIRS = include src debian + +-SUBDIRS = include src examples doc win32 ++SUBDIRS = include src + EXTRA_DIST = INSTALL m4/shout.m4 m4/acx_pthread.m4 \ m4/ogg.m4 m4/vorbis.m4 m4/xiph_compiler.m4 m4/xiph_net.m4 \ - m4/xiph_types.m4 + m4/xiph_types.m4 libshout.ckport + docdir = $(datadir)/doc/$(PACKAGE) -doc_DATA = COPYING NEWS README examples/example.c examples/nonblocking.c -+doc_DATA = COPYING NEWS README ++doc_DATA = COPYING README + m4datadir = $(datadir)/aclocal m4data_DATA = m4/shout.m4 - @HAVE_PKGCONFIG_TRUE@pkgconfigdir = $(libdir)/pkgconfig diff --git a/libs/libstrophe/Makefile b/libs/libstrophe/Makefile index 49997bf..61b7be0 100644 --- a/libs/libstrophe/Makefile +++ b/libs/libstrophe/Makefile @@ -15,9 +15,12 @@ PKG_LICENSE:=GPL-3.0 PKG_LICENSE_FILES:=COPYING PKG_MAINTAINER:=Chih-Wei Chen -PKG_SOURCE_URL:=https://github.com/strophe/libstrophe/archive/ -PKG_SOURCE:=$(PKG_VERSION).tar.gz -PKG_MD5SUM:=2db62ab21187785ec5f870adc33b74e5 +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL=https://github.com/strophe/libstrophe +PKG_SOURCE_SUBDIR=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE_VERSION:=9931ad4fa2aa7f204c608010eb2ebf84bcf7d542 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_MIRROR_MD5SUM:=6a499bcfc7c52db6765957ff38f48a344ad121ac0b665fd3d4adb7d8deadc427 PKG_FIXUP:=autoreconf PKG_INSTALL:=1 diff --git a/libs/libtasn1/Makefile b/libs/libtasn1/Makefile index 2f8292c..466547d 100644 --- a/libs/libtasn1/Makefile +++ b/libs/libtasn1/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libtasn1 -PKG_VERSION:=4.8 -PKG_RELEASE:=2 +PKG_VERSION:=4.9 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=ftp://ftp.gnu.org/gnu/libtasn1 -PKG_MD5SUM:=9a6767705725544f2b86670dcfb34107 +PKG_SOURCE_URL:=@GNU/$(PKG_NAME) +PKG_MD5SUM:=4f6f7a8fd691ac2b8307c8ca365bad711db607d4ad5966f6938a9d2ecd65c920 PKG_LICENSE:=LGPLv2.1+ PKG_LICENSE_FILES:=COPYING.LIB @@ -39,6 +39,7 @@ TARGET_CFLAGS += $(FPIC) CONFIGURE_ARGS += \ --enable-shared \ + --disable-gcc-warnings \ --enable-static define Build/InstallDev diff --git a/libs/libuecc/Makefile b/libs/libuecc/Makefile index c1ba53f..8111062 100644 --- a/libs/libuecc/Makefile +++ b/libs/libuecc/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libuecc PKG_VERSION:=7 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_MAINTAINER:=Matthias Schiffer PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz @@ -35,11 +35,16 @@ CMAKE_OPTIONS += \ -DCMAKE_BUILD_TYPE:String="MINSIZEREL" +define Package/libuecc/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libuecc.so* $(1)/usr/lib/ +endef + define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include $(CP) $(PKG_INSTALL_DIR)/usr/include/libuecc-$(PKG_VERSION) $(1)/usr/include/ $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libuecc.a $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libuecc.so* $(1)/usr/lib/ $(INSTALL_DIR) $(1)/usr/lib/pkgconfig $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libuecc.pc $(1)/usr/lib/pkgconfig/ endef diff --git a/libs/libuv/Makefile b/libs/libuv/Makefile index c191c0e..4f40a20 100644 --- a/libs/libuv/Makefile +++ b/libs/libuv/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2015 OpenWrt.org +# Copyright (C) 2015-2017 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,16 +8,16 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libuv -PKG_VERSION:=1.9.1 +PKG_VERSION:=1.10.2 PKG_RELEASE:=1 PKG_LICENSE_FILES:=LICENSE -PKG_MAINTAINER:=Luka Perkov +PKG_MAINTAINER:=Luka Perkov PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://dist.libuv.org/dist/v$(PKG_VERSION)/ -PKG_MD5SUM:=654bf6783ac7fc10435c84ec86720a6e +PKG_MD5SUM:=fad96b56f517c1ad3f274a19a10c53b2 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-v$(PKG_VERSION) PKG_BUILD_PARALLEL:=1 @@ -56,6 +56,9 @@ define Build/InstallDev $(CP) \ $(PKG_INSTALL_DIR)/usr/lib/libuv.so* \ $(1)/usr/lib/ + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/libuv.a \ + $(1)/usr/lib/ $(INSTALL_DIR) $(1)/usr/lib/pkgconfig $(CP) \ diff --git a/libs/libvpx/Makefile b/libs/libvpx/Makefile index 3da90f4..6678970 100644 --- a/libs/libvpx/Makefile +++ b/libs/libvpx/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libvpx -PKG_VERSION:=1.6.0 +PKG_VERSION:=1.6.1 PKG_RELEASE:=1 PKG_REV:=v$(PKG_VERSION) @@ -24,6 +24,8 @@ PKG_MAINTAINER:=Luiz Angelo Daros de Luca PKG_LICENSE:=BSD-3-Clause PKG_LICENSE_FILES:=LICENSE +PKG_ABI_VERSION:=$(subst $(space),.,$(wordlist 1, 2, $(subst .,$(space),$(PKG_VERSION)))) + PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk @@ -34,7 +36,7 @@ define Package/libvpx TITLE:=libvpx URL:=http://www.webmproject.org/ DEPENDS:=+libpthread - ABI_VERSION:=$(PKG_VERSION) + ABI_VERSION:=$(PKG_ABI_VERSION) endef define Package/libvpx/description diff --git a/libs/libzdb/Makefile b/libs/libzdb/Makefile index a8fcf30..c4f38f4 100644 --- a/libs/libzdb/Makefile +++ b/libs/libzdb/Makefile @@ -63,8 +63,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_HOSTPKG)/bin + $(CP) $(HOST_BUILD_DIR)/tools/bin/filterh $(STAGING_DIR_HOSTPKG)/bin/ endef $(eval $(call HostBuild)) diff --git a/libs/libzdb/patches/020-filterh-use-host-built-version.patch b/libs/libzdb/patches/020-filterh-use-host-built-version.patch index 1edfd77..7495fbc 100644 --- a/libs/libzdb/patches/020-filterh-use-host-built-version.patch +++ b/libs/libzdb/patches/020-filterh-use-host-built-version.patch @@ -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_HOSTPKG)/bin/filterh AM_CPPFLAGS = $(CPPFLAGS) $(DBCPPFLAGS) AM_CPPFLAGS += -Isrc -Isrc/util -Isrc/net -Isrc/db -Isrc/exceptions diff --git a/libs/opus/Makefile b/libs/opus/Makefile index d23e9bb..4a6a452 100644 --- a/libs/opus/Makefile +++ b/libs/opus/Makefile @@ -8,16 +8,17 @@ include $(TOPDIR)/rules.mk PKG_NAME:=opus -PKG_VERSION:=1.1.3 -PKG_RELEASE:=2 +PKG_VERSION:=1.1.4 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://downloads.xiph.org/releases/opus/ -PKG_MD5SUM:=32bbb6b557fe1b6066adc0ae1f08b629 +PKG_MD5SUM:=a2c09d995d0885665ff83b5df2505a5f +PKG_HASH:=9122b6b380081dd2665189f97bfd777f04f92dc3ab6698eea1dbb27ad59d8692 PKG_LICENSE:=BSD-3-Clause PKG_LICENSE_FILES:=COPYING -PKG_MAINTAINER:=Nicolas Thill +PKG_MAINTAINER:=Ted Hess Ian Leonard PKG_INSTALL:=1 diff --git a/libs/pcre/Makefile b/libs/pcre/Makefile index 1e04161..861b561 100644 --- a/libs/pcre/Makefile +++ b/libs/pcre/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=pcre -PKG_VERSION:=8.39 -PKG_RELEASE:=1 +PKG_VERSION:=8.40 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/ -PKG_MD5SUM:=e3fca7650a0556a2647821679d81f585 +PKG_MD5SUM:=41a842bf7dcecd6634219336e2167d1d PKG_MAINTAINER:=Thomas Heil PKG_LICENSE:=BSD-3-Clause diff --git a/libs/pcre/patches/001-CVE-2017-7186 b/libs/pcre/patches/001-CVE-2017-7186 new file mode 100644 index 0000000..984cf81 --- /dev/null +++ b/libs/pcre/patches/001-CVE-2017-7186 @@ -0,0 +1,53 @@ +#CVE-2017-7186 patch +--- trunk/pcre_internal.h 2016/05/21 13:34:44 1649 ++++ trunk/pcre_internal.h 2017/02/24 17:30:30 1688 +@@ -2772,6 +2772,9 @@ + extern const pcre_uint16 PRIV(ucd_stage2)[]; + extern const pcre_uint32 PRIV(ucp_gentype)[]; + extern const pcre_uint32 PRIV(ucp_gbtable)[]; ++#ifdef COMPILE_PCRE32 ++extern const ucd_record PRIV(dummy_ucd_record)[]; ++#endif + #ifdef SUPPORT_JIT + extern const int PRIV(ucp_typerange)[]; + #endif +@@ -2780,9 +2783,15 @@ + /* UCD access macros */ + + #define UCD_BLOCK_SIZE 128 +-#define GET_UCD(ch) (PRIV(ucd_records) + \ ++#define REAL_GET_UCD(ch) (PRIV(ucd_records) + \ + PRIV(ucd_stage2)[PRIV(ucd_stage1)[(int)(ch) / UCD_BLOCK_SIZE] * \ + UCD_BLOCK_SIZE + (int)(ch) % UCD_BLOCK_SIZE]) ++ ++#ifdef COMPILE_PCRE32 ++#define GET_UCD(ch) ((ch > 0x10ffff)? PRIV(dummy_ucd_record) : REAL_GET_UCD(ch)) ++#else ++#define GET_UCD(ch) REAL_GET_UCD(ch) ++#endif + + #define UCD_CHARTYPE(ch) GET_UCD(ch)->chartype + #define UCD_SCRIPT(ch) GET_UCD(ch)->script +--- trunk/pcre_ucd.c 2014/06/19 07:51:39 1490 ++++ trunk/pcre_ucd.c 2017/02/24 17:30:30 1688 +@@ -38,6 +38,20 @@ + const pcre_uint32 PRIV(ucd_caseless_sets)[] = {0}; + #else + ++/* If the 32-bit library is run in non-32-bit mode, character values ++greater than 0x10ffff may be encountered. For these we set up a ++special record. */ ++ ++#ifdef COMPILE_PCRE32 ++const ucd_record PRIV(dummy_ucd_record)[] = {{ ++ ucp_Common, /* script */ ++ ucp_Cn, /* type unassigned */ ++ ucp_gbOther, /* grapheme break property */ ++ 0, /* case set */ ++ 0, /* other case */ ++ }}; ++#endif ++ + /* When recompiling tables with a new Unicode version, please check the + types in this structure definition from pcre_internal.h (the actual + field names will be different): diff --git a/libs/poco/Makefile b/libs/poco/Makefile index 990346c..fd3eefc 100644 --- a/libs/poco/Makefile +++ b/libs/poco/Makefile @@ -1,5 +1,6 @@ # # Copyright (C) 2007-2016 OpenWrt.org +# Copyright (C) 2017 Daniel Engberg # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,12 +9,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=poco -PKG_VERSION:=1.7.5 +PKG_VERSION:=1.7.7 PKG_RELEASE:=1 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://pocoproject.org/releases/poco-1.7.5 -PKG_MD5SUM:=baafda4833c4dd95993398d9f237c96c +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://pocoproject.org/releases/$(PKG_NAME)-$(PKG_VERSION) +PKG_MD5SUM:=17783e30f5ef9c852544ac0e9d1fd316c4804317026059a9d6aad798b61c77f8 PKG_LICENSE:=BSL-1.0 PKG_LICENSE_FILES:=LICENSE diff --git a/libs/postgresql/Makefile b/libs/postgresql/Makefile index f27fa1e..0507146 100644 --- a/libs/postgresql/Makefile +++ b/libs/postgresql/Makefile @@ -147,14 +147,14 @@ endef define Host/Install $(INSTALL_DIR) $(STAGING_DIR)/usr/bin/ $(INSTALL_BIN) $(HOST_BUILD_DIR)/src/bin/pg_config/pg_config $(STAGING_DIR)/usr/bin/ - $(INSTALL_DIR) $(STAGING_DIR)/host/bin/ - $(INSTALL_BIN) $(HOST_BUILD_DIR)/src/interfaces/ecpg/preproc/ecpg $(STAGING_DIR)/host/bin/ - $(INSTALL_BIN) $(HOST_BUILD_DIR)/src/timezone/zic $(STAGING_DIR)/host/bin/ + $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/bin/ + $(INSTALL_BIN) $(HOST_BUILD_DIR)/src/interfaces/ecpg/preproc/ecpg $(STAGING_DIR_HOSTPKG)/bin/ + $(INSTALL_BIN) $(HOST_BUILD_DIR)/src/timezone/zic $(STAGING_DIR_HOSTPKG)/bin/ endef define Build/Configure $(Build/Configure/Default) - $(SED) 's@ECPG = ../../preproc/ecpg@ECPG = $(STAGING_DIR)/host/bin/ecpg@' $(PKG_BUILD_DIR)/src/interfaces/ecpg/test/Makefile.regress + $(SED) 's@ECPG = ../../preproc/ecpg@ECPG = $(STAGING_DIR_HOSTPKG)/bin/ecpg@' $(PKG_BUILD_DIR)/src/interfaces/ecpg/test/Makefile.regress endef TARGET_CFLAGS += $(FPIC) -lpthread diff --git a/libs/protobuf/Makefile b/libs/protobuf/Makefile index 1e70a12..93d538a 100644 --- a/libs/protobuf/Makefile +++ b/libs/protobuf/Makefile @@ -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_HOSTPKG)/bin/protoc define Build/InstallDev $(INSTALL_DIR) \ diff --git a/libs/rxtx/Makefile b/libs/rxtx/Makefile new file mode 100755 index 0000000..5a1374f --- /dev/null +++ b/libs/rxtx/Makefile @@ -0,0 +1,49 @@ +# +# Copyright (C) 2016 Dana H. Myers +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=rxtx +PKG_VERSION:=2.2pre2 +PKG_RELEASE:=1 +PKG_LICENSE:=LGPL-2.1 +PKG_MAINTAINER:=Dana H. Myers + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).zip +PKG_SOURCE_URL:=http://rxtx.qbang.org/pub/rxtx/ +PKG_MD5SUM:=7eedb18e3f33a427e2b0e9be8ce3f94c + +PKG_FIXUP:=patch-libtool +PKG_CHECK_FORMAT_SECURITY:=0 + +include $(INCLUDE_DIR)/package.mk + +define Package/rxtx + SECTION:=libs + CATEGORY:=Libraries + TITLE:=RX/TX Support for Java serial communications + URL:=http://rxtx.qbang.org/wiki/index.php/Main_Page + DEPENDS:=+libpthread +endef + +define Package/rxtx/description + RX/TX Support for Java serial communications +endef + +CONFIGURE_ARGS += \ + --disable-PRINTER + +define Package/rxtx/install + $(INSTALL_DIR) \ + $(1)/usr/lib/classpath + $(CP) $(PKG_BUILD_DIR)/$(GNU_TARGET_NAME)-gnu/.libs/*.so \ + $(1)/usr/lib/classpath/ + $(CP) $(PKG_BUILD_DIR)/RXTXcomm.jar \ + $(1)/usr/lib/classpath/ +endef + +$(eval $(call BuildPackage,rxtx)) diff --git a/libs/rxtx/patches/010-acm-devices.patch b/libs/rxtx/patches/010-acm-devices.patch new file mode 100755 index 0000000..3833c5c --- /dev/null +++ b/libs/rxtx/patches/010-acm-devices.patch @@ -0,0 +1,11 @@ +diff -rupN rxtx-2.2pre2/src/gnu/io/RXTXCommDriver.java rxtx-2.2pre2.new/src/gnu/io/RXTXCommDriver.java +--- rxtx-2.2pre2/src/gnu/io/RXTXCommDriver.java 2008-11-13 16:44:01.000000000 -0800 ++++ rxtx-2.2pre2.new/src/gnu/io/RXTXCommDriver.java 2015-08-21 16:19:14.330743949 -0700 +@@ -579,6 +579,7 @@ public class RXTXCommDriver implements C + "ttyUSB", // for USB frobs + "rfcomm", // bluetooth serial device + "ttyircomm", // linux IrCommdevices (IrDA serial emu) ++ "ttyACM" // linux CDC ACM devices + }; + CandidatePortPrefixes=Temp; + } diff --git a/libs/sqlite3/Makefile b/libs/sqlite3/Makefile index f9bd2c7..7f9b1b3 100644 --- a/libs/sqlite3/Makefile +++ b/libs/sqlite3/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=sqlite -PKG_VERSION:=3130000 -PKG_RELEASE:=2 +PKG_VERSION:=3160000 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-autoconf-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://www.sqlite.org/2016/ -PKG_MD5SUM:=4e83f39fa2ffb610ac5ecd36865da6a2 +PKG_SOURCE_URL:=http://www.sqlite.org/2017/ +PKG_MD5SUM:=5102404047054b2cec2f43463293f94dea39425d42bf386d24596ab4fac7c7ff PKG_LICENSE:=PUBLICDOMAIN PKG_LICENSE_FILES:= @@ -69,7 +69,9 @@ $(call Package/sqlite3/Default/description) endef TARGET_CFLAGS += $(FPIC) \ - -DSQLITE_ENABLE_UNLOCK_NOTIFY \ + -DSQLITE_ENABLE_UNLOCK_NOTIFY=1 \ + -DHAVE_ISNAN=1 \ + -DHAVE_MALLOC_USABLE_SIZE=1 CONFIGURE_ARGS += \ --enable-shared \ diff --git a/mail/dovecot/Makefile b/mail/dovecot/Makefile new file mode 100644 index 0000000..aad6e68 --- /dev/null +++ b/mail/dovecot/Makefile @@ -0,0 +1,99 @@ +# +# Copyright (C) 2006-2014 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=dovecot +PKG_VERSION:=2.2.26.0 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.dovecot.org/releases/2.2 +PKG_MD5SUM:=85bc42328de41d1eb8d6d3f1db666db8 +PKG_LICENSE:=LGPL-2.1 MIT BSD-3-Clause Unique +PKG_LICENSE_FILES:=COPYING COPYING.LGPL COPYING.MIT + +PKG_BUILD_DEPENDS:=libiconv + +PKG_FIXUP:=autoreconf +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/dovecot + SECTION:=mail + CATEGORY:=Mail + DEPENDS:=+DOVECOT_LDAP:libopenldap +libopenssl +librt +zlib +libbz2 +libcap + TITLE:=An IMAP and POP3 daemon + MAINTAINER:=Lucian Cristian + URL:=http://www.dovecot.org/ + USERID:=dovecot=59:dovecot=59 +endef + +define Package/dovecot/description + Dovecot is a program which provides POP3 and IMAP services. +endef + +define Package/dovecot/config + menu "Select dovecot build options" + depends on PACKAGE_dovecot + config DOVECOT_LDAP + bool "LDAP support" + default n + help + Implements LDAP support in dovecot. + endmenu +endef + +CONFIGURE_ARGS += \ + --without-gssapi \ + --without-pam \ + --with-moduledir=/usr/lib/dovecot/modules \ + --with-notify=dnotify \ + --without-lzma \ + --without-lz4 \ + --with-icu=no + +ifneq ($(strip $(CONFIG_DOVECOT_LDAP)),) + CONFIGURE_ARGS+= \ + --with-ldap=yes +else + CONFIGURE_ARGS+= \ + --with-ldap=no +endif + +CONFIGURE_VARS += \ + RPCGEN= \ + i_cv_signed_size_t=no \ + i_cv_signed_time_t=no \ + i_cv_gmtime_max_time_t=32 \ + i_cv_mmap_plays_with_write=yes \ + i_cv_fd_passing=yes \ + i_cv_c99_vsnprintf=yes \ + lib_cv_va_copy=yes \ + lib_cv_va_copy=yes \ + lib_cv___va_copy=yes \ + lib_cv_va_val_copy=yes + +define Package/dovecot/install + $(INSTALL_DIR) $(1)/etc/init.d \ + $(1)/etc/dovecot \ + $(1)/usr/share/doc/dovecot/example-config \ + $(1)/usr/lib/dovecot \ + $(1)/usr/bin \ + $(1)/usr/sbin + $(CP) $(PKG_INSTALL_DIR)/etc/dovecot/* $(1)/etc/dovecot/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/dovecot/* $(1)/usr/lib/dovecot/ + $(CP) $(PKG_INSTALL_DIR)/usr/share/doc/dovecot/example-config $(1)/usr/share/doc/dovecot/example-config + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/doveconf $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/ + $(INSTALL_BIN) ./files/dovecot.init $(1)/etc/init.d/dovecot + rm $(1)/usr/lib/dovecot/dovecot-config + find $(1)/usr/lib/dovecot/ -name "*.a" -o -name "*.la" | xargs rm +endef + +$(eval $(call BuildPackage,dovecot)) diff --git a/mail/dovecot/files/dovecot.init b/mail/dovecot/files/dovecot.init new file mode 100644 index 0000000..1f83184 --- /dev/null +++ b/mail/dovecot/files/dovecot.init @@ -0,0 +1,16 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006-2013 OpenWrt.org + +START=75 +STOP=75 + +USE_PROCD=1 + +start_service() { + mkdir -p -m 0755 /var/lib/dovecot + mkdir -p -m 0755 /var/run/dovecot + chmod 0750 /var/lib/dovecot + procd_open_instance + procd_set_param command /usr/sbin/dovecot -F + procd_close_instance +} diff --git a/mail/dovecot/patches/001-configure_in.patch b/mail/dovecot/patches/001-configure_in.patch new file mode 100644 index 0000000..7cf68fc --- /dev/null +++ b/mail/dovecot/patches/001-configure_in.patch @@ -0,0 +1,31 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -488,9 +488,9 @@ have_ioloop=no + + if test "$ioloop" = "best" || test "$ioloop" = "epoll"; then + AC_CACHE_CHECK([whether we can use epoll],i_cv_epoll_works,[ +- AC_TRY_RUN([ ++ AC_TRY_LINK([ + #include +- ++ ], [ + int main() + { + return epoll_create(5) < 1; +@@ -594,7 +594,7 @@ fi + dnl * Old glibcs have broken posix_fallocate(). Make sure not to use it. + dnl * It may also be broken in AIX. + AC_CACHE_CHECK([whether posix_fallocate() works],i_cv_posix_fallocate_works,[ +- AC_TRY_RUN([ ++ AC_TRY_LINK([ + #define _XOPEN_SOURCE 600 + #include + #include +@@ -603,6 +603,7 @@ AC_CACHE_CHECK([whether posix_fallocate( + #if defined(__GLIBC__) && (__GLIBC__ < 2 || __GLIBC_MINOR__ < 7) + possibly broken posix_fallocate + #endif ++ ], [ + int main() { + int fd = creat("conftest.temp", 0600); + int ret; diff --git a/multimedia/ffmpeg/Config.in b/multimedia/ffmpeg/Config.in index a488908..d2ab7d1 100644 --- a/multimedia/ffmpeg/Config.in +++ b/multimedia/ffmpeg/Config.in @@ -63,7 +63,6 @@ config FFMPEG_CUSTOM_AUDIO_DEC_SUPPORT select FFMPEG_CUSTOM_DECODER_opus select FFMPEG_CUSTOM_DECODER_pcm_s16be select FFMPEG_CUSTOM_DECODER_pcm_s16le - select FFMPEG_CUSTOM_SELECT_speex select FFMPEG_CUSTOM_DECODER_vorbis select FFMPEG_CUSTOM_DECODER_wavpack select FFMPEG_CUSTOM_DECODER_wmav1 @@ -117,9 +116,6 @@ config FFMPEG_CUSTOM_SELECT_mp3lame config FFMPEG_CUSTOM_SELECT_libopus bool "Opus" -config FFMPEG_CUSTOM_SELECT_speex - bool "Speex" - config FFMPEG_CUSTOM_SELECT_x264 bool "x264" depends on FFMPEG_CUSTOM_PATENTED diff --git a/multimedia/ffmpeg/Makefile b/multimedia/ffmpeg/Makefile index a982ea7..f874014 100644 --- a/multimedia/ffmpeg/Makefile +++ b/multimedia/ffmpeg/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006-2016 OpenWrt.org +# Copyright (C) 2006-2017 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,12 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ffmpeg -PKG_VERSION:=2.8.8 -PKG_RELEASE:=2 +PKG_VERSION:=3.2.2 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_SOURCE_URL:=http://ffmpeg.org/releases/ -PKG_MD5SUM:=5fae1ba5a5d37a2d0de750479b7270d4 +PKG_SOURCE_URL:=https://ffmpeg.org/releases/ +PKG_MD5SUM:=e34d1b92c5d844f2a3611c741a6dba18 +PKG_HASH:=3f01bd1fe1a17a277f8c84869e5d9192b4b978cb660872aa2b54c3cc8a2fedfc PKG_MAINTAINER:=Ted Hess PKG_LICENSE:=LGPL-2.1+ GPL-2+ LGPL-3 @@ -292,7 +293,7 @@ endef define Package/libffmpeg-custom $(call Package/libffmpeg/Default) TITLE+= (custom) - DEPENDS+= +FFMPEG_CUSTOM_SELECT_libopus:libopus +FFMPEG_CUSTOM_SELECT_speex:libspeex \ + DEPENDS+= +FFMPEG_CUSTOM_SELECT_libopus:libopus \ +PACKAGE_libx264:libx264 +PACKAGE_lame-lib:lame-lib VARIANT:=custom @@ -313,7 +314,6 @@ endef define Package/libffmpeg-audio-dec $(call Package/libffmpeg/Default) TITLE+= (audio) - DEPENDS+= +libspeex VARIANT:=audio-dec endef @@ -327,7 +327,7 @@ endef define Package/libffmpeg-full $(call Package/libffmpeg/Default) TITLE+= (full) - DEPENDS+= +alsa-lib +PACKAGE_libx264:libx264 +PACKAGE_lame-lib:lame-lib +libopus +libspeex + DEPENDS+= +alsa-lib +PACKAGE_libx264:libx264 +PACKAGE_lame-lib:lame-lib +libopus VARIANT:=full endef @@ -382,6 +382,8 @@ FFMPEG_CONFIGURE:= \ ifeq ($(CONFIG_SOFT_FLOAT),y) FFMPEG_CONFIGURE += \ --disable-altivec \ + --disable-vsx \ + --disable-power8 \ --disable-amd3dnow \ --disable-amd3dnowext \ --disable-mmx \ @@ -397,11 +399,17 @@ FFMPEG_CONFIGURE += \ --disable-fma3 \ --disable-fma4 \ --disable-avx2 \ + --disable-aesni \ + --disable-armv5te \ + --disable-armv6 \ + --disable-armv6t2 \ --disable-inline-asm \ - --disable-mips32r2 \ - --disable-mipsdspr1 \ + --disable-mipsdsp \ --disable-mipsdspr2 \ --disable-mipsfpu \ + --disable-msa \ + --disable-mmi \ + --disable-fast-unaligned \ --disable-runtime-cpudetect else ifneq ($(findstring arm,$(CONFIG_ARCH)),) @@ -434,7 +442,6 @@ endif ifeq ($(BUILD_VARIANT),full) FFMPEG_CONFIGURE+= \ --enable-libopus --enable-decoder=libopus \ - --enable-libspeex --enable-decoder=libspeex \ $(if $(CONFIG_PACKAGE_libx264),--enable-libx264) \ $(if $(CONFIG_PACKAGE_lame-lib),--enable-libmp3lame) endif @@ -473,11 +480,6 @@ ifeq ($(CONFIG_FFMPEG_CUSTOM_SELECT_libopus),y) --enable-libopus --enable-decoder=libopus endif -ifeq ($(CONFIG_FFMPEG_CUSTOM_SELECT_speex),y) - FFMPEG_CONFIGURE+= \ - --enable-libspeex --enable-decoder=libspeex -endif - ifeq ($(CONFIG_FFMPEG_CUSTOM_SELECT_x264),y) FFMPEG_CONFIGURE+= \ --enable-libx264 @@ -508,7 +510,6 @@ ifeq ($(BUILD_VARIANT),audio-dec) $(call FFMPEG_ENABLE,demuxer,$(FFMPEG_AUDIO_DEMUXERS)) \ $(call FFMPEG_ENABLE,parser,$(FFMPEG_AUDIO_PARSERS)) \ $(call FFMPEG_ENABLE,protocol,$(FFMPEG_AUDIO_PROTOCOLS)) \ - --enable-libspeex --enable-decoder=libspeex \ --disable-decoder=pcm_bluray,pcm_dvd \ endif diff --git a/multimedia/grilo/Makefile b/multimedia/grilo/Makefile index 66875d5..2daa0d5 100644 --- a/multimedia/grilo/Makefile +++ b/multimedia/grilo/Makefile @@ -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_HOSTPKG)/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_HOSTPKG)/share/vala-0.30/vapi endef define Package/grilo/install diff --git a/multimedia/gst1-libav/Config.in b/multimedia/gst1-libav/Config.in new file mode 100644 index 0000000..b394d7d --- /dev/null +++ b/multimedia/gst1-libav/Config.in @@ -0,0 +1,279 @@ +menu "Select GStreamer libav configuration options" + depends on PACKAGE_gst1-libav + +config GST1_LIBAV_IPV6 + bool "Enable IPv6" + default IPV6 + +config GST1_LIBAV_PATENTED + bool "Include patented codecs and technologies" + default BUILD_PATENTED + +config GET_LIBAV_COMMON_AV_SUPPORT + bool "Include support for common audio/video decoders" + default y + select GST1_LIBAV_DECODER_aac if GST1_LIBAV_PATENTED + select GST1_LIBAV_DECODER_ac3 if GST1_LIBAV_PATENTED + select GST1_LIBAV_DECODER_h264 if GST1_LIBAV_PATENTED + select GST1_LIBAV_DECODER_atrac3 if GST1_LIBAV_PATENTED + select GST1_LIBAV_DECODER_jpegls + select GST1_LIBAV_DECODER_mp3 if GST1_LIBAV_PATENTED + select GST1_LIBAV_DECODER_mpeg1video + select GST1_LIBAV_DECODER_mpeg2video if GST1_LIBAV_PATENTED + select GST1_LIBAV_DECODER_mpeg4 if GST1_LIBAV_PATENTED + select GST1_LIBAV_DECODER_mpeg4aac if GST1_LIBAV_PATENTED + select GST1_LIBAV_DECODER_mpegvideo + select GST1_LIBAV_DECODER_pcm_s16be + select GST1_LIBAV_DECODER_pcm_s16le + select GST1_LIBAV_DECODER_vorbis + select GST1_LIBAV_DECODER_wmav1 if GST1_LIBAV_PATENTED + select GST1_LIBAV_DECODER_wmav2 if GST1_LIBAV_PATENTED + select GST1_LIBAV_DECODER_png + select GST1_LIBAV_PARSER_aac if GST1_LIBAV_PATENTED + select GST1_LIBAV_PARSER_h264 if GST1_LIBAV_PATENTED + select GST1_LIBAV_PARSER_mpegaudio + select GST1_LIBAV_PARSER_mpegvideo + select GST1_LIBAV_PARSER_mpeg4video + select GST1_LIBAV_DEMUXER_ac3 + select GST1_LIBAV_DEMUXER_h264 if GST1_LIBAV_PATENTED + select GST1_LIBAV_DEMUXER_mp3 if GST1_LIBAV_PATENTED + select GST1_LIBAV_DEMUXER_mpegvideo if GST1_LIBAV_PATENTED + select GST1_LIBAV_DEMUXER_ogg + +comment "Encoders ---" + +config GST1_LIBAV_ENCODER_ac3 + bool "AC3" + depends on GST1_LIBAV_PATENTED + select GST1_LIBAV_PARSER_ac3 + +config GST1_LIBAV_ENCODER_jpegls + bool "JPEG-LS" + +config GST1_LIBAV_ENCODER_mpeg1video + bool "MPEG-1 Video" + +config GST1_LIBAV_ENCODER_mpeg2video + bool "MPEG-2 Video" + depends on GST1_LIBAV_PATENTED + +config GST1_LIBAV_ENCODER_mpeg4 + bool "MPEG-4" + depends on GST1_LIBAV_PATENTED + +config GST1_LIBAV_ENCODER_pcm_s16be + bool "PCM signed 16-bit big-endian" + +config GST1_LIBAV_ENCODER_pcm_s16le + bool "PCM signed 16-bit little-endian" + +config GST1_LIBAV_ENCODER_png + bool "PNG" + select GST1_LIBAV_ENCODER_zlib + +config GST1_LIBAV_ENCODER_vorbis + bool "Vorbis" + +config GST1_LIBAV_ENCODER_zlib + bool "Zlib" + +comment "Decoders ---" + +config GST1_LIBAV_DECODER_aac + bool "AAC (Advanced Audio Coding)" + depends on GST1_LIBAV_PATENTED + select GST1_LIBAV_PARSER_aac + +config GST1_LIBAV_DECODER_ac3 + bool "AC3" + depends on GST1_LIBAV_PATENTED + select GST1_LIBAV_PARSER_ac3 + +config GST1_LIBAV_DECODER_atrac3 + bool "ATRAC3" + depends on GST1_LIBAV_PATENTED + +config GST1_LIBAV_DECODER_gif + bool "GIF" + +config GST1_LIBAV_DECODER_h264 + bool "H.264" + depends on GST1_LIBAV_PATENTED + +config GST1_LIBAV_DECODER_jpegls + bool "JPEG-LS" + +config GST1_LIBAV_DECODER_mp2 + bool "MP2 (MPEG Audio Layer 2)" + depends on GST1_LIBAV_PATENTED + +config GST1_LIBAV_DECODER_mp3 + bool "MP3 (MPEG Audio Layer 2)" + depends on GST1_LIBAV_PATENTED + +config GST1_LIBAV_DECODER_mpegvideo + bool "MPEG Video" + +config GST1_LIBAV_DECODER_mpeg1video + bool "MPEG-1 Video" + +config GST1_LIBAV_DECODER_mpeg2video + bool "MPEG-2 Video" + depends on GST1_LIBAV_PATENTED + +config GST1_LIBAV_DECODER_mpeg4 + bool "MPEG-4" + depends on GST1_LIBAV_PATENTED + +config GST1_LIBAV_DECODER_mpeg4aac + bool "MPEG-4 (AAC)" + depends on GST1_LIBAV_PATENTED + +config GST1_LIBAV_DECODER_pcm_s16be + bool "PCM signed 16-bit big-endian" + +config GST1_LIBAV_DECODER_pcm_s16le + bool "PCM signed 16-bit little-endian" + +config GST1_LIBAV_DECODER_png + bool "PNG" + select GST1_LIBAV_DECODER_zlib + +config GST1_LIBAV_DECODER_vorbis + bool "Vorbis" + +config GST1_LIBAV_DECODER_wmav1 + bool "WMAv1" + depends on GST1_LIBAV_PATENTED + +config GST1_LIBAV_DECODER_wmav2 + bool "WMAv2" + depends on GST1_LIBAV_PATENTED + +config GST1_LIBAV_DECODER_zlib + bool "Zlib" + +comment "Muxers ---" + +config GST1_LIBAV_MUXER_ac3 + bool "AC3" + depends on GST1_LIBAV_PATENTED + +config GST1_LIBAV_MUXER_ffm + bool "FFM (ffserver live feed)" + +config GST1_LIBAV_MUXER_h264 + bool "H.264" + depends on GST1_LIBAV_PATENTED + +config GST1_LIBAV_MUXER_mp3 + bool "MP3 (MPEG Audio Layer 3)" + +config GST1_LIBAV_MUXER_mp4 + bool "MP4" + +config GST1_LIBAV_MUXER_mpeg1video + bool "MPEG-1 Video" + +config GST1_LIBAV_MUXER_mpeg2video + bool "MPEG-2 Video" + +config GST1_LIBAV_MUXER_mpegts + bool "MPEG-2 (TS)" + +config GST1_LIBAV_MUXER_ogg + bool "Ogg" + +config GST1_LIBAV_MUXER_oss + bool "OSS (Open Sound System playback)" + +config GST1_LIBAV_MUXER_rtp + bool "RTP" + +comment "Demuxers ---" + +config GST1_LIBAV_DEMUXER_ac3 + bool "AC3" + +config GST1_LIBAV_DEMUXER_ffm + bool "FFM (ffserver live feed)" + +config GST1_LIBAV_DEMUXER_h264 + bool "H.264" + depends on GST1_LIBAV_PATENTED + +config GST1_LIBAV_DEMUXER_mp3 + bool "MP3 (MPEG Audio Layer 3)" + +config GST1_LIBAV_DEMUXER_mpegvideo + bool "MPEG Video" + +config GST1_LIBAV_DEMUXER_mpegps + bool "MPEG-2 (PS)" + +config GST1_LIBAV_DEMUXER_mpegts + bool "MPEG-2 (TS)" + +config GST1_LIBAV_DEMUXER_ogg + bool "Ogg" + +config GST1_LIBAV_DEMUXER_rm + bool "RM" + help + RealMedia format demuxer + +config GST1_LIBAV_DEMUXER_rtsp + bool "RTSP" + select GST1_LIBAV_DEMUXER_rm + select GST1_LIBAV_DEMUXER_sdp + +config GST1_LIBAV_DEMUXER_sdp + bool "SDP" + select GST1_LIBAV_DEMUXER_mpegts + +comment "Parsers ---" + +config GST1_LIBAV_PARSER_aac + bool "AAC (Advanced Audio Coding)" + depends on GST1_LIBAV_PATENTED + +config GST1_LIBAV_PARSER_ac3 + bool "AC3" + +config GST1_LIBAV_PARSER_h264 + bool "H.264" + depends on GST1_LIBAV_PATENTED + select GST1_LIBAV_DECODER_h264 + +config GST1_LIBAV_PARSER_mpegaudio + bool "MPEG Audio" + +config GST1_LIBAV_PARSER_mpegvideo + bool "MPEG Video" + +config GST1_LIBAV_PARSER_mpeg4video + bool "MPEG-4 Video" + +comment "Protocols ---" + +config GST1_LIBAV_PROTOCOL_file + bool "file:" + +config GST1_LIBAV_PROTOCOL_http + bool "http:" + +config GST1_LIBAV_PROTOCOL_pipe + bool "pipe:" + +config GST1_LIBAV_PROTOCOL_rtp + bool "rtp:" + select GST1_LIBAV_PROTOCOL_udp + +config GST1_LIBAV_PROTOCOL_tcp + bool "tcp:" + +config GST1_LIBAV_PROTOCOL_udp + bool "udp:" + +endmenu + diff --git a/multimedia/gst1-libav/Makefile b/multimedia/gst1-libav/Makefile new file mode 100644 index 0000000..bed00ac --- /dev/null +++ b/multimedia/gst1-libav/Makefile @@ -0,0 +1,198 @@ +# +# 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:=gst1-libav +PKG_VERSION:=1.8.2 +PKG_RELEASE:=2 + +PKG_MAINTAINER:=W. Michael Petullo \ + Ted Hess + +PKG_SOURCE:=gst-libav-$(PKG_VERSION).tar.xz +PKG_SOURCE_URL:=http://gstreamer.freedesktop.org/src/gst-libav +PKG_MD5SUM:=b5f3c7a27b39b5f5c2f0bfd546b0c655020faf6b38d27b64b346c43e5ebf687a + +PKG_LICENSE:=GPL-2.0 LGPL-2.0 +PKG_LICENSE_FILES:=COPYING COPYING.LIB + +PKG_BUILD_DIR:=$(BUILD_DIR)/gst-libav-$(PKG_VERSION) + +PKG_FIXUP:=autoreconf +PKG_INSTALL:=1 + +PKG_USE_MIPS16:=0 + +GST_VERSION:=1.0 + +LIBAV_ENCODERS:= \ + ac3 \ + jpegls \ + mpeg1video \ + mpeg2video \ + mpeg4 \ + pcm_s16be \ + pcm_s16le \ + png \ + vorbis \ + zlib \ + +LIBAV_DECODERS:= \ + aac \ + ac3 \ + atrac3 \ + gif \ + h264 \ + jpegls \ + mp2 \ + mp3 \ + mpeg1video \ + mpeg2video \ + mpeg4 \ + mpegvideo \ + pcm_s16be \ + pcm_s16le \ + png \ + vorbis \ + wmav1 \ + wmav2 \ + zlib \ + +LIBAV_MUXERS:= \ + ac3 \ + ffm \ + h264 \ + mp3 \ + mp4 \ + mpeg1video \ + mpeg2video \ + mpegts \ + ogg \ + oss \ + rtp \ + +LIBAV_DEMUXERS:= \ + ac3 \ + ffm \ + h264 \ + mp3 \ + mpegps \ + mpegts \ + mpegvideo \ + ogg \ + rm \ + rtsp \ + sdp \ + v4l2 \ + +LIBAV_PARSERS:= \ + aac \ + ac3 \ + h264 \ + mpegaudio \ + mpegvideo \ + mpeg4video \ + +LIBAV_PROTOCOLS:= \ + file http pipe rtp tcp udp + +PKG_CONFIG_DEPENDS:= \ + $(patsubst %,CONFIG_GST1_LIBAV_ENCODER_%,$(LIBAV_ENCODERS)) \ + $(patsubst %,CONFIG_GST1_LIBAV_DECODER_%,$(LIBAV_DECODERS)) \ + $(patsubst %,CONFIG_GST1_LIBAV_MUXER_%,$(LIBAV_DEMUXERS)) \ + $(patsubst %,CONFIG_GST1_LIBAV_DEMUXER_%,$(LIBAV_DEMUXERS)) \ + $(patsubst %,CONFIG_GST1_LIBAV_PARSER_%,$(LIBAV_PARSERS)) \ + $(patsubst %,CONFIG_GST1_LIBAV_PROTOCOL_%,$(LIBAV_PROTOCOLS)) + +PKG_BUILD_DEPENDS:= libgstreamer1 gstreamer1-plugins-base + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk + +define Package/gst1-libav + SECTION:=multimedia + CATEGORY:=Multimedia + TITLE:=GStreamer Libav plugin + URL:=http://www.gstreamer.net/modules/gst-libav.html + DEPENDS:= +libgstreamer1 +gstreamer1-plugins-base \ + +gst1-mod-alsa +libgst1audio +libgst1pbutils +libgst1video \ + +libbz2 +liblzma +endef + +define Package/gst1-libav/description + GStreamer with libav bindings using internal Libav +endef + +define Package/gst1-libav/config + source "$(SOURCE)/Config.in" +endef + +FILTER_CONFIG= \ + $(foreach c, $(3), \ + $(if $(CONFIG_GST1_LIBAV_$(1)_$(c)),--enable-$(2)='$(c)') \ + ) + +LIBAV_CONFIGURE_ENCODERS:=$(call FILTER_CONFIG,ENCODER,encoder,$(LIBAV_ENCODERS)) +LIBAV_CONFIGURE_DECODERS:=$(call FILTER_CONFIG,DECODER,decoder,$(LIBAV_DECODERS)) +LIBAV_CONFIGURE_MUXERS:=$(call FILTER_CONFIG,MUXER,muxer,$(LIBAV_MUXERS)) +LIBAV_CONFIGURE_DEMUXERS:=$(call FILTER_CONFIG,DEMUXER,demuxer,$(LIBAV_DEMUXERS)) +LIBAV_CONFIGURE_PARSERS:=$(call FILTER_CONFIG,PARSER,parser,$(LIBAV_PARSERS)) +LIBAV_CONFIGURE_PROTOCOLS:=$(call FILTER_CONFIG,PROTOCOL,protocol,$(LIBAV_PROTOCOLS)) + +CONFIGURE_ARGS += \ + --without-system-libav \ + --with-libav-extra-configure="--target-os=linux \ + $(if $(findstring " ",$(CONFIG_CPU_TYPE)),,--cpu=$(CONFIG_CPU_TYPE)) \ + --disable-bsfs \ + --disable-programs \ + --disable-devices \ + --disable-encoders \ + $(LIBAV_CONFIGURE_ENCODERS) \ + --disable-decoders \ + $(LIBAV_CONFIGURE_DECODERS) \ + --disable-muxers \ + $(LIBAV_CONFIGURE_MUXERS) \ + --disable-demuxers \ + $(LIBAV_CONFIGURE_DEMUXERS) \ + --disable-parsers \ + $(LIBAV_CONFIGURE_PARSERS) \ + --disable-protocols \ + $(LIBAV_CONFIGURE_PROTOCOLS) \ + --disable-asm \ + --disable-altivec \ + --disable-amd3dnow \ + --disable-amd3dnowext \ + --disable-mmx \ + --disable-mmxext \ + --disable-sse \ + --disable-sse2 \ + --disable-sse3 \ + --disable-ssse3 \ + --disable-sse4 \ + --disable-sse42 \ + --disable-avx \ + --disable-xop \ + --disable-fma3 \ + --disable-fma4 \ + --disable-avx2 \ + --disable-inline-asm \ + --disable-yasm" + +TARGET_CFLAGS += -D_GNU_SOURCE + +TARGET_LDFLAGS += $(FPIC) + +define Package/gst1-libav/install + $(INSTALL_DIR) $(1)/usr/lib/gstreamer-$(GST_VERSION) + ( cd $(PKG_INSTALL_DIR); $(CP) \ + ./usr/lib/gstreamer-$(GST_VERSION)/libgstlibav.so* \ + $(1)/usr/lib/gstreamer-$(GST_VERSION)/ \ + ) +endef + +$(eval $(call BuildPackage,gst1-libav)) diff --git a/multimedia/icecast/Makefile b/multimedia/icecast/Makefile index ea115f3..2ef95b7 100644 --- a/multimedia/icecast/Makefile +++ b/multimedia/icecast/Makefile @@ -1,6 +1,4 @@ # -# Copyright (C) 2006-2011 OpenWrt.org -# # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. # @@ -9,25 +7,28 @@ include $(TOPDIR)/rules.mk PKG_NAME:=icecast PKG_VERSION:=2.4.3 -PKG_RELEASE:=2 -PKG_LICENSE:=GPL-2.0 -PKG_MAINTAINER:=André Gaul +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://downloads.xiph.org/releases/icecast/ +PKG_SOURCE_URL:=https://downloads.xiph.org/releases/icecast/ PKG_MD5SUM:=83d7d34dbe22f0f8fc119d2c9839efc0 +PKG_HASH:=c85ca48c765d61007573ee1406a797ae6cb31fb5961a42e7f1c87adb45ddc592 + +PKG_MAINTAINER:=André Gaul , \ + Ted Hess + +PKG_LICENSE:=GPL-2.0 +PKG_LICENSE_FILES:=COPYING PKG_FIXUP:=autoreconf +PKG_INSTALL:= 1 include $(INCLUDE_DIR)/package.mk -TREMOR_BUILD_DIR=$(PKG_BUILD_DIR)/libvorbisidec-1.2.0-dave -TREMOR_DIR=$(TREMOR_BUILD_DIR)/ipkg-install/usr - define Package/icecast SECTION:=multimedia CATEGORY:=Multimedia - DEPENDS:=+libcurl +libxml2 +libxslt +libogg +libopenssl + DEPENDS:=+libcurl +libxml2 +libxslt +libogg +libvorbisidec TITLE:=A streaming media server for Ogg/Vorbis and MP3 audio streams USERID:=icecast=87:icecast=87 URL:=http://www.icecast.org/ @@ -42,39 +43,22 @@ define Package/icecast/description interaction. endef -define Build/Prepare - $(Build/Prepare/Default) - $(SUBMAKE) -f libvorbisidec.mk \ - BUILD_DIR="$(PKG_BUILD_DIR)" \ - V=99 \ - prepare -endef +CONFIGURE_ARGS+= \ + --enable-yp \ + --with-openssl="no" \ + --with-curl="yes" \ + --with-curl-config="$(STAGING_DIR)/usr/bin/curl-config" \ + --with-ogg="$(STAGING_DIR)/usr" \ + --with-speex="no" \ + --with-theora="no" \ + --with-vorbis="$(STAGING_DIR)/usr" \ + --with-xslt-config="$(STAGING_DIR)/usr/bin/xslt-config" -define Build/Configure - $(MAKE) -f libvorbisidec.mk \ - BUILD_DIR="$(PKG_BUILD_DIR)" \ - V=99 \ - compile - $(SED) 's,-lvorbis ,$(TREMOR_DIR)/lib/libvorbisidec.a -logg ,g' $(PKG_BUILD_DIR)/configure - $(call Build/Configure/Default, \ - --enable-yp \ - --with-curl="yes" \ - --with-curl-config="$(STAGING_DIR)/usr/bin/curl-config" \ - --with-ogg="$(STAGING_DIR)/usr" \ - --with-speex="no" \ - --with-theora="no" \ - --with-vorbis="$(TREMOR_DIR)" \ - --with-xslt-config="$(STAGING_DIR)/usr/bin/xslt-config" \ - , \ - CPPFLAGS="-I$(TREMOR_DIR)/include -I$(STAGING_DIR)/usr/include/libxml2 $(TARGET_CPPFLAGS)" \ - ) -endef -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - INCLUDES="-I$(PKG_BUILD_DIR)/src -I$(TREMOR_DIR)/include" \ - all install +# Manually edit configure in case both vorbis and tremor host packages are installed +define Build/Configure + $(SED) 's,-lvorbis -lm,-lvorbisidec -logg ,g' $(PKG_BUILD_DIR)/configure + $(call Build/Configure/Default) endef define Package/icecast/install diff --git a/multimedia/icecast/libvorbisidec.mk b/multimedia/icecast/libvorbisidec.mk deleted file mode 100644 index eda6e76..0000000 --- a/multimedia/icecast/libvorbisidec.mk +++ /dev/null @@ -1,41 +0,0 @@ -# -# Copyright (C) 2006 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:=icecast-libvorbisidec -PKG_VERSION:=1.2.0-dave -PKG_RELEASE:=1 - -PKG_SOURCE:=libvorbisidec-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://users.tpg.com.au/davico/openwrt/ -PKG_MD5SUM:=cb8e51aab92ef164f8e0e8853f7164fa - -PKG_BUILD_DIR:=$(BUILD_DIR)/libvorbisidec-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install -PATCH_DIR=./patches-libvorbisidec - -include $(INCLUDE_DIR)/package.mk - -define Build/Configure - $(call Build/Configure/Default, \ - --disable-shared \ - --enable-static \ - ) -endef - -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install -endef - -define Build/InstallDev - true -endef - -$(eval $(call Build/DefaultTargets)) diff --git a/multimedia/icecast/patches/001-icecast-2.4.0-tremor.patch b/multimedia/icecast/patches/001-icecast-2.4.0-tremor.patch index 6fa6f08..49861d2 100644 --- a/multimedia/icecast/patches/001-icecast-2.4.0-tremor.patch +++ b/multimedia/icecast/patches/001-icecast-2.4.0-tremor.patch @@ -1,104 +1,114 @@ ---- a/src/format_flac.c -+++ b/src/format_flac.c -@@ -18,7 +18,7 @@ - #endif - - #include --#include -+#include - #include - - typedef struct source_tag source_t; ---- a/src/format_midi.c -+++ b/src/format_midi.c -@@ -18,7 +18,7 @@ - #endif - - #include --#include -+#include - #include - - typedef struct source_tag source_t; ---- a/src/format_ogg.c -+++ b/src/format_ogg.c -@@ -24,7 +24,7 @@ - #include - #include - --#include -+#include - - #include "refbuf.h" - #include "source.h" ---- a/src/format_ogg.h -+++ b/src/format_ogg.h -@@ -18,7 +18,7 @@ - #ifndef __FORMAT_OGG_H__ - #define __FORMAT_OGG_H__ - --#include -+#include - #include "refbuf.h" - #include "format.h" - ---- a/src/format_speex.c -+++ b/src/format_speex.c -@@ -18,7 +18,7 @@ - #endif - - #include --#include -+#include - #include - - typedef struct source_tag source_t; ---- a/src/format_theora.c -+++ b/src/format_theora.c -@@ -18,7 +18,7 @@ - #endif - - #include --#include -+#include - #include - - typedef struct source_tag source_t; --- a/src/format_vorbis.c +++ b/src/format_vorbis.c -@@ -18,8 +18,8 @@ - #endif +@@ -19,7 +19,7 @@ #include --#include + #include -#include -+#include +#include #include #include ---- a/src/source.c -+++ b/src/source.c -@@ -19,7 +19,7 @@ - #include - #include - #include --#include -+#include - #include - - #ifndef _WIN32 ---- a/src/format_kate.c -+++ b/src/format_kate.c -@@ -19,7 +19,7 @@ - - #include - #include --#include -+#include - #ifdef HAVE_KATE - #include - #endif +@@ -34,6 +34,7 @@ + #define CATMODULE "format-vorbis" + #include "logging.h" + ++int vorbis_commentheader_out(vorbis_comment *vc, ogg_packet *op); + + typedef struct vorbis_codec_tag + { +@@ -583,3 +584,91 @@ static refbuf_t *process_vorbis_page (og + return NULL; + } + ++/* Some additional functions from vorbis missing from tremor */ ++ ++static void _v_writestring(oggpack_buffer *o,char *s, int bytes) ++{ ++ ++ while(bytes--){ ++ oggpack_write(o,*s++,8); ++ } ++} ++ ++static int _vorbis_pack_comment(oggpack_buffer *opb,vorbis_comment *vc) ++{ ++ char temp[]="Xiph.Org libVorbis I 20150104"; ++ int bytes = strlen(temp); ++ ++ /* preamble */ ++ oggpack_write(opb,0x03,8); ++ _v_writestring(opb,"vorbis", 6); ++ ++ /* vendor */ ++ oggpack_write(opb,bytes,32); ++ _v_writestring(opb,temp, bytes); ++ ++ /* comments */ ++ ++ oggpack_write(opb,vc->comments,32); ++ if(vc->comments){ ++ int i; ++ for(i=0;icomments;i++){ ++ if(vc->user_comments[i]){ ++ oggpack_write(opb,vc->comment_lengths[i],32); ++ _v_writestring(opb,vc->user_comments[i], vc->comment_lengths[i]); ++ }else{ ++ oggpack_write(opb,0,32); ++ } ++ } ++ } ++ oggpack_write(opb,1,1); ++ ++ return(0); ++} ++ ++void vorbis_comment_add(vorbis_comment *vc,char *comment) ++{ ++ vc->user_comments=_ogg_realloc(vc->user_comments, ++ (vc->comments+2)*sizeof(*vc->user_comments)); ++ vc->comment_lengths=_ogg_realloc(vc->comment_lengths, ++ (vc->comments+2)*sizeof(*vc->comment_lengths)); ++ vc->comment_lengths[vc->comments]=strlen(comment); ++ vc->user_comments[vc->comments]=_ogg_malloc(vc->comment_lengths[vc->comments]+1); ++ strcpy(vc->user_comments[vc->comments], comment); ++ vc->comments++; ++ vc->user_comments[vc->comments]=NULL; ++} ++ ++void vorbis_comment_add_tag(vorbis_comment *vc, char *tag, char *contents) ++{ ++ char *comment=alloca(strlen(tag)+strlen(contents)+2); /* +2 for = and \0 */ ++ strcpy(comment, tag); ++ strcat(comment, "="); ++ strcat(comment, contents); ++ vorbis_comment_add(vc, comment); ++ ++ return; ++} ++ ++int vorbis_commentheader_out(vorbis_comment *vc, ogg_packet *op) ++{ ++ oggpack_buffer opb; ++ ++ oggpack_writeinit(&opb); ++ if(_vorbis_pack_comment(&opb,vc)){ ++ oggpack_writeclear(&opb); ++ return OV_EIMPL; ++ } ++ ++ op->packet = _ogg_malloc(oggpack_bytes(&opb)); ++ memcpy(op->packet, opb.buffer, oggpack_bytes(&opb)); ++ ++ op->bytes=oggpack_bytes(&opb); ++ op->b_o_s=0; ++ op->e_o_s=0; ++ op->granulepos=0; ++ op->packetno=1; ++ ++ oggpack_writeclear(&opb); ++ return 0; ++} --- a/m4/vorbis.m4 +++ b/m4/vorbis.m4 @@ -38,9 +38,9 @@ if test "x$vorbis_prefix" != "x$ogg_pref @@ -144,12 +154,3 @@ # # check if the installed Ogg is sufficiently new. -@@ -42,7 +42,7 @@ LIBS="$LIBS $OGG_LIBS" - LDFLAGS="$LDFLAGS $OGG_LDFLAGS" - AC_TRY_LINK_FUNC(ogg_sync_init, - [ xt_cv_lib_ogg=ok ], -- [ AC_TRY_LINK([#include ],, -+ [ AC_TRY_LINK([#include ],, - [ xt_cv_lib_ogg="pre v1.0, needs updating" ], - [ xt_cv_lib_ogg="not found" ]) - ]) diff --git a/multimedia/icecast/patches/005-no_examples_doc_win32.patch b/multimedia/icecast/patches/005-no_examples_doc_win32.patch new file mode 100644 index 0000000..178df54 --- /dev/null +++ b/multimedia/icecast/patches/005-no_examples_doc_win32.patch @@ -0,0 +1,20 @@ +--- a/Makefile.am ++++ b/Makefile.am +@@ -3,7 +3,7 @@ + AUTOMAKE_OPTIONS = foreign dist-zip + ACLOCAL_AMFLAGS = -I m4 + +-SUBDIRS = src conf doc web admin win32 examples ++SUBDIRS = src conf web admin + + EXTRA_DIST = HACKING m4/acx_pthread.m4 m4/ogg.m4 \ + m4/theora.m4 m4/vorbis.m4 m4/speex.m4 \ +@@ -11,7 +11,7 @@ EXTRA_DIST = HACKING m4/acx_pthread.m4 m + m4/xiph_types.m4 m4/xiph_xml2.m4 + + docdir = $(datadir)/doc/$(PACKAGE) +-doc_DATA = README AUTHORS COPYING NEWS TODO ChangeLog ++doc_DATA = README AUTHORS COPYING + + debug: + $(MAKE) all CFLAGS="@DEBUG@" diff --git a/multimedia/icecast/patches/015-add_with-openssl_option.patch b/multimedia/icecast/patches/015-add_with-openssl_option.patch new file mode 100644 index 0000000..f0a5b70 --- /dev/null +++ b/multimedia/icecast/patches/015-add_with-openssl_option.patch @@ -0,0 +1,25 @@ +--- a/m4/xiph_openssl.m4 ++++ b/m4/xiph_openssl.m4 +@@ -30,13 +30,15 @@ else + fi + + # Now try linking to openssl +-xt_save_CFLAGS="$CFLAGS" +-xt_save_LIBS="$LIBS" +-CFLAGS="$CFLAGS $OPENSSL_CFLAGS" +-LIBS="$OPENSSL_LIBS $LIBS" +-AC_TRY_LINK([#include ], [void *a = SSL_new], [openssl_ok='yes']) +-CFLAGS="$xt_save_CFLAGS" +-LIBS="$xt_save_LIBS" ++if test "x$openssl_prefix" != "xno"; then ++ xt_save_CFLAGS="$CFLAGS" ++ xt_save_LIBS="$LIBS" ++ CFLAGS="$CFLAGS $OPENSSL_CFLAGS" ++ LIBS="$OPENSSL_LIBS $LIBS" ++ AC_TRY_LINK([#include ], [void *a = SSL_new], [openssl_ok='yes']) ++ CFLAGS="$xt_save_CFLAGS" ++ LIBS="$xt_save_LIBS" ++fi + + if test "$openssl_ok" = "yes"; then + AC_DEFINE(HAVE_OPENSSL, 1, [Define if you have libopenssl.]) diff --git a/multimedia/ices/Makefile b/multimedia/ices/Makefile index a3cb714..c0569ab 100644 --- a/multimedia/ices/Makefile +++ b/multimedia/ices/Makefile @@ -1,7 +1,4 @@ # -# Copyright (C) 2009-2015 OpenWrt.org -# Copyright (C) 2009 Freifunk Leipzig -# # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. # @@ -18,7 +15,8 @@ PKG_MD5SUM:=832c448cc993170a70fd95804fcda5b2 PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:=COPYING -PKG_MAINTAINER:=Nicolas Thill +PKG_MAINTAINER:=Nicolas Thill , \ + Ted Hess PKG_FIXUP:=autoreconf PKG_INSTALL:=1 @@ -41,7 +39,9 @@ endef CONFIGURE_ARGS+= \ --with-ogg="$(STAGING_DIR)/usr/include" \ - --with-vorbis="$(STAGING_DIR)/usr/include" \ + --with-vorbis="$(STAGING_DIR)/usr/include" + +TARGET_LDFLAGS+= -logg define Package/ices/install $(INSTALL_DIR) $(1)/usr/bin diff --git a/net/adblock/Makefile b/net/adblock/Makefile index 08a11d7..1511790 100644 --- a/net/adblock/Makefile +++ b/net/adblock/Makefile @@ -1,34 +1,33 @@ # -# Copyright (C) 2015-2016 OpenWrt.org -# +# Copyright (c) 2015-2017 Dirk Brenken (dev@brenken.org) # This is free software, licensed under the GNU General Public License v3. # include $(TOPDIR)/rules.mk PKG_NAME:=adblock -PKG_VERSION:=1.5.4 +PKG_VERSION:=2.6.2 PKG_RELEASE:=1 PKG_LICENSE:=GPL-3.0+ PKG_MAINTAINER:=Dirk Brenken include $(INCLUDE_DIR)/package.mk -define Package/$(PKG_NAME) +define Package/adblock SECTION:=net CATEGORY:=Network TITLE:=Powerful adblock script to block ad/abuse domains PKGARCH:=all endef -define Package/$(PKG_NAME)/description -Powerful adblock script to block ad/abuse domains. +define Package/adblock/description +Powerful adblock script to block ad/abuse domains via dnsmasq or unbound dns backend. The script supports many domain blacklist sites plus manual black- and whitelist overrides. Please see https://github.com/openwrt/packages/blob/master/net/adblock/files/README.md for further information. endef -define Package/$(PKG_NAME)/conffiles +define Package/adblock/conffiles /etc/config/adblock /etc/adblock/adblock.whitelist /etc/adblock/adblock.blacklist @@ -43,13 +42,9 @@ endef define Build/Compile endef -define Package/$(PKG_NAME)/install +define Package/adblock/install $(INSTALL_DIR) $(1)/usr/bin - $(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/90-adblock + $(INSTALL_BIN) ./files/adblock.sh $(1)/usr/bin/ $(INSTALL_DIR) $(1)/etc/init.d $(INSTALL_BIN) ./files/adblock.init $(1)/etc/init.d/adblock @@ -58,12 +53,8 @@ define Package/$(PKG_NAME)/install $(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_DIR) $(1)/www/adblock - $(INSTALL_DATA) ./files/www/adblock/* $(1)/www/adblock/ endef -$(eval $(call BuildPackage,$(PKG_NAME))) +$(eval $(call BuildPackage,adblock)) diff --git a/net/adblock/files/README.md b/net/adblock/files/README.md index 043b99a..6950ec7 100644 --- a/net/adblock/files/README.md +++ b/net/adblock/files/README.md @@ -1,12 +1,14 @@ # dns based ad/abuse domain blocking ## Description -A lot of people already use adblocker plugins within their desktop browsers, but what if you are using your (smart) phone, tablet, watch or any other wlan gadget...getting rid of annoying ads, trackers and other abuse sites (like facebook ;-) is simple: block them with your router. When the dns server on your router receives dns requests, you will sort out queries that ask for the resource records of ad servers and return 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 a simple 'NXDOMAIN'. This is nothing but **N**on-e**X**istent Internet or Intranet domain name, if domain name is unable to resolved using the dns server, a condition called the 'NXDOMAIN' occurred. ## Main Features -* support of the following domain blocklist sources (free for private usage, for commercial use please check their individual licenses): +* support of the following domain block list sources (free for private usage, for commercial use please check their individual licenses): * [adaway](https://adaway.org) * => infrequent updates, approx. 400 entries (enabled by default) + * [adguard](https://adguard.com) + * => numerous updates on the same day, approx. 12.000 entries * [blacklist]() * => static local blacklist, located by default in '/etc/adblock/adblock.blacklist' * [disconnect](https://disconnect.me) @@ -27,10 +29,14 @@ A lot of people already use adblocker plugins within their desktop browsers, but * => daily updates, approx. 15 entries * [ransomware tracker](https://ransomwaretracker.abuse.ch) * => daily updates, approx. 150 entries - * [rolist/easylist](https://easylist-downloads.adblockplus.org/rolist+easylist.txt) - * => weekly updates, approx. 600 entries - * [ruadlist/easylist](https://code.google.com/p/ruadlist) - * => weekly updates, approx. 2.000 entries + * [reg_cn](https://easylist-downloads.adblockplus.org/easylistchina+easylist.txt) + * => regional blocklist for China, daily updates, approx. 1.600 entries + * [reg_pl](http://adblocklist.org) + * => regional blocklist for Poland, daily updates, approx. 50 entries + * [reg_ro](https://easylist-downloads.adblockplus.org/rolist+easylist.txt) + * => regional blocklist for Romania, weekly updates, approx. 600 entries + * [reg_ru](https://code.google.com/p/ruadlist) + * => regional blocklist for Russia, weekly updates, approx. 2.000 entries * [securemecca](http://www.securemecca.com) * => infrequent updates, approx. 25.000 entries * [shallalist](http://www.shallalist.de) (categories "adv" "costtraps" "spyware" "tracker" "warez" enabled by default) @@ -49,107 +55,120 @@ A lot of people already use adblocker plugins within their desktop browsers, but * => weekly updates, approx. 2.500 entries (enabled by default) * [zeus tracker](https://zeustracker.abuse.ch) * => daily updates, approx. 440 entries -* zero-conf like automatic installation & setup, usually no manual changes needed (i.e. ip address, network devices etc.) -* supports a wide range of router modes (incl. AP mode), as long as firewall and dnsmasq are installed and in use +* zero-conf like automatic installation & setup, usually no manual changes needed +* simple but yet powerful adblock engine: adblock does not use error prone external iptables rulesets, http pixel server instances and things like that +* automatically selects dnsmasq or unbound as dns backend +* automatically selects uclient-fetch or wget as download utility (other tools like curl or aria2c are supported as well) +* support http only mode (without installed ssl library) for all non-SSL blocklist sources +* automatically supports a wide range of router modes, even AP modes are supported * full IPv4 and IPv6 support -* each blocklist source will be updated and processed separately -* 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 +* supports tld compression (top level domain compression), this feature removes thousands of needless host entries from the block lists and lowers the memory footprint for the dns backends +* each block list source will be updated and processed separately +* block list source parsing by fast & flexible regex rulesets +* overall duplicate removal in separate block lists * additional whitelist for manual overrides, located by default in /etc/adblock/adblock.whitelist -* quality checks during & after update of adblock lists to ensure a reliable dnsmasq service -* adblock statistics, last runtime and list states/counts/update times will be stored in uci config for LuCI frontend -* status & error logging to stdout and syslog -* use two dynamic uhttpd instances as adblock pixel server, separated for ads delivered on port 80 and on port 443 -* use dynamic iptables chains/rulesets for adblock related redirects/rejects -* init system support (start/stop/restart/reload/toggle/stats/cfgup/envchk/query) -* hotplug support, the adblock start will be triggered by wan 'ifup' event, this can be restricted to a certain wan interface or disabled at all (see config options below) -* toggle to quickly switch adblock 'on' or 'off' -* envchk function to check the volatile adblock environment only (without list updates) -* query function to quickly identify blocked (sub-)domains, i.e. for whitelisting -* optional: automatic adblock list backup/restore, backups will be (de-)compressed on the fly (disabled by default) -* optional: add new adblock sources via uci config (see example below) +* quality checks during block list update to ensure a reliable dns backend service +* minimal status & error logging to syslog, enable debug logging to receive more output +* procd based init system support (start/stop/restart/reload/suspend/resume/query/status) +* procd based hotplug support, the adblock start will be solely triggered by network interface triggers +* suspend & resume adblock actions temporarily without block list reloading +* runtime information available via LuCI & via 'status' init command +* query function to quickly identify blocked (sub-)domains, e.g. for whitelisting +* optional: force dns requests to local resolver +* optional: force overall sort / duplicate removal for low memory devices (handle with care!) +* optional: automatic block list backup & restore, backups will be (de-)compressed and restored on the fly in case of any runtime error +* optional: add new adblock sources on your own via uci config ## Prerequisites -* [openwrt](https://openwrt.org), tested with latest stable release (Chaos Calmer) and with current trunk (Designated Driver) -* [LEDE project](https://www.lede-project.org), tested with trunk > r98 -* usual setup with enabled 'iptables', 'dnsmasq' and 'uhttpd' - dump AP modes without these basics are _not_ supported! -* additional required software packages: - * a download utility: 'uclient-fetch' and 'wget' (full versions with ssl support) are supported. Normally you should use 'wget', it's quite stable and supports the online timestamp checks. If you need a smaller memory footprint try 'uclient-fetch' without openssl dependency. The default ustream ssl backend 'libustream-polarssl' has issues with certain https sites and is currently not supported. To change the ssl backend see example below. - * optional: 'kmod-ipt-nat6' for IPv6 support -* the above dependencies and requirements will be checked during package installation & script runtime - -## OpenWrt / LEDE trunk Installation & Usage -* install 'adblock' (_opkg install adblock_) -* adblock starts automatically during boot, triggered by wan-ifup event, check _logread -e "adblock"_ for adblock related information -* optional: start/restart/stop the adblock service manually with _/etc/init.d/adblock_ -* 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' +* [LEDE project](https://www.lede-project.org), tested with latest stable release (LEDE 17.01) and with current LEDE snapshot +* a usual setup with an enabled dns backend at minimum - dump AP modes without a working dns backend are _not_ supported +* a download utility: + * to support all blocklist sources a full version (with ssl support) of 'wget', 'uclient-fetch' with one of the 'libustream-*' ssl libraries, 'aria2c' or 'curl' is required + * for limited devices with real memory constraints, adblock provides also a plain http option and supports wget-nossl and uclient-fetch (without libustream-ssl), too + * for more configuration options see examples below + +## LEDE trunk Installation & Usage +* install 'adblock' (_opkg install adblock_) and that's it - the adblock start will be automatically triggered by procd interface trigger +* control the adblock service manually with _/etc/init.d/adblock_ start/stop/restart/reload/suspend/resume/status or use the LuCI frontend +* enable/disable your favored block list sources in _/etc/config/adblock_ - 'adaway', 'disconnect' and 'yoyo' are enabled by default ## LuCI adblock companion package -* for easy management of the various blocklist sources and adblock options there is also a nice & efficient LuCI frontend available +* for easy management of the various block list sources and all other adblock options you can also use a nice & efficient LuCI frontend * install 'luci-app-adblock' (_opkg install luci-app-adblock_) * the application is located in LuCI under 'Services' menu -* _Thanks to Hannu Nyman for this great adblock LuCI frontend!_ - -## Chaos Calmer installation notes -* 'adblock' and 'luci-app-adblock' are _not_ available as .ipk packages in the Chaos Calmer download repository -* download both packages from a development snapshot package directory: - * for 'adblock' look [here](https://downloads.lede-project.org/snapshots/packages/x86_64/packages/) - * for 'luci-app-adblock' look [here](https://downloads.lede-project.org/snapshots/packages/x86_64/luci/) -* manually transfer the packages to your routers temp directory (with tools like _sshfs_ or _winscp_) -* install the packages with _opkg install <...>_ as described above ## Tweaks -* **storage:** to process & store all blocklist sources at once it might helpful to enlarge your temp directory with a swap partition => see [openwrt wiki](https://wiki.openwrt.org/doc/uci/fstab) for further details -* **white-/blacklist:** add domain white- or blacklist entries to always-allow or -deny certain (sub) domains, by default both lists are located in _/etc/adblock_. Please add one domain per line - ip addresses, wildcards & regex are _not_ allowed (see example below) -* **backup/restore:** enable the backup/restore feature, to restore automatically the latest compressed backup of your adblock lists in case of any processing error (i.e. a single blocklist source is down). Please use an (external) solid partition and _not_ your volatile router temp directory for this -* **list updates:** for a scheduled call of the adblock service add an appropriate crontab entry (see example below) -* **hotplug fine tuning:** to restrict hotplug support to a certain wan interface or to disable it at all, you can set 'adb\_hotplugif' to an existing interface like 'wan' or to a non-existing 'dummy' interface -* **new list sources:** you could add new blocklist sources on your own via uci config, all you need is a source url and an awk one-liner (see example below) -* **AP mode:** in 'AP mode' adblock uses automatically the local router ip as nullip address. To make sure that your LuCI interface will be still accessible, you have to change the local uhttpd instance to ports <> 80/443 (see example below), also make sure that firewall and dnsmasq are installed and running -* **restricted mode:** to disable flash writes with adblock status information to the adblock config file (used by LuCI frontend), please set 'adb\_restricted' to '1' -* **adblock toggle:** to quickly switch adblocking 'on' or 'off', simply use _/etc/init.d/adblock toggle_ -* **adblock statistics:** to update only the adblock statistics (without updating the block lists as well), please run _/etc/init.d/adblock stats_ -* **adblock query ``:** to query the active blocklists for a specific domain, please run _/etc/init.d/adblock query ``_ (see example below) -* **configuration update:** to update an outdated adblock config file with the current default version, please run _/etc/init.d/adblock cfgup_, make your individual changes and start the adblock service again -* **debugging:** for script debugging please set the 'adb\_debug' variable in the header of _/etc/init.d/adblock_ to '1' -* **mute output** to mute the normal adblock output and print only warn/error messages, please set 'adb\_loglevel to '0' -* **disable active dns probing in windows:** to prevent a possible yellow exclamation mark on your internet connection icon (which wrongly means connected, but no internet), please change the following registry key/value from "1" to "0" _HKLM\SYSTEM\CurrentControlSet\Services\NlaSvc\Parameters\Internet\EnableActiveProbing_ +* **runtime information:** the adblock status is available via _/etc/init.d/adblock status_ (see example below) +* **debug logging:** for script debugging please set the config option 'adb\_debug' to '1' and check the runtime output with _logread -e "adblock"_ +* **storage expansion:** to process and store all block list sources at once it might helpful to enlarge your temp directory with a swap partition => see [openwrt wiki](https://wiki.openwrt.org/doc/uci/fstab) for further details +* **add white- / blacklist entries:** add domain white- or blacklist entries to always-allow or -deny certain (sub) domains, by default both lists are empty and located in _/etc/adblock_. Please add one domain per line - ip addresses, wildcards & regex are _not_ allowed (see example below) +* **backup & restore block lists:** enable this feature, to restore automatically the latest compressed backup of your block lists in case of any processing error (e.g. a single block list source is not available during update). Please use an (external) solid partition and _not_ your volatile router temp directory for this +* **scheduled list updates:** for a scheduled call of the adblock service add an appropriate crontab entry (see example below) +* **restrict procd interface trigger:** restrict the procd interface trigger to a (list of) certain interface(s) (default: wan). To disable it at all, remove all entries +* **suspend & resume adblocking:** to quickly switch the adblock service 'on' or 'off', simply use _/etc/init.d/adblock [suspend|resume]_ +* **domain query:** to query the active block lists for a specific domain, please run _/etc/init.d/adblock query ``_ (see example below) +* **add new list sources:** you could add new block list sources on your own via uci config, all you need is a source url and an awk one-liner (see example below) +* **disable active dns probing in windows 10:** to prevent a yellow exclamation mark on your internet connection icon (which wrongly means connected, but no internet), please change the following registry key/value from "1" to "0" _HKLM\SYSTEM\CurrentControlSet\Services\NlaSvc\Parameters\Internet\EnableActiveProbing_ ## Further adblock config options -* usually the adblock autodetection works quite well and no manual config overrides are needed, all options apply to the 'global' config section: +* usually the pre-configured adblock setup works quite well and no manual config overrides are needed, all listed options apply to the 'global' config section: * adb\_enabled => main switch to enable/disable adblock service (default: '1', enabled) - * adb\_cfgver => config version string (do not change!) - adblock will check this entry during startup - * adb\_lanif => name of the logical lan interface (default: 'lan') - * adb\_nullport => port of the adblock uhttpd instance used for ads delivered on port 80 (default: '65534') - * adb\_nullportssl => port of the adblock uhttpd instance used for ads delivered on port 443 (default: '65535') - * adb\_nullipv4 => IPv4 blackhole ip address (default: '198.18.0.1', in AP mode: local router ip) - * adb\_nullipv6 => IPv6 blackhole ip address (default: '::ffff:c612:0001', in AP mode: local router ip) - * adb\_forcedns => redirect all local DNS queries to the local dnsmasq resolver (default: '1', enabled / always disabled in 'AP mode') - * adb\_fetchttl => set the timeout for list downloads (default: '5' seconds) - * adb\_restricted => disable updates of the adblock config file (no flash writes) during runtime (default: '0', disabled) - * adb\_hotplugif => restrict hotplug support to a certain wan interface or disable it at all (default: '', disabled) - * adb\_loglevel => set it to '0' to mute normal adblock output and print only error messages (default: '1', normal output) + * adb\_debug => enable/disable adblock debug output (default: '0', disabled) + * adb\_iface => set the procd interface trigger to a (list of) lan / wan interface(s) (default: 'wan') + * adb\_fetch => full path to a different download utility, see example below (default: not set, use wget) + * adb\_fetchparm => options for the download utility, see example below (default: not set, use wget options) + * adb\_triggerdelay => additional trigger delay in seconds before adblock processing starts (default: '2') + * adb\_forcedns => force dns requests to local resolver (default: '0', disabled) + * adb\_forcesrt => force overall sort on low memory devices with less than 64 MB RAM (default: '0', disabled) ## Examples +**change default dns backend to 'unbound':** +

+Adblock detects the presence of an active unbound dns backend and the block lists will be automatically pulled in by unbound.
+The adblock script deposits the sorted and filtered block lists in '/var/lib/unbound' where unbound can find them in its jail.
+If you use manual configuration for unbound, then just include the following line in your 'server:' clause:
+
+  include: "/var/lib/unbound/adb_list.*"
+
+ +**configuration for different download utilities:** +

+wget (default):
+  option adb_fetch="/usr/bin/wget"
+  option adb_fetchparm="--no-config --quiet --no-cache --no-cookies --max-redirect=0 --timeout=10 --no-check-certificate -O"
+
+aria2c:
+  option adb_fetch '/usr/bin/aria2c'
+  option adb_fetchparm '-q --timeout=10 --allow-overwrite=true --auto-file-renaming=false --check-certificate=false -o'
+
+uclient-fetch:
+  option adb_fetch '/bin/uclient-fetch'
+  option adb_fetchparm '-q --timeout=10 --no-check-certificate -O'
 
-**example to change the ssl backend for 'uclient-fetch':**
+curl:
+  option adb_fetch '/usr/bin/curl'
+  option adb_fetchparm '-s --connect-timeout 10 --insecure -o'
+
+ +**receive adblock runtime information:**

-opkg update
-opkg remove --force-depends libustream-polarssl
-opkg install libustream-mbedtls
+root@blackhole:~# /etc/init.d/adblock status
+::: adblock runtime information
+ status          : active
+ adblock_version : 2.6.0
+ blocked_domains : 113711
+ fetch_info      : wget (built-in)
+ dns_backend     : dnsmasq
+ last_rundate    : 12.04.2017 13:08:26
+ system          : LEDE Reboot SNAPSHOT r3900-399d5cf532
 
-**example cronjob for a regular block list update:** +**cronjob for a regular block list update (/etc/crontabs/root):**

-# configuration found in /etc/crontabs/root
-# start adblock script once a day at 6 a.m.
-#
 0 06 * * *    /etc/init.d/adblock start
 
-**example blacklist entry (/etc/adblock/adblock.blacklist):** +**blacklist entry (/etc/adblock/adblock.blacklist):**

 ads.example.com
 
@@ -163,11 +182,11 @@ This entry does not block:
   http://example.com/
 
-**example whitelist entry (/etc/adblock/adblock.whitelist):** +**whitelist entry (/etc/adblock/adblock.whitelist):**

 here.com
 
-This entry removes the following (sub)domains from the blocklists:
+This entry removes the following (sub)domains from the block lists:
   maps.here.com
   here.com
 
@@ -176,53 +195,25 @@ This entry does not remove:
   www.adwhere.com
 
-**example uhttpd configuration in AP mode:** +**query active block lists for a certain (sub-)domain, e.g. for whitelisting:**

-# configuration found in /etc/config/uhttpd
-# change default http/https ports <> 80/443
-#
-config uhttpd 'main'
-    list listen_http '0.0.0.0:88'
-    list listen_https '0.0.0.0:445'
-
- -**example to query active blocklists for a certain (sub-)domain, i.e. for whitelisting:** -

-/etc/init.d/adblock query "example.www.doubleclick.net"
-=> distinct results for domain 'example.www.doubleclick.net' (overall 0)
-   no matches in active blocklists
-=> distinct results for domain 'www.doubleclick.net' (overall 1)
-   adb_list.winhelp     : www.doubleclick.net
-=> distinct results for domain 'doubleclick.net' (overall 252)
-   adb_list.adaway      : ad-g.doubleclick.net
-   adb_list.hphosts     : 1016557.fls.doubleclick.net
-   adb_list.rolist      : feedads.g.doubleclick.net
-   adb_list.securemecca : 1168945.fls.doubleclick.net
-   adb_list.sysctl      : ad.co.doubleclick.net
-   adb_list.whocares    : 3ad.doubleclick.net
-   adb_list.winhelp     : 1435575.fls.doubleclick.net
+/etc/init.d/adblock query example.www.doubleclick.net
+::: distinct results for domain 'example.www.doubleclick.net'
+ no match
+::: distinct results for domain 'www.doubleclick.net'
+ adb_list.sysctl      : www.doubleclick.net
+::: distinct results for domain 'doubleclick.net'
+ adb_list.adaway      : ad-g.doubleclick.net
+ adb_list.securemecca : 1168945.fls.doubleclick.net
+ adb_list.sysctl      : 1435575.fls.doubleclick.net
+ adb_list.whocares    : 3ad.doubleclick.net
 
 The query function checks against the submitted (sub-)domain and recurses automatically to the upper top level domain(s).
-For every domain it returns the overall count plus a distinct list of active blocklists with the first relevant result.
-In the example above you have to whitelist "www.doubleclick.net" to free the submitted domain.
+For every domain it returns the overall count plus a distinct list of active block lists with the first relevant result.
+In the example above whitelist "www.doubleclick.net" to free the submitted domain.
 
-**example to identify blocked domains during web browsing, i.e. for whitelisting:** -

-1. the easy way ...
-enable the network analysis builtins in chrome or firefox to identify domains
-which are redirected to the adblock null-ip (default 198.18.0.1), add these domains to your whitelist
-
-2. a bit harder ...
-enable 'Log queries' in the dnsmasq configuration (via LuCI Network => DHCP/DNS),
-ssh to your router and start tracing with 'logread -f -e "dnsmasq" -e "198.18.0.1"'
-switch to your client, access the relevant site and check all domains
-that are blocked/listed in logread, add these domains to your whitelist
-
-=> finally restart the adblock service (/etc/init.d/adblock restart) in both variants
-
- -**example to add a new blocklist source:** +**add a new block list source:**

 1. the easy way ...
 example: https://easylist-downloads.adblockplus.org/rolist+easylist.txt
@@ -251,14 +242,8 @@ the output result should be a sequential list with one domain/host per line - no
 If your awk one-liner works quite well, add a new source section in adblock config and test your new source
 
-## Background -This adblock package is a dns/dnsmasq based adblock solution. -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 'Benchmark Test' subnet (198.18.0.1 / ::ffff:c612:0001) by default (in AP mode the local router ip address will be used). Furthermore all ad/abuse queries will be filtered by ip(6)tables and redirected to two uhttpd instances, separated for ads delivered on port 80 and on port 443 (in PREROUTING chain) or rejected (in FORWARD or OUTPUT chain). In 'AP mode' only the uhttpd related rules in PREROUTING chain are enabled. - -All iptables and uhttpd related adblock additions are non-destructive, no hard-coded changes in 'firewall.user', 'uhttpd' config or any other system 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. - ## Support -Please join the adblock discussion in this [openwrt forum thread](https://forum.openwrt.org/viewtopic.php?id=59803) or contact me by mail +Please join the adblock discussion in this [forum thread](https://forum.lede-project.org/t/adblock-2-x-support-thread/507) or contact me by mail ## Removal * stop all adblock related services with _/etc/init.d/adblock stop_ diff --git a/net/adblock/files/adblock-helper.sh b/net/adblock/files/adblock-helper.sh deleted file mode 100644 index 8be9941..0000000 --- a/net/adblock/files/adblock-helper.sh +++ /dev/null @@ -1,753 +0,0 @@ -#!/bin/sh -# function library used by adblock-update.sh -# written by Dirk Brenken (dev@brenken.org) - -# set initial defaults -# -LC_ALL=C -PATH="/usr/sbin:/usr/bin:/sbin:/bin" -adb_scriptver="1.5.4" -adb_mincfgver="2.5" -adb_hotplugif="" -adb_lanif="lan" -adb_nullport="65534" -adb_nullportssl="65535" -adb_nullipv4="198.18.0.1" -adb_nullipv6="::ffff:c612:0001" -adb_whitelist="/etc/adblock/adblock.whitelist" -adb_whitelist_rset="\$1 ~/^([A-Za-z0-9_-]+\.){1,}[A-Za-z]+/{print tolower(\"^\"\$1\"\\\|[.]\"\$1)}" -adb_dnsdir="/tmp/dnsmasq.d" -adb_dnshidedir="${adb_dnsdir}/.adb_hidden" -adb_dnsprefix="adb_list" -adb_count=0 -adb_minspace=12000 -adb_forcedns=1 -adb_fetchttl=5 -adb_restricted=0 -adb_loglevel=1 -adb_uci="$(which uci)" - -# f_envload: load adblock environment -# -f_envload() -{ - # source in system function library - # - if [ -r "/lib/functions.sh" ] - then - . "/lib/functions.sh" - else - rc=-10 - f_log "system function library not found, please check your installation" - f_exit - fi - - # source in system network library - # - if [ -r "/lib/functions/network.sh" ] - then - . "/lib/functions/network.sh" - else - rc=-10 - f_log "system network library not found, please check your installation" - f_exit - fi - - # uci function to parse global section by callback - # - config_cb() - { - local type="${1}" - if [ "${type}" = "adblock" ] - then - option_cb() - { - local option="${1}" - local value="${2}" - eval "${option}=\"${value}\"" - } - else - reset_cb - fi - } - - # uci function to parse 'service' and 'source' sections - # - parse_config() - { - local value opt section="${1}" options="enabled adb_dir adb_src adb_src_rset adb_src_cat" - if [ "${section}" != "backup" ] - then - eval "adb_sources=\"${adb_sources} ${section}\"" - fi - for opt in ${options} - do - config_get value "${section}" "${opt}" - if [ -n "${value}" ] - then - eval "${opt}_${section}=\"${value}\"" - fi - done - } - - # load adblock config and start parsing functions - # - config_load adblock - config_foreach parse_config service - config_foreach parse_config source - - # get network basics - # - network_get_ipaddr adb_ipv4 "${adb_lanif}" - network_get_ipaddr6 adb_ipv6 "${adb_lanif}" - network_get_device adb_landev "${adb_lanif}" - network_find_wan adb_wanif4 - network_find_wan6 adb_wanif6 -} - -# f_envcheck: check/set environment prerequisites -# -f_envcheck() -{ - local check - - # check 'enabled' & 'version' config options - # - if [ -z "${adb_enabled}" ] || [ -z "${adb_cfgver}" ] || [ "${adb_cfgver%%.*}" != "${adb_mincfgver%%.*}" ] - then - rc=-1 - f_log "outdated adblock config (${adb_cfgver} vs. ${adb_mincfgver}), please run '/etc/init.d/adblock cfgup' to update your configuration" - f_exit - elif [ "${adb_cfgver#*.}" != "${adb_mincfgver#*.}" ] - then - outdated_ok="true" - fi - if [ "${adb_enabled}" != "1" ] - then - rc=-10 - f_log "adblock is currently disabled, please set adb_enabled to '1' to use this service" - f_exit - fi - - # check opkg availability - # - adb_pkglist="$(opkg list-installed)" - if [ $(($?)) -eq 255 ] - then - rc=-10 - f_log "adblock installation finished successfully, 'opkg' currently locked by package installer" - f_exit - elif [ -z "${adb_pkglist}" ] - then - rc=-1 - f_log "empty 'opkg' package list, please check your installation" - f_exit - fi - adb_sysver="$(printf "${adb_pkglist}" | grep "^base-files -")" - adb_sysver="${adb_sysver##*-}" - - # get lan ip addresses - # - if [ -z "${adb_ipv4}" ] && [ -z "${adb_ipv6}" ] - then - rc=-1 - f_log "no valid IPv4/IPv6 configuration found (${adb_lanif}), please set 'adb_lanif' manually" - f_exit - fi - - # check logical update interfaces (with default route) - # - if [ -z "${adb_wanif4}" ] && [ -z "${adb_wanif6}" ] - then - adb_wanif4="${adb_lanif}" - fi - - # check AP mode - # - if [ "${adb_wanif4}" = "${adb_lanif}" ] || [ "${adb_wanif6}" = "${adb_lanif}" ] - then - adb_nullipv4="${adb_ipv4}" - adb_nullipv6="${adb_ipv6}" - if [ -n "$(${adb_uci} -q get uhttpd.main.listen_http | grep -o ":80$")" ] || - [ -n "$(${adb_uci} -q get uhttpd.main.listen_https | grep -o ":443$")" ] - then - rc=-1 - f_log "AP mode detected, please set local LuCI instance to ports <> 80/443" - f_exit - else - apmode_ok="true" - fi - else - apmode_ok="false" - check="$(${adb_uci} -q get bcp38.@bcp38[0].enabled)" - if [ "${check}" = "1" ] - then - if [ -n "$(${adb_uci} -q get bcp38.@bcp38[0].match | grep -Fo "${adb_nullipv4%.*}")" ] - then - rc=-1 - f_log "please whitelist '${adb_nullipv4}' in your bcp38 configuration to use adblock" - f_exit - fi - fi - fi - - # check general package dependencies - # - f_depend "busybox -" - f_depend "uci -" - f_depend "uhttpd -" - f_depend "iptables -" - f_depend "kmod-ipt-nat -" - f_depend "firewall -" - f_depend "dnsmasq*" - - # check ipv6 related package dependencies - # - if [ -n "${adb_wanif6}" ] - then - f_depend "ip6tables -" "true" - if [ "${package_ok}" = "false" ] - then - f_log "package 'ip6tables' not found, IPv6 support will be disabled" - unset adb_wanif6 - else - f_depend "kmod-ipt-nat6 -" "true" - if [ "${package_ok}" = "false" ] - then - f_log "package 'kmod-ipt-nat6' not found, IPv6 support will be disabled" - unset adb_wanif6 - fi - fi - fi - - # check uclient-fetch/wget dependencies - # - f_depend "uclient-fetch -" "true" - if [ "${package_ok}" = "true" ] - then - f_depend "libustream-polarssl -" "true" - if [ "${package_ok}" = "false" ] - then - f_depend "libustream-\(mbedtls\|openssl\|cyassl\) -" "true" - if [ "${package_ok}" = "true" ] - then - adb_fetch="$(which uclient-fetch)" - fetch_parm="-q" - response_parm= - fi - fi - fi - if [ -z "${adb_fetch}" ] - then - f_depend "wget -" "true" - if [ "${package_ok}" = "true" ] - then - adb_fetch="$(which /usr/bin/wget* | head -1)" - fetch_parm="--no-config --quiet --tries=1 --no-cache --no-cookies --max-redirect=0 --dns-timeout=${adb_fetchttl} --connect-timeout=${adb_fetchttl} --read-timeout=${adb_fetchttl}" - response_parm="--spider --server-response" - fi - if [ -z "${adb_fetch}" ] - then - rc=-1 - f_log "please install 'uclient-fetch' or 'wget' with ssl support to use adblock" - f_exit - fi - fi - - # check ca-certificate package and set fetch parm accordingly - # - f_depend "ca-certificates -" "true" - if [ "${package_ok}" = "false" ] - then - fetch_parm="${fetch_parm} --no-check-certificate" - fi - - # start normal processing/logging - # - f_log "domain adblock processing started (${adb_scriptver}, ${adb_sysver}, $(/bin/date "+%d.%m.%Y %H:%M:%S"))" - - # log partially outdated config - # - if [ "${outdated_ok}" = "true" ] - then - f_log "partially outdated adblock config (${adb_mincfgver} vs. ${adb_cfgver}), please run '/etc/init.d/adblock cfgup' to update your configuration" - fi - - # log ap mode - # - if [ "${apmode_ok}" = "true" ] - then - f_log "AP mode enabled" - fi - - # set/log restricted mode - # - if [ "${adb_restricted}" = "1" ] - then - adb_uci="$(which true)" - f_log "Restricted mode enabled" - fi - - # check dns hideout directory - # - if [ -d "${adb_dnshidedir}" ] - then - mv_done="$(find "${adb_dnshidedir}" -maxdepth 1 -type f -name "${adb_dnsprefix}*" -print -exec mv -f "{}" "${adb_dnsdir}" \;)" - else - mkdir -p -m 660 "${adb_dnshidedir}" - fi - - # check adblock temp directory - # - adb_tmpfile="$(mktemp -tu)" - adb_tmpdir="$(mktemp -p /tmp -d)" - if [ -n "${adb_tmpdir}" ] && [ -d "${adb_tmpdir}" ] - then - f_space "${adb_tmpdir}" - if [ "${space_ok}" = "false" ] - then - if [ $((av_space)) -le 2000 ] - then - rc=105 - f_log "not enough free space in '${adb_tmpdir}' (avail. ${av_space} kb)" - f_exit - else - f_log "not enough free space to handle all block list sources at once in '${adb_tmpdir}' (avail. ${av_space} kb)" - fi - fi - else - rc=110 - f_log "temp directory not found" - f_exit - fi - - # check memory - # - 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 - 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 - mem_ok="true" - fi - - # check backup configuration - # - if [ "${enabled_backup}" = "1" ] && [ -d "${adb_dir_backup}" ] - then - f_space "${adb_dir_backup}" - if [ "${space_ok}" = "false" ] - then - f_log "not enough free space in '${adb_dir_backup}'(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 - - # set dnsmasq defaults - # - if [ -n "${adb_wanif4}" ] && [ -n "${adb_wanif6}" ] - then - 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}'" - else - adb_dnsformat="awk -v ipv6="${adb_nullipv6}" '{print \"address=/\"\$0\"/\"ipv6}'" - fi - - # check volatile iptables configuration - # - if [ -n "${adb_wanif4}" ] - then - if [ "${apmode_ok}" = "false" ] - then - if [ "${adb_forcedns}" = "1" ] && [ -n "${adb_landev}" ] - then - f_firewall "IPv4" "nat" "prerouting_rule" "adb-dns" "1" "dns" "-p udp --dport 53 -j DNAT --to-destination ${adb_ipv4}:53" - f_firewall "IPv4" "nat" "prerouting_rule" "adb-dns" "2" "dns" "-p tcp --dport 53 -j DNAT --to-destination ${adb_ipv4}:53" - fi - f_firewall "IPv4" "filter" "forwarding_rule" "adb-fwd" "1" "fwd" "-p tcp -j REJECT --reject-with tcp-reset" - f_firewall "IPv4" "filter" "forwarding_rule" "adb-fwd" "2" "fwd" "-j REJECT --reject-with icmp-host-unreachable" - f_firewall "IPv4" "filter" "output_rule" "adb-out" "1" "out" "-p tcp -j REJECT --reject-with tcp-reset" - f_firewall "IPv4" "filter" "output_rule" "adb-out" "2" "out" "-j REJECT --reject-with icmp-host-unreachable" - fi - f_firewall "IPv4" "nat" "prerouting_rule" "adb-nat" "1" "nat" "-p tcp --dport 80 -j DNAT --to-destination ${adb_ipv4}:${adb_nullport}" - f_firewall "IPv4" "nat" "prerouting_rule" "adb-nat" "2" "nat" "-p tcp --dport 443 -j DNAT --to-destination ${adb_ipv4}:${adb_nullportssl}" - fi - if [ -n "${adb_wanif6}" ] - then - if [ "${apmode_ok}" = "false" ] - then - if [ "${adb_forcedns}" = "1" ] && [ -n "${adb_landev}" ] - then - f_firewall "IPv6" "nat" "PREROUTING" "adb-dns" "1" "dns" "-p udp --dport 53 -j DNAT --to-destination [${adb_ipv6}]:53" - f_firewall "IPv6" "nat" "PREROUTING" "adb-dns" "2" "dns" "-p tcp --dport 53 -j DNAT --to-destination [${adb_ipv6}]:53" - fi - f_firewall "IPv6" "filter" "forwarding_rule" "adb-fwd" "1" "fwd" "-p tcp -j REJECT --reject-with tcp-reset" - f_firewall "IPv6" "filter" "forwarding_rule" "adb-fwd" "2" "fwd" "-j REJECT --reject-with icmp6-addr-unreachable" - f_firewall "IPv6" "filter" "output_rule" "adb-out" "1" "out" "-p tcp -j REJECT --reject-with tcp-reset" - f_firewall "IPv6" "filter" "output_rule" "adb-out" "2" "out" "-j REJECT --reject-with icmp6-addr-unreachable" - fi - f_firewall "IPv6" "nat" "PREROUTING" "adb-nat" "1" "nat" "-p tcp --dport 80 -j DNAT --to-destination [${adb_ipv6}]:${adb_nullport}" - f_firewall "IPv6" "nat" "PREROUTING" "adb-nat" "2" "nat" "-p tcp --dport 443 -j DNAT --to-destination [${adb_ipv6}]:${adb_nullportssl}" - fi - if [ "${firewall_ok}" = "true" ] - then - f_log "created volatile firewall rulesets" - fi - - # check volatile uhttpd instance configuration - # - if [ -n "${adb_wanif4}" ] && [ -n "${adb_wanif6}" ] - then - f_uhttpd "adbIPv46_80" "1" "-p ${adb_ipv4}:${adb_nullport} -p [${adb_ipv6}]:${adb_nullport}" - f_uhttpd "adbIPv46_443" "0" "-p ${adb_ipv4}:${adb_nullportssl} -p [${adb_ipv6}]:${adb_nullportssl}" - elif [ -n "${adb_wanif4}" ] - then - f_uhttpd "adbIPv4_80" "1" "-p ${adb_ipv4}:${adb_nullport}" - f_uhttpd "adbIPv4_443" "0" "-p ${adb_ipv4}:${adb_nullportssl}" - else - f_uhttpd "adbIPv6_80" "1" "-p [${adb_ipv6}]:${adb_nullport}" - f_uhttpd "adbIPv6_443" "0" "-p [${adb_ipv6}]:${adb_nullportssl}" - fi - if [ "${uhttpd_ok}" = "true" ] - then - f_log "created volatile uhttpd instances" - fi - - # check whitelist entries - # - if [ -s "${adb_whitelist}" ] - then - awk "${adb_whitelist_rset}" "${adb_whitelist}" > "${adb_tmpdir}/tmp.whitelist" - fi - - # remove temporary package list - # - unset adb_pkglist -} - -# f_depend: check package dependencies -# -f_depend() -{ - local check - local package="${1}" - local check_only="${2}" - package_ok="true" - - check="$(printf "${adb_pkglist}" | grep "^${package}")" - if [ "${check_only}" = "true" ] && [ -z "${check}" ] - then - package_ok="false" - elif [ -z "${check}" ] - then - rc=-1 - f_log "package '${package}' not found" - f_exit - fi -} - -# f_firewall: set iptables rules for ipv4/ipv6 -# -f_firewall() -{ - local ipt="iptables" - local nullip="${adb_nullipv4}" - local proto="${1}" - local table="${2}" - local chsrc="${3}" - local chain="${4}" - local chpos="${5}" - local notes="adb-${6}" - local rules="${7}" - - # select appropriate iptables executable for IPv6 - # - if [ "${proto}" = "IPv6" ] - then - ipt="ip6tables" - nullip="${adb_nullipv6}" - fi - - # check whether iptables chain already exist - # - rc="$("${ipt}" -w -t "${table}" -nL "${chain}" >/dev/null 2>&1; printf ${?})" - if [ $((rc)) -ne 0 ] - then - "${ipt}" -w -t "${table}" -N "${chain}" - "${ipt}" -w -t "${table}" -A "${chain}" -m comment --comment "${notes}" -j RETURN - if [ "${chain}" = "adb-dns" ] - then - "${ipt}" -w -t "${table}" -A "${chsrc}" -i "${adb_landev}+" -m comment --comment "${notes}" -j "${chain}" - else - "${ipt}" -w -t "${table}" -A "${chsrc}" -d "${nullip}" -m comment --comment "${notes}" -j "${chain}" - fi - rc=${?} - if [ $((rc)) -ne 0 ] - then - f_log "failed to initialize volatile ${proto} firewall chain '${chain}'" - f_exit - fi - fi - - # check whether iptables rule already exist - # - rc="$("${ipt}" -w -t "${table}" -C "${chain}" -m comment --comment "${notes}" ${rules} >/dev/null 2>&1; printf ${?})" - if [ $((rc)) -ne 0 ] - then - "${ipt}" -w -t "${table}" -I "${chain}" "${chpos}" -m comment --comment "${notes}" ${rules} - rc=${?} - if [ $((rc)) -eq 0 ] - then - firewall_ok="true" - else - f_log "failed to initialize volatile ${proto} firewall rule '${notes}'" - f_exit - fi - fi -} - -# f_uhttpd: start uhttpd instances -# -f_uhttpd() -{ - local check - local realm="${1}" - local timeout="${2}" - local ports="${3}" - - check="$(pgrep -f "uhttpd -h /www/adblock -N 25 -T ${timeout} -r ${realm}")" - if [ -z "${check}" ] - then - uhttpd -h "/www/adblock" -N 25 -T "${timeout}" -r "${realm}" -k 0 -t 0 -R -D -S -E "/index.html" ${ports} - rc=${?} - if [ $((rc)) -eq 0 ] - then - uhttpd_ok="true" - else - f_log "failed to initialize volatile uhttpd instance (${realm})" - f_exit - fi - fi -} - -# f_space: check mount points/space requirements -# -f_space() -{ - local mp="${1}" - space_ok="true" - - if [ -d "${mp}" ] - then - av_space="$(df "${mp}" | tail -n1 | awk '{printf $4}')" - if [ $((av_space)) -lt $((adb_minspace)) ] - then - space_ok="false" - fi - fi -} - -# f_cntconfig: calculate counters in config -# -f_cntconfig() -{ - local src_name - local count=0 - - for src_name in $(ls -ASr "${adb_dnsdir}/${adb_dnsprefix}"*) - do - count="$(wc -l < "${src_name}")" - src_name="${src_name##*.}" - if [ -n "${adb_wanif4}" ] && [ -n "${adb_wanif6}" ] - then - count=$((count / 2)) - fi - "${adb_uci}" -q set "adblock.${src_name}.adb_src_count=${count}" - adb_count=$((adb_count + count)) - done - "${adb_uci}" -q set "adblock.global.adb_overall_count=${adb_count}" -} - -# f_rmconfig: remove volatile config entries -# -f_rmconfig() -{ - local opt - local options="adb_src_timestamp adb_src_count" - local section="${1}" - - "${adb_uci}" -q delete "adblock.global.adb_overall_count" - "${adb_uci}" -q delete "adblock.global.adb_dnstoggle" - "${adb_uci}" -q delete "adblock.global.adb_percentage" - "${adb_uci}" -q delete "adblock.global.adb_lastrun" - for opt in ${options} - do - "${adb_uci}" -q delete "adblock.${section}.${opt}" - done -} - -# f_rmdns: remove dns block lists and backups -# -f_rmdns() -{ - rm_dns="$(find "${adb_dnsdir}" -maxdepth 1 -type f -name "${adb_dnsprefix}*" -print -exec rm -f "{}" \;)" - if [ -n "${rm_dns}" ] - then - rm -rf "${adb_dnshidedir}" - if [ "${enabled_backup}" = "1" ] && [ -d "${adb_dir_backup}" ] - then - rm -f "${adb_dir_backup}/${adb_dnsprefix}"*.gz - fi - /etc/init.d/dnsmasq restart - fi -} - -# f_rmuhttpd: remove uhttpd instances -# -f_rmuhttpd() -{ - rm_uhttpd="$(pgrep -f "uhttpd -h /www/adblock")" - if [ -n "${rm_uhttpd}" ] - then - for pid in ${rm_uhttpd} - do - kill -9 "${pid}" - done - fi -} - -# f_rmfirewall: remove firewall rulsets -# -f_rmfirewall() -{ - rm_fw="$(iptables -w -t nat -vnL | grep -Fo "adb-")" - if [ -n "${rm_fw}" ] - then - iptables-save | grep -Fv -- "adb-" | iptables-restore - if [ -n "$(lsmod | grep -Fo "ip6table_nat")" ] - then - ip6tables-save | grep -Fv -- "adb-" | ip6tables-restore - fi - fi -} - -# f_log: log messages to stdout and syslog -# -f_log() -{ - local log_parm - local log_msg="${1}" - local class="info " - - if [ $((rc)) -gt 0 ] - then - class="error" - elif [ $((rc)) -lt 0 ] - then - class="warn " - fi - if [ -t 1 ] - then - log_parm="-s" - fi - if [ -n "${log_msg}" ] && ([ $((adb_loglevel)) -gt 0 ] || [ "${class}" != "info " ]) - then - logger ${log_parm} -t "adblock[${adb_pid}] ${class}" "${log_msg}" 2>&1 - fi -} - -# f_statistics: adblock runtime statistics -f_statistics() -{ - local ipv4_blk=0 ipv4_all=0 ipv4_pct=0 - local ipv6_blk=0 ipv6_all=0 ipv6_pct=0 - - if [ -n "${adb_wanif4}" ] - then - ipv4_blk="$(iptables -t nat -vxnL adb-nat | awk '$3 ~ /^DNAT$/ {sum += $1} END {printf sum}')" - ipv4_all="$(iptables -t nat -vxnL PREROUTING | awk '$3 ~ /^(delegate_prerouting|prerouting_rule)$/ {sum += $1} END {printf sum}')" - if [ $((ipv4_all)) -gt 0 ] && [ $((ipv4_blk)) -gt 0 ] && [ $((ipv4_all)) -gt $((ipv4_blk)) ] - then - ipv4_pct="$(printf "${ipv4_blk}" | awk -v all="${ipv4_all}" '{printf( "%5.2f\n",$1/all*100)}')" - elif [ $((ipv4_all)) -lt $((ipv4_blk)) ] - then - iptables -t nat -Z adb-nat - fi - fi - if [ -n "${adb_wanif6}" ] - then - ipv6_blk="$(ip6tables -t nat -vxnL adb-nat | awk '$3 ~ /^DNAT$/ {sum += $1} END {printf sum}')" - ipv6_all="$(ip6tables -t nat -vxnL PREROUTING | awk '$3 ~ /^(adb-nat|DNAT)$/ {sum += $1} END {printf sum}')" - if [ $((ipv6_all)) -gt 0 ] && [ $((ipv6_blk)) -gt 0 ] && [ $((ipv6_all)) -gt $((ipv6_blk)) ] - then - ipv6_pct="$(printf "${ipv6_blk}" | awk -v all="${ipv6_all}" '{printf( "%5.2f\n",$1/all*100)}')" - elif [ $((ipv6_all)) -lt $((ipv6_blk)) ] - then - ip6tables -t nat -Z adb-nat - fi - fi - "${adb_uci}" -q set "adblock.global.adb_percentage=${ipv4_pct}%/${ipv6_pct}%" - f_log "firewall statistics (IPv4/IPv6): ${ipv4_pct}%/${ipv6_pct}% of all packets in prerouting chain are ad related & blocked" -} - -# f_exit: delete temporary files, generate statistics and exit -# -f_exit() -{ - local lastrun="$(date "+%d.%m.%Y %H:%M:%S")" - - if [ "${adb_restricted}" = "1" ] - then - adb_uci="$(which true)" - fi - - # delete temp files & directories - # - rm -f "${adb_tmpfile}" - rm -rf "${adb_tmpdir}" - - # tidy up on error - # - if [ $((rc)) -lt 0 ] || [ $((rc)) -gt 0 ] - then - f_rmdns - f_rmuhttpd - f_rmfirewall - config_foreach f_rmconfig source - if [ $((rc)) -eq -1 ] - then - "${adb_uci}" -q set "adblock.global.adb_lastrun=${lastrun} => runtime error, please check the log!" - fi - fi - - # final log message and iptables statistics - # - if [ $((rc)) -eq 0 ] - then - f_statistics - "${adb_uci}" -q set "adblock.global.adb_lastrun=${lastrun}" - f_log "domain adblock processing finished successfully (${adb_scriptver}, ${adb_sysver}, ${lastrun})" - elif [ $((rc)) -gt 0 ] - then - f_log "domain adblock processing failed (${adb_scriptver}, ${adb_sysver}, ${lastrun})" - else - rc=0 - fi - if [ -n "$("${adb_uci}" -q changes adblock)" ] - then - "${adb_uci}" -q commit "adblock" - fi - rm -f "${adb_pidfile}" - exit ${rc} -} diff --git a/net/adblock/files/adblock-update.sh b/net/adblock/files/adblock-update.sh deleted file mode 100755 index 661081d..0000000 --- a/net/adblock/files/adblock-update.sh +++ /dev/null @@ -1,278 +0,0 @@ -#!/bin/sh -# dns based ad/abuse domain blocking script -# written by Dirk Brenken (dev@brenken.org) - -# This is free software, licensed under the GNU General Public License v3. -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# prepare environment -# -adb_pid="${$}" -adb_pidfile="/var/run/adblock.pid" -adb_scriptdir="${0%/*}" - -if [ -r "${adb_pidfile}" ] -then - rc=255 - logger -s -t "adblock[${adb_pid}] error" "adblock service already running ($(cat ${adb_pidfile}))" - exit ${rc} -else - printf "${adb_pid}" > "${adb_pidfile}" - if [ -r "${adb_scriptdir}/adblock-helper.sh" ] - then - . "${adb_scriptdir}/adblock-helper.sh" - f_envload - else - rc=254 - logger -s -t "adblock[${adb_pid}] error" "adblock function library not found" - rm -f "${adb_pidfile}" - exit ${rc} - fi -fi - -# call trap function on error signals (HUP, INT, QUIT, BUS, SEGV, TERM) -# -trap "rc=250; f_log 'error signal received/trapped'; f_exit" 1 2 3 10 11 15 - -# check environment -# -f_envcheck - -# main loop for all block list sources -# -f_log "use '${adb_fetch}' for list downloads" - -for src_name in ${adb_sources} -do - # check disabled sources - # - eval "enabled=\"\${enabled_${src_name}}\"" - if [ "${enabled}" = "0" ] - then - if [ -r "${adb_dnsdir}/${adb_dnsprefix}.${src_name}" ] - then - rm -f "${adb_dnsdir}/${adb_dnsprefix}.${src_name}" - if [ "${backup_ok}" = "true" ] && [ -r "${adb_dir_backup}/${adb_dnsprefix}.${src_name}.gz" ] - then - rm -f "${adb_dir_backup}/${adb_dnsprefix}.${src_name}.gz" - fi - rm_done="true" - f_log "=> disabled source '${src_name}' removed" - fi - "${adb_uci}" -q delete "adblock.${src_name}.adb_src_count" - "${adb_uci}" -q delete "adblock.${src_name}.adb_src_timestamp" - continue - fi - - f_log "=> processing source '${src_name}'" - eval "url=\"\${adb_src_${src_name}}\"" - eval "src_rset=\"\${adb_src_rset_${src_name}}\"" - eval "list_time=\"\${CONFIG_${src_name}_adb_src_timestamp}\"" - adb_dnsfile="${adb_dnsdir}/${adb_dnsprefix}.${src_name}" - - # check 'url' and 'src_rset' values - # - if [ -z "${url}" ] || [ -z "${src_rset}" ] - then - "${adb_uci}" -q set "adblock.${src_name}.adb_src_timestamp=broken config" - f_log " broken source configuration, skipped" - continue - fi - - # download only block list with newer/updated timestamp - # - if [ "${src_name}" = "blacklist" ] - then - url_time="$(date -r "${url}")" - elif [ -n "${response_parm}" ] - then - url_time="$(${adb_fetch} ${fetch_parm} ${response_parm} "${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" - fi - if [ -z "${list_time}" ] || [ "${list_time}" != "${url_time}" ] || [ ! -r "${adb_dnsfile}" ] ||\ - ([ "${backup_ok}" = "true" ] && [ ! -r "${adb_dir_backup}/${adb_dnsprefix}.${src_name}.gz" ]) - then - if [ "${src_name}" = "blacklist" ] - then - tmp_domains="$(strings -n 1 "${url}")" - elif [ "${src_name}" = "shalla" ] - then - shalla_archive="${adb_tmpdir}/shallalist.tar.gz" - shalla_file="${adb_tmpdir}/shallalist.txt" - "${adb_fetch}" ${fetch_parm} -O "${shalla_archive}" "${url}" - rc=${?} - if [ $((rc)) -eq 0 ] - then - > "${shalla_file}" - for category in ${adb_src_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 - tmp_domains="$(strings -n 1 "${shalla_file}")" - rm -rf "${adb_tmpdir}/BL" - rm -f "${shalla_archive}" - rm -f "${shalla_file}" - fi - else - tmp_domains="$(${adb_fetch} ${fetch_parm} -O- "${url}" | strings -n 1)" - fi - rc=${?} - else - f_log " source doesn't change, skipped" - continue - fi - - # check download result and prepare domain output, backup/restore if needed - # - if [ $((rc)) -eq 0 ] && [ -n "${tmp_domains}" ] - then - count="$(printf "%s\n" "${tmp_domains}" | awk "${src_rset}" | tee "${adb_tmpfile}" | wc -l)" - "${adb_uci}" -q set "adblock.${src_name}.adb_src_timestamp=${url_time}" - if [ "${backup_ok}" = "true" ] - then - gzip -cf "${adb_tmpfile}" > "${adb_dir_backup}/${adb_dnsprefix}.${src_name}.gz" - fi - f_log " source download finished (${count} entries)" - unset tmp_domains - elif [ $((rc)) -eq 0 ] && [ -z "${tmp_domains}" ] - then - if [ "${backup_ok}" = "true" ] && [ -r "${adb_dir_backup}/${adb_dnsprefix}.${src_name}.gz" ] - then - gunzip -cf "${adb_dir_backup}/${adb_dnsprefix}.${src_name}.gz" > "${adb_tmpfile}" - count="$(wc -l < "${adb_tmpfile}")" - "${adb_uci}" -q set "adblock.${src_name}.adb_src_timestamp=list restored" - f_log " empty source download, restored (${count} entries)" - else - if [ -r "${adb_dnsdir}/${adb_dnsprefix}.${src_name}" ] - then - rm -f "${adb_dnsdir}/${adb_dnsprefix}.${src_name}" - rm_done="true" - fi - "${adb_uci}" -q delete "adblock.${src_name}.adb_src_count" - "${adb_uci}" -q set "adblock.${src_name}.adb_src_timestamp=empty download" - f_log " empty source download, skipped" - continue - fi - else - rc=0 - if [ "${backup_ok}" = "true" ] && [ -r "${adb_dir_backup}/${adb_dnsprefix}.${src_name}.gz" ] - then - gunzip -cf "${adb_dir_backup}/${adb_dnsprefix}.${src_name}.gz" > "${adb_tmpfile}" - count="$(wc -l < "${adb_tmpfile}")" - "${adb_uci}" -q set "adblock.${src_name}.adb_src_timestamp=list restored" - f_log " source download failed, restored (${count} entries)" - else - if [ -r "${adb_dnsdir}/${adb_dnsprefix}.${src_name}" ] - then - rm -f "${adb_dnsdir}/${adb_dnsprefix}.${src_name}" - rm_done="true" - fi - "${adb_uci}" -q delete "adblock.${src_name}.adb_src_count" - "${adb_uci}" -q set "adblock.${src_name}.adb_src_timestamp=download failed" - f_log " source download failed, skipped" - continue - fi - fi - - # remove whitelist domains, sort domains and make them unique, - # rewrite ad/abuse domain information to separate dnsmasq files - # - if [ $((count)) -gt 0 ] && [ -n "${adb_tmpfile}" ] - then - if [ -s "${adb_tmpdir}/tmp.whitelist" ] - then - grep -vf "${adb_tmpdir}/tmp.whitelist" "${adb_tmpfile}" | sort -u | eval "${adb_dnsformat}" > "${adb_dnsfile}" - else - sort -u "${adb_tmpfile}" | eval "${adb_dnsformat}" > "${adb_dnsfile}" - fi - rc=${?} - if [ $((rc)) -eq 0 ] - then - rev_done="true" - f_log " domain merging finished" - else - rc=0 - rm -f "${adb_dnsfile}" - if [ "${backup_ok}" = "true" ] && [ -r "${adb_dir_backup}/${adb_dnsprefix}.${src_name}.gz" ] - then - rm -f "${adb_dir_backup}/${adb_dnsprefix}.${src_name}.gz" - fi - "${adb_uci}" -q delete "adblock.${src_name}.adb_src_count" - "${adb_uci}" -q set "adblock.${src_name}.adb_src_timestamp=domain merging failed" - f_log " domain merging failed, skipped" - continue - fi - else - rm -f "${adb_dnsfile}" - if [ "${backup_ok}" = "true" ] && [ -r "${adb_dir_backup}/${adb_dnsprefix}.${src_name}.gz" ] - then - rm -f "${adb_dir_backup}/${adb_dnsprefix}.${src_name}.gz" - fi - "${adb_uci}" -q delete "adblock.${src_name}.adb_src_count" - "${adb_uci}" -q set "adblock.${src_name}.adb_src_timestamp=empty domain input" - f_log " empty domain input, skipped" - continue - fi -done - -# overall sort, make block list entries unique -# -if [ "${rev_done}" = "true" ] && [ "${mem_ok}" = "true" ] -then - f_log "remove duplicates in separate block lists" - for list in $(ls -ASr "${adb_dnsdir}/${adb_dnsprefix}"*) - do - list="${list/*./}" - if [ -s "${adb_tmpdir}/blocklist.overall" ] - then - sort "${adb_tmpdir}/blocklist.overall" "${adb_tmpdir}/blocklist.overall" "${adb_dnsdir}/${adb_dnsprefix}.${list}" | uniq -u > "${adb_tmpdir}/tmp.blocklist" - cat "${adb_tmpdir}/tmp.blocklist" > "${adb_dnsdir}/${adb_dnsprefix}.${list}" - fi - cat "${adb_dnsdir}/${adb_dnsprefix}.${list}" >> "${adb_tmpdir}/blocklist.overall" - done -fi - -# restart & check dnsmasq with generated set of block lists -# -if [ "${rev_done}" = "true" ] || [ "${rm_done}" = "true" ] || [ -n "${mv_done}" ] -then - "${adb_uci}" -q delete "adblock.global.adb_dnstoggle" - /etc/init.d/dnsmasq restart - sleep 1 - check="$(pgrep -f "dnsmasq")" - if [ -n "${check}" ] - then - f_cntconfig - f_log "block lists with overall ${adb_count} domains loaded" - else - f_rmdns - sleep 1 - check="$(pgrep -f "dnsmasq")" - if [ -n "${check}" ] - then - f_log "dnsmasq restart without block lists succeeded, please check your configuration" - else - f_log "dnsmasq restart without block lists failed, please check your configuration" - fi - rc=100 - f_exit - fi -else - f_cntconfig - f_log "block lists with overall ${adb_count} domains are still valid, no update required" -fi - -# remove temporary files and exit -# -f_exit diff --git a/net/adblock/files/adblock.conf b/net/adblock/files/adblock.conf index cc86b50..0e4fd02 100644 --- a/net/adblock/files/adblock.conf +++ b/net/adblock/files/adblock.conf @@ -3,14 +3,16 @@ config adblock 'global' option adb_enabled '1' - option adb_cfgver '2.5' + option adb_debug '0' + option adb_forcesrt '0' + option adb_forcedns '0' + option adb_iface 'wan' + option adb_triggerdelay '2' option adb_whitelist '/etc/adblock/adblock.whitelist' option adb_whitelist_rset '\$1 ~/^([A-Za-z0-9_-]+\.){1,}[A-Za-z]+/{print tolower(\"^\"\$1\"\\\|[.]\"\$1)}' - option adb_forcedns '1' - -config service 'backup' - option enabled '0' - option adb_dir '/mnt' + option adb_backup '0' + option adb_backupdir '/mnt' + option adb_rtfile '/tmp/adb_runtime.json' config source 'adaway' option enabled '1' @@ -18,6 +20,12 @@ config source 'adaway' option adb_src_rset '\$0 ~/^127\.0\.0\.1[ \t]+([A-Za-z0-9_-]+\.){1,}[A-Za-z]+/{print tolower(\$2)}' option adb_src_desc 'focus on mobile ads, infrequent updates, approx. 400 entries' +config source 'adguard' + option enabled '0' + option adb_src 'https://raw.githubusercontent.com/AdguardTeam/AdguardDNS/master/Filters/filter.txt' + option adb_src_rset '{FS=\"[|^]\"} \$0 ~/^\|\|([A-Za-z0-9_-]+\.){1,}[A-Za-z]+\^$/{print tolower(\$3)}' + option adb_src_desc 'combined adguard dns filter list, approx. 12.000 entries' + config source 'blacklist' option enabled '0' option adb_src '/etc/adblock/adblock.blacklist' @@ -32,7 +40,7 @@ config source 'disconnect' config source 'dshield' option enabled '0' - option adb_src 'http://www.dshield.org/feeds/suspiciousdomains_Low.txt' + option adb_src 'https://www.dshield.org/feeds/suspiciousdomains_Low.txt' option adb_src_rset '\$1 ~/^([A-Za-z0-9_-]+\.){1,}[A-Za-z]+/{print tolower(\$1)}' option adb_src_desc 'generic blocklist, daily updates, approx. 4.500 entries' @@ -78,13 +86,25 @@ config source 'ransomware' option adb_src_rset '\$1 ~/^([A-Za-z0-9_-]+\.){1,}[A-Za-z]+/{print tolower(\$1)}' option adb_src_desc 'focus on ransomware, numerous updates on the same day, approx. 130 entries' -config source 'rolist' +config source 'reg_cn' + option enabled '0' + option adb_src 'https://easylist-downloads.adblockplus.org/easylistchina+easylist.txt' + option adb_src_rset '{FS=\"[|^]\"} \$0 ~/^\|\|([A-Za-z0-9_-]+\.){1,}[A-Za-z]+\^$/{print tolower(\$3)}' + option adb_src_desc 'focus on chinese ads, daily updates, approx. 1.600 entries' + +config source 'reg_pl' + option enabled '0' + option adb_src 'http://adblocklist.org/adblock-pxf-polish.txt' + option adb_src_rset '{FS=\"[|^]\"} \$0 ~/^\|\|([A-Za-z0-9_-]+\.){1,}[A-Za-z]+\^$/{print tolower(\$3)}' + option adb_src_desc 'focus on polish ads, daily updates, approx. 50 entries' + +config source 'reg_ro' option enabled '0' option adb_src 'https://easylist-downloads.adblockplus.org/rolist+easylist.txt' option adb_src_rset '{FS=\"[|^]\"} \$0 ~/^\|\|([A-Za-z0-9_-]+\.){1,}[A-Za-z]+\^$/{print tolower(\$3)}' option adb_src_desc 'focus on romanian ads plus generic easylist additions, weekly updates, approx. 600 entries' -config source 'ruadlist' +config source 'reg_ru' option enabled '0' option adb_src 'https://easylist-downloads.adblockplus.org/ruadlist+easylist.txt' option adb_src_rset '{FS=\"[|^]\"} \$0 ~/^\|\|([A-Za-z0-9_-]+\.){1,}[A-Za-z]+\^$/{print tolower(\$3)}' diff --git a/net/adblock/files/adblock.hotplug b/net/adblock/files/adblock.hotplug deleted file mode 100644 index ee48bb0..0000000 --- a/net/adblock/files/adblock.hotplug +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -# - -adb_pid="${$}" -adb_helper="/usr/bin/adblock-helper.sh" -adb_pidfile="/var/run/adblock.pid" -adb_enabled="$(/etc/init.d/adblock enabled; echo $?)" - -if [ "${adb_enabled}" = "1" ] || [ -f "${adb_pidfile}" ] || [ "${ACTION}" != "ifup" ] -then - exit 0 -fi - -. "${adb_helper}" -f_envload - -if [ "${INTERFACE}" = "${adb_wanif4}" ] || [ "${INTERFACE}" = "${adb_wanif6}" ] -then - if [ -z "${adb_hotplugif}" ] || [ "${INTERFACE}" = "${adb_hotplugif}" ] - then - /etc/init.d/adblock start - f_log "adblock service started due to '${ACTION}' of '${INTERFACE}' interface" - fi -fi diff --git a/net/adblock/files/adblock.init b/net/adblock/files/adblock.init index 5cd8672..ee94aa8 100755 --- a/net/adblock/files/adblock.init +++ b/net/adblock/files/adblock.init @@ -1,173 +1,82 @@ #!/bin/sh /etc/rc.common # -START=90 -EXTRA_COMMANDS="toggle stats cfgup envchk query" -EXTRA_HELP=" toggle Toggle adblock 'on' or 'off' - stats Update adblock statistics - cfgup Update adblock configuration file - envchk Check/Set adblock environment - query Query active blocklists for specific domain" +START=50 +USE_PROCD=1 -adb_debug=0 -adb_pid="${$}" -adb_script="/usr/bin/adblock-update.sh" -adb_helper="/usr/bin/adblock-helper.sh" -adb_pidfile="/var/run/adblock.pid" -bg_parm="&" +EXTRA_COMMANDS="suspend resume query status" +EXTRA_HELP=" suspend Suspend adblock processing + resume Resume adblock processing + query Query active blocklists for specific domains + status Print runtime information" -if [ $((adb_debug)) -eq 0 ] -then - exec 2>/dev/null -fi - -if [ -r "${adb_pidfile}" ] -then - logger -s -t "adblock[${adb_pid}] error" "adblock service already running ($(cat ${adb_pidfile}))" 2>&1 - exit 255 -fi - -. "${adb_helper}" -f_envload - -if [ "${adb_restricted}" = "1" ] -then - adb_uci="$(which true)" -fi +adb_init="/etc/init.d/adblock" +adb_script="/usr/bin/adblock.sh" boot() { - return 0 + adb_boot=1 + ubus -t 30 wait_for network.interface 2>/dev/null + rc_procd start_service } -start() +start_service() { - if [ -t 1 ] + if [ $("${adb_init}" enabled; printf ${?}) -eq 0 ] then - unset bg_parm + if [ -n "${adb_boot}" ] + then + return 0 + fi + procd_open_instance "adblock" + procd_set_param command "${adb_script}" "${@}" + procd_set_param stdout 1 + procd_set_param stderr 1 + procd_close_instance fi - eval "${adb_script}" ${bg_parm} - return 0 -} - -restart() -{ - stop - start } -reload() +stop_service() { - reload="true" - stop - start + rc_procd "${adb_script}" stop + rc_procd start_service } -stop() +restart() { - f_rmdns - f_rmuhttpd - config_foreach f_rmconfig source - if [ -z "${reload}" ] - then - f_rmfirewall - fi - if [ -n "${rm_dns}" ] || [ -n "${rm_uhttpd}" ] || [ -n "${rm_fw}" ] || [ -n "$(${adb_uci} -q changes adblock)" ] - then - "${adb_uci}" -q commit adblock - f_log "all adblock related services stopped" - fi - return 0 + rc_procd start_service restart } -toggle() +suspend() { - if [ -d "${adb_dnshidedir}" ] - then - list_dns="$(find "${adb_dnsdir}" -maxdepth 1 -type f -name "${adb_dnsprefix}*" -print)" - list_dnshide="$(find "${adb_dnshidedir}" -maxdepth 1 -type f -name "${adb_dnsprefix}*" -print)" - if [ -n "${list_dns}" ] - then - source="${adb_dnsdir}/${adb_dnsprefix}" - target="${adb_dnshidedir}" - pos="off" - elif [ -n "${list_dnshide}" ] - then - source="${adb_dnshidedir}/${adb_dnsprefix}" - target="${adb_dnsdir}" - pos="on" - fi - if [ -n "${list_dns}" ] || [ -n "${list_dnshide}" ] - then - mv -f "${source}"* "${target}" - /etc/init.d/dnsmasq restart - "${adb_uci}" -q set "adblock.global.adb_dnstoggle=${pos}" - "${adb_uci}" -q commit "adblock" - f_log "adblock toggle switched '${pos}'" - fi - fi - return 0 + rc_procd "${adb_script}" suspend } -stats() +resume() { - f_statistics - "${adb_uci}" -q commit "adblock" - return 0 + rc_procd "${adb_script}" resume } -cfgup() +query() { - stop - cp -pf "/etc/adblock/adblock.conf.default" "/etc/config/adblock" - rc=$? - if [ $((rc)) -eq 0 ] - then - f_log "default adblock configuration applied, please check the settings in '/etc/config/adblock'" - else - f_log "default adblock configuration not found, please re-install the package via 'opkg install adblock --force-maintainer'" - fi - return 0 + rc_procd "${adb_script}" query "${1}" } -query() +status() { - domain="${1}" - tld="${domain#*.}" - list_dns="$(find "${adb_dnsdir}" -maxdepth 1 -type f -name "${adb_dnsprefix}*" -print)" - if [ -z "${list_dns}" ] - then - f_log "no active blocklists found, please start adblock first" - elif [ -z "${domain}" ] || [ "${domain}" = "${tld}" ] - then - f_log "invalid domain query input, please submit a specific (sub-)domain, i.e. 'www.abc.xyz'" - else - while [ "${domain}" != "${tld}" ] - do - search="${domain//./\.}" - result="$(grep -Hm 1 "[/\.]${search}/" "${adb_dnsdir}/adb_list"* | awk -F ':|/' '{print " "$4"\t: "$6}')" - count="$(grep -hc "[/\.]${search}/" "${adb_dnsdir}/adb_list"* | awk '{sum += $1} END {printf sum}')" - printf "%s\n" "=> distinct results for domain '${domain}' (overall ${count})" - if [ -z "${result}" ] - then - printf "%s\n" " no matches in active blocklists" - else - printf "%s\n" "${result}" - fi - domain="${tld}" - tld="${domain#*.}" - done - fi - return 0 + rc_procd "${adb_script}" status } -envchk() +service_triggers() { - adb_loglevel=0 - f_envcheck - rm -f "${adb_tmpfile}" - rm -rf "${adb_tmpdir}" - adb_loglevel=1 - f_log "adblock environment check finished successfully" - return 0 + local iface="$(uci -q get adblock.global.adb_iface)" + local delay="$(uci -q get adblock.global.adb_triggerdelay)" + + PROCD_RELOAD_DELAY=$((${delay:=2} * 1000)) + for name in ${iface} + do + procd_add_interface_trigger "interface.*.up" "${name}" "${adb_init}" start + done + PROCD_RELOAD_DELAY=1000 + procd_add_config_trigger "config.change" "adblock" "${adb_init}" start } diff --git a/net/adblock/files/adblock.sh b/net/adblock/files/adblock.sh new file mode 100755 index 0000000..03f86b0 --- /dev/null +++ b/net/adblock/files/adblock.sh @@ -0,0 +1,586 @@ +#!/bin/sh +# dns based ad/abuse domain blocking +# written by Dirk Brenken (dev@brenken.org) + +# This is free software, licensed under the GNU General Public License v3. +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# set initial defaults +# +LC_ALL=C +PATH="/usr/sbin:/usr/bin:/sbin:/bin" +adb_ver="2.6.2" +adb_sysver="$(ubus -S call system board | jsonfilter -e '@.release.description')" +adb_enabled=1 +adb_debug=0 +adb_forcesrt=0 +adb_forcedns=0 +adb_backup=0 +adb_backupdir="/mnt" +adb_whitelist="/etc/adblock/adblock.whitelist" +adb_whitelist_rset="\$1 ~/^([A-Za-z0-9_-]+\.){1,}[A-Za-z]+/{print tolower(\"^\"\$1\"\\\|[.]\"\$1)}" +adb_fetch="/usr/bin/wget" +adb_fetchparm="--no-config --quiet --no-cache --no-cookies --max-redirect=0 --timeout=10 --no-check-certificate -O" +adb_dnslist="dnsmasq unbound" +adb_dnsprefix="adb_list" +adb_rtfile="/tmp/adb_runtime.json" + +# f_envload: load adblock environment +# +f_envload() +{ + local dns_up cnt=0 + + # source in system library + # + if [ -r "/lib/functions.sh" ] && [ -r "/usr/share/libubox/jshn.sh" ] + then + . "/lib/functions.sh" + . "/usr/share/libubox/jshn.sh" + else + f_log "error" "system libraries not found" + fi + + # set dns backend environment + # + while [ ${cnt} -le 20 ] + do + for dns in ${adb_dnslist} + do + dns_up="$(ubus -S call service list "{\"name\":\"${dns}\"}" | jsonfilter -l1 -e "@.${dns}.instances.*.running")" + if [ "${dns_up}" = "true" ] + then + case "${dns}" in + dnsmasq) + adb_dns="dnsmasq" + adb_dnsdir="/tmp/dnsmasq.d" + adb_dnshidedir="${adb_dnsdir}/.adb_hidden" + adb_dnsformat="awk '{print \"local=/\"\$0\"/\"}'" + break 2 + ;; + unbound) + adb_dns="unbound" + adb_dnsdir="/var/lib/unbound" + adb_dnshidedir="${adb_dnsdir}/.adb_hidden" + adb_dnsformat="awk '{print \"local-zone: \042\"\$0\"\042 static\"}'" + break 2 + ;; + esac + fi + done + sleep 1 + cnt=$((cnt+1)) + done + if [ -z "${adb_dns}" ] + then + f_log "error" "no active/supported DNS backend found" + fi + + # parse global section by callback + # + config_cb() + { + local type="${1}" + if [ "${type}" = "adblock" ] + then + option_cb() + { + local option="${1}" + local value="${2}" + eval "${option}=\"${value}\"" + } + else + reset_cb + fi + } + + # parse 'source' section + # + parse_config() + { + local value opt section="${1}" options="enabled adb_src adb_src_rset adb_src_cat" + eval "adb_sources=\"${adb_sources} ${section}\"" + for opt in ${options} + do + config_get value "${section}" "${opt}" + if [ -n "${value}" ] + then + eval "${opt}_${section}=\"${value}\"" + fi + done + } + + # load adblock config + # + config_load adblock + config_foreach parse_config source + + # force dns to local resolver + # + if [ ${adb_forcedns} -eq 1 ] && [ -z "$(uci -q get firewall.adblock_dns)" ] + then + uci -q set firewall.adblock_dns="redirect" + uci -q set firewall.adblock_dns.name="Adblock DNS" + uci -q set firewall.adblock_dns.src="lan" + uci -q set firewall.adblock_dns.proto="tcp udp" + uci -q set firewall.adblock_dns.src_dport="53" + uci -q set firewall.adblock_dns.dest_port="53" + uci -q set firewall.adblock_dns.target="DNAT" + elif [ ${adb_forcedns} -eq 0 ] && [ -n "$(uci -q get firewall.adblock_dns)" ] + then + uci -q delete firewall.adblock_dns + fi + if [ -n "$(uci -q changes firewall)" ] + then + uci -q commit firewall + if [ $(/etc/init.d/firewall enabled; printf ${?}) -eq 0 ] + then + /etc/init.d/firewall reload >/dev/null 2>&1 + fi + fi +} + +# f_envcheck: check/set environment prerequisites +# +f_envcheck() +{ + local ssl_lib + + # check 'enabled' option + # + if [ ${adb_enabled} -ne 1 ] + then + if [ -n "$(ls -dA "${adb_dnsdir}/${adb_dnsprefix}"* 2>/dev/null)" ] + then + f_rmdns + f_dnsrestart + fi + f_log "info " "adblock is currently disabled, please set adb_enabled to '1' to use this service" + exit 0 + fi + + # check fetch utility + # + ssl_lib="-" + if [ -x "${adb_fetch}" ] + then + if [ "$(readlink -fn "${adb_fetch}")" = "/usr/bin/wget-nossl" ] + then + adb_fetchparm="--no-config --quiet --no-cache --no-cookies --max-redirect=0 --timeout=10 -O" + elif [ "$(readlink -fn "/bin/wget")" = "/bin/busybox" ] || [ "$(readlink -fn "${adb_fetch}")" = "/bin/busybox" ] + then + adb_fetch="/bin/busybox" + adb_fetchparm="-q -O" + else + ssl_lib="built-in" + fi + fi + if [ ! -x "${adb_fetch}" ] && [ "$(readlink -fn "/bin/wget")" = "/bin/uclient-fetch" ] + then + adb_fetch="/bin/uclient-fetch" + if [ -f "/lib/libustream-ssl.so" ] + then + adb_fetchparm="-q --timeout=10 --no-check-certificate -O" + ssl_lib="libustream-ssl" + else + adb_fetchparm="-q --timeout=10 -O" + fi + fi + if [ ! -x "${adb_fetch}" ] || [ -z "${adb_fetch}" ] || [ -z "${adb_fetchparm}" ] + then + f_log "error" "no download utility found, please install 'uclient-fetch' with 'libustream-mbedtls' or the full 'wget' package" + fi + adb_fetchinfo="${adb_fetch##*/} (${ssl_lib})" + + # create dns hideout directory + # + if [ ! -d "${adb_dnshidedir}" ] + then + mkdir -p -m 660 "${adb_dnshidedir}" + chown -R "${adb_dns}":"${adb_dns}" "${adb_dnshidedir}" 2>/dev/null + else + rm -f "${adb_dnshidedir}/${adb_dnsprefix}"* + fi + + # create adblock temp file/directory + # + adb_tmpload="$(mktemp -tu)" + adb_tmpfile="$(mktemp -tu)" + adb_tmpdir="$(mktemp -p /tmp -d)" + + # prepare whitelist entries + # + if [ -s "${adb_whitelist}" ] + then + awk "${adb_whitelist_rset}" "${adb_whitelist}" > "${adb_tmpdir}/tmp.whitelist" + fi +} + +# f_rmtemp: remove temporary files & directories +# +f_rmtemp() +{ + if [ -d "${adb_tmpdir}" ] + then + rm -f "${adb_tmpload}" + rm -f "${adb_tmpfile}" + rm -rf "${adb_tmpdir}" + fi +} + +# f_rmdns: remove dns related files & directories +# +f_rmdns() +{ + if [ -n "${adb_dns}" ] + then + rm -f "${adb_dnsdir}/${adb_dnsprefix}"* + rm -f "${adb_backupdir}/${adb_dnsprefix}"*.gz + rm -rf "${adb_dnshidedir}" + > "${adb_rtfile}" + fi +} + +# f_dnsrestart: restart the dns backend +# +f_dnsrestart() +{ + local cnt=0 + + "/etc/init.d/${adb_dns}" restart >/dev/null 2>&1 + while [ ${cnt} -le 10 ] + do + adb_dnsup="$(ubus -S call service list "{\"name\":\"${adb_dns}\"}" | jsonfilter -l1 -e "@.${adb_dns}.instances.*.running")" + if [ "${adb_dnsup}" = "true" ] + then + break + fi + cnt=$((cnt+1)) + sleep 1 + done +} + +# f_list: backup/restore/remove block lists +# +f_list() +{ + local mode="${1}" in_rc="${adb_rc}" cnt=0 + + case "${mode}" in + backup) + cnt="$(wc -l < "${adb_tmpfile}")" + if [ ${adb_backup} -eq 1 ] && [ -d "${adb_backupdir}" ] + then + gzip -cf "${adb_tmpfile}" > "${adb_backupdir}/${adb_dnsprefix}.${src_name}.gz" + adb_rc=${?} + fi + ;; + restore) + if [ ${adb_backup} -eq 1 ] && [ -d "${adb_backupdir}" ] + then + rm -f "${adb_dnsdir}/${adb_dnsprefix}.${src_name}" + if [ -f "${adb_backupdir}/${adb_dnsprefix}.${src_name}.gz" ] + then + gunzip -cf "${adb_backupdir}/${adb_dnsprefix}.${src_name}.gz" > "${adb_tmpfile}" + adb_rc=${?} + fi + fi + ;; + remove) + rm -f "${adb_dnsdir}/${adb_dnsprefix}.${src_name}" + if [ -d "${adb_backupdir}" ] + then + rm -f "${adb_backupdir}/${adb_dnsprefix}.${src_name}.gz" + fi + adb_rc=${?} + ;; + esac + f_log "debug" "name: ${src_name}, mode: ${mode}, count: ${cnt}, in_rc: ${in_rc}, out_rc: ${adb_rc}" +} + +# f_switch: suspend/resume adblock processing +# +f_switch() +{ + if [ -d "${adb_dnshidedir}" ] + then + local source target status mode="${1}" + local dns_active="$(find "${adb_dnsdir}" -maxdepth 1 -type f -name "${adb_dnsprefix}*" -print)" + local dns_passive="$(find "${adb_dnshidedir}" -maxdepth 1 -type f -name "${adb_dnsprefix}*" -print)" + + if [ -n "${dns_active}" ] && [ "${mode}" = "suspend" ] + then + source="${adb_dnsdir}/${adb_dnsprefix}" + target="${adb_dnshidedir}" + status="suspended" + elif [ -n "${dns_passive}" ] && [ "${mode}" = "resume" ] + then + source="${adb_dnshidedir}/${adb_dnsprefix}" + target="${adb_dnsdir}" + status="resumed" + fi + if [ -n "${status}" ] + then + mv -f "${source}"* "${target}" + f_dnsrestart + f_log "info " "adblock processing ${status}" + fi + fi +} + +# f_query: query block lists for certain (sub-)domains +# +f_query() +{ + local search result cnt + local domain="${1}" + local tld="${domain#*.}" + local dns_active="$(find "${adb_dnsdir}" -maxdepth 1 -type f -name "${adb_dnsprefix}*" -print)" + + if [ -z "${dns_active}" ] + then + printf "%s\n" "::: no active block lists found, please start / resume adblock first" + elif [ -z "${domain}" ] || [ "${domain}" = "${tld}" ] + then + printf "%s\n" "::: invalid domain input, please submit a specific (sub-)domain, e.g. 'www.abc.xyz'" + else + cd "${adb_dnsdir}" + while [ "${domain}" != "${tld}" ] + do + search="${domain//./\.}" + result="$(grep -Hm1 "[/\"\.]${search}[/\"]" "${adb_dnsprefix}"* | awk -F ':|=|/|\"' '{printf(" %-20s : %s\n",$1,$4)}')" + printf "%s\n" "::: distinct results for domain '${domain}'" + printf "%s\n" "${result:=" no match"}" + domain="${tld}" + tld="${domain#*.}" + done + fi +} + +# f_status: output runtime information +# +f_status() +{ + local key keylist value + + if [ -s "${adb_rtfile}" ] + then + local dns_active="$(find "${adb_dnsdir}" -maxdepth 1 -type f -name "${adb_dnsprefix}*" -print)" + local dns_passive="$(find "${adb_dnshidedir}" -maxdepth 1 -type f -name "${adb_dnsprefix}*" -print)" + + if [ -n "${dns_active}" ] + then + value="active" + elif [ -n "${dns_passive}" ] || [ -z "${dns_active}" ] + then + value="no domains blocked" + fi + printf "%s\n" "::: adblock runtime information" + printf " %-15s : %s\n" "status" "${value}" + json_load "$(cat "${adb_rtfile}" 2>/dev/null)" + json_select data + json_get_keys keylist + for key in ${keylist} + do + json_get_var value ${key} + printf " %-15s : %s\n" "${key}" "${value}" + done + fi +} + +# f_log: write to syslog, exit on error +# +f_log() +{ + local class="${1}" log_msg="${2}" + + if [ -n "${log_msg}" ] && ([ "${class}" != "debug" ] || [ ${adb_debug} -eq 1 ]) + then + logger -t "adblock-[${adb_ver}] ${class}" "${log_msg}" + if [ "${class}" = "error" ] + then + logger -t "adblock-[${adb_ver}] ${class}" "Please check 'https://github.com/openwrt/packages/blob/master/net/adblock/files/README.md' (${adb_sysver})" + f_rmtemp + if [ -n "$(ls -dA "${adb_dnsdir}/${adb_dnsprefix}"* 2>/dev/null)" ] + then + f_rmdns + f_dnsrestart + fi + exit 255 + fi + fi +} + +# main function for block list processing +# +f_main() +{ + local enabled url cnt sum_cnt=0 mem_total=0 + local src_name src_rset shalla_archive + mem_total="$(awk '$1 ~ /^MemTotal/ {printf $2}' "/proc/meminfo" 2>/dev/null)" + + f_log "info " "start adblock processing ..." + > "${adb_rtfile}" + for src_name in ${adb_sources} + do + eval "enabled=\"\${enabled_${src_name}}\"" + eval "url=\"\${adb_src_${src_name}}\"" + eval "src_rset=\"\${adb_src_rset_${src_name}}\"" + adb_dnsfile="${adb_tmpdir}/${adb_dnsprefix}.${src_name}" + > "${adb_tmpload}" + > "${adb_tmpfile}" + adb_rc=0 + + # basic pre-checks + # + if [ "${enabled}" != "1" ] || [ -z "${url}" ] || [ -z "${src_rset}" ] + then + f_list remove + continue + fi + + # download block list + # + f_log "debug" "name: ${src_name}, enabled: ${enabled}, backup: ${adb_backup}, dns: ${adb_dns}, fetch: ${adb_fetchinfo}, memory: ${mem_total}, force srt/dns: ${adb_forcesrt}/${adb_forcedns}" + if [ "${src_name}" = "blacklist" ] + then + cat "${url}" 2>/dev/null > "${adb_tmpload}" + adb_rc=${?} + elif [ "${src_name}" = "shalla" ] + then + shalla_archive="${adb_tmpdir}/shallalist.tar.gz" + "${adb_fetch}" ${adb_fetchparm} "${shalla_archive}" "${url}" 2>/dev/null + adb_rc=${?} + if [ ${adb_rc} -eq 0 ] + then + for category in ${adb_src_cat_shalla} + do + tar -xOzf "${shalla_archive}" BL/${category}/domains >> "${adb_tmpload}" + adb_rc=${?} + if [ ${adb_rc} -ne 0 ] + then + break + fi + done + fi + rm -f "${shalla_archive}" + rm -rf "${adb_tmpdir}/BL" + else + "${adb_fetch}" ${adb_fetchparm} "${adb_tmpload}" "${url}" 2>/dev/null + adb_rc=${?} + fi + + # check download result and prepare domain output (incl. tld compression, list backup & restore) + # + if [ ${adb_rc} -eq 0 ] && [ -s "${adb_tmpload}" ] + then + awk "${src_rset}" "${adb_tmpload}" 2>/dev/null > "${adb_tmpfile}" + if [ -s "${adb_tmpfile}" ] + then + awk -F "." '{for(f=NF;f > 1;f--) printf "%s.", $f;print $1}' "${adb_tmpfile}" 2>/dev/null | sort -u > "${adb_tmpload}" + awk '{if(NR==1){tld=$NF};while(getline){if($NF !~ tld"\\."){print tld;tld=$NF}}print tld}' "${adb_tmpload}" 2>/dev/null > "${adb_tmpfile}" + awk -F "." '{for(f=NF;f > 1;f--) printf "%s.", $f;print $1}' "${adb_tmpfile}" 2>/dev/null > "${adb_tmpload}" + mv -f "${adb_tmpload}" "${adb_tmpfile}" + f_list backup + else + f_list restore + fi + else + f_list restore + fi + + # remove whitelist domains, final list preparation + # + if [ ${adb_rc} -eq 0 ] && [ -s "${adb_tmpfile}" ] + then + if [ -s "${adb_tmpdir}/tmp.whitelist" ] + then + grep -vf "${adb_tmpdir}/tmp.whitelist" "${adb_tmpfile}" 2>/dev/null | eval "${adb_dnsformat}" > "${adb_dnsfile}" + else + cat "${adb_tmpfile}" 2>/dev/null | eval "${adb_dnsformat}" > "${adb_dnsfile}" + fi + adb_rc=${?} + if [ ${adb_rc} -ne 0 ] + then + f_list remove + fi + else + f_list remove + fi + done + + # overall sort + # + for src_name in $(ls -dASr "${adb_tmpdir}/${adb_dnsprefix}"* 2>/dev/null) + do + if [ ${mem_total} -ge 64000 ] || [ ${adb_forcesrt} -eq 1 ] + then + if [ -s "${adb_tmpdir}/blocklist.overall" ] + then + sort "${adb_tmpdir}/blocklist.overall" "${adb_tmpdir}/blocklist.overall" "${src_name}" | uniq -u > "${adb_tmpdir}/tmp.blocklist" + mv -f "${adb_tmpdir}/tmp.blocklist" "${src_name}" + fi + cat "${src_name}" >> "${adb_tmpdir}/blocklist.overall" + fi + cnt="$(wc -l < "${src_name}")" + sum_cnt=$((sum_cnt + cnt)) + done + + # restart the dns backend and export runtime information + # + mv -f "${adb_tmpdir}/${adb_dnsprefix}"* "${adb_dnsdir}" 2>/dev/null + chown "${adb_dns}":"${adb_dns}" "${adb_dnsdir}/${adb_dnsprefix}"* 2>/dev/null + f_rmtemp + f_dnsrestart + if [ "${adb_dnsup}" = "true" ] + then + json_init + json_add_object "data" + json_add_string "adblock_version" "${adb_ver}" + json_add_string "blocked_domains" "${sum_cnt}" + json_add_string "fetch_info" "${adb_fetchinfo}" + json_add_string "dns_backend" "${adb_dns}" + json_add_string "last_rundate" "$(/bin/date "+%d.%m.%Y %H:%M:%S")" + json_add_string "system" "${adb_sysver}" + json_close_object + json_dump > "${adb_rtfile}" + f_log "info " "block lists with overall ${sum_cnt} domains loaded successfully (${adb_sysver})" + else + f_log "error" "dns backend restart with active block lists failed" + fi +} + +# handle different adblock actions +# +f_envload +case "${1}" in + stop) + f_rmtemp + f_rmdns + f_dnsrestart + ;; + restart) + f_rmtemp + f_rmdns + f_envcheck + f_main + ;; + suspend) + f_switch suspend + ;; + resume) + f_switch resume + ;; + query) + f_query "${2}" + ;; + status) + f_status + ;; + *) + f_envcheck + f_main + ;; +esac +exit 0 diff --git a/net/adblock/files/www/adblock/index.html b/net/adblock/files/www/adblock/index.html deleted file mode 100644 index ff6c903..0000000 --- a/net/adblock/files/www/adblock/index.html +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/net/apache/Makefile b/net/apache/Makefile index 6d24fb4..d436bd3 100644 --- a/net/apache/Makefile +++ b/net/apache/Makefile @@ -8,15 +8,15 @@ include $(TOPDIR)/rules.mk PKG_NAME:=apache -PKG_VERSION:=2.2.31 -PKG_RELEASE:=2 +PKG_VERSION:=2.4.25 +PKG_RELEASE:=1 PKG_SOURCE_NAME:=httpd PKG_MAINTAINER:=Thomas Heil PKG_LICENSE:=Apache License PKG_SOURCE:=$(PKG_SOURCE_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=@APACHE/httpd/ -PKG_MD5SUM:=6c10e15835ab214464228a9beb7afba8 +PKG_MD5SUM:=2826f49619112ad5813c0be5afcc7ddb PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_NAME)-$(PKG_VERSION) @@ -40,7 +40,7 @@ endef define Package/apache $(call Package/apache/Default) - DEPENDS:=+libapr +libaprutil +libpcre +libopenssl +unixodbc + DEPENDS:=+libapr +libaprutil +libpcre +libopenssl +unixodbc endef define Package/apache/description @@ -90,6 +90,7 @@ endef TARGET_CFLAGS += $(FPIC) TARGET_CPPFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE +TARGET_LDFLAGS += -lpthread define Build/Configure $(call Build/Configure/Default, \ @@ -97,16 +98,22 @@ define Build/Configure --with-apr-util="$(STAGING_DIR)/usr/bin/apu-1-config" \ --with-pcre="$(STAGING_DIR)/usr/bin/pcre-config" \ --enable-http \ + --with-crypto \ + --with-sqlit3="$(STAGING_DIR)/usr" \ + --with-openssl="$(STAGING_DIR)/usr" \ --enable-ssl \ --enable-proxy \ --disable-disk-cache \ --enable-maintainer-mode \ + --with-mpm=prefork \ + --with-mpm=worker \ --enable-mime-magic \ --without-suexec-bin \ --sysconfdir=/etc/apache \ ap_cv_void_ptr_lt_long=no \ logfiledir="/var/log" \ runtimedir="/var/run" \ + EXTRA_LIBS="-ldl -lpthread -lcrypto -lrt -lssl" \ ) endef @@ -140,7 +147,8 @@ endef define Package/apache/install $(INSTALL_DIR) $(1)/usr/sbin # we don't need apxs on the router, it's just for building apache modules. - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{ab,apachectl,checkgid,dbmmanage,envvars,envvars-std,htcacheclean,htdbm,htdigest,htpasswd,httpd,httxt2dbm,logresolve,rotatelogs} $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{ab,dbmmanage,htdbm,htdigest,htpasswd,httxt2dbm,logresolve} $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{apachectl,checkgid,envvars,envvars-std,htcacheclean,httpd,rotatelogs} $(1)/usr/sbin/ $(INSTALL_DIR) $(1)/usr/lib $(CP) $(PKG_INSTALL_DIR)/usr/lib/httpd.exp $(1)/usr/lib/ $(INSTALL_DIR) $(1)/usr/share diff --git a/net/apache/patches/002-test_char_h.patch b/net/apache/patches/002-test_char_h.patch index e8ea3cd..ad07704 100644 --- a/net/apache/patches/002-test_char_h.patch +++ b/net/apache/patches/002-test_char_h.patch @@ -1,5 +1,7 @@ +Index: httpd-2.4.25/server/test_char.h +=================================================================== --- /dev/null -+++ b/server/test_char.h ++++ httpd-2.4.25/server/test_char.h @@ -0,0 +1,23 @@ +/* this file is automatically generated by gen_test_char, do not edit */ +#define T_ESCAPE_SHELL_CMD (1) @@ -24,3 +26,24 @@ + 54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54, + 54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54 +}; +Index: httpd-2.4.25/server/util.c +=================================================================== +--- httpd-2.4.25.orig/server/util.c ++++ httpd-2.4.25/server/util.c +@@ -96,6 +96,16 @@ + #undef APLOG_MODULE_INDEX + #define APLOG_MODULE_INDEX AP_CORE_MODULE_INDEX + ++#define T_ESCAPE_SHELL_CMD (0x01) ++#define T_ESCAPE_PATH_SEGMENT (0x02) ++#define T_OS_ESCAPE_PATH (0x04) ++#define T_HTTP_TOKEN_STOP (0x08) ++#define T_ESCAPE_LOGITEM (0x10) ++#define T_ESCAPE_FORENSIC (0x20) ++#define T_ESCAPE_URLENCODED (0x40) ++#define T_HTTP_CTRLS (0x80) ++#define T_VCHAR_OBSTEXT (0x100) ++ + /* + * Examine a field value (such as a media-/content-type) string and return + * it sans any parameters; e.g., strip off any ';charset=foo' and the like. diff --git a/net/apache/patches/003-logdir_fix.patch b/net/apache/patches/003-logdir_fix.patch index 635c65c..fd22410 100644 --- a/net/apache/patches/003-logdir_fix.patch +++ b/net/apache/patches/003-logdir_fix.patch @@ -1,6 +1,8 @@ ---- a/build/mkconfNW.awk -+++ b/build/mkconfNW.awk -@@ -24,7 +24,7 @@ BEGIN { +Index: httpd-2.4.25/build/mkconfNW.awk +=================================================================== +--- httpd-2.4.25.orig/build/mkconfNW.awk ++++ httpd-2.4.25/build/mkconfNW.awk +@@ -23,7 +23,7 @@ BEGIN { A["sysconfdir"] = "conf" A["iconsdir"] = "icons" A["manualdir"] = "manual" @@ -9,8 +11,10 @@ A["errordir"] = "error" A["proxycachedir"] = "proxy" ---- a/config.layout -+++ b/config.layout +Index: httpd-2.4.25/config.layout +=================================================================== +--- httpd-2.4.25.orig/config.layout ++++ httpd-2.4.25/config.layout @@ -28,8 +28,8 @@ cgidir: ${datadir}/cgi-bin includedir: ${prefix}/include diff --git a/net/apache/patches/004-pidfile_fix.patch b/net/apache/patches/004-pidfile_fix.patch index e9f0b6d..647f821 100644 --- a/net/apache/patches/004-pidfile_fix.patch +++ b/net/apache/patches/004-pidfile_fix.patch @@ -1,6 +1,8 @@ ---- a/include/scoreboard.h -+++ b/include/scoreboard.h -@@ -42,7 +42,7 @@ extern "C" { +Index: httpd-2.4.25/include/scoreboard.h +=================================================================== +--- httpd-2.4.25.orig/include/scoreboard.h ++++ httpd-2.4.25/include/scoreboard.h +@@ -40,7 +40,7 @@ extern "C" { /* Scoreboard file, if there is one */ #ifndef DEFAULT_SCOREBOARD @@ -8,4 +10,4 @@ +#define DEFAULT_SCOREBOARD "log/apache_runtime_status" #endif - /* Scoreboard info on a process is, for now, kept very brief --- + /* Scoreboard info on a process is, for now, kept very brief --- diff --git a/net/apache/patches/005-httpd_conf.patch b/net/apache/patches/005-httpd_conf.patch index 3bcbba4..04a73a9 100644 --- a/net/apache/patches/005-httpd_conf.patch +++ b/net/apache/patches/005-httpd_conf.patch @@ -1,14 +1,16 @@ ---- a/docs/conf/httpd.conf.in -+++ b/docs/conf/httpd.conf.in -@@ -52,7 +52,6 @@ Listen @@Port@@ +Index: httpd-2.4.25/docs/conf/httpd.conf.in +=================================================================== +--- httpd-2.4.25.orig/docs/conf/httpd.conf.in ++++ httpd-2.4.25/docs/conf/httpd.conf.in +@@ -63,7 +63,6 @@ Listen @@Port@@ # Example: # LoadModule foo_module modules/mod_foo.so # -@@LoadModule@@ - - -@@ -64,8 +63,8 @@ Listen @@Port@@ + + # +@@ -74,8 +73,8 @@ Listen @@Port@@ # It is usually good practice to create a dedicated user and group for # running httpd, as with most system services. # @@ -18,8 +20,8 @@ +Group nogroup - -@@ -192,7 +191,7 @@ ErrorLog "@rel_logfiledir@/error_log" + +@@ -188,7 +187,7 @@ ErrorLog "@rel_logfiledir@/error_log" # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. # @@ -28,7 +30,7 @@ # -@@ -337,7 +336,7 @@ DefaultType text/plain +@@ -330,7 +329,7 @@ LogLevel warn # contents of the file itself to determine its type. The MIMEMagicFile # directive tells the module where the hint definitions are located. # @@ -37,16 +39,16 @@ # # Customizable error responses come in three flavors: -@@ -366,7 +365,7 @@ DefaultType text/plain - # broken on your system. +@@ -360,7 +359,7 @@ LogLevel warn + # Defaults: EnableMMAP On, EnableSendfile Off # #EnableMMAP off --#EnableSendfile off +-#EnableSendfile on +EnableSendfile off # Supplemental configuration # -@@ -412,7 +411,7 @@ DefaultType text/plain +@@ -411,8 +410,8 @@ Include @rel_sysconfdir@/extra/proxy-htm # starting without SSL on platforms with no /dev/random equivalent # but a statically compiled-in mod_ssl. # @@ -58,3 +60,4 @@ +#SSLRandomSeed startup builtin +#SSLRandomSeed connect builtin +# + diff --git a/net/apache/patches/006-remove-ssl3.patch b/net/apache/patches/006-remove-ssl3.patch deleted file mode 100644 index c09654c..0000000 --- a/net/apache/patches/006-remove-ssl3.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/support/ab.c -+++ b/support/ab.c -@@ -2232,8 +2232,10 @@ int main(int argc, const char * const ar - } else if (strncasecmp(optarg, "SSL2", 4) == 0) { - meth = SSLv2_client_method(); - #endif -+#ifndef OPENSSL_NO_SSL3_METHOD - } else if (strncasecmp(optarg, "SSL3", 4) == 0) { - meth = SSLv3_client_method(); -+#endif - #ifdef HAVE_TLSV1_X - } else if (strncasecmp(optarg, "TLS1.1", 6) == 0) { - meth = TLSv1_1_client_method(); diff --git a/net/aria2/Makefile b/net/aria2/Makefile index 81acf83..a96d4b8 100644 --- a/net/aria2/Makefile +++ b/net/aria2/Makefile @@ -7,12 +7,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=aria2 -PKG_VERSION:=1.28.0 +PKG_VERSION:=1.30.0 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://github.com/aria2/aria2/releases/download/release-$(PKG_VERSION)/ -PKG_MD5SUM:=f649ab30f3b09d0c0ebb816ce0c0205d +PKG_MD5SUM:=8c22f569d3fb9e42c5fd9a95173b9b5f PKG_INSTALL:=1 PKG_MAINTAINER:=Imre Kaloz , Hsing-Wang Liao diff --git a/net/bcp38/Makefile b/net/bcp38/Makefile index 9ca1910..4677a29 100644 --- a/net/bcp38/Makefile +++ b/net/bcp38/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=bcp38 PKG_VERSION:=5 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_LICENCE:=GPL-3.0+ include $(INCLUDE_DIR)/package.mk @@ -23,7 +23,11 @@ define Package/bcp38 endef define Package/bcp38/description - bcp38 implements IETF BCP38 for home routers. See https://tools.ietf.org/html/bcp38. + bcp38 implements IETF BCP38 for home routers. + See https://tools.ietf.org/html/bcp38. + + This package provides BCP38 for IPv4 only - IPv6 uses source + specific default routes, so no firewall configuration is needed. endef define Package/bcp38/conffiles diff --git a/net/bcp38/files/bcp38.config b/net/bcp38/files/bcp38.config index 08e8e20..fc785eb 100644 --- a/net/bcp38/files/bcp38.config +++ b/net/bcp38/files/bcp38.config @@ -17,6 +17,10 @@ config bcp38 # There is a dhcp trigger to do this for the netmask of a # double natted connection needed +# You can only specify IPv4 addresses here - for IPv6, only source +# specific default routes will be installed, which achieves the same +# without needing any firewall routes. + # I will argue that this level of indirection doesn't scale # very well - see how to block china as an example # http://www.okean.com/china.txt diff --git a/net/bind/Config.in b/net/bind/Config.in index f0d4847..04d6bdc 100644 --- a/net/bind/Config.in +++ b/net/bind/Config.in @@ -2,7 +2,7 @@ if PACKAGE_bind-server config BIND_ENABLE_FILTER_AAAA bool - default n + default y prompt "Enable filtering of AAAA records returned to the client" help BIND 9 has an option to filter AAAA (IPv6 address) records diff --git a/net/bind/Makefile b/net/bind/Makefile index 959184a..a4a8b85 100644 --- a/net/bind/Makefile +++ b/net/bind/Makefile @@ -1,6 +1,6 @@ # # Copyright (C) 2006-2012 OpenWrt.org -# 2014-2016 Noah Meyerhans +# 2014-2017 Noah Meyerhans # # 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:=bind -PKG_VERSION:=9.10.4-P4 -PKG_RELEASE:=2 +PKG_VERSION:=9.10.4-P5 +PKG_RELEASE:=1 USERID:=bind=57:bind=57 PKG_MAINTAINER:=Noah Meyerhans @@ -20,7 +20,7 @@ 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:=e110904a1d54f83f01d4be8bcd842927 +PKG_MD5SUM:=c53a3e34e7aabb16820b036ae9afd3c9 PKG_FIXUP:=autoreconf PKG_REMOVE_FILES:=aclocal.m4 libtool.m4 diff --git a/net/bmon/Makefile b/net/bmon/Makefile index e39e24e..a8c08fb 100644 --- a/net/bmon/Makefile +++ b/net/bmon/Makefile @@ -1,5 +1,6 @@ # # Copyright (C) 2007-2014 OpenWrt.org +# Copyright (C) 2014-2016 Baptiste Jonglez # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,12 +9,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=bmon -PKG_VERSION:=3.9 +PKG_VERSION:=4.0 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/tgraf/bmon/releases/download/v$(PKG_VERSION)/ -PKG_MD5SUM:=a959371dc6f8eecdfe27c088447ec636 +PKG_MD5SUM:=02fdc312b8ceeb5786b28bf905f54328f414040ff42f45c83007f24b76cc9f7a PKG_MAINTAINER:=Baptiste Jonglez PKG_LICENSE:=MIT diff --git a/net/chrony/Makefile b/net/chrony/Makefile index db631fe..4e1cb12 100644 --- a/net/chrony/Makefile +++ b/net/chrony/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=chrony PKG_VERSION:=2.4.1 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://download.tuxfamily.org/chrony/ @@ -27,7 +27,7 @@ define Package/chrony SUBMENU:=Time Synchronization SECTION:=net CATEGORY:=Network - DEPENDS:=+libcap + DEPENDS:=+libcap +libpthread USERID:=chrony=323:chrony=323 TITLE:=A versatile NTP client and server URL:=http://chrony.tuxfamily.org/ @@ -53,7 +53,6 @@ CONFIGURE_ARGS+= \ --chronysockdir=/var/run/chrony \ --disable-readline \ --disable-rtc \ - --disable-asyncdns \ --with-user=chrony CONFIGURE_VARS+=CPPFLAGS=-DNDEBUG diff --git a/net/cifs-utils/Makefile b/net/cifs-utils/Makefile index ed2edd6..3d67e94 100644 --- a/net/cifs-utils/Makefile +++ b/net/cifs-utils/Makefile @@ -11,7 +11,7 @@ PKG_NAME:=cifs-utils PKG_VERSION:=6.4 PKG_RELEASE:=2 -PKG_SOURCE_URL:=http://ftp.samba.org/pub/linux-cifs/cifs-utils +PKG_SOURCE_URL:=https://download.samba.org/pub/linux-cifs/cifs-utils/ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_MD5SUM:=b7d75b67fd3987952896d27256c7293d diff --git a/net/clamav/Makefile b/net/clamav/Makefile deleted file mode 100644 index 3f3edab..0000000 --- a/net/clamav/Makefile +++ /dev/null @@ -1,120 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=clamav -PKG_VERSION:=0.98.7 -PKG_RELEASE:=1 - -PKG_LICENSE:=GPL-2.0 -PKG_MAINTAINER:=Marko Ratkaj - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://sourceforge.net/projects/clamav/files/clamav/$(PKG_VERSION)/ -PKG_MD5SUM:=157c601161da1c2d5a0e48ea1b49e067 - -PKG_BUILD_PARALLEL:=1 -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/uclibc++.mk -include $(INCLUDE_DIR)/package.mk - -define Package/clamav/Default - SECTION:=net - DEPENDS:=+libpthread +uclibcxx +zlib +libcurl +libopenssl - CATEGORY:=Network - SUBMENU:=Web Servers/Proxies - TITLE:=ClamAV - URL:=http://www.clamav.net/ -endef - -define Package/clamav - $(call Package/clamav/Default) -endef - -define Package/freshclam - $(call Package/clamav/Default) - DEPENDS+= +clamav - TITLE+=database updater -endef - -define Package/clamav/description - ClamAV is an open source antivirus engine for detecting trojans, - viruses, malware & other malicious threats. -endef - -define Package/freshclam/description - Database updater for ClamAV -endef - -define Package/clamav/conffiles -endef - -CONFIGURE_VARS += \ - INCLUDES="" \ - CXXFLAGS="$$$$CXXFLAGS -fno-rtti" \ - LIBS="-lpthread" \ - -define Build/Configure - $(call Build/Configure/Default, \ - --sysconfdir=/etc/clamav/ \ - --prefix=/usr/ \ - --exec-prefix=/usr/ \ - --disable-xml \ - --disable-bzip2 \ - --enable-ltdl-install \ - --with-user nobody \ - --with-group nogroup \ - ) -endef - -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install -endef - -define Package/clamav/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/clamd $(1)/usr/sbin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/clamav-config $(1)/usr/sbin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/clambc $(1)/usr/sbin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/clamconf $(1)/usr/sbin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/clamdscan $(1)/usr/sbin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/clamscan $(1)/usr/sbin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/sigtool $(1)/usr/sbin/ - - $(INSTALL_DIR) $(1)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/clamav.h $(1)/usr/include/ - - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib*/* $(1)/usr/lib/ - - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_CONF) ./files/clamav.config $(1)/etc/config/clamav - - $(INSTALL_DIR) $(1)/etc/init.d/ - $(INSTALL_BIN) ./files/clamav.init $(1)/etc/init.d/clamav - - $(INSTALL_DIR) $(1)/usr/share/clamav - $(CP) ./files/bytecode.cvd $(1)/usr/share/clamav/ -endef - -define Package/freshclam/install - $(INSTALL_DIR) $(1)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/freshclam $(1)/usr/sbin/ - - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_CONF) ./files/freshclam.config $(1)/etc/config/freshclam - - $(INSTALL_DIR) $(1)/etc/init.d/ - $(INSTALL_BIN) ./files/freshclam.init $(1)/etc/init.d/freshclam -endef - -$(eval $(call BuildPackage,clamav)) -$(eval $(call BuildPackage,freshclam)) diff --git a/net/clamav/files/bytecode.cvd b/net/clamav/files/bytecode.cvd deleted file mode 100644 index 07ff8ab..0000000 Binary files a/net/clamav/files/bytecode.cvd and /dev/null differ diff --git a/net/clamav/files/clamav.config b/net/clamav/files/clamav.config deleted file mode 100644 index 1543caa..0000000 --- a/net/clamav/files/clamav.config +++ /dev/null @@ -1,34 +0,0 @@ -config clamav 'clamav' - option clamd_config_file '/etc/clamav/clamd.conf' - option LogFile '/tmp/clamd.log' - option LogFileMaxSize '1M' - option LogTime 'no' - option LogVerbose 'no' - option ExtendedDetectionInfo 'no' - option OfficialDatabaseOnly 'no' - option StreamMinPort '1024' - option StreamMaxPort '2048' - option MaxThreads '10' - option ReadTimeout '30' - option CommandReadTimeout '5' - option MaxDirectoryRecursion '15' - option FollowDirectorySymlinks 'no' - option FollowFileSymlinks 'no' - option SelfCheck '600' - option DetectPUA 'yes' - option ScanPE 'yes' - option DisableCertCheck 'no' - option ScanELF 'yes' - option DetectBrokenExecutables 'no' - option ScanOLE2 'yes' - option ScanPDF 'yes' - option ScanSWF 'yes' - option ScanMail 'yes' - option ScanPartialMessages 'no' - option ScanArchive 'yes' - option ArchiveBlockEncrypted 'yes' - option MaxFileSize '10M' - option TemporaryDirectory '/tmp' - option LocalSocket '/var/run/clamav/clamd.sock' - option User 'nobody' - option ExitOnOOM 'yes' diff --git a/net/clamav/files/clamav.init b/net/clamav/files/clamav.init deleted file mode 100644 index b2a8950..0000000 --- a/net/clamav/files/clamav.init +++ /dev/null @@ -1,116 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2015 OpenWrt.org - -START=90 -STOP=10 - -USE_PROCD=1 -PROG=/usr/sbin/clamd -CLAMD_CONFIGFILE="/tmp/clamav/clamd.conf" - -validate_clamav_section() { - uci_validate_section clamav clamav "${1}" \ - 'clamd_config_file:string' \ - 'LogFile:string' \ - 'LogFileMaxSize:string' \ - 'LogVerbose:string' \ - 'ExtendedDetectionInfo:string' \ - 'LogTime:string' \ - 'OfficialDatabaseOnly:string' \ - 'StreamMinPort:uinteger' \ - 'StreamMaxPort:uinteger' \ - 'MaxThreads:uinteger' \ - 'ReadTimeout:uinteger' \ - 'CommandReadTimeout:uinteger' \ - 'MaxDirectoryRecursion:uinteger' \ - 'FollowDirectorySymlinks:string' \ - 'FollowFileSymlinks:string' \ - 'SelfCheck:uinteger' \ - 'DetectPUA:string' \ - 'ScanPE:string' \ - 'DisableCertCheck:string' \ - 'ScanELF:string' \ - 'DetectBrokenExecutables:string' \ - 'ScanOLE2:string' \ - 'ScanPDF:string' \ - 'ScanSWF:string' \ - 'ScanMail:string' \ - 'ScanPartialMessages:string' \ - 'ScanArchive:string' \ - 'TemporaryDirectory:string' \ - 'ArchiveBlockEncrypted:string' \ - 'MaxFileSize:string' \ - 'LocalSocket:string' \ - 'User:string' \ - 'ExitOnOOM:string' -} - -start_service() { - local clamd_config_file LogFile LogTime StreamMinPort \ - StreamMaxPort MaxThreads ReadTimeout CommandReadTimeout MaxDirectoryRecursion \ - FollowFileSymlinks FollowDirectorySymlinks SelfCheck DetectPUA ScanPE DisableCertCheck \ - ScanELF DetectBrokenExecutables ScanOLE2 ScanPDF ScanSWF ScanMail ScanPartialMessages \ - ScanArchive TemporaryDirectory ArchiveBlockEncrypted MaxFileSize LocalSocket User - - validate_clamav_section clamav || { - echo "validation failed" - return 1 - } - - mkdir -p /usr/share/clamav - mkdir -p /etc/clamav/ - mkdir -p /var/run/clamav/ - chmod a+rw /var/run/clamav - - mkdir -p $(dirname $CLAMD_CONFIGFILE) - ln -sf $clamd_config_file $CLAMD_CONFIGFILE - - echo "LogFile " $LogFile > $CLAMD_CONFIGFILE - echo "LogFileMaxSize " $LogFileMaxSize >> $CLAMD_CONFIGFILE - echo "LogVerbose " $LogVerbose >> $CLAMD_CONFIGFILE - echo "ExtendedDetectionInfo " $ExtendedDetectionInfo >> $CLAMD_CONFIGFILE - echo "LogTime " $LogTime >> $CLAMD_CONFIGFILE - echo "OfficialDatabaseOnly " $OfficialDatabaseOnly >> $CLAMD_CONFIGFILE - echo "StreamMinPort " $StreamMinPort >> $CLAMD_CONFIGFILE - echo "StreamMaxPort " $StreamMaxPort >> $CLAMD_CONFIGFILE - echo "MaxThreads " $MaxThreads >> $CLAMD_CONFIGFILE - echo "ReadTimeout " $ReadTimeout >> $CLAMD_CONFIGFILE - echo "CommandReadTimeout " $CommandReadTimeout >> $CLAMD_CONFIGFILE - echo "MaxDirectoryRecursion " $MaxDirectoryRecursion >> $CLAMD_CONFIGFILE - echo "FollowDirectorySymlinks " $FollowDirectorySymlinks >> $CLAMD_CONFIGFILE - echo "FollowFileSymlinks " $FollowFileSymlinks >> $CLAMD_CONFIGFILE - echo "SelfCheck " $SelfCheck >> $CLAMD_CONFIGFILE - echo "DetectPUA " $DetectPUA >> $CLAMD_CONFIGFILE - echo "ScanPE " $ScanPE >> $CLAMD_CONFIGFILE - echo "DisableCertCheck " $DisableCertCheck >> $CLAMD_CONFIGFILE - echo "ScanELF " $ScanELF >> $CLAMD_CONFIGFILE - echo "DetectBrokenExecutables " $DetectBrokenExecutables >> $CLAMD_CONFIGFILE - echo "ScanOLE2 " $ScanOLE2 >> $CLAMD_CONFIGFILE - echo "ScanPDF " $ScanPDF >> $CLAMD_CONFIGFILE - echo "ScanSWF " $ScanSWF >> $CLAMD_CONFIGFILE - echo "ScanMail " $ScanMail >> $CLAMD_CONFIGFILE - echo "ScanPartialMessages " $ScanPartialMessages >> $CLAMD_CONFIGFILE - echo "ScanArchive " $ScanArchive >> $CLAMD_CONFIGFILE - echo "TemporaryDirectory " $TemporaryDirectory >> $CLAMD_CONFIGFILE - echo "ArchiveBlockEncrypted " $ArchiveBlockEncrypted >> $CLAMD_CONFIGFILE - echo "MaxFileSize " $MaxFileSize >> $CLAMD_CONFIGFILE - echo "LocalSocket " $LocalSocket >> $CLAMD_CONFIGFILE - echo "User " $User >> $CLAMD_CONFIGFILE - echo "ExitOnOOM " $ExitOnOOM >> $CLAMD_CONFIGFILE - - procd_open_instance - procd_set_param command $PROG -c $CLAMD_CONFIGFILE - procd_set_param file $CLAMD_CONFIGFILE - procd_close_instance -} - -stop_service() -{ - service_stop ${PROG} -} - -service_triggers() -{ - procd_add_reload_trigger "clamav" - procd_add_validation validate_clamav_section -} diff --git a/net/clamav/files/freshclam.config b/net/clamav/files/freshclam.config deleted file mode 100644 index 827e8dd..0000000 --- a/net/clamav/files/freshclam.config +++ /dev/null @@ -1,7 +0,0 @@ -config freshclam 'freshclam' - option freshclam_config_file '/etc/clamav/freshclam.conf' - option UpdateLogFile '/tmp/freshclam.log' - option DatabaseMirror 'database.clamav.net' - option NotifyClamd '/etc/clamav/clamd.conf' - option DatabaseOwner 'root' - option CompressLocalDatabase 'yes' diff --git a/net/clamav/files/freshclam.init b/net/clamav/files/freshclam.init deleted file mode 100644 index 37b2767..0000000 --- a/net/clamav/files/freshclam.init +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2015 OpenWrt.org - -START=90 -STOP=10 - -USE_PROCD=1 -PROG=/usr/sbin/freshclam -FRESHCLAM_CONFIGFILE="/tmp/clamav/freshclam.conf" - -validate_freshclam_section() { - uci_validate_section freshclam freshclam "${1}" \ - 'freshclam_config_file:string' \ - 'UpdateLogFile:string' \ - 'DatabaseMirror:string' \ - 'NotifyClamd:string' \ - 'DatabaseOwner:string' \ - 'CompressLocalDatabase:string:' -} - -start_service() { - local freshclam_config_file UpdateLogFile DatabaseOwner NotifyClamd DatabaseMirror - - validate_freshclam_section freshclam || { - echo "validation failed" - return 1 - } - - [ -f /tmp/freshclam.pid ] && echo "already running" && return 0 - - mkdir -p /usr/share/clamav - mkdir -p /etc/clamav - touch /tmp/freshclam.log - touch /tmp/freshclam.pid - - mkdir -p $(dirname $FRESHCLAM_CONFIGFILE) - ln -sf $freshclam_config_file $FRESHCLAM_CONFIGFILE - - echo "UpdateLogFile " $UpdateLogFile > $FRESHCLAM_CONFIGFILE - echo "DatabaseMirror " $DatabaseMirror >> $FRESHCLAM_CONFIGFILE - echo "NotifyClamd " $NotifyClamd >> $FRESHCLAM_CONFIGFILE - echo "DatabaseOwner " $DatabaseOwner >> $FRESHCLAM_CONFIGFILE - echo "CompressLocalDatabase " $CompressLocalDatabase >> $FRESHCLAM_CONFIGFILE - - procd_open_instance - procd_set_param command $PROG -d --config-file=$FRESHCLAM_CONFIGFILE -p /tmp/freshclam.pid --no-warnings - procd_set_param file $FRESHCLAM_CONFIGFILE - procd_close_instance -} - -stop_service() -{ - [ ! -f /tmp/freshclam.pid ] && echo "not running" && return 0 - PID=`cat /tmp/freshclam.pid` - kill $PID - rm -f /tmp/freshclam.pid -} - -service_triggers() -{ - procd_add_reload_trigger "freshclam" - procd_add_validation validate_freshclam_section -} diff --git a/net/clamav/patches/001-compile.patch b/net/clamav/patches/001-compile.patch deleted file mode 100644 index 3992257..0000000 --- a/net/clamav/patches/001-compile.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/clamdscan/proto.c -+++ b/clamdscan/proto.c -@@ -55,6 +55,7 @@ - #include "shared/misc.h" - #include "shared/clamdcom.h" - -+#include - #include "proto.h" - #include "client.h" - diff --git a/net/cshark/Makefile b/net/cshark/Makefile index 88fd17d..4ed43fc 100644 --- a/net/cshark/Makefile +++ b/net/cshark/Makefile @@ -8,14 +8,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=cshark -PKG_VERSION:=2015-11-24 -PKG_RELEASE=$(PKG_SOURCE_VERSION) +PKG_VERSION=2015-11-24-$(PKG_SOURCE_VERSION) +PKG_RELEASE=2 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/cloudshark/cshark.git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE_SUBDIR=$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE_VERSION:=e575ab3d35d75a6f70488001fcba45690ebe9b3e -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 @@ -28,7 +28,7 @@ define Package/cshark CATEGORY:=Network TITLE:=CloudShark capture tool URL:=http://www.cloudshark.org/ - DEPENDS:=+libjson-c +libpcap +libuci +libubox +libuclient +libustream-polarssl + DEPENDS:=+libjson-c +libpcap +libuci +libubox +libuclient +libustream-mbedtls MAINTAINER:=Luka Perkov endef diff --git a/net/ctorrent-svn/Makefile b/net/ctorrent-svn/Makefile deleted file mode 100644 index 0725f59..0000000 --- a/net/ctorrent-svn/Makefile +++ /dev/null @@ -1,98 +0,0 @@ -# -# Copyright (C) 2006-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=ctorrent-svn -PKG_REV:=322 -PKG_VERSION:=r$(PKG_REV) -PKG_RELEASE:=2 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://svn.code.sf.net/p/dtorrent/code/dtorrent/trunk -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=$(PKG_REV) -PKG_SOURCE_PROTO:=svn - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) -PKG_CHECK_FORMAT_SECURITY:=0 - -include $(INCLUDE_DIR)/package.mk - -define Package/ctorrent-svn/Default - SUBMENU:=BitTorrent - SECTION:=net - CATEGORY:=Network - DEPENDS:=+uclibcxx - TITLE:=console-based BitTorrent client - MAINTAINER:=Peter Wagner - URL:=http://www.rahul.net/dholmes/ctorrent/ -endef - -define Package/ctorrent-svn/Default/description - CTorrent is a BitTorrent client written in the C programming language, - known to be a very robust and mature programming language, which produces - fast and optimized application. -endef - -define Package/ctorrent-svn -$(call Package/ctorrent-svn/Default) - TITLE+= (with OpenSSL support) - DEPENDS+=+libopenssl - VARIANT:=ssl -endef - -define Package/ctorrent-svn/description -$(call Package/ctorrent-svn/Default/description) - This package is built with OpenSSL support. -endef - -define Package/ctorrent-svn-nossl -$(call Package/ctorrent-svn/Default) - TITLE+= (with builtin SHA-1) - VARIANT:=nossl -endef - -define Package/ctorrent-svn-nossl/description -$(call Package/ctorrent-svn/Default/description) - This package is built with builtin (Steve Reid's public-domain) SHA-1 support -endef - -CONFIGURE_VARS += \ - CXX="g++-uc" \ - LIBS="-nodefaultlibs -luClibc++ $(LIBGCC_S) -lc" - -ifeq ($(BUILD_VARIANT),ssl) - CONFIGURE_ARGS += \ - --with-ssl="$(STAGING_DIR)/usr" -endif - -ifeq ($(BUILD_VARIANT),nossl) - CONFIGURE_ARGS += \ - --with-ssl=no -endif - -define Build/Configure - (cd $(PKG_BUILD_DIR); touch \ - configure.ac \ - aclocal.m4 \ - Makefile.in \ - config.h.in \ - configure \ - ); - $(call Build/Configure/Default) -endef - -define Package/ctorrent-svn/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/ctorrent $(1)/usr/bin/ctorrent -endef - -Package/ctorrent-svn-nossl/install = $(Package/ctorrent-svn/install) - -$(eval $(call BuildPackage,ctorrent-svn)) -$(eval $(call BuildPackage,ctorrent-svn-nossl)) diff --git a/net/ctorrent-svn/patches/100-compile-fix.patch b/net/ctorrent-svn/patches/100-compile-fix.patch deleted file mode 100644 index bb7d33f..0000000 --- a/net/ctorrent-svn/patches/100-compile-fix.patch +++ /dev/null @@ -1,88 +0,0 @@ -diff --git a/btconfig.cpp b/btconfig.cpp -index e1badd0..aaa6feb 100644 ---- a/btconfig.cpp -+++ b/btconfig.cpp -@@ -828,7 +828,7 @@ void CfgCTCS(Config *config) - strncpy(CTCS.m_host, *cfg_ctcs, MAXHOSTNAMELEN-1); - CTCS.m_host[MAXHOSTNAMELEN-1] = '\0'; - if( (s = strchr(CTCS.m_host, ':')) ) *s='\0'; -- CTCS.m_port = atoi(s = (strchr(*cfg_ctcs, ':')+1)); -+ CTCS.m_port = atoi(s = (char*)(strchr(*cfg_ctcs, ':')+1)); - if( strchr(s, ':') ) - CONSOLE.Input("Enter CTCS password: ", CTCS.m_pass, CTCS_PASS_SIZE); - else *CTCS.m_pass = '\0'; -diff --git a/btcontent.cpp b/btcontent.cpp -index d84f450..88ccb50 100644 ---- a/btcontent.cpp -+++ b/btcontent.cpp -@@ -1408,27 +1408,27 @@ void btContent::CompletionCommand() - ptmp = cmdstr + strlen(cmdstr); - parg = strstr(parg, "&t") + 2; - strcat(pt, parg); -- pt = strstr(ptmp, "&t"); -- if( pd ) pd = strstr(ptmp, "&d"); -- if( pw ) pw = strstr(ptmp, "&w"); -+ pt = (char *)strstr(ptmp, "&t"); -+ if( pd ) pd = (char *)strstr(ptmp, "&d"); -+ if( pw ) pw = (char *)strstr(ptmp, "&w"); - } - if( pd && (!pt || pd < pt) && (!pw || pd < pw) ){ - strcpy(pd, m_btfiles.GetDataName()); - ptmp = cmdstr + strlen(cmdstr); - parg = strstr(parg, "&d") + 2; - strcat(pd, parg); -- pd = strstr(ptmp, "&d"); -- if( pt ) pt = strstr(ptmp, "&t"); -- if( pw ) pw = strstr(ptmp, "&w"); -+ pd = (char *)strstr(ptmp, "&d"); -+ if( pt ) pt = (char *)strstr(ptmp, "&t"); -+ if( pw ) pw = (char *)strstr(ptmp, "&w"); - } - if( pw && (!pt || pw < pt) && (!pd || pw < pd) ){ - strcpy(pw, wd); - ptmp = cmdstr + strlen(cmdstr); - parg = strstr(parg, "&w") + 2; - strcat(pw, parg); -- pw = strstr(ptmp, "&w"); -- if( pt ) pt = strstr(ptmp, "&t"); -- if( pd ) pd = strstr(ptmp, "&d"); -+ pw = (char *)strstr(ptmp, "&w"); -+ if( pt ) pt = (char *)strstr(ptmp, "&t"); -+ if( pd ) pd = (char *)strstr(ptmp, "&d"); - } - } - } -diff --git a/console.cpp b/console.cpp -index bdadb61..5ab2492 100644 ---- a/console.cpp -+++ b/console.cpp -@@ -511,11 +511,8 @@ void ConStream::Error(int sev, const char *message, ...) - va_list ap; - - va_start(ap, message); -- if( g_console_ready ) CONSOLE.Error(sev, message, ap); -- else{ - vfprintf(stderr, message, ap); - fflush(stderr); -- } - va_end(ap); - } - -@@ -1766,7 +1763,7 @@ void Console::Warning(int sev, const char *message, ...) - va_end(ap); - } - -- -+/* - void Console::Error(int sev, const char *message, va_list ap) - { - vsnprintf(m_buffer, sizeof(m_buffer), message, ap); -@@ -1778,7 +1775,7 @@ void Console::Error(int sev, const char *message, va_list ap) - m_warnings.AddMessage(sev, m_buffer); - if( sev && *cfg_ctcs ) CTCS.Send_Info(sev, m_buffer); - } -- -+*/ - - void Console::Debug(const char *message, ...) - { diff --git a/net/ctorrent-svn/patches/300-negative.patch b/net/ctorrent-svn/patches/300-negative.patch deleted file mode 100644 index e1e1e65..0000000 --- a/net/ctorrent-svn/patches/300-negative.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/bencode.cpp b/bencode.cpp -index fef82ba..b7f14bc 100644 ---- a/bencode.cpp -+++ b/bencode.cpp -@@ -45,6 +45,9 @@ size_t buf_int(const char *b, size_t len, char beginchar, char endchar, - p++; - len--; - } -+ if( *p == '-'){ -+ p++; len--; -+ } - - for( psave = p; len && isdigit(*p); p++, len-- ); - diff --git a/net/ctorrent-svn/patches/400-musl-compat.patch b/net/ctorrent-svn/patches/400-musl-compat.patch deleted file mode 100644 index e17c147..0000000 --- a/net/ctorrent-svn/patches/400-musl-compat.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/compat.c -+++ b/compat.c -@@ -51,6 +51,7 @@ int snprintf(char *str, size_t size, con - - #ifndef HAVE_STRNSTR - #include -+#include - /* FUNCTION PROGRAMER: Siberiaic Sang */ - char *strnstr(const char *haystack, const char *needle, size_t haystacklen) - { diff --git a/net/ctorrent/Makefile b/net/ctorrent/Makefile deleted file mode 100644 index 6a8e481..0000000 --- a/net/ctorrent/Makefile +++ /dev/null @@ -1,84 +0,0 @@ -# -# Copyright (C) 2006-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=ctorrent -PKG_VERSION:=dnh3.3.2 -PKG_RELEASE:=7 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=@SF/dtorrent \ - http://www.rahul.net/dholmes/ctorrent/ -PKG_MD5SUM:=59b23dd05ff70791cd6449effa7fc3b6 - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) - -include $(INCLUDE_DIR)/uclibc++.mk -include $(INCLUDE_DIR)/package.mk - -define Package/ctorrent/Default - SUBMENU:=BitTorrent - SECTION:=net - CATEGORY:=Network - DEPENDS:=$(CXX_DEPENDS) - TITLE:=console-based BitTorrent client - MAINTAINER:=Peter Wagner - URL:=http://www.rahul.net/dholmes/ctorrent/ -endef - -define Package/ctorrent/Default/description - CTorrent is a BitTorrent client written in the C programming language, - known to be a very robust and mature programming language, which produces - fast and optimized application. -endef - -define Package/ctorrent -$(call Package/ctorrent/Default) - TITLE+= (with OpenSSL support) - DEPENDS+=+libopenssl - VARIANT:=ssl -endef - -define Package/ctorrent/description -$(call Package/ctorrent/Default/description) - This package is built with OpenSSL support. -endef - -define Package/ctorrent-nossl -$(call Package/ctorrent/Default) - TITLE+= (with builtin SHA-1) - VARIANT:=nossl -endef - -define Package/ctorrent-nossl/description -$(call Package/ctorrent/Default/description) - This package is built with builtin (Steve Reid's public-domain) SHA-1 support -endef - -CONFIGURE_VARS += \ - CXXFLAGS="$$$$CXXFLAGS -fno-rtti" - -ifeq ($(BUILD_VARIANT),ssl) - CONFIGURE_ARGS += \ - --with-ssl="$(STAGING_DIR)/usr" -endif - -ifeq ($(BUILD_VARIANT),nossl) - CONFIGURE_ARGS += \ - --with-ssl=no -endif - -define Package/ctorrent/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/bin/$(PKG_NAME) -endef - -Package/ctorrent-nossl/install = $(Package/ctorrent/install) - -$(eval $(call BuildPackage,ctorrent)) -$(eval $(call BuildPackage,ctorrent-nossl)) diff --git a/net/ctorrent/patches/100-CVE-2009-1759.patch b/net/ctorrent/patches/100-CVE-2009-1759.patch deleted file mode 100644 index 86ae1d7..0000000 --- a/net/ctorrent/patches/100-CVE-2009-1759.patch +++ /dev/null @@ -1,364 +0,0 @@ -Patch for CVE-2009-1759. -Source: Upstream SVN, rev 302 from the dtorrent-3 branch. - -Index: a/bencode.h -=================================================================== ---- a/bencode.h (revision 300) -+++ b/bencode.h (revision 302) -@@ -25,7 +25,7 @@ - size_t decode_list(const char *b,size_t len,const char *keylist); - size_t decode_rev(const char *b,size_t len,const char *keylist); - size_t decode_query(const char *b,size_t len,const char *keylist,const char **ps,size_t *pi,int64_t *pl,int method); --size_t decode_list2path(const char *b, size_t n, char *pathname); -+size_t decode_list2path(const char *b, size_t n, char *pathname, size_t maxlen); - size_t bencode_buf(const char *str,size_t len,FILE *fp); - size_t bencode_str(const char *str, FILE *fp); - size_t bencode_int(const uint64_t integer, FILE *fp); -Index: a/bencode.cpp -=================================================================== ---- a/bencode.cpp (revision 300) -+++ b/bencode.cpp (revision 302) -@@ -233,22 +233,28 @@ - return bencode_end_dict_list(fp); - } - --size_t decode_list2path(const char *b, size_t n, char *pathname) -+size_t decode_list2path(const char *b, size_t n, char *pathname, size_t maxlen) - { - const char *pb = b; - const char *s = (char *) 0; -+ const char *endmax = pathname + maxlen - 1; - size_t r,q; - - if( 'l' != *pb ) return 0; - pb++; - n--; - if( !n ) return 0; -- for(; n;){ -+ while( n && pathname < endmax ){ - if(!(r = buf_str(pb, n, &s, &q)) ) return 0; -+ if( q >= maxlen ) return 0; - memcpy(pathname, s, q); - pathname += q; -- pb += r; n -= r; -- if( 'e' != *pb ){*pathname = PATH_SP, pathname++;} else break; -+ maxlen -= q; -+ pb += r; -+ n -= r; -+ if( 'e' == *pb ) break; -+ if( pathname >= endmax ) return 0; -+ *pathname++ = PATH_SP; - } - *pathname = '\0'; - return (pb - b + 1); -Index: a/btfiles.cpp -=================================================================== ---- a/btfiles.cpp (revision 300) -+++ b/btfiles.cpp (revision 302) -@@ -449,7 +449,8 @@ - return 0; - } - --int btFiles::BuildFromMI(const char *metabuf, const size_t metabuf_len, const char *saveas) -+int btFiles::BuildFromMI(const char *metabuf, const size_t metabuf_len, -+ const char *saveas, unsigned char exam_only) - { - char path[MAXPATHLEN]; - const char *s, *p; -@@ -458,11 +459,19 @@ - int f_warned = 0; - - if( !decode_query(metabuf, metabuf_len, "info|name", &s, &q, (int64_t*)0, -- QUERY_STR) || MAXPATHLEN <= q ) -+ QUERY_STR) || MAXPATHLEN <= q ){ -+ errno = EINVAL; - return -1; -+ } - - memcpy(path, s, q); - path[q] = '\0'; -+ if( !exam_only && -+ (PATH_SP == path[0] || '/' == path[0] || 0==strncmp("..", path, 2)) ){ -+ CONSOLE.Warning(1, "error, unsafe path \"%s\" in torrent data", path); -+ errno = EINVAL; -+ return -1; -+ } - - r = decode_query(metabuf, metabuf_len, "info|files", (const char**)0, &q, - (int64_t*)0, QUERY_POS); -@@ -471,21 +480,31 @@ - BTFILE *pbf_last = (BTFILE*) 0; - BTFILE *pbf = (BTFILE*) 0; - size_t dl; -+ unsigned long nfiles = 0; -+ - if( decode_query(metabuf,metabuf_len,"info|length", -- (const char**) 0,(size_t*) 0,(int64_t*) 0,QUERY_LONG) ) -+ (const char**) 0,(size_t*) 0,(int64_t*) 0,QUERY_LONG) ){ -+ errno = EINVAL; - return -1; -+ } - - if( saveas ){ - m_directory = new char[strlen(saveas) + 1]; - #ifndef WINDOWS -- if(!m_directory) return -1; -+ if( !m_directory ){ -+ errno = ENOMEM; -+ return -1; -+ } - #endif - strcpy(m_directory,saveas); - }else{ - int f_conv; - char *tmpfn = new char[strlen(path)*2+5]; - #ifndef WINDOWS -- if( !tmpfn ) return -1; -+ if( !tmpfn ){ -+ errno = ENOMEM; -+ return -1; -+ } - #endif - if( f_conv = ConvertFilename(tmpfn, path, strlen(path)*2+5) ){ - if( arg_flg_convert_filenames ){ -@@ -493,6 +512,7 @@ - #ifndef WINDOWS - if( !m_directory ){ - delete []tmpfn; -+ errno = ENOMEM; - return -1; - } - #endif -@@ -507,7 +527,10 @@ - if( !f_conv || !arg_flg_convert_filenames ){ - m_directory = new char[strlen(path) + 1]; - #ifndef WINDOWS -- if( !m_directory ) return -1; -+ if( !m_directory ){ -+ errno = ENOMEM; -+ return -1; -+ } - #endif - strcpy(m_directory,path); - } -@@ -517,24 +540,50 @@ - p = metabuf + r + 1; - q--; - for(; q && 'e' != *p; p += dl, q -= dl){ -- if(!(dl = decode_dict(p, q, (const char*) 0)) ) return -1; -- if( !decode_query(p, dl, "length", (const char**) 0, -- (size_t*) 0,&t,QUERY_LONG) ) return -1; -+ if( !(dl = decode_dict(p, q, (const char*) 0)) || -+ !decode_query(p, dl, "length", (const char**) 0, (size_t*) 0, &t, -+ QUERY_LONG) ){ -+ errno = EINVAL; -+ return -1; -+ } - pbf = _new_bfnode(); - #ifndef WINDOWS -- if( !pbf ) return -1; -+ if( !pbf ){ -+ errno = ENOMEM; -+ return -1; -+ } - #endif -+ nfiles++; - pbf->bf_length = t; - m_total_files_length += t; - r = decode_query(p, dl, "path", (const char **)0, &n, (int64_t*)0, - QUERY_POS); -- if( !r ) return -1; -- if(!decode_list2path(p + r, n, path)) return -1; -+ if( !r || !decode_list2path(p + r, n, path, sizeof(path)) ){ -+ CONSOLE.Warning(1, -+ "error, invalid path in torrent data for file %lu at offset %llu", -+ nfiles, m_total_files_length - t); -+ delete pbf; -+ errno = EINVAL; -+ return -1; -+ } -+ if( !exam_only && -+ (PATH_SP == path[0] || '/' == path[0] || 0==strncmp("..", path, 2)) ){ -+ CONSOLE.Warning(1, -+ "error, unsafe path \"%s\" in torrent data for file %lu", -+ path, nfiles); -+ delete pbf; -+ errno = EINVAL; -+ return -1; -+ } - -+ - int f_conv; - char *tmpfn = new char[strlen(path)*2+5]; - #ifndef WINDOWS -- if( !tmpfn ) return -1; -+ if( !tmpfn ){ -+ errno = ENOMEM; -+ return -1; -+ } - #endif - if( f_conv = ConvertFilename(tmpfn, path, strlen(path)*2+5) ){ - if( arg_flg_convert_filenames ){ -@@ -542,6 +591,7 @@ - #ifndef WINDOWS - if( !pbf->bf_filename ){ - delete []tmpfn; -+ errno = ENOMEM; - return -1; - } - #endif -@@ -556,7 +606,10 @@ - if( !f_conv || !arg_flg_convert_filenames ){ - pbf->bf_filename = new char[strlen(path) + 1]; - #ifndef WINDOWS -- if( !pbf->bf_filename ) return -1; -+ if( !pbf->bf_filename ){ -+ errno = ENOMEM; -+ return -1; -+ } - #endif - strcpy(pbf->bf_filename, path); - } -@@ -564,30 +617,42 @@ - pbf_last = pbf; - } - }else{ -- if( !decode_query(metabuf,metabuf_len,"info|length", -- (const char**) 0,(size_t*) 0,&t,QUERY_LONG) ) -+ if( !decode_query(metabuf,metabuf_len, "info|length", -+ (const char**)0, (size_t*) 0, &t, QUERY_LONG) ){ -+ errno = EINVAL; - return -1; -+ } - m_btfhead = _new_bfnode(); - #ifndef WINDOWS -- if( !m_btfhead) return -1; -+ if( !m_btfhead ){ -+ errno = ENOMEM; -+ return -1; -+ } - #endif - m_btfhead->bf_length = m_total_files_length = t; - if( saveas ){ - m_btfhead->bf_filename = new char[strlen(saveas) + 1]; - #ifndef WINDOWS -- if(!m_btfhead->bf_filename ) return -1; -+ if( !m_btfhead->bf_filename ){ -+ errno = ENOMEM; -+ return -1; -+ } - #endif - strcpy(m_btfhead->bf_filename, saveas); - }else if( arg_flg_convert_filenames ){ - char *tmpfn = new char[strlen(path)*2+5]; - #ifndef WINDOWS -- if( !tmpfn ) return -1; -+ if( !tmpfn ){ -+ errno = ENOMEM; -+ return -1; -+ } - #endif - ConvertFilename(tmpfn, path, strlen(path)*2+5); - m_btfhead->bf_filename = new char[strlen(tmpfn) + 1]; - #ifndef WINDOWS - if( !m_btfhead->bf_filename ){ - delete []tmpfn; -+ errno = ENOMEM; - return -1; - } - #endif -@@ -596,7 +661,10 @@ - }else{ - m_btfhead->bf_filename = new char[strlen(path) + 1]; - #ifndef WINDOWS -- if(!m_btfhead->bf_filename ) return -1; -+ if( !m_btfhead->bf_filename ){ -+ errno = ENOMEM; -+ return -1; -+ } - #endif - strcpy(m_btfhead->bf_filename, path); - } -@@ -694,6 +762,32 @@ - size_t btFiles::FillMetaInfo(FILE* fp) - { - BTFILE *p; -+ const char *refname, *s; -+ char path[MAXPATHLEN]; -+ -+ refname = m_directory ? m_directory : m_btfhead->bf_filename; -+ while( (s = strchr(refname, PATH_SP)) && *(s + 1) ){ -+ refname = s + 1; -+ } -+ if( m_directory && '.' == *refname ){ -+ char dir[MAXPATHLEN]; -+ if( getcwd(dir, sizeof(dir)) && 0==chdir(m_directory) ){ -+ if( getcwd(path, sizeof(path)) ){ -+ refname = path; -+ while( (s = strchr(refname, PATH_SP)) && *(s + 1) ){ -+ refname = s + 1; -+ } -+ } -+ chdir(dir); -+ } -+ } -+ if( '/' == *refname || '\0' == *refname || '.' == *refname ){ -+ CONSOLE.Warning(1, "error, inappropriate file or directory name \"%s\"", -+ m_directory ? m_directory : m_btfhead->bf_filename); -+ errno = EINVAL; -+ return 0; -+ } -+ - if( m_directory ){ - // multi files - if( bencode_str("files", fp) != 1 ) return 0; -@@ -715,16 +809,15 @@ - if(bencode_end_dict_list(fp) != 1 ) return 0; - - if(bencode_str("name", fp) != 1) return 0; -- return bencode_str(m_directory, fp); -- -+ return bencode_str(refname, fp); - }else{ - if( bencode_str("length", fp) != 1 ) return 0; - if( bencode_int(m_btfhead->bf_length, fp) != 1) return 0; - - if( bencode_str("name", fp) != 1 ) return 0; -- return bencode_str(m_btfhead->bf_filename, fp); -+ return bencode_str(refname, fp); - } -- return 1; -+ return 0; - } - - -Index: a/btcontent.cpp -=================================================================== ---- a/btcontent.cpp (revision 300) -+++ b/btcontent.cpp (revision 302) -@@ -357,7 +357,11 @@ - - cfg_req_queue_length = (m_piece_length / cfg_req_slice_size) * 2 - 1; - -- if( m_btfiles.BuildFromMI(b, flen, saveas) < 0 ) ERR_RETURN(); -+ if( m_btfiles.BuildFromMI(b, flen, saveas, arg_flg_exam_only) < 0 ){ -+ if( EINVAL == errno ) -+ CONSOLE.Warning(1, "Torrent metainfo file data is invalid or unusable."); -+ ERR_RETURN(); -+ } - - delete []b; - b = (char *)0; -Index: a/btfiles.h -=================================================================== ---- a/btfiles.h (revision 300) -+++ b/btfiles.h (revision 302) -@@ -61,7 +61,7 @@ - - int BuildFromFS(const char *pathname); - int BuildFromMI(const char *metabuf, const size_t metabuf_len, -- const char *saveas); -+ const char *saveas, unsigned char exam_only); - - char *GetDataName() const; - uint64_t GetTotalLength() const { return m_total_files_length; } diff --git a/net/ctorrent/patches/100-negative-ints.patch b/net/ctorrent/patches/100-negative-ints.patch deleted file mode 100644 index 864ce1b..0000000 --- a/net/ctorrent/patches/100-negative-ints.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/bencode.cpp -+++ b/bencode.cpp -@@ -44,6 +44,10 @@ size_t buf_long(const char *b,size_t len - p++; len--; - } - -+ if( *p == '-'){ -+ p++; len--; -+ } -+ - for(psave = p; len && isdigit(*p); p++,len--) ; - - if(!len || MAX_INT_SIZ < (p - psave) || *p != endchar) return 0; diff --git a/net/ctorrent/patches/200-musl-compat.patch b/net/ctorrent/patches/200-musl-compat.patch deleted file mode 100644 index 65cb71e..0000000 --- a/net/ctorrent/patches/200-musl-compat.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/compat.c -+++ b/compat.c -@@ -63,6 +63,7 @@ int snprintf(char *str, size_t size, con - - #ifndef HAVE_STRNSTR - #include -+#include - /* FUNCTION PROGRAMER: Siberiaic Sang */ - char *strnstr(const char *haystack, const char *needle, size_t haystacklen) - { diff --git a/net/ddns-scripts/Makefile b/net/ddns-scripts/Makefile index 6be7846..7be4947 100755 --- a/net/ddns-scripts/Makefile +++ b/net/ddns-scripts/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2008-2016 OpenWrt.org +# Copyright (C) 2008-2017 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # @@ -12,7 +12,7 @@ PKG_NAME:=ddns-scripts PKG_VERSION:=2.7.6 # Release == build # increase on changes of services files or tld_names.dat -PKG_RELEASE:=4 +PKG_RELEASE:=13 PKG_LICENSE:=GPL-2.0 PKG_MAINTAINER:=Christian Schoenebeck @@ -117,21 +117,19 @@ define Build/Configure endef define Build/Compile $(CP) ./files $(PKG_BUILD_DIR) + # ensure that VERSION inside dynamic_dns_functions.sh reflect PKG_VERSION of Makefile + $(SED) '/^VERSION=*/s/.*/VERSION="$(PKG_VERSION)-$(PKG_RELEASE)"/' $(PKG_BUILD_DIR)/files/dynamic_dns_functions.sh + # remove comments, white spaces and empty lines for FILE in `find $(PKG_BUILD_DIR)/files -type f`; do \ - $(SED) 's/^\s*#/#/' \ - -e '/^#\s\|^#$$$$/d' \ - -e 's/\s#\s.*$$$$//' \ - -e 's/\s*$$$$//' \ - -e '/^\/\/\s/d' \ - -e '/^\s*$$$$/d' $$$$FILE; \ + $(SED) 's/^[[:space:]]*//' \ + -e '/^#[[:space:]]\|^#$$$$/d' \ + -e 's/[[:space:]]#[[:space:]].*$$$$//' \ + -e 's/[[:space:]]*$$$$//' \ + -e '/^\/\/[[:space:]]/d' \ + -e '/^[[:space:]]*$$$$/d' $$$$FILE; \ done - # ensure that VERSION inside dynamic_dns_functions.sh reflect PKG_VERSION of Makefile - $(SED) '/^VERSION=*/s/.*/VERSION="$(PKG_VERSION)"/' $(PKG_BUILD_DIR)/files/dynamic_dns_functions.sh - $(CP) ./tools $(PKG_BUILD_DIR) - chmod 755 $(PKG_BUILD_DIR)/tools/* - $(PKG_BUILD_DIR)/tools/public_suffix_list.sh - mv -f $(PKG_BUILD_DIR)/tools/public_suffix_list.dat.gz \ - $(PKG_BUILD_DIR)/files/public_suffix_list.dat.gz + # compress public_suffix_list.dat + gzip -f9 $(PKG_BUILD_DIR)/files/public_suffix_list.dat endef define Package/$(PKG_NAME)/conffiles @@ -141,8 +139,8 @@ endef ###### ************************************************************************* define Package/$(PKG_NAME)/preinst #!/bin/sh - # if NOT run buildroot and PKG_UPGRADE then stop service - [ -z "$${IPKG_INSTROOT}" -a "$${PKG_UPGRADE}" = "1" ] && /etc/init.d/ddns stop >/dev/null 2>&1 + # if NOT run buildroot then stop service + [ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1 exit 0 # suppress errors endef define Package/$(PKG_NAME)/install @@ -164,23 +162,24 @@ endef define Package/$(PKG_NAME)/postinst #!/bin/sh # if NOT run buildroot and PKG_UPGRADE then (re)start service if enabled - [ -z "$${IPKG_INSTROOT}" -a "$${PKG_UPGRADE}" = "1" ] \ - && /etc/init.d/ddns enabled \ - && /etc/init.d/ddns start >/dev/null 2>&1 + [ -z "$${IPKG_INSTROOT}" -a "$${PKG_UPGRADE}" = "1" ] && { + [ -x /etc/uci-defaults/ddns ] && \ + /etc/uci-defaults/ddns && \ + rm -f /etc/uci-defaults/ddns >/dev/null 2>&1 + /etc/init.d/ddns enabled && \ + /etc/init.d/ddns start >/dev/null 2>&1 + } exit 0 # suppress errors endef define Package/$(PKG_NAME)/prerm #!/bin/sh # if run within buildroot exit [ -n "$${IPKG_INSTROOT}" ] && exit 0 - # stop running scripts /etc/init.d/ddns stop /etc/init.d/ddns disable - # clear LuCI indexcache rm -f /tmp/luci-indexcache >/dev/null 2>&1 - exit 0 # suppress errors endef @@ -194,28 +193,34 @@ endef define Package/$(PKG_NAME)_cloudflare/install $(INSTALL_DIR) $(1)/etc/uci-defaults $(INSTALL_BIN) $(PKG_BUILD_DIR)/files/ddns.defaults $(1)/etc/uci-defaults/ddns_cloudflare - $(INSTALL_DIR) $(1)/usr/lib/ddns - $(INSTALL_BIN) $(PKG_BUILD_DIR)/files/update_cloudflare_com_v1.sh $(1)/usr/lib/ddns $(INSTALL_DIR) $(1)/usr/share $(INSTALL_DATA) $(PKG_BUILD_DIR)/files/public_suffix_list.dat.gz $(1)/usr/share + $(INSTALL_DIR) $(1)/usr/lib/ddns + $(INSTALL_BIN) $(PKG_BUILD_DIR)/files/update_cloudflare_com_v1.sh $(1)/usr/lib/ddns endef define Package/$(PKG_NAME)_cloudflare/postinst #!/bin/sh - # if NOT upgrading add entries - [ "$${PKG_UPGRADE}" = "1" ] || { - printf "%s\\t%s\\n" '"cloudflare.com-v1"' '"update_cloudflare_com_v1.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services - printf "%s\\t%s\\n" '"cloudflare.com-v1"' '"update_cloudflare_com_v1.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services_ipv6 - } + # remove old services file entries + /bin/sed -i '/cloudflare\.com-v1/d' $${IPKG_INSTROOT}/etc/ddns/services >/dev/null 2>&1 + /bin/sed -i '/cloudflare\.com-v1/d' $${IPKG_INSTROOT}/etc/ddns/services_ipv6 >/dev/null 2>&1 + # and create new + printf "%s\\t%s\\n" '"cloudflare.com-v1"' '"update_cloudflare_com_v1.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services + printf "%s\\t%s\\n" '"cloudflare.com-v1"' '"update_cloudflare_com_v1.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services_ipv6 # on real system restart service if enabled - [ -z "$${IPKG_INSTROOT}" ] \ - && /etc/init.d/ddns enabled \ - && /etc/init.d/ddns start >/dev/null 2>&1 + [ -z "$${IPKG_INSTROOT}" ] && { + [ -x /etc/uci-defaults/ddns_cloudflare ] && \ + /etc/uci-defaults/ddns_cloudflare && \ + rm -f /etc/uci-defaults/ddns_cloudflare >/dev/null 2>&1 + /etc/init.d/ddns enabled && \ + /etc/init.d/ddns start >/dev/null 2>&1 + } exit 0 # suppress errors endef define Package/$(PKG_NAME)_cloudflare/prerm #!/bin/sh # if NOT run buildroot then stop service [ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1 + # remove services file entries /bin/sed -i '/cloudflare\.com-v1/d' $${IPKG_INSTROOT}/etc/ddns/services >/dev/null 2>&1 /bin/sed -i '/cloudflare\.com-v1/d' $${IPKG_INSTROOT}/etc/ddns/services_ipv6 >/dev/null 2>&1 exit 0 # suppress errors @@ -236,20 +241,27 @@ define Package/$(PKG_NAME)_cloudflare.com-v4/install endef define Package/$(PKG_NAME)_cloudflare.com-v4/postinst #!/bin/sh - # if NOT upgrading add entries - [ "$${PKG_UPGRADE}" = "1" ] || { - printf "%s\\t%s\\n" '"cloudflare.com-v4"' '"update_cloudflare_com_v4.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services - printf "%s\\t%s\\n" '"cloudflare.com-v4"' '"update_cloudflare_com_v4.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services_ipv6 - } + # remove old services file entries + /bin/sed -i '/cloudflare\.com-v4/d' $${IPKG_INSTROOT}/etc/ddns/services >/dev/null 2>&1 + /bin/sed -i '/cloudflare\.com-v4/d' $${IPKG_INSTROOT}/etc/ddns/services_ipv6 >/dev/null 2>&1 + # and create new + printf "%s\\t%s\\n" '"cloudflare.com-v4"' '"update_cloudflare_com_v4.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services + printf "%s\\t%s\\n" '"cloudflare.com-v4"' '"update_cloudflare_com_v4.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services_ipv6 # on real system restart service if enabled - [ -z "$${IPKG_INSTROOT}" ] \ - && /etc/init.d/ddns enabled \ - && /etc/init.d/ddns start >/dev/null 2>&1 + [ -z "$${IPKG_INSTROOT}" ] && { + [ -x /etc/uci-defaults/ddns_cloudflare.com-v4 ] && \ + /etc/uci-defaults/ddns_cloudflare.com-v4 && \ + rm -f /etc/uci-defaults/ddns_cloudflare.com-v4 >/dev/null 2>&1 + /etc/init.d/ddns enabled && \ + /etc/init.d/ddns start >/dev/null 2>&1 + } exit 0 # suppress errors endef define Package/$(PKG_NAME)_cloudflare.com-v4/prerm #!/bin/sh + # if NOT run buildroot then stop service [ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1 + # remove services file entries /bin/sed -i '/cloudflare\.com-v4/d' $${IPKG_INSTROOT}/etc/ddns/services >/dev/null 2>&1 /bin/sed -i '/cloudflare\.com-v4/d' $${IPKG_INSTROOT}/etc/ddns/services_ipv6 >/dev/null 2>&1 exit 0 # suppress errors @@ -270,20 +282,27 @@ define Package/$(PKG_NAME)_godaddy.com-v1/install endef define Package/$(PKG_NAME)_godaddy.com-v1/postinst #!/bin/sh - # if NOT upgrading add entries - [ "$${PKG_UPGRADE}" = "1" ] || { - printf "%s\\t%s\\n" '"godaddy.com-v1"' '"update_godaddy_com_v1.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services - printf "%s\\t%s\\n" '"godaddy.com-v1"' '"update_godaddy_com_v1.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services_ipv6 - } + # remove old services file entries + /bin/sed -i '/godaddy\.com-v1/d' $${IPKG_INSTROOT}/etc/ddns/services >/dev/null 2>&1 + /bin/sed -i '/godaddy\.com-v1/d' $${IPKG_INSTROOT}/etc/ddns/services_ipv6 >/dev/null 2>&1 + # and create new + printf "%s\\t%s\\n" '"godaddy.com-v1"' '"update_godaddy_com_v1.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services + printf "%s\\t%s\\n" '"godaddy.com-v1"' '"update_godaddy_com_v1.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services_ipv6 # on real system restart service if enabled - [ -z "$${IPKG_INSTROOT}" ] \ - && /etc/init.d/ddns enabled \ - && /etc/init.d/ddns start >/dev/null 2>&1 + [ -z "$${IPKG_INSTROOT}" ] && { + [ -x /etc/uci-defaults/ddns_godaddy.com-v1 ] && \ + /etc/uci-defaults/ddns_godaddy.com-v1 && \ + rm -f /etc/uci-defaults/ddns_godaddy.com-v1 >/dev/null 2>&1 + /etc/init.d/ddns enabled \ + && /etc/init.d/ddns start >/dev/null 2>&1 + } exit 0 # suppress errors endef define Package/$(PKG_NAME)_godaddy.com-v1/prerm #!/bin/sh + # if NOT run buildroot then stop service [ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1 + # remove services file entries /bin/sed -i '/godaddy\.com-v1/d' $${IPKG_INSTROOT}/etc/ddns/services >/dev/null 2>&1 /bin/sed -i '/godaddy\.com-v1/d' $${IPKG_INSTROOT}/etc/ddns/services_ipv6 >/dev/null 2>&1 exit 0 # suppress errors @@ -304,19 +323,25 @@ define Package/$(PKG_NAME)_no-ip_com/install endef define Package/$(PKG_NAME)_no-ip_com/postinst #!/bin/sh - # if NOT upgrading add entries - [ "$${PKG_UPGRADE}" = "1" ] || { - printf "%s\\t%s\\n" '"no-ip.com"' '"update_no-ip_com.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services - } + # remove old services file entries + /bin/sed -i '/no-ip\.com/d' $${IPKG_INSTROOT}/etc/ddns/services >/dev/null 2>&1 + # and create new + printf "%s\\t%s\\n" '"no-ip.com"' '"update_no-ip_com.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services # on real system restart service if enabled - [ -z "$${IPKG_INSTROOT}" ] \ - && /etc/init.d/ddns enabled \ - && /etc/init.d/ddns start >/dev/null 2>&1 + [ -z "$${IPKG_INSTROOT}" ] && { + [ -x /etc/uci-defaults/ddns_no-ip_com ] && \ + /etc/uci-defaults/ddns_no-ip_com && \ + rm -f /etc/uci-defaults/ddns_no-ip_com >/dev/null 2>&1 + /etc/init.d/ddns enabled && \ + /etc/init.d/ddns start >/dev/null 2>&1 + } exit 0 # suppress errors endef define Package/$(PKG_NAME)_no-ip_com/prerm #!/bin/sh + # if NOT run buildroot then stop service [ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1 + # remove services file entries /bin/sed -i '/no-ip\.com/d' $${IPKG_INSTROOT}/etc/ddns/services >/dev/null 2>&1 exit 0 # suppress errors endef @@ -336,20 +361,27 @@ define Package/$(PKG_NAME)_nsupdate/install endef define Package/$(PKG_NAME)_nsupdate/postinst #!/bin/sh - # if NOT upgrading add entries - [ "$${PKG_UPGRADE}" = "1" ] || { - printf "%s\\t%s\\n" '"bind-nsupdate"' '"update_nsupdate.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services - printf "%s\\t%s\\n" '"bind-nsupdate"' '"update_nsupdate.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services_ipv6 - } + # remove old services file entries + /bin/sed -i '/bind-nsupdate/d' $${IPKG_INSTROOT}/etc/ddns/services >/dev/null 2>&1 + /bin/sed -i '/bind-nsupdate/d' $${IPKG_INSTROOT}/etc/ddns/services_ipv6 >/dev/null 2>&1 + # and create new + printf "%s\\t%s\\n" '"bind-nsupdate"' '"update_nsupdate.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services + printf "%s\\t%s\\n" '"bind-nsupdate"' '"update_nsupdate.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services_ipv6 # on real system restart service if enabled - [ -z "$${IPKG_INSTROOT}" ] \ - && /etc/init.d/ddns enabled \ - && /etc/init.d/ddns start >/dev/null 2>&1 + [ -z "$${IPKG_INSTROOT}" ] && { + [ -x /etc/uci-defaults/ddns_nsupdate ] && \ + /etc/uci-defaults/ddns_nsupdate && \ + rm -f /etc/uci-defaults/ddns_nsupdate >/dev/null 2>&1 + /etc/init.d/ddns enabled && \ + /etc/init.d/ddns start >/dev/null 2>&1 + } exit 0 # suppress errors endef define Package/$(PKG_NAME)_nsupdate/prerm #!/bin/sh + # if NOT run buildroot then stop service [ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1 + # remove services file entries /bin/sed -i '/bind-nsupdate/d' $${IPKG_INSTROOT}/etc/ddns/services >/dev/null 2>&1 /bin/sed -i '/bind-nsupdate/d' $${IPKG_INSTROOT}/etc/ddns/services_ipv6 >/dev/null 2>&1 exit 0 # suppress errors diff --git a/net/ddns-scripts/files/ddns.defaults b/net/ddns-scripts/files/ddns.defaults index 8631208..3908bb4 100755 --- a/net/ddns-scripts/files/ddns.defaults +++ b/net/ddns-scripts/files/ddns.defaults @@ -1,67 +1,263 @@ #!/bin/sh +g_pslfile=/usr/share/public_suffix_list.dat.gz +[ -f "$g_pslfile" ] || g_pslfile="$(dirname $0)/public_suffix_list.dat.gz" + +g_pslerr=0 +g_cfgfile="ddns" + +# modify "cloudflare.com-v1" domain to new syntax +# returns "host[.subdom]@domain.TLD" of given FQDN ############################# +mod_cloudflare_v1_domain() { + # $1 entry to validate/split + [ -f "$g_pslfile" ] || return 1 + + [ $# -ne 1 -o -z "$1" ] && \ + { printf "%s\\n" "mod_cloudflare_v1_domain() - Invalid number of parameters" >&2; return 1; } + + local mcd_fqdn=$1 + local mcd_fsub="" + local mcd_fdom="" + local mcd_ctld="" + local mcd_ftld="" + + # check if already new syntax, "@" inside string + if [ $( printf "%s" "$mcd_fqdn" | grep -cF "@" 2>/dev/null ) -gt 0 ]; then + # already done + printf "%s" "$mcd_fqdn" + return 0 + fi + + # we need to do in one line because otherwise sh doesn't work correctly + # to lower | replace "." to " " | awk invert word order + set -- $(printf %s "$mcd_fqdn" | tr [A-Z] [a-z] | tr "." " " \ + | awk '{do printf "%s"(NF>1?OFS:ORS),$NF;while (--NF)}' ) + + while [ -n "${1:-}" ] ; do # as long we have parameters + if [ -z "$mcd_ctld" ]; then # first loop + mcd_ctld="$1" # CURRENT TLD to look at + shift + else + mcd_ctld="$1.$mcd_ctld" # Next TLD to look at + shift + fi + # check if TLD exact match in public_suffix_name.dat, save TLD + zcat $g_pslfile | grep -E "^$mcd_ctld$" >/dev/null 2>&1 && { + mcd_ftld="$mcd_ctld" # save found + mcd_fdom="${1:-}" # save domain next step might be invalid + continue + } + # check if match any "*" in public_suffix_name.dat, + zcat $g_pslfile | grep -E "^\*.$mcd_ctld$" >/dev/null 2>&1 && { + [ -z "${1:-}" ] && break # no more data break + # check if next level TLD match excludes "!" in tld_names.dat + if zcat $g_pslfile | grep -E "^!$1.$mcd_ctld$" >/dev/null 2>&1 ; then + mcd_ftld="$mcd_ctld" # Yes + else + mcd_ftld="$1.$mcd_ctld" + shift + fi + mcd_fdom="$1"; shift + } + [ -n "$mcd_ftld" ] && break # we have something valid, break + done + + # the leftover parameters are the HOST/SUBDOMAIN + while [ -n "${1:-}" ]; do + mcd_fsub="${1}${mcd_fsub:+.$mcd_fsub}" # remember we need to invert + shift # and insert dot if mcd_fsub not empty + done + + # now validate found data + [ -z "$mcd_ftld" ] && { printf "%s\\n" "mod_cloudflare_v1_domain() - no TLD not found in '$mcd_fqdn'" >&1; return 1; } + [ -z "$mcd_fdom" ] && { printf "%s\\n" "mod_cloudflare_v1_domain() - no registrable Domain not found in '$mcd_fqdn'" >&1; return 1; } + + # return data + printf "%s" "${mcd_fsub:+${mcd_fsub}@}${mcd_fdom}.${mcd_ftld}" + return 0 +} + +# modify timer settings from interval and unit to dhms format +timer2dhms() { +# $1 Number and +# $2 Unit of time interval + local t=0 + case $2 in + days) t=$(( $1 * 86400 ));; + hours) t=$(( $1 * 3600 ));; + minutes) t=$(( $1 * 60 ));; + *) t=$1;; + esac + + local d=$(( $t / 86400 )) + local h=$(( $t % 86400 / 3600 )) + local m=$(( $t % 3600 / 60 )) + local s=$(( $t % 60 )) + if [ $d -gt 0 ]; then printf "%dd %02dh %02dm %02ds" "$d" "$h" "$m" "$s" + elif [ $h -gt 0 ]; then printf "%dh %02dm %02ds" "$h" "$m" "$s" + elif [ $m -gt 0 ]; then printf "%dm %02ds" "$m" "$s" + else printf "%ds" "$s"; fi + + unset d h m s t + return 0 +} + # using function to not confuse function calls with existing ones inside /lib/functions.sh -update_ddns_config() { - udc_uci="$(which uci) -q" # ignore errors - udc_pkg="ddns" - udc_cfg="" - udc_name="" - udc_var="" - udc_val="" +update_config() { + uc_uci="$(which uci) -q" # ignore errors + uc_cfg="" + uc_name="" + uc_var="" + uc_val="" package() { return 0; } config () { - udc_cfg="$1" - udc_name="$2" + uc_cfg="$1" + uc_name="$2" # Type = ddns Name = global - if [ "$udc_cfg" = "$udc_pkg" -a "$udc_name" = "global" ]; then - option() { return 0; } - # rename options - $udc_uci rename $udc_pkg.$udc_name.allow_local_ip="upd_privateip" - $udc_uci rename $udc_pkg.$udc_name.date_format="ddns_dateformat" - $udc_uci rename $udc_pkg.$udc_name.log_dir="ddns_logdir" - $udc_uci rename $udc_pkg.$udc_name.log_lines="ddns_loglines" - $udc_uci rename $udc_pkg.$udc_name.run_dir="ddns_rundir" + if [ "$uc_cfg" = "$g_cfgfile" -a "$uc_name" = "global" ]; then + option() { + uc_var="$1"; shift + uc_val="$*" + case "$uc_var" in + allow_local_ip) $uc_uci rename $g_cfgfile.$uc_name.$uc_var="upd_privateip";; + date_format) $uc_uci rename $g_cfgfile.$uc_name.$uc_var="ddns_dateformat";; + log_lines) $uc_uci rename $g_cfgfile.$uc_name.$uc_var="ddns_loglines";; + log_dir) $uc_uci rename $g_cfgfile.$uc_name.$uc_var="ddns_logdir";; + run_dir) $uc_uci rename $g_cfgfile.$uc_name.$uc_var="ddns_rundir";; + # leave all other options currently unchanged + *) ;; + esac + } # Type = service Name = ??? - elif [ "$udc_cfg" = "service" ]; then + elif [ "$uc_cfg" = "service" ]; then option() { - udc_var="$1"; shift - udc_val="$*" - # fix some option service_name values - case "$udc_var" in - service_name) - case "$udc_val" in + uc_var="$1"; shift + uc_val="$*" + case "$uc_var" in + # fix some option service_name values + # and some settings for specific providers + service_name|upd_provider) + case "$uc_val" in freedns\.afraid\.org|afraid\.org) - $udc_uci set $udc_pkg.$udc_name.$udc_var="afraid.org-keyauth";; + $uc_uci set $g_cfgfile.$uc_name.$uc_var="afraid.org-keyauth";; Bind-nsupdate) - $udc_uci set $udc_pkg.$udc_name.$udc_var="bind-nsupdate";; - CloudFlare|cloudflare\.com) - $udc_uci set $udc_pkg.$udc_name.$udc_var="cloudflare.com-v1";; + $uc_uci set $g_cfgfile.$uc_name.$uc_var="bind-nsupdate";; + CloudFlare|cloudflare\.com|cloudflare\.com-v1) + # verify if lookup_host is set + $uc_uci get $g_cfgfile.$uc_name.lookup_host >/dev/null 2>&1 || { + ucv_domain=$($uc_uci get $g_cfgfile.$uc_name.domain 2>/dev/null) + $uc_uci set $g_cfgfile.$uc_name.lookup_host="$ucv_domain" + } + if [ -f "$g_pslfile" ]; then + # change value of domain/upd_object to new syntax + # there is no sort order inside uci data so we need multiple checks + ucv_domain=$($uc_uci get $g_cfgfile.$uc_name.domain 2>/dev/null) + ucv_object=$($uc_uci get $g_cfgfile.$uc_name.upd_object 2>/dev/null) + # still old option domain + if [ -n "$ucv_domain" ]; then + ucv_new=$(mod_cloudflare_v1_domain "$ucv_domain") || g_pslerr=1 + # no error save data save data + [ $g_pslerr -eq 0 ] && \ + $uc_uci set $g_cfgfile.$uc_name.domain="$ucv_new" + fi + # already new option upd_object + if [ -n "$ucv_object" ]; then + ucv_new=$(mod_cloudflare_v1_domain "$ucv_object") || g_pslerr=1 + # no error save data save data + [ $g_pslerr -eq 0 ] && \ + $uc_uci set $g_cfgfile.$uc_name.upd_object="$ucv_new" + fi + fi + unset ucv_domain ucv_object ucv_new + # set new option value + $uc_uci set $g_cfgfile.$uc_name.$uc_var="cloudflare.com-v1" + ;; dyndns\.org|dyndns\.com) - $udc_uci set $udc_pkg.$udc_name.$udc_var="dyn.com";; + $uc_uci set $g_cfgfile.$uc_name.$uc_var="dyn.com";; free\.editdns\.net) - $udc_uci set $udc_pkg.$udc_name.$udc_var="editdns.net";; + $uc_uci set $g_cfgfile.$uc_name.$uc_var="editdns.net";; domains\.google\.com) - $udc_uci set $udc_pkg.$udc_name.$udc_var="google.com";; + $uc_uci set $g_cfgfile.$uc_name.$uc_var="google.com";; loopia\.com) - $udc_uci set $udc_pkg.$udc_name.$udc_var="loopia.se";; + $uc_uci set $g_cfgfile.$uc_name.$uc_var="loopia.se";; NoIP\.com|No-IP\.com) - $udc_uci set $udc_pkg.$udc_name.$udc_var="no-ip.com";; + $uc_uci set $g_cfgfile.$uc_name.$uc_var="no-ip.com";; spdns\.de) - $udc_uci set $udc_pkg.$udc_name.$udc_var="spdyn.de";; + $uc_uci set $g_cfgfile.$uc_name.$uc_var="spdyn.de";; strato\.de) - $udc_uci set $udc_pkg.$udc_name.$udc_var="strato.com";; + $uc_uci set $g_cfgfile.$uc_name.$uc_var="strato.com";; *) # all others leave unchanged ;; esac # rename option service_name to option upd_provider -# $udc_uci rename $udc_pkg.$udc_name.$udc_var="upd_provider" +# $uc_uci rename $g_cfgfile.$uc_name.$uc_var="upd_provider" ;; - *) - # leave all other options currently unchanged + domain|upd_object) + # verify if lookup_host is set + $uc_uci get $g_cfgfile.$uc_name.lookup_host >/dev/null 2>&1 || \ + $uc_uci set $g_cfgfile.$uc_name.lookup_host="$uc_val" + if [ -f "$g_pslfile" ]; then + # if service_name/upd_provider cloudflare_v1 then change domain/upd_object to new syntax + # there is no sort order inside uci data so we need multiple checks + uco_provider=$($uc_uci get $g_cfgfile.$uc_name.upd_provider 2>/dev/null) || \ + uco_provider=$($uc_uci get $g_cfgfile.$uc_name.service_name 2>/dev/null) + if [ "$uco_provider" = "CloudFlare" \ + -o "$uco_provider" = "cloudflare.com" \ + -o "$uco_provider" = "cloudflare.com-v1" ]; then + ucv_new=$(mod_cloudflare_v1_domain "$uc_val") || g_pslerr=1 + # no error save data save data + [ $g_pslerr -eq 0 ] && \ + $uc_uci set $g_cfgfile.$uc_name.$uc_var="$ucv_new" + unset ucv_new + fi + unset uco_provider + fi + # rename option domain to option upd_object +# $uc_uci rename $g_cfgfile.$uc_name.$uc_var="upd_object" ;; +# dns_server) +# # if bind-nsupdate takeover old "dns_server" value as new "upd_nsupd_server" value +# uco_provider=$($uc_uci get $g_cfgfile.$uc_name.upd_provider 2>/dev/null) || \ +# uco_provider=$($uc_uci get $g_cfgfile.$uc_name.service_name 2>/dev/null) +# [ "$uco_provider" = "Bind-nsupdate" -o \ +# "$uco_provider" = "bind-nsupdate" ] && \ +# $uc_uci set $g_cfgfile.$uc_name.upd_nsupd_server="$uc_val" +# # rename option dns_server to new option global_dnssvr +# $udc_uci rename $g_cfgfile.$uc_name.$uc_var="global_dnssvr" +# ;; +# bind_network) +# $udc_uci set $g_cfgfile.$uc_name.upd_url_bindnet="$uc_val" +# $udc_uci rename $g_cfgfile.$uc_name.$uc_var="lip_url_bindnet" +# ;; +# proxy) +# # proxy value must include protocoll +# $udc_uci set $g_cfgfile.$uc_name.$uc_var="http://$uc_val" +# $udc_uci rename $g_cfgfile.$uc_name.$uc_var="upd_url_proxy" +# ;; +# use_ipv6) +# $udc_uci set $g_cfgfile.$uc_name.$uc_var="$(( 4 + ( 2 * $uc_val ) ))" +# $udc_uci rename $g_cfgfile.$uc_name.$uc_var="upd_ipversion" +# TODO update_url) +# TODO update_script) + # other renames +# TODO lookup_host) -> rip_host +# enabled) $udc_uci rename $g_cfgfile.$uc_name.$uc_var="upd_enabled";; +# force_dnstcp) $udc_uci rename $g_cfgfile.$uc_name.$uc_var="rip_host_dnstcp";; +# is_glue) $udc_uci rename $g_cfgfile.$uc_name.$uc_var="rip_host_isglue";; +# ip_interface) $udc_uci rename $g_cfgfile.$uc_name.$uc_var="lip_iface";; +# ip_network) $udc_uci rename $g_cfgfile.$uc_name.$uc_var="lip_net";; +# use_https) $udc_uci rename $g_cfgfile.$uc_name.$uc_var="upd_url_secure";; +# cacert) $udc_uci rename $g_cfgfile.$uc_name.$uc_var="upd_url_cacert";; +# username) $udc_uci rename $g_cfgfile.$uc_name.$uc_var="upd_username";; +# password) $udc_uci rename $g_cfgfile.$uc_name.$uc_var="upd_password";; +# param_opt) $udc_uci rename $g_cfgfile.$uc_name.$uc_var="upd_paramopt";; +# param_enc) $udc_uci rename $g_cfgfile.$uc_name.$uc_var="upd_paramenc";; + + # leave all other options currently unchanged + *) ;; esac return 0 } @@ -73,27 +269,41 @@ update_ddns_config() { fi } - # read package config file - udc_data=$($udc_uci -S -n export "$udc_pkg") - udc_ret="$?" - # No error and udc_data then execute (eval) + # read config file + uc_data=$($uc_uci -S -n export "$g_cfgfile") + uc_ret="$?" + # Error then create config file + [ $uc_ret -ne 0 ] && { + touch /etc/config/$uc_cfgfile + chmod 644 /etc/config/$uc_cfgfile + } + # No error and uc_data then execute (eval) # this will call functions defined above - [ "$udc_ret" -eq 0 -a -n "$udc_data" ] && eval "$udc_data" + [ $uc_ret -eq 0 -a -n "$uc_data" ] && eval "$uc_data" # add config ddns "global" (ignore error if exists) - $udc_uci set ddns.global="$udc_pkg" + $uc_uci set ddns.global="$g_cfgfile" # write changes to config file - $udc_uci commit "$udc_pkg" + $uc_uci commit "$g_cfgfile" - unset udc_uci udc_pkg udc_cfg udc_name udc_var udc_val udc_ret udc_data + unset uc_uci uc_cfg uc_name uc_var uc_val uc_ret uc_data return 0 } -# do existing config update -update_ddns_config - -# clear Ludc_uci indexcache +# clear LuCI indexcache rm -f /tmp/luci-indexcache >/dev/null 2>&1 +# do config update +update_config + +#cleanup +[ $g_pslerr -ne 0 ] && { + unset g_pslfile g_pslerr g_cfgfile + return 1 +} + +[ -f "$g_pslfile" ] && rm -f "$g_pslfile" +unset g_pslfile g_pslerr g_cfgfile return 0 + diff --git a/net/ddns-scripts/files/dynamic_dns_functions.sh b/net/ddns-scripts/files/dynamic_dns_functions.sh index 8d64851..c8b3962 100755 --- a/net/ddns-scripts/files/dynamic_dns_functions.sh +++ b/net/ddns-scripts/files/dynamic_dns_functions.sh @@ -6,7 +6,7 @@ # (Loosely) based on the script on the one posted by exobyte in the forums here: # http://forum.openwrt.org/viewtopic.php?id=14040 # extended and partial rewritten -#.2014-2016 Christian Schoenebeck +#.2014-2017 Christian Schoenebeck # # function timeout # copied from http://www.ict.griffith.edu.au/anthony/software/timeout.sh @@ -21,9 +21,9 @@ . /lib/functions/network.sh # GLOBAL VARIABLES # -VERSION="2.7.6" +VERSION="2.7.6-13" SECTION_ID="" # hold config's section name -VERBOSE=1 # default mode is log to console, but easily changed with parameter +VERBOSE=0 # default mode is log to console, but easily changed with parameter MYPROG=$(basename $0) # my program call name LOGFILE="" # logfile - all files are set in dynamic_dns_updater.sh @@ -89,22 +89,22 @@ UCLIENT_FETCH_SSL=$(find /lib /usr/lib -name libustream-ssl.so* 2>/dev/null) # Global configuration settings # allow NON-public IP's -upd_privateip=$(uci -q get ddns.global.allow_local_ip) || upd_privateip=0 +upd_privateip=$(uci -q get ddns.global.upd_privateip) || upd_privateip=0 # directory to store run information to. -ddns_rundir=$(uci -q get ddns.global.run_dir) || ddns_rundir="/var/run/ddns" +ddns_rundir=$(uci -q get ddns.global.ddns_rundir) || ddns_rundir="/var/run/ddns" [ -d $ddns_rundir ] || mkdir -p -m755 $ddns_rundir # directory to store log files -ddns_logdir=$(uci -q get ddns.global.log_dir) || ddns_logdir="/var/log/ddns" +ddns_logdir=$(uci -q get ddns.global.ddns_logdir) || ddns_logdir="/var/log/ddns" [ -d $ddns_logdir ] || mkdir -p -m755 $ddns_logdir # number of lines to before rotate logfile -ddns_loglines=$(uci -q get ddns.global.log_lines) || ddns_loglines=250 +ddns_loglines=$(uci -q get ddns.global.ddns_loglines) || ddns_loglines=250 ddns_loglines=$((ddns_loglines + 1)) # correct sed handling # format to show date information in log and luci-app-ddns default ISO 8601 format -ddns_dateformat=$(uci -q get ddns.global.date_format) || ddns_dateformat="%F %R" +ddns_dateformat=$(uci -q get ddns.global.ddns_dateformat) || ddns_dateformat="%F %R" DATE_PROG="date +'$ddns_dateformat'" # USE_CURL if GNU Wget and cURL installed normally Wget is used by do_transfer() @@ -907,6 +907,8 @@ get_local_ip () { __ERR=$? if [ $__ERR -eq 0 ]; then # DATFILE (sample) + # 10: l2tp-inet: mtu 1456 qdisc fq_codel state UNKNOWN qlen 3\ link/ppp + # 10: l2tp-inet inet 95.30.176.51 peer 95.30.176.1/32 scope global l2tp-inet\ valid_lft forever preferred_lft forever # 5: eth1: mtu 1500 qdisc fq_codel state UP qlen 1000\ link/ether 08:00:27:d0:10:32 brd ff:ff:ff:ff:ff:ff # 5: eth1 inet 172.27.10.128/24 brd 172.27.10.255 scope global eth1\ valid_lft forever preferred_lft forever # 5: eth1 inet 172.55.55.155/24 brd 172.27.10.255 scope global eth1\ valid_lft 12345sec preferred_lft 12345sec @@ -915,9 +917,11 @@ get_local_ip () { # 5: eth1 inet6 fd43:5368:6f6d:6500:a00:27ff:fed0:1032/64 scope global dynamic \ valid_lft 14352sec preferred_lft 14352sec # 5: eth1 inet6 2002:b0c7:f326::a00:27ff:fed0:1032/64 scope global dynamic \ valid_lft 14352sec preferred_lft 14352sec - # remove remove remove replace remove remove - # BROADCAST inet6 fxxx sec forever=>-1 between / and pref.. linestart to inet - sed -i "/BROADCAST/d; /inet6 f/d; s/sec//g; s/forever/-1/g; s/\/.*preferred_lft//g; s/^.*$ip_interface *//g" $DATFILE + # remove remove remove replace replace + # link inet6 fxxx sec forever=>-1 / => ' ' to separate subnet from ip + sed "/link/d; /inet6 f/d; s/sec//g; s/forever/-1/g; s/\// /g" $DATFILE | \ + awk '{ print $3" "$4" "$NF }' > $ERRFILE # temp reuse ERRFILE + # we only need inet? IP prefered time local __TIME4=0; local __TIME6=0 local __TYP __ADR __TIME @@ -932,7 +936,7 @@ get_local_ip () { __DATA4="$__ADR" __TIME4="$__TIME" } - done < $DATFILE + done < $ERRFILE else write_log 3 "ip Error: '$__ERR'" write_log 7 "$(cat $ERRFILE)" # report error @@ -1121,18 +1125,16 @@ get_registered_ip() { write_log 3 "$__PROG error: '$__ERR'" write_log 7 "$(cat $ERRFILE)" else - if [ -n "$BIND_HOST" ]; then + if [ -n "$BIND_HOST" -o -n "$KNOT_HOST" ]; then if [ $is_glue -eq 1 ]; then - __DATA=$(cat $DATFILE | grep "^$lookup_host" | grep -m 1 -o "$__REGEX" ) + __DATA=$(cat $DATFILE | grep "^$lookup_host" | grep -om1 "$__REGEX" ) else __DATA=$(cat $DATFILE | awk -F "address " '/has/ {print $2; exit}' ) fi - elif [ -n "$KNOT_HOST" ]; then - __DATA=$(cat $DATFILE | awk -F "address " '/has/ {print $2; exit}' ) elif [ -n "$DRILL" ]; then __DATA=$(cat $DATFILE | awk '/^'"$lookup_host"'/ {print $5; exit}' ) elif [ -n "$HOSTIP" ]; then - __DATA=$(cat $DATFILE | grep -m 1 -o "$__REGEX") + __DATA=$(cat $DATFILE | grep -om1 "$__REGEX") elif [ -n "$NSLOOKUP" ]; then __DATA=$(cat $DATFILE | sed -ne "/^Name:/,\$ { s/^Address[0-9 ]\{0,\}: \($__REGEX\).*$/\\1/p }" ) fi diff --git a/net/ddns-scripts/files/dynamic_dns_lucihelper.sh b/net/ddns-scripts/files/dynamic_dns_lucihelper.sh index b2831e6..4948e98 100755 --- a/net/ddns-scripts/files/dynamic_dns_lucihelper.sh +++ b/net/ddns-scripts/files/dynamic_dns_lucihelper.sh @@ -2,7 +2,7 @@ # /usr/lib/ddns/dynamic_dns_lucihelper.sh # #.Distributed under the terms of the GNU General Public License (GPL) version 2.0 -#.2014-2016 Christian Schoenebeck +#.2014-2017 Christian Schoenebeck # This script is used by luci-app-ddns # # variables in small chars are read from /etc/config/ddns as parameter given here diff --git a/net/ddns-scripts/files/dynamic_dns_updater.sh b/net/ddns-scripts/files/dynamic_dns_updater.sh index c58be2e..46e5842 100755 --- a/net/ddns-scripts/files/dynamic_dns_updater.sh +++ b/net/ddns-scripts/files/dynamic_dns_updater.sh @@ -6,7 +6,7 @@ # (Loosely) based on the script on the one posted by exobyte in the forums here: # http://forum.openwrt.org/viewtopic.php?id=14040 # extended and partial rewritten -#.2014-2016 Christian Schoenebeck +#.2014-2017 Christian Schoenebeck # # variables in small chars are read from /etc/config/ddns # variables in big chars are defined inside these scripts as global vars @@ -299,7 +299,7 @@ get_uptime CURR_TIME if [ $LAST_TIME -eq 0 ]; then write_log 7 "last update: never" else - EPOCH_TIME=$(( $(date +%s) - CURR_TIME + LAST_TIME )) + EPOCH_TIME=$(( $(date +%s) - $CURR_TIME + $LAST_TIME )) EPOCH_TIME="date -d @$EPOCH_TIME +'$ddns_dateformat'" write_log 7 "last update: $(eval $EPOCH_TIME)" fi diff --git a/net/ddns-scripts/files/public_suffix_list.dat b/net/ddns-scripts/files/public_suffix_list.dat new file mode 100644 index 0000000..998973b --- /dev/null +++ b/net/ddns-scripts/files/public_suffix_list.dat @@ -0,0 +1,12310 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + +// Please pull this list from, and only from https://publicsuffix.org/list/public_suffix_list.dat, +// rather than any other VCS sites. Pulling from any other URL is not guaranteed to be supported. + +// Instructions on pulling and using this list can be found at https://publicsuffix.org/list/. + +// ===BEGIN ICANN DOMAINS=== + +// ac : https://en.wikipedia.org/wiki/.ac +ac +com.ac +edu.ac +gov.ac +net.ac +mil.ac +org.ac + +// ad : https://en.wikipedia.org/wiki/.ad +ad +nom.ad + +// ae : https://en.wikipedia.org/wiki/.ae +// see also: "Domain Name Eligibility Policy" at http://www.aeda.ae/eng/aepolicy.php +ae +co.ae +net.ae +org.ae +sch.ae +ac.ae +gov.ae +mil.ae + +// aero : see https://www.information.aero/index.php?id=66 +aero +accident-investigation.aero +accident-prevention.aero +aerobatic.aero +aeroclub.aero +aerodrome.aero +agents.aero +aircraft.aero +airline.aero +airport.aero +air-surveillance.aero +airtraffic.aero +air-traffic-control.aero +ambulance.aero +amusement.aero +association.aero +author.aero +ballooning.aero +broker.aero +caa.aero +cargo.aero +catering.aero +certification.aero +championship.aero +charter.aero +civilaviation.aero +club.aero +conference.aero +consultant.aero +consulting.aero +control.aero +council.aero +crew.aero +design.aero +dgca.aero +educator.aero +emergency.aero +engine.aero +engineer.aero +entertainment.aero +equipment.aero +exchange.aero +express.aero +federation.aero +flight.aero +freight.aero +fuel.aero +gliding.aero +government.aero +groundhandling.aero +group.aero +hanggliding.aero +homebuilt.aero +insurance.aero +journal.aero +journalist.aero +leasing.aero +logistics.aero +magazine.aero +maintenance.aero +media.aero +microlight.aero +modelling.aero +navigation.aero +parachuting.aero +paragliding.aero +passenger-association.aero +pilot.aero +press.aero +production.aero +recreation.aero +repbody.aero +res.aero +research.aero +rotorcraft.aero +safety.aero +scientist.aero +services.aero +show.aero +skydiving.aero +software.aero +student.aero +trader.aero +trading.aero +trainer.aero +union.aero +workinggroup.aero +works.aero + +// af : http://www.nic.af/help.jsp +af +gov.af +com.af +org.af +net.af +edu.af + +// ag : http://www.nic.ag/prices.htm +ag +com.ag +org.ag +net.ag +co.ag +nom.ag + +// ai : http://nic.com.ai/ +ai +off.ai +com.ai +net.ai +org.ai + +// al : http://www.ert.gov.al/ert_alb/faq_det.html?Id=31 +al +com.al +edu.al +gov.al +mil.al +net.al +org.al + +// am : https://en.wikipedia.org/wiki/.am +am + +// ao : https://en.wikipedia.org/wiki/.ao +// http://www.dns.ao/REGISTR.DOC +ao +ed.ao +gv.ao +og.ao +co.ao +pb.ao +it.ao + +// aq : https://en.wikipedia.org/wiki/.aq +aq + +// ar : https://nic.ar/normativa-vigente.xhtml +ar +com.ar +edu.ar +gob.ar +gov.ar +int.ar +mil.ar +net.ar +org.ar +tur.ar + +// arpa : https://en.wikipedia.org/wiki/.arpa +// Confirmed by registry 2008-06-18 +arpa +e164.arpa +in-addr.arpa +ip6.arpa +iris.arpa +uri.arpa +urn.arpa + +// as : https://en.wikipedia.org/wiki/.as +as +gov.as + +// asia : https://en.wikipedia.org/wiki/.asia +asia + +// at : https://en.wikipedia.org/wiki/.at +// Confirmed by registry 2008-06-17 +at +ac.at +co.at +gv.at +or.at + +// au : https://en.wikipedia.org/wiki/.au +// http://www.auda.org.au/ +au +// 2LDs +com.au +net.au +org.au +edu.au +gov.au +asn.au +id.au +// Historic 2LDs (closed to new registration, but sites still exist) +info.au +conf.au +oz.au +// CGDNs - http://www.cgdn.org.au/ +act.au +nsw.au +nt.au +qld.au +sa.au +tas.au +vic.au +wa.au +// 3LDs +act.edu.au +nsw.edu.au +nt.edu.au +qld.edu.au +sa.edu.au +tas.edu.au +vic.edu.au +wa.edu.au +// act.gov.au Bug 984824 - Removed at request of Greg Tankard +// nsw.gov.au Bug 547985 - Removed at request of +// nt.gov.au Bug 940478 - Removed at request of Greg Connors +qld.gov.au +sa.gov.au +tas.gov.au +vic.gov.au +wa.gov.au + +// aw : https://en.wikipedia.org/wiki/.aw +aw +com.aw + +// ax : https://en.wikipedia.org/wiki/.ax +ax + +// az : https://en.wikipedia.org/wiki/.az +az +com.az +net.az +int.az +gov.az +org.az +edu.az +info.az +pp.az +mil.az +name.az +pro.az +biz.az + +// ba : http://nic.ba/users_data/files/pravilnik_o_registraciji.pdf +ba +com.ba +edu.ba +gov.ba +mil.ba +net.ba +org.ba + +// bb : https://en.wikipedia.org/wiki/.bb +bb +biz.bb +co.bb +com.bb +edu.bb +gov.bb +info.bb +net.bb +org.bb +store.bb +tv.bb + +// bd : https://en.wikipedia.org/wiki/.bd +*.bd + +// be : https://en.wikipedia.org/wiki/.be +// Confirmed by registry 2008-06-08 +be +ac.be + +// bf : https://en.wikipedia.org/wiki/.bf +bf +gov.bf + +// bg : https://en.wikipedia.org/wiki/.bg +// https://www.register.bg/user/static/rules/en/index.html +bg +a.bg +b.bg +c.bg +d.bg +e.bg +f.bg +g.bg +h.bg +i.bg +j.bg +k.bg +l.bg +m.bg +n.bg +o.bg +p.bg +q.bg +r.bg +s.bg +t.bg +u.bg +v.bg +w.bg +x.bg +y.bg +z.bg +0.bg +1.bg +2.bg +3.bg +4.bg +5.bg +6.bg +7.bg +8.bg +9.bg + +// bh : https://en.wikipedia.org/wiki/.bh +bh +com.bh +edu.bh +net.bh +org.bh +gov.bh + +// bi : https://en.wikipedia.org/wiki/.bi +// http://whois.nic.bi/ +bi +co.bi +com.bi +edu.bi +or.bi +org.bi + +// biz : https://en.wikipedia.org/wiki/.biz +biz + +// bj : https://en.wikipedia.org/wiki/.bj +bj +asso.bj +barreau.bj +gouv.bj + +// bm : http://www.bermudanic.bm/dnr-text.txt +bm +com.bm +edu.bm +gov.bm +net.bm +org.bm + +// bn : https://en.wikipedia.org/wiki/.bn +*.bn + +// bo : http://www.nic.bo/ +bo +com.bo +edu.bo +gov.bo +gob.bo +int.bo +org.bo +net.bo +mil.bo +tv.bo + +// br : http://registro.br/dominio/categoria.html +// Submitted by registry +br +adm.br +adv.br +agr.br +am.br +arq.br +art.br +ato.br +b.br +bio.br +blog.br +bmd.br +cim.br +cng.br +cnt.br +com.br +coop.br +ecn.br +eco.br +edu.br +emp.br +eng.br +esp.br +etc.br +eti.br +far.br +flog.br +fm.br +fnd.br +fot.br +fst.br +g12.br +ggf.br +gov.br +imb.br +ind.br +inf.br +jor.br +jus.br +leg.br +lel.br +mat.br +med.br +mil.br +mp.br +mus.br +net.br +*.nom.br +not.br +ntr.br +odo.br +org.br +ppg.br +pro.br +psc.br +psi.br +qsl.br +radio.br +rec.br +slg.br +srv.br +taxi.br +teo.br +tmp.br +trd.br +tur.br +tv.br +vet.br +vlog.br +wiki.br +zlg.br + +// bs : http://www.nic.bs/rules.html +bs +com.bs +net.bs +org.bs +edu.bs +gov.bs + +// bt : https://en.wikipedia.org/wiki/.bt +bt +com.bt +edu.bt +gov.bt +net.bt +org.bt + +// bv : No registrations at this time. +// Submitted by registry +bv + +// bw : https://en.wikipedia.org/wiki/.bw +// http://www.gobin.info/domainname/bw.doc +// list of other 2nd level tlds ? +bw +co.bw +org.bw + +// by : https://en.wikipedia.org/wiki/.by +// http://tld.by/rules_2006_en.html +// list of other 2nd level tlds ? +by +gov.by +mil.by +// Official information does not indicate that com.by is a reserved +// second-level domain, but it's being used as one (see www.google.com.by and +// www.yahoo.com.by, for example), so we list it here for safety's sake. +com.by + +// http://hoster.by/ +of.by + +// bz : https://en.wikipedia.org/wiki/.bz +// http://www.belizenic.bz/ +bz +com.bz +net.bz +org.bz +edu.bz +gov.bz + +// ca : https://en.wikipedia.org/wiki/.ca +ca +// ca geographical names +ab.ca +bc.ca +mb.ca +nb.ca +nf.ca +nl.ca +ns.ca +nt.ca +nu.ca +on.ca +pe.ca +qc.ca +sk.ca +yk.ca +// gc.ca: https://en.wikipedia.org/wiki/.gc.ca +// see also: http://registry.gc.ca/en/SubdomainFAQ +gc.ca + +// cat : https://en.wikipedia.org/wiki/.cat +cat + +// cc : https://en.wikipedia.org/wiki/.cc +cc + +// cd : https://en.wikipedia.org/wiki/.cd +// see also: https://www.nic.cd/domain/insertDomain_2.jsp?act=1 +cd +gov.cd + +// cf : https://en.wikipedia.org/wiki/.cf +cf + +// cg : https://en.wikipedia.org/wiki/.cg +cg + +// ch : https://en.wikipedia.org/wiki/.ch +ch + +// ci : https://en.wikipedia.org/wiki/.ci +// http://www.nic.ci/index.php?page=charte +ci +org.ci +or.ci +com.ci +co.ci +edu.ci +ed.ci +ac.ci +net.ci +go.ci +asso.ci +xn--aroport-bya.ci +aéroport.ci +int.ci +presse.ci +md.ci +gouv.ci + +// ck : https://en.wikipedia.org/wiki/.ck +*.ck +!www.ck + +// cl : https://en.wikipedia.org/wiki/.cl +cl +gov.cl +gob.cl +co.cl +mil.cl + +// cm : https://en.wikipedia.org/wiki/.cm plus bug 981927 +cm +co.cm +com.cm +gov.cm +net.cm + +// cn : https://en.wikipedia.org/wiki/.cn +// Submitted by registry +cn +ac.cn +com.cn +edu.cn +gov.cn +net.cn +org.cn +mil.cn +xn--55qx5d.cn +公司.cn +xn--io0a7i.cn +网络.cn +xn--od0alg.cn +網絡.cn +// cn geographic names +ah.cn +bj.cn +cq.cn +fj.cn +gd.cn +gs.cn +gz.cn +gx.cn +ha.cn +hb.cn +he.cn +hi.cn +hl.cn +hn.cn +jl.cn +js.cn +jx.cn +ln.cn +nm.cn +nx.cn +qh.cn +sc.cn +sd.cn +sh.cn +sn.cn +sx.cn +tj.cn +xj.cn +xz.cn +yn.cn +zj.cn +hk.cn +mo.cn +tw.cn + +// co : https://en.wikipedia.org/wiki/.co +// Submitted by registry +co +arts.co +com.co +edu.co +firm.co +gov.co +info.co +int.co +mil.co +net.co +nom.co +org.co +rec.co +web.co + +// com : https://en.wikipedia.org/wiki/.com +com + +// coop : https://en.wikipedia.org/wiki/.coop +coop + +// cr : http://www.nic.cr/niccr_publico/showRegistroDominiosScreen.do +cr +ac.cr +co.cr +ed.cr +fi.cr +go.cr +or.cr +sa.cr + +// cu : https://en.wikipedia.org/wiki/.cu +cu +com.cu +edu.cu +org.cu +net.cu +gov.cu +inf.cu + +// cv : https://en.wikipedia.org/wiki/.cv +cv + +// cw : http://www.una.cw/cw_registry/ +// Confirmed by registry 2013-03-26 +cw +com.cw +edu.cw +net.cw +org.cw + +// cx : https://en.wikipedia.org/wiki/.cx +// list of other 2nd level tlds ? +cx +gov.cx + +// cy : http://www.nic.cy/ +// Submitted by registry Panayiotou Fotia +cy +ac.cy +biz.cy +com.cy +ekloges.cy +gov.cy +ltd.cy +name.cy +net.cy +org.cy +parliament.cy +press.cy +pro.cy +tm.cy + +// cz : https://en.wikipedia.org/wiki/.cz +cz + +// de : https://en.wikipedia.org/wiki/.de +// Confirmed by registry (with technical +// reservations) 2008-07-01 +de + +// dj : https://en.wikipedia.org/wiki/.dj +dj + +// dk : https://en.wikipedia.org/wiki/.dk +// Confirmed by registry 2008-06-17 +dk + +// dm : https://en.wikipedia.org/wiki/.dm +dm +com.dm +net.dm +org.dm +edu.dm +gov.dm + +// do : https://en.wikipedia.org/wiki/.do +do +art.do +com.do +edu.do +gob.do +gov.do +mil.do +net.do +org.do +sld.do +web.do + +// dz : https://en.wikipedia.org/wiki/.dz +dz +com.dz +org.dz +net.dz +gov.dz +edu.dz +asso.dz +pol.dz +art.dz + +// ec : http://www.nic.ec/reg/paso1.asp +// Submitted by registry +ec +com.ec +info.ec +net.ec +fin.ec +k12.ec +med.ec +pro.ec +org.ec +edu.ec +gov.ec +gob.ec +mil.ec + +// edu : https://en.wikipedia.org/wiki/.edu +edu + +// ee : http://www.eenet.ee/EENet/dom_reeglid.html#lisa_B +ee +edu.ee +gov.ee +riik.ee +lib.ee +med.ee +com.ee +pri.ee +aip.ee +org.ee +fie.ee + +// eg : https://en.wikipedia.org/wiki/.eg +eg +com.eg +edu.eg +eun.eg +gov.eg +mil.eg +name.eg +net.eg +org.eg +sci.eg + +// er : https://en.wikipedia.org/wiki/.er +*.er + +// es : https://www.nic.es/site_ingles/ingles/dominios/index.html +es +com.es +nom.es +org.es +gob.es +edu.es + +// et : https://en.wikipedia.org/wiki/.et +et +com.et +gov.et +org.et +edu.et +biz.et +name.et +info.et +net.et + +// eu : https://en.wikipedia.org/wiki/.eu +eu + +// fi : https://en.wikipedia.org/wiki/.fi +fi +// aland.fi : https://en.wikipedia.org/wiki/.ax +// This domain is being phased out in favor of .ax. As there are still many +// domains under aland.fi, we still keep it on the list until aland.fi is +// completely removed. +// TODO: Check for updates (expected to be phased out around Q1/2009) +aland.fi + +// fj : https://en.wikipedia.org/wiki/.fj +*.fj + +// fk : https://en.wikipedia.org/wiki/.fk +*.fk + +// fm : https://en.wikipedia.org/wiki/.fm +fm + +// fo : https://en.wikipedia.org/wiki/.fo +fo + +// fr : http://www.afnic.fr/ +// domaines descriptifs : http://www.afnic.fr/obtenir/chartes/nommage-fr/annexe-descriptifs +fr +com.fr +asso.fr +nom.fr +prd.fr +presse.fr +tm.fr +// domaines sectoriels : http://www.afnic.fr/obtenir/chartes/nommage-fr/annexe-sectoriels +aeroport.fr +assedic.fr +avocat.fr +avoues.fr +cci.fr +chambagri.fr +chirurgiens-dentistes.fr +experts-comptables.fr +geometre-expert.fr +gouv.fr +greta.fr +huissier-justice.fr +medecin.fr +notaires.fr +pharmacien.fr +port.fr +veterinaire.fr + +// ga : https://en.wikipedia.org/wiki/.ga +ga + +// gb : This registry is effectively dormant +// Submitted by registry +gb + +// gd : https://en.wikipedia.org/wiki/.gd +gd + +// ge : http://www.nic.net.ge/policy_en.pdf +ge +com.ge +edu.ge +gov.ge +org.ge +mil.ge +net.ge +pvt.ge + +// gf : https://en.wikipedia.org/wiki/.gf +gf + +// gg : http://www.channelisles.net/register-domains/ +// Confirmed by registry 2013-11-28 +gg +co.gg +net.gg +org.gg + +// gh : https://en.wikipedia.org/wiki/.gh +// see also: http://www.nic.gh/reg_now.php +// Although domains directly at second level are not possible at the moment, +// they have been possible for some time and may come back. +gh +com.gh +edu.gh +gov.gh +org.gh +mil.gh + +// gi : http://www.nic.gi/rules.html +gi +com.gi +ltd.gi +gov.gi +mod.gi +edu.gi +org.gi + +// gl : https://en.wikipedia.org/wiki/.gl +// http://nic.gl +gl +co.gl +com.gl +edu.gl +net.gl +org.gl + +// gm : http://www.nic.gm/htmlpages%5Cgm-policy.htm +gm + +// gn : http://psg.com/dns/gn/gn.txt +// Submitted by registry +gn +ac.gn +com.gn +edu.gn +gov.gn +org.gn +net.gn + +// gov : https://en.wikipedia.org/wiki/.gov +gov + +// gp : http://www.nic.gp/index.php?lang=en +gp +com.gp +net.gp +mobi.gp +edu.gp +org.gp +asso.gp + +// gq : https://en.wikipedia.org/wiki/.gq +gq + +// gr : https://grweb.ics.forth.gr/english/1617-B-2005.html +// Submitted by registry +gr +com.gr +edu.gr +net.gr +org.gr +gov.gr + +// gs : https://en.wikipedia.org/wiki/.gs +gs + +// gt : http://www.gt/politicas_de_registro.html +gt +com.gt +edu.gt +gob.gt +ind.gt +mil.gt +net.gt +org.gt + +// gu : http://gadao.gov.gu/registration.txt +*.gu + +// gw : https://en.wikipedia.org/wiki/.gw +gw + +// gy : https://en.wikipedia.org/wiki/.gy +// http://registry.gy/ +gy +co.gy +com.gy +edu.gy +gov.gy +net.gy +org.gy + +// hk : https://www.hkdnr.hk +// Submitted by registry +hk +com.hk +edu.hk +gov.hk +idv.hk +net.hk +org.hk +xn--55qx5d.hk +公司.hk +xn--wcvs22d.hk +教育.hk +xn--lcvr32d.hk +敎育.hk +xn--mxtq1m.hk +政府.hk +xn--gmqw5a.hk +個人.hk +xn--ciqpn.hk +个人.hk +xn--gmq050i.hk +箇人.hk +xn--zf0avx.hk +網络.hk +xn--io0a7i.hk +网络.hk +xn--mk0axi.hk +组織.hk +xn--od0alg.hk +網絡.hk +xn--od0aq3b.hk +网絡.hk +xn--tn0ag.hk +组织.hk +xn--uc0atv.hk +組織.hk +xn--uc0ay4a.hk +組织.hk + +// hm : https://en.wikipedia.org/wiki/.hm +hm + +// hn : http://www.nic.hn/politicas/ps02,,05.html +hn +com.hn +edu.hn +org.hn +net.hn +mil.hn +gob.hn + +// hr : http://www.dns.hr/documents/pdf/HRTLD-regulations.pdf +hr +iz.hr +from.hr +name.hr +com.hr + +// ht : http://www.nic.ht/info/charte.cfm +ht +com.ht +shop.ht +firm.ht +info.ht +adult.ht +net.ht +pro.ht +org.ht +med.ht +art.ht +coop.ht +pol.ht +asso.ht +edu.ht +rel.ht +gouv.ht +perso.ht + +// hu : http://www.domain.hu/domain/English/sld.html +// Confirmed by registry 2008-06-12 +hu +co.hu +info.hu +org.hu +priv.hu +sport.hu +tm.hu +2000.hu +agrar.hu +bolt.hu +casino.hu +city.hu +erotica.hu +erotika.hu +film.hu +forum.hu +games.hu +hotel.hu +ingatlan.hu +jogasz.hu +konyvelo.hu +lakas.hu +media.hu +news.hu +reklam.hu +sex.hu +shop.hu +suli.hu +szex.hu +tozsde.hu +utazas.hu +video.hu + +// id : https://register.pandi.or.id/ +id +ac.id +biz.id +co.id +desa.id +go.id +mil.id +my.id +net.id +or.id +sch.id +web.id + +// ie : https://en.wikipedia.org/wiki/.ie +ie +gov.ie + +// il : http://www.isoc.org.il/domains/ +il +ac.il +co.il +gov.il +idf.il +k12.il +muni.il +net.il +org.il + +// im : https://www.nic.im/ +// Submitted by registry +im +ac.im +co.im +com.im +ltd.co.im +net.im +org.im +plc.co.im +tt.im +tv.im + +// in : https://en.wikipedia.org/wiki/.in +// see also: https://registry.in/Policies +// Please note, that nic.in is not an official eTLD, but used by most +// government institutions. +in +co.in +firm.in +net.in +org.in +gen.in +ind.in +nic.in +ac.in +edu.in +res.in +gov.in +mil.in + +// info : https://en.wikipedia.org/wiki/.info +info + +// int : https://en.wikipedia.org/wiki/.int +// Confirmed by registry 2008-06-18 +int +eu.int + +// io : http://www.nic.io/rules.html +// list of other 2nd level tlds ? +io +com.io + +// iq : http://www.cmc.iq/english/iq/iqregister1.htm +iq +gov.iq +edu.iq +mil.iq +com.iq +org.iq +net.iq + +// ir : http://www.nic.ir/Terms_and_Conditions_ir,_Appendix_1_Domain_Rules +// Also see http://www.nic.ir/Internationalized_Domain_Names +// Two .ir entries added at request of , 2010-04-16 +ir +ac.ir +co.ir +gov.ir +id.ir +net.ir +org.ir +sch.ir +// xn--mgba3a4f16a.ir (.ir, Persian YEH) +xn--mgba3a4f16a.ir +ایران.ir +// xn--mgba3a4fra.ir (.ir, Arabic YEH) +xn--mgba3a4fra.ir +ايران.ir + +// is : http://www.isnic.is/domain/rules.php +// Confirmed by registry 2008-12-06 +is +net.is +com.is +edu.is +gov.is +org.is +int.is + +// it : https://en.wikipedia.org/wiki/.it +it +gov.it +edu.it +// Reserved geo-names: +// http://www.nic.it/documenti/regolamenti-e-linee-guida/regolamento-assegnazione-versione-6.0.pdf +// There is also a list of reserved geo-names corresponding to Italian municipalities +// http://www.nic.it/documenti/appendice-c.pdf, but it is not included here. +// Regions +abr.it +abruzzo.it +aosta-valley.it +aostavalley.it +bas.it +basilicata.it +cal.it +calabria.it +cam.it +campania.it +emilia-romagna.it +emiliaromagna.it +emr.it +friuli-v-giulia.it +friuli-ve-giulia.it +friuli-vegiulia.it +friuli-venezia-giulia.it +friuli-veneziagiulia.it +friuli-vgiulia.it +friuliv-giulia.it +friulive-giulia.it +friulivegiulia.it +friulivenezia-giulia.it +friuliveneziagiulia.it +friulivgiulia.it +fvg.it +laz.it +lazio.it +lig.it +liguria.it +lom.it +lombardia.it +lombardy.it +lucania.it +mar.it +marche.it +mol.it +molise.it +piedmont.it +piemonte.it +pmn.it +pug.it +puglia.it +sar.it +sardegna.it +sardinia.it +sic.it +sicilia.it +sicily.it +taa.it +tos.it +toscana.it +trentino-a-adige.it +trentino-aadige.it +trentino-alto-adige.it +trentino-altoadige.it +trentino-s-tirol.it +trentino-stirol.it +trentino-sud-tirol.it +trentino-sudtirol.it +trentino-sued-tirol.it +trentino-suedtirol.it +trentinoa-adige.it +trentinoaadige.it +trentinoalto-adige.it +trentinoaltoadige.it +trentinos-tirol.it +trentinostirol.it +trentinosud-tirol.it +trentinosudtirol.it +trentinosued-tirol.it +trentinosuedtirol.it +tuscany.it +umb.it +umbria.it +val-d-aosta.it +val-daosta.it +vald-aosta.it +valdaosta.it +valle-aosta.it +valle-d-aosta.it +valle-daosta.it +valleaosta.it +valled-aosta.it +valledaosta.it +vallee-aoste.it +valleeaoste.it +vao.it +vda.it +ven.it +veneto.it +// Provinces +ag.it +agrigento.it +al.it +alessandria.it +alto-adige.it +altoadige.it +an.it +ancona.it +andria-barletta-trani.it +andria-trani-barletta.it +andriabarlettatrani.it +andriatranibarletta.it +ao.it +aosta.it +aoste.it +ap.it +aq.it +aquila.it +ar.it +arezzo.it +ascoli-piceno.it +ascolipiceno.it +asti.it +at.it +av.it +avellino.it +ba.it +balsan.it +bari.it +barletta-trani-andria.it +barlettatraniandria.it +belluno.it +benevento.it +bergamo.it +bg.it +bi.it +biella.it +bl.it +bn.it +bo.it +bologna.it +bolzano.it +bozen.it +br.it +brescia.it +brindisi.it +bs.it +bt.it +bz.it +ca.it +cagliari.it +caltanissetta.it +campidano-medio.it +campidanomedio.it +campobasso.it +carbonia-iglesias.it +carboniaiglesias.it +carrara-massa.it +carraramassa.it +caserta.it +catania.it +catanzaro.it +cb.it +ce.it +cesena-forli.it +cesenaforli.it +ch.it +chieti.it +ci.it +cl.it +cn.it +co.it +como.it +cosenza.it +cr.it +cremona.it +crotone.it +cs.it +ct.it +cuneo.it +cz.it +dell-ogliastra.it +dellogliastra.it +en.it +enna.it +fc.it +fe.it +fermo.it +ferrara.it +fg.it +fi.it +firenze.it +florence.it +fm.it +foggia.it +forli-cesena.it +forlicesena.it +fr.it +frosinone.it +ge.it +genoa.it +genova.it +go.it +gorizia.it +gr.it +grosseto.it +iglesias-carbonia.it +iglesiascarbonia.it +im.it +imperia.it +is.it +isernia.it +kr.it +la-spezia.it +laquila.it +laspezia.it +latina.it +lc.it +le.it +lecce.it +lecco.it +li.it +livorno.it +lo.it +lodi.it +lt.it +lu.it +lucca.it +macerata.it +mantova.it +massa-carrara.it +massacarrara.it +matera.it +mb.it +mc.it +me.it +medio-campidano.it +mediocampidano.it +messina.it +mi.it +milan.it +milano.it +mn.it +mo.it +modena.it +monza-brianza.it +monza-e-della-brianza.it +monza.it +monzabrianza.it +monzaebrianza.it +monzaedellabrianza.it +ms.it +mt.it +na.it +naples.it +napoli.it +no.it +novara.it +nu.it +nuoro.it +og.it +ogliastra.it +olbia-tempio.it +olbiatempio.it +or.it +oristano.it +ot.it +pa.it +padova.it +padua.it +palermo.it +parma.it +pavia.it +pc.it +pd.it +pe.it +perugia.it +pesaro-urbino.it +pesarourbino.it +pescara.it +pg.it +pi.it +piacenza.it +pisa.it +pistoia.it +pn.it +po.it +pordenone.it +potenza.it +pr.it +prato.it +pt.it +pu.it +pv.it +pz.it +ra.it +ragusa.it +ravenna.it +rc.it +re.it +reggio-calabria.it +reggio-emilia.it +reggiocalabria.it +reggioemilia.it +rg.it +ri.it +rieti.it +rimini.it +rm.it +rn.it +ro.it +roma.it +rome.it +rovigo.it +sa.it +salerno.it +sassari.it +savona.it +si.it +siena.it +siracusa.it +so.it +sondrio.it +sp.it +sr.it +ss.it +suedtirol.it +sv.it +ta.it +taranto.it +te.it +tempio-olbia.it +tempioolbia.it +teramo.it +terni.it +tn.it +to.it +torino.it +tp.it +tr.it +trani-andria-barletta.it +trani-barletta-andria.it +traniandriabarletta.it +tranibarlettaandria.it +trapani.it +trentino.it +trento.it +treviso.it +trieste.it +ts.it +turin.it +tv.it +ud.it +udine.it +urbino-pesaro.it +urbinopesaro.it +va.it +varese.it +vb.it +vc.it +ve.it +venezia.it +venice.it +verbania.it +vercelli.it +verona.it +vi.it +vibo-valentia.it +vibovalentia.it +vicenza.it +viterbo.it +vr.it +vs.it +vt.it +vv.it + +// je : http://www.channelisles.net/register-domains/ +// Confirmed by registry 2013-11-28 +je +co.je +net.je +org.je + +// jm : http://www.com.jm/register.html +*.jm + +// jo : http://www.dns.jo/Registration_policy.aspx +jo +com.jo +org.jo +net.jo +edu.jo +sch.jo +gov.jo +mil.jo +name.jo + +// jobs : https://en.wikipedia.org/wiki/.jobs +jobs + +// jp : https://en.wikipedia.org/wiki/.jp +// http://jprs.co.jp/en/jpdomain.html +// Submitted by registry +jp +// jp organizational type names +ac.jp +ad.jp +co.jp +ed.jp +go.jp +gr.jp +lg.jp +ne.jp +or.jp +// jp prefecture type names +aichi.jp +akita.jp +aomori.jp +chiba.jp +ehime.jp +fukui.jp +fukuoka.jp +fukushima.jp +gifu.jp +gunma.jp +hiroshima.jp +hokkaido.jp +hyogo.jp +ibaraki.jp +ishikawa.jp +iwate.jp +kagawa.jp +kagoshima.jp +kanagawa.jp +kochi.jp +kumamoto.jp +kyoto.jp +mie.jp +miyagi.jp +miyazaki.jp +nagano.jp +nagasaki.jp +nara.jp +niigata.jp +oita.jp +okayama.jp +okinawa.jp +osaka.jp +saga.jp +saitama.jp +shiga.jp +shimane.jp +shizuoka.jp +tochigi.jp +tokushima.jp +tokyo.jp +tottori.jp +toyama.jp +wakayama.jp +yamagata.jp +yamaguchi.jp +yamanashi.jp +xn--4pvxs.jp +栃木.jp +xn--vgu402c.jp +愛知.jp +xn--c3s14m.jp +愛媛.jp +xn--f6qx53a.jp +兵庫.jp +xn--8pvr4u.jp +熊本.jp +xn--uist22h.jp +茨城.jp +xn--djrs72d6uy.jp +北海道.jp +xn--mkru45i.jp +千葉.jp +xn--0trq7p7nn.jp +和歌山.jp +xn--8ltr62k.jp +長崎.jp +xn--2m4a15e.jp +長野.jp +xn--efvn9s.jp +新潟.jp +xn--32vp30h.jp +青森.jp +xn--4it797k.jp +静岡.jp +xn--1lqs71d.jp +東京.jp +xn--5rtp49c.jp +石川.jp +xn--5js045d.jp +埼玉.jp +xn--ehqz56n.jp +三重.jp +xn--1lqs03n.jp +京都.jp +xn--qqqt11m.jp +佐賀.jp +xn--kbrq7o.jp +大分.jp +xn--pssu33l.jp +大阪.jp +xn--ntsq17g.jp +奈良.jp +xn--uisz3g.jp +宮城.jp +xn--6btw5a.jp +宮崎.jp +xn--1ctwo.jp +富山.jp +xn--6orx2r.jp +山口.jp +xn--rht61e.jp +山形.jp +xn--rht27z.jp +山梨.jp +xn--djty4k.jp +岩手.jp +xn--nit225k.jp +岐阜.jp +xn--rht3d.jp +岡山.jp +xn--klty5x.jp +島根.jp +xn--kltx9a.jp +広島.jp +xn--kltp7d.jp +徳島.jp +xn--uuwu58a.jp +沖縄.jp +xn--zbx025d.jp +滋賀.jp +xn--ntso0iqx3a.jp +神奈川.jp +xn--elqq16h.jp +福井.jp +xn--4it168d.jp +福岡.jp +xn--klt787d.jp +福島.jp +xn--rny31h.jp +秋田.jp +xn--7t0a264c.jp +群馬.jp +xn--5rtq34k.jp +香川.jp +xn--k7yn95e.jp +高知.jp +xn--tor131o.jp +鳥取.jp +xn--d5qv7z876c.jp +鹿児島.jp +// jp geographic type names +// http://jprs.jp/doc/rule/saisoku-1.html +*.kawasaki.jp +*.kitakyushu.jp +*.kobe.jp +*.nagoya.jp +*.sapporo.jp +*.sendai.jp +*.yokohama.jp +!city.kawasaki.jp +!city.kitakyushu.jp +!city.kobe.jp +!city.nagoya.jp +!city.sapporo.jp +!city.sendai.jp +!city.yokohama.jp +// 4th level registration +aisai.aichi.jp +ama.aichi.jp +anjo.aichi.jp +asuke.aichi.jp +chiryu.aichi.jp +chita.aichi.jp +fuso.aichi.jp +gamagori.aichi.jp +handa.aichi.jp +hazu.aichi.jp +hekinan.aichi.jp +higashiura.aichi.jp +ichinomiya.aichi.jp +inazawa.aichi.jp +inuyama.aichi.jp +isshiki.aichi.jp +iwakura.aichi.jp +kanie.aichi.jp +kariya.aichi.jp +kasugai.aichi.jp +kira.aichi.jp +kiyosu.aichi.jp +komaki.aichi.jp +konan.aichi.jp +kota.aichi.jp +mihama.aichi.jp +miyoshi.aichi.jp +nishio.aichi.jp +nisshin.aichi.jp +obu.aichi.jp +oguchi.aichi.jp +oharu.aichi.jp +okazaki.aichi.jp +owariasahi.aichi.jp +seto.aichi.jp +shikatsu.aichi.jp +shinshiro.aichi.jp +shitara.aichi.jp +tahara.aichi.jp +takahama.aichi.jp +tobishima.aichi.jp +toei.aichi.jp +togo.aichi.jp +tokai.aichi.jp +tokoname.aichi.jp +toyoake.aichi.jp +toyohashi.aichi.jp +toyokawa.aichi.jp +toyone.aichi.jp +toyota.aichi.jp +tsushima.aichi.jp +yatomi.aichi.jp +akita.akita.jp +daisen.akita.jp +fujisato.akita.jp +gojome.akita.jp +hachirogata.akita.jp +happou.akita.jp +higashinaruse.akita.jp +honjo.akita.jp +honjyo.akita.jp +ikawa.akita.jp +kamikoani.akita.jp +kamioka.akita.jp +katagami.akita.jp +kazuno.akita.jp +kitaakita.akita.jp +kosaka.akita.jp +kyowa.akita.jp +misato.akita.jp +mitane.akita.jp +moriyoshi.akita.jp +nikaho.akita.jp +noshiro.akita.jp +odate.akita.jp +oga.akita.jp +ogata.akita.jp +semboku.akita.jp +yokote.akita.jp +yurihonjo.akita.jp +aomori.aomori.jp +gonohe.aomori.jp +hachinohe.aomori.jp +hashikami.aomori.jp +hiranai.aomori.jp +hirosaki.aomori.jp +itayanagi.aomori.jp +kuroishi.aomori.jp +misawa.aomori.jp +mutsu.aomori.jp +nakadomari.aomori.jp +noheji.aomori.jp +oirase.aomori.jp +owani.aomori.jp +rokunohe.aomori.jp +sannohe.aomori.jp +shichinohe.aomori.jp +shingo.aomori.jp +takko.aomori.jp +towada.aomori.jp +tsugaru.aomori.jp +tsuruta.aomori.jp +abiko.chiba.jp +asahi.chiba.jp +chonan.chiba.jp +chosei.chiba.jp +choshi.chiba.jp +chuo.chiba.jp +funabashi.chiba.jp +futtsu.chiba.jp +hanamigawa.chiba.jp +ichihara.chiba.jp +ichikawa.chiba.jp +ichinomiya.chiba.jp +inzai.chiba.jp +isumi.chiba.jp +kamagaya.chiba.jp +kamogawa.chiba.jp +kashiwa.chiba.jp +katori.chiba.jp +katsuura.chiba.jp +kimitsu.chiba.jp +kisarazu.chiba.jp +kozaki.chiba.jp +kujukuri.chiba.jp +kyonan.chiba.jp +matsudo.chiba.jp +midori.chiba.jp +mihama.chiba.jp +minamiboso.chiba.jp +mobara.chiba.jp +mutsuzawa.chiba.jp +nagara.chiba.jp +nagareyama.chiba.jp +narashino.chiba.jp +narita.chiba.jp +noda.chiba.jp +oamishirasato.chiba.jp +omigawa.chiba.jp +onjuku.chiba.jp +otaki.chiba.jp +sakae.chiba.jp +sakura.chiba.jp +shimofusa.chiba.jp +shirako.chiba.jp +shiroi.chiba.jp +shisui.chiba.jp +sodegaura.chiba.jp +sosa.chiba.jp +tako.chiba.jp +tateyama.chiba.jp +togane.chiba.jp +tohnosho.chiba.jp +tomisato.chiba.jp +urayasu.chiba.jp +yachimata.chiba.jp +yachiyo.chiba.jp +yokaichiba.chiba.jp +yokoshibahikari.chiba.jp +yotsukaido.chiba.jp +ainan.ehime.jp +honai.ehime.jp +ikata.ehime.jp +imabari.ehime.jp +iyo.ehime.jp +kamijima.ehime.jp +kihoku.ehime.jp +kumakogen.ehime.jp +masaki.ehime.jp +matsuno.ehime.jp +matsuyama.ehime.jp +namikata.ehime.jp +niihama.ehime.jp +ozu.ehime.jp +saijo.ehime.jp +seiyo.ehime.jp +shikokuchuo.ehime.jp +tobe.ehime.jp +toon.ehime.jp +uchiko.ehime.jp +uwajima.ehime.jp +yawatahama.ehime.jp +echizen.fukui.jp +eiheiji.fukui.jp +fukui.fukui.jp +ikeda.fukui.jp +katsuyama.fukui.jp +mihama.fukui.jp +minamiechizen.fukui.jp +obama.fukui.jp +ohi.fukui.jp +ono.fukui.jp +sabae.fukui.jp +sakai.fukui.jp +takahama.fukui.jp +tsuruga.fukui.jp +wakasa.fukui.jp +ashiya.fukuoka.jp +buzen.fukuoka.jp +chikugo.fukuoka.jp +chikuho.fukuoka.jp +chikujo.fukuoka.jp +chikushino.fukuoka.jp +chikuzen.fukuoka.jp +chuo.fukuoka.jp +dazaifu.fukuoka.jp +fukuchi.fukuoka.jp +hakata.fukuoka.jp +higashi.fukuoka.jp +hirokawa.fukuoka.jp +hisayama.fukuoka.jp +iizuka.fukuoka.jp +inatsuki.fukuoka.jp +kaho.fukuoka.jp +kasuga.fukuoka.jp +kasuya.fukuoka.jp +kawara.fukuoka.jp +keisen.fukuoka.jp +koga.fukuoka.jp +kurate.fukuoka.jp +kurogi.fukuoka.jp +kurume.fukuoka.jp +minami.fukuoka.jp +miyako.fukuoka.jp +miyama.fukuoka.jp +miyawaka.fukuoka.jp +mizumaki.fukuoka.jp +munakata.fukuoka.jp +nakagawa.fukuoka.jp +nakama.fukuoka.jp +nishi.fukuoka.jp +nogata.fukuoka.jp +ogori.fukuoka.jp +okagaki.fukuoka.jp +okawa.fukuoka.jp +oki.fukuoka.jp +omuta.fukuoka.jp +onga.fukuoka.jp +onojo.fukuoka.jp +oto.fukuoka.jp +saigawa.fukuoka.jp +sasaguri.fukuoka.jp +shingu.fukuoka.jp +shinyoshitomi.fukuoka.jp +shonai.fukuoka.jp +soeda.fukuoka.jp +sue.fukuoka.jp +tachiarai.fukuoka.jp +tagawa.fukuoka.jp +takata.fukuoka.jp +toho.fukuoka.jp +toyotsu.fukuoka.jp +tsuiki.fukuoka.jp +ukiha.fukuoka.jp +umi.fukuoka.jp +usui.fukuoka.jp +yamada.fukuoka.jp +yame.fukuoka.jp +yanagawa.fukuoka.jp +yukuhashi.fukuoka.jp +aizubange.fukushima.jp +aizumisato.fukushima.jp +aizuwakamatsu.fukushima.jp +asakawa.fukushima.jp +bandai.fukushima.jp +date.fukushima.jp +fukushima.fukushima.jp +furudono.fukushima.jp +futaba.fukushima.jp +hanawa.fukushima.jp +higashi.fukushima.jp +hirata.fukushima.jp +hirono.fukushima.jp +iitate.fukushima.jp +inawashiro.fukushima.jp +ishikawa.fukushima.jp +iwaki.fukushima.jp +izumizaki.fukushima.jp +kagamiishi.fukushima.jp +kaneyama.fukushima.jp +kawamata.fukushima.jp +kitakata.fukushima.jp +kitashiobara.fukushima.jp +koori.fukushima.jp +koriyama.fukushima.jp +kunimi.fukushima.jp +miharu.fukushima.jp +mishima.fukushima.jp +namie.fukushima.jp +nango.fukushima.jp +nishiaizu.fukushima.jp +nishigo.fukushima.jp +okuma.fukushima.jp +omotego.fukushima.jp +ono.fukushima.jp +otama.fukushima.jp +samegawa.fukushima.jp +shimogo.fukushima.jp +shirakawa.fukushima.jp +showa.fukushima.jp +soma.fukushima.jp +sukagawa.fukushima.jp +taishin.fukushima.jp +tamakawa.fukushima.jp +tanagura.fukushima.jp +tenei.fukushima.jp +yabuki.fukushima.jp +yamato.fukushima.jp +yamatsuri.fukushima.jp +yanaizu.fukushima.jp +yugawa.fukushima.jp +anpachi.gifu.jp +ena.gifu.jp +gifu.gifu.jp +ginan.gifu.jp +godo.gifu.jp +gujo.gifu.jp +hashima.gifu.jp +hichiso.gifu.jp +hida.gifu.jp +higashishirakawa.gifu.jp +ibigawa.gifu.jp +ikeda.gifu.jp +kakamigahara.gifu.jp +kani.gifu.jp +kasahara.gifu.jp +kasamatsu.gifu.jp +kawaue.gifu.jp +kitagata.gifu.jp +mino.gifu.jp +minokamo.gifu.jp +mitake.gifu.jp +mizunami.gifu.jp +motosu.gifu.jp +nakatsugawa.gifu.jp +ogaki.gifu.jp +sakahogi.gifu.jp +seki.gifu.jp +sekigahara.gifu.jp +shirakawa.gifu.jp +tajimi.gifu.jp +takayama.gifu.jp +tarui.gifu.jp +toki.gifu.jp +tomika.gifu.jp +wanouchi.gifu.jp +yamagata.gifu.jp +yaotsu.gifu.jp +yoro.gifu.jp +annaka.gunma.jp +chiyoda.gunma.jp +fujioka.gunma.jp +higashiagatsuma.gunma.jp +isesaki.gunma.jp +itakura.gunma.jp +kanna.gunma.jp +kanra.gunma.jp +katashina.gunma.jp +kawaba.gunma.jp +kiryu.gunma.jp +kusatsu.gunma.jp +maebashi.gunma.jp +meiwa.gunma.jp +midori.gunma.jp +minakami.gunma.jp +naganohara.gunma.jp +nakanojo.gunma.jp +nanmoku.gunma.jp +numata.gunma.jp +oizumi.gunma.jp +ora.gunma.jp +ota.gunma.jp +shibukawa.gunma.jp +shimonita.gunma.jp +shinto.gunma.jp +showa.gunma.jp +takasaki.gunma.jp +takayama.gunma.jp +tamamura.gunma.jp +tatebayashi.gunma.jp +tomioka.gunma.jp +tsukiyono.gunma.jp +tsumagoi.gunma.jp +ueno.gunma.jp +yoshioka.gunma.jp +asaminami.hiroshima.jp +daiwa.hiroshima.jp +etajima.hiroshima.jp +fuchu.hiroshima.jp +fukuyama.hiroshima.jp +hatsukaichi.hiroshima.jp +higashihiroshima.hiroshima.jp +hongo.hiroshima.jp +jinsekikogen.hiroshima.jp +kaita.hiroshima.jp +kui.hiroshima.jp +kumano.hiroshima.jp +kure.hiroshima.jp +mihara.hiroshima.jp +miyoshi.hiroshima.jp +naka.hiroshima.jp +onomichi.hiroshima.jp +osakikamijima.hiroshima.jp +otake.hiroshima.jp +saka.hiroshima.jp +sera.hiroshima.jp +seranishi.hiroshima.jp +shinichi.hiroshima.jp +shobara.hiroshima.jp +takehara.hiroshima.jp +abashiri.hokkaido.jp +abira.hokkaido.jp +aibetsu.hokkaido.jp +akabira.hokkaido.jp +akkeshi.hokkaido.jp +asahikawa.hokkaido.jp +ashibetsu.hokkaido.jp +ashoro.hokkaido.jp +assabu.hokkaido.jp +atsuma.hokkaido.jp +bibai.hokkaido.jp +biei.hokkaido.jp +bifuka.hokkaido.jp +bihoro.hokkaido.jp +biratori.hokkaido.jp +chippubetsu.hokkaido.jp +chitose.hokkaido.jp +date.hokkaido.jp +ebetsu.hokkaido.jp +embetsu.hokkaido.jp +eniwa.hokkaido.jp +erimo.hokkaido.jp +esan.hokkaido.jp +esashi.hokkaido.jp +fukagawa.hokkaido.jp +fukushima.hokkaido.jp +furano.hokkaido.jp +furubira.hokkaido.jp +haboro.hokkaido.jp +hakodate.hokkaido.jp +hamatonbetsu.hokkaido.jp +hidaka.hokkaido.jp +higashikagura.hokkaido.jp +higashikawa.hokkaido.jp +hiroo.hokkaido.jp +hokuryu.hokkaido.jp +hokuto.hokkaido.jp +honbetsu.hokkaido.jp +horokanai.hokkaido.jp +horonobe.hokkaido.jp +ikeda.hokkaido.jp +imakane.hokkaido.jp +ishikari.hokkaido.jp +iwamizawa.hokkaido.jp +iwanai.hokkaido.jp +kamifurano.hokkaido.jp +kamikawa.hokkaido.jp +kamishihoro.hokkaido.jp +kamisunagawa.hokkaido.jp +kamoenai.hokkaido.jp +kayabe.hokkaido.jp +kembuchi.hokkaido.jp +kikonai.hokkaido.jp +kimobetsu.hokkaido.jp +kitahiroshima.hokkaido.jp +kitami.hokkaido.jp +kiyosato.hokkaido.jp +koshimizu.hokkaido.jp +kunneppu.hokkaido.jp +kuriyama.hokkaido.jp +kuromatsunai.hokkaido.jp +kushiro.hokkaido.jp +kutchan.hokkaido.jp +kyowa.hokkaido.jp +mashike.hokkaido.jp +matsumae.hokkaido.jp +mikasa.hokkaido.jp +minamifurano.hokkaido.jp +mombetsu.hokkaido.jp +moseushi.hokkaido.jp +mukawa.hokkaido.jp +muroran.hokkaido.jp +naie.hokkaido.jp +nakagawa.hokkaido.jp +nakasatsunai.hokkaido.jp +nakatombetsu.hokkaido.jp +nanae.hokkaido.jp +nanporo.hokkaido.jp +nayoro.hokkaido.jp +nemuro.hokkaido.jp +niikappu.hokkaido.jp +niki.hokkaido.jp +nishiokoppe.hokkaido.jp +noboribetsu.hokkaido.jp +numata.hokkaido.jp +obihiro.hokkaido.jp +obira.hokkaido.jp +oketo.hokkaido.jp +okoppe.hokkaido.jp +otaru.hokkaido.jp +otobe.hokkaido.jp +otofuke.hokkaido.jp +otoineppu.hokkaido.jp +oumu.hokkaido.jp +ozora.hokkaido.jp +pippu.hokkaido.jp +rankoshi.hokkaido.jp +rebun.hokkaido.jp +rikubetsu.hokkaido.jp +rishiri.hokkaido.jp +rishirifuji.hokkaido.jp +saroma.hokkaido.jp +sarufutsu.hokkaido.jp +shakotan.hokkaido.jp +shari.hokkaido.jp +shibecha.hokkaido.jp +shibetsu.hokkaido.jp +shikabe.hokkaido.jp +shikaoi.hokkaido.jp +shimamaki.hokkaido.jp +shimizu.hokkaido.jp +shimokawa.hokkaido.jp +shinshinotsu.hokkaido.jp +shintoku.hokkaido.jp +shiranuka.hokkaido.jp +shiraoi.hokkaido.jp +shiriuchi.hokkaido.jp +sobetsu.hokkaido.jp +sunagawa.hokkaido.jp +taiki.hokkaido.jp +takasu.hokkaido.jp +takikawa.hokkaido.jp +takinoue.hokkaido.jp +teshikaga.hokkaido.jp +tobetsu.hokkaido.jp +tohma.hokkaido.jp +tomakomai.hokkaido.jp +tomari.hokkaido.jp +toya.hokkaido.jp +toyako.hokkaido.jp +toyotomi.hokkaido.jp +toyoura.hokkaido.jp +tsubetsu.hokkaido.jp +tsukigata.hokkaido.jp +urakawa.hokkaido.jp +urausu.hokkaido.jp +uryu.hokkaido.jp +utashinai.hokkaido.jp +wakkanai.hokkaido.jp +wassamu.hokkaido.jp +yakumo.hokkaido.jp +yoichi.hokkaido.jp +aioi.hyogo.jp +akashi.hyogo.jp +ako.hyogo.jp +amagasaki.hyogo.jp +aogaki.hyogo.jp +asago.hyogo.jp +ashiya.hyogo.jp +awaji.hyogo.jp +fukusaki.hyogo.jp +goshiki.hyogo.jp +harima.hyogo.jp +himeji.hyogo.jp +ichikawa.hyogo.jp +inagawa.hyogo.jp +itami.hyogo.jp +kakogawa.hyogo.jp +kamigori.hyogo.jp +kamikawa.hyogo.jp +kasai.hyogo.jp +kasuga.hyogo.jp +kawanishi.hyogo.jp +miki.hyogo.jp +minamiawaji.hyogo.jp +nishinomiya.hyogo.jp +nishiwaki.hyogo.jp +ono.hyogo.jp +sanda.hyogo.jp +sannan.hyogo.jp +sasayama.hyogo.jp +sayo.hyogo.jp +shingu.hyogo.jp +shinonsen.hyogo.jp +shiso.hyogo.jp +sumoto.hyogo.jp +taishi.hyogo.jp +taka.hyogo.jp +takarazuka.hyogo.jp +takasago.hyogo.jp +takino.hyogo.jp +tamba.hyogo.jp +tatsuno.hyogo.jp +toyooka.hyogo.jp +yabu.hyogo.jp +yashiro.hyogo.jp +yoka.hyogo.jp +yokawa.hyogo.jp +ami.ibaraki.jp +asahi.ibaraki.jp +bando.ibaraki.jp +chikusei.ibaraki.jp +daigo.ibaraki.jp +fujishiro.ibaraki.jp +hitachi.ibaraki.jp +hitachinaka.ibaraki.jp +hitachiomiya.ibaraki.jp +hitachiota.ibaraki.jp +ibaraki.ibaraki.jp +ina.ibaraki.jp +inashiki.ibaraki.jp +itako.ibaraki.jp +iwama.ibaraki.jp +joso.ibaraki.jp +kamisu.ibaraki.jp +kasama.ibaraki.jp +kashima.ibaraki.jp +kasumigaura.ibaraki.jp +koga.ibaraki.jp +miho.ibaraki.jp +mito.ibaraki.jp +moriya.ibaraki.jp +naka.ibaraki.jp +namegata.ibaraki.jp +oarai.ibaraki.jp +ogawa.ibaraki.jp +omitama.ibaraki.jp +ryugasaki.ibaraki.jp +sakai.ibaraki.jp +sakuragawa.ibaraki.jp +shimodate.ibaraki.jp +shimotsuma.ibaraki.jp +shirosato.ibaraki.jp +sowa.ibaraki.jp +suifu.ibaraki.jp +takahagi.ibaraki.jp +tamatsukuri.ibaraki.jp +tokai.ibaraki.jp +tomobe.ibaraki.jp +tone.ibaraki.jp +toride.ibaraki.jp +tsuchiura.ibaraki.jp +tsukuba.ibaraki.jp +uchihara.ibaraki.jp +ushiku.ibaraki.jp +yachiyo.ibaraki.jp +yamagata.ibaraki.jp +yawara.ibaraki.jp +yuki.ibaraki.jp +anamizu.ishikawa.jp +hakui.ishikawa.jp +hakusan.ishikawa.jp +kaga.ishikawa.jp +kahoku.ishikawa.jp +kanazawa.ishikawa.jp +kawakita.ishikawa.jp +komatsu.ishikawa.jp +nakanoto.ishikawa.jp +nanao.ishikawa.jp +nomi.ishikawa.jp +nonoichi.ishikawa.jp +noto.ishikawa.jp +shika.ishikawa.jp +suzu.ishikawa.jp +tsubata.ishikawa.jp +tsurugi.ishikawa.jp +uchinada.ishikawa.jp +wajima.ishikawa.jp +fudai.iwate.jp +fujisawa.iwate.jp +hanamaki.iwate.jp +hiraizumi.iwate.jp +hirono.iwate.jp +ichinohe.iwate.jp +ichinoseki.iwate.jp +iwaizumi.iwate.jp +iwate.iwate.jp +joboji.iwate.jp +kamaishi.iwate.jp +kanegasaki.iwate.jp +karumai.iwate.jp +kawai.iwate.jp +kitakami.iwate.jp +kuji.iwate.jp +kunohe.iwate.jp +kuzumaki.iwate.jp +miyako.iwate.jp +mizusawa.iwate.jp +morioka.iwate.jp +ninohe.iwate.jp +noda.iwate.jp +ofunato.iwate.jp +oshu.iwate.jp +otsuchi.iwate.jp +rikuzentakata.iwate.jp +shiwa.iwate.jp +shizukuishi.iwate.jp +sumita.iwate.jp +tanohata.iwate.jp +tono.iwate.jp +yahaba.iwate.jp +yamada.iwate.jp +ayagawa.kagawa.jp +higashikagawa.kagawa.jp +kanonji.kagawa.jp +kotohira.kagawa.jp +manno.kagawa.jp +marugame.kagawa.jp +mitoyo.kagawa.jp +naoshima.kagawa.jp +sanuki.kagawa.jp +tadotsu.kagawa.jp +takamatsu.kagawa.jp +tonosho.kagawa.jp +uchinomi.kagawa.jp +utazu.kagawa.jp +zentsuji.kagawa.jp +akune.kagoshima.jp +amami.kagoshima.jp +hioki.kagoshima.jp +isa.kagoshima.jp +isen.kagoshima.jp +izumi.kagoshima.jp +kagoshima.kagoshima.jp +kanoya.kagoshima.jp +kawanabe.kagoshima.jp +kinko.kagoshima.jp +kouyama.kagoshima.jp +makurazaki.kagoshima.jp +matsumoto.kagoshima.jp +minamitane.kagoshima.jp +nakatane.kagoshima.jp +nishinoomote.kagoshima.jp +satsumasendai.kagoshima.jp +soo.kagoshima.jp +tarumizu.kagoshima.jp +yusui.kagoshima.jp +aikawa.kanagawa.jp +atsugi.kanagawa.jp +ayase.kanagawa.jp +chigasaki.kanagawa.jp +ebina.kanagawa.jp +fujisawa.kanagawa.jp +hadano.kanagawa.jp +hakone.kanagawa.jp +hiratsuka.kanagawa.jp +isehara.kanagawa.jp +kaisei.kanagawa.jp +kamakura.kanagawa.jp +kiyokawa.kanagawa.jp +matsuda.kanagawa.jp +minamiashigara.kanagawa.jp +miura.kanagawa.jp +nakai.kanagawa.jp +ninomiya.kanagawa.jp +odawara.kanagawa.jp +oi.kanagawa.jp +oiso.kanagawa.jp +sagamihara.kanagawa.jp +samukawa.kanagawa.jp +tsukui.kanagawa.jp +yamakita.kanagawa.jp +yamato.kanagawa.jp +yokosuka.kanagawa.jp +yugawara.kanagawa.jp +zama.kanagawa.jp +zushi.kanagawa.jp +aki.kochi.jp +geisei.kochi.jp +hidaka.kochi.jp +higashitsuno.kochi.jp +ino.kochi.jp +kagami.kochi.jp +kami.kochi.jp +kitagawa.kochi.jp +kochi.kochi.jp +mihara.kochi.jp +motoyama.kochi.jp +muroto.kochi.jp +nahari.kochi.jp +nakamura.kochi.jp +nankoku.kochi.jp +nishitosa.kochi.jp +niyodogawa.kochi.jp +ochi.kochi.jp +okawa.kochi.jp +otoyo.kochi.jp +otsuki.kochi.jp +sakawa.kochi.jp +sukumo.kochi.jp +susaki.kochi.jp +tosa.kochi.jp +tosashimizu.kochi.jp +toyo.kochi.jp +tsuno.kochi.jp +umaji.kochi.jp +yasuda.kochi.jp +yusuhara.kochi.jp +amakusa.kumamoto.jp +arao.kumamoto.jp +aso.kumamoto.jp +choyo.kumamoto.jp +gyokuto.kumamoto.jp +kamiamakusa.kumamoto.jp +kikuchi.kumamoto.jp +kumamoto.kumamoto.jp +mashiki.kumamoto.jp +mifune.kumamoto.jp +minamata.kumamoto.jp +minamioguni.kumamoto.jp +nagasu.kumamoto.jp +nishihara.kumamoto.jp +oguni.kumamoto.jp +ozu.kumamoto.jp +sumoto.kumamoto.jp +takamori.kumamoto.jp +uki.kumamoto.jp +uto.kumamoto.jp +yamaga.kumamoto.jp +yamato.kumamoto.jp +yatsushiro.kumamoto.jp +ayabe.kyoto.jp +fukuchiyama.kyoto.jp +higashiyama.kyoto.jp +ide.kyoto.jp +ine.kyoto.jp +joyo.kyoto.jp +kameoka.kyoto.jp +kamo.kyoto.jp +kita.kyoto.jp +kizu.kyoto.jp +kumiyama.kyoto.jp +kyotamba.kyoto.jp +kyotanabe.kyoto.jp +kyotango.kyoto.jp +maizuru.kyoto.jp +minami.kyoto.jp +minamiyamashiro.kyoto.jp +miyazu.kyoto.jp +muko.kyoto.jp +nagaokakyo.kyoto.jp +nakagyo.kyoto.jp +nantan.kyoto.jp +oyamazaki.kyoto.jp +sakyo.kyoto.jp +seika.kyoto.jp +tanabe.kyoto.jp +uji.kyoto.jp +ujitawara.kyoto.jp +wazuka.kyoto.jp +yamashina.kyoto.jp +yawata.kyoto.jp +asahi.mie.jp +inabe.mie.jp +ise.mie.jp +kameyama.mie.jp +kawagoe.mie.jp +kiho.mie.jp +kisosaki.mie.jp +kiwa.mie.jp +komono.mie.jp +kumano.mie.jp +kuwana.mie.jp +matsusaka.mie.jp +meiwa.mie.jp +mihama.mie.jp +minamiise.mie.jp +misugi.mie.jp +miyama.mie.jp +nabari.mie.jp +shima.mie.jp +suzuka.mie.jp +tado.mie.jp +taiki.mie.jp +taki.mie.jp +tamaki.mie.jp +toba.mie.jp +tsu.mie.jp +udono.mie.jp +ureshino.mie.jp +watarai.mie.jp +yokkaichi.mie.jp +furukawa.miyagi.jp +higashimatsushima.miyagi.jp +ishinomaki.miyagi.jp +iwanuma.miyagi.jp +kakuda.miyagi.jp +kami.miyagi.jp +kawasaki.miyagi.jp +marumori.miyagi.jp +matsushima.miyagi.jp +minamisanriku.miyagi.jp +misato.miyagi.jp +murata.miyagi.jp +natori.miyagi.jp +ogawara.miyagi.jp +ohira.miyagi.jp +onagawa.miyagi.jp +osaki.miyagi.jp +rifu.miyagi.jp +semine.miyagi.jp +shibata.miyagi.jp +shichikashuku.miyagi.jp +shikama.miyagi.jp +shiogama.miyagi.jp +shiroishi.miyagi.jp +tagajo.miyagi.jp +taiwa.miyagi.jp +tome.miyagi.jp +tomiya.miyagi.jp +wakuya.miyagi.jp +watari.miyagi.jp +yamamoto.miyagi.jp +zao.miyagi.jp +aya.miyazaki.jp +ebino.miyazaki.jp +gokase.miyazaki.jp +hyuga.miyazaki.jp +kadogawa.miyazaki.jp +kawaminami.miyazaki.jp +kijo.miyazaki.jp +kitagawa.miyazaki.jp +kitakata.miyazaki.jp +kitaura.miyazaki.jp +kobayashi.miyazaki.jp +kunitomi.miyazaki.jp +kushima.miyazaki.jp +mimata.miyazaki.jp +miyakonojo.miyazaki.jp +miyazaki.miyazaki.jp +morotsuka.miyazaki.jp +nichinan.miyazaki.jp +nishimera.miyazaki.jp +nobeoka.miyazaki.jp +saito.miyazaki.jp +shiiba.miyazaki.jp +shintomi.miyazaki.jp +takaharu.miyazaki.jp +takanabe.miyazaki.jp +takazaki.miyazaki.jp +tsuno.miyazaki.jp +achi.nagano.jp +agematsu.nagano.jp +anan.nagano.jp +aoki.nagano.jp +asahi.nagano.jp +azumino.nagano.jp +chikuhoku.nagano.jp +chikuma.nagano.jp +chino.nagano.jp +fujimi.nagano.jp +hakuba.nagano.jp +hara.nagano.jp +hiraya.nagano.jp +iida.nagano.jp +iijima.nagano.jp +iiyama.nagano.jp +iizuna.nagano.jp +ikeda.nagano.jp +ikusaka.nagano.jp +ina.nagano.jp +karuizawa.nagano.jp +kawakami.nagano.jp +kiso.nagano.jp +kisofukushima.nagano.jp +kitaaiki.nagano.jp +komagane.nagano.jp +komoro.nagano.jp +matsukawa.nagano.jp +matsumoto.nagano.jp +miasa.nagano.jp +minamiaiki.nagano.jp +minamimaki.nagano.jp +minamiminowa.nagano.jp +minowa.nagano.jp +miyada.nagano.jp +miyota.nagano.jp +mochizuki.nagano.jp +nagano.nagano.jp +nagawa.nagano.jp +nagiso.nagano.jp +nakagawa.nagano.jp +nakano.nagano.jp +nozawaonsen.nagano.jp +obuse.nagano.jp +ogawa.nagano.jp +okaya.nagano.jp +omachi.nagano.jp +omi.nagano.jp +ookuwa.nagano.jp +ooshika.nagano.jp +otaki.nagano.jp +otari.nagano.jp +sakae.nagano.jp +sakaki.nagano.jp +saku.nagano.jp +sakuho.nagano.jp +shimosuwa.nagano.jp +shinanomachi.nagano.jp +shiojiri.nagano.jp +suwa.nagano.jp +suzaka.nagano.jp +takagi.nagano.jp +takamori.nagano.jp +takayama.nagano.jp +tateshina.nagano.jp +tatsuno.nagano.jp +togakushi.nagano.jp +togura.nagano.jp +tomi.nagano.jp +ueda.nagano.jp +wada.nagano.jp +yamagata.nagano.jp +yamanouchi.nagano.jp +yasaka.nagano.jp +yasuoka.nagano.jp +chijiwa.nagasaki.jp +futsu.nagasaki.jp +goto.nagasaki.jp +hasami.nagasaki.jp +hirado.nagasaki.jp +iki.nagasaki.jp +isahaya.nagasaki.jp +kawatana.nagasaki.jp +kuchinotsu.nagasaki.jp +matsuura.nagasaki.jp +nagasaki.nagasaki.jp +obama.nagasaki.jp +omura.nagasaki.jp +oseto.nagasaki.jp +saikai.nagasaki.jp +sasebo.nagasaki.jp +seihi.nagasaki.jp +shimabara.nagasaki.jp +shinkamigoto.nagasaki.jp +togitsu.nagasaki.jp +tsushima.nagasaki.jp +unzen.nagasaki.jp +ando.nara.jp +gose.nara.jp +heguri.nara.jp +higashiyoshino.nara.jp +ikaruga.nara.jp +ikoma.nara.jp +kamikitayama.nara.jp +kanmaki.nara.jp +kashiba.nara.jp +kashihara.nara.jp +katsuragi.nara.jp +kawai.nara.jp +kawakami.nara.jp +kawanishi.nara.jp +koryo.nara.jp +kurotaki.nara.jp +mitsue.nara.jp +miyake.nara.jp +nara.nara.jp +nosegawa.nara.jp +oji.nara.jp +ouda.nara.jp +oyodo.nara.jp +sakurai.nara.jp +sango.nara.jp +shimoichi.nara.jp +shimokitayama.nara.jp +shinjo.nara.jp +soni.nara.jp +takatori.nara.jp +tawaramoto.nara.jp +tenkawa.nara.jp +tenri.nara.jp +uda.nara.jp +yamatokoriyama.nara.jp +yamatotakada.nara.jp +yamazoe.nara.jp +yoshino.nara.jp +aga.niigata.jp +agano.niigata.jp +gosen.niigata.jp +itoigawa.niigata.jp +izumozaki.niigata.jp +joetsu.niigata.jp +kamo.niigata.jp +kariwa.niigata.jp +kashiwazaki.niigata.jp +minamiuonuma.niigata.jp +mitsuke.niigata.jp +muika.niigata.jp +murakami.niigata.jp +myoko.niigata.jp +nagaoka.niigata.jp +niigata.niigata.jp +ojiya.niigata.jp +omi.niigata.jp +sado.niigata.jp +sanjo.niigata.jp +seiro.niigata.jp +seirou.niigata.jp +sekikawa.niigata.jp +shibata.niigata.jp +tagami.niigata.jp +tainai.niigata.jp +tochio.niigata.jp +tokamachi.niigata.jp +tsubame.niigata.jp +tsunan.niigata.jp +uonuma.niigata.jp +yahiko.niigata.jp +yoita.niigata.jp +yuzawa.niigata.jp +beppu.oita.jp +bungoono.oita.jp +bungotakada.oita.jp +hasama.oita.jp +hiji.oita.jp +himeshima.oita.jp +hita.oita.jp +kamitsue.oita.jp +kokonoe.oita.jp +kuju.oita.jp +kunisaki.oita.jp +kusu.oita.jp +oita.oita.jp +saiki.oita.jp +taketa.oita.jp +tsukumi.oita.jp +usa.oita.jp +usuki.oita.jp +yufu.oita.jp +akaiwa.okayama.jp +asakuchi.okayama.jp +bizen.okayama.jp +hayashima.okayama.jp +ibara.okayama.jp +kagamino.okayama.jp +kasaoka.okayama.jp +kibichuo.okayama.jp +kumenan.okayama.jp +kurashiki.okayama.jp +maniwa.okayama.jp +misaki.okayama.jp +nagi.okayama.jp +niimi.okayama.jp +nishiawakura.okayama.jp +okayama.okayama.jp +satosho.okayama.jp +setouchi.okayama.jp +shinjo.okayama.jp +shoo.okayama.jp +soja.okayama.jp +takahashi.okayama.jp +tamano.okayama.jp +tsuyama.okayama.jp +wake.okayama.jp +yakage.okayama.jp +aguni.okinawa.jp +ginowan.okinawa.jp +ginoza.okinawa.jp +gushikami.okinawa.jp +haebaru.okinawa.jp +higashi.okinawa.jp +hirara.okinawa.jp +iheya.okinawa.jp +ishigaki.okinawa.jp +ishikawa.okinawa.jp +itoman.okinawa.jp +izena.okinawa.jp +kadena.okinawa.jp +kin.okinawa.jp +kitadaito.okinawa.jp +kitanakagusuku.okinawa.jp +kumejima.okinawa.jp +kunigami.okinawa.jp +minamidaito.okinawa.jp +motobu.okinawa.jp +nago.okinawa.jp +naha.okinawa.jp +nakagusuku.okinawa.jp +nakijin.okinawa.jp +nanjo.okinawa.jp +nishihara.okinawa.jp +ogimi.okinawa.jp +okinawa.okinawa.jp +onna.okinawa.jp +shimoji.okinawa.jp +taketomi.okinawa.jp +tarama.okinawa.jp +tokashiki.okinawa.jp +tomigusuku.okinawa.jp +tonaki.okinawa.jp +urasoe.okinawa.jp +uruma.okinawa.jp +yaese.okinawa.jp +yomitan.okinawa.jp +yonabaru.okinawa.jp +yonaguni.okinawa.jp +zamami.okinawa.jp +abeno.osaka.jp +chihayaakasaka.osaka.jp +chuo.osaka.jp +daito.osaka.jp +fujiidera.osaka.jp +habikino.osaka.jp +hannan.osaka.jp +higashiosaka.osaka.jp +higashisumiyoshi.osaka.jp +higashiyodogawa.osaka.jp +hirakata.osaka.jp +ibaraki.osaka.jp +ikeda.osaka.jp +izumi.osaka.jp +izumiotsu.osaka.jp +izumisano.osaka.jp +kadoma.osaka.jp +kaizuka.osaka.jp +kanan.osaka.jp +kashiwara.osaka.jp +katano.osaka.jp +kawachinagano.osaka.jp +kishiwada.osaka.jp +kita.osaka.jp +kumatori.osaka.jp +matsubara.osaka.jp +minato.osaka.jp +minoh.osaka.jp +misaki.osaka.jp +moriguchi.osaka.jp +neyagawa.osaka.jp +nishi.osaka.jp +nose.osaka.jp +osakasayama.osaka.jp +sakai.osaka.jp +sayama.osaka.jp +sennan.osaka.jp +settsu.osaka.jp +shijonawate.osaka.jp +shimamoto.osaka.jp +suita.osaka.jp +tadaoka.osaka.jp +taishi.osaka.jp +tajiri.osaka.jp +takaishi.osaka.jp +takatsuki.osaka.jp +tondabayashi.osaka.jp +toyonaka.osaka.jp +toyono.osaka.jp +yao.osaka.jp +ariake.saga.jp +arita.saga.jp +fukudomi.saga.jp +genkai.saga.jp +hamatama.saga.jp +hizen.saga.jp +imari.saga.jp +kamimine.saga.jp +kanzaki.saga.jp +karatsu.saga.jp +kashima.saga.jp +kitagata.saga.jp +kitahata.saga.jp +kiyama.saga.jp +kouhoku.saga.jp +kyuragi.saga.jp +nishiarita.saga.jp +ogi.saga.jp +omachi.saga.jp +ouchi.saga.jp +saga.saga.jp +shiroishi.saga.jp +taku.saga.jp +tara.saga.jp +tosu.saga.jp +yoshinogari.saga.jp +arakawa.saitama.jp +asaka.saitama.jp +chichibu.saitama.jp +fujimi.saitama.jp +fujimino.saitama.jp +fukaya.saitama.jp +hanno.saitama.jp +hanyu.saitama.jp +hasuda.saitama.jp +hatogaya.saitama.jp +hatoyama.saitama.jp +hidaka.saitama.jp +higashichichibu.saitama.jp +higashimatsuyama.saitama.jp +honjo.saitama.jp +ina.saitama.jp +iruma.saitama.jp +iwatsuki.saitama.jp +kamiizumi.saitama.jp +kamikawa.saitama.jp +kamisato.saitama.jp +kasukabe.saitama.jp +kawagoe.saitama.jp +kawaguchi.saitama.jp +kawajima.saitama.jp +kazo.saitama.jp +kitamoto.saitama.jp +koshigaya.saitama.jp +kounosu.saitama.jp +kuki.saitama.jp +kumagaya.saitama.jp +matsubushi.saitama.jp +minano.saitama.jp +misato.saitama.jp +miyashiro.saitama.jp +miyoshi.saitama.jp +moroyama.saitama.jp +nagatoro.saitama.jp +namegawa.saitama.jp +niiza.saitama.jp +ogano.saitama.jp +ogawa.saitama.jp +ogose.saitama.jp +okegawa.saitama.jp +omiya.saitama.jp +otaki.saitama.jp +ranzan.saitama.jp +ryokami.saitama.jp +saitama.saitama.jp +sakado.saitama.jp +satte.saitama.jp +sayama.saitama.jp +shiki.saitama.jp +shiraoka.saitama.jp +soka.saitama.jp +sugito.saitama.jp +toda.saitama.jp +tokigawa.saitama.jp +tokorozawa.saitama.jp +tsurugashima.saitama.jp +urawa.saitama.jp +warabi.saitama.jp +yashio.saitama.jp +yokoze.saitama.jp +yono.saitama.jp +yorii.saitama.jp +yoshida.saitama.jp +yoshikawa.saitama.jp +yoshimi.saitama.jp +aisho.shiga.jp +gamo.shiga.jp +higashiomi.shiga.jp +hikone.shiga.jp +koka.shiga.jp +konan.shiga.jp +kosei.shiga.jp +koto.shiga.jp +kusatsu.shiga.jp +maibara.shiga.jp +moriyama.shiga.jp +nagahama.shiga.jp +nishiazai.shiga.jp +notogawa.shiga.jp +omihachiman.shiga.jp +otsu.shiga.jp +ritto.shiga.jp +ryuoh.shiga.jp +takashima.shiga.jp +takatsuki.shiga.jp +torahime.shiga.jp +toyosato.shiga.jp +yasu.shiga.jp +akagi.shimane.jp +ama.shimane.jp +gotsu.shimane.jp +hamada.shimane.jp +higashiizumo.shimane.jp +hikawa.shimane.jp +hikimi.shimane.jp +izumo.shimane.jp +kakinoki.shimane.jp +masuda.shimane.jp +matsue.shimane.jp +misato.shimane.jp +nishinoshima.shimane.jp +ohda.shimane.jp +okinoshima.shimane.jp +okuizumo.shimane.jp +shimane.shimane.jp +tamayu.shimane.jp +tsuwano.shimane.jp +unnan.shimane.jp +yakumo.shimane.jp +yasugi.shimane.jp +yatsuka.shimane.jp +arai.shizuoka.jp +atami.shizuoka.jp +fuji.shizuoka.jp +fujieda.shizuoka.jp +fujikawa.shizuoka.jp +fujinomiya.shizuoka.jp +fukuroi.shizuoka.jp +gotemba.shizuoka.jp +haibara.shizuoka.jp +hamamatsu.shizuoka.jp +higashiizu.shizuoka.jp +ito.shizuoka.jp +iwata.shizuoka.jp +izu.shizuoka.jp +izunokuni.shizuoka.jp +kakegawa.shizuoka.jp +kannami.shizuoka.jp +kawanehon.shizuoka.jp +kawazu.shizuoka.jp +kikugawa.shizuoka.jp +kosai.shizuoka.jp +makinohara.shizuoka.jp +matsuzaki.shizuoka.jp +minamiizu.shizuoka.jp +mishima.shizuoka.jp +morimachi.shizuoka.jp +nishiizu.shizuoka.jp +numazu.shizuoka.jp +omaezaki.shizuoka.jp +shimada.shizuoka.jp +shimizu.shizuoka.jp +shimoda.shizuoka.jp +shizuoka.shizuoka.jp +susono.shizuoka.jp +yaizu.shizuoka.jp +yoshida.shizuoka.jp +ashikaga.tochigi.jp +bato.tochigi.jp +haga.tochigi.jp +ichikai.tochigi.jp +iwafune.tochigi.jp +kaminokawa.tochigi.jp +kanuma.tochigi.jp +karasuyama.tochigi.jp +kuroiso.tochigi.jp +mashiko.tochigi.jp +mibu.tochigi.jp +moka.tochigi.jp +motegi.tochigi.jp +nasu.tochigi.jp +nasushiobara.tochigi.jp +nikko.tochigi.jp +nishikata.tochigi.jp +nogi.tochigi.jp +ohira.tochigi.jp +ohtawara.tochigi.jp +oyama.tochigi.jp +sakura.tochigi.jp +sano.tochigi.jp +shimotsuke.tochigi.jp +shioya.tochigi.jp +takanezawa.tochigi.jp +tochigi.tochigi.jp +tsuga.tochigi.jp +ujiie.tochigi.jp +utsunomiya.tochigi.jp +yaita.tochigi.jp +aizumi.tokushima.jp +anan.tokushima.jp +ichiba.tokushima.jp +itano.tokushima.jp +kainan.tokushima.jp +komatsushima.tokushima.jp +matsushige.tokushima.jp +mima.tokushima.jp +minami.tokushima.jp +miyoshi.tokushima.jp +mugi.tokushima.jp +nakagawa.tokushima.jp +naruto.tokushima.jp +sanagochi.tokushima.jp +shishikui.tokushima.jp +tokushima.tokushima.jp +wajiki.tokushima.jp +adachi.tokyo.jp +akiruno.tokyo.jp +akishima.tokyo.jp +aogashima.tokyo.jp +arakawa.tokyo.jp +bunkyo.tokyo.jp +chiyoda.tokyo.jp +chofu.tokyo.jp +chuo.tokyo.jp +edogawa.tokyo.jp +fuchu.tokyo.jp +fussa.tokyo.jp +hachijo.tokyo.jp +hachioji.tokyo.jp +hamura.tokyo.jp +higashikurume.tokyo.jp +higashimurayama.tokyo.jp +higashiyamato.tokyo.jp +hino.tokyo.jp +hinode.tokyo.jp +hinohara.tokyo.jp +inagi.tokyo.jp +itabashi.tokyo.jp +katsushika.tokyo.jp +kita.tokyo.jp +kiyose.tokyo.jp +kodaira.tokyo.jp +koganei.tokyo.jp +kokubunji.tokyo.jp +komae.tokyo.jp +koto.tokyo.jp +kouzushima.tokyo.jp +kunitachi.tokyo.jp +machida.tokyo.jp +meguro.tokyo.jp +minato.tokyo.jp +mitaka.tokyo.jp +mizuho.tokyo.jp +musashimurayama.tokyo.jp +musashino.tokyo.jp +nakano.tokyo.jp +nerima.tokyo.jp +ogasawara.tokyo.jp +okutama.tokyo.jp +ome.tokyo.jp +oshima.tokyo.jp +ota.tokyo.jp +setagaya.tokyo.jp +shibuya.tokyo.jp +shinagawa.tokyo.jp +shinjuku.tokyo.jp +suginami.tokyo.jp +sumida.tokyo.jp +tachikawa.tokyo.jp +taito.tokyo.jp +tama.tokyo.jp +toshima.tokyo.jp +chizu.tottori.jp +hino.tottori.jp +kawahara.tottori.jp +koge.tottori.jp +kotoura.tottori.jp +misasa.tottori.jp +nanbu.tottori.jp +nichinan.tottori.jp +sakaiminato.tottori.jp +tottori.tottori.jp +wakasa.tottori.jp +yazu.tottori.jp +yonago.tottori.jp +asahi.toyama.jp +fuchu.toyama.jp +fukumitsu.toyama.jp +funahashi.toyama.jp +himi.toyama.jp +imizu.toyama.jp +inami.toyama.jp +johana.toyama.jp +kamiichi.toyama.jp +kurobe.toyama.jp +nakaniikawa.toyama.jp +namerikawa.toyama.jp +nanto.toyama.jp +nyuzen.toyama.jp +oyabe.toyama.jp +taira.toyama.jp +takaoka.toyama.jp +tateyama.toyama.jp +toga.toyama.jp +tonami.toyama.jp +toyama.toyama.jp +unazuki.toyama.jp +uozu.toyama.jp +yamada.toyama.jp +arida.wakayama.jp +aridagawa.wakayama.jp +gobo.wakayama.jp +hashimoto.wakayama.jp +hidaka.wakayama.jp +hirogawa.wakayama.jp +inami.wakayama.jp +iwade.wakayama.jp +kainan.wakayama.jp +kamitonda.wakayama.jp +katsuragi.wakayama.jp +kimino.wakayama.jp +kinokawa.wakayama.jp +kitayama.wakayama.jp +koya.wakayama.jp +koza.wakayama.jp +kozagawa.wakayama.jp +kudoyama.wakayama.jp +kushimoto.wakayama.jp +mihama.wakayama.jp +misato.wakayama.jp +nachikatsuura.wakayama.jp +shingu.wakayama.jp +shirahama.wakayama.jp +taiji.wakayama.jp +tanabe.wakayama.jp +wakayama.wakayama.jp +yuasa.wakayama.jp +yura.wakayama.jp +asahi.yamagata.jp +funagata.yamagata.jp +higashine.yamagata.jp +iide.yamagata.jp +kahoku.yamagata.jp +kaminoyama.yamagata.jp +kaneyama.yamagata.jp +kawanishi.yamagata.jp +mamurogawa.yamagata.jp +mikawa.yamagata.jp +murayama.yamagata.jp +nagai.yamagata.jp +nakayama.yamagata.jp +nanyo.yamagata.jp +nishikawa.yamagata.jp +obanazawa.yamagata.jp +oe.yamagata.jp +oguni.yamagata.jp +ohkura.yamagata.jp +oishida.yamagata.jp +sagae.yamagata.jp +sakata.yamagata.jp +sakegawa.yamagata.jp +shinjo.yamagata.jp +shirataka.yamagata.jp +shonai.yamagata.jp +takahata.yamagata.jp +tendo.yamagata.jp +tozawa.yamagata.jp +tsuruoka.yamagata.jp +yamagata.yamagata.jp +yamanobe.yamagata.jp +yonezawa.yamagata.jp +yuza.yamagata.jp +abu.yamaguchi.jp +hagi.yamaguchi.jp +hikari.yamaguchi.jp +hofu.yamaguchi.jp +iwakuni.yamaguchi.jp +kudamatsu.yamaguchi.jp +mitou.yamaguchi.jp +nagato.yamaguchi.jp +oshima.yamaguchi.jp +shimonoseki.yamaguchi.jp +shunan.yamaguchi.jp +tabuse.yamaguchi.jp +tokuyama.yamaguchi.jp +toyota.yamaguchi.jp +ube.yamaguchi.jp +yuu.yamaguchi.jp +chuo.yamanashi.jp +doshi.yamanashi.jp +fuefuki.yamanashi.jp +fujikawa.yamanashi.jp +fujikawaguchiko.yamanashi.jp +fujiyoshida.yamanashi.jp +hayakawa.yamanashi.jp +hokuto.yamanashi.jp +ichikawamisato.yamanashi.jp +kai.yamanashi.jp +kofu.yamanashi.jp +koshu.yamanashi.jp +kosuge.yamanashi.jp +minami-alps.yamanashi.jp +minobu.yamanashi.jp +nakamichi.yamanashi.jp +nanbu.yamanashi.jp +narusawa.yamanashi.jp +nirasaki.yamanashi.jp +nishikatsura.yamanashi.jp +oshino.yamanashi.jp +otsuki.yamanashi.jp +showa.yamanashi.jp +tabayama.yamanashi.jp +tsuru.yamanashi.jp +uenohara.yamanashi.jp +yamanakako.yamanashi.jp +yamanashi.yamanashi.jp + +// ke : http://www.kenic.or.ke/index.php?option=com_content&task=view&id=117&Itemid=145 +*.ke + +// kg : http://www.domain.kg/dmn_n.html +kg +org.kg +net.kg +com.kg +edu.kg +gov.kg +mil.kg + +// kh : http://www.mptc.gov.kh/dns_registration.htm +*.kh + +// ki : http://www.ki/dns/index.html +ki +edu.ki +biz.ki +net.ki +org.ki +gov.ki +info.ki +com.ki + +// km : https://en.wikipedia.org/wiki/.km +// http://www.domaine.km/documents/charte.doc +km +org.km +nom.km +gov.km +prd.km +tm.km +edu.km +mil.km +ass.km +com.km +// These are only mentioned as proposed suggestions at domaine.km, but +// https://en.wikipedia.org/wiki/.km says they're available for registration: +coop.km +asso.km +presse.km +medecin.km +notaires.km +pharmaciens.km +veterinaire.km +gouv.km + +// kn : https://en.wikipedia.org/wiki/.kn +// http://www.dot.kn/domainRules.html +kn +net.kn +org.kn +edu.kn +gov.kn + +// kp : http://www.kcce.kp/en_index.php +kp +com.kp +edu.kp +gov.kp +org.kp +rep.kp +tra.kp + +// kr : https://en.wikipedia.org/wiki/.kr +// see also: http://domain.nida.or.kr/eng/registration.jsp +kr +ac.kr +co.kr +es.kr +go.kr +hs.kr +kg.kr +mil.kr +ms.kr +ne.kr +or.kr +pe.kr +re.kr +sc.kr +// kr geographical names +busan.kr +chungbuk.kr +chungnam.kr +daegu.kr +daejeon.kr +gangwon.kr +gwangju.kr +gyeongbuk.kr +gyeonggi.kr +gyeongnam.kr +incheon.kr +jeju.kr +jeonbuk.kr +jeonnam.kr +seoul.kr +ulsan.kr + +// kw : https://en.wikipedia.org/wiki/.kw +*.kw + +// ky : http://www.icta.ky/da_ky_reg_dom.php +// Confirmed by registry 2008-06-17 +ky +edu.ky +gov.ky +com.ky +org.ky +net.ky + +// kz : https://en.wikipedia.org/wiki/.kz +// see also: http://www.nic.kz/rules/index.jsp +kz +org.kz +edu.kz +net.kz +gov.kz +mil.kz +com.kz + +// la : https://en.wikipedia.org/wiki/.la +// Submitted by registry +la +int.la +net.la +info.la +edu.la +gov.la +per.la +com.la +org.la + +// lb : https://en.wikipedia.org/wiki/.lb +// Submitted by registry +lb +com.lb +edu.lb +gov.lb +net.lb +org.lb + +// lc : https://en.wikipedia.org/wiki/.lc +// see also: http://www.nic.lc/rules.htm +lc +com.lc +net.lc +co.lc +org.lc +edu.lc +gov.lc + +// li : https://en.wikipedia.org/wiki/.li +li + +// lk : http://www.nic.lk/seclevpr.html +lk +gov.lk +sch.lk +net.lk +int.lk +com.lk +org.lk +edu.lk +ngo.lk +soc.lk +web.lk +ltd.lk +assn.lk +grp.lk +hotel.lk +ac.lk + +// lr : http://psg.com/dns/lr/lr.txt +// Submitted by registry +lr +com.lr +edu.lr +gov.lr +org.lr +net.lr + +// ls : https://en.wikipedia.org/wiki/.ls +ls +co.ls +org.ls + +// lt : https://en.wikipedia.org/wiki/.lt +lt +// gov.lt : http://www.gov.lt/index_en.php +gov.lt + +// lu : http://www.dns.lu/en/ +lu + +// lv : http://www.nic.lv/DNS/En/generic.php +lv +com.lv +edu.lv +gov.lv +org.lv +mil.lv +id.lv +net.lv +asn.lv +conf.lv + +// ly : http://www.nic.ly/regulations.php +ly +com.ly +net.ly +gov.ly +plc.ly +edu.ly +sch.ly +med.ly +org.ly +id.ly + +// ma : https://en.wikipedia.org/wiki/.ma +// http://www.anrt.ma/fr/admin/download/upload/file_fr782.pdf +ma +co.ma +net.ma +gov.ma +org.ma +ac.ma +press.ma + +// mc : http://www.nic.mc/ +mc +tm.mc +asso.mc + +// md : https://en.wikipedia.org/wiki/.md +md + +// me : https://en.wikipedia.org/wiki/.me +me +co.me +net.me +org.me +edu.me +ac.me +gov.me +its.me +priv.me + +// mg : http://nic.mg/nicmg/?page_id=39 +mg +org.mg +nom.mg +gov.mg +prd.mg +tm.mg +edu.mg +mil.mg +com.mg +co.mg + +// mh : https://en.wikipedia.org/wiki/.mh +mh + +// mil : https://en.wikipedia.org/wiki/.mil +mil + +// mk : https://en.wikipedia.org/wiki/.mk +// see also: http://dns.marnet.net.mk/postapka.php +mk +com.mk +org.mk +net.mk +edu.mk +gov.mk +inf.mk +name.mk + +// ml : http://www.gobin.info/domainname/ml-template.doc +// see also: https://en.wikipedia.org/wiki/.ml +ml +com.ml +edu.ml +gouv.ml +gov.ml +net.ml +org.ml +presse.ml + +// mm : https://en.wikipedia.org/wiki/.mm +*.mm + +// mn : https://en.wikipedia.org/wiki/.mn +mn +gov.mn +edu.mn +org.mn + +// mo : http://www.monic.net.mo/ +mo +com.mo +net.mo +org.mo +edu.mo +gov.mo + +// mobi : https://en.wikipedia.org/wiki/.mobi +mobi + +// mp : http://www.dot.mp/ +// Confirmed by registry 2008-06-17 +mp + +// mq : https://en.wikipedia.org/wiki/.mq +mq + +// mr : https://en.wikipedia.org/wiki/.mr +mr +gov.mr + +// ms : http://www.nic.ms/pdf/MS_Domain_Name_Rules.pdf +ms +com.ms +edu.ms +gov.ms +net.ms +org.ms + +// mt : https://www.nic.org.mt/go/policy +// Submitted by registry +mt +com.mt +edu.mt +net.mt +org.mt + +// mu : https://en.wikipedia.org/wiki/.mu +mu +com.mu +net.mu +org.mu +gov.mu +ac.mu +co.mu +or.mu + +// museum : http://about.museum/naming/ +// http://index.museum/ +museum +academy.museum +agriculture.museum +air.museum +airguard.museum +alabama.museum +alaska.museum +amber.museum +ambulance.museum +american.museum +americana.museum +americanantiques.museum +americanart.museum +amsterdam.museum +and.museum +annefrank.museum +anthro.museum +anthropology.museum +antiques.museum +aquarium.museum +arboretum.museum +archaeological.museum +archaeology.museum +architecture.museum +art.museum +artanddesign.museum +artcenter.museum +artdeco.museum +arteducation.museum +artgallery.museum +arts.museum +artsandcrafts.museum +asmatart.museum +assassination.museum +assisi.museum +association.museum +astronomy.museum +atlanta.museum +austin.museum +australia.museum +automotive.museum +aviation.museum +axis.museum +badajoz.museum +baghdad.museum +bahn.museum +bale.museum +baltimore.museum +barcelona.museum +baseball.museum +basel.museum +baths.museum +bauern.museum +beauxarts.museum +beeldengeluid.museum +bellevue.museum +bergbau.museum +berkeley.museum +berlin.museum +bern.museum +bible.museum +bilbao.museum +bill.museum +birdart.museum +birthplace.museum +bonn.museum +boston.museum +botanical.museum +botanicalgarden.museum +botanicgarden.museum +botany.museum +brandywinevalley.museum +brasil.museum +bristol.museum +british.museum +britishcolumbia.museum +broadcast.museum +brunel.museum +brussel.museum +brussels.museum +bruxelles.museum +building.museum +burghof.museum +bus.museum +bushey.museum +cadaques.museum +california.museum +cambridge.museum +can.museum +canada.museum +capebreton.museum +carrier.museum +cartoonart.museum +casadelamoneda.museum +castle.museum +castres.museum +celtic.museum +center.museum +chattanooga.museum +cheltenham.museum +chesapeakebay.museum +chicago.museum +children.museum +childrens.museum +childrensgarden.museum +chiropractic.museum +chocolate.museum +christiansburg.museum +cincinnati.museum +cinema.museum +circus.museum +civilisation.museum +civilization.museum +civilwar.museum +clinton.museum +clock.museum +coal.museum +coastaldefence.museum +cody.museum +coldwar.museum +collection.museum +colonialwilliamsburg.museum +coloradoplateau.museum +columbia.museum +columbus.museum +communication.museum +communications.museum +community.museum +computer.museum +computerhistory.museum +xn--comunicaes-v6a2o.museum +comunicações.museum +contemporary.museum +contemporaryart.museum +convent.museum +copenhagen.museum +corporation.museum +xn--correios-e-telecomunicaes-ghc29a.museum +correios-e-telecomunicações.museum +corvette.museum +costume.museum +countryestate.museum +county.museum +crafts.museum +cranbrook.museum +creation.museum +cultural.museum +culturalcenter.museum +culture.museum +cyber.museum +cymru.museum +dali.museum +dallas.museum +database.museum +ddr.museum +decorativearts.museum +delaware.museum +delmenhorst.museum +denmark.museum +depot.museum +design.museum +detroit.museum +dinosaur.museum +discovery.museum +dolls.museum +donostia.museum +durham.museum +eastafrica.museum +eastcoast.museum +education.museum +educational.museum +egyptian.museum +eisenbahn.museum +elburg.museum +elvendrell.museum +embroidery.museum +encyclopedic.museum +england.museum +entomology.museum +environment.museum +environmentalconservation.museum +epilepsy.museum +essex.museum +estate.museum +ethnology.museum +exeter.museum +exhibition.museum +family.museum +farm.museum +farmequipment.museum +farmers.museum +farmstead.museum +field.museum +figueres.museum +filatelia.museum +film.museum +fineart.museum +finearts.museum +finland.museum +flanders.museum +florida.museum +force.museum +fortmissoula.museum +fortworth.museum +foundation.museum +francaise.museum +frankfurt.museum +franziskaner.museum +freemasonry.museum +freiburg.museum +fribourg.museum +frog.museum +fundacio.museum +furniture.museum +gallery.museum +garden.museum +gateway.museum +geelvinck.museum +gemological.museum +geology.museum +georgia.museum +giessen.museum +glas.museum +glass.museum +gorge.museum +grandrapids.museum +graz.museum +guernsey.museum +halloffame.museum +hamburg.museum +handson.museum +harvestcelebration.museum +hawaii.museum +health.museum +heimatunduhren.museum +hellas.museum +helsinki.museum +hembygdsforbund.museum +heritage.museum +histoire.museum +historical.museum +historicalsociety.museum +historichouses.museum +historisch.museum +historisches.museum +history.museum +historyofscience.museum +horology.museum +house.museum +humanities.museum +illustration.museum +imageandsound.museum +indian.museum +indiana.museum +indianapolis.museum +indianmarket.museum +intelligence.museum +interactive.museum +iraq.museum +iron.museum +isleofman.museum +jamison.museum +jefferson.museum +jerusalem.museum +jewelry.museum +jewish.museum +jewishart.museum +jfk.museum +journalism.museum +judaica.museum +judygarland.museum +juedisches.museum +juif.museum +karate.museum +karikatur.museum +kids.museum +koebenhavn.museum +koeln.museum +kunst.museum +kunstsammlung.museum +kunstunddesign.museum +labor.museum +labour.museum +lajolla.museum +lancashire.museum +landes.museum +lans.museum +xn--lns-qla.museum +läns.museum +larsson.museum +lewismiller.museum +lincoln.museum +linz.museum +living.museum +livinghistory.museum +localhistory.museum +london.museum +losangeles.museum +louvre.museum +loyalist.museum +lucerne.museum +luxembourg.museum +luzern.museum +mad.museum +madrid.museum +mallorca.museum +manchester.museum +mansion.museum +mansions.museum +manx.museum +marburg.museum +maritime.museum +maritimo.museum +maryland.museum +marylhurst.museum +media.museum +medical.museum +medizinhistorisches.museum +meeres.museum +memorial.museum +mesaverde.museum +michigan.museum +midatlantic.museum +military.museum +mill.museum +miners.museum +mining.museum +minnesota.museum +missile.museum +missoula.museum +modern.museum +moma.museum +money.museum +monmouth.museum +monticello.museum +montreal.museum +moscow.museum +motorcycle.museum +muenchen.museum +muenster.museum +mulhouse.museum +muncie.museum +museet.museum +museumcenter.museum +museumvereniging.museum +music.museum +national.museum +nationalfirearms.museum +nationalheritage.museum +nativeamerican.museum +naturalhistory.museum +naturalhistorymuseum.museum +naturalsciences.museum +nature.museum +naturhistorisches.museum +natuurwetenschappen.museum +naumburg.museum +naval.museum +nebraska.museum +neues.museum +newhampshire.museum +newjersey.museum +newmexico.museum +newport.museum +newspaper.museum +newyork.museum +niepce.museum +norfolk.museum +north.museum +nrw.museum +nuernberg.museum +nuremberg.museum +nyc.museum +nyny.museum +oceanographic.museum +oceanographique.museum +omaha.museum +online.museum +ontario.museum +openair.museum +oregon.museum +oregontrail.museum +otago.museum +oxford.museum +pacific.museum +paderborn.museum +palace.museum +paleo.museum +palmsprings.museum +panama.museum +paris.museum +pasadena.museum +pharmacy.museum +philadelphia.museum +philadelphiaarea.museum +philately.museum +phoenix.museum +photography.museum +pilots.museum +pittsburgh.museum +planetarium.museum +plantation.museum +plants.museum +plaza.museum +portal.museum +portland.museum +portlligat.museum +posts-and-telecommunications.museum +preservation.museum +presidio.museum +press.museum +project.museum +public.museum +pubol.museum +quebec.museum +railroad.museum +railway.museum +research.museum +resistance.museum +riodejaneiro.museum +rochester.museum +rockart.museum +roma.museum +russia.museum +saintlouis.museum +salem.museum +salvadordali.museum +salzburg.museum +sandiego.museum +sanfrancisco.museum +santabarbara.museum +santacruz.museum +santafe.museum +saskatchewan.museum +satx.museum +savannahga.museum +schlesisches.museum +schoenbrunn.museum +schokoladen.museum +school.museum +schweiz.museum +science.museum +scienceandhistory.museum +scienceandindustry.museum +sciencecenter.museum +sciencecenters.museum +science-fiction.museum +sciencehistory.museum +sciences.museum +sciencesnaturelles.museum +scotland.museum +seaport.museum +settlement.museum +settlers.museum +shell.museum +sherbrooke.museum +sibenik.museum +silk.museum +ski.museum +skole.museum +society.museum +sologne.museum +soundandvision.museum +southcarolina.museum +southwest.museum +space.museum +spy.museum +square.museum +stadt.museum +stalbans.museum +starnberg.museum +state.museum +stateofdelaware.museum +station.museum +steam.museum +steiermark.museum +stjohn.museum +stockholm.museum +stpetersburg.museum +stuttgart.museum +suisse.museum +surgeonshall.museum +surrey.museum +svizzera.museum +sweden.museum +sydney.museum +tank.museum +tcm.museum +technology.museum +telekommunikation.museum +television.museum +texas.museum +textile.museum +theater.museum +time.museum +timekeeping.museum +topology.museum +torino.museum +touch.museum +town.museum +transport.museum +tree.museum +trolley.museum +trust.museum +trustee.museum +uhren.museum +ulm.museum +undersea.museum +university.museum +usa.museum +usantiques.museum +usarts.museum +uscountryestate.museum +usculture.museum +usdecorativearts.museum +usgarden.museum +ushistory.museum +ushuaia.museum +uslivinghistory.museum +utah.museum +uvic.museum +valley.museum +vantaa.museum +versailles.museum +viking.museum +village.museum +virginia.museum +virtual.museum +virtuel.museum +vlaanderen.museum +volkenkunde.museum +wales.museum +wallonie.museum +war.museum +washingtondc.museum +watchandclock.museum +watch-and-clock.museum +western.museum +westfalen.museum +whaling.museum +wildlife.museum +williamsburg.museum +windmill.museum +workshop.museum +york.museum +yorkshire.museum +yosemite.museum +youth.museum +zoological.museum +zoology.museum +xn--9dbhblg6di.museum +ירושלים.museum +xn--h1aegh.museum +иком.museum + +// mv : https://en.wikipedia.org/wiki/.mv +// "mv" included because, contra Wikipedia, google.mv exists. +mv +aero.mv +biz.mv +com.mv +coop.mv +edu.mv +gov.mv +info.mv +int.mv +mil.mv +museum.mv +name.mv +net.mv +org.mv +pro.mv + +// mw : http://www.registrar.mw/ +mw +ac.mw +biz.mw +co.mw +com.mw +coop.mw +edu.mw +gov.mw +int.mw +museum.mw +net.mw +org.mw + +// mx : http://www.nic.mx/ +// Submitted by registry +mx +com.mx +org.mx +gob.mx +edu.mx +net.mx + +// my : http://www.mynic.net.my/ +my +com.my +net.my +org.my +gov.my +edu.my +mil.my +name.my + +// mz : http://www.uem.mz/ +// Submitted by registry +mz +ac.mz +adv.mz +co.mz +edu.mz +gov.mz +mil.mz +net.mz +org.mz + +// na : http://www.na-nic.com.na/ +// http://www.info.na/domain/ +na +info.na +pro.na +name.na +school.na +or.na +dr.na +us.na +mx.na +ca.na +in.na +cc.na +tv.na +ws.na +mobi.na +co.na +com.na +org.na + +// name : has 2nd-level tlds, but there's no list of them +name + +// nc : http://www.cctld.nc/ +nc +asso.nc + +// ne : https://en.wikipedia.org/wiki/.ne +ne + +// net : https://en.wikipedia.org/wiki/.net +net + +// nf : https://en.wikipedia.org/wiki/.nf +nf +com.nf +net.nf +per.nf +rec.nf +web.nf +arts.nf +firm.nf +info.nf +other.nf +store.nf + +// 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 + +// ni : http://www.nic.ni/ +ni +ac.ni +biz.ni +co.ni +com.ni +edu.ni +gob.ni +in.ni +info.ni +int.ni +mil.ni +net.ni +nom.ni +org.ni +web.ni + +// nl : https://en.wikipedia.org/wiki/.nl +// https://www.sidn.nl/ +// ccTLD for the Netherlands +nl + +// BV.nl will be a registry for dutch BV's (besloten vennootschap) +bv.nl + +// no : http://www.norid.no/regelverk/index.en.html +// The Norwegian registry has declined to notify us of updates. The web pages +// referenced below are the official source of the data. There is also an +// announce mailing list: +// https://postlister.uninett.no/sympa/info/norid-diskusjon +no +// Norid generic domains : http://www.norid.no/regelverk/vedlegg-c.en.html +fhs.no +vgs.no +fylkesbibl.no +folkebibl.no +museum.no +idrett.no +priv.no +// Non-Norid generic domains : http://www.norid.no/regelverk/vedlegg-d.en.html +mil.no +stat.no +dep.no +kommune.no +herad.no +// no geographical names : http://www.norid.no/regelverk/vedlegg-b.en.html +// counties +aa.no +ah.no +bu.no +fm.no +hl.no +hm.no +jan-mayen.no +mr.no +nl.no +nt.no +of.no +ol.no +oslo.no +rl.no +sf.no +st.no +svalbard.no +tm.no +tr.no +va.no +vf.no +// primary and lower secondary schools per county +gs.aa.no +gs.ah.no +gs.bu.no +gs.fm.no +gs.hl.no +gs.hm.no +gs.jan-mayen.no +gs.mr.no +gs.nl.no +gs.nt.no +gs.of.no +gs.ol.no +gs.oslo.no +gs.rl.no +gs.sf.no +gs.st.no +gs.svalbard.no +gs.tm.no +gs.tr.no +gs.va.no +gs.vf.no +// cities +akrehamn.no +xn--krehamn-dxa.no +åkrehamn.no +algard.no +xn--lgrd-poac.no +ålgård.no +arna.no +brumunddal.no +bryne.no +bronnoysund.no +xn--brnnysund-m8ac.no +brønnøysund.no +drobak.no +xn--drbak-wua.no +drøbak.no +egersund.no +fetsund.no +floro.no +xn--flor-jra.no +florø.no +fredrikstad.no +hokksund.no +honefoss.no +xn--hnefoss-q1a.no +hønefoss.no +jessheim.no +jorpeland.no +xn--jrpeland-54a.no +jørpeland.no +kirkenes.no +kopervik.no +krokstadelva.no +langevag.no +xn--langevg-jxa.no +langevåg.no +leirvik.no +mjondalen.no +xn--mjndalen-64a.no +mjøndalen.no +mo-i-rana.no +mosjoen.no +xn--mosjen-eya.no +mosjøen.no +nesoddtangen.no +orkanger.no +osoyro.no +xn--osyro-wua.no +osøyro.no +raholt.no +xn--rholt-mra.no +råholt.no +sandnessjoen.no +xn--sandnessjen-ogb.no +sandnessjøen.no +skedsmokorset.no +slattum.no +spjelkavik.no +stathelle.no +stavern.no +stjordalshalsen.no +xn--stjrdalshalsen-sqb.no +stjørdalshalsen.no +tananger.no +tranby.no +vossevangen.no +// communities +afjord.no +xn--fjord-lra.no +åfjord.no +agdenes.no +al.no +xn--l-1fa.no +ål.no +alesund.no +xn--lesund-hua.no +ålesund.no +alstahaug.no +alta.no +xn--lt-liac.no +áltá.no +alaheadju.no +xn--laheadju-7ya.no +álaheadju.no +alvdal.no +amli.no +xn--mli-tla.no +åmli.no +amot.no +xn--mot-tla.no +åmot.no +andebu.no +andoy.no +xn--andy-ira.no +andøy.no +andasuolo.no +ardal.no +xn--rdal-poa.no +årdal.no +aremark.no +arendal.no +xn--s-1fa.no +ås.no +aseral.no +xn--seral-lra.no +åseral.no +asker.no +askim.no +askvoll.no +askoy.no +xn--asky-ira.no +askøy.no +asnes.no +xn--snes-poa.no +åsnes.no +audnedaln.no +aukra.no +aure.no +aurland.no +aurskog-holand.no +xn--aurskog-hland-jnb.no +aurskog-høland.no +austevoll.no +austrheim.no +averoy.no +xn--avery-yua.no +averøy.no +balestrand.no +ballangen.no +balat.no +xn--blt-elab.no +bálát.no +balsfjord.no +bahccavuotna.no +xn--bhccavuotna-k7a.no +báhccavuotna.no +bamble.no +bardu.no +beardu.no +beiarn.no +bajddar.no +xn--bjddar-pta.no +bájddar.no +baidar.no +xn--bidr-5nac.no +báidár.no +berg.no +bergen.no +berlevag.no +xn--berlevg-jxa.no +berlevåg.no +bearalvahki.no +xn--bearalvhki-y4a.no +bearalváhki.no +bindal.no +birkenes.no +bjarkoy.no +xn--bjarky-fya.no +bjarkøy.no +bjerkreim.no +bjugn.no +bodo.no +xn--bod-2na.no +bodø.no +badaddja.no +xn--bdddj-mrabd.no +bådåddjå.no +budejju.no +bokn.no +bremanger.no +bronnoy.no +xn--brnny-wuac.no +brønnøy.no +bygland.no +bykle.no +barum.no +xn--brum-voa.no +bærum.no +bo.telemark.no +xn--b-5ga.telemark.no +bø.telemark.no +bo.nordland.no +xn--b-5ga.nordland.no +bø.nordland.no +bievat.no +xn--bievt-0qa.no +bievát.no +bomlo.no +xn--bmlo-gra.no +bømlo.no +batsfjord.no +xn--btsfjord-9za.no +båtsfjord.no +bahcavuotna.no +xn--bhcavuotna-s4a.no +báhcavuotna.no +dovre.no +drammen.no +drangedal.no +dyroy.no +xn--dyry-ira.no +dyrøy.no +donna.no +xn--dnna-gra.no +dønna.no +eid.no +eidfjord.no +eidsberg.no +eidskog.no +eidsvoll.no +eigersund.no +elverum.no +enebakk.no +engerdal.no +etne.no +etnedal.no +evenes.no +evenassi.no +xn--eveni-0qa01ga.no +evenášši.no +evje-og-hornnes.no +farsund.no +fauske.no +fuossko.no +fuoisku.no +fedje.no +fet.no +finnoy.no +xn--finny-yua.no +finnøy.no +fitjar.no +fjaler.no +fjell.no +flakstad.no +flatanger.no +flekkefjord.no +flesberg.no +flora.no +fla.no +xn--fl-zia.no +flå.no +folldal.no +forsand.no +fosnes.no +frei.no +frogn.no +froland.no +frosta.no +frana.no +xn--frna-woa.no +fræna.no +froya.no +xn--frya-hra.no +frøya.no +fusa.no +fyresdal.no +forde.no +xn--frde-gra.no +førde.no +gamvik.no +gangaviika.no +xn--ggaviika-8ya47h.no +gáŋgaviika.no +gaular.no +gausdal.no +gildeskal.no +xn--gildeskl-g0a.no +gildeskål.no +giske.no +gjemnes.no +gjerdrum.no +gjerstad.no +gjesdal.no +gjovik.no +xn--gjvik-wua.no +gjøvik.no +gloppen.no +gol.no +gran.no +grane.no +granvin.no +gratangen.no +grimstad.no +grong.no +kraanghke.no +xn--kranghke-b0a.no +kråanghke.no +grue.no +gulen.no +hadsel.no +halden.no +halsa.no +hamar.no +hamaroy.no +habmer.no +xn--hbmer-xqa.no +hábmer.no +hapmir.no +xn--hpmir-xqa.no +hápmir.no +hammerfest.no +hammarfeasta.no +xn--hmmrfeasta-s4ac.no +hámmárfeasta.no +haram.no +hareid.no +harstad.no +hasvik.no +aknoluokta.no +xn--koluokta-7ya57h.no +ákŋoluokta.no +hattfjelldal.no +aarborte.no +haugesund.no +hemne.no +hemnes.no +hemsedal.no +heroy.more-og-romsdal.no +xn--hery-ira.xn--mre-og-romsdal-qqb.no +herøy.møre-og-romsdal.no +heroy.nordland.no +xn--hery-ira.nordland.no +herøy.nordland.no +hitra.no +hjartdal.no +hjelmeland.no +hobol.no +xn--hobl-ira.no +hobøl.no +hof.no +hol.no +hole.no +holmestrand.no +holtalen.no +xn--holtlen-hxa.no +holtålen.no +hornindal.no +horten.no +hurdal.no +hurum.no +hvaler.no +hyllestad.no +hagebostad.no +xn--hgebostad-g3a.no +hægebostad.no +hoyanger.no +xn--hyanger-q1a.no +høyanger.no +hoylandet.no +xn--hylandet-54a.no +høylandet.no +ha.no +xn--h-2fa.no +hå.no +ibestad.no +inderoy.no +xn--indery-fya.no +inderøy.no +iveland.no +jevnaker.no +jondal.no +jolster.no +xn--jlster-bya.no +jølster.no +karasjok.no +karasjohka.no +xn--krjohka-hwab49j.no +kárášjohka.no +karlsoy.no +galsa.no +xn--gls-elac.no +gálsá.no +karmoy.no +xn--karmy-yua.no +karmøy.no +kautokeino.no +guovdageaidnu.no +klepp.no +klabu.no +xn--klbu-woa.no +klæbu.no +kongsberg.no +kongsvinger.no +kragero.no +xn--krager-gya.no +kragerø.no +kristiansand.no +kristiansund.no +krodsherad.no +xn--krdsherad-m8a.no +krødsherad.no +kvalsund.no +rahkkeravju.no +xn--rhkkervju-01af.no +ráhkkerávju.no +kvam.no +kvinesdal.no +kvinnherad.no +kviteseid.no +kvitsoy.no +xn--kvitsy-fya.no +kvitsøy.no +kvafjord.no +xn--kvfjord-nxa.no +kvæfjord.no +giehtavuoatna.no +kvanangen.no +xn--kvnangen-k0a.no +kvænangen.no +navuotna.no +xn--nvuotna-hwa.no +návuotna.no +kafjord.no +xn--kfjord-iua.no +kåfjord.no +gaivuotna.no +xn--givuotna-8ya.no +gáivuotna.no +larvik.no +lavangen.no +lavagis.no +loabat.no +xn--loabt-0qa.no +loabát.no +lebesby.no +davvesiida.no +leikanger.no +leirfjord.no +leka.no +leksvik.no +lenvik.no +leangaviika.no +xn--leagaviika-52b.no +leaŋgaviika.no +lesja.no +levanger.no +lier.no +lierne.no +lillehammer.no +lillesand.no +lindesnes.no +lindas.no +xn--linds-pra.no +lindås.no +lom.no +loppa.no +lahppi.no +xn--lhppi-xqa.no +láhppi.no +lund.no +lunner.no +luroy.no +xn--lury-ira.no +lurøy.no +luster.no +lyngdal.no +lyngen.no +ivgu.no +lardal.no +lerdal.no +xn--lrdal-sra.no +lærdal.no +lodingen.no +xn--ldingen-q1a.no +lødingen.no +lorenskog.no +xn--lrenskog-54a.no +lørenskog.no +loten.no +xn--lten-gra.no +løten.no +malvik.no +masoy.no +xn--msy-ula0h.no +måsøy.no +muosat.no +xn--muost-0qa.no +muosát.no +mandal.no +marker.no +marnardal.no +masfjorden.no +meland.no +meldal.no +melhus.no +meloy.no +xn--mely-ira.no +meløy.no +meraker.no +xn--merker-kua.no +meråker.no +moareke.no +xn--moreke-jua.no +moåreke.no +midsund.no +midtre-gauldal.no +modalen.no +modum.no +molde.no +moskenes.no +moss.no +mosvik.no +malselv.no +xn--mlselv-iua.no +målselv.no +malatvuopmi.no +xn--mlatvuopmi-s4a.no +málatvuopmi.no +namdalseid.no +aejrie.no +namsos.no +namsskogan.no +naamesjevuemie.no +xn--nmesjevuemie-tcba.no +nååmesjevuemie.no +laakesvuemie.no +nannestad.no +narvik.no +narviika.no +naustdal.no +nedre-eiker.no +nes.akershus.no +nes.buskerud.no +nesna.no +nesodden.no +nesseby.no +unjarga.no +xn--unjrga-rta.no +unjárga.no +nesset.no +nissedal.no +nittedal.no +nord-aurdal.no +nord-fron.no +nord-odal.no +norddal.no +nordkapp.no +davvenjarga.no +xn--davvenjrga-y4a.no +davvenjárga.no +nordre-land.no +nordreisa.no +raisa.no +xn--risa-5na.no +ráisa.no +nore-og-uvdal.no +notodden.no +naroy.no +xn--nry-yla5g.no +nærøy.no +notteroy.no +xn--nttery-byae.no +nøtterøy.no +odda.no +oksnes.no +xn--ksnes-uua.no +øksnes.no +oppdal.no +oppegard.no +xn--oppegrd-ixa.no +oppegård.no +orkdal.no +orland.no +xn--rland-uua.no +ørland.no +orskog.no +xn--rskog-uua.no +ørskog.no +orsta.no +xn--rsta-fra.no +ørsta.no +os.hedmark.no +os.hordaland.no +osen.no +osteroy.no +xn--ostery-fya.no +osterøy.no +ostre-toten.no +xn--stre-toten-zcb.no +østre-toten.no +overhalla.no +ovre-eiker.no +xn--vre-eiker-k8a.no +øvre-eiker.no +oyer.no +xn--yer-zna.no +øyer.no +oygarden.no +xn--ygarden-p1a.no +øygarden.no +oystre-slidre.no +xn--ystre-slidre-ujb.no +øystre-slidre.no +porsanger.no +porsangu.no +xn--porsgu-sta26f.no +porsáŋgu.no +porsgrunn.no +radoy.no +xn--rady-ira.no +radøy.no +rakkestad.no +rana.no +ruovat.no +randaberg.no +rauma.no +rendalen.no +rennebu.no +rennesoy.no +xn--rennesy-v1a.no +rennesøy.no +rindal.no +ringebu.no +ringerike.no +ringsaker.no +rissa.no +risor.no +xn--risr-ira.no +risør.no +roan.no +rollag.no +rygge.no +ralingen.no +xn--rlingen-mxa.no +rælingen.no +rodoy.no +xn--rdy-0nab.no +rødøy.no +romskog.no +xn--rmskog-bya.no +rømskog.no +roros.no +xn--rros-gra.no +røros.no +rost.no +xn--rst-0na.no +røst.no +royken.no +xn--ryken-vua.no +røyken.no +royrvik.no +xn--ryrvik-bya.no +røyrvik.no +rade.no +xn--rde-ula.no +råde.no +salangen.no +siellak.no +saltdal.no +salat.no +xn--slt-elab.no +sálát.no +xn--slat-5na.no +sálat.no +samnanger.no +sande.more-og-romsdal.no +sande.xn--mre-og-romsdal-qqb.no +sande.møre-og-romsdal.no +sande.vestfold.no +sandefjord.no +sandnes.no +sandoy.no +xn--sandy-yua.no +sandøy.no +sarpsborg.no +sauda.no +sauherad.no +sel.no +selbu.no +selje.no +seljord.no +sigdal.no +siljan.no +sirdal.no +skaun.no +skedsmo.no +ski.no +skien.no +skiptvet.no +skjervoy.no +xn--skjervy-v1a.no +skjervøy.no +skierva.no +xn--skierv-uta.no +skiervá.no +skjak.no +xn--skjk-soa.no +skjåk.no +skodje.no +skanland.no +xn--sknland-fxa.no +skånland.no +skanit.no +xn--sknit-yqa.no +skánit.no +smola.no +xn--smla-hra.no +smøla.no +snillfjord.no +snasa.no +xn--snsa-roa.no +snåsa.no +snoasa.no +snaase.no +xn--snase-nra.no +snåase.no +sogndal.no +sokndal.no +sola.no +solund.no +songdalen.no +sortland.no +spydeberg.no +stange.no +stavanger.no +steigen.no +steinkjer.no +stjordal.no +xn--stjrdal-s1a.no +stjørdal.no +stokke.no +stor-elvdal.no +stord.no +stordal.no +storfjord.no +omasvuotna.no +strand.no +stranda.no +stryn.no +sula.no +suldal.no +sund.no +sunndal.no +surnadal.no +sveio.no +svelvik.no +sykkylven.no +sogne.no +xn--sgne-gra.no +søgne.no +somna.no +xn--smna-gra.no +sømna.no +sondre-land.no +xn--sndre-land-0cb.no +søndre-land.no +sor-aurdal.no +xn--sr-aurdal-l8a.no +sør-aurdal.no +sor-fron.no +xn--sr-fron-q1a.no +sør-fron.no +sor-odal.no +xn--sr-odal-q1a.no +sør-odal.no +sor-varanger.no +xn--sr-varanger-ggb.no +sør-varanger.no +matta-varjjat.no +xn--mtta-vrjjat-k7af.no +mátta-várjjat.no +sorfold.no +xn--srfold-bya.no +sørfold.no +sorreisa.no +xn--srreisa-q1a.no +sørreisa.no +sorum.no +xn--srum-gra.no +sørum.no +tana.no +deatnu.no +time.no +tingvoll.no +tinn.no +tjeldsund.no +dielddanuorri.no +tjome.no +xn--tjme-hra.no +tjøme.no +tokke.no +tolga.no +torsken.no +tranoy.no +xn--trany-yua.no +tranøy.no +tromso.no +xn--troms-zua.no +tromsø.no +tromsa.no +romsa.no +trondheim.no +troandin.no +trysil.no +trana.no +xn--trna-woa.no +træna.no +trogstad.no +xn--trgstad-r1a.no +trøgstad.no +tvedestrand.no +tydal.no +tynset.no +tysfjord.no +divtasvuodna.no +divttasvuotna.no +tysnes.no +tysvar.no +xn--tysvr-vra.no +tysvær.no +tonsberg.no +xn--tnsberg-q1a.no +tønsberg.no +ullensaker.no +ullensvang.no +ulvik.no +utsira.no +vadso.no +xn--vads-jra.no +vadsø.no +cahcesuolo.no +xn--hcesuolo-7ya35b.no +čáhcesuolo.no +vaksdal.no +valle.no +vang.no +vanylven.no +vardo.no +xn--vard-jra.no +vardø.no +varggat.no +xn--vrggt-xqad.no +várggát.no +vefsn.no +vaapste.no +vega.no +vegarshei.no +xn--vegrshei-c0a.no +vegårshei.no +vennesla.no +verdal.no +verran.no +vestby.no +vestnes.no +vestre-slidre.no +vestre-toten.no +vestvagoy.no +xn--vestvgy-ixa6o.no +vestvågøy.no +vevelstad.no +vik.no +vikna.no +vindafjord.no +volda.no +voss.no +varoy.no +xn--vry-yla5g.no +værøy.no +vagan.no +xn--vgan-qoa.no +vågan.no +voagat.no +vagsoy.no +xn--vgsy-qoa0j.no +vågsøy.no +vaga.no +xn--vg-yiab.no +vågå.no +valer.ostfold.no +xn--vler-qoa.xn--stfold-9xa.no +våler.østfold.no +valer.hedmark.no +xn--vler-qoa.hedmark.no +våler.hedmark.no + +// np : http://www.mos.com.np/register.html +*.np + +// nr : http://cenpac.net.nr/dns/index.html +// Submitted by registry +nr +biz.nr +info.nr +gov.nr +edu.nr +org.nr +net.nr +com.nr + +// nu : https://en.wikipedia.org/wiki/.nu +nu + +// nz : https://en.wikipedia.org/wiki/.nz +// Submitted by registry +nz +ac.nz +co.nz +cri.nz +geek.nz +gen.nz +govt.nz +health.nz +iwi.nz +kiwi.nz +maori.nz +mil.nz +xn--mori-qsa.nz +māori.nz +net.nz +org.nz +parliament.nz +school.nz + +// om : https://en.wikipedia.org/wiki/.om +om +co.om +com.om +edu.om +gov.om +med.om +museum.om +net.om +org.om +pro.om + +// onion : https://tools.ietf.org/html/rfc7686 +onion + +// org : https://en.wikipedia.org/wiki/.org +org + +// pa : http://www.nic.pa/ +// Some additional second level "domains" resolve directly as hostnames, such as +// pannet.pa, so we add a rule for "pa". +pa +ac.pa +gob.pa +com.pa +org.pa +sld.pa +edu.pa +net.pa +ing.pa +abo.pa +med.pa +nom.pa + +// pe : https://www.nic.pe/InformeFinalComision.pdf +pe +edu.pe +gob.pe +nom.pe +mil.pe +org.pe +com.pe +net.pe + +// pf : http://www.gobin.info/domainname/formulaire-pf.pdf +pf +com.pf +org.pf +edu.pf + +// pg : https://en.wikipedia.org/wiki/.pg +*.pg + +// ph : http://www.domains.ph/FAQ2.asp +// Submitted by registry +ph +com.ph +net.ph +org.ph +gov.ph +edu.ph +ngo.ph +mil.ph +i.ph + +// pk : http://pk5.pknic.net.pk/pk5/msgNamepk.PK +pk +com.pk +net.pk +edu.pk +org.pk +fam.pk +biz.pk +web.pk +gov.pk +gob.pk +gok.pk +gon.pk +gop.pk +gos.pk +info.pk + +// pl http://www.dns.pl/english/index.html +// Submitted by registry +pl +com.pl +net.pl +org.pl +// pl functional domains (http://www.dns.pl/english/index.html) +aid.pl +agro.pl +atm.pl +auto.pl +biz.pl +edu.pl +gmina.pl +gsm.pl +info.pl +mail.pl +miasta.pl +media.pl +mil.pl +nieruchomosci.pl +nom.pl +pc.pl +powiat.pl +priv.pl +realestate.pl +rel.pl +sex.pl +shop.pl +sklep.pl +sos.pl +szkola.pl +targi.pl +tm.pl +tourism.pl +travel.pl +turystyka.pl +// Government domains +gov.pl +ap.gov.pl +ic.gov.pl +is.gov.pl +us.gov.pl +kmpsp.gov.pl +kppsp.gov.pl +kwpsp.gov.pl +psp.gov.pl +wskr.gov.pl +kwp.gov.pl +mw.gov.pl +ug.gov.pl +um.gov.pl +umig.gov.pl +ugim.gov.pl +upow.gov.pl +uw.gov.pl +starostwo.gov.pl +pa.gov.pl +po.gov.pl +psse.gov.pl +pup.gov.pl +rzgw.gov.pl +sa.gov.pl +so.gov.pl +sr.gov.pl +wsa.gov.pl +sko.gov.pl +uzs.gov.pl +wiih.gov.pl +winb.gov.pl +pinb.gov.pl +wios.gov.pl +witd.gov.pl +wzmiuw.gov.pl +piw.gov.pl +wiw.gov.pl +griw.gov.pl +wif.gov.pl +oum.gov.pl +sdn.gov.pl +zp.gov.pl +uppo.gov.pl +mup.gov.pl +wuoz.gov.pl +konsulat.gov.pl +oirm.gov.pl +// pl regional domains (http://www.dns.pl/english/index.html) +augustow.pl +babia-gora.pl +bedzin.pl +beskidy.pl +bialowieza.pl +bialystok.pl +bielawa.pl +bieszczady.pl +boleslawiec.pl +bydgoszcz.pl +bytom.pl +cieszyn.pl +czeladz.pl +czest.pl +dlugoleka.pl +elblag.pl +elk.pl +glogow.pl +gniezno.pl +gorlice.pl +grajewo.pl +ilawa.pl +jaworzno.pl +jelenia-gora.pl +jgora.pl +kalisz.pl +kazimierz-dolny.pl +karpacz.pl +kartuzy.pl +kaszuby.pl +katowice.pl +kepno.pl +ketrzyn.pl +klodzko.pl +kobierzyce.pl +kolobrzeg.pl +konin.pl +konskowola.pl +kutno.pl +lapy.pl +lebork.pl +legnica.pl +lezajsk.pl +limanowa.pl +lomza.pl +lowicz.pl +lubin.pl +lukow.pl +malbork.pl +malopolska.pl +mazowsze.pl +mazury.pl +mielec.pl +mielno.pl +mragowo.pl +naklo.pl +nowaruda.pl +nysa.pl +olawa.pl +olecko.pl +olkusz.pl +olsztyn.pl +opoczno.pl +opole.pl +ostroda.pl +ostroleka.pl +ostrowiec.pl +ostrowwlkp.pl +pila.pl +pisz.pl +podhale.pl +podlasie.pl +polkowice.pl +pomorze.pl +pomorskie.pl +prochowice.pl +pruszkow.pl +przeworsk.pl +pulawy.pl +radom.pl +rawa-maz.pl +rybnik.pl +rzeszow.pl +sanok.pl +sejny.pl +slask.pl +slupsk.pl +sosnowiec.pl +stalowa-wola.pl +skoczow.pl +starachowice.pl +stargard.pl +suwalki.pl +swidnica.pl +swiebodzin.pl +swinoujscie.pl +szczecin.pl +szczytno.pl +tarnobrzeg.pl +tgory.pl +turek.pl +tychy.pl +ustka.pl +walbrzych.pl +warmia.pl +warszawa.pl +waw.pl +wegrow.pl +wielun.pl +wlocl.pl +wloclawek.pl +wodzislaw.pl +wolomin.pl +wroclaw.pl +zachpomor.pl +zagan.pl +zarow.pl +zgora.pl +zgorzelec.pl + +// pm : http://www.afnic.fr/medias/documents/AFNIC-naming-policy2012.pdf +pm + +// pn : http://www.government.pn/PnRegistry/policies.htm +pn +gov.pn +co.pn +org.pn +edu.pn +net.pn + +// post : https://en.wikipedia.org/wiki/.post +post + +// pr : http://www.nic.pr/index.asp?f=1 +pr +com.pr +net.pr +org.pr +gov.pr +edu.pr +isla.pr +pro.pr +biz.pr +info.pr +name.pr +// these aren't mentioned on nic.pr, but on https://en.wikipedia.org/wiki/.pr +est.pr +prof.pr +ac.pr + +// 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 +recht.pro + +// ps : https://en.wikipedia.org/wiki/.ps +// http://www.nic.ps/registration/policy.html#reg +ps +edu.ps +gov.ps +sec.ps +plo.ps +com.ps +org.ps +net.ps + +// pt : http://online.dns.pt/dns/start_dns +pt +net.pt +gov.pt +org.pt +edu.pt +int.pt +publ.pt +com.pt +nome.pt + +// pw : https://en.wikipedia.org/wiki/.pw +pw +co.pw +ne.pw +or.pw +ed.pw +go.pw +belau.pw + +// py : http://www.nic.py/pautas.html#seccion_9 +// Submitted by registry +py +com.py +coop.py +edu.py +gov.py +mil.py +net.py +org.py + +// qa : http://domains.qa/en/ +qa +com.qa +edu.qa +gov.qa +mil.qa +name.qa +net.qa +org.qa +sch.qa + +// re : http://www.afnic.re/obtenir/chartes/nommage-re/annexe-descriptifs +re +asso.re +com.re +nom.re + +// ro : http://www.rotld.ro/ +ro +arts.ro +com.ro +firm.ro +info.ro +nom.ro +nt.ro +org.ro +rec.ro +store.ro +tm.ro +www.ro + +// rs : https://www.rnids.rs/en/domains/national-domains +rs +ac.rs +co.rs +edu.rs +gov.rs +in.rs +org.rs + +// ru : https://cctld.ru/en/domains/domens_ru/reserved/ +ru +ac.ru +edu.ru +gov.ru +int.ru +mil.ru +test.ru + +// rw : http://www.nic.rw/cgi-bin/policy.pl +rw +gov.rw +net.rw +edu.rw +ac.rw +com.rw +co.rw +int.rw +mil.rw +gouv.rw + +// sa : http://www.nic.net.sa/ +sa +com.sa +net.sa +org.sa +gov.sa +med.sa +pub.sa +edu.sa +sch.sa + +// sb : http://www.sbnic.net.sb/ +// Submitted by registry +sb +com.sb +edu.sb +gov.sb +net.sb +org.sb + +// sc : http://www.nic.sc/ +sc +com.sc +gov.sc +net.sc +org.sc +edu.sc + +// sd : http://www.isoc.sd/sudanic.isoc.sd/billing_pricing.htm +// Submitted by registry +sd +com.sd +net.sd +org.sd +edu.sd +med.sd +tv.sd +gov.sd +info.sd + +// se : https://en.wikipedia.org/wiki/.se +// Submitted by registry +se +a.se +ac.se +b.se +bd.se +brand.se +c.se +d.se +e.se +f.se +fh.se +fhsk.se +fhv.se +g.se +h.se +i.se +k.se +komforb.se +kommunalforbund.se +komvux.se +l.se +lanbib.se +m.se +n.se +naturbruksgymn.se +o.se +org.se +p.se +parti.se +pp.se +press.se +r.se +s.se +t.se +tm.se +u.se +w.se +x.se +y.se +z.se + +// sg : http://www.nic.net.sg/page/registration-policies-procedures-and-guidelines +sg +com.sg +net.sg +org.sg +gov.sg +edu.sg +per.sg + +// sh : http://www.nic.sh/registrar.html +sh +com.sh +net.sh +gov.sh +org.sh +mil.sh + +// si : https://en.wikipedia.org/wiki/.si +si + +// sj : No registrations at this time. +// Submitted by registry +sj + +// sk : https://en.wikipedia.org/wiki/.sk +// list of 2nd level domains ? +sk + +// sl : http://www.nic.sl +// Submitted by registry +sl +com.sl +net.sl +edu.sl +gov.sl +org.sl + +// sm : https://en.wikipedia.org/wiki/.sm +sm + +// sn : https://en.wikipedia.org/wiki/.sn +sn +art.sn +com.sn +edu.sn +gouv.sn +org.sn +perso.sn +univ.sn + +// so : http://www.soregistry.com/ +so +com.so +net.so +org.so + +// sr : https://en.wikipedia.org/wiki/.sr +sr + +// st : http://www.nic.st/html/policyrules/ +st +co.st +com.st +consulado.st +edu.st +embaixada.st +gov.st +mil.st +net.st +org.st +principe.st +saotome.st +store.st + +// su : https://en.wikipedia.org/wiki/.su +su + +// sv : http://www.svnet.org.sv/niveldos.pdf +sv +com.sv +edu.sv +gob.sv +org.sv +red.sv + +// sx : https://en.wikipedia.org/wiki/.sx +// Submitted by registry +sx +gov.sx + +// sy : https://en.wikipedia.org/wiki/.sy +// see also: http://www.gobin.info/domainname/sy.doc +sy +edu.sy +gov.sy +net.sy +mil.sy +com.sy +org.sy + +// sz : https://en.wikipedia.org/wiki/.sz +// http://www.sispa.org.sz/ +sz +co.sz +ac.sz +org.sz + +// tc : https://en.wikipedia.org/wiki/.tc +tc + +// td : https://en.wikipedia.org/wiki/.td +td + +// tel: https://en.wikipedia.org/wiki/.tel +// http://www.telnic.org/ +tel + +// tf : https://en.wikipedia.org/wiki/.tf +tf + +// tg : https://en.wikipedia.org/wiki/.tg +// http://www.nic.tg/ +tg + +// th : https://en.wikipedia.org/wiki/.th +// Submitted by registry +th +ac.th +co.th +go.th +in.th +mi.th +net.th +or.th + +// tj : http://www.nic.tj/policy.html +tj +ac.tj +biz.tj +co.tj +com.tj +edu.tj +go.tj +gov.tj +int.tj +mil.tj +name.tj +net.tj +nic.tj +org.tj +test.tj +web.tj + +// tk : https://en.wikipedia.org/wiki/.tk +tk + +// tl : https://en.wikipedia.org/wiki/.tl +tl +gov.tl + +// tm : http://www.nic.tm/local.html +tm +com.tm +co.tm +org.tm +net.tm +nom.tm +gov.tm +mil.tm +edu.tm + +// tn : https://en.wikipedia.org/wiki/.tn +// http://whois.ati.tn/ +tn +com.tn +ens.tn +fin.tn +gov.tn +ind.tn +intl.tn +nat.tn +net.tn +org.tn +info.tn +perso.tn +tourism.tn +edunet.tn +rnrt.tn +rns.tn +rnu.tn +mincom.tn +agrinet.tn +defense.tn +turen.tn + +// to : https://en.wikipedia.org/wiki/.to +// Submitted by registry +to +com.to +gov.to +net.to +org.to +edu.to +mil.to + +// subTLDs: https://www.nic.tr/forms/eng/policies.pdf +// and: https://www.nic.tr/forms/politikalar.pdf +// Submitted by +tr +com.tr +info.tr +biz.tr +net.tr +org.tr +web.tr +gen.tr +tv.tr +av.tr +dr.tr +bbs.tr +name.tr +tel.tr +gov.tr +bel.tr +pol.tr +mil.tr +k12.tr +edu.tr +kep.tr + +// Used by Northern Cyprus +nc.tr + +// Used by government agencies of Northern Cyprus +gov.nc.tr + +// travel : https://en.wikipedia.org/wiki/.travel +travel + +// tt : http://www.nic.tt/ +tt +co.tt +com.tt +org.tt +net.tt +biz.tt +info.tt +pro.tt +int.tt +coop.tt +jobs.tt +mobi.tt +travel.tt +museum.tt +aero.tt +name.tt +gov.tt +edu.tt + +// tv : https://en.wikipedia.org/wiki/.tv +// Not listing any 2LDs as reserved since none seem to exist in practice, +// Wikipedia notwithstanding. +tv + +// tw : https://en.wikipedia.org/wiki/.tw +tw +edu.tw +gov.tw +mil.tw +com.tw +net.tw +org.tw +idv.tw +game.tw +ebiz.tw +club.tw +xn--zf0ao64a.tw +網路.tw +xn--uc0atv.tw +組織.tw +xn--czrw28b.tw +商業.tw + +// tz : http://www.tznic.or.tz/index.php/domains +// Submitted by registry +tz +ac.tz +co.tz +go.tz +hotel.tz +info.tz +me.tz +mil.tz +mobi.tz +ne.tz +or.tz +sc.tz +tv.tz + +// ua : https://hostmaster.ua/policy/?ua +// Submitted by registry +ua +// ua 2LD +com.ua +edu.ua +gov.ua +in.ua +net.ua +org.ua +// ua geographic names +// https://hostmaster.ua/2ld/ +cherkassy.ua +cherkasy.ua +chernigov.ua +chernihiv.ua +chernivtsi.ua +chernovtsy.ua +ck.ua +cn.ua +cr.ua +crimea.ua +cv.ua +dn.ua +dnepropetrovsk.ua +dnipropetrovsk.ua +dominic.ua +donetsk.ua +dp.ua +if.ua +ivano-frankivsk.ua +kh.ua +kharkiv.ua +kharkov.ua +kherson.ua +khmelnitskiy.ua +khmelnytskyi.ua +kiev.ua +kirovograd.ua +km.ua +kr.ua +krym.ua +ks.ua +kv.ua +kyiv.ua +lg.ua +lt.ua +lugansk.ua +lutsk.ua +lv.ua +lviv.ua +mk.ua +mykolaiv.ua +nikolaev.ua +od.ua +odesa.ua +odessa.ua +pl.ua +poltava.ua +rivne.ua +rovno.ua +rv.ua +sb.ua +sebastopol.ua +sevastopol.ua +sm.ua +sumy.ua +te.ua +ternopil.ua +uz.ua +uzhgorod.ua +vinnica.ua +vinnytsia.ua +vn.ua +volyn.ua +yalta.ua +zaporizhzhe.ua +zaporizhzhia.ua +zhitomir.ua +zhytomyr.ua +zp.ua +zt.ua + +// ug : https://www.registry.co.ug/ +ug +co.ug +or.ug +ac.ug +sc.ug +go.ug +ne.ug +com.ug +org.ug + +// uk : https://en.wikipedia.org/wiki/.uk +// Submitted by registry +uk +ac.uk +co.uk +gov.uk +ltd.uk +me.uk +net.uk +nhs.uk +org.uk +plc.uk +police.uk +*.sch.uk + +// us : https://en.wikipedia.org/wiki/.us +us +dni.us +fed.us +isa.us +kids.us +nsn.us +// us geographic names +ak.us +al.us +ar.us +as.us +az.us +ca.us +co.us +ct.us +dc.us +de.us +fl.us +ga.us +gu.us +hi.us +ia.us +id.us +il.us +in.us +ks.us +ky.us +la.us +ma.us +md.us +me.us +mi.us +mn.us +mo.us +ms.us +mt.us +nc.us +nd.us +ne.us +nh.us +nj.us +nm.us +nv.us +ny.us +oh.us +ok.us +or.us +pa.us +pr.us +ri.us +sc.us +sd.us +tn.us +tx.us +ut.us +vi.us +vt.us +va.us +wa.us +wi.us +wv.us +wy.us +// The registrar notes several more specific domains available in each state, +// such as state.*.us, dst.*.us, etc., but resolution of these is somewhat +// haphazard; in some states these domains resolve as addresses, while in others +// only subdomains are available, or even nothing at all. We include the +// most common ones where it's clear that different sites are different +// entities. +k12.ak.us +k12.al.us +k12.ar.us +k12.as.us +k12.az.us +k12.ca.us +k12.co.us +k12.ct.us +k12.dc.us +k12.de.us +k12.fl.us +k12.ga.us +k12.gu.us +// k12.hi.us Bug 614565 - Hawaii has a state-wide DOE login +k12.ia.us +k12.id.us +k12.il.us +k12.in.us +k12.ks.us +k12.ky.us +k12.la.us +k12.ma.us +k12.md.us +k12.me.us +k12.mi.us +k12.mn.us +k12.mo.us +k12.ms.us +k12.mt.us +k12.nc.us +// k12.nd.us Bug 1028347 - Removed at request of Travis Rosso +k12.ne.us +k12.nh.us +k12.nj.us +k12.nm.us +k12.nv.us +k12.ny.us +k12.oh.us +k12.ok.us +k12.or.us +k12.pa.us +k12.pr.us +k12.ri.us +k12.sc.us +// k12.sd.us Bug 934131 - Removed at request of James Booze +k12.tn.us +k12.tx.us +k12.ut.us +k12.vi.us +k12.vt.us +k12.va.us +k12.wa.us +k12.wi.us +// k12.wv.us Bug 947705 - Removed at request of Verne Britton +k12.wy.us +cc.ak.us +cc.al.us +cc.ar.us +cc.as.us +cc.az.us +cc.ca.us +cc.co.us +cc.ct.us +cc.dc.us +cc.de.us +cc.fl.us +cc.ga.us +cc.gu.us +cc.hi.us +cc.ia.us +cc.id.us +cc.il.us +cc.in.us +cc.ks.us +cc.ky.us +cc.la.us +cc.ma.us +cc.md.us +cc.me.us +cc.mi.us +cc.mn.us +cc.mo.us +cc.ms.us +cc.mt.us +cc.nc.us +cc.nd.us +cc.ne.us +cc.nh.us +cc.nj.us +cc.nm.us +cc.nv.us +cc.ny.us +cc.oh.us +cc.ok.us +cc.or.us +cc.pa.us +cc.pr.us +cc.ri.us +cc.sc.us +cc.sd.us +cc.tn.us +cc.tx.us +cc.ut.us +cc.vi.us +cc.vt.us +cc.va.us +cc.wa.us +cc.wi.us +cc.wv.us +cc.wy.us +lib.ak.us +lib.al.us +lib.ar.us +lib.as.us +lib.az.us +lib.ca.us +lib.co.us +lib.ct.us +lib.dc.us +// lib.de.us Issue #243 - Moved to Private section at request of Ed Moore +lib.fl.us +lib.ga.us +lib.gu.us +lib.hi.us +lib.ia.us +lib.id.us +lib.il.us +lib.in.us +lib.ks.us +lib.ky.us +lib.la.us +lib.ma.us +lib.md.us +lib.me.us +lib.mi.us +lib.mn.us +lib.mo.us +lib.ms.us +lib.mt.us +lib.nc.us +lib.nd.us +lib.ne.us +lib.nh.us +lib.nj.us +lib.nm.us +lib.nv.us +lib.ny.us +lib.oh.us +lib.ok.us +lib.or.us +lib.pa.us +lib.pr.us +lib.ri.us +lib.sc.us +lib.sd.us +lib.tn.us +lib.tx.us +lib.ut.us +lib.vi.us +lib.vt.us +lib.va.us +lib.wa.us +lib.wi.us +// lib.wv.us Bug 941670 - Removed at request of Larry W Arnold +lib.wy.us +// k12.ma.us contains school districts in Massachusetts. The 4LDs are +// managed independently except for private (PVT), charter (CHTR) and +// parochial (PAROCH) schools. Those are delegated directly to the +// 5LD operators. +pvt.k12.ma.us +chtr.k12.ma.us +paroch.k12.ma.us + +// uy : http://www.nic.org.uy/ +uy +com.uy +edu.uy +gub.uy +mil.uy +net.uy +org.uy + +// uz : http://www.reg.uz/ +uz +co.uz +com.uz +net.uz +org.uz + +// va : https://en.wikipedia.org/wiki/.va +va + +// vc : https://en.wikipedia.org/wiki/.vc +// Submitted by registry +vc +com.vc +net.vc +org.vc +gov.vc +mil.vc +edu.vc + +// ve : https://registro.nic.ve/ +// Submitted by registry +ve +arts.ve +co.ve +com.ve +e12.ve +edu.ve +firm.ve +gob.ve +gov.ve +info.ve +int.ve +mil.ve +net.ve +org.ve +rec.ve +store.ve +tec.ve +web.ve + +// vg : https://en.wikipedia.org/wiki/.vg +vg + +// vi : http://www.nic.vi/newdomainform.htm +// http://www.nic.vi/Domain_Rules/body_domain_rules.html indicates some other +// TLDs are "reserved", such as edu.vi and gov.vi, but doesn't actually say they +// are available for registration (which they do not seem to be). +vi +co.vi +com.vi +k12.vi +net.vi +org.vi + +// vn : https://www.dot.vn/vnnic/vnnic/domainregistration.jsp +vn +com.vn +net.vn +org.vn +edu.vn +gov.vn +int.vn +ac.vn +biz.vn +info.vn +name.vn +pro.vn +health.vn + +// vu : https://en.wikipedia.org/wiki/.vu +// http://www.vunic.vu/ +vu +com.vu +edu.vu +net.vu +org.vu + +// wf : http://www.afnic.fr/medias/documents/AFNIC-naming-policy2012.pdf +wf + +// ws : https://en.wikipedia.org/wiki/.ws +// http://samoanic.ws/index.dhtml +ws +com.ws +net.ws +org.ws +gov.ws +edu.ws + +// yt : http://www.afnic.fr/medias/documents/AFNIC-naming-policy2012.pdf +yt + +// IDN ccTLDs +// When submitting patches, please maintain a sort by ISO 3166 ccTLD, then +// U-label, and follow this format: +// // A-Label ("", [, variant info]) : +// // [sponsoring org] +// U-Label + +// xn--mgbaam7a8h ("Emerat", Arabic) : AE +// http://nic.ae/english/arabicdomain/rules.jsp +xn--mgbaam7a8h +امارات + +// xn--y9a3aq ("hye", Armenian) : AM +// ISOC AM (operated by .am Registry) +xn--y9a3aq +հայ + +// xn--54b7fta0cc ("Bangla", Bangla) : BD +xn--54b7fta0cc +বাংলা + +// xn--90ais ("bel", Belarusian/Russian Cyrillic) : BY +// Operated by .by registry +xn--90ais +бел + +// xn--fiqs8s ("Zhongguo/China", Chinese, Simplified) : CN +// CNNIC +// http://cnnic.cn/html/Dir/2005/10/11/3218.htm +xn--fiqs8s +中国 + +// xn--fiqz9s ("Zhongguo/China", Chinese, Traditional) : CN +// CNNIC +// http://cnnic.cn/html/Dir/2005/10/11/3218.htm +xn--fiqz9s +中國 + +// xn--lgbbat1ad8j ("Algeria/Al Jazair", Arabic) : DZ +xn--lgbbat1ad8j +الجزائر + +// xn--wgbh1c ("Egypt/Masr", Arabic) : EG +// http://www.dotmasr.eg/ +xn--wgbh1c +مصر + +// xn--e1a4c ("eu", Cyrillic) : EU +xn--e1a4c +ею + +// xn--node ("ge", Georgian Mkhedruli) : GE +xn--node +გე + +// xn--qxam ("el", Greek) : GR +// Hellenic Ministry of Infrastructure, Transport, and Networks +xn--qxam +ελ + +// xn--j6w193g ("Hong Kong", Chinese) : HK +// https://www2.hkirc.hk/register/rules.jsp +xn--j6w193g +香港 + +// xn--h2brj9c ("Bharat", Devanagari) : IN +// India +xn--h2brj9c +भारत + +// xn--mgbbh1a71e ("Bharat", Arabic) : IN +// India +xn--mgbbh1a71e +بھارت + +// xn--fpcrj9c3d ("Bharat", Telugu) : IN +// India +xn--fpcrj9c3d +భారత్ + +// xn--gecrj9c ("Bharat", Gujarati) : IN +// India +xn--gecrj9c +ભારત + +// xn--s9brj9c ("Bharat", Gurmukhi) : IN +// India +xn--s9brj9c +ਭਾਰਤ + +// xn--45brj9c ("Bharat", Bengali) : IN +// India +xn--45brj9c +ভারত + +// xn--xkc2dl3a5ee0h ("India", Tamil) : IN +// India +xn--xkc2dl3a5ee0h +இந்தியா + +// xn--mgba3a4f16a ("Iran", Persian) : IR +xn--mgba3a4f16a +ایران + +// xn--mgba3a4fra ("Iran", Arabic) : IR +xn--mgba3a4fra +ايران + +// xn--mgbtx2b ("Iraq", Arabic) : IQ +// Communications and Media Commission +xn--mgbtx2b +عراق + +// xn--mgbayh7gpa ("al-Ordon", Arabic) : JO +// National Information Technology Center (NITC) +// Royal Scientific Society, Al-Jubeiha +xn--mgbayh7gpa +الاردن + +// xn--3e0b707e ("Republic of Korea", Hangul) : KR +xn--3e0b707e +한국 + +// xn--80ao21a ("Kaz", Kazakh) : KZ +xn--80ao21a +қаз + +// xn--fzc2c9e2c ("Lanka", Sinhalese-Sinhala) : LK +// http://nic.lk +xn--fzc2c9e2c +ලංකා + +// xn--xkc2al3hye2a ("Ilangai", Tamil) : LK +// http://nic.lk +xn--xkc2al3hye2a +இலங்கை + +// xn--mgbc0a9azcg ("Morocco/al-Maghrib", Arabic) : MA +xn--mgbc0a9azcg +المغرب + +// xn--d1alf ("mkd", Macedonian) : MK +// MARnet +xn--d1alf +мкд + +// xn--l1acc ("mon", Mongolian) : MN +xn--l1acc +мон + +// xn--mix891f ("Macao", Chinese, Traditional) : MO +// MONIC / HNET Asia (Registry Operator for .mo) +xn--mix891f +澳門 + +// xn--mix082f ("Macao", Chinese, Simplified) : MO +xn--mix082f +澳门 + +// xn--mgbx4cd0ab ("Malaysia", Malay) : MY +xn--mgbx4cd0ab +مليسيا + +// xn--mgb9awbf ("Oman", Arabic) : OM +xn--mgb9awbf +عمان + +// xn--mgbai9azgqp6j ("Pakistan", Urdu/Arabic) : PK +xn--mgbai9azgqp6j +پاکستان + +// xn--mgbai9a5eva00b ("Pakistan", Urdu/Arabic, variant) : PK +xn--mgbai9a5eva00b +پاكستان + +// xn--ygbi2ammx ("Falasteen", Arabic) : PS +// The Palestinian National Internet Naming Authority (PNINA) +// http://www.pnina.ps +xn--ygbi2ammx +فلسطين + +// xn--90a3ac ("srb", Cyrillic) : RS +// https://www.rnids.rs/en/domains/national-domains +xn--90a3ac +срб +xn--o1ac.xn--90a3ac +пр.срб +xn--c1avg.xn--90a3ac +орг.срб +xn--90azh.xn--90a3ac +обр.срб +xn--d1at.xn--90a3ac +од.срб +xn--o1ach.xn--90a3ac +упр.срб +xn--80au.xn--90a3ac +ак.срб + +// xn--p1ai ("rf", Russian-Cyrillic) : RU +// http://www.cctld.ru/en/docs/rulesrf.php +xn--p1ai +рф + +// xn--wgbl6a ("Qatar", Arabic) : QA +// http://www.ict.gov.qa/ +xn--wgbl6a +قطر + +// xn--mgberp4a5d4ar ("AlSaudiah", Arabic) : SA +// http://www.nic.net.sa/ +xn--mgberp4a5d4ar +السعودية + +// xn--mgberp4a5d4a87g ("AlSaudiah", Arabic, variant) : SA +xn--mgberp4a5d4a87g +السعودیة + +// xn--mgbqly7c0a67fbc ("AlSaudiah", Arabic, variant) : SA +xn--mgbqly7c0a67fbc +السعودیۃ + +// xn--mgbqly7cvafr ("AlSaudiah", Arabic, variant) : SA +xn--mgbqly7cvafr +السعوديه + +// xn--mgbpl2fh ("sudan", Arabic) : SD +// Operated by .sd registry +xn--mgbpl2fh +سودان + +// xn--yfro4i67o Singapore ("Singapore", Chinese) : SG +xn--yfro4i67o +新加坡 + +// xn--clchc0ea0b2g2a9gcd ("Singapore", Tamil) : SG +xn--clchc0ea0b2g2a9gcd +சிங்கப்பூர் + +// xn--ogbpf8fl ("Syria", Arabic) : SY +xn--ogbpf8fl +سورية + +// xn--mgbtf8fl ("Syria", Arabic, variant) : SY +xn--mgbtf8fl +سوريا + +// xn--o3cw4h ("Thai", Thai) : TH +// http://www.thnic.co.th +xn--o3cw4h +ไทย + +// xn--pgbs0dh ("Tunisia", Arabic) : TN +// http://nic.tn +xn--pgbs0dh +تونس + +// xn--kpry57d ("Taiwan", Chinese, Traditional) : TW +// http://www.twnic.net/english/dn/dn_07a.htm +xn--kpry57d +台灣 + +// xn--kprw13d ("Taiwan", Chinese, Simplified) : TW +// http://www.twnic.net/english/dn/dn_07a.htm +xn--kprw13d +台湾 + +// xn--nnx388a ("Taiwan", Chinese, variant) : TW +xn--nnx388a +臺灣 + +// xn--j1amh ("ukr", Cyrillic) : UA +xn--j1amh +укр + +// xn--mgb2ddes ("AlYemen", Arabic) : YE +xn--mgb2ddes +اليمن + +// xxx : http://icmregistry.com +xxx + +// ye : http://www.y.net.ye/services/domain_name.htm +*.ye + +// za : http://www.zadna.org.za/content/page/domain-information +ac.za +agric.za +alt.za +co.za +edu.za +gov.za +grondar.za +law.za +mil.za +net.za +ngo.za +nis.za +nom.za +org.za +school.za +tm.za +web.za + +// zm : https://zicta.zm/ +// Submitted by registry +zm +ac.zm +biz.zm +co.zm +com.zm +edu.zm +gov.zm +info.zm +mil.zm +net.zm +org.zm +sch.zm + +// zw : https://en.wikipedia.org/wiki/.zw +*.zw + + +// List of new gTLDs imported from https://newgtlds.icann.org/newgtlds.csv on 2016-11-29T01:06:51Z + +// aaa : 2015-02-26 American Automobile Association, Inc. +aaa + +// aarp : 2015-05-21 AARP +aarp + +// abarth : 2015-07-30 Fiat Chrysler Automobiles N.V. +abarth + +// abb : 2014-10-24 ABB Ltd +abb + +// abbott : 2014-07-24 Abbott Laboratories, Inc. +abbott + +// abbvie : 2015-07-30 AbbVie Inc. +abbvie + +// abc : 2015-07-30 Disney Enterprises, Inc. +abc + +// able : 2015-06-25 Able Inc. +able + +// abogado : 2014-04-24 Top Level Domain Holdings Limited +abogado + +// abudhabi : 2015-07-30 Abu Dhabi Systems and Information Centre +abudhabi + +// academy : 2013-11-07 Half Oaks, LLC +academy + +// accenture : 2014-08-15 Accenture plc +accenture + +// accountant : 2014-11-20 dot Accountant Limited +accountant + +// accountants : 2014-03-20 Knob Town, LLC +accountants + +// aco : 2015-01-08 ACO Severin Ahlmann GmbH & Co. KG +aco + +// active : 2014-05-01 The Active Network, Inc +active + +// actor : 2013-12-12 United TLD Holdco Ltd. +actor + +// adac : 2015-07-16 Allgemeiner Deutscher Automobil-Club e.V. (ADAC) +adac + +// ads : 2014-12-04 Charleston Road Registry Inc. +ads + +// adult : 2014-10-16 ICM Registry AD LLC +adult + +// aeg : 2015-03-19 Aktiebolaget Electrolux +aeg + +// aetna : 2015-05-21 Aetna Life Insurance Company +aetna + +// afamilycompany : 2015-07-23 Johnson Shareholdings, Inc. +afamilycompany + +// afl : 2014-10-02 Australian Football League +afl + +// africa : 2014-03-24 ZA Central Registry NPC trading as Registry.Africa +africa + +// agakhan : 2015-04-23 Fondation Aga Khan (Aga Khan Foundation) +agakhan + +// agency : 2013-11-14 Steel Falls, LLC +agency + +// aig : 2014-12-18 American International Group, Inc. +aig + +// aigo : 2015-08-06 aigo Digital Technology Co,Ltd. +aigo + +// airbus : 2015-07-30 Airbus S.A.S. +airbus + +// airforce : 2014-03-06 United TLD Holdco Ltd. +airforce + +// airtel : 2014-10-24 Bharti Airtel Limited +airtel + +// akdn : 2015-04-23 Fondation Aga Khan (Aga Khan Foundation) +akdn + +// alfaromeo : 2015-07-31 Fiat Chrysler Automobiles N.V. +alfaromeo + +// alibaba : 2015-01-15 Alibaba Group Holding Limited +alibaba + +// alipay : 2015-01-15 Alibaba Group Holding Limited +alipay + +// allfinanz : 2014-07-03 Allfinanz Deutsche Vermögensberatung Aktiengesellschaft +allfinanz + +// allstate : 2015-07-31 Allstate Fire and Casualty Insurance Company +allstate + +// ally : 2015-06-18 Ally Financial Inc. +ally + +// alsace : 2014-07-02 REGION D ALSACE +alsace + +// alstom : 2015-07-30 ALSTOM +alstom + +// americanexpress : 2015-07-31 American Express Travel Related Services Company, Inc. +americanexpress + +// americanfamily : 2015-07-23 AmFam, Inc. +americanfamily + +// amex : 2015-07-31 American Express Travel Related Services Company, Inc. +amex + +// amfam : 2015-07-23 AmFam, Inc. +amfam + +// amica : 2015-05-28 Amica Mutual Insurance Company +amica + +// amsterdam : 2014-07-24 Gemeente Amsterdam +amsterdam + +// analytics : 2014-12-18 Campus IP LLC +analytics + +// android : 2014-08-07 Charleston Road Registry Inc. +android + +// anquan : 2015-01-08 QIHOO 360 TECHNOLOGY CO. LTD. +anquan + +// anz : 2015-07-31 Australia and New Zealand Banking Group Limited +anz + +// aol : 2015-09-17 AOL Inc. +aol + +// apartments : 2014-12-11 June Maple, LLC +apartments + +// app : 2015-05-14 Charleston Road Registry Inc. +app + +// apple : 2015-05-14 Apple Inc. +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 + +// archi : 2014-02-06 STARTING DOT LIMITED +archi + +// army : 2014-03-06 United TLD Holdco Ltd. +army + +// art : 2016-03-24 UK Creative Ideas Limited +art + +// arte : 2014-12-11 Association Relative à la Télévision Européenne G.E.I.E. +arte + +// asda : 2015-07-31 Wal-Mart Stores, Inc. +asda + +// associates : 2014-03-06 Baxter Hill, LLC +associates + +// athleta : 2015-07-30 The Gap, Inc. +athleta + +// attorney : 2014-03-20 +attorney + +// auction : 2014-03-20 +auction + +// audi : 2015-05-21 AUDI Aktiengesellschaft +audi + +// audible : 2015-06-25 Amazon EU S.à r.l. +audible + +// audio : 2014-03-20 Uniregistry, Corp. +audio + +// auspost : 2015-08-13 Australian Postal Corporation +auspost + +// author : 2014-12-18 Amazon EU S.à r.l. +author + +// auto : 2014-11-13 +auto + +// autos : 2014-01-09 DERAutos, LLC +autos + +// avianca : 2015-01-08 Aerovias del Continente Americano S.A. Avianca +avianca + +// aws : 2015-06-25 Amazon EU S.à r.l. +aws + +// axa : 2013-12-19 AXA SA +axa + +// azure : 2014-12-18 Microsoft Corporation +azure + +// baby : 2015-04-09 Johnson & Johnson Services, Inc. +baby + +// baidu : 2015-01-08 Baidu, Inc. +baidu + +// banamex : 2015-07-30 Citigroup Inc. +banamex + +// bananarepublic : 2015-07-31 The Gap, Inc. +bananarepublic + +// band : 2014-06-12 +band + +// bank : 2014-09-25 fTLD Registry Services LLC +bank + +// bar : 2013-12-12 Punto 2012 Sociedad Anonima Promotora de Inversion de Capital Variable +bar + +// barcelona : 2014-07-24 Municipi de Barcelona +barcelona + +// barclaycard : 2014-11-20 Barclays Bank PLC +barclaycard + +// barclays : 2014-11-20 Barclays Bank PLC +barclays + +// barefoot : 2015-06-11 Gallo Vineyards, Inc. +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 + +// bauhaus : 2014-04-17 Werkhaus GmbH +bauhaus + +// bayern : 2014-01-23 Bayern Connect GmbH +bayern + +// bbc : 2014-12-18 British Broadcasting Corporation +bbc + +// bbt : 2015-07-23 BB&T Corporation +bbt + +// bbva : 2014-10-02 BANCO BILBAO VIZCAYA ARGENTARIA, S.A. +bbva + +// bcg : 2015-04-02 The Boston Consulting Group, Inc. +bcg + +// bcn : 2014-07-24 Municipi de Barcelona +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 + +// bentley : 2014-12-18 Bentley Motors Limited +bentley + +// berlin : 2013-10-31 dotBERLIN GmbH & Co. KG +berlin + +// best : 2013-12-19 BestTLD Pty Ltd +best + +// bestbuy : 2015-07-31 BBY Solutions, Inc. +bestbuy + +// bet : 2015-05-07 Afilias plc +bet + +// bharti : 2014-01-09 Bharti Enterprises (Holding) Private Limited +bharti + +// bible : 2014-06-19 American Bible Society +bible + +// bid : 2013-12-19 dot Bid Limited +bid + +// bike : 2013-08-27 Grand Hollow, LLC +bike + +// bing : 2014-12-18 Microsoft Corporation +bing + +// bingo : 2014-12-04 Sand Cedar, LLC +bingo + +// bio : 2014-03-06 STARTING DOT LIMITED +bio + +// black : 2014-01-16 Afilias Limited +black + +// blackfriday : 2014-01-16 Uniregistry, Corp. +blackfriday + +// blanco : 2015-07-16 BLANCO GmbH + Co KG +blanco + +// blockbuster : 2015-07-30 Dish DBS Corporation +blockbuster + +// blog : 2015-05-14 +blog + +// bloomberg : 2014-07-17 Bloomberg IP Holdings LLC +bloomberg + +// blue : 2013-11-07 Afilias Limited +blue + +// bms : 2014-10-30 Bristol-Myers Squibb Company +bms + +// bmw : 2014-01-09 Bayerische Motoren Werke Aktiengesellschaft +bmw + +// bnl : 2014-07-24 Banca Nazionale del Lavoro +bnl + +// bnpparibas : 2014-05-29 BNP Paribas +bnpparibas + +// boats : 2014-12-04 DERBoats, LLC +boats + +// boehringer : 2015-07-09 Boehringer Ingelheim International GmbH +boehringer + +// bofa : 2015-07-31 NMS Services, Inc. +bofa + +// bom : 2014-10-16 Núcleo de Informação e Coordenação do Ponto BR - NIC.br +bom + +// bond : 2014-06-05 Bond University Limited +bond + +// boo : 2014-01-30 Charleston Road Registry Inc. +boo + +// book : 2015-08-27 Amazon EU S.à r.l. +book + +// booking : 2015-07-16 Booking.com B.V. +booking + +// boots : 2015-01-08 THE BOOTS COMPANY PLC +boots + +// bosch : 2015-06-18 Robert Bosch GMBH +bosch + +// bostik : 2015-05-28 Bostik SA +bostik + +// boston : 2015-12-10 +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 + +// bridgestone : 2014-12-18 Bridgestone Corporation +bridgestone + +// broadway : 2014-12-22 Celebrate Broadway, Inc. +broadway + +// broker : 2014-12-11 IG Group Holdings PLC +broker + +// brother : 2015-01-29 Brother Industries, Ltd. +brother + +// brussels : 2014-02-06 DNS.be vzw +brussels + +// budapest : 2013-11-21 Top Level Domain Holdings Limited +budapest + +// bugatti : 2015-07-23 Bugatti International SA +bugatti + +// build : 2013-11-07 Plan Bee LLC +build + +// builders : 2013-11-07 Atomic Madison, LLC +builders + +// business : 2013-11-07 Spring Cross, LLC +business + +// buy : 2014-12-18 Amazon EU S.à r.l. +buy + +// buzz : 2013-10-02 DOTSTRATEGY CO. +buzz + +// bzh : 2014-02-27 Association www.bzh +bzh + +// cab : 2013-10-24 Half Sunset, LLC +cab + +// cafe : 2015-02-11 Pioneer Canyon, LLC +cafe + +// cal : 2014-07-24 Charleston Road Registry Inc. +cal + +// call : 2014-12-18 Amazon EU S.à r.l. +call + +// calvinklein : 2015-07-30 PVH gTLD Holdings LLC +calvinklein + +// cam : 2016-04-21 AC Webconnecting Holding B.V. +cam + +// camera : 2013-08-27 Atomic Maple, LLC +camera + +// camp : 2013-11-07 Delta Dynamite, LLC +camp + +// cancerresearch : 2014-05-15 Australian Cancer Research Foundation +cancerresearch + +// canon : 2014-09-12 Canon Inc. +canon + +// capetown : 2014-03-24 ZA Central Registry NPC trading as ZA Central Registry +capetown + +// capital : 2014-03-06 Delta Mill, LLC +capital + +// capitalone : 2015-08-06 Capital One Financial Corporation +capitalone + +// car : 2015-01-22 +car + +// caravan : 2013-12-12 Caravan International, Inc. +caravan + +// cards : 2013-12-05 Foggy Hollow, LLC +cards + +// care : 2014-03-06 Goose Cross +care + +// career : 2013-10-09 dotCareer LLC +career + +// careers : 2013-10-02 Wild Corner, LLC +careers + +// cars : 2014-11-13 +cars + +// cartier : 2014-06-23 Richemont DNS Inc. +cartier + +// casa : 2013-11-21 Top Level Domain Holdings Limited +casa + +// case : 2015-09-03 CNH Industrial N.V. +case + +// caseih : 2015-09-03 CNH Industrial N.V. +caseih + +// cash : 2014-03-06 Delta Lake, LLC +cash + +// casino : 2014-12-18 Binky Sky, LLC +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 + +// cbn : 2014-08-22 The Christian Broadcasting Network, Inc. +cbn + +// cbre : 2015-07-02 CBRE, Inc. +cbre + +// cbs : 2015-08-06 CBS Domains Inc. +cbs + +// ceb : 2015-04-09 The Corporate Executive Board Company +ceb + +// center : 2013-11-07 Tin Mill, LLC +center + +// ceo : 2013-11-07 CEOTLD Pty Ltd +ceo + +// cern : 2014-06-05 European Organization for Nuclear Research ("CERN") +cern + +// cfa : 2014-08-28 CFA Institute +cfa + +// cfd : 2014-12-11 IG Group Holdings PLC +cfd + +// chanel : 2015-04-09 Chanel International B.V. +chanel + +// channel : 2014-05-08 Charleston Road Registry Inc. +channel + +// chase : 2015-04-30 JPMorgan Chase & Co. +chase + +// chat : 2014-12-04 Sand Fields, LLC +chat + +// cheap : 2013-11-14 Sand Cover, LLC +cheap + +// chintai : 2015-06-11 CHINTAI Corporation +chintai + +// chloe : 2014-10-16 Richemont DNS Inc. +chloe + +// christmas : 2013-11-21 Uniregistry, Corp. +christmas + +// chrome : 2014-07-24 Charleston Road Registry Inc. +chrome + +// chrysler : 2015-07-30 FCA US LLC. +chrysler + +// church : 2014-02-06 Holly Fields, LLC +church + +// cipriani : 2015-02-19 Hotel Cipriani Srl +cipriani + +// circle : 2014-12-18 Amazon EU S.à r.l. +circle + +// cisco : 2014-12-22 Cisco Technology, Inc. +cisco + +// citadel : 2015-07-23 Citadel Domain LLC +citadel + +// citi : 2015-07-30 Citigroup Inc. +citi + +// citic : 2014-01-09 CITIC Group Corporation +citic + +// city : 2014-05-29 Snow Sky, LLC +city + +// cityeats : 2014-12-11 Lifestyle Domain Holdings, Inc. +cityeats + +// claims : 2014-03-20 Black Corner, LLC +claims + +// cleaning : 2013-12-05 Fox Shadow, LLC +cleaning + +// click : 2014-06-05 Uniregistry, Corp. +click + +// clinic : 2014-03-20 Goose Park, LLC +clinic + +// clinique : 2015-10-01 The Estée Lauder Companies Inc. +clinique + +// clothing : 2013-08-27 Steel Lake, LLC +clothing + +// cloud : 2015-04-16 ARUBA S.p.A. +cloud + +// club : 2013-11-08 .CLUB DOMAINS, LLC +club + +// clubmed : 2015-06-25 Club Méditerranée S.A. +clubmed + +// coach : 2014-10-09 Koko Island, LLC +coach + +// codes : 2013-10-31 Puff Willow, LLC +codes + +// coffee : 2013-10-17 Trixy Cover, LLC +coffee + +// college : 2014-01-16 XYZ.COM LLC +college + +// cologne : 2014-02-05 NetCologne Gesellschaft für Telekommunikation mbH +cologne + +// comcast : 2015-07-23 Comcast IP Holdings I, LLC +comcast + +// commbank : 2014-06-26 COMMONWEALTH BANK OF AUSTRALIA +commbank + +// community : 2013-12-05 Fox Orchard, LLC +community + +// company : 2013-11-07 Silver Avenue, LLC +company + +// compare : 2015-10-08 iSelect Ltd +compare + +// computer : 2013-10-24 Pine Mill, LLC +computer + +// comsec : 2015-01-08 VeriSign, Inc. +comsec + +// condos : 2013-12-05 Pine House, LLC +condos + +// construction : 2013-09-16 Fox Dynamite, LLC +construction + +// consulting : 2013-12-05 +consulting + +// contact : 2015-01-08 Top Level Spectrum, Inc. +contact + +// contractors : 2013-09-10 Magic Woods, LLC +contractors + +// cooking : 2013-11-21 Top Level Domain Holdings Limited +cooking + +// cookingchannel : 2015-07-02 Lifestyle Domain Holdings, Inc. +cookingchannel + +// cool : 2013-11-14 Koko Lake, LLC +cool + +// corsica : 2014-09-25 Collectivité Territoriale de Corse +corsica + +// country : 2013-12-19 Top Level Domain Holdings Limited +country + +// coupon : 2015-02-26 Amazon EU S.à r.l. +coupon + +// coupons : 2015-03-26 Black Island, LLC +coupons + +// courses : 2014-12-04 OPEN UNIVERSITIES AUSTRALIA PTY LTD +courses + +// credit : 2014-03-20 Snow Shadow, LLC +credit + +// creditcard : 2014-03-20 Binky Frostbite, LLC +creditcard + +// creditunion : 2015-01-22 CUNA Performance Resources, LLC +creditunion + +// cricket : 2014-10-09 dot Cricket Limited +cricket + +// crown : 2014-10-24 Crown Equipment Corporation +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 + +// csc : 2014-09-25 Alliance-One Services, Inc. +csc + +// cuisinella : 2014-04-03 SALM S.A.S. +cuisinella + +// cymru : 2014-05-08 Nominet UK +cymru + +// cyou : 2015-01-22 Beijing Gamease Age Digital Technology Co., Ltd. +cyou + +// dabur : 2014-02-06 Dabur India Limited +dabur + +// dad : 2014-01-23 Charleston Road Registry Inc. +dad + +// dance : 2013-10-24 United TLD Holdco Ltd. +dance + +// data : 2016-06-02 Dish DBS Corporation +data + +// date : 2014-11-20 dot Date Limited +date + +// dating : 2013-12-05 Pine Fest, LLC +dating + +// datsun : 2014-03-27 NISSAN MOTOR CO., LTD. +datsun + +// day : 2014-01-30 Charleston Road Registry Inc. +day + +// dclk : 2014-11-20 Charleston Road Registry Inc. +dclk + +// dds : 2015-05-07 Top Level Domain Holdings Limited +dds + +// deal : 2015-06-25 Amazon EU S.à r.l. +deal + +// dealer : 2014-12-22 Dealer Dot Com, Inc. +dealer + +// deals : 2014-05-22 Sand Sunset, LLC +deals + +// degree : 2014-03-06 +degree + +// delivery : 2014-09-11 Steel Station, LLC +delivery + +// dell : 2014-10-24 Dell Inc. +dell + +// deloitte : 2015-07-31 Deloitte Touche Tohmatsu +deloitte + +// delta : 2015-02-19 Delta Air Lines, Inc. +delta + +// democrat : 2013-10-24 United TLD Holdco Ltd. +democrat + +// dental : 2014-03-20 Tin Birch, LLC +dental + +// dentist : 2014-03-20 +dentist + +// desi : 2013-11-14 Desi Networks LLC +desi + +// design : 2014-11-07 Top Level Design, LLC +design + +// dev : 2014-10-16 Charleston Road Registry Inc. +dev + +// dhl : 2015-07-23 Deutsche Post AG +dhl + +// diamonds : 2013-09-22 John Edge, LLC +diamonds + +// diet : 2014-06-26 Uniregistry, Corp. +diet + +// digital : 2014-03-06 Dash Park, LLC +digital + +// direct : 2014-04-10 Half Trail, LLC +direct + +// directory : 2013-09-20 Extra Madison, LLC +directory + +// discount : 2014-03-06 Holly Hill, LLC +discount + +// discover : 2015-07-23 Discover Financial Services +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 + +// docs : 2014-10-16 Charleston Road Registry Inc. +docs + +// doctor : 2016-06-02 Brice Trail, LLC +doctor + +// dodge : 2015-07-30 FCA US LLC. +dodge + +// dog : 2014-12-04 Koko Mill, LLC +dog + +// doha : 2014-09-18 Communications Regulatory Authority (CRA) +doha + +// domains : 2013-10-17 Sugar Cross, LLC +domains + +// dot : 2015-05-21 Dish DBS Corporation +dot + +// download : 2014-11-20 dot Support Limited +download + +// drive : 2015-03-05 Charleston Road Registry Inc. +drive + +// dtv : 2015-06-04 Dish DBS Corporation +dtv + +// dubai : 2015-01-01 Dubai Smart Government Department +dubai + +// duck : 2015-07-23 Johnson Shareholdings, Inc. +duck + +// dunlop : 2015-07-02 The Goodyear Tire & Rubber Company +dunlop + +// duns : 2015-08-06 The Dun & Bradstreet Corporation +duns + +// dupont : 2015-06-25 E. I. du Pont de Nemours and Company +dupont + +// durban : 2014-03-24 ZA Central Registry NPC trading as ZA Central Registry +durban + +// dvag : 2014-06-23 Deutsche Vermögensberatung Aktiengesellschaft DVAG +dvag + +// dvr : 2016-05-26 Hughes Satellite Systems Corporation +dvr + +// dwg : 2015-07-23 Autodesk, Inc. +dwg + +// earth : 2014-12-04 Interlink Co., Ltd. +earth + +// eat : 2014-01-23 Charleston Road Registry Inc. +eat + +// eco : 2016-07-08 Big Room Inc. +eco + +// edeka : 2014-12-18 EDEKA Verband kaufmännischer Genossenschaften e.V. +edeka + +// education : 2013-11-07 Brice Way, LLC +education + +// email : 2013-10-31 Spring Madison, LLC +email + +// emerck : 2014-04-03 Merck KGaA +emerck + +// energy : 2014-09-11 Binky Birch, LLC +energy + +// engineer : 2014-03-06 United TLD Holdco Ltd. +engineer + +// engineering : 2014-03-06 Romeo Canyon +engineering + +// enterprises : 2013-09-20 Snow Oaks, LLC +enterprises + +// epost : 2015-07-23 Deutsche Post AG +epost + +// epson : 2014-12-04 Seiko Epson Corporation +epson + +// equipment : 2013-08-27 Corn Station, LLC +equipment + +// ericsson : 2015-07-09 Telefonaktiebolaget L M Ericsson +ericsson + +// erni : 2014-04-03 ERNI Group Holding AG +erni + +// esq : 2014-05-08 Charleston Road Registry Inc. +esq + +// estate : 2013-08-27 Trixy Park, LLC +estate + +// esurance : 2015-07-23 Esurance Insurance Company +esurance + +// etisalat : 2015-09-03 Emirates Telecommunications Corporation (trading as Etisalat) +etisalat + +// eurovision : 2014-04-24 European Broadcasting Union (EBU) +eurovision + +// eus : 2013-12-12 Puntueus Fundazioa +eus + +// events : 2013-12-05 Pioneer Maple, LLC +events + +// everbank : 2014-05-15 EverBank +everbank + +// exchange : 2014-03-06 Spring Falls, LLC +exchange + +// expert : 2013-11-21 Magic Pass, LLC +expert + +// exposed : 2013-12-05 Victor Beach, LLC +exposed + +// express : 2015-02-11 Sea Sunset, LLC +express + +// extraspace : 2015-05-14 Extra Space Storage LLC +extraspace + +// fage : 2014-12-18 Fage International S.A. +fage + +// fail : 2014-03-06 Atomic Pipe, LLC +fail + +// fairwinds : 2014-11-13 FairWinds Partners, LLC +fairwinds + +// faith : 2014-11-20 dot Faith Limited +faith + +// family : 2015-04-02 +family + +// fan : 2014-03-06 +fan + +// fans : 2014-11-07 Asiamix Digital Limited +fans + +// farm : 2013-11-07 Just Maple, LLC +farm + +// farmers : 2015-07-09 Farmers Insurance Exchange +farmers + +// fashion : 2014-07-03 Top Level Domain Holdings Limited +fashion + +// fast : 2014-12-18 Amazon EU S.à r.l. +fast + +// fedex : 2015-08-06 Federal Express Corporation +fedex + +// feedback : 2013-12-19 Top Level Spectrum, Inc. +feedback + +// ferrari : 2015-07-31 Fiat Chrysler Automobiles N.V. +ferrari + +// ferrero : 2014-12-18 Ferrero Trading Lux S.A. +ferrero + +// fiat : 2015-07-31 Fiat Chrysler Automobiles N.V. +fiat + +// fidelity : 2015-07-30 Fidelity Brokerage Services LLC +fidelity + +// fido : 2015-08-06 Rogers Communications Partnership +fido + +// film : 2015-01-08 Motion Picture Domain Registry Pty Ltd +film + +// final : 2014-10-16 Núcleo de Informação e Coordenação do Ponto BR - NIC.br +final + +// finance : 2014-03-20 Cotton Cypress, LLC +finance + +// financial : 2014-03-06 Just Cover, LLC +financial + +// fire : 2015-06-25 Amazon EU S.à r.l. +fire + +// firestone : 2014-12-18 Bridgestone Corporation +firestone + +// firmdale : 2014-03-27 Firmdale Holdings Limited +firmdale + +// fish : 2013-12-12 Fox Woods, LLC +fish + +// fishing : 2013-11-21 Top Level Domain Holdings Limited +fishing + +// fit : 2014-11-07 Top Level Domain Holdings Limited +fit + +// fitness : 2014-03-06 Brice Orchard, LLC +fitness + +// flickr : 2015-04-02 Yahoo! Domain Services Inc. +flickr + +// flights : 2013-12-05 Fox Station, LLC +flights + +// flir : 2015-07-23 FLIR Systems, Inc. +flir + +// florist : 2013-11-07 Half Cypress, LLC +florist + +// flowers : 2014-10-09 Uniregistry, Corp. +flowers + +// fly : 2014-05-08 Charleston Road Registry Inc. +fly + +// foo : 2014-01-23 Charleston Road Registry Inc. +foo + +// food : 2016-04-21 Lifestyle Domain Holdings, Inc. +food + +// foodnetwork : 2015-07-02 Lifestyle Domain Holdings, Inc. +foodnetwork + +// football : 2014-12-18 Foggy Farms, LLC +football + +// ford : 2014-11-13 Ford Motor Company +ford + +// forex : 2014-12-11 IG Group Holdings PLC +forex + +// forsale : 2014-05-22 +forsale + +// forum : 2015-04-02 Fegistry, LLC +forum + +// foundation : 2013-12-05 John Dale, LLC +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 + +// frl : 2014-05-15 FRLregistry B.V. +frl + +// frogans : 2013-12-19 OP3FT +frogans + +// frontdoor : 2015-07-02 Lifestyle Domain Holdings, Inc. +frontdoor + +// frontier : 2015-02-05 Frontier Communications Corporation +frontier + +// ftr : 2015-07-16 Frontier Communications Corporation +ftr + +// fujitsu : 2015-07-30 Fujitsu Limited +fujitsu + +// fujixerox : 2015-07-23 Xerox DNHC LLC +fujixerox + +// fun : 2016-01-14 +fun + +// fund : 2014-03-20 John Castle, LLC +fund + +// furniture : 2014-03-20 Lone Fields, LLC +furniture + +// futbol : 2013-09-20 +futbol + +// fyi : 2015-04-02 Silver Tigers, LLC +fyi + +// gal : 2013-11-07 Asociación puntoGAL +gal + +// gallery : 2013-09-13 Sugar House, LLC +gallery + +// gallo : 2015-06-11 Gallo Vineyards, Inc. +gallo + +// gallup : 2015-02-19 Gallup, Inc. +gallup + +// game : 2015-05-28 Uniregistry, Corp. +game + +// games : 2015-05-28 +games + +// gap : 2015-07-31 The Gap, Inc. +gap + +// garden : 2014-06-26 Top Level Domain Holdings Limited +garden + +// gbiz : 2014-07-17 Charleston Road Registry Inc. +gbiz + +// gdn : 2014-07-31 Joint Stock Company "Navigation-information systems" +gdn + +// gea : 2014-12-04 GEA Group Aktiengesellschaft +gea + +// gent : 2014-01-23 COMBELL GROUP NV/SA +gent + +// genting : 2015-03-12 Resorts World Inc Pte. Ltd. +genting + +// george : 2015-07-31 Wal-Mart Stores, Inc. +george + +// ggee : 2014-01-09 GMO Internet, Inc. +ggee + +// gift : 2013-10-17 Uniregistry, Corp. +gift + +// gifts : 2014-07-03 Goose Sky, LLC +gifts + +// gives : 2014-03-06 United TLD Holdco Ltd. +gives + +// giving : 2014-11-13 Giving Limited +giving + +// glade : 2015-07-23 Johnson Shareholdings, Inc. +glade + +// glass : 2013-11-07 Black Cover, LLC +glass + +// gle : 2014-07-24 Charleston Road Registry Inc. +gle + +// global : 2014-04-17 Dot GLOBAL AS +global + +// globo : 2013-12-19 Globo Comunicação e Participações S.A +globo + +// gmail : 2014-05-01 Charleston Road Registry Inc. +gmail + +// gmbh : 2016-01-29 Extra Dynamite, LLC +gmbh + +// gmo : 2014-01-09 GMO Internet, Inc. +gmo + +// gmx : 2014-04-24 1&1 Mail & Media GmbH +gmx + +// godaddy : 2015-07-23 Go Daddy East, LLC +godaddy + +// gold : 2015-01-22 June Edge, LLC +gold + +// goldpoint : 2014-11-20 YODOBASHI CAMERA CO.,LTD. +goldpoint + +// golf : 2014-12-18 Lone falls, LLC +golf + +// goo : 2014-12-18 NTT Resonant Inc. +goo + +// goodhands : 2015-07-31 Allstate Fire and Casualty Insurance Company +goodhands + +// goodyear : 2015-07-02 The Goodyear Tire & Rubber Company +goodyear + +// goog : 2014-11-20 Charleston Road Registry Inc. +goog + +// google : 2014-07-24 Charleston Road Registry Inc. +google + +// gop : 2014-01-16 Republican State Leadership Committee, Inc. +gop + +// got : 2014-12-18 Amazon EU S.à r.l. +got + +// grainger : 2015-05-07 Grainger Registry Services, LLC +grainger + +// graphics : 2013-09-13 Over Madison, LLC +graphics + +// gratis : 2014-03-20 Pioneer Tigers, LLC +gratis + +// green : 2014-05-08 Afilias Limited +green + +// gripe : 2014-03-06 Corn Sunset, LLC +gripe + +// grocery : 2016-06-16 Wal-Mart Stores, Inc. +grocery + +// group : 2014-08-15 Romeo Town, LLC +group + +// guardian : 2015-07-30 The Guardian Life Insurance Company of America +guardian + +// gucci : 2014-11-13 Guccio Gucci S.p.a. +gucci + +// guge : 2014-08-28 Charleston Road Registry Inc. +guge + +// guide : 2013-09-13 Snow Moon, LLC +guide + +// guitars : 2013-11-14 Uniregistry, Corp. +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 + +// hangout : 2014-11-13 Charleston Road Registry Inc. +hangout + +// haus : 2013-12-05 +haus + +// hbo : 2015-07-30 HBO Registry Services, Inc. +hbo + +// hdfc : 2015-07-30 HOUSING DEVELOPMENT FINANCE CORPORATION LIMITED +hdfc + +// hdfcbank : 2015-02-12 HDFC Bank Limited +hdfcbank + +// health : 2015-02-11 DotHealth, LLC +health + +// healthcare : 2014-06-12 Silver Glen, LLC +healthcare + +// help : 2014-06-26 Uniregistry, Corp. +help + +// helsinki : 2015-02-05 City of Helsinki +helsinki + +// here : 2014-02-06 Charleston Road Registry Inc. +here + +// hermes : 2014-07-10 HERMES INTERNATIONAL +hermes + +// hgtv : 2015-07-02 Lifestyle Domain Holdings, Inc. +hgtv + +// hiphop : 2014-03-06 Uniregistry, Corp. +hiphop + +// hisamitsu : 2015-07-16 Hisamitsu Pharmaceutical Co.,Inc. +hisamitsu + +// hitachi : 2014-10-31 Hitachi, Ltd. +hitachi + +// hiv : 2014-03-13 +hiv + +// hkt : 2015-05-14 PCCW-HKT DataCom Services Limited +hkt + +// hockey : 2015-03-19 Half Willow, LLC +hockey + +// holdings : 2013-08-27 John Madison, LLC +holdings + +// holiday : 2013-11-07 Goose Woods, LLC +holiday + +// homedepot : 2015-04-02 Homer TLC, Inc. +homedepot + +// homegoods : 2015-07-16 The TJX Companies, Inc. +homegoods + +// homes : 2014-01-09 DERHomes, LLC +homes + +// homesense : 2015-07-16 The TJX Companies, Inc. +homesense + +// honda : 2014-12-18 Honda Motor Co., Ltd. +honda + +// honeywell : 2015-07-23 Honeywell GTLD LLC +honeywell + +// horse : 2013-11-21 Top Level Domain Holdings Limited +horse + +// hospital : 2016-10-20 Ruby Pike, LLC +hospital + +// host : 2014-04-17 DotHost Inc. +host + +// hosting : 2014-05-29 Uniregistry, Corp. +hosting + +// hot : 2015-08-27 Amazon EU S.à r.l. +hot + +// hoteles : 2015-03-05 Travel Reservations SRL +hoteles + +// hotels : 2016-04-07 Booking.com B.V. +hotels + +// hotmail : 2014-12-18 Microsoft Corporation +hotmail + +// house : 2013-11-07 Sugar Park, LLC +house + +// how : 2014-01-23 Charleston Road Registry Inc. +how + +// hsbc : 2014-10-24 HSBC Holdings PLC +hsbc + +// htc : 2015-04-02 HTC corporation +htc + +// hughes : 2015-07-30 Hughes Satellite Systems Corporation +hughes + +// hyatt : 2015-07-30 Hyatt GTLD, L.L.C. +hyatt + +// hyundai : 2015-07-09 Hyundai Motor Company +hyundai + +// ibm : 2014-07-31 International Business Machines Corporation +ibm + +// icbc : 2015-02-19 Industrial and Commercial Bank of China Limited +icbc + +// ice : 2014-10-30 IntercontinentalExchange, Inc. +ice + +// icu : 2015-01-08 One.com A/S +icu + +// ieee : 2015-07-23 IEEE Global LLC +ieee + +// ifm : 2014-01-30 ifm electronic gmbh +ifm + +// iinet : 2014-07-03 Connect West Pty. Ltd. +iinet + +// ikano : 2015-07-09 Ikano S.A. +ikano + +// imamat : 2015-08-06 Fondation Aga Khan (Aga Khan Foundation) +imamat + +// imdb : 2015-06-25 Amazon EU S.à r.l. +imdb + +// immo : 2014-07-10 Auburn Bloom, LLC +immo + +// immobilien : 2013-11-07 United TLD Holdco Ltd. +immobilien + +// industries : 2013-12-05 Outer House, LLC +industries + +// infiniti : 2014-03-27 NISSAN MOTOR CO., LTD. +infiniti + +// ing : 2014-01-23 Charleston Road Registry Inc. +ing + +// ink : 2013-12-05 Top Level Design, LLC +ink + +// institute : 2013-11-07 Outer Maple, LLC +institute + +// insurance : 2015-02-19 fTLD Registry Services LLC +insurance + +// insure : 2014-03-20 Pioneer Willow, LLC +insure + +// intel : 2015-08-06 Intel Corporation +intel + +// international : 2013-11-07 Wild Way, LLC +international + +// intuit : 2015-07-30 Intuit Administrative Services, Inc. +intuit + +// investments : 2014-03-20 Holly Glen, LLC +investments + +// ipiranga : 2014-08-28 Ipiranga Produtos de Petroleo S.A. +ipiranga + +// irish : 2014-08-07 Dot-Irish LLC +irish + +// iselect : 2015-02-11 iSelect Ltd +iselect + +// ismaili : 2015-08-06 Fondation Aga Khan (Aga Khan Foundation) +ismaili + +// ist : 2014-08-28 Istanbul Metropolitan Municipality +ist + +// istanbul : 2014-08-28 Istanbul Metropolitan Municipality +istanbul + +// itau : 2014-10-02 Itau Unibanco Holding S.A. +itau + +// itv : 2015-07-09 ITV Services Limited +itv + +// iveco : 2015-09-03 CNH Industrial N.V. +iveco + +// iwc : 2014-06-23 Richemont DNS Inc. +iwc + +// jaguar : 2014-11-13 Jaguar Land Rover Ltd +jaguar + +// java : 2014-06-19 Oracle Corporation +java + +// jcb : 2014-11-20 JCB Co., Ltd. +jcb + +// jcp : 2015-04-23 JCP Media, Inc. +jcp + +// jeep : 2015-07-30 FCA US LLC. +jeep + +// jetzt : 2014-01-09 +jetzt + +// jewelry : 2015-03-05 Wild Bloom, LLC +jewelry + +// jio : 2015-04-02 Affinity Names, Inc. +jio + +// jlc : 2014-12-04 Richemont DNS Inc. +jlc + +// jll : 2015-04-02 Jones Lang LaSalle Incorporated +jll + +// jmp : 2015-03-26 Matrix IP LLC +jmp + +// jnj : 2015-06-18 Johnson & Johnson Services, Inc. +jnj + +// joburg : 2014-03-24 ZA Central Registry NPC trading as ZA Central Registry +joburg + +// jot : 2014-12-18 Amazon EU S.à r.l. +jot + +// joy : 2014-12-18 Amazon EU S.à r.l. +joy + +// jpmorgan : 2015-04-30 JPMorgan Chase & Co. +jpmorgan + +// jprs : 2014-09-18 Japan Registry Services Co., Ltd. +jprs + +// juegos : 2014-03-20 Uniregistry, Corp. +juegos + +// juniper : 2015-07-30 JUNIPER NETWORKS, INC. +juniper + +// kaufen : 2013-11-07 United TLD Holdco Ltd. +kaufen + +// kddi : 2014-09-12 KDDI CORPORATION +kddi + +// kerryhotels : 2015-04-30 Kerry Trading Co. Limited +kerryhotels + +// kerrylogistics : 2015-04-09 Kerry Trading Co. Limited +kerrylogistics + +// kerryproperties : 2015-04-09 Kerry Trading Co. Limited +kerryproperties + +// kfh : 2014-12-04 Kuwait Finance House +kfh + +// kia : 2015-07-09 KIA MOTORS CORPORATION +kia + +// kim : 2013-09-23 Afilias Limited +kim + +// kinder : 2014-11-07 Ferrero Trading Lux S.A. +kinder + +// kindle : 2015-06-25 Amazon EU S.à r.l. +kindle + +// kitchen : 2013-09-20 Just Goodbye, LLC +kitchen + +// kiwi : 2013-09-20 DOT KIWI LIMITED +kiwi + +// koeln : 2014-01-09 NetCologne Gesellschaft für Telekommunikation mbH +koeln + +// komatsu : 2015-01-08 Komatsu Ltd. +komatsu + +// kosher : 2015-08-20 Kosher Marketing Assets LLC +kosher + +// kpmg : 2015-04-23 KPMG International Cooperative (KPMG International Genossenschaft) +kpmg + +// kpn : 2015-01-08 Koninklijke KPN N.V. +kpn + +// krd : 2013-12-05 KRG Department of Information Technology +krd + +// kred : 2013-12-19 KredTLD Pty Ltd +kred + +// kuokgroup : 2015-04-09 Kerry Trading Co. Limited +kuokgroup + +// kyoto : 2014-11-07 Academic Institution: Kyoto Jyoho Gakuen +kyoto + +// lacaixa : 2014-01-09 CAIXA D'ESTALVIS I PENSIONS DE BARCELONA +lacaixa + +// ladbrokes : 2015-08-06 LADBROKES INTERNATIONAL PLC +ladbrokes + +// lamborghini : 2015-06-04 Automobili Lamborghini S.p.A. +lamborghini + +// lamer : 2015-10-01 The Estée Lauder Companies Inc. +lamer + +// lancaster : 2015-02-12 LANCASTER +lancaster + +// lancia : 2015-07-31 Fiat Chrysler Automobiles N.V. +lancia + +// lancome : 2015-07-23 L'Oréal +lancome + +// land : 2013-09-10 Pine Moon, LLC +land + +// landrover : 2014-11-13 Jaguar Land Rover Ltd +landrover + +// lanxess : 2015-07-30 LANXESS Corporation +lanxess + +// lasalle : 2015-04-02 Jones Lang LaSalle Incorporated +lasalle + +// lat : 2014-10-16 ECOM-LAC Federaciòn de Latinoamèrica y el Caribe para Internet y el Comercio Electrònico +lat + +// latino : 2015-07-30 Dish DBS Corporation +latino + +// latrobe : 2014-06-16 La Trobe University +latrobe + +// law : 2015-01-22 Minds + Machines Group Limited +law + +// lawyer : 2014-03-20 +lawyer + +// lds : 2014-03-20 IRI Domain Management, LLC ("Applicant") +lds + +// lease : 2014-03-06 Victor Trail, LLC +lease + +// leclerc : 2014-08-07 A.C.D. LEC Association des Centres Distributeurs Edouard Leclerc +leclerc + +// lefrak : 2015-07-16 LeFrak Organization, Inc. +lefrak + +// legal : 2014-10-16 Blue Falls, LLC +legal + +// lego : 2015-07-16 LEGO Juris A/S +lego + +// lexus : 2015-04-23 TOYOTA MOTOR CORPORATION +lexus + +// lgbt : 2014-05-08 Afilias Limited +lgbt + +// liaison : 2014-10-02 Liaison Technologies, Incorporated +liaison + +// lidl : 2014-09-18 Schwarz Domains und Services GmbH & Co. KG +lidl + +// life : 2014-02-06 Trixy Oaks, LLC +life + +// lifeinsurance : 2015-01-15 American Council of Life Insurers +lifeinsurance + +// lifestyle : 2014-12-11 Lifestyle Domain Holdings, Inc. +lifestyle + +// lighting : 2013-08-27 John McCook, LLC +lighting + +// like : 2014-12-18 Amazon EU S.à r.l. +like + +// lilly : 2015-07-31 Eli Lilly and Company +lilly + +// limited : 2014-03-06 Big Fest, LLC +limited + +// limo : 2013-10-17 Hidden Frostbite, LLC +limo + +// lincoln : 2014-11-13 Ford Motor Company +lincoln + +// linde : 2014-12-04 Linde Aktiengesellschaft +linde + +// link : 2013-11-14 Uniregistry, Corp. +link + +// lipsy : 2015-06-25 Lipsy Ltd +lipsy + +// live : 2014-12-04 +live + +// living : 2015-07-30 Lifestyle Domain Holdings, Inc. +living + +// lixil : 2015-03-19 LIXIL Group Corporation +lixil + +// loan : 2014-11-20 dot Loan Limited +loan + +// loans : 2014-03-20 June Woods, LLC +loans + +// locker : 2015-06-04 Dish DBS Corporation +locker + +// locus : 2015-06-25 Locus Analytics LLC +locus + +// loft : 2015-07-30 Annco, Inc. +loft + +// lol : 2015-01-30 Uniregistry, Corp. +lol + +// london : 2013-11-14 Dot London Domains Limited +london + +// lotte : 2014-11-07 Lotte Holdings Co., Ltd. +lotte + +// lotto : 2014-04-10 Afilias Limited +lotto + +// love : 2014-12-22 Merchant Law Group LLP +love + +// lpl : 2015-07-30 LPL Holdings, Inc. +lpl + +// lplfinancial : 2015-07-30 LPL Holdings, Inc. +lplfinancial + +// ltd : 2014-09-25 Over Corner, LLC +ltd + +// ltda : 2014-04-17 DOMAIN ROBOT SERVICOS DE HOSPEDAGEM NA INTERNET LTDA +ltda + +// lundbeck : 2015-08-06 H. Lundbeck A/S +lundbeck + +// lupin : 2014-11-07 LUPIN LIMITED +lupin + +// luxe : 2014-01-09 Top Level Domain Holdings Limited +luxe + +// luxury : 2013-10-17 Luxury Partners, LLC +luxury + +// macys : 2015-07-31 Macys, Inc. +macys + +// madrid : 2014-05-01 Comunidad de Madrid +madrid + +// maif : 2014-10-02 Mutuelle Assurance Instituteur France (MAIF) +maif + +// maison : 2013-12-05 Victor Frostbite, LLC +maison + +// makeup : 2015-01-15 L'Oréal +makeup + +// man : 2014-12-04 MAN SE +man + +// management : 2013-11-07 John Goodbye, LLC +management + +// mango : 2013-10-24 PUNTO FA S.L. +mango + +// map : 2016-06-09 Charleston Road Registry Inc. +map + +// market : 2014-03-06 +market + +// marketing : 2013-11-07 Fern Pass, LLC +marketing + +// markets : 2014-12-11 IG Group Holdings PLC +markets + +// marriott : 2014-10-09 Marriott Worldwide Corporation +marriott + +// marshalls : 2015-07-16 The TJX Companies, Inc. +marshalls + +// maserati : 2015-07-31 Fiat Chrysler Automobiles N.V. +maserati + +// mattel : 2015-08-06 Mattel Sites, Inc. +mattel + +// mba : 2015-04-02 Lone Hollow, LLC +mba + +// mcd : 2015-07-30 McDonald’s Corporation +mcd + +// mcdonalds : 2015-07-30 McDonald’s Corporation +mcdonalds + +// mckinsey : 2015-07-31 McKinsey Holdings, Inc. +mckinsey + +// med : 2015-08-06 Medistry LLC +med + +// media : 2014-03-06 Grand Glen, LLC +media + +// meet : 2014-01-16 +meet + +// melbourne : 2014-05-29 The Crown in right of the State of Victoria, represented by its Department of State Development, Business and Innovation +melbourne + +// meme : 2014-01-30 Charleston Road Registry Inc. +meme + +// memorial : 2014-10-16 Dog Beach, LLC +memorial + +// men : 2015-02-26 Exclusive Registry Limited +men + +// menu : 2013-09-11 Wedding TLD2, LLC +menu + +// meo : 2014-11-07 PT Comunicacoes S.A. +meo + +// merckmsd : 2016-07-14 MSD Registry Holdings, Inc. +merckmsd + +// metlife : 2015-05-07 MetLife Services and Solutions, LLC +metlife + +// miami : 2013-12-19 Top Level Domain Holdings Limited +miami + +// microsoft : 2014-12-18 Microsoft Corporation +microsoft + +// mini : 2014-01-09 Bayerische Motoren Werke Aktiengesellschaft +mini + +// mint : 2015-07-30 Intuit Administrative Services, Inc. +mint + +// mit : 2015-07-02 Massachusetts Institute of Technology +mit + +// mitsubishi : 2015-07-23 Mitsubishi Corporation +mitsubishi + +// mlb : 2015-05-21 MLB Advanced Media DH, LLC +mlb + +// mls : 2015-04-23 The Canadian Real Estate Association +mls + +// mma : 2014-11-07 MMA IARD +mma + +// mobile : 2016-06-02 Dish DBS Corporation +mobile + +// mobily : 2014-12-18 GreenTech Consultancy Company W.L.L. +mobily + +// moda : 2013-11-07 United TLD Holdco Ltd. +moda + +// moe : 2013-11-13 Interlink Co., Ltd. +moe + +// moi : 2014-12-18 Amazon EU S.à r.l. +moi + +// mom : 2015-04-16 Uniregistry, Corp. +mom + +// monash : 2013-09-30 Monash University +monash + +// money : 2014-10-16 Outer McCook, LLC +money + +// monster : 2015-09-11 Monster Worldwide, Inc. +monster + +// montblanc : 2014-06-23 Richemont DNS Inc. +montblanc + +// mopar : 2015-07-30 FCA US LLC. +mopar + +// mormon : 2013-12-05 IRI Domain Management, LLC ("Applicant") +mormon + +// mortgage : 2014-03-20 +mortgage + +// moscow : 2013-12-19 Foundation for Assistance for Internet Technologies and Infrastructure Development (FAITID) +moscow + +// moto : 2015-06-04 +moto + +// motorcycles : 2014-01-09 DERMotorcycles, LLC +motorcycles + +// mov : 2014-01-30 Charleston Road Registry Inc. +mov + +// movie : 2015-02-05 New Frostbite, LLC +movie + +// movistar : 2014-10-16 Telefónica S.A. +movistar + +// msd : 2015-07-23 MSD Registry Holdings, Inc. +msd + +// mtn : 2014-12-04 MTN Dubai Limited +mtn + +// mtpc : 2014-11-20 Mitsubishi Tanabe Pharma Corporation +mtpc + +// mtr : 2015-03-12 MTR Corporation Limited +mtr + +// mutual : 2015-04-02 Northwestern Mutual MU TLD Registry, LLC +mutual + +// mutuelle : 2015-06-18 Fédération Nationale de la Mutualité Française +mutuelle + +// nab : 2015-08-20 National Australia Bank Limited +nab + +// nadex : 2014-12-11 IG Group Holdings PLC +nadex + +// nagoya : 2013-10-24 GMO Registry, Inc. +nagoya + +// nationwide : 2015-07-23 Nationwide Mutual Insurance Company +nationwide + +// natura : 2015-03-12 NATURA COSMÉTICOS S.A. +natura + +// navy : 2014-03-06 United TLD Holdco Ltd. +navy + +// nba : 2015-07-31 NBA REGISTRY, LLC +nba + +// nec : 2015-01-08 NEC Corporation +nec + +// netbank : 2014-06-26 COMMONWEALTH BANK OF AUSTRALIA +netbank + +// netflix : 2015-06-18 Netflix, Inc. +netflix + +// network : 2013-11-14 Trixy Manor, LLC +network + +// neustar : 2013-12-05 NeuStar, Inc. +neustar + +// new : 2014-01-30 Charleston Road Registry Inc. +new + +// newholland : 2015-09-03 CNH Industrial N.V. +newholland + +// news : 2014-12-18 +news + +// next : 2015-06-18 Next plc +next + +// nextdirect : 2015-06-18 Next plc +nextdirect + +// nexus : 2014-07-24 Charleston Road Registry Inc. +nexus + +// nfl : 2015-07-23 NFL Reg Ops LLC +nfl + +// ngo : 2014-03-06 Public Interest Registry +ngo + +// nhk : 2014-02-13 Japan Broadcasting Corporation (NHK) +nhk + +// nico : 2014-12-04 DWANGO Co., Ltd. +nico + +// nike : 2015-07-23 NIKE, Inc. +nike + +// nikon : 2015-05-21 NIKON CORPORATION +nikon + +// ninja : 2013-11-07 United TLD Holdco Ltd. +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 + +// northwesternmutual : 2015-06-18 Northwestern Mutual Registry, LLC +northwesternmutual + +// norton : 2014-12-04 Symantec Corporation +norton + +// now : 2015-06-25 Amazon EU S.à r.l. +now + +// nowruz : 2014-09-04 Asia Green IT System Bilgisayar San. ve Tic. Ltd. Sti. +nowruz + +// nowtv : 2015-05-14 Starbucks (HK) Limited +nowtv + +// nra : 2014-05-22 NRA Holdings Company, INC. +nra + +// nrw : 2013-11-21 Minds + Machines GmbH +nrw + +// ntt : 2014-10-31 NIPPON TELEGRAPH AND TELEPHONE CORPORATION +ntt + +// nyc : 2014-01-23 The City of New York by and through the New York City Department of Information Technology & Telecommunications +nyc + +// obi : 2014-09-25 OBI Group Holding SE & Co. KGaA +obi + +// observer : 2015-04-30 +observer + +// off : 2015-07-23 Johnson Shareholdings, Inc. +off + +// office : 2015-03-12 Microsoft Corporation +office + +// okinawa : 2013-12-05 BusinessRalliart Inc. +okinawa + +// olayan : 2015-05-14 Crescent Holding GmbH +olayan + +// olayangroup : 2015-05-14 Crescent Holding GmbH +olayangroup + +// oldnavy : 2015-07-31 The Gap, Inc. +oldnavy + +// ollo : 2015-06-04 Dish DBS Corporation +ollo + +// omega : 2015-01-08 The Swatch Group Ltd +omega + +// one : 2014-11-07 One.com A/S +one + +// ong : 2014-03-06 Public Interest Registry +ong + +// onl : 2013-09-16 I-Registry Ltd. +onl + +// online : 2015-01-15 DotOnline Inc. +online + +// onyourside : 2015-07-23 Nationwide Mutual Insurance Company +onyourside + +// ooo : 2014-01-09 INFIBEAM INCORPORATION LIMITED +ooo + +// open : 2015-07-31 American Express Travel Related Services Company, Inc. +open + +// oracle : 2014-06-19 Oracle Corporation +oracle + +// orange : 2015-03-12 Orange Brand Services Limited +orange + +// organic : 2014-03-27 Afilias Limited +organic + +// orientexpress : 2015-02-05 +orientexpress + +// origins : 2015-10-01 The Estée Lauder Companies Inc. +origins + +// osaka : 2014-09-04 Interlink Co., Ltd. +osaka + +// otsuka : 2013-10-11 Otsuka Holdings Co., Ltd. +otsuka + +// ott : 2015-06-04 Dish DBS Corporation +ott + +// ovh : 2014-01-16 OVH SAS +ovh + +// page : 2014-12-04 Charleston Road Registry Inc. +page + +// pamperedchef : 2015-02-05 The Pampered Chef, Ltd. +pamperedchef + +// panasonic : 2015-07-30 Panasonic Corporation +panasonic + +// panerai : 2014-11-07 Richemont DNS Inc. +panerai + +// paris : 2014-01-30 City of Paris +paris + +// pars : 2014-09-04 Asia Green IT System Bilgisayar San. ve Tic. Ltd. Sti. +pars + +// partners : 2013-12-05 Magic Glen, LLC +partners + +// parts : 2013-12-05 Sea Goodbye, LLC +parts + +// party : 2014-09-11 Blue Sky Registry Limited +party + +// passagens : 2015-03-05 Travel Reservations SRL +passagens + +// pay : 2015-08-27 Amazon EU S.à r.l. +pay + +// pccw : 2015-05-14 PCCW Enterprises Limited +pccw + +// pet : 2015-05-07 Afilias plc +pet + +// pfizer : 2015-09-11 Pfizer Inc. +pfizer + +// pharmacy : 2014-06-19 National Association of Boards of Pharmacy +pharmacy + +// phd : 2016-07-28 Charleston Road Registry Inc. +phd + +// philips : 2014-11-07 Koninklijke Philips N.V. +philips + +// phone : 2016-06-02 Dish DBS Corporation +phone + +// photo : 2013-11-14 Uniregistry, Corp. +photo + +// photography : 2013-09-20 Sugar Glen, LLC +photography + +// photos : 2013-10-17 Sea Corner, LLC +photos + +// physio : 2014-05-01 PhysBiz Pty Ltd +physio + +// piaget : 2014-10-16 Richemont DNS Inc. +piaget + +// pics : 2013-11-14 Uniregistry, Corp. +pics + +// pictet : 2014-06-26 Pictet Europe S.A. +pictet + +// pictures : 2014-03-06 Foggy Sky, LLC +pictures + +// pid : 2015-01-08 Top Level Spectrum, Inc. +pid + +// pin : 2014-12-18 Amazon EU S.à r.l. +pin + +// ping : 2015-06-11 Ping Registry Provider, Inc. +ping + +// pink : 2013-10-01 Afilias Limited +pink + +// pioneer : 2015-07-16 Pioneer Corporation +pioneer + +// pizza : 2014-06-26 Foggy Moon, LLC +pizza + +// place : 2014-04-24 Snow Galley, LLC +place + +// play : 2015-03-05 Charleston Road Registry Inc. +play + +// playstation : 2015-07-02 Sony Computer Entertainment Inc. +playstation + +// plumbing : 2013-09-10 Spring Tigers, LLC +plumbing + +// plus : 2015-02-05 Sugar Mill, LLC +plus + +// pnc : 2015-07-02 PNC Domain Co., LLC +pnc + +// pohl : 2014-06-23 Deutsche Vermögensberatung Aktiengesellschaft DVAG +pohl + +// poker : 2014-07-03 Afilias Domains No. 5 Limited +poker + +// politie : 2015-08-20 Politie Nederland +politie + +// porn : 2014-10-16 ICM Registry PN LLC +porn + +// pramerica : 2015-07-30 Prudential Financial, Inc. +pramerica + +// praxi : 2013-12-05 Praxi S.p.A. +praxi + +// press : 2014-04-03 DotPress Inc. +press + +// prime : 2015-06-25 Amazon EU S.à r.l. +prime + +// prod : 2014-01-23 Charleston Road Registry Inc. +prod + +// productions : 2013-12-05 Magic Birch, LLC +productions + +// prof : 2014-07-24 Charleston Road Registry Inc. +prof + +// progressive : 2015-07-23 Progressive Casualty Insurance Company +progressive + +// promo : 2014-12-18 +promo + +// properties : 2013-12-05 Big Pass, LLC +properties + +// property : 2014-05-22 Uniregistry, Corp. +property + +// protection : 2015-04-23 +protection + +// pru : 2015-07-30 Prudential Financial, Inc. +pru + +// prudential : 2015-07-30 Prudential Financial, Inc. +prudential + +// pub : 2013-12-12 United TLD Holdco Ltd. +pub + +// pwc : 2015-10-29 PricewaterhouseCoopers LLP +pwc + +// qpon : 2013-11-14 dotCOOL, Inc. +qpon + +// quebec : 2013-12-19 PointQuébec Inc +quebec + +// quest : 2015-03-26 Quest ION Limited +quest + +// qvc : 2015-07-30 QVC, Inc. +qvc + +// racing : 2014-12-04 Premier Registry Limited +racing + +// radio : 2016-07-21 European Broadcasting Union (EBU) +radio + +// raid : 2015-07-23 Johnson Shareholdings, Inc. +raid + +// read : 2014-12-18 Amazon EU S.à r.l. +read + +// realestate : 2015-09-11 dotRealEstate LLC +realestate + +// realtor : 2014-05-29 Real Estate Domains LLC +realtor + +// realty : 2015-03-19 Fegistry, LLC +realty + +// recipes : 2013-10-17 Grand Island, LLC +recipes + +// red : 2013-11-07 Afilias Limited +red + +// redstone : 2014-10-31 Redstone Haute Couture Co., Ltd. +redstone + +// redumbrella : 2015-03-26 Travelers TLD, LLC +redumbrella + +// rehab : 2014-03-06 United TLD Holdco Ltd. +rehab + +// reise : 2014-03-13 +reise + +// reisen : 2014-03-06 New Cypress, LLC +reisen + +// reit : 2014-09-04 National Association of Real Estate Investment Trusts, Inc. +reit + +// reliance : 2015-04-02 Reliance Industries Limited +reliance + +// ren : 2013-12-12 Beijing Qianxiang Wangjing Technology Development Co., Ltd. +ren + +// rent : 2014-12-04 DERRent, LLC +rent + +// rentals : 2013-12-05 Big Hollow,LLC +rentals + +// repair : 2013-11-07 Lone Sunset, LLC +repair + +// report : 2013-12-05 Binky Glen, LLC +report + +// republican : 2014-03-20 United TLD Holdco Ltd. +republican + +// rest : 2013-12-19 Punto 2012 Sociedad Anonima Promotora de Inversion de Capital Variable +rest + +// restaurant : 2014-07-03 Snow Avenue, LLC +restaurant + +// review : 2014-11-20 dot Review Limited +review + +// reviews : 2013-09-13 +reviews + +// rexroth : 2015-06-18 Robert Bosch GMBH +rexroth + +// rich : 2013-11-21 I-Registry Ltd. +rich + +// richardli : 2015-05-14 Pacific Century Asset Management (HK) Limited +richardli + +// ricoh : 2014-11-20 Ricoh Company, Ltd. +ricoh + +// rightathome : 2015-07-23 Johnson Shareholdings, Inc. +rightathome + +// ril : 2015-04-02 Reliance Industries Limited +ril + +// rio : 2014-02-27 Empresa Municipal de Informática SA - IPLANRIO +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 + +// rocks : 2013-11-14 +rocks + +// rodeo : 2013-12-19 Top Level Domain Holdings Limited +rodeo + +// rogers : 2015-08-06 Rogers Communications Partnership +rogers + +// room : 2014-12-18 Amazon EU S.à r.l. +room + +// rsvp : 2014-05-08 Charleston Road Registry Inc. +rsvp + +// ruhr : 2013-10-02 regiodot GmbH & Co. KG +ruhr + +// run : 2015-03-19 Snow Park, LLC +run + +// rwe : 2015-04-02 RWE AG +rwe + +// ryukyu : 2014-01-09 BusinessRalliart Inc. +ryukyu + +// saarland : 2013-12-12 dotSaarland GmbH +saarland + +// safe : 2014-12-18 Amazon EU S.à r.l. +safe + +// safety : 2015-01-08 Safety Registry Services, LLC. +safety + +// sakura : 2014-12-18 SAKURA Internet Inc. +sakura + +// sale : 2014-10-16 +sale + +// salon : 2014-12-11 Outer Orchard, LLC +salon + +// samsclub : 2015-07-31 Wal-Mart Stores, Inc. +samsclub + +// samsung : 2014-04-03 SAMSUNG SDS CO., LTD +samsung + +// sandvik : 2014-11-13 Sandvik AB +sandvik + +// sandvikcoromant : 2014-11-07 Sandvik AB +sandvikcoromant + +// sanofi : 2014-10-09 Sanofi +sanofi + +// sap : 2014-03-27 SAP AG +sap + +// sapo : 2014-11-07 PT Comunicacoes S.A. +sapo + +// sarl : 2014-07-03 Delta Orchard, LLC +sarl + +// sas : 2015-04-02 Research IP LLC +sas + +// save : 2015-06-25 Amazon EU S.à r.l. +save + +// saxo : 2014-10-31 Saxo Bank A/S +saxo + +// sbi : 2015-03-12 STATE BANK OF INDIA +sbi + +// sbs : 2014-11-07 SPECIAL BROADCASTING SERVICE CORPORATION +sbs + +// sca : 2014-03-13 SVENSKA CELLULOSA AKTIEBOLAGET SCA (publ) +sca + +// scb : 2014-02-20 The Siam Commercial Bank Public Company Limited ("SCB") +scb + +// schaeffler : 2015-08-06 Schaeffler Technologies AG & Co. KG +schaeffler + +// schmidt : 2014-04-03 SALM S.A.S. +schmidt + +// scholarships : 2014-04-24 Scholarships.com, LLC +scholarships + +// school : 2014-12-18 Little Galley, LLC +school + +// schule : 2014-03-06 Outer Moon, LLC +schule + +// schwarz : 2014-09-18 Schwarz Domains und Services GmbH & Co. KG +schwarz + +// science : 2014-09-11 dot Science Limited +science + +// scjohnson : 2015-07-23 Johnson Shareholdings, Inc. +scjohnson + +// scor : 2014-10-31 SCOR SE +scor + +// scot : 2014-01-23 Dot Scot Registry Limited +scot + +// search : 2016-06-09 Charleston Road Registry Inc. +search + +// seat : 2014-05-22 SEAT, S.A. (Sociedad Unipersonal) +seat + +// secure : 2015-08-27 Amazon EU S.à r.l. +secure + +// security : 2015-05-14 +security + +// seek : 2014-12-04 Seek Limited +seek + +// select : 2015-10-08 iSelect Ltd +select + +// sener : 2014-10-24 Sener Ingeniería y Sistemas, S.A. +sener + +// services : 2014-02-27 Fox Castle, LLC +services + +// ses : 2015-07-23 SES +ses + +// seven : 2015-08-06 Seven West Media Ltd +seven + +// sew : 2014-07-17 SEW-EURODRIVE GmbH & Co KG +sew + +// sex : 2014-11-13 ICM Registry SX LLC +sex + +// sexy : 2013-09-11 Uniregistry, Corp. +sexy + +// sfr : 2015-08-13 Societe Francaise du Radiotelephone - SFR +sfr + +// shangrila : 2015-09-03 Shangri‐La International Hotel Management Limited +shangrila + +// sharp : 2014-05-01 Sharp Corporation +sharp + +// shaw : 2015-04-23 Shaw Cablesystems G.P. +shaw + +// shell : 2015-07-30 Shell Information Technology International Inc +shell + +// shia : 2014-09-04 Asia Green IT System Bilgisayar San. ve Tic. Ltd. Sti. +shia + +// shiksha : 2013-11-14 Afilias Limited +shiksha + +// shoes : 2013-10-02 Binky Galley, LLC +shoes + +// shop : 2016-04-08 GMO Registry, Inc. +shop + +// shopping : 2016-03-31 +shopping + +// shouji : 2015-01-08 QIHOO 360 TECHNOLOGY CO. LTD. +shouji + +// show : 2015-03-05 Snow Beach, LLC +show + +// showtime : 2015-08-06 CBS Domains Inc. +showtime + +// shriram : 2014-01-23 Shriram Capital Ltd. +shriram + +// silk : 2015-06-25 Amazon EU S.à r.l. +silk + +// sina : 2015-03-12 Sina Corporation +sina + +// singles : 2013-08-27 Fern Madison, LLC +singles + +// site : 2015-01-15 DotSite Inc. +site + +// ski : 2015-04-09 STARTING DOT LIMITED +ski + +// skin : 2015-01-15 L'Oréal +skin + +// sky : 2014-06-19 Sky IP International Ltd, a company incorporated in England and Wales, operating via its registered Swiss branch +sky + +// skype : 2014-12-18 Microsoft Corporation +skype + +// sling : 2015-07-30 Hughes Satellite Systems Corporation +sling + +// smart : 2015-07-09 Smart Communications, Inc. (SMART) +smart + +// smile : 2014-12-18 Amazon EU S.à r.l. +smile + +// sncf : 2015-02-19 Société Nationale des Chemins de fer Francais S N C F +sncf + +// soccer : 2015-03-26 Foggy Shadow, LLC +soccer + +// social : 2013-11-07 United TLD Holdco Ltd. +social + +// softbank : 2015-07-02 SoftBank Corp. +softbank + +// software : 2014-03-20 +software + +// sohu : 2013-12-19 Sohu.com Limited +sohu + +// solar : 2013-11-07 Ruby Town, LLC +solar + +// solutions : 2013-11-07 Silver Cover, LLC +solutions + +// song : 2015-02-26 Amazon EU S.à r.l. +song + +// sony : 2015-01-08 Sony Corporation +sony + +// soy : 2014-01-23 Charleston Road Registry Inc. +soy + +// space : 2014-04-03 DotSpace Inc. +space + +// spiegel : 2014-02-05 SPIEGEL-Verlag Rudolf Augstein GmbH & Co. KG +spiegel + +// spot : 2015-02-26 Amazon EU S.à r.l. +spot + +// spreadbetting : 2014-12-11 IG Group Holdings PLC +spreadbetting + +// srl : 2015-05-07 mySRL GmbH +srl + +// srt : 2015-07-30 FCA US LLC. +srt + +// stada : 2014-11-13 STADA Arzneimittel AG +stada + +// staples : 2015-07-30 Staples, Inc. +staples + +// star : 2015-01-08 Star India Private Limited +star + +// starhub : 2015-02-05 StarHub Ltd +starhub + +// statebank : 2015-03-12 STATE BANK OF INDIA +statebank + +// statefarm : 2015-07-30 State Farm Mutual Automobile Insurance Company +statefarm + +// statoil : 2014-12-04 Statoil ASA +statoil + +// stc : 2014-10-09 Saudi Telecom Company +stc + +// stcgroup : 2014-10-09 Saudi Telecom Company +stcgroup + +// stockholm : 2014-12-18 Stockholms kommun +stockholm + +// storage : 2014-12-22 Self Storage Company LLC +storage + +// store : 2015-04-09 DotStore Inc. +store + +// stream : 2016-01-08 dot Stream Limited +stream + +// studio : 2015-02-11 +studio + +// study : 2014-12-11 OPEN UNIVERSITIES AUSTRALIA PTY LTD +study + +// style : 2014-12-04 Binky Moon, LLC +style + +// sucks : 2014-12-22 Vox Populi Registry Inc. +sucks + +// supplies : 2013-12-19 Atomic Fields, LLC +supplies + +// supply : 2013-12-19 Half Falls, LLC +supply + +// support : 2013-10-24 Grand Orchard, LLC +support + +// surf : 2014-01-09 Top Level Domain Holdings Limited +surf + +// surgery : 2014-03-20 Tin Avenue, LLC +surgery + +// suzuki : 2014-02-20 SUZUKI MOTOR CORPORATION +suzuki + +// swatch : 2015-01-08 The Swatch Group Ltd +swatch + +// swiftcover : 2015-07-23 Swiftcover Insurance Services Limited +swiftcover + +// swiss : 2014-10-16 Swiss Confederation +swiss + +// sydney : 2014-09-18 State of New South Wales, Department of Premier and Cabinet +sydney + +// symantec : 2014-12-04 Symantec Corporation +symantec + +// systems : 2013-11-07 Dash Cypress, LLC +systems + +// tab : 2014-12-04 Tabcorp Holdings Limited +tab + +// taipei : 2014-07-10 Taipei City Government +taipei + +// talk : 2015-04-09 Amazon EU S.à r.l. +talk + +// taobao : 2015-01-15 Alibaba Group Holding Limited +taobao + +// target : 2015-07-31 Target Domain Holdings, LLC +target + +// tatamotors : 2015-03-12 Tata Motors Ltd +tatamotors + +// tatar : 2014-04-24 Limited Liability Company "Coordination Center of Regional Domain of Tatarstan Republic" +tatar + +// tattoo : 2013-08-30 Uniregistry, Corp. +tattoo + +// tax : 2014-03-20 Storm Orchard, LLC +tax + +// taxi : 2015-03-19 Pine Falls, LLC +taxi + +// tci : 2014-09-12 Asia Green IT System Bilgisayar San. ve Tic. Ltd. Sti. +tci + +// tdk : 2015-06-11 TDK Corporation +tdk + +// team : 2015-03-05 Atomic Lake, LLC +team + +// tech : 2015-01-30 Dot Tech LLC +tech + +// technology : 2013-09-13 Auburn Falls +technology + +// telecity : 2015-02-19 TelecityGroup International Limited +telecity + +// telefonica : 2014-10-16 Telefónica S.A. +telefonica + +// temasek : 2014-08-07 Temasek Holdings (Private) Limited +temasek + +// tennis : 2014-12-04 Cotton Bloom, LLC +tennis + +// teva : 2015-07-02 Teva Pharmaceutical Industries Limited +teva + +// thd : 2015-04-02 Homer TLC, Inc. +thd + +// theater : 2015-03-19 Blue Tigers, LLC +theater + +// theatre : 2015-05-07 +theatre + +// theguardian : 2015-04-30 Guardian News and Media Limited +theguardian + +// tiaa : 2015-07-23 Teachers Insurance and Annuity Association of America +tiaa + +// tickets : 2015-02-05 Accent Media Limited +tickets + +// tienda : 2013-11-14 Victor Manor, LLC +tienda + +// tiffany : 2015-01-30 Tiffany and Company +tiffany + +// tips : 2013-09-20 Corn Willow, LLC +tips + +// tires : 2014-11-07 Dog Edge, LLC +tires + +// tirol : 2014-04-24 punkt Tirol GmbH +tirol + +// tjmaxx : 2015-07-16 The TJX Companies, Inc. +tjmaxx + +// tjx : 2015-07-16 The TJX Companies, Inc. +tjx + +// tkmaxx : 2015-07-16 The TJX Companies, Inc. +tkmaxx + +// tmall : 2015-01-15 Alibaba Group Holding Limited +tmall + +// today : 2013-09-20 Pearl Woods, LLC +today + +// tokyo : 2013-11-13 GMO Registry, Inc. +tokyo + +// tools : 2013-11-21 Pioneer North, LLC +tools + +// top : 2014-03-20 Jiangsu Bangning Science & Technology Co.,Ltd. +top + +// toray : 2014-12-18 Toray Industries, Inc. +toray + +// toshiba : 2014-04-10 TOSHIBA Corporation +toshiba + +// total : 2015-08-06 Total SA +total + +// tours : 2015-01-22 Sugar Station, LLC +tours + +// town : 2014-03-06 Koko Moon, LLC +town + +// toyota : 2015-04-23 TOYOTA MOTOR CORPORATION +toyota + +// toys : 2014-03-06 Pioneer Orchard, LLC +toys + +// trade : 2014-01-23 Elite Registry Limited +trade + +// trading : 2014-12-11 IG Group Holdings PLC +trading + +// training : 2013-11-07 Wild Willow, LLC +training + +// travelchannel : 2015-07-02 Lifestyle Domain Holdings, Inc. +travelchannel + +// travelers : 2015-03-26 Travelers TLD, LLC +travelers + +// travelersinsurance : 2015-03-26 Travelers TLD, LLC +travelersinsurance + +// trust : 2014-10-16 +trust + +// trv : 2015-03-26 Travelers TLD, LLC +trv + +// tube : 2015-06-11 Latin American Telecom LLC +tube + +// tui : 2014-07-03 TUI AG +tui + +// tunes : 2015-02-26 Amazon EU S.à r.l. +tunes + +// tushu : 2014-12-18 Amazon EU S.à r.l. +tushu + +// tvs : 2015-02-19 T V SUNDRAM IYENGAR & SONS LIMITED +tvs + +// ubank : 2015-08-20 National Australia Bank Limited +ubank + +// ubs : 2014-12-11 UBS AG +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 + +// uno : 2013-09-11 Dot Latin LLC +uno + +// uol : 2014-05-01 UBN INTERNET LTDA. +uol + +// ups : 2015-06-25 UPS Market Driver, Inc. +ups + +// vacations : 2013-12-05 Atomic Tigers, LLC +vacations + +// vana : 2014-12-11 Lifestyle Domain Holdings, Inc. +vana + +// vanguard : 2015-09-03 The Vanguard Group, Inc. +vanguard + +// vegas : 2014-01-16 Dot Vegas, Inc. +vegas + +// ventures : 2013-08-27 Binky Lake, LLC +ventures + +// verisign : 2015-08-13 VeriSign, Inc. +verisign + +// versicherung : 2014-03-20 dotversicherung-registry GmbH +versicherung + +// vet : 2014-03-06 +vet + +// viajes : 2013-10-17 Black Madison, LLC +viajes + +// video : 2014-10-16 +video + +// vig : 2015-05-14 VIENNA INSURANCE GROUP AG Wiener Versicherung Gruppe +vig + +// viking : 2015-04-02 Viking River Cruises (Bermuda) Ltd. +viking + +// villas : 2013-12-05 New Sky, LLC +villas + +// vin : 2015-06-18 Holly Shadow, LLC +vin + +// vip : 2015-01-22 Minds + Machines Group Limited +vip + +// virgin : 2014-09-25 Virgin Enterprises Limited +virgin + +// visa : 2015-07-30 Visa Worldwide Pte. Limited +visa + +// vision : 2013-12-05 Koko Station, LLC +vision + +// vista : 2014-09-18 Vistaprint Limited +vista + +// vistaprint : 2014-09-18 Vistaprint Limited +vistaprint + +// viva : 2014-11-07 Saudi Telecom Company +viva + +// vivo : 2015-07-31 Telefonica Brasil S.A. +vivo + +// vlaanderen : 2014-02-06 DNS.be vzw +vlaanderen + +// vodka : 2013-12-19 Top Level Domain Holdings Limited +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 + +// voting : 2013-11-13 Valuetainment Corp. +voting + +// voto : 2013-11-21 Monolith Registry LLC +voto + +// voyage : 2013-08-27 Ruby House, LLC +voyage + +// vuelos : 2015-03-05 Travel Reservations SRL +vuelos + +// wales : 2014-05-08 Nominet UK +wales + +// walmart : 2015-07-31 Wal-Mart Stores, Inc. +walmart + +// walter : 2014-11-13 Sandvik AB +walter + +// wang : 2013-10-24 Zodiac Leo Limited +wang + +// wanggou : 2014-12-18 Amazon EU S.à r.l. +wanggou + +// warman : 2015-06-18 Weir Group IP Limited +warman + +// watch : 2013-11-14 Sand Shadow, LLC +watch + +// watches : 2014-12-22 Richemont DNS Inc. +watches + +// weather : 2015-01-08 The Weather Channel, LLC +weather + +// weatherchannel : 2015-03-12 The Weather Channel, LLC +weatherchannel + +// webcam : 2014-01-23 dot Webcam Limited +webcam + +// weber : 2015-06-04 Saint-Gobain Weber SA +weber + +// website : 2014-04-03 DotWebsite Inc. +website + +// wed : 2013-10-01 Atgron, Inc. +wed + +// wedding : 2014-04-24 Top Level Domain Holdings Limited +wedding + +// weibo : 2015-03-05 Sina Corporation +weibo + +// weir : 2015-01-29 Weir Group IP Limited +weir + +// whoswho : 2014-02-20 Who's Who Registry +whoswho + +// wien : 2013-10-28 punkt.wien GmbH +wien + +// wiki : 2013-11-07 Top Level Design, LLC +wiki + +// williamhill : 2014-03-13 William Hill Organization Limited +williamhill + +// win : 2014-11-20 First Registry Limited +win + +// windows : 2014-12-18 Microsoft Corporation +windows + +// wine : 2015-06-18 June Station, LLC +wine + +// winners : 2015-07-16 The TJX Companies, Inc. +winners + +// wme : 2014-02-13 William Morris Endeavor Entertainment, LLC +wme + +// wolterskluwer : 2015-08-06 Wolters Kluwer N.V. +wolterskluwer + +// woodside : 2015-07-09 Woodside Petroleum Limited +woodside + +// work : 2013-12-19 Top Level Domain Holdings Limited +work + +// works : 2013-11-14 Little Dynamite, LLC +works + +// world : 2014-06-12 Bitter Fields, LLC +world + +// wow : 2015-10-08 Amazon EU S.à r.l. +wow + +// wtc : 2013-12-19 World Trade Centers Association, Inc. +wtc + +// wtf : 2014-03-06 Hidden Way, LLC +wtf + +// xbox : 2014-12-18 Microsoft Corporation +xbox + +// xerox : 2014-10-24 Xerox DNHC LLC +xerox + +// xfinity : 2015-07-09 Comcast IP Holdings I, LLC +xfinity + +// xihuan : 2015-01-08 QIHOO 360 TECHNOLOGY CO. LTD. +xihuan + +// xin : 2014-12-11 Elegant Leader Limited +xin + +// xn--11b4c3d : 2015-01-15 VeriSign Sarl +xn--11b4c3d +कॉम + +// xn--1ck2e1b : 2015-02-26 Amazon EU S.à r.l. +xn--1ck2e1b +セール + +// xn--1qqw23a : 2014-01-09 Guangzhou YU Wei Information Technology Co., Ltd. +xn--1qqw23a +佛山 + +// xn--30rr7y : 2014-06-12 Excellent First Limited +xn--30rr7y +慈善 + +// xn--3bst00m : 2013-09-13 Eagle Horizon Limited +xn--3bst00m +集团 + +// xn--3ds443g : 2013-09-08 TLD REGISTRY LIMITED +xn--3ds443g +在线 + +// xn--3oq18vl8pn36a : 2015-07-02 Volkswagen (China) Investment Co., Ltd. +xn--3oq18vl8pn36a +大众汽车 + +// xn--3pxu8k : 2015-01-15 VeriSign Sarl +xn--3pxu8k +点看 + +// xn--42c2d9a : 2015-01-15 VeriSign Sarl +xn--42c2d9a +คอม + +// xn--45q11c : 2013-11-21 Zodiac Scorpio Limited +xn--45q11c +八卦 + +// xn--4gbrim : 2013-10-04 Suhub Electronic Establishment +xn--4gbrim +موقع + +// xn--4gq48lf9j : 2015-07-31 Wal-Mart Stores, Inc. +xn--4gq48lf9j +一号店 + +// xn--55qw42g : 2013-11-08 China Organizational Name Administration Center +xn--55qw42g +公益 + +// xn--55qx5d : 2013-11-14 Computer Network Information Center of Chinese Academy of Sciences (China Internet Network Information Center) +xn--55qx5d +公司 + +// xn--5su34j936bgsg : 2015-09-03 Shangri‐La International Hotel Management Limited +xn--5su34j936bgsg +香格里拉 + +// xn--5tzm5g : 2014-12-22 Global Website TLD Asia Limited +xn--5tzm5g +网站 + +// xn--6frz82g : 2013-09-23 Afilias Limited +xn--6frz82g +移动 + +// xn--6qq986b3xl : 2013-09-13 Tycoon Treasure Limited +xn--6qq986b3xl +我爱你 + +// xn--80adxhks : 2013-12-19 Foundation for Assistance for Internet Technologies and Infrastructure Development (FAITID) +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 +онлайн + +// xn--80aswg : 2013-07-14 CORE Association +xn--80aswg +сайт + +// xn--8y0a063a : 2015-03-26 China United Network Communications Corporation Limited +xn--8y0a063a +联通 + +// xn--9dbq2a : 2015-01-15 VeriSign Sarl +xn--9dbq2a +קום + +// xn--9et52u : 2014-06-12 RISE VICTORY LIMITED +xn--9et52u +时尚 + +// xn--9krt00a : 2015-03-12 Sina Corporation +xn--9krt00a +微博 + +// xn--b4w605ferd : 2014-08-07 Temasek Holdings (Private) Limited +xn--b4w605ferd +淡马锡 + +// xn--bck1b9a5dre4c : 2015-02-26 Amazon EU S.à r.l. +xn--bck1b9a5dre4c +ファッション + +// xn--c1avg : 2013-11-14 Public Interest Registry +xn--c1avg +орг + +// xn--c2br7g : 2015-01-15 VeriSign Sarl +xn--c2br7g +नेट + +// xn--cck2b3b : 2015-02-26 Amazon EU S.à r.l. +xn--cck2b3b +ストア + +// xn--cg4bki : 2013-09-27 SAMSUNG SDS CO., LTD +xn--cg4bki +삼성 + +// xn--czr694b : 2014-01-16 Dot Trademark TLD Holding Company Limted +xn--czr694b +商标 + +// xn--czrs0t : 2013-12-19 Wild Island, LLC +xn--czrs0t +商店 + +// xn--czru2d : 2013-11-21 Zodiac Capricorn Limited +xn--czru2d +商城 + +// xn--d1acj3b : 2013-11-20 The Foundation for Network Initiatives “The Smart Internet” +xn--d1acj3b +дети + +// xn--eckvdtc9d : 2014-12-18 Amazon EU S.à r.l. +xn--eckvdtc9d +ポイント + +// xn--efvy88h : 2014-08-22 Xinhua News Agency Guangdong Branch 新华通讯社广东分社 +xn--efvy88h +新闻 + +// xn--estv75g : 2015-02-19 Industrial and Commercial Bank of China Limited +xn--estv75g +工行 + +// xn--fct429k : 2015-04-09 Amazon EU S.à r.l. +xn--fct429k +家電 + +// xn--fhbei : 2015-01-15 VeriSign Sarl +xn--fhbei +كوم + +// xn--fiq228c5hs : 2013-09-08 TLD REGISTRY LIMITED +xn--fiq228c5hs +中文网 + +// xn--fiq64b : 2013-10-14 CITIC Group Corporation +xn--fiq64b +中信 + +// xn--fjq720a : 2014-05-22 Will Bloom, LLC +xn--fjq720a +娱乐 + +// xn--flw351e : 2014-07-31 Charleston Road Registry Inc. +xn--flw351e +谷歌 + +// xn--fzys8d69uvgm : 2015-05-14 PCCW Enterprises Limited +xn--fzys8d69uvgm +電訊盈科 + +// xn--g2xx48c : 2015-01-30 Minds + Machines Group Limited +xn--g2xx48c +购物 + +// xn--gckr3f0f : 2015-02-26 Amazon EU S.à r.l. +xn--gckr3f0f +クラウド + +// xn--gk3at1e : 2015-10-08 Amazon EU S.à r.l. +xn--gk3at1e +通販 + +// xn--hxt814e : 2014-05-15 Zodiac Libra Limited +xn--hxt814e +网店 + +// xn--i1b6b1a6a2e : 2013-11-14 Public Interest Registry +xn--i1b6b1a6a2e +संगठन + +// xn--imr513n : 2014-12-11 Dot Trademark TLD Holding Company Limted +xn--imr513n +餐厅 + +// xn--io0a7i : 2013-11-14 Computer Network Information Center of Chinese Academy of Sciences (China Internet Network Information Center) +xn--io0a7i +网络 + +// xn--j1aef : 2015-01-15 VeriSign Sarl +xn--j1aef +ком + +// xn--jlq61u9w7b : 2015-01-08 Nokia Corporation +xn--jlq61u9w7b +诺基亚 + +// xn--jvr189m : 2015-02-26 Amazon EU S.à r.l. +xn--jvr189m +食品 + +// xn--kcrx77d1x4a : 2014-11-07 Koninklijke Philips N.V. +xn--kcrx77d1x4a +飞利浦 + +// xn--kpu716f : 2014-12-22 Richemont DNS Inc. +xn--kpu716f +手表 + +// xn--kput3i : 2014-02-13 Beijing RITT-Net Technology Development Co., Ltd +xn--kput3i +手机 + +// xn--mgba3a3ejt : 2014-11-20 Aramco Services Company +xn--mgba3a3ejt +ارامكو + +// xn--mgba7c0bbn0a : 2015-05-14 Crescent Holding GmbH +xn--mgba7c0bbn0a +العليان + +// xn--mgbaakc7dvf : 2015-09-03 Emirates Telecommunications Corporation (trading as Etisalat) +xn--mgbaakc7dvf +اتصالات + +// xn--mgbab2bd : 2013-10-31 CORE Association +xn--mgbab2bd +بازار + +// xn--mgbb9fbpob : 2014-12-18 GreenTech Consultancy Company W.L.L. +xn--mgbb9fbpob +موبايلي + +// xn--mgbca7dzdo : 2015-07-30 Abu Dhabi Systems and Information Centre +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 +همراه + +// xn--mk1bu44c : 2015-01-15 VeriSign Sarl +xn--mk1bu44c +닷컴 + +// xn--mxtq1m : 2014-03-06 Net-Chinese Co., Ltd. +xn--mxtq1m +政府 + +// xn--ngbc5azd : 2013-07-13 International Domain Registry Pty. Ltd. +xn--ngbc5azd +شبكة + +// xn--ngbe9e0a : 2014-12-04 Kuwait Finance House +xn--ngbe9e0a +بيتك + +// xn--ngbrx : 2015-11-12 League of Arab States +xn--ngbrx +عرب + +// xn--nqv7f : 2013-11-14 Public Interest Registry +xn--nqv7f +机构 + +// xn--nqv7fs00ema : 2013-11-14 Public Interest Registry +xn--nqv7fs00ema +组织机构 + +// xn--nyqy26a : 2014-11-07 Stable Tone Limited +xn--nyqy26a +健康 + +// xn--p1acf : 2013-12-12 Rusnames Limited +xn--p1acf +рус + +// xn--pbt977c : 2014-12-22 Richemont DNS Inc. +xn--pbt977c +珠宝 + +// xn--pssy2u : 2015-01-15 VeriSign Sarl +xn--pssy2u +大拿 + +// xn--q9jyb4c : 2013-09-17 Charleston Road Registry Inc. +xn--q9jyb4c +みんな + +// xn--qcka1pmc : 2014-07-31 Charleston Road Registry Inc. +xn--qcka1pmc +グーグル + +// xn--rhqv96g : 2013-09-11 Stable Tone Limited +xn--rhqv96g +世界 + +// xn--rovu88b : 2015-02-26 Amazon EU S.à r.l. +xn--rovu88b +書籍 + +// xn--ses554g : 2014-01-16 +xn--ses554g +网址 + +// xn--t60b56a : 2015-01-15 VeriSign Sarl +xn--t60b56a +닷넷 + +// xn--tckwe : 2015-01-15 VeriSign Sarl +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 +游戏 + +// xn--vermgensberater-ctb : 2014-06-23 Deutsche Vermögensberatung Aktiengesellschaft DVAG +xn--vermgensberater-ctb +vermögensberater + +// xn--vermgensberatung-pwb : 2014-06-23 Deutsche Vermögensberatung Aktiengesellschaft DVAG +xn--vermgensberatung-pwb +vermögensberatung + +// xn--vhquv : 2013-08-27 Dash McCook, LLC +xn--vhquv +企业 + +// xn--vuq861b : 2014-10-16 Beijing Tele-info Network Technology Co., Ltd. +xn--vuq861b +信息 + +// xn--w4r85el8fhu5dnra : 2015-04-30 Kerry Trading Co. Limited +xn--w4r85el8fhu5dnra +嘉里大酒店 + +// xn--w4rs40l : 2015-07-30 Kerry Trading Co. Limited +xn--w4rs40l +嘉里 + +// xn--xhq521b : 2013-11-14 Guangzhou YU Wei Information Technology Co., Ltd. +xn--xhq521b +广东 + +// xn--zfr164b : 2013-11-08 China Organizational Name Administration Center +xn--zfr164b +政务 + +// xperia : 2015-05-14 Sony Mobile Communications AB +xperia + +// xyz : 2013-12-05 XYZ.COM LLC +xyz + +// yachts : 2014-01-09 DERYachts, LLC +yachts + +// yahoo : 2015-04-02 Yahoo! Domain Services Inc. +yahoo + +// yamaxun : 2014-12-18 Amazon EU S.à r.l. +yamaxun + +// yandex : 2014-04-10 YANDEX, LLC +yandex + +// yodobashi : 2014-11-20 YODOBASHI CAMERA CO.,LTD. +yodobashi + +// yoga : 2014-05-29 Top Level Domain Holdings Limited +yoga + +// yokohama : 2013-12-12 GMO Registry, Inc. +yokohama + +// you : 2015-04-09 Amazon EU S.à r.l. +you + +// youtube : 2014-05-01 Charleston Road Registry Inc. +youtube + +// yun : 2015-01-08 QIHOO 360 TECHNOLOGY CO. LTD. +yun + +// zappos : 2015-06-25 Amazon EU S.à r.l. +zappos + +// zara : 2014-11-07 Industria de Diseño Textil, S.A. (INDITEX, S.A.) +zara + +// zero : 2014-12-18 Amazon EU S.à r.l. +zero + +// zip : 2014-05-08 Charleston Road Registry Inc. +zip + +// zippo : 2015-07-02 Zadco Company +zippo + +// zone : 2013-11-14 Outer Falls, LLC +zone + +// zuerich : 2014-11-07 Kanton Zürich (Canton of Zurich) +zuerich + + +// ===END ICANN DOMAINS=== +// ===BEGIN PRIVATE DOMAINS=== +// (Note: these are in alphabetical order by company name) + +// Agnat sp. z o.o. : https://domena.pl +// Submitted by Przemyslaw Plewa +beep.pl + +// Alces Software Ltd : http://alces-software.com +// Submitted by Mark J. Titorenko +*.compute.estate +*.alces.network + +// alwaysdata : https://www.alwaysdata.com +// Submitted by Cyril +*.alwaysdata.net + +// Amazon CloudFront : https://aws.amazon.com/cloudfront/ +// Submitted by Donavan Miller +cloudfront.net + +// Amazon Elastic Compute Cloud: https://aws.amazon.com/ec2/ +// Submitted by Luke Wells +*.compute.amazonaws.com +*.compute-1.amazonaws.com +*.compute.amazonaws.com.cn +us-east-1.amazonaws.com + +// Amazon Elastic Beanstalk : https://aws.amazon.com/elasticbeanstalk/ +// Submitted by Luke Wells +elasticbeanstalk.cn-north-1.amazonaws.com.cn +*.elasticbeanstalk.com + +// Amazon Elastic Load Balancing : https://aws.amazon.com/elasticloadbalancing/ +// Submitted by Luke Wells +*.elb.amazonaws.com +*.elb.amazonaws.com.cn + +// Amazon S3 : https://aws.amazon.com/s3/ +// Submitted by Luke Wells +s3.amazonaws.com +s3-ap-northeast-1.amazonaws.com +s3-ap-northeast-2.amazonaws.com +s3-ap-south-1.amazonaws.com +s3-ap-southeast-1.amazonaws.com +s3-ap-southeast-2.amazonaws.com +s3-ca-central-1.amazonaws.com +s3-eu-central-1.amazonaws.com +s3-eu-west-1.amazonaws.com +s3-eu-west-2.amazonaws.com +s3-external-1.amazonaws.com +s3-fips-us-gov-west-1.amazonaws.com +s3-sa-east-1.amazonaws.com +s3-us-gov-west-1.amazonaws.com +s3-us-east-2.amazonaws.com +s3-us-west-1.amazonaws.com +s3-us-west-2.amazonaws.com +s3.ap-northeast-2.amazonaws.com +s3.ap-south-1.amazonaws.com +s3.cn-north-1.amazonaws.com.cn +s3.ca-central-1.amazonaws.com +s3.eu-central-1.amazonaws.com +s3.eu-west-2.amazonaws.com +s3.us-east-2.amazonaws.com +s3.dualstack.ap-northeast-1.amazonaws.com +s3.dualstack.ap-northeast-2.amazonaws.com +s3.dualstack.ap-south-1.amazonaws.com +s3.dualstack.ap-southeast-1.amazonaws.com +s3.dualstack.ap-southeast-2.amazonaws.com +s3.dualstack.ca-central-1.amazonaws.com +s3.dualstack.eu-central-1.amazonaws.com +s3.dualstack.eu-west-1.amazonaws.com +s3.dualstack.eu-west-2.amazonaws.com +s3.dualstack.sa-east-1.amazonaws.com +s3.dualstack.us-east-1.amazonaws.com +s3.dualstack.us-east-2.amazonaws.com +s3-website-us-east-1.amazonaws.com +s3-website-us-west-1.amazonaws.com +s3-website-us-west-2.amazonaws.com +s3-website-ap-northeast-1.amazonaws.com +s3-website-ap-southeast-1.amazonaws.com +s3-website-ap-southeast-2.amazonaws.com +s3-website-eu-west-1.amazonaws.com +s3-website-sa-east-1.amazonaws.com +s3-website.ap-northeast-2.amazonaws.com +s3-website.ap-south-1.amazonaws.com +s3-website.ca-central-1.amazonaws.com +s3-website.eu-central-1.amazonaws.com +s3-website.eu-west-2.amazonaws.com +s3-website.us-east-2.amazonaws.com + +// Amune : https://amune.org/ +// Submitted by Team Amune +t3l3p0rt.net +tele.amune.org + +// Aptible : https://www.aptible.com/ +// Submitted by Thomas Orozco +on-aptible.com + +// Asociación Amigos de la Informática "Euskalamiga" : http://encounter.eus/ +// Submitted by Hector Martin +user.party.eus + +// Association potager.org : https://potager.org/ +// Submitted by Lunar +pimienta.org +poivron.org +potager.org +sweetpepper.org + +// ASUSTOR Inc. : http://www.asustor.com +// Submitted by Vincent Tseng +myasustor.com + +// AVM : https://avm.de +// Submitted by Andreas Weise +myfritz.net + +// backplane : https://www.backplane.io +// Submitted by Anthony Voutas +backplaneapp.io + +// BetaInABox +// Submitted by Adrian +betainabox.com + +// BinaryLane : http://www.binarylane.com +// Submitted by Nathan O'Sullivan +bnr.la + +// Boxfuse : https://boxfuse.com +// Submitted by Axel Fontaine +boxfuse.io + +// BrowserSafetyMark +// Submitted by Dave Tharp +browsersafetymark.io + +// callidomus: https://www.callidomus.com/ +// Submitted by Marcus Popp +mycd.eu + +// CentralNic : http://www.centralnic.com/names/domains +// Submitted by registry +ae.org +ar.com +br.com +cn.com +com.de +com.se +de.com +eu.com +gb.com +gb.net +hu.com +hu.net +jp.net +jpn.com +kr.com +mex.com +no.com +qc.com +ru.com +sa.com +se.com +se.net +uk.com +uk.net +us.com +uy.com +za.bz +za.com + +// Africa.com Web Solutions Ltd : https://registry.africa.com +// Submitted by Gavin Brown +africa.com + +// iDOT Services Limited : http://www.domain.gr.com +// Submitted by Gavin Brown +gr.com + +// Radix FZC : http://domains.in.net +// Submitted by Gavin Brown +in.net + +// US REGISTRY LLC : http://us.org +// Submitted by Gavin Brown +us.org + +// co.com Registry, LLC : https://registry.co.com +// Submitted by Gavin Brown +co.com + +// c.la : http://www.c.la/ +c.la + +// certmgr.org : https://certmgr.org +// Submitted by B. Blechschmidt +certmgr.org + +// Citrix : https://citrix.com +// Submitted by Alex Stoddard +xenapponazure.com + +// ClearVox : http://www.clearvox.nl/ +// Submitted by Leon Rowland +virtueeldomein.nl + +// cloudControl : https://www.cloudcontrol.com/ +// Submitted by Tobias Wilken +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 +co.cz + +// CDN77.com : http://www.cdn77.com +// Submitted by Jan Krpes +c.cdn77.org +cdn77-ssl.net +r.cdn77.net +rsc.cdn77.org +ssl.origin.cdn77-secure.org + +// Cloud DNS Ltd : http://www.cloudns.net +// Submitted by Aleksander Hristov +cloudns.asia +cloudns.biz +cloudns.club +cloudns.cc +cloudns.eu +cloudns.in +cloudns.info +cloudns.org +cloudns.pro +cloudns.pw +cloudns.us + +// CoDNS B.V. +co.nl +co.no + +// Commerce Guys, SAS +// Submitted by Damien Tournoud +*.platform.sh + +// COSIMO GmbH http://www.cosimo.de +// Submitted by Rene Marticke +dyn.cosidns.de +dynamisches-dns.de +dnsupdater.de +internet-dns.de +l-o-g-i-n.de +dynamic-dns.info +feste-ip.net +knx-server.net +static-access.net + +// Craynic, s.r.o. : http://www.craynic.com/ +// Submitted by Ales Krajnik +realm.cz + +// Cryptonomic : https://cryptonomic.net/ +// Submitted by Andrew Cady +*.cryptonomic.net + +// Cupcake : https://cupcake.io/ +// Submitted by Jonathan Rudenberg +cupcake.is + +// cyon GmbH : https://www.cyon.ch/ +// Submitted by Dominic Luechinger +cyon.link +cyon.site + +// Daplie, Inc : https://daplie.com +// Submitted by AJ ONeal +daplie.me + +// Dansk.net : http://www.dansk.net/ +// Submitted by Anani Voule +biz.dk +co.dk +firm.dk +reg.dk +store.dk + +// deSEC : https://desec.io/ +// Submitted by Peter Thomassen +dedyn.io + +// DNShome : https://www.dnshome.de/ +// Submitted by Norbert Auler +dnshome.de + +// DreamHost : http://www.dreamhost.com/ +// Submitted by Andrew Farmer +dreamhosters.com + +// Drobo : http://www.drobo.com/ +// Submitted by Ricardo Padilha +mydrobo.com + +// Drud Holdings, LLC. : https://www.drud.com/ +// Submitted by Kevin Bridges +drud.io +drud.us + +// DuckDNS : http://www.duckdns.org/ +// Submitted by Richard Harper +duckdns.org + +// dy.fi : http://dy.fi/ +// Submitted by Heikki Hannikainen +dy.fi +tunk.org + +// DynDNS.com : http://www.dyndns.com/services/dns/dyndns/ +dyndns-at-home.com +dyndns-at-work.com +dyndns-blog.com +dyndns-free.com +dyndns-home.com +dyndns-ip.com +dyndns-mail.com +dyndns-office.com +dyndns-pics.com +dyndns-remote.com +dyndns-server.com +dyndns-web.com +dyndns-wiki.com +dyndns-work.com +dyndns.biz +dyndns.info +dyndns.org +dyndns.tv +at-band-camp.net +ath.cx +barrel-of-knowledge.info +barrell-of-knowledge.info +better-than.tv +blogdns.com +blogdns.net +blogdns.org +blogsite.org +boldlygoingnowhere.org +broke-it.net +buyshouses.net +cechire.com +dnsalias.com +dnsalias.net +dnsalias.org +dnsdojo.com +dnsdojo.net +dnsdojo.org +does-it.net +doesntexist.com +doesntexist.org +dontexist.com +dontexist.net +dontexist.org +doomdns.com +doomdns.org +dvrdns.org +dyn-o-saur.com +dynalias.com +dynalias.net +dynalias.org +dynathome.net +dyndns.ws +endofinternet.net +endofinternet.org +endoftheinternet.org +est-a-la-maison.com +est-a-la-masion.com +est-le-patron.com +est-mon-blogueur.com +for-better.biz +for-more.biz +for-our.info +for-some.biz +for-the.biz +forgot.her.name +forgot.his.name +from-ak.com +from-al.com +from-ar.com +from-az.net +from-ca.com +from-co.net +from-ct.com +from-dc.com +from-de.com +from-fl.com +from-ga.com +from-hi.com +from-ia.com +from-id.com +from-il.com +from-in.com +from-ks.com +from-ky.com +from-la.net +from-ma.com +from-md.com +from-me.org +from-mi.com +from-mn.com +from-mo.com +from-ms.com +from-mt.com +from-nc.com +from-nd.com +from-ne.com +from-nh.com +from-nj.com +from-nm.com +from-nv.com +from-ny.net +from-oh.com +from-ok.com +from-or.com +from-pa.com +from-pr.com +from-ri.com +from-sc.com +from-sd.com +from-tn.com +from-tx.com +from-ut.com +from-va.com +from-vt.com +from-wa.com +from-wi.com +from-wv.com +from-wy.com +ftpaccess.cc +fuettertdasnetz.de +game-host.org +game-server.cc +getmyip.com +gets-it.net +go.dyndns.org +gotdns.com +gotdns.org +groks-the.info +groks-this.info +ham-radio-op.net +here-for-more.info +hobby-site.com +hobby-site.org +home.dyndns.org +homedns.org +homeftp.net +homeftp.org +homeip.net +homelinux.com +homelinux.net +homelinux.org +homeunix.com +homeunix.net +homeunix.org +iamallama.com +in-the-band.net +is-a-anarchist.com +is-a-blogger.com +is-a-bookkeeper.com +is-a-bruinsfan.org +is-a-bulls-fan.com +is-a-candidate.org +is-a-caterer.com +is-a-celticsfan.org +is-a-chef.com +is-a-chef.net +is-a-chef.org +is-a-conservative.com +is-a-cpa.com +is-a-cubicle-slave.com +is-a-democrat.com +is-a-designer.com +is-a-doctor.com +is-a-financialadvisor.com +is-a-geek.com +is-a-geek.net +is-a-geek.org +is-a-green.com +is-a-guru.com +is-a-hard-worker.com +is-a-hunter.com +is-a-knight.org +is-a-landscaper.com +is-a-lawyer.com +is-a-liberal.com +is-a-libertarian.com +is-a-linux-user.org +is-a-llama.com +is-a-musician.com +is-a-nascarfan.com +is-a-nurse.com +is-a-painter.com +is-a-patsfan.org +is-a-personaltrainer.com +is-a-photographer.com +is-a-player.com +is-a-republican.com +is-a-rockstar.com +is-a-socialist.com +is-a-soxfan.org +is-a-student.com +is-a-teacher.com +is-a-techie.com +is-a-therapist.com +is-an-accountant.com +is-an-actor.com +is-an-actress.com +is-an-anarchist.com +is-an-artist.com +is-an-engineer.com +is-an-entertainer.com +is-by.us +is-certified.com +is-found.org +is-gone.com +is-into-anime.com +is-into-cars.com +is-into-cartoons.com +is-into-games.com +is-leet.com +is-lost.org +is-not-certified.com +is-saved.org +is-slick.com +is-uberleet.com +is-very-bad.org +is-very-evil.org +is-very-good.org +is-very-nice.org +is-very-sweet.org +is-with-theband.com +isa-geek.com +isa-geek.net +isa-geek.org +isa-hockeynut.com +issmarterthanyou.com +isteingeek.de +istmein.de +kicks-ass.net +kicks-ass.org +knowsitall.info +land-4-sale.us +lebtimnetz.de +leitungsen.de +likes-pie.com +likescandy.com +merseine.nu +mine.nu +misconfused.org +mypets.ws +myphotos.cc +neat-url.com +office-on-the.net +on-the-web.tv +podzone.net +podzone.org +readmyblog.org +saves-the-whales.com +scrapper-site.net +scrapping.cc +selfip.biz +selfip.com +selfip.info +selfip.net +selfip.org +sells-for-less.com +sells-for-u.com +sells-it.net +sellsyourhome.org +servebbs.com +servebbs.net +servebbs.org +serveftp.net +serveftp.org +servegame.org +shacknet.nu +simple-url.com +space-to-rent.com +stuff-4-sale.org +stuff-4-sale.us +teaches-yoga.com +thruhere.net +traeumtgerade.de +webhop.biz +webhop.info +webhop.net +webhop.org +worse-than.tv +writesthisblog.com + +// ddnss.de : https://www.ddnss.de/ +// Submitted by Robert Niedziela +ddnss.de +dyn.ddnss.de +dyndns.ddnss.de +dyndns1.de +dyn-ip24.de +home-webserver.de +dyn.home-webserver.de +myhome-server.de +ddnss.org + +// dynv6 : https://dynv6.com +// Submitted by Dominik Menke 2016-01-18 +dynv6.net + +// E4YOU spol. s.r.o. : https://e4you.cz/ +// Submitted by Vladimir Dudr +e4.cz + +// Enonic : http://enonic.com/ +// Submitted by Erik Kaareng-Sunde +enonic.io +customer.enonic.io + +// EU.org https://eu.org/ +// Submitted by Pierre Beyssac +eu.org +al.eu.org +asso.eu.org +at.eu.org +au.eu.org +be.eu.org +bg.eu.org +ca.eu.org +cd.eu.org +ch.eu.org +cn.eu.org +cy.eu.org +cz.eu.org +de.eu.org +dk.eu.org +edu.eu.org +ee.eu.org +es.eu.org +fi.eu.org +fr.eu.org +gr.eu.org +hr.eu.org +hu.eu.org +ie.eu.org +il.eu.org +in.eu.org +int.eu.org +is.eu.org +it.eu.org +jp.eu.org +kr.eu.org +lt.eu.org +lu.eu.org +lv.eu.org +mc.eu.org +me.eu.org +mk.eu.org +mt.eu.org +my.eu.org +net.eu.org +ng.eu.org +nl.eu.org +no.eu.org +nz.eu.org +paris.eu.org +pl.eu.org +pt.eu.org +q-a.eu.org +ro.eu.org +ru.eu.org +se.eu.org +si.eu.org +sk.eu.org +tr.eu.org +uk.eu.org +us.eu.org + +// Evennode : http://www.evennode.com/ +// Submitted by Michal Kralik +eu-1.evennode.com +eu-2.evennode.com +us-1.evennode.com +us-2.evennode.com + +// Facebook, Inc. +// Submitted by Peter Ruibal +apps.fbsbx.com + +// FAITID : https://faitid.org/ +// Submitted by Maxim Alzoba +// https://www.flexireg.net/stat_info +ru.net +adygeya.ru +bashkiria.ru +bir.ru +cbg.ru +com.ru +dagestan.ru +grozny.ru +kalmykia.ru +kustanai.ru +marine.ru +mordovia.ru +msk.ru +mytis.ru +nalchik.ru +nov.ru +pyatigorsk.ru +spb.ru +vladikavkaz.ru +vladimir.ru +abkhazia.su +adygeya.su +aktyubinsk.su +arkhangelsk.su +armenia.su +ashgabad.su +azerbaijan.su +balashov.su +bashkiria.su +bryansk.su +bukhara.su +chimkent.su +dagestan.su +east-kazakhstan.su +exnet.su +georgia.su +grozny.su +ivanovo.su +jambyl.su +kalmykia.su +kaluga.su +karacol.su +karaganda.su +karelia.su +khakassia.su +krasnodar.su +kurgan.su +kustanai.su +lenug.su +mangyshlak.su +mordovia.su +msk.su +murmansk.su +nalchik.su +navoi.su +north-kazakhstan.su +nov.su +obninsk.su +penza.su +pokrovsk.su +sochi.su +spb.su +tashkent.su +termez.su +togliatti.su +troitsk.su +tselinograd.su +tula.su +tuva.su +vladikavkaz.su +vladimir.su +vologda.su + +// Fastly Inc. : http://www.fastly.com/ +// Submitted by Fastly Security +map.fastly.net +a.prod.fastly.net +global.prod.fastly.net +a.ssl.fastly.net +b.ssl.fastly.net +global.ssl.fastly.net +fastlylb.net +map.fastlylb.net + +// Featherhead : https://featherhead.xyz/ +// Submitted by Simon Menke +fhapp.xyz + +// Firebase, Inc. +// Submitted by Chris Raynor +firebaseapp.com + +// Flynn : https://flynn.io +// Submitted by Jonathan Rudenberg +flynnhub.com + +// Freebox : http://www.freebox.fr +// Submitted by Romain Fliedel +freebox-os.com +freeboxos.com +fbx-os.fr +fbxos.fr +freebox-os.fr +freeboxos.fr + +// Fusion Intranet : https://www.fusion-intranet.com +// Submitted by Matthias Burtscher +myfusion.cloud + +// Futureweb OG : http://www.futureweb.at +// Submitted by Andreas Schnederle-Wagner +futurehosting.at +futuremailing.at +*.ex.ortsinfo.at +*.kunden.ortsinfo.at +*.statics.cloud + +// GDS : https://www.gov.uk/service-manual/operations/operating-servicegovuk-subdomains +// Submitted by David Illsley +service.gov.uk + +// GitHub, Inc. +// Submitted by Patrick Toomey +github.io +githubusercontent.com +githubcloud.com +*.api.githubcloud.com +*.ext.githubcloud.com +gist.githubcloud.com +*.githubcloudusercontent.com + +// GitLab, Inc. +// Submitted by Alex Hanselka +gitlab.io + +// UKHomeOffice : https://www.gov.uk/government/organisations/home-office +// Submitted by Jon Shanks +homeoffice.gov.uk + +// GlobeHosting, Inc. +// Submitted by Zoltan Egresi +ro.im +shop.ro + +// GoIP DNS Services : http://www.goip.de +// Submitted by Christian Poulter +goip.de + +// Google, Inc. +// Submitted by Eduardo Vela +*.0emm.com +appspot.com +blogspot.ae +blogspot.al +blogspot.am +blogspot.ba +blogspot.be +blogspot.bg +blogspot.bj +blogspot.ca +blogspot.cf +blogspot.ch +blogspot.cl +blogspot.co.at +blogspot.co.id +blogspot.co.il +blogspot.co.ke +blogspot.co.nz +blogspot.co.uk +blogspot.co.za +blogspot.com +blogspot.com.ar +blogspot.com.au +blogspot.com.br +blogspot.com.by +blogspot.com.co +blogspot.com.cy +blogspot.com.ee +blogspot.com.eg +blogspot.com.es +blogspot.com.mt +blogspot.com.ng +blogspot.com.tr +blogspot.com.uy +blogspot.cv +blogspot.cz +blogspot.de +blogspot.dk +blogspot.fi +blogspot.fr +blogspot.gr +blogspot.hk +blogspot.hr +blogspot.hu +blogspot.ie +blogspot.in +blogspot.is +blogspot.it +blogspot.jp +blogspot.kr +blogspot.li +blogspot.lt +blogspot.lu +blogspot.md +blogspot.mk +blogspot.mr +blogspot.mx +blogspot.my +blogspot.nl +blogspot.no +blogspot.pe +blogspot.pt +blogspot.qa +blogspot.re +blogspot.ro +blogspot.rs +blogspot.ru +blogspot.se +blogspot.sg +blogspot.si +blogspot.sk +blogspot.sn +blogspot.td +blogspot.tw +blogspot.ug +blogspot.vn +cloudfunctions.net +codespot.com +googleapis.com +googlecode.com +pagespeedmobilizer.com +publishproxy.com +withgoogle.com +withyoutube.com + +// Hashbang : https://hashbang.sh +hashbang.sh + +// Hasura : https://hasura.io +// Submitted by Shahidh K Muhammed +hasura-app.io + +// Hepforge : https://www.hepforge.org +// Submitted by David Grellscheid +hepforge.org + +// Heroku : https://www.heroku.com/ +// Submitted by Tom Maher +herokuapp.com +herokussl.com + +// iki.fi +// Submitted by Hannu Aronsson +iki.fi + +// info.at : http://www.info.at/ +biz.at +info.at + +// Interlegis : http://www.interlegis.leg.br +// Submitted by Gabriel Ferreira +ac.leg.br +al.leg.br +am.leg.br +ap.leg.br +ba.leg.br +ce.leg.br +df.leg.br +es.leg.br +go.leg.br +ma.leg.br +mg.leg.br +ms.leg.br +mt.leg.br +pa.leg.br +pb.leg.br +pe.leg.br +pi.leg.br +pr.leg.br +rj.leg.br +rn.leg.br +ro.leg.br +rr.leg.br +rs.leg.br +sc.leg.br +se.leg.br +sp.leg.br +to.leg.br + +// Joyent : https://www.joyent.com/ +// Submitted by Brian Bennett +*.triton.zone +*.cns.joyent.com + +// JS.ORG : http://dns.js.org +// Submitted by Stefan Keim +js.org + +// Keyweb AG : https://www.keyweb.de +// Submitted by Martin Dannehl +keymachine.de + +// KnightPoint Systems, LLC : http://www.knightpoint.com/ +// Submitted by Roy Keene +knightpoint.systems + +// .KRD : http://nic.krd/data/krd/Registration%20Policy.pdf +co.krd +edu.krd + +// Magento Commerce +// Submitted by Damien Tournoud +*.magentosite.cloud + +// Meteor Development Group : https://www.meteor.com/hosting +// Submitted by Pierre Carrier +meteorapp.com +eu.meteorapp.com + +// Michau Enterprises Limited : http://www.co.pl/ +co.pl + +// Microsoft : http://microsoft.com +// Submitted by Barry Dorrans +azurewebsites.net +azure-mobile.net +cloudapp.net + +// Mozilla Foundation : https://mozilla.org/ +// Submitted by glob +bmoattachments.org + +// Neustar Inc. +// Submitted by Trung Tran +4u.com + +// ngrok : https://ngrok.com/ +// Submitted by Alan Shreve +ngrok.io + +// NFSN, Inc. : https://www.NearlyFreeSpeech.NET/ +// Submitted by Jeff Wheelhouse +nfshost.com + +// nsupdate.info : https://www.nsupdate.info/ +// Submitted by Thomas Waldmann +nsupdate.info +nerdpol.ovh + +// No-IP.com : https://noip.com/ +// Submitted by Deven Reza +blogsyte.com +brasilia.me +cable-modem.org +ciscofreak.com +collegefan.org +couchpotatofries.org +damnserver.com +ddns.me +ditchyourip.com +dnsfor.me +dnsiskinky.com +dvrcam.info +dynns.com +eating-organic.net +fantasyleague.cc +geekgalaxy.com +golffan.us +health-carereform.com +homesecuritymac.com +homesecuritypc.com +hopto.me +ilovecollege.info +loginto.me +mlbfan.org +mmafan.biz +myactivedirectory.com +mydissent.net +myeffect.net +mymediapc.net +mypsx.net +mysecuritycamera.com +mysecuritycamera.net +mysecuritycamera.org +net-freaks.com +nflfan.org +nhlfan.net +no-ip.ca +no-ip.co.uk +no-ip.net +noip.us +onthewifi.com +pgafan.net +point2this.com +pointto.us +privatizehealthinsurance.net +quicksytes.com +read-books.org +securitytactics.com +serveexchange.com +servehumour.com +servep2p.com +servesarcasm.com +stufftoread.com +ufcfan.org +unusualperson.com +workisboring.com +3utilities.com +bounceme.net +ddns.net +ddnsking.com +gotdns.ch +hopto.org +myftp.biz +myftp.org +myvnc.com +no-ip.biz +no-ip.info +no-ip.org +noip.me +redirectme.net +servebeer.com +serveblog.net +servecounterstrike.com +serveftp.com +servegame.com +servehalflife.com +servehttp.com +serveirc.com +serveminecraft.net +servemp3.com +servepics.com +servequake.com +sytes.net +webhop.me +zapto.org + +// NYC.mn : http://www.information.nyc.mn +// Submitted by Matthew Brown +nyc.mn + +// One Fold Media : http://www.onefoldmedia.com/ +// Submitted by Eddie Jones +nid.io + +// OpenCraft GmbH : http://opencraft.com/ +// Submitted by Sven Marnach +opencraft.hosting + +// Opera Software, A.S.A. +// Submitted by Yngve Pettersen +operaunite.com + +// OutSystems +// Submitted by Duarte Santos +outsystemscloud.com + +// OwnProvider : http://www.ownprovider.com +// Submitted by Jan Moennich +ownprovider.com + +// oy.lc +// Submitted by Charly Coste +oy.lc + +// Pagefog : https://pagefog.com/ +// Submitted by Derek Myers +pgfog.com + +// Pagefront : https://www.pagefronthq.com/ +// Submitted by Jason Kriss +pagefrontapp.com + +// .pl domains (grandfathered) +art.pl +gliwice.pl +krakow.pl +poznan.pl +wroc.pl +zakopane.pl + +// Pantheon Systems, Inc. : https://pantheon.io/ +// Submitted by Gary Dylina +pantheonsite.io +gotpantheon.com + +// Peplink | Pepwave : http://peplink.com/ +// Submitted by Steve Leung +mypep.link + +// Planet-Work : https://www.planet-work.com/ +// Submitted by Frédéric VANNIÈRE +on-web.fr + +// prgmr.com : https://prgmr.com/ +// Submitted by Sarah Newman +xen.prgmr.com + +// priv.at : http://www.nic.priv.at/ +// Submitted by registry +priv.at + +// Protonet GmbH : http://protonet.io +// Submitted by Martin Meier +protonet.io + +// Publication Presse Communication SARL : https://ppcom.fr +// Submitted by Yaacov Akiba Slama +chirurgiens-dentistes-en-france.fr + +// QA2 +// Submitted by Daniel Dent (https://www.danieldent.com/) +qa2.com + +// QNAP System Inc : https://www.qnap.com +// Submitted by Nick Chang +dev-myqnapcloud.com +alpha-myqnapcloud.com +myqnapcloud.com + +// Rackmaze LLC : https://www.rackmaze.com +// Submitted by Kirill Pertsev +rackmaze.com +rackmaze.net + +// Red Hat, Inc. OpenShift : https://openshift.redhat.com/ +// Submitted by Tim Kramer +rhcloud.com + +// RethinkDB : https://www.rethinkdb.com/ +// Submitted by Chris Kastorff +hzc.io + +// Revitalised Limited : http://www.revitalised.co.uk +// Submitted by Jack Price +wellbeingzone.eu +ptplus.fit +wellbeingzone.co.uk + +// Sandstorm Development Group, Inc. : https://sandcats.io/ +// Submitted by Asheesh Laroia +sandcats.io + +// SBE network solutions GmbH : https://www.sbe.de/ +// Submitted by Norman Meilick +logoip.de +logoip.com + +// Securepoint GmbH : https://www.securepoint.de +// Submitted by Erik Anders +firewall-gateway.com +firewall-gateway.de +my-gateway.de +my-router.de +spdns.de +spdns.eu +firewall-gateway.net +my-firewall.org +myfirewall.org +spdns.org + +// Service Online LLC : http://drs.ua/ +// Submitted by Serhii Bulakh +biz.ua +co.ua +pp.ua + +// ShiftEdit : https://shiftedit.net/ +// Submitted by Adam Jimenez +shiftedit.io + +// Shopblocks : http://www.shopblocks.com/ +// Submitted by Alex Bowers +myshopblocks.com + +// SinaAppEngine : http://sae.sina.com.cn/ +// Submitted by SinaAppEngine +1kapp.com +appchizi.com +applinzi.com +sinaapp.com +vipsinaapp.com + +// Skyhat : http://www.skyhat.io +// Submitted by Shante Adam +bounty-full.com +alpha.bounty-full.com +beta.bounty-full.com + +// staticland : https://static.land +// Submitted by Seth Vincent +static.land +dev.static.land +sites.static.land + +// SourceLair PC : https://www.sourcelair.com +// Submitted by Antonis Kalipetis +apps.lair.io +*.stolos.io + +// SpaceKit : https://www.spacekit.io/ +// Submitted by Reza Akhavan +spacekit.io + +// Stackspace : https://www.stackspace.io/ +// Submitted by Lina He +stackspace.space + +// Synology, Inc. : https://www.synology.com/ +// Submitted by Rony Weng +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 + +// TAIFUN Software AG : http://taifun-software.de +// Submitted by Bjoern Henke +taifun-dns.de + +// TASK geographical domains (www.task.gda.pl/uslugi/dns) +gda.pl +gdansk.pl +gdynia.pl +med.pl +sopot.pl + +// TownNews.com : http://www.townnews.com +// Submitted by Dustin Ward +bloxcms.com +townnews-staging.com + +// TransIP : htts://www.transip.nl +// Submitted by Rory Breuk +*.transurl.be +*.transurl.eu +*.transurl.nl + +// TuxFamily : http://tuxfamily.org +// Submitted by TuxFamily administrators +tuxfamily.org + +// TwoDNS : https://www.twodns.de/ +// Submitted by TwoDNS-Support +dd-dns.de +diskstation.eu +diskstation.org +dray-dns.de +draydns.de +dyn-vpn.de +dynvpn.de +mein-vigor.de +my-vigor.de +my-wan.de +syno-ds.de +synology-diskstation.de +synology-ds.de + +// UDR Limited : http://www.udr.hk.com +// Submitted by registry +hk.com +hk.org +ltd.hk +inc.hk + +// .US +// Submitted by Ed Moore +lib.de.us + +// Viprinet Europe GmbH : http://www.viprinet.com +// Submitted by Simon Kissel +router.management + +// Western Digital Technologies, Inc : https://www.wdc.com +// Submitted by Jung Jin +remotewd.com + +// Wikimedia Labs : https://wikitech.wikimedia.org +// Submitted by Yuvi Panda +wmflabs.org + +// Yola : https://www.yola.com/ +// Submitted by Stefano Rivera +yolasite.com + +// Yombo : https://yombo.net +// Submitted by Mitch Schwenk +ybo.faith +yombo.me +homelink.one +ybo.party +ybo.review +ybo.science +ybo.trade + +// ZaNiC : http://www.za.net/ +// Submitted by registry +za.net +za.org + +// Zeit, Inc. : https://zeit.domains/ +// Submitted by Olli Vanhoja +now.sh + +// 1GB LLC : https://www.1gb.ua/ +// Submitted by 1GB LLC +cc.ua +inf.ua +ltd.ua + +// ===END PRIVATE DOMAINS=== diff --git a/net/ddns-scripts/files/services b/net/ddns-scripts/files/services index fd70b07..78b3456 100644 --- a/net/ddns-scripts/files/services +++ b/net/ddns-scripts/files/services @@ -42,7 +42,7 @@ "able.or.kr" "http://able.or.kr/ddns/src/update.php?hostname=[DOMAIN]&myip=[IP]&ddnsuser=[USERNAME]&pwd=[PASSWORD]" -"afraid.org-basicauth" "http://[USERNAME]:[PASSWORD]@freedns.afraid.org/nic/update?hostname=[DOMAIN]&myip=[IP] +"afraid.org-basicauth" "http://[USERNAME]:[PASSWORD]@freedns.afraid.org/nic/update?hostname=[DOMAIN]&myip=[IP]" "afraid.org-keyauth" "http://freedns.afraid.org/dynamic/update.php?[PASSWORD]&address=[IP]" "all-inkl.com" "http://[USERNAME]:[PASSWORD]@dyndns.kasserver.com/?myip=[IP]" @@ -84,7 +84,7 @@ "duckdns.org" "http://www.duckdns.org/update?domains=[USERNAME]&token=[PASSWORD]&ip=[IP]" "OK" -"duiadns.net" "http://[USERNAME]:[PASSWORD]@ipv4.duia.ro/dynamic.duia?host=[DOMAIN]&ip4=[IP]" +"duiadns.net" "http://ip.duiadns.net/dynamic.duia?host=[DOMAIN]&password=[PASSWORD]&ip4=[IP]" "dy.fi" "http://[USERNAME]:[PASSWORD]@www.dy.fi/nic/update?hostname=[DOMAIN]" "good|nochg" diff --git a/net/ddns-scripts/files/services_ipv6 b/net/ddns-scripts/files/services_ipv6 index f2409d6..5b2cc23 100644 --- a/net/ddns-scripts/files/services_ipv6 +++ b/net/ddns-scripts/files/services_ipv6 @@ -38,7 +38,7 @@ #.godaddy.com-v1 !!! Please install additional package "ddns-scripts_godaddy.com-v1" #.no-ip.com / noip.com !!! Please install additional package "ddns-scripts_no-ip_com" -"afraid.org-basicauth" "http://[USERNAME]:[PASSWORD]@freedns.afraid.org/nic/update?hostname=[DOMAIN]&myip=[IP] +"afraid.org-basicauth" "http://[USERNAME]:[PASSWORD]@freedns.afraid.org/nic/update?hostname=[DOMAIN]&myip=[IP]" "afraid.org-keyauth" "http://freedns.afraid.org/dynamic/update.php?[PASSWORD]&address=[IP]" "all-inkl.com" "http://[USERNAME]:[PASSWORD]@dyndns.kasserver.com/?myip=[IP]" @@ -58,7 +58,7 @@ "duckdns.org" "http://www.duckdns.org/update?domains=[DOMAIN]&token=[PASSWORD]&ipv6=[IP]" "OK" -"duiadns.net" "http://[USERNAME]:[PASSWORD]@ipv6.duia.ro/dynamic.duia?host=[DOMAIN]&ip6=[IP]" +"duiadns.net" "http://ip.duiadns.net/dynamic.duia?host=[DOMAIN]&password=[PASSWORD]&ip6=[IP]" "dyn.com" "http://[USERNAME]:[PASSWORD]@members.dyndns.org/nic/update?hostname=[DOMAIN]&myip=[IP]" "good|nochg" "dyndns.org" "http://[USERNAME]:[PASSWORD]@members.dyndns.org/nic/update?hostname=[DOMAIN]&myip=[IP]" "good|nochg" diff --git a/net/ddns-scripts/files/update_cloudflare_com_v1.sh b/net/ddns-scripts/files/update_cloudflare_com_v1.sh index 6e89723..9fa9431 100755 --- a/net/ddns-scripts/files/update_cloudflare_com_v1.sh +++ b/net/ddns-scripts/files/update_cloudflare_com_v1.sh @@ -2,7 +2,7 @@ #.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 +#.2014-2017 Christian Schoenebeck # many thanks to Paul for testing and feedback during development # # This script is parsed by dynamic_dns_functions.sh inside send_update() function @@ -19,15 +19,26 @@ [ -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" +local __RECID __URL __KEY __KEYS __FOUND __SUBDOM __DOMAIN __FQDN + +# split __SUBDOM __DOMAIN from $domain +# given data: +# @example.com for "domain record" +# host.sub@example.com for a "host record" +__SUBDOM=$(printf %s "$domain" | cut -d@ -f1) +__DOMAIN=$(printf %s "$domain" | cut -d@ -f2) + +# Cloudflare v1 needs: +# __DOMAIN = the base domain i.e. example.com +# __SUBDOM = the host.sub to change if a "host record" or blank if domain record +# __FQDN = the FQDN to detect record_id to change +# i.e. example.com for the "domain record" or host.sub.example.com for "host record" +if [ -z "$__SUBDOM" -o "$__SUBDOM" = "$__DOMAIN" ]; then + __SUBDOM="" + __FQDN="$__DOMAIN" +else + __FQDN="${__SUBDOM}.${__DOMAIN}" +fi # parse OpenWrt script with # functions for parsing and generating json @@ -90,7 +101,7 @@ cleanup() { # json_get_var __DISPLAY "display_name" # for debugging json_get_var __NAME "name" json_get_var __TYPE "type" - if [ "$__NAME" = "$domain" ]; then + if [ "$__NAME" = "$__FQDN" ]; 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 @@ -106,7 +117,7 @@ cleanup() { } 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'" + write_log 7 "rec_id '$__RECID' detected for host/domain '$__FQDN'" } # build url according to cloudflare client api at https://www.cloudflare.com/docs/client-api.html diff --git a/net/ddns-scripts/files/update_cloudflare_com_v4.sh b/net/ddns-scripts/files/update_cloudflare_com_v4.sh index 621203c..aef3b73 100755 --- a/net/ddns-scripts/files/update_cloudflare_com_v4.sh +++ b/net/ddns-scripts/files/update_cloudflare_com_v4.sh @@ -5,7 +5,7 @@ # script for sending updates to cloudflare.com #.based on Ben Kulbertis cloudflare-update-record.sh found at http://gist.github.com/benkulbertis #.and on George Johnson's cf-ddns.sh found at https://github.com/gstuartj/cf-ddns.sh -#.2016 Christian Schoenebeck +#.2016-2017 Christian Schoenebeck # CloudFlare API documentation at https://api.cloudflare.com/ # # This script is parsed by dynamic_dns_functions.sh inside send_update() function @@ -29,11 +29,21 @@ local __HOST __DOMAIN __TYPE __URLBASE __PRGBASE __RUNPROG __DATA __IPV6 __ZONEI local __URLBASE="https://api.cloudflare.com/client/v4" # split __HOST __DOMAIN from $domain +# given data: +# @example.com for "domain record" +# host.sub@example.com for a "host record" __HOST=$(printf %s "$domain" | cut -d@ -f1) __DOMAIN=$(printf %s "$domain" | cut -d@ -f2) -# __HOST != __DOMAIN then host@domain.tld => host.domain.tld -[ "$__HOST" = "$__DOMAIN" ] || __HOST=$(printf %s "$domain" | tr "@" ".") +# Cloudflare v4 needs: +# __DOMAIN = the base domain i.e. example.com +# __HOST = the FQDN of record to modify +# i.e. example.com for the "domain record" or host.sub.example.com for "host record" + +# handling domain record then set __HOST = __DOMAIN +[ -z "$__HOST" ] && __HOST=$__DOMAIN +# handling host record then rebuild fqdn host@domain.tld => host.domain.tld +[ "$__HOST" != "$__DOMAIN" ] && __HOST="${__HOST}.${__DOMAIN}" # set record type [ $use_ipv6 -eq 0 ] && __TYPE="A" || __TYPE="AAAA" @@ -118,23 +128,23 @@ __PRGBASE="$__PRGBASE --header 'Content-Type: application/json' " # __PRGBASE="$__PRGBASE --header 'Accept: application/json' " # read zone id for registered domain.TLD -__RUNPROG="$__PRGBASE --request GET $__URLBASE/zones?name=$__DOMAIN" +__RUNPROG="$__PRGBASE --request GET '$__URLBASE/zones?name=$__DOMAIN'" cloudflare_transfer || return 1 # extract zone id __ZONEID=$(grep -o '"id":"[^"]*' $DATFILE | grep -o '[^"]*$' | head -1) [ -z "$__ZONEID" ] && { write_log 4 "Could not detect 'zone id' for domain.tld: '$__DOMAIN'" - return 1 + return 127 } # read record id for A or AAAA record of host.domain.TLD -__RUNPROG="$__PRGBASE --request GET $__URLBASE/zones/$__ZONEID/dns_records?name=$__HOST&type=$__TYPE" +__RUNPROG="$__PRGBASE --request GET '$__URLBASE/zones/$__ZONEID/dns_records?name=$__HOST&type=$__TYPE'" cloudflare_transfer || return 1 # extract record id __RECID=$(grep -o '"id":"[^"]*' $DATFILE | grep -o '[^"]*$' | head -1) [ -z "$__RECID" ] && { write_log 4 "Could not detect 'record id' for host.domain.tld: '$__HOST'" - return 1 + return 127 } # extract current stored IP @@ -153,12 +163,12 @@ __DATA=$(grep -o '"content":"[^"]*' $DATFILE | grep -o '[^"]*$' | head -1) expand_ipv6 $__DATA __DATA [ "$__DATA" = "$__IPV6" ] && { # IPv6 no update needed write_log 7 "IPv6 at CloudFlare.com already up to date" - return 127 + return 0 } else [ "$__DATA" = "$__IP" ] && { # IPv4 no update needed write_log 7 "IPv4 at CloudFlare.com already up to date" - return 127 + return 0 } fi } @@ -171,7 +181,7 @@ cat > $DATFILE << EOF EOF # let's complete transfer command -__RUNPROG="$__PRGBASE --request PUT --data @$DATFILE $__URLBASE/zones/$__ZONEID/dns_records/$__RECID" +__RUNPROG="$__PRGBASE --request PUT --data @$DATFILE '$__URLBASE/zones/$__ZONEID/dns_records/$__RECID'" cloudflare_transfer || return 1 return 0 diff --git a/net/ddns-scripts/files/update_godaddy_com_v1.sh b/net/ddns-scripts/files/update_godaddy_com_v1.sh index 45fc0cc..9633b4e 100755 --- a/net/ddns-scripts/files/update_godaddy_com_v1.sh +++ b/net/ddns-scripts/files/update_godaddy_com_v1.sh @@ -4,7 +4,7 @@ # # script for sending updates to godaddy.com #.based on GoDaddy.sh v1.0 by Nazar78 @ TeaNazaR.com -#.2016 Christian Schoenebeck +#.2017 Christian Schoenebeck # GoDaddy Documentation at https://developer.godaddy.com/doc # # This script is parsed by dynamic_dns_functions.sh inside send_update() function @@ -27,9 +27,17 @@ local __HOST __DOMAIN __TYPE __URL __PRGBASE __RUNPROG __DATA __IPV6 # split __HOST __DOMAIN from $domain +# given data: +# @example.com for "domain record" +# host.sub@example.com for a "host record" __HOST=$(printf %s "$domain" | cut -d@ -f1) __DOMAIN=$(printf %s "$domain" | cut -d@ -f2) -[ -z "$__HOST" -o "$__HOST" = "$__DOMAIN" ] && __HOST="%40" # no expizit host given so set to default "@" => urlencode "%40" + +# GoDaddy needs: +# __DOMAIN = the base domain i.e. example.com +# __HOST = host.sub if updating a host record or +# __HOST = "@" urlencoded "%40" for a domain record +[ -z "$__HOST" -o "$__HOST" = "$__DOMAIN" ] && __HOST="%40" # set record type [ $use_ipv6 -eq 0 ] && __TYPE="A" || __TYPE="AAAA" @@ -136,12 +144,12 @@ __DATA=$(sed -r 's/.+data":"(.+)","t.+/\1/g' $DATFILE) expand_ipv6 $__DATA __DATA [ "$__DATA" = "$__IPV6" ] && { # IPv6 no update needed write_log 7 "IPv6 at GoDaddy.com already up to date" - return 127 + return 0 } else [ "$__DATA" = "$__IP" ] && { # IPv4 no update needed write_log 7 "IPv4 at GoDaddy.com already up to date" - return 127 + return 0 } fi } diff --git a/net/dnscrypt-proxy/Makefile b/net/dnscrypt-proxy/Makefile index ee6c52b..c4b36f1 100644 --- a/net/dnscrypt-proxy/Makefile +++ b/net/dnscrypt-proxy/Makefile @@ -10,13 +10,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=dnscrypt-proxy -PKG_VERSION:=1.7.0 +PKG_VERSION:=1.9.4 PKG_RELEASE:=1 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=http://download.dnscrypt.org/dnscrypt-proxy -PKG_MD5SUM:=95df7262964dc22da62f7f6f0466c50e - +PKG_MD5SUM:=fdf4a708e7922e13b14555f315ca8d5361aec89b0595b06fdbbcaacfa4e6f11e PKG_FIXUP:=autoreconf PKG_INSTALL:=1 diff --git a/net/dnscrypt-proxy/files/dnscrypt-proxy.config b/net/dnscrypt-proxy/files/dnscrypt-proxy.config index 2c281ee..117e849 100644 --- a/net/dnscrypt-proxy/files/dnscrypt-proxy.config +++ b/net/dnscrypt-proxy/files/dnscrypt-proxy.config @@ -6,7 +6,17 @@ config dnscrypt-proxy ns1 # ephemeral keys option requires extra CPU cycles and can cause huge system load # option ephemeral_keys '0' # more details at https://github.com/jedisct1/dnscrypt-proxy#public-key-client-authentication - # option client_key '' + # option client_key '/path/to/client_key' + # option syslog '1' + # option syslog_prefix 'dnscrypt-proxy' + # option query_log_file '/path/to/logfile' + # enable cache may speed up dnscrypt-proxy, see https://github.com/jedisct1/dnscrypt-proxy/wiki/Go-faster + # option local_cache '0' + # disable IPv6 may also speed up dnscrypt-proxy, see https://github.com/jedisct1/dnscrypt-proxy/wiki/Go-faster + # option block_ipv6 '0' + # Blacklists allow you to block domains, ip, ... see https://github.com/jedisct1/dnscrypt-proxy/wiki/Filtering + # list blacklist 'domains:/path/to/domains-blacklist-file.txt' + # list blacklist 'domains:/path/to/domains-blacklist2-file.txt' # config dnscrypt-proxy ns2 # option address '127.0.0.1' diff --git a/net/dnscrypt-proxy/files/dnscrypt-proxy.init b/net/dnscrypt-proxy/files/dnscrypt-proxy.init index cc06ca6..ac7109a 100644 --- a/net/dnscrypt-proxy/files/dnscrypt-proxy.init +++ b/net/dnscrypt-proxy/files/dnscrypt-proxy.init @@ -3,32 +3,114 @@ START=50 USE_PROCD=1 PROG=/usr/sbin/dnscrypt-proxy +CONFIG_DIR=/var/etc +USER=nobody -dnscrypt_instance() { - local address port resolver resolvers_list ephemeral_keys client_key +dnscrypt_instance() { + local config_path="$CONFIG_DIR/dnscrypt-proxy-$1.conf" + create_config_file $1 "$config_path" - config_get address $1 'address' - config_get port $1 'port' - config_get resolver $1 'resolver' '' - config_get resolvers_list $1 'resolvers_list' '/usr/share/dnscrypt-proxy/dnscrypt-resolvers.csv' - config_get_bool ephemeral_keys $1 'ephemeral_keys' '0' - config_get client_key $1 'client_key' '' + procd_open_instance + procd_set_param command $PROG "$config_path" + procd_close_instance +} + +create_config_file() { + local address port resolver resolvers_list ephemeral_keys client_key syslog syslog_prefix local_cache query_log_file block_ipv6 + local config_path="$2" + + [ ! -d "$CONFIG_DIR" ] && mkdir -p "$CONFIG_DIR" + [ -f "$config_path" ] && rm "$config_path" + + config_get address $1 'address' '127.0.0.1' + config_get port $1 'port' '5353' + config_get resolver $1 'resolver' '' + config_get resolvers_list $1 'resolvers_list' '/usr/share/dnscrypt-proxy/dnscrypt-resolvers.csv' + config_get client_key $1 'client_key' '' + config_get syslog_prefix $1 'syslog_prefix' 'dnscrypt-proxy' + config_get query_log_file $1 'query_log_file' '' + config_get_bool syslog $1 'syslog' '1' + config_get_bool ephemeral_keys $1 'ephemeral_keys' '0' + config_get_bool local_cache $1 'local_cache' '0' + config_get_bool block_ipv6 $1 'block_ipv6' '0' + + append_param_not_empty "ResolverName" "$resolver" $config_path + append_param "ResolversList" "$resolvers_list" $config_path + append_param "User" "$USER" $config_path + append_param "LocalAddress" "$address:$port" $config_path + append_param_not_empty "ClientKey" "$client_key" $config_path + append_on_off "EphemeralKeys" $ephemeral_keys $config_path + append_on_off "Syslog" $syslog $config_path + append_param "SyslogPrefix" "$syslog_prefix" $config_path + append_on_off "LocalCache" $local_cache $config_path + append_param_not_empty "QueryLogFile" "$query_log_file" $config_path + append_yes_no "BlockIPv6" $block_ipv6 $config_path + + config_list_foreach $1 'blacklist' append_blacklists $config_path +} + +append_on_off() { + local param_name=$1 + local param_value=$2 + local config_path=$3 + local value + + if [ $param_value -eq 1 ] + then + value="on" + else + value="off" + fi + + echo "$param_name $value" >> $config_path +} + +append_yes_no() { + local param_name=$1 + local param_value=$2 + local config_path=$3 + local value + + if [ $param_value -eq 1 ] + then + value="yes" + else + value="no" + fi + + echo "$param_name $value" >> $config_path +} + +append_param() { + local param_name=$1 + local param_value=$2 + local config_path=$3 + + echo "$param_name $param_value" >> $config_path +} + +append_param_not_empty() { + local param_name=$1 + local param_value=$2 + local config_path=$3 + + if [ ! -z "$param_value" -a "$param_value" != " " ] + then + append_param "$param_name" "$param_value" "$config_path" + fi +} - procd_open_instance - procd_set_param command $PROG -u nobody -S - procd_append_param command -a "$address:$port" - procd_append_param command -L $resolvers_list - [ -n "$resolver" ] && procd_append_param command -R $resolver - [ $ephemeral_keys -eq 1 ] && procd_append_param command -E - [ -n "$client_key" ] && procd_append_param command -K $client_key - procd_close_instance +append_blacklists() { + local value="$1" + local config_path="$2" + append_param_not_empty "BlackList" "$value" $config_path } start_service() { - config_load dnscrypt-proxy - config_foreach dnscrypt_instance dnscrypt-proxy + config_load dnscrypt-proxy + config_foreach dnscrypt_instance dnscrypt-proxy } service_triggers() { - procd_add_reload_trigger 'dnscrypt-proxy' + procd_add_reload_trigger 'dnscrypt-proxy' } diff --git a/net/dynapoint/Makefile b/net/dynapoint/Makefile new file mode 100644 index 0000000..ca32cd1 --- /dev/null +++ b/net/dynapoint/Makefile @@ -0,0 +1,47 @@ +# +# Copyright (C) 2016 Tobias Ilte +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=dynapoint +PKG_RELEASE:=1 + +PKG_MAINTAINER:=Tobias Ilte +PKG_LICENSE:=GPL-3.0+ + +include $(INCLUDE_DIR)/package.mk + +define Package/$(PKG_NAME) + SECTION:=net + CATEGORY:=Network + SUBMENU:=wireless + DEPENDS:=+lua +libubus-lua +libuci-lua +libubox-lua +luci-lib-nixio + TITLE:=Dynamic access point manager +endef + +define Package/$(PKG_NAME)/description + Dynapoint uses LUA scripts to allow dynamic access point creation + and deletion depending on changes of certain network conditions. +endef + +define Package/$(PKG_NAME)/conffiles +/etc/config/dynapoint +endef + +define Build/Compile +endef + +define Package/$(PKG_NAME)/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) ./src/dynapoint.lua $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./src/dynapoint.init $(1)/etc/init.d/dynapoint + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_DATA) ./src/dynapoint.config $(1)/etc/config/dynapoint +endef + +$(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/net/dynapoint/src/dynapoint.config b/net/dynapoint/src/dynapoint.config new file mode 100644 index 0000000..0578cf0 --- /dev/null +++ b/net/dynapoint/src/dynapoint.config @@ -0,0 +1,9 @@ +config rule 'internet' + list hosts 'http://www.example.com' + list hosts 'http://www.google.com' + option interval '60' + option timeout '5' + option offline_threshold '3' + option add_hostname_to_ssid '0' + option use_curl '0' + option curl_interface 'eth0' diff --git a/net/dynapoint/src/dynapoint.init b/net/dynapoint/src/dynapoint.init new file mode 100644 index 0000000..ff105d3 --- /dev/null +++ b/net/dynapoint/src/dynapoint.init @@ -0,0 +1,15 @@ +#!/bin/sh /etc/rc.common + +START=99 + +USE_PROCD=1 +PROG=/usr/sbin/dynapoint.lua +CONFFILE=/etc/config/dynapoint + +start_service() { + procd_open_instance + procd_set_param command $PROG + procd_set_param file $CONFFILE + procd_set_param respawn + procd_close_instance +} diff --git a/net/dynapoint/src/dynapoint.lua b/net/dynapoint/src/dynapoint.lua new file mode 100644 index 0000000..4d2e456 --- /dev/null +++ b/net/dynapoint/src/dynapoint.lua @@ -0,0 +1,203 @@ +#!/usr/bin/lua + +--[[ + +Copyright (C) 2016 Tobias Ilte + +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. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . + +--]] + + +require "uci" +require "ubus" +require "uloop" +log = require "nixio" + +--open sys-logging +log.openlog("DynaPoint", "ndelay", "cons", "nowait"); + +local uci_cursor = uci.cursor() + +-- get all config sections with the given type +function getConfType(conf_file,type) + local ifce={} + uci_cursor:foreach(conf_file,type,function(s) ifce[s[".index"]]=s end) + return ifce +end + +ubus = ubus.connect() +if not ubus then + error("Failed to connect to ubusd") +end +ubus:call("network", "reload", {}) + +local interval = uci_cursor:get("dynapoint", "internet", "interval") +local timeout = uci_cursor:get("dynapoint", "internet", "timeout") +local offline_threshold = tonumber(uci_cursor:get("dynapoint", "internet", "offline_threshold")) +local hosts = uci_cursor:get("dynapoint", "internet", "hosts") +local numhosts = #hosts +local curl = tonumber(uci_cursor:get("dynapoint", "internet", "use_curl")) +if (curl == 1) then + curl_interface = uci_cursor:get("dynapoint", "internet", "curl_interface") +end +if (tonumber(uci_cursor:get("dynapoint", "internet", "add_hostname_to_ssid")) == 1 ) then + localhostname = uci_cursor:get("system", "system", "hostname") +end + +local table_names_rule = {} +local table_names_not_rule = {} +local ssids_with_hostname = {} +local ssids_not_rule = {} + +function get_dynapoint_sections(t) + for pos,val in pairs(t) do + if (type(val)=="table") then + get_dynapoint_sections(val); + elseif (type(val)=="string") then + if (pos == "dynapoint_rule") then + if (val == "internet") then + table_names_rule[#table_names_rule+1] = t[".name"] + elseif (val == "!internet") then + table_names_not_rule[#table_names_not_rule+1] = t[".name"] + if (localhostname) then + ssids_not_rule[#ssids_not_rule+1] = t[".ssid"] + ssids_with_hostname[#ssids_with_hostname+1] = t[".ssid"].."_"..localhostname + end + end + end + end + end +end + + +--print(table.getn(hosts)) + +get_dynapoint_sections(getConfType("wireless","wifi-iface")) + +-- revert all non-persistent ssid uci-changes regarding sections affecting dynapoint +for i = 1, #table_names_not_rule do + uci_cursor:revert("wireless", table_names_not_rule[i], "ssid") +end + + +local online = true + +if (#table_names_rule > 0) then + if (tonumber(uci_cursor:get("wireless", table_names_rule[1], "disabled")) == 1) then + online = false + end +else + log.syslog("info","Not properly configured. Please add