From 0caf6d3485857a51e30e87352343a9eeabdd6548 Mon Sep 17 00:00:00 2001 From: Michal Ruprich Date: Fri, 4 Jun 2021 09:05:04 +0200 Subject: [PATCH] Resolves: #1958155 - Upgrading frr unconditionally creates /etc/frr/frr.conf, breaking existing configuration --- 0000-remove-babeld-and-ldpd.patch | 26 ++++++++++++++++++++++++++ frr.spec | 17 ++++++++++++----- 2 files changed, 38 insertions(+), 5 deletions(-) diff --git a/0000-remove-babeld-and-ldpd.patch b/0000-remove-babeld-and-ldpd.patch index cc19cc4..37c416a 100644 --- a/0000-remove-babeld-and-ldpd.patch +++ b/0000-remove-babeld-and-ldpd.patch @@ -27,3 +27,29 @@ index 5be3264..33abc1d 100644 lib/Makefile \ nhrpd/Makefile \ ospf6d/Makefile \ +diff --git a/tools/etc/frr/daemons b/tools/etc/frr/daemons +index f6d512b..6d4831d 100644 +--- a/tools/etc/frr/daemons ++++ b/tools/etc/frr/daemons +@@ -21,10 +21,8 @@ ripd=no + ripngd=no + isisd=no + pimd=no +-ldpd=no + nhrpd=no + eigrpd=no +-babeld=no + sharpd=no + pbrd=no + bfdd=no +@@ -45,10 +43,8 @@ ripd_options=" -A 127.0.0.1" + ripngd_options=" -A ::1" + isisd_options=" -A 127.0.0.1" + pimd_options=" -A 127.0.0.1" +-ldpd_options=" -A 127.0.0.1" + nhrpd_options=" -A 127.0.0.1" + eigrpd_options=" -A 127.0.0.1" +-babeld_options=" -A 127.0.0.1" + sharpd_options=" -A 127.0.0.1" + pbrd_options=" -A 127.0.0.1" + staticd_options="-A 127.0.0.1" diff --git a/frr.spec b/frr.spec index 9a63868..0a987b9 100644 --- a/frr.spec +++ b/frr.spec @@ -6,7 +6,7 @@ Name: frr Version: 7.5.1 -Release: 3%{?checkout}%{?dist} +Release: 4%{?checkout}%{?dist} Summary: Routing daemon License: GPLv2+ URL: http://www.frrouting.org @@ -129,10 +129,14 @@ if [ -f %{_infodir}/%{name}.inf* ]; then fi # Create dummy files if they don't exist so basic functions can be used. -if [ ! -e %{_sysconfdir}/frr/frr.conf ]; then - echo "hostname `hostname`" > %{_sysconfdir}/frr/frr.conf - chown frr:frr %{_sysconfdir}/frr/frr.conf - chmod 640 %{_sysconfdir}/frr/frr.conf +# Only create frr.conf when first installing, otherwise it can change +# the behavior of the package +if [ $1 -eq 1 ]; then + if [ ! -e %{_sysconfdir}/frr/frr.conf ]; then + echo "hostname `hostname`" > %{_sysconfdir}/frr/frr.conf + chown frr:frr %{_sysconfdir}/frr/frr.conf + chmod 640 %{_sysconfdir}/frr/frr.conf + fi fi #still used by vtysh, this way no error is produced when using vtysh @@ -192,6 +196,9 @@ make check PYTHON=%{__python3} %{_tmpfilesdir}/%{name}.conf %changelog +* Fri Jun 04 2021 Michal Ruprich - 7.5.1-4 +- Resolves: #1958155 - Upgrading frr unconditionally creates /etc/frr/frr.conf, breaking existing configuration + * Fri Apr 23 2021 Michal Ruprich - 7.5.1-3 - Resolves: #1939456 - /etc/frr permissions are bogus - Resolves: #1951303 - FTBFS in CentOS Stream