Bug 472060 - Review Request: mumbles - growl like notification system for gnome
Summary: Review Request: mumbles - growl like notification system for gnome
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Christoph Wickert
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-11-18 15:26 UTC by John Anderson
Modified: 2009-01-07 09:12 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-01-07 09:12:30 UTC
Type: ---
Embargoed:
christoph.wickert: fedora-review+
kevin: fedora-cvs+


Attachments (Terms of Use)

Description John Anderson 2008-11-18 15:26:58 UTC
Spec URL: http://dl.getdropbox.com/u/115301/mumbles.spec
SRPM URL: http://dl.getdropbox.com/u/115301/mumbles-0.4-1.fc9.src.rpm

Description: Mumbles is a plugin driven, DBus based notification system written for the Gnome desktop. Similar to libnotify notifications and Growl for OSX, mumbles aims to provide a modern notification system for the GNU/Linux Desktop.

I'd like to point out ahead of time there are two errors about scripts being non-executable in rpmlint. I believe those scripts have the shebang for unit test reasons and are not actually intended to be run, so I've left them as is.

Comment 1 Fabian Affolter 2008-11-19 12:14:42 UTC
Just some quick comments on your spec file.  Some changes will make your life easier in the future because there will be less pain for maintaining ;-)

- You can use 'Source0:	http://downloads.sourceforge.net/%{name}/%{name}-%{version}-1.tar.gz' instead of 'Source0: http://downloads.sourceforge.net/mumbles/mumbles_0.4-1.tar.gz'

- 'BuildRequires: python-devel' should be 'BuildRequires: python'
  https://fedoraproject.org/wiki/Packaging/Python#BuildRequires

- 'BuildRequires: python-setuptools' should be 'BuildRequires:	python-setuptools-devel'
  https://fedoraproject.org/wiki/Packaging/Python/Eggs#Providing_Eggs_using_Setuptools

- Replace '%setup -q -n mumbles-0.4' with '%setup -q -n %{name}-%{version}'

- The vendor tag for .desktop file is no longer used for new packages.
  See https://fedoraproject.org/wiki/TomCallaway/DesktopFileVendor

  Don't forget to change %{_datadir}/applications/fedora-%{name}.desktop

- Add AUTHORS PKG-INFO README to %doc

- Shouldn't '%{_datadir}/%{name}' be '%{_datadir}/%{name}/' and '%{python_sitelib}/mumbles' be '%{python_sitelib}/mumbles/'?
  There is a mixture of macros and the name.

Comment 2 Christoph Wickert 2008-11-19 13:28:46 UTC
John, Fabian, as I'm sponsoring both of you I'd like to take this opportunity for a little lesson in packaging practice ;)

(In reply to comment #1)
> Just some quick comments on your spec file.  Some changes will make your life
> easier in the future because there will be less pain for maintaining ;-)
> 
> - You can use 'Source0:
> http://downloads.sourceforge.net/%{name}/%{name}-%{version}-1.tar.gz' instead
> of 'Source0: http://downloads.sourceforge.net/mumbles/mumbles_0.4-1.tar.gz'

The packaging guidelines state that macros should be used "consistently", but not where ever possible. This means not to mix different macro styles (e.g. %{buildroot} and $RPM_BUILD_ROOT) but it does not mean that every appearance of foo needs to be replaced with %{name}. In this example the only macro that adds real value is %{version}, because you don't need to change the Source0 tag on updates.
Using %{name} would only add value for a packager, who maintains _a_lot_ of packages from sf.net, so he can use the same Source0 tag for all his spec files. In fact I know many packagers, who try to avoid macros in the source url so it can be used by wget and friends more easily. Quote from
http://fedoraproject.org/wiki/Packaging/Guidelines#macros "Having macros in a Source: or Patch: line is a matter of style"

> - Replace '%setup -q -n mumbles-0.4' with '%setup -q -n %{name}-%{version}'

see above: '%setup -q -n mumbles-%{version}' is sufficient

> - Add AUTHORS PKG-INFO README to %doc

Please don't add PKG-INFO, all it's info is in the spec file and thus in 'rpm -i mumbles'

> - Shouldn't '%{_datadir}/%{name}' be '%{_datadir}/%{name}/' and
> '%{python_sitelib}/mumbles' be '%{python_sitelib}/mumbles/'?
>   There is a mixture of macros and the name.

Which is perfectly ok. "Use macros instead of hard-coded directory names" only applies to directories that are covered by one of the macros from 
http://fedoraproject.org/wiki/Packaging/RPMMacros

I hope I have made some things more clearly for both of you. Nevertheless Fabian's comments are all helpful and show that he has read and understood the Guidelines well.

@Fabian: If you continue working like this I will nominate you for becoming a sponsor in the near future.

Comment 3 Christoph Wickert 2008-11-19 14:42:52 UTC
(In reply to comment #2)
> all it's info is in the spec file and thus in 'rpm -i mumbles'

Of course I meant 'rpm -qi mumbles'

Comment 4 John Anderson 2008-11-19 16:45:36 UTC
Thank you both for the comments. I have the updates here.

http://dl.getdropbox.com/u/115301/mumbles.spec
http://dl.getdropbox.com/u/115301/mumbles-0.4-2.fc9.src.rpm

Comment 5 Fabian Affolter 2008-11-20 12:51:54 UTC
...
%install
rm -rf $RPM_BUILD_ROOT
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
...

%{buildroot} and $RPM_BUILD_ROOT should not be mixed.

https://fedoraproject.org/wiki/Packaging/Guidelines#Using_.25.7Bbuildroot.7D_and_.25.7Boptflags.7D_vs_.24RPM_BUILD_ROOT_and_.24RPM_OPT_FLAGS

Comment 7 Fabian Affolter 2008-12-15 00:09:43 UTC
Koji scratch build failed

http://koji.fedoraproject.org/koji/taskinfo?taskID=998544

Comment 8 Christoph Wickert 2008-12-15 00:22:04 UTC
This is due to

Patch0:		mumbles-sitedir.patch
...
%prep
%setup -q -n mumbles-%{version}
%patch -p1

needs to be
%patch0 -p1
      ^

or even better:
%patch0 -p1 -b .sitedir

Backing up patched files is useful for debugging patch problems.

Comment 9 John Anderson 2008-12-21 17:48:13 UTC
Thanks for the help with the patch line, Chris.

Here it is with the fix. Builds in Koji now.

http://koji.fedoraproject.org/koji/taskinfo?taskID=1014172

http://transfer.eragen.com/rpm/mumbles.spec
http://transfer.eragen.com/rpm/mumbles-0.4-4.fc10.src.rpm

Comment 10 Christoph Wickert 2008-12-23 00:17:56 UTC
Does not build in rawhide, because rawhide has python-2.6, but your spec file hardcodes the python version in the %files section:

  %{python_sitelib}/%{name}-%{version}-py2.5.egg-info
                                       ^^^
To make this more flexible replace with

  %{python_sitelib}/%{name}-%{version}-py%{python_version}.egg-info

and add

  %{!?python_version: %define python_version %(%{__python} -c "from distutils.sysconfig import get_python_version; print get_python_version()")}

at the beginning of your spec.

Another small fix: desktop-file-install will complain that the icon in the specfile is specified with file extension although it does not have an absolute path. A little sed fix for the %prep section:

  # small fix to avoid warning from desktop-file-install
  sed -i 's!mumbles.png!mumbles!' bin/mumbles.desktop

Comment 11 John Anderson 2008-12-23 16:35:12 UTC
Thanks again for your help, Chris.

Here it is with your fixes from #10. It builds in mock against rawhide for me.

http://transfer.eragen.com/rpm/mumbles.spec
http://transfer.eragen.com/rpm/mumbles-0.4-5.fc10.src.rpm

Comment 12 Christoph Wickert 2009-01-03 02:13:02 UTC
Sorry it took so long, holydays, etc...

REVIEW for 7d6514c04ab3d2914b6cf971dba30c2c  mumbles-0.4-5.fc10.src.rpm


OK - MUST: 
$ rpmlint /var/lib/mock/fedora-rawhide-i386/result/mumbles-0.4-5.fc11.*
mumbles.noarch: E: non-executable-script /usr/lib/python2.6/site-packages/mumbles/GrowlNetwork.py 0644
mumbles.noarch: E: non-executable-script /usr/lib/python2.6/site-packages/mumbles/Mumbles.py 0644
2 packages and 0 specfiles checked; 2 errors, 0 warnings.
because this python, save to ignore 

OK - MUST: The package is named according to the Package Naming Guidelines.
OK - MUST: The spec file name matches the base package %{name}, in the format %{name}.spec.
FIX - MUST: The package does not meet the Packaging Guidelines:
 - IMO Group tag should be 'User Interface/Desktops' instead of 'System Environment/Libraries'
 - Timestamp of Source0 does not match, see
 https://fedoraproject.org/wiki/Packaging/Guidelines#Timestamps

OK - MUST: The package is licensed with a Fedora approved license (GPLv2) and meets the Licensing Guidelines. Note: GrowlNetwork.py is BSD
OK - MUST: The License field in the package spec file matches the actual license.
OK - MUST: The license file from the source package is included in %doc.
OK - MUST: The spec file is in American English.
OK - MUST: The spec file for the is legible.
OK - MUST: The sources used to build the package matches the upstream source by MD5 a6b24223dc23e5022332586ffc454e84
OK - MUST: The package successfully compiles and builds into binary rpms on i386
N/A - MUST: If the package does not successfully compile, build or work on an architecture, then those architectures should be listed in the spec in ExcludeArch.
OK - MUST: All build dependencies are listed in BuildRequires.
N/A - MUST: The spec file handles locales properly with the %find_lang macro.
N/A - MUST: Every binary RPM package (or subpackage) which stores shared library files (not just symlinks) in any of the dynamic linker's default paths, must call ldconfig in %post and %postun. [10]
N/A - MUST: If the package is designed to be relocatable, the packager must state this fact in the request for review, along with the rationalization for relocation of that specific package. Without this, use of Prefix: /usr is considered a blocker.
OK - MUST: The package owns all directories that it creates.
OK - MUST: The package does not contain any duplicate files in the %files listing.
OK - MUST: Permissions on files are set properly. The %files section includes a %defattr(...) line.
OK - MUST: The package has a %clean section, which contains rm -rf %{buildroot}.
OK - MUST: The package consistently uses macros, as described in the macros section of Packaging Guidelines .
OK - MUST: The package contains code.
N/A - MUST: Large documentation files should go in a -doc subpackage. (The definition of large is left up to the packager's best judgement, but is not restricted to size. Large can refer to either size or quantity)
OK - MUST: Files included as %doc do not affect the runtime of the application.
N/A - MUST: Header files must be in a -devel package.
N/A - MUST: Static libraries must be in a -static package.
N/A - MUST: Packages containing pkgconfig(.pc) files must 'Requires: pkgconfig' (for directory ownership and usability).
N/A - MUST: If a package contains library files with a suffix (e.g. libfoo.so.1.1), then library files that end in .so (without suffix) must go in a -devel package.
N/A - MUST: In the vast majority of cases, devel packages must require the base package using a fully versioned dependency: Requires: %{name} = %{version}-%{release}
OK - MUST: The package does not contain any .la libtool archives.
FIX - MUST: The Package contains a GUI application and includes a %{name}.desktop file, and that file is properly installed with desktop-file-install in the %install section. But the file needs to be fixed, the category "Application" is obsolete according to latest fdo specs, see
http://standards.freedesktop.org/menu-spec/latest/apa.html
Add --remove-category="Application" to desktop-file-install
You should also add-category="Gnome"
OK - MUST: The packages does not own files or directories already owned by other packages.
OK - MUST: At the beginning of %install, the package runs rm -rf %{buildroot}.
OK - MUST: All filenames in rpm packages must be valid UTF-8.
N/A - SHOULD: If the source package does not include license text(s) as a separate file from upstream, the packager SHOULD query upstream to include it.
N/A - SHOULD: The description and summary sections in the package spec file should contain translations for supported Non-English languages, if available.
OK - SHOULD: The reviewer should test that the package builds in mock. See MockTricks for details on how to do this.
OK - SHOULD: The package compiles and builds into noarch rpms
OK - SHOULD: The package functions as described.
FIX - SHOULD: Scriptlets are sane, but update-desktop-database if not needed, because mumbles.desktop contains no MimeType, see
https://fedoraproject.org/wiki/Packaging/ScriptletSnippets#desktop-database
N/A - SHOULD: Usually, subpackages other than devel should require the base package using a fully versioned dependency.
N/A - SHOULD: The placement of pkgconfig(.pc) files depends on their usecase, and this is usually for development purposes, so should be placed in a -devel pkg. A reasonable exception is that the main pkg itself is a devel tool not installed in a user runtime, e.g. gcc or gdb.
OK - SHOULD: The package has no file dependencies outside of /etc, /bin, /sbin, /usr/bin, or /usr/sbin.

Package looks good so far, but needs some final fixes before I will approve it.

BTW: The 'trick' from comment # 10 is not really necessary, 
%{python_sitelib}/%{name}-%{version}-py*.egg-info will also work.

Comment 13 Christoph Wickert 2009-01-03 02:25:08 UTC
Regarding the desktop file: You should also add. Seem like you already remove 'Application' from Categories, seems like my browser had the file still cached, sorry. You could also add '--add-category=GNOME;GTK'

Comment 14 Christoph Wickert 2009-01-03 02:38:40 UTC
(Sorry, hit the Commit button to fast)

The package also 'Requires: dbus', because dbus-python only pulls in dbus-libs, not dbus itself.

Comment 15 Christoph Wickert 2009-01-03 03:08:26 UTC
You should consider adding mumbles to the default Gnome and Xfce sessions:

desktop-file-install	\
	--dir %{buildroot}%{_sysconfdir}/xdg/autostart	\
	--copy-name-to-generic-name			\
	--remove-category=Application			\
	--add-category="GNOME;GTK;TrayIcon;"		\
	--add-only-show-in="GNOME;XFCE;"		\
	%{buildroot}%{_datadir}/applications/%{name}.desktop

Comment 17 Christoph Wickert 2009-01-03 23:31:22 UTC
AFIACS everything is fine except the desktop-file-install. The starter from comment # 15 was meant as an addition to the starter in the menu.

Comment 18 Christoph Wickert 2009-01-03 23:32:31 UTC
This mean you need to run desktop-file-install twice.

Comment 19 John Anderson 2009-01-04 02:57:18 UTC
Ah, I see now whats going on there. Thanks for the clarification.

Here it is with both desktop-file-installs. I believe this is correct.

http://transfer.eragen.com/rpm/mumbles.spec
http://transfer.eragen.com/rpm/mumbles-0.4-7.fc10.src.rpm

Comment 20 Christoph Wickert 2009-01-04 03:25:14 UTC
Ok, that's fine with me, but you should also add GNOME and GTK in the first desktop-file-install. But you can do this after import, this package is

APPROVED

Good work!

Comment 21 John Anderson 2009-01-04 03:38:12 UTC
New Package CVS Request
=======================
Package Name: mumbles
Short Description: growl like notification system for GNOME
Owners: janderson
Branches: F-10
InitialCC:

Comment 22 Kevin Fenzi 2009-01-04 20:19:06 UTC
cvs done.

Comment 23 Fedora Update System 2009-01-04 21:23:30 UTC
mumbles-0.4-8.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/mumbles-0.4-8.fc10

Comment 24 Fedora Update System 2009-01-07 09:12:25 UTC
mumbles-0.4-8.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, 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.