Bug 3035

Summary: Review request: dhewm3 - Dhewm's Doom 3 engine
Product: Package Reviews Reporter: Simone Caronni <negativo17>
Component: Review RequestAssignee: A. Trande (sagitter) <trpost>
Status: RESOLVED FIXED    
Severity: normal CC: leamas.alec, rpmfusion-package-review
Priority: P5    
Version: Current   
Hardware: All   
OS: GNU/Linux   
namespace:

Description Simone Caronni 2013-11-15 15:23:31 CET
SPEC: http://slaanesh.fedorapeople.org/dhewm3.spec
SRPM: http://slaanesh.fedorapeople.org/dhewm3-1.3.1.1304-20.git6d8108c5.fc19.src.rpm

dhewm3 3 is a Doom 3 GPL source modification. The goal of %{name} 3 is bring
DOOM 3 with the help of SDL to all suitable platforms. Bugs present in the
original DOOM 3 will be fixed (when identified) without altering the original
game-play.

Why it's not in Fedora?
Packaging guidelines prohibit engines where the content is not available. The engine is fully Open Source.

Note:
Information on the package and on the game content is inside the README.txt file.

$ rpmlint *rpm
dhewm3.src: W: spelling-error Summary(en_US) Dhewm's -> Hewer's
dhewm3.src: W: strange-permission dhewm3-git-checkout.sh 0751L
dhewm3.src: W: invalid-url Source0: dhewm3-1.3.1.1304-git6d8108c5.tar.bz2
dhewm3.x86_64: W: spelling-error Summary(en_US) Dhewm's -> Hewer's
dhewm3.x86_64: W: file-not-utf8 /usr/share/doc/dhewm3-1.3.1.1304/COPYING.txt
dhewm3.x86_64: W: no-manual-page-for-binary dhewm3ded
dhewm3.x86_64: W: no-manual-page-for-binary dhewm3
3 packages and 0 specfiles checked; 0 errors, 8 warnings.

> dhewm3.src: W: strange-permission dhewm3-git-checkout.sh 0751L
> dhewm3.src: W: invalid-url Source0: dhewm3-1.3.1.1304-git6d8108c5.tar.bz2

Script used to generate the Source0 main file. This is legitimate in Fedora packaging guidelines.

The rest can be ignored.
Comment 1 Simone Caronni 2013-11-15 16:26:52 CET
I'm planning to ship this for el6, f18, f19, f20.
Comment 2 A. Trande (sagitter) 2013-12-01 21:25:28 CET
- Compilation uses the 'dhewm3/neo/idlib/Base64.cpp' file; it's released with a BSD license.
Please, update License tag.

- There are bundled files in the neo/framework/minizip/ directory. They are already packaged in the 'minizip' package.
Please, remove them in the %setup section and add the 'minizip-devel' BR.
Perform the rpm buildings newly in koji, even for EPEL and post the links.

- Use %global instead of %define.

Also:

- Fix 'file-not-utf8' warning of the file '/usr/share/doc/dhewm3/COPYING.txt'
See https://fedoraproject.org/wiki/Common_Rpmlint_issues?rd=PackageMaintainers/Common_Rpmlint_Issues#file-not-utf8

- Fix 'strange-permission' warning of the file 'dhewm3-git-checkout.sh'

- 'invalid-url' warning in 'Source0' can be fixed by indicating a direct link to the zipped source archive file
  https://github.com/dhewm/dhewm3/archive/6d8108c508a0bde5c2bea4dec58fa2ca583a16e2.zip


Package Review
==============

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



===== MUST items =====

C/C++:
[x]: Package does not contain kernel modules.
[x]: Package contains no static executables.
[x]: Development (unversioned) .so files in -devel subpackage, if present.
     Note: Unversioned so-files in private %_libdir subdirectory (see
     attachment). Verify they are not in ld path.
[x]: Package does not contain any libtool archives (.la)
[x]: Rpath absent or only used for internal libs.

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.
[!]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses found:
     "GPL (v3 or later)", "Unknown or generated", "*No copyright* Public
     domain", "GPL (unversioned/unknown version) GPL (v3 or later)", "BSD (3
     clause)", "BSD (2 clause)", "zlib/libpng". 58 files have unknown license.
     Detailed output of licensecheck in /home/sagitter/review-
     dhewm3/licensecheck.txt
[x]: %build honors applicable compiler flags or justifies otherwise.
[!]: Package contains no bundled libraries without FPC exception.
[x]: Changelog in prescribed format.
[x]: Sources contain only permissible code or content.
[-]: Package contains desktop file if it is a GUI application.
[-]: Development files must be in a -devel package
[x]: Package uses nothing in %doc for runtime.
[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]: Useful -debuginfo package or justification otherwise.
[x]: Package is not known to require an ExcludeArch tag.
[x]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 61440 bytes in 3 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.
[x]: Rpmlint is run on all rpms the build produces.
     Note: There are rpmlint messages (see attachment).
[x]: 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 %doc.
[x]: Package requires other packages for directories it uses.
[!]: Package must own all directories that it creates.
[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]: Each %files section contains %defattr if rpm < 4.4
[x]: Macros in Summary, %description expandable at SRPM build time.
[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 do not use a name that already exist
[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

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

Generic:
[-]: 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).
[ ]: 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.
[x]: SourceX tarball generation or download is documented.
     Note: Package contains tarball without URL, check comments
[-]: 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.
[!]: Spec use %global instead of %define unless justified.
     Note: %define requiring justification: %define commit 6d8108c5
[x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: Reviewer should test that the package builds in mock.
[x]: Buildroot is not present
[x]: Package has no %clean section with rm -rf %{buildroot} (or
     $RPM_BUILD_ROOT)
[x]: Dist tag is present (not strictly required in GL).
[x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: Fully versioned dependency in subpackages if applicable.
[x]: Uses parallel make %{?_smp_mflags} macro.
[x]: SourceX is a working URL.

===== EXTRA items =====

Generic:
[x]: Rpmlint is run on all installed packages.
     Note: There are rpmlint messages (see attachment).
[x]: Large data in /usr/share should live in a noarch subpackage if package is
     arched.
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: dhewm3-1.3.1.1304-20.git6d8108c5.fc21.i686.rpm
          dhewm3-1.3.1.1304-20.git6d8108c5.fc21.src.rpm
dhewm3.i686: W: spelling-error Summary(en_US) Dhewm's -> Hewer's
dhewm3.i686: W: file-not-utf8 /usr/share/doc/dhewm3/COPYING.txt
dhewm3.i686: W: no-manual-page-for-binary dhewm3
dhewm3.i686: W: no-manual-page-for-binary dhewm3ded
dhewm3.src: W: spelling-error Summary(en_US) Dhewm's -> Hewer's
dhewm3.src: W: strange-permission dhewm3-git-checkout.sh 0751L
dhewm3.src: W: invalid-url Source0: dhewm3-1.3.1.1304-git6d8108c5.tar.bz2
2 packages and 0 specfiles checked; 0 errors, 7 warnings.




Rpmlint (installed packages)
----------------------------
# rpmlint dhewm3
dhewm3.i686: W: spelling-error Summary(en_US) Dhewm's -> Hewer's
dhewm3.i686: W: file-not-utf8 /usr/share/doc/dhewm3/COPYING.txt
dhewm3.i686: W: no-manual-page-for-binary dhewm3
dhewm3.i686: W: no-manual-page-for-binary dhewm3ded
1 packages and 0 specfiles checked; 0 errors, 4 warnings.
# echo 'rpmlint-done:'



Requires
--------
dhewm3 (rpmlib, GLIBC filtered):
    /bin/sh
    libSDL2-2.0.so.0
    libc.so.6
    libcurl.so.4
    libdl.so.2
    libgcc_s.so.1
    libgcc_s.so.1(GCC_3.0)
    libjpeg.so.62
    libjpeg.so.62(LIBJPEGTURBO_6.2)
    libjpeg.so.62(LIBJPEG_6.2)
    libm.so.6
    libogg.so.0
    libopenal.so.1
    libpthread.so.0
    libstdc++.so.6
    libstdc++.so.6(CXXABI_1.3)
    libvorbis.so.0
    libvorbisfile.so.3
    libz.so.1
    rtld(GNU_HASH)



Provides
--------
dhewm3:
    dhewm3
    dhewm3(x86-32)
    doom3-engine



Unversioned so-files
--------------------
dhewm3: /usr/lib/dhewm3/base.so
dhewm3: /usr/lib/dhewm3/d3xp.so

Generated by fedora-review 0.5.0 (920221d) last change: 2013-08-30
Command line :/usr/bin/fedora-review -m fedora-rawhide-i386-rpmfusion_free -u https://bugzilla.rpmfusion.org/show_bug.cgi?id=3035
Buildroot used: fedora-rawhide-i386
Active plugins: Generic, Shell-api, C/C++
Disabled plugins: Java, Python, SugarActivity, Perl, R, PHP, Ruby
Disabled flags: EPEL5, EXARCH, DISTTAG
Comment 3 Alec Leamas 2013-12-01 22:18:31 CET
To me, it looks that  [1] is applicable here?!

[1] http://fedoraproject.org/wiki/Packaging:SourceURL#Github
Comment 4 Simone Caronni 2013-12-02 12:57:08 CET
(In reply to comment #2)
> - Compilation uses the 'dhewm3/neo/idlib/Base64.cpp' file; it's released with a
> BSD license.
> Please, update License tag.

Done.

> - Use %global instead of %define.

Fone.

> - Fix 'file-not-utf8' warning of the file '/usr/share/doc/dhewm3/COPYING.txt'

Done.

> - Fix 'strange-permission' warning of the file 'dhewm3-git-checkout.sh'
> 
> - 'invalid-url' warning in 'Source0' can be fixed by indicating a direct link
> to the zipped source archive file
>  
> To me, it looks that  [1] is applicable here?!
> 
> [1] http://fedoraproject.org/wiki/Packaging:SourceURL#Github

Done, I've applied the GitHub sourceURL as specified in the packaging guidelines. The script file was a leftover when I was unbundling zlib, jpeg, etc.

> - There are bundled files in the neo/framework/minizip/ directory. They are
> already packaged in the 'minizip' package.
> Please, remove them in the %setup section and add the 'minizip-devel' BR.
> Perform the rpm buildings newly in koji, even for EPEL and post the links.

Unfortunately this is not so easy. The bundled Minizip has been customized with one extra function:

https://github.com/dhewm/dhewm3/blob/master/neo/framework/minizip/unzip.cpp#L68
https://github.com/dhewm/dhewm3/blob/master/neo/framework/minizip/unzip.cpp#L2159

In fact it's the only libraries that has been left bundled when the original Id source was cleaned up. I'm looking if I can remove it with a patch; If anyone wants to give some help I would greatly appreciate it.
Comment 5 Simone Caronni 2013-12-04 09:15:41 CET
I've asked upstream for a way to remove the bundled Minizip, but apparently there's no way due to the added function:

https://github.com/dhewm/dhewm3/pull/88#issuecomment-29705454

I've added a Provide for the bundled Minizip.

SPEC: http://slaanesh.fedorapeople.org/dhewm3.spec
SRPM: http://slaanesh.fedorapeople.org/dhewm3-1.3.1.1304-21.git6d8108c.fc20.src.rpm

Some Koji builds as requested:

http://koji.fedoraproject.org/koji/taskinfo?taskID=6254589
http://koji.fedoraproject.org/koji/taskinfo?taskID=6254595
Comment 6 A. Trande (sagitter) 2013-12-04 16:07:18 CET
(In reply to comment #5)
> I've asked upstream for a way to remove the bundled Minizip, but apparently
> there's no way due to the added function:
> 
> https://github.com/dhewm/dhewm3/pull/88#issuecomment-29705454
> 
> I've added a Provide for the bundled Minizip.

Since RPM Fusion follows the Fedora packaging guidelines, we need to treat that as a "Bundling exception". 
See http://fedoraproject.org/wiki/Packaging:No_Bundled_Libraries#Exceptions

Please, don't open a ticket in FPC's trac as guide lines say, but explain your justifications in the RPM Fusion ML by answering to the " Standard Questions" reported.  

If none is unfavorable, we can complete this review definitely.
Comment 7 A. Trande (sagitter) 2013-12-12 17:55:19 CET
Please, leave a comment in the .spec file with a link to the thread about MiniZip in GitHub. 

Package approved.
Comment 8 Simone Caronni 2013-12-16 09:01:48 CET
(In reply to comment #7)
> Please, leave a comment in the .spec file with a link to the thread about
> MiniZip in GitHub.

Done.
Comment 9 Simone Caronni 2013-12-16 09:04:01 CET
Package CVS request
======================
Package Name: dhewm3
Short Description: Dhewm's Doom 3 engine
Owners: slaanesh
Branches: f18 f19 f20 el6
InitialCC:
----------------------
License tag: free