View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0014332CMakeCPackpublic2013-08-02 06:452016-06-10 14:31
ReporterDavid Keller 
Assigned ToKitware Robot 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionmoved 
PlatformOSOS Version
Product VersionCMake-2-8 
Target VersionFixed in Version 
Summary0014332: cpack >= 2.8.2 DEB generator produces invalid .deb when long filenames are involved
DescriptionWhen 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.

Steps To ReproduceInstall 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

Additional InformationTested on Debian-6
Tested on Ubuntu 10.04 LTS
Tagscorrupted, deb, dpkg
Attached Filesgz file icon cpack-bug.tar.gz [^] (665 bytes) 2013-08-02 06:45

 Relationships

  Notes
(0033648)
David Keller (reporter)
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 (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.

 Issue History
Date Modified Username Field Change
2013-08-02 06:45 David Keller New Issue
2013-08-02 06:45 David Keller File Added: cpack-bug.tar.gz
2013-08-02 08:43 David Keller Tag Attached: corrupted
2013-08-02 08:43 David Keller Tag Attached: deb
2013-08-02 08:43 David Keller Tag Attached: dpkg
2013-08-02 09:36 David Keller Note Added: 0033648
2016-06-10 14:29 Kitware Robot Note Added: 0042338
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


Copyright © 2000 - 2018 MantisBT Team