Compare commits
40 Commits
release_1_
...
release_1_
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7b57922073 | ||
|
|
05c6da4c62 | ||
|
|
4ece30109d | ||
|
|
55f1eadbf2 | ||
|
|
9b22262fc6 | ||
|
|
2de140fa95 | ||
|
|
6f6864df13 | ||
|
|
519a7c0c75 | ||
|
|
1ef212d0fb | ||
|
|
333780b227 | ||
|
|
2c56ca0e7f | ||
|
|
63f8de655b | ||
|
|
2743e1ba5b | ||
|
|
40ece6bf4d | ||
|
|
63e835f5c0 | ||
|
|
efe6609cd9 | ||
|
|
b0d5935cb0 | ||
|
|
a1b1b7cc8a | ||
|
|
8940247418 | ||
|
|
0dacafbbb0 | ||
|
|
e3e50c987b | ||
|
|
923f0cda43 | ||
|
|
c485b7984d | ||
|
|
d769b724f4 | ||
|
|
a0eb52da3f | ||
|
|
87ac3207fb | ||
|
|
c634f2c6f1 | ||
|
|
5416153391 | ||
|
|
5bb69a88d8 | ||
|
|
0a848ff669 | ||
|
|
7c0b81cbb9 | ||
|
|
862770bf91 | ||
|
|
89d682d0b9 | ||
|
|
764174dc1d | ||
|
|
5ab30f709a | ||
|
|
e2b8c8fa9f | ||
|
|
42250f5010 | ||
|
|
62571aa7c3 | ||
|
|
32f7047037 | ||
|
|
a69be0adce |
@@ -3,7 +3,6 @@
|
||||
*.tar
|
||||
.bootstrap
|
||||
ABOUT-NLS
|
||||
COPYING
|
||||
INSTALL
|
||||
Makefile
|
||||
Makefile.in
|
||||
|
||||
41
AUTHORS
41
AUTHORS
@@ -1,34 +1,15 @@
|
||||
Authors of GNU tar.
|
||||
|
||||
The following contributions warranted legal paper exchanges with the
|
||||
Free Software Foundation. Also see files ChangeLog and THANKS.
|
||||
Public domain tar was written by John Gilmore, with contributions from
|
||||
Henry Spencer, Fred Fish, Ian Darwin, Geoff Collyer, Stan Barber, Guy
|
||||
Harris, Dave Brower, Richard Todd, Michael Rendell, Stu Heiss, and
|
||||
Rich Salz.
|
||||
|
||||
TAR Sergey Poznyakoff 2003-10
|
||||
Assigns his past and future changes.
|
||||
The FSF version, named GNU tar, was derived from public domain tar by
|
||||
Jay Fenlason and Joy Kendall. Amy Gorin and Melissa Weisshaus
|
||||
contributed to the manual. GNU tar has been maintained in turn by
|
||||
Thomas Bushnell BSG, François Pinard, Paul Eggert, and Sergey
|
||||
Poznyakoff.
|
||||
|
||||
TAR Paul Eggert 2000-10
|
||||
Assigns his past and future changes.
|
||||
|
||||
TAR Jay Fenlason
|
||||
Assigns his changes.
|
||||
|
||||
TAR Richard E Salz 1993-03-11
|
||||
Disclaims changes to getdate.y.
|
||||
|
||||
TAR MANUAL (?) Amy Gorin (US 1963) 1995-01-10
|
||||
Assigns the Tar Manual.
|
||||
|
||||
TAR Francois Pinard Canada 1949 1996-02-01
|
||||
Assigns past and future changes.
|
||||
|
||||
TAR Melissa Weisshaus US 1966 1997-04-09
|
||||
Assigns changes to the manual and future changes.
|
||||
melissa@gnu.ai.mit.edu
|
||||
|
||||
TAR Thomas Michael Innis Bushnell US 1967 1997-04-09
|
||||
Assigns changes.
|
||||
thomas@gnu.ai.mit.edu
|
||||
|
||||
TAR Thomas Michael Innis Bushnell US 1967 1997-04-09
|
||||
Assigns changes to manual.
|
||||
thomas@gnu.ai.mit.edu
|
||||
Many others have contributed to GNU tar; please see the files THANKS
|
||||
and ChangeLog.
|
||||
|
||||
676
COPYING
Normal file
676
COPYING
Normal file
@@ -0,0 +1,676 @@
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
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 of the License, 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, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||
|
||||
119
ChangeLog
119
ChangeLog
@@ -1,7 +1,114 @@
|
||||
2007-10-05 Sergey Poznyakoff <gray@gnu.org.ua>
|
||||
|
||||
* src/create.c (dump_regular_file): Fix file padding in case of
|
||||
truncation to zero size.
|
||||
* NEWS: Update
|
||||
|
||||
2007-10-04 Sergey Poznyakoff <gray@gnu.org.ua>
|
||||
|
||||
* tests/T-null.at: Use AT_DATA for sample output.
|
||||
|
||||
2007-10-03 Sergey Poznyakoff <gray@gnu.org.ua>
|
||||
|
||||
* src/incremen.c (try_purge_directory): Ensure that arguments to T
|
||||
and R are safe.
|
||||
|
||||
2007-09-29 Sergey Poznyakoff <gray@gnu.org.ua>
|
||||
|
||||
* src/incremen.c (obstack_code_rename): Apply safer_name_suffix to
|
||||
name arguments before storing them in T and R records. Reported by
|
||||
Nicholas Cole.
|
||||
|
||||
2007-09-27 Sergey Poznyakoff <gray@gnu.org.ua>
|
||||
|
||||
* configure.ac: Raise version number to 1.18.90
|
||||
* NEWS: Likewise
|
||||
|
||||
* doc/snapshot.texi: Document version 2.
|
||||
* doc/dumpdir.texi: Update.
|
||||
|
||||
Implement --exclude-tag* and --exclude-cache* options for listed
|
||||
incremental archives.
|
||||
New option --exclude-vcs to exclude VCS-specific files and
|
||||
directories.
|
||||
|
||||
* NEWS: Update
|
||||
* doc/tar.texi: Document --exclude-vcs option
|
||||
* src/common.h (exclusion_tag_warning, check_exclusion_tags): New
|
||||
prototypes.
|
||||
* src/create.c (exclusion_tag_warning, check_exclusion_tags):
|
||||
Remove static qualifier.
|
||||
(check_exclusion_tags): account for dirname without terminating
|
||||
slash.
|
||||
(dump_dir0): exclusion_tag_all is handled elsewhere.
|
||||
* src/incremen.c (struct directory): New member tagfile
|
||||
(make_directory): Initialize tagfile to NULL
|
||||
(procdir): New argument: entry
|
||||
Hanlde exclusion tags.
|
||||
(makedumpdir): Take into account directory->tagfile.
|
||||
(scan_directory): Hanlde exclusion tags.
|
||||
* src/tar.c: New option --exclude-vcs
|
||||
(exclude_vcs_files): New function
|
||||
|
||||
2007-09-14 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
* AUTHORS: Remove unnecessary information. Just list the
|
||||
principal authors.
|
||||
* THANKS: Remove info duplicated from AUTHORS.
|
||||
|
||||
2007-08-25 Jim Meyering <jim@meyering.net>
|
||||
|
||||
Don't include <getline.h>. No longer needed.
|
||||
* src/incremen.c: Don't include <getline.h>. No longer needed.
|
||||
* src/buffer.c: Likewise.
|
||||
* src/system.c: Likewise.
|
||||
* src/tar.c: Likewise.
|
||||
|
||||
Avoid shadowing and unused-variable warnings.
|
||||
* src/create.c (check_exclusion_tags): Remove declaration of unused
|
||||
local, "ret".
|
||||
* src/compare.c (diff_dumpdir): Rename stat->stat_data to avoid
|
||||
shadowing the syscall.
|
||||
* src/buffer.c (do_checkpoint): Don't shadow the write syscall.
|
||||
(try_new_volume): Avoid shadowing "access".
|
||||
* src/tar.c (decode_options): Rename index->idx to avoid shadowing.
|
||||
(find_argp_option): Rename option->o to avoid shadowing.
|
||||
* src/incremen.c (scan_directory): Rename local, dir_name->dir,
|
||||
to avoid shadowing the function.
|
||||
(get_directory_contents): Likewise.
|
||||
* src/system.c (global_pid): Rename from "pid", to avoid being
|
||||
shadowed by locals.
|
||||
* src/extract.c (apply_nonancestor_delayed_set_stat):
|
||||
Rename st->sb to avoid shadowing another local.
|
||||
|
||||
2007-08-24 Sergey Poznyakoff <gray@gnu.org.ua>
|
||||
|
||||
* configure.ac, NEWS: Raise version number to 1.18.1
|
||||
|
||||
* src/buffer.c (check_compressed_archive): Detect files smaller
|
||||
than 512 bytes.
|
||||
* tests/shortfile.at: New test case for the above change.
|
||||
* tests/testsuite.at, tests/Makefile.am: Add shortfile.at
|
||||
|
||||
2007-08-19 Sergey Poznyakoff <gray@gnu.org.ua>
|
||||
|
||||
* bootstrap: Gnulib initialization destroyed paxutils m4 files.
|
||||
Initialize paxutils structure after that of gnulib.
|
||||
|
||||
2007-08-12 Sergey Poznyakoff <gray@gnu.org.ua>
|
||||
|
||||
* src/names.c (contains_dot_dot): Fix double-dot recognition in
|
||||
case of duplicate /. Patch by Dmitry V. Levin.
|
||||
|
||||
* bootstrap (symlink_to_gnulib): Make sure the target directory
|
||||
exists and create it if it does not.
|
||||
|
||||
* doc/tar.texi: Fix a typo.
|
||||
|
||||
2007-06-28 Sergey Poznyakoff <gray@gnu.org.ua>
|
||||
|
||||
* bootstrap: Update for the change of the TP URL
|
||||
|
||||
|
||||
2007-06-27 Sergey Poznyakoff <gray@gnu.org.ua>
|
||||
|
||||
Relicense under GPLv3
|
||||
@@ -23,7 +130,7 @@
|
||||
* doc/Makefile.am (tar_TEXINFOS): Add tar-snapshot-edit.texi
|
||||
* doc/tar-snapshot-edit.texi: New file
|
||||
* doc/tar.texi (Fixing Snapshot Files): New appendix
|
||||
|
||||
|
||||
* scripts/tar-snapshot-edit: New file
|
||||
* tests/extrac07.at: Add back write permissions on dir
|
||||
|
||||
@@ -43,21 +150,21 @@
|
||||
|
||||
* doc/tar.texi (Operation Summary): Restore alphabetical order of
|
||||
the options.
|
||||
|
||||
|
||||
2007-06-02 Sergey Poznyakoff <gray@gnu.org.ua>
|
||||
|
||||
Fix bug, introduced on 2007-03-30.
|
||||
|
||||
|
||||
* src/common.h (xform_type): New data type
|
||||
(transform_member_name): Last argument is of xform_type type
|
||||
All callers updated
|
||||
|
||||
* src/extract.c: Update calls to transform_member_name
|
||||
* src/list.c (decode_xform): Exempt symbolic links from component
|
||||
stripping and name suffix normalization.
|
||||
stripping and name suffix normalization.
|
||||
|
||||
* tests/extrac07.at: Update
|
||||
|
||||
|
||||
2007-05-30 Sergey Poznyakoff <gray@gnu.org.ua>
|
||||
|
||||
* src/xheader.c (decx): Unknown pax keywords produce a warning,
|
||||
|
||||
40
NEWS
40
NEWS
@@ -1,6 +1,44 @@
|
||||
GNU tar NEWS - User visible changes. 2007-06-29
|
||||
GNU tar NEWS - User visible changes. 2007-10-10
|
||||
Please send GNU tar bug reports to <bug-tar@gnu.org>
|
||||
|
||||
|
||||
version 1.19 - Sergey Poznyakoff, 2007-10-10
|
||||
|
||||
* New option --exclude-vcs
|
||||
|
||||
Excludes directories and files, created by several widely used version
|
||||
control systems, e.g. "CVS/", ".svn/", etc.
|
||||
|
||||
* --exclude-tag and --exclude-cache options
|
||||
|
||||
The following options now work with incremental archives as well:
|
||||
|
||||
--exclude-caches
|
||||
--exclude-caches-all
|
||||
--exclude-tag
|
||||
--exclude-tag-all
|
||||
--exclude-tag-under
|
||||
|
||||
* Fix handling of renamed files in listed incremental archives.
|
||||
|
||||
Previous versions always stored absolute file names in rename
|
||||
records, even if -P was not used. This is fixed: rename records
|
||||
contain file names processed in accordance with the command line
|
||||
settings.
|
||||
|
||||
* Fix --version output.
|
||||
|
||||
* Recognition of broken archives.
|
||||
|
||||
When supplied an archive smaller than 512 bytes in reading mode (-x,
|
||||
-t), the previous version of tar silently ignored it, exiting with
|
||||
code 0. It is fixed. Tar now issues the following diagnostic message:
|
||||
'This does not look like a tar archive', and exits with code 2.
|
||||
|
||||
* Fix double-dot recognition in archive member names in case of duplicate '/.'.
|
||||
|
||||
* Fix file padding in case of truncation of the input file to zero size.
|
||||
|
||||
|
||||
version 1.18 - Sergey Poznyakoff, 2007-06-29
|
||||
|
||||
|
||||
7
THANKS
7
THANKS
@@ -1,11 +1,6 @@
|
||||
GNU tar THANKS file
|
||||
|
||||
Public domain tar was written by John Gilmore, with contributions
|
||||
from Henry Spencer, Fred Fish, Ian Darwin, Geoff Collyer, Stan Barber,
|
||||
Guy Harris, Dave Brower, Richard Todd, Michael Rendell, Stu Heiss and
|
||||
Rich $alz. The FSF version, named GNU tar, was derived from PDTAR by
|
||||
Jay Fenlason and Joy Kendall, and was maintained in turn by François
|
||||
Pinard, Paul Eggert and Sergey Poznyakoff.
|
||||
Please see the AUTHORS file for the list of principal authors.
|
||||
|
||||
Many people further contributed to GNU tar by reporting problems,
|
||||
suggesting various improvements or submitting actual code. Here is a
|
||||
|
||||
52
bootstrap
52
bootstrap
@@ -339,28 +339,6 @@ copy_files() {
|
||||
done
|
||||
}
|
||||
|
||||
copy_files ${PAXUTILS_SRCDIR}/m4 m4
|
||||
echo "$0: Creating m4/paxutils.m4"
|
||||
(echo "# This file is generated automatically. Please, do not edit."
|
||||
echo "#"
|
||||
echo "AC_DEFUN([${package}_PAXUTILS],["
|
||||
cat ${PAXUTILS_SRCDIR}/m4/DISTFILES | sed '/^#/d;s/\(.*\)\.m4/pu_\1/' | tr a-z A-Z
|
||||
echo "])") > ./m4/paxutils.m4
|
||||
ignorefile m4 paxutils.m4
|
||||
|
||||
if [ -d rmt ]; then
|
||||
:
|
||||
else
|
||||
mkdir rmt
|
||||
fi
|
||||
|
||||
for dir in doc rmt lib tests
|
||||
do
|
||||
copy_files ${PAXUTILS_SRCDIR}/$dir $dir
|
||||
done
|
||||
|
||||
copy_files ${PAXUTILS_SRCDIR}/paxlib lib pax
|
||||
|
||||
# Get gnulib files.
|
||||
|
||||
case ${GNULIB_SRCDIR--} in
|
||||
@@ -372,6 +350,12 @@ esac
|
||||
gnulib_tool=$GNULIB_SRCDIR/gnulib-tool
|
||||
<$gnulib_tool || exit
|
||||
|
||||
ensure_dir_exists()
|
||||
{
|
||||
d=`dirname $dst`
|
||||
test -d "$d" || mkdir -p -- "$d"
|
||||
}
|
||||
|
||||
symlink_to_gnulib()
|
||||
{
|
||||
src=$GNULIB_SRCDIR/$1
|
||||
@@ -388,6 +372,7 @@ symlink_to_gnulib()
|
||||
test -f "$dst" &&
|
||||
cmp -s "$src" "$dst" || {
|
||||
echo "$0: cp -fp $src $dst" &&
|
||||
ensure_dir_exists $dst &&
|
||||
cp -fp "$src" "$dst"
|
||||
}
|
||||
else
|
||||
@@ -410,6 +395,7 @@ symlink_to_gnulib()
|
||||
esac
|
||||
|
||||
echo "$0: ln -fs $dot_dots$src $dst" &&
|
||||
ensure_dir_exists $dst &&
|
||||
ln -fs "$dot_dots$src" "$dst"
|
||||
}
|
||||
fi
|
||||
@@ -592,6 +578,28 @@ slurp $bt2 $bt || exit
|
||||
|
||||
rm -fr $bt $bt2 || exit
|
||||
|
||||
# Import from paxutils
|
||||
copy_files ${PAXUTILS_SRCDIR}/m4 m4
|
||||
echo "$0: Creating m4/paxutils.m4"
|
||||
(echo "# This file is generated automatically. Please, do not edit."
|
||||
echo "#"
|
||||
echo "AC_DEFUN([${package}_PAXUTILS],["
|
||||
cat ${PAXUTILS_SRCDIR}/m4/DISTFILES | sed '/^#/d;s/\(.*\)\.m4/pu_\1/' | tr a-z A-Z
|
||||
echo "])") > ./m4/paxutils.m4
|
||||
ignorefile m4 paxutils.m4
|
||||
|
||||
if [ -d rmt ]; then
|
||||
:
|
||||
else
|
||||
mkdir rmt
|
||||
fi
|
||||
|
||||
for dir in doc rmt lib tests
|
||||
do
|
||||
copy_files ${PAXUTILS_SRCDIR}/$dir $dir
|
||||
done
|
||||
|
||||
copy_files ${PAXUTILS_SRCDIR}/paxlib lib pax
|
||||
|
||||
# Reconfigure, getting other files.
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
# 02110-1301, USA.
|
||||
|
||||
AC_INIT([GNU tar], [1.18], [bug-tar@gnu.org])
|
||||
AC_INIT([GNU tar], [1.19], [bug-tar@gnu.org])
|
||||
AC_CONFIG_SRCDIR([src/tar.c])
|
||||
AC_CONFIG_AUX_DIR([build-aux])
|
||||
AC_CONFIG_HEADERS([config.h:config.hin])
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
@c This is part of the paxutils manual.
|
||||
@c Copyright (C) 2006 Free Software Foundation, Inc.
|
||||
@c Copyright (C) 2006, 2007 Free Software Foundation, Inc.
|
||||
@c Written by Sergey Poznyakoff
|
||||
@c This file is distributed under GFDL 1.1 or any later version
|
||||
@c published by the Free Software Foundation.
|
||||
@@ -38,7 +38,7 @@ changed since the last backup.
|
||||
|
||||
@item R
|
||||
This code requests renaming of the @var{filename} to the name
|
||||
specified with the following @samp{T} command.
|
||||
specified with the @samp{T} command, that immediately follows it.
|
||||
|
||||
@item T
|
||||
Specify target file name for @samp{R} command (see below).
|
||||
@@ -90,9 +90,9 @@ New incremental dump was made.
|
||||
@end enumerate
|
||||
|
||||
This case cannot be handled by three successive renames, since
|
||||
renaming @file{a} to @file{b} will destroy existing directory.
|
||||
To handle such case a temporary directory is required. @GNUTAR{}
|
||||
will create 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
|
||||
readability):
|
||||
|
||||
@smallexample
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
@c This is part of the paxutils manual.
|
||||
@c Copyright (C) 2005 Free Software Foundation, Inc.
|
||||
@c Copyright (C) 2005, 2007 Free Software Foundation, Inc.
|
||||
@c Written by Sergey Poznyakoff
|
||||
@c This file is distributed under GFDL 1.1 or any later version
|
||||
@c published by the Free Software Foundation.
|
||||
@@ -9,27 +9,55 @@ incremental backups (@pxref{Incremental Dumps}). It
|
||||
contains the status of the file system at the time of the dump and is
|
||||
used to determine which files were modified since the last backup.
|
||||
|
||||
@GNUTAR{} version @value{VERSION} supports two snapshot file
|
||||
@GNUTAR{} version @value{VERSION} supports three snapshot file
|
||||
formats. The first format, called @dfn{format 0}, is the one used by
|
||||
@GNUTAR{} versions up to 1.15.1. The second format, called @dfn{format
|
||||
1} is an extended version of this format, that contains more metadata
|
||||
and allows for further extensions.
|
||||
and allows for further extensions. It was used by version
|
||||
1.15.1. Starting from version 1.16 and up to @value{VERSION}, the
|
||||
@dfn{format 2} is used.
|
||||
|
||||
@GNUTAR{} is able to read all three formats, but will create
|
||||
snapshots only in format 2.
|
||||
|
||||
This appendix describes all three formats in detail.
|
||||
|
||||
@enumerate 0
|
||||
@cindex format 0, snapshot file
|
||||
@cindex snapshot file, format 0
|
||||
@item
|
||||
@samp{Format 0} snapshot file begins with a line containing a
|
||||
decimal number that represents the UNIX timestamp of the beginning of
|
||||
the last archivation. This line is followed by directory metadata
|
||||
descriptions, one per line. Each description has the following format:
|
||||
decimal number that represents a @acronym{UNIX} timestamp of the
|
||||
beginning of the last archivation. This line is followed by directory
|
||||
metadata descriptions, one per line. Each description has the
|
||||
following format:
|
||||
|
||||
@smallexample
|
||||
[@var{nfs}]@var{dev} @var{inode} @var{name}
|
||||
@var{nfs}@var{dev} @var{inode} @var{name}
|
||||
@end smallexample
|
||||
|
||||
@noindent
|
||||
where optional @var{nfs} is a single plus character (@samp{+}) if this
|
||||
directory is located on an NFS-mounted partition, @var{dev} and
|
||||
@var{inode} are the device and inode numbers of the directory, and
|
||||
@var{name} is the directory name.
|
||||
where:
|
||||
|
||||
@table @var
|
||||
@item nfs
|
||||
A single plus character (@samp{+}), if this directory is located on
|
||||
an @acronym{NFS}-mounted partition, or a single space otherwise;
|
||||
|
||||
@item dev
|
||||
Device number of the directory;
|
||||
|
||||
@item inode
|
||||
I-node number of the directory;
|
||||
|
||||
@item name
|
||||
Name of the directory. Any special characters (white-space,
|
||||
backslashes, etc.) are quoted.
|
||||
@end table
|
||||
|
||||
@cindex format 1, snapshot file
|
||||
@cindex snapshot file, format 1
|
||||
@item
|
||||
@samp{Format 1} snapshot file begins with a line specifying the
|
||||
format of the file. This line has the following structure:
|
||||
|
||||
@@ -38,28 +66,75 @@ format of the file. This line has the following structure:
|
||||
@end smallexample
|
||||
|
||||
@noindent
|
||||
where @var{tar-version} is the version of @GNUTAR{} implementation
|
||||
that created this snapshot, and @var{incr-format-version} is the
|
||||
version number of the snapshot format (in this case @samp{1}).
|
||||
where @var{tar-version} is the version number of @GNUTAR{}
|
||||
implementation that created this snapshot, and
|
||||
@var{incr-format-version} is the version number of the snapshot format
|
||||
(in this case @samp{1}).
|
||||
|
||||
The following line contains two decimal numbers, representing the
|
||||
Next line contains two decimal numbers, representing the
|
||||
time of the last backup. First number is the number of seconds, the
|
||||
second one is the number of nanoseconds, since the beginning of the
|
||||
epoch.
|
||||
|
||||
Following lines contain directory metadata, one line per
|
||||
directory. The line format is:
|
||||
Lines that follow contain directory metadata, one line per
|
||||
directory. Each line is formatted as follows:
|
||||
|
||||
@smallexample
|
||||
[@var{nfs}]@var{mtime-sec} @var{mtime-nsec} @var{dev} @var{inode} @var{name}
|
||||
@end smallexample
|
||||
|
||||
@noindent
|
||||
where @var{mtime-sec} and @var{mtime-nsec} represent the last
|
||||
where @var{mtime-sec} and @var{mtime-nsec} represent last
|
||||
modification time of this directory with nanosecond precision;
|
||||
@var{nfs}, @var{dev}, @var{inode} and @var{name} have the same meaning
|
||||
as with @samp{format 0}.
|
||||
|
||||
@cindex format 2, snapshot file
|
||||
@cindex snapshot file, format 2
|
||||
@item
|
||||
@FIXME{}
|
||||
A snapshot file begins with a format identifier, as described for
|
||||
version 1, e.g.:
|
||||
|
||||
@smallexample
|
||||
GNU tar-@value{VERSION}-2
|
||||
@end smallexample
|
||||
|
||||
This line is followed by newline. Rest of file consists of
|
||||
records, separated by null (@acronym{ASCII} 0)
|
||||
characters. Thus, in contrast to the previous formats, format 2
|
||||
snapshot is a binary file.
|
||||
|
||||
First two records are decimal numbers, representing the
|
||||
time of the last backup. First number is the number of seconds, the
|
||||
second one is the number of nanoseconds, since the beginning of the
|
||||
epoch. These are followed by arbitrary number of directory records.
|
||||
|
||||
Each @dfn{directory record} contains a set of metadata describing a
|
||||
particular directory. Parts of a directory record are delimited with
|
||||
@acronym{ASCII} 0 characters. The following table describes each
|
||||
part. The @dfn{Number} type in this table stands for a decimal number
|
||||
in @acronym{ASCII} notation.
|
||||
|
||||
@multitable @columnfractions 0.2 0.2 0.6
|
||||
@headitem Field @tab Type @tab Description
|
||||
@item nfs @tab Character @tab @samp{1} if the directory is located on
|
||||
an @acronym{NFS}-mounted partition, or @samp{0} otherwise;
|
||||
@item mtime-sec @tab Number @tab Modification time, seconds;
|
||||
@item mtime-nano @tab Number @tab Modification time, nanoseconds;
|
||||
@item dev-no @tab Number @tab Device number;
|
||||
@item i-no @tab Number @tab I-node number;
|
||||
@item name @tab String @tab Directory name; In contrast to the
|
||||
previous versions it is not quoted.
|
||||
@item contents @tab Dumpdir @tab Contents of the directory;
|
||||
@xref{Dumpdir}, for a description of its format.
|
||||
@item
|
||||
@end multitable
|
||||
|
||||
Dumpdirs stored in snapshot files contain only records of types
|
||||
@samp{Y}, @samp{N} and @samp{D}.
|
||||
|
||||
@end enumerate
|
||||
|
||||
@c End of snapshot.texi
|
||||
|
||||
|
||||
48
doc/tar.texi
48
doc/tar.texi
@@ -2540,6 +2540,14 @@ named @var{file}, but dump the directory node itself. @xref{exclude}.
|
||||
Exclude from dump any directory containing file named @var{file}.
|
||||
@xref{exclude}.
|
||||
|
||||
@opsummary{exclude-vcs}
|
||||
@item --exclude-vcs
|
||||
|
||||
Exclude from dump directories and files, that are internal for some
|
||||
widely used version control systems.
|
||||
|
||||
@xref{exclude}.
|
||||
|
||||
@opsummary{file}
|
||||
@item --file=@var{archive}
|
||||
@itemx -f @var{archive}
|
||||
@@ -6506,6 +6514,42 @@ called as @w{@samp{tar -c -X foo .}} and the file @file{foo} contains a
|
||||
single line @file{*.o}, no files whose names end in @file{.o} will be
|
||||
added to the archive.
|
||||
|
||||
Notice, that lines from @var{file} are read verbatim. One of the
|
||||
frequent errors is leaving some extra whitespace after a file name,
|
||||
which is difficult to catch using text editors.
|
||||
|
||||
However, empty lines are OK.
|
||||
|
||||
@cindex version control system, excluding files
|
||||
@cindex VCS, excluding files
|
||||
@cindex SCCS, excluding files
|
||||
@cindex RCS, excluding files
|
||||
@cindex CVS, excluding files
|
||||
@cindex SVN, excluding files
|
||||
@cindex git, excluding files
|
||||
@table @option
|
||||
@opindex exclude-vcs
|
||||
@item --exclude-vcs
|
||||
Exclude files and directories used by some version control systems.
|
||||
@end table
|
||||
|
||||
As of version @value{VERSION}, the following files are excluded:
|
||||
|
||||
@itemize @bullet
|
||||
@item @file{CVS/}, and everything under it
|
||||
@item @file{RCS/}, and everything under it
|
||||
@item @file{SCCS/}, and everything under it
|
||||
@item @file{.git/}, and everything under it
|
||||
@item @file{.gitignore}
|
||||
@item @file{.cvsignore}
|
||||
@item @file{.svn/}, and everything under it
|
||||
@item @file{.arch-ids/}, and everything under it
|
||||
@item @file{@{arch@}/}, and everything under it
|
||||
@item @file{=RELEASE-ID}
|
||||
@item @file{=meta-update}
|
||||
@item @file{=update}
|
||||
@end itemize
|
||||
|
||||
@findex exclude-caches
|
||||
When creating an archive, the @option{--exclude-caches} option family
|
||||
causes @command{tar} to exclude all directories that contain a @dfn{cache
|
||||
@@ -6516,7 +6560,7 @@ Various applications write cache directory tags into directories they
|
||||
use to hold regenerable, non-precious data, so that such data can be
|
||||
more easily excluded from backups.
|
||||
|
||||
There are three @samp{exclude-caches} option, providing a different
|
||||
There are three @samp{exclude-caches} options, each providing a different
|
||||
exclusion semantics:
|
||||
|
||||
@table @option
|
||||
@@ -10279,7 +10323,7 @@ echo $@{name:-$TAR_ARCHIVE@}-$TAR_VOLUME >&$TAR_FD
|
||||
@end group
|
||||
@end smallexample
|
||||
|
||||
The same script cant be used while listing, comparing or extracting
|
||||
The same script can be used while listing, comparing or extracting
|
||||
from the created archive. For example:
|
||||
|
||||
@smallexample
|
||||
|
||||
24
src/buffer.c
24
src/buffer.c
@@ -26,7 +26,6 @@
|
||||
|
||||
#include <closeout.h>
|
||||
#include <fnmatch.h>
|
||||
#include <getline.h>
|
||||
#include <human.h>
|
||||
#include <quotearg.h>
|
||||
|
||||
@@ -235,14 +234,16 @@ check_compressed_archive ()
|
||||
{
|
||||
struct zip_magic const *p;
|
||||
bool sfr;
|
||||
|
||||
bool short_file = false;
|
||||
|
||||
/* Prepare global data needed for find_next_block: */
|
||||
record_end = record_start; /* set up for 1st record = # 0 */
|
||||
sfr = read_full_records;
|
||||
read_full_records = true; /* Suppress fatal error on reading a partial
|
||||
record */
|
||||
find_next_block ();
|
||||
|
||||
if (find_next_block () == 0)
|
||||
short_file = true;
|
||||
|
||||
/* Restore global values */
|
||||
read_full_records = sfr;
|
||||
|
||||
@@ -254,6 +255,9 @@ check_compressed_archive ()
|
||||
if (memcmp (record_start->buffer, p->magic, p->length) == 0)
|
||||
return p->type;
|
||||
|
||||
if (short_file)
|
||||
ERROR ((0, 0, _("This does not look like a tar archive")));
|
||||
|
||||
return ct_none;
|
||||
}
|
||||
|
||||
@@ -586,7 +590,7 @@ _open_archive (enum access_mode wanted_access)
|
||||
}
|
||||
|
||||
static void
|
||||
do_checkpoint (bool write)
|
||||
do_checkpoint (bool do_write)
|
||||
{
|
||||
if (checkpoint_option && !(++checkpoint % checkpoint_option))
|
||||
{
|
||||
@@ -598,7 +602,7 @@ do_checkpoint (bool write)
|
||||
break;
|
||||
|
||||
case checkpoint_text:
|
||||
if (write)
|
||||
if (do_write)
|
||||
/* TRANSLATORS: This is a ``checkpoint of write operation'',
|
||||
*not* ``Writing a checkpoint''.
|
||||
E.g. in Spanish ``Punto de comprobaci@'on de escritura'',
|
||||
@@ -1132,22 +1136,22 @@ try_new_volume ()
|
||||
{
|
||||
size_t status;
|
||||
union block *header;
|
||||
int access;
|
||||
enum access_mode acc;
|
||||
|
||||
switch (subcommand_option)
|
||||
{
|
||||
case APPEND_SUBCOMMAND:
|
||||
case CAT_SUBCOMMAND:
|
||||
case UPDATE_SUBCOMMAND:
|
||||
access = ACCESS_UPDATE;
|
||||
acc = ACCESS_UPDATE;
|
||||
break;
|
||||
|
||||
default:
|
||||
access = ACCESS_READ;
|
||||
acc = ACCESS_READ;
|
||||
break;
|
||||
}
|
||||
|
||||
if (!new_volume (access))
|
||||
if (!new_volume (acc))
|
||||
return true;
|
||||
|
||||
while ((status = rmtread (archive, record_start->buffer, record_size))
|
||||
|
||||
@@ -445,7 +445,11 @@ union block * write_extended (bool global, struct tar_stat_info *st,
|
||||
union block *start_private_header (const char *name, size_t size);
|
||||
void write_eot (void);
|
||||
void check_links (void);
|
||||
|
||||
void exclusion_tag_warning (const char *dirname, const char *tagname,
|
||||
const char *message);
|
||||
enum exclusion_tag_type check_exclusion_tags (char *dirname,
|
||||
const char **tag_file_name);
|
||||
|
||||
#define GID_TO_CHARS(val, where) gid_to_chars (val, where, sizeof (where))
|
||||
#define MAJOR_TO_CHARS(val, where) major_to_chars (val, where, sizeof (where))
|
||||
#define MINOR_TO_CHARS(val, where) minor_to_chars (val, where, sizeof (where))
|
||||
|
||||
@@ -368,9 +368,9 @@ diff_dumpdir (void)
|
||||
{
|
||||
char *dumpdir_buffer;
|
||||
dev_t dev = 0;
|
||||
struct stat stat;
|
||||
struct stat stat_data;
|
||||
|
||||
if (deref_stat (true, current_stat_info.file_name, &stat))
|
||||
if (deref_stat (true, current_stat_info.file_name, &stat_data))
|
||||
{
|
||||
if (errno == ENOENT)
|
||||
stat_warn (current_stat_info.file_name);
|
||||
@@ -378,7 +378,7 @@ diff_dumpdir (void)
|
||||
stat_error (current_stat_info.file_name);
|
||||
}
|
||||
else
|
||||
dev = stat.st_dev;
|
||||
dev = stat_data.st_dev;
|
||||
|
||||
dumpdir_buffer = get_directory_contents (current_stat_info.file_name, dev);
|
||||
|
||||
|
||||
20
src/create.c
20
src/create.c
@@ -58,7 +58,7 @@ add_exclusion_tag (const char *name, enum exclusion_tag_type type,
|
||||
exclusion_tags = tag;
|
||||
}
|
||||
|
||||
static void
|
||||
void
|
||||
exclusion_tag_warning (const char *dirname, const char *tagname,
|
||||
const char *message)
|
||||
{
|
||||
@@ -70,19 +70,19 @@ exclusion_tag_warning (const char *dirname, const char *tagname,
|
||||
message));
|
||||
}
|
||||
|
||||
static enum exclusion_tag_type
|
||||
enum exclusion_tag_type
|
||||
check_exclusion_tags (char *dirname, const char **tag_file_name)
|
||||
{
|
||||
static char *tagname;
|
||||
static size_t tagsize;
|
||||
struct exclusion_tag *tag;
|
||||
size_t dlen = strlen (dirname);
|
||||
int addslash = dirname[dlen-1] != '/';
|
||||
char *nptr = NULL;
|
||||
char *ret = NULL;
|
||||
|
||||
for (tag = exclusion_tags; tag; tag = tag->next)
|
||||
{
|
||||
size_t size = dlen + tag->length + 1;
|
||||
size_t size = dlen + addslash + tag->length + 1;
|
||||
if (size > tagsize)
|
||||
{
|
||||
tagsize = size;
|
||||
@@ -93,6 +93,8 @@ check_exclusion_tags (char *dirname, const char **tag_file_name)
|
||||
{
|
||||
strcpy (tagname, dirname);
|
||||
nptr = tagname + dlen;
|
||||
if (addslash)
|
||||
*nptr++ = '/';
|
||||
}
|
||||
strcpy (nptr, tag->name);
|
||||
if (access (tagname, F_OK) == 0
|
||||
@@ -1064,8 +1066,7 @@ dump_regular_file (int fd, struct tar_stat_info *st)
|
||||
return dump_status_short;
|
||||
}
|
||||
size_left -= count;
|
||||
if (count)
|
||||
set_next_block_after (blk + (bufsize - 1) / BLOCKSIZE);
|
||||
set_next_block_after (blk + (bufsize - 1) / BLOCKSIZE);
|
||||
|
||||
if (count != bufsize)
|
||||
{
|
||||
@@ -1079,7 +1080,7 @@ dump_regular_file (int fd, struct tar_stat_info *st)
|
||||
STRINGIFY_BIGINT (size_left, buf)));
|
||||
if (! ignore_failed_read_option)
|
||||
exit_status = TAREXIT_DIFFERS;
|
||||
pad_archive (size_left - (bufsize-count));
|
||||
pad_archive (size_left - (bufsize - count));
|
||||
return dump_status_short;
|
||||
}
|
||||
}
|
||||
@@ -1183,8 +1184,11 @@ dump_dir0 (char *directory,
|
||||
|
||||
switch (check_exclusion_tags (st->orig_file_name, &tag_file_name))
|
||||
{
|
||||
case exclusion_tag_none:
|
||||
case exclusion_tag_all:
|
||||
/* Handled in dump_file0 */
|
||||
break;
|
||||
|
||||
case exclusion_tag_none:
|
||||
{
|
||||
char const *entry;
|
||||
size_t entry_len;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/* Extract files from a tar archive.
|
||||
|
||||
Copyright (C) 1988, 1992, 1993, 1994, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||
2001, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Written by John Gilmore, on 1985-11-19.
|
||||
|
||||
@@ -593,13 +593,13 @@ apply_nonancestor_delayed_set_stat (char const *file_name, bool after_links)
|
||||
|
||||
if (! skip_this_one)
|
||||
{
|
||||
struct tar_stat_info st;
|
||||
st.stat.st_mode = data->mode;
|
||||
st.stat.st_uid = data->uid;
|
||||
st.stat.st_gid = data->gid;
|
||||
st.atime = data->atime;
|
||||
st.mtime = data->mtime;
|
||||
set_stat (data->file_name, &st, cur_info,
|
||||
struct tar_stat_info sb;
|
||||
sb.stat.st_mode = data->mode;
|
||||
sb.stat.st_uid = data->uid;
|
||||
sb.stat.st_gid = data->gid;
|
||||
sb.atime = data->atime;
|
||||
sb.mtime = data->mtime;
|
||||
set_stat (data->file_name, &sb, cur_info,
|
||||
data->invert_permissions, data->permstatus, DIRTYPE);
|
||||
}
|
||||
|
||||
|
||||
106
src/incremen.c
106
src/incremen.c
@@ -18,7 +18,6 @@
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
#include <system.h>
|
||||
#include <getline.h>
|
||||
#include <hash.h>
|
||||
#include <quotearg.h>
|
||||
#include "common.h"
|
||||
@@ -63,6 +62,8 @@ struct directory
|
||||
unsigned flags; /* See DIRF_ macros above */
|
||||
struct directory *orig; /* If the directory was renamed, points to
|
||||
the original directory structure */
|
||||
const char *tagfile; /* Tag file, if the directory falls under
|
||||
exclusion_tag_under */
|
||||
char name[1]; /* file name of directory */
|
||||
};
|
||||
|
||||
@@ -125,6 +126,7 @@ make_directory (const char *name)
|
||||
strcpy (directory->name, name);
|
||||
if (ISSLASH (directory->name[namelen-1]))
|
||||
directory->name[namelen-1] = 0;
|
||||
directory->tagfile = NULL;
|
||||
return directory;
|
||||
}
|
||||
|
||||
@@ -230,7 +232,8 @@ static struct directory *
|
||||
procdir (char *name_buffer, struct stat *stat_data,
|
||||
dev_t device,
|
||||
enum children children,
|
||||
bool verbose)
|
||||
bool verbose,
|
||||
char *entry)
|
||||
{
|
||||
struct directory *directory;
|
||||
bool nfs = NFS_FILE_STAT (*stat_data);
|
||||
@@ -331,6 +334,40 @@ procdir (char *name_buffer, struct stat *stat_data,
|
||||
|
||||
DIR_SET_FLAG (directory, DIRF_INIT);
|
||||
|
||||
{
|
||||
const char *tag_file_name;
|
||||
size_t len;
|
||||
|
||||
switch (check_exclusion_tags (name_buffer, &tag_file_name))
|
||||
{
|
||||
case exclusion_tag_all:
|
||||
/* This warning can be duplicated by code in dump_file0, but only
|
||||
in case when the topmost directory being archived contains
|
||||
an exclusion tag. */
|
||||
exclusion_tag_warning (name_buffer, tag_file_name,
|
||||
_("directory not dumped"));
|
||||
if (entry)
|
||||
*entry = 'N';
|
||||
directory->children = NO_CHILDREN;
|
||||
break;
|
||||
|
||||
case exclusion_tag_contents:
|
||||
exclusion_tag_warning (name_buffer, tag_file_name,
|
||||
_("contents not dumped"));
|
||||
directory->children = NO_CHILDREN;
|
||||
break;
|
||||
|
||||
case exclusion_tag_under:
|
||||
exclusion_tag_warning (name_buffer, tag_file_name,
|
||||
_("contents not dumped"));
|
||||
directory->tagfile = tag_file_name;
|
||||
break;
|
||||
|
||||
case exclusion_tag_none:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return directory;
|
||||
}
|
||||
|
||||
@@ -437,9 +474,17 @@ makedumpdir (struct directory *directory, const char *dir)
|
||||
const char *loc = dumpdir_locate (dump, array[i]);
|
||||
if (loc)
|
||||
{
|
||||
*new_dump_ptr++ = ' ';
|
||||
if (directory->tagfile)
|
||||
*new_dump_ptr = strcmp (directory->tagfile, array[i]) == 0 ?
|
||||
' ' : 'I';
|
||||
else
|
||||
*new_dump_ptr = ' ';
|
||||
new_dump_ptr++;
|
||||
dump = loc + strlen (loc) + 1;
|
||||
}
|
||||
else if (directory->tagfile)
|
||||
*new_dump_ptr++ = strcmp (directory->tagfile, array[i]) == 0 ?
|
||||
' ' : 'I';
|
||||
else
|
||||
*new_dump_ptr++ = 'Y'; /* New entry */
|
||||
|
||||
@@ -455,22 +500,22 @@ makedumpdir (struct directory *directory, const char *dir)
|
||||
|
||||
/* Recursively scan the given directory. */
|
||||
static char *
|
||||
scan_directory (char *dir_name, dev_t device)
|
||||
scan_directory (char *dir, dev_t device)
|
||||
{
|
||||
char *dirp = savedir (dir_name); /* for scanning directory */
|
||||
char *dirp = savedir (dir); /* for scanning directory */
|
||||
char *name_buffer; /* directory, `/', and directory member */
|
||||
size_t name_buffer_size; /* allocated size of name_buffer, minus 2 */
|
||||
size_t name_length; /* used length in name_buffer */
|
||||
struct stat stat_data;
|
||||
struct directory *directory;
|
||||
|
||||
|
||||
if (! dirp)
|
||||
savedir_error (dir_name);
|
||||
savedir_error (dir);
|
||||
|
||||
name_buffer_size = strlen (dir_name) + NAME_FIELD_SIZE;
|
||||
name_buffer_size = strlen (dir) + NAME_FIELD_SIZE;
|
||||
name_buffer = xmalloc (name_buffer_size + 2);
|
||||
strcpy (name_buffer, dir_name);
|
||||
if (! ISSLASH (dir_name[strlen (dir_name) - 1]))
|
||||
strcpy (name_buffer, dir);
|
||||
if (! ISSLASH (dir[strlen (dir) - 1]))
|
||||
strcat (name_buffer, "/");
|
||||
name_length = strlen (name_buffer);
|
||||
|
||||
@@ -485,8 +530,9 @@ scan_directory (char *dir_name, dev_t device)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
directory = procdir (name_buffer, &stat_data, device, NO_CHILDREN, false);
|
||||
|
||||
directory = procdir (name_buffer, &stat_data, device, NO_CHILDREN, false,
|
||||
NULL);
|
||||
|
||||
if (dirp && directory->children != NO_CHILDREN)
|
||||
{
|
||||
char *entry; /* directory entry being scanned */
|
||||
@@ -507,7 +553,9 @@ scan_directory (char *dir_name, dev_t device)
|
||||
}
|
||||
strcpy (name_buffer + name_length, entry + 1);
|
||||
|
||||
if (excluded_name (name_buffer))
|
||||
if (*entry == 'I') /* Ignored entry */
|
||||
*entry = 'N';
|
||||
else if (excluded_name (name_buffer))
|
||||
*entry = 'N';
|
||||
else
|
||||
{
|
||||
@@ -520,10 +568,10 @@ scan_directory (char *dir_name, dev_t device)
|
||||
|
||||
if (S_ISDIR (stat_data.st_mode))
|
||||
{
|
||||
*entry = 'D';
|
||||
procdir (name_buffer, &stat_data, device,
|
||||
directory->children,
|
||||
verbose_option);
|
||||
*entry = 'D';
|
||||
verbose_option, entry);
|
||||
}
|
||||
|
||||
else if (one_file_system_option && device != stat_data.st_dev)
|
||||
@@ -552,19 +600,26 @@ scan_directory (char *dir_name, dev_t device)
|
||||
}
|
||||
|
||||
char *
|
||||
get_directory_contents (char *dir_name, dev_t device)
|
||||
get_directory_contents (char *dir, dev_t device)
|
||||
{
|
||||
return scan_directory (dir_name, device);
|
||||
return scan_directory (dir, device);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
obstack_code_rename (struct obstack *stk, char *from, char *to)
|
||||
{
|
||||
char *s;
|
||||
|
||||
s = from[0] == 0 ? from :
|
||||
safer_name_suffix (from, false, absolute_names_option);
|
||||
obstack_1grow (stk, 'R');
|
||||
obstack_grow (stk, from, strlen (from) + 1);
|
||||
obstack_grow (stk, s, strlen (s) + 1);
|
||||
|
||||
s = to[0] == 0 ? to:
|
||||
safer_name_suffix (to, false, absolute_names_option);
|
||||
obstack_1grow (stk, 'T');
|
||||
obstack_grow (stk, to, strlen (to) + 1);
|
||||
obstack_grow (stk, s, strlen (s) + 1);
|
||||
}
|
||||
|
||||
static bool
|
||||
@@ -1355,6 +1410,19 @@ try_purge_directory (char const *directory_name)
|
||||
arc += strlen (arc) + 1;
|
||||
dst = arc + 1;
|
||||
|
||||
/* Ensure that neither source nor destination are absolute file
|
||||
names (unless permitted by -P option), and that they do not
|
||||
contain dubious parts (e.g. ../).
|
||||
|
||||
This is an extra safety precaution. Besides, it might be
|
||||
necessary to extract from archives created with tar versions
|
||||
prior to 1.19. */
|
||||
|
||||
if (*src)
|
||||
src = safer_name_suffix (src, false, absolute_names_option);
|
||||
if (*dst)
|
||||
dst = safer_name_suffix (dst, false, absolute_names_option);
|
||||
|
||||
if (*src == 0)
|
||||
src = temp_stub;
|
||||
else if (*dst == 0)
|
||||
|
||||
@@ -1012,11 +1012,10 @@ contains_dot_dot (char const *name)
|
||||
if (p[0] == '.' && p[1] == '.' && (ISSLASH (p[2]) || !p[2]))
|
||||
return 1;
|
||||
|
||||
do
|
||||
while (! ISSLASH (*p))
|
||||
{
|
||||
if (! *p++)
|
||||
return 0;
|
||||
}
|
||||
while (! ISSLASH (*p));
|
||||
}
|
||||
}
|
||||
|
||||
21
src/system.c
21
src/system.c
@@ -17,7 +17,6 @@
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
#include <system.h>
|
||||
#include <getline.h>
|
||||
#include <setenv.h>
|
||||
|
||||
#include "common.h"
|
||||
@@ -697,7 +696,7 @@ stat_to_env (char *name, char type, struct tar_stat_info *st)
|
||||
}
|
||||
}
|
||||
|
||||
static pid_t pid;
|
||||
static pid_t global_pid;
|
||||
static RETSIGTYPE (*pipe_handler) (int sig);
|
||||
|
||||
int
|
||||
@@ -708,9 +707,9 @@ sys_exec_command (char *file_name, int typechar, struct tar_stat_info *st)
|
||||
|
||||
xpipe (p);
|
||||
pipe_handler = signal (SIGPIPE, SIG_IGN);
|
||||
pid = xfork ();
|
||||
global_pid = xfork ();
|
||||
|
||||
if (pid != 0)
|
||||
if (global_pid != 0)
|
||||
{
|
||||
xclose (p[PREAD]);
|
||||
return p[PWRITE];
|
||||
@@ -737,14 +736,14 @@ sys_wait_command (void)
|
||||
{
|
||||
int status;
|
||||
|
||||
if (pid < 0)
|
||||
if (global_pid < 0)
|
||||
return;
|
||||
|
||||
signal (SIGPIPE, pipe_handler);
|
||||
while (waitpid (pid, &status, 0) == -1)
|
||||
while (waitpid (global_pid, &status, 0) == -1)
|
||||
if (errno != EINTR)
|
||||
{
|
||||
pid = -1;
|
||||
global_pid = -1;
|
||||
waitpid_error (to_command_option);
|
||||
return;
|
||||
}
|
||||
@@ -753,18 +752,18 @@ sys_wait_command (void)
|
||||
{
|
||||
if (!ignore_command_error_option && WEXITSTATUS (status))
|
||||
ERROR ((0, 0, _("%lu: Child returned status %d"),
|
||||
(unsigned long) pid, WEXITSTATUS (status)));
|
||||
(unsigned long) global_pid, WEXITSTATUS (status)));
|
||||
}
|
||||
else if (WIFSIGNALED (status))
|
||||
{
|
||||
WARN ((0, 0, _("%lu: Child terminated on signal %d"),
|
||||
(unsigned long) pid, WTERMSIG (status)));
|
||||
(unsigned long) global_pid, WTERMSIG (status)));
|
||||
}
|
||||
else
|
||||
ERROR ((0, 0, _("%lu: Child terminated on unknown reason"),
|
||||
(unsigned long) pid));
|
||||
(unsigned long) global_pid));
|
||||
|
||||
pid = -1;
|
||||
global_pid = -1;
|
||||
}
|
||||
|
||||
int
|
||||
|
||||
64
src/tar.c
64
src/tar.c
@@ -22,7 +22,6 @@
|
||||
#include <system.h>
|
||||
|
||||
#include <fnmatch.h>
|
||||
#include <getline.h>
|
||||
#include <argp.h>
|
||||
#include <argp-namefrob.h>
|
||||
#include <argp-fmtstream.h>
|
||||
@@ -260,6 +259,7 @@ enum
|
||||
EXCLUDE_TAG_OPTION,
|
||||
EXCLUDE_TAG_UNDER_OPTION,
|
||||
EXCLUDE_TAG_ALL_OPTION,
|
||||
EXCLUDE_VCS_OPTION,
|
||||
FORCE_LOCAL_OPTION,
|
||||
GROUP_OPTION,
|
||||
HANG_OPTION,
|
||||
@@ -622,6 +622,8 @@ static struct argp_option options[] = {
|
||||
N_("exclude everything under directories containing FILE"), GRID+1 },
|
||||
{"exclude-tag-all", EXCLUDE_TAG_ALL_OPTION, N_("FILE"), 0,
|
||||
N_("exclude directories containing FILE"), GRID+1 },
|
||||
{"exclude-vcs", EXCLUDE_VCS_OPTION, NULL, 0,
|
||||
N_("exclude version control system directories"), GRID+1 },
|
||||
{"no-recursion", NO_RECURSION_OPTION, 0, 0,
|
||||
N_("avoid descending automatically in directories"), GRID+1 },
|
||||
{"one-file-system", ONE_FILE_SYSTEM_OPTION, 0, 0,
|
||||
@@ -785,6 +787,7 @@ struct tar_args /* Variables used during option parsing */
|
||||
bool input_files; /* True if some input files where given */
|
||||
};
|
||||
|
||||
|
||||
#define MAKE_EXCL_OPTIONS(args) \
|
||||
((((args)->wildcards != disable_wildcards) ? EXCLUDE_WILDCARDS : 0) \
|
||||
| (args)->matching_flags \
|
||||
@@ -796,6 +799,37 @@ struct tar_args /* Variables used during option parsing */
|
||||
| (args)->matching_flags \
|
||||
| recursion_option)
|
||||
|
||||
void
|
||||
exclude_vcs_files ()
|
||||
{
|
||||
int i;
|
||||
static char *vcs_file[] = {
|
||||
/* CVS: */
|
||||
"CVS",
|
||||
".cvsignore",
|
||||
/* RCS: */
|
||||
"RCS",
|
||||
/* SCCS: */
|
||||
"SCCS",
|
||||
/* SVN: */
|
||||
".svn",
|
||||
/* git: */
|
||||
".git",
|
||||
".gitignore",
|
||||
/* Arch: */
|
||||
".arch-ids",
|
||||
"{arch}",
|
||||
"=RELEASE-ID",
|
||||
"=meta-update",
|
||||
"=update",
|
||||
NULL
|
||||
};
|
||||
|
||||
for (i = 0; vcs_file[i]; i++)
|
||||
add_exclude (excluded, vcs_file[i], 0);
|
||||
}
|
||||
|
||||
|
||||
#ifdef REMOTE_SHELL
|
||||
# define DECL_SHOW_DEFAULT_SETTINGS(stream, printer) \
|
||||
{ \
|
||||
@@ -1548,6 +1582,10 @@ parse_opt (int key, char *arg, struct argp_state *state)
|
||||
add_exclusion_tag (arg, exclusion_tag_all, NULL);
|
||||
break;
|
||||
|
||||
case EXCLUDE_VCS_OPTION:
|
||||
exclude_vcs_files ();
|
||||
break;
|
||||
|
||||
case FORCE_LOCAL_OPTION:
|
||||
force_local_option = true;
|
||||
break;
|
||||
@@ -1934,23 +1972,23 @@ usage (int status)
|
||||
/* Parse the options for tar. */
|
||||
|
||||
static struct argp_option *
|
||||
find_argp_option (struct argp_option *options, int letter)
|
||||
find_argp_option (struct argp_option *o, int letter)
|
||||
{
|
||||
for (;
|
||||
!(options->name == NULL
|
||||
&& options->key == 0
|
||||
&& options->arg == 0
|
||||
&& options->flags == 0
|
||||
&& options->doc == NULL); options++)
|
||||
if (options->key == letter)
|
||||
return options;
|
||||
!(o->name == NULL
|
||||
&& o->key == 0
|
||||
&& o->arg == 0
|
||||
&& o->flags == 0
|
||||
&& o->doc == NULL); o++)
|
||||
if (o->key == letter)
|
||||
return o;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
decode_options (int argc, char **argv)
|
||||
{
|
||||
int index;
|
||||
int idx;
|
||||
struct tar_args args;
|
||||
|
||||
/* Set some default option values. */
|
||||
@@ -2041,7 +2079,7 @@ decode_options (int argc, char **argv)
|
||||
prepend_default_options (getenv ("TAR_OPTIONS"), &argc, &argv);
|
||||
|
||||
if (argp_parse (&argp, argc, argv, ARGP_IN_ORDER|ARGP_NO_HELP,
|
||||
&index, &args))
|
||||
&idx, &args))
|
||||
exit (TAREXIT_FAILURE);
|
||||
|
||||
|
||||
@@ -2069,9 +2107,9 @@ decode_options (int argc, char **argv)
|
||||
}
|
||||
|
||||
/* Handle operands after any "--" argument. */
|
||||
for (; index < argc; index++)
|
||||
for (; idx < argc; idx++)
|
||||
{
|
||||
name_add_name (argv[index], MAKE_INCL_OPTIONS (&args));
|
||||
name_add_name (argv[idx], MAKE_INCL_OPTIONS (&args));
|
||||
args.input_files = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -99,6 +99,7 @@ TESTSUITE_AT = \
|
||||
rename03.at\
|
||||
same-order01.at\
|
||||
same-order02.at\
|
||||
shortfile.at\
|
||||
shortrec.at\
|
||||
sparse01.at\
|
||||
sparse02.at\
|
||||
|
||||
@@ -19,7 +19,11 @@
|
||||
# 02110-1301, USA.
|
||||
|
||||
AT_SETUP([files-from: 0-separated file without -0])
|
||||
AT_KEYWORDS([files-from null])
|
||||
AT_KEYWORDS([files-from null T-null])
|
||||
|
||||
AT_DATA([expout],[jeden\ndwa
|
||||
trzy
|
||||
])
|
||||
|
||||
AT_TAR_CHECK([
|
||||
AT_SORT_PREREQ
|
||||
@@ -37,9 +41,7 @@ genfile -f trzy
|
||||
tar cfTv archive file-list | sort
|
||||
],
|
||||
[0],
|
||||
[jeden\ndwa
|
||||
trzy
|
||||
],
|
||||
[expout],
|
||||
[tar: file-list: file name read contains nul character
|
||||
],[],[],[ustar]) # Testing one format is enough
|
||||
|
||||
|
||||
41
tests/shortfile.at
Normal file
41
tests/shortfile.at
Normal file
@@ -0,0 +1,41 @@
|
||||
# Process this file with autom4te to create testsuite. -*- Autotest -*-
|
||||
|
||||
# Test suite for GNU tar.
|
||||
# Copyright (C) 2007 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 3, 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.
|
||||
|
||||
# Tar 1.18 in reading mode silently ignored any invalid files smaller than 512
|
||||
# Reported by: Ian <isoboroff@gmail.com> on Thu, 23 Aug 2007 15:15:51 -0400
|
||||
# References: <ebd55800708231215l5f8f52c0i9018fdb60bb202b@mail.gmail.com>
|
||||
# http://lists.gnu.org/archive/html/bug-tar/2007-08/msg00038.html
|
||||
|
||||
AT_SETUP([short input files])
|
||||
AT_KEYWORDS([shortfile])
|
||||
|
||||
AT_TAR_CHECK([
|
||||
genfile --length 511 --file foo || exit 5
|
||||
tar tf foo
|
||||
],
|
||||
[2],
|
||||
[],
|
||||
[tar: This does not look like a tar archive
|
||||
tar: Error exit delayed from previous errors
|
||||
],
|
||||
[],[],[gnu])
|
||||
|
||||
AT_CLEANUP
|
||||
|
||||
@@ -2,9 +2,12 @@ This directory contains scripts for testing GNU tar using
|
||||
star "test archives". The archives themselves can be obtained
|
||||
from http://download.berlios.de/pub/star/testscripts.
|
||||
|
||||
The tests are ignored unless environment variable STAR_TESTSCRIPTS
|
||||
is set and points to the directory where the test archives reside.
|
||||
Sample usage:
|
||||
These tests are disabled by default. There are two ways to run
|
||||
them. The simplest is by `make check-full' command. It requires wget
|
||||
and GNU md5sum to be installed. If you don't have these utilities,
|
||||
download the test archives manually and set the environment variable
|
||||
STAR_TESTSCRIPTS to point to the directory where they reside, for
|
||||
example:
|
||||
|
||||
make STAR_TESTSCRIPTS=testdir check
|
||||
or
|
||||
|
||||
@@ -179,6 +179,7 @@ m4_include([volume.at])
|
||||
m4_include([volsize.at])
|
||||
|
||||
m4_include([comprec.at])
|
||||
m4_include([shortfile.at])
|
||||
|
||||
m4_include([truncate.at])
|
||||
m4_include([grow.at])
|
||||
|
||||
Reference in New Issue
Block a user