Re: [cmake-developers] libarchive and SCHILY.fflags

2012-06-11 Thread Kornel Benko
Am Mittwoch, 6. Juni 2012 um 07:38:44, schrieb Brad King brad.k...@kitware.com
 On Tue, Jun 5, 2012 at 5:46 PM, Kornel Benko kor...@lyx.org wrote:
  Try the patch below when building CMake against Ubuntu's libarchive.
 
  This one works. But wait ... checking again without the patch ... ERROR
 
  You made it.
 
 Thanks for testing:
 
  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a34015d3
 
 -Brad

Hmm, may I ask, when it should (have been) be committed?
I regularly check out the sources, but the change is still missing.

Kornel

signature.asc
Description: This is a digitally signed message part.
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Re: [cmake-developers] libarchive and SCHILY.fflags

2012-06-11 Thread Brad King
On 06/11/2012 10:08 AM, Kornel Benko wrote:
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a34015d3
 
 Hmm, may I ask, when it should (have been) be committed?
 
 I regularly check out the sources, but the change is still missing.

The topic is in the 'next' branch of the Git repo.  We have weekly
meetings, usually on Tuesday, to review and merge topics to 'master'.

-Brad
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] libarchive and SCHILY.fflags

2012-06-11 Thread Kornel Benko
Am Montag, 11. Juni 2012 um 10:10:16, schrieb Brad King brad.k...@kitware.com
 On 06/11/2012 10:08 AM, Kornel Benko wrote:
  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a34015d3
  
  Hmm, may I ask, when it should (have been) be committed?
  
  I regularly check out the sources, but the change is still missing.
 
 The topic is in the 'next' branch of the Git repo.  We have weekly
 meetings, usually on Tuesday, to review and merge topics to 'master'.
 
 -Brad

OK, thanks

Kornel

signature.asc
Description: This is a digitally signed message part.
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Re: [cmake-developers] libarchive and SCHILY.fflags

2012-06-06 Thread Brad King
On Tue, Jun 5, 2012 at 5:46 PM, Kornel Benko kor...@lyx.org wrote:
 Try the patch below when building CMake against Ubuntu's libarchive.

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

 You made it.

Thanks for testing:

 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a34015d3

-Brad
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] libarchive and SCHILY.fflags

2012-06-06 Thread Kornel Benko
Am Mittwoch, 6. Juni 2012 um 07:38:44, schrieb Brad King brad.k...@kitware.com
 On Tue, Jun 5, 2012 at 5:46 PM, Kornel Benko kor...@lyx.org wrote:
  Try the patch below when building CMake against Ubuntu's libarchive.
 
  This one works. But wait ... checking again without the patch ... ERROR
 
  You made it.
 
 Thanks for testing:
 
  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a34015d3
 
 -Brad

Thanks for your patience.

Kornel

signature.asc
Description: This is a digitally signed message part.
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Re: [cmake-developers] libarchive and SCHILY.fflags (was: Welcome to June, time for the next release candidate)

2012-06-05 Thread Brad King
On 06/05/2012 08:57 AM, Kornel Benko wrote:
 The builtin cmlibarchive in CMake 2.8.8 is libarchive 3.0.2, from svn
 rev 4051, now Git commit 28267d8f:
  
 On ubuntu 12.04 it is package libarchive12, version 3.0.3-6ubuntu1.

Can you provide a simple script that reproduces a bad tarball
using cmake -E tar when CMake is built against that libarchive,
and a test to know if it is bad?  If I can reproduce it I can
bisect libarchive history.  I don't have Ubuntu 12.04 but I do
have dpkg.

Thanks,
-Brad
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] libarchive and SCHILY.fflags (was: Welcome to June, time for the next release candidate)

2012-06-05 Thread Kornel Benko
Am Dienstag, 5. Juni 2012 um 13:19:31, schrieb Brad King brad.k...@kitware.com
 On 06/05/2012 08:57 AM, Kornel Benko wrote:
  The builtin cmlibarchive in CMake 2.8.8 is libarchive 3.0.2, from svn
  rev 4051, now Git commit 28267d8f:
   
  On ubuntu 12.04 it is package libarchive12, version 3.0.3-6ubuntu1.
 
 Can you provide a simple script that reproduces a bad tarball
 using cmake -E tar when CMake is built against that libarchive,
 and a test to know if it is bad?  If I can reproduce it I can
 bisect libarchive history.  I don't have Ubuntu 12.04 but I do
 have dpkg.
 
 Thanks,
 -Brad

It is really not so easy.
I have a directory, which produces such a tar file. Even if I remove all files 
from that dir,
the created tar is bad.

It looks, like it would depend on initial number of entries (in my case 528). 
Maybe, if there are more than 128 ... have to check

Ok, I created a dir with 340 entries. (330 entries was not enough).

Kornel



data.tgz
Description: application/compressed-tar


signature.asc
Description: This is a digitally signed message part.
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Re: [cmake-developers] libarchive and SCHILY.fflags

2012-06-05 Thread Kornel Benko
Am Dienstag, 5. Juni 2012 um 15:35:15, schrieb Brad King brad.k...@kitware.com
 On 06/05/2012 01:19 PM, Brad King wrote:
  On 06/05/2012 08:57 AM, Kornel Benko wrote:
  The builtin cmlibarchive in CMake 2.8.8 is libarchive 3.0.2, from svn
  rev 4051, now Git commit 28267d8f:
   
  On ubuntu 12.04 it is package libarchive12, version 3.0.3-6ubuntu1.
  
  Can you provide a simple script that reproduces a bad tarball
  using cmake -E tar when CMake is built against that libarchive,
  and a test to know if it is bad?  If I can reproduce it I can
  bisect libarchive history.  I don't have Ubuntu 12.04 but I do
  have dpkg.
 
 I'd still like a test case so I can reproduce the problem locally.
 However, there were very few changes between the two versions of
 libarchive, at least upstream:
 
  $ git rev-list --count 28267d8..v3.0.3
  18
 
 The only one that looks even remotely like it could affect the
 pax output is this:
 
  https://github.com/libarchive/libarchive/commit/bc523371
 
 -Brad

Maybe this version (3.0.2) is erroneous too. The last working version on 
ubuntu 11.10 was libarchive1_2.8.4-1ubuntu0.11.10.1_amd64.deb

Kornel

signature.asc
Description: This is a digitally signed message part.
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Re: [cmake-developers] libarchive and SCHILY.fflags

2012-06-05 Thread Brad King
On 06/05/2012 04:04 PM, Kornel Benko wrote:
 However, there were very few changes between the two versions of
 libarchive, at least upstream:
 $ git rev-list --count 28267d8..v3.0.3
 
 Maybe this version (3.0.2) is erroneous too. The last working
 version on ubuntu 11.10 was libarchive1_2.8.4-1ubuntu0.11.10.1_amd64.deb

...but wasn't it reported that building with the builtin cmlibarchive
works?  That is 3.0.2 plus a few changes (upstream commit 28267d8).

-Brad
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] libarchive and SCHILY.fflags

2012-06-05 Thread Brad King
On 06/05/2012 03:55 PM, Kornel Benko wrote:
 Ok, I created a dir with 340 entries. (330 entries was not enough).

Thanks.  I see the header in the tarball you sent:

 $ tar xvzf ../data.tgz |wc -l
 tar: Ignoring unknown extended header keyword `SCHILY.fflags'
 341

However, I cannot reproduce it.  I built libarchive 3.0.3 from
upstream and built CMake 2.8.8 against it:

 $ tar --version
 tar (GNU tar) 1.26
 $ .../bin/cmake --version
 cmake version 2.8.8
 $ ldd .../bin/cmake |grep libarchive
 libarchive.so.12 = .../lib/libarchive.so.12 (0x7fd4a999a000)
 $ strings .../lib/libarchive.so.12 |grep 3.0
 libarchive 3.0.3

I can create a tarball from the same directory extracted from yours
and it has no trouble:

 $ .../bin/cmake -E tar cf xx.tar xx
 $ tar xvf xx.tar |wc -l
 341

I can make a much bigger one without trouble too:

 $ for n in $(seq 1 4096); do echo $n  xx/$n; done
 $ .../bin/cmake -E tar cf xx.tar xx
 $ tar xvf xx.tar |wc -l
 4097

Is there any change in Ubuntu's package for libarchive that is
not upstream?

This may also depend on the filesystem.  Are you using selinux?

-Brad
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] libarchive and SCHILY.fflags

2012-06-05 Thread Brad King
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: ;
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] libarchive and SCHILY.fflags

2012-06-05 Thread Kornel Benko
Am Dienstag, 5. Juni 2012 um 16:43:15, schrieb Brad King brad.k...@kitware.com
 On 06/05/2012 03:55 PM, Kornel Benko wrote:
  Ok, I created a dir with 340 entries. (330 entries was not enough).
 
 Thanks.  I see the header in the tarball you sent:
 
  $ tar xvzf ../data.tgz |wc -l
  tar: Ignoring unknown extended header keyword `SCHILY.fflags'
  341
 
 However, I cannot reproduce it.  I built libarchive 3.0.3 from
 upstream and built CMake 2.8.8 against it:

  $ tar --version
  tar (GNU tar) 1.26
  $ .../bin/cmake --version
  cmake version 2.8.8
  $ ldd .../bin/cmake |grep libarchive
  libarchive.so.12 = .../lib/libarchive.so.12 (0x7fd4a999a000)
  $ strings .../lib/libarchive.so.12 |grep 3.0
  libarchive 3.0.3

Same tar version here.

 I can create a tarball from the same directory extracted from yours
 and it has no trouble:

Not nice, isn't it?

  $ .../bin/cmake -E tar cf xx.tar xx
  $ tar xvf xx.tar |wc -l
  341
 I can make a much bigger one without trouble too:
 
  $ for n in $(seq 1 4096); do echo $n  xx/$n; done
  $ .../bin/cmake -E tar cf xx.tar xx
  $ tar xvf xx.tar |wc -l
  4097

I can do this too, but only if explicitly called
# cmake -E tar cf xx.tar xx/*
== ok
but
# cmake -E tar cf xx.tar xx
== error in xx.tar

 Is there any change in Ubuntu's package for libarchive that is
 not upstream?

I don't know, but it would surprise me ...
Maybe it is one of the underlying libs, like libattr.so.1 or libnettle.so.4 . 
This guessing makes me not happy.
#ldd /usr/lib/x86_64-linux-gnu/libarchive.so.12.0.3
linux-vdso.so.1 =  (0x7fff197ff000)
libacl.so.1 = /lib/x86_64-linux-gnu/libacl.so.1 (0x7f693958a000)
libattr.so.1 = /lib/x86_64-linux-gnu/libattr.so.1 (0x7f6939385000)
liblzma.so.5 = /usr/lib/x86_64-linux-gnu/liblzma.so.5 
(0x7f6939162000)
libbz2.so.1.0 = /lib/x86_64-linux-gnu/libbz2.so.1.0 
(0x7f6938f52000)
libz.so.1 = /lib/x86_64-linux-gnu/libz.so.1 (0x7f6938d3b000)
libxml2.so.2 = /usr/lib/x86_64-linux-gnu/libxml2.so.2 
(0x7f69389df000)
libnettle.so.4 = /usr/lib/x86_64-linux-gnu/libnettle.so.4 
(0x7f69387b9000)
libc.so.6 = /lib/x86_64-linux-gnu/libc.so.6 (0x7f69383fc000)
libpthread.so.0 = /lib/x86_64-linux-gnu/libpthread.so.0 
(0x7f69381de000)
libdl.so.2 = /lib/x86_64-linux-gnu/libdl.so.2 (0x7f6937fda000)
libm.so.6 = /lib/x86_64-linux-gnu/libm.so.6 (0x7f6937ce)
/lib64/ld-linux-x86-64.so.2 (0x7f6939a5b000)



 This may also depend on the filesystem.

EXT3

 Are you using selinux?

The selinux libraries are installed, but selinux and selinux-basics are not, so
the answer should be no.

 -Brad

Kornel

signature.asc
Description: This is a digitally signed message part.
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Re: [cmake-developers] libarchive and SCHILY.fflags

2012-06-05 Thread Kornel Benko
Am Dienstag, 5. Juni 2012 um 16:27:28, schrieb Brad King brad.k...@kitware.com
 On 06/05/2012 04:04 PM, Kornel Benko wrote:
  However, there were very few changes between the two versions of
  libarchive, at least upstream:
  $ git rev-list --count 28267d8..v3.0.3
  
  Maybe this version (3.0.2) is erroneous too. The last working
  version on ubuntu 11.10 was libarchive1_2.8.4-1ubuntu0.11.10.1_amd64.deb
 
 ...but wasn't it reported that building with the builtin cmlibarchive
 works?  That is 3.0.2 plus a few changes (upstream commit 28267d8).

Sorry, I was not aware of the version of the builtin cmlibarchive.
I reported it. And yes, this was working.

 -Brad

Kornel

signature.asc
Description: This is a digitally signed message part.
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Re: [cmake-developers] libarchive and SCHILY.fflags

2012-06-05 Thread Kornel Benko
Am Dienstag, 5. Juni 2012 um 17:11:47, schrieb Brad King brad.k...@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

signature.asc
Description: This is a digitally signed message part.
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers