Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 602006 - app-arch/tar-1.29-r1 exclude-from broken
Summary: app-arch/tar-1.29-r1 exclude-from broken
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal major
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-08 17:02 UTC by Alexandr Tiurin
Modified: 2016-12-10 04:55 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info tar (einfo,16.74 KB, text/plain)
2016-12-08 17:08 UTC, Alexandr Tiurin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandr Tiurin 2016-12-08 17:02:19 UTC
tar ignore exclude list files


Reproducible: Always

Steps to Reproduce:
 cd ~
 mkdir 12; mkdir 1; touch 1; mkdir 2; touch 2
 echo "$HOME/12/1/*" > ../tar.excl
 
Actual Results:  
$ tar -vcf ../test.tar ./ -X ../tar.excl
./
./1/
./1/1
./2/
./2/2

$ tar -t -f ../test.tar
./
./1/
./1/1
./2/
./2/2



Expected Results:  
workaround
install app-arch/tar-1.28-r1
Comment 1 Alexandr Tiurin 2016-12-08 17:08:03 UTC
Created attachment 455528 [details]
emerge --info tar
Comment 2 Alexandr Tiurin 2016-12-08 17:18:23 UTC
some fix

mkdir 12; mkdir 1; touch 1/1; mkdir 2; touch 2/2

instead 

mkdir 12; mkdir 1; touch 1; mkdir 2; touch 2
Comment 3 Alexandr Tiurin 2016-12-08 17:19:56 UTC
heh, version 3 :)

mkdir 12; cd 12 ; mkdir 1; touch 1/1; mkdir 2; touch 2/2
Comment 4 Jonas Stein gentoo-dev 2016-12-09 14:25:26 UTC
Thank you for the report. It looks like an upstream bug.
If so, please report it upstream and link the report here.
Else please provide more information why you think this is no upstream bug.
Comment 5 SpanKY gentoo-dev 2016-12-09 16:25:37 UTC
(In reply to Jonas Stein from comment #4)

if it's upstream intended behavior, we use UPSTREAM.  if it's a bug that upstream didn't intend, we tend to triage/fix/report things ourselves.

Alexandr: please post the exact steps together for us to run.  it's hard to follow what you're trying to do over comment #0, #2, and #3.
Comment 6 Alexandr Tiurin 2016-12-09 22:47:49 UTC
Ok.

For example, please  make backup /etc

# tar -cf /tmp/etc.tar /etc --exclude=shadow*

and run

# tar -t -f /tmp/etc.tar | grep shadow
etc/pam.d/shadow
etc/gshadow-
etc/shadow-
etc/shadow
etc/gshadow


If use <tar-1.29 "--exclude" work well.

# tar -cf /tmp/etc1.tar /etc --exclude=shadow*
# tar -t -f /tmp/etc1.tar | grep shadow
etc/gshadow-
etc/gshadow

Interesting post http://lists.gnu.org/archive/html/bug-tar/2016-12/msg00001.html
Comment 7 SpanKY gentoo-dev 2016-12-10 04:55:50 UTC
ok, this is a case of UPSTREAM :).  i thought it had always behaved this way, or at least this is how i expected it to work.

basically, order matters.  this won't work:
  tar -cf /tmp/etc.tar /etc --exclude='shadow*'
but this works:
  tar -cf /tmp/etc.tar --exclude='shadow*' /etc

the manual hints about it here:
  https://www.gnu.org/software/tar/manual/tar.html#SEC19
  https://www.gnu.org/software/tar/manual/tar.html#SEC21

if you can find references that indicate that this behavior is incorrect or unexpected, we can recheck.  otherwise, you can try e-mailing upstream:
  https://lists.gnu.org/mailman/listinfo/bug-tar