[cmake-developers] libarchive and SCHILY.fflags

Kornel Benko kornel at lyx.org
Tue Jun 5 17:46:59 EDT 2012


Am Dienstag, 5. Juni 2012 um 17:11:47, schrieb Brad King <brad.king at kitware.com>
> On 06/05/2012 04:43 PM, Brad King wrote:
> > Is there any change in Ubuntu's package for libarchive that is
> > not upstream?
> 
> I traced through the source to see how SCHILY.fflags can ever
> be added to the archive.  I think it depends on whether the
> HAVE_STRUCT_STAT_ST_FLAGS test is true when libarchive is built:
> 
>  https://github.com/libarchive/libarchive/blob/v3.0.3/libarchive/archive_read_disk_entry_from_file.c#L174
> 
> Try the patch below when building CMake against Ubuntu's libarchive.
> 
> -Brad
> 
> 
> $ git diff |cat
> diff --git a/Source/cmArchiveWrite.cxx b/Source/cmArchiveWrite.cxx
> index dc6b749..b410e44 100644
> --- a/Source/cmArchiveWrite.cxx
> +++ b/Source/cmArchiveWrite.cxx
> @@ -240,6 +240,7 @@ bool cmArchiveWrite::AddFile(const char* file,
>    // Clear acl and xattr fields not useful for distribution.
>    archive_entry_acl_clear(e);
>    archive_entry_xattr_clear(e);
> +  archive_entry_set_fflags(e, 0, 0);
>    if(archive_write_header(this->Archive, e) != ARCHIVE_OK)
>      {
>      this->Error = "archive_write_header: ";

This one works. But wait ... checking again without the patch ... ERROR

You made it.

	Kornel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20120605/f28731ae/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20120605/f28731ae/attachment.sig>


More information about the cmake-developers mailing list