Bug 1882908 - Review Request: kernelshark - GUI analysis for Ftrace data captured by trace-cmd
Summary: Review Request: kernelshark - GUI analysis for Ftrace data captured by trace-cmd
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Andy Mender
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-09-26 12:20 UTC by Zamir SUN
Modified: 2020-10-23 22:02 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-10-23 22:02:41 UTC
Type: Bug
Embargoed:
andymenderunix: fedora-review+


Attachments (Terms of Use)

Description Zamir SUN 2020-09-26 12:20:41 UTC
SPEC URL: https://zsun.fedorapeople.org/pub/pkgs/kernelshark/kernelshark.spec
SRPM URL: https://zsun.fedorapeople.org/pub/pkgs/kernelshark/kernelshark-1.1-1.fc34.src.rpm

Description:

Kernelshark is the GUI frontend for analyse date captured by trace-cmd. Historically it is part of trace-cmd. However, now kernelshark have different version from trace-cmd, and the upstream maintainer also mention that they willo move kernelshark into a separate repo in the future, so as the trace-cmd maintainer in Fedora, I'm filing this review to get kernelshark separated from trace-cmd.

Fedora Account System Username: zsun


Note for "[!]: Uses parallel make %{?_smp_mflags} macro."
The trace-cmd and kernelshark project both do not support parallel compiling. If compile in parallel, it will fail randomly for missing symbol.

Comment 1 Andy Mender 2020-09-26 19:58:21 UTC
Koji build: https://koji.fedoraproject.org/koji/taskinfo?taskID=52316193

> License: GPLv2 and LGPLv2

Is it clear which parts use which license? If so, could you indicate that in a comment above the line?

> Patch0: 0001-kernel-shark-Fix-dependency-symbol-resolving-issue.patch
> Patch1: 0001-Do-not-install-trace-cmd-when-only-building-kernelsh.patch

I think the names of the patches explain what these are for, but if there are any upstream tickets related to these, I would add them as comments above the Patch lines.

> BuildRequires: trace-cmd-libs
> BuildRequires: trace-cmd-devel
> BuildRequires: gcc
> BuildRequires: xmlto
> BuildRequires: graphviz doxygen
> BuildRequires: libxml2-devel
> BuildRequires: gcc-c++
> BuildRequires: desktop-file-utils
> BuildRequires: libappstream-glib
> BuildRequires: cmake
> BuildRequires: qt5-qtbase-devel
> BuildRequires: freeglut-devel
> BuildRequires: json-c-devel

Not a big thing, but could you sort these alphabetically? More importantly, for -devel packages which provide pkgconfig files, please use the "pkgconfig(foo)" format.

> %install
> libdir=%{_libdir} make libdir=%{_libdir} prefix=%{_prefix} V=1 DESTDIR=%{buildroot}/ CFLAGS="%{optflags} -D_GNU_SOURCE" LDFLAGS="%{build_ldflags} -z muldefs " BUILD_TYPE=Release install_gui

Why is "libdir" also defined as an environment variable for this command?

Full review below:

Package Review
==============

Legend:
[x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated
[ ] = Manual review needed


Issues:
=======
- If (and only if) the source package includes the text of the license(s)
  in its own file, then that file, containing the text of the license(s)
  for the package is included in %license.
  Note: License file COPYING.LIB is not marked as %license
  See: https://docs.fedoraproject.org/en-US/packaging-
  guidelines/LicensingGuidelines/#_license_text
  Review: Is it a license file? Somehow I don't think so.


===== MUST items =====

C/C++:
[x]: Package does not contain kernel modules.
[x]: Package contains no static executables.
[ ]: Development (unversioned) .so files in -devel subpackage, if present.
     Note: Unversioned so-files in private %_libdir subdirectory (see
     attachment). Verify they are not in ld path.
     Review: Are these for internal use by the package? If so, they don't 
     to be versioned.
[x]: If your application is a C or C++ application you must list a
     BuildRequires against gcc, gcc-c++ or clang.
[x]: Header files in -devel subpackage, if present.
[x]: Package does not contain any libtool archives (.la)
[x]: Rpath absent or only used for internal libs.

Generic:
[x]: Package successfully compiles and builds into binary rpms on at least
     one supported primary architecture.
     Note: Using prebuilt packages
[x]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[x]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "Unknown or generated", "*No copyright* GNU General Public
     License (v2.0) GNU Lesser General Public License (v2.1)", "GNU Lesser
     General Public License", "GPL (v2 or later)". 222 files have unknown
     license. Detailed output of licensecheck in
     /home/amender/rpmbuild/SPECS/kernelshark/kernelshark/licensecheck.txt
[x]: License file installed when any subpackage combination is installed.
[ ]: If the package is under multiple licenses, the licensing breakdown
     must be documented in the spec.
     Review: see, earlier comment.
[ ]: Package must own all directories that it creates.
     Note: Directories without known owners: /usr/share/polkit-1/actions,
     /usr/share/polkit-1
     Review: Add Requires for polkit?
[x]: %build honors applicable compiler flags or justifies otherwise.
[x]: Package contains no bundled libraries without FPC exception.
[x]: Changelog in prescribed format.
[x]: Sources contain only permissible code or content.
[-]: Development files must be in a -devel package
[?]: Package uses nothing in %doc for runtime.
[x]: Package consistently uses macros (instead of hard-coded directory
     names).
[x]: Package is named according to the Package Naming Guidelines.
[x]: Package does not generate any conflict.
[x]: Package obeys FHS, except libexecdir and /usr/target.
[-]: If the package is a rename of another package, proper Obsoletes and
     Provides are present.
[x]: Requires correct, justified where necessary.
[x]: Spec file is legible and written in American English.
[-]: Package contains systemd file(s) if in need.
[x]: Useful -debuginfo package or justification otherwise.
[x]: Package is not known to require an ExcludeArch tag.
[x]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 40960 bytes in 2 files.
[x]: Package complies to the Packaging Guidelines
[x]: Package installs properly.
[x]: Rpmlint is run on all rpms the build produces.
     Note: There are rpmlint messages (see attachment).
[x]: Package requires other packages for directories it uses.
[x]: Package does not own files or directories owned by other packages.
[x]: Package uses either %{buildroot} or $RPM_BUILD_ROOT
[x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
[x]: Macros in Summary, %description expandable at SRPM build time.
[x]: Package contains desktop file if it is a GUI application.
[x]: Package installs a %{name}.desktop using desktop-file-install or
     desktop-file-validate if there is such a file.
[x]: Dist tag is present.
[x]: Package does not contain duplicates in %files.
[x]: Permissions on files are set properly.
[x]: Package must not depend on deprecated() packages.
[x]: Package use %makeinstall only when make install DESTDIR=... doesn't
     work.
[x]: Package is named using only allowed ASCII characters.
[x]: Package does not use a name that already exists.
[x]: Package is not relocatable.
[x]: Sources used to build the package match the upstream source, as
     provided in the spec URL.
[x]: Spec file name must match the spec package %{name}, in the format
     %{name}.spec.
[x]: File names are valid UTF-8.
[x]: Packages must not store files under /srv, /opt or /usr/local

===== SHOULD items =====

Generic:
[x]: Reviewer should test that the package builds in mock.
[x]: Uses parallel make %{?_smp_mflags} macro.
     Review: explained by the packager. All fine.
[-]: If the source package does not include license text(s) as a separate
     file from upstream, the packager SHOULD query upstream to include it.
[x]: Final provides and requires are sane (see attachments).
[?]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[ ]: Patches link to upstream bugs/comments/lists or are otherwise
     justified.
     Review: See earlier comments.
[-]: Sources are verified with gpgverify first in %prep if upstream
     publishes signatures.
     Note: gpgverify is not used.
[-]: Description and summary sections in the package spec file contains
     translations for supported Non-English languages, if available.
[x]: Package should compile and build into binary rpms on all supported
     architectures.
[-]: %check is present and all tests pass.
[ ]: Packages should try to preserve timestamps of original installed
     files.
     Review: please add the "-p" flag to the "make" call, since you're not 
     using %make_build
[x]: Buildroot is not present
[x]: Package has no %clean section with rm -rf %{buildroot} (or
     $RPM_BUILD_ROOT)
[x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: Fully versioned dependency in subpackages if applicable.
[x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: Sources can be downloaded from URI in Source: tag
[x]: SourceX is a working URL.
[x]: Spec use %global instead of %define unless justified.

===== EXTRA items =====

Generic:
[x]: Rpmlint is run on debuginfo package(s).
     Note: No rpmlint messages.
[x]: Rpmlint is run on all installed packages.
     Note: No rpmlint messages.
[x]: Large data in /usr/share should live in a noarch subpackage if package
     is arched.


Rpmlint
-------
Checking: kernelshark-1.1-1.fc34.x86_64.rpm
          kernelshark-debuginfo-1.1-1.fc34.x86_64.rpm
          kernelshark-debugsource-1.1-1.fc34.x86_64.rpm
          kernelshark-1.1-1.fc34.src.rpm
kernelshark.x86_64: W: spelling-error Summary(en_US) cmd -> cm, cad, cod
kernelshark.x86_64: W: spelling-error %description -l en_US cmd -> cm, cad, cod
kernelshark.x86_64: W: spelling-error %description -l en_US dat -> DAT, tad, sat
kernelshark.x86_64: W: no-manual-page-for-binary kernelshark
kernelshark.x86_64: W: no-manual-page-for-binary kshark-record
kernelshark.x86_64: W: no-manual-page-for-binary kshark-su-record
kernelshark.src: W: spelling-error Summary(en_US) cmd -> cm, cad, cod
kernelshark.src: W: spelling-error %description -l en_US cmd -> cm, cad, cod
kernelshark.src: W: spelling-error %description -l en_US dat -> DAT, tad, sat
4 packages and 0 specfiles checked; 0 errors, 9 warnings.




Rpmlint (debuginfo)
-------------------
Checking: kernelshark-debuginfo-1.1-1.fc34.x86_64.rpm
1 packages and 0 specfiles checked; 0 errors, 0 warnings.





Rpmlint (installed packages)
----------------------------
(none): E: no installed packages by name kernelshark
(none): E: no installed packages by name kernelshark-debuginfo
(none): E: no installed packages by name kernelshark-debugsource
0 packages and 0 specfiles checked; 0 errors, 0 warnings.



Unversioned so-files
--------------------
kernelshark: /usr/lib64/kernelshark/plugins/plugin-missed_events.so
kernelshark: /usr/lib64/kernelshark/plugins/plugin-sched_events.so

Source checksums
----------------
https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/snapshot/trace-cmd-kernelshark-v1.1.tar.gz :
  CHECKSUM(SHA256) this package     : c9bc9d70b749d54aca590858e01a1938fef52765d446953461eab7ba578f4035
  CHECKSUM(SHA256) upstream package : c9bc9d70b749d54aca590858e01a1938fef52765d446953461eab7ba578f4035


Requires
--------
kernelshark (rpmlib, GLIBC filtered):
    /usr/bin/bash
    ld-linux-x86-64.so.2()(64bit)
    libGL.so.1()(64bit)
    libGLU.so.1()(64bit)
    libQt5Core.so.5()(64bit)
    libQt5Core.so.5(Qt_5)(64bit)
    libQt5Core.so.5(Qt_5.15)(64bit)
    libQt5Gui.so.5()(64bit)
    libQt5Gui.so.5(Qt_5)(64bit)
    libQt5Network.so.5()(64bit)
    libQt5Network.so.5(Qt_5)(64bit)
    libQt5Widgets.so.5()(64bit)
    libQt5Widgets.so.5(Qt_5)(64bit)
    libc.so.6()(64bit)
    libdl.so.2()(64bit)
    libgcc_s.so.1()(64bit)
    libgcc_s.so.1(GCC_3.0)(64bit)
    libglut.so.3()(64bit)
    libjson-c.so.5()(64bit)
    libkshark-gui.so.1.1.0()(64bit)
    libkshark-plot.so.1.1.0()(64bit)
    libkshark.so.1.1.0()(64bit)
    libm.so.6()(64bit)
    libpthread.so.0()(64bit)
    libstdc++.so.6()(64bit)
    libstdc++.so.6(CXXABI_1.3)(64bit)
    libstdc++.so.6(CXXABI_1.3.11)(64bit)
    libstdc++.so.6(CXXABI_1.3.2)(64bit)
    libstdc++.so.6(CXXABI_1.3.3)(64bit)
    libstdc++.so.6(CXXABI_1.3.8)(64bit)
    rtld(GNU_HASH)

kernelshark-debuginfo (rpmlib, GLIBC filtered):

kernelshark-debugsource (rpmlib, GLIBC filtered):



Provides
--------
kernelshark:
    application()
    application(kernelshark.desktop)
    kernelshark
    kernelshark(x86-64)
    libkshark-gui.so.1.1.0()(64bit)
    libkshark-plot.so.1.1.0()(64bit)
    libkshark.so.1.1.0()(64bit)
    metainfo()
    metainfo(kernelshark.appdata.xml)

kernelshark-debuginfo:
    debuginfo(build-id)
    kernelshark-debuginfo
    kernelshark-debuginfo(x86-64)

kernelshark-debugsource:
    kernelshark-debugsource
    kernelshark-debugsource(x86-64)

Comment 2 Zamir SUN 2020-09-27 04:02:15 UTC
(In reply to Andy Mender from comment #1)
> Koji build: https://koji.fedoraproject.org/koji/taskinfo?taskID=52316193
> 
> > License: GPLv2 and LGPLv2
> 
> Is it clear which parts use which license? If so, could you indicate that in
> a comment above the line?

They do have SPDX-License-Identifier, but I'm reluctant to add such comment. It's not differ per dir, but rather per file. Maintaining such a comment is kind of wasting time for packaging.

> > %install
> > libdir=%{_libdir} make libdir=%{_libdir} prefix=%{_prefix} V=1 DESTDIR=%{buildroot}/ CFLAGS="%{optflags} -D_GNU_SOURCE" LDFLAGS="%{build_ldflags} -z muldefs " BUILD_TYPE=Release install_gui
> 
> Why is "libdir" also defined as an environment variable for this command?
> 

That was to workaround a bug before. Just tried now it works without the environment var.

Updated in-place.
SPEC URL: https://zsun.fedorapeople.org/pub/pkgs/kernelshark/kernelshark.spec
SRPM URL: https://zsun.fedorapeople.org/pub/pkgs/kernelshark/kernelshark-1.1-1.fc34.src.rpm

Koji: https://koji.fedoraproject.org/koji/taskinfo?taskID=52333193

Comment 3 Andy Mender 2020-09-27 09:46:43 UTC
> They do have SPDX-License-Identifier, but I'm reluctant to add such comment. It's not differ per dir, but rather per file. Maintaining such a comment is kind of wasting time for packaging.

I think the comment you added now is sufficient, thanks!

Package approved!

Comment 4 Gwyn Ciesla 2020-09-28 13:36:08 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/kernelshark

Comment 5 Fedora Update System 2020-10-14 14:30:27 UTC
FEDORA-2020-e78d4f1508 has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2020-e78d4f1508

Comment 6 Fedora Update System 2020-10-14 14:30:29 UTC
FEDORA-2020-e78d4f1508 has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2020-e78d4f1508

Comment 7 Fedora Update System 2020-10-15 19:08:34 UTC
FEDORA-2020-e78d4f1508 has been pushed to the Fedora 33 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-e78d4f1508`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-e78d4f1508

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 8 Fedora Update System 2020-10-23 22:02:41 UTC
FEDORA-2020-e78d4f1508 has been pushed to the Fedora 33 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.