[Git][NTPsec/ntpsec][master] Mostly resolve and document FHS conformance issue.

Eric S. Raymond gitlab at mg.gitlab.com
Sun Oct 1 19:28:46 UTC 2017


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


Commits:
c5fea507 by Eric S. Raymond at 2017-10-01T15:27:54-04:00
Mostly resolve and document FHS conformance issue.

- - - - -


3 changed files:

- INSTALL
- packaging/packaging.txt
- wafhelpers/fix_python_config.py


Changes:

=====================================
INSTALL
=====================================
--- a/INSTALL
+++ b/INSTALL
@@ -175,6 +175,24 @@ on your system that waf configure doesn't know about - that is,
 other headers always need to be included before it in C programs.
 Please report this as a bug, along with your platform details.
 
+== Source build limitations ==
+
+When you do an install from source, no attempt is made to generate an
+/etc/ntp.conf for you.  The reason is that we, the maintainers, can't
+know what pool host you are authorized to use.  If you have an existing
+ntp.conf from a legacy version, you can expect it to work.
+
+Due to a limitation of the Python distutils library, if you install
+from the source distribution with prefix set to a value other than
+/usr (in particular, if it's the default value /usr/local), that
+prefix will be honored *only if the corresponding Python library
+directory already exists*. Otherwise the install will drop the ntp
+Python library in /usr/lib. This layout may violate the Linux File
+Hierarchy Standard.
+
+You should have neither issue if you installl from an OS distribution's
+binary package.
+
 == Caveat for Crossbuilders ==
 
 If you see a build failure with the message "error: No repo or cache


=====================================
packaging/packaging.txt
=====================================
--- a/packaging/packaging.txt
+++ b/packaging/packaging.txt
@@ -14,6 +14,24 @@ or ntp.d in place. Your installable package should do this.
 The reason this is so is that NTPsec does not yet have an authorized
 pool group of its own. This may change in the future.
 
+== FHS noncompilance ==
+
+Thw function get_python_lib() in the Python distutils library is the
+only reliable way to know where in fact the ntp Python librarty can
+installed; it normally returns sometyhing under /usr/lib.
+
+Thus, if you install from the source distribution with prefix set to
+a value other than /usr - in particular, if it's the default value
+/usr/local - the ntp Python library may get dropped in /usr/lib
+anyway, violating the Linux File Hierarchy Standard.
+
+We say 'may' because if the Python library directory corresponding
+to the prefixed library path already exists it will be used.
+
+Your installable package should arrange library installation to
+comply with the FHS.  If you are using --prefix=/usr this should
+not require special action.
+
 == Platforms without Python ==
 
 Many tools (actually, almost everything except the core daemon itself)


=====================================
wafhelpers/fix_python_config.py
=====================================
--- a/wafhelpers/fix_python_config.py
+++ b/wafhelpers/fix_python_config.py
@@ -55,7 +55,13 @@ class FixConfig(object):
 
     def massage(self, path):
         "Massage Python library path to get around upstream bug."
-        return path.replace('/usr', self.conf.env.PREFIX)
+        # This will produce an FHS-compliant insrallation if the
+        # proper local path pre-exists.
+        localized = path.replace('/usr', self.conf.env.PREFIX)
+        if os.path.exists(localized):
+            return localized
+        else:
+            return path
 
     def fix_python_libs(self):
         """Fix up library install paths."""



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

---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/c5fea507d3459830448f1468d042b4755737dc69
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/20171001/c6205b65/attachment.html>


More information about the vc mailing list