Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.kernel > #67772 > unrolled thread

[PATCH] bpftool: Fix version string in recursive builds

Started byBen Hutchings <benh@debian.org>
First post2020-08-14 02:00 +0200
Last post2020-08-15 00:20 +0200
Articles 2 — 1 participant

Back to article view | Back to linux.debian.kernel


Contents

  [PATCH] bpftool: Fix version string in recursive builds Ben Hutchings <benh@debian.org> - 2020-08-14 02:00 +0200
    Re: [PATCH] bpftool: Fix version string in recursive builds Ben Hutchings <benh@debian.org> - 2020-08-15 00:20 +0200

#67772 — [PATCH] bpftool: Fix version string in recursive builds

FromBen Hutchings <benh@debian.org>
Date2020-08-14 02:00 +0200
Subject[PATCH] bpftool: Fix version string in recursive builds
Message-ID<ADvix-35c-1@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

When bpftool is built as part of a Debian package build, which itself
uses make, "bpftool version" shows:

    bpftool vmake[4]: Entering directory /build/linux-5.8/tools/bpf/bpftool 5.8.8.0 make[4]: Leaving directory /build/linux-5.8

Although we pass the "--no-print-directory" option, this is overridden
by the environment variable "MAKEFLAGS=w".  Clear MAKEFLAGS for the
"make kernelversion" command.

I have no explanation for the doubled ".8" in the version string, but
this seems to fix that as well.

Signed-off-by: Ben Hutchings <benh@debian.org>
---
 tools/bpf/bpftool/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/bpf/bpftool/Makefile b/tools/bpf/bpftool/Makefile
index 9e85f101be85..7fbad8cbd171 100644
--- a/tools/bpf/bpftool/Makefile
+++ b/tools/bpf/bpftool/Makefile
@@ -25,7 +25,7 @@ endif
 
 LIBBPF = $(LIBBPF_PATH)libbpf.a
 
-BPFTOOL_VERSION := $(shell make -rR --no-print-directory -sC ../../.. kernelversion)
+BPFTOOL_VERSION := $(shell MAKEFLAGS= make -rR --no-print-directory -sC ../../.. kernelversion)
 
 $(LIBBPF): FORCE
 	$(if $(LIBBPF_OUTPUT),@mkdir -p $(LIBBPF_OUTPUT))

[toc] | [next] | [standalone]


#67779

FromBen Hutchings <benh@debian.org>
Date2020-08-15 00:20 +0200
Message-ID<ADQdk-7BM-3@gated-at.bofh.it>
In reply to#67772

[Multipart message — attachments visible in raw view] — view raw

On Fri, 2020-08-14 at 08:43 -0700, Yonghong Song wrote:
[...]
> I tried the following
> 
> --- a/tools/bpf/bpftool/Makefile
> +++ b/tools/bpf/bpftool/Makefile
> @@ -25,7 +25,7 @@ endif
> 
>   LIBBPF = $(LIBBPF_PATH)libbpf.a
> 
> -BPFTOOL_VERSION := $(shell make -rR --no-print-directory -sC ../../.. 
> kernelversion)
> +BPFTOOL_VERSION := $(shell MAKEFLAGS=w make -rR --no-print-directory 
> -sC ../../.. kernelversion)
> 
> -bash-4.4$ ./bpftool version
> ./bpftool v5.8.0
> 
> I set env variable MAKEFLAGS=w, and build bpftool it works fine too.
> Maybe I miss something or debian changed top level Makefile?

Yes, but we don't change MAKEFLAGS or any of the logic around quietness
or verbosity.

I assume there are other factors involved, as I've also been unable to
construct a simple reproducer.

Ben.

> I am testing against latest bpf tree.
> 
> >   
> >   $(LIBBPF): FORCE
> >   	$(if $(LIBBPF_OUTPUT),@mkdir -p $(LIBBPF_OUTPUT))
> > 
-- 
Ben Hutchings - Debian developer, member of kernel, installer and LTS teams

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.kernel


csiph-web