Accepting request 764692 from home:namtrac:branches:network
- Cleanup spec file OBS-URL: https://build.opensuse.org/request/show/764692 OBS-URL: https://build.opensuse.org/package/show/network/frr?expand=0&rev=3
This commit is contained in:
parent
64ed82ee3e
commit
60a2bf4493
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Jan 15 14:34:59 UTC 2020 - Ismail Dönmez <idonmez@suse.com>
|
||||
|
||||
- Cleanup spec file
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Jan 12 09:40:39 UTC 2020 - Martin Hauke <mardnh@gmx.de>
|
||||
|
||||
|
278
frr.spec
278
frr.spec
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package frr
|
||||
#
|
||||
# Copyright (c) 2019 SUSE LLC
|
||||
# Copyright (c) 2020 SUSE LLC
|
||||
# Copyright (c) 2019, Martin Hauke <mardnh@gmx.de>
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
@ -16,13 +16,14 @@
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
%define skip_python2 1
|
||||
%bcond_with cumulus
|
||||
%bcond_with datacenter
|
||||
%bcond_with pcre
|
||||
%bcond_with protobuf
|
||||
%bcond_with rpki
|
||||
%bcond_with zeromq
|
||||
|
||||
%if 0%{?suse_version} >= 1210
|
||||
%bcond_without systemd
|
||||
%else
|
||||
%bcond_with systemd
|
||||
%endif
|
||||
%define skip_python2 1
|
||||
|
||||
%define frr_user frr
|
||||
%define frr_group frr
|
||||
@ -30,40 +31,7 @@
|
||||
%define frr_home %{_localstatedir}/lib/%{name}
|
||||
%define frr_statedir %{_rundir}/%{name}
|
||||
%define frr_daemondir %{_prefix}/lib/frr
|
||||
%bcond_without babeld
|
||||
%bcond_without bfdd
|
||||
%bcond_without bgpd
|
||||
%bcond_without bgp_vnc
|
||||
%bcond_with cumulus
|
||||
%bcond_with datacenter
|
||||
%bcond_without doc
|
||||
%bcond_without eigrpd
|
||||
%bcond_without fpm
|
||||
%bcond_without irdp
|
||||
%bcond_without isisd
|
||||
%bcond_without ldpd
|
||||
%bcond_without multipath
|
||||
%bcond_without nhrpd
|
||||
%bcond_without ospf6d
|
||||
%bcond_without ospfapi
|
||||
%bcond_without ospfclient
|
||||
%bcond_without ospfd
|
||||
%bcond_without pam
|
||||
%bcond_without pbrd
|
||||
%bcond_with pcre
|
||||
%bcond_without pimd
|
||||
%bcond_with protobuf
|
||||
%bcond_without ripd
|
||||
%bcond_without ripngd
|
||||
%bcond_with rpki
|
||||
%bcond_without rtadv
|
||||
%bcond_without snmp
|
||||
%bcond_without sharpd
|
||||
%bcond_without staticd
|
||||
%bcond_without vtysh
|
||||
%bcond_without watchfrr
|
||||
%bcond_without zebra
|
||||
%bcond_with zeromq
|
||||
|
||||
Name: frr
|
||||
Version: 7.2
|
||||
Release: 0
|
||||
@ -74,45 +42,37 @@ URL: https://www.frrouting.org
|
||||
#Git-Clone: https://github.com/FRRouting/frr.git
|
||||
Source: %{name}-%{name}%{version}.tar.xz
|
||||
Source1: %{name}-tmpfiles.d
|
||||
Patch0: fix_tests.patch
|
||||
Patch0: fix_tests.patch
|
||||
BuildRequires: %{python_module Sphinx}
|
||||
BuildRequires: %{python_module devel}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
BuildRequires: bison >= 2.7
|
||||
BuildRequires: flex
|
||||
BuildRequires: libtool
|
||||
BuildRequires: libyang-extentions
|
||||
BuildRequires: makeinfo
|
||||
BuildRequires: mininet
|
||||
BuildRequires: net-snmp-devel
|
||||
BuildRequires: pam-devel
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildRequires: readline-devel
|
||||
BuildRequires: systemd-rpm-macros
|
||||
BuildRequires: pkgconfig(json-c)
|
||||
BuildRequires: pkgconfig(libcap)
|
||||
BuildRequires: pkgconfig(libcares)
|
||||
BuildRequires: pkgconfig(libsystemd)
|
||||
BuildRequires: pkgconfig(libyang) >= 1.0.101
|
||||
BuildRequires: libyang-extentions
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildRequires: %{python_module devel}
|
||||
BuildRequires: %{python_module pytest}
|
||||
# FIXME: use proper Requires(pre/post/preun/...)
|
||||
PreReq: %{install_info_prereq}
|
||||
Requires(post): %{install_info_prereq}
|
||||
Requires(pre): %{install_info_prereq}
|
||||
Requires(pre): shadow
|
||||
Requires(preun): %{install_info_prereq}
|
||||
Recommends: logrotate
|
||||
Conflicts: quagga
|
||||
Provides: zebra = %{version}
|
||||
Obsoletes: zebra < %{version}
|
||||
%if %{with systemd}
|
||||
BuildRequires: systemd-rpm-macros
|
||||
%{?systemd_requires}
|
||||
%endif
|
||||
|
||||
%if %{with doc}
|
||||
BuildRequires: makeinfo
|
||||
BuildRequires: %{python_module Sphinx}
|
||||
%endif
|
||||
%if %{with pam}
|
||||
BuildRequires: pam-devel
|
||||
%endif
|
||||
%if %{with pcre}
|
||||
BuildRequires: pkgconfig(libpcre)
|
||||
%endif
|
||||
@ -123,9 +83,6 @@ BuildRequires: pkgconfig(libprotobuf-c)
|
||||
%if %{with rpki}
|
||||
BuildRequires: pkgconfig(rtrlib) >= 0.5.0
|
||||
%endif
|
||||
%if %{with snmp}
|
||||
BuildRequires: net-snmp-devel
|
||||
%endif
|
||||
%if %{with zeromq}
|
||||
BuildRequires: pkgconfig(libzmq) >= 4.0.0
|
||||
%endif
|
||||
@ -159,14 +116,12 @@ Group: System/Libraries
|
||||
%description -n libfrrospfapiclient0
|
||||
This library contains part of the OSPFv2 implementation of FRRouting.
|
||||
|
||||
%if %{with snmp}
|
||||
%package -n libfrrsnmp0
|
||||
Summary: FRRouting snmp library
|
||||
Group: System/Libraries
|
||||
|
||||
%description -n libfrrsnmp0
|
||||
This library contains part of the net-snmp agentx implementation of FRRouting.
|
||||
%endif
|
||||
|
||||
%if %{with zeromq}
|
||||
%package -n libfrrzmq0
|
||||
@ -197,16 +152,12 @@ data types, buffers and socket handling.
|
||||
Summary: Header and object files for frr development
|
||||
Group: Development/Libraries/C and C++
|
||||
Requires: libfrr0 = %{version}
|
||||
Requires: libfrrospfapiclient0 = %{version}
|
||||
Requires: libfrrsnmp0 = %{version}
|
||||
%if %{with protobuf}
|
||||
Requires: libfrr_pb0 = %{version}
|
||||
Requires: libfrrfpm_pb0 = %{version}
|
||||
%endif
|
||||
%if %{with ospfapi}
|
||||
Requires: libfrrospfapiclient0 = %{version}
|
||||
%endif
|
||||
%if %{with snmp}
|
||||
Requires: libfrrsnmp0 = %{version}
|
||||
%endif
|
||||
%if %{with zeromq}
|
||||
Requires: libfrrzmq0 = %{version}
|
||||
%endif
|
||||
@ -217,7 +168,7 @@ developing OSPF-API and frr applications.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-%{name}%{version}
|
||||
%patch0 -p0
|
||||
%patch0
|
||||
|
||||
%build
|
||||
# GCC LTO objects must be "fat" to avoid assembly errors
|
||||
@ -237,173 +188,69 @@ autoreconf -fiv
|
||||
--enable-vty-group=%{frrvty_group} \
|
||||
--enable-configfile-mask=0640 \
|
||||
--enable-logfile-mask=0640 \
|
||||
%if %{with doc}
|
||||
--enable-doc \
|
||||
--enable-doc-html \
|
||||
%endif
|
||||
%if %{with babeld}
|
||||
--enable-babeld \
|
||||
%else
|
||||
--disable-babeld \
|
||||
%endif
|
||||
%if %{with bfdd}
|
||||
--enable-bfdd \
|
||||
%else
|
||||
--disable-bfdd \
|
||||
%endif
|
||||
%if %{with bgpd}
|
||||
--enable-bgpd \
|
||||
%else
|
||||
--disable-bgpd \
|
||||
%endif
|
||||
%if %{with bgp_vnc}
|
||||
--enable-bgp-vnc \
|
||||
%else
|
||||
--disable-bgp-vnc \
|
||||
%endif
|
||||
%if %{with cumulus}
|
||||
--enable-cumulus \
|
||||
%endif
|
||||
%if %{with datacenter}
|
||||
--enable-datacenter \
|
||||
%endif
|
||||
%if %{with eigrpd}
|
||||
--enable-eigrpd \
|
||||
%else
|
||||
--disable-eigrpd \
|
||||
%endif
|
||||
%if %{with fpm}
|
||||
--enable-fpm \
|
||||
%else
|
||||
--disable-fpm \
|
||||
%endif
|
||||
%if %{with irdp}
|
||||
--enable-irdp \
|
||||
%else
|
||||
--disable-irdp \
|
||||
%endif
|
||||
%if %{with isisd}
|
||||
--enable-isisd \
|
||||
%else
|
||||
--disable-isisd \
|
||||
%endif
|
||||
%if %{with ldpd}
|
||||
--enable-ldpd \
|
||||
%else
|
||||
--disable-ldpd \
|
||||
%endif
|
||||
%if %{with multipath}
|
||||
--enable-multipath=256 \
|
||||
%endif
|
||||
%if %{with nhrpd}
|
||||
--enable-nhrpd \
|
||||
%else
|
||||
--disable-nhrpd \
|
||||
%endif
|
||||
%if %{with snmp}
|
||||
--enable-snmp \
|
||||
%endif
|
||||
%if %{with zeromq}
|
||||
--enable-zeromq \
|
||||
%endif
|
||||
%if %{with ospfd}
|
||||
--enable-ospfd \
|
||||
%else
|
||||
--disable-ospfd \
|
||||
%endif
|
||||
%if %{with ospf6d}
|
||||
--enable-ospf6d \
|
||||
%else
|
||||
--disable-ospf6d \
|
||||
%endif
|
||||
%if %{with ospfapi}
|
||||
--enable-ospfapi \
|
||||
%else
|
||||
--disable-ospfapi \
|
||||
%endif
|
||||
%if %{with ospfclient}
|
||||
--enable-ospfclient \
|
||||
%else
|
||||
--disable-ospfclient \
|
||||
%endif
|
||||
%if %{with pam}
|
||||
--with-libpam \
|
||||
%endif
|
||||
%if %{with pcre}
|
||||
--enable-pcreposix \
|
||||
%endif
|
||||
%if %{with pbrd}
|
||||
--enable-pbrd \
|
||||
%else
|
||||
--disable-pbrd \
|
||||
%endif
|
||||
%if %{with pimd}
|
||||
--enable-pimd \
|
||||
%else
|
||||
--disable-pimd \
|
||||
%endif
|
||||
%if %{with protobuf}
|
||||
--enable-protobuf \
|
||||
%endif
|
||||
%if %{with ripd}
|
||||
--enable-ripd \
|
||||
%else
|
||||
--disable-ripd \
|
||||
%endif
|
||||
%if %{with ripngd}
|
||||
--enable-ripngd \
|
||||
%else
|
||||
--disable-ripngd \
|
||||
%endif
|
||||
%if %{with rpki}
|
||||
--enable-rpki \
|
||||
%else
|
||||
--disable-rpki \
|
||||
%endif
|
||||
%if %{with rtadv}
|
||||
--enable-rtadv \
|
||||
%else
|
||||
--disable-rtadv \
|
||||
%endif
|
||||
%if %{with sharpd}
|
||||
--enable-sharpd \
|
||||
%else
|
||||
--disable-sharpd \
|
||||
%endif
|
||||
%if %{with staticd}
|
||||
--enable-staticd \
|
||||
%else
|
||||
--disable-staticd \
|
||||
%endif
|
||||
%if %{with vtysh}
|
||||
--enable-vtysh \
|
||||
%else
|
||||
--disable-vtysh \
|
||||
%endif
|
||||
%if %{with watchfrr}
|
||||
--enable-watchfrr \
|
||||
%else
|
||||
--disable-watchfrr \
|
||||
%endif
|
||||
%if %{with zebra}
|
||||
--enable-zebra \
|
||||
%else
|
||||
--disable-zebra \
|
||||
%endif
|
||||
--enable-systemd
|
||||
|
||||
make %{?_smp_mflags} MAKEINFO="makeinfo --no-split"
|
||||
|
||||
%install
|
||||
make DESTDIR=%{buildroot} INSTALL="install -p" CP="cp -p" install
|
||||
|
||||
find %{buildroot} -type f -name "*.la" -delete -print
|
||||
|
||||
install -d %{buildroot}%{_sysconfdir}/frr
|
||||
%if %{with doc}
|
||||
install -d %{buildroot}/%{_docdir}/%{name}
|
||||
mv %{buildroot}/%{_datadir}/doc/frr/html %{buildroot}/%{_docdir}/%{name}
|
||||
%endif
|
||||
|
||||
# remove stray buildinfo files
|
||||
# remove stray buildinfo files
|
||||
find %{buildroot}/%{_docdir}/%{name} -type f -name .buildinfo -delete
|
||||
|
||||
# systemd init scripts
|
||||
@ -414,15 +261,19 @@ install -D -m 0644 tools%{_sysconfdir}/frr/daemons %{buildroot}%{_sysconfdir}/fr
|
||||
%if %{with rpki}
|
||||
sed -i -e 's/^\(bgpd_options=\)\(.*\)\(".*\)/\1\2 -M rpki\3/' %{buildroot}%{_sysconfdir}/frr/daemons
|
||||
%endif
|
||||
|
||||
install -D -m 0644 redhat/frr.pam %{buildroot}%{_sysconfdir}/pam.d/frr
|
||||
install -D -m 0644 redhat/frr.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/frr
|
||||
|
||||
install -d -m 0750 %{buildroot}%{rundir}
|
||||
install -d -m 0750 %{buildroot}%{_localstatedir}/log/frr
|
||||
install -D -m 0644 %{SOURCE1} %{buildroot}/%{_tmpfilesdir}/%{name}.conf
|
||||
sed -e "s|@frr_statedir@|%{frr_statedir}|g" -i %{buildroot}/%{_tmpfilesdir}/%{name}.conf
|
||||
|
||||
install -d %{buildroot}%{_sbindir}
|
||||
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rcfrr
|
||||
rm -f %{buildroot}%{frr_daemondir}/ssd
|
||||
|
||||
cat > %{buildroot}%{_sysconfdir}/frr/frr.conf << __EOF__
|
||||
!hostname frr
|
||||
|
||||
@ -436,22 +287,19 @@ cat > %{buildroot}%{_sysconfdir}/frr/vtysh.conf << __EOF__
|
||||
__EOF__
|
||||
|
||||
%check
|
||||
make -C tests
|
||||
make %{?_smp_mflags} -C tests
|
||||
|
||||
%pre
|
||||
# Create frr user/groups
|
||||
getent group %{frr_group} >/dev/null || groupadd -r %{frr_group}
|
||||
getent group %{frrvty_group} >/dev/null || groupadd -r %{frrvty_group}
|
||||
getent passwd %{frr_user} >/dev/null || useradd -r -g %{frr_group} -G %{frrvty_group} -d %{frr_home} -s /sbin/nologin -c "FRRouting suite" %{frr_user}
|
||||
exit 0
|
||||
|
||||
%service_add_pre %{name}.service
|
||||
|
||||
%post
|
||||
%service_add_post %{name}.service
|
||||
%if %{with doc}
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/%{name}.info%{ext_info}
|
||||
%endif
|
||||
%tmpfiles_create %{_tmpfilesdir}/%{name}.conf || true
|
||||
|
||||
%preun
|
||||
@ -459,9 +307,7 @@ exit 0
|
||||
|
||||
%postun
|
||||
%service_del_postun %{name}.service
|
||||
%if %{with doc}
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/frr.info%{ext_info}
|
||||
%endif
|
||||
|
||||
# delete the user and groups created if it's an uninstall
|
||||
if [ "$1" = "0" ]; then
|
||||
@ -470,7 +316,6 @@ if [ "$1" = "0" ]; then
|
||||
groupdel frrvty
|
||||
fi
|
||||
|
||||
|
||||
%if %{with protobuf}
|
||||
%post -n libfrr_pb0 -p /sbin/ldconfig
|
||||
%postun -n libfrr_pb0 -p /sbin/ldconfig
|
||||
@ -478,15 +323,10 @@ fi
|
||||
%postun -n libfrrfpm_pb0 -p /sbin/ldconfig
|
||||
%endif
|
||||
|
||||
%if %{with ospfapi}
|
||||
%post -n libfrrospfapiclient0 -p /sbin/ldconfig
|
||||
%postun -n libfrrospfapiclient0 -p /sbin/ldconfig
|
||||
%endif
|
||||
|
||||
%if %{with snmp}
|
||||
%post -n libfrrsnmp0 -p /sbin/ldconfig
|
||||
%postun -n libfrrsnmp0 -p /sbin/ldconfig
|
||||
%endif
|
||||
|
||||
%if %{with zeromq}
|
||||
%post -n libfrrzmq0 -p /sbin/ldconfig
|
||||
@ -509,11 +349,9 @@ fi
|
||||
%config(noreplace) %%attr(640,%{frr_user},%{frr_group}) %{_sysconfdir}/%{name}/daemons
|
||||
%config(noreplace) %{_sysconfdir}/pam.d/frr
|
||||
%config(noreplace) %{_sysconfdir}/logrotate.d/frr
|
||||
%if %{with doc}
|
||||
%{_infodir}/frr.info%{?ext_info}
|
||||
%{_mandir}/man?/*
|
||||
%{_docdir}/%{name}/html
|
||||
%endif
|
||||
%{_unitdir}/%%{name}.service
|
||||
%dir %{_tmpfilesdir}
|
||||
%{_tmpfilesdir}/%{name}.conf
|
||||
@ -524,78 +362,36 @@ fi
|
||||
%{_prefix}/lib/frr/fabricd
|
||||
%{_prefix}/lib/frr/vrrpd
|
||||
%{_datadir}/yang
|
||||
%if %{with pimd}
|
||||
%{_bindir}/mtracebis
|
||||
%endif
|
||||
%if %{with vtysh}
|
||||
%{_bindir}/vtysh
|
||||
%endif
|
||||
%if %{with babeld}
|
||||
%{frr_daemondir}/babeld
|
||||
%endif
|
||||
%if %{with bfdd}
|
||||
%{frr_daemondir}/bfdd
|
||||
%endif
|
||||
%if %{with bgpd}
|
||||
%{frr_daemondir}/bgpd
|
||||
%endif
|
||||
%if %{with eigrpd}
|
||||
%{frr_daemondir}/eigrpd
|
||||
%endif
|
||||
%{frr_daemondir}/frr
|
||||
%{frr_daemondir}/frr-reload
|
||||
%{frr_daemondir}/frr-reload.py
|
||||
%{frr_daemondir}/frrcommon.sh
|
||||
%{frr_daemondir}/frrinit.sh
|
||||
%if %{with isisd}
|
||||
%{frr_daemondir}/isisd
|
||||
%endif
|
||||
%if %{with ldpd}
|
||||
%{frr_daemondir}/ldpd
|
||||
%endif
|
||||
%if %{with nhrpd}
|
||||
%{frr_daemondir}/nhrpd
|
||||
%endif
|
||||
%if %{with ospf6d}
|
||||
%{frr_daemondir}/ospf6d
|
||||
%endif
|
||||
%if %{with ospfd}
|
||||
%{frr_daemondir}/ospfd
|
||||
%endif
|
||||
%if %{with pbrd}
|
||||
%{frr_daemondir}/pbrd
|
||||
%endif
|
||||
%if %{with pimd}
|
||||
%{frr_daemondir}/pimd
|
||||
%endif
|
||||
%if %{with ripd}
|
||||
%{frr_daemondir}/ripd
|
||||
%endif
|
||||
%if %{with ripngd}
|
||||
%{frr_daemondir}/ripngd
|
||||
%endif
|
||||
%if %{with sharpd}
|
||||
%{frr_daemondir}/sharpd
|
||||
%endif
|
||||
%if %{with staticd}
|
||||
%{frr_daemondir}/staticd
|
||||
%endif
|
||||
%if %{with watchfrr}
|
||||
%{frr_daemondir}/watchfrr
|
||||
%{frr_daemondir}/watchfrr.sh
|
||||
%endif
|
||||
%if %{with zebra}
|
||||
%{frr_daemondir}/zebra
|
||||
%endif
|
||||
%dir %{_libdir}/frr
|
||||
%dir %{_libdir}/frr/modules
|
||||
%if %{with zebra} && %{with fpm}
|
||||
%{_libdir}/frr/modules/zebra_fpm.so
|
||||
%endif
|
||||
%if %{with zebra} && %{with irdp}
|
||||
%{_libdir}/frr/modules/zebra_irdp.so
|
||||
%endif
|
||||
%if %{with bgpd} && %{with rpki}
|
||||
%if %{with rpki}
|
||||
%{_libdir}/frr/modules/bgpd_rpki.so
|
||||
%endif
|
||||
%{_prefix}/lib/frr/vrrpd
|
||||
@ -609,16 +405,12 @@ fi
|
||||
%{_libdir}/libfrrfpm_pb.so.0*
|
||||
%endif
|
||||
|
||||
%if %{with ospfapi}
|
||||
%files -n libfrrospfapiclient0
|
||||
%{_libdir}/libfrrospfapiclient.so.0*
|
||||
%endif
|
||||
|
||||
%if %{with snmp}
|
||||
%files -n libfrrsnmp0
|
||||
%{_libdir}/libfrrsnmp.so.0*
|
||||
%{_libdir}/frr/modules/*_snmp.so
|
||||
%endif
|
||||
|
||||
%if %{with zeromq}
|
||||
%files -n libfrrzmq0
|
||||
@ -635,18 +427,12 @@ fi
|
||||
%files devel
|
||||
%dir %{_includedir}/%{name}
|
||||
%{_includedir}/%{name}/*.h
|
||||
%if %{with ospfd}
|
||||
%dir %{_includedir}/%{name}/ospfd
|
||||
%{_includedir}/%{name}/ospfd/*.h
|
||||
%endif
|
||||
%if %{with ospfapi}
|
||||
%dir %{_includedir}/%{name}/ospfapi
|
||||
%{_includedir}/%{name}/ospfapi/*.h
|
||||
%endif
|
||||
%if %{with eigrpd}
|
||||
%dir %{_includedir}/%{name}/eigrpd
|
||||
%{_includedir}/%{name}/eigrpd/*.h
|
||||
%endif
|
||||
%{_libdir}/lib*.so
|
||||
|
||||
%changelog
|
||||
|
Loading…
Reference in New Issue
Block a user