iputils/iputils.spec

116 lines
3.4 KiB
RPMSpec
Raw Normal View History

#
# spec file for package iputils
#
# Copyright (c) 2024 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/
#
Name: iputils
Version: 20240117
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/releases/download/20231222/iputils-%{version}.tar.xz
BuildRequires: docbook5-xsl-stylesheets
BuildRequires: docbook_5
BuildRequires: iproute2
BuildRequires: iso_ent
BuildRequires: libcap-devel
BuildRequires: libcap-progs
BuildRequires: meson
BuildRequires: opensp
BuildRequires: perl-SGMLS
BuildRequires: pkgconfig
BuildRequires: systemd-rpm-macros
BuildRequires: pkgconfig(libidn2)
BuildRequires: pkgconfig(systemd)
Requires(pre): permissions
Accepting request 397465 from home:markoschandras:branches:network:utilities - Update to version s20160308 (Changes taken from the RELNOTES file) * use syntax compatible with busybox date in Makefile * 'admin prohibited' should print !X not !S. * Makefile: use #define as in previous code changes * doc/Makefile: require bash, because we use pushd and popd * doc: don't timestamp manpages by default * ping: status() now returns received/transmitted instead of trans/recv * ping: don't mess with internals of struct msghdr * ping: ICMP error replies while errno < 0 is a hard error * ping: always use POSIX locale when parsing -i * ping: link against libm * made ping functions protocol independent * ping: perform dual-stack ping by default * ping: remove obsolete preprocessor directives * ping: avoid name clashes between IPv4 and IPv6 code * ping: merge all ping header files into a single one * ping: merge `ping6` command into `ping` * ping: refactor ping options * ping: refactor ping socket code * ping: merge IPv4 and IPv6 `pr_addr()` * ping: fix defines and libs in Makefile * ping: handle single protocol systems * iputils ping/ping6: Add a function to check if a packet is ours * ping: Add <linux/types.h> to fix compilation error. * ping6: Use GNUTLS API directly for MD5. (v2) * ping6: Use libgcrypt instead of gnutls for MD5. * Allow ping to use IPv6 addresses * ping,ping6 doc: More description on CAP_NET_RAW usage. * if IPv4 resolving fails fallback to ping6 * ping: in usage print the 'ping -6' options as well OBS-URL: https://build.opensuse.org/request/show/397465 OBS-URL: https://build.opensuse.org/package/show/network:utilities/iputils?expand=0&rev=41
2016-05-23 17:21:37 +02:00
# 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 lucky and no further changes are necessary.
Accepting request 397465 from home:markoschandras:branches:network:utilities - Update to version s20160308 (Changes taken from the RELNOTES file) * use syntax compatible with busybox date in Makefile * 'admin prohibited' should print !X not !S. * Makefile: use #define as in previous code changes * doc/Makefile: require bash, because we use pushd and popd * doc: don't timestamp manpages by default * ping: status() now returns received/transmitted instead of trans/recv * ping: don't mess with internals of struct msghdr * ping: ICMP error replies while errno < 0 is a hard error * ping: always use POSIX locale when parsing -i * ping: link against libm * made ping functions protocol independent * ping: perform dual-stack ping by default * ping: remove obsolete preprocessor directives * ping: avoid name clashes between IPv4 and IPv6 code * ping: merge all ping header files into a single one * ping: merge `ping6` command into `ping` * ping: refactor ping options * ping: refactor ping socket code * ping: merge IPv4 and IPv6 `pr_addr()` * ping: fix defines and libs in Makefile * ping: handle single protocol systems * iputils ping/ping6: Add a function to check if a packet is ours * ping: Add <linux/types.h> to fix compilation error. * ping6: Use GNUTLS API directly for MD5. (v2) * ping6: Use libgcrypt instead of gnutls for MD5. * Allow ping to use IPv6 addresses * ping,ping6 doc: More description on CAP_NET_RAW usage. * if IPv4 resolving fails fallback to ping6 * ping: in usage print the 'ping -6' options as well OBS-URL: https://build.opensuse.org/request/show/397465 OBS-URL: https://build.opensuse.org/package/show/network:utilities/iputils?expand=0&rev=41
2016-05-23 17:21:37 +02:00
Provides: /bin/ping
Provides: /sbin/arping
%description
This package contains some small network tools for IPv4 and IPv6 like
ping, arping and tracepath.
%prep
%autosetup -p1
%build
Accepting request 397465 from home:markoschandras:branches:network:utilities - Update to version s20160308 (Changes taken from the RELNOTES file) * use syntax compatible with busybox date in Makefile * 'admin prohibited' should print !X not !S. * Makefile: use #define as in previous code changes * doc/Makefile: require bash, because we use pushd and popd * doc: don't timestamp manpages by default * ping: status() now returns received/transmitted instead of trans/recv * ping: don't mess with internals of struct msghdr * ping: ICMP error replies while errno < 0 is a hard error * ping: always use POSIX locale when parsing -i * ping: link against libm * made ping functions protocol independent * ping: perform dual-stack ping by default * ping: remove obsolete preprocessor directives * ping: avoid name clashes between IPv4 and IPv6 code * ping: merge all ping header files into a single one * ping: merge `ping6` command into `ping` * ping: refactor ping options * ping: refactor ping socket code * ping: merge IPv4 and IPv6 `pr_addr()` * ping: fix defines and libs in Makefile * ping: handle single protocol systems * iputils ping/ping6: Add a function to check if a packet is ours * ping: Add <linux/types.h> to fix compilation error. * ping6: Use GNUTLS API directly for MD5. (v2) * ping6: Use libgcrypt instead of gnutls for MD5. * Allow ping to use IPv6 addresses * ping,ping6 doc: More description on CAP_NET_RAW usage. * if IPv4 resolving fails fallback to ping6 * ping: in usage print the 'ping -6' options as well OBS-URL: https://build.opensuse.org/request/show/397465 OBS-URL: https://build.opensuse.org/package/show/network:utilities/iputils?expand=0&rev=41
2016-05-23 17:21:37 +02:00
# Pulled-in by the LINK.o variable.
export LDFLAGS="-Wl,-z,relro,-z,now"
Accepting request 397465 from home:markoschandras:branches:network:utilities - Update to version s20160308 (Changes taken from the RELNOTES file) * use syntax compatible with busybox date in Makefile * 'admin prohibited' should print !X not !S. * Makefile: use #define as in previous code changes * doc/Makefile: require bash, because we use pushd and popd * doc: don't timestamp manpages by default * ping: status() now returns received/transmitted instead of trans/recv * ping: don't mess with internals of struct msghdr * ping: ICMP error replies while errno < 0 is a hard error * ping: always use POSIX locale when parsing -i * ping: link against libm * made ping functions protocol independent * ping: perform dual-stack ping by default * ping: remove obsolete preprocessor directives * ping: avoid name clashes between IPv4 and IPv6 code * ping: merge all ping header files into a single one * ping: merge `ping6` command into `ping` * ping: refactor ping options * ping: refactor ping socket code * ping: merge IPv4 and IPv6 `pr_addr()` * ping: fix defines and libs in Makefile * ping: handle single protocol systems * iputils ping/ping6: Add a function to check if a packet is ours * ping: Add <linux/types.h> to fix compilation error. * ping6: Use GNUTLS API directly for MD5. (v2) * ping6: Use libgcrypt instead of gnutls for MD5. * Allow ping to use IPv6 addresses * ping,ping6 doc: More description on CAP_NET_RAW usage. * if IPv4 resolving fails fallback to ping6 * ping: in usage print the 'ping -6' options as well OBS-URL: https://build.opensuse.org/request/show/397465 OBS-URL: https://build.opensuse.org/package/show/network:utilities/iputils?expand=0&rev=41
2016-05-23 17:21:37 +02:00
%meson -DNO_SETCAP_OR_SUID=true -Db_pie=true -Dc_std=none
%meson_build
%install
%meson_install
# boo#1017616
ln -sf %{_bindir}/ping %{buildroot}/%{_bindir}/ping6
ln -sf %{_bindir}/tracepath %{buildroot}/%{_bindir}/tracepath6
# symlink to man tracepath6(8)
ln -sf %{_mandir}/man8/tracepath.8%{ext_man} %{buildroot}%{_mandir}/man8/tracepath6.8%{ext_man}
%if 0%{?suse_version} < 1550
Accepting request 397465 from home:markoschandras:branches:network:utilities - Update to version s20160308 (Changes taken from the RELNOTES file) * use syntax compatible with busybox date in Makefile * 'admin prohibited' should print !X not !S. * Makefile: use #define as in previous code changes * doc/Makefile: require bash, because we use pushd and popd * doc: don't timestamp manpages by default * ping: status() now returns received/transmitted instead of trans/recv * ping: don't mess with internals of struct msghdr * ping: ICMP error replies while errno < 0 is a hard error * ping: always use POSIX locale when parsing -i * ping: link against libm * made ping functions protocol independent * ping: perform dual-stack ping by default * ping: remove obsolete preprocessor directives * ping: avoid name clashes between IPv4 and IPv6 code * ping: merge all ping header files into a single one * ping: merge `ping6` command into `ping` * ping: refactor ping options * ping: refactor ping socket code * ping: merge IPv4 and IPv6 `pr_addr()` * ping: fix defines and libs in Makefile * ping: handle single protocol systems * iputils ping/ping6: Add a function to check if a packet is ours * ping: Add <linux/types.h> to fix compilation error. * ping6: Use GNUTLS API directly for MD5. (v2) * ping6: Use libgcrypt instead of gnutls for MD5. * Allow ping to use IPv6 addresses * ping,ping6 doc: More description on CAP_NET_RAW usage. * if IPv4 resolving fails fallback to ping6 * ping: in usage print the 'ping -6' options as well OBS-URL: https://build.opensuse.org/request/show/397465 OBS-URL: https://build.opensuse.org/package/show/network:utilities/iputils?expand=0&rev=41
2016-05-23 17:21:37 +02:00
# 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 %{_bindir}/arping %{buildroot}/bin
ln -sf %{_bindir}/clockdiff %{buildroot}/bin
ln -sf %{_bindir}/ping %{buildroot}/bin
ln -sf %{_bindir}/ping6 %{buildroot}/bin
ln -sf %{_bindir}/tracepath %{buildroot}/bin
ln -sf %{_bindir}/tracepath6 %{buildroot}/bin
%endif
Accepting request 397465 from home:markoschandras:branches:network:utilities - Update to version s20160308 (Changes taken from the RELNOTES file) * use syntax compatible with busybox date in Makefile * 'admin prohibited' should print !X not !S. * Makefile: use #define as in previous code changes * doc/Makefile: require bash, because we use pushd and popd * doc: don't timestamp manpages by default * ping: status() now returns received/transmitted instead of trans/recv * ping: don't mess with internals of struct msghdr * ping: ICMP error replies while errno < 0 is a hard error * ping: always use POSIX locale when parsing -i * ping: link against libm * made ping functions protocol independent * ping: perform dual-stack ping by default * ping: remove obsolete preprocessor directives * ping: avoid name clashes between IPv4 and IPv6 code * ping: merge all ping header files into a single one * ping: merge `ping6` command into `ping` * ping: refactor ping options * ping: refactor ping socket code * ping: merge IPv4 and IPv6 `pr_addr()` * ping: fix defines and libs in Makefile * ping: handle single protocol systems * iputils ping/ping6: Add a function to check if a packet is ours * ping: Add <linux/types.h> to fix compilation error. * ping6: Use GNUTLS API directly for MD5. (v2) * ping6: Use libgcrypt instead of gnutls for MD5. * Allow ping to use IPv6 addresses * ping,ping6 doc: More description on CAP_NET_RAW usage. * if IPv4 resolving fails fallback to ping6 * ping: in usage print the 'ping -6' options as well OBS-URL: https://build.opensuse.org/request/show/397465 OBS-URL: https://build.opensuse.org/package/show/network:utilities/iputils?expand=0&rev=41
2016-05-23 17:21:37 +02:00
%find_lang %{name}
%post
%set_permissions %{_bindir}/clockdiff
%verifyscript
%verify_permissions -e %{_bindir}/clockdiff
%files -f %{name}.lang
%license LICENSE
%{_bindir}/arping
%verify(not mode caps) %attr(0755,root,root) %{_bindir}/clockdiff
%verify(not mode caps) %attr(0755,root,root) %{_bindir}/ping
%{_bindir}/ping6
Accepting request 397465 from home:markoschandras:branches:network:utilities - Update to version s20160308 (Changes taken from the RELNOTES file) * use syntax compatible with busybox date in Makefile * 'admin prohibited' should print !X not !S. * Makefile: use #define as in previous code changes * doc/Makefile: require bash, because we use pushd and popd * doc: don't timestamp manpages by default * ping: status() now returns received/transmitted instead of trans/recv * ping: don't mess with internals of struct msghdr * ping: ICMP error replies while errno < 0 is a hard error * ping: always use POSIX locale when parsing -i * ping: link against libm * made ping functions protocol independent * ping: perform dual-stack ping by default * ping: remove obsolete preprocessor directives * ping: avoid name clashes between IPv4 and IPv6 code * ping: merge all ping header files into a single one * ping: merge `ping6` command into `ping` * ping: refactor ping options * ping: refactor ping socket code * ping: merge IPv4 and IPv6 `pr_addr()` * ping: fix defines and libs in Makefile * ping: handle single protocol systems * iputils ping/ping6: Add a function to check if a packet is ours * ping: Add <linux/types.h> to fix compilation error. * ping6: Use GNUTLS API directly for MD5. (v2) * ping6: Use libgcrypt instead of gnutls for MD5. * Allow ping to use IPv6 addresses * ping,ping6 doc: More description on CAP_NET_RAW usage. * if IPv4 resolving fails fallback to ping6 * ping: in usage print the 'ping -6' options as well OBS-URL: https://build.opensuse.org/request/show/397465 OBS-URL: https://build.opensuse.org/package/show/network:utilities/iputils?expand=0&rev=41
2016-05-23 17:21:37 +02:00
%{_bindir}/tracepath
%{_bindir}/tracepath6
%if 0%{?suse_version} < 1550
/bin/arping
/bin/clockdiff
/bin/ping
/bin/ping6
/bin/tracepath
/bin/tracepath6
%endif
%{_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}
%changelog