Skip to content
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

Closed
bnhhughes opened this issue Feb 2, 2018 · 5 comments
Closed

Generated cmake RPM won't install on CentOS 7 #164

bnhhughes opened this issue Feb 2, 2018 · 5 comments
Assignees
Labels
Milestone

Comments

@bnhhughes
Copy link
Contributor

bnhhughes commented Feb 2, 2018

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.

@bnhhughes bnhhughes changed the title Generated cmake RPM won Generated cmake RPM won't install on CentOS 7 Feb 2, 2018
@bnhhughes
Copy link
Contributor Author

@smanders Once I'm where I can actually push the code up I'll submit a pull for this change

@smanders
Copy link
Owner

smanders commented Feb 2, 2018

@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 CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION modifies? I'd like to understand this just a little more before I merge -- so that if it has any negative effects on other systems that I'm aware of what's going on

@bnhhughes
Copy link
Contributor Author

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. CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION will add to this default list (https://cmake.org/cmake/help/v3.7/module/CPackRPM.html#variable:CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION). Making this addition won't change any of the files the RPM lays down, it will just make it so the RPM doesn't attempt to create the parent path (/usr/share/aclocal in this case), which is already "owned" by the filesystem package, which is what creates the conflict. I'll try to find some more of the places I went to when I was looking this up a while back when I first ran into it.

@bnhhughes
Copy link
Contributor Author

@smanders smanders added the bug label Feb 6, 2018
@smanders smanders added this to the current milestone Feb 6, 2018
@smanders
Copy link
Owner

smanders commented Feb 6, 2018

completed with pull to dev branch #165

@smanders smanders closed this as completed Feb 6, 2018
@smanders smanders mentioned this issue Feb 7, 2018
46 tasks
@smanders smanders mentioned this issue Mar 28, 2018
53 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants