Fresh install gets FTL 4.3.1

Okay, that's all correct. Not sure why you can't grep the location.

curl -sI https://github.com/pi-hole/FTL/releases/latest | grep Location?

Location: Release Pi-hole FTL v4.3.1 · pi-hole/FTL · GitHub

That's the right answer, not sure why it's not working.

Try curl -sSL https://install.pi-hole.net | sudo bash -vx and let's look even deeper.

@DanSchaper No luck with -vx either, see log below- let me know if you need any other logs from RPi

+ command -v systemctl
+ systemctl is-enabled lighttpd
+ LIGHTTPD_ENABLED=true
+ FTLdetect
+ printf '\n  %b FTL Checks...\n\n' '[i]'

  [i] FTL Checks...

+ FTLcheckUpdate
+ get_binary_name
+ local machine
++ uname -m
+ machine=armv7l
+ local 'str=Detecting architecture'
+ printf '  %b %s...' '[i]' 'Detecting architecture'
  [i] Detecting architecture...+ [[ armv7l == \a\r\m* ]]
+ local rev
++ sed 's/[^0-9]//g;'
++ uname -m
+ rev=7
+ local lib
++ ldd /bin/ls
++ grep -E '^\s*/lib'
++ awk '{ print $1 }'
+ lib=/lib/ld-linux-armhf.so.3
+ [[ /lib/ld-linux-armhf.so.3 == \/\l\i\b\/\l\d\-\l\i\n\u\x\-\a\a\r\c\h\6\4\.\s\o\.\1 ]]
+ [[ /lib/ld-linux-armhf.so.3 == \/\l\i\b\/\l\d\-\l\i\n\u\x\-\a\r\m\h\f\.\s\o\.\3 ]]
+ [[ 7 -gt 6 ]]
+ printf '%b  %b Detected ARM-hf architecture (armv7+)\n' '\r\033[K' '[\e[1;32m✓\e[0m]'
  [✓] Detected ARM-hf architecture (armv7+)
+ binary=pihole-FTL-arm-linux-gnueabihf
+ printf '  %b Checking for existing FTL binary...\n' '[i]'
  [i] Checking for existing FTL binary...
+ local ftlLoc
++ which pihole-FTL
+ ftlLoc=
+ local ftlBranch
+ [[ -f /etc/pihole/ftlbranch ]]
+ ftlBranch=master
+ local remoteSha1
+ local localSha1
+ which dnsmasq
+ [[ ! master == \m\a\s\t\e\r ]]
+ [[ -n '' ]]
+ return 0
+ FTLinstall
+ local latesttag
+ local 'str=Downloading and Installing FTL'
+ printf '  %b %s...' '[i]' 'Downloading and Installing FTL'
  [i] Downloading and Installing FTL...++ curl -sI https://github.com/pi-hole/FTL/releases/latest
++ grep Location
++ awk -F / '{print $NF}'
+ latesttag=
+ [[ ! '' == v* ]]
+ printf '%b  %b %s\n' '\r\033[K' '[\e[1;31m✗\e[0m]' 'Downloading and Installing FTL'
  [✗] Downloading and Installing FTL
+ printf '  %bError: Unable to get latest release location from GitHub%b\n' '\e[1;31m' '\e[0m'
  Error: Unable to get latest release location from GitHub
+ return 1
+ return 1
+ printf '  %b FTL Engine not installed\n' '[\e[1;31m✗\e[0m]'
  [✗] FTL Engine not installed
+ exit 1
root@raspberrypi:~#

I think awk may be causing things to go wrong.

Try curl -sI https://github.com/pi-hole/FTL/releases/latest | grep Location | awk -F / '{print $NF}'

pi@raspberrypi:~ $ curl -sI https://github.com/pi-hole/FTL/releases/latest | grep Location | awk -F / '{print $NF}'
v4.3.1

That's all correct as well. Can you run the following:

Copy the contents of the code below in to a file in your home directory, a.sh

#! /usr/bin/env bash

main() { 
    local latesttag
    local str="Downloading and Installing FTL"
    printf "  %s...\\n" "${str}"

    # Find the latest version tag for FTL
    latesttag=$(curl -sI https://github.com/pi-hole/FTL/releases/latest | grep "Location" | awk -F '/' '{print $NF}')
    echo ${latesttag} | cat -v
    printf "DEBUG: Found %b for latesttag\\n" "${latesttag}"
    # Tags should always start with v, check for that.
    if [[ ! "${latesttag}" == v* ]]; then
        printf "  Error: Unable to get latest release location from GitHub, tag not found\\n"
        return 1
    fi
}

main

Then run sudo bash a.sh and show us the results.

pi@raspberrypi:~ $ sudo bash a.sh
  Downloading and Installing FTL...
v4.3.1^M
 for latesttag4.3.1
pi@raspberrypi:~ $

@PromoFaux I think this may be the glitch. Newline at the end is not removed and the var borks.

Good news is that v5 eliminates the tag retrieval process so there's not much to fix at this point.

To check, can you run

latesttag=$(curl -sI https://github.com/pi-hole/FTL/releases/latest | grep "Location" | awk -F '/' '{print $NF}' | tr -d '"\r\n\M' )
echo ${latesttag} | cat -v 

Here’s the result
pi@raspberrypi:~ $ latesttag=$(curl -sI https://github.com/pi-hole/FTL/releases/latest | grep "Location" | awk -F '/' '{print $NF}' | tr -d '"\r\n\M' )
pi@raspberrypi:~ $ echo ${latesttag} | cat -v
v4.3.1

1 Like

Great, can you replace the a.sh script from earlier with

#! /usr/bin/env bash

main() { 
    local latesttag
    local str="Downloading and Installing FTL"
    printf "  %s...\\n" "${str}"

    # Find the latest version tag for FTL
    latesttag=$(curl -sI https://github.com/pi-hole/FTL/releases/latest | grep "Location" | awk -F '/' '{print $NF}' | tr -d '"\r\n\M"' )
    echo ${latesttag} | cat -v
    printf "DEBUG: Found %b for latesttag\\n" "${latesttag}"
    # Tags should always start with v, check for that.
    if [[ ! "${latesttag}" == v* ]]; then
        printf "  Error: Unable to get latest release location from GitHub, tag not found\\n"
        return 1
    fi
}

main

pi@raspberrypi:~ $ sudo bash a.sh
Downloading and Installing FTL...
v4.3.1
DEBUG: Found v4.3.1 for latesttag
pi@raspberrypi:~ $

Okay, that works now. But I don't see us pushing a point release while waiting for version 5, but stranger things have happened.

I have a fix for the condition but I don't know if it's worth pushing when v5 will revamp that section.

https://github.com/pi-hole/pi-hole/tree/fix/latettag_newline

@DanSchaper - appreciate you looking at this in detail. I would agree with you not releasing a point release for current version when v5 is imminent. Thanks for helping and for great work you all have provided to this community

2 Likes

We did a point release to get that fix out anyways.

1 Like