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

Re: [XEN PATCH v2] docs: set date to SOURCE_DATE_EPOCH if available



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@xxxxxxxxxxxxx>
> > > 
> > > 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: signature.asc
Description: This is a digitally signed message part.


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.