Looking to contribute code / OS validation to Pi-hole

Hello Pi-hole team & community!

I am looking to contribute to Pi-hole.

However, I am new-ish to contributing to open-source as a whole, so apologies in advance if I'm missing something that's blatantly obvious. I do have a GitHub, so I got that going for me :slight_smile:

Back to brass tacks - I saw this post on "help with contributing" to pi-hole, which helped me a bit, but with it dated 2021 I figured a fresh post would be beneficial to the whole community.

To be clear, my objectives are to test, validate, and bring Pi-Hole compatibility to:

  • Ubuntu 26.04 and later LTS releases (this appears to be covered in this pull request unless I am mis-reading something)
  • openSUSE LEAP compatibility (Specifically LEAP and not Tumbleweed as the latter is a rolling release)

How and where can I get started?

The latest Pi-hole version is compatible with Ubuntu 26.
There are automatic tests for many Ubuntu versions, including 26: pi-hole/test at master · pi-hole/pi-hole · GitHub

In the past we discussed the possibility of adding this OS to the tests, but since no one from the team uses openSUSE, we are not comfortable about adding it to the officially supported OS list. We don't have time and resources to test Pi-hole on every possible OS.

I'm not saying we will never make it compatible to other operating systems (it would be nice to know if Pi-hole works on other operating systems. Maybe it is already compatible openSUSE). We just aren't able to guarantee it will always work.

You can start by trying to install Pi-hole in openSUSE and reporting your findings.

Ah, so I did read the github pull request proper! :slight_smile: Much appreciated!

Ok and that's exactly where I was going to start.

Now, where shall I report my findings, I assume GitHub? Or, Is a post in this discourse sufficient? Please point me in the correct direction. Appreciate your patience!

There have been previous attempts at SUSE compatibility: https://github.com/pi-hole/pi-hole/pull/5001, Make install script compatible with openSUSE by yubiuser · Pull Request #5083 · pi-hole/pi-hole · GitHub and most recently by me: Add support for opensuse leap 15.6 by darkexplosiveqwx · Pull Request #6200 · pi-hole/pi-hole · GitHub

I was trying out SUSE and decided to work on some support, but the PR died down once I stopped using it.

You may take them as inspiration and reference for your own work.

Even while Work-in-Progress, you may open a draft PR where we can give preliminary feedback if you want.

Great to know and appreciate the resources!

I've already tried installing Pihole on opensuse16 however I'm running into selinux issues, which doesn't surprise me at all.

It's worth noting, that while SELinux is enabled by default on OpenSuSE, and is toggleable in the OS installer, my goal is to install pihole on a standard opensuse image....

Running basic-install.sh fails to recognize env variable PIHOLE_SELINUX=true, which I believe is a bug and as such I'll put in a PR request soon enough as per previous posts.

Are you sure the variable is not recognized?

Maybe the issue is on the other SELINUX checks.

If the checks above fail, SELINUX_ENFORCING will never be set and the next if block will fail, even if PIHOLE_SELINUX=true variable is correctly set:

Sorry, just seeing this now. I already opened a bug report on Github on the same.

I ran lines 1684, 1695 independently to verify as standard debug practice. Both show what I would expect, so I believe this is a bug.

mbrouil3@bossvcosslab2:\~> awk -F= '/^SELINUX=/ {print $2}' /etc/selinux/config 
enforcing 
mbrouil3@bossvcosslab2:\~> ls /etc/selinux/config 
/etc/selinux/config 
mbrouil3@bossvcosslab2:\~> getenforce 
Absolute path to 'getenforce' is '/usr/sbin/getenforce', so running it may require superuser privileges (eg. root). 
mbrouil3@bossvcosslab2:\~> sudo getenforce 
[sudo\] password for mbrouil3:  
Enforcing 
mbrouil3@bossvcosslab2:\~>

EDIT: I am already getting responses & feedback on my github bug report, so probably best to continue the conversation there vs here. I don't want to post the same thing in two different places if I can help it.