Bug 1550317 - Review Request: python-flask-security - Flask-Security quickly adds security features to your Flask application
Summary: Review Request: python-flask-security - Flask-Security quickly adds security ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Randy Barlow
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1550314 1553867 1562650
Blocks: 1380826
TreeView+ depends on / blocked
 
Reported: 2018-03-01 01:32 UTC by Itamar Reis Peixoto
Modified: 2018-04-23 15:55 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-15 02:36:25 UTC
Type: ---
rbarlow: fedora-review+


Attachments (Terms of Use)

Description Itamar Reis Peixoto 2018-03-01 01:32:36 UTC
Spec URL: https://itamarjp.fedorapeople.org/review/python-flask-security.spec
SRPM URL: https://itamarjp.fedorapeople.org/review/python-flask-security-1.7.5-2.fc27.src.rpm

Description: Flask-Security quickly adds security features to your Flask application

Fedora Account System Username: itamarjp

Comment 1 Randy Barlow 2018-03-01 14:44:13 UTC
Version 1.7.5 is quite old, and there's a newer 3.0.0 that claims to fix a security issue:

- Fixed a security bug when validating a confirmation token, also checks
if the email that the token was created with matches the user's current email.

https://github.com/mattupstate/flask-security/blob/develop/CHANGES

I think we should probably package 3.0.0 instead of 1.7.5.

Comment 2 Itamar Reis Peixoto 2018-03-01 19:25:57 UTC
I will post the updated spec file after we get python-flask-mail in.

Comment 4 Randy Barlow 2018-03-06 18:40:00 UTC
A few issues to fix:

[!]: Package requires other packages for directories it uses.
     Note: No known owner of /usr/lib/python3.6/site-
     packages/flask_security/templates/security/email, /usr/lib/python3.6
     /site-packages/flask_security/templates, /usr/lib/python3.6/site-
     packages/flask_security/translations, /usr/lib/python2.7/site-
     packages/flask_security/templates, /usr/lib/python3.6/site-
     packages/flask_security/__pycache__, /usr/lib/python2.7/site-
     packages/flask_security/translations, /usr/lib/python2.7/site-
     packages/flask_security/templates/security/email, /usr/lib/python2.7
     /site-packages/flask_security, /usr/lib/python2.7/site-
     packages/flask_security/templates/security, /usr/lib/python3.6/site-
     packages/flask_security/templates/security, /usr/lib/python3.6/site-
     packages/flask_security
[!]: Package must own all directories that it creates.
     Note: Directories without known owners: /usr/lib/python3.6/site-
     packages/flask_security/templates/security/email, /usr/lib/python3.6
     /site-packages/flask_security/templates, /usr/lib/python3.6/site-
     packages/flask_security/__pycache__, /usr/lib/python2.7/site-
     packages/flask_security/templates, /usr/lib/python2.7/site-
     packages/flask_security/translations, /usr/lib/python2.7/site-
     packages/flask_security/templates/security/email, /usr/lib/python2.7
     /site-packages/flask_security, /usr/lib/python3.6/site-
     packages/flask_security/translations, /usr/lib/python2.7/site-
     packages/flask_security/templates/security, /usr/lib/python3.6/site-
     packages/flask_security/templates/security, /usr/lib/python3.6/site-
     packages/flask_security

Recommendation: Simply put %{python2_sitelib}/flask_security and %{python3_sitelib}/flask_security into your %files sections, rather than trying to write out all the subpaths.


[!]: You have
     %{?python_provide:%python_provide python%{python3_pkgversion}-%{pkg_name}}
     in the Python 2 subpackage.

Recommendation: It should be %{?python_provide:%python_provide python2-%{pkg_name}}.


Optional, but recommended: Upstream does have a test suite. I recommend running it in a %check section.

Comment 5 Itamar Reis Peixoto 2018-03-07 15:02:59 UTC
I fixed some items, others still pending, 

if you unpack Flask-Security-3.0.0.tar.gz and read setup.py you will see that for running tests requires alot of items that's not available in fedora repos.

tests_require = [ ....


also for building docs 'Flask-Sphinx-Themes>=1.0.1' is required.

Comment 7 Randy Barlow 2018-03-20 13:15:44 UTC
There are still problems with ownership:


[!]: Package requires other packages for directories it uses.
     Note: No known owner of /usr/lib/python3.6/site-
     packages/flask_security/templates/security/email, /usr/lib/python3.6
     /site-packages/flask_security/templates, /usr/lib/python3.6/site-
     packages/flask_security/translations, /usr/lib/python2.7/site-
     packages/flask_security/templates, /usr/lib/python3.6/site-
     packages/flask_security/__pycache__, /usr/lib/python2.7/site-
     packages/flask_security/translations, /usr/lib/python2.7/site-
     packages/flask_security/templates/security/email, /usr/lib/python2.7
     /site-packages/flask_security/templates/security, /usr/lib/python3.6
     /site-packages/flask_security/templates/security
[!]: Package must own all directories that it creates.
     Note: Directories without known owners: /usr/lib/python3.6/site-
     packages/flask_security/templates/security/email, /usr/lib/python3.6
     /site-packages/flask_security/templates, /usr/lib/python3.6/site-
     packages/flask_security/__pycache__, /usr/lib/python2.7/site-
     packages/flask_security/templates, /usr/lib/python2.7/site-
     packages/flask_security/translations, /usr/lib/python2.7/site-
     packages/flask_security/templates/security/email, /usr/lib/python3.6
     /site-packages/flask_security/translations, /usr/lib/python2.7/site-
     packages/flask_security/templates/security, /usr/lib/python3.6/site-
     packages/flask_security/templates/security


You can set your files sections to be like I described in Comment #4 to fix this.

Why are you using %{python3_pkgversion} in your Requires and BuildRequires? You can just use the number 3, which is simpler. I suggest using this form:

Requires: python3-flask
BuildRequires: python3-flask-sphinx-themes

Comment 8 Itamar Reis Peixoto 2018-04-07 23:29:02 UTC
> Why are you using %{python3_pkgversion} in your Requires and BuildRequires? You can just use the number 3, which is simpler. I suggest using this form:

I am interested in maybe building it for epel.


Spec URL: https://itamarjp.fedorapeople.org/review/python-flask-security.spec
SRPM URL: https://itamarjp.fedorapeople.org/review/python-flask-security-3.0.0-1.fc28.src.rpm

Comment 9 Randy Barlow 2018-04-08 15:57:17 UTC
Approved!

Before building, please change the URL from http:// to https://.


Suggestions:

* Use the %{?_smp_mflags} macro on your make commands.
* Remove the execute bit from the man page.


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: "MIT/X11 (BSD like)", "Unknown or generated". 128 files have
     unknown license. Detailed output of licensecheck in
     /home/rbarlow/reviews/1550317-python-flask-security/licensecheck.txt
[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.
[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]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 0 bytes in 0 files.
[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:
[!]: Uses parallel make %{?_smp_mflags} macro.
[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).
[x]: Fully versioned dependency in subpackages if applicable.
     Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in python2
     -flask-security , python3-flask-security , python-flask-security-doc
[?]: Package functions as described.
[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.
[?]: 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: python2-flask-security-3.0.0-1.fc29.noarch.rpm
          python3-flask-security-3.0.0-1.fc29.noarch.rpm
          python-flask-security-doc-3.0.0-1.fc29.noarch.rpm
          python-flask-security-3.0.0-1.fc29.src.rpm
python2-flask-security.noarch: W: no-documentation
python2-flask-security.noarch: W: file-not-in-%lang /usr/lib/python2.7/site-packages/flask_security/translations/da_DK/LC_MESSAGES/flask_security.mo
python2-flask-security.noarch: W: file-not-in-%lang /usr/lib/python2.7/site-packages/flask_security/translations/de_DE/LC_MESSAGES/flask_security.mo
python2-flask-security.noarch: W: file-not-in-%lang /usr/lib/python2.7/site-packages/flask_security/translations/fr_FR/LC_MESSAGES/flask_security.mo
python2-flask-security.noarch: W: file-not-in-%lang /usr/lib/python2.7/site-packages/flask_security/translations/ru_RU/LC_MESSAGES/flask_security.mo
python3-flask-security.noarch: W: no-documentation
python3-flask-security.noarch: W: file-not-in-%lang /usr/lib/python3.6/site-packages/flask_security/translations/da_DK/LC_MESSAGES/flask_security.mo
python3-flask-security.noarch: W: file-not-in-%lang /usr/lib/python3.6/site-packages/flask_security/translations/de_DE/LC_MESSAGES/flask_security.mo
python3-flask-security.noarch: W: file-not-in-%lang /usr/lib/python3.6/site-packages/flask_security/translations/fr_FR/LC_MESSAGES/flask_security.mo
python3-flask-security.noarch: W: file-not-in-%lang /usr/lib/python3.6/site-packages/flask_security/translations/ru_RU/LC_MESSAGES/flask_security.mo
python-flask-security-doc.noarch: W: hidden-file-or-dir /usr/share/doc/python-flask-security-doc/html/.buildinfo
python-flask-security-doc.noarch: W: file-not-utf8 /usr/share/doc/python-flask-security-doc/html/objects.inv
python-flask-security-doc.noarch: W: spurious-executable-perm /usr/share/man/man1/flask-security.1.gz
4 packages and 0 specfiles checked; 0 errors, 13 warnings.




Rpmlint (installed packages)
----------------------------
python3-flask-security.noarch: W: invalid-url URL: http://github.com/mattupstate/flask-security/ <urlopen error [Errno -2] Name or service not known>
python3-flask-security.noarch: W: no-documentation
python3-flask-security.noarch: W: file-not-in-%lang /usr/lib/python3.6/site-packages/flask_security/translations/da_DK/LC_MESSAGES/flask_security.mo
python3-flask-security.noarch: W: file-not-in-%lang /usr/lib/python3.6/site-packages/flask_security/translations/de_DE/LC_MESSAGES/flask_security.mo
python3-flask-security.noarch: W: file-not-in-%lang /usr/lib/python3.6/site-packages/flask_security/translations/fr_FR/LC_MESSAGES/flask_security.mo
python3-flask-security.noarch: W: file-not-in-%lang /usr/lib/python3.6/site-packages/flask_security/translations/ru_RU/LC_MESSAGES/flask_security.mo
python-flask-security-doc.noarch: W: invalid-url URL: http://github.com/mattupstate/flask-security/ <urlopen error [Errno -2] Name or service not known>
python-flask-security-doc.noarch: W: hidden-file-or-dir /usr/share/doc/python-flask-security-doc/html/.buildinfo
python-flask-security-doc.noarch: W: file-not-utf8 /usr/share/doc/python-flask-security-doc/html/objects.inv
python-flask-security-doc.noarch: W: spurious-executable-perm /usr/share/man/man1/flask-security.1.gz
python2-flask-security.noarch: W: invalid-url URL: http://github.com/mattupstate/flask-security/ <urlopen error [Errno -2] Name or service not known>
python2-flask-security.noarch: W: no-documentation
python2-flask-security.noarch: W: file-not-in-%lang /usr/lib/python2.7/site-packages/flask_security/translations/da_DK/LC_MESSAGES/flask_security.mo
python2-flask-security.noarch: W: file-not-in-%lang /usr/lib/python2.7/site-packages/flask_security/translations/de_DE/LC_MESSAGES/flask_security.mo
python2-flask-security.noarch: W: file-not-in-%lang /usr/lib/python2.7/site-packages/flask_security/translations/fr_FR/LC_MESSAGES/flask_security.mo
python2-flask-security.noarch: W: file-not-in-%lang /usr/lib/python2.7/site-packages/flask_security/translations/ru_RU/LC_MESSAGES/flask_security.mo
3 packages and 0 specfiles checked; 0 errors, 16 warnings.



Requires
--------
python3-flask-security (rpmlib, GLIBC filtered):
    python(abi)
    python3-flask
    python3-flask-babel
    python3-flask-login
    python3-flask-mail
    python3-flask-principal
    python3-flask-wtf
    python3-itsdangerous
    python3-passlib

python-flask-security-doc (rpmlib, GLIBC filtered):

python2-flask-security (rpmlib, GLIBC filtered):
    python(abi)
    python2-flask
    python2-flask-babel
    python2-flask-login
    python2-flask-mail
    python2-flask-principal
    python2-flask-wtf
    python2-itsdangerous
    python2-passlib



Provides
--------
python3-flask-security:
    python3-flask-security
    python3.6dist(flask-security)
    python3dist(flask-security)

python-flask-security-doc:
    python-flask-security-doc

python2-flask-security:
    python-flask-security
    python2-flask-security
    python2.7dist(flask-security)
    python2dist(flask-security)



Source checksums
----------------
https://files.pythonhosted.org/packages/source/F/Flask-Security/Flask-Security-3.0.0.tar.gz :
  CHECKSUM(SHA256) this package     : d61daa5f5a48f89f30f50555872bdf581b2c65804668b0313345cd7beff26432
  CHECKSUM(SHA256) upstream package : d61daa5f5a48f89f30f50555872bdf581b2c65804668b0313345cd7beff26432


Generated by fedora-review 0.6.1 (f03e4e7) last change: 2016-05-02
Command line :/usr/bin/fedora-review -b 1550317 -m fedora-rawhide-x86_64
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 10 Itamar Reis Peixoto 2018-04-08 20:23:01 UTC
$ fedpkg --module-name python-flask-security request-repo 1550317
https://pagure.io/releng/fedora-scm-requests/issue/5646

Comment 11 Gwyn Ciesla 2018-04-09 13:04:03 UTC
(fedrepo-req-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/python-flask-security

Comment 13 Fedora Update System 2018-04-09 14:42:47 UTC
python-flask-security-3.0.0-1.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-48f664b3ed

Comment 14 Fedora Update System 2018-04-10 22:50:43 UTC
python-flask-security-3.0.0-1.fc28 has been pushed to the Fedora 28 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-2018-48f664b3ed

Comment 15 Fedora Update System 2018-04-15 02:36:25 UTC
python-flask-security-3.0.0-1.fc28 has been pushed to the Fedora 28 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.