Merge pull request #16949 from neheb/10
authorNikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
Sat, 23 Oct 2021 18:31:06 +0000 (20:31 +0200)
committerGitHub <noreply@github.com>
Sat, 23 Oct 2021 18:31:06 +0000 (20:31 +0200)
libtasn1: don't build host shared libs

26 files changed:
lang/php7/Makefile
lang/php8/Makefile
libs/glib2/Makefile
libs/glib2/patches/004-no-distutils.patch [deleted file]
libs/glib2/patches/005-uclibc.patch [deleted file]
libs/glib2/patches/006-c99.patch
libs/libffi/Makefile
libs/libnpupnp/Makefile
net/frr/Makefile
net/frr/files/frr
net/frr/files/frrcommon.sh
net/frr/patches/049-clear_ip_ospf_process_and_neighbor.patch
net/frr/patches/050-ospf_nbr_nbma_lookup_next.patch
net/frr/patches/051-ospfd_instance_fixes.patch
net/frr/patches/052-nhrpd_support_for_multicast.patch
net/frr/patches/999-thread_reverse.patch [new file with mode: 0644]
net/gnunet/patches/010-endian.patch [new file with mode: 0644]
net/gnunet/patches/100-fix-opus-and-pulse-library-detection.patch
net/nextdns/Makefile
net/wsdd2/Makefile
sound/mpd/Makefile
utils/apparmor/Makefile
utils/apparmor/patches/070-systemd.patch [new file with mode: 0644]
utils/collectd/Makefile
utils/collectd/files/lua-scripts/dsl.lua [new file with mode: 0644]
utils/yq/Makefile

index d343986f2d52de94ad82d542fcb32bae1a48d672..72603d34e27882dfdbdbcc05ac5ce648a74dabb3 100644 (file)
@@ -6,7 +6,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=php
-PKG_VERSION:=7.4.24
+PKG_VERSION:=7.4.25
 PKG_RELEASE:=1
 
 PKG_MAINTAINER:=Michael Heimpold <mhei@heimpold.de>
@@ -16,7 +16,7 @@ PKG_CPE_ID:=cpe:/a:php:php
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=http://www.php.net/distributions/
-PKG_HASH:=ff7658ee2f6d8af05b48c21146af5f502e121def4e76e862df5ec9fa06e98734
+PKG_HASH:=12a758f1d7fee544387a28d3cf73226f47e3a52fb3049f07fcc37d156d393c0a
 
 PKG_BUILD_PARALLEL:=1
 PKG_USE_MIPS16:=0
index ef4b4d946bbed61a30ef5b35c84938d73f915e50..909b9459cf5ae6888666f0617214843216b34bc4 100644 (file)
@@ -6,7 +6,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=php
-PKG_VERSION:=8.0.11
+PKG_VERSION:=8.0.12
 PKG_RELEASE:=1
 
 PKG_MAINTAINER:=Michael Heimpold <mhei@heimpold.de>
@@ -16,7 +16,7 @@ PKG_CPE_ID:=cpe:/a:php:php
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=http://www.php.net/distributions/
-PKG_HASH:=e3e5f764ae57b31eb65244a45512f0b22d7bef05f2052b23989c053901552e16
+PKG_HASH:=a501017b3b0fd3023223ea25d98e87369b782f8a82310c4033d7ea6a989fea0a
 
 PKG_BUILD_PARALLEL:=1
 PKG_USE_MIPS16:=0
index 9e5eec34a8f405ec23ceb6b5cd1382944b2cd6f3..d6256e64272f349033ac2f59b949877ffcebaa49 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=glib2
-PKG_VERSION:=2.68.4
+PKG_VERSION:=2.70.0
 PKG_RELEASE:=$(AUTORELEASE)
 
 PKG_SOURCE:=glib-$(PKG_VERSION).tar.xz
-PKG_SOURCE_URL:=@GNOME/glib/2.68
-PKG_HASH:=62fd061d08a75492617e625a73e2c05e259f831acbb8e1f8b9c81f23f7993a3b
+PKG_SOURCE_URL:=@GNOME/glib/2.70
+PKG_HASH:=200d7df811c5ba634afbf109f14bb40ba7fde670e89389885da14e27c0840742
 
 PKG_MAINTAINER:=Peter Wagner <tripolar@gmx.at>
 PKG_LICENSE:=LGPL-2.1-or-later
@@ -22,8 +22,8 @@ PKG_CPE_ID:=cpe:/a:gnome:glib
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/glib-$(PKG_VERSION)
 HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/glib-$(PKG_VERSION)
-PKG_BUILD_DEPENDS:=gettext-full libiconv/host
-HOST_BUILD_DEPENDS:=gettext-full/host libiconv/host libffi/host
+PKG_BUILD_DEPENDS:=libiconv/host
+HOST_BUILD_DEPENDS:=libiconv/host libffi/host pcre/host
 PKG_CONFIG_DEPENDS:=CONFIG_BUILD_NLS
 PKG_INSTALL:=1
 
@@ -35,7 +35,7 @@ include $(INCLUDE_DIR)/meson.mk
 define Package/glib2
   SECTION:=libs
   CATEGORY:=Libraries
-  DEPENDS:=$(ICONV_DEPENDS) $(INTL_DEPENDS) +zlib +libpthread +libffi +libattr
+  DEPENDS:=$(ICONV_DEPENDS) $(INTL_DEPENDS) +zlib +libpthread +libffi +libattr +libpcre
   TITLE:=glib 2.0
   URL:=http://www.gtk.org/
 endef
@@ -44,16 +44,14 @@ define Package/glib2/description
   The GLib library of C routines
 endef
 
-HOST_LDFLAGS += -liconv -Wl,-rpath,$(STAGING_DIR_HOSTPKG)/lib
+HOST_LDFLAGS += -Wl,-rpath,$(STAGING_DIR_HOSTPKG)/lib
 TARGET_CFLAGS += -ffunction-sections -fdata-sections
 TARGET_LDFLAGS += -Wl,--gc-sections $(if $(INTL_FULL),-lintl)
 
 COMP_ARGS= \
-       -Ddefault_library=both \
        -Diconv=external \
        -Dselinux=disabled \
        -Dlibmount=disabled \
-       -Dinternal_pcre=true \
        -Dman=false \
        -Ddtrace=false \
        -Dsystemtap=false \
@@ -64,15 +62,14 @@ COMP_ARGS= \
        -Dfam=false \
        -Dtests=false \
        -Dinstalled_tests=false \
-       -Dnls=$(if $(CONFIG_BUILD_NLS),en,dis)abled \
        -Doss_fuzz=disabled \
        -Dglib_debug=disabled \
        -Dglib_assert=false \
        -Dglib_checks=false \
        -Dlibelf=disabled
 
-MESON_HOST_ARGS += $(COMP_ARGS) -Dxattr=false
-MESON_ARGS += $(COMP_ARGS) -Dxattr=true -Db_lto=true
+MESON_HOST_ARGS += $(COMP_ARGS) -Dxattr=false -Ddefault_library=static -Dnls=disabled
+MESON_ARGS += $(COMP_ARGS) -Dxattr=true -Db_lto=true -Ddefault_library=both -Dnls=$(if $(CONFIG_BUILD_NLS),en,dis)abled
 
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/bin
diff --git a/libs/glib2/patches/004-no-distutils.patch b/libs/glib2/patches/004-no-distutils.patch
deleted file mode 100644 (file)
index 5dc5411..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
---- a/meson.build
-+++ b/meson.build
-@@ -2220,16 +2220,10 @@ endif
- glib_conf.set('HAVE_PROC_SELF_CMDLINE', have_proc_self_cmdline)
--python = import('python').find_installation('python3')
-+python = 'python3'
- # used for '#!/usr/bin/env <name>'
- python_name = 'python3'
--python_version = python.language_version()
--python_version_req = '>=3.5'
--if not python_version.version_compare(python_version_req)
--  error('Requires Python @0@, @1@ found.'.format(python_version_req, python_version))
--endif
--
- # Determine which user environment-dependent files that we want to install
- have_bash = find_program('bash', required : false).found() # For completion scripts
- bash_comp_dep = dependency('bash-completion', version: '>=2.0', required: false)
diff --git a/libs/glib2/patches/005-uclibc.patch b/libs/glib2/patches/005-uclibc.patch
deleted file mode 100644 (file)
index ab3ac4b..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/meson.build
-+++ b/meson.build
-@@ -2038,8 +2038,8 @@ endif
- # FIXME: glib-gettext.m4 has much more checks to detect broken/uncompatible
- # implementations. This could be extended if issues are found in some platforms.
- libintl_deps = []
--if cc.has_function('ngettext')
--  have_bind_textdomain_codeset = cc.has_function('bind_textdomain_codeset')
-+if true
-+  have_bind_textdomain_codeset = cc.has_function('bind_textdomain_codeset', prefix :'#include <libintl.h>')
- else
-   # First just find the bare library.
-   libintl = cc.find_library('intl', required : false)
index 76180e2e8933d006130b6bbdb17896d4df06d451..82455f33f8b29b106f6c86ae3f5d129469fcc36a 100644 (file)
@@ -1,6 +1,6 @@
 --- a/meson.build
 +++ b/meson.build
-@@ -944,7 +944,7 @@ if host_system == 'windows' and (cc.get_
+@@ -949,7 +949,7 @@ if host_system == 'windows' and (cc.get_
    glib_conf.set('HAVE_C99_SNPRINTF', false)
    glib_conf.set('HAVE_C99_VSNPRINTF', false)
    glib_conf.set('HAVE_UNIX98_PRINTF', false)
index 56c9f5d68ea92fc9a3a3d993dd3ecd3fad1d0bb7..901a4f3a4dbc2a12b9a791815e5df4871352372b 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libffi
 PKG_VERSION:=3.4.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/libffi/libffi/tar.gz/v$(PKG_VERSION)?
@@ -48,11 +48,13 @@ between the two languages.
 endef
 
 HOST_CONFIGURE_ARGS += \
+       --disable-shared \
        --disable-debug \
        --disable-docs \
        --disable-multi-os-directory \
        --disable-raw-api \
-       --disable-structs
+       --disable-structs \
+       --with-pic
 
 CONFIGURE_ARGS += \
        --disable-debug \
index 9b5aadd918e9300850fa03b10a66d817e48ab7c8..74aeba1adb4fb03e24f022f0a598c25f3bfde54e 100644 (file)
@@ -1,12 +1,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libnpupnp
-PKG_VERSION:=4.1.4
+PKG_VERSION:=4.1.5
 PKG_RELEASE:=$(AUTORELEASE)
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://www.lesbonscomptes.com/upmpdcli/downloads
-PKG_HASH:=03506f02546e3b3d31b389e046c4691f020b82d315426ce79f1e2b1eb7958656
+PKG_HASH:=566f5895376a14aa87997de7ce3454595646613d1d0af34d05c31f6d9fe884a9
 
 PKG_MAINTAINER:=
 PKG_LICENSE:=LGPL-2.1-or-later
@@ -14,6 +14,7 @@ PKG_LICENSE_FILES:=COPYING
 
 PKG_INSTALL:=1
 PKG_BUILD_PARALLEL:=1
+PKG_BUILD_DEPENDS:=libmicrohttpd
 
 include $(INCLUDE_DIR)/package.mk
 
index 0f075c8e4a5388dbc3e546e7abe5dfc9b947ff07..4fd4163cc2fb13481dbc3cbe899b77c22c12bc68 100644 (file)
@@ -8,15 +8,15 @@
 include $(TOPDIR)/rules.mk
 PKG_NAME:=frr
 PKG_VERSION:=7.5.1
-PKG_RELEASE:=1
-PKG_SOURCE_DATE:=2021-03-25
+PKG_RELEASE:=2
+PKG_SOURCE_DATE:=2021-08-26
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_DATE).tar.gz
-PKG_SOURCE_VERSION:=18f209926fb659790926b82dd4e30727311d22aa
+PKG_SOURCE_VERSION:=4cc14d346bdedc81a52b2981f9f568176513dc3e
 PKG_SOURCE_URL:=https://codeload.github.com/FRRouting/frr/tar.gz/$(PKG_SOURCE_VERSION)?
 
 
-PKG_HASH:=a2e21ea5f5c73afda521280c7b1bab3e6734f78517e7cf1b86cbbc0e5f9856cc
+PKG_HASH:=dd0ec4616b85f5142c9e4ecc4a17b944000a3219bedf9d091484503e8c91e0e7
 PKG_MAINTAINER:=Lucian Cristian <lucian.cristian@gmail.com>
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_SOURCE_VERSION)
@@ -121,6 +121,12 @@ define Package/frr-zebra
   CONFLICTS:=quagga-zebra
 endef
 
+define Package/frr-pythontools
+  $(call Package/frr/Default)
+  TITLE:=Python reload tool
+  DEPENDS+=+frr-libfrr +python3-base +python3-light +python3-logging
+endef
+
 ##Migrate from quagga
 ##should test file exists and link in frr folder
 #define Package/frr/postinst
@@ -218,6 +224,13 @@ define Package/frr-libfrr/install
        $(INSTALL_CONF) ./files/{frr.conf,daemons} $(1)/etc/frr/
 endef
 
+define Package/frr-pythontools/install
+       $(INSTALL_DIR) $(1)/usr/lib/frr $(1)/usr/sbin $(1)/etc/frr
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/*.py $(1)/usr/lib/frr/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/frr-reload $(1)/usr/sbin/
+       $(INSTALL_CONF) $(PKG_BUILD_DIR)/tools/etc/frr/support_bundle_commands.conf $(1)/etc/frr/
+endef
+
 define Package/frr-vtysh/install
        $(INSTALL_DIR) $(1)/usr/bin $(1)/etc/frr
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vtysh $(1)/usr/bin/
@@ -227,6 +240,7 @@ endef
 $(eval $(call HostBuild))
 $(eval $(call BuildPackage,frr))
 $(eval $(call BuildPackage,frr-libfrr))
+$(eval $(call BuildPackage,frr-pythontools))
 $(eval $(call BuildPackage,frr-watchfrr))
 $(eval $(call BuildPackage,frr-zebra))
 $(eval $(call BuildPackage,frr-vtysh))
index 6ae80954cb1e8f5fd9791db86c48e793f34813b5..d1044e014ced41f774e47667de3ac51d2681fca8 100644 (file)
@@ -28,14 +28,30 @@ start() {
        daemon_start watchfrr
 }
 stop() {
+       all_daemon_list all_daemons
+       # Kill any currently monitored daemons that are no longer enabled.
+       # Traverse command line args in reverse order, bailing out when we hit
+       # an argument that is not a daemon. Otherwise, if it's not in the
+       # new daemon list, stop it.
+       watchfrr_pid=`pidof watchfrr`
+       for i in `tr '\0' '\n' < /proc/$watchfrr_pid/cmdline | sed -n '1!G;h;$p'`; do
+       in_list $i $all_daemons || break
+       in_list $i $daemons || daemon_stop $i
+       done
        daemon_stop watchfrr
-       all_stop --reallyall
+#      all_stop --reallyall
        exit ${still_running:-0}
 }
 
 restart() {
+       all_daemon_list all_daemons
+       watchfrr_pid=`pidof watchfrr`
+       for i in `tr '\0' '\n' < /proc/$watchfrr_pid/cmdline | sed -n '1!G;h;$p'`; do
+       in_list $i $all_daemons || break
+       in_list $i $daemons || daemon_stop $i
+       done
        daemon_stop watchfrr
-       all_stop --reallyall
+#      all_stop --reallyall
 
        daemon_list daemons
        watchfrr_options="$watchfrr_options $daemons"
@@ -50,6 +66,7 @@ status() {
 }
 
 reload() {
+       RELOAD_SCRIPT="/usr/sbin/frr-reload"
        if [ ! -x "$RELOAD_SCRIPT" ]; then
                log_failure_msg "The frr-pythontools package is required for reload functionality."
                exit 1
index 324a972693ce0bc4fe6a82f25e759ef2762e46fc..80822ceb8d1d5f5f7b387426c5cf2e42928f2a4e 100644 (file)
@@ -125,6 +125,41 @@ daemon_list() {
        [ -n "$dvar" ] && eval $dvar="\"$disabled\""
 }
 
+all_daemon_list() {
+       # note $1 specifies the name of a global variable to be set
+       local enabled evar daemon inst oldifs i
+       enabled=""
+       evar="$1"
+
+       for daemon in $DAEMONS; do
+               eval inst=\$${daemon}_instances
+               if [ -n "$inst" ]; then
+                       oldifs="${IFS}"
+                       IFS="${IFS},"
+                       for i in $inst; do
+                               enabled="$enabled $daemon-$i"
+                       done
+                       IFS="${oldifs}"
+               else
+                   enabled="$enabled $daemon"
+               fi
+       done
+
+       enabled="${enabled# }"
+       [ -z "$evar" ] && echo "$enabled"
+       [ -n "$evar" ] && eval $evar="\"$enabled\""
+}
+
+in_list() {
+       local item i
+       item="$1"
+       shift 1
+       for i in "$@"; do
+               [ "$item" = "$i" ] && return 0
+       done
+       return 1
+}
+
 #
 # individual daemon management
 #
index ba259cbea8eb6eff741df5f149c8ac1409518d3a..8e02baaca83decb80484cc8318a4def3b7a393a0 100644 (file)
@@ -327,7 +327,7 @@ Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
  }
  
  /* For OSPF area sort by area id. */
-@@ -839,14 +890,11 @@ static struct ospf_area *ospf_area_new(s
+@@ -826,14 +877,11 @@ static struct ospf_area *ospf_area_new(s
        return new;
  }
  
@@ -343,7 +343,7 @@ Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
        LSDB_LOOP (ROUTER_LSDB(area), rn, lsa)
                ospf_discard_from_db(area->ospf, area->lsdb, lsa);
        LSDB_LOOP (NETWORK_LSDB(area), rn, lsa)
-@@ -864,6 +912,15 @@ static void ospf_area_free(struct ospf_a
+@@ -851,6 +899,15 @@ static void ospf_area_free(struct ospf_a
                ospf_discard_from_db(area->ospf, area->lsdb, lsa);
  
        ospf_lsdb_delete_all(area->lsdb);
@@ -361,9 +361,9 @@ Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
        ospf_lsa_unlock(&area->router_lsa_self);
 --- a/ospfd/ospfd.h
 +++ b/ospfd/ospfd.h
-@@ -523,7 +523,11 @@ extern struct ospf *ospf_lookup_by_inst_
-                                            const char *name);
+@@ -519,7 +519,11 @@ extern struct ospf *ospf_lookup_by_inst_
  extern struct ospf *ospf_lookup_by_vrf_id(vrf_id_t vrf_id);
+ extern uint32_t ospf_count_area_params(struct ospf *ospf);
  extern void ospf_finish(struct ospf *);
 +extern void ospf_process_refresh_data(struct ospf *ospf, bool reset);
  extern void ospf_router_id_update(struct ospf *ospf);
@@ -373,7 +373,7 @@ Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
  extern int ospf_network_set(struct ospf *, struct prefix_ipv4 *, struct in_addr,
                            int);
  extern int ospf_network_unset(struct ospf *, struct prefix_ipv4 *,
-@@ -548,6 +552,7 @@ extern int ospf_area_shortcut_set(struct
+@@ -544,6 +548,7 @@ extern int ospf_area_shortcut_set(struct
  extern int ospf_area_shortcut_unset(struct ospf *, struct ospf_area *);
  extern int ospf_timers_refresh_set(struct ospf *, int);
  extern int ospf_timers_refresh_unset(struct ospf *);
index c9c4906178cc9efdf48b065e08352f2723581642..96e7ab71d45f099796170c0f503f31014c7033b1 100644 (file)
@@ -56,7 +56,7 @@ Signed-off-by: Donald Sharp <sharpd@nvidia.com>
  
 --- a/ospfd/ospfd.c
 +++ b/ospfd/ospfd.c
-@@ -1932,35 +1932,6 @@ struct ospf_nbr_nbma *ospf_nbr_nbma_look
+@@ -1919,35 +1919,6 @@ struct ospf_nbr_nbma *ospf_nbr_nbma_look
        return NULL;
  }
  
@@ -94,7 +94,7 @@ Signed-off-by: Donald Sharp <sharpd@nvidia.com>
        struct ospf_nbr_nbma *nbr_nbma;
 --- a/ospfd/ospfd.h
 +++ b/ospfd/ospfd.h
-@@ -567,8 +567,6 @@ extern void ospf_terminate(void);
+@@ -563,8 +563,6 @@ extern void ospf_terminate(void);
  extern void ospf_nbr_nbma_if_update(struct ospf *, struct ospf_interface *);
  extern struct ospf_nbr_nbma *ospf_nbr_nbma_lookup(struct ospf *,
                                                  struct in_addr);
index 91f999ab09cdb0bc965c2e1d2a37345c71fc37d8..eb3b17cb3cece884ce5ee110a5441a2d1328f314 100644 (file)
@@ -432,7 +432,7 @@ Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
  }
  
  
-@@ -3324,11 +3330,11 @@ DEFUN (show_ip_ospf_instance,
+@@ -3326,11 +3332,11 @@ DEFUN (show_ip_ospf_instance,
        json_object *json = NULL;
  
        instance = strtoul(argv[idx_number]->arg, NULL, 10);
@@ -447,7 +447,7 @@ Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
                return CMD_SUCCESS;
  
        if (uj)
-@@ -4014,11 +4020,11 @@ DEFUN (show_ip_ospf_instance_interface,
+@@ -4016,11 +4022,11 @@ DEFUN (show_ip_ospf_instance_interface,
        json_object *json = NULL;
  
        instance = strtoul(argv[idx_number]->arg, NULL, 10);
@@ -462,7 +462,7 @@ Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
                return CMD_SUCCESS;
  
        if (uj)
-@@ -4407,11 +4413,11 @@ DEFUN (show_ip_ospf_instance_neighbor,
+@@ -4409,11 +4415,11 @@ DEFUN (show_ip_ospf_instance_neighbor,
        int ret = CMD_SUCCESS;
  
        instance = strtoul(argv[idx_number]->arg, NULL, 10);
@@ -477,7 +477,7 @@ Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
                return CMD_SUCCESS;
  
        if (uj)
-@@ -4619,11 +4625,11 @@ DEFUN (show_ip_ospf_instance_neighbor_al
+@@ -4621,11 +4627,11 @@ DEFUN (show_ip_ospf_instance_neighbor_al
        int ret = CMD_SUCCESS;
  
        instance = strtoul(argv[idx_number]->arg, NULL, 10);
@@ -492,7 +492,7 @@ Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
                return CMD_SUCCESS;
        if (uj)
                json = json_object_new_object();
-@@ -4759,11 +4765,11 @@ DEFUN (show_ip_ospf_instance_neighbor_in
+@@ -4761,11 +4767,11 @@ DEFUN (show_ip_ospf_instance_neighbor_in
                show_ip_ospf_neighbour_header(vty);
  
        instance = strtoul(argv[idx_number]->arg, NULL, 10);
@@ -507,7 +507,7 @@ Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
                return CMD_SUCCESS;
  
        if (!uj)
-@@ -5168,11 +5174,11 @@ DEFPY (show_ip_ospf_instance_neighbor_id
+@@ -5170,11 +5176,11 @@ DEFPY (show_ip_ospf_instance_neighbor_id
  {
        struct ospf *ospf;
  
@@ -522,7 +522,7 @@ Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
                return CMD_SUCCESS;
  
        return show_ip_ospf_neighbor_id_common(vty, ospf, &router_id, !!json,
-@@ -5341,11 +5347,11 @@ DEFUN (show_ip_ospf_instance_neighbor_de
+@@ -5343,11 +5349,11 @@ DEFUN (show_ip_ospf_instance_neighbor_de
        int ret = CMD_SUCCESS;
  
        instance = strtoul(argv[idx_number]->arg, NULL, 10);
@@ -537,7 +537,7 @@ Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
                return CMD_SUCCESS;
  
        if (uj)
-@@ -5536,11 +5542,11 @@ DEFUN (show_ip_ospf_instance_neighbor_de
+@@ -5538,11 +5544,11 @@ DEFUN (show_ip_ospf_instance_neighbor_de
        int ret = CMD_SUCCESS;
  
        instance = strtoul(argv[idx_number]->arg, NULL, 10);
@@ -552,7 +552,7 @@ Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
                return CMD_SUCCESS;
  
        if (uj)
-@@ -5668,11 +5674,11 @@ DEFUN (show_ip_ospf_instance_neighbor_in
+@@ -5670,11 +5676,11 @@ DEFUN (show_ip_ospf_instance_neighbor_in
        bool uj = use_json(argc, argv);
  
        instance = strtoul(argv[idx_number]->arg, NULL, 10);
@@ -567,7 +567,7 @@ Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
                return CMD_SUCCESS;
  
        return show_ip_ospf_neighbor_int_detail_common(vty, ospf, idx_ifname,
-@@ -6418,10 +6424,11 @@ DEFUN (show_ip_ospf_instance_database,
+@@ -6420,10 +6426,11 @@ DEFUN (show_ip_ospf_instance_database,
  
        if (argv_find(argv, argc, "(1-65535)", &idx)) {
                instance = strtoul(argv[idx]->arg, NULL, 10);
@@ -582,7 +582,7 @@ Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
                        return CMD_SUCCESS;
  
                return (show_ip_ospf_database_common(vty, ospf, idx ? 1 : 0,
-@@ -6482,15 +6489,12 @@ DEFUN (show_ip_ospf_instance_database_ma
+@@ -6484,15 +6491,12 @@ DEFUN (show_ip_ospf_instance_database_ma
        unsigned short instance = 0;
  
        instance = strtoul(argv[idx_number]->arg, NULL, 10);
@@ -601,7 +601,7 @@ Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
  
        return show_ip_ospf_database_common(vty, ospf, 1, argc, argv, 0);
  }
-@@ -6576,13 +6580,12 @@ DEFUN (show_ip_ospf_instance_database_ty
+@@ -6578,13 +6582,12 @@ DEFUN (show_ip_ospf_instance_database_ty
  
        if (argv_find(argv, argc, "(1-65535)", &idx)) {
                instance = strtoul(argv[idx]->arg, NULL, 10);
@@ -619,7 +619,7 @@ Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
  
                return (show_ip_ospf_database_type_adv_router_common(
                        vty, ospf, idx ? 1 : 0, argc, argv, use_vrf));
-@@ -8033,7 +8036,7 @@ DEFUN (ip_ospf_area,
+@@ -8035,7 +8038,7 @@ DEFUN (ip_ospf_area,
        else
                ospf = ospf_lookup_instance(instance);
  
@@ -628,7 +628,7 @@ Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
                /*
                 * At this point we know we have received
                 * an instance and there is no ospf instance
-@@ -8158,7 +8161,7 @@ DEFUN (no_ip_ospf_area,
+@@ -8159,7 +8162,7 @@ DEFUN (no_ip_ospf_area,
        else
                ospf = ospf_lookup_instance(instance);
  
@@ -718,7 +718,7 @@ Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
  extern struct zclient *zclient;
  
  
-@@ -468,36 +470,28 @@ static void ospf_init(struct ospf *ospf)
+@@ -438,36 +440,28 @@ static void ospf_init(struct ospf *ospf)
        ospf_router_id_update(ospf);
  }
  
@@ -765,7 +765,7 @@ Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
                ospf_init(ospf);
 --- a/ospfd/ospfd.h
 +++ b/ospfd/ospfd.h
-@@ -507,6 +507,7 @@ struct ospf_nbr_nbma {
+@@ -502,6 +502,7 @@ struct ospf_nbr_nbma {
  
  /* Extern variables. */
  extern struct ospf_master *om;
@@ -773,7 +773,7 @@ Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
  extern const int ospf_redistributed_proto_max;
  extern struct zclient *zclient;
  extern struct thread_master *master;
-@@ -516,9 +517,9 @@ extern struct zebra_privs_t ospfd_privs;
+@@ -511,9 +512,9 @@ extern struct zebra_privs_t ospfd_privs;
  /* Prototypes. */
  extern const char *ospf_redist_string(unsigned int route_type);
  extern struct ospf *ospf_lookup_instance(unsigned short);
index 94db55f1a9f7e362809eac9f5b6c709f4e7d7c36..ad7be89affa81cb50b3c785d5e34d5aa32f3e0e5 100644 (file)
@@ -753,7 +753,7 @@ Signed-off-by: Reuben Dowle <reuben.dowle@4rf.com>
                   N.B. Options 1 & 2 share basically the same logic. */
 --- a/ospfd/ospf_vty.c
 +++ b/ospfd/ospf_vty.c
-@@ -7560,20 +7560,21 @@ DEFUN_HIDDEN (no_ospf_hello_interval,
+@@ -7562,20 +7562,21 @@ DEFUN_HIDDEN (no_ospf_hello_interval,
        return no_ip_ospf_hello_interval(self, vty, argc, argv);
  }
  
@@ -785,7 +785,7 @@ Signed-off-by: Reuben Dowle <reuben.dowle@4rf.com>
        struct route_node *rn;
  
        if (old_type == OSPF_IFTYPE_LOOPBACK) {
-@@ -7582,16 +7583,22 @@ DEFUN (ip_ospf_network,
+@@ -7584,16 +7585,22 @@ DEFUN (ip_ospf_network,
                return CMD_WARNING_CONFIG_FAILED;
        }
  
@@ -810,7 +810,7 @@ Signed-off-by: Reuben Dowle <reuben.dowle@4rf.com>
                return CMD_SUCCESS;
  
        SET_IF_PARAM(IF_DEF_PARAMS(ifp), type);
-@@ -7603,6 +7610,7 @@ DEFUN (ip_ospf_network,
+@@ -7605,6 +7612,7 @@ DEFUN (ip_ospf_network,
                        continue;
  
                oi->type = IF_DEF_PARAMS(ifp)->type;
@@ -818,7 +818,7 @@ Signed-off-by: Reuben Dowle <reuben.dowle@4rf.com>
  
                if (oi->state > ISM_Down) {
                        OSPF_ISM_EVENT_EXECUTE(oi, ISM_InterfaceDown);
-@@ -7643,6 +7651,7 @@ DEFUN (no_ip_ospf_network,
+@@ -7645,6 +7653,7 @@ DEFUN (no_ip_ospf_network,
        struct route_node *rn;
  
        IF_DEF_PARAMS(ifp)->type = ospf_default_iftype(ifp);
@@ -839,7 +839,7 @@ Signed-off-by: Reuben Dowle <reuben.dowle@4rf.com>
                                                        inet_ntoa(
 --- a/ospfd/ospfd.c
 +++ b/ospfd/ospfd.c
-@@ -1017,6 +1017,7 @@ static void add_ospf_interface(struct co
+@@ -1004,6 +1004,7 @@ static void add_ospf_interface(struct co
        /* If network type is specified previously,
           skip network type setting. */
        oi->type = IF_DEF_PARAMS(co->ifp)->type;
diff --git a/net/frr/patches/999-thread_reverse.patch b/net/frr/patches/999-thread_reverse.patch
new file mode 100644 (file)
index 0000000..65a950c
--- /dev/null
@@ -0,0 +1,111 @@
+--- a/lib/thread.c
++++ b/lib/thread.c
+@@ -723,13 +723,9 @@ static void thread_free(struct thread_ma
+       XFREE(MTYPE_THREAD, thread);
+ }
+-static int fd_poll(struct thread_master *m, const struct timeval *timer_wait,
+-                 bool *eintr_p)
++static int fd_poll(struct thread_master *m, struct pollfd *pfds, nfds_t pfdsize,
++                 nfds_t count, const struct timeval *timer_wait)
+ {
+-      sigset_t origsigs;
+-      unsigned char trash[64];
+-      nfds_t count = m->handler.copycount;
+-
+       /*
+        * If timer_wait is null here, that means poll() should block
+        * indefinitely, unless the thread_master has overridden it by setting
+@@ -760,58 +756,15 @@ static int fd_poll(struct thread_master
+       rcu_assert_read_unlocked();
+       /* add poll pipe poker */
+-      assert(count + 1 < m->handler.pfdsize);
+-      m->handler.copy[count].fd = m->io_pipe[0];
+-      m->handler.copy[count].events = POLLIN;
+-      m->handler.copy[count].revents = 0x00;
+-
+-      /* We need to deal with a signal-handling race here: we
+-       * don't want to miss a crucial signal, such as SIGTERM or SIGINT,
+-       * that may arrive just before we enter poll(). We will block the
+-       * key signals, then check whether any have arrived - if so, we return
+-       * before calling poll(). If not, we'll re-enable the signals
+-       * in the ppoll() call.
+-       */
+-
+-      sigemptyset(&origsigs);
+-      if (m->handle_signals) {
+-              /* Main pthread that handles the app signals */
+-              if (frr_sigevent_check(&origsigs)) {
+-                      /* Signal to process - restore signal mask and return */
+-                      pthread_sigmask(SIG_SETMASK, &origsigs, NULL);
+-                      num = -1;
+-                      *eintr_p = true;
+-                      goto done;
+-              }
+-      } else {
+-              /* Don't make any changes for the non-main pthreads */
+-              pthread_sigmask(SIG_SETMASK, NULL, &origsigs);
+-      }
+-
+-#if defined(HAVE_PPOLL)
+-      struct timespec ts, *tsp;
+-
+-      if (timeout >= 0) {
+-              ts.tv_sec = timeout / 1000;
+-              ts.tv_nsec = (timeout % 1000) * 1000000;
+-              tsp = &ts;
+-      } else
+-              tsp = NULL;
+-
+-      num = ppoll(m->handler.copy, count + 1, tsp, &origsigs);
+-      pthread_sigmask(SIG_SETMASK, &origsigs, NULL);
+-#else
+-      /* Not ideal - there is a race after we restore the signal mask */
+-      pthread_sigmask(SIG_SETMASK, &origsigs, NULL);
+-      num = poll(m->handler.copy, count + 1, timeout);
+-#endif
+-
+-done:
++      assert(count + 1 < pfdsize);
++      pfds[count].fd = m->io_pipe[0];
++      pfds[count].events = POLLIN;
++      pfds[count].revents = 0x00;
+-      if (num < 0 && errno == EINTR)
+-              *eintr_p = true;
++      num = poll(pfds, count + 1, timeout);
+-      if (num > 0 && m->handler.copy[count].revents != 0 && num--)
++      unsigned char trash[64];
++      if (num > 0 && pfds[count].revents != 0 && num--)
+               while (read(m->io_pipe[0], &trash, sizeof(trash)) > 0)
+                       ;
+@@ -1438,7 +1391,7 @@ struct thread *thread_fetch(struct threa
+       struct timeval zerotime = {0, 0};
+       struct timeval tv;
+       struct timeval *tw = NULL;
+-      bool eintr_p = false;
++
+       int num = 0;
+       do {
+@@ -1510,14 +1463,14 @@ struct thread *thread_fetch(struct threa
+               pthread_mutex_unlock(&m->mtx);
+               {
+-                      eintr_p = false;
+-                      num = fd_poll(m, tw, &eintr_p);
++                      num = fd_poll(m, m->handler.copy, m->handler.pfdsize,
++                                    m->handler.copycount, tw);
+               }
+               pthread_mutex_lock(&m->mtx);
+               /* Handle any errors received in poll() */
+               if (num < 0) {
+-                      if (eintr_p) {
++                      if (errno == EINTR) {
+                               pthread_mutex_unlock(&m->mtx);
+                               /* loop around to signal handler */
+                               continue;
diff --git a/net/gnunet/patches/010-endian.patch b/net/gnunet/patches/010-endian.patch
new file mode 100644 (file)
index 0000000..4a956f1
--- /dev/null
@@ -0,0 +1,18 @@
+--- a/src/include/gnunet_common.h
++++ b/src/include/gnunet_common.h
+@@ -142,7 +142,6 @@ enum GNUNET_GenericReturnValue
+  * Endian operations
+  */
+-#if __BYTE_ORDER == __LITTLE_ENDIAN
+ #if defined(__linux__)
+ #define BYTE_SWAP_16(x) __bswap_16 (x)
+ #define BYTE_SWAP_32(x) __bswap_32 (x)
+@@ -162,6 +161,7 @@ enum GNUNET_GenericReturnValue
+                                              56))
+ #endif
++#if __BYTE_ORDER == __LITTLE_ENDIAN
+ #define GNUNET_htobe16(x) BYTE_SWAP_16 (x)
+ #define GNUNET_htole16(x) (x)
+ #define GNUNET_be16toh(x) BYTE_SWAP_16 (x)
index ee416ea7258f7a248abc4bb05c8816ffb90d7d52..0e40bb4ed5c01dcea18d1838f828bd0b799f746a 100644 (file)
@@ -1,6 +1,6 @@
 --- a/configure.ac
 +++ b/configure.ac
-@@ -813,10 +813,12 @@ AC_ARG_WITH(libpulse,
+@@ -851,10 +851,12 @@ AC_ARG_WITH(libpulse,
              LDFLAGS="-L$with_libpulse/lib $LDFLAGS"
              CPPFLAGS="-I$with_libpulse/include $CPPFLAGS"
              AC_CHECK_HEADERS(pulse/simple.h,
@@ -17,7 +17,7 @@
          ])
      ],
      [AC_MSG_RESULT([--with-libpulse not specified])
-@@ -856,10 +858,12 @@ AC_ARG_WITH(libopus,
+@@ -894,10 +896,12 @@ AC_ARG_WITH(libopus,
          LDFLAGS="-L$with_libopus/lib $LDFLAGS"
          CPPFLAGS="-I$with_libopus/include $CPPFLAGS"
          AC_CHECK_HEADERS(opus/opus.h,
index d31082e00457790e9dc6aed1d55938ac63e677c4..e1a65622ea0bb2605e6372268763b9c32d1ffed9 100644 (file)
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=nextdns
-PKG_VERSION:=1.37.2
+PKG_VERSION:=1.37.3
 PKG_RELEASE:=1
 
 PKG_SOURCE:=nextdns-$(PKG_VERSION).tar.gz
 PKG_SOURCE_VERSION:=v$(PKG_VERSION)
 PKG_SOURCE_URL:=https://codeload.github.com/nextdns/nextdns/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=a8b15c4b35cc1201b51503559a53605c4fdb140e8bb81a8ce1a36786c28eba40
+PKG_HASH:=7019ef22fc85f2c0bd7afc117f02f81eb34d90dc6981f01fb40e5fcbb6698785
 
 PKG_MAINTAINER:=Olivier Poitrey <rs@nextdns.io>
 PKG_LICENSE:=MIT
index 4df0c36da03f8fd41cd2a0300cdab0eb396c6ace..b81c44f57dd57492c68458a1a577677ccb098ad7 100644 (file)
@@ -5,9 +5,9 @@ PKG_RELEASE:=$(AUTORELEASE)
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/Netgear/wsdd2.git
-PKG_SOURCE_DATE:=2021-10-14
-PKG_SOURCE_VERSION:=db8f113f59da50f77015e0cacf103d76f252df50
-PKG_MIRROR_HASH:=644d0774fcee19872c7374a650d7b0fecd938cb6d02e8a982f8c82a8048d7b0d
+PKG_SOURCE_DATE:=2021-10-22
+PKG_SOURCE_VERSION:=9831daf2e14e0e112b5ad95224e9167072d52aa3
+PKG_MIRROR_HASH:=403d7d20bf2ae67e898db4543c61cc07f337cedf038a11c84a2af5504cfb82e9
 
 PKG_MAINTAINER:=Andy Walsh <andy.walsh44+github@gmail.com>
 PKG_LICENSE:=GPL-3.0-only
index 07bb6f3a1af9329619c20613e30f01efcb27870d..15298e3068ce4ce45347e172679c01171e1f9716 100644 (file)
@@ -6,12 +6,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mpd
-PKG_VERSION:=0.22.11
+PKG_VERSION:=0.23.2
 PKG_RELEASE:=$(AUTORELEASE)
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_SOURCE_URL:=https://www.musicpd.org/download/mpd/0.22/
-PKG_HASH:=143f7f34aaee6e87888f3dd35d49aade6656052651b960ca42b46cbb518ca0a0
+PKG_SOURCE_URL:=https://www.musicpd.org/download/mpd/0.23
+PKG_HASH:=74ec75689746baaeab7c65d70019f96f70b31b658cb25cfd2ebcca03f65acddf
 
 PKG_MAINTAINER:=
 PKG_LICENSE:=GPL-2.0-or-later
@@ -33,7 +33,7 @@ define Package/mpd/Default
   CATEGORY:=Sound
   TITLE:=Music Player Daemon
   URL:=https://www.musicpd.org/
-  DEPENDS:= +zlib +libcurl +libpthread +libmpdclient +boost $(ICONV_DEPENDS) \
+  DEPENDS:= +zlib +libcurl +libpthread +libmpdclient +boost $(ICONV_DEPENDS) +libfmt \
             +AUDIO_SUPPORT:alsa-lib +libexpat +libflac +libid3tag +libfaad2 +libopus
   USERID:=mpd:mpd
 endef
@@ -48,7 +48,7 @@ endef
 define Package/mpd-full
 $(call Package/mpd/Default)
   TITLE+= (full)
-  DEPENDS+= +AUDIO_SUPPORT:pulseaudio-daemon +libvorbis +libmms +libupnp +libshout +yajl \
+  DEPENDS+= +AUDIO_SUPPORT:pulseaudio-daemon +libvorbis +libmms +libnpupnp +libshout +yajl \
             +libffmpeg +lame-lib +!BUILD_PATENTED:libmad
   PROVIDES:=mpd
   VARIANT:=full
@@ -129,7 +129,6 @@ MESON_ARGS += \
        -Dnfs=disabled \
        -Dsmbclient=disabled \
        -Dqobuz=disabled \
-       -Dtidal=disabled \
        -Dbzip2=disabled \
        -Diso9660=disabled \
        -Dzzip=disabled \
@@ -141,10 +140,11 @@ MESON_ARGS += \
        -Dflac=enabled \
        -Dfluidsynth=disabled \
        -Dgme=disabled \
-       -Dmpg123=disabled \
        -Dmikmod=disabled \
        -Dmodplug=disabled \
        -Dmpcdec=disabled \
+       -Dmpg123=disabled \
+       -Dopenmpt=disabled \
        -Dopus=enabled \
        -Dsidplay=disabled \
        -Dsndfile=disabled \
@@ -163,6 +163,8 @@ MESON_ARGS += \
        -Djack=disabled \
        -Dopenal=disabled \
        -Doss=disabled \
+       -Dpipewire=disabled \
+       -Dsnapcast=false \
        -Dsndio=disabled \
        -Dsolaris_output=disabled \
        -Ddbus=disabled \
@@ -177,7 +179,7 @@ MESON_ARGS += \
 ifeq ($(BUILD_VARIANT),full)
 
   MESON_ARGS += \
-       -Dupnp=enabled \
+       -Dupnp=npupnp \
        -Dmms=enabled \
        -Dsoundcloud=enabled \
        -Dffmpeg=$(if $(CONFIG_BUILD_PATENTED),en,dis)abled \
index 431546ee6fe7bff50d3ce0555462bedf8243ef7a..58feeac605079b2d4b205ebd3337c88307811100 100644 (file)
@@ -3,13 +3,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=apparmor
-PKG_VERSION:=3.0.1
+PKG_VERSION:=3.0.3
 PKG_RELEASE:=$(AUTORELEASE)
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://gitlab.com/apparmor/apparmor.git
 PKG_SOURCE_VERSION:=0325ba06da6eeb5acf3e568063a08136fd0913e0
-PKG_MIRROR_HASH:=303ceca041ad8023fa44cdda366448d60b6299790266834b4078d30b70ad27f9
+PKG_MIRROR_HASH:=2c8f4607b9936f401a3fcb92cbc3627dc5b551fbde089162172e1801faba68bc
 
 PKG_LICENSE:=GPL-2.0-only
 PKG_LICENSE_FILES:=LICENSE
diff --git a/utils/apparmor/patches/070-systemd.patch b/utils/apparmor/patches/070-systemd.patch
new file mode 100644 (file)
index 0000000..667f270
--- /dev/null
@@ -0,0 +1,26 @@
+--- a/parser/Makefile
++++ b/parser/Makefile
+@@ -351,7 +351,7 @@ install-redhat:
+       install -m 755 rc.apparmor.$(subst install-,,$@) $(DESTDIR)/etc/init.d/apparmor
+ .PHONY: install-suse
+-install-suse: install-systemd
++install-suse:
+       install -m 755 -d $(SBINDIR)
+       ln -sf service $(SBINDIR)/rcapparmor
+@@ -413,14 +413,6 @@ install-indep: indep
+       $(MAKE) -C po install NAME=${NAME} DESTDIR=${DESTDIR}
+       $(MAKE) install_manpages DESTDIR=${DESTDIR}
+-.PHONY: install-systemd
+-install-systemd:
+-      install -m 755 -d $(SYSTEMD_UNIT_DIR)
+-      install -m 644 apparmor.service $(SYSTEMD_UNIT_DIR)
+-      install -m 755 apparmor.systemd $(APPARMOR_BIN_PREFIX)
+-      install -m 755 -d $(USR_SBINDIR)
+-      install -m 755 aa-teardown $(USR_SBINDIR)
+-
+ ifndef VERBOSE
+ .SILENT: clean
+ endif
index 10bd70ef127fdb91be932b74b9d6bd11465431b5..11f467dc56e1a0caa8e90bfd5dbf01308f501f5c 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=collectd
 PKG_VERSION:=5.12.0
-PKG_RELEASE:=13
+PKG_RELEASE:=15
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://collectd.org/files/ \
@@ -397,6 +397,32 @@ define BuildPlugin
 
 endef
 
+define BuildScriptLuaPlugin
+  PKG_CONFIG_DEPENDS+= CONFIG_PACKAGE_collectd-mod-$(1)
+
+  define Package/collectd-mod-$(1)
+  $$(call Package/collectd/Default)
+    TITLE:=$(2) plugin
+    DEPENDS:= $(4)
+  endef
+
+  define Package/collectd-mod-$(1)/install
+       $(INSTALL_DIR) $$(1)/usr/lib/collectd-mod-lua
+       for m in $(3); do \
+               ${INSTALL_DATA} \
+                       ./files/lua-scripts/$$$$$$$${m}.lua $$(1)/usr/lib/collectd-mod-lua/ ; \
+       done
+       if [ -f ./files/usr/share/collectd/plugin/$(1).json ]; then \
+               $(INSTALL_DIR) $$(1)/usr/share/collectd/plugin ; \
+               $(INSTALL_DATA) ./files/usr/share/collectd/plugin/$(1).json \
+                       $$(1)/usr/share/collectd/plugin/$(1).json ; \
+       fi
+  endef
+
+  $$(eval $$(call BuildPackage,collectd-mod-$(1)))
+
+endef
+
 define BuildScriptPlugin
   PKG_CONFIG_DEPENDS+= CONFIG_PACKAGE_collectd-mod-$(1)
 
@@ -503,3 +529,4 @@ $(eval $(call BuildPlugin,write-graphite,Carbon/Graphite output,write_graphite,+
 $(eval $(call BuildPlugin,write-http,HTTP POST output,write_http,+PACKAGE_collectd-mod-write-http:libcurl))
 
 $(eval $(call BuildScriptPlugin,sqm,SQM/qdisc collection,sqm_collectd,+PACKAGE_collectd-mod-sqm:collectd-mod-exec))
+$(eval $(call BuildScriptLuaPlugin,ltq-dsl,Lantiq DSL collection,dsl,@TARGET_lantiq_xrx200 +PACKAGE_collectd-mod-ltq-dsl:collectd-mod-lua +libubus-lua))
diff --git a/utils/collectd/files/lua-scripts/dsl.lua b/utils/collectd/files/lua-scripts/dsl.lua
new file mode 100644 (file)
index 0000000..29a4be1
--- /dev/null
@@ -0,0 +1,170 @@
+-- Copyright 2019 Florian Eckert <fe@dev.tdt.de>
+-- Copyright 2021 Jeroen Peelaerts <jeroen@steganos.dev>
+-- Licensed to the public under the GNU General Public License v2.
+
+local ubus = require("ubus")
+
+local hostname_file = "/proc/sys/kernel/hostname"
+
+local line_vars = {
+       {
+               name = "vector",
+               type = "bool"
+       },
+       {
+               name = "trellis",
+               type = "bool"
+       },
+       {
+               name = "bitswap",
+               type = "bool"
+       },
+       {  
+               name = "retx",
+               type = "bool"
+       },
+       {
+               name = "satn",
+               type = "snr"
+       },
+       {
+               name = "latn",
+               type = "snr"
+       },
+       {
+               name = "attndr",
+               type = "bitrate"
+       },
+       {
+               name = "snr",
+               type = "snr"
+       },
+       {
+               name = "data_rate",
+               type = "bitrate"
+       },
+       {
+               name = "latn",
+               type = "latency"
+       }
+}
+
+local errors = {
+       {
+               name = "uas",
+               type = "gauge"
+       },
+       {
+               name = "rx_corrupted",
+               type = "gauge"
+       },
+       {
+               name = "rx_retransmitted",
+               type = "gauge"
+       },
+       {
+               name = "tx_retransmitted",
+               type = "gauge"
+       }
+}
+
+local erb_vars = {
+       {
+               name = "sent",
+               type = "gauge"
+       },
+       {
+               name = "discarded",
+               type = "gauge"
+       }
+}
+
+local general_vars = {
+       {
+               name = "profile",
+               type = "gauge"
+       },
+       {
+               name = "mode",
+               type = "gauge"
+       },
+       {
+               name = "state_num",
+               type = "gauge"
+       },
+       {
+               name = "power_state_num",
+               type = "gauge"
+       },
+       {
+               name = "uptime",
+               type = "uptime"
+       }
+}
+
+local function build_metric(name, direction)
+       if direction ~= '' then
+               return string.format("%s_%s", name, direction)
+       else
+               return name 
+       end
+end
+
+local function get_values(hostname, variables, metrics, direction)
+       for _, information in pairs(variables) do
+               local name = information["name"]
+
+               if metrics and metrics[name] ~= nil then
+                       local value = metrics[name]
+                       local metric = build_metric(name, direction)
+
+                       local t = {
+                               host = host,
+                               plugin = 'dsl',
+                               type = information["type"],
+                               type_instance = metric,
+                               values = {value}
+                       }
+                       collectd.log_debug(string.format("%s: %s=%s", "collectd-mod-dsl(lua)", metric, tostring(value)))
+                       collectd.dispatch_values(t)
+               else
+                       collectd.log_info(string.format("%s: Unable to get %s", "collectd-mod-dsl(lua)", name))
+               end
+       end
+end
+
+local function read()
+       local lines = io.lines(hostname_file)
+       local hostname = lines()
+
+       local conn = ubus.connect()
+       if not conn then
+               collectd.log_error("collectd-mod-dsl(lua): Failed to connect to ubus")
+               return 0
+       end
+
+       local metrics = conn:call("dsl", "metrics", {})
+
+       if metrics then
+               if metrics["up"] then
+                       local near_errors = metrics["errors"]["near"]
+                       local far_errors = metrics["errors"]["far"]
+                       local down_line = metrics["downstream"]
+                       local up_line = metrics["upstream"]
+                       local erb = metrics["erb"]
+
+                       get_values(hostname, errors, near_errors, "near")
+                       get_values(hostname, errors, far_errors, "far")
+                       get_values(hostname, line_vars, down_line, "down")
+                       get_values(hostname, line_vars, up_line, "up")
+                       get_values(hostname, erb_vars, erb, "")
+               end
+               get_values(hostname, general_vars, metrics, "")
+               return 0
+       end
+
+       collectd.log_error("collectd-mod-dsl(lua): No ubus dsl object found")
+       return 0
+end
+
+collectd.register_read(read)
index 0641b3a8d2076762a085229e3f52e6b82608314d..23605938a6bde90c0dbe8fd4943a7794efe60244 100644 (file)
@@ -1,12 +1,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=yq
-PKG_VERSION:=4.13.4
+PKG_VERSION:=4.13.5
 PKG_RELEASE:=$(AUTORELEASE)
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/mikefarah/yq/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=5d18ce2b2877a42a9765fceb7617f5aae3e0bc4e9f44c3048f9c9928a19bf965
+PKG_HASH:=c0d637e7d7d5f370960af713e0f7e769e1b0876f71a844373d0307cbba68c4b2
 
 PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
 PKG_LICENSE:=MIT