Bug 2033801 - Review Request: python-flask-security-too - Simple security for Flask apps
Summary: Review Request: python-flask-security-too - Simple security for Flask apps
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Ben Beasley
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-12-17 21:19 UTC by Sandro Mani
Modified: 2022-01-18 16:03 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
If this bug requires documentation, please select an appropriate Doc Type value.
Last Closed: 2022-01-18 16:03:00 UTC
Type: ---
Embargoed:
code: fedora-review+


Attachments (Terms of Use)

Description Sandro Mani 2021-12-17 21:19:08 UTC
Spec URL: https://smani.fedorapeople.org/review/python-flask-security-too.spec
SRPM URL: https://smani.fedorapeople.org/review/python-flask-security-too-4.1.2-1.fc36.src.rpm
Description: Simple security for Flask apps
Fedora Account System Username: smani

Comment 1 Ben Beasley 2021-12-24 18:52:54 UTC
Package Review
==============

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

===== Issues =====

- It was recently pointed out that Sphinx-generated HTML documentation is not
  suitable for packaging because Sphinx inserts bundled JavaScript and CSS that
  is not practical to handle in accordance with the relevant guidelines. See
  https://bugzilla.redhat.com/show_bug.cgi?id=2006555 and
  https://lists.fedoraproject.org/archives/list/packaging@lists.fedoraproject.org/thread/LLUAURXZVADATHK65HBPPBHKF4EM4UC3/
  for further details.

  You may stop packaging the Sphinx-generated documentation altogether, or you
  may ask Sphinx to generate a PDF instead, which is probably acceptable. If
  you are interested in the latter option, I can point to several examples and
  assist with any problems you might encounter.

  You can still use Sphinx to generate man pages, of course, although:

    - Personally, I wouldn’t bother building and installing a man page to
      document a Python package/API, rather than a command-line tool, because I
      think very few users will look for documentation in this form

    - Since the man page is for the Python package API and not for a
      command-line tool, it should be in section 7 (miscellaneous) rather than
      section 1.

    - The installed man page is executable; this should be corrected.

- Upstream provides a test suite; you should run it. I can help debug any
  issues you might run into here, too.

- Rather than manually adding
 
    BuildRequires:  python3-Pallets-Sphinx-Themes
    BuildRequires:  python3-sphinx
    BuildRequires:  python3-sphinx-issues
    # For tests
    BuildRequires:  python3-email-validator

  you can use the requirements files directly:

    %pyproject_buildrequires -r requirements/docs.txt requirements/tests.txt

  You will have to patch out a few missing dependencies from
  requirements/tests.txt, either in-place or into a new file, in %prep:

    flask-mongoengine
    msgcheck
    phonenumberslite
    pyqrcode

  Without these dependencies, some tests will be automatically skipped, and
  others must be manually skipped:

    %prep
    […]
    sed -r -i '/\b(two_factor|unified_signin)\b/d' tests/conftest.py

    %check
    […]
    %pytest -m 'not two_factor and not unified_signin'

  (If you want to package some of these dependencies instead of skipping the
  relevant tests, feel free to CC me on the reviews.)

- You can parallelize Sphinx itself (although the speedup is small) by changing

    make -C docs man

  to

    make -C docs man SPHINXOPTS='%{?_smp_mflags}'

  which I would write as

    %make_build -C docs man SPHINXOPTS='%{?_smp_mflags}'

  HOWEVER: there appears to be a bug with parallel Sphinx in this case—probably
  a Sphinx extension that affirmatively claims to be parallel-safe but really
  isn’t—and so you should ignore this suggestion for this *particular* package.

  You can still write

    %make_build -C docs man

  which will satisfy fedora-review’s complaints about not using parallel make,
  but I don’t consider this mandatory because the man target has no dependent
  targets in the Makefile—it’s just a wrapper around a sphinx-build
  invocation—and if you were building more than one target, you would have to
  *disable* parallel make because it’s not safe to run multiple copies of
  sphinx-build on the same input in parallel.

- None of the language files are properly marked in the files list because
  neither %pyproject_save_files nor %find_lang supports finding .mo files that
  are not located in a directory named “locale”. This must be corrected.

  While I welcome a better solution, one ugly-but-acceptable workaround is:

    %pyproject_install
    %pyproject_save_files flask_security
    # Work around neither %%pyproject_save_files nor %%find_lang supporting
    # language files that are not in a directory named “locale”:
    sed -r '/\/translations\/.*\.mo/d' '%{pyproject_files}'
    cp -rp '%{buildroot}/%{python3_sitelib}/flask_security/translations' \
        '%{buildroot}/%{python3_sitelib}/flask_security/locale'
    find '%{buildroot}/%{python3_sitelib}/flask_security/locale' \
        -type f ! -name '*.mo' -delete
    %find_lang flask_security
    rm -rf '%{buildroot}/%{python3_sitelib}/flask_security/locale'
    sed -r -i 's@/locale/@/translations/@' flask_security.lang

  https://docs.fedoraproject.org/en-US/packaging-guidelines/#_handling_locale_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.
[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", "MIT License", "*No copyright* MIT
     License". 145 files have unknown license. Detailed output of
     licensecheck in /home/reviewer/2033801-python-flask-security-
     too/licensecheck.txt
[x]: License file installed when any subpackage combination is installed.
[!]: Package contains no bundled libraries without FPC exception.

     Sphinx HTML bundles JavaScript libraries.

[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

     (except as noted)

[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]: 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 must not depend on deprecated() packages.
[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]: Packages MUST NOT have dependencies (either build-time or runtime) on
     packages named with the unversioned python- prefix unless no properly
     versioned package exists. Dependencies on Python packages instead MUST
     use names beginning with python2- or python3- as appropriate.
[x]: Python packages must not contain %{pythonX_site(lib|arch)}/* in %files
[x]: Binary eggs must be removed in %prep

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

Generic:
[!]: Uses parallel make %{?_smp_mflags} macro.

     You *could* change the “make” invocation for Sphinx to %make_build, which
     would add %{?_smp_mflags}. However, no change is required, because in
     reality:

     - You are only building one target, and the target has no dependencies in
       the makefile, so there is not actually anything to parallelize
     - These Sphinx “wrapper” make files are not parallel-safe anyway, so even
       if you built two targets in a single make invocation (%make_build -C
       docs man latex”) you couldn’t use parallel make.
     - You can parallelize Sphinx itself with SPHINXOPTS='%{?_smp_mflags}', but
       that is broken in this package too.

[-]: 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.
     Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in
     python3-flask-security-too
[?]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[-]: Sources are verified with gpgverify first in %prep if upstream
     publishes signatures.
     Note: gpgverify is not used.
[-]: Description and summary sections in the package spec file contains
     translations for supported Non-English languages, if available.

     Translations are present in the upstream source for application strings,
     but not for metadata strings (summary/description).

[x]: Package should compile and build into binary rpms on all supported
     architectures.
[!]: %check is present and all tests pass.

     Should run the upstream tests.

[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
-------
Cannot parse rpmlint output:


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


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


Requires
--------
python3-flask-security-too (rpmlib, GLIBC filtered):
    python(abi)
    python3.10dist(blinker)
    python3.10dist(email-validator)
    python3.10dist(flask)
    python3.10dist(flask-login)
    python3.10dist(flask-principal)
    python3.10dist(flask-wtf)
    python3.10dist(itsdangerous)
    python3.10dist(passlib)

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



Provides
--------
python3-flask-security-too:
    python-flask-security-too
    python3-flask-security-too
    python3.10-flask-security-too
    python3.10dist(flask-security-too)
    python3dist(flask-security-too)

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



Generated by fedora-review 0.7.6 (b083f91) last change: 2020-11-10
Command line :/usr/bin/fedora-review -L flask-security-too-deps/ -b 2033801
Buildroot used: fedora-rawhide-x86_64
Active plugins: Generic, Shell-api, Python
Disabled plugins: Ocaml, Haskell, Perl, SugarActivity, C/C++, R, PHP, Java, fonts
Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH

Built with local dependencies:
    /home/reviewer/flask-security-too-deps/python3-flask-principal-0.4.0-29.fc36.noarch.rpm
============================ rpmlint session starts ============================
rpmlint: 2.1.0
configuration:
    /usr/lib/python3.10/site-packages/rpmlint/configdefaults.toml
    /etc/xdg/rpmlint/fedora.toml
    /etc/xdg/rpmlint/licenses.toml
    /etc/xdg/rpmlint/scoring.toml
    /etc/xdg/rpmlint/users-groups.toml
    /etc/xdg/rpmlint/warn-on-functions.toml
checks: 31, packages: 3

python-flask-security-too-doc.noarch: W: spurious-executable-perm /usr/share/man/man1/flask-security.1.gz
python3-flask-security-too.noarch: W: no-documentation
python-flask-security-too-doc.noarch: W: files-duplicate /usr/share/doc/python-flask-security-too-doc/html/_static/logo-owl-full-240.png /usr/share/doc/python-flask-security-too-doc/html/_images/logo-owl-full-240.png
python3-flask-security-too.noarch: W: file-not-in-%lang /usr/lib/python3.10/site-packages/flask_security/translations/af_ZA/LC_MESSAGES/flask_security.mo
python3-flask-security-too.noarch: W: file-not-in-%lang /usr/lib/python3.10/site-packages/flask_security/translations/ca_ES/LC_MESSAGES/flask_security.mo
python3-flask-security-too.noarch: W: file-not-in-%lang /usr/lib/python3.10/site-packages/flask_security/translations/da_DK/LC_MESSAGES/flask_security.mo
python3-flask-security-too.noarch: W: file-not-in-%lang /usr/lib/python3.10/site-packages/flask_security/translations/de_DE/LC_MESSAGES/flask_security.mo
python3-flask-security-too.noarch: W: file-not-in-%lang /usr/lib/python3.10/site-packages/flask_security/translations/es_ES/LC_MESSAGES/flask_security.mo
python3-flask-security-too.noarch: W: file-not-in-%lang /usr/lib/python3.10/site-packages/flask_security/translations/eu_ES/LC_MESSAGES/flask_security.mo
python3-flask-security-too.noarch: W: file-not-in-%lang /usr/lib/python3.10/site-packages/flask_security/translations/fr_FR/LC_MESSAGES/flask_security.mo
python3-flask-security-too.noarch: W: file-not-in-%lang /usr/lib/python3.10/site-packages/flask_security/translations/hy_AM/LC_MESSAGES/flask_security.mo
python3-flask-security-too.noarch: W: file-not-in-%lang /usr/lib/python3.10/site-packages/flask_security/translations/ja_JP/LC_MESSAGES/flask_security.mo
python3-flask-security-too.noarch: W: file-not-in-%lang /usr/lib/python3.10/site-packages/flask_security/translations/nl_NL/LC_MESSAGES/flask_security.mo
python3-flask-security-too.noarch: W: file-not-in-%lang /usr/lib/python3.10/site-packages/flask_security/translations/pl_PL/LC_MESSAGES/flask_security.mo
python3-flask-security-too.noarch: W: file-not-in-%lang /usr/lib/python3.10/site-packages/flask_security/translations/pt_BR/LC_MESSAGES/flask_security.mo
python3-flask-security-too.noarch: W: file-not-in-%lang /usr/lib/python3.10/site-packages/flask_security/translations/pt_PT/LC_MESSAGES/flask_security.mo
python3-flask-security-too.noarch: W: file-not-in-%lang /usr/lib/python3.10/site-packages/flask_security/translations/ru_RU/LC_MESSAGES/flask_security.mo
python3-flask-security-too.noarch: W: file-not-in-%lang /usr/lib/python3.10/site-packages/flask_security/translations/tr_TR/LC_MESSAGES/flask_security.mo
python3-flask-security-too.noarch: W: file-not-in-%lang /usr/lib/python3.10/site-packages/flask_security/translations/zh_Hans_CN/LC_MESSAGES/flask_security.mo
 3 packages and 0 specfiles checked; 0 errors, 19 warnings, 0 badness; has taken 0.7 s

Comment 2 Ben Beasley 2021-12-25 15:01:27 UTC
You should also add the appropriate Python extras metapackages[1] for the extras defined in setup.cfg. The easiest way is, somewhere after the base package's %description[2]:

  %pyproject_extras_subpkg -n python3-%{pkg_name} babel fsqla common mfa

There’s a good argument for adding these extras to the generated BR’s to catch any problems that would cause one of the extras metapackages to fail to install. (The dependencies they bring are generally needed for the full test suite anyway.)

  %pyproject_buildrequires -x babel,fsqla,common,mfa requirements/docs.txt requirements/tests.txt

In both of the above, you’ll need to omit the “mfa” extra since the “pyqrcode” and “phonenumberslite” dependencies aren’t packaged.

[1] https://fedoraproject.org/wiki/Changes/PythonExtras#Extras_metapackages
[2] https://src.fedoraproject.org/rpms/pyproject-rpm-macros

Comment 3 Sandro Mani 2021-12-27 14:32:37 UTC
Thanks for your detailed review and suggestions, I've applied them in -2. Regarding the docs, I'd be tempted to just omit them.

Spec URL: https://smani.fedorapeople.org/review/python-flask-security-too.spec
SRPM URL: https://smani.fedorapeople.org/review/python-flask-security-too-4.1.2-2.fc36.src.rpm

%changelog
* Mon Dec 27 2021 Sandro Mani <manisandro> - 4.1.2-2
- Run pytest
- Don't build docs
- Workaround to properly mark lang files
- Add extra metapackages

Comment 4 Ben Beasley 2021-12-27 16:11:32 UTC
Thanks—almost there! There’s one detail I failed to mention when I recommended a workaround for the translations.

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

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


Issues:
=======
- Package must not depend on deprecated() packages.
  Note: python3-sqlalchemy1.3 is deprecated, you must not depend on it.
  See: https://docs.fedoraproject.org/en-US/packaging-
  guidelines/deprecating-packages/

  This seems spurious: root.log shows that python3-sqlalchemy-1.4.28-1.fc36 was
  installed, and the conflicting, deprecated compat package
  python3-sqlalchemy1.3 was *not* installed.

- I missed one step in the recommended language file workaround. After

    sed -r -i 's@/locale/@/translations/@' flask_security.lang

  add

    cat flask_security.lang > '%{pyproject_files}'

  or, change

    %files -n python3-%{pkg_name} -f %{pyproject_files}

  to

    %files -n python3-%{pkg_name} -f %{pyproject_files} -f flask_security.lang

  Run rpmlint on the result to make sure it worked.

===== 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: "Unknown or generated", "MIT License", "*No copyright* MIT
     License". 145 files have unknown license. Detailed output of
     licensecheck in /home/reviewer/2033801-python-flask-security-
     too/20211227/2033801-python-flask-security-too/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.
[-]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 10240 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]: 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]: Packages MUST NOT have dependencies (either build-time or runtime) on
     packages named with the unversioned python- prefix unless no properly
     versioned package exists. Dependencies on Python packages instead MUST
     use names beginning with python2- or python3- as appropriate.
[x]: Python packages must not contain %{pythonX_site(lib|arch)}/* in %files
[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-flask-security-too , python3-flask-security-too+babel ,
     python3-flask-security-too+fsqla , python3-flask-security-too+common
[x]: Package functions as described.

     (tests pass)

[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.
[-]: Sources are verified with gpgverify first in %prep if upstream
     publishes signatures.
     Note: gpgverify is not used.
[-]: 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.
[x]: %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
-------
Cannot parse rpmlint output:


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


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


Requires
--------
python3-flask-security-too (rpmlib, GLIBC filtered):
    python(abi)
    python3.10dist(blinker)
    python3.10dist(email-validator)
    python3.10dist(flask)
    python3.10dist(flask-login)
    python3.10dist(flask-principal)
    python3.10dist(flask-wtf)
    python3.10dist(itsdangerous)
    python3.10dist(passlib)

python3-flask-security-too+babel (rpmlib, GLIBC filtered):
    python(abi)
    python3-flask-security-too
    python3.10dist(babel)
    python3.10dist(flask-babel)

python3-flask-security-too+fsqla (rpmlib, GLIBC filtered):
    python(abi)
    python3-flask-security-too
    python3.10dist(flask-sqlalchemy)
    python3.10dist(sqlalchemy)
    python3.10dist(sqlalchemy-utils)

python3-flask-security-too+common (rpmlib, GLIBC filtered):
    python(abi)
    python3-flask-security-too
    python3.10dist(bcrypt)
    python3.10dist(flask-mail)



Provides
--------
python3-flask-security-too:
    python-flask-security-too
    python3-flask-security-too
    python3.10-flask-security-too
    python3.10dist(flask-security-too)
    python3dist(flask-security-too)

python3-flask-security-too+babel:
    python-flask-security-too+babel
    python3-flask-security-too+babel
    python3.10-flask-security-too+babel
    python3.10dist(flask-security-too[babel])
    python3dist(flask-security-too[babel])

python3-flask-security-too+fsqla:
    python-flask-security-too+fsqla
    python3-flask-security-too+fsqla
    python3.10-flask-security-too+fsqla
    python3.10dist(flask-security-too[fsqla])
    python3dist(flask-security-too[fsqla])

python3-flask-security-too+common:
    python-flask-security-too+common
    python3-flask-security-too+common
    python3.10-flask-security-too+common
    python3.10dist(flask-security-too[common])
    python3dist(flask-security-too[common])



Generated by fedora-review 0.7.6 (b083f91) last change: 2020-11-10
Command line :/usr/bin/fedora-review -b 2033801 -L /home/reviewer/flask-security-too-deps/
Buildroot used: fedora-rawhide-x86_64
Active plugins: Python, Generic, Shell-api
Disabled plugins: SugarActivity, Perl, C/C++, Ocaml, Haskell, PHP, Java, R, fonts
Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH

Built with local dependencies:
    /home/reviewer/flask-security-too-deps/python3-flask-principal-0.4.0-29.fc36.noarch.rpm
============================ rpmlint session starts ============================
rpmlint: 2.2.0
configuration:
    /usr/lib/python3.10/site-packages/rpmlint/configdefaults.toml
    /etc/xdg/rpmlint/fedora.toml
    /etc/xdg/rpmlint/licenses.toml
    /etc/xdg/rpmlint/scoring.toml
    /etc/xdg/rpmlint/users-groups.toml
    /etc/xdg/rpmlint/warn-on-functions.toml
checks: 32, packages: 5

python3-flask-security-too+babel.noarch: W: no-documentation
python3-flask-security-too+common.noarch: W: no-documentation
python3-flask-security-too+fsqla.noarch: W: no-documentation
python3-flask-security-too.noarch: W: file-not-in-%lang /usr/lib/python3.10/site-packages/flask_security/translations/af_ZA/LC_MESSAGES/flask_security.mo
python3-flask-security-too.noarch: W: file-not-in-%lang /usr/lib/python3.10/site-packages/flask_security/translations/ca_ES/LC_MESSAGES/flask_security.mo
python3-flask-security-too.noarch: W: file-not-in-%lang /usr/lib/python3.10/site-packages/flask_security/translations/da_DK/LC_MESSAGES/flask_security.mo
python3-flask-security-too.noarch: W: file-not-in-%lang /usr/lib/python3.10/site-packages/flask_security/translations/de_DE/LC_MESSAGES/flask_security.mo
python3-flask-security-too.noarch: W: file-not-in-%lang /usr/lib/python3.10/site-packages/flask_security/translations/es_ES/LC_MESSAGES/flask_security.mo
python3-flask-security-too.noarch: W: file-not-in-%lang /usr/lib/python3.10/site-packages/flask_security/translations/eu_ES/LC_MESSAGES/flask_security.mo
python3-flask-security-too.noarch: W: file-not-in-%lang /usr/lib/python3.10/site-packages/flask_security/translations/fr_FR/LC_MESSAGES/flask_security.mo
python3-flask-security-too.noarch: W: file-not-in-%lang /usr/lib/python3.10/site-packages/flask_security/translations/hy_AM/LC_MESSAGES/flask_security.mo
python3-flask-security-too.noarch: W: file-not-in-%lang /usr/lib/python3.10/site-packages/flask_security/translations/ja_JP/LC_MESSAGES/flask_security.mo
python3-flask-security-too.noarch: W: file-not-in-%lang /usr/lib/python3.10/site-packages/flask_security/translations/nl_NL/LC_MESSAGES/flask_security.mo
python3-flask-security-too.noarch: W: file-not-in-%lang /usr/lib/python3.10/site-packages/flask_security/translations/pl_PL/LC_MESSAGES/flask_security.mo
python3-flask-security-too.noarch: W: file-not-in-%lang /usr/lib/python3.10/site-packages/flask_security/translations/pt_BR/LC_MESSAGES/flask_security.mo
python3-flask-security-too.noarch: W: file-not-in-%lang /usr/lib/python3.10/site-packages/flask_security/translations/pt_PT/LC_MESSAGES/flask_security.mo
python3-flask-security-too.noarch: W: file-not-in-%lang /usr/lib/python3.10/site-packages/flask_security/translations/ru_RU/LC_MESSAGES/flask_security.mo
python3-flask-security-too.noarch: W: file-not-in-%lang /usr/lib/python3.10/site-packages/flask_security/translations/tr_TR/LC_MESSAGES/flask_security.mo
python3-flask-security-too.noarch: W: file-not-in-%lang /usr/lib/python3.10/site-packages/flask_security/translations/zh_Hans_CN/LC_MESSAGES/flask_security.mo
 5 packages and 0 specfiles checked; 0 errors, 19 warnings, 0 badness; has taken 0.8 s

Comment 5 Sandro Mani 2022-01-04 08:59:08 UTC
Here we go, sorry for the delay!

Spec URL: https://smani.fedorapeople.org/review/python-flask-security-too.spec
SRPM URL: https://smani.fedorapeople.org/review/python-flask-security-too-4.1.2-3.fc36.src.rpm

%changelog
* Tue Jan 04 2021 Sandro Mani <manisandro> - 4.1.2-3
- Also include language files

Comment 6 Ben Beasley 2022-01-05 12:39:38 UTC
(In reply to Sandro Mani from comment #5)
> Here we go, sorry for the delay!

No problem—I’ve spent most of the last week away from a suitable computer anyway. I’m starting to take a look at your latest submission.

I found that the language file issue we encountered is being considered here: https://pagure.io/packaging-committee/issue/1058. You might want to subscribe to that issue in case a nicer solution appears, or in case you have anything to say about it.

Comment 7 Ben Beasley 2022-01-05 12:55:46 UTC
> error: %changelog not in descending chronological order

Can you please correct

> * Tue Jan 04 2021 Sandro Mani <manisandro> - 4.1.2-3

to

> * Tue Jan 04 2022 Sandro Mani <manisandro> - 4.1.2-3

?

Comment 8 Ben Beasley 2022-01-05 12:56:18 UTC
(This causes the mock build to fail.)

Comment 9 Sandro Mani 2022-01-15 18:46:40 UTC
Whoops sorry had missed your replies here - too many bugzilla mails... 

I've fixed the changelog (happy new year... ;))

Comment 10 Ben Beasley 2022-01-16 15:06:51 UTC
Thanks for working through the details! The package is APPROVED, but please fix the “sed” invocation as suggested below when you import it.

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

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


Issues:
=======
- Package does not contain duplicates in %files.
  Note: warning: File listed twice: /usr/lib/python3.10/site-
  packages/flask_security/translations/af_ZA/LC_MESSAGES/flask_security.mo
  See: https://docs.fedoraproject.org/en-US/packaging-
  guidelines/#_duplicate_files

  This is another typo in my suggested workaround. Please change:

    sed -r '/\/translations\/.*\.mo/d' '%{pyproject_files}'

  to

    sed -r -i '/\/translations\/.*\.mo/d' '%{pyproject_files}'

  I have rebuilt your spec file with this change, and confirmed it fixes the
  problem. Please make the change before import.

- Package must not depend on deprecated() packages.
  Note: python3-sqlalchemy1.3 is deprecated, you must not depend on it.
  See: https://docs.fedoraproject.org/en-US/packaging-
  guidelines/deprecating-packages/

  This is fine; you depend on python3dist(sqlalchemy), and fedora-review is
  getting confused because python3-sqlalchemy1.3 is one of two packages that
  provide it. The deprecated package is not used or required at build time or
  run time.

- It might be helpful to link https://pagure.io/packaging-committee/issue/1058
  in a comment in the %install section for future reference, but this isn’t
  required.

===== 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: "Unknown or generated", "MIT License", "*No copyright* MIT
     License". 145 files have unknown license. Detailed output of
     licensecheck in /home/reviewer/2033801-python-flask-security-
     too/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.
[-]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 10240 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]: 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]: 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]: Packages MUST NOT have dependencies (either build-time or runtime) on
     packages named with the unversioned python- prefix unless no properly
     versioned package exists. Dependencies on Python packages instead MUST
     use names beginning with python2- or python3- as appropriate.
[x]: Python packages must not contain %{pythonX_site(lib|arch)}/* in %files
[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.
     Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in
     python3-flask-security-too , python3-flask-security-too+babel ,
     python3-flask-security-too+fsqla , python3-flask-security-too+common
[x]: Package functions as described.

     (based on tests passing)

[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.
[-]: Sources are verified with gpgverify first in %prep if upstream
     publishes signatures.
     Note: gpgverify is not used.
[-]: 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.
[x]: %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
-------
Cannot parse rpmlint output:


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


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


Requires
--------
python3-flask-security-too (rpmlib, GLIBC filtered):
    python(abi)
    python3.10dist(blinker)
    python3.10dist(email-validator)
    python3.10dist(flask)
    python3.10dist(flask-login)
    python3.10dist(flask-principal)
    python3.10dist(flask-wtf)
    python3.10dist(itsdangerous)
    python3.10dist(passlib)

python3-flask-security-too+babel (rpmlib, GLIBC filtered):
    python(abi)
    python3-flask-security-too
    python3.10dist(babel)
    python3.10dist(flask-babel)

python3-flask-security-too+fsqla (rpmlib, GLIBC filtered):
    python(abi)
    python3-flask-security-too
    python3.10dist(flask-sqlalchemy)
    python3.10dist(sqlalchemy)
    python3.10dist(sqlalchemy-utils)

python3-flask-security-too+common (rpmlib, GLIBC filtered):
    python(abi)
    python3-flask-security-too
    python3.10dist(bcrypt)
    python3.10dist(flask-mail)



Provides
--------
python3-flask-security-too:
    python-flask-security-too
    python3-flask-security-too
    python3.10-flask-security-too
    python3.10dist(flask-security-too)
    python3dist(flask-security-too)

python3-flask-security-too+babel:
    python-flask-security-too+babel
    python3-flask-security-too+babel
    python3.10-flask-security-too+babel
    python3.10dist(flask-security-too[babel])
    python3dist(flask-security-too[babel])

python3-flask-security-too+fsqla:
    python-flask-security-too+fsqla
    python3-flask-security-too+fsqla
    python3.10-flask-security-too+fsqla
    python3.10dist(flask-security-too[fsqla])
    python3dist(flask-security-too[fsqla])

python3-flask-security-too+common:
    python-flask-security-too+common
    python3-flask-security-too+common
    python3.10-flask-security-too+common
    python3.10dist(flask-security-too[common])
    python3dist(flask-security-too[common])



Generated by fedora-review 0.7.6 (b083f91) last change: 2020-11-10
Command line :/usr/bin/fedora-review -b 2033801
Buildroot used: fedora-rawhide-x86_64
Active plugins: Generic, Python, Shell-api
Disabled plugins: fonts, Haskell, SugarActivity, Java, Perl, R, C/C++, Ocaml, PHP
Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH
============================ rpmlint session starts ============================
rpmlint: 2.2.0
configuration:
    /usr/lib/python3.10/site-packages/rpmlint/configdefaults.toml
    /etc/xdg/rpmlint/fedora.toml
    /etc/xdg/rpmlint/licenses.toml
    /etc/xdg/rpmlint/scoring.toml
    /etc/xdg/rpmlint/users-groups.toml
    /etc/xdg/rpmlint/warn-on-functions.toml
checks: 32, packages: 5

python3-flask-security-too+babel.noarch: W: no-documentation
python3-flask-security-too+common.noarch: W: no-documentation
python3-flask-security-too+fsqla.noarch: W: no-documentation
 5 packages and 0 specfiles checked; 0 errors, 3 warnings, 0 badness; has taken 0.9 s

Comment 11 Gwyn Ciesla 2022-01-18 15:12:09 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/python-flask-security-too

Comment 12 Sandro Mani 2022-01-18 16:03:00 UTC
Thanks for the review!


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