[Git][NTPsec/ntpsec][master] First version of buildprep script.

Eric S. Raymond gitlab at mg.gitlab.com
Thu Jan 19 21:19:37 UTC 2017


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


Commits:
d8275820 by Eric S. Raymond at 2017-01-19T16:02:34-05:00
First version of buildprep script.

- - - - -


3 changed files:

- INSTALL
- README
- wafhelpers/check_sodium.py


Changes:

=====================================
INSTALL
=====================================
--- a/INSTALL
+++ b/INSTALL
@@ -18,20 +18,16 @@ to run and in addition, the development headers installed to build.
 
 === The short version ===
 
-On Debian/Ubuntu::
-   apt-get python-dev bison libsodium libcap2 libcap-dev python-psutils
-   apt-get libseccomp-dev libssl1.0.0 libssl-dev ppstools
+Run ./buildprep -n to see what needs to be installed as prerequisites
+on your system.  In order that we have a single point of truth about
+package requirements, much information about installable-package names
+that used to live in this file has moved to that script.
 
-On Debian only::
-   apt-get gnuplot 
-
-On Ubuntu only::
-   apt-get gnuplot5
-
-On Fedora/Centos::
-   yum install python-dev bison libsodium libcap libcap-devel gnuplot
-   yum install python-psutil libseccomp-devel openssl-libs openssl-devel
-   yum install pps-tools-devel pps-tools
+buildprep does not attempt to install either asciidoc or psutils (both
+optional). asciidoc has a huge tail of dependencies and you probably
+don't want it unless you're planning to modify the documentation.
+psutils may require different packages depending on whether your base
+Python version is 2 or 3.
 
 === Details ===
 
@@ -44,14 +40,10 @@ Python 2.x, x >= 6, or Python 3.x, x >= 3::
    distinction.
 
    Required to build.
-   Debian/Ubuntu: python-dev
-   Fedora/CentOS: python-devel
    SLES: python-devel
 
 bison::
    Required to build.
-   Debian/Ubuntu: bison
-   Fedora/CentOS: bison
    Gentoo package: sys-devel/bison
    SLES: bison. Included in pattern `basis-devel`, which includes gcc, etc.
 
@@ -62,8 +54,6 @@ libsodium::
    but we judge this creates an unacceptable risk should a CVE be issued
    against it
 
-   Debian/Ubuntu: libsodium-dev
-   Fedora: libsodium
    Gentoo: dev-libs/libsodium
    SLES: libsodium13 and libsodium-devel
    CentOS: libsodium in epel ("Extra Packages for Enterprise Linux").
@@ -72,16 +62,11 @@ libsodium::
 
 libcap::
    Required on Linux, to support dropping root.
-   Debian/Ubuntu: libcap2 and libcap-dev
-   Fedora/CentOS: libcap and libcap-devel
    Gentoo package: sys-libs/libcap
    SLES: libcap2 and libcap-devel
 
 gnuplot::
    Required for ntpviz.
-   Debian: gnuplot
-   Ubuntu: gnuplot5
-   Fedora/CentOS: gnuplot
    Gentoo: sci-visualization/gnuplot
    SLES: gnuplot
 
@@ -100,16 +85,12 @@ psutils::
 
 seccomp::
    Optional on Linux to support restricting syscalls
-   Debian/Ubuntu: libseccomp-dev (gets libseccomp2)
-   Fedora/CentOS: libseccomp-devel
    Gentoo: sys-libs/libseccomp
    SLES: libseccomp-devel
 
 OpenSSL::
    Optional, required for --enable-crypto.
    Enables encryption and authentication.
-   Debian/Ubuntu: libssl1.0.0 and libssl-dev
-   Fedora/CentOS: openssl-libs and openssl-devel
    Gentoo: dev-libs/openssl
    SLES: openssl-libs and openssl-devel
 
@@ -119,11 +100,14 @@ sys/timepps.h::
    file to be installed, depending on which refclocks you enable.
    This won't be necessary for pure client (Stratum 2 or higher)
    installations.
-   Debian/Ubuntu: pps-tools
-   Fedora/CentOS: pps-tools-devel (pps-tools may be useful for debugging)
    Gentoo: net-misc/pps-tools
    SLES: SLES 12 and earlier do not seem to have this available.
 
+liberation::
+   Optional, improves font quality in ntpviz renderings.
+   Gentoo: media-fonts/liberation-fonts
+   SLES: liberation-fonts
+
 asciidoc, a2x::
    You will need asciidoc to make HTML and a2x to make manual pages from the
    documentation masters.  Only required if you configured with --enable-doc.
@@ -140,13 +124,6 @@ Local copy of DocBook stylesheets:
    Gentoo: app-text/docbook-xsl-stylesheets
    SLES: docbook-xsl-stylesheets - pulled in by `asciidoc`
 
-liberation::
-   Optional, improves font quality in ntpviz renderings.
-   Debian/Ubuntu: liberation
-   Fedora/CentOS: liberation
-   Gentoo: media-fonts/liberation-fonts
-   SLES: liberation-fonts
-
 The OS X build has been tested in this environment:
 
  OS X Version             : 10.11.x (El Capitan)
@@ -165,21 +142,23 @@ Under Unix, the simplest way to compile this package is:
 
   1. `cd' to the directory containing the package's source code and
 
-  2. Run `./waf configure' to configure the package for your system.
+  2. Run `./buildprep' as root to get your prerequisites installed. 
+
+  3. Run `./waf configure' to configure the package for your system.
   You may want to add configuration options after the verb 'configure';
   see below.
 
-  3. Invoke `./waf build' to compile the package.
+  4. Invoke `./waf build' to compile the package.
 
-  4. Invoke `./waf install' to install the programs and any data files and
+  5. Invoke `./waf install' to install the programs and any data files and
      documentation.
 
-  5. You can uninstall cleanly by invoking `./waf uninstall' as root.
+  6. You can uninstall cleanly by invoking `./waf uninstall' as root.
 
-  6. You can remove the program binaries and object files from the
+  7. You can remove the program binaries and object files from the
      source code directory by typing `./waf clean'.
 
-  7. To also remove the files that `./waf configure' created (so you can
+  8. To also remove the files that `./waf configure' created (so you can
      configure and compile the package for a different kind of
      computer), type `./waf distclean'.
 


=====================================
README
=====================================
--- a/README
+++ b/README
@@ -24,6 +24,8 @@ attic/:: 	Directory containing source code that is *not* part of a
 		normal installation. Things can disappear from here at any
 		time.
 
+buildprep::	Executable script for fetching installation prerequisites.
+
 contrib/::	Directory containing contributed scripts, dragons dwell here.
 		Some of this might eventually move to being supported code.
 


=====================================
wafhelpers/check_sodium.py
=====================================
--- a/wafhelpers/check_sodium.py
+++ b/wafhelpers/check_sodium.py
@@ -1,6 +1,6 @@
 
 
 def check_sodium(ctx):
-    ctx.check_cc(header_name="sodium.h", mandatory=True,
+    ctx.check_cc(header_name="sodium.h", includes=ctx.env.PLATFORM_INCLUDES, mandatory=True,
                  errmsg="No\nFatal Error: Your system is missing libsodium")
     ctx.check_cc(lib="sodium", comment="Sodium crypto library", mandatory=True)



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/d8275820f5b9217aa9c0fcf2d7540fcb9c321647
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20170119/1a6e2a23/attachment.html>


More information about the vc mailing list