tar: remove trailing white space from source files

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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