Page MenuHomeFreeBSD

vmimage.subr: Avoid "package sets"
AbandonedPublic

Authored by cperciva on Sun, Oct 5, 10:26 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Oct 7, 4:22 PM
Unknown Object (File)
Mon, Oct 6, 10:24 AM
Unknown Object (File)
Mon, Oct 6, 7:15 AM
Unknown Object (File)
Mon, Oct 6, 5:55 AM
Unknown Object (File)
Mon, Oct 6, 5:17 AM
Unknown Object (File)
Mon, Oct 6, 2:33 AM
Unknown Object (File)
Mon, Oct 6, 2:15 AM
Subscribers

Details

Summary

In order for VM build code to select which packages they want to
have installed, we generate a list of packages and pipe it through
a function which is either "cat" or greps away packages. This fails
if we include package sets in the list, since e.g. filtering out
"FreeBSD-tests.*" has no effect if we keep "FreeBSD-set-tests" in
the list of packages to install.

Filter out all of the package sets; but add back "FreeBSD-set-minimal",
since that will ensure that if the system is upgraded in the future
it will install any newly-invented packages which are part of the
"minimal" package set (and thus presumably considered essential).

This is not an ideal solution; a better mechanism might include any
sets for which all of their constituent packages are installed. But
keeping the "minimal" package while excluding the others is good
enough at this point in the 15.0 release cycle.

MFC after: 3 days
Sponsored by: https://www.patreon.com/cperciva

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 67570
Build 64453: arc lint + arc unit

Event Timeline

are there any VM images that don't install everything that's in FreeBSD-set-base? this is equivalent to base.txz.

In D52919#1209183, @ivy wrote:

are there any VM images that don't install everything that's in FreeBSD-set-base? this is equivalent to base.txz.

My EC2 "small" AMIs don't include FreeBSD-lldb. They include the rest of the "devel" set so that people can *build* things but most people don't want to *debug* things on production cloud systems. (And lldb is *huge*.)

Aside from lldb, the exclusions are all straightforward: lib32, tests, and debug symbols.

My EC2 "small" AMIs don't include FreeBSD-lldb. They include the rest of the "devel" set so that people can *build* things but most people don't want to *debug* things on production cloud systems. (And lldb is *huge*.)

i wonder if it makes sense to switch to set-optional and document how to install set-devel if needed; lldb is only 20MB, so i'm surprised that makes a noticable difference to the image size compared to how large all the -dev packages are.

up to you though, but if you start from set-minimal, users won't get new packages added in future releases, which was the problem we were trying to solve with package sets.

on second thought: if lldb is the only special case here, you should switch to set-optional and then add the dev packages you need on top of that. i don't love that, but it's good enough for now.

In D52919#1209189, @ivy wrote:

My EC2 "small" AMIs don't include FreeBSD-lldb. They include the rest of the "devel" set so that people can *build* things but most people don't want to *debug* things on production cloud systems. (And lldb is *huge*.)

i wonder if it makes sense to switch to set-optional and document how to install set-devel if needed; lldb is only 20MB, so i'm surprised that makes a noticable difference to the image size compared to how large all the -dev packages are.

up to you though, but if you start from set-minimal, users won't get new packages added in future releases, which was the problem we were trying to solve with package sets.

Ah, this is an interesting change in 15. On 14.3, /usr/bin/lldb is 100 MB; on 15.0 it's 3 MB + 19 MB of libprivatelldb. The ~80 MB difference between those is libprivatellvm, which is statically linked into llvm binaries on 14.3 by dynamically linked on 15. So... removing lldb is a significant win on 14 (that one binary was ~10% of the disk space) but not useful any more on 15.

Going to fix this differently.