GentooThis forum is for the discussion of Gentoo Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am not entirely sure which part of the forum this belongs in, due to the fact it pertains to install I am gonna guess here. I am moving from OpenBSD to Gentoo and have some questions about modifying the base system. I am extremely, lets say particular, about how my system is setup. I want to make some changes to Gentoo, but have a few questions before I do so. I am looking to trim down base into what I want and need and nothing else. Sadly the GNU Coreutils give me way more than I need or want in my base system, thus I want to slim base down to something like this:
ascii
awk
basename
bc
cal
cleanname
cmp
date
dc
du
dd
diff
echo
factor
fortune
fmt
freq
getflags
grep
hoc
join
look
ls
mk
mkdir
mtime
pbd
primes
rc
read
sha1sum
sed
seq
sleep
sort
split
strings
tail
tee
test
touch
tr
troff
unicode
uniq
unutf
-------
Python
Rsync
Portage
I know to some this is extremely insane and makes no sense, but this is ideal for me. Now, I understand I will need Python and rsync in base as they are required for Portage so I am not removing those. My question here is this, I know some systems such as OpenBSD and FreeBSD will go ballistic if you remove anything from their base. However, those coreutils are built as part of a whole monolithic system (IE a cathedral not a bazar). Will Gentoo go insane if I slim things down? Keeping in mind I am not removing anything that is required for Portage or any huge part of the Gentoo system.
These next few might seem even more insane, bare with me please haha. I would like to replace glib with either libmowgli or libulz. Will this provide any big problems for me? I also intend to remove GNU autoconf/automake, CMake, imake, scons and/or waf (whichever of these are in the base system) in favor of mk. It's important to note that aside from Python, Rcync and Portage I am removing everything to give me what is listed above. Will I have any huge base system problems if I do this? I love OpenBSD's pdksh, I am looking to replace BASH with it. But, the only port I see for Linux is mksh (not the same thing). Am I missing the glorious pdksh port? Alright, the gauntlet. My last inquiry pertains to GCC, I want to replace GCC in favor of 2c or tcc. Can I do this?
These are some of things that I am looking to do. I am building this system for my perfect setup for my main machine, thanks in advance.
While I can't answer your question fully, so I hope you don't mind if I comment on a couple things.
I'm sure you know Gentoo is a meta distribution which allows the user to customize it to fit their needs. However it is strongly recommended not to remove anything from the system set. Which doesn't mean you shouldn't try and go "against the grain" and see what happens but you're going to really need to know what you're doing, or willing to learn and deal with possible headaches. I'm not implying you don't know what you're doing, etc. And I would assume that's the same for modifying the base of any distro, not just Gentoo.
Also, portage uses bash so it's also recommended not to uninstall it.
I'm not a Gentoo user myself, so take this with a grain of salt. I'm looking into trying it out possibly over summer when I have some free time. But this is some of the info I've already come across.
Ugh, you would probably need a lot of hacking and slashing here and there, probably to a point where LFS or rolling your own would make more sense.
Can't comment deeply in all the things you mentioned, but, a couple of pointers that might be useful to you...
A) The system set comprises all these packages, in the system I am writing from anyway.
Code:
# eix -c --system
[I] app-arch/bzip2 (1.0.6-r10(0/1)@21/09/18): A high-quality data compressor used extensively by Gentoo Linux
[I] app-arch/gzip (1.9@05/01/19): Standard GNU compressor
[I] app-arch/tar (1.32@26/03/19): Use this to make tarballs :)
[I] app-arch/xz-utils (5.2.4-r2@22/03/19): utils for managing LZMA compressed files
[I] app-shells/bash (4.4_p23-r1@16/01/19): The standard GNU Bourne again shell
[I] net-misc/iputils (20180629@05/04/19): Network monitoring tools including ping and ping6
[I] net-misc/rsync (3.1.3@25/02/18): File transfer program to keep remote files into sync
[I] net-misc/wget (1.20.1@05/01/19): Network utility to retrieve files from the WWW
[I] sys-apps/baselayout (2.6-r1@25/12/18): Filesystem baselayout and init scripts
[I] sys-apps/busybox (1.29.3@25/12/18): Utilities for rescue and embedded systems
[I] sys-apps/coreutils (8.30@19/01/19): Standard GNU utilities (chmod, cp, dd, ls, sort, tr, head, wc, who,...)
[I] sys-apps/diffutils (3.6-r1@24/08/18): Tools to make diffs and compare files
[I] sys-apps/file (5.36@25/03/19): identify a file's format by scanning binary data for patterns
[I] sys-apps/findutils (4.6.0-r1@08/06/16): GNU utilities for finding files
[I] sys-apps/gawk (4.1.4@04/01/18): GNU awk pattern-matching language
[I] sys-apps/grep (3.1-r1@25/12/18): GNU regular expression matcher
[I] sys-apps/iproute2 (4.17.0-r1@25/12/18): kernel routing and traffic control utilities
[I] sys-apps/kbd (2.0.4@29/01/18): Keyboard and console utilities
[I] sys-apps/less (531@21/09/18): Excellent text file viewer
[I] sys-apps/man-pages (4.16@30/09/18): A somewhat comprehensive collection of Linux man pages
[I] sys-apps/net-tools (1.60_p20180626073013@25/12/18): Standard Linux networking tools
[I] sys-apps/sed (4.5@22/07/18): Super-useful stream editor
[I] sys-apps/util-linux (2.33-r1@25/03/19): Various useful Linux utilities
[I] sys-apps/which (2.21@04/06/16): Prints out location of specified executables that are in your path
[I] sys-devel/binutils (2.31.1-r4(2.31)@05/04/19): Tools necessary to build programs
[I] sys-devel/gcc (8.2.0-r6(8.2.0)@26/02/19): The GNU Compiler Collection
[I] sys-devel/gnuconfig (20170101@10/01/18): Updated config.sub and config.guess file from GNU
[I] sys-devel/make (4.2.1-r4@21/09/18): Standard tool to compile source trees
[I] sys-devel/patch (2.7.6-r2@21/09/18): Utility to apply diffs to files
[I] sys-fs/e2fsprogs (1.44.5@16/01/19): Standard EXT2/EXT3/EXT4 filesystem utilities
[I] sys-process/procps (3.3.15-r1(0/6)@03/06/18): standard informational utilities and process-handling tools
[I] sys-process/psmisc (23.1-r1@22/07/18): A set of tools that use the proc filesystem
[I] virtual/dev-manager (0-r2@25/12/18): Virtual for the device filesystem manager
[I] virtual/editor (0-r2@25/12/18): Virtual for editor
[I] virtual/libc (1@03/10/16): Virtual for the C library
[I] virtual/man (0-r2@23/01/19): Virtual for man
[I] virtual/modutils (0@06/06/15): Virtual for utilities to manage Linux kernel modules
[I] virtual/os-headers (0@06/06/15): Virtual for operating system headers
[I] virtual/package-manager (1@29/04/18): Virtual for the package manager
[I] virtual/pager (0@06/06/15): Virtual for command-line pagers
[I] virtual/service-manager (0@04/06/15): Virtual for various service managers
[I] virtual/shadow (0@06/06/15): Virtual for user account management utilities
[I] virtual/ssh (0@04/06/15): Virtual for SSH client and server
B) ebuilds are, basically, bash scripts, and they depend (or at least used to depends) on bashism, so you are going to need bash, no matter what you do.
C) Gentoo is built around gcc+glibc. There have been a number of attempts to substitute them with things like icc or musl, uclibc... You can probably google for that and see how far they went (I truly have no idea). Seeing that there's a virtual ebuild for libc, you probably have some starting point there to roll your own in that regard.
D) If you want to deviate from the standard package set, reading about /etc/portage/profile/package.provided will be useful. In that config file you can tell portage to ignore certain package(s). For example, I download and compile my own kernels outside of portage, so I have this line in package.provided: sys-kernel/gentoo-sources-9999. That way, portage thinks that version 9999 of the kernel is installed, even though it is not, and it won't bother me about installing kernel updates. To all effects, the package manager will believe that this package is installed which comes in handy when resolving dependencies. Of course, when you use this you gotta keep the pieces. In this case, the side effects are very little (mostly, packages depending on kernel code will expect that a kernel tree can be found under /usr/src/linux so you have to manually keep that link accessible). For other packages the implications might not be that trivial to solve.
It appears there is an experimental hardened/musl profile so I shall watch that. Not gonna lie it's extremely infuriating to see this system depend on things like GCC, Glibc, bash, python etc. I guess I am crazy, but base should be minimal as possible and be pure C code. I'll get hacking though
What "base" should be depends on who you ask to. That's why there are virtuals, use flags, etc.
Same goes for languages. Not even the kernel is "pure C".
No one stops you from contributing back improvements, just like in any other open source project. They are usually better welcome if they don't collide with that's already working.
It's only logical that the people who did the work made the design choices they thought were better at the momment.
As I said above, if you have to trash the whole skyscrapper thing to rebuild it again, you probably should be using something that's more basic and doesn't get in the middle, such as LFS.
Gentoo without bash or python can be read as "Gentoo without portage", wich can be read as "not Gentoo at all".
Just for the sake of completeness: there have been a number of attempts to implement the portage functionality with something else than python. Paludis comes to mind... I have no idea how far they went or how actively these projects are maintained nowadays. Just a pointer in case it's useful to you.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.