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

Bug#1027041: linux-perf: perf version blank in sid, correct in bullseye



Package: linux-perf
Version: 6.0.12-1
Severity: normal

Dear Maintainer,

On bullseye:
-- >8 --
$ /bin/perf version
perf version 5.10.158
-- >8 --
on sid:
-- >8 --
# perf version
perf version
-- >8 --

Ruh-roh!

Digging through the latest buildd log at
  https://buildd.debian.org/status/fetch.php?pkg=linux&arch=amd64&ver=6.0.12-1&stamp=1670594526&raw=1
I see:
-- >8 --
asciidoctor -b manpage -d manpage \
        -a compat-mode -I. -rasciidoctor-extensions -a mansource="perf" -a manmanual="perf Manual" -a revdate=2022-12-09 -aperf_version= -o /<<PKGBUILDDIR>>/debian/build/build-tools/tools/perf/perf-annotate.1+ perf-annotate.txt && \

/bin/sh util/PERF-VERSION-GEN /<<PKGBUILDDIR>>/debian/build/build-tools/tools/perf/
cut: ../../PERF-VERSION-FILE: No such file or directory
  PERF_VERSION =
-- >8 --

Since I was already there for an unrelated #1017810 fix,
it appears that this had been fixed in
-- >8 --
commit 81935f10e694e390c7d23055952ebe0ac2173d1d
Author: Will Chandler <wfc@wfchandler.org>
Date:   Fri Sep 30 11:11:57 2022 -0400

    perf tools: Fix empty version number when building outside of a git repo

    When perf is built in a full source tree that is not a git repository,
    e.g. from a kernel source tarball, `perf version` will print empty tag
    and commit strings:

      $ perf version
      perf version

    Currently the tag version is only generated from the root Makefile when
    building in a git repository. If PERF-VERSION-FILE has not been
    generated and the source tree is not in a git repository, then
    PERF-VERSION-GEN will return an empty version.

    The problem can be reproduced with the following steps:

      $ wget https://git.kernel.org/torvalds/t/linux-6.0-rc7.tar.gz
      $ tar -xf linux-6.0-rc7.tar.gz && cd linux-6.0-rc7
      $ make -C tools/perf
      $ tools/perf/perf -v
      perf version

    Builds from tarballs generated with `make perf-tar-src-pkg` are not
    impacted by this issue as PERF-VERSION-FILE is included in the archive.

    The perf RPM provided by Fedora for 5.18+ is experiencing this problem.
    Package build logs[0] show that the build is attempting to fall back on
    PERF-VERSION-FILE, but it is not present.

    To resolve this, revert back to the previous logic of using the kernel
    Makefile version if not in a git repository and PERF-VERSION-FILE does
    not exist.
-- >8 --

Which is apparently in v6.1-rc1; that, OTOH, cites commit
7572733b84997d23077ebd852703055034b7a1d2 ("perf tools: Fix version
 kernel tag"), first seen in v5.18-rc1, so the time-line works out.

This probably means this will be fixed, no intervention required,
by the 6.1 kernel. Please verify :)

Best,
наб

-- System Information:
Debian Release: 11.6
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable-debug'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.10.0-20-amd64 (SMP w/24 CPU threads)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_FIRMWARE_WORKAROUND, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages linux-perf depends on:
ii  libbabeltrace1   1.5.8-1+b3
ii  libc6            2.31-13+deb11u5
ii  libcap2          1:2.44-1
ii  libdw1           0.183-1
ii  libelf1          0.183-1
ii  liblzma5         5.2.5-2.1~deb11u1
ii  libnuma1         2.0.12-1+b1
ii  libperl5.32      5.32.1-4+deb11u2
ii  libpython3.9     3.9.2-1
ii  libslang2        2.3.2-5
ii  libunwind8       1.3.2-2
ii  linux-perf-5.10  5.10.158-2
ii  perl             5.32.1-4+deb11u2
ii  python3          3.9.2-3
ii  zlib1g           1:1.2.11.dfsg-2+deb11u2

linux-perf recommends no packages.

Versions of packages linux-perf suggests:
pn  linux-doc-6.0  <none>

Attachment: signature.asc
Description: PGP signature


Reply to: