MantisBT - CMake
View Issue Details
0014332CMakeCPackpublic2013-08-02 06:452016-06-10 14:31
David Keller 
Kitware Robot 
normalminoralways
closedmoved 
CMake-2-8 
 
0014332: cpack >= 2.8.2 DEB generator produces invalid .deb when long filenames are involved
When project installed files have long filenames (e.g. doxygen generated files), cpack creates a .deb which cannot be installed because it's internal archive seems corrupted.

Install cmake >= 2.8.2


$ tar xvzf cpack-bug.tar.gz
$ cd cpack-bug
$ mkdir build && cd build
$ cmake ..
$ cpack -G DEB
$ sudo dpkg -i cpack_bug*.deb
(Reading database ... 536878 files and directories currently installed.)
Unpacking cpack_bug (from cpack_bug-1.1.0-Linux.deb) ...
dpkg: error processing cpack_bug-1.1.0-Linux.deb (--install):
 corrupted filesystem tarfile - corrupted package archive
Errors were encountered while processing:
 cpack_bug-1.1.0-Linux.deb

Tested on Debian-6
Tested on Ubuntu 10.04 LTS
corrupted, deb, dpkg
gz cpack-bug.tar.gz (665) 2013-08-02 06:45
https://public.kitware.com/Bug/file/4834/cpack-bug.tar.gz
Issue History
2013-08-02 06:45David KellerNew Issue
2013-08-02 06:45David KellerFile Added: cpack-bug.tar.gz
2013-08-02 08:43David KellerTag Attached: corrupted
2013-08-02 08:43David KellerTag Attached: deb
2013-08-02 08:43David KellerTag Attached: dpkg
2013-08-02 09:36David KellerNote Added: 0033648
2016-06-10 14:29Kitware RobotNote Added: 0042338
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
(0033648)
David Keller   
2013-08-02 09:36   
In /Source/cmArchiveWrite.cxx, using archive_write_set_format_gnutar instead of archive_write_set_format_pax_restricted solves the problem on linux but I guess decrease portability on gnutar incompatible systems.


--- a/Source/cmArchiveWrite.cxx
+++ b/Source/cmArchiveWrite.cxx
@@ -123,9 +123,9 @@ cmArchiveWrite::cmArchiveWrite(std::ostream& os, Compress c, Type t):
         }
       break;
     case TypeTAR:
- if(archive_write_set_format_pax_restricted(this->Archive) != ARCHIVE_OK)
+ if(archive_write_set_format_gnutar(this->Archive) != ARCHIVE_OK)
         {
- this->Error = "archive_write_set_format_pax_restricted: ";
+ this->Error = "archive_write_set_format_gnutar: ";
         this->Error += archive_error_string(this->Archive);
         return;
         }
(0042338)
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.