#
-# 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.
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>
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
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)
# 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
#
-# 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.
PKG_NAME:=ruby
PKG_VERSION:=2.2.4
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_LIBVER:=2.2
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
$(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:=
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
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
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
bundled hash functions.
endef
-
define Package/ruby-digest/config
config RUBY_DIGEST_USE_OPENSSL
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))
# 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")
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"),
]
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
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 }
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
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
"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..."
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
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
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(",")}"
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)|
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
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/
#!/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 "$@")
#
-# Copyright (C) 2006-2015 OpenWrt.org
+# Copyright (C) 2006-2016 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
PKG_NAME:=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>
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/
+++ /dev/null
---- 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"
-
-
#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 @@
#
-# 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.
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/
--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/
#
-# 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.
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
+++ /dev/null
---- 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)
-
config GNUTLS_CRYPTODEV
bool "enable /dev/crypto support"
- select PACKAGE_kmod-cryptodev
default n
config GNUTLS_HEARTBEAT
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
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
#
-# Copyright (C) 2006-2015 OpenWrt.org
+# Copyright (C) 2006-2016 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
PKG_NAME:=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
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>
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
$(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
## 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
* 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
* 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
#
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" ]
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
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()
{
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
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}"
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}"
# 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
#
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)"
}
#################################################
#
f_envcheck()
{
+ local check
+
# check general package dependencies
#
f_depend "uhttpd"
# 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
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
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"
# 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
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
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
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
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}" ]
#
f_depend()
{
+ local check
local package="${1}"
check="$(printf "${pkg_list}" | grep "^${package} -" 2>/dev/null)"
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
#
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
}
#
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
#
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
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
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}
}
#
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
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
# 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
# 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
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
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}"
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}" ]
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
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
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"
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
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
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
# 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
# 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'
--- /dev/null
+#!/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
--- /dev/null
+#!/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
+}
+++ /dev/null
-# 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"
+++ /dev/null
-# tweaks for dnsmasq
-# configuration found in /etc/config/dhcp
-#
-config dnsmasq
- option cachesize '1000'
- option filterwin2k '0'
-
+++ /dev/null
-# 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"
+++ /dev/null
-# 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
+++ /dev/null
-# 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 &
<html>
- <head></head>
+ <head><meta charset="utf-8"></head>
<body>
<img src="/adblock.png" border="0" alt=""></img>
</body>
<html>
- <head></head>
+ <head><meta charset="utf-8"></head>
<body>
<img src="/adblock.png" border="0" alt=""></img>
</body>
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
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>
- 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
##### **********************************
##### **********************************
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
##### **********************************
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
"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]"
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
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
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
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
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
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
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
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
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
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
// 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
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
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
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
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
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
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
*.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
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
*.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
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
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
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
// 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
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
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
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
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
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
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
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
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
// 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
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
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
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
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
xn--ygbi2ammx
// xn--90a3ac ("srb", Cyrillic) : RS
-// http://www.rnids.rs/en/the-.срб-domain
+// https://www.rnids.rs/en/domains/national-domains
срб
xn--90a3ac
пр.срб
// (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
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
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
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/
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
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
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
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/
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)
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
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
+++ /dev/null
-#
-#.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
+++ /dev/null
-#
-#.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
-
--- /dev/null
+#
+#.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
--- /dev/null
+#
+#.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
+
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
$(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 \
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
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
$(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,))
$(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))
#
-# 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
$(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
$(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
$(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
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))
#!/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
}
#!/bin/sh
cd `dirname "$0"`/tests
-../tap/runtests -b /tmp ./test_*
-
+../tap/runtests -b /tmp ./dnssec_test_* ./test_*
ret=$?
cd -
+++ /dev/null
-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;
- }
-
--- /dev/null
+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
+
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.
--- /dev/null
+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");
+++ /dev/null
-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
#
-# 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.
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
+++ /dev/null
---- 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"
-
+++ /dev/null
---- 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);
- }
-
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
PKG_SOURCE_URL:= \
http://ngircd.barton.de/pub/ngircd/ \
ftp://ftp.berlios.de/pub/ngircd/
-PKG_MD5SUM:=586c4fef1fbb77dcbe723e9136ec08eb
+PKG_MD5SUM:=a58e0075fea60176fa7df092ca7e2c6a
PKG_INSTALL:=1
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
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
nodeflate
#noproxyarp
#nomppc
-mppe required,no40,no56,stateless
require-mschap-v2
refuse-chap
refuse-mschap
#debug
-option /etc/ppp/options.pptpd
speed 115200
stimeout 10
#localip & remoteip are not needed, ip management is done by pppd
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}" \
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() {
}
setup_config() {
+ local enabled localip remoteip mppe
+
validate_pptpd_section "${1}" || {
echo "validation failed"
return 1
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
}
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
}
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
#!/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
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
}
}
-
- $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
}
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
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>
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
--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 += \
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
#
-# 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.
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
+++ /dev/null
-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
#
-# Copyright (C) 2006-2015 OpenWrt.org
+# Copyright (C) 2006-2016 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
PKG_NAME:=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>
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
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
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/
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))
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 \
define Package/gnupg-utils
$(call Package/gnupg/Default)
- DEPENDS:=gnupg
+ DEPENDS:=gnupg +libcurl
TITLE:=Key management utilities for GnuPG
endef
--disable-bzip2 \
--disable-ldap \
--disable-finger \
- --disable-ftp \
--disable-dns-srv \
- --enable-fake-curl \
--disable-regex \
MAKE_FLAGS += \
#
-# 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.
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
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
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
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
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
--- 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
--- 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;
--- /dev/null
+#
+# 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))
--- /dev/null
+#!/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
+}
--- /dev/null
+#!/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
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