source: patches/tar-1.21-new_compressors-1.patch@ e963bf3

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since e963bf3 was 89bc6ed, checked in by Jim Gifford <clfs@…>, 16 years ago

Added Patches to File, Man, Tar, and Texinfo to support XZ Utils - Patches

  • Property mode set to 100644
File size: 3.4 KB
RevLine 
[89bc6ed]1Submitted By: Jim Gifford <jim at cross-lfs dot org>
2Date: 2009-02-21
3Initial Package Version: 1.21
4Upstream Status: Unknown
5Origin: Jim Gifford
6Description: For using lzip compression
7 For using xz compression
8
9diff -Naur tar-1.21.orig/src/buffer.c tar-1.21/src/buffer.c
10--- tar-1.21.orig/src/buffer.c 2008-11-30 04:30:29.000000000 -0800
11+++ tar-1.21/src/buffer.c 2009-03-01 23:16:45.338493365 -0800
12@@ -203,8 +203,10 @@
13 ct_compress,
14 ct_gzip,
15 ct_bzip2,
16+ ct_lzip,
17 ct_lzma,
18- ct_lzop
19+ ct_lzop,
20+ ct_xz
21 };
22
23 struct zip_magic
24@@ -219,11 +221,13 @@
25 static struct zip_magic const magic[] = {
26 { ct_tar },
27 { ct_none, },
28- { ct_compress, 2, "\037\235", "compress", "-Z" },
29- { ct_gzip, 2, "\037\213", "gzip", "-z" },
30- { ct_bzip2, 3, "BZh", "bzip2", "-j" },
31- { ct_lzma, 6, "\xFFLZMA", "lzma", "-J" }, /* FIXME: ???? */
32- { ct_lzop, 4, "\211LZO", "lzop", "--lzop" },
33+ { ct_compress, 2, "\037\235", "compress", "-Z" },
34+ { ct_gzip, 2, "\037\213", "gzip", "-z" },
35+ { ct_bzip2, 3, "BZh", "bzip2", "-j" },
36+ { ct_lzip, 4, "LZIP", "lzip", "--lzip" },
37+ { ct_lzma, 6, "\xFFLZMA", "lzma", "--lzma" },
38+ { ct_lzop, 4, "\211LZO", "lzop", "--lzop" },
39+ { ct_xz, 6, "\3757zXZ\x00", "xz", "--xz" },
40 };
41
42 #define NMAGIC (sizeof(magic)/sizeof(magic[0]))
43diff -Naur tar-1.21.orig/src/tar.c tar-1.21/src/tar.c
44--- tar-1.21.orig/src/tar.c 2008-10-30 03:53:34.000000000 -0700
45+++ tar-1.21/src/tar.c 2009-03-01 23:16:23.361084789 -0800
46@@ -271,6 +271,8 @@
47 IGNORE_FAILED_READ_OPTION,
48 INDEX_FILE_OPTION,
49 KEEP_NEWER_FILES_OPTION,
50+ LZIP_OPTION,
51+ LZMA_OPTION,
52 LZOP_OPTION,
53 MODE_OPTION,
54 MTIME_OPTION,
55@@ -328,7 +330,8 @@
56 VERSION_OPTION,
57 VOLNO_FILE_OPTION,
58 WILDCARDS_MATCH_SLASH_OPTION,
59- WILDCARDS_OPTION
60+ WILDCARDS_OPTION,
61+ XZ_OPTION
62 };
63
64 const char *argp_program_version = "tar (" PACKAGE_NAME ") " VERSION;
65@@ -606,10 +609,14 @@
66 {"compress", 'Z', 0, 0,
67 N_("filter the archive through compress"), GRID+1 },
68 {"uncompress", 0, 0, OPTION_ALIAS, NULL, GRID+1 },
69- {"lzma", 'J', 0, 0,
70- N_("filter the archive through lzma"), GRID+1 },
71+ {"lzip", LZIP_OPTION, 0, 0,
72+ N_("filter the archive through lzip"), GRID+8 },
73+ {"lzma", LZMA_OPTION, 0, 0,
74+ N_("filter the archive through lzma"), GRID+8 },
75 {"lzop", LZOP_OPTION, 0, 0,
76 N_("filter the archive through lzop"), GRID+8 },
77+ {"xz", XZ_OPTION, 0, 0,
78+ N_("filter the archive through xz"), GRID+8 },
79 {"use-compress-program", USE_COMPRESS_PROGRAM_OPTION, N_("PROG"), 0,
80 N_("filter through PROG (must accept -d)"), GRID+1 },
81 #undef GRID
82@@ -1374,10 +1381,6 @@
83 set_use_compress_program_option ("bzip2");
84 break;
85
86- case 'J':
87- set_use_compress_program_option ("lzma");
88- break;
89-
90 case 'k':
91 /* Don't replace existing files. */
92 old_files_option = KEEP_OLD_FILES;
93@@ -1409,6 +1412,14 @@
94 }
95 break;
96
97+ case LZIP_OPTION:
98+ set_use_compress_program_option ("lzip");
99+ break;
100+
101+ case LZMA_OPTION:
102+ set_use_compress_program_option ("lzma");
103+ break;
104+
105 case LZOP_OPTION:
106 set_use_compress_program_option ("lzop");
107 break;
108@@ -1562,6 +1573,10 @@
109 }
110 break;
111
112+ case XZ_OPTION:
113+ set_use_compress_program_option ("xz");
114+ break;
115+
116 case 'z':
117 set_use_compress_program_option ("gzip");
118 break;
Note: See TracBrowser for help on using the repository browser.