diff options
-rw-r--r-- | lang/python/python-pyotp/Makefile | 4 | ||||
-rw-r--r-- | multimedia/grilo-plugins/Makefile | 48 | ||||
-rw-r--r-- | multimedia/grilo-plugins/patches/001-no-help-po-tests.patch | 15 | ||||
-rw-r--r-- | multimedia/grilo-plugins/patches/001-remove-docs-gnome-from-configure.ac.patch | 31 | ||||
-rw-r--r-- | multimedia/grilo-plugins/src/m4/gnome-common.m4 | 32 | ||||
-rw-r--r-- | multimedia/grilo-plugins/src/m4/gnome-compiler-flags.m4 | 184 | ||||
-rw-r--r-- | multimedia/grilo/Makefile | 22 | ||||
-rw-r--r-- | multimedia/grilo/patches/010-remove-xml-parser.patch | 19 | ||||
-rw-r--r-- | net/frr/Makefile | 6 | ||||
-rw-r--r-- | net/frr/patches/001-vti_interface_fix.patch | 2 | ||||
-rw-r--r-- | net/frr/patches/002-bgp_clippy_typo.patch | 11 | ||||
-rw-r--r-- | net/frr/patches/005-fix_OSPF_BFD.patch | 71 | ||||
-rw-r--r-- | net/nginx-util/Makefile | 2 | ||||
-rw-r--r-- | net/nginx-util/src/CMakeLists.txt | 2 | ||||
-rw-r--r-- | net/nginx-util/src/nginx-ssl-util.cpp | 30 | ||||
-rw-r--r-- | net/nginx-util/src/nginx-util.cpp | 3 | ||||
-rw-r--r-- | net/nginx-util/src/px5g.cpp | 2 | ||||
-rw-r--r-- | net/nginx-util/src/ubus-cxx.hpp | 30 |
18 files changed, 91 insertions, 423 deletions
diff --git a/lang/python/python-pyotp/Makefile b/lang/python/python-pyotp/Makefile index 4eb1c7a25..e04a92f7b 100644 --- a/lang/python/python-pyotp/Makefile +++ b/lang/python/python-pyotp/Makefile @@ -8,11 +8,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=pyotp -PKG_VERSION:=2.2.7 +PKG_VERSION:=2.3.0 PKG_RELEASE:=1 PYPI_NAME:=$(PKG_NAME) -PKG_HASH:=be0ffeabddaa5ee53e7204e7740da842d070cf69168247a3d0c08541b84de602 +PKG_HASH:=fc537e8acd985c5cbf51e11b7d53c42276fee017a73aec7c07380695671ca1a1 PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz> PKG_LICENSE:=MIT diff --git a/multimedia/grilo-plugins/Makefile b/multimedia/grilo-plugins/Makefile index 632fe4de4..b976b42c9 100644 --- a/multimedia/grilo-plugins/Makefile +++ b/multimedia/grilo-plugins/Makefile @@ -6,8 +6,8 @@ include $(TOPDIR)/rules.mk PKG_NAME:=grilo-plugins -PKG_VERSION:=0.3.7 -PKG_RELEASE:=3 +PKG_VERSION:=0.3.10 +PKG_RELEASE:=1 PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org> PKG_LICENSE:=LGPLv2.1 @@ -15,14 +15,15 @@ PKG_LICENSE_FILES:=COPYING PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@GNOME/grilo-plugins/0.3/ -PKG_HASH:=fc2f3bbc319136e53e1efb6659fa65b6af45db114b6621008f9abba64fad6820 +PKG_HASH:=803b360fdb6d5fde1e647bdc40c16de3031b1a95b347b48b65fe4fc27a548d4a PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 -PKG_FIXUP:=autoreconf +PKG_BUILD_DEPENDS:=meson/host include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/nls.mk +include ../../devel/meson/meson.mk define Package/grilo-plugins/Default SECTION:=multimedia @@ -44,28 +45,23 @@ define Package/grilo/decription plugins to get information from a number of sources. endef -CONFIGURE_ARGS += \ - --enable-static \ - --disable-compile-warnings \ - --disable-goa \ - --disable-filesystem \ - --disable-optical-media \ - --disable-youtube \ - --disable-flickr \ - --disable-podcasts \ - --disable-bookmarks \ - --disable-lua-factory \ - --disable-metadata-store \ - --disable-vimeo \ - --disable-tracker \ - --disable-local-metadata \ - --disable-chromaprint \ - --disable-thetvdb \ - --disable-tmdb \ - --disable-freebox - -MAKE_FLAGS += \ - GLIB_COMPILE_RESOURCES="$(STAGING_DIR_HOSTPKG)/bin/glib-compile-resources" +MESON_ARGS += \ + -Denable-filesystem=no \ + -Denable-optical-media=no \ + -Denable-youtube=no \ + -Denable-flickr=no \ + -Denable-podcasts=no \ + -Denable-bookmarks=no \ + -Denable-lua-factory=no \ + -Denable-metadata-store=no \ + -Denable-vimeo=no \ + -Denable-tracker=no \ + -Denable-local-metadata=no \ + -Denable-chromaprint=no \ + -Denable-thetvdb=no \ + -Denable-tmdb=no \ + -Denable-freebox=no \ + define Package/grilo-plugins/install $(INSTALL_DIR) $(1)/usr/lib/grilo-0.3 endef diff --git a/multimedia/grilo-plugins/patches/001-no-help-po-tests.patch b/multimedia/grilo-plugins/patches/001-no-help-po-tests.patch new file mode 100644 index 000000000..f711b53af --- /dev/null +++ b/multimedia/grilo-plugins/patches/001-no-help-po-tests.patch @@ -0,0 +1,15 @@ +Fix build error on OpenWrt build servers. See: + + https://github.com/openwrt/packages/pull/10433#issuecomment-549242840 + https://github.com/mesonbuild/meson/issues/821 + +diff -u --recursive grilo-plugins-0.3.10-vanilla/meson.build grilo-plugins-0.3.10/meson.build +--- grilo-plugins-0.3.10-vanilla/meson.build 2019-09-12 11:48:29.000000000 -0400 ++++ grilo-plugins-0.3.10/meson.build 2020-01-20 11:17:22.803149935 -0500 +@@ -173,6 +173,3 @@ + rootdir = include_directories('.') + + subdir('src') +-subdir('help') +-subdir('po') +-subdir('tests') diff --git a/multimedia/grilo-plugins/patches/001-remove-docs-gnome-from-configure.ac.patch b/multimedia/grilo-plugins/patches/001-remove-docs-gnome-from-configure.ac.patch deleted file mode 100644 index 8fee0880c..000000000 --- a/multimedia/grilo-plugins/patches/001-remove-docs-gnome-from-configure.ac.patch +++ /dev/null @@ -1,31 +0,0 @@ ---- a/configure.ac -+++ b/configure.ac -@@ -1316,7 +1316,7 @@ AC_SUBST(DEPS_OPENSUBTITLES_LIBS) - # GETTEXT/INTLTOOL - # ---------------------------------------------------------- - --IT_PROG_INTLTOOL([0.40.0]) -+IT_PROG_INTLTOOL([0.40.0], [no-xml]) - GETTEXT_PACKAGE=grilo-plugins - AC_SUBST(GETTEXT_PACKAGE) - AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [The domain to use with gettext]) -@@ -1334,7 +1334,7 @@ AC_SUBST([builddir]) - # DOCUMENTATION - # ---------------------------------------------------------- - --YELP_HELP_INIT -+#YELP_HELP_INIT - - # ---------------------------------------------------------- - # OUTPUT ---- a/Makefile.am -+++ b/Makefile.am -@@ -10,7 +10,7 @@ include $(top_srcdir)/release.mk - - ACLOCAL_AMFLAGS = -I m4 - --SUBDIRS = src help po tests -+SUBDIRS = src po - - MAINTAINERCLEANFILES = \ - $(GITIGNORE_MAINTAINERCLEANFILES_TOPLEVEL) \ diff --git a/multimedia/grilo-plugins/src/m4/gnome-common.m4 b/multimedia/grilo-plugins/src/m4/gnome-common.m4 deleted file mode 100644 index a8d0fda43..000000000 --- a/multimedia/grilo-plugins/src/m4/gnome-common.m4 +++ /dev/null @@ -1,32 +0,0 @@ -# gnome-common.m4 -# -# serial 3 -# - -AU_DEFUN([GNOME_DEBUG_CHECK], -[ - AX_CHECK_ENABLE_DEBUG([no],[GNOME_ENABLE_DEBUG]) -], -[[$0: This macro is deprecated. You should use AX_CHECK_ENABLE_DEBUG instead and -replace uses of GNOME_ENABLE_DEBUG with ENABLE_DEBUG. -See: http://www.gnu.org/software/autoconf-archive/ax_check_enable_debug.html#ax_check_enable_debug]]) - -dnl GNOME_MAINTAINER_MODE_DEFINES () -dnl define DISABLE_DEPRECATED -dnl -AU_DEFUN([GNOME_MAINTAINER_MODE_DEFINES], -[ - AC_REQUIRE([AM_MAINTAINER_MODE]) - - DISABLE_DEPRECATED="" - if test $USE_MAINTAINER_MODE = yes; then - DOMAINS="GCONF BONOBO BONOBO_UI GNOME LIBGLADE GNOME_VFS WNCK LIBSOUP" - for DOMAIN in $DOMAINS; do - DISABLE_DEPRECATED="$DISABLE_DEPRECATED -D${DOMAIN}_DISABLE_DEPRECATED -D${DOMAIN}_DISABLE_SINGLE_INCLUDES" - done - fi - - AC_SUBST(DISABLE_DEPRECATED) -], -[[$0: This macro is deprecated. All of the modules it disables deprecations for -are obsolete. Remove it and all uses of DISABLE_DEPRECATED.]]) diff --git a/multimedia/grilo-plugins/src/m4/gnome-compiler-flags.m4 b/multimedia/grilo-plugins/src/m4/gnome-compiler-flags.m4 deleted file mode 100644 index 49ebb959b..000000000 --- a/multimedia/grilo-plugins/src/m4/gnome-compiler-flags.m4 +++ /dev/null @@ -1,184 +0,0 @@ -# gnome-compiler-flags.m4 -# -# serial 4 -# - -dnl GNOME_COMPILE_WARNINGS -dnl Turn on many useful compiler warnings and substitute the result into -dnl WARN_CFLAGS -dnl For now, only works on GCC -dnl Pass the default value of the --enable-compile-warnings configure option as -dnl the first argument to the macro, defaulting to 'yes'. -dnl Additional warning/error flags can be passed as an optional second argument. -dnl -dnl For example: GNOME_COMPILE_WARNINGS([maximum],[-Werror=some-flag -Wfoobar]) -AU_DEFUN([GNOME_COMPILE_WARNINGS],[ - dnl ****************************** - dnl More compiler warnings - dnl ****************************** - - AC_ARG_ENABLE(compile-warnings, - AS_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@], - [Turn on compiler warnings]),, - [enable_compile_warnings="m4_default([$1],[yes])"]) - - if test "x$GCC" != xyes; then - enable_compile_warnings=no - fi - - warning_flags= - realsave_CFLAGS="$CFLAGS" - - dnl These are warning flags that aren't marked as fatal. Can be - dnl overridden on a per-project basis with -Wno-foo. - base_warn_flags=" \ - -Wall \ - -Wstrict-prototypes \ - -Wnested-externs \ - " - - dnl These compiler flags typically indicate very broken or suspicious - dnl code. Some of them such as implicit-function-declaration are - dnl just not default because gcc compiles a lot of legacy code. - dnl We choose to make this set into explicit errors. - base_error_flags=" \ - -Werror=missing-prototypes \ - -Werror=implicit-function-declaration \ - -Werror=pointer-arith \ - -Werror=init-self \ - -Werror=format-security \ - -Werror=format=2 \ - -Werror=missing-include-dirs \ - -Werror=return-type \ - " - - dnl Additional warning or error flags provided by the module author to - dnl allow stricter standards to be imposed on a per-module basis. - dnl The author can pass -W or -Werror flags here as they see fit. - additional_flags="m4_default([$2],[])" - - case "$enable_compile_warnings" in - no) - warning_flags="-w" - ;; - minimum) - warning_flags="-Wall" - ;; - yes|maximum|error) - warning_flags="$base_warn_flags $base_error_flags $additional_flags" - ;; - *) - AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings) - ;; - esac - - if test "$enable_compile_warnings" = "error" ; then - warning_flags="$warning_flags -Werror" - fi - - dnl Check whether GCC supports the warning options - for option in $warning_flags; do - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $option" - AC_MSG_CHECKING([whether gcc understands $option]) - AC_TRY_COMPILE([], [], - has_option=yes, - has_option=no,) - CFLAGS="$save_CFLAGS" - AC_MSG_RESULT([$has_option]) - if test $has_option = yes; then - tested_warning_flags="$tested_warning_flags $option" - fi - unset has_option - unset save_CFLAGS - done - unset option - CFLAGS="$realsave_CFLAGS" - AC_MSG_CHECKING(what warning flags to pass to the C compiler) - AC_MSG_RESULT($tested_warning_flags) - - AC_ARG_ENABLE(iso-c, - AS_HELP_STRING([--enable-iso-c], - [Try to warn if code is not ISO C ]),, - [enable_iso_c=no]) - - AC_MSG_CHECKING(what language compliance flags to pass to the C compiler) - complCFLAGS= - if test "x$enable_iso_c" != "xno"; then - if test "x$GCC" = "xyes"; then - case " $CFLAGS " in - *[\ \ ]-ansi[\ \ ]*) ;; - *) complCFLAGS="$complCFLAGS -ansi" ;; - esac - case " $CFLAGS " in - *[\ \ ]-pedantic[\ \ ]*) ;; - *) complCFLAGS="$complCFLAGS -pedantic" ;; - esac - fi - fi - AC_MSG_RESULT($complCFLAGS) - - WARN_CFLAGS="$tested_warning_flags $complCFLAGS" - AC_SUBST(WARN_CFLAGS) -], -[[$0: This macro is deprecated. You should use AX_COMPILER_FLAGS instead and -eliminate use of --enable-iso-c. -See: http://www.gnu.org/software/autoconf-archive/ax_compiler_flags.html#ax_compiler_flags]]) - -dnl For C++, do basically the same thing. - -AU_DEFUN([GNOME_CXX_WARNINGS],[ - AC_ARG_ENABLE(cxx-warnings, - AS_HELP_STRING([--enable-cxx-warnings=@<:@no/minimum/yes@:>@] - [Turn on compiler warnings.]),, - [enable_cxx_warnings="m4_default([$1],[minimum])"]) - - AC_MSG_CHECKING(what warning flags to pass to the C++ compiler) - warnCXXFLAGS= - if test "x$GXX" != xyes; then - enable_cxx_warnings=no - fi - if test "x$enable_cxx_warnings" != "xno"; then - if test "x$GXX" = "xyes"; then - case " $CXXFLAGS " in - *[\ \ ]-Wall[\ \ ]*) ;; - *) warnCXXFLAGS="-Wall -Wno-unused" ;; - esac - - ## -W is not all that useful. And it cannot be controlled - ## with individual -Wno-xxx flags, unlike -Wall - if test "x$enable_cxx_warnings" = "xyes"; then - warnCXXFLAGS="$warnCXXFLAGS -Wshadow -Woverloaded-virtual" - fi - fi - fi - AC_MSG_RESULT($warnCXXFLAGS) - - AC_ARG_ENABLE(iso-cxx, - AS_HELP_STRING([--enable-iso-cxx], - [Try to warn if code is not ISO C++ ]),, - [enable_iso_cxx=no]) - - AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler) - complCXXFLAGS= - if test "x$enable_iso_cxx" != "xno"; then - if test "x$GXX" = "xyes"; then - case " $CXXFLAGS " in - *[\ \ ]-ansi[\ \ ]*) ;; - *) complCXXFLAGS="$complCXXFLAGS -ansi" ;; - esac - - case " $CXXFLAGS " in - *[\ \ ]-pedantic[\ \ ]*) ;; - *) complCXXFLAGS="$complCXXFLAGS -pedantic" ;; - esac - fi - fi - AC_MSG_RESULT($complCXXFLAGS) - - WARN_CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS" - AC_SUBST(WARN_CXXFLAGS) -], -[[$0: This macro is deprecated. You should use AX_COMPILER_FLAGS instead and -eliminate use of --enable-iso-cxx. -See: http://www.gnu.org/software/autoconf-archive/ax_compiler_flags.html#ax_compiler_flags]]) diff --git a/multimedia/grilo/Makefile b/multimedia/grilo/Makefile index 49887c034..b09a6789d 100644 --- a/multimedia/grilo/Makefile +++ b/multimedia/grilo/Makefile @@ -6,8 +6,8 @@ include $(TOPDIR)/rules.mk PKG_NAME:=grilo -PKG_VERSION:=0.3.6 -PKG_RELEASE:=4 +PKG_VERSION:=0.3.10 +PKG_RELEASE:=1 PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org> @@ -16,14 +16,15 @@ PKG_LICENSE_FILES:=COPYING PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@GNOME/grilo/0.3/ -PKG_HASH:=1e65ca82dd58020451417fde79310d4b940adc3f63ab59997419c52ed3bc9c91 +PKG_HASH:=7e44b2e74c31ed24eb97e43265a9e41effe8660287b02295111805c7bda7f1e8 PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 -PKG_BUILD_DEPENDS:=vala/host +PKG_BUILD_DEPENDS:=meson/host vala/host include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/nls.mk +include ../../devel/meson/meson.mk define Package/grilo SECTION:=multimedia @@ -38,13 +39,12 @@ define Package/grilo/decription multimedia content, using a pluggable system. endef -CONFIGURE_ARGS += \ - --disable-compile-warnings \ - --disable-debug \ - --disable-gtk-doc-html \ - --disable-introspection \ - --disable-test-ui \ - --disable-vala +MESON_ARGS += \ + -Denable-grl-pls=false \ + -Denable-gtk-doc=false \ + -Denable-introspection=false \ + -Denable-test-ui=false \ + -Denable-vala=false \ define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include/ diff --git a/multimedia/grilo/patches/010-remove-xml-parser.patch b/multimedia/grilo/patches/010-remove-xml-parser.patch deleted file mode 100644 index 7d4e0f7be..000000000 --- a/multimedia/grilo/patches/010-remove-xml-parser.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- a/configure -+++ b/configure -@@ -14433,16 +14433,6 @@ else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $IT_PERL_VERSION" >&5 - $as_echo "$IT_PERL_VERSION" >&6; } - fi --if test "x" != "xno-xml"; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML::Parser" >&5 --$as_echo_n "checking for XML::Parser... " >&6; } -- if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 --$as_echo "ok" >&6; } -- else -- as_fn_error $? "XML::Parser perl module is required for intltool" "$LINENO" 5 -- fi --fi - - # Substitute ALL_LINGUAS so we can use it in po/Makefile - diff --git a/net/frr/Makefile b/net/frr/Makefile index e33ab5787..b0c4e1b32 100644 --- a/net/frr/Makefile +++ b/net/frr/Makefile @@ -7,12 +7,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=frr -PKG_VERSION:=7.2 -PKG_RELEASE:=2 +PKG_VERSION:=7.2.1 +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:=6cd5bfb6975133ccf23cc3f3a1c1c9a3f6d6a6c792c763b3ea010db75b3de5b3 +PKG_HASH:=774585564dc00e67c4eb51521cb2a8e584031364916514860227af07b638a408 PKG_MAINTAINER:=Lucian Cristian <lucian.cristian@gmail.com> PKG_DAEMON_AVAILABLE:= \ diff --git a/net/frr/patches/001-vti_interface_fix.patch b/net/frr/patches/001-vti_interface_fix.patch index e7b124b8d..f45e00518 100644 --- a/net/frr/patches/001-vti_interface_fix.patch +++ b/net/frr/patches/001-vti_interface_fix.patch @@ -1,6 +1,6 @@ --- 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 @@ +@@ -226,20 +226,9 @@ while (rn) { route_unlock_node(rn); diff --git a/net/frr/patches/002-bgp_clippy_typo.patch b/net/frr/patches/002-bgp_clippy_typo.patch deleted file mode 100644 index d581a5e17..000000000 --- a/net/frr/patches/002-bgp_clippy_typo.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- 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/005-fix_OSPF_BFD.patch b/net/frr/patches/005-fix_OSPF_BFD.patch deleted file mode 100644 index fb19bec23..000000000 --- a/net/frr/patches/005-fix_OSPF_BFD.patch +++ /dev/null @@ -1,71 +0,0 @@ -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; - diff --git a/net/nginx-util/Makefile b/net/nginx-util/Makefile index 4730b2d1a..b07206c9b 100644 --- a/net/nginx-util/Makefile +++ b/net/nginx-util/Makefile @@ -1,7 +1,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=nginx-util -PKG_VERSION:=1.0 +PKG_VERSION:=1.1 PKG_RELEASE:=1 include $(INCLUDE_DIR)/package.mk diff --git a/net/nginx-util/src/CMakeLists.txt b/net/nginx-util/src/CMakeLists.txt index d78ec5d59..df7440d38 100644 --- a/net/nginx-util/src/CMakeLists.txt +++ b/net/nginx-util/src/CMakeLists.txt @@ -9,7 +9,7 @@ FIND_LIBRARY(ubox NAMES ubox) FIND_LIBRARY(ubus NAMES ubus) INCLUDE_DIRECTORIES(${ubus_include_dir}) -ADD_DEFINITIONS(-Os -Wall -Werror -Wextra --std=c++17 -g3) +ADD_DEFINITIONS(-Os -Wall -Werror -Wextra --std=c++2a -g3) ADD_DEFINITIONS(-Wno-unused-parameter -Wmissing-declarations) SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") diff --git a/net/nginx-util/src/nginx-ssl-util.cpp b/net/nginx-util/src/nginx-ssl-util.cpp index f4a857397..fcd81a405 100644 --- a/net/nginx-util/src/nginx-ssl-util.cpp +++ b/net/nginx-util/src/nginx-ssl-util.cpp @@ -100,7 +100,7 @@ void del_ssl_directives_from(const std::string & name, bool isdefault); void del_ssl(const std::string & name); -static constexpr auto _begin = _Line{ +constexpr auto _begin = _Line{ [](const std::string & /*param*/, const std::string & begin) -> std::string { return begin; }, @@ -110,7 +110,7 @@ static constexpr auto _begin = _Line{ }; -static constexpr auto _space = _Line{ +constexpr auto _space = _Line{ [](const std::string & /*param*/, const std::string & /*begin*/) -> std::string { return std::string{" "}; }, @@ -121,7 +121,7 @@ static constexpr auto _space = _Line{ }; -static constexpr auto _newline = _Line{ +constexpr auto _newline = _Line{ [](const std::string & /*param*/, const std::string & /*begin*/) -> std::string { return std::string{"\n"}; }, @@ -132,7 +132,7 @@ static constexpr auto _newline = _Line{ }; -static constexpr auto _end = _Line{ +constexpr auto _end = _Line{ [](const std::string & /*param*/, const std::string & /*begin*/) -> std::string { return std::string{";"}; }, @@ -144,7 +144,7 @@ static constexpr auto _end = _Line{ template<char clim='\0'> -static constexpr auto _capture = _Line{ +constexpr auto _capture = _Line{ [](const std::string & param, const std::string & /*begin*/) -> std::string { return '\'' + param + '\''; }, @@ -159,10 +159,14 @@ static constexpr auto _capture = _Line{ template<const std::string_view & strptr, char clim='\0'> -static constexpr auto _escape = _Line{ +constexpr auto _escape = _Line{ [](const std::string & /*param*/, const std::string & /*begin*/) -> std::string - { return clim + std::string{strptr.data()} + clim; }, + { + return clim=='\0' ? + std::string{strptr.data()} : + clim + std::string{strptr.data()} + clim; + }, [](const std::string & /*param*/, const std::string & /*begin*/) -> std::string @@ -184,17 +188,17 @@ static constexpr auto _escape = _Line{ }; -static constexpr std::string_view _server_name = "server_name"; +constexpr std::string_view _server_name = "server_name"; -static constexpr std::string_view _include = "include"; +constexpr std::string_view _include = "include"; -static constexpr std::string_view _ssl_certificate = "ssl_certificate"; +constexpr std::string_view _ssl_certificate = "ssl_certificate"; -static constexpr std::string_view _ssl_certificate_key = "ssl_certificate_key"; +constexpr std::string_view _ssl_certificate_key = "ssl_certificate_key"; -static constexpr std::string_view _ssl_session_cache = "ssl_session_cache"; +constexpr std::string_view _ssl_session_cache = "ssl_session_cache"; -static constexpr std::string_view _ssl_session_timeout = "ssl_session_timeout"; +constexpr std::string_view _ssl_session_timeout = "ssl_session_timeout"; // For a compile time regex lib, this must be fixed, use one of these options: diff --git a/net/nginx-util/src/nginx-util.cpp b/net/nginx-util/src/nginx-util.cpp index 7e675986a..935a005f2 100644 --- a/net/nginx-util/src/nginx-util.cpp +++ b/net/nginx-util/src/nginx-util.cpp @@ -91,7 +91,8 @@ void get_env() std::cout<<"LAN_LISTEN="<<"'"<<LAN_LISTEN<<"'"<<std::endl; #ifdef NGINX_OPENSSL std::cout<<"LAN_SSL_LISTEN="<<"'"<<LAN_SSL_LISTEN<<"'"<<std::endl; - std::cout<<"SSL_SESSION_CACHE_ARG="<<"'"<<LAN_NAME<<"'"<<std::endl; + std::cout<<"SSL_SESSION_CACHE_ARG="<<"'"<<SSL_SESSION_CACHE_ARG(LAN_NAME)<< + "'"<<std::endl; std::cout<<"SSL_SESSION_TIMEOUT_ARG="<<"'"<<SSL_SESSION_TIMEOUT_ARG<<"'\n"; std::cout<<"ADD_SSL_FCT="<<"'"<<ADD_SSL_FCT<<"'"<<std::endl; #endif diff --git a/net/nginx-util/src/px5g.cpp b/net/nginx-util/src/px5g.cpp index 56a063254..5ad13357b 100644 --- a/net/nginx-util/src/px5g.cpp +++ b/net/nginx-util/src/px5g.cpp @@ -1,9 +1,9 @@ +#include "px5g-openssl.hpp" #include <array> #include <iostream> #include <string> #include <string_view> #include <unistd.h> -#include "px5g-openssl.hpp" class argv_view { // TODO(pst): use std::span when available. diff --git a/net/nginx-util/src/ubus-cxx.hpp b/net/nginx-util/src/ubus-cxx.hpp index 21dc26ff8..22edae77e 100644 --- a/net/nginx-util/src/ubus-cxx.hpp +++ b/net/nginx-util/src/ubus-cxx.hpp @@ -109,28 +109,29 @@ extern "C" { //TODO(pst): remove when in upstream namespace ubus { +using msg_ptr = std::shared_ptr<const blob_attr>; using strings = std::vector<std::string>; -inline void append(strings & /*dest*/) {} +inline auto concat(strings dest) { return dest; } template<class ...Strings> -inline void append(strings & dest, strings src, Strings ...more) +inline auto concat(strings dest, strings src, Strings ...more) { dest.reserve(dest.size() + src.size()); dest.insert(std::end(dest), std::make_move_iterator(std::begin(src)), std::make_move_iterator(std::end(src))); - append(dest, std::move(more)...); + return concat(std::move(dest), std::move(more)...); } template<class S, class ...Strings> -inline void append(strings & dest, S src, Strings ...more) +inline auto concat(strings dest, S src, Strings ...more) { dest.push_back(std::move(src)); - append(dest, std::move(more)...); + return concat(std::move(dest), std::move(more)...); } @@ -208,7 +209,7 @@ public: auto operator++() -> iterator &; - inline ~iterator() = default; + inline ~iterator() { if (cur.get()==this) { cur.release(); } } }; @@ -218,15 +219,14 @@ class message { private: - const std::shared_ptr<const blob_attr> msg{}; // initialized by callback. + const msg_ptr msg{}; // initialized by callback. const strings keys{}; public: - inline explicit message(std::shared_ptr<const blob_attr> message, - strings filter={""}) + inline explicit message(msg_ptr message, strings filter={""}) : msg{std::move(message)}, keys{std::move(filter)} {} @@ -258,7 +258,7 @@ public: { strings both{}; if (keys.size()!=1 || !keys[0].empty()) { both = keys; } - append(both, std::move(filter)...); + both = concat(std::move(both), std::move(filter)...); return std::move(message{msg, std::move(both)}); } @@ -408,20 +408,20 @@ inline auto call(const char * path, const char * method, const int timeout) ubus::unlock_shared_blob_buf(); if (err==0) { - using msg_t = std::shared_ptr<const blob_attr>; - msg_t msg; - req.priv = &msg; + msg_ptr msg; /* Cannot capture anything (msg), the lambda would be another type. * Pass a location where to save the message as priv pointer when * invoking and get it back here: */ + req.priv = &msg; + req.data_cb = [](ubus_request * req, int /*type*/, blob_attr * msg) { - if ((req == nullptr) || (msg == nullptr)) { return; } + if (req==nullptr || msg==nullptr) { return; } - auto saved = static_cast<msg_t *>(req->priv); + auto saved = static_cast<msg_ptr *>(req->priv); if (saved==nullptr || *saved) { return; } saved->reset(blob_memdup(msg), free); |