Menu

#5 CentOS 8 RPM Spec Includes Conflicting Directories

1.0.5
open
nobody
None
2021-07-21
2021-07-21
Henry Loh
No

Hello!

I noticed a small problem when building and installing the RPM on CentOS 8. I have found a simple change but thought it would be good to report this back to the developers.

The specific error comes from yum local install RCDCap-1.0.4-Linux.rpm :

Running transaction test
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'yum clean packages'.
Error: Transaction test error:
file /usr/share/man from install of rcdcap-1.0.4-1.x86_64 conflicts with file from package filesystem-3.8-3.el8.x86_64
file /usr/share/man/man1 from install of rcdcap-1.0.4-1.x86_64 conflicts with file from package filesystem-3.8-3.el8.x86_64

I tracked this down the SPEC file generated during the cmake step of the build process. Here's an excerpt (context: cd RCDCap-1.0.4-Source; mkdir BUILD; cd BUILD; cmake ..) from "RCDCap-1.0.4-Source/BUILD/_CPackPackages/Linux/RPM/SPECS/rcdcap.spec" :

%files
< Skipped a bunch of lines here, rcdcap executable, include files, etc. >
%dir "/usr/share/man"
%dir "/usr/share/man/man1"
"/usr/share/man/man1/rcdcap.1.bz2*"

I guess these are automatically listed by the CMake module CPack. But these directory entries are detected as conflicts (someone on some forum claimed this was not a problem on CentOS 7). Anyway, they can be removed by setting the CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST variable. As the default value includes several important directories, my quick fix includes the default values explicitly but maybe appending to the variable would work better.
I appended the following line to "RCDCap-1.0.4-Source/cmake_modules/Fedora.cmake" :
SET(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST "/usr;/usr/bin;/usr/include;/usr/lib;/usr/share;/usr/share/man;/usr/share/man/man1")

So that's the problem I had when trying to install the rcdcap RPM and my current workaround. It would be great if an equivalent change could be incorporated into future versions. Incidentally, is SourceForge the main location for RCDCap development? There seems to be little activity for such a well written and useful application.

Many thanks to the developers!

Discussion


Log in to post a comment.

MongoDB Logo MongoDB
Gen AI apps are built with MongoDB Atlas
Atlas offers built-in vector search and global availability across 125+ regions. Start building AI apps faster, all in one place.