Bug 479832

Summary: Review Request: mmpong - a massively multiplayer pong game
Product: [Fedora] Fedora Reporter: Kai <maintainer>
Component: Package ReviewAssignee: Nobody's working on this, feel free to take it <nobody>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: fedora-package-review, mtasaka, notting
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-04-14 13:04:09 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Bug Depends On:    
Bug Blocks: 201449    

Description Kai 2009-01-13 09:11:07 EST
Spec URL: http://mmpong.net/trac/export/406/trunk/dist/rpm/mmpong.spec
SRPM URL: http://mmpong.net/trac/downloads/mmpong-0.9-0.src.rpm
Description: mmpong is an ATARI-pong-like multiplayer game, where a moving ball
reflects on impact from paddles on the left and right sides of the
screen.
.
A special feature of this variant is the ability to play the game
with far more than two players. Players are split into two teams, and
the position of each team's paddle is determined by the mean value of
the positions of all the players' paddles on the team. mmpong supports
a number of different paddle profiles (like flat or round).
Comment 1 Kai 2009-01-13 09:19:06 EST
Since this is my first package, I will require a sponsor apparently.
Comment 2 Mamoru TASAKA 2009-01-18 11:12:00 EST
Well, some random comments.

! First of all, please check your srpm / binary rpms by rpmlint
  (in rpmlint rpm) to detect some generic packaging errors.

- %define _prefix is not needed.
  https://fedoraproject.org/wiki/Packaging/RPMMacros
  - Also, %_prefix/share/man should be %{_mandir} , for example

- Please consider to use %{?dist} macro in Release number
  https://fedoraproject.org/wiki/Packaging/DistTag

- "Games" is not valid Group on Fedora. See the explanation by
  $ rpmlint -I non-standard-group

- "GPL 3" license tag is not a valid tag for Fedora:
  http://fedoraproject.org/wiki/Licensing

- Please consider to %{version} macro in Source0:
  https://fedoraproject.org/wiki/Packaging/SourceURL#Using_.25.7Bversion.7D

- BuildRoot you are using is not valid on Fedora:
  https://fedoraproject.org/wiki/Packaging/Guidelines#BuildRoot_tag

- Would you explain what the periods at the head of sentences are for?

- Please don't use debian's way of naming like "libmmpong0.9" and
  "%package libs" for example if you want to split libraries and create
  a seperate rpm.
  and -devel package should simply be "%package devel".

  ! note that "%package foo" is the same as "%package -n %{name}-foo".
    You are using many "%package -n", but almost all of these can (and
    should) be replaced by "%pacakge foo" (same for %description, %files)

- Please write the dependencies between binary rpms created by
  this srpm. For example -devel subpackage should have
  "Requires: %{name}-libs = %{version}-%{release}".

- By the way would you explain why you have to write "mmpong is an ......"
  sentence on %description of each subpackages?

- %setup should be quiet (use -q option)

- Patch0 does not correspond with %patch (rpm 4.6 refuses this.
  you should use %patch0 if you use Patch0)

- By the way your patch cannot not be applied with --fuzz=0
  (this is the default on rpm 4.6)

- Please check if %cmake macros can be used for this package:
  https://fedoraproject.org/wiki/Packaging/cmake
  Also as written in cmake wiki:
  - support parallel make when possible. Otherwise write in your
    spec file as comments that this package does not support parallel
    make :
    https://fedoraproject.org/wiki/Packaging/Guidelines#Parallel_make

  - Perhaps you have to add "VERBOSE=1" option to "make" to make build.log
    verbose.

- %buildroot must once be cleaned at the beginning of %install
  https://fedoraproject.org/wiki/Packaging/ReviewGuidelines

- Please avoid to use %makeinstall unless impossible:
  https://fedoraproject.org/wiki/Packaging/Guidelines#Why_the_.25makeinstall_macro_should_not_be_used

- What is %run_ldconfig macro? Also your srpm does not seem to create
  %{name} package itself. Would you explain why?

- %{name}-libs package needs /sbin/ldconfig at %post{,un} (by the
  way if only /sbin/ldconfig should be executed at %post, use
  "%post libs -p /sbin/ldconfig", for example)

- %defattr is missing on all packages (see ReviewGuidelines wiki)

- Please don't ship static archives (libfoo.a) unless needed.
  If not avoidable, please package it seperately:
  https://fedoraproject.org/wiki/Packaging/Guidelines#Packaging_Static_Libraries

- By the way would you explain why -devel subpackge contains no header files?
  (is this -devel subpackage useful?)

- Packages containing pkgconfig .pc file must have "Requires: pkgconfig"
  (written in ReviewGuidelines wiki)

- Using %_prefix/games, %_datadir/games is not allowed on Fedora:
  https://fedoraproject.org/wiki/SIGs/Games/Packaging

- Installed desktop file must be handled by desktop-file-{install,validate}
  https://fedoraproject.org/wiki/Packaging/Guidelines#desktop-file-install_usage

- %{_prefix}/share/icons directory _itself_ should not be owned by
  -gl subpackage:
  https://fedoraproject.org/wiki/Packaging/Guidelines#File_and_Directory_Ownership

- Please write %changelog
  https://fedoraproject.org/wiki/Packaging/Guidelines#Changelogs
Comment 3 Kai 2009-01-19 06:29:27 EST
Ok, thanks very much for your detailed suggestions.
Unfortunately `rpmlint -a` seems to crash on my systems, so I was only able to get a fraction of the errors you posted above.
I believe, I was able to work around some (most?) of errors mentioned above, and have updated the SRPM package. Since the spec file is managed by our subversion repository, the revised URL is now:
Spec URL: http://mmpong.net/trac/export/442/trunk/dist/rpm/mmpong.spec

There is one thing I'm not quite clear about yet:
How do I package man pages? When using debian, everything is zipped up automatically, but for fedora I wasn't able to find the right macro to gzip them, so `rpmbuild -ba` still fails...
I'd appreciate any hints.

And another point:
You mentioned that there was no `mmpong` package, and obviously you're right. So, to facilitate things, I thought about making `mmpong` a meta-package, that's basically empty and just depends on the components. Is this the way to go on fedora?

Thank you for your help, everyone.
Comment 4 Mamoru TASAKA 2009-01-19 10:50:51 EST
(In reply to comment #3)
> Ok, thanks very much for your detailed suggestions.
> Unfortunately `rpmlint -a` seems to crash on my systems, so I was only able to
> get a fraction of the errors you posted above.

- Just $ rpmlint foo.rpm or $ rpmlint <rpmname installed> is sufficient.

> I believe, I was able to work around some (most?) of errors mentioned above,
> and have updated the SRPM package. Since the spec file is managed by our
> subversion repository, the revised URL is now:
> Spec URL: http://mmpong.net/trac/export/442/trunk/dist/rpm/mmpong.spec

- Please also post the URL of your new srpm. Also, please change the release
  number every time you modify your spec file.

> 
> There is one thing I'm not quite clear about yet:
> How do I package man pages? When using debian, everything is zipped up
> automatically, but for fedora I wasn't able to find the right macro to gzip
> them, so `rpmbuild -ba` still fails...
> I'd appreciate any hints.

- Man pages should be automatically compressed by rpmbuild.

> And another point:
> You mentioned that there was no `mmpong` package, and obviously you're right.
> So, to facilitate things, I thought about making `mmpong` a meta-package,
> that's basically empty and just depends on the components. 

- I guess usually people expects that after "$ yum install mmpong" people
  can play this game. So I think that some virtual package should be
  provided or mmpong-client-caca should be renamed to mmpong.
Comment 5 Mamoru TASAKA 2009-01-19 13:43:09 EST
(In reply to comment #3)
> Unfortunately `rpmlint -a` seems to crash on my systems
Anyway I reported this issue as bug 480664.
Comment 6 Kai 2009-01-20 08:12:06 EST
Thanks for your help!
I finally got an SRPM/spec file that appears to build correctly using `rpmbuild -ba`.
I believe, I managed to create a virtual package (not sure if it complies to guidelines, since I wasn't able to find much on the topic except for a couple of paragraphs on
http://docs.fedoraproject.org/drafts/rpm-guide-en/ch19s03.html, but it appears to do the job).

The updated URLs are as follows:
Spec URL: http://mmpong.net/trac/export/450/trunk/dist/rpm/mmpong.spec
SRPM URL: http://mmpong.net/trac/downloads/mmpong-0.9-2.fc10.src.rpm

I'd appreciate if anyone can look them over.
Thank you very much for your efforts!
- Kai
Comment 7 Mamoru TASAKA 2009-01-21 13:03:58 EST
Well, rpmlint <rpmname> should work and checking your rpms
by rpmlint is always recommended.


For 0.9-2
- BuildRequires: gcc is redundant:
  https://fedoraproject.org/wiki/Packaging/Guidelines#Exceptions_2

- I think people don't expect that "$ yum install mmpong" will
  install development packages (i.e. -devel).
  Rather I think that mmpong-client-caca should be renamed to
  mmpong.

- By the way "Requires: %{name}-libs=%{version}-%{release}"
  will seek for a rpm package with the name 
  "%{name}-libs=%{version}-%{release}" (not %{name}-libs), so
  anyway this needs fixing (I guess if you try to install
  this rpm you will see such errors.)

- The Group "Libraries" is not common. You can see the Group
  tag which Fedora regards as valid by:
  $ rpmlint -I non-standard-group

- Summary should begin with a capital letter.

- Usually dependencies within packages rebuilt from a srpm
  must be exact EVR (Epoch-Version-Release) specific, not
  with inequality

- For -client-gl subpackage, "Requires: libgl" is not needed.
  Such libraries based dependency is automatically detected by
  rpmbuild itself and rpmbuild correctly adds such dependency
  to rebuilt binary rpms.

- Also, would you explain why the dependency for libcaca(-devel) is
  EVR specific? (If there is some reason, please write
  it as comments in the spec file)

- %cmake macro already sets -DCMAKE_INSTALL_PREFIX:PATH, 
  -DCMAKE_INSTALL_LIBDIR:PATH (and -DLIB_SUFFIX=64 for 64 bits
  architecture), and CFLAGS and so on.
  Would you check if "-DCMAKE_INSTALL_PREFIX=%{_prefix} ...."
  in your spec file really needed with using %cmake macro?

  By the way what %cmake macro does can be shown by
  $ rpm --eval %cmake . Also please check
  https://fedoraproject.org/wiki/Packaging/cmake

- On Fedora %run_ldconfig macro is not defined
  (Is this really working on your Fedora system?)

  (Also, as currently mmpong package is just empty, no scriptlets
   is needed... however also please see my suggestion about renaming
   -client-caca subpackage for this issue)

- For -libs subpackage, /sbin/ldconfig must be called on %post{,un}
  scriptlets. Add
---------------------------------------------------------
%post libs -p /sbin/ldconfig
---------------------------------------------------------
  for example.
  https://fedoraproject.org/wiki/Packaging/Guidelines#Shared_Libraries

- Any packages containing pkgconfig .pc files must have
  "Requires: pkgconfig".
  https://fedoraproject.org/wiki/Packaging/Guidelines#Pkgconfig_Files

- By the way even on x86_64, mmpong.pc contains:
---------------------------------------------------------
     3  libdir=${exec_prefix}/lib
---------------------------------------------------------
  This is not correct because on 64 bits architecture libdir should
  point to /usr/lib64, not /usr/lib.

- The directory %{_includedir}/mmpong must be owned by -devel
  subpackage:
  https://fedoraproject.org/wiki/Packaging/Guidelines#File_and_Directory_Ownership
  https://fedoraproject.org/wiki/Packaging/UnownedDirectories#Wildcarding_Files_inside_a_Created_Directory

- Directories for installing man files are not right.
  For example, man files with suffix 6 should be installed under
  %{_mandir}/man6 (then rpmbuild automatically gzips this file)

- Again desktop files to be installed must be treated by
  "desktop-file-{install,validate}": see
  https://fedoraproject.org/wiki/Packaging/Guidelines#desktop-file-install_usage
  Currently mmpong-gl.desktop is a invalid desktop file
  and need fixing by desktop-file-install.

- -client-gl package must not own %_datadir/icons/hicolor
   directory and so on (also here please check
   https://fedoraproject.org/wiki/Packaging/Guidelines#File_and_Directory_Ownership
   and check what directories are owned by hicolor-icon-theme)

- Usually daemon executables are installed under %{_sbindir} (i.e.
  /usr/sbin ) and some initscript is provided.
  * Would you check if mmpongd should be under %_bindir or
    %_sbindir ? (I don't know well about mmpongd, however I guess
    this should be under %_sbindir)
  * Also would you consider to supply sysv initscripts for mmpongd?
    https://fedoraproject.org/wiki/Packaging/SysVInitScript

- As -client-gl installs some icons under %_datadir/icons/hicolor,
  please check
  https://fedoraproject.org/wiki/Packaging/ScriptletSnippets#GTK.2B_icon_cache

- Please create %changelog
  https://fedoraproject.org/wiki/Packaging/Guidelines#Changelogs
Comment 8 Mamoru TASAKA 2009-01-30 10:10:00 EST
ping?
Comment 9 Mamoru TASAKA 2009-02-08 12:04:28 EST
ping again?
Comment 10 Kai 2009-02-08 13:45:10 EST
Uh, I'm sorry! I was away for a couple of weeks.
I'll get back to it when I find the time.
Thanks for hanging on ;-)
Comment 11 Mamoru TASAKA 2009-03-01 11:27:44 EST
ping again?
Comment 12 Mamoru TASAKA 2009-03-09 12:57:06 EDT
ping again?
Comment 13 Mamoru TASAKA 2009-03-19 12:44:42 EDT
Again ping?
Comment 14 Mamoru TASAKA 2009-03-26 10:31:02 EDT
I will close this bug as NOTABUG if no response is received
from the reporter within ONE WEEK.
Comment 15 Mamoru TASAKA 2009-04-14 13:04:09 EDT
Once closing.

If someone wants to import this package into Fedora, please
submit another review request and mark this bug a duplicate
of the new one, thank you!