bug-tar
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-tar] [PATCH 1/2] tests: new test sparse04 for --sparse --posix and


From: Kamil Dudka
Subject: [Bug-tar] [PATCH 1/2] tests: new test sparse04 for --sparse --posix and long names
Date: Thu, 25 Nov 2010 00:26:44 +0100
User-agent: KMail/1.9.10

Hello,

attached are a regression test and sort of initial version of a fix
for https://bugzilla.redhat.com/656834 -- the problem is that during 
xheader_decode(), the file name obtained from "GNU.sparse.name" is later 
overriden by the dummy name stored in "path", which leads to a nonsense
file name stored on disk.  A minimal example may look like:

$ NAME=`seq 60 | tr -d '\n'`
$ truncate -s 10M $NAME
$ tar -c --sparse --posix $NAME | tar t

Attached is also a gdb trace that shows what happens.  Just two concerns
about the fix:

1) It expects that "GNU.sparse.major" comes before "path", what is IMO not 
guaranteed.

2) It inserts a sparse-related quirk into the common part of code.

I guess we should rather go through keyword_override_list or something like 
that, but I don't understand much the code.

Kamil

Attachment: 0001-tests-new-test-sparse04-for-sparse-posix-and-long-na.patch
Description: Text Data

Attachment: 0002-tar-sparse-now-properly-restore-long-file-names-from.patch
Description: Text Data

Attachment: gdb-trace.txt
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]