[cmake-developers] libarchive and SCHILY.fflags
Brad King
brad.king at kitware.com
Tue Jun 5 17:11:47 EDT 2012
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: ";
More information about the cmake-developers
mailing list