Bug 1415331 - Review Request: enjarify - Translate Dalvik bytecode to equivalent Java bytecode
Summary: Review Request: enjarify - Translate Dalvik bytecode to equivalent Java bytecode
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Raphael Groner
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-20 22:09 UTC by Zbigniew Jędrzejewski-Szmek
Modified: 2017-03-08 13:28 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2017-03-07 13:21:24 UTC
Type: ---
Embargoed:
projects.rg: fedora-review+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Debian BTS 854515 0 None None None Never

Description Zbigniew Jędrzejewski-Szmek 2017-01-20 22:09:54 UTC
Spec URL: http://in.waw.pl/~zbyszek/fedora/python-enjarify.spec
SRPM URL: http://in.waw.pl/~zbyszek/fedora/python-enjarify-1.0.3-1.src.rpm
Description:
Android applications are Java programs that run on a customized
virtual machine, which is part of the Android operating system, the
Dalvik VM. Their bytecode differs from the bytecode of normal Java
applications.

Enjarify can translate the Dalvik bytecode back to equivalent Java
bytecode, which simplifies the analysis of Android applications.

This package supports python3 only. Will be used by diffoscope.

Fedora Account System Username: zbyszek

Comment 1 Raphael Groner 2017-02-07 17:44:10 UTC
Taken. Thanks for looking into bug #1385856. :)

Some general hints before I'll run official fedora-review:

- Please try to send your patches to upstream: manpage, install and start script.
 https://fedoraproject.org/wiki/Packaging:Guidelines#All_patches_should_have_an_upstream_bug_link_or_comment

- Why does upstream not provide a build/install environment? A proper build script can avoid confusion about right build flags. Maybe we can suggest setuptools.
 https://fedoraproject.org/wiki/Packaging:Python#Byte_compiling

- The sitelib folder should be in a separate subpackage python3-enjarify with support for the virtual provides of python-enjarify.
 https://fedoraproject.org/wiki/Packaging:Python#The_.25python_provide_macro

- Manpage is special documentation without the need to be marked with %doc.
 https://fedoraproject.org/wiki/Packaging:Guidelines#Manpages

- Please use also install -p for the manpage to preserve original timestamp.
 https://fedoraproject.org/wiki/Packaging:Guidelines#Timestamps

Comment 2 Zbigniew Jędrzejewski-Szmek 2017-02-07 20:55:54 UTC
Thank you for the review.

> - Please try to send your patches to upstream: manpage, install and start
> script.
>  https://fedoraproject.org/wiki/Packaging:
> Guidelines#All_patches_should_have_an_upstream_bug_link_or_comment
The man page is from debian. I submitted a bug report asking them to upstream it.

Upstream provides a much more involved script which tries to detect python3 and pypy, which is not suitable for Fedora, since we want to use %__python3 unconditionally. The script create in the spec file is one line and it's not suitable for upstream, for example `-O` is only useful for packaged applications where the user does not have write permission to the installation directory and byte-compilation is done externally.

> - Why does upstream not provide a build/install environment? A proper build
> script can avoid confusion about right build flags. Maybe we can suggest
> setuptools.
>  https://fedoraproject.org/wiki/Packaging:Python#Byte_compiling
This is what upstream recommends in the README. The installation is trivial, so I don't think this is much of an issue.
 
> - The sitelib folder should be in a separate subpackage python3-enjarify
> with support for the virtual provides of python-enjarify.
>  https://fedoraproject.org/wiki/Packaging:Python#The_.25python_provide_macro
I renamed the main package to enjarify. This actually matches what upstream uses for the project name better, and added the python3-subpackage and %python_provide.

> - Manpage is special documentation without the need to be marked with %doc.
>  https://fedoraproject.org/wiki/Packaging:Guidelines#Manpages
Fixed.
 
> - Please use also install -p for the manpage to preserve original timestamp.
>  https://fedoraproject.org/wiki/Packaging:Guidelines#Timestamps
Fixed.

Spec URL: http://in.waw.pl/~zbyszek/fedora/enjarify.spec
SRPM URL: http://in.waw.pl/~zbyszek/fedora/enjarify-1.0.3-1.src.rpm

Comment 3 Zbigniew Jędrzejewski-Szmek 2017-02-21 21:10:42 UTC
Raphael?

Comment 4 Raphael Groner 2017-02-22 19:52:51 UTC
Thanks for the reminder and sorry for my delayed response.

Test builds: https://koji.fedoraproject.org/koji/taskinfo?taskID=17996417

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

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


Issues:
=======
- Dist tag is present. It's mandatory to append %{?dist} to Release.
  https://fedoraproject.org/wiki/Packaging:DistTag
- Please also notice the SHOULD comments below.
  


===== 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]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "Apache (v2.0)", "Unknown or generated", "*No copyright* Apache
     (v2.0)". 6 files have unknown license. Detailed output of licensecheck
     in /home/builder/fedora-review/1415331-enjarify/licensecheck.txt
=> OK. Checked manually the unrecognized files.

[x]: License file installed when any subpackage combination is installed.
[x]: Package must own all directories that it creates.
     Note: Directories without known owners: /usr/lib/python3.6/site-
     packages, /usr/lib/python3.6
=> False positive.

[x]: 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]: 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 10240 bytes in 1 files.
[!]: Package complies to the Packaging Guidelines
=> See issue with dist tag.

[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 %license.
[x]: Package requires other packages for directories it uses.
[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 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
     %{name}.spec.
[x]: File names are valid UTF-8.
[x]: Packages must not store files under /srv, /opt or /usr/local

Python:
[x]: Python eggs must not download any dependencies during the build
     process.
[-]: A package which is used by another package via an egg interface should
     provide egg info.
[x]: Package meets the Packaging Guidelines::Python
[x]: Package contains BR: python2-devel or python3-devel
[x]: Binary eggs must be removed in %prep

===== 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).
[x]: Fully versioned dependency in subpackages if applicable.
     Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in
     python3-enjarify
=> False positive. This is a noarch package.

[?]: Package functions as described.
=> I don't know how to test. There are tests available at upstream, but
   also unkwon how to execute them, especially maybe in %check?

[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[-]: 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.
[!]: Packages should try to preserve timestamps of original installed
     files.
=> cp -ap enjarify %buildroot%python3_sitelib/

[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: enjarify-1.0.3-1.noarch.rpm
          python3-enjarify-1.0.3-1.noarch.rpm
          enjarify-1.0.3-1.src.rpm
enjarify.noarch: W: spelling-error Summary(en_US) bytecode -> byte code, byte-code, decorate
enjarify.noarch: W: spelling-error %description -l en_US bytecode -> byte code, byte-code, decorate
python3-enjarify.noarch: W: spelling-error Summary(en_US) bytecode -> byte code, byte-code, decorate
python3-enjarify.noarch: W: spelling-error %description -l en_US bytecode -> byte code, byte-code, decorate
enjarify.src: W: spelling-error Summary(en_US) bytecode -> byte code, byte-code, decorate
enjarify.src: W: spelling-error %description -l en_US bytecode -> byte code, byte-code, decorate
3 packages and 0 specfiles checked; 0 errors, 6 warnings.




Rpmlint (installed packages)
----------------------------
sh: /usr/bin/python: No such file or directory
python3-enjarify.noarch: W: spelling-error Summary(en_US) bytecode -> byte code, byte-code, decorate
python3-enjarify.noarch: W: spelling-error %description -l en_US bytecode -> byte code, byte-code, decorate
enjarify.noarch: W: spelling-error Summary(en_US) bytecode -> byte code, byte-code, decorate
enjarify.noarch: W: spelling-error %description -l en_US bytecode -> byte code, byte-code, decorate
2 packages and 0 specfiles checked; 0 errors, 4 warnings.



Requires
--------
python3-enjarify (rpmlib, GLIBC filtered):
    python(abi)

enjarify (rpmlib, GLIBC filtered):
    /bin/sh
    python3-enjarify



Provides
--------
python3-enjarify:
    python3-enjarify

enjarify:
    enjarify



Source checksums
----------------
https://github.com/google/enjarify/archive/1.0.3/enjarify-1.0.3.tar.gz :
  CHECKSUM(SHA256) this package     : 0201e277d28a1e1dec817cddfb33f222558780a3b0692761eade084b826e4516
  CHECKSUM(SHA256) upstream package : 0201e277d28a1e1dec817cddfb33f222558780a3b0692761eade084b826e4516
https://anonscm.debian.org/cgit/android-tools/enjarify.git/plain/debian/enjarify.1 :
  CHECKSUM(SHA256) this package     : d45b59d85ecf96ed841283ce2aab8c6cb4cabfffad7ae3e18afd5b283c545051
  CHECKSUM(SHA256) upstream package : d45b59d85ecf96ed841283ce2aab8c6cb4cabfffad7ae3e18afd5b283c545051


Generated by fedora-review 0.6.1 (f03e4e7) last change: 2016-05-02
Command line :/usr/bin/fedora-review -v -m fedora-rawhide-x86_64 -b 1415331
Buildroot used: fedora-rawhide-x86_64
Active plugins: Python, Generic, Shell-api
Disabled plugins: Java, C/C++, fonts, SugarActivity, Ocaml, Perl, Haskell, R, PHP
Disabled flags: EXARCH, DISTTAG, EPEL5, BATCH, EPEL6

Comment 5 Zbigniew Jędrzejewski-Szmek 2017-02-23 16:28:30 UTC
(In reply to Raphael Groner from comment #4)
> Thanks for the reminder and sorry for my delayed response.
No problem. Thank you for the very thorough review.

> Issues:
> =======
> - Dist tag is present. It's mandatory to append %{?dist} to Release.
>   https://fedoraproject.org/wiki/Packaging:DistTag
Fixed.

> [?]: Package functions as described.
> => I don't know how to test. There are tests available at upstream, but
>    also unkwon how to execute them, especially maybe in %check?

I added a %check section. I had a long WTF?!!! moment, because I didn't know that .gitattributes can be used to silently skip file from the archive. I couldn't find a way to undo this, short of cloning the repo, removing the .gitattributes file, and commiting! (yes, git archive takes the .gitattributes from HEAD, not from working directory). One of the tests was failing, I filed an issue upstream, linked from the spec file.

This package will also be tested by diffoscope: it has a pretty extensive test suite. Once it's built, I'll make it a build dependency of diffoscope.

Note: there's an rpmlint warning about macro in comment. That's from %{version} in the tarball rebuild instructions. I'm keeping it that way so it's possible to run rpmspec -P and copy&paste the instructions into a shell.

> [!]: Packages should try to preserve timestamps of original installed
>      files.
> => cp -ap enjarify %buildroot%python3_sitelib/
Fixed.

Spec URL: http://in.waw.pl/~zbyszek/fedora/enjarify.spec
SRPM URL: http://in.waw.pl/~zbyszek/fedora/enjarify-1.0.3-1.src.rpm

Comment 6 Raphael Groner 2017-02-23 19:13:16 UTC
APPROVED

For the case of git snapshots, you should better note in Release which commit is actually used.
https://fedoraproject.org/wiki/Packaging:Versioning#Snapshot_packages

Comment 7 Zbigniew Jędrzejewski-Szmek 2017-02-23 19:15:17 UTC
Thanks.

It's still exactly release 1.0.3, except that the tarball is generated by hand.

Comment 8 Gwyn Ciesla 2017-02-23 19:26:56 UTC
Package request has been approved: https://admin.fedoraproject.org/pkgdb/package/rpms/enjarify

Comment 9 Raphael Groner 2017-03-02 00:36:11 UTC
Please add this bug as a reference to your updates in bodhi.

Comment 10 Fedora Update System 2017-03-02 01:54:10 UTC
diffoscope-77-2.fc24 enjarify-1.0.3-2.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2017-2b762e96e6

Comment 11 Fedora Update System 2017-03-02 01:54:17 UTC
diffoscope-77-2.fc25 enjarify-1.0.3-2.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-69f3ab1a22

Comment 12 Fedora Update System 2017-03-07 13:21:24 UTC
diffoscope-77-2.fc25, enjarify-1.0.3-2.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 13 Fedora Update System 2017-03-08 13:28:02 UTC
diffoscope-77-2.fc24, enjarify-1.0.3-2.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.


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