From 20e2488ee01d1d55a03852520a6b74faea042e98 Mon Sep 17 00:00:00 2001 From: linggao Date: Thu, 7 Feb 2008 19:21:28 +0000 Subject: [PATCH] adding build nodes and spec files for builing latest fping (2.4b2_to) on Linux and AIX --- AIX/fping/Build-nodes | 22 +++++++++++++ AIX/fping/fping.spec | 34 ++++++++++++++++++++ fping/Build-nodes | 13 ++++++++ fping/fping.patch | 72 ------------------------------------------- fping/fping.spec | 10 +++--- 5 files changed, 74 insertions(+), 77 deletions(-) create mode 100644 AIX/fping/Build-nodes create mode 100644 AIX/fping/fping.spec create mode 100644 fping/Build-nodes delete mode 100644 fping/fping.patch diff --git a/AIX/fping/Build-nodes b/AIX/fping/Build-nodes new file mode 100644 index 0000000..0f6bc2f --- /dev/null +++ b/AIX/fping/Build-nodes @@ -0,0 +1,22 @@ +Build notes + +1. download fping.tar.gz (version 2.4b2_to) from http://fping.sourceforge.net/download/ + and copy it to /tmp/fping directory. +2. cd to /tmp/fping. +3. un-tar the files +4. run ./fping-2.4b2_to/configure to create a Makefile. +5. Change line 121 + from + extern int h_errno; + to + #ifndef h_errno + extern int h_errno; + #endif + to avoid compiling errors. +6. tar -cvf fping.tar fping-2.4b2_to +7. gzip fping.tar to create a new fping.tar.gz +8. copy fping.tar.gz to /opt/freeware/src/packages/SOURCES/ directory +9. copy fping.spec to /opt/freeware/src/packages/SPECS/ directory +10. cd to /opt/freeware/src/packages/SPECS +11. run rpm -bb fping.spec + diff --git a/AIX/fping/fping.spec b/AIX/fping/fping.spec new file mode 100644 index 0000000..7468949 --- /dev/null +++ b/AIX/fping/fping.spec @@ -0,0 +1,34 @@ +Source: fping.tar.gz +#Patch: fping.patch +Release: 1 +AutoReq: true +AutoProv: true +BuildRoot: %{_tmppath}/fping-2.4b2-root + +Name: fping +Version: 2.4b2_to +Group: System/Utilities +License: Stanford +Summary: Pings hosts in parallel +URL: http://fping.sourceforge.net/ + +%Description +fping pings hosts in parallel +%Prep +%setup -q +#%patch + + +%Build +make +%Install +mkdir -p $RPM_BUILD_ROOT/usr/bin +cp fping $RPM_BUILD_ROOT/usr/bin +mkdir -p $RPM_BUILD_ROOT/usr/share/man/man8/ +cp fping.8 $RPM_BUILD_ROOT/usr/share/man/man8/ +pwd +echo $RPM_BUILD_ROOT +%Files +%defattr(-,root,root) +/usr/bin/fping +/usr/share/man/man8/fping.8 diff --git a/fping/Build-nodes b/fping/Build-nodes new file mode 100644 index 0000000..e46505a --- /dev/null +++ b/fping/Build-nodes @@ -0,0 +1,13 @@ +Build notes + +1. download fping.tar.gz (version 2.4b2_to) from http://fping.sourceforge.net/download/ + and copy it to /tmp/fping directory. +2. cd to /tmp/fping. +3. un-tar the files +4. run ./fping-2.4b2_to/configure to create a Makefile. +5. copy fping.spec to current directory +6. tar -cvf fping.tar fping.spec fping-2.4b2_to +7. gzip fping.tar to create a new fping.tar.gz +8. copy fping.tar.gz to /usr/src/packages/SOURCES/ directory +9. rpmbuild -ta /usr/src/packages/SOURCES/fping.tar.gz + diff --git a/fping/fping.patch b/fping/fping.patch deleted file mode 100644 index 21479c5..0000000 --- a/fping/fping.patch +++ /dev/null @@ -1,72 +0,0 @@ -*** fping.c.ORIG Mon Nov 20 09:45:00 2000 ---- fping.c Mon Nov 20 09:45:51 2000 -*************** -*** 219,225 **** - - extern char *optarg; - extern int optind,opterr; -! extern char *sys_errlist[]; - extern int h_errno; - - #ifdef __cplusplus ---- 219,225 ---- - - extern char *optarg; - extern int optind,opterr; -! /*extern char *sys_errlist[];*/ - extern int h_errno; - - #ifdef __cplusplus -*************** -*** 842,848 **** - if(verbose_flag || unreachable_flag) { - printf("%s", h->host); - if (verbose_flag) -! printf(" is unreachable"); - printf("\n"); - } - } ---- 842,849 ---- - if(verbose_flag || unreachable_flag) { - printf("%s", h->host); - if (verbose_flag) -! /* printf(" is unreachable");*/ -! printf(": noping"); - printf("\n"); - } - } -*************** -*** 1129,1135 **** - /* handle some problem */ - if (handle_random_icmp(icp, result, &response_addr)) - num_othericmprcvd++; -! return 1; - } - - if (icp->icmp_id != ident) ---- 1130,1136 ---- - /* handle some problem */ - if (handle_random_icmp(icp, result, &response_addr)) - num_othericmprcvd++; -! return 0; - } - - if (icp->icmp_id != ident) -*************** -*** 1196,1202 **** - num_alive++; - if(verbose_flag||alive_flag) { - printf("%s",h->host); -! if (verbose_flag) printf(" is alive"); - if (elapsed_flag) printf(" (%s ms)", sprint_tm(this_reply)); - if (response_addr.sin_addr.s_addr != h->saddr.sin_addr.s_addr) - printf(" [<- %s]", inet_ntoa(response_addr.sin_addr)); ---- 1197,1204 ---- - num_alive++; - if(verbose_flag||alive_flag) { - printf("%s",h->host); -! /* if (verbose_flag) printf(" is alive");*/ -! if (verbose_flag) printf(": ping"); - if (elapsed_flag) printf(" (%s ms)", sprint_tm(this_reply)); - if (response_addr.sin_addr.s_addr != h->saddr.sin_addr.s_addr) - printf(" [<- %s]", inet_ntoa(response_addr.sin_addr)); diff --git a/fping/fping.spec b/fping/fping.spec index c64c336..d4e7c79 100644 --- a/fping/fping.spec +++ b/fping/fping.spec @@ -1,12 +1,12 @@ -Source: fping-2.2b1.tar.gz -Patch: fping.patch +Source: fping.tar.gz +#Patch: fping.patch Release: 1 AutoReq: true AutoProv: true -BuildRoot: %{_tmppath}/fping-2.2b1-root +BuildRoot: %{_tmppath}/fping-2.4b2-root Name: fping -Version: 2.2b1 +Version: 2.4b2_to Group: System/Utilities License: Stanford Summary: Pings hosts in parallel @@ -16,7 +16,7 @@ URL: http://fping.sourceforge.net/ fping pings hosts in parallel %Prep %setup -q -%patch +#%patch %Build