From nobody Fri Apr 26 00:22:36 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1631094887; cv=none; d=zohomail.com; s=zohoarc; b=ju8BtLfVqVi+/sLnSH1Q1J8pomU833dnwLVeEGh2hbi88HEr+6YCMgEP194oWRXwOygc/a8qI75b97mkptM+RnsqTNHE7DSF/q9I3FQEx28CjWPFS4w6koJEsE+vhwxs2RSTuO55OkHZsgYPqibdV4+E5DalCFMVKorSy+PYe7w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1631094887; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=p7on1/YlRaXZrx/LcIqI5B0ccZg/wuTC8Evy8s7Lc2c=; b=gq+6Z2Z3ZULd5wvxMpMNlhf7SRtVuIy9aoRYQ/bvFc4hidZUurRw3HlqT2BQKwAnCJ7WIhZJWt8Jd1W4lqW2fe0PDVKGOvnf/wB9xcW3uJRCjRxpdDSFZo/ly2IqZrItoiyjr6paDBl4Xw0V9pJqKRdLMITDaUnJKaomzIDSR9Y= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1631094887430238.54849511916518; Wed, 8 Sep 2021 02:54:47 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.181615.328844 (Exim 4.92) (envelope-from ) id 1mNuHr-00021Y-4y; Wed, 08 Sep 2021 09:54:35 +0000 Received: by outflank-mailman (output) from mailman id 181615.328844; Wed, 08 Sep 2021 09:54:35 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mNuHr-00021L-0l; Wed, 08 Sep 2021 09:54:35 +0000 Received: by outflank-mailman (input) for mailman id 181615; Wed, 08 Sep 2021 09:54:33 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mNuHp-0001EI-4K for xen-devel@lists.xenproject.org; Wed, 08 Sep 2021 09:54:33 +0000 Received: from esa5.hc3370-68.iphmx.com (unknown [216.71.155.168]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id c177d7de-108a-11ec-b148-12813bfff9fa; Wed, 08 Sep 2021 09:54:28 +0000 (UTC) X-Outflank-Mailman: Message body and most headers restored to incoming version 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" X-Inumbo-ID: c177d7de-108a-11ec-b148-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1631094868; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=AsZBJR8DqTXnM0J0C60Tfl9G1/1Dykb1qhx3aXLPQKA=; b=XFhnteq3B7TK12Iq7u47AlagKCEKuLPmZeTIteKciX2sJ2F7XbkOaaho 0mkFKRdswyzlbxRj3WRpXHLhUFzFkKylXWqhw7dbWaVdPqkWVDHA85Ti4 tHUd5RGfaSEg26wuJdVDayBm4O/t97R0PLvHgsf2+45G81oR0SlKJ5QlV g=; Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: 5+r2TLm/n1r96Gjv2CZirI56HcpkfJGxmXSw1x1oAV2t8202ESGWCBYciVSTu1jDtTh5ZnXAhd +RuMZxzI+C06I7+2UGajzNuSPGRA+Ewv8wqQMEG5P76gdLwg7CC3azHyEdGu1Th6t+44fDdVcz 56LHITxzjQbHwqXB6f/PZnQZvyHuwqoPJlNBnDlCJu46gL0HAKQa0AVc/RCA/YK9ZEjxHBqaS4 8dbD83KwdFvvMv3AHliFmoBdH83FODY0MWG8NIQvM5M15SGv52813EGVj7pPFhhKSkRtQUfhTO BpwP/FEuN3G5HPNICzwNvt6i X-SBRS: 5.1 X-MesageID: 51835828 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:KULzgKmXcDch0cVoHxuZlxF/ccrpDfLW3DAbv31ZSRFFG/Fw9/ rCoB3U73/JYVcqKRUdcLW7UpVoLkmyyXcY2+cs1NSZLWzbUQmTXeJfBOLZqlWNJ8SXzIVgPM xbAspD4bPLbGSTjazBkXSF+9RL+qj6zEh/792usEuETmtRGt9dBx8SMHf9LqXvLjM2fqbQEv Cnl6x6jgvlQ1s7ROKhCEIIWuDSzue77q4PMXY9dmcaABDlt0LR1ILH X-IronPort-AV: E=Sophos;i="5.85,277,1624334400"; d="scan'208";a="51835828" From: Anthony PERARD To: CC: Andrew Cooper , Jan Beulich , Anthony PERARD , "Daniel De Graaf" , "Daniel P. Smith" Subject: [XEN PATCH 1/2] build: set policy filename on make command line Date: Wed, 8 Sep 2021 10:54:21 +0100 Message-ID: <20210908095422.438324-2-anthony.perard@citrix.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210908095422.438324-1-anthony.perard@citrix.com> References: <20210908095422.438324-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1631094887906100003 Content-Type: text/plain; charset="utf-8" In order to avoid flask/Makefile.common calling `make xenversion`, we override POLICY_FILENAME with the value we are going to use anyway. Signed-off-by: Anthony PERARD Acked-by: Jan Beulich --- xen/xsm/flask/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/xsm/flask/Makefile b/xen/xsm/flask/Makefile index 637159ad8276..093ee50bf1c8 100644 --- a/xen/xsm/flask/Makefile +++ b/xen/xsm/flask/Makefile @@ -42,7 +42,7 @@ FLASK_BUILD_DIR :=3D $(CURDIR) POLICY_SRC :=3D $(FLASK_BUILD_DIR)/xenpolicy-$(XEN_FULLVERSION) =20 policy.bin: FORCE - $(MAKE) -f $(XEN_ROOT)/tools/flask/policy/Makefile.common -C $(XEN_ROOT)/= tools/flask/policy FLASK_BUILD_DIR=3D$(FLASK_BUILD_DIR) + $(MAKE) -f $(XEN_ROOT)/tools/flask/policy/Makefile.common -C $(XEN_ROOT)/= tools/flask/policy FLASK_BUILD_DIR=3D$(FLASK_BUILD_DIR) POLICY_FILENAME=3D$= (POLICY_SRC) cmp -s $(POLICY_SRC) $@ || cp $(POLICY_SRC) $@ =20 .PHONY: clean --=20 Anthony PERARD From nobody Fri Apr 26 00:22:36 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1631094892; cv=none; d=zohomail.com; s=zohoarc; b=YG9YvKa5OKu8Y1rjM9UVCiH5blsQEjBcmvRC27RE+flDKS7ui5V0OUmzrqZUa1ScgsiufX9QdXvLBBIhjeS/Krg9U4EMpC+sYH3QrKdIbI9HX3kXdPxAOnmWte115/5RHYlHgLyfNuO+Xc4TNGCHwYLfVkwoCs2IFLfcKPq+BZI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1631094892; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=D7NwTRGSfpw68xMcBgqzPS24HklSCt7eXa10MHozk3g=; b=GpTBneO4XKoHKOW7KOrBJfCE4Obn05PpvlhzE+NGdiodAFFGuO3FYBzhlnIZOlAfn0OzEs7sXRL6+ctNGtFutb8q06OT57fk0x3wZ8UO2tXKfVGqy168nyuQPlCNN60G19VM3xALdKc9z86Oev8AZuEaXXVzPp5GumZb/HkxgEk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1631094892319750.497021325307; Wed, 8 Sep 2021 02:54:52 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.181617.328867 (Exim 4.92) (envelope-from ) id 1mNuHw-0002pC-7Q; Wed, 08 Sep 2021 09:54:40 +0000 Received: by outflank-mailman (output) from mailman id 181617.328867; Wed, 08 Sep 2021 09:54:40 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mNuHv-0002oH-Vl; Wed, 08 Sep 2021 09:54:39 +0000 Received: by outflank-mailman (input) for mailman id 181617; Wed, 08 Sep 2021 09:54:38 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mNuHu-0001EI-4X for xen-devel@lists.xenproject.org; Wed, 08 Sep 2021 09:54:38 +0000 Received: from esa4.hc3370-68.iphmx.com (unknown [216.71.155.144]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id c2f1fdc5-108a-11ec-b148-12813bfff9fa; Wed, 08 Sep 2021 09:54:30 +0000 (UTC) X-Outflank-Mailman: Message body and most headers restored to incoming version 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" X-Inumbo-ID: c2f1fdc5-108a-11ec-b148-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1631094870; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=qNr9KSzgnELykt88dPBpEyZ6wsbID+Fk75Z7xVFv0NI=; b=GiSqzthqW2ZRwbgm0rqK1TNl9aGSMCUyp+bAcz64F9IRDl2O+bmq1D4C zaSmVPfwOUGreT7FsDj04QTg7+qy+fsKb6uQMBSl/sThbqPiADFu4QyNl 7MvldZgq9geH+0hYMz75UhGXsR+2OkEeXgINWnOUDa99NQ3TpNPXbQenA w=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: TEp3lFiQCKdFcOnbcMELEiY57LjMHq9nWflMVXnA4QGUeCG7MaikXmLDWaPjXq2buvsKTXYVer aTROEza9lzQXnohAeQlKtiLW4qaVa5YFycHGuyLG0hN6rQVJhx5a91c/q/hjEA3sWNlIcW45HU FBb5/D0Lm53u1QtiT6x+NShp/0hXY2IHtSy96aeQ9Hlus/a9Y87qTBQ9tLV8afymE71uouGrSk NgvsXUdS+FTqlspecNKSweRyiTWAa+linCCxiUx+2pn+e6WXX/NCo10gl88TcO8Iaov3sl30yg qRRcOUicFyIvj89y2jp73PpM X-SBRS: 5.1 X-MesageID: 53993479 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:DyHrDaywYbFr/qAmlg9xKrPwKr1zdoMgy1knxilNoRw8SKOlfq eV7ZMmPH7P+U8ssR4b+OxoVJPsfZqYz+8W3WBzB8bHYOCFgguVxehZhOOIqQEIWReOk9K1vZ 0QFZSWY+efMbEVt6rHCXGDYrUd/OU= X-IronPort-AV: E=Sophos;i="5.85,277,1624334400"; d="scan'208";a="53993479" From: Anthony PERARD To: CC: Andrew Cooper , Jan Beulich , Anthony PERARD , "Daniel De Graaf" , "Daniel P. Smith" , Ian Jackson , Wei Liu , George Dunlap , Julien Grall , Stefano Stabellini Subject: [XEN PATCH 2/2] build: add --full to version.sh to guess $(XEN_FULLVERSION) Date: Wed, 8 Sep 2021 10:54:22 +0100 Message-ID: <20210908095422.438324-3-anthony.perard@citrix.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210908095422.438324-1-anthony.perard@citrix.com> References: <20210908095422.438324-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1631094894324100001 Content-Type: text/plain; charset="utf-8" Running $(MAKE) like that in a $(shell ) while parsing the Makefile doesn't work reliably. In some case, make will complain with "jobserver unavailable: using -j1. Add '+' to parent make rule.", which will be part of "$(make xenversion)" output. It isn't possible to distinguish between the output produced by the target "xenversion" and `make`'s own output. Instead of running make, this patch "improve" `version.sh` to try to guess the output of `make xenversion`. This only works as long as $(XEN_VENDORVERSION) isn't set, or $(XEN_EXTRAVERSION) isn't overridden. This fix GitLab CI's build job "debian-unstable-gcc-arm64" on which $(shell $(MAKE) xenversion) in "flask/policy/Makefile.common" reliably produce more output than just the xenversion. This patch also allows to run for example `make --debug=3Da` without breaking the build when flask policy is enabled. Signed-off-by: Anthony PERARD Acked-by: Jan Beulich --- tools/flask/policy/Makefile.common | 2 +- version.sh | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/tools/flask/policy/Makefile.common b/tools/flask/policy/Makefi= le.common index bea5ba4b6a40..7f470cd02861 100644 --- a/tools/flask/policy/Makefile.common +++ b/tools/flask/policy/Makefile.common @@ -35,7 +35,7 @@ OUTPUT_POLICY ?=3D $(BEST_POLICY_VER) # ######################################## =20 -POLICY_FILENAME =3D $(FLASK_BUILD_DIR)/xenpolicy-$(shell $(MAKE) -C $(XEN_= ROOT)/xen xenversion --no-print-directory) +POLICY_FILENAME =3D $(FLASK_BUILD_DIR)/xenpolicy-$(shell $(XEN_ROOT)/versi= on.sh --full $(XEN_ROOT)/xen/Makefile) POLICY_LOADPATH =3D /boot =20 # List of policy versions supported by the hypervisor diff --git a/version.sh b/version.sh index e894ee7e0469..abd19ce79ac8 100755 --- a/version.sh +++ b/version.sh @@ -1,5 +1,18 @@ #!/bin/sh =20 +opt_full=3Dfalse +while [ $# -gt 1 ]; do + case "$1" in + --full) opt_full=3Dtrue ;; + *) break ;; + esac + shift +done + MAJOR=3D`grep "export XEN_VERSION" $1 | sed 's/.*=3D//g' | tr -s " "` MINOR=3D`grep "export XEN_SUBVERSION" $1 | sed 's/.*=3D//g' | tr -s " "` -printf "%d.%d" $MAJOR $MINOR + +if $opt_full; then + EXTRAVERSION=3D$(grep "export XEN_EXTRAVERSION" $1 | sed 's/^.* ?=3D\s= \+//; s/\$([^)]*)//g; s/ //g') +fi +printf "%d.%d%s" $MAJOR $MINOR $EXTRAVERSION --=20 Anthony PERARD