Bug 1226719 - Review Request: menulibre - FreeDesktop.org compliant menu editor
Summary: Review Request: menulibre - FreeDesktop.org compliant menu editor
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Orion Poplawski
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-05-31 21:27 UTC by mk
Modified: 2016-03-13 22:56 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2016-03-13 22:56:34 UTC
Type: ---
Embargoed:
orion: fedora-review+


Attachments (Terms of Use)

Description mk 2015-05-31 21:27:29 UTC
Spec URL: https://www.acc.umu.se/~mk/fedora/menulibre/20150531T2115/menulibre.spec
SRPM URL: https://www.acc.umu.se/~mk/fedora/menulibre/20150531T2115/menulibre-2.0.6-1.fc22.src.rpm
Description: MenuLibre is a graphical FreeDesktop.org compliant menu editor that lets you edit menu entries.
Fedora Account System Username: marcusk
Koji build URL: http://koji.fedoraproject.org/koji/taskinfo?taskID=9899336

I have not submitted a package before and is seeking a sponsor.

Comment 1 Orion Poplawski 2015-07-13 19:14:31 UTC
Package Review
==============

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


Issues:
=======
- 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.
  Note: License file COPYING is marked as %doc instead of %license
  See:
  http://fedoraproject.org/wiki/Packaging/LicensingGuidelines#License_Text
- Need to own %{datadir}/menulibre,  change:

%{_datadir}/menulibre/ui/MenulibreWindow.ui

to

%{_datadir}/menulibre/

- BR python3 is redundant and not needed
- Remove %clean
- Fix rpmlint errors

===== 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: "GPL (v3)". Detailed output of licensecheck in
     /export/home/orion/redhat/1226719-menulibre/licensecheck.txt
[x]: Package requires other packages for directories it uses.
     Note: No known owner of /usr/share/menulibre, /usr/share/menulibre/ui
[!]: Package must own all directories that it creates.
     Note: Directories without known owners: /usr/share/menulibre,
     /usr/share/menulibre/ui
[x]: Package contains no bundled libraries without FPC exception.
[x]: Changelog in prescribed format.
[x]: Sources contain only permissible code or content.
[-]: Development files must be in a -devel package
[x]: Package uses nothing in %doc for runtime.
[x]: The spec file handles locales properly.
[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]: gtk-update-icon-cache is invoked in %postun and %posttrans if package
     contains icons.
     Note: icons in menulibre
[x]: 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 51200 bytes in 5 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.
[!]: Rpmlint is run on all rpms the build produces.
     Note: There are rpmlint messages (see attachment).
[x]: Package does not own files or directories owned by other packages.
[x]: All build dependencies are listed in BuildRequires, except for any
     that are listed in the exceptions section of Packaging Guidelines.
[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 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

Python:
[x]: Python eggs must not download any dependencies during the build
     process.
[x]: A package which is used by another package via an egg interface should
     provide egg info.
[x]: Package meets the Packaging Guidelines::Python
[x]: Package contains BR: python2-devel or python3-devel
[x]: Binary eggs must be removed in %prep

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

Generic:
[!]: Package has no %clean section with rm -rf %{buildroot} (or
     $RPM_BUILD_ROOT)
     Note: %clean present but not required
[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.
[x]: Package does not include license text files separate from upstream.
[x]: Patches link to upstream bugs/comments/lists or are otherwise
     justified.
[-]: 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.
[-]: %check is present and all tests pass.
[x]: Packages should try to preserve timestamps of original installed
     files.
[x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: Sources can be downloaded from URI in Source: tag
[x]: Reviewer should test that the package builds in mock.
[x]: Buildroot is not present
[x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[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: menulibre-2.0.6-1.fc23.noarch.rpm
          menulibre-2.0.6-1.fc23.src.rpm
menulibre.noarch: E: non-executable-script /usr/lib/python3.4/site-packages/menulibre_lib/helpers.py 0644L /usr/bin/python3
menulibre.noarch: E: non-executable-script /usr/lib/python3.4/site-packages/menulibre/MenulibreXdg.py 0644L /usr/bin/python3
menulibre.noarch: E: non-executable-script /usr/lib/python3.4/site-packages/menulibre/MenuEditor.py 0644L /usr/bin/python3
menulibre.noarch: E: non-executable-script /usr/lib/python3.4/site-packages/menulibre_lib/__init__.py 0644L /usr/bin/python3
menulibre.noarch: E: non-executable-script /usr/lib/python3.4/site-packages/menulibre_lib/menulibreconfig.py 0644L /usr/bin/python3
menulibre.noarch: E: non-executable-script /usr/lib/python3.4/site-packages/menulibre/__init__.py 0644L /usr/bin/python3
menulibre.noarch: E: non-executable-script /usr/lib/python3.4/site-packages/menulibre/util.py 0644L /usr/bin/python3
menulibre.noarch: E: non-executable-script /usr/lib/python3.4/site-packages/menulibre/XmlMenuElementTree.py 0644L /usr/bin/python3
menulibre.noarch: E: non-executable-script /usr/lib/python3.4/site-packages/menulibre/MenulibreApplication.py 0644L /usr/bin/python3
2 packages and 0 specfiles checked; 9 errors, 0 warnings.




Rpmlint (installed packages)
----------------------------
sh: /usr/bin/python: No such file or directory
menulibre.noarch: E: non-executable-script /usr/lib/python3.4/site-packages/menulibre/MenulibreApplication.py 644 /usr/bin/python3
menulibre.noarch: E: non-executable-script /usr/lib/python3.4/site-packages/menulibre/XmlMenuElementTree.py 644 /usr/bin/python3
menulibre.noarch: E: non-executable-script /usr/lib/python3.4/site-packages/menulibre_lib/helpers.py 644 /usr/bin/python3
menulibre.noarch: E: non-executable-script /usr/lib/python3.4/site-packages/menulibre/util.py 644 /usr/bin/python3
menulibre.noarch: E: non-executable-script /usr/lib/python3.4/site-packages/menulibre/MenulibreXdg.py 644 /usr/bin/python3
menulibre.noarch: E: non-executable-script /usr/lib/python3.4/site-packages/menulibre_lib/__init__.py 644 /usr/bin/python3
menulibre.noarch: E: non-executable-script /usr/lib/python3.4/site-packages/menulibre/MenuEditor.py 644 /usr/bin/python3
menulibre.noarch: E: non-executable-script /usr/lib/python3.4/site-packages/menulibre/__init__.py 644 /usr/bin/python3
menulibre.noarch: E: non-executable-script /usr/lib/python3.4/site-packages/menulibre_lib/menulibreconfig.py 644 /usr/bin/python3
1 packages and 0 specfiles checked; 9 errors, 1 warnings.



Requires
--------
menulibre (rpmlib, GLIBC filtered):
    /bin/sh
    /usr/bin/python3
    gnome-menus
    gtk3
    python(abi)
    python3-psutil



Provides
--------
menulibre:
    application()
    application(menulibre.desktop)
    menulibre



Source checksums
----------------
https://launchpad.net/menulibre/2.0/2.0.6/+download/menulibre-2.0.6.tar.gz :
  CHECKSUM(SHA256) this package     : 6ee70b11e35c60dc2ee73b96ee494927f708264549bf4432f1cdb43e13ca26c4
  CHECKSUM(SHA256) upstream package : 6ee70b11e35c60dc2ee73b96ee494927f708264549bf4432f1cdb43e13ca26c4


Generated by fedora-review 0.5.3 (bcf15e3) last change: 2015-05-04
Command line :/bin/fedora-review -b 1226719
Buildroot used: fedora-rawhide-x86_64
Active plugins: Python, Generic, Shell-api
Disabled plugins: Java, C/C++, fonts, SugarActivity, Ocaml, Perl, Haskell, R, PHP, Ruby
Disabled flags: EXARCH, DISTTAG, EPEL5, BATCH, EPEL6

Comment 2 mk 2015-07-20 18:49:44 UTC
Thank you for doing the review. I have updated the spec file and I believe that the issues should be resolved now.

Updated spec URL: http://www.acc.umu.se/~mk/fedora/menulibre/20150720T1815/menulibre.spec
Updated SRPM URL: http://www.acc.umu.se/~mk/fedora/menulibre/20150720T1815/menulibre-2.0.6-1.fc22.src.rpm


Changes:

- License file COPYING has been marked as %license and removed from %doc.
- Package now owns the %{datadir}/menulibre directory.
- BR python3 has been removed.
- The %clean section has been removed.
- Hashbang lines are removed from files in %{python3_sitelib}/menulibre{,_lib}, resolving the rpmlint issues. These files are not supposed to be invoked directly, so opting to remove the hashbang instead of marking the files as executable.


rpmlint:

rpmlint menulibre.spec menulibre-2.0.6-1.fc22.noarch.rpm menulibre-2.0.6-1.fc22.src.rpm menulibre
3 packages and 1 specfiles checked; 0 errors, 0 warnings.


diff -u 20150531T2115/menulibre.spec 20150720T1815/menulibre.spec
--- 20150531T2115/menulibre.spec	2015-05-31 23:17:15.983984688 +0200
+++ 20150720T1815/menulibre.spec	2015-07-20 20:17:41.864882650 +0200
@@ -12,7 +12,6 @@
 BuildRequires:  desktop-file-utils
 BuildRequires:  gettext
 BuildRequires:  intltool
-BuildRequires:  python3
 BuildRequires:  python3-devel
 BuildRequires:  python3-distutils-extra
 Requires:       gnome-menus
@@ -35,6 +34,14 @@
 
 %install
 %{__python3} setup.py install --root=%{buildroot}
+
+# Remove hashbang line from non-executable library files
+for lib in %{buildroot}%{python3_sitelib}/menulibre{,_lib}/*.py; do
+    sed '1{\@^#!/usr/bin/python3@d}' $lib > $lib.new &&
+    touch -r $lib $lib.new &&
+    mv $lib.new $lib
+done
+
 desktop-file-validate %{buildroot}/%{_datadir}/applications/menulibre.desktop
 %find_lang %{name}
 
@@ -50,11 +57,9 @@
 %posttrans
 gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 
-%clean
-rm -rf %{buildroot}
-
 %files -f %{name}.lang
-%doc AUTHORS COPYING NEWS PKG-INFO README
+%doc AUTHORS NEWS PKG-INFO README
+%license COPYING
 %{_bindir}/%{name}
 %{_datadir}/applications/menulibre.desktop
 %{_datadir}/icons/hicolor/16x16/apps/menulibre.svg
@@ -63,7 +68,7 @@
 %{_datadir}/icons/hicolor/48x48/apps/menulibre.svg
 %{_datadir}/icons/hicolor/64x64/apps/menulibre.svg
 %{_datadir}/icons/hicolor/scalable/apps/menulibre.svg
-%{_datadir}/menulibre/ui/MenulibreWindow.ui
+%{_datadir}/menulibre/
 %{_datadir}/pixmaps/menulibre.png
 %{_mandir}/man1/menulibre.1.gz
 %{python3_sitelib}/menulibre

Comment 3 Orion Poplawski 2015-10-06 02:04:24 UTC
Looks good.  Approved.  You may want to check out the latest python packaging guidelines for some updates.  Sorry for the delay.

Comment 4 mk 2015-10-08 17:57:20 UTC
Thanks Orion for the review. :-)
I'll take a look at the guidelines.

Comment 5 Mukundan Ragavan 2016-03-13 22:56:34 UTC
Closing this bug since this review is done, package has been imported and built on koji and I see no pending activity.


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