]> git.pld-linux.org Git - packages/ntp.git/commitdiff
- up to 4.2.8p15 master auto/th/ntp-4.2.8p15-1
authorJan Rękorajski <baggins@pld-linux.org>
Sat, 16 Oct 2021 19:45:12 +0000 (21:45 +0200)
committerJan Rękorajski <baggins@pld-linux.org>
Sat, 16 Oct 2021 19:45:12 +0000 (21:45 +0200)
- fix building with glibc 2.34

ntp-4.2.6p1-droproot.patch
ntp-4.2.6p1-rtnetlink.patch
ntp-ipv6.patch
ntp-nano.patch
ntp.spec
threadstack-sysconf.patch [new file with mode: 0644]

index 7c09bfcef7516d7194a4cd908c7748775e8c0803..c35fd3d56047585adc707e354220fb93c6f7bf77 100644 (file)
@@ -1,6 +1,7 @@
---- ntp-4.2.8/html/ntpdate.html~       2014-12-19 13:56:51.000000000 +0200
-+++ ntp-4.2.8/html/ntpdate.html        2015-01-02 10:27:05.538902307 +0200
-@@ -27,7 +27,7 @@
+diff -urNp -x '*.orig' ntp-4.2.8p12.org/html/ntpdate.html ntp-4.2.8p12/html/ntpdate.html
+--- ntp-4.2.8p12.org/html/ntpdate.html 2018-08-14 13:51:07.000000000 +0200
++++ ntp-4.2.8p12/html/ntpdate.html     2021-10-15 23:43:00.522149878 +0200
+@@ -27,7 +27,7 @@ href="ntpd.html"><tt>ntpd</tt> - Network
  page and/or the <a href="sntp.html"><tt>sntp</tt> - Simple Network Time
  Protocol (SNTP) Client</a> page.  After a suitable period of mourning, the <tt>ntpdate</tt> program will be retired from this distribution.</p>
  <h4>Synopsis</h4>
@@ -9,7 +10,7 @@
  <h4>Description</h4>
  <p><tt>ntpdate</tt> sets the local date and time by polling the Network Time Protocol (NTP) server(s) given as the <i>server</i> arguments to determine the correct time. It must be run as root on the local host. A number of samples are obtained from each of the servers specified and a subset of the NTP clock filter and selection algorithms are applied to select the best of these. Note that the accuracy and reliability of <tt>ntpdate</tt> depends on the number of servers, the number of polls each time it is run and the interval between runs.</p>
  <p><tt>ntpdate</tt> can be run manually as necessary to set the host clock, or it can be run from the host startup script to set the clock at boot time. This is useful in some cases to set the clock initially before starting the NTP daemon <tt>ntpd</tt>. It is also possible to run <tt>ntpdate</tt> from a <tt>cron</tt> script. However, it is important to note that <tt>ntpdate</tt> with contrived <tt>cron</tt> scripts is no substitute for the NTP daemon, which uses sophisticated algorithms to maximize accuracy and reliability while minimizing resource use. Finally, since <tt>ntpdate</tt> does not discipline the host clock frequency as does <tt>ntpd</tt>, the accuracy using <tt>ntpdate</tt> is limited.</p>
-@@ -68,6 +68,11 @@
+@@ -68,6 +68,11 @@ Protocol (SNTP) Client</a> page.  After
    <dd>Direct <tt>ntpdate</tt> to use an unprivileged port for outgoing packets. This is most useful when behind a firewall that blocks incoming traffic to privileged ports, and you want to synchronize with hosts beyond the firewall. Note that the <tt>-d</tt> option always uses unprivileged ports.
    <dt><tt>-<i>v</i></tt></dt>
    <dd>Be verbose. This option will cause <tt>ntpdate</tt>'s version identification string to be logged.</dd>
@@ -21,9 +22,9 @@
  </dl>
  <h4>Diagnostics</h4>
  <tt>ntpdate</tt>'s exit status is zero if it finds a server and updates the clock, and nonzero otherwise.
-diff -up ntp-4.2.6p1/ntpdate/ntpdate.c.droproot ntp-4.2.6p1/ntpdate/ntpdate.c
---- ntp-4.2.6p1/ntpdate/ntpdate.c.droproot     2009-12-09 08:36:35.000000000 +0100
-+++ ntp-4.2.6p1/ntpdate/ntpdate.c      2010-03-03 15:33:06.000000000 +0100
+diff -urNp -x '*.orig' ntp-4.2.8p12.org/ntpdate/ntpdate.c ntp-4.2.8p12/ntpdate/ntpdate.c
+--- ntp-4.2.8p12.org/ntpdate/ntpdate.c 2021-10-15 23:43:00.362150298 +0200
++++ ntp-4.2.8p12/ntpdate/ntpdate.c     2021-10-15 23:43:00.522149878 +0200
 @@ -48,6 +48,12 @@
  
  #include <arpa/inet.h>
@@ -37,7 +38,7 @@ diff -up ntp-4.2.6p1/ntpdate/ntpdate.c.droproot ntp-4.2.6p1/ntpdate/ntpdate.c
  #ifdef SYS_VXWORKS
  # include "ioLib.h"
  # include "sockLib.h"
-@@ -152,6 +158,11 @@ int simple_query = 0;
+@@ -147,6 +153,11 @@ int simple_query = 0;
  int unpriv_port = 0;
  
  /*
@@ -48,8 +49,8 @@ diff -up ntp-4.2.6p1/ntpdate/ntpdate.c.droproot ntp-4.2.6p1/ntpdate/ntpdate.c
 +/*
   * Program name.
   */
- char *progname;
-@@ -293,6 +304,88 @@ void clear_globals()
+ char const *progname;
+@@ -288,6 +299,88 @@ void clear_globals()
  static ni_namelist *getnetinfoservers (void);
  #endif
  
@@ -138,7 +139,7 @@ diff -up ntp-4.2.6p1/ntpdate/ntpdate.c.droproot ntp-4.2.6p1/ntpdate/ntpdate.c
  /*
   * Main program.  Initialize us and loop waiting for I/O and/or
   * timer expiries.
-@@ -340,6 +433,8 @@ ntpdatemain (
+@@ -335,6 +428,8 @@ ntpdatemain (
  
        init_lib();     /* sets up ipv4_works, ipv6_works */
  
@@ -147,7 +148,7 @@ diff -up ntp-4.2.6p1/ntpdate/ntpdate.c.droproot ntp-4.2.6p1/ntpdate/ntpdate.c
        /* Check to see if we have IPv6. Otherwise default to IPv4 */
        if (!ipv6_works)
                ai_fam_templ = AF_INET;
-@@ -351,7 +446,7 @@ ntpdatemain (
+@@ -346,7 +441,7 @@ ntpdatemain (
        /*
         * Decode argument list
         */
@@ -156,7 +157,7 @@ diff -up ntp-4.2.6p1/ntpdate/ntpdate.c.droproot ntp-4.2.6p1/ntpdate/ntpdate.c
                switch (c)
                {
                case '4':
-@@ -429,6 +524,14 @@ ntpdatemain (
+@@ -423,6 +518,14 @@ ntpdatemain (
                case 'u':
                        unpriv_port = 1;
                        break;
@@ -171,8 +172,8 @@ diff -up ntp-4.2.6p1/ntpdate/ntpdate.c.droproot ntp-4.2.6p1/ntpdate/ntpdate.c
                case '?':
                        ++errflg;
                        break;
-@@ -438,7 +541,7 @@ ntpdatemain (
-       
+@@ -432,7 +535,7 @@ ntpdatemain (
        if (errflg) {
                (void) fprintf(stderr,
 -                  "usage: %s [-46bBdqsuv] [-a key#] [-e delay] [-k file] [-p samples] [-o version#] [-t timeo] server ...\n",
@@ -180,7 +181,7 @@ diff -up ntp-4.2.6p1/ntpdate/ntpdate.c.droproot ntp-4.2.6p1/ntpdate/ntpdate.c
                    progname);
                exit(2);
        }
-@@ -544,6 +647,24 @@ ntpdatemain (
+@@ -546,6 +649,24 @@ ntpdatemain (
        initializing = 0;
        was_alarmed = 0;
  
index 8d34c2393893986326bd892c0106c0e9d411aac7..ad5457a586309e65c708ac20f3b7ad41002f0f62 100644 (file)
@@ -1,9 +1,9 @@
-diff -up ntp-4.2.6p3/ntpd/ntp_io.c.rtnetlink ntp-4.2.6p3/ntpd/ntp_io.c
---- ntp-4.2.6p3/ntpd/ntp_io.c.rtnetlink        2011-01-05 16:03:19.328001089 +0100
-+++ ntp-4.2.6p3/ntpd/ntp_io.c  2011-01-05 16:03:19.349001911 +0100
-@@ -4549,10 +4549,7 @@ init_async_notifications()
+diff -urNp -x '*.orig' ntp-4.2.8p12.org/ntpd/ntp_io.c ntp-4.2.8p12/ntpd/ntp_io.c
+--- ntp-4.2.8p12.org/ntpd/ntp_io.c     2021-10-15 23:43:02.012145954 +0200
++++ ntp-4.2.8p12/ntpd/ntp_io.c 2021-10-15 23:43:02.175478857 +0200
+@@ -4832,10 +4832,7 @@ init_async_notifications()
  #ifdef HAVE_RTNETLINK
-       memset(&sa, 0, sizeof(sa));
+       ZERO(sa);
        sa.nl_family = PF_NETLINK;
 -      sa.nl_groups = RTMGRP_LINK | RTMGRP_IPV4_IFADDR
 -                     | RTMGRP_IPV6_IFADDR | RTMGRP_IPV4_ROUTE
index 674a6a78905e4d1d8b8b45643f81f7c68ee8190d..312712352e508ca6d8a1a7e3612a28b51c393e04 100644 (file)
@@ -1,7 +1,7 @@
 diff -durN -x '*.orig' ntp-4.2.6p1.orig/ntpdate/ntpdate.c ntp-4.2.6p1/ntpdate/ntpdate.c
 --- ntp-4.2.6p1.orig/ntpdate/ntpdate.c 2010-05-24 19:28:54.000000000 +0200
 +++ ntp-4.2.6p1/ntpdate/ntpdate.c      2010-05-24 19:30:19.000000000 +0200
-@@ -1729,11 +1729,13 @@
+@@ -1729,9 +1729,11 @@
                }
  #ifdef IPV6_V6ONLY
                /* Restricts AF_INET6 socket to IPv6 communications (see RFC 2553bis-03) */
@@ -10,9 +10,7 @@ diff -durN -x '*.orig' ntp-4.2.6p1.orig/ntpdate/ntpdate.c ntp-4.2.6p1/ntpdate/nt
 +              if (res->ai_family == AF_INET6) {
 +                      int i = setsockopt(fd[nbsock], IPPROTO_IPV6, IPV6_V6ONLY, (void*) &optval, sizeof(optval));
 +                      if ( i < 0 && errno != ENOPROTOOPT ) {
-                                  msyslog(LOG_ERR, "setsockopt() IPV6_V6ONLY failed: %m");
-                                       exit(1);
-                                       /*NOTREACHED*/
+                               msyslog(LOG_ERR, "setsockopt() IPV6_V6ONLY failed: %m");
 +                      }
                }
  #endif
index 4814bec3718f6c06cfaaf05f47279375726488a9..f001794c0d233a4166d6c351f4785e7bb5fbfcf2 100644 (file)
@@ -1,6 +1,7 @@
---- ntp-4.2.4p7/include/ntp_syscall.h
-+++ ntp-4.2.4p7/include/ntp_syscall.h
-@@ -14,5 +14,13 @@
+diff -urNp -x '*.orig' ntp-4.2.8p12.org/include/ntp_syscall.h ntp-4.2.8p12/include/ntp_syscall.h
+--- ntp-4.2.8p12.org/include/ntp_syscall.h     2011-03-26 03:03:33.000000000 +0100
++++ ntp-4.2.8p12/include/ntp_syscall.h 2021-10-15 23:43:00.115484280 +0200
+@@ -10,6 +10,14 @@
  # include <sys/timex.h>
  #endif
  
@@ -13,4 +14,5 @@
 +#endif
 +
  #ifndef NTP_SYSCALLS_LIBC
- #ifdef NTP_SYSCALLS_STD
+ # ifdef NTP_SYSCALLS_STD
+ #  define ntp_adjtime(t)      syscall(SYS_ntp_adjtime, (t))
index 8e9e01b614f8706106474a191237a963760b99d4..970901f3a8c1546c99acde82a980be5102cab4bb 100644 (file)
--- a/ntp.spec
+++ b/ntp.spec
@@ -13,12 +13,12 @@ Summary:    Network Time Protocol utilities
 Summary(pl.UTF-8):     Narzędzia do synchronizacji czasu (Network Time Protocol)
 Summary(pt_BR.UTF-8):  Network Time Protocol versão 4
 Name:          ntp
-Version:       4.2.8p12
-Release:       8
+Version:       4.2.8p15
+Release:       1
 License:       distributable
 Group:         Networking/Daemons
 Source0:       https://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/%{name}-%{version}.tar.gz
-# Source0-md5: 1522d66574bae14abb2622746dad2bdc
+# Source0-md5: e1e6b23d2fc75cced41801dbcd6c2561
 Source1:       %{name}.conf
 Source2:       %{name}.keys
 Source3:       %{name}d.init
@@ -36,6 +36,7 @@ Patch0:               %{name}-build.patch
 Patch1:                %{name}-no_libelf.patch
 Patch2:                %{name}-ipv6.patch
 Patch3:                %{name}-nano.patch
+Patch4:                threadstack-sysconf.patch
 # FC patches + 100
 Patch101:      %{name}-4.2.6p1-sleep.patch
 Patch102:      %{name}-4.2.6p1-droproot.patch
@@ -242,6 +243,7 @@ Este pacote contém documentação adicional sobre o NTP versão 4.
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
+%patch4 -p1
 
 ## FC patches
 #%patch101 -p1
diff --git a/threadstack-sysconf.patch b/threadstack-sysconf.patch
new file mode 100644 (file)
index 0000000..c90c922
--- /dev/null
@@ -0,0 +1,29 @@
+--- ntp-4.2.8p15/libntp/work_thread.c~ 2018-08-14 13:51:06.000000000 +0200
++++ ntp-4.2.8p15/libntp/work_thread.c  2021-10-16 21:40:00.752349056 +0200
+@@ -41,12 +41,6 @@
+ #ifndef THREAD_MINSTACKSIZE
+ # define THREAD_MINSTACKSIZE  (64U * 1024)
+ #endif
+-#ifndef __sun
+-#if defined(PTHREAD_STACK_MIN) && THREAD_MINSTACKSIZE < PTHREAD_STACK_MIN
+-# undef THREAD_MINSTACKSIZE
+-# define THREAD_MINSTACKSIZE PTHREAD_STACK_MIN
+-#endif
+-#endif
+ #ifndef THREAD_MAXSTACKSIZE
+ # define THREAD_MAXSTACKSIZE  (256U * 1024)
+@@ -594,8 +588,11 @@
+                       "start_blocking_thread: pthread_attr_getstacksize() -> %s",
+                       strerror(rc));
+       } else {
+-              if (ostacksize < THREAD_MINSTACKSIZE)
+-                      nstacksize = THREAD_MINSTACKSIZE;
++              int minstack = THREAD_MINSTACKSIZE;
++              if (minstack < PTHREAD_STACK_MIN)
++                      minstack = PTHREAD_STACK_MIN;
++              if (ostacksize < minstack)
++                      nstacksize = minstack;
+               else if (ostacksize > THREAD_MAXSTACKSIZE)
+                       nstacksize = THREAD_MAXSTACKSIZE;
+               else
This page took 0.096369 seconds and 4 git commands to generate.