All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 03/34] reproducibility: generate SOURCE_DATE_EPOCH
Date: Wed, 11 May 2016 09:17:48 +0200	[thread overview]
Message-ID: <20160511071748.GI13285@hermes.click-hack.org> (raw)
In-Reply-To: <27c16676-ddd2-1e02-d22a-ca6c97a1c833@mind.be>

On Tue, May 10, 2016 at 01:28:14AM +0200, Arnout Vandecappelle wrote:
> On 05/08/16 22:22, Gilles Chanteperdrix wrote:
> > On Sat, May 07, 2016 at 11:00:11PM +0200, Arnout Vandecappelle wrote:
> >> On 04/30/16 09:48, Gilles Chanteperdrix wrote:
> >>> When reproducibility is wanted, generates a global SOURCE_DATE_EPOCH
> >>> environment variable which contains either the date of buildroot last
> >>> commit if running from a git repository, or the latest release date.
> >>>
> >>> This means that all packages embedding build dates will appear to
> >>> have the same build date, so in case of new commit or release, all
> >>> packages will appear to have been change, even though some of them
> >>> may not have changed in fact.
> >>> ---
> >>>  Makefile | 5 +++++
> >>>  1 file changed, 5 insertions(+)
> >>>
> >>> diff --git a/Makefile b/Makefile
> >>> index 86b2ed2..c1d2961 100644
> >>> --- a/Makefile
> >>> +++ b/Makefile
> >>> @@ -223,6 +223,11 @@ ifeq ($(BR2_REPRODUCIBLE),y)
> >>>  export TZ=UTC
> >>>  export LANG=C
> >>>  export LC_ALL=C
> >>> +SOURCE_DATE_GIT = $(shell GIT_DIR=$(TOPDIR)/.git $(GIT) log -1 --format=%at)
> >>> +SOURCE_DATE_CHANGES = $(shell head -n 1 $(TOPDIR)/CHANGES | \
> >>> +	sed 's/^.*Released \(.*\)$$/\1/;s/\(st\|nd\|rd\|th\),//' | \
> >>> +	LANG=C LC_ALL=C TZ=UTC xargs -i date -d \{\} +%s)
> >>> +export SOURCE_DATE_EPOCH = $(if $(wildcard $(TOPDIR)/.git),$(SOURCE_DATE_GIT),$(SOURCE_DATE_CHANGES))
> >>
> >>   I really don't like exporting a variable that is not well-known and that
> >> doesn't have a BR_ prefix. Where it is used by packages, it will anyway be in
> >> Buildroot-specific patches, so we can just as well add the BR_ prefix.
> >
> > SOURCE_DATE_EPOCH is well-known. Its meaning is defined by a
> > specification:
> > https://wiki.debian.org/ReproducibleBuilds/TimestampsProposal
> 
>   Ah, good.
> 
>   Actually, a better reference is
> https://reproducible-builds.org/specs/source-date-epoch/
> (actually the same developers wrote this spec, but it's supposedly not 
> debian-specific).
> 
>   When you repost, could you make sure that the commit message mentions this 
> explicitly?
> 
> >
> >>
> >>   But actually, we don't want to introduce buildroot-specific (and therefore
> >> unupstreamable) things in patches either. So there is not much point in
> >> exporting, except if it's used by scripts.
> >
> > I used it in some patched configure scripts (libnspr, if I remember
> > correctly). Which is why I exported it.
> 
>   As I said: used in patches.
> 
>   But indeed, it is well-known. So OK to export it.
> 
>   BTW, when it is possible to download a debian patch for a package (by setting 
> FOO_PATCH = ...) rather than rolling our own, we prefer that.

The thing is that trying and understanding what Debian does is not
convenient for me and most of the time a waste of time:
- things that I believe are problems for buildroot may not be
considered problems for Debian (see for instance the libltdl issue,
or the grub2 issue). 
- the Debian wiki has a high noise/signal ratio, and is not always
up to date, and this when I can access it, because the IP addresses
I use for browsing are blacklisted by Debian, so I have to take
special steps to access it.

So, I gave up on Debian pretty early, and I am not interested in
trying that painful exercise again. If someone else wants to do it
though, go ahead.

-- 
					    Gilles.
https://click-hack.org

  reply	other threads:[~2016-05-11  7:17 UTC|newest]

Thread overview: 91+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-30  7:43 [Buildroot] Reproducible builds Gilles Chanteperdrix
2016-04-30  7:48 ` [Buildroot] [PATCH 01/34] reproducibility: introduce config knob Gilles Chanteperdrix
2016-04-30  7:48   ` [Buildroot] [PATCH 02/34] reproducibility: override locale and timezone Gilles Chanteperdrix
2016-05-07 13:15     ` Thomas Petazzoni
2016-05-07 18:54       ` Arnout Vandecappelle
2016-06-14 13:53       ` Gilles Chanteperdrix
2016-04-30  7:48   ` [Buildroot] [PATCH 03/34] reproducibility: generate SOURCE_DATE_EPOCH Gilles Chanteperdrix
2016-05-07 13:20     ` Thomas Petazzoni
2016-05-07 21:00     ` Arnout Vandecappelle
2016-05-08 20:22       ` Gilles Chanteperdrix
2016-05-09 23:28         ` Arnout Vandecappelle
2016-05-11  7:17           ` Gilles Chanteperdrix [this message]
2016-04-30  7:49   ` [Buildroot] [PATCH 04/34] reproducibility: make rootfs.tar reproducible Gilles Chanteperdrix
2016-05-07 13:23     ` Thomas Petazzoni
2016-05-07 19:51       ` Arnout Vandecappelle
2016-05-08 20:17         ` Gilles Chanteperdrix
2016-05-09 23:29           ` Arnout Vandecappelle
2016-04-30  7:49   ` [Buildroot] [PATCH 05/34] reproducibility/linux: override build timestamp Gilles Chanteperdrix
2016-05-07 20:52     ` Arnout Vandecappelle
2016-04-30  7:49   ` [Buildroot] [PATCH 06/34] reproducibility/busybox: disable build timestamps Gilles Chanteperdrix
2016-04-30  7:49   ` [Buildroot] [PATCH 07/34] reproducibility/libgcrypt: override timestamps Gilles Chanteperdrix
2016-05-07 13:24     ` Thomas Petazzoni
2016-05-07 21:01     ` Arnout Vandecappelle
2016-04-30  7:49   ` [Buildroot] [PATCH 08/34] reproducibility/libgpg-error: " Gilles Chanteperdrix
2016-04-30  7:49   ` [Buildroot] [PATCH 09/34] reproducibility/libglib2: allow removing codegen Gilles Chanteperdrix
2016-05-07 13:28     ` Thomas Petazzoni
2016-05-08 12:51       ` Gustavo Zacarias
2016-05-08 12:56         ` Thomas Petazzoni
2016-05-07 21:04     ` Arnout Vandecappelle
2016-05-08 20:25       ` Gilles Chanteperdrix
2016-05-09 23:40         ` Arnout Vandecappelle
2016-05-10 19:42           ` Gilles Chanteperdrix
2016-05-12 20:05             ` Arnout Vandecappelle
2016-05-14 13:34               ` Gilles Chanteperdrix
2016-05-14 23:48                 ` Arnout Vandecappelle
2016-06-14 14:18                   ` Gilles Chanteperdrix
2016-04-30  7:49   ` [Buildroot] [PATCH 10/34] reproducibility/sysstat: override gcc macros Gilles Chanteperdrix
2016-05-07 21:07     ` Arnout Vandecappelle
2016-04-30  7:49   ` [Buildroot] [PATCH 11/34] reproducibility/vim: make vim reproducible Gilles Chanteperdrix
2016-05-07 13:30     ` Thomas Petazzoni
2016-05-08 20:26       ` Gilles Chanteperdrix
2016-04-30  7:49   ` [Buildroot] [PATCH 12/34] reproducibility/wireshark: remove documentation Gilles Chanteperdrix
2016-05-07 13:30     ` Thomas Petazzoni
2016-04-30  7:49   ` [Buildroot] [PATCH 13/34] reproducibility/libtool: fix reproducibility issues Gilles Chanteperdrix
2016-05-07 20:22     ` Thomas Petazzoni
2016-05-08 20:15       ` Gilles Chanteperdrix
2016-04-30  7:49   ` [Buildroot] [PATCH 14/34] reproducibility/python: also remove pyo files Gilles Chanteperdrix
2016-05-07 20:24     ` Thomas Petazzoni
2016-04-30  7:49   ` [Buildroot] [PATCH 15/34] reproducibility/gzip: avoid gzip timestamp in rootfs.tar.gz Gilles Chanteperdrix
2016-05-07 20:24     ` Thomas Petazzoni
2016-04-30  7:49   ` [Buildroot] [PATCH 16/34] reproducibility/lzo: forbid lzo with reproducible builds Gilles Chanteperdrix
2016-05-07 20:25     ` Thomas Petazzoni
2016-05-12 20:10       ` Arnout Vandecappelle
2016-04-30  7:49   ` [Buildroot] [PATCH 17/34] reproducibility/libnspr: override build timestamps Gilles Chanteperdrix
2016-05-07 20:27     ` Thomas Petazzoni
2016-05-08 20:32       ` Gilles Chanteperdrix
2016-04-30  7:49   ` [Buildroot] [PATCH 18/34] readline: fix installed libraries permission Gilles Chanteperdrix
2016-04-30  7:49   ` [Buildroot] [PATCH 19/34] reproducibility/python: make python reproducible Gilles Chanteperdrix
2016-05-07 20:29     ` Thomas Petazzoni
2016-05-08 20:19       ` Gilles Chanteperdrix
2016-04-30  7:49   ` [Buildroot] [PATCH 20/34] reproducibility/iproute2: do not rely on host directories Gilles Chanteperdrix
2016-04-30  7:49   ` [Buildroot] [PATCH 21/34] hddtemp: add Gilles Chanteperdrix
2016-05-07 20:31     ` Thomas Petazzoni
2016-05-09  7:38     ` Peter Korsgaard
2016-05-09 19:58       ` Gilles Chanteperdrix
2016-04-30  7:49   ` [Buildroot] [PATCH 22/34] High availability: add packages Gilles Chanteperdrix
2016-05-07 20:38     ` Thomas Petazzoni
2016-05-08 20:20       ` Gilles Chanteperdrix
2016-04-30  7:49   ` [Buildroot] [PATCH 23/34] pkg-download: allow git+ssh URLs Gilles Chanteperdrix
2016-05-07 20:39     ` Thomas Petazzoni
2016-05-09  6:41       ` Peter Korsgaard
2016-05-09 19:56         ` Gilles Chanteperdrix
2016-04-30  7:49   ` [Buildroot] [PATCH 24/34] grub2: really disable liblzma Gilles Chanteperdrix
2016-04-30  7:49   ` [Buildroot] [PATCH 25/34] grub2: allow full install (for installer images) Gilles Chanteperdrix
2016-04-30  7:49   ` [Buildroot] [PATCH 26/34] reproducibility: cpio: avoid embedding file dates in archive Gilles Chanteperdrix
2016-04-30  7:49   ` [Buildroot] [PATCH 27/34] package/cpio: allow generating host-cpio Gilles Chanteperdrix
2016-04-30  7:49   ` [Buildroot] [PATCH 28/34] reproducibility/fs/cpio: generate archive with host-cpio Gilles Chanteperdrix
2016-04-30  7:49   ` [Buildroot] [PATCH 29/34] cdrkit: add patch allowing to set creation date Gilles Chanteperdrix
2016-04-30  7:49   ` [Buildroot] [PATCH 30/34] reproducibility/fs/iso9660: reproducible iso images Gilles Chanteperdrix
2016-04-30  7:49   ` [Buildroot] [PATCH 31/34] reproducible/syslinux: make syslinux build reproducible Gilles Chanteperdrix
2016-04-30  7:49   ` [Buildroot] [PATCH 32/34] reproducible/iso9660: generate reproducible isos Gilles Chanteperdrix
2016-04-30  7:49   ` [Buildroot] [PATCH 33/34] reproducible/cpio: generate reproducible cpio archives Gilles Chanteperdrix
2016-04-30  7:49   ` [Buildroot] [PATCH 34/34] reproducible/grub2: get a reproducible grub2 full installation Gilles Chanteperdrix
2016-05-07 13:14   ` [Buildroot] [PATCH 01/34] reproducibility: introduce config knob Thomas Petazzoni
2016-05-09  7:42   ` Peter Korsgaard
2016-05-09 12:53     ` Thomas Petazzoni
2016-05-09 13:01       ` Peter Korsgaard
2016-05-09 13:11         ` Thomas Petazzoni
2016-05-07 13:11 ` [Buildroot] Reproducible builds Thomas Petazzoni
2016-05-07 20:55   ` Arnout Vandecappelle
2016-05-08  5:51     ` Thomas Petazzoni

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=20160511071748.GI13285@hermes.click-hack.org \
    --to=gilles.chanteperdrix@xenomai.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.