Bug 1808276

Summary: Review request: libuInputPlus - C++ wrapper around libuinput
Product: [Fedora] Fedora Reporter: Bob Hepple <bob.hepple>
Component: Package ReviewAssignee: Artem <ego.cordatus>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: ego.cordatus, package-review, zebob.m
Target Milestone: ---Flags: ego.cordatus: fedora-review+
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-04-09 14:42:41 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1807753    
Attachments:
Description Flags
SPEC file patch none

Comment 1 Artem 2020-02-28 12:08:28 UTC
1. Drop date from:

   Version:  0.1.3.20200211
   ->
   Version:  0.1.3

Also the latest version should been packaged which is 0.1.4.

2. Drop 'wef' from:

   Release:  1%{?dist}.wef
   ->
   Release:  1%{?dist}

3. Source URL incorrect and not downloadable:

   Source0:  https://github.com/YukiWorkshop/libuInputPlus/archive/%{name}-%{version}.tar.gz
   ->
   Source0:  %{url}/-/archive/v%{version}/%{name}-%{version}.tar.gz

4. Use new line for every BR. It's easier for patch/diff and for better readability. Also please sort it in alphabetical order.

   BuildRequires: cmake make gcc-c++
   ->
   BuildRequires: cmake
   BuildRequires: gcc-c++
   BuildRequires: make

5. Add dot into the end of description:

   Library required for ydotool
   ->
   Library required for ydotool.

6. Instead of build dir better use:

   mkdir build
   ->
   mkdir -p %{_target_platform}

7. Instead of cd us pushd/popd:

   cd build
   ->
   pushd %{_target_platform}

8. Use cmake macros and do not hardcode paths:

   cmake -DCMAKE_INSTALL_PREFIX=/usr ..
   ->
   %cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} ..

9. Use macros for make:
   %make_build
   https://docs.fedoraproject.org/en-US/packaging-guidelines/#_parallel_make

10. Add %install section before %make_install

11. You need to own dir, do not glob here:
    %{_includedir}/*
    ->
    %{_includedir}/uInputPlus/

12. Seems like there is test persist in this project. Run tests in %check section
    https://docs.fedoraproject.org/en-US/packaging-guidelines/#_test_suites

13. Development (unversioned) .so files in -devel subpackage, if present.
    Note: Unversioned so-files directly in %_libdir.
    See: https://docs.fedoraproject.org/en-US/packaging-
    guidelines/#_devel_packages

14.

---


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

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


Issues:
=======
- Development (unversioned) .so files in -devel subpackage, if present.
  Note: Unversioned so-files directly in %_libdir.
  See: https://docs.fedoraproject.org/en-US/packaging-
  guidelines/#_devel_packages
- Static libraries in -static or -devel subpackage, providing -devel if
  present.
  Note: Package has .a files: libevdevPlus. Illegal package name:
  libevdevPlus. Does not provide -static: libevdevPlus.
  See: https://docs.fedoraproject.org/en-US/packaging-
  guidelines/#packaging-static-libraries


===== 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]: ldconfig not called in %post and %postun for Fedora 28 and later.
[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", "Expat License". 4 files have unknown
     license. Detailed output of licensecheck in /mnt/data-
     linux/tmp/review/1808278-libevdevPlus/licensecheck.txt
[!]: %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.
[!]: Package consistently uses macros (instead of hard-coded directory
     names).
[x]: Package is named according to the Package Naming Guidelines.
[?]: Package does not generate any conflict.
[x]: Package obeys FHS, except libexecdir and /usr/target.
[x]: 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.
[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.
[!]: 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]: 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:
[!]: Uses parallel make %{?_smp_mflags} macro.
[!]: Sources can be downloaded from URI in Source: tag
     Note: Could not download Source0:
     https://github.com/YukiWorkshop/libevdevPlus/archive/libevdevPlus-0.1.0.20200211.tar.gz
     See: https://docs.fedoraproject.org/en-US/packaging-
     guidelines/SourceURL/
[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).
[?]: Package functions as described.
[!]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[x]: The placement of pkgconfig(.pc) files are correct.
     Note: libevdevPlus : /usr/lib64/pkgconfig/evdevPlus.pc
[!]: SourceX tarball generation or download is documented.
     Note: Package contains tarball without URL, check comments
[-]: Sources are verified with gpgverify first in %prep if upstream
     publishes signatures.
     Note: gpgverify is not used.
[x]: Description and summary sections in the package spec file contains
     translations for supported Non-English languages, if available.
[?]: Package should compile and build into binary rpms on all supported
     architectures.
[!]: %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]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: SourceX is a working URL.
[x]: Spec use %global instead of %define unless justified.

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

Generic:
[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: libevdevPlus-0.1.0.20200211-1.fc33.wef.x86_64.rpm
          libevdevPlus-0.1.0.20200211-1.fc33.wef.src.rpm
libevdevPlus.x86_64: W: spelling-error Summary(en_US) ydotool -> footstool
libevdevPlus.x86_64: W: spelling-error %description -l en_US ydotool -> footstool
libevdevPlus.x86_64: W: incoherent-version-in-changelog 0.1.0.20200211-1.fc31.wef ['0.1.0.20200211-1.fc33.wef', '0.1.0.20200211-1.wef']
libevdevPlus.x86_64: W: unstripped-binary-or-object /usr/lib64/libevdevPlus.so.0.1.0
libevdevPlus.x86_64: W: devel-file-in-non-devel-package /usr/include/evdevPlus/CommonIncludes.hpp
libevdevPlus.x86_64: W: devel-file-in-non-devel-package /usr/include/evdevPlus/InputEvent.hpp
libevdevPlus.x86_64: W: devel-file-in-non-devel-package /usr/include/evdevPlus/evdevPlus.hpp
libevdevPlus.x86_64: W: devel-file-in-non-devel-package /usr/lib64/libevdevPlus.a
libevdevPlus.x86_64: W: devel-file-in-non-devel-package /usr/lib64/libevdevPlus.so
libevdevPlus.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pkgconfig/evdevPlus.pc
libevdevPlus.src: W: spelling-error Summary(en_US) ydotool -> footstool
libevdevPlus.src: W: spelling-error %description -l en_US ydotool -> footstool
libevdevPlus.src: W: no-%install-section
libevdevPlus.src: W: invalid-url Source0: https://github.com/YukiWorkshop/libevdevPlus/archive/libevdevPlus-0.1.0.20200211.tar.gz HTTP Error 404: Not Found
2 packages and 0 specfiles checked; 0 errors, 14 warnings.




Rpmlint (installed packages)
----------------------------
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LC_CTYPE = "C.UTF-8",
	LANG = "ru_UA.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LC_CTYPE = "C.UTF-8",
	LANG = "ru_UA.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
libevdevPlus.x86_64: W: spelling-error Summary(en_US) ydotool -> footstool
libevdevPlus.x86_64: W: spelling-error %description -l en_US ydotool -> footstool
libevdevPlus.x86_64: W: incoherent-version-in-changelog 0.1.0.20200211-1.fc31.wef ['0.1.0.20200211-1.fc33.wef', '0.1.0.20200211-1.wef']
libevdevPlus.x86_64: W: unstripped-binary-or-object /usr/lib64/libevdevPlus.so.0.1.0
libevdevPlus.x86_64: W: unused-direct-shlib-dependency /usr/lib64/libevdevPlus.so.0.1.0 /lib64/libm.so.6
libevdevPlus.x86_64: W: devel-file-in-non-devel-package /usr/include/evdevPlus/CommonIncludes.hpp
libevdevPlus.x86_64: W: devel-file-in-non-devel-package /usr/include/evdevPlus/InputEvent.hpp
libevdevPlus.x86_64: W: devel-file-in-non-devel-package /usr/include/evdevPlus/evdevPlus.hpp
libevdevPlus.x86_64: W: devel-file-in-non-devel-package /usr/lib64/libevdevPlus.a
libevdevPlus.x86_64: W: devel-file-in-non-devel-package /usr/lib64/libevdevPlus.so
libevdevPlus.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pkgconfig/evdevPlus.pc
1 packages and 0 specfiles checked; 0 errors, 11 warnings.



Unversioned so-files
--------------------
libevdevPlus: /usr/lib64/libevdevPlus.so

Requires
--------
libevdevPlus (rpmlib, GLIBC filtered):
    /usr/bin/pkg-config
    libc.so.6()(64bit)
    libevdevPlus.so.0()(64bit)
    libgcc_s.so.1()(64bit)
    libgcc_s.so.1(GCC_3.0)(64bit)
    libm.so.6()(64bit)
    libstdc++.so.6()(64bit)
    libstdc++.so.6(CXXABI_1.3)(64bit)
    libstdc++.so.6(CXXABI_1.3.5)(64bit)
    rtld(GNU_HASH)



Provides
--------
libevdevPlus:
    libevdevPlus
    libevdevPlus(x86-64)
    libevdevPlus.so.0()(64bit)
    pkgconfig(evdevPlus)



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

Comment 2 Bob Hepple 2020-02-29 05:19:31 UTC
Thanks for the comprehensive review. (I will apply these points to the libevdevPlus and ydotool specs too.)

The new spec file now passes rpmlint without errors or warnings and I have used the updated version 0.1.4 since released by upstream.

SRPM URL: https://download.copr.fedorainfracloud.org/results/wef/ydotool/fedora-31-x86_64/01260041-libuInputPlus/libuInputPlus-0.1.4-1.fc31.src.rpm
SPEC URL: https://download.copr.fedorainfracloud.org/results/wef/ydotool/fedora-31-x86_64/01260041-libuInputPlus/libuInputPlus.spec

FAS Username: wef

Comment 3 Bob Hepple 2020-02-29 05:25:53 UTC
I should mention that I did _not_ include a %ctest section as the test program requires sudo

Comment 4 Artem 2020-02-29 09:51:46 UTC
LGTM, just few minor nitpicks, mostly cosmetic, but some items as MUST:

1. - Static libraries in -static or -devel subpackage, providing -devel if
     present.
     Note: Package has .a files: libuInputPlus-devel. Does not provide -static: libuInputPlus-devel.
     See: https://docs.fedoraproject.org/en-US/packaging-guidelines/#packaging-static-libraries

Just remove it in %install stage:

rm -f %{buildroot}%{_libdir}/libuInputPlus.a

2. Move pkgconfig files into -devel package:

%files devel
%{_libdir}/pkgconfig/*

3. https://docs.fedoraproject.org/en-US/packaging-guidelines/#_listing_shared_library_files

%{_libdir}/libuInputPlus.so.0
%{_libdir}/libuInputPlus.so.%{version}
->
%{_libdir}/libuInputPlus.so.0*

4. The rule of thumb is always use popd with pushd. Also you can skip them in %install stage:

pushd %{_target_platform}
%make_install
->
%make_install -C %{_target_platform}

5. W: summary-not-capitalized C development files for libuInputPlus

   Summary:  a c++ wrapper around libuinput
   ->
   Summary:  C++ wrapper around libuinput

Even if this is not documented yet in guidelines, many packagers recommends to skip A/The in Summary. It's OK to use them in %description.

6. Add to devel package 
   Requires: %{name}%{?_isa} = %{version}-%{release}

   https://docs.fedoraproject.org/en-US/packaging-guidelines/#_requiring_base_package

7. W: incoherent-version-in-changelog 0.1.4-1.fc31 ['0.1.4-1.fc33', '0.1.4-1']
   
   In %changelog:

   0.1.4-1.fc31
   ->
   0.1.4-1

---

The one this which i am not sure is - should we convert package name to lower case or not:
https://docs.fedoraproject.org/en-US/packaging-guidelines/Naming/#_general_naming

I'll ask about this other maintainers...

---

Also just note: next time when you post here new, updated spec and SRPM you can just post plain links for them without additional 'FAS Username: foo'. Hope this saves you some time. :)

Comment 6 Artem 2020-03-02 08:19:18 UTC
LGTM. Few minor issues may be corrected during import:

1. W: no-dependency-on libuInputPlus/libuInputPlus-libs/liblibuInputPlus
   W: tag-in-description C Requires:

   Put 'Requires: %{name}%{?_isa} = %{version}-%{release}' before %description tag


2. W: summary-not-capitalized C development files for libuInputPlus

   Summary: development files for %{name}
   ->
   Summary: Development files for %{name}


As for converting package name in lower case not sure. I asked other maintainers and they said best option is ask upstream about this. It's up on you. I leave quote here from packaging guidelines:

  > Package names SHOULD be in lower case and use dashes in preference to underscores. You can take some cues from the name of the upstream tarball, the project name from which this software came, and the name which has been used for this package by other distributions/packagers in the past. You can also request guidance from the upstream developers. Do not just blindly follow those examples, however, as package names SHOULD strive to be consistent within Fedora more than consistent between distributions.

Comment 10 Robert-André Mauchin 🐧 2020-03-25 22:10:19 UTC
Sponsored.

Comment 11 Artem 2020-03-27 12:15:02 UTC
Created attachment 1674064 [details]
SPEC file patch

@eclipseo, thanks!

@Bob, just few cosmetic nitpicks. See my attached patch.

Now we ready to package #1807753.

Comment 12 Bob Hepple 2020-03-29 02:46:40 UTC
Had to fix the version number in the pkgconfig.pc file - it was 0.1.3, changed to 0.1.4

SPEC URL: https://src.fedoraproject.org/rpms/libuInputPlus/blob/master/f/libuInputPlus.spec
SRPM URL: https://kojipkgs.fedoraproject.org//work/tasks/5178/42835178/libuInputPlus-0.1.4-5.fc33.src.rpm

Comment 13 Fedora Update System 2020-03-31 04:10:34 UTC
FEDORA-2020-9d0bd4996a has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2020-9d0bd4996a

Comment 14 Fedora Update System 2020-03-31 05:00:52 UTC
FEDORA-2020-70841b6261 has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-70841b6261

Comment 15 Fedora Update System 2020-03-31 05:17:11 UTC
FEDORA-EPEL-2020-ae4bb70b45 has been submitted as an update to Fedora EPEL 8. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-ae4bb70b45

Comment 16 Fedora Update System 2020-04-01 02:14:40 UTC
FEDORA-2020-70841b6261 has been pushed to the Fedora 32 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf install --enablerepo=updates-testing --advisory=FEDORA-2020-70841b6261 \*`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-70841b6261

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

Comment 17 Fedora Update System 2020-04-01 03:54:31 UTC
FEDORA-2020-9d0bd4996a has been pushed to the Fedora 31 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf install --enablerepo=updates-testing --advisory=FEDORA-2020-9d0bd4996a \*`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-9d0bd4996a

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

Comment 18 Fedora Update System 2020-04-01 04:02:20 UTC
FEDORA-EPEL-2020-ae4bb70b45 has been pushed to the Fedora EPEL 8 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-ae4bb70b45

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

Comment 19 Fedora Update System 2020-04-09 14:42:41 UTC
FEDORA-2020-70841b6261 has been pushed to the Fedora 32 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 20 Fedora Update System 2020-04-09 18:17:58 UTC
FEDORA-2020-9d0bd4996a has been pushed to the Fedora 31 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 21 Fedora Update System 2020-04-15 21:47:09 UTC
FEDORA-EPEL-2020-ae4bb70b45 has been pushed to the Fedora EPEL 8 stable repository.
If problem still persists, please make note of it in this bug report.