From owner-freebsd-ports@freebsd.org Tue Oct 11 19:52:06 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 7DFF0C0D1B0 for ; Tue, 11 Oct 2016 19:52:06 +0000 (UTC) (envelope-from ohauer@gmx.de) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 62957823 for ; Tue, 11 Oct 2016 19:52:06 +0000 (UTC) (envelope-from ohauer@gmx.de) Received: by mailman.ysv.freebsd.org (Postfix) id 61EF7C0D1AF; Tue, 11 Oct 2016 19:52:06 +0000 (UTC) Delivered-To: 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 61963C0D1AE for ; Tue, 11 Oct 2016 19:52:06 +0000 (UTC) (envelope-from ohauer@gmx.de) Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CD273820; Tue, 11 Oct 2016 19:52:05 +0000 (UTC) (envelope-from ohauer@gmx.de) Received: from [192.168.100.100] ([87.139.233.65]) by mail.gmx.com (mrgmx102) with ESMTPSA (Nemesis) id 0MNw0t-1bnkUZ3h2B-007Shs; Tue, 11 Oct 2016 21:51:57 +0200 Subject: Re: harder and harder to avoid pkg To: "ports@FreeBSD.org" References: <638fe078-80db-2492-90be-f1280eb8d445@freebsd.org> From: olli hauer Cc: Julian Elischer , Baptiste Daroussin Message-ID: Date: Tue, 11 Oct 2016 21:51:58 +0200 User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <638fe078-80db-2492-90be-f1280eb8d445@freebsd.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K0:DxufMLi8Lb0uHX/aU2BhwmnDkMd0BdiEiDsasBnNYX3ETkBJDDb I4XMRTOl44PhnMjxwBfv5Qxxx6ZEKTTTjAFEdGZejzrNeW2GuIPTOrX7SXHV087vmwXbvWT f3rWH1WuApxYYeMZ/QbXb3+El0n+83IS38kpOJy2cYt3PKO3rTPOEqD7ThA9oM52dGYgNUU 4c1OmP0iPCN6aXkBGI8Xg== X-UI-Out-Filterresults: notjunk:1;V01:K0:QdD8mxYal+c=:G0JnJ5TAH++Psf7z8IIisW 8Whz7HIXx0SLUrW7DfRfQHJmcwSCGOTNWw1waXA6rtSRm9NC9g+TgHG3y0bo8ZNY4rHbHsem2 503G1tp2zoahzbK9TOF1qbg7zvPh+mwZvCgmJxx0QdZ8MnYJlOSG6HIRHQBfVVueCdf4njNbg NlcqlV0NqBybkXb4ilfeZCsvOw6sjOW5Vhax05U70JD0Ausi6vceVxZPmdUE70vmx7WTy+obX xky9zr4O83+d+tm11B7/WXZOUaOrBLvqheYkIpWYHz7yTAFskIKazF1nIPxpEJoTCHVry1HlW y16v5UEDYmhbIBxp/R5qZS/EkAVP5X4ajiHIFQLmyoeuHwktEPIXcIQxHniYyBjqMBDO8QHPX H6llHs5pHcHwTIsBHdK7O+ZOUGrEtqvjr+Tjn0Bs/xJmyEMGyb9LBiJctWiAW2ERj6nZVIQv8 IOyUAVZ56s4XTPGVAthmVRs69psrYjiODb/Z3BY+WqQfpbitw1HpFfSCyprCfYIEPrVw1WEP4 Vq1s9XuChlnfxVV3JizkJswlTiIUovmRFDYhhz//eUdAjbyYu/kpiAt/SVFEFzhBh60e5zMQN 641LPfJK2jiOfLpQJz1YftQoedweSQvLdjkA/1n1Gl8gOpgXrG7e5+yGx0fZjJqivNZWx99Zv EgEmaKaI7++aMwfVKNUSzB0rHJIb4IBVdR4Z8A7nOQAYJDwePboTakIB2iWmutEyVFWKA2j8p rm3YaayBeIbr+At2Ys0iVPs7Gexuit04FsKO6R1NzXJeTUiXdaRmTSs+2N815PtZYBz1dPDxz 2FNeTkS X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Oct 2016 19:52:06 -0000 On 2016-10-11 20:59, Julian Elischer wrote: > As the number of dependencies between packages get ever higher, it becomes more and more difficult to compile packages and the dependence on binary precompiled packages is increased. However binary packages are unsuitable for some situations. We really need to follow the lead of some of the Linux groups and have -runtime and -devel versions of packages, OR we what woudlbe smarter, woudl be to have several "sub manifests" to allow unpacking in different environments. > > > A simple example: libxml2 > > This package installs include files and libraries and dicumentation etc. > > yet if I build an appliance , I want it to only install a singe file. > > /usr/local/lib/libxml2.so.2 > > > The presence of this file will satisfy any runtime dependencies of packages that require it. > > Unfortunately there is no way to install just this file, and still report that we have the package loaded, so > > pkg will always try to reinstall it leading to a huge mess. > > My current scheme is to unpack all packages into a larger staging area, and *manually* (scripted) copy out only the files I need, and then copy the pkg database, so that when run on the running appliance, pkg THINKS all the packages are loaded on the appliance, even though only the runtime files are installed. This is what we in the industry call "a hack" :-) It is also not robust in the face of changing pkg versions. > > It would be a lot better it pkg knew it was being asked to install only the runtime set, and coudl accurately store this information in its database, allowing it to satisfy the needs of other packages that need that dependnency only in a runtime manner. > > Is any of this possible at the moment? > > suggestions from the ports/pkg community are appreciated.. > > Julian > Hm, do you build your own packages or using pre build packages? just for interest and testing the following hack will do what you want, but results in duplicate category and some other minor errors (needs some better hacking ...) $ cat libxml2/Makefile.local post-stage: @${RM} -rf ${STAGEDIR}${PREFIX}/include/libxml2 @${ECHO} 'lib/libxml2.so.2' > ${TMPPLIST} A better method would be to use a tool like portsharker together with ports-mgmt/poudriere(-devel) A really short hint how to use it can be found here: https://github.com/freebsd/poudriere/blob/release-3.1/doc/portshaker.wiki Anyway, until now should be possible with some effort, perhaps it is possible to get for such purpose an additional make target that is running after stage but before the package is created.