From gitlab at mg.gitlab.com Wed Jan 1 04:26:38 2025 From: gitlab at mg.gitlab.com (Gary E. Miller (@garyedmundsmiller)) Date: Wed, 01 Jan 2025 04:26:38 +0000 Subject: [Git][NTPsec/ntpsec][mr_1415] pylib/statfiles.py: Codacy wants _ prefix on unused vars. Message-ID: <6774c3fea552e_2ec73bc651c0@gitlab-sidekiq-low-urgency-cpu-bound-v2-5bfcd7db68-v8lgq.mail> Gary E. Miller pushed to branch mr_1415 at NTPsec / ntpsec Commits: f1a1d752 by James Browning at 2024-12-31T20:26:08-08:00 pylib/statfiles.py: Codacy wants _ prefix on unused vars. - - - - - 1 changed file: - pylib/statfiles.py Changes: ===================================== pylib/statfiles.py ===================================== @@ -104,7 +104,7 @@ Don't chanage without testing. index = (length - 1) * (perc / 100) lower = values[int(index)] - (frac, whole) = math.modf(index) + (frac, _whole) = math.modf(index) if 0.01 <= frac: # interpolate up upper = values[int(index) + 1] View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/f1a1d752f84a8f2a566b62355bee2ad58f010707 -- View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/f1a1d752f84a8f2a566b62355bee2ad58f010707 You're receiving this email because of your account on gitlab.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at mg.gitlab.com Thu Jan 2 03:11:16 2025 From: gitlab at mg.gitlab.com (Gary E. Miller (@garyedmundsmiller)) Date: Thu, 02 Jan 2025 03:11:16 +0000 Subject: [Git][NTPsec/ntpsec][mr_1415] ntpclients/ntpviz.py, pylib/statfiles.py: Fix typos. Message-ID: <677603d4c5ad9_2ec7434261ac@gitlab-sidekiq-low-urgency-cpu-bound-v2-5bfcd7db68-zjxtj.mail> Gary E. Miller pushed to branch mr_1415 at NTPsec / ntpsec Commits: b27c4778 by Gary E. Miller at 2025-01-01T19:10:45-08:00 ntpclients/ntpviz.py, pylib/statfiles.py: Fix typos. Comments from MR 1415 - - - - - 2 changed files: - ntpclients/ntpviz.py - pylib/statfiles.py Changes: ===================================== ntpclients/ntpviz.py ===================================== @@ -1907,7 +1907,7 @@ points.
Skewness, Skew:
The skewness of a random variable X is the third standardized moment -and is a dimension-less ratio. ntpviz uses the FIsher-Pearson moment +and is a dimension-less ratio. ntpviz uses the Fisher-Pearson moment of skewness. See [NIST1]. There are other different ways to calculate Skewness.
===================================== pylib/statfiles.py ===================================== @@ -69,20 +69,20 @@ class NTPStats: percents: A list of integer percentile to calculate. values: A sorted list of values. -We try to duplicate Excel, Libreoffice, R, etc. -Don't chanage without testing. +We try to duplicate Excel, LibreOffice, R, etc. +Don't change without testing. NIST/SEMATECH e-Handbook of Statistical Methods, 2012 7.2.6.2. Percentiles https://www.itl.nist.gov/div898/handbook/prc/section2/prc262.htm """ - ret = {} length = len(values) if 0 == length: # No data, return {} - return ret + return {} + ret = {} if 1 == length: # just one data value, set all to that one value for perc in percents: View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/b27c4778b9eeb62a514d492acbc49e29ea264240 -- View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/b27c4778b9eeb62a514d492acbc49e29ea264240 You're receiving this email because of your account on gitlab.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at mg.gitlab.com Wed Jan 8 20:53:25 2025 From: gitlab at mg.gitlab.com (Gary E. Miller (@garyedmundsmiller)) Date: Wed, 08 Jan 2025 20:53:25 +0000 Subject: [Git][NTPsec/ntpsec][master] doc: Document Obsolete, ignored, notrap option... Message-ID: <677ee5c5f3196_2ec75608354b@gitlab-sidekiq-low-urgency-cpu-bound-v2-8458cf4788-s9rcv.mail> Gary E. Miller pushed to branch master at NTPsec / ntpsec Commits: 93bec7d1 by James Browning at 2025-01-08T06:30:41-08:00 doc: Document Obsolete, ignored, notrap option... This was in NTPsec and still is in classic NTP. - - - - - 1 changed file: - docs/includes/access-commands.adoc Changes: ===================================== docs/includes/access-commands.adoc ===================================== @@ -83,6 +83,11 @@ NB: This blocks requests from other clients and responses to your requests. If you are using servers in this IP range, you will need to add +restrict+ slots to let them through. + +notrap+;; + This is an obsolete, ignored option inherited from classic NTP to + provide mode 6/7 control message trap service to matching hosts. The + trap service was a subsystem of the removed ntpdc support intended + for use by remote event logging programs. +notrust+;; Deny service unless the packet is cryptographically authenticated. +ntpport+;; View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/93bec7d1ac3275b6bd8cc962540f3cd0789e43c2 -- View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/93bec7d1ac3275b6bd8cc962540f3cd0789e43c2 You're receiving this email because of your account on gitlab.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at mg.gitlab.com Sat Jan 18 06:16:16 2025 From: gitlab at mg.gitlab.com (Hal Murray (@hal.murray)) Date: Sat, 18 Jan 2025 06:16:16 +0000 Subject: [Git][NTPsec/ntpsec][master] 2 commits: Keep Coverity happy: free old strings in NTS config Message-ID: <678b4730c402_2ec82947279a@gitlab-sidekiq-low-urgency-cpu-bound-v2-86585958ff-tzmr2.mail> Hal Murray pushed to branch master at NTPsec / ntpsec Commits: 51426ae3 by Hal Murray at 2025-01-14T01:58:13-08:00 Keep Coverity happy: free old strings in NTS config - - - - - f928b8bd by Hal Murray at 2025-01-14T02:12:51-08:00 Drop tiny piece of cruft that was avoiding free(NULL) - - - - - 1 changed file: - ntpd/ntp_config.c Changes: ===================================== ntpd/ntp_config.c ===================================== @@ -480,9 +480,6 @@ create_attr_sval( my_val = emalloc_zero(sizeof(*my_val)); my_val->attr = attr; - if (NULL == s) { /* free() hates NULL */ - s = estrdup(""); - } my_val->value.s = _UC(s); my_val->type = T_String; @@ -1959,18 +1956,22 @@ config_nts( INSIST(0); break; case T_Aead: + free((void *)(intptr_t)ntsconfig.aead); ntsconfig.aead = estrdup(nts->value.s); break; case T_Ca: + free((void *)(intptr_t)ntsconfig.ca); ntsconfig.ca = estrdup(nts->value.s); break; case T_Cert: + free((void *)(intptr_t)ntsconfig.cert); ntsconfig.cert = estrdup(nts->value.s); break; case T_Cookie: + free((void *)(intptr_t)ntsconfig.KI); ntsconfig.KI = estrdup(nts->value.s); break; @@ -1983,14 +1984,17 @@ config_nts( break; case T_Key: + free((void *)(intptr_t)ntsconfig.key); ntsconfig.key = estrdup(nts->value.s); break; case T_Maxtls: + free((void *)(intptr_t)ntsconfig.maxtls); ntsconfig.maxtls = estrdup(nts->value.s); break; case T_Mintls: + free((void *)(intptr_t)ntsconfig.mintls); ntsconfig.mintls = estrdup(nts->value.s); break; @@ -1999,14 +2003,17 @@ config_nts( break; case T_Tlscipherserverpreference: + free((void *)(intptr_t)ntsconfig.tlscipherserverpreference); ntsconfig.tlscipherserverpreference = true; break; case T_Tlsciphersuites: + free((void *)(intptr_t)ntsconfig.tlsciphersuites); ntsconfig.tlsciphersuites = estrdup(nts->value.s); break; case T_Tlsecdhcurves: + free((void *)(intptr_t)ntsconfig.tlsecdhcurves); ntsconfig.tlsecdhcurves = estrdup(nts->value.s); break; #endif View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/compare/93bec7d1ac3275b6bd8cc962540f3cd0789e43c2...f928b8bd94e06dc0a9d10a9ef7dbe809d2e711a8 -- View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/compare/93bec7d1ac3275b6bd8cc962540f3cd0789e43c2...f928b8bd94e06dc0a9d10a9ef7dbe809d2e711a8 You're receiving this email because of your account on gitlab.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at mg.gitlab.com Sun Jan 19 20:52:14 2025 From: gitlab at mg.gitlab.com (Hal Murray (@hal.murray)) Date: Sun, 19 Jan 2025 20:52:14 +0000 Subject: [Git][NTPsec/ntpsec][master] 2 commits: Coverity: add parens in ntp_filegen.c to maybe help Message-ID: <678d65fe3dcc0_2ec82806657f@gitlab-sidekiq-low-urgency-cpu-bound-v2-86585958ff-qfzhs.mail> Hal Murray pushed to branch master at NTPsec / ntpsec Commits: a8ec4960 by Hal Murray at 2025-01-19T12:48:40-08:00 Coverity: add parens in ntp_filegen.c to maybe help Looks like a bug in Coverity is generating a false positive - - - - - ab012017 by Hal Murray at 2025-01-19T12:50:02-08:00 Coverity: fix bug in ntpd/ntp_filegen.c time_t vs 32 bit uptime_t/current_time - - - - - 2 changed files: - ntpd/ntp_filegen.c - ntpd/ntp_refclock.c Changes: ===================================== ntpd/ntp_filegen.c ===================================== @@ -345,7 +345,8 @@ filegen_setup( case FILEGEN_AGE: /* current_time doesn't go backwards * so don't need to check id_lo */ - current = ((unsigned)gen->id_hi > current_time); + /* Coverity: id_hi is time_t, current_time is 32 bits */ + current = (gen->id_hi > (time_t)current_time); break; case FILEGEN_DAY: ===================================== ntpd/ntp_refclock.c ===================================== @@ -469,7 +469,7 @@ refclock_sample( * approximately 60 percent of the samples remain. */ i = 0; j = n; - m = n - (n * 4) / 10; + m = n - ((n*4)/10); while ((j - i) > m) { offset = off[(j + i) / 2]; if (off[j - 1] - offset < offset - off[i]) View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/compare/f928b8bd94e06dc0a9d10a9ef7dbe809d2e711a8...ab0120171c502b827215eaa2bb76fa95b8153d82 -- View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/compare/f928b8bd94e06dc0a9d10a9ef7dbe809d2e711a8...ab0120171c502b827215eaa2bb76fa95b8153d82 You're receiving this email because of your account on gitlab.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at mg.gitlab.com Tue Jan 21 01:09:03 2025 From: gitlab at mg.gitlab.com (Hal Murray (@hal.murray)) Date: Tue, 21 Jan 2025 01:09:03 +0000 Subject: [Git][NTPsec/ntpsec][master] Suppress Coverity 497295 (Bug in Coverity) Message-ID: <678ef3af2d083_2ec862c24814@gitlab-sidekiq-low-urgency-cpu-bound-v2-5d5d6444bc-f2clh.mail> Hal Murray pushed to branch master at NTPsec / ntpsec Commits: 0ac07c37 by Hal Murray at 2025-01-20T17:07:11-08:00 Suppress Coverity 497295 (Bug in Coverity) - - - - - 1 changed file: - ntpd/ntp_refclock.c Changes: ===================================== ntpd/ntp_refclock.c ===================================== @@ -470,6 +470,8 @@ refclock_sample( */ i = 0; j = n; m = n - ((n*4)/10); + /* coverity[INTEGER_OVERFLOW] CID 497295, + * Bug in Coverity: goes around loop when it shouldn't */ while ((j - i) > m) { offset = off[(j + i) / 2]; if (off[j - 1] - offset < offset - off[i]) View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/0ac07c37dede1bc1a0277c8ad1e45ceb1da90c21 -- View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/0ac07c37dede1bc1a0277c8ad1e45ceb1da90c21 You're receiving this email because of your account on gitlab.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at mg.gitlab.com Tue Jan 21 01:33:19 2025 From: gitlab at mg.gitlab.com (Hal Murray (@hal.murray)) Date: Tue, 21 Jan 2025 01:33:19 +0000 Subject: [Git][NTPsec/ntpsec][master] Coverity -- another try. Message-ID: <678ef95f6df5c_2ec85a078675@gitlab-sidekiq-low-urgency-cpu-bound-v2-5d5d6444bc-8kv9r.mail> Hal Murray pushed to branch master at NTPsec / ntpsec Commits: 7e8acce1 by Hal Murray at 2025-01-20T17:31:47-08:00 Coverity -- another try. Looks like you can't add anything to their supression comments. - - - - - 1 changed file: - ntpd/ntp_refclock.c Changes: ===================================== ntpd/ntp_refclock.c ===================================== @@ -470,8 +470,8 @@ refclock_sample( */ i = 0; j = n; m = n - ((n*4)/10); - /* coverity[INTEGER_OVERFLOW] CID 497295, - * Bug in Coverity: goes around loop when it shouldn't */ + /* CID 497295, Bug in Coverity: goes around loop when it shouldn't */ + /* coverity[INTEGER_OVERFLOW] */ while ((j - i) > m) { offset = off[(j + i) / 2]; if (off[j - 1] - offset < offset - off[i]) View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/7e8acce1f68cf07d62bff0731aa58de79273a1d3 -- View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/7e8acce1f68cf07d62bff0731aa58de79273a1d3 You're receiving this email because of your account on gitlab.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at mg.gitlab.com Fri Jan 24 01:30:10 2025 From: gitlab at mg.gitlab.com (Hal Murray (@hal.murray)) Date: Fri, 24 Jan 2025 01:30:10 +0000 Subject: [Git][NTPsec/ntpsec][master] Another Coverity try Message-ID: <6792ed22edec_2ec855043330@gitlab-sidekiq-low-urgency-cpu-bound-v2-6c85b4956b-mqcdj.mail> Hal Murray pushed to branch master at NTPsec / ntpsec Commits: 201618fc by Hal Murray at 2025-01-23T17:29:07-08:00 Another Coverity try - - - - - 1 changed file: - ntpd/ntp_refclock.c Changes: ===================================== ntpd/ntp_refclock.c ===================================== @@ -469,7 +469,7 @@ refclock_sample( * approximately 60 percent of the samples remain. */ i = 0; j = n; - m = n - ((n*4)/10); + m = n*6/10; /* CID 497295, Bug in Coverity: goes around loop when it shouldn't */ /* coverity[INTEGER_OVERFLOW] */ while ((j - i) > m) { View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/201618fce8e3ec7be2cc76a436551a580d655f28 -- View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/201618fce8e3ec7be2cc76a436551a580d655f28 You're receiving this email because of your account on gitlab.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at mg.gitlab.com Fri Jan 24 10:27:29 2025 From: gitlab at mg.gitlab.com (Hal Murray (@hal.murray)) Date: Fri, 24 Jan 2025 10:27:29 +0000 Subject: [Git][NTPsec/ntpsec][master] Undo previous Covarity attempt Message-ID: <67936b1110a73_2ec86b810799@gitlab-sidekiq-low-urgency-cpu-bound-v2-77d5cbb68b-klrjn.mail> Hal Murray pushed to branch master at NTPsec / ntpsec Commits: 9863dd93 by Hal Murray at 2025-01-24T02:25:44-08:00 Undo previous Covarity attempt Covarity found a real bug in the new code. It rounds down where we needed to round up. - - - - - 1 changed file: - ntpd/ntp_refclock.c Changes: ===================================== ntpd/ntp_refclock.c ===================================== @@ -469,7 +469,8 @@ refclock_sample( * approximately 60 percent of the samples remain. */ i = 0; j = n; - m = n*6/10; + /* m=n*6/10 doesn't work. It rounds down. We need up. */ + m = n-(n*4/10); /* CID 497295, Bug in Coverity: goes around loop when it shouldn't */ /* coverity[INTEGER_OVERFLOW] */ while ((j - i) > m) { View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/9863dd93c6e9ebce675282b0387300101101feba -- View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/9863dd93c6e9ebce675282b0387300101101feba You're receiving this email because of your account on gitlab.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at mg.gitlab.com Mon Jan 27 11:01:37 2025 From: gitlab at mg.gitlab.com (Hal Murray (@hal.murray)) Date: Mon, 27 Jan 2025 11:01:37 +0000 Subject: [Git][NTPsec/ntpsec][master] 3 commits: Fix TZ offset bug in ntpdig doc, #829 Message-ID: <67976791b74a_2ec8dd4434f5@gitlab-sidekiq-low-urgency-cpu-bound-v2-7884cbb8b6-fszsd.mail> Hal Murray pushed to branch master at NTPsec / ntpsec Commits: 6b9a5344 by Hal Murray at 2025-01-27T02:16:55-08:00 Fix TZ offset bug in ntpdig doc, #829 - - - - - 25f05581 by Hal Murray at 2025-01-27T02:25:15-08:00 Fix bug in parsedata doc, #824 - - - - - cb230d0a by James Browning at 2025-01-27T02:58:09-08:00 ntplogtemp: Record nvme temperatures on Asahi - - - - - 3 changed files: - docs/includes/ntpdig-body.adoc - docs/parsedata.adoc - ntpclients/ntplogtemp.py Changes: ===================================== docs/includes/ntpdig-body.adoc ===================================== @@ -25,8 +25,8 @@ not UTC) to the standard output in a format like: 2015-10-14 13:46:04.534916 (+0500) -0.000007 +/- 0.084075 localhost 127.0.0.1 s2 no-leap ----------------------------------------------------- -where the +(+0500)+ means that to get to UTC from the reported local -time one must add 5 hours and 0 minutes, the +-0.000007+ indicates the +where +(+0500)+ means that the reported local time is + 5 hours and 0 minutes ahead of UTC, the +-0.000007+ indicates the local clock is 0.000007 seconds ahead of correct time (so 0.000007 seconds must be subtracted from the local clock to get it to be correct). Note that the number of decimals printed for this value will change based on the ===================================== docs/parsedata.adoc ===================================== @@ -316,7 +316,7 @@ code (though not very precise!) delimited by '\r' ------------------------------------ Timecode - YY-MM-DD-HH-MM-SS-FF\r + YY-MM-DD-WW-HH-MM-SS-FF\r FF&0x1 - DST FF&0x2 - DST switch warning ===================================== ntpclients/ntplogtemp.py ===================================== @@ -130,6 +130,8 @@ class SmartCtl: # Which drive to watch for child in glob.glob('/dev/sd?'): self._drives.append(child) + for child in glob.glob('/dev/nvme?n?'): + self._drives.append(child) self._drives = sorted(self._drives) def get_data(self): @@ -150,6 +152,12 @@ class SmartCtl: now = int(time.time()) temp = line.split()[9] data.append('%d %s %s' % (now, _device, temp)) + break + if line.startswith('Temperature:'): + now = int(time.time()) + temp = line.split()[1] + data.append('%d %s %s' % (now, _device, temp)) + break return data View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/compare/9863dd93c6e9ebce675282b0387300101101feba...cb230d0a356933c4fd8b2209189aea4cd0aa01e9 -- View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/compare/9863dd93c6e9ebce675282b0387300101101feba...cb230d0a356933c4fd8b2209189aea4cd0aa01e9 You're receiving this email because of your account on gitlab.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at mg.gitlab.com Thu Jan 30 12:20:03 2025 From: gitlab at mg.gitlab.com (Hal Murray (@hal.murray)) Date: Thu, 30 Jan 2025 12:20:03 +0000 Subject: [Git][NTPsec/ntpsec][master] Make `waf bin_test` work with `--enable-pylib=none` Message-ID: <679b6e7397dac_2ec9428240eb@gitlab-sidekiq-low-urgency-cpu-bound-v2-6cdcbc5f79-sjbhk.mail> Hal Murray pushed to branch master at NTPsec / ntpsec Commits: e14856ba by James Browning at 2025-01-30T12:16:42+00:00 Make `waf bin_test` work with `--enable-pylib=none` - - - - - 3 changed files: - pylib/wscript - wafhelpers/bin_test.py - wscript Changes: ===================================== pylib/wscript ===================================== @@ -11,9 +11,11 @@ def options(opt): def configure(conf): conf.load('python') - if not conf.env.ENABLE_CROSS: - conf.check_python_version((2, 6, 0)) - conf.check_python_headers(features='pyext') # Extension-only, no embedded + if 'none' == conf.env['ntpc']: + return + conf.check_python_version((2, 6, 0)) # Check ver even in cross + if 'ext' == conf.env['ntpc']: # Extension-only, no embedded + conf.check_python_headers(features='pyext') try: conf.check_python_module('curses') conf.env['PYTHON_CURSES'] = True @@ -30,11 +32,14 @@ def configure(conf): conf.check_python_module('gps', condition="ver >= num(3, 18)") conf.env['PYTHON_GPS'] = True except conf.errors.ConfigurationError: - pprint("YELLOW", "WARNING: ntploggps will not be built/installed since " - "python gps module >= 3.18 was not found") + pprint("YELLOW", "WARNING: ntploggps will not be built/installed " + "since python gps module >= 3.18 was not found") def build(ctx): + if 'none' == ctx.env['ntpc']: + return + srcnode = ctx.srcnode.make_node('pylib') bldnode = ctx.bldnode.make_node('pylib') target1 = bldnode.make_node('control.py') @@ -56,13 +61,10 @@ def build(ctx): # including during 'install'. They are now disabled but retained as a # comment. - ## Remove generated files to ensure they are properly updated - #ctx.exec_command("rm -f %s" % target1.abspath()) - #ctx.exec_command("rm -f %s" % target2.abspath()) + # # Remove generated files to ensure they are properly updated + # ctx.exec_command("rm -f %s" % target1.abspath()) + # ctx.exec_command("rm -f %s" % target2.abspath()) - if ctx.env['ntpc'] is None: - return - # Make sure Python sees .py as well as .pyc/.pyo ctx( features="subst", @@ -74,7 +76,10 @@ def build(ctx): before=['pyc', 'pyo'], cwd=srcnode, rule='${PYTHON} ${SRC} >${TGT}', - source=["../wafhelpers/pythonize-header", "../include/ntp_control.h"], + source=[ + "../wafhelpers/pythonize-header", + "../include/ntp_control.h" + ], target=target1, ) ===================================== wafhelpers/bin_test.py ===================================== @@ -6,7 +6,6 @@ from __future__ import print_function import os import os.path -import sys import waflib.Context import waflib.Logs import waflib.Utils @@ -89,17 +88,8 @@ def cmd_bin_test(ctx): """Run a suite of binary tests.""" fails = 0 - cmd = ctx.env['PYTHON'] + ['-c', - 'from __future__ import print_function;' - 'import ntp.util;' - 'print(ntp.util.stdversion())'] - p = waflib.Utils.subprocess.Popen(cmd, env={'PYTHONPATH': '%s/main/tests/pylib' % - waflib.Context.out_dir}, - universal_newlines=True, - stdin=waflib.Utils.subprocess.PIPE, - stdout=waflib.Utils.subprocess.PIPE, - stderr=waflib.Utils.subprocess.PIPE, cwd=waflib.Context.out_dir) - version = p.communicate()[0].rstrip() + with open(str(ctx.bldnode) + "/VERSION.bld") as fp: + version = fp.read().strip() if ctx.env['PYTHON_ARGPARSE']: cmd_map_python.update(cmd_map_python_argparse) ===================================== wscript ===================================== @@ -4,12 +4,10 @@ from __future__ import print_function -from datetime import datetime import itertools import os import shlex import sys -import time from waflib import Build from waflib import Context @@ -138,7 +136,7 @@ def configure(ctx): # the real PATH first, but append the sbin directories. ctx.find_program( "ldconfig", var="BIN_LDCONFIG", mandatory=False, - path_list=(os.environ.get('PATH','').split(os.pathsep) + + path_list=(os.environ.get('PATH', '').split(os.pathsep) + ["/sbin", "/usr/sbin", "/usr/local/sbin"])) # Ensure m4 is present, or bison will fail with SIGPIPE @@ -515,17 +513,17 @@ int main(int argc, char **argv) { ctx.env.INCLUDES = ["/usr/local/include"] ctx.env.LIBPATH = ["/usr/local/lib"] if os.path.isdir("/usr/local/ssl/"): - # This assumes OpenSSL is the only thing that was in /usr/local/ - ctx.env.INCLUDES = ["/usr/local/ssl/include"] - ctx.env.LIBPATH = ["/usr/local/ssl/lib"] + # This assumes OpenSSL is the only thing that was in /usr/local/ + ctx.env.INCLUDES = ["/usr/local/ssl/include"] + ctx.env.LIBPATH = ["/usr/local/ssl/lib"] elif ctx.env.DEST_OS == "netbsd" and os.path.isdir("/usr/pkg/include"): ctx.env.INCLUDES = ["/usr/pkg/include"] ctx.env.LIBPATH = ["/usr/pkg/lib"] ctx.env.LDFLAGS += ["-rpath=/usr/pkg/lib"] if os.path.isdir("/usr/local/ssl/"): - # This assumes OpenSSL is the only thing that was in /usr/pkg/ - ctx.env.INCLUDES = ["/usr/local/ssl/include"] - ctx.env.LIBPATH = ["/usr/local/ssl/lib"] + # This assumes OpenSSL is the only thing that was in /usr/pkg/ + ctx.env.INCLUDES = ["/usr/local/ssl/include"] + ctx.env.LIBPATH = ["/usr/local/ssl/lib"] elif ctx.env.DEST_OS == "linux" and os.path.isdir("/usr/local/ssl/"): # This supports building OpenSSL from source # That allows using OpenSSL 1.1.1 on older CentOS @@ -533,9 +531,9 @@ int main(int argc, char **argv) { # see HOWTO-OpenSSL ctx.env.INCLUDES = ["/usr/local/ssl/include"] if os.path.isdir("/usr/local/ssl/lib64/"): - ctx.env.LIBPATH = ["/usr/local/ssl/lib64"] + ctx.env.LIBPATH = ["/usr/local/ssl/lib64"] else: - ctx.env.LIBPATH = ["/usr/local/ssl/lib"] + ctx.env.LIBPATH = ["/usr/local/ssl/lib"] elif ctx.env.DEST_OS == "darwin": # macports location if os.path.isdir("/opt/local/include"): @@ -668,8 +666,8 @@ int main(int argc, char **argv) { # We could add ifdefs, but old crypto is deprecated in favor of CMAC # and so far, all the systems that we want to support are new enough. ('CMAC_CTX_new', ["openssl/cmac.h"], "CRYPTO", True), - # Next should be above, but it needs a library - # EVP_PKEY_new_CMAC_key added in OpenSSL 1.1.1 + # Next should be above, but it needs a library + # EVP_PKEY_new_CMAC_key added in OpenSSL 1.1.1 ('EVP_PKEY_new_CMAC_key', ["openssl/cmac.h"], "CRYPTO", False)) for ft in required_functions: probe_function(ctx, function=ft[0], @@ -714,7 +712,7 @@ int main(int argc, char **argv) { "linux/serial.h", "net/if6.h", ("net/route.h", ["sys/types.h", "sys/socket.h", "net/if.h"]), - "openssl/opensslv.h", # just for wafhelper OpenSSL + "openssl/opensslv.h", # just for wafhelper OpenSSL "priv.h", # Solaris "stdatomic.h", "sys/clockctl.h", # NetBSD @@ -920,12 +918,13 @@ int main(int argc, char **argv) { ctx.recurse("pylib") ctx.env.PYSHEBANG = ctx.options.pyshebang msg_setting("PYSHEBANG", ctx.env.PYSHEBANG) - # Convert the Python directories to absolute paths. - # This makes them behave the same as PREFIX. - ctx.env.PYTHONDIR = os.path.abspath(ctx.env.PYTHONDIR) - ctx.env.PYTHONARCHDIR = os.path.abspath(ctx.env.PYTHONARCHDIR) - msg_setting("PYTHONDIR", ctx.env.PYTHONDIR) - msg_setting("PYTHONARCHDIR", ctx.env.PYTHONARCHDIR) + if 'none' != ctx.env['ntpc']: + # Convert the Python directories to absolute paths. + # This makes them behave the same as PREFIX. + ctx.env.PYTHONDIR = os.path.abspath(ctx.env.PYTHONDIR) + ctx.env.PYTHONARCHDIR = os.path.abspath(ctx.env.PYTHONARCHDIR) + msg_setting("PYTHONDIR", ctx.env.PYTHONDIR) + msg_setting("PYTHONARCHDIR", ctx.env.PYTHONARCHDIR) class check(BuildContext): @@ -1051,6 +1050,9 @@ def build(ctx): ctx.recurse("ntpd") return + with open(str(ctx.bldnode) + "/VERSION.bld", "w") as fp: + fp.write("ntpsec-" + ctx.env.NTPSEC_VERSION_EXTENDED) + if ctx.cmd == "build": # It's a waf gotcha that if there are object files (including # .pyc and .pyo files) in a source directory, compilation to @@ -1071,13 +1073,13 @@ def build(ctx): ctx.recurse("libparse") ctx.recurse("libntp") if not ctx.env.DISABLE_NTS: - ctx.recurse("libaes_siv") + ctx.recurse("libaes_siv") ctx.recurse("ntpd") ctx.recurse("ntpfrob") ctx.recurse("ntptime") ctx.recurse("pylib") if ctx.env.ENABLE_ATTIC: - ctx.recurse("attic") + ctx.recurse("attic") ctx.recurse("etc") ctx.recurse("tests") @@ -1089,14 +1091,16 @@ def build(ctx): if ctx.env['PYTHON_CURSES']: python_scripts.add("ntpclients/ntpmon.py") - # Make sure the python scripts compile, but don't install them - ctx( - features="py", - source=python_scripts, - install_path=None, - ) + scripts = ["ntpclients/ntpleapfetch"] - scripts = ["ntpclients/ntpleapfetch"] + list(python_scripts) + if 'none' != ctx.env['ntpc']: + scripts += list(python_scripts) + # Make sure the python scripts compile, but don't install them + ctx( + features="py", + source=python_scripts, + install_path=None, + ) ctx( features="subst", View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/e14856ba72d6cba74aea40bf2fcb61fc76e749c3 -- View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/e14856ba72d6cba74aea40bf2fcb61fc76e749c3 You're receiving this email because of your account on gitlab.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at mg.gitlab.com Thu Jan 30 12:48:57 2025 From: gitlab at mg.gitlab.com (Hal Murray (@hal.murray)) Date: Thu, 30 Jan 2025 12:48:57 +0000 Subject: [Git][NTPsec/ntpsec][master] 2 commits: .dockerfiles: Rearrange dependencies Message-ID: <679b753990603_2ec943c839bc@gitlab-sidekiq-low-urgency-cpu-bound-v2-6cdcbc5f79-lzp5d.mail> Hal Murray pushed to branch master at NTPsec / ntpsec Commits: 05746a36 by James Browning at 2025-01-30T12:45:02+00:00 .dockerfiles: Rearrange dependencies - - - - - df2fbec6 by James Browning at 2025-01-30T12:45:02+00:00 ntpsec: Fail louder except for four instances - Alpine edge - Debian cross ARMhf - Debian unstable - Ubuntu devel - - - - - 24 changed files: - .dockerfiles/alpine - .dockerfiles/alpine-edge - .dockerfiles/alpine-pages - .dockerfiles/alpine-seccomp - .dockerfiles/centos-latest - .dockerfiles/clang - .dockerfiles/coverity - .dockerfiles/cross-armhf - .dockerfiles/debian-oldstable - .dockerfiles/debian-stable - .dockerfiles/debian-stable-i386 - .dockerfiles/debian-stable-mdns - .dockerfiles/debian-testing - .dockerfiles/debian-unstable - .dockerfiles/fedora-latest - .dockerfiles/gentoo - .dockerfiles/opensuse-leap - .dockerfiles/python2 - .dockerfiles/python3 - .dockerfiles/ubuntu-latest - .dockerfiles/ubuntu-rolling - .gitlab-ci.yml - .gitlab-docker-ci.yml - .gitlab-opttest-ci.yml Changes: ===================================== .dockerfiles/alpine ===================================== @@ -5,4 +5,11 @@ FROM alpine RUN apk update -RUN apk add gcc bison musl-dev openssl-dev libcap-dev python3-dev libbsd +RUN apk add \ + bison \ + gcc \ + libbsd \ + libcap-dev \ + musl-dev \ + openssl-dev \ + python3-dev ===================================== .dockerfiles/alpine-edge ===================================== @@ -5,4 +5,11 @@ FROM alpine:edge RUN apk update -RUN apk add gcc bison musl-dev openssl-dev libcap-dev python3-dev libbsd +RUN apk add \ + bison \ + gcc \ + libbsd \ + libcap-dev \ + musl-dev \ + openssl-dev \ + python3-dev ===================================== .dockerfiles/alpine-pages ===================================== @@ -5,4 +5,14 @@ FROM alpine RUN apk update -RUN apk add gcc bison musl-dev openssl-dev libcap-dev python3-dev libbsd asciidoctor findutils gzip +RUN apk add \ + asciidoctor \ + bison \ + findutils \ + gcc \ + gzip \ + libbsd \ + libcap-dev \ + musl-dev \ + openssl-dev \ + python3-dev ===================================== .dockerfiles/alpine-seccomp ===================================== @@ -5,4 +5,12 @@ FROM alpine RUN apk update -RUN apk add gcc bison musl-dev openssl-dev libcap-dev python3-dev libbsd libseccomp-dev +RUN apk add \ + bison \ + gcc \ + libbsd \ + libcap-dev \ + libseccomp-dev \ + musl-dev \ + openssl-dev \ + python3-dev ===================================== .dockerfiles/centos-latest ===================================== @@ -7,4 +7,11 @@ FROM quay.io/centos/centos:stream9 RUN dnf -y install dnf-plugins-core RUN dnf config-manager --set-enabled crb RUN dnf -y install epel-release -RUN dnf -y install bison gcc openssl-devel libcap-devel python3-devel pps-tools-devel libbsd-devel +RUN dnf -y install \ + bison \ + gcc \ + libbsd-devel \ + libcap-devel \ + openssl-devel \ + python3-devel \ + pps-tools-devel ===================================== .dockerfiles/clang ===================================== @@ -5,4 +5,12 @@ FROM debian:testing-slim RUN apt-get update -RUN apt-get install -y netbase bison libssl-dev libcap-dev pps-tools python3-dev libbsd-dev clang +RUN apt-get install -y \ + bison \ + clang \ + libbsd-dev \ + libcap-dev \ + libssl-dev \ + netbase \ + pps-tools \ + python3-dev ===================================== .dockerfiles/coverity ===================================== @@ -7,4 +7,14 @@ FROM debian:stable-slim RUN apt-get update -RUN apt-get install -y netbase bison gcc libssl-dev libcap-dev pps-tools python3-dev libbsd-dev curl git +RUN apt-get install -y \ + bison \ + curl \ + gcc \ + git \ + libbsd-dev \ + libcap-dev \ + libssl-dev \ + netbase \ + pps-tools \ + python3-dev ===================================== .dockerfiles/cross-armhf ===================================== @@ -6,5 +6,15 @@ FROM debian:testing RUN dpkg --add-architecture armhf RUN apt-get update -RUN DEBIAN_FRONTEND="noninteractive" apt-get install -y bison gcc gcc-arm-linux-gnueabihf git make netbase pps-tools python-is-python3 wget -RUN DEBIAN_FRONTEND="noninteractive" apt-get install -y libssl-dev:armhf libpython3-dev:armhf +RUN DEBIAN_FRONTEND="noninteractive" apt-get install -y \ + bison \ + gcc \ + gcc-arm-linux-gnueabihf \ + git \ + libpython3-dev:armhf \ + libssl-dev:armhf \ + make \ + netbase \ + pps-tools \ + python-is-python3 \ + wget ===================================== .dockerfiles/debian-oldstable ===================================== @@ -5,4 +5,12 @@ FROM debian:oldstable-slim RUN apt-get update -RUN apt-get install -y netbase bison gcc libssl-dev libcap-dev pps-tools python3-dev libbsd-dev +RUN apt-get install -y \ + bison \ + gcc \ + libbsd-dev \ + libcap-dev \ + libssl-dev \ + netbase \ + pps-tools \ + python3-dev ===================================== .dockerfiles/debian-stable ===================================== @@ -5,4 +5,12 @@ FROM debian:stable-slim RUN apt-get update -RUN apt-get install -y netbase bison gcc libssl-dev libcap-dev pps-tools python3-dev libbsd-dev +RUN apt-get install -y \ + bison \ + gcc \ + libbsd-dev \ + libcap-dev \ + libssl-dev \ + netbase \ + pps-tools \ + python3-dev ===================================== .dockerfiles/debian-stable-i386 ===================================== @@ -5,4 +5,12 @@ FROM i386/debian:stable-slim RUN apt-get update -RUN apt-get install -y netbase bison gcc libssl-dev libcap-dev pps-tools python3-dev libbsd-dev +RUN apt-get install -y \ + bison \ + gcc \ + libbsd-dev \ + libcap-dev \ + libssl-dev \ + netbase \ + pps-tools \ + python3-dev ===================================== .dockerfiles/debian-stable-mdns ===================================== @@ -5,4 +5,13 @@ FROM debian:stable-slim RUN apt-get update -RUN apt-get install -y netbase bison gcc libssl-dev libcap-dev pps-tools python3-dev libbsd-dev libavahi-compat-libdnssd-dev +RUN apt-get install -y \ + bison \ + gcc \ + libavahi-compat-libdnssd-dev \ + libbsd-dev \ + libcap-dev \ + libssl-dev \ + netbase \ + pps-tools \ + python3-dev ===================================== .dockerfiles/debian-testing ===================================== @@ -5,4 +5,12 @@ FROM debian:testing-slim RUN apt-get update -RUN apt-get install -y netbase bison gcc libssl-dev libcap-dev pps-tools python3-dev libbsd-dev +RUN apt-get install -y \ + bison \ + gcc \ + libbsd-dev \ + libcap-dev \ + libssl-dev \ + netbase \ + pps-tools \ + python3-dev ===================================== .dockerfiles/debian-unstable ===================================== @@ -5,4 +5,13 @@ FROM debian:unstable-slim RUN apt-get update -RUN apt-get install -y netbase bison gcc libssl-dev libcap-dev pps-tools python3-dev libbsd-dev gpsd +RUN apt-get install -y \ + bison \ + gcc \ + gpsd \ + libbsd-dev \ + libcap-dev \ + libssl-dev \ + netbase \ + pps-tools \ + python3-dev ===================================== .dockerfiles/fedora-latest ===================================== @@ -4,4 +4,11 @@ FROM fedora:latest -RUN dnf -y install bison gcc openssl-devel libcap-devel pps-tools-devel python3-devel libbsd-devel +RUN dnf -y install \ + bison \ + gcc \ + libbsd-devel \ + libcap-devel \ + openssl-devel \ + pps-tools-devel \ + python3-devel ===================================== .dockerfiles/gentoo ===================================== @@ -8,4 +8,7 @@ FROM gentoo/stage3 COPY --from=portage /var/db/repos/gentoo /var/db/repos/gentoo -RUN emerge -q y sys-libs/libcap sys-devel/bison net-misc/pps-tools +RUN emerge -q y \ + net-misc/pps-tools \ + sys-devel/bison \ + sys-libs/libcap ===================================== .dockerfiles/opensuse-leap ===================================== @@ -4,4 +4,12 @@ FROM opensuse/leap -RUN zypper -n install bison gcc libopenssl-devel libcap-devel pps-tools-devel python3-devel python3-curses libbsd-devel +RUN zypper -n install \ + bison \ + gcc \ + libbsd-devel \ + libcap-devel \ + libopenssl-devel \ + pps-tools-devel \ + python3-curses \ + python3-devel ===================================== .dockerfiles/python2 ===================================== @@ -5,4 +5,11 @@ FROM python:2-slim RUN apt-get update -qq -RUN apt-get install -y -qq netbase bison gcc libssl-dev libcap-dev pps-tools libbsd-dev +RUN apt-get install -y -qq \ + bison \ + gcc \ + libbsd-dev \ + libcap-dev \ + libssl-dev \ + netbase \ + pps-tools ===================================== .dockerfiles/python3 ===================================== @@ -5,4 +5,11 @@ FROM python:3-slim RUN apt-get update -qq -RUN apt-get install -y -qq netbase bison gcc libssl-dev libcap-dev pps-tools libbsd-dev +RUN apt-get install -y -qq \ + bison \ + gcc \ + libbsd-dev \ + libcap-dev \ + libssl-dev \ + netbase \ + pps-tools ===================================== .dockerfiles/ubuntu-latest ===================================== @@ -5,4 +5,12 @@ FROM ubuntu:latest RUN apt-get update -RUN apt-get install -y netbase bison gcc libssl-dev libcap-dev pps-tools python3-dev libbsd-dev +RUN apt-get install -y \ + bison \ + gcc \ + libbsd-dev \ + libcap-dev \ + libssl-dev \ + netbase \ + pps-tools \ + python3-dev ===================================== .dockerfiles/ubuntu-rolling ===================================== @@ -5,4 +5,12 @@ FROM ubuntu:rolling RUN apt-get update -RUN apt-get install -y netbase bison gcc libssl-dev libcap-dev pps-tools python3-dev libbsd-dev +RUN apt-get install -y \ + bison \ + gcc \ + libbsd-dev \ + libcap-dev \ + libssl-dev \ + netbase \ + pps-tools \ + python3-dev ===================================== .gitlab-ci.yml ===================================== @@ -9,7 +9,6 @@ pages: - mv public/latest/404.html public/404.html - sed -i -E -e 's!\./(asciidoc\.(js|css))!\./latest/\1!g' public/404.html - find public -type f -iregex '.*\.\(htm\|html\|txt\|text\|js\|css\)$' -execdir gzip -f --keep {} \; - allow_failure: true artifacts: paths: - public @@ -29,10 +28,6 @@ include: tags: - gitlab-org -.job_template_allow_failure: &job_definition_allow_failure - <<: *job_definition - allow_failure: true - alpine-basic: <<: *job_definition image: $CI_REGISTRY/ntpsec/ntpsec/alpine @@ -48,7 +43,8 @@ alpine-refclocks: - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build alpine-edge-basic: - <<: *job_definition_allow_failure + allow_failure: true + <<: *job_definition image: $CI_REGISTRY/ntpsec/ntpsec/alpine-edge script: - python3 ./waf configure --disable-doc --disable-manpage build --pyshebang "/usr/bin/env python3" @@ -56,13 +52,14 @@ alpine-edge-basic: - python3 ./waf uninstall alpine-edge-refclocks: - <<: *job_definition_allow_failure + allow_failure: true + <<: *job_definition image: $CI_REGISTRY/ntpsec/ntpsec/alpine-edge script: - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build AsciiDoc-3-Fedora: - <<: *job_definition_allow_failure + <<: *job_definition image: fedora script: - yum -y install bison gcc openssl-devel libcap-devel pps-tools-devel python3-devel wget libxslt docbook-style-xsl @@ -147,7 +144,8 @@ debian-testing-refclocks: - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build debian-unstable-basic: - <<: *job_definition_allow_failure + allow_failure: true + <<: *job_definition image: $CI_REGISTRY/ntpsec/ntpsec/debian-unstable script: - python3 ./waf configure --disable-doc --disable-manpage build --pyshebang "/usr/bin/env python3" @@ -155,7 +153,8 @@ debian-unstable-basic: - python3 ./waf uninstall debian-unstable-refclocks: - <<: *job_definition_allow_failure + allow_failure: true + <<: *job_definition image: $CI_REGISTRY/ntpsec/ntpsec/debian-unstable script: - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build @@ -175,7 +174,8 @@ ubuntu-latest-refclocks: - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build ubuntu-devel-basic: - <<: *job_definition_allow_failure + <<: *job_definition + allow_failure: true image: $CI_REGISTRY/ntpsec/ntpsec/ubuntu-devel script: - python3 ./waf configure --disable-doc --disable-manpage build --pyshebang "/usr/bin/env python3" @@ -183,7 +183,8 @@ ubuntu-devel-basic: - python3 ./waf uninstall ubuntu-devel-refclocks: - <<: *job_definition_allow_failure + <<: *job_definition + allow_failure: true image: $CI_REGISTRY/ntpsec/ntpsec/ubuntu-devel script: - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build @@ -253,7 +254,7 @@ fedora-latest-refclocks: - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build python3: - <<: *job_definition_allow_failure + <<: *job_definition image: $CI_REGISTRY/ntpsec/ntpsec/python3 script: - python ./waf configure --disable-doc --disable-manpage --refclock=all build @@ -319,7 +320,8 @@ debian-stable-mDNS-refclocks: - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build cross-armhf-build: - <<: *job_definition_allow_failure + allow_failure: true + <<: *job_definition image: $CI_REGISTRY/ntpsec/ntpsec/cross-armhf script: - pyver=$(python3 -c 'import sys;print(f"{sys.version_info.major}.{sys.version_info.minor}")') ===================================== .gitlab-docker-ci.yml ===================================== @@ -18,7 +18,6 @@ --tag $CI_REGISTRY_IMAGE/$IMAGE_NAME:latest . --file .dockerfiles/$IMAGE_NAME - docker push $CI_REGISTRY_IMAGE/$IMAGE_NAME:latest - allow_failure: true rules: - if: '$CI_PIPELINE_SOURCE == "schedule"' @@ -26,6 +25,7 @@ build-alpine: <<: *build_definition build-alpine-edge: + allow_failure: true <<: *build_definition build-alpine-pages: @@ -59,6 +59,7 @@ build-debian-testing: <<: *build_definition build-debian-unstable: + allow_failure: true <<: *build_definition build-fedora-latest: @@ -83,4 +84,5 @@ build-ubuntu-rolling: <<: *build_definition build-cross-armhf: + allow_failure: true <<: *build_definition ===================================== .gitlab-opttest-ci.yml ===================================== @@ -23,6 +23,7 @@ make-tarball: - if: '$CI_PIPELINE_SOURCE == "schedule"' alpine-edge-options-tester: + allow_failure: true <<: *option_tester_py3_only image: alpine:edge before_script: @@ -49,7 +50,6 @@ fedora-latest-options-tester: opensuse-leap-options-tester: <<: *option_tester_py3_only image: opensuse/leap - allow_failure: true before_script: - zypper -n install bison gcc libopenssl-devel libcap-devel pps-tools-devel libseccomp-devel python3-devel python3-curses pkg-config bash @@ -125,6 +125,7 @@ debian-testing-options-tester: <<: *deb_option_tester_py3_only debian-unstable-options-tester: + allow_failure: true image: debian:unstable-slim <<: *deb_option_tester_py3_only @@ -133,6 +134,7 @@ ubuntu-latest-options-tester: <<: *deb_option_tester_py3_only ubuntu-devel-options-tester: + allow_failure: true image: ubuntu:devel <<: *deb_option_tester_py3_only View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/compare/e14856ba72d6cba74aea40bf2fcb61fc76e749c3...df2fbec601e3c710f83025b23479b23580dd806e -- View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/compare/e14856ba72d6cba74aea40bf2fcb61fc76e749c3...df2fbec601e3c710f83025b23479b23580dd806e You're receiving this email because of your account on gitlab.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at mg.gitlab.com Thu Jan 30 12:54:31 2025 From: gitlab at mg.gitlab.com (Hal Murray (@hal.murray)) Date: Thu, 30 Jan 2025 12:54:31 +0000 Subject: [Git][NTPsec/ntpsec][master] Fix Out-of-bounds read in nts_client_process_response_core Message-ID: <679b7687b702_2ec93b04332@gitlab-sidekiq-low-urgency-cpu-bound-v2-6cdcbc5f79-z82jd.mail> Hal Murray pushed to branch master at NTPsec / ntpsec Commits: caf0eb5d by Artem Nasonov at 2025-01-30T12:50:25+00:00 Fix Out-of-bounds read in nts_client_process_response_core - - - - - 1 changed file: - ntpd/nts_client.c Changes: ===================================== ntpd/nts_client.c ===================================== @@ -626,6 +626,10 @@ bool nts_client_process_response_core(uint8_t *buff, int transferred, struct pee char server[MAX_SERVER]; type = ke_next_record(&buf, &length); + if(buf.left < length){ + msyslog(LOG_ERR, "NTSc: length cannot be more than buf.left: %d", length); + return false; + } if (NTS_CRITICAL & type) { critical = true; type &= ~NTS_CRITICAL; @@ -634,25 +638,30 @@ bool nts_client_process_response_core(uint8_t *buff, int transferred, struct pee msyslog(LOG_ERR, "NTSc: Record: T=%d, L=%d, C=%d", type, length, critical); switch (type) { case nts_error: - data = next_uint16(&buf); - if (sizeof(data) != length) + if (sizeof(data) != length) { msyslog(LOG_ERR, "NTSc: wrong length on error: %d", length); + return false; + } + data = next_uint16(&buf); msyslog(LOG_ERR, "NTSc: error: %d", data); return false; case nts_next_protocol_negotiation: + if (sizeof(data) != length) { + msyslog(LOG_ERR, "NTSc: NPN-Wrong length: %d", length); + return false; + } data = next_uint16(&buf); - if ((sizeof(data) != length) || (data != nts_protocol_NTP)) { - msyslog(LOG_ERR, "NTSc: NPN-Wrong length or bad data: %d, %d", - length, data); + if (data != nts_protocol_NTP) { + msyslog(LOG_ERR, "NTSc: NPN-Bad data: %d", data); return false; } break; case nts_algorithm_negotiation: - data = next_uint16(&buf); if (sizeof(data) != length) { msyslog(LOG_ERR, "NTSc: AN-Wrong length: %d", length); return false; } + data = next_uint16(&buf); keylength = nts_get_key_length(data); if (0 == keylength) { msyslog(LOG_ERR, "NTSc: AN-Unsupported AEAN type: %d", data); View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/caf0eb5df3c6ddbfc2941389bff0f9146835c021 -- View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/caf0eb5df3c6ddbfc2941389bff0f9146835c021 You're receiving this email because of your account on gitlab.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at mg.gitlab.com Thu Jan 30 21:43:56 2025 From: gitlab at mg.gitlab.com (Hal Murray (@hal.murray)) Date: Thu, 30 Jan 2025 21:43:56 +0000 Subject: [Git][NTPsec/ntpsec][master] Fix(#793): "./waf bin_test" results in a Python error Message-ID: <679bf29ca287d_2ec939c318d0@gitlab-sidekiq-low-urgency-cpu-bound-v2-dfb66984c-g2qcv.mail> Hal Murray pushed to branch master at NTPsec / ntpsec Commits: dc69f9e6 by James Browning at 2025-01-30T21:40:18+00:00 Fix(#793): "./waf bin_test" results in a Python error - - - - - 1 changed file: - wscript Changes: ===================================== wscript ===================================== @@ -932,16 +932,10 @@ class check(BuildContext): variant = "main" -def bin_test(ctx): +class bin_test(BuildContext): """Run binary check, use after tests.""" - from wafhelpers.bin_test import cmd_bin_test - cmd_bin_test(ctx) - - -def bin_test_summary(ctx): - """Display results of binary check, use after tests.""" - from wafhelpers.bin_test import bin_test_summary - bin_test_summary(ctx) + cmd = 'bin_test' + variant = "main" variant_cmd = ( @@ -1133,6 +1127,7 @@ def build(ctx): # Skip running unit tests on a cross compile build from waflib import Options if not ctx.env.ENABLE_CROSS: + from wafhelpers.bin_test import cmd_bin_test, bin_test_summary # Force re-running of tests. Same as 'waf --alltests' if ctx.cmd == "check": ctx.options.all_tests = True @@ -1144,7 +1139,7 @@ def build(ctx): return # Test binaries - ctx.add_post_fun(bin_test) + ctx.add_post_fun(cmd_bin_test) # Write test log to a file ctx.add_post_fun(test_write_log) View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/dc69f9e6c5a2583036b793bd93939f9cd3bdf665 -- View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/dc69f9e6c5a2583036b793bd93939f9cd3bdf665 You're receiving this email because of your account on gitlab.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: