From patchwork Sat Oct 31 15:14:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?RnLDqWTDqXJpYyBQaWVycmV0?= X-Patchwork-Id: 11871471 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C7CAF61C for ; Sat, 31 Oct 2020 15:15:14 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 83CB52224A for ; Sat, 31 Oct 2020 15:15:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=qubes-os.org header.i=frederic.pierret@qubes-os.org header.b="FcdcVBgk" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 83CB52224A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=qubes-os.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.16957.41738 (Exim 4.92) (envelope-from ) id 1kYsaU-0006qt-9T; Sat, 31 Oct 2020 15:14:38 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 16957.41738; Sat, 31 Oct 2020 15:14:38 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kYsaU-0006qk-5W; Sat, 31 Oct 2020 15:14:38 +0000 Received: by outflank-mailman (input) for mailman id 16957; Sat, 31 Oct 2020 15:14:36 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kYsaS-0006qP-8L for xen-devel@lists.xenproject.org; Sat, 31 Oct 2020 15:14:36 +0000 Received: from sender4-of-o57.zoho.com (unknown [136.143.188.57]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 9fef08cc-86a5-415a-9c64-964aed3b21bb; Sat, 31 Oct 2020 15:14:35 +0000 (UTC) Received: from localhost.localdomain (92.188.110.153 [92.188.110.153]) by mx.zohomail.com with SMTPS id 1604157261060530.2165278307001; Sat, 31 Oct 2020 08:14:21 -0700 (PDT) Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kYsaS-0006qP-8L for xen-devel@lists.xenproject.org; Sat, 31 Oct 2020 15:14:36 +0000 X-Inumbo-ID: 9fef08cc-86a5-415a-9c64-964aed3b21bb Received: from sender4-of-o57.zoho.com (unknown [136.143.188.57]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 9fef08cc-86a5-415a-9c64-964aed3b21bb; Sat, 31 Oct 2020 15:14:35 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; t=1604157262; cv=none; d=zohomail.com; s=zohoarc; b=SJzQFa6rplIFNlFuqeX6Mn2B8ZGQZ2MoLnjSvnQ0EFgZh5FBAXvqJ+YAf1QP3bYeRQ4Le1Ls6ndaxHAj98uUQIMGJ7qmZ1+g+V0wggv1HZhJ5MZ+WcBIKsgjWSiX0JmU02nAkwZ/CtRJ1f++B6M+QcS2NP9o9h532RBlLi5LvoI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1604157262; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=9aLrfxdEKAfK4nVPDcKmv48q+Kbtqnpq+yQnWMhB+SE=; b=Gmagl4JfeOcKxP1wPtLRBQwnluouqR74jLvOYhHEcAp+KGa3QSGxvFp8jtqi5nO9utvLA1DAlesL2H6iq84mPZ0yTxt4H4Nm7LFrUb40PofknnRWrV3lpZdelh4egvvcYo5Ml4TNfJP+hbE/b8XnxKcYxSyjKNbtKlw+jfbupts= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=qubes-os.org; spf=pass smtp.mailfrom=frederic.pierret@qubes-os.org; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1604157262; s=s; d=qubes-os.org; i=frederic.pierret@qubes-os.org; h=From:To:Cc:Message-ID:Subject:Date:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Content-Type; bh=9aLrfxdEKAfK4nVPDcKmv48q+Kbtqnpq+yQnWMhB+SE=; b=FcdcVBgkzFZnqlwgpGr1142jiaQxdjAaZWHK9eAx1TzzgEpwpu5hj4vlFaBhoAx3 APEtfHXcRwR2bJvasLaDduK4OTvX0Fho8MaOVd//gBlEGHb2oB3DUFl6aBZ4f7Basli 5P5MjbIwebpCu/QdaT1It7Upe5H0wy4b9cPspYHw= Received: from localhost.localdomain (92.188.110.153 [92.188.110.153]) by mx.zohomail.com with SMTPS id 1604157261060530.2165278307001; Sat, 31 Oct 2020 08:14:21 -0700 (PDT) From: =?utf-8?q?Fr=C3=A9d=C3=A9ric_Pierret_=28fepitre=29?= To: xen-devel@lists.xenproject.org Cc: =?utf-8?q?Fr=C3=A9d=C3=A9ric_Pierret_=28fepitre=29?= , Jan Beulich , Andrew Cooper , =?utf-8?q?Roger_Pau_Monn=C3=A9?= , Wei Liu , Ian Jackson , George Dunlap , Julien Grall , Stefano Stabellini Message-ID: <57423c6627e00fbc3f41d3f6be6ba1e15abb96fc.1604156731.git.frederic.pierret@qubes-os.org> Subject: [PATCH v1 1/2] Define build dates/time based on SOURCE_DATE_EPOCH Date: Sat, 31 Oct 2020 16:14:07 +0100 X-Mailer: git-send-email 2.26.2 In-Reply-To: References: MIME-Version: 1.0 X-ZohoMailClient: External It improves reproducibility if SOURCE_DATE_EPOCH is defined while building xen binary --- tools/firmware/hvmloader/Makefile | 4 ++++ tools/firmware/vgabios/Makefile | 4 ++++ xen/Makefile | 5 +++++ 3 files changed, 13 insertions(+) diff --git a/tools/firmware/hvmloader/Makefile b/tools/firmware/hvmloader/Makefile index e980ce7c5f..923e3c8b9a 100644 --- a/tools/firmware/hvmloader/Makefile +++ b/tools/firmware/hvmloader/Makefile @@ -21,7 +21,11 @@ XEN_ROOT = $(CURDIR)/../../.. include $(XEN_ROOT)/tools/firmware/Rules.mk # SMBIOS spec requires format mm/dd/yyyy +ifneq ($(SOURCE_DATE_EPOCH),) +SMBIOS_REL_DATE ?= $(shell date -u -d "@$(SOURCE_DATE_EPOCH)" "+%m/%d/%Y" 2>/dev/null) +else SMBIOS_REL_DATE ?= $(shell date +%m/%d/%Y) +endif CFLAGS += $(CFLAGS_xeninclude) diff --git a/tools/firmware/vgabios/Makefile b/tools/firmware/vgabios/Makefile index 3284812fde..9b8b687a73 100644 --- a/tools/firmware/vgabios/Makefile +++ b/tools/firmware/vgabios/Makefile @@ -5,7 +5,11 @@ BCC = bcc AS86 = as86 RELEASE = `pwd | sed "s-.*/--"` +ifneq ($(SOURCE_DATE_EPOCH),) +VGABIOS_REL_DATE ?= $(shell date -u -d "@$(SOURCE_DATE_EPOCH)" "+%d %b %Y" 2>/dev/null) +else VGABIOS_REL_DATE ?= `date '+%d %b %Y'` +endif RELVERS = `pwd | sed "s-.*/--" | sed "s/vgabios//" | sed "s/-//"` VGABIOS_DATE = "-DVGABIOS_DATE=\"$(VGABIOS_REL_DATE)\"" diff --git a/xen/Makefile b/xen/Makefile index bf0c804d43..30b1847515 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -8,8 +8,13 @@ export XEN_FULLVERSION = $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION) export XEN_WHOAMI ?= $(USER) export XEN_DOMAIN ?= $(shell ([ -x /bin/dnsdomainname ] && /bin/dnsdomainname) || ([ -x /bin/domainname ] && /bin/domainname || echo [unknown])) +ifneq ($(SOURCE_DATE_EPOCH),) +export XEN_BUILD_DATE ?= $(shell date -u -d "@$(SOURCE_DATE_EPOCH)" 2>/dev/null) +export XEN_BUILD_TIME ?= $(shell date -u -d "@$(SOURCE_DATE_EPOCH)" +%T 2>/dev/null) +else export XEN_BUILD_DATE ?= $(shell LC_ALL=C date) export XEN_BUILD_TIME ?= $(shell LC_ALL=C date +%T) +endif export XEN_BUILD_HOST ?= $(shell hostname) # Best effort attempt to find a python interpreter, defaulting to Python 3 if From patchwork Sat Oct 31 15:14:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?RnLDqWTDqXJpYyBQaWVycmV0?= X-Patchwork-Id: 11871473 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B0A3961C for ; Sat, 31 Oct 2020 15:15:21 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 773892224A for ; Sat, 31 Oct 2020 15:15:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=qubes-os.org header.i=frederic.pierret@qubes-os.org header.b="cSUIb1e9" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 773892224A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=qubes-os.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.16958.41750 (Exim 4.92) (envelope-from ) id 1kYsae-0006vi-I2; Sat, 31 Oct 2020 15:14:48 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 16958.41750; Sat, 31 Oct 2020 15:14:48 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kYsae-0006vb-EV; Sat, 31 Oct 2020 15:14:48 +0000 Received: by outflank-mailman (input) for mailman id 16958; Sat, 31 Oct 2020 15:14:47 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kYsac-0006vA-Uf for xen-devel@lists.xenproject.org; Sat, 31 Oct 2020 15:14:46 +0000 Received: from sender4-of-o57.zoho.com (unknown [136.143.188.57]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 1c9269b7-80f8-46b8-8a0b-7a8097915c17; Sat, 31 Oct 2020 15:14:46 +0000 (UTC) Received: from localhost.localdomain (92.188.110.153 [92.188.110.153]) by mx.zohomail.com with SMTPS id 1604157264126690.3989801319432; Sat, 31 Oct 2020 08:14:24 -0700 (PDT) Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kYsac-0006vA-Uf for xen-devel@lists.xenproject.org; Sat, 31 Oct 2020 15:14:46 +0000 X-Inumbo-ID: 1c9269b7-80f8-46b8-8a0b-7a8097915c17 Received: from sender4-of-o57.zoho.com (unknown [136.143.188.57]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 1c9269b7-80f8-46b8-8a0b-7a8097915c17; Sat, 31 Oct 2020 15:14:46 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; t=1604157265; cv=none; d=zohomail.com; s=zohoarc; b=Y/N2YoseYxZvBfPtBP7ImOm5NEHe4Z/1XgWzf/DsiZqZUacNDP0EUK2mspwNDbHhb4tZyNiVuo1WKDOnmWeL8Cix2CPPPQk2L4jZhfR+66Wozt4NCVtSsycw5+PE6QS9cZMDcf4oI6ED+Mlj02ZoEEMmvgG/f38J2ekbSxwPWXw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1604157265; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=93nOu4o8+RRpc4ALMBdxBUd5VTnxK5nhf8F1BIq1cSk=; b=nRV3NAZfBED06WK+Dhd4ilXvzeZQK7/haNF6swf9D1Uxa4JZYr8Ut2348OdXC1UiEOKNI7yQZhOQU/oKVKADrkbs5EJ9Stp4XZJ+Ax3MO3NZqt/gx/naU1hpE1OXKyU31vnKqr/V4WcRyYrlU7jRxb+v+m8gP75tU6ASW0Zo9YY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=qubes-os.org; spf=pass smtp.mailfrom=frederic.pierret@qubes-os.org; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1604157265; s=s; d=qubes-os.org; i=frederic.pierret@qubes-os.org; h=From:To:Cc:Message-ID:Subject:Date:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Content-Type; bh=93nOu4o8+RRpc4ALMBdxBUd5VTnxK5nhf8F1BIq1cSk=; b=cSUIb1e9btQ/p+5qDL1ri1Reoy66rgh4KsiT+qSfIuUReKoKbYH6F2vbvC+lktJ1 uTA3SXtuVev7stb6ONhjfNqCs518hqLXQuMjeyvNEbYfqxKINOGsXIdT0JuIjP21Zq0 N3tGFn9U7zhbzdKpBfb+qyD6MYsyGEzvHqoGgdkA= Received: from localhost.localdomain (92.188.110.153 [92.188.110.153]) by mx.zohomail.com with SMTPS id 1604157264126690.3989801319432; Sat, 31 Oct 2020 08:14:24 -0700 (PDT) From: =?utf-8?q?Fr=C3=A9d=C3=A9ric_Pierret_=28fepitre=29?= To: xen-devel@lists.xenproject.org Cc: =?utf-8?q?Fr=C3=A9d=C3=A9ric_Pierret_=28fepitre=29?= , Andrew Cooper , George Dunlap , Ian Jackson , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu Message-ID: <8b0e8b8be9c77476ecc702a7c6216ba50659deec.1604156731.git.frederic.pierret@qubes-os.org> Subject: [PATCH v1 2/2] Define SOURCE_DATE_EPOCH based on git log Date: Sat, 31 Oct 2020 16:14:08 +0100 X-Mailer: git-send-email 2.26.2 In-Reply-To: References: MIME-Version: 1.0 X-ZohoMailClient: External --- 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) + export XEN_WHOAMI ?= $(USER) export XEN_DOMAIN ?= $(shell ([ -x /bin/dnsdomainname ] && /bin/dnsdomainname) || ([ -x /bin/domainname ] && /bin/domainname || echo [unknown])) ifneq ($(SOURCE_DATE_EPOCH),)