Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-current.git;a=commitdiff;h=80c2e4718950e59784c605d7e3b0bd1f78dfb40e
commit 80c2e4718950e59784c605d7e3b0bd1f78dfb40e Author: Devil505 <devil505li...@gmail.com> Date: Tue Nov 1 08:42:33 2011 +0100 openntpd-3.9p1-11-i686 * updating patches * fixing some mistakes diff --git a/source/network/openntpd/02-reconnect.patch b/source/network/openntpd/02-reconnect.patch new file mode 100644 index 0000000..4dfdd27 --- /dev/null +++ b/source/network/openntpd/02-reconnect.patch @@ -0,0 +1,46 @@ +Author: Kurt Roeckx <k...@roeckx.be> +Description: Reconnect after an EINVAL to make it work with dynamic IP addresses (Closes: #392250). + +diff -Naurp openntpd.orig/client.c openntpd/client.c +--- openntpd.orig/client.c 2006-05-14 05:29:21.000000000 +0000 ++++ openntpd/client.c 2008-01-15 17:08:58.000000000 +0000 +@@ -116,6 +116,7 @@ int + client_query(struct ntp_peer *p) + { + int tos = IPTOS_LOWDELAY; ++ int result; + + if (p->addr == NULL && client_nextaddr(p) == -1) { + set_next(p, error_interval()); +@@ -163,9 +164,17 @@ client_query(struct ntp_peer *p) + p->query->msg.xmttime.fractionl = arc4random(); + p->query->xmttime = gettime(); + +- if (ntp_sendmsg(p->query->fd, NULL, &p->query->msg, +- NTP_MSGSIZE_NOAUTH, 0) == -1) { ++ if ((result = ntp_sendmsg(p->query->fd, NULL, &p->query->msg, ++ NTP_MSGSIZE_NOAUTH, 0)) < 0) { + set_next(p, INTERVAL_QUERY_PATHETIC); ++ if (result == -2) { ++ /* ++ * got EINVAL in sendto(), probably the local socket ++ * address got invalidated -> force re-connect() ++ */ ++ close(p->query->fd); ++ p->query->fd = -1; ++ } + return (-1); + } + +diff -Naurp openntpd.orig/ntp_msg.c openntpd/ntp_msg.c +--- openntpd.orig/ntp_msg.c 2006-05-14 05:29:21.000000000 +0000 ++++ openntpd/ntp_msg.c 2008-01-15 17:08:58.000000000 +0000 +@@ -98,6 +98,8 @@ ntp_sendmsg(int fd, struct sockaddr *sa, + return (-1); + } + log_warn("sendto"); ++ if (errno == EINVAL) ++ return (-2); + return (-1); + } + diff --git a/source/network/openntpd/03-ipv4only.patch b/source/network/openntpd/03-ipv4only.patch new file mode 100644 index 0000000..2a36c64 --- /dev/null +++ b/source/network/openntpd/03-ipv4only.patch @@ -0,0 +1,28 @@ +Author: Stefan Praszalowicz <stefan.praszalow...@avedya.com> +Description: Rather than fail on IPv4 only networks when seeing an IPv6 DNS record, just give a warning (Closes: #500676). + +diff -Naurp openntpd.orig/client.c openntpd/client.c +--- openntpd.orig/client.c 2006-05-14 05:29:21.000000000 +0000 ++++ openntpd/client.c 2009-01-10 21:52:56.000000000 +0000 +@@ -129,8 +129,20 @@ client_query(struct ntp_peer *p) + struct sockaddr *sa = (struct sockaddr *)&p->addr->ss; + + if ((p->query->fd = socket(p->addr->ss.ss_family, SOCK_DGRAM, +- 0)) == -1) ++ 0)) == -1) { ++ ++ if (errno == EAFNOSUPPORT) { ++ log_warn("client_query socket"); ++ client_nextaddr(p); ++ set_next(p, error_interval()); ++ return (-1); ++ } ++ else ++ { + fatal("client_query socket"); ++ } ++ } ++ + if (connect(p->query->fd, sa, SA_LEN(sa)) == -1) { + if (errno == ECONNREFUSED || errno == ENETUNREACH || + errno == EHOSTUNREACH) { diff --git a/source/network/openntpd/04-backslash.patch b/source/network/openntpd/04-backslash.patch new file mode 100644 index 0000000..47483e7 --- /dev/null +++ b/source/network/openntpd/04-backslash.patch @@ -0,0 +1,15 @@ +Author: Sergey B Kirpichev <skirpic...@gmail.com> +Description: Don't fail if there is a backslash followed by a whitespaces in comments of the openntpd.conf (Closes: #435753). + +diff -Naurp openntpd.orig/parse.y openntpd/parse.y +--- openntpd.orig/parse.y 2006-05-14 05:29:23.000000000 +0000 ++++ openntpd/parse.y 2009-01-10 22:02:45.000000000 +0000 +@@ -345,7 +345,7 @@ yylex(void) + + yylval.lineno = lineno; + if (c == '#') +- while ((c = lgetc(fin)) != '\n' && c != EOF) ++ while ((c = getc(fin)) != '\n' && c != EOF) + ; /* nothing */ + + switch (c) { diff --git a/source/network/openntpd/05-pid.patch b/source/network/openntpd/05-pid.patch new file mode 100644 index 0000000..ed0eb0a --- /dev/null +++ b/source/network/openntpd/05-pid.patch @@ -0,0 +1,166 @@ +Author: Sergey B Kirpichev <skirpic...@gmail.com> +Description: Create pid file on startup (Closes: #354825). + +diff -Naurp openntpd.orig/ntpd.8 openntpd/ntpd.8 +--- openntpd.orig/ntpd.8 2006-05-14 05:29:23.000000000 +0000 ++++ openntpd/ntpd.8 2009-02-05 08:24:33.000000000 +0000 +@@ -24,7 +24,8 @@ + .Nm ntpd + .Bk -words + .Op Fl dSs +-.Op Fl f Ar file ++.Op Fl f Ar conffile ++.Op Fl p Ar pidfile + .Ek + .Sh DESCRIPTION + The +@@ -67,12 +68,16 @@ If this option is specified, + .Nm + will run in the foreground and log to + .Em stderr . +-.It Fl f Ar file ++.It Fl f Ar conffile + Use +-.Ar file ++.Ar conffile + as the configuration file, + instead of the default + .Pa /etc/ntpd.conf . ++.It Fl p Ar pidfile ++Specify the name and path of the file used to record the ++.Nm ++process ID. + .It Fl S + Do not set the time immediately at startup. + This is the default. +@@ -91,6 +96,10 @@ before starting + default + .Nm + configuration file ++.It Pa /var/run/openntpd.pid ++Contains the process ID of the ++.Nm ++listening for connections. + .El + .Sh SEE ALSO + .Xr date 1 , +diff -Naurp openntpd.orig/ntpd.c openntpd/ntpd.c +--- openntpd.orig/ntpd.c 2006-05-14 05:29:23.000000000 +0000 ++++ openntpd/ntpd.c 2009-02-05 08:24:33.000000000 +0000 +@@ -39,6 +39,7 @@ RCSID("$Release: OpenNTPD "OPENNTPD_VERS + #include "ntpd.h" + + void sighdlr(int); ++void write_pid(struct ntpd_conf*); + __dead void usage(void); + int main(int, char *[]); + int check_child(pid_t, const char *); +@@ -51,6 +52,14 @@ volatile sig_atomic_t reconfig = 0; + volatile sig_atomic_t sigchld = 0; + struct imsgbuf *ibuf; + ++void write_pid(struct ntpd_conf *conf) ++{ ++ FILE *f; ++ f = fdopen(conf->pid_fd, "w"); ++ fprintf(f, "%ld\n", (long) getpid()); ++ fclose(f); ++} ++ + void + sighdlr(int sig) + { +@@ -87,6 +96,7 @@ main(int argc, char *argv[]) + struct pollfd pfd[POLL_MAX]; + pid_t chld_pid = 0, pid; + const char *conffile; ++ const char *pidfile; + int ch, nfds, timeout = INFTIM; + int pipe_chld[2]; + extern char *__progname; +@@ -94,6 +104,7 @@ main(int argc, char *argv[]) + __progname = _compat_get_progname(argv[0]); + + conffile = CONFFILE; ++ pidfile = PIDFILE; + + bzero(&conf, sizeof(conf)); + +@@ -108,6 +119,9 @@ main(int argc, char *argv[]) + case 'f': + conffile = optarg; + break; ++ case 'p': ++ pidfile = optarg; ++ break; + case 's': + conf.settime = 1; + break; +@@ -123,6 +137,11 @@ main(int argc, char *argv[]) + if (parse_config(conffile, &conf)) + exit(1); + ++ if ( (conf.pid_fd = creat(pidfile, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH)) == -1) { ++ fprintf(stderr, "ntpd: can't create pid file\n"); ++ exit(1); ++ } ++ + if (geteuid()) { + fprintf(stderr, "ntpd: need root privileges\n"); + exit(1); +@@ -143,6 +162,8 @@ main(int argc, char *argv[]) + if (!conf.debug) + if (daemon(1, 0)) + fatal("daemon"); ++ else ++ write_pid(&conf); + } else + timeout = SETTIME_TIMEOUT * 1000; + +@@ -186,6 +207,8 @@ main(int argc, char *argv[]) + if (!conf.debug) + if (daemon(1, 0)) + fatal("daemon"); ++ else ++ write_pid(&conf); + } + + if (nfds > 0 && (pfd[PFD_PIPE].revents & POLLOUT)) +@@ -224,6 +247,8 @@ main(int argc, char *argv[]) + msgbuf_clear(&ibuf->w); + free(ibuf); + log_info("Terminating"); ++ close(conf.pid_fd); ++ unlink(pidfile); + return (0); + } + +@@ -295,6 +320,8 @@ dispatch_imsg(struct ntpd_conf *conf) + if (!conf->debug) + if (daemon(1, 0)) + fatal("daemon"); ++ else ++ write_pid(conf); + conf->settime = 0; + break; + case IMSG_HOST_DNS: +diff -Naurp openntpd.orig/ntpd.h openntpd/ntpd.h +--- openntpd.orig/ntpd.h 2006-05-14 05:29:21.000000000 +0000 ++++ openntpd/ntpd.h 2009-02-05 08:24:33.000000000 +0000 +@@ -35,6 +35,8 @@ + #endif + #define CONFFILE SYSCONFDIR "/ntpd.conf" + ++#define PIDFILE "/var/run/openntpd.pid" ++ + #define READ_BUF_SIZE 4096 + + #define NTPD_OPT_VERBOSE 0x0001 +@@ -132,6 +134,7 @@ struct ntpd_conf { + u_int8_t settime; + u_int8_t debug; + u_int32_t scale; ++ int pid_fd; + }; + + struct buf { diff --git a/source/network/openntpd/06-servernameIfInvalid.patch b/source/network/openntpd/06-servernameIfInvalid.patch new file mode 100644 index 0000000..6320ab2 --- /dev/null +++ b/source/network/openntpd/06-servernameIfInvalid.patch @@ -0,0 +1,157 @@ +Author: Otto Moerbeek <o...@openbsd.org> and Sergey B Kirpichev <skirpic...@gmail.com> +Description: Dies if none peer servername is invalid, and logs badpeers through syslog critical. + This patch provides two differnt solutions for badpeer(s) non handled by default: + 1. Exit, if there is no peers at all (no server(s) directive) or if badpeers. + 2. Dump peer info to syslog with LOG_CRIT periodically, if badpeers > half of the + total number of peers + +Index: openntpd-3.9p1+debian/ntp.c +=================================================================== +--- openntpd-3.9p1+debian.orig/ntp.c 2009-02-01 20:41:19.000000000 +0300 ++++ openntpd-3.9p1+debian/ntp.c 2009-02-01 20:50:33.000000000 +0300 +@@ -44,14 +44,17 @@ + #define PFD_MAX 1 + + volatile sig_atomic_t ntp_quit = 0; ++volatile sig_atomic_t ntp_report = 0; + struct imsgbuf *ibuf_main; + struct ntpd_conf *conf; + u_int peer_cnt; ++time_t lastreport; + + void ntp_sighdlr(int); + int ntp_dispatch_imsg(void); + void peer_add(struct ntp_peer *); + void peer_remove(struct ntp_peer *); ++void report_peers(int); + int offset_compare(const void *, const void *); + + void +@@ -62,6 +65,9 @@ + case SIGTERM: + ntp_quit = 1; + break; ++ case SIGUSR1: ++ ntp_report = 1; ++ break; + } + } + +@@ -139,6 +145,7 @@ + + signal(SIGTERM, ntp_sighdlr); + signal(SIGINT, ntp_sighdlr); ++ signal(SIGUSR1, ntp_sighdlr); + signal(SIGPIPE, SIG_IGN); + signal(SIGHUP, SIG_IGN); + +@@ -165,6 +172,15 @@ + TAILQ_FOREACH(p, &conf->ntp_peers, entry) + peer_cnt++; + ++ /* wait 5 min before reporting first status to let things settle down */ ++ lastreport = time(NULL) + (5 * 60) - REPORT_INTERVAL; ++ ++ /* trivial error, no server(s) in config file */ ++ if (peer_cnt == 0) { ++ log_warnx("no valid peers"); ++ ntp_quit = 1; ++ } ++ + while (ntp_quit == 0) { + if (peer_cnt > idx2peer_elms) { + if ((newp = realloc(idx2peer, sizeof(void *) * +@@ -283,6 +299,9 @@ + conf->settime) == -1) + ntp_quit = 1; + } ++ ++ report_peers(ntp_report); ++ ntp_report = 0; + } + + msgbuf_write(&ibuf_main->w); +@@ -361,6 +380,9 @@ + h->next = NULL; + npeer->addr = h; + npeer->addr_head.a = h; ++ npeer->addr_head.name = ++ peer->addr_head.name; ++ npeer->addr_head.pool = 1; + client_peer_init(npeer); + npeer->state = STATE_DNS_DONE; + peer_add(npeer); +@@ -546,3 +568,43 @@ + return (interval + r); + } + ++void ++report_peers(int always) ++{ ++ time_t now; ++ u_int badpeers = 0; ++ struct ntp_peer *p; ++ ++ TAILQ_FOREACH(p, &conf->ntp_peers, entry) { ++ if (p->trustlevel < TRUSTLEVEL_BADPEER) ++ badpeers++; ++ } ++ ++ now = time(NULL); ++ if (!always) { ++ if (peer_cnt == 0 || badpeers == 0 || badpeers < peer_cnt / 2) ++ return; ++ ++ if (lastreport + REPORT_INTERVAL > now) ++ return; ++ } ++ lastreport = now; ++ if (peer_cnt > 0) { ++ log_warnx("%u out of %u peers valid", peer_cnt - badpeers, ++ peer_cnt); ++ TAILQ_FOREACH(p, &conf->ntp_peers, entry) { ++ if (p->trustlevel < TRUSTLEVEL_BADPEER) { ++ const char *a = "not resolved"; ++ const char *pool = ""; ++ if (p->addr) ++ a = log_sockaddr( ++ (struct sockaddr *)&p->addr->ss); ++ if (p->addr_head.pool) ++ pool = "from pool "; ++ log_warnx("bad peer %s%s (%s)", pool, ++ p->addr_head.name, a); ++ } ++ } ++ } ++} ++ +Index: openntpd-3.9p1+debian/ntpd.h +=================================================================== +--- openntpd-3.9p1+debian.orig/ntpd.h 2009-02-01 20:41:24.000000000 +0300 ++++ openntpd-3.9p1+debian/ntpd.h 2009-02-01 20:41:24.000000000 +0300 +@@ -61,6 +61,7 @@ + #define SETTIME_MIN_OFFSET 180 /* min offset for settime at start */ + #define SETTIME_TIMEOUT 15 /* max seconds to wait with -s */ + #define LOG_NEGLIGEE 128 /* negligible drift to not log (ms) */ ++#define REPORT_INTERVAL (24*60*60) /* interval between status reports */ + + enum client_state { + STATE_NONE, +Index: openntpd-3.9p1+debian/ntpd.8 +=================================================================== +--- openntpd-3.9p1+debian.orig/ntpd.8 2009-02-01 20:41:24.000000000 +0300 ++++ openntpd-3.9p1+debian/ntpd.8 2009-02-01 20:41:24.000000000 +0300 +@@ -61,6 +61,13 @@ + typically + .Xr ntpd.conf 5 . + .Pp ++When ++.Nm ++receives a ++.Dv SIGUSR1 ++signal, it writes its peer status to ++.Xr syslog 3 . ++.Pp + The options are as follows: + .Bl -tag -width "-f fileXXX" + .It Fl d diff --git a/source/network/openntpd/07-ntpd-manpage-enhance.patch b/source/network/openntpd/07-ntpd-manpage-enhance.patch new file mode 100644 index 0000000..823c162 --- /dev/null +++ b/source/network/openntpd/07-ntpd-manpage-enhance.patch @@ -0,0 +1,34 @@ +Description: Manpage enhancement + Explicitly remember on manpage that Debian does not bind to any address + by default. +--- +Origin: Dererk <der...@debian.org> +Bug-Debian: 575705 +Last-Update: <2010-06-08> + +Index: openntpd-3.9p1+debian/ntpd.conf.5 +=================================================================== +--- openntpd-3.9p1+debian.orig/ntpd.conf.5 2011-02-09 16:52:04.037958974 -0300 ++++ openntpd-3.9p1+debian/ntpd.conf.5 2011-02-09 19:41:39.731354052 -0300 +@@ -14,7 +14,7 @@ + .\" AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT + .\" OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + .\" +-.Dd June 17, 2004 ++.Dd June 8, 2010 + .Dt NTPD.CONF 5 + .Os + .Sh NAME +@@ -34,9 +34,11 @@ + They are as follows: + .Bl -tag -width Ds + .It Ic listen on Ar address ++OpenNTPd has the ability to sync the local clock to remote NTP servers and, if this directive is specified, can act as NTP server itself, redistributing the local clock. ++.Pp + Specify a local IP address or a hostname the + .Xr ntpd 8 +-daemon should listen on. ++daemon should listen on to enable remote clients synchronization. + If it appears multiple times, + .Xr ntpd 8 + will listen on each given address. diff --git a/source/network/openntpd/linux-adjtimex.patch b/source/network/openntpd/08-adjtimex.patch.patch similarity index 61% rename from source/network/openntpd/linux-adjtimex.patch rename to source/network/openntpd/08-adjtimex.patch.patch index e7b72da..5e73ec3 100644 --- a/source/network/openntpd/linux-adjtimex.patch +++ b/source/network/openntpd/08-adjtimex.patch.patch @@ -1,22 +1,43 @@ -Only in openntpd-3.9p1.old: configure -diff -ur --unidirectional-new-file openntpd-3.9p1.old/configure.ac openntpd-3.9p1/configure.ac ---- openntpd-3.9p1.old/configure.ac 2006-05-14 07:29:23.000000000 +0200 -+++ openntpd-3.9p1/configure.ac 2008-02-07 13:13:18.066366142 +0100 -@@ -583,6 +583,11 @@ - [ builtin_arc4random=$withval ] - ) +Description: This patch adds support for the Linux adjtimex + call to OpenNTPD, to adjust the kernel to compensate for + systematic clock skew/drift. +Author: Darren Tucker <dtuc...@zip.com.au> +Reviewed-by: Sergey B Kirpichev <skirpic...@gmail.com> +Origin: http://dtucker.freeshell.org/openntpd/patches/openntpd-3.7p1-linux-adjtimex.patch + +Index: openntpd/client.c +=================================================================== +--- openntpd.orig/client.c 2011-01-24 16:10:05.000000000 +0300 ++++ openntpd/client.c 2011-01-24 16:10:05.000000000 +0300 +@@ -342,7 +342,7 @@ + priv_adjtime(); + + for (i = 0; i < OFFSET_ARRAY_SIZE; i++) +- if (p->reply[i].rcvd <= p->reply[best].rcvd) ++ /* if (p->reply[i].rcvd <= p->reply[best].rcvd) */ + p->reply[i].good = 0; + + return (0); +Index: openntpd/configure.ac +=================================================================== +--- openntpd.orig/configure.ac 2011-01-24 16:08:28.000000000 +0300 ++++ openntpd/configure.ac 2011-01-24 16:10:05.000000000 +0300 +@@ -617,6 +617,11 @@ + fi + AC_SUBST(mansubdir) +AC_ARG_WITH(adjtimex, -+ [ --with-adjtimex Use adjtimex to adjust kernel skew], -+ [ AC_DEFINE(USE_ADJTIMEX, [], [Use adjust skew with adjtimex (experimental)]) ] -+ ) -+ - AC_ARG_WITH(mantype, - [ --with-mantype=man|cat|doc Set man page type], - [ -diff -ur --unidirectional-new-file openntpd-3.9p1.old/defines.h openntpd-3.9p1/defines.h ---- openntpd-3.9p1.old/defines.h 2006-05-14 07:29:21.000000000 +0200 -+++ openntpd-3.9p1/defines.h 2008-02-07 13:14:34.488711868 +0100 ++ [ --with-adjtimex Use adjtimex to adjust kernel skew], ++ [ AC_DEFINE(USE_ADJTIMEX, [], [Use adjust skew with adjtimex (experimental)]) ] ++) ++ + # Search for OpenSSL if required. + if test "$ac_cv_func_arc4random" != "yes" && test "x$builtin_arc4random" != "xyes"; then + saved_CPPFLAGS="$CPPFLAGS" +Index: openntpd/defines.h +=================================================================== +--- openntpd.orig/defines.h 2011-01-24 16:08:28.000000000 +0300 ++++ openntpd/defines.h 2011-01-24 16:10:05.000000000 +0300 @@ -20,6 +20,10 @@ # define setproctitle(x) #endif @@ -24,15 +45,14 @@ diff -ur --unidirectional-new-file openntpd-3.9p1.old/defines.h openntpd-3.9p1/d +#ifdef USE_ADJTIMEX +# define adjtime(a,b) (_compat_adjtime((a),(b))) +#endif -+ ++ #if !defined(SA_LEN) # if defined(HAVE_STRUCT_SOCKADDR_SA_LEN) # define SA_LEN(x) ((x)->sa_len) -Only in openntpd-3.9p1.old: ntpd.0 -Only in openntpd-3.9p1.old: ntpd.conf.0 -diff -ur --unidirectional-new-file openntpd-3.9p1.old/openbsd-compat/Makefile.in openntpd-3.9p1/openbsd-compat/Makefile.in ---- openntpd-3.9p1.old/openbsd-compat/Makefile.in 2006-05-14 07:29:19.000000000 +0200 -+++ openntpd-3.9p1/openbsd-compat/Makefile.in 2008-02-07 13:31:39.499728930 +0100 +Index: openntpd/openbsd-compat/Makefile.in +=================================================================== +--- openntpd.orig/openbsd-compat/Makefile.in 2011-01-24 16:08:27.000000000 +0300 ++++ openntpd/openbsd-compat/Makefile.in 2011-01-24 16:10:05.000000000 +0300 @@ -9,7 +9,7 @@ COMPAT= atomicio.o bsd-arc4random.o bsd-misc.o bsd-poll.o \ bsd-snprintf.o bsd-getifaddrs.o bsd-setresuid.o \ @@ -42,9 +62,10 @@ diff -ur --unidirectional-new-file openntpd-3.9p1.old/openbsd-compat/Makefile.in VPATH=@srcdir@ CC=@CC@ -diff -ur --unidirectional-new-file openntpd-3.9p1.old/openbsd-compat/openbsd-compat.h openntpd-3.9p1/openbsd-compat/openbsd-compat.h ---- openntpd-3.9p1.old/openbsd-compat/openbsd-compat.h 2006-05-14 07:29:19.000000000 +0200 -+++ openntpd-3.9p1/openbsd-compat/openbsd-compat.h 2008-02-07 13:17:00.272366764 +0100 +Index: openntpd/openbsd-compat/openbsd-compat.h +=================================================================== +--- openntpd.orig/openbsd-compat/openbsd-compat.h 2011-01-24 16:08:28.000000000 +0300 ++++ openntpd/openbsd-compat/openbsd-compat.h 2011-01-24 16:10:05.000000000 +0300 @@ -46,6 +46,11 @@ __attribute__((__format__ (printf, 2, 3))); #endif @@ -57,11 +78,12 @@ diff -ur --unidirectional-new-file openntpd-3.9p1.old/openbsd-compat/openbsd-com #ifndef HAVE_INET_PTON int inet_pton(int, const char *, void *); #endif -diff -ur --unidirectional-new-file openntpd-3.9p1.old/openbsd-compat/port-linux.c openntpd-3.9p1/openbsd-compat/port-linux.c ---- openntpd-3.9p1.old/openbsd-compat/port-linux.c 1970-01-01 01:00:00.000000000 +0100 -+++ openntpd-3.9p1/openbsd-compat/port-linux.c 2008-02-07 13:24:43.800366563 +0100 +Index: openntpd/openbsd-compat/port-linux.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ openntpd/openbsd-compat/port-linux.c 2011-01-24 16:10:05.000000000 +0300 @@ -0,0 +1,105 @@ -+ ++/* $Id$ */ + +/* + * Copyright (c) 2004 Darren Tucker <dtucker at zip com au> diff --git a/source/network/openntpd/09-syslog.patch b/source/network/openntpd/09-syslog.patch new file mode 100644 index 0000000..6642c83 --- /dev/null +++ b/source/network/openntpd/09-syslog.patch @@ -0,0 +1,18 @@ +Author: Sergey B Kirpichev <skirpic...@gmail.com> +Description: Document syslog priority +Bug-Debian: 502162 + +Index: openntpd-3.9p1+debian/ntpd.8 +=================================================================== +--- openntpd-3.9p1+debian.orig/ntpd.8 2011-02-09 17:25:34.211349879 -0300 ++++ openntpd-3.9p1+debian/ntpd.8 2011-02-09 17:25:34.251350986 -0300 +@@ -43,7 +43,8 @@ + .Xr adjtime 2 + system call to correct the local system time without causing time jumps. + Adjustments larger than 128ms are logged using +-.Xr syslog 3 . ++.Xr syslog 3 ++with LOG_INFO priority. + The threshold value is chosen to avoid having local clock drift + thrash the log files. + Should diff --git a/source/network/openntpd/FrugalBuild b/source/network/openntpd/FrugalBuild index e07983e..5f35b86 100644 --- a/source/network/openntpd/FrugalBuild +++ b/source/network/openntpd/FrugalBuild @@ -4,16 +4,25 @@ pkgname=openntpd pkgver=3.9p1 -pkgrel=10 +pkgrel=11 pkgdesc="A free, easy to use implementation of the Network Time Protocol." url="http://www.openntpd.org/" groups=('network') archs=('i686' 'x86_64') -backup=('etc/sysconfig/openntpd') +backup=('etc/sysconfig/openntpd' 'etc/ntpd.conf') depends=('openssl>=1.0.0') up2date="lynx -dump http://www.openntpd.org/|perl -wlne 'if(/Portable OpenNTPD (\d\.\d(\.\d)?[a-z]\d) released/) { print \$1; exit; }'" source=(ftp://ftp.openbsd.org/pub/OpenBSD/OpenNTPD/$pkgname-$pkgver.tar.gz \ - pidfile.patch $pkgname.service openntpd.sysconfig linux-adjtimex.patch) + $pkgname.service \ + openntpd.sysconfig \ + 02-reconnect.patch \ + 03-ipv4only.patch \ + 04-backslash.patch \ + 05-pid.patch \ + 06-servernameIfInvalid.patch \ + 07-ntpd-manpage-enhance.patch \ + 08-adjtimex.patch.patch \ + 09-syslog.patch) build() { @@ -28,10 +37,15 @@ build() Ffile openntpd.sysconfig /etc/sysconfig/openntpd } sha1sums=('098a435d02886a9e4d34afb15b15fde795eda1e9' \ - '7492895dda68aebdda46ebeb9393e57b608109ca' \ - '31cf8555e5ff2b0caf901c9c05cf1cd4229fd901' \ + 'e075ca43eaf618944bbc9655e07ae36ec279b074' \ 'da498ca69421f23688fe9f27cc6091c46592d1d0' \ - 'ab11f4793fa66905e8e5466c6ff0ead6719f57b6') + 'ecbd82864eb15321d7602f3369634bcf30c851ff' \ + 'b4407419b85cb1d82e56134cda70fc3de9096cfd' \ + '00a3f064b6c5be3ea11d48df825789363c9ec45f' \ + 'fdfbe93762637f5b64ef4afdbd743121202fedf6' \ + '4cb666470b9ea384c7d73e1402bfb5095d4477de' \ + '95c9779f4d1489a8812796a8ee90fd2825929077' \ + 'bad5fb796acc32954f12e07f6fed4b99915dcf78' \ + '344e18370d7886ef7d0e390ed93e9eb159557636') # optimization OK - diff --git a/source/network/openntpd/openntpd.service b/source/network/openntpd/openntpd.service index 07b1023..a68d016 100644 --- a/source/network/openntpd/openntpd.service +++ b/source/network/openntpd/openntpd.service @@ -4,7 +4,7 @@ After=network.target [Service] EnvironmentFile=/etc/sysconfig/openntpd -ExecStart=/usr/sbin/ntpd -d $PARAMS +ExecStart=/usr/sbin/ntpd $PARAMS -d StandardOutput=syslog [Install] diff --git a/source/network/openntpd/pidfile.patch b/source/network/openntpd/pidfile.patch deleted file mode 100644 index 1f583fe..0000000 --- a/source/network/openntpd/pidfile.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff -Naur openntpd-3.9p1.orig/ntpd.c openntpd-3.9p1/ntpd.c ---- openntpd-3.9p1.orig/ntpd.c 2006-05-14 07:29:23.000000000 +0200 -+++ openntpd-3.9p1/ntpd.c 2007-01-20 08:35:54.000000000 +0100 -@@ -152,6 +152,14 @@ - /* fork child process */ - chld_pid = ntp_main(pipe_chld, &conf); - -+ if (!conf.debug) { -+ FILE *pidfile = fopen("/var/run/ntpd.pid", "w"); -+ if (pidfile) { -+ fprintf(pidfile, "%d\n", chld_pid); -+ fclose(pidfile); -+ } -+ } -+ - setproctitle("[priv]"); - - signal(SIGTERM, sighdlr); -@@ -215,6 +223,8 @@ - if (chld_pid) - kill(chld_pid, SIGTERM); - -+ if (!conf.debug) -+ unlink("/var/run/ntpd.pid"); - do { - if ((pid = wait(NULL)) == -1 && - errno != EINTR && errno != ECHILD) _______________________________________________ Frugalware-git mailing list Frugalware-git@frugalware.org http://frugalware.org/mailman/listinfo/frugalware-git