Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1464778 - Review Request: whichwayisup - 2D platform game with a slight rotational twist
Summary: Review Request: whichwayisup - 2D platform game with a slight rotational twist
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Wart
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: FE-GAMESIG
TreeView+ depends on / blocked
 
Reported: 2017-06-25 15:54 UTC by Andrea Musuruane
Modified: 2017-09-20 08:45 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-09-03 22:19:19 UTC
Type: ---
Embargoed:
wart: fedora-review+


Attachments (Terms of Use)

Description Andrea Musuruane 2017-06-25 15:54:51 UTC
Spec URL: https://www.dropbox.com/sh/46vz8vz5rmxx0ac/AADLlEEIDcFazfpKuVQJcs53a/reviews/whichwayisup.spec?dl=0
SRPM URL: https://www.dropbox.com/sh/46vz8vz5rmxx0ac/AAADapd5kbKZW8z6cH6BJvG7a/reviews/whichwayisup-0.7.9-1.fc25.src.rpm?dl=0

Description:
A traditional and challenging 2D platform game with a slight rotational 
twist. Help a mysterious big-eared salaryman named Guy find his keys in a 
labyrinth of dangers and bad dialogue.

Fedora Account System Username: musuruan

Comment 1 Artur Frenszek-Iwicki 2017-06-25 16:25:52 UTC
Ha, I was just finishing packaging this. If you're interested, you can take a look at my package here: https://svgames.pl/fedora/whichwayisup-0.7.9-1.src.rpm

Anyway, regarding your package:
- There's no appdata.xml file (you can borrow it from my package)
- There are Thumbs.db files present in the built package
- fedora-review complains about using both $RPM_BUILD_ROOT and %{buildroot} in the spec file

Comment 2 Björn 'besser82' Esser 2017-06-25 18:03:24 UTC
Some other hints on the spec-file:

> URL:            http://www.oletus.fi/static/whichwayisup/
> Source0:        http://www.oletus.fi/static/whichwayisup/%{name}_b%{pkgversion}.zip

URL should NOT end with a trailing slash '/') and you can shorten and simplify those really good using:

URL:            http://www.oletus.fi/static/${name}
Source0:        %{url}/%{name}_b%{pkgversion}.zip


> %setup -qn %{name}
> %patch0 -p1

Using the `autosetup`-macro is preferred (and support since el5) for new packages.  It supports automatic patching and all:

%autosetup -p 1


> install -d %{buildroot}%{_bindir}
> install -m 755 -p %{SOURCE1} %{buildroot}%{_bindir}/%{name}

This applies to most of the code using `install`.  You can do all of this in one line and mode SHOULD be set in four-digit octal (e.g. 0755 / 0644):

install -Dpm 0755 %{SOURCE1} %{buildroot}%{_bindir}/%{name}


> %{_mandir}/man6/*

Should be:  %{_mandir}/man6/%{name}.6*


I'm not too happy with the wrapper script…  You shouldn't install that from a static file as is…  Instead you should auto-generate that from inside the spec-file (don't forget to have BR: python2-devel):

%{__cat} << EOF > %{buildroot}%{_bindir}/%{name}
#!/bin/sh
set -e

pushd %{_datadir}/%{name}
%{__python2} -s run_game.py "$@"
popd
EOF


At last I'd recommend using rpm-defined macros instead of plain command invocation (my personal preference, left open to you):

* %{__sed} instead of `sed`
* %{__install} instead of `install`
* %{__cp} instead of `cp`
* %{__mkdir_p} instead of `mkdir -p`
* %{__rm} instead of `rm`
* %{__ln_s} instead of `ln -s`


***


Spec-file and srpm are no direct downloads:

$ fedora-review -m fedora-rawhide-x86_64 -b 1464778 ;
INFO: Processing bugzilla bug: 1464778
INFO: Getting .spec and .srpm Urls from : 1464778
INFO:   --> SRPM url: https://svgames.pl/fedora/whichwayisup-0.7.9-1.src.rpm
INFO:   --> Spec url: https://www.dropbox.com/sh/46vz8vz5rmxx0ac/AADLlEEIDcFazfpKuVQJcs53a/reviews/whichwayisup.spec
INFO: Using review directory: /home/besser82/vm_shared/fedora/review/1464778-whichwayisup
INFO: Downloading .spec and .srpm files
error: line 1: Unknown tag: <!DOCTYPE html><html lang="en" xmlns:fb="http://ogp.me/ns/fb#" xml:lang="en" class="maestro" xmlns="http://www.w3.org/1999/xhtml">
ERROR: "Can't parse specfile: can't parse specfile\n" (logs in /home/besser82/.cache/fedora-review.log)

Comment 3 Artur Frenszek-Iwicki 2017-06-25 18:12:39 UTC
Björn, regarding macros for system executables, the packaging guidelines actually say to avoid them:
> Macro forms of system executables SHOULD NOT be used except when there is a need to allow the location of those executables to be configurable. For example, rm should be used in preference to %{__rm}, but %{__python} is acceptable. 
https://fedoraproject.org/wiki/Packaging:Guidelines#Macros

Comment 4 Andrea Musuruane 2017-06-25 20:06:54 UTC
(In reply to Iwicki Artur from comment #1)
> Ha, I was just finishing packaging this. If you're interested, you can take
> a look at my package here:
> https://svgames.pl/fedora/whichwayisup-0.7.9-1.src.rpm
> 
> Anyway, regarding your package:
> - There's no appdata.xml file (you can borrow it from my package)
> - There are Thumbs.db files present in the built package
> - fedora-review complains about using both $RPM_BUILD_ROOT and %{buildroot}
> in the spec file

I had a look at your spec file. It has some interesting things. I'll try to merge them in the coming days. Thank you.

Comment 5 Andrea Musuruane 2017-06-25 20:30:39 UTC
(In reply to Björn "besser82" Esser from comment #2)
> Some other hints on the spec-file:
> 
> > URL:            http://www.oletus.fi/static/whichwayisup/
> > Source0:        http://www.oletus.fi/static/whichwayisup/%{name}_b%{pkgversion}.zip
> 
> URL should NOT end with a trailing slash '/') 

Actually the reverse is true. URL should end with a trailing slash, otherwise you'll get HTTP status 301.

> and you can shorten and
> simplify those really good using:
> 
> URL:            http://www.oletus.fi/static/${name}
> Source0:        %{url}/%{name}_b%{pkgversion}.zip

I think this is less legible.

> > %setup -qn %{name}
> > %patch0 -p1
> 
> Using the `autosetup`-macro is preferred (and support since el5) for new
> packages.  It supports automatic patching and all:
> 
> %autosetup -p 1

Right now there is just one patch. It was not the case when I started to write the spec file. 

Using autosetup all the patches need to have the same strip level. Therefore, at the time, I couldn't use this macro.

> > > install -d %{buildroot}%{_bindir}
> > install -m 755 -p %{SOURCE1} %{buildroot}%{_bindir}/%{name}
> 
> This applies to most of the code using `install`.  You can do all of this in
> one line and mode SHOULD be set in four-digit octal (e.g. 0755 / 0644):
> 
> install -Dpm 0755 %{SOURCE1} %{buildroot}%{_bindir}/%{name}

I guess this is just a matter of taste. 

Moreover, 3 digits are fine to specify the file/directory permissions. From the install man page:

       -m, --mode=MODE
              set permission mode (as in chmod), instead of rwxr-xr-x

And from the chmod man page:

       A numeric mode is from one to  four  octal  digits  (0-7),  derived  by
       adding up the bits with values 4, 2, and 1.  Omitted digits are assumed
       to be leading zeros.

Moreover the guidelines just state that "Permissions on files MUST be set properly [...]":
https://fedoraproject.org/wiki/Packaging:Guidelines#File_Permissions

> > %{_mandir}/man6/*
> 
> Should be:  %{_mandir}/man6/%{name}.6*

Why? There is only one file in that directory and it found correctly:

$ rpm -ql whichwayisup | grep man
/usr/share/man/man6/whichwayisup.6.gz

Moreover, the guidelines just state that "When installing man pages, note that they should be installed uncompressed as the build system will compress them as needed. The compression method may change, so it is important to reference the pages in the %files section with a pattern that takes this into account"
https://fedoraproject.org/wiki/Packaging:Guidelines#Manpages

> I'm not too happy with the wrapper script…  You shouldn't install that from
> a static file as is…  Instead you should auto-generate that from inside the
> spec-file (don't forget to have BR: python2-devel):
> 
> %{__cat} << EOF > %{buildroot}%{_bindir}/%{name}
> #!/bin/sh
> set -e
> 
> pushd %{_datadir}/%{name}
> %{__python2} -s run_game.py "$@"
> popd
> EOF

I think that having the wrapper file (and desktop file, and appdata file, etc) as a different file improves readability a lot. Moreover, version control is more efficient using different files.

> At last I'd recommend using rpm-defined macros instead of plain command
> invocation (my personal preference, left open to you):
> 
> * %{__sed} instead of `sed`
> * %{__install} instead of `install`
> * %{__cp} instead of `cp`
> * %{__mkdir_p} instead of `mkdir -p`
> * %{__rm} instead of `rm`
> * %{__ln_s} instead of `ln -s`

This is actually deprecated. 

Macro forms of system executables SHOULD NOT be used except when there is a need to allow the location of those executables to be configurable. For example, rm should be used in preference to %{__rm}, but %{__python} is acceptable. 

https://fedoraproject.org/wiki/Packaging:Guidelines#Macros

> ***
> 
> 
> Spec-file and srpm are no direct downloads:
> 
> $ fedora-review -m fedora-rawhide-x86_64 -b 1464778 ;
> INFO: Processing bugzilla bug: 1464778
> INFO: Getting .spec and .srpm Urls from : 1464778
> INFO:   --> SRPM url: https://svgames.pl/fedora/whichwayisup-0.7.9-1.src.rpm
> INFO:   --> Spec url:
> https://www.dropbox.com/sh/46vz8vz5rmxx0ac/AADLlEEIDcFazfpKuVQJcs53a/reviews/
> whichwayisup.spec
> INFO: Using review directory:
> /home/besser82/vm_shared/fedora/review/1464778-whichwayisup
> INFO: Downloading .spec and .srpm files
> error: line 1: Unknown tag: <!DOCTYPE html><html lang="en"
> xmlns:fb="http://ogp.me/ns/fb#" xml:lang="en" class="maestro"
> xmlns="http://www.w3.org/1999/xhtml">
> ERROR: "Can't parse specfile: can't parse specfile\n" (logs in
> /home/besser82/.cache/fedora-review.log)

This is due to dropbox. Unluckily right now I have no other way to share spec and SRPM files.

Comment 6 Neal Gompa 2017-06-26 00:18:20 UTC
(In reply to Andrea Musuruane from comment #5)
> 
> This is due to dropbox. Unluckily right now I have no other way to share
> spec and SRPM files.

Every Fedora contributor has access to fedorapeople space. You can use this as a distribution space for packages being reviewed: https://fedoraproject.org/wiki/Infrastructure/fedorapeople.org

Comment 7 Andrea Musuruane 2017-06-26 19:30:43 UTC
Thanks Neal, I totally forgot about fedorapeople.org :-/

Spec URL: https://musuruan.fedorapeople.org/whichwayisup.spec
SRPM URL: https://musuruan.fedorapeople.org/whichwayisup-0.7.9-2.fc25.src.rpm

Changelog:
- Removed wrapper script and changed data path in launcher script
- Added a patch from Debian to initialize only required pygame modules
- Added AppData file
- Removed Thumbs.db file (Windows Explorer thumbnail database)
- Fixed macro style
- Minor fixes

Comment 8 rugk 2017-07-03 21:03:01 UTC
"Removed Thumbs.db file (Windows Explorer thumbnail database)"

Hah, you were caught (red-handed) developing/working on Windows… ;)

In any case once this package is in bodhi or such a test instance, I would happily test it…

Comment 9 Andrea Musuruane 2017-07-08 19:14:06 UTC
Spec URL: https://musuruan.fedorapeople.org/whichwayisup.spec
SRPM URL: https://musuruan.fedorapeople.org/whichwayisup-0.7.9-3.fc25.src.rpm

Changelog:
- Added missing BR

Comment 10 Wart 2017-08-22 02:11:56 UTC
Looks like all of the issues have been resolved in the above comments.

I feel that the two rpmlint warnings are safe to ignore:

* spelling error is intentional based on upstream's web page
* dangling symlink to font is unavoidable due to fedora's packaging guidelines

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

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



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

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.
[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 %license.
[x]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "Unknown or generated". 143 files have unknown license.
     Detailed output of licensecheck in /usr/local/src/fedora/rpmbuild
     /review-whichwayisup/licensecheck.txt
[x]: If the package is under multiple licenses, the licensing breakdown
     must be documented in the spec.
[x]: Package contains no bundled libraries without FPC exception.
[x]: Changelog in prescribed format.
[x]: Sources contain only permissible code or content.
[-]: Development files must be in a -devel package
[-]: 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]: gtk-update-icon-cache is invoked in %postun and %posttrans if package
     contains icons.
[x]: Package is not known to require an ExcludeArch tag.
[-]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of 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]: Package requires other packages for directories it uses.
[x]: 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]: Macros in Summary, %description expandable at SRPM build time.
[x]: Package contains desktop file if it is a GUI application.
[x]: Package installs a %{name}.desktop using desktop-file-install or
     desktop-file-validate if there is such a file.
[x]: Dist tag is present.
[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 does not use a name that already exists.
[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
[x]: File names are valid UTF-8.
[x]: Packages must not store files under /srv, /opt or /usr/local

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

Generic:
[x]: Avoid bundling fonts in non-fonts packages.
     Note: Package contains font files
[x]: If the source package does not include license text(s) as a separate
     file from upstream, the packager SHOULD query upstream to include it.
[ ]: 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.
[-]: 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.
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]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: Sources can be downloaded from URI in Source: tag
[x]: SourceX is a working URL.
[x]: Spec use %global instead of %define unless justified.

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

Generic:
[x]: Rpmlint is run on all installed packages.
     Note: There are rpmlint messages (see attachment).
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: whichwayisup-0.7.9-3.fc26.noarch.rpm
          whichwayisup-0.7.9-3.fc26.src.rpm
whichwayisup.noarch: W: spelling-error %description -l en_US salaryman -> salary man, salary-man, Marsala
whichwayisup.noarch: W: dangling-symlink /usr/share/whichwayisup/data/misc/Vera.ttf /usr/share/fonts/bitstream-vera/Vera.ttf
whichwayisup.src: W: spelling-error %description -l en_US salaryman -> salary man, salary-man, Marsala
2 packages and 0 specfiles checked; 0 errors, 3 warnings.




Rpmlint (installed packages)
----------------------------
whichwayisup.noarch: W: spelling-error %description -l en_US salaryman -> salary man, salary-man, Marsala
whichwayisup.noarch: W: dangling-symlink /usr/share/whichwayisup/data/misc/Vera.ttf /usr/share/fonts/bitstream-vera/Vera.ttf
1 packages and 0 specfiles checked; 0 errors, 2 warnings.



Requires
--------
whichwayisup (rpmlib, GLIBC filtered):
    /bin/sh
    /usr/bin/python2
    bitstream-vera-sans-fonts
    hicolor-icon-theme
    pygame



Provides
--------
whichwayisup:
    appdata()
    appdata(whichwayisup.appdata.xml)
    application()
    application(whichwayisup.desktop)
    whichwayisup



Source checksums
----------------
http://www.oletus.fi/static/whichwayisup/whichwayisup_b079.zip :
  CHECKSUM(SHA256) this package     : bcc2b7fc8719a8e055969c8eac099b7c40b9d68f36ba1f83d690216bdcdd51f6

Comment 11 Andrea Musuruane 2017-08-22 17:47:08 UTC
Thanks for the review, Wart!

Comment 12 Gwyn Ciesla 2017-08-22 18:01:14 UTC
(fedrepo-req-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/whichwayisup

Comment 13 Fedora Update System 2017-08-26 12:26:48 UTC
whichwayisup-0.7.9-3.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-61c13c84db

Comment 14 Fedora Update System 2017-08-26 12:26:58 UTC
whichwayisup-0.7.9-3.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-e705f0a2fe

Comment 15 Fedora Update System 2017-08-26 22:37:08 UTC
whichwayisup-0.7.9-3.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-e705f0a2fe

Comment 16 Fedora Update System 2017-08-26 22:38:07 UTC
whichwayisup-0.7.9-3.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-61c13c84db

Comment 17 Fedora Update System 2017-09-03 22:19:19 UTC
whichwayisup-0.7.9-3.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.

Comment 18 Fedora Update System 2017-09-04 05:49:59 UTC
whichwayisup-0.7.9-3.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 19 rugk 2017-09-07 23:09:38 UTC
Can we somehow get it into GNOME software? AFAIK just somemetadata is needed for this.

Comment 20 Artur Frenszek-Iwicki 2017-09-08 05:38:14 UTC
Said metadata is present in the package - it's the .appdata.xml file. It's just that Fedora doesn't immediately rebuilt the catalog for GNOME Software - it's done periodically, every week or two weeks (IIRC). Just wait a few days.

Comment 21 rugk 2017-09-08 22:35:43 UTC
Great! Thanks for all your work!

Comment 22 rugk 2017-09-20 07:25:54 UTC
Yet another thing: Why is it marked as "proprietary" in the software center? I think all source code is freely available.

Also the German translation in the app description is missing. Can I help somewhere to translate it?

Comment 23 Artur Frenszek-Iwicki 2017-09-20 08:45:58 UTC
I'm not entirely sure, but I think the GNOME Software Center simply looks at the License: tag in the RPM and makes a free/proprietary distinction based on that.

I checked the tag in the package source and the value is set properly, so this seems to me like a bug in the SC.


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