[CMake] CPack - Transaction error

Kristian kristianonline28 at gmail.com
Tue May 9 09:00:22 EDT 2017


Hi,

I want to generate a RPM package. My CMakeLists.txt looks loke this:

##########################

cmake_minimum_required(VERSION 3.5)

set(INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/ssp/)

install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/ssp-suite/" DESTINATION
${INSTALL_DIR})
install(PROGRAMS "${CMAKE_CURRENT_SOURCE_DIR}/ssp_script" DESTINATION bin)

set(CPACK_RPM_PACKAGE_REQUIRES "java-1.8.0-openjdk >= 1.8.0")

# ...

INCLUDE(CPack)

############################

The idea is to install needed files for the software under /opt/ssp.
Now I generate a package with command

> cmake -DCMAKE_INSTALL_PREFIX=/opt -V --debug .

When I want to install that in a docker container, I get the error message

********

Transaction check error:
  file /opt from install of ssp-suite-7.1-1.x86_64 conflicts with file
from package filesystem-3.2-21.el7.x86_64

Error Summary

********

What is the problem?


More information about the CMake mailing list