Unsupported/binary branch: 1 proposal and 1 question

How can we make installation/upgrade on unsupported devices a bit better :

Debian Armel/Kirkwood/ARMv5TE, other old boards, or SoC's without current official Pi-hole support

@yubiuser , and any other dev who reads this... thank you for your help in making this smoother for us. Perhaps there will be new risc-v board that needs this "unsupported" in the coming months or years... as well as some of these older boards or "not-quite-raspberry-pi's"...

1. Proposal for a patch to smooth out the update system for unsupported arch's. I think it would make a good addition to what is already present in the unsupported/binary branch.

Currently the upgrade.sh script doesn't recognize the PIHOLE_SKIP_FTL_CHECK env variable, and we see the behavior below, where it incorrectly identifies/states FTL: update available and fruitless output after that...

root@debian-armel-trixie:/opt/pihole# PIHOLE_SKIP_OS_CHECK=true PIHOLE_SKIP_FTL_CHECK=true ./update.sh
  [i] PIHOLE_SKIP_OS_CHECK env variable set to true - installer will continue
  [βœ“] Update local cache of available packages
  [βœ“] Building dependency package pihole-meta.deb
  [βœ“] Installing Pi-hole dependency package

  [i] Checking for updates...
  [i] Pi-hole Core:	up to date
  [i] Web Interface:	up to date
  [i] FTL:		update available

  [i] FTL out of date, it will be updated by the installer.

  [βœ“] Root user check

        .;;,.
        .ccccc:,.
         :cccclll:.      ..,,
          :ccccclll.   ;ooodc
           'ccll:;ll .oooodc
             .;cll.;;looo:.
                 .. ','.
                .',,,,,,'.
              .',,,,,,,,,,.
            .',,,,,,,,,,,,....
          ....''',,,,,,,'.......
        .........  ....  .........
        ..........      ..........
        ..........      ..........
        .........  ....  .........
          ........,,,,,,,'......
            ....',,,,,,,,,,,,.
               .',,,,,,,,,'.
                .',,,,,,'.
                  ..'''.

  [i] SELinux not detected
  [βœ“] Update local cache of available packages

  [βœ“] Checking apt-get for upgraded packages... 13 updates available
  [i] It is recommended to update your OS after installing the Pi-hole!

  [βœ“] Building dependency package pihole-meta.deb
  [βœ“] Installing Pi-hole dependency package

  [i] PIHOLE_SKIP_OS_CHECK env variable set to true - installer will continue
  [i] PIHOLE_SKIP_FTL_CHECK env variable set to true - skipping architecture check
  [i] Performing unattended setup, no dialogs will be displayed
  [i] Resetting local repos
  [βœ“] Resetting repository within /etc/.pihole...
  [βœ“] Resetting repository within /var/www/html/admin...
  [βœ“] Checking for user 'pihole'
  [i] PIHOLE_SKIP_FTL_CHECK env variable set to true - skipping FTL binary installation
  [βœ“] Installing scripts from /etc/.pihole

  [i] Installing configs from /etc/.pihole...

  [βœ“] Installing latest Cron script

  [i] Installing latest logrotate script...
	[i] Existing logrotate file found. No changes made.
  [βœ“] man pages installed and database updated
  [i] Testing if systemd-resolved is enabled
  [i] Systemd-resolved is not enabled
  [i] Restarting services...
  [βœ“] Enabling pihole-FTL service to start on reboot...
  [i] Restarting pihole-FTL service...System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to system scope bus via local transport: Host is down

  Unable to complete update, please contact Pi-hole Support
root@debian-armel-trixie:/opt/pihole# 

This patch provides a way for the user to more accurately determine a proper action and provide correct (or at least less erroneous) output. Corrected/appropriate output from it is also shown below. From my testing, it doesn't seem to alter behavior on supported systems.

root@debian-armel-trixie:/opt/pihole# cat /fix_FTLcheckupdate_for_PIHOLE_CHECK_FTL_SKIP.patch 
--- update.sh-orig	2025-03-05 07:39:23.251302130 -0600
+++ update.sh	2025-03-05 07:26:34.755000097 -0600
@@ -151,7 +151,11 @@
     local binary
     binary="pihole-FTL${funcOutput##*pihole-FTL}" #binary name will be the last line of the output of get_binary_name (it always begins with pihole-FTL)
 
-    if FTLcheckUpdate "${binary}" &>/dev/null; then
+
+    if [[ "$PIHOLE_SKIP_FTL_CHECK" == true ]]; then
+        FTL_update=false
+        echo -e "  ${INFO} FTL:\\t\\t${COL_LIGHT_GREEN}PIHOLE_CHECK_FTL_SKIP env variable set to true, skipping FTL update check${COL_NC}"
+    elif [ "$PIHOLE_SKIP_FTL_CHECK" != true ] && [ FTLcheckUpdate "${binary}" &>/dev/null ] ; then
         FTL_update=true
         echo -e "  ${INFO} FTL:\\t\\t${COL_YELLOW}update available${COL_NC}"
     else

The patch maintains the function of the case structure that follows (note the placement of the test FTLcheckUpdate "${binary}" &>/dev/null at the end of the elif block.)

The output and function can be seen below...

root@debian-armel-trixie:/opt/pihole# PIHOLE_SKIP_OS_CHECK=true PIHOLE_SKIP_FTL_CHECK=true ./update-psfc.sh 
  [i] PIHOLE_SKIP_OS_CHECK env variable set to true - installer will continue
  [βœ“] Update local cache of available packages
  [βœ“] Building dependency package pihole-meta.deb
  [βœ“] Installing Pi-hole dependency package

  [i] Checking for updates...
  [i] Pi-hole Core:	up to date
  [i] Web Interface:	up to date
  [i] FTL:		PIHOLE_CHECK_FTL_SKIP env variable set to true, skipping FTL update check

  [βœ“] Everything is up to date!
  1. Question regarding the unsupported/binary branch.
    Will this branch eventually be merged into master?

Thanks again for you help and consideration.

Dave

I think the elif only needs the FTLcheckUpdate test, i.e. this.

elif FTLcheckUpdate "${binary}" &>/dev/null; then

It can only make it to this elif if $PIHOLE_SKIP_FTL_CHECK is not true.

1 Like

Good point. Thanks for the look.

I went an other way and skipped the whole FTL section if the env var is set

Please add such (helpful!) comments to the corresponding PR at Allow users to skip binary check and installing FTL in case the use a self-compiled binary by yubiuser Β· Pull Request #6022 Β· pi-hole/pi-hole Β· GitHub

1 Like

I did a git pull on the unsupported/binary branch, and ran two (2) commands, and output is shown for each of them, feedback at very bottom:

  • pihole-up PIHOLE_SKIP_OS_CHECK=true PIHOLE_SKIP_FTL_CHECK=true pihole -up
  • basic-install.sh PIHOLE_SKIP_OS_CHECK=true PIHOLE_SKIP_FTL_CHECK=true basic-install.sh
root@debian-armel:/etc/.pihole# PIHOLE_SKIP_OS_CHECK=true  PIHOLE_SKIP_FTL_CHECK=true pihole -up
  [i] PIHOLE_SKIP_OS_CHECK env variable set to true - installer will continue
  [βœ“] Update local cache of available packages
  [βœ“] Building dependency package pihole-meta.deb
  [βœ“] Installing Pi-hole dependency package

  [i] Checking for updates...
  [i] Pi-hole Core:	up to date
  [i] Web Interface:	up to date
  [i] FTL:		PIHOLE_SKIP_FTL_CHECK env variable set to true - update check skipped

  [βœ“] Everything is up to date!

For basic-install.sh:

root@debian-armel:/etc/.pihole# PIHOLE_SKIP_OS_CHECK=true  PIHOLE_SKIP_FTL_CHECK=true automated\ install/basic-install.sh 

  [βœ“] Root user check

        .;;,.
        .ccccc:,.
         :cccclll:.      ..,,
          :ccccclll.   ;ooodc
           'ccll:;ll .oooodc
             .;cll.;;looo:.
                 .. ','.
                .',,,,,,'.
              .',,,,,,,,,,.
            .',,,,,,,,,,,,....
          ....''',,,,,,,'.......
        .........  ....  .........
        ..........      ..........
        ..........      ..........
        .........  ....  .........
          ........,,,,,,,'......
            ....',,,,,,,,,,,,.
               .',,,,,,,,,'.
                .',,,,,,'.
                  ..'''.

  [i] SELinux not detected
  [βœ“] Update local cache of available packages

  [βœ“] Checking apt-get for upgraded packages... 38 updates available
  [i] It is recommended to update your OS after installing the Pi-hole!

  [βœ“] Building dependency package pihole-meta.deb
  [βœ“] Installing Pi-hole dependency package

  [i] PIHOLE_SKIP_OS_CHECK env variable set to true - installer will continue
  [i] PIHOLE_SKIP_FTL_CHECK env variable set to true - skipping architecture check
  [βœ“] Check for existing repository in /etc/.pihole
  [βœ“] Update repo in /etc/.pihole

  [βœ“] Check for existing repository in /var/www/html/admin
  [i] Update repo in /var/www/html/admin...HEAD is now at 25441178 Pi-hole Web v6.0.2 (#3272)
  [βœ“] Update repo in /var/www/html/admin

  [βœ“] Checking for user 'pihole'
  [i] PIHOLE_SKIP_FTL_CHECK env variable set to true - skipping FTL binary installation
  [βœ“] Installing scripts from /etc/.pihole

  [i] Installing configs from /etc/.pihole...

  [βœ“] Installing latest Cron script

  [i] Installing latest logrotate script...
	[i] Existing logrotate file found. No changes made.
  [βœ“] man pages installed and database updated
  [i] Testing if systemd-resolved is enabled
  [i] Systemd-resolved is not enabled
  [i] Restarting services...
  [βœ“] Enabling pihole-FTL service to start on reboot...
  [βœ“] Restarting pihole-FTL service...
  [βœ“] Deleting existing list cache
  [βœ“] DNS resolution is available

  [i] Neutrino emissions detected...

  [βœ“] Preparing new gravity database
  [βœ“] Creating new gravity databases
  [βœ“] Pulling blocklist source list into range
  [i] Using libz compression

  [i] Target: https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
  [βœ“] Status: No changes detected
  [βœ“] Parsed 131270 exact domains and 0 ABP-style domains (blocking, ignored 0 non-domain entries)

  [i] Target: https://raw.githubusercontent.com/AdAway/adaway.github.io/master/hosts.txt
  [βœ“] Status: No changes detected
  [βœ“] Parsed 6540 exact domains and 0 ABP-style domains (blocking, ignored 0 non-domain entries)

  [i] Target: https://raw.githubusercontent.com/matomo-org/referrer-spam-blacklist/master/spammers.txt
  [βœ“] Status: No changes detected
  [βœ“] Parsed 2300 exact domains and 0 ABP-style domains (blocking, ignored 0 non-domain entries)

  [βœ“] Building tree
  [i] Number of gravity domains: 140110 (133550 unique domains)
  [i] Number of exact denied domains: 7
  [i] Number of regex denied filters: 5
  [i] Number of exact allowed domains: 1
  [i] Number of regex allowed filters: 0
  [βœ“] Optimizing database
  [βœ“] Swapping databases
  [βœ“] The old database remains available
  [βœ“] Cleaning up stray matter

  [βœ“] Done.

  [i] The install log is located at: /etc/pihole/install.log
  [βœ“] Update complete! 

Core
    Version is v6.0.4-41-gba6ff72a (Latest: null)
    Branch is unsupported/binary
    Hash is ba6ff72a (Latest: ba6ff72a)
Web
    Version is v6.0.2 (Latest: v6.0.2)
    Branch is master
    Hash is 25441178 (Latest: 25441178)
FTL
    Version is v6.0.3 (Latest: v6.0.4)
    Branch is master
    Hash is 37f9a96e (Latest: b7eb53bf)

Feedback

To me, these both look good. The switch to yellow text for env var/flag info/NOTICE is something that I'd wondered about - it makes sense... to me green means go!, yellow = caution, so nice choice on that change.

I'll try this w/ a v5->v6 upgrade, as well as a v6 bare install, later this weekend.

:+1: :raised_hands:

This works as expected on my ARMv5TE Pogoplugs... nice!

I upgraded both of them (main Pogoplug v2 w/ 256MB, backup Pogoplug v4 w/128MB) and am pleased w/ how they perform. I had to do some tuning and pruning on the v4 to get it to be happy wrt memory usage, but it works well now and is not overwhelmed even when hit hard w/ lots of requests.

:+1:

PiHole1-B388:/etc# PIHOLE_SKIP_OS_CHECK=true  PIHOLE_SKIP_FTL_CHECK=true        PIHOLE_SKIP_OS_CHECK=true  PIHOLE_SKIP_FTL_CHECK=true 
  [i] PIHOLE_SKIP_OS_CHECK env variable set to true - installer will continue
  [βœ“] Update local cache of available packages
  [βœ“] Building dependency package pihole-meta.deb
  [βœ“] Installing Pi-hole dependency package

  [i] Checking for updates...
  [i] Pi-hole Core:	up to date
  [i] Web Interface:	up to date
  [i] FTL:		PIHOLE_SKIP_FTL_CHECK env variable set to true - update check skipped

  [βœ“] Everything is up to date!

Any timeframe for when we might see these changes migrated over to the master repository?

This pull request has not been reviewed and is not even part of development yet. So there is no ETA for a master release.

Thank you, @yubiuser. I’ll watch patiently.