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

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 89bc6ed 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
  • src/buffer.c

    Submitted By: Jim Gifford <jim at cross-lfs dot org>
    Date: 2009-02-21
    Initial Package Version: 1.21
    Upstream Status: Unknown
    Origin: Jim Gifford
    Description: For using lzip compression
                 For using xz compression
    
    diff -Naur tar-1.21.orig/src/buffer.c tar-1.21/src/buffer.c
    old new  
    203203  ct_compress,
    204204  ct_gzip,
    205205  ct_bzip2,
     206  ct_lzip,
    206207  ct_lzma,
    207   ct_lzop
     208  ct_lzop,
     209  ct_xz
    208210};
    209211
    210212struct zip_magic
     
    219221static struct zip_magic const magic[] = {
    220222  { ct_tar },
    221223  { ct_none, },
    222   { ct_compress, 2, "\037\235", "compress", "-Z" },
    223   { ct_gzip,     2, "\037\213", "gzip", "-z"  },
    224   { ct_bzip2,    3, "BZh",      "bzip2", "-j" },
    225   { ct_lzma,     6, "\xFFLZMA", "lzma", "-J" }, /* FIXME: ???? */
    226   { ct_lzop,     4, "\211LZO",  "lzop", "--lzop" },
     224  { ct_compress, 2, "\037\235",     "compress", "-Z" },
     225  { ct_gzip,     2, "\037\213",     "gzip",     "-z"  },
     226  { ct_bzip2,    3, "BZh",          "bzip2",    "-j" },
     227  { ct_lzip,     4, "LZIP",         "lzip",     "--lzip" },
     228  { ct_lzma,     6, "\xFFLZMA",     "lzma",     "--lzma" },
     229  { ct_lzop,     4, "\211LZO",      "lzop",     "--lzop" },
     230  { ct_xz,       6, "\3757zXZ\x00", "xz",       "--xz" },
    227231};
    228232
    229233#define NMAGIC (sizeof(magic)/sizeof(magic[0]))
  • src/tar.c

    diff -Naur tar-1.21.orig/src/tar.c tar-1.21/src/tar.c
    old new  
    271271  IGNORE_FAILED_READ_OPTION,
    272272  INDEX_FILE_OPTION,
    273273  KEEP_NEWER_FILES_OPTION,
     274  LZIP_OPTION,
     275  LZMA_OPTION,
    274276  LZOP_OPTION,
    275277  MODE_OPTION,
    276278  MTIME_OPTION,
     
    328330  VERSION_OPTION,
    329331  VOLNO_FILE_OPTION,
    330332  WILDCARDS_MATCH_SLASH_OPTION,
    331   WILDCARDS_OPTION
     333  WILDCARDS_OPTION,
     334  XZ_OPTION
    332335};
    333336
    334337const char *argp_program_version = "tar (" PACKAGE_NAME ") " VERSION;
     
    606609  {"compress", 'Z', 0, 0,
    607610   N_("filter the archive through compress"), GRID+1 },
    608611  {"uncompress", 0, 0, OPTION_ALIAS, NULL, GRID+1 },
    609   {"lzma", 'J', 0, 0,
    610    N_("filter the archive through lzma"), GRID+1 },
     612  {"lzip", LZIP_OPTION, 0, 0,
     613   N_("filter the archive through lzip"), GRID+8 },
     614  {"lzma", LZMA_OPTION, 0, 0,
     615   N_("filter the archive through lzma"), GRID+8 },
    611616  {"lzop", LZOP_OPTION, 0, 0,
    612617   N_("filter the archive through lzop"), GRID+8 },
     618  {"xz", XZ_OPTION, 0, 0,
     619   N_("filter the archive through xz"), GRID+8 },
    613620  {"use-compress-program", USE_COMPRESS_PROGRAM_OPTION, N_("PROG"), 0,
    614621   N_("filter through PROG (must accept -d)"), GRID+1 },
    615622#undef GRID
     
    13741381      set_use_compress_program_option ("bzip2");
    13751382      break;
    13761383
    1377     case 'J':
    1378       set_use_compress_program_option ("lzma");
    1379       break;
    1380      
    13811384    case 'k':
    13821385      /* Don't replace existing files.  */
    13831386      old_files_option = KEEP_OLD_FILES;
     
    14091412      }
    14101413      break;
    14111414
     1415    case LZIP_OPTION:
     1416      set_use_compress_program_option ("lzip");
     1417      break;
     1418     
     1419    case LZMA_OPTION:
     1420      set_use_compress_program_option ("lzma");
     1421      break;
     1422
    14121423    case LZOP_OPTION:
    14131424      set_use_compress_program_option ("lzop");
    14141425      break;
     
    15621573        }
    15631574      break;
    15641575
     1576    case XZ_OPTION:
     1577      set_use_compress_program_option ("xz");
     1578      break;
     1579
    15651580    case 'z':
    15661581      set_use_compress_program_option ("gzip");
    15671582      break;
Note: See TracBrowser for help on using the repository browser.