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