* bootstrap.conf: Include size_max.
* gnulib.modules: Remove memset, rmdir. Replace strdup with
strdup-posix. Patch by Eric Blake.
* src/tar.c: Implement -I as a shorthand for --use-compress-program.
* doc/tar.texi: Document -I.
* tests/pipe.at, tests/shortrec.at: Account for eventual 'Record
size' output.
* tests/testsuite.at (AT_TAR_CHECK_HOOK): New define
(AT_TAR_WITH_HOOK, TAR_IGNREC_HOOK): New macros.
+2008-12-29 Sergey Poznyakoff <gray@gnu.org.ua>
+
+ * bootstrap.conf: Include size_max.
+ * gnulib.modules: Remove memset, rmdir. Replace strdup with
+ strdup-posix. Patch by Eric Blake.
+ * src/tar.c: Implement -I as a shorthand for --use-compress-program.
+ * doc/tar.texi: Document -I.
+ * tests/pipe.at, tests/shortrec.at: Account for eventual 'Record
+ size' output.
+ * tests/testsuite.at (AT_TAR_CHECK_HOOK): New define
+ (AT_TAR_WITH_HOOK, TAR_IGNREC_HOOK): New macros.
+
2008-11-30 Sergey Poznyakoff <gray@gnu.org.ua>
* src/xheader.c: Remove duplicate inclusion of fnmatch.h. Reported
# Bootstrap configuration.
-# Copyright (C) 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2007, 2008 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# includes them because of gettext dependencies.
avoided_gnulib_modules='
--avoid=lock
- --avoid=size_max
'
# gnulib modules used by this package.
m4/lcmessage.m4
m4/lock.m4
m4/printf-posix.m4
- m4/size_max.m4
m4/uintmax_t.m4
m4/ulonglong.m4
m4/visibility.m4
@opsummary{use-compress-program}
@item --use-compress-program=@var{prog}
+@itemx -I=@var{prog}
Instructs @command{tar} to access the archive through @var{prog}, which is
presumed to be a compression program of some sort. @xref{gzip}.
@opindex use-compress-program
@item --use-compress-program=@var{prog}
+@itemx -I=@var{prog}
Use external compression program @var{prog}. Use this option if you
have a compression program that @GNUTAR{} does not support. There
are two requirements to which @var{prog} should comply:
archive signed with your private key:
@smallexample
-$ @kbd{tar -cf foo.tar.gpgz --use-compress=gpgz .}
+$ @kbd{tar -cf foo.tar.gpgz -Igpgz .}
@end smallexample
@noindent
-Likewise, the following command will list its contents:
+Likewise, the command below will list its contents:
@smallexample
-$ @kbd{tar -tf foo.tar.gpgz --use-compress=gpgz .}
+$ @kbd{tar -tf foo.tar.gpgz -Igpgz .}
@end smallexample
@ignore
inttypes
lchown
localcharset
-memset
mkdtemp
modechange
obstack
quote
quotearg
-rmdir
rpmatch
safe-read
save-cwd
stdbool
stdint
stpcpy
-strdup
+strdup-posix
strerror
strtol
strtoul
TRANSFORM_OPTION,
UNQUOTE_OPTION,
USAGE_OPTION,
- USE_COMPRESS_PROGRAM_OPTION,
UTC_OPTION,
VERSION_OPTION,
VOLNO_FILE_OPTION,
/* NOTE:
- Available option letters are DEIQY and eqy. Consider the following
+ Available option letters are DEQY and eqy. Consider the following
assignments:
[For Solaris tar compatibility =/= Is it important at all?]
E use extended headers (--format=posix)
[q alias for --occurrence=1 =/= this would better be used for quiet?]
- [I same as T =/= will harm star compatibility]
y per-file gzip compression
Y per-block gzip compression */
N_("filter the archive through lzma"), GRID+1 },
{"lzop", LZOP_OPTION, 0, 0,
N_("filter the archive through lzop"), GRID+8 },
- {"use-compress-program", USE_COMPRESS_PROGRAM_OPTION, N_("PROG"), 0,
+ {"use-compress-program", 'I', N_("PROG"), 0,
N_("filter through PROG (must accept -d)"), GRID+1 },
#undef GRID
ignore_zeros_option = true;
break;
- case 'I':
- USAGE_ERROR ((0, 0,
- _("Warning: the -I option is not supported;"
- " perhaps you meant -j or -T?")));
- break;
-
case 'j':
set_use_compress_program_option ("bzip2");
break;
set_transform_expr (arg);
break;
- case USE_COMPRESS_PROGRAM_OPTION:
+ case 'I':
set_use_compress_program_option (arg);
break;
# Process this file with autom4te to create testsuite. -*- Autotest -*-
# Test suite for GNU tar.
-# Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
AT_KEYWORDS([pipe])
-AT_TAR_CHECK([
+AT_TAR_WITH_HOOK([TAR_IGNREC_HOOK],
+[AT_TAR_CHECK([
AT_SORT_PREREQ
mkdir directory
directory/file2
separator
separator
-])
+],
+[stderr])])
AT_CLEANUP
# Process this file with autom4te to create testsuite. -*- Autotest -*-
# Test suite for GNU tar.
-# Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2005, 2007, 2008 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# used to create the archive.
AT_SETUP([short records])
-AT_KEYWORDS([shortrec.at])
+AT_KEYWORDS([shortrec])
-AT_TAR_CHECK([
+AT_TAR_WITH_HOOK([TAR_IGNREC_HOOK],
+[AT_TAR_CHECK([
mkdir directory
(cd directory && touch a b c d e f g h i j k l m n o p q r)
-tar -c -b 1 -f - directory | tar -t -f - >/dev/null
+tar -c -b 1 -f - directory | tar -t -f -
tar -c -b 1 -f archive directory
-tar -t -f archive >/dev/null
-tar -t -f - < archive >/dev/null
+tar -t -f archive
+tar -t -f - < archive
rm -r directory
+],
+[0],
+[ignore],
+[stderr])
])
AT_CLEANUP
# Process this file with autom4te to create testsuite. -*- Autotest -*-
# Test suite for GNU tar.
-# Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# We need a recent Autotest.
m4_version_prereq([2.52g])
+m4_define([AT_TAR_CHECK_HOOK])
m4_define([AT_TAR_CHECK],[
AT_XFAIL_IF(test -f $[]XFAILFILE)
m4_foreach([FMT],
TAR_OPTIONS="-H FMT"
export TAR_OPTIONS
rm -rf *
-$1)],$2,$3,$4,$5,$6)])
+$1)],$2,$3,$4,$5,$6)
+ AT_TAR_CHECK_HOOK])
])
+m4_define([AT_TAR_WITH_HOOK],[
+ m4_pushdef([AT_TAR_CHECK_HOOK],[$1])
+ $2
+
+ m4_popdef([AT_TAR_CHECK_HOOK])])
+
+m4_define([TAR_IGNREC_HOOK],[
+ AT_CHECK([grep -v '^.*tar: Record size = ' stderr; exit 0])
+])
+
m4_define([RE_CHECK],[
AT_DATA([$1.re],[$2])
awk '{print NR " " $[]0}' $1 > $[]$.1