From owner-freebsd-ports@freebsd.org Wed Mar 30 07:23:38 2016 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9814BAE2899 for ; Wed, 30 Mar 2016 07:23:38 +0000 (UTC) (envelope-from dewaynegeraghty@gmail.com) Received: from mail-lb0-x243.google.com (mail-lb0-x243.google.com [IPv6:2a00:1450:4010:c04::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 09E7A1C3C for ; Wed, 30 Mar 2016 07:23:38 +0000 (UTC) (envelope-from dewaynegeraghty@gmail.com) Received: by mail-lb0-x243.google.com with SMTP id vk4so3299967lbb.1 for ; Wed, 30 Mar 2016 00:23:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=bXGznn1XhnYxdEYYAgDmcnx5b08+kZEYIxfBs2JNjLM=; b=jhtGX3siRK6FqNCJS+HijyIeXQc7kKvRnpgvaxNYQVd6EkEEx1Q6D8O+fuj6Sd9Yrv O5rn9Nr1Bk7FvoWK3kuNwg4zsaw5yy54mKDu7AvZWZXnFPl3HinEryigsjVvNauFL3fu CplKT8T+rs81Cs1288yjRp2pjdvkkaQzaptyqh8g5gYNLDi8kY1qRnmIozHcLr5nNc27 BS8AbgDgIrp8JwIb8gOz3XKlGw1iJopS6ZNXHT8T8NA1ngbJ8j+vEWe4PFs4F+0Ib9MY Tzxua9foL4CsrHjdzSrKAW1AJFjsV9Q/7Wo1zC2QnCY6KSPJPZCvjXUIxMZTAy5eOqKy qagw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=bXGznn1XhnYxdEYYAgDmcnx5b08+kZEYIxfBs2JNjLM=; b=EnhxVbCKY+QzxLdZB74UP2VUz4AHsitM+F0vVHnAEy1Q5qmrG7jk1v9Is4VaBEAyJT KxPtnMxnEwNWKCrfa91kA7sKcxfXGkFiX2jF5UKl0OVufSfqqTcb88/FNzO4/HSO71hD xpM5R4F+mjVh7Mg+stC3W/VGAPH9loLeRFjTi+eCoa43lbspfL/I2X1sVLPbzE+kO3WI 3PoAmALes0Z/EjWAtI4gwyUsIZSCOULLtfTuIINZq/sIz8+Ymps+6h2zCMhRZeVB07Gq Pd8/ulxaUv0N9r1dYV+rfy+NPazPpsx0tnBjC9pa4P/a801QL7r27puqizEV/tdgjowB iCkg== X-Gm-Message-State: AD7BkJLGiH5UWuJNwmNCR5lbh/B1H6+8KNn375AaPcIdFbL08bz7isTarWkM92o7ZT79Ej5ZRuRuhlETJVo5Yg== X-Received: by 10.112.198.166 with SMTP id jd6mr3000805lbc.12.1459322615110; Wed, 30 Mar 2016 00:23:35 -0700 (PDT) MIME-Version: 1.0 Received: by 10.25.142.83 with HTTP; Wed, 30 Mar 2016 00:23:05 -0700 (PDT) In-Reply-To: <201603300609.u2U69b4k062050@slippy.cwsent.com> References: <201603300609.u2U69b4k062050@slippy.cwsent.com> From: Dewayne Geraghty Date: Wed, 30 Mar 2016 18:23:05 +1100 Message-ID: Subject: Re: Library creep and additional dependencies for net/ntp? To: Cy Schubert Cc: ports-list freebsd Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Mar 2016 07:23:38 -0000 On 30 March 2016 at 17:09, Cy Schubert wrote: > In message > 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 or > FreeBSD UNIX: 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