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

 
 

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

Submitter:  Kirill Müller <krlmlr>
Submitted:  Wed 12 Mar 2014 09:31:54 AM UTC
   
 
Category:  None Priority:  5 - Normal
Severity:  3 - Normal Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open Operating System:  None
* Mandatory Fields

Post a Comment

Add a New Comment Rich Markup
   

Discussion

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.savann ... rc/create.c#n1404

Why is it not?

See also http://unix.stack ... om/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>

 

Attached Files

This item currently has no attached files.

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

Attach Files:
   
   
Comment:
   

 

Dependencies

This item does not depend on any other items.

No items depend on this one.

 

Mail Notification Carbon-Copy List

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

    Votes

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

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

    History

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.16-598c.
    Corresponding source code