View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0012863CMakeCPackpublic2012-01-08 22:272012-07-09 06:52
ReporterDeborah Pickett 
Assigned ToEric NOULARD 
PlatformOSOS Version
Product VersionCMake 2.8.7 
Target VersionCMake 2.8.8Fixed in VersionCMake 2.8.8 
Summary0012863: CPackRPM reports "warning: File listed twice" because it recurses directories in %files
DescriptionDuring RPM packing, the %files list in the .spec file contains all directory ancestors of installed files (i.e., it includes /usr and /usr/bin as well as /usr/bin/foo). Because unadorned entries in %files that are directories will be recursively searched, this causes /usr to bring in /usr/bin and /usr/bin/foo again, and /usr/bin to bring in /usr/bin/foo again-again. rpmbuld reports this with "warning: File listed twice: /usr/bin/foo".
Steps To ReproducePack any RPM that installs to a directory at least two levels under / (e.g., /usr/bin/foo). Pack with debugging on: cpack -D CPACK_RPM_PACKAGE_DEBUG=1 -G RPM
Additional Information%dir directive for RPM spec: [^]
TagsNo tags attached.
Attached Filespatch file icon cmake-0012863.patch [^] (1,202 bytes) 2012-01-12 23:17 [Show Content]

related to 0012305closedEric NOULARD RPM should include directories 
related to 0012864closedEric NOULARD CPackRPM additional variable CPACK_RPM_FILTER_FILELIST to remove well-known directories from %files list 

Deborah Pickett (reporter)
2012-01-08 22:29

Suggested fix: When CPackRPM.cmake produces the list of files in %files, it should mark any that are directories with %dir. Since CPack already does the recursive traversal of directories' descendants, it should prevent rpmbuild from doing it again.
Davorin Učakar (reporter)
2012-01-12 21:53

I see this issue occurs because 0012305 hasn't been fixed properly. I suggested to revert to the state before 0009654 was "fixed" i.e. %files section should look like:

Deborah Pickett (reporter)
2012-01-12 22:04

Disagree with 0028283: it would make 0012864 impossible to implement.
Deborah Pickett (reporter)
2012-01-12 23:19
edited on: 2012-01-12 23:20

Attached patch 2012-01-12 23:17 (against 2.8.7) prepends %dir onto directories per comment 0028215.

Eric NOULARD (developer)
2012-01-13 14:54

Hi all,

To Davorin:
Deborah is right for 0012305 and 0012542 needs the feature too.
Initially (before 0012542) the file section was like you said: "/*"
unfortunately this scheme is "too simple" to fits the needs.

To Deborah:
Thanks for the patch I'll review it.
Eric NOULARD (developer)
2012-01-13 15:41

Thank you Deborah,

Patch was clean, just added some more comment giving some explanation
about why we do that.

Just merged to next.
Fetching upstream next
Merge topic 'CPackRPM-noFileListedTwice' into next

ae250d5 CPackRPM flag direcories with %dir in the generated spec file

should be in 2.8.8
David Cole (manager)
2012-07-09 06:52

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

 Issue History
Date Modified Username Field Change
2012-01-08 22:27 Deborah Pickett New Issue
2012-01-08 22:29 Deborah Pickett Note Added: 0028215
2012-01-09 02:09 Eric NOULARD Assigned To => Eric NOULARD
2012-01-09 02:09 Eric NOULARD Status new => assigned
2012-01-09 02:09 Eric NOULARD Relationship added related to 0012305
2012-01-12 21:53 Davorin Učakar Note Added: 0028283
2012-01-12 22:04 Deborah Pickett Note Added: 0028284
2012-01-12 23:17 Deborah Pickett File Added: cmake-0012863.patch
2012-01-12 23:19 Deborah Pickett Note Added: 0028285
2012-01-12 23:20 Deborah Pickett Note Edited: 0028285
2012-01-13 14:50 Eric NOULARD Relationship added related to 0012864
2012-01-13 14:54 Eric NOULARD Note Added: 0028296
2012-01-13 15:40 Eric NOULARD Target Version => CMake 2.8.8
2012-01-13 15:41 Eric NOULARD Note Added: 0028297
2012-01-13 15:41 Eric NOULARD Status assigned => resolved
2012-01-13 15:41 Eric NOULARD Fixed in Version => CMake 2.8.8
2012-01-13 15:41 Eric NOULARD Resolution open => fixed
2012-07-09 06:52 David Cole Note Added: 0029955
2012-07-09 06:52 David Cole Status resolved => closed

Copyright © 2000 - 2018 MantisBT Team