<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12pt"><div class="" style=""><span style="font-size: 13px;">RHEL 7.0 (and its free rebuilds, e.g. CentOS 7.0) is bundled with newer rpm which rigorously checks whether a package declare system directories or not. If a package does, then it would issue an error like what's shown below:</span></div><div class="" style=""><br class="" style=""></div><pre class="" style="border: 1px solid rgb(215, 215, 215); margin-right: 1.75em; margin-left: 1.75em; padding: 0.25em; overflow: auto; font-size: 12.800000190734863px; background: rgb(247, 247, 247);">Transaction check error:
   file /usr from install of cmake-3.0.0-1.x86_64 conflicts with file from package filesystem-3.2-18.el7.x86_64
   file /usr/bin from install of cmake-3.0.0-1.x86_64 conflicts with file from package filesystem-3.2-18.el7.x86_64
   file /usr/share from install of cmake-3.0.0-1.x86_64 conflicts with file from package filesystem-3.2-18.el7.x86_64
   file /usr/share/aclocal from install of cmake-3.0.0-1.x86_64 conflicts with file from package filesystem-3.2-18.el7.x86_64</pre><div style="color: rgb(0, 0, 0); font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;" class=""><span style="font-size: 13px;">So, I have done a 2 step bootstrapping:</span></div><div style="color: rgb(0, 0, 0); font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;" class=""><span style="font-size: small;">0. use cmake 2.8.11 to build a cmake-3.0.0 rpm, rpmrebuild -pe to edit the rpm, and install the "fixed" rpm</span></div><div style="color: rgb(0, 0, 0); font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;" class=""><span style="font-size: 13px;">1. use the
 installed "fixed" cmake-3.0.0 rpm to rebuild cmake-3.0.0 and regenerate a RPM.</span></div><div style="color: rgb(0, 0, 0); font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;" class=""><span style="font-size: small;"><br class="" style=""></span></div><div style="color: rgb(0, 0, 0); font-style: normal; background-color: transparent;" class=""><span style="font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: small;">Alas, the resulting RPM still has the /usr/share/aclocal declared in the %files section ;(  I tried to define the following variable at a few different places and tried them all. Same issue :(</span></div><div style="color: rgb(0, 0, 0); font-style: normal; font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color:
 transparent;" class=""><span style="font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 16px;"><br></span></div><div style="color: rgb(0, 0, 0); font-style: normal; font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent;" class=""><font face="Verdana, Arial, Bitstream Vera Sans, Helvetica, sans-serif"><span style="font-size: 12.800000190734863px;"><b>CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST</b></span></font></div><div style="color: rgb(0, 0, 0); font-style: normal; font-size: 12.800000190734863px; font-family: Verdana, Arial, 'Bitstream Vera Sans', Helvetica, sans-serif; background-color: transparent;" class=""><font face="Verdana, Arial, Bitstream Vera Sans, Helvetica, sans-serif"><span style="font-size: 12.800000190734863px;"><b><br></b></span></font></div><div style="color: rgb(0, 0, 0); font-style: normal; font-size:
 12.800000190734863px; font-family: Verdana, Arial, 'Bitstream Vera Sans', Helvetica, sans-serif; background-color: transparent;" class="">What is the right way to exclude /usr/share/aclocal?</div><div style="color: rgb(0, 0, 0); font-style: normal; font-size: 12.800000190734863px; font-family: Verdana, Arial, 'Bitstream Vera Sans', Helvetica, sans-serif; font-weight: bold; background-color: transparent;" class=""><br></div><div style="color: rgb(0, 0, 0); font-style: normal; font-size: 12.800000190734863px; font-family: Verdana, Arial, 'Bitstream Vera Sans', Helvetica, sans-serif; font-weight: bold; background-color: transparent;" class=""><br></div></div></body></html>