From owner-freebsd-ports@freebsd.org Wed Oct 12 08:41:46 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 798E0C0DD27 for ; Wed, 12 Oct 2016 08:41:46 +0000 (UTC) (envelope-from koobs.freebsd@gmail.com) Received: from mail-pf0-x233.google.com (mail-pf0-x233.google.com [IPv6:2607:f8b0:400e:c00::233]) (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 46FFD219; Wed, 12 Oct 2016 08:41:46 +0000 (UTC) (envelope-from koobs.freebsd@gmail.com) Received: by mail-pf0-x233.google.com with SMTP id 190so15886582pfv.1; Wed, 12 Oct 2016 01:41:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:reply-to:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=rtVaa9bwXD8RHUJwaIScFUfPNTLPqxRx3ZyIv7P1oGk=; b=S7M3SzwSUhZmyaKRaDazHOZP2nWPNgZUQEqhQ2iExVE18aiSCsOIEt0VWoy0G5WvU+ u6wVQ6VQZa6WRJWLzC0T8vNvQBL/Z1zYq6eVvFwZXtOhoOrQYCaamrSifdQsbE3sH7Yb XVi8FAkcqEXIo3Il3AG8jyN4o0Az0DLuePxRPn4GIOArrOxWQ6aOMaa1JGj6yorKJRHG JMKEtqTo9gKmLBBe1PB6yc3MaBJUDABT1jVcBpJIcZ/+flFFUEoZuxGeOgH2k9kjxA7u DKFbiuvQZt5vSSMhFTHAplo2ahmVQQz39Hnp8ALuCx2pW1XMQczuYvCP6R1egVlqnzLH UhUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:reply-to:subject:to:references:from :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=rtVaa9bwXD8RHUJwaIScFUfPNTLPqxRx3ZyIv7P1oGk=; b=Lo4ZBpIrNjW9EH3RXVeSQgpoZfoQZzHUC+fjanx5M2bEcs9N1DjoIG0+ri3xVdJMOI AF4A93is+m+Wh5v7DFDgpFnINpApMZClFhx5FZc8JXFET8j9qkrRb0WWQtVIqVyJgcuA lOEtfxfj5U7DCygAMwlDDi0yE419h6x1ZOKOe51vmOaWJrOju8ldSBDLv2tLnYJ5h6Bp hWH9Vrtl2oBtd+DOcTJa7kfAPerW4qQ0Vfl/epRPYeCsQnsiy1r5GuY8tdpd7zJB6RC/ Uw/mThAJY/YC4TKx3WHqAoNnXc4ogsGZfd6/UBQDiAG/KcFq8jfiNytmiX4cSsttvrOa PCqA== X-Gm-Message-State: AA6/9RkJtmzSGuOx/w/0kuSmbM9idGXPaPrv+gP4KNJIS+x/fjKyDFqPmxU1RVOTzAcvsg== X-Received: by 10.99.143.68 with SMTP id r4mr7103895pgn.170.1476261705713; Wed, 12 Oct 2016 01:41:45 -0700 (PDT) Received: from ?IPv6:2001:44b8:31ae:7b01:1c1a:5103:265d:bfaf? (2001-44b8-31ae-7b01-1c1a-5103-265d-bfaf.static.ipv6.internode.on.net. [2001:44b8:31ae:7b01:1c1a:5103:265d:bfaf]) by smtp.gmail.com with ESMTPSA id b4sm9853063paw.10.2016.10.12.01.41.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Oct 2016 01:41:45 -0700 (PDT) Sender: Kubilay Kocak Reply-To: koobs@FreeBSD.org Subject: Re: harder and harder to avoid pkg To: Matthew Seaman , freebsd-ports@freebsd.org References: <638fe078-80db-2492-90be-f1280eb8d445@freebsd.org> <29bf92f3-994f-e695-431a-dc73a3f9c19d@FreeBSD.org> From: Kubilay Kocak Message-ID: <5db692e9-6021-7a87-1154-2a75ef8fbe85@FreeBSD.org> Date: Wed, 12 Oct 2016 19:40:50 +1100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:51.0) Gecko/20100101 Thunderbird/51.0a2 MIME-Version: 1.0 In-Reply-To: <29bf92f3-994f-e695-431a-dc73a3f9c19d@FreeBSD.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-AU Content-Transfer-Encoding: 7bit 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: Wed, 12 Oct 2016 08:41:46 -0000 On 12/10/2016 5:55 PM, Matthew Seaman wrote: > On 11/10/2016 19: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 > > You are describing the 'sub-packages' concept that has been knocking > around for some time. With sub-packages you'ld divide up the result > of staging each port into various chunks: Yep, like this: Ports framework "variants" proof-of-concept (with poudriere support) Mar 6 2016 - https://reviews.freebsd.org/D5563 > - binaries + config file samples + required data files (the core pkg > content) - shlibs - debug symbols - docs - examples - c/c++ headers > and static or profiling libs (ie. only required for compilation) - > various additional plugins etc. currently controlled by port options > > Each of these would be packaged separately and can be used > independently for resolving dependencies. Building each port would > result in as many of these sub packages as are applicable. > > Turning OPTIONS into sub-packages will also significantly reduce the > number of OPTIONS settings needed in the ports tree (I think bapt had > an estimate of about a 70% reduction but ICBW) and make the pkg > system significantly better able to handle more varied user > requirements without users having to compile their own packages. > > Unfortunately attention has been diverted while there's a lot of > work going on towards packaging base. The problem as far as ports > are concerned is producing several packages out of one port -- it's > not rocket science level of difficulty to make that change, but the > assumption of a one-to-one correspondence between ports and packages > is deeply rooted, and it's going to take a lot of work to unpick. Ports framework "variants" proof-of-concept (with poudriere support) Mar 6 2016 - https://reviews.freebsd.org/D5563 > Happily, the package sets produced for the base system are already > divided along these lines, so with a packaged base it is really very > easy to produce a stripped down and streamlined base system. > > Cheers, > > Matthew