cmake - cpack generates RPMs with %files entries that conflict with the RPM spec. How to fix? -


Recently, I need to make sure that using our software by using cpack RHEL 7 and it can be packaged for free reconstruction (such as CentOS 7). Despite this, I have had a problem which was not present for RHEL 6.x and its free rebuilding: RPM, which has its % files

cpack System entries such as the following are generated:

 % dir% attr (0755, root, root) "/"% dir% attr (0755, root, root) "/ usr"% Dir% attr (0755, root, root) "/ usr / bin"% dir% attr (0755, root, root) "/ usr / share"% dir% attr (0755, root, root) "/ usr / share / Applications "% dir% atr (0755, root, root)" / usr / share / doc "% dir% attr (0755, root, root)" / usr / share / icons "% di "/ Usr / share / icons / hicolor" / dir / hicolor "/ usr / users / share / icon / hicolor / scalable"% dir% attr (0755, root, root)  

Enter the% dir% plus (0755, root, root) "/ scalable / app" code which should not be declared by the package.

AFAIK, This requirement has been in the RPM spec for years, but only in the latest versions of RPM (i.e. new from 4.8.0) it is implemented. Since RHEL 7 bundles with RHM 4.11.1, cpack now filesystem-3.2-18.el7.x86_64 with errors like below Generates conflicts with. Install ... :

  file / from tunesviwer-1.4-2 .noarch installer package file conflict with file-3.2-18. El7.x86_64 file / usr / Conflicts with file from file from the founder of bin Tunesviewer-1.4-2.noarch file system-3.2-18 el7.x86_64 [...]  

I created a small Cmake < / Code> module, consisting of the following:

 set  set (CPACK_RPM_SPEC_MORE_DEFINE "% define ignore \ #") (CPACK_RPM_USER_FILELIST "% ignore /" "% ignore / usr" "% ignore / / Usr / Share / icon "% ignore / usr / share" "% ignore / usr / share / applications" "% ignore / usr / share / doc" "% ignore / usr / share / icons" "% ignore / usr / share / Icon / Ignore ""% ignore / Usr / share / icons / hicolor / scalable " 

and include it in the correct CMakeLists.txt Before > 's included (CPP) . But this system is still in the generated RPM: (

Temporarily rotating, I Using these signals, i.e. directory entries in the rpmrebuild Usage % files section to delete these systems. Obviously, this is not exactly right.

Has anyone found a better way?

I can not wait Therefore, by looking at the latest cmake 3.0.0 release, a variable CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST supports new releases with sensible defaults

[edit] 2.8 Upon reviewing the .12 document, the pair is also supported by the older version.

Since Comes with cmake source CMakeLists.txt files, and the package including RPM can generate OOTB (though I package the RHEL naming convention The settings need to be tuned to fit, but this is not hard work), so I just went to the first bootstrap cmak, resulting in cmake 3.0.0 RPM, with cmake 2.8.11 , rpmrebuild -pe e-3.0.0 code> yum to fix it do , And then use it to bootstrap 2. Now everything is fine. problem solved.

My departure is thought that the kitware should be written in a better manner than the way many variables are described, it is also dense and misleading - there is a weak reduction in the absence of examples.

In addition to this, the kitware should eat your dogfood: Provide instructions for making a senses with the sensation, Autot X- (


Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -