From 05c3b37d1f8f91c3face5eeafe8d4c76fbdda495 Mon Sep 17 00:00:00 2001 From: Michal Domonkos Date: Fri, 27 Oct 2023 11:00:07 +0200 Subject: [PATCH] Rename mktree.podman to mktree.oci This name is a better fit as it puts more emphasis on the format of the resulting tree, not as much on the actual container engine used (which can be swapped, and currently is in the CI where we use docker instead of podman). Also drop the awkward .docker symlink now and instead pass the container engine through the MKTREE_ENGINE environment variable. --- .github/workflows/linux.yml | 7 +++++-- tests/CMakeLists.txt | 8 ++++---- tests/README.md | 2 +- tests/mktree.docker | 1 - tests/{mktree.podman => mktree.oci} | 2 +- 5 files changed, 11 insertions(+), 9 deletions(-) delete mode 120000 tests/mktree.docker rename tests/{mktree.podman => mktree.oci} (97%) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index be40001f0a..49980e8548 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -9,8 +9,11 @@ jobs: steps: - uses: actions/checkout@v3 - name: Build the Fedora testing environment - run: ./mktree.docker build + run: ./mktree.oci build working-directory: ./tests - name: Run the test suite - run: ./mktree.docker check --interactive=false -j$(nproc) + run: ./mktree.oci check --interactive=false -j$(nproc) working-directory: ./tests + + env: + MKTREE_ENGINE: docker diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index f903be0325..208ba1a018 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -68,9 +68,9 @@ if (nproc GREATER 1) endif() # Set up mktree -set(MKTREE_BACKEND podman CACHE STRING "Mktree backend to use") +set(MKTREE_BACKEND oci CACHE STRING "Mktree backend to use") set(DOCKERFILE ${CMAKE_CURRENT_SOURCE_DIR}/Dockerfile.${OS_NAME}) -if (MKTREE_BACKEND STREQUAL podman) +if (MKTREE_BACKEND STREQUAL oci) find_program(PODMAN podman) find_program(DOCKER docker) mark_as_advanced(PODMAN DOCKER) @@ -78,8 +78,8 @@ if (MKTREE_BACKEND STREQUAL podman) set(MKTREE_NATIVE yes) configure_file(${DOCKERFILE} Dockerfile COPYONLY) add_custom_target(ci - COMMAND ./mktree.podman build - COMMAND ./mktree.podman check ${JOBS} $(TESTOPTS) + COMMAND ./mktree.oci build + COMMAND ./mktree.oci check ${JOBS} $(TESTOPTS) WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} ) else() diff --git a/tests/README.md b/tests/README.md index 51b3ef33b7..e199ae979c 100644 --- a/tests/README.md +++ b/tests/README.md @@ -18,7 +18,7 @@ The mode is selected automatically during cmake configuration based on the host distribution and the container engine installed, with native mode being preferred whenever possible, and is reported in the cmake output as follows: - -- Using mktree backend: podman (native: ) + -- Using mktree backend: oci (native: ) Then run the command diff --git a/tests/mktree.docker b/tests/mktree.docker deleted file mode 120000 index 80920d9e72..0000000000 --- a/tests/mktree.docker +++ /dev/null @@ -1 +0,0 @@ -mktree.podman \ No newline at end of file diff --git a/tests/mktree.podman b/tests/mktree.oci similarity index 97% rename from tests/mktree.podman rename to tests/mktree.oci index a525080802..5a4f53e0c0 100755 --- a/tests/mktree.podman +++ b/tests/mktree.oci @@ -13,7 +13,7 @@ else # Running from source directory CMAKE=no NATIVE=no - PODMAN=$(echo $PROGRAM | cut -d'.' -f2) + PODMAN=${MKTREE_ENGINE:-podman} CONTEXT=.. fi