tar: tar -tvv --no-xattrs doesn't print xattrs now

This was obvious bug, already proposed upstream.

Version: 2:1.26-24
This commit is contained in:
Pavel Raiskup 2013-05-31 16:47:04 +02:00
parent 66190e5a1c
commit 005afb760c
2 changed files with 45 additions and 0 deletions

View File

@ -0,0 +1,36 @@
diff --git a/src/xattrs.c b/src/xattrs.c
index 5a4bf72..bdf6ba0 100644
--- a/src/xattrs.c
+++ b/src/xattrs.c
@@ -693,7 +693,7 @@ xattrs_print_char (struct tar_stat_info const *st, char *output)
if (selinux_context_option > 0 && st->cntx_name)
*output = '.';
- if (acls_option && (st->acls_a_len || st->acls_d_len))
+ if (acls_option > 0 && (st->acls_a_len || st->acls_d_len))
*output = '+';
}
@@ -704,11 +704,11 @@ xattrs_print (struct tar_stat_info const *st)
return;
/* selinux */
- if (selinux_context_option && st->cntx_name)
+ if (selinux_context_option > 0 && st->cntx_name)
fprintf (stdlis, " s: %s\n", st->cntx_name);
/* acls */
- if (acls_option && (st->acls_a_len || st->acls_d_len))
+ if (acls_option > 0 && (st->acls_a_len || st->acls_d_len))
{
fprintf (stdlis, " a: ");
acls_one_line ("", ',', st->acls_a_ptr, st->acls_a_len);
@@ -717,7 +717,7 @@ xattrs_print (struct tar_stat_info const *st)
}
/* xattrs */
- if (xattrs_option && st->xattr_map_size)
+ if (xattrs_option > 0 && st->xattr_map_size)
{
int i;

View File

@ -98,6 +98,13 @@ Patch14: tar-1.26-command-args.patch
# ~> #926610 (downstream)
Patch15: tar-1.26-arm-config-sub-guess.patch
# Do not print xattrs/selinux/acls when --no-xattrs/--no-acls/--no-selinux
# options are used during -tvv output. (TODO: merge this with xattrs patch
# once becomes upstream)
# ~> downstream (yet)
# ~> proposal: http://lists.gnu.org/archive/html/bug-tar/2013-05/msg00020.html
Patch16: tar-1.26-xattrs-printing.patch
# Silence gcc warnings
# ~> upstream tar: 17f99bc6f, 5bb0433
# ~> upstream paxutils: 0b3d84a0
@ -151,6 +158,7 @@ the rmt package.
%patch13 -p1 -b .extract-single-volume
%patch14 -p1 -b .command-args
%patch15 -p1 -b .arm-config-guess-sub
%patch16 -p1 -b .print-xattrs-fix
%patch999 -p1 -b .silence-gcc
autoreconf -v
@ -212,6 +220,7 @@ fi
%changelog
* Thu May 30 2013 Pavel Raiskup <praiskup@redhat.com> - 2:1.26-24
- use /usr/bin/ssh as the default remote shell binary (#969015)
- do not verbose-print xattrs when --no-xattrs option is used
* Tue May 28 2013 Pavel Raiskup <praiskup@redhat.com> - 2:1.26-23
- again search for 'rmt' binary in %%{_sbindir} on target host