Merge pull request #3634 from p-wassi/libexpat_220
authorTed Hess <thess@kitschensync.net>
Fri, 16 Dec 2016 23:19:32 +0000 (18:19 -0500)
committerGitHub <noreply@github.com>
Fri, 16 Dec 2016 23:19:32 +0000 (18:19 -0500)
libs/expat: update to 2.2.0

45 files changed:
lang/python/Makefile
lang/python3/Makefile
lang/python3/files/python3-package.mk
lang/python3/files/python3-version.mk [new file with mode: 0644]
libs/dtc/Makefile [new file with mode: 0644]
libs/libuecc/Makefile
libs/libx264/Makefile
libs/opus/Makefile
mail/emailrelay/Makefile
net/chrony/Makefile
net/ddns-scripts/Makefile
net/ddns-scripts/files/dynamic_dns_functions.sh
net/ddns-scripts/files/services
net/ethtool/Makefile
net/fastd/Makefile
net/jool/Makefile [new file with mode: 0644]
net/lftp/Makefile
net/ocserv/Makefile
net/opentracker/Makefile
net/reaver/Makefile
net/reaver/patches/0101-pcap-use-65536-as-snaplen.patch [new file with mode: 0644]
net/softethervpn/Makefile [new file with mode: 0644]
net/softethervpn/files/dummy [new file with mode: 0644]
net/softethervpn/files/launcher.sh [new file with mode: 0755]
net/softethervpn/files/vpnbridge.init [new file with mode: 0644]
net/softethervpn/files/vpnclient.init [new file with mode: 0644]
net/softethervpn/files/vpnserver.init [new file with mode: 0644]
net/softethervpn/patches/103-noeucjp.patch [new file with mode: 0644]
net/softethervpn/patches/105-nosslv3.patch [new file with mode: 0644]
net/unbound/Makefile
net/unbound/files/README.md
net/unbound/files/unbound.sh
net/unbound/files/unbound.uci
utils/ecdsautils/Makefile [new file with mode: 0644]
utils/qemu/Makefile
utils/qemu/files/00-virtio-ports.hotplug [new file with mode: 0755]
utils/qemu/files/10-qemu-ga.hotplug [new file with mode: 0755]
utils/qemu/files/bridge.conf [new file with mode: 0644]
utils/qemu/files/virtio-ports.hotplug [deleted file]
utils/qemu/patches/0001-allow-disable-fortify-source.patch [new file with mode: 0644]
utils/qemu/patches/0002-setting-language-type-for-_asm-files.patch [new file with mode: 0644]
utils/qemu/patches/0003-disable-avx2_opt-with-musl.patch [new file with mode: 0644]
utils/qemu/patches/0004-pixman-fix-detection-of-mips-dspr2.patch [new file with mode: 0644]
utils/qemu/patches/0005-pixman-arm-neon-assembler-fix.patch [new file with mode: 0644]
utils/qemu/patches/0006-libvixl-cxx-macro-isnan.patch [new file with mode: 0644]

index 3eb4e9dad091457e4f386bc1cc78fb9934fc9d97..4b677423c2396773b5e0796d546b210341024099 100644 (file)
@@ -10,12 +10,6 @@ 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
@@ -27,6 +21,12 @@ PKG_MD5SUM:=57dffcee9cee8bb2ab5f82af1d8e9a69
 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
index 2e0f872a09474dbcf72764a0c6e0b5d89ec4049b..6394211e2659abfbb6a51c86997c80d49c637c6c 100644 (file)
@@ -8,7 +8,7 @@
 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)
@@ -24,6 +24,8 @@ PKG_MD5SUM:=8906efbacfcdc7c3c9198aeefafd159e
 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
 
+include ./files/python3-package.mk
+
 PKG_INSTALL:=1
 PKG_BUILD_PARALLEL:=1
 HOST_BUILD_PARALLEL:=1
@@ -141,7 +143,10 @@ 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-version.mk \
+               $(STAGING_DIR)/mk/
        $(CP) \
                $(PKG_INSTALL_DIR)/usr/include/python$(PYTHON_VERSION) \
                $(1)/usr/include/
index 60feaf195f3e2a229c689358b99141f6ab043e70..56dbedc9c316fd723a39630670e226c0d692b5a8 100644 (file)
@@ -11,11 +11,7 @@ ifeq ($(STAGING_DIR_HOSTPKG),)
   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
diff --git a/lang/python3/files/python3-version.mk b/lang/python3/files/python3-version.mk
new file mode 100644 (file)
index 0000000..ce3b6b7
--- /dev/null
@@ -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:=5
+PYTHON3_VERSION_MICRO:=2
+
+PYTHON3_VERSION:=$(PYTHON3_VERSION_MAJOR).$(PYTHON3_VERSION_MINOR)
+
diff --git a/libs/dtc/Makefile b/libs/dtc/Makefile
new file mode 100644 (file)
index 0000000..c3367e5
--- /dev/null
@@ -0,0 +1,71 @@
+#
+# Copyright (C) 2016 Yousong Zhou <yszhou4tech@gmail.com>
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=dtc
+PKG_VERSION:=1.4.2
+PKG_RELEASE:=1
+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 <yszhou4tech@gmail.com>
+
+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
+
+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))
index c1ba53f854b5f0e29728f0a4d2e8f682ff8357a3..81110624212291d86631a7b56232208459b004da 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libuecc
 PKG_VERSION:=7
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_MAINTAINER:=Matthias Schiffer <mschiffer@universe-factory.net>
 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
index 000a4d68349abd55267402fea77057958704678d..dbb7543b8d39983d07beb21f4b6fa4e466fe30f3 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=x264
 PKG_VERSION:=snapshot-20160815-2245-stable
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://download.videolan.org/x264/snapshots/
@@ -28,8 +28,14 @@ TARGET_CFLAGS+=-std=gnu99 -fPIC -O3 -ffast-math -I.
 MAKE_FLAGS+= LD="$(TARGET_CC) -o" 
 
 # ARM ASM depends on ARM1156 or later, blacklist earlier or incompatible cores
-CPU_ASM_BLACKLIST:=arm920t arm926ej-s arm1136j-s arm1176jzf-s fa526 mpcore xscale
+# AMD Geode LX and i486 do not have SSE
+CPU_ASM_BLACKLIST:=geode i486 arm920t arm926ej-s arm1136j-s arm1176jzf-s fa526 mpcore xscale
 
+ifneq ($(CONFIG_SOFT_FLOAT)$(findstring $(call qstrip,$(CONFIG_CPU_TYPE)),$(CPU_ASM_BLACKLIST)),)
+  CONFIGURE_VARS+= AS= 
+  MAKE_FLAGS+= AS= 
+  CONFIGURE_ARGS += --disable-asm
+else
 ifneq ($(CONFIG_TARGET_x86),)
 ifeq ($(CONFIG_YASM),y)
   CONFIGURE_VARS+= AS=yasm
@@ -40,11 +46,6 @@ else
   CONFIGURE_ARGS += --disable-asm
 endif
 endif
-
-ifneq ($(CONFIG_SOFT_FLOAT)$(findstring $(CONFIG_CPU_TYPE),$(CPU_ASM_BLACKLIST)),)
-CONFIGURE_VARS+= AS= 
-MAKE_FLAGS+= AS= 
-CONFIGURE_ARGS += --disable-asm
 endif
 
 CONFIGURE_ARGS += \
index 9d74464b94e51663c14970001eb85e9c0136be93..d23e9bbcab6f6e40f59bf0ec664a1bff70a2ad4e 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=opus
 PKG_VERSION:=1.1.3
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://downloads.xiph.org/releases/opus/
@@ -45,6 +45,12 @@ ifeq ($(CONFIG_SOFT_FLOAT),y)
                --enable-fixed-point
 endif
 
+CPU_ASM_BLACKLIST:=xscale arm926ej-s
+
+ifneq ($(findstring $(call qstrip,$(CONFIG_CPU_TYPE)),$(CPU_ASM_BLACKLIST)),)
+       CONFIGURE_ARGS+= --disable-asm
+endif
+
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include
        $(CP) $(PKG_INSTALL_DIR)/usr/include/opus $(1)/usr/include/
index e672c9ad186b6956307f464e78ab017a453e8308..efe3cec9bbcfda0cce041d2efe27c7bfa252d676 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=emailrelay
 PKG_VERSION:=1.9
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-src.tar.gz
 PKG_SOURCE_URL:=@SF/emailrelay/$(PKG_VERSION)
@@ -20,13 +20,13 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
 PKG_CONFIG_DEPENDS:=CONFIG_EMAILRELAY_SUPPORT_VERBOSE_DBG CONFIG_EMAILRELAY_SSL 
 
 
-include $(INCLUDE_DIR)/uclibc++.mk
+#include $(INCLUDE_DIR)/uclibc++.mk   # $(CXX_DEPENDS)
 include $(INCLUDE_DIR)/package.mk
 
 define Package/emailrelay
   SECTION:=mail
   CATEGORY:=Mail
-  DEPENDS:=$(CXX_DEPENDS) +EMAILRELAY_SSL:libopenssl
+  DEPENDS:=+EMAILRELAY_SSL:libopenssl +libstdcpp 
   TITLE:=A simple SMTP proxy and MTA
   URL:=http://emailrelay.sourceforge.net/
   MAINTAINER:=Federico Di Marco <fededim@gmail.com>
@@ -104,6 +104,8 @@ define Package/emailrelay/install
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/main/emailrelay-passwd $(1)/usr/bin/
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/main/emailrelay-poke $(1)/usr/bin/
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/main/emailrelay-submit $(1)/usr/bin/
+       $(INSTALL_DIR) $(1)/tmp/spool
+       $(INSTALL_DIR) $(1)/tmp/spool/emailrelay
        $(INSTALL_DIR) $(1)/etc
        $(INSTALL_DATA) files/$(PKG_NAME).auth $(1)/etc/
        $(INSTALL_DIR) $(1)/etc/init.d
index db631fecdb305c19eb144b4162e5dff3ee7aa91b..4e1cb12a4af9bba58c459315157841d62915b568 100644 (file)
@@ -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
index 5f6b84621a692a0bf3e6498a2c0f2b6cf2d0c243..713e00e1c5895305620d96fa07efb26cf34d3a9e 100755 (executable)
@@ -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:=2
+PKG_RELEASE:=5
 
 PKG_LICENSE:=GPL-2.0
 PKG_MAINTAINER:=Christian Schoenebeck <christian.schoenebeck@gmail.com>
@@ -29,7 +29,7 @@ define Package/$(PKG_NAME)/Default
     PKGARCH:=all
 endef
 
-##### **********************************
+###### *************************************************************************
 define Package/$(PKG_NAME)
     $(call Package/$(PKG_NAME)/Default)
     TITLE:=Dynamic DNS Client scripts (with IPv6 support)
@@ -53,7 +53,7 @@ define Package/$(PKG_NAME)/config
                Info   : http://wiki.openwrt.org/doc/howto/ddns.client
 endef
 
-##### **********************************
+###### *************************************************************************
 define Package/$(PKG_NAME)_cloudflare
     $(call Package/$(PKG_NAME)/Default)
     TITLE:=CloudFlare.com API v1 (deprecated)
@@ -63,7 +63,7 @@ define Package/$(PKG_NAME)_cloudflare/description
     Dynamic DNS Client scripts extension for CloudFlare.com API-v1 (deprecated)
 endef
 
-##### **********************************
+###### *************************************************************************
 define Package/$(PKG_NAME)_cloudflare.com-v4
     $(call Package/$(PKG_NAME)/Default)
     TITLE:=CloudFlare.com API v4 (require cURL)
@@ -73,7 +73,7 @@ define Package/$(PKG_NAME)_cloudflare.com-v4/description
     Dynamic DNS Client scripts extension for CloudFlare.com API-v4 (require/install cURL)
 endef
 
-##### **********************************
+###### *************************************************************************
 define Package/$(PKG_NAME)_godaddy.com-v1
     $(call Package/$(PKG_NAME)/Default)
     TITLE:=GoDaddy.com (require cURL)
@@ -83,7 +83,7 @@ define Package/$(PKG_NAME)_godaddy.com-v1/description
     Dynamic DNS Client scripts extension for GoDaddy.com (require/install cURL)
 endef
 
-##### **********************************
+###### *************************************************************************
 define Package/$(PKG_NAME)_no-ip_com
     $(call Package/$(PKG_NAME)/Default)
     TITLE:=DDNS extension for No-IP.com
@@ -93,7 +93,7 @@ define Package/$(PKG_NAME)_no-ip_com/description
     Dynamic DNS Client scripts extension for No-IP.com
 endef
 
-##### **********************************
+###### *************************************************************************
 define Package/$(PKG_NAME)_nsupdate
     $(call Package/$(PKG_NAME)/Default)
     TITLE:=DDNS extension using Bind nsupdate
@@ -112,7 +112,7 @@ define Package/$(PKG_NAME)_nsupdate/config
 
 endef
 
-##### **********************************
+###### *************************************************************************
 define Build/Configure
 endef
 define Build/Compile
@@ -126,7 +126,7 @@ define Build/Compile
                -e '/^\s*$$$$/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
+       $(SED) '/^VERSION=*/s/.*/VERSION="$(PKG_VERSION)-$(PKG_RELEASE)"/' $(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
@@ -138,7 +138,13 @@ define Package/$(PKG_NAME)/conffiles
 /etc/config/ddns
 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
+       exit 0  # suppress errors
+endef
 define Package/$(PKG_NAME)/install
        $(INSTALL_DIR)  $(1)/etc/uci-defaults
        $(INSTALL_BIN)  $(PKG_BUILD_DIR)/files/ddns.defaults $(1)/etc/uci-defaults/ddns
@@ -155,108 +161,201 @@ define Package/$(PKG_NAME)/install
        $(INSTALL_DIR)  $(1)/usr/lib/ddns
        $(INSTALL_BIN)  $(PKG_BUILD_DIR)/files/dynamic_dns_*.sh $(1)/usr/lib/ddns
 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
+       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 disable
        /etc/init.d/ddns stop
+       /etc/init.d/ddns disable
 
        # clear LuCI indexcache
        rm -f /tmp/luci-indexcache >/dev/null 2>&1
 
-       exit 0
+       exit 0  # suppress errors
 endef
 
-##### **********************************
+###### *************************************************************************
+define Package/$(PKG_NAME)_cloudflare/preinst
+       #!/bin/sh
+       # 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)_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_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
 endef
 define Package/$(PKG_NAME)_cloudflare/postinst
        #!/bin/sh
-       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
+       # 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
+       }
+       # on real system restart service if enabled
+       [ -z "$${IPKG_INSTROOT}" ] \
+               && /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
        /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
 endef
 
-##### **********************************
+###### *************************************************************************
+define Package/$(PKG_NAME)_cloudflare.com-v4/preinst
+       #!/bin/sh
+       # 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)_cloudflare.com-v4/install
-       $(INSTALL_DIR)  $(1)/etc/uci-defaults
-       $(INSTALL_BIN)  $(PKG_BUILD_DIR)/files/ddns.defaults $(1)/etc/uci-defaults/ddns_cloudflare.com-v4
-       $(INSTALL_DIR)  $(1)/usr/lib/ddns
-       $(INSTALL_BIN)  $(PKG_BUILD_DIR)/files/update_cloudflare_com_v4.sh $(1)/usr/lib/ddns
+       $(INSTALL_DIR) $(1)/etc/uci-defaults
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/files/ddns.defaults $(1)/etc/uci-defaults/ddns_cloudflare.com-v4
+       $(INSTALL_DIR) $(1)/usr/lib/ddns
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/files/update_cloudflare_com_v4.sh $(1)/usr/lib/ddns
 endef
 define Package/$(PKG_NAME)_cloudflare.com-v4/postinst
        #!/bin/sh
-       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
+       # 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
+       }
+       # on real system restart service if enabled
+       [ -z "$${IPKG_INSTROOT}" ] \
+               && /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
+       [ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop                             >/dev/null 2>&1
        /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
 endef
 
-##### **********************************
+###### *************************************************************************
+define Package/$(PKG_NAME)_godaddy.com-v1/preinst
+       #!/bin/sh
+       # 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)_godaddy.com-v1/install
-       $(INSTALL_DIR)  $(1)/etc/uci-defaults
-       $(INSTALL_BIN)  $(PKG_BUILD_DIR)/files/ddns.defaults $(1)/etc/uci-defaults/ddns_godaddy.com-v1
-       $(INSTALL_DIR)  $(1)/usr/lib/ddns
-       $(INSTALL_BIN)  $(PKG_BUILD_DIR)/files/update_godaddy_com_v1.sh $(1)/usr/lib/ddns
+       $(INSTALL_DIR) $(1)/etc/uci-defaults
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/files/ddns.defaults $(1)/etc/uci-defaults/ddns_godaddy.com-v1
+       $(INSTALL_DIR) $(1)/usr/lib/ddns
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/files/update_godaddy_com_v1.sh $(1)/usr/lib/ddns
 endef
 define Package/$(PKG_NAME)_godaddy.com-v1/postinst
        #!/bin/sh
-       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
+       # 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
+       }
+       # on real system restart service if enabled
+       [ -z "$${IPKG_INSTROOT}" ] \
+               && /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
+       [ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop                             >/dev/null 2>&1
        /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
 endef
 
-##### **********************************
+###### *************************************************************************
+define Package/$(PKG_NAME)_no-ip_com/preinst
+       #!/bin/sh
+       # 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)_no-ip_com/install
+       $(INSTALL_DIR) $(1)/etc/uci-defaults
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/files/ddns.defaults $(1)/etc/uci-defaults/ddns_no-ip_com
        $(INSTALL_DIR) $(1)/usr/lib/ddns
-       $(INSTALL_BIN)  $(PKG_BUILD_DIR)/files/update_no-ip_com.sh $(1)/usr/lib/ddns
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/files/update_no-ip_com.sh $(1)/usr/lib/ddns
 endef
 define Package/$(PKG_NAME)_no-ip_com/postinst
        #!/bin/sh
-       printf "%s\\t%s\\n" '"no-ip.com"' '"update_no-ip_com.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services
+       # 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
+       }
+       # on real system restart service if enabled
+       [ -z "$${IPKG_INSTROOT}" ] \
+               && /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
+       [ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop             >/dev/null 2>&1
        /bin/sed -i '/no-ip\.com/d' $${IPKG_INSTROOT}/etc/ddns/services >/dev/null 2>&1
+       exit 0  # suppress errors
 endef
 
-##### **********************************
+###### *************************************************************************
+define Package/$(PKG_NAME)_nsupdate/preinst
+       #!/bin/sh
+       # 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)_nsupdate/install
+       $(INSTALL_DIR) $(1)/etc/uci-defaults
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/files/ddns.defaults $(1)/etc/uci-defaults/ddns_nsupdate
        $(INSTALL_DIR) $(1)/usr/lib/ddns
-       $(INSTALL_BIN)  $(PKG_BUILD_DIR)/files/update_nsupdate.sh $(1)/usr/lib/ddns
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/files/update_nsupdate.sh $(1)/usr/lib/ddns
 endef
 define Package/$(PKG_NAME)_nsupdate/postinst
        #!/bin/sh
-       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
+       # 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
+       }
+       # on real system restart service if enabled
+       [ -z "$${IPKG_INSTROOT}" ] \
+               && /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
+       [ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop                     >/dev/null 2>&1
        /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
 endef
 
-##### **********************************
+###### *************************************************************************
 $(eval $(call BuildPackage,$(PKG_NAME)))
 $(eval $(call BuildPackage,$(PKG_NAME)_cloudflare))
 $(eval $(call BuildPackage,$(PKG_NAME)_cloudflare.com-v4))
index 8d648512869e32410a1c300ca71d99b830f94529..f8a260c0e28f579e2affa93ceb0080ebd63d13a0 100755 (executable)
@@ -23,7 +23,7 @@
 # GLOBAL VARIABLES #
 VERSION="2.7.6"
 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
index 708fd9b19b071de1c714252bcece9766d0818ab1..fd70b071bf41a42e961efefe75165e99b972d216 100644 (file)
@@ -47,7 +47,7 @@
 
 "all-inkl.com"         "http://[USERNAME]:[PASSWORD]@dyndns.kasserver.com/?myip=[IP]"
 
-"changeip.com"         "http://[USERNAME]:[PASSWORD]@nic.changeip.com/nic/update?u=[USERNAME]&p=[PASSWORD]&cmd=update&hostname=[DOMAIN]&ip=[IP]"       "good|NOCHG"
+"changeip.com"         "http://[USERNAME]:[PASSWORD]@nic.changeip.com/nic/update?u=[USERNAME]&p=[PASSWORD]&cmd=update&hostname=[DOMAIN]&ip=[IP]"       "Successful"
 
 "core-networks.de"     "http://[USERNAME]:[PASSWORD]@dyndns.core-networks.de/?hostname=[DOMAIN]&myip=[IP]&keepipv6=1"  "good"
 
index 4a89f828e2e2a7b563165ab82f8be24c49cb4c0e..d0a0bafccff8b3313a721eadce6d31dcf6ffa0bc 100644 (file)
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ethtool
-PKG_VERSION:=4.5
+PKG_VERSION:=4.8
 PKG_RELEASE:=1
 
 PKG_MAINTAINER:=Matthias Schiffer <mschiffer@universe-factory.net>
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@KERNEL/software/network/ethtool
-PKG_MD5SUM:=f50d25177d10f0cb74da3edc66c3143a
+PKG_MD5SUM:=e9e7286178f172c9f21bafbfb978d6de
 
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=COPYING
index 5c550d8a5f4669d4f018dde23b622376bc8d0b06..aeaa1dfcf682a5c2b048d636b549953035fdbf0d 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=fastd
 PKG_VERSION:=18
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_MAINTAINER:=Matthias Schiffer <mschiffer@universe-factory.net>
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
@@ -43,7 +43,7 @@ PKG_CONFIG_DEPENDS:=\
        CONFIG_FASTD_WITH_STATUS_SOCKET
 
 
-PKG_BUILD_DEPENDS:=nacl libuecc
+PKG_BUILD_DEPENDS:=nacl
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/cmake.mk
@@ -51,7 +51,7 @@ include $(INCLUDE_DIR)/cmake.mk
 define Package/fastd
   SECTION:=net
   CATEGORY:=Network
-  DEPENDS:=+kmod-tun +librt +libpthread +FASTD_WITH_STATUS_SOCKET:libjson-c +FASTD_WITH_CAPABILITIES:libcap
+  DEPENDS:=+kmod-tun +librt +libpthread +libuecc +FASTD_WITH_STATUS_SOCKET:libjson-c +FASTD_WITH_CAPABILITIES:libcap
   TITLE:=Fast and Secure Tunneling Daemon
   URL:=https://projects.universe-factory.net/projects/fastd
   SUBMENU:=VPN
diff --git a/net/jool/Makefile b/net/jool/Makefile
new file mode 100644 (file)
index 0000000..2408394
--- /dev/null
@@ -0,0 +1,114 @@
+#
+# Copyright (C) 2016 Dan Luedtke <mail@danrl.com>
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=jool
+PKG_VERSION:=3.5.2
+PKG_RELEASE:=1
+
+PKG_LICENSE:=GPL-3.0
+PKG_LICENSE_FILES:=COPYING
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/NICMx/Jool.git
+PKG_SOURCE_VERSION:=ec32f7181d6b12eadcafbe39b8bf4d7d48230232
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION)
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.xz
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
+PKG_BUILD_PARALLEL:=1
+PKG_BUILD_DEPENDS:=USE_UCLIBC:argp-standalone USE_MUSL:argp-standalone
+
+PKG_FIXUP:=autoreconf
+
+include $(INCLUDE_DIR)/kernel.mk
+include $(INCLUDE_DIR)/package.mk
+
+MAKE_PATH:=usr
+CONFIGURE_PATH:=usr
+
+define Build/Compile
+       $(MAKE) -C "$(LINUX_DIR)" \
+               KERNEL_DIR="$(LINUX_DIR)" \
+               ARCH="$(LINUX_KARCH)" \
+               CROSS_COMPILE="$(TARGET_CROSS)" \
+               SUBDIRS="$(PKG_BUILD_DIR)/mod/stateful" \
+               V="$(V)" \
+               modules
+       $(MAKE) -C "$(LINUX_DIR)" \
+               KERNEL_DIR="$(LINUX_DIR)" \
+               ARCH="$(LINUX_KARCH)" \
+               CROSS_COMPILE="$(TARGET_CROSS)" \
+               SUBDIRS="$(PKG_BUILD_DIR)/mod/stateless" \
+               V="$(V)" \
+               modules
+       $(call Build/Compile/Default)
+endef
+
+define Package/jool/Default
+  SECTION:=net
+  CATEGORY:=Network
+  URL:=https://www.jool.mx
+  MAINTAINER:=Dan Luedtke <mail@danrl.com>
+endef
+
+define Package/jool/Default/description
+  Jool is an Open Source SIIT and NAT64 for Linux.
+endef
+
+define Package/jool
+  $(call Package/jool/Default)
+  TITLE:=Jool meta-package
+  DEPENDS:=+kmod-jool +jool-tools
+endef
+
+define Package/jool/description
+  $(call Package/jool/Default/description)
+endef
+
+define KernelPackage/jool
+  SECTION:=kernel
+  CATEGORY:=Kernel modules
+  SUBMENU:=Network Support
+  TITLE:=Jool kernel module
+  DEPENDS:= \
+    @IPV6 \
+    +kmod-crypto-md5 \
+    +kmod-nf-conntrack \
+    +kmod-nf-conntrack6
+  FILES:= \
+    $(PKG_BUILD_DIR)/mod/stateful/jool.$(LINUX_KMOD_SUFFIX) \
+    $(PKG_BUILD_DIR)/mod/stateless/jool_siit.$(LINUX_KMOD_SUFFIX)
+endef
+
+define KernelPackage/jool/description
+  $(call Package/jool/Default/description)
+
+  This package provides the kernel module for Jool.
+endef
+
+define Package/jool-tools
+  $(call Package/jool/Default)
+  TITLE:=Jool userspace control programs
+  DEPENDS:=+libnl +ethtool
+endef
+
+define Package/jool-tools/description
+  $(call Package/jool/Default/description)
+
+  This package provides the userspace control programs for Jool.
+endef
+
+define Package/jool-tools/install
+       $(INSTALL_DIR) $(1)/usr/sbin/
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/usr/stateful/jool       $(1)/usr/sbin/
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/usr/stateless/jool_siit $(1)/usr/sbin/
+endef
+
+$(eval $(call BuildPackage,jool))
+$(eval $(call KernelPackage,jool))
+$(eval $(call BuildPackage,jool-tools))
index 5d11c910fb978929518a1dadda92fc181c71b627..4abfc982d87c1777e03cfe340506899dbd08d8a3 100644 (file)
@@ -8,14 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=lftp
-PKG_VERSION:=4.7.3
+PKG_VERSION:=4.7.4
 PKG_RELEASE:=1
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_SOURCE_URL:=http://lftp.yar.ru/ftp \
-               http://lftp.yar.ru/ftp/old \
-               http://lftp.cybermirror.org \
-               http://lftp.cybermirror.org/old
-PKG_MD5SUM:=23deda16014412c802f095fbaa0bebee
+PKG_SOURCE_URL:=http://lftp.tech/ftp/ \
+               ftp://ftp.st.ryukoku.ac.jp/pub/network/ftp/lftp/
+PKG_MD5SUM:=74965c798b1806d0a2659d8a606ea47f
 
 
 
index 5d71761a953719f13ecb69001d100bf4c657a3c9..8fe057653da7ddf5078de0d7dc48d6c545ff2c83 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ocserv
 PKG_VERSION:=0.11.6
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_USE_MIPS16:=0
 
 PKG_BUILD_DIR :=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
@@ -63,6 +63,7 @@ CONFIGURE_ARGS+= \
        --without-lz4 \
        --without-gssapi \
        --with-libcrypt-prefix="$(STAGING_DIR)/" \
+       --with-libev-prefix="$(STAGING_DIR)/" \
        --without-lz4 \
        --with-local-talloc \
 
index f07902e6a7b33d44652fde27571552ded377bc9f..e47633211904d2d4525c221b288c2f61c992c96b 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=opentracker
 PKG_VERSION:=20151211
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_REV:=ba25d2b2a84a31eac2956b71cb12b4b0748b35f5
 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
 PKG_LICENSE:=Beerware
@@ -76,6 +76,14 @@ ifeq ($(BUILD_VARIANT),ipv6)
   MAKE_FLAGS += FEATURES="-DWANT_V6"
 endif
 
+define Package/opentracker/conffiles
+/etc/opentracker.conf
+endef
+
+define Package/opentracker6/conffiles
+/etc/opentracker6.conf
+endef
+
 define Package/opentracker/install
        $(INSTALL_DIR) $(1)/usr/bin
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/opentracker $(1)/usr/bin
index 7700c9ea36d7b6b57410ed67b516f897180ae13f..1a499de7c64ab8a9e65d1061f49e046e358f114b 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=reaver
 PKG_VERSION:=1.4
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_MAINTAINER:=Yousong Zhou <yszhou4tech@gmail.com>
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
diff --git a/net/reaver/patches/0101-pcap-use-65536-as-snaplen.patch b/net/reaver/patches/0101-pcap-use-65536-as-snaplen.patch
new file mode 100644 (file)
index 0000000..03f4318
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/src/init.c.orig  2016-12-08 13:23:17.386891467 +0800
++++ b/src/init.c       2016-12-08 13:23:20.850892551 +0800
+@@ -121,7 +121,7 @@ pcap_t *capture_init(char *capture_sourc
+       pcap_t *handle = NULL;
+       char errbuf[PCAP_ERRBUF_SIZE] = { 0 };
+       
+-      handle = pcap_open_live(capture_source, BUFSIZ, 1, 0, errbuf);
++      handle = pcap_open_live(capture_source, 65536, 1, 0, errbuf);
+       if(!handle)
+       {
+               handle = pcap_open_offline(capture_source, errbuf);
diff --git a/net/softethervpn/Makefile b/net/softethervpn/Makefile
new file mode 100644 (file)
index 0000000..a01b97c
--- /dev/null
@@ -0,0 +1,131 @@
+#
+# Copyright (C) 2008-2016 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+# Based on the initial porting done by el1n
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=softethervpn
+PKG_VERSION:=4.21-9613
+PKG_VERREL:=beta
+PKG_VERDATE:=2016.04.24
+PKG_RELEASE:=1
+
+PKG_SOURCE:=softether-src-v$(PKG_VERSION)-$(PKG_VERREL).tar.gz
+PKG_SOURCE_URL:=http://www.softether-download.com/files/softether/v$(PKG_VERSION)-$(PKG_VERREL)-$(PKG_VERDATE)-tree/Source_Code/
+PKG_MD5SUM:=928d882d5fc23e00f0a5fa4ebf292ab9
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/v$(PKG_VERSION)
+PKG_LICENSE:=GPL-2.0
+PKG_LICENSE_FILES:=COPYING
+
+include $(INCLUDE_DIR)/nls.mk 
+include $(INCLUDE_DIR)/package.mk
+
+define Package/softethervpn
+  SECTION:=net
+  CATEGORY:=Network
+  SUBMENU:=VPN
+  DEPENDS:=+libpthread +librt +libreadline +libopenssl +libncurses +kmod-tun +zlib $(ICONV_DEPENDS)
+  TITLE:=Free Cross-platform Multi-protocol VPN server and client
+  URL:=http://www.softether.org/
+  MAINTAINER:=Federico Di Marco <fededim@gmail.com>
+endef
+
+define Package/softethervpn/description
+SoftEther VPN ("SoftEther" means "Software Ethernet") is one of the world's most powerful and easy-to-use multi-protocol VPN software developed as an academic 
+project from University of Tsukuba, Japan. SoftEther VPN has strong compatibility to today's most popular VPN products among the world. It has the interoperability
+with OpenVPN, L2TP, IPsec, EtherIP, L2TPv3, Cisco VPN Routers and MS-SSTP VPN Clients. SoftEther VPN is the world's only VPN software which supports SSL-VPN, 
+OpenVPN, L2TP, EtherIP, L2TPv3 and IPsec as a single VPN software. SoftEther VPN is not only an alternative VPN server to existing VPN products (OpenVPN, 
+IPsec and MS-SSTP), but has also original strong SSL-VPN protocol to penetrate any kinds of firewalls. Ultra-optimized SSL-VPN Protocol of SoftEther VPN
+has very fast throughput, low latency and firewall resistance.
+endef
+
+
+define Package/softethervpn/conffiles
+/usr/libexec/softethervpn/vpn_server.config
+/usr/libexec/softethervpn/vpn_client.config
+/usr/libexec/softethervpn/vpn_bridge.config
+/usr/libexec/softethervpn/lang.config
+endef
+
+
+ifeq ($(CONFIG_OPENSSL_WITH_SSL3),y)
+       SE_FLAGS=-DSSL3_SUPPORT
+endif
+
+ifeq ($(ARCH),mips)
+       SE_FLAGS+= -minterlink-mips16
+endif
+
+ifeq ($(ARCH),mipsel)
+       SE_FLAGS+= -minterlink-mips16
+endif
+
+
+define Build/Configure
+       if [ -v CONFIG_64BIT ]; then cp $(PKG_BUILD_DIR)/src/makefiles/linux_64bit.mak $(PKG_BUILD_DIR)/Makefile; else cp $(PKG_BUILD_DIR)/src/makefiles/linux_32bit.mak $(PKG_BUILD_DIR)/Makefile; fi;
+endef
+
+define Build/Compile
+       # Softether compiles first a tool called hamcorebuilder which is essentially an archiver. Then the compilation calls this archiver to pack all 
+       # resource files (*.html, *.config, .txt, readme, languages) it needs to run in an archive file called hamcore.se2. The three executables are then built 
+       # and they will have a runtime dependency on this resource archive. By default OpenWRT build process cross compiles all targets in the makefile
+       # generating therefore an error when the archive is generated since the executable is crosscompiled to run on the router and instead it is run
+       # by the build host. The workaround is to compile the archiver with the host environment, generate the hamcore.se2 archive and cross compile everything
+       # again without regenerating the archive.
+
+       # we clean the last cross compiled version
+       make -C $(PKG_BUILD_DIR) clean
+
+       # we compile the hamcorebuilder utility and generate hamcore archive using host environment
+       make -C $(PKG_BUILD_DIR) src/bin/BuiltHamcoreFiles/unix/hamcore.se2
+
+       # we clean everything, but we save the built hamcore archive and we update its timestamp to avoid rebuilding the archive with cross compiled hamcorebuilder
+       mv $(PKG_BUILD_DIR)/src/bin/BuiltHamcoreFiles/unix/hamcore.se2 $(PKG_BUILD_DIR)/src/bin/BuiltHamcoreFiles/unix/hamcore.se2.1
+       make -C $(PKG_BUILD_DIR) clean
+               mv $(PKG_BUILD_DIR)/src/bin/BuiltHamcoreFiles/unix/hamcore.se2.1 $(PKG_BUILD_DIR)/src/bin/BuiltHamcoreFiles/unix/hamcore.se2
+       touch -d "`date -d 1day`" $(PKG_BUILD_DIR)/src/bin/BuiltHamcoreFiles/unix/hamcore.se2
+
+       ls -la $(PKG_BUILD_DIR)/src/bin/BuiltHamcoreFiles/unix
+
+       # we cross compile everything from the scratch
+       $(MAKE) \
+               $(TARGET_CONFIGURE_OPTS) \
+               CCFLAGS="$(SE_FLAGS) -I$(STAGING_DIR)/usr/include $(ICONV_CFLAGS)" \
+               LDFLAGS="-L$(STAGING_DIR)/usr/lib $(ICONV_LDFLAGS)" \
+               -C $(PKG_BUILD_DIR)
+endef
+
+define Package/softethervpn/install
+       $(INSTALL_DIR) $(1)/usr/libexec/softethervpn
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/vpnserver/vpnserver $(1)/usr/libexec/softethervpn
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/vpnserver/hamcore.se2 $(1)/usr/libexec/softethervpn
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/vpnclient/vpnclient $(1)/usr/libexec/softethervpn
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/vpnbridge/vpnbridge $(1)/usr/libexec/softethervpn
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/vpncmd/vpncmd $(1)/usr/libexec/softethervpn
+       $(INSTALL_BIN) files/launcher.sh $(1)/usr/libexec/softethervpn
+
+       $(INSTALL_DATA) files/dummy $(1)/usr/libexec/softethervpn/vpn_server.config
+       $(INSTALL_DATA) files/dummy $(1)/usr/libexec/softethervpn/vpn_bridge.config
+       $(INSTALL_DATA) files/dummy $(1)/usr/libexec/softethervpn/vpn_client.config
+       $(INSTALL_DATA) files/dummy $(1)/usr/libexec/softethervpn/lang.config
+
+       $(INSTALL_DIR) $(1)/usr/bin
+
+       #$(LN) ../../usr/libexec/softethervpn/launcher.sh $(1)/usr/bin/vpnserver
+       #$(LN) ../../usr/libexec/softethervpn/launcher.sh $(1)/usr/bin/vpnclient
+       #$(LN) ../../usr/libexec/softethervpn/launcher.sh $(1)/usr/bin/vpnbridge
+       $(LN) ../../usr/libexec/softethervpn/launcher.sh $(1)/usr/bin/vpncmd
+
+       $(INSTALL_DIR) $(1)/etc
+       $(INSTALL_DIR) $(1)/etc/init.d
+       $(INSTALL_BIN) files/vpnserver.init $(1)/etc/init.d/softethervpnserver
+       $(INSTALL_BIN) files/vpnbridge.init $(1)/etc/init.d/softethervpnbridge
+       $(INSTALL_BIN) files/vpnclient.init $(1)/etc/init.d/softethervpnclient
+endef
+
+$(eval $(call BuildPackage,softethervpn))
diff --git a/net/softethervpn/files/dummy b/net/softethervpn/files/dummy
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/net/softethervpn/files/launcher.sh b/net/softethervpn/files/launcher.sh
new file mode 100755 (executable)
index 0000000..7970792
--- /dev/null
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec "/usr/libexec/softethervpn/${0##*/}" "$@"
diff --git a/net/softethervpn/files/vpnbridge.init b/net/softethervpn/files/vpnbridge.init
new file mode 100644 (file)
index 0000000..9e5c44f
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/sh /etc/rc.common
+START=60
+
+start(){
+        logger -t 'softethervpn' "Starting softether vpnbridge service."
+       /usr/bin/env LANG=en_US.UTF-8 /usr/libexec/softethervpn/vpnbridge start
+}
+
+stop(){
+        logger -t 'softethervpn' "Stopping softether vpnbridge service."
+       /usr/bin/env LANG=en_US.UTF-8 /usr/libexec/softethervpn/vpnbridge stop
+}
diff --git a/net/softethervpn/files/vpnclient.init b/net/softethervpn/files/vpnclient.init
new file mode 100644 (file)
index 0000000..1a3296d
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/sh /etc/rc.common
+START=60
+
+start(){
+        logger -t 'softethervpn' "Starting softether vpnclient service."
+       /usr/bin/env LANG=en_US.UTF-8 /usr/libexec/softethervpn/vpnclient start
+}
+
+stop(){
+        logger -t 'softethervpn' "Stopping softether vpnclient service."
+       /usr/bin/env LANG=en_US.UTF-8 /usr/libexec/softethervpn/vpnclient stop
+}
diff --git a/net/softethervpn/files/vpnserver.init b/net/softethervpn/files/vpnserver.init
new file mode 100644 (file)
index 0000000..6dc180a
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/sh /etc/rc.common
+START=60
+
+start(){
+        logger -t 'softethervpn' "Starting softether vpnserver service."
+       /usr/bin/env LANG=en_US.UTF-8 /usr/libexec/softethervpn/vpnserver start
+}
+
+stop(){
+        logger -t 'softethervpn' "Stopping softether vpnserver service."
+       /usr/bin/env LANG=en_US.UTF-8 /usr/libexec/softethervpn/vpnserver stop
+}
diff --git a/net/softethervpn/patches/103-noeucjp.patch b/net/softethervpn/patches/103-noeucjp.patch
new file mode 100644 (file)
index 0000000..f403dfb
--- /dev/null
@@ -0,0 +1,29 @@
+--- a/src/Mayaqua/Internat.c
++++ b/src/Mayaqua/Internat.c
+@@ -123,7 +123,7 @@
+ #include <Mayaqua/Mayaqua.h>\r
\r
+ extern LOCK *token_lock;\r
+-static char charset[MAX_SIZE] = "EUCJP";\r
++static char charset[MAX_SIZE] = "utf-8";\r
+ static LOCK *iconv_lock = NULL;\r
+ void *iconv_cache_wide_to_str = 0;\r
+ void *iconv_cache_str_to_wide = 0;\r
+@@ -938,7 +938,7 @@ void InitInternational()
+ #ifdef        UNIX_MACOS\r
+               StrCpy(charset, sizeof(charset), "utf-8");\r
+ #else // UNIX_MACOS\r
+-              StrCpy(charset, sizeof(charset), "EUCJP");\r
++              StrCpy(charset, sizeof(charset), "utf-8");\r
+ #endif        // UNIX_MACOS\r
+               d = IconvWideToStrInternal();\r
+               if (d == (void *)-1)\r
+@@ -1198,7 +1198,7 @@ void GetCurrentCharSet(char *name, UINT
+               }\r
+               else\r
+               {\r
+-                      StrCpy(name, size, "eucJP");\r
++                      StrCpy(name, size, "utf-8");\r
+               }\r
+       }\r
+       FreeToken(t);\r
diff --git a/net/softethervpn/patches/105-nosslv3.patch b/net/softethervpn/patches/105-nosslv3.patch
new file mode 100644 (file)
index 0000000..221ab1c
--- /dev/null
@@ -0,0 +1,50 @@
+--- a/src/Mayaqua/Network.c
++++ b/src/Mayaqua/Network.c
+@@ -12966,35 +12966,46 @@ bool StartSSLEx(SOCK *sock, X *x, K *pri
+       {\r
+               if (sock->ServerMode)\r
+               {\r
++#ifdef SSL3_SUPPORT                   \r
+                       if (sock->AcceptOnlyTls == false)\r
+                       {\r
+                               SSL_CTX_set_ssl_version(ssl_ctx, SSLv23_method());\r
+                       }\r
+                       else\r
+                       {\r
++#endif\r
+                               SSL_CTX_set_ssl_version(ssl_ctx, TLSv1_method());\r
++#ifdef SSL3_SUPPORT\r
+                       }\r
+-\r
++#endif\r
+                       Unlock(openssl_lock);\r
+                       AddChainSslCertOnDirectory(ssl_ctx);\r
+                       Lock(openssl_lock);\r
+               }\r
+               else\r
+               {\r
++#ifdef SSL3_SUPPORT\r
+                       if (client_tls == false)\r
+                       {\r
+                               SSL_CTX_set_ssl_version(ssl_ctx, SSLv3_method());\r
+                       }\r
+                       else\r
+                       {\r
++#endif\r
+                               SSL_CTX_set_ssl_version(ssl_ctx, TLSv1_client_method());\r
++#ifdef SSL3_SUPPORT\r
+                       }\r
++#endif\r
+               }\r
+               sock->ssl = SSL_new(ssl_ctx);\r
+               SSL_set_fd(sock->ssl, (int)sock->socket);\r
\r
+ #ifdef        SSL_CTRL_SET_TLSEXT_HOSTNAME\r
++# ifdef SSL3_SUPPORT\r
+               if (sock->ServerMode == false && client_tls)\r
++# else\r
++              if (sock->ServerMode == false)\r
++#endif\r
+               {\r
+                       if (IsEmptyStr(sni_hostname) == false)\r
+                       {\r
index eb82db766fe82575bcb434b5d7bc25416a5da22f..0883c952fe498e06e161c272d1f6eb43b9a9332d 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=unbound
 PKG_VERSION:=1.5.10
-PKG_RELEASE:=4
+PKG_RELEASE:=6
 
 PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=LICENSE
index a850a65f46d14870441284c1d585da3d66541d5a..084a8af94717a2d86f5d96eaa76fa3f243225d50 100644 (file)
@@ -9,23 +9,56 @@ Unbound may be useful on consumer grade embedded hardware. It is *intended* to b
 This package builds on Unbounds capabilities with OpenWrt UCI. Not every Unbound option is in UCI, but rather, UCI simplifies the combination of related options. Unbounds native options are bundled and balanced within a smaller set of choices. Options include resources, DNSSEC, access control, and some TTL tweaking. The UCI also provides an escape option and work at the raw "unbound.conf" level.
 
 ## Work with dnsmasq
-Some UCI options will help Unbound and dnsmasq work together in **parallel**. The default DHCP and DNS stub resolver in OpenWrt is dnsmasq, and it will continue to serve this purpose. The following actions will make Unbound the primary DNS server, and make dnsmasq only provide DNS to local DHCP.
+Some UCI options will help Unbound and dnsmasq work together in **parallel**. The default DHCP and DNS stub resolver in OpenWrt is dnsmasq, and it will continue to serve this purpose. The following partial examples will make Unbound the primary DNS server, and make dnsmasq only provide DNS to local DHCP.
 
-- Set `unbound` UCI `option dnsmasq_link_dns` to true.
-- Set other `unbound` UCI options how you wish.
-- Set `dnsmasq` UCI `option noresolv` to true.
-- Set `dnsmasq` UCI `option resolvfile` to blank single-quotes.
-- Set `dnsmasq` UCI `option port` to 1053 or 5353.
-- Add to each `dhcp` UCI `list dhcp_option option:dns-server,0.0.0.0`
+**/etc/config/unbound**:
+
+       config unbound
+               option dnsmasq_link_dns '1'
+               ...
+
+**/etc/config/dhcp**:
+
+       config dnsmasq
+               option option noresolv '1'
+               option resolvfile '<empty>'
+               option port '1053'
+               ...
+
+       config dhcp '<name>'
+               list dhcp_option 'option:dns-server,0.0.0.0'
+               ...
 
 Alternatives are mentioned here for completeness. DHCP event scripts which write host records are difficult to formulate for Unbound, NSD, or Bind. These programs sometimes need to be forcefully reloaded with host configuration, and reloads can bust cache. **Serial** configuration between dnsmasq and Unbound can be made on 127.0.0.1 with an off-port like #1053. This may double cache storage and incur unnecessary transfer delay.
 
-## UCI Options
+## Back to Manual Configuration
+You don't want UCI, but don't worry. We have UCI for that. However, OpenWrt or LEDE are targeted at embedded machines with flash ROM. The initialization scripts do a few things to protect flash ROM. 
+
+All of `/etc/unbound` (persistent, ROM) is copied to `/var/lib/unbound` (tmpfs, RAM). Edit your manual `/etc/unbound/unbound.conf` to reference this `/var/lib/unbound` location for included files. Note in preparation for a jail, `/var/lib/unbound` is `chown unbound`. Configure for security in`/etc/unbound/unbound.conf` with options `username:unbound` and `chroot:/var/lib/unbound`. 
+
+Finally, `root.key` maintenance for DNSKEY RFC5011 would be hard on flash. Unbound natively updates frequently. It also creates and destroys working files in the process. In `/var/lib/unbound` this is no problem, but it would be gone at the next reboot. If you have DNSSEC (validator) active, then you should consider this UCI option. Choose how many days to copy from `/var/lib/unbound/root.key` (tmpfs) to `/etc/unbound/root.key` (flash). Keep the DNSKEY updated with your choice of flash activity.
+
+**/etc/config/unbound**:
+
+       config unbound
+               option manual_conf '1'
+               option root_age '30'
+
+## Complete List of UCI Options
 **/etc/config/unbound**:
 
        config unbound
                Currently only one instance is supported.
 
+       option dns64 '0'
+               Boolean. Enable DNS64 through Unbound in order to bridge networks
+               that are IPV6 only and IPV4 only (see RFC6052).
+
+       option dns64_prefix '64:ff9b::/96'
+               IPV6 Prefix. The IPV6 prefix wrapped on the IPV4 address for DNS64.
+               You should use RFC6052 "well known" address, unless you also 
+               redirect to a proxy or gateway for your NAT64.
+
        option dnsmasq_gate_name '0'
                Boolean. Forward PTR records for interfaces not serving DHCP.
                Assume these are WAN. Example dnsmasq option here to provide
index 83121029808a82a34584ac4952b19011447ac1e8..16291dcbe07ea1fa5358b3c699101a18d2307212 100644 (file)
@@ -23,6 +23,7 @@
 UNBOUND_B_CONTROL=0
 UNBOUND_B_DNSMASQ=0
 UNBOUND_B_DNSSEC=0
+UNBOUND_B_DNS64=0
 UNBOUND_B_GATE_NAME=0
 UNBOUND_B_LOCL_BLCK=0
 UNBOUND_B_LOCL_NAME=0
@@ -32,6 +33,8 @@ UNBOUND_B_NTP_BOOT=1
 UNBOUND_B_PRIV_BLCK=1
 UNBOUND_B_QUERY_MIN=0
 
+UNBOUND_IP_DNS64="64:ff9b::/96"
+
 UNBOUND_D_RESOURCE=small
 UNBOUND_D_RECURSION=passive
 
@@ -104,6 +107,7 @@ create_domain_insecure() {
 
 unbound_mkdir() {
   mkdir -p $UNBOUND_VARDIR
+  touch $UNBOUND_CONFFILE
 
 
   if [ -f /etc/unbound/root.hints ] ; then
@@ -139,7 +143,7 @@ unbound_mkdir() {
 
 unbound_conf() {
   local cfg=$1
-  local rt_mem rt_conn
+  local rt_mem rt_conn modulestring
 
   {
     # Make fresh conf file
@@ -284,6 +288,9 @@ unbound_conf() {
     logger -t unbound -s "default memory resource consumption"
   fi
 
+  # Assembly of module-config: options is tricky; order matters
+  modulestring="iterator"
+
 
   if [ "$UNBOUND_B_DNSSEC" -gt 0 ] ; then
     if [ ! -f "$UNBOUND_TIMEFILE" -a "$UNBOUND_B_NTP_BOOT" -gt 0 ] ; then
@@ -293,23 +300,30 @@ unbound_conf() {
 
 
     {
-      # Validation of DNSSEC
-      echo "  module-config: \"validator iterator\""
       echo "  harden-dnssec-stripped: yes"
       echo "  val-clean-additional: yes"
       echo "  ignore-cd-flag: yes"
-      echo
     } >> $UNBOUND_CONFFILE
 
-  else
-    {
-      # Just iteration without DNSSEC
-      echo "  module-config: \"iterator\""
-      echo
-    } >> $UNBOUND_CONFFILE
+
+    modulestring="validator $modulestring"
   fi
 
 
+  if [ "$UNBOUND_B_DNS64" -gt 0 ] ; then
+    echo "  dns64-prefix: $UNBOUND_IP_DNS64" >> $UNBOUND_CONFFILE
+
+    modulestring="dns64 $modulestring"
+  fi
+
+
+  {
+    # Print final module string
+    echo "  module-config: \"$modulestring\""
+    echo
+  }  >> $UNBOUND_CONFFILE
+
+
   if [ "$UNBOUND_B_QUERY_MIN" -gt 0 ] ; then
     # Minor improvement on query privacy
     echo "  qname-minimisation: yes" >> $UNBOUND_CONFFILE
@@ -425,7 +439,8 @@ unbound_uci() {
   ####################
   # UCI @ unbound    #
   ####################
-
+  
+  config_get_bool UNBOUND_B_DNS64     "$cfg" dns64 0
   config_get_bool UNBOUND_B_GATE_NAME "$cfg" dnsmsaq_gate_name 0
   config_get_bool UNBOUND_B_DNSMASQ   "$cfg" dnsmasq_link_dns 0
   config_get_bool UNBOUND_B_LOCL_NAME "$cfg" dnsmasq_only_local 0
@@ -438,6 +453,7 @@ unbound_uci() {
   config_get_bool UNBOUND_B_DNSSEC    "$cfg" validator  0
   config_get_bool UNBOUND_B_NTP_BOOT  "$cfg" validator_ntp 1
 
+  config_get UNBOUND_IP_DNS64    "$cfg" dns64_prefix "64:ff9b::/96"
   config_get UNBOUND_N_EDNS_SIZE "$cfg" edns_size 1280
   config_get UNBOUND_N_RX_PORT   "$cfg" listen_port 53
   config_get UNBOUND_D_RECURSION "$cfg" recursion passive
@@ -478,13 +494,6 @@ unbound_uci() {
 
 
   if [ "$UNBOUND_B_MAN_CONF" -gt 0 ] ; then
-    if [ -f /etc/unbound/unbound.conf ] ; then
-      # You don't want UCI and use your own manual configuration
-      # or with no base file whatever Unbound defaults are.
-      cp -p /etc/unbound/unbound.conf $UNBOUND_CONFFILE
-    fi
-
-
     # Don't want this being triggered. Maybe we could, but then the
     # base conf you provide would need to be just right.
     UNBOUND_B_DNSMASQ=0
@@ -505,13 +514,13 @@ unbound_own () {
   } > $UNBOUND_CHECKFILE
 
 
-  if [ ! -f "$UNBOUND_CONFFILE" ] ; then
-    # if somehow this happened
-    touch $UNBOUND_CONFFILE
+  if [ "$UNBOUND_B_MAN_CONF" -gt 0 ] ; then
+    # You are doing your own thing, so just copy /etc/ to /var/
+    cp -p /etc/unbound/* $UNBOUND_VARDIR/
   fi
 
 
-  # Ensure Access
+  # Ensure access and prepare to jail
   chown -R unbound:unbound $UNBOUND_VARDIR
   chmod 775 $UNBOUND_VARDIR
   chmod 664 $UNBOUND_VARDIR/*
index 02854a8384047691f30e93a63f7d36aa05f8574b..5fee3eb92cea00435ec0dac63a3cd06c0da4a7fc 100644 (file)
@@ -1,4 +1,6 @@
 config unbound
+       option dns64 '0'
+       option dns64_prefix '64:ff9b::/96'
        option dnsmsaq_gate_name '0'
        option dnsmasq_link_dns '0'
        option dnsmasq_only_local '0'
diff --git a/utils/ecdsautils/Makefile b/utils/ecdsautils/Makefile
new file mode 100644 (file)
index 0000000..e5f3567
--- /dev/null
@@ -0,0 +1,72 @@
+#
+# Copyright (C) 2012-2016 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=ecdsautils
+PKG_VERSION:=0.3.2.20160630
+PKG_RELEASE:=1
+PKG_REV:=07538893fb6c2a9539678c45f9dbbf1e4f222b46
+PKG_MAINTAINER:=Matthias Schiffer <mschiffer@universe-factory.net>
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE_URL:=git://github.com/tcatm/$(PKG_NAME).git
+PKG_SOURCE_VERSION:=$(PKG_REV)
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE_PROTO:=git
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+define Package/libecdsautil
+  SECTION:=libs
+  CATEGORY:=Libraries
+  DEPENDS:=+libuecc
+  TITLE:=ECDSA library
+  URL:=https://github.com/tcatm/ecdsautils
+endef
+
+define Package/ecdsautils
+  SECTION:=utils
+  CATEGORY:=Utilities
+  DEPENDS:=+libecdsautil +libuecc
+  TITLE:=ECDSA Utilities
+  URL:=https://github.com/tcatm/ecdsautils
+endef
+
+CMAKE_OPTIONS += \
+  -DCMAKE_BUILD_TYPE:String="MINSIZEREL" \
+
+
+define Package/libecdsautil/description
+ Library to sign and verify checksums using ECDSA.
+endef
+
+define Package/ecdsautils/description
+ Utilities to sign and verify checksums using ECDSA.
+endef
+
+define Package/libecdsautil/install
+       $(INSTALL_DIR) $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libecdsautil.so* $(1)/usr/lib/
+endef
+
+define Package/ecdsautils/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ecdsautil $(1)/usr/bin/
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/ecdsakeygen $(1)/usr/bin/
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/ecdsasign $(1)/usr/bin/
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/ecdsaverify $(1)/usr/bin/
+endef
+
+define Build/InstallDev
+       $(INSTALL_DIR) $(1)/usr/
+       $(CP) $(PKG_INSTALL_DIR)/usr/include $(1)/usr/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib $(1)/usr/
+endef
+
+$(eval $(call BuildPackage,libecdsautil))
+$(eval $(call BuildPackage,ecdsautils))
index 75042103ea68429bdb5d4d31926bd0852624f443..76c1c4fe514d7893c6dd602702857e65336732ff 100644 (file)
@@ -1,5 +1,6 @@
 #
 # Copyright (C) 2016 OpenWrt.org
+# Copyright (C) 2016 Yousong Zhou <yszhou4tech@gmail.com>
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=qemu
-PKG_VERSION:=2.5.0
-PKG_RELEASE:=1
+PKG_VERSION:=2.6.2
+PKG_RELEASE:=3
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://wiki.qemu-project.org/download/
-PKG_SOURCE_MD5SUM:=f469f2330bbe76e3e39db10e9ac4f8db
+PKG_SOURCE_MD5SUM:=bdf1f3d0c177ebeb35a079a4bc3fc74e
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=LICENSE tcg/LICENSE
 PKG_MAINTAINER:=Yousong Zhou <yszhou4tech@gmail.com>
 
+PKG_INSTALL:=1
+PKG_USE_MIPS16:=0
+
+include $(INCLUDE_DIR)/uclibc++.mk
 include $(INCLUDE_DIR)/package.mk
 
+
+QEMU_DEPS_IN_GUEST := @(TARGET_x86_64||TARGET_armvirt||TARGET_arm64||TARGET_malta)
+QEMU_DEPS_IN_HOST := @(TARGET_x86_64||TARGET_sunxi)
+
+define Package/virtio-console-helper
+  SECTION:=utils
+  CATEGORY:=Utilities
+  SUBMENU:=Virtualization
+  TITLE:=Helper script for vportNpn virtio-console devices
+  DEPENDS:=$(QEMU_DEPS_IN_GUEST)
+endef
+
+define Package/virtio-console-helper/install
+       $(INSTALL_DIR) $(1)/etc/hotplug.d/virtio-ports
+       $(INSTALL_BIN) ./files/00-virtio-ports.hotplug $(1)/etc/hotplug.d/virtio-ports/00-virtio-ports
+endef
+
+
 define Package/qemu-ga
   SECTION:=utils
   CATEGORY:=Utilities
+  SUBMENU:=Virtualization
   TITLE:=QEMU Guest Agent
   URL:=http://www.qemu.org
-  DEPENDS:=+glib2 +libpthread +libstdcpp +librt
+  DEPENDS:= +glib2 +virtio-console-helper $(CXX_DEPENDS) $(QEMU_DEPS_IN_GUEST)
 endef
 
 define Package/qemu-ga/description
-This package contains the QEMU Guest Agent daemon
+  This package contains the QEMU Guest Agent daemon
+endef
+
+define Package/qemu-ga/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/qemu-ga $(1)/usr/bin
+       $(INSTALL_DIR) $(1)/etc/init.d
+       $(INSTALL_BIN) ./files/qemu-ga.init $(1)/etc/init.d/qemu-ga
+       $(INSTALL_DIR) $(1)/etc/hotplug.d/virtio-ports
+       $(INSTALL_BIN) ./files/10-qemu-ga.hotplug $(1)/etc/hotplug.d/virtio-ports/10-qemu-ga
+endef
+
+
+define Package/qemu-blobs
+  SECTION:=utils
+  CATEGORY:=Utilities
+  SUBMENU:=Virtualization
+  TITLE:=QEMU blobs of BIOS, VGA BIOS and keymaps
+  URL:=http://www.qemu.org
+  DEPENDS:=$(QEMU_DEPS_IN_HOST)
+endef
+
+define Package/qemu-blobs/install
+       $(INSTALL_DIR) $(1)/usr/share/qemu
+       $(CP) $(PKG_INSTALL_DIR)/usr/share/qemu/* $(1)/usr/share/qemu
+endef
+
+define Package/qemu-bridge-helper
+  SECTION:=utils
+  CATEGORY:=Utilities
+  SUBMENU:=Virtualization
+  TITLE:=QEMU bridge helper
+  URL:=http://www.qemu.org
+  DEPENDS:=+glib2 $(CXX_DEPENDS) $(QEMU_DEPS_IN_HOST)
+endef
+
+define Package/qemu-bridge-helper/install
+       $(INSTALL_DIR) $(1)/usr/lib/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/qemu-bridge-helper $(1)/usr/lib
+       $(INSTALL_DIR) $(1)/etc/qemu
+       $(INSTALL_DATA) ./files/bridge.conf $(1)/etc/qemu
+endef
+
+PKG_CONFIG_DEPENDS += CONFIG_PACKAGE_qemu-ga
+
+# Naming rules used in qemu Makefile.target
+define qemu-prog_
+  $(if $(filter %-softmmu,$(1)), \
+    $(patsubst %-softmmu,qemu-system-%,$(1)), \
+    $(error unknown qemu target $(1)) \
+  )
+endef
+qemu-prog = $(strip $(call qemu-prog_,$(1)))
+
+# Why libfdt was enabled for all softmmu targets:  according to qemu's
+# configure script, libfdt is only strictly required for the following targets
+# and is optional for others.  But libfdt support will be built into other
+# targets when any single target enabled it.
+#
+#      aarch64%-softmmu arm%-softmmu ppc%-softmmu microblaze%-softmmu
+#
+define qemu-target
+  PKG_CONFIG_DEPENDS += CONFIG_PACKAGE_qemu-$(1)
+
+  define Package/qemu-$(1)
+    SECTION:=utils
+    CATEGORY:=Utilities
+    SUBMENU:=Virtualization
+    TITLE:=QEMU target $(1)
+    URL:=http://www.qemu.org
+    DEPENDS:= +glib2 +libpthread +zlib $(CXX_DEPENDS) $(QEMU_DEPS_IN_HOST) \
+       $(if $(filter %-softmmu,$(1)),+libncurses +libfdt +qemu-blobs)
+  endef
+
+  define Package/qemu-$(1)/description
+    This package contains the QEMU target $(1)
+  endef
+
+  define Package/qemu-$(1)/install
+       $(INSTALL_DIR) $$(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(call qemu-prog,$(1)) $$(1)/usr/bin
+  endef
+
 endef
 
+QEMU_TARGET_LIST :=    \
+       x86_64-softmmu  \
+       arm-softmmu     \
+
+$(foreach target,$(QEMU_TARGET_LIST), \
+  $(eval $(call qemu-target,$(target))) \
+)
+
 # QEMU configure script does not recognize these options
 CONFIGURE_ARGS:=$(filter-out   \
        --target=%              \
@@ -42,35 +156,106 @@ CONFIGURE_ARGS:=$(filter-out      \
        --disable-nls           \
        , $(CONFIGURE_ARGS))
 
-# Building qemu-ga alone does not require zlib, pixman
-#
-# --disable-tools to disable building pixman which will fail at the moment on
-#  octeon mips64 target.
+# Tell build system of qemu to not add _FORTIFY_SOURCE options and let the base
+# build system decide flavor of fortify_source to use
 CONFIGURE_ARGS +=                      \
        --cross-prefix=$(TARGET_CROSS)  \
        --host-cc="$(HOSTCC)"           \
-       --target-list=''                \
+       --disable-fortify-source        \
+       --disable-stack-protector       \
+
+CONFIGURE_ARGS +=                      \
+       --audio-drv-list=''             \
+       --disable-debug-info            \
+       --disable-modules               \
+       --disable-sdl                   \
+       --disable-qom-cast-debug        \
+       --disable-virtfs                \
+       --disable-vnc                   \
+       --disable-debug-tcg             \
+       --disable-sparse                \
+       --disable-strip                 \
+       --disable-vnc-sasl              \
+       --disable-vnc-jpeg              \
+       --disable-vnc-png               \
+       --disable-uuid                  \
+       --disable-vde                   \
+       --disable-netmap                \
+       --disable-xen                   \
+       --disable-xen-pci-passthrough   \
+       --disable-xen-pv-domain-build   \
+       --disable-brlapi                \
+       --disable-bluez                 \
+       --disable-tcg-interpreter       \
+       --disable-cap-ng                \
+       --disable-spice                 \
+       --disable-libiscsi              \
+       --disable-libnfs                \
+       --disable-cocoa                 \
+       --disable-bsd-user              \
+       --disable-curl                  \
+       --disable-linux-aio             \
+       --disable-attr                  \
+       --disable-docs                  \
+       --disable-opengl                \
+       --disable-rbd                   \
+       --disable-xfsctl                \
+       --disable-smartcard             \
+       --disable-libusb                \
+       --disable-usb-redir             \
        --disable-zlib-test             \
+       --disable-lzo                   \
+       --disable-snappy                \
+       --disable-bzip2                 \
+       --disable-guest-agent-msi       \
        --disable-tools                 \
-       --without-pixman
+       --disable-seccomp               \
+       --disable-glusterfs             \
+       --disable-archipelago           \
+       --disable-gtk                   \
+       --disable-gnutls                \
+       --disable-nettle                \
+       --disable-gcrypt                \
+       --disable-rdma                  \
+       --disable-vte                   \
+       --disable-virglrenderer         \
+       --disable-tpm                   \
+       --disable-libssh2               \
+       --disable-vhdx                  \
+       --disable-numa                  \
+       --disable-tcmalloc              \
+       --disable-jemalloc              \
+       --disable-strip                 \
+       --disable-werror                \
+
+QEMU_CONFIGURE_TARGET_LIST := $(foreach target,$(QEMU_TARGET_LIST),$(if $(CONFIG_PACKAGE_qemu-$(target)),$(target)))
+CONFIGURE_ARGS += --target-list='$(QEMU_CONFIGURE_TARGET_LIST)'
 
 ifneq ($(CONFIG_PACKAGE_qemu-ga),)
 CONFIGURE_ARGS += --enable-guest-agent
 endif
 
+TARGET_LDFLAGS += -Wl,--as-needed
 MAKE_VARS += V=s
+# ARCH is special in qemu's build system, e.g. ARCH mips64 will be translated
+# there to mips and stored in config-host.mak
+MAKE_FLAGS:=$(filter-out       \
+       ARCH=%                  \
+       ,$(MAKE_FLAGS))
 
-define Build/Compile
-       $(if $(CONFIG_PACKAGE_qemu-ga),$(call Build/Compile/Default,qemu-ga))
-endef
+QEMU_MAKE_TARGETS := \
+       $(if $(CONFIG_PACKAGE_qemu-ga),qemu-ga) \
+       $(if $(CONFIG_PACKAGE_qemu-bridge-helper),qemu-bridge-helper) \
+       $(foreach target,$(QEMU_TARGET_LIST),$(if $(CONFIG_PACKAGE_qemu-$(target)),subdir-$(target))) \
 
-define Package/qemu-ga/install
-       $(INSTALL_DIR) $(1)/usr/bin
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/qemu-ga $(1)/usr/bin
-       $(INSTALL_DIR) $(1)/etc/init.d
-       $(INSTALL_BIN) ./files/qemu-ga.init $(1)/etc/init.d/qemu-ga
-       $(INSTALL_DIR) $(1)/etc/hotplug.d/virtio-ports
-       $(INSTALL_BIN) ./files/virtio-ports.hotplug $(1)/etc/hotplug.d/virtio-ports/qemu-ga
+define Build/Compile
+       $(if $(strip $(QEMU_MAKE_TARGETS)),$(call Build/Compile/Default,$(QEMU_MAKE_TARGETS)))
 endef
 
+$(eval $(call BuildPackage,virtio-console-helper))
 $(eval $(call BuildPackage,qemu-ga))
+$(eval $(call BuildPackage,qemu-bridge-helper))
+$(eval $(call BuildPackage,qemu-blobs))
+$(foreach target,$(QEMU_TARGET_LIST), \
+  $(eval $(call BuildPackage,qemu-$(target))) \
+)
diff --git a/utils/qemu/files/00-virtio-ports.hotplug b/utils/qemu/files/00-virtio-ports.hotplug
new file mode 100755 (executable)
index 0000000..1edea39
--- /dev/null
@@ -0,0 +1,19 @@
+#!/bin/sh
+# Copyright (C) 2016 OpenWrt.org
+# Copyright (C) 2016 Yousong Zhou <yszhou4tech@gmail.com>
+
+[ "$SUBSYSTEM" = "virtio-ports" ] || exit 0
+
+syspath="/sys/$DEVPATH"
+name="$(cat "$syspath/name" 2>/dev/null)"
+[ -n "$name" ] || exit 0
+
+case "$ACTION" in
+       "add")
+               mkdir -p /dev/virtio-ports
+               ln -s "/dev/$DEVNAME" "/dev/virtio-ports/$name"
+               ;;
+       "del")
+               rm -f "/dev/virtio-ports/$name"
+               ;;
+esac
diff --git a/utils/qemu/files/10-qemu-ga.hotplug b/utils/qemu/files/10-qemu-ga.hotplug
new file mode 100755 (executable)
index 0000000..56256ca
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/sh
+# Copyright (C) 2016 OpenWrt.org
+# Copyright (C) 2016 Yousong Zhou <yszhou4tech@gmail.com>
+
+[ "$SUBSYSTEM" = "virtio-ports" ] || exit 0
+
+syspath="/sys/$DEVPATH"
+name="$(cat "$syspath/name" 2>/dev/null)"
+[ -n "$name" ] || exit 0
+
+case "$ACTION" in
+       "add")
+               /etc/init.d/qemu-ga start
+               ;;
+esac
diff --git a/utils/qemu/files/bridge.conf b/utils/qemu/files/bridge.conf
new file mode 100644 (file)
index 0000000..545a163
--- /dev/null
@@ -0,0 +1 @@
+allow all
diff --git a/utils/qemu/files/virtio-ports.hotplug b/utils/qemu/files/virtio-ports.hotplug
deleted file mode 100755 (executable)
index 35919a5..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/sh
-# Copyright (C) 2016 OpenWrt.org
-
-[ "$SUBSYSTEM" = "virtio-ports" ] || exit 0
-
-syspath="/sys/$DEVPATH"
-name="$(cat "$syspath/name" 2>/dev/null)"
-[ -n "$name" ] || exit 0
-
-case "$ACTION" in
-       "add")
-               mkdir -p /dev/virtio-ports
-               ln -s "/dev/$DEVNAME" "/dev/virtio-ports/$name"
-               /etc/init.d/qemu-ga start
-               ;;
-       "del")
-               rm -f "/dev/virtio-ports/$name"
-               ;;
-esac
diff --git a/utils/qemu/patches/0001-allow-disable-fortify-source.patch b/utils/qemu/patches/0001-allow-disable-fortify-source.patch
new file mode 100644 (file)
index 0000000..ef6813a
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/configure.orig   2016-11-22 11:53:25.739180380 +0800
++++ b/configure        2016-11-22 11:53:55.183189596 +0800
+@@ -1147,6 +1147,8 @@ for opt do
+   ;;
+   --enable-jemalloc) jemalloc="yes"
+   ;;
++  --disable-fortify-source) fortify_source="no"
++  ;;
+   *)
+       echo "ERROR: unknown option $opt"
+       echo "Try '$0 --help' for more information"
diff --git a/utils/qemu/patches/0002-setting-language-type-for-_asm-files.patch b/utils/qemu/patches/0002-setting-language-type-for-_asm-files.patch
new file mode 100644 (file)
index 0000000..ea6d49d
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/rules.mak.orig   2016-11-22 13:30:40.933006727 +0800
++++ b/rules.mak        2016-11-22 13:30:47.229008698 +0800
+@@ -70,7 +70,7 @@ LINK = $(call quiet-command, $(LINKPROG)
+       $(call quiet-command,$(CPP) $(QEMU_INCLUDES) $(QEMU_CFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) -o $@ $<,"  CPP   $(TARGET_DIR)$@")
+ %.o: %.asm
+-      $(call quiet-command,$(AS) $(ASFLAGS) -o $@ $<,"  AS    $(TARGET_DIR)$@")
++      $(call quiet-command,$(AS) $(ASFLAGS) -o $@ -x assembler $<,"  AS    $(TARGET_DIR)$@")
+ %.o: %.cc
+       $(call quiet-command,$(CXX) $(QEMU_INCLUDES) $(QEMU_CXXFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) $($@-cflags) -c -o $@ $<,"  CXX   $(TARGET_DIR)$@")
diff --git a/utils/qemu/patches/0003-disable-avx2_opt-with-musl.patch b/utils/qemu/patches/0003-disable-avx2_opt-with-musl.patch
new file mode 100644 (file)
index 0000000..c52cb4c
--- /dev/null
@@ -0,0 +1,14 @@
+--- a/configure.orig   2016-11-22 17:35:12.069598617 +0800
++++ b/configure        2016-11-22 18:24:01.042515353 +0800
+@@ -1789,7 +1789,10 @@ static void foo(void) __attribute__((ifu
+ int main(void) { foo(); return 0; }
+ EOF
+ if compile_prog "-mavx2" "" ; then
+-    if readelf --syms $TMPE |grep "IFUNC.*foo" >/dev/null 2>&1; then
++    if readelf --program-headers $TMPE | grep -iq 'Requesting program interpreter: .*ld-musl'; then
++        # ifunc support is not available with dynamic linker of musl
++        avx2_opt="no"
++    elif readelf --syms $TMPE |grep "IFUNC.*foo" >/dev/null 2>&1; then
+         avx2_opt="yes"
+     fi
+ fi
diff --git a/utils/qemu/patches/0004-pixman-fix-detection-of-mips-dspr2.patch b/utils/qemu/patches/0004-pixman-fix-detection-of-mips-dspr2.patch
new file mode 100644 (file)
index 0000000..05e34e0
--- /dev/null
@@ -0,0 +1,10 @@
+--- a/pixman/configure.ac.orig 2016-11-22 20:44:21.205150763 +0800
++++ b/pixman/configure.ac      2016-11-22 20:44:55.505161500 +0800
+@@ -720,7 +720,6 @@ dnl Check if assembler is gas compatible
+ have_mips_dspr2=no
+ AC_MSG_CHECKING(whether to use MIPS DSPr2 assembler)
+ xserver_save_CFLAGS=$CFLAGS
+-CFLAGS="-mdspr2 $CFLAGS"
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+ #if !(defined(__mips__) &&  __mips_isa_rev >= 2)
diff --git a/utils/qemu/patches/0005-pixman-arm-neon-assembler-fix.patch b/utils/qemu/patches/0005-pixman-arm-neon-assembler-fix.patch
new file mode 100644 (file)
index 0000000..93c967a
--- /dev/null
@@ -0,0 +1,17 @@
+--- a/pixman/pixman/pixman-private.h.orig      2016-11-22 22:10:33.574769654 +0800
++++ b/pixman/pixman/pixman-private.h   2016-11-22 22:10:47.638774056 +0800
+@@ -1,5 +1,3 @@
+-#include <float.h>
+-
+ #ifndef PIXMAN_PRIVATE_H
+ #define PIXMAN_PRIVATE_H
+@@ -17,6 +15,8 @@
+ #ifndef __ASSEMBLER__
++#include <float.h>
++
+ #ifndef PACKAGE
+ #  error config.h must be included before pixman-private.h
+ #endif
diff --git a/utils/qemu/patches/0006-libvixl-cxx-macro-isnan.patch b/utils/qemu/patches/0006-libvixl-cxx-macro-isnan.patch
new file mode 100644 (file)
index 0000000..0dae8ce
--- /dev/null
@@ -0,0 +1,55 @@
+--- a/disas/libvixl/vixl/utils.h.orig  2016-11-22 22:36:20.691253883 +0800
++++ b/disas/libvixl/vixl/utils.h       2016-11-22 22:55:44.639618185 +0800
+@@ -118,11 +118,17 @@ double double_pack(uint64_t sign, uint64
+ // An fpclassify() function for 16-bit half-precision floats.
+ int float16classify(float16 value);
++#ifdef isnan
++#define isnan_ isnan
++#else
++#define isnan_ std::isnan
++#endif
++
+ // NaN tests.
+ inline bool IsSignallingNaN(double num) {
+   const uint64_t kFP64QuietNaNMask = UINT64_C(0x0008000000000000);
+   uint64_t raw = double_to_rawbits(num);
+-  if (std::isnan(num) && ((raw & kFP64QuietNaNMask) == 0)) {
++  if (isnan_(num) && ((raw & kFP64QuietNaNMask) == 0)) {
+     return true;
+   }
+   return false;
+@@ -132,7 +138,7 @@ inline bool IsSignallingNaN(double num)
+ inline bool IsSignallingNaN(float num) {
+   const uint32_t kFP32QuietNaNMask = 0x00400000;
+   uint32_t raw = float_to_rawbits(num);
+-  if (std::isnan(num) && ((raw & kFP32QuietNaNMask) == 0)) {
++  if (isnan_(num) && ((raw & kFP32QuietNaNMask) == 0)) {
+     return true;
+   }
+   return false;
+@@ -148,21 +154,21 @@ inline bool IsSignallingNaN(float16 num)
+ template <typename T>
+ inline bool IsQuietNaN(T num) {
+-  return std::isnan(num) && !IsSignallingNaN(num);
++  return isnan_(num) && !IsSignallingNaN(num);
+ }
+ // Convert the NaN in 'num' to a quiet NaN.
+ inline double ToQuietNaN(double num) {
+   const uint64_t kFP64QuietNaNMask = UINT64_C(0x0008000000000000);
+-  VIXL_ASSERT(std::isnan(num));
++  VIXL_ASSERT(isnan_(num));
+   return rawbits_to_double(double_to_rawbits(num) | kFP64QuietNaNMask);
+ }
+ inline float ToQuietNaN(float num) {
+   const uint32_t kFP32QuietNaNMask = 0x00400000;
+-  VIXL_ASSERT(std::isnan(num));
++  VIXL_ASSERT(isnan_(num));
+   return rawbits_to_float(float_to_rawbits(num) | kFP32QuietNaNMask);
+ }