Fwd: Support for subpackages in the portstree is going to land soon!

From: Luca Pizzamiglio <pizzamig_at_freebsd.org>
Date: Sun, 17 Dec 2023 20:11:05 UTC
---------- Forwarded message ---------
From: Luca Pizzamiglio <pizzamig@freebsd.org>
Date: Sat, Dec 16, 2023 at 7:36 PM
Subject: Support for subpackages in the portstree is going to land soon!
To: developers <developers@freebsd.org>


Hi everyone.

It's with pleasure that we are announcing that soon the portstree will
support subpackages.

Subpackage is the feature to create multiple packages from one port.
There has been a lighting talk at EuroBSD 2023 (
https://youtu.be/e-FUYbGNdBg?t=824) introducing the topic.
While this feature is used in many Linux distro to split packages (i.e.
-docs, -srcs, -devel, -man or similar), this is *not* the intended goal we
have.
Our primary goal is to get rid of ports that are currently compiled
separately in order to be packaged separately. Examples are php modules or
qt libraries, currently using the so called master/slave port approach.
Build time will benefit from it. The slave ports will become subpackages of
the master port (we can keep the build optional via OPTIONS).
This doesn't mean that all ports based on master/slave need to adopt
subpackages, there will be situations where it won't be possible.

We want to merge the feature in the framework now (end of the year), but
adopt it in ports slowly over the next quarters. To limit the adoption, we
will deploy a git hook server-side to request approval from portmgr before
introducing subpackages for specific ports.
While poudriere (3.4.x) already supports subpackages, other tools don't,
and we want to give time to their maintainer to add support.
The slow adoption will also allow us to catch problems one at a time and
fix them.

The patch is available for review here: https://reviews.freebsd.org/D40549
This implementation is heavily based on mat@ (7 years) old implementation (
https://reviews.freebsd.org/D16457)

We don't have documentation yet, but another patch (
https://reviews.freebsd.org/D43079) containing two fake ports, used to
build and test this feature. They provide the best example of how
subpackages would look like and they will be used to write the
documentation.

The roadmap
* successful EXP-RUN to not introduce regressions (
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=275735#h0)
* add a git hook server-side to allow only controlled adoption
* merge the support of subpackages in the portstree (before 2023.12.31)
* prepare and update the handbook
* success!

There will be a lot of questions, I will answer to all of them, but give me
some time, I could be AFK from time to time during holiday season.

Best regards,
pizzamig on behalf of portmgr