Blame frr.spec

ca909ae
%global frr_libdir %{_libexecdir}/frr
463257a
463257a
%global _hardened_build 1
3f44698
%define _legacy_common_support 1
463257a
ca909ae
Name:           frr
4519d66
Version:        8.2.2
38e840d
Release:        2%{?dist}
ca909ae
Summary:        Routing daemon
ca909ae
License:        GPLv2+
ca909ae
URL:            http://www.frrouting.org
ca909ae
Source0:        https://github.com/FRRouting/frr/releases/download/%{name}-%{version}/%{name}-%{version}.tar.gz
ca909ae
Source1:        %{name}-tmpfiles.conf
9f5eed9
Source2:        %{name}-sysusers.conf
ca909ae
ca909ae
Patch0000:      0000-remove-babeld-and-ldpd.patch
ca909ae
Patch0002:      0002-enable-openssl.patch
ca909ae
Patch0003:      0003-disable-eigrp-crypto.patch
ca909ae
Patch0004:      0004-fips-mode.patch
4ed096d
Patch0005:      0005-remove-grpc-test.patch
38e840d
Patch0006:      0006-cve-2022-26126.patch
ca909ae
ca909ae
BuildRequires:  autoconf
ca909ae
BuildRequires:  automake
ca909ae
BuildRequires:  bison >= 2.7
ca909ae
BuildRequires:  c-ares-devel
ca909ae
BuildRequires:  flex
ca909ae
BuildRequires:  gcc
ca909ae
BuildRequires:  gcc-c++
eec6e6c
BuildRequires:  git-core
ca909ae
BuildRequires:  groff
ca909ae
BuildRequires:  grpc-devel
ca909ae
BuildRequires:  grpc-plugins
ca909ae
BuildRequires:  json-c-devel
ca909ae
BuildRequires:  libcap-devel
ca909ae
BuildRequires:  libtool
c7d9dbb
BuildRequires:  libyang-devel >= 2.0.0
ca909ae
BuildRequires:  make
ca909ae
BuildRequires:  ncurses
ca909ae
BuildRequires:  ncurses-devel
ca909ae
BuildRequires:  net-snmp-devel
ca909ae
BuildRequires:  pam-devel
ca909ae
BuildRequires:  patch
ca909ae
BuildRequires:  perl-XML-LibXML
ca909ae
BuildRequires:  perl-generators
ca909ae
BuildRequires:  python3-devel
ca909ae
BuildRequires:  python3-pytest
ca909ae
BuildRequires:  python3-sphinx
ca909ae
BuildRequires:  readline-devel
ca909ae
BuildRequires:  systemd-devel
9f5eed9
BuildRequires:  systemd-rpm-macros
ca909ae
BuildRequires:  texinfo
ca909ae
ca909ae
Requires:       ncurses
ca909ae
Requires:       net-snmp
c0bc1c7
Requires(post): hostname
9f5eed9
%{?sysusers_requires_compat}
ca909ae
Requires(post): systemd
463257a
Requires(postun): systemd
ca909ae
Requires(preun): systemd
c5466bb
Obsoletes:      quagga < 1.2.4-17
ca909ae
Provides:       routingdaemon = %{version}-%{release}
463257a
463257a
%description
463257a
FRRouting is free software that manages TCP/IP based routing protocols. It takes
463257a
a multi-server and multi-threaded approach to resolve the current complexity
463257a
of the Internet.
463257a
463257a
FRRouting supports BGP4, OSPFv2, OSPFv3, ISIS, RIP, RIPng, PIM, NHRP, PBR, EIGRP and BFD.
463257a
463257a
FRRouting is a fork of Quagga.
463257a
463257a
%prep
463257a
%autosetup -S git
463257a
463257a
%build
463257a
autoreconf -ivf
463257a
463257a
%configure \
463257a
    --sbindir=%{frr_libdir} \
463257a
    --sysconfdir=%{_sysconfdir}/frr \
463257a
    --libdir=%{_libdir}/frr \
463257a
    --libexecdir=%{_libexecdir}/frr \
463257a
    --localstatedir=%{_localstatedir}/run/frr \
463257a
    --enable-multipath=64 \
463257a
    --enable-vtysh=yes \
463257a
    --disable-ospfclient \
463257a
    --disable-ospfapi \
463257a
    --enable-snmp=agentx \
463257a
    --enable-user=frr \
463257a
    --enable-group=frr \
463257a
    --enable-vty-group=frrvty \
463257a
    --enable-rtadv \
463257a
    --disable-exampledir \
463257a
    --enable-systemd=yes \
463257a
    --enable-static=no \
463257a
    --disable-ldpd \
463257a
    --disable-babeld \
463257a
    --with-moduledir=%{_libdir}/frr/modules \
1924a87
    --with-crypto=openssl \
c0bc1c7
    --enable-fpm \
c0bc1c7
    --enable-grpc
463257a
463257a
%make_build MAKEINFO="makeinfo --no-split" PYTHON=%{__python3}
463257a
ca909ae
# Build info documentation
ca909ae
%make_build -C doc info
463257a
463257a
%install
ca909ae
mkdir -p %{buildroot}%{_sysconfdir}/{frr,rc.d/init.d,sysconfig,logrotate.d,pam.d,default} \
ca909ae
         %{buildroot}%{_localstatedir}/log/frr %{buildroot}%{_infodir} \
463257a
         %{buildroot}%{_unitdir}
463257a
463257a
mkdir -p -m 0755 %{buildroot}%{_libdir}/frr
Michal Ruprich 0d34206
mkdir -p %{buildroot}%{_tmpfilesdir}
9f5eed9
mkdir -p %{buildroot}%{_sysusersdir}
463257a
463257a
%make_install
463257a
463257a
# Remove this file, as it is uninstalled and causes errors when building on RH9
ca909ae
rm -rf %{buildroot}%{_infodir}/dir
463257a
Michal Ruprich 0d34206
install -p -m 644 %{SOURCE1} %{buildroot}%{_tmpfilesdir}/%{name}.conf
9f5eed9
install -p -m 644 %{SOURCE2} %{buildroot}%{_sysusersdir}/%{name}.conf
ca909ae
install -p -m 644 tools/etc/frr/daemons %{buildroot}%{_sysconfdir}/frr/daemons
ca909ae
install -p -m 644 tools/frr.service %{buildroot}%{_unitdir}/frr.service
ca909ae
install -p -m 755 tools/frrinit.sh %{buildroot}%{frr_libdir}/frr
ca909ae
install -p -m 755 tools/frrcommon.sh %{buildroot}%{frr_libdir}/frrcommon.sh
ca909ae
install -p -m 755 tools/watchfrr.sh %{buildroot}%{frr_libdir}/watchfrr.sh
ca909ae
ca909ae
install -p -m 644 redhat/frr.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/frr
ca909ae
install -p -m 644 redhat/frr.pam %{buildroot}%{_sysconfdir}/pam.d/frr
463257a
install -d -m 775 %{buildroot}/run/frr
463257a
ca909ae
# Delete libtool archives
ca909ae
find %{buildroot} -type f -name "*.la" -delete -print
463257a
463257a
#Upstream does not maintain a stable API, these headers from -devel subpackage are no longer needed
463257a
rm %{buildroot}%{_libdir}/frr/*.so
463257a
rm -r %{buildroot}%{_includedir}/frr/
463257a
463257a
%pre
9f5eed9
%sysusers_create_compat %{SOURCE2}
9f5eed9
463257a
463257a
%post
463257a
%systemd_post frr.service
463257a
463257a
# Create dummy files if they don't exist so basic functions can be used.
463257a
if [ ! -e %{_sysconfdir}/frr/frr.conf ]; then
463257a
    echo "hostname `hostname`" > %{_sysconfdir}/frr/frr.conf
463257a
    chown frr:frr %{_sysconfdir}/frr/frr.conf
463257a
    chmod 640 %{_sysconfdir}/frr/frr.conf
463257a
fi
463257a
c0bc1c7
#still used by vtysh, this way no error is produced when using vtysh
c0bc1c7
if [ ! -e %{_sysconfdir}/frr/vtysh.conf ]; then
22d94be
    touch %{_sysconfdir}/frr/vtysh.conf
c0bc1c7
    chmod 640 %{_sysconfdir}/frr/vtysh.conf
c0bc1c7
    chown frr:frrvty %{_sysconfdir}/frr/vtysh.conf
c0bc1c7
fi
c0bc1c7
463257a
%postun
463257a
%systemd_postun_with_restart frr.service
463257a
463257a
%preun
463257a
%systemd_preun frr.service
463257a
463257a
%check
4ed096d
#this should be temporary, the grpc test is just badly designed
4ed096d
rm tests/lib/*grpc*
ca909ae
%make_build check PYTHON=%{__python3}
463257a
463257a
%files
463257a
%license COPYING
463257a
%doc doc/mpls
22d94be
%dir %attr(750,frr,frr) %{_sysconfdir}/frr
ca909ae
%dir %attr(755,frr,frr) %{_localstatedir}/log/frr
463257a
%dir %attr(755,frr,frr) /run/frr
463257a
%{_infodir}/*info*
463257a
%{_mandir}/man*/*
Michal Ruprich 0d34206
%dir %{frr_libdir}/
463257a
%{frr_libdir}/*
463257a
%{_bindir}/*
463257a
%dir %{_libdir}/frr
463257a
%{_libdir}/frr/*.so.*
Michal Ruprich 0d34206
%dir %{_libdir}/frr/modules
463257a
%{_libdir}/frr/modules/*
ca909ae
%config(noreplace) %attr(644,root,root) %{_sysconfdir}/logrotate.d/frr
ca909ae
%config(noreplace) %attr(644,frr,frr) %{_sysconfdir}/frr/daemons
ca909ae
%config(noreplace) %{_sysconfdir}/pam.d/frr
463257a
%{_unitdir}/*.service
ca909ae
%dir %{_datadir}/yang
ca909ae
%{_datadir}/yang/*.yang
Michal Ruprich 0d34206
%{_tmpfilesdir}/%{name}.conf
9f5eed9
%{_sysusersdir}/%{name}.conf
463257a
463257a
%changelog
38e840d
* Mon Apr 11 2022 Michal Ruprich <mruprich@redhat.com> - 8.2.2-2
38e840d
- Fix for CVE-2022-16126
38e840d
4519d66
* Tue Mar 15 2022 Michal Ruprich <mruprich@redhat.com> - 8.2.2-1
4519d66
- New version 8.2.2
4519d66
46c4cd4
* Thu Mar 10 2022 Michal Ruprich <mruprich@redhat.com> - 8.2-2
46c4cd4
- Rebuild for abseil-cpp 20211102.0
46c4cd4
4ed096d
* Wed Mar 09 2022 Michal Ruprich <mruprich@redhat.com> - 8.2-1
4ed096d
- New version 8.2 (rhbz#2020439)
4ed096d
- Resolves: #2011868 - systemctl frr reload does not stop daemons that are not enabled in /etc/frr/daemons
4ed096d
efd1a71
* Tue Feb 01 2022 Michal Ruprich <mruprich@redhat.com> - 8.0.1-11
efd1a71
- Rebuilding for FTBFS in Rawhide(rhbz#2045399)
efd1a71
b2d9986
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 8.0.1-10
b2d9986
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
b2d9986
48fc528
* Sat Jan 08 2022 Miro Hrončok <mhroncok@redhat.com> - 8.0.1-9
48fc528
- Rebuilt for libre2.so.9
48fc528
6ff7ded
* Sat Nov 06 2021 Adrian Reber <adrian@lisas.de> - 8.0.1-8
6ff7ded
- Rebuilt for protobuf 3.19.0
6ff7ded
7ce4ec0
* Mon Oct 25 2021 Adrian Reber <adrian@lisas.de> - 8.0.1-7
7ce4ec0
- Rebuilt for protobuf 3.18.1
7ce4ec0
c5466bb
* Fri Oct 15 2021 Michal Ruprich <mruprich@redhat.com> - 8.0.1-6
c5466bb
- Obsoleting quagga so that it may be retired
c5466bb
07fa06f
* Thu Oct 07 2021 Michal Ruprich <mruprich@redhat.com> - 8.0.1-5
07fa06f
- Rebuilding for grpc 1.41
07fa06f
8f024e6
* Thu Sep 30 2021 Michal Ruprich <mruprich@redhat.com> - 8.0.1-4
8f024e6
- Rebuild for new version of libyang
8f024e6
49e2bd4
* Sat Sep 18 2021 Benjamin A. Beasley <code@musicinmybrain.net> - 8.0.1-3
49e2bd4
- Rebuild for grpc 1.40
49e2bd4
494d547
* Thu Sep 16 2021 Sahana Prasad <sahana@redhat.com> - 8.0.1-2
494d547
- Rebuilt with OpenSSL 3.0.0
494d547
b33a5eb
* Thu Sep 16 2021 Michal Ruprich <mruprich@redhat.com> - 8.0.1-1
b33a5eb
- New version 8.0.1
b33a5eb
a96e1dd
* Tue Sep 14 2021 Sahana Prasad <sahana@redhat.com> - 8.0-2
a96e1dd
- Rebuilt with OpenSSL 3.0.0
a96e1dd
c7d9dbb
* Wed Aug 11 2021 Michal Ruprich <mruprich@redhat.com> - 8.0-1
c7d9dbb
- New version 8.0
c7d9dbb
176ca84
* Wed Aug 04 2021 Benjamin A. Beasley <code@musicinmybrain.net> - 7.5.1-9
176ca84
- Rebuild for grpc 1.39
176ca84
dcf54be
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 7.5.1-8
dcf54be
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
dcf54be
31b2cc2
* Tue Jul 20 2021 Michal Ruprich <mruprich@redhat.com> - 7.5.1-7
31b2cc2
- Resolves: #1983278 - ospfd crashes in route_node_delete with assertion fail
31b2cc2
60a5f41
* Sat Jul 10 2021 Björn Esser <besser82@fedoraproject.org> - 7.5.1-6
60a5f41
- Rebuild for versioned symbols in json-c
60a5f41
ca909ae
* Wed Jul 07 2021 Neal Gompa <ngompa@datto.com> - 7.5.1-5
ca909ae
- Clean up the spec file for legibility and modern spec standards
7880ef8
- Remove unneeded info scriptlets
9f5eed9
- Use systemd-sysusers for frr user and frrvty group
eec6e6c
- Use git-core instead of git for applying patches
8841339
- Drop redundant build dependencies
ca909ae
158687c
* Wed Jul 07 2021 Michal Ruprich <mruprich@redhat.com> - 7.5.1-4
158687c
- Rebuild for newer abseil-cpp
158687c
8e0c6a5
* Tue May 11 2021 Benjamin A. Beasley <code@musicinmybrain.net> - 7.5.1-3
8e0c6a5
- Rebuild for grpc 1.37
8e0c6a5
22d94be
* Fri Apr 23 2021 Michal Ruprich <mruprich@redhat.com> - 7.5.1-2
22d94be
- Fixing permissions on config files in /etc/frr
22d94be
- Enabling integrated configuration option for frr
22d94be
c0bc1c7
* Fri Mar 12 2021 Michal Ruprich <mruprich@redhat.com> - 7.5.1-1
c0bc1c7
- New version 7.5.1
c0bc1c7
- Enabling grpc, adding hostname for post scriptlet
c0bc1c7
- Moving files to libexec due to selinux issues
c0bc1c7
1cc2fcd
* Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 7.5-4
1cc2fcd
- Rebuilt for updated systemd-rpm-macros
1cc2fcd
  See https://pagure.io/fesco/issue/2583.
1cc2fcd
d3558d9
* Tue Feb 16 2021 Michal Ruprich <mruprich@redhat.com> - 7.5-3
d3558d9
- Fixing FTBS - icc options are confusing the new gcc
d3558d9
eafae8c
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 7.5-2
eafae8c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
eafae8c
3d0f818
* Fri Jan 01 2021 Michal Ruprich <mruprich@redhat.com> - 7.5-1
3d0f818
- New version 7.5
3d0f818
7bc4774
* Mon Sep 21 2020 Michal Ruprich <mruprich@redhat.com> - 7.4-1
7bc4774
- New version 7.4
7bc4774
549c517
* Thu Aug 27 2020 Josef Řídký <jridky@redhat.com> - 7.3.1-4
549c517
- Rebuilt for new net-snmp release
549c517
6295fc8
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 7.3.1-3
6295fc8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
6295fc8
c0bc1c7
* Thu Jun 18 2020 Michal Ruprich <mruprich@redhat.com> - 7.3.1-1
Michal Ruprich 0d34206
- New version 7.3.1
Michal Ruprich 0d34206
- Fixes a couple of bugs(#1832259, #1835039, #1830815, #1830808, #1830806, #1830800, #1830798, #1814773)
Michal Ruprich 0d34206
c0bc1c7
* Tue May 19 2020 Michal Ruprich <mruprich@redhat.com> - 7.3-6
Michal Ruprich 69f43ae
- Removing texi2html, it is not available in Rawhide anymore
Michal Ruprich 69f43ae
c0bc1c7
* Mon May 18 2020 Michal Ruprich <mruprich@redhat.com> - 7.3-5
Michal Ruprich cc5d8e1
- Rebuild for new version of libyang
Michal Ruprich cc5d8e1
6eb34bb
* Tue Apr 21 2020 Björn Esser <besser82@fedoraproject.org> - 7.3-4
6eb34bb
- Rebuild (json-c)
6eb34bb
57c8988
* Mon Apr 13 2020 Björn Esser <besser82@fedoraproject.org> - 7.3-3
57c8988
- Update json-c-0.14 patch with a solution from upstream
57c8988
fbca0ae
* Mon Apr 13 2020 Björn Esser <besser82@fedoraproject.org> - 7.3-2
fbca0ae
- Add support for upcoming json-c 0.14.0
fbca0ae
3f44698
* Wed Feb 19 2020 Michal Ruprich <mruprich@redhat.com> - 7.3-1
3f44698
- New version 7.3
3f44698
6649e1d
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 7.2-2
6649e1d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
6649e1d
55a1dda
* Mon Dec 16 2019 Michal Ruprich <mruprich@redhat.com> - 7.2-1
55a1dda
- New version 7.2
55a1dda
a762237
* Tue Nov 12 2019 Michal Ruprich <mruprich@redhat.com> - 7.1-5
a762237
- Rebuilding for new version of libyang
a762237
db560a0
* Mon Oct 07 2019 Michal Ruprich <mruprich@redhat.com> - 7.1-4
db560a0
- Adding noreplace to the /etc/frr/daemons file
db560a0
1924a87
* Fri Sep 13 2019 Michal Ruprich <mruprich@redhat.com> - 7.1-3
1924a87
- New way of finding python version during build
1924a87
- Replacing crypto of all routing daemons with openssl
1924a87
- Disabling EIGRP crypto because it is broken
1924a87
- Disabling crypto in FIPS mode
1924a87
3cdc475
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 7.1-2
3cdc475
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
3cdc475
463257a
* Tue Jun 25 2019 Michal Ruprich <mruprich@redhat.com> - 7.1-1
463257a
- New version 7.1
463257a
463257a
* Wed Jun 19 2019 Michal Ruprich <mruprich@redhat.com> - 7.0-2
463257a
- Initial build