From c3547505ee654a6ef0ba5b2a1ed91f215bc6a5f4 Mon Sep 17 00:00:00 2001 From: Martin Osvald Date: Wed, 28 Jan 2026 16:29:57 +0100 Subject: [PATCH] New version 2.20 - Add support for NAT64/pref64 Resolves: RHEL-141379 --- .gitignore | 34 +++------------------------- 256.patch | 41 ++++++++++++++++++++++++++++++++++ 262.patch | 40 +++++++++++++++++++++++++++++++++ radvd-c99-1.patch | 31 -------------------------- radvd-c99-2.patch | 34 ---------------------------- radvd-configure-c99.patch | 47 --------------------------------------- radvd.spec | 19 +++++++++------- sources | 3 ++- 8 files changed, 97 insertions(+), 152 deletions(-) create mode 100644 256.patch create mode 100644 262.patch delete mode 100644 radvd-c99-1.patch delete mode 100644 radvd-c99-2.patch delete mode 100644 radvd-configure-c99.patch diff --git a/.gitignore b/.gitignore index e0e804b..d634bd2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,31 +1,3 @@ -radvd-1.6.tar.gz -/radvd-1.7.tar.gz -/radvd-1.8.tar.gz -/radvd-1.8.1.tar.gz -/radvd-1.8.2.tar.gz -/radvd-1.8.3.tar.gz -/radvd-1.8.4.tar.gz -/radvd-1.8.5.tar.gz -/radvd-1.9.tar.gz -/radvd-1.9.1.tar.gz -/radvd-1.9.2.tar.gz -/radvd-1.9.7.tar.gz -/radvd-1.9.8.tar.gz -/radvd-1.9.9.tar.gz -/radvd-1.10.0.tar.gz -/radvd-1.11.tar.gz -/radvd-1.12.tar.gz -/radvd-1.14.tar.gz -/radvd-2.0.tar.bz2 -/radvd-2.1.tar.bz2 -/radvd-2.2.tar.bz2 -/radvd-2.5.tar.bz2 -/radvd-2.8.tar.bz2 -/radvd-2.10.tar.bz2 -/radvd-2.11.tar.xz -/radvd-2.13.tar.xz -/radvd-2.14.tar.xz -/radvd-2.16.tar.xz -/radvd-2.17.tar.xz -/radvd-2.18.tar.xz -/radvd-2.19.tar.xz +/.*.swp +/radvd-*.tar.xz +/radvd-*.tar.xz.asc diff --git a/256.patch b/256.patch new file mode 100644 index 0000000..dc07200 --- /dev/null +++ b/256.patch @@ -0,0 +1,41 @@ +From b4eba9a0259abb4a9c2337c77758072130e1b6ff Mon Sep 17 00:00:00 2001 +From: "Robin H. Johnson" +Date: Thu, 2 Jan 2025 17:26:51 -0800 +Subject: [PATCH] feat: allow libc strlcpy + +Signed-off-by: Robin H. Johnson +Fixes: https://github.com/radvd-project/radvd/issues/248 +--- + configure.ac | 19 +++++++++++++++++-- + 1 file changed, 17 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index a0b2804..d6f7287 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -93,8 +93,23 @@ AC_MSG_RESULT(no) + + dnl clock_gettime is in librt for glibc <2.17 + AC_SEARCH_LIBS(clock_gettime, rt) +-dnl strlcpy is in libbsd +-AC_SEARCH_LIBS(strlcpy, bsd) ++ ++AC_CHECK_FUNC(strlcpy, found_strlcpy=yes, found_strlcpy=no) ++if test "x$found_strlcpy" = xno; then ++ dnl check libbsd for strlcpy ++ PKG_CHECK_MODULES([BSD], [libbsd >= 0]) ++ AC_SEARCH_LIBS(strlcpy, bsd, ++ [ ++ found_bsd_strlcpy=yes ++ CFLAGS="$BSD_CFLAGS $CFLAGS" ++ LIBS="$BSD_LIBS $LIBS" ++ ], ++ found_bsd_strlcpy=no) ++fi ++ ++if test "x$found_strlcpy" = xno && test "x$found_bsd_strlcpy" = xno; then ++ AC_MSG_ERROR(cannot find strlcpy - upgrade your libc or install libbsd) ++fi + + dnl Needed for normal compile + AC_PROG_INSTALL diff --git a/262.patch b/262.patch new file mode 100644 index 0000000..6764803 --- /dev/null +++ b/262.patch @@ -0,0 +1,40 @@ +From 8a0aa7c266500fffc8493fc4110ea2ab2cf3963a Mon Sep 17 00:00:00 2001 +From: Yaakov Selkowitz +Date: Wed, 26 Feb 2025 09:57:00 -0500 +Subject: [PATCH] Avoid libbsd header with libc strlcpy + +While #256 avoided the libbsd library dependency, this avoids the header +requirement except when libbsd is actually needed. + +Signed-off-by: Yaakov Selkowitz +--- + configure.ac | 2 +- + includes.h | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index f82d3acb..1e764a5f 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -103,7 +103,7 @@ AC_MSG_RESULT(no) + dnl clock_gettime is in librt for glibc <2.17 + AC_SEARCH_LIBS(clock_gettime, rt) + +-AC_CHECK_FUNC(strlcpy, found_strlcpy=yes, found_strlcpy=no) ++AC_CHECK_FUNCS(strlcpy, found_strlcpy=yes, found_strlcpy=no) + if test "x$found_strlcpy" = xno; then + dnl check libbsd for strlcpy + PKG_CHECK_MODULES([BSD], [libbsd >= 0]) +diff --git a/includes.h b/includes.h +index 2a7a8256..13f14406 100644 +--- a/includes.h ++++ b/includes.h +@@ -26,7 +26,7 @@ + #include + #include + #include +-#ifndef __FreeBSD__ ++#ifndef HAVE_STRLCPY + #include // strlcpy + #endif + #include diff --git a/radvd-c99-1.patch b/radvd-c99-1.patch deleted file mode 100644 index 0f81d2c..0000000 --- a/radvd-c99-1.patch +++ /dev/null @@ -1,31 +0,0 @@ -commit ff7ab0cf445236f30e58531175ba912614fed952 -Author: Sam James -Date: Thu Nov 17 22:03:25 2022 +0000 - - Makefile.am: drop -Wno-implicit-function-declaration - - 1. Clang 16 makes -Wimplicit-function-declaration error by default - (and it's planned that GCC 14 will do the same) so we need to fix - the real problem. This is papering over it. - - 2. It's not true that there's nothing we can do about it. Fix in a follow-up - commit. - - Bug: https://bugs.gentoo.org/880823 - Fixes: b5e6b09cf914a960ac3b1676b77d3ea9f91821c7 - Signed-off-by: Sam James - -diff --git a/Makefile.am b/Makefile.am -index 3a52e3a4abab088b..88b0c3514d265524 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -66,9 +66,6 @@ radvd_LDADD = \ - scanner.c: gram.h - gram.h: gram.c - --libradvd_parser_a_CFLAGS = \ -- -Wno-implicit-function-declaration -- - libradvd_parser_a_SOURCES = \ - gram.h \ - gram.y \ diff --git a/radvd-c99-2.patch b/radvd-c99-2.patch deleted file mode 100644 index b4b10c5..0000000 --- a/radvd-c99-2.patch +++ /dev/null @@ -1,34 +0,0 @@ -commit e0f5bcd9091a5f7abd423fce9f372c8079849a64 -Author: Sam James -Date: Thu Nov 17 22:03:25 2022 +0000 - - gram.y: Fix -Wimplicit-function-declaration - - Clang 16 makes -Wimplicit-function-declaration an error by default. - - For more information, see LWN.net [0] or LLVM's Discourse [1], the Gentoo wiki [2], - or the (new) c-std-porting mailing list [3]. - - [0] https://lwn.net/Articles/913505/ - [1] https://discourse.llvm.org/t/configure-script-breakage-with-the-new-werror-implicit-function-declaration/65213 - [2] https://wiki.gentoo.org/wiki/Modern_C_porting - [3] hosted at lists.linux.dev. - - Bug: https://bugs.gentoo.org/880823 - Signed-off-by: Sam James - -diff --git a/gram.y b/gram.y -index 4115390c249ab62b..2b142125e9dd05ae 100644 ---- a/gram.y -+++ b/gram.y -@@ -20,6 +20,10 @@ - - #define YYERROR_VERBOSE 1 - -+int yylex (void); -+void yyset_in (FILE * _in_str); -+int yylex_destroy (void); -+ - #if 0 /* no longer necessary? */ - #ifndef HAVE_IN6_ADDR_S6_ADDR - # ifdef __FreeBSD__ diff --git a/radvd-configure-c99.patch b/radvd-configure-c99.patch deleted file mode 100644 index e7e2cfe..0000000 --- a/radvd-configure-c99.patch +++ /dev/null @@ -1,47 +0,0 @@ -commit 5acb1c64766dfaf37c9745632f99feecf11d1403 -Author: Sam James -Date: Fri Feb 3 02:33:13 2023 +0000 - - configure.ac: Fix -Wint-conversion warnings - - These become fatal with Clang 15 and may lead to incorrect configure - test results. - - ``` - -ignoreme: warning: incompatible pointer to integer conversion initializing 'int' with an expression of type 'uint16_t[8]' (aka 'unsigned short[8]') [-Wint-conversion] - +ignoreme: error: incompatible pointer to integer conversion initializing 'int' with an expression of type 'uint16_t[8]' (aka 'unsigned short[8]') [-Wint-conversion] - int u = in6_u.s6_addr16; - ^ ~~~~~~~~~~~~~~~ - ``` - - Signed-off-by: Sam James - -diff --git a/configure.ac b/configure.ac -index 23c21e7b4abedca1..a3976b605fa096e9 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -174,15 +174,19 @@ AC_HEADER_TIME - - dnl Checks for typedefs, structures, and compiler characteristics. - AC_MSG_CHECKING(whether struct sockaddr_in6 has sin6_scope_id) --AC_TRY_COMPILE([#include --#include ], [static struct sockaddr_in6 ac_sin6; int ac_size = --sizeof (ac_sin6.sin6_scope_id);], [AC_MSG_RESULT(yes); AC_DEFINE([HAVE_SIN6_SCOPE_ID], -+AC_TRY_COMPILE([#include -+#include -+#include ], [ -+static struct sockaddr_in6 ac_sin6; -+uint32_t ac_size = sizeof (ac_sin6.sin6_scope_id); -+], [AC_MSG_RESULT(yes); AC_DEFINE([HAVE_SIN6_SCOPE_ID], - 1, [whether struct sockaddr_in6 has sin6_scope_id])], - AC_MSG_RESULT(no)) - - AC_MSG_CHECKING(whether struct in6_addr has u6_addrXX and defines s6_addrXX) --AC_TRY_COMPILE([#include ], [static struct in6_addr in6_u; --int u = in6_u.s6_addr16;], [AC_MSG_RESULT(yes); AC_DEFINE([HAVE_IN6_ADDR_S6_ADDR], -+AC_TRY_COMPILE([#include -+#include ], [static struct in6_addr in6_u; -+uint16_t u = in6_u.s6_addr16[0];], [AC_MSG_RESULT(yes); AC_DEFINE([HAVE_IN6_ADDR_S6_ADDR], - 1, [whether struct in6_addr has u6_addrXX and defines s6_addrXX])], - AC_MSG_RESULT(no)) - diff --git a/radvd.spec b/radvd.spec index 03903e2..3b96c1c 100644 --- a/radvd.spec +++ b/radvd.spec @@ -1,7 +1,7 @@ -Summary: A Router Advertisement daemon Name: radvd -Version: 2.19 +Version: 2.20 Release: %autorelease +Summary: A Router Advertisement daemon License: radvd URL: https://radvd.litech.org @@ -10,9 +10,10 @@ Source1: https://radvd.litech.org/dist/%{name}-%{version}.tar.xz.asc # Robin Hugh Johnson's public key Source2: https://github.com/robbat2.gpg Source3: radvd.sysusers -Patch0: radvd-c99-1.patch -Patch1: radvd-c99-2.patch -Patch2: radvd-configure-c99.patch + +# allow glibc strlcpy, avoid libbsd dependency +Patch0: https://github.com/radvd-project/radvd/pull/256.patch +Patch1: https://github.com/radvd-project/radvd/pull/262.patch BuildRequires: make BuildRequires: gcc @@ -42,7 +43,7 @@ services. %prep %{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}' -%autosetup -p1 +%autosetup -p1 for F in CHANGES; do iconv -f iso-8859-1 -t utf-8 < "$F" > "${F}.new" @@ -51,7 +52,7 @@ for F in CHANGES; do done %build -autoreconf -iv +autoreconf -fiv export CFLAGS="$RPM_OPT_FLAGS -fPIE " export LDFLAGS='-pie -Wl,-z,relro,-z,now,-z,noexecstack,-z,nodlopen' %configure \ @@ -99,7 +100,9 @@ make check %{_sysusersdir}/radvd.conf %dir %attr(755,radvd,radvd) /run/radvd/ %doc radvd.conf.example -%{_mandir}/*/* +%{_mandir}/man5/radvd.conf.5* +%{_mandir}/man8/radvd.8* +%{_mandir}/man8/radvdump.8* %{_sbindir}/radvd %{_sbindir}/radvdump diff --git a/sources b/sources index 317d085..a2b6e96 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ -SHA512 (radvd-2.19.tar.xz) = a1eb40af90fc83ebab2517c16a0f7e85c11338ab276bec400b7c33177748d1e36bc5abd7e373b6742f12f7c690dd7ae6b951bc832c7de9bbb56f7e9bc844ed22 +SHA512 (radvd-2.20.tar.xz) = 22d6d8888aae326d65e82359879082f5b7d6977eacb198e3f4af2ae9fba4c1d8723eccebd8857ddc60053ae08f0ca0a5406729883dd76766d3ec61a4b5e5e956 +SHA512 (radvd-2.20.tar.xz.asc) = 2fdd1fb5b790fd42c9dbbd98e31d4b2c7029e9faf88ae76cd64bcc2e5e509a5c537dbe39f2bc60d780cd671b70b155843680dc8818a63af5d372e7f8b7908ddf