View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0015996 | CMake | CMake | public | 2016-03-01 10:35 | 2016-06-10 14:31 | ||||
Reporter | Marcel Metz | ||||||||
Assigned To | Kitware Robot | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | moved | ||||||
Platform | OS | OS Version | |||||||
Product Version | CMake 3.4.3 | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0015996: Unable to zip files with CMake command-line tool `tar` without path prefix in zip file | ||||||||
Description | Hi, the current implementation does not allow to package the whole content of a directory without listing every entry in the directory. I would expect that executing a command line like `cmake -E tar cvf ../result.zip --format=zip .` would zip the whole content of the current working directory. While CMake packages all the files it prepends every entry with './', which I don't expect compared to the `zip` tool provided with most linux distributions. The alternative command line `cmake -E tar cvf ../result.zip $PWD` only creates an empty zip file. | ||||||||
Steps To Reproduce | #!/usr/bin/sh # cmake --version # cmake version 3.4.1 mkdir zip_root touch zip_root/file1 touch zip_root/file2 # The whole content of 'zip_root' should be zipped, so change working directory cd zip_root cmake -E tar cvf ../cmake-abs.zip --format=zip $PWD # <no output>: $? = 0 cmake -E tar cvf ../cmake-rel.zip --format=zip . # . # ./file1 # ./file2 # $? = 0 zip ../zip-abs.zip $PWD # adding: $PWD/ (stored 0%) # $? = 0 zip ../zip-rel.zip . # zip error: Nothing to do! (../zip-rel.zip) # $? = 12 zip -r ../zip-abs-rec.zip $PWD # adding: $PWD/ (stored 0%) # adding: $PWD/file1 (stored 0%) # adding: $PWD/file2 (stored 0%) # $? = 0 zip -r ../zip-rel-rec.zip . # adding: file1 (stored 0%) # adding: file2 (stored 0%) # $? = 0 unzip -t ../cmake-abs.zip # Archive: ../cmake-abs.zip # warning [../cmake-abs.zip]: zipfile is empty unzip -t ../cmake-rel.zip # Archive: ../cmake-rel.zip # testing: ./ OK # testing: ./file1 OK # testing: ./file2 OK # No errors detected in compressed data of ../cmake-rel.zip. unzip -t ../zip-abs.zip # Archive: ../zip-abs.zip # testing: $PWD/ OK # No errors detected in compressed data of ../zip-abs.zip. unzip -t ../zip-rel.zip # unzip: cannot find or open ../zip-rel.zip, ../zip-rel.zip.zip or ../zip-rel.zip.ZIP. unzip -t ../zip-abs-rec.zip # Archive: ../zip-abs-rec.zip # testing: $PWD/ OK # testing: $PWD/file1 OK # testing: $PWD/file2 OK # No errors detected in compressed data of ../zip-abs-rec.zip. unzip -t ../zip-rel-rec.zip # Archive: ../zip-rel-rec.zip # testing: file1 OK # testing: file2 OK # No errors detected in compressed data of ../zip-rel-rec.zip. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
Relationships | |
Relationships |
Notes | |
(0042950) Kitware Robot (administrator) 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. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2016-03-01 10:35 | Marcel Metz | New Issue | |
2016-06-10 14:29 | Kitware Robot | Note Added: 0042950 | |
2016-06-10 14:29 | Kitware Robot | Status | new => resolved |
2016-06-10 14:29 | Kitware Robot | Resolution | open => moved |
2016-06-10 14:29 | Kitware Robot | Assigned To | => Kitware Robot |
2016-06-10 14:31 | Kitware Robot | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |