[cmake-developers] Problem with created debian package
Kornel Benko
kornel at lyx.org
Sat Dec 30 00:29:34 EST 2017
Am Freitag, 29. Dezember 2017 um 22:25:53, schrieb Domen Vrankar <domen.vrankar at gmail.com>
> 2017-12-29 14:20 GMT+01:00 Kornel Benko <kornel at lyx.org>:
>
> > All of sudden, cmake(cpack) started producing wrong debian packages for
> > one project.
> >
>
> Did the project change in some way or was it the packaging environment that
> changed?
> I'd like to know a bit more details even if the solution below works to
> determine if this was a regression in CPack or something else.
Not that I were aware of.
>
> > This is the output of debian package manager:
> >
> > dpkg: warning: downgrading lyx24 from 2.4.0-50424git-g3a4b233 to
> > 2.4.0-50422git-gd6fb2ab
> > (Reading database ... 422667 files and directories currently
> > installed.)
> > Preparing to unpack lyx24-2.4.0-50422git-Linux.deb ...
> > Unpacking lyx24 (2.4.0-50422git-gd6fb2ab) over
> > (2.4.0-50424git-g3a4b233) ...
> > dpkg: error processing archive lyx24-2.4.0-50422git-Linux.deb
> > (--install):
> > corrupted filesystem tarfile - corrupted package archive
> > dpkg-deb: error: subprocess paste was killed by signal (Broken
> > pipe)
> > Errors were encountered while processing:
> > lyx24-2.4.0-50422git-Linux.deb
> >
> > Analysing the data.tar.gz gives no hint. What helps is a sequence of
> > commands using the system's 'tar'.
> >
> > # ar xv lyx24-2.4.0-50422git-Linux.deb data.tar.gz
> > # sudo tar axf data.tar.gz
> > # tar cf data.tar ./usr
> > # gzip -f data.tar
> > # ar rv lyx24-2.4.0-50422git-Linux.deb data.tar.gz
> >
> > Now everything is OK.
> > Other projects do not show this behaviour.
> > This is cmake 3.10.20171229-g3e1f5b11, but the same happens with earlier
> > version.
> >
>
> I'm surprised that this fixed the problem but from what you're describing
> I'd say that some paths in the data tarball are too long for the paxr
> version of tar to handle correctly (this is the default tar that is used by
> CPack and debian packages as it is the most portable one).
> If I'm right you could:
>
> 1) shorten the file paths in the archive
> 2) use gnu tar instead by setting CPACK_DEBIAN_ARCHIVE_TYPE to gnutar
Thanks, this is really nice. Meanwhile I found out what was going wrong.
The package manager seems to not understand the way some filenames containing
non-ascii chars are coded by cpack.
I prepared a minimal example showing the effect here.
1.) Create a dir and copy the attached to it
2.) mkdir build; cd bild
3.) cmake .. -DCPACK_BINARY_DEB:BOOL=ON
4.) sudo dpkg -i wrongfilename-0.1.1-Linux.deb
(Reading database ... 422665 files and directories currently installed.)
Preparing to unpack wrongfilename-0.1.1-Linux.deb ...
Unpacking wrongfilename (0.1.1) ...
dpkg: error processing archive wrongfilename-0.1.1-Linux.deb (--install):
corrupted filesystem tarfile - corrupted package archive
Errors were encountered while processing:
wrongfilename-0.1.1-Linux.deb
> See
> https://cmake.org/cmake/help/v3.10/module/CPackDeb.html#variable:CPACK_DEBIAN_ARCHIVE_TYPE
>
> Regards,
> Domen
Kornel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: This is a digitally signed message part.
URL: <https://cmake.org/pipermail/cmake-developers/attachments/20171230/ca5753a9/attachment-0001.sig>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CMakeLists.txt
Type: text/x-cmake
Size: 190 bytes
Desc: not available
URL: <https://cmake.org/pipermail/cmake-developers/attachments/20171230/ca5753a9/attachment-0001.bin>
More information about the cmake-developers
mailing list