Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Seiderer <ps.report@gmx.net>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] download/git: create GNU format tar files
Date: Mon, 20 Mar 2017 22:41:07 +0100	[thread overview]
Message-ID: <20170320224107.166de161@gmx.net> (raw)
In-Reply-To: <20170320205121.30926-1-arnout@mind.be>

Hello Arnout,

On Mon, 20 Mar 2017 21:51:21 +0100, "Arnout Vandecappelle (Essensium/Mind)" <arnout@mind.be> wrote:

> On most distros, the tar format defaults to GNU. However, at build time
> the default format may be changed to posix. Also, future versions of
> tar will default to posix.
> 
> Since we want the tarballs created by the git download method to be
> reproducible (so their hash can be checked), we should explicitly
> specify the format. Since existing tarballs on sources.buildroot.org
> use the GNU format, and also the existing hashes in the *.hash files
> are based on GNU format tarballs, we use the GNU format.
> 
> In addition, the Posix format encodes atime and ctime as well as mtime,
> but tar offers no option like --mtime to override them. In the GNU
> format, atime and ctime are only encoded if the --incremental option is
> given.
> 
> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
> Cc: Peter Seiderer <ps.report@gmx.net>
> ---
> Peter, can you test if this solves the issue for you?

After removing the old dl/wiringpi-2.44.tar.gz file, applying your patch
and done a fresh download:

	$ cat package/wiringpi/wiringpi.hash 
# Locally calculated
sha256 464c98ed54f5c0ad6611e270be3491c4598a32b7e86b208255862a301c564955  wiringpi-2.44.tar.gz

	$ sha256sum dl/wiringpi-2.44.tar.gz 
464c98ed54f5c0ad6611e270be3491c4598a32b7e86b208255862a301c564955  dl/wiringpi-2.44.tar.gz

Tested-by: Peter Seiderer <ps.report@gmx.net>

Regards,
Peter

> ---
>  support/download/git | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/support/download/git b/support/download/git
> index 7921411835..056057c700 100755
> --- a/support/download/git
> +++ b/support/download/git
> @@ -94,6 +94,8 @@ popd >/dev/null
>  # Generate the archive, sort with the C locale so that it is reproducible
>  find "${basename}" -not -type d >"${basename}.list"
>  LC_ALL=C sort <"${basename}.list" >"${basename}.list.sorted"
> -tar cf - --numeric-owner --owner=0 --group=0 --mtime="${date}" \
> +# Create GNU-format tarballs, since that's the format of the tarballs on
> +# sources.buildroot.org and used in the *.hash files
> +tar cf - --numeric-owner --owner=0 --group=0 --mtime="${date}" --format=gnu \
>           -T "${basename}.list.sorted" >"${output}.tar"
>  gzip -n <"${output}.tar" >"${output}"

      reply	other threads:[~2017-03-20 21:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-20 20:51 [Buildroot] [PATCH] download/git: create GNU format tar files Arnout Vandecappelle
2017-03-20 21:41 ` Peter Seiderer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170320224107.166de161@gmx.net \
    --to=ps.report@gmx.net \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox