Bug 1968655 - Review Request: headsetcontrol - A tool to control certain aspects of USB-connected headsets on Linux
Summary: Review Request: headsetcontrol - A tool to control certain aspects of USB-con...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Carl George 🤠
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-06-07 18:39 UTC by Mohan Boddu
Modified: 2021-07-22 10:02 UTC (History)
3 users (show)

Fixed In Version: headsetcontrol-2.4-1.fc35
Clone Of:
Environment:
Last Closed: 2021-07-22 10:02:14 UTC
Type: Bug
Embargoed:
carl: fedora-review+


Attachments (Terms of Use)

Description Mohan Boddu 2021-06-07 18:39:39 UTC
Spec URL: https://mohanboddu.fedorapeople.org/headsetcontrol.spec
SRPM URL: https://mohanboddu.fedorapeople.org/headsetcontrol-2.4-1.fc35.src.rpm

Description:

I would really appreciate a package review on headsetcontrol package, a cli that controls different aspects of headsets connected by usb.

Thanks.

Comment 1 Carl George 🤠 2021-06-08 02:15:49 UTC
cmake_modules/Findhidapi.cmake is licensed under Boost Software License 1.0, so the license tag needs to be updated and a comment added to explain the license breakdown [0].

    -License:        GPLv3+ 
    +# The entire source code is GPLv3+ except cmake_modules/Findhidapi.cmake which is Boost
    +License:        GPLv3+ and Boost


The current Source0 URL will create a tarball filename with just the version.  It should also include the name [1].

    -Source0:        %{url}/archive/%{version}/%{version}.tar.gz 
    +Source0:        %{url}/archive/%{version}/%{name}-%{version}.tar.gz


Despite the Boost licensed file mentioned earlier, upstream is missing the Boost license file in their repository.  That license requires itself be included in all copies of the software [2].  You'll need to file an issue upstream asking them to correct this, and in the meantime add the license as an additional source in the spec [3].  You should also include a link to the upstream issue as a comment right before this source.

    +# https://github.com/Sapd/HeadsetControl/issues/XXX
    +Source1:        https://www.boost.org/LICENSE_1_0.txt


The requires on hidapi is unnecessary, when built the package is built it gets an automatic requires on the relevant library soname [4].

    -Requires:       hidapi


Related to the Boost license issue, copy it to the build directory during %prep (after %setup), otherwise the %license macro in %files won't be able to pick it up.

    +cp %{SOURCE1} license.boost


There is no need to create and use a build directory in %build and %install, the cmake macros handle that for you [5].

     %build
    -mkdir build
    -pushd build
    -%cmake ..
    +%cmake
     %cmake_build

     %install
    -pushd build
     %cmake_install


Upstream runs a test suite in their CI.  We should run the same thing in a %check section [6].

    +%check
    +%ctest


In %files you should use %{_bindir} instead of a hard coded directory name [7].

    -/usr/bin/headsetcontrol
    +%{_bindir}/headsetcontrol


Also in %files, include the boost license file we added above.

    -%license license
    +%license license license.boost


[0] https://docs.fedoraproject.org/en-US/packaging-guidelines/LicensingGuidelines/#_multiple_licensing_scenarios
[1] https://docs.fedoraproject.org/en-US/packaging-guidelines/SourceURL/#_git_tags
[2] https://www.boost.org/LICENSE_1_0.txt
[3] https://docs.fedoraproject.org/en-US/packaging-guidelines/LicensingGuidelines/#_license_text
[4] https://docs.fedoraproject.org/en-US/packaging-guidelines/#_explicit_requires
[5] https://docs.fedoraproject.org/en-US/packaging-guidelines/CMake/#_example_usage_in_the_spec_file
[6] https://docs.fedoraproject.org/en-US/packaging-guidelines/#_test_suites
[7] https://docs.fedoraproject.org/en-US/packaging-guidelines/#_macros

Comment 2 Mohan Boddu 2021-06-08 15:08:12 UTC
First of all, thanks a lot for the review Carl

Because of the case sensitivity [0] in naming guidelines, I changed the name to HeadsetControl to match the upstream naming and here are the new spec and srpm with the requested changes:

SPEC: https://mohanboddu.fedorapeople.org/HeadsetControl.spec
SRPM: https://mohanboddu.fedorapeople.org/HeadsetControl-2.4-1.fc35.src.rpm

[0] https://docs.fedoraproject.org/en-US/packaging-guidelines/Naming/#_case_sensitivity

Comment 3 Mohan Boddu 2021-06-08 20:16:20 UTC
Based on my chat with Carl, its better to go with lower case package name. Updated spec and srpm are:

SPEC: https://mohanboddu.fedorapeople.org/headsetcontrol.spec
SRPM: https://mohanboddu.fedorapeople.org/headsetcontrol-2.4-1.fc35.src.rpm

Comment 4 Carl George 🤠 2021-06-08 23:14:30 UTC
There is a duplicate line for the main license file, it only needs to be included once.

    -%license license
     %license license license.boost


The license breakdown comment that is required by the guidelines is missing.

    +# The entire source code is GPLv3+ except cmake_modules/Findhidapi.cmake which is Boost
     License:        GPLv3+ and Boost


There is still an explicit require on hidapi, and now another one on glibc.  Those aren't allowed.

    -Requires:       hidapi
    -Requires:       glibc


This spec file is really close to done, just wrap up those last few things.

Comment 5 Mohan Boddu 2021-06-09 13:35:21 UTC
I think I might have accidentally closed vim without saving while making some changes. Updated spec and srpm are:

SPEC: https://mohanboddu.fedorapeople.org/headsetcontrol.spec
SRPM: https://mohanboddu.fedorapeople.org/headsetcontrol-2.4-1.fc35.src.rpm

Comment 6 Carl George 🤠 2021-06-10 01:03:53 UTC
Package Review
==============

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



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

C/C++:
[x]: Package does not contain kernel modules.
[x]: Package contains no static executables.
[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 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, Version 3", "*No copyright* Boost Software License 1.0",
     "Boost Software License 1.0", "GNU General Public License v3.0 or
     later". 42 files have unknown license. Detailed output of licensecheck
     in
     /home/carl/packaging/reviews/headsetcontrol/1968655-headsetcontrol/licensecheck.txt
[x]: License file installed when any subpackage combination is installed.
[x]: If the package is under multiple licenses, the licensing breakdown
     must be documented in the spec.
[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.
[-]: 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.
[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 10240 bytes in 1 files.
[x]: 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]: 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]: 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 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]: 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).
[x]: Package functions as described.
[x]: Latest version is packaged.
[!]: 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]: Package should compile and build into binary rpms on all supported
     architectures.
[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]: 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: There are rpmlint messages (see attachment).
[x]: Large data in /usr/share should live in a noarch subpackage if package
     is arched.
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: headsetcontrol-2.4-1.fc35.x86_64.rpm
          headsetcontrol-debuginfo-2.4-1.fc35.x86_64.rpm
          headsetcontrol-debugsource-2.4-1.fc35.x86_64.rpm
          headsetcontrol-2.4-1.fc35.src.rpm
headsetcontrol.x86_64: W: no-manual-page-for-binary headsetcontrol
4 packages and 0 specfiles checked; 0 errors, 1 warnings.


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


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

Comment 7 Gwyn Ciesla 2021-06-10 15:46:25 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/headsetcontrol

Comment 8 Petr Menšík 2021-07-22 10:02:14 UTC
It seems to me this review is complete. Closing the review.


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