From 81512bc6c27d520b5575c53350c45821cbabb31a Mon Sep 17 00:00:00 2001 From: Jiri Hnidek Date: Tue, 24 Oct 2023 08:59:17 +0200 Subject: [PATCH 1/2] Fixed warning and marked project as C project. --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b6fff33..4823c8e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ # Minimal version of CMake -cmake_minimum_required (VERSION 2.6) +cmake_minimum_required (VERSION 2.8...3.27) # Build type if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) @@ -11,7 +11,7 @@ if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) endif () # Define project name -project (Daemon) +project (Daemon C) # The version number set (${PROJECT_NAME}_VERSION_MAJOR 0) From dd4d8376af7a70c6a7882a990dfca2d56d80f8ec Mon Sep 17 00:00:00 2001 From: Jiri Hnidek Date: Tue, 24 Oct 2023 09:32:42 +0200 Subject: [PATCH 2/2] Fix building of rpm on github action. * Do not require to install gcc-c++, because it is only C project * Mark "checkout" directory as trusted to be able to use it by tito * Updated version og action/checkout to v4 --- .github/workflows/build.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index eb486dd..b5afce6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -43,11 +43,17 @@ jobs: steps: # Install git and other tools first to be able to use 'actions/checkout@v2' properly - name: Install required packages - run: dnf install --nogpgcheck -y tito gcc gcc-c++ make cmake git-core + run: dnf install --nogpgcheck -y tito gcc make cmake git-core # Clone repository and set everything for building of RPMs - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 + + # This step is required so Tito can properly read git history + # See https://github.com/actions/checkout/issues/766 + - name: Trust git repository path + run: | + git config --global --add safe.directory '*' - name: Create build directory run: rm -rf ./rpm_build; mkdir ./rpm_build