initial Buster compatibility

This commit is contained in:
Ivan X 2020-07-15 06:06:44 -07:00
parent 5e0feab69c
commit a615ed1808
2 changed files with 39 additions and 12 deletions

View File

@ -44,7 +44,9 @@ fi
debianName=
if [[ $debianVersion ]]; then
debianMajor=$(cut -d . -f 1 <<< $debianVersion)
if [[ $debianMajor == "9" ]]; then
if [[ $debianMajor == "10" ]]; then
debianName="buster"
elif [[ $debianMajor == "9" ]]; then
debianName="stretch"
elif [[ $debianMajor == "8" ]]; then
debianName="jessie"
@ -122,6 +124,13 @@ else
elif [[ $(apt-cache search '^libssl1.0.2$') ]]; then # Stretch
# Dependencies: netatalk 2.2.4
sudo apt-get -y install libssl1.0.2
elif [[ $(apt-cache search '^libssl1.1$') ]]; then # Buster
# Dependencies: netatalk 2.2.4
echo "deb http://deb.debian.org/debian/ oldstable main" | sudo tee -a /etc/apt/sources.list > /dev/null
sudo apt-get -y update
sudo apt-get -y install libssl1.0.2
sudo sed -i '$d' /etc/apt/sources.list
sudo apt-get -y update
else
break
fi
@ -129,7 +138,7 @@ else
if [[ $(apt-cache search '^libgcrypt11$') ]]; then # Wheezy
# Dependencies: netatalk 2.2.4
sudo apt-get -y install libgcrypt11
elif [[ $(apt-cache search '^libgcrypt20$') ]]; then # Jessie or Stretch
elif [[ $(apt-cache search '^libgcrypt20$') ]]; then # Jessie, Stretch, Buster
# Dependencies: netatalk 2.2.4
sudo apt-get -y install libgcrypt20
else
@ -138,7 +147,7 @@ else
# install Netatalk
if [[ $arch && ! -f /tmp/a2server-compileAlways ]]; then
{ wget -qO- "${binaryURL}precompiled/netatalk224-${arch}_${debianName}.tgz" | sudo tar Pzx; } &> /dev/null
{ wget -qO- "${binaryURL}precompiled/netatalk226-${arch}_${debianName}.tgz" | sudo tar Pzx; } &> /dev/null
fi
sudo mandb &> /dev/null
@ -161,15 +170,23 @@ else
if [[ $(apt-cache search '^libssl1.0-dev$') ]]; then # Stretch
# Dependencies: build-deps for netatalk 2.2.4
sudo apt-get -y install libssl1.0-dev
else # probably Jessie or Wheezy
else # Jessie or Wheezy (libssl-dev 1.0.x) or Buster (absent)
if [[ $(apt-cache madison libssl-dev | grep '^libssl' | head -1 | cut -d '|' -f 2 | tr -d ' ' | cut -c 1-3) == "1.1" ]]; then # Buster, so pull from Stretch
echo "deb http://deb.debian.org/debian/ oldstable main" | sudo tee -a /etc/apt/sources.list > /dev/null
sudo apt-get -y update
sudo apt-get -y install libssl1.0.dev
sudo sed -i '$d' /etc/apt/sources.list
sudo apt-get -y update
else # Jessie or Wheezy
# Dependencies: build-deps for netatalk 2.2.4
sudo apt-get -y install libssl-dev
sudo apt-get -y install libssl-dev
fi
fi
if [[ $(apt-cache search '^libdb5.1-dev$') ]]; then # Wheezy
# Dependencies: build-deps for netatalk 2.2.4
sudo apt-get -y install libdb5.1-dev
elif [[ $(apt-cache search '^libdb5.3-dev$') ]]; then # Jessie
elif [[ $(apt-cache search '^libdb5.3-dev$') ]]; then # Jessie, Stretch, Buster
# Dependencies: build-deps for netatalk 2.2.4
sudo apt-get -y install libdb5.3-dev
else
@ -181,6 +198,13 @@ else
if [[ $(apt-cache search '^libgcrypt11-dev$') ]]; then # Stretch, Jessie or Wheezy
# Dependencies: build-deps for netatalk 2.2.4
sudo apt-get -y install libgcrypt11-dev
elif [[ $(apt-cache search '^libgcrypt20-dev$') ]]; then # Buster
# Dependencies: build-deps for netatalk 2.2.4
echo "deb http://deb.debian.org/debian/ oldstable main" | sudo tee -a /etc/apt/sources.list > /dev/null
sudo apt-get -y update
sudo apt-get -y install libgcrypt11-dev
sudo sed -i '$d' /etc/apt/sources.list
sudo apt-get -y update
else
echo "A2SERVER: WARNING: unknown version of libgcrypt-dev is being installed."
# Dependencies: build-deps for netatalk 2.2.4
@ -582,6 +606,8 @@ if [[ -f "/lib/modules/$kernelRelease/kernel/drivers/net/appletalk/ipddp.ko" ]];
# if we didn't load it successfully, remove it
sudo rm /lib/modules/$kernelRelease/kernel/net/appletalk/appletalk.ko 2> /dev/null
fi
else # download failed, so premade kernel not found, remove empty file
rm /tmp/appletalk.tgz 2>/dev/null
fi
fi
@ -599,6 +625,7 @@ if [[ -f "/lib/modules/$kernelRelease/kernel/drivers/net/appletalk/ipddp.ko" ]];
[[ -f /boot/config-$kernelRelease ]] || break
sudo apt-get -y install linux-headers-$kernelRelease linux-source-$kernelMajorMinor || break
sudo apt-get -y install build-essential
sudo apt-get -y install libelf-dev # required as of kernel 4.14.12, apparently
cd /usr/src
kernelSrc=$(find linux-source-${kernelMajorMinor}*)
if [[ ${kernelSrc##*.} == "xz" ]]; then

View File

@ -1,7 +1,7 @@
#! /bin/bash
# vim: set tabstop=4 shiftwidth=4 expandtab filetype=sh:
# A2SERVER master setup script, last update 17-Nov-15
# A2SERVER master setup script, last update 15-Jul-20
# it downloads and executes several scripts related to the setup of
# netatalk configured for Apple II use on Debian or Raspbian.
# more info is at http://ivanx.com/a2server
@ -9,7 +9,7 @@
# to download and execute, type:
# wget ivanx.com/a2server/setup; source setup
a2serverVersion="152"
a2serverVersion="153"
# Ensure URL we'll use ends in a /
case "$A2SERVER_SCRIPT_URL" in
@ -116,19 +116,19 @@ if [[ $isRpi ]]; then #supported Raspbian? (16-Feb-15, 20-Jun-14, 09-Jan-14, etc
# [[ ($fwhash == "8aca5762") || ($fwhash == "462f3e3f476f7b6") || ($fwhash == "c32bc633039cd9") || ($fwhash == "9d34d0475f9") || ($fwhash == "d4f5315cfac4e") || ($fwhash == "6f4a90c8cb8817f") || ($fwhash == "5dd9b4962e") || ($fwhash == "17c8799375") ]] && unsupportedOS=
elif [[ $isDebian ]]; then # supported Debian?
debianVersion=$(cat /etc/debian_version)
debianSupported="-9.2- -8.2- -7.9- -7.8- -7.6- -7.3-"
debianSupported="-10.4- -9.2- -8.2- -7.9- -7.8- -7.6- -7.3-"
[[ $debianSupported == *-$debianVersion-* ]] && unsupportedOS=
fi
if [[ $unsupportedOS && $isRpi ]]; then
echo
echo "A2SERVER and its installer scripts have been tested on Raspbian Stretch,"
echo "Jessie, and Wheezy, though not this specific firmware version"
echo "A2SERVER and its installer scripts have been tested on Raspbian Buster,"
echo "Stretch, Jessie, and Wheezy, though not this specific firmware version"
echo "(${fwhash:0:7}). Just FYI."
unsupportedOS=
elif [[ $unsupportedOS && $isDebian ]]; then
echo
echo "A2SERVER and its installer scripts have been tested on Debian 7/8/9,"
echo "A2SERVER and its installer scripts have been tested on Debian 7/8/9/10,"
echo "though not this specific point release ($debianVersion). Just FYI."
unsupportedOS=
fi