[cmake-developers] CMake > Build RPM for Centos/RHEL

Jean Audibert jaudibert at euronext.com
Tue Jun 16 04:41:02 EDT 2015


Hi Domen,

Thanks, I'll try the CPACK_OUTPUT_FILE_NAME option.

This morning I found an alternative for the permission issue.
As the default attribute in the SPEC file is (-, root, root, -) I tried to "fix" generated files.
So I added umask at the beginning of my script and it works!

$ umask 0022
$ wget http://www.cmake.org/files/v3.2/cmake-${VERSION}.tar.gz

Regards,

Jean

-----Original Message-----
From: Domen Vrankar [mailto:domen.vrankar at gmail.com] 
Sent: mardi 16 juin 2015 10:00
To: Jean Audibert
Cc: cmake-developers at cmake.org
Subject: Re: [cmake-developers] CMake > Build RPM for Centos/RHEL

> 2. Is there a way to generate a RPM with "standard" name:
>         I mean, something like:  cmake-3.2.3-1.el6.x86_64.rpm
>         Instead of:  cmake-3.2.3-Linux-x86_64.rpm

You can add
-D CPACK_OUTPUT_FILE_NAME=cmake-${RPM_RELEASE}.el6.x86_64.rpm

to your packaging command. This will force package name.
Forcing the name will cause a CPack error:
CPack Error: Problem copying the package

but at that point the package was already created - you just have to find it as it wasn't copied from rpmbuild dir to cmake root dir:

find . -name *.rpm | xargs -i{ cp { ./

> 3. I tried what I built, but:
>         CMake Error: Could not find CMAKE_ROOT !!!
>         CMake has most likely not been installed correctly.
>         Modules directory not found in
>         /usr/share/cmake-3.2
>         CMake Error: Error executing cmake::LoadCache(). Aborting.
>
>
>         Problem is that the created directory exists but it can't be read because of permissions:       drwxr-x---.

That's odd... If I run the command below on rpm created from cmake repository master branch I get different permissions:

rpm -qp --qf "[%-15{=NAME} %-36{FILENAMES} %{FILEMODES:perms}\n]"
cmake-3.3.20150607-gcb1a9-Linux-x86_64.rpm | grep "Modules "
cmake           /usr/share/cmake-3.3/Modules         drwxr-xr-x


Regards,
Domen

_________________________________________________________________

This message may contain confidential information and is intended for specific recipients unless explicitly noted otherwise. If you have reason to believe you are not an intended recipient of this message, please delete it and notify the sender. This message may not represent the opinion of Euronext N.V. or any of its subsidiaries or affiliates, and does not constitute a contract or guarantee. Unencrypted electronic mail is not secure and the recipient of this message is expected to provide safeguards from viruses and pursue alternate means of communication where privacy or a binding message is desired.


More information about the cmake-developers mailing list