Bug 1357573 - Review Request: python-simpleeval - An expression evaluator library
Summary: Review Request: python-simpleeval - An expression evaluator library
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Miro Hrončok
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1288935 1357295
TreeView+ depends on / blocked
 
Reported: 2016-07-18 14:20 UTC by Dan Horák
Modified: 2016-07-20 16:14 UTC (History)
4 users (show)

Fixed In Version: python-simpleeval-0.8.7-2.fc25
Clone Of:
Environment:
Last Closed: 2016-07-20 16:14:39 UTC
Type: ---
Embargoed:
mhroncok: fedora-review+


Attachments (Terms of Use)

Description Dan Horák 2016-07-18 14:20:28 UTC
Spec URL: http://fedora.danny.cz/python-simpleeval.spec
SRPM URL: http://fedora.danny.cz/python-simpleeval-0.8.7-1.fc24.src.rpm
Description:
An short, easy to use, safe and reasonably extensible expression evaluator.
Designed for things like in a website where you want to allow the user to
generate a string, or a number from some other input, without allowing full
eval() or other unsafe or needlessly complex linguistics.

Fedora Account System Username: sharkcz

Koji scratch build: http://koji.fedoraproject.org/koji/taskinfo?taskID=14934502

Comment 1 Miro Hrončok 2016-07-19 09:29:38 UTC
1. I don't know why the main package and subackages have different summaries, but if it's not intentional, you can use:

    Summary:        %{summary}

in subpackages.

2. I see no LICENSE, although it is in the GitHub repo.

3. %dir %{python3_sitelib}/__pycache__/

It is already owned by python3-libs, it is undesired to own it (although other packages unfortunately do as well).

Other than that, it seems OK for the eyes-only check, will do formal review once you fix 2. and 3.

Comment 2 Dan Horák 2016-07-20 07:26:48 UTC
Updated SRPM: http://fedora.danny.cz/python-simpleeval-0.8.7-2.fc24.src.rpm
Updated spec: http://fedora.danny.cz/python-simpleeval.spec

Changes:
- 1 - omission after changing the top Summary, switched to using %{summary}
- 2 - switched to github archive which is different from the pypi one and contains the license text
- 3 - dropped __pycache__ ownership (was added by pyp2rpm)

Comment 3 Igor Gnatenko 2016-07-20 08:23:06 UTC
> BuildRequires:  python-setuptools
BuildRequires: python2-setuptools
- Also please move BRs under subpackages (just for better look&feel)

> rm -rf %{pypi_name}.egg-info
it's not on github source

> %{python3_sitelib}/%{srcname}-%{version}-py?.?.egg-info
1. add trailing slash please, to be sure that it's generated by setuptools and not distutils
2. if you really want that strict thing here, replace "?.?" with "%{python3_version}"

Comment 4 Miro Hrončok 2016-07-20 08:39:52 UTC
Package APPROVED.

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]: License field in the package spec file matches the actual license.
[x]: License file installed when any subpackage combination is installed.
[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 40960 bytes in 2 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]: 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:
[-]: 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).
[-]: Fully versioned dependency in subpackages if applicable.
[?]: Package functions as described.
[?]: 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.
[?]: Package should compile and build into binary rpms on all supported
     architectures.
[x]: %check is present and all tests pass.
[?]: 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-simpleeval-0.8.7-2.fc23.noarch.rpm
          python3-simpleeval-0.8.7-2.fc23.noarch.rpm
          python-simpleeval-0.8.7-2.fc23.src.rpm
python2-simpleeval.noarch: W: spelling-error Summary(en_US) evaluator -> evaluate, elevator
python2-simpleeval.noarch: W: spelling-error %description -l en_US evaluator -> evaluate, elevator
python2-simpleeval.noarch: W: spelling-error %description -l en_US eval -> veal, vela, val
python3-simpleeval.noarch: W: spelling-error Summary(en_US) evaluator -> evaluate, elevator
python3-simpleeval.noarch: W: spelling-error %description -l en_US evaluator -> evaluate, elevator
python3-simpleeval.noarch: W: spelling-error %description -l en_US eval -> veal, vela, val
python-simpleeval.src: W: spelling-error Summary(en_US) evaluator -> evaluate, elevator
python-simpleeval.src: W: spelling-error %description -l en_US evaluator -> evaluate, elevator
python-simpleeval.src: W: spelling-error %description -l en_US eval -> veal, vela, val
3 packages and 0 specfiles checked; 0 errors, 9 warnings.

All false positives.


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



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

python2-simpleeval (rpmlib, GLIBC filtered):
    python(abi)



Provides
--------
python3-simpleeval:
    python3-simpleeval

python2-simpleeval:
    python-simpleeval
    python2-simpleeval



Source checksums
----------------
https://github.com/danthedeckie/simpleeval/archive/0.8.7.tar.gz#/simpleeval-0.8.7.tar.gz :
  CHECKSUM(SHA256) this package     : 61b5275863f2f9bc24a6bd3c123923090ab22b215352cbe383ce20cc947d56a0
  CHECKSUM(SHA256) upstream package : 61b5275863f2f9bc24a6bd3c123923090ab22b215352cbe383ce20cc947d56a0

Comment 5 Miro Hrončok 2016-07-20 08:42:53 UTC
(In reply to Igor Gnatenko from comment #3)
> > BuildRequires:  python-setuptools
> BuildRequires: python2-setuptools
> - Also please move BRs under subpackages (just for better look&feel)

BuildRequires belong to the package as a whole and moving them to subpackages provides a false feeling that they are relevant (for RPM) for that subpackage only. So I do not recommend this, however, if the maintainer wishes to do so, it's not against any guidelines.

> > rm -rf %{pypi_name}.egg-info
> it's not on github source

Better safe than sorry.

> > %{python3_sitelib}/%{srcname}-%{version}-py?.?.egg-info
> 1. add trailing slash please, to be sure that it's generated by setuptools
> and not distutils

Feel free to do that.

> 2. if you really want that strict thing here, replace "?.?" with
> "%{python3_version}"

Feel free to do that.

Comment 6 Igor Gnatenko 2016-07-20 08:48:23 UTC
(In reply to Miro Hrončok from comment #5)
> (In reply to Igor Gnatenko from comment #3)
> > > BuildRequires:  python-setuptools
> > BuildRequires: python2-setuptools
> > - Also please move BRs under subpackages (just for better look&feel)
> 
> BuildRequires belong to the package as a whole and moving them to
> subpackages provides a false feeling that they are relevant (for RPM) for
> that subpackage only. So I do not recommend this, however, if the maintainer
> wishes to do so, it's not against any guidelines.
That's actually true (that it belongs to subpackage) ;)

Instead of doing:
...
%if %{with python3}
BR: python3-devel python3-setuptools
%endif 
...
%if %{with python3}
%package -n python3-%{modname}
...
%endif
it's easier to just put it under subpackage.


That's not critical, but just nice to have.

Comment 7 Miro Hrončok 2016-07-20 08:49:26 UTC
(In reply to Dan Horák from comment #2)
> - 3 - dropped __pycache__ ownership (was added by pyp2rpm)

Relevant pyp2rpm issue: https://github.com/fedora-python/pyp2rpm/issues/67

Comment 8 Miro Hrončok 2016-07-20 08:52:48 UTC
(In reply to Igor Gnatenko from comment #6)
> That's actually true (that it belongs to subpackage) ;)

Nope, for RPM it belongs to the thing as a whole. On the other hand, we put it there because of that subpackage, so logically it belongs to it. There are two ways of looking at it.

> Instead of doing:
> ...
> %if %{with python3}
> BR: python3-devel python3-setuptools
> %endif 
> ...
> %if %{with python3}
> %package -n python3-%{modname}
> ...
> %endif
> it's easier to just put it under subpackage.

There is no %{with python3} in this spec, so this comment is irrelevant for this package.

Let's agree to disagree and let Dan choose his own way.

Comment 9 Gwyn Ciesla 2016-07-20 13:16:14 UTC
Package request has been approved: https://admin.fedoraproject.org/pkgdb/package/rpms/python-simpleeval

Comment 10 Dan Horák 2016-07-20 16:14:39 UTC
Imported and built, thanks for the review.


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