-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generated cmake RPM won't install on CentOS 7 #164
Comments
@smanders Once I'm where I can actually push the code up I'll submit a pull for this change |
@bnhhughes thanks! is this cmake 3.7.2? or the latest from externpro? (3.9.6) I'm surprised by this because we've installed cmake on several CentOS 7 development systems (but I believe they have installed 3.7.2) and haven't seen this issue how did you come up with the fix? can you provide links or point to the cmake code that |
It was with cmake 3.9.6 (I may or may not have run into it with cmake 3.7.2, I don't remember for sure). I ran into this quite a bit with installers that would work on CentOS6 but then would fail on CentOS7. It comes down to if the RPM attempts to create a directory that the filesystem package has already created, apparently it's been a rule for a while but just wasn't enforced until CentOS 7. By default CMAKE has an exclusion list (see https://cmake.org/cmake/help/v3.7/module/CPackRPM.html#variable:CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST for the default paths) so that if any entries in the generated RPM's filelist are going to any of these locations the RPM doesn't attempt to create the directory. |
Here's one place I found it talking about it: https://stackoverflow.com/questions/24983181/cpack-generates-rpms-with-files-entries-that-conflict-with-the-rpm-spec-how-to |
completed with pull to dev branch #165 |
The cmake RPM that is generated as part of externpro won't install on CentOS7, it complains that there is a conflict with /usr/share/aclocal from the filesystem package. A work around is to rebuild the package with rpmrebuild and simply remove the directive to create the /usr/share/aclocal dir. Adding /usr/share/aclocal to the exclusion list for CPACK RPM will fix the issue. I added this:
-DCPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION=/usr/share/aclocal
After this line: https://github.com/smanders/externpro/blob/master/projects/cmakexp.cmake#L57
and the resulting RPM would install with no issues on CentOS7.
The text was updated successfully, but these errors were encountered: