[cmake-developers] Make CPACK_RPM_PACKAGE_RELEASE match Fedora/RHOS/CentOS recommended behaviour

Harry Mallon Harry at codexdigital.com
Fri May 6 13:09:14 EDT 2016


According to Fedora documentation the "Release:" variable in RPM files should be set to 1%{?dist}.
https://fedoraproject.org/wiki/How_to_create_an_RPM_package
https://fedoraproject.org/wiki/Packaging:DistTag

This means it should be set to a string which looks like "1.el7.centos" on my CentOS7 machine. CPack sets this to "1" by default, but can be changed with the CPACK_RPM_PACKAGE_RELEASE variable. I propose a change as follows:
https://github.com/hm1992/CMake/commit/94c611d5710a51072e15855ed96a225def975c38

* Adds CPACK_RPM_DIST which defaults to the output of "rpmbuild -E %{dist} 2>/dev/null".
* Makes CPACK_RPM_PACKAGE_RELEASE default to "1${CPACK_RPM_DIST}"

I think I am right in saying this would not change behaviour on distributions that did not use the %{dist} option as "rpmbuild -E %{dist}" should return nothing.

Harry

Harry Mallon

CODEX | Software Engineer

60 Poland Street | London | England | W1F 7NT

E harry at codexdigital.com<mailto:harry at codexdigital.com> | T +44 203 7000 989<callto:+44%20203%207000%20989>

Website<www.codexdigital.com> | Facebook<https://www.facebook.com/codexdigital> | Twitter<http://twitter.com/codexdigital>

[http://www.codexdigital.com/?action=asset&id=E55D8A6F-AF62-4978-8FF1-435A85AFADBF]<http://www.codexdigital.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20160506/23d50480/attachment.html>


More information about the cmake-developers mailing list