rpms/ntp/devel ntp-4.2.4p2-noif.patch, NONE, 1.1 ntp.spec, 1.72, 1.73 filter-requires-ntp.sh, 1.1, NONE

Miroslav Lichvar (mlichvar) fedora-extras-commits at redhat.com
Mon Sep 24 14:34:15 UTC 2007


Author: mlichvar

Update of /cvs/pkgs/rpms/ntp/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv1673

Modified Files:
	ntp.spec 
Added Files:
	ntp-4.2.4p2-noif.patch 
Removed Files:
	filter-requires-ntp.sh 
Log Message:
- require perl (#274771)
- don't fail when starting with no interfaces (#300371)


ntp-4.2.4p2-noif.patch:

--- NEW FILE ntp-4.2.4p2-noif.patch ---
diff -up ntp-4.2.4p2/libisc/ifiter_sysctl.c.noif ntp-4.2.4p2/libisc/ifiter_sysctl.c
--- ntp-4.2.4p2/libisc/ifiter_sysctl.c.noif	2006-06-06 22:16:23.000000000 +0200
+++ ntp-4.2.4p2/libisc/ifiter_sysctl.c	2007-09-24 16:08:55.000000000 +0200
@@ -309,7 +309,10 @@ internal_destroy(isc_interfaceiter_t *it
 	 */
 }
 
-static
-void internal_first(isc_interfaceiter_t *iter) {
+static isc_result_t
+internal_first(isc_interfaceiter_t *iter) {
 	iter->pos = 0;
+	if (iter->pos >= iter->bufused)
+		return (ISC_R_NOMORE);
+	return (ISC_R_SUCCESS);
 }
diff -up ntp-4.2.4p2/libisc/ifiter_ioctl.c.noif ntp-4.2.4p2/libisc/ifiter_ioctl.c
--- ntp-4.2.4p2/libisc/ifiter_ioctl.c.noif	2007-09-24 16:08:55.000000000 +0200
+++ ntp-4.2.4p2/libisc/ifiter_ioctl.c	2007-09-24 16:08:55.000000000 +0200
@@ -1098,8 +1098,8 @@ internal_destroy(isc_interfaceiter_t *it
 #endif
 }
 
-static
-void internal_first(isc_interfaceiter_t *iter) {
+static isc_result_t
+internal_first(isc_interfaceiter_t *iter) {
 #ifdef HAVE_TRUCLUSTER
 	int clua_result;
 #endif
@@ -1118,5 +1118,10 @@ void internal_first(isc_interfaceiter_t 
 #endif
 #ifdef __linux
 	linux_if_inet6_first(iter);
+	if (iter->valid == ISC_R_SUCCESS)
+		return (iter->valid);
 #endif
+	if (iter->pos >= (unsigned int) iter->ifc.ifc_len)
+		return (ISC_R_NOMORE);
+	return (ISC_R_SUCCESS);
 }
diff -up ntp-4.2.4p2/libisc/interfaceiter.c.noif ntp-4.2.4p2/libisc/interfaceiter.c
--- ntp-4.2.4p2/libisc/interfaceiter.c.noif	2006-06-06 22:16:24.000000000 +0200
+++ ntp-4.2.4p2/libisc/interfaceiter.c	2007-09-24 16:08:55.000000000 +0200
@@ -170,14 +170,11 @@ isc_interfaceiter_first(isc_interfaceite
 
 	REQUIRE(VALID_IFITER(iter));
 
-	internal_first(iter);
-	for (;;) {
+	for (result = internal_first(iter); result == ISC_R_SUCCESS;
+			result = internal_next(iter)) {
 		result = internal_current(iter);
 		if (result != ISC_R_IGNORE)
 			break;
-		result = internal_next(iter);
-		if (result != ISC_R_SUCCESS)
-			break;
 	}
 	iter->result = result;
 	return (result);
diff -up ntp-4.2.4p2/libisc/ifiter_getifaddrs.c.noif ntp-4.2.4p2/libisc/ifiter_getifaddrs.c
--- ntp-4.2.4p2/libisc/ifiter_getifaddrs.c.noif	2006-06-06 22:16:22.000000000 +0200
+++ ntp-4.2.4p2/libisc/ifiter_getifaddrs.c	2007-09-24 16:08:55.000000000 +0200
@@ -185,7 +185,10 @@ internal_destroy(isc_interfaceiter_t *it
 	iter->ifaddrs = NULL;
 }
 
-static
-void internal_first(isc_interfaceiter_t *iter) {
+static isc_result_t
+internal_first(isc_interfaceiter_t *iter) {
 	iter->pos = iter->ifaddrs;
+	if (iter->pos == NULL)
+		return (ISC_R_NOMORE);
+	return (ISC_R_SUCCESS);
 }


Index: ntp.spec
===================================================================
RCS file: /cvs/pkgs/rpms/ntp/devel/ntp.spec,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -r1.72 -r1.73
--- ntp.spec	21 Aug 2007 13:39:44 -0000	1.72
+++ ntp.spec	24 Sep 2007 14:33:43 -0000	1.73
@@ -1,9 +1,7 @@
-%define _use_internal_dependency_generator 0
-
 Summary: Synchronizes system time using the Network Time Protocol (NTP)
 Name: ntp
 Version: 4.2.4p2
-Release: 5%{?dist}
+Release: 6%{?dist}
 # primary license (COPYRIGHT) : MIT
 # ElectricFence/ (not used) : GPLv2
 # include/ntif.h : BSD
@@ -28,10 +26,6 @@
 Source6: ntp.step-tickers
 Source8: ntp.cryptopw
 
-# new find-requires
-Source7: filter-requires-ntp.sh
-%define __find_requires %{SOURCE7}
-
 Patch2: ntp-4.2.4p0-droproot.patch
 Patch3: ntp-4.2.4-groups.patch
 Patch4: ntp-4.1.1c-rc3-authkey.patch
@@ -50,6 +44,7 @@
 Patch17: ntp-4.2.4p0-sleep.patch
 Patch18: ntp-4.2.4p0-bcast.patch
 Patch19: ntp-4.2.4p0-retcode.patch
+Patch20: ntp-4.2.4p2-noif.patch
 
 URL: http://www.ntp.org
 Requires(pre): shadow-utils 
@@ -93,6 +88,7 @@
 %patch17 -p1 -b .sleep
 %patch18 -p1 -b .bcast
 %patch19 -p1 -b .retcode
+%patch20 -p1 -b .noif
 
 %ifarch ia64
 %patch5 -p1 -b .linkfastmath
@@ -214,6 +210,10 @@
 
 
 %changelog
+* Mon Sep 24 2007 Miroslav Lichvar <mlichvar at redhat.com> 4.2.4p2-6
+- require perl (#274771)
+- don't fail when starting with no interfaces (#300371)
+
 * Tue Aug 21 2007 Miroslav Lichvar <mlichvar at redhat.com> 4.2.4p2-5
 - avoid use of uninitialized floating-point values in clock_select
 - update license tag (Tom "spot" Callaway)


--- filter-requires-ntp.sh DELETED ---




More information about the fedora-extras-commits mailing list