From 961d0f124baede68bf023683f89db813d709b486 Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Thu, 5 Oct 2023 12:51:43 -0700 Subject: [PATCH] Makefile: make verify-dmz-arch less talkative Every `make` now produces something like this: make[1]: Entering directory '/home/kir/go/src/github.com/opencontainers/runc' readelf -h runc Machine: Advanced Micro Devices X86-64 Flags: 0x0 readelf -h libcontainer/dmz/runc-dmz Machine: Advanced Micro Devices X86-64 Flags: 0x0 runc-dmz architecture matches runc binary. make[1]: Leaving directory '/home/kir/go/src/github.com/opencontainers/runc' That is a bit too much. Let's make it less verbose. Signed-off-by: Kir Kolyshkin --- Makefile | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index d3c1c11cb..9cb164259 100644 --- a/Makefile +++ b/Makefile @@ -202,18 +202,15 @@ verify-dependencies: vendor @test -z "$$(git status --porcelain -- go.mod go.sum vendor/)" \ || (echo -e "git status:\n $$(git status -- go.mod go.sum vendor/)\nerror: vendor/, go.mod and/or go.sum not up to date. Run \"make vendor\" to update"; exit 1) \ && echo "all vendor files are up to date." + verify-dmz-arch: - @test -s libcontainer/dmz/runc-dmz || exit 0; \ + @if test -s libcontainer/dmz/runc-dmz; then \ set -Eeuo pipefail; \ export LC_ALL=C; \ - echo "readelf -h runc"; \ - readelf -h runc | grep -E "(Machine|Flags):"; \ - echo "readelf -h libcontainer/dmz/runc-dmz"; \ - readelf -h libcontainer/dmz/runc-dmz | grep -E "(Machine|Flags):"; \ diff -u \ <(readelf -h runc | grep -E "(Machine|Flags):") \ - <(readelf -h libcontainer/dmz/runc-dmz | grep -E "(Machine|Flags):") \ - && echo "runc-dmz architecture matches runc binary." + <(readelf -h libcontainer/dmz/runc-dmz | grep -E "(Machine|Flags):"); \ + fi validate-keyring: script/keyring_validate.sh