[BusyBox 0000991]: tar does not behave like gnu tar when dealing with include/exclude lists

bugs at busybox.net bugs at busybox.net
Sun Sep 3 14:05:14 UTC 2006


The following issue has been CLOSED 
====================================================================== 
http://busybox.net/bugs/view.php?id=991 
====================================================================== 
Reported By:                schieli
Assigned To:                BusyBox
====================================================================== 
Project:                    BusyBox
Issue ID:                   991
Category:                   Standards Compliance
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     closed
Resolution:                 open
Fixed in Version:           
====================================================================== 
Date Submitted:             08-12-2006 06:15 PDT
Last Modified:              09-03-2006 07:05 PDT
====================================================================== 
Summary:                    tar does not behave like gnu tar when dealing with
include/exclude lists
Description: 
There are at least 3 threads about this issue

http://www.busybox.net/lists/busybox/2006-April/020371.html
http://www.busybox.net/lists/busybox/2006-April/020461.html
http://www.busybox.net/lists/busybox/2006-July/023285.html
====================================================================== 

---------------------------------------------------------------------- 
 vda - 09-02-06 12:14  
---------------------------------------------------------------------- 
Please provide testcases where tar does something incorrectly.
So far all issues referenced in links above were addressed by
this patch in svn:

diff -urpN busybox.0/archival/libunarchive/find_list_entry.c
busybox.1/archival/libunarchive/find_list_entry.c
--- busybox.0/archival/libunarchive/find_list_entry.c   2006-08-24
11:43:52.000000000 +0200
+++ busybox.1/archival/libunarchive/find_list_entry.c   2006-09-02
20:11:50.000000000 +0200
@@ -13,7 +13,7 @@
 const llist_t *find_list_entry(const llist_t *list, const char
*filename)
 {
        while (list) {
-               if (fnmatch(list->data, filename, 0) == 0) {
+               if (fnmatch(list->data, filename, FNM_LEADING_DIR) == 0)
{
                        return (list);
                }
                list = list->link;


Is this ok? 

---------------------------------------------------------------------- 
 schieli - 09-02-06 14:00  
---------------------------------------------------------------------- 
The patch in svn does indeed solve the problems reported in above threads.
Here is a testcase for a remaining one (trailing slash in include list):

mkdir -p foo/bar
touch foo/bar/file
tar cf foo.tar -C foo .
echo "./bar/" > foo.list
rm -rf foo/*
busybox tar xf foo.tar -C foo -T foo.list
find foo | sort >logfile.bb
rm -rf foo/*
tar xf foo.tar -C foo -T foo.list
find foo | sort >logfile.gnu
cmp logfile.gnu logfile.bb

I also updated my patch to take care of this issue.

 

---------------------------------------------------------------------- 
 vda - 09-03-06 07:05  
---------------------------------------------------------------------- 
Applied 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
08-12-06 06:15  schieli        New Issue                                    
08-12-06 06:15  schieli        Status                   new => assigned     
08-12-06 06:15  schieli        Assigned To               => BusyBox         
08-12-06 06:15  schieli        File Added: tar_include_exclude.patch            
       
08-12-06 06:19  schieli        Issue Monitored: schieli                     
09-02-06 12:14  vda            Note Added: 0001603                          
09-02-06 13:37  schieli        Note Added: 0001604                          
09-02-06 14:00  schieli        Note Edited: 0001604                         
09-02-06 14:01  schieli        File Added: tar_subdirs.patch                    
09-03-06 07:05  vda            Status                   assigned => closed  
09-03-06 07:05  vda            Note Added: 0001607                          
======================================================================




More information about the busybox-cvs mailing list