SHA256
1
0
forked from pool/iputils
iputils/iputils.spec
Petr Vorel a4fc3d0421 Accepting request 619908 from home:pevik:branches:network:utilities
- Update to version s20180629
  * ping: Fix signed overflow/conversion warning
  * ping: Fix ping name encoded using ACE on C locale
  * fix checksum always success in IPv4 ping.
  * ping6: Fix device binding
  * Ping: Correct rounding of timing displays
  * docs: Tiny fixes in README.md
  * doc/ping: Update Interface section
  * doc/ping: Replace deprecated commands in "SEE ALSO" section
  * Revert "correctly initialize first hop"
  * tracepath: Support calling `tracepath` as `tracepath4` or `tracepath6`
  * ping: remove spurious error message
  * tracepath: fix heap-buffer-overflow [asan]
  * arping: do not use libsysfs to read from /sys
  * .travis.yml: corrected variable values in matrix
  * .travis.yml: install libidn2
  * ping: use libidn2 instead of libidn
  * ping: Remove workaround for bug in IP_RECVERR on raw sockets
  * ping6: simplified IDNA usage
  * traceroute6: use getaddrinfo IDNA conversion
  * arping,tracepath: removed unused idna header
  * cleanup: really old code, simplify little bit
  * licenses: fill missing clockdiff.c and ping_common.c license
  * LICENSE: convert BSD4 to BSD3 license
  * doc: ping - document mdev behaviour
  * LICENSE: add information about licenses
  * ping: fix incorrect packet loss calculation
  * doc: convert from converting SGML to XML
  * travis-ci: cleanup and switch to Ubuntu 14.04 build
  * RELNOTES: deprecated in favor of git history & github
  * remove iputils.spec
  * ping: fix conflicting defines
  * ping: flowinfo: fixup checks for flowinfo and also add decimal numbers support
  * ping: parsetos verification is enough, allow decimal values
  * ping: fix typo in error tos error message
  * meson: add experimental meson buildsystem support
  * gitignore: prepare for Meson
  * ping: read from error queue when POLLERR is set
  * ping_common.c: POLLERRR is ignored in events
  * ping: fix pmtu discovery for ipv6
  * traceroute6: Fix traceroute to IPv6 address
  * traceroute6: Fix leaking the idn memory
  * traceroute6: Fix use after free for hostname
  * tracepath,doc: Added -4, -6 Parameter in doc and void usage(void)
  * fix multicast setsockopt calls on big endian
  * arping: exit if network disappears while running
  * ping: prevent possible double free after cap_free()
  * Add strict pattern matching on response when pattern was provided
  * traceroute6: Fix udp packet port specification.
- Removed patches (taken from upstream, now in tree)
  * iputils-add-license-info.diff
  * iputils-ping-fix-pmtu-for-ipv6.patch
  * iputils-remove-bogus-check-required-for-2.4.9-kernels.patch
- Rebased patches
  * iputils-ping-interrupt.diff
  * iputils-sec-ping-unblock.diff
- Add build dependency docbook-xsl-stylesheets (required by man pages)
- Add tracepath6 man page, updated list of unwanted man enties (ipg, pgset)
- Removed RELNOTES (upstream removed it)

OBS-URL: https://build.opensuse.org/request/show/619908
OBS-URL: https://build.opensuse.org/package/show/network:utilities/iputils?expand=0&rev=64
2018-07-03 22:02:17 +00:00

183 lines
5.3 KiB
RPMSpec

#
# spec file for package iputils
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
#
Name: iputils
Version: s20180629
Release: 0
Summary: IPv4 and IPv6 Networking Utilities
License: BSD-3-Clause AND GPL-2.0-or-later
Group: Productivity/Networking/Other
Url: https://github.com/iputils/iputils
Source0: https://github.com/iputils/iputils/archive/%{version}.tar.gz
Source1: rarpd.service
Patch8: iputils-sec-ping-unblock.diff
Patch9: iputils-ping-interrupt.diff
BuildRequires: docbook-xsl-stylesheets
BuildRequires: docbook_3
BuildRequires: iso_ent
BuildRequires: libcap-devel
BuildRequires: libidn2-devel
BuildRequires: libopenssl-devel
BuildRequires: opensp
BuildRequires: perl-SGMLS
BuildRequires: pkgconfig
BuildRequires: systemd-rpm-macros
# For Makefile modifications
BuildRequires: sed
BuildRequires: pkgconfig(libidn)
Requires(pre): permissions
# I have spotted at least two packages (yast-printer and dhcp-client) that need
# /bin/ping and /sbin/arping but they do not seem to use them with absolute
# paths so we may be lukcy and no further changes are necessary.
Provides: /bin/ping
Provides: /sbin/arping
%description
This package contains some small network tools for IPv4 and IPv6 like
rdisc, ping, arping and tracepath.
%package -n rarpd
Summary: Reverse Address Resolution Protocol Daemon
Group: Productivity/Networking/System
%systemd_requires
%description -n rarpd
Rarpd listens on the Ethernet for broadcast packets asking for reverse
address resolution. These packets are sent by hosts at boot time to find
out their IP addresses.
%prep
%setup -q
%patch8 -p1
%patch9 -p1
%build
# Drop LASTTAG variable since it needs git and it's not used for regular
# building
sed -i '/^LASTTAG:=/d' Makefile
# Do not link against nettle
sed -i '/^USE_NETTLE/s/yes/no/' Makefile
# Export CFLAGS so we can also benefit from the ones the Makefile sets for us
# Instead of overriding all of them.
export CFLAGS='%{optflags} -fpie'
# Pulled-in by the LINK.o variable.
export LDFLAGS='-pie -Wl,-z,relro,-z,now'
# Build only selected apps
make %{?_smp_mflags} arping clockdiff ping rdisc tracepath \
rarpd man
%install
mkdir -p %{buildroot}/%{_sbindir}
mkdir -p %{buildroot}/%{_bindir}
install arping %{buildroot}/%{_sbindir}
install clockdiff %{buildroot}/%{_sbindir}
install rarpd %{buildroot}/%{_sbindir}
install rdisc %{buildroot}/%{_sbindir}
# boo#795788
install tracepath %{buildroot}/%{_bindir}
install ping %{buildroot}/%{_bindir}
# boo#1017616
ln -sf %{_bindir}/ping %{buildroot}/%{_bindir}/ping6
ln -sf %{_bindir}/tracepath %{buildroot}/%{_bindir}/tracepath6
#UsrMerge
# We still have reverse dependencies using /sbin/* or /bin/*
# so keep these symlinks for now. They are slowly being fixed
# but lets not just break them yet.
mkdir -p %{buildroot}/{bin,sbin}
ln -sf %{_sbindir}/arping %{buildroot}/sbin
ln -sf %{_sbindir}/clockdiff %{buildroot}/sbin
ln -sf %{_sbindir}/rarpd %{buildroot}/sbin
ln -sf %{_sbindir}/rdisc %{buildroot}/sbin
ln -sf %{_bindir}/tracepath %{buildroot}/bin
ln -sf %{_bindir}/ping %{buildroot}/bin
ln -sf %{_bindir}/ping6 %{buildroot}/bin
ln -sf %{_bindir}/tracepath6 %{buildroot}/bin
#EndUsrMerge
mkdir -p %{buildroot}/%{_mandir}/man8
# Remove conflicting / unused manpages
rm doc/ninfod* doc/pg3* doc/rdisc* doc/tftpd* doc/traceroute* doc/ipg* doc/pgset*
# Install the rest
install -m 644 doc/*.8 %{buildroot}%{_mandir}/man8/
# Install rarp service and create rc compat symling
install -Dpm 0644 %{SOURCE1} %{buildroot}/%{_unitdir}/rarpd.service
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rcrarpd
%post
%set_permissions %{_bindir}/ping
%verifyscript
%verify_permissions -e %{_bindir}/ping
%pre -n rarpd
%service_add_pre rarpd.service
%post -n rarpd
%service_add_post rarpd.service
%preun -n rarpd
%service_del_preun rarpd.service
%postun -n rarpd
%service_del_postun rarpd.service
%files
%if 0%{?suse_version} < 1500
%doc LICENSE LICENSE.BSD3 LICENSE.GPL2
%else
%license LICENSE LICENSE.BSD3 LICENSE.GPL2
%endif
%verify(not mode caps) %attr(0755,root,root) %{_bindir}/ping
%{_bindir}/ping6
%{_sbindir}/arping
%{_sbindir}/clockdiff
%{_bindir}/tracepath
%{_bindir}/tracepath6
%{_sbindir}/rdisc
#UsrMerge
/bin/ping
/bin/ping6
/bin/tracepath
/bin/tracepath6
/sbin/arping
/sbin/clockdiff
/sbin/rdisc
#EndUsrMerge
%{_mandir}/man8/arping.8%{ext_man}
%{_mandir}/man8/clockdiff.8%{ext_man}
%{_mandir}/man8/ping.8%{ext_man}
%{_mandir}/man8/tracepath.8%{ext_man}
%{_mandir}/man8/tracepath6.8%{ext_man}
#EndUsrMerge
%files -n rarpd
%{_sbindir}/rarpd
%{_sbindir}/rcrarpd
%{_unitdir}/rarpd.service
#UsrMerge
/sbin/rarpd
#EndUsrMerge
%{_mandir}/man8/rarpd.8%{ext_man}
%changelog