Fix broken Docker support (#2804)

* lsb-release package is getting deprecated

It is not present on Hirsute anymore so we better remove its dependency

* - remove lsb-release dependency from docker
- exit if Docker version is too low (check works only on Ubuntu builds, else doesn't do anything)

Reference: https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1916485

* Cleanup

* Remove quotes for proper pkg install

* Automatically upgrade Docker engine

* Missing python dependencies

* Bugfix - debian name is not just one word

* Put this back

* provoke error

* Revert

* Adjust Github runner to make bionic and focal and compile u-boot for test

* Adjust cron

* Remove Bionic, cron back to 14 days

* Change to ubuntu-latest
This commit is contained in:
Igor Pečovnik
2021-05-02 18:06:38 +02:00
committed by GitHub
parent ccecf0df11
commit 9b0dd2b839
6 changed files with 37 additions and 31 deletions

View File

@@ -947,12 +947,6 @@ prepare_host_basic()
# wait until package manager finishes possible system maintanace
wait_for_package_manager
# need lsb_release to decide what to install
if [[ $(dpkg-query -W -f='${db:Status-Abbrev}\n' lsb-release 2>/dev/null) != *ii* ]]; then
display_alert "Installing package" "lsb-release"
apt-get -q update && apt-get install -q -y --no-install-recommends lsb-release
fi
# need to install dialog if person is starting with a interactive mode
if [[ $(dpkg-query -W -f='${db:Status-Abbrev}\n' dialog 2>/dev/null) != *ii* ]]; then
display_alert "Installing package" "dialog"
@@ -1026,10 +1020,8 @@ prepare_host()
# build aarch64
fi
local codename=$(lsb_release -sc)
# Add support for Ubuntu 20.04, 21.04 and Mint Ulyana
if [[ $codename =~ ^(focal|groovy|hirsute|ulyana|ulyssa|bullseye)$ ]]; then
if [[ $HOSTRELEASE =~ ^(focal|groovy|hirsute|ulyana|ulyssa|bullseye)$ ]]; then
hostdeps+=" python2 python3"
ln -fs /usr/bin/python2.7 /usr/bin/python2
ln -fs /usr/bin/python2.7 /usr/bin/python
@@ -1037,19 +1029,19 @@ prepare_host()
hostdeps+=" python libpython-dev"
fi
display_alert "Build host OS release" "${codename:-(unknown)}" "info"
display_alert "Build host OS release" "${HOSTRELEASE:-(unknown)}" "info"
# Ubuntu 20.04.x (Focal) x86_64 is the only fully supported host OS release
# Using Docker/VirtualBox/Vagrant is the only supported way to run the build script on other Linux distributions
#
# NO_HOST_RELEASE_CHECK overrides the check for a supported host system
# Disable host OS check at your own risk. Any issues reported with unsupported releases will be closed without discussion
if [[ -z $codename || "buster bullseye groovy focal hirsute debbie tricia ulyana ulyssa" != *"$codename"* ]]; then
if [[ -z $HOSTRELEASE || "buster bullseye groovy focal hirsute debbie tricia ulyana ulyssa" != *"$HOSTRELEASE"* ]]; then
if [[ $NO_HOST_RELEASE_CHECK == yes ]]; then
display_alert "You are running on an unsupported system" "${codename:-(unknown)}" "wrn"
display_alert "You are running on an unsupported system" "${HOSTRELEASE:-(unknown)}" "wrn"
display_alert "Do not report any errors, warnings or other issues encountered beyond this point" "" "wrn"
else
exit_with_error "It seems you ignore documentation and run an unsupported build system: ${codename:-(unknown)}"
exit_with_error "It seems you ignore documentation and run an unsupported build system: ${HOSTRELEASE:-(unknown)}"
fi
fi
@@ -1060,7 +1052,7 @@ prepare_host()
# build aarch64
if [[ $(dpkg --print-architecture) == amd64 ]]; then
if [[ -z $codename || $codename =~ ^(focal|groovy|debbie|buster|bullseye|hirsute|ulyana|ulyssa)$ ]]; then
if [[ -z $HOSTRELEASE || $HOSTRELEASE =~ ^(focal|groovy|debbie|buster|bullseye|hirsute|ulyana|ulyssa)$ ]]; then
hostdeps="${hostdeps/lib32ncurses5 lib32tinfo5/lib32ncurses6 lib32tinfo6}"
fi