iproute2/iproute2.spec

178 lines
5.4 KiB
RPMSpec
Raw Normal View History

#
# spec file for package iproute2
#
# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define _buildshell /bin/bash
Name: iproute2
Version: 5.15
Release: 0
Summary: Linux network configuration utilities
License: GPL-2.0-only
Group: Productivity/Networking/Routing
URL: https://wiki.linuxfoundation.org/networking/iproute2
# Using GPL-2.0 instead of GPL-2.0+ because of tc_skbedit.h and tc/q_multiq.c
Accepting request 573557 from home:avindra - Update to new upstream release 4.15.0 * Add "show" subcommand to "ip fou" * Restore --no-print-directory option for silent builds * SPDX license identifiers * Show 'external' link mode in output * Update kernel headers with new SPDK identifier * bpf: allocate opcode table in struct bpf_cfg_in * bpf: allow loading programs for a specific ifindex * bpf: expose bpf_parse_common() and bpf_load_common() * bpf: initialize the verifier log * bpf: keep parsed program mode in struct bpf_cfg_in * bpf: pass program type in struct bpf_cfg_in * bpf: rename bpf_parse_common() to bpf_parse_and_load_common() * bpf: split parse from program loading * bpf: update header file * bridge: fdb: print NDA_SRC_VNI if available * bridge: vlan: support for per vlan tunnel info * devlink, rdma, tipc: properly define TARGETS without HAVE_MNL * devlink: Ignore unknown attributes * drop unneeded include of syslog.h * f_bpf: communicate ifindex for eBPF offload * flower: Represent HW traffic classes as classid values * gre,ip6tnl/tunnel: Fix noencap- support * gre/tunnel: Print erspan_index using print_uint() * gre6/tunnel: Do not submit garbage in flowinfo * gre6/tunnel: Output flowlabel after tclass * gre: Fix ttl inherit option * ifcfg/rtpr: convert to POSIX shell * ila: Fix reporting of ILA locators and locator match * ila: added csum neutral support to ipila * ila: create ila_common.h * ila: fix formatting of help message * ila: support for configuring identifier and hook types * ila: support to configure checksum neutral-map-auto * include: add TCP fastopen option * include: qdisc offload defines * include: update ethernet headers * ip fou: pass family attribute as u8 * ip/ipvlan: enhance ability to add mode flags to existing modes * ip/tunnel: Abstract tunnel encapsulation options printing * ip/tunnel: Correct and unify ttl/hoplimit printing * ip/tunnel: Document "external" parameter * ip/tunnel: No need to free answer after rtnl_talk() on error * ip/tunnel: Simplify and unify tos printing * ip/tunnel: Unify setup and accept zero address for local/remote endpoints * ip/tunnel: Use get_addr() instead of get_prefix() for local/remote endpoints * ip/tunnel: Use print_0xhex() instead of print_string() * ip/tunnel: Use tnl_parse_key() to parse tunnel key * ip6/tunnel: Fix tclass output * ip6/tunnel: Unify encap_limit printing * ip6/tunnel: Unify flowlabel printing * ip6/tunnel: Unify tclass printing * ip6_gre: add support for ERSPAN tunnel * ip6tnl/tunnel: Do not print obscure flowinfo * ip6tnl/tunnel: Output hoplimit before encapsulation limit * ip: add fastopen_no_cookie option to ip route * ip: add vxcan to help text * ip: add vxcan/veth to ip-link man page * ip: address: fix stats64 JSON object name * ip: bridge_slave: add neigh_suppress to the type help and * ip: bridge_slave: add support for per-port group_fwd_mask * ip: gre: fix IFLA_GRE_LINK attribute sizing * ip: link_ip6tnl.c/ip6tunnel.c: Support IP6_TNL_F_ALLOW_LOCAL_REMOTE flag * ip: mroute: Print offload indication * ip: validate vlan value for vlan info * ipaddress: Make sure VF min/max rate API is supported before using it * ipaddress: Use family_name() for better code reuse * iplink: Fix "alias" parameter length calculations * iplink: Improve index parameter handling * iplink: Kill redundant network device name checks * iplink: Process "alias" parameter correctly * iplink: Use ll_index_to_name() instead of if_indextoname() * iplink: Use ll_name_to_index() instead of if_nametoindex() * iplink: Validate minimum tx rate is less than maximum tx rate * iplink: bridge: support bridge port vlan_tunnel attribute * iplink: communicate ifindex for xdp offload * iplink: new option to set neigh suppression on a bridge port * iproute2: fixes to compile on some systems. * iproute: "list/flush/save default" selected all of the routes * iproute: list/flush/save filter also by metric * iproute: source code cleanup * iptnl/ip6tnl: Unify ttl/hoplimit parsing routines * lib/libnetlink: re malloc buff if size is not enough * lib/libnetlink: update rtnl_talk to support malloc buff at run time * libnetlink: Handle extack messages for non-error case * link_gre6: Detect invalid encaplimit values * link_ip6tnl: Use IN6ADDR_ANY_INIT to initialize local/remote endpoints * link_iptnl: Kill code duplication * link_iptnl: Open "encap" JSON object * link_iptnl: Print tunnel mode * link_vti6: Always add local/remote endpoint attributes * man: Add initial manpage for tc-cbs(8) * man: Clarify idleslope calculation for tc-cbs * man: Document the meaning of zero in min/max_tx_rate parameters * man: add -json option to tc manpage * man: add more keywords to ip.8 short description * man: document ip fou show * man: document ip route get mark * man: document ip xfrm policy nosock * man: fix small formatting errors * man: ip-address: document 15-char limit for LABEL * man: routel/routef: don't mention filesystem paths * man: tc-csum.8: Fix inconsistency in example description * man: tc-flower: add explanation for hw_tc option * man: tc-mqprio: add documentation for new offload options * mark shell scripts +x * netem: use fixed rather than floating point for scaling * qdisc: print offload indication * ss: Buffer raw fields first, then render them as a table * ss: Implement automatic column width calculation * ss: Introduce columns lightweight abstraction * ss: Replace printf() calls for "main" output by calls to helper * ss: add AF_VSOCK support * ss: add missing path MTU parameter * ss: allow AF_FAMILY constants >32 * ss: fix NULL pointer access when parsing unix sockets with oldformat * ss: fix crash when skipping disabled header field * ss: fix crash with invalid command input file * ss: print tcpi_rcv_ssthresh * ss: remove duplicate assignment * tc/lexer: let quotes actually start strings * tc/mqprio: Offload mode and shaper options in mqprio * tc: Add support for the CBS qdisc * tc: B.W limits can now be specified in %. * tc: Fix filter protocol output * tc: Optimize gact action lookup * tc: bash-completion: add missing 'classid' keyword * tc: break long lines * tc: fix command "tc actions del" hang issue * tc: fix json array closing * tc: fix second printing of requeues * tc: flower remove unused variable * tc: flower: support for matching MPLS labels * tc: jsonify actions core, filter core, flower filter, fq_codel qdisc, gact action, htb qdisc, matchall filter, mirred action, qdisc core, stats2, and vlan action. * tc: move action cookie print out of the stats if * tc: remove action cookie len from printout * tc: remove no longer relevant README * tc: replace magic constant 16 with #define * tc: util: Don't call NEXT_ARG_FWD() in __parse_action_control() * tc_filter: resolve device name before parsing filter * tc_util: Drop needless pointer check * tc_util: Silence spurious compiler warning * tests: make sure rand_dev suffix has 6 chars * tests: read limited amount from /dev/urandom * tipc: change family attribute from u32 to u16 * tunnel: Add space between encap-dport and encap-sport in non-JSON output * tunnel: Return constant string without copying it * uapi: add include linux/vm_sockets_diag.h * utils: fix makeargs stack overflow * utils: ll_addr: Handle ARPHRD_IP6GRE in ll_addr_n2a() * vti/tunnel: Unify ikey/okey printing * vti/vti6: Minor improvements * vti6/tunnel: Unify and simplify link type help functions * vxcan,veth: Forbid "type" for peer device * vxlan: Make id optional when modifying a link * {f, m}_bpf: don't allow specifying multiple bpf programs - drop man-fix-documentation-references-in-manual-pages.patch * debian specific paths were removed altogether - partial cleanup with spec-cleaner - use https in urls OBS-URL: https://build.opensuse.org/request/show/573557 OBS-URL: https://build.opensuse.org/package/show/security:netfilter/iproute2?expand=0&rev=152
2018-02-08 00:11:24 +01:00
#DL-URL: https://kernel.org/pub/linux/utils/net/iproute2/
#Git-Clone: https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/
#Git-Mirror: https://github.com/shemminger/iproute2 ## not updated
Source: https://kernel.org/pub/linux/utils/net/iproute2/%name-%version.0.tar.xz
Source2: https://kernel.org/pub/linux/utils/net/iproute2/%name-%version.0.tar.sign
Source9: %name.keyring
Patch1: adjust-installation-directories-for-openSUSE-SLE.patch
Patch2: use-sysconf-_SC_CLK_TCK-if-HZ-undefined.patch
Patch3: add-explicit-typecast-to-avoid-gcc-warning.patch
Patch4: xfrm-support-displaying-transformations-used-for-Mob.patch
Patch6: split-link-and-compile-steps-for-binaries.patch
BuildRequires: bison
BuildRequires: db-devel
BuildRequires: fdupes
BuildRequires: flex
BuildRequires: libelf-devel
BuildRequires: pkgconfig >= 0.21
BuildRequires: xz
BuildRequires: pkgconfig(libmnl)
BuildRequires: pkgconfig(libselinux)
BuildRequires: pkgconfig(xtables) >= 1.4.11
Provides: %name-doc = %version
Provides: iproute = %version-%release
Provides: %name(xfrm6_raw) = %version-%release
Obsoletes: %name-doc < 4.15.0
%description
iproute2 is a collection of user-space utilities to set up networking
under Linux from the command-line. It can inspect and configure,
among other things: interface paramters, IP addresses, routing,
tunnels, bridges, packet transformations (IPsec, etc.), and Quality
of Service.
%package -n libnetlink-devel
Summary: A Higher Level Interface to the Netlink Service
License: GPL-2.0-or-later
Group: Development/Libraries/C and C++
Provides: libnetlink = %version-%release
%description -n libnetlink-devel
libnetlink provides a higher-level interface to rtnetlink(7).
New programs should use libmnl-devel instead.
%package bash-completion
Summary: Bash completion for iproute
License: GPL-2.0-or-later
Group: System/Shells
Requires: bash-completion
%description bash-completion
bash command line completion support for iproute.
%package arpd
Summary: Userspace ARP daemon
License: GPL-2.0-only
Group: Productivity/Networking/Routing
Provides: iproute2:/usr/sbin/arpd
%description arpd
The arpd daemon collects gratuitous ARP information, saving it on
local disk and feeding it to the kernel on demand to avoid redundant
broadcasting due to limited standard size (512..1024 entries,
depending on type) of the kernel ARP cache.
%prep
%autosetup -p1 -n %name-%version.0
find . -name *.orig -delete
%build
%global _lto_cflags %_lto_cflags -ffat-lto-objects
# build with -fPIC. For details see
# https://bugzilla.novell.com/show_bug.cgi?id=388021
xt_libdir="$(pkg-config xtables --variable=xtlibdir)"
xt_cflags="$(pkg-config xtables --cflags)"
%if 0%{!?make_build:1}
%define make_build make %{?_smp_mflags}
%endif
%make_build CCOPTS="-D_GNU_SOURCE %optflags -Wstrict-prototypes -Wno-error -fPIC -DXT_LIB_DIR=\\\"$xt_libdir\\\" $xt_cflags"
%install
b="%buildroot"
mkdir -p "$b/usr/bin" "$b/usr/sbin" "$b/sbin"
%make_install MODDESTDIR="$b/%_libdir/tc"
Accepting request 573557 from home:avindra - Update to new upstream release 4.15.0 * Add "show" subcommand to "ip fou" * Restore --no-print-directory option for silent builds * SPDX license identifiers * Show 'external' link mode in output * Update kernel headers with new SPDK identifier * bpf: allocate opcode table in struct bpf_cfg_in * bpf: allow loading programs for a specific ifindex * bpf: expose bpf_parse_common() and bpf_load_common() * bpf: initialize the verifier log * bpf: keep parsed program mode in struct bpf_cfg_in * bpf: pass program type in struct bpf_cfg_in * bpf: rename bpf_parse_common() to bpf_parse_and_load_common() * bpf: split parse from program loading * bpf: update header file * bridge: fdb: print NDA_SRC_VNI if available * bridge: vlan: support for per vlan tunnel info * devlink, rdma, tipc: properly define TARGETS without HAVE_MNL * devlink: Ignore unknown attributes * drop unneeded include of syslog.h * f_bpf: communicate ifindex for eBPF offload * flower: Represent HW traffic classes as classid values * gre,ip6tnl/tunnel: Fix noencap- support * gre/tunnel: Print erspan_index using print_uint() * gre6/tunnel: Do not submit garbage in flowinfo * gre6/tunnel: Output flowlabel after tclass * gre: Fix ttl inherit option * ifcfg/rtpr: convert to POSIX shell * ila: Fix reporting of ILA locators and locator match * ila: added csum neutral support to ipila * ila: create ila_common.h * ila: fix formatting of help message * ila: support for configuring identifier and hook types * ila: support to configure checksum neutral-map-auto * include: add TCP fastopen option * include: qdisc offload defines * include: update ethernet headers * ip fou: pass family attribute as u8 * ip/ipvlan: enhance ability to add mode flags to existing modes * ip/tunnel: Abstract tunnel encapsulation options printing * ip/tunnel: Correct and unify ttl/hoplimit printing * ip/tunnel: Document "external" parameter * ip/tunnel: No need to free answer after rtnl_talk() on error * ip/tunnel: Simplify and unify tos printing * ip/tunnel: Unify setup and accept zero address for local/remote endpoints * ip/tunnel: Use get_addr() instead of get_prefix() for local/remote endpoints * ip/tunnel: Use print_0xhex() instead of print_string() * ip/tunnel: Use tnl_parse_key() to parse tunnel key * ip6/tunnel: Fix tclass output * ip6/tunnel: Unify encap_limit printing * ip6/tunnel: Unify flowlabel printing * ip6/tunnel: Unify tclass printing * ip6_gre: add support for ERSPAN tunnel * ip6tnl/tunnel: Do not print obscure flowinfo * ip6tnl/tunnel: Output hoplimit before encapsulation limit * ip: add fastopen_no_cookie option to ip route * ip: add vxcan to help text * ip: add vxcan/veth to ip-link man page * ip: address: fix stats64 JSON object name * ip: bridge_slave: add neigh_suppress to the type help and * ip: bridge_slave: add support for per-port group_fwd_mask * ip: gre: fix IFLA_GRE_LINK attribute sizing * ip: link_ip6tnl.c/ip6tunnel.c: Support IP6_TNL_F_ALLOW_LOCAL_REMOTE flag * ip: mroute: Print offload indication * ip: validate vlan value for vlan info * ipaddress: Make sure VF min/max rate API is supported before using it * ipaddress: Use family_name() for better code reuse * iplink: Fix "alias" parameter length calculations * iplink: Improve index parameter handling * iplink: Kill redundant network device name checks * iplink: Process "alias" parameter correctly * iplink: Use ll_index_to_name() instead of if_indextoname() * iplink: Use ll_name_to_index() instead of if_nametoindex() * iplink: Validate minimum tx rate is less than maximum tx rate * iplink: bridge: support bridge port vlan_tunnel attribute * iplink: communicate ifindex for xdp offload * iplink: new option to set neigh suppression on a bridge port * iproute2: fixes to compile on some systems. * iproute: "list/flush/save default" selected all of the routes * iproute: list/flush/save filter also by metric * iproute: source code cleanup * iptnl/ip6tnl: Unify ttl/hoplimit parsing routines * lib/libnetlink: re malloc buff if size is not enough * lib/libnetlink: update rtnl_talk to support malloc buff at run time * libnetlink: Handle extack messages for non-error case * link_gre6: Detect invalid encaplimit values * link_ip6tnl: Use IN6ADDR_ANY_INIT to initialize local/remote endpoints * link_iptnl: Kill code duplication * link_iptnl: Open "encap" JSON object * link_iptnl: Print tunnel mode * link_vti6: Always add local/remote endpoint attributes * man: Add initial manpage for tc-cbs(8) * man: Clarify idleslope calculation for tc-cbs * man: Document the meaning of zero in min/max_tx_rate parameters * man: add -json option to tc manpage * man: add more keywords to ip.8 short description * man: document ip fou show * man: document ip route get mark * man: document ip xfrm policy nosock * man: fix small formatting errors * man: ip-address: document 15-char limit for LABEL * man: routel/routef: don't mention filesystem paths * man: tc-csum.8: Fix inconsistency in example description * man: tc-flower: add explanation for hw_tc option * man: tc-mqprio: add documentation for new offload options * mark shell scripts +x * netem: use fixed rather than floating point for scaling * qdisc: print offload indication * ss: Buffer raw fields first, then render them as a table * ss: Implement automatic column width calculation * ss: Introduce columns lightweight abstraction * ss: Replace printf() calls for "main" output by calls to helper * ss: add AF_VSOCK support * ss: add missing path MTU parameter * ss: allow AF_FAMILY constants >32 * ss: fix NULL pointer access when parsing unix sockets with oldformat * ss: fix crash when skipping disabled header field * ss: fix crash with invalid command input file * ss: print tcpi_rcv_ssthresh * ss: remove duplicate assignment * tc/lexer: let quotes actually start strings * tc/mqprio: Offload mode and shaper options in mqprio * tc: Add support for the CBS qdisc * tc: B.W limits can now be specified in %. * tc: Fix filter protocol output * tc: Optimize gact action lookup * tc: bash-completion: add missing 'classid' keyword * tc: break long lines * tc: fix command "tc actions del" hang issue * tc: fix json array closing * tc: fix second printing of requeues * tc: flower remove unused variable * tc: flower: support for matching MPLS labels * tc: jsonify actions core, filter core, flower filter, fq_codel qdisc, gact action, htb qdisc, matchall filter, mirred action, qdisc core, stats2, and vlan action. * tc: move action cookie print out of the stats if * tc: remove action cookie len from printout * tc: remove no longer relevant README * tc: replace magic constant 16 with #define * tc: util: Don't call NEXT_ARG_FWD() in __parse_action_control() * tc_filter: resolve device name before parsing filter * tc_util: Drop needless pointer check * tc_util: Silence spurious compiler warning * tests: make sure rand_dev suffix has 6 chars * tests: read limited amount from /dev/urandom * tipc: change family attribute from u32 to u16 * tunnel: Add space between encap-dport and encap-sport in non-JSON output * tunnel: Return constant string without copying it * uapi: add include linux/vm_sockets_diag.h * utils: fix makeargs stack overflow * utils: ll_addr: Handle ARPHRD_IP6GRE in ll_addr_n2a() * vti/tunnel: Unify ikey/okey printing * vti/vti6: Minor improvements * vti6/tunnel: Unify and simplify link type help functions * vxcan,veth: Forbid "type" for peer device * vxlan: Make id optional when modifying a link * {f, m}_bpf: don't allow specifying multiple bpf programs - drop man-fix-documentation-references-in-manual-pages.patch * debian specific paths were removed altogether - partial cleanup with spec-cleaner - use https in urls OBS-URL: https://build.opensuse.org/request/show/573557 OBS-URL: https://build.opensuse.org/package/show/security:netfilter/iproute2?expand=0&rev=152
2018-02-08 00:11:24 +01:00
# We have m_xt instead
rm -f "$b/%_libdir/tc/m_ipt.so"
install -pm0644 "lib/libnetlink.a" "$b/%_libdir/"
chmod -x "$b/%_libdir/libnetlink.a"
install -pm0644 "include/libnetlink.h" "$b/%_includedir/"
chmod -x "$b/%_includedir/libnetlink.h"
%if 0%{?usrmerged}
ln -sf "%_sbindir/ip" "$b/%_bindir/ip"
%else
ln -s "%_sbindir/ip" "$b/sbin/"
mkdir -p "$b/bin"
ln -sf "%_sbindir/ip" "$b/bin/ip"
%endif
for BIN in lnstat nstat routef routel ss; do
ln -sf "%_sbindir/$BIN" "$b/%_bindir/$BIN"
done
rm "$b/%_sbindir/ifcfg"
mkdir -p "$b/%_docdir/%name"
cp -an README* examples/bpf "$b/%_docdir/%name/"
%fdupes %buildroot/%_prefix
%files
%_bindir/lnstat
%_bindir/nstat
%_bindir/routef
%_bindir/routel
%_bindir/ss
%_sbindir/*
%exclude %_sbindir/arpd
%if 0%{?usrmerged}
%_bindir/ip
%else
/sbin/*
/bin/ip
%endif
%_mandir/man7/*
%_mandir/man8/*
%exclude %_mandir/man8/arpd.8*
%dir %_sysconfdir/iproute2
%config(noreplace) %_sysconfdir/iproute2/*
%_libdir/tc/
%_datadir/tc/
%_docdir/%name/
%if 1
#0%{?suse_version} >= 1500 || 0%{?sle_version} >= 120300
%license COPYING
%else
%doc COPYING
%endif
%files -n libnetlink-devel
%_includedir/*
%_mandir/man3/libnetlink*
%_libdir/lib*
%files bash-completion
%_datadir/bash-completion/
%files arpd
%_sbindir/arpd
%_mandir/man8/arpd.8*
%changelog