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

Re: [PATCH v1 2/2] Define SOURCE_DATE_EPOCH based on git log



Hi Frédéric,

On 31/10/2020 15:14, Frédéric Pierret (fepitre) wrote:
---
  xen/Makefile | 2 ++
  1 file changed, 2 insertions(+)

diff --git a/xen/Makefile b/xen/Makefile
index 30b1847515..4cc35556ef 100644
--- a/xen/Makefile
+++ b/xen/Makefile
@@ -6,6 +6,8 @@ export XEN_EXTRAVERSION ?= -unstable$(XEN_VENDORVERSION)
  export XEN_FULLVERSION   = $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION)
  -include xen-version
+export SOURCE_DATE_EPOCH ?= $(shell git log -1 --format=%ct 2>/dev/null)

It is possible to download a tarball for Xen release (see [1]). They don't contain the .git directory and therefore this command would fail.

Should we fallback to "date" in this case?

+
  export XEN_WHOAMI     ?= $(USER)
  export XEN_DOMAIN     ?= $(shell ([ -x /bin/dnsdomainname ] && /bin/dnsdomainname) || 
([ -x /bin/domainname ] && /bin/domainname || echo [unknown]))
  ifneq ($(SOURCE_DATE_EPOCH),)


Cheers,

[1] https://xenproject.org/downloads/

--
Julien Grall



 


Rackspace

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