Package ninfod (#877530)
This commit is contained in:
parent
03be2616b9
commit
92a760593b
@ -1,8 +1,8 @@
|
||||
Fedora-specific makefile patch.
|
||||
|
||||
--- iputils-s20121121/Makefile.orig 2012-11-21 11:32:18.000000000 +0100
|
||||
+++ iputils-s20121121/Makefile 2012-11-22 07:29:27.947670530 +0100
|
||||
@@ -29,7 +29,7 @@
|
||||
--- iputils-s20121125/Makefile.orig 2012-12-05 15:30:04.000000000 +0100
|
||||
+++ iputils-s20121125/Makefile 2012-12-05 15:31:50.349577490 +0100
|
||||
@@ -32,7 +32,7 @@
|
||||
# -------------------------------------
|
||||
# What a pity, all new gccs are buggy and -Werror does not work. Sigh.
|
||||
# CCOPT=-fno-strict-aliasing -Wstrict-prototypes -Wall -Werror -g
|
||||
@ -11,7 +11,7 @@ Fedora-specific makefile patch.
|
||||
CCOPTOPT=-O3
|
||||
GLIBCFIX=-D_GNU_SOURCE
|
||||
DEFINES=
|
||||
@@ -63,7 +63,7 @@
|
||||
@@ -77,7 +77,7 @@
|
||||
IPV6_TARGETS=tracepath6 traceroute6 ping6
|
||||
TARGETS=$(IPV4_TARGETS) $(IPV6_TARGETS)
|
||||
|
||||
@ -20,3 +20,11 @@ Fedora-specific makefile patch.
|
||||
LDLIBS=$(LDLIB) $(ADDLIB)
|
||||
|
||||
LASTTAG:=`git describe HEAD | sed -e 's/-.*//'`
|
||||
@@ -146,6 +146,7 @@
|
||||
|
||||
# -------------------------------------
|
||||
# ninfod
|
||||
+ninfod: CFLAGS:=$(filter-out -Werror,$(CFLAGS))
|
||||
ninfod:
|
||||
@set -e; \
|
||||
if [ ! -f ninfod/Makefile ]; then \
|
||||
|
24
iputils-20121125-ninfod-minor.patch
Normal file
24
iputils-20121125-ninfod-minor.patch
Normal file
@ -0,0 +1,24 @@
|
||||
Minor compilation (warnings) fixes.
|
||||
|
||||
Author: Jan Synacek <jsynacek@redhat.com>
|
||||
|
||||
--- iputils-s20121125/ninfod/ninfod.c.orig 2012-11-25 08:42:40.000000000 +0100
|
||||
+++ iputils-s20121125/ninfod/ninfod.c 2012-12-06 08:29:12.323928153 +0100
|
||||
@@ -110,6 +110,8 @@
|
||||
# include <sys/capability.h>
|
||||
#endif
|
||||
|
||||
+#include <time.h>
|
||||
+
|
||||
#include "ninfod.h"
|
||||
|
||||
#ifndef offsetof
|
||||
@@ -406,7 +408,7 @@ static void do_daemonize(void)
|
||||
if ((fp = fopen(opt_p, "r"))) {
|
||||
if (fscanf(fp, "%d", &pid) != 1) {
|
||||
DEBUG(LOG_ERR, "pid file '%s' exists, but read failed.\n",
|
||||
- opt_p, pid);
|
||||
+ opt_p);
|
||||
} else {
|
||||
DEBUG(LOG_ERR, "pid file '%s' exists : %d\n",
|
||||
opt_p, pid);
|
48
iputils.spec
48
iputils.spec
@ -1,7 +1,7 @@
|
||||
Summary: Network monitoring tools including ping
|
||||
Name: iputils
|
||||
Version: 20121125
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
# some parts are under the original BSD (ping.c)
|
||||
# some are under GPLv2+ (tracepath.c)
|
||||
License: BSD and GPLv2+
|
||||
@ -13,6 +13,7 @@ Source1: ifenslave.tar.gz
|
||||
Source3: rdisc.initd
|
||||
Source4: rdisc.service
|
||||
Source5: rdisc.sysconfig
|
||||
Source6: ninfod.service
|
||||
|
||||
Patch0: iputils-20020927-rh.patch
|
||||
Patch2: iputils-20020927-ping-subint.patch
|
||||
@ -21,6 +22,7 @@ Patch4: iputils-20121112-idn.patch
|
||||
Patch7: iputils-20121121-ifaddrs.patch
|
||||
Patch8: iputils-20121125-usage-before-caps.patch
|
||||
Patch9: iputils-20121125-doc-tags.patch
|
||||
Patch10: iputils-20121125-ninfod-minor.patch
|
||||
|
||||
BuildRequires: docbook-utils perl-SGMLSpm
|
||||
BuildRequires: glibc-kernheaders >= 2.4-8.19
|
||||
@ -32,6 +34,7 @@ Requires(preun): /sbin/chkconfig
|
||||
Requires(post): systemd-units
|
||||
Requires(preun): systemd-units
|
||||
Requires(postun): systemd-units
|
||||
# TODO change to systemd
|
||||
BuildRequires: systemd-units
|
||||
Requires: filesystem >= 3
|
||||
Provides: /bin/ping
|
||||
@ -55,6 +58,16 @@ Requires(postun): /sbin/service
|
||||
%description sysvinit
|
||||
The iputils-sysvinit contains SysV initscritps support.
|
||||
|
||||
%package ninfod
|
||||
Group: System Environment/Daemons
|
||||
Summary: Node Information Query Daemon
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Provides: %{_sbindir}/ninfod
|
||||
|
||||
%description ninfod
|
||||
Node Information Query (RFC4620) daemon. Responds to IPv6 Node Information
|
||||
Queries.
|
||||
|
||||
%prep
|
||||
%setup -q -a 1 -n %{name}-s%{version}
|
||||
|
||||
@ -65,6 +78,7 @@ The iputils-sysvinit contains SysV initscritps support.
|
||||
%patch7 -p1 -b .ifaddrs
|
||||
%patch8 -p1 -b .usage-before-caps
|
||||
%patch9 -p1 -b .doc-tags
|
||||
%patch10 -p1 -b .ninfod-minor
|
||||
|
||||
%build
|
||||
%ifarch s390 s390x
|
||||
@ -74,7 +88,8 @@ The iputils-sysvinit contains SysV initscritps support.
|
||||
%endif
|
||||
export LDFLAGS="-pie"
|
||||
|
||||
make %{?_smp_mflags} arping clockdiff ping ping6 rdisc tracepath tracepath6
|
||||
make %{?_smp_mflags} arping clockdiff ping ping6 rdisc tracepath tracepath6 \
|
||||
ninfod
|
||||
gcc -Wall $RPM_OPT_FLAGS ifenslave.c -o ifenslave
|
||||
make -C doc man
|
||||
|
||||
@ -92,6 +107,7 @@ install -cp rdisc ${RPM_BUILD_ROOT}%{_sbindir}/
|
||||
install -cp ping6 ${RPM_BUILD_ROOT}%{_bindir}/
|
||||
install -cp tracepath ${RPM_BUILD_ROOT}%{_bindir}/
|
||||
install -cp tracepath6 ${RPM_BUILD_ROOT}%{_bindir}/
|
||||
install -cp ninfod/ninfod ${RPM_BUILD_ROOT}%{_sbindir}/
|
||||
|
||||
mkdir -p ${RPM_BUILD_ROOT}%{_bindir}
|
||||
ln -sf ../bin/ping6 ${RPM_BUILD_ROOT}%{_sbindir}
|
||||
@ -104,6 +120,7 @@ install -cp doc/arping.8 ${RPM_BUILD_ROOT}%{_mandir}/man8/
|
||||
install -cp doc/ping.8 ${RPM_BUILD_ROOT}%{_mandir}/man8/
|
||||
install -cp doc/rdisc.8 ${RPM_BUILD_ROOT}%{_mandir}/man8/
|
||||
install -cp doc/tracepath.8 ${RPM_BUILD_ROOT}%{_mandir}/man8/
|
||||
install -cp doc/ninfod.8 ${RPM_BUILD_ROOT}%{_mandir}/man8/
|
||||
install -cp ifenslave.8 ${RPM_BUILD_ROOT}%{_mandir}/man8/
|
||||
ln -s ping.8.gz ${RPM_BUILD_ROOT}%{_mandir}/man8/ping6.8.gz
|
||||
ln -s tracepath.8.gz ${RPM_BUILD_ROOT}%{_mandir}/man8/tracepath6.8.gz
|
||||
@ -112,6 +129,7 @@ install -dp ${RPM_BUILD_ROOT}%{_sysconfdir}/rc.d/init.d
|
||||
install -m 755 -p %SOURCE3 ${RPM_BUILD_ROOT}%{_sysconfdir}/rc.d/init.d/rdisc
|
||||
install -m 644 %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/rdisc
|
||||
install -m 644 %SOURCE4 ${RPM_BUILD_ROOT}/%{_unitdir}
|
||||
install -m 644 %SOURCE6 ${RPM_BUILD_ROOT}/%{_unitdir}
|
||||
|
||||
iconv -f ISO88591 -t UTF8 RELNOTES -o RELNOTES.tmp
|
||||
touch -r RELNOTES RELNOTES.tmp
|
||||
@ -126,6 +144,15 @@ mv -f RELNOTES.tmp RELNOTES
|
||||
%postun
|
||||
%systemd_postun_with_restart rdisc.service
|
||||
|
||||
%post ninfod
|
||||
%systemd_post ninfod.service
|
||||
|
||||
%preun ninfod
|
||||
%systemd_preun ninfod.service
|
||||
|
||||
%postun ninfod
|
||||
%systemd_postun_with_restart ninfod.service
|
||||
|
||||
%files
|
||||
%doc RELNOTES README.bonding
|
||||
%{_unitdir}/rdisc.service
|
||||
@ -140,13 +167,28 @@ mv -f RELNOTES.tmp RELNOTES
|
||||
%{_sbindir}/ping6
|
||||
%{_sbindir}/tracepath
|
||||
%{_sbindir}/tracepath6
|
||||
%attr(644,root,root) %{_mandir}/man8/*
|
||||
%attr(644,root,root) %{_mandir}/man8/clockdiff.8.gz
|
||||
%attr(644,root,root) %{_mandir}/man8/arping.8.gz
|
||||
%attr(644,root,root) %{_mandir}/man8/ping.8.gz
|
||||
%attr(644,root,root) %{_mandir}/man8/ping6.8.gz
|
||||
%attr(644,root,root) %{_mandir}/man8/rdisc.8.gz
|
||||
%attr(644,root,root) %{_mandir}/man8/tracepath.8.gz
|
||||
%attr(644,root,root) %{_mandir}/man8/tracepath6.8.gz
|
||||
%attr(644,root,root) %{_mandir}/man8/ifenslave.8.gz
|
||||
%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/sysconfig/rdisc
|
||||
|
||||
%files sysvinit
|
||||
%{_sysconfdir}/rc.d/init.d/rdisc
|
||||
|
||||
%files ninfod
|
||||
%{_sbindir}/ninfod
|
||||
%{_unitdir}/ninfod.service
|
||||
%attr(644,root,root) %{_mandir}/man8/ninfod.8.gz
|
||||
|
||||
%changelog
|
||||
* Thu Dec 06 2012 Jan Synáček <jsynacek@redhat.com> - 20121125-3
|
||||
- Package ninfod (#877530)
|
||||
|
||||
* Mon Nov 26 2012 Jan Synáček <jsynacek@redhat.com> - 20121125-2
|
||||
- Comment patches and cleanup
|
||||
- Update ifaddrs patch
|
||||
|
Loading…
Reference in New Issue
Block a user