mirror of
https://github.com/bensuperpc/dockcross.git
synced 2024-11-15 07:21:33 +01:00
Upgrade to debian Buster and disable python builder script
Upgrade to debian Buster slim (later to debian bullseye, crosstool-ng must be updated first, version 1.23 is not compatible with debian bullseye) Disable python script (build-and-install-python.sh), the version of python in the repositories is recent enough for crosstool-ng 1.24 and above. Changed from python to python3 for compatibility Adding the manual launch of a github workflow Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
This commit is contained in:
parent
35eb05cefe
commit
202e4808b9
2
.github/workflows/main.yml
vendored
2
.github/workflows/main.yml
vendored
@ -7,6 +7,8 @@ on:
|
||||
pull_request:
|
||||
branches:
|
||||
- '*'
|
||||
# Adding the manual launch of a github workflow
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
base:
|
||||
|
@ -1,4 +1,4 @@
|
||||
FROM debian:stretch-20190326-slim
|
||||
FROM debian:buster-slim
|
||||
MAINTAINER Matt McCormick "matt.mccormick@kitware.com"
|
||||
|
||||
#include "common.debian"
|
||||
|
2
Makefile
2
Makefile
@ -330,7 +330,7 @@ clean:
|
||||
.SECONDEXPANSION:
|
||||
$(addsuffix .test,$(STANDARD_IMAGES)): $$(basename $$@)
|
||||
$(DOCKER) run $(RM) $(ORG)/$(basename $@) > $(BIN)/dockcross-$(basename $@) && chmod +x $(BIN)/dockcross-$(basename $@)
|
||||
$(BIN)/dockcross-$(basename $@) python test/run.py $($@_ARGS)
|
||||
$(BIN)/dockcross-$(basename $@) python3 test/run.py $($@_ARGS)
|
||||
|
||||
#
|
||||
# testing prerequisites implicit rule
|
||||
|
@ -16,12 +16,14 @@
|
||||
|
||||
# Install Debian packages required for `ct-ng`.
|
||||
RUN apt-get update --yes && apt-get install --no-install-recommends --yes \
|
||||
gawk \
|
||||
gperf \
|
||||
help2man \
|
||||
python-dev \
|
||||
texinfo \
|
||||
&& apt-get clean --yes
|
||||
gawk \
|
||||
gperf \
|
||||
help2man \
|
||||
python3-dev \
|
||||
texinfo \
|
||||
&& apt-get clean autoclean --yes \
|
||||
&& apt-get autoremove --yes \
|
||||
&& rm -rf /var/lib/{apt,dpkg,cache,log}/
|
||||
|
||||
ENV XCC_PREFIX=/usr/xcc
|
||||
|
||||
@ -33,6 +35,7 @@ ENV XCC_PREFIX=/usr/xcc
|
||||
COPY \
|
||||
imagefiles/install-crosstool-ng-toolchain.sh \
|
||||
imagefiles/crosstool-ng-expat.patch \
|
||||
imagefiles/Fix-error-with-bash-5-and-up.patch \
|
||||
crosstool-ng.config \
|
||||
/dockcross/
|
||||
|
||||
|
@ -1,11 +1,6 @@
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
ARG REPO=http://cdn-fastly.deb.debian.org
|
||||
|
||||
RUN \
|
||||
bash -c "echo \"deb $REPO/debian stretch main contrib non-free\" > /etc/apt/sources.list" && \
|
||||
bash -c "echo \"deb $REPO/debian stretch-updates main contrib non-free\" >> /etc/apt/sources.list" && \
|
||||
bash -c "echo \"deb $REPO/debian-security stretch/updates main\" >> /etc/apt/sources.list" && \
|
||||
bash -c "echo \"deb http://ftp.debian.org/debian stretch-backports main\" >> /etc/apt/sources.list" && \
|
||||
apt-get update --yes && \
|
||||
apt-get install --no-install-recommends --yes \
|
||||
autogen \
|
||||
@ -30,8 +25,8 @@ RUN \
|
||||
ncurses-dev \
|
||||
pkg-config \
|
||||
pax \
|
||||
# python3 \
|
||||
# python3-pip \
|
||||
python3 \
|
||||
python3-pip \
|
||||
rsync \
|
||||
sed \
|
||||
ssh \
|
||||
@ -41,23 +36,7 @@ RUN \
|
||||
xz-utils \
|
||||
zip \
|
||||
zlib1g-dev \
|
||||
# python build
|
||||
libncurses5-dev \
|
||||
libgdbm-dev \
|
||||
libnss3-dev \
|
||||
libssl-dev \
|
||||
libsqlite3-dev \
|
||||
libreadline-dev \
|
||||
libffi-dev \
|
||||
libbz2-dev\
|
||||
&& \
|
||||
apt-get clean --yes
|
||||
|
||||
# build and install python
|
||||
COPY \
|
||||
imagefiles/build-and-install-python.sh \
|
||||
/buildscripts/
|
||||
RUN \
|
||||
set -x && \
|
||||
/buildscripts/build-and-install-python.sh && \
|
||||
rm -rf /buildscripts
|
||||
# python-is-python3 \
|
||||
&& apt-get clean autoclean --yes \
|
||||
&& apt-get autoremove --yes \
|
||||
&& rm -rf /var/lib/{apt,dpkg,cache,log}/
|
||||
|
@ -25,7 +25,7 @@ RUN \
|
||||
/buildscripts/build-and-install-git.sh && \
|
||||
/buildscripts/install-cmake-binary.sh $X86_FLAG && \
|
||||
/buildscripts/install-liquidprompt-binary.sh && \
|
||||
PYTHON=$([ -e /opt/python/cp38-cp38/bin/python ] && echo "/opt/python/cp38-cp38/bin/python" || echo "python") && \
|
||||
PYTHON=$([ -e /opt/python/cp38-cp38/bin/python ] && echo "/opt/python/cp38-cp38/bin/python" || echo "python3") && \
|
||||
/buildscripts/install-python-packages.sh -python ${PYTHON} && \
|
||||
/buildscripts/build-and-install-ninja.sh -python ${PYTHON} && \
|
||||
rm -rf /buildscripts
|
||||
|
28
imagefiles/Fix-error-with-bash-5-and-up.patch
Normal file
28
imagefiles/Fix-error-with-bash-5-and-up.patch
Normal file
@ -0,0 +1,28 @@
|
||||
From 67368ebe9d9259e9f34a4f9166a33357858813f1 Mon Sep 17 00:00:00 2001
|
||||
From: Bensuperpc <bensuperpc@gmail.com>
|
||||
Date: Thu, 24 Jun 2021 11:55:48 +0200
|
||||
Subject: [PATCH 1/1] Fix error with bash 5 and up
|
||||
|
||||
Fix error with bash 5 and up
|
||||
|
||||
Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
|
||||
---
|
||||
configure.ac | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index d10bf71d..e2302b4c 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -274,7 +274,7 @@ ACX_PROG_VERSION_REQ_STRICT([BASH_SHELL],
|
||||
[GNU bash >= 3.1],
|
||||
[bash],
|
||||
[bash],
|
||||
- ['^GNU bash, version (3\.[1-9]|4)'])
|
||||
+ ['^GNU bash, version (3\.[1-9]|4|5)'])
|
||||
|
||||
# We need a awk that *is* GNU awk
|
||||
ACX_PROG_VERSION_REQ_STRICT([AWK],
|
||||
--
|
||||
2.32.0
|
||||
|
@ -6,6 +6,8 @@
|
||||
# Usage:
|
||||
#
|
||||
# build-and-install-python.sh [-version 3.9.5]
|
||||
# needed packages : libncurses5-dev libgdbm-dev libnss3-dev
|
||||
# libssl-dev libsqlite3-dev libreadline-dev libffi-dev libbz2-dev
|
||||
|
||||
PYTHON_VERSION=3.9.5
|
||||
while [ $# -gt 0 ]; do
|
||||
|
@ -77,6 +77,8 @@ git checkout ${REV}
|
||||
|
||||
if [ ${REV} = "crosstool-ng-1.23.0" ]; then
|
||||
patch scripts/build/companion_libs/210-expat.sh -i /dockcross/crosstool-ng-expat.patch
|
||||
# Patch to fix error with bash 5 and up: https://github.com/pfalcon/esp-open-sdk/issues/365
|
||||
patch configure.ac -i /dockcross/Fix-error-with-bash-5-and-up.patch
|
||||
fi
|
||||
|
||||
# Bootstrap and install the tool.
|
||||
@ -112,5 +114,5 @@ unset LD_LIBRARY_PATH
|
||||
|
||||
# Build and install the toolchain!
|
||||
# Print last 250 lines if build fail
|
||||
"${BOOTSTRAP_PREFIX}/bin/ct-ng" build || tail -250 build.log
|
||||
"${BOOTSTRAP_PREFIX}/bin/ct-ng" build || (tail -250 build.log && exit 1)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user