Re: Using a combination of ports and pkg

From: Muhammad Moinur Rahman <bofh_at_freebsd.org>
Date: Mon, 20 Dec 2021 23:43:31 UTC

> On 21 Dec, 2021, at 00:14, Dan Mahoney (Gushi) <freebsd@gushi.org> wrote:
> 
> All,
> 
> I've been wanting a thing from the ports tree for a long, long time:
> 
> I am building port X, but changing one option.  It has a bunch of runtime dependencies, and a bunch of build-time dependencies.
> 
> I only want to build *that port* bespoke.  All the dependencies, I want to install via pkg.  Assume I know that to build from quarterly ports, I need to be following quarterly pkg.  Assume that I know I need to pkg lock my port and only upgrade it again via ports.
> 
> For the sake of argument, let's assume I'm doing this on a tiny embedded non-x86 system, where I can't just build offboard, where building that port could mean days of time.
> 
> There's no option for pkg install build-depends-of-thing-X or pkg install runtime-depends-of-thing-X.  The best you can do is pkg install thing-x; pkg uninstall thing-x; cd /usr/ports/misc/thing-X, make, crap-crap-crap, ctrl c, pkg-install a run-depend, try again.  (Or read the makefiles, which with USES= don't always tell you the whole story.)
> 
> I mean, it's feasible once you have a running system, even if it's hard to reproduce.
> 
> This has been what life with the port tree is like for decades.  I've gotten used to this to, say, build apache with mod_suexec.
> 
> It's silly, but that's the best workflow I've got, absent other tools like portmaster or whatnot (which don't solve this either).
What about portmaster -P in case you are just a user?

> ==
> 
> But then, assume I'm either a budding port maintainer, or I'm just plain insane and bother to spin up an entire poudriere install just for this, so I can pkg install my modified port.  (Maybe my $dayjob maintains their own build of $software just in case there's a zero-day CVE, for example)
> 
> And so, for, say, opendmarc (which I am the actual maintainer of, and about to put out a new release of), that means in order to poudriere testport one package, I need to build 118.  On two architectures (x86/x86-64). * On two releases (12/13). * On two versions of the ports tree (quarterly and head).  And trust that people won't hit issues on the platforms I'm not testporting on like ARM.
Currently you don’t need to explicitly test on i386 after 12.3 as they are not Tier-1 anymore. And quarterly test is also not mandatory as quarterly snapshots were taken when your port actually built successfully. So in case there are problems you will be notified by pkg-fallout@. For my purpose(500+ ports) I use 4 builders 12.3 (i386+amd64), 13.0 amd64 and HEAD amd64. And I have a Raspbery pi4. My ports tree are built with the updates only every night except Raspberry Pi which does it every 2 days.

> For 99 percent of that, I'm just building the same exact things I could pkg install, which poudriere gives me no way to do in a jail.
Noops. Let’s say a dependent of the dependent of your port has been changed, in that case the dependents of the dependents should also be rebuilt because it might affect the build of your port. And in most cases you won’t get the packages as latest is also nearly lacking by 7 days in worst cases. My 500+ ports require nearly 1800+ ports to be built but normally in rare cases the 1800 ports are rebuilt. Normally everyday it’s somewhere in between 20-100 ports that are being rebuilt.

> Is this...normal?  Is this what one expects a new porter to do?  Or am I making too much work for myself?
YES. :D

> -Dan
> 
> --
> 
> --------Dan Mahoney--------
> Techie,  Sysadmin,  WebGeek
> Gushi on efnet/undernet IRC
> FB:  fb.com/DanielMahoneyIV
> LI:   linkedin.com/in/gushi
> Site:  http://www.gushi.org
> ---------------------------
> 
>