Sisyphus repository
Last update: 26 september 2018 | SRPMs: 18655 | Visits: 12267627
en ru br
ALT Linux repos
5.0: 20071127-alt4
4.1: 20071127-alt0.M41.1
4.0: 20020927-alt4.2
3.0: 20020927-alt2

Group :: Networking/Other
RPM: iputils

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Name: iputils
%define timestamp 20180629
Version: %timestamp
Release: alt1

Summary: Utilities for IPv4/IPv6 networking
License: %bsd, %gpl2plus, AS-IS (SUN MICROSYSTEMS license)
Group: Networking/Other

Source0: %name-%version.tar
Source1: ping.control
Patch: %name-%version-%release.patch
# Patch from upstream git.
# Drop it when new version will be released.
Patch1: 0001-tracepath-Fix-copying-input-IPv6-address.patch

Conflicts: netkit-base

PreReq: shadow-utils
PreReq: control >= 0.8.0-alt1
Requires: /var/resolv

BuildRequires(pre): rpm-build-licenses

BuildRequires: libcap-devel
BuildRequires: libsysfs-devel libssl-devel
BuildRequires: libidn2-devel
BuildRequires: docbook-style-xsl xsltproc

%define _unpackaged_files_terminate_build 1

%define sysctl_conf_file %_sysctldir/70-iputils.conf
%define ping_real_dir %_usr/libexec/ping

The iputils package contains basic utilities for monitoring a network:
+ clockdiff - measures clock difference;
+ ping/ping6 - sends ICMP ECHO_REQUEST packets to network hosts;
+ arping - ping by ARP packets;
+ rdisc - classic router discovery daemon;
+ tracepath/tracepath6 - traces path to destination discovering MTU
along this path.

%package -n ninfod
Group: Networking/Other
Summary: Node Information Query Daemon
License: %bsd

%description -n ninfod
Node Information Query (RFC4620) daemon. Responds to IPv6 Node Information

%patch -p1
%patch1 -p1

CFLAGS="%optflags -D_GNU_SOURCE -fno-strict-aliasing -Wstrict-prototypes"
%ifarch s390 s390x

%make_build \
arping clockdiff ping rdisc tracepath ninfod
%make_build man -C doc

mkdir -p %buildroot{%_bindir,%_sbindir,%_man8dir}
mkdir -p %buildroot%ping_real_dir
install -p arping clockdiff %buildroot%_sbindir/

install -p -m755 tracepath %buildroot%_bindir/
ln -s tracepath %buildroot%_bindir/tracepath6

install -p -m700 ping %buildroot%ping_real_dir/ping
ln -s %ping_real_dir/ping %buildroot%_bindir/ping
ln -s %ping_real_dir/ping %buildroot%_bindir/ping6

install -p rdisc %buildroot%_sbindir/rdisc
install -p ninfod/ninfod %buildroot%_sbindir/
pushd doc
install -pm644 arping.8 clockdiff.8 rdisc.8 ninfod.8 \
install -pD -m644 ping.1 %buildroot%_man1dir/ping.1
install -pD -m644 tracepath.1 %buildroot%_man1dir/tracepath.1
ln -s ping.1 %buildroot%_man1dir/ping6.1
ln -s tracepath.1 %buildroot%_man1dir/tracepath6.1

install -pD -m755 %SOURCE1 %buildroot%_controldir/ping

mkdir -p %buildroot%_sysctldir/
touch %buildroot%sysctl_conf_file

# for backward compatibility

mkdir -p %buildroot/bin/
for p in ping ping6 tracepath tracepath6; do
ln -s %_bindir/"$p"  %buildroot/bin/"$p"

groupadd -r -f iputils ||:
useradd -r -g iputils -d /dev/null -s /dev/null -n iputils >/dev/null 2>&1 ||:
groupadd -r -f netadmin ||:

%pre_control ping

if [ ! -e %sysctl_conf_file ]; then
ALLOW_GID="$(getent group iputils | cut -f3 -d:)" ||:
if [ -n "$ALLOW_GID" ]; then
cat >%_sysctldir/70-iputils.conf <<EOF
# Allow ping socket creation for group iputils
net.ipv4.ping_group_range = $ALLOW_GID $ALLOW_GID
sysctl -p %sysctl_conf_file ||:

%post_control ping

%config %_controldir/ping
%attr(700,root,netadmin) %verify(not mode) %dir %ping_real_dir/
%attr(2711,root,iputils) %ping_real_dir/ping
%ghost %config %sysctl_conf_file
%exclude %_sbindir/ninfod
%exclude %_man8dir/ninfod.*

%files -n ninfod
%doc ninfod/COPYING


Full changelog you can see here

design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin