Bug 528096

Summary: Review Request: kmagnet - KDE puzzle game with built in editor
Product: [Fedora] Fedora Reporter: Ryan Rix <ry>
Component: Package ReviewAssignee: Kevin Kofler <kevin>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: fedora-package-review, kevin, notting, rdieter, thomasj
Target Milestone: ---Flags: kevin: fedora-review+
kevin: fedora-cvs+
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 0.03-5.fc10 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-10-27 21:25:39 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ryan Rix 2009-10-09 03:08:15 UTC
Spec URL: http://rrix.fedorapeople.org/kmagnet/kmagnet.spec
SRPM URL: http://rrix.fedorapeople.org/kmagnet/kmagnet-0.02-1.fc11.src.rpm
Description: 
Kmagnet is a simple puzzle game with a built-in puzzle editor. Basically you 
can move the ball up down left or right and it stops when it finds an 
obstacle or arrives to a hole. To win the ball has to arrive to a hole.

[rrix@TheSwan rpmbuild]$ rpmlint RPMS/i586/kmagnet-0.02-1.fc11.i586.rpm
1 packages and 0 specfiles checked; 0 errors, 0 warnings.
[rrix@TheSwan rpmbuild]$ rpmlint SPECS/kmagnet.spec
0 packages and 1 specfiles checked; 0 errors, 0 warnings.

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

Need sponsor.

Comment 1 Thomas Janssen 2009-10-09 07:06:00 UTC
A few quick comments:

gcc-c++ is part of the minimal build environment.
http://fedoraproject.org/wiki/Packaging/Guidelines#BuildRequires
cmake is even in F10 >= 2.6.0 and that's the oldest supported release.
You can remove both.

Your >= versioning is unneeded since we ship versions greater than those the program needs in all supported fedora versions.
(BuildRequires:  qt4-devel >= 4.4.0 kdelibs4-devel >= 4.1 kdegames-devel >= 4.4.0
Requires:       kdelibs4 >= 4.1 qt4 >= 4.4.0)

kdelibs requires qt anyways, so no need for the qt4 in Requires

Same in buildrequires, kdelibs4-devel requires qt4-devel. And kdegames-devel requires kdelibs4-devel. So it's enough to have kdegames-devel in BuildRequires.

No need for VERBOSE=1 with make.

Dont use full path in % files section. Use macros.

%{_kde4_docdir}/HTML/en/%{name}/*

%doc is empty. Fill it with AUTHORS ChangeLog README COPYING TODO

You have to run desktop-file-validate for your .desktop file.

You're missing icon code snippets:

%post 
touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :

%postun
if [ $1 -eq 0 ] ; then
   touch --no-create %{_kde4_iconsdir}/hicolor &>/dev/null
   gtk-update-icon-cache %{_kde4_iconsdir}/hicolor &>/dev/null || :
   update-desktop-database -q &> /dev/null
   update-mime-database %{_kde4_datadir}/mime &> /dev/null
fi

%posttrans
gtk-update-icon-cache %{_kde4_iconsdir}/hicolor &> /dev/null || :
update-desktop-database -q &> /dev/null
update-mime-database %{_kde4_datadir}/mime &> /dev/null

-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers

Comment 2 Kevin Kofler 2009-10-10 05:15:26 UTC
I'm taking this as the sponsor and official reviewer. Thanks to Thomas Janssen for the prereviewing. Ryan, can you please update your specfile to address his comments?

Comment 3 Kevin Kofler 2009-10-10 05:18:10 UTC
> No need for VERBOSE=1 with make.

We've been asked to add this to get build commands into build.log, so this has probably made its way into various templates, but these days the %cmake and %cmake_kde4 macros already set verbose mode (for the same reason), so it is indeed unnecessary to set it again in the make line.

Comment 4 Ryan Rix 2009-10-10 05:46:05 UTC
>You have to run desktop-file-validate for your .desktop file.

Addressed.

>So it's enough to have kdegames-devel in BuildRequires.

[rrix@TheSwan rpmbuild]$ rpmlint RPMS/i586/kmagnet-0.02-2.fc11.i586.rpm
1 packages and 0 specfiles checked; 0 errors, 0 warnings.

I assume that because rpmlint errs on Requires: kdelibs4, that the soname dependencies autogenerate that Requires. That leaves me with only a BuildRequires on kdegames-devel. Is this correct?


* Fri Oct 9 2009 Ryan Rix < phrkonaleash [AT] gmail dot com > - 0.02-2
- Fixed Requires and BuildRequires
- Removed VERBOSE=1 from Makefile
- Sane use of macros in files section
- Added documentation
- Added icon code snippets

[rrix@TheSwan rpmbuild]$ rpmlint RPMS/i586/kmagnet-0.02-2.fc11.i586.rpm
1 packages and 0 specfiles checked; 0 errors, 0 warnings.

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

Updated SPEC and SRPM:
http://rrix.fedorapeople.org/kmagnet/kmagnet.spec
http://rrix.fedorapeople.org/kmagnet/kmagnet-0.02-2.fc11.src.rpm

Comment 5 Kevin Kofler 2009-10-10 06:25:41 UTC
Taking review.

Comment 6 Kevin Kofler 2009-10-10 06:30:24 UTC
I haven't run the full checklist yet, so I may find more issues, but at a first glance:
* Please remove the redundant desktop-file-install call above your desktop-file-validate call. They both do the same thing (as the file is already installed) and desktop-file-validate is the simpler solution there.
* You're still trying to use %{_desktopdir} which is not defined anywhere.
* Please use %{_kde4_appsdir} instead of %{_kde4_datadir}/kde4/apps.

Comment 7 Ryan Rix 2009-10-10 23:01:22 UTC
* Sat Oct 10 2009 Ryan Rix < phrkonaleash [AT] gmail dot com > - 0.02-3
- Removed redundant call to desktop-file-install
- Changed one %files entry to use %{_kde4_appsdir}

http://rrix.fedorapeople.org/kmagnet/kmagnet.spec
http://rrix.fedorapeople.org/kmagnet/kmagnet-0.02-3.fc11.src.rpm

Comment 8 Ryan Rix 2009-10-17 03:28:01 UTC
* Fri Oct 16 2009 Ryan Rix < phrkonaleash [AT] gmail dot com > - 0.03-4
- Update to 0.03
- Upstream changed name to kMagnet
- Added a patch to fix .desktop file

http://rrix.fedorapeople.org/kmagnet/kmagnet.spec
http://rrix.fedorapeople.org/kmagnet/kmagnet-0.03-4.fc11.src.rpm

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

Comment 9 Kevin Kofler 2009-10-17 04:23:55 UTC
I had a cursory look, looks good so far, more details after sleeping. :-)

Comment 10 Kevin Kofler 2009-10-18 03:52:26 UTC
First step: rpmlint run:
kmagnet.src:86: W: macro-in-%changelog files
(no output for the binary and debuginfo RPMs).

You have this in the changelog:
- Changed one %files entry to use %{_kde4_appsdir}
You should escape those % signs, as in:
- Changed one %%files entry to use %%{_kde4_appsdir}

Comment 11 Kevin Kofler 2009-10-18 04:39:45 UTC
MUST Items:
! rpmlint output:
  macros in changelog need fixing
+ named and versioned according to the Package Naming Guidelines
+ spec file name matches base package name
+ Packaging Guidelines:
  + License: GPLv3+ valid, matches actual license
  + No known patent problems
  + No emulator, no firmware, no binary-only or prebuilt components
  + Complies with the FHS
  + proper changelog, tags, BuildRoot, BuildRequires, Summary, Description
  + no non-UTF-8 characters
  + all relevant documentation included as %doc
  + RPM_OPT_FLAGS are used (%cmake_kde4 macro)
  + debuginfo package is valid
  + no static libraries nor .la files
  + no duplicated system libraries
  + no rpaths
  + no configuration files, so %config guideline doesn't apply
  + no init scripts, so init script guideline doesn't apply
  + .desktop file for the GUI app kmagnet present
  + desktop-file-validate is used in %install and the .desktop file passes validation
  + no timestamp-clobbering file commands
  + _smp_mflags used
  ! scriptlets are sane, but contain unnecessary lines (see SHOULD items)
  + not a web application, so web application guideline doesn't apply
  + no conflicts
+ complies with all the legal guidelines
+ COPYING packaged as %doc (but it's the wrong one, see SHOULD items)
+ source matches upstream:
  MD5: 1e996f149ea0a9fe11c73191a582088b
  SHA1: f6a24f5065802a5aebaf6f1fc6d8054ceef2705f
  SHA256: 0681cf46e31b96faaaeec80779faf0f7570609708eabbca2f12f0a5d6f41ae72
+ builds on at least one arch (F13 Koji scratch build)
+ no known non-working arches, so no ExcludeArch needed
+ no missing BuildRequires (builds in mock)
+ no translations, so translation/locale guidelines don't apply
+ no shared libraries, so no ldconfig calls neeed
+ no duplicated system libraries
+ package not relocatable
! ownership not correct:
  + doesn't own directories owned by another package, but...
  ! doesn't own 2 package-specific directories it should own:
    %{_kde4_docdir}/HTML/en/%{name}/
    %{_kde4_appsdir}/kMagnet/
    please remove the * at the end of those lines, you want to own the whole directories, not just their contents!
+ no duplicate files in %files
+ permissions correct, defattr used correctly
+ %clean section present and correct
+ macros used where possible
+ no non-code content
+ no large documentation files, so no -doc package needed
+ no %doc files required at runtime
+ no header files which would need to be in a -devel subpackage
+ no static libraries, so no -static package needed
+ no .pc files, so no Requires: pkgconfig needed
+ no devel symlinks which would need to be in a -devel subpackage
+ no -devel package, so "In the vast majority of cases, devel packages must require the base package using a fully versioned dependency: Requires: %{name} = %{version}-%{release}" is irrelevant
+ no .la files
+ .desktop file for the GUI app kmagnet present
+ desktop-file-validate is used in %install and the .desktop file passes validation
+ buildroot is deleted at the beginning of %install
+ all filenames are valid UTF-8

SHOULD Items:
! license file: upstream is including a copy of the GPLv2 when the license headers actually reference the GPLv3+! So the COPYING upstream is shipping does not actually apply. Please ask upstream to fix this, as per SHOULD item: "If the source package does not include license text(s) as a separate file from upstream, the packager SHOULD query upstream to include it." But, as per "MUST: 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 must be included in %doc.", it is OK to ship a package without a copy of the license if upstream doesn't include it, so this is not a review blocker.
+ no translations for description and summary provided by upstream
+ package builds in mock (F13 Koji scratch build)
+ submitter reports having successfully tested the package functionality
! scriptlets contain unnecessary:
  update-desktop-database -q &> /dev/null
  update-mime-database %{_kde4_datadir}/mime &> /dev/null
  lines. There is no MIME type being registered (so update-mime-database is unnecessary) nor being referenced in the .desktop file either (so update-desktop-database is not needed either). And where did you get the -q from? It's not in: https://fedoraproject.org/wiki/Packaging:ScriptletSnippets
  (The scriptlets are otherwise valid.)
+ no subpackages other than -devel (in fact no subpackages at all), so "Usually, subpackages other than devel should require the base package using a fully versioned dependency." is irrelevant
+ no .pc files, so "placement of .pc files" is irrelevant
+ no file dependencies

Please fix the following items:
* escape (double) the % signs in %changelog (MUST)
* own the following 2 directories:
    %{_kde4_docdir}/HTML/en/%{name}/
    %{_kde4_appsdir}/kMagnet/
  not just the files they contain (i.e. remove the * at the end of those lines) (MUST)
* remove the unnecessary lines from the %postun and %posttrans scriptlets:
  update-desktop-database -q &> /dev/null
  update-mime-database %{_kde4_datadir}/mime &> /dev/null
  (SHOULD, and trivial to fix, so please fix this while you are at fixing things unless you have a good reason not to)
* ask upstream to include a copy of the GPLv3 to match their license headers (SHOULD, but you don't have to wait for an answer to get the package approved)

Once you addressed these issues, I'll have another quick look to make sure it's all right and then I'll approve your package and sponsor you.

Comment 12 Kevin Kofler 2009-10-18 05:00:41 UTC
I did some more testing:
successful scratch build for F10 on all 4 arches:
http://koji.fedoraproject.org/koji/taskinfo?taskID=1752638
also tried to play the game and it works fine indeed if you know how to play (the documentation is poor; the idea is that you have to open one of the predefined puzzles (currently only 3), then move with the cursor keys).

Comment 13 Ryan Rix 2009-10-18 05:47:01 UTC
> * escape (double) the % signs in %changelog (MUST)
Done

> * own the following 2 directories:
>    %{_kde4_docdir}/HTML/en/%{name}/
>    %{_kde4_appsdir}/kMagnet/
>  not just the files they contain (i.e. remove the * at the end of those lines)
>(MUST)
Done

>* remove the unnecessary lines from the %postun and %posttrans scriptlets:
>  update-desktop-database -q &> /dev/null
>  update-mime-database %{_kde4_datadir}/mime &> /dev/null
>  (SHOULD, and trivial to fix, so please fix this while you are at fixing
>things unless you have a good reason not to)
Done

>* ask upstream to include a copy of the GPLv3 to match their license headers
>(SHOULD, but you don't have to wait for an answer to get the package approved)
Sent a mail upstream with this and other issues you and I discussed in IRC.

=======================

[rrix@TheSwan rpmbuild]$ rpmlint RPMS/i586/kmagnet-0.03-5.fc11.i586.rpm
1 packages and 0 specfiles checked; 0 errors, 0 warnings.
[rrix@TheSwan rpmbuild]$ rpmlint SRPMS/kmagnet-0.03-5.fc11.src.rpm
1 packages and 0 specfiles checked; 0 errors, 0 warnings.
[rrix@TheSwan rpmbuild]$ rpmlint RPMS/i586/kmagnet-debuginfo-0.03-5.fc11.i586.rpm
1 packages and 0 specfiles checked; 0 errors, 0 warnings.

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

http://rrix.fedorapeople.org/kmagnet/kmagnet-0.03-5.fc11.src.rpm
http://rrix.fedorapeople.org/kmagnet/kmagnet.spec

Comment 14 Kevin Kofler 2009-10-18 06:18:17 UTC
All issues addressed, the package is APPROVED.

Comment 15 Kevin Kofler 2009-10-18 06:20:28 UTC
You are now sponsored.

Comment 16 Ryan Rix 2009-10-18 06:31:33 UTC
New Package CVS Request
=======================
Package Name: kmagnet
Short Description: KDE puzzle game with built in editor
Owners: rrix
Branches: F-10 F-11 F-12
InitialCC:

Comment 17 Rex Dieter 2009-10-18 15:56:09 UTC
Small pet-peave, I'd suggest leaving "KDE" out of the pkg summary/description.  (Unless pkg is truly kde-only).

Comment 18 Kevin Fenzi 2009-10-19 15:57:02 UTC
cvs done.

Comment 19 Ryan Rix 2009-10-20 02:09:48 UTC
@Rex: What should I do to change it if it's already been completed in CVS?

Comment 20 Kevin Kofler 2009-10-20 05:59:39 UTC
First of all, you MUST NOT readd FE-NEEDSPONSOR nor reset fedora-cvs to ?. Please refresh the page before posting!

To make changes to already imported packages, you follow the regular packaging procedure: edit the specfile in CVS (bumping Release and adding a changelog entry), commit the edit (with the changelog entry as the commit message), tag and build.

If the package is not imported yet, the easiest solution is to import it first, then do the edits as above.

Comment 21 Ryan Rix 2009-10-27 21:25:39 UTC
commited and built in devel

Comment 22 Fedora Update System 2009-10-27 21:26:40 UTC
kmagnet-0.03-5.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/kmagnet-0.03-5.fc10

Comment 23 Fedora Update System 2009-10-27 21:42:20 UTC
kmagnet-0.03-5.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/kmagnet-0.03-5.fc11

Comment 24 Fedora Update System 2009-11-04 12:24:23 UTC
kmagnet-0.03-5.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 25 Fedora Update System 2009-11-04 12:27:41 UTC
kmagnet-0.03-5.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.