helpGNU tar - Support: sr #108529, List of files read completely with...

 
 

sr #108529: List of files read completely with -T option?

Submitted by:  Kirill Müller <krlmlr>
Submitted on:  Wed 12 Mar 2014 09:31:54 AM UTC  
 
Category: NonePriority: 5 - Normal
Severity: 3 - NormalStatus: None
Privacy: PublicAssigned to: None
Open/Closed: OpenOperating System: None

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Wed 02 Apr 2014 09:11:42 PM UTC, comment #1:

After manually removing some instances of -Wstack-protector in two Makefile-s I was able to compile tar. Indeed, the compiled version processes the files on the fly in my test script.

Test version: f24b30ec8ca1851b7bd1, perhaps 26538c9bfc5fd726 is responsible for the changed behavior.

Kirill Müller <krlmlr>
Wed 12 Mar 2014 09:31:54 AM UTC, original submission:

I was looking for a way to dump files into a tar archive as they are created and deleting them as soon as they are dumped. The following approach does not work as expected on my system:

for ((f = 0; $f < 10000; f++)); do
touch $f; echo $f;
done | tar -c -f ../otf.tar -T - --remove-files

The archive is created, but only after all files have been created. Why does the -T option read the entire list of files first?

$ tar --version
tar (GNU tar) 1.26

I have peeked into the code, and it seems to me that the list of files should be read incrementally:

http://git.savannah.gnu.org/cgit/tar.git/tree/src/create.c#n1404

Why is it not?

See also http://unix.stackexchange.com/q/119141/19205 -- a workaround using cpio is shown there, but I had hoped this would work in tar, too.

Unfortunately, I can't compile tar from source on my system (Ubuntu 13.04):

CC argp-help.o
argp-help.c: In function ‘hol_usage’:
argp-help.c:1347:1: error: stack protector not protecting local variables: variable length buffer [-Werror=stack-protector]
argp-help.c: In function ‘_help’:
argp-help.c:1589:1: error: stack protector not protecting local variables: variable length buffer [-Werror=stack-protector]

Thank you for your help!

Kirill Müller <krlmlr>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by krlmlr (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    No Changes Have Been Made to This Item

    Back to the top


    Powered by Savane 3.1-cleanup