All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maximilian Engelhardt <maxi@daemonizer.de>
To: Wei Liu <wl@xen.org>
Cc: Hans van Kranenburg <hans@knorrie.org>,
	xen-devel@lists.xenproject.org, Ian Jackson <iwj@xenproject.org>,
	Jan Beulich <jbeulich@suse.com>
Subject: Re: [XEN PATCH v2] docs: set date to SOURCE_DATE_EPOCH if available
Date: Tue, 05 Jan 2021 23:45:50 +0100	[thread overview]
Message-ID: <4329807.xOQAj1xCVp@localhost> (raw)
In-Reply-To: <20210105120034.qzjlitwd3lxe5kyl@liuwe-devbox-debian-v2>

[-- Attachment #1: Type: text/plain, Size: 3157 bytes --]

On Dienstag, 5. Januar 2021 13:00:34 CET Wei Liu wrote:
> On Thu, Dec 24, 2020 at 08:02:37PM +0100, Hans van Kranenburg wrote:
> > Hi,
> > 
> > On 12/23/20 5:56 PM, Maximilian Engelhardt wrote:
> > > check if a GNU date that supports the '-u -d @...' options and syntax or
> > > a BSD date are available. If so, use the appropriate options for the
> > > date command to produce a custom date if SOURCE_DATE_EPOCH is defined.
> > > If SOURCE_DATE_EPOCH is not defined or no suitable date command was
> > > found, use the current date. This enables reproducible builds.
> > > 
> > > Signed-off-by: Maximilian Engelhardt <maxi@daemonizer.de>
> > > 
> > > Changes in v2:
> > > - add capability detection for the 'date' command using ax_prog_date.m4
> > > - add information about detected date command to config/Docs.mk
> > > - only call a supported date command in docs/Makefile
> > > ---
> > > Please note the ax_prog_date.m4 macro is taken from the autoconf-archive
> > > repository [1] and it's license is GPL v3 or later with an exception for
> > > the generated configure script.
> > > 
> > > [1] https://www.gnu.org/software/autoconf-archive/
> > > ---
> > > 
> > >  config/Docs.mk.in  |   3 +
> > >  docs/Makefile      |  16 +++-
> > >  docs/configure     | 213 +++++++++++++++++++++++++++++++++++++++++++++
> > >  docs/configure.ac  |   9 ++
> > >  m4/ax_prog_date.m4 | 139 +++++++++++++++++++++++++++++
> > >  5 files changed, 379 insertions(+), 1 deletion(-)
> > >  create mode 100644 m4/ax_prog_date.m4
> > 
> > Wait, what. The comment about the -d option already existing since 2005
> > (in the previous thread) is relevant here...
> > 
> > I guess there would be other reasons why the whole current Xen master
> > branch would not compile on e.g. Debian Sarge 3.1 from 2005... Like,
> > amd64 did not even exist as release architecture yet, back then...
> > 
> > I'd prefer
> > 
> >   1 file changed, 7 insertions(+), 1 deletion(-)
> > 
> > over
> > 
> >   5 files changed, 379 insertions(+), 1 deletion(-)
> > 
> > in this case.
> 
> I have not read the previous thread. I would rather prefer a smaller
> patch than a larger one. I agree with Hans here.
> 
> Maximilian, what do you think?
> 
> Wei.

Hi Wei,

My previous patch and the following discussion can be found here:

https://lists.xenproject.org/archives/html/xen-devel/2020-12/msg01518.html

This v2 patch basically implements the suggestion from Jan Beulich to 
determine the capabilities of the date command in configure and then call it 
with the appropriate options. My fist patch just assumed the -d "@..." syntax 
was available on a GNU date, through it might also not have failed in the end 
if it was not, but I never tested this.

I also researched the addition of the -d "@..." syntax in GNU date and it 
seems it was introduced in about 2005 (it was available on a linux live CD 
from 2006). With my v1 patch this syntax only gets called when 
SOURCE_DATE_EPOCH is defined. I'm totally fine with the v1 patch, so if you 
don't see this as a problem, feel free to take it.

This fix is the last step for getting xen built reproducibly in the next 
Debian release.

Thanks
Maxi

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2021-01-05 22:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-23 16:56 [XEN PATCH v2] docs: set date to SOURCE_DATE_EPOCH if available Maximilian Engelhardt
2020-12-24 19:02 ` Hans van Kranenburg
2021-01-05 12:00   ` Wei Liu
2021-01-05 22:45     ` Maximilian Engelhardt [this message]
2021-01-05 12:13 ` Olaf Hering

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=4329807.xOQAj1xCVp@localhost \
    --to=maxi@daemonizer.de \
    --cc=hans@knorrie.org \
    --cc=iwj@xenproject.org \
    --cc=jbeulich@suse.com \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /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.