Free your Gentoo

The default gentoo installation enables you to install non-free software without noticing. For the free software advocates out there, I hope to make this page an information source for running a gentoo system without non-free software.

First Installation
This is much the same as the usual install, following this guide. There are a couple of things you'll need to change though.

In step 6.b, when adding USE variables, you should add. This will remove non-free binary blobs from your kernel.

Before you close make.conf, you should add the line: make.conf This will mask all ebuilds with non-free licenses.

You can continue with the installation as usual, and the linux-libre kernel will automatically be emerged rather than the usual linux kernel.

Kernel
As above, you will need to add this line to make.conf: make.conf

And then add the flag you your USE variables, before recompiling your kernel.

Re-emerge the kernel source:

Then recompile your kernel.

Other programs
After you've freed your kernel, you need to check your system for other non-free software. If you run

you should see some lines at the end of the output, similar to this: !!! The following installed packages are masked: - app-emulation/virtualbox-ose-additions-3.1.8 (masked by: PUEL license(s)) A copy of the 'PUEL' license is located at '/usr/portage/licenses/PUEL'.

Make a note of the output: these are the packages you need to remove. The chances are that they're a dependency of other pacakages. To reinstall these without the non-free components, see the specific details below. If you find a package which isn't mentioned, please feel free to add it or let me know.

Specific programs
Gentoo might refuse to install some free software if configured as above because they pull in non-free packages. Here is a short list of how to get some specific programs installed in a manner that will keep Gentoo free.

wine
Wine will, by default, try to pull in the nonfree. To disable this, you simply need USE="". Since you probably wont want to apply this system-wide, it's probably a good idea to do this instead:

mplayer
For some strange reason, mplayer seems to want. To disable this, you just need to add to your USE flags. Its probably a good idea to do so systemwide: RAR with its nonfree 30-day evaluation license will only cause problems for free software.

gnome
The metapackage requires, which contains non-free icons. The only solution I've found so far is to use instead, then reinstall the packages you need. It cuts down on a lot of unneeded bulk anyway.

VirtualBox
VirtualBox includes by default. Despite the misleading name, this is actually PUEL licensed. You can disable this using USE="".

Adobe Flash
This program is non-free outright, so it couldn't be part of a fully free system. However, the gnash project supports some flash files. By default, the gnash install is completely free. In order to use youtube, you'll need a greasemonkey script.