mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-03-28 14:56:28 +01:00
Update and refactor Dockerfiles to newer Ubuntu
The docker images all have new, simpler names and use Ubuntu 20.04 (instead of 18.04) as their base. A few new tools have been added, specifically what is needed for: - Linux on RISC-V - see #980 - Winodows on ARM - see #969 Fixes #976
This commit is contained in:
parent
344d715b83
commit
dfdc174b6d
60 changed files with 199 additions and 344 deletions
1
.gitattributes
vendored
1
.gitattributes
vendored
|
@ -48,7 +48,6 @@ Dockerfile text
|
|||
*.yaml text
|
||||
*.yml text
|
||||
.dockerignore text
|
||||
uid_entrypoint text
|
||||
|
||||
# Qt
|
||||
*.pro text
|
||||
|
|
2
.github/workflows/code-cleanliness.yml
vendored
2
.github/workflows/code-cleanliness.yml
vendored
|
@ -13,7 +13,7 @@ jobs:
|
|||
- name: Run Check Code Cleanliness with Docker
|
||||
uses: addnab/docker-run-action@v3
|
||||
with:
|
||||
image: quay.io/eclipse-cdt/cdt-infra-plus-eclipse-install-github@sha256:6949adee26f78e9968e16d52bc3accfd7b51d0f16c473ad4b6f1caee849ab519
|
||||
image: quay.io/eclipse-cdt/cdt-infra-github@sha256:6949adee26f78e9968e16d52bc3accfd7b51d0f16c473ad4b6f1caee849ab519
|
||||
options: -v ${{ github.workspace }}:/work
|
||||
run: |
|
||||
set -x
|
||||
|
|
|
@ -25,7 +25,7 @@ To build CDT plug-ins you need a standard Maven & Java development environment.
|
|||
The CI build automatically run code cleanliness checks. To run them on your computer it is recommended to use the Docker image, for example like this from the root of the checked out CDT repo:
|
||||
|
||||
```sh
|
||||
docker run --rm -it -v $(git rev-parse --show-toplevel):/work -w /work/$(git rev-parse --show-prefix) --cap-add=SYS_PTRACE --security-opt seccomp=unconfined quay.io/eclipse-cdt/cdt-infra-plus-eclipse-install:latest releng/scripts/check_code_cleanliness.sh
|
||||
docker run --rm -it -v $(git rev-parse --show-toplevel):/work -w /work/$(git rev-parse --show-prefix) --cap-add=SYS_PTRACE --security-opt seccomp=unconfined quay.io/eclipse-cdt/cdt-infra:latest releng/scripts/check_code_cleanliness.sh
|
||||
```
|
||||
|
||||
### Profiles
|
||||
|
@ -160,7 +160,7 @@ An additional tip is to set the following in `.gitconfig` to allow you to diff `
|
|||
|
||||
When the host is Windows, getting docker to behave as encoded in the pom.xml may be challenging, instead a command like this will probably work (replace your path to git root). Note that running this in git bash causes problems because of the /work in the command line arguments. (TODO integrate this command line way of running into the pom.xml so the original instructions work.)
|
||||
|
||||
`docker 'run' '--rm' '-t' '-v' 'D:\cdt\git\org.eclipse.cdt:/work' '-w' '/work/core/org.eclipse.cdt.core.native' 'quay.io/eclipse-cdt/cdt-infra-eclipse-full:latest' 'make' '-C' 'native_src' 'rebuild'`
|
||||
`docker 'run' '--rm' '-t' '-v' 'D:\cdt\git\org.eclipse.cdt:/work' '-w' '/work/core/org.eclipse.cdt.core.native' 'quay.io/eclipse-cdt/cdt-infra:latest' 'make' '-C' 'native_src' 'rebuild'`
|
||||
|
||||
See also `jniheaders` profile above.
|
||||
|
||||
|
|
|
@ -6,6 +6,12 @@ This is the New & Noteworthy page for CDT 12.0 which is part of Eclipse 2025-03
|
|||
|
||||
# Release Notes
|
||||
|
||||
## Minimum version of GLIBC required
|
||||
|
||||
The minimum version of GLIBC required is now 2.31.
|
||||
This version can be found in Ubuntu 20.04 and later, RHEL 9.0 and later and other distros as well.
|
||||
CDT's native components will likely work with older versions of glibc too, assuming they provide the required APIs for Eclipse CDT.
|
||||
|
||||
# Managed Build
|
||||
|
||||
## Other objects for GNU archive files
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -28,7 +28,8 @@ OS_DIR_LINUX_PPC64LE := ../../org.eclipse.cdt.core.linux.ppc64le/os/linux/ppc64l
|
|||
OS_DIR_MACOS_X86_64 := ../../org.eclipse.cdt.core.macosx/os/macosx/x86_64
|
||||
OS_DIR_MACOS_AARCH64 := ../../org.eclipse.cdt.core.macosx/os/macosx/aarch64
|
||||
|
||||
COMMON_CFLAGS := -Wall -pedantic -Werror
|
||||
COMMON_CFLAGS := -Wall -pedantic -Werror -std=gnu11
|
||||
COMMON_CCFLAGS := -Wall -pedantic -Werror -std=gnu++14
|
||||
|
||||
UNAME = $(shell uname)
|
||||
ifeq ($(UNAME),Linux)
|
||||
|
@ -55,7 +56,8 @@ LIBS = \
|
|||
$(OS_DIR_MACOS_AARCH64)/libpty.jnilib
|
||||
else
|
||||
ifeq ($(findstring ARM64,$(UNAME)),ARM64)
|
||||
COMMON_CFLAGS := -Wall -pedantic
|
||||
COMMON_CFLAGS := -Wall -pedantic -std=gnu11
|
||||
COMMON_CCFLAGS := -Wall -pedantic -std=gnu++14
|
||||
LIBS = \
|
||||
$(OS_DIR_WIN32_AARCH64)/starter.exe \
|
||||
$(OS_DIR_WIN32_AARCH64)/spawner.dll
|
||||
|
@ -127,7 +129,7 @@ $(OS_DIR_WIN32_X86_64)/spawner.dll: win/iostream.c win/raise.c win/spawner.c win
|
|||
$(OS_DIR_WIN32_X86_64)/pty.dll: win/pty.cpp win/pty_dllmain.cpp win/util.c
|
||||
mkdir -p $(dir $@) && \
|
||||
$(REPRODUCIBLE_BUILD_WRAPPER) \
|
||||
x86_64-w64-mingw32-g++ $(COMMON_CFLAGS) -o $@ -Iinclude -Iwin/include -I"$(JAVA_HOME)/include" -I"$(JAVA_HOME)/include/win32" \
|
||||
x86_64-w64-mingw32-g++ $(COMMON_CCFLAGS) -o $@ -Iinclude -Iwin/include -I"$(JAVA_HOME)/include" -I"$(JAVA_HOME)/include/win32" \
|
||||
-DUNICODE \
|
||||
$^ \
|
||||
-Wl,--kill-at --shared -L$(OS_DIR_WIN32_X86_64) -lwinpty -static-libstdc++ -static-libgcc
|
||||
|
|
|
@ -85,7 +85,7 @@ static void close_all_fds_fallback(unsigned int from_fd_inclusive) {
|
|||
}
|
||||
}
|
||||
|
||||
static void close_all_fds() {
|
||||
static void close_all_fds(void) {
|
||||
unsigned int from_fd = STDERR_FILENO + 1;
|
||||
if (sys_close_range_wrapper(from_fd) == 0)
|
||||
return;
|
||||
|
|
|
@ -84,7 +84,7 @@ static void close_all_fds_fallback(unsigned int from_fd_inclusive) {
|
|||
}
|
||||
}
|
||||
|
||||
static void close_all_fds() {
|
||||
static void close_all_fds(void) {
|
||||
unsigned int from_fd = STDERR_FILENO + 1;
|
||||
if (sys_close_range_wrapper(from_fd) == 0) {
|
||||
return;
|
||||
|
|
|
@ -79,7 +79,7 @@
|
|||
<configuration>
|
||||
<target>
|
||||
<exec executable="docker" newenvironment="false" failOnError="true">
|
||||
<!-- docker run -\-rm -t -v $(git rev-parse -\-show-toplevel):/work -w /work/$(git rev-parse -\-show-prefix) quay.io/eclipse-cdt/cdt-infra-eclipse-full:latest make -C native_src rebuild -->
|
||||
<!-- docker run -\-rm -t -v $(git rev-parse -\-show-toplevel):/work -w /work/$(git rev-parse -\-show-prefix) quay.io/eclipse-cdt/cdt-infra:latest make -C native_src rebuild -->
|
||||
<arg value="run" />
|
||||
<arg value="--rm" />
|
||||
<arg value="-t" />
|
||||
|
@ -87,7 +87,7 @@
|
|||
<arg value="${project.basedir}/../..:/work" />
|
||||
<arg value="-w" />
|
||||
<arg value="/work/core/org.eclipse.cdt.core.native" />
|
||||
<arg value="quay.io/eclipse-cdt/cdt-infra-eclipse-full:latest" />
|
||||
<arg value="quay.io/eclipse-cdt/cdt-infra:latest" />
|
||||
<arg value="make" />
|
||||
<arg value="-C" />
|
||||
<arg value="native_src" />
|
||||
|
|
BIN
core/org.eclipse.cdt.core.win32.aarch64/os/win32/aarch64/spawner.dll
Executable file
BIN
core/org.eclipse.cdt.core.win32.aarch64/os/win32/aarch64/spawner.dll
Executable file
Binary file not shown.
BIN
core/org.eclipse.cdt.core.win32.aarch64/os/win32/aarch64/starter.exe
Executable file
BIN
core/org.eclipse.cdt.core.win32.aarch64/os/win32/aarch64/starter.exe
Executable file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,15 +1,13 @@
|
|||
Dockerfiles
|
||||
============
|
||||
|
||||
The docker images for Eclipse CDT's [Jenkins instance](https://ci.eclipse.org/cdt/) are stored at [quay.io](https://quay.io/organization/eclipse-cdt)
|
||||
and built using the following scripts. The individual directories below this one contain Dockerfiles which contain a little more information. Note that
|
||||
the split between the Dockerfiles is somewhat arbitrary and historical. Only the cdt-infra-eclipse-full image is known to be referenced outside
|
||||
of the cdt repo.
|
||||
The docker images for Eclipse CDT's [Jenkins instance](https://ci.eclipse.org/cdt/) and [GitHub Action check code cleanliness](https://github.com/eclipse-cdt/cdt/blob/main/.github/workflows/code-cleanliness.yml) are stored at [quay.io](https://quay.io/organization/eclipse-cdt) and built using the following scripts.
|
||||
The individual directories below this one contain Dockerfiles which contain a little more information.
|
||||
|
||||
build-images.sh
|
||||
===============
|
||||
|
||||
Builds the images locally. A download of [Xcode_9.4.1.xip](https://download.developer.apple.com/Developer_Tools/Xcode_9.4.1/Xcode_9.4.1.xip) (visit [here](https://developer.apple.com/download/more/) first to logon to Apple if needed) is needed to do a complete build. To save on rebuild times, the xip can be removed from the directory to use the cached cdt-infra-build-macos-sdk image.
|
||||
Builds the images locally. A download of [Xcode_13.1.xip](https://download.developer.apple.com/Developer_Tools/Xcode_13.1.xip/Xcode_13.1.xip.xip) (visit [here](https://developer.apple.com/download/more/) first to logon to Apple if needed) is needed to do a complete build. To save on rebuild times, the xip can be removed from the directory to use the cached cdt-infra-build-macos-sdk image.
|
||||
|
||||
deploy-images.sh
|
||||
================
|
||||
|
@ -20,14 +18,14 @@ updates all the Jenkinsfile and yaml files to refer to these new images.
|
|||
Using the docker images
|
||||
=======================
|
||||
|
||||
The docker images exist mostly for use in Jenkins, see the [pod templates](https://github.com/eclipse-cdt/cdt/blob/main/jenkins/pod-templates).
|
||||
The docker images exist mostly for use in Jenkins and GitHub Actions, see the [pod templates](https://github.com/eclipse-cdt/cdt/blob/main/jenkins/pod-templates) and [workflows](https://github.com/eclipse-cdt/cdt/blob/main/.github/workflows/)
|
||||
|
||||
They can be used to recreate a consistent environment in other cases too. For example, you can run a full build on a machine that does not already have the tools by using docker:
|
||||
|
||||
```
|
||||
docker run --rm -it -v $(git rev-parse --show-toplevel):/work -w /work/$(git rev-parse --show-prefix) --cap-add=SYS_PTRACE --security-opt seccomp=unconfined quay.io/eclipse-cdt/cdt-infra-eclipse-full:latest COMMAND HERE
|
||||
docker run --rm -it -v $(git rev-parse --show-toplevel):/work -w /work/$(git rev-parse --show-prefix) --cap-add=SYS_PTRACE --security-opt seccomp=unconfined quay.io/eclipse-cdt/cdt-infra:latest COMMAND HERE
|
||||
```
|
||||
|
||||
For examples of the above in practice, see [cdt-gdb-adapter's integration tests readme](https://github.com/eclipse-cdt/cdt-gdb-adapter/blob/master/src/integration-tests/README.md) and the native section of [CDT's readme](https://github.com/eclipse-cdt/cdt/blob/main/BUILDING.md#native)
|
||||
For examples of the above in practice, see the native section of [CDT's building readme](https://github.com/eclipse-cdt/cdt/blob/main/BUILDING.md#native)
|
||||
|
||||
|
||||
|
|
|
@ -5,14 +5,11 @@ set -eux
|
|||
# Xcode_13.1.xip is needed to build the OSx cross compiler image from https://developer.apple.com/download/all/?q=xcode
|
||||
# As an optimization for the rebuild times, the image is only built if the xip is present.
|
||||
if [ -f Xcode_13.1.xip ]; then
|
||||
docker build --rm --build-arg Xcodexip=Xcode_13.1.xip -f cdt-infra-build-macos-sdk/ubuntu-18.04/Dockerfile -t cdt-infra-build-macos-sdk:ubuntu-18.04 .
|
||||
docker build --rm --build-arg Xcodexip=Xcode_13.1.xip -f cdt-infra-build-macos-sdk/Dockerfile -t cdt-infra-build-macos-sdk:latest .
|
||||
else
|
||||
echo "MacOSX SDK & Toolchain build is being skipped"
|
||||
fi
|
||||
|
||||
docker build --rm -f cdt-infra-base/ubuntu-18.04/Dockerfile -t cdt-infra-base:ubuntu-18.04 .
|
||||
docker build --rm -f cdt-infra-all-gdbs/ubuntu-18.04/Dockerfile -t cdt-infra-all-gdbs:ubuntu-18.04 .
|
||||
docker build --rm -f cdt-infra-eclipse-full/ubuntu-18.04/Dockerfile -t cdt-infra-eclipse-full:ubuntu-18.04 .
|
||||
docker build --rm -f cdt-infra-plus-eclipse-install/ubuntu-18.04/Dockerfile -t cdt-infra-plus-eclipse-install:ubuntu-18.04 .
|
||||
docker build --rm -f cdt-infra-plus-eclipse-install-github/ubuntu-18.04/Dockerfile -t cdt-infra-plus-eclipse-install-github:ubuntu-18.04 .
|
||||
docker build --rm -f cdt-infra-plus-node/ubuntu-18.04/Dockerfile -t cdt-infra-plus-node:ubuntu-18.04 .
|
||||
docker build --rm -f cdt-infra/Dockerfile -t cdt-infra:latest .
|
||||
docker build --rm -f cdt-infra-github/Dockerfile -t cdt-infra-github:latest .
|
||||
docker build --rm -f cdt-infra-jipp/Dockerfile -t cdt-infra-jipp:latest .
|
||||
|
|
|
@ -1,26 +0,0 @@
|
|||
Building GDBs in a separate image
|
||||
=================================
|
||||
|
||||
The GDBs take a long time to build and it is very inconvenient to have to build them
|
||||
because something else in a Docker file has changed. Therefore, this image *only*
|
||||
builds the GDBs using the download-build-gdb.sh script.
|
||||
|
||||
Other images can then use these prebuilt GDBs by copying them to their image.
|
||||
|
||||
For example, to copy all the GDBs use this line:
|
||||
|
||||
```
|
||||
COPY --from=cdt-infra-all-gdbs:ubuntu-18.04 /shared/common/gdb/gdb-all /shared/common/gdb/gdb-all
|
||||
```
|
||||
|
||||
Or, to copy a specific version only, do this:
|
||||
|
||||
```
|
||||
# Copy install directory
|
||||
COPY --from=cdt-infra-all-gdbs:ubuntu-18.04 /shared/common/gdb/gdb-all/install/gdb-8.2.1 /shared/common/gdb/gdb-all/install/gdb-8.2.1
|
||||
# Copy versioned links
|
||||
COPY --from=cdt-infra-all-gdbs:ubuntu-18.04 /shared/common/gdb/gdb-all/bin/gdb.8.2 /shared/common/gdb/gdb-all/bin/gdb.8.2
|
||||
COPY --from=cdt-infra-all-gdbs:ubuntu-18.04 /shared/common/gdb/gdb-all/bin/gdb.8.2.1 /shared/common/gdb/gdb-all/bin/gdb.8.2.1
|
||||
COPY --from=cdt-infra-all-gdbs:ubuntu-18.04 /shared/common/gdb/gdb-all/bin/gdbserver.8.2 /shared/common/gdb/gdb-all/bin/gdbserver.8.2
|
||||
COPY --from=cdt-infra-all-gdbs:ubuntu-18.04 /shared/common/gdb/gdb-all/bin/gdbserver.8.2.1 /shared/common/gdb/gdb-all/bin/gdbserver.8.2.1
|
||||
```
|
|
@ -1,42 +0,0 @@
|
|||
FROM ubuntu:18.04
|
||||
|
||||
USER root
|
||||
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
ca-certificates \
|
||||
curl \
|
||||
git \
|
||||
gnupg \
|
||||
openssh-client \
|
||||
pkg-config \
|
||||
wget \
|
||||
zip \
|
||||
locales \
|
||||
build-essential \
|
||||
bison \
|
||||
flex \
|
||||
libgmp-dev \
|
||||
libexpat1-dev \
|
||||
libmpfr-dev \
|
||||
libncurses-dev \
|
||||
pkg-config \
|
||||
zlib1g-dev \
|
||||
texinfo \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& locale-gen en_US.UTF-8
|
||||
|
||||
# Need locale to be UTF-8
|
||||
ENV LANG en_US.UTF-8
|
||||
ENV LANGUAGE en_US:en
|
||||
ENV LC_ALL en_US.UTF-8
|
||||
|
||||
# Build GDB
|
||||
COPY scripts/download-build-gdb.sh /opt/scripts/download-build-gdb.sh
|
||||
ENV GDB_BASE /shared/common/gdb/gdb-all
|
||||
ENV GDB_VERSIONS all
|
||||
# build without debug info to reduce size
|
||||
ENV CFLAGS -g0
|
||||
ENV CXXFLAGS -g0
|
||||
RUN chmod u+x /opt/scripts/download-build-gdb.sh && mkdir -p /shared/common/gdb/gdb-all && /opt/scripts/download-build-gdb.sh -b $GDB_BASE $GDB_VERSIONS \
|
||||
&& rm -rf $GDB_BASE/download && rm -rf $GDB_BASE/build
|
|
@ -1,2 +0,0 @@
|
|||
This directory contains dockerfiles for CDT Infra to provide a basic Java environment.
|
||||
|
|
@ -1,17 +1,13 @@
|
|||
# This dockerfile is used to build the MacOSX SDK
|
||||
FROM ubuntu:18.04
|
||||
FROM ubuntu:20.04
|
||||
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y clang make build-essential
|
||||
RUN apt-get install -y libssl-dev lzma-dev liblzma-dev libxml2-dev git patch python cpio bzip2 xz-utils libbz2-dev
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
RUN apt update
|
||||
RUN apt install -y clang make build-essential libssl-dev lzma-dev liblzma-dev libxml2-dev git patch python3 cpio bzip2 xz-utils libbz2-dev curl
|
||||
|
||||
# cmake in Ubuntu is too old to build osxcross, therefore
|
||||
# use this version
|
||||
RUN apt-get install -y curl
|
||||
RUN curl -fsSL https://github.com/Kitware/CMake/releases/download/v3.29.2/cmake-3.29.2-linux-x86_64.tar.gz | tar xzf - -C /usr/share
|
||||
ENV PATH="/usr/share/cmake-3.29.2-linux-x86_64/bin:${PATH}"
|
||||
|
||||
|
||||
# Xcode_13.1.xip needs to be downloaded from
|
||||
# https://developer.apple.com/download/all/?q=xcode - specically:
|
||||
ARG Xcodexip=Xcode_13.1.xip
|
||||
|
@ -29,7 +25,7 @@ ENV UNATTENDED=1
|
|||
RUN cd /opt/osxcross && ./build.sh
|
||||
|
||||
# Start next stage build
|
||||
FROM ubuntu:18.04
|
||||
FROM ubuntu:20.04
|
||||
COPY --from=0 /opt/osxcross/target /opt/osxcross/target
|
||||
ENV PATH="/opt/osxcross/target/bin:${PATH}"
|
||||
# At this point the osxcross toolchain is not usable,
|
|
@ -1,61 +0,0 @@
|
|||
FROM cdt-infra-base:ubuntu-18.04
|
||||
|
||||
USER root
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
build-essential \
|
||||
git \
|
||||
gdb \
|
||||
libgmp-dev \
|
||||
libexpat1-dev \
|
||||
libipt1 \
|
||||
libmpfr-dev \
|
||||
libncurses-dev \
|
||||
ninja-build \
|
||||
pkg-config \
|
||||
python3-all-dev python3-pip python3-setuptools \
|
||||
zlib1g-dev \
|
||||
gdbserver \
|
||||
gcc-mingw-w64-x86-64 \
|
||||
g++-mingw-w64-x86-64 \
|
||||
gcc-aarch64-linux-gnu \
|
||||
g++-aarch64-linux-gnu \
|
||||
gcc-powerpc64le-linux-gnu \
|
||||
g++-powerpc64le-linux-gnu \
|
||||
clang \
|
||||
libxml2-utils \
|
||||
gettext-base \
|
||||
xserver-xephyr \
|
||||
clang-format \
|
||||
xvfb \
|
||||
ssh-askpass \
|
||||
&& apt-get install -y llvm \
|
||||
&& apt-get install -y --no-install-recommends texinfo bison flex \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& pip3 install --upgrade pip
|
||||
|
||||
#Specifc CDT deps
|
||||
|
||||
#Meson
|
||||
RUN pip3 install meson
|
||||
|
||||
# GDB pre-built in a different image
|
||||
COPY --from=cdt-infra-all-gdbs:ubuntu-18.04 /shared/common/gdb/gdb-all/bin /shared/common/gdb/gdb-all/bin
|
||||
COPY --from=cdt-infra-all-gdbs:ubuntu-18.04 /shared/common/gdb/gdb-all/install /shared/common/gdb/gdb-all/install
|
||||
ENV PATH="/shared/common/gdb/gdb-all/bin:${PATH}"
|
||||
|
||||
# Get pre-built MacOSX toolchain from other image (this also
|
||||
# requires clang to be listed in the installs above)
|
||||
COPY --from=cdt-infra-build-macos-sdk:ubuntu-18.04 /opt/osxcross/target /opt/osxcross/target
|
||||
ENV PATH="/opt/osxcross/target/bin:${PATH}"
|
||||
|
||||
#Fix permissions for OpenShift & standard k8s
|
||||
RUN chown -R 1000:0 ${HOME} \
|
||||
&& chmod -R g+rwX ${HOME}
|
||||
|
||||
|
||||
ENV USER_NAME vnc
|
||||
USER 1000
|
||||
WORKDIR ${HOME}
|
||||
|
||||
CMD ["/home/vnc/.vnc/xstartup.sh"]
|
9
docker/cdt-infra-github/Dockerfile
Normal file
9
docker/cdt-infra-github/Dockerfile
Normal file
|
@ -0,0 +1,9 @@
|
|||
FROM cdt-infra:latest
|
||||
USER root
|
||||
|
||||
RUN chown -R 1001:0 ${HOME} \
|
||||
&& chmod -R g+rwX ${HOME}
|
||||
|
||||
USER 1001
|
||||
|
||||
CMD ["/home/vnc/.vnc/xstartup.sh"]
|
9
docker/cdt-infra-jipp/Dockerfile
Normal file
9
docker/cdt-infra-jipp/Dockerfile
Normal file
|
@ -0,0 +1,9 @@
|
|||
FROM cdt-infra:latest
|
||||
USER root
|
||||
|
||||
RUN chown -R 1000:0 ${HOME} \
|
||||
&& chmod -R g+rwX ${HOME}
|
||||
|
||||
USER 1000
|
||||
|
||||
CMD ["/home/vnc/.vnc/xstartup.sh"]
|
|
@ -1,25 +0,0 @@
|
|||
FROM ubuntu:18.04
|
||||
|
||||
# The contents of this file are similar to cdt-infra-plus-eclipse-install/*/Dockerfile
|
||||
# because we don't want to share layers otherwise the change in permissions (1000 -> 1001)
|
||||
# causes an additional layer to be created in Docker, adding 300MB+ to download
|
||||
# size on each run
|
||||
|
||||
ENV HOME=/home/vnc
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y curl tar gzip
|
||||
#Eclipse SDK & Fix permissions for GitHub Actions
|
||||
RUN mkdir -p ${HOME}/buildtools && cd ${HOME}/buildtools \
|
||||
&& curl -sL https://download.eclipse.org/eclipse/downloads/drops4/R-4.31-202402290520/eclipse-SDK-4.31-linux-gtk-x86_64.tar.gz | tar xvz \
|
||||
&& mv eclipse eclipse-SDK-4.31 \
|
||||
&& chown -R 1001:0 ${HOME} \
|
||||
&& chmod -R g+rwX ${HOME}
|
||||
|
||||
FROM cdt-infra-eclipse-full:ubuntu-18.04
|
||||
USER root
|
||||
|
||||
COPY --from=0 ${HOME}/buildtools ${HOME}/buildtools
|
||||
|
||||
USER 1001
|
||||
|
||||
CMD ["/bin/bash"]
|
|
@ -1,20 +0,0 @@
|
|||
FROM ubuntu:18.04
|
||||
|
||||
ENV HOME=/home/vnc
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y curl tar gzip
|
||||
#Eclipse SDK & Fix permissions for OpenShift & standard k8s
|
||||
RUN mkdir -p ${HOME}/buildtools && cd ${HOME}/buildtools \
|
||||
&& curl -sL https://download.eclipse.org/eclipse/downloads/drops4/R-4.31-202402290520/eclipse-SDK-4.31-linux-gtk-x86_64.tar.gz | tar xvz \
|
||||
&& mv eclipse eclipse-SDK-4.31 \
|
||||
&& chown -R 1000:0 ${HOME} \
|
||||
&& chmod -R g+rwX ${HOME}
|
||||
|
||||
FROM cdt-infra-eclipse-full:ubuntu-18.04
|
||||
USER root
|
||||
|
||||
COPY --from=0 ${HOME}/buildtools ${HOME}/buildtools
|
||||
|
||||
USER 1000
|
||||
|
||||
CMD ["/home/vnc/.vnc/xstartup.sh"]
|
|
@ -1,2 +0,0 @@
|
|||
This directory contains a convenience for the Eclipse CDT Cloud's cdt-gdb-adapter project that exists
|
||||
for historical reasons. See this reference https://github.com/eclipse-cdt-cloud/cdt-gdb-adapter/blob/main/src/integration-tests/README.md#running-the-tests-using-docker
|
|
@ -1,21 +0,0 @@
|
|||
FROM cdt-infra-eclipse-full:ubuntu-18.04
|
||||
USER root
|
||||
|
||||
#Node
|
||||
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash \
|
||||
&& apt-get install -y nodejs \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& npm install -g yarn
|
||||
|
||||
# socat needed for some cdt-gdb-adapter tests
|
||||
RUN apt-get update && apt-get install -y socat && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
#Fix permissions for OpenShift & standard k8s
|
||||
RUN chown -R 1000:0 ${HOME} \
|
||||
&& chmod -R g+rwX ${HOME}
|
||||
|
||||
ENV USER_NAME vnc
|
||||
USER 1000
|
||||
WORKDIR ${HOME}
|
||||
|
||||
CMD ["bash"]
|
|
@ -1,28 +1,15 @@
|
|||
# This file is derived from:
|
||||
# - https://github.com/eclipse-cbi/dockerfiles/blob/bf1f1a18f4910d007de67765f8df083102150a7c/distros/Dockerfile
|
||||
# - https://github.com/eclipse-cbi/dockerfiles/blob/bf1f1a18f4910d007de67765f8df083102150a7c/gtk3-wm/ubuntu-metacity/18.04/Dockerfile
|
||||
#-----------------------------------------------
|
||||
# This first part of the file is derived from:
|
||||
# - https://github.com/eclipse-cbi/dockerfiles/blob/74dda784b6cf294012a3bf0d66221a1af480a83c/gtk3-wm/ubuntu-metacity/Dockerfile
|
||||
# Consult https://github.com/eclipse-cbi/dockerfiles for possible updates
|
||||
# differences from source are commented
|
||||
FROM ubuntu:18.04
|
||||
FROM ubuntu:20.04
|
||||
|
||||
### user name recognition at runtime w/ an arbitrary uid - for OpenShift deployments
|
||||
COPY scripts/uid_entrypoint /usr/local/bin/uid_entrypoint
|
||||
RUN chmod u+x /usr/local/bin/uid_entrypoint && \
|
||||
chgrp 0 /usr/local/bin/uid_entrypoint && \
|
||||
chmod g=u /usr/local/bin/uid_entrypoint /etc/passwd
|
||||
|
||||
# Add dumb-init entry point: https://github.com/eclipse-cdt/cdt-infra/pull/26
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
dumb-init \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
ENTRYPOINT [ "uid_entrypoint", "dumb-init" ]
|
||||
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
libgtk-3-0 \
|
||||
tigervnc-standalone-server \
|
||||
tigervnc-common \
|
||||
tightvncserver \
|
||||
metacity \
|
||||
x11-xserver-utils \
|
||||
libgl1-mesa-dri \
|
||||
|
@ -45,42 +32,74 @@ RUN mkdir -p ${HOME}/.vnc && chmod -R 775 ${HOME} \
|
|||
&& echo "123456" | vncpasswd -f > ${HOME}/.vnc/passwd \
|
||||
&& chmod 600 ${HOME}/.vnc/passwd
|
||||
|
||||
# In addition to metacity in upstream version, provide icewm and mutter manager scripts
|
||||
# and use icewm as default (experiments showed that on 16.04 metacity was more reliable,
|
||||
# but on 18.04 icewm is more reliable when running tests)
|
||||
COPY scripts/xstartup_*.sh ${HOME}/.vnc/
|
||||
# Create a custom vnc xstartup file
|
||||
COPY scripts/xstartup_metacity.sh ${HOME}/.vnc/xstartup.sh
|
||||
RUN chmod 755 ${HOME}/.vnc/xstartup*.sh
|
||||
RUN chmod 755 ${HOME}/.vnc/xstartup.sh
|
||||
|
||||
|
||||
####
|
||||
# From this point forward is the extra standard tools for CDT
|
||||
|
||||
# git and other tools
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
ca-certificates \
|
||||
curl \
|
||||
openssh-client \
|
||||
wget \
|
||||
zip \
|
||||
unzip \
|
||||
gnupg \
|
||||
locales \
|
||||
libxtst6 \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
ca-certificates \
|
||||
curl \
|
||||
openssh-client \
|
||||
wget \
|
||||
zip \
|
||||
unzip \
|
||||
gnupg \
|
||||
locales \
|
||||
libxtst6 \
|
||||
build-essential \
|
||||
git \
|
||||
gdb \
|
||||
libgmp-dev \
|
||||
libexpat1-dev \
|
||||
libmpfr-dev \
|
||||
libncurses-dev \
|
||||
ninja-build \
|
||||
pkg-config \
|
||||
python3-all-dev python3-pip python3-setuptools \
|
||||
zlib1g-dev \
|
||||
gdbserver \
|
||||
gcc-mingw-w64-x86-64 \
|
||||
g++-mingw-w64-x86-64 \
|
||||
gcc-aarch64-linux-gnu \
|
||||
g++-aarch64-linux-gnu \
|
||||
gcc-powerpc64le-linux-gnu \
|
||||
g++-powerpc64le-linux-gnu \
|
||||
gcc-riscv64-linux-gnu \
|
||||
g++-riscv64-linux-gnu \
|
||||
clang \
|
||||
libxml2-utils \
|
||||
gettext-base \
|
||||
xserver-xephyr \
|
||||
clang-format \
|
||||
xvfb \
|
||||
ssh-askpass \
|
||||
llvm \
|
||||
texinfo bison flex \
|
||||
meson \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
#-----------------------------------------------
|
||||
# This is the end of the upstream one from eclipse-cbi
|
||||
# the rest of this docker file is everything needed to
|
||||
# build and test CDT on Jenkins and GitHUb
|
||||
#-----------------------------------------------
|
||||
|
||||
RUN locale-gen en_US.UTF-8
|
||||
# Need locale to be UTF-8
|
||||
ENV LANG en_US.UTF-8
|
||||
ENV LANGUAGE en_US:en
|
||||
ENV LC_ALL en_US.UTF-8
|
||||
ENV LANG=en_US.UTF-8
|
||||
ENV LANGUAGE=en_US:en
|
||||
ENV LC_ALL=en_US.UTF-8
|
||||
|
||||
|
||||
# Get release versions from Adoptium API: https://api.adoptium.net/q/swagger-ui/#/Release%20Info/getReleaseNames
|
||||
ENV JDK17_VERSION jdk-17.0.11+9
|
||||
ENV JDK21_VERSION jdk-21.0.3+9
|
||||
ENV JAVA17_HOME /usr/lib/jvm/${JDK17_VERSION}
|
||||
ENV JAVA21_HOME /usr/lib/jvm/${JDK21_VERSION}
|
||||
# Update toolchains.xml too when updating this
|
||||
ENV JDK17_VERSION=jdk-17.0.13+11
|
||||
ENV JDK21_VERSION=jdk-21.0.5+11
|
||||
ENV JAVA17_HOME=/usr/lib/jvm/${JDK17_VERSION}
|
||||
ENV JAVA21_HOME=/usr/lib/jvm/${JDK21_VERSION}
|
||||
|
||||
# Get Java from adoptium + header files for win32 & mac for cross compiling JNI libraries on Java 8, 11, 17
|
||||
# TODO: Move these runs into a script, the only difference between each invocation is the env variables
|
||||
|
@ -119,22 +138,43 @@ RUN export JVERSION=${JDK17_VERSION} \
|
|||
|
||||
# Default to JAVA21 being in use
|
||||
ENV PATH="${JAVA21_HOME}/bin:${PATH}"
|
||||
ENV JAVA_HOME ${JAVA21_HOME}
|
||||
ENV JAVA_HOME=${JAVA21_HOME}
|
||||
|
||||
# Maven - Note that this is the default, but the Jenkinsfile may override it with JIPP version
|
||||
ENV MAVEN_VERSION 3.9.6
|
||||
ENV MAVEN_VERSION=3.9.9
|
||||
RUN curl -fsSL https://archive.apache.org/dist/maven/maven-3/$MAVEN_VERSION/binaries/apache-maven-$MAVEN_VERSION-bin.tar.gz | tar xzf - -C /usr/share \
|
||||
&& mv /usr/share/apache-maven-$MAVEN_VERSION /usr/share/maven \
|
||||
&& ln -s /usr/share/maven/bin/mvn /usr/bin/mvn
|
||||
ENV MAVEN_HOME /usr/share/maven
|
||||
|
||||
ENV MAVEN_HOME=/usr/share/maven
|
||||
RUN mkdir -p ${HOME}/.m2
|
||||
COPY toolchains.xml ${HOME}/.m2
|
||||
|
||||
# Get pre-built MacOSX toolchain from other image (this also
|
||||
# requires clang to be listed in the installs above)
|
||||
COPY --from=cdt-infra-build-macos-sdk:latest /opt/osxcross/target /opt/osxcross/target
|
||||
ENV PATH="/opt/osxcross/target/bin:${PATH}"
|
||||
|
||||
# Get an Eclipse install for running code formatting checks
|
||||
RUN mkdir -p ${HOME}/buildtools && cd ${HOME}/buildtools \
|
||||
&& curl -sL https://download.eclipse.org/eclipse/downloads/drops4/R-4.34-202411201800/eclipse-SDK-4.34-linux-gtk-x86_64.tar.gz | tar xvz \
|
||||
&& mv eclipse eclipse-SDK-4.34
|
||||
|
||||
# Get WoA toolchain https://github.com/eclipse-cdt/cdt/pull/971
|
||||
# Note that we remove the "fake" gcc and g++ provided here as they
|
||||
# conflict with those provided by package gcc-mingw-w64-x86-64
|
||||
# TODO change to install this from some future package called probably gcc-mingw-w64-aarch64
|
||||
RUN curl -fsSL https://github.com/mstorsjo/llvm-mingw/releases/download/20241203/llvm-mingw-20241203-ucrt-ubuntu-20.04-x86_64.tar.xz | tar xJf - -C /opt/ \
|
||||
&& mv /opt/llvm-mingw-20241203-ucrt-ubuntu-20.04-x86_64 /opt/woacross \
|
||||
&& rm /opt/woacross/bin/*-gcc /opt/woacross/bin/*-g++
|
||||
ENV PATH="/opt/woacross/bin:${PATH}"
|
||||
|
||||
#Fix permissions for OpenShift & standard k8s
|
||||
RUN chown -R 1000:0 ${HOME} \
|
||||
&& chmod -R g+rwX ${HOME}
|
||||
|
||||
ENV USER_NAME vnc
|
||||
|
||||
ENV USER_NAME=vnc
|
||||
USER 1000
|
||||
WORKDIR ${HOME}
|
||||
|
||||
CMD ["/home/vnc/.vnc/xstartup.sh"]
|
|
@ -11,7 +11,7 @@ namespace=${1:-quay.io/eclipse-cdt}
|
|||
shorthash=$(git rev-parse --short HEAD)
|
||||
toplevel=$(git rev-parse --show-toplevel)
|
||||
|
||||
images="cdt-infra-eclipse-full:ubuntu-18.04 cdt-infra-plus-eclipse-install:ubuntu-18.04 cdt-infra-plus-eclipse-install-github:ubuntu-18.04 cdt-infra-plus-node:ubuntu-18.04"
|
||||
images="cdt-infra:latest cdt-infra-jipp:latest cdt-infra-github:latest"
|
||||
|
||||
$toplevel/docker/build-images.sh
|
||||
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
#!/usr/bin/env sh
|
||||
if ! whoami > /dev/null 2>&1; then
|
||||
if [ -w /etc/passwd ]; then
|
||||
echo "${USER_NAME:-default}:x:$(id -u):0:${USER_NAME:-default} user:${HOME}:/sbin/nologin" >> /etc/passwd
|
||||
fi
|
||||
fi
|
||||
exec "$@"
|
|
@ -1,11 +0,0 @@
|
|||
#!/usr/bin/env /bin/sh
|
||||
|
||||
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
|
||||
[ -r ${HOME}/.Xresources ] && xrdb ${HOME}/.Xresources
|
||||
|
||||
Xvnc ${DISPLAY} -geometry 1440x900 -depth 16 -dpi 100 -PasswordFile ${HOME}/.vnc/passwd &
|
||||
sleep 2
|
||||
xsetroot -solid grey
|
||||
vncconfig -iconic &
|
||||
xhost +
|
||||
icewm --replace --sm-disable --display=${DISPLAY} &
|
|
@ -1,11 +0,0 @@
|
|||
#!/usr/bin/env /bin/sh
|
||||
|
||||
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
|
||||
[ -r ${HOME}/.Xresources ] && xrdb ${HOME}/.Xresources
|
||||
|
||||
Xvnc ${DISPLAY} -geometry 1440x900 -depth 16 -dpi 100 -PasswordFile ${HOME}/.vnc/passwd &
|
||||
sleep 2
|
||||
xsetroot -solid grey
|
||||
vncconfig -iconic &
|
||||
xhost +
|
||||
mutter --replace --sm-disable --display=${DISPLAY} &
|
|
@ -8,7 +8,7 @@
|
|||
<vendor>default</vendor>
|
||||
</provides>
|
||||
<configuration>
|
||||
<jdkHome>/usr/lib/jvm/jdk-21.0.3+9</jdkHome>
|
||||
<jdkHome>/usr/lib/jvm/jdk-21.0.5+11</jdkHome>
|
||||
</configuration>
|
||||
</toolchain>
|
||||
<toolchain>
|
||||
|
@ -19,7 +19,7 @@
|
|||
<vendor>default</vendor>
|
||||
</provides>
|
||||
<configuration>
|
||||
<jdkHome>/usr/lib/jvm/jdk-17.0.11+9</jdkHome>
|
||||
<jdkHome>/usr/lib/jvm/jdk-17.0.13+11</jdkHome>
|
||||
</configuration>
|
||||
</toolchain>
|
||||
</toolchains>
|
||||
|
|
|
@ -3,7 +3,7 @@ kind: Pod
|
|||
spec:
|
||||
containers:
|
||||
- name: cdt
|
||||
image: quay.io/eclipse-cdt/cdt-infra-plus-eclipse-install@sha256:34d46fc15cdade4f103d3f1043c48441d41b532545e6b9083c17f5db0175bbab
|
||||
image: quay.io/eclipse-cdt/cdt-infra-jipp@sha256:34d46fc15cdade4f103d3f1043c48441d41b532545e6b9083c17f5db0175bbab
|
||||
tty: true
|
||||
args: ["/bin/sh", "-c", "/home/vnc/.vnc/xstartup.sh && cat"]
|
||||
resources:
|
||||
|
|
|
@ -3,7 +3,7 @@ kind: Pod
|
|||
spec:
|
||||
containers:
|
||||
- name: cdt
|
||||
image: quay.io/eclipse-cdt/cdt-infra-eclipse-full@sha256:ecde22ac03cfb4dc7c47b8f5e8f72f9e53ac325d3d568f1bd21fc7af76dc9ed0
|
||||
image: quay.io/eclipse-cdt/cdt-infra-jipp@sha256:ecde22ac03cfb4dc7c47b8f5e8f72f9e53ac325d3d568f1bd21fc7af76dc9ed0
|
||||
tty: true
|
||||
args: ["/bin/sh", "-c", "/home/vnc/.vnc/xstartup.sh && cat"]
|
||||
resources:
|
||||
|
|
|
@ -3,7 +3,7 @@ kind: Pod
|
|||
spec:
|
||||
containers:
|
||||
- name: cdt
|
||||
image: quay.io/eclipse-cdt/cdt-infra-eclipse-full@sha256:ecde22ac03cfb4dc7c47b8f5e8f72f9e53ac325d3d568f1bd21fc7af76dc9ed0
|
||||
image: quay.io/eclipse-cdt/cdt-infra-jipp@sha256:ecde22ac03cfb4dc7c47b8f5e8f72f9e53ac325d3d568f1bd21fc7af76dc9ed0
|
||||
tty: true
|
||||
args: ["/bin/sh", "-c", "/home/vnc/.vnc/xstartup.sh && cat"]
|
||||
resources:
|
||||
|
|
|
@ -90,7 +90,7 @@ $(OS_DIR)/win32/x86_64/serial.dll: serial.c
|
|||
$(OS_DIR)/win32/aarch64/serial.dll: serial.c
|
||||
mkdir -p $(dir $@) && \
|
||||
$(REPRODUCIBLE_BUILD_WRAPPER) \
|
||||
aarch64-w64-mingw32-gcc $(COMMON_CFLAGS) -Iinclude -I"$(JAVA_HOME)/include" -I"$(JAVA_HOME)/include/win32" -shared -o $@ $^
|
||||
aarch64-w64-mingw32-clang $(COMMON_CFLAGS) -Iinclude -I"$(JAVA_HOME)/include" -I"$(JAVA_HOME)/include/win32" -shared -o $@ $^
|
||||
|
||||
$(OS_DIR)/linux/x86_64/libserial.so: serial.c
|
||||
mkdir -p $(dir $@) && \
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
native/org.eclipse.cdt.native.serial/os/win32/aarch64/serial.dll
Executable file
BIN
native/org.eclipse.cdt.native.serial/os/win32/aarch64/serial.dll
Executable file
Binary file not shown.
Binary file not shown.
|
@ -79,7 +79,7 @@
|
|||
<configuration>
|
||||
<target>
|
||||
<exec executable="docker" newenvironment="false" failOnError="true">
|
||||
<!-- docker run -\-rm -t -v $(git rev-parse -\-show-toplevel):/work -w /work/$(git rev-parse -\-show-prefix) quay.io/eclipse-cdt/cdt-infra-eclipse-full:latest make -C native_src rebuild -->
|
||||
<!-- docker run -\-rm -t -v $(git rev-parse -\-show-toplevel):/work -w /work/$(git rev-parse -\-show-prefix) quay.io/eclipse-cdt/cdt-infra:latest make -C native_src rebuild -->
|
||||
<arg value="run" />
|
||||
<arg value="--rm" />
|
||||
<arg value="-t" />
|
||||
|
@ -87,7 +87,7 @@
|
|||
<arg value="${project.basedir}/../..:/work" />
|
||||
<arg value="-w" />
|
||||
<arg value="/work/native/org.eclipse.cdt.native.serial" />
|
||||
<arg value="quay.io/eclipse-cdt/cdt-infra-eclipse-full:latest" />
|
||||
<arg value="quay.io/eclipse-cdt/cdt-infra:latest" />
|
||||
<arg value="make" />
|
||||
<arg value="-C" />
|
||||
<arg value="native_src" />
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
###############################################################################
|
||||
# Copyright (c) 2020 Kichwa Coders Canada Inc and others.
|
||||
# Copyright (c) 2020, 2024 Kichwa Coders Canada Inc and others.
|
||||
#
|
||||
# This program and the accompanying materials
|
||||
# are made available under the terms of the Eclipse Public License 2.0
|
||||
|
@ -20,22 +20,48 @@ then
|
|||
exit 0
|
||||
fi
|
||||
|
||||
# This is the current set of allowed DLL dependencies for CDT code. Additional entries here are permitted,
|
||||
# provided they are found on all Windows machines by default.
|
||||
ALLOWED_DLLS="KERNEL32.DLL MSVCRT.DLL USER32.DLL PSAPI.DLL SHELL32.DLL ADVAPI32.DLL"
|
||||
# In addition, the WINPTY.DLL is something CDT ships so is allowed to be a dependency
|
||||
ALLOWED_DLLS+=" WINPTY.DLL"
|
||||
|
||||
###
|
||||
# Check that all .dll/.exe files in CDT for a given ${ARCH} (using ${PREFIX} toolchain)
|
||||
function check {
|
||||
ARCH=$1; shift
|
||||
PREFIX=$1; shift
|
||||
ALLOWED_DLLS="$@"; shift
|
||||
ALLOWED_DLLS=${ALLOWED_DLLS^^} # change to uppercase
|
||||
ret_code=0
|
||||
|
||||
while read line; do
|
||||
while read import; do
|
||||
dllname=${import//DLL Name: /}
|
||||
dllname_upper=${dllname^^}
|
||||
if [[ ! " ${ALLOWED_DLLS} " =~ " ${dllname_upper} " ]]; then
|
||||
echo "ERROR: $line has illegal import of ${dllname}"
|
||||
exit_code=1
|
||||
fi
|
||||
done <<<$(${PREFIX}-w64-mingw32-objdump -p $line | grep "DLL Name")
|
||||
done <<<$(git ls-files -- **/win32/${ARCH}/\*.exe **/win32/${ARCH}/\*.dll)
|
||||
return ${ret_code}
|
||||
}
|
||||
|
||||
exit_code=0
|
||||
while read line; do
|
||||
while read import; do
|
||||
dllname=${import//DLL Name: /}
|
||||
dllname_upper=${dllname^^}
|
||||
if [[ ! " ${ALLOWED_DLLS} " =~ " ${dllname_upper} " ]]; then
|
||||
echo "ERROR: $line has illegal import of ${dllname}"
|
||||
exit_code=1
|
||||
fi
|
||||
done <<<$(x86_64-w64-mingw32-objdump -p $line | grep "DLL Name")
|
||||
done <<<$(git ls-files -- \*.exe \*.dll)
|
||||
|
||||
# This is the current set of allowed so dependencies for CDT code. Additional entries here are permitted,
|
||||
# provided they are found on all Windows machines by default.
|
||||
dlls="kernel32.dll msvcrt.dll user32.dll psapi.dll shell32.dll advapi32.dll winpty.dll"
|
||||
# The newer style api- dlls are listed separately because of as of this writing only
|
||||
# the aarch64 has these references listed.
|
||||
apidlls="api-ms-win-crt-runtime-l1-1-0.dll \
|
||||
api-ms-win-crt-runtime-l1-1-0.dll \
|
||||
api-ms-win-crt-stdio-l1-1-0.dll \
|
||||
api-ms-win-crt-time-l1-1-0.dll \
|
||||
api-ms-win-crt-heap-l1-1-0.dll \
|
||||
api-ms-win-crt-private-l1-1-0.dll \
|
||||
api-ms-win-crt-utility-l1-1-0.dll \
|
||||
api-ms-win-crt-string-l1-1-0.dll \
|
||||
api-ms-win-crt-convert-l1-1-0.dll \
|
||||
api-ms-win-crt-environment-l1-1-0.dll \
|
||||
api-ms-win-crt-filesystem-l1-1-0.dll \
|
||||
api-ms-win-crt-locale-l1-1-0.dll \
|
||||
api-ms-win-crt-math-l1-1-0.dll"
|
||||
check aarch64 aarch64 ${dlls} ${apidlls} || exit_code=1
|
||||
check x86_64 x86_64 ${dlls} || exit_code=1
|
||||
exit ${exit_code}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
###############################################################################
|
||||
# Copyright (c) 2020 Kichwa Coders Canada Inc and others.
|
||||
# Copyright (c) 2020, 2024 Kichwa Coders Canada Inc and others.
|
||||
#
|
||||
# This program and the accompanying materials
|
||||
# are made available under the terms of the Eclipse Public License 2.0
|
||||
|
@ -32,6 +32,7 @@ function check {
|
|||
ALLOWED_LIBS="$@"; shift
|
||||
ret_code=0
|
||||
while read line; do
|
||||
echo "checking ${line}"
|
||||
${PREFIX}-linux-gnu-readelf -d ${line} | grep -E '\(NEEDED\)' | while read needed; do
|
||||
needed=${needed//*Shared library: [/}
|
||||
needed=${needed//]*/}
|
||||
|
@ -64,8 +65,8 @@ function check {
|
|||
exit_code=0
|
||||
# This is the current set of allowed so dependencies for CDT code. Additional entries here are permitted,
|
||||
# provided they are found on all Linux machines by default.
|
||||
check aarch64 aarch64 2.17 libc.so.6 ld-linux-aarch64.so.1 || exit_code=1
|
||||
check x86_64 x86_64 2.4 libc.so.6 || exit_code=1
|
||||
check ppc64le powerpc64le 2.17 libc.so.6 || exit_code=1
|
||||
check aarch64 aarch64 2.31 libc.so.6 ld-linux-aarch64.so.1 || exit_code=1
|
||||
check x86_64 x86_64 2.31 libc.so.6 || exit_code=1
|
||||
check ppc64le powerpc64le 2.31 libc.so.6 || exit_code=1
|
||||
|
||||
exit ${exit_code}
|
||||
|
|
|
@ -23,12 +23,12 @@ CDTDIR=${DIR}/../..
|
|||
##
|
||||
# Format code
|
||||
##
|
||||
: ${ECLIPSE:=~/buildtools/eclipse-SDK-4.31/eclipse}
|
||||
: ${ECLIPSE:=~/buildtools/eclipse-SDK-4.34/eclipse}
|
||||
|
||||
if test ! -e "$ECLIPSE" ; then
|
||||
echo "The Eclipse binary was not found at \"$ECLIPSE\"!"
|
||||
echo "You can download it to and pass it via environment variable:"
|
||||
echo " curl -L https://download.eclipse.org/eclipse/downloads/drops4/R-4.31-202402290520/eclipse-SDK-4.31-linux-gtk-x86_64.tar.gz | tar xzC /tmp"
|
||||
echo " curl -L https://download.eclipse.org/eclipse/downloads/drops4/R-4.34-202402290520/eclipse-SDK-4.34-linux-gtk-x86_64.tar.gz | tar xzC /tmp"
|
||||
echo " ECLIPSE=/tmp/eclipse/eclipse ./releng/scripts/check_code_cleanliness.sh"
|
||||
exit 1
|
||||
fi
|
||||
|
|
Loading…
Add table
Reference in a new issue