Bug 520550 - Review Request: IVAN - SDL roguelike
Summary: Review Request: IVAN - SDL roguelike
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: 11
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Nobody's working on this, feel free to take it
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2009-09-01 04:29 UTC by Ryan Rix
Modified: 2010-01-26 03:05 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2010-01-26 00:40:53 UTC
Type: ---

Attachments (Terms of Use)
IVAN spec file (2.63 KB, text/plain)
2009-09-01 04:30 UTC, Ryan Rix
no flags Details
IVAN srpm (803.47 KB, application/x-rpm)
2009-09-01 04:31 UTC, Ryan Rix
no flags Details

Description Ryan Rix 2009-09-01 04:29:47 UTC
Spec URL: <spec info here>
SRPM URL: <srpm info here>

Hello all! I have finished packaging IVAN (http://ivan.sf.net) for Fedora 11 and would like it to be reviewed for inclusion into Fedora 11.

Iter Vehemens ad Necum is a graphical roguelike game.  It features advanced
bodypart and material handling, multi-colored lighting and, above all, deep

As this is my first package to be reviewed, I guess I will need a sponsor. I am also without a place to host these files, currently. I suppose uploading to the RH bugzilla will work temporarily, but if anyone has any other suggestions, please let me know.

Rpmlint reports a few errors on the package but they are all pretty much related to this being a game:
ivan.i586: E: non-standard-executable-perm /usr/bin/ivan 02755

ivan.i586: W: non-standard-uid /var/games/ivan games
(per the Games SIG packaging guidelines this is OKAY)

ivan.i586: E: non-standard-dir-perm /var/games/ivan 0775
(per the Games SIG packaging guidelines this is OKAY)

ivan.i586: W: non-standard-uid /var/games/ivan/ivan-highscore.scores games
(per the Games SIG packaging guidelines this is OKAY)

ivan.i586: E: zero-length /var/games/ivan/ivan-highscore.scores
(some strange issue in opening this file makes it impossible to create even if it is fopen'd "wb", so I have included it in the package)

ivan.i586: W: non-standard-uid /var/games/ivan/Bones games
(per the Games SIG packaging guidelines this is OKAY)

ivan.i586: E: non-standard-dir-perm /var/games/ivan/Bones 0775
(per the Games SIG packaging guidelines this is OKAY)

This package does NOT currently handle setgid privileges properly and runs as setgid from start to finish, which is technically against Games SIG's packaging guidelines. I am currently requesting help from fedora-packagers mailing list on this issue. Because the game creates a Bones file after the user dies in /var/games/ivan/Bones, it is impossible to drop setgid at the start of the application, as it is with the highscores file (which, because it's encased in a few classes, is also a bear to run with setgid off) Any suggestions/help on this issue is much appreciated.


Comment 1 Ryan Rix 2009-09-01 04:30:54 UTC
Created attachment 359343 [details]
IVAN spec file

Comment 2 Ryan Rix 2009-09-01 04:31:52 UTC
Created attachment 359344 [details]
IVAN srpm

Comment 3 Ryan Rix 2009-09-01 13:56:18 UTC
http://rrix.fedorapeople.org/ <-- this contains SRPM and SPEC now; supersedes attached files, though at the moment they are the same.

Comment 4 Krzesimir Nowak 2009-09-10 10:17:52 UTC
This is a prereview, so it is not formal. And maybe in some places I'm not right - I'm trying to become a packager by doing informal prereviews.

MUST: rpmlint must be run on every package. The output should be posted in the review.

MUST: The package must be named according to the Package Naming Guidelines .

MUST: The spec file name must match the base package %{name}, in the format %{name}.spec unless your package has an exemption.

MUST: The package must meet the Packaging Guidelines.
Fail - Game is named `Iter Vehemens ad Necem', but spec file says `Iter Vehemens ad Necum'. Same error in .desktop file. It would be good to have patch commented. `Patch0' rather should be used, instead of `Patch1' and `%patch0' instead of `%patch1' in `%prep'.

MUST: The package must be licensed with a Fedora approved license and meet the Licensing Guidelines .

MUST: The License field in the package spec file must match the actual license.
Fail - license section in source code directs to LICENSE file, which states that source is released under GPLv2+, not GPL+.

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.
Fail/Ok - COPYING is included, but LICENSING file is not and this file is mentioned in source code.

MUST: The spec file must be written in American English.

MUST: The spec file for the package MUST be legible.

MUST: The sources used to build the package must match the upstream source, as provided in the spec URL. Reviewers should use md5sum for this task. If no upstream URL can be specified for this package, please see the Source URL Guidelines for how to deal with this.

MUST: The package MUST successfully compile and build into binary rpms on at least one primary architecture.
Ok - builds on i586.

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. Each architecture listed in ExcludeArch MUST have a bug filed in bugzilla, describing the reason that the package does not compile/build/work on that architecture. The bug number MUST be placed in a comment, next to the corresponding ExcludeArch line.
??? - I didn't tested other architectures.

MUST: All build dependencies must be listed in BuildRequires, except for any that are listed in the exceptions section of the Packaging Guidelines ; inclusion of those as BuildRequires is optional. Apply common sense.

MUST: The spec file MUST handle locales properly. This is done by using the %find_lang macro. Using %{_datadir}/locale/* is strictly forbidden.

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.

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.

MUST: A package must own all directories that it creates. If it does not create a directory that it uses, then it should require a package which does create that directory.

MUST: A Fedora package must not list a file more than once in the spec file's %files listings.
Fail - during rpmbuild I got a warning:
`warning: File listed twice: /var/games/ivan/ivan-highscore.scores'

MUST: Permissions on files must be set properly. Executables should be set with executable permissions, for example. Every %files section must include a %defattr(...) line.
Well, this setgid is issue. But from what I can see, roguelikes are handled that way.

MUST: Each package must have a %clean section, which contains rm -rf %{buildroot} (or $RPM_BUILD_ROOT).

MUST: Each package must consistently use macros.
Fail - there are `$RPM_BUILD_ROOT' and `%{buildroot}' macros mixed.

MUST: The package must contain code, or permissable content.

MUST: Large documentation files must 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).

MUST: If a package includes something as %doc, it must not affect the runtime of the application. To summarize: If it is in %doc, the program must run properly if it is not present.

MUST: Header files must be in a -devel package.

MUST: Static libraries must be in a -static package.

MUST: Packages containing pkgconfig(.pc) files must 'Requires: pkgconfig' (for directory ownership and usability).

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.

MUST: In the vast majority of cases, devel packages must require the base package using a fully versioned dependency: Requires: %{name} = %{version}-%{release}

MUST: Packages must NOT contain any .la libtool archives, these must be removed in the spec if they are built.

MUST: Packages containing GUI applications must include a %{name}.desktop file, and that file must be properly installed with desktop-file-install in the %install section. If you feel that your packaged GUI application does not need a .desktop file, you must put a comment in the spec file with your explanation.

MUST: Packages must not own files or directories already owned by other packages. The rule of thumb here is that the first package to be installed should own the files or directories that other packages may rely upon. This means, for example, that no package in Fedora should ever share ownership with any of the files or directories owned by the filesystem or man package. If you feel that you have a good reason to own a file or directory that another package owns, then please present that at package review time.
Ok? I'm not sure about `%{__mkdir} -p %{buildroot}%{_datadir}/icons/hicolor/32x32/apps/'.

MUST: At the beginning of %install, each package MUST run rm -rf %{buildroot} (or $RPM_BUILD_ROOT).

MUST: All filenames in rpm packages must be valid UTF-8.
Ok, at first glance. Any tools checking it?

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.

SHOULD: The description and summary sections in the package spec file should contain translations for supported Non-English languages, if available.

SHOULD: The reviewer should test that the package builds in mock.

SHOULD: The package should compile and build into binary rpms on all supported architectures.

SHOULD: The reviewer should test that the package functions as described. A package should not segfault instead of running, for example.

SHOULD: If scriptlets are used, those scriptlets must be sane. This is vague, and left up to the reviewers judgement to determine sanity.

SHOULD: Usually, subpackages other than devel should require the base package using a fully versioned dependency.

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.

SHOULD: If the package has file dependencies outside of /etc, /bin, /sbin, /usr/bin, or /usr/sbin consider requiring the package which provides the file instead of the file itself.

Comment 5 Michael Schwendt 2009-09-15 18:12:04 UTC
Good review so far.

> I'm not sure about `%{__mkdir} -p
> %{buildroot}%{_datadir}/icons/hicolor/32x32/apps/'.

That's a directory that belongs into package "hicolor-icon-theme". This game only stores a single %{name}.png in that directory, used by the desktop menu entry. Adding "Requires: hicolor-icon-theme" would be more accurate and would avoid unowned directories. Alternatively, the single file could be moved to /usr/share/pixmaps.

> Requires:       SDL

See https://fedoraproject.org/wiki/Packaging:Guidelines#Explicit_Requires

> BuildRequires:  SDL-devel >= 1.2.0.

SDL in Fedora is > 1.2.0 for a very long time.

> %configure --bindir=%{_bindir} --datadir=%{_datadir}
> --localstatedir=%{_localstatedir}/games

The first two arguments are the default. Compare with "rpm --eval %configure".

> %{__cp} %{SOURCE1} %{buildroot}%{_datadir}/applnk/Applications/%{name}.desktop

Why do you copy it there only to remove it again when copying it elsewhere with desktop-file-install?

> MUST: The spec file must be written in American English.
> Ok.

It ought to be "Rogue-like" not "roguelike", though.

> %changelog
> - initiql package

s/initiql/initial/   ;)

> File listed twice: /var/games/ivan/ivan-highscore.scores'

This is because the directory is included recursively and the highscores files is also included explicitly. The directory entry could be marked %dir.

> Patch1:         %{name}-%{version}-fedora.patch

Dubious. The C++ fixes and the Makefile patch could be split into two patches. So when a compiler update required further fixes, you could simply rediff/enhance the C++ specific patch. But why is a patch to config.log and config.status included? Those are files created at build-time.

Comment 6 Ryan Rix 2009-09-16 00:35:41 UTC
[[> Patch1:         %{name}-%{version}-fedora.patch

Dubious. The C++ fixes and the Makefile patch could be split into two patches.
So when a compiler update required further fixes, you could simply
rediff/enhance the C++ specific patch. But why is a patch to config.log and
config.status included? Those are files created at build-time.  
I'm not entirely sure... I suppose I need to dist-clean before I generate the patch, correct?
I've implemented both of your suggestions (thank you both very much!) and will rebuild the rpm after I get the patch all ironed out.

Comment 7 Ryan Rix 2009-09-16 03:11:09 UTC

Latest build, incorporating both  Krzesimir and Michael's suggestions.

Comment 8 Jason Tibbitts 2009-09-23 06:36:36 UTC
This fails to build for me (x86_64, rawhide).  There are many errors and my builder has lots of CPUs so the output is a bit tough to follow.  Here's a scratch build; the builders have fewer CPUs so it's a bit easier to follow: http://koji.fedoraproject.org/koji/taskinfo?taskID=1700038

The errors all seem to be of the form:
../../FeLib/Include/save.h:39: error: cast from 'FILE*' to 'truth' loses precision

Of course, you can do your own scratch builds, and it's a good idea to do them and include the URLs in your review tickets (to show that your package actually builds).  Instructions are in http://fedoraproject.org/wiki/Join_the_package_collection_maintainers

Comment 9 Jason Tibbitts 2009-09-23 17:22:19 UTC
Please clear the whiteboard when you have a package which builds properly in mock or koji.

Comment 10 Mamoru TASAKA 2009-10-11 15:35:00 UTC
What is the status of this bug?

Comment 11 Ryan Rix 2009-10-11 23:20:44 UTC
Unfortunately, getting this application to build on x86_64 is being more trouble than I thought. In the process, i've discovered a few other bugs. 

Without an upstream's assistance, I begin to wonder on whether this package will be maintainable long term to the quality the Fedora Project's packages should be... :(

Comment 12 Bruno Wolff III 2009-10-12 00:04:21 UTC
Since upstream isn't changing much, I don't think there will be too much difficulty keeping up with them. The main worry would be if some key library in Fedora now got obsoleted and you needed to make IVAN use a new library. That's likely far enough out that it is still worth packaging it now and dealing with it later if it happens.

Comment 13 Michael Schwendt 2009-12-26 10:44:43 UTC
Re: comment 8

> ../../FeLib/Include/save.h:39: error: cast from 'FILE*' to 'truth' loses precision

| typedef.h:typedef int truth;
| typedef.h:typedef const int ctruth;
| save.h:  FILE* Buffer;
| save.h:  truth IsOpen() { return truth(Buffer); }

An attempt at creating a boolean type and really just ending with a typecast from pointer to int. Nothing is won by not using an explicit NULL-pointer comparison in this case.

Comment 14 Jason Tibbitts 2010-01-25 23:54:04 UTC
Still no build after several months now.  I'll go ahead and close this soon if that's not rectified.

Comment 15 Ryan Rix 2010-01-26 00:40:53 UTC
closing per conversation in #fedora-devel. I'm unable to maintain this code, and there is no upstream or future development anyways.

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