tar: remove trailing white space from source files

* ChangeLog.1, ChangeLog.CVS, Makefile.am, NEWS, README:
* README-hacking, directory, doc/Makefile.am, doc/dumpdir.texi:
* doc/gendocs_template, doc/intern.texi, doc/mastermenu.el:
* doc/snapshot.texi, doc/sparse.texi, doc/tar-snapshot-edit.texi:
* doc/value.texi, lib/Makefile.am, scripts/backup-specs:
* scripts/dump-remind.in, scripts/tar-snapshot-edit, scripts/tarcat:
* scripts/xsparse.c, src/arith.h, src/buffer.c, src/compare.c:
* src/create.c, src/delete.c, src/exit.c, src/suffix.c, src/tar.c:
* src/tar.h, src/update.c, src/warning.c, src/xheader.c:
* tests/append01.at, tests/append02.at, tests/atlocal.in:
* tests/delete03.at, tests/exclude.at, tests/exclude06.at:
* tests/extrac04.at, tests/extrac05.at, tests/extrac06.at:
* tests/extrac07.at, tests/filerem01.at, tests/filerem02.at:
* tests/incr01.at, tests/incr02.at, tests/incr03.at, tests/incr06.at:
* tests/label02.at, tests/label03.at, tests/label04.at:
* tests/label05.at, tests/link02.at, tests/link03.at:
* tests/listed01.at, tests/listed02.at, tests/long01.at:
* tests/longv7.at, tests/multiv01.at, tests/multiv02.at:
* tests/multiv03.at, tests/multiv05.at, tests/multiv06.at:
* tests/multiv07.at, tests/multiv08.at, tests/options.at:
* tests/options02.at, tests/remfiles03.at, tests/rename01.at:
* tests/rename02.at, tests/rename03.at, tests/rename04.at:
* tests/rename05.at, tests/same-order01.at, tests/same-order02.at:
* tests/shortfile.at, tests/shortupd.at, tests/sparse01.at:
* tests/sparse02.at, tests/sparsemv.at, tests/sparsemvp.at:
* tests/star/README, tests/star/gtarfail2.at:
* tests/star/multi-fail.at:
* tests/star/pax-big-10g.at, tests/star/quicktest.sh:
* tests/star/ustar-big-2g.at, tests/star/ustar-big-8g.at:
* tests/update01.at, tests/update02.at, tests/volsize.at:
* tests/volume.at:
Remove trailing spaces and tabs from lines, and remove
trailing empty lines from files.  This makes it a bit easier
to share code among coreutils and other projects that do this.
This commit is contained in:
Paul Eggert
2010-08-19 15:49:39 -07:00
parent 0a694a16e5
commit 0ab5e64ac0
94 changed files with 199 additions and 275 deletions

View File

@@ -1,4 +1,4 @@
Currently there is just one ChangeLog file for tar, but
Currently there is just one ChangeLog file for tar, but
there used to be separate ChangeLog files for each subdirectory.
This file records what used to be in those separate files.

View File

@@ -5,7 +5,7 @@
2009-03-04 Sergey Poznyakoff <gray@gnu.org.ua>
Add xz support.
* src/buffer.c, src/suffix.c: Add support for xz compression.
* src/tar.c: New option --xz, for compression/decompression using xz.
Re-assign -J as a short equivalent of --xz.
@@ -34,8 +34,8 @@
2008-11-25 Sergey Poznyakoff <gray@gnu.org.ua>
Do not try to drain the input pipe before closing the
archive.
archive.
* src/buffer.c (close_archive): Remove call to
sys_drain_input_pipe. Pass hit_eof as the second
argument to sys_wait_for_child.
@@ -63,7 +63,7 @@
* src/extract.c (extract_link, extract_symlink): Remove calls to
transform_member_name. It is done in read_header.
* src/list.c (decode_xform): Reflect change in data type of 2nd
argument.
argument.
(transform_member_name): 2nd arg is int.
(decode_header): Transform file name and link target names.
* src/tar.c: Remove --transform-symlinks.
@@ -73,7 +73,7 @@
set global flags using `flags=' syntax.
(_transform_name_to_obstack, transform_name_fp)
(transform_name): Take an additional argument, specifying scope
flags.
flags.
2008-10-19 Sergey Poznyakoff <gray@gnu.org.ua>
@@ -86,7 +86,7 @@
* tests/sparsemvp.at: Likewise.
* tests/volsize.at: Likewise.
* NEWS: Update.
2008-10-16 Sergey Poznyakoff <gray@gnu.org.ua>
* src/common.h (transform_symlinks_option): New global.
@@ -99,11 +99,11 @@
* doc/tar.texi: Document --transform-symlinks
* NEWS: Update.
* THANKS: Update.
* src/names.c (name_gather): Use xzalloc.
* src/buffer.c (short_read): Move record size detection before
the loop.
2008-10-07 Sergey Poznyakoff <gray@gnu.org.ua>
* src/tar.c (options): Add --lzop option.
@@ -111,7 +111,7 @@
2008-10-05 Xavier Hienne <xavier.hienne@free.fr> (tiny change)
* src/checkpoint.c (checkpoint_compile_action): Add missing
`else'.
`else'.
2008-09-24 Sergey Poznyakoff <gray@gnu.org.ua>
@@ -157,7 +157,7 @@
* tests/atlocal.in (decho): New function.
* tests/multiv06.at: Use decho instead of echo2.
* tests/incremental.at: Raise wait interval to 2 seconds.
2008-07-24 Sergey Poznyakoff <gray@gnu.org.ua>
* src/tar.c (decode_options): Do not allow volume length less
@@ -193,21 +193,21 @@
tests/longv7.at, tests/lustar01.at, tests/lustar02.at,
tests/shortfile.at: Update to match new diagnostic wording
(see 2008-05-06).
* NEWS: Update.
2008-06-14 Sergey Poznyakoff <gray@gnu.org.ua>
* doc/tar.texi (exclude): Document support for new VCS.
* THANKS: Update.
* NEWS: Update.
* NEWS: Update.
* tests/multiv05.at: Fix typos.
* tests/volsize.at: Remove a TZ dependency.
2008-06-14 Dan Drake <dan@dandrake.org> (tiny change)
* src/tar.c (exclude_vcs_files): Support for Bazaar, Mercurial and
Darcs.
Darcs.
2008-05-06 Sergey Poznyakoff <gray@gnu.org.ua>
@@ -231,23 +231,23 @@
* tests/incr03.at, tests/incr04.at, tests/rename02.at,
tests/rename03.at: Insert calls to sleep between creation of files
and adding them to the archive.
2008-03-31 Sergey Poznyakoff <gray@gnu.org.ua>
* src/create.c (dump_file0): Count links only for actually dumped
files.
files.
2008-03-27 Sergey Poznyakoff <gray@gnu.org.ua>
* NEWS: Document --no-check-device and --check-device.
* doc/rendition.texi: Change the way FIXME-*refs are handled in
!PROOF.
!PROOF.
* doc/intern.texi, doc/tar.texi: Update.
* doc/untabify.el: New file.
* doc/Makefile.am (EXTRA_DIST): Add untabify.el
(untabify, final, check-format, check-refs, check-fixmes)
(check-unrevised, all-check-docs, check-docs): New rules.
* src/common.h (check_device_option): New global.
* src/incremen.c (procdir): Use boolean and instead of bitwise
one. Patch by Jean-Louis Martineau.
@@ -256,7 +256,7 @@
--check-device. Proposed by Jean-Louis Martineau.
(parse_opt): Hanlde new options.
(decode_options): Initialize check_device_option to true.
* THANKS: Update
2008-03-06 Sergey Poznyakoff <gray@gnu.org.ua>
@@ -267,7 +267,7 @@
* po/.cvsignore: Update
* src/system.c: Remove include setenv.h.
* tests/atlocal.in (STAR_DATA_URL): Update.
* tests/star/README: Update URL.
* tests/star/README: Update URL.
2008-02-09 Sergey Poznyakoff <gray@gnu.org.ua>
@@ -303,7 +303,7 @@
Exit with nonzero status if a close fails on an archive.
Problem (and initial trivial fix)
* src/buffer.c (close_archive, new_volume): close_error, not
close_warn.
close_warn.
2007-12-05 Sergey Poznyakoff <gray@gnu.org.ua>

View File

@@ -22,7 +22,7 @@ ACLOCAL_AMFLAGS = -I m4
EXTRA_DIST = ChangeLog.1 Make.rules
SUBDIRS = doc gnu lib rmt src scripts po tests
dist-hook:
dist-hook:
$(MAKE) changelog_dir=$(distdir) ChangeLog
-rm -f $(distdir).cpio
find $(distdir) | cpio -Hcrc -o | \
@@ -36,5 +36,3 @@ include Make.rules
gen_start_date = 2009-03-06
prev_change_log = ChangeLog.CVS
changelog_dir = .

20
NEWS
View File

@@ -46,12 +46,12 @@ update of an archive:
tar -rf archive --label 'My volume' .
This did not work in previous versions, in spite of what the docs said.
This did not work in previous versions, in spite of what the docs said.
** --record-size and --tape-length (-L) options
Usual size suffixes are allowed for these options. For example,
-L10k stands for a 10 kilobyte tape length.
-L10k stands for a 10 kilobyte tape length.
** Fix dead loop on extracting existing symlinks with the -k option.
@@ -134,7 +134,7 @@ the Epoch or a `Time reference' (see below).
* Time references in --pax-option argument.
Any value from the --pax-option argument that is enclosed in a pair
of curly braces represents a time reference. The string between the
of curly braces represents a time reference. The string between the
braces is understood either as a textual time representation, as described in
chapter 7, "Date input formats", of the Tar manual, or as a name of
an existing file, starting with `/' or `.'. In the latter
@@ -168,14 +168,14 @@ version 1.22 - Sergey Poznyakoff, 2009-03-05
* Support for xz compression
Tar uses xz for compression if one of the following conditions is met:
Tar uses xz for compression if one of the following conditions is met:
1. The option --xz or -J (see below) is used.
2. The xz binary is set as compressor using --use-compress-program option.
3. The file name of the archive being created ends in `.xz' and
auto-compress option (-a) is used.
Xz is used for decompression if one of the following conditions is met:
Xz is used for decompression if one of the following conditions is met:
1. The option --xz or -J is used.
2. The xz binary is set as compressor using --use-compress-program option.
@@ -228,7 +228,7 @@ control type of archive members affected by them. The flags are:
- s
Apply transformation to symbolic link targets.
- h
- h
Apply transformation to hard link targets.
Corresponding upper-case letters negate the meaning, so that
@@ -307,7 +307,7 @@ during both creation and extraction. Tar 1.19 used them only
during extraction.
For a detailed description, see chapter 6.7 "Modifying File and Member
Names".
Names".
* Info (end-of-volume) scripts
@@ -334,8 +334,8 @@ control systems, e.g. "CVS/", ".svn/", etc.
The following options now work with incremental archives as well:
--exclude-caches
--exclude-caches-all
--exclude-caches
--exclude-caches-all
--exclude-tag
--exclude-tag-all
--exclude-tag-under
@@ -346,7 +346,7 @@ Previous versions always stored absolute file names in rename
records, even if -P was not used. This is fixed: rename records
contain file names processed in accordance with the command line
settings.
* Fix --version output.
* Recognition of broken archives.

7
README
View File

@@ -180,19 +180,19 @@ the `lchown' call will be used if available, but that's all.
GNU `tar' is able to create archive in the following formats:
*** The format of UNIX version 7
*** POSIX.1-1988 format, also known as "ustar format"
*** POSIX.1-1988 format, also known as "ustar format"
*** POSIX.1-2001 format, also known as "pax format"
*** Old GNU format (described below)
In addition to those, GNU `tar' is also able to read archives
produced by `star' archiver.
produced by `star' archiver.
A so called `Old GNU' format is based on an early draft of the
POSIX 1003.1 `ustar' standard which is different from the final
standard. It defines its extensions (such as incremental backups
and handling of the long file names) in a way incompatible with
any existing tar archive format, therefore the use of old GNU
format is strongly discouraged.
format is strongly discouraged.
Please read the file NEWS for more information about POSIX compliance
and new `tar' features.
@@ -248,4 +248,3 @@ mode: outline
paragraph-separate: "[ ]*$"
version-control: never
End:

View File

@@ -6,20 +6,20 @@ this package.
You need the following packages to build the Git version of GNU
tar. We do not make any efforts to accommodate older versions of
these packages, so please make sure that you have the latest stable
version.
version.
- Automake <http://www.gnu.org/software/automake/>
- Autoconf <http://www.gnu.org/software/autoconf/>
- M4 <http://www.gnu.org/software/m4/>
- Texinfo <http://www.gnu.org/software/texinfo>
- Gnulib <http://www.gnu.org/software/gnulib>
- Gnulib <http://www.gnu.org/software/gnulib>
- Git <http://git.or.cz>
* Bootstrapping
Obviously, if you are reading these notes, you did manage to clone
tar from Git. The next step is to get other files needed to build,
which are extracted from other source packages:
which are extracted from other source packages:
1. Change to the source tree directory
@@ -27,7 +27,7 @@ which are extracted from other source packages:
2. Run
./bootstrap
./bootstrap
Once done, proceed as described in the file README (section
INSTALLATION).
@@ -43,7 +43,7 @@ contents:
Replace `$HOME/gnulib' with the actual directory where the Gnulib
sources reside.
For more information about `bootstrap', run `bootstrap --help'.
@@ -67,5 +67,3 @@ mode: outline
paragraph-separate: "[ ^L]*$"
version-control: never
End:

View File

@@ -65,7 +65,7 @@ programs (using pipes); tar can even access remote devices or files
%%contributors: Jay Fenlason,
Joy Kendall,
Francois Pinard <pinard@iro.umontreal.ca>
%%source-tarball: ftp://ftp.gnu.org/pub/gnu/tar/tar-1.15.1.tar.gz
%%source-info: http://savannah.gnu.org/projects/tar
@@ -84,4 +84,3 @@ programs (using pipes); tar can even access remote devices or files
%%bug-list: bug-tar@gnu.org bug-tar@gnu.org http://mail.gnu.org/mailman/listinfo/bug-tar
%%entry-written-by: Sergey Poznyakoff <gray@gnu.org>

View File

@@ -124,7 +124,7 @@ check-unrevised:
all-check-docs: check-format check-options check-refs check-fixmes check-unrevised
check-docs:
check-docs:
$(MAKE) -k all-check-docs
#
@@ -144,4 +144,3 @@ manual:
MAKEINFO="$(MAKEINFO) $(MAKEINFOFLAGS)" \
TEXI2DVI="$(TEXI2DVI) -t @finalout" \
$(GENDOCS) --texi2html tar 'GNU tar manual'

View File

@@ -16,7 +16,7 @@ dumped directory in special data blocks called @dfn{dumpdirs}.
@noindent
where @var{C} is one of the @dfn{control codes} described below,
@var{filename} is the name of the file @var{C} operates upon, and
@samp{\0} represents a nul character (ASCII 0). The white space
@samp{\0} represents a nul character (ASCII 0). The white space
characters were added for readability, real dumpdirs do not contain
them.
@@ -68,7 +68,7 @@ directory}. For example, consider the following scenario:
@enumerate 1
@item
Previous run dumped a directory @file{foo} which contained the
following three directories:
following three directories:
@smallexample
a
@@ -93,7 +93,7 @@ New incremental dump was made.
renaming @file{a} to @file{b} will destroy the existing directory.
To correctly process it, @GNUTAR{} needs a temporary directory, so
it creates the following dumpdir (newlines have been added for
readability):
readability):
@smallexample
@group
@@ -114,7 +114,7 @@ work as usual, and, finally, the last command, @samp{R\0Tfoo/a\0}
tells tar to rename the temporary directory to @file{foo/a}.
The exact placement of a dumpdir in the archive depends on the
archive format (@pxref{Formats}):
archive format (@pxref{Formats}):
@itemize
@item PAX archives

View File

@@ -36,7 +36,7 @@
<p>The manual for %%PACKAGE%% is available in the following formats:</p>
<ul>
<li><a href="%%PACKAGE%%.html">HTML
<li><a href="%%PACKAGE%%.html">HTML
(%%HTML_MONO_SIZE%%K bytes)</a> - entirely on one web page.</li>
<li><a href="html_node/index.html">HTML</a> - with one web page per
node.</li>
@@ -49,7 +49,7 @@
chapter.</li>
%%ENDIF HTML_CHAPTER%%
<li><a href="%%PACKAGE%%.html.gz">HTML compressed
(%%HTML_MONO_GZ_SIZE%%K gzipped characters)</a> - entirely on
(%%HTML_MONO_GZ_SIZE%%K gzipped characters)</a> - entirely on
one web page.</li>
<li><a href="%%PACKAGE%%.html_node.tar.gz">HTML compressed
(%%HTML_NODE_TGZ_SIZE%%K gzipped tar file)</a> -
@@ -96,9 +96,9 @@ Return to the <a href="/home.html">GNU Project home page</a>.
</p>
<p>
Please send FSF &amp; GNU inquiries to
Please send FSF &amp; GNU inquiries to
<a href="mailto:gnu@gnu.org"><em>gnu@gnu.org</em></a>.
There are also <a href="/home.html#ContactInfo">other ways to contact</a>
There are also <a href="/home.html#ContactInfo">other ways to contact</a>
the FSF.
<br />
Please send broken links and other corrections (or suggestions) to

View File

@@ -107,10 +107,10 @@ group permission could be copied from the @emph{other} permission.
The @code{uid} and @code{gid} fields are the numeric user and group
@acronym{ID} of the file owners, respectively. If the operating system does
not support numeric user or group @acronym{ID}s, these fields should
be ignored.
be ignored.
The @code{size} field is the size of the file in bytes; linked files
are archived with this field specified as zero.
are archived with this field specified as zero.
The @code{mtime} field is the data modification time of the file at
the time it was archived. It is the ASCII representation of the octal
@@ -330,4 +330,3 @@ checksum error.
@node Dumpdir
@unnumberedsec Dumpdir
@include dumpdir.texi

View File

@@ -27,11 +27,11 @@
;; This file redefines texinfo-master-menu-list so that it takes into
;; account included files.
;; Known bugs: @menu without previous sectioning command will inherit
;; Known bugs: @menu without previous sectioning command will inherit
;; documentation string from the previous menu. However, since such a
;; menu is illegal in a texinfo file, we can live with it.
(require 'texinfo)
(require 'texinfo)
(require 'texnfo-upd)
(defun texinfo-master-menu-list-recursive (title)

View File

@@ -137,4 +137,3 @@ previous versions it is not quoted;
@end enumerate
@c End of snapshot.texi

View File

@@ -232,4 +232,3 @@ into a separate directory. Then, using a simple program it would be
possible to expand the file to its original form even without @GNUTAR{}.
@xref{Sparse Recovery}, for the detailed information on how to extract
sparse members without @GNUTAR{}.

View File

@@ -55,4 +55,3 @@ file version 2
$ @kbd{tar-snapshot-edit -b -r 0x0306-0x4500 /var/backup/snap.a}
file version 2
@end smallexample

View File

@@ -18,5 +18,3 @@
@end ifclear
@xopindex{\option\, summary}
@end macro

View File

@@ -26,7 +26,7 @@ rmt-command.h : Makefile
$(AM_V_at)mv $@-t $@
BUILT_SOURCES = rmt-command.h
CLEANFILES = rmt-command.h rmt-command.h-t
INCLUDES = -I$(top_srcdir)/gnu -I../ -I../gnu
INCLUDES = -I$(top_srcdir)/gnu -I../ -I../gnu
noinst_HEADERS = system.h system-ioctl.h rmt.h paxlib.h stdopen.h
libtar_a_SOURCES = \
@@ -36,4 +36,3 @@ libtar_a_SOURCES = \
rmt.h \
stdopen.c stdopen.h \
system.h system-ioctl.h

View File

@@ -65,9 +65,9 @@ XLIST=exclude_files
SLEEP_TIME=15
# Script to be run when it's time to insert a new tape in for the next
# volume. Administrators may want to tailor this script for their site.
# volume. Administrators may want to tailor this script for their site.
# If this variable isn't set, tar will use some default behavior which is
# probably defined in the manual.
# probably defined in the manual.
#DUMP_REMIND_SCRIPT='rsh apple-gunkies /home/gd2/dump/dump-remind'
# Message to display on the terminal while waiting for dump time. Usually
@@ -75,7 +75,7 @@ SLEEP_TIME=15
# entertaining than this. The awk script here saves some redundant
# repetition, but is not really all that desirable.
SLEEP_MESSAGE="`awk '
BEGIN {
BEGIN {
for (i = 0; i < 30; i++)
print \" \" \
\"D O N O T T O U C H T H I S T E R M I N A L !!!!!\"

View File

@@ -2,14 +2,14 @@
# This file is included in the GNU tar distribution as an example. It is
# not used by default unless the proper line is uncommented in backup-specs.
# System administrators will probably want to customize this and
# backup-specs for their site.
# backup-specs for their site.
#
# This script should be run by tar with --info-script (-F) to inform
# interested parties that a tape for the next volume of the backup needs to
# be put in the tape drive.
# be put in the tape drive.
#
# Include location of `sendmail' and GNU finger.
# Include location of `sendmail' and GNU finger.
PATH="/usr/lib:/usr/local/gnubin:${PATH}"
export PATH
@@ -27,7 +27,7 @@ MT_OFFLINE
#
# Certain users (like `root') aren't real users, and shouldn't be notified.
# Neither should `zippy', `elvis', etc. (on the GNU machines) since they're
# just test accounts.
# just test accounts.
recipients="`
finger .clients 2> /dev/null \
| sed -ne '
@@ -69,8 +69,8 @@ Cc: ${ADMINISTRATOR}
Subject: Backup needs new tape for volume ${TAR_VOLUME}
Reply-To: ${ADMINISTRATOR}
This is an automated report from the backup script running on
`hostname`.
This is an automated report from the backup script running on
`hostname`.
Volume ${TAR_VOLUME} of the backup needs to be put in the tape drive.
Usually whoever prepared the backup leaves labeled tapes on top of the
@@ -92,8 +92,8 @@ Cc: ${ADMINISTRATOR}
Subject: Volume ${TAR_VOLUME} for backup has been added
Reply-To: ${ADMINISTRATOR}
This is an automated report from the backup script running on
`hostname`.
This is an automated report from the backup script running on
`hostname`.
The backup has been continued, so for now no further attention is required.
__EOF__

View File

@@ -211,7 +211,7 @@ sub write_incr_db ($$) {
sub write_incr_db_0 ($$) {
my $info = shift;
my $file = shift;
my $timestamp_sec = $info->[1];
print $file "$timestamp_sec\n";
@@ -226,7 +226,7 @@ sub write_incr_db_0 ($$) {
sub write_incr_db_1 ($$) {
my $info = shift;
my $file = shift;
print $file "GNU tar-1.15-1\n";
my $timestamp_sec = $info->[1];
@@ -246,7 +246,7 @@ sub write_incr_db_1 ($$) {
sub write_incr_db_2 ($$) {
my $info = shift;
my $file = shift;
print $file "GNU tar-1.16-2\n";
my $timestamp_sec = $info->[1];

View File

@@ -35,8 +35,7 @@ do
fi
if [ "$T" = "M" ]; then
SKIP=$(($SKIP + 1))
fi
fi
fi
dd skip=$SKIP if="$f"
dd skip=$SKIP if="$f"
done

View File

@@ -4,7 +4,7 @@
Copyright (C) 2006, 2007 Free Software Foundation, Inc.
Written by Sergey Poznyakoff
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 the
Free Software Foundation; either version 3, or (at your option) any later
@@ -129,12 +129,12 @@ get_var (FILE *fp, char **name, char **value)
static char *buffer;
static size_t bufsize = OFF_T_STRSIZE_BOUND;
char *p, *q;
buffer = emalloc (bufsize);
do
{
size_t len, s;
if (!fgets (buffer, bufsize, fp))
return 0;
len = strlen (buffer);
@@ -186,12 +186,12 @@ read_xheader (char *name)
if (verbose)
printf ("Reading extended header file\n");
while (get_var (fp, &kw, &val))
{
if (verbose)
printf ("Found variable GNU.sparse.%s = %s\n", kw, val);
if (expect && strcmp (kw, expect))
die (1, "bad keyword sequence: expected `%s' but found `%s'",
expect, kw);
@@ -267,7 +267,7 @@ read_map (FILE *ifp)
if (verbose)
printf ("Reading v.1.0 sparse map\n");
get_line (nbuf, sizeof nbuf, ifp);
sparse_map_size = string_to_size (nbuf, NULL);
sparse_map = emalloc (sparse_map_size * sizeof *sparse_map);
@@ -282,7 +282,7 @@ read_map (FILE *ifp)
fseeko (ifp, ((ftell (ifp) + BLOCKSIZE - 1) / BLOCKSIZE) * BLOCKSIZE,
SEEK_SET);
}
}
void
expand_sparse (FILE *sfp, int ofd)
@@ -294,11 +294,11 @@ expand_sparse (FILE *sfp, int ofd)
for (i = 0; i < sparse_map_size; i++)
if (maxbytes < sparse_map[i].numbytes)
maxbytes = sparse_map[i].numbytes;
for (buffer = malloc (maxbytes); !buffer; maxbytes /= 2)
if (maxbytes == 0)
die (1, "not enough memory");
for (i = 0; i < sparse_map_size; i++)
{
size_t size = sparse_map[i].numbytes;
@@ -342,13 +342,13 @@ guess_outname (char *name)
{
char *p;
char *s;
if (name[0] == '.' && name[1] == '/')
name += 2;
p = name + strlen (name) - 1;
s = NULL;
for (; p > name && *p != '/'; p--)
;
if (*p == '/')
@@ -358,7 +358,7 @@ guess_outname (char *name)
for (p--; p > name && *p != '/'; p--)
;
}
if (*p != '/')
{
if (s)
@@ -389,7 +389,7 @@ main (int argc, char **argv)
FILE *ifp;
struct stat st;
int ofd;
progname = argv[0];
while ((c = getopt (argc, argv, "hnvx:")) != EOF)
{
@@ -408,7 +408,7 @@ main (int argc, char **argv)
case 'v':
verbose++;
break;
default:
exit (1);
}
@@ -429,17 +429,17 @@ main (int argc, char **argv)
if (stat (inname, &st))
die (1, "cannot stat %s (%d)", inname, errno);
ifp = fopen (inname, "r");
if (ifp == NULL)
die (1, "cannot open file %s (%d)", inname, errno);
if (!xheader_file || version_major == 1)
read_map (ifp);
if (!outname)
guess_outname (inname);
ofd = open (outname, O_RDWR|O_CREAT|O_TRUNC, st.st_mode);
if (ofd == -1)
die (1, "cannot open file %s (%d)", outname, errno);
@@ -452,7 +452,7 @@ main (int argc, char **argv)
printf ("Finished dry run\n");
return 0;
}
expand_sparse (ifp, ofd);
fclose (ifp);
@@ -460,7 +460,7 @@ main (int argc, char **argv)
if (verbose)
printf ("Done\n");
if (outsize)
{
if (stat (outname, &st))
@@ -468,7 +468,6 @@ main (int argc, char **argv)
if (st.st_size != outsize)
die (1, "expanded file has wrong size");
}
return 0;
}

View File

@@ -22,6 +22,6 @@
blocked in 1 kB boundaries. We'll need arbitrary precision
arithmetic anyway once we get into the 2**64 range, so there's no
point doing anything fancy before then. */
#define TARLONG_FORMAT "%.0f"
typedef double tarlong;

View File

@@ -76,7 +76,7 @@ static bool read_full_records = false;
/* We're reading, but we just read the last block and it's time to update.
Declared in update.c
FIXME: Either eliminate it or move it to common.h.
*/
extern bool time_to_start_writing;
@@ -152,7 +152,7 @@ static struct bufmap *
bufmap_locate (size_t off)
{
struct bufmap *map;
for (map = bufmap_head; map; map = map->next)
{
if (!map->next
@@ -576,7 +576,7 @@ _open_archive (enum access_mode wanted_access)
FATAL_ERROR ((0, 0, _("No archive name given")));
tar_stat_destroy (&current_stat_info);
record_index = 0;
init_buffer ();
@@ -749,7 +749,7 @@ _flush_write (void)
map = map->next;
bufmap_reset (map, map ? (- map->start) : 0);
}
}
}
return status;
}
@@ -1771,7 +1771,7 @@ _gnu_flush_write (size_t buffer_level)
size_t copy_size;
size_t bufsize;
struct bufmap *map;
status = _flush_write ();
if (status != record_size && !multi_volume_option)
archive_write_error (status);
@@ -1788,7 +1788,7 @@ _gnu_flush_write (size_t buffer_level)
}
map = bufmap_locate (status);
if (status % BLOCKSIZE)
{
ERROR ((0, 0, _("write did not end on a block boundary")));
@@ -1811,13 +1811,13 @@ _gnu_flush_write (size_t buffer_level)
copy_ptr = record_start->buffer + status;
copy_size = buffer_level - status;
/* Switch to the next buffer */
record_index = !record_index;
init_buffer ();
inhibit_map = 1;
if (volume_label_option)
add_volume_label ();

View File

@@ -331,7 +331,7 @@ static int
dumpdir_cmp (const char *a, const char *b)
{
size_t len;
while (*a)
switch (*a)
{
@@ -345,7 +345,7 @@ dumpdir_cmp (const char *a, const char *b)
a += len;
b += len;
break;
case 'D':
if (strcmp(a, b))
return 1;
@@ -353,7 +353,7 @@ dumpdir_cmp (const char *a, const char *b)
a += len;
b += len;
break;
case 'R':
case 'T':
case 'X':
@@ -577,8 +577,8 @@ verify_volume (void)
flush_read ();
while (1)
{
enum read_header status = read_header (&current_header,
&current_stat_info,
enum read_header status = read_header (&current_header,
&current_stat_info,
read_header_auto);
if (status == HEADER_FAILURE)
@@ -608,7 +608,7 @@ verify_volume (void)
{
char buf[UINTMAX_STRSIZE_BOUND];
status = read_header (&current_header, &current_stat_info,
status = read_header (&current_header, &current_stat_info,
read_header_auto);
if (status == HEADER_ZERO_BLOCK)
break;
@@ -617,7 +617,7 @@ verify_volume (void)
STRINGIFY_BIGINT (current_block_ordinal (), buf)));
}
}
diff_archive ();
tar_stat_destroy (&current_stat_info);
}

View File

@@ -71,7 +71,7 @@ exclusion_tag_warning (const char *dirname, const char *tagname,
message));
}
enum exclusion_tag_type
enum exclusion_tag_type
check_exclusion_tags (const char *dirname, const char **tag_file_name)
{
static char *tagname;
@@ -80,7 +80,7 @@ check_exclusion_tags (const char *dirname, const char **tag_file_name)
size_t dlen = strlen (dirname);
int addslash = !ISSLASH (dirname[dlen-1]);
size_t noff = 0;
for (tag = exclusion_tags; tag; tag = tag->next)
{
size_t size = dlen + addslash + tag->length + 1;
@@ -263,7 +263,7 @@ to_chars_subst (int negative, int gnu_format, uintmax_t value, size_t valsize,
1. In OLDGNU_FORMAT all strings in a tar header end in \0
2. Incremental archives use oldgnu_header.
Apart from this they are completely identical. */
uintmax_t s = (negsub &= archive_format == GNU_FORMAT) ? - sub : sub;
char subbuf[UINTMAX_STRSIZE_BOUND + 1];
@@ -618,7 +618,7 @@ write_ustar_long_name (const char *name)
size_t length = strlen (name);
size_t i, nlen;
union block *header;
if (length > PREFIX_FIELD_SIZE + NAME_FIELD_SIZE + 1)
{
ERROR ((0, 0, _("%s: file name is too long (max %d); not dumped"),
@@ -713,7 +713,7 @@ write_extended (bool global, struct tar_stat_info *st, union block *old_header)
char *p;
int type;
time_t t;
if (st->xhdr.buffer || st->xhdr.stk == NULL)
return old_header;
@@ -1041,7 +1041,7 @@ dump_regular_file (int fd, struct tar_stat_info *st)
while (size_left > 0)
{
size_t bufsize, count;
blk = find_next_block ();
bufsize = available_space_after (blk);
@@ -1077,7 +1077,7 @@ dump_regular_file (int fd, struct tar_stat_info *st)
size_left),
quotearg_colon (st->orig_file_name),
STRINGIFY_BIGINT (size_left, buf)));
if (! ignore_failed_read_option)
if (! ignore_failed_read_option)
set_exit_status (TAREXIT_DIFFERS);
pad_archive (size_left - (bufsize - count));
return dump_status_short;
@@ -1126,7 +1126,7 @@ dump_dir0 (char *directory,
size_t bufsize;
ssize_t count;
const char *buffer, *p_buffer;
block_ordinal = current_block_ordinal ();
buffer = safe_directory_contents (gnu_list_name->directory);
totsize = dumpdir_size (buffer);
@@ -1134,7 +1134,7 @@ dump_dir0 (char *directory,
finish_header (st, blk, block_ordinal);
p_buffer = buffer;
size_left = totsize;
mv_begin_write (st->file_name, totsize, totsize);
while (size_left > 0)
{
@@ -1173,13 +1173,13 @@ dump_dir0 (char *directory,
{
char *name_buf;
size_t name_size;
switch (check_exclusion_tags (st->orig_file_name, &tag_file_name))
{
case exclusion_tag_all:
/* Handled in dump_file0 */
break;
case exclusion_tag_none:
{
char const *entry;
@@ -1203,7 +1203,7 @@ dump_dir0 (char *directory,
if (!excluded_name (name_buf))
dump_file (name_buf, false, our_device);
}
free (name_buf);
}
break;
@@ -1218,7 +1218,7 @@ dump_dir0 (char *directory,
dump_file (name_buf, false, our_device);
free (name_buf);
break;
case exclusion_tag_under:
exclusion_tag_warning (st->orig_file_name, tag_file_name,
_("contents not dumped"));
@@ -1427,7 +1427,7 @@ file_count_links (struct tar_stat_info *st)
assign_string (&linkname, st->orig_file_name);
transform_name (&linkname, XFORM_LINK);
lp = xmalloc (offsetof (struct link, name)
+ strlen (linkname) + 1);
lp->ino = st->stat.st_ino;
@@ -1435,13 +1435,13 @@ file_count_links (struct tar_stat_info *st)
lp->nlink = st->stat.st_nlink;
strcpy (lp->name, linkname);
free (linkname);
if (! ((link_table
|| (link_table = hash_initialize (0, 0, hash_link,
compare_links, 0)))
&& (duplicate = hash_insert (link_table, lp))))
xalloc_die ();
if (duplicate != lp)
abort ();
lp->nlink--;
@@ -1523,10 +1523,10 @@ dump_file0 (struct tar_stat_info *st, const char *p,
/* See if we want only new files, and check if this one is too old to
put in the archive.
This check is omitted if incremental_option is set *and* the
requested file is not explicitely listed in the command line. */
if (!(incremental_option && !is_individual_file (p))
&& !S_ISDIR (st->stat.st_mode)
&& OLDER_TAR_STAT_TIME (*st, m)
@@ -1589,7 +1589,7 @@ dump_file0 (struct tar_stat_info *st, const char *p,
close (fd);
return;
}
ok = dump_dir (fd, st, top_level, parent_device);
/* dump_dir consumes FD if successful. */

View File

@@ -262,7 +262,7 @@ delete_archive_members (void)
if (current_block == record_end)
flush_archive ();
status = read_header (&current_header, &current_stat_info,
status = read_header (&current_header, &current_stat_info,
read_header_auto);
xheader_decode (&current_stat_info);
@@ -296,7 +296,7 @@ delete_archive_members (void)
set_next_block_after (current_header);
blocks_to_skip = (current_stat_info.stat.st_size
+ BLOCKSIZE - 1) / BLOCKSIZE;
while (record_end - current_block <= blocks_to_skip)
{
blocks_to_skip -= (record_end - current_block);

View File

@@ -1,4 +1,4 @@
/* This file is part of GNU tar.
/* This file is part of GNU tar.
Copyright (C) 2009 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it

View File

@@ -27,7 +27,7 @@ struct compression_suffix
};
static struct compression_suffix compression_suffixes[] = {
#define __CAT2__(a,b) a ## b
#define __CAT2__(a,b) a ## b
#define S(s,p) #s, sizeof (#s) - 1, __CAT2__(p,_PROGRAM)
{ S(gz, GZIP) },
{ S(tgz, GZIP) },
@@ -54,7 +54,7 @@ static const char *
find_compression_program (const char *name, const char *defprog)
{
char *suf = strrchr (name, '.');
if (suf)
{
int i;
@@ -80,4 +80,3 @@ set_comression_program_by_suffix (const char *name, const char *defprog)
if (program)
use_compress_program_option = program;
}

View File

@@ -1509,7 +1509,7 @@ parse_opt (int key, char *arg, struct argp_state *state)
{
uintmax_t u;
char *p;
if (xstrtoumax (arg, &p, 10, &u, TAR_SIZE_SUFFIXES) != LONGINT_OK)
USAGE_ERROR ((0, 0, "%s: %s", quotearg_colon (arg),
_("Invalid tape length")));
@@ -1968,7 +1968,7 @@ parse_opt (int key, char *arg, struct argp_state *state)
case RECORD_SIZE_OPTION:
{
uintmax_t u;
if (! (xstrtoumax (arg, NULL, 10, &u, TAR_SIZE_SUFFIXES) == LONGINT_OK
&& u == (size_t) u))
USAGE_ERROR ((0, 0, "%s: %s", quotearg_colon (arg),

View File

@@ -311,7 +311,7 @@ struct tar_stat_info
/* Extended headers */
struct xheader xhdr;
/* For dumpdirs */
bool is_dumpdir; /* Is the member a dumpdir? */
bool skipped; /* The member contents is already read

View File

@@ -114,8 +114,8 @@ update_archive (void)
while (!found_end)
{
enum read_header status = read_header (&current_header,
&current_stat_info,
enum read_header status = read_header (&current_header,
&current_stat_info,
read_header_auto);
switch (status)
@@ -150,14 +150,14 @@ update_archive (void)
else
{
namebuf_t nbuf = namebuf_create (name->name);
for (p = dirp; *p; p += strlen (p) + 1)
addname (namebuf_name (nbuf, p),
0, false, NULL);
namebuf_free (nbuf);
free (dirp);
remname (name);
}
}
@@ -167,7 +167,7 @@ update_archive (void)
remname (name);
}
}
skip_member ();
break;
}

View File

@@ -76,7 +76,7 @@ set_warning_option (const char *arg)
{
int negate = 0;
int option;
if (strcmp (arg, "none") == 0)
{
warning_option = 0;
@@ -88,11 +88,10 @@ set_warning_option (const char *arg)
arg += 3;
}
option = XARGMATCH ("--warning", arg,
option = XARGMATCH ("--warning", arg,
warning_args, warning_types);
if (negate)
warning_option &= ~option;
else
warning_option |= option;
}

View File

@@ -452,7 +452,7 @@ xheader_write_global (struct xheader *xhdr)
if (xhdr->stk)
{
char *name;
xheader_finish (xhdr);
xheader_write (XGLTYPE, name = xheader_ghdr_name (), time (NULL), xhdr);
free (name);
@@ -708,7 +708,7 @@ xheader_read (struct xheader *xhdr, union block *p, size_t size)
if (!p)
FATAL_ERROR ((0, 0, _("Unexpected EOF in archive")));
memcpy (&xhdr->buffer[j], p->buffer, len);
set_next_block_after (p);

View File

@@ -21,11 +21,11 @@
# When decoding a header tar was assigning 0 to oldgnu_header.isextended,
# which destroyed name prefix. When updating archive, modified prefix
# could have been written to disk thus producing invalid archive member.
# Reported by Adye, TJ (Tim), <T.J.Adye@rl.ac.uk>
# Reported by Adye, TJ (Tim), <T.J.Adye@rl.ac.uk>
# References:
# <7231C15EAC2F164CA6DC326D97493C8B36C25D@exchange35.fed.cclrc.ac.uk>
# http://lists.gnu.org/archive/html/bug-tar/2005-02/msg00032.html
AT_SETUP([appending files with long names])
AT_KEYWORDS([append append01])
@@ -45,4 +45,3 @@ PREFIX/file2
[],[],[],[oldgnu, ustar, posix, gnu])
AT_CLEANUP

View File

@@ -20,7 +20,7 @@
# Using tar 1.15.x the following equivalent command sets:
#
# 1. tar cf archive file1 file2
# 1. tar cf archive file1 file2
# and
# 2. tar cfT archive /dev/null
# tar rf archive file1
@@ -62,7 +62,7 @@ genfile --file file2
MTIME="--mtime=@0"
# For PAX archives, we need to make sure extended header names are
# reproducible and that their contents won't change with time
# reproducible and that their contents won't change with time
if test $[]TEST_TAR_FORMAT = posix; then
TAR_OPTIONS="$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime"
fi

View File

@@ -16,17 +16,17 @@ fi
STAR_DATA_URL=ftp://ftp.berlios.de/pub/star/testscripts
if test -z "$STAR_TESTSCRIPTS"; then
STAR_TESTSCRIPTS=$TEST_DATA_DIR
fi
fi
# tarball_prereq file sum dir url
tarball_prereq() {
if test -d "$3"; then
if test -d "$3"; then
if test -r $3/$1; then
:
elif test -n "$FULL_TEST"; then
wget -q --directory-prefix=$3 $4/$1
fi
fi
fi
echo "$2 $3/$1" | md5sum --status --check - >/dev/null 2>&1
}
@@ -34,4 +34,3 @@ decho() {
echo $*
echo >&2 $*
}

View File

@@ -31,8 +31,8 @@ for i in 1 2 3 4 5 6 7 8 9
do touch $prefix$i
done
tar -cf archive ./$prefix* &&
tar --delete -f archive ./${prefix}5 &&
tar -tf archive
tar --delete -f archive ./${prefix}5 &&
tar -tf archive
],
[0],
[./PREFIX[]1

View File

@@ -36,7 +36,7 @@ mkdir dir/rock
echo "Signature: 8a477f597d28d172789f06886806bc55" > dir/rock/CACHEDIR.TAG
echo "test" > dir/rock/file
for option in exclude-caches exclude-caches-under exclude-caches-all
for option in exclude-caches exclude-caches-under exclude-caches-all
do
echo OPTION $option
tar -cf archive.tar --$option -v dir 2>err | sort
@@ -45,7 +45,7 @@ do
tar tf archive.tar | sort
done
for option in exclude-tag exclude-tag-under exclude-tag-all
for option in exclude-tag exclude-tag-under exclude-tag-all
do
echo OPTION $option
tar -cf archive.tar --${option}=tagfile -v dir 2>err | sort

View File

@@ -19,7 +19,7 @@
#
# Reported-by: Matthew Peterson <mrpeterson2@gmail.com>
# References: <AANLkTin0teb1dcl0HCNquHxvN4HQnJmP6aK7CJCqy0sd@mail.gmail.com>
# http://lists.gnu.org/archive/html/help-tar/2010-06/msg00000.html
# http://lists.gnu.org/archive/html/help-tar/2010-06/msg00000.html
AT_SETUP([exclude: long files in pax archives])
AT_KEYWORDS([exclude exclude06])

View File

@@ -36,7 +36,7 @@ tar -cf archive ./file1 directory
tar -tf archive \
--exclude='./*1' \
--exclude='d*/*1' \
--exclude='d*/s*/*2' | sort
--exclude='d*/s*/*2' | sort
],
[0],
[directory/

View File

@@ -30,13 +30,13 @@
AT_SETUP([extracting selected members from pax])
AT_KEYWORDS([extract extract05])
AT_DATA([list],
AT_DATA([list],
[jeden
cztery
])
AT_TAR_CHECK([
genfile --sparse --file sparsefile 0 ABCD 1M EFGH 2000K IJKL || AT_SKIP_TEST
genfile --sparse --file sparsefile 0 ABCD 1M EFGH 2000K IJKL || AT_SKIP_TEST
genfile --length 118 --file jeden
genfile --length 223 --file dwa
genfile --length 517 --file trzy

View File

@@ -23,7 +23,7 @@
# permissions than your umask. In this case, the permissions of the
# existing directory will toggle between the version which complies with
# your umask (which would be correct, without -p) and the version from the
# tarfile.
# tarfile.
#
# Reported by: Ian Jackson <iwj@ubuntu.com>
#
@@ -41,7 +41,7 @@ umask 022
# Make sure user's umask is honored, even if we are superuser
TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions"
# Create a directory
# Create a directory
mkdir directory
chmod 777 directory
genfile --stat=mode:777 directory

View File

@@ -55,5 +55,3 @@ dir/foo
[],[],[],[ustar]) # Testing one format is enough
AT_CLEANUP

View File

@@ -26,7 +26,7 @@
# instead.
#
# Reported by: Solar Designer <solar@openwall.com>
#
#
# References: <20090228235820.GA13362@openwall.com>
# http://lists.gnu.org/archive/html/bug-tar/2009-03/msg00000.html
#
@@ -98,4 +98,3 @@ tar: dir/file1: File removed before we read it
AT_CLEANUP

View File

@@ -47,4 +47,3 @@ tar: Exiting with failure status due to previous errors
# Timing information: see filerem01.at
AT_CLEANUP

View File

@@ -51,5 +51,3 @@ tar: Deleting `directory/bar'
[],[],[],[gnu, oldgnu, posix])
AT_CLEANUP

View File

@@ -23,9 +23,9 @@
# if the archive has normal member ordering, i.e. each directory
# member is immediately followed by members located under that directory.
# This is not true for incremental archives, where directory members
# precede the non-directory ones. Due to this, GNU tar up to version 1.15.2
# precede the non-directory ones. Due to this, GNU tar up to version 1.15.2
# failed to correctly restore directory timestamps from an incremental
# archive if this directory contained some files in it.
# archive if this directory contained some files in it.
#
# References: <200511291228.47081.karaman@dssgmbh.de>

View File

@@ -45,9 +45,9 @@ tar -cf archive.2 -g db directory
mv directory orig
echo Listing of archive.1
tar -tf archive.1 | sort
tar -tf archive.1 | sort
echo Listing of archive.2
tar -tf archive.2 | sort
tar -tf archive.2 | sort
echo Directory after first restore
tar -xf archive.1 -g db
@@ -55,7 +55,7 @@ find directory | sort
echo Directory after second restore
tar -xf archive.2 -g db
find directory | sort
find directory | sort
],
[0],
[Listing of archive.1
@@ -78,4 +78,3 @@ directory/z
AT_CLEANUP
# End of incr03.at

View File

@@ -75,5 +75,3 @@ sub/b/file4
],[],[],[],[gnu, oldgnu, posix])
AT_CLEANUP

View File

@@ -25,7 +25,7 @@ genfile --length 0 --file foo
genfile --length 12288 --file bar
genfile --length 12288 --file baz
tar --label=Test -cM -L10 -f 1.tar -f 2.tar -f 3.tar -f 4.tar foo bar baz
tar -Mt -f 1.tar -f 2.tar -f 3.tar -f 4.tar
tar -Mt -f 1.tar -f 2.tar -f 3.tar -f 4.tar
],
[0],
[Test Volume 1

View File

@@ -85,5 +85,3 @@ tar: Archive label mismatch
],[],[],[gnu,oldgnu,posix])
AT_CLEANUP

View File

@@ -49,5 +49,3 @@ tar: Error is not recoverable: exiting now
],[],[],[gnu,oldgnu,posix])
AT_CLEANUP

View File

@@ -46,5 +46,3 @@ tar: Error is not recoverable: exiting now
],[],[],[gnu,oldgnu,posix])
AT_CLEANUP

View File

@@ -49,4 +49,3 @@ file1
AT_CLEANUP
# End of link02.at

View File

@@ -52,5 +52,3 @@ file1
])
AT_CLEANUP

View File

@@ -60,4 +60,3 @@ directory/file2
[],[],[],[gnu, oldgnu])
AT_CLEANUP

View File

@@ -19,9 +19,9 @@
# 02110-1301, USA.
# Check if listed-incremental backups work for files moved from one directory
# to another.
# to another.
# Based on a script by Martin Simmons <ZYHYLCRMZPRP@spammotel.com>
# References:
# References:
# <20040626230315.163AA1D148@cpc5-cmbg1-6-0-cust208.cmbg.cable.ntl.com>
# http://lists.gnu.org/archive/html/bug-tar/2004-06/msg00028.html
@@ -69,7 +69,7 @@ sleep 1
echo Creating incremental archive
echo >&2 "Creating incremental archive"
cp -p tart.incr1 tart.incr2
tar -c -v --listed-incremental=tart.incr2 -f archive.2 tart || exit 1
tar -c -v --listed-incremental=tart.incr2 -f archive.2 tart || exit 1
sleep 1
@@ -81,7 +81,7 @@ echo Extracting incremental archive
# This command should produce three messages about deletion
# of the existing files, that may appear in any order. Piping
# to sort makes sure we don't depend on any particular ordering.
tar -x -v --listed-incremental=tart.incr2 -f archive.2 | sort 2>/dev/null
tar -x -v --listed-incremental=tart.incr2 -f archive.2 | sort 2>/dev/null
echo Final files:
find tart -print | sort 2>/dev/null

View File

@@ -18,7 +18,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
# In GNU format, when extracting or listing a file member with a name
# In GNU format, when extracting or listing a file member with a name
# whose length is divisible by block size (512) tar used to read an
# extra block of data. In consequence the following file was not extracted.
# Reported by Josef Bauer
@@ -46,4 +46,3 @@ endfile
[],[],[],[gnu,oldgnu])
AT_CLEANUP

View File

@@ -45,4 +45,3 @@ tar: Exiting with failure status due to previous errors
[],[],[v7])
AT_CLEANUP

View File

@@ -61,5 +61,3 @@ cmp file2 extract-dir-pipe/file2
[],[],[],[],[gnu, oldgnu, pax])
AT_CLEANUP

View File

@@ -21,8 +21,8 @@
# Previous versions of tar were not able to skip a member straddling
# the multivolume archive boundary. Reported by Mads Martin Joergensen
# <mmj@suse.de>
#
# References: <20040402144254.GC4409@suse.de>
#
# References: <20040402144254.GC4409@suse.de>
# http://lists.gnu.org/archive/html/bug-tar/2004-04/msg00002.html
AT_SETUP([skipping a straddling member])

View File

@@ -25,7 +25,7 @@
# References: <20040809214854.GB32706@suse.de>
# http://lists.gnu.org/archive/html/bug-tar/2004-08/msg00012.html
# <200604270859.47241.Juergen.Vollmer@informatik-vollmer.de>
#
#
AT_SETUP([MV archive & long filenames])
AT_KEYWORDS([multivolume multiv multiv03])
@@ -68,4 +68,3 @@ cmp $BFILE bfile
[],[],[gnu, oldgnu])
AT_CLEANUP

View File

@@ -40,7 +40,7 @@ tar -c -M -L 502 -f a.tar -f b.tar -f c.tar m4_foreach([f],[FILELIST],f )
echo separator
mkdir bak
mv m4_foreach([f],[FILELIST],f )bak
tar -vxM -f a.tar -f c.tar -f b.tar -f c.tar
tar -vxM -f a.tar -f c.tar -f b.tar -f c.tar
m4_foreach([f],
[FILELIST],
[echo Diffing f
@@ -62,6 +62,3 @@ m4_foreach([file],
],[],[], [gnu])
AT_CLEANUP

View File

@@ -49,4 +49,3 @@ Testing archive
[gnu, pax])
AT_CLEANUP

View File

@@ -15,7 +15,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Description: When creating POSIX multivolume archives, tar may in
# some cases write an extended header at the end of one volume, and
# some cases write an extended header at the end of one volume, and
# the corresponding ustar header at the beginning of the next volume.
# Such archives do not fully comply with the POSIX specs, but tar must
# be able to read them anyway. This is what this script tests.

View File

@@ -46,6 +46,3 @@ Testing
[gnu])
AT_CLEANUP

View File

@@ -34,4 +34,3 @@ tar tf archive
])
AT_CLEANUP

View File

@@ -36,4 +36,3 @@ tar tf archive
])
AT_CLEANUP

View File

@@ -41,5 +41,3 @@ genfile --stat a
])
AT_CLEANUP

View File

@@ -19,7 +19,7 @@
# 02110-1301, USA.
# Description: Test basic handling of renamed directory in the incremental
# archives.
# archives.
AT_SETUP([renamed dirs in incrementals])
AT_KEYWORDS([incremental rename rename01])
@@ -46,7 +46,7 @@ mv foo old
tar xfg arch.1 /dev/null
echo "Begin directory listing 1"
find foo | sort
find foo | sort
echo "End directory listing 1"
tar xfg arch.2 /dev/null

View File

@@ -19,7 +19,7 @@
# 02110-1301, USA.
# Description: Incremental archives should be able to handle directories
# moved between directory hierarchies.
# moved between directory hierarchies.
AT_SETUP([move between hierarchies])
AT_KEYWORDS([incremental rename rename02])
@@ -50,7 +50,7 @@ tar xfg arch.1 /dev/null 2>tmperr
sort tmperr >&2
echo "Begin directory listing 1"
find foo | sort
find foo | sort
echo "End directory listing 1"
tar xfgv arch.2 /dev/null

View File

@@ -58,10 +58,10 @@ echo "Second dump" >&2
tar -g incr -cf arch.2 -v foo 2>tmperr
sort tmperr >&2
tar xfg arch.1 /dev/null
tar xfg arch.1 /dev/null
echo "Begin directory listing 1"
find foo | sort
find foo | sort
echo "End directory listing 1"
tar xfgv arch.2 /dev/null

View File

@@ -79,5 +79,3 @@ Second restore
AT_CLEANUP
# End of rename04.at

View File

@@ -77,5 +77,3 @@ Second restore
AT_CLEANUP
# End of rename05.at

View File

@@ -36,7 +36,7 @@ tar cf archive file1 file2
mkdir directory
tar -xf archive --same-order -C directory || exit 1
ls directory|sort
ls directory|sort
],
[0],
[file1
@@ -44,4 +44,3 @@ file2
])
AT_CLEANUP

View File

@@ -19,7 +19,7 @@
# 02110-1301, USA.
# In previous versions a single -C option did not work with --same-order
# (see same-order01.sh). However, multiple -C options worked OK.
# (see same-order01.sh). However, multiple -C options worked OK.
# Test if we did not break the correct behavior.
AT_SETUP([multiple -C options])

View File

@@ -38,4 +38,3 @@ tar: Exiting with failure status due to previous errors
[],[],[gnu])
AT_CLEANUP

View File

@@ -36,4 +36,3 @@ tar uf archive foo
[0])
AT_CLEANUP

View File

@@ -49,4 +49,3 @@ sparsefile 10344448
])
AT_CLEANUP

View File

@@ -23,7 +23,7 @@ AT_KEYWORDS([sparse sparse02])
# Tar 1.14 - 1.15.1 was unable to extract sparse files to a pipe.
# References: <16896.21739.460782.124775@jik.kamens.brookline.ma.us>
# http://lists.gnu.org/archive/html/bug-tar/2005-02/msg00003.html
# http://lists.gnu.org/archive/html/bug-tar/2005-02/msg00003.html
AT_TAR_CHECK([
genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || AT_SKIP_TEST

View File

@@ -35,7 +35,7 @@ echo "Pass 1: Split between data blocks"
echo "Create archive"
tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1
echo "Test archive"
tar --record-size=512 -t -M -f arc.1 -f arc.2
tar --record-size=512 -t -M -f arc.1 -f arc.2
echo "Compare archive"
tar --record-size=512 -d -M -f arc.1 -f arc.2
@@ -44,7 +44,7 @@ genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || AT_SKIP_TEST
echo "Create archive"
tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1
echo "Test archive"
tar --record-size=512 -t -M -f arc.1 -f arc.2
tar --record-size=512 -t -M -f arc.1 -f arc.2
echo "Compare archive"
tar --record-size=512 -d -M -f arc.1 -f arc.2
],

View File

@@ -29,7 +29,7 @@ exec <&-
genfile --sparse --file sparsefile $2 || AT_SKIP_TEST
echo "Pass 1: Split between data blocks"
echo "Create archive"
tar --sparse --sparse-version=$1 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
tar --sparse --sparse-version=$1 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
echo "Test archive"
tar -t -M -f arc.1 -f arc.2 -f arc.3
echo "Compare archive"
@@ -38,7 +38,7 @@ tar -d -M -f arc.1 -f arc.2 -f arc.3
echo "Pass 2: Split within a data block"
genfile --sparse --file sparsefile $3 || AT_SKIP_TEST
echo "Create archive"
tar --sparse --sparse-version=$1 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
tar --sparse --sparse-version=$1 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
echo "Test archive"
tar -t -M -f arc.1 -f arc.2 -f arc.3
echo "Compare archive"
@@ -57,4 +57,3 @@ sparsefile
Compare archive
],
[],[],[],[pax])])

View File

@@ -10,14 +10,14 @@ STAR_TESTSCRIPTS to point to the directory where they reside, for
example:
make STAR_TESTSCRIPTS=testdir check
or
or
make TESTS_ENVIRONMENT='STAR_TESTSCRIPTS=testdir' check
The file `quicktest.sh' is a separate test. It is never executed
within `make check' command, you will need to run it manually.
Please, carefully read section `quicktest.sh' below before running
it.
Following is a short description of the tests:
* gtarfail.at and gtarfail2.at
@@ -30,7 +30,7 @@ by previous versions of GNU tar.
Requires gnu-multi-fail-volume1.gtar and gnu-multi-fail-volume2.gtar.
These are two parts of a multi-volume archive that previous versions
of tar refused to read (at least, without -B option).
of tar refused to read (at least, without -B option).
* ustar-big-2g.at

View File

@@ -41,5 +41,3 @@ lrwxrwxrwx jes/glone 0 2001-08-29 10:54 build/psmake/astoi.c -> ../../li
])
AT_CLEANUP

View File

@@ -86,4 +86,3 @@ tar --utc -tvM -f $STAR_TESTSCRIPTS/gnu-multi-fail-volume1.gtar \
])
AT_CLEANUP

View File

@@ -39,5 +39,3 @@ RE_CHECK([stderr],[tar: Record size = .*
])
AT_CLEANUP

View File

@@ -57,7 +57,7 @@ test_access() {
echo "$1 does not exist or is unreadable"
echo 77
fi
}
}
check_environ() {
if [ "$STAR_TESTSCRIPTS" = "" ]; then
@@ -70,12 +70,12 @@ check_environ() {
else
echo "STAR_TESTSCRIPTS is not a directory"
exit 77
fi
fi
ARCHIVE=$STAR_TESTSCRIPTS/ustar-all-quicktest.tar
test_access $ARCHIVE
FILELIST=$STAR_TESTSCRIPTS/quicktest.filelist
test_access $FILELIST
test_access $FILELIST
${TARTEST:-tartest} < /dev/null > /dev/null 2>&1
if [ $? -eq 127 ]; then
@@ -93,7 +93,7 @@ getargs() {
*) echo "Unknown option: $option" >&2
exit 77;;
esac
done
done
}
if [ -w / ]; then

View File

@@ -39,4 +39,3 @@ RE_CHECK([stderr],[tar: Record size = .*
])
AT_CLEANUP

View File

@@ -39,4 +39,3 @@ RE_CHECK([stderr],[tar: Record size = .*
])
AT_CLEANUP

View File

@@ -55,4 +55,3 @@ a/c
])
AT_CLEANUP

View File

@@ -52,4 +52,3 @@ a/b
])
AT_CLEANUP

View File

@@ -57,5 +57,3 @@ abc/CCC
AT_CLEANUP
# End of volsize.at

View File

@@ -55,4 +55,3 @@ tar: Error is not recoverable: exiting now
[],[],[gnu, oldgnu])
AT_CLEANUP