From owner-freebsd-current@freebsd.org Tue Apr 19 00:09:16 2016 Return-Path: Delivered-To: freebsd-current@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 E7595B13C14; Tue, 19 Apr 2016 00:09:16 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from d.mail.sonic.net (d.mail.sonic.net [64.142.111.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AE1B11791; Tue, 19 Apr 2016 00:09:16 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from zeppelin.tachypleus.net (75-101-50-44.static.sonic.net [75.101.50.44]) (authenticated bits=0) by d.mail.sonic.net (8.15.1/8.15.1) with ESMTPSA id u3J09E6M019304 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Mon, 18 Apr 2016 17:09:14 -0700 Subject: Re: [CFT] packaging the base system with pkg(8) To: Alfred Perlstein , lev@freebsd.org, Glen Barber References: <20160302235429.GD75641@FreeBSD.org> <57152CE5.5050500@FreeBSD.org> <9D4B9C8B-41D7-42BC-B436-D23EFFF60261@ixsystems.com> <20160418191425.GW1554@FreeBSD.org> <571533B8.6090109@freebsd.org> <20160418194010.GX1554@FreeBSD.org> <57153E80.4080800@FreeBSD.org> <571551AB.4070203@freebsd.org> Cc: Sean Fagan , freebsd-pkgbase@freebsd.org, freebsd-current@freebsd.org From: Nathan Whitehorn Message-ID: <5715772A.3070306@freebsd.org> Date: Mon, 18 Apr 2016 17:09:14 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0 MIME-Version: 1.0 In-Reply-To: <571551AB.4070203@freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Sonic-CAuth: UmFuZG9tSVZ/dgPMLQpM16vkAMLVK9HCg+UIyu/ixZAbFDyHDlzsetLeFXZftM0iYbVRwTDKGNnUyr2uTQXj2smm+kJOQIeLLCXSzNaPKog= X-Sonic-ID: C;skAt88IF5hGVMLeqjlfmnQ== M;BKp288IF5hGVMLeqjlfmnQ== X-Spam-Flag: No X-Sonic-Spam-Details: 0.0/5.0 by cerberusd X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Apr 2016 00:09:17 -0000 On 04/18/16 14:29, Alfred Perlstein wrote: > Guys please stop arguing about the number of packages. The high > granularity is VERY useful! > > Managing large groups of small packages is much easier than just > having large packages. I'm not so sure about these statements. Maintaining groups of packages can be easier, but it can be also be harder. The goal is to find the right level. And I haven't seen a case where an 800-packages level of granularity is helpful. Maybe you can suggest one? I can, however, see the reverse case, where it leads, in addition to system administration hassle, to a balkanization of the base system, the predictability of which is one of FreeBSD's greatest assets. More granularity than we have is good (having the ability to strip debug information, profiling, sendmail, the toolchain, etc.) and it is going to be very nice to have that. But I can name of order 10 packages where that makes sense. I think we will learn to regret 800. Clearly you can have too few (one giant package called "FreeBSD 11" -- although this is a model that works for many organizations) and you can have too many (every file is its own package -- no one does this). I'm not sure where the optimum is, but this seems way too far in the direction of the latter. > All this can be done by meta-packages which depend on larger package > groups. > > Later pkg can be augmented to "remove packages not explicitly > installed" which would remove leaf packages. > > Example: you installed "base-debug" which pulls in let's say 50 small > packages, later you want all of those removed, you can do something > like: "pkg delete --leafs base-debug" which should delete > "base-debug" and any dangling packages it pulled in not required by > other pkgs. But what benefit do you get from the sub-packages? Let's say you have a single package that is the debug files for one library. Why would you ever care about that specific package? I can see why you might want all the debug files as a separate thing, but this seems way too fine-grained to be useful. Put another way, the base system for FreeBSD 11 (I grabbed a powerpc64 distfile because I had it handy) has 11765 files in it, neglecting symlinks. Split into 755 packages, the average package then has just 15 files in it. You are rapidly approaching pkg info resembling ls -R / at that point and managing the system at the individual file level, which totally defeats the concept of packaging things. If you remove files in var, share, etc, and /usr/include from that list (which include things like all the timezone files, which are hopefully packaged together, or all the man pages), this average is 2.1 files per package. > > Huge thanks to the team that implemented this! Yes, of course. Please do not interpret my comments about the level of discretization of packages as in any way reflecting the project in general, which is broader than this issue. We need better tools than tar and patch to manage the system; using pkg is a huge step forward. -Nathan > > thanks. > -Alfred > > On 4/18/16 1:07 PM, Lev Serebryakov wrote: >> On 18.04.2016 22:40, Glen Barber wrote: >> >>> This granularity allows easy removal of things that may not be wanted >>> (such as *-debug*, *-profile*, etc.) on systems with little >>> storage. On >>> one of my testing systems, I removed the tests packages and all debug >>> and profiling, and the number of base system packages is 383. >> IMHO, granularity like "all base debug", "all base profile" is enough >> for this. Really, I hardly could imagine why I will need only 1 debug or >> profile package, say, for csh. On resource-constrained systems NanoBSD >> is much better anyway (for example, my typical NanoBSD installation is >> 37MB base system, 12MB /boot and 10 packages), and on developer system >> where you need profiled libraries it is Ok to install all of them and >> don't think about 100 packages for them. >> >> Idea of "Roles" from old FreeBSD installers looks much better. Again, >> here are some "contrib" software which have one-to-one replacements in >> ports, like sendmail, ssh/sshd, ntpd, but split all other >> FreeBSD-specific code? Yes, debug. Yes, profile. Yes, static libraries. >> Yes, lib32 on 64 bit system. >> >> It seems that it is ideological ("holy war") discussion more than >> technical one... >> >