bug-tar
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-tar] --xattrs makes archives unreproducible


From: Pavel Raiskup
Subject: Re: [Bug-tar] --xattrs makes archives unreproducible
Date: Wed, 01 Jul 2015 10:39:11 +0200
User-agent: KMail/4.14.9 (Linux/4.0.5-200.fc21.x86_64+debug; KDE/4.14.9; x86_64; ; )

As doing this is probably good idea, I'll try to help with review, thanks
again for the patch.

On Friday 26 of June 2015 15:37:26 Zachary Vance wrote:
> Archives with extended headers are reproducible

Comment should mention that this is about 'pax' format, not strictly
related to xattrs.

> * I've changed ".%p" in the default headers to .0 instead of stripping the
> component. This is in the hopes that this will maintain some compatibility
> with old parsers.

The comment does not follow the GNU Coding Standards changelog format, you
should use '* changed/file.X (changed_method): Change description.' [1].

> ---
>  doc/tar.texi  | 4 ++--
>  src/xheader.c | 4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/doc/tar.texi b/doc/tar.texi
> index 9cff066..648bac8 100644
> --- a/doc/tar.texi
> +++ b/doc/tar.texi
> @@ -9916,7 +9916,7 @@ If no option @samp{exthdr.name=string} is specified,
> @command{tar}
>  will use the following default value:
> 
>  @smallexample
> -%d/PaxHeaders.%p/%f
> +%d/PaxHeaders.0/%f

I've seen your worries about the header parsers, I'm not sure somebody has
implemented such parser so far.  If we do not know some, I would rather
remove the PID part completely to '%d/PaxHeaders/%f'.  If we plan to
standardize the string, this would make it less confusing.

Also, as Paul said, we probably should keep using %d/PaxHeaders.%p/%f if
POSIXLY_CORRECT env variable set.

>  @end smallexample
> 
>  @item address@hidden
> @@ -9948,7 +9948,7 @@ If no option @samp{globexthdr.name=string} is
> specified, @command{tar}
>  will use the following default value:
> 
>  @smallexample
> -$TMPDIR/GlobalHead.%p.%n
> +$TMPDIR/GlobalHead.0.%n
>  @end smallexample
> 
>  @noindent
> diff --git a/src/xheader.c b/src/xheader.c
> index a5452a1..4aeee60 100644
> --- a/src/xheader.c
> +++ b/src/xheader.c
> @@ -363,11 +363,11 @@ char *
>  xheader_xhdr_name (struct tar_stat_info *st)
>  {
>    if (!exthdr_name)
> -    assign_string (&exthdr_name, "%d/PaxHeaders.%p/%f");
> +    assign_string (&exthdr_name, "%d/PaxHeaders.0/%f");
>    return xheader_format_name (st, exthdr_name, 0);
>  }
> 
> -#define GLOBAL_HEADER_TEMPLATE "/GlobalHead.%p.%n"
> +#define GLOBAL_HEADER_TEMPLATE "/GlobalHead.0.%n"
> 
>  char *
>  xheader_ghdr_name (void)

I haven't been able to apply your patch.  I saved the mail as 'mbox' file
and doing 'git am' failed.  Using attachment (and git format-patch) or git
send-email would be better.

[1] http://www.gnu.org/prep/standards/standards.html#Style-of-Change-Logs

Pavel




reply via email to

[Prev in Thread] Current Thread [Next in Thread]