Bug 890859 - Review Request: scopy - Application to play to Italian card game Scopa
Review Request: scopy - Application to play to Italian card game Scopa
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: Package Review (Show other bugs)
rawhide
All Linux
unspecified Severity medium
: ---
: ---
Assigned To: Nobody's working on this, feel free to take it
Fedora Extras Quality Assurance
:
: 890854 890856 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-12-30 13:37 EST by Antonio Trande
Modified: 2013-06-05 16:24 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-06-05 16:24:22 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Antonio Trande 2012-12-30 13:37:19 EST
Spec URL: http://sagitter.fedorapeople.org/scopy.spec
SRPM URL: http://sagitter.fedorapeople.org/scopy-0.4.2-1.fc18.src.rpm

Description: ScoPy is an application written in Python to play to Scopa, 
a famous Italian card game.

Fedora Account System Username: sagitter

Currently, this application has HTML 'how to play' files only in Italian language. If absolutely fundamental, I could contact the upstream for an English translation. 

$ rpmlint scopy-0.4.2-1.fc18.noarch.rpm
scopy.noarch: W: no-manual-page-for-binary scopy
1 packages and 0 specfiles checked; 0 errors, 1 warnings.

$ rpmlint scopy-0.4.2-1.fc18.src.rpm
1 packages and 0 specfiles checked; 0 errors, 0 warnings.

$ rpmlint scopy.spec
0 packages and 1 specfiles checked; 0 errors, 0 warnings.
Comment 1 Antonio Trande 2012-12-30 13:41:23 EST
*** Bug 890856 has been marked as a duplicate of this bug. ***
Comment 2 Antonio Trande 2012-12-30 14:20:51 EST
*** Bug 890854 has been marked as a duplicate of this bug. ***
Comment 3 Antonio Trande 2012-12-30 17:40:38 EST
Built successfully in Koji:

http://koji.fedoraproject.org/koji/taskinfo?taskID=4827659
Comment 4 Antonio Trande 2012-12-31 06:27:28 EST
Release tag was wrong. 
Corrected.

Spec URL: http://sagitter.fedorapeople.org/scopy.spec
SRPM URL: http://sagitter.fedorapeople.org/scopy-0.4.2-2.fc18.src.rpm
Comment 5 Michael Schwendt 2012-12-31 10:14:17 EST
Only a few questions raised by the spec file, since I'm short on time:


> # Turn off the brp-python-bytecompile script

_Why_ is it turnt off?


> %global __python %{__python3}

> BuildRequires: python2-devel 
> BuildRequires: python3-devel

Both?

  $ rpm --query --Requires scopy|grep py
  /usr/bin/python

That would be Python 2.
On the contrary:

  $ cat /usr/bin/scopy 
  #!/bin/bash
  cd /usr/share/scopy/src
  env python scopy.py

That would be like "#! /usr/bin/env python", which is discouraged. Have found only this:

http://fedoraproject.org/wiki/Script_Interpreters_%28draft%29
http://fedoraproject.org/wiki/Packaging:Python


> # Manually invoke the python byte compile macro for file that needs byte
> # compilation.

Why?

> %py_byte_compile %{__python3} $RPM_BUILD_ROOT%{_datadir}/src/Actions/Multiplayer.py

That gives an error in the build.log. The path is wrong. %name is missing.


> desktop-file-edit                                            \
> --remove-category=Game                                       \
> ${RPM_BUILD_ROOT}%{_datadir}/applications/%{name}.desktop
> 
> desktop-file-edit                                            \
> --add-category="Game;"                                       \
> ${RPM_BUILD_ROOT}%{_datadir}/applications/%{name}.desktop    

desktop-file-edit fixes a missing ';' automatically when you use it to edit a .desktop file. It warns about that. And if you remove/add the category explicitly, it would also append/insert a needed ';' automatically.

It's possible to execute it once with multiple edit options.


> Requires: gtk3

Probably, but there are gtk2 files included, too. No idea yet how that all fits together. Similarly confusing (albeit entirely harmless):

  $ rpmls scopy|grep build
  drwxr-xr-x  /usr/share/scopy/build
  drwxr-xr-x  /usr/share/scopy/build/scripts-3.3
  -rwxr-xr-x  /usr/share/scopy/build/scripts-3.3/scopy

  $ cat /usr/share/scopy/build/scripts-3.3/scopy
  #!/bin/bash
  cd /usr/share/scopy/src
  env python scopy.py
Comment 6 Antonio Trande 2012-12-31 10:39:07 EST
(In reply to comment #5)
> Only a few questions raised by the spec file, since I'm short on time:
> 
> 
> > # Turn off the brp-python-bytecompile script
> 
> _Why_ is it turnt off?
> 
> 
> > %global __python %{__python3}
> 
> > BuildRequires: python2-devel 
> > BuildRequires: python3-devel
> 
> Both?
> 
>   $ rpm --query --Requires scopy|grep py
>   /usr/bin/python
> 
> That would be Python 2.
> On the contrary:
> 
>   $ cat /usr/bin/scopy 
>   #!/bin/bash
>   cd /usr/share/scopy/src
>   env python scopy.py
> 
> That would be like "#! /usr/bin/env python", which is discouraged. Have
> found only this:
> 
> http://fedoraproject.org/wiki/Script_Interpreters_%28draft%29
> http://fedoraproject.org/wiki/Packaging:Python
> 
> 
> > # Manually invoke the python byte compile macro for file that needs byte
> > # compilation.
> 
> Why?
> 
> > %py_byte_compile %{__python3} $RPM_BUILD_ROOT%{_datadir}/src/Actions/Multiplayer.py
> 
> That gives an error in the build.log. The path is wrong. %name is missing.

Hi Michael.

Probably I have badly comprehended
http://fedoraproject.org/wiki/Packaging:Python#Bytecompiling_with_the_correct_python_version

or the error appears.

This is the error that leads me to do use python byte compile macro:

+ /usr/lib/rpm/brp-python-bytecompile /usr/bin/python 1
Bytecompiling .py files below /home/sagitter/rpmbuild/BUILDROOT/scopy-0.4.2-2.fc18.x86_64/usr/lib/python2.7/ using /usr/bin/python2.7
Compiling /home/sagitter/rpmbuild/BUILDROOT/scopy-0.4.2-2.fc18.x86_64/usr/share/scopy/src/Actions/Multiplayer.py ...
Sorry: IndentationError: ('unindent does not match any outer indentation level', ('/usr/share/scopy/src/Actions/Multiplayer.py', 90, 27, '\tdef crea_win_multi(self):\n'))
Comment 7 Michael Schwendt 2012-12-31 11:09:19 EST
That refers to:

  http://docs.python.org/release/2.7.3/reference/lexical_analysis.html#indentation

If the indentation used in file Multiplayer.py is incorrect, bytecompiling it manually won't work either. You would need to repair the indentation for the code to work.

It seems to me the file Multiplayer.py is unfinished and not used yet. Deleting it and reporting this error to the developers would be a work-around. Unless you know where/how the file is used and how to activate the multiplayer/online gaming mode.
Comment 8 Antonio Trande 2012-12-31 11:23:31 EST
(In reply to comment #6)
> (In reply to comment #5)
> > Only a few questions raised by the spec file, since I'm short on time:
> > 
> > 
> > > # Turn off the brp-python-bytecompile script
> > 
> > _Why_ is it turnt off?
> > 
> > 
> > > %global __python %{__python3}
> > 
> > > BuildRequires: python2-devel 
> > > BuildRequires: python3-devel
> > 
> > Both?
> > 
> >   $ rpm --query --Requires scopy|grep py
> >   /usr/bin/python
> > 
> > That would be Python 2.
> > On the contrary:
> > 
> >   $ cat /usr/bin/scopy 
> >   #!/bin/bash
> >   cd /usr/share/scopy/src
> >   env python scopy.py
> > 
> > That would be like "#! /usr/bin/env python", which is discouraged. Have
> > found only this:
> > 
> > http://fedoraproject.org/wiki/Script_Interpreters_%28draft%29
> > http://fedoraproject.org/wiki/Packaging:Python
> > 
> > 
> > > # Manually invoke the python byte compile macro for file that needs byte
> > > # compilation.
> > 
> > Why?
> > 
> > > %py_byte_compile %{__python3} $RPM_BUILD_ROOT%{_datadir}/src/Actions/Multiplayer.py
> > 
> > That gives an error in the build.log. The path is wrong. %name is missing.

Right. I have fixed it and probably (after to have read again the error) Bytecompiling is not involved.

"IdentationError" is a write error. Or am I wrong again ?
Comment 9 Antonio Trande 2012-12-31 11:27:54 EST
(In reply to comment #7)
> That refers to:
> 
>  
> http://docs.python.org/release/2.7.3/reference/lexical_analysis.
> html#indentation
> 
> If the indentation used in file Multiplayer.py is incorrect, bytecompiling
> it manually won't work either. You would need to repair the indentation for
> the code to work.
> 
> It seems to me the file Multiplayer.py is unfinished and not used yet.
> Deleting it and reporting this error to the developers would be a
> work-around. Unless you know where/how the file is used and how to activate
> the multiplayer/online gaming mode.

Ok.

I have been poorly careful and I have done an useless work.
Comment 10 Antonio Trande 2012-12-31 13:28:24 EST
Added line for removing Multiplayer.py file.
Grouped desktop-file-edit tasks.
Changelog updated. 


Spec URL: http://sagitter.fedorapeople.org/scopy.spec
SRPM URL: http://sagitter.fedorapeople.org/scopy-0.4.2-3.fc18.src.rpm
Comment 11 Antonio Trande 2013-01-01 08:53:29 EST
(In reply to comment #5)
> On the contrary:
> 
>   $ cat /usr/bin/scopy 
>   #!/bin/bash
>   cd /usr/share/scopy/src
>   env python scopy.py
> 
> That would be like "#! /usr/bin/env python", which is discouraged. Have
> found only this:
> 
> http://fedoraproject.org/wiki/Script_Interpreters_%28draft%29
> http://fedoraproject.org/wiki/Packaging:Python
> 

It seems me that's prohibited in Fedora
http://lists.fedoraproject.org/pipermail/packaging/2009-July/006248.html

Are there news about this ?
Is there anything that I can do ?
Comment 12 Michael Schwendt 2013-01-01 09:18:14 EST
The solution is mentioned on those pages: _not_ use "env" but execute system's default python directly as /usr/bin/python:

  #!/bin/bash
  cd /usr/share/scopy/src
  python scopy.py

Then examine the RPM dependencies of the built package. If a dependency on /usr/bin/python is missing, add one in the spec file. Else keep an automatically added one, if it exists.
Comment 13 Michael Schwendt 2013-01-01 09:19:09 EST
Argh ;)  forgot /usr/bin, of course:

#!/bin/bash
cd /usr/share/scopy/src
/usr/bin/python scopy.py
Comment 14 Antonio Trande 2013-01-01 10:20:49 EST
Added line for editing '/usr/bin/scopy' file.
Changelog updated.

Spec URL: http://sagitter.fedorapeople.org/scopy.spec
SRPM URL: http://sagitter.fedorapeople.org/scopy-0.4.2-4.fc18.src.rpm
Comment 15 Antonio Trande 2013-01-03 05:49:57 EST
I'm preparing the manpage in English and in Italian for ScoPy; I will insert them in the rpm package.

I'm trying to contact the upstream too.

Are there specific Guidelines for manpages ?
It seems me that they are not mentioned in the Fedora Project wiki pages.
Comment 16 Michael Schwendt 2013-01-03 08:26:34 EST
There is just this, linked from the ReviewGuidelines page:

| SHOULD: your package should contain man pages for binaries/scripts.
| If it doesn't, work with upstream to add them where they make sense.
| [32]

It's a SHOULD, not a MUST, and the "where they make sense" is worth noting, too. The guidelines are weak at trying to answer the _why_ or _when_:

| [32] http://fedoraproject.org/wiki/Packaging/Guidelines#Man_pages
|
| Man pages are the traditional method of getting help on a unix system.
| Packages should contain man pages for all binaries/scripts. If it doesn't,
| work with upstream to add them. Sometimes, other distributions (notably
| Debian), have man pages for programs. You can use those as a starting point. 

Does /usr/bin/scopy take any command-line options at all? Else the man page might only mention few details, such as Author, Copyright/License and a brief description of what the program does. Perhaps a pointer at the HTML documentation and a hint that it is nothing like "scp". *grin*   If "better than nothing" is the only goal, someone may call such a manual "helpful". I find it very unimportant. Sure, "man scopy" and "man 6 scopy" would work then, but if it were not available, that wouldn't be a big loss for a completely optional game package.

IMO, a manual page for a game with a graphical user-interface, with documentation in HTML, and with RPM package details (description, license, URL, to name a few) doesn't make much sense.

Translating the Italian documentation into English could be a more useful contribution to the Scopy project.

As with other work, a manual page requires somebody to create/contribute the file(s) and keep them accurate during the life-time of the software/package.
Comment 17 Michael Schwendt 2013-01-03 08:29:43 EST
Btw, if I were the Scopy developer, I'd rather give it a longer file name, such as /usr/bin/scopy-card-game because I don't see any value in keeping it very short and ambiguous (-> "copy").

;-)
Comment 18 Antonio Trande 2013-01-03 08:44:50 EST
(In reply to comment #16)
> There is just this, linked from the ReviewGuidelines page:
> 
> | SHOULD: your package should contain man pages for binaries/scripts.
> | If it doesn't, work with upstream to add them where they make sense.
> | [32]
> 
> It's a SHOULD, not a MUST, and the "where they make sense" is worth noting,
> too. The guidelines are weak at trying to answer the _why_ or _when_:
> 
> | [32] http://fedoraproject.org/wiki/Packaging/Guidelines#Man_pages
> |
> | Man pages are the traditional method of getting help on a unix system.
> | Packages should contain man pages for all binaries/scripts. If it doesn't,
> | work with upstream to add them. Sometimes, other distributions (notably
> | Debian), have man pages for programs. You can use those as a starting
> point. 
> 
> Does /usr/bin/scopy take any command-line options at all? Else the man page
> might only mention few details, such as Author, Copyright/License and a
> brief description of what the program does. Perhaps a pointer at the HTML
> documentation and a hint that it is nothing like "scp". *grin*   If "better
> than nothing" is the only goal, someone may call such a manual "helpful". I
> find it very unimportant. Sure, "man scopy" and "man 6 scopy" would work
> then, but if it were not available, that wouldn't be a big loss for a
> completely optional game package.

Hi Michael.
Thank you again for your availability.

I don't know how much this game is known out of Italy; this is main reason because I thought to translate in English its documentation.
The knowledge of this game and of its rules is fundamental to know how it works.     

> 
> IMO, a manual page for a game with a graphical user-interface, with
> documentation in HTML, and with RPM package details (description, license,
> URL, to name a few) doesn't make much sense.
> 
> Translating the Italian documentation into English could be a more useful
> contribution to the Scopy project.

This could be another valid option.

I'm waiting to know how upstream evaluates all that. :)
Comment 19 Antonio Trande 2013-02-26 12:53:21 EST
Update to version 0.1beta1.
It includes .html files and a manpage in English.

Please, tell me if they are comprehensible and complete.

SPEC url: http://sagitter.fedorapeople.org/ScoPy/scopy.spec
SRPM url: http://sagitter.fedorapeople.org/ScoPy/scopy-1.0-0.1.beta1.fc18.src.rpm
Comment 20 Antonio Trande 2013-06-05 16:24:22 EDT
This project seems not in operation. 
I prefer to close this review request.

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