mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-05-02 05:34:04 +00:00
To ease building ACRN with all its requirements, provide a distribution aware, self-contained docker build environment to build regular Debian packages. For Debian Buster(10) and Ubuntu Focal Fossa(20.04 LTS) some build tools are grabbed from their respective backports repositories. This provides a much easier alignment with the more resent distributions. There are three packages to be re-packaged to accommodate the build needs as well as the runtime needs of the ACRN packages: * python3-elementpath_2.4.0-1 * python3-xmlschema_1.9.2-1 * acpica-tools_20200925-1 These packages are built during docker image build time and provided within a local APT repository for installation at build time, i.e. when running the respective docker container. The multistage Dockerfile separates the required pre-build stages and reduces the resulting image footprint of the final docker image. There are separate docker images for each distribution. To summarize the build steps the script acrn-docker-build.sh is provided. To control the vendor and the distribution for the build, just set the environment variables VENDOR and DISTRO before calling the script from the top directory of the ACRN hypervisor workspace, e.g.: VENDOR=debian DISTRO=bullseye debian/docker/acrn-docker-build.sh or VENDOR=ubuntu DISTRO=focal debian/docker/acrn-docker-build.sh Tracked-On: #6688 Signed-off-by: Helmut Buchsbaum <helmut.buchsbaum@opensource.tttech-industrial.com>
29 lines
685 B
Bash
Executable File
29 lines
685 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# helper to compare version
|
|
verlte() {
|
|
[ "$1" = "$(echo -e "$1\n$2" | sort -V | head -n1)" ]
|
|
}
|
|
|
|
lintian_version=$(lintian --version | awk '{print $2}')
|
|
|
|
# Explicitly use --fail-on error if available (since 2.77.0)
|
|
# This circumvents a problem in bullseye lintian, where failing on error
|
|
# is not the default action any more
|
|
# Always use debian profile for lintian
|
|
if $(verlte 2.77.0 ${lintian_version}); then
|
|
LINTIAN_ARGS="--profile debian --fail-on error"
|
|
else
|
|
LINTIAN_ARGS="--profile debian"
|
|
fi
|
|
|
|
echo "lintian ${LINTIAN_ARGS} $1"
|
|
lintian ${LINTIAN_ARGS} $1
|
|
status=$?
|
|
|
|
if [ $status -ne 0 ]; then
|
|
echo "+++ LINTIAN ERRORS DETECTED +++" >&2
|
|
fi
|
|
|
|
exit $status
|