Bug 1878898 - Review Request: nwg-launchers - GTK-based launchers for sway and other window managers
Summary: Review Request: nwg-launchers - GTK-based launchers for sway and other window...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bob Hepple
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-09-14 20:03 UTC by Aleksei Bavshin
Modified: 2020-10-01 01:27 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-09-27 00:15:32 UTC
Type: ---
Embargoed:
bob.hepple: fedora-review+


Attachments (Terms of Use)

Comment 1 Bob Hepple 2020-09-16 10:08:27 UTC
Hi Aleksei,

I'm afraid that the construct:

BuildRequires:  cmake(nlohmann_json)

... has thrown me!! I can see many similar constructs in Fedora spec files so I'm sure it must be legal, but the packaging guidelines don't document it (I'm looking at https://docs.fedoraproject.org/en-US/packaging-guidelines/CMake/) and I can't google anything about buildrequires: cmake(...)

So I understand there is a subproject https://github.com/nlohmann/json package and the code is included in the nwg-launchers tarball. So far so good.

But my local rpmbuild isn't able to grok it:

$ rpmbuild -ba nwg-launchers.spec 
setting SOURCE_DATE_EPOCH=1600041600
error: Failed build dependencies:
	cmake(nlohmann_json) is needed by nwg-launchers-0.3.3-0.1.fc31.x86_64

I'd like to understand this as it's something I could use in my own packaging - in the past I have had to create separate discrete packages in this situation - so can you please point me at the doco for the Buildrequires: cmake(...) construct? 

2/ The license for the nlohmann stuff is MIT so please reflect that in the spec file with an appropriate comment eg:

# the subproject 'nlohmann' is licensed as MIT:
License:        GPLv3+ and MIT

3/ The file subprojects/nlohmann_json/third_party/cpplint/LICENSE indicates google licensing... I can't spot what name this is licensed as (on https://fedoraproject.org/wiki/Licensing) but it does require that the copyright notice be included with an appropriate comment in the spec file.

4/ The file subprojects/nlohmann_json/include/nlohmann/thirdparty/hedley/hedley.hpp is marked CC0-1.0. Please add it to the list of licenses if the code is included in the rpm with an appropriate comment in the spec file.

5/ The file subprojects/nlohmann_json/mark/src/complexity.h is marked Apache License, Version 2.0. Please add it to the list of licenses if the code is included in the rpm with an appropriate comment in the spec file.

6/ I'm assuming that the code in subprojects/nlohmann_json/benchmarks is not included in the final rpm

7/ how would you feel about adding the following to the description (or paraphrasing it):

    it must work well on sway;
    it should work as well as possible on Wayfire, i3, dwm and Openbox.

... I think it could be useful to a potential installer.

Thanks

Bob

Comment 2 Aleksei Bavshin 2020-09-16 15:27:26 UTC
(In reply to Bob Hepple from comment #1)
Hi Bob,

> I'm afraid that the construct:
> 
> BuildRequires:  cmake(nlohmann_json)
> 
> ... has thrown me!! I can see many similar constructs in Fedora spec files
> so I'm sure it must be legal, but the packaging guidelines don't document it
> (I'm looking at
> https://docs.fedoraproject.org/en-US/packaging-guidelines/CMake/) and I
> can't google anything about buildrequires: cmake(...)

Indeed, that's not documented. I created a ticket[1] for Fedora packaging committee to address that.
`BuildRequires: cmake(...)` is a construction similar to `BuildRequires: pkgconfig(...)` with the main difference that it works with CMake configuration files and uses names suitable for CMake's `find_package` dependency resolver. In the case of this package, meson uses CMake dependency resolver when pkgconfig lookup fails, thus I'm declaring the dependency as `cmake(nlohmann_json)`
I did a quick search and the only document I found was a blog post of the author of the dependency generator[2]. You can check it for a better explanaion and examples.

[1] https://pagure.io/packaging-committee/issue/1019
[2] https://www.dvratil.cz/2015/03/fedora-rpm-automatic-provides-for-cmake-projects-packages/
 
> So I understand there is a subproject https://github.com/nlohmann/json
> package and the code is included in the nwg-launchers tarball. So far so
> good.
 
No, nlohmann_json code is not included in the nwg-launchers tarball. `cmake(nlohmann_json)` pulls `json-devel` package which would provide the library.
`dnf install 'cmake(nlohmann_json)'` should do the same for you.


> 2/ The license for the nlohmann stuff is MIT so please reflect that in the
> spec file with an appropriate comment eg:
> 3/ ...
> 4/ ...
> 5/ ...

Since the subproject is not included in the nwg-launchers source archive, this would be unnecessary.

> 7/ how would you feel about adding the following to the description (or
> paraphrasing it):
> 
>     it must work well on sway;
>     it should work as well as possible on Wayfire, i3, dwm and Openbox.

It's a good idea. I'll do that.

Thanks for reviewing!

Comment 4 Bob Hepple 2020-09-17 02:02:34 UTC
Ah! thank you so much. Now I've got it (the cmake stuff). So my comments on licensing disappear. 

It builds fine for me in mock, installs OK and runs fine.

Tiny quibble - this does not require a .desktop file but there should be a comment to that effect in the spec file (I need to do that myself for lavalauncher!).

MUST: Packages containing GUI applications must include a %{name}.desktop file, and that file must be properly installed with desktop-file-install in the %install section. If you feel that your packaged GUI application does not need a .desktop file, you must put a comment in the spec file with your explanation.


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

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



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

C/C++:
[ ]: Package does not contain kernel modules.
[ ]: 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:
[ ]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[ ]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "Unknown or generated". 43 files have unknown license. Detailed
     output of licensecheck in /home/bhepple/tmp/1878898-nwg-
     launchers/licensecheck.txt
[ ]: License file installed when any subpackage combination is installed.
[ ]: %build honors applicable compiler flags or justifies otherwise.
[ ]: Package contains no bundled libraries without FPC exception.
[ ]: Changelog in prescribed format.
[ ]: 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
[ ]: Package uses nothing in %doc for runtime.
[ ]: Package consistently uses macros (instead of hard-coded directory
     names).
[ ]: Package is named according to the Package Naming Guidelines.
[ ]: Package does not generate any conflict.
[ ]: Package obeys FHS, except libexecdir and /usr/target.
[ ]: If the package is a rename of another package, proper Obsoletes and
     Provides are present.
[ ]: Requires correct, justified where necessary.
[ ]: 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.
[ ]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 20480 bytes in 4 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]: 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:
[ ]: If the source package does not include license text(s) as a separate
     file from upstream, the packager SHOULD query upstream to include it.
[ ]: Final provides and requires are sane (see attachments).
[ ]: Package functions as described.
[ ]: 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.
[ ]: 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.
[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: nwg-launchers-0.3.4-0.1.fc31.x86_64.rpm
          nwg-launchers-debuginfo-0.3.4-0.1.fc31.x86_64.rpm
          nwg-launchers-debugsource-0.3.4-0.1.fc31.x86_64.rpm
          nwg-launchers-0.3.4-0.1.fc31.src.rpm
nwg-launchers.x86_64: W: spelling-error %description -l en_US dmenu -> menu, d menu, madmen
nwg-launchers.x86_64: W: spelling-error %description -l en_US dwm -> dim, dam, DWI
nwg-launchers.x86_64: W: no-manual-page-for-binary nwgbar
nwg-launchers.x86_64: W: no-manual-page-for-binary nwgdmenu
nwg-launchers.x86_64: W: no-manual-page-for-binary nwggrid
nwg-launchers.src: W: spelling-error %description -l en_US dmenu -> menu, d menu, madmen
nwg-launchers.src: W: spelling-error %description -l en_US dwm -> dim, dam, DWI
4 packages and 0 specfiles checked; 0 errors, 7 warnings.




Rpmlint (debuginfo)
-------------------
Checking: nwg-launchers-debuginfo-0.3.4-0.1.fc31.x86_64.rpm
1 packages and 0 specfiles checked; 0 errors, 0 warnings.





Rpmlint (installed packages)
----------------------------
nwg-launchers-debugsource.x86_64: W: invalid-url URL: https://github.com/nwg-piotr/nwg-launchers <urlopen error [Errno -2] Name or service not known>
nwg-launchers.x86_64: W: spelling-error %description -l en_US dmenu -> menu, d menu, madmen
nwg-launchers.x86_64: W: spelling-error %description -l en_US dwm -> dim, dam, DWI
nwg-launchers.x86_64: W: invalid-url URL: https://github.com/nwg-piotr/nwg-launchers <urlopen error [Errno -2] Name or service not known>
nwg-launchers.x86_64: W: no-manual-page-for-binary nwgbar
nwg-launchers.x86_64: W: no-manual-page-for-binary nwgdmenu
nwg-launchers.x86_64: W: no-manual-page-for-binary nwggrid
nwg-launchers-debuginfo.x86_64: W: invalid-url URL: https://github.com/nwg-piotr/nwg-launchers <urlopen error [Errno -2] Name or service not known>
3 packages and 0 specfiles checked; 0 errors, 8 warnings.



Source checksums
----------------
https://github.com/nwg-piotr/nwg-launchers/archive/v0.3.4/nwg-launchers-0.3.4.tar.gz :
  CHECKSUM(SHA256) this package     : e5b333d23f847e67d6c48dc7c834157f3277bdd8a017dab1c00c03c9ad2a0988
  CHECKSUM(SHA256) upstream package : e5b333d23f847e67d6c48dc7c834157f3277bdd8a017dab1c00c03c9ad2a0988


Requires
--------
nwg-launchers (rpmlib, GLIBC filtered):
    libatkmm-1.6.so.1()(64bit)
    libc.so.6()(64bit)
    libcairomm-1.0.so.1()(64bit)
    libgcc_s.so.1()(64bit)
    libgcc_s.so.1(GCC_3.0)(64bit)
    libgdkmm-3.0.so.1()(64bit)
    libglib-2.0.so.0()(64bit)
    libglibmm-2.4.so.1()(64bit)
    libgobject-2.0.so.0()(64bit)
    libgtk-3.so.0()(64bit)
    libgtkmm-3.0.so.1()(64bit)
    libsigc-2.0.so.0()(64bit)
    libstdc++.so.6()(64bit)
    libstdc++.so.6(CXXABI_1.3)(64bit)
    libstdc++.so.6(CXXABI_1.3.9)(64bit)
    rtld(GNU_HASH)

nwg-launchers-debuginfo (rpmlib, GLIBC filtered):

nwg-launchers-debugsource (rpmlib, GLIBC filtered):



Provides
--------
nwg-launchers:
    nwg-launchers
    nwg-launchers(x86-64)

nwg-launchers-debuginfo:
    debuginfo(build-id)
    nwg-launchers-debuginfo
    nwg-launchers-debuginfo(x86-64)

nwg-launchers-debugsource:
    nwg-launchers-debugsource
    nwg-launchers-debugsource(x86-64)



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

Comment 5 Aleksei Bavshin 2020-09-17 02:55:39 UTC
(In reply to Bob Hepple from comment #4)
 
> Tiny quibble - this does not require a .desktop file but there should be a
> comment to that effect in the spec file (I need to do that myself for
> lavalauncher!).

Thanks for review! I'll add a comment before import.
Lavalauncher is not alone in the list of offenders. I've just checked specs for other launchers for minimalistic WMs (rofi, wofi, dmenu and bemenu) and none of them has desktop files or a comment in the spec. Either this rule is too new or it's a commonly ignored one :)

Comment 6 Gwyn Ciesla 2020-09-17 14:18:47 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/nwg-launchers

Comment 7 Fedora Update System 2020-09-18 00:42:53 UTC
FEDORA-2020-da9aac64c2 has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2020-da9aac64c2

Comment 8 Fedora Update System 2020-09-18 00:44:40 UTC
FEDORA-2020-4117e8283b has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-4117e8283b

Comment 9 Fedora Update System 2020-09-18 16:43:12 UTC
FEDORA-2020-4117e8283b 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-4117e8283b \*`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-4117e8283b

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

Comment 10 Fedora Update System 2020-09-18 18:59:53 UTC
FEDORA-2020-da9aac64c2 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 install --enablerepo=updates-testing --advisory=FEDORA-2020-da9aac64c2 \*`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-da9aac64c2

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

Comment 11 Fedora Update System 2020-09-22 07:18:34 UTC
FEDORA-2020-da9aac64c2 has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2020-da9aac64c2

Comment 12 Fedora Update System 2020-09-22 07:19:40 UTC
FEDORA-2020-4117e8283b has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-4117e8283b

Comment 13 Fedora Update System 2020-09-23 15:24:54 UTC
FEDORA-2020-da9aac64c2 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 install --enablerepo=updates-testing --advisory=FEDORA-2020-da9aac64c2 \*`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-da9aac64c2

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

Comment 14 Fedora Update System 2020-09-23 17:21:09 UTC
FEDORA-2020-4117e8283b 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-4117e8283b \*`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-4117e8283b

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

Comment 15 Fedora Update System 2020-09-27 00:15:32 UTC
FEDORA-2020-da9aac64c2 has been pushed to the Fedora 33 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 16 Fedora Update System 2020-10-01 01:27:55 UTC
FEDORA-2020-4117e8283b has been pushed to the Fedora 32 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.