From owner-freebsd-hackers@freebsd.org Thu May 2 11:58:10 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5892715931B9 for ; Thu, 2 May 2019 11:58:10 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C33F48B8A6 for ; Thu, 2 May 2019 11:58:09 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from smtp.infracaninophile.co.uk (smtp.infracaninophile.co.uk [IPv6:2001:8b0:151:1:c4ea:bd49:619b:6cb3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.infracaninophile.co.uk", Issuer "Let's Encrypt Authority X3" (verified OK)) (Authenticated sender: matthew/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 7C7F5B6EC for ; Thu, 2 May 2019 11:58:09 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from leaf.local (unknown [88.212.184.97]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: m.seaman@infracaninophile.co.uk) by smtp.infracaninophile.co.uk (Postfix) with ESMTPSA id DE6EFB006 for ; Thu, 2 May 2019 11:58:06 +0000 (UTC) Authentication-Results: smtp.infracaninophile.co.uk/DE6EFB006; dkim=none; dkim-atps=neutral Subject: Re: CFT: FreeBSD Package Base To: freebsd-hackers@freebsd.org References: <201904291931.x3TJV73d079802@slippy.cwsent.com> <6EB65F49-47CD-48B2-8C58-BF387D8C7A58@ixsystems.com> From: Matthew Seaman Message-ID: Date: Thu, 2 May 2019 12:58:04 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C33F48B8A6 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.99 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.99)[-0.993,0]; ASN(0.00)[asn:11403, ipnet:96.47.64.0/20, country:US] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 May 2019 11:58:10 -0000 On 30/04/2019 09:22, David Chisnall wrote: > On 29/04/2019 21:12, Joe Maloney wrote: >> With CFT version you chose to build, and package individual components >> such as sendmail with a port option.  That does entirely solve the >> problem of being able to reinstall sendmail after the fact without a >> rebuild of the userland (base) port but perhaps base flavors could >> solve that problem assuming flavors could extend beyond python. > > This sounds very much like local optimisation. It's now easy to create a > custom base image.  Great.  But how do I express dependencies in ports > on a specific base configuration? This is easy if I depend on a specific > base package, but how does this work in your model?  For example, if I > have a package that depends on a library that is an optional part of the > base system, how do I express that pkg needs to either refuse to install > it, or install a userland pkg that includes that library in place of my > existing version as part of the install process? In principle, this should be covered by the 'provides - requires' functionality in pkg. However at the moment this is limited to just analysing binaries to find what shared libraries they load. There's an arbitrary removal of any base-system shlibs from the provides/requires in the standard port packages built today, but that can be overridden by setting ALLOW_BASE_SHLIBS in pkg.conf. We'd need to add quite a lot of new metadata to packages to fully express all of the things they provide that another package could require -- anything from a high-level concept like 'I need a webserver: anything will do' down to something as specific as 'I need to have exactly this specific file installed.' Some of that can be automatically generated at package build time, but a lot of it will require maintainers to manually add settings. We'd also need to ensure that both the ports tree and pkg(8) handle alternate dependencies correctly. A lot of the effort in maintaining the ports at the moment goes towards generating a self-consistent set of packages with a single dependency inheritance (albeit one that can be switched by changing some flags and recompiling -- eg. to swap between openssl and libressl) Flavourization is one step towards this, but by no means a complete solution. Cheers, Matthew