I'm trying to build an RPM with CPack, and everything seems to work,
but the resulting package can not be installed. I get Transaction check
error:
  file / from install of <mypackage> conflicts with file from package 
filesystem-3.2-25.el7.x86_64
  file /opt from install of <mypackage> conflicts with file from package 
filesystem-3.2-25.el7.x86_64
  file /usr/bin from install of <mypackage> conflicts with file from package 
filesystem-3.2-25.el7.x86_64
  file /usr/share from install of <mypackage> conflicts with file from package 
filesystem-3.2-25.el7.x86_64
  file /usr from install of <mypackage> conflicts with file from package 
filesystem-3.2-25.el7.x86_64

I've read in the CPackRPM source code about how to add excludes and
CPackRPM says that my "Final list of path to OMIT in RPM" would be
/etc;/etc/init.d;/usr;/usr/bin;/usr/include;/usr/lib;/usr/libx32;/usr/lib64;/usr/share;/usr/share/aclocal;/usr/share/doc;/opt;/usr/share/applications

I can see that the conflicting directories are removed from
CPACK_RPM_INSTALL_FILES. But that does not satisfy rpm :-(

Could someone shed some light? I believe that the problem may be
my install command: I call install only once for the full tree
of files that I'd like to package:
  install(DIRECTORY "${INSTALL_TMP_ROOT}/" DESTINATION "/" 
USE_SOURCE_PERMISSIONS)

I have a wild guess that this install somehow includes the
directories, and probably it would be better to just call install
on the individual files? I would prefer not to call install on the
individual files because that overrides file permissions for every
file, and I carefully prepared my package upfront to have the
exact permissions for installation.

Any help would be greatly appreciated!

All the best,

    Mario Emmenlauer
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake

Reply via email to