Bug 1750047

Summary: Review Request: mate-optimus - NVIDIA Optimus GPU switcher
Product: [Fedora] Fedora Reporter: Artem <ego.cordatus>
Component: Package ReviewAssignee: Vitaly <vitaly>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: fedora, package-review, vitaly
Target Milestone: ---Flags: vitaly: fedora-review+
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-09-19 01:29: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:

Comment 4 Vitaly 2019-09-08 17:52:42 UTC
I will review this package.

1. Fix shebang, because /usr/bin/env is not allowed.
2. Remove duplicate dependency Requires: python3.
3. Use boolean dependecies: "Suggests:gnome-shell-extension-appindicator" -> "Recommends: gnome-shell-extension-appindicator if gnome-shell" or "Supplements: gnome-shell".
4. Add symbolic links offload-glx and offload-vulkan to main script mate-optimus-applet.
5. "Recommends: akmod-nvidia >= 435.17" -> "Recommends: xorg-x11-drv-nvidia >= 435.17".
6. Fix path to launcher in %description.
7. Add "Requires: libnotify".

Comment 7 Vitaly 2019-09-09 12:48:21 UTC
Package Review
==============

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



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

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". 9 files have unknown license.
[x]: Package contains no bundled libraries without FPC exception.
[x]: Changelog in prescribed format.
[x]: Sources contain only permissible code or content.
[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.
[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.
[x]: Package contains systemd file(s) if in need.
[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]: 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]: 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.
[x]: 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]: 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 all installed packages.
     Note: There are rpmlint messages (see attachment).
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: mate-optimus-19.10.3-3.fc32.noarch.rpm
          mate-optimus-19.10.3-3.fc32.src.rpm
mate-optimus.noarch: E: explicit-lib-dependency libappindicator-gtk3
mate-optimus.noarch: E: explicit-lib-dependency libnotify
mate-optimus.noarch: W: non-conffile-in-etc /etc/xdg/autostart/mate-optimus.desktop
mate-optimus.noarch: W: no-manual-page-for-binary mate-optimus-applet
mate-optimus.noarch: W: no-manual-page-for-binary offload-glx
mate-optimus.noarch: W: no-manual-page-for-binary offload-vulkan
mate-optimus.src: W: no-%build-section
2 packages and 0 specfiles checked; 2 errors, 5 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 = "en_US.utf8"
    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 = "en_US.utf8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
mate-optimus.noarch: E: explicit-lib-dependency libappindicator-gtk3
mate-optimus.noarch: E: explicit-lib-dependency libnotify
mate-optimus.noarch: W: invalid-url URL: https://github.com/ubuntu-mate/mate-optimus <urlopen error [Errno -2] Name or service not known>
mate-optimus.noarch: W: non-conffile-in-etc /etc/xdg/autostart/mate-optimus.desktop
mate-optimus.noarch: W: no-manual-page-for-binary mate-optimus-applet
mate-optimus.noarch: W: no-manual-page-for-binary offload-glx
mate-optimus.noarch: W: no-manual-page-for-binary offload-vulkan
1 packages and 0 specfiles checked; 2 errors, 5 warnings.



Source checksums
----------------
https://github.com/ubuntu-mate/mate-optimus/archive/19.10.3/mate-optimus-19.10.3.tar.gz :
  CHECKSUM(SHA256) this package     : 2a79d40165d2b0b96b83e89cbd42c6a71848937823c552824a148fda45116287
  CHECKSUM(SHA256) upstream package : 2a79d40165d2b0b96b83e89cbd42c6a71848937823c552824a148fda45116287


Requires
--------
mate-optimus (rpmlib, GLIBC filtered):
    /usr/bin/python3
    glew
    hicolor-icon-theme
    libappindicator-gtk3
    libnotify
    python3-gobject
    python3-setproctitle



Provides
--------
mate-optimus:
    application()
    application(mate-optimus.desktop)
    mate-optimus



Generated by fedora-review 0.7.2 (65d36bb) last change: 2019-04-09
Command line :/usr/bin/fedora-review -b 1750047 -m fedora-rawhide-x86_64
Buildroot used: fedora-rawhide-x86_64
Active plugins: Generic, Shell-api
Disabled plugins: SugarActivity, Haskell, Java, C/C++, PHP, Python, Perl, Ocaml, fonts, R
Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH

Comment 8 Vitaly 2019-09-09 12:49:31 UTC
LGTM now. Package approved.

Comment 10 Gwyn Ciesla 2019-09-09 14:48:46 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/mate-optimus

Comment 11 Fedora Update System 2019-09-09 15:26:32 UTC
FEDORA-2019-677cb60b49 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-677cb60b49

Comment 12 Fedora Update System 2019-09-09 15:34:17 UTC
FEDORA-EPEL-2019-3b60eecbf1 has been submitted as an update to Fedora EPEL 8. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2019-3b60eecbf1

Comment 13 Fedora Update System 2019-09-09 20:03:25 UTC
FEDORA-2019-d432f6be51 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-d432f6be51

Comment 14 Fedora Update System 2019-09-11 02:58:38 UTC
mate-optimus-19.10.3-4.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-677cb60b49

Comment 15 Fedora Update System 2019-09-11 04:16:52 UTC
mate-optimus-19.10.3-5.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-d432f6be51

Comment 16 Fedora Update System 2019-09-11 06:07:17 UTC
mate-optimus-19.10.3-4.el8 has been pushed to the Fedora EPEL 8 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2019-3b60eecbf1

Comment 17 Fedora Update System 2019-09-19 01:29:41 UTC
mate-optimus-19.10.3-4.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.

Comment 18 Fedora Update System 2019-09-19 01:52:35 UTC
mate-optimus-19.10.3-5.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.

Comment 19 Fedora Update System 2019-09-26 00:08:52 UTC
mate-optimus-19.10.3-4.el8 has been pushed to the Fedora EPEL 8 stable repository. If problems still persist, please make note of it in this bug report.

Comment 20 Wolfgang Ulbrich 2019-09-26 18:01:46 UTC
Why depending on gnome-shell-extension-appindicator?
This looks complete worse!
I don't see any dependency to gnome-hell in ubuntu-mate upstream.
https://github.com/ubuntu-mate/mate-optimus/blob/master/README.md

Source

You'll need the following dependencies:

    gir1.2-gtk-3.0
    gir1.2-notify-0.7
    glew-utils
    python3
    python3-gi
    python3-setproctitle

Sorry, but in this state i can't add it to Mate group at comps or mate-compiz spin.
This will pull in a bunch of dependencies to gnome which aren't needed.

Comment 21 Artem 2019-09-26 18:06:07 UTC
(In reply to Wolfgang Ulbrich from comment #20)
> Why depending on gnome-shell-extension-appindicator?

It is not depending on gnome-shell, it is install as weak dependency 'gnome-shell-extension-appindicator' only if you **already have GNOME**. If it works not as intended then this is a bug.

Comment 22 Vitaly 2019-09-26 18:15:21 UTC
> Why depending on gnome-shell-extension-appindicator? This looks complete worse!

It use weak dependencies to install shell tray support plugin only if user already has Gnome Shell installed.

Feel free to add it to Mate spin. It should work fine.

Comment 23 Wolfgang Ulbrich 2019-09-26 18:26:32 UTC
(In reply to Vitaly Zaitsev from comment #22)
> > Why depending on gnome-shell-extension-appindicator? This looks complete worse!
> 
> It use weak dependencies to install shell tray support plugin only if user
> already has Gnome Shell installed.

Why should someone add a mate package to gnome-hell?

`dnf install mate-optimus` pulls in gnome-shell-extension-appindicator in mate-session.

> 
> Feel free to add it to Mate spin. It should work fine.

Sorry, i can't increase size of MATe-Compiz spin with needless packages from gnome.

Btw. i am Mate and Mate-ubuntu upstream, we don't add gnome dependencies which aren't needed.
Any way, the package doesn't work here.
https://bugzilla.redhat.com/show_bug.cgi?id=1756028

Comment 24 Artem 2019-09-26 18:29:20 UTC
(In reply to Wolfgang Ulbrich from comment #23)
> `dnf install mate-optimus` pulls in gnome-shell-extension-appindicator in mate-session.

This definitely not work as intended. :( I'll fix this for sure.

Comment 25 Vitaly 2019-09-26 18:30:35 UTC
> Why should someone add a mate package to gnome-hell?

This is a boolean weak dependency. It will install plugin **only** if user has Gnome Shell installed.

> `dnf install mate-optimus` pulls in gnome-shell-extension-appindicator in mate-session.

No. It will not. If so, please report bug to dnf.