35 Commits

Author SHA1 Message Date
Sergey Poznyakoff
dd197c5ccb Update 2006-05-02 19:16:23 +00:00
Sergey Poznyakoff
c576ac1354 Always use genfile --file, this enables extra error checking. 2006-05-02 19:16:12 +00:00
Sergey Poznyakoff
53d1279719 Attempt to extract a member with truncated file name from the archive. 2006-05-02 19:15:50 +00:00
Sergey Poznyakoff
729b91adb1 (try_new_volume): Attempt to continue if the name is apparently truncated in a GNU format volume. 2006-05-02 19:15:35 +00:00
Sergey Poznyakoff
dc7c0f1309 Update 2006-05-02 16:33:10 +00:00
Sergey Poznyakoff
783e58b394 (_open_archive): Remove unnecessary argument to check_compressed_archive. 2006-05-02 16:32:40 +00:00
Sergey Poznyakoff
c0e5268e75 Update 2006-04-25 17:27:03 +00:00
Sergey Poznyakoff
1518cef987 (@copying): Remove the reference to not existing invariant section. 2006-04-25 17:26:30 +00:00
Sergey Poznyakoff
8dd9a2105e Skip the test if the file system does not support sparse files. 2006-04-25 17:23:35 +00:00
Sergey Poznyakoff
9ec31e3438 Update 2006-04-11 12:02:27 +00:00
Sergey Poznyakoff
d4a41d5311 New testcase 2006-04-11 12:01:28 +00:00
Sergey Poznyakoff
a46e6aa4dc Include extrac06.at 2006-04-11 12:01:02 +00:00
Sergey Poznyakoff
b4d40436fd (TESTSUITE_AT): Add extrac06.at 2006-04-11 12:00:37 +00:00
Sergey Poznyakoff
f97d80335a (directory.new): New member
(note_directory,find_directory: Use make_directory to create
struct directory entries
(procdir): Avoid duplicating  directories in the incremental
backup map.
2006-04-11 12:00:23 +00:00
Sergey Poznyakoff
90b061cf55 Minor changes 2006-04-11 11:59:54 +00:00
Sergey Poznyakoff
8300c820d5 (extract_dir): Fix toggling existing directory
permissions. Use parts of patch provided by Ian Jackson
<iwj@ubuntu.com>.
2006-04-11 11:59:40 +00:00
Paul Eggert
e0b3fc61e1 * tests/atlocal.in (PATH): Add build-aux from the source tree,
not the build tree.
2006-03-19 04:04:54 +00:00
Sergey Poznyakoff
533854fd45 Update 2006-03-13 09:46:52 +00:00
Sergey Poznyakoff
e99d4f83df Add Benno Schulenberg 2006-03-13 09:44:15 +00:00
Sergey Poznyakoff
b8d5835375 Sort the two lines of stderr from the
first `tar -v --listed-incremental'.  They would come out
reversed and provoke a test failure on a tmpfs
file system.
2006-03-13 09:43:37 +00:00
Sergey Poznyakoff
61dd37ec86 (options): Consistently begin help messages with a lowercase letter. 2006-03-13 09:42:55 +00:00
Sergey Poznyakoff
48d20d8f9e Minor fixes. 2006-03-13 09:42:22 +00:00
Sergey Poznyakoff
adbbde5d4f Update 2006-03-11 22:42:46 +00:00
Sergey Poznyakoff
208389f3ad (AM_CPPFLAGS): Define LOCALEDIR 2006-03-11 22:42:07 +00:00
Paul Eggert
db0f0804f5 Remove unistd_.h from lib/.cvsignore. 2006-03-08 02:00:47 +00:00
Paul Eggert
18486cf8d7 * src/buffer.c (record_buffer_aligned): New var.
(init_buffer): Use it to ensure that the buffer is aligned.
This doesn't result in any measurable performance improvement
on my host (Debian GNU/Linux 3.1 stable, with default block size),
but I assume it does help on some hosts.
2006-03-08 00:55:56 +00:00
Paul Eggert
6c1020d386 * lib/.cvsignore: Add unistd_.h. Sort. 2006-03-08 00:23:34 +00:00
Sergey Poznyakoff
38c0884898 Update 2006-03-04 09:58:26 +00:00
Sergey Poznyakoff
7bcb876c5a Use -f - to read from stdin. 2006-03-04 09:57:44 +00:00
Sergey Poznyakoff
dfd5ec2519 Update 2006-02-21 07:10:52 +00:00
Sergey Poznyakoff
e81556858b Fix typo: --to-command instead of --to-program 2006-02-21 07:09:39 +00:00
Paul Eggert
92554b7c94 * tests/multiv04.at (split directory members in a MV archive):
Don't use %X in an awk printf format; this doesn't work with
Solaris 10 /usr/bin/awk.  Use %x instead.
2006-02-21 05:55:28 +00:00
Sergey Poznyakoff
631de61428 Fix copyright years 2006-02-20 10:01:47 +00:00
Sergey Poznyakoff
8bfefd8854 Uniformly start all test titles with a lower case letter 2006-02-20 10:00:48 +00:00
Sergey Poznyakoff
f7a29307e2 Update 2006-02-20 09:45:23 +00:00
36 changed files with 387 additions and 170 deletions

107
ChangeLog
View File

@@ -1,3 +1,108 @@
2006-05-02 Sergey Poznyakoff <gray@gnu.org.ua>
* src/buffer.c (try_new_volume): Attempt to continue if the name
is apparently truncated in a GNU format volume.
* tests/comprec.at, tests/delete01.at, tests/delete02.at,
tests/delete04.at, tests/delete05.at, tests/extrac05.at,
tests/listed01.at, tests/multiv01.at, tests/multiv02.at,
tests/pipe.at, tests/same-order01.at, tests/same-order02.at,
tests/sparse01.at, tests/sparse03.at: Always use genfile --file,
this enables extra error checking.
* tests/multiv03.at: Attempt to extract a member with truncated
file name from the archive.
* src/buffer.c (_open_archive): Remove unnecessary argument to
check_compressed_archive.
2006-04-25 Sergey Poznyakoff <gray@gnu.org.ua>
* tests/sparse01.at, tests/sparse02.at, tests/sparse03.at,
tests/sparsemv.at, tests/sparsemvp.at: Skip the test if the file
system does not support sparse files.
* doc/tar.texi (@copying): Remove the reference to not existing
invariant section.
2006-04-11 Sergey Poznyakoff <gray@gnu.org.ua>
* src/extract.c (extract_dir): Fix toggling existing directory
permissions (Debian bug #361077). Use parts of patch provided by
Ian Jackson <iwj@ubuntu.com>.
* src/compare.c: Minor changes
* src/incremen.c (directory.new): New member
(note_directory,find_directory: Use make_directory to create
struct directory entries
(procdir): Avoid duplicating directories in the incremental
backup map.
* tests/Makefile.am (TESTSUITE_AT): Add extrac06.at
* tests/testsuite.at: Include extrac06.at
2006-03-18 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (trivial change)
* tests/atlocal.in (PATH): Add build-aux from the source tree,
not the build tree.
2006-03-13 Sergey Poznyakoff <gray@gnu.org.ua>
* THANKS: Add Benno Schulenberg
2006-03-13 Jim Meyering <jim@meyering.net>
* tests/listed02.at: Sort the two lines of stderr from the
first `tar -v --listed-incremental'. They would come out
reversed and provoke a test failure on a tmpfs
file system.
2006-03-13 Benno Schulenberg <benno@nietvergeten.nl>
* doc/tar.texi: Minor fixes.
* src/tar.c (options): Consistently begin help messages with a
lowercase letter.
2006-03-12 Sergey Poznyakoff <gray@gnu.org.ua>
* tests/Makefile.am (AM_CPPFLAGS): Define LOCALEDIR
2006-03-07 Paul Eggert <eggert@cs.ucla.edu>
* src/buffer.c (record_buffer_aligned): New var.
(init_buffer): Use it to ensure that the buffer is aligned.
This doesn't result in any measurable performance improvement
on my host (Debian GNU/Linux 3.1 stable, with default block size),
but I assume it does help on some hosts.
* lib/.cvsignore: Sort.
2006-03-04 Sergey Poznyakoff <gray@gnu.org.ua>
* tests/shortrec.at: Use -f - to read from stdin.
2006-02-21 Sergey Poznyakoff <gray@gnu.org.ua>
* doc/tar.texi: Fix typo: --to-command instead of --to-program
2006-02-20 Paul Eggert <eggert@cs.ucla.edu>
* tests/multiv04.at (split directory members in a MV archive):
Don't use %X in an awk printf format; this doesn't work with
Solaris 10 /usr/bin/awk. Use %x instead.
2006-02-20 Sergey Poznyakoff <gray@gnu.org.ua>
* src/create.c (split_long_name): Fix maximum length estimation.
Patch by Jim Lowe.
* tests/Makefile.am (lustar01.at,lustar02.at,lustar03.at): New
tests.
* tests/atlocal.in: Add build-aux to the PATH
* tests/long01.at: Remove mkhier, use AT_TAR_MKHIER instead
* tests/longv7.at: Reword test title
* tests/lustar01.at: New test
* tests/lustar02.at: New test
* tests/lustar03.at: New test
* tests/testsuite.at (AT_TAR_MKHIER): New macro
(lustar01.at,lustar02.at,lustar03.at): New tests.
2006-02-20 Paul Eggert <eggert@cs.ucla.edu>
* bootstrap: Don't claim lib/Makefile.am is generated automatically
@@ -73,7 +178,7 @@
2006-02-07 Jim Meyering <jim@meyering.net>
* src/xheader.c (sparse_map_decoder): Fix misleading diagnostic.
* src/xheader.c (sparse_map_decoder): Fix misleading diagnostic.
2006-01-31 Sergey Poznyakoff <gray@gnu.org.ua>

1
THANKS
View File

@@ -53,6 +53,7 @@ Bela Lubkin filbo@armory.com
Ben A. Mesander ben@piglet.cr.usgs.gov
Benedikt Stockebrand benedikt@devnull.ruhr.de
Bennett Todd bet@mordor.com
Benno Schulenberg benno@nietvergeten.nl
Benny Holmgren benny@hgs.se
Bernard Chen bern@cs.ucla.edu
Bernard Derval derval@iro.umontreal.ca

View File

@@ -33,11 +33,10 @@ Copyright @copyright{} 1992, 1994, 1995, 1996, 1997, 1999, 2000, 2001,
@quotation
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.1 or
any later version published by the Free Software Foundation; with the
Invariant Sections being "GNU General Public License", with the
Front-Cover Texts being ``A GNU Manual,'' and with the Back-Cover Texts
as in (a) below. A copy of the license is included in the section
entitled "GNU Free Documentation License".
any later version published by the Free Software Foundation; with no
Invariant Sections, with the Front-Cover Texts being ``A GNU Manual,''
and with the Back-Cover Texts as in (a) below. A copy of the license
is included in the section entitled "GNU Free Documentation License".
(a) The FSF's Back-Cover Text is: ``You are free to copy and modify
this GNU Manual. Buying copies from GNU Press supports the FSF in
@@ -2765,7 +2764,7 @@ would suppress security-related information.
This keyword allows user control over the name that is written into the
ustar header blocks for the extended headers. The name is obtained
from @var{string} after substituting the following meta-characters:
from @var{string} after making the following substitutions:
@multitable @columnfractions .30 .70
@headitem Meta-character @tab Replaced By
@@ -2790,8 +2789,8 @@ will use the following default value:
@item globexthdr.name=@var{string}
This keyword allows user control over the name that is written into
the ustar header blocks for global extended header records. The name
shall will be obtained from the contents of @var{string}, after the
following character substitutions have been made:
is obtained from the contents of @var{string}, after making
the following substitutions:
@multitable @columnfractions .30 .70
@headitem Meta-character @tab Replaced By
@@ -2802,7 +2801,7 @@ starting at 1.
@item %% @tab A @samp{%} character.
@end multitable
Any other @samp{%} characters in string produce undefined results.
Any other @samp{%} characters in @var{string} produce undefined results.
If no option @samp{globexthdr.name=string} is specified, @command{tar}
will use the following default value:
@@ -4037,7 +4036,7 @@ files from @file{practice}:
@smallexample
$ @kbd{tar -cvf bluesrock.tar blues rock}
blues
classical
rock
$ @kbd{tar -cvf folkjazz.tar folk jazz}
folk
jazz
@@ -4051,7 +4050,7 @@ contain what they are supposed to:
$ @kbd{tar -tvf bluesrock.tar}
-rw-r--r-- melissa user 105 1997-01-21 19:42 blues
-rw-r--r-- melissa user 33 1997-01-20 15:34 rock
$ @kbd{tar -tvf folkjazz.tar}
$ @kbd{tar -tvf jazzfolk.tar}
-rw-r--r-- melissa user 20 1996-09-23 16:44 folk
-rw-r--r-- melissa user 65 1997-01-30 14:15 jazz
@end smallexample
@@ -4063,15 +4062,15 @@ $ @kbd{cd ..}
$ @kbd{tar --concatenate --file=bluesrock.tar jazzfolk.tar}
@end smallexample
If you now list the contents of the @file{bluesclass.tar}, you will see
If you now list the contents of the @file{bluesrock.tar}, you will see
that now it also contains the archive members of @file{jazzfolk.tar}:
@smallexample
$ @kbd{tar --list --file=bluesrock.tar}
blues
rock
jazz
folk
jazz
@end smallexample
When you use @option{--concatenate}, the source and target archives must
@@ -4649,8 +4648,8 @@ You can instruct @command{tar} to send the contents of each extracted
file to the standard input of an external program:
@table @option
@opindex to-program
@item --to-program=@var{command}
@opindex to-command
@item --to-command=@var{command}
Extract files and pipe their contents to the standard input of
@var{command}. When this option is used, instead of creating the
files specified, @command{tar} invokes @var{command} and pipes the

View File

@@ -1,11 +1,9 @@
.deps
__fpending.c
__fpending.h
closeout.c
closeout.h
Makefile
Makefile.am
Makefile.in
__fpending.c
__fpending.h
alloca.c
alloca.h
alloca_.h
@@ -35,6 +33,8 @@ charset.alias
chdir-long.c
chdir-long.h
chown.c
closeout.c
closeout.h
config.charset
creat-safer.c
dirname.c

View File

@@ -44,6 +44,7 @@
static tarlong prev_written; /* bytes written on previous volumes */
static tarlong bytes_written; /* bytes written on this volume */
static void *record_buffer[2]; /* allocated memory */
union block *record_buffer_aligned[2];
static int record_index;
/* FIXME: The following variables should ideally be static to this
@@ -369,10 +370,11 @@ xclose (int fd)
static void
init_buffer ()
{
if (!record_buffer[record_index])
page_aligned_alloc (&record_buffer[record_index], record_size);
if (! record_buffer_aligned[record_index])
record_buffer_aligned[record_index] =
page_aligned_alloc (&record_buffer[record_index], record_size);
record_start = record_buffer[record_index];
record_start = record_buffer_aligned[record_index];
current_block = record_start;
record_end = record_start + blocking_factor;
}
@@ -451,7 +453,7 @@ _open_archive (enum access_mode wanted_access)
archive = STDIN_FILENO;
type = check_compressed_archive (archive);
type = check_compressed_archive ();
if (type != ct_none)
FATAL_ERROR ((0, 0,
_("Archive is compressed. Use %s option"),
@@ -1149,9 +1151,19 @@ try_new_volume ()
if (!continued_file_name
|| strcmp (continued_file_name, real_s_name))
{
WARN ((0, 0, _("%s is not continued on this volume"),
quote (real_s_name)));
return false;
if ((archive_format == GNU_FORMAT || archive_format == OLDGNU_FORMAT)
&& strlen (real_s_name) >= NAME_FIELD_SIZE
&& strncmp (continued_file_name, real_s_name,
NAME_FIELD_SIZE) == 0)
WARN ((0, 0,
_("%s is possibly continued on this volume: header contains truncated name"),
quote (real_s_name)));
else
{
WARN ((0, 0, _("%s is not continued on this volume"),
quote (real_s_name)));
return false;
}
}
s = continued_file_size + continued_file_offset;

View File

@@ -53,14 +53,13 @@ diff_init (void)
/* Sigh about something that differs by writing a MESSAGE to stdlis,
given MESSAGE is nonzero. Also set the exit status if not already. */
void
report_difference (struct tar_stat_info *st __attribute__ ((unused)),
const char *fmt, ...)
report_difference (struct tar_stat_info *st, const char *fmt, ...)
{
if (fmt)
{
va_list ap;
fprintf (stdlis, "%s: ", quotearg_colon (current_stat_info.file_name));
fprintf (stdlis, "%s: ", quotearg_colon (st->file_name));
va_start (ap, fmt);
vfprintf (stdlis, fmt, ap);
va_end (ap);

View File

@@ -1,7 +1,7 @@
/* Create a tar archive.
Copyright (C) 1985, 1992, 1993, 1994, 1996, 1997, 1999, 2000, 2001,
2003, 2004, 2005 Free Software Foundation, Inc.
2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Written by John Gilmore, on 1985-08-25.

View File

@@ -428,7 +428,7 @@ make_directories (char *file_name)
invert_permissions is zero, because
repair_delayed_set_stat may need to update the struct. */
delay_set_stat (file_name,
&current_stat_info /* ignored */,
&current_stat_info,
invert_permissions, INTERDIR_PERMSTATUS);
print_for_mkdir (file_name, cursor - file_name, mode);
@@ -647,7 +647,7 @@ extract_dir (char *file_name, int typeflag)
}
if (S_ISDIR (st.st_mode))
{
mode = st.st_mode & ~ current_umask;
mode = st.st_mode;
break;
}
}
@@ -668,12 +668,16 @@ extract_dir (char *file_name, int typeflag)
if (status == 0
|| old_files_option == DEFAULT_OLD_FILES
|| old_files_option == OVERWRITE_OLD_FILES)
delay_set_stat (file_name, &current_stat_info,
MODE_RWX & (mode ^ current_stat_info.stat.st_mode),
(status == 0
? ARCHIVED_PERMSTATUS
: UNKNOWN_PERMSTATUS));
{
if (status == 0)
delay_set_stat (file_name, &current_stat_info,
MODE_RWX & (mode ^ current_stat_info.stat.st_mode),
ARCHIVED_PERMSTATUS);
else /* For an already existing directory, invert_perms must be 0 */
delay_set_stat (file_name, &current_stat_info,
0,
UNKNOWN_PERMSTATUS);
}
return status;
}

View File

@@ -34,9 +34,10 @@ struct directory
struct timespec mtime; /* Modification time */
dev_t device_number; /* device number for directory */
ino_t inode_number; /* inode number for directory */
enum children children;
bool nfs;
bool found;
enum children children; /* what to save under this directory */
bool nfs; /* is the directory mounted on nfs? */
bool found; /* was the directory found on fs? */
bool new; /* is it new? */
char name[1]; /* file name of directory */
};
@@ -67,6 +68,19 @@ compare_directories (void const *entry1, void const *entry2)
return strcmp (directory1->name, directory2->name) == 0;
}
static struct directory *
make_directory (const char *name)
{
size_t namelen = strlen (name);
size_t size = offsetof (struct directory, name) + namelen + 1;
struct directory *directory = xmalloc (size);
strcpy (directory->name, name);
if (ISSLASH (directory->name[namelen-1]))
directory->name[namelen-1] = 0;
directory->new = false;
return directory;
}
/* Create and link a new directory entry for directory NAME, having a
device number DEV and an inode number INO, with NFS indicating
whether it is an NFS device and FOUND indicating whether we have
@@ -75,8 +89,7 @@ static struct directory *
note_directory (char const *name, struct timespec mtime,
dev_t dev, ino_t ino, bool nfs, bool found)
{
size_t size = offsetof (struct directory, name) + strlen (name) + 1;
struct directory *directory = xmalloc (size);
struct directory *directory = make_directory (name);
directory->mtime = mtime;
directory->device_number = dev;
@@ -84,7 +97,6 @@ note_directory (char const *name, struct timespec mtime,
directory->children = CHANGED_CHILDREN;
directory->nfs = nfs;
directory->found = found;
strcpy (directory->name, name);
if (! ((directory_table
|| (directory_table = hash_initialize (0, 0, hash_directory,
@@ -103,10 +115,10 @@ find_directory (char *name)
return 0;
else
{
size_t size = offsetof (struct directory, name) + strlen (name) + 1;
struct directory *dir = alloca (size);
strcpy (dir->name, name);
return hash_lookup (directory_table, dir);
struct directory *dir = make_directory (name);
struct directory *ret = hash_lookup (directory_table, dir);
free (dir);
return ret;
}
}
@@ -117,13 +129,7 @@ update_parent_directory (const char *name)
char *p, *name_buffer;
p = dir_name (name);
name_buffer = xmalloc (strlen (p) + 2);
strcpy (name_buffer, p);
if (! ISSLASH (p[strlen (p) - 1]))
strcat (name_buffer, "/");
directory = find_directory (name_buffer);
free (name_buffer);
directory = find_directory (p);
if (directory)
{
struct stat st;
@@ -173,7 +179,7 @@ procdir (char *name_buffer, struct stat *stat_data,
directory->device_number = stat_data->st_dev;
directory->inode_number = stat_data->st_ino;
}
else if (listed_incremental_option)
else if (listed_incremental_option && !directory->new)
/* Newer modification time can mean that new files were
created in the directory or some of the existing files
were renamed. */
@@ -202,6 +208,7 @@ procdir (char *name_buffer, struct stat *stat_data,
&& OLDER_STAT_TIME (*stat_data, c))))
? ALL_CHILDREN
: CHANGED_CHILDREN;
directory->new = true;
}
/* If the directory is on another device and --one-file-system was given,
@@ -293,13 +300,12 @@ scan_directory (struct obstack *stk, char *dir_name, dev_t device)
}
#endif
else if (children == CHANGED_CHILDREN
&& OLDER_STAT_TIME (stat_data, m)
&& (!after_date_option || OLDER_STAT_TIME (stat_data, c)))
obstack_1grow (stk, 'N');
else
if (children == CHANGED_CHILDREN
&& OLDER_STAT_TIME (stat_data, m)
&& (!after_date_option || OLDER_STAT_TIME (stat_data, c)))
obstack_1grow (stk, 'N');
else
obstack_1grow (stk, 'Y');
obstack_1grow (stk, 'Y');
}
obstack_grow (stk, entry, entrylen + 1);
@@ -565,7 +571,7 @@ read_directory_file (void)
strp++;
unquote_string (strp);
note_directory (strp, mtime, dev, ino, nfs, 0);
note_directory (strp, mtime, dev, ino, nfs, false);
}
}

View File

@@ -370,7 +370,7 @@ static struct argp_option options[] = {
{"delete", DELETE_OPTION, 0, 0,
N_("delete from the archive (not on mag tapes!)"), GRID+1 },
{"test-label", TEST_LABEL_OPTION, NULL, 0,
N_("Test archive volume label and exit"), GRID+1 },
N_("test the archive volume label and exit"), GRID+1 },
#undef GRID
#define GRID 20
@@ -386,7 +386,11 @@ static struct argp_option options[] = {
{"ignore-failed-read", IGNORE_FAILED_READ_OPTION, 0, 0,
N_("do not exit with nonzero on unreadable files"), GRID+1 },
{"occurrence", OCCURRENCE_OPTION, N_("NUMBER"), OPTION_ARG_OPTIONAL,
N_("process only the NUMBERth occurrence of each file in the archive. This option is valid only in conjunction with one of the subcommands --delete, --diff, --extract or --list and when a list of files is given either on the command line or via -T option. NUMBER defaults to 1."), GRID+1 },
N_("process only the NUMBERth occurrence of each file in the archive;"
" this option is valid only in conjunction with one of the subcommands"
" --delete, --diff, --extract or --list and when a list of files"
" is given either on the command line or via the -T option;"
" NUMBER defaults to 1"), GRID+1 },
{"seek", 'n', NULL, 0,
N_("archive is seekable"), GRID+1 },
#undef GRID
@@ -462,9 +466,10 @@ static struct argp_option options[] = {
{"preserve", PRESERVE_OPTION, 0, 0,
N_("same as both -p and -s"), GRID+1 },
{"delay-directory-restore", DELAY_DIRECTORY_RESTORE_OPTION, 0, 0,
N_("Delay setting modification times and permissions of extracted directories until the end of extraction."), GRID+1 },
N_("delay setting modification times and permissions of extracted"
" directories until the end of extraction"), GRID+1 },
{"no-delay-directory-restore", NO_DELAY_DIRECTORY_RESTORE_OPTION, 0, 0,
N_("Cancel the effect of --delay-directory-restore option."), GRID+1 },
N_("cancel the effect of --delay-directory-restore option"), GRID+1 },
#undef GRID
#define GRID 60
@@ -525,7 +530,7 @@ static struct argp_option options[] = {
N_("Archive format selection:"), GRID },
{"format", 'H', N_("FORMAT"), 0,
N_("create archive of the given format."), GRID+1 },
N_("create archive of the given format"), GRID+1 },
{NULL, 0, NULL, 0, N_("FORMAT is one of the following:"), GRID+2 },
{" v7", 0, NULL, OPTION_DOC|OPTION_NO_TRANS, N_("old V7 tar format"),
@@ -545,10 +550,10 @@ static struct argp_option options[] = {
{"portability", 0, 0, OPTION_ALIAS, NULL, GRID+8 },
{"posix", POSIX_OPTION, 0, 0,
N_("same as --format=posix"), GRID+8 },
{"pax-option", PAX_OPTION, N_("keyword[[:]=value][,keyword[[:]=value], ...]"), 0,
{"pax-option", PAX_OPTION, N_("keyword[[:]=value][,keyword[[:]=value]]..."), 0,
N_("control pax keywords"), GRID+8 },
{"label", 'V', N_("TEXT"), 0,
N_("create archive with volume name TEXT. At list/extract time, use TEXT as a globbing pattern for volume name"), GRID+8 },
N_("create archive with volume name TEXT; at list/extract time, use TEXT as a globbing pattern for volume name"), GRID+8 },
{"bzip2", 'j', 0, 0,
N_("filter the archive through bzip2"), GRID+8 },
{"gzip", 'z', 0, 0,
@@ -649,18 +654,18 @@ static struct argp_option options[] = {
N_("ask for confirmation for every action"), GRID+1 },
{"confirmation", 0, 0, OPTION_ALIAS, NULL, GRID+1 },
{"show-defaults", SHOW_DEFAULTS_OPTION, 0, 0,
N_("Show tar defaults"), GRID+1 },
N_("show tar defaults"), GRID+1 },
{"show-omitted-dirs", SHOW_OMITTED_DIRS_OPTION, 0, 0,
N_("When listing or extracting, list each directory that does not match search criteria"), GRID+1 },
N_("when listing or extracting, list each directory that does not match search criteria"), GRID+1 },
{"show-stored-names", SHOW_STORED_NAMES_OPTION, 0, 0,
N_("When creating archive in verbose mode, list member names as stored in the archive"),
N_("when creating archive in verbose mode, list member names as stored in the archive"),
GRID+1 },
{"quoting-style", QUOTING_STYLE_OPTION, N_("STYLE"), 0,
N_("Set name quoting style. See below for valid STYLE values."), GRID+1 },
N_("set name quoting style; see below for valid STYLE values"), GRID+1 },
{"quote-chars", QUOTE_CHARS_OPTION, N_("STRING"), 0,
N_("Additionally quote characters from STRING"), GRID+1 },
N_("additionally quote characters from STRING"), GRID+1 },
{"no-quote-chars", NO_QUOTE_CHARS_OPTION, N_("STRING"), 0,
N_("Disable quoting for characters from STRING"), GRID+1 },
N_("disable quoting for characters from STRING"), GRID+1 },
#undef GRID
#define GRID 110
@@ -668,7 +673,7 @@ static struct argp_option options[] = {
N_("Compatibility options:"), GRID },
{NULL, 'o', 0, 0,
N_("when creating, same as --old-archive. When extracting, same as --no-same-owner"), GRID+1 },
N_("when creating, same as --old-archive; when extracting, same as --no-same-owner"), GRID+1 },
#undef GRID
#define GRID 120
@@ -676,15 +681,15 @@ static struct argp_option options[] = {
N_("Other options:"), GRID },
{"restrict", RESTRICT_OPTION, 0, 0,
N_("Restrict use of some potentially harmful options"), -1 },
N_("disable use of some potentially harmful options"), -1 },
{"help", '?', 0, 0, N_("Give this help list"), -1},
{"usage", USAGE_OPTION, 0, 0, N_("Give a short usage message"), -1},
{"version", VERSION_OPTION, 0, 0, N_("Print program version"), -1},
{"help", '?', 0, 0, N_("give this help list"), -1},
{"usage", USAGE_OPTION, 0, 0, N_("give a short usage message"), -1},
{"version", VERSION_OPTION, 0, 0, N_("print program version"), -1},
/* FIXME -V (--label) conflicts with the default short option for
--version */
{"HANG", HANG_OPTION, "SECS", OPTION_ARG_OPTIONAL | OPTION_HIDDEN,
N_("Hang for SECS seconds (default 3600)"), 0},
N_("hang for SECS seconds (default 3600)"), 0},
#undef GRID
{0, 0, 0, 0, 0, 0}

View File

@@ -1,7 +1,7 @@
# Makefile for GNU tar regression tests.
# Copyright (C) 1996, 1997, 1999, 2000, 2001, 2003, 2004, 2005 Free Software
# Foundation, Inc.
# Copyright (C) 1996, 1997, 1999, 2000, 2001, 2003, 2004, 2005,
# 2006 Free Software Foundation, Inc.
# François Pinard <pinard@iro.umontreal.ca>, 1988.
# Sergey Poznyakoff <gray@mirddin.farlep.net>, 2004.
@@ -60,6 +60,7 @@ TESTSUITE_AT = \
extrac03.at\
extrac04.at\
extrac05.at\
extrac06.at\
gzip.at\
incremental.at\
incr01.at\
@@ -134,5 +135,5 @@ genfile_SOURCES = genfile.c argcv.c argcv.h
localedir = $(datadir)/locale
INCLUDES = -I$(top_srcdir)/lib -I../lib -I$(top_srcdir)/src
AM_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\"
LDADD = ../lib/libtar.a $(LIBINTL) $(LIB_CLOCK_GETTIME)

View File

@@ -1,7 +1,6 @@
# @configure_input@ -*- shell-script -*-
# Configurable variable values for tar test suite.
# Copyright (C) 2004 Free Software Foundation, Inc.
PATH=@abs_builddir@:@abs_top_builddir@/src:@abs_top_builddir@/build-aux:$top_srcdir:$srcdir:$PATH
# Copyright (C) 2004, 2006 Free Software Foundation, Inc.
PATH=@abs_builddir@:@abs_top_builddir@/src:@abs_top_srcdir@/build-aux:$top_srcdir:$srcdir:$PATH

View File

@@ -1,7 +1,7 @@
# Process this file with autom4te to create testsuite. -*- Autotest -*-
# Test suite for GNU tar.
# Copyright (C) 2004 Free Software Foundation, Inc.
# Copyright (C) 2004, 2006 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
@@ -24,7 +24,7 @@ AT_KEYWORDS([comprec])
AT_TAR_CHECK([
AT_GZIP_PREREQ
genfile --length 10240 > file1
genfile --length 10240 --file file1
echo "separator"
tar cfz archive file1
echo "separator"
@@ -38,4 +38,4 @@ separator
file1
])
AT_CLEANUP
AT_CLEANUP

View File

@@ -1,7 +1,7 @@
# Process this file with autom4te to create testsuite. -*- Autotest -*-
# Test suite for GNU tar.
# Copyright (C) 2004 Free Software Foundation, Inc.
# Copyright (C) 2004, 2006 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
@@ -24,8 +24,8 @@ AT_SETUP([deleting a member after a big one])
AT_KEYWORDS([delete delete01])
AT_TAR_CHECK([
genfile -l 50000 > file1
genfile -l 1024 > file2
genfile -l 50000 --file file1
genfile -l 1024 --file file2
tar cf archive file1 file2
tar f archive --delete file2
tar tf archive],

View File

@@ -1,7 +1,7 @@
# Process this file with autom4te to create testsuite. -*- Autotest -*-
# Test suite for GNU tar.
# Copyright (C) 2004 Free Software Foundation, Inc.
# Copyright (C) 2004, 2005 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
@@ -24,7 +24,7 @@ AT_SETUP([deleting a member from stdin archive])
AT_KEYWORDS([delete delete02])
AT_TAR_CHECK([
genfile -l 3073 -p zeros > 1
genfile -l 3073 -p zeros --file 1
cp 1 2
cp 2 3
tar cf archive 1 2 3

View File

@@ -1,7 +1,7 @@
# Process this file with autom4te to create testsuite. -*- Autotest -*-
# Test suite for GNU tar.
# Copyright (C) 2004 Free Software Foundation, Inc.
# Copyright (C) 2004, 2006 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
@@ -24,16 +24,16 @@ AT_SETUP([deleting a large last member])
AT_KEYWORDS([delete delete04])
AT_TAR_CHECK([
genfile -l 3 >file1
genfile -l 5 >file2
genfile -l 3 >file3
genfile -l 6 >file4
genfile -l 24 >file5
genfile -l 13 >file6
genfile -l 1385 >file7
genfile -l 30 >file8
genfile -l 10 >file9
genfile -l 256000 >file10
genfile -l 3 -f file1
genfile -l 5 -f file2
genfile -l 3 -f file3
genfile -l 6 -f file4
genfile -l 24 -f file5
genfile -l 13 -f file6
genfile -l 1385 -f file7
genfile -l 30 -f file8
genfile -l 10 -f file9
genfile -l 256000 -f file10
tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
tar f archive --delete file10
tar tf archive

View File

@@ -1,7 +1,7 @@
# Process this file with autom4te to create testsuite. -*- Autotest -*-
# Test suite for GNU tar.
# Copyright (C) 2004 Free Software Foundation, Inc.
# Copyright (C) 2004, 2006 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
@@ -28,8 +28,8 @@ AT_SETUP([deleting non-existing member])
AT_KEYWORDS([delete delete05])
AT_TAR_CHECK([
genfile -l 1024 > en
genfile -l 1024 > to
genfile -l 1024 -f en
genfile -l 1024 -f to
tar cf archive en to
# Make sure we don't use bogus blocking factor.

View File

@@ -1,7 +1,7 @@
# Process this file with autom4te to create testsuite. -*- Autotest -*-
# Test suite for GNU tar.
# Copyright (C) 2004 Free Software Foundation, Inc.
# Copyright (C) 2004, 2006 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
@@ -36,11 +36,11 @@ cztery
])
AT_TAR_CHECK([
genfile --length 118 > jeden
genfile --length 223 > dwa
genfile --length 517 > trzy
genfile --length 118 --file jeden
genfile --length 223 --file dwa
genfile --length 517 --file trzy
genfile --sparse --file sparsefile 0 ABCD 1M EFGH 2000K IJKL
genfile --length 110 > cztery
genfile --length 110 --file cztery
tar cf archive jeden dwa trzy cztery || exit 1

72
tests/extrac06.at Normal file
View File

@@ -0,0 +1,72 @@
# Process this file with autom4te to create testsuite. -*- Autotest -*-
# Test suite for GNU tar.
# Copyright (C) 2006 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
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
# The bug occurs when extracting from a tarfile a directory when the directory
# already exists and the version in the tarfile has more permissive
# 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.
#
# Reported by: Ian Jackson <iwj@ubuntu.com>
#
# References: <17461.519.640947.664400@davenant.relativity.greenend.org.uk>
#
AT_SETUP([mode of extracted directories])
AT_KEYWORDS([extract extract06])
AT_TAR_CHECK([
# Force umask
umask 022
# Make sure user's umask is honored, even if we are superuser
TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions"
# Create a directory
mkdir directory
chmod 777 directory
genfile --stat=mode:777 directory
# Archive it
tar cf arc directory
# Change its permissions ...
chmod 755 directory
genfile --stat=mode:777 directory
# ... and attempt to restore it twice
tar xf arc directory
genfile --stat=mode:777 directory
tar xf arc directory
genfile --stat=mode:777 directory
# After both restores, the directory mode should be 755
],
[0],
[777
755
755
755
])
AT_CLEANUP

View File

@@ -1,7 +1,7 @@
# Process this file with autom4te to create testsuite. -*- Autotest -*-
# Test suite for GNU tar.
# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
# Copyright (C) 2004, 2005, 2006 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
@@ -28,7 +28,7 @@ AT_KEYWORDS([listed incremental listed01])
AT_TAR_CHECK([
mkdir directory
genfile --length 10240 --pattern zeros > directory/file1
genfile --length 10240 --pattern zeros --file directory/file1
# Let the things settle
sleep 1
@@ -41,7 +41,7 @@ tar tf archive.1 || exit 1
sleep 1
genfile --length 10240 --pattern zeros > directory/file2
genfile --length 10240 --pattern zeros --file directory/file2
echo "separator"

View File

@@ -1,7 +1,7 @@
# Process this file with autom4te to create testsuite. -*- Autotest -*-
# Test suite for GNU tar.
# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
# Copyright (C) 2004, 2005, 2006 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
@@ -46,7 +46,11 @@ done
sleep 1
echo Creating main archive
tar -c -v --listed-incremental=tart.incr1 -f archive.1 tart || exit 1
tar -c -v --listed-incremental=tart.incr1 -f archive.1 tart 2> err || exit 1
# The above prints two lines to stderr announcing the new directories c0 and c1.
# Ensure that they appear in this script's stderr in sorted order.
sort err 1>&2 2>/dev/null; rm -f err
sleep 1
echo Modifying filesystem

View File

@@ -1,7 +1,7 @@
# Process this file with autom4te to create testsuite. -*- Autotest -*-
# Test suite for GNU tar.
# Copyright (C) 2005 Free Software Foundation, Inc.
# Copyright (C) 2005, 2006 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

View File

@@ -1,7 +1,7 @@
# Process this file with autom4te to create testsuite. -*- Autotest -*-
# Test suite for GNU tar.
# Copyright (C) 2004 Free Software Foundation, Inc.
# Copyright (C) 2004, 2006 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
@@ -29,7 +29,7 @@ AT_KEYWORDS([multivolume multiv multiv01])
AT_TAR_CHECK([
exec <&-
genfile --length 7168 > file1
genfile --length 7168 --file file1
for block in " 1" " 2" " 3" " 4" " 5" " 6" " 7" " 8" \
" 9" "10" "11" "12" "13" "14" "15" "16" ; do \

View File

@@ -1,7 +1,7 @@
# Process this file with autom4te to create testsuite. -*- Autotest -*-
# Test suite for GNU tar.
# Copyright (C) 2004 Free Software Foundation, Inc.
# Copyright (C) 2004, 2006 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
@@ -29,10 +29,10 @@ AT_SETUP([skipping a straddling member])
AT_KEYWORDS([multivolume multiv multiv02])
AT_TAR_CHECK([
genfile --length 10240 > en
genfile --length 20000 > to
genfile --length 20000 > tre
genfile --length 10240 > fire
genfile --length 10240 --file en
genfile --length 20000 --file to
genfile --length 20000 --file tre
genfile --length 10240 --file fire
exec <&-

View File

@@ -1,7 +1,7 @@
# Process this file with autom4te to create testsuite. -*- Autotest -*-
# Test suite for GNU tar.
# Copyright (C) 2004,2005 Free Software Foundation, Inc.
# Copyright (C) 2004, 2005, 2006 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
@@ -24,6 +24,8 @@
# headers.
# 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])
@@ -34,24 +36,31 @@ BFILE=`awk 'BEGIN { for (i = 0; i < 101; i++) printf "b"; exit; }'`
cat > ../experr <<EOF
tar: $BFILE: file name too long to be stored in a GNU multivolume header, truncated
tar: \`$BFILE' is possibly continued on this volume: header contains truncated name
EOF
cat > ../expout <<EOF
$AFILE
separator
separator-1
separator-2
EOF
genfile --length 15360 > $AFILE
genfile --length 15360 --file $AFILE
exec <&-
tar -M -L 10 -c -f arch.1 -f arch.2 $AFILE || exit 1
tar -tM -f arch.1 -f arch.2 || exit 1
echo separator
echo separator-1
genfile --length 15360 > $BFILE
tar -M -L 10 -c -f arch.1 -f arch.2 $BFILE
genfile --length 15360 --file $BFILE
tar -M -L 10 -c -f arch.1 -f arch.2 $BFILE || exit 1
echo separator-2
mv $BFILE bfile
tar -M -x -f arch.1 -f arch.2 || exit 1
cmp $BFILE bfile
],
[0],
[expout],

View File

@@ -1,7 +1,7 @@
# Process this file with autom4te to create testsuite. -*- Autotest -*-
# Test suite for GNU tar.
# Copyright (C) 2005 Free Software Foundation, Inc.
# Copyright (C) 2005, 2006 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
@@ -33,13 +33,13 @@
# sufficiently small, in order for the entire archive to fit in two volumes.
# 3. Test the created multi-volume archive.
AT_SETUP([Split directory members in a MV archive])
AT_SETUP([split directory members in a MV archive])
AT_KEYWORDS([multivolume multiv multiv04])
AT_TAR_CHECK([
mkdir directory
awk 'BEGIN { for (i = 0; i < 1024; i++) printf("genfile -f directory/%014X\n", i); }' </dev/null | sh
awk 'BEGIN { for (i = 0; i < 1024; i++) printf("genfile -f directory/%014x\n", i); }' </dev/null | sh
exec <&-

View File

@@ -1,7 +1,7 @@
# Process this file with autom4te to create testsuite. -*- Autotest -*-
# Test suite for GNU tar.
# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
# Copyright (C) 2004, 2005, 2006 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
@@ -32,8 +32,8 @@ AT_KEYWORDS([pipe])
AT_TAR_CHECK([
mkdir directory
genfile --length 10240 --pattern zeros > directory/file1
genfile --length 13 > directory/file2
genfile --length 10240 --pattern zeros --file directory/file1
genfile --length 13 --file directory/file2
tar cf archive directory|sort 2>/dev/null
mv directory orig
cat archive | tar xfv - | sort 2>/dev/null

View File

@@ -1,7 +1,7 @@
# Process this file with autom4te to create testsuite. -*- Autotest -*-
# Test suite for GNU tar.
# Copyright (C) 2004 Free Software Foundation, Inc.
# Copyright (C) 2004, 2006 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
@@ -27,8 +27,8 @@ AT_SETUP([same-order01])
AT_KEYWORDS([same-order same-order01])
AT_TAR_CHECK([
genfile -l 1024 > file1
genfile -l 1024 > file2
genfile -l 1024 -f file1
genfile -l 1024 -f file2
tar cf archive file1 file2
mkdir directory

View File

@@ -1,7 +1,7 @@
# Process this file with autom4te to create testsuite. -*- Autotest -*-
# Test suite for GNU tar.
# Copyright (C) 2004 Free Software Foundation, Inc.
# Copyright (C) 2004, 2006 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
@@ -26,8 +26,8 @@ AT_SETUP([same-order02])
AT_KEYWORDS([same-order same-order02])
AT_TAR_CHECK([
genfile -l 1024 > file1
genfile -l 1024 > file2
genfile -l 1024 -f file1
genfile -l 1024 -f file2
tar cf archive file1 file2
mkdir en

View File

@@ -31,7 +31,7 @@ mkdir directory
tar -c -b 1 directory | tar -t >/dev/null
tar -c -b 1 -f archive directory
tar -t -f archive >/dev/null
tar -t <archive >/dev/null
tar -t -f - < archive >/dev/null
rm -r directory
])

View File

@@ -1,7 +1,7 @@
# Process this file with autom4te to create testsuite. -*- Autotest -*-
# Test suite for GNU tar.
# Copyright (C) 2004 Free Software Foundation, Inc.
# Copyright (C) 2004, 2006 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
@@ -18,13 +18,13 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
AT_SETUP([Sparse files])
AT_SETUP([sparse files])
AT_KEYWORDS([sparse sparse01])
AT_TAR_CHECK([
genfile --length 1000 > begin
genfile --length 1000 > end
genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL
genfile --length 1000 -f begin
genfile --length 1000 -f end
genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || AT_SKIP_TEST
tar -c -f archive --sparse begin sparsefile end || exit 1
echo separator

View File

@@ -1,7 +1,7 @@
# Process this file with autom4te to create testsuite. -*- Autotest -*-
# Test suite for GNU tar.
# Copyright (C) 2004 Free Software Foundation, Inc.
# Copyright (C) 2004, 2006 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
@@ -18,7 +18,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
AT_SETUP([Extracting sparse file over a pipe])
AT_SETUP([extracting sparse file over a pipe])
AT_KEYWORDS([sparse sparse02])
# Tar 1.14 - 1.15.1 was unable to extract sparse files to a pipe.
@@ -26,7 +26,7 @@ AT_KEYWORDS([sparse sparse02])
# 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
genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || AT_SKIP_TEST
tar -c -f archive --sparse sparsefile || exit 1
echo separator

View File

@@ -1,7 +1,7 @@
# Process this file with autom4te to create testsuite. -*- Autotest -*-
# Test suite for GNU tar.
# Copyright (C) 2005 Free Software Foundation, Inc.
# Copyright (C) 2005, 2006 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
@@ -18,7 +18,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
AT_SETUP([Storing sparse files > 8G])
AT_SETUP([storing sparse files > 8G])
AT_KEYWORDS([sparse sparse03])
# Tar 1.15.1 incorrectly computed sparse member size if the extended
@@ -27,9 +27,9 @@ AT_KEYWORDS([sparse sparse03])
# http://lists.gnu.org/archive/html/bug-tar/2005-06/msg00040.html
AT_TAR_CHECK([
genfile --length 1000 > begin
genfile --length 1000 > end
genfile --sparse --file sparsefile --block-size 512 8G A
genfile --length 1000 --file begin
genfile --length 1000 --file end
genfile --sparse --file sparsefile --block-size 512 8G A || AT_SKIP_TEST
tar -c -f archive --sparse begin sparsefile end || exit 1
echo separator

View File

@@ -1,7 +1,7 @@
# Process this file with autom4te to create testsuite. -*- Autotest -*-
# Test suite for GNU tar.
# Copyright (C) 2005 Free Software Foundation, Inc.
# Copyright (C) 2005, 2006 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
@@ -18,7 +18,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
AT_SETUP([Sparse files in MV archives])
AT_SETUP([sparse files in MV archives])
AT_KEYWORDS([sparse multiv sparsemv])
# Check if sparse files are correctly split between GNU multi-volume
@@ -30,7 +30,7 @@ AT_KEYWORDS([sparse multiv sparsemv])
AT_TAR_CHECK([
exec <&-
genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || AT_SKIP_TEST
genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || AT_SKIP_TEST
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
@@ -40,7 +40,7 @@ echo "Compare archive"
tar -d -M -f arc.1 -f arc.2
echo "Pass 2: Split within a data block"
genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGH || AT_SKIP_TEST
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"

View File

@@ -1,7 +1,7 @@
# Process this file with autom4te to create testsuite. -*- Autotest -*-
# Test suite for GNU tar.
# Copyright (C) 2005 Free Software Foundation, Inc.
# Copyright (C) 2005, 2006 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
@@ -18,7 +18,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
AT_SETUP([Sparse files in PAX MV archives])
AT_SETUP([sparse files in PAX MV archives])
AT_KEYWORDS([sparse multiv sparsemvp])
# Check if sparse files are correctly split between PAX multi-volume
@@ -30,16 +30,16 @@ exec <&-
genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || AT_SKIP_TEST
echo "Pass 1: Split between data blocks"
echo "Create archive"
tar --sparse -c --record-size=512 -M -L7 -f arc.1 -f arc.2 -f arc.3 sparsefile
tar --sparse -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"
tar -d -M -f arc.1 -f arc.2 -f arc.3
echo "Pass 2: Split within a data block"
genfile --sparse --file sparsefile 0 ABCDEFGHIJKL 1M ABCDEFG || AT_SKIP_TEST
genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || AT_SKIP_TEST
echo "Create archive"
tar --sparse -c --record-size=512 -M -L7 -f arc.1 -f arc.2 -f arc.3 sparsefile
tar --sparse -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"

View File

@@ -85,6 +85,7 @@ m4_include([extrac02.at])
m4_include([extrac03.at])
m4_include([extrac04.at])
m4_include([extrac05.at])
m4_include([extrac06.at])
m4_include([gzip.at])