* 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.
94 files changed:
-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.
there used to be separate ChangeLog files for each subdirectory.
This file records what used to be in those separate files.
2009-03-04 Sergey Poznyakoff <gray@gnu.org.ua>
Add xz support.
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.
* 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.
2008-11-25 Sergey Poznyakoff <gray@gnu.org.ua>
Do not try to drain the input pipe before closing the
2008-11-25 Sergey Poznyakoff <gray@gnu.org.ua>
Do not try to drain the input pipe before closing the
* src/buffer.c (close_archive): Remove call to
sys_drain_input_pipe. Pass hit_eof as the second
argument to sys_wait_for_child.
* src/buffer.c (close_archive): Remove call to
sys_drain_input_pipe. Pass hit_eof as the second
argument to sys_wait_for_child.
* 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
* 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
(transform_member_name): 2nd arg is int.
(decode_header): Transform file name and link target names.
* src/tar.c: Remove --transform-symlinks.
(transform_member_name): 2nd arg is int.
(decode_header): Transform file name and link target names.
* src/tar.c: Remove --transform-symlinks.
set global flags using `flags=' syntax.
(_transform_name_to_obstack, transform_name_fp)
(transform_name): Take an additional argument, specifying scope
set global flags using `flags=' syntax.
(_transform_name_to_obstack, transform_name_fp)
(transform_name): Take an additional argument, specifying scope
2008-10-19 Sergey Poznyakoff <gray@gnu.org.ua>
2008-10-19 Sergey Poznyakoff <gray@gnu.org.ua>
* tests/sparsemvp.at: Likewise.
* tests/volsize.at: Likewise.
* NEWS: Update.
* 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.
2008-10-16 Sergey Poznyakoff <gray@gnu.org.ua>
* src/common.h (transform_symlinks_option): New global.
* doc/tar.texi: Document --transform-symlinks
* NEWS: Update.
* THANKS: Update.
* 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.
* 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.
2008-10-07 Sergey Poznyakoff <gray@gnu.org.ua>
* src/tar.c (options): Add --lzop option.
2008-10-05 Xavier Hienne <xavier.hienne@free.fr> (tiny change)
* src/checkpoint.c (checkpoint_compile_action): Add missing
2008-10-05 Xavier Hienne <xavier.hienne@free.fr> (tiny change)
* src/checkpoint.c (checkpoint_compile_action): Add missing
2008-09-24 Sergey Poznyakoff <gray@gnu.org.ua>
2008-09-24 Sergey Poznyakoff <gray@gnu.org.ua>
* tests/atlocal.in (decho): New function.
* tests/multiv06.at: Use decho instead of echo2.
* tests/incremental.at: Raise wait interval to 2 seconds.
* 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
2008-07-24 Sergey Poznyakoff <gray@gnu.org.ua>
* src/tar.c (decode_options): Do not allow volume length less
tests/longv7.at, tests/lustar01.at, tests/lustar02.at,
tests/shortfile.at: Update to match new diagnostic wording
(see 2008-05-06).
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.
2008-06-14 Sergey Poznyakoff <gray@gnu.org.ua>
* doc/tar.texi (exclude): Document support for new VCS.
* THANKS: Update.
* tests/multiv05.at: Fix typos.
* tests/volsize.at: Remove a TZ dependency.
* 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
2008-06-14 Dan Drake <dan@dandrake.org> (tiny change)
* src/tar.c (exclude_vcs_files): Support for Bazaar, Mercurial and
2008-05-06 Sergey Poznyakoff <gray@gnu.org.ua>
2008-05-06 Sergey Poznyakoff <gray@gnu.org.ua>
* 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.
* 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
2008-03-31 Sergey Poznyakoff <gray@gnu.org.ua>
* src/create.c (dump_file0): Count links only for actually dumped
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
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
* 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.
* 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.
* src/common.h (check_device_option): New global.
* src/incremen.c (procdir): Use boolean and instead of bitwise
one. Patch by Jean-Louis Martineau.
--check-device. Proposed by Jean-Louis Martineau.
(parse_opt): Hanlde new options.
(decode_options): Initialize check_device_option to true.
--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>
* THANKS: Update
2008-03-06 Sergey Poznyakoff <gray@gnu.org.ua>
* po/.cvsignore: Update
* src/system.c: Remove include setenv.h.
* tests/atlocal.in (STAR_DATA_URL): Update.
* 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>
2008-02-09 Sergey Poznyakoff <gray@gnu.org.ua>
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
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
2007-12-05 Sergey Poznyakoff <gray@gnu.org.ua>
2007-12-05 Sergey Poznyakoff <gray@gnu.org.ua>
EXTRA_DIST = ChangeLog.1 Make.rules
SUBDIRS = doc gnu lib rmt src scripts po tests
EXTRA_DIST = ChangeLog.1 Make.rules
SUBDIRS = doc gnu lib rmt src scripts po tests
$(MAKE) changelog_dir=$(distdir) ChangeLog
-rm -f $(distdir).cpio
find $(distdir) | cpio -Hcrc -o | \
$(MAKE) changelog_dir=$(distdir) ChangeLog
-rm -f $(distdir).cpio
find $(distdir) | cpio -Hcrc -o | \
gen_start_date = 2009-03-06
prev_change_log = ChangeLog.CVS
changelog_dir = .
gen_start_date = 2009-03-06
prev_change_log = ChangeLog.CVS
changelog_dir = .
tar -rf archive --label 'My volume' .
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,
** --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.
** Fix dead loop on extracting existing symlinks with the -k option.
* Time references in --pax-option argument.
Any value from the --pax-option argument that is enclosed in a pair
* 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
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
* Support for xz compression
* 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.
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.
1. The option --xz or -J is used.
2. The xz binary is set as compressor using --use-compress-program option.
- s
Apply transformation to symbolic link targets.
- s
Apply transformation to symbolic link targets.
Apply transformation to hard link targets.
Corresponding upper-case letters negate the meaning, so that
Apply transformation to hard link targets.
Corresponding upper-case letters negate the meaning, so that
during extraction.
For a detailed description, see chapter 6.7 "Modifying File and Member
during extraction.
For a detailed description, see chapter 6.7 "Modifying File and Member
* Info (end-of-volume) scripts
* Info (end-of-volume) scripts
The following options now work with incremental archives as well:
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
--exclude-tag
--exclude-tag-all
--exclude-tag-under
records, even if -P was not used. This is fixed: rename records
contain file names processed in accordance with the command line
settings.
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.
* Fix --version output.
* Recognition of broken archives.
GNU `tar' is able to create archive in the following formats:
*** The format of UNIX version 7
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
*** 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
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.
Please read the file NEWS for more information about POSIX compliance
and new `tar' features.
paragraph-separate: "[ \f]*$"
version-control: never
End:
paragraph-separate: "[ \f]*$"
version-control: never
End:
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
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
- 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>
- 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,
- 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
1. Change to the source tree directory
Once done, proceed as described in the file README (section
INSTALLATION).
Once done, proceed as described in the file README (section
INSTALLATION).
Replace `$HOME/gnulib' with the actual directory where the Gnulib
sources reside.
Replace `$HOME/gnulib' with the actual directory where the Gnulib
sources reside.
For more information about `bootstrap', run `bootstrap --help'.
\f
For more information about `bootstrap', run `bootstrap --help'.
\f
paragraph-separate: "[ ^L]*$"
version-control: never
End:
paragraph-separate: "[ ^L]*$"
version-control: never
End:
%%contributors: Jay Fenlason,
Joy Kendall,
Francois Pinard <pinard@iro.umontreal.ca>
%%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
%%source-tarball: ftp://ftp.gnu.org/pub/gnu/tar/tar-1.15.1.tar.gz
%%source-info: http://savannah.gnu.org/projects/tar
%%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>
%%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>
all-check-docs: check-format check-options check-refs check-fixmes check-unrevised
all-check-docs: check-format check-options check-refs check-fixmes check-unrevised
$(MAKE) -k all-check-docs
#
$(MAKE) -k all-check-docs
#
MAKEINFO="$(MAKEINFO) $(MAKEINFOFLAGS)" \
TEXI2DVI="$(TEXI2DVI) -t @finalout" \
$(GENDOCS) --texi2html tar 'GNU tar manual'
MAKEINFO="$(MAKEINFO) $(MAKEINFOFLAGS)" \
TEXI2DVI="$(TEXI2DVI) -t @finalout" \
$(GENDOCS) --texi2html tar 'GNU tar manual'
@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
@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.
characters were added for readability, real dumpdirs do not contain
them.
@enumerate 1
@item
Previous run dumped a directory @file{foo} which contained the
@enumerate 1
@item
Previous run dumped a directory @file{foo} which contained the
-following three directories:
+following three directories:
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
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
tells tar to rename the temporary directory to @file{foo/a}.
The exact placement of a dumpdir in the archive depends on the
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
@itemize
@item PAX archives
<p>The manual for %%PACKAGE%% is available in the following formats:</p>
<ul>
<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>
(%%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>
chapter.</li>
%%ENDIF HTML_CHAPTER%%
<li><a href="%%PACKAGE%%.html.gz">HTML compressed
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> -
one web page.</li>
<li><a href="%%PACKAGE%%.html_node.tar.gz">HTML compressed
(%%HTML_NODE_TGZ_SIZE%%K gzipped tar file)</a> -
-Please send FSF & GNU inquiries to
+Please send FSF & GNU inquiries to
<a href="mailto:gnu@gnu.org"><em>gnu@gnu.org</em></a>.
<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
the FSF.
<br />
Please send broken links and other corrections (or suggestions) to
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
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
The @code{size} field is the size of the file in bytes; linked files
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
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
@node Dumpdir
@unnumberedsec Dumpdir
@include dumpdir.texi
@node Dumpdir
@unnumberedsec Dumpdir
@include dumpdir.texi
;; This file redefines texinfo-master-menu-list so that it takes into
;; account included files.
;; 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.
;; documentation string from the previous menu. However, since such a
;; menu is illegal in a texinfo file, we can live with it.
(require 'texnfo-upd)
(defun texinfo-master-menu-list-recursive (title)
(require 'texnfo-upd)
(defun texinfo-master-menu-list-recursive (title)
@end enumerate
@c End of snapshot.texi
@end enumerate
@c End of snapshot.texi
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{}.
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{}.
$ @kbd{tar-snapshot-edit -b -r 0x0306-0x4500 /var/backup/snap.a}
file version 2
@end smallexample
$ @kbd{tar-snapshot-edit -b -r 0x0306-0x4500 /var/backup/snap.a}
file version 2
@end smallexample
@end ifclear
@xopindex{\option\, summary}
@end macro
@end ifclear
@xopindex{\option\, summary}
@end macro
$(AM_V_at)mv $@-t $@
BUILT_SOURCES = rmt-command.h
CLEANFILES = rmt-command.h rmt-command.h-t
$(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 = \
noinst_HEADERS = system.h system-ioctl.h rmt.h paxlib.h stdopen.h
libtar_a_SOURCES = \
rmt.h \
stdopen.c stdopen.h \
system.h system-ioctl.h
rmt.h \
stdopen.c stdopen.h \
system.h system-ioctl.h
SLEEP_TIME=15
# Script to be run when it's time to insert a new tape in for the next
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
# 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
#DUMP_REMIND_SCRIPT='rsh apple-gunkies /home/gd2/dump/dump-remind'
# Message to display on the terminal while waiting for dump time. Usually
# entertaining than this. The awk script here saves some redundant
# repetition, but is not really all that desirable.
SLEEP_MESSAGE="`awk '
# entertaining than this. The awk script here saves some redundant
# repetition, but is not really all that desirable.
SLEEP_MESSAGE="`awk '
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 !!!!!\"
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 !!!!!\"
# 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
# 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
#
# 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
PATH="/usr/lib:/usr/local/gnubin:${PATH}"
export PATH
#
# 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
#
# 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
recipients="`
finger .clients 2> /dev/null \
| sed -ne '
recipients="`
finger .clients 2> /dev/null \
| sed -ne '
Subject: Backup needs new tape for volume ${TAR_VOLUME}
Reply-To: ${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
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
Subject: Volume ${TAR_VOLUME} for backup has been added
Reply-To: ${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__
The backup has been continued, so for now no further attention is required.
__EOF__
sub write_incr_db_0 ($$) {
my $info = shift;
my $file = shift;
sub write_incr_db_0 ($$) {
my $info = shift;
my $file = shift;
my $timestamp_sec = $info->[1];
print $file "$timestamp_sec\n";
my $timestamp_sec = $info->[1];
print $file "$timestamp_sec\n";
sub write_incr_db_1 ($$) {
my $info = shift;
my $file = shift;
sub write_incr_db_1 ($$) {
my $info = shift;
my $file = shift;
print $file "GNU tar-1.15-1\n";
my $timestamp_sec = $info->[1];
print $file "GNU tar-1.15-1\n";
my $timestamp_sec = $info->[1];
sub write_incr_db_2 ($$) {
my $info = shift;
my $file = shift;
sub write_incr_db_2 ($$) {
my $info = shift;
my $file = shift;
print $file "GNU tar-1.16-2\n";
my $timestamp_sec = $info->[1];
print $file "GNU tar-1.16-2\n";
my $timestamp_sec = $info->[1];
fi
if [ "$T" = "M" ]; then
SKIP=$(($SKIP + 1))
fi
if [ "$T" = "M" ]; then
SKIP=$(($SKIP + 1))
Copyright (C) 2006, 2007 Free Software Foundation, Inc.
Written by Sergey Poznyakoff
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
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
static char *buffer;
static size_t bufsize = OFF_T_STRSIZE_BOUND;
char *p, *q;
static char *buffer;
static size_t bufsize = OFF_T_STRSIZE_BOUND;
char *p, *q;
buffer = emalloc (bufsize);
do
{
size_t len, s;
buffer = emalloc (bufsize);
do
{
size_t len, s;
if (!fgets (buffer, bufsize, fp))
return 0;
len = strlen (buffer);
if (!fgets (buffer, bufsize, fp))
return 0;
len = strlen (buffer);
if (verbose)
printf ("Reading extended header file\n");
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);
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);
if (expect && strcmp (kw, expect))
die (1, "bad keyword sequence: expected `%s' but found `%s'",
expect, kw);
if (verbose)
printf ("Reading v.1.0 sparse map\n");
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);
get_line (nbuf, sizeof nbuf, ifp);
sparse_map_size = string_to_size (nbuf, NULL);
sparse_map = emalloc (sparse_map_size * sizeof *sparse_map);
fseeko (ifp, ((ftell (ifp) + BLOCKSIZE - 1) / BLOCKSIZE) * BLOCKSIZE,
SEEK_SET);
fseeko (ifp, ((ftell (ifp) + BLOCKSIZE - 1) / BLOCKSIZE) * BLOCKSIZE,
SEEK_SET);
void
expand_sparse (FILE *sfp, int ofd)
void
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 (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 (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;
for (i = 0; i < sparse_map_size; i++)
{
size_t size = sparse_map[i].numbytes;
if (name[0] == '.' && name[1] == '/')
name += 2;
p = name + strlen (name) - 1;
s = NULL;
if (name[0] == '.' && name[1] == '/')
name += 2;
p = name + strlen (name) - 1;
s = NULL;
for (; p > name && *p != '/'; p--)
;
if (*p == '/')
for (; p > name && *p != '/'; p--)
;
if (*p == '/')
for (p--; p > name && *p != '/'; p--)
;
}
for (p--; p > name && *p != '/'; p--)
;
}
FILE *ifp;
struct stat st;
int ofd;
FILE *ifp;
struct stat st;
int ofd;
progname = argv[0];
while ((c = getopt (argc, argv, "hnvx:")) != EOF)
{
progname = argv[0];
while ((c = getopt (argc, argv, "hnvx:")) != EOF)
{
case 'v':
verbose++;
break;
case 'v':
verbose++;
break;
if (stat (inname, &st))
die (1, "cannot stat %s (%d)", inname, errno);
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);
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);
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);
ofd = open (outname, O_RDWR|O_CREAT|O_TRUNC, st.st_mode);
if (ofd == -1)
die (1, "cannot open file %s (%d)", outname, errno);
printf ("Finished dry run\n");
return 0;
}
printf ("Finished dry run\n");
return 0;
}
expand_sparse (ifp, ofd);
fclose (ifp);
expand_sparse (ifp, ofd);
fclose (ifp);
if (verbose)
printf ("Done\n");
if (verbose)
printf ("Done\n");
if (outsize)
{
if (stat (outname, &st))
if (outsize)
{
if (stat (outname, &st))
if (st.st_size != outsize)
die (1, "expanded file has wrong size");
}
if (st.st_size != outsize)
die (1, "expanded file has wrong size");
}
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. */
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;
#define TARLONG_FORMAT "%.0f"
typedef double tarlong;
/* We're reading, but we just read the last block and it's time to update.
Declared in update.c
/* 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;
FIXME: Either eliminate it or move it to common.h.
*/
extern bool time_to_start_writing;
bufmap_locate (size_t off)
{
struct bufmap *map;
bufmap_locate (size_t off)
{
struct bufmap *map;
for (map = bufmap_head; map; map = map->next)
{
if (!map->next
for (map = bufmap_head; map; map = map->next)
{
if (!map->next
FATAL_ERROR ((0, 0, _("No archive name given")));
tar_stat_destroy (¤t_stat_info);
FATAL_ERROR ((0, 0, _("No archive name given")));
tar_stat_destroy (¤t_stat_info);
record_index = 0;
init_buffer ();
record_index = 0;
init_buffer ();
map = map->next;
bufmap_reset (map, map ? (- map->start) : 0);
}
map = map->next;
bufmap_reset (map, map ? (- map->start) : 0);
}
size_t copy_size;
size_t bufsize;
struct bufmap *map;
size_t copy_size;
size_t bufsize;
struct bufmap *map;
status = _flush_write ();
if (status != record_size && !multi_volume_option)
archive_write_error (status);
status = _flush_write ();
if (status != record_size && !multi_volume_option)
archive_write_error (status);
}
map = bufmap_locate (status);
}
map = bufmap_locate (status);
if (status % BLOCKSIZE)
{
ERROR ((0, 0, _("write did not end on a block boundary")));
if (status % BLOCKSIZE)
{
ERROR ((0, 0, _("write did not end on a block boundary")));
copy_ptr = record_start->buffer + status;
copy_size = buffer_level - status;
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;
/* Switch to the next buffer */
record_index = !record_index;
init_buffer ();
inhibit_map = 1;
if (volume_label_option)
add_volume_label ();
if (volume_label_option)
add_volume_label ();
dumpdir_cmp (const char *a, const char *b)
{
size_t len;
dumpdir_cmp (const char *a, const char *b)
{
size_t len;
a += len;
b += len;
break;
a += len;
b += len;
break;
case 'D':
if (strcmp(a, b))
return 1;
case 'D':
if (strcmp(a, b))
return 1;
a += len;
b += len;
break;
a += len;
b += len;
break;
case 'R':
case 'T':
case 'X':
case 'R':
case 'T':
case 'X':
flush_read ();
while (1)
{
flush_read ();
while (1)
{
- enum read_header status = read_header (¤t_header,
- ¤t_stat_info,
+ enum read_header status = read_header (¤t_header,
+ ¤t_stat_info,
read_header_auto);
if (status == HEADER_FAILURE)
read_header_auto);
if (status == HEADER_FAILURE)
{
char buf[UINTMAX_STRSIZE_BOUND];
{
char buf[UINTMAX_STRSIZE_BOUND];
- status = read_header (¤t_header, ¤t_stat_info,
+ status = read_header (¤t_header, ¤t_stat_info,
read_header_auto);
if (status == HEADER_ZERO_BLOCK)
break;
read_header_auto);
if (status == HEADER_ZERO_BLOCK)
break;
STRINGIFY_BIGINT (current_block_ordinal (), buf)));
}
}
STRINGIFY_BIGINT (current_block_ordinal (), buf)));
}
}
diff_archive ();
tar_stat_destroy (¤t_stat_info);
}
diff_archive ();
tar_stat_destroy (¤t_stat_info);
}
check_exclusion_tags (const char *dirname, const char **tag_file_name)
{
static char *tagname;
check_exclusion_tags (const char *dirname, const char **tag_file_name)
{
static char *tagname;
size_t dlen = strlen (dirname);
int addslash = !ISSLASH (dirname[dlen-1]);
size_t noff = 0;
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;
for (tag = exclusion_tags; tag; tag = tag->next)
{
size_t size = dlen + addslash + tag->length + 1;
1. In OLDGNU_FORMAT all strings in a tar header end in \0
2. Incremental archives use oldgnu_header.
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];
Apart from this they are completely identical. */
uintmax_t s = (negsub &= archive_format == GNU_FORMAT) ? - sub : sub;
char subbuf[UINTMAX_STRSIZE_BOUND + 1];
size_t length = strlen (name);
size_t i, nlen;
union block *header;
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"),
if (length > PREFIX_FIELD_SIZE + NAME_FIELD_SIZE + 1)
{
ERROR ((0, 0, _("%s: file name is too long (max %d); not dumped"),
char *p;
int type;
time_t t;
char *p;
int type;
time_t t;
if (st->xhdr.buffer || st->xhdr.stk == NULL)
return old_header;
if (st->xhdr.buffer || st->xhdr.stk == NULL)
return old_header;
while (size_left > 0)
{
size_t bufsize, count;
while (size_left > 0)
{
size_t bufsize, count;
blk = find_next_block ();
bufsize = available_space_after (blk);
blk = find_next_block ();
bufsize = available_space_after (blk);
size_left),
quotearg_colon (st->orig_file_name),
STRINGIFY_BIGINT (size_left, buf)));
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;
set_exit_status (TAREXIT_DIFFERS);
pad_archive (size_left - (bufsize - count));
return dump_status_short;
size_t bufsize;
ssize_t count;
const char *buffer, *p_buffer;
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);
block_ordinal = current_block_ordinal ();
buffer = safe_directory_contents (gnu_list_name->directory);
totsize = dumpdir_size (buffer);
finish_header (st, blk, block_ordinal);
p_buffer = buffer;
size_left = totsize;
finish_header (st, blk, block_ordinal);
p_buffer = buffer;
size_left = totsize;
mv_begin_write (st->file_name, totsize, totsize);
while (size_left > 0)
{
mv_begin_write (st->file_name, totsize, totsize);
while (size_left > 0)
{
{
char *name_buf;
size_t name_size;
{
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;
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;
case exclusion_tag_none:
{
char const *entry;
if (!excluded_name (name_buf))
dump_file (name_buf, false, our_device);
}
if (!excluded_name (name_buf))
dump_file (name_buf, false, our_device);
}
free (name_buf);
}
break;
free (name_buf);
}
break;
dump_file (name_buf, false, our_device);
free (name_buf);
break;
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"));
case exclusion_tag_under:
exclusion_tag_warning (st->orig_file_name, tag_file_name,
_("contents not dumped"));
assign_string (&linkname, st->orig_file_name);
transform_name (&linkname, XFORM_LINK);
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;
lp = xmalloc (offsetof (struct link, name)
+ strlen (linkname) + 1);
lp->ino = st->stat.st_ino;
lp->nlink = st->stat.st_nlink;
strcpy (lp->name, linkname);
free (linkname);
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 (! ((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--;
if (duplicate != lp)
abort ();
lp->nlink--;
/* See if we want only new files, and check if this one is too old to
put in the archive.
/* 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. */
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)
if (!(incremental_option && !is_individual_file (p))
&& !S_ISDIR (st->stat.st_mode)
&& OLDER_TAR_STAT_TIME (*st, m)
ok = dump_dir (fd, st, top_level, parent_device);
/* dump_dir consumes FD if successful. */
ok = dump_dir (fd, st, top_level, parent_device);
/* dump_dir consumes FD if successful. */
if (current_block == record_end)
flush_archive ();
if (current_block == record_end)
flush_archive ();
- status = read_header (¤t_header, ¤t_stat_info,
+ status = read_header (¤t_header, ¤t_stat_info,
read_header_auto);
xheader_decode (¤t_stat_info);
read_header_auto);
xheader_decode (¤t_stat_info);
set_next_block_after (current_header);
blocks_to_skip = (current_stat_info.stat.st_size
+ BLOCKSIZE - 1) / BLOCKSIZE;
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);
while (record_end - current_block <= blocks_to_skip)
{
blocks_to_skip -= (record_end - current_block);
-/* 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
Copyright (C) 2009 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
};
static struct compression_suffix compression_suffixes[] = {
};
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) },
#define S(s,p) #s, sizeof (#s) - 1, __CAT2__(p,_PROGRAM)
{ S(gz, GZIP) },
{ S(tgz, GZIP) },
find_compression_program (const char *name, const char *defprog)
{
char *suf = strrchr (name, '.');
find_compression_program (const char *name, const char *defprog)
{
char *suf = strrchr (name, '.');
if (program)
use_compress_program_option = program;
}
if (program)
use_compress_program_option = program;
}
if (xstrtoumax (arg, &p, 10, &u, TAR_SIZE_SUFFIXES) != LONGINT_OK)
USAGE_ERROR ((0, 0, "%s: %s", quotearg_colon (arg),
_("Invalid tape length")));
if (xstrtoumax (arg, &p, 10, &u, TAR_SIZE_SUFFIXES) != LONGINT_OK)
USAGE_ERROR ((0, 0, "%s: %s", quotearg_colon (arg),
_("Invalid tape length")));
case RECORD_SIZE_OPTION:
{
uintmax_t u;
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),
if (! (xstrtoumax (arg, NULL, 10, &u, TAR_SIZE_SUFFIXES) == LONGINT_OK
&& u == (size_t) u))
USAGE_ERROR ((0, 0, "%s: %s", quotearg_colon (arg),
/* Extended headers */
struct xheader xhdr;
/* Extended headers */
struct xheader xhdr;
/* For dumpdirs */
bool is_dumpdir; /* Is the member a dumpdir? */
bool skipped; /* The member contents is already read
/* For dumpdirs */
bool is_dumpdir; /* Is the member a dumpdir? */
bool skipped; /* The member contents is already read
- enum read_header status = read_header (¤t_header,
- ¤t_stat_info,
+ enum read_header status = read_header (¤t_header,
+ ¤t_stat_info,
read_header_auto);
switch (status)
read_header_auto);
switch (status)
else
{
namebuf_t nbuf = namebuf_create (name->name);
else
{
namebuf_t nbuf = namebuf_create (name->name);
for (p = dirp; *p; p += strlen (p) + 1)
addname (namebuf_name (nbuf, p),
0, false, NULL);
for (p = dirp; *p; p += strlen (p) + 1)
addname (namebuf_name (nbuf, p),
0, false, NULL);
namebuf_free (nbuf);
free (dirp);
namebuf_free (nbuf);
free (dirp);
{
int negate = 0;
int option;
{
int negate = 0;
int option;
if (strcmp (arg, "none") == 0)
{
warning_option = 0;
if (strcmp (arg, "none") == 0)
{
warning_option = 0;
- option = XARGMATCH ("--warning", arg,
+ option = XARGMATCH ("--warning", arg,
warning_args, warning_types);
if (negate)
warning_option &= ~option;
else
warning_option |= option;
}
warning_args, warning_types);
if (negate)
warning_option &= ~option;
else
warning_option |= option;
}
if (xhdr->stk)
{
char *name;
if (xhdr->stk)
{
char *name;
xheader_finish (xhdr);
xheader_write (XGLTYPE, name = xheader_ghdr_name (), time (NULL), xhdr);
free (name);
xheader_finish (xhdr);
xheader_write (XGLTYPE, name = xheader_ghdr_name (), time (NULL), xhdr);
free (name);
if (!p)
FATAL_ERROR ((0, 0, _("Unexpected EOF in archive")));
if (!p)
FATAL_ERROR ((0, 0, _("Unexpected EOF in archive")));
memcpy (&xhdr->buffer[j], p->buffer, len);
set_next_block_after (p);
memcpy (&xhdr->buffer[j], p->buffer, len);
set_next_block_after (p);
# 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.
# 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
# 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])
AT_SETUP([appending files with long names])
AT_KEYWORDS([append append01])
[],[],[],[oldgnu, ustar, posix, gnu])
AT_CLEANUP
[],[],[],[oldgnu, ustar, posix, gnu])
AT_CLEANUP
# Using tar 1.15.x the following equivalent command sets:
#
# 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
# and
# 2. tar cfT archive /dev/null
# tar rf archive file1
MTIME="--mtime=@0"
# For PAX archives, we need to make sure extended header names are
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
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
STAR_DATA_URL=ftp://ftp.berlios.de/pub/star/testscripts
if test -z "$STAR_TESTSCRIPTS"; then
STAR_TESTSCRIPTS=$TEST_DATA_DIR
STAR_DATA_URL=ftp://ftp.berlios.de/pub/star/testscripts
if test -z "$STAR_TESTSCRIPTS"; then
STAR_TESTSCRIPTS=$TEST_DATA_DIR
# tarball_prereq file sum dir url
tarball_prereq() {
# tarball_prereq file sum dir url
tarball_prereq() {
if test -r $3/$1; then
:
elif test -n "$FULL_TEST"; then
wget -q --directory-prefix=$3 $4/$1
fi
if test -r $3/$1; then
:
elif test -n "$FULL_TEST"; then
wget -q --directory-prefix=$3 $4/$1
fi
echo "$2 $3/$1" | md5sum --status --check - >/dev/null 2>&1
}
echo "$2 $3/$1" | md5sum --status --check - >/dev/null 2>&1
}
do touch $prefix$i
done
tar -cf archive ./$prefix* &&
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
echo "Signature: 8a477f597d28d172789f06886806bc55" > dir/rock/CACHEDIR.TAG
echo "test" > dir/rock/file
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
do
echo OPTION $option
tar -cf archive.tar --$option -v dir 2>err | sort
tar tf archive.tar | sort
done
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
do
echo OPTION $option
tar -cf archive.tar --${option}=tagfile -v dir 2>err | sort
#
# Reported-by: Matthew Peterson <mrpeterson2@gmail.com>
# References: <AANLkTin0teb1dcl0HCNquHxvN4HQnJmP6aK7CJCqy0sd@mail.gmail.com>
#
# 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])
AT_SETUP([exclude: long files in pax archives])
AT_KEYWORDS([exclude exclude06])
tar -tf archive \
--exclude='./*1' \
--exclude='d*/*1' \
tar -tf archive \
--exclude='./*1' \
--exclude='d*/*1' \
- --exclude='d*/s*/*2' | sort
+ --exclude='d*/s*/*2' | sort
AT_SETUP([extracting selected members from pax])
AT_KEYWORDS([extract extract05])
AT_SETUP([extracting selected members from pax])
AT_KEYWORDS([extract extract05])
[jeden
cztery
])
AT_TAR_CHECK([
[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
genfile --length 118 --file jeden
genfile --length 223 --file dwa
genfile --length 517 --file trzy
# 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
# 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
#
# Reported by: Ian Jackson <iwj@ubuntu.com>
#
#
# Reported by: Ian Jackson <iwj@ubuntu.com>
#
# Make sure user's umask is honored, even if we are superuser
TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions"
# Make sure user's umask is honored, even if we are superuser
TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions"
mkdir directory
chmod 777 directory
genfile --stat=mode:777 directory
mkdir directory
chmod 777 directory
genfile --stat=mode:777 directory
[],[],[],[ustar]) # Testing one format is enough
AT_CLEANUP
[],[],[],[ustar]) # Testing one format is enough
AT_CLEANUP
# instead.
#
# Reported by: Solar Designer <solar@openwall.com>
# 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
#
# References: <20090228235820.GA13362@openwall.com>
# http://lists.gnu.org/archive/html/bug-tar/2009-03/msg00000.html
#
# Timing information: see filerem01.at
AT_CLEANUP
# Timing information: see filerem01.at
AT_CLEANUP
[],[],[],[gnu, oldgnu, posix])
AT_CLEANUP
[],[],[],[gnu, oldgnu, posix])
AT_CLEANUP
# 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
# 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
# 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>
#
# References: <200511291228.47081.karaman@dssgmbh.de>
mv directory orig
echo Listing of archive.1
mv directory orig
echo Listing of archive.1
-tar -tf archive.1 | sort
+tar -tf archive.1 | sort
echo Listing of archive.2
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
echo Directory after first restore
tar -xf archive.1 -g db
echo Directory after second restore
tar -xf archive.2 -g db
echo Directory after second restore
tar -xf archive.2 -g db
],
[0],
[Listing of archive.1
],
[0],
[Listing of archive.1
AT_CLEANUP
# End of incr03.at
AT_CLEANUP
# End of incr03.at
],[],[],[],[gnu, oldgnu, posix])
AT_CLEANUP
],[],[],[],[gnu, oldgnu, posix])
AT_CLEANUP
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
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
],[],[],[gnu,oldgnu,posix])
AT_CLEANUP
],[],[],[gnu,oldgnu,posix])
AT_CLEANUP
],[],[],[gnu,oldgnu,posix])
AT_CLEANUP
],[],[],[gnu,oldgnu,posix])
AT_CLEANUP
],[],[],[gnu,oldgnu,posix])
AT_CLEANUP
],[],[],[gnu,oldgnu,posix])
AT_CLEANUP
AT_CLEANUP
# End of link02.at
AT_CLEANUP
# End of link02.at
[],[],[],[gnu, oldgnu])
AT_CLEANUP
[],[],[],[gnu, oldgnu])
AT_CLEANUP
# 02110-1301, USA.
# Check if listed-incremental backups work for files moved from one directory
# 02110-1301, USA.
# Check if listed-incremental backups work for files moved from one directory
# Based on a script by Martin Simmons <ZYHYLCRMZPRP@spammotel.com>
# Based on a script by Martin Simmons <ZYHYLCRMZPRP@spammotel.com>
# <20040626230315.163AA1D148@cpc5-cmbg1-6-0-cust208.cmbg.cable.ntl.com>
# http://lists.gnu.org/archive/html/bug-tar/2004-06/msg00028.html
# <20040626230315.163AA1D148@cpc5-cmbg1-6-0-cust208.cmbg.cable.ntl.com>
# http://lists.gnu.org/archive/html/bug-tar/2004-06/msg00028.html
echo Creating incremental archive
echo >&2 "Creating incremental archive"
cp -p tart.incr1 tart.incr2
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
# 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.
# 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
echo Final files:
find tart -print | sort 2>/dev/null
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
# 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
# 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
[],[],[],[gnu,oldgnu])
AT_CLEANUP
[],[],[],[gnu,oldgnu])
AT_CLEANUP
[],[],[],[],[gnu, oldgnu, pax])
AT_CLEANUP
[],[],[],[],[gnu, oldgnu, pax])
AT_CLEANUP
# Previous versions of tar were not able to skip a member straddling
# the multivolume archive boundary. Reported by Mads Martin Joergensen
# <mmj@suse.de>
# 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])
# http://lists.gnu.org/archive/html/bug-tar/2004-04/msg00002.html
AT_SETUP([skipping a straddling member])
# References: <20040809214854.GB32706@suse.de>
# http://lists.gnu.org/archive/html/bug-tar/2004-08/msg00012.html
# <200604270859.47241.Juergen.Vollmer@informatik-vollmer.de>
# 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])
AT_SETUP([MV archive & long filenames])
AT_KEYWORDS([multivolume multiv multiv03])
[],[],[gnu, oldgnu])
AT_CLEANUP
[],[],[gnu, oldgnu])
AT_CLEANUP
echo separator
mkdir bak
mv m4_foreach([f],[FILELIST],f )bak
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
m4_foreach([f],
[FILELIST],
[echo Diffing f
],[],[], [gnu])
AT_CLEANUP
],[],[], [gnu])
AT_CLEANUP
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Description: When creating POSIX multivolume archives, tar may in
# 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.
# 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.
# 02110-1301, USA.
# Description: Test basic handling of renamed directory in the incremental
# 02110-1301, USA.
# Description: Test basic handling of renamed directory in the incremental
AT_SETUP([renamed dirs in incrementals])
AT_KEYWORDS([incremental rename rename01])
AT_SETUP([renamed dirs in incrementals])
AT_KEYWORDS([incremental rename rename01])
tar xfg arch.1 /dev/null
echo "Begin directory listing 1"
tar xfg arch.1 /dev/null
echo "Begin directory listing 1"
echo "End directory listing 1"
tar xfg arch.2 /dev/null
echo "End directory listing 1"
tar xfg arch.2 /dev/null
# 02110-1301, USA.
# Description: Incremental archives should be able to handle directories
# 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])
AT_SETUP([move between hierarchies])
AT_KEYWORDS([incremental rename rename02])
sort tmperr >&2
echo "Begin directory listing 1"
sort tmperr >&2
echo "Begin directory listing 1"
echo "End directory listing 1"
tar xfgv arch.2 /dev/null
echo "End directory listing 1"
tar xfgv arch.2 /dev/null
tar -g incr -cf arch.2 -v foo 2>tmperr
sort tmperr >&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"
echo "Begin directory listing 1"
echo "End directory listing 1"
tar xfgv arch.2 /dev/null
echo "End directory listing 1"
tar xfgv arch.2 /dev/null
AT_CLEANUP
# End of rename04.at
AT_CLEANUP
# End of rename04.at
AT_CLEANUP
# End of rename05.at
AT_CLEANUP
# End of rename05.at
mkdir directory
tar -xf archive --same-order -C directory || exit 1
mkdir directory
tar -xf archive --same-order -C directory || exit 1
# 02110-1301, USA.
# In previous versions a single -C option did not work with --same-order
# 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])
# Test if we did not break the correct behavior.
AT_SETUP([multiple -C options])
# 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>
# 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
AT_TAR_CHECK([
genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || 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"
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
echo "Compare archive"
tar --record-size=512 -d -M -f arc.1 -f arc.2
echo "Create archive"
tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1
echo "Test archive"
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
],
echo "Compare archive"
tar --record-size=512 -d -M -f arc.1 -f arc.2
],
genfile --sparse --file sparsefile $2 || AT_SKIP_TEST
echo "Pass 1: Split between data blocks"
echo "Create archive"
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"
echo "Test archive"
tar -t -M -f arc.1 -f arc.2 -f arc.3
echo "Compare archive"
echo "Pass 2: Split within a data block"
genfile --sparse --file sparsefile $3 || AT_SKIP_TEST
echo "Create archive"
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"
echo "Test archive"
tar -t -M -f arc.1 -f arc.2 -f arc.3
echo "Compare archive"
Compare archive
],
[],[],[],[pax])])
Compare archive
],
[],[],[],[pax])])
example:
make STAR_TESTSCRIPTS=testdir check
example:
make STAR_TESTSCRIPTS=testdir check
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.
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
Following is a short description of the tests:
* gtarfail.at and gtarfail2.at
Requires gnu-multi-fail-volume1.gtar and gnu-multi-fail-volume2.gtar.
These are two parts of a multi-volume archive that previous versions
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).
echo "$1 does not exist or is unreadable"
echo 77
fi
echo "$1 does not exist or is unreadable"
echo 77
fi
check_environ() {
if [ "$STAR_TESTSCRIPTS" = "" ]; then
check_environ() {
if [ "$STAR_TESTSCRIPTS" = "" ]; then
else
echo "STAR_TESTSCRIPTS is not a directory"
exit 77
else
echo "STAR_TESTSCRIPTS is not a directory"
exit 77
ARCHIVE=$STAR_TESTSCRIPTS/ustar-all-quicktest.tar
test_access $ARCHIVE
FILELIST=$STAR_TESTSCRIPTS/quicktest.filelist
ARCHIVE=$STAR_TESTSCRIPTS/ustar-all-quicktest.tar
test_access $ARCHIVE
FILELIST=$STAR_TESTSCRIPTS/quicktest.filelist
${TARTEST:-tartest} < /dev/null > /dev/null 2>&1
if [ $? -eq 127 ]; then
${TARTEST:-tartest} < /dev/null > /dev/null 2>&1
if [ $? -eq 127 ]; then
*) echo "Unknown option: $option" >&2
exit 77;;
esac
*) echo "Unknown option: $option" >&2
exit 77;;
esac
AT_CLEANUP
# End of volsize.at
AT_CLEANUP
# End of volsize.at
[],[],[gnu, oldgnu])
AT_CLEANUP
[],[],[gnu, oldgnu])
AT_CLEANUP