MantisBT - CMake
View Issue Details
0006980CMakeCPackpublic2008-05-07 10:562008-08-21 15:44
Erik Sjölund 
Bill Hoffman 
normalminoralways
closedunable to reproduce 
CMake-2-6 
 
0006980: CPACK_RPM_PACKAGE_ARCHITECTURE does not set the ARCH label in the generated rpm
Setting

??SET(CPACK_RPM_PACKAGE_ARCHITECTURE "noarch")

doesn't set the architecture label of the generated rpm package to "noarch". In other words the output of
rpm -qp --queryformat '%{ARCH}\n' generated-rpm-file

should be "noarch" but is "i386" on my computer ( Ubuntu 8.04, i386-system ).


The attached patch shows one way to fix the problem. But the patch was written without much knowhow of how cmake works internally.
No tags attached.
patch buildarch.patch (1,138) 2008-05-07 10:56
https://public.kitware.com/Bug/file/1447/buildarch.patch
Issue History
2008-05-07 10:56Erik SjölundNew Issue
2008-05-07 10:56Erik SjölundFile Added: buildarch.patch
2008-05-07 11:50Eric NOULARDNote Added: 0011732
2008-05-10 07:06Eric NOULARDNote Added: 0011787
2008-05-12 04:44Erik SjölundNote Added: 0011810
2008-05-12 16:07Eric NOULARDNote Added: 0011828
2008-05-16 10:13Bill HoffmanNote Added: 0011969
2008-05-16 10:13Bill HoffmanStatusnew => assigned
2008-05-16 10:13Bill HoffmanAssigned To => Bill Hoffman
2008-08-21 15:44Bill HoffmanStatusassigned => closed
2008-08-21 15:44Bill HoffmanResolutionopen => unable to reproduce

Notes
(0011732)
Eric NOULARD   
2008-05-07 11:50   
The patch is fine, but I may propose on which may be more
consistent with CPackRPM.cmake as a whole.

Sidenote to Bill or any CMake developer:
If (aka when) you have CPackRPM related bug
If you find it useful you may systematically
add me to the monitor list of the bug.

I would be pleased to help If I can.
(0011787)
Eric NOULARD   
2008-05-10 07:06   
I was wrong the patch from Erik is good
I wouldn't have done it in another.

We don't want to have
"Buildarch:" item if not enforced by the user,
rpmbuild would guess the appropriate host arch.
(0011810)
Erik Sjölund   
2008-05-12 04:44   
A sidenote:

CPACK_RPM_PACKAGE_BUILDARCH

in the buildarch.patch is just a temporary variable. Maybe it should be called TMP_BUILDARCH or something like that ...
(0011828)
Eric NOULARD   
2008-05-12 16:07   
Yes that(s right we should reserve CPACK_RPM prefix to variable
which may be set by the user.
(0011969)
Bill Hoffman   
2008-05-16 10:13   
Is this fixed in CVS now?