Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/libarchive/dist Import libarchive 2.8.4:



details:   https://anonhg.NetBSD.org/src/rev/2fb5e4a06cf2
branches:  trunk
changeset: 756376:2fb5e4a06cf2
user:      joerg <joerg%NetBSD.org@localhost>
date:      Wed Jul 14 22:10:39 2010 +0000

description:
Import libarchive 2.8.4:
Symlink dereference fix for Linux broke the build there; corrected.
Fix issues on ancient FreeBSD, QNX, ancient NetBSD and Minix.
Improved reliability of hash function detection.

diffstat:

 external/bsd/libarchive/dist/NEWS                                                |    9 +-
 external/bsd/libarchive/dist/cpio/test/main.c                                    |   16 +
 external/bsd/libarchive/dist/cpio/test/test.h                                    |    5 +-
 external/bsd/libarchive/dist/cpio/test/test_gcpio_compat_ref_nosym.bin.uu        |   15 +
 external/bsd/libarchive/dist/cpio/test/test_gcpio_compat_ref_nosym.crc.uu        |   15 +
 external/bsd/libarchive/dist/cpio/test/test_gcpio_compat_ref_nosym.newc.uu       |   15 +
 external/bsd/libarchive/dist/cpio/test/test_gcpio_compat_ref_nosym.ustar.uu      |   72 ++++
 external/bsd/libarchive/dist/cpio/test/test_owner_parse.c                        |    3 +-
 external/bsd/libarchive/dist/libarchive/archive.h                                |    4 +-
 external/bsd/libarchive/dist/libarchive/archive_hash.h                           |  165 +++++++--
 external/bsd/libarchive/dist/libarchive/archive_read_disk_set_standard_lookup.c  |   31 +
 external/bsd/libarchive/dist/libarchive/archive_read_open_fd.c                   |   12 +-
 external/bsd/libarchive/dist/libarchive/archive_read_open_filename.c             |   20 +-
 external/bsd/libarchive/dist/libarchive/archive_read_support_compression_bzip2.c |    8 +-
 external/bsd/libarchive/dist/libarchive/archive_read_support_format_mtree.c      |    2 +-
 external/bsd/libarchive/dist/libarchive/archive_read_support_format_xar.c        |   13 +-
 external/bsd/libarchive/dist/libarchive/archive_windows.c                        |   66 +---
 external/bsd/libarchive/dist/libarchive/archive_windows.h                        |   75 ----
 external/bsd/libarchive/dist/libarchive/archive_write_disk.c                     |    2 +-
 external/bsd/libarchive/dist/libarchive/archive_write_disk_set_standard_lookup.c |   20 +
 external/bsd/libarchive/dist/libarchive/archive_write_set_compression_bzip2.c    |    4 +-
 external/bsd/libarchive/dist/libarchive/filter_fork.c                            |    4 +-
 external/bsd/libarchive/dist/libarchive/libarchive_internals.3                   |    1 -
 external/bsd/libarchive/dist/libarchive/test/main.c                              |   16 +
 external/bsd/libarchive/dist/libarchive/test/test_entry.c                        |   12 +
 external/bsd/libarchive/dist/tar/bsdtar.1                                        |    6 +-
 external/bsd/libarchive/dist/tar/test/main.c                                     |   16 +
 external/bsd/libarchive/dist/tar/test/test.h                                     |    5 +-
 28 files changed, 420 insertions(+), 212 deletions(-)

diffs (truncated from 1179 to 300 lines):

diff -r cf4d9590d54b -r 2fb5e4a06cf2 external/bsd/libarchive/dist/NEWS
--- a/external/bsd/libarchive/dist/NEWS Wed Jul 14 21:48:31 2010 +0000
+++ b/external/bsd/libarchive/dist/NEWS Wed Jul 14 22:10:39 2010 +0000
@@ -1,7 +1,14 @@
+Jun 30, 2010: libarchive 2.8.4 released
+Jun 30, 2010: Improved reliability of hash function detection
+Jun 30, 2010: Fix issues on ancient FreeBSD, QNX, ancient NetBSD and Minux
+
+Mar 14, 2010: libarchive 2.8.3 released
+Mar 14, 2010: Symlink dereference fix for Linux broke the build there; corrected.
+
 Mar 14, 2010: libarchive 2.8.2 released
 Mar 12, 2010: Fix NULL deference for short self-extracting zip archives.
 Mar 12, 2010: Don't dereference symlinks on Linux when reading ACLs.
-Mar 07, 2010: Better detction of SHA2 support for old OpenSSL versions.
+Mar 07, 2010: Better detection of SHA2 support for old OpenSSL versions.
 Mar 07, 2010: Fix parsing of input files for bsdtar -T.
 Mar 07, 2010: Do not leak setup_xattr into the global namespace.
 
diff -r cf4d9590d54b -r 2fb5e4a06cf2 external/bsd/libarchive/dist/cpio/test/main.c
--- a/external/bsd/libarchive/dist/cpio/test/main.c     Wed Jul 14 21:48:31 2010 +0000
+++ b/external/bsd/libarchive/dist/cpio/test/main.c     Wed Jul 14 22:10:39 2010 +0000
@@ -489,6 +489,22 @@
        logprintf("\"\n");
 }
 
+#ifndef HAVE_WCSCMP
+static int
+wcscmp(const wchar_t *s1, const wchar_t *s2)
+{
+
+       while (*s1 == *s2++) {
+               if (*s1++ == L'\0')
+                       return 0;
+       }
+       if (*s1 > *--s2)
+               return 1;
+       else
+               return -1;
+}
+#endif
+
 /* Verify that two wide strings are equal, dump them if not. */
 int
 assertion_equal_wstring(const char *file, int line,
diff -r cf4d9590d54b -r 2fb5e4a06cf2 external/bsd/libarchive/dist/cpio/test/test.h
--- a/external/bsd/libarchive/dist/cpio/test/test.h     Wed Jul 14 21:48:31 2010 +0000
+++ b/external/bsd/libarchive/dist/cpio/test/test.h     Wed Jul 14 22:10:39 2010 +0000
@@ -104,9 +104,8 @@
 # define NLINKS_INACCURATE_FOR_DIRS
 #endif
 
-/* Haiku OS */
-#if defined(__HAIKU__)
-/* Haiku has typedefs in stdint.h (needed for int64_t) */
+#if defined(__HAIKU__) || defined(__QNXNTO__)
+/* Haiku and QNX have typedefs in stdint.h (needed for int64_t) */
 #include <stdint.h>
 #endif
 
diff -r cf4d9590d54b -r 2fb5e4a06cf2 external/bsd/libarchive/dist/cpio/test/test_gcpio_compat_ref_nosym.bin.uu
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/libarchive/dist/cpio/test/test_gcpio_compat_ref_nosym.bin.uu Wed Jul 14 22:10:39 2010 +0000
@@ -0,0 +1,15 @@
+begin 644 test_gcpio_compat_ref_nosym.bin
+MQW%4`-[Z_4'H`^@#`@`VNZU*NQX$``````!D:7(`QW%4`-SZI('H`^@#`@`G
+MNZU*NQX%````"@!F:6QE```Q,C,T-38W.#D*QW%4`-SZI('H`^@#`@`GNZU*
+MNQX)````"@!L:6YK9FEL90``,3(S-#4V-S@Y"L=Q``````````````$`````
+M````"P``````5%)!24Q%4B$A(0``````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+1````````````````````````
+`
+end
diff -r cf4d9590d54b -r 2fb5e4a06cf2 external/bsd/libarchive/dist/cpio/test/test_gcpio_compat_ref_nosym.crc.uu
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/libarchive/dist/cpio/test/test_gcpio_compat_ref_nosym.crc.uu Wed Jul 14 22:10:39 2010 +0000
@@ -0,0 +1,15 @@
+begin 644 test_gcpio_compat_ref_nosym.crc
+M,#<P-S`R,#`U-D9!1$4P,#`P-#%&1#`P,#`P,T4X,#`P,#`S13@P,#`P,#`P
+M,C1!040Q14)",#`P,#`P,#`P,#`P,#`P,#`P,#`P,#4T,#`P,#`P0D(P,35"
+M,#`S-C`P,#`P,#`T,#`P,#`P,#!D:7(````P-S`W,#(P,#4V1D%$0S`P,#`X
+M,4$T,#`P,#`S13@P,#`P,#-%.#`P,#`P,#`R-$%!1#%%0D(P,#`P,#`P,#`P
+M,#`P,#`P,#`P,#`P-30P,#`P,#!"0C`Q-4(P,#(W,#`P,#`P,#4P,#`P,#`P
+M,&9I;&4``#`W,#<P,C`P-39&041#,#`P,#@Q030P,#`P,#-%.#`P,#`P,T4X
+M,#`P,#`P,#(T04%$,45"0C`P,#`P,#!!,#`P,#`P,#`P,#`P,#`U-#`P,#`P
+M,$)",#$U0C`P,C<P,#`P,#`P.3`P,#`P,44W;&EN:V9I;&4``#$R,S0U-C<X
+M.0H``#`W,#<P,C`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P
+M,#`P,#$P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P
+M,#`P,#`P,#`P,#`P,#`P0C`P,#`P,#`P5%)!24Q%4B$A(0``````````````
+1````````````````````````
+`
+end
diff -r cf4d9590d54b -r 2fb5e4a06cf2 external/bsd/libarchive/dist/cpio/test/test_gcpio_compat_ref_nosym.newc.uu
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/libarchive/dist/cpio/test/test_gcpio_compat_ref_nosym.newc.uu        Wed Jul 14 22:10:39 2010 +0000
@@ -0,0 +1,15 @@
+begin 644 test_gcpio_compat_ref_nosym.newc
+M,#<P-S`Q,#`U-D9!1$4P,#`P-#%&1#`P,#`P,T4X,#`P,#`S13@P,#`P,#`P
+M,C1!040Q14)",#`P,#`P,#`P,#`P,#`P,#`P,#`P,#4T,#`P,#`P0D(P,35"
+M,#`S-C`P,#`P,#`T,#`P,#`P,#!D:7(````P-S`W,#$P,#4V1D%$0S`P,#`X
+M,4$T,#`P,#`S13@P,#`P,#-%.#`P,#`P,#`R-$%!1#%%0D(P,#`P,#`P,#`P
+M,#`P,#`P,#`P,#`P-30P,#`P,#!"0C`Q-4(P,#(W,#`P,#`P,#4P,#`P,#`P
+M,&9I;&4``#`W,#<P,3`P-39&041#,#`P,#@Q030P,#`P,#-%.#`P,#`P,T4X
+M,#`P,#`P,#(T04%$,45"0C`P,#`P,#!!,#`P,#`P,#`P,#`P,#`U-#`P,#`P
+M,$)",#$U0C`P,C<P,#`P,#`P.3`P,#`P,#`P;&EN:V9I;&4``#$R,S0U-C<X
+M.0H``#`W,#<P,3`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P
+M,#`P,#$P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P
+M,#`P,#`P,#`P,#`P,#`P0C`P,#`P,#`P5%)!24Q%4B$A(0``````````````
+1````````````````````````
+`
+end
diff -r cf4d9590d54b -r 2fb5e4a06cf2 external/bsd/libarchive/dist/cpio/test/test_gcpio_compat_ref_nosym.ustar.uu
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/libarchive/dist/cpio/test/test_gcpio_compat_ref_nosym.ustar.uu       Wed Jul 14 22:10:39 2010 +0000
@@ -0,0 +1,72 @@
+begin 644 test_gcpio_compat_ref_nosym.ustar
+M9&ER+P``````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M`````````````#`P,#`W-S4`,#`P,3<U,``P,#`Q-S4P`#`P,#`P,#`P,#`P
+M`#$Q,C4S,C$W,C<S`#`P,3$S-3$`-0``````````````````````````````
+M````````````````````````````````````````````````````````````
+M``````````````````````````````````````````!U<W1A<@`P,'1I;0``
+M````````````````````````````````````=&EM````````````````````
+M```````````````````P,#`P,C<S`#8V,#`P-C8`````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M``````````````````````!F:6QE````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````,#`P,#8T-``P,#`Q-S4P`#`P
+M,#$W-3``,#`P,#`P,#`P,3(`,3$R-3,R,3<R-S,`,#`Q,30R,P`P````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M`````'5S=&%R`#`P=&EM``````````````````````````````````````!T
+M:6T``````````````````````````````````````#`P,#`R-S,`-C8P,#`T
+M-P``````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M`````````````````````````````````````````````#$R,S0U-C<X.0H`
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````;&EN:V9I;&4`````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M`````````````````````#`P,#`V-#0`,#`P,3<U,``P,#`Q-S4P`#`P,#`P
+M,#`P,#`P`#$Q,C4S,C$W,C<S`#`P,3,Q,S<`,69I;&4`````````````````
+M````````````````````````````````````````````````````````````
+M``````````````````````````````````````````````````!U<W1A<@`P
+M,'1I;0``````````````````````````````````````=&EM````````````
+M```````````````````````````P,#`P,C<S`#8V,#`P-#<`````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+,````````````````
+`
+end
diff -r cf4d9590d54b -r 2fb5e4a06cf2 external/bsd/libarchive/dist/cpio/test/test_owner_parse.c
--- a/external/bsd/libarchive/dist/cpio/test/test_owner_parse.c Wed Jul 14 21:48:31 2010 +0000
+++ b/external/bsd/libarchive/dist/cpio/test/test_owner_parse.c Wed Jul 14 22:10:39 2010 +0000
@@ -31,7 +31,8 @@
 #if !defined(_WIN32)
 #define ROOT "root"
 static int root_uids[] = { 0 };
-static int root_gids[] = { 0 };
+/* Solaris 9 root has gid 1 (other) */
+static int root_gids[] = { 0, 1 };
 #elif defined(__CYGWIN__)
 /* On cygwin, the Administrator user most likely exists (unless
  * it has been renamed or is in a non-English localization), but
diff -r cf4d9590d54b -r 2fb5e4a06cf2 external/bsd/libarchive/dist/libarchive/archive.h
--- a/external/bsd/libarchive/dist/libarchive/archive.h Wed Jul 14 21:48:31 2010 +0000
+++ b/external/bsd/libarchive/dist/libarchive/archive.h Wed Jul 14 22:10:39 2010 +0000
@@ -129,13 +129,13 @@
  *             (ARCHIVE_API_VERSION * 1000000 + ARCHIVE_API_FEATURE * 1000)
  * #endif
  */
-#define        ARCHIVE_VERSION_NUMBER 2008002
+#define        ARCHIVE_VERSION_NUMBER 2008004
 __LA_DECL int          archive_version_number(void);
 
 /*
  * Textual name/version of the library, useful for version displays.
  */
-#define        ARCHIVE_VERSION_STRING "libarchive 2.8.2"
+#define        ARCHIVE_VERSION_STRING "libarchive 2.8.4"
 __LA_DECL const char * archive_version_string(void);
 
 #if ARCHIVE_VERSION_NUMBER < 3000000
diff -r cf4d9590d54b -r 2fb5e4a06cf2 external/bsd/libarchive/dist/libarchive/archive_hash.h
--- a/external/bsd/libarchive/dist/libarchive/archive_hash.h    Wed Jul 14 21:48:31 2010 +0000
+++ b/external/bsd/libarchive/dist/libarchive/archive_hash.h    Wed Jul 14 22:10:39 2010 +0000
@@ -29,6 +29,10 @@
 #error This header is only to be used internally to libarchive.
 #endif
 
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+
 /*
  * Hash function support in various Operating Systems:
  *
@@ -44,40 +48,68 @@
  * - MD5 and SHA1 in libmd: without _ after algorithm name
  * - SHA256: with _ after algorithm name
  *
+ * Mac OS X (10.4 and later):
+ * - MD5, SHA1 and SHA2 in libSystem: with CC_ prefix and _ after algorithm name
+ *
  * OpenSSL:
  * - MD5, SHA1 and SHA2 in libcrypto: with _ after algorithm name
+ *
+ * Windows:
+ * - MD5, SHA1 and SHA2 in archive_windows.c: without algorithm name
+ *   and with __la_ prefix.
  */
+#if defined(ARCHIVE_HASH_MD5_WIN)    ||\
+      defined(ARCHIVE_HASH_SHA1_WIN)   || defined(ARCHIVE_HASH_SHA256_WIN) ||\
+      defined(ARCHIVE_HASH_SHA384_WIN) || defined(ARCHIVE_HASH_SHA512_WIN)
+#include <wincrypt.h>
+typedef struct {
+       int             valid;
+       HCRYPTPROV      cryptProv;
+       HCRYPTHASH      hash;
+} Digest_CTX;
+extern void __la_hash_Init(Digest_CTX *, ALG_ID);
+extern void __la_hash_Final(unsigned char *, size_t, Digest_CTX *);
+extern void __la_hash_Update(Digest_CTX *, const unsigned char *, size_t);
+#endif
 
-#if defined(HAVE_MD5_H) && defined(HAVE_MD5INIT)
+#if defined(ARCHIVE_HASH_MD5_LIBC)
 #  include <md5.h>
 #  define ARCHIVE_HAS_MD5
 typedef MD5_CTX archive_md5_ctx;
 #  define archive_md5_init(ctx)                        MD5Init(ctx)
 #  define archive_md5_final(ctx, buf)          MD5Final(buf, ctx)
 #  define archive_md5_update(ctx, buf, n)      MD5Update(ctx, buf, n)
-#elif defined(HAVE_OPENSSL_MD5_H)
+#elif defined(ARCHIVE_HASH_MD5_LIBSYSTEM)
+#  include <CommonCrypto/CommonDigest.h>
+#  define ARCHIVE_HAS_MD5
+typedef CC_MD5_CTX archive_md5_ctx;
+#  define archive_md5_init(ctx)                        CC_MD5_Init(ctx)
+#  define archive_md5_final(ctx, buf)          CC_MD5_Final(buf, ctx)
+#  define archive_md5_update(ctx, buf, n)      CC_MD5_Update(ctx, buf, n)
+#elif defined(ARCHIVE_HASH_MD5_OPENSSL)
 #  include <openssl/md5.h>
 #  define ARCHIVE_HAS_MD5
 typedef MD5_CTX archive_md5_ctx;
 #  define archive_md5_init(ctx)                        MD5_Init(ctx)
 #  define archive_md5_final(ctx, buf)          MD5_Final(buf, ctx)
 #  define archive_md5_update(ctx, buf, n)      MD5_Update(ctx, buf, n)
-#elif defined(_WIN32) && !defined(__CYGWIN__) && defined(CALG_MD5)
+#elif defined(ARCHIVE_HASH_MD5_WIN)
 #  define ARCHIVE_HAS_MD5
-typedef MD5_CTX archive_md5_ctx;
-#  define archive_md5_init(ctx)                        MD5_Init(ctx)
-#  define archive_md5_final(ctx, buf)          MD5_Final(buf, ctx)
-#  define archive_md5_update(ctx, buf, n)      MD5_Update(ctx, buf, n)
+#  define MD5_DIGEST_LENGTH    16
+typedef Digest_CTX archive_md5_ctx;
+#  define archive_md5_init(ctx)                        __la_hash_Init(ctx, CALG_MD5)



Home | Main Index | Thread Index | Old Index