Blame frr.spec

3d0f818
%global frrversion	7.5
463257a
%global frr_libdir /usr/lib/frr
463257a
463257a
%global _hardened_build 1
3f44698
%define _legacy_common_support 1
463257a
463257a
Name: frr
3d0f818
Version: 7.5
7bc4774
Release: 1%{?checkout}%{?dist}
463257a
Summary: Routing daemon
463257a
License: GPLv2+
463257a
URL: http://www.frrouting.org
463257a
Source0: https://github.com/FRRouting/frr/releases/download/%{name}-%{frrversion}/%{name}-%{frrversion}.tar.gz
Michal Ruprich 0d34206
Source1: %{name}-tmpfiles.conf
463257a
BuildRequires: perl-generators
463257a
BuildRequires: gcc
463257a
BuildRequires: net-snmp-devel
Michal Ruprich 69f43ae
BuildRequires: texinfo libcap-devel autoconf automake libtool patch groff
463257a
BuildRequires: readline readline-devel ncurses ncurses-devel
463257a
BuildRequires: git pam-devel c-ares-devel
463257a
BuildRequires: json-c-devel bison >= 2.7 flex perl-XML-LibXML
463257a
BuildRequires: python3-devel python3-sphinx python3-pytest
463257a
BuildRequires: systemd systemd-devel
463257a
BuildRequires: libyang-devel >= 0.16.74
b79d97c
BuildRequires: make
463257a
Requires: net-snmp ncurses
463257a
Requires(post): systemd /sbin/install-info
463257a
Requires(preun): systemd /sbin/install-info
463257a
Requires(postun): systemd
463257a
Provides: routingdaemon = %{version}-%{release}
463257a
Conflicts: quagga
463257a
463257a
Patch0000: 0000-remove-babeld-and-ldpd.patch
463257a
Patch0001: 0001-use-python3.patch
1924a87
Patch0002: 0002-enable-openssl.patch
1924a87
Patch0003: 0003-disable-eigrp-crypto.patch
1924a87
Patch0004: 0004-fips-mode.patch
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 \
463257a
    --enable-fpm
463257a
463257a
%make_build MAKEINFO="makeinfo --no-split" PYTHON=%{__python3}
463257a
463257a
pushd doc
463257a
make info
463257a
popd
463257a
463257a
%install
463257a
mkdir -p %{buildroot}/etc/{frr,rc.d/init.d,sysconfig,logrotate.d,pam.d,default} \
463257a
         %{buildroot}/var/log/frr %{buildroot}%{_infodir} \
463257a
         %{buildroot}%{_unitdir}
463257a
463257a
mkdir -p -m 0755 %{buildroot}%{_libdir}/frr
Michal Ruprich 0d34206
mkdir -p %{buildroot}%{_tmpfilesdir}
463257a
463257a
%make_install
463257a
463257a
# Remove this file, as it is uninstalled and causes errors when building on RH9
463257a
rm -rf %{buildroot}/usr/share/info/dir
463257a
Michal Ruprich 0d34206
install -p -m 644 %{SOURCE1} %{buildroot}%{_tmpfilesdir}/%{name}.conf
463257a
install -p -m 644 %{_builddir}/%{name}-%{frrversion}/tools/etc/frr/daemons %{buildroot}/etc/frr/daemons
463257a
install -p -m 644 %{_builddir}/%{name}-%{frrversion}/tools/frr.service %{buildroot}%{_unitdir}/frr.service
463257a
install -p -m 755 %{_builddir}/%{name}-%{frrversion}/tools/frrinit.sh %{buildroot}%{frr_libdir}/frr
463257a
install -p -m 755 %{_builddir}/%{name}-%{frrversion}/tools/frrcommon.sh %{buildroot}%{frr_libdir}/frrcommon.sh
463257a
install -p -m 755 %{_builddir}/%{name}-%{frrversion}/tools/watchfrr.sh %{buildroot}%{frr_libdir}/watchfrr.sh
463257a
463257a
install -p -m 644 %{_builddir}/%{name}-%{frrversion}/redhat/frr.logrotate %{buildroot}/etc/logrotate.d/frr
463257a
install -p -m 644 %{_builddir}/%{name}-%{frrversion}/redhat/frr.pam %{buildroot}/etc/pam.d/frr
463257a
install -d -m 775 %{buildroot}/run/frr
463257a
463257a
rm %{buildroot}%{_libdir}/frr/*.la
463257a
rm %{buildroot}%{_libdir}/frr/modules/*.la
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
463257a
getent group frrvty >/dev/null 2>&1 || groupadd -r frrvty >/dev/null 2>&1 || :
463257a
getent group frr >/dev/null 2>&1 || groupadd -r frr >/dev/null 2>&1 || :
463257a
getent passwd frr >/dev/null 2>&1 || useradd -M -r -g frr -s /sbin/nologin \
463257a
 -c "FRRouting routing suite" -d %{_localstatedir}/run/frr frr || :
463257a
usermod -aG frrvty frr
463257a
463257a
%post
463257a
%systemd_post frr.service
463257a
463257a
if [ -f %{_infodir}/%{name}.inf* ]; then
463257a
    install-info %{_infodir}/frr.info %{_infodir}/dir || :
463257a
fi
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
463257a
%postun
463257a
%systemd_postun_with_restart frr.service
463257a
463257a
%preun
463257a
%systemd_preun frr.service
463257a
463257a
#only when removing frr
463257a
if [ $1 -eq 0 ]; then
463257a
	if [ -f %{_infodir}/%{name}.inf* ]; then
463257a
    	install-info --delete %{_infodir}/frr.info %{_infodir}/dir || :
463257a
	fi
463257a
fi
463257a
463257a
%check
463257a
make check PYTHON=%{__python3}
463257a
463257a
%files
463257a
%defattr(-,root,root)
463257a
%license COPYING
463257a
%doc zebra/zebra.conf.sample
463257a
%doc isisd/isisd.conf.sample
463257a
%doc ripd/ripd.conf.sample
463257a
%doc bgpd/bgpd.conf.sample*
463257a
%doc ospfd/ospfd.conf.sample
463257a
%doc ospf6d/ospf6d.conf.sample
463257a
%doc ripngd/ripngd.conf.sample
463257a
%doc pimd/pimd.conf.sample
463257a
%doc doc/mpls
Michal Ruprich 0d34206
%dir %attr(640,frr,frr) %{_sysconfdir}/frr
463257a
%dir %attr(755,frr,frr) /var/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/*
463257a
%config(noreplace) %attr(644,root,root) /etc/logrotate.d/frr
Michal Ruprich 0d34206
%config(noreplace) %attr(644,frr,frr) /etc/frr/daemons
463257a
%config(noreplace) /etc/pam.d/frr
463257a
%{_unitdir}/*.service
Michal Ruprich 0d34206
%dir /usr/share/yang
463257a
/usr/share/yang/*.yang
Michal Ruprich 0d34206
%{_tmpfilesdir}/%{name}.conf
463257a
463257a
%changelog
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
Michal Ruprich 0d34206
* Thu Jun 18 2020 Michal Ruprich <michalruprich@gmail.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
Michal Ruprich 69f43ae
* Tue May 19 2020 Michal Ruprich <michalruprich@gmail.com> - 7.3-6
Michal Ruprich 69f43ae
- Removing texi2html, it is not available in Rawhide anymore
Michal Ruprich 69f43ae
Michal Ruprich cc5d8e1
* Mon May 18 2020 Michal Ruprich <michalruprich@gmail.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
463257a