Conversation
The official Debian images differ from the Ubuntu ones in ways that break image/prepare.sh. Install python3 explicitly (my_init is a Python 3 script, and the Debian images do not ship python3), restrict software-properties-common to Ubuntu since Trixie does not provide it, and detect the distribution from /etc/os-release instead of lsb_release, which is not installed on Debian.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Support building on Debian base images
make build BASE_IMAGE=debian:trixie ...currently fails. The script assumesseveral things that hold for the official Ubuntu images but not for the
official Debian images. This PR makes
image/prepare.shwork on both.Problems
python3is never installed./sbin/my_initis a Python 3 script(
#!/usr/bin/python3 -u). The Ubuntu base images ship python3, the Debianones do not, so the resulting image contains
my_initbut cannot executeit:
(here refers to the missing interpreter, not the script.)
software-properties-commonis Ubuntu-only. It does not exist in theDebian Trixie repositories, so installation aborts the build:
lsb_releaseis not available on Debian. Thelsb-releasepackage isnot part of the Debian base image, so the locale block fails to detect the
distribution.
Changes
python3afterapt-get update.software-properties-commononly on Ubuntu./etc/os-releaseinstead oflsb_release. Thisis the same source the script already uses earlier in the file, so no new
dependency is introduced.
Impact on Ubuntu
None.
python3is already present there, thesoftware-properties-commoninstall still runs on Ubuntu, and
/etc/os-releaseis part of bothdistributions. Ubuntu builds behave exactly as before.
How I tested
Built the base image on
debian:trixierunningprepare.sh,system_services.sh,utilities.shandcleanup.sh:PS: building failed without PLATFORM=amd64, that's another bug.