View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0013468CMakeCPackpublic2012-08-14 04:322013-08-16 05:33
ReporterViktor Dubrovsky 
Assigned ToEric NOULARD 
PrioritynormalSeveritycrashReproducibilityalways
StatusclosedResolutionfixed 
Platformi686OSSuse Linux Enterprise ServerOS Version11sp1
Product VersionCMake 2.8.9 
Target VersionCMake 2.8.10Fixed in Version 
Summary0013468: Can't add attr directive to CPACK_RPM_USER_FILELIST
DescriptionWhen I try to add directive "%attr(777,-,-) /path/to/file" to CPACK_RPM_USER_FILELIST rpmbuid crashes, because cpack doesn't correct parse this string.
I get in .spec file this stuff:
%config "/path/to/file"
%attr( "%attr(777,-,-) /path/to/file"
Steps To ReproduceAdd "%attr(777,-,-) /path/to/file" to CPACK_RPM_USER_FILELIST.
Additional InformationIt's simply to fix. Expand regexp in 712 and 713 lines CPackRPM.cmake file with characters "0-9", "," and "-".
I substitute those regexps by mine:
string(REGEX REPLACE "%[A-Za-z0-9\(\)-\,]* " "" F_PATH ${F})
string(REGEX MATCH "%[A-Za-z0-9\(\)-\,]*" F_PREFIX ${F})

And all goes to work fine!
Sorry for my bad english :)
TagsNo tags attached.
Attached Files

 Relationships
related to 0014362closedKitware Robot Can't add attr directive to CPACK_RPM_USER_FILELIST (some symbols not allowed) 

  Notes
(0030646)
Eric NOULARD (developer)
2012-08-14 13:45

Thank you Viktor.

Just pushed the fix into next.
Merge topic 'CPackRPM_handleAttrDirectiveProperly' into next

4198963 Handles %attr(nnn,-,-) /path/to/file in CPACK_RPM_USER_FILELIST properly.
(0030913)
Eric NOULARD (developer)
2012-09-04 14:55

From cmake-developer mailing list.
The fix was wrong, the message is not yet in
the ML archive so here comes the excerpt concerning this bug:

David Cole Said:
The character set used in the REGEX here has errors in it: [A-Za-z\(\)-\,]

1) The comma does not need to be escaped in this character set
context, but "\\" does if you mean to include the backslash character.
2) The hyphen, if meant to be matched is not matched here, but used as
a range separator from the \) to the \,

What's the intent of the change? To handle commas and hyphens, you
would add ",-" at the end of the existing character set. If more
characters need to be matched, then add them, but keep the hyphen last
or make it first or escape it in order to match it here.
(0030990)
Eric NOULARD (developer)
2012-09-10 16:43

I did revert the commit in stage and next in order to avoid conflict and
propose a cleaner history:
Merge topic 'CPackRPM_handleAttrDirectiveProperly' into next

3608a36 Revert "Handles %attr(nnn,-,-) /path/to/file in CPACK_RPM_USER_FILELIST properly."

Then I restarted the branch as "CPackRPM_handleAttrDirectiveProperly-reloaded",
pushed it to stage and then merge it to next:

Merge topic 'CPackRPM_handleAttrDirectiveProperly-reloaded' into next

d8a1dd5 Handles %attr(nnn,-,-) /path/to/file in CPACK_RPM_USER_FILELIST properly.
(0032443)
Robert Maynard (manager)
2013-03-04 08:38

Closing resolved issues that have not been updated in more than 4 months.

 Issue History
Date Modified Username Field Change
2012-08-14 04:32 Viktor Dubrovsky New Issue
2012-08-14 05:11 Rolf Eike Beer Assigned To => Eric NOULARD
2012-08-14 05:11 Rolf Eike Beer Status new => assigned
2012-08-14 13:38 Eric NOULARD Target Version => CMake 2.8.10
2012-08-14 13:45 Eric NOULARD Note Added: 0030646
2012-08-14 13:45 Eric NOULARD Status assigned => resolved
2012-08-14 13:45 Eric NOULARD Resolution open => fixed
2012-09-04 14:55 Eric NOULARD Note Added: 0030913
2012-09-04 14:55 Eric NOULARD Status resolved => feedback
2012-09-04 14:55 Eric NOULARD Resolution fixed => reopened
2012-09-10 16:43 Eric NOULARD Note Added: 0030990
2012-09-10 16:43 Eric NOULARD Status feedback => resolved
2012-09-10 16:43 Eric NOULARD Resolution reopened => fixed
2013-03-04 08:38 Robert Maynard Note Added: 0032443
2013-03-04 08:38 Robert Maynard Status resolved => closed
2013-08-16 05:33 Eric NOULARD Relationship added related to 0014362


Copyright © 2000 - 2018 MantisBT Team