[Git][NTPsec/ntpsec][master] Set up inclusiomn of libaes_siv.c, and guidelines.

Eric S. Raymond gitlab at mg.gitlab.com
Thu Jan 31 22:01:21 UTC 2019


Eric S. Raymond pushed to branch master at NTPsec / ntpsec


Commits:
a753dcaf by Eric S. Raymond at 2019-01-31T21:59:53Z
Set up inclusiomn of libaes_siv.c, and guidelines.

Currently commented out of the build because it doesm't compile. An
issue has been files.

- - - - -


3 changed files:

- devel/hacking.adoc
- libntp/wscript
- wscript


Changes:

=====================================
devel/hacking.adoc
=====================================
@@ -32,6 +32,20 @@ it's easier to verify portability in Python than it is in sh.
 Please read our C and Python guidelines carefully; they're not just
 about style, they're serious measures to reduce defect rates.
 
+== Inclusions from other projects ==
+
+Git subtrees and submodules are clever but full of traps. Discussion
+here:
+
+https://medium.com/@porteneuve/mastering-git-submodules-34c65e940407
+https://medium.com/@porteneuve/mastering-git-subtrees-943d29a798ec
+
+These don't even touch the biggest issue, which is stable reproducible
+builds.  For this reason, we use naive textual inclusion.
+
+So far this has only been an issue with libaes_siv. If you notice
+there's an inclusion not listed here, file an issue.
+
 == C Guidelines ==
 
 === C API standards ===
@@ -182,6 +196,10 @@ to assume the code will never run on a 16-bit machine.  When in doubt,
 and whenever possible, use the fixed-width integral types from
 <stdint.h>.
 
+You *may* assume twos-complement arithmetic.  The C Standards
+committee has accepted a proposal to mandate twos complement in the
+next revision beyond ISO/IEC 9899:2018.  Some of our code requires it.
+
 You *may* assume that the compiler supports POSIX 64-bit integral types
 (int64_t, uint64_t and friends) even if the target hardware is 32-bit.
 
@@ -244,8 +262,9 @@ Full waf documentation is at https://waf.io/
 
 === Naming conventions ===
 
-Every binary and script we install has an "ntp" prefix on the name
-because namespace pollution is rude.  If you write a new tool that you
+Almost every binary and script we install has an "ntp" prefix on the name
+because namespace pollution is rude. (The only exception is "ntsd", the
+network time security key-exchange daemon.) If you write a new tool that you
 want us to install, follow this convention.
 
 Generally, we favor "ntp" rather than "ntp-" for consistency and to
@@ -588,6 +607,10 @@ each release.
   by landing a significant new feature, landing a critical fix, or just
   that enough time has passed with ongoing improvements and fixes.
 
+. Make sure inclusions (currently only libaes_siv) are updated, and
+  run the build as a sanity check.  There's a 'pullincludes' target
+  in waf that refreshes the includes. Commit that change.
+
 . Email a warning message to the mailto:devel at ntpsec.org list,
   and ask the major contributors to chime in, and to each assure
   that the .../NEWS file and the .../devel/TODO file is up to date.


=====================================
libntp/wscript
=====================================
@@ -1,6 +1,7 @@
 def build(ctx):
 
     libntp_source = [
+	#"aes_siv.c",
         "assert.c",
         "authkeys.c",
         "authreadkeys.c",


=====================================
wscript
=====================================
@@ -1116,9 +1116,13 @@ def ifdex(ctx):
     "Get a report on configuration symbols not accounted for."
     ctx.exec_command("ifdex -X build/config.h -X devel/ifdex-ignores .")
 
-# See https://gitlab.com/esr/loccount
-
+# Pull in inclusions required for the build.
+# You probably want to do a commit after this.
+def pullincludes(ctx):
+    ctx.exec_command("cd libntp; wget https://raw.githubusercontent.com/dfoxfranke/libaes_siv/master/aes_siv.c")
+    ctx.exec_command("cd libntp; wget https://raw.githubusercontent.com/dfoxfranke/libaes_siv/master/aes_siv.h")
 
+# See https://gitlab.com/esr/loccount
 def loccount(ctx):
     "Report the SLOC count of the source tree."
     ctx.exec_command("loccount -x=build .")



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/a753dcaf1ebea6c167ddef950a2e2f198b9ea6b6

-- 
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/a753dcaf1ebea6c167ddef950a2e2f198b9ea6b6
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/20190131/b038f051/attachment-0001.html>


More information about the vc mailing list