Date: Tue, 3 Sep 2024 15:36:07 -0400 From: David Cross <dcrosstech@gmail.com> To: Poul-Henning Kamp <phk@phk.freebsd.dk> Cc: freebsd-hackers@freebsd.org Subject: Re: It's not Rust, it's FreeBSD (and LLVM) Message-ID: <159D15FA-6235-484C-A54A-565E3CDEA690@gmail.com> In-Reply-To: <202409031532.483FW0If007252@critter.freebsd.dk> References: <202409031532.483FW0If007252@critter.freebsd.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
> On Sep 3, 2024, at 11:32=E2=80=AFAM, Poul-Henning Kamp <phk@phk.freebsd.dk= > wrote: >=20 > =EF=BB=BFWhat is FreeBSD ? > ----------------- >=20 > Forget Rust for the moment, I promise I will come back to it. >=20 > FreeBSD as a project was created almost entirely as protest against > the incompetent "UNIX-industry" as it existed around 1990. >=20 > One of the stupidities we reacted against, was the unbundling of > the C-compiler: If you bought a UNIX system, the C-compiler would > cost you extra, even through everybody knew that the vendor got it > as part of their source license from AT&T. >=20 > So from the very start, FreeBSD decided to deliver "A complete UNIX > system with full source" and the only concession was that, hard > disks costing what they did, you could choose to not install the > manual pages and the source code on systems which did not need them. >=20 > ('make world' celebrated 30 years last month! See: 3540f0e14a8) >=20 > The only compiler we had source code for was GCC. We would have > preferred a different license, but we had no choice at the time. >=20 > There were people who, reasonably, thought that X11 was also part > of a "complete UNIX system", but the reality of 1.2MB "3D-printed > save icons" made that a total non-starter, and therefore the ports > collection is FreeBSD's barely younger twin. >=20 > The source tree became our citadel: "FreeBSD is src". If something > was not in src, it was not FreeBSD. >=20 > Buildworld or bust. >=20 > The fight at the gate was fierce at times. >=20 > Delivering a single consistent userland with the kernel has stood > us well for three decades, and we should stick with that. >=20 > But the world has changed, and we all know it, which is why ports, > pkg, freebsd-update and pkgbase exist. >=20 > A FreeBSD system with no installed ports is a rarity today. >=20 > Not even a FreeBSD developers test-machine can avoid git-lite, but > such machines do exist, typically in embedded applications. >=20 > But a FreeBSD system recompiling itself from source is even rarer. >=20 > And when it does, LLVM, source code we import verbatim from an > entirely different project, and which no sane person would call > "Related to FreeBSD", takes up more than three quarters of the > compile time. >=20 > That is objectively absurd. >=20 > The only reason we do that, is because we stil have that outdated > "FreeBSD is src" emotional hangup. >=20 > We need to find a contemporary and useful answer to "What is FreeBSD?" >=20 >=20 > The only answer I can think of > ------------------------------ >=20 > "FreeBSD is ports (some of those ports contain the kernel and userland)" >=20 > As part of the migration, we yank LLVM out of the src. >=20 > LLVM does not belong in src by any sane criteria, and any microscopic > benefits of "tight integration" can be delivered with a "toolchain-llvm" > (meta-)port. >=20 > Our minimal install images will contain: >=20 > The installer > The kernel package(s) > The userland package(s) >=20 > "pkg upgrade" also upgrade kernel and userland packages - Welcome to > the century of the fruitbat. >=20 > The "normal install images will also contain: >=20 > The src package(s) > the source code built into kernel and userland packages > The toolchain package(s) > the package used to build the kernel and userland packages > The ports package(s) > the ports tree used to build the toolchain package(s) > All distribution files necessary to build the toolchain package(s) >=20 > (The "toolchain-llvm" (meta-)port may have to be a short-cut, to > not have the llvm port drag in everything and the kitchen-sink, > which would be /precisely/ the same as the llvm which lives in src > today.) >=20 > This distribution format is neither more nor less perfect with > respect to reproducible builds and "Reflections on trusting trust" > than what we have today. >=20 > And yes, we have ports written in Rust, why do you ask? >=20 > Poul-Henning >=20 > PS: I overdosed on release work 25+ years ago, and have not been > paying them much attention since, but if this is what the pkgbase > crew has been pushing for more than a decade, we all owe them an > apology. As a quick note I constantly build freebsd from source. I do it for all of m= y systems for all updates, all patch releases.=20 I may be an outlier here, but my impression from email, forum posts, and red= it threads suggests it is at least somewhat common.=20 There are ways to marry both worlds (like poudriere, which I also use to man= age my empire), but I=E2=80=99d like to not completely discount the usecase;= at the very least the ease of buildworld is important for the releasee engi= neering process itself.=20=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?159D15FA-6235-484C-A54A-565E3CDEA690>