Merge pull request #10445 from hnyman/collectd-ntp-fix
authorHannu Nyman <hannu.nyman@iki.fi>
Wed, 6 Nov 2019 12:49:51 +0000 (14:49 +0200)
committerGitHub <noreply@github.com>
Wed, 6 Nov 2019 12:49:51 +0000 (14:49 +0200)
collectd: adjust reaction to ntp time change at boot time

68 files changed:
.circleci/config.yml
devel/pkg-config/Makefile
devel/pkgconf/Makefile [new file with mode: 0644]
lang/golang/golang-version.mk
lang/golang/golang/Makefile
lang/python/README.md
lang/python/python-cffi/Makefile
lang/python/python3-django-cors-headers/Makefile [new file with mode: 0644]
lang/python/python3-drf-nested-routers/Makefile [new file with mode: 0644]
lang/python/python3-sqlparse/Makefile [new file with mode: 0644]
lang/python/python3/Makefile
lang/python/python3/patches/006-do-not-add-multiarch-paths-when-cross-compiling.patch [new file with mode: 0644]
libs/avro/Makefile
libs/avro/patches/010-pkgconfig.patch
libs/avro/patches/020-bin-shared.patch [new file with mode: 0644]
libs/avro/patches/030-ssize_t.patch [new file with mode: 0644]
libs/libartnet/Makefile [deleted file]
libs/libartnet/patches/001-bswap_16.patch [deleted file]
libs/libartnet/patches/002-gcc7.patch [deleted file]
libs/libsoup/Makefile
libs/libtins/Makefile
libs/libtins/patches/010-pkgconfig.patch [new file with mode: 0644]
libs/libyang/Makefile
libs/libyang/patches/001-user-types-CHANGE-convert-internal-types-to-canonical [deleted file]
libs/libyang/patches/002-bugfix_for_freeing_user_type_unions [deleted file]
libs/spice-protocol/Makefile
libs/spice/Makefile
multimedia/youtube-dl/Makefile
net/adblock/Makefile
net/adblock/files/adblock.mail
net/adblock/files/adblock.service
net/adblock/files/adblock.sh
net/banip/Makefile
net/banip/files/banip.init
net/banip/files/banip.service
net/banip/files/banip.sh
net/e2guardian/Makefile [deleted file]
net/e2guardian/files/e2guardian.config [deleted file]
net/e2guardian/files/e2guardian.init [deleted file]
net/e2guardian/files/e2guardianf1.conf [deleted file]
net/foolsm/Makefile
net/frr/Config.in [new file with mode: 0644]
net/frr/Makefile
net/frr/patches/001-vti_interface_fix.patch [new file with mode: 0644]
net/frr/patches/002-bgp_clippy_typo.patch [new file with mode: 0644]
net/frr/patches/003-corss_cares_fix.patch [new file with mode: 0644]
net/frr/patches/004-cross_libcap_fix.patch [new file with mode: 0644]
net/frr/patches/005-fix_OSPF_BFD.patch [new file with mode: 0644]
net/geth/Makefile
net/mii-tool/Makefile
net/shadowsocks-libev/Makefile
sound/mpg123/Makefile
sound/upmpdcli/Config.in
sound/upmpdcli/Makefile
utils/acpid/Makefile
utils/ap51-flash/Makefile
utils/btrfs-progs/Makefile
utils/gawk/Makefile
utils/screen/Makefile
utils/screen/patches/010-fix-configure-failed-while-build-dir-name-contains-y.patch [deleted file]
utils/screen/patches/020-fix-configure-option-disable-use-locale-is-not-worki.patch [deleted file]
utils/screen/patches/030-PATCH-1-4-Remove-redundant-compiler-sanity-checks.patch [deleted file]
utils/screen/patches/040-PATCH-2-4-Provide-cross-compile-alternatives-for-AC_.patch [deleted file]
utils/screen/patches/050-PATCH-3-4-Skip-host-file-system-checks-when-cross-co.patch [deleted file]
utils/screen/patches/060-PATCH-4-4-Avoid-mis-identifying-systems-as-SVR4.patch [deleted file]
utils/unrar/Makefile
utils/yara/Makefile
utils/yara/patches/020-openssl-deprecated.patch [deleted file]

index 8b28976f9ff48808f03df1c3c7c2c9041db4083a..014c09b04766a1bad51a85229250f1f53e82b5d8 100644 (file)
@@ -148,7 +148,16 @@ jobs:
                  echo_green "=> Package check OK"
              done
 
+             make \
+                 -f .config \
+                 -f tmp/.packagedeps \
+                 -f <(echo '$(info $(sort $(package-y) $(package-m)))'; echo -en 'a:\n\t@:') \
+              | tr ' ' '\n' >enabled-package-subdirs.txt
              for PKG in $PKGS ; do
+                 if ! grep -m1 -qE "(^|/)$PKG$" enabled-package-subdirs.txt; then
+                        echo_red "===+ Building: $PKG skipped. It cannot be enabled with $SDK_FILE"
+                        continue
+                 fi
                  echo_blue "===+ Building: $PKG"
                  make "package/$PKG/compile" -j3 V=s || {
                         RET=$?
index 5bfebd28eba42a3f64108359f6dd8891d7064bdf..3ea917e276234baad3d09825416d56466905aecb 100644 (file)
@@ -9,16 +9,18 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=pkg-config
 PKG_VERSION:=0.29.2
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE_URL:=https://pkg-config.freedesktop.org/releases/
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_HASH:=6fc69c01688c9458a57eb9a1664c9aba372ccda420a02bf4429fe610e7e7d591
+
 PKG_MAINTAINER:=Heinrich Schuchardt <xypron.glpk@gmx.de>
 PKG_LICENSE:=GPL-2.0-or-later
+PKG_LICENSE_FILES:=COPYING
 
-PKG_ASLR_PIE:=1
 PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/nls.mk
@@ -29,6 +31,7 @@ define Package/pkg-config
   TITLE:=pkg-config
   URL:=https://www.freedesktop.org/wiki/Software/pkg-config/
   DEPENDS:=+glib2 $(INTL_DEPENDS)
+  CONFLICTS:=pkgconf
 endef
 
 define Package/pkg-config/description
@@ -39,6 +42,8 @@ define Package/pkg-config/description
   other libraries).
 endef
 
+TARGET_CFLAGS += $(FPIC)
+
 define Package/pkg-config/install
        $(INSTALL_DIR) $(1)/usr/bin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/pkg-config $(1)/usr/bin/
diff --git a/devel/pkgconf/Makefile b/devel/pkgconf/Makefile
new file mode 100644 (file)
index 0000000..b2ec399
--- /dev/null
@@ -0,0 +1,68 @@
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=pkgconf
+PKG_VERSION:=1.6.3
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE_URL:=https://distfiles.dereferenced.org/pkgconf
+PKG_HASH:=61f0b31b0d5ea0e862b454a80c170f57bad47879c0c42bd8de89200ff62ea210
+
+PKG_MAINTAINER:=Rosen Penev <rosenp@gmail.com>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=COPYING
+
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libpkgconf
+  SECTION:=libs
+  CATEGORY:=Libraries
+  TITLE:=libpkgconf
+  URL:=http://pkgconf.org/
+endef
+
+define Package/pkgconf
+  SECTION:=devel
+  CATEGORY:=Development
+  TITLE:=pkgconf
+  URL:=http://pkgconf.org/
+  DEPENDS:=+libpkgconf
+endef
+
+define Package/libpkgconf/description
+  libpkgconf is a library which provides access to most of pkgconf’s
+  functionality, to allow other tooling such as compilers and IDEs to
+  discover and use frameworks configured by pkgconf. It features a stable
+  library ABI and API designed for building bindings and other tools.
+endef
+
+define Package/pkgconf/description
+  pkgconf is a program which helps to configure compiler and linker flags
+  for development frameworks. It is similar to pkg-config from
+  freedesktop.org, providing additional functionality while also
+  maintaining compatibility.
+endef
+
+define Package/libpkgconf/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpkgconf.so* $(1)/usr/lib/
+       $(INSTALL_DIR) $(1)/usr/share/aclocal/
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/aclocal/pkg.m4 \
+         $(1)/usr/share/aclocal/
+endef
+
+define Package/pkgconf/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/pkgconf $(1)/usr/bin/
+endef
+
+$(eval $(call BuildPackage,libpkgconf))
+$(eval $(call BuildPackage,pkgconf))
index 7b3f02e23ac8fdca342be7de9d34eaa472bad4e1..4933cb5d6e656c6d29141390c3d47d7b7f34e9a6 100644 (file)
@@ -11,4 +11,4 @@ endif
 
 
 GO_VERSION_MAJOR_MINOR:=1.13
-GO_VERSION_PATCH:=3
+GO_VERSION_PATCH:=4
index 71a30472a91ae1f385cb31bae0b52992ea4a78fc..dcce9730cdf92a18c3541931f73a48631e97659e 100644 (file)
@@ -18,7 +18,7 @@ GO_SOURCE_URLS:=https://dl.google.com/go/ \
 
 PKG_SOURCE:=go$(PKG_VERSION).src.tar.gz
 PKG_SOURCE_URL:=$(GO_SOURCE_URLS)
-PKG_HASH:=4f7123044375d5c404280737fbd2d0b17064b66182a65919ffe20ffe8620e3df
+PKG_HASH:=95dbeab442ee2746b9acf0934c8e2fc26414a0565c008631b04addb8c02e7624
 
 PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=LICENSE
index 61325b7d51def0ba2a939434e8ae061f0252d9d2..94b2afaf60423137bd2b60708747ff060bcb2488 100644 (file)
@@ -171,48 +171,58 @@ This section will describe both, and then it can be inferred which is for which.
 
 Packaging for both Python & Python3 uses the `VARIANT` mechanism for packaging inside OpenWrt. (#### FIXME: find a link for this later if it exists)
 
-### PKG_BUILD_DIR
-
-It's important when packaging for both Python & Python3 to override this variable, so that the build directory differs for each variant.
+### Include python[3]-package.mk
 
-Typically it's just something like:
+If packaging for Python, add this after  `include $(INCLUDE_DIR)/package.mk`
 ```
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-pyasn1-$(PKG_VERSION)
+include ../python-package.mk
 ```
-Where `pyasn1` should be some other name, or maybe `PKG_NAME`
 
-This should be added before this include:
+If packaging for Python3, add this after  `include $(INCLUDE_DIR)/package.mk`
 ```
-include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
 ```
 
-### PKG_UNPACK
+Order doesn't matter between `python-package.mk` & `python3-package.mk`.
 
-In many cases, this needs to be overriden. This is usually because the way Python packages are archived, don't follow the convention of other `tar.gz` packages.
+These will make sure that build rules for Python or Python3 can be specified and picked up for build.
+
+### Include pypi.mk (optional)
+
+If the package source code will be downloaded from [pypi.org](https://pypi.org/), including `pypi.mk` can help simplify the package Makefile.
 
-So, something like:
+To use `pypi.mk`, add this **before** `include $(INCLUDE_DIR)/package.mk`:
 ```
-PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+include ../pypi.mk
 ```
-should be added.
 
-It's not important whether this is after or before `include $(INCLUDE_DIR)/package.mk`
+`pypi.mk` has several `PYPI_*` variables that must/can be set (see below); these should be set before `pypi.mk` is included, i.e. before the `include ../pypi.mk` line.
 
-### Include python[3]-package.mk
+`pypi.mk` also provides default values for `PKG_SOURCE` and `PKG_SOURCE_URL`, so these variables may be omitted.
 
-If packaging for Python, add this after  `include $(INCLUDE_DIR)/package.mk`
-```
-include ../python-package.mk
-```
+One variable is required:
 
-If packaging for Python3, add this after  `include $(INCLUDE_DIR)/package.mk`
+* `PYPI_NAME`: Package name on pypi.org. This should match the PyPI name exactly.
+
+  For example (from the `python-yaml` package):
+  ```
+  PYPI_NAME:=PyYAML
+  ```
+
+These variables are optional:
+
+* `PYPI_SOURCE_NAME`: Package name component of the source tarball filename  
+  Default: Same value as `PYPI_NAME`
+
+* `PYPI_SOURCE_EXT`: File extension of the source tarball filename  
+  Default: `tar.gz`
+
+`pypi.mk` constructs the default `PKG_SOURCE` value from these variables (and `PKG_VERSION`):
 ```
-include ../python3-package.mk
+PKG_SOURCE?=$(PYPI_SOURCE_NAME)-$(PKG_VERSION).$(PYPI_SOURCE_EXT)
 ```
 
-Order doesn't matter between `python-package.mk` & `python3-package.mk`.
-
-These will make sure that build rules for Python or Python3 can be specified and picked up for build.
+The `PYPI_SOURCE_*` variables allow this default `PKG_SOURCE` value to be customized as necessary.
 
 ### Add Package/<PKG_NAME> OpenWrt definitions
 
index b20c3fd3c165570a3d168eab10ed03228aa02d02..3ee79ef84c5f739fab66b01cad926d4e6582b44a 100644 (file)
@@ -8,11 +8,11 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-cffi
-PKG_VERSION:=1.13.1
+PKG_VERSION:=1.13.2
 PKG_RELEASE:=1
 
 PYPI_NAME:=cffi
-PKG_HASH:=558b3afef987cf4b17abd849e7bedf64ee12b28175d564d05b628a0f9355599b
+PKG_HASH:=599a1e8ff057ac530c9ad1778293c665cb81a791421f46922d80a86473c13346
 
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
diff --git a/lang/python/python3-django-cors-headers/Makefile b/lang/python/python3-django-cors-headers/Makefile
new file mode 100644 (file)
index 0000000..7a0409f
--- /dev/null
@@ -0,0 +1,35 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=django-cors-headers
+PKG_VERSION:=3.1.1
+PKG_RELEASE:=1
+
+PYPI_NAME:=django-cors-headers
+PKG_HASH:=5762ec9c2d59f38c76828dc1d4308baca4bc0d3e1d6f217683e7a24a1c4611a3
+
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+PKG_MAINTAINER:=Peter Stadler <peter.stadler@student.uibk.ac.at>
+
+include ../pypi.mk
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-django-cors-headers
+  SUBMENU:=Python
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=Django application for handling the server headers required for Cross-Origin Resource Sharing (CORS).
+  URL:=https://github.com/ottoyiu/django-cors-headers
+  DEPENDS:=python3-django +python3-urllib +python3-light
+  VARIANT:=python3
+  MDEPENDS:=python3-django
+endef
+
+define Package/python3-django-cors-headers/description
+  Django application for handling the server headers required for Cross-Origin Resource Sharing (CORS).
+endef
+
+$(eval $(call Py3Package,python3-django-cors-headers))
+$(eval $(call BuildPackage,python3-django-cors-headers))
+$(eval $(call BuildPackage,python3-django-cors-headers-src))
diff --git a/lang/python/python3-drf-nested-routers/Makefile b/lang/python/python3-drf-nested-routers/Makefile
new file mode 100644 (file)
index 0000000..9b7d02c
--- /dev/null
@@ -0,0 +1,39 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=drf-nested-routers
+PKG_VERSION:=0.91
+PKG_RELEASE:=1
+
+PYPI_NAME:=drf-nested-routers
+PKG_HASH:=46e5c3abc15c782cafafd7d75028e8f9121bbc6228e3599bbb48a3daa4585034
+
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=LICENSE
+PKG_MAINTAINER:=Peter Stadler <peter.stadler@student.uibk.ac.at>
+
+include ../pypi.mk
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-drf-nested-routers
+  SUBMENU:=Python
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=Nested resources for the Django Rest Framework
+  URL:=https://github.com/alanjds/drf-nested-routers
+  DEPENDS:=+python3-django-restframework +python3-django +python3-light
+  VARIANT:=python3
+endef
+
+define Package/python3-drf-nested-routers/description
+  Nested resources for the Django Rest Framework
+endef
+
+define Py3Package/python3-drf-nested-routers/filespec
++|$(PYTHON3_PKG_DIR)
+-|$(PYTHON3_PKG_DIR)/rest_framework_nested/runtests
+endef
+
+$(eval $(call Py3Package,python3-drf-nested-routers))
+$(eval $(call BuildPackage,python3-drf-nested-routers))
+$(eval $(call BuildPackage,python3-drf-nested-routers-src))
diff --git a/lang/python/python3-sqlparse/Makefile b/lang/python/python3-sqlparse/Makefile
new file mode 100644 (file)
index 0000000..4df4dcd
--- /dev/null
@@ -0,0 +1,40 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=sqlparse
+PKG_VERSION:=0.3.0
+PKG_RELEASE:=1
+
+PYPI_NAME:=sqlparse
+PKG_HASH:=7c3dca29c022744e95b547e867cee89f4fce4373f3549ccd8797d8eb52cdb873
+
+PKG_MAINTAINER:=Peter Stadler <peter.stadler@student.uibk.ac.at>
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=LICENSE
+
+include ../pypi.mk
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-sqlparse
+  SUBMENU:=Python
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=Non-validating SQL parser module.
+  URL:=https://github.com/andialbrecht/sqlparse
+  DEPENDS:=+python3-light
+  VARIANT:=python3
+endef
+
+define Package/python3-sqlparse/description
+  A non-validating SQL parser module. It provides support for parsing, splitting and formatting SQL statements.
+endef
+
+define Py3Package/python3-sqlparse/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/$(PYTHON3_PKG_DIR)/sqlparse/__main__.py \
+               $(1)/usr/bin/sqlformat
+endef
+
+$(eval $(call Py3Package,python3-sqlparse))
+$(eval $(call BuildPackage,python3-sqlparse))
+$(eval $(call BuildPackage,python3-sqlparse-src))
index cfa1c00c0aa7952f1d744fc63fcb3ba6ca633f08..809cda4d0fedbca930d44e0cef5675e827595b7a 100644 (file)
@@ -14,7 +14,7 @@ PYTHON_VERSION:=$(PYTHON3_VERSION)
 PYTHON_VERSION_MICRO:=$(PYTHON3_VERSION_MICRO)
 
 PKG_NAME:=python3
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO)
 
 PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz
diff --git a/lang/python/python3/patches/006-do-not-add-multiarch-paths-when-cross-compiling.patch b/lang/python/python3/patches/006-do-not-add-multiarch-paths-when-cross-compiling.patch
new file mode 100644 (file)
index 0000000..16ef86a
--- /dev/null
@@ -0,0 +1,12 @@
+--- a/setup.py
++++ b/setup.py
+@@ -654,7 +654,8 @@ class PyBuildExt(build_ext):
+         # only change this for cross builds for 3.3, issues on Mageia
+         if CROSS_COMPILING:
+             self.add_cross_compiling_paths()
+-        self.add_multiarch_paths()
++        else:
++            self.add_multiarch_paths()
+         self.add_ldflags_cppflags()
+     def init_inc_lib_dirs(self):
index 272e806a4110dc8931d57e4d27d16322b292ee4b..ebd842dd78b0d4de6ee972d2cad798c00ed3e1c6 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=avro-c
-PKG_VERSION:=1.8.2
-PKG_RELEASE:=2
+PKG_VERSION:=1.9.1
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@APACHE/avro/avro-$(PKG_VERSION)/c
-PKG_HASH:=4639982b2b8fbd91fc7128fef672207129c959bb7900dd64b077ce4206edf10e
+PKG_HASH:=7df7bc1e13ce7180f0438ed05ab6642b5b2b6df91f30b927b470e25a78e04642
 
 PKG_MAINTAINER:=John Clark <inindev@gmail.com>
 PKG_LICENSE:=Apache-2.0
@@ -37,10 +37,30 @@ define Package/avro-c/description
   This package contains the Apache Avro C library.
 endef
 
+define Package/avro-c-utils
+  SECTIONS:=utils
+  CATEGORY:=Utilities
+  DEPENDS:=+avro-c
+  TITLE:=Apache Avro C utilities
+  URL:=https://avro.apache.org
+endef
+
+define Package/avro-c-utils/description
+  This package contains the Apache Avro C utilities.
+endef
+
+TARGET_LDFLAGS += -Wl,--gc-sections
+
 define Package/avro-c/install
        $(INSTALL_DIR) $(1)/usr/lib
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libavro.so* $(1)/usr/lib/
 endef
 
+define Package/avro-c-utils/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/avro* $(1)/usr/bin/
+endef
+
 $(eval $(call BuildPackage,avro-c))
+$(eval $(call BuildPackage,avro-c-utils))
 
index 155dee8bcbdcfc4faa27aceb27c609e40956fbc1..2c95912ecf8b0ddd76a5e96d56d15c069888c3a3 100644 (file)
@@ -1,6 +1,6 @@
 --- a/src/CMakeLists.txt
 +++ b/src/CMakeLists.txt
-@@ -121,9 +121,8 @@ endif(WIN32)
+@@ -122,9 +122,8 @@ endif(WIN32)
  
  # Install pkg-config file
  
@@ -22,7 +22,7 @@
  Name: avro-c
  Description: C library for parsing Avro data
  Version: @VERSION@
- URL: http://avro.apache.org/
+ URL: https://avro.apache.org/
 -Libs: -L@prefix@/lib -lavro
 -Cflags: -I@prefix@/include
 +Libs: -L${libdir} -lavro
diff --git a/libs/avro/patches/020-bin-shared.patch b/libs/avro/patches/020-bin-shared.patch
new file mode 100644 (file)
index 0000000..6141937
--- /dev/null
@@ -0,0 +1,27 @@
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -129,20 +129,20 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/avro-c.pc
+         DESTINATION lib/pkgconfig)
+ add_executable(avrocat avrocat.c)
+-target_link_libraries(avrocat avro-static)
++target_link_libraries(avrocat avro-shared)
+ install(TARGETS avrocat RUNTIME DESTINATION bin)
+ add_executable(avroappend avroappend.c)
+-target_link_libraries(avroappend avro-static)
++target_link_libraries(avroappend avro-shared)
+ install(TARGETS avroappend RUNTIME DESTINATION bin)
+ if (NOT WIN32)
+ #TODO: Port getopt() to Windows to compile avropipe.c and avromod.c
+ add_executable(avropipe avropipe.c)
+-target_link_libraries(avropipe avro-static)
++target_link_libraries(avropipe avro-shared)
+ install(TARGETS avropipe RUNTIME DESTINATION bin)
+ add_executable(avromod avromod.c)
+-target_link_libraries(avromod avro-static)
++target_link_libraries(avromod avro-shared)
+ install(TARGETS avromod RUNTIME DESTINATION bin)
+ endif(NOT WIN32)
diff --git a/libs/avro/patches/030-ssize_t.patch b/libs/avro/patches/030-ssize_t.patch
new file mode 100644 (file)
index 0000000..746c7a5
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/src/avro_generic_internal.h
++++ b/src/avro_generic_internal.h
+@@ -28,6 +28,8 @@ extern "C" {
+ #include "avro/schema.h"
+ #include "avro/value.h"
++#include <stdio.h>
++
+ /*
+  * Each generic value implementation struct defines a couple of extra
+  * methods that we use to control the lifecycle of the value objects.
diff --git a/libs/libartnet/Makefile b/libs/libartnet/Makefile
deleted file mode 100644 (file)
index b2c325a..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-#
-# Copyright (C) 2010-2014 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=libartnet
-PKG_VERSION:=1.1.2
-PKG_RELEASE:=3
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://github.com/OpenLightingProject/libartnet/releases/download/1.1.2
-PKG_HASH:=19cdda434e208a81ddd138377f11046364438e40e34542ae101d6aa3fcaec696
-
-PKG_MAINTAINER:=Martijn Zilverschoon <martijn@friedzombie.com>
-PKG_LICENSE:=GPL-2.1
-PKG_LICENSE_FILES:=COPYING
-
-PKG_INSTALL:=1
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/libartnet
-       SECTION:=libs
-       CATEGORY:=Libraries
-       TITLE:=Libartnet is an implementation of the ArtNet protocol.
-       URL:=https://www.openlighting.org/libartnet-main/
-endef
-
-define Package/libartnet/description
-       Libartnet is an implementation of the ArtNet protocol. ArtNet allows the
-       transmission of DMX and related data over IP networks.
-endef
-
-define Build/InstallDev
-       mkdir -p $(1)/usr/include
-       $(CP) $(PKG_INSTALL_DIR)/usr/include/artnet $(1)/usr/include/
-       mkdir -p $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libartnet.{so,so.1,so.1.0.0} $(1)/usr/lib/
-endef
-
-
-define Package/libartnet/install
-       $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libartnet.{so,so.1,so.1.0.0} $(1)/usr/lib/
-endef
-
-$(eval $(call BuildPackage,libartnet))
diff --git a/libs/libartnet/patches/001-bswap_16.patch b/libs/libartnet/patches/001-bswap_16.patch
deleted file mode 100644 (file)
index 9c9be5f..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
---- a/artnet/private.h
-+++ b/artnet/private.h
-@@ -100,7 +100,9 @@ extern uint16_t HIGH_BYTE;
- #endif
- // byte ordering macros
-+#ifndef bswap_16
- #define bswap_16(x)  ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8))
-+#endif
- // htols : convert short from host to little endian order
- #ifdef WIN32
diff --git a/libs/libartnet/patches/002-gcc7.patch b/libs/libartnet/patches/002-gcc7.patch
deleted file mode 100644 (file)
index 9f0d62f..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/artnet/transmit.c
-+++ b/artnet/transmit.c
-@@ -163,7 +163,7 @@ int artnet_tx_tod_data(node n, int id) {
-   bloc = 0;
-   while (remaining > 0) {
--    memset(&tod.data.toddata.tod,0x00, ARTNET_MAX_UID_COUNT);
-+    memset(&tod.data.toddata.tod,0x00, sizeof(tod.data.toddata.tod));
-     lim = min(ARTNET_MAX_UID_COUNT, remaining);
-     tod.data.toddata.blockCount = bloc++;
-     tod.data.toddata.uidCount = lim;
index d26ef00e5b03e9fcf56d52af8663e0ba29a1d383..e66e1ef503a3a2c7b1826b8a411239f56b78e3d5 100644 (file)
@@ -6,24 +6,25 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libsoup
-PKG_VERSION:=2.65.1
-PKG_RELEASE:=3
+PKG_VERSION:=2.68.2
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_SOURCE_URL:=@GNOME/$(PKG_NAME)/2.65
-PKG_HASH:=3f3718623338f1bd7d7899dae2bdb613348212d59999a27432120afc1435ff04
+PKG_SOURCE_URL:=@GNOME/$(PKG_NAME)/2.68
+PKG_HASH:=51ad3001a946fe3bcf29b692dc9ffe05cdf702ea6ca0ee8c3099a99a2f4e3933
 
-PKG_LICENSE:=GPL-2.0
+PKG_LICENSE:=LGPL-2.1-or-later
 PKG_LICENSE_FILES:=COPYING
 PKG_CPE_ID:=cpe:/a:gnome:libsoup
 
-PKG_BUILD_DEPENDS:=intltool/host
+PKG_BUILD_DEPENDS:=meson/host glib2/host
 PKG_BUILD_PARALLEL:=1
 PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/nls.mk
+include ../../devel/meson/meson.mk
 
 define Package/libsoup
   SECTION:=libs
@@ -34,17 +35,16 @@ define Package/libsoup
   DEPENDS:=+glib2 +libxml2 +libgnutls +libsqlite3 +libpsl $(ICONV_DEPENDS) $(INTL_DEPENDS)
 endef
 
-CONFIGURE_ARGS += \
-               --disable-debug \
-               --disable-glibtest \
-               --disable-gtk-doc-html \
-               --disable-introspection \
-               --disable-more-warnings \
-               --disable-vala \
-               --without-apache-httpd \
-               --without-gnome \
-               --without-gssapi \
-               --without-ntlm-auth
+MESON_ARGS += \
+       -Dtests=false \
+       -Dinstalled_tests=false \
+       -Dgtk_doc=false \
+       -Dintrospection=disabled \
+       -Dtls_check=false \
+       -Dvapi=disabled \
+       -Dgnome=false \
+       -Dgssapi=disabled \
+       -Dntlm=disabled \
 
 define package/libsoup/decription
 Libsoup is an HTTP library implementation in C
@@ -54,7 +54,7 @@ define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/{lib/pkgconfig,include/libsoup-2.4/libsoup}
 
        $(CP) \
-               $(PKG_INSTALL_DIR)/usr/lib/libsoup-2.4.{so*,la,a} \
+               $(PKG_INSTALL_DIR)/usr/lib/libsoup-2.4.so* \
                $(1)/usr/lib/
 
        $(INSTALL_DATA) \
index 66e482bf97b237bcea35c5f322d169f824d30df2..1b5f4b558af2f848194f437f8b82fe85064125b7 100644 (file)
@@ -8,45 +8,49 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libtins
-PKG_VERSION:=4.0
-PKG_RELEASE:=3
-
-PKG_MAINTAINER:= Steven Hessing <steven.hessing@gmail.com>
+PKG_VERSION:=4.2
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/mfontanini/libtins/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=2a758d1bed51760bbd57fcaa00610534e0cc3a6d55d91983724e5f46739d66b8
+PKG_HASH:=a9fed73e13f06b06a4857d342bb30815fa8c359d00bd69547e567eecbbb4c3a1
 
+PKG_MAINTAINER:= Steven Hessing <steven.hessing@gmail.com>
 PKG_LICENSE:=BSD-2-Clause
 PKG_LICENSE_FILES:=LICENSE
 
 PKG_BUILD_PARALLEL:=1
-
 CMAKE_INSTALL:=1
+
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/cmake.mk
-CMAKE_OPTIONS += -D_RUN_RESULT_VAR=FORCE
-CMAKE_OPTIONS += -DLIBTINS_ENABLE_WPA2=0
-CMAKE_OPTIONS += -DLIBTINS_ENABLE_CXX11=1
-
-define Build/InstallDev
-       $(INSTALL_DIR) $(1)/usr/include/ $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/include/tins $(1)/usr/include/
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtins* $(1)/usr/lib/
-endef
 
 define Package/libtins
-       SECTION:=net
-       CATEGORY:=Libraries
-       TITLE:=libtins
-       URL:=https://libtins.github.io/
-       DEPENDS:=+libstdcpp +libpcap
+  SECTION:=net
+  CATEGORY:=Libraries
+  TITLE:=libtins
+  URL:=https://libtins.github.io/
+  DEPENDS:=+libstdcpp +libpcap
 endef
 
 define Package/libtins/description
-libtins is a high-level, multiplatform C++ network packet sniffing and crafting library.
+  libtins is a high-level, multiplatform C++ network packet sniffing and crafting library.
 endef
 
+CMAKE_OPTIONS += \
+       -D_RUN_RESULT_VAR=FORCE \
+       -DLIBTINS_BUILD_EXAMPLES=OFF \
+       -DLIBTINS_BUILD_TESTS=OFF \
+       -DLIBTINS_ENABLE_ACK_TRACKER=OFF \
+       -DLIBTINS_ENABLE_CXX11=ON \
+       -DLIBTINS_ENABLE_DOT11=OFF \
+       -DLIBTINS_ENABLE_PCAP=ON \
+       -DLIBTINS_ENABLE_TCP_STREAM_CUSTOM_DATA=OFF \
+       -DLIBTINS_ENABLE_WPA2=OFF
+
+TARGET_CXXFLAGS += -fno-rtti -ffunction-sections -fdata-sections -flto
+TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
+
 define Package/libtins/install
        $(INSTALL_DIR) $(1)/usr/lib
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtins.so.* $(1)/usr/lib/
diff --git a/libs/libtins/patches/010-pkgconfig.patch b/libs/libtins/patches/010-pkgconfig.patch
new file mode 100644 (file)
index 0000000..c478666
--- /dev/null
@@ -0,0 +1,10 @@
+--- a/libtins.pc.in
++++ b/libtins.pc.in
+@@ -1,6 +1,6 @@
+ prefix=@pkgconfig_prefix@
+ exec_prefix=@pkgconfig_exec_prefix@
+-libdir=@pkgconfig_libdir@
++libdir=${exec_prefix}/lib
+ includedir=${prefix}/include
+ Name: libtins
index 6d5cba9976937b5441df3275122af2f9055fccc9..c03af3ba8646e9f3a07d4357b506993b20282b16 100644 (file)
@@ -8,20 +8,20 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libyang
-PKG_VERSION:=0.16-r3
-PKG_RELEASE:=4
-
-PKG_LICENSE:=GPL-2.0-or-later
-PKG_MAINTAINER:=Mislav Novakovic <mislav.novakovic@sartura.hr>
+PKG_VERSION:=1.0-r4
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/CESNET/libyang/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=4745460dedc4ba17d8bcfc39ad9ba0d1b91bbe82b55b9417a090390909ba8ca5
+PKG_HASH:=411f0c675b0858f8deabc0545e33fbd791ff7c7a5b7d2c27e347e3973d5b8ae4
 
-CMAKE_INSTALL:=1
+PKG_MAINTAINER:=Mislav Novakovic <mislav.novakovic@sartura.hr>
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=LICENSE
 
+CMAKE_INSTALL:=1
 PKG_BUILD_PARALLEL:=1
-PKG_INSTALL:=1
+CMAKE_BINARY_SUBDIR:=build
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/cmake.mk
@@ -30,7 +30,7 @@ define Package/libyang
   SECTION:=libs
   CATEGORY:=Libraries
   TITLE:=YANG data modeling language library
-  URL:=$(PKG_SOURCE_URL)
+  URL:=https://github.com/CESNET/libyang
   DEPENDS:=+libpcre +libpthread
 endef
 
@@ -38,7 +38,7 @@ define Package/yanglint
   SECTION:=utils
   CATEGORY:=Utilities
   TITLE:=YANG data modeling language utility
-  URL:=$(PKG_SOURCE_URL)
+  URL:=https://github.com/CESNET/libyang
   DEPENDS:=+libyang
 endef
 
@@ -47,23 +47,7 @@ define Package/libyang/description
  The library is used e.g. in libnetconf2, Netopeer2 or sysrepo projects.
 endef
 
-TARGET_LDFLAGS += -lm
-
-CMAKE_OPTIONS += \
-       -DCMAKE_INSTALL_PREFIX:PATH=/usr \
-       -DENABLE_LYD_PRIV:BOOL=ON \
-       -DCMAKE_BUILD_TYPE:STRING=Release
-
-define Build/InstallDev
-       $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libyang.so* $(1)/usr/lib/
-
-       $(INSTALL_DIR) $(1)/usr/include/libyang
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/include/libyang/* $(1)/usr/include/libyang/
-
-       $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
-       $(INSTALL_CONF) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libyang.pc $(1)/usr/lib/pkgconfig/
-endef
+CMAKE_OPTIONS += -DENABLE_LYD_PRIV:BOOL=ON
 
 define Package/libyang/install
        $(INSTALL_DIR) $(1)/usr/lib
@@ -78,7 +62,7 @@ endef
 
 define Package/yanglint/install
        $(INSTALL_DIR) $(1)/usr/bin
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/yanglint $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/yanglint $(1)/usr/bin/
 endef
 
 $(eval $(call BuildPackage,libyang))
diff --git a/libs/libyang/patches/001-user-types-CHANGE-convert-internal-types-to-canonical b/libs/libyang/patches/001-user-types-CHANGE-convert-internal-types-to-canonical
deleted file mode 100644 (file)
index 2069206..0000000
+++ /dev/null
@@ -1,1030 +0,0 @@
-Index: libyang-0.16-r3/CMakeLists.txt
-===================================================================
---- libyang-0.16-r3.orig/CMakeLists.txt
-+++ libyang-0.16-r3/CMakeLists.txt
-@@ -351,8 +351,8 @@ else()
-     add_subdirectory(src/extensions)
- endif(ENABLE_STATIC)
--# YANG user types plugins ("user_ipv4" is just an example, not installed by default)
--set(USER_TYPE_LIST "user_date_and_time")
-+# YANG user types plugins
-+set(USER_TYPE_LIST "user_yang_types" "user_inet_types")
- if(ENABLE_STATIC)
-     set(USER_TYPE_LIST_SIZE " 0 ")
-     foreach(USER_TYPE ${USER_TYPE_LIST})
-Index: libyang-0.16-r3/src/parser.c
-===================================================================
---- libyang-0.16-r3.orig/src/parser.c
-+++ libyang-0.16-r3/src/parser.c
-@@ -1936,7 +1936,7 @@ lyp_parse_value(struct lys_type *type, c
-     /* search user types in case this value is supposed to be stored in a custom way */
-     if (store && type->der && type->der->module) {
--        c = lytype_store(type->der->module, type->der->name, *value_, val);
-+        c = lytype_store(type->der->module, type->der->name, value_, val);
-         if (c == -1) {
-             goto error;
-         } else if (!c) {
-Index: libyang-0.16-r3/src/parser.h
-===================================================================
---- libyang-0.16-r3.orig/src/parser.h
-+++ libyang-0.16-r3/src/parser.h
-@@ -258,11 +258,11 @@ struct lyext_plugin *ext_get_plugin(cons
-  *
-  * @param[in] mod Module of the type.
-  * @param[in] type_name Type (typedef) name.
-- * @param[in] value_str Value to store as a string.
-+ * @param[in,out] value_str Stored string value, can be overwritten by the user store callback.
-  * @param[in,out] value Filled value to be overwritten by the user store callback.
-  * @return 0 on successful storing, 1 if the type is not a user type, -1 on error.
-  */
--int lytype_store(const struct lys_module *mod, const char *type_name, const char *value_str, lyd_val *value);
-+int lytype_store(const struct lys_module *mod, const char *type_name, const char **value_str, lyd_val *value);
- /**
-  * @brief Free a user type stored value.
-Index: libyang-0.16-r3/src/plugins.c
-===================================================================
---- libyang-0.16-r3.orig/src/plugins.c
-+++ libyang-0.16-r3/src/plugins.c
-@@ -574,7 +574,7 @@ lytype_find(const char *module, const ch
- }
- int
--lytype_store(const struct lys_module *mod, const char *type_name, const char *value_str, lyd_val *value)
-+lytype_store(const struct lys_module *mod, const char *type_name, const char **value_str, lyd_val *value)
- {
-     struct lytype_plugin_list *p;
-     char *err_msg = NULL;
-@@ -583,9 +583,9 @@ lytype_store(const struct lys_module *mo
-     p = lytype_find(mod->name, mod->rev_size ? mod->rev[0].date : NULL, type_name);
-     if (p) {
--        if (p->store_clb(type_name, value_str, value, &err_msg)) {
-+        if (p->store_clb(mod->ctx, type_name, value_str, value, &err_msg)) {
-             if (!err_msg) {
--                if (asprintf(&err_msg, "Failed to store value \"%s\" of user type \"%s\".", value_str, type_name) == -1) {
-+                if (asprintf(&err_msg, "Failed to store value \"%s\" of user type \"%s\".", *value_str, type_name) == -1) {
-                     LOGMEM(mod->ctx);
-                     return -1;
-                 }
-Index: libyang-0.16-r3/src/tree_data.c
-===================================================================
---- libyang-0.16-r3.orig/src/tree_data.c
-+++ libyang-0.16-r3/src/tree_data.c
-@@ -5476,7 +5476,7 @@ _lyd_dup_node(const struct lyd_node *nod
-         }
-         if (sleaf->type.der && sleaf->type.der->module) {
--            r = lytype_store(sleaf->type.der->module, sleaf->type.der->name, new_leaf->value_str, &new_leaf->value);
-+            r = lytype_store(sleaf->type.der->module, sleaf->type.der->name, &new_leaf->value_str, &new_leaf->value);
-             if (r == -1) {
-                 goto error;
-             } else if (!r) {
-Index: libyang-0.16-r3/src/user_types.h
-===================================================================
---- libyang-0.16-r3.orig/src/user_types.h
-+++ libyang-0.16-r3/src/user_types.h
-@@ -33,13 +33,15 @@ extern "C" {
-  * This callback should overwrite the value stored in \p value using some custom encoding. Be careful,
-  * if the type is #LY_TYPE_BITS, the bits must be freed before overwritting the union value.
-  *
-+ * @param[in] ctx libyang ctx to enable correct manipulation with values that are in the dictionary.
-  * @param[in] type_name Name of the type being stored.
-- * @param[in] value_str String value to be stored.
-+ * @param[in,out] value_str String value to be stored.
-  * @param[in,out] value Value union for the value to be stored in (already is but in the standard way).
-  * @param[out] err_msg Can be filled on error. If not, a generic error message will be printed.
-  * @return 0 on success, non-zero if an error occured and the value could not be stored for any reason.
-  */
--typedef int (*lytype_store_clb)(const char *type_name, const char *value_str, lyd_val *value, char **err_msg);
-+typedef int (*lytype_store_clb)(struct ly_ctx *ctx, const char *type_name, const char **value_str, lyd_val *value,
-+                                char **err_msg);
- struct lytype_plugin_list {
-     const char *module;          /**< Name of the module where the type is defined. */
-Index: libyang-0.16-r3/src/user_types/user_inet_types.c
-===================================================================
---- /dev/null
-+++ libyang-0.16-r3/src/user_types/user_inet_types.c
-@@ -0,0 +1,235 @@
-+/**
-+ * @file user_inet_types.c
-+ * @author Michal Vasko <mvasko@cesnet.cz>
-+ * @brief ietf-inet-types typedef conversion to canonical format
-+ *
-+ * Copyright (c) 2018 CESNET, z.s.p.o.
-+ *
-+ * This source code is licensed under BSD 3-Clause License (the "License").
-+ * You may not use this file except in compliance with the License.
-+ * You may obtain a copy of the License at
-+ *
-+ *     https://opensource.org/licenses/BSD-3-Clause
-+ */
-+
-+#define _GNU_SOURCE
-+
-+#include <stdlib.h>
-+#include <string.h>
-+#include <errno.h>
-+#include <arpa/inet.h>
-+
-+#include "../user_types.h"
-+
-+#ifdef __GNUC__
-+#  define UNUSED(x) UNUSED_ ## x __attribute__((__unused__))
-+#else
-+#  define UNUSED(x) UNUSED_ ## x
-+#endif
-+
-+static char *
-+convert_ipv6_addr(const char *ipv6_addr, char **err_msg)
-+{
-+    char buf[sizeof(struct in6_addr)], *str;
-+
-+    str = malloc(INET6_ADDRSTRLEN);
-+    if (!str) {
-+        *err_msg = NULL;
-+        return NULL;
-+    }
-+
-+    if (!inet_pton(AF_INET6, ipv6_addr, buf)) {
-+        asprintf(err_msg, "Failed to convert IPv6 address \"%s\".", ipv6_addr);
-+        free(str);
-+        return NULL;
-+    }
-+
-+    if (!inet_ntop(AF_INET6, buf, str, INET6_ADDRSTRLEN)) {
-+        asprintf(err_msg, "Failed to convert IPv6 address (%s).", strerror(errno));
-+        free(str);
-+        return NULL;
-+    }
-+
-+    return str;
-+}
-+
-+static int
-+ip_store_clb(struct ly_ctx *ctx, const char *UNUSED(type_name), const char **value_str, lyd_val *value, char **err_msg)
-+{
-+    char *ptr, *ipv6_addr, *result, *tmp;
-+
-+    if (!strchr(*value_str, ':')) {
-+        /* not an IPv6 address */
-+        return 0;
-+    }
-+
-+    if ((ptr = strchr(*value_str, '%'))) {
-+        /* there is a zone index */
-+        ipv6_addr = strndup(*value_str, ptr - *value_str);
-+    } else {
-+        ipv6_addr = (char *)*value_str;
-+    }
-+
-+    /* convert to canonical format */
-+    result = convert_ipv6_addr(ipv6_addr, err_msg);
-+    if (ptr) {
-+        free(ipv6_addr);
-+    }
-+
-+    /* failure */
-+    if (!result) {
-+        return 1;
-+    }
-+
-+    if (strncmp(*value_str, result, strlen(result))) {
-+        /* some conversion took place, update the value */
-+        if (ptr) {
-+            tmp = result;
-+            if (asprintf(&result, "%s%s", tmp, ptr) == -1) {
-+                free(tmp);
-+                *err_msg = NULL;
-+                return 1;
-+            }
-+            free(tmp);
-+        }
-+
-+        lydict_remove(ctx, *value_str);
-+        *value_str = lydict_insert_zc(ctx, result);
-+        value->string = *value_str;
-+    } else {
-+        free(result);
-+    }
-+
-+    return 0;
-+}
-+
-+static int
-+ipv4_prefix_store_clb(struct ly_ctx *ctx, const char *UNUSED(type_name), const char **value_str, lyd_val *value, char **err_msg)
-+{
-+    char *pref_str, *ptr, *result;
-+    int result_len, i, j, num;
-+    unsigned long int pref;
-+
-+    pref_str = strchr(*value_str, '/');
-+    if (!pref_str) {
-+        asprintf(err_msg, "Invalid IPv4 prefix \"%s\".", *value_str);
-+        return 1;
-+    }
-+
-+    pref = strtoul(pref_str + 1, &ptr, 10);
-+    if (ptr[0]) {
-+        asprintf(err_msg, "Invalid IPv4 prefix \"%s\".", *value_str);
-+        return 1;
-+    }
-+
-+    result = malloc(INET_ADDRSTRLEN + 3);
-+    if (!result) {
-+        *err_msg = NULL;
-+        return 1;
-+    }
-+
-+    /* generate ip prefix mask */
-+    result_len = 0;
-+    for (i = 0; i < 4; ++i) {
-+        num = 0;
-+        for (j = 0; (j < 8) && pref; ++j) {
-+            num += (1 << j);
-+            --pref;
-+        }
-+
-+        result_len += sprintf(result + result_len, "%s%d", i ? "." : "", num);
-+    }
-+
-+    /* add the prefix */
-+    result_len += sprintf(result + result_len, "%s", pref_str);
-+
-+    if (strcmp(result, *value_str)) {
-+        /* some conversion took place, update the value */
-+        lydict_remove(ctx, *value_str);
-+        *value_str = lydict_insert_zc(ctx, result);
-+        value->string = *value_str;
-+    } else {
-+        free(result);
-+    }
-+
-+    return 0;
-+}
-+
-+static int
-+ipv6_prefix_store_clb(struct ly_ctx *ctx, const char *UNUSED(type_name), const char **value_str, lyd_val *value, char **err_msg)
-+{
-+    char *pref_str, *ptr, *result;
-+    int result_len, i, j, num;
-+    unsigned long int pref;
-+
-+    pref_str = strchr(*value_str, '/');
-+    if (!pref_str) {
-+        asprintf(err_msg, "Invalid IPv6 prefix \"%s\".", *value_str);
-+        return 1;
-+    }
-+
-+    pref = strtoul(pref_str + 1, &ptr, 10);
-+    if (ptr[0]) {
-+        asprintf(err_msg, "Invalid IPv6 prefix \"%s\".", *value_str);
-+        return 1;
-+    }
-+
-+    result = malloc(INET6_ADDRSTRLEN + 4);
-+    if (!result) {
-+        *err_msg = NULL;
-+        return 1;
-+    }
-+
-+    /* generate ipv6 prefix mask */
-+    result_len = 0;
-+    for (i = 0; i < 8; ++i) {
-+        num = 0;
-+        for (j = 0; (j < 16) && pref; ++j) {
-+            num += (1 << j);
-+            --pref;
-+        }
-+
-+        result_len += sprintf(result + result_len, "%s%x", i ? ":" : "", num);
-+
-+        if (!pref && (i < 6)) {
-+            /* shorten ending zeros */
-+            result_len += sprintf(result + result_len, "::");
-+            break;
-+        }
-+    }
-+
-+    /* add the prefix */
-+    result_len += sprintf(result + result_len, "%s", pref_str);
-+
-+    if (strcmp(result, *value_str)) {
-+        /* some conversion took place, update the value */
-+        lydict_remove(ctx, *value_str);
-+        *value_str = lydict_insert_zc(ctx, result);
-+        value->string = *value_str;
-+    } else {
-+        free(result);
-+    }
-+
-+    return 0;
-+}
-+
-+static int
-+ip_prefix_store_clb(struct ly_ctx *ctx, const char *type_name, const char **value_str, lyd_val *value, char **err_msg)
-+{
-+    if (strchr(*value_str, ':')) {
-+        return ipv6_prefix_store_clb(ctx, type_name, value_str, value, err_msg);
-+    }
-+    return ipv4_prefix_store_clb(ctx, type_name, value_str, value, err_msg);
-+}
-+
-+/* Name of this array must match the file name! */
-+struct lytype_plugin_list user_inet_types[] = {
-+    {"ietf-inet-types", "2013-07-15", "ip-address", ip_store_clb, NULL},
-+    {"ietf-inet-types", "2013-07-15", "ipv6-address", ip_store_clb, NULL},
-+    {"ietf-inet-types", "2013-07-15", "ip-address-no-zone", ip_store_clb, NULL},
-+    {"ietf-inet-types", "2013-07-15", "ipv6-address-no-zone", ip_store_clb, NULL},
-+    {"ietf-inet-types", "2013-07-15", "ip-prefix", ip_prefix_store_clb, NULL},
-+    {"ietf-inet-types", "2013-07-15", "ipv4-prefix", ipv4_prefix_store_clb, NULL},
-+    {"ietf-inet-types", "2013-07-15", "ipv6-prefix", ipv6_prefix_store_clb, NULL},
-+    {NULL, NULL, NULL, NULL, NULL} /* terminating item */
-+};
-Index: libyang-0.16-r3/src/user_types/user_ipv4.c
-===================================================================
---- libyang-0.16-r3.orig/src/user_types/user_ipv4.c
-+++ /dev/null
-@@ -1,42 +0,0 @@
--/**
-- * @file user_ipv4.c
-- * @author Michal Vasko <mvasko@cesnet.cz>
-- * @brief Example implementation of an ipv4-address as a user type
-- *
-- * Copyright (c) 2018 CESNET, z.s.p.o.
-- *
-- * This source code is licensed under BSD 3-Clause License (the "License").
-- * You may not use this file except in compliance with the License.
-- * You may obtain a copy of the License at
-- *
-- *     https://opensource.org/licenses/BSD-3-Clause
-- */
--
--#include <stdlib.h>
--#include <string.h>
--#include <arpa/inet.h>
--#include <sys/socket.h>
--
--#include "../user_types.h"
--
--static int
--ipv4_store_clb(const char *type_name, const char *value_str, lyd_val *value, char **err_msg)
--{
--    value->ptr = malloc(sizeof(struct in_addr));
--    if (!value->ptr) {
--        return 1;
--    }
--
--    if (inet_pton(AF_INET, value_str, value->ptr) != 1) {
--        free(value->ptr);
--        return 1;
--    }
--    return 0;
--}
--
--/* Name of this array must match the file name! */
--struct lytype_plugin_list user_ipv4[] = {
--    {"ietf-inet-types", "2013-07-15", "ipv4-address", ipv4_store_clb, free},
--    {"ietf-inet-types", "2013-07-15", "ipv4-address-no-zone", ipv4_store_clb, free},
--    {NULL, NULL, NULL, NULL, NULL} /* terminating item */
--};
-Index: libyang-0.16-r3/src/user_types/user_yang_types.c
-===================================================================
---- /dev/null
-+++ libyang-0.16-r3/src/user_types/user_yang_types.c
-@@ -0,0 +1,303 @@
-+/**
-+ * @file user_yang_types.c
-+ * @author Michal Vasko <mvasko@cesnet.cz>
-+ * @brief ietf-yang-types typedef validation and conversion to canonical format
-+ *
-+ * Copyright (c) 2018 CESNET, z.s.p.o.
-+ *
-+ * This source code is licensed under BSD 3-Clause License (the "License").
-+ * You may not use this file except in compliance with the License.
-+ * You may obtain a copy of the License at
-+ *
-+ *     https://opensource.org/licenses/BSD-3-Clause
-+ */
-+#define _GNU_SOURCE
-+
-+#include <stdlib.h>
-+#include <string.h>
-+#include <stdint.h>
-+#include <errno.h>
-+#include <time.h>
-+#include <ctype.h>
-+
-+#include "../user_types.h"
-+
-+#ifdef __GNUC__
-+#  define UNUSED(x) UNUSED_ ## x __attribute__((__unused__))
-+#else
-+#  define UNUSED(x) UNUSED_ ## x
-+#endif
-+
-+static const char *gmt_offsets[] = {
-+    "+00:00",
-+    "+00:20",
-+    "+00:30",
-+    "+01:00",
-+    "+01:24",
-+    "+01:30",
-+    "+02:00",
-+    "+02:30",
-+    "+03:00",
-+    "+03:30",
-+    "+04:00",
-+    "+04:30",
-+    "+04:51",
-+    "+05:00",
-+    "+05:30",
-+    "+05:40",
-+    "+05:45",
-+    "+06:00",
-+    "+06:30",
-+    "+07:00",
-+    "+07:20",
-+    "+07:30",
-+    "+08:00",
-+    "+08:30",
-+    "+08:45",
-+    "+09:00",
-+    "+09:30",
-+    "+09:45",
-+    "+10:00",
-+    "+10:30",
-+    "+11:00",
-+    "+11:30",
-+    "+12:00",
-+    "+12:45",
-+    "+13:00",
-+    "+13:45",
-+    "+14:00",
-+    "-00:00",
-+    "-00:44",
-+    "-01:00",
-+    "-02:00",
-+    "-02:30",
-+    "-03:00",
-+    "-03:30",
-+    "-04:00",
-+    "-04:30",
-+    "-05:00",
-+    "-06:00",
-+    "-07:00",
-+    "-08:00",
-+    "-08:30",
-+    "-09:00",
-+    "-09:30",
-+    "-10:00",
-+    "-10:30",
-+    "-11:00",
-+    "-12:00",
-+};
-+
-+static int
-+date_and_time_store_clb(struct ly_ctx *UNUSED(ctx), const char *UNUSED(type_name), const char **value_str,
-+                        lyd_val *UNUSED(value), char **err_msg)
-+{
-+    struct tm tm, tm2;
-+    uint32_t i, j, k;
-+    const char *val_str = *value_str;
-+    int ret;
-+
-+    /* \d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[\+\-]\d{2}:\d{2})
-+     * 2018-03-21T09:11:05(.55785...)(Z|+02:00) */
-+    memset(&tm, 0, sizeof tm);
-+    i = 0;
-+
-+    /* year */
-+    tm.tm_year = atoi(val_str + i);
-+    /* if there was some invalid number, it will either be discovered in the loop below or by mktime() */
-+    tm.tm_year -= 1900;
-+    for (j = i + 4; i < j; ++i) {
-+        if (!isdigit(val_str[i])) {
-+            ret = asprintf(err_msg, "Invalid character '%c'[%d] in date-and-time value \"%s\", a digit expected.", val_str[i], i, val_str);
-+            goto error;
-+        }
-+    }
-+    if (val_str[i] != '-') {
-+        ret = asprintf(err_msg, "Invalid character '%c'[%d] in date-and-time value \"%s\", '-' expected.", val_str[i], i, val_str);
-+        goto error;
-+    }
-+    ++i;
-+
-+    /* month */
-+    tm.tm_mon = atoi(val_str + i);
-+    tm.tm_mon -= 1;
-+    for (j = i + 2; i < j; ++i) {
-+        if (!isdigit(val_str[i])) {
-+            ret = asprintf(err_msg, "Invalid character '%c'[%d] in date-and-time value \"%s\", a digit expected.", val_str[i], i, val_str);
-+            goto error;
-+        }
-+    }
-+    if (val_str[i] != '-') {
-+        ret = asprintf(err_msg, "Invalid character '%c'[%d] in date-and-time value \"%s\", '-' expected.", val_str[i], i, val_str);
-+        goto error;
-+    }
-+    ++i;
-+
-+    /* day */
-+    tm.tm_mday = atoi(val_str + i);
-+    for (j = i + 2; i < j; ++i) {
-+        if (!isdigit(val_str[i])) {
-+            ret = asprintf(err_msg, "Invalid character '%c'[%d] in date-and-time value \"%s\", a digit expected.", val_str[i], i, val_str);
-+            goto error;
-+        }
-+    }
-+    if (val_str[i] != 'T') {
-+        ret = asprintf(err_msg, "Invalid character '%c'[%d] in date-and-time value \"%s\", 'T' expected.", val_str[i], i, val_str);
-+        goto error;
-+    }
-+    ++i;
-+
-+    /* hours */
-+    tm.tm_hour = atoi(val_str + i);
-+    for (j = i + 2; i < j; ++i) {
-+        if (!isdigit(val_str[i])) {
-+            ret = asprintf(err_msg, "Invalid character '%c'[%d] in date-and-time value \"%s\", a digit expected.", val_str[i], i, val_str);
-+            goto error;
-+        }
-+    }
-+    if (val_str[i] != ':') {
-+        ret = asprintf(err_msg, "Invalid character '%c'[%d] in date-and-time value \"%s\", ':' expected.", val_str[i], i, val_str);
-+        goto error;
-+    }
-+    ++i;
-+
-+    /* minutes */
-+    tm.tm_min = atoi(val_str + i);
-+    for (j = i + 2; i < j; ++i) {
-+        if (!isdigit(val_str[i])) {
-+            ret = asprintf(err_msg, "Invalid character '%c'[%d] in date-and-time value \"%s\", a digit expected.", val_str[i], i, val_str);
-+            goto error;
-+        }
-+    }
-+    if (val_str[i] != ':') {
-+        ret = asprintf(err_msg, "Invalid character '%c'[%d] in date-and-time value \"%s\", ':' expected.", val_str[i], i, val_str);
-+        goto error;
-+    }
-+    ++i;
-+
-+    /* seconds */
-+    tm.tm_sec = atoi(val_str + i);
-+    for (j = i + 2; i < j; ++i) {
-+        if (!isdigit(val_str[i])) {
-+            ret = asprintf(err_msg, "Invalid character '%c'[%d] in date-and-time value \"%s\", a digit expected.", val_str[i], i, val_str);
-+            goto error;
-+        }
-+    }
-+    if ((val_str[i] != '.') && (val_str[i] != 'Z') && (val_str[i] != '+') && (val_str[i] != '-')) {
-+        ret = asprintf(err_msg, "Invalid character '%c'[%d] in date-and-time value \"%s\", '.', 'Z', '+', or '-' expected.",
-+                       val_str[i], i, val_str);
-+        goto error;
-+    }
-+
-+    /* validate using mktime() */
-+    tm2 = tm;
-+    if (mktime(&tm) == -1) {
-+        ret = asprintf(err_msg, "Checking date-and-time value \"%s\" failed (%s).", val_str, strerror(errno));
-+        goto error;
-+    }
-+    /* we now have correctly filled the remaining values, use them */
-+    memcpy(((char *)&tm2) + (6 * sizeof(int)), ((char *)&tm) + (6 * sizeof(int)), sizeof(struct tm) - (6 * sizeof(int)));
-+    /* back it up again */
-+    tm = tm2;
-+    /* let mktime() correct date & time with having the other values correct now */
-+    if (mktime(&tm) == -1) {
-+        ret = asprintf(err_msg, "Checking date-and-time value \"%s\" failed (%s).", val_str, strerror(errno));
-+        goto error;
-+    }
-+    /* detect changes in the filled values */
-+    if (memcmp(&tm, &tm2, 6 * sizeof(int))) {
-+        ret = asprintf(err_msg, "Checking date-and-time value \"%s\" failed, canonical date and time is \"%04d-%02d-%02dT%02d:%02d:%02d\".",
-+                       val_str, tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec);
-+        goto error;
-+    }
-+
-+    /* tenth of a second */
-+    if (val_str[i] == '.') {
-+        ++i;
-+        if (!isdigit(val_str[i])) {
-+            ret = asprintf(err_msg, "Invalid character '%c'[%d] in date-and-time value \"%s\", a digit expected.", val_str[i], i, val_str);
-+            goto error;
-+        }
-+        do {
-+            ++i;
-+        } while (isdigit(val_str[i]));
-+    }
-+
-+    switch (val_str[i]) {
-+    case 'Z':
-+        /* done */
-+        break;
-+    case '+':
-+    case '-':
-+        /* timezone shift */
-+        k = sizeof gmt_offsets / sizeof *gmt_offsets;
-+        for (j = 0; j < k ; ++j) {
-+            if (!strncmp(val_str + i, gmt_offsets[j], 6)) {
-+                break;
-+            }
-+        }
-+        if (j == k) {
-+            ret = asprintf(err_msg, "Invalid timezone \"%.6s\" in date-and-time value \"%s\".", val_str + i, val_str);
-+            goto error;
-+        }
-+        i += 5;
-+        break;
-+    default:
-+        ret = asprintf(err_msg, "Invalid character '%c'[%d] in date-and-time value \"%s\", 'Z', '+', or '-' expected.", val_str[i], i, val_str);
-+        goto error;
-+    }
-+
-+    /* no other characters expected */
-+    ++i;
-+    if (val_str[i]) {
-+        ret = asprintf(err_msg, "Invalid character '%c'[%d] in date-and-time value \"%s\", no characters expected.", val_str[i], i, val_str);
-+        goto error;
-+    }
-+
-+    /* validation succeeded and we do not want to change how it is stored */
-+    return 0;
-+
-+error:
-+    if (ret == -1) {
-+        err_msg = NULL;
-+    }
-+    return 1;
-+}
-+
-+static int
-+hex_string_store_clb(struct ly_ctx *ctx, const char *UNUSED(type_name), const char **value_str, lyd_val *value, char **err_msg)
-+{
-+    char *str;
-+    uint32_t i, len;
-+
-+    str = strdup(*value_str);
-+    if (!str) {
-+        /* we can hardly allocate an error message */
-+        *err_msg = NULL;
-+        return 1;
-+    }
-+
-+    len = strlen(str);
-+    for (i = 0; i < len; ++i) {
-+        if ((str[i] >= 'A') && (str[i] <= 'Z')) {
-+            /* make it lowercase (canonical format) */
-+            str[i] += 32;
-+        }
-+    }
-+
-+    /* update the value correctly */
-+    lydict_remove(ctx, *value_str);
-+    *value_str = lydict_insert_zc(ctx, str);
-+    value->string = *value_str;
-+    return 0;
-+}
-+
-+/* Name of this array must match the file name! */
-+struct lytype_plugin_list user_yang_types[] = {
-+    {"ietf-yang-types", "2013-07-15", "date-and-time", date_and_time_store_clb, NULL},
-+    {"ietf-yang-types", "2013-07-15", "phys-address", hex_string_store_clb, NULL},
-+    {"ietf-yang-types", "2013-07-15", "mac-address", hex_string_store_clb, NULL},
-+    {"ietf-yang-types", "2013-07-15", "hex-string", hex_string_store_clb, NULL},
-+    {"ietf-yang-types", "2013-07-15", "uuid", hex_string_store_clb, NULL},
-+    {NULL, NULL, NULL, NULL, NULL} /* terminating item */
-+};
-Index: libyang-0.16-r3/tests/CMakeLists.txt
-===================================================================
---- libyang-0.16-r3.orig/tests/CMakeLists.txt
-+++ libyang-0.16-r3/tests/CMakeLists.txt
-@@ -7,7 +7,7 @@ set(CMAKE_MACOSX_RPATH TRUE)
- get_filename_component(TESTS_DIR "${CMAKE_SOURCE_DIR}/tests" REALPATH)
- set(api_tests test_libyang test_tree_schema test_xml test_dict test_tree_data test_tree_data_dup test_tree_data_merge test_xpath test_xpath_1.1 test_diff)
--set(data_tests test_data_initialization test_leafref_remove test_instid_remove test_keys test_autodel test_when test_when_1.1 test_must_1.1 test_defaults test_emptycont test_unique test_mandatory test_json test_parse_print test_values test_metadata test_yangtypes_xpath test_yang_data test_unknown_element)
-+set(data_tests test_data_initialization test_leafref_remove test_instid_remove test_keys test_autodel test_when test_when_1.1 test_must_1.1 test_defaults test_emptycont test_unique test_mandatory test_json test_parse_print test_values test_metadata test_yangtypes_xpath test_yang_data test_unknown_element test_user_types)
- set(schema_yin_tests test_print_transform)
- set(schema_tests test_ietf test_augment test_deviation test_refine test_typedef test_import test_include test_feature test_conformance test_leaflist test_status test_printer test_invalid)
- if(CMAKE_BUILD_TYPE MATCHES debug)
-Index: libyang-0.16-r3/tests/api/test_libyang.c
-===================================================================
---- libyang-0.16-r3.orig/tests/api/test_libyang.c
-+++ libyang-0.16-r3/tests/api/test_libyang.c
-@@ -1245,7 +1245,13 @@ test_ly_get_loaded_plugins(void **state)
-     }
-     assert_non_null(plugins[i]);
-     for (i = 0; plugins[i]; ++i) {
--        if (!strcmp(plugins[i], "user_date_and_time")) {
-+        if (!strcmp(plugins[i], "user_yang_types")) {
-+            break;
-+        }
-+    }
-+    assert_non_null(plugins[i]);
-+    for (i = 0; plugins[i]; ++i) {
-+        if (!strcmp(plugins[i], "user_inet_types")) {
-             break;
-         }
-     }
-Index: libyang-0.16-r3/tests/data/files/user-types.yang
-===================================================================
---- /dev/null
-+++ libyang-0.16-r3/tests/data/files/user-types.yang
-@@ -0,0 +1,61 @@
-+module user-types {
-+    namespace "urn:user-types";
-+    prefix ut;
-+
-+    import ietf-yang-types {
-+        prefix yang;
-+    }
-+
-+    import ietf-inet-types {
-+        prefix inet;
-+    }
-+
-+
-+    leaf yang1 {
-+        type yang:date-and-time;
-+    }
-+
-+    leaf yang2 {
-+        type yang:phys-address;
-+    }
-+
-+    leaf yang3 {
-+        type yang:mac-address;
-+    }
-+
-+    leaf yang4 {
-+        type yang:hex-string;
-+    }
-+
-+    leaf yang5 {
-+        type yang:uuid;
-+    }
-+
-+    leaf inet1 {
-+        type inet:ip-address;
-+    }
-+
-+    leaf inet2 {
-+        type inet:ipv6-address;
-+    }
-+
-+    leaf inet3 {
-+        type inet:ip-address-no-zone;
-+    }
-+
-+    leaf inet4 {
-+        type inet:ipv6-address-no-zone;
-+    }
-+
-+    leaf inet5 {
-+        type inet:ip-prefix;
-+    }
-+
-+    leaf inet6 {
-+        type inet:ipv4-prefix;
-+    }
-+
-+    leaf inet7 {
-+        type inet:ipv6-prefix;
-+    }
-+}
-Index: libyang-0.16-r3/tests/data/test_user_types.c
-===================================================================
---- /dev/null
-+++ libyang-0.16-r3/tests/data/test_user_types.c
-@@ -0,0 +1,226 @@
-+/**
-+ * @file test_user_types.c
-+ * @author Michal Vasko <mvasko@cesnet.cz>
-+ * @brief Cmocka tests for libyang internal user types.
-+ *
-+ * Copyright (c) 2018 CESNET, z.s.p.o.
-+ *
-+ * This source code is licensed under BSD 3-Clause License (the "License").
-+ * You may not use this file except in compliance with the License.
-+ * You may obtain a copy of the License at
-+ *
-+ *     https://opensource.org/licenses/BSD-3-Clause
-+ */
-+
-+#include <stdio.h>
-+#include <stdlib.h>
-+#include <setjmp.h>
-+#include <stdarg.h>
-+#include <cmocka.h>
-+
-+#include "tests/config.h"
-+#include "libyang.h"
-+
-+struct state {
-+    struct ly_ctx *ctx;
-+    const struct lys_module *mod;
-+    struct lyd_node *dt;
-+};
-+
-+static int
-+setup_f(void **state)
-+{
-+    struct state *st;
-+
-+    (*state) = st = calloc(1, sizeof *st);
-+    if (!st) {
-+        fprintf(stderr, "Memory allocation error");
-+        return -1;
-+    }
-+
-+    /* libyang context */
-+    st->ctx = ly_ctx_new(TESTS_DIR"/data/files", 0);
-+    if (!st->ctx) {
-+        fprintf(stderr, "Failed to create context.\n");
-+        goto error;
-+    }
-+
-+    st->mod = ly_ctx_load_module(st->ctx, "user-types", NULL);
-+    if (!st->mod) {
-+        fprintf(stderr, "Failed to load schema.\n");
-+        goto error;
-+    }
-+
-+    return 0;
-+
-+error:
-+    ly_ctx_destroy(st->ctx, NULL);
-+    free(st);
-+    (*state) = NULL;
-+
-+    return -1;
-+}
-+
-+static int
-+teardown_f(void **state)
-+{
-+    struct state *st = (*state);
-+
-+    lyd_free_withsiblings(st->dt);
-+    ly_ctx_destroy(st->ctx, NULL);
-+    free(st);
-+    (*state) = NULL;
-+
-+    return 0;
-+}
-+
-+static void
-+test_yang_types(void **state)
-+{
-+    struct state *st = (struct state *)*state;
-+
-+    /* date-and-time */
-+    st->dt = lyd_new_leaf(NULL, st->mod, "yang1", "2005-05-25T23:15:15.88888Z");
-+    assert_non_null(st->dt);
-+    lyd_free_withsiblings(st->dt);
-+
-+    st->dt = lyd_new_leaf(NULL, st->mod, "yang1", "2005-05-31T23:15:15-08:00");
-+    assert_non_null(st->dt);
-+    lyd_free_withsiblings(st->dt);
-+
-+    st->dt = lyd_new_leaf(NULL, st->mod, "yang1", "2005-05-31T23:15:15.-08:00");
-+    assert_null(st->dt);
-+
-+    st->dt = lyd_new_leaf(NULL, st->mod, "yang1", "2005-02-29T23:15:15-08:00");
-+    assert_null(st->dt);
-+
-+    /* phys-address */
-+    st->dt = lyd_new_leaf(NULL, st->mod, "yang2", "aa:bb:cc:dd");
-+    assert_non_null(st->dt);
-+    assert_string_equal(((struct lyd_node_leaf_list *)st->dt)->value_str, "aa:bb:cc:dd");
-+    lyd_free_withsiblings(st->dt);
-+
-+    st->dt = lyd_new_leaf(NULL, st->mod, "yang2", "AA:BB:1D:2F:CA:52");
-+    assert_non_null(st->dt);
-+    assert_string_equal(((struct lyd_node_leaf_list *)st->dt)->value_str, "aa:bb:1d:2f:ca:52");
-+    lyd_free_withsiblings(st->dt);
-+
-+    /* mac-address */
-+    st->dt = lyd_new_leaf(NULL, st->mod, "yang3", "12:34:56:78:9A:BC");
-+    assert_non_null(st->dt);
-+    assert_string_equal(((struct lyd_node_leaf_list *)st->dt)->value_str, "12:34:56:78:9a:bc");
-+    lyd_free_withsiblings(st->dt);
-+
-+    /* hex-string */
-+    st->dt = lyd_new_leaf(NULL, st->mod, "yang4", "AB:CD:eF:fE:dc:Ba:Ab");
-+    assert_non_null(st->dt);
-+    assert_string_equal(((struct lyd_node_leaf_list *)st->dt)->value_str, "ab:cd:ef:fe:dc:ba:ab");
-+    lyd_free_withsiblings(st->dt);
-+
-+    /* uuid */
-+    st->dt = lyd_new_leaf(NULL, st->mod, "yang5", "12AbCDef-3456-58cd-9ABC-8796cdACdfEE");
-+    assert_non_null(st->dt);
-+    assert_string_equal(((struct lyd_node_leaf_list *)st->dt)->value_str, "12abcdef-3456-58cd-9abc-8796cdacdfee");
-+}
-+
-+static void
-+test_inet_types(void **state)
-+{
-+    struct state *st = (struct state *)*state;
-+
-+    /* ip-address */
-+    st->dt = lyd_new_leaf(NULL, st->mod, "inet1", "192.168.0.1");
-+    assert_non_null(st->dt);
-+    assert_string_equal(((struct lyd_node_leaf_list *)st->dt)->value_str, "192.168.0.1");
-+    lyd_free_withsiblings(st->dt);
-+
-+    st->dt = lyd_new_leaf(NULL, st->mod, "inet1", "192.168.0.1%12");
-+    assert_non_null(st->dt);
-+    assert_string_equal(((struct lyd_node_leaf_list *)st->dt)->value_str, "192.168.0.1%12");
-+    lyd_free_withsiblings(st->dt);
-+
-+    st->dt = lyd_new_leaf(NULL, st->mod, "inet1", "2008:15:0:0:0:0:feAC:1");
-+    assert_non_null(st->dt);
-+    assert_string_equal(((struct lyd_node_leaf_list *)st->dt)->value_str, "2008:15::feac:1");
-+    lyd_free_withsiblings(st->dt);
-+
-+    /* ipv6-address */
-+    st->dt = lyd_new_leaf(NULL, st->mod, "inet2", "FAAC:21:011:Da85::87:daaF%1");
-+    assert_non_null(st->dt);
-+    assert_string_equal(((struct lyd_node_leaf_list *)st->dt)->value_str, "faac:21:11:da85::87:daaf%1");
-+    lyd_free_withsiblings(st->dt);
-+
-+    /* ip-address-no-zone */
-+    st->dt = lyd_new_leaf(NULL, st->mod, "inet3", "127.0.0.1");
-+    assert_non_null(st->dt);
-+    assert_string_equal(((struct lyd_node_leaf_list *)st->dt)->value_str, "127.0.0.1");
-+    lyd_free_withsiblings(st->dt);
-+
-+    st->dt = lyd_new_leaf(NULL, st->mod, "inet3", "0:00:000:0000:000:00:0:1");
-+    assert_non_null(st->dt);
-+    assert_string_equal(((struct lyd_node_leaf_list *)st->dt)->value_str, "::1");
-+    lyd_free_withsiblings(st->dt);
-+
-+    /* ipv6-address-no-zone */
-+    st->dt = lyd_new_leaf(NULL, st->mod, "inet4", "A:B:c:D:e:f:1:0");
-+    assert_non_null(st->dt);
-+    assert_string_equal(((struct lyd_node_leaf_list *)st->dt)->value_str, "a:b:c:d:e:f:1:0");
-+    lyd_free_withsiblings(st->dt);
-+
-+    /* ip-prefix */
-+    st->dt = lyd_new_leaf(NULL, st->mod, "inet5", "12.1.58.4/1");
-+    assert_non_null(st->dt);
-+    assert_string_equal(((struct lyd_node_leaf_list *)st->dt)->value_str, "1.0.0.0/1");
-+    lyd_free_withsiblings(st->dt);
-+
-+    st->dt = lyd_new_leaf(NULL, st->mod, "inet5", "12.1.58.4/24");
-+    assert_non_null(st->dt);
-+    assert_string_equal(((struct lyd_node_leaf_list *)st->dt)->value_str, "255.255.255.0/24");
-+    lyd_free_withsiblings(st->dt);
-+
-+    st->dt = lyd_new_leaf(NULL, st->mod, "inet5", "2000:A:B:C:D:E:f:a/16");
-+    assert_non_null(st->dt);
-+    assert_string_equal(((struct lyd_node_leaf_list *)st->dt)->value_str, "ffff::/16");
-+    lyd_free_withsiblings(st->dt);
-+
-+    /* ipv4-prefix */
-+    st->dt = lyd_new_leaf(NULL, st->mod, "inet6", "0.1.58.4/32");
-+    assert_non_null(st->dt);
-+    assert_string_equal(((struct lyd_node_leaf_list *)st->dt)->value_str, "255.255.255.255/32");
-+    lyd_free_withsiblings(st->dt);
-+
-+    st->dt = lyd_new_leaf(NULL, st->mod, "inet6", "12.1.58.4/8");
-+    assert_non_null(st->dt);
-+    assert_string_equal(((struct lyd_node_leaf_list *)st->dt)->value_str, "255.0.0.0/8");
-+    lyd_free_withsiblings(st->dt);
-+
-+    /* ipv6-prefix */
-+    st->dt = lyd_new_leaf(NULL, st->mod, "inet7", "::C:D:E:f:a/112");
-+    assert_non_null(st->dt);
-+    assert_string_equal(((struct lyd_node_leaf_list *)st->dt)->value_str, "ffff:ffff:ffff:ffff:ffff:ffff:ffff:0/112");
-+    lyd_free_withsiblings(st->dt);
-+
-+    st->dt = lyd_new_leaf(NULL, st->mod, "inet7", "::C:D:E:f:a/110");
-+    assert_non_null(st->dt);
-+    assert_string_equal(((struct lyd_node_leaf_list *)st->dt)->value_str, "ffff:ffff:ffff:ffff:ffff:ffff:3fff:0/110");
-+    lyd_free_withsiblings(st->dt);
-+
-+    st->dt = lyd_new_leaf(NULL, st->mod, "inet7", "::C:D:E:f:a/96");
-+    assert_non_null(st->dt);
-+    assert_string_equal(((struct lyd_node_leaf_list *)st->dt)->value_str, "ffff:ffff:ffff:ffff:ffff:ffff::/96");
-+    lyd_free_withsiblings(st->dt);
-+
-+    st->dt = lyd_new_leaf(NULL, st->mod, "inet7", "::C:D:E:f:a/55");
-+    assert_non_null(st->dt);
-+    assert_string_equal(((struct lyd_node_leaf_list *)st->dt)->value_str, "ffff:ffff:ffff:7f::/55");
-+}
-+
-+int main(void)
-+{
-+    const struct CMUnitTest tests[] = {
-+        cmocka_unit_test_setup_teardown(test_yang_types, setup_f, teardown_f),
-+        cmocka_unit_test_setup_teardown(test_inet_types, setup_f, teardown_f),
-+    };
-+
-+    return cmocka_run_group_tests(tests, NULL, NULL);
-+}
diff --git a/libs/libyang/patches/002-bugfix_for_freeing_user_type_unions b/libs/libyang/patches/002-bugfix_for_freeing_user_type_unions
deleted file mode 100644 (file)
index 61b7a72..0000000
+++ /dev/null
@@ -1,222 +0,0 @@
-Index: libyang-0.16-r3/src/parser.c
-===================================================================
---- libyang-0.16-r3.orig/src/parser.c
-+++ libyang-0.16-r3/src/parser.c
-@@ -1210,7 +1210,7 @@ lyp_parse_value(struct lys_type *type, c
-     unsigned int i, j;
-     int64_t num;
-     uint64_t unum, uind, u = 0;
--    const char *ptr, *value = *value_, *itemname;
-+    const char *ptr, *value = *value_, *itemname, *old_val_str;
-     struct lys_type_bit **bits = NULL;
-     struct lys_ident *ident;
-     lyd_val *val, old_val;
-@@ -1245,7 +1245,8 @@ lyp_parse_value(struct lys_type *type, c
-     /* fully clear the value */
-     if (store) {
--        lyd_free_value(*val, *val_type, *val_flags, type, &old_val, &old_val_type, &old_val_flags);
-+        old_val_str = lydict_insert(ctx, *value_, 0);
-+        lyd_free_value(*val, *val_type, *val_flags, type, old_val_str, &old_val, &old_val_type, &old_val_flags);
-         *val_flags &= ~LY_VALUE_UNRES;
-     }
-@@ -1907,7 +1908,7 @@ lyp_parse_value(struct lys_type *type, c
-             if (store) {
-                 /* erase possible present and invalid value data */
--                lyd_free_value(*val, *val_type, *val_flags, t, NULL, NULL, NULL);
-+                lyd_free_value(*val, *val_type, *val_flags, t, *value_, NULL, NULL, NULL);
-                 memset(val, 0, sizeof(lyd_val));
-             }
-         }
-@@ -1946,7 +1947,8 @@ lyp_parse_value(struct lys_type *type, c
-     /* free backup */
-     if (store) {
--        lyd_free_value(old_val, old_val_type, old_val_flags, type, NULL, NULL, NULL);
-+        lyd_free_value(old_val, old_val_type, old_val_flags, type, old_val_str, NULL, NULL, NULL);
-+        lydict_remove(ctx, old_val_str);
-     }
-     return type;
-@@ -1956,6 +1958,7 @@ error:
-         *val = old_val;
-         *val_type = old_val_type;
-         *val_flags = old_val_flags;
-+        lydict_remove(ctx, old_val_str);
-     }
-     return NULL;
- }
-Index: libyang-0.16-r3/src/parser.h
-===================================================================
---- libyang-0.16-r3.orig/src/parser.h
-+++ libyang-0.16-r3/src/parser.h
-@@ -267,10 +267,10 @@ int lytype_store(const struct lys_module
- /**
-  * @brief Free a user type stored value.
-  *
-- * @param[in] mod Module of the type.
-- * @param[in] type_name Type (typedef) name.
-+ * @param[in] type Type of the value.
-  * @param[in] value Value union to free.
-+ * @param[in] value_str String value of the value.
-  */
--void lytype_free(const struct lys_module *mod, const char *type_name, lyd_val value);
-+void lytype_free(const struct lys_type *type, lyd_val value, const char *value_str);
- #endif /* LY_PARSER_H_ */
-Index: libyang-0.16-r3/src/plugins.c
-===================================================================
---- libyang-0.16-r3.orig/src/plugins.c
-+++ libyang-0.16-r3/src/plugins.c
-@@ -603,11 +603,40 @@ lytype_store(const struct lys_module *mo
- }
- void
--lytype_free(const struct lys_module *mod, const char *type_name, lyd_val value)
-+lytype_free(const struct lys_type *type, lyd_val value, const char *value_str)
- {
-     struct lytype_plugin_list *p;
-+    struct lys_node_leaf sleaf;
-+    struct lyd_node_leaf_list leaf;
-+    struct lys_module *mod;
--    p = lytype_find(mod->name, mod->rev_size ? mod->rev[0].date : NULL, type_name);
-+    assert(type->der && type->der->module);
-+
-+    mod = type->der->module;
-+    memset(&sleaf, 0, sizeof sleaf);
-+    memset(&leaf, 0, sizeof leaf);
-+
-+    if (type->base == LY_TYPE_UNION) {
-+        /* create a fake schema node */
-+        sleaf.module = mod;
-+        sleaf.name = "fake-leaf";
-+        sleaf.type = *type;
-+        sleaf.nodetype = LYS_LEAF;
-+
-+        /* and a fake data node */
-+        leaf.schema = (struct lys_node *)&sleaf;
-+        leaf.value = value;
-+        leaf.value_str = value_str;
-+
-+        /* find the original type */
-+        type = lyd_leaf_type(&leaf);
-+        if (!type) {
-+            LOGINT(mod->ctx);
-+            return;
-+        }
-+    }
-+
-+    p = lytype_find(mod->name, mod->rev_size ? mod->rev[0].date : NULL, type->der->name);
-     if (!p) {
-         LOGINT(mod->ctx);
-         return;
-Index: libyang-0.16-r3/src/resolve.c
-===================================================================
---- libyang-0.16-r3.orig/src/resolve.c
-+++ libyang-0.16-r3/src/resolve.c
-@@ -3630,7 +3630,7 @@ check_default(struct lys_type *type, con
-     }
- cleanup:
--    lyd_free_value(node.value, node.value_type, node.value_flags, type, NULL, NULL, NULL);
-+    lyd_free_value(node.value, node.value_type, node.value_flags, type, node.value_str, NULL, NULL, NULL);
-     lydict_remove(ctx, node.value_str);
-     if (tpdf && node.schema) {
-         free((char *)node.schema->name);
-@@ -7923,7 +7923,7 @@ resolve_union(struct lyd_node_leaf_list
-     if (store) {
-         lyd_free_value(leaf->value, leaf->value_type, leaf->value_flags, &((struct lys_node_leaf *)leaf->schema)->type,
--                       NULL, NULL, NULL);
-+                       leaf->value_str, NULL, NULL, NULL);
-         memset(&leaf->value, 0, sizeof leaf->value);
-     }
-@@ -8012,7 +8012,7 @@ resolve_union(struct lyd_node_leaf_list
-         /* erase possible present and invalid value data */
-         if (store) {
--            lyd_free_value(leaf->value, leaf->value_type, leaf->value_flags, t, NULL, NULL, NULL);
-+            lyd_free_value(leaf->value, leaf->value_type, leaf->value_flags, t, leaf->value_str, NULL, NULL, NULL);
-             memset(&leaf->value, 0, sizeof leaf->value);
-         }
-     }
-Index: libyang-0.16-r3/src/tree_data.c
-===================================================================
---- libyang-0.16-r3.orig/src/tree_data.c
-+++ libyang-0.16-r3/src/tree_data.c
-@@ -2442,7 +2442,7 @@ lyd_merge_node_update(struct lyd_node *t
-                                 NULL, trg_leaf, NULL, NULL, 1, src_leaf->dflt, 0);
-             } else {
-                 lyd_free_value(trg_leaf->value, trg_leaf->value_type, trg_leaf->value_flags,
--                               &((struct lys_node_leaf *)trg_leaf->schema)->type, NULL, NULL, NULL);
-+                               &((struct lys_node_leaf *)trg_leaf->schema)->type, trg_leaf->value_str, NULL, NULL, NULL);
-                 trg_leaf->value = src_leaf->value;
-             }
-             src_leaf->value = (lyd_val)0;
-@@ -2492,7 +2492,7 @@ lyd_merge_node_update(struct lyd_node *t
-             lydict_remove(ctx, trg_leaf->value_str);
-             trg_leaf->value_str = lydict_insert(ctx, src_leaf->value_str, 0);
-             lyd_free_value(trg_leaf->value, trg_leaf->value_type, trg_leaf->value_flags,
--                           &((struct lys_node_leaf *)trg_leaf->schema)->type, NULL, NULL, NULL);
-+                           &((struct lys_node_leaf *)trg_leaf->schema)->type, trg_leaf->value_str, NULL, NULL, NULL);
-             trg_leaf->value_type = src_leaf->value_type;
-             trg_leaf->dflt = src_leaf->dflt;
-@@ -5866,7 +5866,7 @@ lyd_free_attr(struct ly_ctx *ctx, struct
-         lydict_remove(ctx, attr->name);
-         type = lys_ext_complex_get_substmt(LY_STMT_TYPE, attr->annotation, NULL);
-         assert(type);
--        lyd_free_value(attr->value, attr->value_type, attr->value_flags, *type, NULL, NULL, NULL);
-+        lyd_free_value(attr->value, attr->value_type, attr->value_flags, *type, attr->value_str, NULL, NULL, NULL);
-         lydict_remove(ctx, attr->value_str);
-         free(attr);
-     }
-@@ -5975,8 +5975,8 @@ lyd_insert_attr(struct lyd_node *parent,
- }
- void
--lyd_free_value(lyd_val value, LY_DATA_TYPE value_type, uint8_t value_flags, struct lys_type *type, lyd_val *old_val,
--               LY_DATA_TYPE *old_val_type, uint8_t *old_val_flags)
-+lyd_free_value(lyd_val value, LY_DATA_TYPE value_type, uint8_t value_flags, struct lys_type *type, const char *value_str,
-+               lyd_val *old_val, LY_DATA_TYPE *old_val_type, uint8_t *old_val_flags)
- {
-     if (old_val) {
-         *old_val = value;
-@@ -5988,8 +5988,7 @@ lyd_free_value(lyd_val value, LY_DATA_TY
-     /* otherwise the value is correctly freed */
-     if (value_flags & LY_VALUE_USER) {
--        assert(type->der && type->der->module);
--        lytype_free(type->der->module, type->der->name, value);
-+        lytype_free(type, value, value_str);
-     } else {
-         switch (value_type) {
-         case LY_TYPE_BITS:
-@@ -6062,7 +6061,7 @@ _lyd_free_node(struct lyd_node *node)
-     case LYS_LEAFLIST:
-         leaf = (struct lyd_node_leaf_list *)node;
-         lyd_free_value(leaf->value, leaf->value_type, leaf->value_flags, &((struct lys_node_leaf *)leaf->schema)->type,
--                       NULL, NULL, NULL);
-+                       leaf->value_str, NULL, NULL, NULL);
-         lydict_remove(leaf->schema->module->ctx, leaf->value_str);
-         break;
-     default:
-Index: libyang-0.16-r3/src/tree_internal.h
-===================================================================
---- libyang-0.16-r3.orig/src/tree_internal.h
-+++ libyang-0.16-r3/src/tree_internal.h
-@@ -496,8 +496,8 @@ int lyd_get_unique_default(const char* u
- int lyd_build_relative_data_path(const struct lys_module *module, const struct lyd_node *node, const char *schema_id,
-                                  char *buf);
--void lyd_free_value(lyd_val value, LY_DATA_TYPE value_type, uint8_t value_flags, struct lys_type *type, lyd_val *old_val,
--                    LY_DATA_TYPE *old_val_type, uint8_t *old_val_flags);
-+void lyd_free_value(lyd_val value, LY_DATA_TYPE value_type, uint8_t value_flags, struct lys_type *type,
-+                    const char *value_str, lyd_val *old_val, LY_DATA_TYPE *old_val_type, uint8_t *old_val_flags);
- int lyd_list_equal(struct lyd_node *node1, struct lyd_node *node2, int with_defaults);
index 9b3e6ea007f87e35c236fc0fbd2573a0f33884f9..d8c6fc189c74fbe63ea7d86b7bcce35bd538ae49 100644 (file)
@@ -8,11 +8,11 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=spice-protocol
-PKG_VERSION:=0.12.15
+PKG_VERSION:=0.14.0
 PKG_RELEASE:=1
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://www.spice-space.org/download/releases
-PKG_HASH:=8b4db23baa4b1337a50d049d9bf43f932331dd95f204836c0ce46c4962306419
+PKG_HASH:=b6a4aa1ca32668790b45a494bbd000e9d05797b391d5a5d4b91adf1118216eac
 PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=COPYING
 PKG_INSTALL:=1
index 5145882bf9941e48819b03c924129501d5a366f4..5e4906a36cce38440cde92150df67db6cb83f30f 100644 (file)
@@ -8,11 +8,11 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=spice
-PKG_VERSION:=0.14.1
+PKG_VERSION:=0.14.2
 PKG_RELEASE:=1
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://www.spice-space.org/download/releases/spice-server
-PKG_HASH:=1ead5de63d06eededed4017db37240f07bef0abffbaf621899647e7e685a1519
+PKG_HASH:=b203b3882e06f4c7249a3150d90c84e1a90490d41ead255a3d2cede46f4a29a7
 PKG_LICENSE:=LGPL-2.1-only
 PKG_LICENSE_FILES:=COPYING
 PKG_INSTALL:=1
index 6a36dc5f9572633d918f37c8265d20ad2fdf0f69..52b465e93f42b35967f57066f02b169ac4981184 100644 (file)
@@ -8,11 +8,11 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=youtube-dl
-PKG_VERSION:=2019.10.29
+PKG_VERSION:=2019.11.5
 PKG_RELEASE:=1
 
 PYPI_NAME:=youtube_dl
-PKG_HASH:=0b6611807b0bb978a0384ddebf215ea1f974ecf73d80d04e9f614ff30b1443f0
+PKG_HASH:=25324aab78df9a09b2ee34f642f116933134bc66ea629a778c1fffe05b66f733
 
 PKG_MAINTAINER:=Adrian Panella <ianchi74@outlook.com>, Josef Schlehofer <pepe.schlehofer@gmail.com>
 PKG_LICENSE:=Unlicense
index 7d849f96486055cbddba4ca51d70b190745c6ac9..24c5777d1005ae00e29407927603ee153e207b8b 100644 (file)
@@ -6,7 +6,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=adblock
-PKG_VERSION:=3.8.7
+PKG_VERSION:=3.8.8
 PKG_RELEASE:=1
 PKG_LICENSE:=GPL-3.0-or-later
 PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
index 0f8b1766100f3f9fb373c858e8c9dfef9781a378..a0b8c3f0b014416b0dcd3c7ffd84d575ec231384 100755 (executable)
@@ -21,6 +21,8 @@ then
 fi
 adb_ver="${1}"
 adb_mail="$(command -v msmtp)"
+adb_logger="$(command -v logger)"
+adb_logread="$(command -v logread)"
 adb_rc=1
 
 if [ "${adb_debug}" -eq 1 ]
@@ -28,13 +30,6 @@ then
        debug="--debug"
 fi
 
-# mail header & receiver check
-#
-if [ -z "${adb_mreceiver}" ]
-then
-       logger -p "err" -t "adblock-${adb_ver}[${$}]" "please set the mail receiver with the 'adb_mreceiver' option"
-       exit ${adb_rc}
-fi
 adb_mhead="From: ${adb_msender}\\nTo: ${adb_mreceiver}\\nSubject: ${adb_mtopic}\\nReply-to: ${adb_msender}\\nMime-Version: 1.0\\nContent-Type: text/html\\nContent-Disposition: inline\\n\\n"
 
 # info preparation
@@ -44,8 +39,9 @@ adb_info="$(/etc/init.d/adblock status 2>/dev/null)"
 if [ -f "/var/log/messages" ]
 then
        log_info="$(awk '/adblock-/{NR=1;max=79;if(length($0)>max+1)while($0){if(NR==1){print substr($0,1,max),"&#8629;"} else {print " ",substr($0,1,max)}{$0=substr($0,max+1);NR=NR+1}}else print}' /var/log/messages)"
-else
-       log_info="$(logread -e "adblock-" | awk '{NR=1;max=79;if(length($0)>max+1)while($0){if(NR==1){print substr($0,1,max),"&#8629;"} else {print " ",substr($0,1,max)}{$0=substr($0,max+1);NR=NR+1}}else print}')"
+elif [ -x "${adb_logread}" ]
+then
+       log_info="$("${adb_logread}" -e "adblock-" | awk '{NR=1;max=79;if(length($0)>max+1)while($0){if(NR==1){print substr($0,1,max),"&#8629;"} else {print " ",substr($0,1,max)}{$0=substr($0,max+1);NR=NR+1}}else print}')"
 fi
 
 # mail body
@@ -58,13 +54,24 @@ adb_mtext="${adb_mtext}</pre></body></html>"
 
 # send mail
 #
-if [ -x "${adb_mail}" ]
+if [ -x "${adb_mail}" ] && [ -n "${adb_mreceiver}" ]
 then
        printf "%b" "${adb_mhead}${adb_mtext}" 2>/dev/null | "${adb_mail}" ${debug} -a "${adb_mprofile}" "${adb_mreceiver}" >/dev/null 2>&1
        adb_rc=${?}
-       logger -p "info" -t "adblock-${adb_ver}[${$}]" "mail sent to '${adb_mreceiver}' with rc '${adb_rc}'"
+       class="info"
+       log_msg="mail sent to '${adb_mreceiver}' with rc '${adb_rc}'"
+elif [ -z "${adb_mreceiver}" ]
+then
+       class="err"
+       log_msg="please set the mail receiver with the 'adb_mreceiver' option"
 else
-       logger -p "err" -t "adblock-${adb_ver}[${$}]" "msmtp mail daemon not found"
+       class="err"
+       log_msg="msmtp mail daemon not found"
+fi
+if [ -x "${adb_logger}" ]
+then
+       "${adb_logger}" -p "${class}" -t "adblock-${adb_ver}[${$}]" "${log_msg}"
+else
+       printf "%s %s %s\\n" "${class}" "adblock-${adb_ver}[${$}]" "${log_msg}"
 fi
-
 exit ${adb_rc}
index c6ac40a0461f0d9d0b41e76ff7517b3b01fac2d8..0a9c9ce27ead55e4b58a0e88820062bffea1f738 100755 (executable)
@@ -16,12 +16,22 @@ then
 fi
 adb_ver="${1}"
 adb_ubus="$(command -v ubus)"
+adb_logger="$(command -v logger)"
 
 if [ -x "${adb_ubus}" ] && [ -n "${adb_dns}" ]
 then
-       logger -p "info" -t "adblock-${adb_ver}[${$}]" "ubus/adblock service started"
        "${adb_ubus}" -S -M r -m invoke monitor | \
                { grep -qE "\"method\":\"(set|signal)\",\"data\":\{\"name\":\"${adb_dns}\""; [ $? -eq 0 ] && /etc/init.d/adblock start; }
+       class="info"
+       log_msg="ubus/adblock service started"
 else
-       logger -p "err" -t "adblock-${adb_ver}[${$}]" "can't start ubus/adblock service"
+       class="err"
+       log_msg="can't start ubus/adblock service"
 fi
+if [ -x "${adb_logger}" ]
+then
+       "${adb_logger}" -p "${class}" -t "adblock-${adb_ver}[${$}]" "${log_msg}"
+else
+       printf "%s %s %s\\n" "${class}" "adblock-${adb_ver}[${$}]" "${log_msg}"
+fi
+
index 0702da9602554e1c91f87dd034a667c92f9c73a9..2b724f260e53d5fced453e2c486d232879eb778e 100755 (executable)
@@ -13,7 +13,7 @@
 #
 LC_ALL=C
 PATH="/usr/sbin:/usr/bin:/sbin:/bin"
-adb_ver="3.8.7"
+adb_ver="3.8.8"
 adb_basever=""
 adb_enabled=0
 adb_debug=0
@@ -43,6 +43,7 @@ adb_repdir="/tmp"
 adb_reputil="$(command -v tcpdump)"
 adb_repchunkcnt="5"
 adb_repchunksize="1"
+adb_logger="$(command -v logger)"
 adb_action="${1:-"start"}"
 adb_pidfile="/var/run/adblock.pid"
 adb_ubusservice="/etc/adblock/adblock.service"
@@ -105,6 +106,7 @@ f_load()
        if [ -z "${adb_basever}" ] || [ "${adb_ver%.*}" != "${adb_basever}" ]
        then
                f_log "info" "your adblock config seems to be too old, please update your config with the '--force-maintainer' opkg option"
+               f_rmtemp
                exit 0
        fi
 
@@ -916,13 +918,24 @@ f_log()
 
        if [ -n "${log_msg}" ] && { [ "${class}" != "debug" ] || [ "${adb_debug}" -eq 1 ]; }
        then
-               logger -p "${class}" -t "adblock-${adb_ver}[${$}]" "${log_msg}"
+               if [ -x "${adb_logger}" ]
+               then
+                       "${adb_logger}" -p "${class}" -t "adblock-${adb_ver}[${$}]" "${log_msg}"
+               else
+                       printf "%s %s %s\\n" "${class}" "adblock-${adb_ver}[${$}]" "${log_msg}"
+               fi
                if [ "${class}" = "err" ]
                then
                        f_rmdns
                        f_bgserv "stop"
                        f_jsnup "error"
-                       logger -p "${class}" -t "adblock-${adb_ver}[${$}]" "Please also check 'https://github.com/openwrt/packages/blob/master/net/adblock/files/README.md'"
+                       log_msg="Please also check 'https://github.com/openwrt/packages/blob/master/net/adblock/files/README.md'"
+                       if [ -x "${adb_logger}" ]
+                       then
+                               "${adb_logger}" -p "${class}" -t "adblock-${adb_ver}[${$}]" "${log_msg}"
+                       else
+                               printf "%s %s %s\\n" "${class}" "adblock-${adb_ver}[${$}]" "${log_msg}"
+                       fi
                        exit 1
                fi
        fi
@@ -934,11 +947,11 @@ f_bgserv()
 {
        local bg_pid status="${1}"
 
-       bg_pid="$(pgrep -f "^/bin/sh ${adb_ubusservice}|^/bin/ubus -S -M r -m invoke monitor|^grep -qF \"method\":\"set\",\"data\":\\{\"name\":\"${adb_dns}\"" | awk '{ORS=" "; print $1}')"
+       bg_pid="$(pgrep -f "^/bin/sh ${adb_ubusservice}.*|^/bin/ubus -S -M r -m invoke monitor|^grep -qF \"method\":\"set\",\"data\":\\{\"name\":\"${adb_dns}\"" | awk '{ORS=" "; print $1}')"
        if [ -z "${bg_pid}" ] && [ "${status}" = "start" ] \
                && [ -x "${adb_ubusservice}" ] && [ "${adb_dnsfilereset}" = "true" ]
        then
-               ( "${adb_ubusservice}" "${adb_ver}" &)
+               ( "${adb_ubusservice}" "${adb_ver}" & )
        elif [ -n "${bg_pid}" ] && [ "${status}" = "stop" ] 
        then
                kill -HUP "${bg_pid}" 2>/dev/null
index a9aaf7abe3eb87554f339284ffe0e9dfe35f3f80..d2a5559749ee86962415392ba4a4abf12517be4d 100644 (file)
@@ -6,7 +6,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=banip
-PKG_VERSION:=0.3.1
+PKG_VERSION:=0.3.5
 PKG_RELEASE:=1
 PKG_LICENSE:=GPL-3.0-or-later
 PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
index 25f2f72cd4feecac70207f009974f25004eb9bd3..be60bec97078ac68776e60f1868da879585d9459 100755 (executable)
@@ -12,6 +12,11 @@ ban_init="/etc/init.d/banip"
 ban_script="/usr/bin/banip.sh"
 ban_pidfile="/var/run/banip.pid"
 
+if [ -s "${ban_pidfile}" ] && [ "${action}" != "help" ] && [ "${action}" != "status" ]
+then
+       exit 1
+fi
+
 boot()
 {
        ban_boot="1"
@@ -39,7 +44,6 @@ start_service()
 
 refresh()
 {
-       [ -s "${ban_pidfile}" ] && return 1
        rc_procd start_service refresh
 }
 
@@ -53,6 +57,11 @@ stop_service()
        rc_procd "${ban_script}" stop
 }
 
+restart()
+{
+       rc_procd start_service restart
+}
+
 status_service()
 {
        local key keylist value
@@ -76,16 +85,23 @@ status_service()
 
 service_triggers()
 {
-       local iface iface_list="$(uci_get banip global ban_iface)"
+       local trigger trigger_list="$(uci_get banip global ban_trigger)"
        local delay="$(uci_get banip extra ban_triggerdelay "2")"
        local type="$(uci_get banip extra ban_starttype "start")"
 
        PROCD_RELOAD_DELAY=$((${delay}*1000))
-       if [ -n "${iface_list}" ]
+
+       if [ -z "${trigger_list}" ] && [ -r "/lib/functions/network.sh" ]
+       then
+               . "/lib/functions/network.sh"
+               network_find_wan trigger_list
+       fi
+
+       if [ -n "${trigger_list}" ]
        then
-               for iface in ${iface_list}
+               for trigger in ${trigger_list}
                do
-                       procd_add_interface_trigger "interface.*.up" "${iface}" "${ban_init}" "${type}"
+                       procd_add_interface_trigger "interface.*.up" "${trigger}" "${ban_init}" "${type}"
                done
        else
                procd_add_raw_trigger "interface.*.up" ${PROCD_RELOAD_DELAY} "${ban_init}" "${type}"
index 1c44be3bae4428f5ef7397715f22070a50928dcd..e4213b072d7dfbbd571f830507b638f2768ef26b 100755 (executable)
@@ -8,20 +8,24 @@
 
 LC_ALL=C
 PATH="/usr/sbin:/usr/bin:/sbin:/bin"
-
-if [ -r "/lib/functions.sh" ]
-then
-       . "/lib/functions.sh"
-       ban_sshdaemon="$(uci_get banip extra ban_sshdaemon "dropbear")"
-fi
 ban_ver="${1}"
-ban_log="$(command -v logread)"
+ban_sshdaemon="${2}"
+ban_logger="$(command -v logger)"
+ban_logread="$(command -v logread)"
 
-if [ -x "${ban_log}" ]
+if [ -x "${ban_logread}" ]
 then
-       logger -p "info" -t "banIP-${ban_ver}[${$}]" "log/banIP service started"
-       "${ban_log}" -f -e "${ban_sshdaemon}\|luci: failed login" | \
+       "${ban_logread}" -f -e "${ban_sshdaemon}\|luci: failed login" | \
                { grep -qE "Exit before auth|luci: failed login|[0-9]+ \[preauth\]$"; [ $? -eq 0 ] && /etc/init.d/banip refresh; }
+       class="info"
+       log_msg="log/banIP service started"
+else
+       class="err"
+       log_msg="can't start log/banIP service"
+fi
+if [ -x "${ban_logger}" ]
+then
+       "${ban_logger}" -p "${class}" -t "banIP-${ban_ver}[${$}]" "${log_msg}"
 else
-       logger -p "err" -t "banIP-${ban_ver}[${$}]" "can't start log/banIP service"
+       printf "%s %s %s\\n" "${class}" "banIP-${ban_ver}[${$}]" "${log_msg}"
 fi
index bf322444d1f7693aa2dee8f0b5fb9ba7e90fdec1..87d79eac4be50945e646802c331a8482d22e0c25 100755 (executable)
@@ -13,7 +13,7 @@
 #
 LC_ALL=C
 PATH="/usr/sbin:/usr/bin:/sbin:/bin"
-ban_ver="0.3.1"
+ban_ver="0.3.5"
 ban_basever=""
 ban_enabled=0
 ban_automatic="1"
@@ -26,7 +26,6 @@ ban_autoblacklist=1
 ban_autowhitelist=1
 ban_realtime="false"
 ban_fetchutil=""
-ban_ip="$(command -v ip)"
 ban_ipt="$(command -v iptables)"
 ban_ipt_save="$(command -v iptables-save)"
 ban_ipt_restore="$(command -v iptables-restore)"
@@ -34,12 +33,13 @@ ban_ipt6="$(command -v ip6tables)"
 ban_ipt6_save="$(command -v ip6tables-save)"
 ban_ipt6_restore="$(command -v ip6tables-restore)"
 ban_ipset="$(command -v ipset)"
+ban_logger="$(command -v logger)"
 ban_chain="banIP"
 ban_action="${1:-"start"}"
 ban_pidfile="/var/run/banip.pid"
 ban_rtfile="/tmp/ban_runtime.json"
 ban_logservice="/etc/banip/banip.service"
-ban_sshdaemon="dropbear"
+ban_sshdaemon=""
 ban_setcnt=0
 ban_cnt=0
 
@@ -102,6 +102,7 @@ f_envload()
        if [ -z "${ban_basever}" ] || [ "${ban_ver%.*}" != "${ban_basever}" ]
        then
                f_log "info" "your banIP config seems to be too old, please update your config with the '--force-maintainer' opkg option"
+               f_rmtemp
                exit 0
        fi
 
@@ -129,61 +130,17 @@ f_envcheck()
 {
        local util utils packages iface tmp cnt=0 cnt_max=0
 
+       f_jsnup "running"
+       f_log "info" "start banIP processing (${ban_action})"
+
        # check backup directory
        #
        if [ ! -d "${ban_backupdir}" ]
        then
-               f_log "err" "the backup directory '${ban_backupdir}' does not exist/is not mounted yet, please create the directory or raise the 'ban_triggerdelay' to defer the banIP start"
+               f_log "err" "the backup directory '${ban_backupdir}' does not exist or has not been mounted yet, please create the directory or raise the 'ban_triggerdelay' to defer the banIP start"
        fi
 
-       # check fetch utility
-       #
-       if [ -z "${ban_fetchutil}" ]
-       then
-               utils="aria2c curl wget uclient-fetch"
-               packages="$(opkg list-installed 2>/dev/null)"
-               for util in ${utils}
-               do
-                       if { [ "${util}" = "uclient-fetch" ] && [ -n "$(printf "%s\\n" "${packages}" | grep "^libustream-")" ]; } || \
-                               { [ "${util}" = "wget" ] && [ -n "$(printf "%s\\n" "${packages}" | grep "^wget -")" ]; } || \
-                               { [ "${util}" != "uclient-fetch" ] && [ "${util}" != "wget" ]; }
-                       then
-                               ban_fetchutil="$(command -v "${util}")"
-                               if [ -x "${ban_fetchutil}" ]
-                               then
-                                       break
-                               fi
-                       fi
-                       unset ban_fetchutil util
-               done
-       else
-               util="${ban_fetchutil}"
-               ban_fetchutil="$(command -v "${util}")"
-               if [ ! -x "${ban_fetchutil}" ]
-               then
-                       unset ban_fetchutil util
-               fi
-       fi
-       case "${util}" in
-               "aria2c")
-                       ban_fetchparm="${ban_fetchparm:-"--timeout=20 --allow-overwrite=true --auto-file-renaming=false --check-certificate=true --dir=" " -o"}"
-               ;;
-               "curl")
-                       ban_fetchparm="${ban_fetchparm:-"--connect-timeout 20 -o"}"
-               ;;
-               "uclient-fetch")
-                       ban_fetchparm="${ban_fetchparm:-"--timeout=20 -O"}"
-               ;;
-               "wget")
-                       ban_fetchparm="${ban_fetchparm:-"--no-cache --no-cookies --max-redirect=0 --timeout=20 -O"}"
-               ;;
-       esac
-       if [ -z "${ban_fetchutil}" ] || [ -z "${ban_fetchparm}" ]
-       then
-               f_log "err" "download utility with SSL support not found, please install 'uclient-fetch' with a 'libustream-*' variant or another download utility like 'wget', 'curl' or 'aria2'"
-       fi
-
-       # get wan device and wan subnets
+       # get wan devices and wan subnets
        #
        if [ "${ban_automatic}" = "1" ]
        then
@@ -242,14 +199,87 @@ f_envcheck()
                        ban_subnets6="${ban_subnets6} ${tmp}"
                fi
        done
+       ban_dev_all="$(ip link show 2>/dev/null | awk 'BEGIN{FS="[@: ]"}/^[0-9:]/{if($3!="lo"){print $3}}')"
 
-       if [ -z "${ban_iface}" ] || [ -z "${ban_dev}" ]
+       if [ -z "${ban_iface}" ] || [ -z "${ban_dev}" ] || [ -z "${ban_dev_all}" ]
        then
                f_log "err" "wan interface(s)/device(s) (${ban_iface:-"-"}/${ban_dev:-"-"}) not found, please please check your configuration"
+       fi
+
+       # check fetch utility
+       #
+       if [ -z "${ban_fetchutil}" ]
+       then
+               cnt_max=$((cnt+5))
+               while [ -z "${packages}" ]
+               do
+                       packages="$(opkg list-installed 2>/dev/null)"
+                       if [ "${cnt}" -gt "${cnt_max}" ]
+                       then
+                               break
+                       fi
+                       cnt=$((cnt+1))
+                       sleep 1
+               done
+               utils="aria2c curl wget uclient-fetch"
+               for util in ${utils}
+               do
+                       if { [ "${util}" = "uclient-fetch" ] && [ -n "$(printf "%s\\n" "${packages}" | grep "^libustream-")" ]; } || \
+                               { [ "${util}" = "wget" ] && [ -n "$(printf "%s\\n" "${packages}" | grep "^wget -")" ]; } || \
+                               { [ "${util}" != "uclient-fetch" ] && [ "${util}" != "wget" ]; }
+                       then
+                               ban_fetchutil="$(command -v "${util}")"
+                               if [ -x "${ban_fetchutil}" ]
+                               then
+                                       break
+                               fi
+                       fi
+                       unset ban_fetchutil util
+               done
        else
-               ban_dev_all="$(${ban_ip} link show | awk 'BEGIN{FS="[@: ]"}/^[0-9:]/{if($3!="lo"){print $3}}')"
-               f_jsnup "running"
-               f_log "info" "start banIP processing (${ban_action})"
+               util="${ban_fetchutil}"
+               ban_fetchutil="$(command -v "${util}")"
+               if [ ! -x "${ban_fetchutil}" ]
+               then
+                       unset ban_fetchutil util
+               fi
+       fi
+       case "${util}" in
+               "aria2c")
+                       ban_fetchparm="${ban_fetchparm:-"--timeout=20 --allow-overwrite=true --auto-file-renaming=false --check-certificate=true --dir=" " -o"}"
+               ;;
+               "curl")
+                       ban_fetchparm="${ban_fetchparm:-"--connect-timeout 20 -o"}"
+               ;;
+               "uclient-fetch")
+                       ban_fetchparm="${ban_fetchparm:-"--timeout=20 -O"}"
+               ;;
+               "wget")
+                       ban_fetchparm="${ban_fetchparm:-"--no-cache --no-cookies --max-redirect=0 --timeout=20 -O"}"
+               ;;
+       esac
+       if [ -z "${ban_fetchutil}" ] || [ -z "${ban_fetchparm}" ]
+       then
+               f_log "err" "download utility with SSL support not found, please install 'uclient-fetch' with a 'libustream-*' variant or another download utility like 'wget', 'curl' or 'aria2'"
+       fi
+
+       # check ssh daemon
+       #
+       if [ -z "${ban_sshdaemon}" ]
+       then
+               utils="dropbear sshd"
+               for util in ${utils}
+               do
+                       if [ -x "$(command -v "${util}")" ]
+                       then
+                               ban_sshdaemon="${util}"
+                               break
+                       fi
+               done
+       fi
+       if [ -z "${ban_sshdaemon}" ]
+       then
+               f_log "err" "ssh daemon not found, please install 'dropbear' or 'sshd'"
        fi
 }
 
@@ -260,11 +290,10 @@ f_temp()
        if [ -d "/tmp" ] && [ -z "${ban_tmpdir}" ]
        then
                ban_tmpdir="$(mktemp -p /tmp -d)"
-               ban_tmpload="$(mktemp -p "${ban_tmpdir}" -tu)"
                ban_tmpfile="$(mktemp -p "${ban_tmpdir}" -tu)"
        elif [ ! -d "/tmp" ]
        then
-               f_log "err" "the temp directory '/tmp' does not exist/is not mounted yet, please create the directory or raise the 'ban_triggerdelay' to defer the banIP start"
+               f_log "err" "the temp directory '/tmp' does not exist or has not been mounted yet, please create the directory or raise the 'ban_triggerdelay' to defer the banIP start"
        fi
 
        if [ ! -s "${ban_pidfile}" ]
@@ -453,19 +482,23 @@ f_ipset()
                                if [ -s "${tmp_file}" ] && [ -z "$("${ban_ipset}" -q -n list "${src_name}")" ]
                                then
                                        "${ban_ipset}" -q create "${src_name}" hash:"${src_settype}" hashsize 64 maxelem 262144 family "${src_setipv}" counters
+                                       out_rc="${?}"
                                else
                                        "${ban_ipset}" -q flush "${src_name}"
+                                       out_rc="${?}"
                                fi
-                               if [ -s "${tmp_file}" ]
+                               if [ -s "${tmp_file}" ] && [ "${out_rc}" -eq 0 ]
                                then
-                                       "${ban_ipset}" -! restore < "${tmp_file}"
+                                       "${ban_ipset}" -q -! restore < "${tmp_file}"
                                        out_rc="${?}"
-                                       "${ban_ipset}" -q save "${src_name}" > "${tmp_file}"
-                                       cnt="$(($(wc -l 2>/dev/null < "${tmp_file}")-1))"
-                                       cnt_cidr="$(grep -cF "/" "${tmp_file}")"
-                                       cnt_ip="$((cnt-cnt_cidr))"
-                                       printf "%s\\n" "1" > "${tmp_set}"
-                                       printf "%s\\n" "${cnt}" > "${tmp_cnt}"
+                                       if [ "${out_rc}" -eq 0 ]
+                                       then
+                                               "${ban_ipset}" -q save "${src_name}" > "${tmp_file}"
+                                               cnt="$(($(wc -l 2>/dev/null < "${tmp_file}")-1))"
+                                               cnt_cidr="$(grep -cF "/" "${tmp_file}")"
+                                               cnt_ip="$((cnt-cnt_cidr))"
+                                               printf "%s\\n" "${cnt}" > "${tmp_cnt}"
+                                       fi
                                fi
                                f_iptadd
                        fi
@@ -478,12 +511,11 @@ f_ipset()
                        then
                                "${ban_ipset}" -q save "${src_name}" > "${tmp_file}"
                                out_rc="${?}"
-                               if [ -s "${tmp_file}" ]
+                               if [ -s "${tmp_file}" ] && [ "${out_rc}" -eq 0 ]
                                then
                                        cnt="$(($(wc -l 2>/dev/null < "${tmp_file}")-1))"
                                        cnt_cidr="$(grep -cF "/" "${tmp_file}")"
                                        cnt_ip="$((cnt-cnt_cidr))"
-                                       printf "%s\\n" "1" > "${tmp_set}"
                                        printf "%s\\n" "${cnt}" > "${tmp_cnt}"
                                fi
                                f_iptadd
@@ -538,14 +570,25 @@ f_log()
 
        if [ -n "${log_msg}" ] && { [ "${class}" != "debug" ] || [ "${ban_debug}" -eq 1 ]; }
        then
-               logger -p "${class}" -t "banIP-${ban_ver}[${$}]" "${log_msg}"
+               if [ -x "${ban_logger}" ]
+               then
+                       "${ban_logger}" -p "${class}" -t "banIP-${ban_ver}[${$}]" "${log_msg}"
+               else
+                       printf "%s %s %s\\n" "${class}" "banIP-${ban_ver}[${$}]" "${log_msg}"
+               fi
                if [ "${class}" = "err" ]
                then
                        f_jsnup error
                        f_ipset destroy
                        f_rmbackup
                        f_rmtemp
-                       logger -p "${class}" -t "banIP-${ban_ver}[${$}]" "Please also check 'https://github.com/openwrt/packages/blob/master/net/banip/files/README.md'"
+                       log_msg="Please also check 'https://github.com/openwrt/packages/blob/master/net/banip/files/README.md'"
+                       if [ -x "${ban_logger}" ]
+                       then
+                               "${ban_logger}" -p "${class}" -t "banIP-${ban_ver}[${$}]" "${log_msg}"
+                       else
+                               printf "%s %s %s\\n" "${class}" "banIP-${ban_ver}[${$}]" "${log_msg}"
+                       fi
                        exit 1
                fi
        fi
@@ -561,8 +604,8 @@ f_bgserv()
        if [ -z "${bg_pid}" ] && [ "${status}" = "start" ] \
                && [ -x "${ban_logservice}" ] && [ "${ban_realtime}" = "true" ]
        then
-               ( "${ban_logservice}" "${ban_ver}" &)
-       elif [ -n "${bg_pid}" ] && [ "${status}" = "stop" ] 
+               ( "${ban_logservice}" "${ban_ver}" "${ban_sshdaemon}" & )
+       elif [ -n "${bg_pid}" ] && [ "${status}" = "stop" ]
        then
                kill -HUP "${bg_pid}" 2>/dev/null
        fi
@@ -624,12 +667,10 @@ f_main()
                src_cat="$(eval printf "%s" \"\$\{ban_src_cat_${src_name%_6*}\}\")"
                src_addon=""
                src_rc=4
-               tmp_load="${ban_tmpload}.${src_name}"
-               tmp_file="${ban_tmpfile}.${src_name}"
-               tmp_raw="${tmp_load}.raw"
+               tmp_load="${ban_tmpfile}.${src_name}.load"
+               tmp_file="${ban_tmpfile}.${src_name}.file"
+               tmp_raw="${tmp_file}.raw"
                tmp_cnt="${tmp_file}.cnt"
-               tmp_set="${tmp_file}.setcnt"
-
                # basic pre-checks
                #
                f_log "debug" "f_main  ::: name: ${src_name}, src_on: ${src_on:-"-"}"
@@ -818,14 +859,14 @@ f_main()
        done
        wait
 
-       for cnt in $(cat "${ban_tmpfile}".*.setcnt 2>/dev/null)
-       do
-               ban_setcnt="$((ban_setcnt+cnt))"
-       done
        for cnt in $(cat "${ban_tmpfile}".*.cnt 2>/dev/null)
        do
                ban_cnt="$((ban_cnt+cnt))"
        done
+       if [ "${ban_cnt}" -gt 0 ]
+       then
+               ban_setcnt="$(ls "${ban_tmpfile}".*.cnt 2>/dev/null | wc -l)"
+       fi
        f_log "info" "${ban_setcnt} IPSets with overall ${ban_cnt} IPs/Prefixes loaded successfully (${ban_sysver})"
        f_bgserv "start"
        f_jsnup
diff --git a/net/e2guardian/Makefile b/net/e2guardian/Makefile
deleted file mode 100644 (file)
index 5fd458a..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-#
-# Copyright (C) 2015 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=e2guardian
-PKG_VERSION:=3.2.0
-PKG_RELEASE:=2
-
-PKG_LICENSE:=GPL-2.0
-PKG_MAINTAINER:=Luka Perkov <luka@openwrt.org>
-
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_SOURCE_URL:=https://github.com/$(PKG_NAME)/$(PKG_NAME)
-PKG_SOURCE_VERSION:=35be4a5b40aedc6a800c06389c220a8dbf35f1cc
-PKG_MIRROR_HASH:=2dab9ba63ee8a2c09ac84f5b69dc5a1e9beb3cf3deede55d405b8bc5dc711e97
-
-PKG_FIXUP:=autoreconf
-PKG_BUILD_PARALLEL:=1
-PKG_INSTALL:=1
-
-include $(INCLUDE_DIR)/uclibc++.mk
-include $(INCLUDE_DIR)/package.mk
-
-define Package/e2guardian
-  SECTION:=net
-  DEPENDS:=+libpthread $(CXX_DEPENDS) +zlib +libpcre
-  CATEGORY:=Network
-  SUBMENU:=Web Servers/Proxies
-  TITLE:=E2Guardian
-  URL:=http://e2guardian.org/cms/
-endef
-
-define Package/e2guardian/conffiles
-/etc/e2guardian/e2guardianf1.conf
-/etc/config/e2guardian
-endef
-
-CONFIGURE_VARS += \
-       INCLUDES="" \
-       CXXFLAGS="$$$$CXXFLAGS -fno-rtti" \
-       LIBS="-lpthread"
-
-CONFIGURE_ARGS += \
-               --with-sysconfsubdir=e2guardian \
-               --with-proxyuser=nobody \
-               --with-proxygroup=nogroup \
-               --enable-pcre=yes \
-               --with-piddir=/tmp/e2guardian/ \
-               --enable-sslextralists=no \
-               --enable-sslmitm=no
-
-define Build/Configure
-       ( cd $(PKG_BUILD_DIR); ./autogen.sh )
-       $(call Build/Configure/Default,$CONFIGURE_ARGS)
-endef
-
-define Package/e2guardian/install
-       $(INSTALL_DIR) $(1)/usr/sbin
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/e2guardian $(1)/usr/sbin/
-
-       $(INSTALL_DIR) $(1)/etc
-       $(CP) $(PKG_INSTALL_DIR)/etc/e2guardian $(1)/etc/
-       $(INSTALL_CONF) ./files/e2guardianf1.conf $(1)/etc/e2guardian/e2guardianf1.conf
-
-       $(INSTALL_DIR) $(1)/etc/config
-       $(INSTALL_CONF) ./files/e2guardian.config $(1)/etc/config/e2guardian
-
-       $(INSTALL_DIR) $(1)/usr/share/e2guardian
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/share/e2guardian/transparent1x1.gif $(1)/usr/share/e2guardian/
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/share/e2guardian/blockedflash.swf $(1)/usr/share/e2guardian/
-
-       $(INSTALL_DIR) $(1)/usr/share/e2guardian/languages/ukenglish
-       $(CP) $(PKG_INSTALL_DIR)/usr/share/e2guardian/languages/ukenglish/* $(1)/usr/share/e2guardian/languages/ukenglish/
-
-       $(INSTALL_DIR) $(1)/etc/init.d/
-       $(INSTALL_BIN) ./files/e2guardian.init $(1)/etc/init.d/e2guardian
-endef
-
-$(eval $(call BuildPackage,e2guardian))
diff --git a/net/e2guardian/files/e2guardian.config b/net/e2guardian/files/e2guardian.config
deleted file mode 100644 (file)
index a876151..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-config e2guardian 'e2guardian'
-       option languagedir '/usr/share/e2guardian/languages'
-       option language 'ukenglish'
-       option loglevel '2'
-       option logexceptionhits '2'
-       option logfileformat '1'
-       option loglocation '/var/log/e2guardian/access.log'
-       option maxuploadsize '-1'
-       option filterports '8080'
-       option proxyip '127.0.0.1'
-       option proxyport '3128'
-       option proxytimeout '20'
-       option proxyexchange '20'
-       option pcontimeout '55'
-       option accessdeniedaddress 'http://YOURSERVER.YOURDOMAIN/cgi-bin/e2guardian.pl'
-       option usecustombannedimage 'on'
-       option custombannedimagefile '/usr/share/e2guardian/transparent1x1.gif'
-       option usecustombannedflash 'on'
-       option custombannedflashfile '/usr/share/e2guardian/blockedflash.swf'
-       option filtergroups '1'
-       option filtergroupslist '/etc/e2guardian/lists/filtergroupslist'
-       option bannediplist '/etc/e2guardian/lists/bannediplist'
-       option exceptioniplist '/etc/e2guardian/lists/exceptioniplist'
-       option perroomdirectory '/etc/e2guardian/lists/bannedrooms/'
-       option showweightedfound 'on'
-       option weightedphrasemode '2'
-       option urlcachenumber '1000'
-       option urlcacheage '900'
-       option scancleancache 'on'
-       option phrasefiltermode '2'
-       option preservecase '0'
-       option hexdecodecontent 'off'
-       option forcequicksearch 'off'
-       option reverseaddresslookups 'off'
-       option reverseclientiplookups 'off'
-       option logclienthostnames 'off'
-       option createlistcachefiles 'on'
-       option prefercachedlists 'off'
-       option maxcontentfiltersize '256'
-       option maxcontentramcachescansize '2000'
-       option maxcontentfilecachescansize '20000'
-       option filecachedir '/tmp'
-       option deletedownloadedtempfiles 'on'
-       option initialtrickledelay '20'
-       option trickledelay '10'
-       option downloadmanager '/etc/e2guardian/downloadmanagers/fancy.conf'
-       option downloadmanager '/etc/e2guardian/downloadmanagers/default.conf'
-       option contentscannertimeout '60'
-       option contentscanexceptions 'off'
-       option recheckreplacedurls 'off'
-       option forwardedfor 'off'
-       option usexforwardedfor 'off'
-       option logconnectionhandlingerrors 'on'
-       option logchildprocesshandling 'off'
-       option maxchildren '180'
-       option minchildren '20'
-       option minsparechildren '16'
-       option preforkchildren '10'
-       option maxsparechildren '32'
-       option maxagechildren '500'
-       option maxips '0'
-       option ipcfilename '/tmp/.dguardianipc'
-       option urlipcfilename '/tmp/.dguardianurlipc'
-       option ipipcfilename '/tmp/.dguardianipipc'
-       option nodaemon 'off'
-       option nologger 'off'
-       option logadblocks 'off'
-       option loguseragent 'off'
-       option softrestart 'off'
diff --git a/net/e2guardian/files/e2guardian.init b/net/e2guardian/files/e2guardian.init
deleted file mode 100644 (file)
index b4c236e..0000000
+++ /dev/null
@@ -1,204 +0,0 @@
-#!/bin/sh /etc/rc.common
-# Copyright (C) 2015 OpenWrt.org
-
-START=90
-STOP=10
-
-USE_PROCD=1
-PROG=/usr/sbin/e2guardian
-CONFIGFILE="/tmp/e2guardian/e2guardian.conf"
-LOGFILE="/tmp/e2guardian/access.log"
-GROUPCONFIG="/tmp/e2guardian/e2guardianf1.conf"
-
-validate_e2guardian_section() {
-       uci_load_validate e2guardian e2guardian "$1" "$2" \
-               'accessdeniedaddress:string' \
-               'bannediplist:string' \
-               'contentscanexceptions:string' \
-               'contentscanner:string' \
-               'contentscannertimeout:uinteger' \
-               'createlistcachefiles:string' \
-               'custombannedflashfile:string' \
-               'custombannedimagefile:string' \
-               'deletedownloadedtempfiles:string' \
-               'downloadmanager:string' \
-               'exceptioniplist:string' \
-               'filecachedir:string' \
-               'filtergroups:uinteger' \
-               'filtergroupslist:string' \
-               'filterip:ipaddr' \
-               'filterports:port:8080' \
-               'forcequicksearch:string' \
-               'forwardedfor:string' \
-               'hexdecodecontent:string' \
-               'initialtrickledelay:uinteger' \
-               'ipcfilename:string' \
-               'ipipcfilename:string' \
-               'languagedir:string' \
-               'language:string' \
-               'logadblocks:string' \
-               'logchildprocesshandling:string' \
-               'logclienthostnames:string' \
-               'logconnectionhandlingerrors:string' \
-               'logexceptionhits:range(0,2)' \
-               'logfileformat:range(1,6)' \
-               'loglevel:range(0,3)' \
-               'loglocation:string' \
-               'loguseragent:string' \
-               'maxagechildren:uinteger' \
-               'maxchildren:uinteger' \
-               'maxcontentfilecachescansize:uinteger' \
-               'maxcontentfiltersize:uinteger' \
-               'maxcontentramcachescansize:uinteger' \
-               'maxips:uinteger' \
-               'maxsparechildren:uinteger' \
-               'maxuploadsize:integer' \
-               'minchildren:uinteger' \
-               'minsparechildren:uinteger' \
-               'nodaemon:string' \
-               'nologger:string' \
-               'pcontimeout:range(5,300)' \
-               'perroomdirectory:string' \
-               'phrasefiltermode:range(0,3)' \
-               'prefercachedlists:string' \
-               'preforkchildren:uinteger' \
-               'preservecase:range(0,2)' \
-               'proxyexchange:range(20,300)' \
-               'proxyip:ipaddr' \
-               'proxyport:port:3128' \
-               'proxytimeout:range(5,100)' \
-               'recheckreplacedurls:string' \
-               'reverseaddresslookups:string' \
-               'reverseclientiplookups:string' \
-               'scancleancache:string' \
-               'showweightedfound:string' \
-               'softrestart:string' \
-               'trickledelay:uinteger' \
-               'urlcacheage:uinteger' \
-               'urlcachenumber:uinteger' \
-               'urlipcfilename:string' \
-               'usecustombannedflash:string' \
-               'usecustombannedimage:string' \
-               'usexforwardedfor:string' \
-               'weightedphrasemode:range(0,2)'
-}
-
-start_e2guardian_instance() {
-
-       [ "$2" = 0 ] || {
-               echo "validation failed"
-               return 1
-       }
-
-       mkdir -p $(dirname $CONFIGFILE)
-       chown -R nobody:nogroup $(dirname $CONFIGFILE)
-
-       mkdir -p $(dirname $loglocation)
-       chown -R nobody:nogroup $(dirname $loglocation)
-
-       touch $loglocation
-       chown nobody:nogroup $loglocation
-
-       ln -sf $loglocation $(dirname $LOGFILE)
-       ln -sf /etc/e2guardian/e2guardian.conf $CONFIGFILE
-       ln -sf /etc/e2guardian/e2guardianf1.conf $GROUPCONFIG
-
-       echo "accessdeniedaddress = " $accessdeniedaddress > $CONFIGFILE
-       echo "bannediplist = " $bannediplist >> $CONFIGFILE
-
-       if [  "$contentscanner" != ""  ]
-       then
-               echo "contentscanner = " $contentscanner >> $CONFIGFILE
-       fi
-
-       echo "contentscanexceptions = " $contentscanexceptions >> $CONFIGFILE
-       echo "contentscannertimeout = " $contentscannertimeout >> $CONFIGFILE
-       echo "createlistcachefiles = " $createlistcachefiles >> $CONFIGFILE
-       echo "custombannedflashfile = " $custombannedflashfile >> $CONFIGFILE
-       echo "custombannedimagefile = " $custombannedimagefile >> $CONFIGFILE
-       echo "deletedownloadedtempfiles = " $deletedownloadedtempfiles >> $CONFIGFILE
-       echo "downloadmanager = " $downloadmanager >> $CONFIGFILE
-       echo "exceptioniplist = " $exceptioniplist >> $CONFIGFILE
-       echo "filecachedir = " $filecachedir >> $CONFIGFILE
-       echo "filtergroups = " $filtergroups >> $CONFIGFILE
-       echo "filtergroupslist = " $filtergroupslist >> $CONFIGFILE
-       echo "filterip = " $filterip >> $CONFIGFILE
-       echo "filterports = " $filterports >> $CONFIGFILE
-       echo "forcequicksearch = " $forcequicksearch >> $CONFIGFILE
-       echo "forwardedfor = " $forwardedfor >> $CONFIGFILE
-       echo "hexdecodecontent = " $hexdecodecontent >> $CONFIGFILE
-       echo "initialtrickledelay = " $initialtrickledelay >> $CONFIGFILE
-       echo "ipcfilename = " $ipcfilename >> $CONFIGFILE
-       echo "ipipcfilename = " $ipipcfilename >> $CONFIGFILE
-       echo "language = " $language >> $CONFIGFILE
-       echo "languagedir = " $languagedir >> $CONFIGFILE
-       echo "logadblocks = " $logadblocks >> $CONFIGFILE
-       echo "logchildprocesshandling = " $logchildprocesshandling >> $CONFIGFILE
-       echo "logclienthostnames = " $logclienthostnames >> $CONFIGFILE
-       echo "logconnectionhandlingerrors = " $logconnectionhandlingerrors >> $CONFIGFILE
-       echo "logexceptionhits = " $logexceptionhits >> $CONFIGFILE
-       echo "logfileformat = " $logfileformat >> $CONFIGFILE
-       echo "loglevel = " $loglevel >> $CONFIGFILE
-       echo "loglocation = " $loglocation >> $CONFIGFILE
-       echo "loguseragent = " $loguseragent >> $CONFIGFILE
-       echo "maxagechildren = " $maxagechildren >> $CONFIGFILE
-       echo "maxchildren = " $maxchildren >> $CONFIGFILE
-       echo "maxcontentfilecachescansize = " $maxcontentfilecachescansize >> $CONFIGFILE
-       echo "maxcontentfiltersize = " $maxcontentfiltersize >> $CONFIGFILE
-       echo "maxcontentramcachescansize = " $maxcontentramcachescansize >> $CONFIGFILE
-       echo "maxips = " $maxips >> $CONFIGFILE
-       echo "maxsparechildren = " $maxsparechildren >> $CONFIGFILE
-       echo "maxuploadsize = " $maxuploadsize >> $CONFIGFILE
-       echo "minchildren = " $minchildren >> $CONFIGFILE
-       echo "minsparechildren = " $minsparechildren >> $CONFIGFILE
-       echo "nodaemon = " $nodaemon >> $CONFIGFILE
-       echo "nologger = " $nologger >> $CONFIGFILE
-       echo "pcontimeout = " $pcontimeout >> $CONFIGFILE
-       echo "perroomdirectory = " $perroomdirectory >> $CONFIGFILE
-       echo "phrasefiltermode = " $phrasefiltermode >> $CONFIGFILE
-       echo "prefercachedlists = " $prefercachedlists >> $CONFIGFILE
-       echo "preforkchildren = " $preforkchildren >> $CONFIGFILE
-       echo "preservecase = " $preservecase >> $CONFIGFILE
-       echo "proxyexchange = " $proxyexchange >> $CONFIGFILE
-       echo "proxyip = " $proxyip >> $CONFIGFILE
-       echo "proxyport = " $proxyport >> $CONFIGFILE
-       echo "proxytimeout = " $proxytimeout >> $CONFIGFILE
-       echo "recheckreplacedurls = " $recheckreplacedurls >> $CONFIGFILE
-       echo "reverseaddresslookups = " $reverseaddresslookups >> $CONFIGFILE
-       echo "reverseclientiplookups = " $reverseclientiplookups >> $CONFIGFILE
-       echo "scancleancache = " $scancleancache >> $CONFIGFILE
-       echo "showweightedfound = " $showweightedfound >> $CONFIGFILE
-       echo "softrestart = " $softrestart >> $CONFIGFILE
-       echo "trickledelay = " $trickledelay >> $CONFIGFILE
-       echo "urlcacheage = " $urlcacheage >> $CONFIGFILE
-       echo "urlcachenumber = " $urlcachenumber >> $CONFIGFILE
-       echo "urlipcfilename = " $urlipcfilename >> $CONFIGFILE
-       echo "usecustombannedflash = " $usecustombannedflash >> $CONFIGFILE
-       echo "usecustombannedimage = " $usecustombannedimage >> $CONFIGFILE
-       echo "usexforwardedfor = " $usexforwardedfor >> $CONFIGFILE
-       echo "weightedphrasemode = " $weightedphrasemode >> $CONFIGFILE
-
-       procd_open_instance
-       procd_set_param command $PROG -c $CONFIGFILE
-       procd_set_param file $CONFIGFILE
-       procd_close_instance
-
-}
-
-start_service()
-{
-       validate_e2guardian_section e2guardian start_e2guardian_instance
-}
-
-stop_service()
-{
-       PID=`cat /tmp/e2guardian/e2guardian.pid`
-       kill $PID
-       rm -f /tmp/e2guardian/e2guardian.pid
-}
-
-service_triggers()
-{
-       procd_add_reload_trigger "e2guardian"
-       procd_add_validation validate_e2guardian_section
-}
diff --git a/net/e2guardian/files/e2guardianf1.conf b/net/e2guardian/files/e2guardianf1.conf
deleted file mode 100644 (file)
index c4b821f..0000000
+++ /dev/null
@@ -1,430 +0,0 @@
-# e2guardian filter group config file for version 3.1.2
-
-
-# Filter group mode
-# This option determines whether members of this group have their web access
-# unfiltered, filtered, or banned.
-#
-# 0 = banned
-# 1 = filtered
-# 2 = unfiltered (exception)
-#
-# Only filter groups with a mode of 1 need to define phrase, URL, site, extension,
-# mimetype and PICS lists; in other modes, these options are ignored to conserve
-# memory.
-#
-# Defaults to 0 if unspecified.
-# Unauthenticated users are treated as being in the first filter group.
-groupmode = 1
-
-# Filter group name
-# Used to fill in the -FILTERGROUP- placeholder in the HTML template file, and to
-# name the group in the access logs
-# Defaults to empty string
-#groupname = ''
-groupname = ''
-
-# Content filtering files location
-bannedphraselist = '/etc/e2guardian/lists/bannedphraselist'
-weightedphraselist = '/etc/e2guardian/lists/weightedphraselist'
-exceptionphraselist = '/etc/e2guardian/lists/exceptionphraselist'
-bannedsitelist = '/etc/e2guardian/lists/bannedsitelist'
-greysitelist = '/etc/e2guardian/lists/greysitelist'
-bannedsslsitelist = '/etc/e2guardian/lists/bannedsslsitelist'
-greysslsitelist = '/etc/e2guardian/lists/greysslsitelist'
-exceptionsitelist = '/etc/e2guardian/lists/exceptionsitelist'
-bannedurllist = '/etc/e2guardian/lists/bannedurllist'
-greyurllist = '/etc/e2guardian/lists/greyurllist'
-exceptionurllist = '/etc/e2guardian/lists/exceptionurllist'
-exceptionregexpurllist = '/etc/e2guardian/lists/exceptionregexpurllist'
-bannedregexpurllist = '/etc/e2guardian/lists/bannedregexpurllist'
-picsfile = '/etc/e2guardian/lists/pics'
-contentregexplist = '/etc/e2guardian/lists/contentregexplist'
-urlregexplist = '/etc/e2guardian/lists/urlregexplist'
-refererexceptionsitelist = '/etc/e2guardian/lists/refererexceptionsitelist'
-refererexceptionurllist = '/etc/e2guardian/lists/refererexceptionurllist'
-embededreferersitelist = '/etc/e2guardian/lists/embededreferersitelist'
-embededrefererurllist = '/etc/e2guardian/lists/embededrefererurllist'
-urlredirectregexplist = '/etc/e2guardian/lists/urlredirectregexplist'
-
-# local versions of lists (where LOCAL_LISTS enabled)
-#localbannedsitelist = '/etc/e2guardian/lists/localbannedsitelist'
-#localgreysitelist = '/etc/e2guardian/lists/localgreysitelist'
-#localexceptionsitelist = '/etc/e2guardian/lists/localexceptionsitelist'
-#localbannedurllist = '/etc/e2guardian/lists/localbannedurllist'
-#localgreyurllist = '/etc/e2guardian/lists/localgreyurllist'
-#localexceptionurllist = '/etc/e2guardian/lists/localexceptionurllist'
-#localbannedsslsitelist = '/etc/e2guardian/lists/localbannedsslsitelist'
-#localgreysslsitelist = '/etc/e2guardian/lists/localgreysslsitelist'
-#localbannedsearchlist = '/etc/e2guardian/lists/localbannedsearchlist'
-
-!! Not compiled !! authexceptionsitelist = '/etc/e2guardian/lists/authexceptionsitelist'
-!! Not compiled !! authexceptionurllist = '/etc/e2guardian/lists/authexceptionurllist'
-
-# Filetype filtering
-#
-# Allow bannedregexpurllist with grey list mode
-# bannedregexpheaderlist and bannedregexpurllist
-#
-# bannedregexwithblanketblock = off
-#
-# Blanket download blocking
-# If enabled, all files will be blocked, unless they match the
-# exceptionextensionlist or exceptionmimetypelist.
-# These lists do not override virus scanning.
-# Exception lists defined above override all types of filtering, including
-# the blanket download block.
-# Defaults to disabled.
-# (on | off)
-#
-blockdownloads = off
-exceptionextensionlist = '/etc/e2guardian/lists/exceptionextensionlist'
-exceptionmimetypelist = '/etc/e2guardian/lists/exceptionmimetypelist'
-#
-# Use the following lists to block specific kinds of file downloads.
-# The two exception lists above can be used to override these.
-#
-bannedextensionlist = '/etc/e2guardian/lists/bannedextensionlist'
-bannedmimetypelist = '/etc/e2guardian/lists/bannedmimetypelist'
-#
-# In either file filtering mode, the following list can be used to override
-# MIME type & extension blocks for particular domains & URLs (trusted download sites).
-#
-exceptionfilesitelist = '/etc/e2guardian/lists/exceptionfilesitelist'
-exceptionfileurllist = '/etc/e2guardian/lists/exceptionfileurllist'
-
-# POST protection (web upload and forms)
-# does not block forms without any file upload, i.e. this is just for
-# blocking or limiting uploads
-# measured in kibibytes after MIME encoding and header bumph
-# use 0 for a complete block
-# use higher (e.g. 512 = 512Kbytes) for limiting
-# use -1 for no blocking
-#maxuploadsize = 512
-#maxuploadsize = 0
-maxuploadsize = -1
-
-# Categorise without blocking:
-# Supply categorised lists here and the category string shall be logged against
-# matching requests, but matching these lists does not perform any filtering
-# action.
-#logsitelist = '/etc/e2guardian/lists/logsitelist'
-#logurllist = '/etc/e2guardian/lists/logurllist'
-#logregexpurllist = '/etc/e2guardian/lists/logregexpurllist'
-
-# Outgoing HTTP header rules:
-# Optional lists for blocking based on, and modification of, outgoing HTTP
-# request headers.  Format for headerregexplist is one modification rule per
-# line, similar to content/URL modifications.  Format for
-# bannedregexpheaderlist is one regular expression per line, with matching
-# headers causing a request to be blocked.
-# Headers are matched/replaced on a line-by-line basis, not as a contiguous
-# block.
-# Use for example, to remove cookies or prevent certain user-agents.
-headerregexplist = '/etc/e2guardian/lists/headerregexplist'
-bannedregexpheaderlist = '/etc/e2guardian/lists/bannedregexpheaderlist'
-addheaderregexplist = '/etc/e2guardian/lists/addheaderregexplist'
-
-# Weighted phrase mode
-# Optional; overrides the weightedphrasemode option in e2guardian.conf
-# for this particular group.  See documentation for supported values in
-# that file.
-#weightedphrasemode = 0
-
-# Naughtiness limit
-# This the limit over which the page will be blocked.  Each weighted phrase is given
-# a value either positive or negative and the values added up.  Phrases to do with
-# good subjects will have negative values, and bad subjects will have positive
-# values.  See the weightedphraselist file for examples.
-# As a guide:
-# 50 is for young children,  100 for old children,  160 for young adults.
-naughtynesslimit = 50
-
-# Search term blocking
-# Search terms can be extracted from search URLs and filtered using one or
-# both of two different methods.
-
-# Method 1 is that developed by Protex where specific
-# search terms are contained in a bannedsearchlist.
-# (localbannedsearchlist and bannedsearchoveridelist can be used to suppliment
-# and overide this list as required.)
-# These lists contain banned search words combinations on each line.
-# Words are separated by '+' and must be in sorted order within a line.
-#    so to block 'sexy girl' then the list must contain the line
-#      girl+sexy
-#    and this will block both 'sexy girl' and 'girl sexy'
-# To use this method, the searchregexplist must be enabled and the bannedsearchlist(s) defined
-
-# Method 2 is uses the
-# bannedphraselist, weightedphraselist and exceptionphraselist, with a separate
-# threshold for blocking than that used for normal page content.
-# To do this, the searchregexplist must be enabled and searchtermlimit
-# must be grater than 0.
-
-#
-# Search engine regular expression list (need for both options)
-# List of regular expressions for matching search engine URLs.  It is assumed
-# that the search terms themselves will be contained in the
-# of output of each expression.
-#searchregexplist = '/etc/e2guardian/lists/searchregexplist'
-#
-# Banned Search Term list(s) for option 1
-#bannedsearchlist = '/etc/e2guardian/lists/bannedsearchlist'
-#bannedsearchoveridelist = '/etc/e2guardian/lists/bannedsearchoveridelist'
-
-
-# Search term limit (for Option 2)
-# The limit over which requests will be blocked for containing search terms
-# which match the weightedphraselist.  This should usually be lower than the
-# 'naughtynesslimit' value above, because the amount of text being filtered
-# is only a few words, rather than a whole page.
-# This option must be uncommented if searchregexplist is uncommented.
-# A value of 0 here indicates that search terms should be extracted,
-# but no phrase filtering should be performed on the resulting text.
-#searchtermlimit = 0
-#
-# Search term phrase lists (for Option 2)
-# If the three lines below are uncommented, search term blocking will use
-# the banned, weighted & exception phrases from these lists, instead of using
-# the same phrase lists as for page content.  This is optional but recommended,
-# as weights for individual phrases in the "normal" lists may not be
-# appropriate for blocking when those phrases appear in a much smaller block
-# of text.
-# Please note that all or none of the below should be uncommented, not a
-# mixture.
-#bannedsearchtermlist = '/etc/e2guardian/lists/bannedsearchtermlist'
-#weightedsearchtermlist = '/etc/e2guardian/lists/weightedsearchtermlist'
-#exceptionsearchtermlist = '/etc/e2guardian/lists/exceptionsearchtermlist'
-
-# Category display threshold
-# This option only applies to pages blocked by weighted phrase filtering.
-# Defines the minimum score that must be accumulated within a particular
-# category in order for it to show up on the block pages' category list.
-# All categories under which the page scores positively will be logged; those
-# that were not displayed to the user appear in brackets.
-#
-# -1 = display only the highest scoring category
-# 0 = display all categories (default)
-# > 0 = minimum score for a category to be displayed
-categorydisplaythreshold = 0
-
-# Embedded URL weighting
-# When set to something greater than zero, this option causes URLs embedded within a
-# page's HTML (from links, image tags, etc.) to be extracted and checked against the
-# bannedsitelist and bannedurllist. Each link to a banned page causes the amount set
-# here to be added to the page's weighting.
-# The behaviour of this option with regards to multiple occurrences of a site/URL is
-# affected by the weightedphrasemode setting.
-#
-# NB: Currently, this feature uses regular expressions that require the PCRE library.
-# As such, it is only available if you compiled DansGuardian with '--enable-pcre=yes'.
-# You can check compile-time options by running 'e2guardian -v'.
-#
-# Set to 0 to disable.
-# Defaults to 0.
-# WARNING: This option is highly CPU intensive!
-embeddedurlweight = 0
-
-# Enable PICS rating support
-#
-# Defaults to disabled
-# (on | off)
-enablepics = off
-
-# Temporary Denied Page Bypass
-# This provides a link on the denied page to bypass the ban for a few minutes.  To be
-# secure it uses a random hashed secret generated at daemon startup.  You define the
-# number of seconds the bypass will function for before the deny will appear again.
-# To allow the link on the denied page to appear you will need to edit the template.html
-# or e2guardian.pl file for your language.
-# 300 = enable for 5 minutes
-# 0 = disable ( defaults to 0 )
-# -1 = enable but you require a separate program/CGI to generate a valid link
-bypass = 0
-
-# Temporary Denied Page Bypass Secret Key
-# Rather than generating a random key you can specify one.  It must be more than 8 chars.
-# '' = generate a random one (recommended and default)
-# 'Mary had a little lamb.' = an example
-# '76b42abc1cd0fdcaf6e943dcbc93b826' = an example
-bypasskey = ''
-
-# Infection/Scan Error Bypass
-# Similar to the 'bypass' setting, but specifically for bypassing files scanned and found
-# to be infected, or files that trigger scanner errors - for example, archive types with
-# recognised but unsupported compression schemes, or corrupt archives.
-# The option specifies the number of seconds for which the bypass link will be valid.
-# 300 = enable for 5 minutes
-# 0 = disable (default)
-# -1 = enable, but require a separate program/CGI to generate a valid link
-infectionbypass = 0
-
-# Infection/Scan Error Bypass Secret Key
-# Same as the 'bypasskey' option, but used for infection bypass mode.
-infectionbypasskey = ''
-
-# Infection/Scan Error Bypass on Scan Errors Only
-# Enable this option to allow infectionbypass links only when virus scanning fails,
-# not when a file is found to contain a virus.
-# on = enable (default and highly recommended)
-# off = disable
-infectionbypasserrorsonly = on
-
-# Disable content scanning
-# If you enable this option you will disable content scanning for this group.
-# Content scanning primarily is AV scanning (if enabled) but could include
-# other types.
-# (on|off) default = off.
-disablecontentscan = off
-
-# Enable Deep URL Analysis
-# When enabled, DG looks for URLs within URLs, checking against the bannedsitelist and
-# bannedurllist. This can be used, for example, to block images originating from banned
-# sites from appearing in Google Images search results, as the original URLs are
-# embedded in the thumbnail GET requests.
-# (on|off) default = off
-deepurlanalysis = off
-
-# reportinglevel
-#
-# -1 = log, but do not block - Stealth mode
-#  0 = just say 'Access Denied'
-#  1 = report why but not what denied phrase
-#  2 = report fully
-#  3 = use HTML template file (accessdeniedaddress ignored) - recommended
-#
-# If defined, this overrides the global setting in e2guardian.conf for
-# members of this filter group.
-#
-reportinglevel = 3
-
-# accessdeniedaddress is the address of your web server to which the cgi
-# e2guardian reporting script was copied. Only used in reporting levels
-# 1 and 2.
-#
-# This webserver must be either:
-#  1. Non-proxied. Either a machine on the local network, or listed as an
-#     exception in your browser's proxy configuration.
-#  2. Added to the exceptionsitelist. Option 1 is preferable; this option is
-#     only for users using both transparent proxying and a non-local server
-#     to host this script.
-#
-# If defined, this overrides the global setting in e2guardian.conf for
-# members of this filter group.
-#
-#accessdeniedaddress = 'http://YOURSERVER.YOURDOMAIN/cgi-bin/e2guardian.pl'
-
-# sslaccessdeniedaddress is the address of your web server to which the static page
-# e2guardian reporting was copied. Only used in reporting levels 3 (avoid blank page)
-# Work only in firefox with ssldeniedrewrite off
-
-# sslaccessdeniedaddress = 'http://YOURSERVER.YOURDOMAIN/denyssl.htm'
-
-# Break SSL protocol and redirect to another HTTPS website for denied page (sslaccessdeniedaddress url)
-
-#ssldeniedrewrite = 'on'
-
-# HTML Template override
-# If defined, this specifies a custom HTML template file for members of this
-# filter group, overriding the global setting in e2guardian.conf. This is
-# only used in reporting level 3.
-#
-# The default template file path is <languagedir>/<language>/template.h
-# e.g. /share/e2guardian/languages/ukenglish/template.html when using 'ukenglish'
-# language.
-#
-# This option generates a file path of the form:
-# <languagedir>/<language>/<htmltemplate>
-# e.g. /share/e2guardian/languages/ukenglish/custom.html
-#
-#htmltemplate = 'custom.html'
-
-# Non standard delimiter (only used with accessdeniedaddress)
-# To help preserve the full banned URL, including parameters, the variables
-# passed into the access denied CGI are separated using non-standard
-# delimiters. This can be useful to ensure correct operation of the filter
-# bypass modes. Parameters are split using "::" in place of "&", and "==" in
-# place of "=".
-# Default is enabled, but to go back to the standard mode, disable it.
-
-#nonstandarddelimiter = off
-
-# Email reporting - original patch by J. Gauthier
-
-# Use SMTP
-# If on, will enable system wide events to be reported by email.
-# need to configure mail program (see 'mailer' in global config)
-# and email recipients
-# default usesmtp = off
-#!! Not compiled !!usesmtp = off
-
-# mailfrom
-# who the email would come from
-# example: mailfrom = 'e2guardian@mycompany.com'
-#!! Not compiled !!mailfrom = ''
-
-# avadmin
-# who the virus emails go to (if notify av is on)
-# example: avadmin = 'admin@mycompany.com'
-#!! Not compiled !!avadmin = ''
-
-# contentdmin
-# who the content emails go to (when thresholds are exceeded)
-# and contentnotify is on
-# example: contentadmin = 'admin@mycompany.com'
-#!! Not compiled !!contentadmin = ''
-
-# avsubject
-# Subject of the email sent when a virus is caught.
-# only applicable if notifyav is on
-# default avsubject = 'e2guardian virus block'
-#!! Not compiled !!avsubject = 'e2guardian virus block'
-
-# content
-# Subject of the email sent when violation thresholds are exceeded
-# default contentsubject = 'e2guardian violation'
-#!! Not compiled !!contentsubject = 'e2guardian violation'
-
-# notifyAV
-# This will send a notification, if usesmtp/notifyav is on, any time an
-# infection is found.
-# Important: If this option is off, viruses will still be recorded like a
-# content infraction.
-#!! Not compiled !!notifyav = off
-
-# notifycontent
-# This will send a notification, if usesmtp is on, based on thresholds
-# below
-#!! Not compiled !!notifycontent = off
-
-# thresholdbyuser
-# results are only predictable with user authenticated configs
-# if enabled the violation/threshold count is kept track of by the user
-#!! Not compiled !!thresholdbyuser = off
-
-#violations
-# number of violations before notification
-# setting to 0 will never trigger a notification
-#!! Not compiled !!violations = 0
-
-#threshold
-# this is in seconds. If 'violations' occur in 'threshold' seconds, then
-# a notification is made.
-# if this is set to 0, then whenever the set number of violations are made a
-# notifaction will be sent.
-#!! Not compiled !!threshold = 0
-
-#SSL certificate checking
-# Check that ssl certificates for servers on https connections are valid
-# and signed by a ca in the configured path
-sslcertcheck = off
-
-#SSL man in the middle
-# Forge ssl certificates for all non-exception sites, decrypt the data then re encrypt it
-# using a different private key. Used to filter ssl sites
-sslmitm = off
-
-#Limit SSL MITM to sites in greysslsitelist(s)
-# ignored if  sslmitm is off
-# SSL sites not matching greysslsitelist will be treat as if sslmitm is off.
-onlymitmsslgrey = off
index c5d8feed6e1d4bc7c94710888d3f862721a942c7..15476250795f3118e2879e41b550ad27b7b32143 100644 (file)
@@ -8,12 +8,18 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=foolsm
-PKG_VERSION:=1.0.10
+PKG_VERSION:=1.0.13
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://lsm.foobar.fi/download
-PKG_HASH:=33210209ca38b3bfef1a9180f765266a134fc811dea8bc06450a3bd48d1d083e
+PKG_HASH:=4eeda0e666e8ee93aab9b9c6709e9695e042dc391fb0999280874c8a73bce476
+
+PKG_MAINTAINER:=
+PKG_LICENSE:=GPL-2.0-only
+
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -26,17 +32,23 @@ define Package/foolsm
 endef
 
 define Package/foolsm/description
-       foolsm is a link state monitor for carrying out actions when a link
-       transistions from the up to down state or vice versa.
+  foolsm is a link state monitor for carrying out actions when a link
+  transistions from the up to down state or vice versa.
 endef
 
 define Package/foolsm/conffiles
 /etc/foolsm/foolsm.conf
 endef
 
+MAKE_FLAGS += \
+       PREFIX="$(CONFIGURE_PREFIX)"
+
+TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto
+TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
+
 define Package/foolsm/install
        $(INSTALL_DIR) $(1)/usr/sbin
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/foolsm $(1)/usr/sbin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/foolsm $(1)/usr/sbin/
        $(INSTALL_DIR) $(1)/etc/foolsm/script.d
        $(INSTALL_DIR) $(1)/etc/init.d
        $(INSTALL_DATA) ./files/connections.conf $(1)/etc/foolsm/connections.conf
diff --git a/net/frr/Config.in b/net/frr/Config.in
new file mode 100644 (file)
index 0000000..2c4169a
--- /dev/null
@@ -0,0 +1,18 @@
+
+if PACKAGE_frr
+comment "SSL support"
+
+choice
+        prompt "Selected SSL MD5 library"
+        default FRR_INTERNAL
+
+        config FRR_OPENSSL
+                bool "OpenSSL"
+
+        config FRR_INTERNAL
+                bool "internal SSL support"
+endchoice
+
+comment Packages
+
+endif
index c507eaad8c6ab023a71646c843c7052630d01884..d9d2b3115a7537e86de9750e2f9322b14eb9800f 100644 (file)
@@ -7,35 +7,42 @@
 
 include $(TOPDIR)/rules.mk
 PKG_NAME:=frr
-PKG_VERSION:=7.1
-PKG_RELEASE:=2
+PKG_VERSION:=7.2
+PKG_RELEASE:=1
 
 PKG_SOURCE_URL:=https://github.com/FRRouting/frr/releases/download/$(PKG_NAME)-$(PKG_VERSION)/
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_HASH:=2a4210565e7b41d366f7b9f5f745917d67a0b159f3b6bd49d75f9e730557db2f
+PKG_HASH:=6cd5bfb6975133ccf23cc3f3a1c1c9a3f6d6a6c792c763b3ea010db75b3de5b3
 PKG_MAINTAINER:=Lucian Cristian <lucian.cristian@gmail.com>
 
+PKG_DAEMON_AVAILABLE:= \
+       babeld \
+       bfdd \
+       bgpd \
+       eigrpd \
+       fabricd \
+       isisd \
+       ldpd \
+       nhrpd \
+       ospfd \
+       ospf6d \
+       pbrd \
+       pimd \
+       ripd \
+       ripngd \
+       staticd \
+       vrrpd
+
+
 PKG_CONFIG_DEPENDS:= \
        CONFIG_IPV6 \
-       CONFIG_PACKAGE_frr-babeld \
-       CONFIG_PACKAGE_frr-bfdd \
-       CONFIG_PACKAGE_frr-bgpd \
-       CONFIG_PACKAGE_frr-eigrpd \
-       CONFIG_PACKAGE_frr-fabricd \
-       CONFIG_PACKAGE_frr-isisd \
-       CONFIG_PACKAGE_frr-ldpd \
+       CONFIG_FRR_OPENSSL \
+       CONFIG_FRR_INTERNAL \
        CONFIG_PACKAGE_frr-libfrr \
-       CONFIG_PACKAGE_frr-nhrpd \
-       CONFIG_PACKAGE_frr-ospfd \
-       CONFIG_PACKAGE_frr-ospf6d \
-       CONFIG_PACKAGE_frr-pbrd \
-       CONFIG_PACKAGE_frr-pimd \
-       CONFIG_PACKAGE_frr-ripd \
-       CONFIG_PACKAGE_frr-ripngd \
-       CONFIG_PACKAGE_frr-staticd \
        CONFIG_PACKAGE_frr-vtysh \
        CONFIG_PACKAGE_frr-watchfrr \
-       CONFIG_PACKAGE_frr-zebra
+       CONFIG_PACKAGE_frr-zebra \
+       $(patsubst %,CONFIG_PACKAGE_frr-%,$(PKG_DAEMON_AVAILABLE)) \
 
 PKG_BUILD_PARALLEL:=1
 PKG_BUILD_DEPENDS:=python3/host
@@ -45,18 +52,22 @@ PKG_LICENSE:=GPL-2.0
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/host-build.mk
 
+define Package/frr-libfrr/config
+  source "$(SOURCE)/Config.in"
+endef
+
 define Package/frr/Default
   SECTION:=net
   CATEGORY:=Network
   SUBMENU:=Routing and Redirection
-  DEPENDS:=frr
-  TITLE:=The FRRouting (FRR) Software Routing Suite
   URL:=https://www.frrouting.org/
+  DEPENDS:=frr
 endef
 
 define Package/frr
   $(call Package/frr/Default)
   DEPENDS:=+librt
+  TITLE:=The FRRouting (FRR) Software Routing Suite
   MENU:=1
 endef
 
@@ -65,117 +76,20 @@ define Package/frr/description
   routing protocols.
 
   Currently FRRouting supports BGP4, BGP4+, OSPFv2, OSPFv3, RIPv1, RIPv2, RIPng,
-  IS-IS, PIM-SM/MSDP, LDP and Babel as well as very early support for EIGRP and
+  IS-IS, PIM-SM/MSDP, LDP, VRRP and Babel as well as very early support for EIGRP and
   NHRP.
 endef
 
-define Package/frr-babeld
-  $(call Package/frr/Default)
-  DEPENDS+=+frr-libfrr
-  TITLE:=BABEL routing engine
-endef
-
-define Package/frr-bfdd
-  $(call Package/frr/Default)
-  DEPENDS+=+frr-libfrr
-  TITLE:=BFD routing engine
-  CONFLICTS:=bfdd
-endef
-
-define Package/frr-bgpd
-  $(call Package/frr/Default)
-  DEPENDS+=+frr-libfrr
-  TITLE:=BGPv4, BGPv4+, BGPv4- routing engine
-  CONFLICTS:=quagga-bgpd
-endef
-
-define Package/frr-eigrpd
-  $(call Package/frr/Default)
-  DEPENDS+=+frr-libfrr
-  TITLE:=EIGRPD routing engine
-endef
-
-define Package/frr-fabricd
-  $(call Package/frr/Default)
-  DEPENDS+=+frr-libfrr
-  TITLE:=OpenFabric routing engine
-endef
-
-define Package/frr-isisd
-  $(call Package/frr/Default)
-  DEPENDS+=+frr-libfrr
-  TITLE:=IS-IS routing engine
-  CONFLICTS:=quagga-isisd
-endef
-
-define Package/frr-ldpd
-  $(call Package/frr/Default)
-  DEPENDS+=+frr-libfrr
-  TITLE:=LDP routing engine
-endef
-
 define Package/frr-libfrr
   $(call Package/frr/Default)
   TITLE:=zebra library
-  DEPENDS+=+libjson-c +libyang
+  DEPENDS+=+librt +libjson-c +libyang +FRR_OPENSSL:libopenssl
   CONFLICTS:=quagga-libzebra
 endef
 
-define Package/frr-nhrpd
-  $(call Package/frr/Default)
-  DEPENDS+=+frr-libfrr +libcares
-  TITLE:=NHRP routing engine
-endef
-
-define Package/frr-ospfd
-  $(call Package/frr/Default)
-  DEPENDS+=+frr-libfrr
-  TITLE:=OSPFv2 routing engine
-  CONFLICTS:=quagga-ospfd
-endef
-
-define Package/frr-ospf6d
-  $(call Package/frr/Default)
-  DEPENDS+=+frr-libfrr @IPV6
-  TITLE:=OSPFv3 routing engine
-  CONFLICTS:=quagga-ospf6d
-endef
-
-define Package/frr-pbrd
-  $(call Package/frr/Default)
-  DEPENDS+=+frr-libfrr
-  TITLE:=PBRD routing daemon
-endef
-
-define Package/frr-pimd
-  $(call Package/frr/Default)
-  DEPENDS+=+frr-libfrr
-  TITLE:=PIM routing engine
-endef
-
-define Package/frr-ripd
-  $(call Package/frr/Default)
-  DEPENDS+=+frr-libfrr
-  TITLE:=RIP routing engine
-  CONFLICTS:=quagga-ripd
-endef
-
-define Package/frr-ripngd
-  $(call Package/frr/Default)
-  DEPENDS+=+frr-libfrr @IPV6
-  TITLE:=RIPNG routing engine
-  CONFLICTS:=quagga-ripngd
-endef
-
-define Package/frr-staticd
-  $(call Package/frr/Default)
-  DEPENDS+=+frr-libfrr
-  TITLE:=STATICD routing engine
-endef
-
 define Package/frr-vtysh
   $(call Package/frr/Default)
-  DEPENDS+=+frr-libfrr +libreadline +libncurses
+  DEPENDS+=+frr-libfrr +libreadline +libncurses +more
   TITLE:=integrated shell for frr routing software
   CONFLICTS:=quagga-vtysh
 endef
@@ -195,19 +109,49 @@ define Package/frr-zebra
   CONFLICTS:=quagga-zebra
 endef
 
+##Migrate from quagga
+##should test file exists and link in frr folder
+#define Package/frr/postinst
+##!/bin/sh
+#if [ -f /etc/quagga/ospfd.conf ]; then
+#    ls to /etc/frr
+#    sed enable ospfd daemon
+#fi
+#exit 0
+#endef
+
+define BuildDaemon
+    define Package/frr-$(1)
+       $$(call Package/frr/Default)
+       TITLE:= $(1) routing engine
+       DEPENDS+=frr-libfrr $(2)
+    endef
+
+    define Package/frr-$(1)/install
+       $(INSTALL_DIR) $$(1)/usr/sbin
+       if [ "$(1)" != "fabricd" ]; then \
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/$(1)/.libs/$(1) $$(1)/usr/sbin/; \
+       else \
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/isisd/.libs/$(1) $$(1)/usr/sbin/; fi
+       if [ "$(1)" == "nhrpd" ]; then \
+       $(INSTALL_DIR) $$(1)/usr/lib; \
+       $(CP) $(PKG_BUILD_DIR)/build/lib/.libs/libfrrcares.so* $$(1)/usr/lib/; fi
+    endef
+
+    $$(eval $$(call BuildPackage,frr-$(1)))
+endef
+
 define Package/frr-libfrr/conffiles
 /etc/frr/
 endef
 
 define Build/Prepare
        $(Build/Prepare/Default)
-       mkdir -p $(PKG_BUILD_DIR)/build/lib
-       $(CP) $(PKG_BUILD_DIR)/lib/command.h $(PKG_BUILD_DIR)/build/lib/
+       mkdir -p $(PKG_BUILD_DIR)/build
 endef
 
 define Build/Configure
     ( cd $(PKG_BUILD_DIR)/build/ ; \
-    cd build ; \
     ../configure \
        --host="$(GNU_TARGET_NAME)" \
        --build="$(GNU_HOST_NAME)" \
@@ -229,26 +173,11 @@ define Build/Configure
        --disable-ospfclient \
        --disable-doc \
        --disable-backtrace \
-       --with-vtysh-pager=cat \
        --localstatedir=/var/run/frr \
        --sysconfdir=/etc/frr/ \
-       $(call autoconf_bool,CONFIG_PACKAGE_frr-babeld,babeld) \
-       $(call autoconf_bool,CONFIG_PACKAGE_frr-bfdd,bfdd) \
-       $(call autoconf_bool,CONFIG_PACKAGE_frr-bgpd,bgpd) \
-       $(call autoconf_bool,CONFIG_PACKAGE_frr-eigrpd,eigrpd) \
-       $(call autoconf_bool,CONFIG_PACKAGE_frr-fabricd,fabricd) \
-       $(call autoconf_bool,CONFIG_PACKAGE_frr-isisd,isisd) \
-       $(call autoconf_bool,CONFIG_PACKAGE_frr-ldpd,ldpd) \
-       $(call autoconf_bool,CONFIG_PACKAGE_frr-nhrpd,nhrpd) \
-       $(call autoconf_bool,CONFIG_PACKAGE_frr-ospfd,ospfd) \
-       $(call autoconf_bool,CONFIG_PACKAGE_frr-ospf6d,ospf6d) \
-       $(call autoconf_bool,CONFIG_PACKAGE_frr-pbrd,pbrd) \
-       $(call autoconf_bool,CONFIG_PACKAGE_frr-pimd,pimd) \
-       $(call autoconf_bool,CONFIG_PACKAGE_frr-staticd,staticd) \
-       $(call autoconf_bool,CONFIG_PACKAGE_frr-ripd,ripd) \
-       $(call autoconf_bool,CONFIG_PACKAGE_frr-ripngd,ripngd) \
-       $(call autoconf_bool,CONFIG_PACKAGE_frr-vtysh,vtysh) \
-       $(call autoconf_bool,CONFIG_PACKAGE_frr-libfrr,zebra) \
+       $(if $(CONFIG_FRR_OPENSSL),--with-crypto=openssl,) \
+       $(foreach m,$(PKG_DAEMON_AVAILABLE), \
+       $(if $(CONFIG_PACKAGE_frr-$(m)),--enable-$(m),--disable-$(m)) ) \
 )
 endef
 
@@ -277,91 +206,6 @@ define Package/frr-zebra/install
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/zebra/.libs/zebra $(1)/usr/sbin/
 endef
 
-define Package/frr-babeld/install
-       $(INSTALL_DIR) $(1)/usr/sbin
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/babeld/.libs/babeld $(1)/usr/sbin/
-endef
-
-define Package/frr-bfdd/install
-       $(INSTALL_DIR) $(1)/usr/sbin
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/bfdd/.libs/bfdd $(1)/usr/sbin/
-endef
-
-define Package/frr-bgpd/install
-       $(INSTALL_DIR) $(1)/usr/sbin
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/bgpd/.libs/bgpd $(1)/usr/sbin/
-endef
-
-define Package/frr-eigrpd/install
-       $(INSTALL_DIR) $(1)/usr/sbin
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/eigrpd/.libs/eigrpd $(1)/usr/sbin/
-endef
-
-define Package/frr-fabricd/install
-       $(INSTALL_DIR) $(1)/usr/sbin
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/isisd/.libs/fabricd $(1)/usr/sbin/
-endef
-
-define Package/frr-isisd/install
-       $(INSTALL_DIR) $(1)/usr/sbin
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/isisd/.libs/isisd $(1)/usr/sbin/
-endef
-
-define Package/frr-ldpd/install
-       $(INSTALL_DIR) $(1)/usr/sbin
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/ldpd/.libs/ldpd $(1)/usr/sbin/
-endef
-
-define Package/frr-nhrpd/install
-       $(INSTALL_DIR) $(1)/usr/sbin
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/nhrpd/.libs/nhrpd $(1)/usr/sbin/
-endef
-
-define Package/frr-ospfd/install
-       $(INSTALL_DIR) $(1)/usr/sbin
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/ospfd/.libs/ospfd $(1)/usr/sbin/
-endef
-
-define Package/frr-ospf6d/install
-       $(INSTALL_DIR) $(1)/usr/sbin
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/ospf6d/.libs/ospf6d $(1)/usr/sbin/
-endef
-
-define Package/frr-pbrd/install
-       $(INSTALL_DIR) $(1)/usr/sbin
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/pbrd/.libs/pbrd $(1)/usr/sbin/
-endef
-
-define Package/frr-pimd/install
-       $(INSTALL_DIR) $(1)/usr/sbin
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/pimd/.libs/pimd $(1)/usr/sbin/
-endef
-
-define Package/frr-ripd/install
-       $(INSTALL_DIR) $(1)/usr/sbin
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/ripd/.libs/ripd $(1)/usr/sbin/
-endef
-
-define Package/frr-ripngd/install
-       $(INSTALL_DIR) $(1)/usr/sbin
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/ripngd/.libs/ripngd $(1)/usr/sbin/
-endef
-
-define Package/frr-staticd/install
-       $(INSTALL_DIR) $(1)/usr/sbin
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/staticd/.libs/staticd $(1)/usr/sbin/
-endef
-
-define Package/frr-vrrpd/install
-       $(INSTALL_DIR) $(1)/usr/sbin
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/vrrpd/.libs/vrrpd $(1)/usr/sbin/
-endef
-
-define Package/frr-vtysh/install
-       $(INSTALL_DIR) $(1)/usr/bin
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/vtysh/.libs/vtysh $(1)/usr/bin/
-endef
-
 define Package/frr-libfrr/install
        $(INSTALL_DIR) $(1)/usr/lib
        $(CP) $(PKG_BUILD_DIR)/build/lib/.libs/libfrr.so* $(1)/usr/lib/
@@ -372,22 +216,23 @@ endef
 
 $(eval $(call HostBuild))
 $(eval $(call BuildPackage,frr))
-$(eval $(call BuildPackage,frr-babeld))
-$(eval $(call BuildPackage,frr-bfdd))
-$(eval $(call BuildPackage,frr-bgpd))
-$(eval $(call BuildPackage,frr-eigrpd))
-$(eval $(call BuildPackage,frr-fabricd))
-$(eval $(call BuildPackage,frr-isisd))
-$(eval $(call BuildPackage,frr-ldpd))
 $(eval $(call BuildPackage,frr-libfrr))
-$(eval $(call BuildPackage,frr-nhrpd))
-$(eval $(call BuildPackage,frr-ospfd))
-$(eval $(call BuildPackage,frr-ospf6d))
-$(eval $(call BuildPackage,frr-pbrd))
-$(eval $(call BuildPackage,frr-pimd))
-$(eval $(call BuildPackage,frr-ripd))
-$(eval $(call BuildPackage,frr-ripngd))
-$(eval $(call BuildPackage,frr-staticd))
-$(eval $(call BuildPackage,frr-vtysh))
 $(eval $(call BuildPackage,frr-watchfrr))
 $(eval $(call BuildPackage,frr-zebra))
+$(eval $(call BuildPackage,frr-vtysh))
+$(eval $(call BuildDaemon,babeld,))
+$(eval $(call BuildDaemon,bfdd,))
+$(eval $(call BuildDaemon,bgpd,))
+$(eval $(call BuildDaemon,eigrpd,))
+$(eval $(call BuildDaemon,fabricd,))
+$(eval $(call BuildDaemon,isisd,))
+$(eval $(call BuildDaemon,ldpd,))
+$(eval $(call BuildDaemon,nhrpd,+libcares))
+$(eval $(call BuildDaemon,ospfd,))
+$(eval $(call BuildDaemon,ospf6d,@IPV6))
+$(eval $(call BuildDaemon,pbrd,))
+$(eval $(call BuildDaemon,pimd,))
+$(eval $(call BuildDaemon,ripd,))
+$(eval $(call BuildDaemon,ripngd,@IPV6))
+$(eval $(call BuildDaemon,staticd,))
+$(eval $(call BuildDaemon,vrrpd,))
diff --git a/net/frr/patches/001-vti_interface_fix.patch b/net/frr/patches/001-vti_interface_fix.patch
new file mode 100644 (file)
index 0000000..e7b124b
--- /dev/null
@@ -0,0 +1,26 @@
+--- a/zebra/zebra_nhg.c        2019-10-18 01:59:17.582282539 +0300
++++ b/zebra/zebra_nhg.c        2019-10-18 02:00:17.501997253 +0300
+@@ -253,20 +253,9 @@
+       while (rn) {
+               route_unlock_node(rn);
+-              /* Lookup should halt if we've matched against ourselves ('top',
+-               * if specified) - i.e., we cannot have a nexthop NH1 is
+-               * resolved by a route NH1. The exception is if the route is a
+-               * host route.
+-               */
+-              if (top && rn == top)
+-                      if (((afi == AFI_IP) && (rn->p.prefixlen != 32))
+-                          || ((afi == AFI_IP6) && (rn->p.prefixlen != 128))) {
+-                              if (IS_ZEBRA_DEBUG_RIB_DETAILED)
+-                                      zlog_debug(
+-                                              "\t%s: Matched against ourself and prefix length is not max bit length",
+-                                              __PRETTY_FUNCTION__);
+-                              return 0;
+-                      }
++              /* If lookup self prefix return immediately. */
++              if (rn == top)
++                  return 0;
+               /* Pick up selected route. */
+               /* However, do not resolve over default route unless explicitly
diff --git a/net/frr/patches/002-bgp_clippy_typo.patch b/net/frr/patches/002-bgp_clippy_typo.patch
new file mode 100644 (file)
index 0000000..d581a5e
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/bgpd/bgp_bmp.c   2019-10-19 00:10:05.038017045 +0300
++++ b/bgpd/bgp_bmp.c   2019-10-19 00:10:46.661847536 +0300
+@@ -1762,7 +1762,7 @@
+ #define BMP_STR "BGP Monitoring Protocol\n"
+ #ifndef VTYSH_EXTRACT_PL
+-#include "bgp_bmp_clippy.c"
++#include "bgpd/bgp_bmp_clippy.c"
+ #endif
+ DEFPY_NOSH(bmp_targets_main,
diff --git a/net/frr/patches/003-corss_cares_fix.patch b/net/frr/patches/003-corss_cares_fix.patch
new file mode 100644 (file)
index 0000000..4beb70f
--- /dev/null
@@ -0,0 +1,53 @@
+From 2163a630eb737b9afe3277dccf44070ef55dea12 Mon Sep 17 00:00:00 2001
+From: Lucian Cristian <lucian.cristian@gmail.com>
+Date: Fri, 13 Sep 2019 07:12:34 +0300
+Subject: [PATCH] clippy: CARES fail only if !enable_clippy_only test for CARES
+ otherwise config will fail with conditional "CARES" not defined
+
+Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
+---
+ configure.ac | 14 ++++++++------
+ 1 file changed, 8 insertions(+), 6 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 6c1b35b5f2..9f37b3e9a9 100755
+--- a/configure.ac
++++ b/configure.ac
+@@ -1452,6 +1452,12 @@ if test "x$enable_pcreposix" = "xyes"; then
+ fi
+ AC_SUBST([HAVE_LIBPCREPOSIX])
++dnl ##########################################################################
++dnl test "${enable_clippy_only}" != "yes"
++fi
++dnl END OF LARGE if block
++dnl ##########################################################################
++
+ dnl ------------------
+ dnl check C-Ares library
+ dnl ------------------
+@@ -1462,12 +1468,6 @@ PKG_CHECK_MODULES([CARES], [libcares], [
+ ])
+ AM_CONDITIONAL([CARES], [$c_ares_found])
+-dnl ##########################################################################
+-dnl test "${enable_clippy_only}" != "yes"
+-fi
+-dnl END OF LARGE if block
+-dnl ##########################################################################
+-
+ dnl ----------------------------------------------------------------------------
+ dnl figure out if domainname is available in the utsname struct (GNU extension).
+@@ -1535,9 +1535,11 @@ case "$host_os" in
+       no)
+         ;;
+       yes)
++      if test "${enable_clippy_only}" != "yes"; then
+         if test "$c_ares_found" != "true" ; then
+           AC_MSG_ERROR([nhrpd requires libcares.  Please install c-ares and its -dev headers.])
+         fi
++      fi
+         NHRPD="nhrpd"
+         ;;
+       *)
diff --git a/net/frr/patches/004-cross_libcap_fix.patch b/net/frr/patches/004-cross_libcap_fix.patch
new file mode 100644 (file)
index 0000000..58e6bc8
--- /dev/null
@@ -0,0 +1,27 @@
+From 2cd3abe419dab2ee32227c0870f96f805d870fe6 Mon Sep 17 00:00:00 2001
+From: Lucian Cristian <lucian.cristian@gmail.com>
+Date: Fri, 13 Sep 2019 07:16:18 +0300
+Subject: [PATCH] clippy: fail libcap test only when !enable_clippy_only when
+ building native clippy we don't need libcap
+
+Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
+---
+ configure.ac | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index 9f37b3e9a9..be3a9c763d 100755
+--- a/configure.ac
++++ b/configure.ac
+@@ -2043,9 +2043,11 @@ if test "${enable_capabilities}" != "no"; then
+   case "$host_os" in
+   linux*)
++    if test "${enable_clippy_only}" != "yes"; then
+     if test "$frr_ac_lcaps" != "yes"; then
+       AC_MSG_ERROR([libcap and/or its headers were not found.  Running FRR without libcap support built in causes a huge performance penalty.])
+     fi
++    fi
+     ;;
+   esac
+ else
diff --git a/net/frr/patches/005-fix_OSPF_BFD.patch b/net/frr/patches/005-fix_OSPF_BFD.patch
new file mode 100644 (file)
index 0000000..fb19bec
--- /dev/null
@@ -0,0 +1,71 @@
+From eb3e472904e30f35825f08319608217082d4af21 Mon Sep 17 00:00:00 2001
+From: Radhika Mahankali <radhika@cumulusnetworks.com>
+Date: Mon, 9 Apr 2018 15:30:32 -0700
+Subject: [PATCH] ospf: BFD down not tearing down OSPF adjacency for
+ point-to-point network
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Root Cause:
+Lookup for the point-to-point neighbor was failing because the neighbor
+lookup was based on neighbor interface IP address. But, for point-to-point
+neighbor the key is router-id for lookup. Lookup failure was causing the
+BFD updates from PTM to get dropped.
+
+Fix:
+Added walk of the neighbor list if the network type is point-to-point to
+find the appropriate neighbor. The match is based on source IP address of
+the neighbor since that’s the address registered with BFD for monitoring.
+
+Ticket: CM-20411
+Signed-off-by: Radhika Mahankali <radhika@cumulusnetworks.com>
+---
+ ospfd/ospf_bfd.c | 26 ++++++++++++++++++++++++--
+ 1 file changed, 24 insertions(+), 2 deletions(-)
+
+diff --git a/ospfd/ospf_bfd.c b/ospfd/ospf_bfd.c
+index a17975270a..05ec4991e5 100644
+--- a/ospfd/ospf_bfd.c
++++ b/ospfd/ospf_bfd.c
+@@ -202,8 +202,9 @@ static int ospf_bfd_interface_dest_update(ZAPI_CALLBACK_ARGS)
+       struct interface *ifp;
+       struct ospf_interface *oi;
+       struct ospf_if_params *params;
+-      struct ospf_neighbor *nbr;
++      struct ospf_neighbor *nbr = NULL;
+       struct route_node *node;
++      struct route_node *n_node;
+       struct prefix p;
+       int status;
+       int old_status;
+@@ -231,7 +232,28 @@ static int ospf_bfd_interface_dest_update(ZAPI_CALLBACK_ARGS)
+               if ((oi = node->info) == NULL)
+                       continue;
+-              nbr = ospf_nbr_lookup_by_addr(oi->nbrs, &p.u.prefix4);
++              /* walk the neighbor list for point-to-point network */
++              if (oi->type == OSPF_IFTYPE_POINTOPOINT) {
++                      for (n_node = route_top(oi->nbrs); n_node;
++                              n_node = route_next(n_node)) {
++                              nbr = n_node->info;
++                              if (nbr) {
++                                      /* skip myself */
++                                      if (nbr == oi->nbr_self) {
++                                              nbr = NULL;
++                                              continue;
++                                      }
++
++                                      /* Found the matching neighbor */
++                                      if (nbr->src.s_addr ==
++                                              p.u.prefix4.s_addr)
++                                              break;
++                              }
++                      }
++              } else {
++                      nbr = ospf_nbr_lookup_by_addr(oi->nbrs, &p.u.prefix4);
++              }
++
+               if (!nbr || !nbr->bfd_info)
+                       continue;
index caef70b9ad4fc88bfddbaa891675ebe524205eb8..58604a2a5cc25a6952cf7fe74f079213beaf93ed 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=go-ethereum
-PKG_VERSION:=1.9.1
-PKG_RELEASE:=2
+PKG_VERSION:=1.9.6
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/ethereum/go-ethereum/tar.gz/v${PKG_VERSION}?
-PKG_HASH:=7394ae0eeac4b2aafa4bd56eef18c077088770bbce0962b215607b44369a5430
+PKG_HASH:=3000f787735ee302088d17d406eafc2ec26eaffc083d876b2fa07ec7dfbb94f9
 
 PKG_MAINTAINER:=Mislav Novakovic <mislav.novakovic@sartura.hr>
 PKG_LICENSE:=GPL-3.0-or-later LGPL-3.0-or-later
index f67f1022d3c3d7a197ae8286f53cede2b33f2f60..5aac0c43adb032ec47c832ef1d8479049f7feff9 100644 (file)
@@ -9,20 +9,17 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mii-tool
-PKG_VERSION=2016-10-06-$(PKG_SOURCE_VERSION)
-PKG_RELEASE:=2
-
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=git://git.code.sf.net/p/net-tools/code
+PKG_SOURCE_DATE:=2016-10-06
 PKG_SOURCE_VERSION:=115f1af2494ded1fcd21c8419d5e289bc4df380f
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_MIRROR_HASH:=b67157e2912dd210b3e3184b358db6759177a1d8ed6916763e5a629f154f9d7a
+PKG_RELEASE:=3
 
-PKG_LICENSE:=GPL-2.0
-PKG_LICENSE_FILES:=COPYING
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://git.code.sf.net/p/net-tools/code
+PKG_MIRROR_HASH:=43d9d042ffe2db784256de5df8e77d688f0808f2b890351a21b902c798fa6310
 
 PKG_MAINTAINER:=Stijn Segers <borromini.reg@protonmail.com>
+PKG_LICENSE:=GPL-2.0-or-later
+PKG_LICENSE_FILES:=COPYING
 
 include $(INCLUDE_DIR)/package.mk
 
index 974d4be13292f1db07c53574bb60b0544cb831a3..b42cd8dee98c62c2680acacd7af022ebad00222a 100644 (file)
@@ -13,12 +13,12 @@ include $(TOPDIR)/rules.mk
 # - check if default mode has changed from being tcp_only
 #
 PKG_NAME:=shadowsocks-libev
-PKG_VERSION:=3.3.2
+PKG_VERSION:=3.3.3
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/shadowsocks/shadowsocks-libev/releases/download/v$(PKG_VERSION)
-PKG_HASH:=ce900a44245fa52cb871eb08278a8b857b6d4074bf7cf3ebf698b0aee0c54764
+PKG_HASH:=677356a5ed6b5ae9e32a898061db2587158ff27e245db03f4bde9b006ef12dc9
 
 PKG_MAINTAINER:=Yousong Zhou <yszhou4tech@gmail.com>
 
index f301f89b67b4ed87833630b4a4adaa38622c944c..eae0c04315526a49714a105f936bcc958a4adb6b 100644 (file)
@@ -8,21 +8,19 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mpg123
-PKG_VERSION:=1.25.10
+PKG_VERSION:=1.25.13
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=@SF/mpg123
-PKG_HASH:=6c1337aee2e4bf993299851c70b7db11faec785303cfca3a5c3eb5f329ba7023
-PKG_MAINTAINER:=Zoltan HERPAI <wigyori@uid0.hu>
-
-PKG_FIXUP:=libtool
+PKG_HASH:=90306848359c793fd43b9906e52201df18775742dc3c81c06ab67a806509890a
 
-PKG_LICENSE:=LGPL-2.1 GPL-2.0
+PKG_MAINTAINER:=Zoltan HERPAI <wigyori@uid0.hu>
 PKG_LICENSE_FILES:=COPYING
 PKG_CPE_ID:=cpe:/a:mpg123:mpg123
 
 PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -35,6 +33,7 @@ define Package/libmpg123
   SECTION:=libs
   CATEGORY:=Libraries
   TITLE:=fast console mpeg audio decoder library
+  LICENSE:=LGPL-2.1-or-later
   DEPENDS:=+libltdl
 endef
 
@@ -43,6 +42,7 @@ define Package/libout123
   SECTION:=libs
   CATEGORY:=Libraries
   TITLE:=Library for continuous playback of audio streams via various platform-specific output methods
+  LICENSE:=LGPL-2.1-or-later
   DEPENDS:=+libltdl
 endef
 
@@ -51,6 +51,7 @@ define Package/mpg123
   SECTION:=sound
   CATEGORY:=Sound
   TITLE:=fast console mpeg audio player
+  LICENSE:=GPL-2.0-or-later
   DEPENDS+=+libmpg123 +alsa-lib +libout123
 endef
 
index fe32722964bd8ae926ec4fd3d22d4610a8cc7be9..eede75b16836c7df5c9358808ad31e59cbf8929d 100644 (file)
@@ -10,7 +10,7 @@ config PACKAGE_UPMPDCLI_SC_WEB_INTERFACE
        bool "SongCast web server and associated files (depends on python)"
        default no
        depends on PACKAGE_upmpdcli
-       select PACKAGE_python
+       select PACKAGE_python3
        select PACKAGE_UPMPDCLI_SCCTL
        help
                Installs the SongCast web interface and web server. See the following
index 3d1a614a0e00607bdf985d087edbe98fad231e12..3102f098dd3d7cdef04cdadf43f96a7bc54f9264 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=upmpdcli
 PKG_VERSION:=1.4.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://www.lesbonscomptes.com/upmpdcli/downloads
index 7c9b32228fe46b8b3d6c49fcd939ba6ab4dafcd5..97f9c51d83c3808a641c560e7c0f1d5ad3428f33 100644 (file)
@@ -8,17 +8,21 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=acpid
-PKG_VERSION:=2.0.30
+PKG_VERSION:=2.0.32
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@SF/acpid2
-PKG_HASH:=28b77b62d3f64ebd1c2a3d16bccc6d4333b4e24a86aeacebec255fad223cf4cb
+PKG_HASH:=f2d2d30b3edc3234bd82f6f7186699a6aa3c85c8d20bc4e30e9b3c68a1ed157e
+
 PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>
-PKG_LICENSE:=GPL-2.0
+PKG_LICENSE:=GPL-2.0-or-later
 PKG_LICENSE_FILES:=COPYING
 PKG_CPE_ID:=cpe:/a:tedfelix:acpid
 
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
+
 include $(INCLUDE_DIR)/package.mk
 
 define Package/acpid
@@ -33,18 +37,15 @@ define Package/acpid/description
   The ACPI Daemon (acpid) With Netlink Support
 endef
 
-define Build/Compile
-       $(MAKE) -C $(PKG_BUILD_DIR) \
-               CC="$(TARGET_CC)" \
-               LD="$(TARGET_CC)" \
-               LDFLAGS="$(TARGET_LDFLAGS)" \
-               all
-endef
+TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto
+TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
 
 define Package/acpid/install
        $(INSTALL_DIR) $(1)/usr/sbin
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/acpid $(1)/usr/sbin/
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/acpi_listen $(1)/usr/sbin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/acpid $(1)/usr/sbin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kacpimon $(1)/usr/sbin/
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/acpi_listen $(1)/usr/sbin/
        $(INSTALL_DIR) $(1)/etc/acpi/events
        $(INSTALL_CONF) ./files/default $(1)/etc/acpi/events/default
        $(INSTALL_DIR) $(1)/etc/init.d
index 6ba1903b6815cddfc16ad6566d7ed688575e632d..860a8d24db2c4ae7757b711965864140d1c1f86b 100644 (file)
@@ -7,12 +7,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ap51-flash
-PKG_VERSION:=2019.0
-PKG_RELEASE:=2
+PKG_VERSION:=2019.0.1
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/ap51-flash/ap51-flash/releases/download/v$(PKG_VERSION)
-PKG_HASH:=e7992b2151721cc6f5db91f443ad7fc83cb5604c08cd11fca3e78ecd6b538e57
+PKG_HASH:=7146a22576a23bfe36673980bc3795a97417692eaddb2f90b527074a7d7e42d5
+
 PKG_MAINTAINER:=Russell Senior <russell@personaltelco.net>
 PKG_LICENSE:=GPL-3.0-or-later CC0-1.0
 PKG_LICENSE_FILES:=LICENSES/GPL-3.0-or-later.txt LICENSES/CC0-1.0.txt
@@ -31,6 +32,9 @@ MAKE_FLAGS += \
        REVISION="$(PKG_VERSION)" \
        ap51-flash
 
+TARGET_CFLAGS += -flto
+TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
+
 define Package/ap51-flash/install
        $(INSTALL_DIR) $(1)/etc/config $(1)/etc/init.d $(1)/usr/sbin \
                $(1)/usr/lib/ap51-flash
index 2bd05c9d122890cd9a0131b8270921440c090b1a..3846bbc00c0733f782d402ffbcfbb021a7092a80 100644 (file)
@@ -6,12 +6,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=btrfs-progs
-PKG_VERSION:=5.3
+PKG_VERSION:=5.3.1
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@KERNEL/linux/kernel/people/kdave/btrfs-progs
-PKG_HASH:=1763ec7d102632663ac497739bfbab332bebb9fac70bd8718c131f6156583b8e
+PKG_HASH:=bfa31ae60e54a068fd24e075a90b72f89b8e9006659273fbcecc2e1c790cda38
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-v$(PKG_VERSION)
 
 PKG_MAINTAINER:=Karel Kočí <karel.koci@nic.cz>
index fc13e36a9779894d39d021ad0a42a3735f184f15..6c57bd216a0729a03c62d13d970336c2639bdae2 100644 (file)
@@ -5,20 +5,19 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gawk
-PKG_VERSION:=5.0.0
+PKG_VERSION:=5.0.1
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@GNU/gawk
+PKG_HASH:=8e4e86f04ed789648b66f757329743a0d6dfb5294c3b91b756a474f1ce05a794
 
-PKG_HASH:=50f091ed0eb485ad87dbb620d773a3e2c31a27f75f5e008f7bf065055f024406
-
-PKG_LICENSE:=GPL
-PKG_LICENSE_FILES:=COPYING
 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
+PKG_LICENSE:=GPL-3.0-or-later
+PKG_LICENSE_FILES:=COPYING
 
-PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
index 93119305d8ba71ae1c5bd10b0356f8c0c5aa828f..17ee91d5742079a00ec181d50b4ec01efd04cce8 100644 (file)
@@ -8,21 +8,20 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=screen
-PKG_VERSION:=4.6.2
-PKG_RELEASE:=3
+PKG_VERSION:=4.7.0
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@GNU/screen
-PKG_HASH:=1b6922520e6a0ce5e28768d620b0f640a6631397f95ccb043b70b91bb503fa3a
+PKG_HASH:=da775328fa783bd2a787d722014dbd99c6093effc11f337827604c2efc5d20c1
 
 PKG_MAINTAINER:=Etienne CHAMPETIER <champetier.etienne@gmail.com>
 PKG_LICENSE:=GPL-3.0-or-later
 PKG_LICENSE_FILES:=COPYING
 PKG_CPE_ID:=cpe:/a:gnu:screen
 
-PKG_FIXUP:=autoreconf
-PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
diff --git a/utils/screen/patches/010-fix-configure-failed-while-build-dir-name-contains-y.patch b/utils/screen/patches/010-fix-configure-failed-while-build-dir-name-contains-y.patch
deleted file mode 100644 (file)
index ede6de9..0000000
+++ /dev/null
@@ -1,128 +0,0 @@
-From 8c2b4061d16756ee2ed37f08db063b8215656943 Mon Sep 17 00:00:00 2001
-From: Hongxu Jia <hongxu.jia@windriver.com>
-Date: Thu, 2 Nov 2017 16:48:15 +0800
-Subject: [PATCH] fix configure failed while build dir name contains "yes"
-
-While build dir name contained "yes", and compiled with
-producing debugging information (-g), the configure failed.
-
-The pattern of AC_EGREP_CPP (string "yes") mismatched with
-dir name. It caused the test of AC_EGREP_CPP incorrect.
-
-Use YES_IS_DEFINED to replace yes which is not often used
-as dir name.
-
-Bug: 52329
-(Fix release v.4.6.2 or above)
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- configure.ac | 32 ++++++++++++++++----------------
- 1 file changed, 16 insertions(+), 16 deletions(-)
-
-diff --git a/src/configure.ac b/src/configure.ac
-index 28237f5..34f9735 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -151,9 +151,9 @@ fi
- AC_CHECKING(for Ultrix)
--AC_EGREP_CPP(yes,
-+AC_EGREP_CPP(YES_IS_DEFINED,
- [#if defined(ultrix) || defined(__ultrix)
--   yes;
-+   YES_IS_DEFINED;
- #endif
- ], ULTRIX=1)
-@@ -168,9 +168,9 @@ dnl ghazi@caip.rutgers.edu (Kaveh R. Ghazi):
- dnl BBN butterfly is not POSIX, but a MACH BSD system.
- dnl Do not define POSIX and TERMIO.
- AC_CHECKING(for butterfly)
--AC_EGREP_CPP(yes,
-+AC_EGREP_CPP(YES_IS_DEFINED,
- [#if defined(butterfly)
--  yes;
-+  YES_IS_DEFINED;
- #endif
- ], butterfly=1)
-@@ -179,12 +179,12 @@ if test -n "$ULTRIX"; then
-   test -z "$GCC" && CC="$CC -YBSD"
- fi
- AC_CHECKING(for POSIX.1)
--AC_EGREP_CPP(yes,
-+AC_EGREP_CPP(YES_IS_DEFINED,
- [#include <sys/types.h>
- #include <unistd.h>
- main () {
- #ifdef _POSIX_VERSION
--  yes;
-+  YES_IS_DEFINED;
- #endif
- ], AC_NOTE(- you have a POSIX system) AC_DEFINE(POSIX) posix=1)
- fi
-@@ -196,9 +196,9 @@ AC_TRY_COMPILE(
- #include <fcntl.h>], [int x = SIGCHLD | FNDELAY;], , AC_DEFINE(SYSV))
- AC_CHECKING(for sequent/ptx)
--AC_EGREP_CPP(yes,
-+AC_EGREP_CPP(YES_IS_DEFINED,
- [#ifdef _SEQUENT_
--  yes;
-+  YES_IS_DEFINED;
- #endif
- ], LIBS="$LIBS -lsocket -linet";seqptx=1)
-@@ -213,9 +213,9 @@ AC_TRY_LINK([#include <utmpx.h>
- AC_CHECK_HEADERS([stropts.h string.h strings.h])
- AC_CHECKING(for Solaris 2.x)
--AC_EGREP_CPP(yes,
-+AC_EGREP_CPP(YES_IS_DEFINED,
- [#if defined(SVR4) && defined(sun)
--  yes
-+  YES_IS_DEFINED;
- #endif
- ], LIBS="$LIBS -lsocket -lnsl -lkstat")
-@@ -699,9 +699,9 @@ else
- pdir='/dev'
- fi
- dnl SCO uses ptyp%d
--AC_EGREP_CPP(yes,
-+AC_EGREP_CPP(YES_IS_DEFINED,
- [#ifdef M_UNIX
--   yes;
-+   YES_IS_DEFINED;
- #endif
- ], ptys=`echo /dev/ptyp??`, ptys=`echo $pdir/pty??`)
- dnl if test -c /dev/ptyp19; then
-@@ -878,9 +878,9 @@ fi
- )
- if test -z "$load" ; then
--AC_EGREP_CPP(yes,
-+AC_EGREP_CPP(YES_IS_DEFINED,
- [#if defined(NeXT) || defined(apollo) || defined(linux)
--  yes;
-+  YES_IS_DEFINED;
- #endif
- ], load=1)
- fi
-@@ -1105,9 +1105,9 @@ AC_CHECKING(syslog in libbsd.a)
- AC_TRY_LINK(, [closelog();], AC_NOTE(- found.), [LIBS="$oldlibs"
- AC_NOTE(- bad news: syslog missing.) AC_DEFINE(NOSYSLOG)])])
--AC_EGREP_CPP(yes,
-+AC_EGREP_CPP(YES_IS_DEFINED,
- [#ifdef M_UNIX
--   yes;
-+   YES_IS_DEFINED;
- #endif
- ], LIBS="$LIBS -lsocket -lcrypt_i")
--- 
-2.17.1
-
diff --git a/utils/screen/patches/020-fix-configure-option-disable-use-locale-is-not-worki.patch b/utils/screen/patches/020-fix-configure-option-disable-use-locale-is-not-worki.patch
deleted file mode 100644 (file)
index 95ba880..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-From 5c3643fb701cc380ceb02116526ef4f5885295d0 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Amadeusz=20S=C5=82awi=C5=84ski?= <amade@asmblr.net>
-Date: Sat, 16 Dec 2017 15:09:57 +0100
-Subject: [PATCH] fix: configure option "--disable-use-locale" is not working
-
-Bug: 52663
----
- acconfig.h   | 2 +-
- configure.ac | 6 +++++-
- 2 files changed, 6 insertions(+), 2 deletions(-)
-
-diff --git a/src/acconfig.h b/src/acconfig.h
-index 4e5cda0..6ff2d32 100644
---- a/acconfig.h
-+++ b/acconfig.h
-@@ -274,7 +274,7 @@
-  * Define USE_LOCALE if you want screen to use the locale names
-  * for the name of the month and day of the week.
-  */
--#define USE_LOCALE
-+#undef USE_LOCALE
- /*
-  * Define USE_PAM if your system supports PAM (Pluggable Authentication
-diff --git a/src/configure.ac b/src/configure.ac
-index 34f9735..d1bc42c 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1246,7 +1246,11 @@ if test "$enable_pam" = "yes"; then
-        AC_MSG_RESULT(no);LIBS="$oldlibs")
- fi
--AC_ARG_ENABLE(use_locale, [  --enable-use-locale         use localized month/day names])
-+AC_ARG_ENABLE(use-locale,
-+    [  --enable-use-locale     use localized month/day names (default: yes)],
-+    [],
-+    [enable_use_locale=yes]
-+)
- if test "$enable_use_locale" = "yes"; then
-   AC_DEFINE(USE_LOCALE)
- fi
--- 
-2.17.1
-
diff --git a/utils/screen/patches/030-PATCH-1-4-Remove-redundant-compiler-sanity-checks.patch b/utils/screen/patches/030-PATCH-1-4-Remove-redundant-compiler-sanity-checks.patch
deleted file mode 100644 (file)
index 3e04e1b..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-From 6b320186db7df1e58fdd2c836af54c86cc596981 Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Sat, 24 Feb 2018 15:09:10 +0100
-Subject: [PATCH] [PATCH 1/4] Remove redundant compiler sanity checks
-
-AC_PROG_CC already performs sanity checks. And unlike the removed
-checks, it does so in a way that supports cross compilation.
-
-Modified from patch by Maarten ter Huurne.
-
-Upstream-Status: Submitted [http://savannah.gnu.org/bugs/?43223]
-
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
----
- configure.ac | 27 ---------------------------
- 1 file changed, 27 deletions(-)
-
-diff --git a/src/configure.ac b/src/configure.ac
-index d1bc42c..a8208ea 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -48,31 +48,6 @@ AC_PROG_GCC_TRADITIONAL
- AC_ISC_POSIX
- AC_USE_SYSTEM_EXTENSIONS
--AC_TRY_RUN(main(){exit(0);},,[
--if test $CC != cc ; then
--AC_NOTE(Your $CC failed - restarting with CC=cc)
--AC_NOTE()
--CC=cc
--export CC
--exec $0 $configure_args
--fi
--])
--
--AC_TRY_RUN(main(){exit(0);},,
--exec 5>&2
--eval $ac_link
--AC_NOTE(CC=$CC; CFLAGS=$CFLAGS; LIBS=$LIBS;)
--AC_NOTE($ac_compile)
--AC_MSG_ERROR(Can't run the compiler - sorry))
--
--AC_TRY_RUN([
--main()
--{
--  int __something_strange_();
--  __something_strange_(0);
--}
--],AC_MSG_ERROR(Your compiler does not set the exit status - sorry))
--
- AC_PROG_AWK
- AC_PROG_INSTALL
-@@ -1278,8 +1253,6 @@ fi
- dnl Ptx bug workaround -- insert -lc after -ltermcap
- test -n "$seqptx" && LIBS="-ltermcap -lc -lsocket -linet -lnsl -lsec -lseq"
--AC_TRY_RUN(main(){exit(0);},,AC_MSG_ERROR(Can't run the compiler - internal error. Sorry.))
--
- ETCSCREENRC=
- AC_MSG_CHECKING(for the global screenrc file)
- AC_ARG_WITH(sys-screenrc, [  --with-sys-screenrc=path to the global screenrc file], [ ETCSCREENRC="${withval}" ])
--- 
-2.17.1
-
diff --git a/utils/screen/patches/040-PATCH-2-4-Provide-cross-compile-alternatives-for-AC_.patch b/utils/screen/patches/040-PATCH-2-4-Provide-cross-compile-alternatives-for-AC_.patch
deleted file mode 100644 (file)
index 9e573a0..0000000
+++ /dev/null
@@ -1,137 +0,0 @@
-From abba47ce4206506c49858d944e904fff86ae65cc Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Sat, 24 Feb 2018 15:14:48 +0100
-Subject: [PATCH] [PATCH 2/4] Provide cross compile alternatives for AC_TRY_RUN
-
-Modified from patch by Maarten ter Huurne.
-
-Upstream-Status: Submitted [http://savannah.gnu.org/bugs/?43223]
-
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
----
- configure.ac | 32 ++++++++++++++++++++------------
- 1 file changed, 20 insertions(+), 12 deletions(-)
-
-diff --git a/src/configure.ac b/src/configure.ac
-index a8208ea..74be368 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -348,7 +348,8 @@ main()
-   exit(0);
- }
- ], AC_NOTE(- your fifos are usable) fifo=1,
--AC_NOTE(- your fifos are not usable))
-+AC_NOTE(- your fifos are not usable),
-+AC_NOTE(- skipping check because we are cross compiling; assuming fifos are usable) fifo=1)
- rm -f /tmp/conftest*
- if test -n "$fifo"; then
-@@ -396,7 +397,8 @@ main()
-   exit(0);
- }
- ], AC_NOTE(- your implementation is ok), 
--AC_NOTE(- you have a broken implementation) AC_DEFINE(BROKEN_PIPE) fifobr=1)
-+AC_NOTE(- you have a broken implementation) AC_DEFINE(BROKEN_PIPE) fifobr=1,
-+AC_NOTE(- skipping check because we are cross compiling; assuming fifo implementation is ok))
- rm -f /tmp/conftest*
- fi
-@@ -458,7 +460,8 @@ main()
-   exit(0);
- }
- ], AC_NOTE(- your sockets are usable) sock=1,
--AC_NOTE(- your sockets are not usable))
-+AC_NOTE(- your sockets are not usable),
-+AC_NOTE(- skipping check because we are cross compiling; assuming sockets are usable) sock=1)
- rm -f /tmp/conftest*
- if test -n "$sock"; then
-@@ -497,7 +500,8 @@ main()
- }
- ],AC_NOTE(- you are normal),
- AC_NOTE(- unix domain sockets are not kept in the filesystem)
--AC_DEFINE(SOCK_NOT_IN_FS) socknofs=1)
-+AC_DEFINE(SOCK_NOT_IN_FS) socknofs=1,
-+AC_NOTE(- skipping check because we are cross compiling; assuming sockets are normal))
- rm -f /tmp/conftest*
- fi
-@@ -598,7 +602,8 @@ main()
-   exit(0);
- }
- ],AC_NOTE(- select is ok),
--AC_NOTE(- select can't count) AC_DEFINE(SELECT_BROKEN))
-+AC_NOTE(- select can't count) AC_DEFINE(SELECT_BROKEN),
-+AC_NOTE(- skipping check because we are cross compiling; assuming select is ok))
- dnl
- dnl    ****  termcap or terminfo  ****
-@@ -640,7 +645,8 @@ main()
- {
-  exit(strcmp(tgoto("%p1%d", 0, 1), "1") ? 0 : 1);
- }], AC_NOTE(- you use the termcap database),
--AC_NOTE(- you use the terminfo database) AC_DEFINE(TERMINFO))
-+AC_NOTE(- you use the terminfo database) AC_DEFINE(TERMINFO),
-+AC_NOTE(- skipping check because we are cross compiling; assuming terminfo database is used) AC_DEFINE(TERMINFO))
- AC_CHECKING(ospeed)
- AC_TRY_LINK(extern short ospeed;,ospeed=5;,,AC_DEFINE(NEED_OSPEED))
-@@ -775,7 +781,8 @@ main()
-     else
-       AC_NOTE(- can't determine - assume ptys are world accessable)
-     fi
--  ]
-+  ],
-+  AC_NOTE(- skipping check because we are cross compiling; assuming ptys are world accessable)
- )
- rm -f conftest_grp
- fi
-@@ -859,7 +866,7 @@ AC_EGREP_CPP(YES_IS_DEFINED,
- #endif
- ], load=1)
- fi
--if test -z "$load" ; then
-+if test -z "$load" && test "$cross_compiling" = no ; then
- AC_CHECKING(for kernelfile)
- for core in /unix /vmunix /dynix /hp-ux /xelos /dev/ksyms /kernel/unix /kernel/genunix /unicos /mach /netbsd /386bsd /dgux /bsd /stand/vmunix; do
-   if test -f $core || test -c $core; then
-@@ -1052,7 +1059,7 @@ main()
- #endif
-   exit(0);
- }
--],,AC_DEFINE(SYSVSIGS))
-+],,AC_DEFINE(SYSVSIGS),:)
- fi
-@@ -1132,7 +1139,7 @@ main() {
-   if (strncmp(buf, "cdedef", 6))
-     exit(1);
-   exit(0); /* libc version works properly.  */
--}], AC_DEFINE(USEBCOPY))
-+}], AC_DEFINE(USEBCOPY),,:)
- AC_TRY_RUN([
- #define bcopy(s,d,l) memmove(d,s,l)
-@@ -1147,7 +1154,8 @@ main() {
-   if (strncmp(buf, "cdedef", 6))
-     exit(1);
-   exit(0); /* libc version works properly.  */
--}], AC_DEFINE(USEMEMMOVE))
-+}], AC_DEFINE(USEMEMMOVE),,
-+  AC_NOTE(- skipping check because we are cross compiling; use memmove) AC_DEFINE(USEMEMMOVE))
- AC_TRY_RUN([
-@@ -1163,7 +1171,7 @@ main() {
-   if (strncmp(buf, "cdedef", 6))
-     exit(1);
-   exit(0); /* libc version works properly.  */
--}], AC_DEFINE(USEMEMCPY))
-+}], AC_DEFINE(USEMEMCPY),,:)
- AC_SYS_LONG_FILE_NAMES
--- 
-2.17.1
-
diff --git a/utils/screen/patches/050-PATCH-3-4-Skip-host-file-system-checks-when-cross-co.patch b/utils/screen/patches/050-PATCH-3-4-Skip-host-file-system-checks-when-cross-co.patch
deleted file mode 100644 (file)
index fc9a91e..0000000
+++ /dev/null
@@ -1,135 +0,0 @@
-From c573b89139e7a068f5573abd565605bed60f293f Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Sat, 24 Feb 2018 15:18:33 +0100
-Subject: [PATCH] [PATCH 3/4] Skip host file system checks when cross-compiling
-
-Modified from patch by Maarten ter Huurne.
-
-Upstream-Status: Submitted [http://savannah.gnu.org/bugs/?43223]
-
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
----
- configure.ac | 23 +++++++++++++++++++----
- 1 file changed, 19 insertions(+), 4 deletions(-)
-
-diff --git a/src/configure.ac b/src/configure.ac
-index 74be368..bd748d9 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -85,7 +85,7 @@ AC_ARG_ENABLE(socket-dir,
- dnl
- dnl    ****  special unix variants  ****
- dnl
--if test -n "$ISC"; then
-+if test "$cross_compiling" = no && test -n "$ISC" ; then
-   AC_DEFINE(ISC) LIBS="$LIBS -linet"
- fi
-@@ -96,10 +96,11 @@ dnl AC_DEFINE(OSF1)        # this disables MIPS again....
- dnl fi
- dnl fi
--if test -f /sysV68 ; then
-+if test "$cross_compiling" = no && test -f /sysV68 ; then
- AC_DEFINE(sysV68)
- fi
-+if test "$cross_compiling" = no ; then
- AC_CHECKING(for MIPS)
- if test -f /lib/libmld.a || test -f /usr/lib/libmld.a || test -f /usr/lib/cmplrs/cc/libmld.a; then
- oldlibs="$LIBS"
-@@ -123,6 +124,7 @@ AC_DEFINE(USE_WAIT2) LIBS="$LIBS -lbsd" ; CC="$CC -I/usr/include/bsd"
- ))
- fi
- fi
-+fi
- AC_CHECKING(for Ultrix)
-@@ -132,7 +134,7 @@ AC_EGREP_CPP(YES_IS_DEFINED,
- #endif
- ], ULTRIX=1)
--if test -f /usr/lib/libpyr.a ; then
-+if test "$cross_compiling" = no && test -f /usr/lib/libpyr.a ; then
- oldlibs="$LIBS"
- LIBS="$LIBS -lpyr"
- AC_CHECKING(Pyramid OSX)
-@@ -653,17 +655,21 @@ AC_TRY_LINK(extern short ospeed;,ospeed=5;,,AC_DEFINE(NEED_OSPEED))
- dnl
- dnl    ****  PTY specific things  ****
- dnl
-+if test "$cross_compiling" = no ; then
- AC_CHECKING(for /dev/ptc)
- if test -r /dev/ptc; then
- AC_DEFINE(HAVE_DEV_PTC)
- fi
-+fi
-+if test "$cross_compiling" = no ; then
- AC_CHECKING(for SVR4 ptys)
- sysvr4ptys=
- if test -c /dev/ptmx ; then
- AC_TRY_LINK([],[ptsname(0);grantpt(0);unlockpt(0);],[AC_DEFINE(HAVE_SVR4_PTYS)
- sysvr4ptys=1])
- fi
-+fi
- AC_CHECK_FUNCS(getpt)
-@@ -673,6 +679,7 @@ AC_CHECK_FUNCS(openpty,,
- [AC_CHECK_LIB(util,openpty, [AC_DEFINE(HAVE_OPENPTY)] [LIBS="$LIBS -lutil"])])
- fi
-+if test "$cross_compiling" = no ; then
- AC_CHECKING(for ptyranges)
- if test -d /dev/ptym ; then
- pdir='/dev/ptym'
-@@ -696,6 +703,7 @@ p1=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\)$/\1/g'  | sort -u | tr -d '\
- AC_DEFINE_UNQUOTED(PTYRANGE0,"$p0")
- AC_DEFINE_UNQUOTED(PTYRANGE1,"$p1")
- fi
-+fi
- dnl    ****  pty mode/group handling ****
- dnl
-@@ -843,14 +851,16 @@ fi
- dnl
- dnl    ****  loadav  ****
- dnl
-+if test "$cross_compiling" = no ; then
- AC_CHECKING(for libutil(s))
- test -f /usr/lib/libutils.a && LIBS="$LIBS -lutils"
- test -f /usr/lib/libutil.a && LIBS="$LIBS -lutil"
-+fi
- AC_CHECKING(getloadavg)
- AC_TRY_LINK(,[getloadavg((double *)0, 0);],
- AC_DEFINE(LOADAV_GETLOADAVG) load=1,
--if test -f /usr/lib/libkvm.a ; then
-+if test "$cross_compiling" = no && test -f /usr/lib/libkvm.a ; then
- olibs="$LIBS"
- LIBS="$LIBS -lkvm"
- AC_CHECKING(getloadavg with -lkvm)
-@@ -1068,13 +1078,18 @@ dnl    ****  libraries  ****
- dnl
- AC_CHECKING(for crypt and sec libraries)
-+if test "$cross_compiling" = no ; then
- test -f /lib/libcrypt_d.a || test -f /usr/lib/libcrypt_d.a && LIBS="$LIBS -lcrypt_d"
-+fi
- oldlibs="$LIBS"
- LIBS="$LIBS -lcrypt"
- AC_CHECKING(crypt)
- AC_TRY_LINK(,,,LIBS="$oldlibs")
-+if test "$cross_compiling" = no ; then
- test -f /lib/libsec.a || test -f /usr/lib/libsec.a && LIBS="$LIBS -lsec"
- test -f /lib/libshadow.a || test -f /usr/lib/libshadow.a && LIBS="$LIBS -lshadow"
-+fi
-+
- oldlibs="$LIBS"
- LIBS="$LIBS -lsun"
- AC_CHECKING(IRIX sun library)
--- 
-2.17.1
-
diff --git a/utils/screen/patches/060-PATCH-4-4-Avoid-mis-identifying-systems-as-SVR4.patch b/utils/screen/patches/060-PATCH-4-4-Avoid-mis-identifying-systems-as-SVR4.patch
deleted file mode 100644 (file)
index 51d6c01..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-From ec90292592dd2c9d5c108390841e3df24e377ed5 Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Sat, 24 Feb 2018 15:22:05 +0100
-Subject: [PATCH] [PATCH 4/4] Avoid mis-identifying systems as SVR4
-
-Linux can be misdetected as SVR4 because it has
-libelf installed. This leads to linking with libelf, even though no
-symbols from that library were actually used, and to a workaround for
-a buggy getlogin() being enabled.
-
-It is not documented which exact SVR4 system had the bug that the
-workaround was added for, so all I could do is make an educated guess
-at the #defines its compiler would be likely to set.
-
-Modified from patch by Maarten ter Huurne.
-
-Upstream-Status: Submitted [http://savannah.gnu.org/bugs/?43223]
-
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
----
- configure.ac | 14 ++++++++++++--
- 1 file changed, 12 insertions(+), 2 deletions(-)
-
-diff --git a/src/configure.ac b/src/configure.ac
-index bd748d9..ab799d2 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -179,14 +179,24 @@ AC_EGREP_CPP(YES_IS_DEFINED,
- #endif
- ], LIBS="$LIBS -lsocket -linet";seqptx=1)
-+AC_CHECKING(SVR4)
-+AC_EGREP_CPP(yes,
-+[main () {
-+#if defined(SVR4) || defined(__SVR4)
-+  yes;
-+#endif
-+], AC_NOTE(- you have a SVR4 system) AC_DEFINE(SVR4) svr4=1)
-+if test -n "$svr4" ; then
- oldlibs="$LIBS"
- LIBS="$LIBS -lelf"
- AC_CHECKING(SVR4)
- AC_TRY_LINK([#include <utmpx.h>
- ],,
--[AC_CHECK_HEADER(dwarf.h, AC_DEFINE(SVR4) AC_DEFINE(BUGGYGETLOGIN),
--[AC_CHECK_HEADER(elf.h, AC_DEFINE(SVR4) AC_DEFINE(BUGGYGETLOGIN))])]
-+[AC_CHECK_HEADER(dwarf.h, AC_DEFINE(BUGGYGETLOGIN),
-+[AC_CHECK_HEADER(elf.h, AC_DEFINE(BUGGYGETLOGIN))])]
- ,LIBS="$oldlibs")
-+fi
-+
- AC_CHECK_HEADERS([stropts.h string.h strings.h])
- AC_CHECKING(for Solaris 2.x)
--- 
-2.17.1
-
index ca60603376b4c1cf6dd861824c8d6dbcdde5a4d0..0faad49d33170b4d792ec5d3648f86fb0933d0a2 100644 (file)
@@ -6,15 +6,15 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=unrar
-PKG_VERSION:=5.8.1
+PKG_VERSION:=5.8.3
 PKG_RELEASE:=1
 
 PKG_SOURCE:=unrarsrc-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://www.rarlab.com/rar
-PKG_HASH:=035f1f436f0dc2aea09aec146b9cc3e47ca2442f2c62b4ad9374c7c9cc20e632
+PKG_HASH:=3591685c8f5bbcb0be09de3d0a0544adb88966b9cccb80986f6cd2b534fd91a6
+
 PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>, \
                Ted Hess <thess@kitschensync.net>
-
 PKG_LICENSE:=UnRAR
 PKG_LICENSE_FILES:=license.txt
 PKG_CPE_ID:=cpe:/a:rarlab:unrar
index daaca3879d7333dd7767514f2e4f66fbb8497d3d..76816bfd60afb42f52cf236929c309e1cc447b76 100644 (file)
@@ -8,18 +8,21 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=yara
-PKG_VERSION:=3.10.0
+PKG_VERSION:=3.11.0
 PKG_RELEASE:=1
-PKG_LICENSE:=BSD-3-Clause
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/VirusTotal/yara/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=3281d43d6b49a4ca8d3a5d2521e06a0b72863702022f981b051856c2b83449c2
+PKG_HASH:=de8c54028c848751c06f5acc3b749c3ef6b111090b39f6ff991295af44bd4633
 
+PKG_MAINTAINER:=Marko Ratkaj <marko.ratkaj@sartura.hr>
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=COPYING
 PKG_CPE_ID:=cpe:/a:virustotal:yara
+
 PKG_FIXUP:=autoreconf
-PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -28,7 +31,6 @@ define Package/yara
   CATEGORY:=Utilities
   TITLE:=Pattern matching swiss knife for malware researchers
   URL:=http://virustotal.github.io/yara/
-  MAINTAINER:=Marko Ratkaj <marko.ratkaj@sartura.hr>
   DEPENDS:= +libopenssl
   DEPENDS+= +YARA_module_magic:file
   DEPENDS+= +YARA_module_cuckoo:jansson
diff --git a/utils/yara/patches/020-openssl-deprecated.patch b/utils/yara/patches/020-openssl-deprecated.patch
deleted file mode 100644 (file)
index 82258b4..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
---- a/libyara/modules/pe.c
-+++ b/libyara/modules/pe.c
-@@ -42,6 +42,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- #include <openssl/x509.h>
- #if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
- #define X509_get_signature_nid(o) OBJ_obj2nid((o)->sig_alg->algorithm)
-+#define X509_getm_notBefore X509_get_notBefore
-+#define X509_getm_notAfter X509_get_notAfter
- #endif
- #endif
-@@ -1326,10 +1328,10 @@ void pe_parse_certificates(
-         }
-       }
--      date_time = ASN1_get_time_t(X509_get_notBefore(cert));
-+      date_time = ASN1_get_time_t(X509_getm_notBefore(cert));
-       set_integer(date_time, pe->object, "signatures[%i].not_before", counter);
--      date_time = ASN1_get_time_t(X509_get_notAfter(cert));
-+      date_time = ASN1_get_time_t(X509_getm_notAfter(cert));
-       set_integer(date_time, pe->object, "signatures[%i].not_after", counter);
-       counter++;