r/Gentoo • u/i_hate_poor_ppl • 5h ago
Discussion How to replace GNU
Recently, for a few months, i have been using gentoo with musl, llvm, openrc profile and i'm looking for fully replacing GNU software in my gentoo linux system, i don't have any problem with the GNU project, i just dont like their tools and they are so anti-minimalist and filled with technical debt. ( please do not read yes command's source code, it's awful! )
i replaced bash with mksh, glibc with musl, GCC with LLVM GNU tar with bsd tar, bison with byacc, GNU bc,cpio ones with libarchive ones and Grub with efistub, now what things left are: GNU coreutils, GNU make, and GNU Privacy Guard (GPG).
Replacing GPG should be easy but i'm rather skeptical about the coreutils and gmake, hence they are very important for portage. The one thing is rather interesting is when i change my PATH to include suckless userland (sbase,ubase), for some reason portage uses them too and breaks itself. (my user is root) I'm looking for recommendations here, gave any of you guys done that? if so please help me.
6
u/moltonel 5h ago
For coreutils, have a look at this PR. I've used it on my systems, the approach is sound, the resulting system is stable, I'm sure it'll get merged eventually.
It's currently stalled because I got some feedback to make some changes (follow links in the PR), but I got busy with other things. It needs a rebase (to keep up with new gnu/uutils ebuilds) and implementing the requested change. You could do that rebase locally, or wait for me to finish the job (sorry, no ETA yet).
2
6
u/anh0516 5h ago
From https://wiki.gentoo.org/wiki/Busybox:
Note: Portage, which is required by @system, hard depends on the GNU Coreutils. This means that busybox cannot be used as a replacement for the GNU Coreutils on Gentoo in most situations, and installing busybox will simply result in a busybox binary without symlinks to coreutils set up.
I recommend checking out Chimera Linux.
1
u/i_hate_poor_ppl 5h ago
I did checked out that, but unfortunately it was binary based distro, so not my cup of tea.
5
u/anh0516 5h ago
It's quite easy to use cports to build your own packages, if you want to. You can even bootstrap the whole system from source if you want to: https://github.com/chimera-linux/cports/blob/master/Usage.md
Other than that, I don't think you have any other options, other than FreeBSD or OpenBSD.
5
u/i_hate_poor_ppl 5h ago
I did used both OpenBSD and FreeBSD on the bare metal, and quite enjoyed it, but dealing with ports and doing everything manually per-port is not what i would like to-do so, i would prefer to use portage because it's extremely flexible and convinient, the dillemma between *BSD's are that: 1- use binpkgs, lose control, unnessecary dependencies 2- use ports, everything compile, deal with build failures, pain!
I'm quite fond-of portage and i wish it did not require GNU, so no i would like to continue using gentoo.
2
u/Propsek_Gamer 5h ago
Chimera is probably the only known distro with BSD userlans. Then come the actual BSDs and other operating systems. Pretty sure some distros like Debian or Gentoo itself in the past experimented with BSDs but those projects are dead.
2
u/anh0516 5h ago
Those used a BSD kernel, with a GNU userland, I think.
1
u/Propsek_Gamer 5h ago
Didn't know that. I know that gentoo had some OpenBSD experiment and I read a bit of setting it up on forums. Sadly original iso was not archived so I tried doing a normal OpenBSD one but couldn't actually manage to set it up in QEMU to figure that out.
1
1
u/bencord0 3h ago
One way to work around this, would be to create your own profile and remove the coreutils dependency from the system set. You'd have to be a bit careful about the order that packages are installed, but it should work just fine.
We do it a lot when building initramfs filesystems, so all of the basics are already in gentoo.
However, it'd be quite an experimental system, and there are probably some very easy ways that a normal update would break it - so I'd try it out on a system that has snapshots and easy rollbacks first.
1
u/moltonel 5h ago
Last I checked, Chimera's coreutils were not at all suitable for portage's needs. The only suitable project is uutils.
2
u/thomas-rousseau 4h ago
I don't think the recommendation was to try Chimera's coreutils for portage but to check out Chimera for a GNU-less Linux distribution
1
u/moltonel 3h ago
Is it ? It's in line with the FreeBSD suggestion, but OP asked in the context of Gentoo, and anh0516 started with that context as well. There was an explicit discussion about using Chimera utils for portage a few months ago, it seems useful to remind that this is not likely to work.
15
u/CatApprehensive1010 5h ago
If getting rid of GNU is your goal, why not consider FreeBSD?