MantisBT - CMake | ||||||||||
View Issue Details | ||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | |||||
0012142 | CMake | CPack | public | 2011-04-30 13:52 | 2016-06-10 14:31 | |||||
Reporter | Alan Garny | |||||||||
Assigned To | Kitware Robot | |||||||||
Priority | high | Severity | major | Reproducibility | always | |||||
Status | closed | Resolution | moved | |||||||
Platform | Windows | OS | Windows 7 SP1 | OS Version | ||||||
Product Version | CMake 2.8.4 | |||||||||
Target Version | Fixed in Version | |||||||||
Summary | 0012142: Read-only files lose their read-only attribute when packaged using either ZIP or NSIS | |||||||||
Description | To package a read-only file using CMake/CPack works as expected on Linux (using TGZ) and Mac OS X (using either PackageMaker or ZIP), but not on Windows (either using ZIP or NSIS). | |||||||||
Steps To Reproduce | To reproduce the problem: - Unzip the attached Test.zip file; - Either: - Double click on the packageproj.bat file; or - Open a command prompt window, cd to the directory where you unzipped the file, and execute the packageproj.bat file from the command prompt; - Execute [Test]\build\Test-0.1.1-win32.exe and/or unzip the [Test]\build\Test-0.1.1-win32.zip file; - Go to the installation/unzipped folder and check the permissions for our deployed readOnlyFile.txt file. Expected result: our deployed readOnlyFile.txt file should be readable only. Actual result: our deployed readOnlyFile.txt file is read-writable. | |||||||||
Additional Information | If you were to test the above on either Linux or Mac OS X (using, for example, the packageproj shell script which is provided), you would see that our deployed readOnlyFile.txt file is readable only, as expected. Otherwise, it might be worth pointing out that, on Windows and for NSIS and ZIP respectively, [Test]\build\_CPack_Packages\win32\NSIS\Test-0.1.1-win32\readOnlyFile.txt and [Test]\build\_CPack_Packages\win32\ZIP\Test-0.1.1-win32\readOnlyFile.txt are read-only. So, could it be that the problem is during the packaging itself? It certainly looks like it. From a reply I got on the mailing list, it would seem that the same libarchive is used for ZIP on the different platforms (see http://www.cmake.org/pipermail/cmake/2011-April/044124.html [^]). Still, I get the feeling that the problem might still be there (as we know, permissions are handled in a very different way on Windows compared to Linux / Mac OS X, so...?). Finally, regarding NSIS, having checked the contents of [Test]\build\_CPack_Packages\win32\NSIS\project.nsi, it seems to me that the NSIS project file misses a call to SetFileAttributes with READONLY as a parameter. This would ensure that once deployed, our readOnlyFile.txt is indeed read-only. At least, this is what I had to do for another project of mine for which I had to 'manually' write a NSIS project file. | |||||||||
Tags | No tags attached. | |||||||||
Relationships |
| |||||||||
Attached Files | Test.zip (1,558) 2011-04-30 13:52 https://public.kitware.com/Bug/file/3841/Test.zip | |||||||||
Issue History | ||||||||||
Date Modified | Username | Field | Change | |||||||
2011-04-30 13:52 | Alan Garny | New Issue | ||||||||
2011-04-30 13:52 | Alan Garny | File Added: Test.zip | ||||||||
2012-08-11 11:09 | David Cole | Status | new => backlog | |||||||
2012-08-11 11:09 | David Cole | Note Added: 0030256 | ||||||||
2013-03-08 07:44 | Eric NOULARD | Relationship added | related to 0012865 | |||||||
2016-06-10 14:28 | Kitware Robot | Note Added: 0041837 | ||||||||
2016-06-10 14:28 | Kitware Robot | Status | backlog => resolved | |||||||
2016-06-10 14:28 | Kitware Robot | Resolution | open => moved | |||||||
2016-06-10 14:28 | Kitware Robot | Assigned To | => Kitware Robot | |||||||
2016-06-10 14:31 | Kitware Robot | Status | resolved => closed |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|