Conversation
Remove the build script and conan profiles. Change the setup to support Conan
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #820 +/- ##
==========================================
- Coverage 91.50% 91.45% -0.05%
==========================================
Files 235 235
Lines 28686 28686
==========================================
- Hits 26248 26235 -13
- Misses 2438 2451 +13 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Good idea to simplify this! The current setup is not as easy as it should be for new (or existing) contributors. I tested this on Fedora 43 with rootless podman and CLion 2025.3. The first attempt on running this branch the container build fails with the following failure: Unpacking gh (2.86.0) ...
Setting up gh (2.86.0) ...
/tmp/jb-devcontainer-features/ghcr.io-devcontainers-features-github-cli-1
COMMIT jb-devcontainer-apache_celix_dev_container
--> 9b5711e397e2
Successfully tagged localhost/jb-devcontainer-apache_celix_dev_container:latest
9b5711e397e252880285297a87cf831cb4cdf8a43c888bd8f1edc846315ae3ee
Creating container…
Container Id: 82f761ec4ae509cbd02c45d1a0acac202e271389a6e64c921c02d10c5d70ba09
Container name: '/youthful_gould'
Starting container '/youthful_gould'
Status 500: Status 500: {"cause":"no matching entries in passwd file","message":"unable to find user celixdev: no matching entries in passwd file","response":500}It seems that the user This might be an accidental error, so I tried changes the conan-dev stage to inherit from the conan-build stage instead by applying the following patch: diff --git a/.devcontainer/Containerfile b/.devcontainer/Containerfile
index 21b3f8bfb..c4dc6c953 100644
--- a/.devcontainer/Containerfile
+++ b/.devcontainer/Containerfile
@@ -59,10 +59,12 @@ RUN pipx install conan && \
sed -i 's/^build_type=.*/build_type=Release/' /home/${USERNAME}/.conan2/profiles/release && \
sed -i 's/^build_type=.*/build_type=Debug/' /home/${USERNAME}/.conan2/profiles/debug
-FROM base as conan-dev
+FROM conan-build as conan-dev
+USER root
RUN DEBIAN_FRONTEND="noninteractive" apt-get update && \
DEBIAN_FRONTEND="noninteractive" apt-get install -y --no-install-recommends \
gnupg2 dos2unix locales-all ssh rsync tar tzdata sudo vim cmake-curses-gui gdb \
wget curl && \
- apt-get clean \
+ apt-get clean
+USER ${USERNAME}With that change CLion succesfully opens the celix project using the devcontainer approach. After selecting the Are these warnings expected? Running Quickly scanning through the test output, it seems that every failing test fails with the following output: (the same is true when running the More info: celixdev@ac8cda07f34b:/IdeaProjects/celix-container$ ldd build/bundles/event_admin/remote_provider/remote_provider_mqtt/gtest/unit_test_event_admin_remote_provider_mqtt_with_error_injectiond
build/bundles/event_admin/remote_provider/remote_provider_mqtt/gtest/unit_test_event_admin_remote_provider_mqtt_with_error_injectiond: /lib/x86_64-linux-gnu/libcrypto.so.3: version `OPENSSL_3.4.0' not found (required by /home/celixdev/.conan2/p/b/libcu09ad2ef619b4f/p/lib/libcurl.so.4)
build/bundles/event_admin/remote_provider/remote_provider_mqtt/gtest/unit_test_event_admin_remote_provider_mqtt_with_error_injectiond: /lib/x86_64-linux-gnu/libssl.so.3: version `OPENSSL_3.2.0' not found (required by /home/celixdev/.conan2/p/b/libcu09ad2ef619b4f/p/lib/libcurl.so.4)
linux-vdso.so.1 (0x00007f8756a90000)
libasan.so.8 => /lib/x86_64-linux-gnu/libasan.so.8 (0x00007f875592f000)
libmosquitto.so.1 => /home/celixdev/.conan2/p/b/mosqubd83ff621e16a/p/lib/libmosquitto.so.1 (0x00007f8756a64000)
libjansson.so.4 => /home/celixdev/.conan2/p/b/janss374a24077760d/p/lib/libjansson.so.4 (0x00007f8756a4e000)
libuuid.so.1 => /home/celixdev/.conan2/p/b/util-c892553d99b97/p/lib/libuuid.so.1 (0x00007f8756a40000)
libcelix_frameworkd.so.3 => /IdeaProjects/celix-container/build/libs/framework/libcelix_frameworkd.so.3 (0x00007f87557dd000)
libcelix_utilsd.so.3 => /IdeaProjects/celix-container/build/libs/utils/libcelix_utilsd.so.3 (0x00007f8755715000)
libuv.so.1 => /home/celixdev/.conan2/p/b/libuvf16e0e2de2b3a/p/lib/libuv.so.1 (0x00007f87569f9000)
libgtest_maind.so => /home/celixdev/.conan2/p/b/gtest69153696c0e82/p/lib/libgtest_maind.so (0x00007f87569f4000)
libgtestd.so => /home/celixdev/.conan2/p/b/gtest69153696c0e82/p/lib/libgtestd.so (0x00007f875561c000)
libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f875539e000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f87552b5000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f87569c4000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f87550a3000)
libssl.so.3 => /lib/x86_64-linux-gnu/libssl.so.3 (0x00007f8754ff9000)
libcrypto.so.3 => /lib/x86_64-linux-gnu/libcrypto.so.3 (0x00007f8754ae5000)
/lib64/ld-linux-x86-64.so.2 (0x00007f8756a92000)
libcurl.so.4 => /home/celixdev/.conan2/p/b/libcu09ad2ef619b4f/p/lib/libcurl.so.4 (0x00007f875492c000)
libzip.so.5 => /home/celixdev/.conan2/p/b/libzi76a9c0f1ba7ae/p/lib/libzip.so.5 (0x00007f8754600000) |
This PR simplifies the devcontainer setup.
@rlenferink: Could you test if this setup also works for you?
This PR closes #819