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
Created attachment 455528 [details] emerge --info tar
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
heh, version 3 :) mkdir 12; cd 12 ; mkdir 1; touch 1/1; mkdir 2; touch 2/2
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.
(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.
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
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