Browse Source

Merge branch 'master' of https://github.com/openwrt/packages

lilik-openwrt-22.03
Mirko Vogt 9 years ago
parent
commit
4dbeaacf20
76 changed files with 1812 additions and 303 deletions
  1. +2
    -2
      devel/patch/Makefile
  2. +2
    -1
      lang/lua-penlight/Makefile
  3. +2
    -2
      lang/php5/Makefile
  4. +7
    -0
      lang/python/files/python-package.mk
  5. +76
    -21
      lang/python3/Makefile
  6. +16
    -0
      lang/python3/files/python3-package-asyncio.mk
  7. +22
    -0
      lang/python3/files/python3-package-codecs.mk
  8. +18
    -0
      lang/python3/files/python3-package-ctypes.mk
  9. +17
    -0
      lang/python3/files/python3-package-dbm.mk
  10. +17
    -0
      lang/python3/files/python3-package-decimal.mk
  11. +16
    -0
      lang/python3/files/python3-package-distutils.mk
  12. +16
    -0
      lang/python3/files/python3-package-email.mk
  13. +16
    -0
      lang/python3/files/python3-package-gdbm.mk
  14. +16
    -0
      lang/python3/files/python3-package-logging.mk
  15. +17
    -0
      lang/python3/files/python3-package-multiprocessing.mk
  16. +18
    -0
      lang/python3/files/python3-package-ncurses.mk
  17. +17
    -0
      lang/python3/files/python3-package-openssl.mk
  18. +18
    -0
      lang/python3/files/python3-package-pydoc.mk
  19. +17
    -0
      lang/python3/files/python3-package-sqlite3.mk
  20. +16
    -0
      lang/python3/files/python3-package-unittest.mk
  21. +19
    -0
      lang/python3/files/python3-package-xml.mk
  22. +1
    -1
      lang/python3/files/python3-package.mk
  23. +0
    -0
      lang/python3/patches/001-enable-zlib.patch
  24. +0
    -0
      lang/python3/patches/002-do-not-add-include-dirs-when-cross-compiling.patch
  25. +0
    -0
      lang/python3/patches/003-do-not-run-distutils-tests.patch
  26. +0
    -0
      lang/python3/patches/004-do-not-write-bytes-codes.patch
  27. +31
    -0
      lang/python3/patches/005-fix-libffi-x86-64-configure.patch
  28. +12
    -0
      lang/python3/patches/006-remove-debian-multiarch-support.patch
  29. +10
    -0
      lang/python3/patches/007-distutils-do-not-adjust-path.patch
  30. +15
    -0
      lang/python3/patches/010-do-not-add-rt-lib-dirs-when-cross-compiling.patch
  31. +2
    -2
      libs/avahi/Makefile
  32. +2
    -2
      libs/libtasn1/Makefile
  33. +4
    -1
      mail/bogofilter/Makefile
  34. +2
    -2
      net/dmapd/Makefile
  35. +54
    -11
      net/git/Makefile
  36. +13
    -46
      net/git/patches/100-convert_builtin.patch
  37. +32
    -0
      net/git/patches/300-configure_for_crosscompiling
  38. +11
    -0
      net/git/patches/400-imapsend_without_curl.patch
  39. +8
    -9
      net/knxd/Makefile
  40. +13
    -20
      net/linknx/Makefile
  41. +2
    -2
      net/mdnsresponder/Makefile
  42. +12
    -20
      net/mdnsresponder/patches/001-cross_compile.patch
  43. +12
    -12
      net/mdnsresponder/patches/100-linux_fixes.patch
  44. +2
    -2
      net/mwan3-luci/Makefile
  45. +33
    -0
      net/mwan3-luci/files/usr/lib/lua/luci/model/cbi/mwan/rule.lua
  46. +13
    -0
      net/mwan3-luci/files/usr/lib/lua/luci/model/cbi/mwan/ruleconfig.lua
  47. +3
    -3
      net/mwan3/Makefile
  48. +8
    -7
      net/mwan3/files/etc/config/mwan3
  49. +117
    -52
      net/mwan3/files/etc/hotplug.d/iface/15-mwan3
  50. +27
    -21
      net/mwan3/files/usr/sbin/mwan3
  51. +0
    -6
      net/net-snmp/Makefile
  52. +0
    -1
      net/net-snmp/files/snmpd.default
  53. +45
    -31
      net/net-snmp/files/snmpd.init
  54. +3
    -3
      net/openconnect/Makefile
  55. +4
    -5
      net/openssh/Makefile
  56. +1
    -1
      net/openssh/patches/130-implicit_memset_decl_fix.patch
  57. +2
    -2
      net/snort/Makefile
  58. +3
    -3
      net/sslh/Makefile
  59. +1
    -1
      net/sslh/patches/001-no_sslh_select.patch
  60. +77
    -0
      net/stunnel/Makefile
  61. +45
    -0
      net/stunnel/files/stunnel.conf
  62. +12
    -0
      net/stunnel/files/stunnel.init
  63. +25
    -0
      net/stunnel/patches/010_fix_getnameinfo.patch
  64. +140
    -0
      net/stunnel/patches/011_disable_ssp_linking.patch
  65. +1
    -1
      net/tor/Makefile
  66. +110
    -0
      sound/pianod/Makefile
  67. +42
    -0
      sound/pianod/files/pianod.init
  68. +29
    -0
      sound/pianod/patches/005-Fix_IPV6_socket_handling.patch
  69. +42
    -0
      sound/pianod/patches/010-Configure_add_SSL_options.patch
  70. +59
    -0
      sound/pianod/patches/020-Use_package_config_h_for_all_modules.patch
  71. +344
    -0
      sound/pianod/patches/030-Waitress_add_polarssl_variant.patch
  72. +1
    -1
      utils/collectd/Makefile
  73. +1
    -1
      utils/mmc-utils/Makefile
  74. +11
    -0
      utils/mmc-utils/patches/001-dont-set-fortify-source-in-makefile.patch
  75. +6
    -4
      utils/nano/Makefile
  76. +4
    -4
      utils/zoneinfo/Makefile

+ 2
- 2
devel/patch/Makefile View File

@ -8,12 +8,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=patch
PKG_VERSION:=2.7.4
PKG_VERSION:=2.7.5
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@GNU/patch
PKG_MD5SUM:=abc59498fcdddd44e0d07764aa105fd2
PKG_MD5SUM:=e3da7940431633fb65a01b91d3b7a27a
PKG_LICENSE:=GPL-3.0+
PKG_LICENSE_FILES:=COPYING


+ 2
- 1
lang/lua-penlight/Makefile View File

@ -8,11 +8,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=lua-penlight
PKG_VERSION:=1.3.1
PKG_VERSION:=1.3.2
PKG_RELEASE:=1
PKG_BUILD_DIR:=$(BUILD_DIR)/Penlight-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/stevedonovan/Penlight/archive/
PKG_MD5SUM:=0315a39834bb6fab07741ec04ede1bf4
PKG_LICENSE:=MIT
PKG_LICENSE_FILE:=LICENSE.md


+ 2
- 2
lang/php5/Makefile View File

@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=php
PKG_VERSION:=5.6.6
PKG_VERSION:=5.6.7
PKG_RELEASE:=1
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
@ -18,7 +18,7 @@ PKG_LICENSE_FILES:=LICENSE
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://www.php.net/distributions/
PKG_MD5SUM:=b198117ee1d44c8143e030cee15f1b52
PKG_MD5SUM:=2e4b0534d4b8aa9aabedeef12e7c0aa8
PKG_FIXUP:=libtool autoreconf
PKG_BUILD_PARALLEL:=1


+ 7
- 0
lang/python/files/python-package.mk View File

@ -33,6 +33,13 @@ define HostPython
)
endef
# These configure args are needed in detection of path to Python header files
# using autotools.
CONFIGURE_ARGS += \
_python_sysroot="$(STAGING_DIR)" \
_python_prefix="/usr" \
_python_exec_prefix="/usr"
PKG_USE_MIPS16:=0
# This is required in addition to PKG_USE_MIPS16:=0 because otherwise MIPS16
# flags are inherited from the Python base package (via sysconfig module)


+ 76
- 21
lang/python3/Makefile View File

@ -1,5 +1,5 @@
#
# Copyright (C) 2006-2014 OpenWrt.org
# Copyright (C) 2006-2015 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
@ -14,12 +14,12 @@ 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:=http://www.python.org/ftp/python/$(PKG_VERSION)
PKG_MD5SUM:=36fc7327c02c6f12fa24fc9ba78039e3
PKG_MD5SUM:=7d092d1bba6e17f0d9bd21b49e441dd5
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
@ -57,7 +57,7 @@ endef
define Package/python3-base
$(call Package/python3/Default)
TITLE:=Python $(PYTHON_VERSION) interpreter
DEPENDS:=+libpthread +zlib +libffi +libopenssl
DEPENDS:=+libpthread +zlib
endef
define Package/python3-base/description
@ -65,13 +65,45 @@ define Package/python3-base/description
for the interpreter to start.
endef
define Package/python3-light
$(call Package/python3/Default)
TITLE:=Python $(PYTHON_VERSION) light installation
DEPENDS:=+python3-base +libffi +libbz2
endef
define Package/python3-light/description
This package is essentially the python3-base package plus
a few of the rarely used (and big) libraries stripped out
into separate packages.
endef
# Define newline here, since it's not defined in OpenWRT
define newline
endef
PYTHON3_LIB_FILES_DEL:=
PYTHON3_PACKAGES:=
PYTHON3_SO_SUFFIX:=cpython-34.so
define Py3BasePackage
PYTHON3_PACKAGES+=$(1)
PYTHON3_LIB_FILES_DEL+=$(2)
define Py3Package/$(1)/filespec
$(subst $(space),$(newline),$(foreach lib_file,$(2),+|$(lib_file)))
endef
endef
include ./files/python3-package-*.mk
define Package/python3
$(call Package/python3/Default)
DEPENDS:=+python3-base +libncursesw +libbz2 +libgdbm +libsqlite3 +libdb47
DEPENDS:=+python3-light $(foreach package,$(PYTHON3_PACKAGES),+$(package))
endef
define Package/python3/description
This package contains the (almost) full Python install.
It's python3-light + all other packages.
endef
MAKE_FLAGS+=\
@ -123,29 +155,35 @@ define Build/InstallDev
$(1)/usr/lib/python$(PYTHON_VERSION)/
endef
PYTHON3_BASE_LIB_FILES:= \
/usr/lib/python$(PYTHON_VERSION)/encodings \
/usr/lib/python$(PYTHON_VERSION)/_collections_abc.py \
/usr/lib/python$(PYTHON_VERSION)/_sitebuiltins.py \
/usr/lib/python$(PYTHON_VERSION)/_sysconfigdata.py \
/usr/lib/python$(PYTHON_VERSION)/_weakrefset.py \
/usr/lib/python$(PYTHON_VERSION)/abc.py \
/usr/lib/python$(PYTHON_VERSION)/codecs.py \
/usr/lib/python$(PYTHON_VERSION)/genericpath.py \
/usr/lib/python$(PYTHON_VERSION)/io.py \
/usr/lib/python$(PYTHON_VERSION)/os.py \
/usr/lib/python$(PYTHON_VERSION)/posixpath.py \
/usr/lib/python$(PYTHON_VERSION)/site.py \
/usr/lib/python$(PYTHON_VERSION)/sysconfig.py \
/usr/lib/python$(PYTHON_VERSION)/stat.py
PYTHON3_LIB_FILES_DEL+=$(PYTHON3_BASE_LIB_FILES)
define Py3Package/python3-base/filespec
+|/usr/bin/python$(PYTHON_VERSION)
+|/usr/lib/python$(PYTHON_VERSION)/encodings
+|/usr/lib/python$(PYTHON_VERSION)/_collections_abc.py
+|/usr/lib/python$(PYTHON_VERSION)/_sitebuiltins.py
+|/usr/lib/python$(PYTHON_VERSION)/_sysconfigdata.py
+|/usr/lib/python$(PYTHON_VERSION)/_weakrefset.py
+|/usr/lib/python$(PYTHON_VERSION)/abc.py
+|/usr/lib/python$(PYTHON_VERSION)/codecs.py
+|/usr/lib/python$(PYTHON_VERSION)/genericpath.py
+|/usr/lib/python$(PYTHON_VERSION)/io.py
+|/usr/lib/python$(PYTHON_VERSION)/os.py
+|/usr/lib/python$(PYTHON_VERSION)/posixpath.py
+|/usr/lib/python$(PYTHON_VERSION)/site.py
+|/usr/lib/python$(PYTHON_VERSION)/sysconfig.py
+|/usr/lib/python$(PYTHON_VERSION)/stat.py
$(subst $(space),$(newline),$(foreach lib_file,$(PYTHON3_BASE_LIB_FILES),+|$(lib_file)))
endef
define Py3Package/python3/filespec
define Py3Package/python3-light/filespec
+|/usr/lib/python$(PYTHON_VERSION)
-|/usr/lib/python$(PYTHON_VERSION)/config-$(PYTHON_VERSION)
-|/usr/lib/python$(PYTHON_VERSION)/distutils/cygwinccompiler.py
-|/usr/lib/python$(PYTHON_VERSION)/distutils/command/wininst*
-|/usr/lib/python$(PYTHON_VERSION)/ensurepip
-|/usr/lib/python$(PYTHON_VERSION)/idlelib
-|/usr/lib/python$(PYTHON_VERSION)/lib2to3
-|/usr/lib/python$(PYTHON_VERSION)/tkinter
@ -157,6 +195,8 @@ define Py3Package/python3/filespec
-|/usr/lib/python$(PYTHON_VERSION)/webbrowser.py
-|/usr/lib/python$(PYTHON_VERSION)/*/test
-|/usr/lib/python$(PYTHON_VERSION)/*/tests
-|/usr/lib/python$(PYTHON_VERSION)/_osx_support.py
$(subst $(space),$(newline),$(foreach lib_file,$(PYTHON3_LIB_FILES_DEL),-|$(lib_file)))
endef
define Py3Package/python3-base/install
@ -167,6 +207,14 @@ define Py3Package/python3-base/install
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libpython$(PYTHON_VERSION).so* $(1)/usr/lib/
endef
define Py3Package/python3/filespec
-|$(PYTHON3_PKG_DIR)
endef
HOST_CFLAGS+= \
-I/usr/include/ncursesw \
-I/usr/include/ncurses
HOST_CONFIGURE_ARGS+= \
--without-cxx-main \
--without-pymalloc \
@ -174,7 +222,7 @@ HOST_CONFIGURE_ARGS+= \
--prefix=$(STAGING_DIR_HOST) \
--with-ensurepip=upgrade \
CONFIG_SITE= \
OPT="$(HOST_CFLAGS)"
CFLAGS="$(HOST_CFLAGS)"
define Host/Compile
+$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) python Parser/pgen
@ -189,8 +237,15 @@ endef
$(eval $(call HostBuild))
$(foreach package, $(PYTHON3_PACKAGES), \
$(eval $(call Py3Package,$(package))) \
$(eval $(call BuildPackage,$(package))) \
)
$(eval $(call Py3Package,python3-base))
$(eval $(call Py3Package,python3-light))
$(eval $(call Py3Package,python3))
$(eval $(call BuildPackage,python3-base))
$(eval $(call BuildPackage,python3-light))
$(eval $(call BuildPackage,python3))

+ 16
- 0
lang/python3/files/python3-package-asyncio.mk View File

@ -0,0 +1,16 @@
#
# Copyright (C) 2006-2015 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
define Package/python3-asyncio
$(call Package/python3/Default)
TITLE:=Python $(PYTHON3_VERSION) asyncio module
DEPENDS:=+python3-light
endef
$(eval $(call Py3BasePackage,python3-asyncio, \
/usr/lib/python$(PYTHON3_VERSION)/asyncio \
))

+ 22
- 0
lang/python3/files/python3-package-codecs.mk View File

@ -0,0 +1,22 @@
#
# Copyright (C) 2006-2015 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
define Package/python3-codecs
$(call Package/python3/Default)
TITLE:=Python $(PYTHON3_VERSION) codecs + unicode support
DEPENDS:=+python3-light
endef
$(eval $(call Py3BasePackage,python3-codecs, \
/usr/lib/python$(PYTHON3_VERSION)/lib-dynload/_codecs_cn.$(PYTHON3_SO_SUFFIX) \
/usr/lib/python$(PYTHON3_VERSION)/lib-dynload/_codecs_hk.$(PYTHON3_SO_SUFFIX) \
/usr/lib/python$(PYTHON3_VERSION)/lib-dynload/_codecs_iso2022.$(PYTHON3_SO_SUFFIX) \
/usr/lib/python$(PYTHON3_VERSION)/lib-dynload/_codecs_jp.$(PYTHON3_SO_SUFFIX) \
/usr/lib/python$(PYTHON3_VERSION)/lib-dynload/_codecs_kr.$(PYTHON3_SO_SUFFIX) \
/usr/lib/python$(PYTHON3_VERSION)/lib-dynload/_codecs_tw.$(PYTHON3_SO_SUFFIX) \
/usr/lib/python$(PYTHON3_VERSION)/lib-dynload/unicodedata.$(PYTHON3_SO_SUFFIX) \
))

+ 18
- 0
lang/python3/files/python3-package-ctypes.mk View File

@ -0,0 +1,18 @@
#
# Copyright (C) 2006-2015 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
define Package/python3-ctypes
$(call Package/python3/Default)
TITLE:=Python $(PYTHON3_VERSION) ctypes module
DEPENDS:=+python3-light
endef
$(eval $(call Py3BasePackage,python3-ctypes, \
/usr/lib/python$(PYTHON3_VERSION)/ctypes \
/usr/lib/python$(PYTHON3_VERSION)/lib-dynload/_ctypes.$(PYTHON3_SO_SUFFIX) \
/usr/lib/python$(PYTHON3_VERSION)/lib-dynload/_ctypes_test.$(PYTHON3_SO_SUFFIX) \
))

+ 17
- 0
lang/python3/files/python3-package-dbm.mk View File

@ -0,0 +1,17 @@
#
# Copyright (C) 2006-2015 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
define Package/python3-dbm
$(call Package/python3/Default)
TITLE:=Python $(PYTHON3_VERSION) dbm module
DEPENDS:=+python3-light +libdb47
endef
$(eval $(call Py3BasePackage,python3-dbm, \
/usr/lib/python$(PYTHON3_VERSION)/dbm \
/usr/lib/python$(PYTHON3_VERSION)/lib-dynload/_dbm.$(PYTHON3_SO_SUFFIX) \
))

+ 17
- 0
lang/python3/files/python3-package-decimal.mk View File

@ -0,0 +1,17 @@
#
# Copyright (C) 2006-2015 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
define Package/python3-decimal
$(call Package/python3/Default)
TITLE:=Python $(PYTHON3_VERSION) decimal module
DEPENDS:=+python3-light
endef
$(eval $(call Py3BasePackage,python3-decimal, \
/usr/lib/python$(PYTHON3_VERSION)/decimal.py \
/usr/lib/python$(PYTHON3_VERSION)/lib-dynload/_decimal.$(PYTHON3_SO_SUFFIX) \
))

+ 16
- 0
lang/python3/files/python3-package-distutils.mk View File

@ -0,0 +1,16 @@
#
# Copyright (C) 2006-2015 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
define Package/python3-distutils
$(call Package/python3/Default)
TITLE:=Python $(PYTHON3_VERSION) distutils module
DEPENDS:=+python3-light
endef
$(eval $(call Py3BasePackage,python3-distutils, \
/usr/lib/python$(PYTHON3_VERSION)/distutils \
))

+ 16
- 0
lang/python3/files/python3-package-email.mk View File

@ -0,0 +1,16 @@
#
# Copyright (C) 2006-2015 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
define Package/python3-email
$(call Package/python3/Default)
TITLE:=Python $(PYTHON3_VERSION) email module
DEPENDS:=+python3-light
endef
$(eval $(call Py3BasePackage,python3-email, \
/usr/lib/python$(PYTHON3_VERSION)/email \
))

+ 16
- 0
lang/python3/files/python3-package-gdbm.mk View File

@ -0,0 +1,16 @@
#
# Copyright (C) 2006-2015 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
define Package/python3-gdbm
$(call Package/python3/Default)
TITLE:=Python $(PYTHON3_VERSION) gdbm module
DEPENDS:=+python3-light +libgdbm
endef
$(eval $(call Py3BasePackage,python3-gdbm, \
/usr/lib/python$(PYTHON3_VERSION)/lib-dynload/_gdbm.$(PYTHON3_SO_SUFFIX) \
))

+ 16
- 0
lang/python3/files/python3-package-logging.mk View File

@ -0,0 +1,16 @@
#
# Copyright (C) 2006-2015 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
define Package/python3-logging
$(call Package/python3/Default)
TITLE:=Python $(PYTHON3_VERSION) logging module
DEPENDS:=+python3-light
endef
$(eval $(call Py3BasePackage,python3-logging, \
/usr/lib/python$(PYTHON3_VERSION)/logging \
))

+ 17
- 0
lang/python3/files/python3-package-multiprocessing.mk View File

@ -0,0 +1,17 @@
#
# Copyright (C) 2006-2015 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
define Package/python3-multiprocessing
$(call Package/python3/Default)
TITLE:=Python $(PYTHON3_VERSION) multiprocessing
DEPENDS:=+python3-light
endef
$(eval $(call Py3BasePackage,python3-multiprocessing, \
/usr/lib/python$(PYTHON3_VERSION)/multiprocessing \
/usr/lib/python$(PYTHON3_VERSION)/lib-dynload/_multiprocessing.$(PYTHON3_SO_SUFFIX) \
))

+ 18
- 0
lang/python3/files/python3-package-ncurses.mk View File

@ -0,0 +1,18 @@
#
# Copyright (C) 2006-2015 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
define Package/python3-ncurses
$(call Package/python3/Default)
TITLE:=Python $(PYTHON3_VERSION) ncurses module
DEPENDS:=+python3-light +libncursesw
endef
$(eval $(call Py3BasePackage,python3-ncurses, \
/usr/lib/python$(PYTHON3_VERSION)/curses \
/usr/lib/python$(PYTHON3_VERSION)/lib-dynload/_curses.$(PYTHON3_SO_SUFFIX) \
/usr/lib/python$(PYTHON3_VERSION)/lib-dynload/_curses_panel.$(PYTHON3_SO_SUFFIX) \
))

+ 17
- 0
lang/python3/files/python3-package-openssl.mk View File

@ -0,0 +1,17 @@
#
# Copyright (C) 2006-2015 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
define Package/python3-openssl
$(call Package/python3/Default)
TITLE:=Python $(PYTHON3_VERSION) SSL module
DEPENDS:=+python3-light +libopenssl
endef
$(eval $(call Py3BasePackage,python3-openssl, \
/usr/lib/python$(PYTHON3_VERSION)/lib-dynload/_hashlib.$(PYTHON3_SO_SUFFIX) \
/usr/lib/python$(PYTHON3_VERSION)/lib-dynload/_ssl.$(PYTHON3_SO_SUFFIX) \
))

+ 18
- 0
lang/python3/files/python3-package-pydoc.mk View File

@ -0,0 +1,18 @@
#
# Copyright (C) 2006-2015 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
define Package/python3-pydoc
$(call Package/python3/Default)
TITLE:=Python $(PYTHON3_VERSION) pydoc module
DEPENDS:=+python3-light
endef
$(eval $(call Py3BasePackage,python3-pydoc, \
/usr/lib/python$(PYTHON3_VERSION)/doctest.py \
/usr/lib/python$(PYTHON3_VERSION)/pydoc.py \
/usr/lib/python$(PYTHON3_VERSION)/pydoc_data \
))

+ 17
- 0
lang/python3/files/python3-package-sqlite3.mk View File

@ -0,0 +1,17 @@
#
# Copyright (C) 2006-2015 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
define Package/python3-sqlite3
$(call Package/python3/Default)
TITLE:=Python $(PYTHON3_VERSION) sqlite3 module
DEPENDS:=+python3-light +libsqlite3
endef
$(eval $(call Py3BasePackage,python3-sqlite3, \
/usr/lib/python$(PYTHON3_VERSION)/lib-dynload/_sqlite3.$(PYTHON3_SO_SUFFIX) \
/usr/lib/python$(PYTHON3_VERSION)/sqlite3 \
))

+ 16
- 0
lang/python3/files/python3-package-unittest.mk View File

@ -0,0 +1,16 @@
#
# Copyright (C) 2006-2015 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
define Package/python3-unittest
$(call Package/python3/Default)
TITLE:=Python $(PYTHON3_VERSION) unittest module
DEPENDS:=+python3-light
endef
$(eval $(call Py3BasePackage,python3-unittest, \
/usr/lib/python$(PYTHON3_VERSION)/unittest \
))

+ 19
- 0
lang/python3/files/python3-package-xml.mk View File

@ -0,0 +1,19 @@
#
# Copyright (C) 2006-2015 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
define Package/python3-xml
$(call Package/python3/Default)
TITLE:=Python $(PYTHON3_VERSION) xml libs
DEPENDS:=+python3-light
endef
$(eval $(call Py3BasePackage,python3-xml, \
/usr/lib/python$(PYTHON3_VERSION)/xml \
/usr/lib/python$(PYTHON3_VERSION)/xmlrpc \
/usr/lib/python$(PYTHON3_VERSION)/lib-dynload/_elementtree.$(PYTHON3_SO_SUFFIX) \
/usr/lib/python$(PYTHON3_VERSION)/lib-dynload/pyexpat.$(PYTHON3_SO_SUFFIX) \
))

+ 1
- 1
lang/python3/files/python3-package.mk View File

@ -6,7 +6,7 @@
#
PYTHON3_VERSION:=3.4
PYTHON3_VERSION_MICRO:=2
PYTHON3_VERSION_MICRO:=3
PYTHON3_DIR:=$(STAGING_DIR)/usr
PYTHON3_BIN_DIR:=$(PYTHON3_DIR)/bin


lang/python3/patches/110-enable-zlib.patch → lang/python3/patches/001-enable-zlib.patch View File


lang/python3/patches/120-do-not-add-include-dirs-when-cross-compiling.patch → lang/python3/patches/002-do-not-add-include-dirs-when-cross-compiling.patch View File


lang/python3/patches/130-do-not-run-distutils-tests.patch → lang/python3/patches/003-do-not-run-distutils-tests.patch View File


lang/python3/patches/140-do-not-write-bytes-codes.patch → lang/python3/patches/004-do-not-write-bytes-codes.patch View File


+ 31
- 0
lang/python3/patches/005-fix-libffi-x86-64-configure.patch View File

@ -0,0 +1,31 @@
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*-*-*)

+ 12
- 0
lang/python3/patches/006-remove-debian-multiarch-support.patch View File

@ -0,0 +1,12 @@
diff --git a/setup.py b/setup.py
index 7868b7b..9ae0ef2 100644
--- a/setup.py
+++ b/setup.py
@@ -444,7 +444,6 @@ class PyBuildExt(build_ext):
add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
if cross_compiling:
self.add_gcc_paths()
- self.add_multiarch_paths()
# Add paths specified in the environment variables LDFLAGS and
# CPPFLAGS for header and library files.

+ 10
- 0
lang/python3/patches/007-distutils-do-not-adjust-path.patch View File

@ -0,0 +1,10 @@
--- a/Lib/distutils/command/build_scripts.py
+++ b/Lib/distutils/command/build_scripts.py
@@ -89,6 +89,7 @@ class build_scripts (Command):
adjust = 1
post_interp = match.group(1) or ''
+ adjust = 0
if adjust:
log.info("copying and adjusting %s -> %s", script,
self.build_dir)

+ 15
- 0
lang/python3/patches/010-do-not-add-rt-lib-dirs-when-cross-compiling.patch View File

@ -0,0 +1,15 @@
diff --git a/setup.py b/setup.py
index 7868b7b..544fa7e 100644
--- a/setup.py
+++ b/setup.py
@@ -452,8 +452,9 @@ class PyBuildExt(build_ext):
# directly since an inconsistently reproducible issue comes up where
# the environment variable is not set even though the value were passed
# into configure and stored in the Makefile (issue found on OS X 10.3).
+ rt_lib_dirs = [] if cross_compiling else self.compiler.runtime_library_dirs
for env_var, arg_name, dir_list in (
- ('LDFLAGS', '-R', self.compiler.runtime_library_dirs),
+ ('LDFLAGS', '-R', rt_lib_dirs),
('LDFLAGS', '-L', self.compiler.library_dirs),
('CPPFLAGS', '-I', self.compiler.include_dirs)):
env_val = sysconfig.get_config_var(env_var)

+ 2
- 2
libs/avahi/Makefile View File

@ -56,7 +56,7 @@ define Package/libavahi/Default
SECTION:=libs
CATEGORY:=Libraries
PROVIDES:=libavahi
DEPENDS:=+libpthread +SSP_SUPPORT:libssp
DEPENDS:=+libpthread
endef
define Package/libavahi/description
@ -155,7 +155,7 @@ endef
define Package/avahi-dnsconfd
$(call Package/avahi/Default)
SUBMENU:=IP Addresses and Names
DEPENDS:=+libavahi +libdaemon +libpthread +SSP_SUPPORT:libssp
DEPENDS:=+libavahi +libdaemon +libpthread
TITLE:=A Unicast DNS server using avahi-daemon
endef


+ 2
- 2
libs/libtasn1/Makefile View File

@ -8,12 +8,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libtasn1
PKG_VERSION:=4.2
PKG_VERSION:=4.3
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=ftp://ftp.gnu.org/gnu/libtasn1
PKG_MD5SUM:=414df906df421dee0a5cf7548788d153
PKG_MD5SUM:=67e98988f966a34fbf1b82d33eef9e7e
#PKG_FIXUP:=autoreconf
PKG_INSTALL:=1


+ 4
- 1
mail/bogofilter/Makefile View File

@ -35,7 +35,10 @@ define Package/bogofilter/description
Bogofilter is a fast Bayesian spam filter
endef
CONFIGURE_ARGS += --disable-unicode
CONFIGURE_ARGS += \
--disable-unicode \
--with-libdb-prefix=$(STAGING_DIR) \
--with-included-gsl
define Package/bogofilter/install
$(INSTALL_DIR) $(1)/etc/ \


+ 2
- 2
net/dmapd/Makefile View File

@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=dmapd
PKG_VERSION:=0.0.70
PKG_VERSION:=0.0.71
PKG_RELEASE:=1
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
@ -18,7 +18,7 @@ PKG_LICENSE_FILES:=COPYING
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.flyn.org/projects/dmapd
PKG_MD5SUM:=f503bf95f79b5c1f9418cccf26203952
PKG_MD5SUM:=cee310509e39db782110267edac4fe9a
PKG_FIXUP:=autoreconf
PKG_INSTALL:=2


+ 54
- 11
net/git/Makefile View File

@ -1,5 +1,5 @@
#
# Copyright (C) 2009-2014 OpenWrt.org
# Copyright (C) 2009-2015 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
@ -8,19 +8,20 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=git
PKG_VERSION:=2.3.0
PKG_VERSION:=2.3.3
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@KERNEL/software/scm/git/
PKG_MD5SUM:=e5880760d1f43f4f49b3bf94b9046eee
PKG_MD5SUM:=14a885da3b432455b606cc1a25a6c681
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
PKG_FIXUP:=autoreconf
include $(INCLUDE_DIR)/package.mk
define Package/git
define Package/git/Default
SECTION:=net
CATEGORY:=Network
SUBMENU:=Version Control Systems
@ -30,18 +31,35 @@ define Package/git
MAINTAINER:=Peter Wagner <tripolar@gmx.at>
endef
define Package/git
$(call Package/git/Default)
DEPENDS:=+libopenssl +libpthread +librt
TITLE:=The fast version control system
endef
define Package/git/description
Git is a free & open source, distributed version control system
designed to handle everything from small to very large projects
with speed and efficiency.
endef
define Package/git-http
$(call Package/git/Default)
DEPENDS:=git +libcurl +ca-certificates
TITLE:=Git HTTP commands
endef
define Package/git-http/description
$(call Package/git/description)
This package allows git push/fetch over http(s) and ftp(s)
endef
MAKE_FLAGS := \
CC="$(TARGET_CC)" \
CFLAGS="$(TARGET_CFLAGS)" \
CPPFLAGS="$(TARGET_CPPFLAGS)" \
LDFLAGS="$(TARGET_LDFLAGS)" \
NO_CURL="YesPlease" \
NO_EXPAT="YesPlease" \
NO_MKSTEMPS="YesPlease" \
NO_GETTEXT="YesPlease" \
@ -51,21 +69,46 @@ MAKE_FLAGS := \
NO_NSEC="YesPlease" \
NO_PERL="YesPlease" \
NO_PYTHON="YesPlease" \
NO_TCLTK="YesPlease"
NO_TCLTK="YesPlease" \
NO_INSTALL_HARDLINKS="yes" \
CONFIGURE_ARGS += \
--without-iconv \
define Build/Configure
$(MAKE) -C $(PKG_BUILD_DIR) \
configure
( cd $(PKG_BUILD_DIR); \
./configure --prefix=/usr \
);
$(call Build/Configure/Default,)
endef
define Package/git/install
$(INSTALL_DIR) $(1)
$(INSTALL_DIR) $(1)/usr/bin
$(CP) $(PKG_INSTALL_DIR)/usr/bin/git $(1)/usr/bin
$(RM) $(PKG_INSTALL_DIR)/usr/bin/git-cvsserver
$(CP) $(PKG_INSTALL_DIR)/* $(1)/
$(CP) $(PKG_INSTALL_DIR)/usr/bin/git-* $(1)/usr/bin
$(INSTALL_DIR) $(1)/usr/lib/git-core
( cd $(PKG_INSTALL_DIR); $(TAR) \
--exclude=usr/lib/git-core/git-http-backend \
--exclude=usr/lib/git-core/git-http-fetch \
--exclude=usr/lib/git-core/git-remote-ftp \
--exclude=usr/lib/git-core/git-remote-ftps \
--exclude=usr/lib/git-core/git-remote-http \
--exclude=usr/lib/git-core/git-remote-https \
-cf - \
usr/lib/git-core \
) | ( cd $(1); $(TAR) -xf - )
endef
define Package/git-http/install
$(INSTALL_DIR) $(1)/usr/lib/git-core
$(CP) $(PKG_INSTALL_DIR)/usr/lib/git-core/git-http-backend $(1)/usr/lib/git-core
$(CP) $(PKG_INSTALL_DIR)/usr/lib/git-core/git-http-fetch $(1)/usr/lib/git-core
$(CP) $(PKG_INSTALL_DIR)/usr/lib/git-core/git-remote-ftp $(1)/usr/lib/git-core
$(CP) $(PKG_INSTALL_DIR)/usr/lib/git-core/git-remote-ftps $(1)/usr/lib/git-core
$(CP) $(PKG_INSTALL_DIR)/usr/lib/git-core/git-remote-http $(1)/usr/lib/git-core
$(CP) $(PKG_INSTALL_DIR)/usr/lib/git-core/git-remote-https $(1)/usr/lib/git-core
endef
$(eval $(call BuildPackage,git))
$(eval $(call BuildPackage,git-http))

+ 13
- 46
net/git/patches/100-convert_builtin.patch View File

@ -7,31 +7,29 @@
-PROGRAM_OBJS += credential-store.o
-PROGRAM_OBJS += daemon.o
-PROGRAM_OBJS += fast-import.o
-PROGRAM_OBJS += http-backend.o
PROGRAM_OBJS += http-backend.o
-PROGRAM_OBJS += imap-send.o
-PROGRAM_OBJS += sh-i18n--envsubst.o
-PROGRAM_OBJS += shell.o
-PROGRAM_OBJS += show-index.o
-PROGRAM_OBJS += upload-pack.o
-PROGRAM_OBJS += remote-testsvn.o
+PROGRAM_OBJS =
# Binary suffix, set to .exe for Windows builds
X =
@@ -896,6 +887,12 @@ BUILTIN_OBJS += builtin/verify-commit.o
@@ -896,6 +887,11 @@ BUILTIN_OBJS += builtin/verify-commit.o
BUILTIN_OBJS += builtin/verify-pack.o
BUILTIN_OBJS += builtin/verify-tag.o
BUILTIN_OBJS += builtin/write-tree.o
+BUILTIN_OBJS += builtin/daemon.o
+BUILTIN_OBJS += builtin/fast-import.o
+BUILTIN_OBJS += builtin/http-backend.o
+BUILTIN_OBJS += builtin/imap-send.o
+BUILTIN_OBJS += builtin/shell.o
+BUILTIN_OBJS += builtin/upload-pack.o
GITLIBS = $(LIB_FILE) $(XDIFF_LIB)
EXTLIBS =
@@ -1070,7 +1067,7 @@ endif
@@ -1070,7 +1066,7 @@ endif
EXTLIBS += -lz
ifndef NO_OPENSSL
@ -40,7 +38,7 @@
ifdef OPENSSLDIR
BASIC_CFLAGS += -I$(OPENSSLDIR)/include
OPENSSL_LINK = -L$(OPENSSLDIR)/$(lib) $(CC_LD_DYNPATH)$(OPENSSLDIR)/$(lib)
@@ -1933,10 +1930,6 @@ endif
@@ -1933,10 +1929,6 @@ endif
git-%$X: %.o GIT-LDFLAGS $(GITLIBS)
$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS)
@ -51,7 +49,7 @@
git-http-fetch$X: http.o http-walker.o http-fetch.o GIT-LDFLAGS $(GITLIBS)
$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
$(LIBS) $(CURL_LIBCURL)
@@ -2254,24 +2247,22 @@ endif
@@ -2254,10 +2246,11 @@ endif
bindir=$$(cd '$(DESTDIR_SQ)$(bindir_SQ)' && pwd) && \
execdir=$$(cd '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' && pwd) && \
{ test "$$bindir/" = "$$execdir/" || \
@ -59,34 +57,19 @@
+ for p in $(filter $(install_bindir_programs),$(ALL_PROGRAMS)); do \
$(RM) "$$execdir/$$p" && \
test -z "$(NO_INSTALL_HARDLINKS)$(NO_CROSS_DIRECTORY_HARDLINKS)" && \
- ln "$$bindir/$$p" "$$execdir/$$p" 2>/dev/null || \
ln "$$bindir/$$p" "$$execdir/$$p" 2>/dev/null || \
+ ln -s git "$$execdir/$$p" 2>/dev/null || \
cp "$$bindir/$$p" "$$execdir/$$p" || exit; \
done; \
} && \
for p in $(filter $(install_bindir_programs),$(BUILT_INS)); do \
$(RM) "$$bindir/$$p" && \
test -z "$(NO_INSTALL_HARDLINKS)" && \
- ln "$$bindir/git$X" "$$bindir/$$p" 2>/dev/null || \
ln -s "git$X" "$$bindir/$$p" 2>/dev/null || \
cp "$$bindir/git$X" "$$bindir/$$p" || exit; \
done && \
for p in $(BUILT_INS); do \
$(RM) "$$execdir/$$p" && \
test -z "$(NO_INSTALL_HARDLINKS)" && \
- ln "$$execdir/git$X" "$$execdir/$$p" 2>/dev/null || \
ln -s "git$X" "$$execdir/$$p" 2>/dev/null || \
cp "$$execdir/git$X" "$$execdir/$$p" || exit; \
done && \
--- a/builtin.h
+++ b/builtin.h
@@ -138,5 +138,11 @@ extern int cmd_verify_pack(int argc, con
@@ -138,5 +138,10 @@ extern int cmd_verify_pack(int argc, con
extern int cmd_show_ref(int argc, const char **argv, const char *prefix);
extern int cmd_pack_refs(int argc, const char **argv, const char *prefix);
extern int cmd_replace(int argc, const char **argv, const char *prefix);
+extern int cmd_daemon(int argc, char **argv, const char *prefix);
+extern int cmd_fast_import(int argc, char **argv, const char *prefix);
+extern int cmd_http_backend(int argc, char **argv, const char *prefix);
+extern int cmd_imap_send(int argc, char **argv, const char *prefix);
+extern int cmd_shell(int argc, char **argv, const char *prefix);
+extern int cmd_upload_pack(int argc, char **argv, const char *prefix);
@ -101,10 +84,6 @@
@@ -0,0 +1 @@
+#include "../fast-import.c"
--- /dev/null
+++ b/builtin/http-backend.c
@@ -0,0 +1 @@
+#include "../http-backend.c"
--- /dev/null
+++ b/builtin/imap-send.c
@@ -0,0 +1 @@
+#include "../imap-send.c"
@ -118,7 +97,7 @@
+#include "../upload-pack.c"
--- a/daemon.c
+++ b/daemon.c
@@ -1096,7 +1096,7 @@ static int serve(struct string_list *lis
@@ -1193,7 +1193,7 @@ static int serve(struct string_list *lis
return service_loop(&socklist);
}
@ -127,7 +106,7 @@
{
int listen_port = 0;
struct string_list listen_addr = STRING_LIST_INIT_NODUP;
@@ -1292,12 +1292,13 @@ int main(int argc, char **argv)
@@ -1389,12 +1389,13 @@ int main(int argc, char **argv)
store_pid(pid_file);
/* prepare argv for serving-processes */
@ -148,7 +127,7 @@
}
--- a/fast-import.c
+++ b/fast-import.c
@@ -3350,7 +3350,7 @@ static void parse_argv(void)
@@ -3354,7 +3354,7 @@ static void parse_argv(void)
read_marks();
}
@ -181,16 +160,15 @@
{ "describe", cmd_describe, RUN_SETUP },
{ "diff", cmd_diff },
{ "diff-files", cmd_diff_files, RUN_SETUP | NEED_WORK_TREE },
@@ -411,6 +412,8 @@ static struct cmd_struct commands[] = {
@@ -411,6 +412,7 @@ static struct cmd_struct commands[] = {
{ "grep", cmd_grep, RUN_SETUP_GENTLY },
{ "hash-object", cmd_hash_object },
{ "help", cmd_help },
+ { "http-backend", cmd_http_backend },
+ { "imap-send", cmd_imap_send },
{ "index-pack", cmd_index_pack, RUN_SETUP_GENTLY },
{ "init", cmd_init_db, NO_SETUP },
{ "init-db", cmd_init_db, NO_SETUP },
@@ -459,6 +462,7 @@ static struct cmd_struct commands[] = {
@@ -459,6 +461,7 @@ static struct cmd_struct commands[] = {
{ "revert", cmd_revert, RUN_SETUP | NEED_WORK_TREE },
{ "rm", cmd_rm, RUN_SETUP },
{ "send-pack", cmd_send_pack, RUN_SETUP },
@ -198,7 +176,7 @@
{ "shortlog", cmd_shortlog, RUN_SETUP_GENTLY | USE_PAGER },
{ "show", cmd_show, RUN_SETUP },
{ "show-branch", cmd_show_branch, RUN_SETUP },
@@ -475,6 +479,7 @@ static struct cmd_struct commands[] = {
@@ -475,6 +478,7 @@ static struct cmd_struct commands[] = {
{ "update-server-info", cmd_update_server_info, RUN_SETUP },
{ "upload-archive", cmd_upload_archive },
{ "upload-archive--writer", cmd_upload_archive_writer },
@ -206,17 +184,6 @@
{ "var", cmd_var, RUN_SETUP_GENTLY },
{ "verify-commit", cmd_verify_commit, RUN_SETUP },
{ "verify-pack", cmd_verify_pack },
--- a/http-backend.c
+++ b/http-backend.c
@@ -557,7 +557,7 @@ static struct service_cmd {
{"POST", "/git-receive-pack$", service_rpc}
};
-int main(int argc, char **argv)
+int cmd_http_backend(int argc, char **argv, const char *prefix)
{
char *method = getenv("REQUEST_METHOD");
char *dir;
--- a/imap-send.c
+++ b/imap-send.c
@@ -1484,7 +1484,7 @@ static int curl_append_msgs_to_imap(stru


+ 32
- 0
net/git/patches/300-configure_for_crosscompiling View File

@ -0,0 +1,32 @@
--- a/configure.ac
+++ b/configure.ac
@@ -844,7 +844,8 @@ AC_RUN_IFELSE(
FILE *f = fopen(".", "r");
return f && fread(&c, 1, 1, f)]])],
[ac_cv_fread_reads_directories=no],
- [ac_cv_fread_reads_directories=yes])
+ [ac_cv_fread_reads_directories=yes],
+ [ac_cv_fread_reads_directories=no])
])
if test $ac_cv_fread_reads_directories = yes; then
FREAD_READS_DIRECTORIES=UnfortunatelyYes
@@ -878,7 +879,8 @@ AC_RUN_IFELSE(
if (snprintf(buf, 3, "%s", "12345") != 5
|| strcmp(buf, "12")) return 1]])],
[ac_cv_snprintf_returns_bogus=no],
- [ac_cv_snprintf_returns_bogus=yes])
+ [ac_cv_snprintf_returns_bogus=yes],
+ [ac_cv_snprintf_returns_bogus=no])
])
if test $ac_cv_snprintf_returns_bogus = yes; then
SNPRINTF_RETURNS_BOGUS=UnfortunatelyYes
@@ -901,7 +903,8 @@ yippeeyeswehaveit
#endif
]),
[ac_cv_sane_mode_bits=yes],
- [ac_cv_sane_mode_bits=no])
+ [ac_cv_sane_mode_bits=no],
+ [ac_cv_sane_mode_bits=yes])
])
if test $ac_cv_sane_mode_bits = yes; then
NEEDS_MODE_TRANSLATION=

+ 11
- 0
net/git/patches/400-imapsend_without_curl.patch View File

@ -0,0 +1,11 @@
--- a/Makefile
+++ b/Makefile
@@ -1039,7 +1039,7 @@ else
endif
curl_check := $(shell (echo 072200; curl-config --vernum | sed -e '/^70[BC]/s/^/0/') 2>/dev/null | sort -r | sed -ne 2p)
ifeq "$(curl_check)" "072200"
- USE_CURL_FOR_IMAP_SEND = YesPlease
+# USE_CURL_FOR_IMAP_SEND = YesPlease
endif
ifdef USE_CURL_FOR_IMAP_SEND
BASIC_CFLAGS += -DUSE_CURL_FOR_IMAP_SEND

+ 8
- 9
net/knxd/Makefile View File

@ -11,13 +11,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=knxd
PKG_VERSION=2015-03-06-$(PKG_SOURCE_VERSION)
PKG_VERSION=2015-03-17-$(PKG_SOURCE_VERSION)
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/knxd/knxd.git
PKG_SOURCE_VERSION:=a63bc660d305e26ce3ed038607d387758fad8413
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION)
PKG_SOURCE_VERSION:=2c6c6732a684dffb87b391ea92cccdf07c8385b8
PKG_SOURCE_SUBDIR:=$(PKG_NAME)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MAINTAINER:=Othmar Truniger <github@truniger.ch>
@ -26,7 +26,7 @@ PKG_LICENSE:=GPL-2.0+
PKG_LICENSE_FILES:=LICENSE
PKG_BUILD_PARALLEL:=1
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_SOURCE_VERSION)
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
@ -37,7 +37,7 @@ define Package/knxd
SECTION:=net
CATEGORY:=Network
TITLE:=EIB KNX daemon
DEPENDS:=+pthsem +libusb-1.0
DEPENDS:=+pthsem +argp-standalone +libusb-1.0
endef
define Package/knxd/description
@ -55,7 +55,7 @@ define Package/libeibclient
DEPENDS:=+pthsem
endef
define Package/knxd-tools/description
define Package/libeibclient/description
EIB KNX client library
endef
@ -84,9 +84,8 @@ CONFIGURE_ARGS+= \
--without-pth-test \
--without-libstdc
TARGET_CFLAGS+= \
$(FPIC) \
-fno-builtin -nodefaultlibs -lc -lm -lgcc -largp -lpthsem
EXTRA_LDFLAGS+= \
-fno-builtin -nodefaultlibs -lc -lgcc
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include


+ 13
- 20
net/linknx/Makefile View File

@ -1,5 +1,5 @@
#
# Copyright (C) 2008-2014 OpenWrt.org
# Copyright (C) 2008-2015 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=linknx
PKG_VERSION:=0.0.1.32
PKG_RELEASE:=4
PKG_RELEASE:=6
PKG_MD5SUM:=7ecc1208f59bceb05068c752b2250b63
PKG_MAINTAINER:=Othmar Truniger <github@truniger.ch>
@ -17,7 +17,7 @@ PKG_LICENSE:=GPL-2.0+
PKG_SOURCE_URL:=@SF/linknx
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_BUILD_DEPENDS:=pthsem curl libesmtp
PKG_BUILD_DEPENDS:=argp-standalone
include $(INCLUDE_DIR)/package.mk
@ -26,26 +26,19 @@ define Package/linknx
CATEGORY:=Network
TITLE:=KNX home automation platform
URL:=http://sourceforge.net/projects/linknx/
DEPENDS:=pthsem +lua +luac +libstdcpp +libcurl +libesmtp
DEPENDS:=+pthsem +lua +luac +libstdcpp +libcurl +libesmtp
endef
define Build/Configure
(cd $(PKG_BUILD_DIR); touch aclocal.m4 Makefile.in config.h.in configure; \
$(SED) 's,\"2.0.4\",\"2.0.4\"\n_pth_version=\"2.0.8\",g' $(PKG_BUILD_DIR)/configure )
$(call Build/Configure/Default,--verbose --without-pth-test --with-pth=$(STAGING_DIR) --without-log4cpp --with-lua --with-libcurl --without-mysql, \
CXXFLAGS="$(TARGET_CFLAGS) -fno-builtin -lcrypt" \
)
endef
CONFIGURE_ARGS+= \
--verbose \
--without-pth-test \
--without-log4cpp \
--with-lua \
--with-libcurl \
--without-mysql
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR)/ \
LIBDIR="$(TARGET_LDFLAGS)" \
CC="$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) " \
LD="$(TARGET_CROSS)ld -shared" \
LUA="$(STAGING_DIR_HOST)/bin/lua" \
LUAC="$(STAGING_DIR_HOST)/bin/luac" \
CFLAGS="$(TARGET_CFLAGS) -nodefaultlibs" all
endef
EXTRA_LDFLAGS+= \
-fno-builtin
define Package/linknx/install
$(INSTALL_DIR) $(1)/usr/bin


+ 2
- 2
net/mdnsresponder/Makefile View File

@ -8,12 +8,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=mDNSResponder
PKG_VERSION:=561.1.1
PKG_VERSION:=567
PKG_RELEASE:=1
PKG_SOURCE:=mDNSResponder-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://opensource.apple.com/tarballs/mDNSResponder/
PKG_MD5SUM:=d4b56e22798d6f45e29b42cd6720ab6e
PKG_MD5SUM:=6eff6d243a12a3d4b6fca03c05a9893b
PKG_MAINTAINER:=Steven Barth <cyrus@openwrt.org>
PKG_LICENSE:=Apache-2.0


+ 12
- 20
net/mdnsresponder/patches/001-cross_compile.patch View File

@ -1,6 +1,6 @@
--- a/Clients/Makefile
+++ b/Clients/Makefile
@@ -23,6 +23,8 @@
@@ -27,6 +27,8 @@
#############################################################################
@ -9,22 +9,22 @@
# On OS X the dns_sd library functions are included in libSystem, which is implicitly linked with every executable
# If /usr/lib/libSystem.dylib exists, then we're on OS X, so we don't need also to link the "dns_sd" shared library
ifneq "$(wildcard /usr/lib/libSystem.dylib)" ""
@@ -42,10 +44,10 @@ build:
@@ -46,10 +48,10 @@ build:
mkdir build
build/dns-sd: build dns-sd.c ClientCommon.c
- cc $(filter %.c %.o, $+) $(LIBS) -I../mDNSShared -Wall -o $@
- $(CC) $(filter %.c %.o, $+) $(LIBS) -I../mDNSShared -Wall -o $@
+ $(CC) $(CFLAGS) $(filter %.c %.o, $+) $(LIBS) -I../mDNSShared -Wall -o $@
build/dns-sd64: build dns-sd.c ClientCommon.c
- cc $(filter %.c %.o, $+) $(LIBS) -I../mDNSShared -Wall -o $@ -m64
- $(CC) $(filter %.c %.o, $+) $(LIBS) -I../mDNSShared -Wall -o $@ -m64
+ $(CC) $(CFLAGS) $(filter %.c %.o, $+) $(LIBS) -I../mDNSShared -Wall -o $@ -m64
# Note, we can make a 'fat' version of dns-sd using 'lipo', as shown below, but we
# don't, because we don't want or need a 'fat' version of dns-sd, because it will
--- a/mDNSPosix/Makefile
+++ b/mDNSPosix/Makefile
@@ -54,10 +54,11 @@ COREDIR = ../mDNSCore
@@ -54,11 +54,12 @@ COREDIR = ../mDNSCore
SHAREDDIR ?= ../mDNSShared
JDK = /usr/jdk
@ -32,22 +32,14 @@
+CC = @gcc
BISON = @bison
FLEX = @flex
ST = @strip
-LD = ld -shared
+LD = @ld
+SOOPTS = -shared
CP = cp
RM = rm
LN = ln -s -f
@@ -82,7 +83,7 @@ else
CFLAGS_DEBUG = -Os -DMDNS_DEBUGMSGS=0
OBJDIR ?= objects/prod
BUILDDIR ?= build/prod
-STRIP = strip -S
+STRIP = @strip -S
endif
# Configure per-OS peculiarities
@@ -91,7 +92,7 @@ CFLAGS_DEBUG = -O0 -DMDNS_DEBUGMSGS=0
@@ -92,7 +93,7 @@ CFLAGS_DEBUG = -O0 -DMDNS_DEBUGMSGS=0
CFLAGS_OS = -DNOT_HAVE_DAEMON -DNOT_HAVE_SA_LEN -DNOT_HAVE_SOCKLEN_T -DNOT_HAVE_IF_NAMETOINDEX \
-DLOG_PERROR=0 -D_XPG4_2 -D__EXTENSIONS__ -DHAVE_BROKEN_RECVIF_NAME -DTARGET_OS_SOLARIS
CC = gcc
@ -56,7 +48,7 @@
LINKOPTS = -lsocket -lnsl -lresolv
JAVACFLAGS_OS += -I$(JDK)/include/solaris
ifneq ($(DEBUG),1)
@@ -147,7 +148,8 @@ CFLAGS_OS = -DHAVE_IPV6 -no-cpp-precomp
@@ -148,7 +149,8 @@ CFLAGS_OS = -DHAVE_IPV6 -no-cpp-precomp
-D__MAC_OS_X_VERSION_MIN_REQUIRED=__MAC_OS_X_VERSION_10_4 \
-D__APPLE_USE_RFC_2292 #-Wunreachable-code
CC = gcc
@ -66,7 +58,7 @@
LINKOPTS = -lSystem
LDSUFFIX = dylib
JDK = /System/Library/Frameworks/JavaVM.framework/Home
@@ -169,8 +171,9 @@ NSSLIBFILE := $(NSSLIBNAME)-$(NSSVERSIO
@@ -170,8 +172,9 @@ NSSLIBFILE := $(NSSLIBNAME)-$(NSSVERSIO
NSSLINKNAME := $(NSSLIBNAME).so.2
NSSINSTPATH := /lib
@ -77,7 +69,7 @@
INSTBASE?=/usr
STARTUPSCRIPTNAME?=mdns
@@ -256,7 +259,7 @@ libdns_sd: setup $(BUILDDIR)/libdns_sd.$
@@ -257,7 +260,7 @@ libdns_sd: setup $(BUILDDIR)/libdns_sd.$
CLIENTLIBOBJS = $(OBJDIR)/dnssd_clientlib.c.so.o $(OBJDIR)/dnssd_clientstub.c.so.o $(OBJDIR)/dnssd_ipc.c.so.o
$(BUILDDIR)/libdns_sd.$(LDSUFFIX): $(CLIENTLIBOBJS)
@ -86,7 +78,7 @@
@$(STRIP) $@
Clients: setup libdns_sd ../Clients/build/dns-sd
@@ -291,7 +294,7 @@ InstalledManPages: $(MANPATH)/man8/mdnsd
@@ -292,7 +295,7 @@ InstalledManPages: $(MANPATH)/man8/mdnsd
InstalledClients: $(INSTBASE)/bin/dns-sd
@echo $+ " installed"
@ -95,7 +87,7 @@
@echo $+ " installed"
# Note: If daemon already installed, we make sure it's stopped before overwriting it
@@ -346,19 +349,21 @@ $(INSTBASE)/bin/dns-sd: ../Clients/build
@@ -347,19 +350,21 @@ $(INSTBASE)/bin/dns-sd: ../Clients/build
$(NSSINSTPATH)/$(NSSLINKNAME): $(NSSINSTPATH)/$(NSSLIBFILE)
$(LN) $< $@


+ 12
- 12
net/mdnsresponder/patches/100-linux_fixes.patch View File

@ -84,7 +84,7 @@
}
--- a/mDNSPosix/mDNSPosix.c
+++ b/mDNSPosix/mDNSPosix.c
@@ -136,7 +136,7 @@ mDNSlocal void SockAddrTomDNSAddr(const
@@ -138,7 +138,7 @@ mDNSlocal void SockAddrTomDNSAddr(const
// mDNS core calls this routine when it needs to send a packet.
mDNSexport mStatus mDNSPlatformSendUDP(const mDNS *const m, const void *const msg, const mDNSu8 *const end,
@ -93,7 +93,7 @@
mDNSIPPort dstPort, mDNSBool useBackgroundTrafficClass)
{
int err = 0;
@@ -574,9 +574,17 @@ mDNSlocal void FreePosixNetworkInterface
@@ -583,9 +583,17 @@ mDNSlocal void FreePosixNetworkInterface
{
assert(intf != NULL);
if (intf->intfName != NULL) free((void *)intf->intfName);
@ -111,9 +111,9 @@
+ assert(rv == 0);
+ }
#endif
free(intf);
}
@@ -703,6 +711,29 @@ mDNSlocal int SetupSocket(struct sockadd
// Move interface to the RecentInterfaces list for a minute
@@ -724,6 +732,29 @@ mDNSlocal int SetupSocket(struct sockadd
if (err < 0) { err = errno; perror("setsockopt - IP_MULTICAST_TTL"); }
}
@ -143,7 +143,7 @@
// And start listening for packets
if (err == 0)
{
@@ -784,6 +815,29 @@ mDNSlocal int SetupSocket(struct sockadd
@@ -805,6 +836,29 @@ mDNSlocal int SetupSocket(struct sockadd
if (err < 0) { err = errno; perror("setsockopt - IPV6_MULTICAST_HOPS"); }
}
@ -173,7 +173,7 @@
// And start listening for packets
if (err == 0)
{
@@ -815,7 +869,12 @@ mDNSlocal int SetupSocket(struct sockadd
@@ -836,7 +890,12 @@ mDNSlocal int SetupSocket(struct sockadd
}
// Clean up
@ -187,7 +187,7 @@
assert((err == 0) == (*sktPtr != -1));
return err;
}
@@ -994,7 +1053,7 @@ mDNSlocal mStatus OpenIfNotifySocket(int
@@ -1026,7 +1085,7 @@ mDNSlocal mStatus OpenIfNotifySocket(int
/* Subscribe the socket to Link & IP addr notifications. */
mDNSPlatformMemZero(&snl, sizeof snl);
snl.nl_family = AF_NETLINK;
@ -196,7 +196,7 @@
ret = bind(sock, (struct sockaddr *) &snl, sizeof snl);
if (0 == ret)
*pFD = sock;
@@ -1072,11 +1131,18 @@ mDNSlocal mDNSu32 ProcessRoutingNo
@@ -1104,11 +1163,18 @@ mDNSlocal mDNSu32 ProcessRoutingNo
PrintNetLinkMsg(pNLMsg);
#endif
@ -217,7 +217,7 @@
// Advance pNLMsg to the next message in the buffer
if ((pNLMsg->nlmsg_flags & NLM_F_MULTI) != 0 && pNLMsg->nlmsg_type != NLMSG_DONE)
@@ -1247,8 +1313,12 @@ mDNSexport mStatus mDNSPlatformInit(mDNS
@@ -1279,8 +1345,12 @@ mDNSexport mStatus mDNSPlatformInit(mDNS
if (err == mStatus_NoError) err = SetupSocket(&sa, zeroIPPort, 0, &m->p->unicastSocket6);
#endif
@ -230,7 +230,7 @@
// Tell mDNS core about DNS Servers
mDNS_Lock(m);
@@ -1281,9 +1351,17 @@ mDNSexport void mDNSPlatformClose(mDNS *
@@ -1313,9 +1383,17 @@ mDNSexport void mDNSPlatformClose(mDNS *
{
assert(m != NULL);
ClearInterfaceList(m);
@ -250,7 +250,7 @@
#endif
}
@@ -1533,14 +1611,14 @@ mDNSexport mStatus mDNSPlatformClearS
@@ -1571,14 +1649,14 @@ mDNSexport mStatus mDNSPlatformClearS
mDNSexport mDNSu16 mDNSPlatformGetUDPPort(UDPSocket *sock)
{
(void) sock; // unused


+ 2
- 2
net/mwan3-luci/Makefile View File

@ -8,8 +8,8 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-mwan3
PKG_VERSION:=1.3
PKG_RELEASE:=5
PKG_VERSION:=1.4
PKG_RELEASE:=2
PKG_MAINTAINER:=Aedan Renner <chipdankly@gmail.com>
PKG_LICENSE:=GPLv2


+ 33
- 0
net/mwan3-luci/files/usr/lib/lua/luci/model/cbi/mwan/rule.lua View File

@ -88,6 +88,39 @@ proto = mwan_rule:option(DummyValue, "proto", translate("Protocol"))
return self.map:get(s, "proto") or "all"
end
sticky = mwan_rule:option(DummyValue, "sticky", translate("Sticky"))
sticky.rawhtml = true
function sticky.cfgvalue(self, s)
if self.map:get(s, "sticky") == "1" then
stickied = 1
return "Yes"
else
stickied = nil
return "No"
end
end
timeout = mwan_rule:option(DummyValue, "timeout", translate("Sticky timeout"))
timeout.rawhtml = true
function timeout.cfgvalue(self, s)
if stickied then
local timeoutValue = self.map:get(s, "timeout")
if timeoutValue then
return timeoutValue .. "s"
else
return "600s"
end
else
return "&#8212;"
end
end
ipset = mwan_rule:option(DummyValue, "ipset", translate("IPset"))
ipset.rawhtml = true
function ipset.cfgvalue(self, s)
return self.map:get(s, "ipset") or "&#8212;"
end
use_policy = mwan_rule:option(DummyValue, "use_policy", translate("Policy assigned"))
use_policy.rawhtml = true
function use_policy.cfgvalue(self, s)


+ 13
- 0
net/mwan3-luci/files/usr/lib/lua/luci/model/cbi/mwan/ruleconfig.lua View File

@ -81,6 +81,19 @@ proto = mwan_rule:option(Value, "proto", translate("Protocol"),
proto:value("esp")
cbiAddProtocol(proto)
sticky = mwan_rule:option(ListValue, "sticky", translate("Sticky"),
translate("Traffic from the same source IP address that previously matched this rule within the sticky timeout period will use the same WAN interface"))
sticky.default = "0"
sticky:value("1", translate("Yes"))
sticky:value("0", translate("No"))
timeout = mwan_rule:option(Value, "timeout", translate("Sticky timeout"),
translate("Seconds. Acceptable values: 1-1000000. Defaults to 600 if not set"))
timeout.datatype = "range(1, 1000000)"
ipset = mwan_rule:option(Value, "ipset", translate("IPset"),
translate("Name of IPset rule. Requires IPset rule in /etc/dnsmasq.conf (eg \"ipset=/youtube.com/youtube\")"))
use_policy = mwan_rule:option(Value, "use_policy", translate("Policy assigned"))
cbiAddPolicy(use_policy)
use_policy:value("unreachable", translate("unreachable (reject)"))


+ 3
- 3
net/mwan3/Makefile View File

@ -8,8 +8,8 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=mwan3
PKG_VERSION:=1.5
PKG_RELEASE:=10
PKG_VERSION:=1.6
PKG_RELEASE:=1
PKG_MAINTAINER:=Jeroen Louwes <jeroen.louwes@gmail.com>
PKG_LICENSE:=GPLv2
@ -19,7 +19,7 @@ define Package/mwan3
SECTION:=net
CATEGORY:=Network
SUBMENU:=Routing and Redirection
DEPENDS:=+ip +iptables +iptables-mod-conntrack-extra +iptables-mod-ipopt
DEPENDS:=+ip +ipset +iptables +iptables-mod-conntrack-extra +iptables-mod-ipopt
TITLE:=Multiwan hotplug script with connection tracking support
MAINTAINER:=Jeroen Louwes <jeroen.louwes@gmail.com>
PKGARCH:=all


+ 8
- 7
net/mwan3/files/etc/config/mwan3 View File

@ -61,17 +61,18 @@ config policy 'wan2_wan'
list use_member 'wan_m2_w3'
list use_member 'wan2_m1_w2'
config rule 'sticky_even'
option src_ip '0.0.0.0/0.0.0.1'
option dest_port '443'
config rule 'youtube'
option sticky '1'
option ipset 'youtube'
option dest_port '80,443'
option proto 'tcp'
option use_policy 'wan_wan2'
option use_policy 'balanced'
config rule 'sticky_odd'
option src_ip '0.0.0.1/0.0.0.1'
config rule 'https'
option sticky '1'
option dest_port '443'
option proto 'tcp'
option use_policy 'wan2_wan'
option use_policy 'balanced'
config rule 'default_rule'
option dest_ip '0.0.0.0/0'


+ 117
- 52
net/mwan3/files/etc/hotplug.d/iface/15-mwan3 View File

@ -12,12 +12,18 @@ mwan3_set_general_iptables()
$IPT -N mwan3_ifaces
fi
if ! $IPT -S mwan3_rules &> /dev/null; then
$IPT -N mwan3_rules
fi
if ! $IPT -S mwan3_connected &> /dev/null; then
$IPT -N mwan3_connected
$IPS create mwan3_connected hash:net
$IPT -A mwan3_connected -m set --match-set mwan3_connected dst -j MARK --set-xmark 0xff00/0xff00
fi
if ! $IPT -S mwan3_track &> /dev/null; then
$IPT -N mwan3_track
fi
if ! $IPT -S mwan3_rules &> /dev/null; then
$IPT -N mwan3_rules
fi
if ! $IPT -S mwan3_hook &> /dev/null; then
@ -25,15 +31,12 @@ mwan3_set_general_iptables()
$IPT -A mwan3_hook -j CONNMARK --restore-mark --nfmask 0xff00 --ctmask 0xff00
$IPT -A mwan3_hook -m mark --mark 0x0/0xff00 -j mwan3_ifaces
$IPT -A mwan3_hook -m mark --mark 0x0/0xff00 -j mwan3_connected
$IPT -A mwan3_hook -m mark --mark 0x0/0xff00 -j mwan3_track
$IPT -A mwan3_hook -m mark --mark 0x0/0xff00 -j mwan3_rules
$IPT -A mwan3_hook -j CONNMARK --save-mark --nfmask 0xff00 --ctmask 0xff00
$IPT -A mwan3_hook -m mark ! --mark 0xff00/0xff00 -j mwan3_connected
fi
if ! $IPT -S mwan3_output_hook &> /dev/null; then
$IPT -N mwan3_output_hook
fi
if ! $IPT -S PREROUTING | grep mwan3_hook &> /dev/null; then
$IPT -A PREROUTING -j mwan3_hook
fi
@ -42,10 +45,6 @@ mwan3_set_general_iptables()
$IPT -A OUTPUT -j mwan3_hook
fi
if ! $IPT -S OUTPUT | grep mwan3_output_hook &> /dev/null; then
$IPT -A OUTPUT -j mwan3_output_hook
fi
$IPT -F mwan3_rules
}
@ -62,28 +61,29 @@ mwan3_set_general_rules()
mwan3_set_connected_iptables()
{
local connected_networks
local connected_network
if $IPT -S mwan3_connected &> /dev/null; then
$IPT -F mwan3_connected
for connected_networks in $($IP route | awk '{print $1}' | egrep '[0-9]{1,3}(\.[0-9]{1,3}){3}'); do
$IPT -A mwan3_connected -d $connected_networks -j MARK --set-xmark 0xff00/0xff00
$IPS create mwan3_connected_temp hash:net
for connected_network in $($IP route | awk '{print $1}' | egrep '[0-9]{1,3}(\.[0-9]{1,3}){3}'); do
$IPS -! add mwan3_connected_temp $connected_network
done
for connected_networks in $($IP route list table 0 | awk '{print $2}' | egrep '[0-9]{1,3}(\.[0-9]{1,3}){3}'); do
$IPT -A mwan3_connected -d $connected_networks -j MARK --set-xmark 0xff00/0xff00
for connected_network in $($IP route list table 0 | awk '{print $2}' | egrep '[0-9]{1,3}(\.[0-9]{1,3}){3}'); do
$IPS -! add mwan3_connected_temp $connected_network
done
$IPT -I mwan3_connected -d 224.0.0.0/3 -j MARK --set-xmark 0xff00/0xff00
$IPT -I mwan3_connected -d 127.0.0.0/8 -j MARK --set-xmark 0xff00/0xff00
$IPS add mwan3_connected_temp 224.0.0.0/3
$IPS swap mwan3_connected_temp mwan3_connected
$IPS destroy mwan3_connected_temp
fi
}
mwan3_set_iface_iptables()
{
local local_net local_nets
if ! $IPT -S mwan3_iface_$INTERFACE &> /dev/null; then
$IPT -N mwan3_iface_$INTERFACE
fi
@ -92,16 +92,7 @@ mwan3_set_iface_iptables()
$IPT -D mwan3_ifaces -m mark --mark 0x0/0xff00 -j mwan3_iface_$INTERFACE &> /dev/null
if [ $ACTION == "ifup" ]; then
local_nets=$($IP route list dev $DEVICE scope link | awk '{print $1}' | egrep '[0-9]{1,3}(\.[0-9]{1,3}){3}')
if [ -n "$local_nets" ]; then
for local_net in $local_nets ; do
if [ $ACTION == "ifup" ]; then
$IPT -I mwan3_iface_$INTERFACE -i $DEVICE -s $local_net -m mark --mark 0x0/0xff00 -m comment --comment "default" -j MARK --set-xmark 0xff00/0xff00
fi
done
fi
$IPT -I mwan3_iface_$INTERFACE -i $DEVICE -m set --match-set mwan3_connected src -m mark --mark 0x0/0xff00 -m comment --comment "default" -j MARK --set-xmark 0xff00/0xff00
$IPT -A mwan3_iface_$INTERFACE -i $DEVICE -m mark --mark 0x0/0xff00 -m comment --comment "$INTERFACE" -j MARK --set-xmark $(($iface_id*256))/0xff00
$IPT -A mwan3_ifaces -m mark --mark 0x0/0xff00 -j mwan3_iface_$INTERFACE
fi
@ -131,6 +122,17 @@ mwan3_set_iface_rules()
[ $ACTION == "ifup" ] && $IP rule add pref $(($iface_id+2000)) fwmark $(($iface_id*256))/0xff00 lookup $iface_id
}
mwan3_set_iface_ipset()
{
local setname entry
for setname in $(ipset -n list | grep ^mwan3_sticky_); do
for entry in $(ipset list $setname | grep "$(echo $(($iface_id*256)) | awk '{ printf "0x%08x", $1; }')" | cut -d ' ' -f 1); do
$IPS del $setname $entry
done
done
}
mwan3_track()
{
local track_ip track_ips reliability count timeout interval down up
@ -154,22 +156,23 @@ mwan3_track()
config_get down $INTERFACE down 5
config_get up $INTERFACE up 5
if ! $IPT -S mwan3_track_$INTERFACE &> /dev/null; then
$IPT -N mwan3_track_$INTERFACE
$IPT -A mwan3_output_hook -p icmp -m icmp --icmp-type 8 -m length --length 32 -j mwan3_track_$INTERFACE
fi
$IPT -F mwan3_track_$INTERFACE
$IPS -! create mwan3_track_$INTERFACE hash:ip
$IPS create mwan3_track_temp_$INTERFACE hash:ip
for track_ip in $track_ips; do
$IPT -A mwan3_track_$INTERFACE -d $track_ip -j MARK --set-xmark 0xff00/0xff00
$IPS -! add mwan3_track_temp_$INTERFACE $track_ip
done
$IPS swap mwan3_track_temp_$INTERFACE mwan3_track_$INTERFACE
$IPS destroy mwan3_track_temp_$INTERFACE
$IPT -D mwan3_track -p icmp -m set --match-set mwan3_track_$INTERFACE dst -m icmp --icmp-type 8 -m length --length 32 -j MARK --set-xmark 0xff00/0xff00 &> /dev/null
$IPT -A mwan3_track -p icmp -m set --match-set mwan3_track_$INTERFACE dst -m icmp --icmp-type 8 -m length --length 32 -j MARK --set-xmark 0xff00/0xff00
[ -x /usr/sbin/mwan3track ] && /usr/sbin/mwan3track $INTERFACE $DEVICE $reliability $count $timeout $interval $down $up $track_ips &
else
$IPT -D mwan3_output_hook -p icmp -m icmp --icmp-type 8 -m length --length 32 -j mwan3_track_$INTERFACE &> /dev/null
$IPT -F mwan3_track_$INTERFACE &> /dev/null
$IPT -X mwan3_track_$INTERFACE &> /dev/null
$IPT -D mwan3_track -p icmp -m set --match-set mwan3_track_$INTERFACE dst -m icmp --icmp-type 8 -m length --length 32 -j MARK --set-xmark 0xff00/0xff00 &> /dev/null
$IPS destroy mwan3_track_$INTERFACE
fi
}
@ -182,7 +185,7 @@ mwan3_set_policy()
config_get weight $1 weight 1
[ -n "$INTERFACE" ] || return 0
config_foreach mwan3_get_iface_id interface
[ -n "$iface_id" ] || return 0
@ -200,19 +203,19 @@ mwan3_set_policy()
total_weight=$(($total_weight+$weight))
probability=$(($weight*1000/$total_weight))
if [ "$probability" -lt 10 ]; then
probability="0.00$probability"
elif [ $probability -lt 100 ]; then
elif [ $probability -lt 100 ]; then
probability="0.0$probability"
elif [ $probability -lt 1000 ]; then
elif [ $probability -lt 1000 ]; then
probability="0.$probability"
else
probability="1"
fi
probability="-m statistic --mode random --probability $probability"
$IPT -I mwan3_policy_$policy -m mark --mark 0x0/0xff00 $probability -m comment --comment "$INTERFACE $weight $total_weight" -j MARK --set-xmark $(($iface_id*256))/0xff00
fi
fi
@ -254,10 +257,34 @@ mwan3_set_policies_iptables()
config_list_foreach $policy use_member mwan3_set_policy
}
mwan3_set_sticky_iptables()
{
local INTERFACE iface_count iface_id
INTERFACE="$1"
config_foreach mwan3_get_iface_id interface
unset iface_count
$IPS -! create mwan3_sticky_$rule hash:ip,mark markmask 0xff00 timeout $timeout
if [ -n "$iface_id" ]; then
if [ -n "$($IPT -S mwan3_iface_$1 2> /dev/null)" ]; then
$IPT -I mwan3_rule_$rule -m set ! --match-set mwan3_sticky_$rule src,src -j MARK --set-xmark 0x0/0xff00
$IPT -I mwan3_rule_$rule -m mark --mark 0/0xff00 -j MARK --set-xmark $(($iface_id*256))/0xff00
fi
fi
unset iface_id
}
mwan3_set_user_rules_iptables()
{
local proto src_ip src_port dest_ip dest_port use_policy
local ipset proto src_ip src_port sticky dest_ip dest_port use_policy rule timeout
config_get sticky $1 sticky 0
config_get timeout $1 timeout 600
config_get ipset $1 ipset
config_get proto $1 proto all
config_get src_ip $1 src_ip 0.0.0.0/0
config_get src_port $1 src_port 0:65535
@ -265,6 +292,20 @@ mwan3_set_user_rules_iptables()
config_get dest_port $1 dest_port 0:65535
config_get use_policy $1 use_policy
rule="$1"
if [ "$rule" != $(echo "$rule" | cut -c1-15) ]; then
$LOG warn "Rule $rule exceeds max of 15 chars. Not setting rule" && return 0
fi
if [ -n "$ipset" ]; then
if [ -z "$($IPS -n list $ipset)" ]; then
$IPS create $ipset hash:ip timeout 3600
fi
ipset="-m set --match-set $ipset dst"
fi
if [ -n "$use_policy" ]; then
if [ "$use_policy" == "default" ]; then
use_policy="MARK --set-xmark 0xff00/0xff00"
@ -273,15 +314,32 @@ mwan3_set_user_rules_iptables()
elif [ "$use_policy" == "blackhole" ]; then
use_policy="MARK --set-xmark 0xfd00/0xff00"
else
use_policy="mwan3_policy_$use_policy"
if [ "$sticky" -eq 1 ]; then
if ! $IPT -S mwan3_rule_$rule &> /dev/null; then
$IPT -N mwan3_rule_$rule
fi
$IPT -F mwan3_rule_$rule
config_foreach mwan3_set_sticky_iptables interface
$IPT -A mwan3_rule_$rule -m mark --mark 0/0xff00 -j mwan3_policy_$use_policy
$IPT -A mwan3_rule_$rule -m mark ! --mark 0xfc00/0xfc00 -j SET --del-set mwan3_sticky_$rule src,src
$IPT -A mwan3_rule_$rule -m mark ! --mark 0xfc00/0xfc00 -j SET --add-set mwan3_sticky_$rule src,src
use_policy="mwan3_rule_$rule"
else
use_policy="mwan3_policy_$use_policy"
fi
fi
case $proto in
tcp|udp)
$IPT -A mwan3_rules -p $proto -s $src_ip -d $dest_ip -m multiport --sports $src_port -m multiport --dports $dest_port -m mark --mark 0/0xff00 -m comment --comment "$1" -j $use_policy &> /dev/null
$IPT -A mwan3_rules -p $proto -s $src_ip -d $dest_ip $ipset -m multiport --sports $src_port -m multiport --dports $dest_port -m mark --mark 0/0xff00 -m comment --comment "$1" -j $use_policy &> /dev/null
;;
*)
$IPT -A mwan3_rules -p $proto -s $src_ip -d $dest_ip -m mark --mark 0/0xff00 -m comment --comment "$1" -j $use_policy &> /dev/null
$IPT -A mwan3_rules -p $proto -s $src_ip -d $dest_ip $ipset -m mark --mark 0/0xff00 -m comment --comment "$1" -j $use_policy &> /dev/null
;;
esac
fi
@ -333,6 +391,7 @@ mwan3_ifupdown()
mwan3_set_iface_route
mwan3_set_iface_rules
[ $ACTION == "ifdown" ] && mwan3_set_iface_ipset
[ $ACTION == "ifup" ] && mwan3_track
config_foreach mwan3_set_policies_iptables policy
@ -346,9 +405,15 @@ if [ $ACTION == "ifup" ]; then
[ -n "$DEVICE" ] || exit 0
fi
local IP IPT LOG
[ -x /usr/sbin/ip ] || exit 1
[ -x /usr/sbin/ipset ] || exit 1
[ -x /usr/sbin/iptables ] || exit 1
[ -x /usr/bin/logger ] || exit 1
local IP IPS IPT LOG
IP="/usr/sbin/ip -4"
IPS="/usr/sbin/ipset"
IPT="/usr/sbin/iptables -t mangle -w"
LOG="/usr/bin/logger -t mwan3 -p"


+ 27
- 21
net/mwan3/files/usr/sbin/mwan3 View File

@ -2,14 +2,15 @@
. /lib/functions.sh
IP="/usr/sbin/ip -4"
IPS="/usr/sbin/ipset"
IPT="/usr/sbin/iptables -t mangle -w"
help()
{
cat <<EOF
Syntax: mwan3 [command]
Available commands:
{
cat <<EOF
Syntax: mwan3 [command]
Available commands:
start Load iptables rules, ip rules and ip routes
stop Unload iptables rules, ip rules and ip routes
restart Reload iptables rules, ip rules and ip routes
@ -54,11 +55,11 @@ ifup()
if [ -n "$2" ]; then
echo "Too many arguments. Usage: mwan3 ifup <interface>" && exit 0
fi
config_get enabled "$1" enabled 0
device=$(uci get -p /var/state network.$1.ifname) &> /dev/null
if [ -n "$device" ] ; then
[ "$enabled" -eq 1 ] && ACTION=ifup INTERFACE=$1 DEVICE=$device /sbin/hotplug-call iface
fi
@ -71,14 +72,14 @@ interfaces()
config_load mwan3
echo "Interface status:"
check_iface_status()
{
let iface_id++
device=$(uci get -p /var/state network.$1.ifname) &> /dev/null
if [ -z "$device" ]; then
echo "Interface $1 is unknown"
echo " interface $1 is unknown"
return 0
fi
@ -92,21 +93,21 @@ interfaces()
if [ -n "$($IP rule | awk '$5 == "'$device'"')" -a -n "$($IPT -S mwan3_iface_$1 2> /dev/null)" -a -n "$($IP route list table $iface_id default dev $device 2> /dev/null)" ]; then
if [ -n "$(uci get -p /var/state mwan3.$1.track_ip 2> /dev/null)" ]; then
echo "Interface $1 is online (tracking $tracking)"
echo " interface $1 is online (tracking $tracking)"
else
echo "Interface $1 is online"
echo " interface $1 is online"
fi
elif [ -n "$($IP rule | awk '$5 == "'$device'"')" -o -n "$($IPT -S mwan3_iface_$1 2> /dev/null)" -o -n "$($IP route list table $iface_id default dev $device 2> /dev/null)" ]; then
echo "Interface $1 error"
echo " interface $1 error"
else
if [ "$enabled" -eq 1 ]; then
if [ -n "$(uci get -p /var/state mwan3.$1.track_ip 2> /dev/null)" ]; then
echo "Interface $1 is offline (tracking $tracking)"
echo " interface $1 is offline (tracking $tracking)"
else
echo "Interface $1 is offline"
echo " interface $1 is offline"
fi
else
echo "Interface $1 is disabled"
echo " interface $1 is disabled"
fi
fi
}
@ -141,17 +142,19 @@ policies()
}
rules()
{
local address
if [ -n "$($IPT -S mwan3_connected 2> /dev/null)" ]; then
echo "Known networks:"
echo "destination policy hits" | awk '{ printf "%-19s%-19s%-9s%s\n",$1,$2,$3}' | awk '1; {gsub(".","-")}1'
$IPT -L mwan3_connected -n -v 2> /dev/null | tail -n+3 | sed 's/mark.*//' | sed 's/mwan3_policy_//' | awk '{printf "%-19s%-19s%-9s%s\n",$9,"default",$1}'
for address in $($IPS list mwan3_connected | egrep '[0-9]{1,3}(\.[0-9]{1,3}){3}'); do
echo " $address"
done
echo -e
fi
if [ -n "$($IPT -S mwan3_rules 2> /dev/null)" ]; then
echo "Active rules:"
echo "source destination proto src-port dest-port policy hits" | awk '{ printf "%-19s%-19s%-7s%-14s%-14s%-16s%-9s%s\n",$1,$2,$3,$4,$5,$6,$7}' | awk '1; {gsub(".","-")}1'
$IPT -L mwan3_rules -n -v 2> /dev/null | tail -n+3 | sed 's/mark.*//' | sed 's/mwan3_policy_//' | awk '{ printf "%-19s%-19s%-7s%-14s%-14s%-16s%-9s%s\n",$8,$9,$4,$12,$15,$3,$1}'
$IPT -L mwan3_rules -n -v 2> /dev/null | tail -n+3 | sed 's/mark.*//' | sed 's/mwan3_policy_/- /' | sed 's/mwan3_rule_/S /'
echo -e
fi
}
@ -171,7 +174,7 @@ start()
stop()
{
local route rule table
local ipset route rule table
killall mwan3track &> /dev/null
rm /var/run/mwan3track-* &> /dev/null
@ -186,7 +189,6 @@ stop()
$IPT -D PREROUTING -j mwan3_hook &> /dev/null
$IPT -D OUTPUT -j mwan3_hook &> /dev/null
$IPT -D OUTPUT -j mwan3_output_hook &> /dev/null
for table in $($IPT -S | awk '{print $2}' | grep mwan3 | sort -u); do
$IPT -F $table &> /dev/null
@ -195,6 +197,10 @@ stop()
for table in $($IPT -S | awk '{print $2}' | grep mwan3 | sort -u); do
$IPT -X $table &> /dev/null
done
for ipset in $(ipset -n list | grep mwan3); do
$IPS destroy $ipset
done
}
restart() {


+ 0
- 6
net/net-snmp/Makefile View File

@ -216,7 +216,6 @@ define Package/libnetsnmp/install
endef
define Package/snmpd/conffiles
/etc/default/snmpd
/etc/config/snmpd
endef
@ -225,8 +224,6 @@ define Package/snmpd/install
$(INSTALL_DATA) ./files/snmpd.conf $(1)/etc/config/snmpd
$(INSTALL_DIR) $(1)/etc/snmp
ln -sf /var/run/snmpd.conf $(1)/etc/snmp/
$(INSTALL_DIR) $(1)/etc/default
$(INSTALL_DATA) ./files/snmpd.default $(1)/etc/default/snmpd
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/snmpd.init $(1)/etc/init.d/snmpd
$(INSTALL_DIR) $(1)/usr/sbin
@ -234,7 +231,6 @@ define Package/snmpd/install
endef
define Package/snmpd-static/conffiles
/etc/default/snmpd
/etc/config/snmpd
endef
@ -243,8 +239,6 @@ define Package/snmpd-static/install
$(INSTALL_DATA) ./files/snmpd.conf $(1)/etc/config/snmpd
$(INSTALL_DIR) $(1)/etc/snmp
ln -sf /var/run/snmpd.conf $(1)/etc/snmp/
$(INSTALL_DIR) $(1)/etc/default
$(INSTALL_DATA) ./files/snmpd.default $(1)/etc/default/snmpd
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/snmpd.init $(1)/etc/init.d/snmpd
$(INSTALL_DIR) $(1)/usr/sbin


+ 0
- 1
net/net-snmp/files/snmpd.default View File

@ -1 +0,0 @@
OPTIONS="-Lf /dev/null -p /var/run/snmpd.pid"

+ 45
- 31
net/net-snmp/files/snmpd.init View File

@ -2,35 +2,35 @@
# Copyright (C) 2008 OpenWrt.org
START=50
DEFAULT=/etc/default/snmpd
LIB_D=/var/lib/snmp
LOG_D=/var/log
RUN_D=/var/run
PID_F=$RUN_D/snmpd.pid
RUN_C=$RUN_D/snmpd.conf
USE_PROCD=1
PROG="/usr/sbin/snmpd"
CONFIGFILE="/var/run/snmpd.conf"
snmpd_agent_add() {
local cfg="$1"
config_get agentaddress "$cfg" agentaddress
[ -n "$agentaddress" ] || return 0
echo "agentaddress $agentaddress" >> $RUN_C
echo "agentaddress $agentaddress" >> $CONFIGFILE
}
snmpd_system_add() {
local cfg="$1"
config_get syslocation "$cfg" sysLocation
[ -n "$syslocation" ] && echo "sysLocation $syslocation" >> $RUN_C
[ -n "$syslocation" ] && echo "sysLocation $syslocation" >> $CONFIGFILE
config_get syscontact "$cfg" sysContact
[ -n "$syscontact" ] && echo "sysContact $syscontact" >> $RUN_C
[ -n "$syscontact" ] && echo "sysContact $syscontact" >> $CONFIGFILE
config_get sysname "$cfg" sysName
[ -n "$sysname" ] && echo "sysName $sysname" >> $RUN_C
[ -n "$sysname" ] && echo "sysName $sysname" >> $CONFIGFILE
config_get sysservice "$cfg" sysService
[ -n "$sysservice" ] && echo "sysService $sysservice" >> $RUN_C
[ -n "$sysservice" ] && echo "sysService $sysservice" >> $CONFIGFILE
config_get sysdescr "$cfg" sysDescr
[ -n "$sysdescr" ] && echo "sysDescr $sysdescr" >> $RUN_C
[ -n "$sysdescr" ] && echo "sysDescr $sysdescr" >> $CONFIGFILE
config_get sysobjectid "$cfg" sysObjectID
[ -n "$sysobjectid" ] && echo "sysObjectID $sysobjectid" >> $RUN_C
[ -n "$sysobjectid" ] && echo "sysObjectID $sysobjectid" >> $CONFIGFILE
}
snmpd_com2sec_add() {
local cfg="$1"
config_get secname "$cfg" secname
@ -39,8 +39,9 @@ snmpd_com2sec_add() {
[ -n "$source" ] || return 0
config_get community "$cfg" community
[ -n "$community" ] || return 0
echo "com2sec $secname $source $community" >> $RUN_C
echo "com2sec $secname $source $community" >> $CONFIGFILE
}
snmpd_com2sec6_add() {
local cfg="$1"
config_get secname "$cfg" secname
@ -49,8 +50,9 @@ snmpd_com2sec6_add() {
[ -n "$source" ] || return 0
config_get community "$cfg" community
[ -n "$community" ] || return 0
echo "com2sec6 $secname $source $community" >> $RUN_C
echo "com2sec6 $secname $source $community" >> $CONFIGFILE
}
snmpd_group_add() {
local cfg="$1"
config_get group "$cfg" group
@ -59,8 +61,9 @@ snmpd_group_add() {
[ -n "$version" ] || return 0
config_get secname "$cfg" secname
[ -n "$secname" ] || return 0
echo "group $group $version $secname" >> $RUN_C
echo "group $group $version $secname" >> $CONFIGFILE
}
snmpd_view_add() {
local cfg="$1"
config_get viewname "$cfg" viewname
@ -71,8 +74,9 @@ snmpd_view_add() {
[ -n "$oid" ] || return 0
# optional mask
config_get mask "$cfg" mask
echo "view $viewname $type $oid $mask" >> $RUN_C
echo "view $viewname $type $oid $mask" >> $CONFIGFILE
}
snmpd_access_add() {
local cfg="$1"
config_get group "$cfg" group
@ -92,8 +96,9 @@ snmpd_access_add() {
[ -n "$write" ] || return 0
config_get notify "$cfg" notify
[ -n "$notify" ] || return 0
echo "access $group $context $version $level $prefix $read $write $notify" >> $RUN_C
echo "access $group $context $version $level $prefix $read $write $notify" >> $CONFIGFILE
}
snmpd_pass_add() {
local cfg="$1"
local pass='pass'
@ -106,8 +111,9 @@ snmpd_pass_add() {
[ $persist -ne 0 ] && pass='pass_persist'
config_get priority "$cfg" priority
priority=${priority:+-p $priority}
echo "$pass $priority $miboid $prog" >> $RUN_C
echo "$pass $priority $miboid $prog" >> $CONFIGFILE
}
snmpd_exec_add() {
local cfg="$1"
@ -117,8 +123,9 @@ snmpd_exec_add() {
[ -n "$prog" ] || return 0
config_get args "$cfg" args
config_get miboid "$cfg" miboid
echo "exec $miboid $name $prog $args" >> $RUN_C
echo "exec $miboid $name $prog $args" >> $CONFIGFILE
}
snmpd_disk_add() {
local cfg="$1"
local disk='disk'
@ -127,13 +134,13 @@ snmpd_disk_add() {
[ -n "$partition" ] || return 0
config_get size "$cfg" size
[ -n "$size" ] || return 0
echo "$disk $partition $size" >> $RUN_C
echo "$disk $partition $size" >> $CONFIGFILE
}
start() {
[ -d $LIB_D ] || mkdir -p $LIB_D
[ -d $LOG_D ] || mkdir -p $LOG_D
[ -d $RUN_D ] || mkdir -p $RUN_D
[ -f $RUN_C ] && rm -f $RUN_C
start_service() {
[ -f "$CONFIGFILE" ] && rm -f "$CONFIGFILE"
procd_open_instance
config_load snmpd
@ -148,10 +155,17 @@ start() {
config_foreach snmpd_exec_add exec
config_foreach snmpd_disk_add disk
[ -f $DEFAULT ] && . $DEFAULT
$DEBUG /usr/sbin/snmpd $OPTIONS
procd_set_param command $PROG -Lf /dev/null -f
procd_set_param file $CONFIGFILE
procd_set_param respawn
for iface in $(ls /sys/class/net 2>/dev/null); do
procd_append_param netdev "$iface"
done
procd_close_instance
}
stop() {
[ -f $PID_F ] && kill $(cat $PID_F)
[ -f $RUN_C ] && rm -f $RUN_C
stop_service() {
[ -f "$CONFIGFILE" ] && rm -f "$CONFIGFILE"
}

+ 3
- 3
net/openconnect/Makefile View File

@ -8,12 +8,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=openconnect
PKG_VERSION:=7.04
PKG_RELEASE:=3
PKG_VERSION:=7.05
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=ftp://ftp.infradead.org/pub/openconnect/
PKG_MD5SUM:=828fe81388b7ea1155419b8be64a350f
PKG_MD5SUM:=10cd4f61e8a11cdf793da2b0fd7a6003
PKG_CONFIG_DEPENDS:= \
CONFIG_OPENCONNECT_GNUTLS \


+ 4
- 5
net/openssh/Makefile View File

@ -8,13 +8,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=openssh
PKG_VERSION:=6.7p1
PKG_RELEASE:=3
PKG_VERSION:=6.8p1
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/ \
http://ftp.belnet.be/pub/OpenBSD/OpenSSH/portable/
PKG_MD5SUM:=3246aa79317b1d23cae783a3bf8275d6
PKG_MD5SUM:=08f72de6751acfbd0892b5f003922701
PKG_LICENSE:=BSD ISC
PKG_LICENSE_FILES:=LICENCE
@ -29,7 +29,7 @@ include $(INCLUDE_DIR)/package.mk
define Package/openssh/Default
SECTION:=net
CATEGORY:=Network
DEPENDS:=+libopenssl +zlib +SSP_SUPPORT:libssp
DEPENDS:=+libopenssl +zlib
TITLE:=OpenSSH
MAINTAINER:=Peter Wagner <tripolar@gmx.at>
URL:=http://www.openssh.com/
@ -124,7 +124,6 @@ endef
define Package/openssh-sftp-server
$(call Package/openssh/Default)
TITLE+= SFTP server
DEPENDS:=+SSP_SUPPORT:libssp
endef
define Package/openssh-sftp-server/description


+ 1
- 1
net/openssh/patches/130-implicit_memset_decl_fix.patch View File

@ -1,6 +1,6 @@
--- a/includes.h
+++ b/includes.h
@@ -59,6 +59,9 @@
@@ -60,6 +60,9 @@
/*
*-*-nto-qnx needs these headers for strcasecmp and LASTLOG_FILE respectively
*/


+ 2
- 2
net/snort/Makefile View File

@ -8,12 +8,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=snort
PKG_VERSION:=2.9.7.0
PKG_VERSION:=2.9.7.2
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://www.snort.org/downloads/snort/
PKG_MD5SUM:=c2a45bc56441ee9456478f219dd8d1e2
PKG_MD5SUM:=b01e9964827394c39194a0147bc15705
PKG_BUILD_DEPENDS:=librpc
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)


+ 3
- 3
net/sslh/Makefile View File

@ -8,12 +8,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=sslh
PKG_VERSION:=v1.16
PKG_RELEASE:=2
PKG_VERSION:=v1.17
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://rutschle.net/tech/
PKG_MD5SUM:=c6e7d1cb0adb15f6efe480e36d98c560
PKG_MD5SUM:=1fc3ada4bafaca5a9786cc1431f48ed4
PKG_LICENSE:=GPL-2.0+
PKG_LICENSE_FILES:=COPYING


+ 1
- 1
net/sslh/patches/001-no_sslh_select.patch View File

@ -18,7 +18,7 @@
echosrv: $(OBJS) echosrv.o
$(CC) $(CFLAGS) $(LDFLAGS) -o echosrv echosrv.o probe.o common.o $(LIBS)
@@ -86,7 +82,7 @@ distclean: clean
@@ -85,7 +81,7 @@ distclean: clean
rm -f tags cscope.*
clean:


+ 77
- 0
net/stunnel/Makefile View File

@ -0,0 +1,77 @@
#
# 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:=stunnel
PKG_VERSION:=5.10
PKG_RELEASE:=1
PKG_LICENSE:=GPL-2.0+
PKG_MAINTAINER:=Michael Haas <haas@computerlinguist.org>
PKG_LICENSE_FILES:=COPYING COPYRIGHT.GPL
PKG_SOURCE_URL:=http://stunnel.cybermirror.org/archive/5.x/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_MD5SUM:=a0edda805eb7d6ea600a230fb0979ea1
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
define Package/stunnel
SECTION:=net
CATEGORY:=Network
DEPENDS:=+libopenssl
TITLE:=SSL TCP Wrapper
URL:=http://www.stunnel.org/
endef
define Package/stunnel/description
Stunnel is a program that allows you to encrypt arbitrary TCP
connections inside SSL (Secure Sockets Layer) available on both Unix
and Windows. Stunnel can allow you to secure non-SSL aware daemons and
protocols (like POP, IMAP, LDAP, etc) by having Stunnel provide the
encryption, requiring no changes to the daemon's code.
endef
define Package/stunnel/conffiles
/etc/stunnel/stunnel.conf
endef
CONFIGURE_ARGS+= \
--with-random=/dev/urandom \
--with-threads=fork \
--with-ssl=$(STAGING_DIR)/usr \
--disable-libwrap \
--disable-systemd
ifeq ($(CONFIG_IPV6),n)
CONFIGURE_ARGS+= \
--disable-ipv6
endif
define Build/Compile
mkdir -p $(PKG_INSTALL_DIR)/etc/stunnel
echo '#dummy' > $(PKG_INSTALL_DIR)/etc/stunnel/stunnel.pem
$(call Build/Compile/Default)
endef
define Package/stunnel/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/stunnel $(1)/usr/bin/
$(INSTALL_DIR) $(1)/usr/lib/stunnel
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/stunnel/libstunnel.so $(1)/usr/lib/stunnel/
$(INSTALL_DIR) $(1)/etc/stunnel
$(INSTALL_CONF) ./files/stunnel.conf $(1)/etc/stunnel/stunnel.conf
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/stunnel.init $(1)/etc/init.d/stunnel
endef
$(eval $(call BuildPackage,stunnel))

+ 45
- 0
net/stunnel/files/stunnel.conf View File

@ -0,0 +1,45 @@
; Drop privileges
setuid = nobody
setgid = nogroup
; When running under procd, stay in foreground
foreground = yes
; Don't log to stderr, use syslog
syslog = yes
; 1-7. Use 7 for greatest verbosity
;debug = 5
; Starting here, enter your services or uncomment the examples
; Example:
; If your local httpd does not support HTTPS, use stunnel in remote
; mode to forward TLS connections coming in on port 443 to non-TLS
; on port 80.
; Make sure that the cert is available.
;[httpd]
;accept = 443
;connect = 127.0.0.1:80
;cert = /etc/stunnel/stunnel.pem
; Example:
; If your local email client does not support TLS,
; use stunnel in client mode to forward non-TLS connections on
; port 143 to TLS-enabled servername:993.
;[imap]
;client = yes
;accept = 143
;connect = servername:993
; Disable peer verification - be sure to understand the limitations of peer
; verification in stunnel when enabling.
;verify = 0
; Default client section:
; stunnel requires at least one section to start successfully.
; You can safely remove this section once you have configured
; your own. We use client mode here as server requires a certificate.
[dummy]
client = yes
accept = localhost:6000
connect = localhost:6001

+ 12
- 0
net/stunnel/files/stunnel.init View File

@ -0,0 +1,12 @@
#!/bin/sh /etc/rc.common
# Copyright (C) 2006-2008 OpenWrt.org
START=90
USE_PROCD=1
start_service() {
procd_open_instance
procd_set_param command /usr/bin/stunnel /etc/stunnel/stunnel.conf
procd_set_param respawn # respawn automatically if something died
procd_close_instance
}

+ 25
- 0
net/stunnel/patches/010_fix_getnameinfo.patch View File

@ -0,0 +1,25 @@
--- a/src/prototypes.h
+++ b/src/prototypes.h
@@ -559,7 +559,7 @@ extern GETNAMEINFO s_getnameinfo;
#endif /* USE_WIN32 */
-int getnameinfo(const struct sockaddr *, int, char *, int, char *, int, int);
+int getnameinfo(const struct sockaddr *, socklen_t, char *, socklen_t, char *, socklen_t, unsigned int);
#endif /* !defined HAVE_GETNAMEINFO */
--- a/src/resolver.c
+++ b/src/resolver.c
@@ -535,8 +535,9 @@ const char *s_gai_strerror(int err) {
/* implementation is limited to functionality needed by stunnel */
#ifndef HAVE_GETNAMEINFO
-int getnameinfo(const struct sockaddr *sa, int salen,
- char *host, int hostlen, char *serv, int servlen, int flags) {
+int getnameinfo(const struct sockaddr *sa, socklen_t salen,
+ char *host, socklen_t hostlen, char *serv, socklen_t servlen,
+ unsigned int flags) {
#if defined(USE_WIN32) && !defined(_WIN32_WCE)
if(s_getnameinfo)

+ 140
- 0
net/stunnel/patches/011_disable_ssp_linking.patch View File

@ -0,0 +1,140 @@
--- a/configure
+++ b/configure
@@ -5646,66 +5646,66 @@ done
-for flag in -fstack-protector; do
- as_CACHEVAR=`$as_echo "ax_cv_check_cflags__$flag" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5
-$as_echo_n "checking whether C compiler accepts $flag... " >&6; }
-if eval \${$as_CACHEVAR+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- ax_check_save_flags=$CFLAGS
- CFLAGS="$CFLAGS $flag"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- eval "$as_CACHEVAR=yes"
-else
- eval "$as_CACHEVAR=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS=$ax_check_save_flags
-fi
-eval ac_res=\$$as_CACHEVAR
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then :
- if ${CFLAGS+:} false; then :
- case " $CFLAGS " in
- *" $flag "*)
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5
- (: CFLAGS already contains $flag) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
- ;;
- *)
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5
- (: CFLAGS="$CFLAGS $flag") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
- CFLAGS="$CFLAGS $flag"
- ;;
- esac
-else
- CFLAGS="$flag"
-fi
-
-else
- :
-fi
-
-done
+#for flag in -fstack-protector; do
+# as_CACHEVAR=`$as_echo "ax_cv_check_cflags__$flag" | $as_tr_sh`
+#{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5
+#$as_echo_n "checking whether C compiler accepts $flag... " >&6; }
+#if eval \${$as_CACHEVAR+:} false; then :
+# $as_echo_n "(cached) " >&6
+#else
+#
+# ax_check_save_flags=$CFLAGS
+# CFLAGS="$CFLAGS $flag"
+# cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+#/* end confdefs.h. */
+
+#int
+#main ()
+#{
+#
+# ;
+# return 0;
+#}
+#_ACEOF
+#if ac_fn_c_try_compile "$LINENO"; then :
+# eval "$as_CACHEVAR=yes"
+#else
+# eval "$as_CACHEVAR=no"
+#fi
+#rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+# CFLAGS=$ax_check_save_flags
+#fi
+#eval ac_res=\$$as_CACHEVAR
+# { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+#$as_echo "$ac_res" >&6; }
+#if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then :
+# if ${CFLAGS+:} false; then :
+# case " $CFLAGS " in
+# *" $flag "*)
+# { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5
+# (: CFLAGS already contains $flag) 2>&5
+# ac_status=$?
+# $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+# test $ac_status = 0; }
+# ;;
+# *)
+# { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5
+# (: CFLAGS="$CFLAGS $flag") 2>&5
+# ac_status=$?
+# $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+# test $ac_status = 0; }
+# CFLAGS="$CFLAGS $flag"
+# ;;
+# esac
+#else
+# CFLAGS="$flag"
+#fi
+#
+#else
+# :
+#fi
+#
+#done
--- a/configure.ac
+++ b/configure.ac
@@ -71,7 +71,7 @@ AX_APPEND_COMPILE_FLAGS([-Wformat=2])
AX_APPEND_COMPILE_FLAGS([-Wconversion])
AX_APPEND_COMPILE_FLAGS([-Wno-long-long])
AX_APPEND_COMPILE_FLAGS([-Wno-deprecated-declarations])
-AX_APPEND_COMPILE_FLAGS([-fstack-protector])
+#AX_APPEND_COMPILE_FLAGS([-fstack-protector])
AX_APPEND_COMPILE_FLAGS([-fPIE])
AX_APPEND_COMPILE_FLAGS([-D_FORTIFY_SOURCE=2])
AX_APPEND_LINK_FLAGS([-fPIE -pie])

+ 1
- 1
net/tor/Makefile View File

@ -41,7 +41,7 @@ endef
define Package/tor
$(call Package/tor/Default)
TITLE:=An anonymous Internet communication system
DEPENDS:=+libevent2 +libopenssl +libpthread +librt +SSP_SUPPORT:libssp
DEPENDS:=+libevent2 +libopenssl +libpthread +librt
endef
define Package/tor/description


+ 110
- 0
sound/pianod/Makefile View File

@ -0,0 +1,110 @@
#
# 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:=pianod
PKG_VERSION:=173
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://deviousfish.com/Downloads/pianod/
PKG_MD5SUM:=be0cec19ea6df1c4bc6c1cac8e253445
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
PKG_LICENSE:=MIT VARIOUS
PKG_LICENSE_FILES:=COPYING
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
define Package/pianod
SECTION:=sound
CATEGORY:=Sound
DEPENDS:=+libao +libfaad2 +libmad +libpolarssl +libjson-c +libgcrypt +libpthread
TITLE:=Pandora radio daemon
USERID:=pianod=88:pianod=88
URL:=http://deviousfish.com/pianod/
endef
define Package/pianod/description
pianod is a Pandora music player client with line-oriented and Websocket control interfaces.
A simple protocol makes for easy clients, mix scripting, integration with a
home automation system, use as multiple-user music system for home or office.
Documentation and configuration information can be found at:
http://deviousfish.com/pianod/
endef
define Package/pianod-client
SECTION:=sound
CATEGORY:=Sound
DEPENDS:=+pianod
TITLE:=Pandora radio daemon WebUI
URL:=http://deviousfish.com/pianod/
endef
define Package/pianod-client/description
Web client UI and remote player viewer for pianod
Examples --- (Note: The viewer.* files need not be on the pianod host)
Main interface: http://pianod-host:4446/pianod
Remote viewer: file:///<path>/viewer.html?server=pianod-host:4446 --or--
http://pianod-host:4446/pianod/viewer.html?server=pianod-host:4446
endef
CONFIGURE_ARGS+= --with-polarssl
PIANOD_CLIENT:=pianod-client-compiled-51.tar.gz
define Download/pianod-client
URL:=$(PKG_SOURCE_URL)/Devel
FILE:=$(PIANOD_CLIENT)
MD5SUM:=abbdee5627bcee6a00c8304da8b4e2e7
endef
define Package/pianod/conffiles
/etc/pianod/startscript
/etc/pianod/users
endef
define Build/Prepare
$(call Build/Prepare/Default)
ifeq ($(CONFIG_PACKAGE_pianod-client),y)
$(eval $(call Download,pianod-client))
mkdir -p $(PKG_BUILD_DIR)/pianod-client
$(TAR) -xf $(DL_DIR)/$(PIANOD_CLIENT) --strip=1 -C $(PKG_BUILD_DIR)/pianod-client
endif
endef
define Package/pianod-client/Configure
endef
define Package/pianod-client/Compile
endef
define Package/pianod/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/pianod $(1)/usr/bin/
# These scripts need ksh (install mksh and link)
# $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/piano $(1)/usr/bin/
# $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/runmix $(1)/usr/bin/
$(INSTALL_DIR) $(1)/etc/pianod
$(INSTALL_DATA) $(PKG_BUILD_DIR)/contrib/startscript-example $(1)/etc/pianod/startscript
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/pianod.init $(1)/etc/init.d/pianod
endef
define Package/pianod-client/install
$(INSTALL_DIR) $(1)/www/pianod
$(INSTALL_DATA) $(PKG_BUILD_DIR)/pianod-client/*.{html,js,gif,jpeg,css} $(1)/www/pianod/
endef
$(eval $(call BuildPackage,pianod))
$(eval $(call BuildPackage,pianod-client))

+ 42
- 0
sound/pianod/files/pianod.init View File

@ -0,0 +1,42 @@
#!/bin/sh /etc/rc.common
# Copyright (C) 2015 OpenWrt.org
NAME=pianod
START=95
USE_PROCD=1
PD_USER=$NAME
PD_STARTSCRIPT=/etc/$NAME/startscript
PD_PASSWDFILE=/etc/$NAME/users
PD_WEBUI=/www/$NAME
start_service() {
# Take group ownership of audio devices
chown root:$NAME /dev/snd/* /dev/mixer /dev/dsp
chmod 664 /dev/snd/* /dev/mixer /dev/dsp
procd_open_instance
procd_set_param command "/usr/bin/$NAME"
procd_append_param command -n $PD_USER
procd_append_param command -i "$PD_STARTSCRIPT"
procd_append_param command -u "$PD_PASSWDFILE"
[ -d "$PD_WEBUI" ] && procd_append_param command -c "$PD_WEBUI"
# No HTTPS support without certificates
procd_append_param command -s 0
procd_close_instance
}
# Wait for service to exit and release sockets
reload_service() {
stop
sleep 2
start
}
restart() {
reload_service
}

+ 29
- 0
sound/pianod/patches/005-Fix_IPV6_socket_handling.patch View File

@ -0,0 +1,29 @@
--- a/src/libwaitress/waitress.c
+++ b/src/libwaitress/waitress.c
@@ -813,7 +813,14 @@ static WaitressReturn_t WaitressConnect
sizeof (sockopt));
/* non-blocking connect will return immediately */
- connect (sock, gacurr->ai_addr, gacurr->ai_addrlen);
+ if (connect (sock, gacurr->ai_addr, gacurr->ai_addrlen) == -1) {
+ // Error if not in-progress or immediate success
+ if (errno != EINPROGRESS) {
+ // Close socket and try alternatives
+ close (sock);
+ continue;
+ }
+ }
pollres = WaitressPollLoop (sock, POLLOUT, waith->timeout);
if (pollres == 0) {
--- a/src/libfootball/fb_service.c
+++ b/src/libfootball/fb_service.c
@@ -111,6 +111,8 @@ static bool fb_setup_socket (FB_SERVICE
service->socket [which] = 0;
} else {
fb_perror ("socket");
+ // Element must be zero (not -1)
+ service->socket [which] = 0;
};
return false;
}

+ 42
- 0
sound/pianod/patches/010-Configure_add_SSL_options.patch View File

@ -0,0 +1,42 @@
--- a/configure.ac
+++ b/configure.ac
@@ -31,8 +31,6 @@ AC_CHECK_LIB([pthread], [pthread_create]
# with it, but don't consider it an error.
# PKG_CHECK_MODULES only validates that pkg-config returns stuff; it doesn't
# validate that these are correct, so check lib to make sure they're right.
-PKG_CHECK_MODULES([gnutls], [gnutls],,
- [AC_MSG_WARN([No pkg-config for libgnutls])])
PKG_CHECK_MODULES([ao], [ao],,
[AC_MSG_WARN([No pkg-config for libao])])
PKG_CHECK_MODULES([mad], [mad],,
@@ -42,12 +40,28 @@ PKG_CHECK_MODULES([json], [json-c],,
[PKG_CHECK_MODULES([json], [json0],,
[AC_MSG_WARN([No pkg-config for json-c (aka libjson0, libjson)])])])])
+
# Network communication stuff:
AC_CHECK_LIB([gcrypt], [gcry_cipher_open],,
[AC_MSG_ERROR([Cannot find required library: libgcrypt],1)])
-AC_CHECK_LIB([gnutls], [gnutls_record_recv],,
+# Check for SSL option
+AC_ARG_WITH(polarssl, [ --with-polarssl Build waitress with PolarSSL (default GNUTLS)], [
+ AC_MSG_RESULT(>>Using PolarSSL)
+ HAS_POLARSSL=1
+ AC_DEFINE([USE_POLARSSL], 1, [Build for PolarSSL])
+ PKG_CHECK_MODULES([polarssl], [polarssl],,
+ [AC_MSG_WARN([No pkg-config for libpolarssl])])
+ AC_CHECK_LIB([polarssl], [ssl_set_session],,
+ [AC_MSG_ERROR([Cannot find required library: libpolarssl (aka polarssl)],1)])] )
+AM_CONDITIONAL([USE_POLARSSL],[test "x$HAS_POLARSSL" = "x1"])
+
+if test "x$HAS_POLARSSL" != x1 ; then
+ PKG_CHECK_MODULES([gnutls], [gnutls],,
+ [AC_MSG_WARN([No pkg-config for libgnutls])])
+ AC_CHECK_LIB([gnutls], [gnutls_record_recv],,
[AC_MSG_ERROR([Cannot find required library: libgnutls (aka gnutls)],1)])
-AC_CHECK_FUNCS(gnutls_transport_set_int2 gnutls_sec_param_to_pk_bits)
+ AC_CHECK_FUNCS(gnutls_transport_set_int2 gnutls_sec_param_to_pk_bits)
+fi
# Bloody json library may be linked via -ljson, or -ljson-c depending on
# the platform. Try both.

+ 59
- 0
sound/pianod/patches/020-Use_package_config_h_for_all_modules.patch View File

@ -0,0 +1,59 @@
--- a/src/libpiano/config.h
+++ /dev/null
@@ -1 +0,0 @@
-#define PACKAGE "libpiano"
--- a/src/libwaitress/config.h
+++ /dev/null
@@ -1 +0,0 @@
-#define PACKAGE "libwaitress"
--- a/src/libpiano/piano.h
+++ b/src/libpiano/piano.h
@@ -39,6 +39,8 @@ THE SOFTWARE.
* http://pan-do-ra-api.wikia.com
*/
+#define LIBPIANO_NAME "libpiano"
+
#define PIANO_RPC_HOST "tuner.pandora.com"
#define PIANO_RPC_PATH "/services/json/?"
--- a/src/libwaitress/waitress.c
+++ b/src/libwaitress/waitress.c
@@ -922,14 +922,14 @@ static WaitressReturn_t WaitressSendRequ
if (WaitressProxyEnabled (waith) && !waith->url.tls) {
snprintf (buf, WAITRESS_BUFFER_SIZE,
"%s http://%s:%s/%s HTTP/" WAITRESS_HTTP_VERSION "\r\n"
- "Host: %s\r\nUser-Agent: " PACKAGE "\r\nConnection: Close\r\n",
+ "Host: %s\r\nUser-Agent: " LIBWAITRESS_NAME "\r\nConnection: Close\r\n",
(waith->method == WAITRESS_METHOD_GET ? "GET" : "POST"),
waith->url.host,
WaitressDefaultPort (&waith->url), path, waith->url.host);
} else {
snprintf (buf, WAITRESS_BUFFER_SIZE,
"%s /%s HTTP/" WAITRESS_HTTP_VERSION "\r\n"
- "Host: %s\r\nUser-Agent: " PACKAGE "\r\nConnection: Close\r\n",
+ "Host: %s\r\nUser-Agent: " LIBWAITRESS_NAME "\r\nConnection: Close\r\n",
(waith->method == WAITRESS_METHOD_GET ? "GET" : "POST"),
path, waith->url.host);
}
--- a/src/libwaitress/waitress.h
+++ b/src/libwaitress/waitress.h
@@ -29,6 +29,8 @@ THE SOFTWARE.
#include <stdbool.h>
#include <gnutls/gnutls.h>
+#define LIBWAITRESS_NAME "libwaitress"
+
#define WAITRESS_BUFFER_SIZE 10*1024
typedef enum {
--- a/src/libpiano/request.c
+++ b/src/libpiano/request.c
@@ -40,6 +40,7 @@ THE SOFTWARE.
#include <stdio.h>
#include <string.h>
/* needed for urlencode */
+#include <config.h>
#include <waitress.h>
#include "piano.h"

+ 344
- 0
sound/pianod/patches/030-Waitress_add_polarssl_variant.patch View File

@ -0,0 +1,344 @@
--- a/src/libwaitress/waitress.h
+++ b/src/libwaitress/waitress.h
@@ -27,7 +27,12 @@ THE SOFTWARE.
#include <stdlib.h>
#include <unistd.h>
#include <stdbool.h>
+
+#if defined(USE_POLARSSL)
+typedef struct _polarssl_ctx polarssl_ctx;
+#else
#include <gnutls/gnutls.h>
+#endif
#define LIBWAITRESS_NAME "libwaitress"
@@ -102,8 +107,9 @@ typedef struct {
WaitressUrl_t url;
WaitressUrl_t proxy;
+#if !defined(USE_POLARSSL)
gnutls_certificate_credentials_t tlsCred;
-
+#endif
/* per-request data */
struct {
int sockfd;
@@ -121,7 +127,11 @@ typedef struct {
WaitressReturn_t (*read) (void *, char *, const size_t, size_t *);
WaitressReturn_t (*write) (void *, const char *, const size_t);
+#if defined(USE_POLARSSL)
+ polarssl_ctx* sslCtx;
+#else
gnutls_session_t tlsSession;
+#endif
} request;
} WaitressHandle_t;
--- a/src/pianod.c
+++ b/src/pianod.c
@@ -531,8 +531,11 @@ static bool initialize_libraries (APPSTA
gcry_check_version (NULL);
gcry_control (GCRYCTL_DISABLE_SECMEM, 0);
gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
+
+#if !defined(USE_POLARSSL)
int crystatus = gnutls_global_init ();
if (crystatus == GNUTLS_E_SUCCESS) {
+#endif
PianoReturn_t status = PianoInit (&app->ph, app->settings.partnerUser, app->settings.partnerPassword,
app->settings.device, app->settings.inkey, app->settings.outkey);
if (status == PIANO_RET_OK) {
@@ -545,11 +548,13 @@ static bool initialize_libraries (APPSTA
} else {
flog (LOG_ERROR, "initialize_libraries: PianoInit: %s", PianoErrorToStr (status));
}
+#if !defined(USE_POLARSSL)
gnutls_global_deinit ();
} else {
flog (LOG_ERROR, "initialize_libraries: gnutls_global_init: %s", gcry_strerror (crystatus));
}
+#endif
return false;
}
@@ -728,7 +733,9 @@ int main (int argc, char **argv) {
PianoDestroyPlaylist (app.song_history);
PianoDestroyPlaylist (app.playlist);
WaitressFree (&app.waith);
+#if !defined(USE_POLARSSL)
gnutls_global_deinit ();
+#endif
settings_destroy (&app.settings);
}
--- a/src/libwaitress/waitress.c
+++ b/src/libwaitress/waitress.c
@@ -41,11 +41,33 @@ THE SOFTWARE.
#include <assert.h>
#include <stdint.h>
-#include <gnutls/x509.h>
#include "config.h"
#include "waitress.h"
+#if defined(USE_POLARSSL)
+
+#include <polarssl/ssl.h>
+#include <polarssl/entropy.h>
+#include <polarssl/ctr_drbg.h>
+#include <polarssl/x509.h>
+#include <polarssl/sha1.h>
+
+struct _polarssl_ctx
+{
+ ssl_context ssl;
+ ssl_session session;
+ entropy_context entrophy;
+ ctr_drbg_context rnd;
+};
+
+#else
+
+// Use gnutls by default (USE_POLARSSL not defined)
+#include <gnutls/x509.h>
+
+#endif
+
#define strcaseeq(a,b) (strcasecmp(a,b) == 0)
#define WAITRESS_HTTP_VERSION "1.1"
@@ -56,6 +78,13 @@ typedef struct {
static WaitressReturn_t WaitressReceiveHeaders (WaitressHandle_t *, size_t *);
+// gnutls wants (void *) and polarssl want (unsigned char *)
+#if defined(USE_POLARSSL)
+#define BUFFER_CAST unsigned char
+#else
+#define BUFFER_CAST void
+#endif
+
#define READ_RET(buf, count, size) \
if ((wRet = waith->request.read (waith, buf, count, size)) != \
WAITRESS_RET_OK) { \
@@ -444,7 +473,7 @@ static int WaitressPollLoop (int fd, sho
* @param write count bytes
* @return number of written bytes or -1 on error
*/
-static ssize_t WaitressPollWrite (void *data, const void *buf, size_t count) {
+static ssize_t WaitressPollWrite (void *data, const BUFFER_CAST *buf, size_t count) {
int pollres = -1;
ssize_t retSize;
WaitressHandle_t *waith = data;
@@ -478,13 +507,20 @@ static WaitressReturn_t WaitressOrdinary
return waith->request.readWriteRet;
}
-static WaitressReturn_t WaitressGnutlsWrite (void *data, const char *buf,
+static WaitressReturn_t WaitressTlsWrite (void *data, const char *buf,
const size_t size) {
WaitressHandle_t *waith = data;
+#if defined(USE_POLARSSL)
+
+ if (ssl_write (&waith->request.sslCtx->ssl, buf, size) < 0) {
+ return WAITRESS_RET_TLS_WRITE_ERR;
+ }
+#else
if (gnutls_record_send (waith->request.tlsSession, buf, size) < 0) {
return WAITRESS_RET_TLS_WRITE_ERR;
}
+#endif
return waith->request.readWriteRet;
}
@@ -494,7 +530,7 @@ static WaitressReturn_t WaitressGnutlsWr
* @param buffer size
* @return number of read bytes or -1 on error
*/
-static ssize_t WaitressPollRead (void *data, void *buf, size_t count) {
+static ssize_t WaitressPollRead (void *data, BUFFER_CAST *buf, size_t count) {
int pollres = -1;
ssize_t retSize;
WaitressHandle_t *waith = data;
@@ -531,16 +567,34 @@ static WaitressReturn_t WaitressOrdinary
return waith->request.readWriteRet;
}
-static WaitressReturn_t WaitressGnutlsRead (void *data, char *buf,
+static WaitressReturn_t WaitressTlsRead (void *data, char *buf,
const size_t size, size_t *retSize) {
WaitressHandle_t *waith = data;
+#if defined(USE_POLARSSL)
+ int ret;
+
+ *retSize = 0;
+ waith->request.readWriteRet = WAITRESS_RET_OK;
+ ret = ssl_read (&waith->request.sslCtx->ssl, buf, size);
+
+ if (ret < 0) {
+ if (ret != POLARSSL_ERR_SSL_PEER_CLOSE_NOTIFY) {
+ waith->request.readWriteRet = WAITRESS_RET_TLS_READ_ERR;
+ }
+
+ return waith->request.readWriteRet;
+ }
+
+ *retSize = ret;
+#else
ssize_t ret = gnutls_record_recv (waith->request.tlsSession, buf, size);
if (ret < 0) {
return WAITRESS_RET_TLS_READ_ERR;
} else {
*retSize = ret;
}
+#endif
return waith->request.readWriteRet;
}
@@ -727,10 +781,28 @@ static int WaitressParseStatusline (cons
/* verify server certificate
*/
static WaitressReturn_t WaitressTlsVerify (const WaitressHandle_t *waith) {
+
+#if defined(USE_POLARSSL)
+ unsigned char fingerprint[20];
+
+ const x509_crt* cert = ssl_get_peer_cert (&waith->request.sslCtx->ssl);
+
+ if (NULL == cert) {
+ return WAITRESS_RET_TLS_HANDSHAKE_ERR;
+ }
+
+ sha1 (cert->raw.p, cert->raw.len, fingerprint);
+
+ if (memcmp (fingerprint, waith->tlsFingerprint, sizeof (fingerprint)) != 0) {
+ return WAITRESS_RET_TLS_FINGERPRINT_MISMATCH;
+ }
+
+#else
gnutls_session_t session = waith->request.tlsSession;
unsigned int certListSize;
const gnutls_datum_t *certList;
gnutls_x509_crt_t cert;
+ char fingerprint[20];
if (gnutls_certificate_type_get (session) != GNUTLS_CRT_X509) {
return WAITRESS_RET_TLS_HANDSHAKE_ERR;
@@ -750,7 +822,6 @@ static WaitressReturn_t WaitressTlsVerif
return WAITRESS_RET_TLS_HANDSHAKE_ERR;
}
- char fingerprint[20];
size_t fingerprintSize = sizeof (fingerprint);
if (gnutls_x509_crt_get_fingerprint (cert, GNUTLS_DIG_SHA1, fingerprint,
&fingerprintSize) != 0) {
@@ -763,7 +834,7 @@ static WaitressReturn_t WaitressTlsVerif
}
gnutls_x509_crt_deinit (cert);
-
+#endif
return WAITRESS_RET_OK;
}
@@ -807,11 +878,6 @@ static WaitressReturn_t WaitressConnect
/* we need shorter timeouts for connect() */
fcntl (sock, F_SETFL, O_NONBLOCK);
- /* increase socket receive buffer */
- const int sockopt = 256*1024;
- setsockopt (sock, SOL_SOCKET, SO_RCVBUF, &sockopt,
- sizeof (sockopt));
-
/* non-blocking connect will return immediately */
if (connect (sock, gacurr->ai_addr, gacurr->ai_addrlen) == -1) {
// Error if not in-progress or immediate success
@@ -880,6 +946,11 @@ static WaitressReturn_t WaitressConnect
}
}
+#if defined(USE_POLARSSL)
+ if (ssl_handshake (&waith->request.sslCtx->ssl) != 0) {
+ return WAITRESS_RET_TLS_HANDSHAKE_ERR;
+ }
+#else
/* Ignore return code as connection will likely still succeed */
gnutls_server_name_set (waith->request.tlsSession, GNUTLS_NAME_DNS,
waith->url.host, strlen (waith->url.host));
@@ -887,14 +958,15 @@ static WaitressReturn_t WaitressConnect
if (gnutls_handshake (waith->request.tlsSession) != GNUTLS_E_SUCCESS) {
return WAITRESS_RET_TLS_HANDSHAKE_ERR;
}
+#endif
if ((wRet = WaitressTlsVerify (waith)) != WAITRESS_RET_OK) {
return wRet;
}
/* now we can talk encrypted */
- waith->request.read = WaitressGnutlsRead;
- waith->request.write = WaitressGnutlsWrite;
+ waith->request.read = WaitressTlsRead;
+ waith->request.write = WaitressTlsWrite;
}
return WAITRESS_RET_OK;
@@ -1120,6 +1192,21 @@ WaitressReturn_t WaitressFetchCall (Wait
waith->request.contentLengthKnown = false;
if (waith->url.tls) {
+#if defined(USE_POLARSSL)
+ waith->request.sslCtx = calloc (1, sizeof(polarssl_ctx));
+
+ entropy_init (&waith->request.sslCtx->entrophy);
+ ctr_drbg_init (&waith->request.sslCtx->rnd, entropy_func, &waith->request.sslCtx->entrophy, "libwaitress", 11);
+ ssl_init (&waith->request.sslCtx->ssl);
+
+ ssl_set_endpoint (&waith->request.sslCtx->ssl, SSL_IS_CLIENT);
+ ssl_set_authmode (&waith->request.sslCtx->ssl, SSL_VERIFY_NONE);
+ ssl_set_rng (&waith->request.sslCtx->ssl, ctr_drbg_random, &waith->request.sslCtx->rnd);
+ ssl_set_session (&waith->request.sslCtx->ssl, &waith->request.sslCtx->session);
+ ssl_set_bio (&waith->request.sslCtx->ssl,
+ WaitressPollRead, waith,
+ WaitressPollWrite, waith);
+#else
gnutls_init (&waith->request.tlsSession, GNUTLS_CLIENT);
gnutls_set_default_priority (waith->request.tlsSession);
@@ -1137,6 +1224,7 @@ WaitressReturn_t WaitressFetchCall (Wait
WaitressPollRead);
gnutls_transport_set_push_function (waith->request.tlsSession,
WaitressPollWrite);
+#endif
}
/* buffer is required for connect already */
@@ -1148,15 +1236,22 @@ WaitressReturn_t WaitressFetchCall (Wait
if ((wRet = WaitressSendRequest (waith)) == WAITRESS_RET_OK) {
wRet = WaitressReceiveResponse (waith);
}
+#if !defined(USE_POLARSSL)
if (waith->url.tls) {
gnutls_bye (waith->request.tlsSession, GNUTLS_SHUT_RDWR);
}
+#endif
}
/* cleanup */
if (waith->url.tls) {
+#if defined(USE_POLARSSL)
+ ssl_free (&waith->request.sslCtx->ssl);
+ free (waith->request.sslCtx);
+#else
gnutls_deinit (waith->request.tlsSession);
gnutls_certificate_free_credentials (waith->tlsCred);
+#endif
}
if (waith->request.sockfd != -1) {
close (waith->request.sockfd);

+ 1
- 1
utils/collectd/Makefile View File

@ -298,7 +298,7 @@ $(eval $(call BuildPlugin,logfile,log files output,logfile,))
$(eval $(call BuildPlugin,madwifi,MadWifi status input,madwifi,))
#$(eval $(call BuildPlugin,mysql,MySQL status input,mysql,+PACKAGE_collectd-mod-mysql:libmysqlclient-r))
$(eval $(call BuildPlugin,memory,physical memory usage input,memory,))
$(eval $(call BuildPlugin,modbus,read variables through libmodbus,modbus,+PACKAGE_collectd-mod-modbus:libmodbus @BROKEN))
$(eval $(call BuildPlugin,modbus,read variables through libmodbus,modbus,+PACKAGE_collectd-mod-modbus:libmodbus))
$(eval $(call BuildPlugin,netlink,netlink input,netlink,+PACKAGE_collectd-mod-netlink:ip @BROKEN))
$(eval $(call BuildPlugin,network,network input/output,network))
$(eval $(call BuildPlugin,nginx,nginx status input,nginx,+PACKAGE_collectd-mod-nginx:libcurl))


+ 1
- 1
utils/mmc-utils/Makefile View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=mmc-utils
PKG_VERSION=2015-03-06-$(PKG_SOURCE_VERSION)
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc-utils.git


+ 11
- 0
utils/mmc-utils/patches/001-dont-set-fortify-source-in-makefile.patch View File

@ -0,0 +1,11 @@
Index: mmc-utils-f4eb241519f8d500ce6068a70d2389be39ac5189/Makefile
===================================================================
--- mmc-utils-f4eb241519f8d500ce6068a70d2389be39ac5189.orig/Makefile
+++ mmc-utils-f4eb241519f8d500ce6068a70d2389be39ac5189/Makefile
@@ -1,5 +1,5 @@
CC ?= gcc
-AM_CFLAGS = -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
+AM_CFLAGS = -D_FILE_OFFSET_BITS=64
CFLAGS ?= -g -O2
objects = \
mmc.o \

+ 6
- 4
utils/nano/Makefile View File

@ -1,5 +1,5 @@
#
# Copyright (C) 2007-2014 OpenWrt.org
# Copyright (C) 2007-2015 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
@ -8,12 +8,14 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=nano
PKG_VERSION:=2.3.6
PKG_VERSION:=2.4.0
PKG_RELEASE:=1
PKG_LICENSE:=GPL-3.0+
PKG_LICENSE_FILES:=COPYING
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.nano-editor.org/dist/v2.3
PKG_MD5SUM:=df3d201aecb3155a80633990cc467831
PKG_SOURCE_URL:=http://www.nano-editor.org/dist/v2.4
PKG_MD5SUM:=e5c9c6424ee2303663ae4b99ecd4b493
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1


+ 4
- 4
utils/zoneinfo/Makefile View File

@ -9,8 +9,8 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=zoneinfo
PKG_VERSION:=2015a
PKG_VERSION_CODE:=2015a
PKG_VERSION:=2015b
PKG_VERSION_CODE:=2015b
PKG_RELEASE:=1
#As i couldn't find real license used "Public Domain"
@ -20,14 +20,14 @@ PKG_LICENSE:=Public Domain
PKG_SOURCE:=tzdata$(PKG_VERSION).tar.gz
PKG_SOURCE_CODE:=tzcode$(PKG_VERSION_CODE).tar.gz
PKG_SOURCE_URL:=http://www.iana.org/time-zones/repository/releases
PKG_MD5SUM:=4ed11c894a74a5ea64201b1c6dbb8831
PKG_MD5SUM:=75571bb17c7b6be88a9f8872e45bc726
include $(INCLUDE_DIR)/package.mk
define Download/tzcode
FILE=$(PKG_SOURCE_CODE)
URL=$(PKG_SOURCE_URL)
MD5SUM:=8f375ede46ae137fbac047ac431bda37
MD5SUM:=f073a7c9bca7f9fe408491f826e92968
endef
$(eval $(call Download,tzcode))


Loading…
Cancel
Save