rpms/ntp/F-7 ntp-4.2.4p2-mlock.patch, NONE, 1.1 ntp-4.2.4p2-multilisten.patch, NONE, 1.1 .cvsignore, 1.24, 1.25 ntp.spec, 1.67, 1.68 sources, 1.25, 1.26 ntp-4.2.4-autoopts.patch, 1.1, NONE ntp-4.2.4p0-ifupdate.patch, 1.1, NONE ntp-4.2.4p0-mlock.patch, 1.1, NONE ntp-4.2.4p0-multilisten.patch, 1.1, NONE

Miroslav Lichvar (mlichvar) fedora-extras-commits at redhat.com
Thu Jun 21 10:46:25 UTC 2007


Author: mlichvar

Update of /cvs/pkgs/rpms/ntp/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv12380

Modified Files:
	.cvsignore ntp.spec sources 
Added Files:
	ntp-4.2.4p2-mlock.patch ntp-4.2.4p2-multilisten.patch 
Removed Files:
	ntp-4.2.4-autoopts.patch ntp-4.2.4p0-ifupdate.patch 
	ntp-4.2.4p0-mlock.patch ntp-4.2.4p0-multilisten.patch 
Log Message:
- update to 4.2.4p2


ntp-4.2.4p2-mlock.patch:

--- NEW FILE ntp-4.2.4p2-mlock.patch ---
--- ntp-4.2.4p2/html/ntpd.html.mlock	2007-06-21 10:37:31.000000000 +0200
+++ ntp-4.2.4p2/html/ntpd.html	2007-06-21 10:37:31.000000000 +0200
@@ -34,7 +34,7 @@
 		</ul>
 		<hr>
 		<h4 id="synop">Synopsis</h4>
-		<tt>ntpd [ -46aAbdDgLnNqx ] [ -c <i>conffile</i> ] [ -f <i>driftfile</i> ] [ -i <i>jaildir</i> ] [ -I <i>iface</i> ] [ -k <i>keyfile</i> ] [ -l <i>logfile</i> ] [ -p <i>pidfile</i> ] [ -P <i>priority</i> ] [ -r <i>broadcastdelay</i> ] [ -s <i>statsdir</i> ] [ -t <i>key</i> ] [ -u <i>user</i>[:<i>group</i>] ] [ -U <i>interface_update_interval</i> ] [ -v <i>variable</i> ] [ -V <i>variable</i> ]</tt>
+		<tt>ntpd [ -46aAbdDgLmnNqx ] [ -c <i>conffile</i> ] [ -f <i>driftfile</i> ] [ -i <i>jaildir</i> ] [ -I <i>iface</i> ] [ -k <i>keyfile</i> ] [ -l <i>logfile</i> ] [ -p <i>pidfile</i> ] [ -P <i>priority</i> ] [ -r <i>broadcastdelay</i> ] [ -s <i>statsdir</i> ] [ -t <i>key</i> ] [ -u <i>user</i>[:<i>group</i>] ] [ -U <i>interface_update_interval</i> ] [ -v <i>variable</i> ] [ -V <i>variable</i> ]</tt>
 		<h4 id="descr">Description</h4>
 		<p>The <tt>ntpd</tt> program is an operating system daemon which sets and maintains the system time of day in synchronism with Internet standard time servers. It is a complete implementation of the Network Time Protocol (NTP) version 4, but also retains compatibility with version 3, as defined by RFC-1305, and version 1 and 2, as defined by RFC-1059 and RFC-1119, respectively. <tt>ntpd</tt> does most computations in 64-bit floating point arithmetic and does relatively clumsy 64-bit fixed point operations only when necessary to preserve the ultimate precision, about 232 picoseconds. While the ultimate precision is not achievable with ordinary workstations and networks of today, it may be required with future gigahertz CPU clocks and gigabit LANs.</p>
 		<h4 id="op">How NTP Operates</h4>
@@ -95,6 +95,8 @@
 			<dd>Specify the name and path of the log file. The default is the system log file. This is the same operation as the <tt>logfile <i>logfile</i></tt> configuration command.
 			<dt><tt>-L</tt>
 			<dd>Do not listen to virtual IPs. The default is to listen.
+			<dt><tt>-m</tt>
+			<dd>Lock memory.
 			<dt><tt>-n</tt>
 			<dd>Don't fork.
 			<dt><tt>-N</tt>
--- ntp-4.2.4p2/ntpd/ntpd.c.mlock	2007-06-21 10:37:31.000000000 +0200
+++ ntp-4.2.4p2/ntpd/ntpd.c	2007-06-21 10:37:31.000000000 +0200
@@ -699,7 +699,8 @@ ntpdmain(
 	}
 #endif
 
-#if defined(HAVE_MLOCKALL) && defined(MCL_CURRENT) && defined(MCL_FUTURE)
+#if defined(MCL_CURRENT) && defined(MCL_FUTURE)
+    if (HAVE_OPT( MLOCK )) {
 # ifdef HAVE_SETRLIMIT
 	/*
 	 * Set the stack limit to something smaller, so that we don't lock a lot
@@ -737,6 +738,7 @@ ntpdmain(
 	 */
 	if (mlockall(MCL_CURRENT|MCL_FUTURE) < 0)
 		msyslog(LOG_ERR, "mlockall(): %m");
+    }
 #else /* not (HAVE_MLOCKALL && MCL_CURRENT && MCL_FUTURE) */
 # ifdef HAVE_PLOCK
 #  ifdef PROCLOCK
--- ntp-4.2.4p2/ntpd/ntpd-opts.c.mlock	2007-06-20 13:37:21.000000000 +0200
+++ ntp-4.2.4p2/ntpd/ntpd-opts.c	2007-06-21 10:38:43.000000000 +0200
@@ -265,6 +265,15 @@ tSCC    zNice_Name[]               = "ni
 #define NICE_FLAGS       (OPTST_DISABLED)
 
 /*
+ *  Mlock option description:
+ */
+tSCC    zMlockText[] =
+        "Lock memory";
+tSCC    zMlock_NAME[]               = "MLOCK";
+tSCC    zMlock_Name[]               = "mlock";
+#define MLOCK_FLAGS       (OPTST_DISABLED)
+
+/*
  *  Pidfile option description:
  */
 tSCC    zPidfileText[] =
@@ -790,6 +799,18 @@ static tOptDesc optDesc[ OPTION_CT ] = {
                                 OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT
 #endif
 
+  {  /* entry idx, value */ 29, VALUE_OPT_MLOCK,
+     /* equiv idx, value */ 29, VALUE_OPT_MLOCK,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ MLOCK_FLAGS, 0,
+     /* last opt argumnt */ { NULL },
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ zMlockText, zMlock_NAME, zMlock_Name,
+     /* disablement strs */ NULL, NULL },
+
   {  /* entry idx, value */ INDEX_OPT_VERSION, VALUE_OPT_VERSION,
      /* equiv idx value  */ NO_EQUIVALENT, 0,
      /* equivalenced to  */ NO_EQUIVALENT,
@@ -882,7 +903,7 @@ tOptions ntpdOptions = {
       NO_EQUIVALENT /* index of '-#' option */,
       NO_EQUIVALENT /* index of default opt */
     },
-    32 /* full option count */, 29 /* user option count */
+    33 /* full option count */, 30 /* user option count */
 };
 
 /*
--- ntp-4.2.4p2/ntpd/ntpd-opts.h.mlock	2007-06-20 13:37:21.000000000 +0200
+++ ntp-4.2.4p2/ntpd/ntpd-opts.h	2007-06-21 10:42:28.000000000 +0200
@@ -82,12 +82,13 @@ typedef enum {
         INDEX_OPT_VAR              = 26,
         INDEX_OPT_DVAR             = 27,
         INDEX_OPT_SLEW             = 28,
-        INDEX_OPT_VERSION          = 29,
-        INDEX_OPT_HELP             = 30,
-        INDEX_OPT_MORE_HELP        = 31
+        INDEX_OPT_MLOCK            = 29,
+        INDEX_OPT_VERSION          = 30,
+        INDEX_OPT_HELP             = 31,
+        INDEX_OPT_MORE_HELP        = 32
 } teOptIndex;
 
-#define OPTION_CT    32
+#define OPTION_CT    33
 #define NTPD_VERSION       "4.2.4p2"
 #define NTPD_FULL_VERSION  "ntpd - NTP daemon program - Ver. 4.2.4p2"
 
@@ -180,6 +181,10 @@ typedef enum {
 #  warning undefining MODIFYMMTIMER due to option name conflict
 #  undef   MODIFYMMTIMER
 # endif
+# ifdef    MLOCK
+#  warning undefining MLOCK due to option name conflict
+#  undef   MLOCK
+# endif
 # ifdef    NOFORK
 #  warning undefining NOFORK due to option name conflict
 #  undef   NOFORK
@@ -249,6 +254,7 @@ typedef enum {
 # undef LOGFILE
 # undef NOVIRTUALIPS
 # undef MODIFYMMTIMER
+# undef MLOCK
 # undef NOFORK
 # undef NICE
 # undef PIDFILE
@@ -291,6 +297,7 @@ typedef enum {
 #ifdef SYS_WINNT
 #define VALUE_OPT_MODIFYMMTIMER  'M'
 #endif /* SYS_WINNT */
+#define VALUE_OPT_MLOCK          'm'
 #define VALUE_OPT_NOFORK         'n'
 #define VALUE_OPT_NICE           'N'
 #define VALUE_OPT_PIDFILE        'p'

ntp-4.2.4p2-multilisten.patch:

--- NEW FILE ntp-4.2.4p2-multilisten.patch ---
--- ntp-4.2.4p2/include/ntpd.h.multilisten	2006-12-28 13:03:06.000000000 +0100
+++ ntp-4.2.4p2/include/ntpd.h	2007-06-21 10:31:38.000000000 +0200
@@ -79,6 +79,8 @@ extern  void	enable_broadcast P((struct 
 extern  void	enable_multicast_if P((struct interface *, struct sockaddr_storage *));
 extern	void	interface_dump	 P((struct interface *));
 
+extern  void    add_specific_interface P((const char *));
+extern  void    init_specific_interface P((void));
 extern  void    interface_update P((interface_receiver_t, void *));
 extern	void	init_io 	P((void));
 extern	void	input_handler	P((l_fp *));
--- ntp-4.2.4p2/ntpd/ntp_io.c.multilisten	2007-05-29 13:02:33.000000000 +0200
+++ ntp-4.2.4p2/ntpd/ntp_io.c	2007-06-21 10:33:58.000000000 +0200
@@ -66,7 +66,15 @@
 #endif  /* IPv6 Support */
 
 extern int listen_to_virtual_ips;
-extern const char *specific_interface;
+
+/* interface names to listen on */
+struct specific_interface {
+	const char *name;
+	ISC_LINK(struct specific_interface) link;
+};
+
+ISC_LIST(struct specific_interface) specific_interface_list;
+
 
 #if defined(SO_TIMESTAMP) && defined(SCM_TIMESTAMP)
 #if defined(CMSG_FIRSTHDR)
@@ -924,14 +932,15 @@ address_okay(struct interface *iface) {
 	/*
 	 * Check if the interface is specified
 	 */
-	if (specific_interface != NULL) {
-		if (strcasecmp(iface->name, specific_interface) == 0) {
-			DPRINTF(4, ("address_okay: specific interface name matched - OK\n"));
-			return (ISC_TRUE);
-		} else {
-			DPRINTF(4, ("address_okay: specific interface name NOT matched - FAIL\n"));
-			return (ISC_FALSE);
-		}
+ 	if (ISC_LIST_HEAD(specific_interface_list)) {
+ 		struct specific_interface *iface_;
+ 		for (iface_ = ISC_LIST_HEAD(specific_interface_list); iface_ != NULL; iface_ = ISC_LIST_NEXT(iface_, link))
+ 			if (strcasecmp(iface->name, iface_->name) == 0) {
+				DPRINTF(4, ("address_okay: specific interface name matched - OK\n"));
+ 				return (ISC_TRUE);
+			}
+		DPRINTF(4, ("address_okay: specific interface name NOT matched - FAIL\n"));
+ 		return (ISC_FALSE);
 	}
 	else {
 		if (listen_to_virtual_ips == 0  && 
@@ -1044,6 +1053,23 @@ refresh_interface(struct interface * int
 #endif /* !OS_MISSES_SPECIFIC_ROUTE_UPDATES */
 }
 
+void
+add_specific_interface (const char *if_name)
+{
+	struct specific_interface *iface;
+
+	iface = (struct specific_interface *)emalloc(sizeof(struct specific_interface));
+	iface->name = if_name;
+	ISC_LINK_INIT(iface, link);
+	ISC_LIST_APPEND(specific_interface_list, iface, link);
+}
+
+void
+init_specific_interface (void)
+{
+	ISC_LIST_INIT(specific_interface_list);
+}
+
 /*
  * interface_update - externally callable update function
  */
--- ntp-4.2.4p2/ntpd/cmd_args.c.multilisten	2006-12-28 13:03:26.000000000 +0100
+++ ntp-4.2.4p2/ntpd/cmd_args.c	2007-06-21 10:31:38.000000000 +0200
@@ -22,7 +22,6 @@
  * Definitions of things either imported from or exported to outside
  */
 extern char const *progname;
-extern const char *specific_interface;
 extern int default_ai_family;
 
 #ifdef HAVE_NETINFO
--- ntp-4.2.4p2/ntpd/ntpd.c.multilisten	2007-06-21 10:31:38.000000000 +0200
+++ ntp-4.2.4p2/ntpd/ntpd.c	2007-06-21 10:31:38.000000000 +0200
@@ -156,7 +156,6 @@ volatile int debug = 0;		/* No debugging
 #endif
 
 int	listen_to_virtual_ips = 1;
-const char *specific_interface = NULL;        /* interface name or IP address to bind to */
 
 /*
  * No-fork flag.  If set, we do not become a background daemon.
@@ -537,18 +536,14 @@ ntpdmain(
 	if (HAVE_OPT( NOVIRTUALIPS ))
 		listen_to_virtual_ips = 0;
 
+	init_specific_interface();
+
 	if (HAVE_OPT( INTERFACE )) {
-#if 0
 		int	ifacect = STACKCT_OPT( INTERFACE );
-		char**	ifaces  = STACKLST_OPT( INTERFACE );
+		const char** ifaces  = STACKLST_OPT( INTERFACE );
 
-		/* malloc space for the array of names */
-		while (ifacect-- > 0) {
-			next_iface = *ifaces++;
-		}
-#else
-		specific_interface = OPT_ARG( INTERFACE );
-#endif
+		while (ifacect-- > 0)
+			add_specific_interface(*ifaces++);
 	}
 
 	if (HAVE_OPT( NICE ))


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/ntp/F-7/.cvsignore,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- .cvsignore	7 Mar 2007 18:35:41 -0000	1.24
+++ .cvsignore	21 Jun 2007 10:45:49 -0000	1.25
@@ -1,2 +1,2 @@
 ntpstat-0.2.tgz
-ntp-4.2.4p0.tar.gz
+ntp-4.2.4p2.tar.gz


Index: ntp.spec
===================================================================
RCS file: /cvs/pkgs/rpms/ntp/F-7/ntp.spec,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -r1.67 -r1.68
--- ntp.spec	22 May 2007 15:30:33 -0000	1.67
+++ ntp.spec	21 Jun 2007 10:45:49 -0000	1.68
@@ -2,8 +2,8 @@
 
 Summary: Synchronizes system time using the Network Time Protocol (NTP)
 Name: ntp
-Version: 4.2.4p0
-Release: 3%{?dist}
+Version: 4.2.4p2
+Release: 1%{?dist}
 License: distributable
 Group: System Environment/Daemons
 Source0: http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-%{version}.tar.gz
@@ -21,14 +21,12 @@
 Patch3: ntp-4.2.4-groups.patch
 Patch4: ntp-4.1.1c-rc3-authkey.patch
 Patch5: ntp-4.2.4-linkfastmath.patch
-Patch6: ntp-4.2.4p0-ifupdate.patch
-Patch8: ntp-4.2.4p0-multilisten.patch
+Patch8: ntp-4.2.4p2-multilisten.patch
 Patch9: ntp-4.2.4-html2man.patch
 Patch10: ntp-4.2.4-htmldoc.patch
 Patch11: ntp-stable-4.2.0a-20050816-keyfile.patch
 Patch12: ntp-4.2.4-sprintf.patch
-Patch13: ntp-4.2.4-autoopts.patch
-Patch14: ntp-4.2.4p0-mlock.patch
+Patch14: ntp-4.2.4p2-mlock.patch
 Patch17: ntp-4.2.4p0-sleep.patch
 Patch18: ntp-4.2.4p0-bcast.patch
 Patch19: ntp-4.2.4p0-retcode.patch
@@ -59,13 +57,11 @@
 %patch2 -p1 -b .droproot
 %patch3 -p1 -b .groups
 %patch4 -p1 -b .authkey
-%patch6 -p1 -b .ifupdate
 %patch8 -p1 -b .multilisten
 %patch9 -p1 -b .html2man
 %patch10 -p1 -b .htmldoc
 %patch11 -p1 -b .keyfile
 %patch12 -p1 -b .sprintf
-%patch13 -p1 -b .autoopts
 %patch14 -p1 -b .mlock
 %patch17 -p1 -b .sleep
 %patch18 -p1 -b .bcast
@@ -182,6 +178,9 @@
 
 
 %changelog
+* Thu Jun 21 2007 Miroslav Lichvar <mlichvar at redhat.com> 4.2.4p2-1
+- update to 4.2.4p2
+
 * Tue May 22 2007 Miroslav Lichvar <mlichvar at redhat.com> 4.2.4p0-3
 - fix interface updates with -I or -L option (#240254)
 - accept multiple -I options


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/ntp/F-7/sources,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- sources	7 Mar 2007 18:35:41 -0000	1.25
+++ sources	21 Jun 2007 10:45:49 -0000	1.26
@@ -1,2 +1,2 @@
 6b2bedefe2e7c63ea52609b222022121  ntpstat-0.2.tgz
-6f381e3764eac481bed9cf7e4d508952  ntp-4.2.4p0.tar.gz
+315a76da63715fd43b6349411fbb0b25  ntp-4.2.4p2.tar.gz


--- ntp-4.2.4-autoopts.patch DELETED ---


--- ntp-4.2.4p0-ifupdate.patch DELETED ---


--- ntp-4.2.4p0-mlock.patch DELETED ---


--- ntp-4.2.4p0-multilisten.patch DELETED ---




More information about the fedora-extras-commits mailing list