Bug 1187082 - Review Request: python-slowaes - An Implementation of AES in python
Summary: Review Request: python-slowaes - An Implementation of AES in python
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Piotr Popieluch
QA Contact: Fedora Extras Quality Assurance
Piotr Popieluch
URL:
Whiteboard:
Depends On:
Blocks: 1187084
TreeView+ depends on / blocked
 
Reported: 2015-01-29 10:20 UTC by Samuel Gyger
Modified: 2016-11-14 21:49 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-14 21:49:02 UTC
Type: ---
Embargoed:
piotr1212: fedora-review+


Attachments (Terms of Use)

Description Samuel Gyger 2015-01-29 10:20:18 UTC
Spec URL: http://people.ee.ethz.ch/~gygers/rpms/python-slowaes.spec
SRPM URL: http://people.ee.ethz.ch/~gygers/rpms/python-slowaes-0.1a1-1.fc21.src.rpm
Description: An Implementation of AES in python used in the bitcoin client electrum
Fedora Account System Username:gyger

Comment 1 Samuel Gyger 2015-01-29 10:23:11 UTC
This is my first package and I need a sponsor. I want to have electrum in fedora, as it is very useful.

There is also a koji build and a copr repository:
http://koji.fedoraproject.org/koji/taskinfo?taskID=8753884
https://copr.fedoraproject.org/coprs/gyger/electrum/

Comment 2 Pranav Kant 2015-02-06 21:33:28 UTC
This is an unofficial review.


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

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

Issues:
=======
- Package doesn't contain BR: python2-devel or python3-devel
  You must be more specific about the python version when defining BR.
- defattr is not needed in %files.
- Maybe put PKG-INFO in %doc ?
- Use versioned python macros. Unversioned macros are deprecated.
- Probably %prep need to remove egg-info.
- You should add egg-info files in %files.

===== 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.
[-]: 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]: 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". 1 files have unknown license.
[x]: Package contains no bundled libraries without FPC exception.
[x]: Changelog in prescribed format.
[x]: Sources contain only permissible code or content.
[!]: Each %files section contains %defattr if rpm < 4.4
[-]: 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.
[?]: 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.
[-]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Test run failed
[x]: Packages must not store files under /srv, /opt or /usr/local
[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 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.

Python:
[!]: Binary eggs must be removed in %prep
[?]: 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.
[!]: Package meets the Packaging Guidelines::Python
     Please see issues above.

===== 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]: Package functions as described.
[x]: Latest version is packaged.
[-]: Package does not include license text files separate from upstream.
[x]: 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]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: Sources can be downloaded from URI in Source: tag
[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]: SourceX is a working URL.
[x]: Spec use %global instead of %define unless justified.

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

Generic:
[-]: Large data in /usr/share should live in a noarch subpackage if package is
     arched.
[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: python-slowaes-0.1a1-1.fc21.noarch.rpm
          python-slowaes-0.1a1-1.fc21.src.rpm
python-slowaes.noarch: W: no-documentation
2 packages and 0 specfiles checked; 0 errors, 1 warnings.




Rpmlint (installed packages)
----------------------------
Cannot parse rpmlint output:


Requires
--------
python-slowaes (rpmlib, GLIBC filtered):
    python(abi)



Provides
--------
python-slowaes:
    python-slowaes



Source checksums
----------------
https://pypi.python.org/packages/source/s/slowaes/slowaes-0.1a1.tar.gz :
  CHECKSUM(SHA256) this package     : 83658ae54cc116b96f7fdb12fdd0efac3a4e8c7c7064e3fac3f4a881aa54bf09
  CHECKSUM(SHA256) upstream package : 83658ae54cc116b96f7fdb12fdd0efac3a4e8c7c7064e3fac3f4a881aa54bf09

Comment 3 Samuel Gyger 2015-02-07 21:01:23 UTC
Find a fixed SPEC file and SRPMS.
Spec URL: http://people.ee.ethz.ch/~gygers/rpms/python-slowaes.spec
SRPM URL: http://people.ee.ethz.ch/~gygers/rpms/python-slowaes-0.1a1-2.fc21.src.rpm

Fixed errors were all but:
 - queried upstream for LICENSE file but I don't think it will happen. (https://code.google.com/p/slowaes/issues/detail?id=21) The License is stated in the file header.
 - add egg info file in %files: See here https://fedoraproject.org/wiki/Packaging:Python_Eggs#Providing_Egg_Metadata_Using_Setuptools, it says the %{python2_sitelib}/* captures also .egg-info

Everything was rebuild in the COPR Repository.
A Koji build was run again: http://koji.fedoraproject.org/koji/taskinfo?taskID=8860643

Comment 4 Till Maas 2015-02-13 23:20:35 UTC
- the python_sitelib definition should probably use the __python2 macros and not the __python macro
- just removing the first line of aes.py might result in unintended changes when upstream removes the shebang, isn't it possible to add a pattern to sed?

Comment 5 Samuel Gyger 2015-02-14 17:01:36 UTC
Oh yes, I forgot that. Changed this now.
Added also the generic script for the Shebang line, as my sed knowledge is not big enough to script this differently.

Spec URL: http://people.ee.ethz.ch/~gygers/rpms/python-slowaes.spec
SRPM URL: http://people.ee.ethz.ch/~gygers/rpms/python-slowaes-0.1a1-3.fc21.src.rpm

New Build on copr: https://copr.fedoraproject.org/coprs/gyger/electrum/

Comment 6 William Moreno 2015-10-29 23:30:03 UTC
Do you want to continue this review?

Comment 7 Samuel Gyger 2015-10-30 08:02:51 UTC
If someone would look at the review afterwards, I would check it for actuality.

But yes, I'm still interested to get electrum into Fedora. I also got a list mail that unbundeling is not longer necessary, if this is the case it's perhaps better to have the library directly in electrum?

Comment 8 William Moreno 2015-11-05 21:59:22 UTC
If you to continue with this package review I can take it

Comment 9 Samuel Gyger 2015-11-07 21:18:14 UTC
So this is still the actual version, what else would you need? I think this spec file is ready to be build.
I don't have F22 yet, can the same src.rpm be used or to I have to install it?

I need a sponsor for this.

Comment 10 William Moreno 2015-11-09 16:59:57 UTC
I will take your review and I will be your sponsor to the packager group in Fedora.

You must:
1. Pacth the license of this project or work with upstream to include the license file in the tarball. You must use the %license macro in %%files.

2. This is a really simple package, but your spec is out of date to current python packaging guidelines, as part of the move to python3 by default in Fedora there is not more python-%{name} packages, all python libs must be python2-%{name} and python3-%{name}. So you must provides a python2-{name} subpackage and use the python provides macro.

3. Fedora 21 will become end of life soon so should use the py2build and py2install macros. See: https://fedoraproject.org/wiki/Packaging:Python

===================================

Also, so this is your firts package. I will ask you to do some informal reviews, note than I will need to take the review-request where you do informal reviews. Please see: https://fedoraproject.org/wiki/Package_Review_Process

Share the links of the bugs than you will be chequing please.

Comment 11 William Moreno 2016-01-06 19:33:32 UTC
Any update here?

Comment 12 Samuel Gyger 2016-04-26 21:06:38 UTC
Hey William, thank you for your offer.

I was stuck on fedora 21 for quite a while, but a new computer, enough power for virtualization got me running on packaging this stuff again.

Here the updated files with your inputs included.

Spec URL: http://people.ee.ethz.ch/~gygers/rpms/python-slowaes.spec
SRPM URL: http://people.ee.ethz.ch/~gygers/rpms/python-slowaes-0.1a1-5.fc23.src.rpm
Description: An Implementation of AES in python used in the bitcoin client electrum

Fedora Account System Username:gyger

This is a requirement for electrum
I need a sponsor too.

Koji: http://koji.fedoraproject.org/koji/taskinfo?taskID=13815220 (F23)

=====
For the informal reviews, I will try to do some, but I can't promise yet as they are quite time consuming.

Comment 13 Jonny Heggheim 2016-11-07 21:45:32 UTC
What is the update? Do you have done informal reviews? I am interested in getting Electrum and slowaes into Fedora.

Comment 14 Samuel Gyger 2016-11-07 22:30:23 UTC
Hey Jonny,
I didn't find the time. Feel free to take over, you can use all the Files I have Provided here. They are free to use under what ever license you want to use them.

Comment 15 Jonny Heggheim 2016-11-07 22:37:39 UTC
Ok, thanks for your feedback

Comment 16 Jonny Heggheim 2016-11-08 00:24:29 UTC
I am not sure if I should create a new ticket or re-use this, anyway just let me know if I should create a new ticket.

Here is an updated version based on the work of Samuel Gyger:

Spec URL: https://jonny.fedorapeople.org/python-slowaes/python-slowaes.spec
SRPM URL: https://jonny.fedorapeople.org/python-slowaes/python-slowaes-0.1a1-6.fc25.src.rpm
Description: A pure Python AES implementation
Fedora Account System Username: jonny


Anyone that would like to do a formal review?

Comment 17 Jonny Heggheim 2016-11-08 20:50:38 UTC
Koji build: http://koji.fedoraproject.org/koji/taskinfo?taskID=16357891

Comment 18 Piotr Popieluch 2016-11-11 22:42:13 UTC
Looks good, approved.

Thing to keep in mind is the non-numeric version number. This is only allowed when they increment properly otherwise it can cause update issues. I couldn't find upstreams versioning policy so not sure if it is.

I personally would include the license as a SOURCE, not patch it and I would use sed to remove the shebang. But this is ok.


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

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



===== 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". 3 files have unknown
     license. Detailed output of licensecheck in
     /home/piotr/rpmbuild/1187082-python-slowaes/licensecheck.txt
[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.
[-]: 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.
[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: No rpmlint messages.
[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 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]: 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
     %{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.
[x]: 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:
[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.
[x]: Final provides and requires are sane (see attachments).
[?]: Package functions as described.
[x]: Latest version is packaged.
[!]: Package does not include license text files separate from upstream.
[!]: 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: No rpmlint messages.
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: python2-slowaes-0.1a1-6.fc26.noarch.rpm
          python-slowaes-0.1a1-6.fc26.src.rpm
2 packages and 0 specfiles checked; 0 errors, 0 warnings.




Rpmlint (installed packages)
----------------------------
1 packages and 0 specfiles checked; 0 errors, 0 warnings.



Requires
--------
python2-slowaes (rpmlib, GLIBC filtered):
    python(abi)



Provides
--------
python2-slowaes:
    python-slowaes
    python2-slowaes
    python2.7dist(slowaes)
    python2dist(slowaes)



Source checksums
----------------
https://pypi.python.org/packages/source/s/slowaes/slowaes-0.1a1.tar.gz :
  CHECKSUM(SHA256) this package     : 83658ae54cc116b96f7fdb12fdd0efac3a4e8c7c7064e3fac3f4a881aa54bf09
  CHECKSUM(SHA256) upstream package : 83658ae54cc116b96f7fdb12fdd0efac3a4e8c7c7064e3fac3f4a881aa54bf09


Generated by fedora-review 0.6.1 (f03e4e7) last change: 2016-05-02
Command line :/usr/bin/fedora-review -b 1187082
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 19 Jonny Heggheim 2016-11-12 20:23:36 UTC
(In reply to Piotr Popieluch from comment #18)
> Looks good, approved.
Thanks!

> Thing to keep in mind is the non-numeric version number. This is only
> allowed when they increment properly otherwise it can cause update issues. I
> couldn't find upstreams versioning policy so not sure if it is.
I have a bad feeling that there are no versioning policy, the last commit was  	Mar 8, 2011 and there are no tags/branches in the SVN repo at code.google.com. There are no version info in aes.py (that is the only code in the package). Debian also use 0.1a1 as the version number.

I am not sure where the version comes from, it might be the person who uploaded to https://pypi.python.org/pypi/slowaes.

> I personally would include the license as a SOURCE, not patch it and I would
> use sed to remove the shebang. But this is ok.
I was thinking about the same, but I ended up with patches to make it more declarative what is our changes.

Comment 20 Gwyn Ciesla 2016-11-14 15:37:25 UTC
Package request has been approved: https://admin.fedoraproject.org/pkgdb/package/rpms/python-slowaes


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