Merge pull request #2371 from plntyk/fix_squid_krb5
authorLuka Perkov <luka.perkov@sartura.hr>
Fri, 26 Feb 2016 11:25:09 +0000 (12:25 +0100)
committerLuka Perkov <luka.perkov@sartura.hr>
Fri, 26 Feb 2016 11:25:09 +0000 (12:25 +0100)
squid: disable krb5

76 files changed:
lang/perl-cgi/Makefile
lang/python-cryptography/Makefile
lang/python/Makefile
lang/python/files/python-host.mk
lang/ruby/Makefile
lang/ruby/ruby_find_pkgsdeps
lang/ruby/ruby_missingfiles
libs/alsa-lib/Makefile
libs/alsa-lib/patches/002-remove_cross_compile_guess.patch [deleted file]
libs/alsa-lib/patches/005-fix_include_file_redirect_warnings.patch
libs/apr-util/Makefile
libs/glib2/Makefile
libs/glib2/patches/100-fix-gio-linking.patch [deleted file]
libs/gnutls/Config.in
libs/gnutls/Makefile
mail/postfix/Makefile
multimedia/ffmpeg/Makefile
net/adblock/Makefile
net/adblock/files/README.md
net/adblock/files/adblock-helper.sh
net/adblock/files/adblock-update.sh
net/adblock/files/adblock.conf
net/adblock/files/adblock.hotplug [new file with mode: 0644]
net/adblock/files/adblock.init [new file with mode: 0755]
net/adblock/files/samples/adblock.conf.sample [deleted file]
net/adblock/files/samples/dhcp.config.sample [deleted file]
net/adblock/files/samples/dnsmasq.conf.sample [deleted file]
net/adblock/files/samples/rc.local.sample [deleted file]
net/adblock/files/samples/root.crontab.sample [deleted file]
net/adblock/files/www/adblock/adblock.html
net/adblock/files/www/adblock/index.html
net/chrony/Makefile
net/ddns-scripts/Makefile
net/ddns-scripts/files/services
net/ddns-scripts/files/tld_names.dat
net/ddns-scripts/files/update_CloudFlare.sh [deleted file]
net/ddns-scripts/files/update_No-IP.com.sh [deleted file]
net/ddns-scripts/files/update_cloudflare_com.sh [new file with mode: 0755]
net/ddns-scripts/files/update_no-ip_com.sh [new file with mode: 0755]
net/gnunet/Makefile
net/knot/Makefile
net/knot/files/knotd.init
net/knot/files/runtests.sh
net/knot/patches/01_strptime_susv3.patch [deleted file]
net/knot/patches/01_zscanner_tests.patch [new file with mode: 0644]
net/knot/patches/02_knot.conf.patch
net/knot/patches/03_libtap_files.patch [new file with mode: 0644]
net/knot/patches/03_zscanner_tests.patch [deleted file]
net/linknx/Makefile
net/linknx/patches/010-musl-compat [deleted file]
net/linknx/patches/012-fix-linknx.cpp [deleted file]
net/ngircd/Makefile
net/ocserv/Makefile
net/pptpd/Makefile
net/pptpd/files/options.pptpd
net/pptpd/files/pptpd.conf
net/pptpd/files/pptpd.init
net/prosody/Makefile
net/prosody/files/prosody.init
net/snort/Config.in
net/snort/Makefile
net/sqm-scripts/Makefile
sound/pulseaudio/Makefile
sound/pulseaudio/patches/002-xlocale.patch [deleted file]
utils/alsa-utils/Makefile
utils/cryptodev-linux/Makefile
utils/gnupg/Makefile
utils/grep/Makefile
utils/lvm2/Makefile
utils/lxc/Makefile
utils/lxc/patches/015-getline.patch
utils/lxc/patches/035-fix-undefined-lfd.patch
utils/qemu/Makefile [new file with mode: 0644]
utils/qemu/files/qemu-ga.init [new file with mode: 0755]
utils/qemu/files/virtio-ports.hotplug [new file with mode: 0755]
utils/tracertools/Makefile

index 9d2eac3309a8887df3d0fa559aa8af477f387f55..5900361fccd1bf692a0a0f62f011ef30d1d8c2a1 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2015 OpenWrt.org
+# Copyright (C) 2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=perl-cgi
-PKG_VERSION:=4.25
+PKG_VERSION:=4.26
 PKG_RELEASE:=1
 
 PKG_SOURCE_URL:=http://www.cpan.org/authors/id/L/LE/LEEJO
 PKG_SOURCE:=CGI-$(PKG_VERSION).tar.gz
-PKG_MD5SUM:=e047bec455105cdfa413b9c776f95bb9
+PKG_MD5SUM:=bf606eda81c9dc5347c1f3483732b2d2
 
 PKG_LICENSE:=GPL Artistic-2.0
 PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
index 6959f6d1b7ca5c4f6142f26ea70c3cd81bb928d8..317c4bf8032fd63f4d3fd68869d22feecf7367c4 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=cryptography
-PKG_VERSION:=1.1.2
+PKG_VERSION:=1.2.2
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://pypi.python.org/packages/source/c/cryptography
-PKG_MD5SUM:=15eeba9e31f852bac21155baa3dfbc61
+PKG_MD5SUM:=2b25eebd1d3c6bae52b46f0dcec74dfb
 
 PKG_BUILD_DEPENDS:=python-cffi/host
 
index a75676964c0094128f83d24f7c119a8af3041471..6631cc04f1cba0297f9817eb2ae1638dcf9280c5 100644 (file)
@@ -12,7 +12,7 @@ include ./files/python-package.mk
 
 PKG_NAME:=python
 PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO)
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://www.python.org/ftp/python/$(PKG_VERSION)
index 65d9ca51a4daab16ca7b2dd10c56d0f5860298f8..7831eb6834fa4e24047465ed10d9d72ddecdfd9b 100644 (file)
@@ -5,7 +5,7 @@
 # See /LICENSE for more information.
 #
 
-HOST_PYTHON_INC_DIR:=$(STAGING_DIR)/host/include/python$(PYTHON_VERSION)
+HOST_PYTHON_INC_DIR:=$(STAGING_DIR)/host/usr/include/python$(PYTHON_VERSION)
 
 HOST_PYTHON_PKG_DIR:=/usr/lib/python$(PYTHON_VERSION)/site-packages
 
index 3922dad16fc61b175f27a4b5a94dca738204518d..e28bc0aa63a2ad58391f92f6d8ad026be821ddd2 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006-2015 OpenWrt.org
+# Copyright (C) 2006-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -11,7 +11,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ruby
 PKG_VERSION:=2.2.4
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_LIBVER:=2.2
 
@@ -31,6 +31,58 @@ include $(INCLUDE_DIR)/host-build.mk
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/nls.mk
 
+HOST_CONFIGURE_ARGS += \
+       --disable-install-doc \
+       --disable-install-rdoc \
+       --disable-install-capi \
+       --with-static-linked-ext \
+       --with-out-ext=tk,tk/tkutil,win32,win32ole,dbm,gdbm,readline \
+
+# even not used, host build with restricted exts results in gems not being
+# compiled for target (probably some cross compiling problem like checking
+# host for selecting target features)
+#      --with-out-ext \
+#      --with-ext=thread,stringio \
+
+CONFIGURE_ARGS += \
+       --enable-shared \
+       --enable-static \
+       --disable-rpath \
+       $(call autoconf_bool,CONFIG_IPV6,ipv6) \
+       --disable-install-doc \
+       --disable-install-capi \
+       --with-ruby-version=minor \
+       --with-iconv-dir=$(ICONV_PREFIX) \
+       --with-out-ext=tk,tk/tkutil,win32,win32ole
+
+ifndef CONFIG_RUBY_DIGEST_USE_OPENSSL
+CONFIGURE_ARGS += \
+       --with-bundled-sha1\
+       --with-bundled-md5\
+       --with-bundled-rmd160\
+       --with-bundled-sha2 \
+
+endif
+
+TARGET_LDFLAGS += -L$(PKG_BUILD_DIR)
+
+# Ruby uses DLDFLAGS and not LDFLAGS for libraries. LDFLAGS is only for execs.
+# However, DLDFLAGS from configure is not passed to Makefile when target is linux.
+# XLDFLAGS is used by both libraries and execs. This is somehow brute force but
+# if will fix when some LD_FLAGS is needef for libraries. As side effect, it will
+# duplicate ld args for binaries.
+CONFIGURE_VARS += XLDFLAGS="$(TARGET_LDFLAGS)"
+
+MAKE_FLAGS += \
+       DESTDIR="$(PKG_INSTALL_DIR)" \
+       SHELL="/bin/bash"
+
+define Build/InstallDev
+       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
+               . \
+       ) | ( cd $(1); $(TAR) -xf - )
+endef
+
 define Package/ruby/Default
   SUBMENU:=Ruby
   SECTION:=lang
@@ -57,6 +109,52 @@ define Package/ruby/description
 $(call Package/ruby/Default/description)
 endef
 
+define RubyDependency
+    $(eval \
+        $(call Package/Default)
+        $(call Package/ruby-$(1))
+        FILTER_CONFIG:=$$(strip \
+            $$(foreach config_dep, \
+                $$(filter @%, \
+                    $$(foreach v, \
+                        $$(DEPENDS), \
+                        $$(if $$(findstring :,$$v),,$$v) \
+                    ) \
+                ), \
+                $$(subst @,,$$(config_dep)) \
+            ) \
+        )
+        ifneq (,$$(FILTER_CONFIG))
+           FILTER_CONFIG:=($$(subst $$(space),&&,$$(FILTER_CONFIG))):
+        endif
+    ) \
+    +$(FILTER_CONFIG)ruby-$(1)
+endef
+
+define Package/ruby/config
+    comment "Standard Library"
+      depends on PACKAGE_ruby
+
+    config PACKAGE_ruby-stdlib
+      depends on PACKAGE_ruby
+      default m if ALL
+      prompt "Select Ruby Complete Standard Library (ruby-stdlib)"
+
+endef
+
+define Package/ruby/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
+       $(INSTALL_DIR) $(1)/usr/lib/ruby/vendor_ruby/$(PKG_LIBVER)
+       $(INSTALL_DIR) $(1)/usr/lib/ruby/site_ruby/$(PKG_LIBVER)
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ruby $(1)/usr/lib/ruby/ruby$(PKG_LIBVER)-bin
+       $(INSTALL_BIN) ./files/ruby $(1)/usr/bin/ruby
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/vendor_ruby/$(PKG_LIBVER)/* $(1)/usr/lib/ruby/vendor_ruby/$(PKG_LIBVER)/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/site_ruby/$(PKG_LIBVER)/* $(1)/usr/lib/ruby/site_ruby/$(PKG_LIBVER)/
+       $(SED) "s%@RUBY_LIBPATH@%/usr/lib/ruby/$(PKG_LIBVER)%" $(1)/usr/bin/ruby
+       $(SED) "s%@RUBY_BINPATH@%/usr/lib/ruby/ruby$(PKG_LIBVER)-bin%" $(1)/usr/bin/ruby
+endef
+
 define Package/libruby
 $(call Package/ruby/Default)
   SUBMENU:=
@@ -65,18 +163,17 @@ $(call Package/ruby/Default)
   TITLE+= (shared library)
   DEPENDS+= +libpthread +librt +libgmp
 endef
+define Package/libruby/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libruby.so.* $(1)/usr/lib/
+endef
 
+RUBY_STDLIB :=
 define Package/ruby-stdlib
 $(call Package/ruby/Default)
   TITLE:=Ruby standard libraries (metadata for all stdlib subsets)
-  DEPENDS:=ruby +ruby-misc +ruby-bigdecimal +ruby-cgi +ruby-csv +ruby-datetime +ruby-dbm +ruby-debuglib\
-                       +ruby-digest +ruby-drb +ruby-enc +ruby-enc-extra +ruby-erb +ruby-gdbm +ruby-gems \
-                       +ruby-json +ruby-io-console +ruby-irb +ruby-fiddle +ruby-filelib +ruby-logger +ruby-math \
-                       +ruby-minitest +ruby-mkmf +ruby-multithread +ruby-nkf +ruby-net +ruby-openssl +ruby-optparse \
-                       +ruby-patterns +ruby-powerassert +ruby-prettyprint +ruby-pstore +ruby-psych +ruby-racc +ruby-rake \
-                       +ruby-rbconfig +ruby-rdoc +ruby-readline +ruby-rexml +ruby-rinda +ruby-ripper +ruby-rss +ruby-sdbm \
-                       +ruby-shell +ruby-socket +ruby-testunit +ruby-unicodenormalize +ruby-uri +ruby-webrick +ruby-xmlrpc \
-                       +ruby-yaml +ruby-zlib
+  DEPENDS:=ruby $(foreach subpackage,$(RUBY_STDLIB),$(strip $(call RubyDependency,$(subpackage))))
+  HIDDEN:=1
 endef
 
 define Package/ruby-stdlib/description
@@ -85,53 +182,30 @@ define Package/ruby-stdlib/description
 
 endef
 
-define Package/ruby-bigdecimal
-$(call Package/ruby/Default)
-  TITLE:=Arbitrary-precision decimal floating-point lib for Ruby
-  DEPENDS:=ruby
-endef
-
-define Package/ruby-bigdecimal/description
- Provides bigdecimal* files
-endef
-
-define Package/ruby-cgi
-$(call Package/ruby/Default)
-  TITLE:=Ruby CGI support toolkit
-  DEPENDS:=ruby +ruby-filelib +ruby-pstore
-endef
-
-define Package/ruby-bigdecimal/description
- Provides bigdecimal* files
-
-endef
-
-define Package/ruby-csv
-$(call Package/ruby/Default)
-  TITLE+=CSV library
-  DEPENDS:=ruby +ruby-patterns +ruby-datetime +ruby-enc
+# nothing to do
+define Package/ruby-stdlib/install
+       /bin/true
 endef
 
-define Package/ruby-csv/description
- Provides csv.rb file
-
+define Package/ruby-bigdecimal/files
+/usr/lib/ruby/$(PKG_LIBVER)/*/bigdecimal.so
+/usr/lib/ruby/$(PKG_LIBVER)/bigdecimal/
+/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/bigdecimal-*.gemspec
 endef
 
-define Package/ruby-datetime
-$(call Package/ruby/Default)
-  TITLE+= date library
-  DEPENDS:=ruby
+define Package/ruby-cgi/files
+/usr/lib/ruby/$(PKG_LIBVER)/cgi
+/usr/lib/ruby/$(PKG_LIBVER)/cgi.rb
 endef
 
-define Package/ruby-datetime/description
- Provides date.rb and time.rb
-
+define Package/ruby-csv/files
+/usr/lib/ruby/$(PKG_LIBVER)/csv.rb
 endef
 
-define Package/ruby-dbm
-$(call Package/ruby/Default)
-  TITLE:=Ruby support for dbm
-  DEPENDS:=ruby +libdb47
+define Package/ruby-datetime/files
+/usr/lib/ruby/$(PKG_LIBVER)/time.rb
+/usr/lib/ruby/$(PKG_LIBVER)/date.rb
+/usr/lib/ruby/$(PKG_LIBVER)/*/date_core.so
 endef
 
 define Package/ruby-dbm/description
@@ -139,28 +213,17 @@ define Package/ruby-dbm/description
  This package provides dbm.so file.
 
 endef
-
-define Package/ruby-debuglib
-$(call Package/ruby/Default)
-  TITLE+= debug library
-  DEPENDS:=ruby +ruby-multithread +ruby-prettyprint
-endef
-
-define Package/ruby-debuglib/description
- Provides files for debugging:
- - benchmark.rb
- - debug.rb
- - objspace.so
- - profile.rb
- - profiler.rb
- - tracer.rb
-
+define Package/ruby-dbm/files
+/usr/lib/ruby/$(PKG_LIBVER)/*/dbm.so
 endef
 
-define Package/ruby-digest
-$(call Package/ruby/Default)
-  TITLE:=Ruby Digest Library
-  DEPENDS:=ruby +RUBY_DIGEST_USE_OPENSSL:libopenssl
+define Package/ruby-debuglib/files
+/usr/lib/ruby/$(PKG_LIBVER)/profile.rb
+/usr/lib/ruby/$(PKG_LIBVER)/profiler.rb
+/usr/lib/ruby/$(PKG_LIBVER)/debug.rb
+/usr/lib/ruby/$(PKG_LIBVER)/tracer.rb
+/usr/lib/ruby/$(PKG_LIBVER)/benchmark.rb
+/usr/lib/ruby/$(PKG_LIBVER)/*/objspace.so
 endef
 
 define Package/ruby-digest/description
@@ -168,7 +231,6 @@ define Package/ruby-digest/description
  bundled hash functions.
 
 endef
-
 define Package/ruby-digest/config
 
        config RUBY_DIGEST_USE_OPENSSL
@@ -182,1206 +244,467 @@ define Package/ruby-digest/config
                default n
 
 endef
-
-define Package/ruby-drb
-$(call Package/ruby/Default)
-  TITLE:=Ruby distributed object system
-  DEPENDS:=ruby +ruby-filelib +ruby-patterns +ruby-socket
-endef
-
-define Package/ruby-drb/description
- Provides drb* files
-
-endef
-
-define Package/ruby-enc
-$(call Package/ruby/Default)
-  TITLE:=Ruby character re-coding library charset (small subset)
-  DEPENDS:=ruby
-endef
-
-define Package/ruby-enc/description
- Provides ruby encoding library for encodings used directly by
- libraries in Ruby Standard Library:
- - enc/encdb.so
- - enc/euc_jp.so
- - enc/iso_8859_1.so
- - enc/utf_16be.so
- - enc/utf_16le.so
- - enc/utf_32be.so
- - enc/utf_32le.so
- FYI: ASCII-8BIT, UTF-7, UTF-8 and US-ASCII are already in Core.
-
-endef
-
-define Package/ruby-enc-extra
-$(call Package/ruby/Default)
-  TITLE:=Ruby character re-coding library charset (extra subset)
-  DEPENDS:=ruby +ruby-enc
-endef
-
-define Package/ruby-enc-extra/description
- Provides extra encodings not provided by ruby-enc:
- - enc/big5.so
- - enc/cp949.so
- - enc/emacs_mule.so
- - enc/euc_kr.so
- - enc/euc_tw.so
- - enc/gb18030.so
- - enc/gb2312.so
- - enc/gbk.so
- - enc/iso_8859_10.so
- - enc/iso_8859_11.so
- - enc/iso_8859_13.so
- - enc/iso_8859_14.so
- - enc/iso_8859_15.so
- - enc/iso_8859_16.so
- - enc/iso_8859_2.so
- - enc/iso_8859_3.so
- - enc/iso_8859_4.so
- - enc/iso_8859_5.so
- - enc/iso_8859_6.so
- - enc/iso_8859_7.so
- - enc/iso_8859_8.so
- - enc/iso_8859_9.so
- - enc/koi8_r.so
- - enc/koi8_u.so
- - enc/shift_jis.so
- - enc/trans/big5.so
- - enc/trans/chinese.so
- - enc/trans/emoji.so
- - enc/trans/emoji_iso2022_kddi.so
- - enc/trans/emoji_sjis_docomo.so
- - enc/trans/emoji_sjis_kddi.so
- - enc/trans/emoji_sjis_softbank.so
- - enc/trans/escape.so
- - enc/trans/gb18030.so
- - enc/trans/gbk.so
- - enc/trans/iso2022.so
- - enc/trans/japanese.so
- - enc/trans/japanese_euc.so
- - enc/trans/japanese_sjis.so
- - enc/trans/korean.so
- - enc/trans/single_byte.so
- - enc/trans/transdb.so
- - enc/trans/utf8_mac.so
- - enc/trans/utf_16_32.so
- - enc/windows_1251.so
- - enc/windows_31j.so
-
-endef
-
-define Package/ruby-erb
-$(call Package/ruby/Default)
-  TITLE+= (embedded interpreter)
-  DEPENDS:=ruby +ruby-cgi
-endef
-
-define Package/ruby-erb/description
- Provides erb* files
-
-endef
-
-define Package/ruby-fiddle
-$(call Package/ruby/Default)
-  TITLE:=A libffi wrapper for Ruby
-  DEPENDS:=ruby +libffi
-endef
-
-define Package/ruby-fiddle/description
- Provides fiddle* files
-
-endef
-
-define Package/ruby-filelib
-$(call Package/ruby/Default)
-  TITLE+= File utils library
-  DEPENDS:=ruby +ruby-enc +ruby-misc
-endef
-
-define Package/ruby-filelib/description
- Provides filesystem interaction files, including
- path and temp:
- - fileutils.rb
- - find.rb
- - pathname.rb
- - pathname.so
- - tempfile.rb
- - tmpdir.rb
-
-endef
-
-define Package/ruby-gdbm
-$(call Package/ruby/Default)
-  TITLE:=Ruby support for gdbm
-  DEPENDS:=ruby +libgdbm
-endef
-
-define Package/ruby-gdbm/description
- Provides gdbm* files
-
-endef
-
-define Package/ruby-gems
-$(call Package/ruby/Default)
-  TITLE:=Ruby gems packet management
-  DEPENDS:=ruby +ruby-net +ruby-rdoc
-endef
-
-define Package/ruby-gems/description
- Provides rubygems for gems usage, download and installation
-
-endef
-
-define Package/ruby-io-console
-$(call Package/ruby/Default)
-  TITLE+= Console interface
-  DEPENDS:=ruby
-endef
-
-define Package/ruby-io-console/description
- Provides io-console* files
-
-endef
-
-define Package/ruby-irb
-$(call Package/ruby/Default)
-  TITLE+= (interactive shell)
-  DEPENDS:=ruby +ruby-debuglib +ruby-filelib +ruby-math
-endef
-
-define Package/ruby-irb/description
- Provides irb* files
-
-endef
-
-define Package/ruby-json
-$(call Package/ruby/Default)
-  TITLE:=Ruby support for JSON
-  DEPENDS:=ruby +ruby-datetime +ruby-misc
-endef
-
-define Package/ruby-json/description
- Provides json* files
-
+define Package/ruby-digest/files
+/usr/lib/ruby/$(PKG_LIBVER)/digest
+/usr/lib/ruby/$(PKG_LIBVER)/digest.rb
+/usr/lib/ruby/$(PKG_LIBVER)/*/digest.so
+/usr/lib/ruby/$(PKG_LIBVER)/*/digest/*
 endef
 
-define Package/ruby-logger
-$(call Package/ruby/Default)
-  TITLE+= logger and syslog library
-  DEPENDS:=ruby +ruby-multithread
+define Package/ruby-drb/files
+/usr/lib/ruby/$(PKG_LIBVER)/drb.rb
+/usr/lib/ruby/$(PKG_LIBVER)/drb
 endef
 
-define Package/ruby-logger/description
- Provides log library, including syslog:
- - logger.rb
- - syslog.so
- - syslog/logger.rb
-
+define Package/ruby-enc/files
+/usr/lib/ruby/$(PKG_LIBVER)/*/enc/encdb.so
+/usr/lib/ruby/$(PKG_LIBVER)/*/enc/iso_8859_1.so
+/usr/lib/ruby/$(PKG_LIBVER)/*/enc/utf_*.so
+/usr/lib/ruby/$(PKG_LIBVER)/*/enc/euc_jp.so
 endef
 
-define Package/ruby-math
-$(call Package/ruby/Default)
-  TITLE+= math library
-  DEPENDS:=ruby +ruby-patterns
+define Package/ruby-enc-extra/files
+/usr/lib/ruby/$(PKG_LIBVER)/*/enc
 endef
-
-define Package/ruby-math/description
- Provides math related files:
- - cmath.rb
- - complex.rb
- - mathn.rb
- - mathn/complex.so
- - mathn/rational.so
- - matrix.rb
- - matrix/eigenvalue_decomposition.rb
- - matrix/lup_decomposition.rb
- - prime.rb
- - rational.rb
-
+define Package/ruby-enc-extra/files-excluded
+$(call Package/ruby-enc/files)
 endef
 
-define Package/ruby-minitest
-$(call Package/ruby/Default)
-  TITLE:=Gem minitest shipped with Ruby
-  DEPENDS:=ruby +ruby-gems
+define Package/ruby-erb/files
+/usr/bin/erb
+/usr/lib/ruby/$(PKG_LIBVER)/erb.rb
 endef
 
-define Package/ruby-minitest/description
- Provides minitest gem
-
+define Package/ruby-fiddle/files
+/usr/lib/ruby/$(PKG_LIBVER)/fiddle.rb
+/usr/lib/ruby/$(PKG_LIBVER)/fiddle/
+/usr/lib/ruby/$(PKG_LIBVER)/*/fiddle.so
 endef
 
-define Package/ruby-misc
-$(call Package/ruby/Default)
-  TITLE:=Ruby standard libraries subset (miscelaneous files)
-  DEPENDS:=ruby
-endef
-
-define Package/ruby-misc/description
- This package contains miscellaneous files from stdlib
- not splitted in other ruby packages like stringio:
- - English.rb
- - abbrev.rb
- - base64.rb
- - continuation.so
- - coverage.so
- - delegate.rb
- - e2mmap.rb
- - etc.so
- - expect.rb
- - fcntl.so
- - fiber.so
- - getoptlong.rb
- - open3.rb
- - ostruct.rb
- - pty.so
- - scanf.rb
- - securerandom.rb
- - set.rb
- - shellwords.rb
- - stringio.so
- - strscan.so
- - tsort.rb
- - weakref.rb
-
-endef
-
-define Package/ruby-mkmf
-$(call Package/ruby/Default)
-  TITLE+= makefile library
-  DEPENDS:=ruby +ruby-filelib +ruby-optparse +ruby-rbconfig
+define Package/ruby-filelib/files
+/usr/lib/ruby/$(PKG_LIBVER)/tmpdir.rb
+/usr/lib/ruby/$(PKG_LIBVER)/tempfile.rb
+/usr/lib/ruby/$(PKG_LIBVER)/pathname.rb
+/usr/lib/ruby/$(PKG_LIBVER)/*/pathname.so
+/usr/lib/ruby/$(PKG_LIBVER)/find.rb
+/usr/lib/ruby/$(PKG_LIBVER)/fileutils.rb
 endef
 
-define Package/ruby-mkmf/description
- Provides mkmf* files
-
+define Package/ruby-gdbm/files
+/usr/lib/ruby/$(PKG_LIBVER)/*/gdbm.so
 endef
 
-define Package/ruby-multithread
-$(call Package/ruby/Default)
-  TITLE+= multithread library
-  DEPENDS:=ruby +ruby-misc
+define Package/ruby-gems/files
+/usr/lib/ruby/$(PKG_LIBVER)/ubygems.rb
+/usr/lib/ruby/$(PKG_LIBVER)/rubygems.rb
+/usr/lib/ruby/$(PKG_LIBVER)/rubygems
 endef
-
-define Package/ruby-multithread/description
- Provides files for multithread usage:
- - io/nonblock.so
- - io/wait.so
- - thread.so (FYI, Thread is a core class)
- - monitor.rb
- - mutex_m.rb
- - sync.rb
- - thwait.rb
- - timeout.rb
-
+define Package/ruby-gems/files-excluded
+/usr/lib/ruby/$(PKG_LIBVER)/rubygems/test_case.rb
+/usr/lib/ruby/$(PKG_LIBVER)/rubygems/package/tar_test_case.rb
+/usr/lib/ruby/$(PKG_LIBVER)/rubygems/installer_test_case.rb
 endef
-
-define Package/ruby-net
-$(call Package/ruby/Default)
-  TITLE:=Ruby Network Protocols Library
-  DEPENDS:=ruby +ruby-datetime +ruby-digest +ruby-filelib +ruby-uri
+define Package/ruby-gems/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gem $(1)/usr/bin/
+       $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default
+       $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems
+       $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/doc
+       $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/cache
+       $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/extensions
+       $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/build_info
+       $(call RubyBuildPackage/install,gems,$(1))
 endef
 
-define Package/ruby-net/description
- Provides net* files
-
+define Package/ruby-io-console/files
+/usr/lib/ruby/$(PKG_LIBVER)/*/io/console.so
+/usr/lib/ruby/$(PKG_LIBVER)/io/console/
+/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/io-console-*.gemspec
 endef
 
-define Package/ruby-nkf
-$(call Package/ruby/Default)
-  TITLE:=Ruby Network Kanji Filter
-  DEPENDS:=ruby +ruby-enc
+define Package/ruby-irb/files
+/usr/lib/ruby/$(PKG_LIBVER)/irb
+/usr/lib/ruby/$(PKG_LIBVER)/irb.rb
 endef
-
-define Package/ruby-nkf/description
- Provides nkf* files
-
+define Package/ruby-irb/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/irb $(1)/usr/bin/
+       $(call RubyBuildPackage/install,irb,$(1))
 endef
 
-define Package/ruby-openssl
-$(call Package/ruby/Default)
-  TITLE:=Ruby support for openssl
-  DEPENDS:=ruby +ruby-enc +libopenssl +ruby-misc
+define Package/ruby-json/files
+/usr/lib/ruby/$(PKG_LIBVER)/json.rb
+/usr/lib/ruby/$(PKG_LIBVER)/json
+/usr/lib/ruby/$(PKG_LIBVER)/*/json
+/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/json-*.gemspec
 endef
-
-define Package/ruby-openssl/description
- Provides openssl* files
-
+define Package/ruby-json/files-excluded
+$(call Package/ruby-psych/files)
 endef
 
-define Package/ruby-optparse
-$(call Package/ruby/Default)
-  TITLE:=Ruby command-line option analysis
-  DEPENDS:=ruby +ruby-misc
+define Package/ruby-logger/files
+/usr/lib/ruby/$(PKG_LIBVER)/logger.rb
+/usr/lib/ruby/$(PKG_LIBVER)/syslog/logger.rb
+/usr/lib/ruby/$(PKG_LIBVER)/*/syslog.so
 endef
 
-define Package/ruby-optparse/description
- Provides optparse* files
-
+define Package/ruby-math/files
+/usr/lib/ruby/$(PKG_LIBVER)/prime.rb
+/usr/lib/ruby/$(PKG_LIBVER)/mathn.rb
+/usr/lib/ruby/$(PKG_LIBVER)/cmath.rb
+/usr/lib/ruby/$(PKG_LIBVER)/*/mathn
+/usr/lib/ruby/$(PKG_LIBVER)/matrix.rb
+/usr/lib/ruby/$(PKG_LIBVER)/matrix
 endef
 
-define Package/ruby-patterns
-$(call Package/ruby/Default)
-  TITLE:=Ruby design patterns implementation
-  DEPENDS:=ruby +ruby-multithread
+define Package/ruby-minitest/files
+/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/minitest-*.gemspec
+/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/minitest-*
 endef
-
-define Package/ruby-patterns/description
- Provides design patterns helpers files:
- - forwardable.rb
- - observer.rb
- - singleton.rb
-
+define Package/ruby-minitest/files-excluded
+/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/minitest-*/test
+/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/minitest-*/*.txt
 endef
 
-define Package/ruby-powerassert
-$(call Package/ruby/Default)
-  TITLE:=Gem power_assert shipped with Ruby
-  DEPENDS:=ruby +ruby-ripper
+define Package/ruby-misc/files
+/usr/lib/ruby/$(PKG_LIBVER)/English.rb
+/usr/lib/ruby/$(PKG_LIBVER)/abbrev.rb
+/usr/lib/ruby/$(PKG_LIBVER)/base64.rb
+/usr/lib/ruby/$(PKG_LIBVER)/delegate.rb
+/usr/lib/ruby/$(PKG_LIBVER)/e2mmap.rb
+/usr/lib/ruby/$(PKG_LIBVER)/expect.rb
+/usr/lib/ruby/$(PKG_LIBVER)/getoptlong.rb
+/usr/lib/ruby/$(PKG_LIBVER)/open3.rb
+/usr/lib/ruby/$(PKG_LIBVER)/ostruct.rb
+/usr/lib/ruby/$(PKG_LIBVER)/scanf.rb
+/usr/lib/ruby/$(PKG_LIBVER)/securerandom.rb
+/usr/lib/ruby/$(PKG_LIBVER)/set.rb
+/usr/lib/ruby/$(PKG_LIBVER)/shellwords.rb
+/usr/lib/ruby/$(PKG_LIBVER)/tsort.rb
+/usr/lib/ruby/$(PKG_LIBVER)/weakref.rb
+/usr/lib/ruby/$(PKG_LIBVER)/*/continuation.so
+/usr/lib/ruby/$(PKG_LIBVER)/*/coverage.so
+/usr/lib/ruby/$(PKG_LIBVER)/*/etc.so
+/usr/lib/ruby/$(PKG_LIBVER)/*/fcntl.so
+/usr/lib/ruby/$(PKG_LIBVER)/*/fiber.so
+/usr/lib/ruby/$(PKG_LIBVER)/*/pty.so
+/usr/lib/ruby/$(PKG_LIBVER)/*/stringio.so
+/usr/lib/ruby/$(PKG_LIBVER)/*/strscan.so
 endef
 
-define Package/ruby-powerassert/description
-  Power Assert gem for Ruby. Power Assert shows each value of variables
-  and method calls in the expression. It is useful for testing, providing
-  which value wasn't correct when the condition is not satisfied
-
+define Package/ruby-mkmf/files
+/usr/lib/ruby/$(PKG_LIBVER)/mkmf.rb
+/usr/lib/ruby/$(PKG_LIBVER)/un.rb
 endef
 
-define Package/ruby-prettyprint
-$(call Package/ruby/Default)
-  TITLE:=Ruby PrettyPrint librart
-  DEPENDS:=ruby +ruby-misc
+define Package/ruby-multithread/files
+/usr/lib/ruby/$(PKG_LIBVER)/monitor.rb
+/usr/lib/ruby/$(PKG_LIBVER)/timeout.rb
+/usr/lib/ruby/$(PKG_LIBVER)/thwait.rb
+/usr/lib/ruby/$(PKG_LIBVER)/mutex_m.rb
+/usr/lib/ruby/$(PKG_LIBVER)/sync.rb
+/usr/lib/ruby/$(PKG_LIBVER)/*/thread.so
+/usr/lib/ruby/$(PKG_LIBVER)/*/io/wait.so
+/usr/lib/ruby/$(PKG_LIBVER)/*/io/nonblock.so
 endef
 
-define Package/ruby-prettyprint/description
- Provides Pretty Print library:
- - pp.rb
- - prettyprint.rb
-
+define Package/ruby-net/files
+/usr/lib/ruby/$(PKG_LIBVER)/open-uri.rb
+/usr/lib/ruby/$(PKG_LIBVER)/net/*
 endef
 
-define Package/ruby-pstore
-$(call Package/ruby/Default)
-  TITLE+=file based persistence
-  DEPENDS:=ruby +ruby-digest +ruby-enc
+define Package/ruby-nkf/files
+/usr/lib/ruby/$(PKG_LIBVER)/kconv.rb
+/usr/lib/ruby/$(PKG_LIBVER)/*/nkf.so
 endef
 
-define Package/ruby-pstore/description
- Provides pstore.rb file
-
+define Package/ruby-openssl/files
+/usr/lib/ruby/$(PKG_LIBVER)/openssl
+/usr/lib/ruby/$(PKG_LIBVER)/openssl.rb
+/usr/lib/ruby/$(PKG_LIBVER)/*/openssl.so
 endef
 
-define Package/ruby-psych
-$(call Package/ruby/Default)
-  TITLE+=YAML parser and emitter
-  DEPENDS:=ruby +ruby-bigdecimal +ruby-datetime +ruby-misc +ruby-enc +libyaml
+define Package/ruby-optparse/files
+/usr/lib/ruby/$(PKG_LIBVER)/optparse.rb
+/usr/lib/ruby/$(PKG_LIBVER)/optionparser.rb
+/usr/lib/ruby/$(PKG_LIBVER)/optparse
 endef
 
-define Package/ruby-psych/description
- Provides psych* files
-
+define Package/ruby-patterns/files
+/usr/lib/ruby/$(PKG_LIBVER)/observer.rb
+/usr/lib/ruby/$(PKG_LIBVER)/singleton.rb
+/usr/lib/ruby/$(PKG_LIBVER)/forwardable.rb
 endef
 
-define Package/ruby-racc
-$(call Package/ruby/Default)
-  TITLE:=LALR parser generator in Ruby
-  DEPENDS:=ruby
+define Package/ruby-powerassert/files
+/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/power_assert-*.gemspec
+/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/power_assert-*
 endef
-
-define Package/ruby-racc/description
- Provides racc* files
-
+define Package/ruby-powerassert/files-excluded
+/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/power_assert-*/test
 endef
 
-define Package/ruby-rake
-$(call Package/ruby/Default)
-  TITLE+=Ruby Rake (make replacement)
-  DEPENDS:=ruby +ruby-datetime +ruby-filelib +ruby-optparse +ruby-patterns +ruby-rbconfig
+define Package/ruby-prettyprint/files
+/usr/lib/ruby/$(PKG_LIBVER)/pp.rb
+/usr/lib/ruby/$(PKG_LIBVER)/prettyprint.rb
 endef
 
-define Package/ruby-rake/description
- Provides rake* files
-
+define Package/ruby-pstore/files
+/usr/lib/ruby/$(PKG_LIBVER)/pstore.rb
 endef
 
-define Package/ruby-rbconfig
-$(call Package/ruby/Default)
-  TITLE+=Ruby RbConfig
-  DEPENDS:=ruby
+define Package/ruby-psych/files
+/usr/lib/ruby/$(PKG_LIBVER)/psych
+/usr/lib/ruby/$(PKG_LIBVER)/psych.rb
+/usr/lib/ruby/$(PKG_LIBVER)/*/psych.so
+/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/psych-*.gemspec
 endef
 
-define Package/ruby-rbconfig/description
- Provides rbconfig file
-
+define Package/ruby-racc/files
+/usr/lib/ruby/$(PKG_LIBVER)/racc
+/usr/lib/ruby/$(PKG_LIBVER)/*/racc/*.so
 endef
 
-define Package/ruby-rdoc
-$(call Package/ruby/Default)
-  TITLE+= (documentation generator)
-  DEPENDS:=ruby +ruby-erb +ruby-irb +ruby-json +ruby-racc +ruby-rake +ruby-yaml +ruby-zlib
+define Package/ruby-rake/files
+/usr/lib/ruby/$(PKG_LIBVER)/rake/
+/usr/lib/ruby/$(PKG_LIBVER)/rake.rb
+/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/rake-*.gemspec
+/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/rake-*/
 endef
-
-define Package/ruby-rdoc/description
- Provides rdoc* and ri files
-
+define Package/ruby-rake/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rake $(1)/usr/bin/;
+       $(call RubyBuildPackage/install,rake,$(1))
 endef
-
-define Package/ruby-readline
-$(call Package/ruby/Default)
-  TITLE:=Ruby support for readline
-  DEPENDS:=ruby +libncurses +libreadline
+define Package/ruby-rake/files-excluded
+/usr/lib/ruby/$(PKG_LIBVER)/rake/runtest.rb
 endef
 
-define Package/ruby-readline/description
- Provides readline* files
-
+define Package/ruby-rbconfig/files
+/usr/lib/ruby/$(PKG_LIBVER)/*/rbconfig.rb
+/usr/lib/ruby/$(PKG_LIBVER)/rbconfig/*
+/usr/lib/ruby/$(PKG_LIBVER)/*/rbconfig/*.so
 endef
 
-define Package/ruby-rexml
-$(call Package/ruby/Default)
-  TITLE:=Ruby XML toolkit
-  DEPENDS:=ruby +ruby-patterns +ruby-enc
+define Package/ruby-rdoc/files
+       /usr/lib/ruby/$(PKG_LIBVER)/rdoc.rb
+       /usr/lib/ruby/$(PKG_LIBVER)/rdoc
+       /usr/lib/ruby/gems/$(PKG_LIBVER)/gems/rdoc-*
+       /usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/rdoc-*.gemspec
 endef
-
-define Package/ruby-rexml/description
- Provides rexml* files
-
+define Package/ruby-rdoc/files-excluded
+       /usr/lib/ruby/$(PKG_LIBVER)/rdoc/test_case.rb
+       /usr/lib/ruby/$(PKG_LIBVER)/rdoc/markup/formatter_test_case.rb
+       /usr/lib/ruby/$(PKG_LIBVER)/rdoc/markup/text_formatter_test_case.rb
 endef
-
-define Package/ruby-rinda
-$(call Package/ruby/Default)
-  TITLE:=Ruby Linda paradigm implementation
-  DEPENDS:=ruby +ruby-drb
+define Package/ruby-rdoc/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rdoc $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ri $(1)/usr/bin/
+       $(call RubyBuildPackage/install,rdoc,$(1))
 endef
 
-define Package/ruby-rinda/description
- Provides rinda* files
-
+define Package/ruby-readline/files
+/usr/lib/ruby/$(PKG_LIBVER)/*/readline.so
 endef
 
-define Package/ruby-ripper
-$(call Package/ruby/Default)
-  TITLE:=Ruby script parser
-  DEPENDS:=ruby
+define Package/ruby-rexml/files
+/usr/lib/ruby/$(PKG_LIBVER)/rexml
 endef
 
-define Package/ruby-ripper/description
- Provides ripper* files
-
+define Package/ruby-rinda/files
+/usr/lib/ruby/$(PKG_LIBVER)/rinda
 endef
 
-define Package/ruby-rss
-$(call Package/ruby/Default)
-  TITLE:=Ruby RSS toolkit
-  DEPENDS:=ruby +ruby-net +ruby-nkf +ruby-rexml
+define Package/ruby-ripper/files
+/usr/lib/ruby/$(PKG_LIBVER)/ripper.rb
+/usr/lib/ruby/$(PKG_LIBVER)/ripper
+/usr/lib/ruby/$(PKG_LIBVER)/*/ripper.so
 endef
 
-define Package/ruby-rss/description
- Provides rss* files
-
+define Package/ruby-rss/files
+/usr/lib/ruby/$(PKG_LIBVER)/rss
+/usr/lib/ruby/$(PKG_LIBVER)/rss.rb
 endef
 
-define Package/ruby-sdbm
-$(call Package/ruby/Default)
-  TITLE:=Ruby simple file-based key-value dbm implementation
-  DEPENDS:=ruby
+define Package/ruby-sdbm/files
+/usr/lib/ruby/$(PKG_LIBVER)/*/sdbm.so
 endef
 
-define Package/ruby-sdbm/description
- Provides sdbm* files
-
+define Package/ruby-shell/files
+/usr/lib/ruby/$(PKG_LIBVER)/shell.rb
+/usr/lib/ruby/$(PKG_LIBVER)/shell
 endef
 
-define Package/ruby-shell
-$(call Package/ruby/Default)
-  TITLE:=Ruby idiomatic Ruby interface
-  DEPENDS:=ruby +ruby-patterns
+define Package/ruby-socket/files
+/usr/lib/ruby/$(PKG_LIBVER)/ipaddr.rb
+/usr/lib/ruby/$(PKG_LIBVER)/resolv-replace.rb
+/usr/lib/ruby/$(PKG_LIBVER)/resolv.rb
+/usr/lib/ruby/$(PKG_LIBVER)/socket.rb
+/usr/lib/ruby/$(PKG_LIBVER)/*/socket.so
 endef
 
-define Package/ruby-shell/description
- Provides shell* files
-
+define Package/ruby-testunit/files
+/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/test-unit-*.gemspec
+/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/test-unit-*
 endef
-
-define Package/ruby-socket
-$(call Package/ruby/Default)
-  TITLE+= socket support
-  DEPENDS:=ruby +ruby-multithread
+define Package/ruby-testunit/files-excluded
+/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/test-unit-*/doc
+/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/test-unit-*/test
+/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/test-unit-*/sample
+/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/test-unit-*/*.md
 endef
 
-define Package/ruby-socket/description
- Provides socket-related files:
- - gserver.rb
- - ipaddr.rb
- - resolv-replace.rb
- - resolv.rb
- - socket.rb
- - socket.so
-
+define Package/ruby-unicodenormalize/files
+/usr/lib/ruby/$(PKG_LIBVER)/unicode_normalize.rb
+/usr/lib/ruby/$(PKG_LIBVER)/unicode_normalize
 endef
 
-define Package/ruby-testunit
-$(call Package/ruby/Default)
-  TITLE:=Gem test-unit shipped with Ruby
-  DEPENDS:=ruby +ruby-csv +ruby-erb +ruby-optparse +ruby-powerassert +ruby-prettyprint +ruby-rexml +ruby-yaml
+define Package/ruby-uri/files
+/usr/lib/ruby/$(PKG_LIBVER)/uri.rb
+/usr/lib/ruby/$(PKG_LIBVER)/uri
 endef
 
-define Package/ruby-testunit/description
- Provides test/unit* files
-
+define Package/ruby-webrick/files
+/usr/lib/ruby/$(PKG_LIBVER)/webrick
+/usr/lib/ruby/$(PKG_LIBVER)/webrick.rb
 endef
 
-define Package/ruby-unicodenormalize
-$(call Package/ruby/Default)
-  TITLE:=Ruby String additions for Unicode normalization
-  DEPENDS:=ruby +ruby-enc +ruby-enc-extra
+define Package/ruby-xmlrpc/files
+/usr/lib/ruby/$(PKG_LIBVER)/xmlrpc
+/usr/lib/ruby/$(PKG_LIBVER)/xmlrpc.rb
 endef
 
-define Package/ruby-unicodenormalize/description
-  Additions to class String for Unicode normalization
-
+define Package/ruby-yaml/files
+/usr/lib/ruby/$(PKG_LIBVER)/yaml
+/usr/lib/ruby/$(PKG_LIBVER)/yaml.rb
 endef
 
-define Package/ruby-uri
-$(call Package/ruby/Default)
-  TITLE:=Ruby library to handle URI
-  DEPENDS:=ruby +ruby-socket +ruby-enc
+define Package/ruby-zlib/files
+/usr/lib/ruby/$(PKG_LIBVER)/*/zlib.so
 endef
 
-define Package/ruby-uri/description
- Provides uri* files
+RUBY_FILES = $(strip $(call Package/ruby-$(1)/files))
+RUBY_FILES_EXCLUDED = $(strip $(call Package/ruby-$(1)/files-excluded))
 
+# 1: short name
+# 2: install dir
+define RubyBuildPackage/install
+       ( \
+         cd $(PKG_INSTALL_DIR) && \
+         $(TAR) -cf - \
+           --files-from <(ls -1d $(patsubst /%,%,$(RUBY_FILES))) \
+           $(if $(RUBY_FILES_EXCLUDED),--exclude-from <(ls -1d $(patsubst /%,%,$(RUBY_FILES_EXCLUDED)))) \
+       ) | ( \
+         [ -n "$(2)" ] && cd $(2) && $(TAR) -xf - \
+       )
 endef
 
-define Package/ruby-webrick
-$(call Package/ruby/Default)
-  TITLE:=Ruby Web server toolkit
-  DEPENDS:=ruby +ruby-erb +ruby-net +ruby-patterns +ruby-rbconfig
-endef
+# 1: short name
+# 2: description
+# 3: dependencies on other packages
+define RubyBuildPackage
+  RUBY_STDLIB += $(1)
 
-define Package/ruby-webrick/description
- Provides webrick* files
+  # Package definition
+  ifndef Package/ruby-$(1)
+    define Package/ruby-$(1)
+      $(call Package/ruby/Default)
+      TITLE:=Ruby $(2)
+      DEPENDS:=ruby $(3)
+    endef
+  endif
 
-endef
+  ifndef Package/ruby-$(1)/description
+    define Package/ruby-$(1)/description
+      This package contains the ruby $(2).
 
-define Package/ruby-xmlrpc
-$(call Package/ruby/Default)
-  TITLE:=Ruby XML-RPC toolkit
-  DEPENDS:=ruby +ruby-rexml +ruby-webrick
-endef
+    endef
+  endif
 
-define Package/ruby-xmlrpc/description
- Provides xmlrpc* files
+  # Description
+  ifndef Package/ruby-$(1)/install
+    ifndef Package/ruby-$(1)/files
+       $$(error It must exists either a Package/ruby-$(1)/install or Package/ruby-$(1)/files)
+    endif
 
-endef
+    define Package/ruby-$(1)/description +=
 
-define Package/ruby-yaml
-$(call Package/ruby/Default)
-  TITLE:=Ruby YAML toolkit
-  DEPENDS:=ruby +ruby-dbm +ruby-pstore +ruby-psych
-endef
+Provides:
+$(patsubst /%,
+ - /%,$(RUBY_FILES))
 
-define Package/ruby-yaml/description
- Provides yaml* files
+    endef
 
-endef
+    ifneq ($(RUBY_FILES_EXCLUDED),)
+      define Package/ruby-$(1)/description +=
 
-define Package/ruby-zlib
-$(call Package/ruby/Default)
-  TITLE:=Ruby support for zlib
-  DEPENDS:=ruby +zlib
-endef
+Except:
+$(patsubst /%,
+ - /%,$(RUBY_FILES_EXCLUDED))
 
-define Package/ruby-zlib/description
- Provides zlib* files
+      endef
+    endif
 
-endef
+    Package/ruby-$(1)/install=$(call RubyBuildPackage/install,$(1),$$(1))
+  endif
 
-HOST_CONFIGURE_ARGS += \
-       --disable-install-doc \
-       --disable-install-rdoc \
-       --disable-install-capi \
-       --with-static-linked-ext \
-       --with-out-ext=tk,tk/tkutil,win32,win32ole,dbm,gdbm,readline \
-
-# even not used, host build with restricted exts results in gems not being
-# compiling for target (probably some cross compiling problem like checking
-# host for selecting target features)
-#      --with-out-ext \
-#      --with-ext=thread,stringio \
-
-CONFIGURE_ARGS += \
-       --enable-shared \
-       --enable-static \
-       --disable-rpath \
-       $(call autoconf_bool,CONFIG_IPV6,ipv6) \
-       --disable-install-doc \
-       --disable-install-capi \
-       --with-ruby-version=minor \
-       --with-iconv-dir=$(ICONV_PREFIX) \
-       --with-out-ext=tk,tk/tkutil,win32,win32ole
-
-ifndef CONFIG_RUBY_DIGEST_USE_OPENSSL
-CONFIGURE_ARGS += \
-       --with-bundled-sha1\
-       --with-bundled-md5\
-       --with-bundled-rmd160\
-       --with-bundled-sha2 \
-
-endif
-
-TARGET_LDFLAGS += -L$(PKG_BUILD_DIR)
-
-# Ruby uses DLDFLAGS and not LDFLAGS for libraries. LDFLAGS is only for execs.
-# However, DLDFLAGS from configure is not passed to Makefile when target is linux.
-# XLDFLAGS is used by both libraries and execs. This is somehow brute force but
-# if will fix when some LD_FLAGS is needef for libraries. As side effect, it will
-# duplicate ld args for binaries.
-CONFIGURE_VARS += XLDFLAGS="$(TARGET_LDFLAGS)"
-
-MAKE_FLAGS += \
-       DESTDIR="$(PKG_INSTALL_DIR)" \
-       SHELL="/bin/bash"
-
-define Package/ruby/install
-       $(INSTALL_DIR) $(1)/usr/bin
-       $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
-       $(INSTALL_DIR) $(1)/usr/lib/ruby/vendor_ruby/$(PKG_LIBVER)
-       $(INSTALL_DIR) $(1)/usr/lib/ruby/site_ruby/$(PKG_LIBVER)
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ruby $(1)/usr/lib/ruby/ruby$(PKG_LIBVER)-bin
-       $(INSTALL_BIN) ./files/ruby $(1)/usr/bin/ruby
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/vendor_ruby/$(PKG_LIBVER)/* $(1)/usr/lib/ruby/vendor_ruby/$(PKG_LIBVER)/
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/site_ruby/$(PKG_LIBVER)/* $(1)/usr/lib/ruby/site_ruby/$(PKG_LIBVER)/
-       sed -i -e "s%@RUBY_LIBPATH@%/usr/lib/ruby/$(PKG_LIBVER)%" $(1)/usr/bin/ruby
-       sed -i -e "s%@RUBY_BINPATH@%/usr/lib/ruby/ruby$(PKG_LIBVER)-bin%" $(1)/usr/bin/ruby
-endef
-
-define Package/libruby/install
-       $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libruby.so.* $(1)/usr/lib/
-endef
-
-define Package/ruby-stdlib/install
-       # nothing to do
-endef
-
-define Package/ruby-bigdecimal/install
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/*/bigdecimal.so \
-               usr/lib/ruby/$(PKG_LIBVER)/bigdecimal/ \
-               usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/bigdecimal-*.gemspec \
-       ) | ( cd $(1); $(TAR) -xf - )
-endef
-
-define Package/ruby-cgi/install
-       $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/cgi $(1)/usr/lib/ruby/$(PKG_LIBVER)/
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/cgi.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
-endef
-
-define Package/ruby-csv/install
-       $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/csv.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
-endef
-
-define Package/ruby-datetime/install
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/time.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/date.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/*/date_core.so \
-       ) | ( cd $(1); $(TAR) -xf - )
-endef
-
-define Package/ruby-dbm/install
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/*/dbm.so \
-       ) | ( cd $(1); $(TAR) -xf - )
-endef
-
-define Package/ruby-debuglib/install
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/profile.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/profiler.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/debug.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/tracer.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/benchmark.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/*/objspace.so \
-       ) | ( cd $(1); $(TAR) -xf - )
-endef
-
-define Package/ruby-digest/install
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/digest \
-               usr/lib/ruby/$(PKG_LIBVER)/digest.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/*/digest.so \
-               usr/lib/ruby/$(PKG_LIBVER)/*/digest/* \
-       ) | ( cd $(1); $(TAR) -xf - )
-endef
-
-define Package/ruby-drb/install
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/drb.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/drb \
-       ) | ( cd $(1); $(TAR) -xf - )
-endef
-
-define Package/ruby-enc/install
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/*/enc/encdb.so \
-               usr/lib/ruby/$(PKG_LIBVER)/*/enc/iso_8859_1.so \
-               usr/lib/ruby/$(PKG_LIBVER)/*/enc/utf_* \
-               usr/lib/ruby/$(PKG_LIBVER)/*/enc/euc_jp.so \
-       ) | ( cd $(1); $(TAR) -xf - )
-endef
-
-define Package/ruby-enc-extra/install
-       ( cd $(PKG_INSTALL_DIR); $(TAR) \
-               --exclude=usr/lib/ruby/$(PKG_LIBVER)/*/enc/encdb.so \
-               --exclude=usr/lib/ruby/$(PKG_LIBVER)/*/enc/iso_8859_1.so \
-               --exclude=usr/lib/ruby/$(PKG_LIBVER)/*/enc/utf_* \
-               --exclude=usr/lib/ruby/$(PKG_LIBVER)/*/enc/euc_jp.so \
-               -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/*/enc \
-       ) | ( cd $(1); $(TAR) -xf - )
-endef
-
-define Package/ruby-erb/install
-       $(INSTALL_DIR) $(1)/usr/bin
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/erb $(1)/usr/bin/
-       $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)/
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/erb.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
-endef
-
-define Package/ruby-fiddle/install
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/fiddle.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/fiddle/ \
-               usr/lib/ruby/$(PKG_LIBVER)/*/fiddle.so \
-       ) | ( cd $(1); $(TAR) -xf - )
-endef
-
-define Package/ruby-filelib/install
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/tmpdir.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/tempfile.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/pathname.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/*/pathname.so \
-               usr/lib/ruby/$(PKG_LIBVER)/find.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/fileutils.rb \
-       ) | ( cd $(1); $(TAR) -xf - )
-endef
-
-define Package/ruby-gdbm/install
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/*/gdbm.so \
-       ) | ( cd $(1); $(TAR) -xf - )
-endef
-
-define Package/ruby-gems/install
-       $(INSTALL_DIR) $(1)/usr/bin
-       $(CP) $(PKG_INSTALL_DIR)/usr/bin/gem $(1)/usr/bin/
-       $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/ubygems.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rubygems.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
-       # Remove tests (avoids extra deps)
-       $(RM) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rubygems/test_case.rb
-       $(RM) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rubygems/package/tar_test_case.rb
-       $(RM) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rubygems/installer_test_case.rb
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rubygems $(1)/usr/lib/ruby/$(PKG_LIBVER)/
-       $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default
-       $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems
-       $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/doc
-       $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/cache
-       $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/extensions
-       $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/build_info
-endef
-
-define Package/ruby-io-console/install
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/*/io/console.so \
-               usr/lib/ruby/$(PKG_LIBVER)/io/console/ \
-               usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/io-console-*.gemspec \
-       ) | ( cd $(1); $(TAR) -xf - )
-endef
-
-define Package/ruby-irb/install
-       $(INSTALL_DIR) $(1)/usr/bin
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/irb $(1)/usr/bin/
-       $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/irb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/irb.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
-endef
-
-define Package/ruby-json/install
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/json.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/json \
-               usr/lib/ruby/$(PKG_LIBVER)/*/json \
-               usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/json-*.gemspec \
-       ) | ( cd $(1); $(TAR) -xf - )
-       rm -rf \
-               $(1)/usr/lib/ruby/$(PKG_LIBVER)/psych/json
-endef
-
-define Package/ruby-logger/install
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/logger.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/syslog/logger.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/*/syslog.so \
-       ) | ( cd $(1); $(TAR) -xf - )
-endef
-
-define Package/ruby-math/install
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/prime.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/mathn.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/cmath.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/*/mathn \
-               usr/lib/ruby/$(PKG_LIBVER)/matrix.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/matrix \
-       ) | ( cd $(1); $(TAR) -xf - )
-endef
-
-define Package/ruby-minitest/install
-       $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications
-       $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/minitest-*.gemspec $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/
-       # Remove tests (avoids extra deps)
-       $(RM) -rf $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/minitest-*/test
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/minitest-* $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/
-endef
-
-define Package/ruby-misc/install
-       $(INSTALL_DIR) $(1)/usr/lib
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/English.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/abbrev.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/base64.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/delegate.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/e2mmap.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/expect.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/getoptlong.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/open3.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/ostruct.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/scanf.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/securerandom.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/set.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/shellwords.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/tsort.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/weakref.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/*/continuation.so \
-               usr/lib/ruby/$(PKG_LIBVER)/*/coverage.so \
-               usr/lib/ruby/$(PKG_LIBVER)/*/etc.so \
-               usr/lib/ruby/$(PKG_LIBVER)/*/fcntl.so \
-               usr/lib/ruby/$(PKG_LIBVER)/*/fiber.so \
-               usr/lib/ruby/$(PKG_LIBVER)/*/pty.so \
-               usr/lib/ruby/$(PKG_LIBVER)/*/stringio.so \
-               usr/lib/ruby/$(PKG_LIBVER)/*/strscan.so \
-       ) | ( cd $(1); $(TAR) -xf - )
-endef
-
-
-
-define Package/ruby-mkmf/install
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/mkmf.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/un.rb \
-       ) | ( cd $(1); $(TAR) -xf - )
-endef
-
-define Package/ruby-multithread/install
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/monitor.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/timeout.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/thwait.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/mutex_m.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/sync.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/*/thread.so \
-               usr/lib/ruby/$(PKG_LIBVER)/*/io/wait.so \
-               usr/lib/ruby/$(PKG_LIBVER)/*/io/nonblock.so \
-       ) | ( cd $(1); $(TAR) -xf - )
-endef
-
-define Package/ruby-net/install
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/open-uri.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/net/* \
-       ) | ( cd $(1); $(TAR) -xf - )
-endef
-
-define Package/ruby-nkf/install
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/kconv.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/*/nkf.so \
-       ) | ( cd $(1); $(TAR) -xf - )
-endef
-
-define Package/ruby-openssl/install
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/openssl \
-               usr/lib/ruby/$(PKG_LIBVER)/openssl.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/*/openssl.so \
-       ) | ( cd $(1); $(TAR) -xf - )
-endef
-
-define Package/ruby-optparse/install
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/optparse.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/optionparser.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/optparse \
-       ) | ( cd $(1); $(TAR) -xf - )
-endef
-
-define Package/ruby-patterns/install
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/observer.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/singleton.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/forwardable.rb \
-       ) | ( cd $(1); $(TAR) -xf - )
-endef
-
-define Package/ruby-powerassert/install
-       $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications
-       $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/power_assert-*.gemspec $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/
-       # Remove tests (avoids extra deps)
-       $(RM) -rf $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/power_assert-*/test
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/power_assert-* $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/
-endef
-
-define Package/ruby-prettyprint/install
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/pp.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/prettyprint.rb \
-       ) | ( cd $(1); $(TAR) -xf - )
-endef
-
-define Package/ruby-pstore/install
-       $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/pstore.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
-endef
-
-define Package/ruby-psych/install
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/psych \
-               usr/lib/ruby/$(PKG_LIBVER)/psych.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/*/psych.so \
-               usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/psych-*.gemspec \
-       ) | ( cd $(1); $(TAR) -xf - )
-endef
-
-define Package/ruby-racc/install
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/racc \
-               usr/lib/ruby/$(PKG_LIBVER)/*/racc/*.so \
-       ) | ( cd $(1); $(TAR) -xf - )
-endef
-
-define Package/ruby-rake/install
-       $(INSTALL_DIR) $(1)/usr/bin
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rake $(1)/usr/bin/
-       $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rake.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
-       # Remove tests (avoids extra deps)
-       $(RM) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rake/runtest.rb
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rake $(1)/usr/lib/ruby/$(PKG_LIBVER)/
-       $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default
-       $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/rake-*.gemspec \
-               $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/rake-* $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/
-endef
-
-define Package/ruby-rbconfig/install
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/*/rbconfig.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/rbconfig/* \
-               usr/lib/ruby/$(PKG_LIBVER)/*/rbconfig/*.so \
-       ) | ( cd $(1); $(TAR) -xf - )
-endef
-
-define Package/ruby-rdoc/install
-       $(INSTALL_DIR) $(1)/usr/bin
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rdoc $(1)/usr/bin/
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ri $(1)/usr/bin/
-       $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
-       # Remove tests (avoids extra deps)
-       $(RM) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rdoc/test_case.rb
-       $(RM) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rdoc/markup/formatter_test_case.rb
-       $(RM) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rdoc/markup/text_formatter_test_case.rb
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rdoc.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rdoc $(1)/usr/lib/ruby/$(PKG_LIBVER)/
-       $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default
-       $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/rdoc-*.gemspec \
-               $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/rdoc-* \
-               $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/
-endef
-
-define Package/ruby-readline/install
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/*/readline.so \
-       ) | ( cd $(1); $(TAR) -xf - )
-endef
-
-define Package/ruby-rexml/install
-       $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rexml $(1)/usr/lib/ruby/$(PKG_LIBVER)/
-endef
-
-define Package/ruby-rinda/install
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/rinda \
-       ) | ( cd $(1); $(TAR) -xf - )
-endef
-
-define Package/ruby-ripper/install
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/ripper.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/ripper \
-               usr/lib/ruby/$(PKG_LIBVER)/*/ripper.so \
-       ) | ( cd $(1); $(TAR) -xf - )
-endef
-
-define Package/ruby-rss/install
-       $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rss $(1)/usr/lib/ruby/$(PKG_LIBVER)/
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rss.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
-endef
-
-define Package/ruby-sdbm/install
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/*/sdbm.so \
-       ) | ( cd $(1); $(TAR) -xf - )
-endef
-
-define Package/ruby-shell/install
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/shell.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/shell \
-       ) | ( cd $(1); $(TAR) -xf - )
-endef
-
-define Package/ruby-socket/install
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/ipaddr.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/resolv-replace.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/resolv.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/socket.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/*/socket.so \
-       ) | ( cd $(1); $(TAR) -xf - )
-endef
-
-define Package/ruby-testunit/install
-       $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications
-       $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/test-unit-*.gemspec $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/
-       # Remove tests (avoids extra deps)
-       $(RM) -rf $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/test-unit-*/test
-       $(RM) -rf $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/test-unit-*/sample
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/test-unit-* $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/
-endef
-
-define Package/ruby-unicodenormalize/install
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/unicode_normalize.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/unicode_normalize \
-       ) | ( cd $(1); $(TAR) -xf - )
-endef
-
-define Package/ruby-uri/install
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/uri.rb \
-               usr/lib/ruby/$(PKG_LIBVER)/uri \
-       ) | ( cd $(1); $(TAR) -xf - )
-endef
-
-define Package/ruby-webrick/install
-       $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/webrick $(1)/usr/lib/ruby/$(PKG_LIBVER)/
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/webrick.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
-endef
-
-define Package/ruby-xmlrpc/install
-       $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/xmlrpc $(1)/usr/lib/ruby/$(PKG_LIBVER)/
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/xmlrpc.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
-endef
-
-define Package/ruby-yaml/install
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/yaml \
-               usr/lib/ruby/$(PKG_LIBVER)/yaml.rb \
-       ) | ( cd $(1); $(TAR) -xf - )
-endef
-
-define Package/ruby-zlib/install
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               usr/lib/ruby/$(PKG_LIBVER)/*/zlib.so \
-       ) | ( cd $(1); $(TAR) -xf - )
-endef
-
-define Build/InstallDev
-       ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
-               . \
-       ) | ( cd $(1); $(TAR) -xf - )
+  $$(eval $$(call BuildPackage,ruby-$(1)))
 endef
 
 $(eval $(call BuildPackage,ruby))
 $(eval $(call BuildPackage,libruby))
+$(eval $(call RubyBuildPackage,bigdecimal,Arbitrary-precision decimal floating-point library,))
+$(eval $(call RubyBuildPackage,cgi,CGI support toolkit,+ruby-filelib +ruby-pstore))
+$(eval $(call RubyBuildPackage,csv,CSV library,+ruby-patterns +ruby-datetime +ruby-enc))
+$(eval $(call RubyBuildPackage,datetime,date library))
+$(eval $(call RubyBuildPackage,dbm,support for dbm,+libdb47))
+$(eval $(call RubyBuildPackage,debuglib,debug library,+ruby-multithread +ruby-prettyprint))
+$(eval $(call RubyBuildPackage,digest,Digest Library,+RUBY_DIGEST_USE_OPENSSL:libopenssl))
+$(eval $(call RubyBuildPackage,drb,distributed object system,+ruby-filelib +ruby-patterns +ruby-socket))
+$(eval $(call RubyBuildPackage,enc,character re-coding library charset (small subset),))
+$(eval $(call RubyBuildPackage,enc-extra,character re-coding library charset (extra subset),+ruby-enc))
+$(eval $(call RubyBuildPackage,erb,(embedded interpreter),+ruby-cgi))
+$(eval $(call RubyBuildPackage,fiddle,libffi wrapper,+libffi))
+$(eval $(call RubyBuildPackage,filelib,file utils library,+ruby-enc +ruby-misc))
+$(eval $(call RubyBuildPackage,gdbm,support for gdbm,+libgdbm))
+$(eval $(call RubyBuildPackage,gems,gems packet management,+ruby-net +ruby-rdoc))
+$(eval $(call RubyBuildPackage,io-console,Console interface,))
+$(eval $(call RubyBuildPackage,irb,(interactive shell),+ruby-debuglib +ruby-filelib +ruby-math))
+$(eval $(call RubyBuildPackage,json,support for JSON,+ruby-datetime +ruby-misc))
+$(eval $(call RubyBuildPackage,logger,logger and syslog library,+ruby-multithread))
+$(eval $(call RubyBuildPackage,math,math library,+ruby-patterns))
+$(eval $(call RubyBuildPackage,minitest,Gem minitest,+ruby-gems))
+$(eval $(call RubyBuildPackage,misc,standard libraries subset (miscelaneous files),))
+$(eval $(call RubyBuildPackage,mkmf,makefile library,+ruby-filelib +ruby-optparse +ruby-rbconfig))
+$(eval $(call RubyBuildPackage,multithread,multithread library,+ruby-misc))
+$(eval $(call RubyBuildPackage,net,Network Protocols Library,+ruby-datetime +ruby-digest +ruby-filelib +ruby-uri))
+$(eval $(call RubyBuildPackage,nkf,Network Kanji Filter,+ruby-enc))
+$(eval $(call RubyBuildPackage,openssl,support for openssl,+ruby-enc +ruby-misc +libopenssl))
+$(eval $(call RubyBuildPackage,optparse,command-line option analysis,+ruby-misc))
+$(eval $(call RubyBuildPackage,patterns,design patterns implementation,+ruby-multithread))
+$(eval $(call RubyBuildPackage,powerassert,Gem power_assert,+ruby-ripper))
+$(eval $(call RubyBuildPackage,prettyprint,PrettyPrint library,+ruby-misc))
+$(eval $(call RubyBuildPackage,pstore,file based persistence,+ruby-digest +ruby-enc))
+$(eval $(call RubyBuildPackage,psych,YAML parser and emitter,+ruby-bigdecimal +ruby-datetime +ruby-misc +ruby-enc +libyaml))
+$(eval $(call RubyBuildPackage,racc,LALR parser generator,))
+$(eval $(call RubyBuildPackage,rake,Rake (make replacement),+ruby-datetime +ruby-filelib +ruby-optparse +ruby-patterns +ruby-rbconfig))
+$(eval $(call RubyBuildPackage,rbconfig,RbConfig,))
+$(eval $(call RubyBuildPackage,rdoc,documentation generator,+ruby-erb +ruby-irb +ruby-json +ruby-racc +ruby-rake +ruby-yaml +ruby-zlib))
+$(eval $(call RubyBuildPackage,readline,support for readline,+libncurses +libreadline))
+$(eval $(call RubyBuildPackage,rexml,XML toolkit,+ruby-patterns +ruby-enc))
+$(eval $(call RubyBuildPackage,rinda,Linda paradigm implementation,+ruby-drb))
+$(eval $(call RubyBuildPackage,ripper,script parser,))
+$(eval $(call RubyBuildPackage,rss,RSS toolkit,+ruby-net +ruby-nkf +ruby-rexml))
+$(eval $(call RubyBuildPackage,sdbm,simple file-based key-value dbm implementation,))
+$(eval $(call RubyBuildPackage,shell,idiomatic Ruby interface,+ruby-patterns))
+$(eval $(call RubyBuildPackage,socket,socket support,+ruby-multithread))
+$(eval $(call RubyBuildPackage,testunit,Gem test-unit,+ruby-csv +ruby-erb +ruby-optparse +ruby-powerassert +ruby-prettyprint +ruby-rexml +ruby-yaml))
+$(eval $(call RubyBuildPackage,unicodenormalize,String additions for Unicode normalization,+ruby-enc +ruby-enc-extra))
+$(eval $(call RubyBuildPackage,uri,library to handle URI,+ruby-socket +ruby-enc))
+$(eval $(call RubyBuildPackage,webrick,Web server toolkit,+ruby-erb +ruby-net +ruby-patterns +ruby-rbconfig))
+$(eval $(call RubyBuildPackage,xmlrpc,XML-RPC toolkit,+ruby-rexml +ruby-webrick))
+$(eval $(call RubyBuildPackage,yaml,YAML toolkit,+ruby-dbm +ruby-pstore +ruby-psych))
+$(eval $(call RubyBuildPackage,zlib,support for zlib,+zlib))
 $(eval $(call BuildPackage,ruby-stdlib))
-$(eval $(call BuildPackage,ruby-bigdecimal))
-$(eval $(call BuildPackage,ruby-cgi))
-$(eval $(call BuildPackage,ruby-csv))
-$(eval $(call BuildPackage,ruby-datetime))
-$(eval $(call BuildPackage,ruby-dbm))
-$(eval $(call BuildPackage,ruby-debuglib))
-$(eval $(call BuildPackage,ruby-digest))
-$(eval $(call BuildPackage,ruby-drb))
-$(eval $(call BuildPackage,ruby-enc))
-$(eval $(call BuildPackage,ruby-enc-extra))
-$(eval $(call BuildPackage,ruby-erb))
-$(eval $(call BuildPackage,ruby-fiddle))
-$(eval $(call BuildPackage,ruby-filelib))
-$(eval $(call BuildPackage,ruby-gdbm))
-$(eval $(call BuildPackage,ruby-gems))
-$(eval $(call BuildPackage,ruby-io-console))
-$(eval $(call BuildPackage,ruby-irb))
-$(eval $(call BuildPackage,ruby-json))
-$(eval $(call BuildPackage,ruby-logger))
-$(eval $(call BuildPackage,ruby-math))
-$(eval $(call BuildPackage,ruby-minitest))
-$(eval $(call BuildPackage,ruby-misc))
-$(eval $(call BuildPackage,ruby-mkmf))
-$(eval $(call BuildPackage,ruby-multithread))
-$(eval $(call BuildPackage,ruby-net))
-$(eval $(call BuildPackage,ruby-nkf))
-$(eval $(call BuildPackage,ruby-openssl))
-$(eval $(call BuildPackage,ruby-optparse))
-$(eval $(call BuildPackage,ruby-patterns))
-$(eval $(call BuildPackage,ruby-powerassert))
-$(eval $(call BuildPackage,ruby-prettyprint))
-$(eval $(call BuildPackage,ruby-pstore))
-$(eval $(call BuildPackage,ruby-psych))
-$(eval $(call BuildPackage,ruby-racc))
-$(eval $(call BuildPackage,ruby-rake))
-$(eval $(call BuildPackage,ruby-rbconfig))
-$(eval $(call BuildPackage,ruby-rdoc))
-$(eval $(call BuildPackage,ruby-readline))
-$(eval $(call BuildPackage,ruby-rexml))
-$(eval $(call BuildPackage,ruby-rinda))
-$(eval $(call BuildPackage,ruby-ripper))
-$(eval $(call BuildPackage,ruby-rss))
-$(eval $(call BuildPackage,ruby-sdbm))
-$(eval $(call BuildPackage,ruby-shell))
-$(eval $(call BuildPackage,ruby-socket))
-$(eval $(call BuildPackage,ruby-testunit))
-$(eval $(call BuildPackage,ruby-unicodenormalize))
-$(eval $(call BuildPackage,ruby-uri))
-$(eval $(call BuildPackage,ruby-webrick))
-$(eval $(call BuildPackage,ruby-xmlrpc))
-$(eval $(call BuildPackage,ruby-yaml))
-$(eval $(call BuildPackage,ruby-zlib))
 $(eval $(call HostBuild))
index 946ec1fca24fc5a4895cf2feb409ff54ef862278..d1cd745ec14c5a1853a81b3e31fde94234af6b2c 100644 (file)
@@ -6,13 +6,14 @@
 # Must run inside a openwrt with all *ruby* packages installed
 #
 
+RUBY_SIMPLE_VERSION = RUBY_VERSION.split(".")[0..1].join(".")
 failed = false
 
 puts "Looking for installed ruby packages..."
 packages=`opkg list-installed '*ruby*' | cut -d' ' -f 1`.split("\n")
 
 puts "Looking for packages files..."
-package_files=Hash.new([])
+package_files=Hash.new { |h,k| h[k]=[] }
 packages.each do
        |pkg|
        files=`opkg files "#{pkg}" | sed -e 1d`.split("\n")
@@ -24,7 +25,7 @@ require_regex_ignore=/^require ([a-zA-Z\$]|["']$|.*\/$)/
 require_ignore=%w{drb/invokemethod16 foo rubygems/defaults/operating_system win32console java Win32API
                   builder/xchar json/pure simplecov win32/sspi rdoc/markdown/literals_1_8 enumerator win32/resolv rbtree
                   nqxml/streamingparser nqxml/treeparser xmlscan/parser xmlscan/scanner xmltreebuilder xml/parser xmlparser xml/encoding-ja xmlencoding-ja
-                  iconv uconv win32ole gettext/po_parser gettext/mo libxml}
+                  iconv uconv win32ole gettext/po_parser gettext/mo libxml psych.jar jar-dependencies}
 
 builtin_enc=[
        Encoding.find("ASCII-8BIT"),
@@ -34,7 +35,7 @@ builtin_enc=[
 ]
 
 puts "Looking for requires in files..."
-files_requires=Hash.new([])
+files_requires=Hash.new { |h,k| h[k]=[] }
 packages.each do
         |pkg|
        package_files[pkg].each do
@@ -93,7 +94,7 @@ packages.each do
                                                next
                                        end
 
-                                       files_requires[file]=files_requires[file] + [require]
+                                       files_requires[file] += [require]
 
                                when /Encoding::/
                                        encs=line.scan(/Encoding::[[:alnum:]_]+/).collect {|enc| eval(enc) }.select {|enc| enc.kind_of? Encoding }
@@ -104,7 +105,7 @@ packages.each do
                                required_encs = (encs - builtin_enc).collect {|enc| "enc/#{enc.name.downcase.gsub("-","_")}" }
                                required_encs << "enc/encdb" if need_encdb
 
-                               files_requires[file] = files_requires[file] + required_encs
+                               files_requires[file] += required_encs
                        end
                end
        end
@@ -119,10 +120,18 @@ package_files.each do |(pkg,files)| files.each do |file|
        end
 end; end
 
-puts "Merging requirements into packages..."
-package_requires = Hash[packages.collect { |pkg| [pkg, package_files[pkg].collect {|file| files_requires[file] }.inject([],:+).uniq] }]
+puts "Grouping package requirements per package"
+package_requires_files = Hash.new{|h,k| h[k] = Hash.new { |h2,k2| h2[k2] = [] } }
+package_files.each do |(pkg,files)|
+       package_requires_files[pkg]
+       files.each do |file|
+               files_requires[file].each do |requires|
+                       package_requires_files[pkg][requires] << file
+               end
+       end
+end
 
-weak_dependency=Hash.new([])
+weak_dependency=Hash.new { |h,k| h[k]=[] }
 weak_dependency.merge!({
 "ruby-misc"=>["ruby-openssl","ruby-fiddle"],                   #securerandom.rb
 "ruby-debuglib"=>["ruby-readline"],                            #debug.rb
@@ -136,6 +145,7 @@ weak_dependency.merge!({
 "ruby-rdoc"=>["ruby-gems","ruby-readline","ruby-webrick",      #/usr/bin/rdoc and others
               "ruby-io-console"],                              #rdoc/stats/normal.rb
 "ruby-webrick"=>["ruby-openssl"],                              #webrick/ssl.rb
+"ruby-testunit"=>["ruby-io-console"],                          #gems/test-unit-3.1.5/lib/test/unit/ui/console/testrunner.rb
 })
 
 puts "Preloading gems..."
@@ -143,12 +153,12 @@ Gem::Specification.all.each{ |x| gem x.name }
 
 puts "Looking for package dependencies..."
 package_provides = {}
-package_dependencies = Hash.new([])
-package_requires.each do
-       |(pkg,requires)|
+package_dependencies = Hash.new { |h,k| h[k]=[] }
+package_requires_files.each do
+       |(pkg,requires_files)|
 
-       requires.each do
-               |require|
+       requires_files.each do
+               |(require,files)|
                if package_provides.include?(require)
                        found = package_provides[require]
                else
@@ -159,13 +169,13 @@ package_requires.each do
                                next
                        end
                        found = found.first
-                       package_provides[require]=found
+                       package_provides[require] = found
                end
                if weak_dependency[pkg].include?(found)
-                       puts "#{pkg}: #{found} provides #{require} (ignored WEAK dep)"
+                       puts "#{pkg}: #{found} provides #{require} (weak depedendency ignored)"
                else
-                       puts "#{pkg}: #{found} provides #{require}"
-                       package_dependencies[pkg]=package_dependencies[pkg] + [found]
+                       puts "#{pkg}: #{found} provides #{require} for #{files.collect {|file| file.sub("/usr/lib/ruby/","") }.join(",")}"
+                       package_dependencies[pkg] += [found]
                end
        end
 end
@@ -174,20 +184,16 @@ if failed
        puts "Please, fix the missing files or ignore them on require_ignore var"
        exit(1)
 end
-
-package_dependencies.each do
-        |(pkg,deps)|
-        package_dependencies[pkg]=deps.uniq.sort - [pkg]
-end
+# Remove self dependency
+package_dependencies = Hash[package_dependencies.collect {|(pkg,deps)| [pkg,package_dependencies[pkg]=deps.uniq.sort - [pkg]]}]
+package_dependencies.default = []
 
 puts "Expanding dependencies..."
 begin
        changed=false
        package_dependencies.each do
                |(pkg,deps)|
-
                next if deps.empty?
-
                deps_new = deps.collect {|dep| [dep] + package_dependencies[dep] }.inject([],:+).uniq.sort
                if not deps == deps_new
                        puts "#{pkg}: #{deps.join(",")}"
@@ -198,6 +204,12 @@ begin
        end
 end if not changed
 
+puts "Removing redundant dependencies..."
+package_dependencies.each do
+       |(pkg,deps)|
+       package_dependencies[pkg]=deps.uniq - [pkg]
+end
+
 puts "Checking for mutual dependencies..."
 package_dependencies.each do
        |(pkg,deps)|
@@ -208,11 +220,6 @@ package_dependencies.each do
 end
 exit(1) if failed
 
-puts "Removing redundant dependencies..."
-package_dependencies.each do
-       |(pkg,deps)|
-       package_dependencies[pkg]=deps.uniq - [pkg]
-end
 
 package_dependencies2=package_dependencies.dup
 package_dependencies.each do
@@ -256,15 +263,4 @@ end
 
 puts "All dependencies are OK." if ok
 
-
 __END__
-
-puts RUBY_VERSION, RUBY_PLATFORM
-puts 123
-
-puts Object.contants
-
-#RUBY_VER=2.1
-#RUBY_ARCH=i486-linux-gnu
-#RUBYLIB=/usr/lib/ruby/$RUBY_VER/
-#RUBYLIB_A=/usr/lib/ruby/$RUBY_ARCH/$RUBY_VER/
index f05e9feb8cb6cc08e28900ad2b3edb03513cee0c..e23b73df4b4c9133e747652afff69d3bc5eb22d8 100644 (file)
@@ -1,20 +1,28 @@
 #!/bin/bash
 #
+# bash feeds/packages/lang/ruby/ruby_missingfiles staging_dir/target-i386_i486_musl-1.1.11/ bin/x86/packages/packages/*ruby*_2.3.0*
+#
 
 function list_staging_files {
-       cd staging_dir/target-*/; find \
+       cd "$1"; find \
                \( \( -name "root-x86" -or -name "packages" -or -name "stamp" -or -name "pkginfo" \) -prune \) -or -true \
                \( -path "*ruby*" -or -name "erb" -or -name "gem" -or -name "irb" -or -name "rake" -or -name "rdoc" -or -name "ri" -or -name "testrb" \) \
+               -not -path "*/usr/include/*" -not -path "*/usr/lib/pkgconfig/*" -not -path "*/usr/lib/lib*.a" \
+               -not -path "*/usr/lib/ruby/gems/*/cache/*" \
                -print | sort
 }
 
 function list_ipkg_files {
-       for OPKG in bin/*/packages/packages/*ruby*; do
+       for OPKG; do
         tar --to-stdout -xzf "$OPKG" ./data.tar.gz | tar tz | sed -e 's%/$%%'
        done | sort -u
 }
 
 
-echo "          Staging                    Packages"
-diff -y <(list_staging_files) <(list_ipkg_files)
+echo "                          Staging                                             Packages"
+
+: ${1:?First arg is staging_dir}
+: ${2:?Second and following args are ruby ipkg packages}
+STAGING_DIR=$1; shift
+diff -d -y <(list_staging_files "$STAGING_DIR") <(list_ipkg_files "$@")
 
index c4d036e218bb5ab36a9b8efe3040815765efc529..a97caf008e0cfd1186cf1561be7aaadc2e39fff4 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006-2015 OpenWrt.org
+# Copyright (C) 2006-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=alsa-lib
-PKG_VERSION:=1.0.29
+PKG_VERSION:=1.1.0
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=ftp://ftp.alsa-project.org/pub/lib/ \
                http://alsa.cybermirror.org/lib/
-PKG_MD5SUM:=de67e0eca72474d6b1121037dafe1024
+PKG_MD5SUM:=69515ca73c3c4a212ef45160dea846c1
 PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>, \
                Peter Wagner <tripolar@gmx.at>
 
@@ -43,15 +43,12 @@ endef
 
 TARGET_CFLAGS += $(FPIC)
 
-define Build/Configure
-       $(call Build/Configure/Default, \
+CONFIGURE_ARGS+= \
                --disable-python \
                --disable-debug \
                --without-debug \
                $(SOFT_FLOAT_CONFIG_OPTION) \
-               --with-versioned=no \
-       )
-endef
+               --with-versioned=no
 
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include/
diff --git a/libs/alsa-lib/patches/002-remove_cross_compile_guess.patch b/libs/alsa-lib/patches/002-remove_cross_compile_guess.patch
deleted file mode 100644 (file)
index d8f9f12..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
---- a/configure.ac
-+++ b/configure.ac
-@@ -27,20 +27,6 @@ AC_PREFIX_DEFAULT(/usr)
- dnl Checks for programs.
--dnl try to gues cross-compiler if not set
--if test "x$host" != "x$build" -a -z "`echo $CC | grep -e '-gcc'`";
--then
--  AC_MSG_CHECKING(for cross-compiler)
--
--  which ${program_prefix}gcc >/dev/null 2>&1 && CC=${program_prefix}gcc
--  which ${host_cpu}-${host_os}-gcc >/dev/null 2>&1 \
--  && CC=${host_cpu}-${host_os}-gcc
--  which ${host_cpu}-${host_vendor}-${host_os}-gcc >/dev/null 2>&1 \
--  && CC=${host_cpu}-${host_vendor}-${host_os}-gcc
--
--  AC_MSG_RESULT($CC)
--fi
--          
- CFLAGS="$CFLAGS -D_GNU_SOURCE"
index 8230c02f59d7fed3eef5a9d516d0c4d2f3c946d1..fc6c6f5901b33fdbd2560ac16d8fdf8f79676009 100644 (file)
@@ -82,9 +82,9 @@
  #include <ctype.h>
 -#include <sys/poll.h>
 +#include <poll.h>
- #include <sys/shm.h>
  #include <sys/mman.h>
  #include <limits.h>
+ #include "pcm_local.h"
 --- a/src/pcm/pcm_direct.c
 +++ b/src/pcm/pcm_direct.c
 @@ -30,7 +30,7 @@
  #include <sys/socket.h>
 -#include <sys/poll.h>
 +#include <poll.h>
- #include <sys/shm.h>
  #include <pthread.h>
  #include "pcm_local.h"
 --- a/src/pcm/pcm_shm.c
 +++ b/src/pcm/pcm_shm.c
 @@ -36,7 +36,7 @@
index ae352f2fd37352e52215edc4588d7f1bf1db8612..97d377c07708485d0368a946fe48ab39b4907919 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2007-2014 OpenWrt.org
+# Copyright (C) 2007-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=apr-util
 PKG_VERSION:=1.5.4
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=@APACHE/apr/
@@ -41,16 +41,21 @@ CONFIGURE_ARGS += \
        --with-apr="$(STAGING_DIR)/usr/bin/apr-1-config" \
        --with-expat="$(STAGING_DIR)/usr" \
        --without-sqlite2 \
-       --with-sqlite3="$(STAGING_DIR)/usr" \
-       --with-iconv="$(ICONV_PREFIX)" \
+       --with-sqlite3="$(STAGING_DIR)/usr"
+
+ifdef $(CONFIG_BUILD_NLS)
+       CONFIGURE_ARGS += --with-iconv="$(ICONV_PREFIX)"
+else
+       CONFIGURE_ARGS += --without-iconv
+endif
 
 CONFIGURE_VARS += \
        ac_cv_file_dbd_apr_dbd_mysql_c=no \
        ac_cv_path_ODBC_CONFIG= \
-       APR_BUILD_DIR="$(STAGING_DIR)/usr/share/build-1" \
+       APR_BUILD_DIR="$(STAGING_DIR)/usr/share/build-1"
 
 MAKE_FLAGS += \
-       APRUTIL_LIBS="-lsqlite3 $(TARGET_LDFLAGS) -lexpat $(if $(ICONV_FULL),-liconv) -lapr-1 -luuid -lm -lcrypt" \
+       APRUTIL_LIBS="-lsqlite3 $(TARGET_LDFLAGS) -lexpat $(if $(ICONV_FULL),-liconv) -lapr-1 -luuid -lm -lcrypt"
 
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/include/apr-1/ $(1)/usr/lib  $(1)/usr/lib/pkgconfig/
index b1ad841488f427a0bfc2a532180755d4a6547921..583828b933d0b5b9e3590ca9027a063313c2443c 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2007-2015 OpenWrt.org
+# Copyright (C) 2007-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=glib2
-PKG_VERSION:=2.44.1
+PKG_VERSION:=2.46.2
 PKG_RELEASE:=1
 
 PKG_SOURCE:=glib-$(PKG_VERSION).tar.xz
 PKG_BUILD_DIR:=$(BUILD_DIR)/glib-$(PKG_VERSION)
-PKG_SOURCE_URL:=@GNOME/glib/2.44
-PKG_MD5SUM:=83efba4722a9674b97437d1d99af79db
+PKG_SOURCE_URL:=@GNOME/glib/2.46
+PKG_MD5SUM:=7f815d6e46df68e070cb421ed7f1139e
 
 PKG_BUILD_PARALLEL:=1
 HOST_BUILD_PARALLEL:=1
diff --git a/libs/glib2/patches/100-fix-gio-linking.patch b/libs/glib2/patches/100-fix-gio-linking.patch
deleted file mode 100644 (file)
index 3ce57fc..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/gio/Makefile.am
-+++ b/gio/Makefile.am
-@@ -707,6 +707,7 @@ bin_PROGRAMS = gio-querymodules glib-com
- glib_compile_resources_LDADD = libgio-2.0.la          \
-       $(top_builddir)/gobject/libgobject-2.0.la       \
-+      $(top_builddir)/gmodule/libgmodule-2.0.la       \
-       $(top_builddir)/glib/libglib-2.0.la             \
-       $(NULL)
index 59ca00f8f4cd66e328d1095f5e7105e04e128011..fc3b31758ebedd1905195f4d350e6fe8ab576bf7 100644 (file)
@@ -17,7 +17,6 @@ config GNUTLS_OCSP
 
 config GNUTLS_CRYPTODEV
        bool "enable /dev/crypto support"
-       select PACKAGE_kmod-cryptodev
        default n
 
 config GNUTLS_HEARTBEAT
index 362a90e081441b13cc1c15277cae772944aada6d..663359ded3972804875a4cfaecfcd3a4270901d7 100644 (file)
@@ -93,7 +93,7 @@ endef
 define Package/libgnutls
 $(call Package/gnutls/Default)
   TITLE+= (library)
-  DEPENDS+= +libnettle +!LIBNETTLE_MINI:libgmp +GNUTLS_EXT_LIBTASN1:libtasn1 +GNUTLS_PKCS11:p11-kit
+  DEPENDS+= +libnettle +!LIBNETTLE_MINI:libgmp +GNUTLS_EXT_LIBTASN1:libtasn1 +GNUTLS_PKCS11:p11-kit +GNUTLS_CRYPTODEV:kmod-cryptodev
 endef
 
 define Package/libgnutls/description
index 9d25265bdcdb74578150d7443f7413b3ddd68a95..9adc10f21e03f6c4d05cc974d814edd16e511efd 100644 (file)
@@ -10,8 +10,8 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=postfix
 PKG_RELEASE:=1
 PKG_SOURCE_URL:=ftp://ftp.porcupine.org/mirrors/postfix-release/official/
-PKG_VERSION:=3.0.3
-PKG_MD5SUM:=61caffae689c11d09b4c972a394ae3b1
+PKG_VERSION:=3.0.4
+PKG_MD5SUM:=877365c99e1fb5d46e61da5b22df0255
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_MAINTAINER:=Denis Shulyaka <Shulyaka@gmail.com>
 PKG_LICENSE:=IPL-1.0
index d24eeb964ea0f3d00285a31889cb93f5ef5e9ec9..3e4c693c51bed1052ae964782f8b9417000f5585 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006-2015 OpenWrt.org
+# Copyright (C) 2006-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ffmpeg
-PKG_VERSION:=2.7.4
+PKG_VERSION:=2.7.6
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=http://ffmpeg.org/releases/
-PKG_MD5SUM:=dea35a30de724e1851a94680fc209a0d
+PKG_MD5SUM:=578c88242872e58cf0db5f23faa4b2af
 PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
 
 PKG_LICENSE:=LGPL-2.1+ GPL-2+ LGPL-3
index c7ded21e5725d80e1469a5b0bc730bf3d3423b1e..84b775179846cd3c0f7e71baf896912492459a5d 100644 (file)
@@ -7,7 +7,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=adblock
-PKG_VERSION:=0.60.1
+PKG_VERSION:=0.80.1
 PKG_RELEASE:=1
 PKG_LICENSE:=GPL-3.0+
 PKG_MAINTAINER:=Dirk Brenken <openwrt@brenken.org>
@@ -23,26 +23,8 @@ define Package/$(PKG_NAME)
 endef
 
 define Package/$(PKG_NAME)/description
-Powerful adblock script to block ad/abuse domains
-When the dns server on your router receives dns requests, we will sort out queries that ask for the resource
-records of ad/abuse servers and return the local ip address of your router and the internal web server
-delivers a transparent pixel instead.
-
-The script supports the following domain blacklist sites:
-  https://adaway.org
-  https://disconnect.me
-  http://dshield.org
-  https://feodotracker.abuse.ch
-  http://malwaredomains.com
-  http://www.malwaredomainlist.com
-  https://palevotracker.abuse.ch
-  http://www.shallalist.de
-  http://www.spam404.com
-  http://someonewhocares.org
-  http://winhelp2002.mvps.org
-  http://pgl.yoyo.org/adservers
-  https://zeustracker.abuse.ch
-
+Powerful adblock script to block ad/abuse domains.
+Currently the script supports 15 domain blacklist sites plus manual black- and whitelist overrides.
 Please see README.md in /etc/adblock for further information.
 
 endef
@@ -67,17 +49,21 @@ define Package/$(PKG_NAME)/install
        $(INSTALL_BIN) ./files/adblock-update.sh $(1)/usr/bin/
        $(INSTALL_DATA) ./files/adblock-helper.sh $(1)/usr/bin/
 
+       $(INSTALL_DIR) $(1)/etc/hotplug.d/iface
+       $(INSTALL_BIN) ./files/adblock.hotplug $(1)/etc/hotplug.d/iface/99-adblock
+
+       $(INSTALL_DIR) $(1)/etc/init.d
+       $(INSTALL_BIN) ./files/adblock.init $(1)/etc/init.d/adblock
+
        $(INSTALL_DIR) $(1)/etc/config
        $(INSTALL_CONF) ./files/adblock.conf $(1)/etc/config/adblock
 
        $(INSTALL_DIR) $(1)/etc/adblock
+       $(INSTALL_CONF) ./files/adblock.conf $(1)/etc/adblock/adblock.conf.default
        $(INSTALL_CONF) ./files/adblock.blacklist $(1)/etc/adblock/
        $(INSTALL_CONF) ./files/adblock.whitelist $(1)/etc/adblock/
        $(INSTALL_CONF) ./files/README.md $(1)/etc/adblock/
 
-       $(INSTALL_DIR) $(1)/etc/adblock/samples
-       $(INSTALL_CONF) ./files/samples/*.sample $(1)/etc/adblock/samples/
-
        $(INSTALL_DIR) $(1)/www/adblock
        $(INSTALL_DATA) ./files/www/adblock/* $(1)/www/adblock/
 endef
index 59f2d0269b10bf340e823a2add1edb2a66124aca..88a58ef2b53e70ea7de59f5e380332f9a7773be9 100644 (file)
@@ -2,38 +2,41 @@
 
 ## Description
 A lot of people already use adblocker plugins within their desktop browsers,  
-but what if you are using your (smart) phone, tablet, watch or any other wlan gadget...  
-...getting rid of annoying ads, trackers and other abuse sites (like facebook ;-) is simple: block them with your router.  
+but what if you are using your (smart) phone, tablet, watch or any other wlan gadget...getting rid of annoying ads, trackers and other abuse sites (like facebook ;-) is simple: block them with your router.  
 
 When the dns server on your router receives dns requests, you will sort out queries that ask for the resource records of ad servers and return the local ip address of your router and the internal web server delivers a transparent pixel instead.
 
 ## Main Features
 * support of the following domain blocklist sources (free for private usage, for commercial use please check their individual licenses):
-    * [adaway.org](https://adaway.org)
+    * [adaway](https://adaway.org)
     * => infrequent updates, approx. 400 entries (enabled by default)
-    * [disconnect.me](https://disconnect.me)
+    * [disconnect](https://disconnect.me)
     * => numerous updates on the same day, approx. 6.500 entries (enabled by default)
-    * [dshield.org](http://dshield.org)
+    * [dshield](http://dshield.org)
     * => daily updates, approx. 4.500 entries
-    * [feodotracker.abuse.ch](https://feodotracker.abuse.ch)
+    * [feodotracker](https://feodotracker.abuse.ch)
     * => daily updates, approx. 0-10 entries
-    * [malwaredomains.com](http://malwaredomains.com)
+    * [malwaredomains](http://malwaredomains.com)
     * => daily updates, approx. 16.000 entries
-    * [malwaredomainlist.com](http://www.malwaredomainlist.com)
+    * [malwaredomainlist](http://www.malwaredomainlist.com)
     * => daily updates, approx. 1.500 entries
-    * [palevotracker.abuse.ch](https://palevotracker.abuse.ch)
+    * [openphish](https://openphish.com)
+    * => numerous updates on the same day, approx. 1.800 entries
+    * [palevotracker](https://palevotracker.abuse.ch)
     * => daily updates, approx. 15 entries
-    * [shallalist.de](http://www.shallalist.de) (categories "adv" "costtraps" "spyware" "tracker" "warez" enabled by default)
+    * [ruadlist+easylist](https://code.google.com/p/ruadlist)
+    * => weekly updates, approx. 2.000 entries
+    * [shallalist](http://www.shallalist.de) (categories "adv" "costtraps" "spyware" "tracker" "warez" enabled by default)
     * => daily updates, approx. 32.000 entries (a short description of all shallalist categories can be found [online](http://www.shallalist.de/categories.html))
-    * [spam404.com](http://www.spam404.com)
+    * [spam404](http://www.spam404.com)
     * => infrequent updates, approx. 5.000 entries
-    * [whocares.org](http://someonewhocares.org)
+    * [whocares](http://someonewhocares.org)
     * => weekly updates, approx. 12.000 entries
-    * [winhelp2002.mvps.org](http://winhelp2002.mvps.org)
+    * [winhelp](http://winhelp2002.mvps.org)
     * => infrequent updates, approx. 15.000 entries
-    * [yoyo.org](http://pgl.yoyo.org/adservers)
+    * [yoyo](http://pgl.yoyo.org/adservers)
     * => weekly updates, approx. 2.500 entries (enabled by default)
-    * [zeustracker.abuse.ch](https://zeustracker.abuse.ch)
+    * [zeustracker](https://zeustracker.abuse.ch)
     * => daily updates, approx. 440 entries
 * zero-conf like automatic installation & setup, usually no manual changes needed (i.e. ip address, network devices etc.)
 * full IPv4 and IPv6 support
@@ -44,9 +47,11 @@ When the dns server on your router receives dns requests, you will sort out quer
 * additional white- and blacklist support for manual overrides
 * quality checks during & after update of adblock lists to ensure a reliable dnsmasq service
 * wan update check, to wait for an active wan uplink before update
-* basic adblock statistics via iptables packet counters
+* basic adblock statistics via iptables packet counters for each chain
 * status & error logging to stdout and syslog
 * use of dynamic uhttpd instance as adblock pixel server
+* openwrt init system support (start/stop/restart/reload)
+* hotplug support, adblock start will be triggered by wan 'ifup' event
 * optional features (disabled by default):
     * adblock list backup/restore
     * debug logging to separate file
@@ -56,42 +61,55 @@ When the dns server on your router receives dns requests, you will sort out quer
 * usual openwrt setup with 'iptables' & 'uhttpd', additional required software packages:
     * wget
     * optional: 'kmod-ipt-nat6' for IPv6 support
-* the above dependencies and requirements will be checked during package installation & script runtime, please check console output or *logread -e "adblock"* for errors
+* the above dependencies and requirements will be checked during package installation & script runtime
 
-## Usage
-* install the adblock package (*opkg install adblock*)
-* optional: for an update installation please replace your existing */etc/config/adblock* with a copy of */etc/samples/adblock.conf.sample* to get the latest changes
+## Installation & Usage
+* install the adblock package (*opkg update & opkg install adblock*)
+* start the adblock service with */etc/init.d/adblock start* and check *logread -e "adblock"* for adblock related information
 * optional: enable/disable your required adblock list sources in */etc/config/adblock* - 'adaway', 'disconnect' and 'yoyo' are enabled by default
-* start */usr/bin/adblock-update.sh* and check console output or *logread -e "adblock"* for errors
+* optional: maintain the adblock service in luci under 'System => Startup'
+
+## LuCI adblock companion package
+For easy management of the various blocklist sources and and the adblock options there is also a nice & efficient LuCI frontend available.  
+Please install the package 'luci-app-adblock'. Then you will find the application in LuCI located under 'Services' menu.  
+Thanks to Hannu Nyman for this great adblock LuCI frontend!  
+
+## CC installation notes
+* currently the adblock package is *not* part of the CC package repository
+* download the latest adblock package *adblock_x.xx.x-1_all.ipk* from a DD snapshot [package directory](https://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/packages/packages)
+* manual transfer the package to your router and install the opkg package as usual
 
 ## Tweaks
 * there is no need to enable all blacklist sites at once, for normal use one to three adblock list sources should be sufficient
-* if you really need to handle all blacklists at once add an usb stick or any other storage device to supersize your /tmp directory with a swap partition
-* => see [openwrt wiki](https://wiki.openwrt.org/doc/uci/fstab) for further details
+* if you really need to handle all blacklists at once add an usb stick or any other storage device to supersize your temp directory with a swap partition => see [openwrt wiki](https://wiki.openwrt.org/doc/uci/fstab) for further details
 * add static, personal domain white- or blacklist entries, one domain per line (wildcards & regex are not allowed!), by default both lists are located in */etc/adblock*
 * enable the backup/restore feature, to restore automatically the latest, stable backup of your adblock lists in case of any processing error
 * enable the logging feature for continuous logfile writing to monitor the adblock runs over a longer period
+* for a scheduled call of the adblock service via */etc/init.d/adblock start* add an appropriate crontab entry
 
-## Distributed samples
-* all sample configuration files stored in */etc/adblock/samples*
-* for a fully blown adblock configuration with all explained options see *adblock.conf.sample*
-* for some dnsmasq tweaks see *dhcp.config.sample* and *dnsmasq.conf.sample*
-* for rc.local based autostart and /tmp resizing on the fly see *rc.local.sample*
-* for scheduled call of *adblock-update.sh* see *root.crontab.sample*
+## Further adblock config options
+* usually the adblock autodetection works quite well and no manual config overrides are needed, all options apply to 'global' adblock config section:
+    * adb\_enabled => main switch to enable/disable adblock service (default: '1' (enabled))
+    * adb\_cfgver => config version string (do not change!) - adblock checks this entry and automatically applies the current config, if none or an older revision was found.
+    * adb\_wanif => name of the logical wan interface (default: 'wan')
+    * adb\_lanif => name of the logical lan interface (default: 'lan')
+    * adb\_port => port of the adblock uhttpd instance (default: '65535')
+    * adb\_nullipv4 => IPv4 blackhole ip address (default: '192.0.2.1')
+    * adb\_nullipv6 => IPv6 blackhole ip address (default: '::ffff:c000:0201')
 
 ## Background
 This adblock package is a dns/dnsmasq based adblock solution for openwrt.  
 Queries to ad/abuse domains are never forwarded and always replied with a local IP address which may be IPv4 or IPv6.  
 For that purpose adblock uses an ip address from the private 'TEST-NET-1' subnet (192.0.2.1 / ::ffff:c000:0201) by default.  
-Furthermore all ad/abuse queries will be filtered by ip(6)tables and redirected to internal adblock pixel server (in PREROUTING chain) or rejected (in FORWARD and OUTPUT chain).  
-All iptables and uhttpd related adblock additions are non-destructive, no hard-coded changes in 'firewall.user', 'uhttpd' config or any other openwrt related config files.
+Furthermore all ad/abuse queries will be filtered by ip(6)tables and redirected to internal adblock pixel server (in PREROUTING chain) or rejected (in FORWARD or OUTPUT chain).  
+All iptables and uhttpd related adblock additions are non-destructive, no hard-coded changes in 'firewall.user', 'uhttpd' config or any other openwrt related config files. There is *no* adblock background daemon running, the (scheduled) start of the adblock service keeps only the adblock lists up-to-date.
+
+## Support
+Please join the adblock discussion in this [openwrt forum thread](https://forum.openwrt.org/viewtopic.php?id=59803) or contact me by mail <openwrt@brenken.org>
 
 ## Removal
-* remove the adblock package (*opkg remove adblock*)
-* remove all script generated adblock lists in */tmp/dnsmasq.d/*
-* kill the running adblock uhttpd instance (ps | grep "[u]httpd.*\-h /www/adblock")
-* run /etc/init.d/dnsmasq restart
-* run /etc/init.d/firewall restart
+* stop all adblock related services with */etc/init.d/adblock stop*
+* optional: remove the adblock package (*opkg remove adblock*)
 
 Have fun!  
 Dirk  
index 5a98f0e01adede823efb4b6036de56f2443b6c17..faccc9640d277b0031af0d90cc426e1529409203 100644 (file)
@@ -9,6 +9,31 @@
 #
 f_envload()
 {
+    local cfg_version
+
+    # get version string from default adblock configuration file
+    #
+    cfg_version="$(/sbin/uci -q get adblock.global.adb_cfgver 2>/dev/null)"
+    cfg_enabled="$(/sbin/uci -q get adblock.global.adb_enabled 2>/dev/null)"
+    rc=$?
+    if [ $((rc)) -ne 0 ] || [ "${cfg_version}" != "${adb_scriptver%.*}" ]
+    then
+        cp -pf "/etc/adblock/adblock.conf.default" "/etc/config/adblock" >/dev/null 2>&1
+        rc=$?
+        if [ $((rc)) -eq 0 ]
+        then
+            f_log "new default adblock configuration applied, please check your settings in '/etc/config/adblock'"
+        else
+            f_log "original adblock configuration not found, please (re-)install the adblock package via 'opkg install adblock --force-maintainer'" "${rc}"
+            f_exit
+        fi
+    elif [ $((rc)) -eq 0 ] && [ $((cfg_enabled)) -ne 1 ]
+    then
+        rc=-1
+        f_log "adblock is currently disabled, please run 'uci set adblock.global.adb_enabled=1' and 'uci commit adblock' to enable this service"
+        f_exit
+    fi
+
     # source in openwrt function library
     #
     if [ -r "/lib/functions.sh" ]
@@ -31,8 +56,14 @@ f_envload()
         f_exit
     fi
 
-    # get list with all installed openwrt packages
+    # check opkg availability and get list with all installed openwrt packages
     #
+    if [ -r "/var/lock/opkg.lock" ]
+    then
+        rc=-1
+        f_log "adblock installation finished, 'opkg' currently locked by package installer"
+        f_exit
+    fi
     pkg_list="$(opkg list-installed 2>/dev/null)"
     if [ -z "${pkg_list}" ]
     then
@@ -55,13 +86,10 @@ f_envparse()
     adb_port="65535"
     adb_nullipv4="192.0.2.1"
     adb_nullipv6="::ffff:c000:0201"
-    adb_maxtime="60"
-    adb_maxloop="20"
     adb_blacklist="/etc/adblock/adblock.blacklist"
     adb_whitelist="/etc/adblock/adblock.whitelist"
 
-    # function to read/set global options by callback,
-    # prepare list items and build option list for all others
+    # function to read global options by callback
     #
     config_cb()
     {
@@ -76,45 +104,39 @@ f_envparse()
                 eval "${option}=\"${value}\""
             }
         else
-            option_cb()
-            {
-                local option="${1}"
-                local value="${2}"
-                local opt_out="$(printf "${option}" | sed -n '/.*_ITEM[0-9]$/p; /.*_LENGTH$/p; /enabled/p' 2>/dev/null)"
-                if [ -z "${opt_out}" ]
-                then
-                    all_options="${all_options} ${option}"
-                fi
-            }
-            list_cb()
-            {
-                local list="${1}"
-                local value="${2}"
-                if [ "${list}" = "adb_catlist" ]
-                then
-                    adb_cat_shalla="${adb_cat_shalla} ${value}"
-                fi
-            }
+            reset_cb
         fi
     }
 
-    # function to iterate through option list, read/set all options in "enabled" sections
+    # function to iterate through config list, read only options in "enabled" sections
     #
+    adb_cfglist="adb_backupdir adb_logfile adb_src"
+    unset adb_sources
     parse_config()
     {
         local config="${1}"
         config_get switch "${config}" "enabled"
         if [ "${switch}" = "1" ]
         then
-            for option in ${all_options}
+            for option in ${adb_cfglist}
             do
                 config_get value "${config}" "${option}"
                 if [ -n "${value}" ]
                 then
-                    local opt_src="$(printf "${option}" | sed -n '/^adb_src_[a-z0-9]*$/p' 2>/dev/null)"
-                    if [ -n "${opt_src}" ]
+                    if [ "${option}" = "adb_src" ]
                     then
-                        adb_sources="${adb_sources} ${value}"
+                        if [ "${config}" = "shalla" ]
+                        then
+                            categories()
+                            {
+                                local cat="${1}"
+                                adb_cat_shalla="${adb_cat_shalla} ${cat}"
+                            }
+                            eval "adb_arc_shalla=\"${value}\""
+                            config_list_foreach "shalla" "adb_catlist" "categories"
+                        else
+                            adb_sources="${adb_sources} ${value}"
+                        fi
                     else
                         eval "${option}=\"${value}\""
                     fi
@@ -144,13 +166,15 @@ f_envparse()
     adb_prechain_ipv6="PREROUTING"
     adb_fwdchain_ipv6="forwarding_rule"
     adb_outchain_ipv6="output_rule"
+    adb_fetch="/usr/bin/wget"
     unset adb_srclist
     unset adb_revsrclist
+    unset adb_errsrclist
 
     # set adblock source ruleset definitions
     #
     rset_start="sed -r 's/[[:space:]]|[\[!#/:;_].*|[0-9\.]*localhost.*//g; s/[\^#/:;_\.\t ]*$//g'"
-    rset_end="sed '/^[#/:;_\s]*$/d'"
+    rset_end="tr -cd '[0-9a-z\.\-]\n' | sed -r 's/^[ \.\-].*$|^[a-z0-9]*[ \.\-]*$//g; /^[#/:;_\s]*$/d'"
     rset_adaway="${rset_start} | sed 's/\([0-9]\{1,3\}\.\)\{3\}[0-1]\{1,1\}//g' | ${rset_end}"
     rset_blacklist="${rset_start} | ${rset_end}"
     rset_disconnect="${rset_start} | ${rset_end}"
@@ -158,7 +182,9 @@ f_envparse()
     rset_feodo="${rset_start} | ${rset_end}"
     rset_malware="${rset_start} | ${rset_end}"
     rset_malwarelist="${rset_start} | sed 's/\([0-9]\{1,3\}\.\)\{3\}[0-1]\{1,1\}//g' | ${rset_end}"
+    rset_openphish="sed -e 's|^[^/]*//||' -e 's|/.*$||'"
     rset_palevo="${rset_start} | ${rset_end}"
+    rset_ruadlist="sed -e '/^\|\|/! s/.*//; /\^$/! s/.*//; s/\^$//g; /[\.]/! s/.*//; s/^[\|]\{1,2\}//g' | ${rset_end}"
     rset_shalla="${rset_start} | sed 's/\([0-9]\{1,3\}\.\)\{3\}[0-9]\{1,3\}$//g' | ${rset_end}"
     rset_spam404="${rset_start} | sed 's/^\|\|//g' | ${rset_end}"
     rset_whocares="${rset_start} | sed 's/\([0-9]\{1,3\}\.\)\{3\}[0-1]\{1,1\}//g' | ${rset_end}"
@@ -168,32 +194,23 @@ f_envparse()
 
     # get logical wan update interfaces (with default route) and their device names
     #
-    while [ $((adb_cnt)) -le $((adb_maxloop)) ]
-    do
-        network_find_wan adb_wanif4 2>/dev/null
-        network_find_wan6 adb_wanif6 2>/dev/null
-        if [ -z "${adb_wanif4}" ] && [ -z "${adb_wanif6}" ]
-        then
-            network_flush_cache
-        elif [ "${adb_wanif4}" = "${adb_lanif}" ] || [ "${adb_wanif6}" = "${adb_lanif}" ]
-        then
-            rc=125
-            f_log "LAN only (${adb_lanif}) network, no valid IPv4/IPv6 wan update interface found" "${rc}"
-            f_exit
-        else
-            network_get_device adb_wandev4 "${adb_wanif4}" 2>/dev/null
-            network_get_device adb_wandev6 "${adb_wanif6}" 2>/dev/null
-            break
-        fi
-        if [ $((adb_cnt)) -ge $((adb_maxloop)) ]
-        then
-            rc=125
-            f_log "no valid IPv4/IPv6 wan update interface found" "${rc}"
-            f_exit
-        fi
-        adb_cnt=$((adb_cnt + 1))
-        sleep 1
-    done
+    network_find_wan adb_wanif4 2>/dev/null
+    network_find_wan6 adb_wanif6 2>/dev/null
+    if [ -z "${adb_wanif4}" ] && [ -z "${adb_wanif6}" ]
+    then
+        rc=125
+        f_log "no valid IPv4/IPv6 wan update interface found" "${rc}"
+        f_exit
+    elif [ "${adb_wanif4}" = "${adb_lanif}" ] || [ "${adb_wanif6}" = "${adb_lanif}" ]
+    then
+        rc=125
+        f_log "LAN only (${adb_lanif}) network, no valid IPv4/IPv6 wan update interface found" "${rc}"
+        f_exit
+    else
+        network_get_device adb_wandev4 "${adb_wanif4}" 2>/dev/null
+        network_get_device adb_wandev6 "${adb_wanif6}" 2>/dev/null
+        break
+    fi
 
     # get lan ip addresses
     #
@@ -205,10 +222,6 @@ f_envparse()
         f_log "no valid IPv4/IPv6 configuration for given logical LAN interface found (${adb_lanif}), please set 'adb_lanif' manually" "${rc}"
         f_exit
     fi
-
-    # read system ntp server names
-    #
-    adb_ntpsrv="$(uci get system.ntp.server 2>/dev/null)"
 }
 
 #################################################
@@ -216,6 +229,8 @@ f_envparse()
 #
 f_envcheck()
 {
+    local check
+
     # check general package dependencies
     #
     f_depend "uhttpd"
@@ -244,12 +259,11 @@ f_envcheck()
 
     # check ca-certificates package and set wget parms accordingly
     #
+    wget_parm="--no-config --quiet --tries=1 --no-cache --no-cookies --max-redirect=0 --dns-timeout=5 --connect-timeout=5 --read-timeout=5"
     check="$(printf "${pkg_list}" | grep "^ca-certificates -" 2>/dev/null)"
     if [ -z "${check}" ]
     then
-        wget_parm="--no-config --no-check-certificate --quiet --tries=1 --no-cache --no-cookies --max-redirect=0"
-    else
-        wget_parm="--no-config --quiet --tries=1 --no-cache --no-cookies --max-redirect=0"
+        wget_parm="${wget_parm} --no-check-certificate"
     fi
 
     # check adblock blacklist/whitelist configuration
@@ -283,16 +297,15 @@ f_envcheck()
         f_exit
     fi
 
-    # check total and swap memory
+    # memory check
     #
-    mem_total="$(grep -F "MemTotal" "/proc/meminfo" 2>/dev/null | grep -o "[0-9]*" 2>/dev/null)"
-    mem_free="$(grep -F "MemFree" "/proc/meminfo" 2>/dev/null | grep -o "[0-9]*" 2>/dev/null)"
-    swap_total="$(grep -F "SwapTotal" "/proc/meminfo" 2>/dev/null | grep -o "[0-9]*" 2>/dev/null)"
-    if [ $((mem_total)) -le 64000 ] && [ $((swap_total)) -eq 0 ]
+    mem_total="$(awk '$1 ~ /^MemTotal/ {print $2}' "/proc/meminfo" 2>/dev/null)"
+    mem_free="$(awk '$1 ~ /^MemFree/ {print $2}' "/proc/meminfo" 2>/dev/null)"
+    mem_swap="$(awk '$1 ~ /^SwapTotal/ {print $2}' "/proc/meminfo" 2>/dev/null)"
+    if [ $((mem_total)) -le 64000 ] && [ $((mem_swap)) -eq 0 ]
     then
         adb_unique=0
-        f_log "not enough memory, overall sort/unique processing will be disabled"
-        f_log "please consider adding an external swap device to supersize your temp directory (total: ${mem_total}, free: ${mem_free}, swap: ${mem_swap})"
+        f_log "not enough memory, overall sort processing will be disabled (total: ${mem_total}, free: ${mem_free}, swap: ${mem_swap})"
     fi
 
     # check backup configuration
@@ -302,7 +315,7 @@ f_envcheck()
         f_space "${adb_backupdir}"
         if [ "${space_ok}" = "false" ]
         then
-            f_log "backup/restore will be disabled"
+            f_log "not enough space in '${adb_backupdir}', backup/restore will be disabled"
             backup_ok="false"
         else
             f_log "backup/restore will be enabled"
@@ -334,24 +347,34 @@ f_envcheck()
 
     # check ipv4/iptables configuration
     #
-    if [ -n "${adb_wanif4}" ]
+    if [ -n "${adb_wanif4}" ] && [ -n "${adb_wandev4}" ]
     then
-        f_firewall "IPv4" "nat" "A" "${adb_prechain_ipv4}" "adblock-pre" "-p tcp -d ${adb_nullipv4} --dport 80 -j REDIRECT --to-ports ${adb_port}"
-        f_firewall "IPv4" "nat" "A" "${adb_prechain_ipv4}" "adblock-dns" "-p udp --dport 53 -j REDIRECT"
-        f_firewall "IPv4" "nat" "A" "${adb_prechain_ipv4}" "adblock-dns" "-p tcp --dport 53 -j REDIRECT"
-        f_firewall "IPv4" "filter" "A" "${adb_fwdchain_ipv4}" "adblock-fwd" "-d ${adb_nullipv4} -j REJECT"
-        f_firewall "IPv4" "filter" "A" "${adb_outchain_ipv4}" "adblock-out" "-d ${adb_nullipv4} -j REJECT"
+        f_firewall "IPv4" "nat" "A" "${adb_prechain_ipv4}" "adb-prerouting" "! -i ${adb_wandev4} -p tcp -d ${adb_nullipv4} -m multiport --dports 80,443 -j REDIRECT --to-ports ${adb_port}"
+        f_firewall "IPv4" "nat" "A" "${adb_prechain_ipv4}" "adb-dns" "! -i ${adb_wandev4} -p udp --dport 53 -j REDIRECT"
+        f_firewall "IPv4" "nat" "A" "${adb_prechain_ipv4}" "adb-dns" "! -i ${adb_wandev4} -p tcp --dport 53 -j REDIRECT"
+        f_firewall "IPv4" "filter" "A" "${adb_fwdchain_ipv4}" "adb-forward" "! -i ${adb_wandev4} -d ${adb_nullipv4} -j REJECT --reject-with icmp-host-unreachable"
+        f_firewall "IPv4" "filter" "A" "${adb_outchain_ipv4}" "adb-output" "! -i ${adb_wandev4} -d ${adb_nullipv4} -j REJECT --reject-with icmp-host-unreachable"
+        if [ "${fw_done}" = "true" ]
+        then
+            f_log "created volatile IPv4 firewall ruleset"
+            fw_done="false"
+        fi
     fi
 
     # check ipv6/ip6tables configuration
     #
-    if [ -n "${adb_wanif6}" ]
+    if [ -n "${adb_wanif6}" ] && [ -n "${adb_wandev6}" ]
     then
-        f_firewall "IPv6" "nat" "A" "${adb_prechain_ipv6}" "adblock-pre" "-p tcp -d ${adb_nullipv6} --dport 80 -j REDIRECT --to-ports ${adb_port}"
-        f_firewall "IPv6" "nat" "A" "${adb_prechain_ipv6}" "adblock-dns" "-p udp --dport 53 -j REDIRECT"
-        f_firewall "IPv6" "nat" "A" "${adb_prechain_ipv6}" "adblock-dns" "-p tcp --dport 53 -j REDIRECT"
-        f_firewall "IPv6" "filter" "A" "${adb_fwdchain_ipv6}" "adblock-fwd" "-d ${adb_nullipv6} -j REJECT"
-        f_firewall "IPv6" "filter" "A" "${adb_outchain_ipv6}" "adblock-out" "-d ${adb_nullipv6} -j REJECT"
+        f_firewall "IPv6" "nat" "A" "${adb_prechain_ipv6}" "adb-prerouting" "! -i ${adb_wandev6} -p tcp -d ${adb_nullipv6} -m multiport --dports 80,443 -j REDIRECT --to-ports ${adb_port}"
+        f_firewall "IPv6" "nat" "A" "${adb_prechain_ipv6}" "adb-dns" "! -i ${adb_wandev6} -p udp --dport 53 -j REDIRECT"
+        f_firewall "IPv6" "nat" "A" "${adb_prechain_ipv6}" "adb-dns" "! -i ${adb_wandev6} -p tcp --dport 53 -j REDIRECT"
+        f_firewall "IPv6" "filter" "A" "${adb_fwdchain_ipv6}" "adb-forward" "! -i ${adb_wandev6} -d ${adb_nullipv6} -j REJECT --reject-with icmp6-addr-unreachable"
+        f_firewall "IPv6" "filter" "A" "${adb_outchain_ipv6}" "adb-output" "! -i ${adb_wandev6} -d ${adb_nullipv6} -j REJECT --reject-with icmp6-addr-unreachable"
+        if [ "${fw_done}" = "true" ]
+        then
+            f_log "created volatile IPv6 firewall ruleset"
+            fw_done="false"
+        fi
     fi
 
     # check volatile adblock uhttpd instance configuration
@@ -361,7 +384,7 @@ f_envcheck()
     then
         if [ -n "${adb_wanif4}" ] && [ -n "${adb_wanif6}" ]
         then
-            uhttpd -h "/www/adblock" -k 0 -N 100 -T 5 -D -E "/adblock.html" -p "${adb_ipv4}:${adb_port}" -p "[${adb_ipv6}]:${adb_port}">/dev/null 2>&1
+            uhttpd -h "/www/adblock" -k 5 -N 200 -t 0 -T 1 -D -S -E "/adblock.html" -p "${adb_ipv4}:${adb_port}" -p "[${adb_ipv6}]:${adb_port}">/dev/null 2>&1
             rc=${?}
             if [ $((rc)) -eq 0 ]
             then
@@ -372,7 +395,7 @@ f_envcheck()
             fi
         elif [ -n "${adb_wanif4}" ]
         then
-            uhttpd -h "/www/adblock" -k 0 -N 100 -T 5 -D -E "/adblock.html" -p "${adb_ipv4}:${adb_port}" >/dev/null 2>&1
+            uhttpd -h "/www/adblock" -k 5 -N 200 -t 0 -T 1 -D -S -E "/adblock.html" -p "${adb_ipv4}:${adb_port}" >/dev/null 2>&1
             rc=${?}
             if [ $((rc)) -eq 0 ]
             then
@@ -383,7 +406,7 @@ f_envcheck()
             fi
         elif [ -n "${adb_wanif6}" ]
         then
-            uhttpd -h "/www/adblock" -k 0 -N 100 -T 5 -D -E "/adblock.html" -p "[${adb_ipv6}]:${adb_port}" >/dev/null 2>&1
+            uhttpd -h "/www/adblock" -k 5 -N 200 -t 0 -T 1 -D -S -E "/adblock.html" -p "[${adb_ipv6}]:${adb_port}" >/dev/null 2>&1
             rc=${?}
             if [ $((rc)) -eq 0 ]
             then
@@ -395,64 +418,6 @@ f_envcheck()
         fi
     fi
 
-    # wait for active wan update interface
-    #
-    while [ $((adb_cnt)) -le $((adb_maxloop)) ]
-    do
-        for interface in ${adb_wanif}
-        do
-            network_get_device adb_wandev "${interface}" 2>/dev/null
-            if [ -z "${adb_wandev}" ] || [ ! -d "/sys/class/net/${adb_wandev}" ]
-            then
-                if [ -n "${adb_wandev4}" ]
-                then
-                    adb_wandev="${adb_wandev4}"
-                else
-                    adb_wandev="${adb_wandev6}"
-                fi
-                if [ -z "${adb_wandev}" ] || [ ! -d "/sys/class/net/${adb_wandev}" ]
-                then
-                    rc=145
-                    f_log "no valid network device for given logical WAN interface found, please set 'adb_wanif' manually" "${rc}"
-                    f_restore
-                fi
-            fi
-            check="$(cat /sys/class/net/${adb_wandev}/operstate 2>/dev/null)"
-            if [ "${check}" = "up" ]
-            then
-                f_log "get active wan update interface/device (${adb_wanif}/${adb_wandev})"
-                break 2
-            elif [ $((adb_cnt)) -eq $((adb_maxloop)) ]
-            then
-                rc=145
-                f_log "wan update interface/device not running (${adb_wanif}/${adb_wandev})" "${rc}"
-                f_restore
-            fi
-            adb_cnt=$((adb_cnt + 1))
-            sleep 1
-        done
-    done
-
-    # wait for ntp sync
-    #
-    if [ -n "${adb_ntpsrv}" ]
-    then
-        unset ntp_pool
-        for srv in ${adb_ntpsrv}
-        do
-            ntp_pool="${ntp_pool} -p ${srv}"
-        done
-        /usr/sbin/ntpd -nq ${ntp_pool} >/dev/null 2>&1
-        rc=${?}
-        if [ $((rc)) -eq 0 ]
-        then
-            f_log "get ntp time sync"
-        else
-            rc=0
-            f_log "ntp time sync failed"
-        fi
-    fi
-
     # set dnsmasq defaults
     #
     if [ -n "${adb_wanif4}" ] && [ -n "${adb_wanif6}" ]
@@ -476,6 +441,7 @@ f_envcheck()
 #
 f_depend()
 {
+    local check
     local package="${1}"
 
     check="$(printf "${pkg_list}" | grep "^${package} -" 2>/dev/null)"
@@ -520,9 +486,9 @@ f_firewall()
         rc=${?}
         if [ $((rc)) -eq 0 ]
         then
-            f_log "created volatile ${proto} firewall rule in '${chain}' chain (${notes})"
+            fw_done="true"
         else
-            f_log "failed to initialize volatile ${proto} firewall rule in '${chain}' chain (${notes})" "${rc}"
+            f_log "failed to initialize volatile ${proto} firewall rule '${notes}'" "${rc}"
             f_restore
         fi
     fi
@@ -533,28 +499,32 @@ f_firewall()
 #
 f_log()
 {
+    local log_parm
     local log_msg="${1}"
     local log_rc="${2}"
     local class="info "
 
+    # check for terminal session
+    #
+    if [ -t 1 ]
+    then
+        log_parm="-s"
+    fi
+
     # log to different output devices, set log class accordingly
     #
     if [ -n "${log_msg}" ]
     then
-        if [ $((log_rc)) -ne 0 ]
+        if [ $((log_rc)) -gt 0 ]
         then
             class="error"
             log_rc=", rc: ${log_rc}"
             log_msg="${log_msg}${log_rc}"
         fi
-        /usr/bin/logger -t "adblock[${pid}] ${class}" "${log_msg}"
-        if [ -t 1 ]
-        then
-            printf "%s\n" "adblock[${pid}] ${class}: ${log_msg}"
-        fi
+        /usr/bin/logger ${log_parm} -t "adblock[${adb_pid}] ${class}" "${log_msg}"
         if [ "${log_ok}" = "true" ]
         then
-            printf "%s\n" "$(/bin/date "+%d.%m.%Y %H:%M:%S") adblock[${pid}] ${class}: ${log_msg}" >> "${adb_logfile}"
+            printf "%s\n" "$(/bin/date "+%d.%m.%Y %H:%M:%S") adblock[${adb_pid}] ${class}: ${log_msg}" >> "${adb_logfile}"
         fi
     fi
 }
@@ -570,30 +540,9 @@ f_space()
     #
     if [ -d "${mp}" ]
     then
-        df "${mp}" 2>/dev/null |\
-        tail -n1 2>/dev/null |\
-        while read filesystem overall used available scrap
-        do
-            av_space="${available}"
-            if [ $((av_space)) -eq 0 ]
-            then
-                rc=155
-                f_log "no space left on device/not mounted (${mp})"
-                exit ${rc}
-            elif [ $((av_space)) -lt $((adb_minspace)) ]
-            then
-                rc=155
-                f_log "not enough space left on device (${mp})"
-                exit ${rc}
-            fi
-        done
-
-        # subshell return code handling, set space trigger accordingly
-        #
-        rc=${?}
-        if [ $((rc)) -ne 0 ]
+        av_space="$(df "${mp}" 2>/dev/null | tail -n1 2>/dev/null | awk '{print $4}')"
+        if [ $((av_space)) -lt $((adb_minspace)) ]
         then
-            rc=0
             space_ok="false"
         fi
     fi
@@ -604,49 +553,46 @@ f_space()
 #
 f_restore()
 {
-    local removal_done
+    local rm_done
     local restore_done
 
     # remove bogus adblock lists
     #
     if [ -n "${adb_revsrclist}" ]
     then
-        find "${adb_dnsdir}" -maxdepth 1 -type f \( ${adb_revsrclist} \) -exec rm -f "{}" \; 2>/dev/null
+        rm_done="$(find "${adb_dnsdir}" -maxdepth 1 -type f \( ${adb_revsrclist} \) -print -exec rm -f "{}" \; 2>/dev/null)"
         rc=${?}
-        if [ $((rc)) -ne 0 ]
+        if [ $((rc)) -eq 0 ] && [ -n "${rm_done}" ]
+        then
+            f_log "all bogus adblock lists removed"
+        elif [ $((rc)) -ne 0 ]
         then
             f_log "error during removal of bogus adblock lists" "${rc}"
             f_exit
-        else
-            removal_done="true"
-            f_log "all bogus adblock lists removed"
         fi
     fi
 
     # restore backups
     #
-    if [ "${backup_ok}" = "true" ] && [ -d "${adb_backupdir}" ] && [ "$(printf "${adb_backupdir}/${adb_dnsprefix}."*)" != "${adb_backupdir}/${adb_dnsprefix}.*" ]
+    if [ "${backup_ok}" = "true" ] && [ "$(printf "${adb_backupdir}/${adb_dnsprefix}."*)" != "${adb_backupdir}/${adb_dnsprefix}.*" ]
     then
-        for file in ${adb_backupdir}/${adb_dnsprefix}.*
-        do
-            filename="${file##*/}"
-            cp -pf "${file}" "${adb_dnsdir}" 2>/dev/null
-            rc=${?}
-            if [ $((rc)) -ne 0 ]
-            then
-                f_log "error during restore of adblock list (${filename})" "${rc}"
-                f_exit
-            fi
-            restore_done="true"
-        done
-        f_log "all available backups restored"
+        restore_done="$(find "${adb_backupdir}" -maxdepth 1 -type f -name "${adb_dnsprefix}.*" -print -exec cp -pf "{}" "${adb_dnsdir}" \; 2>/dev/null)"
+        rc=${?}
+        if [ $((rc)) -eq 0 ] && [ -n "${restore_done}" ]
+        then
+            f_log "all available backups restored"
+        elif [ $((rc)) -ne 0 ]
+        then
+            f_log "error during restore of adblock lists" "${rc}"
+            f_exit
+        fi
     else
         f_log "no backups found, nothing to restore"
     fi
 
     # (re-)try dnsmasq restart without bogus adblock lists / with backups 
     #
-    if [ "${restore_done}" = "true" ] || [ "${removal_done}" = "true" ]
+    if [ -n "${restore_done}" ] || [ -n "${rm_done}" ]
     then
         /etc/init.d/dnsmasq restart >/dev/null 2>&1
         sleep 2
@@ -701,15 +647,15 @@ f_exit()
     then
         if [ -n "${adb_wanif4}" ]
         then
-            ipv4_prerouting="$(${iptv4} -t nat -vnL | grep -F "adblock-pre" | grep -Eo "[0-9]+" | head -n1)"
-            ipv4_forward="$(${iptv4} -vnL | grep -F "adblock-fwd" | grep -Eo "[0-9]+" | head -n1)"
-            ipv4_output="$(${iptv4} -vnL | grep -F "adblock-out" | grep -Eo "[0-9]+" | head -n1)"
+            ipv4_prerouting="$(${iptv4} -t nat -vnL | awk '$11 ~ /^adb-prerouting$/ {sum += $1} END {print sum}')"
+            ipv4_forward="$(${iptv4} -vnL | awk '$11 ~ /^adb-forward$/ {sum += $1} END {print sum}')"
+            ipv4_output="$(${iptv4} -vnL | awk '$11 ~ /^adb-output$/ {sum += $1} END {print sum}')"
         fi
         if [ -n "${adb_wanif6}" ]
         then
-            ipv6_prerouting="$(${iptv6} -t nat -vnL | grep -F "adblock-pre" | grep -Eo "[0-9]+" | head -n1)"
-            ipv6_forward="$(${iptv6} -vnL | grep -F "adblock-fwd" | grep -Eo "[0-9]+" | head -n1)"
-            ipv6_output="$(${iptv6} -vnL | grep -F "adblock-out" | grep -Eo "[0-9]+" | head -n1)"
+            ipv6_prerouting="$(${iptv6} -t nat -vnL | awk '$10 ~ /^adb-prerouting$/ {sum += $1} END {print sum}')"
+            ipv6_forward="$(${iptv6} -vnL | awk '$10 ~ /^adb-forward$/ {sum += $1} END {print sum}')"
+            ipv6_output="$(${iptv6} -vnL | awk '$10 ~ /^adb-output$/ {sum += $1} END {print sum}')"
         fi
         if [ -n "${adb_wanif4}" ] && [ -n "${adb_wanif6}" ]
         then
@@ -729,9 +675,13 @@ f_exit()
             f_log "${ipv6_forward} packets rejected in FORWARD chain"
             f_log "${ipv6_output} packets rejected in OUTPUT chain"
         fi
-        f_log "domain adblock processing finished successfully (${adb_version}, ${openwrt_version}, $(/bin/date "+%d.%m.%Y %H:%M:%S"))"
+        f_log "domain adblock processing finished successfully (${adb_scriptver}, ${openwrt_version}, $(/bin/date "+%d.%m.%Y %H:%M:%S"))"
+    elif [ $((rc)) -gt 0 ]
+    then
+        f_log "domain adblock processing failed (${adb_scriptver}, ${openwrt_version}, $(/bin/date "+%d.%m.%Y %H:%M:%S"))"
     else
-        f_log "domain adblock processing failed (${adb_version}, ${openwrt_version}, $(/bin/date "+%d.%m.%Y %H:%M:%S"))"
+        rc=0
     fi
+    rm -f "${adb_pidfile}" >/dev/null 2>&1
     exit ${rc}
 }
index bd425d73e39d1670e1dc20ca2c13138d56784349..2fec96d746a8e072eefa97856a6c3d3d713c06a8 100755 (executable)
 #
 LC_ALL=C
 
-# set script version
+# pid handling
 #
-adb_version="0.60.1"
+adb_pid="${$}"
+adb_pidfile="/var/run/adblock.pid"
 
-# get current pid, script directory and openwrt version
+if [ -r "${adb_pidfile}" ]
+then
+    rc=255
+    /usr/bin/logger -t "adblock[${adb_pid}] error" "adblock service already running ($(cat ${adb_pidfile} 2>/dev/null))"
+    exit ${rc}
+else
+    printf "${adb_pid}" > "${adb_pidfile}"
+fi
+
+# get current directory, script- and openwrt version
 #
-pid=${$}
 adb_scriptdir="${0%/*}"
+adb_scriptver="0.80.1"
 openwrt_version="$(cat /etc/openwrt_version 2>/dev/null)"
 
 # source in adblock function library
@@ -44,8 +54,8 @@ if [ -r "${adb_scriptdir}/adblock-helper.sh" ]
 then
     . "${adb_scriptdir}/adblock-helper.sh" 2>/dev/null
 else
-    rc=100
-    /usr/bin/logger -s -t "adblock[${pid}] error" "adblock function library not found, rc: ${rc}"
+    rc=254
+    /usr/bin/logger -t "adblock[${adb_pid}] error" "adblock function library not found"
     exit ${rc}
 fi
 
@@ -53,18 +63,18 @@ fi
 # main program #
 ################
 
-# call exit function on trap signals (HUP, INT, QUIT, BUS, SEGV, TERM)
-#
-trap "rc=255; f_log 'error signal received/trapped' '${rc}'; f_exit" 1 2 3 10 11 15
-
-# start logging
+# call trap function on error signals (HUP, INT, QUIT, BUS, SEGV, TERM)
 #
-f_log "domain adblock processing started (${adb_version}, ${openwrt_version}, $(/bin/date "+%d.%m.%Y %H:%M:%S"))"
+trap "rc=253; f_log 'error signal received/trapped' '${rc}'; f_exit" 1 2 3 10 11 15
 
 # load environment
 #
 f_envload
 
+# start logging
+#
+f_log "domain adblock processing started (${adb_scriptver}, ${openwrt_version}, $(/bin/date "+%d.%m.%Y %H:%M:%S"))"
+
 # parse environment
 #
 f_envparse
@@ -90,7 +100,7 @@ then
     # only process shallalist archive with updated timestamp,
     # extract and merge only domains of selected shallalist categories
     #
-    shalla_time="$(wget ${wget_parm} --timeout=5 --server-response --spider "${adb_arc_shalla}" 2>&1 | grep -F "Last-Modified: " 2>/dev/null | tr -d '\r' 2>/dev/null)"
+    shalla_time="$(${adb_fetch} ${wget_parm} --server-response --spider "${adb_arc_shalla}" 2>&1 | grep -F "Last-Modified: " 2>/dev/null | tr -d '\r' 2>/dev/null)"
     shalla_time="${shalla_time/*: /}"
     if [ -z "${shalla_time}" ]
     then
@@ -99,7 +109,7 @@ then
     fi
     if [ -z "${list_time}" ] || [ "${list_time}" != "${shalla_time}" ]
     then
-        wget ${wget_parm} --timeout="${adb_maxtime}" --output-document="${shalla_archive}" "${adb_arc_shalla}" 2>/dev/null
+        ${adb_fetch} ${wget_parm} --output-document="${shalla_archive}" "${adb_arc_shalla}" 2>/dev/null
         rc=${?}
         if [ $((rc)) -eq 0 ]
         then
@@ -127,8 +137,9 @@ then
                 rc=0
             fi
         else
-            f_log "   source archive download failed"
             rc=0
+            adb_errsrclist="-name ${adb_dnsprefix}.${src_name}"
+            f_log "   source archive download failed"
         fi
     else
         adb_srclist="! -name ${adb_dnsprefix}.${src_name}"
@@ -173,7 +184,7 @@ do
     then
         url_time="${shalla_time}"
     else
-        url_time="$(wget ${wget_parm} --timeout=5 --server-response --spider "${url}" 2>&1 | grep -F "Last-Modified: " 2>/dev/null | tr -d '\r' 2>/dev/null)"
+        url_time="$(${adb_fetch} ${wget_parm} --server-response --spider "${url}" 2>&1 | grep -F "Last-Modified: " 2>/dev/null | tr -d '\r' 2>/dev/null)"
         url_time="${url_time/*: /}"
     fi
     if [ -z "${url_time}" ]
@@ -192,7 +203,7 @@ do
             tmp_domains="$(cat "${shalla_file}" 2>/dev/null)"
             rc=${?}
         else
-            tmp_domains="$(wget ${wget_parm} --timeout="${adb_maxtime}" --output-document=- "${url}" 2>/dev/null)"
+            tmp_domains="$(${adb_fetch} ${wget_parm} --output-document=- "${url}" 2>/dev/null)"
             rc=${?}
         fi
     else
@@ -218,6 +229,12 @@ do
         continue
     else
         rc=0
+        if [ -z "${adb_errsrclist}" ]
+        then
+            adb_errsrclist="-name ${adb_dnsprefix}.${src_name}"
+        else
+            adb_errsrclist="${adb_errsrclist} -o -name ${adb_dnsprefix}.${src_name}"
+        fi
         f_log "   source download failed"
         continue
     fi
@@ -256,7 +273,7 @@ do
                 count="$(wc -l < "${adb_dnsdir}/${adb_dnsprefix}.${src_name}")"
             fi
             printf "%s\n" "#------------------------------------------------------------------" >> "${adb_dnsfile}"
-            printf "%s\n" "# ${0##*/} (${adb_version}) - ${count} ad/abuse domains blocked" >> "${adb_dnsfile}"
+            printf "%s\n" "# ${0##*/} (${adb_scriptver}) - ${count} ad/abuse domains blocked" >> "${adb_dnsfile}"
             printf "%s\n" "# source: ${url}" >> "${adb_dnsfile}"
             printf "%s\n" "# last modified: ${url_time}" >> "${adb_dnsfile}"
             f_log "   domain merging finished"
@@ -270,36 +287,72 @@ do
     fi
 done
 
-# remove old adblock lists and their backups
+# remove disabled adblock lists and their backups
 #
 if [ -n "${adb_srclist}" ]
 then
-    adb_rmfind="$(find "${adb_dnsdir}" -maxdepth 1 -type f -name "${adb_dnsprefix}.*" \( ${adb_srclist} \) -print -exec rm -f "{}" \; 2>/dev/null)"
-    if [ $((rc)) -eq 0 ] && [ -n "${adb_rmfind}" ]
+    rm_done="$(find "${adb_dnsdir}" -maxdepth 1 -type f -name "${adb_dnsprefix}.*" \( ${adb_srclist} \) -print -exec rm -f "{}" \; 2>/dev/null)"
+    rc=${?}
+    if [ $((rc)) -eq 0 ] && [ -n "${rm_done}" ]
     then
-        f_log "no longer used adblock lists removed" "${rc}"
+        f_log "disabled adblock lists removed"
+        if [ "${backup_ok}" = "true" ]
+        then
+            rm_done="$(find "${adb_backupdir}" -maxdepth 1 -type f -name "${adb_dnsprefix}.*" \( ${adb_srclist} \) -print -exec rm -f "{}" \; 2>/dev/null)"
+            rc=${?}
+            if  [ $((rc)) -eq 0 ] && [ -n "${rm_done}" ]
+            then
+                f_log "disabled adblock list backups removed"
+            elif [ $((rc)) -ne 0 ]
+            then
+                f_log "error during removal of disabled adblock list backups" "${rc}"
+                f_exit
+            fi
+        fi
     elif [ $((rc)) -ne 0 ]
     then
-        f_log "error during removal of old adblock lists" "${rc}"
+        f_log "error during removal of disabled adblock lists" "${rc}"
         f_exit
     fi
-    if [ "${backup_ok}" = "true" ]
+else
+    rm_done="$(find "${adb_dnsdir}" -maxdepth 1 -type f -name "${adb_dnsprefix}.*" -print -exec rm -f "{}" \; 2>/dev/null)"
+    rc=${?}
+    if [ $((rc)) -eq 0 ] && [ -n "${rm_done}" ]
     then
-        find "${adb_backupdir}" -maxdepth 1 -type f -name "${adb_dnsprefix}.*" \( ${adb_srclist} \) -exec rm -f "{}" \; 2>/dev/null
-        if [ $((rc)) -ne 0 ]
+        f_log "all adblock lists removed"
+        if [ "${backup_ok}" = "true" ]
         then
-            f_log "error during removal of old backups" "${rc}"
-            f_exit
+            rm_done="$(find "${adb_backupdir}" -maxdepth 1 -type f -name "${adb_dnsprefix}.*" -print -exec rm -f "{}" \; 2>/dev/null)"
+            rc=${?}
+            if [ $((rc)) -eq 0 ] && [ -n "${rm_done}" ]
+            then
+                f_log "all adblock list backups removed"
+            elif [ $((rc)) -ne 0 ]
+            then
+                f_log "error during removal of all adblock list backups" "${rc}"
+                f_exit
+            fi
         fi
+    elif [ $((rc)) -ne 0 ]
+    then
+        f_log "error during removal of all adblock lists" "${rc}"
+        f_exit
     fi
-else
-    rm -f "${adb_dnsdir}/${adb_dnsprefix}."* >/dev/null 2>&1
-    if [ "${backup_ok}" = "true" ]
+fi
+
+# partial restore of adblock lists in case of download errors
+#
+if [ "${backup_ok}" = "true" ] && [ -n "${adb_errsrclist}" ]
+then
+    restore_done="$(find "${adb_backupdir}" -maxdepth 1 -type f \( ${adb_errsrclist} \) -print -exec cp -pf "{}" "${adb_dnsdir}" \; 2>/dev/null)"
+    rc=${?}
+    if [ $((rc)) -eq 0 ] && [ -n "${restore_done}" ]
     then
-        rm -f "${adb_backupdir}/${adb_dnsprefix}."* >/dev/null 2>&1
-        f_log "all available adblock lists and backups removed"
-    else
-        f_log "all available adblock lists removed"
+        f_log "partial restore done"
+    elif [ $((rc)) -ne 0 ]
+    then
+        f_log "error during partial restore" "${rc}"
+        f_exit
     fi
 fi
 
@@ -340,7 +393,7 @@ then
                 count="$(wc -l < "${adb_dnsdir}/tmp.${list}")"
             fi
             printf "%s\n" "#------------------------------------------------------------------" >> "${adb_dnsdir}/tmp.${list}"
-            printf "%s\n" "# ${0##*/} (${adb_version}) - ${count} ad/abuse domains blocked" >> "${adb_dnsdir}/tmp.${list}"
+            printf "%s\n" "# ${0##*/} (${adb_scriptver}) - ${count} ad/abuse domains blocked" >> "${adb_dnsdir}/tmp.${list}"
             tail -qn -2 "${adb_dnsdir}/$adb_dnsprefix.${list}" 2>/dev/null >> "${adb_dnsdir}/tmp.${list}"
             mv -f "${adb_dnsdir}/tmp.${list}" "${adb_dnsdir}/${adb_dnsprefix}.${list}" >/dev/null 2>&1
         done
@@ -357,17 +410,10 @@ else
     adb_count="$(head -qn -4 "${adb_dnsdir}/${adb_dnsprefix}."* 2>/dev/null | wc -l)"
 fi
 
-# restore adblock lists if overall count is null (i.e. all downloads failed)
-#
-if [ "${backup_ok}" = "true" ] && [ $((adb_count)) -eq 0 ]
-then
-    f_restore
-fi
-
 # restart dnsmasq with newly generated or deleted adblock lists,
 # check dnsmasq startup afterwards
 #
-if [ -n "${adb_revsrclist}" ] || [ -n "${adb_rmfind}" ]
+if [ -n "${adb_revsrclist}" ] || [ -n "${rm_done}" ] || [ -n "${restore_done}" ]
 then
     /etc/init.d/dnsmasq restart >/dev/null 2>&1
     sleep 2
@@ -386,28 +432,17 @@ fi
 
 # create adblock list backups
 #
-if [ "${backup_ok}" = "true" ] && [ "$(printf "${adb_dnsdir}/${adb_dnsprefix}."*)" != "${adb_dnsdir}/${adb_dnsprefix}.*" ]
+if [ "${backup_ok}" = "true" ] && [ -n "${adb_revsrclist}" ] && [ "$(printf "${adb_dnsdir}/${adb_dnsprefix}."*)" != "${adb_dnsdir}/${adb_dnsprefix}.*" ]
 then
-    for file in ${adb_dnsdir}/${adb_dnsprefix}.*
-    do
-        filename="${file##*/}"
-        if [ ! -f "${adb_backupdir}/${filename}" ] || [ "${file}" -nt "${adb_backupdir}/${filename}" ]
-        then
-            cp -pf "${file}" "${adb_backupdir}" 2>/dev/null
-            rc=${?}
-            if [ $((rc)) -ne 0 ]
-            then
-                f_log "error during backup of adblock list (${filename})" "${rc}"
-                f_exit
-            fi
-            backup_done="true"
-        fi
-    done
-    if [ "${backup_done}" = "true" ]
+    backup_done="$(find "${adb_dnsdir}" -maxdepth 1 -type f \( ${adb_revsrclist} \) -print -exec cp -pf "{}" "${adb_backupdir}" \; 2>/dev/null)"
+    rc=${?}
+    if [ $((rc)) -eq 0 ] && [ -n "${backup_done}" ]
     then
         f_log "new adblock list backups generated"
-    else
-        f_log "adblock list backups are still valid, no new backups required"
+    elif [ $((rc)) -ne 0 ]
+    then
+        f_log "error during backup of adblock lists" "${rc}"
+        f_exit
     fi
 fi
 
index f066bfca3a1889de7e5f32a83cdebd99f81fae50..3c446d1145706cfd205122c865df885679930cdc 100644 (file)
@@ -1,72 +1,96 @@
 # adblock configuration, for further information
-# please see /etc/adblock/samples/adblock.conf.sample
-# and /etc/adblock/README.md
-
-config adblock "global"
-       option adb_blacklist "/etc/adblock/adblock.blacklist"
-       option adb_whitelist "/etc/adblock/adblock.whitelist"
-
-config service "backup"
-       option enabled "0"
-       option adb_backupdir "/tmp"
-
-config service "debuglog"
-       option enabled "0"
-       option adb_logfile "/tmp/adb_debug.log"
-
-config source "adaway"
-       option enabled "1"
-       option adb_src_adaway "https://adaway.org/hosts.txt&ruleset=rset_adaway"
-
-config source "disconnect"
-       option enabled "1"
-       option adb_src_disconnect "https://s3.amazonaws.com/lists.disconnect.me/simple_malvertising.txt&ruleset=rset_disconnect"
-
-config source "dshield"
-       option enabled "0"
-       option adb_src_dshield "http://www.dshield.org/feeds/suspiciousdomains_Low.txt&ruleset=rset_dshield"
-
-config source "feodo"
-       option enabled "0"
-       option adb_src_feodo "https://feodotracker.abuse.ch/blocklist/?download=domainblocklist&ruleset=rset_feodo"
-
-config source "malware"
-       option enabled "0"
-       option adb_src_malware "https://mirror.cedia.org.ec/malwaredomains/justdomains&ruleset=rset_malware"
-
-config source "malwarelist"
-       option enabled "0"
-       option adb_src_malwarelist "http://www.malwaredomainlist.com/hostslist/hosts.txt&ruleset=rset_malwarelist"
-
-config source "palevo"
-       option enabled "0"
-       option adb_src_palevo "https://palevotracker.abuse.ch/blocklists.php?download=domainblocklist&ruleset=rset_palevo"
-
-config source "shalla"
-       option enabled "0"
-       option adb_arc_shalla "http://www.shallalist.de/Downloads/shallalist.tar.gz"
-       list adb_catlist "adv"
-       list adb_catlist "costtraps"
-       list adb_catlist "spyware"
-       list adb_catlist "tracker"
-       list adb_catlist "warez"
-
-config source "spam404"
-       option enabled "0"
-       option adb_src_spam404 "http://spam404bl.com/spam404scamlist.txt&ruleset=rset_spam404"
-
-config source "whocares"
-       option enabled "0"
-       option adb_src_whocares "http://someonewhocares.org/hosts/hosts&ruleset=rset_whocares"
-
-config source "winhelp"
-       option enabled "0"
-       option adb_src_winhelp "http://winhelp2002.mvps.org/hosts.txt&ruleset=rset_winhelp"
-
-config source "yoyo"
-       option enabled "1"
-       option adb_src_yoyo "http://pgl.yoyo.org/adservers/serverlist.php?hostformat=one-line&showintro=0&mimetype=plaintext&ruleset=rset_yoyo"
-
-config source "zeus"
-       option enabled "0"
-       option adb_src_zeus "https://zeustracker.abuse.ch/blocklist.php?download=domainblocklist&ruleset=rset_zeus"
+# see '/etc/adblock/README.md'
+
+config adblock 'global'
+       option adb_enabled '1'
+       option adb_cfgver '0.80'
+       option adb_blacklist '/etc/adblock/adblock.blacklist'
+       option adb_whitelist '/etc/adblock/adblock.whitelist'
+
+config service 'backup'
+       option enabled '0'
+       option adb_backupdir '/tmp'
+
+config service 'log'
+       option enabled '0'
+       option adb_logfile '/tmp/adb_debug.log'
+
+config source 'adaway'
+       option enabled '1'
+       option adb_src 'https://adaway.org/hosts.txt&ruleset=rset_adaway'
+       option adb_srcdesc 'focus on mobile ads, infrequent updates, approx. 400 entries'
+
+config source 'disconnect'
+       option enabled '1'
+       option adb_src 'https://s3.amazonaws.com/lists.disconnect.me/simple_malvertising.txt&ruleset=rset_disconnect'
+       option adb_srcdesc 'mozilla driven content blocklist, numerous updates on the same day, approx. 6.500 entries'
+
+config source 'dshield'
+       option enabled '0'
+       option adb_src 'http://www.dshield.org/feeds/suspiciousdomains_Low.txt&ruleset=rset_dshield'
+       option adb_srcdesc 'broad blocklist for suspicious domains, daily updates, approx. 4.500 entries'
+
+config source 'feodo'
+       option enabled '0'
+       option adb_src 'https://feodotracker.abuse.ch/blocklist/?download=domainblocklist&ruleset=rset_feodo'
+       option adb_srcdesc 'focus on feodo botnet domains, daily updates, approx. 0-10 entries'
+
+config source 'malware'
+       option enabled '0'
+       option adb_src 'https://mirror.cedia.org.ec/malwaredomains/justdomains&ruleset=rset_malware'
+       option adb_srcdesc 'broad blocklist for malware domains, daily updates, approx. 16.000 entries'
+
+config source 'malwarelist'
+       option enabled '0'
+       option adb_src 'http://www.malwaredomainlist.com/hostslist/hosts.txt&ruleset=rset_malwarelist'
+       option adb_srcdesc 'generic blocklist for malware domains, daily updates, approx. 1.500 entries'
+
+config source 'openphish'
+       option enabled '0'
+       option adb_src 'https://openphish.com/feed.txt&ruleset=rset_openphish'
+       option adb_srcdesc 'focus on phishing domains, numerous updates on the same day, approx. 1.800 entries'
+
+config source 'palevo'
+       option enabled '0'
+       option adb_src 'https://palevotracker.abuse.ch/blocklists.php?download=domainblocklist&ruleset=rset_palevo'
+       option adb_srcdesc 'focus on palevo worm domains, daily updates, approx. 15 entries'
+
+config source 'ruadlist'
+       option enabled '0'
+       option adb_src 'https://easylist-downloads.adblockplus.org/ruadlist+easylist.txt&ruleset=rset_ruadlist'
+       option adb_srcdesc 'focus on russian ad related domains plus generic easylist additions, weekly updates, approx. 2.000 entries'
+
+config source 'shalla'
+       option enabled '0'
+       option adb_src 'http://www.shallalist.de/Downloads/shallalist.tar.gz'
+       option adb_srcdesc 'broad blocklist subdivided in different categories (adv, costtraps, spyware, tracker and warez enabled by default), daily updates, approx. 32.000 entries'
+       list adb_catlist 'adv'
+       list adb_catlist 'costtraps'
+       list adb_catlist 'spyware'
+       list adb_catlist 'tracker'
+       list adb_catlist 'warez'
+
+config source 'spam404'
+       option enabled '0'
+       option adb_src 'http://spam404bl.com/spam404scamlist.txt&ruleset=rset_spam404'
+       option adb_srcdesc 'generic blocklist for suspicious domains, infrequent updates, approx. 5.000 entries'
+
+config source 'whocares'
+       option enabled '0'
+       option adb_src 'http://someonewhocares.org/hosts/hosts&ruleset=rset_whocares'
+       option adb_srcdesc 'broad blocklist for suspicious domains, weekly updates, approx. 12.000 entries'
+
+config source 'winhelp'
+       option enabled '0'
+       option adb_src 'http://winhelp2002.mvps.org/hosts.txt&ruleset=rset_winhelp'
+       option adb_srcdesc 'broad blocklist for suspicious domains, infrequent updates, approx. 15.000 entries'
+
+config source 'yoyo'
+       option enabled '1'
+       option adb_src 'https://pgl.yoyo.org/adservers/serverlist.php?hostformat=one-line&showintro=0&mimetype=plaintext&ruleset=rset_yoyo'
+       option adb_srcdesc 'focus on ad related domains, weekly updates, approx. 2.500 entries'
+
+config source 'zeus'
+       option enabled '0'
+       option adb_src 'https://zeustracker.abuse.ch/blocklist.php?download=domainblocklist&ruleset=rset_zeus'
+       option adb_srcdesc 'focus on zeus botnet domains, daily updates, approx. 440 entries'
diff --git a/net/adblock/files/adblock.hotplug b/net/adblock/files/adblock.hotplug
new file mode 100644 (file)
index 0000000..050701b
--- /dev/null
@@ -0,0 +1,19 @@
+#!/bin/sh
+#
+
+if [ -f "/var/run/adblock.pid" ] || [ "${ACTION}" != "ifup" ]
+then
+    exit 0
+fi
+
+. /lib/functions/network.sh
+adb_pid="${$}"
+adb_logger="/usr/bin/logger"
+network_find_wan adb_wanif4
+network_find_wan6 adb_wanif6
+
+if [ "${INTERFACE}" = "${adb_wanif4}" ] || [ "${INTERFACE}" = "${adb_wanif6}" ]
+then
+    /etc/init.d/adblock start
+    "${adb_logger}" -t "adblock[${adb_pid}] info " "adblock service started due to '${ACTION}' of '${INTERFACE}' interface"
+fi
diff --git a/net/adblock/files/adblock.init b/net/adblock/files/adblock.init
new file mode 100755 (executable)
index 0000000..2174fea
--- /dev/null
@@ -0,0 +1,69 @@
+#!/bin/sh /etc/rc.common
+#
+
+START=99
+
+adb_pid="${$}"
+adb_script="/usr/bin/adblock-update.sh"
+adb_pidfile="/var/run/adblock.pid"
+adb_logger="/usr/bin/logger"
+
+if [ -t 1 ]
+then
+    log_parm="-s"
+    unset bg_parm
+else
+    unset log_parm
+    bg_parm="&"
+fi
+
+if [ -r "${adb_pidfile}" ]
+then
+    "${adb_logger}" ${log_parm} -t "adblock[${adb_pid}] error" "adblock service already running ($(cat ${adb_pidfile} 2>/dev/null))"
+    exit 255
+fi
+
+boot()
+{
+    return 0
+}
+
+start()
+{
+    eval "${adb_script}" ${bg_parm}
+    return 0
+}
+
+restart()
+{
+    start
+}
+
+reload()
+{
+    stop
+    start
+}
+
+stop()
+{
+    rm_done="$(find "/tmp/dnsmasq.d" -maxdepth 1 -type f -name "adb_list.*" -print -exec rm -f "{}" \; 2>/dev/null)"
+    rc=${?}
+    if [ $((rc)) -eq 0 ] && [ -n "${rm_done}" ]
+    then
+        /etc/init.d/dnsmasq restart >/dev/null 2>&1
+        /etc/init.d/firewall restart >/dev/null 2>&1
+    fi
+
+    uhttpd_pid="$(ps 2>/dev/null | grep "[u]httpd.*\-h /www/adblock" 2>/dev/null | awk '{print $1}' 2>/dev/null)"
+    if [ -n "${uhttpd_pid}" ]
+    then
+        kill -9 "${uhttpd_pid}" >/dev/null 2>&1
+    fi
+
+    if [ -n "${rm_done}" ] || [ -n "${uhttpd_pid}" ]
+    then
+        "${adb_logger}" ${log_parm} -t "adblock[${adb_pid}] info " "all adblock related services stopped"
+    fi
+    return 0
+}
diff --git a/net/adblock/files/samples/adblock.conf.sample b/net/adblock/files/samples/adblock.conf.sample
deleted file mode 100644 (file)
index 920e9e2..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-# adblock configuration, for further information
-# please see /etc/adblock/samples/adblock.conf.sample
-# and /etc/adblock/README.md
-
-# generic options (all optional!)
-config adblock "global"
-       # name (or space separated list of names) of the logical wan interface(s)
-       option adb_wanif "wan"
-
-       # name of the logical lan interface
-       option adb_lanif "lan"
-
-       # uhttpd port for adblock instance
-       option adb_port "65535"
-
-       # ipv4 blackhole ip address for dnsmasq
-       # old class 'E' subnet, reserved for future use (certainly not used in normal setups)
-       option adb_nullipv4 "254.0.0.1"
-
-       # ipv6 mapped blackhole ip address for dnsmasq
-       option adb_nullipv6 "::ffff:fe00:0001"
-
-       # download timeout (in seconds) to get the adblock list sources
-       option adb_maxtime "60"
-
-       # max loops/timeout for wan check
-       option adb_maxloop "20"
-
-       # full path to static domain blacklist file (one domain per line)
-       # wildcards or regex expressions are not allowed
-       option adb_blacklist "/etc/adblock/adblock.blacklist"
-
-       # full path to static domain whitelist file (one domain per line)
-       # wildcards or regex expressions are not allowed
-       option adb_whitelist "/etc/adblock/adblock.whitelist"
-
-# full path to backup directory for adlist backups
-# disabled by default
-config service "backup"
-       option enabled "0"
-       option adb_backupdir "/tmp"
-
-# full path to debug logfile
-# normally adblock logs to syslog and stdout only
-# disabled by default
-config service "debuglog"
-       option enabled "0"
-       option adb_logfile "/tmp/adb_debug.log"
-
-# adblock list source definition
-# please do not change the URLs listed below,
-# enable/disable sources as needed
-# for shallalist you can also enable/disable different ad categories
-# 'adaway', 'disconnect' and 'yoyo' are enabled by default
-config source "adaway"
-       option enabled "1"
-       option adb_src_adaway "https://adaway.org/hosts.txt&ruleset=rset_adaway"
-
-config source "disconnect"
-       option enabled "1"
-       option adb_src_disconnect "https://s3.amazonaws.com/lists.disconnect.me/simple_malvertising.txt&ruleset=rset_disconnect"
-
-config source "dshield"
-       option enabled "0"
-       option adb_src_dshield "http://www.dshield.org/feeds/suspiciousdomains_Low.txt&ruleset=rset_dshield"
-
-config source "feodo"
-       option enabled "0"
-       option adb_src_feodo "https://feodotracker.abuse.ch/blocklist/?download=domainblocklist&ruleset=rset_feodo"
-
-config source "malware"
-       option enabled "0"
-       option adb_src_malware "https://mirror.cedia.org.ec/malwaredomains/justdomains&ruleset=rset_malware"
-
-config source "malwarelist"
-       option enabled "0"
-       option adb_src_malwarelist "http://www.malwaredomainlist.com/hostslist/hosts.txt&ruleset=rset_malwarelist"
-
-config source "palevo"
-       option enabled "0"
-       option adb_src_palevo "https://palevotracker.abuse.ch/blocklists.php?download=domainblocklist&ruleset=rset_palevo"
-
-config source "shalla"
-       option enabled "0"
-       option adb_arc_shalla "http://www.shallalist.de/Downloads/shallalist.tar.gz"
-       list adb_catlist "adv"
-       list adb_catlist "costtraps"
-       list adb_catlist "spyware"
-       list adb_catlist "tracker"
-       list adb_catlist "warez"
-
-config source "spam404"
-       option enabled "0"
-       option adb_src_spam404 "http://spam404bl.com/spam404scamlist.txt&ruleset=rset_spam404"
-
-config source "whocares"
-       option enabled "0"
-       option adb_src_whocares "http://someonewhocares.org/hosts/hosts&ruleset=rset_whocares"
-
-config source "winhelp"
-       option enabled "0"
-       option adb_src_winhelp "http://winhelp2002.mvps.org/hosts.txt&ruleset=rset_winhelp"
-
-config source "yoyo"
-       option enabled "1"
-       option adb_src_yoyo "http://pgl.yoyo.org/adservers/serverlist.php?hostformat=one-line&showintro=0&mimetype=plaintext&ruleset=rset_yoyo"
-
-config source "zeus"
-       option enabled "0"
-       option adb_src_zeus "https://zeustracker.abuse.ch/blocklist.php?download=domainblocklist&ruleset=rset_zeus"
diff --git a/net/adblock/files/samples/dhcp.config.sample b/net/adblock/files/samples/dhcp.config.sample
deleted file mode 100644 (file)
index 5438552..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-# tweaks for dnsmasq
-# configuration found in /etc/config/dhcp
-#
-config dnsmasq
-    option cachesize '1000'
-    option filterwin2k '0'
-
diff --git a/net/adblock/files/samples/dnsmasq.conf.sample b/net/adblock/files/samples/dnsmasq.conf.sample
deleted file mode 100644 (file)
index 9b1fb7c..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-# tell DHCP clients not to ask for proxy information
-# some clients - like Win7 - will constantly ask if not told "No!"
-# configuration found in /etc/dnsmasq
-#
-dhcp-option=252,"\n"
diff --git a/net/adblock/files/samples/rc.local.sample b/net/adblock/files/samples/rc.local.sample
deleted file mode 100644 (file)
index 890779e..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-# sample startup script
-# configuration found in /etc/rc.local
-#
-
-# start logging
-#
-/usr/bin/logger -t rc.local "start rc.local processing"
-
-# set home directory
-#
-export HOME=/root
-
-# resize /tmp partition to 256 MB
-#
-/usr/bin/logger -t rc.local "resize /tmp partition to 256 MB"
-mount tmpfs /tmp -t tmpfs -o remount,nosuid,nodev,noatime,size=256M
-
-# start adblock script
-#
-/usr/bin/logger -t rc.local "start adblock script"
-/usr/bin/adblock-update.sh >/dev/null 2>&1
-
-# write log and exit
-#
-/usr/bin/logger -t rc.local "finish rc.local processing"
-exit 0
diff --git a/net/adblock/files/samples/root.crontab.sample b/net/adblock/files/samples/root.crontab.sample
deleted file mode 100644 (file)
index dde4bbd..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-# sample crontab script
-# configuration found in /etc/crontabs/root
-#
-
-# start adblock script once a day at 6 o'clock
-#
-0 06 * * *    /usr/bin/adblock-update.sh &
index 56fd1c008d0f1c0c9cb8403aa814141f05630124..29cdf586e85e07bdc5828dd53dab5112ab7b46c1 100644 (file)
@@ -1,5 +1,5 @@
 <html>
-    <head></head>
+    <head><meta charset="utf-8"></head>
     <body>
         <img src="/adblock.png" border="0" alt=""></img>
     </body>
index 56fd1c008d0f1c0c9cb8403aa814141f05630124..29cdf586e85e07bdc5828dd53dab5112ab7b46c1 100644 (file)
@@ -1,5 +1,5 @@
 <html>
-    <head></head>
+    <head><meta charset="utf-8"></head>
     <body>
         <img src="/adblock.png" border="0" alt=""></img>
     </body>
index 9a2b2df388a46789ecc27e9677a9394582fa6929..dd2f6b6b149cacff6c54aabd070dd8c2ebd38e9d 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=chrony
-PKG_VERSION:=2.2.1
+PKG_VERSION:=2.3
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://download.tuxfamily.org/chrony/
-PKG_MD5SUM:=ce46990540aab3670d093311ee43fe17
+PKG_MD5SUM:=db6d46afea66f75dcc362f44623c1af4
 
 PKG_MAINTAINER:=Miroslav Lichvar <mlichvar0@gmail.com>
 PKG_LICENSE:=GPL-2.0
index 852ab08f6be056b443f42b1694b259d7d6b13dd9..b3d45fa806fcf476b5fda977fae7008b046c7972 100755 (executable)
@@ -9,10 +9,10 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=ddns-scripts
 # Version == major.minor.patch
 # increase on new functionality (minor) or patches (patch)
-PKG_VERSION:=2.6.1
+PKG_VERSION:=2.6.2
 # Release == build
 # increase on changes of services files or tld_names.dat
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_LICENSE:=GPL-2.0
 PKG_MAINTAINER:=Christian Schoenebeck <christian.schoenebeck@gmail.com>
@@ -50,21 +50,19 @@ define Package/$(PKG_NAME)/config
                  - Proxy server support
                  - log file support
                  - support to run once
-               .
                Version: $(PKG_VERSION)-$(PKG_RELEASE)
                Info   : http://wiki.openwrt.org/doc/howto/ddns.client
-               .
                $(PKG_MAINTAINER)
 endef
 
 ##### **********************************
 define Package/$(PKG_NAME)_cloudflare
     $(call Package/$(PKG_NAME)/Default)
-    TITLE:=DDNS extension for CloudFlare
+    TITLE:=DDNS extension for CloudFlare.com
     DEPENDS:=$(PKG_NAME)
 endef
 define Package/$(PKG_NAME)_cloudflare/description
-    Dynamic DNS Client scripts extension for CloudFlare
+    Dynamic DNS Client scripts extension for CloudFlare.com
 endef
 
 ##### **********************************
@@ -164,33 +162,35 @@ endef
 ##### **********************************
 define Package/$(PKG_NAME)_cloudflare/install
        $(INSTALL_DIR) $(1)/usr/lib/ddns
-       $(INSTALL_BIN)  $(PKG_BUILD_DIR)/files/update_CloudFlare.sh $(1)/usr/lib/ddns
+       $(INSTALL_BIN)  $(PKG_BUILD_DIR)/files/update_cloudflare_com.sh $(1)/usr/lib/ddns
        $(INSTALL_DATA) $(PKG_BUILD_DIR)/files/tld_names.dat.gz $(1)/usr/lib/ddns
 endef
 define Package/$(PKG_NAME)_cloudflare/postinst
        #!/bin/sh
-       echo -e '"CloudFlare"\t"update_CloudFlare.sh"' >> $${IPKG_INSTROOT}/usr/lib/ddns/services
-       echo -e '"CloudFlare"\t"update_CloudFlare.sh"' >> $${IPKG_INSTROOT}/usr/lib/ddns/services_ipv6
+       echo -e '"cloudflare.com"\t"update_cloudflare_com.sh"' >> $${IPKG_INSTROOT}/usr/lib/ddns/services
+       echo -e '"cloudflare.com"\t"update_cloudflare_com.sh"' >> $${IPKG_INSTROOT}/usr/lib/ddns/services_ipv6
+       /bin/sed -i '/service_name/s/CloudFlare/cloudflare\.com/g' $${IPKG_INSTROOT}/etc/config/ddns
 endef
 define Package/$(PKG_NAME)_cloudflare/prerm
        #!/bin/sh
-       /bin/sed -i '/update_CloudFlare\.sh/ d' $${IPKG_INSTROOT}/usr/lib/ddns/services
-       /bin/sed -i '/update_CloudFlare\.sh/ d' $${IPKG_INSTROOT}/usr/lib/ddns/services_ipv6
+       /bin/sed -i '/update_cloudflare_com\.sh/ d' $${IPKG_INSTROOT}/usr/lib/ddns/services
+       /bin/sed -i '/update_cloudflare_com\.sh/ d' $${IPKG_INSTROOT}/usr/lib/ddns/services_ipv6
 endef
 
 ##### **********************************
 define Package/$(PKG_NAME)_no-ip_com/install
        $(INSTALL_DIR) $(1)/usr/lib/ddns
-       $(INSTALL_BIN)  $(PKG_BUILD_DIR)/files/update_No-IP.com.sh $(1)/usr/lib/ddns
+       $(INSTALL_BIN)  $(PKG_BUILD_DIR)/files/update_no-ip_com.sh $(1)/usr/lib/ddns
 endef
 define Package/$(PKG_NAME)_no-ip_com/postinst
        #!/bin/sh
-       echo -e '"No-IP.com"\t"update_No-IP.com.sh"' >> $${IPKG_INSTROOT}/usr/lib/ddns/services
-       echo -e '"NoIP.com"\t"update_No-IP.com.sh"' >> $${IPKG_INSTROOT}/usr/lib/ddns/services
+       echo -e '"no-ip.com"\t"update_no-ip_com.sh"' >> $${IPKG_INSTROOT}/usr/lib/ddns/services
+       /bin/sed -i '/service_name/s/NoIP\.com/no-ip\.com/g'  $${IPKG_INSTROOT}/etc/config/ddns
+       /bin/sed -i '/service_name/s/No-IP\.com/no-ip\.com/g' $${IPKG_INSTROOT}/etc/config/ddns
 endef
 define Package/$(PKG_NAME)_no-ip_com/prerm
        #!/bin/sh
-       /bin/sed -i '/update_No-IP\.com\.sh/ d' $${IPKG_INSTROOT}/usr/lib/ddns/services
+       /bin/sed -i '/update_no-ip_com\.sh/ d' $${IPKG_INSTROOT}/usr/lib/ddns/services
 endef
 
 ##### **********************************
@@ -200,8 +200,9 @@ define Package/$(PKG_NAME)_nsupdate/install
 endef
 define Package/$(PKG_NAME)_nsupdate/postinst
        #!/bin/sh
-       echo -e '"Bind-nsupdate"\t"update_nsupdate.sh"' >> $${IPKG_INSTROOT}/usr/lib/ddns/services
-       echo -e '"Bind-nsupdate"\t"update_nsupdate.sh"' >> $${IPKG_INSTROOT}/usr/lib/ddns/services_ipv6
+       echo -e '"bind-nsupdate"\t"update_nsupdate.sh"' >> $${IPKG_INSTROOT}/usr/lib/ddns/services
+       echo -e '"bind-nsupdate"\t"update_nsupdate.sh"' >> $${IPKG_INSTROOT}/usr/lib/ddns/services_ipv6
+       /bin/sed -i '/service_name/s/Bind-nsupdate/bind-nsupdate/g' $${IPKG_INSTROOT}/etc/config/ddns
 endef
 define Package/$(PKG_NAME)_nsupdate/prerm
        #!/bin/sh
index 97076e59ea140b26a4947d742b1b4283eb8d046d..e961efd96ec13fb65518e7c896a3d705b17f40c4 100644 (file)
@@ -37,9 +37,7 @@
 "changeip.com"         "http://[USERNAME]:[PASSWORD]@nic.changeip.com/nic/update?u=[USERNAME]&p=[PASSWORD]&cmd=update&hostname=[DOMAIN]&ip=[IP]"
 "zoneedit.com"         "http://[USERNAME]:[PASSWORD]@dynamic.zoneedit.com/auth/dynamic.html?host=[DOMAIN]&dnsto=[IP]"
 "free.editdns.net"     "http://dyndns-free.editdns.net/api/dynLinux.php?p=[PASSWORD]&r=[DOMAIN]"
-
-# freedns.afraid.org is weird, you just need an update code, for which we use the password variable
-"freedns.afraid.org"   "http://freedns.afraid.org/dynamic/update.php?[PASSWORD]&address=[IP]"
+"freedns.afraid.org"  "http://[USERNAME]:[PASSWORD]@freedns.afraid.org/nic/update?hostname=[DOMAIN]&myip=[IP]"
 
 # DNS Max and resellers' update urls
 "dnsmax.com"   "http://update.dnsmax.com/update/?username=[USERNAME]&password=[PASSWORD]&resellerid=1&clientname=openwrt&clientversion=8.09&protocolversion=2.0&updatehostname=[DOMAIN]&ip=[IP]"
 # Variomedia AG
 "variomedia.de"        "http://[USERNAME]:[PASSWORD]@dyndns.variomedia.de/nic/update?hostname=[DOMAIN]&myip=[IP]"      "good|nochg"
 
- #DtDNS
+DtDNS
 "dtdns.com"    "http://www.dtdns.com/api/autodns.cfm?id=[DOMAIN]&pw=[PASSWORD]&ip=[IP]"
 
 # dy.fi Dynamic DNS for finnish users (IP autodetected by provider)
 
 # zzzz.io Free Dynamic DNS
 "zzzz.io"      "https://zzzz.io/api/v1/update/[DOMAIN]/?token=[PASSWORD]&ip=[IP]"      "Updated|No change"
+
+# dynu.com
+"dynu.com"  "http://api.dynu.com/nic/update?hostname=[DOMAIN]&myip=[IP]&username=[USERNAME]&password=[PASSWORD]"
index b711bc46a5efb15c333ae396174ed7373524d759..5925141222d9aa9a2eb37b0fe85ca0f936d91cde 100644 (file)
@@ -395,7 +395,7 @@ mil.bo
 tv.bo
 
 // br : http://registro.br/dominio/categoria.html
-// Submitted by registry <fneves@registro.br> 2014-08-11
+// Submitted by registry <fneves@registro.br>
 br
 adm.br
 adv.br
@@ -485,7 +485,7 @@ net.bt
 org.bt
 
 // bv : No registrations at this time.
-// Submitted by registry <jarle@uninett.no> 2006-06-16
+// Submitted by registry <jarle@uninett.no>
 bv
 
 // bw : http://en.wikipedia.org/wiki/.bw
@@ -598,7 +598,7 @@ gov.cm
 net.cm
 
 // cn : http://en.wikipedia.org/wiki/.cn
-// Submitted by registry <tanyaling@cnnic.cn> 2008-06-11
+// Submitted by registry <tanyaling@cnnic.cn>
 cn
 ac.cn
 com.cn
@@ -650,7 +650,7 @@ mo.cn
 tw.cn
 
 // co : http://en.wikipedia.org/wiki/.co
-// Submitted by registry <tecnico@uniandes.edu.co> 2008-06-11
+// Submitted by registry <tecnico@uniandes.edu.co>
 co
 arts.co
 com.co
@@ -770,7 +770,7 @@ pol.dz
 art.dz
 
 // ec : http://www.nic.ec/reg/paso1.asp
-// Submitted by registry <vabboud@nic.ec> 2008-07-04
+// Submitted by registry <vabboud@nic.ec>
 ec
 com.ec
 info.ec
@@ -891,7 +891,7 @@ veterinaire.fr
 ga
 
 // gb : This registry is effectively dormant
-// Submitted by registry <Damien.Shaw@ja.net> 2008-06-12
+// Submitted by registry <Damien.Shaw@ja.net>
 gb
 
 // gd : http://en.wikipedia.org/wiki/.gd
@@ -950,7 +950,7 @@ org.gl
 gm
 
 // gn : http://psg.com/dns/gn/gn.txt
-// Submitted by registry <randy@psg.com> 2008-06-17
+// Submitted by registry <randy@psg.com>
 gn
 ac.gn
 com.gn
@@ -975,7 +975,7 @@ asso.gp
 gq
 
 // gr : https://grweb.ics.forth.gr/english/1617-B-2005.html
-// Submitted by registry <segred@ics.forth.gr> 2008-06-09
+// Submitted by registry <segred@ics.forth.gr>
 gr
 com.gr
 edu.gr
@@ -1013,7 +1013,7 @@ net.gy
 org.gy
 
 // hk : https://www.hkdnr.hk
-// Submitted by registry <hk.tech@hkirc.hk> 2008-06-11
+// Submitted by registry <hk.tech@hkirc.hk>
 hk
 com.hk
 edu.hk
@@ -1156,7 +1156,7 @@ net.il
 org.il
 
 // im : https://www.nic.im/
-// Submitted by registry <info@nic.im> 2013-11-15
+// Submitted by registry <info@nic.im>
 im
 ac.im
 co.im
@@ -1639,7 +1639,7 @@ jobs
 
 // jp : http://en.wikipedia.org/wiki/.jp
 // http://jprs.co.jp/en/jpdomain.html
-// Submitted by registry <info@jprs.jp> 2014-10-30
+// Submitted by registry <info@jprs.jp>
 jp
 // jp organizational type names
 ac.jp
@@ -3610,7 +3610,7 @@ mil.kz
 com.kz
 
 // la : http://en.wikipedia.org/wiki/.la
-// Submitted by registry <gavin.brown@nic.la> 2008-06-10
+// Submitted by registry <gavin.brown@nic.la>
 la
 int.la
 net.la
@@ -3622,7 +3622,7 @@ com.la
 org.la
 
 // lb : http://en.wikipedia.org/wiki/.lb
-// Submitted by registry <randy@psg.com> 2008-06-17
+// Submitted by registry <randy@psg.com>
 lb
 com.lb
 edu.lb
@@ -3662,7 +3662,7 @@ hotel.lk
 ac.lk
 
 // lr : http://psg.com/dns/lr/lr.txt
-// Submitted by registry <randy@psg.com> 2008-06-17
+// Submitted by registry <randy@psg.com>
 lr
 com.lr
 edu.lr
@@ -3816,7 +3816,7 @@ net.ms
 org.ms
 
 // mt : https://www.nic.org.mt/go/policy
-// Submitted by registry <help@nic.org.mt> 2013-11-19
+// Submitted by registry <help@nic.org.mt>
 mt
 com.mt
 edu.mt
@@ -4423,7 +4423,7 @@ net.mw
 org.mw
 
 // mx : http://www.nic.mx/
-// Submitted by registry <farias@nic.mx> 2008-06-19
+// Submitted by registry <farias@nic.mx>
 mx
 com.mx
 org.mx
@@ -4492,17 +4492,18 @@ info.nf
 other.nf
 store.nf
 
-// ng : http://psg.com/dns/ng/
+// ng : http://www.nira.org.ng/index.php/join-us/register-ng-domain/189-nira-slds
 ng
 com.ng
 edu.ng
+gov.ng
+i.ng
+mil.ng
+mobi.ng
 name.ng
 net.ng
 org.ng
 sch.ng
-gov.ng
-mil.ng
-mobi.ng
 
 // ni : http://www.nic.ni/
 com.ni
@@ -5472,7 +5473,7 @@ xn--vler-qoa.hedmark.no
 *.np
 
 // nr : http://cenpac.net.nr/dns/index.html
-// Confirmed by registry <technician@cenpac.net.nr> 2008-06-17
+// Submitted by registry <technician@cenpac.net.nr>
 nr
 biz.nr
 info.nr
@@ -5486,7 +5487,7 @@ com.nr
 nu
 
 // nz : http://en.wikipedia.org/wiki/.nz
-// Confirmed by registry <jay@nzrs.net.nz> 2014-05-19
+// Submitted by registry <jay@nzrs.net.nz>
 nz
 ac.nz
 co.nz
@@ -5557,7 +5558,7 @@ edu.pf
 *.pg
 
 // ph : http://www.domains.ph/FAQ2.asp
-// Submitted by registry <jed@email.com.ph> 2008-06-13
+// Submitted by registry <jed@email.com.ph>
 ph
 com.ph
 net.ph
@@ -5586,7 +5587,7 @@ gos.pk
 info.pk
 
 // pl http://www.dns.pl/english/index.html
-// updated by .PL registry on 2015-04-28
+// Submitted by registry
 pl
 com.pl
 net.pl
@@ -5823,15 +5824,19 @@ est.pr
 prof.pr
 ac.pr
 
-// pro : http://www.nic.pro/support_faq.htm
+// pro : http://registry.pro/get-pro
 pro
+aaa.pro
 aca.pro
+acct.pro
+avocat.pro
 bar.pro
 cpa.pro
+eng.pro
 jur.pro
 law.pro
 med.pro
-eng.pro
+recht.pro
 
 // ps : http://en.wikipedia.org/wiki/.ps
 // http://www.nic.ps/registration/policy.html#reg
@@ -5865,7 +5870,7 @@ go.pw
 belau.pw
 
 // py : http://www.nic.py/pautas.html#seccion_9
-// Confirmed by registry 2012-10-03
+// Submitted by registry
 py
 com.py
 coop.py
@@ -5888,32 +5893,32 @@ sch.qa
 
 // re : http://www.afnic.re/obtenir/chartes/nommage-re/annexe-descriptifs
 re
-com.re
 asso.re
+com.re
 nom.re
 
 // ro : http://www.rotld.ro/
 ro
+arts.ro
 com.ro
-org.ro
-tm.ro
-nt.ro
-nom.ro
+firm.ro
 info.ro
+nom.ro
+nt.ro
+org.ro
 rec.ro
-arts.ro
-firm.ro
 store.ro
+tm.ro
 www.ro
 
-// rs : http://en.wikipedia.org/wiki/.rs
+// rs : https://www.rnids.rs/en/domains/national-domains
 rs
+ac.rs
 co.rs
-org.rs
 edu.rs
-ac.rs
 gov.rs
 in.rs
+org.rs
 
 // ru : http://www.cctld.ru/ru/docs/aktiv_8.php
 // Industry domains
@@ -6078,7 +6083,7 @@ edu.sa
 sch.sa
 
 // sb : http://www.sbnic.net.sb/
-// Submitted by registry <lee.humphries@telekom.com.sb> 2008-06-08
+// Submitted by registry <lee.humphries@telekom.com.sb>
 sb
 com.sb
 edu.sb
@@ -6095,7 +6100,7 @@ org.sc
 edu.sc
 
 // sd : http://www.isoc.sd/sudanic.isoc.sd/billing_pricing.htm
-// Submitted by registry <admin@isoc.sd> 2008-06-17
+// Submitted by registry <admin@isoc.sd>
 sd
 com.sd
 net.sd
@@ -6107,7 +6112,7 @@ gov.sd
 info.sd
 
 // se : http://en.wikipedia.org/wiki/.se
-// Submitted by registry <patrik.wallstrom@iis.se> 2014-03-18
+// Submitted by registry <patrik.wallstrom@iis.se>
 se
 a.se
 ac.se
@@ -6170,7 +6175,7 @@ mil.sh
 si
 
 // sj : No registrations at this time.
-// Submitted by registry <jarle@uninett.no> 2008-06-16
+// Submitted by registry <jarle@uninett.no>
 sj
 
 // sk : http://en.wikipedia.org/wiki/.sk
@@ -6178,7 +6183,7 @@ sj
 sk
 
 // sl : http://www.nic.sl
-// Submitted by registry <adam@neoip.com> 2008-06-12
+// Submitted by registry <adam@neoip.com>
 sl
 com.sl
 net.sl
@@ -6267,7 +6272,7 @@ org.sv
 red.sv
 
 // sx : http://en.wikipedia.org/wiki/.sx
-// Confirmed by registry <jcvignes@openregistry.com> 2012-05-31
+// Submitted by registry <jcvignes@openregistry.com>
 sx
 gov.sx
 
@@ -6306,7 +6311,7 @@ tf
 tg
 
 // th : http://en.wikipedia.org/wiki/.th
-// Submitted by registry <krit@thains.co.th> 2008-06-17
+// Submitted by registry <krit@thains.co.th>
 th
 ac.th
 co.th
@@ -6377,7 +6382,7 @@ defense.tn
 turen.tn
 
 // to : http://en.wikipedia.org/wiki/.to
-// Submitted by registry <egullich@colo.to> 2008-06-17
+// Submitted by registry <egullich@colo.to>
 to
 com.to
 gov.to
@@ -6388,7 +6393,7 @@ mil.to
 
 // subTLDs: https://www.nic.tr/forms/eng/policies.pdf
 // and: https://www.nic.tr/forms/politikalar.pdf
-// Submitted by <mehmetgurevin@gmail.com> 2014-07-19
+// Submitted by <mehmetgurevin@gmail.com>
 tr
 com.tr
 info.tr
@@ -6465,7 +6470,7 @@ xn--uc0atv.tw
 xn--czrw28b.tw
 
 // tz : http://www.tznic.or.tz/index.php/domains
-// Confirmed by registry <manager@tznic.or.tz> 2013-01-22
+// Submitted by registry <manager@tznic.or.tz>
 tz
 ac.tz
 co.tz
@@ -6481,7 +6486,7 @@ sc.tz
 tv.tz
 
 // ua : https://hostmaster.ua/policy/?ua
-// Submitted by registry <dk@cctld.ua> 2012-04-27
+// Submitted by registry <dk@cctld.ua>
 ua
 // ua 2LD
 com.ua
@@ -6851,7 +6856,7 @@ org.uz
 va
 
 // vc : http://en.wikipedia.org/wiki/.vc
-// Submitted by registry <kshah@ca.afilias.info> 2008-06-13
+// Submitted by registry <kshah@ca.afilias.info>
 vc
 com.vc
 net.vc
@@ -6861,8 +6866,7 @@ mil.vc
 edu.vc
 
 // ve : https://registro.nic.ve/
-// Confirmed by registry 2012-10-04
-// Updated 2014-05-20 - Bug 940478
+// Submitted by registry
 ve
 arts.ve
 co.ve
@@ -7112,7 +7116,7 @@ xn--mgbai9a5eva00b
 xn--ygbi2ammx
 
 // xn--90a3ac ("srb", Cyrillic) : RS
-// http://www.rnids.rs/en/the-.срб-domain
+// https://www.rnids.rs/en/domains/national-domains
 срб
 xn--90a3ac
 пр.срб
@@ -10997,20 +11001,21 @@ zuerich
 // (Note: these are in alphabetical order by company name)
 
 // Amazon CloudFront : https://aws.amazon.com/cloudfront/
-// Submitted by Donavan Miller <donavanm@amazon.com> 2013-03-22
+// Submitted by Donavan Miller <donavanm@amazon.com>
 cloudfront.net
 
 // Amazon Elastic Compute Cloud: https://aws.amazon.com/ec2/
-// Submitted by Osman Surkatty <osmans@amazon.com> 2014-12-16
+// Submitted by Luke Wells <lawells@amazon.com>
 ap-northeast-1.compute.amazonaws.com
+ap-northeast-2.compute.amazonaws.com
 ap-southeast-1.compute.amazonaws.com
 ap-southeast-2.compute.amazonaws.com
 cn-north-1.compute.amazonaws.cn
+compute-1.amazonaws.com
 compute.amazonaws.cn
 compute.amazonaws.com
-compute-1.amazonaws.com
-eu-west-1.compute.amazonaws.com
 eu-central-1.compute.amazonaws.com
+eu-west-1.compute.amazonaws.com
 sa-east-1.compute.amazonaws.com
 us-east-1.amazonaws.com
 us-gov-west-1.compute.amazonaws.com
@@ -11020,37 +11025,39 @@ z-1.compute-1.amazonaws.com
 z-2.compute-1.amazonaws.com
 
 // Amazon Elastic Beanstalk : https://aws.amazon.com/elasticbeanstalk/
-// Submitted by Adam Stein <astein@amazon.com> 2013-04-02
+// Submitted by Adam Stein <astein@amazon.com>
 elasticbeanstalk.com
 
 // Amazon Elastic Load Balancing : https://aws.amazon.com/elasticloadbalancing/
-// Submitted by Scott Vidmar <svidmar@amazon.com> 2013-03-27
+// Submitted by Scott Vidmar <svidmar@amazon.com>
 elb.amazonaws.com
 
 // Amazon S3 : https://aws.amazon.com/s3/
-// Submitted by Eric Kinolik <kilo@amazon.com> 2015-04-08
+// Submitted by Luke Wells <lawells@amazon.com>
 s3.amazonaws.com
 s3-ap-northeast-1.amazonaws.com
+s3-ap-northeast-2.amazonaws.com
 s3-ap-southeast-1.amazonaws.com
 s3-ap-southeast-2.amazonaws.com
+s3-eu-central-1.amazonaws.com
+s3-eu-west-1.amazonaws.com
 s3-external-1.amazonaws.com
 s3-external-2.amazonaws.com
 s3-fips-us-gov-west-1.amazonaws.com
-s3-eu-central-1.amazonaws.com
-s3-eu-west-1.amazonaws.com
 s3-sa-east-1.amazonaws.com
 s3-us-gov-west-1.amazonaws.com
 s3-us-west-1.amazonaws.com
 s3-us-west-2.amazonaws.com
+s3.ap-northeast-2.amazonaws.com
 s3.cn-north-1.amazonaws.com.cn
 s3.eu-central-1.amazonaws.com
 
 // BetaInABox
-// Submitted by adrian@betainabox.com 2012-09-13
+// Submitted by Adrian <adrian@betainabox.com>
 betainabox.com
 
 // CentralNic : http://www.centralnic.com/names/domains
-// Submitted by registry <gavin.brown@centralnic.com> 2012-09-27
+// Submitted by registry <gavin.brown@centralnic.com>
 ae.org
 ar.com
 br.com
@@ -11081,38 +11088,46 @@ za.bz
 za.com
 
 // Africa.com Web Solutions Ltd : https://registry.africa.com
-// Submitted by Gavin Brown <gavin.brown@centralnic.com> 2014-02-04
+// Submitted by Gavin Brown <gavin.brown@centralnic.com>
 africa.com
 
+// Citrix : https://citrix.com
+// Submitted by Alex Stoddard <alex.stoddard@citrix.com>
+xenapponazure.com
+
 // iDOT Services Limited : http://www.domain.gr.com
-// Submitted by Gavin Brown <gavin.brown@centralnic.com> 2014-02-04
+// Submitted by Gavin Brown <gavin.brown@centralnic.com>
 gr.com
 
 // Radix FZC : http://domains.in.net
-// Submitted by Gavin Brown <gavin.brown@centralnic.com> 2014-02-04
+// Submitted by Gavin Brown <gavin.brown@centralnic.com>
 in.net
 
 // US REGISTRY LLC : http://us.org
-// Submitted by Gavin Brown <gavin.brown@centralnic.com> 2014-02-04
+// Submitted by Gavin Brown <gavin.brown@centralnic.com>
 us.org
 
 // co.com Registry, LLC : https://registry.co.com
-// Submitted by Gavin Brown <gavin.brown@centralnic.com> 2014-02-04
+// Submitted by Gavin Brown <gavin.brown@centralnic.com>
 co.com
 
 // c.la : http://www.c.la/
 c.la
 
 // cloudControl : https://www.cloudcontrol.com/
-// Submitted by Tobias Wilken <tw@cloudcontrol.com> 2013-07-23
+// Submitted by Tobias Wilken <tw@cloudcontrol.com>
 cloudcontrolled.com
 cloudcontrolapp.com
 
 // co.ca : http://registry.co.ca/
 co.ca
 
+// i-registry s.r.o. : http://www.i-registry.cz/
+// Submitted by Martin Semrad <semrad@i-registry.cz>
+co.cz
+
 // CDN77.com : http://www.cdn77.com
-// Submitted by Jan Krpes <jan.krpes@cdn77.com> 2015-07-13
+// Submitted by Jan Krpes <jan.krpes@cdn77.com>
 c.cdn77.org
 cdn77-ssl.net
 r.cdn77.net
@@ -11124,23 +11139,23 @@ co.nl
 co.no
 
 // Commerce Guys, SAS
-// Submitted by Damien Tournoud <damien@commerceguys.com> 2015-01-22
+// Submitted by Damien Tournoud <damien@commerceguys.com>
 *.platform.sh
 
 // Cupcake : https://cupcake.io/
-// Submitted by Jonathan Rudenberg <jonathan@cupcake.io> 2013-10-08
+// Submitted by Jonathan Rudenberg <jonathan@cupcake.io>
 cupcake.is
 
 // DreamHost : http://www.dreamhost.com/
-// Submitted by Andrew Farmer <andrew.farmer@dreamhost.com> 2012-10-02
+// Submitted by Andrew Farmer <andrew.farmer@dreamhost.com>
 dreamhosters.com
 
 // Drobo : http://www.drobo.com/
-// Submitted by Ricardo Padilha <rpadilha@drobo.com> 2015-12-17
+// Submitted by Ricardo Padilha <rpadilha@drobo.com>
 mydrobo.com
 
 // DuckDNS : http://www.duckdns.org/
-// Submitted by Richard Harper <richard@duckdns.org> 2015-05-17
+// Submitted by Richard Harper <richard@duckdns.org>
 duckdns.org
 
 // DynDNS.com : http://www.dyndns.com/services/dns/dyndns/
@@ -11425,8 +11440,7 @@ worse-than.tv
 writesthisblog.com
 
 // EU.org https://eu.org/
-// Submitted by Pierre Beyssac <hostmaster@eu.org> 2015-04-17
-
+// Submitted by Pierre Beyssac <hostmaster@eu.org>
 eu.org
 al.eu.org
 asso.eu.org
@@ -11485,7 +11499,7 @@ uk.eu.org
 us.eu.org
 
 // Fastly Inc. http://www.fastly.com/
-// Submitted by Vladimir Vuksan <vladimir@fastly.com> 2013-05-31
+// Submitted by Vladimir Vuksan <vladimir@fastly.com>
 a.ssl.fastly.net
 b.ssl.fastly.net
 global.ssl.fastly.net
@@ -11493,28 +11507,28 @@ a.prod.fastly.net
 global.prod.fastly.net
 
 // Firebase, Inc.
-// Submitted by Chris Raynor <chris@firebase.com> 2014-01-21
+// Submitted by Chris Raynor <chris@firebase.com>
 firebaseapp.com
 
 // Flynn : https://flynn.io
-// Submitted by Jonathan Rudenberg <jonathan@flynn.io> 2014-07-12
+// Submitted by Jonathan Rudenberg <jonathan@flynn.io>
 flynnhub.com
 
 // GDS : https://www.gov.uk/service-manual/operations/operating-servicegovuk-subdomains
-// Submitted by David Illsley <david.illsley@digital.cabinet-office.gov.uk> 2014-08-28
+// Submitted by David Illsley <david.illsley@digital.cabinet-office.gov.uk>
 service.gov.uk
 
 // GitHub, Inc.
-// Submitted by Ben Toews <btoews@github.com> 2014-02-06
+// Submitted by Ben Toews <btoews@github.com>
 github.io
 githubusercontent.com
 
 // GlobeHosting, Inc.
-// Submitted by Zoltan Egresi <egresi@globehosting.com> 2013-07-12
+// Submitted by Zoltan Egresi <egresi@globehosting.com>
 ro.com
 
 // Google, Inc.
-// Submitted by Eduardo Vela <evn@google.com> 2014-12-19
+// Submitted by Eduardo Vela <evn@google.com>
 appspot.com
 blogspot.ae
 blogspot.al
@@ -11602,12 +11616,12 @@ withyoutube.com
 hashbang.sh
 
 // Heroku : https://www.heroku.com/
-// Submitted by Tom Maher <tmaher@heroku.com> 2013-05-02
+// Submitted by Tom Maher <tmaher@heroku.com>
 herokuapp.com
 herokussl.com
 
 // iki.fi
-// Submitted by Hannu Aronsson <haa@iki.fi> 2009-11-05
+// Submitted by Hannu Aronsson <haa@iki.fi>
 iki.fi
 
 // info.at : http://www.info.at/
@@ -11618,45 +11632,45 @@ info.at
 co.pl
 
 // Microsoft : http://microsoft.com
-// Submitted by Barry Dorrans <bdorrans@microsoft.com> 2014-01-24
+// Submitted by Barry Dorrans <bdorrans@microsoft.com>
 azurewebsites.net
 azure-mobile.net
 cloudapp.net
 
 // Mozilla Foundation : https://mozilla.org/
-// Submited by glob <glob@mozilla.com> 2015-07-06
+// Submitted by glob <glob@mozilla.com>
 bmoattachments.org
 
 // Neustar Inc.
-// Submitted by Trung Tran <Trung.Tran@neustar.biz> 2015-04-23
+// Submitted by Trung Tran <Trung.Tran@neustar.biz>
 4u.com
 
 // ngrok : https://ngrok.com/
-// Submitted by Alan Shreve <alan@ngrok.com> 2015-11-10
+// Submitted by Alan Shreve <alan@ngrok.com>
 ngrok.io
 
 // NFSN, Inc. : https://www.NearlyFreeSpeech.NET/
-// Submitted by Jeff Wheelhouse <support@nearlyfreespeech.net> 2014-02-02
+// Submitted by Jeff Wheelhouse <support@nearlyfreespeech.net>
 nfshost.com
 
 // NYC.mn : http://www.information.nyc.mn
-// Submitted by Matthew Brown <mattbrown@nyc.mn> 2013-03-11
+// Submitted by Matthew Brown <mattbrown@nyc.mn>
 nyc.mn
 
 // One Fold Media : http://www.onefoldmedia.com/
-// Submitted by Eddie Jones <eddie@onefoldmedia.com> 2014-06-10
+// Submitted by Eddie Jones <eddie@onefoldmedia.com>
 nid.io
 
 // Opera Software, A.S.A.
-// Submitted by Yngve Pettersen <yngve@opera.com> 2009-11-26
+// Submitted by Yngve Pettersen <yngve@opera.com>
 operaunite.com
 
 // OutSystems
-// Submitted by Duarte Santos <domain-admin@outsystemscloud.com> 2014-03-11
+// Submitted by Duarte Santos <domain-admin@outsystemscloud.com>
 outsystemscloud.com
 
 // Pagefront : https://www.pagefronthq.com/
-// Submitted by Jason Kriss <jason@pagefronthq.com> 2015-12-02
+// Submitted by Jason Kriss <jason@pagefronthq.com>
 pagefrontapp.com
 
 // .pl domains (grandfathered)
@@ -11668,45 +11682,49 @@ wroc.pl
 zakopane.pl
 
 // Pantheon Systems, Inc. : https://pantheon.io/
-// Submitted by Gary Dylina <gary@pantheon.io> 2015-09-14
+// Submitted by Gary Dylina <gary@pantheon.io>
 pantheon.io
 gotpantheon.com
 
+// prgmr.com : https://prgmr.com/
+// Submitted by Sarah Newman <owner@prgmr.com>
+xen.prgmr.com
+
 // priv.at : http://www.nic.priv.at/
-// Submitted by registry <lendl@nic.at> 2008-06-09
+// Submitted by registry <lendl@nic.at>
 priv.at
 
 // QA2
-// Submitted by Daniel Dent (https://www.danieldent.com/) 2015-07-16
+// Submitted by Daniel Dent (https://www.danieldent.com/)
 qa2.com
 
 // Rackmaze LLC : https://www.rackmaze.com
-// Submitted by Kirill Pertsev <kika@rackmaze.com> 2015-12-02
+// Submitted by Kirill Pertsev <kika@rackmaze.com>
 rackmaze.com
 rackmaze.net
 
 // Red Hat, Inc. OpenShift : https://openshift.redhat.com/
-// Submitted by Tim Kramer <tkramer@rhcloud.com> 2012-10-24
+// Submitted by Tim Kramer <tkramer@rhcloud.com>
 rhcloud.com
 
 // Sandstorm Development Group, Inc. : https://sandcats.io/
-// Submitted by Asheesh Laroia <asheesh@sandstorm.io> 2015-07-21
+// Submitted by Asheesh Laroia <asheesh@sandstorm.io>
 sandcats.io
 
 // Service Online LLC : http://drs.ua/
-// Submitted by Serhii Bulakh <support@drs.ua> 2015-07-30
+// Submitted by Serhii Bulakh <support@drs.ua>
 biz.ua
 co.ua
 pp.ua
 
 // SinaAppEngine : http://sae.sina.com.cn/
-// Submitted by SinaAppEngine <saesupport@sinacloud.com> 2015-02-02
+// Submitted by SinaAppEngine <saesupport@sinacloud.com>
 sinaapp.com
 vipsinaapp.com
 1kapp.com
 
 // Synology, Inc. : https://www.synology.com/
-// Submitted by Rony Weng <ronyweng@synology.com> 2015-12-02
+// Submitted by Rony Weng <ronyweng@synology.com>
 diskstation.me
 dscloud.biz
 dscloud.me
@@ -11729,18 +11747,18 @@ med.pl
 sopot.pl
 
 // UDR Limited : http://www.udr.hk.com
-// Submitted by registry <hostmaster@udr.hk.com> 2014-11-07
+// Submitted by registry <hostmaster@udr.hk.com>
 hk.com
 hk.org
 ltd.hk
 inc.hk
 
 // Yola : https://www.yola.com/
-// Submitted by Stefano Rivera <stefano@yola.com> 2014-07-09
+// Submitted by Stefano Rivera <stefano@yola.com>
 yolasite.com
 
 // ZaNiC : http://www.za.net/
-// Submitted by registry <hostmaster@nic.za.net> 2009-10-03
+// Submitted by registry <hostmaster@nic.za.net>
 za.net
 za.org
 
diff --git a/net/ddns-scripts/files/update_CloudFlare.sh b/net/ddns-scripts/files/update_CloudFlare.sh
deleted file mode 100644 (file)
index 15f3afd..0000000
+++ /dev/null
@@ -1,144 +0,0 @@
-#
-#.Distributed under the terms of the GNU General Public License (GPL) version 2.0
-#
-# script for sending updates to cloudflare.com
-#.2014-2015 Christian Schoenebeck <christian dot schoenebeck at gmail dot com>
-# many thanks to Paul for testing and feedback during development
-#
-# This script is parsed by dynamic_dns_functions.sh inside send_update() function
-#
-# using following options from /etc/config/ddns
-# option username - your cloudflare e-mail
-# option password - cloudflare api key, you can get it from cloudflare.com/my-account/
-# option domain   - your full hostname to update, in cloudflare its subdomain.domain
-#                      i.e. myhost.example.com where myhost is the subdomain and example.com is your domain
-#
-# variable __IP already defined with the ip-address to use for update
-#
-[ $use_https -eq 0 ] && write_log 14 "Cloudflare only support updates via Secure HTTP (HTTPS). Please correct configuration!"
-[ -z "$username" ] && write_log 14 "Service section not configured correctly! Missing 'username'"
-[ -z "$password" ] && write_log 14 "Service section not configured correctly! Missing 'password'"
-
-local __RECID __URL __KEY __KEYS __FOUND __SUBDOM __DOMAIN __TLD
-
-# split given Host/Domain into TLD, registrable domain, and subdomain
-split_FQDN $domain __TLD __DOMAIN __SUBDOM
-[ $? -ne 0 -o -z "$__DOMAIN" ] && \
-       write_log 14 "Wrong Host/Domain configuration ($domain). Please correct configuration!"
-
-# put together what we need
-__DOMAIN="$__DOMAIN.$__TLD"
-
-# parse OpenWrt script with
-# functions for parsing and generating json
-. /usr/share/libubox/jshn.sh
-
-# function copied from /usr/share/libubox/jshn.sh
-# from BB14.09 for backward compatibility to AA12.09
-grep -i "json_get_keys" /usr/share/libubox/jshn.sh >/dev/null 2>&1 || json_get_keys() {
-       local __dest="$1"
-       local _tbl_cur
-
-       if [ -n "$2" ]; then
-               json_get_var _tbl_cur "$2"
-       else
-               _json_get_var _tbl_cur JSON_CUR
-       fi
-       local __var="${JSON_PREFIX}KEYS_${_tbl_cur}"
-       eval "export -- \"$__dest=\${$__var}\"; [ -n \"\${$__var+x}\" ]"
-}
-
-# function to "sed" unwanted string parts from DATFILE
-cleanup() {
-       # based on the sample output on cloudflare.com homepage we need to do some cleanup
-       sed -i 's/^[ \t]*//;s/[ \t]*$//' $DATFILE       # remove invisible chars at beginning and end of lines
-       sed -i '/^-$/d' $DATFILE                        # remove lines with "-" (dash)
-       sed -i '/^$/d' $DATFILE                         # remove empty lines
-       sed -i "#'##g" $DATFILE                         # remove "'" (single quote)
-}
-
-[ -n "$rec_id" ] && __RECID="$rec_id" || {
-       # build url according to cloudflare client api at https://www.cloudflare.com/docs/client-api.html
-       # to "rec_load_all" to detect rec_id needed for update
-       __URL="https://www.cloudflare.com/api_json.html"        # https://www.cloudflare.com/api_json.html
-       __URL="${__URL}?a=rec_load_all"                         #  -d 'a=rec_load_all'
-       __URL="${__URL}&tkn=$password"                          #  -d 'tkn=8afbe6dea02407989af4dd4c97bb6e25'
-       __URL="${__URL}&email=$username"                        #  -d 'email=sample@example.com'
-       __URL="${__URL}&z=$__DOMAIN"                            #  -d 'z=example.com'
-
-       # lets request the data
-       do_transfer "$__URL" || return 1
-
-       cleanup                         # cleanup dat file
-       json_load "$(cat $DATFILE)"     # lets extract data
-       __FOUND=0                       # found record indicator
-       json_get_var __RES "result"     # cloudflare result of last request
-       json_get_var __MSG "msg"        # cloudflare error message
-       [ "$__RES" != "success" ] && {
-               write_log 4 "'rec_load_all' failed with error: \n$__MSG"
-               return 1
-       }
-
-       json_select "response"
-       json_select "recs"
-       json_select "objs"
-       json_get_keys __KEYS
-       for __KEY in $__KEYS; do
-               local __ZONE __DISPLAY __NAME __TYPE
-               json_select "$__KEY"
-       #       json_get_var __ZONE "zone_name"         # for debugging
-       #       json_get_var __DISPLAY "display_name"   # for debugging
-               json_get_var __NAME "name"
-               json_get_var __TYPE "type"
-               if [ "$__NAME" = "$domain" ]; then
-                       # we must verify IPv4 and IPv6 because there might be both for the same host
-                       [ \( $use_ipv6 -eq 0 -a "$__TYPE" = "A" \) -o \( $use_ipv6 -eq 1 -a "$__TYPE" = "AAAA" \) ] && {
-                               __FOUND=1       # mark found
-                               break           # found leave for loop
-                       }
-               fi
-               json_select ..
-       done
-       [ $__FOUND -eq 0 ] && {
-               # we don't need to continue trying to update cloudflare because record to update does not exist
-               # user has to setup record first outside ddns-scripts
-               write_log 14 "No valid record found at Cloudflare setup. Please create first!"
-       }
-       json_get_var __RECID "rec_id"   # last thing to do get rec_id
-       json_cleanup                    # cleanup
-       write_log 7 "rec_id '$__RECID' detected for host/domain '$domain'"
-}
-
-# build url according to cloudflare client api at https://www.cloudflare.com/docs/client-api.html
-# for "rec_edit" to update IP address
-__URL="https://www.cloudflare.com/api_json.html"       # https://www.cloudflare.com/api_json.html
-__URL="${__URL}?a=rec_edit"                            #  -d 'a=rec_edit'
-__URL="${__URL}&tkn=$password"                         #  -d 'tkn=8afbe6dea02407989af4dd4c97bb6e25'
-__URL="${__URL}&id=$__RECID"                           #  -d 'id=9001'
-__URL="${__URL}&email=$username"                       #  -d 'email=sample@example.com'
-__URL="${__URL}&z=$__DOMAIN"                           #  -d 'z=example.com'
-
-[ $use_ipv6 -eq 0 ] && __URL="${__URL}&type=A"         #  -d 'type=A'          (IPv4)
-[ $use_ipv6 -eq 1 ] && __URL="${__URL}&type=AAAA"      #  -d 'type=AAAA'       (IPv6)
-
-# handle subdomain or domain record
-[ -n "$__SUBDOM" ] && __URL="${__URL}&name=$__SUBDOM"  #  -d 'name=sub'        (HOST/SUBDOMAIN)
-[ -z "$__SUBDOM" ] && __URL="${__URL}&name=$__DOMAIN"  #  -d 'name=example.com'(DOMAIN)
-
-__URL="${__URL}&content=$__IP"                         #  -d 'content=1.2.3.4'
-__URL="${__URL}&service_mode=0"                                #  -d 'service_mode=0'
-__URL="${__URL}&ttl=1"                                 #  -d 'ttl=1'
-
-# lets do the update
-do_transfer "$__URL" || return 1
-
-cleanup                                # cleanup tmp file
-json_load "$(cat $DATFILE)"    # lets extract data
-json_get_var __RES "result"    # cloudflare result of last request
-json_get_var __MSG "msg"       # cloudflare error message
-[ "$__RES" != "success" ] && {
-       write_log 4 "'rec_edit' failed with error:\n$__MSG"
-       return 1
-}
-write_log 7 "Update of rec_id '$__RECID' successful"
-return 0
diff --git a/net/ddns-scripts/files/update_No-IP.com.sh b/net/ddns-scripts/files/update_No-IP.com.sh
deleted file mode 100644 (file)
index 9d73448..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-#
-#.Distributed under the terms of the GNU General Public License (GPL) version 2.0
-#
-# script for sending updates to no-ip.com / noip.com
-#.2014-2015 Christian Schoenebeck <christian dot schoenebeck at gmail dot com>
-#
-# This script is parsed by dynamic_dns_functions.sh inside send_update() function
-#
-# provider did not reactivate records, if no IP change was recognized
-# so we send a dummy (localhost) and a seconds later we send the correct IP addr
-#
-local __DUMMY
-local __UPDURL="http://[USERNAME]:[PASSWORD]@dynupdate.no-ip.com/nic/update?hostname=[DOMAIN]&myip=[IP]"
-# inside url we need username and password
-[ -z "$username" ] && write_log 14 "Service section not configured correctly! Missing 'username'"
-[ -z "$password" ] && write_log 14 "Service section not configured correctly! Missing 'password'"
-
-# set IP version dependend dummy (localhost)
-[ $use_ipv6 -eq 0 ] && __DUMMY="127.0.0.1" || __DUMMY="::1"
-
-# lets do DUMMY transfer
-write_log 7 "sending dummy IP to 'no-ip.com'"
-__URL=$(echo $__UPDURL | sed -e "s#\[USERNAME\]#$URL_USER#g" -e "s#\[PASSWORD\]#$URL_PASS#g" \
-                              -e "s#\[DOMAIN\]#$domain#g" -e "s#\[IP\]#$__DUMMY#g")
-[ $use_https -ne 0 ] && __URL=$(echo $__URL | sed -e 's#^http:#https:#')
-
-do_transfer "$__URL" || return 1
-
-write_log 7 "'no-ip.com' answered:\n$(cat $DATFILE)"
-# analyse provider answers
-# "good [IP_ADR]"      = successful
-# "nochg [IP_ADR]"     = no change but OK
-grep -E "good|nochg" $DATFILE >/dev/null 2>&1 || return 1
-
-# lets wait a seconds
-sleep 1
-
-# now send the correct data
-write_log 7 "sending real IP to 'no-ip.com'"
-__URL=$(echo $__UPDURL | sed -e "s#\[USERNAME\]#$URL_USER#g" -e "s#\[PASSWORD\]#$URL_PASS#g" \
-                              -e "s#\[DOMAIN\]#$domain#g" -e "s#\[IP\]#$__IP#g")
-[ $use_https -ne 0 ] && __URL=$(echo $__URL | sed -e 's#^http:#https:#')
-
-do_transfer "$__URL" || return 1
-
-write_log 7 "'no-ip.com' answered:\n$(cat $DATFILE)"
-# analyse provider answers
-# "good [IP_ADR]"      = successful
-# "nochg [IP_ADR]"     = no change but OK
-grep -E "good|nochg" $DATFILE >/dev/null 2>&1
-return $?      # "0" if "good" or "nochg" found
-
diff --git a/net/ddns-scripts/files/update_cloudflare_com.sh b/net/ddns-scripts/files/update_cloudflare_com.sh
new file mode 100755 (executable)
index 0000000..15f3afd
--- /dev/null
@@ -0,0 +1,144 @@
+#
+#.Distributed under the terms of the GNU General Public License (GPL) version 2.0
+#
+# script for sending updates to cloudflare.com
+#.2014-2015 Christian Schoenebeck <christian dot schoenebeck at gmail dot com>
+# many thanks to Paul for testing and feedback during development
+#
+# This script is parsed by dynamic_dns_functions.sh inside send_update() function
+#
+# using following options from /etc/config/ddns
+# option username - your cloudflare e-mail
+# option password - cloudflare api key, you can get it from cloudflare.com/my-account/
+# option domain   - your full hostname to update, in cloudflare its subdomain.domain
+#                      i.e. myhost.example.com where myhost is the subdomain and example.com is your domain
+#
+# variable __IP already defined with the ip-address to use for update
+#
+[ $use_https -eq 0 ] && write_log 14 "Cloudflare only support updates via Secure HTTP (HTTPS). Please correct configuration!"
+[ -z "$username" ] && write_log 14 "Service section not configured correctly! Missing 'username'"
+[ -z "$password" ] && write_log 14 "Service section not configured correctly! Missing 'password'"
+
+local __RECID __URL __KEY __KEYS __FOUND __SUBDOM __DOMAIN __TLD
+
+# split given Host/Domain into TLD, registrable domain, and subdomain
+split_FQDN $domain __TLD __DOMAIN __SUBDOM
+[ $? -ne 0 -o -z "$__DOMAIN" ] && \
+       write_log 14 "Wrong Host/Domain configuration ($domain). Please correct configuration!"
+
+# put together what we need
+__DOMAIN="$__DOMAIN.$__TLD"
+
+# parse OpenWrt script with
+# functions for parsing and generating json
+. /usr/share/libubox/jshn.sh
+
+# function copied from /usr/share/libubox/jshn.sh
+# from BB14.09 for backward compatibility to AA12.09
+grep -i "json_get_keys" /usr/share/libubox/jshn.sh >/dev/null 2>&1 || json_get_keys() {
+       local __dest="$1"
+       local _tbl_cur
+
+       if [ -n "$2" ]; then
+               json_get_var _tbl_cur "$2"
+       else
+               _json_get_var _tbl_cur JSON_CUR
+       fi
+       local __var="${JSON_PREFIX}KEYS_${_tbl_cur}"
+       eval "export -- \"$__dest=\${$__var}\"; [ -n \"\${$__var+x}\" ]"
+}
+
+# function to "sed" unwanted string parts from DATFILE
+cleanup() {
+       # based on the sample output on cloudflare.com homepage we need to do some cleanup
+       sed -i 's/^[ \t]*//;s/[ \t]*$//' $DATFILE       # remove invisible chars at beginning and end of lines
+       sed -i '/^-$/d' $DATFILE                        # remove lines with "-" (dash)
+       sed -i '/^$/d' $DATFILE                         # remove empty lines
+       sed -i "#'##g" $DATFILE                         # remove "'" (single quote)
+}
+
+[ -n "$rec_id" ] && __RECID="$rec_id" || {
+       # build url according to cloudflare client api at https://www.cloudflare.com/docs/client-api.html
+       # to "rec_load_all" to detect rec_id needed for update
+       __URL="https://www.cloudflare.com/api_json.html"        # https://www.cloudflare.com/api_json.html
+       __URL="${__URL}?a=rec_load_all"                         #  -d 'a=rec_load_all'
+       __URL="${__URL}&tkn=$password"                          #  -d 'tkn=8afbe6dea02407989af4dd4c97bb6e25'
+       __URL="${__URL}&email=$username"                        #  -d 'email=sample@example.com'
+       __URL="${__URL}&z=$__DOMAIN"                            #  -d 'z=example.com'
+
+       # lets request the data
+       do_transfer "$__URL" || return 1
+
+       cleanup                         # cleanup dat file
+       json_load "$(cat $DATFILE)"     # lets extract data
+       __FOUND=0                       # found record indicator
+       json_get_var __RES "result"     # cloudflare result of last request
+       json_get_var __MSG "msg"        # cloudflare error message
+       [ "$__RES" != "success" ] && {
+               write_log 4 "'rec_load_all' failed with error: \n$__MSG"
+               return 1
+       }
+
+       json_select "response"
+       json_select "recs"
+       json_select "objs"
+       json_get_keys __KEYS
+       for __KEY in $__KEYS; do
+               local __ZONE __DISPLAY __NAME __TYPE
+               json_select "$__KEY"
+       #       json_get_var __ZONE "zone_name"         # for debugging
+       #       json_get_var __DISPLAY "display_name"   # for debugging
+               json_get_var __NAME "name"
+               json_get_var __TYPE "type"
+               if [ "$__NAME" = "$domain" ]; then
+                       # we must verify IPv4 and IPv6 because there might be both for the same host
+                       [ \( $use_ipv6 -eq 0 -a "$__TYPE" = "A" \) -o \( $use_ipv6 -eq 1 -a "$__TYPE" = "AAAA" \) ] && {
+                               __FOUND=1       # mark found
+                               break           # found leave for loop
+                       }
+               fi
+               json_select ..
+       done
+       [ $__FOUND -eq 0 ] && {
+               # we don't need to continue trying to update cloudflare because record to update does not exist
+               # user has to setup record first outside ddns-scripts
+               write_log 14 "No valid record found at Cloudflare setup. Please create first!"
+       }
+       json_get_var __RECID "rec_id"   # last thing to do get rec_id
+       json_cleanup                    # cleanup
+       write_log 7 "rec_id '$__RECID' detected for host/domain '$domain'"
+}
+
+# build url according to cloudflare client api at https://www.cloudflare.com/docs/client-api.html
+# for "rec_edit" to update IP address
+__URL="https://www.cloudflare.com/api_json.html"       # https://www.cloudflare.com/api_json.html
+__URL="${__URL}?a=rec_edit"                            #  -d 'a=rec_edit'
+__URL="${__URL}&tkn=$password"                         #  -d 'tkn=8afbe6dea02407989af4dd4c97bb6e25'
+__URL="${__URL}&id=$__RECID"                           #  -d 'id=9001'
+__URL="${__URL}&email=$username"                       #  -d 'email=sample@example.com'
+__URL="${__URL}&z=$__DOMAIN"                           #  -d 'z=example.com'
+
+[ $use_ipv6 -eq 0 ] && __URL="${__URL}&type=A"         #  -d 'type=A'          (IPv4)
+[ $use_ipv6 -eq 1 ] && __URL="${__URL}&type=AAAA"      #  -d 'type=AAAA'       (IPv6)
+
+# handle subdomain or domain record
+[ -n "$__SUBDOM" ] && __URL="${__URL}&name=$__SUBDOM"  #  -d 'name=sub'        (HOST/SUBDOMAIN)
+[ -z "$__SUBDOM" ] && __URL="${__URL}&name=$__DOMAIN"  #  -d 'name=example.com'(DOMAIN)
+
+__URL="${__URL}&content=$__IP"                         #  -d 'content=1.2.3.4'
+__URL="${__URL}&service_mode=0"                                #  -d 'service_mode=0'
+__URL="${__URL}&ttl=1"                                 #  -d 'ttl=1'
+
+# lets do the update
+do_transfer "$__URL" || return 1
+
+cleanup                                # cleanup tmp file
+json_load "$(cat $DATFILE)"    # lets extract data
+json_get_var __RES "result"    # cloudflare result of last request
+json_get_var __MSG "msg"       # cloudflare error message
+[ "$__RES" != "success" ] && {
+       write_log 4 "'rec_edit' failed with error:\n$__MSG"
+       return 1
+}
+write_log 7 "Update of rec_id '$__RECID' successful"
+return 0
diff --git a/net/ddns-scripts/files/update_no-ip_com.sh b/net/ddns-scripts/files/update_no-ip_com.sh
new file mode 100755 (executable)
index 0000000..9d73448
--- /dev/null
@@ -0,0 +1,52 @@
+#
+#.Distributed under the terms of the GNU General Public License (GPL) version 2.0
+#
+# script for sending updates to no-ip.com / noip.com
+#.2014-2015 Christian Schoenebeck <christian dot schoenebeck at gmail dot com>
+#
+# This script is parsed by dynamic_dns_functions.sh inside send_update() function
+#
+# provider did not reactivate records, if no IP change was recognized
+# so we send a dummy (localhost) and a seconds later we send the correct IP addr
+#
+local __DUMMY
+local __UPDURL="http://[USERNAME]:[PASSWORD]@dynupdate.no-ip.com/nic/update?hostname=[DOMAIN]&myip=[IP]"
+# inside url we need username and password
+[ -z "$username" ] && write_log 14 "Service section not configured correctly! Missing 'username'"
+[ -z "$password" ] && write_log 14 "Service section not configured correctly! Missing 'password'"
+
+# set IP version dependend dummy (localhost)
+[ $use_ipv6 -eq 0 ] && __DUMMY="127.0.0.1" || __DUMMY="::1"
+
+# lets do DUMMY transfer
+write_log 7 "sending dummy IP to 'no-ip.com'"
+__URL=$(echo $__UPDURL | sed -e "s#\[USERNAME\]#$URL_USER#g" -e "s#\[PASSWORD\]#$URL_PASS#g" \
+                              -e "s#\[DOMAIN\]#$domain#g" -e "s#\[IP\]#$__DUMMY#g")
+[ $use_https -ne 0 ] && __URL=$(echo $__URL | sed -e 's#^http:#https:#')
+
+do_transfer "$__URL" || return 1
+
+write_log 7 "'no-ip.com' answered:\n$(cat $DATFILE)"
+# analyse provider answers
+# "good [IP_ADR]"      = successful
+# "nochg [IP_ADR]"     = no change but OK
+grep -E "good|nochg" $DATFILE >/dev/null 2>&1 || return 1
+
+# lets wait a seconds
+sleep 1
+
+# now send the correct data
+write_log 7 "sending real IP to 'no-ip.com'"
+__URL=$(echo $__UPDURL | sed -e "s#\[USERNAME\]#$URL_USER#g" -e "s#\[PASSWORD\]#$URL_PASS#g" \
+                              -e "s#\[DOMAIN\]#$domain#g" -e "s#\[IP\]#$__IP#g")
+[ $use_https -ne 0 ] && __URL=$(echo $__URL | sed -e 's#^http:#https:#')
+
+do_transfer "$__URL" || return 1
+
+write_log 7 "'no-ip.com' answered:\n$(cat $DATFILE)"
+# analyse provider answers
+# "good [IP_ADR]"      = successful
+# "nochg [IP_ADR]"     = no change but OK
+grep -E "good|nochg" $DATFILE >/dev/null 2>&1
+return $?      # "0" if "good" or "nochg" found
+
index cfb1949c3288c6bb1dbfe8e48dfaa6ad258ed0c0..313f1d3d5f62951ec37c64929ac524b7712632e9 100644 (file)
@@ -8,9 +8,9 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gnunet
-PKG_SOURCE_VERSION:=36713
+PKG_SOURCE_VERSION:=36918
 PKG_VERSION:=0.10.1-svn$(PKG_SOURCE_VERSION)
-PKG_RELEASE:=3
+PKG_RELEASE:=1
 
 # ToDo:
 #  - break-out {peer,name,data}store for each backend
@@ -39,7 +39,7 @@ CONFIGURE_ARGS+= \
        $(if $(CONFIG_PACKAGE_$(PKG_NAME)-mysql),--with-mysql="$(STAGING_DIR)/usr",--without-mysql) \
        $(if $(CONFIG_PACKAGE_$(PKG_NAME)-pgsql),--with-postgresql="$(STAGING_DIR)/usr/bin/pg_config",--without-postgresql) \
        $(if $(CONFIG_PACKAGE_$(PKG_NAME)-sqlite),--with-sqlite="$(STAGING_DIR)/usr",--without-sqlite) \
-       $(if $(CONFIG_PACKAGE_$(PKG_NAME)-experiments),--enable-experimental,--disable-experimental) \
+       --enable-experimental \
        --with-extractor=$(STAGING_DIR)/usr \
        --with-gnutls=$(STAGING_DIR)/usr \
        --with-libgnurl=$(STAGING_DIR)/usr \
@@ -200,10 +200,16 @@ LIBEXEC_transport-wlan:=helper-transport-wlan
 
 DEPENDS_experiments:=+libglpk +gnunet-sqlite
 BIN_experiments:=multicast rps
-LIB_experiments:=consensus dv env multicast psyc psycstore psycutil rps secretsharing social
-PLUGIN_experiments:=ats_mlp ats_ril namecache_flat namestore_flat psycstore_sqlite transport_dv
-LIBEXEC_experiments:=service-consensus service-dv service-evil-consensus service-multicast service-psyc service-psycstore service-rps service-secretsharing service-social
-CONF_experiments:=consensus dv multicast psyc psycstore rps secretsharing social
+LIB_experiments:=consensus env multicast psyc psycstore psycutil rps secretsharing social
+PLUGIN_experiments:=ats_mlp ats_ril psycstore_sqlite
+LIBEXEC_experiments:=service-consensus service-dht-whanau service-dht-xvine service-evil-consensus service-multicast service-psyc service-psycstore service-rps service-secretsharing service-social
+CONF_experiments:=consensus multicast psyc psycstore rps secretsharing social
+
+# BIN_dv:=dv
+LIB_dv:=dv
+PLUGIN_dv:=transport_dv
+LIBEXEC_dv:=service-dv
+CONF_dv:=dv
 
 DEPENDS_fs:=+gnunet-datastore +libextractor
 BIN_fs:=auto-share directory download download-manager.scm fs publish unindex search
@@ -227,12 +233,15 @@ PLUGIN_datastore:=datastore_heap
 LIBEXEC_datastore:=daemon-latency-logger service-datastore
 CONF_datastore:=datastore
 
+DEPENDS_flat:=+gnunet-gns
+PLUGIN_flat:=namecache_flat namestore_flat
+
 DEPENDS_mysql:=+gnunet-gns +gnunet-datastore +libmysqlclient
 LIB_mysql:=mysql
 PLUGIN_mysql:=datastore_mysql
 
 DEPENDS_pgsql:=+gnunet-gns +gnunet-datastore +libpq
-LIB_pgsql:=postgres
+LIB_pgsql:=postgres pq
 PLUGIN_pgsql:=datacache_postgres datastore_postgres namecache_postgres namestore_postgres
 
 DEPENDS_sqlite:=+gnunet-gns +gnunet-datastore +libsqlite3
@@ -254,6 +263,7 @@ CONF_vpn:=exit pt vpn
 $(eval $(call BuildPackage,gnunet))
 $(eval $(call BuildComponent,conversation,conversation component,))
 $(eval $(call BuildComponent,experiments,experimental components,))
+$(eval $(call BuildComponent,dv,distance-vector routing component,))
 $(eval $(call BuildComponent,fs,file-sharing components,))
 $(eval $(call BuildComponent,gns,name resolution components,y))
 $(eval $(call BuildComponent,datastore,storage components,))
@@ -263,6 +273,7 @@ $(eval $(call BuildComponent,transport-http_server,HTTP/HTTPS server transport,)
 $(eval $(call BuildComponent,transport-wlan,WLAN transport,))
 $(eval $(call BuildComponent,utils,administration utililties,))
 $(eval $(call BuildComponent,vpn,vpn components,y))
+$(eval $(call BuildComponent,flat,flat storage backends,))
 $(eval $(call BuildComponent,mysql,mySQL datastore backend,))
 $(eval $(call BuildComponent,pgsql,PostgreSQL backends,))
 $(eval $(call BuildComponent,sqlite,libsqlite3 backends,y))
index a245d675337c2ab49a9578709b50077a53ff70dd..104bd3ec0e110c10ff354f58db18c55ff32578ca 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2014-2015 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
+# Copyright (C) 2014-2016 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=knot
-PKG_VERSION:=1.6.5
+PKG_VERSION:=2.1.1
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
 PKG_SOURCE_URL:=https://secure.nic.cz/files/knot-dns/
-PKG_MD5SUM:=934b6feaeefd0df7b3be6709e39b19ce
+PKG_MD5SUM:=ee6a54ec8a7898579b768c66e2eaeb54
 
 PKG_MAINTAINER:=Daniel Salzman <daniel.salzman@nic.cz>
-PKG_LICENSE:=GPL-2.0+
+PKG_LICENSE:=GPL-3.0 LGPL-2.0 0BSD MIT OLDAP-2.8
 
-PKG_BUILD_PARALLEL:=1
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
 PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
+define Package/knot-lib/Default
+       SECTION:=libs
+       CATEGORY:=Libraries
+       TITLE:=Knot DNS
+       URL:=https://www.knot-dns.cz
+endef
+
 define Package/knot/Default
        SECTION:=net
        CATEGORY:=Network
+       SUBMENU:=IP Addresses and Names
        TITLE:=Knot DNS
        URL:=https://www.knot-dns.cz
-       SUBMENU:=IP Addresses and Names
-       DEPENDS:=+libopenssl +liburcu
+       USERID:=knot=5353:knot=5353
+endef
+
+define Package/knot-libdnssec
+       $(call Package/knot-lib/Default)
+       TITLE+= DNSSEC library
+       DEPENDS=+libpthread +libgnutls +jansson
 endef
 
 define Package/knot-libknot
-       $(call Package/knot/Default)
-       TITLE+= (library)
+       $(call Package/knot-lib/Default)
+       TITLE+= library
+       DEPENDS=+libpthread +knot-libdnssec
+endef
+
+define Package/knot-libzscanner
+       $(call Package/knot-lib/Default)
+       TITLE+= zone parser library
+       DEPENDS=+libpthread
 endef
 
 define Package/knot
        $(call Package/knot/Default)
-       TITLE+= (server)
-       DEPENDS+=+knot-libknot
+       TITLE+= server
+       DEPENDS=+liburcu +knot-libdnssec +knot-libknot +knot-libzscanner
 endef
 
 define Package/knot-dig
        $(call Package/knot/Default)
-       TITLE+= lookup utility
-       DEPENDS+=+knot-libknot
+       TITLE+= advanced DNS lookup utility
+       DEPENDS=+knot-libdnssec +knot-libknot
 endef
 
 define Package/knot-host
        $(call Package/knot/Default)
        TITLE+= simple DNS lookup utility
-       DEPENDS+=+knot-libknot
+       DEPENDS=+knot-libdnssec +knot-libknot
+endef
+
+define Package/knot-nsupdate
+       $(call Package/knot/Default)
+       TITLE+= dynamic DNS update utility
+       DEPENDS=+knot-libdnssec +knot-libknot +knot-libzscanner
 endef
 
 define Package/knot-nsec3hash
        $(call Package/knot/Default)
        TITLE+= simple NSEC3 hash utility
-       DEPENDS+=+knot-libknot
+       DEPENDS=+knot-libdnssec
 endef
 
-define Package/knot-nsupdate
+define Package/knot-keymgr
        $(call Package/knot/Default)
-       TITLE+= dynamic DNS update utility
-       DEPENDS+=+knot-libknot
+       TITLE+= DNSSEC key management utility
+       DEPENDS=+knot-libdnssec +knot-libzscanner
 endef
 
 define Package/knot-tests
        $(call Package/knot/Default)
-       TITLE+= (tests)
-       DEPENDS+=+knot-libknot
+       TITLE+= tests
+       DEPENDS=+liburcu +knot-libdnssec +knot-libknot +knot-libzscanner
+endef
+
+define Package/knot-libdnssec/description
+       Knot DNS DNSSEC library.
 endef
 
 define Package/knot-libknot/description
        Knot DNS library.
 endef
 
+define Package/knot-libdnssec/description
+       Knot DNS zone parser library.
+endef
+
 define Package/knot/description
        High-performance authoritative-only DNS server.
 endef
 
 define Package/knot-dig/description
-       Knot DNS lookup utility.
+       Knot DNS advanced DNS lookup utility.
 endef
 
 define Package/knot-host/description
        Knot DNS simple DNS lookup utility.
 endef
 
+define Package/knot-nsupdate/description
+       Knot DNS dynamic DNS update utility.
+endef
+
 define Package/knot-nsec3hash/description
-       Knot DNS simple utility to compute NSEC3 hash.
+       Knot DNS simple NSEC3 hash utility.
 endef
 
-define Package/knot-nsupdate/description
-       Knot DNS dynamic DNS update utility.
+define Package/knot-keymgr/description
+       Knot DNS DNSSEC key management utility.
 endef
 
 define Package/knot-tests/description
-       Unit tests for Knot DNS server.
+       Unit tests for the Knot DNS server and libraries.
        Usage: /usr/share/knot/runtests.sh
 endef
 
-define Package/knot/conffiles
-/etc/knot/knot.conf
-endef
-
 CONFIGURE_ARGS +=                      \
        --enable-recvmmsg=no            \
        --disable-fastparser            \
        --without-libidn                \
-       --with-rundir=/var/run          \
-       --with-storage=/etc/knot
+       --with-rundir=/var/run/knot     \
+       --with-storage=/var/lib/knot    \
+       --with-configdir=/etc/knot      \
+       --with-timer-mapsize=50         \
+       --with-conf-mapsize=50
 
-TARGET_CFLAGS += -std=gnu99 -DPSELECT_COMPAT
+TARGET_CFLAGS += -DPSELECT_COMPAT -DNDEBUG
+
+define Package/knot/conffiles
+/etc/knot/knot.conf
+endef
 
 define Build/Compile
        $(MAKE) -C $(PKG_BUILD_DIR)
        $(MAKE) -C $(PKG_BUILD_DIR)/libtap check
+       $(MAKE) -C $(PKG_BUILD_DIR)/src/dnssec/tests check-compile-only
        $(MAKE) -C $(PKG_BUILD_DIR)/tests check-compile-only
        $(MAKE) -C $(PKG_BUILD_DIR)/src/zscanner check-compile-only
 endef
 
+define Build/InstallDev
+       $(INSTALL_DIR)                                  $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.{a,so*}      $(1)/usr/lib/
+
+       $(INSTALL_DIR)                                          $(1)/usr/include/libknot
+       $(CP) $(PKG_INSTALL_DIR)/usr/include/libknot/*          $(1)/usr/include/libknot/
+
+       $(INSTALL_DIR)                                                  $(1)/usr/lib/pkgconfig
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc       $(1)/usr/lib/pkgconfig/
+endef
+
+define Package/knot-libdnssec/install
+       $(INSTALL_DIR)                                          $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdnssec.so.*         $(1)/usr/lib/
+endef
+
 define Package/knot-libknot/install
        $(INSTALL_DIR)                                          $(1)/usr/lib
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libknot.so.*           $(1)/usr/lib/
+endef
+
+define Package/knot-libzscanner/install
+       $(INSTALL_DIR)                                          $(1)/usr/lib
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libzscanner.so.*       $(1)/usr/lib/
 endef
 
@@ -137,7 +199,6 @@ define Package/knot/install
 
        $(INSTALL_DIR)                                                  $(1)/etc/knot
        $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/knot/knot.sample.conf    $(1)/etc/knot/knot.conf
-       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/knot/example.com.zone    $(1)/etc/knot/
 
        $(INSTALL_DIR)                          $(1)/etc/init.d
        $(INSTALL_BIN) ./files/knotd.init       $(1)/etc/init.d/knotd
@@ -153,14 +214,19 @@ define Package/knot-host/install
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/khost         $(1)/usr/bin/
 endef
 
+define Package/knot-nsupdate/install
+       $(INSTALL_DIR)                                          $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/knsupdate     $(1)/usr/bin/
+endef
+
 define Package/knot-nsec3hash/install
        $(INSTALL_DIR)                                          $(1)/usr/bin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/knsec3hash    $(1)/usr/bin/
 endef
 
-define Package/knot-nsupdate/install
-       $(INSTALL_DIR)                                          $(1)/usr/bin
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/knsupdate     $(1)/usr/bin/
+define Package/knot-keymgr/install
+       $(INSTALL_DIR)                                          $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/keymgr       $(1)/usr/sbin/
 endef
 
 define Package/knot-tests/install
@@ -171,13 +237,19 @@ define Package/knot-tests/install
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/libtap/runtests         $(1)/usr/share/knot/tap/
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/libtap/tap/libtap.sh    $(1)/usr/share/knot/tap/
 
-       $(INSTALL_DIR)                                                          $(1)/usr/share/knot/tests
+       $(INSTALL_DIR)                                                                  $(1)/usr/share/knot/tests
+
+       find $(PKG_BUILD_DIR)/src/dnssec/tests -maxdepth 1 -executable -type f | \
+               xargs -I{} basename {} | \
+               xargs -I{} $(INSTALL_BIN) -T $(PKG_BUILD_DIR)/src/dnssec/tests/{}       $(1)/usr/share/knot/tests/dnssec_test_{}
+
        find $(PKG_BUILD_DIR)/tests/.libs -maxdepth 1 -executable -type f | \
                xargs -I{} basename {} | \
-               xargs -I{} $(INSTALL_BIN) -T $(PKG_BUILD_DIR)/tests/.libs/{}    $(1)/usr/share/knot/tests/test_{}
+               xargs -I{} $(INSTALL_BIN) -T $(PKG_BUILD_DIR)/tests/.libs/{}            $(1)/usr/share/knot/tests/test_{}
 
-       $(INSTALL_DIR)                                          $(1)/usr/share/knot/tests/data
-       $(INSTALL_DATA) $(PKG_BUILD_DIR)/tests/data/sample_conf $(1)/usr/share/knot/tests/data/
+       find $(PKG_BUILD_DIR)/tests/modules/.libs -maxdepth 1 -executable -type f | \
+               xargs -I{} basename {} | \
+               xargs -I{} $(INSTALL_BIN) -T $(PKG_BUILD_DIR)/tests/modules/.libs/{}    $(1)/usr/share/knot/tests/test_module_{}
 
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/zscanner/tests/.libs/zscanner-tool  $(1)/usr/share/knot/tests/
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/zscanner/tests/unittests            $(1)/usr/share/knot/tests/test_zscanner
@@ -185,10 +257,13 @@ define Package/knot-tests/install
        cp -a $(PKG_BUILD_DIR)/src/zscanner/tests/data                          $(1)/usr/share/knot/tests/
 endef
 
+$(eval $(call BuildPackage,knot-libdnssec))
 $(eval $(call BuildPackage,knot-libknot))
+$(eval $(call BuildPackage,knot-libzscanner))
 $(eval $(call BuildPackage,knot))
 $(eval $(call BuildPackage,knot-dig))
 $(eval $(call BuildPackage,knot-host))
-$(eval $(call BuildPackage,knot-nsec3hash))
 $(eval $(call BuildPackage,knot-nsupdate))
+$(eval $(call BuildPackage,knot-nsec3hash))
+$(eval $(call BuildPackage,knot-keymgr))
 $(eval $(call BuildPackage,knot-tests))
index 23d3bd58e7eb2e14cb6f09eda2cc8501ad35931f..0e5bf03f4dac2053535896d78d2467324c0b1c54 100644 (file)
@@ -1,45 +1,39 @@
 #!/bin/sh /etc/rc.common
-START=70
-
-knot_bin="/usr/sbin/knotd"
-knot_ctl="/usr/sbin/knotc"
-config_file="/etc/knot/knot.conf"
-pid_file="/var/run/knot.pid"
-
-start() {
-  echo "Starting Knot DNS"
-
-  if [ -e $pid_file ]; then
-     echo "  Already running with PID `cat $pid_file`"
-     return 1
-  fi
-
-  $knot_bin -c $config_file -d
-
-  if [ $? -ne 0 ]; then
-    echo "  Failed to start"
-  fi
+#
+# Copyright (C) 2014-2016 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
+#
+# This is free software, licensed under the GNU General Public License v2.
+
+START=50
+USE_PROCD=1
+
+PROG="/usr/sbin/knotd"
+CONFFILE="/etc/knot/knot.conf"
+
+USER="knot"
+USERID="5353"
+RUNDIR="/var/run/knot"
+STORAGE="/var/lib/knot"
+
+fix_perms() {
+       user_exists $USER $USERID || user_add $USER $USERID
+       group_exists $USER $USERID || group_add $USER $USERID
+
+       for dir in $RUNDIR $STORAGE; do
+               test -e $dir || {
+                       mkdir -p $dir
+                       chgrp $USER $dir
+                       chmod g+w $dir
+               }
+               chgrp $USER $CONFFILE
+               chmod g+r $CONFFILE
+       done
 }
 
-stop() {
-  echo "Stopping Knot DNS"
-
-  if [ -e $pid_file ]; then
-    kill `cat $pid_file`
-    rm -f $pid_file
-  else
-    echo "  No PID file $pid_file"
-    return 1
-  fi
-}
-
-restart() {
-  stop
-  start
-}
-
-reload() {
-  echo "Reloading Knot DNS"
-
-  $knot_ctl -c $config_file reload
+start_service() {
+       fix_perms
+       procd_open_instance
+       procd_set_param command $PROG -c $CONFFILE
+       procd_set_param respawn
+       procd_close_instance
 }
index 10032cb59815db5655a060521714d4b8240ccae1..c45868faae8ee7a19d627f01e1f6e99461320882 100644 (file)
@@ -1,8 +1,7 @@
 #!/bin/sh
 
 cd `dirname "$0"`/tests
-../tap/runtests -b /tmp ./test_*
-
+../tap/runtests -b /tmp ./dnssec_test_* ./test_*
 ret=$?
 cd -
 
diff --git a/net/knot/patches/01_strptime_susv3.patch b/net/knot/patches/01_strptime_susv3.patch
deleted file mode 100644 (file)
index fc14b91..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-diff --git a/src/libknot/dnssec/key.c b/src/libknot/dnssec/key.c
-index 7dc0540..3e351bb 100644
---- a/src/libknot/dnssec/key.c
-+++ b/src/libknot/dnssec/key.c
-@@ -260,7 +260,15 @@ static int key_param_time(const void *save_to, char *value)
-       struct tm parsed = { 0 };
--      if (!strptime(value, "%Y%m%d%H%M%S", &parsed)) {
-+      if (strlen(value) != 14) {
-+              return KNOT_EINVAL;
-+      }
-+
-+      char *v = value;
-+      char buf[32] = "";
-+      int ret = sprintf(buf, "%.4s %.2s %.2s %.2s %.2s %.2s",
-+                        v, v + 4, v + 6, v + 8, v + 10, v + 12);
-+      if (ret != 19 || !strptime(buf, "%Y %m %d %H %M %S", &parsed)) {
-               return KNOT_EINVAL;
-       }
diff --git a/net/knot/patches/01_zscanner_tests.patch b/net/knot/patches/01_zscanner_tests.patch
new file mode 100644 (file)
index 0000000..7ea4cfd
--- /dev/null
@@ -0,0 +1,25 @@
+diff --git a/src/zscanner/tests/unittests.in b/src/zscanner/tests/unittests.in
+index 9a4af53..f9b45bf 100644
+--- a/src/zscanner/tests/unittests.in
++++ b/src/zscanner/tests/unittests.in
+@@ -1,15 +1,14 @@
+ #!/bin/sh
+-SOURCE=@top_srcdir@/src/zscanner/tests
+-BUILD=@top_builddir@/src/zscanner/tests
++SOURCE="."
++BUILD="/tmp/knot-test"
++mkdir -p "$BUILD"
+-. @top_srcdir@/libtap/tap/libtap.sh
+-
+-cd "$BUILD"
++. ../tap/libtap.sh
+ TMPDIR=$(test_tmpdir)
+ TESTS_DIR="$SOURCE"/data
+-ZSCANNER_TOOL="$BUILD"/zscanner-tool
++ZSCANNER_TOOL=./zscanner-tool
+ plan 71
index f82af0cfc9951ff31b7e33e102874027cee20684..215b09fbed153bb0930845a87f29395e2ac2858d 100644 (file)
@@ -1,28 +1,13 @@
 diff --git a/samples/knot.sample.conf.in b/samples/knot.sample.conf.in
-index 956e8a9..a068e67 100644
+index e07c8a7..ecc13ad 100644
 --- a/samples/knot.sample.conf.in
 +++ b/samples/knot.sample.conf.in
-@@ -14,7 +14,7 @@ system {
+@@ -9,7 +9,7 @@ server:
+     # Listen on all configured IPv6 interfaces.
+     listen: ::@53
+     # User for running the server.
+-    # user: knot:knot
++    user: knot:knot
  
-   # User for running server
-   # May also specify user.group (e.g. knot.knot)
--  user knot.knot;
-+  user root.root;
-   # Directory for storing run-time data
-   # e.g. PID file and control sockets
-@@ -63,11 +63,11 @@ zones {
- #  storage "@storage_dir@";
- #
- #  Example master zone
--#  example.com {
--#    file "@config_dir@/example.com.zone";
-+  example.com {
-+    file "example.com.zone";
- #    xfr-out slave0;
- #    notify-out slave0;
--#  }
-+  }
- #
- #  Example slave zone
- #  example.net {
+ log:
+     # Log info and more serious events to syslog.
diff --git a/net/knot/patches/03_libtap_files.patch b/net/knot/patches/03_libtap_files.patch
new file mode 100644 (file)
index 0000000..bb7b342
--- /dev/null
@@ -0,0 +1,15 @@
+diff --git a/libtap/tap/files.c b/libtap/tap/files.c
+index 0c24075..d33db6c 100644
+--- a/libtap/tap/files.c
++++ b/libtap/tap/files.c
+@@ -27,6 +27,10 @@
+ #include <sys/types.h>
+ #include <unistd.h>
++#ifndef O_NOFOLLOW
++#define O_NOFOLLOW 0
++#endif
++
+ char *test_mkdtemp(void)
+ {
+       char *tmpdir = getenv("TMPDIR");
diff --git a/net/knot/patches/03_zscanner_tests.patch b/net/knot/patches/03_zscanner_tests.patch
deleted file mode 100644 (file)
index a0d0524..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-diff --git a/src/zscanner/tests/TESTS b/src/zscanner/tests/TESTS
-index c88aef1..4e2148f 100644
---- a/src/zscanner/tests/TESTS
-+++ b/src/zscanner/tests/TESTS
-@@ -18,10 +18,8 @@
- 05-2_TTL
- 05-3_TTL
- 05-4_TTL
--06-0_INCLUDE
- 06-1_INCLUDE
- 06-2_INCLUDE
--06-3_INCLUDE
- 06-4_INCLUDE
- 06-5_INCLUDE
- 06-6_INCLUDE
-diff --git a/src/zscanner/tests/unittests.in b/src/zscanner/tests/unittests.in
-index 846f351..272856c 100644
---- a/src/zscanner/tests/unittests.in
-+++ b/src/zscanner/tests/unittests.in
-@@ -1,9 +1,9 @@
- #!/bin/sh
--SOURCE=@top_srcdir@/src/zscanner/tests
--BUILD=@top_builddir@/src/zscanner/tests
-+SOURCE="."
-+BUILD="."
--. @top_srcdir@/libtap/tap/libtap.sh
-+. ../tap/libtap.sh
- cd "$BUILD"
-@@ -11,7 +11,7 @@ TMPDIR=$(test_tmpdir)
- TESTS_DIR="$SOURCE"/data
- ZSCANNER_TOOL="$BUILD"/zscanner-tool
--plan 71
-+plan 69
- mkdir -p "$TMPDIR"/includes/
- for a in 1 2 3 4 5 6; do
index 3af3842bef3ce99d3eb71333cdaf64d899240904..fd3032d9bc8c361bb6b63bf8d75414dc9aa7fb97 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2008-2015 OpenWrt.org
+# Copyright (C) 2008-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,18 +8,24 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=linknx
-PKG_VERSION:=0.0.1.32
-PKG_RELEASE:=7
-PKG_MD5SUM:=7ecc1208f59bceb05068c752b2250b63
+PKG_VERSION:=0.0.1.33
+PKG_RELEASE:=1
 
 PKG_MAINTAINER:=Othmar Truniger <github@truniger.ch>
 PKG_LICENSE:=GPL-2.0+
 
-PKG_SOURCE_URL:=@SF/linknx
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/linknx/linknx.git
+PKG_SOURCE_VERSION:=f627ed44feaea5a1f67c53f2810c44a14c059cef
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)
+PKG_SOURCE:=$(PKG_NAME)-${PKG_VERSION}.tar.gz
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
 PKG_BUILD_DEPENDS:=argp-standalone
 PKG_FORTIFY_SOURCE:=1
 
+PKG_FIXUP:=autoreconf
+
 include $(INCLUDE_DIR)/package.mk
 
 define Package/linknx
diff --git a/net/linknx/patches/010-musl-compat b/net/linknx/patches/010-musl-compat
deleted file mode 100644 (file)
index 15c757e..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/src/eibclient.c  2007-10-11 01:55:31.000000000 +0200
-+++ b/src/eibclient.c  2015-06-27 22:18:01.433296921 +0200
-@@ -32,6 +32,7 @@
- #include <netinet/in.h>
- #include <netdb.h>
- #include <errno.h>
-+#include <string.h>
- #include "config.h"
diff --git a/net/linknx/patches/012-fix-linknx.cpp b/net/linknx/patches/012-fix-linknx.cpp
deleted file mode 100644 (file)
index 8394cf1..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/src/linknx.cpp   2012-06-04 22:12:13.000000000 +0200
-+++ b/src/linknx.cpp   2015-06-27 22:35:23.705721355 +0200
-@@ -136,7 +136,7 @@
-     if (errno)
-         printf (": %s\n", strerror (errno));
-     else
--        printf ("\n", strerror (errno));
-+        printf ("\n");
-     exit (1);
- }
index a431cd9900b86d1fcb3f6368333577203b968c9c..3778609caf7ac5b1983df7ccbddf5757dd3aa206 100644 (file)
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ngircd
-PKG_VERSION:=22.1
+PKG_VERSION:=23
 PKG_RELEASE:=1
 PKG_MAINTAINER:=Claudio Leite <leitec@staticky.com>
 PKG_LICENSE:=GPL-2.0
@@ -18,7 +18,7 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:= \
         http://ngircd.barton.de/pub/ngircd/ \
         ftp://ftp.berlios.de/pub/ngircd/
-PKG_MD5SUM:=586c4fef1fbb77dcbe723e9136ec08eb
+PKG_MD5SUM:=a58e0075fea60176fa7df092ca7e2c6a
 
 PKG_INSTALL:=1
 
index de80228d71b4eba59f0d5440e9586cb9d6116f5c..7839c09867ea5e843f0caeacd138de7952525c54 100644 (file)
@@ -8,14 +8,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ocserv
-PKG_VERSION:=0.10.11
+PKG_VERSION:=0.10.12
 PKG_RELEASE:=1
 PKG_USE_MIPS16:=0
 
 PKG_BUILD_DIR :=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=ftp://ftp.infradead.org/pub/ocserv/
-PKG_MD5SUM:=7daf9f105b115cd6611a2ac016a29d24
+PKG_MD5SUM:=a0080697a6e7b07d3868d224a81b60f3
 
 PKG_LICENSE:=GPLv2
 PKG_LICENSE_FILES:=COPYING
index d17d1962e4ffcaa55fd4adf6a6169221ede3c8d4..f188cc07668592159f9cfe060033c73324bfa5e8 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=pptpd
 PKG_VERSION:=1.4.0
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/poptop
index f73eeea2375e18ceb091553d190161bb0c45c78d..7f825941f3e7bafa70c1e844878a9c1d986c9590 100644 (file)
@@ -11,7 +11,6 @@ nobsdcomp
 nodeflate
 #noproxyarp
 #nomppc
-mppe required,no40,no56,stateless
 require-mschap-v2
 refuse-chap
 refuse-mschap
index 354745f592f8995bfcd66e0a0bb494a9f7de56be..398ae9d36f1b865d4ba5cd80f5d7aec919b28547 100644 (file)
@@ -1,5 +1,4 @@
 #debug
-option /etc/ppp/options.pptpd
 speed 115200
 stimeout 10
 #localip & remoteip are not needed, ip management is done by pppd
index d1c50fd6faec62518c492346c2543f44ae8033bb..0d18aa1276f3c74fa64934ab283769891c549947 100644 (file)
@@ -7,6 +7,7 @@ USE_PROCD=1
 BIN=/usr/sbin/pptpd
 CONFIG=/var/etc/pptpd.conf
 CHAP_SECRETS=/var/etc/chap-secrets
+OPTIONS_PPTP=/var/etc/options.pptpd
 
 validate_login_section() {
        uci_validate_section pptpd login "${1}" \
@@ -18,7 +19,9 @@ validate_pptpd_section() {
        uci_validate_section pptpd service "${1}" \
                'enabled:uinteger' \
                'localip:string' \
-               'remoteip:string'
+               'remoteip:string' \
+               'mppe:list(string):required no40 no56 stateless' \
+               'logwtmp:uinteger'
 }
 
 setup_login() {
@@ -34,6 +37,8 @@ setup_login() {
 }
 
 setup_config() {
+       local enabled localip remoteip mppe
+
        validate_pptpd_section "${1}" || {
                echo "validation failed"
                return 1
@@ -43,9 +48,13 @@ setup_config() {
 
        mkdir -p /var/etc
        cp /etc/pptpd.conf $CONFIG
+       cp /etc/ppp/options.pptpd $OPTIONS_PPTP
 
        [ -n "$localip" ] && echo "localip  $localip" >> $CONFIG
        [ -n "$remoteip" ] && echo "remoteip  $remoteip" >> $CONFIG
+       [ "$logwtmp" -eq 1 ] && echo "logwtmp" >> $CONFIG
+
+       echo "mppe $(echo $mppe | sed -e 's/\s/,/g')" >> $OPTIONS_PPTP
 
        return 0
 }
@@ -58,6 +67,6 @@ start_service() {
        ln -sfn $CHAP_SECRETS /etc/ppp/chap-secrets
 
        procd_open_instance
-       procd_set_param command $BIN -c $CONFIG
+       procd_set_param command $BIN -c $CONFIG -o $OPTIONS_PPTP
        procd_close_instance
 }
index eff3e2efb8c7aadd15c8ab8c701899cac2663cec..0942a626f3973b819b87a722aee31cb5aeef10a8 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=prosody
-PKG_VERSION:=0.9.9
+PKG_VERSION:=0.9.10
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://prosody.im/downloads/source
-PKG_MD5SUM:=8f7c529b072e78ab9e82ecbedfee7145
+PKG_MD5SUM:=ef6d4a9e6dcae577eb52f7277d7beac5
 PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>
 PKG_LICENSE:=MIT/X11
 
index bab0ae7d5919c5952f3f2ba3c920614bb3fffbdc..322c3d2b1385a66d153e6c325f88977ec2426e55 100644 (file)
@@ -1,10 +1,9 @@
 #!/bin/sh /etc/rc.common
-# Copyright (C) 2010-2011 OpenWrt.org
+# Copyright (C) 2011-2016 OpenWrt.org
 
 START=99
 
-EXTRA_COMMANDS="status"
-EXTRA_HELP="   status  Print the status of the service"
+USE_PROCD=1
 
 BIN=/usr/bin/prosodyctl
 LOG_D=/var/log/prosody
@@ -13,7 +12,7 @@ PID_F=$RUN_D/prosody.pid
 RUN_USER=prosody
 RUN_GROUP=prosody
 
-start() {
+start_service() {
        [ -d /var/run/prosody ] || {
                mkdir -m 0755 -p /var/run/prosody
                chown prosody:prosody /var/run/prosody
@@ -36,18 +35,12 @@ start() {
                }
        }
 
-       
-       $BIN start
+       procd_open_instance
+       procd_set_param command "$BIN" start
+       procd_set_param file /etc/prosody/prosody.cfg.lua
+       procd_close_instance
 }
 
-stop() {
-       $BIN stop
-}
-
-reload() {
-       [ -f $PID_F ] && kill -HUP $(cat $PID_F)
-}
-
-status() {
-       $BIN status
+stop_service() {
+       ${BIN} stop
 }
index 433557c30f91818e01437f2e3cebeb71c965b3eb..a79e51db04310f639789e25a8d6b3e5e44901da1 100644 (file)
@@ -1,20 +1,6 @@
 menu "Configuration"
        depends on PACKAGE_snort
 
-config SNORT_MYSQL
-       bool "Enable MySQL support"
-       default n
-       help
-           This option enables support for logging to a MySQL database.
-           Disabled by default.
-
-config SNORT_PGSQL
-       bool "Enable PostgreSQL support"
-       default n
-       help
-           This option enables support for logging to a PostgreSQL database.
-           Disabled by default.
-
 config SNORT_LZMA
        bool "Enable LZMA support"
        default n
index 9886a5d92abc8a57230fa6d70bdb09edcc574a38..d37829ee4b18151fafa2c9a0889e5e0a3b932b4e 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=snort
 PKG_VERSION:=2.9.7.2
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_LICENSE:=GPL-2.0
 PKG_MAINTAINER:=Luka Perkov <luka@openwrt.org>
@@ -30,7 +30,7 @@ define Package/snort
   SUBMENU:=Firewall
   SECTION:=net
   CATEGORY:=Network
-  DEPENDS:=+libdaq +libdnet +libopenssl +libpcap +libpcre +libpthread +libuuid +zlib +SNORT_MYSQL:libmysqlclient +SNORT_PGSQL:libpq +SNORT_PGSQL:libuuid +SNORT_LZMA:liblzma
+  DEPENDS:=+libdaq +libdnet +libopenssl +libpcap +libpcre +libpthread +libuuid +zlib +SNORT_LZMA:liblzma
   TITLE:=Lightweight Network Intrusion Detection System
   URL:=http://www.snort.org/
   MENU:=1
@@ -61,24 +61,12 @@ CONFIGURE_ARGS += \
        --with-daq-libraries="$(STAGING_DIR)/usr/lib" \
        --disable-static-daq
 
-ifeq ($(CONFIG_SNORT_MYSQL),)
-CONFIGURE_ARGS += \
-       --without-mysql
-endif
-
-ifeq ($(CONFIG_PGSQL),)
-CONFIGURE_ARGS += \
-       --without-postgresql
-endif
-
 ifeq ($(CONFIG_SNORT_LZMA),)
 CONFIGURE_ARGS += \
        --disable-lzma
 endif
 
 CONFIGURE_VARS += \
-       CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include/mysql" \
-       LDFLAGS="$$$$LDFLAGS -L$(STAGING_DIR)/usr/lib/mysql" \
        PATH="$(STAGING_DIR)/usr/lib/libnet-1.0.x/bin:$$$$PATH"
 
 MAKE_FLAGS += \
index ee11783b6c4bf03b370e8cc28f81f75f22f44fd2..00c6e37390ba2b411e52de90c567b07043b42aee 100644 (file)
@@ -8,8 +8,8 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=sqm-scripts
-PKG_SOURCE_VERSION:=f2be2cc07c9902c3031f799ed4e133964e8c608f
-PKG_VERSION:=1.0.6
+PKG_SOURCE_VERSION:=56677e61a0d410d744e0382c35980dd44aaa072b
+PKG_VERSION:=1.0.7
 PKG_RELEASE:=1
 PKG_LICENSE:=GPLv2
 
index 62836b3a09f31049e328952765dc00761163d967..909d7902c7c4f13dcb279d7fc739e651480baace 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2011-2014 OpenWrt.org
+# Copyright (C) 2011-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=pulseaudio
-PKG_VERSION:=7.1
+PKG_VERSION:=8.0
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=http://freedesktop.org/software/pulseaudio/releases/
-PKG_MD5SUM:=9d0a9817b632cac8e3f3834d7eb1c99d
+PKG_MD5SUM:=8678442ba0bb4b4c33ac6f62542962df
 PKG_LICENSE:=LGPL-2.1+
 PKG_LICENSE_FILES:=GPL LICENSE
 
diff --git a/sound/pulseaudio/patches/002-xlocale.patch b/sound/pulseaudio/patches/002-xlocale.patch
deleted file mode 100644 (file)
index ef3ee91..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/pulsecore/core-util.c b/pulsecore/core-util.c
-index ba31221..824368a 100644
---- a/src/pulsecore/core-util.c
-+++ b/src/pulsecore/core-util.c
-@@ -54,7 +54,6 @@
- #ifdef HAVE_STRTOD_L
- #include <locale.h>
--#include <xlocale.h>
- #endif
- #ifdef HAVE_SCHED_H
index 44ff097bf9906f8d007c57f3659a9d6f74de4aa3..5e8d2bc2af1a9a28aba02bef6976de4a0b194ee7 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006-2015 OpenWrt.org
+# Copyright (C) 2006-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=alsa-utils
-PKG_VERSION:=1.0.29
+PKG_VERSION:=1.1.0
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=ftp://ftp.alsa-project.org/pub/utils/ \
                http://alsa.cybermirror.org/utils/
-PKG_MD5SUM:=6b289bf874c4c9a63f4b3973093dd404
+PKG_MD5SUM:=b9d6102fbbd0b68040bb77023ed30c0c
 PKG_INSTALL:=1
 PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
 
@@ -23,7 +23,7 @@ include $(INCLUDE_DIR)/package.mk
 define Package/alsa-utils
   SECTION:=utils
   CATEGORY:=Utilities
-  DEPENDS:=+alsa-lib +libncurses +libpthread
+  DEPENDS:=+alsa-lib +libncursesw +libpthread
   TITLE:=ALSA (Advanced Linux Sound Architecture) utilities
   URL:=http://www.alsa-project.org/
 endef
@@ -44,16 +44,12 @@ define Package/alsa-utils-tests
   DEPENDS:=+alsa-lib +libpthread
 endef
 
-define Build/Configure
-       $(call Build/Configure/Default, \
+CONFIGURE_ARGS+= \
                --disable-rpath \
                --disable-alsatest \
+               --disable-bat \
                --disable-xmlto \
-               , \
-               ac_cv_prog_ncurses5_config=no \
-               ac_cv_prog_ncursesw5_config=no \
-       )
-endef
+               --with-curses=ncursesw
 
 define Package/alsa-utils/install
        $(INSTALL_DIR) $(1)/usr/{s,}bin
index a304472d20be8ecddf776786f66f6d4afaf10075..4f187c84c648a38f7ef46f8e02f2186759529d17 100644 (file)
@@ -11,7 +11,7 @@ include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=cryptodev-linux
 PKG_VERSION:=1.8
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://download.gna.org/cryptodev-linux/
@@ -31,7 +31,7 @@ define KernelPackage/cryptodev
   URL:=http://cryptodev-linux.org/
   MAINTAINER:=Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
   VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE)
-  DEPENDS:=+kmod-crypto-core +kmod-crypto-authenc +kmod-crypto-hash
+  DEPENDS:=+kmod-crypto-authenc +kmod-crypto-hash
   FILES:= \
                $(PKG_BUILD_DIR)/cryptodev.$(LINUX_KMOD_SUFFIX)
   AUTOLOAD:=$(call AutoLoad,50,$(CRYPTODEV_AUTOLOAD))
index 65209bb986312883c6f33563a05026952d85ef6e..193a82040eaeece91940615fd171b8aa9e1cc0ac 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gnupg
 PKG_VERSION:=1.4.20
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=ftp://ftp.franken.de/pub/crypt/mirror/ftp.gnupg.org/gcrypt/gnupg \
@@ -39,7 +39,7 @@ endef
 
 define Package/gnupg-utils
   $(call Package/gnupg/Default)
-  DEPENDS:=gnupg
+  DEPENDS:=gnupg +libcurl
   TITLE:=Key management utilities for GnuPG
 endef
 
@@ -67,9 +67,7 @@ CONFIGURE_ARGS += \
        --disable-bzip2 \
        --disable-ldap \
        --disable-finger \
-       --disable-ftp \
        --disable-dns-srv \
-       --enable-fake-curl \
        --disable-regex \
 
 MAKE_FLAGS += \
index 7b373bbf6654500af992539ac8ca401fbcbe9862..636b33e3c19b876b2bba015aba7c60287fba2c97 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2010-2015 OpenWrt.org
+# Copyright (C) 2010-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=grep
-PKG_VERSION:=2.22
+PKG_VERSION:=2.23
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@GNU/grep
-PKG_MD5SUM:=e1015e951a49a82b02e38891026ef5df
+PKG_MD5SUM:=f46aa9d0d2577b9212a104348a286787
 
 PKG_LICENSE:=GPL-3.0
 PKG_LICENSE_FILES:=COPYING
index 25d8d5fef7ff0b194cc75a5e76042f9b6762cb7e..7b6e953284bf8008bf9d0c2f8f094c6a85ec9aed 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=LVM2
 PKG_VERSION:=2.02.141
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_LICENSE:=GPL-2.0 LGPL-2.1
 
 PKG_SOURCE:=$(PKG_NAME).$(PKG_VERSION).tgz
@@ -26,7 +26,7 @@ define Package/libdevmapper
   CATEGORY:=Libraries
   TITLE:=The Linux Kernel Device Mapper userspace library
   URL:=http://sourceware.org/dm/
-  DEPENDS:=+kmod-dm +libpthread
+  DEPENDS:=+kmod-dm +libpthread +libuuid
 endef
 
 define Package/libdevmapper/description
index de9cecf1de4d5106e78361bfb8d9968bbddf14fc..4189eb0dd9507f45aa99b05d2c15dfcc51e143a5 100644 (file)
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=lxc
-PKG_VERSION:=1.1.3
+PKG_VERSION:=1.1.5
 PKG_RELEASE:=1
 
 PKG_LICENSE:=LGPL-2.1+ BSD-2-Clause GPL-2.0
@@ -16,7 +16,7 @@ PKG_MAINTAINER:=Luka Perkov <luka@openwrt.org>
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://linuxcontainers.org/downloads/lxc/
-PKG_MD5SUM:=197abb5a28ab0b689c737eb1951023fb
+PKG_MD5SUM:=dd9684dde0a58ed13f4f49c855b79a1a
 
 PKG_BUILD_DEPENDS:=lua
 PKG_BUILD_PARALLEL:=1
index e2f002af99f91d58338da003b6d6bce709975ffe..2dfaa9bea5a652cc708604ce3658bbd66828ed50 100644 (file)
@@ -1,7 +1,7 @@
 --- a/src/lxc/utils.h
 +++ b/src/lxc/utils.h
-@@ -44,11 +44,7 @@ extern char *get_rundir(void);
- extern const char *lxc_global_config_value(const char *option_name);
+@@ -41,11 +41,7 @@ extern int mkdir_p(const char *dir, mode
+ extern char *get_rundir(void);
  
  /* Define getline() if missing from the C library */
 -#ifndef HAVE_GETLINE
index 6b57e2690235b0d5c10344240db49ac0a54dbe18..42e194c33f3961d42f8c927fb6f18e61168af410 100644 (file)
@@ -1,12 +1,20 @@
 --- a/src/lxc/bdev.c
 +++ b/src/lxc/bdev.c
-@@ -1936,3 +1936,3 @@ static int loop_mount(struct bdev *bdev)
+@@ -1939,7 +1939,7 @@ static int find_free_loopdev(int *retfd,
+ static int loop_mount(struct bdev *bdev)
  {
 -      int lfd, ffd = -1, ret = -1;
 +      int lfd = -1, ffd = -1, ret = -1;
        struct loop_info64 lo;
-@@ -1974,3 +1974,3 @@ out:
+       char loname[100];
+@@ -1977,7 +1977,7 @@ out:
+       if (ffd > -1)
+               close(ffd);
        if (ret < 0) {
 -              close(lfd);
 +              if (lfd > -1) close(lfd);
                bdev->lofd = -1;
+       }
+       return ret;
diff --git a/utils/qemu/Makefile b/utils/qemu/Makefile
new file mode 100644 (file)
index 0000000..a7806d1
--- /dev/null
@@ -0,0 +1,62 @@
+#
+# Copyright (C) 2016 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=qemu
+PKG_VERSION:=2.4.1
+PKG_RELEASE:=1
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=http://wiki.qemu-project.org/download/
+PKG_SOURCE_MD5SUM:=a895e93ec1dafc34bc64ed676f0d55a6
+PKG_LICENSE:=GPL-2.0
+PKG_LICENSE_FILES:=LICENSE tcg/LICENSE
+PKG_MAINTAINER:=Yousong Zhou <yszhou4tech@gmail.com>
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/qemu-ga
+  SECTION:=utils
+  CATEGORY:=Utilities
+  TITLE:=QEMU Guest Agent
+  URL:=http://www.qemu.org
+  DEPENDS:=+glib2 +libpthread +libstdcpp +librt
+endef
+
+define Package/qemu-ga/description
+This package contains the QEMU Guest Agent daemon
+endef
+
+# QEMU configure script does not recognize these options
+CONFIGURE_ARGS:=$(filter-out   \
+       --target=%              \
+       --host=%                \
+       --build=%               \
+       --program-prefix=%      \
+       --program-suffix=%      \
+       --exec-prefix=%         \
+       --disable-nls           \
+       , $(CONFIGURE_ARGS))
+
+# Building qemu-ga alone does not require zlib
+CONFIGURE_ARGS+=                       \
+       --cross-prefix=$(TARGET_CROSS)  \
+       --host-cc=$(HOSTCC)             \
+       --target-list=''                \
+       --disable-zlib-test             \
+       --enable-guest-agent
+
+define Package/qemu-ga/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/qemu-ga $(1)/usr/bin
+       $(INSTALL_DIR) $(1)/etc/init.d
+       $(INSTALL_BIN) ./files/qemu-ga.init $(1)/etc/init.d/qemu-ga
+       $(INSTALL_DIR) $(1)/etc/hotplug.d/virtio-ports
+       $(INSTALL_BIN) ./files/virtio-ports.hotplug $(1)/etc/hotplug.d/virtio-ports/qemu-ga
+endef
+
+$(eval $(call BuildPackage,qemu-ga))
diff --git a/utils/qemu/files/qemu-ga.init b/utils/qemu/files/qemu-ga.init
new file mode 100755 (executable)
index 0000000..86c2b7e
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2016 OpenWrt.org
+
+START=99
+USE_PROCD=1
+
+BIN=/usr/bin/qemu-ga
+
+start_service() {
+       procd_open_instance
+       procd_set_param command $BIN
+       procd_set_param respawn
+       procd_set_param stderr 1
+       procd_close_instance
+}
diff --git a/utils/qemu/files/virtio-ports.hotplug b/utils/qemu/files/virtio-ports.hotplug
new file mode 100755 (executable)
index 0000000..35919a5
--- /dev/null
@@ -0,0 +1,19 @@
+#!/bin/sh
+# Copyright (C) 2016 OpenWrt.org
+
+[ "$SUBSYSTEM" = "virtio-ports" ] || exit 0
+
+syspath="/sys/$DEVPATH"
+name="$(cat "$syspath/name" 2>/dev/null)"
+[ -n "$name" ] || exit 0
+
+case "$ACTION" in
+       "add")
+               mkdir -p /dev/virtio-ports
+               ln -s "/dev/$DEVNAME" "/dev/virtio-ports/$name"
+               /etc/init.d/qemu-ga start
+               ;;
+       "del")
+               rm -f "/dev/virtio-ports/$name"
+               ;;
+esac
index f7b29a6db3b81df9e51511c5b54a05b14ad3e4ba..fd139700f638501620e2e7faa3ac8bbc072ead67 100644 (file)
@@ -16,7 +16,7 @@ PKG_LICENSE:=GPL-3.0
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/dangowrt/tracertools.git
-PKG_SOURCE_VERSION:=0428aa8585c915e64ce7cdb7c6f88cf2f5987b5f
+PKG_SOURCE_VERSION:=253e73fd379714239b51d5b0fd719b7c2d65f379
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz