Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Mar 2016 18:23:05 +1100
From:      Dewayne Geraghty <dewaynegeraghty@gmail.com>
To:        Cy Schubert <Cy.Schubert@komquats.com>
Cc:        ports-list freebsd <freebsd-ports@freebsd.org>
Subject:   Re: Library creep and additional dependencies for net/ntp?
Message-ID:  <CAGnMC6pGDzLv0608%2BEtNA9=9qnnRFPrzaiXmo4TGoGF96pV=Uw@mail.gmail.com>
In-Reply-To: <201603300609.u2U69b4k062050@slippy.cwsent.com>
References:  <dewaynegeraghty@gmail.com> <CAGnMC6pGQ9iMZAHE-NWHboCw4MaRT%2Bk2nXzOsXD2fkWg%2Bkdhhw@mail.gmail.com> <201603300609.u2U69b4k062050@slippy.cwsent.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 30 March 2016 at 17:09, Cy Schubert <Cy.Schubert@komquats.com> wrote:

> In message
> <CAGnMC6pGQ9iMZAHE-NWHboCw4MaRT+k2nXzOsXD2fkWg+kdhhw@mail.gmail.c
> om>
> , Dewayne Geraghty writes:
> > --001a114035e2660c5e052f3be038
> > Content-Type: text/plain; charset=UTF-8
> >
> > Overnight I updated /usr/ports via svnlite, rebuilt all ports and noticed
> > additional libraries and dependencies for net/ntp
> >
> > On 12th Feb, I'd built ntp-4.2.8p6.txz.  Checking the libraries, I had
> > # ldd /usr/local/sbin/ntpd
> > /usr/local/sbin/ntpd:
> >         libmd.so.6 => /lib/libmd.so.6 (0x280fb000)
> >         libm.so.5 => /lib/libm.so.5 (0x2810f000)
> >         libcrypto.so.8 => /usr/local/lib/libcrypto.so.8 (0x28139000)
> >         libintl.so.8 => /usr/local/lib/libintl.so.8 (0x282ca000)
> >         libthr.so.3 => /lib/libthr.so.3 (0x282d3000)
> >         libc.so.7 => /lib/libc.so.7 (0x282f4000)
> >
> > Today, I rebuilt ntp and found
> > # ldd /usr/local/sbin/ntpd
> > /usr/local/sbin/ntpd:
> >        * libmd5.so.0 => /usr/local/lib/libmd5.so.0 (0x280fc000) - from
> > libwww*
> >         libm.so.5 => /lib/libm.so.5 (0x280fe000)
> >         libcrypto.so.8 => /usr/local/lib/libcrypto.so.8 (0x28128000)
> >        * libdns_sd.so.1 => /usr/local/lib/libdns_sd.so.1 (0x282b9000) -
> > mDNSResponder*
> >         libintl.so.8 => /usr/local/lib/libintl.so.8 (0x282c1000)
> >         libthr.so.3 => /lib/libthr.so.3 (0x282ca000)
> >         libc.so.7 => /lib/libc.so.7 (0x282eb000)
> >
> > *  libz.so.6 => /lib/libz.so.6 (0x2845e000)        libssl.so.8 =>
> > /usr/local/lib/libssl.so.8 (0x28473000)*
> >
> > Checking pkg info -d ntpd
> > # pkg info -d ntp
> > ntp-4.2.8p6:
> >         openssl-1.0.2_8
> >         libevent2-2.0.22_1
> >         gettext-runtime-0.19.6
> >         libedit-3.1.20150325_1
> >
> > Can anyone shed any light on why ntp has picked up these additional
> > libraries and created additional dependencies on libwww and
> mDNSresponder?
> >
> > I'm also curious as to how *libz *and *libssl *are now required, between
> > ntp4.2.8p6 built in February vs the March build?
> >
> > By way of comparison,
> > /usr/sbin/ntpd:  (base OS ntp also ntp4.2.8p6)
> >         libm.so.5 => /lib/libm.so.5 (0x8008d2000)
> >         libthr.so.3 => /lib/libthr.so.3 (0x800afa000)
> >         libcrypto.so.7 => /lib/libcrypto.so.7 (0x800d1f000)
> >         libc.so.7 => /lib/libc.so.7 (0x801115000)
> >
> > These results are on "FreeBSD 10.3-PRERELEASE #0 r296427M:"  My options
> for
> > ntp have remained unchanged since 20140914.
>
> Actually nothing has changed. However the net/ntp ./configure script
> detects if additional libraries are already on your system, e.g. libmd5,
> libdns_sd, and uses them. For instance, my laptop has huge collection of
> packages installed to support various GUI environments under X:
>
> slippy$ ldd /usr/local/sbin/ntpd
> /usr/local/sbin/ntpd:
>         libmd5.so.0 => /usr/local/lib/libmd5.so.0 (0x2c4c6000)
>         libm.so.5 => /lib/libm.so.5 (0x2c6c8000)
>         libcrypto.so.8 => /usr/local/lib/libcrypto.so.8 (0x2ca00000)
>         libdns_sd.so.1 => /usr/local/lib/libdns_sd.so.1 (0x2ce5e000)
>         libintl.so.8 => /usr/local/lib/libintl.so.8 (0x2d066000)
>         libthr.so.3 => /lib/libthr.so.3 (0x2d271000)
>         libc.so.7 => /lib/libc.so.7 (0x2d496000)
>         libz.so.6 => /lib/libz.so.6 (0x2d843000)
>         libssl.so.7 => /usr/lib/libssl.so.7 (0x2da59000)
>         libcrypto.so.7 => /lib/libcrypto.so.7 (0x2dcc5000)
> slippy$
>
> My firewall OTOH bare bones, has very few packages and no X installed:
>
> cwfw# ldd /usr/local/sbin/ntpd
> /usr/local/sbin/ntpd:
>         libmd.so.6 => /lib/libmd.so.6 (0x8008ba000)
>         libm.so.5 => /lib/libm.so.5 (0x800aca000)
>         libcrypto.so.8 => /usr/local/lib/libcrypto.so.8 (0x800e00000)
>         libintl.so.8 => /usr/local/lib/libintl.so.8 (0x801253000)
>         libthr.so.3 => /lib/libthr.so.3 (0x80145e000)
>         libc.so.7 => /lib/libc.so.7 (0x801683000)
> cwfw#
>
> In my poudriere build repo, the cached package (it's still building), ntpd
> references:
>
> cwsys$ ldd /tmp/usr/local/sbin/ntpd
> /tmp/usr/local/sbin/ntpd:
>         libmd.so.6 => /lib/libmd.so.6 (0x2c4c4000)
>         libm.so.5 => /lib/libm.so.5 (0x2c6d4000)
>         libcrypto.so.7 => /lib/libcrypto.so.7 (0x2c8fd000)
>         libthr.so.3 => /lib/libthr.so.3 (0x2ccf3000)
>         libc.so.7 => /lib/libc.so.7 (0x2cf18000)
> cwsys$
>
> The ntp tarball does this out of the box -- read ./configure. The more
> libraries the ntp build finds, the more it uses. Don't worry about it
> dragging in gratuitous packages. It won't. But, it does use whatever it
> detects.
>
> If you want a minimal build, use poudriere to build your own binary
> packages or use FreeBSD.org built binary packages. (If you're wondering,
> ntpd on my laptop looks as it does because I did a point upgrade of net/ntp
> outside of poudriere built packages.) Generally, it's recommended people
> use binary packages.
>
> To summarize, use binary packages. If you want to roll your own, use
> poudriere, the install your own binary packages. Otherwise ports/net/ntp
> will dynamically discover libraries during ./configure it can use.
>
> Hope this helps.
>
>
> --
> Cheers,
> Cy Schubert <Cy.Schubert@komquats.com> or <Cy.Schubert@cschubert.com>
> FreeBSD UNIX:  <cy@FreeBSD.org>   Web:  http://www.FreeBSD.org
>
>         The need of the many outweighs the greed of the few.
>
>
> Thanks Cy, I appreciate your calming my concern that something nefarious
was occurring under /usr/ports/Mk. :)

I'm very disappointed to see that "configure" is undertaking the decision
making to include libraries that, on the face of it, are unnecessary and
unwanted, as in this case.  We've customised some 230+ of the ports and
build a set of packages for different server or boundary device
configurations.  So I'm going to have to investigate how I can address the
scenario where the build environment should be regarded as polluted with
remnants from other package builds.  (We start from a virgin system and
build 800+ packages using portmaster)

I appreciate you pointing me toward pouderie.  For many reasons we've kept
the build environment very simple, in the hope of reproducibility and have
been building within multiple jails for many years.  (Long before
pouderie).  Perhaps its worth another look, but I'll need to ascertain why
configure is bringing in libs that aren't required; but more importantly we
have package dependencies that the pkg system has no information about.

I have a clue regarding mDSNresponder which I'm pursuing, but no idea as to
how libwww was included.  Either way it makes maintaining remote systems
from packages that now have *unknown dependencies* (ie "pkg info -d ntp",
doesn't list them) somewhat problematic.

Again thank-you for your advise and the effort that you've put in over the
years maintaining ntp.

Kind regards, Dewayne



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGnMC6pGDzLv0608%2BEtNA9=9qnnRFPrzaiXmo4TGoGF96pV=Uw>