Resolves: #1990858 - Possible rebase of frr to version 8.0
This commit is contained in:
parent
a4a03b390a
commit
aae4c57648
1
.gitignore
vendored
1
.gitignore
vendored
@ -6,3 +6,4 @@
|
||||
/frr-7.4.tar.gz
|
||||
/frr-7.5.tar.gz
|
||||
/frr-7.5.1.tar.gz
|
||||
/frr-8.0.tar.gz
|
||||
|
@ -1,20 +0,0 @@
|
||||
diff --git a/tools/frr-reload.py b/tools/frr-reload.py
|
||||
index 208fb11..0692adc 100755
|
||||
--- a/tools/frr-reload.py
|
||||
+++ b/tools/frr-reload.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/python
|
||||
+#!/usr/bin/python3
|
||||
# Frr Reloader
|
||||
# Copyright (C) 2014 Cumulus Networks, Inc.
|
||||
#
|
||||
diff --git a/tools/generate_support_bundle.py b/tools/generate_support_bundle.py
|
||||
index 540b7a1..0876ebb 100755
|
||||
--- a/tools/generate_support_bundle.py
|
||||
+++ b/tools/generate_support_bundle.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/python
|
||||
+#!/usr/bin/python3
|
||||
|
||||
########################################################
|
||||
### Python Script to generate the FRR support bundle ###
|
@ -19,7 +19,7 @@ index 0b7af18..0533e24 100644
|
||||
lib/skiplist.c \
|
||||
lib/sockopt.c \
|
||||
@@ -170,7 +170,6 @@ pkginclude_HEADERS += \
|
||||
lib/linklist.h \
|
||||
lib/link_state.h \
|
||||
lib/log.h \
|
||||
lib/log_vty.h \
|
||||
- lib/md5.h \
|
||||
|
@ -1,52 +0,0 @@
|
||||
From 4e90d19ea3de6b8938d097d84f6df3fcf6eb0422 Mon Sep 17 00:00:00 2001
|
||||
From: Mark Stapp <mjs@voltanet.io>
|
||||
Date: Mon, 15 Feb 2021 13:59:02 -0500
|
||||
Subject: [PATCH] build: detect ICC, only try ICC options if ICC
|
||||
|
||||
Some ICC command-line options can cause confusion for other
|
||||
compilers; test for ICC specifically, and only try to use those
|
||||
options if ICC is being used.
|
||||
|
||||
Signed-off-by: Mark Stapp <mjs@voltanet.io>
|
||||
---
|
||||
configure.ac | 13 +++++++++++--
|
||||
1 file changed, 11 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 266f37a1129..f3d1f38986a 100755
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -191,6 +191,11 @@ CXXFLAGS="$orig_cxxflags"
|
||||
AC_PROG_CC_C99
|
||||
dnl NB: see C11 below
|
||||
|
||||
+dnl Some special handling for ICC later on
|
||||
+if test "$CC" = "icc"; then
|
||||
+ cc_is_icc="yes"
|
||||
+fi
|
||||
+
|
||||
PKG_PROG_PKG_CONFIG
|
||||
|
||||
dnl it's 2019, sed is sed.
|
||||
@@ -252,7 +257,9 @@ AC_DEFUN([AC_LINK_IFELSE_FLAGS], [{
|
||||
|
||||
dnl ICC won't bail on unknown options without -diag-error 10006
|
||||
dnl need to do this first so we get useful results for the other options
|
||||
-AC_C_FLAG([-diag-error 10006])
|
||||
+if test "$cc_is_icc" = "yes"; then
|
||||
+ AC_C_FLAG([-diag-error 10006])
|
||||
+fi
|
||||
|
||||
dnl AC_PROG_CC_C99 may change CC to include -std=gnu99 or something
|
||||
ac_cc="$CC"
|
||||
@@ -335,7 +342,9 @@ AC_SUBST([CXX_COMPAT_CFLAGS])
|
||||
dnl ICC emits a broken warning for const char *x = a ? "b" : "c";
|
||||
dnl for some reason the string consts get 'promoted' to char *,
|
||||
dnl triggering a const to non-const conversion warning.
|
||||
-AC_C_FLAG([-diag-disable 3179])
|
||||
+if test "$cc_is_icc" = "yes"; then
|
||||
+ AC_C_FLAG([-diag-disable 3179])
|
||||
+fi
|
||||
|
||||
if test "$enable_werror" = "yes" ; then
|
||||
WERROR="-Werror"
|
10
0005-use-python3.patch
Normal file
10
0005-use-python3.patch
Normal file
@ -0,0 +1,10 @@
|
||||
diff --git a/tools/frr-reload.py b/tools/frr-reload.py
|
||||
index c28a971..72ac201 100755
|
||||
--- a/tools/frr-reload.py
|
||||
+++ b/tools/frr-reload.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/python
|
||||
+#!/usr/bin/python3
|
||||
# Frr Reloader
|
||||
# Copyright (C) 2014 Cumulus Networks, Inc.
|
||||
#
|
@ -1,17 +0,0 @@
|
||||
diff --git a/tools/frr.service b/tools/frr.service
|
||||
index aa45f42..402def8 100644
|
||||
--- a/tools/frr.service
|
||||
+++ b/tools/frr.service
|
||||
@@ -17,9 +17,9 @@ WatchdogSec=60s
|
||||
RestartSec=5
|
||||
Restart=on-abnormal
|
||||
LimitNOFILE=1024
|
||||
-ExecStart=/usr/lib/frr/frrinit.sh start
|
||||
-ExecStop=/usr/lib/frr/frrinit.sh stop
|
||||
-ExecReload=/usr/lib/frr/frrinit.sh reload
|
||||
+ExecStart=/usr/libexec/frr/frrinit.sh start
|
||||
+ExecStop=/usr/libexec/frr/frrinit.sh stop
|
||||
+ExecReload=/usr/libexec/frr/frrinit.sh reload
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
@ -1,108 +0,0 @@
|
||||
From 4f08c715db6893ff439d0a39bf4506cd26256d13 Mon Sep 17 00:00:00 2001
|
||||
From: Igor Ryzhov <iryzhov@nfware.com>
|
||||
Date: Fri, 18 Jun 2021 13:06:13 +0300
|
||||
Subject: [PATCH] lib: remove pure attribute from functions that modify memory
|
||||
|
||||
Almost all functions currently marked with pure attribute acquire a
|
||||
route_node lock. By marking them pure we allow compiler to optimize the
|
||||
code and not call them when it already knows the return value. This is
|
||||
completely incorrect.
|
||||
|
||||
Only two of eleven functions can be marked as pure. And they still won't
|
||||
be optimized because they are never called from the same function twice.
|
||||
Let's remove the ext_pure macro completely to reduce the chance of
|
||||
repeating this mistake in the future.
|
||||
|
||||
Fixes #8866, #8809, #8595, #6992.
|
||||
|
||||
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
|
||||
---
|
||||
lib/compiler.h | 9 ---------
|
||||
lib/table.h | 44 ++++++++++++++++++++------------------------
|
||||
2 files changed, 20 insertions(+), 33 deletions(-)
|
||||
|
||||
diff --git a/lib/compiler.h b/lib/compiler.h
|
||||
index bbfe01b569c..e805eb8be48 100644
|
||||
--- a/lib/compiler.h
|
||||
+++ b/lib/compiler.h
|
||||
@@ -123,15 +123,6 @@ extern "C" {
|
||||
#define assume(x)
|
||||
#endif
|
||||
|
||||
-/* pure = function does not modify memory & return value is the same if
|
||||
- * memory hasn't changed (=> allows compiler to optimize)
|
||||
- *
|
||||
- * Mostly autodetected by the compiler if function body is available (i.e.
|
||||
- * static inline functions in headers). Since that implies it should only be
|
||||
- * used in headers for non-inline functions, the "extern" is included here.
|
||||
- */
|
||||
-#define ext_pure extern __attribute__((pure))
|
||||
-
|
||||
/* for helper functions defined inside macros */
|
||||
#define macro_inline static inline __attribute__((unused))
|
||||
#define macro_pure static inline __attribute__((unused, pure))
|
||||
diff --git a/lib/table.h b/lib/table.h
|
||||
index 7e383dce808..5dec69ee7ea 100644
|
||||
--- a/lib/table.h
|
||||
+++ b/lib/table.h
|
||||
@@ -197,29 +197,25 @@ static inline void route_table_set_info(struct route_table *table, void *d)
|
||||
table->info = d;
|
||||
}
|
||||
|
||||
-/* ext_pure => extern __attribute__((pure))
|
||||
- * does not modify memory (but depends on mem), allows compiler to optimize
|
||||
- */
|
||||
-
|
||||
extern void route_table_finish(struct route_table *table);
|
||||
-ext_pure struct route_node *route_top(struct route_table *table);
|
||||
-ext_pure struct route_node *route_next(struct route_node *node);
|
||||
-ext_pure struct route_node *route_next_until(struct route_node *node,
|
||||
- const struct route_node *limit);
|
||||
+extern struct route_node *route_top(struct route_table *table);
|
||||
+extern struct route_node *route_next(struct route_node *node);
|
||||
+extern struct route_node *route_next_until(struct route_node *node,
|
||||
+ const struct route_node *limit);
|
||||
extern struct route_node *route_node_get(struct route_table *table,
|
||||
union prefixconstptr pu);
|
||||
-ext_pure struct route_node *route_node_lookup(struct route_table *table,
|
||||
- union prefixconstptr pu);
|
||||
-ext_pure struct route_node *route_node_lookup_maynull(struct route_table *table,
|
||||
- union prefixconstptr pu);
|
||||
-ext_pure struct route_node *route_node_match(struct route_table *table,
|
||||
- union prefixconstptr pu);
|
||||
-ext_pure struct route_node *route_node_match_ipv4(struct route_table *table,
|
||||
- const struct in_addr *addr);
|
||||
-ext_pure struct route_node *route_node_match_ipv6(struct route_table *table,
|
||||
- const struct in6_addr *addr);
|
||||
-
|
||||
-ext_pure unsigned long route_table_count(struct route_table *table);
|
||||
+extern struct route_node *route_node_lookup(struct route_table *table,
|
||||
+ union prefixconstptr pu);
|
||||
+extern struct route_node *route_node_lookup_maynull(struct route_table *table,
|
||||
+ union prefixconstptr pu);
|
||||
+extern struct route_node *route_node_match(struct route_table *table,
|
||||
+ union prefixconstptr pu);
|
||||
+extern struct route_node *route_node_match_ipv4(struct route_table *table,
|
||||
+ const struct in_addr *addr);
|
||||
+extern struct route_node *route_node_match_ipv6(struct route_table *table,
|
||||
+ const struct in6_addr *addr);
|
||||
+
|
||||
+extern unsigned long route_table_count(struct route_table *table);
|
||||
|
||||
extern struct route_node *route_node_create(route_table_delegate_t *delegate,
|
||||
struct route_table *table);
|
||||
@@ -228,10 +224,10 @@ extern void route_node_destroy(route_table_delegate_t *delegate,
|
||||
struct route_table *table,
|
||||
struct route_node *node);
|
||||
|
||||
-ext_pure struct route_node *route_table_get_next(struct route_table *table,
|
||||
- union prefixconstptr pu);
|
||||
-ext_pure int route_table_prefix_iter_cmp(const struct prefix *p1,
|
||||
- const struct prefix *p2);
|
||||
+extern struct route_node *route_table_get_next(struct route_table *table,
|
||||
+ union prefixconstptr pu);
|
||||
+extern int route_table_prefix_iter_cmp(const struct prefix *p1,
|
||||
+ const struct prefix *p2);
|
||||
|
||||
/*
|
||||
* Iterator functions.
|
37
frr.spec
37
frr.spec
@ -1,16 +1,15 @@
|
||||
%global frrversion 7.5.1
|
||||
%global frr_libdir %{_libexecdir}/frr
|
||||
|
||||
%global _hardened_build 1
|
||||
%define _legacy_common_support 1
|
||||
|
||||
Name: frr
|
||||
Version: 7.5.1
|
||||
Release: 7%{?checkout}%{?dist}
|
||||
Version: 8.0
|
||||
Release: 1%{?checkout}%{?dist}
|
||||
Summary: Routing daemon
|
||||
License: GPLv2+
|
||||
URL: http://www.frrouting.org
|
||||
Source0: https://github.com/FRRouting/frr/releases/download/%{name}-%{frrversion}/%{name}-%{frrversion}.tar.gz
|
||||
Source0: https://github.com/FRRouting/frr/releases/download/%{name}-%{version}/%{name}-%{version}.tar.gz
|
||||
Source1: %{name}-tmpfiles.conf
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
@ -53,13 +52,10 @@ Conflicts: quagga
|
||||
Provides: routingdaemon = %{version}-%{release}
|
||||
|
||||
Patch0000: 0000-remove-babeld-and-ldpd.patch
|
||||
Patch0001: 0001-use-python3.patch
|
||||
Patch0002: 0002-enable-openssl.patch
|
||||
Patch0003: 0003-disable-eigrp-crypto.patch
|
||||
Patch0004: 0004-fips-mode.patch
|
||||
Patch0005: 0005-icc-options.patch
|
||||
Patch0006: 0006-move-to-libexec.patch
|
||||
Patch0007: 0007-ospfd-crash.patch
|
||||
Patch0005: 0005-use-python3.patch
|
||||
|
||||
%description
|
||||
FRRouting is free software that manages TCP/IP based routing protocols. It takes
|
||||
@ -120,14 +116,14 @@ mkdir -p %{buildroot}%{_tmpfilesdir}
|
||||
rm -rf %{buildroot}/usr/share/info/dir
|
||||
|
||||
install -p -m 644 %{SOURCE1} %{buildroot}%{_tmpfilesdir}/%{name}.conf
|
||||
install -p -m 644 %{_builddir}/%{name}-%{frrversion}/tools/etc/frr/daemons %{buildroot}/etc/frr/daemons
|
||||
install -p -m 644 %{_builddir}/%{name}-%{frrversion}/tools/frr.service %{buildroot}%{_unitdir}/frr.service
|
||||
install -p -m 755 %{_builddir}/%{name}-%{frrversion}/tools/frrinit.sh %{buildroot}%{frr_libdir}/frr
|
||||
install -p -m 755 %{_builddir}/%{name}-%{frrversion}/tools/frrcommon.sh %{buildroot}%{frr_libdir}/frrcommon.sh
|
||||
install -p -m 755 %{_builddir}/%{name}-%{frrversion}/tools/watchfrr.sh %{buildroot}%{frr_libdir}/watchfrr.sh
|
||||
install -p -m 644 tools/etc/frr/daemons %{buildroot}/etc/frr/daemons
|
||||
install -p -m 644 tools/frr.service %{buildroot}%{_unitdir}/frr.service
|
||||
install -p -m 755 tools/frrinit.sh %{buildroot}%{frr_libdir}/frr
|
||||
install -p -m 755 tools/frrcommon.sh %{buildroot}%{frr_libdir}/frrcommon.sh
|
||||
install -p -m 755 tools/watchfrr.sh %{buildroot}%{frr_libdir}/watchfrr.sh
|
||||
|
||||
install -p -m 644 %{_builddir}/%{name}-%{frrversion}/redhat/frr.logrotate %{buildroot}/etc/logrotate.d/frr
|
||||
install -p -m 644 %{_builddir}/%{name}-%{frrversion}/redhat/frr.pam %{buildroot}/etc/pam.d/frr
|
||||
install -p -m 644 redhat/frr.logrotate %{buildroot}/etc/logrotate.d/frr
|
||||
install -p -m 644 redhat/frr.pam %{buildroot}/etc/pam.d/frr
|
||||
install -d -m 775 %{buildroot}/run/frr
|
||||
|
||||
# Delete libtool archives
|
||||
@ -189,14 +185,6 @@ make check PYTHON=%{__python3}
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%license COPYING
|
||||
%doc zebra/zebra.conf.sample
|
||||
%doc isisd/isisd.conf.sample
|
||||
%doc ripd/ripd.conf.sample
|
||||
%doc bgpd/bgpd.conf.sample*
|
||||
%doc ospfd/ospfd.conf.sample
|
||||
%doc ospf6d/ospf6d.conf.sample
|
||||
%doc ripngd/ripngd.conf.sample
|
||||
%doc pimd/pimd.conf.sample
|
||||
%doc doc/mpls
|
||||
%dir %attr(750,frr,frr) %{_sysconfdir}/frr
|
||||
%dir %attr(755,frr,frr) /var/log/frr
|
||||
@ -219,6 +207,9 @@ make check PYTHON=%{__python3}
|
||||
%{_tmpfilesdir}/%{name}.conf
|
||||
|
||||
%changelog
|
||||
* Tue Aug 10 2021 Michal Ruprich <mruprich@redhat.com> - 8.0-1
|
||||
- Resolves: #1990858 - Possible rebase of frr to version 8.0
|
||||
|
||||
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 7.5.1-7
|
||||
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
||||
Related: rhbz#1991688
|
||||
|
2
sources
2
sources
@ -1,2 +1,2 @@
|
||||
SHA512 (frr-7.5.1.tar.gz) = 1c27420594e52647090da3556e5c62d6f916903c4fa86e5110f1e86152f07d3ce4252bc859d36c9d218dc96a80b245c8b9eee97f370d818cb39be187b6c3546e
|
||||
SHA512 (frr-8.0.tar.gz) = 9cf43251e30ef4a710b57ce36e345bd66f6da8c8d9dcbbb5010f2a1f29357b916074fbaa12bfdebedb7f91eb3b680d9cac8c93b5ca14c6dfd8425626a14cd4d7
|
||||
SHA512 (remove-babeld-ldpd.sh) = a5bf67a3722cb20d43cef1dac28f839db68df73a1b7d34d8438e4f9366da3b67d85c1f44281f93434e8dd8ebcb2d3dc258b77eaa5627475b7395d207f020839d
|
||||
|
Loading…
Reference in New Issue
Block a user