MantisBT - CMake
View Issue Details
0014834CMakeCPackpublic2014-03-25 01:432016-06-10 14:31
Bruce Cartland 
Kitware Robot 
normalminoralways
closedmoved 
Windows2008 Server R2 Standard SP1
CMake 2.8.12.2 
 
0014834: cpack ZIP generator fails if a source file is readonly
Version 2.8.8 works.

Version 2.8.9 to the latest (2.8.12.2) fails when at least one of the source files being zipped is read-only. This works for Ubuntu 12.04 and, I assume, any non-Windows platform. The read-only file does actually get copied but then CPack seems to fail at that point, so that no "later" files are copied.

If all files are writable, then everything works.

For the attached test project The error is:

CPack Error: Problem copying file: C:/cpack-test-ro/myproj/copyright.txt -> C:/cpack-test-ro/build/_CPack_Packages/win32-Source/ZIP/abrbase_1.1.1_Source////copyright.txt
CPack Error: Error when generating package: myproj

Unzip attached test project to the root of the C: drive.

Ensure that c:\cpack-test-ro\myproj\copyright.txt is read-only

Start a command prompt at c:\cpack-test-ro\build

run "cpack.exe --config ./CPackSourceConfig.cmake"
Very simply test project attached.
No tags attached.
7z cpack-test-ro.7z (1,733) 2014-03-25 01:43
https://public.kitware.com/Bug/file/5103/cpack-test-ro.7z
Issue History
2014-03-25 01:43Bruce CartlandNew Issue
2014-03-25 01:43Bruce CartlandFile Added: cpack-test-ro.7z
2014-03-25 01:45Bruce CartlandNote Added: 0035503
2014-03-25 01:51Bruce CartlandNote Edited: 0035503bug_revision_view_page.php?bugnote_id=35503#r1405
2014-03-25 03:34Eric NOULARDNote Added: 0035504
2014-03-25 18:07Bruce CartlandNote Added: 0035512
2014-03-26 20:57Bruce CartlandNote Added: 0035533
2014-07-14 22:30Bruce CartlandNote Added: 0036383
2016-06-10 14:29Kitware RobotNote Added: 0042516
2016-06-10 14:29Kitware RobotStatusnew => resolved
2016-06-10 14:29Kitware RobotResolutionopen => moved
2016-06-10 14:29Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0035503)
Bruce Cartland   
2014-03-25 01:45   
(edited on: 2014-03-25 01:51)
Clarification: TZ is used on Linux/Mac. Only Windows is using ZIP in my testing.

Can I also bump the Severity up? It's stopping my build, unless I implement an ugly workaround.

(0035504)
Eric NOULARD   
2014-03-25 03:34   
Hi Bruce,

Do you have the same issue if you try to build a TGZ package on Windows?
(0035512)
Bruce Cartland   
2014-03-25 18:07   
Yes. Same issue with ZIP or TGZ. Here's the verbose output

---------------------------------------------
CPack: Enable Verbose
CPack Verbose: Read CPack config file: ./CPackSourceConfig.cmake
CPack Verbose: Read CPack configuration file: C:/cpack-test-ro/build/CPackSourceConfig.cmake
CPack Verbose: Specified generator: TGZ
CPack Verbose: Use generator: cmCPackTGZGenerator
CPack Verbose: For project: myproj
CPack: Create package using TGZ
CPack Verbose: Read description file: C:/cpack-test-ro/myproj/README.txt
CPack Verbose: [TGZ] requested component grouping = ONE_PER_GROUP
CPack Verbose: Remove toplevel directory: C:/cpack-test-ro/build/_CPack_Packages/win32-Source/TGZ
CPack: Install projects
CPack Verbose: Create ignore files regex for: /CVS/
CPack Verbose: Create ignore files regex for: /\.svn/
CPack Verbose: Create ignore files regex for: /\.bzr/
CPack Verbose: Create ignore files regex for: /\.hg/
CPack Verbose: Create ignore files regex for: /\.git/
CPack Verbose: Create ignore files regex for: \.swp$
CPack Verbose: Create ignore files regex for: \.#
CPack Verbose: Create ignore files regex for: /#
CPack: - Install directory: C:/cpack-test-ro/myproj
CPack Error: Problem copying file: C:/cpack-test-ro/myproj/copyright.txt -> C:/cpack-test-ro/build/_CPack_Packages/win32-Source/TGZ/abrbase_1.1.1_Source////copyright.txt
CPack Error: Error when generating package: myproj
---------------------------------------------
(0035533)
Bruce Cartland   
2014-03-26 20:57   
Also happens with 3.0.0-rc3-win32.

I've reverted to 2.8.8 (on Windows) until this is fixed.
(0036383)
Bruce Cartland   
2014-07-14 22:30   
Updated to 3.0.0.

Still happening :(.

I have disabled source code package generation on Windows platform until this is fixed.
(0042516)
Kitware Robot   
2016-06-10 14:29   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.