[Git][NTPsec/ntpsec][master] NTPS_* -> NTPSEC_*
Eric S. Raymond
gitlab at mg.gitlab.com
Mon Sep 26 18:59:45 UTC 2016
Eric S. Raymond pushed to branch master at NTPsec / ntpsec
Commits:
46a36a76 by Eric S. Raymond at 2016-09-26T14:59:15-04:00
NTPS_* -> NTPSEC_*
- - - - -
7 changed files:
- ntpd/wscript
- ntptime/ntptime.c
- wafhelpers/configure.py
- wafhelpers/dist.py
- wafhelpers/util.py
- wafhelpers/waf.py
- wscript
Changes:
=====================================
ntpd/wscript
=====================================
--- a/ntpd/wscript
+++ b/ntpd/wscript
@@ -5,7 +5,7 @@ def build(ctx):
if ctx.variant == "host":
- if not ctx.env.NTPS_RELEASE:
+ if not ctx.env.NTPSEC_RELEASE:
bison_source = [
"ntp_parser.y"
]
@@ -111,7 +111,7 @@ def build(ctx):
"ntp_signd.c",
"ntp_timer.c",
"ntpd.c",
- ctx.bldnode.parent.find_node("host/ntpd/ntp_parser.tab.c") if not ctx.env.NTPS_RELEASE else "ntp_parser.tab.c"
+ ctx.bldnode.parent.find_node("host/ntpd/ntp_parser.tab.c") if not ctx.env.NTPSEC_RELEASE else "ntp_parser.tab.c"
]
# XXX: This really sucks, we need to get rid of all these refclock
=====================================
ntptime/ntptime.c
=====================================
--- a/ntptime/ntptime.c
+++ b/ntptime/ntptime.c
@@ -420,7 +420,7 @@ main(
}
if (json)
/* hack to avoid trailing comma - not semabtically needed */
- fputs("\"version\":\"" NTPS_VERSION_STRING "\"}\n", stdout);
+ fputs("\"version\":\"" NTPSEC_VERSION_STRING "\"}\n", stdout);
exit(EXIT_SUCCESS);
}
=====================================
wafhelpers/configure.py
=====================================
--- a/wafhelpers/configure.py
+++ b/wafhelpers/configure.py
@@ -14,15 +14,15 @@ def cmd_configure(ctx, config):
from wafhelpers.util import parse_version
parse_version(config)
- ctx.env.NTPS_RELEASE = config["NTPS_RELEASE"]
- ctx.env.NTPS_VERSION_MAJOR = config["NTPS_VERSION_MAJOR"]
- ctx.env.NTPS_VERSION_MINOR = config["NTPS_VERSION_MINOR"]
- ctx.env.NTPS_VERSION_REV = config["NTPS_VERSION_REV"]
+ ctx.env.NTPSEC_RELEASE = config["NTPSEC_RELEASE"]
+ ctx.env.NTPSEC_VERSION_MAJOR = config["NTPSEC_VERSION_MAJOR"]
+ ctx.env.NTPSEC_VERSION_MINOR = config["NTPSEC_VERSION_MINOR"]
+ ctx.env.NTPSEC_VERSION_REV = config["NTPSEC_VERSION_REV"]
- ctx.env.NTPS_VERSION = "%s.%s.%s" % (ctx.env.NTPS_VERSION_MAJOR, ctx.env.NTPS_VERSION_MINOR, ctx.env.NTPS_VERSION_REV)
- ctx.define("NTPS_VERSION_MAJOR", ctx.env.NTPS_VERSION_MAJOR, comment="Major version number")
- ctx.define("NTPS_VERSION_MINOR", ctx.env.NTPS_VERSION_MINOR, comment="Minor version number")
- ctx.define("NTPS_VERSION_REV", ctx.env.NTPS_VERSION_REV, comment="Revision version number")
+ ctx.env.NTPSEC_VERSION = "%s.%s.%s" % (ctx.env.NTPSEC_VERSION_MAJOR, ctx.env.NTPSEC_VERSION_MINOR, ctx.env.NTPSEC_VERSION_REV)
+ ctx.define("NTPSEC_VERSION_MAJOR", ctx.env.NTPSEC_VERSION_MAJOR, comment="Major version number")
+ ctx.define("NTPSEC_VERSION_MINOR", ctx.env.NTPSEC_VERSION_MINOR, comment="Minor version number")
+ ctx.define("NTPSEC_VERSION_REV", ctx.env.NTPSEC_VERSION_REV, comment="Revision version number")
ctx.env.OPT_STORE = config["OPT_STORE"]
@@ -48,7 +48,7 @@ def cmd_configure(ctx, config):
ctx.load('compiler_c')
- if not ctx.env.NTPS_RELEASE:
+ if not ctx.env.NTPSEC_RELEASE:
ctx.load('bison')
for opt in opt_map:
@@ -104,21 +104,21 @@ def cmd_configure(ctx, config):
ctx.start_msg("DEVEL: Getting revision")
cmd = ["git", "log", "-1", "--format=%H"]
p = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=None)
- ctx.env.NTPS_REVISION, stderr = p.communicate()
- ctx.env.NTPS_REVISION = str(ctx.env.NTPS_REVISION).replace("\n", "")
- ctx.end_msg(ctx.env.NTPS_REVISION)
+ ctx.env.NTPSEC_REVISION, stderr = p.communicate()
+ ctx.env.NTPSEC_REVISION = str(ctx.env.NTPSEC_REVISION).replace("\n", "")
+ ctx.end_msg(ctx.env.NTPSEC_REVISION)
ctx.start_msg("Building version")
- ctx.env.NTPS_VERSION_STRING = ctx.env.NTPS_VERSION
+ ctx.env.NTPSEC_VERSION_STRING = ctx.env.NTPSEC_VERSION
- if ctx.env.NTPS_REVISION:
- ctx.env.NTPS_VERSION_STRING += "-%s" % ctx.env.NTPS_REVISION[:7]
+ if ctx.env.NTPSEC_REVISION:
+ ctx.env.NTPSEC_VERSION_STRING += "-%s" % ctx.env.NTPSEC_REVISION[:7]
if ctx.options.build_version_tag:
- ctx.env.NTPS_VERSION_STRING += "-%s" % ctx.options.build_version_tag
+ ctx.env.NTPSEC_VERSION_STRING += "-%s" % ctx.options.build_version_tag
- ctx.define("NTPS_VERSION_STRING", ctx.env.NTPS_VERSION_STRING)
- ctx.end_msg(ctx.env.NTPS_VERSION_STRING)
+ ctx.define("NTPSEC_VERSION_STRING", ctx.env.NTPSEC_VERSION_STRING)
+ ctx.end_msg(ctx.env.NTPSEC_VERSION_STRING)
msg("--- Configuring main ---")
ctx.setenv("main", ctx.env.derive())
@@ -458,8 +458,8 @@ def cmd_configure(ctx, config):
check_vsprintfm(ctx)
# Define CFLAGS/LDCFLAGS for -vv support.
- ctx.define("NTPS_CFLAGS", " ".join(ctx.env.CFLAGS).replace("\"", "\\\""), comment="CFLAGS used when compiled")
- ctx.define("NTPS_LDFLAGS", " ".join(ctx.env.LDFLAGS).replace("\"", "\\\""), comment="LDFLAGS used when compiled")
+ ctx.define("NTPSEC_CFLAGS", " ".join(ctx.env.CFLAGS).replace("\"", "\\\""), comment="CFLAGS used when compiled")
+ ctx.define("NTPSEC_LDFLAGS", " ".join(ctx.env.LDFLAGS).replace("\"", "\\\""), comment="LDFLAGS used when compiled")
# Check for directory separator
if ctx.env.PLATFORM_TARGET == "win":
=====================================
wafhelpers/dist.py
=====================================
--- a/wafhelpers/dist.py
+++ b/wafhelpers/dist.py
@@ -9,11 +9,11 @@ def dist_cmd(ctx, config):
parse_version(config)
- if not ctx.options.build_snapshot and not config["NTPS_RELEASE"]:
- ctx.fatal('Please supply --build-snapshot or set config["NTPS_RELEASE"] = True')
+ if not ctx.options.build_snapshot and not config["NTPSEC_RELEASE"]:
+ ctx.fatal('Please supply --build-snapshot or set config["NTPSEC_RELEASE"] = True')
- if not config["NTPS_RELEASE"]:
- ctx.fatal('config["NTPS_RELEASE"] must be set to True')
+ if not config["NTPSEC_RELEASE"]:
+ ctx.fatal('config["NTPSEC_RELEASE"] must be set to True')
if exists("build/c4che/host_cache.py"):
from waflib.ConfigSet import ConfigSet
@@ -22,7 +22,7 @@ def dist_cmd(ctx, config):
else:
ctx.fatal("Please run 'waf configure' first.")
- rev = cset.NTPS_REVISION[:7]
+ rev = cset.NTPSEC_REVISION[:7]
timestamp = time.strftime("%Y-%m-%d_%H%M%S")
# XXX: Redo to not use globs.
@@ -32,7 +32,7 @@ def dist_cmd(ctx, config):
# Need a more reliable check.
if not files_man:
- ctx.fatal("You must configure and build first with NTPS_RELEASE set to false")
+ ctx.fatal("You must configure and build first with NTPSEC_RELEASE set to false")
for man in files_man:
src = man.abspath()
@@ -47,13 +47,13 @@ def dist_cmd(ctx, config):
for src, dst in files:
if not path.exists(src):
- ctx.fatal("%s doesn't exist please configure and build first. NTPS_RELEASE must be set to False" % src)
+ ctx.fatal("%s doesn't exist please configure and build first. NTPSEC_RELEASE must be set to False" % src)
print("Copying %s -> %s" % (src, dst))
copyfile(src, dst)
- version = "%d.%d.%d" % (config["NTPS_VERSION_MAJOR"], \
- config["NTPS_VERSION_MINOR"], \
- config["NTPS_VERSION_REV"])
+ version = "%d.%d.%d" % (config["NTPSEC_VERSION_MAJOR"], \
+ config["NTPSEC_VERSION_MINOR"], \
+ config["NTPSEC_VERSION_REV"])
if ctx.options.build_snapshot:
ctx.base_name = "ntpsec-%s-%s-%s-snap" % (timestamp, version, rev)
=====================================
wafhelpers/util.py
=====================================
--- a/wafhelpers/util.py
+++ b/wafhelpers/util.py
@@ -47,9 +47,9 @@ def parse_version(config):
[major, minor, rev] = version_string.split(".")
map = {
# "NTPS" for NTPSec -- this avoids any naming collisions
- "NTPS_VERSION_MAJOR" : int(major),
- "NTPS_VERSION_MINOR" : int(minor),
- "NTPS_VERSION_REV" : int(rev)
+ "NTPSEC_VERSION_MAJOR" : int(major),
+ "NTPSEC_VERSION_MINOR" : int(minor),
+ "NTPSEC_VERSION_REV" : int(rev)
}
config.update(map)
=====================================
wafhelpers/waf.py
=====================================
--- a/wafhelpers/waf.py
+++ b/wafhelpers/waf.py
@@ -32,13 +32,13 @@ def insert_libiscpthreaddir(self):
# Create version.c
class version(Task):
- vars = ['NTPS_VERSION_STRING', 'TARGET']
+ vars = ['NTPSEC_VERSION_STRING', 'TARGET']
def run(self):
self.outputs[0].write("""
const char *Version = "%s " __DATE__ " " __TIME__;
const char *VVersion = "CFLAGS=%s LDFLAGS=%s";
-""" % (self.env.NTPS_VERSION_STRING, "Need-CFLAGS", "Need-LDFLAGS"))
+""" % (self.env.NTPSEC_VERSION_STRING, "Need-CFLAGS", "Need-LDFLAGS"))
# Use in features= to generate a version.c for that target.
# This uses the target name for the version string.
@@ -57,7 +57,7 @@ def manpage_subst_fun(task, text):
@conf
def manpage(ctx, section, source):
- if ctx.env.NTPS_RELEASE:
+ if ctx.env.NTPSEC_RELEASE:
ctx.install_files("${PREFIX}/man/man%s/" % section, source.replace("-man.txt", ".%s" % section))
return
=====================================
wscript
=====================================
--- a/wscript
+++ b/wscript
@@ -14,7 +14,7 @@ from wafhelpers.test import test_write_log, test_print_log
from wafhelpers.options import options_cmd
config = {
- "NTPS_RELEASE": False,
+ "NTPSEC_RELEASE": False,
"out": out,
"OPT_STORE": {}
}
@@ -22,7 +22,7 @@ config = {
# Release procedure:
# 1. waf configure
# 2. waf build
-# 3. Edit wscript and set NTPS_RELEASE to True
+# 3. Edit wscript and set NTPSEC_RELEASE to True
# 4. waf dist
# Snapshot procedure:
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/46a36a76349fec1a9ce7ee7b51888cc2a3caa420
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20160926/b8024164/attachment.html>
More information about the vc
mailing list