Bug 1973980 - Review Request: iwyu - C/C++ source files #include analyzer based on clang
Summary: Review Request: iwyu - C/C++ source files #include analyzer based on clang
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Nobody's working on this, feel free to take it
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: FE-NEEDSPONSOR FE-DEADREVIEW
TreeView+ depends on / blocked
 
Reported: 2021-06-19 16:39 UTC by edd
Modified: 2021-10-30 00:45 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-10-30 00:45:15 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description edd 2021-06-19 16:39:15 UTC
Spec URL: https://download.copr.fedorainfracloud.org/results/eddsalkield/iwyu/fedora-34-x86_64/02263875-iwyu/iwyu.spec
SRPM URL: https://download.copr.fedorainfracloud.org/results/eddsalkield/iwyu/fedora-34-x86_64/02263875-iwyu/iwyu-0.16-0.16.fc34.src.rpm

Description:

"Include what you use" means this: for every symbol (type, function, variable,
or macro) that you use in foo.cc (or foo.cpp), either foo.cc or foo.h
should #include a .h file that exports the declaration of that symbol. The
include-what-you-use tool is a program that can be built with the clang
libraries in order to analyze #includes of source files to find
include-what-you-use violations, and suggest fixes for them. 

Fedora Account System Username: eddsalkield

I've got the include-what-you-use package building, using clang 12 on Fedora 34 and rawhide, x86_64.  The package has been orphaned since Fedora 31.

This is my first package, and I'm looking for a sponsor.

Working COPR build: https://copr.fedorainfracloud.org/coprs/eddsalkield/iwyu/build/2263875/

Working Koji build: https://koji.fedoraproject.org/koji/taskinfo?taskID=70437907

Comment 1 Arthur Bols 2021-06-20 00:08:31 UTC
Note: This is a preliminary (unofficial) review!

Welcome Edd!

I'm not a packager, but like to help out. Please remember that this is a preliminary (unofficial) review.
I may have overlooked things or drawn wrong conclusions. Let me know if that is the case!


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

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


Issues:
=======
- Statically Linking Executables
  This package was originally added in 2014, maybe it is now 
  possible to build it with dynamic linking?
  According to this commit, it seems to be possible:
  https://github.com/include-what-you-use/include-what-you-use/commit/0003739b52e0bcefa574ed6dbc5dc7cf78da3cb4

- If your application is a C or C++ application you must list a
  BuildRequires against gcc, gcc-c++ or clang.
  Note: No gcc, gcc-c++ or clang found in BuildRequires
  See: https://docs.fedoraproject.org/en-US/packaging-guidelines/C_and_C++/

  I don't think this is necessary because clang-devel is required.

- Package must not depend on deprecated() packages.
  Note: python2.7 is deprecated, you must not depend on it.
  See: https://docs.fedoraproject.org/en-US/packaging-
  guidelines/deprecating-packages/

  The scripts actually support python3. There are commits mentioning fixes.
  I've also rebuild it with python3-devel, which worked fine.

- The license file LICENSE.TXT is not included.
  Please see: https://docs.fedoraproject.org/en-US/packaging-guidelines/LicensingGuidelines/#_license_text

- `/usr/bin/env python` must not be used in shebang lines or 
  as a dependency of a package.
  The following files need to be changed:

     /usr/bin/fix_includes.py
     /usr/bin/iwyu_tool.py

  Please see: https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_multiple_python_runtimes


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

C/C++:
[x]: Package does not contain kernel modules.
[!]: Package contains no static executables.
[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 is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[!]: 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.
[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* [generated file]". 491
     files have unknown license. Detailed output of licensecheck in
     /home/arthur/Documents/rpm/iwyu/1973980-iwyu/licensecheck.txt
[-]: License file installed when any subpackage combination is installed.
[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.
[-]: Package contains desktop file if it is a GUI application.
[x]: Development files must be in a -devel package
[x]: 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.
[?]: Useful -debuginfo package or justification otherwise.
[-]: Package is not known to require an ExcludeArch tag.

     Package is ExclusiveArch

[!]: Package complies to the Packaging Guidelines
[x]: Package successfully compiles and builds into binary rpms on at least
     one supported primary architecture.
[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 must own all directories that it creates.
[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]: Dist tag is present.
[x]: Package does not contain duplicates in %files.
[x]: Permissions on files are set properly.
[x]: Package use %makeinstall only when make install DESTDIR=... doesn't
     work.
[x]: Package is named using only allowed ASCII characters.
[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]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 0 bytes in 0 files.
[x]: Packages must not store files under /srv, /opt or /usr/local

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

Generic:
[-]: 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.

     Not tested

[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[-]: 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]: %check is present and all tests pass.
[x]: Packages should try to preserve timestamps of original installed
     files.
[x]: Reviewer should test that the package builds in mock.
[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]: Package should compile and build into binary rpms on all supported
     architectures.
[x]: Spec use %global instead of %define unless justified.

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

Generic:
[?]: Large data in /usr/share should live in a noarch subpackage if package
     is arched.
     Note: Arch-ed rpms have a total of 6113280 bytes in /usr/share
[x]: Rpmlint is run on debuginfo package(s).
     Note: No rpmlint messages.
[x]: Rpmlint is run on all installed packages.
     Note: There are rpmlint messages (see attachment).
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: iwyu-0.16-0.16.fc35.x86_64.rpm
          iwyu-debuginfo-0.16-0.16.fc35.x86_64.rpm
          iwyu-debugsource-0.16-0.16.fc35.x86_64.rpm
          iwyu-0.16-0.16.fc35.src.rpm
iwyu.x86_64: W: spelling-error %description -l en_US cpp -> cop, pp, cps
iwyu.x86_64: W: incoherent-version-in-changelog 0.16-1 ['0.16-0.16.fc35', '0.16-0.16']
iwyu.x86_64: E: env-script-interpreter /usr/bin/fix_includes.py /usr/bin/env python
iwyu.x86_64: E: env-script-interpreter /usr/bin/iwyu_tool.py /usr/bin/env python
iwyu.x86_64: W: no-manual-page-for-binary fix_includes
iwyu.x86_64: W: no-manual-page-for-binary fix_includes.py
iwyu.x86_64: W: no-manual-page-for-binary iwyu
iwyu.x86_64: W: no-manual-page-for-binary iwyu_tool
iwyu.x86_64: W: no-manual-page-for-binary iwyu_tool.py
iwyu.src: W: spelling-error %description -l en_US cpp -> cop, pp, cps
4 packages and 0 specfiles checked; 2 errors, 8 warnings.




Rpmlint (debuginfo)
-------------------
Checking: iwyu-debuginfo-0.16-0.16.fc35.x86_64.rpm
1 packages and 0 specfiles checked; 0 errors, 0 warnings.





Rpmlint (installed packages)
----------------------------
Cannot parse rpmlint output:


Source checksums
----------------
https://github.com/include-what-you-use/include-what-you-use/archive/refs/tags/0.16.tar.gz :
  CHECKSUM(SHA256) this package     : 313e92b4fe38f99a0bbae3ba16c5eb2c54b821b6263e7745e1dd4b4eca08d948
  CHECKSUM(SHA256) upstream package : 313e92b4fe38f99a0bbae3ba16c5eb2c54b821b6263e7745e1dd4b4eca08d948


Requires
--------
iwyu (rpmlib, GLIBC filtered):
    /usr/bin/env
    libLLVM-12.so()(64bit)
    libLLVM-12.so(LLVM_12)(64bit)
    libc.so.6()(64bit)
    libclang-cpp.so.12()(64bit)
    libstdc++.so.6()(64bit)
    libstdc++.so.6(CXXABI_1.3)(64bit)
    libstdc++.so.6(CXXABI_1.3.9)(64bit)
    rtld(GNU_HASH)

iwyu-debuginfo (rpmlib, GLIBC filtered):

iwyu-debugsource (rpmlib, GLIBC filtered):



Provides
--------
iwyu:
    include-what-you-use
    include-what-you-use(x86-64)
    iwyu
    iwyu(x86-64)

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

iwyu-debugsource:
    iwyu-debugsource
    iwyu-debugsource(x86-64)



Generated by fedora-review 0.7.6 (b083f91) last change: 2020-11-10
Command line :/usr/bin/fedora-review -b 1973980
Buildroot used: fedora-rawhide-x86_64
Active plugins: Generic, Shell-api, C/C++
Disabled plugins: R, Haskell, Perl, PHP, Java, Ocaml, SugarActivity, fonts, Python
Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH

Comment 2 Ben Beasley 2021-09-29 17:22:35 UTC
Are you still interested in packaging this? Have you considered Arthur’s feedback?

Comment 3 Package Review 2021-10-30 00:45:15 UTC
This is an automatic action taken by review-stats script.

The ticket submitter failed to clear the NEEDINFO flag in a month.
As per https://fedoraproject.org/wiki/Policy_for_stalled_package_reviews
we consider this ticket as DEADREVIEW and proceed to close it.


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