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

Re: [XEN PATCH 04/15] build: hide policy.bin commands


  • To: Anthony PERARD <anthony.perard@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • Date: Thu, 25 May 2023 08:48:40 -0400
  • Arc-authentication-results: i=1; mx.zohomail.com; dkim=pass header.i=apertussolutions.com; spf=pass smtp.mailfrom=dpsmith@xxxxxxxxxxxxxxxxxxxx; dmarc=pass header.from=<dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1685018924; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=Nrwi7EB3kUI4MvvcpNAWEhE0/2/LrdcYBPX8lCg0UDk=; b=i2d5rnJBVDO1KUnpAVEO0PG1jNzqTeGs7vpodMbv7GSzDtT8+np0cca9+gSRnZnCBkND7pa75xibsp4TORm0/ddjsUQ+ThUVYty13zATEdOkgICKwiAJW18Q8NEgj3gtkv56wBFzPdQPbuqx5UgA5OHbRsfH7WD046OiWaU6ovM=
  • Arc-seal: i=1; a=rsa-sha256; t=1685018924; cv=none; d=zohomail.com; s=zohoarc; b=OC+iVi66v4ZUQXOXjJZxV/Tc03LQTONsmQ1C349Vu/XXeVKWAFiyhctPyHbWUwRZSEBmnENJcQ8d4AWHqOLuhGZDPpwG/apGCC4pr6XX0rVQvockVUJdSErqeXYmT/xi1Dw8sLbKBzvP3jfgwJtqwC3TT/eGRpDdKWNNcBH2+M0=
  • Delivery-date: Thu, 25 May 2023 12:49:01 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 5/23/23 12:38, Anthony PERARD wrote:
Instead, show only when "policy.bin" is been updated.

We still have the full command from the flask/policy Makefile, but we
can't change that Makefile.

Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
---
  xen/xsm/flask/Makefile | 9 +++++++--
  1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/xen/xsm/flask/Makefile b/xen/xsm/flask/Makefile
index 3fdcf7727e..fc44ad684f 100644
--- a/xen/xsm/flask/Makefile
+++ b/xen/xsm/flask/Makefile
@@ -48,10 +48,15 @@ targets += flask-policy.S
  FLASK_BUILD_DIR := $(abs_objtree)/$(obj)
  POLICY_SRC := $(FLASK_BUILD_DIR)/xenpolicy-$(XEN_FULLVERSION)
+policy_chk = \
+    $(Q)if ! cmp -s $(POLICY_SRC) $@; then \
+        $(kecho) '  UPD     $@'; \
+        cp $(POLICY_SRC) $@; \
+    fi
  $(obj)/policy.bin: FORCE
-       $(MAKE) -f $(XEN_ROOT)/tools/flask/policy/Makefile.common \
+       $(Q)$(MAKE) -f $(XEN_ROOT)/tools/flask/policy/Makefile.common \
                -C $(XEN_ROOT)/tools/flask/policy \
                FLASK_BUILD_DIR=$(FLASK_BUILD_DIR) POLICY_FILENAME=$(POLICY_SRC)
-       cmp -s $(POLICY_SRC) $@ || cp $(POLICY_SRC) $@
+       $(call policy_chk)
clean-files := policy.* $(POLICY_SRC)

Outside the suggestion and nit(s) from Jan, all else looks good to me.

Acked-by: Daniel P. Smith <dpsmith@xxxxxxxxxxxxxxxxxxxx>



 


Rackspace

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