]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Fix alphabetical order, other small fixes
authorSean Purcell <me@seanp.xyz>
Wed, 26 Apr 2017 18:10:17 +0000 (11:10 -0700)
committerSean Purcell <iburinoc@gmail.com>
Tue, 16 May 2017 03:06:49 +0000 (23:06 -0400)
22 files changed:
Makefile.am
build/cmake/config.h.in
cat/test/CMakeLists.txt
contrib/android/Android.mk
cpio/cmdline.c
cpio/cpio.c
cpio/cpio.h
cpio/test/CMakeLists.txt
cpio/test/test_option_zstd.c
libarchive/CMakeLists.txt
libarchive/archive.h
libarchive/archive_read_filter.3
libarchive/archive_write_add_filter.c
libarchive/archive_write_add_filter_by_name.c
libarchive/archive_write_filter.3
libarchive/test/CMakeLists.txt
libarchive/test/test_archive_write_add_filter_by_name.c
tar/bsdtar.c
tar/bsdtar.h
tar/cmdline.c
tar/creation_set.c
tar/test/CMakeLists.txt

index 687f9d6707fe160afc7e99d605e1931f9397e72d..6569d8e1ad37e6b0f0957b38a819fe7998048571 100644 (file)
@@ -161,13 +161,13 @@ libarchive_la_SOURCES= \
        libarchive/archive_read_support_filter_gzip.c \
        libarchive/archive_read_support_filter_lrzip.c \
        libarchive/archive_read_support_filter_lz4.c \
-       libarchive/archive_read_support_filter_zstd.c \
        libarchive/archive_read_support_filter_lzop.c \
        libarchive/archive_read_support_filter_none.c \
        libarchive/archive_read_support_filter_program.c \
        libarchive/archive_read_support_filter_rpm.c \
        libarchive/archive_read_support_filter_uu.c \
        libarchive/archive_read_support_filter_xz.c \
+       libarchive/archive_read_support_filter_zstd.c \
        libarchive/archive_read_support_format_7zip.c \
        libarchive/archive_read_support_format_all.c \
        libarchive/archive_read_support_format_ar.c \
@@ -209,12 +209,12 @@ libarchive_la_SOURCES= \
        libarchive/archive_write_add_filter_gzip.c \
        libarchive/archive_write_add_filter_lrzip.c \
        libarchive/archive_write_add_filter_lz4.c \
-       libarchive/archive_write_add_filter_zstd.c \
        libarchive/archive_write_add_filter_lzop.c \
        libarchive/archive_write_add_filter_none.c \
        libarchive/archive_write_add_filter_program.c \
        libarchive/archive_write_add_filter_uuencode.c \
        libarchive/archive_write_add_filter_xz.c \
+       libarchive/archive_write_add_filter_zstd.c \
        libarchive/archive_write_set_format.c \
        libarchive/archive_write_set_format_7zip.c \
        libarchive/archive_write_set_format_ar.c \
@@ -389,7 +389,6 @@ libarchive_test_SOURCES= \
        libarchive/test/test_compat_gtar.c \
        libarchive/test/test_compat_gzip.c \
        libarchive/test/test_compat_lz4.c \
-       libarchive/test/test_compat_zstd.c \
        libarchive/test/test_compat_lzip.c \
        libarchive/test/test_compat_lzma.c \
        libarchive/test/test_compat_lzop.c \
@@ -405,6 +404,7 @@ libarchive_test_SOURCES= \
        libarchive/test/test_compat_uudecode_large.c \
        libarchive/test/test_compat_xz.c \
        libarchive/test/test_compat_zip.c \
+       libarchive/test/test_compat_zstd.c \
        libarchive/test/test_empty_write.c \
        libarchive/test/test_entry.c \
        libarchive/test/test_entry_strmode.c \
@@ -556,13 +556,13 @@ libarchive_test_SOURCES= \
        libarchive/test/test_write_filter_gzip_timestamp.c \
        libarchive/test/test_write_filter_lrzip.c \
        libarchive/test/test_write_filter_lz4.c \
-       libarchive/test/test_write_filter_zstd.c \
        libarchive/test/test_write_filter_lzip.c \
        libarchive/test/test_write_filter_lzma.c \
        libarchive/test/test_write_filter_lzop.c \
        libarchive/test/test_write_filter_program.c \
        libarchive/test/test_write_filter_uuencode.c \
        libarchive/test/test_write_filter_xz.c \
+       libarchive/test/test_write_filter_zstd.c \
        libarchive/test/test_write_format_7zip.c \
        libarchive/test/test_write_format_7zip_empty.c \
        libarchive/test/test_write_format_7zip_large.c \
@@ -653,7 +653,6 @@ libarchive_test_EXTRA_DIST=\
        libarchive/test/test_compat_lz4_B6BD.tar.lz4.uu \
        libarchive/test/test_compat_lz4_B7.tar.lz4.uu \
        libarchive/test/test_compat_lz4_B7BD.tar.lz4.uu \
-       libarchive/test/test_compat_zstd_1.tar.zst.uu \
        libarchive/test/test_compat_lzip_1.tlz.uu \
        libarchive/test/test_compat_lzip_2.tlz.uu \
        libarchive/test/test_compat_lzma_1.tlz.uu \
@@ -682,6 +681,7 @@ libarchive_test_EXTRA_DIST=\
        libarchive/test/test_compat_zip_5.zip.uu \
        libarchive/test/test_compat_zip_6.zip.uu \
        libarchive/test/test_compat_zip_7.xps.uu \
+       libarchive/test/test_compat_zstd_1.tar.zst.uu \
        libarchive/test/test_fuzz.cab.uu \
        libarchive/test/test_fuzz.lzh.uu \
        libarchive/test/test_fuzz_1.iso.Z.uu \
@@ -962,10 +962,10 @@ bsdtar_test_SOURCES= \
        tar/test/test_extract_tar_lrz.c \
        tar/test/test_extract_tar_lz.c \
        tar/test/test_extract_tar_lz4.c \
-       tar/test/test_extract_tar_zstd.c \
        tar/test/test_extract_tar_lzma.c \
        tar/test/test_extract_tar_lzo.c \
        tar/test/test_extract_tar_xz.c \
+       tar/test/test_extract_tar_zstd.c \
        tar/test/test_format_newc.c \
        tar/test/test_help.c \
        tar/test/test_leading_slash.c \
@@ -990,7 +990,6 @@ bsdtar_test_SOURCES= \
        tar/test/test_option_keep_newer_files.c \
        tar/test/test_option_lrzip.c \
        tar/test/test_option_lz4.c \
-       tar/test/test_option_zstd.c \
        tar/test/test_option_lzma.c \
        tar/test/test_option_lzop.c \
        tar/test/test_option_n.c \
@@ -1006,6 +1005,7 @@ bsdtar_test_SOURCES= \
        tar/test/test_option_xattrs.c \
        tar/test/test_option_xz.c \
        tar/test/test_option_z.c \
+       tar/test/test_option_zstd.c \
        tar/test/test_patterns.c \
        tar/test/test_print_longpath.c \
        tar/test/test_stdio.c \
@@ -1125,10 +1125,10 @@ bsdcpio_test_SOURCES= \
        cpio/test/test_extract_cpio_lrz.c \
        cpio/test/test_extract_cpio_lz.c \
        cpio/test/test_extract_cpio_lz4.c \
-       cpio/test/test_extract_cpio_zstd.c \
        cpio/test/test_extract_cpio_lzma.c \
        cpio/test/test_extract_cpio_lzo.c \
        cpio/test/test_extract_cpio_xz.c \
+       cpio/test/test_extract_cpio_zstd.c \
        cpio/test/test_format_newc.c \
        cpio/test/test_gcpio_compat.c \
        cpio/test/test_missing_file.c \
@@ -1148,7 +1148,6 @@ bsdcpio_test_SOURCES= \
        cpio/test/test_option_l.c \
        cpio/test/test_option_lrzip.c \
        cpio/test/test_option_lz4.c \
-       cpio/test/test_option_zstd.c \
        cpio/test/test_option_lzma.c \
        cpio/test/test_option_lzop.c \
        cpio/test/test_option_m.c \
@@ -1160,6 +1159,7 @@ bsdcpio_test_SOURCES= \
        cpio/test/test_option_xz.c \
        cpio/test/test_option_y.c \
        cpio/test/test_option_z.c \
+       cpio/test/test_option_zstd.c \
        cpio/test/test_owner_parse.c \
        cpio/test/test_passthrough_dotdot.c \
        cpio/test/test_passthrough_reverse.c
@@ -1268,18 +1268,18 @@ bsdcat_test_SOURCES= \
        cat/test/test_0.c \
        cat/test/test_empty_gz.c \
        cat/test/test_empty_lz4.c \
-       cat/test/test_empty_zstd.c \
        cat/test/test_empty_xz.c \
+       cat/test/test_empty_zstd.c \
        cat/test/test_error.c \
        cat/test/test_error_mixed.c \
        cat/test/test_expand_Z.c \
        cat/test/test_expand_bz2.c \
        cat/test/test_expand_gz.c \
        cat/test/test_expand_lz4.c \
-       cat/test/test_expand_zstd.c \
        cat/test/test_expand_mixed.c \
        cat/test/test_expand_plain.c \
        cat/test/test_expand_xz.c \
+       cat/test/test_expand_zstd.c \
        cat/test/test_help.c \
        cat/test/test_version.c
 
index fd5e5ec559bbe51158e50502dc9a1de2a4da3cbf..50978ce961eeb0a810f841f173e3ec027bc84199 100644 (file)
@@ -695,9 +695,6 @@ typedef uint64_t uintmax_t;
 /* Define to 1 if you have the `lz4' library (-llz4). */
 #cmakedefine HAVE_LIBLZ4 1
 
-/* Define to 1 if you have the `zstd' library (-lzstd). */
-#cmakedefine HAVE_LIBZSTD 1
-
 /* Define to 1 if you have the `lzma' library (-llzma). */
 #cmakedefine HAVE_LIBLZMA 1
 
@@ -728,6 +725,9 @@ typedef uint64_t uintmax_t;
 /* Define to 1 if you have the `z' library (-lz). */
 #cmakedefine HAVE_LIBZ 1
 
+/* Define to 1 if you have the `zstd' library (-lzstd). */
+#cmakedefine HAVE_LIBZSTD 1
+
 /* Define to 1 if you have the <limits.h> header file. */
 #cmakedefine HAVE_LIMITS_H 1
 
@@ -795,9 +795,6 @@ typedef uint64_t uintmax_t;
 /* Define to 1 if you have the <lz4.h> header file. */
 #cmakedefine HAVE_LZ4_H 1
 
-/* Define to 1 if you have the <zstd.h> header file. */
-#cmakedefine HAVE_ZSTD_H 1
-
 /* Define to 1 if you have the <lzmadec.h> header file. */
 #cmakedefine HAVE_LZMADEC_H 1
 
@@ -1185,6 +1182,9 @@ typedef uint64_t uintmax_t;
 /* Define to 1 if you have the <zlib.h> header file. */
 #cmakedefine HAVE_ZLIB_H 1
 
+/* Define to 1 if you have the <zstd.h> header file. */
+#cmakedefine HAVE_ZSTD_H 1
+
 /* Define to 1 if you have the `_ctime64_s' function. */
 #cmakedefine HAVE__CTIME64_S 1
 
index e76e92e6be72a522d01a792f01d3bf08427f99ea..4652ff3725c8f88778be3888b2f942f1d97aed8c 100644 (file)
@@ -11,18 +11,18 @@ IF(ENABLE_CAT AND ENABLE_TEST)
     test_0.c
     test_empty_gz.c
     test_empty_lz4.c
-    test_empty_zstd.c
     test_empty_xz.c
+    test_empty_zstd.c
     test_error.c
     test_error_mixed.c
     test_expand_Z.c
     test_expand_bz2.c
     test_expand_gz.c
     test_expand_lz4.c
-    test_expand_zstd.c
     test_expand_mixed.c
     test_expand_plain.c
     test_expand_xz.c
+    test_expand_zstd.c
     test_help.c
     test_version.c
   )
index 0d67f7ac4728aaa2c3f9be208e36cc538994a2ea..2f2cf563697ae9d44f327dac8b9e3738c63b2854 100644 (file)
@@ -68,13 +68,13 @@ libarchive_src_files := libarchive/archive_acl.c \
                                                libarchive/archive_read_support_filter_gzip.c \
                                                libarchive/archive_read_support_filter_lrzip.c \
                                                libarchive/archive_read_support_filter_lz4.c \
-                                               libarchive/archive_read_support_filter_zstd.c \
                                                libarchive/archive_read_support_filter_lzop.c \
                                                libarchive/archive_read_support_filter_none.c \
                                                libarchive/archive_read_support_filter_program.c \
                                                libarchive/archive_read_support_filter_rpm.c \
                                                libarchive/archive_read_support_filter_uu.c \
                                                libarchive/archive_read_support_filter_xz.c \
+                                               libarchive/archive_read_support_filter_zstd.c \
                                                libarchive/archive_read_support_format_7zip.c \
                                                libarchive/archive_read_support_format_all.c \
                                                libarchive/archive_read_support_format_ar.c \
@@ -112,12 +112,12 @@ libarchive_src_files := libarchive/archive_acl.c \
                                                libarchive/archive_write_add_filter_gzip.c \
                                                libarchive/archive_write_add_filter_lrzip.c \
                                                libarchive/archive_write_add_filter_lz4.c \
-                                               libarchive/archive_write_add_filter_zstd.c \
                                                libarchive/archive_write_add_filter_lzop.c \
                                                libarchive/archive_write_add_filter_none.c \
                                                libarchive/archive_write_add_filter_program.c \
                                                libarchive/archive_write_add_filter_uuencode.c \
                                                libarchive/archive_write_add_filter_xz.c \
+                                               libarchive/archive_write_add_filter_zstd.c \
                                                libarchive/archive_write_set_format.c \
                                                libarchive/archive_write_set_format_7zip.c \
                                                libarchive/archive_write_set_format_ar.c \
index 4f371cee10a8d7f268bddd3f7d195d735d0f0c1d..c8fc30ea773a9b6b868859b530f5155ddd373921 100644 (file)
@@ -75,7 +75,6 @@ static const struct option {
        { "list",                       0, 't' },
        { "lrzip",                      0, OPTION_LRZIP },
        { "lz4",                        0, OPTION_LZ4 },
-       { "zstd",                       0, OPTION_ZSTD },
        { "lzma",                       0, OPTION_LZMA },
        { "lzop",                       0, OPTION_LZOP },
        { "make-directories",           0, 'd' },
@@ -93,6 +92,7 @@ static const struct option {
        { "verbose",                    0, 'v' },
        { "version",                    0, OPTION_VERSION },
        { "xz",                         0, 'J' },
+       { "zstd",                       0, OPTION_ZSTD },
        { NULL, 0, 0 }
 };
 
index 17d12ff6a24eca0614712896c353dbc58837d2ac..e80a0f3bcf442bbafbc0086b40c7da7495b933bb 100644 (file)
@@ -267,9 +267,9 @@ main(int argc, char *argv[])
                        break;
                case OPTION_LRZIP:
                case OPTION_LZ4:
-               case OPTION_ZSTD:
                case OPTION_LZMA: /* GNU tar, others */
                case OPTION_LZOP: /* GNU tar, others */
+               case OPTION_ZSTD:
                        cpio->compress = opt;
                        break;
                case 'm': /* POSIX 1997 */
@@ -541,15 +541,15 @@ mode_out(struct cpio *cpio)
        case OPTION_LZ4:
                r = archive_write_add_filter_lz4(cpio->archive);
                break;
-       case OPTION_ZSTD:
-               r = archive_write_add_filter_zstd(cpio->archive);
-               break;
        case OPTION_LZMA:
                r = archive_write_add_filter_lzma(cpio->archive);
                break;
        case OPTION_LZOP:
                r = archive_write_add_filter_lzop(cpio->archive);
                break;
+       case OPTION_ZSTD:
+               r = archive_write_add_filter_zstd(cpio->archive);
+               break;
        case 'j': case 'y':
                r = archive_write_add_filter_bzip2(cpio->archive);
                break;
index 14a77c11ff9021890aee5ceac50b84cb4fda191d..abf3628bfaee8dbf1ad9e546d562775e0282281c 100644 (file)
@@ -104,7 +104,6 @@ enum {
        OPTION_INSECURE,
        OPTION_LRZIP,
        OPTION_LZ4,
-       OPTION_ZSTD,
        OPTION_LZMA,
        OPTION_LZOP,
        OPTION_PASSPHRASE,
@@ -112,7 +111,8 @@ enum {
        OPTION_PRESERVE_OWNER,
        OPTION_QUIET,
        OPTION_UUENCODE,
-       OPTION_VERSION
+       OPTION_VERSION,
+       OPTION_ZSTD,
 };
 
 int    cpio_getopt(struct cpio *cpio);
index 3c0e661eb04f7b30f536f1d9f579268089652f38..d0927a81e8a823c27eabc718b70ec669864c5738 100644 (file)
@@ -20,10 +20,10 @@ IF(ENABLE_CPIO AND ENABLE_TEST)
     test_extract_cpio_lrz
     test_extract_cpio_lz
     test_extract_cpio_lz4
-    test_extract_cpio_zstd
     test_extract_cpio_lzma
     test_extract_cpio_lzo
     test_extract_cpio_xz
+    test_extract_cpio_zstd
     test_format_newc.c
     test_gcpio_compat.c
     test_missing_file.c
@@ -43,7 +43,6 @@ IF(ENABLE_CPIO AND ENABLE_TEST)
     test_option_l.c
     test_option_lrzip.c
     test_option_lz4.c
-    test_option_zstd.c
     test_option_lzma.c
     test_option_lzop.c
     test_option_m.c
@@ -55,6 +54,7 @@ IF(ENABLE_CPIO AND ENABLE_TEST)
     test_option_xz.c
     test_option_y.c
     test_option_z.c
+    test_option_zstd.c
     test_owner_parse.c
     test_passthrough_dotdot.c
     test_passthrough_reverse.c
index 228356a7fc4d735d0eb2749df7712c0f9cecb6ae..29b8c78b94aa22afc7c86584fe47fc9936d174a6 100644 (file)
@@ -34,7 +34,7 @@ DEFINE_TEST(test_option_zstd)
        /* Create a file. */
        assertMakeFile("f", 0644, "a");
 
-       /* Archive it with lz4 compression. */
+       /* Archive it with zstd compression. */
        r = systemf("echo f | %s -o --zstd >archive.out 2>archive.err",
            testprog);
        p = slurpfile(&s, "archive.err");
@@ -75,7 +75,7 @@ DEFINE_TEST(test_option_zstd)
                goto done;
        }
        free(p);
-       /* Check that the archive file has an lz4 signature. */
+       /* Check that the archive file has an zstd signature. */
        p = slurpfile(&s, "archive.out");
        assert(s > 2);
        assertEqualMem(p, "\x28\xb5\x2f\xfd", 4);
index 1e561f3f6d25bc4c919080d3701f0677e5f2a1ba..82dd56c9d7d6e1e798fcb7d8d779f49097c2d6cb 100644 (file)
@@ -82,13 +82,13 @@ SET(libarchive_SOURCES
   archive_read_support_filter_grzip.c
   archive_read_support_filter_lrzip.c
   archive_read_support_filter_lz4.c
-  archive_read_support_filter_zstd.c
   archive_read_support_filter_lzop.c
   archive_read_support_filter_none.c
   archive_read_support_filter_program.c
   archive_read_support_filter_rpm.c
   archive_read_support_filter_uu.c
   archive_read_support_filter_xz.c
+  archive_read_support_filter_zstd.c
   archive_read_support_format_7zip.c
   archive_read_support_format_all.c
   archive_read_support_format_ar.c
@@ -130,12 +130,12 @@ SET(libarchive_SOURCES
   archive_write_add_filter_gzip.c
   archive_write_add_filter_lrzip.c
   archive_write_add_filter_lz4.c
-  archive_write_add_filter_zstd.c
   archive_write_add_filter_lzop.c
   archive_write_add_filter_none.c
   archive_write_add_filter_program.c
   archive_write_add_filter_uuencode.c
   archive_write_add_filter_xz.c
+  archive_write_add_filter_zstd.c
   archive_write_set_format.c
   archive_write_set_format_7zip.c
   archive_write_set_format_ar.c
index 31807e43d0196d65f0636e525602ae5e74617f0f..f6f684eab2a05e26d55bce824bcecefa8b03f40b 100644 (file)
@@ -423,7 +423,6 @@ __LA_DECL int archive_read_support_filter_gzip(struct archive *);
 __LA_DECL int archive_read_support_filter_grzip(struct archive *);
 __LA_DECL int archive_read_support_filter_lrzip(struct archive *);
 __LA_DECL int archive_read_support_filter_lz4(struct archive *);
-__LA_DECL int archive_read_support_filter_zstd(struct archive *);
 __LA_DECL int archive_read_support_filter_lzip(struct archive *);
 __LA_DECL int archive_read_support_filter_lzma(struct archive *);
 __LA_DECL int archive_read_support_filter_lzop(struct archive *);
@@ -436,6 +435,7 @@ __LA_DECL int archive_read_support_filter_program_signature
 __LA_DECL int archive_read_support_filter_rpm(struct archive *);
 __LA_DECL int archive_read_support_filter_uu(struct archive *);
 __LA_DECL int archive_read_support_filter_xz(struct archive *);
+__LA_DECL int archive_read_support_filter_zstd(struct archive *);
 
 __LA_DECL int archive_read_support_format_7zip(struct archive *);
 __LA_DECL int archive_read_support_format_all(struct archive *);
@@ -773,7 +773,6 @@ __LA_DECL int archive_write_add_filter_grzip(struct archive *);
 __LA_DECL int archive_write_add_filter_gzip(struct archive *);
 __LA_DECL int archive_write_add_filter_lrzip(struct archive *);
 __LA_DECL int archive_write_add_filter_lz4(struct archive *);
-__LA_DECL int archive_write_add_filter_zstd(struct archive *);
 __LA_DECL int archive_write_add_filter_lzip(struct archive *);
 __LA_DECL int archive_write_add_filter_lzma(struct archive *);
 __LA_DECL int archive_write_add_filter_lzop(struct archive *);
@@ -782,6 +781,7 @@ __LA_DECL int archive_write_add_filter_program(struct archive *,
                     const char *cmd);
 __LA_DECL int archive_write_add_filter_uuencode(struct archive *);
 __LA_DECL int archive_write_add_filter_xz(struct archive *);
+__LA_DECL int archive_write_add_filter_zstd(struct archive *);
 
 
 /* A convenience function to set the format based on the code or name. */
index d07e940af85764297f524437a174526161a31976..ef0a701753324ac7d9b0551c800b47446fc3c378 100644 (file)
 .Nm archive_read_support_filter_compress ,
 .Nm archive_read_support_filter_gzip ,
 .Nm archive_read_support_filter_lz4 ,
-.Nm archive_read_support_filter_zstd ,
 .Nm archive_read_support_filter_lzma ,
 .Nm archive_read_support_filter_none ,
 .Nm archive_read_support_filter_rpm ,
 .Nm archive_read_support_filter_uu ,
 .Nm archive_read_support_filter_xz ,
+.Nm archive_read_support_filter_zstd ,
 .Nm archive_read_support_filter_program ,
 .Nm archive_read_support_filter_program_signature
 .Nd functions for reading streaming archives
@@ -62,8 +62,6 @@ Streaming Archive Library (libarchive, -larchive)
 .Ft int
 .Fn archive_read_support_filter_lz4 "struct archive *"
 .Ft int
-.Fn archive_read_support_filter_zstd "struct archive *"
-.Ft int
 .Fn archive_read_support_filter_lzma "struct archive *"
 .Ft int
 .Fn archive_read_support_filter_lzop "struct archive *"
@@ -76,6 +74,8 @@ Streaming Archive Library (libarchive, -larchive)
 .Ft int
 .Fn archive_read_support_filter_xz "struct archive *"
 .Ft int
+.Fn archive_read_support_filter_zstd "struct archive *"
+.Ft int
 .Fo archive_read_support_filter_program
 .Fa "struct archive *"
 .Fa "const char *cmd"
@@ -97,13 +97,13 @@ Streaming Archive Library (libarchive, -larchive)
 .Fn archive_read_support_filter_gzip ,
 .Fn archive_read_support_filter_lrzip ,
 .Fn archive_read_support_filter_lz4 ,
-.Fn archive_read_support_filter_zstd ,
 .Fn archive_read_support_filter_lzma ,
 .Fn archive_read_support_filter_lzop ,
 .Fn archive_read_support_filter_none ,
 .Fn archive_read_support_filter_rpm ,
 .Fn archive_read_support_filter_uu ,
-.Fn archive_read_support_filter_xz
+.Fn archive_read_support_filter_xz ,
+.Fn archive_read_support_filter_zstd ,
 .Xc
 Enables auto-detection code and decompression support for the
 specified compression.
index acefc69e697c7b3bcbce3e2c53bf8c63a304067a..203f4142b5c98eb1924809092b7517c4505aa35e 100644 (file)
@@ -48,12 +48,12 @@ struct { int code; int (*setter)(struct archive *); } codes[] =
        { ARCHIVE_FILTER_GRZIP,         archive_write_add_filter_grzip },
        { ARCHIVE_FILTER_LRZIP,         archive_write_add_filter_lrzip },
        { ARCHIVE_FILTER_LZ4,           archive_write_add_filter_lz4 },
-       { ARCHIVE_FILTER_ZSTD,          archive_write_add_filter_zstd },
        { ARCHIVE_FILTER_LZIP,          archive_write_add_filter_lzip },
        { ARCHIVE_FILTER_LZMA,          archive_write_add_filter_lzma },
        { ARCHIVE_FILTER_LZOP,          archive_write_add_filter_lzip },
        { ARCHIVE_FILTER_UU,            archive_write_add_filter_uuencode },
        { ARCHIVE_FILTER_XZ,            archive_write_add_filter_xz },
+       { ARCHIVE_FILTER_ZSTD,          archive_write_add_filter_zstd },
        { -1,                   NULL }
 };
 
index f3971bf518bc90966999e56c8cc56f793fb72e5a..ffa633c963712d0993576042997796f8fcb3c896 100644 (file)
@@ -52,12 +52,12 @@ struct { const char *name; int (*setter)(struct archive *); } names[] =
        { "gzip",               archive_write_add_filter_gzip },
        { "lrzip",              archive_write_add_filter_lrzip },
        { "lz4",                archive_write_add_filter_lz4 },
-       { "zstd",               archive_write_add_filter_zstd },
        { "lzip",               archive_write_add_filter_lzip },
        { "lzma",               archive_write_add_filter_lzma },
        { "lzop",               archive_write_add_filter_lzop },
        { "uuencode",           archive_write_add_filter_uuencode },
        { "xz",                 archive_write_add_filter_xz },
+       { "zstd",               archive_write_add_filter_zstd },
        { NULL,                 NULL }
 };
 
index 896cd2426f1787fdb0c297ddbab5d4a3448143d0..d6fa07131a807385e462e6a4d989ab229a373c0b 100644 (file)
 .Nm archive_write_add_filter_gzip ,
 .Nm archive_write_add_filter_lrzip ,
 .Nm archive_write_add_filter_lz4 ,
-.Nm archive_write_add_filter_zstd ,
 .Nm archive_write_add_filter_lzip ,
 .Nm archive_write_add_filter_lzma ,
 .Nm archive_write_add_filter_lzop ,
 .Nm archive_write_add_filter_none ,
 .Nm archive_write_add_filter_program ,
 .Nm archive_write_add_filter_uuencode ,
-.Nm archive_write_add_filter_xz
+.Nm archive_write_add_filter_xz ,
+.Nm archive_write_add_filter_zstd ,
 .Nd functions enabling output filters
 .Sh LIBRARY
 Streaming Archive Library (libarchive, -larchive)
@@ -64,8 +64,6 @@ Streaming Archive Library (libarchive, -larchive)
 .Ft int
 .Fn archive_write_add_filter_lz4 "struct archive *"
 .Ft int
-.Fn archive_write_add_filter_zstd "struct archive *"
-.Ft int
 .Fn archive_write_add_filter_lzip "struct archive *"
 .Ft int
 .Fn archive_write_add_filter_lzma "struct archive *"
@@ -79,6 +77,8 @@ Streaming Archive Library (libarchive, -larchive)
 .Fn archive_write_add_filter_uuencode "struct archive *"
 .Ft int
 .Fn archive_write_add_filter_xz "struct archive *"
+.Ft int
+.Fn archive_write_add_filter_zstd "struct archive *"
 .Sh DESCRIPTION
 .Bl -tag -width indent
 .It Xo
@@ -88,11 +88,11 @@ Streaming Archive Library (libarchive, -larchive)
 .Fn archive_write_add_filter_gzip ,
 .Fn archive_write_add_filter_lrzip ,
 .Fn archive_write_add_filter_lz4 ,
-.Fn archive_write_add_filter_zstd ,
 .Fn archive_write_add_filter_lzip ,
 .Fn archive_write_add_filter_lzma ,
 .Fn archive_write_add_filter_lzop ,
 .Fn archive_write_add_filter_xz ,
+.Fn archive_write_add_filter_zstd ,
 .Xc
 The resulting archive will be compressed as specified.
 Note that the compressed output is always properly blocked.
index 93bab3f0ab42bf389f293f2aff16272d64c5ee5c..3bc8b775263efa19753d91b55b9d113abdf5edc9 100644 (file)
@@ -54,7 +54,6 @@ IF(ENABLE_TEST)
     test_compat_gtar.c
     test_compat_gzip.c
     test_compat_lz4.c
-    test_compat_zstd.c
     test_compat_lzip.c
     test_compat_lzma.c
     test_compat_lzop.c
@@ -70,6 +69,7 @@ IF(ENABLE_TEST)
     test_compat_uudecode_large.c
     test_compat_xz.c
     test_compat_zip.c
+    test_compat_zstd.c
     test_empty_write.c
     test_entry.c
     test_entry_strmode.c
@@ -221,13 +221,13 @@ IF(ENABLE_TEST)
     test_write_filter_gzip_timestamp.c
     test_write_filter_lrzip.c
     test_write_filter_lz4.c
-    test_write_filter_zstd.c
     test_write_filter_lzip.c
     test_write_filter_lzma.c
     test_write_filter_lzop.c
     test_write_filter_program.c
     test_write_filter_uuencode.c
     test_write_filter_xz.c
+    test_write_filter_zstd.c
     test_write_format_7zip.c
     test_write_format_7zip_empty.c
     test_write_format_7zip_large.c
index f2ec2e7b035a89348207f0aa69e2fd139793f7b6..d962af92311b98ce143b94ec4cf3025f79eed3e8 100644 (file)
@@ -183,11 +183,6 @@ DEFINE_TEST(test_archive_write_add_filter_by_name_lz4)
        test_filter_by_name("lz4", ARCHIVE_FILTER_LZ4, canLz4);
 }
 
-DEFINE_TEST(test_archive_write_add_filter_by_name_zstd)
-{
-       test_filter_by_name("zstd", ARCHIVE_FILTER_ZSTD, canZstd);
-}
-
 DEFINE_TEST(test_archive_write_add_filter_by_name_lzip)
 {
        test_filter_by_name("lzip", ARCHIVE_FILTER_LZIP, cannot);
@@ -212,3 +207,8 @@ DEFINE_TEST(test_archive_write_add_filter_by_name_xz)
 {
        test_filter_by_name("xz", ARCHIVE_FILTER_XZ, cannot);
 }
+
+DEFINE_TEST(test_archive_write_add_filter_by_name_zstd)
+{
+       test_filter_by_name("zstd", ARCHIVE_FILTER_ZSTD, canZstd);
+}
index 1b9851f99bc6620647b2e6d479beef99366636d6..11dedbf9c26ab3f32ce4c782edb96ef8a40c75c2 100644 (file)
@@ -416,10 +416,10 @@ main(int argc, char **argv)
                        break;
                case OPTION_LRZIP:
                case OPTION_LZ4:
-               case OPTION_ZSTD:
                case OPTION_LZIP: /* GNU tar beginning with 1.23 */
                case OPTION_LZMA: /* GNU tar beginning with 1.20 */
                case OPTION_LZOP: /* GNU tar beginning with 1.21 */
+               case OPTION_ZSTD:
                        if (compression != '\0')
                                lafe_errc(1, 0,
                                    "Can't specify both -%c and -%c", opt,
@@ -428,10 +428,10 @@ main(int argc, char **argv)
                        switch (opt) {
                        case OPTION_LRZIP: compression_name = "lrzip"; break;
                        case OPTION_LZ4:  compression_name = "lz4"; break;
-                       case OPTION_ZSTD:  compression_name = "zstd"; break;
                        case OPTION_LZIP: compression_name = "lzip"; break;
                        case OPTION_LZMA: compression_name = "lzma"; break;
                        case OPTION_LZOP: compression_name = "lzop"; break;
+                       case OPTION_ZSTD: compression_name = "zstd"; break;
                        }
                        break;
                case 'm': /* SUSv2 */
index 304fb568b25c926a4dab82bcc448760a444a69d2..543a228c907234682342f99eb1b2d38abd67104e 100644 (file)
@@ -147,7 +147,6 @@ enum {
        OPTION_KEEP_NEWER_FILES,
        OPTION_LRZIP,
        OPTION_LZ4,
-       OPTION_ZSTD,
        OPTION_LZIP,
        OPTION_LZMA,
        OPTION_LZOP,
@@ -182,7 +181,8 @@ enum {
        OPTION_USE_COMPRESS_PROGRAM,
        OPTION_UUENCODE,
        OPTION_VERSION,
-       OPTION_XATTRS
+       OPTION_XATTRS,
+       OPTION_ZSTD,
 };
 
 int    bsdtar_getopt(struct bsdtar *);
index 23388db0651d791ef824c29ac2bed7acfc261513..66cf4c2d196f8ab5051a29ac2f54ed21bcefd791 100644 (file)
@@ -107,7 +107,6 @@ static const struct bsdtar_option {
        { "list",                 0, 't' },
        { "lrzip",                0, OPTION_LRZIP },
        { "lz4",                  0, OPTION_LZ4 },
-       { "zstd",                 0, OPTION_ZSTD },
        { "lzip",                 0, OPTION_LZIP },
        { "lzma",                 0, OPTION_LZMA },
        { "lzop",                 0, OPTION_LZOP },
@@ -161,6 +160,7 @@ static const struct bsdtar_option {
        { "version",              0, OPTION_VERSION },
        { "xattrs",               0, OPTION_XATTRS },
        { "xz",                   0, 'J' },
+       { "zstd",                 0, OPTION_ZSTD },
        { NULL, 0, 0 }
 };
 
index 42ce127e9e3310d4e8b7bdc3598b954d3c342d73..d3c4d215276ef6212b595b0fc41bbb64bf7159e8 100644 (file)
@@ -76,11 +76,11 @@ get_filter_code(const char *suffix)
                { ".lrz",       "lrzip" },
                { ".lz",        "lzip" },
                { ".lz4",       "lz4" },
-               { ".zst",       "zstd"},
                { ".lzo",       "lzop" },
                { ".lzma",      "lzma" },
                { ".uu",        "uuencode" },
                { ".xz",        "xz" },
+               { ".zst",       "zstd"},
                { NULL,         NULL }
        };
 
index fb9dfee748e2bfb08d30df9137a4169f855461d1..eacbabef1af018db48f7650e96ab6f56c409a5d4 100644 (file)
@@ -19,10 +19,10 @@ IF(ENABLE_TAR AND ENABLE_TEST)
     test_extract_tar_lrz.c
     test_extract_tar_lz.c
     test_extract_tar_lz4.c
-    test_extract_tar_zstd.c
     test_extract_tar_lzma.c
     test_extract_tar_lzo.c
     test_extract_tar_xz.c
+    test_extract_tar_zstd.c
     test_format_newc.c
     test_help.c
     test_leading_slash.c
@@ -47,7 +47,6 @@ IF(ENABLE_TAR AND ENABLE_TEST)
     test_option_keep_newer_files.c
     test_option_lrzip.c
     test_option_lz4.c
-    test_option_zstd.c
     test_option_lzma.c
     test_option_lzop.c
     test_option_n.c
@@ -63,6 +62,7 @@ IF(ENABLE_TAR AND ENABLE_TEST)
     test_option_xattrs.c
     test_option_xz.c
     test_option_z.c
+    test_option_zstd.c
     test_patterns.c
     test_print_longpath.c
     test_stdio.c