Yo Eric!

+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*.

I do not understand the logic here?  

What is wrong with creating /usr/local/XXX ??

If I tell NTPsec to install in /usr/local/ I fully expect to find it in
/usr/local/ after install.

Conversely, if you do install intp /usr/local/XXX, then then user needs
to do the PYTHONPATH drill, which got removed from the doc.

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
        [email protected]  Tel:+1 541 382 8588

            Veritas liberabit vos. -- Quid est veritas?
    "If you can’t measure it, you can’t improve it." - Lord Kelvin
Title: GitLab

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:

Changes:

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

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

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

  • _______________________________________________
    vc mailing list
    [email protected]
    http://lists.ntpsec.org/mailman/listinfo/vc
    

    Attachment: pgpW1_aXumqqV.pgp
    Description: OpenPGP digital signature

    _______________________________________________
    devel mailing list
    [email protected]
    http://lists.ntpsec.org/mailman/listinfo/devel

    Reply via email to