Add Gentoo as a supported OS

Hi,

Does anyone know if it is possible to install pi-hole on a Gentoo system? Also, if it's even remotely possible, what would be involved in doing this?

Thanks!

Moved to Feature Requests so users can vote on it and set the priority of supporting Gentoo and it's package management system.

1 Like

Since it's not currently a supported operating system, (but with enough votes, it could be!) you may want to ask over in Customizing Pi-hole to see if anyone has done it.

Hi,

I would also be interessted in this. I'm currently setting up my gentoo system again, which I will use as a home server/router and of course pi-hole needs to be installed.. somehow :wink:

Have you already tried something on your own, Infmaschine? Maybe any advice/hints? :slight_smile:

Thanks!

I used Gentoo myself back in the days where installing OpenOffice on it took about 12 hours (about 10 or more years ago). At some point I stopped using it because of not seeing any major benefit or speed compared to the distros that ship pre-compiled binaries. I have never tried it since then, but I doubt that it would really make a difference in most cases. According to distrowatch it is ranked as no. 45, which is not really impressive...

Supporting it requires a number of changes in our automated installer. We currently support apt-get, dnf and yum as package managers. If we would add emerge (I remember it being called like this), one would have to sit down and look at the corresponding lines of the installer (see here) and work out an elif section that sets the corresponding variables such that our installer can work with it. If Gentoo has no surprises on handling services, then that might be the only necessary change.

However, we are currently very busy with testing the new FTL engine and will move on to another large-scale change afterwards. So it is unlikely that one out of the developer test will be able to find the time to make himself familiar (again) with Gentoo and dig out the details that are needed. However, we may be able to give (some) support here if you decide to do it yourself. Also, we will be happy to accept a pull request into the installer code (or implement it in case you don't want to do that yourself) once it is in a reliable working condition.

I totally understand that from your point of view gentoo is not an 'interesting' target. For me it's more convenience. I'm using gentoo already about 10 years on my private server and I kind of know what I need to do to keep it running :wink: All my other systems (Desktop/Laptops) have Linux Mint running.

Anyway, on Thursday evening I gave it a try and did basically what you proposed and I had to figure out it's basically it, with a few exceptions, e.g. some USE flag changes may be required. Also there is the default init system in gentoo, openRC, which requires some special handling as well.

Today I got my full system to run the first time with pi-hole enabled. It's still not completely configured and everything, but I wanted to see it running. It ran but I had a horrible performance. Loading a single website took about 30 seconds or more... Not yet sure why, but I guess I'll figure it out later. Currently I don't have as much time as I like for this project, because of other things I work on, but I'm happy to share my modified install script as soon as it's in a reliable state. I have a lot of commented out stuff in there right now, because I did some steps manually.

Hey, It's me again! Long time no see.

I finally had the time to work on the gentoo support, because I wanted to update my Pi-Hole to the new version and had to do all the changes again. I haven't used github yet for any project, and thus I decided to only upload a patch to pastbin, here.
The changes are really not that big. Here's an overview:

  1. Added a gentoo section to the distro_check() function to fill the global variables accordingly.
  2. As gentoo uses OpenRC init system as default, I added checks if the 'service'-command is available before it is used (this also affects the pihole executable).
  3. Added a lighttpd.conf.gentoo
  4. For gentoo, the install-script does not install the dependencies! The script outputs the missing packages and requests the user to install them. This allows the user to review the use flags of the packages and review the comments of portage, since some packages require some further actions after installing them.

I hope this can be integrated into Pi-Hole, so I don't need to redo this work on every update again. Is it okay to just provide this patch? I guess, you would prefer to have a PR on github, right? :wink:

A PR would be best, so we can discuss it with the changes easily.

1 Like

Finally, I guess I kind of successfully created a PR.

1 Like

Hi,
@Graf_Euler it seems to me that there are a couple more issues to solve. OpenRC boot-up script doesn't work, I've got no logs in /var/log/ and further. Could you please help with a couple more details how you made Pi-Hole work on your Gentoo? Thanks

Hello, I need to install pi-hole on gentoo.
Will anyone update patches with gentoo support to the latest pihole version available? RPI 4 1024MB RAM freezes, ddns stops working, and that's not acceptable. I don't want to install the pihole virtual machine from ubuntu. Please help.