[Git][NTPsec/ntpsec][fixinstall] 5 commits: Note the fix of the AWS bug in NEWS.
Ian Bruene
gitlab at mg.gitlab.com
Wed Dec 6 17:37:30 UTC 2017
Ian Bruene pushed to branch fixinstall at NTPsec / ntpsec
Commits:
d9dc0c29 by Eric S. Raymond at 2017-12-05T12:17:48-05:00
Note the fix of the AWS bug in NEWS.
- - - - -
6ecd59ae by Matt Selsky at 2017-12-06T00:20:27-05:00
All systems with sys/timex.h seem to have a subset of the STA_ symbols
We therefore don't need to test for all of them. Solaris, for example is
missing, STA_NANO, STA_CLK, and STA_MODE.
These 3 symbols were added to glibc in March 2008 per
https://sourceware.org/ml/libc-alpha/2008-03/msg00076.html
- - - - -
4326369d by Matt Selsky at 2017-12-06T09:49:19-05:00
Restore ntp_error_in_seconds() correctness on platforms without STA_NANO
Partially reverts "Address Gitlab issue #422: Build warnings for implicit declaration of function"
- - - - -
1e2fa313 by Ian Bruene at 2017-12-06T09:30:58-06:00
Possible, and very hacky, fix for #414
- - - - -
7f518985 by Ian Bruene at 2017-12-06T09:30:58-06:00
Removed incorrect dist/site fix
- - - - -
4 changed files:
- NEWS
- include/ntp_syscall.h
- libntp/statestr.c
- pylib/wscript
Changes:
=====================================
NEWS
=====================================
--- a/NEWS
+++ b/NEWS
@@ -23,6 +23,9 @@ adjustment via ntp_adjtime() or equivalent facility.
Mac OS X support has been dropped pending the implementation of
ntp_adjtime(2).
+A bug that caused the rejection of 33% of packets from Amazon time
+service has been fixed.
+
== 2017-10-10: 1.0.0 ==
This is the 1.0 release.
=====================================
include/ntp_syscall.h
=====================================
--- a/include/ntp_syscall.h
+++ b/include/ntp_syscall.h
@@ -13,7 +13,17 @@
# include <sys/timex.h>
extern int ntp_adjtime_ns(struct timex *);
+/*
+ * The units of the maxerror and esterror fields vary by platform. If
+ * STA_NANO is defined, they're in nanoseconds; otherwise in
+ * microseconds. Hide the difference by normalizing everything to
+ * float seconds.
+ */
+# ifdef STA_NANO
#define ntp_error_in_seconds(n) ((n)/1.0e9)
+# else
+#define ntp_error_in_seconds(n) ((n)/1.0e6)
+# endif
/* MUSL port shim */
#if !defined(HAVE_NTP_ADJTIME) && defined(HAVE_ADJTIMEX)
=====================================
libntp/statestr.c
=====================================
--- a/libntp/statestr.c
+++ b/libntp/statestr.c
@@ -190,45 +190,19 @@ static const struct codestring res_access_bits[] = {
* kernel discipline status bits
*/
static const struct codestring k_st_bits[] = {
-# ifdef STA_PLL
{ STA_PLL, "pll" },
-# endif
-# ifdef STA_PPSFREQ
{ STA_PPSFREQ, "ppsfreq" },
-# endif
-# ifdef STA_PPSTIME
{ STA_PPSTIME, "ppstime" },
-# endif
-# ifdef STA_FLL
{ STA_FLL, "fll" },
-# endif
-# ifdef STA_INS
{ STA_INS, "ins" },
-# endif
-# ifdef STA_DEL
{ STA_DEL, "del" },
-# endif
-# ifdef STA_UNSYNC
{ STA_UNSYNC, "unsync" },
-# endif
-# ifdef STA_FREQHOLD
{ STA_FREQHOLD, "freqhold" },
-# endif
-# ifdef STA_PPSSIGNAL
{ STA_PPSSIGNAL, "ppssignal" },
-# endif
-# ifdef STA_PPSJITTER
{ STA_PPSJITTER, "ppsjitter" },
-# endif
-# ifdef STA_PPSWANDER
{ STA_PPSWANDER, "ppswander" },
-# endif
-# ifdef STA_PPSERROR
{ STA_PPSERROR, "ppserror" },
-# endif
-# ifdef STA_CLOCKERR
{ STA_CLOCKERR, "clockerr" },
-# endif
# ifdef STA_NANO
{ STA_NANO, "nano" },
# endif
=====================================
pylib/wscript
=====================================
--- a/pylib/wscript
+++ b/pylib/wscript
@@ -11,14 +11,17 @@ def configure(conf):
fixed.load('python')
fixed.check_python_version((2, 6, 0))
conf.check_python_headers(features='pyext') # Extension-only, no embedded
- # Library directory hack, dist-packages is what python reports.
- # That is reserved by the FHS, we have to use site-packages for user
- # installs. Distribution installs can use dist-packages.
- if "/usr/local/" in conf.env.PYTHONDIR:
- if "dist-packages" in conf.env.PYTHONDIR:
- conf.env.PYTHONDIR = conf.env.PYTHONDIR.replace("dist", "site")
- if "dist-packages" in conf.env.PYTHONARCHDIR:
- conf.env.PYTHONARCHDIR = conf.env.PYTHONARCHDIR.replace("dist", "site")
+ # Library directory hack
+ # For unknown reasons python libs are getting shunted off where they
+ # should not be on gentoo. I DO NOT KNOW HOW BRITTLE THIS CODE IS.
+ if conf.env.PYTHONDIR.startswith(conf.env.PREFIX) is False:
+ splitPoint = conf.env.PYTHONDIR.find("/python")
+ tail = conf.env.PYTHONDIR[splitPoint:]
+ conf.env.PYTHONDIR = conf.env.PREFIX + "lib" + tail
+ if conf.env.PYTHONARCHDIR.startswith(conf.env.PREFIX) is False:
+ splitPoint = conf.env.PYTHONARCHDIR.find("/python")
+ tail = conf.env.PYTHONARCHDIR[splitPoint:]
+ conf.env.PYTHONARCHDIR = conf.env.PREFIX + "lib" + tail
def build(ctx):
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/b7559068d533c9b73b5dd8d4c5691005a0f1b787...7f518985b381ddc3afa9da912fda65bc77a182b3
---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/b7559068d533c9b73b5dd8d4c5691005a0f1b787...7f518985b381ddc3afa9da912fda65bc77a182b3
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20171206/69dad1eb/attachment.html>
More information about the vc
mailing list