-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Install 32bit FTL on 32bit OS (even if 64bit architecture is detected) #2004
Conversation
… If so, download the 32bit binary as we cannot expect the 64bit libraries to be present. Signed-off-by: DL6ER <dl6er@dl6er.de>
This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks sound
advanced/Scripts/piholeCheckout.sh
Outdated
local machine | ||
machine=$(uname -m) | ||
|
||
# This gives the architecture of packages dpkg installs (for example, "i386") | ||
local dpkgarch | ||
dpkgarch=$(dpkg --print-architecture 2> /dev/null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On fedora, is it ok that dpkg will not exist?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dpkg won't be there, but file will be:
file $(whereis file) | grep -v "64-bit" | grep "32-bit" &> /dev/null
if [ "$?" = 0 ]; then
machine="i686"
fi
Which would technically work in both debian and fedora universes. But I'd only use it if 1] dpkg wasn't available, and 2] the architecture was identifying as x86_64 via uname -m.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested on Fedora to see if the dpkg line would cause an error. No error was thrown, so it looks like this works.
This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there: |
This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there: |
By submitting this pull request, I confirm the following:
please fill any appropriate checkboxes, e.g: [X]
git rebase
)Please make sure you Sign Off all commits. Pi-hole enforces the DCO.
What does this PR aim to accomplish?:
Try to determine if the user is running a 32bit OS on a 64bit system. If so, download the 32bit binary as we cannot expect the 64bit libraries to be present.
Should fix #1998 and many others + some issues we saw on Discourse.
How does this PR accomplish the above?:
Try to detect architecture
dpkg
uses to install packages. This will only work on Debian-based systems, but not on Fedora, etc.Unfortunately, I cannot really test this at the moment as droplets with 32bit OS return
(which already leads to downloading the 32 bit library)