Re: /usr/src and /usr/ports not git directories ?
Date: Thu, 23 Jan 2025 00:03:14 UTC
Gleb, On Tuesday, January 21, 2025 9:09:43 PM CET Gleb Smirnoff wrote: > I have same observations: /usr/src and /usr/ports as is is an atavism. > > I have already once tried this statement at a smaller audience - a > Russian-speaking telegram channel. One meaningful feedback I got > is that people may occasionally build stuff from ports and also > some ports (e.g. drm-kmod, lsof) need /usr/src. So in my opinion > these sources as is are useful for a very minor group of people, > those who aren't really developers/hackers, but for some reason > are not fully satisfied with binary packages. please don't underestimate the impact of this. Up until very recently, it was absolutely mandatory to build the drm-*-kmod from ports, because the pre-built packages were tied to the release version of the builders. Unless you were willing to update your machine exactly at the same time as the builders, you'd be greeted with kernel panics if you didn't build from ports. Means this "minor group" is probably the majority of GUI users. Also the src tree has to be installed in every poudriere jail, which can multiply the increase of used disk space in some cases. > > I think that /usr/src and /usr/ports as part of FreeBSD release > distribution should just go away. But we should provide a one liner > command to get them in a proper way (shallow git checkout). It's not exactly clear to me what problem you want to solve? As a developer or someone doing src builds, updates are coming through git and packaging is not that relevant. Sure a one-liner would be nice. IIRC DragonflyBSD had those in a Makefile, that was quite convenient. Does installing the src tree as a git repo have any tangible benefits over that? OTOH, for average users on binary updates, install and packaging is much more relevant, to guarantee consistent updates of the src tree. Ideally, the src tree would be kept read-only. I suspect that if we make it a git repo, people will be encouraged to checkout different versions, and unwittingly mess up port builds. Or make changes in there which will prevent the binary updates, even if it's only the checkout of the new shallow git tree. Best regards, Flo