Skip to content

Feature/add devcontainer to 2.4 support - #855

Open
pnoltes wants to merge 11 commits into
support/2.4from
feature/add-devcontainer-to-2.4-support
Open

pnoltes wants to merge 11 commits into
support/2.4from
feature/add-devcontainer-to-2.4-support

Conversation

@pnoltes

@pnoltes pnoltes commented Nov 15, 2026

Copy link
Copy Markdown
Contributor

This PR adds DevContainer support to and updates the CI to supported Ubunt/MacOs versions for the 2.4 support branch.

In more details:

  • Introduces a Conan-based DevContainer (backported from master) and refreshes the GitHub Actions CI to build against current tooling and OSes, while keeping macOS support on the latest runner.
  • .devcontainer/ with Containerfile (Ubuntu 24.04 + Conan 2), devcontainer.json, and README.md.
  • Conan package/download/ccache volume mounts, debug/release profiles, and a conan install onCreateCommand.
    Build system
  • Add cmake_layout to conanfile.py so cmake --preset conan-debug/conan-release are generated.
  • Pin libcurl to 8.4.0 and util-linux-libuuid to 2.39.2 (resolve version conflicts that appeared with newer Conan 2 recipes).
  • Append --coverage to linker flags instead of overwriting them in CodeCoverage.cmake (otherwise --unresolved-symbols=ignore-in-shared-libs is dropped and shared linking breaks).
  • Suppress new GCC 13 / Clang 16 warnings via -Wno-* flags.
  • ubuntu.yml: rewrite the Conan job to Conan 2 (drop the stale conan==1.59.0 pin), bump runners to ubuntu-24.04.
  • coverage.yml: Conan 2 + ubuntu-24.04.
  • conan_create.yml: remove mac brew build, moved to macOS-15.
  • Add containers.yml (builds the devcontainer image and runs in-container conan build/ctest), using apache/celix-2.4-conan-build/conan-dev image names.
  • Add CMakeUserPresets.json to .gitignore.
  • Zeroconf discovery test: drop sudo from the CTest command and instead start mdnsd with sudo inside the test (matches master)

@pnoltes
pnoltes marked this pull request as ready for review November 22, 2026 17:07
@pnoltes
pnoltes requested a review from PengZheng November 22, 2026 17:08
@pnoltes

pnoltes commented Nov 22, 2026

Copy link
Copy Markdown
Contributor Author

I needed to disable pubsub for macos, but I prefer that than changes too much.

This PR should enable building 2.4.x on supported platform again

@PengZheng PengZheng left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM. I just left some minor comments.

Comment thread conanfile.py
or self.options.build_rsa_discovery_common or self.options.build_rsa_remote_service_admin_dfi
or self.options.build_launcher):
self.requires("libcurl/[>=8.4.0 <9.0.0]")
self.requires("libcurl/8.4.0")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why fix libcurl, which is a main source of CVEs in my day job, to a single version?

Comment thread conanfile.py
self.requires("libzip/[>=1.7.3 <2.0.0]")
if self.options.build_framework or self.options.build_pubsub:
self.requires("util-linux-libuuid/[>=2.39 <3.0.0]")
self.requires("util-linux-libuuid/2.39.2")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this related to the following in the trunk?

        if self.options.build_framework:
            self.requires("util-linux-libuuid/[>=2.39 <3.0.0]")
            if self.settings.os == "Macos":
                self.requires("gettext/0.21") #needed on MacOS 15 by libuuid

Comment thread CMakeLists.txt
endif()
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 11.0)
set(CMAKE_C_FLAGS "-Wno-error=stringop-overread ${CMAKE_C_FLAGS}")
set(CMAKE_C_FLAGS "-Wno-dangling-pointer -Wno-use-after-free -Wno-maybe-uninitialized ${CMAKE_C_FLAGS}")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These -Wno-xxx smell dangerouse. But we may remove them later

Comment thread CMakeLists.txt
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 11.0)
set(CMAKE_C_FLAGS "-Wno-error=stringop-overread ${CMAKE_C_FLAGS}")
set(CMAKE_C_FLAGS "-Wno-dangling-pointer -Wno-use-after-free -Wno-maybe-uninitialized ${CMAKE_C_FLAGS}")
set(CMAKE_C_FLAGS "-Wno-restrict ${CMAKE_C_FLAGS}")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall we append these -Wno-xxx to various flags rather prepend them, so that they will not be overriden by the following -Wall -Werror?

ctest --output-on-failure
source deactivate_conanrun.sh
run: ctest --preset conan-release --output-on-failure -j1

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why remove macos-build-brew?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants