Bug 489751 (btanks)

Summary: Review Request: btanks - Funny battle game with tanks
Product: [Fedora] Fedora Reporter: Alexey Torkhov <atorkhov>
Component: Package ReviewAssignee: Peter Lemenkov <lemenkov>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: fedora-package-review, lemenkov, notting
Target Milestone: ---Flags: lemenkov: fedora-review+
kevin: fedora-cvs+
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 0.8.7686-8.fc9 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-03-18 18:55:29 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:
Bug Depends On:    
Bug Blocks: 496433    

Description Alexey Torkhov 2009-03-11 17:21:50 UTC
Spec URL: http://atorkhov.fedorapeople.org/btanks.spec
SRPM URL: http://atorkhov.fedorapeople.org/btanks-0.8.7686-2.fc10.src.rpm
Description:
Battle Tanks is a funny battle on your desk, where you can choose one of three
vehicles and eliminate your enemy using the whole arsenal of weapons. has
original cartoon-like graphics and cool music, it is fun and dynamic, it has
several network modes for deathmatch and cooperative.
What else is needed to have fun with your friends?

And all is packed and ready for you in Battle Tanks.

Rpmlint output:
btanks.x86_64: W: no-soname /usr/lib64/libsdlx.so
btanks.x86_64: W: no-soname /usr/lib64/libmrt.so
btanks.x86_64: W: no-soname /usr/lib64/libclunk.so
btanks.x86_64: W: shared-lib-calls-exit /usr/lib64/libclunk.so exit.5
btanks.x86_64: W: no-soname /usr/lib64/libbt.so
btanks.x86_64: W: shared-lib-calls-exit /usr/lib64/libbt.so exit.5
3 packages and 0 specfiles checked; 0 errors, 7 warnings.

Comment 1 Peter Lemenkov 2009-03-17 06:19:03 UTC
I'll review it.

Comment 2 Peter Lemenkov 2009-03-17 09:43:21 UTC
Notes:

> %patch0 -p1

Add postfix. E.g. you should invoke %patch in the following way:

%patch0 -p1 -b .some_descriptive_postfix

> dos2unix -k *.txt ChangeLog *.url LICENSE EXCEPTION

Consider using sed -i 's|\r||g' instead (just to avoid dos2unix as a BR).

> iconv -f latin1 -t utf-8 EXCEPTION > EXCEPTION.new
touch -r EXCEPTION EXCEPTION.new
mv -f EXCEPTION.new EXCEPTION

This piece of spec (and similar ones) is not fail-safe. You should change it to something like this:

iconv -f latin1 -t utf-8 EXCEPTION > EXCEPTION.new && touch -r EXCEPTION EXCEPTION.new && mv -f EXCEPTION.new EXCEPTION

Also, you should use some bash syntax sugar:

"mv -f EXCEPTION.new EXCEPTION" == "mv -f EXCEPTION{.new,}"
"touch -r EXCEPTION EXCEPTION.new" == "touch -r EXCEPTION{,.new}"

> %files
...
%{_libdir}/*.so

This is not a blocker, actually, but I believe, that dlopened objects should be in a proper subdir in %_libdir (for example %{_libdir}/%{name} ). However, there are many exceptions (unixODBC, tcl/tk among them), who stores their *so-libraries in %_libdir.

Comment 3 Alexey Torkhov 2009-03-17 11:12:04 UTC
Spec URL: http://atorkhov.fedorapeople.org/btanks.spec
SRPM URL: http://atorkhov.fedorapeople.org/btanks-0.8.7686-2.fc10.src.rpm

* Tue Mar 17 2009 Alexey Torkhov <atorkhov> - 0.8.7686-3
- Add patch backups
- Simplify scripts a bit
- Move libs to -libs subpackage to ensure better work in multilib environment
- Cleanier remove-smpeg patch

(In reply to comment #2)
> > %patch0 -p1
> 
> Add postfix. E.g. you should invoke %patch in the following way:
> 
> %patch0 -p1 -b .some_descriptive_postfix

I'm wondering why those backups are needed? I never found it useful.
Anyway, fixed.

> > dos2unix -k *.txt ChangeLog *.url LICENSE EXCEPTION
> 
> Consider using sed -i 's|\r||g' instead (just to avoid dos2unix as a BR).

No, I don't want to do it. Dos2unix is tiny and useful. Otherwise, I had to do touch to save timestamps.

> > iconv -f latin1 -t utf-8 EXCEPTION > EXCEPTION.new
> touch -r EXCEPTION EXCEPTION.new
> mv -f EXCEPTION.new EXCEPTION
> 
> This piece of spec (and similar ones) is not fail-safe. You should change it
> to something like this:
> 
> iconv -f latin1 -t utf-8 EXCEPTION > EXCEPTION.new && touch -r EXCEPTION
> EXCEPTION.new && mv -f EXCEPTION.new EXCEPTION

Those pieces are equivalent, as script are executed under -e shell option and it will exit after first command that fails.

> Also, you should use some bash syntax sugar:
> 
> "mv -f EXCEPTION.new EXCEPTION" == "mv -f EXCEPTION{.new,}"
> "touch -r EXCEPTION EXCEPTION.new" == "touch -r EXCEPTION{,.new}"

Fixed.

> > %files
> ...
> %{_libdir}/*.so
> 
> This is not a blocker, actually, but I believe, that dlopened objects should
> be in a proper subdir in %_libdir (for example %{_libdir}/%{name} ). However,
> there are many exceptions (unixODBC, tcl/tk among them), who stores their
> *so-libraries in %_libdir.  

Actually, that is how it is made now - btanks and bted are linked against libs under %{_libdir} (check ldd), but dlopen'ed libbt_objects plugin is in %{_libdir}/%{name}.

Comment 4 Alexey Torkhov 2009-03-17 12:34:39 UTC
Spec URL: http://atorkhov.fedorapeople.org/btanks.spec
SRPM URL: http://atorkhov.fedorapeople.org/btanks-0.8.7686-4.fc10.src.rpm

* Tue Mar 17 2009 Alexey Torkhov <atorkhov> - 0.8.7686-4
- Split data to subpackage instead of libs

Also, running ldconfig.

Comment 5 Alexey Torkhov 2009-03-17 14:31:46 UTC
Koji scratch build:
http://koji.fedoraproject.org/koji/taskinfo?taskID=1246013

Spec URL: http://atorkhov.fedorapeople.org/btanks.spec
SRPM URL: http://atorkhov.fedorapeople.org/btanks-0.8.7686-5.fc10.src.rpm

* Tue Mar 17 2009 Alexey Torkhov <atorkhov> - 0.8.7686-5
- Add license for libraries

Comment 6 Peter Lemenkov 2009-03-17 15:16:15 UTC
Please, fix - use full patch for Source0.

REVIEW:

- rpmlint is not silent:

[petro@host-12-116 Desktop]$ rpmlint btanks-*rpm
btanks.i386: W: no-soname /usr/lib/libclunk.so
btanks.i386: W: shared-lib-calls-exit /usr/lib/libclunk.so exit
btanks.i386: W: no-soname /usr/lib/libsdlx.so
btanks.i386: W: no-soname /usr/lib/libbt.so
btanks.i386: W: shared-lib-calls-exit /usr/lib/libbt.so exit
btanks.i386: W: no-soname /usr/lib/libmrt.so
btanks-data.i386: W: no-documentation
4 packages and 0 specfiles checked; 0 errors, 7 warnings.
[petro@host-12-116 Desktop]$ 

+ The package is named according to the Package Naming Guidelines .
+ The spec file name matches the base package %{name}, in the format %{name}.spec
+ The package meets the Packaging Guidelines .
+ The package is licensed with a Fedora approved license and meets the Licensing Guidelines .
+ The License field in the package spec file matchуы the actual license. 
+ The text of the license(s) is included in %doc.
+ The spec file is written in American English.
+ The spec file for the package is legible.
+ The sources used to build the package matches the upstream source, as provided in the spec URL.

[petro@host-12-116 Desktop]$ md5sum btanks-0.8.7686.tar.bz2*
f5e4076e8562f4ad54fefeceaa37870d  btanks-0.8.7686.tar.bz2
f5e4076e8562f4ad54fefeceaa37870d  btanks-0.8.7686.tar.bz2.from_srpm
[petro@host-12-116 Desktop]$

+ The package successfully compiles and builds into binary rpms on at least one primary architecture.
+ All build dependencies are listed in BuildRequires.
+ The package calls ldconfig in %post and %postun.
+ A package owns all directories that it creates.
+ Doesn't contain files, listed more than once in the spec file's %files listings.
+ Permissions on files are set properly.
+ The package has a %clean section, which contains rm -rf %{buildroot} (or $RPM_BUILD_ROOT).
+ The package consistently uses macros.
+ The package contains code, or permissable content.
+ No large documentation files
+ Everything, the package includes as %doc, does not affect the runtime of the application.
+ No header files
+ No static libraries
+ No pkgconfig(.pc) files
+ The package does not contain any .la libtool archives
+ The package includes a %{name}.desktop file

- The %{name}.desktop 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.

+ The package does not own files or directories already owned by other packages.
+ At the beginning of %install, the package runs rm -rf %{buildroot} (or $RPM_BUILD_ROOT). [25]
+ All filenames in rpm packages are valid UTF-8.


Ok, here are my final notes:

* please fix Source0, 
* fix spec to properly install desktop-file
* please, comment the above rpmlint warnings.

Comment 7 Alexey Torkhov 2009-03-17 15:46:03 UTC
Spec URL: http://atorkhov.fedorapeople.org/btanks.spec
SRPM URL: http://atorkhov.fedorapeople.org/btanks-0.8.7686-6.fc10.src.rpm

* Tue Mar 17 2009 Alexey Torkhov <atorkhov> - 0.8.7686-6
- Fixed source url
- Properly installing desktop files

> - rpmlint is not silent:

> btanks.i386: W: no-soname /usr/lib/libclunk.so
> btanks.i386: W: no-soname /usr/lib/libsdlx.so
> btanks.i386: W: no-soname /usr/lib/libbt.so
> btanks.i386: W: no-soname /usr/lib/libmrt.so

Those libraries are unversioned and thus are missing soname.

> btanks.i386: W: shared-lib-calls-exit /usr/lib/libclunk.so exit
> btanks.i386: W: shared-lib-calls-exit /usr/lib/libbt.so exit

Eh... that is how those libraries are written upstream.

> btanks-data.i386: W: no-documentation

No need to duplicate documentation in subpackage.

Comment 8 Alexey Torkhov 2009-03-17 15:55:51 UTC
Spec URL: http://atorkhov.fedorapeople.org/btanks.spec
SRPM URL: http://atorkhov.fedorapeople.org/btanks-0.8.7686-7.fc10.src.rpm

* Tue Mar 17 2009 Alexey Torkhov <atorkhov> - 0.8.7686-7
- Add forgotten desktop-file-utils build requires

Comment 9 Alexey Torkhov 2009-03-17 16:03:50 UTC
Spec URL: http://atorkhov.fedorapeople.org/btanks.spec
SRPM URL: http://atorkhov.fedorapeople.org/btanks-0.8.7686-7.fc10.src.rpm

* Tue Mar 17 2009 Alexey Torkhov <atorkhov> - 0.8.7686-7
- Add forgotten desktop-file-utils build requires
- Fixing bad BuildRoot

Comment 10 Peter Lemenkov 2009-03-17 16:07:36 UTC
Ok, all issues mentioned above, has been resolved (or, at least, commented), so this package is


APPROVED

Comment 11 Alexey Torkhov 2009-03-17 16:19:22 UTC
New Package CVS Request
=======================
Package Name: btanks
Short Description: Funny battle game with tanks
Owners: atorkhov
Branches: F-9 F-10
InitialCC:

Comment 12 Kevin Fenzi 2009-03-18 03:26:38 UTC
cvs done.

Comment 13 Fedora Update System 2009-03-18 09:17:50 UTC
btanks-0.8.7686-8.fc9 has been submitted as an update for Fedora 9.
http://admin.fedoraproject.org/updates/btanks-0.8.7686-8.fc9

Comment 14 Fedora Update System 2009-03-18 09:18:19 UTC
btanks-0.8.7686-8.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/btanks-0.8.7686-8.fc10

Comment 15 Fedora Update System 2009-03-18 18:55:23 UTC
btanks-0.8.7686-8.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 16 Fedora Update System 2009-03-18 19:11:27 UTC
btanks-0.8.7686-8.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.